feat: MVP-5 Sprint 2 - Command Palette and Global Shortcuts

- Add Command Palette (Ctrl+K / Cmd+K) with search and navigation
- Add global keyboard shortcuts: g h (dashboard), g n (notes), n (new note)
- Add keyboard shortcuts help dialog (?)
- Add shortcuts provider component
- Shortcuts ignore inputs/textareas for proper UX
This commit is contained in:
2026-03-22 18:22:28 -03:00
parent 8c80a12b81
commit cde0a143a5
6 changed files with 215 additions and 0 deletions

16
src/lib/command-items.ts Normal file
View File

@@ -0,0 +1,16 @@
export interface CommandItem {
id: string
label: string
description?: string
group: 'navigation' | 'actions' | 'search' | 'recent'
keywords?: string[]
action?: () => void
icon?: string
}
export const commands: CommandItem[] = [
{ id: 'nav-dashboard', label: 'Ir al Dashboard', group: 'navigation', keywords: ['home'] },
{ id: 'nav-notes', label: 'Ir a Notas', group: 'navigation', keywords: ['all notes'] },
{ id: 'nav-settings', label: 'Ir a Configuración', group: 'navigation', keywords: ['settings'] },
{ id: 'action-new', label: 'Crear nueva nota', group: 'actions', keywords: ['new note', 'create'] },
]