State-Layout Mapping Runtime
StateSurface
Server owns state. Client owns DOM projection. Pages are MPA, in-page updates come from NDJSON state streams. Define surfaces, templates, transitions, and actions — the engine handles the rest.
Core Concepts
Core Concepts
Surface
Page shell with <h-state> anchors declared as plain HTML strings. Surfaces define structure — slots and layout, no business content.
Template
TSX projection components that render inside each <h-state> anchor. Templates are stateless by default — server state drives all content.
Transition
Server-side async generators that yield state frames. Full frames declare complete UI state; partial frames merge changes progressively.
Action
Declarative triggers via data-action attributes. No JS event wiring in user code — the engine handles delegation, pending states, and abort.