Expand description
The LAYOUT tree: the normalized UiNode tree (macros already expanded)
becomes a flat pre-order list of layout nodes the engine and the painters
work on. Here the core adds what painters must not invent: the BIND pass
(bindings, calls and $string.<id> copy resolved in props, styles and
recipe props; a node whose visible resolves falsy is dropped with its
subtree), template children instantiated per item (ids <template>.<key>
with the template key, else <template>.<i>), natives with structure
of their own get synthetic PART nodes (ids <owner>.<part>, recipes keyed
on the owner’s component so a theme styles them), overlay natives and
every popup (Select, the pickers, menus and submenus, tooltips, hover
cards, toasts) put their content into LAYERS with their own roots, and
extension natives arrive as Extension leaves.
The builder numbers nodes in pre-order; the surface maps them onto
STABLE SLOTS by id afterwards (surface::reconcile), so a re-windowed
list or an opened overlay keeps every other node’s index.
Modules§
- fields
- The form controls (a themed surface expands each into its recipe parts):
Input/Textarea, Select (the combobox, its popup a LAYER), DatePicker and
DateRangePicker (one calendar layer), TimePicker (a list layer),
NumberField (steppers), ChipInput (chips + suggestions layer), FileUpload
(drop zone + files), Checkbox/Switch, Radio, Slider and the Form that
collects them. A field’s failed checks (after a refused submit) show
under it as
<field id>.errorand put its parts in theinvalidstate. - search
- EXP-1259 (the UI batch): the low-level pieces the app settled on, built from the natives every painter already draws.
Structs§
- Build
Context - Build
Seed - What a SUBTREE rebuild inherits from the full build: the enclosing Forms’ flags and the literal Table rows.
- Built
- Field
Errors - A form field’s validation state after a submit: its failed messages.
- LNode
- One layout node.
stylekeeps tokens UNRESOLVED and conditions NESTED; the surface resolves them per theme/mode and flattens per pass. - Layer
Spec - List
Spec - A windowed list’s state for one build.
- List
View - A list’s viewport on its axis, recorded after each pass.
- Local
State - Local UI state the core owns (never sent to the producer unless bound).
- Source
Ref - The source of an instance node: the source node’s id and the template
component whose reduced tree holds it (
None= the surface’s tree). - Toast
Spec - An open Toast the host times (
duration0 = sticky).
Enums§
- Layer
Class - Which band a layer stacks in: base < overlay < toast.
- Layer
Placement - How an overlay layer is placed.
- List
View Source - Round 2 (§5): where a windowed list’s viewport comes from.
- Node
Kind
Constants§
- FORM_
FIELDS - The form fields a Form collects (when they carry a
name). - OVERLAYS
- The overlay natives whose content lives in a layer.
Functions§
- build
- Build the layout tree for a normalized root.
Unknownnodes become leaves the painter renders as the placeholder. - build_
subtree - Rebuild ONE subtree (a re-windowed List/Table) under an existing parent:
node 0 of the result is a stub of
parent(the caller keeps the real one), the rest is the subtree in pre-order.seed= what the full build knew above it (the enclosing Forms’ disabled/busy, literal Table rows), so the subtree comes out exactly as a full rebuild would build it. - builtin_
icon - The builtin glyph of a part (
core.catalog.jsonbuiltinIcons). - is_
context_ menu - True for a
Menuopened by a right click / long press (openOn: contextmenu): its ONE child is the target region. - row_
scope_ root /$row/<table>/<i>[/…]→/$row/<table>/<i>(a literal Table row’s scope root).