You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Take the InDesign IR (#63/#64) and the design tokens (#65) and emit the actual React artifacts: typed .tsx components, a barrel index.ts, optional Storybook stories, and the asset imports. This is the stage that turns the design into a finished, importable React package.
Details
Generate one .tsx component per InDesign spread (or per logical section, configurable). Component names are derived from spread/page names with safe-identifier fallback.
Map IR frames to JSX where possible: text frames → semantic tags (h1–h6, p, figcaption) inferred from paragraph-style role; image frames → <img> (or next/image when target is Next.js); multi-column layouts → CSS Grid or Flexbox with token-driven spacing.
Explicit prop types for any extracted content (type SpreadOneProps = { heading?: string; body?: string; image?: string; }) so consumers can override content while keeping layout.
Stage assets to public/indesign/ (or framework-appropriate location) and emit correct relative imports.
Auto-generate Storybook stories (*.stories.tsx) per component, populated with the extracted content as default args. Aligns with v2.0.0 Storybook auto-generation goal.
Emit a generation report (indesign-pipeline-report.md) listing produced artifacts, unmapped frames, accessibility follow-ups (e.g., missing alt text), and TODOs.
Acceptance Criteria
Running the generator end-to-end on the fixture .idml produces a directory of components that tsc --noEmit accepts and that renders in Storybook without runtime errors.
Sub-issue of #62.
Summary
Take the InDesign IR (#63/#64) and the design tokens (#65) and emit the actual React artifacts: typed
.tsxcomponents, a barrelindex.ts, optional Storybook stories, and the asset imports. This is the stage that turns the design into a finished, importable React package.Details
.tsxcomponent per InDesign spread (or per logical section, configurable). Component names are derived from spread/page names with safe-identifier fallback.h1–h6,p,figcaption) inferred from paragraph-style role; image frames →<img>(ornext/imagewhen target is Next.js); multi-column layouts → CSS Grid or Flexbox with token-driven spacing.type SpreadOneProps = { heading?: string; body?: string; image?: string; }) so consumers can override content while keeping layout..module.cssthat references the CSS variables from [InDesign pipeline] Style and design-token mapper (paragraph/character styles + swatches → tokens + Tailwind preset) #65.public/indesign/(or framework-appropriate location) and emit correct relative imports.*.stories.tsx) per component, populated with the extracted content as default args. Aligns with v2.0.0 Storybook auto-generation goal.indesign-pipeline-report.md) listing produced artifacts, unmapped frames, accessibility follow-ups (e.g., missing alt text), and TODOs.Acceptance Criteria
.idmlproduces a directory of components thattsc --noEmitaccepts and that renders in Storybook without runtime errors.Dependencies
Notes
Generated components must be deterministic given the same IR — reruns should not produce diff churn in unrelated files.