import { ID } from "../../types/index.mjs"; import { TraversalItem } from "../createFocusTraversal/index.mjs"; import { MaybeRefOrGetter, ShallowRef } from "vue"; //#region src/composables/useRovingFocus/index.d.ts interface RovingItem extends TraversalItem { el?: MaybeRefOrGetter; } interface RovingFocusOptions { target?: MaybeRefOrGetter; /** Arrow key mapping. Ignored when `columns` is set (grid uses all 4 arrows). */ orientation?: 'horizontal' | 'vertical' | 'both'; circular?: boolean; /** * Column count for grid navigation. When set, items are treated as a 2D grid * in row-major order: Left/Right step ±1, Up/Down step ±columns, * Home/End go to row start/end, Ctrl+Home/End go to first/last overall. */ columns?: MaybeRefOrGetter; onFocus?: (id: ID) => void; } interface RovingFocusReturn { focusedId: ShallowRef; isTabbable: (id: ID) => boolean; focus: (id: ID) => void; next: () => void; prev: () => void; first: () => void; last: () => void; onKeydown: (e: KeyboardEvent) => void; } declare function useRovingFocus(items: () => RovingItem[], options?: RovingFocusOptions): RovingFocusReturn; //#endregion export { RovingFocusOptions, RovingFocusReturn, RovingItem, useRovingFocus };