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

    Interface OverlayContext

    Live layout snapshot passed to function-form overlay callbacks.

    interface OverlayContext {
        affordances: Affordance<unknown>[];
        dispatchAffordance: (event: LayoutEvent) => void;
        draggingAffordanceId: string | null;
        isPreview: boolean;
        placements: Map<NodeId, Rect>;
        unplaced: NodeId[];
        viewport: { h: number; w: number } | null;
    }

    Hierarchy (View Summary)

    Index

    Properties

    affordances: Affordance<unknown>[]
    dispatchAffordance: (event: LayoutEvent) => void

    Feed a strategy event (e.g. drag delta on an affordance) into the container's reduce() and persist the new state on the store. State lives in a side-channel map (not snapshotted, not in undo history). No-op when the strategy has no reduce.

    draggingAffordanceId: string | null

    ID of the affordance currently being dragged, or null.

    isPreview: boolean

    True when the current placements were produced from a preview input. Container uses this to suppress the source's real chrome during preview.

    placements: Map<NodeId, Rect>
    unplaced: NodeId[]
    viewport: { h: number; w: number } | null