export type FramePointerIntent = 'select-frame' | 'delegate-to-layer' | 'delegate-to-canvas'; export type ImportedRouteSurface = 'editable-layers' | 'responsive-preview'; /** * The first pointer press on an inactive frame selects the frame shell only. * A later press may reach its editable DOM layers. Canvas tools always retain * ownership of the pointer so panning and section operations remain available. */ export declare function resolveFramePointerIntent(active: boolean, tool: string): FramePointerIntent; /** * Imported route layers stay interactive while the frame shell is selected. * The frozen responsive preview covers every window in which the captured * layer geometry cannot follow the frame's viewport: a resize gesture in * progress, and a committed size change whose re-import has not landed yet. */ export declare function resolveImportedRouteSurface(snapshotAvailable: boolean, sizeTransitionActive: boolean): ImportedRouteSurface; /** * True while a frame's viewport is moving or has moved away from the width * its layers were imported at. Imported layer geometry is only valid at its * import width — rendering it at another width overlaps and collides. A * viewport preset click commits a resize with no drag gesture; the frozen * replay covers the frame until the provisional re-import lands at the new * width. An edited tree schedules no re-import (edits win), so it settles * back to its editable layers immediately. */ export declare function frameSizeTransitionPending({ resizeDraftActive, importedAtCommittedWidth, reimportScheduled, }: { /** A resize drag gesture is in progress. */ resizeDraftActive: boolean; /** The committed width equals the width the layers were imported at. */ importedAtCommittedWidth: boolean; /** A provisional re-import is scheduled for the committed size. */ reimportScheduled: boolean; }): boolean; /** * The whole activating gesture belongs to frame selection, not just its * mousedown. Activation imports the frozen preview synchronously (the D2 * contract in docs/perf-contracts.md), so by the time the browser dispatches * the gesture's trailing `click`, an interactive imported tree already sits * under the pointer — and a design-surface selection click must never reach * application handlers (it navigated the host app's router when it did). * * The gate arms on the select-frame mousedown, consumes exactly one trailing * click, and releases when the gesture is over — releasing also covers the * click that never comes (press, drag off the frame, release elsewhere). */ export interface FrameActivationClickGate { /** Arm on the select-frame mousedown that activates the frame. */ arm(): void; /** The gesture ended without a suppressible click — disarm. */ release(): void; /** True exactly once for the click belonging to the arming gesture. */ consume(): boolean; } export declare function createFrameActivationClickGate(): FrameActivationClickGate;