Skip to content

Composition

Components combine structures, independent state, explicit policies, and host commands. Each fact has one owner, so changing a policy cannot silently rewrite a structure or duplicate state authority.

Listbox

Structure
sequence
State
cursor + selection
Policy
eligibility + selection follows focus

Slider

Structure
range
State
tick
Policy
increment + page step

Calendar

Structure
grid
State
cursor + selection
Policy
date arithmetic + eligibility

Tree view

Structure
tree
State
expansion + cursor + selection
Policy
visible projection

Combobox

Structure
sequence | grid | tree
State
text + popup + cursor + selection
Policy
filter + acceptance

Tree grid

Structure
tree + grid
State
expansion + cursor + selection + edit mode
Policy
row/cell mapping

Composition operators

OperatorMeaning
ProductCombine independent state or structure authorities.
SumSelect one mutually exclusive mode.
RefinementRestrict valid models with additional laws.
ProjectionDerive a canonical observable view.
ParameterizationInject an explicit policy or capability.
TransactionCompute child transitions and commit them atomically.
RevisionReject stale input through an ordered snapshot wrapper.

Example: listbox

text
sequence
× cursor
× selection
× eligibility policy
× selection-follows-focus policy
× focus command

The sequence owns item order. The cursor owns the current item. Selection owns chosen identities. Policy decides whether cursor movement also changes selection. The host executes the resulting focus command.

Example: combobox

text
text
× popup state
× (sequence | grid | tree)
× cursor
× selection
× filter and acceptance policy
× focus and acceptance commands

IME composition remains text state until it is explicitly committed or cancelled. Candidate acceptance cannot reinterpret active composing text as committed query text.

Example: tree grid

text
tree hierarchy
× grid coordinates
× expansion
× cursor
× selection
× edit mode

The composite owns the mapping between row identity and cell coordinate. Tree and grid retain their individual laws instead of becoming one ambiguous hybrid structure.

Released under the MIT License.