@vanillaskyai/video 0.8.8 → 0.9.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 (175) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/PUBLIC-API.md +5 -8
  3. package/dist/{builtin-server-CUYPIDE7.js → builtin-server-HW6HGXCZ.js} +2 -2
  4. package/dist/{catalog-types-BIhSpOWK.d.ts → catalog-types-WTbLP6Jh.d.ts} +5 -1
  5. package/dist/chapter-title-YRLIQY3V.js +7 -0
  6. package/dist/check-runtime.js +6 -15
  7. package/dist/{chunk-2USVB3CY.js → chunk-3ZTEFJIR.js} +285 -178
  8. package/dist/chunk-4YM2M62S.js +13 -0
  9. package/dist/chunk-77VY4O7A.js +390 -0
  10. package/dist/{chunk-MMUXVA47.js → chunk-7M56IUUX.js} +9 -8
  11. package/dist/chunk-7NZOMTAL.js +63 -0
  12. package/dist/{chunk-2DOLF4QN.js → chunk-AUPC6MDK.js} +12 -14
  13. package/dist/{chunk-352ZZCET.js → chunk-EGVQODKU.js} +2 -2
  14. package/dist/chunk-EWWCQFTI.js +18 -0
  15. package/dist/{chunk-MXZSDGZQ.js → chunk-G7IZBBWF.js} +14 -9
  16. package/dist/{chunk-KT3M7KDL.js → chunk-HKUI5BTB.js} +3 -3
  17. package/dist/{chunk-LMG3GHLL.js → chunk-IQMYK5DX.js} +29 -3
  18. package/dist/chunk-LH4BPALA.js +564 -0
  19. package/dist/{chunk-OWBT45EN.js → chunk-MQILEEXC.js} +1 -1
  20. package/dist/chunk-MXEYPK7M.js +552 -0
  21. package/dist/{chunk-AITKH6QT.js → chunk-OR52UMSF.js} +13 -39
  22. package/dist/{chunk-5SLENAJW.js → chunk-PAJ44TFW.js} +1 -2
  23. package/dist/{chunk-L7QGGKJ2.js → chunk-PDQFQIQW.js} +1 -1
  24. package/dist/{chunk-WJ6FLKNC.js → chunk-R3XAOMKP.js} +14 -0
  25. package/dist/{chunk-2OKB27TG.js → chunk-RXTN2CW6.js} +2 -2
  26. package/dist/{chunk-XWWLKRNU.js → chunk-TVIU23OM.js} +38 -49
  27. package/dist/{chunk-224QNWRA.js → chunk-UDIODEDK.js} +1 -5
  28. package/dist/{chunk-3VRMKFM7.js → chunk-ZDJNFA52.js} +11 -24
  29. package/dist/cinema-media-YQHSIFDA.js +11 -0
  30. package/dist/cli.js +18 -9
  31. package/dist/comparison-RZMMHZR2.js +27 -0
  32. package/dist/compose-video-TBFTONUC.js +12 -0
  33. package/dist/editorial-timeline-OZX7OS6G.js +36 -0
  34. package/dist/{events-BQ6z264n.d.ts → events-B4YCc4vc.d.ts} +1 -1
  35. package/dist/focus-cards-TJ72BT7U.js +20 -0
  36. package/dist/index.d.ts +4 -6
  37. package/dist/index.js +3 -7
  38. package/dist/key-figure-GYENXKH3.js +20 -0
  39. package/dist/{kit-tQnCPMOM.d.ts → kit-DrRpdn0p.d.ts} +2 -2
  40. package/dist/mobile-message-UZUPIKHD.js +49 -0
  41. package/dist/{preload-media-LJXWKTWG.js → preload-media-CFTZIMZL.js} +1 -1
  42. package/dist/quote-EW5HQA6H.js +23 -0
  43. package/dist/react.d.ts +21 -11
  44. package/dist/react.js +590 -833
  45. package/dist/scene-video-backdrop-PCTARAAJ.js +7 -0
  46. package/dist/server.d.ts +7 -8
  47. package/dist/server.js +91 -74
  48. package/dist/{system-prompt-RRXIWDDD.js → system-prompt-SYRT5DWM.js} +1 -1
  49. package/dist/template-catalog.d.ts +257 -16
  50. package/dist/template-catalog.js +1 -1
  51. package/dist/templates.d.ts +5 -5
  52. package/dist/test.d.ts +3 -3
  53. package/dist/test.js +18 -18
  54. package/dist/text-stream-LD364KBI.js +9 -0
  55. package/dist/{types-DWFO6qca.d.ts → types-CdBmNTGD.d.ts} +1 -1
  56. package/dist/{types-CEh9eUFu.d.ts → types-DdZw4GRQ.d.ts} +17 -48
  57. package/dist/validate-4OUD2CLX.js +10 -0
  58. package/docs/architecture.md +1 -1
  59. package/docs/concepts.md +1 -1
  60. package/docs/custom-templates.md +13 -28
  61. package/docs/customization.md +11 -59
  62. package/docs/getting-started.md +2 -2
  63. package/docs/immersive-interface.md +3 -4
  64. package/docs/maintainers/cinematic-migration.md +34 -0
  65. package/docs/media-and-audio.md +14 -14
  66. package/docs/motion-and-effects.md +6 -14
  67. package/docs/persistence.md +3 -3
  68. package/docs/production.md +11 -9
  69. package/docs/provider-integration.md +9 -16
  70. package/docs/reference/design-system.html +1 -1
  71. package/docs/reference/protocol.md +14 -4
  72. package/docs/testing.md +1 -1
  73. package/package.json +6 -3
  74. package/registry/items/backgrounds.json +1 -1
  75. package/registry/items/chapterTitle.json +80 -0
  76. package/registry/items/cinemaMedia.json +136 -0
  77. package/registry/items/comparison.json +101 -0
  78. package/registry/items/editorialTimeline.json +105 -0
  79. package/registry/items/focusCards.json +90 -0
  80. package/registry/items/keyFigure.json +97 -0
  81. package/registry/items/mobileMessage.json +153 -0
  82. package/registry/items/quote.json +94 -0
  83. package/registry/items/template-context.json +1 -1
  84. package/registry/items/theme.json +1 -1
  85. package/starters/video-chat/README.md +24 -26
  86. package/starters/video-chat/package.json +1 -1
  87. package/starters/video-chat/providers/video.ts +6 -5
  88. package/starters/video-chat/stock.ts +35 -151
  89. package/styles/fonts/OFL.txt +93 -0
  90. package/styles/fonts/manifest.json +66 -0
  91. package/styles/fonts/roboto-v51-cyrillic-ext.woff2 +0 -0
  92. package/styles/fonts/roboto-v51-cyrillic.woff2 +0 -0
  93. package/styles/fonts/roboto-v51-greek-ext.woff2 +0 -0
  94. package/styles/fonts/roboto-v51-greek.woff2 +0 -0
  95. package/styles/fonts/roboto-v51-latin-ext.woff2 +0 -0
  96. package/styles/fonts/roboto-v51-latin.woff2 +0 -0
  97. package/styles/fonts/roboto-v51-math.woff2 +0 -0
  98. package/styles/fonts/roboto-v51-symbols.woff2 +0 -0
  99. package/styles/fonts/roboto-v51-vietnamese.woff2 +0 -0
  100. package/styles/fonts/roboto.css +91 -0
  101. package/styles/video-chat.css +30 -22
  102. package/dist/bg-confetti-HITCGLGD.js +0 -89
  103. package/dist/bg-emoji-VU4UZYZN.js +0 -150
  104. package/dist/bg-media-L34PDQXJ.js +0 -106
  105. package/dist/brand-message-FUJ4STFO.js +0 -256
  106. package/dist/chart-bar-EGPHJATL.js +0 -310
  107. package/dist/chart-counter-5FFWQNZO.js +0 -306
  108. package/dist/chart-progress-ring-JMXQLMLC.js +0 -302
  109. package/dist/chunk-4UNKZEAT.js +0 -3575
  110. package/dist/chunk-5CDAM24P.js +0 -31
  111. package/dist/chunk-AOWSXU2K.js +0 -18
  112. package/dist/chunk-CJ7F2CE6.js +0 -104
  113. package/dist/chunk-FRN6WKHA.js +0 -185
  114. package/dist/chunk-G5JPHBX7.js +0 -336
  115. package/dist/chunk-L5BTTCZV.js +0 -97
  116. package/dist/chunk-P22HHFDK.js +0 -43
  117. package/dist/chunk-PP3MCPN4.js +0 -1998
  118. package/dist/chunk-QAAO7OAY.js +0 -19
  119. package/dist/chunk-S7HFLYNN.js +0 -35
  120. package/dist/chunk-W3VDIBGR.js +0 -217
  121. package/dist/chunk-XGRA2MUV.js +0 -242
  122. package/dist/chunk-XTOXFMLM.js +0 -105
  123. package/dist/chunk-YJJC4N4D.js +0 -761
  124. package/dist/compose-video-2NFH4DZY.js +0 -13
  125. package/dist/cta-logo-YR7LYUR5.js +0 -212
  126. package/dist/cta-media-DQJBKUO2.js +0 -221
  127. package/dist/incoming-call-54KQ7O5A.js +0 -323
  128. package/dist/infographic-before-after-ROS52GOW.js +0 -460
  129. package/dist/infographic-feature-list-E7MGUDAN.js +0 -272
  130. package/dist/infographic-problem-solution-3S6NGO5N.js +0 -343
  131. package/dist/infographic-stat-row-SYB7AB7H.js +0 -247
  132. package/dist/infographic-steps-KCE6JWE2.js +0 -406
  133. package/dist/prompt-input-MHX4O42G.js +0 -239
  134. package/dist/reaction-SLEGR3BE.js +0 -122
  135. package/dist/scene-video-backdrop-XFPX4O3I.js +0 -10
  136. package/dist/showcase-code-2HLAVKBM.js +0 -357
  137. package/dist/showcase-phone-Q4HEO4LH.js +0 -278
  138. package/dist/showcase-terminal-DL45LUFG.js +0 -312
  139. package/dist/showcase-web-2QZO73FZ.js +0 -396
  140. package/dist/social-conversation-75SD2637.js +0 -695
  141. package/dist/social-milestone-GEFUQSBF.js +0 -296
  142. package/dist/social-notification-FJ5VHVLK.js +0 -247
  143. package/dist/social-review-stack-KXQCKFRP.js +0 -242
  144. package/dist/social-testimonial-JZ7CHC7S.js +0 -287
  145. package/dist/social-tweet-UCDXM25F.js +0 -298
  146. package/dist/text-stream-54LXABJW.js +0 -10
  147. package/dist/validate-T7GBU2YF.js +0 -8
  148. package/registry/items/barChart.json +0 -245
  149. package/registry/items/beforeAfter.json +0 -180
  150. package/registry/items/bigNumber.json +0 -232
  151. package/registry/items/brandMessage.json +0 -164
  152. package/registry/items/cardList.json +0 -214
  153. package/registry/items/chatMessenger.json +0 -151
  154. package/registry/items/chatWhatsapp.json +0 -151
  155. package/registry/items/codeEditor.json +0 -191
  156. package/registry/items/confetti.json +0 -107
  157. package/registry/items/ctaLogo.json +0 -167
  158. package/registry/items/ctaMedia.json +0 -200
  159. package/registry/items/emojiBurst.json +0 -101
  160. package/registry/items/incomingCall.json +0 -177
  161. package/registry/items/media.json +0 -187
  162. package/registry/items/milestone.json +0 -212
  163. package/registry/items/notification.json +0 -189
  164. package/registry/items/phoneMockup.json +0 -261
  165. package/registry/items/problemSolution.json +0 -193
  166. package/registry/items/progressRing.json +0 -206
  167. package/registry/items/promptInput.json +0 -155
  168. package/registry/items/reaction.json +0 -176
  169. package/registry/items/reviewStack.json +0 -231
  170. package/registry/items/steps.json +0 -215
  171. package/registry/items/terminal.json +0 -219
  172. package/registry/items/testimonial.json +0 -171
  173. package/registry/items/tripleStats.json +0 -235
  174. package/registry/items/tweet.json +0 -210
  175. package/registry/items/webMockup.json +0 -280
