import { type CommandPaletteController, type CommandPaletteItem, type CommandPaletteOptions, type CommandRegistry, type CommandResult } from "@pixerate/editor/commands"; export interface CreateCommandPaletteOptions extends CommandPaletteOptions { /** Chord that toggles the palette from anywhere, also while typing (e.g. `Mod+K`). */ hotkey?: string; /** Element or window the hotkey listens on (default: `window`). */ hotkeyTarget?: Window | HTMLElement | null; } export interface SvelteCommandPalette { readonly open: boolean; readonly query: string; readonly activeIndex: number; readonly items: CommandPaletteItem[]; readonly recents: string[]; readonly lastResult: CommandResult | null; readonly controller: CommandPaletteController; setOpen(open: boolean): void; toggle(): void; setQuery(query: string): void; setActiveIndex(index: number): void; move(delta: number): void; run(id: string): CommandResult | null; runActive(): CommandResult | null; handleKeyDown(event: KeyboardEvent): boolean; /** Stops following the registry and removes the hotkey listener. */ destroy(): void; } /** * Reactive command palette state over a `CommandRegistry` (Svelte 5 runes): ranked rows * with shortcuts and disabled reasons, active row and recents. Render it with * `` or your own markup. Call `destroy()` when done * (e.g. in `onDestroy`). */ export declare function createCommandPalette(registry: CommandRegistry, options?: CreateCommandPaletteOptions): SvelteCommandPalette;