@honua/sdk-js
    Preparing search index...

    Module interactions/declarativeExperimental

    @honua/sdk-js/interactions/declarative — compiles a standard interactions[] block (geospatial-mcp ADR-0030) onto this SDK's existing imperative binding primitives.

    The standard constrains the document, not the dispatcher: "client runtimes implement dispatch by compiling bindings onto whatever imperative primitives they already have". That is exactly what this module does — it owns no event plumbing of its own, only a compile table from the closed (on.event, do.verb) vocabulary onto createSelectionHandler, createHoverHandler, bindTableSelectionToExploration, bindFilterControlsToExploration, and subscribeExplorationSelector.

    Three properties are load-bearing and asserted by the suite:

    1. Validate before binding. compileHonuaInteractions runs the whole block through validateHonuaInteractions plus reference resolution against the components it was handed. A block with issues binds nothing — the standard rejects over-cap and malformed documents rather than truncating them.
    2. Actions never emit events. A verb-driven state change must not re-enter the dispatcher. Two mechanisms enforce it: every compiled handler is skipped while an action is in flight (#dispatching), and exploration-backed subscriptions run with the view controller's default includeSelf: false, so a change this compiler originated is never delivered back to this compiler. There is no cycle detection because there can be no cycle.
    3. Unsupported pairs are named, never dropped. When a binding's (on.event, do.verb) pair — or the component behind a ref — has no primitive to compile onto, it lands in HonuaCompiledInteractions.unsupported with the pair spelled out, so a host can surface a real "this runtime cannot honor that binding" message instead of silently rendering an inert app.

    The compiler surface tracks geospatial-mcp ADR-0030 while that ADR is Proposed; the component-adapter shapes may gain fields.

    Interfaces

    CompileHonuaInteractionsOptions
    HonuaCompiledInteractionBinding
    HonuaCompiledInteractions
    HonuaInteraction
    HonuaInteractionComponents
    HonuaInteractionControlComponent
    HonuaInteractionDispatch
    HonuaInteractionIssue
    HonuaInteractionLayerComponent
    HonuaInteractionLayout
    HonuaInteractionLayoutItem
    HonuaInteractionMapComponent
    HonuaInteractionValidation
    HonuaInteractionViewport
    HonuaInteractionWidgetComponent
    HonuaParsedInteractionRef
    HonuaUnsupportedInteraction
    ValidateHonuaInteractionsOptions

    Type Aliases

    HonuaInteractionEvent
    HonuaInteractionIssueCode
    HonuaInteractionRef
    HonuaInteractionRefKind
    HonuaInteractionVerb

    Variables

    HONUA_INTERACTION_EVENT_PATH_PREFIX
    HONUA_INTERACTION_EVENTS
    HONUA_INTERACTION_FANOUT_CAP
    HONUA_INTERACTION_REF_KINDS
    HONUA_INTERACTION_VERBS

    Functions

    compileHonuaInteractions
    isHonuaInteractionEvent
    isHonuaInteractionEventPath
    isHonuaInteractionRef
    isHonuaInteractionVerb
    parseHonuaInteractionRef
    readHonuaInteractionEventPath
    resolveHonuaInteractionArgs
    validateHonuaInteraction
    validateHonuaInteractions