import type { VerticalAlignment } from "../../types/alignment"; export declare function mapPageAlignment(alignment: VerticalAlignment): string; export declare function clamp(value: number, min: number, max: number): number; /** * Resolves the carousel's starting page. Out-of-range indexes (including a * missing `pages[i]` hole) fall back to 0. Uses index access rather than * `Array.prototype.at` so Chrome < 92 does not throw while mounting. */ export declare function getDefaultPageIndex(pages: readonly T[], initialPageIndex: number): number; /** Release speed (0.4 px/ms = 400 px/s) at or above which a swipe counts as a flick. */ export declare const FLICK_VELOCITY_PX_PER_MS = 0.4; /** * Decides which page a swipe settles on when the pointer is released. Matches * the native (iOS and Android) SDK carousels: * * - A flick (release speed >= `FLICK_VELOCITY_PX_PER_MS`) moves in the * direction the pointer was travelling when released. From a partial drag it * lands on the next page boundary that way, so dragging forward then flicking * back returns to the start page. * - A slower release settles on whichever page is nearest, i.e. the drag must * pass `SLOW_DRAG_THRESHOLD` of a page's width to change page. * - The result is never more than one page from `startPage`. * * Non-loop carousels clamp at their first and last page; loop carousels may * return an index just outside `[0, pageCount)` so the caller can animate into * a clone before normalizing. * * @param startPage Page the gesture started on. * @param dragDistance Signed change in slider translation in px (negative = * pointer moved left / next page). * @param velocityPxPerMs Signed pointer velocity at release, same sign * convention as `dragDistance`. * @param pageWidth Width of a single page in px. * @param pageCount Total number of real pages. * @param loop Whether the carousel loops. */ export declare function getSwipeTargetPage({ startPage, dragDistance, velocityPxPerMs, pageWidth, pageCount, loop, }: { startPage: number; dragDistance: number; velocityPxPerMs: number; pageWidth: number; pageCount: number; loop: boolean; }): number; export declare function getTranslation(element: HTMLElement | null): number;