@@ -1,24 +1,265 @@
1
- import { S as SceneTemplateMetadata, T as TemplateFamily, a as TemplateJob, b as TemplateRegister, c as TemplateTimingMetadata } from './catalog-types-BIhSpOWK.js';
1
+ import { S as SceneTemplateMetadata, b as TemplateTimingMetadata } from './catalog-types-WTbLP6Jh.js';
2
2
 
3
- type BuiltinTemplateId = "media" | "reaction" | "confetti" | "emojiBurst" | "bigNumber" | "barChart" | "progressRing" | "phoneMockup" | "webMockup" | "codeEditor" | "terminal" | "tweet" | "notification" | "chatMessenger" | "chatWhatsapp" | "milestone" | "reviewStack" | "testimonial" | "incomingCall" | "brandMessage" | "promptInput" | "beforeAfter" | "tripleStats" | "problemSolution" | "cardList" | "steps" | "ctaLogo" | "ctaMedia";
3
+ declare const BUILTIN_TEMPLATE_SCHEMAS: {
4
+ readonly cinemaMedia: {
5
+ readonly type: "object";
6
+ readonly properties: {
7
+ readonly mediaKeyword: {
8
+ readonly type: "string";
9
+ readonly format: "stock-media-keyword";
10
+ readonly minLength: 1;
11
+ readonly maxLength: 80;
12
+ readonly description: "2–8 word literal subject/action search intent, maximum 80 characters. Host resolves URLs.";
13
+ readonly examples: readonly ["Ocean waves breaking on a rocky shore"];
14
+ };
15
+ readonly mediaUrl: {
16
+ readonly type: "string";
17
+ readonly format: "uri";
18
+ readonly description: "Host-only approved photo or video URL.";
19
+ readonly default: "";
20
+ };
21
+ readonly mediaType: {
22
+ readonly type: "string";
23
+ readonly enum: readonly ["photo", "video"];
24
+ readonly default: "video";
25
+ readonly description: "Host-resolved asset kind.";
26
+ };
27
+ readonly mediaPoster: {
28
+ readonly type: "string";
29
+ readonly format: "uri";
30
+ readonly description: "Host-only approved poster URL for video decoding.";
31
+ readonly default: "";
32
+ };
33
+ readonly shotDirection: {
34
+ readonly type: "string";
35
+ readonly maxLength: 220;
36
+ readonly description: "Optional action, framing and continuity for generation. Preserve the subject; do not request rendered text.";
37
+ };
38
+ readonly mediaSource: {
39
+ readonly type: "string";
40
+ readonly enum: readonly ["generate", "stock"];
41
+ readonly description: "Generate distinctive illustrative shots; use approved stock for familiar observable subjects.";
42
+ };
43
+ readonly fallbackText: {
44
+ readonly type: "string";
45
+ readonly maxLength: 65;
46
+ readonly description: "Optional grounded concise chapter text if this shot cannot be resolved; not visible over footage.";
47
+ };
48
+ };
49
+ readonly required: readonly [];
50
+ readonly additionalProperties: false;
51
+ readonly "x-vanillasky": {
52
+ readonly allowsStockMedia: true;
53
+ readonly requiredAnyOf: readonly [readonly ["mediaKeyword", "mediaUrl"]];
54
+ };
55
+ };
56
+ readonly chapterTitle: {
57
+ readonly type: "object";
58
+ readonly properties: {
59
+ readonly title: {
60
+ readonly type: "string";
61
+ readonly maxLength: 65;
62
+ readonly description: "Short title. Line breaks optional.";
63
+ readonly default: "A different perspective";
64
+ };
65
+ };
66
+ readonly required: readonly ["title"];
67
+ readonly additionalProperties: false;
68
+ };
69
+ readonly focusCards: {
70
+ readonly type: "object";
71
+ readonly properties: {
72
+ readonly items: {
73
+ readonly type: "array";
74
+ readonly minItems: 2;
75
+ readonly maxItems: 4;
76
+ readonly items: {
77
+ readonly type: "string";
78
+ readonly minLength: 1;
79
+ readonly maxLength: 55;
80
+ };
81
+ readonly default: readonly ["Listen closely", "Notice the pattern", "Make room for change"];
82
+ readonly description: "2–4 parallel phrases, about 2–6 words each; no heading or numbering.";
83
+ };
84
+ };
85
+ readonly required: readonly ["items"];
86
+ readonly additionalProperties: false;
87
+ };
88
+ readonly editorialTimeline: {
89
+ readonly type: "object";
90
+ readonly properties: {
91
+ readonly events: {
92
+ readonly type: "array";
93
+ readonly minItems: 3;
94
+ readonly maxItems: 5;
95
+ readonly items: {
96
+ readonly type: "object";
97
+ readonly properties: {
98
+ readonly label: {
99
+ readonly type: "string";
100
+ readonly minLength: 1;
101
+ readonly maxLength: 45;
102
+ };
103
+ };
104
+ readonly required: readonly ["label"];
105
+ readonly additionalProperties: false;
106
+ };
107
+ readonly default: readonly [{
108
+ readonly label: "Observe";
109
+ }, {
110
+ readonly label: "Understand";
111
+ }, {
112
+ readonly label: "Act";
113
+ }];
114
+ readonly description: "3–5 ordered events or actions, each with one short label; no dates.";
115
+ };
116
+ };
117
+ readonly required: readonly ["events"];
118
+ readonly additionalProperties: false;
119
+ };
120
+ readonly mobileMessage: {
121
+ readonly type: "object";
122
+ readonly properties: {
123
+ readonly mediaKeyword: {
124
+ readonly type: "string";
125
+ readonly format: "stock-media-keyword";
126
+ readonly minLength: 1;
127
+ readonly maxLength: 80;
128
+ readonly description: "2–8 word literal subject/action search intent, maximum 80 characters. Host resolves URLs.";
129
+ readonly examples: readonly ["Ocean waves breaking on a rocky shore"];
130
+ };
131
+ readonly mediaUrl: {
132
+ readonly type: "string";
133
+ readonly format: "uri";
134
+ readonly description: "Host-only approved photo or video URL.";
135
+ readonly default: "";
136
+ };
137
+ readonly mediaType: {
138
+ readonly type: "string";
139
+ readonly enum: readonly ["photo", "video"];
140
+ readonly default: "video";
141
+ readonly description: "Host-resolved asset kind.";
142
+ };
143
+ readonly mediaPoster: {
144
+ readonly type: "string";
145
+ readonly format: "uri";
146
+ readonly description: "Host-only approved poster URL for video decoding.";
147
+ readonly default: "";
148
+ };
149
+ readonly message: {
150
+ readonly type: "string";
151
+ readonly maxLength: 120;
152
+ readonly default: "Can we talk?";
153
+ readonly description: "Exact supplied or explicitly illustrative message, preferably 6–16 words.";
154
+ };
155
+ readonly app: {
156
+ readonly type: "string";
157
+ readonly maxLength: 24;
158
+ readonly default: "Messages";
159
+ readonly description: "Optional app label; Messages is the visual default.";
160
+ };
161
+ readonly shotDirection: {
162
+ readonly type: "string";
163
+ readonly maxLength: 220;
164
+ readonly description: "Optional action, framing and continuity for generation. Preserve the subject; do not request rendered text.";
165
+ };
166
+ readonly mediaSource: {
167
+ readonly type: "string";
168
+ readonly enum: readonly ["generate", "stock"];
169
+ readonly description: "Generate distinctive illustrative shots; use approved stock for familiar observable subjects.";
170
+ };
171
+ };
172
+ readonly required: readonly ["message"];
173
+ readonly additionalProperties: false;
174
+ readonly "x-vanillasky": {
175
+ readonly allowsStockMedia: true;
176
+ };
177
+ };
178
+ readonly comparison: {
179
+ readonly type: "object";
180
+ readonly properties: {
181
+ readonly leftLabel: {
182
+ readonly type: "string";
183
+ readonly maxLength: 20;
184
+ readonly description: "Optional short identifier for the first alternative.";
185
+ };
186
+ readonly rightLabel: {
187
+ readonly type: "string";
188
+ readonly maxLength: 20;
189
+ readonly description: "Optional short identifier for the second alternative.";
190
+ };
191
+ readonly leftText: {
192
+ readonly type: "string";
193
+ readonly minLength: 1;
194
+ readonly maxLength: 60;
195
+ readonly default: "More distractions";
196
+ readonly description: "First real alternative in one short phrase.";
197
+ };
198
+ readonly rightText: {
199
+ readonly type: "string";
200
+ readonly minLength: 1;
201
+ readonly maxLength: 60;
202
+ readonly default: "More room to think";
203
+ readonly description: "Second real alternative, parallel to the first.";
204
+ };
205
+ };
206
+ readonly required: readonly ["leftText", "rightText"];
207
+ readonly additionalProperties: false;
208
+ };
209
+ readonly quote: {
210
+ readonly type: "object";
211
+ readonly properties: {
212
+ readonly quote: {
213
+ readonly type: "string";
214
+ readonly minLength: 1;
215
+ readonly maxLength: 140;
216
+ readonly format: "grounded-quote";
217
+ readonly examples: readonly ["Look closely. There is always more to see."];
218
+ readonly description: "Exact supplied quotation; do not paraphrase or invent.";
219
+ };
220
+ readonly attribution: {
221
+ readonly type: "string";
222
+ readonly minLength: 1;
223
+ readonly maxLength: 60;
224
+ readonly examples: readonly ["Illustrative example"];
225
+ readonly description: "Grounded attribution belonging to these exact quoted words.";
226
+ };
227
+ };
228
+ readonly required: readonly ["quote", "attribution"];
229
+ readonly additionalProperties: false;
230
+ };
231
+ readonly keyFigure: {
232
+ readonly type: "object";
233
+ readonly properties: {
234
+ readonly value: {
235
+ readonly type: "string";
236
+ readonly minLength: 1;
237
+ readonly maxLength: 14;
238
+ readonly format: "grounded-stat";
239
+ readonly examples: readonly ["42%"];
240
+ readonly description: "One supplied supported quantity, preserving its unit.";
241
+ };
242
+ readonly label: {
243
+ readonly type: "string";
244
+ readonly minLength: 1;
245
+ readonly maxLength: 50;
246
+ readonly examples: readonly ["Illustrative example"];
247
+ readonly description: "Exactly one short label identifying the quantity and its context.";
248
+ };
249
+ };
250
+ readonly required: readonly ["value", "label"];
251
+ readonly additionalProperties: false;
252
+ readonly "x-vanillasky": {
253
+ readonly requiresStat: true;
254
+ };
255
+ };
256
+ };
257
+
258
+ type BuiltinTemplateId = keyof typeof BUILTIN_TEMPLATE_SCHEMAS;
4
259
  interface BuiltinTemplateManifestEntry extends SceneTemplateMetadata {
5
260
  id: BuiltinTemplateId;
6
- label: string;
7
- description: string;
8
- family: TemplateFamily;
9
- jobs: TemplateJob[];
10
- register: TemplateRegister;
11
- useWhen: string;
12
- avoidWhen: string;
13
- textCanvas: "tight" | "open";
14
- minDuration: number;
15
- preferredDuration: number;
16
261
  timing: TemplateTimingMetadata;
17
262
  }
