Goal
Evolve the app (and downstream consumers) from "ships its own slide stack" to a
standard consumer of the @maic/{dsl, renderer, importer, exporter} package
family. End state: the app keeps only business glue (media-store resolution,
lazy placeholders, app chrome); every contract, renderer, importer and exporter
lives in a package with a published boundary.
Dependency rule (established in #668, kept acyclic):
@maic/dsl → nothing; renderer / importer / exporter → @maic/dsl only.
Where we are (done)
Phase 1 — Cleanup & consolidation (low risk, immediately actionable)
Phase 2 — Grow the DSL (needs contract design)
Phase 3 — renderer v2: the editing surface (largest item, critical path)
Phase 4 — exporter & closing the family (parallel to Phase 3)
Phase 5 — ecosystem consumers (unlocked by Phase 1 publish)
Principles
- Business glue (media-generation store resolution, lazy placeholders, app
badges) stays in the consumer, never in the packages.
- Migrate incrementally: shim/wrapper first, batch-switch imports, delete the
legacy code last (the slides shim is the precedent).
@maic/dsl never gains a runtime dependency; cross-package enums stay
regular enums.
Risks
- renderer v2's editing surface is the bulk of the remaining work and gates
Phase 3; worth starting design early.
- The Stage/Action type split needs contract review before Phase 2 lands.
Goal
Evolve the app (and downstream consumers) from "ships its own slide stack" to a
standard consumer of the
@maic/{dsl, renderer, importer, exporter}packagefamily. End state: the app keeps only business glue (media-store resolution,
lazy placeholders, app chrome); every contract, renderer, importer and exporter
lives in a package with a published boundary.
Dependency rule (established in #668, kept acyclic):
@maic/dsl→ nothing;renderer/importer/exporter→@maic/dslonly.Where we are (done)
@maic/dsl(pure contract),@maic/renderer(read-onlycanvas, v1),
@maic/importer(pptx → DSL); app consumes the importer.dsl+renderer:lib/types/slides.tsis athin re-export shim of
@maic/dsl; the three read-only thumbnailsurfaces render through
SlideCanvas(with reactivegen_*mediaresolution in the app-side wrapper).
Phase 1 — Cleanup & consolidation (low risk, immediately actionable)
ThumbnailSlide/+ThumbnailElement(zero importsafter refactor(app): consume @maic/dsl + @maic/renderer in the app (slide types + read-only thumbnails) #707, ~217 LOC)
@/lib/types/slidesimport sites directly at@maic/dsl,then delete the shim
@maic/dslbuild: extensionless re-exports indist/index.jsbreakbare-node ESM resolution (emit
.jsextensions)@maic/dsl,@maic/renderer,@maic/importerto npm(
publishConfigis already in place) — unlocks all out-of-workspaceconsumers
Phase 2 — Grow the DSL (needs contract design)
Stage/Scene/SceneContenttypes fromlib/types/stage.tsinto@maic/dsl(blocker: they currently couple toAction / Widget / generation types — split the pure parts first; already
on the dsl README roadmap)
lib/types/action.ts) into the contract(
@maic/dslor a sibling package)non-TS consumers)
DSL_VERSION+ the migration registryPhase 3 — renderer v2: the editing surface (largest item, critical path)
@maic/rendererv2: selection, drag/resize/rotate, operate handles,ProseMirror inline editing (v1 is read-only by design)
components/slide-renderer/Editor/(~38 files) and thefull-size
components/element/renderers (~41 files) — the last bigduplicated implementation in the app
components/slide-renderer/keeps only business glue(
SlideThumbnail-style wrappers,ThumbnailInteractive)Phase 4 — exporter & closing the family (parallel to Phase 3)
@maic/exporter(the reserved 4th member): extract PPTX / HTML /offline-ZIP export from
lib/exportsync-maic-importer.mjsvendor step in favor of normal package depsPhase 5 — ecosystem consumers (unlocked by Phase 1 publish)
@maic/dslinstead of vendored slide-typecopies,
@maic/importerfor pptx import, and (where read-only suffices)@maic/rendererfor display — peer requirements: React ≥18, Tailwind 4Principles
badges) stays in the consumer, never in the packages.
legacy code last (the slides shim is the precedent).
@maic/dslnever gains a runtime dependency; cross-package enums stayregular
enums.Risks
Phase 3; worth starting design early.