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.
Files changed (306) hide show
  1. package/README.md +91 -0
  2. package/dist/cli/argv.d.ts +28 -0
  3. package/dist/cli/argv.d.ts.map +1 -0
  4. package/dist/cli/argv.js +115 -0
  5. package/dist/cli/argv.js.map +1 -0
  6. package/dist/cli/bin.d.ts +7 -0
  7. package/dist/cli/bin.d.ts.map +1 -0
  8. package/dist/cli/bin.js +10 -0
  9. package/dist/cli/bin.js.map +1 -0
  10. package/dist/cli/dev.d.ts +19 -0
  11. package/dist/cli/dev.d.ts.map +1 -0
  12. package/dist/cli/dev.js +104 -0
  13. package/dist/cli/dev.js.map +1 -0
  14. package/dist/cli/discover.d.ts +29 -0
  15. package/dist/cli/discover.d.ts.map +1 -0
  16. package/dist/cli/discover.js +104 -0
  17. package/dist/cli/discover.js.map +1 -0
  18. package/dist/cli/discover_project.d.ts +29 -0
  19. package/dist/cli/discover_project.d.ts.map +1 -0
  20. package/dist/cli/discover_project.js +108 -0
  21. package/dist/cli/discover_project.js.map +1 -0
  22. package/dist/cli/errors.d.ts +10 -0
  23. package/dist/cli/errors.d.ts.map +1 -0
  24. package/dist/cli/errors.js +13 -0
  25. package/dist/cli/errors.js.map +1 -0
  26. package/dist/cli/ffmpeg.d.ts +57 -0
  27. package/dist/cli/ffmpeg.d.ts.map +1 -0
  28. package/dist/cli/ffmpeg.js +122 -0
  29. package/dist/cli/ffmpeg.js.map +1 -0
  30. package/dist/cli/index.d.ts +7 -0
  31. package/dist/cli/index.d.ts.map +1 -0
  32. package/dist/cli/index.js +152 -0
  33. package/dist/cli/index.js.map +1 -0
  34. package/dist/cli/playwright_check.d.ts +44 -0
  35. package/dist/cli/playwright_check.d.ts.map +1 -0
  36. package/dist/cli/playwright_check.js +20 -0
  37. package/dist/cli/playwright_check.js.map +1 -0
  38. package/dist/cli/prompt.d.ts +13 -0
  39. package/dist/cli/prompt.d.ts.map +1 -0
  40. package/dist/cli/prompt.js +47 -0
  41. package/dist/cli/prompt.js.map +1 -0
  42. package/dist/cli/render.d.ts +60 -0
  43. package/dist/cli/render.d.ts.map +1 -0
  44. package/dist/cli/render.js +471 -0
  45. package/dist/cli/render.js.map +1 -0
  46. package/dist/cli/script_cmd.d.ts +26 -0
  47. package/dist/cli/script_cmd.d.ts.map +1 -0
  48. package/dist/cli/script_cmd.js +88 -0
  49. package/dist/cli/script_cmd.js.map +1 -0
  50. package/dist/cli/time_shim.d.ts +44 -0
  51. package/dist/cli/time_shim.d.ts.map +1 -0
  52. package/dist/cli/time_shim.js +390 -0
  53. package/dist/cli/time_shim.js.map +1 -0
  54. package/dist/cli/ts_loader.d.ts +28 -0
  55. package/dist/cli/ts_loader.d.ts.map +1 -0
  56. package/dist/cli/ts_loader.js +95 -0
  57. package/dist/cli/ts_loader.js.map +1 -0
  58. package/dist/cli/vite_helpers.d.ts +62 -0
  59. package/dist/cli/vite_helpers.d.ts.map +1 -0
  60. package/dist/cli/vite_helpers.js +273 -0
  61. package/dist/cli/vite_helpers.js.map +1 -0
  62. package/dist/index.d.ts +11 -0
  63. package/dist/index.d.ts.map +1 -0
  64. package/dist/index.js +14 -0
  65. package/dist/index.js.map +1 -0
  66. package/dist/player/hash_router.d.ts +23 -0
  67. package/dist/player/hash_router.d.ts.map +1 -0
  68. package/dist/player/hash_router.js +49 -0
  69. package/dist/player/hash_router.js.map +1 -0
  70. package/dist/player/hud.d.ts +33 -0
  71. package/dist/player/hud.d.ts.map +1 -0
  72. package/dist/player/hud.js +357 -0
  73. package/dist/player/hud.js.map +1 -0
  74. package/dist/player/index.d.ts +123 -0
  75. package/dist/player/index.d.ts.map +1 -0
  76. package/dist/player/index.js +848 -0
  77. package/dist/player/index.js.map +1 -0
  78. package/dist/player/input.d.ts +14 -0
  79. package/dist/player/input.d.ts.map +1 -0
  80. package/dist/player/input.js +90 -0
  81. package/dist/player/input.js.map +1 -0
  82. package/dist/player/slot.d.ts +22 -0
  83. package/dist/player/slot.d.ts.map +1 -0
  84. package/dist/player/slot.js +43 -0
  85. package/dist/player/slot.js.map +1 -0
  86. package/dist/player/transitions/cut.d.ts +7 -0
  87. package/dist/player/transitions/cut.d.ts.map +1 -0
  88. package/dist/player/transitions/cut.js +9 -0
  89. package/dist/player/transitions/cut.js.map +1 -0
  90. package/dist/player/transitions/fade.d.ts +7 -0
  91. package/dist/player/transitions/fade.d.ts.map +1 -0
  92. package/dist/player/transitions/fade.js +18 -0
  93. package/dist/player/transitions/fade.js.map +1 -0
  94. package/dist/player/transitions/index.d.ts +4 -0
  95. package/dist/player/transitions/index.d.ts.map +1 -0
  96. package/dist/player/transitions/index.js +4 -0
  97. package/dist/player/transitions/index.js.map +1 -0
  98. package/dist/player/transitions/slide.d.ts +6 -0
  99. package/dist/player/transitions/slide.d.ts.map +1 -0
  100. package/dist/player/transitions/slide.js +35 -0
  101. package/dist/player/transitions/slide.js.map +1 -0
  102. package/dist/script/index.d.ts +2 -0
  103. package/dist/script/index.d.ts.map +1 -0
  104. package/dist/script/index.js +2 -0
  105. package/dist/script/index.js.map +1 -0
  106. package/dist/script/script.d.ts +10 -0
  107. package/dist/script/script.d.ts.map +1 -0
  108. package/dist/script/script.js +41 -0
  109. package/dist/script/script.js.map +1 -0
  110. package/dist/segment/SegmentRunner.d.ts +52 -0
  111. package/dist/segment/SegmentRunner.d.ts.map +1 -0
  112. package/dist/segment/SegmentRunner.js +187 -0
  113. package/dist/segment/SegmentRunner.js.map +1 -0
  114. package/dist/segment/defineConfig.d.ts +6 -0
  115. package/dist/segment/defineConfig.d.ts.map +1 -0
  116. package/dist/segment/defineConfig.js +7 -0
  117. package/dist/segment/defineConfig.js.map +1 -0
  118. package/dist/segment/defineSegment.d.ts +7 -0
  119. package/dist/segment/defineSegment.d.ts.map +1 -0
  120. package/dist/segment/defineSegment.js +25 -0
  121. package/dist/segment/defineSegment.js.map +1 -0
  122. package/dist/segment/index.d.ts +5 -0
  123. package/dist/segment/index.d.ts.map +1 -0
  124. package/dist/segment/index.js +4 -0
  125. package/dist/segment/index.js.map +1 -0
  126. package/dist/timeline/index.d.ts +73 -0
  127. package/dist/timeline/index.d.ts.map +1 -0
  128. package/dist/timeline/index.js +142 -0
  129. package/dist/timeline/index.js.map +1 -0
  130. package/dist/timeline/loadAudioTrack.d.ts +18 -0
  131. package/dist/timeline/loadAudioTrack.d.ts.map +1 -0
  132. package/dist/timeline/loadAudioTrack.js +44 -0
  133. package/dist/timeline/loadAudioTrack.js.map +1 -0
  134. package/dist/timeline/loadVoiceover.d.ts +18 -0
  135. package/dist/timeline/loadVoiceover.d.ts.map +1 -0
  136. package/dist/timeline/loadVoiceover.js +38 -0
  137. package/dist/timeline/loadVoiceover.js.map +1 -0
  138. package/dist/timeline/resolveTiming.d.ts +28 -0
  139. package/dist/timeline/resolveTiming.d.ts.map +1 -0
  140. package/dist/timeline/resolveTiming.js +63 -0
  141. package/dist/timeline/resolveTiming.js.map +1 -0
  142. package/dist/timeline/validateTiming.d.ts +29 -0
  143. package/dist/timeline/validateTiming.d.ts.map +1 -0
  144. package/dist/timeline/validateTiming.js +62 -0
  145. package/dist/timeline/validateTiming.js.map +1 -0
  146. package/dist/types.d.ts +216 -0
  147. package/dist/types.d.ts.map +1 -0
  148. package/dist/types.js +6 -0
  149. package/dist/types.js.map +1 -0
  150. package/package.json +47 -0
  151. package/skill/SKILL.md +64 -0
  152. package/skill/assets/hello_world/PLAN.md +31 -0
  153. package/skill/assets/hello_world/README.md +27 -0
  154. package/skill/assets/hello_world/audio/audio_plan.md +14 -0
  155. package/skill/assets/hello_world/segments/hello_intro.ts +69 -0
  156. package/skill/assets/hello_world/segments/hello_outro.ts +71 -0
  157. package/skill/assets/hello_world/timeline.ts +15 -0
  158. package/skill/assets/hello_world/voiceover_script/script.md +10 -0
  159. package/skill/assets/install/package.json +10 -0
  160. package/skill/assets/install/tsconfig.json +23 -0
  161. package/skill/assets/styles/editorial-mono/STYLE.md +124 -0
  162. package/skill/assets/styles/editorial-mono/brand.md +85 -0
  163. package/skill/assets/styles/editorial-mono/reference/animations.jsx +752 -0
  164. package/skill/assets/styles/editorial-mono/reference/scenes.html +563 -0
  165. package/skill/assets/styles/editorial-mono/sample/bullet.ts +101 -0
  166. package/skill/assets/styles/editorial-mono/sample/content.ts +104 -0
  167. package/skill/assets/styles/editorial-mono/sample/cta.ts +113 -0
  168. package/skill/assets/styles/editorial-mono/sample/feature.ts +111 -0
  169. package/skill/assets/styles/editorial-mono/sample/grid.ts +97 -0
  170. package/skill/assets/styles/editorial-mono/sample/kinetic.ts +96 -0
  171. package/skill/assets/styles/editorial-mono/sample/section.ts +101 -0
  172. package/skill/assets/styles/editorial-mono/sample/stat.ts +128 -0
  173. package/skill/assets/styles/editorial-mono/sample/title.ts +97 -0
  174. package/skill/assets/styles/editorial-mono/sample/ui-showcase.ts +159 -0
  175. package/skill/assets/styles/editorial-mono/tokens.css +44 -0
  176. package/skill/assets/styles/iso-diagram/STYLE.md +109 -0
  177. package/skill/assets/styles/iso-diagram/brand.md +32 -0
  178. package/skill/assets/styles/iso-diagram/reference/animations.jsx +673 -0
  179. package/skill/assets/styles/iso-diagram/reference/scenes.html +427 -0
  180. package/skill/assets/styles/iso-diagram/sample/bullet.ts +144 -0
  181. package/skill/assets/styles/iso-diagram/sample/content.ts +192 -0
  182. package/skill/assets/styles/iso-diagram/sample/cta.ts +162 -0
  183. package/skill/assets/styles/iso-diagram/sample/feature.ts +205 -0
  184. package/skill/assets/styles/iso-diagram/sample/grid.ts +181 -0
  185. package/skill/assets/styles/iso-diagram/sample/kinetic.ts +102 -0
  186. package/skill/assets/styles/iso-diagram/sample/section.ts +149 -0
  187. package/skill/assets/styles/iso-diagram/sample/stat.ts +164 -0
  188. package/skill/assets/styles/iso-diagram/sample/title.ts +173 -0
  189. package/skill/assets/styles/iso-diagram/sample/ui-showcase.ts +162 -0
  190. package/skill/assets/styles/iso-diagram/tokens.css +40 -0
  191. package/skill/assets/styles/motion-engineering/STYLE.md +106 -0
  192. package/skill/assets/styles/motion-engineering/brand.md +29 -0
  193. package/skill/assets/styles/motion-engineering/reference/animations.jsx +673 -0
  194. package/skill/assets/styles/motion-engineering/reference/scenes.html +513 -0
  195. package/skill/assets/styles/motion-engineering/sample/bullet.ts +176 -0
  196. package/skill/assets/styles/motion-engineering/sample/content.ts +228 -0
  197. package/skill/assets/styles/motion-engineering/sample/cta.ts +209 -0
  198. package/skill/assets/styles/motion-engineering/sample/feature.ts +299 -0
  199. package/skill/assets/styles/motion-engineering/sample/grid.ts +190 -0
  200. package/skill/assets/styles/motion-engineering/sample/kinetic.ts +159 -0
  201. package/skill/assets/styles/motion-engineering/sample/section.ts +196 -0
  202. package/skill/assets/styles/motion-engineering/sample/stat.ts +230 -0
  203. package/skill/assets/styles/motion-engineering/sample/title.ts +219 -0
  204. package/skill/assets/styles/motion-engineering/sample/ui-showcase.ts +267 -0
  205. package/skill/assets/styles/motion-engineering/tokens.css +40 -0
  206. package/skill/assets/styles/neon-terminal/STYLE.md +105 -0
  207. package/skill/assets/styles/neon-terminal/brand.md +27 -0
  208. package/skill/assets/styles/neon-terminal/reference/animations.jsx +673 -0
  209. package/skill/assets/styles/neon-terminal/reference/scenes.html +387 -0
  210. package/skill/assets/styles/neon-terminal/sample/bullet.ts +113 -0
  211. package/skill/assets/styles/neon-terminal/sample/content.ts +117 -0
  212. package/skill/assets/styles/neon-terminal/sample/cta.ts +131 -0
  213. package/skill/assets/styles/neon-terminal/sample/feature.ts +112 -0
  214. package/skill/assets/styles/neon-terminal/sample/grid.ts +128 -0
  215. package/skill/assets/styles/neon-terminal/sample/kinetic.ts +105 -0
  216. package/skill/assets/styles/neon-terminal/sample/section.ts +96 -0
  217. package/skill/assets/styles/neon-terminal/sample/stat.ts +123 -0
  218. package/skill/assets/styles/neon-terminal/sample/title.ts +122 -0
  219. package/skill/assets/styles/neon-terminal/sample/ui-showcase.ts +127 -0
  220. package/skill/assets/styles/neon-terminal/tokens.css +39 -0
  221. package/skill/assets/styles/risograph/STYLE.md +110 -0
  222. package/skill/assets/styles/risograph/brand.md +26 -0
  223. package/skill/assets/styles/risograph/reference/animations.jsx +673 -0
  224. package/skill/assets/styles/risograph/reference/scenes.html +403 -0
  225. package/skill/assets/styles/risograph/sample/bullet.ts +124 -0
  226. package/skill/assets/styles/risograph/sample/content.ts +135 -0
  227. package/skill/assets/styles/risograph/sample/cta.ts +149 -0
  228. package/skill/assets/styles/risograph/sample/feature.ts +152 -0
  229. package/skill/assets/styles/risograph/sample/grid.ts +123 -0
  230. package/skill/assets/styles/risograph/sample/kinetic.ts +125 -0
  231. package/skill/assets/styles/risograph/sample/section.ts +130 -0
  232. package/skill/assets/styles/risograph/sample/stat.ts +145 -0
  233. package/skill/assets/styles/risograph/sample/title.ts +132 -0
  234. package/skill/assets/styles/risograph/sample/ui-showcase.ts +147 -0
  235. package/skill/assets/styles/risograph/tokens.css +39 -0
  236. package/skill/assets/styles/swiss-console/STYLE.md +107 -0
  237. package/skill/assets/styles/swiss-console/brand.md +37 -0
  238. package/skill/assets/styles/swiss-console/reference/animations.jsx +673 -0
  239. package/skill/assets/styles/swiss-console/reference/scenes.html +420 -0
  240. package/skill/assets/styles/swiss-console/sample/bullet.ts +122 -0
  241. package/skill/assets/styles/swiss-console/sample/content.ts +137 -0
  242. package/skill/assets/styles/swiss-console/sample/cta.ts +109 -0
  243. package/skill/assets/styles/swiss-console/sample/feature.ts +163 -0
  244. package/skill/assets/styles/swiss-console/sample/grid.ts +145 -0
  245. package/skill/assets/styles/swiss-console/sample/kinetic.ts +117 -0
  246. package/skill/assets/styles/swiss-console/sample/section.ts +127 -0
  247. package/skill/assets/styles/swiss-console/sample/stat.ts +148 -0
  248. package/skill/assets/styles/swiss-console/sample/title.ts +148 -0
  249. package/skill/assets/styles/swiss-console/sample/ui-showcase.ts +198 -0
  250. package/skill/assets/styles/swiss-console/tokens.css +39 -0
  251. package/skill/install/INSTALL.md +400 -0
  252. package/skill/references/audio/audio_plan.md +199 -0
  253. package/skill/references/audio/build.md +208 -0
  254. package/skill/references/audio/cue_template.md +219 -0
  255. package/skill/references/audio/ffmpeg_cookbook.md +267 -0
  256. package/skill/references/audio/music/music.md +171 -0
  257. package/skill/references/audio/music/providers/elevenlabs.md +170 -0
  258. package/skill/references/audio/music/providers/manual.md +140 -0
  259. package/skill/references/audio/music/providers/openverse.md +265 -0
  260. package/skill/references/audio/sfx/providers/elevenlabs.md +152 -0
  261. package/skill/references/audio/sfx/providers/manual.md +117 -0
  262. package/skill/references/audio/sfx/providers/openverse.md +243 -0
  263. package/skill/references/audio/sfx/sfx.md +149 -0
  264. package/skill/references/audio/styles.md +102 -0
  265. package/skill/references/audio/sync.md +237 -0
  266. package/skill/references/audio/voiceover/animation_sync.md +142 -0
  267. package/skill/references/audio/voiceover/provider_script.md +153 -0
  268. package/skill/references/audio/voiceover/providers/elevenlabs.md +288 -0
  269. package/skill/references/audio/voiceover/providers/manual.md +100 -0
  270. package/skill/references/audio/voiceover/script_writing.md +100 -0
  271. package/skill/references/audio/voiceover/style_intake.md +56 -0
  272. package/skill/references/audio/voiceover/sync_algorithm.md +167 -0
  273. package/skill/references/audio/voiceover.md +296 -0
  274. package/skill/references/audio.md +135 -0
  275. package/skill/references/authoring_segment.md +446 -0
  276. package/skill/references/create_or_edit_video.md +232 -0
  277. package/skill/references/dev_server.md +157 -0
  278. package/skill/references/export.md +145 -0
  279. package/skill/references/new_video.md +117 -0
  280. package/skill/references/project_structure.md +144 -0
  281. package/skill/references/setup.md +109 -0
  282. package/skill/references/setup_new_style.md +158 -0
  283. package/skill/references/styles.md +154 -0
  284. package/skill/references/testing.md +115 -0
  285. package/skill/references/types.md +240 -0
  286. package/src/cli/entry/components/copy_button.ts +42 -0
  287. package/src/cli/entry/components/download_modal.ts +204 -0
  288. package/src/cli/entry/components/empty_state.ts +55 -0
  289. package/src/cli/entry/components/hide_hud_tab.ts +37 -0
  290. package/src/cli/entry/components/icons.ts +31 -0
  291. package/src/cli/entry/components/top_bar.ts +69 -0
  292. package/src/cli/entry/components/video_card.ts +57 -0
  293. package/src/cli/entry/dev_frame.ts +189 -0
  294. package/src/cli/entry/entry_index.ts +16 -0
  295. package/src/cli/entry/entry_video.ts +24 -0
  296. package/src/cli/entry/index.html +12 -0
  297. package/src/cli/entry/parse_slug.ts +14 -0
  298. package/src/cli/entry/render.html +17 -0
  299. package/src/cli/entry/render_entry.ts +121 -0
  300. package/src/cli/entry/styles/base.css +45 -0
  301. package/src/cli/entry/styles/components.css +605 -0
  302. package/src/cli/entry/styles/tokens.css +44 -0
  303. package/src/cli/entry/video.html +22 -0
  304. package/src/cli/entry/views/homepage.ts +66 -0
  305. package/src/cli/entry/views/video_view.ts +286 -0
  306. package/src/cli/entry/virtual.d.ts +8 -0