18
- /**
19
- * Canonical, serializable metadata for every bundled template.
20
- * Schemas own defaults; this manifest owns discovery, selection, and timing hints.
21
- */
22
263
  declare const BUILTIN_TEMPLATE_MANIFEST: readonly BuiltinTemplateManifestEntry[];
23
264
 
24
265
  export { type BuiltinTemplateId, type BuiltinTemplateManifestEntry as BuiltinTemplateMetadata, BUILTIN_TEMPLATE_MANIFEST as builtinTemplates };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  BUILTIN_TEMPLATE_MANIFEST
3
- } from "./chunk-PP3MCPN4.js";
3
+ } from "./chunk-MXEYPK7M.js";
4
4
  export {
5
5
  BUILTIN_TEMPLATE_MANIFEST as builtinTemplates
6
6
  };
@@ -1,9 +1,9 @@
1
- import { I as InferTemplateJsonSchema, S as SceneTemplateProps, a as SceneTemplate } from './kit-tQnCPMOM.js';
2
- export { T as TemplateRegistry, c as createTemplateRegistry } from './kit-tQnCPMOM.js';
1
+ import { I as InferTemplateJsonSchema, S as SceneTemplateProps, a as SceneTemplate } from './kit-DrRpdn0p.js';
2
+ export { T as TemplateRegistry, c as createTemplateRegistry } from './kit-DrRpdn0p.js';
3
3
  import { ComponentType } from 'react';
