/** * Command Registry and Action System * Global command registry for palette and shortcuts */ export interface CommandAction { id: string; name: string; description: string; category: string; handler: () => void | Promise; icon?: string; keybinding?: string; tags?: string[]; } export interface ShortcutBinding { commandId: string; keys: string; platform?: 'mac' | 'windows' | 'linux' | undefined; } export interface CommandPaletteState { isOpen: boolean; query: string; selectedIndex: number; recentCommands: CommandAction[]; favoriteCommands: Set; } export declare class CommandRegistry { private commands; private shortcuts; private categories; private listeners; /** * Register a new command */ register(command: CommandAction): void; /** * Bind a keyboard shortcut to a command */ bindShortcut(commandId: string, keys: string, platform?: 'mac' | 'windows' | 'linux'): void; /** * Get shortcut for command */ getShortcut(commandId: string): ShortcutBinding | undefined; /** * Execute a command by ID */ execute(commandId: string): Promise; /** * Get all commands */ getAll(): CommandAction[]; /** * Get commands by category */ getByCategory(category: string): CommandAction[]; /** * Get all categories */ getCategories(): string[]; /** * Search commands by query */ search(query: string): CommandAction[]; /** * Get command by ID */ get(commandId: string): CommandAction | undefined; /** * Unregister a command */ unregister(commandId: string): boolean; /** * Subscribe to registry changes */ subscribe(listener: (commands: CommandAction[]) => void): () => void; private notifyListeners; private getShortcutKey; } export declare class CommandHistory { private history; private maxSize; /** * Add command to history */ add(command: CommandAction): void; /** * Get recent commands */ getRecent(limit?: number): CommandAction[]; /** * Clear history */ clear(): void; /** * Get full history */ getAll(): CommandAction[]; } export declare class FuzzyMatcher { /** * Score query match against text * Returns score from 0 (no match) to 1 (perfect match) */ static score(text: string, query: string): number; /** * Find all matches with positions */ static findMatches(text: string, query: string): number[]; } export declare const defaultRegistry: CommandRegistry; /** * Register standard editor commands */ export declare function registerStandardCommands(registry: CommandRegistry): void; //# sourceMappingURL=index.d.ts.map