type Axis = 'x' | 'y'; type ScrollTarget = HTMLElement | Window; interface ScrollMetrics { x: number; y: number; minX: number; maxX: number; maxY: number; viewportWidth: number; viewportHeight: number; } declare function readScroll(target: ScrollTarget): ScrollMetrics; declare function isScrollable(element: HTMLElement, axis: Axis): boolean; declare function findScrollParent(element: HTMLElement, axis: Axis): ScrollTarget; type Easing = (t: number) => number; declare const easings: { linear: (t: number) => number; easeInCubic: (t: number) => number; easeOutCubic: (t: number) => number; easeInOutCubic: (t: number) => number; }; declare function cubicBezier(x1: number, y1: number, x2: number, y2: number): Easing; type ScrollAnimation = { type: 'tween'; duration?: number; easing?: Easing; } | { type: 'spring'; stiffness?: number; damping?: number; mass?: number; velocity?: { x?: number; y?: number; }; } | { type: 'instant'; }; type ScrollResult = 'completed' | 'interrupted' | 'cancelled'; interface ScrollHandle { finished: Promise; cancel(): void; } interface AnimateScrollOptions { animation?: ScrollAnimation; interruptible?: boolean; respectReducedMotion?: boolean; } interface ScrollDestination { x?: number; y?: number; } declare function animateScroll(target: ScrollTarget, to: ScrollDestination, options?: AnimateScrollOptions): ScrollHandle; declare function cancelScroll(target: ScrollTarget): void; interface ScrollState { x: number; y: number; minX: number; maxX: number; maxY: number; progressX: number; progressY: number; atTop: boolean; atBottom: boolean; atLeft: boolean; atRight: boolean; canScrollX: boolean; canScrollY: boolean; directionX: Direction; directionY: Direction; velocityX: number; velocityY: number; isScrolling: boolean; } type Direction = -1 | 0 | 1; declare function observeScroll(target: ScrollTarget, listener: (state: ScrollState) => void, { idleDelay }?: { idleDelay?: number; }): () => void; declare function lockScroll({ allow }?: { allow?: HTMLElement[]; }): () => void; interface DragScrollOptions { axis?: Axis; mouse?: boolean; } declare function dragScroll(element: HTMLElement, { axis, mouse }?: DragScrollOptions): () => void; declare function readSnapPositions(container: HTMLElement, axis: Axis): number[]; declare function observeActiveSection(sections: HTMLElement[], listener: (index: number) => void, { root, offset }?: { root?: ScrollTarget; offset?: number; }): () => void; type Edge = 'top' | 'bottom' | 'left' | 'right'; type ScrollAlign = 'start' | 'center' | 'end' | 'nearest'; interface ScrollToElementOptions extends AnimateScrollOptions { align?: ScrollAlign; offset?: number; } declare function scrollToEdge(target: ScrollTarget, edge: Edge, options?: AnimateScrollOptions): ScrollHandle; declare function scrollBy(target: ScrollTarget, delta: ScrollDestination, options?: AnimateScrollOptions): ScrollHandle; declare function scrollToElement(target: ScrollTarget, element: HTMLElement, options?: ScrollToElementOptions): ScrollHandle; interface RestoreScrollOptions { storage?: Storage; timeout?: number; } declare function restoreScroll(target: ScrollTarget, key: string, { storage, timeout }?: RestoreScrollOptions): () => void; interface StickToBottom { scrollToBottom(options?: AnimateScrollOptions): ScrollHandle; stop(): void; } declare function stickToBottom(element: HTMLElement, onChange?: (isAtBottom: boolean) => void): StickToBottom; export { type AnimateScrollOptions, type Axis, type DragScrollOptions, type Easing, type Edge, type RestoreScrollOptions, type ScrollAlign, type ScrollAnimation, type ScrollDestination, type ScrollHandle, type ScrollMetrics, type ScrollResult, type ScrollState, type ScrollTarget, type ScrollToElementOptions, type StickToBottom, animateScroll, cancelScroll, cubicBezier, dragScroll, easings, findScrollParent, isScrollable, lockScroll, observeActiveSection, observeScroll, readScroll, readSnapPositions, restoreScroll, scrollBy, scrollToEdge, scrollToElement, stickToBottom };