/// import { MovementKey, FocusType, KeyConfig } from "./types"; /** * An extremely simple function that is used to generate an id for an item * within a list of other items. This is generally used with list of items that * should have custom focus with the `aria-activedescendant` flow instead of * native focus. * * @param id The base id for the container element of all the items. * @param i The index of the item within the list. This number will be * incremented by 1 as an id to start from 1 instead of 0. */ export declare function getItemId(id: string, i: number): string; /** * A small util function to transform a list of key codes into a list of * `KeyConfig` objects. This is useful for how I determine what behavior to * implement after a keydown event. * * @param keys A list of key mappings to convert to a key object. These should * be things like: "Tab", "Alt+Home", "A", "Shift+Alt+ArrowUp" * @param type The keyboard focus type this key should be mapped to * @private */ export declare function transformKeys(keys: readonly MovementKey[], type: FocusType): KeyConfig[]; /** * A small util get the `KeyConfig` based on the provided keys and keyboard * event. This ensures that the key, altKey, metaKey, and shiftKey values all * match. * * If a key is not found, `null` will be returned instead. * * @param event The event to get a key mapping type for * @param keys A list of key mappings to attempt to find a valid key event type * from. * @private */ export declare function getKeyboardConfig(event: KeyboardEvent | React.KeyboardEvent, keys: readonly KeyConfig[]): KeyConfig | null; /** * Creates a stringified representation of the configuration so that the config * can be checked in the `onChange` callback for keyboard movement. This is used * as the `query` attribute on the change data. * * @param config The key config to stringify * @private */ export declare function getStringifiedKeyConfig(config: KeyConfig): string;