@vanillaskyai/video 0.5.1 → 0.5.3
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 +16 -0
- package/dist/{bg-confetti-KTHLUJPO.js → bg-confetti-572VDSYM.js} +1 -1
- package/dist/{bg-emoji-AW7374DZ.js → bg-emoji-T4IEJ6U2.js} +1 -1
- package/dist/{bg-media-KGYE6UVS.js → bg-media-VSFT5YC7.js} +2 -2
- package/dist/{brand-message-AY43ZQR2.js → brand-message-GSM2LOEP.js} +2 -2
- package/dist/{chart-bar-Z42RDRQT.js → chart-bar-ZGGCV3ED.js} +2 -2
- package/dist/{chart-counter-X7NAOQ2C.js → chart-counter-T3MXDPP6.js} +2 -2
- package/dist/{chart-progress-ring-7NSNNHL4.js → chart-progress-ring-OT5Z2LMK.js} +2 -2
- package/dist/check-runtime.js +1 -1
- package/dist/{chunk-3ROGEU5A.js → chunk-3OU7HIEB.js} +232 -174
- package/dist/{chunk-K6YVQODK.js → chunk-65MRKELL.js} +3 -2
- package/dist/{chunk-IJM4B2ZN.js → chunk-MFYFZQHM.js} +1 -1
- package/dist/{chunk-4AODC6MS.js → chunk-SNVWTK63.js} +7 -3
- package/dist/{compose-video-QJHKTOQ7.js → compose-video-JWIEDTEJ.js} +1 -1
- package/dist/{cta-logo-KNBLXUJU.js → cta-logo-CV5NCBHX.js} +2 -2
- package/dist/{cta-media-NY4ASBGG.js → cta-media-TJ7F4GN7.js} +2 -2
- package/dist/{incoming-call-KWOXLGJN.js → incoming-call-FOD6Z4R2.js} +2 -2
- package/dist/{infographic-before-after-OEM4DSTZ.js → infographic-before-after-FQXCQ2CY.js} +1 -1
- package/dist/{infographic-feature-list-ZZ25JRYQ.js → infographic-feature-list-Z37COJMT.js} +2 -2
- package/dist/{infographic-problem-solution-L3RLFDPE.js → infographic-problem-solution-WAJ76HQV.js} +2 -2
- package/dist/{infographic-stat-row-3OL3TNSH.js → infographic-stat-row-ZTS6PO57.js} +2 -2
- package/dist/{infographic-steps-LMBSW22P.js → infographic-steps-SNZCO5ZW.js} +2 -2
- package/dist/{prompt-input-XCQ6TS2L.js → prompt-input-VQ6WUBRH.js} +2 -2
- package/dist/react.js +27 -27
- package/dist/{reaction-YL6YPGPB.js → reaction-QECWNLCQ.js} +2 -2
- package/dist/server.js +1 -1
- package/dist/{showcase-code-EFVHRJUM.js → showcase-code-PVPNSI6U.js} +2 -2
- package/dist/{showcase-phone-CTHXHEBT.js → showcase-phone-G32YB25H.js} +2 -2
- package/dist/{showcase-terminal-XAMPADHN.js → showcase-terminal-PLZTGUL6.js} +2 -2
- package/dist/{showcase-web-LAKHYXSD.js → showcase-web-IRLNVEYD.js} +2 -2
- package/dist/{social-milestone-EOBEN7CX.js → social-milestone-T67PZ5RR.js} +2 -2
- package/dist/{social-notification-MELRWIB6.js → social-notification-P7ZSTEZ5.js} +2 -2
- package/dist/{social-review-stack-H3U437VT.js → social-review-stack-IXAC23MY.js} +2 -2
- package/dist/{social-testimonial-GNNMKMDD.js → social-testimonial-AGSFR2IF.js} +2 -2
- package/dist/{social-tweet-PBUKKPT3.js → social-tweet-UXTQA5VW.js} +2 -2
- package/dist/test.js +1 -1
- package/docs/motion-and-effects.md +12 -2
- package/examples/nextjs-quickstart/package.json +1 -1
- package/package.json +1 -1
- package/registry/items/backgrounds.json +1 -1
- package/registry/items/barChart.json +1 -1
- package/registry/items/bigNumber.json +1 -1
- package/registry/items/brandMessage.json +1 -1
- package/registry/items/cardList.json +1 -1
- package/registry/items/codeEditor.json +1 -1
- package/registry/items/ctaLogo.json +1 -1
- package/registry/items/ctaMedia.json +1 -1
- package/registry/items/incomingCall.json +1 -1
- package/registry/items/media.json +1 -1
- package/registry/items/milestone.json +1 -1
- package/registry/items/notification.json +1 -1
- package/registry/items/phoneMockup.json +1 -1
- package/registry/items/problemSolution.json +1 -1
- package/registry/items/progressRing.json +1 -1
- package/registry/items/promptInput.json +1 -1
- package/registry/items/reaction.json +1 -1
- package/registry/items/reviewStack.json +1 -1
- package/registry/items/steps.json +1 -1
- package/registry/items/terminal.json +1 -1
- package/registry/items/testimonial.json +1 -1
- package/registry/items/tripleStats.json +1 -1
- package/registry/items/tweet.json +1 -1
- package/registry/items/webMockup.json +1 -1
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
BrandGradientOverlay,
|
|
6
6
|
getBackgroundTransform
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MFYFZQHM.js";
|
|
8
8
|
|
|
9
9
|
// src/visual-system/scene-templates/scene-background.tsx
|
|
10
10
|
import { useEffect, useRef, useState } from "react";
|
|
@@ -108,6 +108,7 @@ var SceneBackground = ({
|
|
|
108
108
|
const [mediaPaint, setMediaPaint] = useState(
|
|
109
109
|
() => initialMediaPaint(wantsMedia, resolved, mediaUrl, mediaPoster)
|
|
110
110
|
);
|
|
111
|
+
const [decodedVideoUrl, setDecodedVideoUrl] = useState();
|
|
111
112
|
useEffect(() => {
|
|
112
113
|
setMediaPaint(initialMediaPaint(wantsMedia, resolved, mediaUrl, mediaPoster));
|
|
113
114
|
if (!wantsMedia || resolved !== "photo") return;
|
|
@@ -187,12 +188,15 @@ var SceneBackground = ({
|
|
|
187
188
|
{
|
|
188
189
|
ref: videoRef,
|
|
189
190
|
src: mediaUrl,
|
|
190
|
-
poster: mediaPoster || void 0,
|
|
191
|
+
poster: decodedVideoUrl === mediaUrl ? void 0 : mediaPoster || void 0,
|
|
191
192
|
muted: true,
|
|
192
193
|
loop: true,
|
|
193
194
|
playsInline: true,
|
|
194
195
|
preload: "auto",
|
|
195
|
-
onLoadedData: () =>
|
|
196
|
+
onLoadedData: () => {
|
|
197
|
+
setDecodedVideoUrl(mediaUrl);
|
|
198
|
+
setMediaPaint("ready");
|
|
199
|
+
},
|
|
196
200
|
onError: () => setMediaPaint("failed"),
|
|
197
201
|
"data-media-position": mediaPosition,
|
|
198
202
|
style: {
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
SceneBackground,
|
|
6
6
|
getMediaBackgroundProps
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SNVWTK63.js";
|
|
8
8
|
import "./chunk-35LIYILY.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-MFYFZQHM.js";
|
|
10
10
|
import {
|
|
11
11
|
SPRING_SMOOTH,
|
|
12
12
|
interpolate,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
SceneBackground,
|
|
7
7
|
getMediaBackgroundProps
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SNVWTK63.js";
|
|
9
9
|
import {
|
|
10
10
|
hasSceneMedia
|
|
11
11
|
} from "./chunk-35LIYILY.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
TemplateText
|
|
14
14
|
} from "./chunk-TCEHK2BW.js";
|
|
15
15
|
import "./chunk-L5BTTCZV.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-MFYFZQHM.js";
|
|
17
17
|
import {
|
|
18
18
|
SPRING_SMOOTH,
|
|
19
19
|
interpolate,
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
SceneBackground,
|
|
7
7
|
getMediaBackgroundProps
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SNVWTK63.js";
|
|
9
9
|
import "./chunk-35LIYILY.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-MFYFZQHM.js";
|
|
11
11
|
import {
|
|
12
12
|
SPRING_BOUNCY,
|
|
13
13
|
SPRING_SMOOTH,
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
SceneBackground,
|
|
9
9
|
getMediaBackgroundProps
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SNVWTK63.js";
|
|
11
11
|
import {
|
|
12
12
|
hasSceneMedia
|
|
13
13
|
} from "./chunk-35LIYILY.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
Emoji
|
|
19
19
|
} from "./chunk-L5BTTCZV.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-MFYFZQHM.js";
|
|
21
21
|
import {
|
|
22
22
|
interpolate,
|
|
23
23
|
spring
|
package/dist/{infographic-problem-solution-L3RLFDPE.js → infographic-problem-solution-WAJ76HQV.js}
RENAMED
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
SceneBackground,
|
|
6
6
|
getMediaBackgroundProps
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SNVWTK63.js";
|
|
8
8
|
import "./chunk-35LIYILY.js";
|
|
9
9
|
import {
|
|
10
10
|
smoothSize
|
|
11
11
|
} from "./chunk-TCEHK2BW.js";
|
|
12
12
|
import "./chunk-L5BTTCZV.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-MFYFZQHM.js";
|
|
14
14
|
import {
|
|
15
15
|
interpolate,
|
|
16
16
|
spring
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SceneBackground,
|
|
3
3
|
getMediaBackgroundProps
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SNVWTK63.js";
|
|
5
5
|
import {
|
|
6
6
|
hasSceneMedia
|
|
7
7
|
} from "./chunk-35LIYILY.js";
|
|
@@ -12,7 +12,7 @@ import "./chunk-L5BTTCZV.js";
|
|
|
12
12
|
import {
|
|
13
13
|
TOP_TEXT_AREA_RATIO,
|
|
14
14
|
withOpacity
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MFYFZQHM.js";
|
|
16
16
|
import {
|
|
17
17
|
interpolate,
|
|
18
18
|
spring
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
SceneBackground,
|
|
10
10
|
getMediaBackgroundProps
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-SNVWTK63.js";
|
|
12
12
|
import {
|
|
13
13
|
hasSceneMedia
|
|
14
14
|
} from "./chunk-35LIYILY.js";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
TOP_TEXT_AREA_RATIO,
|
|
23
23
|
autoTextColor,
|
|
24
24
|
withOpacity
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-MFYFZQHM.js";
|
|
26
26
|
import {
|
|
27
27
|
interpolate,
|
|
28
28
|
spring
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
SceneBackground,
|
|
6
6
|
getMediaBackgroundProps
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SNVWTK63.js";
|
|
8
8
|
import "./chunk-35LIYILY.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-MFYFZQHM.js";
|
|
10
10
|
import {
|
|
11
11
|
SPRING_BOUNCY,
|
|
12
12
|
SPRING_SMOOTH,
|
package/dist/react.js
CHANGED
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
import {
|
|
25
25
|
VideoFrame,
|
|
26
26
|
getDimensions
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-65MRKELL.js";
|
|
28
28
|
import {
|
|
29
29
|
fontStack
|
|
30
30
|
} from "./chunk-XWWLKRNU.js";
|
|
@@ -76,34 +76,34 @@ import { createElement } from "react";
|
|
|
76
76
|
|
|
77
77
|
// src/visual-system/catalog/builtin-loaders.generated.ts
|
|
78
78
|
var GENERATED_BUILTIN_TEMPLATE_LOADERS = {
|
|
79
|
-
"media": () => import("./bg-media-
|
|
80
|
-
"reaction": () => import("./reaction-
|
|
81
|
-
"confetti": () => import("./bg-confetti-
|
|
82
|
-
"emojiBurst": () => import("./bg-emoji-
|
|
83
|
-
"bigNumber": () => import("./chart-counter-
|
|
84
|
-
"barChart": () => import("./chart-bar-
|
|
85
|
-
"progressRing": () => import("./chart-progress-ring-
|
|
86
|
-
"phoneMockup": () => import("./showcase-phone-
|
|
87
|
-
"webMockup": () => import("./showcase-web-
|
|
88
|
-
"codeEditor": () => import("./showcase-code-
|
|
89
|
-
"terminal": () => import("./showcase-terminal-
|
|
90
|
-
"tweet": () => import("./social-tweet-
|
|
91
|
-
"notification": () => import("./social-notification-
|
|
79
|
+
"media": () => import("./bg-media-VSFT5YC7.js").then((module) => ({ default: module.BgMediaTemplate })),
|
|
80
|
+
"reaction": () => import("./reaction-QECWNLCQ.js").then((module) => ({ default: module.ReactionTemplate })),
|
|
81
|
+
"confetti": () => import("./bg-confetti-572VDSYM.js").then((module) => ({ default: module.BgConfettiTemplate })),
|
|
82
|
+
"emojiBurst": () => import("./bg-emoji-T4IEJ6U2.js").then((module) => ({ default: module.BgEmojiTemplate })),
|
|
83
|
+
"bigNumber": () => import("./chart-counter-T3MXDPP6.js").then((module) => ({ default: module.ChartCounterTemplate })),
|
|
84
|
+
"barChart": () => import("./chart-bar-ZGGCV3ED.js").then((module) => ({ default: module.ChartBarTemplate })),
|
|
85
|
+
"progressRing": () => import("./chart-progress-ring-OT5Z2LMK.js").then((module) => ({ default: module.ChartProgressRingTemplate })),
|
|
86
|
+
"phoneMockup": () => import("./showcase-phone-G32YB25H.js").then((module) => ({ default: module.ShowcasePhoneTemplate })),
|
|
87
|
+
"webMockup": () => import("./showcase-web-IRLNVEYD.js").then((module) => ({ default: module.ShowcaseWebTemplate })),
|
|
88
|
+
"codeEditor": () => import("./showcase-code-PVPNSI6U.js").then((module) => ({ default: module.ShowcaseCodeTemplate })),
|
|
89
|
+
"terminal": () => import("./showcase-terminal-PLZTGUL6.js").then((module) => ({ default: module.ShowcaseTerminalTemplate })),
|
|
90
|
+
"tweet": () => import("./social-tweet-UXTQA5VW.js").then((module) => ({ default: module.SocialTweetTemplate })),
|
|
91
|
+
"notification": () => import("./social-notification-P7ZSTEZ5.js").then((module) => ({ default: module.SocialNotificationTemplate })),
|
|
92
92
|
"chatMessenger": () => import("./social-conversation-75SD2637.js").then((module) => ({ default: module.SocialConversationTemplate })),
|
|
93
93
|
"chatWhatsapp": () => import("./social-conversation-75SD2637.js").then((module) => ({ default: module.SocialConversationTemplate })),
|
|
94
|
-
"milestone": () => import("./social-milestone-
|
|
95
|
-
"reviewStack": () => import("./social-review-stack-
|
|
96
|
-
"testimonial": () => import("./social-testimonial-
|
|
97
|
-
"incomingCall": () => import("./incoming-call-
|
|
98
|
-
"brandMessage": () => import("./brand-message-
|
|
99
|
-
"promptInput": () => import("./prompt-input-
|
|
100
|
-
"beforeAfter": () => import("./infographic-before-after-
|
|
101
|
-
"tripleStats": () => import("./infographic-stat-row-
|
|
102
|
-
"problemSolution": () => import("./infographic-problem-solution-
|
|
103
|
-
"cardList": () => import("./infographic-feature-list-
|
|
104
|
-
"steps": () => import("./infographic-steps-
|
|
105
|
-
"ctaLogo": () => import("./cta-logo-
|
|
106
|
-
"ctaMedia": () => import("./cta-media-
|
|
94
|
+
"milestone": () => import("./social-milestone-T67PZ5RR.js").then((module) => ({ default: module.SocialMilestoneTemplate })),
|
|
95
|
+
"reviewStack": () => import("./social-review-stack-IXAC23MY.js").then((module) => ({ default: module.SocialReviewStackTemplate })),
|
|
96
|
+
"testimonial": () => import("./social-testimonial-AGSFR2IF.js").then((module) => ({ default: module.SocialTestimonialTemplate })),
|
|
97
|
+
"incomingCall": () => import("./incoming-call-FOD6Z4R2.js").then((module) => ({ default: module.IncomingCallTemplate })),
|
|
98
|
+
"brandMessage": () => import("./brand-message-GSM2LOEP.js").then((module) => ({ default: module.BrandMessageTemplate })),
|
|
99
|
+
"promptInput": () => import("./prompt-input-VQ6WUBRH.js").then((module) => ({ default: module.PromptInputTemplate })),
|
|
100
|
+
"beforeAfter": () => import("./infographic-before-after-FQXCQ2CY.js").then((module) => ({ default: module.InfographicBeforeAfterTemplate })),
|
|
101
|
+
"tripleStats": () => import("./infographic-stat-row-ZTS6PO57.js").then((module) => ({ default: module.InfographicStatRowTemplate })),
|
|
102
|
+
"problemSolution": () => import("./infographic-problem-solution-WAJ76HQV.js").then((module) => ({ default: module.InfographicProblemSolutionTemplate })),
|
|
103
|
+
"cardList": () => import("./infographic-feature-list-Z37COJMT.js").then((module) => ({ default: module.InfographicFeatureListTemplate })),
|
|
104
|
+
"steps": () => import("./infographic-steps-SNZCO5ZW.js").then((module) => ({ default: module.InfographicStepsTemplate })),
|
|
105
|
+
"ctaLogo": () => import("./cta-logo-CV5NCBHX.js").then((module) => ({ default: module.CtaLogoTemplate })),
|
|
106
|
+
"ctaMedia": () => import("./cta-media-TJ7F4GN7.js").then((module) => ({ default: module.CtaMediaTemplate }))
|
|
107
107
|
};
|
|
108
108
|
|
|
109
109
|
// src/visual-system/catalog/builtin-player.generated.ts
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SceneBackground
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SNVWTK63.js";
|
|
4
4
|
import "./chunk-35LIYILY.js";
|
|
5
5
|
import {
|
|
6
6
|
TemplateText
|
|
7
7
|
} from "./chunk-TCEHK2BW.js";
|
|
8
8
|
import "./chunk-L5BTTCZV.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-MFYFZQHM.js";
|
|
10
10
|
import "./chunk-XTOXFMLM.js";
|
|
11
11
|
import {
|
|
12
12
|
resolveTokens
|
package/dist/server.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
SceneBackground,
|
|
7
7
|
getMediaBackgroundProps
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SNVWTK63.js";
|
|
9
9
|
import {
|
|
10
10
|
hasSceneMedia
|
|
11
11
|
} from "./chunk-35LIYILY.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
TemplateText
|
|
14
14
|
} from "./chunk-TCEHK2BW.js";
|
|
15
15
|
import "./chunk-L5BTTCZV.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-MFYFZQHM.js";
|
|
17
17
|
import {
|
|
18
18
|
interpolate,
|
|
19
19
|
spring
|
|
@@ -7,7 +7,7 @@ import "./chunk-S7HFLYNN.js";
|
|
|
7
7
|
import {
|
|
8
8
|
SceneBackground,
|
|
9
9
|
getMediaBackgroundProps
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SNVWTK63.js";
|
|
11
11
|
import {
|
|
12
12
|
hasSceneMedia
|
|
13
13
|
} from "./chunk-35LIYILY.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
TemplateText
|
|
16
16
|
} from "./chunk-TCEHK2BW.js";
|
|
17
17
|
import "./chunk-L5BTTCZV.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-MFYFZQHM.js";
|
|
19
19
|
import {
|
|
20
20
|
SPRING_SMOOTH,
|
|
21
21
|
interpolate,
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
SceneBackground,
|
|
9
9
|
getMediaBackgroundProps
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SNVWTK63.js";
|
|
11
11
|
import {
|
|
12
12
|
hasSceneMedia
|
|
13
13
|
} from "./chunk-35LIYILY.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
TemplateText
|
|
16
16
|
} from "./chunk-TCEHK2BW.js";
|
|
17
17
|
import "./chunk-L5BTTCZV.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-MFYFZQHM.js";
|
|
19
19
|
import {
|
|
20
20
|
interpolate,
|
|
21
21
|
spring
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
SceneBackground,
|
|
11
11
|
getMediaBackgroundProps
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-SNVWTK63.js";
|
|
13
13
|
import {
|
|
14
14
|
hasSceneMedia
|
|
15
15
|
} from "./chunk-35LIYILY.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
TemplateText
|
|
18
18
|
} from "./chunk-TCEHK2BW.js";
|
|
19
19
|
import "./chunk-L5BTTCZV.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-MFYFZQHM.js";
|
|
21
21
|
import {
|
|
22
22
|
SPRING_SMOOTH,
|
|
23
23
|
interpolate,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
SceneBackground,
|
|
6
6
|
getMediaBackgroundProps
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SNVWTK63.js";
|
|
8
8
|
import "./chunk-35LIYILY.js";
|
|
9
9
|
import {
|
|
10
10
|
ConfettiLayer
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
accessibleTextColor,
|
|
19
19
|
withOpacity
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-MFYFZQHM.js";
|
|
21
21
|
import {
|
|
22
22
|
SPRING_BOUNCY,
|
|
23
23
|
SPRING_SMOOTH,
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
SceneBackground,
|
|
6
6
|
getMediaBackgroundProps
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SNVWTK63.js";
|
|
8
8
|
import "./chunk-35LIYILY.js";
|
|
9
9
|
import {
|
|
10
10
|
Emoji,
|
|
11
11
|
renderWithEmoji
|
|
12
12
|
} from "./chunk-L5BTTCZV.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-MFYFZQHM.js";
|
|
14
14
|
import {
|
|
15
15
|
SPRING_SMOOTH,
|
|
16
16
|
interpolate,
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
SceneBackground,
|
|
6
6
|
getMediaBackgroundProps
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SNVWTK63.js";
|
|
8
8
|
import "./chunk-35LIYILY.js";
|
|
9
9
|
import {
|
|
10
10
|
accessibleTextColor,
|
|
11
11
|
withOpacity
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MFYFZQHM.js";
|
|
13
13
|
import {
|
|
14
14
|
SPRING_SNAPPY,
|
|
15
15
|
interpolate,
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
SceneBackground,
|
|
6
6
|
getMediaBackgroundProps
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SNVWTK63.js";
|
|
8
8
|
import "./chunk-35LIYILY.js";
|
|
9
9
|
import {
|
|
10
10
|
accessibleTextColor,
|
|
11
11
|
autoTextColor,
|
|
12
12
|
withOpacity
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MFYFZQHM.js";
|
|
14
14
|
import {
|
|
15
15
|
SPRING_SMOOTH,
|
|
16
16
|
SPRING_SNAPPY,
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
SceneBackground,
|
|
6
6
|
getMediaBackgroundProps
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SNVWTK63.js";
|
|
8
8
|
import "./chunk-35LIYILY.js";
|
|
9
9
|
import {
|
|
10
10
|
renderWithEmoji
|
|
11
11
|
} from "./chunk-L5BTTCZV.js";
|
|
12
12
|
import {
|
|
13
13
|
autoTextColor
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MFYFZQHM.js";
|
|
15
15
|
import {
|
|
16
16
|
SPRING_SMOOTH,
|
|
17
17
|
interpolate,
|
package/dist/test.js
CHANGED
|
@@ -233,7 +233,7 @@ async function* simulateVideoStream(parts, options = {}) {
|
|
|
233
233
|
if (timeoutMs != null && (!Number.isFinite(timeoutMs) || timeoutMs < 0)) {
|
|
234
234
|
throw new Error("Simulation timeoutMs must be a non-negative finite number");
|
|
235
235
|
}
|
|
236
|
-
const { createVideo } = await import("./compose-video-
|
|
236
|
+
const { createVideo } = await import("./compose-video-JWIEDTEJ.js");
|
|
237
237
|
const { createTextDeltaVideoPlanner } = await import("./text-stream-J6EDDJP4.js");
|
|
238
238
|
const { BUILTIN_SERVER_TEMPLATE_KIT } = await import("./builtin-server-YHEZ2JRF.js");
|
|
239
239
|
const { createTemplateSceneValidator } = await import("./validate-T7GBU2YF.js");
|
|
@@ -34,11 +34,15 @@ Templates that support background motion can use:
|
|
|
34
34
|
- `slow-tilt`;
|
|
35
35
|
- `camera-shake`.
|
|
36
36
|
|
|
37
|
-
`
|
|
37
|
+
`static` is the default, so a media change cannot restart an implicit camera
|
|
38
|
+
transform. Apply another effect explicitly when a still image or authored scene
|
|
39
|
+
benefits from it; footage keeps its own native motion by default.
|
|
38
40
|
|
|
39
41
|
## Scene continuity
|
|
40
42
|
|
|
41
|
-
|
|
43
|
+
Generated videos use `crossfade` by default. Persisted or application-authored
|
|
44
|
+
`Video` values can set `style.defaultTransition` to `crossfade` or `fade`; an
|
|
45
|
+
undefined or unknown value keeps the hard-cut behavior. The player applies a fade
|
|
42
46
|
only when two ranges are contiguous (allowing floating-point arithmetic noise)
|
|
43
47
|
and both templates declare `usesGlobalTransition: true` with valid
|
|
44
48
|
`transitionTiming` metadata. It is also conditional on the effective backdrop:
|
|
@@ -87,6 +91,12 @@ player hides that wrapper for the incoming preview and reveals it as soon as
|
|
|
87
91
|
the same mounted scene becomes active. This guard does not change `progress`,
|
|
88
92
|
media time, the component lifecycle, or final values.
|
|
89
93
|
|
|
94
|
+
As soon as a streamed scene arrives, the player starts warming its template and
|
|
95
|
+
backdrop. A changed-media scene is also mounted invisibly before its cut so the
|
|
96
|
+
browser can attach and decode the real element in advance. This media preroll
|
|
97
|
+
also protects intentional hard cuts; it does not pause or otherwise alter the
|
|
98
|
+
visual or soundtrack clocks.
|
|
99
|
+
|
|
90
100
|
Undefined or unknown transition names preserve a hard cut and unmodified local
|
|
91
101
|
motion. Overlapping ranges also hard-cut. A timeline gap renders the owned brand
|
|
92
102
|
background instead of replaying an earlier scene.
|
package/package.json
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"path": "src/visual-system/scene-templates/background-effect.ts",
|
|
23
23
|
"type": "registry:lib",
|
|
24
24
|
"target": "vanillasky/scene-templates/background-effect.ts",
|
|
25
|
-
"content": "/**\n * Background motion effects for templates.\n *\n * Applied to the background layer (media, gradient) throughout the entire scene.\n * Continuous motion — not tied to text timing.\n *\n * Templates with usesGlobalBackgroundEffect: true consume the video-level default.\n *\n * 9 effects, each with a distinct mood:\n * - static: No motion — intentional stillness\n * - slow-zoom-in: Draw attention inward, build focus\n * - slow-zoom-out: Reveal, establish, pull back\n * - ken-burns: Classic cinematic photo motion (zoom + pan, direction alternates per scene)\n * - drift: Gentle lateral pan (direction alternates per scene)\n * - pulse: Beat-synced energy\n * - breathe: Ambient dreamy float\n * - slow-tilt: Tension, Dutch angle drift\n * - camera-shake: Intensity, handheld drama\n */\n\nimport { interpolate } from \"../motion\";\n\nexport interface BackgroundTransform {\n transform: string;\n transformOrigin: string;\n}\n\nexport const BACKGROUND_EFFECTS = [\n \"static\",\n \"slow-zoom-in\",\n \"slow-zoom-out\",\n \"ken-burns\",\n \"drift\",\n \"pulse\",\n \"breathe\",\n \"slow-tilt\",\n \"camera-shake\",\n] as const;\n\n// ─── Directional variant helpers ────────────────────────────────\n// Ken Burns and Drift have internal direction variants that alternate\n// by scene index to create visual variety across a video.\n\ntype Direction = \"right\" | \"left\" | \"up\" | \"down\";\nconst DIRECTIONS: Direction[] = [\"right\", \"left\", \"up\", \"down\"];\n\nfunction getKenBurnsTransform(progress: number, direction: Direction): BackgroundTransform {\n const scale = interpolate(progress, [0, 1], [1.05, 1.15]);\n const mainAxis = direction === \"right\" || direction === \"left\";\n const sign = direction === \"right\" || direction === \"down\" ? 1 : -1;\n const primary = interpolate(progress, [0, 1], [-2 * sign, 2 * sign]);\n const secondary = interpolate(progress, [0, 1], [-0.5, 0.5]);\n\n const x = mainAxis ? primary : secondary;\n const y = mainAxis ? secondary : primary;\n\n return {\n transform: `scale(${scale}) translate(${x}%, ${y}%)`,\n transformOrigin: \"center\",\n };\n}\n\nfunction getDriftTransform(progress: number, direction: Direction): BackgroundTransform {\n const horizontal = direction === \"right\" || direction === \"left\";\n const sign = direction === \"right\" || direction === \"down\" ? 1 : -1;\n const offset = interpolate(progress, [0, 1], [-2 * sign, 2 * sign]);\n\n return {\n transform: horizontal\n ? `scale(1.1) translateX(${offset}%)`\n : `scale(1.1) translateY(${offset}%)`,\n transformOrigin: \"center\",\n };\n}\n\n// ─── Public API ─────────────────────────────────────────────────\n\n/**\n * Get background transform for the current progress.\n *\n * @param effect — background effect name\n * @param progress — scene progress 0→1\n * @param beatIntensity — 0→1 for beat-reactive effects\n * @param sceneIndex — used to alternate direction for ken-burns/drift\n */\nexport function getBackgroundTransform(\n effect: string | undefined,\n progress: number,\n beatIntensity = 0,\n sceneIndex = 0,\n): BackgroundTransform {\n const dir = DIRECTIONS[sceneIndex % DIRECTIONS.length];\n\n //
|
|
25
|
+
"content": "/**\n * Background motion effects for templates.\n *\n * Applied to the background layer (media, gradient) throughout the entire scene.\n * Continuous motion — not tied to text timing.\n *\n * Templates with usesGlobalBackgroundEffect: true consume the video-level default.\n *\n * 9 effects, each with a distinct mood:\n * - static: No motion — intentional stillness\n * - slow-zoom-in: Draw attention inward, build focus\n * - slow-zoom-out: Reveal, establish, pull back\n * - ken-burns: Classic cinematic photo motion (zoom + pan, direction alternates per scene)\n * - drift: Gentle lateral pan (direction alternates per scene)\n * - pulse: Beat-synced energy\n * - breathe: Ambient dreamy float\n * - slow-tilt: Tension, Dutch angle drift\n * - camera-shake: Intensity, handheld drama\n */\n\nimport { interpolate } from \"../motion\";\n\nexport interface BackgroundTransform {\n transform: string;\n transformOrigin: string;\n}\n\nexport const BACKGROUND_EFFECTS = [\n \"static\",\n \"slow-zoom-in\",\n \"slow-zoom-out\",\n \"ken-burns\",\n \"drift\",\n \"pulse\",\n \"breathe\",\n \"slow-tilt\",\n \"camera-shake\",\n] as const;\n\n// ─── Directional variant helpers ────────────────────────────────\n// Ken Burns and Drift have internal direction variants that alternate\n// by scene index to create visual variety across a video.\n\ntype Direction = \"right\" | \"left\" | \"up\" | \"down\";\nconst DIRECTIONS: Direction[] = [\"right\", \"left\", \"up\", \"down\"];\n\nfunction getKenBurnsTransform(progress: number, direction: Direction): BackgroundTransform {\n const scale = interpolate(progress, [0, 1], [1.05, 1.15]);\n const mainAxis = direction === \"right\" || direction === \"left\";\n const sign = direction === \"right\" || direction === \"down\" ? 1 : -1;\n const primary = interpolate(progress, [0, 1], [-2 * sign, 2 * sign]);\n const secondary = interpolate(progress, [0, 1], [-0.5, 0.5]);\n\n const x = mainAxis ? primary : secondary;\n const y = mainAxis ? secondary : primary;\n\n return {\n transform: `scale(${scale}) translate(${x}%, ${y}%)`,\n transformOrigin: \"center\",\n };\n}\n\nfunction getDriftTransform(progress: number, direction: Direction): BackgroundTransform {\n const horizontal = direction === \"right\" || direction === \"left\";\n const sign = direction === \"right\" || direction === \"down\" ? 1 : -1;\n const offset = interpolate(progress, [0, 1], [-2 * sign, 2 * sign]);\n\n return {\n transform: horizontal\n ? `scale(1.1) translateX(${offset}%)`\n : `scale(1.1) translateY(${offset}%)`,\n transformOrigin: \"center\",\n };\n}\n\n// ─── Public API ─────────────────────────────────────────────────\n\n/**\n * Get background transform for the current progress.\n *\n * @param effect — background effect name\n * @param progress — scene progress 0→1\n * @param beatIntensity — 0→1 for beat-reactive effects\n * @param sceneIndex — used to alternate direction for ken-burns/drift\n */\nexport function getBackgroundTransform(\n effect: string | undefined,\n progress: number,\n beatIntensity = 0,\n sceneIndex = 0,\n): BackgroundTransform {\n const dir = DIRECTIONS[sceneIndex % DIRECTIONS.length];\n\n // Camera motion is opt-in. In particular, a scene-relative zoom restarts\n // at every cut and can look like the incoming media snaps backwards.\n // Footage already contains motion, while photo scenes that benefit from a\n // Ken Burns treatment can request one explicitly.\n const resolved = effect ?? \"static\";\n\n switch (resolved) {\n case \"slow-zoom-in\":\n return {\n transform: `scale(${interpolate(progress, [0, 1], [1, 1.12])})`,\n transformOrigin: \"center\",\n };\n\n case \"slow-zoom-out\":\n return {\n transform: `scale(${interpolate(progress, [0, 1], [1.12, 1])})`,\n transformOrigin: \"center\",\n };\n\n case \"ken-burns\":\n return getKenBurnsTransform(progress, dir);\n\n case \"drift\":\n return getDriftTransform(progress, dir);\n\n case \"pulse\": {\n // Subtle scale pulse synced to beat\n const base = 1 + beatIntensity * 0.04;\n const breathe = 1 + Math.sin(progress * Math.PI * 2) * 0.02;\n return {\n transform: `scale(${base * breathe})`,\n transformOrigin: \"center\",\n };\n }\n\n case \"breathe\": {\n // Slow ambient float — gentle scale + vertical drift, not beat-synced\n const s = 1 + Math.sin(progress * Math.PI) * 0.03;\n const y = Math.sin(progress * Math.PI) * 0.5;\n return {\n transform: `scale(${s}) translateY(${y}%)`,\n transformOrigin: \"center\",\n };\n }\n\n case \"slow-tilt\": {\n // Subtle Dutch angle drift\n const angle = interpolate(progress, [0, 1], [0, 2.5]);\n return {\n transform: `scale(1.08) rotate(${angle}deg)`,\n transformOrigin: \"center\",\n };\n }\n\n case \"camera-shake\": {\n // Rapid small offsets for handheld/dramatic feel\n // Deterministic noise based on progress for reproducibility\n const t = progress * 40;\n const sx = Math.sin(t * 2.3) * 0.4 + Math.sin(t * 5.7) * 0.2;\n const sy = Math.cos(t * 3.1) * 0.3 + Math.cos(t * 4.9) * 0.15;\n const sr = Math.sin(t * 1.7) * 0.3;\n return {\n transform: `scale(1.05) translate(${sx}%, ${sy}%) rotate(${sr}deg)`,\n transformOrigin: \"center\",\n };\n }\n\n case \"static\":\n default:\n return {\n transform: \"none\",\n transformOrigin: \"center\",\n };\n }\n}\n"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
"path": "src/visual-system/scene-templates/color-utils.ts",
|