import type { Dimensions, MutableRef } from "../types.js"; /** * List-nav / grid-nav math. Ported 1:1 from the React source with only * framework-specific substitutions: * * - `React.KeyboardEvent` → native `KeyboardEvent`. Solid hands handlers * the raw event, and `.key` / `.preventDefault` are identical. * - `React.RefObject` → our `MutableRef` (see `../types.ts`), * whose `.current` is a mutable slot. * * Everything else — `isElementVisible`, grid cell layout, disabled-index * probing — is pure data/DOM work. */ type DisabledIndices = ReadonlyArray | ((index: number) => boolean); export declare function isDifferentGridRow(index: number, cols: number, prevRow: number): boolean; export declare function isIndexOutOfListBounds(list: Array, index: number): boolean; export declare function getMinListIndex(listRef: MutableRef>, disabledIndices?: DisabledIndices | undefined): number; export declare function getMaxListIndex(listRef: MutableRef>, disabledIndices?: DisabledIndices | undefined): number; export declare function findNonDisabledListIndex(list: ReadonlyArray, { startingIndex, decrement, disabledIndices, amount, }?: { startingIndex?: number | undefined; decrement?: boolean | undefined; disabledIndices?: DisabledIndices | undefined; amount?: number | undefined; }): number; export declare function getGridNavigatedIndex(list: Array, { event, orientation, loopFocus, onLoop, rtl, cols, disabledIndices, minIndex, maxIndex, prevIndex, stopEvent: stop, }: { event: KeyboardEvent; orientation: "horizontal" | "vertical" | "both"; loopFocus: boolean; onLoop?: ((event: KeyboardEvent, prevIndex: number, nextIndex: number) => number) | undefined; rtl: boolean; cols: number; disabledIndices: DisabledIndices | undefined; minIndex: number; maxIndex: number; prevIndex: number; stopEvent?: boolean | undefined; }): number; /** For each cell index, gets the item index that occupies that cell. */ export declare function createGridCellMap(sizes: Dimensions[], cols: number, dense: boolean): (number | undefined)[]; /** Gets cell index of an item's corner, or -1 when index is -1. */ export declare function getGridCellIndexOfCorner(index: number, sizes: Dimensions[], cellMap: (number | undefined)[], cols: number, corner: "tl" | "tr" | "bl" | "br"): number; /** Gets all cell indices that correspond to the specified indices. */ export declare function getGridCellIndices(indices: (number | undefined)[], cellMap: (number | undefined)[]): number[]; export declare function isListIndexDisabled(list: ReadonlyArray, index: number, disabledIndices?: DisabledIndices): boolean; export declare function isElementVisible(element: Element): boolean; export {}; //# sourceMappingURL=composite.d.ts.map