Composition / API

foldkit-builder

foldkit-builder: the page builder's state, as an ordinary Bundle.

The Builder edits a foldkit-composition Document by Operations. Its Model holds the page as an undo history (foldkit-primitives/state) whose present is the Document, with the editor's state beside it (what is selected, the open panel, the viewport), so an edit and the undo step that records it are one value, changed in one transition. The Catalog and the Renderer are vocabulary, not state: the Builder closes over them where it is made, and they never enter the Model or a placement's args.

Placed as a form key's control (builder.input), the Document is that key's value: the form validates it, submits it, and a CMS autosaves it, while a selection or an open panel is not an edit. Placed alone, with Bundle.withChild, its parent owns the Model instead.

Namespaces

Functions

controlOfThe control a prop is drawn with: the Block's hint, else what its Schema says.
inputOfThe input an event of a Block runs an action with, as a form, made at the first use and kept. One per Block, event and action, so two events of one node…
settingsOfA Block's props as a form, made at the first use and kept: one per Block.

Values

AnnouncerWhat the editor says to assistive technology: a move, an insert, a refusal.
ContextValueA value of the page's context, as the editor previews it.
DragA drag under way: what is dragged, what it is over, and where it would go.
DragSourceWhat a drag carries: a node on the page, or a new node of a Block, from the palette.
DropZoneWhere over a node a drop lands: before it, inside it, or after it.
editWords
LayersThe layers panel's keyboard focus and which rows are open: a tree that starts open.
Message
Model
Panel
Viewport

Interfaces

BuilderCommandOne thing the editor does, and every way to ask for it.
CommandKeyA key that runs a command, named as KeyboardEvent.key names it. mod is Ctrl, or ⌘ on a Mac. mod and alt must be as given; shift must be as given only where…
EditWordsThe Builder's own words: what it says to assistive technology of each edit, its commands' labels, and the refusals it makes itself. Words are text; a word…
InspectedFormOne form the inspector draws for the selected node, and its Model.
InspectingThe selected node as the inspector edits it: its Block and its forms.

Types

SettingsA form over a node's values and the codecs the Builder holds it with.
StartersWhat a new node of each Block starts with. A Block without starting props is not offered.