import React from 'react'; import { ResultsMenuPropsBase } from '../ResultsMenu'; import type { ComponentProps } from '../../utils/types'; interface VirtualizedResultsMenuPropsBase extends Omit { virtualization?: number; } type VirtualizedResultsMenuProps = ComponentProps; /** * A wrapper for `ResultsMenu` which virtualizes the `children`. The received `children` array will be split into **"panes"** each with `virtualization` entries * and, at any given time, 3 or fewer of these panes will be rendered in the DOM. * * Given the children `[1, 2, 3, 4, 5, 6, 7, 8, 9]` and `virtualization=4`, then at first only elements `[1, 2, 3, 4, 5, 6, 7, 8]` will be added to the DOM. * Once either child `6` or `8` intersect the `Menu` rendered by `ResultsMenu` the next pane of children will also be included and, if needed, the oldest pane * will be removed. * * In effect this means the menu will show the "central" content at pane index _`n`_, a previous-content-buffer comprised of pane index _`n - 1`_, * and an upcoming-content-buffer comprised of pane index _`n + 1`_. * * An `IntersectionObserver` will observe the first node in the _`n - 1`_ pane, the last node in the _`n + 1`_ pane, and the central node in both _`n ± 1`_ panes * for intersections with the rendered `Menu` and trigger a *pane change* upon that intersection. As such, in SSR or other environments which don't support `IntersectionObserver` * this component should not be used and will be replaced by the barrel file with a vanilla `ResultsMenu`. * * @throws in `__DEV__` when `virtualization` is too small as compared to the menu height (`virtualization` must be greater than the number of visible items in the rendered menu) * @throws in `__DEV__` when `virtualization` is less than or equal to 1 (`virtualization` must be ≥ 2) * @throws in `__DEV__` when `virtualization` is changed during the lifecycle of the `VirtualizedResultsMenu` component */ declare function VirtualizedResultsMenu({ virtualization: virtualizationProp, elementRef: elementRefProp, children: originalChildren, focusMode, ...props }: VirtualizedResultsMenuProps): React.JSX.Element; declare namespace VirtualizedResultsMenu { var propTypes: React.WeakValidationMap; } export { VirtualizedResultsMenu };