@vanillaskyai/video 0.5.6 → 0.5.7
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 +8 -0
- package/dist/{bg-confetti-572VDSYM.js → bg-confetti-SHQI7ATB.js} +2 -2
- package/dist/{bg-emoji-T4IEJ6U2.js → bg-emoji-XYFRA63Q.js} +2 -2
- package/dist/{bg-media-2D5SQSJX.js → bg-media-FEBATBT2.js} +8 -6
- package/dist/{brand-message-2JCTRIGS.js → brand-message-P56WEJPG.js} +5 -3
- package/dist/{chart-bar-GAJMUB2E.js → chart-bar-ZB45ZRKH.js} +5 -3
- package/dist/{chart-counter-HYGBGXNX.js → chart-counter-HFYNE4HT.js} +8 -6
- package/dist/{chart-progress-ring-DUUVMJAJ.js → chart-progress-ring-ZKMLRGSB.js} +5 -3
- package/dist/check-runtime.js +3 -1
- package/dist/{chunk-CTEYFVUY.js → chunk-6M6DATLW.js} +26 -82
- package/dist/chunk-C6WVCZRW.js +19 -0
- package/dist/chunk-HT6BGERF.js +167 -0
- package/dist/{chunk-3QEKIC6C.js → chunk-NGY3TNND.js} +121 -11
- package/dist/{chunk-MFYFZQHM.js → chunk-W3VDIBGR.js} +1 -0
- package/dist/chunk-WJ6FLKNC.js +15 -0
- package/dist/cli.js +9 -0
- package/dist/{cta-logo-JIG22SWA.js → cta-logo-S4OMTNXD.js} +5 -3
- package/dist/{cta-media-GIHQTPPK.js → cta-media-EROTHDRR.js} +5 -3
- package/dist/{incoming-call-2O5NPJ7B.js → incoming-call-5IWJ2TAS.js} +5 -3
- package/dist/{infographic-before-after-FQXCQ2CY.js → infographic-before-after-2I7YZVDD.js} +2 -2
- package/dist/{infographic-feature-list-MVJ3GQVK.js → infographic-feature-list-7SK65U3K.js} +5 -3
- package/dist/{infographic-problem-solution-ZUF54SNF.js → infographic-problem-solution-IW35S6BR.js} +5 -3
- package/dist/{infographic-stat-row-4DLC5NSC.js → infographic-stat-row-XHUZZPDM.js} +5 -3
- package/dist/{infographic-steps-IT23RFV6.js → infographic-steps-JDDEDI7X.js} +5 -3
- package/dist/{preload-media-IYFMPMLB.js → preload-media-LJXWKTWG.js} +2 -0
- package/dist/{prompt-input-IL7HP5WX.js → prompt-input-6ZWXEL3V.js} +5 -3
- package/dist/react.js +30 -28
- package/dist/{reaction-IDFJZ7HI.js → reaction-Z3JIM3MQ.js} +5 -3
- package/dist/scene-video-backdrop-IL4F2SVD.js +9 -0
- package/dist/{showcase-code-EIGXDZE3.js → showcase-code-NWQAAJIA.js} +5 -3
- package/dist/{showcase-phone-STUZJRXV.js → showcase-phone-5UW45ATT.js} +5 -3
- package/dist/{showcase-terminal-SYP6TKP2.js → showcase-terminal-UVOD25UF.js} +5 -3
- package/dist/{showcase-web-57R4RMTG.js → showcase-web-3AW6VHIG.js} +5 -3
- package/dist/{social-milestone-J6QVX4YJ.js → social-milestone-KPKHFOB5.js} +8 -6
- package/dist/{social-notification-2RYS7NM4.js → social-notification-EDOU6TZB.js} +5 -3
- package/dist/{social-review-stack-25C6JJ4W.js → social-review-stack-EZOO33SV.js} +5 -3
- package/dist/{social-testimonial-SH54T4CW.js → social-testimonial-DLOINMMY.js} +5 -3
- package/dist/{social-tweet-T7RTFQ6T.js → social-tweet-6JUM323G.js} +5 -3
- package/examples/nextjs-quickstart/package.json +1 -1
- package/package.json +1 -1
- package/registry/items/backgrounds.json +19 -1
- package/registry/items/barChart.json +2 -2
- package/registry/items/beforeAfter.json +1 -1
- package/registry/items/bigNumber.json +2 -2
- package/registry/items/brandMessage.json +2 -2
- package/registry/items/cardList.json +2 -2
- package/registry/items/codeEditor.json +2 -2
- package/registry/items/confetti.json +1 -1
- package/registry/items/ctaLogo.json +2 -2
- package/registry/items/ctaMedia.json +2 -2
- package/registry/items/emojiBurst.json +1 -1
- package/registry/items/incomingCall.json +2 -2
- package/registry/items/media.json +2 -2
- package/registry/items/milestone.json +2 -2
- package/registry/items/notification.json +2 -2
- package/registry/items/phoneMockup.json +2 -2
- package/registry/items/problemSolution.json +2 -2
- package/registry/items/progressRing.json +2 -2
- package/registry/items/promptInput.json +2 -2
- package/registry/items/reaction.json +2 -2
- package/registry/items/reviewStack.json +2 -2
- package/registry/items/steps.json +2 -2
- package/registry/items/terminal.json +2 -2
- package/registry/items/testimonial.json +2 -2
- package/registry/items/tripleStats.json +2 -2
- package/registry/items/tweet.json +2 -2
- package/registry/items/webMockup.json +2 -2
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ExternalVideoBackdropProvider
|
|
3
|
+
} from "./chunk-C6WVCZRW.js";
|
|
1
4
|
import {
|
|
2
5
|
limitsConcurrentVideoDecoders,
|
|
3
6
|
resolveMediaType
|
|
@@ -8,12 +11,21 @@ import {
|
|
|
8
11
|
import {
|
|
9
12
|
resolveVideoTimeline
|
|
10
13
|
} from "./chunk-SPVTJH3F.js";
|
|
14
|
+
import {
|
|
15
|
+
supportsExternalVideoBackdrop
|
|
16
|
+
} from "./chunk-WJ6FLKNC.js";
|
|
11
17
|
import {
|
|
12
18
|
getTemplateDefaults
|
|
13
19
|
} from "./chunk-73NTSFFI.js";
|
|
14
20
|
|
|
15
21
|
// src/player/video-frame.tsx
|
|
16
|
-
import {
|
|
22
|
+
import {
|
|
23
|
+
createElement,
|
|
24
|
+
lazy,
|
|
25
|
+
Suspense,
|
|
26
|
+
useState,
|
|
27
|
+
useSyncExternalStore
|
|
28
|
+
} from "react";
|
|
17
29
|
|
|
18
30
|
// src/visual-system/layout.ts
|
|
19
31
|
function getDimensions(orientation = "portrait") {
|
|
@@ -35,8 +47,18 @@ function scaleSafeZone(zone, factor) {
|
|
|
35
47
|
// src/player/video-frame.tsx
|
|
36
48
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
37
49
|
var SCENE_TRANSITION_SECONDS = 0.3;
|
|
50
|
+
var SceneVideoBackdrop = lazy(() => import("./scene-video-backdrop-IL4F2SVD.js").then((module) => ({ default: module.SceneVideoBackdrop })));
|
|
38
51
|
var MEDIA_PREROLL_SECONDS = 1.2;
|
|
39
52
|
var CONTIGUITY_ULP_FACTOR = 4;
|
|
53
|
+
var subscribeToDecoderPolicy = () => () => {
|
|
54
|
+
};
|
|
55
|
+
function useDecoderConstraint() {
|
|
56
|
+
return useSyncExternalStore(
|
|
57
|
+
subscribeToDecoderPolicy,
|
|
58
|
+
limitsConcurrentVideoDecoders,
|
|
59
|
+
() => false
|
|
60
|
+
);
|
|
61
|
+
}
|
|
40
62
|
function clamp01(value) {
|
|
41
63
|
return Math.max(0, Math.min(1, value));
|
|
42
64
|
}
|
|
@@ -60,11 +82,21 @@ function sceneHasBackdrop(range) {
|
|
|
60
82
|
return String(range.scene.variables.mediaType || "auto") !== "gradient" && String(range.scene.variables.mediaUrl || "").trim() !== "";
|
|
61
83
|
}
|
|
62
84
|
function sceneHasVideoBackdrop(range) {
|
|
63
|
-
|
|
85
|
+
const mediaUrl = String(range.scene.variables.mediaUrl || "").trim();
|
|
86
|
+
return mediaUrl !== "" && resolveMediaType(
|
|
64
87
|
String(range.scene.variables.mediaType || "auto"),
|
|
65
|
-
|
|
88
|
+
mediaUrl
|
|
66
89
|
) === "video";
|
|
67
90
|
}
|
|
91
|
+
function registrySupportsExternalVideoBackdrop(kit) {
|
|
92
|
+
return kit.templates.every((template) => {
|
|
93
|
+
const properties = template.schema?.properties;
|
|
94
|
+
if (!properties?.mediaUrl) return true;
|
|
95
|
+
const mediaTypes = properties.mediaType?.enum;
|
|
96
|
+
const canRenderVideo = mediaTypes == null || mediaTypes.includes("video") || mediaTypes.includes("auto");
|
|
97
|
+
return !canRenderVideo || supportsExternalVideoBackdrop(template);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
68
100
|
function sceneBackgroundChanges(left, right) {
|
|
69
101
|
const mediaUrl = (range) => String(range.scene.variables.mediaType || "auto") === "gradient" ? "" : String(range.scene.variables.mediaUrl || "");
|
|
70
102
|
return mediaUrl(left) !== mediaUrl(right);
|
|
@@ -81,11 +113,12 @@ function SceneLayer({
|
|
|
81
113
|
layer,
|
|
82
114
|
opacity,
|
|
83
115
|
interactive,
|
|
84
|
-
zIndex
|
|
116
|
+
zIndex,
|
|
117
|
+
externalVideoBackdrop
|
|
85
118
|
}) {
|
|
86
119
|
const template = kit.getTemplate(range.scene.templateId);
|
|
87
120
|
const duration = range.end - range.start;
|
|
88
|
-
return /* @__PURE__ */ jsx(
|
|
121
|
+
return /* @__PURE__ */ jsx(ExternalVideoBackdropProvider, { mode: externalVideoBackdrop, children: /* @__PURE__ */ jsx(
|
|
89
122
|
"div",
|
|
90
123
|
{
|
|
91
124
|
"data-scene-layer": layer,
|
|
@@ -102,7 +135,8 @@ function SceneLayer({
|
|
|
102
135
|
// A changed-media transition can expose an incoming template's true
|
|
103
136
|
// initial frame. Values that would be false placeholders at progress
|
|
104
137
|
// zero opt into this inherited guard.
|
|
105
|
-
"--vanillasky-transition-semantic-visibility": layer === "incoming" ? "hidden" : "visible"
|
|
138
|
+
"--vanillasky-transition-semantic-visibility": layer === "incoming" ? "hidden" : "visible",
|
|
139
|
+
"--vanillasky-template-surface": externalVideoBackdrop !== false ? "transparent" : void 0
|
|
106
140
|
},
|
|
107
141
|
children: template ? /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(
|
|
108
142
|
"div",
|
|
@@ -134,7 +168,7 @@ function SceneLayer({
|
|
|
134
168
|
range.scene.templateId
|
|
135
169
|
] })
|
|
136
170
|
}
|
|
137
|
-
);
|
|
171
|
+
) });
|
|
138
172
|
}
|
|
139
173
|
function VideoFrame({
|
|
140
174
|
kit,
|
|
@@ -146,6 +180,9 @@ function VideoFrame({
|
|
|
146
180
|
className,
|
|
147
181
|
style
|
|
148
182
|
}) {
|
|
183
|
+
const [failedPersistentVideo, setFailedPersistentVideo] = useState();
|
|
184
|
+
const [readyPersistentVideo, setReadyPersistentVideo] = useState();
|
|
185
|
+
const decoderConstrainedDevice = useDecoderConstraint();
|
|
149
186
|
const timeline = resolveVideoTimeline(config);
|
|
150
187
|
const lastRange = timeline.at(-1);
|
|
151
188
|
const foundIndex = timeline.findIndex((range) => time >= range.start && time < range.end);
|
|
@@ -202,8 +239,30 @@ function VideoFrame({
|
|
|
202
239
|
const prerollDuration = prerollsNext ? Math.min(Math.max(MEDIA_PREROLL_SECONDS, blendDuration), Math.max(0, duration)) : blendDuration;
|
|
203
240
|
const prerollStart = active.end - prerollDuration;
|
|
204
241
|
const decoderConstrainedTransition = Boolean(
|
|
205
|
-
contiguousNext &&
|
|
242
|
+
contiguousNext && decoderConstrainedDevice && sceneHasVideoBackdrop(active) && sceneHasVideoBackdrop(contiguousNext)
|
|
243
|
+
);
|
|
244
|
+
const persistentVideoEnabled = decoderConstrainedDevice && registrySupportsExternalVideoBackdrop(kit);
|
|
245
|
+
const activeUsesPersistentVideo = persistentVideoEnabled && sceneHasVideoBackdrop(active);
|
|
246
|
+
const incomingUsesPersistentVideo = Boolean(
|
|
247
|
+
persistentVideoEnabled && contiguousNext && !sceneHasVideoBackdrop(active) && sceneHasVideoBackdrop(contiguousNext) && time >= prerollStart && time < blendEnd
|
|
206
248
|
);
|
|
249
|
+
const persistentVideoRange = activeUsesPersistentVideo ? active : incomingUsesPersistentVideo && contiguousNext ? contiguousNext : void 0;
|
|
250
|
+
const persistentVideoKey = persistentVideoRange ? `${persistentVideoRange.scene.id}\0${String(persistentVideoRange.scene.variables.mediaUrl || "")}` : void 0;
|
|
251
|
+
const firstVideoRange = timeline.find(sceneHasVideoBackdrop);
|
|
252
|
+
const posterPreparationRange = activeUsesPersistentVideo ? contiguousNext && sceneHasVideoBackdrop(contiguousNext) ? contiguousNext : activeIndex === timeline.length - 1 && firstVideoRange?.scene.id !== active.scene.id ? firstVideoRange : void 0 : void 0;
|
|
253
|
+
const preparedPoster = posterPreparationRange && String(
|
|
254
|
+
posterPreparationRange.scene.variables.mediaPoster || ""
|
|
255
|
+
) ? {
|
|
256
|
+
presentationKey: `${posterPreparationRange.scene.id}\0${String(
|
|
257
|
+
posterPreparationRange.scene.variables.mediaUrl || ""
|
|
258
|
+
)}`,
|
|
259
|
+
mediaPoster: String(posterPreparationRange.scene.variables.mediaPoster),
|
|
260
|
+
mediaPosition: String(posterPreparationRange.scene.variables.mediaPosition || "center"),
|
|
261
|
+
backgroundEffect: posterPreparationRange.scene.backgroundEffect ?? config.style.defaultBackgroundEffect
|
|
262
|
+
} : void 0;
|
|
263
|
+
const persistentVideoFailed = persistentVideoKey !== void 0 && failedPersistentVideo === persistentVideoKey;
|
|
264
|
+
const persistentVideoReady = persistentVideoRange !== void 0 && (String(persistentVideoRange.scene.variables.mediaPoster || "") !== "" || readyPersistentVideo === persistentVideoKey);
|
|
265
|
+
const persistentVideoMode = persistentVideoFailed ? "fallback" : persistentVideoReady ? "ready" : "pending";
|
|
207
266
|
const mountingNext = Boolean(
|
|
208
267
|
contiguousNext && !decoderConstrainedTransition && time >= prerollStart && time < blendEnd && (eligibleNextTransition || prerollsNext)
|
|
209
268
|
);
|
|
@@ -261,6 +320,54 @@ function VideoFrame({
|
|
|
261
320
|
}
|
|
262
321
|
}
|
|
263
322
|
),
|
|
323
|
+
persistentVideoRange && !persistentVideoFailed && /* @__PURE__ */ jsx(
|
|
324
|
+
"div",
|
|
325
|
+
{
|
|
326
|
+
"data-persistent-video-scene-id": persistentVideoRange.scene.id,
|
|
327
|
+
"aria-hidden": "true",
|
|
328
|
+
style: { position: "absolute", inset: 0, zIndex: 0 },
|
|
329
|
+
children: /* @__PURE__ */ jsx(Suspense, { fallback: String(persistentVideoRange.scene.variables.mediaPoster || "") ? /* @__PURE__ */ jsx(
|
|
330
|
+
"img",
|
|
331
|
+
{
|
|
332
|
+
src: String(persistentVideoRange.scene.variables.mediaPoster),
|
|
333
|
+
alt: "",
|
|
334
|
+
"data-video-poster-plane": "loading",
|
|
335
|
+
"data-video-poster-visible": "true",
|
|
336
|
+
style: {
|
|
337
|
+
position: "absolute",
|
|
338
|
+
inset: 0,
|
|
339
|
+
width: "100%",
|
|
340
|
+
height: "100%",
|
|
341
|
+
objectFit: "cover",
|
|
342
|
+
objectPosition: String(persistentVideoRange.scene.variables.mediaPosition || "center")
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
) : null, children: /* @__PURE__ */ jsx(
|
|
346
|
+
SceneVideoBackdrop,
|
|
347
|
+
{
|
|
348
|
+
mediaUrl: String(persistentVideoRange.scene.variables.mediaUrl || ""),
|
|
349
|
+
mediaPoster: String(persistentVideoRange.scene.variables.mediaPoster || "") || void 0,
|
|
350
|
+
mediaPosition: String(persistentVideoRange.scene.variables.mediaPosition || "center"),
|
|
351
|
+
backgroundEffect: persistentVideoRange.scene.backgroundEffect ?? config.style.defaultBackgroundEffect,
|
|
352
|
+
progress: persistentVideoRange.scene.id === active.scene.id ? rawProgress : 0,
|
|
353
|
+
isPlaying: persistentVideoRange.scene.id === active.scene.id && playing,
|
|
354
|
+
playbackId: persistentVideoRange.scene.id,
|
|
355
|
+
retainPoster: true,
|
|
356
|
+
persistent: true,
|
|
357
|
+
preparedPoster: preparedPoster ? {
|
|
358
|
+
...preparedPoster,
|
|
359
|
+
// The image is already decoded and costs no second video
|
|
360
|
+
// decoder. Fade it above the outgoing video using the same
|
|
361
|
+
// authored transition clock, then reuse that exact DOM image
|
|
362
|
+
// as the new source's underlay at the cut.
|
|
363
|
+
opacity: decoderConstrainedTransition ? blendProgress : 0
|
|
364
|
+
} : void 0,
|
|
365
|
+
onReady: () => setReadyPersistentVideo(persistentVideoKey),
|
|
366
|
+
onError: () => setFailedPersistentVideo(persistentVideoKey)
|
|
367
|
+
}
|
|
368
|
+
) })
|
|
369
|
+
}
|
|
370
|
+
),
|
|
264
371
|
mountingNext && contiguousNext ? [
|
|
265
372
|
/* @__PURE__ */ jsx(
|
|
266
373
|
SceneLayer,
|
|
@@ -276,7 +383,8 @@ function VideoFrame({
|
|
|
276
383
|
layer: previewingNext ? "outgoing" : "active",
|
|
277
384
|
opacity: 1 - blendProgress,
|
|
278
385
|
interactive: true,
|
|
279
|
-
zIndex: 1
|
|
386
|
+
zIndex: 1,
|
|
387
|
+
externalVideoBackdrop: persistentVideoRange?.scene.id === active.scene.id ? persistentVideoMode : false
|
|
280
388
|
},
|
|
281
389
|
active.scene.id
|
|
282
390
|
),
|
|
@@ -294,7 +402,8 @@ function VideoFrame({
|
|
|
294
402
|
layer: "incoming",
|
|
295
403
|
opacity: blendProgress,
|
|
296
404
|
interactive: false,
|
|
297
|
-
zIndex: 2
|
|
405
|
+
zIndex: 2,
|
|
406
|
+
externalVideoBackdrop: persistentVideoRange?.scene.id === contiguousNext.scene.id ? persistentVideoMode : false
|
|
298
407
|
},
|
|
299
408
|
contiguousNext.scene.id
|
|
300
409
|
)
|
|
@@ -313,7 +422,8 @@ function VideoFrame({
|
|
|
313
422
|
layer: "active",
|
|
314
423
|
opacity: 1,
|
|
315
424
|
interactive: true,
|
|
316
|
-
zIndex: 1
|
|
425
|
+
zIndex: 1,
|
|
426
|
+
externalVideoBackdrop: persistentVideoRange?.scene.id === active.scene.id ? persistentVideoMode : false
|
|
317
427
|
},
|
|
318
428
|
active.scene.id
|
|
319
429
|
)
|
|
@@ -112,6 +112,7 @@ var BrandGradientOverlay = ({ style: globalStyle, progress, sceneDuration, seed
|
|
|
112
112
|
const [first, second] = tokens.background.type === "gradient" ? tokens.background.colors : [tokens.background.color, tokens.background.color];
|
|
113
113
|
const solidBg = tokens.background.type === "solid" ? tokens.background.color : void 0;
|
|
114
114
|
return React.createElement("div", {
|
|
115
|
+
"data-brand-gradient": "true",
|
|
115
116
|
style: {
|
|
116
117
|
position: "absolute",
|
|
117
118
|
inset: 0,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/visual-system/catalog/video-backdrop-capability.ts
|
|
2
|
+
var EXTERNAL_VIDEO_BACKDROP_CAPABILITY = "__vanillaskyExternalVideoBackdrop";
|
|
3
|
+
function supportsExternalVideoBackdrop(template) {
|
|
4
|
+
if (typeof template !== "object" || template === null) return false;
|
|
5
|
+
const component = template.component;
|
|
6
|
+
return (typeof component === "object" && component !== null || typeof component === "function") && component[EXTERNAL_VIDEO_BACKDROP_CAPABILITY] === true;
|
|
7
|
+
}
|
|
8
|
+
function externalVideoBackdropCapabilitySource() {
|
|
9
|
+
return JSON.stringify(EXTERNAL_VIDEO_BACKDROP_CAPABILITY);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
supportsExternalVideoBackdrop,
|
|
14
|
+
externalVideoBackdropCapabilitySource
|
|
15
|
+
};
|
package/dist/cli.js
CHANGED
|
@@ -16,6 +16,9 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
BUILTIN_TEMPLATE_MANIFEST
|
|
18
18
|
} from "./chunk-HVCPEAQF.js";
|
|
19
|
+
import {
|
|
20
|
+
externalVideoBackdropCapabilitySource
|
|
21
|
+
} from "./chunk-WJ6FLKNC.js";
|
|
19
22
|
import {
|
|
20
23
|
getTemplateDefaults,
|
|
21
24
|
isMeaningfullyPresentTemplateValue,
|
|
@@ -182,6 +185,9 @@ function templateSource(item2) {
|
|
|
182
185
|
const component = templateFile.content.match(/export const (\w+Template)\b/)?.[1];
|
|
183
186
|
if (!component) throw new Error(`Cannot identify the component exported by ${item2.name}`);
|
|
184
187
|
const definition = templateDefinition(item2);
|
|
188
|
+
const properties = definition.schema.properties;
|
|
189
|
+
const mediaTypes = properties.mediaType?.enum;
|
|
190
|
+
const supportsExternalVideoBackdrop = !!properties.mediaUrl && (mediaTypes == null || mediaTypes.includes("video") || mediaTypes.includes("auto"));
|
|
185
191
|
const definitionLines = JSON.stringify(definition, null, 2).split("\n").slice(1, -1);
|
|
186
192
|
definitionLines[definitionLines.length - 1] += ",";
|
|
187
193
|
let componentSource = templateFile.content.replace(/(from\s+["'])\.\//g, "$1../scene-templates/").replace(/(import\(\s*["'])\.\//g, "$1../scene-templates/").replace(
|
|
@@ -201,6 +207,9 @@ function templateSource(item2) {
|
|
|
201
207
|
...definitionLines,
|
|
202
208
|
` component: ${component},`,
|
|
203
209
|
"});",
|
|
210
|
+
...supportsExternalVideoBackdrop ? [
|
|
211
|
+
`Object.defineProperty(${component}, ${externalVideoBackdropCapabilitySource()}, { value: true });`
|
|
212
|
+
] : [],
|
|
204
213
|
""
|
|
205
214
|
].join("\n");
|
|
206
215
|
}
|
|
@@ -4,13 +4,15 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
SceneBackground,
|
|
6
6
|
getMediaBackgroundProps
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-6M6DATLW.js";
|
|
8
|
+
import "./chunk-HT6BGERF.js";
|
|
9
|
+
import "./chunk-W3VDIBGR.js";
|
|
9
10
|
import {
|
|
10
11
|
SPRING_SMOOTH,
|
|
11
12
|
interpolate,
|
|
12
13
|
spring
|
|
13
14
|
} from "./chunk-XTOXFMLM.js";
|
|
15
|
+
import "./chunk-C6WVCZRW.js";
|
|
14
16
|
import "./chunk-224QNWRA.js";
|
|
15
17
|
import {
|
|
16
18
|
TOKEN_DEFAULTS,
|
|
@@ -166,7 +168,7 @@ var CtaLogoTemplate = ({
|
|
|
166
168
|
style: {
|
|
167
169
|
width,
|
|
168
170
|
height,
|
|
169
|
-
backgroundColor: "#000",
|
|
171
|
+
backgroundColor: "var(--vanillasky-template-surface, #000)",
|
|
170
172
|
position: "relative",
|
|
171
173
|
overflow: "hidden",
|
|
172
174
|
fontFamily: font
|
|
@@ -5,17 +5,19 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
SceneBackground,
|
|
7
7
|
getMediaBackgroundProps
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6M6DATLW.js";
|
|
9
9
|
import {
|
|
10
10
|
TemplateText
|
|
11
11
|
} from "./chunk-TCEHK2BW.js";
|
|
12
12
|
import "./chunk-L5BTTCZV.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-HT6BGERF.js";
|
|
14
|
+
import "./chunk-W3VDIBGR.js";
|
|
14
15
|
import {
|
|
15
16
|
SPRING_SMOOTH,
|
|
16
17
|
interpolate,
|
|
17
18
|
spring
|
|
18
19
|
} from "./chunk-XTOXFMLM.js";
|
|
20
|
+
import "./chunk-C6WVCZRW.js";
|
|
19
21
|
import {
|
|
20
22
|
hasSceneMedia
|
|
21
23
|
} from "./chunk-224QNWRA.js";
|
|
@@ -158,7 +160,7 @@ var CtaMediaTemplate = ({
|
|
|
158
160
|
const { primary, foreground, font } = resolveTokens(style);
|
|
159
161
|
const textColor = foreground;
|
|
160
162
|
const headline = String(variables.headline || "");
|
|
161
|
-
return /* @__PURE__ */ jsxs2("div", { style: { width, height, backgroundColor: "#000", position: "relative", overflow: "hidden", fontFamily: font }, children: [
|
|
163
|
+
return /* @__PURE__ */ jsxs2("div", { style: { width, height, backgroundColor: "var(--vanillasky-template-surface, #000)", position: "relative", overflow: "hidden", fontFamily: font }, children: [
|
|
162
164
|
/* @__PURE__ */ jsx2(
|
|
163
165
|
SceneBackground,
|
|
164
166
|
{
|
|
@@ -5,14 +5,16 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
SceneBackground,
|
|
7
7
|
getMediaBackgroundProps
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-6M6DATLW.js";
|
|
9
|
+
import "./chunk-HT6BGERF.js";
|
|
10
|
+
import "./chunk-W3VDIBGR.js";
|
|
10
11
|
import {
|
|
11
12
|
SPRING_BOUNCY,
|
|
12
13
|
SPRING_SMOOTH,
|
|
13
14
|
interpolate,
|
|
14
15
|
spring
|
|
15
16
|
} from "./chunk-XTOXFMLM.js";
|
|
17
|
+
import "./chunk-C6WVCZRW.js";
|
|
16
18
|
import "./chunk-224QNWRA.js";
|
|
17
19
|
import {
|
|
18
20
|
resolveTokens
|
|
@@ -274,7 +276,7 @@ var IncomingCallTemplate = ({
|
|
|
274
276
|
style: {
|
|
275
277
|
width,
|
|
276
278
|
height,
|
|
277
|
-
backgroundColor: "#000",
|
|
279
|
+
backgroundColor: "var(--vanillasky-template-surface, #000)",
|
|
278
280
|
position: "relative",
|
|
279
281
|
overflow: "hidden",
|
|
280
282
|
fontFamily: "system-ui, -apple-system, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif"
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-L5BTTCZV.js";
|
|
14
14
|
import {
|
|
15
15
|
gradientBackground
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-W3VDIBGR.js";
|
|
17
17
|
import {
|
|
18
18
|
interpolate,
|
|
19
19
|
spring
|
|
@@ -408,7 +408,7 @@ var InfographicBeforeAfterTemplate = ({
|
|
|
408
408
|
style: {
|
|
409
409
|
width,
|
|
410
410
|
height,
|
|
411
|
-
backgroundColor: "#000",
|
|
411
|
+
backgroundColor: "var(--vanillasky-template-surface, #000)",
|
|
412
412
|
position: "relative",
|
|
413
413
|
overflow: "hidden",
|
|
414
414
|
fontFamily: font
|
|
@@ -7,18 +7,20 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
SceneBackground,
|
|
9
9
|
getMediaBackgroundProps
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6M6DATLW.js";
|
|
11
11
|
import {
|
|
12
12
|
TemplateText
|
|
13
13
|
} from "./chunk-TCEHK2BW.js";
|
|
14
14
|
import {
|
|
15
15
|
Emoji
|
|
16
16
|
} from "./chunk-L5BTTCZV.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-HT6BGERF.js";
|
|
18
|
+
import "./chunk-W3VDIBGR.js";
|
|
18
19
|
import {
|
|
19
20
|
interpolate,
|
|
20
21
|
spring
|
|
21
22
|
} from "./chunk-XTOXFMLM.js";
|
|
23
|
+
import "./chunk-C6WVCZRW.js";
|
|
22
24
|
import {
|
|
23
25
|
hasSceneMedia
|
|
24
26
|
} from "./chunk-224QNWRA.js";
|
|
@@ -215,7 +217,7 @@ var InfographicFeatureListTemplate = ({
|
|
|
215
217
|
const labels = parseList(variables.items, 3);
|
|
216
218
|
const emojis = parseList(variables.itemEmojis);
|
|
217
219
|
const features = labels.map((title, index) => ({ title, icon: emojis[index] || "\u2726" }));
|
|
218
|
-
return /* @__PURE__ */ jsxs2("div", { style: { width, height, backgroundColor: "#000", position: "relative", overflow: "hidden", fontFamily: font }, children: [
|
|
220
|
+
return /* @__PURE__ */ jsxs2("div", { style: { width, height, backgroundColor: "var(--vanillasky-template-surface, #000)", position: "relative", overflow: "hidden", fontFamily: font }, children: [
|
|
219
221
|
/* @__PURE__ */ jsx2(
|
|
220
222
|
SceneBackground,
|
|
221
223
|
{
|
package/dist/{infographic-problem-solution-ZUF54SNF.js → infographic-problem-solution-IW35S6BR.js}
RENAMED
|
@@ -4,16 +4,18 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
SceneBackground,
|
|
6
6
|
getMediaBackgroundProps
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6M6DATLW.js";
|
|
8
8
|
import {
|
|
9
9
|
smoothSize
|
|
10
10
|
} from "./chunk-TCEHK2BW.js";
|
|
11
11
|
import "./chunk-L5BTTCZV.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-HT6BGERF.js";
|
|
13
|
+
import "./chunk-W3VDIBGR.js";
|
|
13
14
|
import {
|
|
14
15
|
interpolate,
|
|
15
16
|
spring
|
|
16
17
|
} from "./chunk-XTOXFMLM.js";
|
|
18
|
+
import "./chunk-C6WVCZRW.js";
|
|
17
19
|
import "./chunk-224QNWRA.js";
|
|
18
20
|
import {
|
|
19
21
|
TOKEN_DEFAULTS,
|
|
@@ -296,7 +298,7 @@ var InfographicProblemSolutionTemplate = ({
|
|
|
296
298
|
style: {
|
|
297
299
|
width,
|
|
298
300
|
height,
|
|
299
|
-
backgroundColor: "#000",
|
|
301
|
+
backgroundColor: "var(--vanillasky-template-surface, #000)",
|
|
300
302
|
position: "relative",
|
|
301
303
|
overflow: "hidden",
|
|
302
304
|
fontFamily: font
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SceneBackground,
|
|
3
3
|
getMediaBackgroundProps
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6M6DATLW.js";
|
|
5
5
|
import {
|
|
6
6
|
TemplateText
|
|
7
7
|
} from "./chunk-TCEHK2BW.js";
|
|
8
8
|
import "./chunk-L5BTTCZV.js";
|
|
9
|
+
import "./chunk-HT6BGERF.js";
|
|
9
10
|
import {
|
|
10
11
|
TOP_TEXT_AREA_RATIO,
|
|
11
12
|
withOpacity
|
|
12
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-W3VDIBGR.js";
|
|
13
14
|
import {
|
|
14
15
|
interpolate,
|
|
15
16
|
spring
|
|
16
17
|
} from "./chunk-XTOXFMLM.js";
|
|
18
|
+
import "./chunk-C6WVCZRW.js";
|
|
17
19
|
import {
|
|
18
20
|
hasSceneMedia
|
|
19
21
|
} from "./chunk-224QNWRA.js";
|
|
@@ -184,7 +186,7 @@ var InfographicStatRowTemplate = ({
|
|
|
184
186
|
style: {
|
|
185
187
|
width,
|
|
186
188
|
height,
|
|
187
|
-
backgroundColor: "#000",
|
|
189
|
+
backgroundColor: "var(--vanillasky-template-surface, #000)",
|
|
188
190
|
position: "relative",
|
|
189
191
|
overflow: "hidden",
|
|
190
192
|
fontFamily: font
|
|
@@ -8,22 +8,24 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
SceneBackground,
|
|
10
10
|
getMediaBackgroundProps
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6M6DATLW.js";
|
|
12
12
|
import {
|
|
13
13
|
TemplateText
|
|
14
14
|
} from "./chunk-TCEHK2BW.js";
|
|
15
15
|
import {
|
|
16
16
|
Emoji
|
|
17
17
|
} from "./chunk-L5BTTCZV.js";
|
|
18
|
+
import "./chunk-HT6BGERF.js";
|
|
18
19
|
import {
|
|
19
20
|
TOP_TEXT_AREA_RATIO,
|
|
20
21
|
autoTextColor,
|
|
21
22
|
withOpacity
|
|
22
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-W3VDIBGR.js";
|
|
23
24
|
import {
|
|
24
25
|
interpolate,
|
|
25
26
|
spring
|
|
26
27
|
} from "./chunk-XTOXFMLM.js";
|
|
28
|
+
import "./chunk-C6WVCZRW.js";
|
|
27
29
|
import {
|
|
28
30
|
hasSceneMedia
|
|
29
31
|
} from "./chunk-224QNWRA.js";
|
|
@@ -339,7 +341,7 @@ var InfographicStepsTemplate = ({
|
|
|
339
341
|
style: {
|
|
340
342
|
width,
|
|
341
343
|
height,
|
|
342
|
-
backgroundColor: "#000",
|
|
344
|
+
backgroundColor: "var(--vanillasky-template-surface, #000)",
|
|
343
345
|
position: "relative",
|
|
344
346
|
overflow: "hidden",
|
|
345
347
|
fontFamily: font
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
limitsConcurrentVideoDecoders,
|
|
2
3
|
resolveMediaType
|
|
3
4
|
} from "./chunk-224QNWRA.js";
|
|
4
5
|
|
|
@@ -45,6 +46,7 @@ function preloadSceneMedia(variables) {
|
|
|
45
46
|
if (resolved === "gradient") return;
|
|
46
47
|
if (resolved === "video") {
|
|
47
48
|
warmImage(String(variables.mediaPoster || ""));
|
|
49
|
+
if (limitsConcurrentVideoDecoders()) return;
|
|
48
50
|
warmVideo(mediaUrl);
|
|
49
51
|
return;
|
|
50
52
|
}
|
|
@@ -4,14 +4,16 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
SceneBackground,
|
|
6
6
|
getMediaBackgroundProps
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-6M6DATLW.js";
|
|
8
|
+
import "./chunk-HT6BGERF.js";
|
|
9
|
+
import "./chunk-W3VDIBGR.js";
|
|
9
10
|
import {
|
|
10
11
|
SPRING_BOUNCY,
|
|
11
12
|
SPRING_SMOOTH,
|
|
12
13
|
interpolate,
|
|
13
14
|
spring
|
|
14
15
|
} from "./chunk-XTOXFMLM.js";
|
|
16
|
+
import "./chunk-C6WVCZRW.js";
|
|
15
17
|
import "./chunk-224QNWRA.js";
|
|
16
18
|
import {
|
|
17
19
|
resolveTokens
|
|
@@ -197,7 +199,7 @@ var PromptInputTemplate = ({
|
|
|
197
199
|
height,
|
|
198
200
|
position: "relative",
|
|
199
201
|
overflow: "hidden",
|
|
200
|
-
backgroundColor: "#000",
|
|
202
|
+
backgroundColor: "var(--vanillasky-template-surface, #000)",
|
|
201
203
|
fontFamily: font
|
|
202
204
|
},
|
|
203
205
|
children: [
|