/** An entry in the {@link CommandPalette} list. */ export interface ICommandItem { /** Stable identifier. Also matched against the query. */ id: string; /** Human-readable name shown in the list and matched against the query. */ label: string; /** Optional keybinding hint rendered on the right, e.g. `"⌘K"`. */ keybinding?: string; } export interface CommandPaletteProps { /** Whether the palette is showing. */ open: boolean; /** Commands to offer. Filtered against the query by `label` and `id`. */ commands: T[]; /** Called with the chosen command on click or Enter. */ onSelect: (command: T) => void; /** Called on Escape and on backdrop click. */ onClose?: () => void; /** * Render inline instead of as a fixed overlay. Useful for documenting the * palette in Storybook, or embedding it in a page. Defaults to `false`. */ inline?: boolean; /** Placeholder for the query input. */ placeholder?: string; /** * Custom filter. Receives every command and the current query; return `true` * to keep. Defaults to a case-insensitive substring match on `label` and `id`. */ filter?: (command: T, query: string) => boolean; /** Extra classes merged onto the palette surface. */ className?: string; } /** * A VS Code-style command palette: a fuzzy-filtered, keyboard-navigable list of * commands over a dimmed backdrop. * * Fully controlled — it owns only the query text and the highlighted row. * Visibility, the command list and execution are the caller's. It also binds no * global keyboard shortcut; for the store-backed variant that reads the * {@link commandRegistry} and binds `Cmd/Ctrl+Shift+P`, see * `ConnectedCommandPalette`. * * Arrow keys move the highlight, Enter selects, Escape closes. * * @example * ```tsx * { run(cmd.id); setOpen(false); }} * onClose={() => setOpen(false)} * /> * ``` */ export declare const CommandPalette: ({ open, commands, onSelect, onClose, inline, placeholder, filter, className, }: CommandPaletteProps) => import("react/jsx-runtime").JSX.Element | null;