import { EMPTY_SCROLL_STATE, type ScrollState } from '../model/types'; export type { ScrollState }; export { EMPTY_SCROLL_STATE }; /** * Anything that can act as the scrolling viewport for virtualization. * `'window'` (or omitting it) uses the page scroll; an element enables * virtualization inside an `overflow: auto` panel, modal, or dashboard pane. */ export type ScrollTargetOption = Window | HTMLElement | null | undefined | 'window' | (() => Window | HTMLElement | null); /** Narrow a {@link ScrollTargetOption} to a concrete, live target. */ export declare function resolveScrollTarget(option: ScrollTargetOption): Window | HTMLElement | null; /** * Read current scroll geometry. Performs one `getBoundingClientRect()` on the * container, so callers should batch this into an animation frame rather than * invoking it per scroll event. */ export declare function readScrollState(target: Window | HTMLElement | null, container: HTMLElement | null): ScrollState; export declare function scrollStatesEqual(a: ScrollState, b: ScrollState): boolean; /** * Observe scroll and resize on `target`, reporting geometry changes. * * Events are coalesced into at most one report per animation frame, and the * container's offset is re-read on every frame — so a sticky header collapsing * mid-scroll cannot desynchronise the visible window. Identical consecutive * states are suppressed to avoid pointless re-renders. * * @returns a dispose function that removes every listener. */ export declare function createScrollTracker(target: Window | HTMLElement | null, getContainer: () => HTMLElement | null, onChange: (state: ScrollState) => void): () => void;