import React from 'react'; import { AttrMapType, DirectionType } from './utils'; export declare type UseSmoothScrollType = { /** the container dom RefObject which use `overflow:scroll`, if scroll whole document, pass `ref = useRef(document.documentElement)` or `useRef(document.body)`. */ ref: React.RefObject; /** distance per frame, reflects to speed while scrolling */ speed?: number; /** scroll direction, you can use 'x` for vertical, 'y` for horizontal */ direction?: DirectionType; /** allowable distance beteween nowable state the judgement edge */ threshold?: number; }; export declare const getRelativeDistance: (target: number | string | undefined, parent: HTMLElement, attrMap: AttrMapType) => number; export declare const useSmoothScroll: ({ ref, speed, direction, threshold, }: UseSmoothScrollType) => { reachedTop: boolean; reachedBottom: boolean; containerSize: number; scrollTo: (target?: string | number | undefined, offset?: number | undefined) => void; /** @deprecated replace with scrollTo(n * containerSize) */ scrollToPage: (page: number) => void; /** @deprecated */ refreshState: (...args: any) => void; /** @deprecated */ refreshSize: (...args: any) => void; }; export default useSmoothScroll;