export interface UseMenuKeyboardOptions { /** Returns the currently navigable items inside the open panel, in DOM order. */ items: () => HTMLElement[]; /** True while the panel is open. */ isOpen: () => boolean; /** Opens the panel. */ open: () => void; /** Closes the panel. When `returnFocus` is true, focus should return to the trigger. */ close: (returnFocus?: boolean) => void; } export interface UseMenuKeyboardReturn { /** * Bind to the trigger's `@keydown`. ArrowDown/Enter/Space open the panel (when * closed) and focus its first item; ArrowUp opens it focused on the last item. */ handleTriggerKeydown: (event: KeyboardEvent) => void; /** * Bind to the open panel's `@keydown`. ArrowUp/ArrowDown cycle focus with * wraparound, Home/End jump to the first/last item, Escape closes, returns * focus to the trigger and stops propagating, and Tab closes without moving focus. */ handlePanelKeydown: (event: KeyboardEvent) => void; } /** * Shared keyboard contract for menu- and listbox-style disclosure panels (the * WAI-ARIA menu button pattern). Used by ActionMenu and AppAvatarMenu, * each pairing it with `useDropdownState` for the disclosure state itself. */ export declare function useMenuKeyboard(options: UseMenuKeyboardOptions): UseMenuKeyboardReturn;