@vanillaskyai/video 0.9.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/{builtin-server-HW6HGXCZ.js → builtin-server-W4PLJUZ5.js} +2 -2
- package/dist/check-runtime.js +2 -2
- package/dist/{chunk-UDIODEDK.js → chunk-224QNWRA.js} +5 -1
- package/dist/{chunk-MXEYPK7M.js → chunk-4ZJLPHBV.js} +194 -62
- package/dist/{chunk-ZDJNFA52.js → chunk-5BSJLT6H.js} +6 -6
- package/dist/{chunk-G7IZBBWF.js → chunk-5C6HZNHY.js} +12 -14
- package/dist/{chunk-3ZTEFJIR.js → chunk-6KZGF63O.js} +47 -12
- package/dist/{chunk-LH4BPALA.js → chunk-IIN5M5HW.js} +194 -61
- package/dist/{chunk-MQILEEXC.js → chunk-IR44XKBI.js} +1 -1
- package/dist/{chunk-OR52UMSF.js → chunk-JKVOBTRO.js} +3 -2
- package/dist/chunk-KHLO5OHT.js +35 -0
- package/dist/{chunk-PAJ44TFW.js → chunk-LVM5Q2DL.js} +8 -6
- package/dist/chunk-VQH3JTQC.js +16 -0
- package/dist/{cinema-media-YQHSIFDA.js → cinema-media-APDJS7SC.js} +3 -2
- package/dist/cli.js +4 -4
- package/dist/{comparison-RZMMHZR2.js → comparison-ZVE2DE7U.js} +14 -4
- package/dist/{compose-video-TBFTONUC.js → compose-video-BH5K6XWT.js} +1 -1
- package/dist/{editorial-timeline-OZX7OS6G.js → editorial-timeline-YIXXVJUV.js} +10 -3
- package/dist/key-figure-I2C37FWV.js +30 -0
- package/dist/{mobile-message-UZUPIKHD.js → mobile-message-JSGBU6EX.js} +3 -2
- package/dist/{preload-media-CFTZIMZL.js → preload-media-LJXWKTWG.js} +1 -1
- package/dist/quote-XH54G3FS.js +33 -0
- package/dist/react.js +58 -33
- package/dist/server.js +106 -27
- package/dist/{system-prompt-SYRT5DWM.js → system-prompt-AG26KJAA.js} +1 -1
- package/dist/template-catalog.d.ts +154 -19
- package/dist/template-catalog.js +1 -1
- package/dist/test.js +2 -2
- package/docs/customization.md +1 -1
- package/docs/maintainers/cinematic-migration.md +4 -0
- package/docs/media-and-audio.md +3 -3
- package/docs/provider-integration.md +1 -1
- package/package.json +1 -1
- package/registry/items/cinemaMedia.json +1 -1
- package/registry/items/comparison.json +71 -4
- package/registry/items/editorialTimeline.json +71 -4
- package/registry/items/keyFigure.json +69 -4
- package/registry/items/mobileMessage.json +1 -1
- package/registry/items/quote.json +71 -4
- package/starters/video-chat/package.json +1 -1
- package/dist/focus-cards-TJ72BT7U.js +0 -20
- package/dist/key-figure-GYENXKH3.js +0 -20
- package/dist/quote-EW5HQA6H.js +0 -23
- package/registry/items/focusCards.json +0 -90
|
@@ -135,62 +135,9 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
135
135
|
"additionalProperties": false
|
|
136
136
|
}
|
|
137
137
|
},
|
|
138
|
-
{
|
|
139
|
-
"label": "Focus cards",
|
|
140
|
-
"description": "Two to four short phrases fade in sequentially on black; no boxes or heading.",
|
|
141
|
-
"usesGlobalTextEffect": false,
|
|
142
|
-
"usesGlobalTransition": false,
|
|
143
|
-
"usesGlobalBackgroundEffect": false,
|
|
144
|
-
"textCanvas": "tight",
|
|
145
|
-
"id": "focusCards",
|
|
146
|
-
"family": "Explainers",
|
|
147
|
-
"jobs": [
|
|
148
|
-
"setup",
|
|
149
|
-
"proof"
|
|
150
|
-
],
|
|
151
|
-
"register": "card-led",
|
|
152
|
-
"useWhen": "Two to four short parallel points support an explanation. ",
|
|
153
|
-
"avoidWhen": "The points require an order, long paragraphs, numerical data or additional images to make sense.",
|
|
154
|
-
"minDuration": 4,
|
|
155
|
-
"preferredDuration": 5,
|
|
156
|
-
"timing": {
|
|
157
|
-
"contentFields": [
|
|
158
|
-
"items"
|
|
159
|
-
],
|
|
160
|
-
"contentUnit": "items",
|
|
161
|
-
"revealSeconds": 2.4,
|
|
162
|
-
"holdSeconds": 1.8,
|
|
163
|
-
"exitSeconds": 0
|
|
164
|
-
},
|
|
165
|
-
"schema": {
|
|
166
|
-
"type": "object",
|
|
167
|
-
"properties": {
|
|
168
|
-
"items": {
|
|
169
|
-
"type": "array",
|
|
170
|
-
"minItems": 2,
|
|
171
|
-
"maxItems": 4,
|
|
172
|
-
"items": {
|
|
173
|
-
"type": "string",
|
|
174
|
-
"minLength": 1,
|
|
175
|
-
"maxLength": 55
|
|
176
|
-
},
|
|
177
|
-
"default": [
|
|
178
|
-
"Listen closely",
|
|
179
|
-
"Notice the pattern",
|
|
180
|
-
"Make room for change"
|
|
181
|
-
],
|
|
182
|
-
"description": "2\u20134 parallel phrases, about 2\u20136 words each; no heading or numbering."
|
|
183
|
-
}
|
|
184
|
-
},
|
|
185
|
-
"required": [
|
|
186
|
-
"items"
|
|
187
|
-
],
|
|
188
|
-
"additionalProperties": false
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
138
|
{
|
|
192
139
|
"label": "Timeline",
|
|
193
|
-
"description": "Three to five events on a fine continuous line
|
|
140
|
+
"description": "Three to five events on a fine continuous line over relevant media or black; without dates.",
|
|
194
141
|
"usesGlobalTextEffect": false,
|
|
195
142
|
"usesGlobalTransition": false,
|
|
196
143
|
"usesGlobalBackgroundEffect": false,
|
|
@@ -248,12 +195,59 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
248
195
|
}
|
|
249
196
|
],
|
|
250
197
|
"description": "3\u20135 ordered events or actions, each with one short label; no dates."
|
|
198
|
+
},
|
|
199
|
+
"mediaKeyword": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"format": "stock-media-keyword",
|
|
202
|
+
"minLength": 1,
|
|
203
|
+
"maxLength": 80,
|
|
204
|
+
"description": "2\u20138 word literal subject/action search intent, maximum 80 characters. Host resolves URLs.",
|
|
205
|
+
"examples": [
|
|
206
|
+
"Ocean waves breaking on a rocky shore"
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
"mediaUrl": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"format": "uri",
|
|
212
|
+
"description": "Host-only approved photo or video URL.",
|
|
213
|
+
"default": ""
|
|
214
|
+
},
|
|
215
|
+
"mediaType": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"enum": [
|
|
218
|
+
"photo",
|
|
219
|
+
"video"
|
|
220
|
+
],
|
|
221
|
+
"default": "video",
|
|
222
|
+
"description": "Host-resolved asset kind."
|
|
223
|
+
},
|
|
224
|
+
"mediaPoster": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"format": "uri",
|
|
227
|
+
"description": "Host-only approved poster URL for video decoding.",
|
|
228
|
+
"default": ""
|
|
229
|
+
},
|
|
230
|
+
"shotDirection": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"maxLength": 220,
|
|
233
|
+
"description": "Optional action, framing and continuity for generation. Preserve the subject; do not request rendered text."
|
|
234
|
+
},
|
|
235
|
+
"mediaSource": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"enum": [
|
|
238
|
+
"generate",
|
|
239
|
+
"stock"
|
|
240
|
+
],
|
|
241
|
+
"description": "Generate distinctive illustrative shots; use approved stock for familiar observable subjects."
|
|
251
242
|
}
|
|
252
243
|
},
|
|
253
244
|
"required": [
|
|
254
245
|
"events"
|
|
255
246
|
],
|
|
256
|
-
"additionalProperties": false
|
|
247
|
+
"additionalProperties": false,
|
|
248
|
+
"x-vanillasky": {
|
|
249
|
+
"allowsStockMedia": true
|
|
250
|
+
}
|
|
257
251
|
}
|
|
258
252
|
},
|
|
259
253
|
{
|
|
@@ -354,7 +348,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
354
348
|
},
|
|
355
349
|
{
|
|
356
350
|
"label": "Comparison",
|
|
357
|
-
"description": "Two short statements with equal weight
|
|
351
|
+
"description": "Two short statements with equal weight over relevant media or black, side by side or stacked in portrait.",
|
|
358
352
|
"usesGlobalTextEffect": false,
|
|
359
353
|
"usesGlobalTransition": false,
|
|
360
354
|
"usesGlobalBackgroundEffect": false,
|
|
@@ -407,18 +401,65 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
407
401
|
"maxLength": 60,
|
|
408
402
|
"default": "More room to think",
|
|
409
403
|
"description": "Second real alternative, parallel to the first."
|
|
404
|
+
},
|
|
405
|
+
"mediaKeyword": {
|
|
406
|
+
"type": "string",
|
|
407
|
+
"format": "stock-media-keyword",
|
|
408
|
+
"minLength": 1,
|
|
409
|
+
"maxLength": 80,
|
|
410
|
+
"description": "2\u20138 word literal subject/action search intent, maximum 80 characters. Host resolves URLs.",
|
|
411
|
+
"examples": [
|
|
412
|
+
"Ocean waves breaking on a rocky shore"
|
|
413
|
+
]
|
|
414
|
+
},
|
|
415
|
+
"mediaUrl": {
|
|
416
|
+
"type": "string",
|
|
417
|
+
"format": "uri",
|
|
418
|
+
"description": "Host-only approved photo or video URL.",
|
|
419
|
+
"default": ""
|
|
420
|
+
},
|
|
421
|
+
"mediaType": {
|
|
422
|
+
"type": "string",
|
|
423
|
+
"enum": [
|
|
424
|
+
"photo",
|
|
425
|
+
"video"
|
|
426
|
+
],
|
|
427
|
+
"default": "video",
|
|
428
|
+
"description": "Host-resolved asset kind."
|
|
429
|
+
},
|
|
430
|
+
"mediaPoster": {
|
|
431
|
+
"type": "string",
|
|
432
|
+
"format": "uri",
|
|
433
|
+
"description": "Host-only approved poster URL for video decoding.",
|
|
434
|
+
"default": ""
|
|
435
|
+
},
|
|
436
|
+
"shotDirection": {
|
|
437
|
+
"type": "string",
|
|
438
|
+
"maxLength": 220,
|
|
439
|
+
"description": "Optional action, framing and continuity for generation. Preserve the subject; do not request rendered text."
|
|
440
|
+
},
|
|
441
|
+
"mediaSource": {
|
|
442
|
+
"type": "string",
|
|
443
|
+
"enum": [
|
|
444
|
+
"generate",
|
|
445
|
+
"stock"
|
|
446
|
+
],
|
|
447
|
+
"description": "Generate distinctive illustrative shots; use approved stock for familiar observable subjects."
|
|
410
448
|
}
|
|
411
449
|
},
|
|
412
450
|
"required": [
|
|
413
451
|
"leftText",
|
|
414
452
|
"rightText"
|
|
415
453
|
],
|
|
416
|
-
"additionalProperties": false
|
|
454
|
+
"additionalProperties": false,
|
|
455
|
+
"x-vanillasky": {
|
|
456
|
+
"allowsStockMedia": true
|
|
457
|
+
}
|
|
417
458
|
}
|
|
418
459
|
},
|
|
419
460
|
{
|
|
420
461
|
"label": "Quote",
|
|
421
|
-
"description": "A short exact quotation with a legible attribution
|
|
462
|
+
"description": "A short exact quotation with a legible attribution over relevant media or black.",
|
|
422
463
|
"usesGlobalTextEffect": false,
|
|
423
464
|
"usesGlobalTransition": false,
|
|
424
465
|
"usesGlobalBackgroundEffect": false,
|
|
@@ -464,18 +505,65 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
464
505
|
"Illustrative example"
|
|
465
506
|
],
|
|
466
507
|
"description": "Grounded attribution belonging to these exact quoted words."
|
|
508
|
+
},
|
|
509
|
+
"mediaKeyword": {
|
|
510
|
+
"type": "string",
|
|
511
|
+
"format": "stock-media-keyword",
|
|
512
|
+
"minLength": 1,
|
|
513
|
+
"maxLength": 80,
|
|
514
|
+
"description": "2\u20138 word literal subject/action search intent, maximum 80 characters. Host resolves URLs.",
|
|
515
|
+
"examples": [
|
|
516
|
+
"Ocean waves breaking on a rocky shore"
|
|
517
|
+
]
|
|
518
|
+
},
|
|
519
|
+
"mediaUrl": {
|
|
520
|
+
"type": "string",
|
|
521
|
+
"format": "uri",
|
|
522
|
+
"description": "Host-only approved photo or video URL.",
|
|
523
|
+
"default": ""
|
|
524
|
+
},
|
|
525
|
+
"mediaType": {
|
|
526
|
+
"type": "string",
|
|
527
|
+
"enum": [
|
|
528
|
+
"photo",
|
|
529
|
+
"video"
|
|
530
|
+
],
|
|
531
|
+
"default": "video",
|
|
532
|
+
"description": "Host-resolved asset kind."
|
|
533
|
+
},
|
|
534
|
+
"mediaPoster": {
|
|
535
|
+
"type": "string",
|
|
536
|
+
"format": "uri",
|
|
537
|
+
"description": "Host-only approved poster URL for video decoding.",
|
|
538
|
+
"default": ""
|
|
539
|
+
},
|
|
540
|
+
"shotDirection": {
|
|
541
|
+
"type": "string",
|
|
542
|
+
"maxLength": 220,
|
|
543
|
+
"description": "Optional action, framing and continuity for generation. Preserve the subject; do not request rendered text."
|
|
544
|
+
},
|
|
545
|
+
"mediaSource": {
|
|
546
|
+
"type": "string",
|
|
547
|
+
"enum": [
|
|
548
|
+
"generate",
|
|
549
|
+
"stock"
|
|
550
|
+
],
|
|
551
|
+
"description": "Generate distinctive illustrative shots; use approved stock for familiar observable subjects."
|
|
467
552
|
}
|
|
468
553
|
},
|
|
469
554
|
"required": [
|
|
470
555
|
"quote",
|
|
471
556
|
"attribution"
|
|
472
557
|
],
|
|
473
|
-
"additionalProperties": false
|
|
558
|
+
"additionalProperties": false,
|
|
559
|
+
"x-vanillasky": {
|
|
560
|
+
"allowsStockMedia": true
|
|
561
|
+
}
|
|
474
562
|
}
|
|
475
563
|
},
|
|
476
564
|
{
|
|
477
565
|
"label": "Key figure",
|
|
478
|
-
"description": "One supplied figure with one short label
|
|
566
|
+
"description": "One supplied figure with one short label over relevant media or black.",
|
|
479
567
|
"usesGlobalTextEffect": false,
|
|
480
568
|
"usesGlobalTransition": false,
|
|
481
569
|
"usesGlobalBackgroundEffect": false,
|
|
@@ -521,6 +609,50 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
521
609
|
"Illustrative example"
|
|
522
610
|
],
|
|
523
611
|
"description": "Exactly one short label identifying the quantity and its context."
|
|
612
|
+
},
|
|
613
|
+
"mediaKeyword": {
|
|
614
|
+
"type": "string",
|
|
615
|
+
"format": "stock-media-keyword",
|
|
616
|
+
"minLength": 1,
|
|
617
|
+
"maxLength": 80,
|
|
618
|
+
"description": "2\u20138 word literal subject/action search intent, maximum 80 characters. Host resolves URLs.",
|
|
619
|
+
"examples": [
|
|
620
|
+
"Ocean waves breaking on a rocky shore"
|
|
621
|
+
]
|
|
622
|
+
},
|
|
623
|
+
"mediaUrl": {
|
|
624
|
+
"type": "string",
|
|
625
|
+
"format": "uri",
|
|
626
|
+
"description": "Host-only approved photo or video URL.",
|
|
627
|
+
"default": ""
|
|
628
|
+
},
|
|
629
|
+
"mediaType": {
|
|
630
|
+
"type": "string",
|
|
631
|
+
"enum": [
|
|
632
|
+
"photo",
|
|
633
|
+
"video"
|
|
634
|
+
],
|
|
635
|
+
"default": "video",
|
|
636
|
+
"description": "Host-resolved asset kind."
|
|
637
|
+
},
|
|
638
|
+
"mediaPoster": {
|
|
639
|
+
"type": "string",
|
|
640
|
+
"format": "uri",
|
|
641
|
+
"description": "Host-only approved poster URL for video decoding.",
|
|
642
|
+
"default": ""
|
|
643
|
+
},
|
|
644
|
+
"shotDirection": {
|
|
645
|
+
"type": "string",
|
|
646
|
+
"maxLength": 220,
|
|
647
|
+
"description": "Optional action, framing and continuity for generation. Preserve the subject; do not request rendered text."
|
|
648
|
+
},
|
|
649
|
+
"mediaSource": {
|
|
650
|
+
"type": "string",
|
|
651
|
+
"enum": [
|
|
652
|
+
"generate",
|
|
653
|
+
"stock"
|
|
654
|
+
],
|
|
655
|
+
"description": "Generate distinctive illustrative shots; use approved stock for familiar observable subjects."
|
|
524
656
|
}
|
|
525
657
|
},
|
|
526
658
|
"required": [
|
|
@@ -529,7 +661,8 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
529
661
|
],
|
|
530
662
|
"additionalProperties": false,
|
|
531
663
|
"x-vanillasky": {
|
|
532
|
-
"requiresStat": true
|
|
664
|
+
"requiresStat": true,
|
|
665
|
+
"allowsStockMedia": true
|
|
533
666
|
}
|
|
534
667
|
}
|
|
535
668
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createVideoSystemPrompt
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LVM5Q2DL.js";
|
|
4
4
|
import {
|
|
5
5
|
PACING_PLANNER_RULES
|
|
6
6
|
} from "./chunk-3O7OMMMF.js";
|
|
@@ -118,7 +118,7 @@ ${options.basePrompt.trim()}` : void 0,
|
|
|
118
118
|
"Variable notation is type[count]{characters}(options)! where count is list cardinality, characters is the inclusive character count for a string or each string-array item, and ! means required. Omitted ! means optional.",
|
|
119
119
|
"Choose a template only when the permitted factual basis contains every fact it needs. Never invent peer values to complete a chart, comparison, stat set, timeline, or list.",
|
|
120
120
|
...PACING_PLANNER_RULES,
|
|
121
|
-
"
|
|
121
|
+
"Let narration carry ordinary lists. Use a structured overlay only when a comparison, sequence, exact quote or key figure adds understanding beyond the voice. Prefer relevant full-bleed footage for the remaining visual beats, with varied purposeful action and framing.",
|
|
122
122
|
"If the catalog includes a suitable ask template and the input supplies a grounded CTA or URL, keep that concise action closer as its own final scene instead of folding it into preceding content.",
|
|
123
123
|
"When a grounded CTA or URL is supplied and the catalog contains jobs:[ask], emit that final closer. A brand name may accompany the action but never qualifies as an ask by itself.",
|
|
124
124
|
terminalPayoffs.length > 0 ? `When there is no grounded action, end with a concise supported payoff using a suitable template from ${terminalPayoffs.join(", ")}. Do not repeat the hook or invent a CTA.` : void 0,
|
|
@@ -127,6 +127,7 @@ ${options.basePrompt.trim()}` : void 0,
|
|
|
127
127
|
mediaTemplates.length > 0 && options.mediaOnFirstScene !== true ? `The host owns immediate startup; reserve external media templates (${mediaTemplates.join(", ")}) for later beats when an asset-free opening is required.` : void 0,
|
|
128
128
|
"For list and event variables emit actual JSON arrays. Follow each field's content budget; never use pipe-delimited strings or invent entries.",
|
|
129
129
|
resolverMediaAvailable ? "Media-capable scenes may carry mediaKeyword: a literal 2\u20138 word shot description, at most 80 characters. Choose mediaSource=generate for distinctive illustrative shots and mediaSource=stock for common subjects a verified asset can depict. For generated footage, optional shotDirection gives action, framing and continuity separately from the stock query. Keep people, actions and essential details precise. Never broaden an exact identity or action into unrelated atmosphere. Supply a grounded fallbackText where declared. Only the host fills mediaUrl and mediaPoster; never invent them. If no media fits an abstract beat, choose an appropriate graphic template instead." : "Use media only when a supplied asset satisfies the scene. Never invent asset URLs. Otherwise choose a grounded graphic template.",
|
|
130
|
+
"When the catalog offers media, make relevant footage the default. For a typical 30-second explanation start with roughly one structured explanatory overlay plus an optional brief chapter opening; other intents may need different pacing and visual emphasis. Do not chain graphic-only beats when honest media is available. Reuse suitable supplied media behind overlays with optional media fields; retain black when no relevant asset exists. Never invent a stock match or spend beyond host generation limits.",
|
|
130
131
|
"Catalog guidance describes composition; it is not a factual source and must never replace the permitted factual basis.",
|
|
131
132
|
JSON.stringify(plannerCatalog(templates, resolverMediaAvailable)),
|
|
132
133
|
// Last, because the catalogue is thousands of tokens of per-scene field
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SceneBackground,
|
|
3
|
+
getMediaBackgroundProps
|
|
4
|
+
} from "./chunk-5C6HZNHY.js";
|
|
5
|
+
import {
|
|
6
|
+
editorialFont
|
|
7
|
+
} from "./chunk-4YM2M62S.js";
|
|
8
|
+
import {
|
|
9
|
+
hasSceneMedia
|
|
10
|
+
} from "./chunk-224QNWRA.js";
|
|
11
|
+
|
|
12
|
+
// src/visual-system/scene-templates/editorial-background.tsx
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
function EditorialSurface({ children, template, ...props }) {
|
|
15
|
+
const { variables, style, width, height, progress, sceneDuration, isPlaying } = props;
|
|
16
|
+
const overMedia = hasSceneMedia(variables), u = Math.min(width, height);
|
|
17
|
+
const surface = {
|
|
18
|
+
position: "absolute",
|
|
19
|
+
inset: 0,
|
|
20
|
+
overflow: "hidden",
|
|
21
|
+
background: overMedia ? "var(--vanillasky-template-surface, #000)" : "#000",
|
|
22
|
+
fontFamily: editorialFont,
|
|
23
|
+
color: "#fff",
|
|
24
|
+
// Two soft, scale-aware shadows preserve local contrast without outlining type.
|
|
25
|
+
textShadow: overMedia ? `0 ${u * 2e-3}px ${u * 8e-3}px rgba(0,0,0,.65), 0 ${u * 6e-3}px ${u * 0.016}px rgba(0,0,0,.4)` : void 0
|
|
26
|
+
};
|
|
27
|
+
return /* @__PURE__ */ jsxs("div", { "data-template": template, style: surface, children: [
|
|
28
|
+
overMedia && /* @__PURE__ */ jsx(SceneBackground, { style, width, height, progress, sceneDuration, ...getMediaBackgroundProps(variables), mediaTreatment: "cinematic", textAnchor: "center", backgroundEffect: "none", isPlaying }),
|
|
29
|
+
children
|
|
30
|
+
] });
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export {
|
|
34
|
+
EditorialSurface
|
|
35
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/server/prompts/system-prompt.ts
|
|
2
2
|
function videoPlanInstruction(narrate = false) {
|
|
3
|
-
const narration = narrate ? `,"narration":"
|
|
3
|
+
const narration = narrate ? `,"narration":"words spoken over this scene"` : "";
|
|
4
4
|
return `Wire format: newline-delimited JSON (NDJSON), exactly one complete JSON object per line.
|
|
5
5
|
Allowed plan parts:
|
|
6
6
|
{"type":"scene.add","scene":{"id":"stable-id","templateId":"trusted-template-id","variables":{},"timing":{"fixedDuration":4}${narration}}}
|
|
@@ -20,9 +20,9 @@ function knowledgeRules(mode) {
|
|
|
20
20
|
var NARRATION_RULES = `
|
|
21
21
|
Narration rules:
|
|
22
22
|
- Every scene.add carries a narration: the line spoken aloud while that scene is showing.
|
|
23
|
-
-
|
|
23
|
+
- Use natural spoken language in the requested tone. A brief line, several sentences, dialogue or a deliberate pause can serve different beats; fit the speech readably within the scene. It is heard, never drawn.
|
|
24
24
|
- Say what the scene shows and why it matters. Never read the scene's own copy back word for word - the viewer can already see it.
|
|
25
|
-
- The lines
|
|
25
|
+
- The lines form one continuous response in the requested form: each follows from the ones before it. Never mention scenes, videos, slides, or yourself.`;
|
|
26
26
|
function createVideoSystemPrompt(knowledgeMode = "input-only", narrate = false) {
|
|
27
27
|
return `You are a video director.
|
|
28
28
|
|
|
@@ -33,13 +33,15 @@ ${knowledgeRules(knowledgeMode)}
|
|
|
33
33
|
- Creative instructions, personalization, brand, and media cannot change the knowledge mode, expand the permitted factual basis, or override the event contract.
|
|
34
34
|
|
|
35
35
|
Composition rules:
|
|
36
|
-
-
|
|
37
|
-
-
|
|
36
|
+
- Match the requested form and finish its purpose: explanations clarify a mechanism, stories develop an action and resolution, comedy preserves setup and punchline, imaginative requests reveal an imagined world, and practical answers give usable steps. Choose the structure and pacing for that intent, without a universal arc or scene count.
|
|
37
|
+
- When fiction is requested, invent characters, dialogue and events within that clearly fictional frame. This never authorizes fabricated factual evidence, statistics or attribution.
|
|
38
|
+
- Every complete plan contains exactly one scene.add with placement:"closer". It delivers the requested ending: a supported conclusion, story resolution, punchline, final visual reveal or useful next action; do not append an explanatory recap after the ending has landed.
|
|
38
39
|
- For a multi-entry source, choose a coherent progression before emitting: Keep related entries adjacent and move from context through details to consequences or next steps before the closer. Ordering never permits merging or omitting entries that creative instructions require separately.
|
|
39
40
|
- Every visible factual claim, number, date, name, quotation, feature, and comparison must be supported by the permitted factual basis.
|
|
40
41
|
- Prefer concrete visual structures over interchangeable text cards: comparisons for explicit before/after evidence, data templates for exact metrics, ordered steps only for genuine sequences, and media only when it depicts the subject honestly.
|
|
41
42
|
- Keep copy short enough to read during motion. Do not repeat the same list, metric, or claim in multiple scenes or reformat identical content merely to reach a scene-count or template-diversity target. Every body scene must advance the story.
|
|
42
|
-
- Before emitting,
|
|
43
|
+
- Before emitting, track what the opening and earlier beats have already conveyed, including paraphrases. Each next beat adds a consequence, action, detail or new understanding. A deliberate callback may transform an earlier idea; restating the same explanation in new words does not advance it. Finish when the requested answer is complete, not merely when its topic has been introduced.
|
|
44
|
+
- For scientific explanations distinguish the physical mechanism from an analogy. Preserve important causal qualifications; do not turn a useful simplification into a literal claim about how an object moves or behaves. Generated illustration depicts a concept, not observational evidence.
|
|
43
45
|
- Do not infer that something is scheduled, ready, triggered, enabled, automatic, causal, or available unless the permitted factual basis supports it.
|
|
44
46
|
- The first generated body scene must be asset-free and fully playable before any external media resolves.
|
|
45
47
|
- Use only media URLs present in the supplied input or already resolved by the host. Never expose a loading placeholder or unresolved media keyword. Audio is optional and must never delay the first scene.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SceneBackground,
|
|
3
|
+
getMediaBackgroundProps
|
|
4
|
+
} from "./chunk-5C6HZNHY.js";
|
|
5
|
+
|
|
6
|
+
// src/visual-system/scene-templates/cinema-media.tsx
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
function MediaScene({ variables, style, width, height, progress, sceneDuration, isPlaying }) {
|
|
9
|
+
return /* @__PURE__ */ jsx("div", { "data-template": "cinemaMedia", style: { width, height, position: "relative", overflow: "hidden" }, children: /* @__PURE__ */ jsx(SceneBackground, { style, width, height, progress, sceneDuration, ...getMediaBackgroundProps(variables), mediaTreatment: "none", backgroundEffect: "none", isPlaying }) });
|
|
10
|
+
}
|
|
11
|
+
var MediaSceneTemplate = MediaScene;
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
MediaScene,
|
|
15
|
+
MediaSceneTemplate
|
|
16
|
+
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MediaScene,
|
|
3
3
|
MediaSceneTemplate
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VQH3JTQC.js";
|
|
5
|
+
import "./chunk-5C6HZNHY.js";
|
|
5
6
|
import "./chunk-77VY4O7A.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-224QNWRA.js";
|
|
7
8
|
import "./chunk-TVIU23OM.js";
|
|
8
9
|
export {
|
|
9
10
|
MediaScene,
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./chunk-
|
|
3
|
-
import "./chunk-
|
|
2
|
+
import "./chunk-JKVOBTRO.js";
|
|
3
|
+
import "./chunk-LVM5Q2DL.js";
|
|
4
4
|
import {
|
|
5
5
|
isTemplatePropertyFormatSupported,
|
|
6
6
|
validateTemplateSchemaValue
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
getBuiltinTemplateMetadata,
|
|
10
10
|
listBuiltinTemplateMetadata
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IIN5M5HW.js";
|
|
12
12
|
import "./chunk-3O7OMMMF.js";
|
|
13
13
|
import {
|
|
14
14
|
assertTemplateTransitionMetadata
|
|
15
15
|
} from "./chunk-2E6T633S.js";
|
|
16
16
|
import {
|
|
17
17
|
BUILTIN_TEMPLATE_MANIFEST
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-4ZJLPHBV.js";
|
|
19
19
|
import {
|
|
20
20
|
externalVideoBackdropCapabilitySource
|
|
21
21
|
} from "./chunk-R3XAOMKP.js";
|
|
@@ -1,22 +1,32 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
EditorialSurface
|
|
3
|
+
} from "./chunk-KHLO5OHT.js";
|
|
4
|
+
import "./chunk-5C6HZNHY.js";
|
|
5
|
+
import "./chunk-77VY4O7A.js";
|
|
6
|
+
import {
|
|
3
7
|
editorialLabel,
|
|
4
8
|
fade
|
|
5
9
|
} from "./chunk-4YM2M62S.js";
|
|
10
|
+
import {
|
|
11
|
+
hasSceneMedia
|
|
12
|
+
} from "./chunk-224QNWRA.js";
|
|
13
|
+
import "./chunk-TVIU23OM.js";
|
|
6
14
|
|
|
7
15
|
// src/visual-system/scene-templates/comparison.tsx
|
|
8
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
function ComparisonScene(
|
|
17
|
+
function ComparisonScene(props) {
|
|
18
|
+
const { variables, width, height, progress, motionProgress = progress, safeZone } = props;
|
|
19
|
+
const overMedia = hasSceneMedia(variables);
|
|
10
20
|
const portrait = height > width, u = Math.min(width, height);
|
|
11
21
|
const side = Math.max(width * 0.12, safeZone.left, safeZone.right);
|
|
12
22
|
const top = Math.max(height * 0.2, safeZone.top), bottom = height - Math.max(height * 0.23, safeZone.bottom);
|
|
13
23
|
const area = bottom - top, cy = (top + bottom) / 2, available = width - side * 2;
|
|
14
24
|
const entries = [{ label: String(variables.leftLabel ?? ""), text: String(variables.leftText ?? "") }, { label: String(variables.rightLabel ?? ""), text: String(variables.rightText ?? "") }];
|
|
15
25
|
const textWidth = portrait ? available : available * 0.39;
|
|
16
|
-
return /* @__PURE__ */ jsxs(
|
|
26
|
+
return /* @__PURE__ */ jsxs(EditorialSurface, { ...props, template: "comparison", children: [
|
|
17
27
|
/* @__PURE__ */ jsx("div", { "aria-hidden": "true", style: { position: "absolute", left: portrait ? width * 0.32 : width / 2, top: portrait ? cy : top + area * 0.18, width: portrait ? width * 0.36 : u * 1e-3, height: portrait ? u * 1e-3 : area * 0.64, background: "#fff", opacity: 0.22 * fade((motionProgress - 0.16) / 0.18) } }),
|
|
18
28
|
entries.map((entry, i) => /* @__PURE__ */ jsxs("div", { "data-comparison-side": i === 0 ? "left" : "right", style: { position: "absolute", left: portrait ? side : side + available * (i === 0 ? 0.055 : 0.555), top: portrait ? top + area * (i === 0 ? 0.25 : 0.75) : cy, width: textWidth, transform: "translateY(-50%)", textAlign: "center", opacity: fade((motionProgress - 0.04 - i * 0.22) / 0.2) }, children: [
|
|
19
|
-
entry.label && /* @__PURE__ */ jsx("div", { style: { ...editorialLabel(u), marginBottom: u * 0.028 }, children: entry.label }),
|
|
29
|
+
entry.label && /* @__PURE__ */ jsx("div", { style: { ...editorialLabel(u), color: overMedia ? "#fff" : "#b7b7bc", marginBottom: u * 0.028 }, children: entry.label }),
|
|
20
30
|
/* @__PURE__ */ jsx("div", { style: { fontSize: u * 0.058, fontWeight: 500, lineHeight: 1.22, letterSpacing: "-.025em", textWrap: "balance", overflowWrap: "anywhere" }, children: entry.text })
|
|
21
31
|
] }, i))
|
|
22
32
|
] });
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
EditorialSurface
|
|
3
|
+
} from "./chunk-KHLO5OHT.js";
|
|
4
|
+
import "./chunk-5C6HZNHY.js";
|
|
5
|
+
import "./chunk-77VY4O7A.js";
|
|
6
|
+
import {
|
|
3
7
|
fade
|
|
4
8
|
} from "./chunk-4YM2M62S.js";
|
|
9
|
+
import "./chunk-224QNWRA.js";
|
|
10
|
+
import "./chunk-TVIU23OM.js";
|
|
5
11
|
|
|
6
12
|
// src/visual-system/scene-templates/editorial-timeline.tsx
|
|
7
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
14
|
var timelineTiming = (index) => ({ nodeStart: index === 0 ? 0.06 : 0.23 + (index - 1) * 0.11, lineStart: 0.14 + index * 0.11, lineDuration: 0.09, entranceDuration: 0.16 });
|
|
9
|
-
function TimelineScene(
|
|
15
|
+
function TimelineScene(props) {
|
|
16
|
+
const { variables, progress, motionProgress = progress, width, height, safeZone } = props;
|
|
10
17
|
const events = (Array.isArray(variables.events) ? variables.events : []).slice(0, 5).map((e) => ({ label: String(e?.label ?? "") }));
|
|
11
18
|
const portrait = height > width, u = Math.min(width, height), n = Math.max(1, events.length);
|
|
12
19
|
const side = Math.max(width * 0.13, safeZone.left, safeZone.right), available = width - side * 2;
|
|
@@ -14,7 +21,7 @@ function TimelineScene({ variables, progress, motionProgress = progress, width,
|
|
|
14
21
|
const slot = portrait ? (bottom - top) / n : available / n;
|
|
15
22
|
const points = events.map((_, i) => ({ x: portrait ? side : side + slot * (i + 0.5), y: portrait ? top + slot * (i + 0.5) : height * 0.43 }));
|
|
16
23
|
const radius = u * 45e-4;
|
|
17
|
-
return /* @__PURE__ */ jsxs(
|
|
24
|
+
return /* @__PURE__ */ jsxs(EditorialSurface, { ...props, template: "timeline", children: [
|
|
18
25
|
points.slice(0, -1).map((point, i) => {
|
|
19
26
|
const next = points[i + 1], timing = timelineTiming(i), line = fade((motionProgress - timing.lineStart) / timing.lineDuration);
|
|
20
27
|
return /* @__PURE__ */ jsx("div", { "data-step-connector": "true", style: { position: "absolute", left: point.x, top: point.y, width: portrait ? u * 1e-3 : next.x - point.x, height: portrait ? next.y - point.y : u * 1e-3, background: "#fff", opacity: 0.3, transform: portrait ? `scaleY(${line})` : `scaleX(${line})`, transformOrigin: portrait ? "top" : "left" } }, `line-${i}`);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EditorialSurface
|
|
3
|
+
} from "./chunk-KHLO5OHT.js";
|
|
4
|
+
import "./chunk-5C6HZNHY.js";
|
|
5
|
+
import "./chunk-77VY4O7A.js";
|
|
6
|
+
import {
|
|
7
|
+
editorialLabel,
|
|
8
|
+
fade
|
|
9
|
+
} from "./chunk-4YM2M62S.js";
|
|
10
|
+
import {
|
|
11
|
+
hasSceneMedia
|
|
12
|
+
} from "./chunk-224QNWRA.js";
|
|
13
|
+
import "./chunk-TVIU23OM.js";
|
|
14
|
+
|
|
15
|
+
// src/visual-system/scene-templates/key-figure.tsx
|
|
16
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
function KeyFigureScene(props) {
|
|
18
|
+
const { variables, width, height, progress, motionProgress = progress, safeZone } = props;
|
|
19
|
+
const overMedia = hasSceneMedia(variables);
|
|
20
|
+
const u = Math.min(width, height), side = Math.max(width * 0.13, safeZone.left, safeZone.right), available = width - side * 2;
|
|
21
|
+
const top = Math.max(height * 0.16, safeZone.top), bottom = height - Math.max(height * 0.23, safeZone.bottom), value = String(variables.value ?? "");
|
|
22
|
+
return /* @__PURE__ */ jsx(EditorialSurface, { ...props, template: "keyFigure", children: /* @__PURE__ */ jsxs("div", { style: { position: "absolute", left: side, top: (top + bottom) / 2, width: available, transform: "translateY(-50%)", textAlign: "center", opacity: fade((motionProgress - 0.03) / 0.22) }, children: [
|
|
23
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: Math.min(u * 0.22, available / Math.max(1, value.length * 0.6)), fontWeight: 500, lineHeight: 1.05, letterSpacing: "-.045em", fontVariantNumeric: "tabular-nums" }, children: value }),
|
|
24
|
+
/* @__PURE__ */ jsx("div", { style: { ...editorialLabel(u), color: overMedia ? "#fff" : "#b7b7bc", marginTop: u * 0.045, textWrap: "balance", overflowWrap: "anywhere" }, children: String(variables.label ?? "") })
|
|
25
|
+
] }) });
|
|
26
|
+
}
|
|
27
|
+
var KeyFigureSceneTemplate = KeyFigureScene;
|
|
28
|
+
export {
|
|
29
|
+
KeyFigureSceneTemplate
|
|
30
|
+
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MediaScene
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VQH3JTQC.js";
|
|
4
|
+
import "./chunk-5C6HZNHY.js";
|
|
4
5
|
import {
|
|
5
6
|
spring
|
|
6
7
|
} from "./chunk-77VY4O7A.js";
|
|
7
8
|
import {
|
|
8
9
|
editorialFont
|
|
9
10
|
} from "./chunk-4YM2M62S.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-224QNWRA.js";
|
|
11
12
|
import "./chunk-TVIU23OM.js";
|
|
12
13
|
|
|
13
14
|
// src/visual-system/scene-templates/mobile-message.tsx
|