videowright 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +91 -0
- package/dist/cli/argv.d.ts +28 -0
- package/dist/cli/argv.d.ts.map +1 -0
- package/dist/cli/argv.js +115 -0
- package/dist/cli/argv.js.map +1 -0
- package/dist/cli/bin.d.ts +7 -0
- package/dist/cli/bin.d.ts.map +1 -0
- package/dist/cli/bin.js +10 -0
- package/dist/cli/bin.js.map +1 -0
- package/dist/cli/dev.d.ts +19 -0
- package/dist/cli/dev.d.ts.map +1 -0
- package/dist/cli/dev.js +104 -0
- package/dist/cli/dev.js.map +1 -0
- package/dist/cli/discover.d.ts +29 -0
- package/dist/cli/discover.d.ts.map +1 -0
- package/dist/cli/discover.js +104 -0
- package/dist/cli/discover.js.map +1 -0
- package/dist/cli/discover_project.d.ts +29 -0
- package/dist/cli/discover_project.d.ts.map +1 -0
- package/dist/cli/discover_project.js +108 -0
- package/dist/cli/discover_project.js.map +1 -0
- package/dist/cli/errors.d.ts +10 -0
- package/dist/cli/errors.d.ts.map +1 -0
- package/dist/cli/errors.js +13 -0
- package/dist/cli/errors.js.map +1 -0
- package/dist/cli/ffmpeg.d.ts +57 -0
- package/dist/cli/ffmpeg.d.ts.map +1 -0
- package/dist/cli/ffmpeg.js +122 -0
- package/dist/cli/ffmpeg.js.map +1 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +152 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/playwright_check.d.ts +44 -0
- package/dist/cli/playwright_check.d.ts.map +1 -0
- package/dist/cli/playwright_check.js +20 -0
- package/dist/cli/playwright_check.js.map +1 -0
- package/dist/cli/prompt.d.ts +13 -0
- package/dist/cli/prompt.d.ts.map +1 -0
- package/dist/cli/prompt.js +47 -0
- package/dist/cli/prompt.js.map +1 -0
- package/dist/cli/render.d.ts +60 -0
- package/dist/cli/render.d.ts.map +1 -0
- package/dist/cli/render.js +471 -0
- package/dist/cli/render.js.map +1 -0
- package/dist/cli/script_cmd.d.ts +26 -0
- package/dist/cli/script_cmd.d.ts.map +1 -0
- package/dist/cli/script_cmd.js +88 -0
- package/dist/cli/script_cmd.js.map +1 -0
- package/dist/cli/time_shim.d.ts +44 -0
- package/dist/cli/time_shim.d.ts.map +1 -0
- package/dist/cli/time_shim.js +390 -0
- package/dist/cli/time_shim.js.map +1 -0
- package/dist/cli/ts_loader.d.ts +28 -0
- package/dist/cli/ts_loader.d.ts.map +1 -0
- package/dist/cli/ts_loader.js +95 -0
- package/dist/cli/ts_loader.js.map +1 -0
- package/dist/cli/vite_helpers.d.ts +62 -0
- package/dist/cli/vite_helpers.d.ts.map +1 -0
- package/dist/cli/vite_helpers.js +273 -0
- package/dist/cli/vite_helpers.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/player/hash_router.d.ts +23 -0
- package/dist/player/hash_router.d.ts.map +1 -0
- package/dist/player/hash_router.js +49 -0
- package/dist/player/hash_router.js.map +1 -0
- package/dist/player/hud.d.ts +33 -0
- package/dist/player/hud.d.ts.map +1 -0
- package/dist/player/hud.js +357 -0
- package/dist/player/hud.js.map +1 -0
- package/dist/player/index.d.ts +123 -0
- package/dist/player/index.d.ts.map +1 -0
- package/dist/player/index.js +848 -0
- package/dist/player/index.js.map +1 -0
- package/dist/player/input.d.ts +14 -0
- package/dist/player/input.d.ts.map +1 -0
- package/dist/player/input.js +90 -0
- package/dist/player/input.js.map +1 -0
- package/dist/player/slot.d.ts +22 -0
- package/dist/player/slot.d.ts.map +1 -0
- package/dist/player/slot.js +43 -0
- package/dist/player/slot.js.map +1 -0
- package/dist/player/transitions/cut.d.ts +7 -0
- package/dist/player/transitions/cut.d.ts.map +1 -0
- package/dist/player/transitions/cut.js +9 -0
- package/dist/player/transitions/cut.js.map +1 -0
- package/dist/player/transitions/fade.d.ts +7 -0
- package/dist/player/transitions/fade.d.ts.map +1 -0
- package/dist/player/transitions/fade.js +18 -0
- package/dist/player/transitions/fade.js.map +1 -0
- package/dist/player/transitions/index.d.ts +4 -0
- package/dist/player/transitions/index.d.ts.map +1 -0
- package/dist/player/transitions/index.js +4 -0
- package/dist/player/transitions/index.js.map +1 -0
- package/dist/player/transitions/slide.d.ts +6 -0
- package/dist/player/transitions/slide.d.ts.map +1 -0
- package/dist/player/transitions/slide.js +35 -0
- package/dist/player/transitions/slide.js.map +1 -0
- package/dist/script/index.d.ts +2 -0
- package/dist/script/index.d.ts.map +1 -0
- package/dist/script/index.js +2 -0
- package/dist/script/index.js.map +1 -0
- package/dist/script/script.d.ts +10 -0
- package/dist/script/script.d.ts.map +1 -0
- package/dist/script/script.js +41 -0
- package/dist/script/script.js.map +1 -0
- package/dist/segment/SegmentRunner.d.ts +52 -0
- package/dist/segment/SegmentRunner.d.ts.map +1 -0
- package/dist/segment/SegmentRunner.js +187 -0
- package/dist/segment/SegmentRunner.js.map +1 -0
- package/dist/segment/defineConfig.d.ts +6 -0
- package/dist/segment/defineConfig.d.ts.map +1 -0
- package/dist/segment/defineConfig.js +7 -0
- package/dist/segment/defineConfig.js.map +1 -0
- package/dist/segment/defineSegment.d.ts +7 -0
- package/dist/segment/defineSegment.d.ts.map +1 -0
- package/dist/segment/defineSegment.js +25 -0
- package/dist/segment/defineSegment.js.map +1 -0
- package/dist/segment/index.d.ts +5 -0
- package/dist/segment/index.d.ts.map +1 -0
- package/dist/segment/index.js +4 -0
- package/dist/segment/index.js.map +1 -0
- package/dist/timeline/index.d.ts +73 -0
- package/dist/timeline/index.d.ts.map +1 -0
- package/dist/timeline/index.js +142 -0
- package/dist/timeline/index.js.map +1 -0
- package/dist/timeline/loadAudioTrack.d.ts +18 -0
- package/dist/timeline/loadAudioTrack.d.ts.map +1 -0
- package/dist/timeline/loadAudioTrack.js +44 -0
- package/dist/timeline/loadAudioTrack.js.map +1 -0
- package/dist/timeline/loadVoiceover.d.ts +18 -0
- package/dist/timeline/loadVoiceover.d.ts.map +1 -0
- package/dist/timeline/loadVoiceover.js +38 -0
- package/dist/timeline/loadVoiceover.js.map +1 -0
- package/dist/timeline/resolveTiming.d.ts +28 -0
- package/dist/timeline/resolveTiming.d.ts.map +1 -0
- package/dist/timeline/resolveTiming.js +63 -0
- package/dist/timeline/resolveTiming.js.map +1 -0
- package/dist/timeline/validateTiming.d.ts +29 -0
- package/dist/timeline/validateTiming.d.ts.map +1 -0
- package/dist/timeline/validateTiming.js +62 -0
- package/dist/timeline/validateTiming.js.map +1 -0
- package/dist/types.d.ts +216 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/package.json +47 -0
- package/skill/SKILL.md +64 -0
- package/skill/assets/hello_world/PLAN.md +31 -0
- package/skill/assets/hello_world/README.md +27 -0
- package/skill/assets/hello_world/audio/audio_plan.md +14 -0
- package/skill/assets/hello_world/segments/hello_intro.ts +69 -0
- package/skill/assets/hello_world/segments/hello_outro.ts +71 -0
- package/skill/assets/hello_world/timeline.ts +15 -0
- package/skill/assets/hello_world/voiceover_script/script.md +10 -0
- package/skill/assets/install/package.json +10 -0
- package/skill/assets/install/tsconfig.json +23 -0
- package/skill/assets/styles/editorial-mono/STYLE.md +124 -0
- package/skill/assets/styles/editorial-mono/brand.md +85 -0
- package/skill/assets/styles/editorial-mono/reference/animations.jsx +752 -0
- package/skill/assets/styles/editorial-mono/reference/scenes.html +563 -0
- package/skill/assets/styles/editorial-mono/sample/bullet.ts +101 -0
- package/skill/assets/styles/editorial-mono/sample/content.ts +104 -0
- package/skill/assets/styles/editorial-mono/sample/cta.ts +113 -0
- package/skill/assets/styles/editorial-mono/sample/feature.ts +111 -0
- package/skill/assets/styles/editorial-mono/sample/grid.ts +97 -0
- package/skill/assets/styles/editorial-mono/sample/kinetic.ts +96 -0
- package/skill/assets/styles/editorial-mono/sample/section.ts +101 -0
- package/skill/assets/styles/editorial-mono/sample/stat.ts +128 -0
- package/skill/assets/styles/editorial-mono/sample/title.ts +97 -0
- package/skill/assets/styles/editorial-mono/sample/ui-showcase.ts +159 -0
- package/skill/assets/styles/editorial-mono/tokens.css +44 -0
- package/skill/assets/styles/iso-diagram/STYLE.md +109 -0
- package/skill/assets/styles/iso-diagram/brand.md +32 -0
- package/skill/assets/styles/iso-diagram/reference/animations.jsx +673 -0
- package/skill/assets/styles/iso-diagram/reference/scenes.html +427 -0
- package/skill/assets/styles/iso-diagram/sample/bullet.ts +144 -0
- package/skill/assets/styles/iso-diagram/sample/content.ts +192 -0
- package/skill/assets/styles/iso-diagram/sample/cta.ts +162 -0
- package/skill/assets/styles/iso-diagram/sample/feature.ts +205 -0
- package/skill/assets/styles/iso-diagram/sample/grid.ts +181 -0
- package/skill/assets/styles/iso-diagram/sample/kinetic.ts +102 -0
- package/skill/assets/styles/iso-diagram/sample/section.ts +149 -0
- package/skill/assets/styles/iso-diagram/sample/stat.ts +164 -0
- package/skill/assets/styles/iso-diagram/sample/title.ts +173 -0
- package/skill/assets/styles/iso-diagram/sample/ui-showcase.ts +162 -0
- package/skill/assets/styles/iso-diagram/tokens.css +40 -0
- package/skill/assets/styles/motion-engineering/STYLE.md +106 -0
- package/skill/assets/styles/motion-engineering/brand.md +29 -0
- package/skill/assets/styles/motion-engineering/reference/animations.jsx +673 -0
- package/skill/assets/styles/motion-engineering/reference/scenes.html +513 -0
- package/skill/assets/styles/motion-engineering/sample/bullet.ts +176 -0
- package/skill/assets/styles/motion-engineering/sample/content.ts +228 -0
- package/skill/assets/styles/motion-engineering/sample/cta.ts +209 -0
- package/skill/assets/styles/motion-engineering/sample/feature.ts +299 -0
- package/skill/assets/styles/motion-engineering/sample/grid.ts +190 -0
- package/skill/assets/styles/motion-engineering/sample/kinetic.ts +159 -0
- package/skill/assets/styles/motion-engineering/sample/section.ts +196 -0
- package/skill/assets/styles/motion-engineering/sample/stat.ts +230 -0
- package/skill/assets/styles/motion-engineering/sample/title.ts +219 -0
- package/skill/assets/styles/motion-engineering/sample/ui-showcase.ts +267 -0
- package/skill/assets/styles/motion-engineering/tokens.css +40 -0
- package/skill/assets/styles/neon-terminal/STYLE.md +105 -0
- package/skill/assets/styles/neon-terminal/brand.md +27 -0
- package/skill/assets/styles/neon-terminal/reference/animations.jsx +673 -0
- package/skill/assets/styles/neon-terminal/reference/scenes.html +387 -0
- package/skill/assets/styles/neon-terminal/sample/bullet.ts +113 -0
- package/skill/assets/styles/neon-terminal/sample/content.ts +117 -0
- package/skill/assets/styles/neon-terminal/sample/cta.ts +131 -0
- package/skill/assets/styles/neon-terminal/sample/feature.ts +112 -0
- package/skill/assets/styles/neon-terminal/sample/grid.ts +128 -0
- package/skill/assets/styles/neon-terminal/sample/kinetic.ts +105 -0
- package/skill/assets/styles/neon-terminal/sample/section.ts +96 -0
- package/skill/assets/styles/neon-terminal/sample/stat.ts +123 -0
- package/skill/assets/styles/neon-terminal/sample/title.ts +122 -0
- package/skill/assets/styles/neon-terminal/sample/ui-showcase.ts +127 -0
- package/skill/assets/styles/neon-terminal/tokens.css +39 -0
- package/skill/assets/styles/risograph/STYLE.md +110 -0
- package/skill/assets/styles/risograph/brand.md +26 -0
- package/skill/assets/styles/risograph/reference/animations.jsx +673 -0
- package/skill/assets/styles/risograph/reference/scenes.html +403 -0
- package/skill/assets/styles/risograph/sample/bullet.ts +124 -0
- package/skill/assets/styles/risograph/sample/content.ts +135 -0
- package/skill/assets/styles/risograph/sample/cta.ts +149 -0
- package/skill/assets/styles/risograph/sample/feature.ts +152 -0
- package/skill/assets/styles/risograph/sample/grid.ts +123 -0
- package/skill/assets/styles/risograph/sample/kinetic.ts +125 -0
- package/skill/assets/styles/risograph/sample/section.ts +130 -0
- package/skill/assets/styles/risograph/sample/stat.ts +145 -0
- package/skill/assets/styles/risograph/sample/title.ts +132 -0
- package/skill/assets/styles/risograph/sample/ui-showcase.ts +147 -0
- package/skill/assets/styles/risograph/tokens.css +39 -0
- package/skill/assets/styles/swiss-console/STYLE.md +107 -0
- package/skill/assets/styles/swiss-console/brand.md +37 -0
- package/skill/assets/styles/swiss-console/reference/animations.jsx +673 -0
- package/skill/assets/styles/swiss-console/reference/scenes.html +420 -0
- package/skill/assets/styles/swiss-console/sample/bullet.ts +122 -0
- package/skill/assets/styles/swiss-console/sample/content.ts +137 -0
- package/skill/assets/styles/swiss-console/sample/cta.ts +109 -0
- package/skill/assets/styles/swiss-console/sample/feature.ts +163 -0
- package/skill/assets/styles/swiss-console/sample/grid.ts +145 -0
- package/skill/assets/styles/swiss-console/sample/kinetic.ts +117 -0
- package/skill/assets/styles/swiss-console/sample/section.ts +127 -0
- package/skill/assets/styles/swiss-console/sample/stat.ts +148 -0
- package/skill/assets/styles/swiss-console/sample/title.ts +148 -0
- package/skill/assets/styles/swiss-console/sample/ui-showcase.ts +198 -0
- package/skill/assets/styles/swiss-console/tokens.css +39 -0
- package/skill/install/INSTALL.md +400 -0
- package/skill/references/audio/audio_plan.md +199 -0
- package/skill/references/audio/build.md +208 -0
- package/skill/references/audio/cue_template.md +219 -0
- package/skill/references/audio/ffmpeg_cookbook.md +267 -0
- package/skill/references/audio/music/music.md +171 -0
- package/skill/references/audio/music/providers/elevenlabs.md +170 -0
- package/skill/references/audio/music/providers/manual.md +140 -0
- package/skill/references/audio/music/providers/openverse.md +265 -0
- package/skill/references/audio/sfx/providers/elevenlabs.md +152 -0
- package/skill/references/audio/sfx/providers/manual.md +117 -0
- package/skill/references/audio/sfx/providers/openverse.md +243 -0
- package/skill/references/audio/sfx/sfx.md +149 -0
- package/skill/references/audio/styles.md +102 -0
- package/skill/references/audio/sync.md +237 -0
- package/skill/references/audio/voiceover/animation_sync.md +142 -0
- package/skill/references/audio/voiceover/provider_script.md +153 -0
- package/skill/references/audio/voiceover/providers/elevenlabs.md +288 -0
- package/skill/references/audio/voiceover/providers/manual.md +100 -0
- package/skill/references/audio/voiceover/script_writing.md +100 -0
- package/skill/references/audio/voiceover/style_intake.md +56 -0
- package/skill/references/audio/voiceover/sync_algorithm.md +167 -0
- package/skill/references/audio/voiceover.md +296 -0
- package/skill/references/audio.md +135 -0
- package/skill/references/authoring_segment.md +446 -0
- package/skill/references/create_or_edit_video.md +232 -0
- package/skill/references/dev_server.md +157 -0
- package/skill/references/export.md +145 -0
- package/skill/references/new_video.md +117 -0
- package/skill/references/project_structure.md +144 -0
- package/skill/references/setup.md +109 -0
- package/skill/references/setup_new_style.md +158 -0
- package/skill/references/styles.md +154 -0
- package/skill/references/testing.md +115 -0
- package/skill/references/types.md +240 -0
- package/src/cli/entry/components/copy_button.ts +42 -0
- package/src/cli/entry/components/download_modal.ts +204 -0
- package/src/cli/entry/components/empty_state.ts +55 -0
- package/src/cli/entry/components/hide_hud_tab.ts +37 -0
- package/src/cli/entry/components/icons.ts +31 -0
- package/src/cli/entry/components/top_bar.ts +69 -0
- package/src/cli/entry/components/video_card.ts +57 -0
- package/src/cli/entry/dev_frame.ts +189 -0
- package/src/cli/entry/entry_index.ts +16 -0
- package/src/cli/entry/entry_video.ts +24 -0
- package/src/cli/entry/index.html +12 -0
- package/src/cli/entry/parse_slug.ts +14 -0
- package/src/cli/entry/render.html +17 -0
- package/src/cli/entry/render_entry.ts +121 -0
- package/src/cli/entry/styles/base.css +45 -0
- package/src/cli/entry/styles/components.css +605 -0
- package/src/cli/entry/styles/tokens.css +44 -0
- package/src/cli/entry/video.html +22 -0
- package/src/cli/entry/views/homepage.ts +66 -0
- package/src/cli/entry/views/video_view.ts +286 -0
- package/src/cli/entry/virtual.d.ts +8 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { defineSegment } from "videowright";
|
|
2
|
+
|
|
3
|
+
let host: HTMLElement | null = null;
|
|
4
|
+
|
|
5
|
+
export default defineSegment({
|
|
6
|
+
id: "swiss-console-sample-section",
|
|
7
|
+
advances: [1.5, 4.0],
|
|
8
|
+
voiceover:
|
|
9
|
+
"Section headers in Swiss Console. A large centered numeral above the section name, framed by hairline rules.",
|
|
10
|
+
|
|
11
|
+
mount(el) {
|
|
12
|
+
host = el;
|
|
13
|
+
el.innerHTML = `
|
|
14
|
+
<div style="
|
|
15
|
+
position: relative;
|
|
16
|
+
height: 100%;
|
|
17
|
+
background: var(--color-bg);
|
|
18
|
+
color: var(--color-fg);
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
">
|
|
25
|
+
<div data-ref="label" style="
|
|
26
|
+
font-family: var(--font-mono);
|
|
27
|
+
font-size: 14px;
|
|
28
|
+
letter-spacing: 0.12em;
|
|
29
|
+
text-transform: uppercase;
|
|
30
|
+
color: var(--color-muted);
|
|
31
|
+
margin-bottom: 48px;
|
|
32
|
+
opacity: 0;
|
|
33
|
+
">Part 02 of 04</div>
|
|
34
|
+
|
|
35
|
+
<div data-ref="rule-top" style="
|
|
36
|
+
width: 600px;
|
|
37
|
+
height: 1px;
|
|
38
|
+
background: var(--color-fg);
|
|
39
|
+
margin-bottom: 56px;
|
|
40
|
+
opacity: 0;
|
|
41
|
+
"></div>
|
|
42
|
+
|
|
43
|
+
<div data-ref="numeral" style="
|
|
44
|
+
font-family: var(--font-display);
|
|
45
|
+
font-size: 280px;
|
|
46
|
+
font-weight: 500;
|
|
47
|
+
line-height: 0.9;
|
|
48
|
+
font-variant-numeric: tabular-nums;
|
|
49
|
+
margin-bottom: 36px;
|
|
50
|
+
opacity: 0;
|
|
51
|
+
">02</div>
|
|
52
|
+
|
|
53
|
+
<div data-ref="name" style="
|
|
54
|
+
font-family: var(--font-display);
|
|
55
|
+
font-size: 64px;
|
|
56
|
+
font-weight: 500;
|
|
57
|
+
margin-bottom: 56px;
|
|
58
|
+
opacity: 0;
|
|
59
|
+
">The Architecture<span style="color: var(--color-accent);">.</span></div>
|
|
60
|
+
|
|
61
|
+
<div data-ref="rule-bottom" style="
|
|
62
|
+
width: 600px;
|
|
63
|
+
height: 1px;
|
|
64
|
+
background: var(--color-fg);
|
|
65
|
+
opacity: 0;
|
|
66
|
+
"></div>
|
|
67
|
+
</div>
|
|
68
|
+
`;
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
async play(ctx) {
|
|
72
|
+
const label = host?.querySelector('[data-ref="label"]') as HTMLElement;
|
|
73
|
+
const ruleTop = host?.querySelector('[data-ref="rule-top"]') as HTMLElement;
|
|
74
|
+
const numeral = host?.querySelector('[data-ref="numeral"]') as HTMLElement;
|
|
75
|
+
const name = host?.querySelector('[data-ref="name"]') as HTMLElement;
|
|
76
|
+
const ruleBottom = host?.querySelector('[data-ref="rule-bottom"]') as HTMLElement;
|
|
77
|
+
|
|
78
|
+
const ease = "cubic-bezier(0.2, 0.8, 0.2, 1)";
|
|
79
|
+
const opts = { fill: "forwards" as const, easing: ease };
|
|
80
|
+
|
|
81
|
+
label.animate(
|
|
82
|
+
[
|
|
83
|
+
{ opacity: 0, transform: "translateY(-24px)" },
|
|
84
|
+
{ opacity: 1, transform: "translateY(0)" },
|
|
85
|
+
],
|
|
86
|
+
{ ...opts, duration: 360 },
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
ruleTop.animate(
|
|
90
|
+
[
|
|
91
|
+
{ opacity: 0, transform: "scaleX(0)" },
|
|
92
|
+
{ opacity: 1, transform: "scaleX(1)" },
|
|
93
|
+
],
|
|
94
|
+
{ ...opts, duration: 360, delay: 60 },
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
numeral.animate(
|
|
98
|
+
[
|
|
99
|
+
{ opacity: 0, transform: "translateY(32px)" },
|
|
100
|
+
{ opacity: 1, transform: "translateY(0)" },
|
|
101
|
+
],
|
|
102
|
+
{ ...opts, duration: 360, delay: 120 },
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
name.animate(
|
|
106
|
+
[
|
|
107
|
+
{ opacity: 0, transform: "translateY(24px)" },
|
|
108
|
+
{ opacity: 1, transform: "translateY(0)" },
|
|
109
|
+
],
|
|
110
|
+
{ ...opts, duration: 360, delay: 180 },
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
ruleBottom.animate(
|
|
114
|
+
[
|
|
115
|
+
{ opacity: 0, transform: "scaleX(0)" },
|
|
116
|
+
{ opacity: 1, transform: "scaleX(1)" },
|
|
117
|
+
],
|
|
118
|
+
{ ...opts, duration: 360, delay: 240 },
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
await ctx.waitForNext();
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
unmount() {
|
|
125
|
+
host = null;
|
|
126
|
+
},
|
|
127
|
+
});
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { defineSegment } from "videowright";
|
|
2
|
+
|
|
3
|
+
let host: HTMLElement | null = null;
|
|
4
|
+
|
|
5
|
+
export default defineSegment({
|
|
6
|
+
id: "swiss-console-sample-stat",
|
|
7
|
+
advances: [2.5, 5.0],
|
|
8
|
+
voiceover:
|
|
9
|
+
"Stat cards in Swiss Console. A large tabular number counts up on the left, label and description on the right.",
|
|
10
|
+
|
|
11
|
+
mount(el) {
|
|
12
|
+
host = el;
|
|
13
|
+
el.innerHTML = `
|
|
14
|
+
<div style="
|
|
15
|
+
position: relative;
|
|
16
|
+
height: 100%;
|
|
17
|
+
background: var(--color-bg);
|
|
18
|
+
color: var(--color-fg);
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
">
|
|
21
|
+
<div style="position: absolute; left: var(--safe-x); right: var(--safe-x); top: 56px; height: 1px; background: var(--color-border);"></div>
|
|
22
|
+
<div style="position: absolute; left: var(--safe-x); right: var(--safe-x); bottom: 56px; height: 1px; background: var(--color-border);"></div>
|
|
23
|
+
|
|
24
|
+
<div data-ref="label" style="
|
|
25
|
+
position: absolute;
|
|
26
|
+
left: var(--safe-x);
|
|
27
|
+
top: 140px;
|
|
28
|
+
font-family: var(--font-mono);
|
|
29
|
+
font-size: 14px;
|
|
30
|
+
letter-spacing: 0.12em;
|
|
31
|
+
text-transform: uppercase;
|
|
32
|
+
color: var(--color-muted);
|
|
33
|
+
opacity: 0;
|
|
34
|
+
">Finding 03 / Q1 2026</div>
|
|
35
|
+
|
|
36
|
+
<div style="position: absolute; left: var(--safe-x); top: 240px; border-top: 1px solid var(--color-fg); padding-top: 24px;">
|
|
37
|
+
<div data-ref="number" style="
|
|
38
|
+
font-family: var(--font-display);
|
|
39
|
+
font-size: 420px;
|
|
40
|
+
font-weight: 500;
|
|
41
|
+
line-height: 0.9;
|
|
42
|
+
font-variant-numeric: tabular-nums;
|
|
43
|
+
font-feature-settings: 'tnum';
|
|
44
|
+
"><span data-ref="digits">0</span><span style="color: var(--color-accent);">%</span></div>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div data-ref="detail" style="
|
|
48
|
+
position: absolute;
|
|
49
|
+
left: 1100px;
|
|
50
|
+
top: 280px;
|
|
51
|
+
width: 640px;
|
|
52
|
+
opacity: 0;
|
|
53
|
+
">
|
|
54
|
+
<div style="height: 1px; background: var(--color-fg); margin-bottom: 20px;"></div>
|
|
55
|
+
<div style="
|
|
56
|
+
font-family: var(--font-mono);
|
|
57
|
+
font-size: 13px;
|
|
58
|
+
letter-spacing: 0.12em;
|
|
59
|
+
text-transform: uppercase;
|
|
60
|
+
color: var(--color-muted);
|
|
61
|
+
margin-bottom: 12px;
|
|
62
|
+
">Failure-after-step-4 rate</div>
|
|
63
|
+
<div style="
|
|
64
|
+
font-family: var(--font-body);
|
|
65
|
+
font-size: 28px;
|
|
66
|
+
line-height: 1.4;
|
|
67
|
+
">of agent failures occur after the fourth tool call, when context, plan, and toolset have all drifted.</div>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<div data-ref="sparkline" style="
|
|
71
|
+
position: absolute;
|
|
72
|
+
left: 1100px;
|
|
73
|
+
top: 620px;
|
|
74
|
+
width: 640px;
|
|
75
|
+
opacity: 0;
|
|
76
|
+
">
|
|
77
|
+
<div style="
|
|
78
|
+
font-family: var(--font-mono);
|
|
79
|
+
font-size: 13px;
|
|
80
|
+
letter-spacing: 0.12em;
|
|
81
|
+
text-transform: uppercase;
|
|
82
|
+
color: var(--color-muted);
|
|
83
|
+
margin-bottom: 12px;
|
|
84
|
+
">Q1 '25 → Q1 '26</div>
|
|
85
|
+
<svg width="100%" height="80" viewBox="0 0 400 80" preserveAspectRatio="none">
|
|
86
|
+
<polyline points="0,60 50,55 100,52 150,48 200,40 250,32 300,25 350,18 400,12" stroke="var(--color-fg)" stroke-width="1.5" fill="none" />
|
|
87
|
+
<circle cx="400" cy="12" r="4" fill="var(--color-accent)" />
|
|
88
|
+
</svg>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
`;
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
async play(ctx) {
|
|
95
|
+
const label = host?.querySelector('[data-ref="label"]') as HTMLElement;
|
|
96
|
+
const digits = host?.querySelector('[data-ref="digits"]') as HTMLElement;
|
|
97
|
+
const detail = host?.querySelector('[data-ref="detail"]') as HTMLElement;
|
|
98
|
+
const sparkline = host?.querySelector('[data-ref="sparkline"]') as HTMLElement;
|
|
99
|
+
|
|
100
|
+
const ease = "cubic-bezier(0.2, 0.8, 0.2, 1)";
|
|
101
|
+
const opts = { fill: "forwards" as const, easing: ease };
|
|
102
|
+
|
|
103
|
+
label.animate(
|
|
104
|
+
[
|
|
105
|
+
{ opacity: 0, transform: "translateX(-24px)" },
|
|
106
|
+
{ opacity: 1, transform: "translateX(0)" },
|
|
107
|
+
],
|
|
108
|
+
{ ...opts, duration: 360 },
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
// Count up from 0 to 84 over 720ms using stepped holds.
|
|
112
|
+
// Counter/ticker animations are discrete text changes that cannot use WAAPI,
|
|
113
|
+
// so a ctx.hold loop with DOM text updates is the correct pattern.
|
|
114
|
+
const target = 84;
|
|
115
|
+
const steps = 30;
|
|
116
|
+
const stepDuration = 720 / steps;
|
|
117
|
+
await ctx.hold(150);
|
|
118
|
+
for (let i = 1; i <= steps; i++) {
|
|
119
|
+
const progress = i / steps;
|
|
120
|
+
const eased = 1 - (1 - progress) ** 4;
|
|
121
|
+
digits.textContent = String(Math.round(eased * target));
|
|
122
|
+
await ctx.hold(stepDuration);
|
|
123
|
+
}
|
|
124
|
+
digits.textContent = String(target);
|
|
125
|
+
|
|
126
|
+
detail.animate(
|
|
127
|
+
[
|
|
128
|
+
{ opacity: 0, transform: "translateX(32px)" },
|
|
129
|
+
{ opacity: 1, transform: "translateX(0)" },
|
|
130
|
+
],
|
|
131
|
+
{ ...opts, duration: 360 },
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
sparkline.animate(
|
|
135
|
+
[
|
|
136
|
+
{ opacity: 0, transform: "translateY(24px)" },
|
|
137
|
+
{ opacity: 1, transform: "translateY(0)" },
|
|
138
|
+
],
|
|
139
|
+
{ ...opts, duration: 360, delay: 180 },
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
await ctx.waitForNext();
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
unmount() {
|
|
146
|
+
host = null;
|
|
147
|
+
},
|
|
148
|
+
});
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { defineSegment } from "videowright";
|
|
2
|
+
|
|
3
|
+
let host: HTMLElement | null = null;
|
|
4
|
+
|
|
5
|
+
export default defineSegment({
|
|
6
|
+
id: "swiss-console-sample-title",
|
|
7
|
+
advances: [2.0, 4.0],
|
|
8
|
+
voiceover:
|
|
9
|
+
"Title cards in Swiss Console. Display headline left-aligned on the grid, micro-labels top-left and top-right.",
|
|
10
|
+
|
|
11
|
+
mount(el) {
|
|
12
|
+
host = el;
|
|
13
|
+
el.innerHTML = `
|
|
14
|
+
<div style="
|
|
15
|
+
position: relative;
|
|
16
|
+
height: 100%;
|
|
17
|
+
background: var(--color-bg);
|
|
18
|
+
color: var(--color-fg);
|
|
19
|
+
font-family: var(--font-body);
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
">
|
|
22
|
+
<div style="position: absolute; left: var(--safe-x); right: var(--safe-x); top: 56px; height: 1px; background: var(--color-border);"></div>
|
|
23
|
+
<div style="position: absolute; left: var(--safe-x); right: var(--safe-x); bottom: 56px; height: 1px; background: var(--color-border);"></div>
|
|
24
|
+
|
|
25
|
+
<div data-ref="folio" style="
|
|
26
|
+
position: absolute;
|
|
27
|
+
left: var(--safe-x);
|
|
28
|
+
top: 32px;
|
|
29
|
+
font-family: var(--font-mono);
|
|
30
|
+
font-size: 13px;
|
|
31
|
+
letter-spacing: 0.12em;
|
|
32
|
+
text-transform: uppercase;
|
|
33
|
+
color: var(--color-muted);
|
|
34
|
+
opacity: 0;
|
|
35
|
+
">01 / Overview</div>
|
|
36
|
+
|
|
37
|
+
<div data-ref="counter" style="
|
|
38
|
+
position: absolute;
|
|
39
|
+
right: var(--safe-x);
|
|
40
|
+
top: 32px;
|
|
41
|
+
font-family: var(--font-mono);
|
|
42
|
+
font-size: 13px;
|
|
43
|
+
letter-spacing: 0.12em;
|
|
44
|
+
text-transform: uppercase;
|
|
45
|
+
color: var(--color-muted);
|
|
46
|
+
font-variant-numeric: tabular-nums;
|
|
47
|
+
opacity: 0;
|
|
48
|
+
">01 / 10</div>
|
|
49
|
+
|
|
50
|
+
<div data-ref="headline" style="
|
|
51
|
+
position: absolute;
|
|
52
|
+
left: var(--safe-x);
|
|
53
|
+
top: 340px;
|
|
54
|
+
font-family: var(--font-display);
|
|
55
|
+
font-size: 200px;
|
|
56
|
+
font-weight: 600;
|
|
57
|
+
line-height: 0.96;
|
|
58
|
+
letter-spacing: -0.02em;
|
|
59
|
+
opacity: 0;
|
|
60
|
+
">Console<span style="color: var(--color-accent);">.</span></div>
|
|
61
|
+
|
|
62
|
+
<div data-ref="subtitle" style="
|
|
63
|
+
position: absolute;
|
|
64
|
+
left: var(--safe-x);
|
|
65
|
+
top: 600px;
|
|
66
|
+
font-family: var(--font-body);
|
|
67
|
+
font-size: 28px;
|
|
68
|
+
font-weight: 400;
|
|
69
|
+
color: var(--color-muted);
|
|
70
|
+
max-width: 780px;
|
|
71
|
+
opacity: 0;
|
|
72
|
+
">A workbench for long-running agents. Memory, recovery, observability.</div>
|
|
73
|
+
|
|
74
|
+
<div data-ref="build" style="
|
|
75
|
+
position: absolute;
|
|
76
|
+
right: var(--safe-x);
|
|
77
|
+
bottom: 80px;
|
|
78
|
+
font-family: var(--font-mono);
|
|
79
|
+
font-size: 13px;
|
|
80
|
+
letter-spacing: 0.12em;
|
|
81
|
+
text-transform: uppercase;
|
|
82
|
+
color: var(--color-fg);
|
|
83
|
+
font-variant-numeric: tabular-nums;
|
|
84
|
+
border-top: 1px solid var(--color-fg);
|
|
85
|
+
padding-top: 14px;
|
|
86
|
+
opacity: 0;
|
|
87
|
+
">Build 2026.05.10</div>
|
|
88
|
+
</div>
|
|
89
|
+
`;
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
async play(ctx) {
|
|
93
|
+
const folio = host?.querySelector('[data-ref="folio"]') as HTMLElement;
|
|
94
|
+
const counter = host?.querySelector('[data-ref="counter"]') as HTMLElement;
|
|
95
|
+
const headline = host?.querySelector('[data-ref="headline"]') as HTMLElement;
|
|
96
|
+
const subtitle = host?.querySelector('[data-ref="subtitle"]') as HTMLElement;
|
|
97
|
+
const build = host?.querySelector('[data-ref="build"]') as HTMLElement;
|
|
98
|
+
|
|
99
|
+
const ease = "cubic-bezier(0.2, 0.8, 0.2, 1)";
|
|
100
|
+
const opts = { fill: "forwards" as const, easing: ease };
|
|
101
|
+
|
|
102
|
+
folio.animate(
|
|
103
|
+
[
|
|
104
|
+
{ opacity: 0, transform: "translateX(-24px)" },
|
|
105
|
+
{ opacity: 1, transform: "translateX(0)" },
|
|
106
|
+
],
|
|
107
|
+
{ ...opts, duration: 360 },
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
counter.animate(
|
|
111
|
+
[
|
|
112
|
+
{ opacity: 0, transform: "translateX(24px)" },
|
|
113
|
+
{ opacity: 1, transform: "translateX(0)" },
|
|
114
|
+
],
|
|
115
|
+
{ ...opts, duration: 360, delay: 60 },
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
headline.animate(
|
|
119
|
+
[
|
|
120
|
+
{ opacity: 0, transform: "translateX(32px)" },
|
|
121
|
+
{ opacity: 1, transform: "translateX(0)" },
|
|
122
|
+
],
|
|
123
|
+
{ ...opts, duration: 360, delay: 120 },
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
subtitle.animate(
|
|
127
|
+
[
|
|
128
|
+
{ opacity: 0, transform: "translateX(32px)" },
|
|
129
|
+
{ opacity: 1, transform: "translateX(0)" },
|
|
130
|
+
],
|
|
131
|
+
{ ...opts, duration: 360, delay: 180 },
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
build.animate(
|
|
135
|
+
[
|
|
136
|
+
{ opacity: 0, transform: "translateY(24px)" },
|
|
137
|
+
{ opacity: 1, transform: "translateY(0)" },
|
|
138
|
+
],
|
|
139
|
+
{ ...opts, duration: 360, delay: 240 },
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
await ctx.waitForNext();
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
unmount() {
|
|
146
|
+
host = null;
|
|
147
|
+
},
|
|
148
|
+
});
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { defineSegment } from "videowright";
|
|
2
|
+
|
|
3
|
+
let host: HTMLElement | null = null;
|
|
4
|
+
|
|
5
|
+
export default defineSegment({
|
|
6
|
+
id: "swiss-console-sample-ui-showcase",
|
|
7
|
+
advances: [2.5, 5.0],
|
|
8
|
+
voiceover:
|
|
9
|
+
"UI showcases in Swiss Console. A product mock framed in hairline rules with red leader-line callouts in the margins.",
|
|
10
|
+
|
|
11
|
+
mount(el) {
|
|
12
|
+
host = el;
|
|
13
|
+
el.innerHTML = `
|
|
14
|
+
<div style="
|
|
15
|
+
position: relative;
|
|
16
|
+
height: 100%;
|
|
17
|
+
background: var(--color-bg);
|
|
18
|
+
color: var(--color-fg);
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
">
|
|
21
|
+
<div style="position: absolute; left: var(--safe-x); right: var(--safe-x); top: 56px; height: 1px; background: var(--color-border);"></div>
|
|
22
|
+
|
|
23
|
+
<div data-ref="label" style="
|
|
24
|
+
position: absolute;
|
|
25
|
+
left: var(--safe-x);
|
|
26
|
+
top: 120px;
|
|
27
|
+
font-family: var(--font-mono);
|
|
28
|
+
font-size: 14px;
|
|
29
|
+
letter-spacing: 0.12em;
|
|
30
|
+
text-transform: uppercase;
|
|
31
|
+
color: var(--color-muted);
|
|
32
|
+
opacity: 0;
|
|
33
|
+
">Fig. 03 / The Console</div>
|
|
34
|
+
|
|
35
|
+
<div data-ref="title" style="
|
|
36
|
+
position: absolute;
|
|
37
|
+
left: var(--safe-x);
|
|
38
|
+
top: 170px;
|
|
39
|
+
font-family: var(--font-display);
|
|
40
|
+
font-size: 56px;
|
|
41
|
+
font-weight: 500;
|
|
42
|
+
opacity: 0;
|
|
43
|
+
">One view of one run.</div>
|
|
44
|
+
|
|
45
|
+
<div data-ref="mock" style="
|
|
46
|
+
position: absolute;
|
|
47
|
+
left: 360px;
|
|
48
|
+
top: 320px;
|
|
49
|
+
width: 1200px;
|
|
50
|
+
height: 660px;
|
|
51
|
+
background: var(--color-bg);
|
|
52
|
+
border: 1px solid var(--color-fg);
|
|
53
|
+
opacity: 0;
|
|
54
|
+
">
|
|
55
|
+
<div style="height: 40px; border-bottom: 1px solid var(--color-fg); display: flex; align-items: center; gap: 8px; padding: 0 16px;">
|
|
56
|
+
<div style="width: 10px; height: 10px; border: 1px solid var(--color-fg);"></div>
|
|
57
|
+
<div style="width: 10px; height: 10px; border: 1px solid var(--color-fg);"></div>
|
|
58
|
+
<div style="width: 10px; height: 10px; border: 1px solid var(--color-fg);"></div>
|
|
59
|
+
<span style="margin-left: 16px; font-family: var(--font-mono); font-size: 12px; color: var(--color-muted);">SESSION 41ac.run</span>
|
|
60
|
+
<span style="margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--color-muted); font-variant-numeric: tabular-nums;">00:14:22</span>
|
|
61
|
+
</div>
|
|
62
|
+
<div style="display: grid; grid-template-columns: 200px 1fr 280px; height: calc(100% - 40px);">
|
|
63
|
+
<div style="border-right: 1px solid var(--color-border); padding: 16px; display: flex; flex-direction: column; gap: 6px;">
|
|
64
|
+
<div style="font-size: 14px; padding: 8px 12px; color: var(--color-muted); font-family: var(--font-body);">Run</div>
|
|
65
|
+
<div style="font-size: 14px; padding: 8px 12px; color: var(--color-muted); font-family: var(--font-body);">Memory</div>
|
|
66
|
+
<div style="font-size: 14px; padding: 8px 12px; background: var(--color-surface); color: var(--color-fg); font-weight: 500; font-family: var(--font-body);">Plan</div>
|
|
67
|
+
<div style="font-size: 14px; padding: 8px 12px; color: var(--color-muted); font-family: var(--font-body);">Tools</div>
|
|
68
|
+
<div style="font-size: 14px; padding: 8px 12px; color: var(--color-muted); font-family: var(--font-body);">Trace</div>
|
|
69
|
+
</div>
|
|
70
|
+
<div style="padding: 24px;">
|
|
71
|
+
<div style="font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-muted);">Plan / v3 (revised 14:22)</div>
|
|
72
|
+
<div style="margin-top: 16px; display: flex; flex-direction: column; gap: 12px;">
|
|
73
|
+
<div style="display: flex; gap: 12px; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid var(--color-border);">
|
|
74
|
+
<span style="font-family: var(--font-mono); font-size: 12px; color: var(--color-muted); font-variant-numeric: tabular-nums; min-width: 28px;">01</span>
|
|
75
|
+
<span style="font-size: 16px; font-family: var(--font-body);">Read eval spec</span>
|
|
76
|
+
<span style="margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--color-accent);">done</span>
|
|
77
|
+
</div>
|
|
78
|
+
<div style="display: flex; gap: 12px; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid var(--color-border);">
|
|
79
|
+
<span style="font-family: var(--font-mono); font-size: 12px; color: var(--color-muted); font-variant-numeric: tabular-nums; min-width: 28px;">02</span>
|
|
80
|
+
<span style="font-size: 16px; font-family: var(--font-body);">Generate candidate prompts</span>
|
|
81
|
+
<span style="margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--color-accent);">done</span>
|
|
82
|
+
</div>
|
|
83
|
+
<div style="display: flex; gap: 12px; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid var(--color-border);">
|
|
84
|
+
<span style="font-family: var(--font-mono); font-size: 12px; color: var(--color-muted); font-variant-numeric: tabular-nums; min-width: 28px;">03</span>
|
|
85
|
+
<span style="font-size: 16px; font-family: var(--font-body);">Score against rubric</span>
|
|
86
|
+
<span style="margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--color-muted);">queued</span>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
<div style="border-left: 1px solid var(--color-border); padding: 16px;">
|
|
91
|
+
<div style="font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-muted);">Memory / Snapshots</div>
|
|
92
|
+
<div style="margin-top: 12px; font-family: var(--font-mono); font-size: 12px; line-height: 1.6; color: var(--color-muted);">
|
|
93
|
+
<div>t=00:02 ✓ snap_001</div>
|
|
94
|
+
<div>t=00:05 ✓ snap_002</div>
|
|
95
|
+
<div>t=00:09 ✓ snap_003</div>
|
|
96
|
+
<div style="color: var(--color-accent);">t=00:14 ● snap_004</div>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<div data-ref="callout-a" style="
|
|
103
|
+
position: absolute;
|
|
104
|
+
left: var(--safe-x);
|
|
105
|
+
top: 540px;
|
|
106
|
+
width: 240px;
|
|
107
|
+
opacity: 0;
|
|
108
|
+
">
|
|
109
|
+
<div style="font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-accent);">A / Plan</div>
|
|
110
|
+
<div style="font-family: var(--font-body); font-size: 18px; margin-top: 6px; line-height: 1.4;">Versioned. Diff-able. Replayable.</div>
|
|
111
|
+
<div data-ref="line-a" style="height: 1px; width: 0; background: var(--color-accent); margin-top: 12px;"></div>
|
|
112
|
+
</div>
|
|
113
|
+
|
|
114
|
+
<div data-ref="callout-b" style="
|
|
115
|
+
position: absolute;
|
|
116
|
+
right: var(--safe-x);
|
|
117
|
+
top: 760px;
|
|
118
|
+
width: 220px;
|
|
119
|
+
text-align: right;
|
|
120
|
+
opacity: 0;
|
|
121
|
+
">
|
|
122
|
+
<div style="font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-accent);">B / Memory</div>
|
|
123
|
+
<div style="font-family: var(--font-body); font-size: 18px; margin-top: 6px; line-height: 1.4;">Snapshot per tool boundary.</div>
|
|
124
|
+
<div data-ref="line-b" style="height: 1px; width: 0; background: var(--color-accent); margin-top: 12px; margin-left: auto;"></div>
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
`;
|
|
128
|
+
},
|
|
129
|
+
|
|
130
|
+
async play(ctx) {
|
|
131
|
+
const label = host?.querySelector('[data-ref="label"]') as HTMLElement;
|
|
132
|
+
const title = host?.querySelector('[data-ref="title"]') as HTMLElement;
|
|
133
|
+
const mock = host?.querySelector('[data-ref="mock"]') as HTMLElement;
|
|
134
|
+
const calloutA = host?.querySelector('[data-ref="callout-a"]') as HTMLElement;
|
|
135
|
+
const calloutB = host?.querySelector('[data-ref="callout-b"]') as HTMLElement;
|
|
136
|
+
const lineA = host?.querySelector('[data-ref="line-a"]') as HTMLElement;
|
|
137
|
+
const lineB = host?.querySelector('[data-ref="line-b"]') as HTMLElement;
|
|
138
|
+
|
|
139
|
+
const ease = "cubic-bezier(0.2, 0.8, 0.2, 1)";
|
|
140
|
+
const opts = { fill: "forwards" as const, easing: ease };
|
|
141
|
+
|
|
142
|
+
label.animate(
|
|
143
|
+
[
|
|
144
|
+
{ opacity: 0, transform: "translateX(-24px)" },
|
|
145
|
+
{ opacity: 1, transform: "translateX(0)" },
|
|
146
|
+
],
|
|
147
|
+
{ ...opts, duration: 360 },
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
title.animate(
|
|
151
|
+
[
|
|
152
|
+
{ opacity: 0, transform: "translateX(32px)" },
|
|
153
|
+
{ opacity: 1, transform: "translateX(0)" },
|
|
154
|
+
],
|
|
155
|
+
{ ...opts, duration: 360, delay: 60 },
|
|
156
|
+
);
|
|
157
|
+
|
|
158
|
+
mock.animate(
|
|
159
|
+
[
|
|
160
|
+
{ opacity: 0, transform: "translateY(24px)" },
|
|
161
|
+
{ opacity: 1, transform: "translateY(0)" },
|
|
162
|
+
],
|
|
163
|
+
{ ...opts, duration: 360, delay: 120 },
|
|
164
|
+
);
|
|
165
|
+
|
|
166
|
+
calloutA.animate(
|
|
167
|
+
[
|
|
168
|
+
{ opacity: 0, transform: "translateX(-24px)" },
|
|
169
|
+
{ opacity: 1, transform: "translateX(0)" },
|
|
170
|
+
],
|
|
171
|
+
{ ...opts, duration: 360, delay: 800 },
|
|
172
|
+
);
|
|
173
|
+
lineA.animate([{ width: "0px" }, { width: "180px" }], {
|
|
174
|
+
...opts,
|
|
175
|
+
duration: 360,
|
|
176
|
+
delay: 800,
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
calloutB.animate(
|
|
180
|
+
[
|
|
181
|
+
{ opacity: 0, transform: "translateX(24px)" },
|
|
182
|
+
{ opacity: 1, transform: "translateX(0)" },
|
|
183
|
+
],
|
|
184
|
+
{ ...opts, duration: 360, delay: 1000 },
|
|
185
|
+
);
|
|
186
|
+
lineB.animate([{ width: "0px" }, { width: "180px" }], {
|
|
187
|
+
...opts,
|
|
188
|
+
duration: 360,
|
|
189
|
+
delay: 1000,
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
await ctx.waitForNext();
|
|
193
|
+
},
|
|
194
|
+
|
|
195
|
+
unmount() {
|
|
196
|
+
host = null;
|
|
197
|
+
},
|
|
198
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* Swiss Console — design tokens
|
|
2
|
+
* White paper, graphite ink, single red accent. Strict 12-col grid.
|
|
3
|
+
* Information-dense, micro-labels, tabular numerals.
|
|
4
|
+
*/
|
|
5
|
+
:root {
|
|
6
|
+
--color-bg: #ffffff;
|
|
7
|
+
--color-fg: #0a0a0a;
|
|
8
|
+
--color-accent: #e0301e; /* signal red */
|
|
9
|
+
|
|
10
|
+
--color-muted: #6b7280;
|
|
11
|
+
--color-border: #e5e5e5;
|
|
12
|
+
--color-surface: #f6f6f6;
|
|
13
|
+
|
|
14
|
+
--font-display: "Switzer", "Helvetica Neue", system-ui, sans-serif;
|
|
15
|
+
--font-body: "Switzer", "Helvetica Neue", system-ui, sans-serif;
|
|
16
|
+
--font-mono: "JetBrains Mono", ui-monospace, monospace;
|
|
17
|
+
|
|
18
|
+
--space-sm: 12px;
|
|
19
|
+
--space-md: 24px;
|
|
20
|
+
--space-lg: 48px;
|
|
21
|
+
--space-xl: 96px;
|
|
22
|
+
|
|
23
|
+
--duration-fast: 180ms;
|
|
24
|
+
--duration-normal: 360ms;
|
|
25
|
+
--duration-slow: 720ms;
|
|
26
|
+
|
|
27
|
+
--radius-sm: 0px; /* no rounding */
|
|
28
|
+
--radius-md: 0px;
|
|
29
|
+
--stagger: 60ms;
|
|
30
|
+
--ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
31
|
+
--ease-in: cubic-bezier(0.4, 0, 1, 1);
|
|
32
|
+
--rule-weight: 1px;
|
|
33
|
+
--scene-hold: 3.5s;
|
|
34
|
+
|
|
35
|
+
--safe-x: 96px;
|
|
36
|
+
--safe-y: 80px;
|
|
37
|
+
--grid-cols: 12;
|
|
38
|
+
--grid-gutter: 24px;
|
|
39
|
+
}
|