import { type RefObject } from 'react'; import type { TableVirtualizerInstance } from '../../TableContext/types'; interface UsePrependScrollAnchorOptions { mode: 'container' | 'window'; scrollRef?: RefObject; rows: { id: string; }[]; /** Preferred delta source: virtual-list offsets are immune to unrelated layout growth. */ virtualizerRef?: RefObject; /** Scopes the start-loader measurement to this table's body. */ tbodyRef?: RefObject; } /** * Keeps the viewport stable across a prepend, in a layout effect (pre-paint, no * flicker). Delta = how far the previously-first row moved down the virtual list * (`start` offset) — immune to unrelated page-height changes, unlike a * scrollHeight diff, which matters in `window` mode. Falls back to scrollHeight * when there's no virtualizer. * * Start-edge skeletons (`isLoadingPrevious`) sit above the rows but outside the * virtual list, so the offset delta can't see them; their height is tracked per * commit (hence no dep array) and its collapse joins the delta when the prepend * lands in the same commit. */ export declare const usePrependScrollAnchor: ({ mode, scrollRef, rows, virtualizerRef, tbodyRef, }: UsePrependScrollAnchorOptions) => void; export {};