Composition / foldkit-builder
What it owns
| Fact | Owner |
|---|---|
| What a page may hold, and how each Block looks | the application: a Catalog and a Renderer |
| The page being edited | the Builder's Model, as the form key's value |
| Undo | the Builder's Model: the page is kept as a foldkit-primitives/state history |
| What is selected, the open panel, the viewport | the Builder's Model, beside the page |
| The last node copied or cut | the Builder's Model, as clipboard, and the system clipboard as text |
| Which text on the page is being edited in place, and what it said when that began | the Builder's Model, as editing |
| A prop's field while it holds text that does not decode yet | the Builder's Model, as inspector |
| The layers' keyboard focus and which rows are open | the Builder's Model, as a TreeNavigation placement |
| What the editor last said to assistive technology | the Builder's Model, as a LiveAnnounce placement |
| Saving, revisions, publishing | the form, and foldkit-cms around it |
The Catalog and the Renderer are vocabulary, not state. The Builder closes over them where it is made; they never enter the Model or a placement's args.
Mental model
view: a click, a key ─► Builder Message ─► Composition.apply ─► next Document
│
History.push(page, document) ◄┘ one transition
Form: Control Message carries it; a change of Document is an edit; the rest is not