windease API reference - v0.6.0
    Preparing search index...

    Class Store

    Store — the unified-node-model store.

    Single nodes map; every mutation that touches a node produces a fresh Node object (record replacement) so React's useSyncExternalStore detects the change via referential equality. FSM transitions are paired with a node-record swap.

    Index

    Constructors

    Accessors

    Methods

    • Read the persisted strategy state for id's container (e.g. splitStrategy ratio), or undefined if nothing has been written yet — in which case the consumer initializes via strategy.initialState. Lives on node.container.state, round-trips through snapshot/hydrate.

      NOT meant to feed undo/redo: when v2 history lands, this field should be explicitly excluded — resize gestures should not pollute the timeline.

      Parameters

      Returns unknown

    • Parameters

      Returns
          | {
              allowsPinning: boolean;
              childOrder: readonly NodeId[];
              config: unknown;
          }
          | null

    • Parameters

      • id: NodeId
      • patch: Record<string, unknown>

      Returns void

    • Parameters

      • id: NodeId
      • patch: Record<string, unknown>

      Returns void

    • Parameters

      • id: NodeId
      • value: Record<string, unknown>

      Returns void

    • Write strategy state for id's container. Emits container.stateChanged and schedules a notify. Throws if id has no container capability.

      Parameters

      Returns void

    • Parameters

      • id: NodeId
      • patch: Record<string, unknown>

      Returns void

    • Parameters

      • id: NodeId
      • key: string
      • value: unknown

      Returns void

    • Parameters

      • fn: () => void

      Returns () => void

    Properties

    events: TypedEmitter<StoreEvents> = ...