import React from 'react'; import { CarouselProps, ScrollAlign, ScrollAxis } from './Carousel.types'; /** * Подсчет смещения из-за паддингов. */ export declare const getCalculatedOffset: (scrollEl: Element, trackEl: Element, axis: ScrollAxis) => number; /** * Подсчет скролла до переданного индекса. */ export declare const getCalculatedPos: ({ scrollEl, items, axis, index, offset, scrollAlign, }: { scrollEl: HTMLElement; items: HTMLCollectionOf; axis: ScrollAxis; index: number; offset: number; scrollAlign: ScrollAlign; }) => number; declare const tfs: { linear: (t: number) => number; easeIn: (t: number) => number; easeOut: (t: number) => number; easeInOut: (t: number) => number; }; export type TimingFunction = keyof typeof tfs; /** * Плавная прокрутка по горизонтали * @param {Element} elem * @param {number} pos * @param {number} duration * @param {string} timingFunction */ export declare const animatedScrollToX: (elem: Element, pos: number, duration?: number, timingFunction?: TimingFunction) => void; /** * Прокрутка к указанной позиции с анимацией или без. */ export declare const scrollToPos: ({ scrollEl, pos, axis, animated, duration, timingFunction, }: { scrollEl: HTMLElement; pos: number; axis: ScrollAxis; animated?: boolean; duration?: number; timingFunction?: TimingFunction; }) => void; /** * Получить позицию (слот) айтема в каруселе. * Каждый айтем имеет свой слот относительно вьюпорта карусели. */ export declare const getItemSlot: (itemIndex: number, itemEnd: number, itemSize: number, scrollStart: number, scrollSize: number, scrollAlign: ScrollAlign, prevIndex?: number, offset?: number) => number | null; export declare function getCarouselItems(track: HTMLElement): HTMLCollectionOf; export declare function useDebouncedFunction(func: (...args: any) => any, delay: number, cleanUp?: boolean): (...args: any[]) => void; type UseCarouselOptions = Pick & { axis: 'x' | 'y'; animatedScrollByIndex?: boolean; throttleMs?: number; debounceMs?: number; }; type UseCarouselHookResult = { scrollRef: React.MutableRefObject; trackRef: React.MutableRefObject; }; export declare const useCarousel: ({ index, axis, detectActive, detectThreshold, scrollAlign, scaleCallback, scaleResetCallback, onIndexChange, onDetectActiveItem, animatedScrollByIndex, throttleMs, debounceMs, }: UseCarouselOptions) => UseCarouselHookResult; export {}; //# sourceMappingURL=useCarousel.d.ts.map