export interface SliderState { active: number; count: number; /** Continuous position in slide units (0 .. count−1). */ position: number; /** 0..1 across the scrollable range. */ progress: number; dragging: boolean; gliding: boolean; } export interface SliderOptions { /** Scroll axis (default 'x'). */ axis?: 'x' | 'y'; /** Snap strictness (default 'mandatory'). */ snap?: 'mandatory' | 'proximity'; /** Mouse drag-to-scroll (default true; touch is native regardless). */ drag?: boolean; /** Glide settle time in ms (default 600; 0 = instant). Exponential lerp: * velocity ∝ remaining distance, so any travel feels equally soft. */ duration?: number; /** Write --sd, --sv-progress and --sv-slide (default true). Disable when * CSS does not consume them. Existing inline values are left intact. */ cssVars?: boolean; /** Fires when the active slide changes. */ onSlide?: (index: number) => void; /** Fires on every measured scroll frame with the full state. Drive a * progress bar, or chain another slider through `seek`. Keep it cheap. */ onScroll?: (state: SliderState) => void; } export interface SliderHandle { next: (smooth?: boolean) => void; prev: (smooth?: boolean) => void; goTo: (index: number, smooth?: boolean) => void; /** Jump to a fraction (0..1) of the scrollable range. No glide. Made for * followers: suspends this instance's snap so the driver stays the single * writer of its position. */ seek: (progress: number) => void; /** Current active index. */ active: () => number; state: () => SliderState; destroy: () => void; } export declare function slider(container: HTMLElement, { axis, snap, drag, duration, cssVars, onSlide, onScroll, }?: SliderOptions): SliderHandle;