@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.
- package/CHANGELOG.md +30 -0
- package/PUBLIC-API.md +5 -8
- package/dist/{builtin-server-CUYPIDE7.js → builtin-server-HW6HGXCZ.js} +2 -2
- package/dist/{catalog-types-BIhSpOWK.d.ts → catalog-types-WTbLP6Jh.d.ts} +5 -1
- package/dist/chapter-title-YRLIQY3V.js +7 -0
- package/dist/check-runtime.js +6 -15
- package/dist/{chunk-2USVB3CY.js → chunk-3ZTEFJIR.js} +285 -178
- package/dist/chunk-4YM2M62S.js +13 -0
- package/dist/chunk-77VY4O7A.js +390 -0
- package/dist/{chunk-MMUXVA47.js → chunk-7M56IUUX.js} +9 -8
- package/dist/chunk-7NZOMTAL.js +63 -0
- package/dist/{chunk-2DOLF4QN.js → chunk-AUPC6MDK.js} +12 -14
- package/dist/{chunk-352ZZCET.js → chunk-EGVQODKU.js} +2 -2
- package/dist/chunk-EWWCQFTI.js +18 -0
- package/dist/{chunk-MXZSDGZQ.js → chunk-G7IZBBWF.js} +14 -9
- package/dist/{chunk-KT3M7KDL.js → chunk-HKUI5BTB.js} +3 -3
- package/dist/{chunk-LMG3GHLL.js → chunk-IQMYK5DX.js} +29 -3
- package/dist/chunk-LH4BPALA.js +564 -0
- package/dist/{chunk-OWBT45EN.js → chunk-MQILEEXC.js} +1 -1
- package/dist/chunk-MXEYPK7M.js +552 -0
- package/dist/{chunk-AITKH6QT.js → chunk-OR52UMSF.js} +13 -39
- package/dist/{chunk-5SLENAJW.js → chunk-PAJ44TFW.js} +1 -2
- package/dist/{chunk-L7QGGKJ2.js → chunk-PDQFQIQW.js} +1 -1
- package/dist/{chunk-WJ6FLKNC.js → chunk-R3XAOMKP.js} +14 -0
- package/dist/{chunk-2OKB27TG.js → chunk-RXTN2CW6.js} +2 -2
- package/dist/{chunk-XWWLKRNU.js → chunk-TVIU23OM.js} +38 -49
- package/dist/{chunk-224QNWRA.js → chunk-UDIODEDK.js} +1 -5
- package/dist/{chunk-3VRMKFM7.js → chunk-ZDJNFA52.js} +11 -24
- package/dist/cinema-media-YQHSIFDA.js +11 -0
- package/dist/cli.js +18 -9
- package/dist/comparison-RZMMHZR2.js +27 -0
- package/dist/compose-video-TBFTONUC.js +12 -0
- package/dist/editorial-timeline-OZX7OS6G.js +36 -0
- package/dist/{events-BQ6z264n.d.ts → events-B4YCc4vc.d.ts} +1 -1
- package/dist/focus-cards-TJ72BT7U.js +20 -0
- package/dist/index.d.ts +4 -6
- package/dist/index.js +3 -7
- package/dist/key-figure-GYENXKH3.js +20 -0
- package/dist/{kit-tQnCPMOM.d.ts → kit-DrRpdn0p.d.ts} +2 -2
- package/dist/mobile-message-UZUPIKHD.js +49 -0
- package/dist/{preload-media-LJXWKTWG.js → preload-media-CFTZIMZL.js} +1 -1
- package/dist/quote-EW5HQA6H.js +23 -0
- package/dist/react.d.ts +21 -11
- package/dist/react.js +590 -833
- package/dist/scene-video-backdrop-PCTARAAJ.js +7 -0
- package/dist/server.d.ts +7 -8
- package/dist/server.js +91 -74
- package/dist/{system-prompt-RRXIWDDD.js → system-prompt-SYRT5DWM.js} +1 -1
- package/dist/template-catalog.d.ts +257 -16
- package/dist/template-catalog.js +1 -1
- package/dist/templates.d.ts +5 -5
- package/dist/test.d.ts +3 -3
- package/dist/test.js +18 -18
- package/dist/text-stream-LD364KBI.js +9 -0
- package/dist/{types-DWFO6qca.d.ts → types-CdBmNTGD.d.ts} +1 -1
- package/dist/{types-CEh9eUFu.d.ts → types-DdZw4GRQ.d.ts} +17 -48
- package/dist/validate-4OUD2CLX.js +10 -0
- package/docs/architecture.md +1 -1
- package/docs/concepts.md +1 -1
- package/docs/custom-templates.md +13 -28
- package/docs/customization.md +11 -59
- package/docs/getting-started.md +2 -2
- package/docs/immersive-interface.md +3 -4
- package/docs/maintainers/cinematic-migration.md +34 -0
- package/docs/media-and-audio.md +14 -14
- package/docs/motion-and-effects.md +6 -14
- package/docs/persistence.md +3 -3
- package/docs/production.md +11 -9
- package/docs/provider-integration.md +9 -16
- package/docs/reference/design-system.html +1 -1
- package/docs/reference/protocol.md +14 -4
- package/docs/testing.md +1 -1
- package/package.json +6 -3
- package/registry/items/backgrounds.json +1 -1
- package/registry/items/chapterTitle.json +80 -0
- package/registry/items/cinemaMedia.json +136 -0
- package/registry/items/comparison.json +101 -0
- package/registry/items/editorialTimeline.json +105 -0
- package/registry/items/focusCards.json +90 -0
- package/registry/items/keyFigure.json +97 -0
- package/registry/items/mobileMessage.json +153 -0
- package/registry/items/quote.json +94 -0
- package/registry/items/template-context.json +1 -1
- package/registry/items/theme.json +1 -1
- package/starters/video-chat/README.md +24 -26
- package/starters/video-chat/package.json +1 -1
- package/starters/video-chat/providers/video.ts +6 -5
- package/starters/video-chat/stock.ts +35 -151
- package/styles/fonts/OFL.txt +93 -0
- package/styles/fonts/manifest.json +66 -0
- package/styles/fonts/roboto-v51-cyrillic-ext.woff2 +0 -0
- package/styles/fonts/roboto-v51-cyrillic.woff2 +0 -0
- package/styles/fonts/roboto-v51-greek-ext.woff2 +0 -0
- package/styles/fonts/roboto-v51-greek.woff2 +0 -0
- package/styles/fonts/roboto-v51-latin-ext.woff2 +0 -0
- package/styles/fonts/roboto-v51-latin.woff2 +0 -0
- package/styles/fonts/roboto-v51-math.woff2 +0 -0
- package/styles/fonts/roboto-v51-symbols.woff2 +0 -0
- package/styles/fonts/roboto-v51-vietnamese.woff2 +0 -0
- package/styles/fonts/roboto.css +91 -0
- package/styles/video-chat.css +30 -22
- package/dist/bg-confetti-HITCGLGD.js +0 -89
- package/dist/bg-emoji-VU4UZYZN.js +0 -150
- package/dist/bg-media-L34PDQXJ.js +0 -106
- package/dist/brand-message-FUJ4STFO.js +0 -256
- package/dist/chart-bar-EGPHJATL.js +0 -310
- package/dist/chart-counter-5FFWQNZO.js +0 -306
- package/dist/chart-progress-ring-JMXQLMLC.js +0 -302
- package/dist/chunk-4UNKZEAT.js +0 -3575
- package/dist/chunk-5CDAM24P.js +0 -31
- package/dist/chunk-AOWSXU2K.js +0 -18
- package/dist/chunk-CJ7F2CE6.js +0 -104
- package/dist/chunk-FRN6WKHA.js +0 -185
- package/dist/chunk-G5JPHBX7.js +0 -336
- package/dist/chunk-L5BTTCZV.js +0 -97
- package/dist/chunk-P22HHFDK.js +0 -43
- package/dist/chunk-PP3MCPN4.js +0 -1998
- package/dist/chunk-QAAO7OAY.js +0 -19
- package/dist/chunk-S7HFLYNN.js +0 -35
- package/dist/chunk-W3VDIBGR.js +0 -217
- package/dist/chunk-XGRA2MUV.js +0 -242
- package/dist/chunk-XTOXFMLM.js +0 -105
- package/dist/chunk-YJJC4N4D.js +0 -761
- package/dist/compose-video-2NFH4DZY.js +0 -13
- package/dist/cta-logo-YR7LYUR5.js +0 -212
- package/dist/cta-media-DQJBKUO2.js +0 -221
- package/dist/incoming-call-54KQ7O5A.js +0 -323
- package/dist/infographic-before-after-ROS52GOW.js +0 -460
- package/dist/infographic-feature-list-E7MGUDAN.js +0 -272
- package/dist/infographic-problem-solution-3S6NGO5N.js +0 -343
- package/dist/infographic-stat-row-SYB7AB7H.js +0 -247
- package/dist/infographic-steps-KCE6JWE2.js +0 -406
- package/dist/prompt-input-MHX4O42G.js +0 -239
- package/dist/reaction-SLEGR3BE.js +0 -122
- package/dist/scene-video-backdrop-XFPX4O3I.js +0 -10
- package/dist/showcase-code-2HLAVKBM.js +0 -357
- package/dist/showcase-phone-Q4HEO4LH.js +0 -278
- package/dist/showcase-terminal-DL45LUFG.js +0 -312
- package/dist/showcase-web-2QZO73FZ.js +0 -396
- package/dist/social-conversation-75SD2637.js +0 -695
- package/dist/social-milestone-GEFUQSBF.js +0 -296
- package/dist/social-notification-FJ5VHVLK.js +0 -247
- package/dist/social-review-stack-KXQCKFRP.js +0 -242
- package/dist/social-testimonial-JZ7CHC7S.js +0 -287
- package/dist/social-tweet-UCDXM25F.js +0 -298
- package/dist/text-stream-54LXABJW.js +0 -10
- package/dist/validate-T7GBU2YF.js +0 -8
- package/registry/items/barChart.json +0 -245
- package/registry/items/beforeAfter.json +0 -180
- package/registry/items/bigNumber.json +0 -232
- package/registry/items/brandMessage.json +0 -164
- package/registry/items/cardList.json +0 -214
- package/registry/items/chatMessenger.json +0 -151
- package/registry/items/chatWhatsapp.json +0 -151
- package/registry/items/codeEditor.json +0 -191
- package/registry/items/confetti.json +0 -107
- package/registry/items/ctaLogo.json +0 -167
- package/registry/items/ctaMedia.json +0 -200
- package/registry/items/emojiBurst.json +0 -101
- package/registry/items/incomingCall.json +0 -177
- package/registry/items/media.json +0 -187
- package/registry/items/milestone.json +0 -212
- package/registry/items/notification.json +0 -189
- package/registry/items/phoneMockup.json +0 -261
- package/registry/items/problemSolution.json +0 -193
- package/registry/items/progressRing.json +0 -206
- package/registry/items/promptInput.json +0 -155
- package/registry/items/reaction.json +0 -176
- package/registry/items/reviewStack.json +0 -231
- package/registry/items/steps.json +0 -215
- package/registry/items/terminal.json +0 -219
- package/registry/items/testimonial.json +0 -171
- package/registry/items/tripleStats.json +0 -235
- package/registry/items/tweet.json +0 -210
- package/registry/items/webMockup.json +0 -280
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createVideo
|
|
3
|
-
} from "./chunk-3VRMKFM7.js";
|
|
4
|
-
import "./chunk-E7CL7UPB.js";
|
|
5
|
-
import "./chunk-2OKB27TG.js";
|
|
6
|
-
import "./chunk-MMUXVA47.js";
|
|
7
|
-
import "./chunk-2DOLF4QN.js";
|
|
8
|
-
import "./chunk-AOWSXU2K.js";
|
|
9
|
-
import "./chunk-3O7OMMMF.js";
|
|
10
|
-
import "./chunk-XGRA2MUV.js";
|
|
11
|
-
export {
|
|
12
|
-
createVideo
|
|
13
|
-
};
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
fitTextSize
|
|
3
|
-
} from "./chunk-S7HFLYNN.js";
|
|
4
|
-
import {
|
|
5
|
-
SceneBackground,
|
|
6
|
-
getMediaBackgroundProps
|
|
7
|
-
} from "./chunk-MXZSDGZQ.js";
|
|
8
|
-
import "./chunk-FRN6WKHA.js";
|
|
9
|
-
import "./chunk-W3VDIBGR.js";
|
|
10
|
-
import {
|
|
11
|
-
SPRING_SMOOTH,
|
|
12
|
-
interpolate,
|
|
13
|
-
spring
|
|
14
|
-
} from "./chunk-XTOXFMLM.js";
|
|
15
|
-
import "./chunk-224QNWRA.js";
|
|
16
|
-
import "./chunk-5CDAM24P.js";
|
|
17
|
-
import {
|
|
18
|
-
TOKEN_DEFAULTS,
|
|
19
|
-
resolveTokens
|
|
20
|
-
} from "./chunk-XWWLKRNU.js";
|
|
21
|
-
|
|
22
|
-
// src/visual-system/primitives/typography/WordmarkReveal.tsx
|
|
23
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
24
|
-
var WordmarkReveal = ({
|
|
25
|
-
progress,
|
|
26
|
-
brandName,
|
|
27
|
-
url = "",
|
|
28
|
-
cta = "",
|
|
29
|
-
logoUrl = "",
|
|
30
|
-
width,
|
|
31
|
-
height,
|
|
32
|
-
font = TOKEN_DEFAULTS.font,
|
|
33
|
-
textColor = "#ffffff"
|
|
34
|
-
}) => {
|
|
35
|
-
const s = Math.min(width, height) / 1080;
|
|
36
|
-
const actionText = cta.trim();
|
|
37
|
-
const addressText = url.trim();
|
|
38
|
-
const landP = spring(
|
|
39
|
-
interpolate(progress, [0, 0.85], [0, 1], {
|
|
40
|
-
extrapolateLeft: "clamp",
|
|
41
|
-
extrapolateRight: "clamp"
|
|
42
|
-
}),
|
|
43
|
-
SPRING_SMOOTH
|
|
44
|
-
);
|
|
45
|
-
const logoZoom = 0.94 + 0.14 * landP;
|
|
46
|
-
const itemOpacity = interpolate(progress, [0, 0.3], [0, 1], {
|
|
47
|
-
extrapolateLeft: "clamp",
|
|
48
|
-
extrapolateRight: "clamp"
|
|
49
|
-
});
|
|
50
|
-
const wordmarkTracking = `${interpolate(landP, [0, 1], [0.4, -0.02])}em`;
|
|
51
|
-
const actionTracking = `${interpolate(landP, [0, 1], [0.12, -0.01])}em`;
|
|
52
|
-
const urlTracking = `${interpolate(landP, [0, 1], [0.2, 0.01])}em`;
|
|
53
|
-
const logoWidth = width * 0.6;
|
|
54
|
-
const logoMaxHeight = height * 0.3;
|
|
55
|
-
const wordmarkSize = fitTextSize(brandName, 96 * s, width * 0.9);
|
|
56
|
-
const actionFontSize = fitTextSize(actionText, 48 * s, width * 0.9);
|
|
57
|
-
const urlFontSize = fitTextSize(addressText, actionText ? 34 * s : 48 * s, width * 0.9);
|
|
58
|
-
const bottomGap = 48 * s;
|
|
59
|
-
return /* @__PURE__ */ jsxs(
|
|
60
|
-
"div",
|
|
61
|
-
{
|
|
62
|
-
style: {
|
|
63
|
-
position: "absolute",
|
|
64
|
-
inset: 0,
|
|
65
|
-
display: "flex",
|
|
66
|
-
flexDirection: "column",
|
|
67
|
-
alignItems: "center",
|
|
68
|
-
justifyContent: "center",
|
|
69
|
-
gap: bottomGap,
|
|
70
|
-
padding: `0 ${48 * s}px`,
|
|
71
|
-
fontFamily: font
|
|
72
|
-
},
|
|
73
|
-
children: [
|
|
74
|
-
logoUrl ? /* @__PURE__ */ jsx(
|
|
75
|
-
"img",
|
|
76
|
-
{
|
|
77
|
-
src: logoUrl,
|
|
78
|
-
alt: brandName,
|
|
79
|
-
style: {
|
|
80
|
-
width: logoWidth,
|
|
81
|
-
maxHeight: logoMaxHeight,
|
|
82
|
-
objectFit: "contain",
|
|
83
|
-
transform: `scale(${logoZoom})`,
|
|
84
|
-
transformOrigin: "center center",
|
|
85
|
-
opacity: itemOpacity,
|
|
86
|
-
display: "block"
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
) : /* @__PURE__ */ jsx(
|
|
90
|
-
"div",
|
|
91
|
-
{
|
|
92
|
-
style: {
|
|
93
|
-
fontSize: wordmarkSize,
|
|
94
|
-
fontWeight: 800,
|
|
95
|
-
color: textColor,
|
|
96
|
-
letterSpacing: wordmarkTracking,
|
|
97
|
-
lineHeight: 1.05,
|
|
98
|
-
textAlign: "center",
|
|
99
|
-
transform: `scale(${logoZoom})`,
|
|
100
|
-
transformOrigin: "center center",
|
|
101
|
-
opacity: itemOpacity,
|
|
102
|
-
textShadow: "0 1px 6px rgba(0,0,0,0.25)"
|
|
103
|
-
},
|
|
104
|
-
children: brandName
|
|
105
|
-
}
|
|
106
|
-
),
|
|
107
|
-
(actionText || addressText) && /* @__PURE__ */ jsxs(
|
|
108
|
-
"div",
|
|
109
|
-
{
|
|
110
|
-
style: {
|
|
111
|
-
display: "flex",
|
|
112
|
-
flexDirection: "column",
|
|
113
|
-
alignItems: "center",
|
|
114
|
-
gap: 12 * s,
|
|
115
|
-
opacity: itemOpacity * 0.92,
|
|
116
|
-
transform: `scale(${0.96 + 0.04 * landP})`,
|
|
117
|
-
transformOrigin: "center center"
|
|
118
|
-
},
|
|
119
|
-
children: [
|
|
120
|
-
actionText && /* @__PURE__ */ jsx("div", { style: {
|
|
121
|
-
fontSize: actionFontSize,
|
|
122
|
-
fontWeight: 700,
|
|
123
|
-
color: textColor,
|
|
124
|
-
textAlign: "center",
|
|
125
|
-
letterSpacing: actionTracking,
|
|
126
|
-
textShadow: "0 1px 6px rgba(0,0,0,0.25)"
|
|
127
|
-
}, children: actionText }),
|
|
128
|
-
addressText && /* @__PURE__ */ jsx("div", { style: {
|
|
129
|
-
fontSize: urlFontSize,
|
|
130
|
-
fontWeight: 500,
|
|
131
|
-
color: textColor,
|
|
132
|
-
textAlign: "center",
|
|
133
|
-
letterSpacing: urlTracking,
|
|
134
|
-
opacity: actionText ? 0.78 : 1,
|
|
135
|
-
textShadow: "0 1px 6px rgba(0,0,0,0.25)"
|
|
136
|
-
}, children: addressText })
|
|
137
|
-
]
|
|
138
|
-
}
|
|
139
|
-
)
|
|
140
|
-
]
|
|
141
|
-
}
|
|
142
|
-
);
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
// src/visual-system/scene-templates/cta-logo.tsx
|
|
146
|
-
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
147
|
-
var CtaLogoTemplate = ({
|
|
148
|
-
variables,
|
|
149
|
-
style,
|
|
150
|
-
progress,
|
|
151
|
-
motionProgress = progress,
|
|
152
|
-
width,
|
|
153
|
-
height,
|
|
154
|
-
sceneDuration,
|
|
155
|
-
isPlaying
|
|
156
|
-
}) => {
|
|
157
|
-
const { foreground, font } = resolveTokens(style);
|
|
158
|
-
const textColor = foreground;
|
|
159
|
-
const brandName = style.brand.name ?? "";
|
|
160
|
-
const url = String(variables.url || "");
|
|
161
|
-
const cta = String(variables.cta || "");
|
|
162
|
-
const logoUrl = style.brand.logoUrl ?? "";
|
|
163
|
-
const mediaUrl = String(variables.mediaUrl || "");
|
|
164
|
-
const mediaType = String(variables.mediaType || "auto");
|
|
165
|
-
return /* @__PURE__ */ jsxs2(
|
|
166
|
-
"div",
|
|
167
|
-
{
|
|
168
|
-
style: {
|
|
169
|
-
width,
|
|
170
|
-
height,
|
|
171
|
-
backgroundColor: "var(--vanillasky-template-surface, #000)",
|
|
172
|
-
position: "relative",
|
|
173
|
-
overflow: "hidden",
|
|
174
|
-
fontFamily: font
|
|
175
|
-
},
|
|
176
|
-
children: [
|
|
177
|
-
/* @__PURE__ */ jsx2(
|
|
178
|
-
SceneBackground,
|
|
179
|
-
{
|
|
180
|
-
style,
|
|
181
|
-
progress,
|
|
182
|
-
sceneDuration,
|
|
183
|
-
width,
|
|
184
|
-
height,
|
|
185
|
-
...getMediaBackgroundProps(variables),
|
|
186
|
-
mediaUrl,
|
|
187
|
-
mediaType,
|
|
188
|
-
seed: brandName,
|
|
189
|
-
isPlaying
|
|
190
|
-
}
|
|
191
|
-
),
|
|
192
|
-
/* @__PURE__ */ jsx2(
|
|
193
|
-
WordmarkReveal,
|
|
194
|
-
{
|
|
195
|
-
progress: motionProgress,
|
|
196
|
-
brandName,
|
|
197
|
-
url,
|
|
198
|
-
cta,
|
|
199
|
-
logoUrl,
|
|
200
|
-
width,
|
|
201
|
-
height,
|
|
202
|
-
font,
|
|
203
|
-
textColor
|
|
204
|
-
}
|
|
205
|
-
)
|
|
206
|
-
]
|
|
207
|
-
}
|
|
208
|
-
);
|
|
209
|
-
};
|
|
210
|
-
export {
|
|
211
|
-
CtaLogoTemplate
|
|
212
|
-
};
|
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
fitTextSize,
|
|
3
|
-
stripPipe
|
|
4
|
-
} from "./chunk-S7HFLYNN.js";
|
|
5
|
-
import {
|
|
6
|
-
SceneBackground,
|
|
7
|
-
getMediaBackgroundProps
|
|
8
|
-
} from "./chunk-MXZSDGZQ.js";
|
|
9
|
-
import {
|
|
10
|
-
TemplateText
|
|
11
|
-
} from "./chunk-YJJC4N4D.js";
|
|
12
|
-
import "./chunk-L5BTTCZV.js";
|
|
13
|
-
import "./chunk-FRN6WKHA.js";
|
|
14
|
-
import "./chunk-W3VDIBGR.js";
|
|
15
|
-
import {
|
|
16
|
-
SPRING_SMOOTH,
|
|
17
|
-
interpolate,
|
|
18
|
-
spring
|
|
19
|
-
} from "./chunk-XTOXFMLM.js";
|
|
20
|
-
import {
|
|
21
|
-
hasSceneMedia
|
|
22
|
-
} from "./chunk-224QNWRA.js";
|
|
23
|
-
import "./chunk-5CDAM24P.js";
|
|
24
|
-
import {
|
|
25
|
-
TOKEN_DEFAULTS,
|
|
26
|
-
resolveTokens
|
|
27
|
-
} from "./chunk-XWWLKRNU.js";
|
|
28
|
-
|
|
29
|
-
// src/visual-system/primitives/typography/CtaMediaClose.tsx
|
|
30
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
31
|
-
var CLAMP = { extrapolateLeft: "clamp", extrapolateRight: "clamp" };
|
|
32
|
-
var CtaMediaClose = ({
|
|
33
|
-
progress,
|
|
34
|
-
motionProgress = progress,
|
|
35
|
-
width,
|
|
36
|
-
height,
|
|
37
|
-
brandName: rawBrandName,
|
|
38
|
-
logoUrl = "",
|
|
39
|
-
url: rawUrl = "",
|
|
40
|
-
cta: rawCta = "",
|
|
41
|
-
font = TOKEN_DEFAULTS.font,
|
|
42
|
-
textColor = "#ffffff",
|
|
43
|
-
safeZone = { left: 0, right: 0 }
|
|
44
|
-
}) => {
|
|
45
|
-
const s = Math.min(width, height) / 1080;
|
|
46
|
-
const brandName = stripPipe(String(rawBrandName || ""));
|
|
47
|
-
const url = stripPipe(String(rawUrl || ""));
|
|
48
|
-
const cta = stripPipe(String(rawCta || ""));
|
|
49
|
-
const fadeP = interpolate(motionProgress, [0, 0.3], [0, 1], CLAMP);
|
|
50
|
-
const scaleSpring = spring(fadeP, SPRING_SMOOTH);
|
|
51
|
-
const itemOpacity = fadeP;
|
|
52
|
-
const itemScale = 0.94 + 0.06 * scaleSpring;
|
|
53
|
-
const landP = spring(
|
|
54
|
-
interpolate(motionProgress, [0, 0.85], [0, 1], CLAMP),
|
|
55
|
-
SPRING_SMOOTH
|
|
56
|
-
);
|
|
57
|
-
const logoZoom = 0.94 + 0.14 * landP;
|
|
58
|
-
const logoWidth = width * 0.6;
|
|
59
|
-
const logoMaxHeight = height * 0.22;
|
|
60
|
-
const logoTop = height * 0.13;
|
|
61
|
-
const wordmarkFontSize = Math.min(width * 0.1, height * 0.1);
|
|
62
|
-
const bottomMaxWidth = width - Math.max(safeZone.left, safeZone.right) * 2;
|
|
63
|
-
const ctaFontSize = fitTextSize(cta, 48 * s, bottomMaxWidth);
|
|
64
|
-
const urlFontSize = fitTextSize(url, cta ? 34 * s : 48 * s, bottomMaxWidth);
|
|
65
|
-
const bottomOffset = height * 0.18;
|
|
66
|
-
return /* @__PURE__ */ jsxs(
|
|
67
|
-
"div",
|
|
68
|
-
{
|
|
69
|
-
style: {
|
|
70
|
-
position: "absolute",
|
|
71
|
-
inset: 0,
|
|
72
|
-
pointerEvents: "none",
|
|
73
|
-
fontFamily: font
|
|
74
|
-
},
|
|
75
|
-
children: [
|
|
76
|
-
logoUrl ? /* @__PURE__ */ jsx(
|
|
77
|
-
"img",
|
|
78
|
-
{
|
|
79
|
-
src: logoUrl,
|
|
80
|
-
alt: brandName || "logo",
|
|
81
|
-
style: {
|
|
82
|
-
position: "absolute",
|
|
83
|
-
top: logoTop,
|
|
84
|
-
left: "50%",
|
|
85
|
-
width: logoWidth,
|
|
86
|
-
maxHeight: logoMaxHeight,
|
|
87
|
-
objectFit: "contain",
|
|
88
|
-
transform: `translateX(-50%) scale(${logoZoom})`,
|
|
89
|
-
transformOrigin: "center center",
|
|
90
|
-
opacity: itemOpacity
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
) : brandName && /* @__PURE__ */ jsx(
|
|
94
|
-
"div",
|
|
95
|
-
{
|
|
96
|
-
style: {
|
|
97
|
-
position: "absolute",
|
|
98
|
-
top: logoTop,
|
|
99
|
-
left: 0,
|
|
100
|
-
right: 0,
|
|
101
|
-
textAlign: "center",
|
|
102
|
-
color: textColor,
|
|
103
|
-
fontSize: wordmarkFontSize,
|
|
104
|
-
fontWeight: 700,
|
|
105
|
-
letterSpacing: -0.5,
|
|
106
|
-
transform: `scale(${logoZoom})`,
|
|
107
|
-
transformOrigin: "center center",
|
|
108
|
-
opacity: itemOpacity,
|
|
109
|
-
textShadow: "0 2px 12px rgba(0,0,0,0.32)"
|
|
110
|
-
},
|
|
111
|
-
children: brandName
|
|
112
|
-
}
|
|
113
|
-
),
|
|
114
|
-
(cta || url) && /* @__PURE__ */ jsxs(
|
|
115
|
-
"div",
|
|
116
|
-
{
|
|
117
|
-
style: {
|
|
118
|
-
position: "absolute",
|
|
119
|
-
left: 0,
|
|
120
|
-
right: 0,
|
|
121
|
-
bottom: bottomOffset,
|
|
122
|
-
display: "flex",
|
|
123
|
-
flexDirection: "column",
|
|
124
|
-
alignItems: "center",
|
|
125
|
-
gap: 12 * s,
|
|
126
|
-
textAlign: "center",
|
|
127
|
-
color: textColor,
|
|
128
|
-
opacity: itemOpacity * 0.92,
|
|
129
|
-
transform: `scale(${itemScale})`,
|
|
130
|
-
transformOrigin: "center center",
|
|
131
|
-
textShadow: "0 1px 4px rgba(0,0,0,0.35)"
|
|
132
|
-
},
|
|
133
|
-
children: [
|
|
134
|
-
cta && /* @__PURE__ */ jsx("div", { style: { fontSize: ctaFontSize, fontWeight: 700, letterSpacing: -0.3 }, children: cta }),
|
|
135
|
-
url && /* @__PURE__ */ jsx("div", { style: { fontSize: urlFontSize, fontWeight: 500, letterSpacing: 0.5, opacity: cta ? 0.78 : 1 }, children: url })
|
|
136
|
-
]
|
|
137
|
-
}
|
|
138
|
-
)
|
|
139
|
-
]
|
|
140
|
-
}
|
|
141
|
-
);
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
// src/visual-system/scene-templates/cta-media.tsx
|
|
145
|
-
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
146
|
-
var CtaMediaTemplate = ({
|
|
147
|
-
variables,
|
|
148
|
-
style,
|
|
149
|
-
progress,
|
|
150
|
-
motionProgress = progress,
|
|
151
|
-
width,
|
|
152
|
-
height,
|
|
153
|
-
sceneDuration,
|
|
154
|
-
beatIntensity,
|
|
155
|
-
textArchetype,
|
|
156
|
-
safeZone,
|
|
157
|
-
isPlaying = true,
|
|
158
|
-
backgroundEffect
|
|
159
|
-
}) => {
|
|
160
|
-
const { primary, foreground, font } = resolveTokens(style);
|
|
161
|
-
const textColor = foreground;
|
|
162
|
-
const headline = String(variables.headline || "");
|
|
163
|
-
return /* @__PURE__ */ jsxs2("div", { style: { width, height, backgroundColor: "var(--vanillasky-template-surface, #000)", position: "relative", overflow: "hidden", fontFamily: font }, children: [
|
|
164
|
-
/* @__PURE__ */ jsx2(
|
|
165
|
-
SceneBackground,
|
|
166
|
-
{
|
|
167
|
-
style,
|
|
168
|
-
progress,
|
|
169
|
-
sceneDuration,
|
|
170
|
-
width,
|
|
171
|
-
height,
|
|
172
|
-
...getMediaBackgroundProps(variables),
|
|
173
|
-
backgroundEffect,
|
|
174
|
-
seed: headline,
|
|
175
|
-
isPlaying,
|
|
176
|
-
beatIntensity
|
|
177
|
-
}
|
|
178
|
-
),
|
|
179
|
-
/* @__PURE__ */ jsx2(
|
|
180
|
-
TemplateText,
|
|
181
|
-
{
|
|
182
|
-
overMedia: hasSceneMedia(variables),
|
|
183
|
-
motionProgress,
|
|
184
|
-
typeTreatment: resolveTokens(style).preset.type,
|
|
185
|
-
archetype: textArchetype || "subtle",
|
|
186
|
-
text: headline,
|
|
187
|
-
progress,
|
|
188
|
-
sceneDuration: sceneDuration ?? 4,
|
|
189
|
-
width,
|
|
190
|
-
height,
|
|
191
|
-
position: "center",
|
|
192
|
-
sizeRole: "headline",
|
|
193
|
-
safeZone,
|
|
194
|
-
font,
|
|
195
|
-
color: textColor,
|
|
196
|
-
beatIntensity
|
|
197
|
-
}
|
|
198
|
-
),
|
|
199
|
-
/* @__PURE__ */ jsx2(
|
|
200
|
-
CtaMediaClose,
|
|
201
|
-
{
|
|
202
|
-
progress,
|
|
203
|
-
motionProgress,
|
|
204
|
-
width,
|
|
205
|
-
height,
|
|
206
|
-
brandName: style.brand.name ?? "",
|
|
207
|
-
logoUrl: style.brand.logoUrl ?? "",
|
|
208
|
-
url: String(variables.url || ""),
|
|
209
|
-
cta: String(variables.cta || ""),
|
|
210
|
-
font,
|
|
211
|
-
textColor,
|
|
212
|
-
accent: primary,
|
|
213
|
-
beatIntensity,
|
|
214
|
-
safeZone: { left: safeZone.left, right: safeZone.right }
|
|
215
|
-
}
|
|
216
|
-
)
|
|
217
|
-
] });
|
|
218
|
-
};
|
|
219
|
-
export {
|
|
220
|
-
CtaMediaTemplate
|
|
221
|
-
};
|