import { type RefObject, type UIEvent } from "react"; import type { CollectionItem } from "../common-hooks"; /** * [ item key, total height before the item, next row index, CollectionItem] * e.g. first item: [0, 0, 1, data[0]] */ export type Row = [number, number, number, CollectionItem]; interface VirtualizationHookProps { viewportRef: RefObject; data: CollectionItem[]; itemGapSize?: number; } interface VirtualizationHookResult { rows: Row[]; contentHeight: number; onVerticalScroll: (e: UIEvent) => void; } export declare const useVirtualization: ({ viewportRef, data, itemGapSize, }: VirtualizationHookProps) => VirtualizationHookResult; export {};