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:
@@ -9,7 +9,7 @@
|
||||
* { wait: ms } — pause (shown in the recording)
|
||||
* { type: 'text', after: ms } — type the text + press Enter, then pause
|
||||
* { type: 'text', enter: false } — type without pressing Enter
|
||||
* { key: 'Tab'|'Enter'|'CtrlC', after } — press a single named key
|
||||
* { key: 'Tab'|'Enter'|'CtrlC'|'CtrlO'|'Esc', after } — press a single named key
|
||||
*
|
||||
* Every cast must end by quitting the app so the driver returns to the shell
|
||||
* prompt — use `{ key: 'CtrlC' }` (Ctrl-C → quit), NOT a typed `quit`: Ctrl-C
|
||||
@@ -19,6 +19,35 @@
|
||||
|
||||
/** The shared library narrative, trimmed per cast. */
|
||||
export const casts = [
|
||||
{
|
||||
name: 'schema-sidebar',
|
||||
title: 'Bring up the schema sidebar and step through tables and relationships',
|
||||
width: 90,
|
||||
height: 26,
|
||||
typeSpeed: '45ms',
|
||||
steps: [
|
||||
{ wait: 1000 },
|
||||
// A small two-table schema with one relationship, so both sidebar
|
||||
// panels have something to show.
|
||||
{ type: 'create table authors with pk author_id(serial)', after: 650 },
|
||||
{ type: 'add column to authors: name (text)', after: 650 },
|
||||
{ type: 'create table books with pk book_id(serial)', after: 650 },
|
||||
{ type: 'add column to books: title (text)', after: 650 },
|
||||
{ type: 'add column to books: author_id (int)', after: 700 },
|
||||
{
|
||||
type: 'add 1:n relationship as books_author from authors.author_id to books.author_id on delete cascade',
|
||||
after: 1400,
|
||||
},
|
||||
// The sidebar is hidden at 90 cols; Ctrl-O reveals it and focuses the
|
||||
// Tables panel (the [CTRL-O] badge shows the otherwise-invisible key).
|
||||
{ key: 'CtrlO', after: 2600 },
|
||||
// Ctrl-O again moves focus to the Relationships panel.
|
||||
{ key: 'CtrlO', after: 2800 },
|
||||
// Esc leaves navigation mode — the sidebar re-hides.
|
||||
{ key: 'Esc', after: 1300 },
|
||||
{ key: 'CtrlC' }, // quit invisibly (Ctrl-C) — cast ends on the last content frame
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'projects',
|
||||
title: 'Save a project, start fresh, then load it back',
|
||||
|
||||
Reference in New Issue
Block a user