import * as React from 'react'; export interface VirtualListHandle { scrollToIndex: (index: number, options?: { align?: 'start' | 'center' | 'end' | 'auto' | undefined; }) => void; scrollToKey: (key: React.Key, options?: { align?: 'start' | 'center' | 'end' | 'auto' | undefined; }) => void; measureElement: (el: Element | null) => void; scrollToOffset: (offset: number) => void; } export type VirtualListProps = { items: readonly T[]; getItemKey: (item: T, index: number) => React.Key; renderItem: (item: T, index: number) => React.ReactNode; /** Estimated item size in px before measurement. */ estimateSize: (index: number) => number; overscan?: number | undefined; orientation?: 'vertical' | 'horizontal' | undefined; /** 'end' keeps the viewport pinned to the last item while items append. */ anchor?: 'start' | 'end' | undefined; onEndReached?: (() => void) | undefined; /** Distance in px from the list end that triggers onEndReached. */ endReachedThreshold?: number | undefined; /** 'none': the scroller is presentational inside an owning widget (e.g. Command's Base UI listbox, REQ-SURF-60). */ role?: 'list' | 'log' | 'listbox' | 'none' | undefined; itemRole?: string | undefined; /** Fires with the count of rendered items when it changes (tests/metrics). */ onRangeChange?: ((range: { startIndex: number; endIndex: number; }) => void) | undefined; className?: string | undefined; /** Indexes rendered even when outside the window (e.g. the option an aria-activedescendant points at, SURF-063). */ pinnedIndexes?: readonly number[] | undefined; /** Scroller id (e.g. the listbox a combobox's aria-controls points at). */ id?: string | undefined; 'aria-label'?: string | undefined; 'aria-labelledby'?: string | undefined; style?: React.CSSProperties | undefined; /** * External scroll container (REQ-SURF-109). When set, VirtualList renders no * scroller of its own (no `overflow`): the returned ancestor scrolls and the * list measures its offset inside it as the virtualizer's scroll margin. */ getScrollElement?: (() => HTMLElement | null) | undefined; }; export declare const VirtualList: (props: VirtualListProps & { ref?: React.Ref; }) => React.ReactElement; //# sourceMappingURL=VirtualList.d.ts.map