@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
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
editorialFont,
|
|
3
|
-
editorialLabel,
|
|
4
|
-
fade
|
|
5
|
-
} from "./chunk-4YM2M62S.js";
|
|
6
|
-
|
|
7
|
-
// src/visual-system/scene-templates/key-figure.tsx
|
|
8
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
function KeyFigureScene({ variables, width, height, progress, motionProgress = progress, safeZone }) {
|
|
10
|
-
const u = Math.min(width, height), side = Math.max(width * 0.13, safeZone.left, safeZone.right), available = width - side * 2;
|
|
11
|
-
const top = Math.max(height * 0.16, safeZone.top), bottom = height - Math.max(height * 0.23, safeZone.bottom), value = String(variables.value ?? "");
|
|
12
|
-
return /* @__PURE__ */ jsx("div", { "data-template": "keyFigure", style: { position: "absolute", inset: 0, background: "#000", color: "#fff", fontFamily: editorialFont, overflow: "hidden" }, 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: [
|
|
13
|
-
/* @__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 }),
|
|
14
|
-
/* @__PURE__ */ jsx("div", { style: { ...editorialLabel(u), marginTop: u * 0.045, textWrap: "balance", overflowWrap: "anywhere" }, children: String(variables.label ?? "") })
|
|
15
|
-
] }) });
|
|
16
|
-
}
|
|
17
|
-
var KeyFigureSceneTemplate = KeyFigureScene;
|
|
18
|
-
export {
|
|
19
|
-
KeyFigureSceneTemplate
|
|
20
|
-
};
|
package/dist/quote-EW5HQA6H.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
editorialFont,
|
|
3
|
-
fade
|
|
4
|
-
} from "./chunk-4YM2M62S.js";
|
|
5
|
-
|
|
6
|
-
// src/visual-system/scene-templates/quote.tsx
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
function QuoteScene({ variables, width, height, progress, motionProgress = progress, safeZone }) {
|
|
9
|
-
const u = Math.min(width, height), top = Math.max(height * 0.16, safeZone.top), bottom = height - Math.max(height * 0.23, safeZone.bottom);
|
|
10
|
-
const side = Math.max(width * 0.13, safeZone.left, safeZone.right);
|
|
11
|
-
return /* @__PURE__ */ jsx("div", { "data-template": "quote", style: { position: "absolute", inset: 0, background: "#000", color: "#fff", fontFamily: editorialFont, overflow: "hidden" }, children: /* @__PURE__ */ jsxs("div", { style: { position: "absolute", left: side, top: (top + bottom) / 2, width: width - side * 2, transform: "translateY(-50%)", textAlign: "center", opacity: fade((motionProgress - 0.03) / 0.24) }, children: [
|
|
12
|
-
/* @__PURE__ */ jsxs("div", { style: { fontSize: u * 0.067, fontWeight: 500, lineHeight: 1.25, letterSpacing: "-.025em", textWrap: "balance", overflowWrap: "anywhere" }, children: [
|
|
13
|
-
"\u201C",
|
|
14
|
-
String(variables.quote ?? ""),
|
|
15
|
-
"\u201D"
|
|
16
|
-
] }),
|
|
17
|
-
/* @__PURE__ */ jsx("div", { style: { fontSize: u * 0.041, fontWeight: 400, color: "#b7b7bc", lineHeight: 1.3, marginTop: u * 0.065, textWrap: "balance", overflowWrap: "anywhere" }, children: String(variables.attribution ?? "") })
|
|
18
|
-
] }) });
|
|
19
|
-
}
|
|
20
|
-
var QuoteSceneTemplate = QuoteScene;
|
|
21
|
-
export {
|
|
22
|
-
QuoteSceneTemplate
|
|
23
|
-
};
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "focusCards",
|
|
4
|
-
"type": "registry:block",
|
|
5
|
-
"title": "Focus cards",
|
|
6
|
-
"description": "Two to four short phrases fade in sequentially on black; no boxes or heading.",
|
|
7
|
-
"dependencies": [
|
|
8
|
-
"react"
|
|
9
|
-
],
|
|
10
|
-
"registryDependencies": [
|
|
11
|
-
"@vanillasky/template-context",
|
|
12
|
-
"@vanillasky/theme"
|
|
13
|
-
],
|
|
14
|
-
"files": [
|
|
15
|
-
{
|
|
16
|
-
"path": "src/visual-system/scene-templates/focus-cards.tsx",
|
|
17
|
-
"type": "registry:component",
|
|
18
|
-
"target": "vanillasky/scene-templates/focus-cards.tsx",
|
|
19
|
-
"content": "import type {SceneTemplateProps} from './types';\nimport {editorialFont,fade} from './editorial-typography';\n\n/** Short parallel thoughts, each given a quiet entrance and a shared reading hold. */\nfunction CardsScene({variables,width,height,progress,motionProgress=progress,safeZone}:SceneTemplateProps){\n const items=(Array.isArray(variables.items)?variables.items:[]).filter((v):v is string=>typeof v==='string'&&!!v.trim()).slice(0,4);\n const u=Math.min(width,height),n=Math.max(1,items.length);\n const side=Math.max(width*.12,safeZone.left,safeZone.right),available=width-side*2;\n const top=Math.max(height*.18,safeZone.top),bottom=height-Math.max(height*.22,safeZone.bottom);\n const font=u*.057,slot=Math.min(u*.17,(bottom-top)/n),groupHeight=slot*n;\n const listTop=top+(bottom-top-groupHeight)/2;\n return <div data-template=\"cards\" style={{position:'absolute',inset:0,overflow:'hidden',background:'#000',color:'#fff',fontFamily:editorialFont}}>\n {items.map((text,i)=><div data-template-item=\"cardList\" key={i} style={{position:'absolute',left:side,top:listTop+i*slot,width:available,height:slot,display:'flex',alignItems:'center',justifyContent:'center',textAlign:'center',fontSize:Math.min(font,slot/(Math.max(1,Math.ceil(text.length*font*.52/available))*1.6)),fontWeight:500,lineHeight:1.22,letterSpacing:'-.025em',textWrap:'balance',overflowWrap:'anywhere',opacity:fade((motionProgress-.04-i*.14)/.18)}}>{text}</div>)}\n </div>;\n}\n\nexport const CardsSceneTemplate = CardsScene;\n"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"path": "src/visual-system/scene-templates/types.ts",
|
|
23
|
-
"type": "registry:component",
|
|
24
|
-
"target": "vanillasky/scene-templates/types.ts",
|
|
25
|
-
"content": "/**\n * Scene template types.\n *\n * A template is a reusable React component that defines how a scene looks.\n * It declares the variables an editor or model may provide\n * and receives universal settings as props.\n *\n * Templates are searchable by AI via description, category, jobs, register,\n * and useWhen guidance.\n * The variable schema enables any LLM to fill in template variables via JSON.\n */\n\nimport type { ResolvedTokens } from \"../theme\";\nimport type { SafeZone, TemplateStyle } from \"../template-context\";\n\n/**\n * Props passed to every scene template component.\n *\n * All animation must be driven by `progress` (0→1). No CSS animations,\n * no Framer Motion, no requestAnimationFrame. Use interpolate/spring\n * from animation-utils.ts.\n *\n * Scale factor: use `Math.min(width, height) / 1080` — normalizes to\n * the short edge so visuals are consistent across portrait and landscape.\n */\nexport interface SceneTemplateProps {\n variables: Record<string, unknown>;\n style: TemplateStyle;\n /** 0→1 through the scene's duration */\n progress: number;\n /** Presentation clock. Active templates receive the same complete 0→1 timeline as progress. */\n motionProgress?: number;\n /** 0→1 beat pulse intensity */\n beatIntensity: number;\n /** 1080 (portrait) or 1920 (landscape) */\n width: number;\n /** 1920 (portrait) or 1080 (landscape) */\n height: number;\n /** Video-level default text effect (for templates that opt in via usesGlobalTextEffect) */\n textArchetype?: string;\n /** How text leaves the scene (fade / shrink / pop / blur-scale). Falls back to a sensible default per textArchetype when undefined. */\n /** Video-level default background effect (for templates that opt in via usesGlobalBackgroundEffect) */\n backgroundEffect?: string;\n /** Platform-aware safe zone insets in pixels — use for text placement */\n safeZone: SafeZone;\n /** Scene duration in seconds — use for time-based (not progress-based) animations */\n sceneDuration?: number;\n /**\n * Brand tokens already resolved from `style`. Built-in templates import\n * resolveTokens directly; an ejected `custom_*` scene can't import anything,\n * so without this it has no way to reach the same values and ends up\n * hardcoding white, black and shadows — the body then looks generic next to\n * a frame that IS using the brand.\n */\n tokens?: ResolvedTokens;\n /**\n * True when the preview player is actively advancing progress; false when paused.\n * Templates that play HTML5 <video> elements should pause them when this is false.\n * Undefined (export capture path) is treated as true.\n */\n isPlaying?: boolean;\n}\n"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"path": "src/visual-system/scene-templates/editorial-typography.ts",
|
|
29
|
-
"type": "registry:component",
|
|
30
|
-
"target": "vanillasky/scene-templates/editorial-typography.ts",
|
|
31
|
-
"content": "/** Shared typography for quiet editorial scenes. */\nexport const editorialFont = '-apple-system, BlinkMacSystemFont, \"Helvetica Neue\", Roboto, Arial, sans-serif';\nexport const fade = (value: number) => { const t = Math.max(0, Math.min(1, value)); return t * t * (3 - 2 * t); };\n\nexport const editorialLabel = (unit: number) => ({fontSize:unit*.042,fontWeight:400,color:'#b7b7bc',lineHeight:1.25} as const);\n"
|
|
32
|
-
}
|
|
33
|
-
],
|
|
34
|
-
"meta": {
|
|
35
|
-
"vanillasky": {
|
|
36
|
-
"layer": "template",
|
|
37
|
-
"tier": "free",
|
|
38
|
-
"label": "Focus cards",
|
|
39
|
-
"description": "Two to four short phrases fade in sequentially on black; no boxes or heading.",
|
|
40
|
-
"usesGlobalTextEffect": false,
|
|
41
|
-
"usesGlobalTransition": false,
|
|
42
|
-
"usesGlobalBackgroundEffect": false,
|
|
43
|
-
"textCanvas": "tight",
|
|
44
|
-
"family": "Explainers",
|
|
45
|
-
"jobs": [
|
|
46
|
-
"setup",
|
|
47
|
-
"proof"
|
|
48
|
-
],
|
|
49
|
-
"register": "card-led",
|
|
50
|
-
"useWhen": "Two to four short parallel points support an explanation. ",
|
|
51
|
-
"avoidWhen": "The points require an order, long paragraphs, numerical data or additional images to make sense.",
|
|
52
|
-
"minDuration": 4,
|
|
53
|
-
"preferredDuration": 5,
|
|
54
|
-
"timing": {
|
|
55
|
-
"contentFields": [
|
|
56
|
-
"items"
|
|
57
|
-
],
|
|
58
|
-
"contentUnit": "items",
|
|
59
|
-
"revealSeconds": 2.4,
|
|
60
|
-
"holdSeconds": 1.8,
|
|
61
|
-
"exitSeconds": 0
|
|
62
|
-
},
|
|
63
|
-
"schema": {
|
|
64
|
-
"type": "object",
|
|
65
|
-
"properties": {
|
|
66
|
-
"items": {
|
|
67
|
-
"type": "array",
|
|
68
|
-
"minItems": 2,
|
|
69
|
-
"maxItems": 4,
|
|
70
|
-
"items": {
|
|
71
|
-
"type": "string",
|
|
72
|
-
"minLength": 1,
|
|
73
|
-
"maxLength": 55
|
|
74
|
-
},
|
|
75
|
-
"default": [
|
|
76
|
-
"Listen closely",
|
|
77
|
-
"Notice the pattern",
|
|
78
|
-
"Make room for change"
|
|
79
|
-
],
|
|
80
|
-
"description": "2–4 parallel phrases, about 2–6 words each; no heading or numbering."
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
"required": [
|
|
84
|
-
"items"
|
|
85
|
-
],
|
|
86
|
-
"additionalProperties": false
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|