@vanillaskyai/video 0.8.8 → 0.10.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 +42 -0
- package/PUBLIC-API.md +5 -8
- package/dist/{builtin-server-CUYPIDE7.js → builtin-server-W4PLJUZ5.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 +5 -14
- package/dist/{chunk-AITKH6QT.js → chunk-2HFO22K2.js} +15 -40
- package/dist/chunk-4YM2M62S.js +13 -0
- package/dist/chunk-4ZJLPHBV.js +684 -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-2USVB3CY.js → chunk-ELVOT2FQ.js} +284 -177
- package/dist/chunk-EWWCQFTI.js +18 -0
- package/dist/{chunk-KT3M7KDL.js → chunk-HKUI5BTB.js} +3 -3
- package/dist/chunk-IIN5M5HW.js +697 -0
- package/dist/{chunk-LMG3GHLL.js → chunk-IQMYK5DX.js} +29 -3
- package/dist/{chunk-OWBT45EN.js → chunk-IR44XKBI.js} +1 -1
- package/dist/{chunk-MXZSDGZQ.js → chunk-NMFDC2W2.js} +4 -6
- 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-XX4GXKTX.js +35 -0
- package/dist/chunk-Z67Q5KUW.js +16 -0
- package/dist/{chunk-3VRMKFM7.js → chunk-ZDJNFA52.js} +11 -24
- package/dist/cinema-media-C7OUPNSH.js +12 -0
- package/dist/cli.js +18 -9
- package/dist/comparison-GNZOR7MF.js +37 -0
- package/dist/compose-video-TBFTONUC.js +12 -0
- package/dist/editorial-timeline-EMV5335S.js +43 -0
- package/dist/{events-BQ6z264n.d.ts → events-B4YCc4vc.d.ts} +1 -1
- package/dist/index.d.ts +4 -6
- package/dist/index.js +3 -7
- package/dist/key-figure-P37VK425.js +30 -0
- package/dist/{kit-tQnCPMOM.d.ts → kit-DrRpdn0p.d.ts} +2 -2
- package/dist/mobile-message-OF7T62B7.js +50 -0
- package/dist/quote-T6WYLN7A.js +33 -0
- package/dist/react.d.ts +21 -11
- package/dist/react.js +585 -826
- package/dist/scene-video-backdrop-PCTARAAJ.js +7 -0
- package/dist/server.d.ts +7 -8
- package/dist/server.js +179 -84
- package/dist/{system-prompt-RRXIWDDD.js → system-prompt-SYRT5DWM.js} +1 -1
- package/dist/template-catalog.d.ts +392 -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 +38 -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 +168 -0
- package/registry/items/editorialTimeline.json +172 -0
- package/registry/items/keyFigure.json +162 -0
- package/registry/items/mobileMessage.json +153 -0
- package/registry/items/quote.json +161 -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,312 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
parseList
|
|
3
|
-
} from "./chunk-P22HHFDK.js";
|
|
4
|
-
import {
|
|
5
|
-
fitTextSize
|
|
6
|
-
} from "./chunk-S7HFLYNN.js";
|
|
7
|
-
import {
|
|
8
|
-
SceneBackground,
|
|
9
|
-
getMediaBackgroundProps
|
|
10
|
-
} from "./chunk-MXZSDGZQ.js";
|
|
11
|
-
import {
|
|
12
|
-
TemplateText
|
|
13
|
-
} from "./chunk-YJJC4N4D.js";
|
|
14
|
-
import "./chunk-L5BTTCZV.js";
|
|
15
|
-
import "./chunk-FRN6WKHA.js";
|
|
16
|
-
import "./chunk-W3VDIBGR.js";
|
|
17
|
-
import {
|
|
18
|
-
interpolate,
|
|
19
|
-
spring
|
|
20
|
-
} from "./chunk-XTOXFMLM.js";
|
|
21
|
-
import {
|
|
22
|
-
hasSceneMedia
|
|
23
|
-
} from "./chunk-224QNWRA.js";
|
|
24
|
-
import "./chunk-5CDAM24P.js";
|
|
25
|
-
import {
|
|
26
|
-
TOKEN_DEFAULTS,
|
|
27
|
-
resolveTokens
|
|
28
|
-
} from "./chunk-XWWLKRNU.js";
|
|
29
|
-
|
|
30
|
-
// src/visual-system/primitives/devices/TerminalOutput.tsx
|
|
31
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
32
|
-
var SPRING_TERMINAL = { damping: 20, stiffness: 100 };
|
|
33
|
-
var CLAMP = { extrapolateLeft: "clamp", extrapolateRight: "clamp" };
|
|
34
|
-
var MONO_CHAR_RATIO = 0.63;
|
|
35
|
-
var MONO_MIN_SCALE = 0.68;
|
|
36
|
-
var MONO_FONT = "'Fira Code', 'SF Mono', 'Cascadia Code', Menlo, monospace";
|
|
37
|
-
var CHROME_FONT = "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif";
|
|
38
|
-
var TerminalOutput = ({
|
|
39
|
-
progress,
|
|
40
|
-
command,
|
|
41
|
-
outputLines,
|
|
42
|
-
promptPrefix = "$",
|
|
43
|
-
width,
|
|
44
|
-
height,
|
|
45
|
-
accent = TOKEN_DEFAULTS.primary,
|
|
46
|
-
beatIntensity = 0
|
|
47
|
-
}) => {
|
|
48
|
-
const s = Math.min(width, height) / 1080;
|
|
49
|
-
const termWidth = Math.min(width * 0.85, height * 0.55 * (16 / 9));
|
|
50
|
-
const chromeHeight = 44 * s;
|
|
51
|
-
const contentHeight = termWidth * (9 / 16);
|
|
52
|
-
const termHeight = chromeHeight + contentHeight;
|
|
53
|
-
const borderRadius = 12 * s;
|
|
54
|
-
const termBg = "#1e1e2e";
|
|
55
|
-
const termText = "#cdd6f4";
|
|
56
|
-
const promptColor = accent;
|
|
57
|
-
const contentAvailWidth = termWidth - 48 * s;
|
|
58
|
-
const baseFontSize = Math.max(18, 26 * s);
|
|
59
|
-
const promptChars = promptPrefix.length + 1;
|
|
60
|
-
const commandLineChars = promptChars + command.length + 1;
|
|
61
|
-
const longestLineChars = outputLines.reduce(
|
|
62
|
-
(m, l) => Math.max(m, l.length),
|
|
63
|
-
Math.max(commandLineChars, 1)
|
|
64
|
-
);
|
|
65
|
-
const fontSize = fitTextSize("M".repeat(longestLineChars), baseFontSize, contentAvailWidth, {
|
|
66
|
-
minScale: MONO_MIN_SCALE,
|
|
67
|
-
charWidthRatio: MONO_CHAR_RATIO
|
|
68
|
-
});
|
|
69
|
-
const atFloor = fontSize <= baseFontSize * MONO_MIN_SCALE + 0.01;
|
|
70
|
-
const maxLineChars = atFloor ? Math.max(4, Math.floor(contentAvailWidth / (fontSize * MONO_CHAR_RATIO))) : Infinity;
|
|
71
|
-
const ellipsize = (l) => l.length > maxLineChars ? `${l.slice(0, maxLineChars - 1).trimEnd()}\u2026` : l;
|
|
72
|
-
const displayCommand = commandLineChars > maxLineChars ? `${command.slice(0, Math.max(1, maxLineChars - promptChars - 2)).trimEnd()}\u2026` : command;
|
|
73
|
-
const displayOutputLines = outputLines.map(ellipsize);
|
|
74
|
-
const lineHeight = fontSize * 1.7;
|
|
75
|
-
const slideProgress = interpolate(progress, [0.02, 0.15], [0, 1], CLAMP);
|
|
76
|
-
const springVal = spring(slideProgress, SPRING_TERMINAL);
|
|
77
|
-
const termY = (1 - springVal) * 200 * s;
|
|
78
|
-
const termOpacity = interpolate(slideProgress, [0, 0.08], [0, 1], CLAMP);
|
|
79
|
-
const typeProgress = interpolate(progress, [0.1, 0.48], [0, 1], CLAMP);
|
|
80
|
-
const charsVisible = Math.floor(typeProgress * displayCommand.length);
|
|
81
|
-
const typedText = displayCommand.slice(0, charsVisible);
|
|
82
|
-
const isTyping = typeProgress > 0 && typeProgress < 1;
|
|
83
|
-
const cursorCycle = Math.floor(progress * 25);
|
|
84
|
-
const cursorVisible = isTyping || cursorCycle % 2 === 0;
|
|
85
|
-
const outputStartP = 0.55;
|
|
86
|
-
const outputEndP = 0.88;
|
|
87
|
-
const outputSlice = displayOutputLines.length > 0 ? (outputEndP - outputStartP) / displayOutputLines.length : 0;
|
|
88
|
-
const beatScale = 1 + beatIntensity * 0.01;
|
|
89
|
-
const dotSize = 12 * s;
|
|
90
|
-
const dotGap = 8 * s;
|
|
91
|
-
return /* @__PURE__ */ jsx(
|
|
92
|
-
"div",
|
|
93
|
-
{
|
|
94
|
-
style: {
|
|
95
|
-
position: "absolute",
|
|
96
|
-
top: height * 0.35,
|
|
97
|
-
left: (width - termWidth) / 2,
|
|
98
|
-
width: termWidth,
|
|
99
|
-
height: termHeight,
|
|
100
|
-
transform: `translateY(${termY}px) scale(${beatScale})`,
|
|
101
|
-
opacity: termOpacity
|
|
102
|
-
},
|
|
103
|
-
children: /* @__PURE__ */ jsxs(
|
|
104
|
-
"div",
|
|
105
|
-
{
|
|
106
|
-
style: {
|
|
107
|
-
width: termWidth,
|
|
108
|
-
height: termHeight,
|
|
109
|
-
borderRadius,
|
|
110
|
-
overflow: "hidden",
|
|
111
|
-
position: "relative",
|
|
112
|
-
boxShadow: `0 ${20 * s}px ${60 * s}px rgba(0,0,0,0.35)`
|
|
113
|
-
},
|
|
114
|
-
children: [
|
|
115
|
-
/* @__PURE__ */ jsxs(
|
|
116
|
-
"div",
|
|
117
|
-
{
|
|
118
|
-
style: {
|
|
119
|
-
width: "100%",
|
|
120
|
-
height: chromeHeight,
|
|
121
|
-
backgroundColor: "#313244",
|
|
122
|
-
display: "flex",
|
|
123
|
-
alignItems: "center",
|
|
124
|
-
paddingLeft: 16 * s,
|
|
125
|
-
paddingRight: 16 * s
|
|
126
|
-
},
|
|
127
|
-
children: [
|
|
128
|
-
/* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: dotGap, flexShrink: 0 }, children: [
|
|
129
|
-
/* @__PURE__ */ jsx("div", { style: { width: dotSize, height: dotSize, borderRadius: "50%", backgroundColor: "#ff5f57" } }),
|
|
130
|
-
/* @__PURE__ */ jsx("div", { style: { width: dotSize, height: dotSize, borderRadius: "50%", backgroundColor: "#febc2e" } }),
|
|
131
|
-
/* @__PURE__ */ jsx("div", { style: { width: dotSize, height: dotSize, borderRadius: "50%", backgroundColor: "#28c840" } })
|
|
132
|
-
] }),
|
|
133
|
-
/* @__PURE__ */ jsx(
|
|
134
|
-
"div",
|
|
135
|
-
{
|
|
136
|
-
style: {
|
|
137
|
-
flex: 1,
|
|
138
|
-
textAlign: "center",
|
|
139
|
-
fontSize: 13 * s,
|
|
140
|
-
fontFamily: CHROME_FONT,
|
|
141
|
-
color: "#a6adc8",
|
|
142
|
-
whiteSpace: "nowrap"
|
|
143
|
-
},
|
|
144
|
-
children: "Terminal"
|
|
145
|
-
}
|
|
146
|
-
),
|
|
147
|
-
/* @__PURE__ */ jsx("div", { style: { width: dotSize * 3 + dotGap * 2, flexShrink: 0 } })
|
|
148
|
-
]
|
|
149
|
-
}
|
|
150
|
-
),
|
|
151
|
-
/* @__PURE__ */ jsxs(
|
|
152
|
-
"div",
|
|
153
|
-
{
|
|
154
|
-
style: {
|
|
155
|
-
width: "100%",
|
|
156
|
-
height: contentHeight,
|
|
157
|
-
backgroundColor: termBg,
|
|
158
|
-
padding: `${20 * s}px ${24 * s}px`,
|
|
159
|
-
overflow: "hidden"
|
|
160
|
-
},
|
|
161
|
-
children: [
|
|
162
|
-
/* @__PURE__ */ jsxs(
|
|
163
|
-
"div",
|
|
164
|
-
{
|
|
165
|
-
style: {
|
|
166
|
-
fontFamily: MONO_FONT,
|
|
167
|
-
fontSize,
|
|
168
|
-
lineHeight: `${lineHeight}px`,
|
|
169
|
-
whiteSpace: "nowrap"
|
|
170
|
-
},
|
|
171
|
-
children: [
|
|
172
|
-
/* @__PURE__ */ jsx("span", { style: { color: promptColor, fontWeight: 700 }, children: promptPrefix }),
|
|
173
|
-
/* @__PURE__ */ jsxs("span", { style: { color: termText }, children: [
|
|
174
|
-
" ",
|
|
175
|
-
typedText
|
|
176
|
-
] }),
|
|
177
|
-
/* @__PURE__ */ jsx(
|
|
178
|
-
"span",
|
|
179
|
-
{
|
|
180
|
-
style: {
|
|
181
|
-
display: "inline-block",
|
|
182
|
-
width: fontSize * 0.55,
|
|
183
|
-
height: fontSize * 1.1,
|
|
184
|
-
backgroundColor: cursorVisible ? termText : "transparent",
|
|
185
|
-
verticalAlign: "text-bottom",
|
|
186
|
-
marginLeft: 1
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
)
|
|
190
|
-
]
|
|
191
|
-
}
|
|
192
|
-
),
|
|
193
|
-
displayOutputLines.map((line, i) => {
|
|
194
|
-
const lineStart = outputStartP + i * outputSlice;
|
|
195
|
-
const lineOpacity = interpolate(progress, [lineStart, lineStart + 0.03], [0, 1], CLAMP);
|
|
196
|
-
const lineSlideY = interpolate(progress, [lineStart, lineStart + 0.05], [8 * s, 0], CLAMP);
|
|
197
|
-
return /* @__PURE__ */ jsx(
|
|
198
|
-
"div",
|
|
199
|
-
{
|
|
200
|
-
style: {
|
|
201
|
-
fontFamily: MONO_FONT,
|
|
202
|
-
fontSize,
|
|
203
|
-
lineHeight: `${lineHeight}px`,
|
|
204
|
-
color: termText,
|
|
205
|
-
opacity: lineOpacity,
|
|
206
|
-
transform: `translateY(${lineSlideY}px)`,
|
|
207
|
-
marginTop: i === 0 ? lineHeight * 0.5 : 0,
|
|
208
|
-
whiteSpace: "nowrap"
|
|
209
|
-
},
|
|
210
|
-
children: line
|
|
211
|
-
},
|
|
212
|
-
i
|
|
213
|
-
);
|
|
214
|
-
})
|
|
215
|
-
]
|
|
216
|
-
}
|
|
217
|
-
)
|
|
218
|
-
]
|
|
219
|
-
}
|
|
220
|
-
)
|
|
221
|
-
}
|
|
222
|
-
);
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
// src/visual-system/scene-templates/showcase-terminal.tsx
|
|
226
|
-
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
227
|
-
var ShowcaseTerminalTemplate = ({
|
|
228
|
-
variables,
|
|
229
|
-
style,
|
|
230
|
-
progress,
|
|
231
|
-
motionProgress = progress,
|
|
232
|
-
beatIntensity,
|
|
233
|
-
width,
|
|
234
|
-
height,
|
|
235
|
-
safeZone,
|
|
236
|
-
sceneDuration,
|
|
237
|
-
backgroundEffect,
|
|
238
|
-
isPlaying = true
|
|
239
|
-
}) => {
|
|
240
|
-
const { primary, foreground, font } = resolveTokens(style);
|
|
241
|
-
const textColor = foreground;
|
|
242
|
-
const textsRaw = String(variables.texts || "");
|
|
243
|
-
const command = String(variables.command || "");
|
|
244
|
-
const promptPrefix = String(variables.promptPrefix || "$");
|
|
245
|
-
const outputLines = parseList(variables.output);
|
|
246
|
-
return /* @__PURE__ */ jsxs2(
|
|
247
|
-
"div",
|
|
248
|
-
{
|
|
249
|
-
style: {
|
|
250
|
-
width,
|
|
251
|
-
height,
|
|
252
|
-
backgroundColor: "var(--vanillasky-template-surface, #000)",
|
|
253
|
-
position: "relative",
|
|
254
|
-
overflow: "hidden",
|
|
255
|
-
fontFamily: font
|
|
256
|
-
},
|
|
257
|
-
children: [
|
|
258
|
-
/* @__PURE__ */ jsx2(
|
|
259
|
-
SceneBackground,
|
|
260
|
-
{
|
|
261
|
-
style,
|
|
262
|
-
progress,
|
|
263
|
-
sceneDuration,
|
|
264
|
-
width,
|
|
265
|
-
height,
|
|
266
|
-
...getMediaBackgroundProps(variables),
|
|
267
|
-
backgroundEffect,
|
|
268
|
-
seed: textsRaw,
|
|
269
|
-
isPlaying,
|
|
270
|
-
beatIntensity
|
|
271
|
-
}
|
|
272
|
-
),
|
|
273
|
-
/* @__PURE__ */ jsx2(
|
|
274
|
-
TemplateText,
|
|
275
|
-
{
|
|
276
|
-
overMedia: hasSceneMedia(variables),
|
|
277
|
-
motionProgress,
|
|
278
|
-
typeTreatment: resolveTokens(style).preset.type,
|
|
279
|
-
archetype: "subtle",
|
|
280
|
-
text: String(variables.texts ?? ""),
|
|
281
|
-
progress,
|
|
282
|
-
sceneDuration: sceneDuration ?? 3,
|
|
283
|
-
width,
|
|
284
|
-
height,
|
|
285
|
-
position: "top",
|
|
286
|
-
sizeRole: "headline",
|
|
287
|
-
safeZone,
|
|
288
|
-
font,
|
|
289
|
-
color: textColor,
|
|
290
|
-
beatIntensity
|
|
291
|
-
}
|
|
292
|
-
),
|
|
293
|
-
/* @__PURE__ */ jsx2(
|
|
294
|
-
TerminalOutput,
|
|
295
|
-
{
|
|
296
|
-
progress,
|
|
297
|
-
command,
|
|
298
|
-
outputLines,
|
|
299
|
-
promptPrefix,
|
|
300
|
-
width,
|
|
301
|
-
height,
|
|
302
|
-
accent: primary,
|
|
303
|
-
beatIntensity
|
|
304
|
-
}
|
|
305
|
-
)
|
|
306
|
-
]
|
|
307
|
-
}
|
|
308
|
-
);
|
|
309
|
-
};
|
|
310
|
-
export {
|
|
311
|
-
ShowcaseTerminalTemplate
|
|
312
|
-
};
|
|
@@ -1,396 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ProductSurface,
|
|
3
|
-
WebScreenFill,
|
|
4
|
-
resolveProductSurfaceMotion
|
|
5
|
-
} from "./chunk-G5JPHBX7.js";
|
|
6
|
-
import {
|
|
7
|
-
stripPipe
|
|
8
|
-
} from "./chunk-S7HFLYNN.js";
|
|
9
|
-
import {
|
|
10
|
-
SceneBackground,
|
|
11
|
-
getMediaBackgroundProps
|
|
12
|
-
} from "./chunk-MXZSDGZQ.js";
|
|
13
|
-
import {
|
|
14
|
-
TemplateText
|
|
15
|
-
} from "./chunk-YJJC4N4D.js";
|
|
16
|
-
import "./chunk-L5BTTCZV.js";
|
|
17
|
-
import "./chunk-FRN6WKHA.js";
|
|
18
|
-
import "./chunk-W3VDIBGR.js";
|
|
19
|
-
import {
|
|
20
|
-
SPRING_SMOOTH,
|
|
21
|
-
interpolate,
|
|
22
|
-
spring
|
|
23
|
-
} from "./chunk-XTOXFMLM.js";
|
|
24
|
-
import {
|
|
25
|
-
hasSceneMedia
|
|
26
|
-
} from "./chunk-224QNWRA.js";
|
|
27
|
-
import "./chunk-5CDAM24P.js";
|
|
28
|
-
import {
|
|
29
|
-
TOKEN_DEFAULTS,
|
|
30
|
-
resolveTokens
|
|
31
|
-
} from "./chunk-XWWLKRNU.js";
|
|
32
|
-
|
|
33
|
-
// src/visual-system/primitives/devices/WebMockup.tsx
|
|
34
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
35
|
-
var CLAMP = { extrapolateLeft: "clamp", extrapolateRight: "clamp" };
|
|
36
|
-
var WebMockup = ({
|
|
37
|
-
progress,
|
|
38
|
-
width,
|
|
39
|
-
height,
|
|
40
|
-
frame = "browser",
|
|
41
|
-
screenMediaUrl = "",
|
|
42
|
-
screens = [],
|
|
43
|
-
addressBarUrl = "yourapp.com",
|
|
44
|
-
font = TOKEN_DEFAULTS.font,
|
|
45
|
-
accent = TOKEN_DEFAULTS.primary,
|
|
46
|
-
secondary = "#00b5e5",
|
|
47
|
-
bg,
|
|
48
|
-
beatIntensity = 0,
|
|
49
|
-
screenFit = "cover",
|
|
50
|
-
screenFocusX = 50,
|
|
51
|
-
screenFocusY = 50,
|
|
52
|
-
screenMotion = "pushIn",
|
|
53
|
-
screenCalloutText = "",
|
|
54
|
-
screenCalloutX = 70,
|
|
55
|
-
screenCalloutY = 35
|
|
56
|
-
}) => {
|
|
57
|
-
const s = Math.min(width, height) / 1080;
|
|
58
|
-
const isBrowser = frame !== "tablet";
|
|
59
|
-
const addressBarUrlClean = stripPipe(String(addressBarUrl || "yourapp.com"));
|
|
60
|
-
const slidesMode = screens.length > 0;
|
|
61
|
-
const deviceWidth = Math.min(width * 0.85, height * 0.55 * (16 / 9));
|
|
62
|
-
const chromeHeight = isBrowser ? 44 * s : 0;
|
|
63
|
-
const contentHeight = deviceWidth * (9 / 16);
|
|
64
|
-
const deviceHeight = chromeHeight + contentHeight;
|
|
65
|
-
const borderRadius = isBrowser ? 12 * s : 24 * s;
|
|
66
|
-
const borderWidth = isBrowser ? 0 : 6 * s;
|
|
67
|
-
const enterRange = slidesMode ? [0.02, 0.35] : [0.02, 0.85];
|
|
68
|
-
const enterP = spring(
|
|
69
|
-
interpolate(progress, enterRange, [0, 1], CLAMP),
|
|
70
|
-
{ damping: 28, stiffness: 80 }
|
|
71
|
-
);
|
|
72
|
-
const rotateX = (1 - enterP) * 70;
|
|
73
|
-
const deviceY = (1 - enterP) * 150 * s;
|
|
74
|
-
const deviceScale = interpolate(enterP, [0, 1], [0.85, 1]);
|
|
75
|
-
const deviceOpacity = interpolate(progress, [0.02, 0.1], [0, 1], CLAMP);
|
|
76
|
-
const slideCount = screens.length;
|
|
77
|
-
let slideOffset = 0;
|
|
78
|
-
if (slidesMode && slideCount >= 2) {
|
|
79
|
-
const transitionWidth = 0.1;
|
|
80
|
-
let totalSlides = 0;
|
|
81
|
-
for (let i = 1; i < slideCount; i++) {
|
|
82
|
-
const boundary = i / slideCount;
|
|
83
|
-
const start = boundary - transitionWidth / 2;
|
|
84
|
-
const end = boundary + transitionWidth / 2;
|
|
85
|
-
totalSlides += spring(
|
|
86
|
-
interpolate(progress, [start, end], [0, 1], CLAMP),
|
|
87
|
-
SPRING_SMOOTH
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
slideOffset = -totalSlides * deviceWidth;
|
|
91
|
-
}
|
|
92
|
-
const beatScale = slidesMode ? 1 + beatIntensity * 0.01 : 1 + beatIntensity * 0.015;
|
|
93
|
-
const dotSize = 12 * s;
|
|
94
|
-
const dotGap = 8 * s;
|
|
95
|
-
const placeholder = /* @__PURE__ */ jsx(
|
|
96
|
-
WebScreenFill,
|
|
97
|
-
{
|
|
98
|
-
accent,
|
|
99
|
-
secondary,
|
|
100
|
-
bg,
|
|
101
|
-
font,
|
|
102
|
-
s,
|
|
103
|
-
w: deviceWidth,
|
|
104
|
-
h: contentHeight,
|
|
105
|
-
progress
|
|
106
|
-
}
|
|
107
|
-
);
|
|
108
|
-
return /* @__PURE__ */ jsx(
|
|
109
|
-
"div",
|
|
110
|
-
{
|
|
111
|
-
style: {
|
|
112
|
-
position: "absolute",
|
|
113
|
-
top: height * 0.35,
|
|
114
|
-
left: (width - deviceWidth) / 2,
|
|
115
|
-
width: deviceWidth,
|
|
116
|
-
height: deviceHeight,
|
|
117
|
-
perspective: `${1200 * s}px`
|
|
118
|
-
},
|
|
119
|
-
children: /* @__PURE__ */ jsx(
|
|
120
|
-
"div",
|
|
121
|
-
{
|
|
122
|
-
style: {
|
|
123
|
-
width: deviceWidth,
|
|
124
|
-
height: deviceHeight,
|
|
125
|
-
transform: `rotateX(${rotateX}deg) translateY(${deviceY}px) scale(${deviceScale * beatScale})`,
|
|
126
|
-
transformOrigin: "center bottom",
|
|
127
|
-
opacity: deviceOpacity
|
|
128
|
-
},
|
|
129
|
-
children: /* @__PURE__ */ jsxs(
|
|
130
|
-
"div",
|
|
131
|
-
{
|
|
132
|
-
style: {
|
|
133
|
-
width: deviceWidth,
|
|
134
|
-
height: deviceHeight,
|
|
135
|
-
borderRadius,
|
|
136
|
-
overflow: "hidden",
|
|
137
|
-
position: "relative",
|
|
138
|
-
boxShadow: `0 ${20 * s}px ${60 * s}px rgba(0,0,0,0.35)`
|
|
139
|
-
},
|
|
140
|
-
children: [
|
|
141
|
-
isBrowser && /* @__PURE__ */ jsxs(
|
|
142
|
-
"div",
|
|
143
|
-
{
|
|
144
|
-
style: {
|
|
145
|
-
width: "100%",
|
|
146
|
-
height: 44 * s,
|
|
147
|
-
backgroundColor: "#e8e8e8",
|
|
148
|
-
display: "flex",
|
|
149
|
-
alignItems: "center",
|
|
150
|
-
paddingLeft: 16 * s,
|
|
151
|
-
paddingRight: 16 * s,
|
|
152
|
-
gap: 0,
|
|
153
|
-
position: "relative",
|
|
154
|
-
zIndex: 2
|
|
155
|
-
},
|
|
156
|
-
children: [
|
|
157
|
-
/* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: dotGap, flexShrink: 0 }, children: [
|
|
158
|
-
/* @__PURE__ */ jsx("div", { style: { width: dotSize, height: dotSize, borderRadius: "50%", backgroundColor: "#ff5f57" } }),
|
|
159
|
-
/* @__PURE__ */ jsx("div", { style: { width: dotSize, height: dotSize, borderRadius: "50%", backgroundColor: "#febc2e" } }),
|
|
160
|
-
/* @__PURE__ */ jsx("div", { style: { width: dotSize, height: dotSize, borderRadius: "50%", backgroundColor: "#28c840" } })
|
|
161
|
-
] }),
|
|
162
|
-
/* @__PURE__ */ jsxs(
|
|
163
|
-
"div",
|
|
164
|
-
{
|
|
165
|
-
style: {
|
|
166
|
-
flex: 1,
|
|
167
|
-
marginLeft: 16 * s,
|
|
168
|
-
height: 28 * s,
|
|
169
|
-
backgroundColor: "#ffffff",
|
|
170
|
-
borderRadius: 6 * s,
|
|
171
|
-
display: "flex",
|
|
172
|
-
alignItems: "center",
|
|
173
|
-
paddingLeft: 12 * s,
|
|
174
|
-
paddingRight: 12 * s,
|
|
175
|
-
overflow: "hidden"
|
|
176
|
-
},
|
|
177
|
-
children: [
|
|
178
|
-
/* @__PURE__ */ jsxs(
|
|
179
|
-
"svg",
|
|
180
|
-
{
|
|
181
|
-
width: 14 * s,
|
|
182
|
-
height: 14 * s,
|
|
183
|
-
viewBox: "0 0 14 14",
|
|
184
|
-
fill: "none",
|
|
185
|
-
style: { flexShrink: 0, marginRight: 6 * s },
|
|
186
|
-
children: [
|
|
187
|
-
/* @__PURE__ */ jsx("rect", { x: "2", y: "6", width: "10", height: "7", rx: "1.5", fill: "#999" }),
|
|
188
|
-
/* @__PURE__ */ jsx("path", { d: "M4.5 6V4.5a2.5 2.5 0 015 0V6", stroke: "#999", strokeWidth: "1.5", fill: "none", strokeLinecap: "round" })
|
|
189
|
-
]
|
|
190
|
-
}
|
|
191
|
-
),
|
|
192
|
-
/* @__PURE__ */ jsx(
|
|
193
|
-
"span",
|
|
194
|
-
{
|
|
195
|
-
style: {
|
|
196
|
-
fontSize: 13 * s,
|
|
197
|
-
fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
198
|
-
color: "#666",
|
|
199
|
-
whiteSpace: "nowrap",
|
|
200
|
-
overflow: "hidden",
|
|
201
|
-
textOverflow: "ellipsis"
|
|
202
|
-
},
|
|
203
|
-
children: addressBarUrlClean
|
|
204
|
-
}
|
|
205
|
-
)
|
|
206
|
-
]
|
|
207
|
-
}
|
|
208
|
-
)
|
|
209
|
-
]
|
|
210
|
-
}
|
|
211
|
-
),
|
|
212
|
-
!isBrowser && /* @__PURE__ */ jsx(
|
|
213
|
-
"div",
|
|
214
|
-
{
|
|
215
|
-
style: {
|
|
216
|
-
position: "absolute",
|
|
217
|
-
inset: 0,
|
|
218
|
-
borderRadius,
|
|
219
|
-
border: `${borderWidth * 1.5}px solid rgba(220,220,220,0.6)`,
|
|
220
|
-
pointerEvents: "none",
|
|
221
|
-
zIndex: 2
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
),
|
|
225
|
-
slidesMode ? /* @__PURE__ */ jsx(
|
|
226
|
-
"div",
|
|
227
|
-
{
|
|
228
|
-
style: {
|
|
229
|
-
position: "absolute",
|
|
230
|
-
top: chromeHeight,
|
|
231
|
-
left: 0,
|
|
232
|
-
width: deviceWidth * screens.length,
|
|
233
|
-
height: contentHeight,
|
|
234
|
-
display: "flex",
|
|
235
|
-
transform: `translateX(${slideOffset}px)`
|
|
236
|
-
},
|
|
237
|
-
children: screens.map((url, i) => /* @__PURE__ */ jsx(
|
|
238
|
-
"div",
|
|
239
|
-
{
|
|
240
|
-
style: {
|
|
241
|
-
width: deviceWidth,
|
|
242
|
-
height: contentHeight,
|
|
243
|
-
flexShrink: 0
|
|
244
|
-
},
|
|
245
|
-
children: /* @__PURE__ */ jsx(
|
|
246
|
-
ProductSurface,
|
|
247
|
-
{
|
|
248
|
-
mediaUrl: url,
|
|
249
|
-
progress,
|
|
250
|
-
width: deviceWidth,
|
|
251
|
-
height: contentHeight,
|
|
252
|
-
fit: screenFit,
|
|
253
|
-
focusX: screenFocusX,
|
|
254
|
-
focusY: screenFocusY,
|
|
255
|
-
motion: "still",
|
|
256
|
-
accent,
|
|
257
|
-
font,
|
|
258
|
-
placeholder
|
|
259
|
-
}
|
|
260
|
-
)
|
|
261
|
-
},
|
|
262
|
-
i
|
|
263
|
-
))
|
|
264
|
-
}
|
|
265
|
-
) : /* @__PURE__ */ jsx("div", { style: { position: "absolute", top: chromeHeight, left: 0, width: deviceWidth, height: contentHeight }, children: /* @__PURE__ */ jsx(
|
|
266
|
-
ProductSurface,
|
|
267
|
-
{
|
|
268
|
-
mediaUrl: screenMediaUrl,
|
|
269
|
-
progress,
|
|
270
|
-
width: deviceWidth,
|
|
271
|
-
height: contentHeight,
|
|
272
|
-
fit: screenFit,
|
|
273
|
-
focusX: screenFocusX,
|
|
274
|
-
focusY: screenFocusY,
|
|
275
|
-
motion: screenMotion,
|
|
276
|
-
calloutText: screenCalloutText,
|
|
277
|
-
calloutX: screenCalloutX,
|
|
278
|
-
calloutY: screenCalloutY,
|
|
279
|
-
accent,
|
|
280
|
-
font,
|
|
281
|
-
placeholder
|
|
282
|
-
}
|
|
283
|
-
) })
|
|
284
|
-
]
|
|
285
|
-
}
|
|
286
|
-
)
|
|
287
|
-
}
|
|
288
|
-
)
|
|
289
|
-
}
|
|
290
|
-
);
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
// src/visual-system/scene-templates/showcase-web.tsx
|
|
294
|
-
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
295
|
-
var ShowcaseWebTemplate = ({
|
|
296
|
-
variables,
|
|
297
|
-
style,
|
|
298
|
-
progress,
|
|
299
|
-
motionProgress = progress,
|
|
300
|
-
beatIntensity,
|
|
301
|
-
width,
|
|
302
|
-
height,
|
|
303
|
-
textArchetype,
|
|
304
|
-
safeZone,
|
|
305
|
-
sceneDuration,
|
|
306
|
-
backgroundEffect,
|
|
307
|
-
isPlaying
|
|
308
|
-
}) => {
|
|
309
|
-
const tokens = resolveTokens(style);
|
|
310
|
-
const { primary, secondary, foreground, font, background } = tokens;
|
|
311
|
-
const textColor = foreground;
|
|
312
|
-
const screenMediaUrl = String(variables.screenMediaUrl || "");
|
|
313
|
-
const extraScreens = [
|
|
314
|
-
String(variables.screen1Url || ""),
|
|
315
|
-
String(variables.screen2Url || "")
|
|
316
|
-
].filter(Boolean);
|
|
317
|
-
const screens = extraScreens.length > 0 && screenMediaUrl ? [screenMediaUrl, ...extraScreens] : extraScreens;
|
|
318
|
-
const frame = String(variables.frame || "browser").toLowerCase() === "tablet" ? "tablet" : "browser";
|
|
319
|
-
return /* @__PURE__ */ jsxs2(
|
|
320
|
-
"div",
|
|
321
|
-
{
|
|
322
|
-
style: {
|
|
323
|
-
width,
|
|
324
|
-
height,
|
|
325
|
-
backgroundColor: "var(--vanillasky-template-surface, #000)",
|
|
326
|
-
position: "relative",
|
|
327
|
-
overflow: "hidden",
|
|
328
|
-
fontFamily: font
|
|
329
|
-
},
|
|
330
|
-
children: [
|
|
331
|
-
/* @__PURE__ */ jsx2(
|
|
332
|
-
SceneBackground,
|
|
333
|
-
{
|
|
334
|
-
style,
|
|
335
|
-
progress,
|
|
336
|
-
sceneDuration,
|
|
337
|
-
width,
|
|
338
|
-
height,
|
|
339
|
-
...getMediaBackgroundProps(variables),
|
|
340
|
-
backgroundEffect,
|
|
341
|
-
seed: String(variables.texts || ""),
|
|
342
|
-
isPlaying,
|
|
343
|
-
beatIntensity
|
|
344
|
-
}
|
|
345
|
-
),
|
|
346
|
-
/* @__PURE__ */ jsx2(
|
|
347
|
-
TemplateText,
|
|
348
|
-
{
|
|
349
|
-
overMedia: hasSceneMedia(variables),
|
|
350
|
-
motionProgress,
|
|
351
|
-
typeTreatment: tokens.preset.type,
|
|
352
|
-
archetype: textArchetype ?? "subtle",
|
|
353
|
-
text: String(variables.texts ?? ""),
|
|
354
|
-
progress,
|
|
355
|
-
sceneDuration: sceneDuration ?? 3,
|
|
356
|
-
width,
|
|
357
|
-
height,
|
|
358
|
-
position: "top",
|
|
359
|
-
sizeRole: "headline",
|
|
360
|
-
safeZone,
|
|
361
|
-
font,
|
|
362
|
-
color: textColor,
|
|
363
|
-
beatIntensity
|
|
364
|
-
}
|
|
365
|
-
),
|
|
366
|
-
/* @__PURE__ */ jsx2(
|
|
367
|
-
WebMockup,
|
|
368
|
-
{
|
|
369
|
-
progress,
|
|
370
|
-
width,
|
|
371
|
-
height,
|
|
372
|
-
frame,
|
|
373
|
-
screenMediaUrl,
|
|
374
|
-
screens,
|
|
375
|
-
addressBarUrl: String(variables.addressBarUrl || ""),
|
|
376
|
-
font,
|
|
377
|
-
accent: primary,
|
|
378
|
-
secondary,
|
|
379
|
-
bg: background.type === "solid" ? background.color : void 0,
|
|
380
|
-
beatIntensity,
|
|
381
|
-
screenFit: variables.screenFit === "contain" ? "contain" : "cover",
|
|
382
|
-
screenFocusX: Number(variables.screenFocusX ?? 50),
|
|
383
|
-
screenFocusY: Number(variables.screenFocusY ?? 50),
|
|
384
|
-
screenMotion: resolveProductSurfaceMotion(variables.screenMotion),
|
|
385
|
-
screenCalloutText: String(variables.screenCalloutText || ""),
|
|
386
|
-
screenCalloutX: Number(variables.screenCalloutX ?? 70),
|
|
387
|
-
screenCalloutY: Number(variables.screenCalloutY ?? 35)
|
|
388
|
-
}
|
|
389
|
-
)
|
|
390
|
-
]
|
|
391
|
-
}
|
|
392
|
-
);
|
|
393
|
-
};
|
|
394
|
-
export {
|
|
395
|
-
ShowcaseWebTemplate
|
|
396
|
-
};
|