feat(website): add payoff captions to joins/relationship-diagram/sql-echo
Use the ADR-0047 Ctrl+]-delimited demo caption to narrate the payoff moment of three casts with a neutral one-liner (no key names): the join result, the relationship diagram, and the m:n junction expansion. Add a `caption` step kind to the cast generator. Captions show at the climax during playback and clear as the cast quits.
This commit is contained in:
@@ -74,6 +74,19 @@ function keysFor(steps) {
|
||||
if (step.after != null) keys.push(`${step.after}ms`);
|
||||
continue;
|
||||
}
|
||||
if (step.caption != null) {
|
||||
// Demo step caption (ADR-0047 D3): `Ctrl+]` opens a stealth capture
|
||||
// buffer, the characters accumulate invisibly (they don't touch the
|
||||
// input line), and a second `Ctrl+]` commits them to the floating
|
||||
// caption box. The caption persists until the next keystroke, so the
|
||||
// trailing wait holds it on screen before the cast ends. Keep caption
|
||||
// text plain ASCII — it is typed character-by-character like any input.
|
||||
keys.push(JSON.stringify('^]')); // open capture
|
||||
for (const ch of step.caption) keys.push(charKey(ch));
|
||||
keys.push(JSON.stringify('^]')); // commit the caption
|
||||
if (step.after != null) keys.push(`${step.after}ms`);
|
||||
continue;
|
||||
}
|
||||
throw new Error(`unrecognised step: ${JSON.stringify(step)}`);
|
||||
}
|
||||
return keys;
|
||||
|
||||
Reference in New Issue
Block a user