import { GridCollection as _GridCollection1, GridNode, GridRow } from "@react-types/grid"; import { Key } from "@react-types/shared"; import { MultipleSelectionState, MultipleSelectionStateProps, SelectionManager } from "@react-stately/selection"; export interface GridState> { collection: C; /** A set of keys for rows that are disabled. */ disabledKeys: Set; /** A selection manager to read and update row selection state. */ selectionManager: SelectionManager; /** Whether keyboard navigation is disabled, such as when the arrow keys should be handled by a component within a cell. */ isKeyboardNavigationDisabled: boolean; } export interface GridStateOptions> extends MultipleSelectionStateProps { collection: C; disabledKeys?: Iterable; focusMode?: 'row' | 'cell'; /** @private - do not use unless you know what you're doing. */ UNSAFE_selectionState?: MultipleSelectionState; } /** * Provides state management for a grid component. Handles row selection and focusing a grid cell's focusable child if applicable. */ export function useGridState>(props: GridStateOptions): GridState; interface GridCollectionOptions { columnCount: number; items: GridRow[]; visitNode?: (cell: GridNode) => GridNode; } export class GridCollection implements _GridCollection1 { keyMap: Map>; columnCount: number; rows: GridNode[]; constructor(opts: GridCollectionOptions); [Symbol.iterator](): IterableIterator>; get size(): number; getKeys(): IterableIterator; getKeyBefore(key: Key): Key | null; getKeyAfter(key: Key): Key | null; getFirstKey(): Key | null; getLastKey(): Key | null; getItem(key: Key): GridNode | null; at(idx: number): GridNode | null; getChildren(key: Key): Iterable>; } //# sourceMappingURL=types.d.ts.map