4
- import { d as TemplateJsonSchema, S as SceneTemplateMetadata } from './catalog-types-BIhSpOWK.js';
5
- export { T as TemplateFamily, c as TemplateTimingMetadata, e as TemplateTransitionTiming } from './catalog-types-BIhSpOWK.js';
6
- import './types-CEh9eUFu.js';
4
+ import { T as TemplateJsonSchema, S as SceneTemplateMetadata } from './catalog-types-WTbLP6Jh.js';
5
+ export { a as TemplateFamily, b as TemplateTimingMetadata, c as TemplateTransitionTiming } from './catalog-types-WTbLP6Jh.js';
6
+ import './types-DdZw4GRQ.js';
7
7
 
8
8
  interface TemplateExample<Variables extends Record<string, unknown> = Record<string, unknown>> {
9
9
  name: string;
package/dist/test.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { e as VideoScene, b as VideoOrientation, V as VideoStyle, c as Video, d as VideoAudio, g as VideoInput } from './types-CEh9eUFu.js';
2
- import { V as VideoWarning, a as VideoFinishReason } from './events-BQ6z264n.js';
1
+ import { e as VideoScene, f as VIDEO_PROTOCOL_VERSION, b as VideoOrientation, V as VideoStyle, c as Video, d as VideoAudio, j as VideoInput } from './types-DdZw4GRQ.js';
2
+ import { V as VideoWarning, a as VideoFinishReason } from './events-B4YCc4vc.js';
3
3
 
4
4
  type MockVideoStreamPart = {
5
5
  type: "scene.add";
@@ -35,7 +35,7 @@ interface MockProviderTextStream {
35
35
  finishReason: Promise<"stop" | "length" | "content-filter">;
36
36
  }
37
37
  type SimulatedEventEnvelope<TType extends string, TData> = {
38
- protocolVersion: "0.5";
38
+ protocolVersion: typeof VIDEO_PROTOCOL_VERSION;
39
39
  runId: string;
40
40
  sequence: number;
41
41
  eventId: string;
package/dist/test.js CHANGED
@@ -25,8 +25,8 @@ var portrait = {
25
25
  type: "scene.add",
26
26
  scene: {
27
27
  id: "portrait-summary",
28
- templateId: "notification",
29
- variables: { appName: "VanillaSky", message: "Grounded product update" },
28
+ templateId: "mobileMessage",
29
+ variables: { app: "VanillaSky", message: "Grounded product update" },
30
30
  timing: { fixedDuration: 4 }
31
31
  }
32
32
  },
@@ -43,8 +43,8 @@ var landscape = {
43
43
  type: "scene.add",
44
44
  scene: {
45
45
  id: "landscape-metric",
46
- templateId: "bigNumber",
47
- variables: { texts: "Revenue", value: 42, label: "million" },
46
+ templateId: "keyFigure",
47
+ variables: { value: "42 million", label: "Revenue" },
48
48
  timing: { fixedDuration: 4 }
49
49
  }
50
50
  },
@@ -60,8 +60,8 @@ var truncated = [
60
60
  type: "scene.add",
61
61
  scene: {
62
62
  id: "truncated-partial",
63
- templateId: "notification",
64
- variables: { appName: "VanillaSky", message: "Playable partial result" },
63
+ templateId: "mobileMessage",
64
+ variables: { app: "VanillaSky", message: "Playable partial result" },
65
65
  timing: { fixedDuration: 4 }
66
66
  }
67
67
  },
@@ -81,8 +81,8 @@ var invalidScene = [
81
81
  type: "scene.add",
82
82
  scene: {
83
83
  id: "valid-after-invalid",
84
- templateId: "notification",
85
- variables: { appName: "VanillaSky", message: "Recovered after invalid content" },
84
+ templateId: "mobileMessage",
85
+ variables: { app: "VanillaSky", message: "Recovered after invalid content" },
86
86
  timing: { fixedDuration: 4 }
87
87
  }
88
88
  },
@@ -99,8 +99,8 @@ var contentFilter = [
99
99
  type: "scene.add",
100
100
  scene: {
101
101
  id: "content-filter-partial",
102
- templateId: "notification",
103
- variables: { appName: "VanillaSky", message: "Safe partial result" },
102
+ templateId: "mobileMessage",
103
+ variables: { app: "VanillaSky", message: "Safe partial result" },
104
104
  timing: { fixedDuration: 4 }
105
105
  }
106
106
  },
@@ -111,8 +111,8 @@ var abort = [
111
111
  type: "scene.add",
112
112
  scene: {
113
113
  id: "abort-partial",
114
- templateId: "notification",
115
- variables: { appName: "VanillaSky", message: "Partial result before cancellation" },
114
+ templateId: "mobileMessage",
115
+ variables: { app: "VanillaSky", message: "Partial result before cancellation" },
116
116
  timing: { fixedDuration: 4 }
117
117
  }
118
118
  },
@@ -123,8 +123,8 @@ var timeout = [
123
123
  type: "scene.add",
124
124
  scene: {
125
125
  id: "timeout-partial",
126
- templateId: "notification",
127
- variables: { appName: "VanillaSky", message: "Partial result before timeout" },
126
+ templateId: "mobileMessage",
127
+ variables: { app: "VanillaSky", message: "Partial result before timeout" },
128
128
  timing: { fixedDuration: 4 }
129
129
  }
130
130
  },
@@ -233,10 +233,10 @@ async function* simulateVideoStream(parts, options = {}) {
233
233
  if (timeoutMs != null && (!Number.isFinite(timeoutMs) || timeoutMs < 0)) {
234
234
  throw new Error("Simulation timeoutMs must be a non-negative finite number");
235
235
  }
236
- const { createVideo } = await import("./compose-video-2NFH4DZY.js");
237
- const { createTextDeltaVideoPlanner } = await import("./text-stream-54LXABJW.js");
238
- const { BUILTIN_SERVER_TEMPLATE_KIT } = await import("./builtin-server-CUYPIDE7.js");
239
- const { createTemplateSceneValidator } = await import("./validate-T7GBU2YF.js");
236
+ const { createVideo } = await import("./compose-video-TBFTONUC.js");
237
+ const { createTextDeltaVideoPlanner } = await import("./text-stream-LD364KBI.js");
238
+ const { BUILTIN_SERVER_TEMPLATE_KIT } = await import("./builtin-server-HW6HGXCZ.js");
239
+ const { createTemplateSceneValidator } = await import("./validate-4OUD2CLX.js");
240
240
  const controller = new AbortController();
241
241
  const forwardAbort = () => controller.abort(options.signal?.reason);
242
242
  if (options.signal?.aborted) forwardAbort();
@@ -0,0 +1,9 @@
1
+ import {
2
+ createTextDeltaVideoPlanner
3
+ } from "./chunk-PDQFQIQW.js";
4
+ import "./chunk-E7CL7UPB.js";
5
+ import "./chunk-7M56IUUX.js";
6
+ import "./chunk-7NZOMTAL.js";
7
+ export {
8
+ createTextDeltaVideoPlanner
9
+ };
@@ -1,4 +1,4 @@
1
- type VideoChatMode = "templates" | "full";
1
+ type VideoChatMode = "cinematic";
2
2
  interface VideoChatConversationTurn {
3
3
  prompt: string;
4
4
  response?: string;
@@ -1,46 +1,17 @@
1
- declare const VIDEO_PROTOCOL_VERSION: "0.5";
2
- declare const VIDEO_SCHEMA_VERSION: "0.1";
1
+ /** Host-authored timing, derived from prepared speech rather than model guesses. */
2
+ interface VideoNarrationGroup {
3
+ id: string;
4
+ text: string;
5
+ offsetSeconds: number;
6
+ durationSeconds: number;
7
+ totalSeconds: number;
8
+ }
9
+
10
+ declare const VIDEO_PROTOCOL_VERSION: "0.6";
11
+ declare const VIDEO_SCHEMA_VERSION: "0.2";
3
12
  type VideoOrientation = "portrait" | "landscape";
4
13
  type VideoKnowledgeMode = "input-only" | "general";
5
- interface VideoBrandColors {
6
- primary: string;
7
- secondary: string;
8
- foreground: string;
9
- surface: string;
10
- surfaceElevated: string;
11
- muted: string;
12
- }
13
- type VideoBackgroundPreset = "cosmic" | "horizon" | "twilight" | "meadow" | "velvet" | "flamingo" | "peach" | "saffron" | "black" | "midnight" | "aubergine" | "coal" | "navy";
14
- type VideoBackgroundInput = VideoBackgroundPreset | {
15
- color: string;
16
- } | {
17
- colors: [string, string];
18
- };
19
- type VideoBackground = {
20
- type: "solid";
21
- color: string;
22
- } | {
23
- type: "gradient";
24
- colors: [string, string];
25
- };
26
- interface VideoBrandInput {
27
- name?: string;
28
- logoUrl?: string;
29
- font?: string;
30
- scriptFont?: string;
31
- background?: VideoBackgroundInput;
32
- colors?: Partial<VideoBrandColors>;
33
- }
34
- interface VideoBrand {
35
- name?: string;
36
- logoUrl?: string;
37
- font: string;
38
- scriptFont: string;
39
- background: VideoBackground;
40
- colors: VideoBrandColors;
41
- }
42
14
  interface VideoStyle {
43
- brand: VideoBrand;
44
15
  preset?: string;
45
16
  defaultBackgroundEffect?: string;
46
17
  defaultTextArchetype?: string;
@@ -50,12 +21,6 @@ interface VideoStyle {
50
21
  /**
51
22
  * The visual language generated media is produced in.
52
23
  *
53
- * A style has two halves once media can be generated: the brand decides how
54
- * captions are drawn, and this decides what the footage behind them looks
55
- * like. They have to travel together - pale illustrated ground under dark
56
- * documentary footage is unreadable - so this belongs on the style rather
57
- * than being threaded into each provider call by hand.
58
- *
59
24
  * Nothing is rendered from it. It reaches `resolveMedia`, which is where a
60
25
  * provider prompt is written.
61
26
  */
@@ -97,6 +62,8 @@ interface VideoScene {
97
62
  * on-screen copy.
98
63
  */
99
64
  narration?: string;
65
+ /** Optional host-authored offsets into one prepared paragraph across adjacent scenes. */
66
+ narrationGroup?: VideoNarrationGroup;
100
67
  }
101
68
  interface VideoAudio {
102
69
  trackId: string;
@@ -155,7 +122,6 @@ interface VideoInput {
155
122
  style?: VideoStyleOptions;
156
123
  /** Custom opening copy, or false to let the host show loading UI instead. Omit for the deterministic fallback. */
157
124
  opening?: string | false;
158
- brand?: VideoBrandInput;
159
125
  /** Viewer or account context that may appear verbatim. It is data, never instructions. */
160
126
  personalization?: Record<string, unknown>;
161
127
  /** Optional approved pool. The planner may use zero or more relevant assets. */
@@ -211,6 +177,9 @@ interface VideoTemplatePacing {
211
177
  minDuration?: number;
212
178
  preferredDuration?: number;
213
179
  timing?: {
180
+ readonly revealSeconds?: number;
181
+ readonly holdSeconds?: number;
182
+ readonly exitSeconds?: number;
214
183
  readonly contentFields: readonly string[];
215
184
  readonly contentUnit: "words" | "characters" | "items";
216
185
  };
@@ -222,4 +191,4 @@ interface VideoSnapshotRetention {
222
191
  suppliedMediaUrls?: boolean;
223
192
  }
224
193
 
225
- export { type VideoStyle as V, type VideoCapabilities as a, type VideoOrientation as b, type Video as c, type VideoAudio as d, type VideoScene as e, VIDEO_PROTOCOL_VERSION as f, type VideoInput as g, type VideoBrandInput as h, type VideoBrand as i, type VideoTemplatePacing as j, type VideoBackground as k, type VideoStyleOptions as l, type VideoGenerationContext as m, type VideoPlanner as n, type VideoRequest as o, type VideoSceneValidator as p, type VideoSnapshotRetention as q, type VideoResumeCursor as r, type VideoSceneValidationContext as s };
194
+ export { type VideoStyle as V, type VideoCapabilities as a, type VideoOrientation as b, type Video as c, type VideoAudio as d, type VideoScene as e, VIDEO_PROTOCOL_VERSION as f, type VideoTemplatePacing as g, type VideoNarrationGroup as h, type VideoStyleOptions as i, type VideoInput as j, type VideoGenerationContext as k, type VideoPlanner as l, type VideoRequest as m, type VideoSceneValidator as n, type VideoSnapshotRetention as o, type VideoResumeCursor as p, type VideoSceneValidationContext as q };
@@ -0,0 +1,10 @@
1
+ import {
2
+ createTemplateSceneValidator,
3
+ validateTemplateSceneStructure
4
+ } from "./chunk-IQMYK5DX.js";
5
+ import "./chunk-EGVQODKU.js";
6
+ import "./chunk-73NTSFFI.js";
7
+ export {
8
+ createTemplateSceneValidator,
9
+ validateTemplateSceneStructure
10
+ };
@@ -67,7 +67,7 @@ prompt/validation registry in `vanillasky/server.ts`.
67
67
  5. The system prompt combines the opening and composition rules with the trusted template
68
68
  catalog, including generated metadata for customer-owned templates. The user
69
69
  prompt serializes the prompt, completed conversation, instructions,
70
- brand, and approved media.
70
+ style, and approved media.
71
71
  6. The model streams one host-consumed opening object followed by NDJSON plan
72
72
  parts. The server emits the opening event, then parses and validates complete
73
73
  scenes before emitting them.
package/docs/concepts.md CHANGED
@@ -31,7 +31,7 @@ or export pipeline when an encoded file is required.
31
31
 
32
32
  The viewer sends a prompt with bounded completed conversation turns. The server
33
33
  adds trusted application `instructions`, template capabilities, and the selected
34
- visual mode. `VideoChat` options control brand, style, orientation, and custom
34
+ cinematic mode. `VideoChat` options control style, orientation, and custom
35
35
  templates. Exact facts belong in the authorized prompt or conversation; secrets
36
36
  and provider configuration stay on the server.
37
37
 
@@ -37,7 +37,7 @@ npx vanillasky templates describe customer-health
37
37
  Or copy a built-in when its behavior is already close:
38
38
 
39
39
  ```bash
40
- npx vanillasky templates add bigNumber
40
+ npx vanillasky templates add keyFigure
41
41
  ```
42
42
 
43
43
  Then edit the owned `.tsx` file, regenerate the two small registries, and check
@@ -50,7 +50,7 @@ npx vanillasky templates check
50
50
 
51
51
  For an original template, the source is
52
52
  `vanillasky/templates/customer-health.tsx`. For the copied built-in, it is
53
- `vanillasky/templates/bigNumber.tsx`. These are application source: commit them,
53
+ `vanillasky/templates/keyFigure.tsx`. These are application source: commit them,
54
54
  review them, and change them like any other React component.
55
55
 
56
56
  `create` and `add` run `sync` once, so the generated entry points exist
@@ -62,8 +62,8 @@ registry parity.
62
62
  Preview either operation without applying the proposed file writes:
63
63
 
64
64
  ```bash
65
- npx vanillasky templates add bigNumber --dry-run
66
- npx vanillasky templates add bigNumber --diff
65
+ npx vanillasky templates add keyFigure --dry-run
66
+ npx vanillasky templates add keyFigure --diff
67
67
  ```
68
68
 
69
69
  `--dry-run` lists every proposed file and `--diff` shows its content changes,
@@ -119,8 +119,8 @@ the selected catalog contains a template with one of those two jobs.
119
119
 
120
120
  Customer templates hard-cut by default. Opt into renderer-owned fades only
121
121
  for scenes that use the standard media-background variables, and only after
122
- both timing points are visually tested in portrait and landscape. Shared brand
123
- gradients and unchanged media do not crossfade:
122
+ both timing points are visually tested in portrait and landscape. Shared render
123
+ black backgrounds and unchanged media do not crossfade:
124
124
 
125
125
  ```tsx
126
126
  export default defineTemplate({
@@ -277,7 +277,7 @@ import { VideoPlayer } from "@vanillaskyai/video/react";
277
277
  import { templates } from "../vanillasky";
278
278
 
279
279
  const savedVideo: Video = {
280
- schemaVersion: "0.1",
280
+ schemaVersion: "0.2",
281
281
  orientation: "portrait",
282
282
  scenes: [{
283
283
  id: "customer-health-preview",
@@ -288,21 +288,7 @@ const savedVideo: Video = {
288
288
  },
289
289
  timing: { fixedDuration: 5 },
290
290
  }],
291
- style: {
292
- brand: {
293
- font: "Inter",
294
- scriptFont: "Caveat",
295
- background: { type: "gradient", colors: ["#8711C1", "#2167E3"] },
296
- colors: {
297
- primary: "#00E5A0",
298
- secondary: "#006BE5",
299
- foreground: "#FFFFFF",
300
- surface: "#0A0A14",
301
- surfaceElevated: "#14152A",
302
- muted: "#A7A6B0",
303
- },
304
- },
305
- },
291
+ style: {},
306
292
  };
307
293
 
308
294
  export function TemplatePreview() {
@@ -328,8 +314,8 @@ maps.
328
314
 
329
315
  Useful formats add grounding behavior:
330
316
 
331
- - `grounded-stat` marks numeric statistical evidence for the planner; it does
332
- not compare the value against raw input at runtime;
317
+ - `grounded-stat` accepts numeric or string quantities and requires an exact
318
+ quantity in raw input, preserving its unit;
333
319
  - `grounded-quote` requires the quote to exist verbatim in the input;
334
320
  - `uri` validates approved media URLs restored by the server;
335
321
  - `stock-media-keyword` is only for hosts that resolve stock media before a
@@ -338,14 +324,13 @@ Useful formats add grounding behavior:
338
324
  Templates whose core proof needs a real statistic can add
339
325
  `"x-vanillasky": { "requiresStat": true }`. See the structured-data reference for a complete example.
340
326
 
341
- For media-backed chat scenes, copy the built-in `media` template and keep its
327
+ For media-backed chat scenes, copy the built-in `cinemaMedia` template and keep its
342
328
  `mediaKeyword`, `mediaUrl`, and `mediaType` contract. Configure `searchMedia` on
343
329
  the chat handler so the server resolves semantic searches into approved assets.
344
330
  The chat request does not accept a separate supplied-media input list.
345
331
 
346
- The automatic `opening` uses the built-in `media` variables (`texts` and
347
- `mediaType: "gradient"`). If you replace `media` while using automatic
348
- openings, keep that variable contract.
332
+ The automatic `opening` uses the built-in `chapterTitle` variable `title`.
333
+ If you replace that template while using automatic openings, keep this contract.
349
334
 
350
335
  ## What belongs where
351
336