import type { RefObject } from 'react'; /** * Fixed-row-height windowing. Tracks the scroll element's scrollTop / height and * returns the `[start, end)` slice of rows that should be in the DOM. * * Re-renders only when the first visible row (or the viewport height) changes, * not on every scroll pixel. */ export interface VirtualWindow { start: number; end: number; /** Total pixel height of all rows. */ total: number; /** Height of the scroll element's visible area (0 until measured). */ viewport: number; /** Scroll so row `index` is fully visible. */ scrollToIndex: (index: number) => void; } export declare function useVirtualWindow({ count, itemSize, enabled, scrollRef, offset, origin, overscan, }: { count: number; itemSize: number; enabled: boolean; scrollRef: RefObject; /** Height of a sticky header that covers the top of the scrollport. */ offset?: number; /** Content y of row 0 inside the scroll element. Defaults to `offset` (rows start under the header). */ origin?: number; overscan?: number; }): VirtualWindow;