import { type ReactNode } from 'react'; export interface CommandPaletteProps { open: boolean; onOpenChange: (open: boolean) => void; /** The window's name for a screen reader — there is no title on screen. */ label: string; /** The footer's left side: where the palette was opened from. */ where?: string; /** * How the footer spells the modifier in `Ctrl+Backspace` and `Ctrl+Enter` — * `Cmd` on a Mac. The keys answer to Ctrl and Cmd either way; the package * does not guess the platform, the app says it. */ modKey?: string; /** One level: a `CommandPaletteSearch` or a `CommandPaletteForm`. */ children: ReactNode; } export declare function CommandPalette({ open, onOpenChange, label, where, modKey, children }: CommandPaletteProps): import("react").JSX.Element; /** * The level you are in, drawn as a chip before the field. Removing it goes * back, and so does Backspace at the start of the field — one meaning for the * chip, whichever way you reach it. */ export interface CommandPaletteChip { label: string; /** Before the label, 16px — an icon, a mark. */ leading?: ReactNode; onBack: () => void; } export interface CommandPaletteRow { /** Unique in the level. The footer follows the lit row by it. */ id: string; label: string; /** The second line — where it is, who said it, when; a file's summary. */ description?: string; /** After the label, muted: where a file sits (an issue's ref and project) when its second line is its summary. */ aside?: string; /** A 16px icon, drawn on the row's 32px tile. */ icon?: ReactNode; /** Instead of `icon`: something with a look of its own — a face, a status mark — in the same 32px space, with no tile. */ leading?: ReactNode; /** Enter, or a click. */ onSelect: () => void; /** The row leads to more rows: Tab, or → at the end of the text, goes in, and the row shows a chevron. */ onGoIn?: () => void; /** The row is the person's own history: Ctrl+Backspace forgets it. */ onForget?: () => void; } export interface CommandPaletteGroup { /** The heading over the rows. A group with no rows is not drawn. */ label: string; rows: CommandPaletteRow[]; } export interface CommandPaletteSearchProps { query: string; onQueryChange: (query: string) => void; placeholder: string; groups: CommandPaletteGroup[]; /** The level you are in. Without one, this is the first level and there is nowhere to go back to. */ chip?: CommandPaletteChip; /** A line under the rows while more are on their way — "Searching…". */ pending?: string; /** * Quiet lines under the rows, for what a person should know about them and * cannot act on — "2 more where you cannot open them", "the search was * refused, so this list is incomplete". Plain lines, never rows: the arrows * do not stop on them. */ notes?: string[]; /** The line when there are no rows. Leave it out while rows are still on their way. */ empty?: string; /** Above the rows: a `CommandPaletteWorking`, `CommandPaletteAnswer` or `CommandPaletteQuote`. */ children?: ReactNode; } /** The palette as a search: a query field, rows in labelled groups walked with * the arrow keys, and what to show while nothing has arrived and when nothing * matches. */ export declare function CommandPaletteSearch({ query, onQueryChange, placeholder, groups, chip, pending, notes, empty, children }: CommandPaletteSearchProps): import("react").JSX.Element; export interface CommandPaletteFormProps { /** Names what the form makes, and goes back when removed. */ chip: CommandPaletteChip; /** Before the chip, 16px — the mark of whatever the form writes to. */ icon?: ReactNode; /** The button's word, and the footer's beside Ctrl+Enter. */ submitLabel: string; onSubmit: () => void; /** Why submitting has to wait — nothing changed yet. The button says it on hover, and Ctrl+Enter does nothing. */ submitWaits?: string; /** While the thing is being made: the fields lock, the button reads `button`, and `line` says what is happening. */ working?: { button: string; line: string; }; /** What went wrong, beside the button. */ error?: string; /** The fields, each in a `Field`. */ children: ReactNode; } /** The palette as a form: fields, one submit button, and Ctrl+Enter — both ways * in run Base UI's field check. It shows what it is working on and what failed, * and sends focus to the first field that needs something. */ export declare function CommandPaletteForm({ chip, icon, submitLabel, onSubmit, submitWaits, working, error, children }: CommandPaletteFormProps): import("react").JSX.Element; export interface CommandPaletteWorkingProps { /** What is happening — "Reading 12 messages…". */ children: ReactNode; /** Grey bars under the line, where the result will be. Default 2. */ bars?: 0 | 1 | 2 | 3; } /** A line saying what is being worked on, with grey bars where the result will land. */ export declare function CommandPaletteWorking({ children, bars }: CommandPaletteWorkingProps): import("react").JSX.Element; export interface CommandPaletteAnswerProps { /** * The answer's text. A blank line starts a new paragraph, and a number in * square brackets — `[1]` — is drawn as a small mark pointing at the row of * the same number below. */ children: string; /** A quiet line under the answer — what a key will do now. */ note?: string; } /** A written answer, with marks that point at the rows it came from. */ export declare function CommandPaletteAnswer({ children, note }: CommandPaletteAnswerProps): import("react").JSX.Element; export interface CommandPaletteQuoteProps { /** Text written for someone to use — shown as it will be used, line breaks kept. */ children: string; } /** Text written to be used elsewhere, set off by a rule at its left edge. */ export declare function CommandPaletteQuote({ children }: CommandPaletteQuoteProps): import("react").JSX.Element; export interface CommandPaletteProposalProps { /** Where it would be made: the app and the action — "App › New item". */ source: string; /** The app's mark before the source, as small as the line (about 10px). */ mark?: ReactNode; /** What would be made, in a sentence. */ children: string; } /** * Something the palette offers to make, before anything is made: a card with * where it would be made on top, then what it would be. A card because it is a * thing about to exist, not text to read or use; the source first because two * apps may offer something alike (UIG-40, Katerina 28 September: the look Peek's * launcher already had, now drawn by the palette, ruling P4). */ export declare function CommandPaletteProposal({ source, mark, children }: CommandPaletteProposalProps): import("react").JSX.Element; //# sourceMappingURL=CommandPalette.d.ts.map