feat(website): schema-sidebar cast + Ctrl-O/Esc cast keys
Add a `schema-sidebar` cast that reveals the ADR-0046 sidebar with Ctrl-O (the only way to show it at 90 cols) and steps through the Tables and Relationships panels. Teach the generator the CtrlO/Esc control codes; quote control codes so `^[`/`^]` stay valid YAML.
This commit is contained in:
@@ -43,6 +43,12 @@ const NAMED_KEYS = {
|
||||
// `quit` command typed into the input — so the recording ends on the last
|
||||
// content frame rather than a dangling, payoff-less `quit`.
|
||||
CtrlC: '^C',
|
||||
// Ctrl-O cycles the ADR-0046 schema-sidebar navigation focus
|
||||
// (Input → Tables → Relationships → Input); the only way to reveal the
|
||||
// sidebar in a 90-column cast (it auto-hides at that width).
|
||||
CtrlO: '^O',
|
||||
// Esc leaves navigation mode directly (back to the input field).
|
||||
Esc: '^[',
|
||||
};
|
||||
|
||||
/** Build the autocast `keys:` list (one entry per line) for a cast's steps. */
|
||||
@@ -56,7 +62,9 @@ function keysFor(steps) {
|
||||
if (step.key != null) {
|
||||
const code = NAMED_KEYS[step.key];
|
||||
if (!code) throw new Error(`unknown key: ${step.key}`);
|
||||
keys.push(code);
|
||||
// Quote the control code so YAML-special bytes (`^[` ESC, `^]`) stay
|
||||
// valid scalars; `^M`/`^I`/`^C` are unaffected by the quoting.
|
||||
keys.push(JSON.stringify(code));
|
||||
if (step.after != null) keys.push(`${step.after}ms`);
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user