import { type RefObject } from 'react'; export interface UseScrollOverflowReturn { /** Attach to the horizontally-scrollable element (the `overflow-x-auto` box). */ ref: RefObject; /** Content is hidden past the inline-START edge (scrolled away from the start). */ canScrollStart: boolean; /** Content is hidden past the inline-END edge (more to reveal toward the end). */ canScrollEnd: boolean; /** * Scroll by ~one viewport toward the inline start (`-1`) or end (`+1`), * smoothly unless the user prefers reduced motion. Direction-agnostic: works * in both LTR and RTL. */ scrollByPage: (direction: -1 | 1) => void; } /** * Reports whether a horizontally-scrollable element has hidden content at its * inline-start / inline-end edges, and exposes a paged scroll action — the * plumbing behind a scroll strip's edge affordances (fade + chevron buttons). * * Direction-agnostic: distance-from-start is read as `Math.abs(scrollLeft)`, * which is correct in both LTR (`0…max`) and modern RTL (`0…-max`), so the two * edges are reported on the right logical side without branching. `scrollByPage` * flips its physical sign from the element's computed `direction`. * * Re-measures on element resize AND on content-size change (a tab added past the * fold widens the content without changing the container) by observing both the * scroll box and its first child. `enabled` switches measurement off — e.g. when * the host collapses the strip into a menu and there is nothing to scroll. * * Because the scrolled content stays in the DOM and is reachable by keyboard * (focus scrolls it into view), the affordance this drives is a sighted-pointer * convenience; assistive tech is unaffected. */ export declare function useScrollOverflow(enabled?: boolean): UseScrollOverflowReturn; //# sourceMappingURL=use-scroll-overflow.d.ts.map