/** State of one track() lease, independent of motion preference or fit-to-flow. */ export type AttachmentStatus = 'attaching' | 'active' | 'completed' | 'released' | 'failed'; export interface TrackOptions { /** Once per lease transition. Active follows successful measurement/output; * failed/released follow static settlement. Cleanup remains track()'s return. */ onStatus?: (status: AttachmentStatus) => void; /** Write `--sv-view` (-1 below viewport → 0 in scene → 1 gone above). Default true. */ view?: boolean; /** Write `--sv-t` (0..1 across the element's full travel through the viewport, * same semantics as the native `animation-timeline: view()` cover range). */ travel?: boolean; /** Write `--sv-pin` (0..1 across the element's pinned stretch). The raw * fuel for curtains, horizontal carousels and any sticky choreography. */ pin?: boolean | string; /** Sticky storytelling: split the element's pinned travel into N scenes. * Writes `--sv-scene` (0..N-1, eased + snapped) and fires onScene on integer changes. */ scenes?: number; /** Scene snap dead-zone (0..1), false to disable. */ snap?: number | false; /** Latch the live state once reached (entrance animations). */ once?: boolean; onLive?: (live: boolean) => void; onScene?: (scene: number) => void; /** Fires when a [data-sv-fit] stage falls back to document flow. Discrete, not per frame. */ onFlow?: (flow: boolean) => void; /** Fires every frame with the raw travel t (0..1). For video scrubbing, * WebGL cameras, or anything JS-driven. Keep the callback cheap. */ onTravel?: (t: number) => void; /** Fires every frame with the raw pin progress (0..1 across the pinned * stretch). Frame scrubbing, camera tours. Implies pin tracking. */ onPin?: (p: number) => void; /** Scroll container to measure against instead of the window viewport, * for tracked elements inside nested scroll panels. (The capture-phase * scroll listener already hears those scrolls; this makes the geometry * agree with them.) */ root?: HTMLElement; /** Live-band enter line as a fraction of the viewport height (default 0.75). */ enter?: number; /** Live-band exit line as a fraction of the viewport height (default 0.25). */ exit?: number; } /** Internal lease status, deliberately absent from the package exports. */ export interface Attachment { state: AttachmentStatus; stop: () => void; } export declare function init(): boolean; export declare function bootReleased(): boolean; export declare function releaseBoot(): void; /** Enable/disable document-wide --sv-page/--sv-v writes. Calling this at all * takes the decision away from auto-detection, permanently and in both * directions: pass true for a JS reader that no stylesheet reveals. * Repeated enabling does not schedule another frame. */ export declare function setPageOutputs(enabled: boolean): void; export declare function settleUntracked(el: HTMLElement): void; /** Track an element. Returns an untrack function. */ export declare function track(el: HTMLElement, opts?: TrackOptions): () => void; export declare function attach(el: HTMLElement, opts?: TrackOptions): Attachment; /** Force a recompute (e.g. after content changes outside a resize). */ export declare function refresh(): void; /** Scroll so a Scenes container lands on the given scene. Pass the same * `root` the container is tracked with to scroll that element instead of the * window. Uses the rendered height, like the driver's pin math. */ export declare function scrollToScene(el: HTMLElement, index: number, count: number, smooth?: boolean, root?: HTMLElement): void; export declare function prefersReducedMotion(): boolean;