Composition / foldkit-builder

Messages

MessageWhat it does
Applied({ op })applies an Operation; a button, a key, a drag or an agent sends the same
InsertAsked({ block, at })a new node with the Block's starting props, once an id is minted
DuplicateAsked({ id, at })a copy of a node and what it holds, once ids are minted
PatternAsked({ pattern, at })one of the Catalog's patterns, once ids are minted for its nodes
CopyAsked({ id }), CutAsked({ id }), PasteAsked(), ClipboardRead({ text })the clipboard: see below
EditingAsked({ field }), FieldTyped({ field, text }), EditingCommitted({ field, text }), EditingCancelled({ field })text edited in place: see below
Minted({ ids, request })the ids a request waited for, answered by a Command
Selected({ id }), Deselected(), Hovered({ id }), Unhovered()what the inspector and the node actions work on
Undid(), Redid()a step of the page's undo history
PanelChosen({ panel }), ViewportChosen({ viewport })the editor's own choices
DragStarted({ source }), DraggedOver({ id, zone }), DraggedOverRegion({ id, region }), DraggedOff(), DraggedOverPage(), DragDropped(), DragCancelled()a pointer drag: see below
PreviewChosen({ key, value }), PreviewCleared({ key })previews the page with one context key set, or unset
Inspected({ id, message })a Message of the selected node's settings form: see below
Layers.wrapper.make(...), Announcer.wrapper.make(...)the placed tree and announcer's own Messages
  • Ids are minted in a Command (Composition.newIds), so update stays pure and an Operation always carries the ids it creates. Nothing changes until they arrive.
  • An applied Operation and its undo step change together: the Builder pushes the new Document onto its page history, a foldkit-primitives/state history. Consecutive edits of one prop of one node share a group, so typing a heading undoes as a whole.
  • A refused edit leaves the page as it was and says why in refused, until the next edit goes through.
  • A new node is selected, and a removed one is no longer.