weasel API - v0.8.0
    Preparing search index...

    Interface ComposeSelectionPoseOpts<TPose>

    Options for composeSelectionPose.

    interface ComposeSelectionPoseOpts<TPose> {
        fromBounds?: (bounds: Bounds) => TPose;
        getBounds?: (pose: TPose) => Bounds;
        getChildren?: (id: string) => readonly string[];
        getStoredPose: (id: string) => TPose;
        isContainer?: (id: string) => boolean;
        moveOverlay?: { poses: Map<string, TPose> } | null;
        resizeOverlay?:
            | { currentPose: TPose; id: string; leafPoses?: Map<string, TPose> }
            | null;
    }

    Type Parameters

    • TPose
    Index

    Properties

    fromBounds?: (bounds: Bounds) => TPose

    Wrap an AABB back into a TPose. Called only when the resolver collapses a container's leaves into a single union AABB. Defaults to the identity — for Path poses pass (b) => ({ kind: 'rect', ...b }).

    getBounds?: (pose: TPose) => Bounds

    Project a pose into its AABB. Used when reducing a group of leaf poses into a single union AABB. Defaults to the identity — rect-shaped poses ({x, y, width, height}) need no override. For Path poses pass boundsOfPath.

    getChildren?: (id: string) => readonly string[]

    Walk a container's direct children (e.g. scene.childrenOf). With isContainer, a selected container resolves to the union AABB of its transitive leaf poses instead of its own stored pose.

    getStoredPose: (id: string) => TPose

    Fallback pose lookup (typically the stored/committed pose).

    isContainer?: (id: string) => boolean

    True when id is a structural container.

    moveOverlay?: { poses: Map<string, TPose> } | null

    Move overlay; when present its poses map wins over everything else.

    resizeOverlay?:
        | { currentPose: TPose; id: string; leafPoses?: Map<string, TPose> }
        | null

    Resize overlay; consulted only when move overlay does not own the id. For container resize, leafPoses (when present) maps each leaf id under the container to its overlay pose. If absent the container falls back to stored leaf poses (defensive — container-resize integration is in flight).