import * as React from 'react'; import { type DisabledIndices } from "../utils/composite.mjs"; import type { ElementProps, FloatingContext, FloatingRootContext } from "../types.mjs"; export interface UseTypeaheadProps { /** * A ref which contains an array of strings whose indices match the HTML * elements of the list. * @default empty list */ listRef: React.RefObject>; /** * The index of the active (focused or highlighted) item in the list. * @default null */ activeIndex: number | null; /** * Callback invoked with the matching index if found as the user types. */ onMatch?: ((index: number) => void) | undefined; /** * Optional list of item elements that correspond to `listRef` indices. * When an element exists for an index, typeahead skips it if it is hidden by * `display: none`, `visibility: hidden|collapse`, other browser-reported * visibility checks, or native disabled state. */ elementsRef?: React.RefObject> | undefined; /** * Indices that are disabled, either as an array or a predicate (the same shape as * `useListNavigation`'s `disabledIndices`). Disabled items are skipped while matching, * so a single keypress advances to the next selectable item (matching native `