/** * Groups the slides into pages. A page starts at a slide and holds every * following slide that still fits, whole, in the rail's visible width. * Returns the scroll position of each page (the `offsetLeft` of its first * slide, which is also where CSS snaps). The rail is `position: relative`, * so `offsetLeft` is measured from the rail itself. */ export declare function getPageStarts(rail: HTMLElement): number[]; /** * The page the rail is scrolled to: the one whose start is nearest to * `scrollLeft`, or the last page once the rail cannot scroll any further * (its start may lie past the maximum scroll, where the browser clamps it). */ export declare function getActivePage(rail: HTMLElement, starts: number[]): number; type UseCarouselArgs = { draggable: boolean; onPageChange?: (page: number, pageCount: number) => void; }; /** * Measures the rail, follows its scroll position and exposes `goTo`. Pages * are re-measured when the rail or a slide changes size (ResizeObserver) and * when slides are added, removed or replaced (MutationObserver), so a * skeleton turning into a card or a tab swapping the list keeps the * navigation right. Mouse drag follows the pointer with snapping off and * settles on a page on release; touch scrolls natively. */ export declare function useCarousel({ draggable, onPageChange }: UseCarouselArgs): { railRef: import('react').RefObject; page: number; pageCount: number; goTo: (target: number) => void; }; export {};