import * as react_jsx_runtime from 'react/jsx-runtime'; import React, { ReactNode } from 'react'; /** A single command item in the palette */ interface CommandItem { /** Unique identifier */ id: string; /** Display label shown in the palette */ label: string; /** Optional description text */ description?: string; /** Icon — string, emoji, or React element (e.g. ``) */ icon?: ReactNode; /** Additional search terms for fuzzy matching */ keywords?: string[]; /** Group this command belongs to */ group?: string; /** Manual ordering weight (higher = appears first) */ priority?: number; /** Navigation target URL/path for route commands */ href?: string; /** Execution callback when command is selected */ action?: (item: CommandItem) => void | Promise; /** Whether this command is disabled */ disabled?: boolean; /** Hidden from results but still searchable */ hidden?: boolean; /** Required permissions to see this command */ permissions?: string[]; /** Keyboard shortcut display (e.g., ["g", "h"]) */ shortcut?: string[]; /** Extensible metadata for consumer use */ meta?: Record; /** Scopes where this command is most relevant (e.g., ['/billing', '/billing/*']) */ scope?: string[]; /** Child commands for nested/hierarchical menus */ children?: CommandItem[]; /** Parent command ID (set automatically when flattening) */ parentId?: string; } /** A command group definition */ interface CommandGroup { /** Unique group identifier */ id: string; /** Display label for the group */ label: string; /** Rendering priority (higher = rendered first) */ priority?: number; /** Optional icon for the group */ icon?: ReactNode; } interface CommandPaletteProps { /** Render function for each command item */ renderItem?: (item: CommandItem, score: number) => React.ReactNode; /** Render function for empty state */ renderEmpty?: () => React.ReactNode; /** Render function for loading state */ renderLoading?: () => React.ReactNode; /** Render function for group heading */ renderGroupHeading?: (group: CommandGroup) => React.ReactNode; /** Render function for breadcrumbs (nested commands) */ renderBreadcrumbs?: (crumbs: CommandItem[], onBack: () => void) => React.ReactNode; /** Callback when a command is selected */ onSelect?: (item: CommandItem) => void; /** Enable keyboard loop navigation */ loop?: boolean; /** Accessible label for the command menu */ label?: string; /** Placeholder text for the search input (defaults to i18n value) */ placeholder?: string; /** Additional className for the root Command element */ className?: string; /** Additional className for the input element */ inputClassName?: string; /** Additional className for the list element */ listClassName?: string; /** Additional className for individual items */ itemClassName?: string; /** Additional className for group elements */ groupClassName?: string; /** Additional className for empty state */ emptyClassName?: string; /** Whether to show as dialog (with overlay) */ dialog?: boolean; /** Dialog overlay className */ overlayClassName?: string; /** Dialog content className */ contentClassName?: string; /** Portal container for dialog mode */ container?: HTMLElement; /** Disable pointer-based selection */ disablePointerSelection?: boolean; /** Enable vim-style keybindings (ctrl+n/p/j/k) */ vimBindings?: boolean; /** Footer content rendered below the list */ footer?: React.ReactNode; } /** * Pre-wired command palette component using cmdk. * * Sets `shouldFilter={false}` to let cmdk-engine own all filtering, * sorting, and ranking. Solves cmdk issues #264, #280, #375. * * Must be used within a ``. */ declare function CommandPalette({ renderItem, renderEmpty, renderLoading, renderGroupHeading, renderBreadcrumbs, onSelect, loop, label, placeholder, className, inputClassName, listClassName, itemClassName, groupClassName, emptyClassName, dialog, overlayClassName, contentClassName, container, disablePointerSelection, vimBindings, footer, }: CommandPaletteProps): react_jsx_runtime.JSX.Element; /** * Hook to control the command palette open/close state. * Provides keyboard shortcut binding (Cmd+K / Ctrl+K). * * Must be used within a ``. */ declare function useCommandPaletteShortcut(shortcut?: string): { isOpen: boolean; toggle: () => void; }; export { CommandPalette, type CommandPaletteProps, useCommandPaletteShortcut };