import { getCachedInfiniteScrollManager, getCachedTransformManager, getItemPosition, InfiniteScrollManager, type OrientationProps, type ParsedTransition, TransformManager, VelocityTracker } from "./math"; export { getIndexFromValue, getValueFromIndex } from "@qds.dev/base/helpers"; export { getCachedInfiniteScrollManager, getCachedTransformManager, getItemPosition, InfiniteScrollManager, type OrientationProps, type ParsedTransition, TransformManager }; export declare function findClosestItemIndex(params: { scrollArea: HTMLElement; currentPosition: number; itemRefsArray: Array<{ value: HTMLElement | undefined; }>; align: "start" | "center" | "end"; orientationProps: OrientationProps; }): number; export declare function trackDragStart(params: { position: number; dragStartPos: { value: number | undefined; }; dragStartTime: { value: number | undefined; }; }): void; export declare function resetDragTracking(params: { dragStartPos: { value: number | undefined; }; dragStartTime: { value: number | undefined; }; }): void; export { DEFAULT_MOMENTUM_CONFIG, hasSufficientVelocity, type MomentumConfig, VelocityTracker, type VelocityTrackerConfig } from "./math"; export declare function resetInteractionState(params: { isMouseDown: { value: boolean; }; isMouseMoving: { value: boolean; }; isTouchMoving: { value: boolean; }; isTouchStart: { value: boolean; }; dragStartPos: { value: number | undefined; }; dragStartTime: { value: number | undefined; }; velocityTracker: VelocityTracker | null; }): void; /** * Applies rubber-band resistance when dragging beyond bounds. * Returns the adjusted transform value with resistance applied. */ export declare function applyRubberBand(rawTransform: number, bounds: { min: number; max: number; }, isLoop: boolean): number; /** * Determines if the transform should be updated during drag. * In loop mode: always update if value changed (InfiniteScrollManager handles wrapping) * In non-loop mode: always update if value changed (rubber-band handles overshoot) */ export declare function shouldUpdateDragTransform(newTransform: number, currentTransform: number, _bounds: { min: number; max: number; }, _isLoop: boolean): boolean; export declare function cancelActiveAnimation(params: { infiniteScrollManager: InfiniteScrollManager | null; transformManager: TransformManager; transform: { value: { x: number; y: number; z: number; }; }; cancelledAnimation: { value: boolean; }; }): void; /** * Minimal context interface for navigation utilities. * This avoids circular dependencies with carousel-root while still providing type safety. */ export interface NavigationContext { localId: string; itemsPerView: { value: number; }; isMoveView: { value: boolean; }; move: { value: number | "view"; }; totalItems: { value: number; }; isLoop: { value: boolean; }; isRewind: { value: boolean; }; itemValues: { value: string[]; }; currentIndex: { value: number; }; } /** * Syncs itemsPerView from the script-populated global state. * This is needed in CSR where useResumed$ may not have run before interaction. */ export declare function syncItemsPerView(localId: string, itemsPerView: { value: number; }): number; /** * Calculates valid navigation indexes based on current carousel state. * Uses fresh values directly to avoid computed signal timing issues. */ export declare function getValidNavigation(context: NavigationContext): { indexes: number[]; values: string[]; currentPosition: number; }; /** * Gets the next value in the carousel navigation. */ export declare function getNextValue(context: NavigationContext): string | undefined; /** * Gets the previous value in the carousel navigation. */ export declare function getPrevValue(context: NavigationContext): string | undefined; declare global { interface Window { __qdsCarouselTouch?: { active: boolean; orientation: "horizontal" | "vertical"; startX: number; startY: number; }; carouselState?: Record; } }