import type { ReactNode } from "react"; import type { IconComponent } from "../../../lib/types.js"; export interface CommandItem { id: string; label: ReactNode; /** Optional secondary line (path, hint, shortcut). */ hint?: ReactNode; /** Optional group name. Items with the same group are visually grouped. */ group?: string; /** Optional icon. */ icon?: IconComponent; /** Optional searchable plain-text used by the cmdk ranker. Falls back to `label` when string. */ searchable?: string; } interface CommandPaletteProps { open: boolean; onOpenChange: (open: boolean) => void; items: CommandItem[]; onSelect: (id: string) => void; placeholder?: string; emptyMessage?: ReactNode; /** * Optional custom filter score (0 = no match, > 0 = match). Receives the * `value` (the item's searchable text) and the current `search` query. * Defaults to cmdk's built-in fuzzy ranker which prioritizes substring + * word-boundary + consecutive matches. */ filter?: (value: string, search: string) => number; } /** * CommandPalette — Cmd+K-style global launcher with full keyboard navigation. * * Built on `cmdk` (the de-facto shadcn pattern) + Theo Dialog. Provides * out-of-the-box: ArrowUp/ArrowDown navigation, Enter selection, Escape close, * Home/End, active-item highlight via `data-selected`, and fuzzy ranking. * * Stateless: caller owns `open` / `onOpenChange` / `items`. Selecting an item * fires `onSelect(id)` and closes the dialog. */ declare function CommandPalette({ open, onOpenChange, items, onSelect, placeholder, emptyMessage, filter, }: CommandPaletteProps): import("react").JSX.Element; export { CommandPalette };