Skip to content

[InDesign pipeline] IDML parser and intermediate representation #63

@PAMulligan

Description

@PAMulligan

Sub-issue of #62.

Summary

Implement a parser that reads InDesign Markup Language (.idml) packages and emits a normalized intermediate representation (IR) that downstream stages (mapper, component generator) consume.

Details

  • Treat .idml as a zip package; extract and validate manifest, designmap.xml, Resources/, Stories/, Spreads/, MasterSpreads/.
  • Parse stories (text + character/paragraph style references), spreads (frames, positions, transformations), master spreads, swatches, fonts, and linked/embedded images.
  • Resolve cross-references between stories and frames (ParentStory, Self IDs).
  • Normalize units to pixels at a configurable DPI (default 96).
  • Emit a typed IR (TypeScript types in packages/pipeline/src/indesign/ir.ts) covering: Document, Spread, Page, Frame, TextFrame, Story, ImageFrame, Style, Swatch, Font, MasterSpread.
  • Surface parse warnings (unsupported features) without aborting.

Acceptance Criteria

  • Given a fixture .idml, the parser produces a valid IR object that passes schema validation (zod).
  • All swatches, paragraph styles, character styles, and fonts are enumerated in the IR.
  • Image frames reference resolvable asset paths inside the IDML package.
  • Unit tests cover happy path + at least three malformed/edge-case IDMLs.
  • Parse warnings are collected on the IR and surfaced by the CLI.

Dependencies

  • None (foundational sub-issue)

References

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestpipelineFigma/Canva-to-React conversion pipelinereactReact-specific functionality

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions