@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.
Files changed (173) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/PUBLIC-API.md +5 -8
  3. package/dist/{builtin-server-CUYPIDE7.js → builtin-server-W4PLJUZ5.js} +2 -2
  4. package/dist/{catalog-types-BIhSpOWK.d.ts → catalog-types-WTbLP6Jh.d.ts} +5 -1
  5. package/dist/chapter-title-YRLIQY3V.js +7 -0
  6. package/dist/check-runtime.js +5 -14
  7. package/dist/{chunk-AITKH6QT.js → chunk-2HFO22K2.js} +15 -40
  8. package/dist/chunk-4YM2M62S.js +13 -0
  9. package/dist/chunk-4ZJLPHBV.js +684 -0
  10. package/dist/chunk-77VY4O7A.js +390 -0
  11. package/dist/{chunk-MMUXVA47.js → chunk-7M56IUUX.js} +9 -8
  12. package/dist/chunk-7NZOMTAL.js +63 -0
  13. package/dist/{chunk-2DOLF4QN.js → chunk-AUPC6MDK.js} +12 -14
  14. package/dist/{chunk-352ZZCET.js → chunk-EGVQODKU.js} +2 -2
  15. package/dist/{chunk-2USVB3CY.js → chunk-ELVOT2FQ.js} +284 -177
  16. package/dist/chunk-EWWCQFTI.js +18 -0
  17. package/dist/{chunk-KT3M7KDL.js → chunk-HKUI5BTB.js} +3 -3
  18. package/dist/chunk-IIN5M5HW.js +697 -0
  19. package/dist/{chunk-LMG3GHLL.js → chunk-IQMYK5DX.js} +29 -3
  20. package/dist/{chunk-OWBT45EN.js → chunk-IR44XKBI.js} +1 -1
  21. package/dist/{chunk-MXZSDGZQ.js → chunk-NMFDC2W2.js} +4 -6
  22. package/dist/{chunk-5SLENAJW.js → chunk-PAJ44TFW.js} +1 -2
  23. package/dist/{chunk-L7QGGKJ2.js → chunk-PDQFQIQW.js} +1 -1
  24. package/dist/{chunk-WJ6FLKNC.js → chunk-R3XAOMKP.js} +14 -0
  25. package/dist/{chunk-2OKB27TG.js → chunk-RXTN2CW6.js} +2 -2
  26. package/dist/{chunk-XWWLKRNU.js → chunk-TVIU23OM.js} +38 -49
  27. package/dist/chunk-XX4GXKTX.js +35 -0
  28. package/dist/chunk-Z67Q5KUW.js +16 -0
  29. package/dist/{chunk-3VRMKFM7.js → chunk-ZDJNFA52.js} +11 -24
  30. package/dist/cinema-media-C7OUPNSH.js +12 -0
  31. package/dist/cli.js +18 -9
  32. package/dist/comparison-GNZOR7MF.js +37 -0
  33. package/dist/compose-video-TBFTONUC.js +12 -0
  34. package/dist/editorial-timeline-EMV5335S.js +43 -0
  35. package/dist/{events-BQ6z264n.d.ts → events-B4YCc4vc.d.ts} +1 -1
  36. package/dist/index.d.ts +4 -6
  37. package/dist/index.js +3 -7
  38. package/dist/key-figure-P37VK425.js +30 -0
  39. package/dist/{kit-tQnCPMOM.d.ts → kit-DrRpdn0p.d.ts} +2 -2
  40. package/dist/mobile-message-OF7T62B7.js +50 -0
  41. package/dist/quote-T6WYLN7A.js +33 -0
  42. package/dist/react.d.ts +21 -11
  43. package/dist/react.js +585 -826
  44. package/dist/scene-video-backdrop-PCTARAAJ.js +7 -0
  45. package/dist/server.d.ts +7 -8
  46. package/dist/server.js +179 -84
  47. package/dist/{system-prompt-RRXIWDDD.js → system-prompt-SYRT5DWM.js} +1 -1
  48. package/dist/template-catalog.d.ts +392 -16
  49. package/dist/template-catalog.js +1 -1
  50. package/dist/templates.d.ts +5 -5
  51. package/dist/test.d.ts +3 -3
  52. package/dist/test.js +18 -18
  53. package/dist/text-stream-LD364KBI.js +9 -0
  54. package/dist/{types-DWFO6qca.d.ts → types-CdBmNTGD.d.ts} +1 -1
  55. package/dist/{types-CEh9eUFu.d.ts → types-DdZw4GRQ.d.ts} +17 -48
  56. package/dist/validate-4OUD2CLX.js +10 -0
  57. package/docs/architecture.md +1 -1
  58. package/docs/concepts.md +1 -1
  59. package/docs/custom-templates.md +13 -28
  60. package/docs/customization.md +11 -59
  61. package/docs/getting-started.md +2 -2
  62. package/docs/immersive-interface.md +3 -4
  63. package/docs/maintainers/cinematic-migration.md +38 -0
  64. package/docs/media-and-audio.md +14 -14
  65. package/docs/motion-and-effects.md +6 -14
  66. package/docs/persistence.md +3 -3
  67. package/docs/production.md +11 -9
  68. package/docs/provider-integration.md +9 -16
  69. package/docs/reference/design-system.html +1 -1
  70. package/docs/reference/protocol.md +14 -4
  71. package/docs/testing.md +1 -1
  72. package/package.json +6 -3
  73. package/registry/items/backgrounds.json +1 -1
  74. package/registry/items/chapterTitle.json +80 -0
  75. package/registry/items/cinemaMedia.json +136 -0
  76. package/registry/items/comparison.json +168 -0
  77. package/registry/items/editorialTimeline.json +172 -0
  78. package/registry/items/keyFigure.json +162 -0
  79. package/registry/items/mobileMessage.json +153 -0
  80. package/registry/items/quote.json +161 -0
  81. package/registry/items/template-context.json +1 -1
  82. package/registry/items/theme.json +1 -1
  83. package/starters/video-chat/README.md +24 -26
  84. package/starters/video-chat/package.json +1 -1
  85. package/starters/video-chat/providers/video.ts +6 -5
  86. package/starters/video-chat/stock.ts +35 -151
  87. package/styles/fonts/OFL.txt +93 -0
  88. package/styles/fonts/manifest.json +66 -0
  89. package/styles/fonts/roboto-v51-cyrillic-ext.woff2 +0 -0
  90. package/styles/fonts/roboto-v51-cyrillic.woff2 +0 -0
  91. package/styles/fonts/roboto-v51-greek-ext.woff2 +0 -0
  92. package/styles/fonts/roboto-v51-greek.woff2 +0 -0
  93. package/styles/fonts/roboto-v51-latin-ext.woff2 +0 -0
  94. package/styles/fonts/roboto-v51-latin.woff2 +0 -0
  95. package/styles/fonts/roboto-v51-math.woff2 +0 -0
  96. package/styles/fonts/roboto-v51-symbols.woff2 +0 -0
  97. package/styles/fonts/roboto-v51-vietnamese.woff2 +0 -0
  98. package/styles/fonts/roboto.css +91 -0
  99. package/styles/video-chat.css +30 -22
  100. package/dist/bg-confetti-HITCGLGD.js +0 -89
  101. package/dist/bg-emoji-VU4UZYZN.js +0 -150
  102. package/dist/bg-media-L34PDQXJ.js +0 -106
  103. package/dist/brand-message-FUJ4STFO.js +0 -256
  104. package/dist/chart-bar-EGPHJATL.js +0 -310
  105. package/dist/chart-counter-5FFWQNZO.js +0 -306
  106. package/dist/chart-progress-ring-JMXQLMLC.js +0 -302
  107. package/dist/chunk-4UNKZEAT.js +0 -3575
  108. package/dist/chunk-5CDAM24P.js +0 -31
  109. package/dist/chunk-AOWSXU2K.js +0 -18
  110. package/dist/chunk-CJ7F2CE6.js +0 -104
  111. package/dist/chunk-FRN6WKHA.js +0 -185
  112. package/dist/chunk-G5JPHBX7.js +0 -336
  113. package/dist/chunk-L5BTTCZV.js +0 -97
  114. package/dist/chunk-P22HHFDK.js +0 -43
  115. package/dist/chunk-PP3MCPN4.js +0 -1998
  116. package/dist/chunk-QAAO7OAY.js +0 -19
  117. package/dist/chunk-S7HFLYNN.js +0 -35
  118. package/dist/chunk-W3VDIBGR.js +0 -217
  119. package/dist/chunk-XGRA2MUV.js +0 -242
  120. package/dist/chunk-XTOXFMLM.js +0 -105
  121. package/dist/chunk-YJJC4N4D.js +0 -761
  122. package/dist/compose-video-2NFH4DZY.js +0 -13
  123. package/dist/cta-logo-YR7LYUR5.js +0 -212
  124. package/dist/cta-media-DQJBKUO2.js +0 -221
  125. package/dist/incoming-call-54KQ7O5A.js +0 -323
  126. package/dist/infographic-before-after-ROS52GOW.js +0 -460
  127. package/dist/infographic-feature-list-E7MGUDAN.js +0 -272
  128. package/dist/infographic-problem-solution-3S6NGO5N.js +0 -343
  129. package/dist/infographic-stat-row-SYB7AB7H.js +0 -247
  130. package/dist/infographic-steps-KCE6JWE2.js +0 -406
  131. package/dist/prompt-input-MHX4O42G.js +0 -239
  132. package/dist/reaction-SLEGR3BE.js +0 -122
  133. package/dist/scene-video-backdrop-XFPX4O3I.js +0 -10
  134. package/dist/showcase-code-2HLAVKBM.js +0 -357
  135. package/dist/showcase-phone-Q4HEO4LH.js +0 -278
  136. package/dist/showcase-terminal-DL45LUFG.js +0 -312
  137. package/dist/showcase-web-2QZO73FZ.js +0 -396
  138. package/dist/social-conversation-75SD2637.js +0 -695
  139. package/dist/social-milestone-GEFUQSBF.js +0 -296
  140. package/dist/social-notification-FJ5VHVLK.js +0 -247
  141. package/dist/social-review-stack-KXQCKFRP.js +0 -242
  142. package/dist/social-testimonial-JZ7CHC7S.js +0 -287
  143. package/dist/social-tweet-UCDXM25F.js +0 -298
  144. package/dist/text-stream-54LXABJW.js +0 -10
  145. package/dist/validate-T7GBU2YF.js +0 -8
  146. package/registry/items/barChart.json +0 -245
  147. package/registry/items/beforeAfter.json +0 -180
  148. package/registry/items/bigNumber.json +0 -232
  149. package/registry/items/brandMessage.json +0 -164
  150. package/registry/items/cardList.json +0 -214
  151. package/registry/items/chatMessenger.json +0 -151
  152. package/registry/items/chatWhatsapp.json +0 -151
  153. package/registry/items/codeEditor.json +0 -191
  154. package/registry/items/confetti.json +0 -107
  155. package/registry/items/ctaLogo.json +0 -167
  156. package/registry/items/ctaMedia.json +0 -200
  157. package/registry/items/emojiBurst.json +0 -101
  158. package/registry/items/incomingCall.json +0 -177
  159. package/registry/items/media.json +0 -187
  160. package/registry/items/milestone.json +0 -212
  161. package/registry/items/notification.json +0 -189
  162. package/registry/items/phoneMockup.json +0 -261
  163. package/registry/items/problemSolution.json +0 -193
  164. package/registry/items/progressRing.json +0 -206
  165. package/registry/items/promptInput.json +0 -155
  166. package/registry/items/reaction.json +0 -176
  167. package/registry/items/reviewStack.json +0 -231
  168. package/registry/items/steps.json +0 -215
  169. package/registry/items/terminal.json +0 -219
  170. package/registry/items/testimonial.json +0 -171
  171. package/registry/items/tripleStats.json +0 -235
  172. package/registry/items/tweet.json +0 -210
  173. package/registry/items/webMockup.json +0 -280
@@ -1,242 +0,0 @@
1
- import {
2
- stripPipe
3
- } from "./chunk-S7HFLYNN.js";
4
- import {
5
- SceneBackground,
6
- getMediaBackgroundProps
7
- } from "./chunk-MXZSDGZQ.js";
8
- import "./chunk-FRN6WKHA.js";
9
- import {
10
- accessibleTextColor,
11
- withOpacity
12
- } from "./chunk-W3VDIBGR.js";
13
- import {
14
- SPRING_SNAPPY,
15
- interpolate,
16
- spring
17
- } from "./chunk-XTOXFMLM.js";
18
- import "./chunk-224QNWRA.js";
19
- import "./chunk-5CDAM24P.js";
20
- import {
21
- lighten,
22
- resolveTokens
23
- } from "./chunk-XWWLKRNU.js";
24
-
25
- // src/visual-system/primitives/social/ReviewStack.tsx
26
- import { jsx, jsxs } from "react/jsx-runtime";
27
- var CLAMP = {
28
- extrapolateLeft: "clamp",
29
- extrapolateRight: "clamp"
30
- };
31
- var ROTATIONS = [-1.4, 0.8, -0.7, 1.1, -0.9];
32
- var ReviewStack = ({
33
- progress,
34
- width,
35
- height,
36
- reviews,
37
- starColor = "#facc15",
38
- surfaceElevated,
39
- foreground,
40
- muted,
41
- beatIntensity = 0
42
- }) => {
43
- const dim = Math.min(width, height);
44
- const s = dim / 1080;
45
- const cardBg = surfaceElevated || lighten("#0a0a0f", 0.08);
46
- const borderColor = lighten("#0a0a0f", 0.15);
47
- const textPrimary = accessibleTextColor(cardBg, foreground);
48
- const textSecondary = accessibleTextColor(cardBg, muted);
49
- const isPortrait = height > width;
50
- const cardWidth = Math.min(
51
- width * (isPortrait ? 0.82 : 0.64),
52
- dim * (isPortrait ? 0.78 : 0.9)
53
- );
54
- const cardPad = dim * 0.028;
55
- const rowGap = Math.min(
56
- dim * 0.28,
57
- height * 0.55 / Math.max(reviews.length - 1, 1)
58
- );
59
- const beatScale = 1 + beatIntensity * 0.01;
60
- return /* @__PURE__ */ jsx(
61
- "div",
62
- {
63
- style: {
64
- position: "absolute",
65
- inset: 0,
66
- display: "flex",
67
- alignItems: "center",
68
- justifyContent: "center"
69
- },
70
- children: reviews.map((review, i) => {
71
- const cardStart = 0.02 + i * 0.1;
72
- const cardEnd = cardStart + 0.16;
73
- const cardP = spring(
74
- interpolate(progress, [cardStart, cardEnd], [0, 1], CLAMP),
75
- SPRING_SNAPPY
76
- );
77
- const cardScale = interpolate(cardP, [0, 1], [0.9, 1]);
78
- const cardOpacity = Math.min(1, cardP);
79
- const cardX = interpolate(cardP, [0, 1], [(i % 2 === 0 ? -1 : 1) * 54 * s, 0]);
80
- const rotation = ROTATIONS[i % ROTATIONS.length];
81
- const rowOffset = (i - (reviews.length - 1) / 2) * rowGap;
82
- const stars = review.stars == null ? 5 : Math.max(0, Math.min(5, Math.round(review.stars)));
83
- const title = stripPipe(review.title || review.quote || "");
84
- const body = stripPipe(review.body || "");
85
- const author = stripPipe(review.author || "");
86
- return /* @__PURE__ */ jsxs(
87
- "div",
88
- {
89
- "data-review-card": i,
90
- style: {
91
- position: "absolute",
92
- width: cardWidth,
93
- padding: cardPad,
94
- backgroundColor: cardBg,
95
- borderRadius: dim * 0.018,
96
- border: `1px solid ${borderColor}`,
97
- boxShadow: `0 ${dim * 0.01}px ${dim * 0.04}px rgba(0,0,0,0.4)`,
98
- transform: `translateX(${cardX}px) translateY(${rowOffset}px) rotate(${rotation}deg) scale(${cardScale * beatScale})`,
99
- opacity: cardOpacity,
100
- zIndex: i,
101
- top: "50%",
102
- left: "50%",
103
- marginLeft: -(cardWidth / 2),
104
- marginTop: -(dim * 0.11)
105
- },
106
- children: [
107
- /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: 3 * s, marginBottom: dim * 0.011 }, children: Array.from({ length: 5 }).map((_, si) => /* @__PURE__ */ jsx(
108
- "span",
109
- {
110
- style: {
111
- color: si < stars ? starColor : withOpacity(textPrimary, 0.15),
112
- fontSize: dim * 0.03,
113
- lineHeight: 1
114
- },
115
- children: "\u2605"
116
- },
117
- si
118
- )) }),
119
- /* @__PURE__ */ jsx(
120
- "div",
121
- {
122
- style: {
123
- fontSize: dim * 0.034,
124
- fontWeight: 700,
125
- color: textPrimary,
126
- marginBottom: dim * 9e-3,
127
- lineHeight: 1.3
128
- },
129
- children: title
130
- }
131
- ),
132
- body && /* @__PURE__ */ jsx(
133
- "div",
134
- {
135
- style: {
136
- fontSize: dim * 0.026,
137
- color: textSecondary,
138
- lineHeight: 1.5,
139
- marginBottom: dim * 0.014
140
- },
141
- children: body
142
- }
143
- ),
144
- author && /* @__PURE__ */ jsx(
145
- "div",
146
- {
147
- style: {
148
- fontSize: dim * 0.024,
149
- color: textSecondary,
150
- fontWeight: 500
151
- },
152
- children: author
153
- }
154
- )
155
- ]
156
- },
157
- i
158
- );
159
- })
160
- }
161
- );
162
- };
163
-
164
- // src/visual-system/scene-templates/social-review-stack.tsx
165
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
166
- function buildReviews(variables) {
167
- const reviews = [];
168
- for (let i = 1; i <= 3; i++) {
169
- const title = String(variables[`review${i}Title`] || "");
170
- if (!title) continue;
171
- reviews.push({
172
- title,
173
- body: String(variables[`review${i}Body`] || ""),
174
- author: String(variables[`review${i}Author`] || "")
175
- });
176
- }
177
- return reviews;
178
- }
179
- var SocialReviewStackTemplate = ({
180
- variables,
181
- style,
182
- progress,
183
- beatIntensity,
184
- width,
185
- height,
186
- sceneDuration,
187
- isPlaying = true
188
- }) => {
189
- const { font, foreground, surfaceElevated, muted } = resolveTokens(style);
190
- const starColor = "#facc15";
191
- const reviews = buildReviews(variables);
192
- const gradSeed = String(variables.review1Title || "review").split("").reduce((acc, c) => acc + c.charCodeAt(0), 0);
193
- return /* @__PURE__ */ jsxs2(
194
- "div",
195
- {
196
- style: {
197
- width,
198
- height,
199
- backgroundColor: "var(--vanillasky-template-surface, #000)",
200
- position: "relative",
201
- overflow: "hidden",
202
- fontFamily: font,
203
- display: "flex",
204
- alignItems: "center",
205
- justifyContent: "center"
206
- },
207
- children: [
208
- /* @__PURE__ */ jsx2(
209
- SceneBackground,
210
- {
211
- style,
212
- progress,
213
- sceneDuration,
214
- width,
215
- height,
216
- ...getMediaBackgroundProps(variables),
217
- seed: gradSeed,
218
- isPlaying,
219
- beatIntensity
220
- }
221
- ),
222
- /* @__PURE__ */ jsx2(
223
- ReviewStack,
224
- {
225
- progress,
226
- width,
227
- height,
228
- reviews,
229
- starColor,
230
- surfaceElevated,
231
- foreground,
232
- muted,
233
- beatIntensity
234
- }
235
- )
236
- ]
237
- }
238
- );
239
- };
240
- export {
241
- SocialReviewStackTemplate
242
- };
@@ -1,287 +0,0 @@
1
- import {
2
- stripPipe
3
- } from "./chunk-S7HFLYNN.js";
4
- import {
5
- SceneBackground,
6
- getMediaBackgroundProps
7
- } from "./chunk-MXZSDGZQ.js";
8
- import "./chunk-FRN6WKHA.js";
9
- import {
10
- accessibleTextColor,
11
- autoTextColor,
12
- withOpacity
13
- } from "./chunk-W3VDIBGR.js";
14
- import {
15
- SPRING_SMOOTH,
16
- SPRING_SNAPPY,
17
- interpolate,
18
- spring
19
- } from "./chunk-XTOXFMLM.js";
20
- import "./chunk-224QNWRA.js";
21
- import "./chunk-5CDAM24P.js";
22
- import {
23
- TOKEN_DEFAULTS,
24
- lighten,
25
- resolveTokens
26
- } from "./chunk-XWWLKRNU.js";
27
-
28
- // src/visual-system/primitives/social/TestimonialCard.tsx
29
- import { jsx, jsxs } from "react/jsx-runtime";
30
- var CLAMP = { extrapolateLeft: "clamp", extrapolateRight: "clamp" };
31
- var TestimonialCard = ({
32
- progress,
33
- quote: rawQuote,
34
- authorName: rawAuthorName,
35
- authorRole: rawAuthorRole = "",
36
- avatarColor = "#ec4899",
37
- accent = TOKEN_DEFAULTS.primary,
38
- surfaceElevated,
39
- foreground,
40
- muted,
41
- width,
42
- height,
43
- beatIntensity = 0
44
- }) => {
45
- const dim = Math.min(width, height);
46
- const s = dim / 1080;
47
- const quote = stripPipe(rawQuote || "");
48
- const authorName = stripPipe(rawAuthorName || "");
49
- const authorRole = stripPipe(rawAuthorRole || "");
50
- const initialChar = authorName.charAt(0).toUpperCase();
51
- const cardBg = surfaceElevated || lighten("#0a0a0f", 0.08);
52
- const borderColor = lighten("#0a0a0f", 0.15);
53
- const textPrimary = accessibleTextColor(cardBg, foreground);
54
- const textSecondary = accessibleTextColor(cardBg, muted);
55
- const quoteMarkP = spring(interpolate(progress, [0.02, 0.2], [0, 1], CLAMP), SPRING_SNAPPY);
56
- const quoteMarkScale = interpolate(quoteMarkP, [0, 1], [0.3, 1]);
57
- const quoteMarkOpacity = quoteMarkP;
58
- const lineWidth = interpolate(progress, [0.35, 0.55], [0, 100], CLAMP);
59
- const authorP = spring(interpolate(progress, [0.45, 0.7], [0, 1], CLAMP), SPRING_SMOOTH);
60
- const authorY = interpolate(authorP, [0, 1], [20 * s, 0]);
61
- const authorOpacity = authorP;
62
- const cardWidth = Math.min(width * 0.75, dim * 0.85);
63
- const cardPad = dim * 0.045;
64
- const avatarSize = dim * 0.055;
65
- const cardP = spring(interpolate(progress, [0, 0.15], [0, 1], CLAMP), SPRING_SMOOTH);
66
- const cardScale = interpolate(cardP, [0, 1], [0.92, 1]);
67
- const cardOpacity = interpolate(cardP, [0, 1], [0, 1]);
68
- const beatScale = 1 + beatIntensity * 0.01;
69
- return /* @__PURE__ */ jsx(
70
- "div",
71
- {
72
- style: {
73
- position: "absolute",
74
- inset: 0,
75
- display: "flex",
76
- alignItems: "center",
77
- justifyContent: "center"
78
- },
79
- children: /* @__PURE__ */ jsxs(
80
- "div",
81
- {
82
- style: {
83
- width: cardWidth,
84
- padding: cardPad,
85
- backgroundColor: cardBg,
86
- borderRadius: dim * 0.02,
87
- border: `1px solid ${borderColor}`,
88
- boxShadow: `0 ${dim * 0.01}px ${dim * 0.04}px rgba(0,0,0,0.4)`,
89
- position: "relative",
90
- zIndex: 1,
91
- transform: `scale(${cardScale * beatScale})`,
92
- opacity: cardOpacity
93
- },
94
- children: [
95
- /* @__PURE__ */ jsx(
96
- "div",
97
- {
98
- style: {
99
- fontSize: dim * 0.08,
100
- lineHeight: 0.8,
101
- color: accent,
102
- fontWeight: 700,
103
- marginBottom: dim * 0.018,
104
- transform: `scale(${quoteMarkScale})`,
105
- opacity: quoteMarkOpacity,
106
- transformOrigin: "left top"
107
- },
108
- children: "\u201C"
109
- }
110
- ),
111
- /* @__PURE__ */ jsx(
112
- "div",
113
- {
114
- style: {
115
- fontSize: dim * 0.038,
116
- lineHeight: 1.6,
117
- color: textPrimary,
118
- fontWeight: 500,
119
- marginBottom: dim * 0.032,
120
- display: "flex",
121
- flexWrap: "wrap",
122
- gap: `0 ${dim * 7e-3}px`
123
- },
124
- children: quote.split(/\s+/).filter(Boolean).map((word, i, arr) => {
125
- const wStart = 0.2 + i * (0.3 / Math.max(arr.length, 1));
126
- const wEnd = Math.min(wStart + 0.08, 0.55);
127
- const wordOpacity = interpolate(progress, [wStart, wEnd], [0, 1], CLAMP);
128
- const wordY = interpolate(progress, [wStart, wEnd], [8 * s, 0], CLAMP);
129
- return /* @__PURE__ */ jsx(
130
- "span",
131
- {
132
- style: {
133
- opacity: wordOpacity,
134
- transform: `translateY(${wordY}px)`,
135
- display: "inline-block"
136
- },
137
- children: word
138
- },
139
- i
140
- );
141
- })
142
- }
143
- ),
144
- /* @__PURE__ */ jsx("div", { style: { display: "flex", justifyContent: "center", marginBottom: dim * 0.028 }, children: /* @__PURE__ */ jsx("div", { style: { height: 1, width: `${lineWidth}%`, backgroundColor: borderColor } }) }),
145
- /* @__PURE__ */ jsxs(
146
- "div",
147
- {
148
- style: {
149
- display: "flex",
150
- alignItems: "center",
151
- gap: dim * 0.016,
152
- opacity: authorOpacity,
153
- transform: `translateY(${authorY}px)`
154
- },
155
- children: [
156
- /* @__PURE__ */ jsx(
157
- "div",
158
- {
159
- style: {
160
- width: avatarSize,
161
- height: avatarSize,
162
- borderRadius: "50%",
163
- backgroundColor: avatarColor,
164
- display: "flex",
165
- alignItems: "center",
166
- justifyContent: "center",
167
- fontSize: avatarSize * 0.45,
168
- fontWeight: 700,
169
- color: autoTextColor(avatarColor),
170
- flexShrink: 0
171
- },
172
- children: initialChar
173
- }
174
- ),
175
- /* @__PURE__ */ jsxs("div", { children: [
176
- /* @__PURE__ */ jsx(
177
- "div",
178
- {
179
- style: {
180
- fontSize: dim * 0.032,
181
- fontWeight: 600,
182
- color: textPrimary,
183
- marginBottom: dim * 3e-3
184
- },
185
- children: authorName
186
- }
187
- ),
188
- authorRole && /* @__PURE__ */ jsx("div", { style: { fontSize: dim * 0.024, color: textSecondary }, children: authorRole })
189
- ] })
190
- ]
191
- }
192
- )
193
- ]
194
- }
195
- )
196
- }
197
- );
198
- };
199
-
200
- // src/visual-system/scene-templates/social-testimonial.tsx
201
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
202
- var SocialTestimonialTemplate = ({
203
- variables,
204
- style,
205
- progress,
206
- beatIntensity,
207
- width,
208
- height,
209
- sceneDuration,
210
- isPlaying = true
211
- }) => {
212
- const dim = Math.min(width, height);
213
- const { primary, foreground, font, surfaceElevated, muted } = resolveTokens(style);
214
- const quote = stripPipe(String(variables.quote || ""));
215
- const gradSeed = quote.split("").reduce((acc, c) => acc + c.charCodeAt(0), 0);
216
- const authorName = String(variables.authorName || "Jessica Torres");
217
- const authorRole = String(variables.authorRole || "");
218
- const avatarBg = primary;
219
- return /* @__PURE__ */ jsxs2(
220
- "div",
221
- {
222
- style: {
223
- width,
224
- height,
225
- backgroundColor: "var(--vanillasky-template-surface, #000)",
226
- position: "relative",
227
- overflow: "hidden",
228
- fontFamily: font,
229
- display: "flex",
230
- alignItems: "center",
231
- justifyContent: "center"
232
- },
233
- children: [
234
- /* @__PURE__ */ jsx2(
235
- SceneBackground,
236
- {
237
- style,
238
- progress,
239
- sceneDuration,
240
- width,
241
- height,
242
- ...getMediaBackgroundProps(variables),
243
- seed: gradSeed,
244
- isPlaying,
245
- beatIntensity
246
- }
247
- ),
248
- /* @__PURE__ */ jsx2(
249
- "div",
250
- {
251
- style: {
252
- position: "absolute",
253
- width: dim * 0.9,
254
- height: dim * 0.7,
255
- borderRadius: "50%",
256
- background: `radial-gradient(ellipse, ${withOpacity(primary, 0.15)} 0%, ${withOpacity(primary, 0.05)} 40%, transparent 70%)`,
257
- top: "50%",
258
- left: "50%",
259
- transform: "translate(-50%, -50%)",
260
- pointerEvents: "none"
261
- }
262
- }
263
- ),
264
- /* @__PURE__ */ jsx2(
265
- TestimonialCard,
266
- {
267
- progress,
268
- quote,
269
- authorName,
270
- authorRole,
271
- avatarColor: avatarBg,
272
- accent: primary,
273
- surfaceElevated,
274
- foreground,
275
- muted,
276
- width,
277
- height,
278
- beatIntensity
279
- }
280
- )
281
- ]
282
- }
283
- );
284
- };
285
- export {
286
- SocialTestimonialTemplate
287
- };