feat(site-builder): complete shortcut set on the command registry with a cheat sheet

Core editor shortcuts become registry commands run by the single
useCommandShortcuts dispatcher: undo/redo, delete, duplicate (after +
select), copy/paste, Alt+arrow move, 1/2/3 device, Cmd+S/Shift+P/P site
commands and Cmd+/ cheat sheet. Tab/Esc no longer fire from buttons or
dialogs. Context menu labels come from formatShortcut.

Refs #39
This commit is contained in:
shadowdao committed 2026-10-07 11:47:55 -07:00
1 parent d8ff295093
commit c68e459430
13 files changed
+861 -513

No files matched your search

+58
View File
@@ -2441,3 +2441,61 @@ body {
background: var(--color-accent-subtle);
cursor: default;
}
/* ---- #39 shortcuts modal ---- */
.shortcuts-modal {
width: min(560px, calc(100vw - 32px));
max-height: calc(100vh - 64px);
display: flex;
flex-direction: column;
background: var(--color-bg-surface);
color: var(--color-text);
border: 1px solid var(--color-border);
border-radius: var(--radius-lg, 8px);
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.shortcuts-modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 16px;
border-bottom: 1px solid var(--color-border);
}
.shortcuts-modal-title { margin: 0; font-size: 15px; font-weight: 600; }
.shortcuts-modal-close {
background: transparent;
border: 0;
color: var(--color-text-muted);
cursor: pointer;
padding: 4px 6px;
}
.shortcuts-modal-close:hover { color: var(--color-text); }
.shortcuts-modal-body { padding: 8px 16px 16px; overflow-y: auto; }
.shortcuts-group-title {
margin: 14px 0 6px;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--color-text-dim);
}
.shortcuts-list { list-style: none; margin: 0; padding: 0; }
.shortcuts-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 5px 0;
font-size: 13px;
}
.shortcuts-row-keys { display: inline-flex; gap: 6px; flex-shrink: 0; }
.shortcuts-row-keys kbd {
font: inherit;
font-size: 12px;
padding: 1px 7px;
color: var(--color-text-muted);
background: var(--color-bg-hover);
border: 1px solid var(--color-border);
border-radius: var(--radius-sm);
}
/* ---- end #39 shortcuts modal ---- */