@@ -0,0 +1,299 @@
1
+ import { defineSegment } from "videowright";
2
+
3
+ let host: HTMLElement | null = null;
4
+
5
+ function cornerTicks() {
6
+ return `
7
+ <div style="position: absolute; left: -1px; top: -1px; width: 24px; height: 24px;">
8
+ <div style="position: absolute; left: 0; top: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
9
+ <div style="position: absolute; left: 0; top: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
10
+ </div>
11
+ <div style="position: absolute; right: -1px; top: -1px; width: 24px; height: 24px;">
12
+ <div style="position: absolute; right: 0; top: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
13
+ <div style="position: absolute; right: 0; top: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
14
+ </div>
15
+ <div style="position: absolute; left: -1px; bottom: -1px; width: 24px; height: 24px;">
16
+ <div style="position: absolute; left: 0; bottom: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
17
+ <div style="position: absolute; left: 0; bottom: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
18
+ </div>
19
+ <div style="position: absolute; right: -1px; bottom: -1px; width: 24px; height: 24px;">
20
+ <div style="position: absolute; right: 0; bottom: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
21
+ <div style="position: absolute; right: 0; bottom: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
22
+ </div>`;
23
+ }
24
+
25
+ export default defineSegment({
26
+ id: "motion-engineering-sample-feature",
27
+ advances: [2.5, 5.0],
28
+ voiceover:
29
+ "Feature cards in Motion Engineering. A wireframe schematic on the left with crosshair callouts, feature name and description on the right.",
30
+
31
+ mount(el) {
32
+ host = el;
33
+ el.innerHTML = `
34
+ <div style="
35
+ position: relative;
36
+ height: 100%;
37
+ background: var(--color-bg);
38
+ color: var(--color-fg);
39
+ font-family: var(--font-body);
40
+ overflow: hidden;
41
+ ">
42
+ <div style="
43
+ position: absolute; inset: 0; pointer-events: none;
44
+ background:
45
+ linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 64px 64px,
46
+ linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 64px 64px;
47
+ "></div>
48
+
49
+ <div data-ref="frame" style="
50
+ position: absolute;
51
+ inset: var(--safe-y) var(--safe-x);
52
+ border: 1px solid var(--color-border);
53
+ opacity: 0;
54
+ ">
55
+ ${cornerTicks()}
56
+
57
+ <div style="position: absolute; left: 80px; top: 100px; width: 760px; height: 760px;">
58
+ <div data-ref="schLabel" style="
59
+ font-family: var(--font-mono);
60
+ font-size: 12px;
61
+ letter-spacing: 0.25em;
62
+ color: var(--color-muted);
63
+ margin-bottom: 18px;
64
+ opacity: 0;
65
+ ">&mdash;&mdash; SCHEMATIC &middot; 06.1 &mdash;&mdash;</div>
66
+
67
+ <svg data-ref="schematic" width="700" height="500" style="overflow: visible; opacity: 0;">
68
+ <line x1="20" y1="140" x2="120" y2="140" stroke="var(--color-muted)" stroke-width="1.5" />
69
+ <line x1="20" y1="120" x2="20" y2="160" stroke="var(--color-muted)" stroke-width="1.5" />
70
+ <line x1="120" y1="120" x2="120" y2="160" stroke="var(--color-muted)" stroke-width="1.5" />
71
+
72
+ <line x1="160" y1="140" x2="260" y2="140" stroke="var(--color-muted)" stroke-width="1.5" />
73
+ <line x1="160" y1="120" x2="160" y2="160" stroke="var(--color-muted)" stroke-width="1.5" />
74
+ <line x1="260" y1="120" x2="260" y2="160" stroke="var(--color-muted)" stroke-width="1.5" />
75
+
76
+ <line x1="300" y1="140" x2="400" y2="140" stroke="var(--color-muted)" stroke-width="1.5" />
77
+ <line x1="300" y1="120" x2="300" y2="160" stroke="var(--color-muted)" stroke-width="1.5" />
78
+ <line x1="400" y1="120" x2="400" y2="160" stroke="var(--color-muted)" stroke-width="1.5" />
79
+
80
+ <line x1="440" y1="140" x2="540" y2="140" stroke="var(--color-muted)" stroke-width="1.5" />
81
+ <line x1="440" y1="120" x2="440" y2="160" stroke="var(--color-muted)" stroke-width="1.5" />
82
+ <line x1="540" y1="120" x2="540" y2="160" stroke="var(--color-muted)" stroke-width="1.5" />
83
+
84
+ <line x1="580" y1="140" x2="680" y2="140" stroke="var(--color-muted)" stroke-width="1.5" />
85
+ <line x1="580" y1="120" x2="580" y2="160" stroke="var(--color-muted)" stroke-width="1.5" />
86
+ <line x1="680" y1="120" x2="680" y2="160" stroke="var(--color-muted)" stroke-width="1.5" />
87
+
88
+ <line data-ref="snap0" x1="70" y1="140" x2="70" y2="240" stroke="var(--color-accent)" stroke-width="1.5" style="transform-origin: 70px 140px; transform: scaleY(0);" />
89
+ <circle data-ref="dot0" cx="70" cy="240" r="6" fill="var(--color-accent)" style="opacity: 0;" />
90
+
91
+ <line data-ref="snap1" x1="210" y1="140" x2="210" y2="240" stroke="var(--color-accent)" stroke-width="1.5" style="transform-origin: 210px 140px; transform: scaleY(0);" />
92
+ <circle data-ref="dot1" cx="210" cy="240" r="6" fill="var(--color-accent)" style="opacity: 0;" />
93
+
94
+ <line data-ref="snap2" x1="350" y1="140" x2="350" y2="240" stroke="var(--color-accent)" stroke-width="1.5" style="transform-origin: 350px 140px; transform: scaleY(0);" />
95
+ <circle data-ref="dot2" cx="350" cy="240" r="6" fill="var(--color-accent)" style="opacity: 0;" />
96
+
97
+ <line data-ref="rewind" x1="490" y1="340" x2="210" y2="340" stroke="var(--cyan)" stroke-width="2" style="transform-origin: 490px 340px; transform: scaleX(0);" />
98
+ <polygon data-ref="arrow" points="210,340 222,332 222,348" fill="var(--cyan)" style="opacity: 0;" />
99
+ <text data-ref="rewindLabel" x="350" y="325" fill="var(--cyan)" font-family="var(--font-mono)" font-size="14" text-anchor="middle" style="opacity: 0;">REWIND &#8594; snap_002</text>
100
+
101
+ <text x="20" y="108" fill="var(--color-muted)" font-family="var(--font-mono)" font-size="11" letter-spacing="0.15em">PLAN.STEP &#8594;</text>
102
+ <text x="20" y="280" fill="var(--color-muted)" font-family="var(--font-mono)" font-size="11" letter-spacing="0.15em">SNAPSHOTS</text>
103
+ </svg>
104
+ </div>
105
+
106
+ <div style="position: absolute; right: 80px; top: 100px; width: 700px;">
107
+ <div data-ref="featureTag" style="
108
+ font-family: var(--font-mono);
109
+ font-size: 13px;
110
+ letter-spacing: 0.25em;
111
+ color: var(--color-accent);
112
+ margin-bottom: 24px;
113
+ opacity: 0;
114
+ ">&#9698; FEATURE 01 / 03</div>
115
+
116
+ <div data-ref="featureName" style="
117
+ font-family: var(--font-display);
118
+ font-weight: 500;
119
+ font-size: 92px;
120
+ margin-bottom: 36px;
121
+ opacity: 0;
122
+ ">Checkpoint memory.</div>
123
+
124
+ <div data-ref="featureDesc" style="
125
+ font-size: 26px;
126
+ line-height: 1.5;
127
+ color: var(--color-muted);
128
+ margin-bottom: 40px;
129
+ opacity: 0;
130
+ ">Snapshots an agent's reasoning state at each tool boundary. When a plan goes stale, the agent rewinds to the last point its world model was correct.</div>
131
+
132
+ <div data-ref="metrics" style="
133
+ border-top: 1px solid var(--color-border);
134
+ padding-top: 24px;
135
+ display: grid;
136
+ grid-template-columns: 1fr 1fr;
137
+ gap: 24px;
138
+ opacity: 0;
139
+ ">
140
+ <div>
141
+ <div style="
142
+ font-family: var(--font-mono);
143
+ font-size: 11px;
144
+ letter-spacing: 0.2em;
145
+ color: var(--color-muted);
146
+ ">SNAPSHOT/MIN</div>
147
+ <div style="
148
+ font-family: var(--font-mono);
149
+ font-size: 36px;
150
+ color: var(--color-accent);
151
+ font-variant-numeric: tabular-nums;
152
+ ">120</div>
153
+ </div>
154
+ <div>
155
+ <div style="
156
+ font-family: var(--font-mono);
157
+ font-size: 11px;
158
+ letter-spacing: 0.2em;
159
+ color: var(--color-muted);
160
+ ">RESTORE</div>
161
+ <div style="
162
+ font-family: var(--font-mono);
163
+ font-size: 36px;
164
+ color: var(--color-accent);
165
+ font-variant-numeric: tabular-nums;
166
+ ">9 ms</div>
167
+ </div>
168
+ </div>
169
+ </div>
170
+ </div>
171
+
172
+ <div data-ref="coord" style="
173
+ position: absolute; left: var(--safe-x); right: var(--safe-x); bottom: 28px;
174
+ display: flex; gap: 32px;
175
+ font-family: var(--font-mono);
176
+ font-size: 12px;
177
+ color: var(--color-muted);
178
+ letter-spacing: 0.1em;
179
+ opacity: 0;
180
+ ">
181
+ <span>X 1240.00</span><span>Y 360.00</span><span>T 0.00s</span>
182
+ <span style="margin-left: auto;">UNIT: PX &middot; SCALE 1:1</span>
183
+ </div>
184
+ </div>
185
+ `;
186
+ },
187
+
188
+ async play(ctx) {
189
+ const frame = host?.querySelector('[data-ref="frame"]') as HTMLElement;
190
+ const schLabel = host?.querySelector('[data-ref="schLabel"]') as HTMLElement;
191
+ const schematic = host?.querySelector('[data-ref="schematic"]') as SVGElement;
192
+ const featureTag = host?.querySelector('[data-ref="featureTag"]') as HTMLElement;
193
+ const featureName = host?.querySelector('[data-ref="featureName"]') as HTMLElement;
194
+ const featureDesc = host?.querySelector('[data-ref="featureDesc"]') as HTMLElement;
195
+ const metrics = host?.querySelector('[data-ref="metrics"]') as HTMLElement;
196
+ const coord = host?.querySelector('[data-ref="coord"]') as HTMLElement;
197
+
198
+ const ease = "cubic-bezier(0.2, 0.8, 0.2, 1)";
199
+ const opts = { fill: "forwards" as const, easing: ease };
200
+
201
+ frame.animate([{ opacity: 0 }, { opacity: 1 }], {
202
+ ...opts,
203
+ duration: 360,
204
+ });
205
+
206
+ coord.animate([{ opacity: 0 }, { opacity: 1 }], {
207
+ ...opts,
208
+ duration: 300,
209
+ delay: 100,
210
+ });
211
+
212
+ featureTag.animate(
213
+ [
214
+ { opacity: 0, transform: "translateY(8px)" },
215
+ { opacity: 1, transform: "translateY(0)" },
216
+ ],
217
+ { ...opts, duration: 300, delay: 200 },
218
+ );
219
+
220
+ schLabel.animate([{ opacity: 0 }, { opacity: 1 }], {
221
+ ...opts,
222
+ duration: 300,
223
+ delay: 200,
224
+ });
225
+
226
+ schematic.animate([{ opacity: 0 }, { opacity: 1 }], {
227
+ ...opts,
228
+ duration: 400,
229
+ delay: 400,
230
+ });
231
+
232
+ featureName.animate(
233
+ [
234
+ { opacity: 0, transform: "translateY(12px)" },
235
+ { opacity: 1, transform: "translateY(0)" },
236
+ ],
237
+ { ...opts, duration: 400, delay: 500 },
238
+ );
239
+
240
+ for (let i = 0; i < 3; i++) {
241
+ const snap = host?.querySelector(`[data-ref="snap${i}"]`) as SVGLineElement;
242
+ const dot = host?.querySelector(`[data-ref="dot${i}"]`) as SVGCircleElement;
243
+ snap.animate([{ transform: "scaleY(0)" }, { transform: "scaleY(1)" }], {
244
+ ...opts,
245
+ duration: 300,
246
+ delay: 700 + i * 120,
247
+ });
248
+ dot.animate([{ opacity: 0 }, { opacity: 1 }], {
249
+ ...opts,
250
+ duration: 200,
251
+ delay: 900 + i * 120,
252
+ });
253
+ }
254
+
255
+ featureDesc.animate(
256
+ [
257
+ { opacity: 0, transform: "translateY(8px)" },
258
+ { opacity: 1, transform: "translateY(0)" },
259
+ ],
260
+ { ...opts, duration: 360, delay: 900 },
261
+ );
262
+
263
+ const rewind = host?.querySelector('[data-ref="rewind"]') as SVGLineElement;
264
+ const arrow = host?.querySelector('[data-ref="arrow"]') as SVGPolygonElement;
265
+ const rewindLabel = host?.querySelector('[data-ref="rewindLabel"]') as SVGTextElement;
266
+
267
+ rewind.animate([{ transform: "scaleX(0)" }, { transform: "scaleX(1)" }], {
268
+ ...opts,
269
+ duration: 600,
270
+ delay: 1400,
271
+ });
272
+
273
+ arrow.animate([{ opacity: 0 }, { opacity: 1 }], {
274
+ ...opts,
275
+ duration: 200,
276
+ delay: 1900,
277
+ });
278
+
279
+ rewindLabel.animate([{ opacity: 0 }, { opacity: 1 }], {
280
+ ...opts,
281
+ duration: 200,
282
+ delay: 1900,
283
+ });
284
+
285
+ metrics.animate(
286
+ [
287
+ { opacity: 0, transform: "translateY(12px)" },
288
+ { opacity: 1, transform: "translateY(0)" },
289
+ ],
290
+ { ...opts, duration: 360, delay: 1300 },
291
+ );
292
+
293
+ await ctx.waitForNext();
294
+ },
295
+
296
+ unmount() {
297
+ host = null;
298
+ },
299
+ });
@@ -0,0 +1,190 @@
1
+ import { defineSegment } from "videowright";
2
+
3
+ let host: HTMLElement | null = null;
4
+
5
+ function cornerTicks() {
6
+ return `
7
+ <div style="position: absolute; left: -1px; top: -1px; width: 24px; height: 24px;">
8
+ <div style="position: absolute; left: 0; top: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
9
+ <div style="position: absolute; left: 0; top: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
10
+ </div>
11
+ <div style="position: absolute; right: -1px; top: -1px; width: 24px; height: 24px;">
12
+ <div style="position: absolute; right: 0; top: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
13
+ <div style="position: absolute; right: 0; top: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
14
+ </div>
15
+ <div style="position: absolute; left: -1px; bottom: -1px; width: 24px; height: 24px;">
16
+ <div style="position: absolute; left: 0; bottom: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
17
+ <div style="position: absolute; left: 0; bottom: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
18
+ </div>
19
+ <div style="position: absolute; right: -1px; bottom: -1px; width: 24px; height: 24px;">
20
+ <div style="position: absolute; right: 0; bottom: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
21
+ <div style="position: absolute; right: 0; bottom: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
22
+ </div>`;
23
+ }
24
+
25
+ export default defineSegment({
26
+ id: "motion-engineering-sample-grid",
27
+ advances: [2.5, 5.0],
28
+ voiceover:
29
+ "Card grids in Motion Engineering. Three cards framed with amber corner ticks, each containing a wireframe diagram, name, and metric.",
30
+
31
+ mount(el) {
32
+ host = el;
33
+
34
+ const cards = [
35
+ { n: "01", name: "Memory", metric: "120 snap/min", sym: "M" },
36
+ { n: "02", name: "Reasoning", metric: "9 ms restore", sym: "R" },
37
+ { n: "03", name: "Recovery", metric: "0 lost steps", sym: "C" },
38
+ ];
39
+
40
+ const cardHtml = cards
41
+ .map(
42
+ (c, i) => `
43
+ <div data-ref="card${i}" style="
44
+ position: relative;
45
+ padding: 32px;
46
+ border: 1px solid var(--color-border);
47
+ min-height: 420px;
48
+ opacity: 0;
49
+ ">
50
+ ${cornerTicks()}
51
+
52
+ <div style="
53
+ font-family: var(--font-mono);
54
+ font-size: 12px;
55
+ letter-spacing: 0.25em;
56
+ color: var(--color-muted);
57
+ ">PRIMITIVE ${c.n} / 03</div>
58
+
59
+ <svg width="200" height="160" style="margin-top: 28px;">
60
+ <circle cx="100" cy="80" r="50" fill="none" stroke="var(--color-accent)" stroke-width="1.5" />
61
+ <text x="100" y="92" fill="var(--color-accent)" font-family="var(--font-display)" font-size="44" font-weight="500" text-anchor="middle">${c.sym}</text>
62
+ <line x1="40" y1="80" x2="160" y2="80" stroke="var(--color-muted)" stroke-dasharray="2 4" />
63
+ </svg>
64
+
65
+ <div style="
66
+ font-family: var(--font-display);
67
+ font-weight: 500;
68
+ font-size: 56px;
69
+ margin-top: 24px;
70
+ ">${c.name}</div>
71
+
72
+ <div style="
73
+ font-family: var(--font-mono);
74
+ font-size: 14px;
75
+ margin-top: 16px;
76
+ letter-spacing: 0.15em;
77
+ color: var(--cyan);
78
+ ">&#9698; ${c.metric}</div>
79
+ </div>`,
80
+ )
81
+ .join("");
82
+
83
+ el.innerHTML = `
84
+ <div style="
85
+ position: relative;
86
+ height: 100%;
87
+ background: var(--color-bg);
88
+ color: var(--color-fg);
89
+ font-family: var(--font-body);
90
+ overflow: hidden;
91
+ ">
92
+ <div style="
93
+ position: absolute; inset: 0; pointer-events: none;
94
+ background:
95
+ linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 64px 64px,
96
+ linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 64px 64px;
97
+ "></div>
98
+
99
+ <div data-ref="frame" style="
100
+ position: absolute;
101
+ inset: var(--safe-y) var(--safe-x);
102
+ border: 1px solid var(--color-border);
103
+ opacity: 0;
104
+ ">
105
+ ${cornerTicks()}
106
+
107
+ <div data-ref="header" style="position: absolute; left: 80px; top: 100px; opacity: 0;">
108
+ <div style="
109
+ font-family: var(--font-mono);
110
+ font-size: 13px;
111
+ letter-spacing: 0.25em;
112
+ color: var(--color-accent);
113
+ margin-bottom: 18px;
114
+ ">&#9698; FIG. 07 &middot; PRIMITIVES (3)</div>
115
+ <div style="
116
+ font-family: var(--font-display);
117
+ font-weight: 500;
118
+ font-size: 84px;
119
+ ">Three primitives.</div>
120
+ </div>
121
+
122
+ <div style="
123
+ position: absolute; left: 80px; right: 80px; top: 380px;
124
+ display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px;
125
+ ">
126
+ ${cardHtml}
127
+ </div>
128
+ </div>
129
+
130
+ <div data-ref="coord" style="
131
+ position: absolute; left: var(--safe-x); right: var(--safe-x); bottom: 28px;
132
+ display: flex; gap: 32px;
133
+ font-family: var(--font-mono);
134
+ font-size: 12px;
135
+ color: var(--color-muted);
136
+ letter-spacing: 0.1em;
137
+ opacity: 0;
138
+ ">
139
+ <span>X 1240.00</span><span>Y 360.00</span><span>T 0.00s</span>
140
+ <span style="margin-left: auto;">UNIT: PX &middot; SCALE 1:1</span>
141
+ </div>
142
+ </div>
143
+ `;
144
+ },
145
+
146
+ async play(ctx) {
147
+ const frame = host?.querySelector('[data-ref="frame"]') as HTMLElement;
148
+ const header = host?.querySelector('[data-ref="header"]') as HTMLElement;
149
+ const coord = host?.querySelector('[data-ref="coord"]') as HTMLElement;
150
+
151
+ const ease = "cubic-bezier(0.2, 0.8, 0.2, 1)";
152
+ const opts = { fill: "forwards" as const, easing: ease };
153
+
154
+ frame.animate([{ opacity: 0 }, { opacity: 1 }], {
155
+ ...opts,
156
+ duration: 360,
157
+ });
158
+
159
+ coord.animate([{ opacity: 0 }, { opacity: 1 }], {
160
+ ...opts,
161
+ duration: 300,
162
+ delay: 100,
163
+ });
164
+
165
+ header.animate(
166
+ [
167
+ { opacity: 0, transform: "translateY(8px)" },
168
+ { opacity: 1, transform: "translateY(0)" },
169
+ ],
170
+ { ...opts, duration: 360, delay: 200 },
171
+ );
172
+
173
+ for (let i = 0; i < 3; i++) {
174
+ const card = host?.querySelector(`[data-ref="card${i}"]`) as HTMLElement;
175
+ card.animate(
176
+ [
177
+ { opacity: 0, transform: "translateY(16px)" },
178
+ { opacity: 1, transform: "translateY(0)" },
179
+ ],
180
+ { ...opts, duration: 360, delay: 600 + i * 150 },
181
+ );
182
+ }
183
+
184
+ await ctx.waitForNext();
185
+ },
186
+
187
+ unmount() {
188
+ host = null;
189
+ },
190
+ });
@@ -0,0 +1,159 @@
1
+ import { defineSegment } from "videowright";
2
+
3
+ let host: HTMLElement | null = null;
4
+
5
+ function cornerTicks() {
6
+ return `
7
+ <div style="position: absolute; left: -1px; top: -1px; width: 24px; height: 24px;">
8
+ <div style="position: absolute; left: 0; top: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
9
+ <div style="position: absolute; left: 0; top: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
10
+ </div>
11
+ <div style="position: absolute; right: -1px; top: -1px; width: 24px; height: 24px;">
12
+ <div style="position: absolute; right: 0; top: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
13
+ <div style="position: absolute; right: 0; top: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
14
+ </div>
15
+ <div style="position: absolute; left: -1px; bottom: -1px; width: 24px; height: 24px;">
16
+ <div style="position: absolute; left: 0; bottom: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
17
+ <div style="position: absolute; left: 0; bottom: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
18
+ </div>
19
+ <div style="position: absolute; right: -1px; bottom: -1px; width: 24px; height: 24px;">
20
+ <div style="position: absolute; right: 0; bottom: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
21
+ <div style="position: absolute; right: 0; bottom: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
22
+ </div>`;
23
+ }
24
+
25
+ export default defineSegment({
26
+ id: "motion-engineering-sample-kinetic",
27
+ advances: [2.5, 5.0],
28
+ voiceover:
29
+ "Kinetic statements in Motion Engineering. Words reveal one by one, each bracketed with tick marks. The last word is boxed in amber.",
30
+
31
+ mount(el) {
32
+ host = el;
33
+
34
+ const words = ["Most", "agents", "fail", "because", "they", "forget."];
35
+ const wordHtml = words
36
+ .map(
37
+ (w, i) => `
38
+ <span data-ref="word${i}" style="
39
+ display: inline-block;
40
+ position: relative;
41
+ margin-right: 30px;
42
+ font-family: var(--font-display);
43
+ font-weight: 500;
44
+ font-size: 120px;
45
+ line-height: 1.0;
46
+ opacity: 0;
47
+ ${i === words.length - 1 ? "color: var(--color-accent);" : ""}
48
+ ">
49
+ <span style="position: absolute; top: -14px; left: 0; right: 0; height: 1px; background: var(--color-muted);"></span>
50
+ <span style="position: absolute; top: -14px; left: 0; width: 1px; height: 12px; background: var(--color-muted);"></span>
51
+ <span style="position: absolute; top: -14px; right: 0; width: 1px; height: 12px; background: var(--color-muted);"></span>
52
+ <span style="position: absolute; bottom: -14px; left: 0; right: 0; height: 1px; background: var(--color-muted);"></span>
53
+ <span style="position: absolute; bottom: -14px; left: 0; width: 1px; height: 12px; background: var(--color-muted);"></span>
54
+ <span style="position: absolute; bottom: -14px; right: 0; width: 1px; height: 12px; background: var(--color-muted);"></span>
55
+ ${w}
56
+ ${i === words.length - 1 ? '<span style="position: absolute; inset: -12px -8px; border: 1.5px solid var(--color-accent);"></span>' : ""}
57
+ </span>`,
58
+ )
59
+ .join("");
60
+
61
+ el.innerHTML = `
62
+ <div style="
63
+ position: relative;
64
+ height: 100%;
65
+ background: var(--color-bg);
66
+ color: var(--color-fg);
67
+ font-family: var(--font-body);
68
+ overflow: hidden;
69
+ ">
70
+ <div style="
71
+ position: absolute; inset: 0; pointer-events: none;
72
+ background:
73
+ linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 64px 64px,
74
+ linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 64px 64px;
75
+ "></div>
76
+
77
+ <div data-ref="frame" style="
78
+ position: absolute;
79
+ inset: var(--safe-y) var(--safe-x);
80
+ border: 1px solid var(--color-border);
81
+ opacity: 0;
82
+ ">
83
+ ${cornerTicks()}
84
+
85
+ <div data-ref="tag" style="
86
+ position: absolute; left: 80px; top: 100px;
87
+ font-family: var(--font-mono);
88
+ font-size: 14px; letter-spacing: 0.25em;
89
+ color: var(--color-accent);
90
+ opacity: 0;
91
+ ">&#9698; DOCUMENT 03 &middot; PREMISE</div>
92
+
93
+ <div style="position: absolute; left: 80px; top: 240px; width: 1500px;">
94
+ ${wordHtml}
95
+ </div>
96
+ </div>
97
+
98
+ <div data-ref="coord" style="
99
+ position: absolute; left: var(--safe-x); right: var(--safe-x); bottom: 28px;
100
+ display: flex; gap: 32px;
101
+ font-family: var(--font-mono);
102
+ font-size: 12px;
103
+ color: var(--color-muted);
104
+ letter-spacing: 0.1em;
105
+ opacity: 0;
106
+ ">
107
+ <span>X 1240.00</span><span>Y 360.00</span><span>T 0.00s</span>
108
+ <span style="margin-left: auto;">UNIT: PX &middot; SCALE 1:1</span>
109
+ </div>
110
+ </div>
111
+ `;
112
+ },
113
+
114
+ async play(ctx) {
115
+ const frame = host?.querySelector('[data-ref="frame"]') as HTMLElement;
116
+ const tag = host?.querySelector('[data-ref="tag"]') as HTMLElement;
117
+ const coord = host?.querySelector('[data-ref="coord"]') as HTMLElement;
118
+
119
+ const ease = "cubic-bezier(0.2, 0.8, 0.2, 1)";
120
+ const opts = { fill: "forwards" as const, easing: ease };
121
+
122
+ frame.animate([{ opacity: 0 }, { opacity: 1 }], {
123
+ ...opts,
124
+ duration: 360,
125
+ });
126
+
127
+ coord.animate([{ opacity: 0 }, { opacity: 1 }], {
128
+ ...opts,
129
+ duration: 300,
130
+ delay: 100,
131
+ });
132
+
133
+ tag.animate(
134
+ [
135
+ { opacity: 0, transform: "translateY(8px)" },
136
+ { opacity: 1, transform: "translateY(0)" },
137
+ ],
138
+ { ...opts, duration: 300, delay: 300 },
139
+ );
140
+
141
+ const wordCount = 6;
142
+ for (let i = 0; i < wordCount; i++) {
143
+ const word = host?.querySelector(`[data-ref="word${i}"]`) as HTMLElement;
144
+ word.animate(
145
+ [
146
+ { opacity: 0, transform: "translateY(14px)" },
147
+ { opacity: 1, transform: "translateY(0)" },
148
+ ],
149
+ { ...opts, duration: 300, delay: 500 + i * 180 },
150
+ );
151
+ }
152
+
153
+ await ctx.waitForNext();
154
+ },
155
+
156
+ unmount() {
157
+ host = null;
158
+ },
159
+ });