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,14 @@
1
+ # Audio Plan
2
+
3
+ ## Plan
4
+
5
+ No audio configured. The hello-world template ships silent — `videowright
6
+ render` produces a video-only MP4 when `default_audio_track` is unset on the
7
+ timeline. To add audio, run `videowright script --write` to generate a
8
+ voiceover script, send it to your TTS provider (or use ElevenLabs via the
9
+ skill), then place the result in `audio/originals/voiceovers/v1/` and build a
10
+ track under `audio/tracks/v1/`.
11
+
12
+ ## Log
13
+
14
+ (No entries yet.)
@@ -0,0 +1,69 @@
1
+ import { defineSegment } from "videowright";
2
+
3
+ let host: HTMLElement | null = null;
4
+
5
+ export default defineSegment({
6
+ id: "hello-intro",
7
+ // 2 advances: first resolves waitForNext at 2s, second transitions to next segment at 4s
8
+ advances: [2.0, 4.0],
9
+ voiceover: "Welcome to Videowright. Build animated videos with HTML, CSS, and JavaScript.",
10
+
11
+ mount(el) {
12
+ host = el;
13
+ el.innerHTML = `
14
+ <div style="
15
+ display: flex;
16
+ flex-direction: column;
17
+ align-items: center;
18
+ justify-content: center;
19
+ height: 100%;
20
+ background: var(--color-bg);
21
+ color: var(--color-fg);
22
+ font-family: var(--font-display);
23
+ ">
24
+ <h1 style="
25
+ font-size: 4rem;
26
+ font-weight: 700;
27
+ margin: 0;
28
+ opacity: 0;
29
+ " data-ref="title">Hello Videowright</h1>
30
+ <p style="
31
+ font-family: var(--font-body);
32
+ font-size: 1.5rem;
33
+ color: var(--color-fg);
34
+ margin-top: 1rem;
35
+ opacity: 0;
36
+ " data-ref="subtitle">Built with HTML, CSS, and JavaScript</p>
37
+ </div>
38
+ `;
39
+ },
40
+
41
+ async play(ctx) {
42
+ const title = host?.querySelector('[data-ref="title"]') as HTMLElement;
43
+ const subtitle = host?.querySelector('[data-ref="subtitle"]') as HTMLElement;
44
+
45
+ // Animate title in
46
+ title.animate(
47
+ [
48
+ { opacity: 0, transform: "translateY(20px)" },
49
+ { opacity: 1, transform: "translateY(0)" },
50
+ ],
51
+ { duration: 600, fill: "forwards", easing: "ease-out" },
52
+ );
53
+
54
+ // Animate subtitle in — staggered via WAAPI delay (render-safe)
55
+ subtitle.animate(
56
+ [
57
+ { opacity: 0, transform: "translateY(10px)" },
58
+ { opacity: 1, transform: "translateY(0)" },
59
+ ],
60
+ { duration: 400, delay: 400, fill: "forwards", easing: "ease-out" },
61
+ );
62
+
63
+ await ctx.waitForNext(); // Beat 1: content fully revealed, wait for user to advance
64
+ },
65
+
66
+ unmount() {
67
+ host = null;
68
+ },
69
+ });
@@ -0,0 +1,71 @@
1
+ import { defineSegment } from "videowright";
2
+
3
+ let host: HTMLElement | null = null;
4
+
5
+ export default defineSegment({
6
+ id: "hello-outro",
7
+ advances: [3.0],
8
+ voiceover: "Tell the agent what to change next. Swap the style, add content, and make it yours.",
9
+
10
+ mount(el) {
11
+ host = el;
12
+ el.innerHTML = `
13
+ <div style="
14
+ display: flex;
15
+ flex-direction: column;
16
+ align-items: center;
17
+ justify-content: center;
18
+ height: 100%;
19
+ background: var(--color-bg);
20
+ color: var(--color-fg);
21
+ font-family: var(--font-body);
22
+ ">
23
+ <h1 style="
24
+ font-family: var(--font-display);
25
+ font-size: 3rem;
26
+ font-weight: 700;
27
+ margin: 0;
28
+ opacity: 0;
29
+ " data-ref="heading">Start Building</h1>
30
+ <p style="
31
+ font-size: 1.25rem;
32
+ color: var(--color-fg);
33
+ margin-top: 1.5rem;
34
+ max-width: 600px;
35
+ text-align: center;
36
+ line-height: 1.6;
37
+ opacity: 0;
38
+ " data-ref="cta">Tell the agent what to change next. Swap the style, add content, and make it yours.
39
+ </p>
40
+ </div>
41
+ `;
42
+ },
43
+
44
+ async play(ctx) {
45
+ const heading = host?.querySelector('[data-ref="heading"]') as HTMLElement;
46
+ const cta = host?.querySelector('[data-ref="cta"]') as HTMLElement;
47
+
48
+ // Animate heading in
49
+ heading.animate(
50
+ [
51
+ { opacity: 0, transform: "scale(0.9)" },
52
+ { opacity: 1, transform: "scale(1)" },
53
+ ],
54
+ { duration: 500, fill: "forwards", easing: "ease-out" },
55
+ );
56
+
57
+ // Animate call-to-action in — staggered via WAAPI delay (render-safe)
58
+ cta.animate([{ opacity: 0 }, { opacity: 1 }], {
59
+ duration: 400,
60
+ delay: 500,
61
+ fill: "forwards",
62
+ });
63
+
64
+ // No waitForNext -- last segment. play() resolves after the animation.
65
+ // The player shows "end of timeline" in the HUD.
66
+ },
67
+
68
+ unmount() {
69
+ host = null;
70
+ },
71
+ });
@@ -0,0 +1,15 @@
1
+ import "../../styles/editorial-mono/tokens.css";
2
+ import type { Timeline } from "videowright";
3
+
4
+ const timeline: Timeline = {
5
+ meta: {
6
+ title: "Hello Videowright",
7
+ },
8
+ segments: [
9
+ { id: "hello-intro" },
10
+ { id: "editorial-mono-sample-kinetic", transition: "fade" },
11
+ { id: "hello-outro", transition: "fade" },
12
+ ],
13
+ };
14
+
15
+ export default timeline;
@@ -0,0 +1,10 @@
1
+ # Hello Videowright
2
+
3
+ ## hello-intro
4
+ Welcome to Videowright. Build animated videos with HTML, CSS, and JavaScript.
5
+
6
+ ## editorial-mono-sample-kinetic
7
+ Kinetic statements in Editorial Mono. Words enter one at a time, the last marked in red.
8
+
9
+ ## hello-outro
10
+ Tell the agent what to change next. Swap the style, add content, and make it yours.
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "my-videowright-project",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "npx videowright dev",
8
+ "render": "npx videowright render"
9
+ }
10
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "strict": true,
4
+ "target": "ES2022",
5
+ "module": "ESNext",
6
+ "moduleResolution": "Bundler",
7
+ "esModuleInterop": true,
8
+ "skipLibCheck": true,
9
+ "forceConsistentCasingInFileNames": true,
10
+ "isolatedModules": true,
11
+ "verbatimModuleSyntax": true,
12
+ "resolveJsonModule": true,
13
+ "noEmit": true
14
+ },
15
+ "include": [
16
+ "segments/**/*",
17
+ "components/**/*",
18
+ "transitions/**/*",
19
+ "styles/**/*",
20
+ "videos/**/*",
21
+ "videowright.config.ts"
22
+ ]
23
+ }
@@ -0,0 +1,124 @@
1
+ ---
2
+ title: Editorial Mono
3
+ slug: editorial-mono
4
+ picker_description: 'Black ink on cream paper. One red accent. Reads like a magazine.'
5
+ font_sources:
6
+ - https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap
7
+ - https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600&display=swap
8
+ - https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap
9
+ mood: [serious, considered, literary, high-contrast, calm]
10
+ good_for:
11
+ - AI/research lab launches
12
+ - Fintech and B2B product introductions
13
+ - Thought-leadership essays turned to video
14
+ - Annual reports and investor updates
15
+ - Long-form narrative explainers
16
+ bad_for:
17
+ - Consumer apps that need warmth or whimsy
18
+ - Hype reels, sizzle videos, social-media shorts
19
+ - Anything that needs to feel fast, loud, or trendy
20
+ - Heavily data-driven dashboards (use Swiss Console)
21
+ tags: [editorial, serif, minimal, print, high-contrast, light-mode]
22
+ references: [Bloomberg Businessweek, Stripe Press, The Browser Company, The Atlantic]
23
+ ---
24
+
25
+ # Editorial Mono — STYLE.md
26
+
27
+ Agent-facing guide. Read this before composing scenes.
28
+
29
+ ---
30
+
31
+ ## Identity
32
+
33
+ Editorial Mono is the visual register of a thoughtful long-form magazine — *Bloomberg Businessweek*, *Stripe Press*, *The Atlantic*. Black ink on warm cream paper. High-contrast serif display set against a clean grotesk body. A single red accent, used like an editor's mark. The page breathes.
34
+
35
+ **Mood:** serious, considered, literary, calm, high-contrast.
36
+
37
+ ## When to use
38
+
39
+ - AI/research launches, fintech intros, B2B product announcements
40
+ - Thought-leadership essays adapted to video
41
+ - Annual reports, investor updates, founder letters
42
+ - Long-form narrative explainers
43
+
44
+ ## When to avoid
45
+
46
+ - Consumer apps that need warmth or whimsy → use Risograph
47
+ - Dev tools, dashboards, data-dense products → use Swiss Console
48
+ - Anything dark-mode native → use Neon Terminal
49
+ - Sizzle reels, social-media shorts, hype videos
50
+
51
+ ---
52
+
53
+ ## Layout principles
54
+
55
+ - **Anchor to the left.** Most scenes left-align headlines on a 128px safe margin. Centered layouts are reserved for title cards and section headers.
56
+ - **Generous negative space.** A scene with 30% of the canvas filled is the *norm*, not minimalism. If you find yourself filling a scene, cut content.
57
+ - **One focal element per scene.** A headline, or a stat, or a quote — never two competing equals.
58
+ - **Hairline rules as structure.** A 1px rule across the top or bottom of the safe area frames the page like a magazine.
59
+ - **Small labels carry their weight.** A `VOL. 01 / CHAPTER 03` label in mono uppercase at 14px sets the editorial register before the headline does.
60
+
61
+ ## Color application
62
+
63
+ - **Cream `--color-bg` everywhere.** White (`#fff`) is forbidden — it kills the paper feel.
64
+ - **Ink `--color-fg` for all primary type.** Never pure black.
65
+ - **Red `--color-accent` appears once per scene, maximum.** Use it for: a single word emphasis, an underline draw, a small symbol, an arrow tip. Never for whole headlines, never for backgrounds.
66
+ - **Muted `--color-muted` for labels, captions, and secondary type only.**
67
+ - **Surface `--color-surface` is for the rare card or callout** — almost imperceptible against the page.
68
+
69
+ ## Type rules
70
+
71
+ - **Display = Instrument Serif.** Use the italic for emphasis — its italic is iconic. Display sizes range 96–220px.
72
+ - **Body = Geist.** Medium (500) for headlines that need a grotesk; Regular (400) for body. Body sizes range 24–40px.
73
+ - **Mono = JetBrains Mono.** Uppercase, tracked +0.08em, for editorial labels only (`VOL. 01`, `CHAPTER ONE`, timestamps, page numbers). Never for body copy.
74
+ - **Line breaks for rhythm, not for width.** Break a headline at a comma or a verb, not at the edge of the column.
75
+ - **Emphasis hierarchy:** italic (serif) > color (red accent) > weight. Never underline for emphasis (reserve underline for the kinetic statement's draw-on motion).
76
+ - **No ALL CAPS in body type.** Reserve uppercase for the mono labels only.
77
+
78
+ ## Motion principles
79
+
80
+ - **Entries are subtle and downward-settling.** Text fades in while drifting up 16px. Duration `--duration-normal` (480ms). Easing `--ease-out` (cubic-bezier(0.16, 1, 0.3, 1)).
81
+ - **Stagger increments at `--stagger` (80ms).** A four-item bullet list reveals over ~800ms total.
82
+ - **Exits cut.** Almost never animate out — a hard cut between scenes is faster and more print-like.
83
+ - **Scene transitions are dip-to-cream.** Fade through `--color-bg` (no white flash) for 200ms between scenes.
84
+ - **The red accent draws.** Underlines, marks, and arrows draw in left-to-right or top-down over `--duration-normal`.
85
+ - **Forbidden:** bounce, spring, overshoot, elastic. Anything that feels "designed" rather than "set."
86
+ - **Camera:** none. The page does not move.
87
+
88
+ ## Pacing
89
+
90
+ Editorial Mono is **slow**. Scenes hold 3.5–5s by default. A scene with one headline and no other elements can hold 6s and feel right. If a script is fast-cut, this is the wrong template.
91
+
92
+ ## Per-scene recipes
93
+
94
+ Each recipe gives sizing, max element count, and motion beat. See `reference/scenes.html` for rendered examples.
95
+
96
+ | Scene | Recipe |
97
+ |---|---|
98
+ | **Title card** | Top-left mono label (`VOL. XX / YYYY`, 14px). Centered or top-left display headline at 180–220px serif. One subtitle line at 32px Geist Regular below. Optional rule above. Headline enters 480ms after label; subtitle 80ms after headline. |
99
+ | **Section header** | Top mono label (`CHAPTER ONE`). Centered display at 140px, often italic. One rule above, one below the headline. Holds 4s. |
100
+ | **Kinetic statement** | One sentence, 80–110px serif italic, left-aligned, breaks mid-line for rhythm. One word per beat enters fading-up at `--stagger` intervals. Last word may get a red underline draw on exit. |
101
+ | **Bullet reveal** | Left rail. Mono numerals (`01`, `02`, …) in muted color. Each item: numeral + em dash + 40px Geist Medium label. Stagger 120ms (slightly longer than default — list items breathe). Max 5 items. |
102
+ | **Stat card** | One number at 320px serif, left-aligned in column 1. Right column holds 40px Geist label (1–2 lines). Number counts up over `--duration-slow` (900ms). Red underline draws under the number on hold. |
103
+ | **Feature card** | Single feature. Small icon (or numeral) top-left. Display name at 80px serif. 24px Geist body description, max 2 lines. Lots of negative space below. |
104
+ | **Card grid** | 3 items in a row, gutters at `--space-lg` (64px). Each card: small label (mono), name (40px serif), one-line description (20px Geist). Cards enter in staggered sequence. |
105
+ | **UI / product showcase** | Centered product mock at ~60% of canvas. Hairline rule frame. 1–2 callouts with arrow leaders in red, label set in mono. Arrows draw in after the mock settles. |
106
+ | **Content card** | Generic catch-all. Top-left section label (mono). Headline at 80px serif. Body paragraph at 28px Geist Regular, max-width ~900px, line-height 1.4. |
107
+ | **CTA / outro** | Top mono label optional. Central headline at 100px serif italic. Below: a call-to-action line (URL or imperative) with red accent on the destination. Logo placeholder bottom-left or centered. |
108
+
109
+ ### Connective elements
110
+
111
+ - **Lower third:** mono label (uppercase, tracked) over the bottom safe area, with a hairline rule above. Used when narration runs over a held visual. Enters and exits with a fade.
112
+ - **Scene transition:** dip-to-cream (200ms) between most scenes. Hard cut allowed for emphasis.
113
+ - **Ambient layer:** none. The page does not move.
114
+
115
+ ## Pitfalls
116
+
117
+ - **Don't use pure white.** Cream only. White kills the identity instantly.
118
+ - **Don't use red for more than one element per scene.** It's an accent, not a color in the palette.
119
+ - **Don't fill the canvas.** If you're tempted to add a fourth element, cut one of the first three.
120
+ - **Don't center body type.** Center headlines, never paragraphs.
121
+ - **Don't use bounce or overshoot in motion.** This style does not jiggle.
122
+ - **Don't use Title Case for body labels.** Mono labels are UPPERCASE; everything else sentence case.
123
+ - **Don't add gradients, shadows, glows, or textures.** Flat ink on flat paper.
124
+ - **Don't use emoji.** Ever.
@@ -0,0 +1,85 @@
1
+ # Editorial Mono — Brand
2
+
3
+ Human-readable rationale for the token values in `tokens.css`. Read together.
4
+
5
+ ---
6
+
7
+ ## Color
8
+
9
+ **`--color-bg` = `#F2EFE8` (warm cream).** Print-feeling, slightly yellow-warm.
10
+ Replaces pure white because white reads as "screen" — cream reads as "page."
11
+ Used edge-to-edge on every scene, no exceptions.
12
+
13
+ **`--color-fg` = `#14110E` (near-black ink).** Avoids pure black for the same
14
+ reason cream replaces white — pure black is screen-flat, this is ink on paper.
15
+ Primary type, hairline rules, logo marks.
16
+
17
+ **`--color-accent` = `#C8392C` (editorial red).** The kind of red an editor
18
+ marks the page with — saturated, slightly warm, never neon. Used as an
19
+ emphasis tool, not a fill. Underlines, single-word color, arrow tips, the
20
+ period at the end of a headline. **Once per scene, maximum.**
21
+
22
+ **`--color-muted` = `#7B756B` (warm gray).** For mono labels, captions,
23
+ secondary type, dim numerals. Warm-toned so it sits in the same family as
24
+ the cream background.
25
+
26
+ **`--color-border` = `#D9D3C7` (subtle warm).** For hairline rules and
27
+ unobtrusive separators. The rule is meant to be felt, not read.
28
+
29
+ **`--color-surface` = `#EBE7DD` (slightly darker paper).** For the rare
30
+ card or callout box. Almost imperceptible against the page — that's the
31
+ point. Editorial Mono does not use elevated surfaces.
32
+
33
+ ## Typography
34
+
35
+ **Display: Instrument Serif.** A high-contrast modern serif with a striking
36
+ italic. Built for editorial display use. Free, web-available. Pairs with a
37
+ clean grotesk body without competing.
38
+
39
+ **Body: Geist.** Vercel's open-source grotesk. Neutral but with personality.
40
+ Reads small as well as large. Not Inter — Inter is overused.
41
+
42
+ **Mono: JetBrains Mono.** For editorial labels only. Tracked +0.08em and set
43
+ in UPPERCASE, it gives a tertiary structural layer (`VOL. 01 / CHAPTER 03`).
44
+
45
+ ## Spacing
46
+
47
+ Spacing is opinionated and on a doubling scale (`16 / 32 / 64 / 128`) — the
48
+ same proportional thinking as a print grid. Safe-area margins are set to
49
+ `--space-xl` (128px) on the long axis and `--space-lg × 1.5` (96px) on the
50
+ short axis, which gives every scene the same negative-space ratio as a
51
+ hardcover page.
52
+
53
+ ## Geometry
54
+
55
+ `--radius-sm` and `--radius-md` are deliberately small (2 and 4 px). The page
56
+ does not have rounded corners. The radii exist for tiny details — chip
57
+ labels, button hint hovers — not for cards. Cards have hairline borders
58
+ instead.
59
+
60
+ `--rule-weight` is `1px` flat. Two-pixel rules feel heavy and the editorial
61
+ register depends on hairlines.
62
+
63
+ ## Motion
64
+
65
+ **Durations:**
66
+ - `--duration-fast` `220ms` — small things (cursor blinks, accent marks)
67
+ - `--duration-normal` `480ms` — most entries (text, cards)
68
+ - `--duration-slow` `900ms` — emphasis moments (stat count-up, underline draw)
69
+
70
+ **Easing:**
71
+ - `--ease-out` `cubic-bezier(0.16, 1, 0.3, 1)` — easeOutQuart. Settles down.
72
+ - `--ease-in` `cubic-bezier(0.7, 0, 0.84, 0)` — for the rare exit.
73
+
74
+ **Stagger:** `80ms` base. Lists use `120ms` for breathing room.
75
+
76
+ **Scene hold:** `4s` default. Headlines may hold up to `6s`. Faster than this
77
+ breaks the editorial register.
78
+
79
+ ## What this brand is not
80
+
81
+ - Not a "modern minimal" template. The negative space is on purpose, but the
82
+ serif and the red are warm and opinionated.
83
+ - Not a luxury or fashion register — no metallic, no jewel-tone, no foil.
84
+ - Not "marketing site for a startup." It's "the magazine the marketing site
85
+ links to."