@depths/waves 0.1.0 → 0.2.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.
@@ -0,0 +1,3158 @@
1
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
+ }) : x)(function(x) {
4
+ if (typeof require !== "undefined") return require.apply(this, arguments);
5
+ throw Error('Dynamic require of "' + x + '" is not supported');
6
+ });
7
+
8
+ // src/utils/json-schema.ts
9
+ import { z } from "zod";
10
+ function zodSchemaToJsonSchema(schema) {
11
+ return z.toJSONSchema(schema);
12
+ }
13
+
14
+ // src/ir/schema.ts
15
+ import { z as z2 } from "zod";
16
+ var TimingSpecSchema = z2.object({
17
+ from: z2.number().int().min(0).describe("Start frame (0-indexed)"),
18
+ durationInFrames: z2.number().int().positive().describe("Duration in frames")
19
+ });
20
+ var AssetPathSchema = z2.string().refine(
21
+ (path) => path.startsWith("/") || path.startsWith("http://") || path.startsWith("https://"),
22
+ "Asset path must be absolute (starting with /) or a full URL"
23
+ ).describe("Path to asset file, either absolute path or URL");
24
+ var BackgroundSpecSchema = z2.discriminatedUnion("type", [
25
+ z2.object({
26
+ type: z2.literal("color"),
27
+ value: z2.string().regex(/^#[0-9A-Fa-f]{6}$/, "Must be valid hex color")
28
+ }),
29
+ z2.object({
30
+ type: z2.literal("image"),
31
+ value: AssetPathSchema
32
+ }),
33
+ z2.object({
34
+ type: z2.literal("video"),
35
+ value: AssetPathSchema
36
+ })
37
+ ]);
38
+ var VideoConfigSchema = z2.object({
39
+ id: z2.string().default("main"),
40
+ width: z2.number().int().min(360).max(7680),
41
+ height: z2.number().int().min(360).max(4320),
42
+ fps: z2.number().int().min(1).max(120).default(30),
43
+ durationInFrames: z2.number().int().positive()
44
+ });
45
+ var AudioSpecSchema = z2.object({
46
+ background: AssetPathSchema.optional(),
47
+ volume: z2.number().min(0).max(1).default(0.5)
48
+ }).optional();
49
+ var TransitionSpecSchema = z2.object({
50
+ type: z2.string().min(1),
51
+ durationInFrames: z2.number().int().positive(),
52
+ props: z2.record(z2.string(), z2.unknown()).optional()
53
+ });
54
+ var ComponentNodeSchema = z2.lazy(
55
+ () => z2.object({
56
+ id: z2.string().min(1).max(100).describe("Unique component instance ID"),
57
+ type: z2.string().min(1).describe("Registered component type identifier"),
58
+ timing: TimingSpecSchema.optional().describe("Optional timing (frames)"),
59
+ props: z2.record(z2.string(), z2.unknown()).optional().describe("Component props object"),
60
+ metadata: z2.record(z2.string(), z2.unknown()).optional().describe("Optional metadata"),
61
+ children: z2.array(ComponentNodeSchema).optional().describe("Nested children nodes")
62
+ })
63
+ );
64
+ var SegmentSchema = z2.object({
65
+ id: z2.string().min(1).max(100),
66
+ durationInFrames: z2.number().int().positive(),
67
+ root: ComponentNodeSchema,
68
+ transitionToNext: TransitionSpecSchema.optional()
69
+ });
70
+ var VideoIRv2Schema = z2.object({
71
+ version: z2.literal("2.0").describe("IR schema version"),
72
+ video: VideoConfigSchema,
73
+ audio: AudioSpecSchema,
74
+ segments: z2.array(SegmentSchema).min(1).optional(),
75
+ timeline: z2.array(ComponentNodeSchema).min(1).optional()
76
+ }).superRefine((v, ctx) => {
77
+ const hasSegments = Array.isArray(v.segments);
78
+ const hasTimeline = Array.isArray(v.timeline);
79
+ if (hasSegments === hasTimeline) {
80
+ ctx.addIssue({
81
+ code: z2.ZodIssueCode.custom,
82
+ message: 'Exactly one of "segments" or "timeline" must be provided',
83
+ path: []
84
+ });
85
+ }
86
+ });
87
+ var VideoIRv2AuthoringSchema = z2.object({
88
+ version: z2.literal("2.0").describe("IR schema version"),
89
+ video: VideoConfigSchema,
90
+ audio: AudioSpecSchema,
91
+ segments: z2.array(SegmentSchema).min(1),
92
+ timeline: z2.never().optional()
93
+ }).describe("Preferred authoring format: sequential segments with optional transitions");
94
+ var VideoIRSchema = VideoIRv2Schema;
95
+
96
+ // src/core/registry.ts
97
+ var ComponentRegistry = class {
98
+ components = /* @__PURE__ */ new Map();
99
+ register(registration) {
100
+ if (this.components.has(registration.type)) {
101
+ throw new Error(`Component type "${registration.type}" is already registered`);
102
+ }
103
+ this.components.set(registration.type, registration);
104
+ }
105
+ get(type) {
106
+ return this.components.get(type);
107
+ }
108
+ getTypes() {
109
+ return Array.from(this.components.keys());
110
+ }
111
+ getTypesForLLM(options) {
112
+ const includeInternal = options?.includeInternal ?? false;
113
+ const out = [];
114
+ for (const [type, reg] of this.components) {
115
+ if (!includeInternal && reg.metadata.internal) continue;
116
+ out.push(type);
117
+ }
118
+ return out;
119
+ }
120
+ has(type) {
121
+ return this.components.has(type);
122
+ }
123
+ getJSONSchemaForLLM(options) {
124
+ const includeInternal = options?.includeInternal ?? false;
125
+ const schemas = {};
126
+ for (const [type, registration] of this.components) {
127
+ if (!includeInternal && registration.metadata.internal) continue;
128
+ schemas[type] = {
129
+ schema: zodSchemaToJsonSchema(registration.propsSchema),
130
+ metadata: registration.metadata
131
+ };
132
+ }
133
+ return schemas;
134
+ }
135
+ validateProps(type, props) {
136
+ const registration = this.components.get(type);
137
+ if (!registration) {
138
+ throw new Error(`Unknown component type: ${type}`);
139
+ }
140
+ const result = registration.propsSchema.safeParse(props);
141
+ if (result.success) {
142
+ return { success: true, data: result.data };
143
+ }
144
+ return { success: false, error: result.error };
145
+ }
146
+ };
147
+ var globalRegistry = new ComponentRegistry();
148
+
149
+ // src/components/primitives/Audio.tsx
150
+ import { Audio as RemotionAudio, interpolate, staticFile, useCurrentFrame } from "remotion";
151
+ import { z as z3 } from "zod";
152
+
153
+ // src/utils/assets.ts
154
+ function isRemoteAssetPath(assetPath) {
155
+ return assetPath.startsWith("http://") || assetPath.startsWith("https://");
156
+ }
157
+ function staticFileInputFromAssetPath(assetPath) {
158
+ if (isRemoteAssetPath(assetPath)) {
159
+ throw new Error("Remote asset paths must not be passed to staticFile()");
160
+ }
161
+ return assetPath.startsWith("/") ? assetPath.slice(1) : assetPath;
162
+ }
163
+
164
+ // src/components/primitives/Audio.tsx
165
+ import { jsx } from "react/jsx-runtime";
166
+ var AudioPropsSchema = z3.object({
167
+ src: z3.string(),
168
+ volume: z3.number().min(0).max(1).default(1),
169
+ startFrom: z3.number().int().min(0).default(0),
170
+ fadeIn: z3.number().int().min(0).default(0),
171
+ fadeOut: z3.number().int().min(0).default(0)
172
+ });
173
+ var Audio = ({
174
+ src,
175
+ volume,
176
+ startFrom,
177
+ fadeIn,
178
+ fadeOut,
179
+ __wavesDurationInFrames
180
+ }) => {
181
+ const frame = useCurrentFrame();
182
+ const durationInFrames = __wavesDurationInFrames ?? Number.POSITIVE_INFINITY;
183
+ const fadeInFactor = fadeIn > 0 ? interpolate(frame, [0, fadeIn], [0, 1], {
184
+ extrapolateLeft: "clamp",
185
+ extrapolateRight: "clamp"
186
+ }) : 1;
187
+ const fadeOutStart = durationInFrames - fadeOut;
188
+ const fadeOutFactor = fadeOut > 0 ? interpolate(frame, [fadeOutStart, durationInFrames], [1, 0], {
189
+ extrapolateLeft: "clamp",
190
+ extrapolateRight: "clamp"
191
+ }) : 1;
192
+ const resolvedSrc = isRemoteAssetPath(src) ? src : staticFile(staticFileInputFromAssetPath(src));
193
+ return /* @__PURE__ */ jsx(
194
+ RemotionAudio,
195
+ {
196
+ src: resolvedSrc,
197
+ trimBefore: startFrom,
198
+ volume: volume * fadeInFactor * fadeOutFactor
199
+ }
200
+ );
201
+ };
202
+ var AudioComponentMetadata = {
203
+ kind: "primitive",
204
+ category: "media",
205
+ description: "Plays an audio file with optional trimming and fade in/out",
206
+ llmGuidance: "Use for background music or sound effects. Prefer short clips for SFX. Use fadeIn/fadeOut (in frames) for smoother audio starts/ends."
207
+ };
208
+
209
+ // src/components/primitives/Box.tsx
210
+ import { z as z4 } from "zod";
211
+ import { jsx as jsx2 } from "react/jsx-runtime";
212
+ var BoxPropsSchema = z4.object({
213
+ x: z4.number().default(0).describe("Left offset in pixels"),
214
+ y: z4.number().default(0).describe("Top offset in pixels"),
215
+ width: z4.number().positive().optional().describe("Width in pixels (omit for auto)"),
216
+ height: z4.number().positive().optional().describe("Height in pixels (omit for auto)"),
217
+ padding: z4.number().min(0).default(0).describe("Padding in pixels"),
218
+ backgroundColor: z4.string().optional().describe("CSS color (e.g. #RRGGBB)"),
219
+ borderRadius: z4.number().min(0).default(0).describe("Border radius in pixels"),
220
+ opacity: z4.number().min(0).max(1).default(1).describe("Opacity 0..1")
221
+ });
222
+ var Box = ({
223
+ x,
224
+ y,
225
+ width,
226
+ height,
227
+ padding,
228
+ backgroundColor,
229
+ borderRadius,
230
+ opacity,
231
+ children
232
+ }) => {
233
+ return /* @__PURE__ */ jsx2(
234
+ "div",
235
+ {
236
+ style: {
237
+ position: "absolute",
238
+ left: x,
239
+ top: y,
240
+ width,
241
+ height,
242
+ padding,
243
+ backgroundColor,
244
+ borderRadius,
245
+ opacity,
246
+ boxSizing: "border-box"
247
+ },
248
+ children
249
+ }
250
+ );
251
+ };
252
+ var BoxComponentMetadata = {
253
+ kind: "primitive",
254
+ category: "layout",
255
+ acceptsChildren: true,
256
+ description: "Positioned container box for layout and backgrounds",
257
+ llmGuidance: "Use Box to position content by x/y and optionally constrain width/height. Prefer Box+Stack/Grid for layouts."
258
+ };
259
+
260
+ // src/components/primitives/Grid.tsx
261
+ import { AbsoluteFill } from "remotion";
262
+ import { z as z5 } from "zod";
263
+ import { jsx as jsx3 } from "react/jsx-runtime";
264
+ var GridPropsSchema = z5.object({
265
+ columns: z5.number().int().min(1).max(12).default(2),
266
+ rows: z5.number().int().min(1).max(12).default(1),
267
+ gap: z5.number().min(0).default(24),
268
+ padding: z5.number().min(0).default(0),
269
+ align: z5.enum(["start", "center", "end", "stretch"]).default("stretch"),
270
+ justify: z5.enum(["start", "center", "end", "stretch"]).default("stretch")
271
+ });
272
+ var mapAlign = (a) => {
273
+ if (a === "start") return "start";
274
+ if (a === "end") return "end";
275
+ if (a === "center") return "center";
276
+ return "stretch";
277
+ };
278
+ var mapJustify = (j) => {
279
+ if (j === "start") return "start";
280
+ if (j === "end") return "end";
281
+ if (j === "center") return "center";
282
+ return "stretch";
283
+ };
284
+ var Grid = ({ columns, rows, gap, padding, align, justify, children }) => {
285
+ return /* @__PURE__ */ jsx3(
286
+ AbsoluteFill,
287
+ {
288
+ style: {
289
+ display: "grid",
290
+ gridTemplateColumns: `repeat(${columns}, 1fr)`,
291
+ gridTemplateRows: `repeat(${rows}, 1fr)`,
292
+ gap,
293
+ padding,
294
+ alignItems: mapAlign(align),
295
+ justifyItems: mapJustify(justify),
296
+ boxSizing: "border-box"
297
+ },
298
+ children
299
+ }
300
+ );
301
+ };
302
+ var GridComponentMetadata = {
303
+ kind: "primitive",
304
+ category: "layout",
305
+ acceptsChildren: true,
306
+ description: "Grid layout container with configurable rows/columns",
307
+ llmGuidance: "Use Grid for photo collages and dashboards. Provide exactly rows*columns children when possible."
308
+ };
309
+
310
+ // src/components/primitives/Image.tsx
311
+ import { AbsoluteFill as AbsoluteFill2, Img, staticFile as staticFile2 } from "remotion";
312
+ import { z as z6 } from "zod";
313
+ import { jsx as jsx4 } from "react/jsx-runtime";
314
+ var ImagePropsSchema = z6.object({
315
+ src: z6.string().min(1),
316
+ fit: z6.enum(["cover", "contain"]).default("cover"),
317
+ borderRadius: z6.number().min(0).default(0),
318
+ opacity: z6.number().min(0).max(1).default(1)
319
+ });
320
+ var resolveAsset = (value) => isRemoteAssetPath(value) ? value : staticFile2(staticFileInputFromAssetPath(value));
321
+ var Image = ({ src, fit, borderRadius, opacity }) => {
322
+ return /* @__PURE__ */ jsx4(AbsoluteFill2, { style: { opacity }, children: /* @__PURE__ */ jsx4(
323
+ Img,
324
+ {
325
+ src: resolveAsset(src),
326
+ style: { width: "100%", height: "100%", objectFit: fit, borderRadius }
327
+ }
328
+ ) });
329
+ };
330
+ var ImageComponentMetadata = {
331
+ kind: "primitive",
332
+ category: "image",
333
+ description: "Full-frame image with object-fit options",
334
+ llmGuidance: 'Use Image for pictures and backgrounds. Use fit="cover" for full-bleed, fit="contain" to avoid cropping.'
335
+ };
336
+
337
+ // src/components/primitives/Scene.tsx
338
+ import { AbsoluteFill as AbsoluteFill3, Img as Img2, Video, staticFile as staticFile3 } from "remotion";
339
+ import { z as z7 } from "zod";
340
+ import { jsx as jsx5, jsxs } from "react/jsx-runtime";
341
+ var ScenePropsSchema = z7.object({
342
+ background: BackgroundSpecSchema
343
+ });
344
+ var resolveAsset2 = (value) => {
345
+ return isRemoteAssetPath(value) ? value : staticFile3(staticFileInputFromAssetPath(value));
346
+ };
347
+ var Scene = ({ background, children }) => {
348
+ return /* @__PURE__ */ jsxs(AbsoluteFill3, { children: [
349
+ background.type === "color" ? /* @__PURE__ */ jsx5(AbsoluteFill3, { style: { backgroundColor: background.value } }) : background.type === "image" ? /* @__PURE__ */ jsx5(
350
+ Img2,
351
+ {
352
+ src: resolveAsset2(background.value),
353
+ style: { width: "100%", height: "100%", objectFit: "cover" }
354
+ }
355
+ ) : /* @__PURE__ */ jsx5(
356
+ Video,
357
+ {
358
+ src: resolveAsset2(background.value),
359
+ style: { width: "100%", height: "100%", objectFit: "cover" }
360
+ }
361
+ ),
362
+ /* @__PURE__ */ jsx5(AbsoluteFill3, { children })
363
+ ] });
364
+ };
365
+ var SceneComponentMetadata = {
366
+ kind: "primitive",
367
+ category: "layout",
368
+ acceptsChildren: true,
369
+ description: "Scene container with a background and nested children",
370
+ llmGuidance: "Use Scene to define a segment of the video. Scene timings must be sequential with no gaps. Put Text and Audio as children."
371
+ };
372
+
373
+ // src/components/primitives/Segment.tsx
374
+ import { AbsoluteFill as AbsoluteFill4, interpolate as interpolate2, useCurrentFrame as useCurrentFrame2 } from "remotion";
375
+ import { z as z8 } from "zod";
376
+ import { jsx as jsx6 } from "react/jsx-runtime";
377
+ var TransitionPropsSchema = z8.object({
378
+ type: z8.string().min(1),
379
+ durationInFrames: z8.number().int().positive(),
380
+ props: z8.record(z8.string(), z8.unknown()).optional()
381
+ });
382
+ var SegmentPropsSchema = z8.object({
383
+ enterTransition: TransitionPropsSchema.optional(),
384
+ exitTransition: TransitionPropsSchema.optional()
385
+ });
386
+ function getSlideOptions(raw) {
387
+ const parsed = z8.object({
388
+ direction: z8.enum(["left", "right", "up", "down"]).default("left"),
389
+ distance: z8.number().int().min(1).max(2e3).default(80)
390
+ }).safeParse(raw ?? {});
391
+ if (parsed.success) return parsed.data;
392
+ return { direction: "left", distance: 80 };
393
+ }
394
+ function getZoomOptions(raw) {
395
+ const parsed = z8.object({
396
+ type: z8.enum(["zoomIn", "zoomOut"]).default("zoomIn")
397
+ }).safeParse(raw ?? {});
398
+ if (parsed.success) return parsed.data;
399
+ return { type: "zoomIn" };
400
+ }
401
+ function getWipeOptions(raw) {
402
+ const parsed = z8.object({
403
+ direction: z8.enum(["left", "right", "up", "down", "diagonal"]).default("right"),
404
+ softEdge: z8.boolean().default(false)
405
+ }).safeParse(raw ?? {});
406
+ if (parsed.success) return parsed.data;
407
+ return { direction: "right", softEdge: false };
408
+ }
409
+ function clipFor(direction, p) {
410
+ if (direction === "left") return `inset(0 ${100 * (1 - p)}% 0 0)`;
411
+ if (direction === "right") return `inset(0 0 0 ${100 * (1 - p)}%)`;
412
+ if (direction === "up") return `inset(0 0 ${100 * (1 - p)}% 0)`;
413
+ if (direction === "down") return `inset(${100 * (1 - p)}% 0 0 0)`;
414
+ return `polygon(0 0, ${100 * p}% 0, 0 ${100 * p}%)`;
415
+ }
416
+ function getCircularOptions(raw) {
417
+ const parsed = z8.object({
418
+ direction: z8.enum(["open", "close"]).default("open"),
419
+ center: z8.object({
420
+ x: z8.number().min(0).max(1).default(0.5),
421
+ y: z8.number().min(0).max(1).default(0.5)
422
+ }).default({ x: 0.5, y: 0.5 })
423
+ }).safeParse(raw ?? {});
424
+ if (parsed.success) return parsed.data;
425
+ return { direction: "open", center: { x: 0.5, y: 0.5 } };
426
+ }
427
+ var Segment = ({ enterTransition, exitTransition, children, __wavesDurationInFrames }) => {
428
+ const frame = useCurrentFrame2();
429
+ const durationInFrames = __wavesDurationInFrames ?? 0;
430
+ let opacity = 1;
431
+ let translateX = 0;
432
+ let translateY = 0;
433
+ let scale = 1;
434
+ let clipPath;
435
+ let filter;
436
+ if (enterTransition) {
437
+ const d = enterTransition.durationInFrames;
438
+ if (enterTransition.type === "FadeTransition") {
439
+ opacity *= interpolate2(frame, [0, d], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
440
+ }
441
+ if (enterTransition.type === "SlideTransition") {
442
+ const opts = getSlideOptions(enterTransition.props);
443
+ const t = interpolate2(frame, [0, d], [1, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
444
+ const delta = opts.distance * t;
445
+ if (opts.direction === "left") translateX += -delta;
446
+ if (opts.direction === "right") translateX += delta;
447
+ if (opts.direction === "up") translateY += -delta;
448
+ if (opts.direction === "down") translateY += delta;
449
+ opacity *= interpolate2(frame, [0, d], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
450
+ }
451
+ if (enterTransition.type === "ZoomTransition") {
452
+ const opts = getZoomOptions(enterTransition.props);
453
+ const fromScale = opts.type === "zoomIn" ? 1.2 : 0.85;
454
+ const t = interpolate2(frame, [0, d], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
455
+ scale *= fromScale + (1 - fromScale) * t;
456
+ opacity *= t;
457
+ }
458
+ if (enterTransition.type === "WipeTransition") {
459
+ const opts = getWipeOptions(enterTransition.props);
460
+ const t = interpolate2(frame, [0, d], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
461
+ clipPath = clipFor(opts.direction, t);
462
+ filter = opts.softEdge ? "blur(0.4px)" : void 0;
463
+ }
464
+ if (enterTransition.type === "CircularReveal") {
465
+ const opts = getCircularOptions(enterTransition.props);
466
+ const open = opts.direction === "open";
467
+ const t = interpolate2(frame, [0, d], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
468
+ const radiusPct = open ? 150 * t : 150 * (1 - t);
469
+ clipPath = `circle(${radiusPct}% at ${Math.round(opts.center.x * 100)}% ${Math.round(opts.center.y * 100)}%)`;
470
+ }
471
+ }
472
+ if (exitTransition && durationInFrames > 0) {
473
+ const d = exitTransition.durationInFrames;
474
+ const start = Math.max(0, durationInFrames - d);
475
+ if (exitTransition.type === "FadeTransition") {
476
+ opacity *= interpolate2(frame, [start, durationInFrames], [1, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
477
+ }
478
+ if (exitTransition.type === "SlideTransition") {
479
+ const opts = getSlideOptions(exitTransition.props);
480
+ const t = interpolate2(frame, [start, durationInFrames], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
481
+ const delta = opts.distance * t;
482
+ if (opts.direction === "left") translateX += delta;
483
+ if (opts.direction === "right") translateX += -delta;
484
+ if (opts.direction === "up") translateY += delta;
485
+ if (opts.direction === "down") translateY += -delta;
486
+ opacity *= interpolate2(frame, [start, durationInFrames], [1, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
487
+ }
488
+ if (exitTransition.type === "ZoomTransition") {
489
+ const opts = getZoomOptions(exitTransition.props);
490
+ const toScale = opts.type === "zoomIn" ? 1.25 : 0.75;
491
+ const t = interpolate2(frame, [start, durationInFrames], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
492
+ scale *= 1 + (toScale - 1) * t;
493
+ opacity *= 1 - t;
494
+ }
495
+ if (exitTransition.type === "WipeTransition") {
496
+ const opts = getWipeOptions(exitTransition.props);
497
+ const t = interpolate2(frame, [start, durationInFrames], [1, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
498
+ clipPath = clipFor(opts.direction, t);
499
+ filter = opts.softEdge ? "blur(0.4px)" : void 0;
500
+ }
501
+ if (exitTransition.type === "CircularReveal") {
502
+ const opts = getCircularOptions(exitTransition.props);
503
+ const open = opts.direction === "open";
504
+ const t = interpolate2(frame, [start, durationInFrames], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
505
+ const radiusPct = open ? 150 * (1 - t) : 150 * t;
506
+ clipPath = `circle(${radiusPct}% at ${Math.round(opts.center.x * 100)}% ${Math.round(opts.center.y * 100)}%)`;
507
+ }
508
+ }
509
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scale})`;
510
+ return /* @__PURE__ */ jsx6(AbsoluteFill4, { style: { opacity, transform, clipPath, filter }, children });
511
+ };
512
+ var SegmentComponentMetadata = {
513
+ kind: "primitive",
514
+ category: "layout",
515
+ internal: true,
516
+ acceptsChildren: true,
517
+ minChildren: 1,
518
+ maxChildren: 1,
519
+ description: "Internal segment wrapper (used by v2 segments compiler)"
520
+ };
521
+
522
+ // src/components/primitives/Shape.tsx
523
+ import { z as z9 } from "zod";
524
+ import { jsx as jsx7 } from "react/jsx-runtime";
525
+ var ShapePropsSchema = z9.object({
526
+ shape: z9.enum(["rect", "circle"]).default("rect"),
527
+ x: z9.number().default(0),
528
+ y: z9.number().default(0),
529
+ width: z9.number().positive().default(100),
530
+ height: z9.number().positive().default(100),
531
+ fill: z9.string().default("#FFFFFF"),
532
+ strokeColor: z9.string().optional(),
533
+ strokeWidth: z9.number().min(0).default(0),
534
+ opacity: z9.number().min(0).max(1).default(1)
535
+ });
536
+ var Shape = ({
537
+ shape,
538
+ x,
539
+ y,
540
+ width,
541
+ height,
542
+ fill,
543
+ strokeColor,
544
+ strokeWidth,
545
+ opacity
546
+ }) => {
547
+ return /* @__PURE__ */ jsx7(
548
+ "div",
549
+ {
550
+ style: {
551
+ position: "absolute",
552
+ left: x,
553
+ top: y,
554
+ width,
555
+ height,
556
+ backgroundColor: fill,
557
+ borderRadius: shape === "circle" ? 9999 : 0,
558
+ border: strokeWidth > 0 ? `${strokeWidth}px solid ${strokeColor ?? fill}` : void 0,
559
+ opacity
560
+ }
561
+ }
562
+ );
563
+ };
564
+ var ShapeComponentMetadata = {
565
+ kind: "primitive",
566
+ category: "layout",
567
+ description: "Simple rect/circle shape for UI accents",
568
+ llmGuidance: "Use Shape for lines, badges, and simple UI blocks. Use circle for dots and rings."
569
+ };
570
+
571
+ // src/components/primitives/Stack.tsx
572
+ import { AbsoluteFill as AbsoluteFill5 } from "remotion";
573
+ import { z as z10 } from "zod";
574
+ import { jsx as jsx8 } from "react/jsx-runtime";
575
+ var StackPropsSchema = z10.object({
576
+ direction: z10.enum(["row", "column"]).default("column"),
577
+ gap: z10.number().min(0).default(24),
578
+ padding: z10.number().min(0).default(0),
579
+ align: z10.enum(["start", "center", "end", "stretch"]).default("center"),
580
+ justify: z10.enum(["start", "center", "end", "between"]).default("center")
581
+ });
582
+ var mapAlign2 = (a) => {
583
+ if (a === "start") return "flex-start";
584
+ if (a === "end") return "flex-end";
585
+ if (a === "stretch") return "stretch";
586
+ return "center";
587
+ };
588
+ var mapJustify2 = (j) => {
589
+ if (j === "start") return "flex-start";
590
+ if (j === "end") return "flex-end";
591
+ if (j === "between") return "space-between";
592
+ return "center";
593
+ };
594
+ var Stack = ({ direction, gap, padding, align, justify, children }) => {
595
+ return /* @__PURE__ */ jsx8(
596
+ AbsoluteFill5,
597
+ {
598
+ style: {
599
+ display: "flex",
600
+ flexDirection: direction,
601
+ gap,
602
+ padding,
603
+ alignItems: mapAlign2(align),
604
+ justifyContent: mapJustify2(justify),
605
+ boxSizing: "border-box"
606
+ },
607
+ children
608
+ }
609
+ );
610
+ };
611
+ var StackComponentMetadata = {
612
+ kind: "primitive",
613
+ category: "layout",
614
+ acceptsChildren: true,
615
+ description: "Flexbox stack layout (row/column) with gap and alignment",
616
+ llmGuidance: "Use Stack to arrange child components in a row or column without manual positioning."
617
+ };
618
+
619
+ // src/components/primitives/Text.tsx
620
+ import { AbsoluteFill as AbsoluteFill6, interpolate as interpolate3, useCurrentFrame as useCurrentFrame3 } from "remotion";
621
+ import { z as z11 } from "zod";
622
+ import { jsx as jsx9 } from "react/jsx-runtime";
623
+ var TextPropsSchema = z11.object({
624
+ content: z11.string(),
625
+ fontSize: z11.number().default(48),
626
+ color: z11.string().default("#FFFFFF"),
627
+ position: z11.enum(["top", "center", "bottom", "left", "right"]).default("center"),
628
+ animation: z11.enum(["none", "fade", "slide", "zoom"]).default("fade")
629
+ });
630
+ var getPositionStyles = (position) => {
631
+ const base = {
632
+ display: "flex",
633
+ justifyContent: "center",
634
+ alignItems: "center"
635
+ };
636
+ switch (position) {
637
+ case "top":
638
+ return { ...base, alignItems: "flex-start", paddingTop: 60 };
639
+ case "bottom":
640
+ return { ...base, alignItems: "flex-end", paddingBottom: 60 };
641
+ case "left":
642
+ return { ...base, justifyContent: "flex-start", paddingLeft: 60 };
643
+ case "right":
644
+ return { ...base, justifyContent: "flex-end", paddingRight: 60 };
645
+ default:
646
+ return base;
647
+ }
648
+ };
649
+ var getAnimationStyle = (frame, animation) => {
650
+ const animDuration = 30;
651
+ switch (animation) {
652
+ case "fade": {
653
+ const opacity = interpolate3(frame, [0, animDuration], [0, 1], {
654
+ extrapolateLeft: "clamp",
655
+ extrapolateRight: "clamp"
656
+ });
657
+ return { opacity };
658
+ }
659
+ case "slide": {
660
+ const translateY = interpolate3(frame, [0, animDuration], [50, 0], {
661
+ extrapolateLeft: "clamp",
662
+ extrapolateRight: "clamp"
663
+ });
664
+ const opacity = interpolate3(frame, [0, animDuration], [0, 1], {
665
+ extrapolateLeft: "clamp",
666
+ extrapolateRight: "clamp"
667
+ });
668
+ return { transform: `translateY(${translateY}px)`, opacity };
669
+ }
670
+ case "zoom": {
671
+ const scale = interpolate3(frame, [0, animDuration], [0.8, 1], {
672
+ extrapolateLeft: "clamp",
673
+ extrapolateRight: "clamp"
674
+ });
675
+ const opacity = interpolate3(frame, [0, animDuration], [0, 1], {
676
+ extrapolateLeft: "clamp",
677
+ extrapolateRight: "clamp"
678
+ });
679
+ return { transform: `scale(${scale})`, opacity };
680
+ }
681
+ default:
682
+ return {};
683
+ }
684
+ };
685
+ var Text = ({ content, fontSize, color, position, animation }) => {
686
+ const frame = useCurrentFrame3();
687
+ const positionStyles6 = getPositionStyles(position);
688
+ const animationStyles = getAnimationStyle(frame, animation);
689
+ return /* @__PURE__ */ jsx9(AbsoluteFill6, { style: positionStyles6, children: /* @__PURE__ */ jsx9(
690
+ "div",
691
+ {
692
+ style: {
693
+ fontSize,
694
+ color,
695
+ fontWeight: 600,
696
+ textAlign: "center",
697
+ ...animationStyles
698
+ },
699
+ children: content
700
+ }
701
+ ) });
702
+ };
703
+ var TextComponentMetadata = {
704
+ kind: "primitive",
705
+ category: "text",
706
+ description: "Displays animated text with positioning and animation options",
707
+ llmGuidance: 'Use for titles, subtitles, captions. Keep content under 100 characters for readability. Position "center" works best for titles.',
708
+ examples: [
709
+ {
710
+ content: "Welcome to Waves",
711
+ fontSize: 72,
712
+ color: "#FFFFFF",
713
+ position: "center",
714
+ animation: "fade"
715
+ },
716
+ {
717
+ content: "Building the future of video",
718
+ fontSize: 36,
719
+ color: "#CCCCCC",
720
+ position: "bottom",
721
+ animation: "slide"
722
+ }
723
+ ]
724
+ };
725
+
726
+ // src/components/primitives/Video.tsx
727
+ import { AbsoluteFill as AbsoluteFill7, Video as RemotionVideo, staticFile as staticFile4 } from "remotion";
728
+ import { z as z12 } from "zod";
729
+ import { jsx as jsx10 } from "react/jsx-runtime";
730
+ var VideoPropsSchema = z12.object({
731
+ src: z12.string().min(1),
732
+ fit: z12.enum(["cover", "contain"]).default("cover"),
733
+ borderRadius: z12.number().min(0).default(0),
734
+ opacity: z12.number().min(0).max(1).default(1),
735
+ muted: z12.boolean().default(true)
736
+ });
737
+ var resolveAsset3 = (value) => isRemoteAssetPath(value) ? value : staticFile4(staticFileInputFromAssetPath(value));
738
+ var Video2 = ({ src, fit, borderRadius, opacity, muted }) => {
739
+ return /* @__PURE__ */ jsx10(AbsoluteFill7, { style: { opacity }, children: /* @__PURE__ */ jsx10(
740
+ RemotionVideo,
741
+ {
742
+ src: resolveAsset3(src),
743
+ muted,
744
+ style: { width: "100%", height: "100%", objectFit: fit, borderRadius }
745
+ }
746
+ ) });
747
+ };
748
+ var VideoComponentMetadata = {
749
+ kind: "primitive",
750
+ category: "media",
751
+ description: "Full-frame video with object-fit options",
752
+ llmGuidance: "Use Video for B-roll. Keep videos short and muted unless you intentionally want audio."
753
+ };
754
+
755
+ // src/components/composites/AnimatedCounter.tsx
756
+ import { AbsoluteFill as AbsoluteFill8, interpolate as interpolate4, spring, useCurrentFrame as useCurrentFrame4, useVideoConfig } from "remotion";
757
+ import { z as z13 } from "zod";
758
+ import { jsx as jsx11, jsxs as jsxs2 } from "react/jsx-runtime";
759
+ var AnimatedCounterPropsSchema = z13.object({
760
+ from: z13.number().default(0),
761
+ to: z13.number().default(100),
762
+ fontSize: z13.number().min(8).max(300).default(96),
763
+ color: z13.string().default("#FFFFFF"),
764
+ fontFamily: z13.string().default("Inter"),
765
+ fontWeight: z13.number().int().min(100).max(900).default(700),
766
+ icon: z13.string().optional(),
767
+ suffix: z13.string().optional(),
768
+ animationType: z13.enum(["spring", "linear"]).default("spring")
769
+ });
770
+ var AnimatedCounter = ({
771
+ from,
772
+ to,
773
+ fontSize,
774
+ color,
775
+ fontFamily,
776
+ fontWeight,
777
+ icon,
778
+ suffix,
779
+ animationType,
780
+ __wavesDurationInFrames
781
+ }) => {
782
+ const frame = useCurrentFrame4();
783
+ const { fps } = useVideoConfig();
784
+ const total = Math.max(1, __wavesDurationInFrames ?? 1);
785
+ const progress = animationType === "spring" ? spring({ frame, fps, config: { damping: 14, stiffness: 110, mass: 0.9 } }) : interpolate4(frame, [0, total], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
786
+ const value = from + (to - from) * Math.max(0, Math.min(1, progress));
787
+ const rounded = Math.round(value);
788
+ const label = `${rounded.toLocaleString()}${suffix ?? ""}`;
789
+ return /* @__PURE__ */ jsx11(AbsoluteFill8, { style: { display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsxs2("div", { style: { textAlign: "center" }, children: [
790
+ icon ? /* @__PURE__ */ jsx11("div", { style: { fontSize: Math.round(fontSize * 0.5), marginBottom: 18 }, children: icon }) : null,
791
+ /* @__PURE__ */ jsx11("div", { style: { fontSize, color, fontFamily, fontWeight, lineHeight: 1 }, children: label })
792
+ ] }) });
793
+ };
794
+ var AnimatedCounterComponentMetadata = {
795
+ kind: "composite",
796
+ category: "data",
797
+ description: "Animated numeric counter (spring or linear), optionally with an icon and suffix",
798
+ llmGuidance: 'Use for big stats. animationType="spring" feels natural. suffix for units (%, K, M).',
799
+ examples: [
800
+ { from: 0, to: 100, suffix: "%", icon: "\u{1F4C8}" },
801
+ { from: 0, to: 25e3, suffix: "+", animationType: "linear" }
802
+ ]
803
+ };
804
+
805
+ // src/components/composites/BarChart.tsx
806
+ import { AbsoluteFill as AbsoluteFill9, spring as spring2, useCurrentFrame as useCurrentFrame5, useVideoConfig as useVideoConfig2 } from "remotion";
807
+ import { z as z14 } from "zod";
808
+ import { jsx as jsx12, jsxs as jsxs3 } from "react/jsx-runtime";
809
+ var BarChartPropsSchema = z14.object({
810
+ data: z14.array(z14.object({
811
+ label: z14.string().min(1),
812
+ value: z14.number(),
813
+ color: z14.string().optional()
814
+ })).min(2).max(8),
815
+ orientation: z14.enum(["horizontal", "vertical"]).default("vertical"),
816
+ showValues: z14.boolean().default(true),
817
+ showGrid: z14.boolean().default(false),
818
+ maxValue: z14.number().optional()
819
+ });
820
+ var BarChart = ({ data, orientation, showValues, showGrid, maxValue }) => {
821
+ const frame = useCurrentFrame5();
822
+ const { fps } = useVideoConfig2();
823
+ const max = maxValue ?? Math.max(...data.map((d) => d.value));
824
+ return /* @__PURE__ */ jsxs3(AbsoluteFill9, { style: { padding: 90, boxSizing: "border-box" }, children: [
825
+ showGrid ? /* @__PURE__ */ jsx12("div", { style: { position: "absolute", left: 90, right: 90, top: 90, bottom: 90, opacity: 0.15, backgroundImage: "linear-gradient(#fff 1px, transparent 1px)", backgroundSize: "100% 60px" } }) : null,
826
+ /* @__PURE__ */ jsx12(
827
+ "div",
828
+ {
829
+ style: {
830
+ display: "flex",
831
+ flexDirection: orientation === "vertical" ? "row" : "column",
832
+ gap: 24,
833
+ width: "100%",
834
+ height: "100%",
835
+ alignItems: orientation === "vertical" ? "flex-end" : "stretch",
836
+ justifyContent: "space-between"
837
+ },
838
+ children: data.map((d, i) => {
839
+ const p = spring2({ frame: frame - i * 4, fps, config: { damping: 14, stiffness: 120, mass: 0.9 } });
840
+ const ratio = max === 0 ? 0 : d.value / max * p;
841
+ const color = d.color ?? "#0A84FF";
842
+ return /* @__PURE__ */ jsxs3("div", { style: { flex: 1, display: "flex", flexDirection: "column", alignItems: "center", gap: 10 }, children: [
843
+ orientation === "vertical" ? /* @__PURE__ */ jsx12("div", { style: { width: "100%", flex: 1, display: "flex", alignItems: "flex-end" }, children: /* @__PURE__ */ jsx12("div", { style: { width: "100%", height: `${Math.round(ratio * 100)}%`, backgroundColor: color, borderRadius: 12 } }) }) : /* @__PURE__ */ jsx12("div", { style: { width: "100%", display: "flex", alignItems: "center", gap: 12 }, children: /* @__PURE__ */ jsx12("div", { style: { flex: 1, height: 18, backgroundColor: "rgba(255,255,255,0.15)", borderRadius: 9999, overflow: "hidden" }, children: /* @__PURE__ */ jsx12("div", { style: { width: `${Math.round(ratio * 100)}%`, height: "100%", backgroundColor: color } }) }) }),
844
+ /* @__PURE__ */ jsx12("div", { style: { color: "#FFFFFF", fontWeight: 700, fontSize: 22, opacity: 0.9 }, children: d.label }),
845
+ showValues ? /* @__PURE__ */ jsx12("div", { style: { color: "#FFFFFF", fontWeight: 800, fontSize: 26 }, children: Math.round(d.value).toLocaleString() }) : null
846
+ ] }, d.label);
847
+ })
848
+ }
849
+ )
850
+ ] });
851
+ };
852
+ var BarChartComponentMetadata = {
853
+ kind: "composite",
854
+ category: "data",
855
+ description: "Animated bar chart (vertical or horizontal)",
856
+ llmGuidance: "Use 2-6 bars. Provide maxValue to lock scale across multiple charts."
857
+ };
858
+
859
+ // src/components/composites/CardStack.tsx
860
+ import { AbsoluteFill as AbsoluteFill10, interpolate as interpolate5, spring as spring3, useCurrentFrame as useCurrentFrame6, useVideoConfig as useVideoConfig3 } from "remotion";
861
+ import { z as z15 } from "zod";
862
+ import { jsx as jsx13, jsxs as jsxs4 } from "react/jsx-runtime";
863
+ var CardSchema = z15.object({
864
+ title: z15.string().min(1),
865
+ content: z15.string().min(1),
866
+ backgroundColor: z15.string().optional()
867
+ });
868
+ var CardStackPropsSchema = z15.object({
869
+ cards: z15.array(CardSchema).min(2).max(5),
870
+ transition: z15.enum(["flip", "slide", "fade"]).default("flip"),
871
+ displayDuration: z15.number().int().min(30).max(150).default(90)
872
+ });
873
+ var CardStack = ({ cards, transition, displayDuration }) => {
874
+ const frame = useCurrentFrame6();
875
+ const { fps } = useVideoConfig3();
876
+ const index = Math.min(cards.length - 1, Math.floor(frame / displayDuration));
877
+ const local = frame - index * displayDuration;
878
+ const p = spring3({ frame: local, fps, config: { damping: 14, stiffness: 120, mass: 0.9 } });
879
+ const card = cards[index];
880
+ const bg = card.backgroundColor ?? "rgba(255,255,255,0.1)";
881
+ const opacity = transition === "fade" ? p : 1;
882
+ const slideX = transition === "slide" ? interpolate5(p, [0, 1], [80, 0]) : 0;
883
+ const rotateY = transition === "flip" ? interpolate5(p, [0, 1], [70, 0]) : 0;
884
+ return /* @__PURE__ */ jsx13(AbsoluteFill10, { style: { justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ jsxs4(
885
+ "div",
886
+ {
887
+ style: {
888
+ width: 980,
889
+ height: 520,
890
+ borderRadius: 28,
891
+ padding: 60,
892
+ boxSizing: "border-box",
893
+ backgroundColor: bg,
894
+ boxShadow: "0 30px 90px rgba(0,0,0,0.35)",
895
+ color: "#FFFFFF",
896
+ transform: `translateX(${slideX}px) rotateY(${rotateY}deg)`,
897
+ transformStyle: "preserve-3d",
898
+ opacity
899
+ },
900
+ children: [
901
+ /* @__PURE__ */ jsx13("div", { style: { fontSize: 56, fontWeight: 900, marginBottom: 22 }, children: card.title }),
902
+ /* @__PURE__ */ jsx13("div", { style: { fontSize: 30, fontWeight: 700, opacity: 0.9, lineHeight: 1.3 }, children: card.content })
903
+ ]
904
+ }
905
+ ) });
906
+ };
907
+ var CardStackComponentMetadata = {
908
+ kind: "composite",
909
+ category: "layout",
910
+ description: "Sequential stacked cards (2-5) with flip/slide/fade transitions",
911
+ llmGuidance: "Use for steps/features. displayDuration is frames per card."
912
+ };
913
+
914
+ // src/components/composites/CircularReveal.tsx
915
+ import { AbsoluteFill as AbsoluteFill11, interpolate as interpolate6, useCurrentFrame as useCurrentFrame7 } from "remotion";
916
+ import { z as z16 } from "zod";
917
+ import { jsx as jsx14 } from "react/jsx-runtime";
918
+ var CenterSchema = z16.object({
919
+ x: z16.number().min(0).max(1).default(0.5),
920
+ y: z16.number().min(0).max(1).default(0.5)
921
+ });
922
+ var CircularRevealPropsSchema = z16.object({
923
+ durationInFrames: z16.number().int().min(10).max(60).default(30),
924
+ direction: z16.enum(["open", "close"]).default("open"),
925
+ center: CenterSchema.optional(),
926
+ phase: z16.enum(["in", "out", "inOut"]).default("inOut")
927
+ });
928
+ var CircularReveal = ({
929
+ durationInFrames,
930
+ direction,
931
+ center,
932
+ phase,
933
+ children,
934
+ __wavesDurationInFrames
935
+ }) => {
936
+ const frame = useCurrentFrame7();
937
+ const total = Math.max(1, __wavesDurationInFrames ?? 1);
938
+ const d = Math.min(durationInFrames, total);
939
+ const c = center ?? { x: 0.5, y: 0.5 };
940
+ const open = direction === "open";
941
+ let radiusPct = open ? 0 : 150;
942
+ if (phase === "in" || phase === "inOut") {
943
+ const t = interpolate6(frame, [0, d], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
944
+ radiusPct = open ? 150 * t : 150 * (1 - t);
945
+ }
946
+ if (phase === "out" || phase === "inOut") {
947
+ const start = Math.max(0, total - d);
948
+ const t = interpolate6(frame, [start, total], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
949
+ radiusPct = open ? 150 * (1 - t) : 150 * t;
950
+ }
951
+ return /* @__PURE__ */ jsx14(AbsoluteFill11, { style: { clipPath: `circle(${radiusPct}% at ${Math.round(c.x * 100)}% ${Math.round(c.y * 100)}%)` }, children });
952
+ };
953
+ var CircularRevealComponentMetadata = {
954
+ kind: "composite",
955
+ category: "transition",
956
+ acceptsChildren: true,
957
+ minChildren: 1,
958
+ description: "Circular iris reveal/hide transition wrapper",
959
+ llmGuidance: 'direction="open" reveals from center, direction="close" hides to a point. center controls origin.'
960
+ };
961
+
962
+ // src/components/composites/CountUpText.tsx
963
+ import { AbsoluteFill as AbsoluteFill12, interpolate as interpolate7, spring as spring4, useCurrentFrame as useCurrentFrame8, useVideoConfig as useVideoConfig4 } from "remotion";
964
+ import { z as z17 } from "zod";
965
+ import { jsx as jsx15 } from "react/jsx-runtime";
966
+ var CountUpTextPropsSchema = z17.object({
967
+ from: z17.number().default(0),
968
+ to: z17.number().default(100),
969
+ fontSize: z17.number().min(8).max(240).default(72),
970
+ color: z17.string().default("#FFFFFF"),
971
+ fontFamily: z17.string().default("Inter"),
972
+ fontWeight: z17.number().int().min(100).max(900).default(700),
973
+ position: z17.enum(["top", "center", "bottom"]).default("center"),
974
+ format: z17.enum(["integer", "decimal", "currency", "percentage"]).default("integer"),
975
+ decimals: z17.number().int().min(0).max(4).default(0),
976
+ prefix: z17.string().optional(),
977
+ suffix: z17.string().optional()
978
+ });
979
+ var positionStyles = (position) => {
980
+ if (position === "top") return { justifyContent: "center", alignItems: "flex-start", paddingTop: 90 };
981
+ if (position === "bottom") return { justifyContent: "center", alignItems: "flex-end", paddingBottom: 90 };
982
+ return { justifyContent: "center", alignItems: "center" };
983
+ };
984
+ function formatValue(v, format, decimals) {
985
+ if (format === "integer") return Math.round(v).toLocaleString();
986
+ if (format === "decimal") return v.toFixed(decimals);
987
+ if (format === "currency") return `$${v.toFixed(decimals).toLocaleString()}`;
988
+ return `${(v * 100).toFixed(decimals)}%`;
989
+ }
990
+ var CountUpText = ({
991
+ from,
992
+ to,
993
+ fontSize,
994
+ color,
995
+ fontFamily,
996
+ fontWeight,
997
+ position,
998
+ format,
999
+ decimals,
1000
+ prefix,
1001
+ suffix,
1002
+ __wavesDurationInFrames
1003
+ }) => {
1004
+ const frame = useCurrentFrame8();
1005
+ const { fps } = useVideoConfig4();
1006
+ const total = Math.max(1, __wavesDurationInFrames ?? 1);
1007
+ const p = spring4({ frame, fps, config: { damping: 14, stiffness: 110, mass: 0.9 } });
1008
+ const progress = Math.max(0, Math.min(1, p));
1009
+ const value = from + (to - from) * progress;
1010
+ const fade = interpolate7(frame, [0, Math.min(12, total)], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
1011
+ const label = `${prefix ?? ""}${formatValue(value, format, decimals)}${suffix ?? ""}`;
1012
+ return /* @__PURE__ */ jsx15(AbsoluteFill12, { style: { display: "flex", ...positionStyles(position) }, children: /* @__PURE__ */ jsx15("div", { style: { fontSize, color, fontFamily, fontWeight, opacity: fade, lineHeight: 1 }, children: label }) });
1013
+ };
1014
+ var CountUpTextComponentMetadata = {
1015
+ kind: "composite",
1016
+ category: "text",
1017
+ description: "Counts from a start value to an end value with formatting options",
1018
+ llmGuidance: 'Use for metrics. format="currency" adds $, format="percentage" multiplies by 100 and adds %.'
1019
+ };
1020
+
1021
+ // src/components/composites/FadeTransition.tsx
1022
+ import { AbsoluteFill as AbsoluteFill13, interpolate as interpolate8, useCurrentFrame as useCurrentFrame9 } from "remotion";
1023
+ import { z as z18 } from "zod";
1024
+ import { jsx as jsx16 } from "react/jsx-runtime";
1025
+ var EasingSchema = z18.enum(["linear", "easeIn", "easeOut", "easeInOut"]);
1026
+ function ease(t, easing) {
1027
+ const x = Math.max(0, Math.min(1, t));
1028
+ if (easing === "linear") return x;
1029
+ if (easing === "easeIn") return x * x;
1030
+ if (easing === "easeOut") return 1 - (1 - x) * (1 - x);
1031
+ return x < 0.5 ? 2 * x * x : 1 - 2 * (1 - x) * (1 - x);
1032
+ }
1033
+ var FadeTransitionPropsSchema = z18.object({
1034
+ durationInFrames: z18.number().int().min(10).max(60).default(30),
1035
+ easing: EasingSchema.default("easeInOut"),
1036
+ phase: z18.enum(["in", "out", "inOut"]).default("inOut")
1037
+ });
1038
+ var FadeTransition = ({
1039
+ durationInFrames,
1040
+ easing,
1041
+ phase,
1042
+ children,
1043
+ __wavesDurationInFrames
1044
+ }) => {
1045
+ const frame = useCurrentFrame9();
1046
+ const total = Math.max(1, __wavesDurationInFrames ?? 1);
1047
+ const d = Math.min(durationInFrames, total);
1048
+ let opacity = 1;
1049
+ if (phase === "in" || phase === "inOut") {
1050
+ const t = interpolate8(frame, [0, d], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
1051
+ opacity *= ease(t, easing);
1052
+ }
1053
+ if (phase === "out" || phase === "inOut") {
1054
+ const start = Math.max(0, total - d);
1055
+ const t = interpolate8(frame, [start, total], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
1056
+ opacity *= 1 - ease(t, easing);
1057
+ }
1058
+ return /* @__PURE__ */ jsx16(AbsoluteFill13, { style: { opacity }, children });
1059
+ };
1060
+ var FadeTransitionComponentMetadata = {
1061
+ kind: "composite",
1062
+ category: "transition",
1063
+ acceptsChildren: true,
1064
+ minChildren: 1,
1065
+ description: "Fade in/out wrapper (used for segment transitions and overlays)",
1066
+ llmGuidance: "Use for gentle transitions. durationInFrames ~30 is standard."
1067
+ };
1068
+
1069
+ // src/components/composites/GlitchText.tsx
1070
+ import { AbsoluteFill as AbsoluteFill14, useCurrentFrame as useCurrentFrame10 } from "remotion";
1071
+ import { z as z19 } from "zod";
1072
+ import { jsx as jsx17, jsxs as jsxs5 } from "react/jsx-runtime";
1073
+ var GlitchTextPropsSchema = z19.object({
1074
+ content: z19.string().max(100),
1075
+ fontSize: z19.number().min(8).max(240).default(72),
1076
+ color: z19.string().default("#FFFFFF"),
1077
+ fontFamily: z19.string().default("monospace"),
1078
+ position: z19.enum(["top", "center", "bottom"]).default("center"),
1079
+ intensity: z19.number().int().min(1).max(10).default(5),
1080
+ glitchDuration: z19.number().int().min(5).max(30).default(10)
1081
+ });
1082
+ var positionStyles2 = (position) => {
1083
+ if (position === "top") return { justifyContent: "center", alignItems: "flex-start", paddingTop: 90 };
1084
+ if (position === "bottom") return { justifyContent: "center", alignItems: "flex-end", paddingBottom: 90 };
1085
+ return { justifyContent: "center", alignItems: "center" };
1086
+ };
1087
+ function pseudoRandom(n) {
1088
+ const x = Math.sin(n * 12.9898) * 43758.5453;
1089
+ return x - Math.floor(x);
1090
+ }
1091
+ var GlitchText = ({
1092
+ content,
1093
+ fontSize,
1094
+ color,
1095
+ fontFamily,
1096
+ position,
1097
+ intensity,
1098
+ glitchDuration
1099
+ }) => {
1100
+ const frame = useCurrentFrame10();
1101
+ const active = frame < glitchDuration;
1102
+ const seed = frame + 1;
1103
+ const jitter = active ? (pseudoRandom(seed) - 0.5) * intensity * 6 : 0;
1104
+ const jitterY = active ? (pseudoRandom(seed + 99) - 0.5) * intensity * 3 : 0;
1105
+ const baseStyle = {
1106
+ position: "absolute",
1107
+ fontSize,
1108
+ fontFamily,
1109
+ fontWeight: 800,
1110
+ letterSpacing: 1,
1111
+ textTransform: "uppercase",
1112
+ textAlign: "center"
1113
+ };
1114
+ return /* @__PURE__ */ jsx17(AbsoluteFill14, { style: { display: "flex", ...positionStyles2(position) }, children: /* @__PURE__ */ jsxs5("div", { style: { position: "relative" }, children: [
1115
+ /* @__PURE__ */ jsx17("div", { style: { ...baseStyle, color, transform: `translate(${jitter}px, ${jitterY}px)` }, children: content }),
1116
+ /* @__PURE__ */ jsx17("div", { style: { ...baseStyle, color: "#FF3B30", transform: `translate(${jitter + 4}px, ${jitterY}px)`, mixBlendMode: "screen", opacity: active ? 0.9 : 0 }, children: content }),
1117
+ /* @__PURE__ */ jsx17("div", { style: { ...baseStyle, color: "#0A84FF", transform: `translate(${jitter - 4}px, ${jitterY}px)`, mixBlendMode: "screen", opacity: active ? 0.9 : 0 }, children: content })
1118
+ ] }) });
1119
+ };
1120
+ var GlitchTextComponentMetadata = {
1121
+ kind: "composite",
1122
+ category: "text",
1123
+ description: "Cyberpunk-style glitch text with RGB split jitter",
1124
+ llmGuidance: "Use for tech/error moments. intensity 1-3 subtle, 7-10 extreme. glitchDuration is frames at start."
1125
+ };
1126
+
1127
+ // src/components/composites/GridLayout.tsx
1128
+ import { AbsoluteFill as AbsoluteFill15 } from "remotion";
1129
+ import { z as z20 } from "zod";
1130
+ import { jsx as jsx18 } from "react/jsx-runtime";
1131
+ var GridLayoutPropsSchema = z20.object({
1132
+ columns: z20.number().int().min(1).max(4).default(2),
1133
+ rows: z20.number().int().min(1).max(4).default(2),
1134
+ gap: z20.number().min(0).max(50).default(20),
1135
+ padding: z20.number().min(0).max(100).default(40)
1136
+ });
1137
+ var GridLayout = ({ columns, rows, gap, padding, children }) => {
1138
+ return /* @__PURE__ */ jsx18(AbsoluteFill15, { style: { padding, boxSizing: "border-box" }, children: /* @__PURE__ */ jsx18(
1139
+ "div",
1140
+ {
1141
+ style: {
1142
+ display: "grid",
1143
+ gridTemplateColumns: `repeat(${columns}, 1fr)`,
1144
+ gridTemplateRows: `repeat(${rows}, 1fr)`,
1145
+ gap,
1146
+ width: "100%",
1147
+ height: "100%"
1148
+ },
1149
+ children
1150
+ }
1151
+ ) });
1152
+ };
1153
+ var GridLayoutComponentMetadata = {
1154
+ kind: "composite",
1155
+ category: "layout",
1156
+ acceptsChildren: true,
1157
+ minChildren: 1,
1158
+ description: "Simple responsive grid layout for child components",
1159
+ llmGuidance: "Use for dashboards and collages. 2x2 is a good default for 4 items."
1160
+ };
1161
+
1162
+ // src/components/composites/ImageCollage.tsx
1163
+ import { AbsoluteFill as AbsoluteFill16, Img as Img3, spring as spring5, staticFile as staticFile5, useCurrentFrame as useCurrentFrame11, useVideoConfig as useVideoConfig5 } from "remotion";
1164
+ import { z as z21 } from "zod";
1165
+ import { jsx as jsx19, jsxs as jsxs6 } from "react/jsx-runtime";
1166
+ var ImageCollagePropsSchema = z21.object({
1167
+ images: z21.array(z21.object({ src: z21.string().min(1), caption: z21.string().optional() })).min(2).max(9),
1168
+ layout: z21.enum(["grid", "stack", "scatter"]).default("grid"),
1169
+ stagger: z21.number().int().min(2).max(10).default(5)
1170
+ });
1171
+ var resolveAsset4 = (value) => isRemoteAssetPath(value) ? value : staticFile5(staticFileInputFromAssetPath(value));
1172
+ var ImageCollage = ({ images, layout, stagger }) => {
1173
+ const frame = useCurrentFrame11();
1174
+ const { fps } = useVideoConfig5();
1175
+ const n = images.length;
1176
+ const cols = Math.ceil(Math.sqrt(n));
1177
+ const rows = Math.ceil(n / cols);
1178
+ if (layout === "grid") {
1179
+ return /* @__PURE__ */ jsx19(AbsoluteFill16, { style: { padding: 80, boxSizing: "border-box" }, children: /* @__PURE__ */ jsx19(
1180
+ "div",
1181
+ {
1182
+ style: {
1183
+ display: "grid",
1184
+ gridTemplateColumns: `repeat(${cols}, 1fr)`,
1185
+ gridTemplateRows: `repeat(${rows}, 1fr)`,
1186
+ gap: 24,
1187
+ width: "100%",
1188
+ height: "100%"
1189
+ },
1190
+ children: images.map((img, i) => {
1191
+ const p = spring5({ frame: frame - i * stagger, fps, config: { damping: 14, stiffness: 120, mass: 0.9 } });
1192
+ return /* @__PURE__ */ jsxs6("div", { style: { position: "relative", overflow: "hidden", borderRadius: 18, opacity: p, transform: `scale(${0.92 + 0.08 * p})` }, children: [
1193
+ /* @__PURE__ */ jsx19(Img3, { src: resolveAsset4(img.src), style: { width: "100%", height: "100%", objectFit: "cover" } }),
1194
+ img.caption ? /* @__PURE__ */ jsx19("div", { style: { position: "absolute", left: 0, right: 0, bottom: 0, padding: 12, background: "linear-gradient(transparent, rgba(0,0,0,0.7))", color: "#fff", fontWeight: 700 }, children: img.caption }) : null
1195
+ ] }, i);
1196
+ })
1197
+ }
1198
+ ) });
1199
+ }
1200
+ return /* @__PURE__ */ jsx19(AbsoluteFill16, { children: images.map((img, i) => {
1201
+ const p = spring5({ frame: frame - i * stagger, fps, config: { damping: 14, stiffness: 120, mass: 0.9 } });
1202
+ const baseRotate = layout === "stack" ? (i - (n - 1) / 2) * 4 : i * 17 % 20 - 10;
1203
+ const baseX = layout === "scatter" ? i * 137 % 300 - 150 : 0;
1204
+ const baseY = layout === "scatter" ? (i + 3) * 89 % 200 - 100 : 0;
1205
+ return /* @__PURE__ */ jsx19(
1206
+ "div",
1207
+ {
1208
+ style: {
1209
+ position: "absolute",
1210
+ left: "50%",
1211
+ top: "50%",
1212
+ width: 520,
1213
+ height: 360,
1214
+ transform: `translate(-50%, -50%) translate(${baseX}px, ${baseY}px) rotate(${baseRotate}deg) scale(${0.85 + 0.15 * p})`,
1215
+ opacity: p,
1216
+ borderRadius: 18,
1217
+ overflow: "hidden",
1218
+ boxShadow: "0 20px 60px rgba(0,0,0,0.35)"
1219
+ },
1220
+ children: /* @__PURE__ */ jsx19(Img3, { src: resolveAsset4(img.src), style: { width: "100%", height: "100%", objectFit: "cover" } })
1221
+ },
1222
+ i
1223
+ );
1224
+ }) });
1225
+ };
1226
+ var ImageCollageComponentMetadata = {
1227
+ kind: "composite",
1228
+ category: "image",
1229
+ description: "Collage of multiple images in a grid/stack/scatter layout with staggered entrances",
1230
+ llmGuidance: 'Use 2-6 images for best results. layout="grid" is clean; "scatter" is energetic.'
1231
+ };
1232
+
1233
+ // src/components/composites/ImageReveal.tsx
1234
+ import { AbsoluteFill as AbsoluteFill17, Img as Img4, interpolate as interpolate9, staticFile as staticFile6, useCurrentFrame as useCurrentFrame12 } from "remotion";
1235
+ import { z as z22 } from "zod";
1236
+ import { jsx as jsx20 } from "react/jsx-runtime";
1237
+ var ImageRevealPropsSchema = z22.object({
1238
+ src: z22.string().min(1),
1239
+ direction: z22.enum(["left", "right", "top", "bottom", "center"]).default("left"),
1240
+ revealType: z22.enum(["wipe", "expand", "iris"]).default("wipe")
1241
+ });
1242
+ var resolveAsset5 = (value) => isRemoteAssetPath(value) ? value : staticFile6(staticFileInputFromAssetPath(value));
1243
+ var ImageReveal = ({ src, direction, revealType, __wavesDurationInFrames }) => {
1244
+ const frame = useCurrentFrame12();
1245
+ const total = Math.max(1, __wavesDurationInFrames ?? 1);
1246
+ const d = Math.min(30, total);
1247
+ const p = interpolate9(frame, [0, d], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
1248
+ let clipPath;
1249
+ let transform = "none";
1250
+ let transformOrigin = "center center";
1251
+ if (revealType === "wipe") {
1252
+ if (direction === "left") clipPath = `inset(0 ${100 * (1 - p)}% 0 0)`;
1253
+ if (direction === "right") clipPath = `inset(0 0 0 ${100 * (1 - p)}%)`;
1254
+ if (direction === "top") clipPath = `inset(0 0 ${100 * (1 - p)}% 0)`;
1255
+ if (direction === "bottom") clipPath = `inset(${100 * (1 - p)}% 0 0 0)`;
1256
+ if (direction === "center") clipPath = `inset(${50 * (1 - p)}% ${50 * (1 - p)}% ${50 * (1 - p)}% ${50 * (1 - p)}%)`;
1257
+ }
1258
+ if (revealType === "expand") {
1259
+ const s = 0.85 + 0.15 * p;
1260
+ transform = `scale(${s})`;
1261
+ if (direction === "left") transformOrigin = "left center";
1262
+ if (direction === "right") transformOrigin = "right center";
1263
+ if (direction === "top") transformOrigin = "center top";
1264
+ if (direction === "bottom") transformOrigin = "center bottom";
1265
+ }
1266
+ if (revealType === "iris") {
1267
+ clipPath = `circle(${Math.round(150 * p)}% at 50% 50%)`;
1268
+ }
1269
+ const opacity = revealType === "expand" ? p : 1;
1270
+ return /* @__PURE__ */ jsx20(AbsoluteFill17, { children: /* @__PURE__ */ jsx20(
1271
+ Img4,
1272
+ {
1273
+ src: resolveAsset5(src),
1274
+ style: {
1275
+ width: "100%",
1276
+ height: "100%",
1277
+ objectFit: "cover",
1278
+ clipPath,
1279
+ transform,
1280
+ transformOrigin,
1281
+ opacity
1282
+ }
1283
+ }
1284
+ ) });
1285
+ };
1286
+ var ImageRevealComponentMetadata = {
1287
+ kind: "composite",
1288
+ category: "image",
1289
+ description: "Reveals an image with wipe/expand/iris entrance effects",
1290
+ llmGuidance: "Use wipe for directional reveals, expand for subtle pop-in, iris for circular mask openings."
1291
+ };
1292
+
1293
+ // src/components/composites/ImageSequence.tsx
1294
+ import { AbsoluteFill as AbsoluteFill18, Img as Img5, staticFile as staticFile7, useCurrentFrame as useCurrentFrame13, useVideoConfig as useVideoConfig6 } from "remotion";
1295
+ import { z as z23 } from "zod";
1296
+ import { jsx as jsx21 } from "react/jsx-runtime";
1297
+ var ImageSequencePropsSchema = z23.object({
1298
+ basePath: z23.string().min(1),
1299
+ frameCount: z23.number().int().positive(),
1300
+ filePattern: z23.string().default("frame_{frame}.png"),
1301
+ fps: z23.number().int().min(1).max(120).default(30)
1302
+ });
1303
+ function joinPath(base, file) {
1304
+ if (base.endsWith("/")) return `${base}${file}`;
1305
+ return `${base}/${file}`;
1306
+ }
1307
+ var resolveAsset6 = (value) => isRemoteAssetPath(value) ? value : staticFile7(staticFileInputFromAssetPath(value));
1308
+ var ImageSequence = ({ basePath, frameCount, filePattern, fps }) => {
1309
+ const frame = useCurrentFrame13();
1310
+ const { fps: compFps } = useVideoConfig6();
1311
+ const index = Math.min(frameCount - 1, Math.max(0, Math.floor(frame * fps / compFps)));
1312
+ const file = filePattern.replace("{frame}", String(index));
1313
+ const src = joinPath(basePath, file);
1314
+ return /* @__PURE__ */ jsx21(AbsoluteFill18, { children: /* @__PURE__ */ jsx21(Img5, { src: resolveAsset6(src), style: { width: "100%", height: "100%", objectFit: "cover" } }) });
1315
+ };
1316
+ var ImageSequenceComponentMetadata = {
1317
+ kind: "composite",
1318
+ category: "image",
1319
+ description: "Plays a numbered image sequence (frame-by-frame)",
1320
+ llmGuidance: "Use for exported sprite sequences. basePath can be /assets/seq and filePattern like img_{frame}.png."
1321
+ };
1322
+
1323
+ // src/components/composites/ImageWithCaption.tsx
1324
+ import { AbsoluteFill as AbsoluteFill19, Img as Img6, interpolate as interpolate10, staticFile as staticFile8, useCurrentFrame as useCurrentFrame14 } from "remotion";
1325
+ import { z as z24 } from "zod";
1326
+ import { jsx as jsx22, jsxs as jsxs7 } from "react/jsx-runtime";
1327
+ var CaptionStyleSchema = z24.object({
1328
+ fontSize: z24.number().min(12).max(80).default(32),
1329
+ color: z24.string().default("#FFFFFF"),
1330
+ backgroundColor: z24.string().default("rgba(0,0,0,0.7)")
1331
+ });
1332
+ var ImageWithCaptionPropsSchema = z24.object({
1333
+ src: z24.string().min(1),
1334
+ caption: z24.string().max(200),
1335
+ captionPosition: z24.enum(["top", "bottom", "overlay"]).default("bottom"),
1336
+ captionStyle: CaptionStyleSchema.optional()
1337
+ });
1338
+ var resolveAsset7 = (value) => isRemoteAssetPath(value) ? value : staticFile8(staticFileInputFromAssetPath(value));
1339
+ var ImageWithCaption = ({ src, caption, captionPosition, captionStyle }) => {
1340
+ const frame = useCurrentFrame14();
1341
+ const p = interpolate10(frame, [8, 24], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
1342
+ const style = captionStyle ?? { fontSize: 32, color: "#FFFFFF", backgroundColor: "rgba(0,0,0,0.7)" };
1343
+ const captionBox = /* @__PURE__ */ jsx22(
1344
+ "div",
1345
+ {
1346
+ style: {
1347
+ width: "100%",
1348
+ padding: 22,
1349
+ boxSizing: "border-box",
1350
+ backgroundColor: style.backgroundColor,
1351
+ color: style.color,
1352
+ fontWeight: 800,
1353
+ fontSize: style.fontSize,
1354
+ opacity: p
1355
+ },
1356
+ children: caption
1357
+ }
1358
+ );
1359
+ if (captionPosition === "top" || captionPosition === "bottom") {
1360
+ return /* @__PURE__ */ jsxs7(AbsoluteFill19, { style: { display: "flex", flexDirection: "column" }, children: [
1361
+ captionPosition === "top" ? captionBox : null,
1362
+ /* @__PURE__ */ jsx22("div", { style: { flex: 1, position: "relative" }, children: /* @__PURE__ */ jsx22(Img6, { src: resolveAsset7(src), style: { width: "100%", height: "100%", objectFit: "cover" } }) }),
1363
+ captionPosition === "bottom" ? captionBox : null
1364
+ ] });
1365
+ }
1366
+ return /* @__PURE__ */ jsxs7(AbsoluteFill19, { children: [
1367
+ /* @__PURE__ */ jsx22(Img6, { src: resolveAsset7(src), style: { width: "100%", height: "100%", objectFit: "cover" } }),
1368
+ /* @__PURE__ */ jsx22("div", { style: { position: "absolute", left: 0, right: 0, bottom: 0 }, children: captionBox })
1369
+ ] });
1370
+ };
1371
+ var ImageWithCaptionComponentMetadata = {
1372
+ kind: "composite",
1373
+ category: "image",
1374
+ description: "Image with a caption strip (top/bottom) or overlay caption",
1375
+ llmGuidance: "Use overlay for quotes/testimonials over photos. Use bottom for standard captions."
1376
+ };
1377
+
1378
+ // src/components/composites/InstagramStory.tsx
1379
+ import { AbsoluteFill as AbsoluteFill20, Audio as RemotionAudio2, Img as Img7, interpolate as interpolate11, staticFile as staticFile9, useCurrentFrame as useCurrentFrame15 } from "remotion";
1380
+ import { z as z25 } from "zod";
1381
+ import { jsx as jsx23, jsxs as jsxs8 } from "react/jsx-runtime";
1382
+ var InstagramStoryPropsSchema = z25.object({
1383
+ backgroundImage: z25.string().optional(),
1384
+ backgroundColor: z25.string().default("#000000"),
1385
+ profilePic: z25.string().optional(),
1386
+ username: z25.string().optional(),
1387
+ text: z25.string().max(100).optional(),
1388
+ sticker: z25.enum(["none", "poll", "question", "countdown"]).default("none"),
1389
+ musicTrack: z25.string().optional()
1390
+ });
1391
+ var resolveAsset8 = (value) => isRemoteAssetPath(value) ? value : staticFile9(staticFileInputFromAssetPath(value));
1392
+ var InstagramStory = ({
1393
+ backgroundImage,
1394
+ backgroundColor,
1395
+ profilePic,
1396
+ username,
1397
+ text,
1398
+ sticker,
1399
+ musicTrack
1400
+ }) => {
1401
+ const frame = useCurrentFrame15();
1402
+ const fade = interpolate11(frame, [0, 20], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
1403
+ return /* @__PURE__ */ jsxs8(AbsoluteFill20, { style: { backgroundColor }, children: [
1404
+ musicTrack ? /* @__PURE__ */ jsx23(RemotionAudio2, { src: resolveAsset8(musicTrack), volume: 0.6 }) : null,
1405
+ backgroundImage ? /* @__PURE__ */ jsx23(Img7, { src: resolveAsset8(backgroundImage), style: { width: "100%", height: "100%", objectFit: "cover", opacity: fade } }) : null,
1406
+ /* @__PURE__ */ jsxs8(AbsoluteFill20, { style: { padding: 60, boxSizing: "border-box" }, children: [
1407
+ profilePic || username ? /* @__PURE__ */ jsxs8("div", { style: { display: "flex", alignItems: "center", gap: 18 }, children: [
1408
+ profilePic ? /* @__PURE__ */ jsx23(Img7, { src: resolveAsset8(profilePic), style: { width: 78, height: 78, borderRadius: 9999, objectFit: "cover" } }) : /* @__PURE__ */ jsx23("div", { style: { width: 78, height: 78, borderRadius: 9999, backgroundColor: "rgba(255,255,255,0.2)" } }),
1409
+ /* @__PURE__ */ jsx23("div", { style: { color: "#FFFFFF", fontWeight: 800, fontSize: 34 }, children: username ?? "username" })
1410
+ ] }) : null,
1411
+ text ? /* @__PURE__ */ jsx23(
1412
+ "div",
1413
+ {
1414
+ style: {
1415
+ marginTop: 120,
1416
+ color: "#FFFFFF",
1417
+ fontSize: 54,
1418
+ fontWeight: 900,
1419
+ textShadow: "0 8px 30px rgba(0,0,0,0.6)",
1420
+ maxWidth: 900
1421
+ },
1422
+ children: text
1423
+ }
1424
+ ) : null,
1425
+ sticker !== "none" ? /* @__PURE__ */ jsx23(
1426
+ "div",
1427
+ {
1428
+ style: {
1429
+ position: "absolute",
1430
+ left: 60,
1431
+ bottom: 180,
1432
+ width: 520,
1433
+ padding: 28,
1434
+ borderRadius: 22,
1435
+ backgroundColor: "rgba(255,255,255,0.9)",
1436
+ color: "#111",
1437
+ fontWeight: 900,
1438
+ fontSize: 30
1439
+ },
1440
+ children: sticker === "poll" ? "POLL" : sticker === "question" ? "QUESTION" : "COUNTDOWN"
1441
+ }
1442
+ ) : null
1443
+ ] })
1444
+ ] });
1445
+ };
1446
+ var InstagramStoryComponentMetadata = {
1447
+ kind: "composite",
1448
+ category: "social",
1449
+ description: "Instagram story-style layout with profile header, text overlay, and optional sticker",
1450
+ llmGuidance: "Best with 1080x1920 (9:16). Use backgroundImage + short text + optional sticker for mobile-style content."
1451
+ };
1452
+
1453
+ // src/components/composites/IntroScene.tsx
1454
+ import { AbsoluteFill as AbsoluteFill21, Audio as RemotionAudio3, Img as Img8, interpolate as interpolate12, spring as spring6, staticFile as staticFile10, useCurrentFrame as useCurrentFrame16, useVideoConfig as useVideoConfig7 } from "remotion";
1455
+ import { z as z26 } from "zod";
1456
+ import { jsx as jsx24, jsxs as jsxs9 } from "react/jsx-runtime";
1457
+ var IntroScenePropsSchema = z26.object({
1458
+ logoSrc: z26.string().min(1),
1459
+ companyName: z26.string().min(1),
1460
+ tagline: z26.string().optional(),
1461
+ backgroundColor: z26.string().default("#000000"),
1462
+ primaryColor: z26.string().default("#FFFFFF"),
1463
+ musicTrack: z26.string().optional()
1464
+ });
1465
+ var resolveAsset9 = (value) => isRemoteAssetPath(value) ? value : staticFile10(staticFileInputFromAssetPath(value));
1466
+ var IntroScene = ({
1467
+ logoSrc,
1468
+ companyName,
1469
+ tagline,
1470
+ backgroundColor,
1471
+ primaryColor,
1472
+ musicTrack,
1473
+ __wavesDurationInFrames
1474
+ }) => {
1475
+ const frame = useCurrentFrame16();
1476
+ const { fps } = useVideoConfig7();
1477
+ const total = Math.max(1, __wavesDurationInFrames ?? 1);
1478
+ const logoP = spring6({ frame, fps, config: { damping: 14, stiffness: 120, mass: 0.9 } });
1479
+ const nameOpacity = interpolate12(frame, [20, 60], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
1480
+ const taglineY = interpolate12(frame, [50, 80], [20, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
1481
+ const outroFade = interpolate12(frame, [Math.max(0, total - 20), total], [1, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
1482
+ return /* @__PURE__ */ jsxs9(AbsoluteFill21, { style: { backgroundColor, justifyContent: "center", alignItems: "center" }, children: [
1483
+ musicTrack ? /* @__PURE__ */ jsx24(RemotionAudio3, { src: resolveAsset9(musicTrack), volume: 0.7 }) : null,
1484
+ /* @__PURE__ */ jsxs9("div", { style: { textAlign: "center", opacity: outroFade }, children: [
1485
+ /* @__PURE__ */ jsx24(
1486
+ Img8,
1487
+ {
1488
+ src: resolveAsset9(logoSrc),
1489
+ style: { width: 280, height: 280, objectFit: "contain", transform: `scale(${logoP})` }
1490
+ }
1491
+ ),
1492
+ /* @__PURE__ */ jsx24("div", { style: { marginTop: 24, color: primaryColor, fontSize: 64, fontWeight: 900, opacity: nameOpacity }, children: companyName }),
1493
+ tagline ? /* @__PURE__ */ jsx24(
1494
+ "div",
1495
+ {
1496
+ style: {
1497
+ marginTop: 12,
1498
+ color: primaryColor,
1499
+ fontSize: 32,
1500
+ fontWeight: 700,
1501
+ opacity: nameOpacity,
1502
+ transform: `translateY(${taglineY}px)`
1503
+ },
1504
+ children: tagline
1505
+ }
1506
+ ) : null
1507
+ ] })
1508
+ ] });
1509
+ };
1510
+ var IntroSceneComponentMetadata = {
1511
+ kind: "composite",
1512
+ category: "branding",
1513
+ description: "Branded intro scene (logo + company name + optional tagline)",
1514
+ llmGuidance: "Use as the first segment. Works best at 3-5 seconds. musicTrack can add ambience."
1515
+ };
1516
+
1517
+ // src/components/composites/KenBurnsImage.tsx
1518
+ import { AbsoluteFill as AbsoluteFill22, Img as Img9, interpolate as interpolate13, staticFile as staticFile11, useCurrentFrame as useCurrentFrame17 } from "remotion";
1519
+ import { z as z27 } from "zod";
1520
+ import { jsx as jsx25 } from "react/jsx-runtime";
1521
+ var KenBurnsImagePropsSchema = z27.object({
1522
+ src: z27.string().min(1),
1523
+ startScale: z27.number().min(1).max(2).default(1),
1524
+ endScale: z27.number().min(1).max(2).default(1.2),
1525
+ panDirection: z27.enum(["none", "left", "right", "up", "down"]).default("none"),
1526
+ panAmount: z27.number().min(0).max(100).default(50)
1527
+ });
1528
+ var resolveAsset10 = (value) => isRemoteAssetPath(value) ? value : staticFile11(staticFileInputFromAssetPath(value));
1529
+ var KenBurnsImage = ({
1530
+ src,
1531
+ startScale,
1532
+ endScale,
1533
+ panDirection,
1534
+ panAmount,
1535
+ __wavesDurationInFrames
1536
+ }) => {
1537
+ const frame = useCurrentFrame17();
1538
+ const duration = Math.max(1, __wavesDurationInFrames ?? 1);
1539
+ const t = interpolate13(frame, [0, duration], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
1540
+ const scale = startScale + (endScale - startScale) * t;
1541
+ const dx = panDirection === "left" ? -panAmount * t : panDirection === "right" ? panAmount * t : 0;
1542
+ const dy = panDirection === "up" ? -panAmount * t : panDirection === "down" ? panAmount * t : 0;
1543
+ return /* @__PURE__ */ jsx25(AbsoluteFill22, { children: /* @__PURE__ */ jsx25(
1544
+ Img9,
1545
+ {
1546
+ src: resolveAsset10(src),
1547
+ style: {
1548
+ width: "110%",
1549
+ height: "110%",
1550
+ objectFit: "cover",
1551
+ transform: `translate(${dx}px, ${dy}px) scale(${scale})`,
1552
+ transformOrigin: "center center"
1553
+ }
1554
+ }
1555
+ ) });
1556
+ };
1557
+ var KenBurnsImageComponentMetadata = {
1558
+ kind: "composite",
1559
+ category: "image",
1560
+ description: "Slow zoom and pan (Ken Burns effect) for a still image",
1561
+ llmGuidance: "Classic documentary-style motion. startScale 1 -> endScale 1.2 is subtle; add panDirection for extra movement."
1562
+ };
1563
+
1564
+ // src/components/composites/KineticTypography.tsx
1565
+ import { AbsoluteFill as AbsoluteFill23, spring as spring7, useCurrentFrame as useCurrentFrame18, useVideoConfig as useVideoConfig8 } from "remotion";
1566
+ import { z as z28 } from "zod";
1567
+ import { jsx as jsx26 } from "react/jsx-runtime";
1568
+ var WordSchema = z28.object({
1569
+ text: z28.string().min(1),
1570
+ emphasis: z28.enum(["normal", "bold", "giant"]).default("normal")
1571
+ });
1572
+ var KineticTypographyPropsSchema = z28.object({
1573
+ words: z28.array(WordSchema).min(1).max(50),
1574
+ fontSize: z28.number().min(12).max(140).default(48),
1575
+ color: z28.string().default("#FFFFFF"),
1576
+ fontFamily: z28.string().default("Inter"),
1577
+ timing: z28.array(z28.number().int().min(0)).min(1).describe("Frame timing for each word"),
1578
+ transition: z28.enum(["fade", "scale", "slideLeft", "slideRight"]).default("scale")
1579
+ });
1580
+ var KineticTypography = ({
1581
+ words,
1582
+ fontSize,
1583
+ color,
1584
+ fontFamily,
1585
+ timing,
1586
+ transition
1587
+ }) => {
1588
+ const frame = useCurrentFrame18();
1589
+ const { fps } = useVideoConfig8();
1590
+ const starts = (() => {
1591
+ if (timing.length >= words.length) return timing.slice(0, words.length);
1592
+ const last = timing.length ? timing[timing.length - 1] : 0;
1593
+ const extra = Array.from({ length: words.length - timing.length }, () => last + 15);
1594
+ return [...timing, ...extra];
1595
+ })();
1596
+ let activeIndex = 0;
1597
+ for (let i = 0; i < words.length; i++) {
1598
+ if (frame >= (starts[i] ?? 0)) activeIndex = i;
1599
+ }
1600
+ const word = words[activeIndex];
1601
+ const start = starts[activeIndex] ?? 0;
1602
+ const p = spring7({ frame: frame - start, fps, config: { damping: 14, stiffness: 120, mass: 0.9 } });
1603
+ const progress = Math.max(0, Math.min(1, p));
1604
+ const scaleBase = word.emphasis === "giant" ? 2 : word.emphasis === "bold" ? 1.3 : 1;
1605
+ const opacity = transition === "fade" ? progress : 1;
1606
+ const scale = transition === "scale" ? (0.85 + 0.15 * progress) * scaleBase : 1 * scaleBase;
1607
+ const tx = transition === "slideLeft" ? 40 * (1 - progress) : transition === "slideRight" ? -40 * (1 - progress) : 0;
1608
+ return /* @__PURE__ */ jsx26(AbsoluteFill23, { style: { justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ jsx26(
1609
+ "div",
1610
+ {
1611
+ style: {
1612
+ fontSize,
1613
+ color,
1614
+ fontFamily,
1615
+ fontWeight: word.emphasis === "normal" ? 800 : 900,
1616
+ textTransform: "uppercase",
1617
+ letterSpacing: 1,
1618
+ opacity,
1619
+ transform: `translateX(${tx}px) scale(${scale})`
1620
+ },
1621
+ children: word.text
1622
+ }
1623
+ ) });
1624
+ };
1625
+ var KineticTypographyComponentMetadata = {
1626
+ kind: "composite",
1627
+ category: "text",
1628
+ description: "Rhythmic single-word kinetic typography driven by a timing array",
1629
+ llmGuidance: 'Provide timing frames for when each word appears. Use emphasis="giant" sparingly for impact.'
1630
+ };
1631
+
1632
+ // src/components/composites/LineGraph.tsx
1633
+ import { AbsoluteFill as AbsoluteFill24, interpolate as interpolate14, useCurrentFrame as useCurrentFrame19 } from "remotion";
1634
+ import { z as z29 } from "zod";
1635
+ import { jsx as jsx27, jsxs as jsxs10 } from "react/jsx-runtime";
1636
+ var PointSchema = z29.object({ x: z29.number(), y: z29.number() });
1637
+ var LineGraphPropsSchema = z29.object({
1638
+ data: z29.array(PointSchema).min(2).max(50),
1639
+ color: z29.string().default("#00FF00"),
1640
+ strokeWidth: z29.number().min(1).max(10).default(3),
1641
+ showDots: z29.boolean().default(true),
1642
+ fillArea: z29.boolean().default(false),
1643
+ animate: z29.enum(["draw", "reveal"]).default("draw")
1644
+ });
1645
+ function normalize(data, w, h, pad) {
1646
+ const xs = data.map((d) => d.x);
1647
+ const ys = data.map((d) => d.y);
1648
+ const minX = Math.min(...xs);
1649
+ const maxX = Math.max(...xs);
1650
+ const minY = Math.min(...ys);
1651
+ const maxY = Math.max(...ys);
1652
+ return data.map((d) => ({
1653
+ x: pad + (maxX === minX ? (w - 2 * pad) / 2 : (d.x - minX) / (maxX - minX) * (w - 2 * pad)),
1654
+ y: pad + (maxY === minY ? (h - 2 * pad) / 2 : (1 - (d.y - minY) / (maxY - minY)) * (h - 2 * pad))
1655
+ }));
1656
+ }
1657
+ function toPath(points) {
1658
+ return points.reduce((acc, p, i) => i === 0 ? `M ${p.x} ${p.y}` : `${acc} L ${p.x} ${p.y}`, "");
1659
+ }
1660
+ var LineGraph = ({
1661
+ data,
1662
+ color,
1663
+ strokeWidth,
1664
+ showDots,
1665
+ fillArea,
1666
+ animate,
1667
+ __wavesDurationInFrames
1668
+ }) => {
1669
+ const frame = useCurrentFrame19();
1670
+ const total = Math.max(1, __wavesDurationInFrames ?? 1);
1671
+ const progress = interpolate14(frame, [0, total], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
1672
+ const w = 1e3;
1673
+ const h = 520;
1674
+ const pad = 30;
1675
+ const pts = normalize(data, w, h, pad);
1676
+ const d = toPath(pts);
1677
+ const dash = 3e3;
1678
+ const dashOffset = dash * (1 - progress);
1679
+ return /* @__PURE__ */ jsx27(AbsoluteFill24, { style: { justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ jsxs10("svg", { width: w, height: h, viewBox: `0 0 ${w} ${h}`, children: [
1680
+ /* @__PURE__ */ jsx27("defs", { children: /* @__PURE__ */ jsx27("clipPath", { id: "waves-line-reveal", children: /* @__PURE__ */ jsx27("rect", { x: "0", y: "0", width: w * progress, height: h }) }) }),
1681
+ fillArea ? /* @__PURE__ */ jsx27(
1682
+ "path",
1683
+ {
1684
+ d: `${d} L ${pts[pts.length - 1].x} ${h - pad} L ${pts[0].x} ${h - pad} Z`,
1685
+ fill: color,
1686
+ opacity: 0.12,
1687
+ clipPath: animate === "reveal" ? "url(#waves-line-reveal)" : void 0
1688
+ }
1689
+ ) : null,
1690
+ /* @__PURE__ */ jsx27(
1691
+ "path",
1692
+ {
1693
+ d,
1694
+ fill: "none",
1695
+ stroke: color,
1696
+ strokeWidth,
1697
+ strokeLinecap: "round",
1698
+ strokeLinejoin: "round",
1699
+ strokeDasharray: animate === "draw" ? dash : void 0,
1700
+ strokeDashoffset: animate === "draw" ? dashOffset : void 0,
1701
+ clipPath: animate === "reveal" ? "url(#waves-line-reveal)" : void 0
1702
+ }
1703
+ ),
1704
+ showDots ? /* @__PURE__ */ jsx27("g", { clipPath: animate === "reveal" ? "url(#waves-line-reveal)" : void 0, children: pts.map((p, i) => /* @__PURE__ */ jsx27("circle", { cx: p.x, cy: p.y, r: 6, fill: color }, i)) }) : null
1705
+ ] }) });
1706
+ };
1707
+ var LineGraphComponentMetadata = {
1708
+ kind: "composite",
1709
+ category: "data",
1710
+ description: "Animated line graph (SVG) with draw/reveal modes",
1711
+ llmGuidance: 'Use 5-20 points. animate="draw" traces the line; animate="reveal" wipes it left-to-right.'
1712
+ };
1713
+
1714
+ // src/components/composites/LogoReveal.tsx
1715
+ import { AbsoluteFill as AbsoluteFill25, Audio as RemotionAudio4, Img as Img10, spring as spring8, staticFile as staticFile12, useCurrentFrame as useCurrentFrame20, useVideoConfig as useVideoConfig9 } from "remotion";
1716
+ import { z as z30 } from "zod";
1717
+ import { jsx as jsx28, jsxs as jsxs11 } from "react/jsx-runtime";
1718
+ var LogoRevealPropsSchema = z30.object({
1719
+ logoSrc: z30.string().min(1),
1720
+ effect: z30.enum(["fade", "scale", "rotate", "slide"]).default("scale"),
1721
+ backgroundColor: z30.string().default("#000000"),
1722
+ soundEffect: z30.string().optional()
1723
+ });
1724
+ var resolveAsset11 = (value) => isRemoteAssetPath(value) ? value : staticFile12(staticFileInputFromAssetPath(value));
1725
+ var LogoReveal = ({ logoSrc, effect, backgroundColor, soundEffect }) => {
1726
+ const frame = useCurrentFrame20();
1727
+ const { fps } = useVideoConfig9();
1728
+ const p = spring8({ frame, fps, config: { damping: 14, stiffness: 110, mass: 0.9 } });
1729
+ const opacity = effect === "fade" ? p : Math.min(1, Math.max(0, p));
1730
+ const scale = effect === "scale" ? p : 1;
1731
+ const rotate = effect === "rotate" ? (1 - p) * 360 : 0;
1732
+ const translateY = effect === "slide" ? -200 * (1 - p) : 0;
1733
+ return /* @__PURE__ */ jsxs11(AbsoluteFill25, { style: { backgroundColor, justifyContent: "center", alignItems: "center" }, children: [
1734
+ soundEffect ? /* @__PURE__ */ jsx28(RemotionAudio4, { src: resolveAsset11(soundEffect), volume: 1 }) : null,
1735
+ /* @__PURE__ */ jsx28(
1736
+ Img10,
1737
+ {
1738
+ src: resolveAsset11(logoSrc),
1739
+ style: {
1740
+ width: 320,
1741
+ height: 320,
1742
+ objectFit: "contain",
1743
+ opacity,
1744
+ transform: `translateY(${translateY}px) scale(${scale}) rotate(${rotate}deg)`
1745
+ }
1746
+ }
1747
+ )
1748
+ ] });
1749
+ };
1750
+ var LogoRevealComponentMetadata = {
1751
+ kind: "composite",
1752
+ category: "branding",
1753
+ description: "Logo intro animation (fade/scale/rotate/slide), optionally with a sound effect",
1754
+ llmGuidance: "Use for intros/outros. Keep the logo high-contrast and centered. soundEffect can be a short sting."
1755
+ };
1756
+
1757
+ // src/components/composites/OutroScene.tsx
1758
+ import { AbsoluteFill as AbsoluteFill26, Img as Img11, spring as spring9, staticFile as staticFile13, useCurrentFrame as useCurrentFrame21, useVideoConfig as useVideoConfig10 } from "remotion";
1759
+ import { z as z31 } from "zod";
1760
+ import { jsx as jsx29, jsxs as jsxs12 } from "react/jsx-runtime";
1761
+ var CtaSchema = z31.object({ text: z31.string().min(1), icon: z31.string().optional() });
1762
+ var HandleSchema = z31.object({
1763
+ platform: z31.enum(["twitter", "instagram", "youtube", "linkedin"]),
1764
+ handle: z31.string().min(1)
1765
+ });
1766
+ var OutroScenePropsSchema = z31.object({
1767
+ logoSrc: z31.string().min(1),
1768
+ message: z31.string().default("Thank You"),
1769
+ ctaButtons: z31.array(CtaSchema).max(3).optional(),
1770
+ socialHandles: z31.array(HandleSchema).max(4).optional(),
1771
+ backgroundColor: z31.string().default("#000000")
1772
+ });
1773
+ var resolveAsset12 = (value) => isRemoteAssetPath(value) ? value : staticFile13(staticFileInputFromAssetPath(value));
1774
+ var OutroScene = ({ logoSrc, message, ctaButtons, socialHandles, backgroundColor }) => {
1775
+ const frame = useCurrentFrame21();
1776
+ const { fps } = useVideoConfig10();
1777
+ const logoP = spring9({ frame, fps, config: { damping: 14, stiffness: 120, mass: 0.9 } });
1778
+ const msgP = spring9({ frame: frame - 18, fps, config: { damping: 14, stiffness: 120, mass: 0.9 } });
1779
+ const ctaP = spring9({ frame: frame - 40, fps, config: { damping: 14, stiffness: 120, mass: 0.9 } });
1780
+ return /* @__PURE__ */ jsx29(AbsoluteFill26, { style: { backgroundColor, justifyContent: "center", alignItems: "center", padding: 80, boxSizing: "border-box" }, children: /* @__PURE__ */ jsxs12("div", { style: { textAlign: "center" }, children: [
1781
+ /* @__PURE__ */ jsx29(Img11, { src: resolveAsset12(logoSrc), style: { width: 220, height: 220, objectFit: "contain", transform: `scale(${logoP})` } }),
1782
+ /* @__PURE__ */ jsx29("div", { style: { marginTop: 24, color: "#FFFFFF", fontSize: 72, fontWeight: 1e3, opacity: msgP }, children: message }),
1783
+ ctaButtons?.length ? /* @__PURE__ */ jsx29("div", { style: { marginTop: 34, display: "flex", gap: 18, justifyContent: "center", opacity: ctaP }, children: ctaButtons.map((b, i) => /* @__PURE__ */ jsxs12(
1784
+ "div",
1785
+ {
1786
+ style: {
1787
+ padding: "18px 28px",
1788
+ borderRadius: 18,
1789
+ backgroundColor: "rgba(255,255,255,0.12)",
1790
+ color: "#FFFFFF",
1791
+ fontSize: 28,
1792
+ fontWeight: 900
1793
+ },
1794
+ children: [
1795
+ b.icon ? `${b.icon} ` : "",
1796
+ b.text
1797
+ ]
1798
+ },
1799
+ i
1800
+ )) }) : null,
1801
+ socialHandles?.length ? /* @__PURE__ */ jsx29("div", { style: { marginTop: 50, display: "flex", flexDirection: "column", gap: 10, opacity: ctaP }, children: socialHandles.map((h, i) => /* @__PURE__ */ jsxs12("div", { style: { color: "rgba(255,255,255,0.85)", fontSize: 26, fontWeight: 800 }, children: [
1802
+ h.platform,
1803
+ ": ",
1804
+ h.handle
1805
+ ] }, i)) }) : null
1806
+ ] }) });
1807
+ };
1808
+ var OutroSceneComponentMetadata = {
1809
+ kind: "composite",
1810
+ category: "branding",
1811
+ description: "End screen with logo, message, optional CTA buttons and social handles",
1812
+ llmGuidance: "Use as the last segment. Keep CTAs <=3 for clarity."
1813
+ };
1814
+
1815
+ // src/components/composites/OutlineText.tsx
1816
+ import { AbsoluteFill as AbsoluteFill27, interpolate as interpolate15, useCurrentFrame as useCurrentFrame22 } from "remotion";
1817
+ import { z as z32 } from "zod";
1818
+ import { jsx as jsx30, jsxs as jsxs13 } from "react/jsx-runtime";
1819
+ var OutlineTextPropsSchema = z32.object({
1820
+ content: z32.string().max(50),
1821
+ fontSize: z32.number().min(8).max(240).default(96),
1822
+ outlineColor: z32.string().default("#FFFFFF"),
1823
+ fillColor: z32.string().default("#000000"),
1824
+ fontFamily: z32.string().default("Inter"),
1825
+ fontWeight: z32.number().int().min(100).max(900).default(800),
1826
+ position: z32.enum(["top", "center", "bottom"]).default("center"),
1827
+ animation: z32.enum(["draw", "fill"]).default("draw"),
1828
+ strokeWidth: z32.number().min(1).max(10).default(3)
1829
+ });
1830
+ var positionStyles3 = (position) => {
1831
+ if (position === "top") return { justifyContent: "center", alignItems: "flex-start", paddingTop: 90 };
1832
+ if (position === "bottom") return { justifyContent: "center", alignItems: "flex-end", paddingBottom: 90 };
1833
+ return { justifyContent: "center", alignItems: "center" };
1834
+ };
1835
+ var OutlineText = ({
1836
+ content,
1837
+ fontSize,
1838
+ outlineColor,
1839
+ fillColor,
1840
+ fontFamily,
1841
+ fontWeight,
1842
+ position,
1843
+ animation,
1844
+ strokeWidth
1845
+ }) => {
1846
+ const frame = useCurrentFrame22();
1847
+ const t = interpolate15(frame, [0, 24], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
1848
+ const strokeOpacity = animation === "draw" ? t : 1;
1849
+ const fillOpacity = animation === "fill" ? t : 0;
1850
+ return /* @__PURE__ */ jsxs13(AbsoluteFill27, { style: { display: "flex", ...positionStyles3(position) }, children: [
1851
+ /* @__PURE__ */ jsx30(
1852
+ "div",
1853
+ {
1854
+ style: {
1855
+ fontSize,
1856
+ fontFamily,
1857
+ fontWeight,
1858
+ color: fillColor,
1859
+ opacity: fillOpacity,
1860
+ WebkitTextStroke: `${strokeWidth}px ${outlineColor}`,
1861
+ textShadow: `0 0 1px ${outlineColor}`,
1862
+ textAlign: "center",
1863
+ lineHeight: 1
1864
+ },
1865
+ children: content
1866
+ }
1867
+ ),
1868
+ /* @__PURE__ */ jsx30(
1869
+ "div",
1870
+ {
1871
+ style: {
1872
+ position: "absolute",
1873
+ fontSize,
1874
+ fontFamily,
1875
+ fontWeight,
1876
+ color: "transparent",
1877
+ opacity: strokeOpacity,
1878
+ WebkitTextStroke: `${strokeWidth}px ${outlineColor}`,
1879
+ textAlign: "center",
1880
+ lineHeight: 1
1881
+ },
1882
+ children: content
1883
+ }
1884
+ )
1885
+ ] });
1886
+ };
1887
+ var OutlineTextComponentMetadata = {
1888
+ kind: "composite",
1889
+ category: "text",
1890
+ description: "Outlined title text with simple draw/fill animation",
1891
+ llmGuidance: 'Use for bold titles. animation="draw" emphasizes the outline; animation="fill" reveals the fill color.'
1892
+ };
1893
+
1894
+ // src/components/composites/ProgressBar.tsx
1895
+ import { AbsoluteFill as AbsoluteFill28, interpolate as interpolate16, useCurrentFrame as useCurrentFrame23 } from "remotion";
1896
+ import { z as z33 } from "zod";
1897
+ import { jsx as jsx31, jsxs as jsxs14 } from "react/jsx-runtime";
1898
+ var ProgressBarPropsSchema = z33.object({
1899
+ label: z33.string().optional(),
1900
+ color: z33.string().default("#00FF00"),
1901
+ backgroundColor: z33.string().default("rgba(255,255,255,0.2)"),
1902
+ height: z33.number().min(5).max(50).default(10),
1903
+ position: z33.enum(["top", "bottom"]).default("bottom"),
1904
+ showPercentage: z33.boolean().default(true)
1905
+ });
1906
+ var ProgressBar = ({
1907
+ label,
1908
+ color,
1909
+ backgroundColor,
1910
+ height,
1911
+ position,
1912
+ showPercentage,
1913
+ __wavesDurationInFrames
1914
+ }) => {
1915
+ const frame = useCurrentFrame23();
1916
+ const total = Math.max(1, __wavesDurationInFrames ?? 1);
1917
+ const p = interpolate16(frame, [0, total], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
1918
+ const pct = Math.round(p * 100);
1919
+ const yStyle = position === "top" ? { top: 50 } : { bottom: 50 };
1920
+ return /* @__PURE__ */ jsx31(AbsoluteFill28, { children: /* @__PURE__ */ jsxs14("div", { style: { position: "absolute", left: 80, right: 80, ...yStyle }, children: [
1921
+ label || showPercentage ? /* @__PURE__ */ jsxs14("div", { style: { display: "flex", justifyContent: "space-between", marginBottom: 10, color: "#FFFFFF", fontWeight: 700 }, children: [
1922
+ /* @__PURE__ */ jsx31("span", { children: label ?? "" }),
1923
+ /* @__PURE__ */ jsx31("span", { children: showPercentage ? `${pct}%` : "" })
1924
+ ] }) : null,
1925
+ /* @__PURE__ */ jsx31("div", { style: { width: "100%", height, backgroundColor, borderRadius: 9999, overflow: "hidden" }, children: /* @__PURE__ */ jsx31("div", { style: { width: `${pct}%`, height: "100%", backgroundColor: color } }) })
1926
+ ] }) });
1927
+ };
1928
+ var ProgressBarComponentMetadata = {
1929
+ kind: "composite",
1930
+ category: "data",
1931
+ description: "Animated progress bar that fills over the component duration",
1932
+ llmGuidance: "Use for loading/countdowns. showPercentage=true is helpful for clarity."
1933
+ };
1934
+
1935
+ // src/components/composites/ProgressRing.tsx
1936
+ import { AbsoluteFill as AbsoluteFill29, interpolate as interpolate17, useCurrentFrame as useCurrentFrame24 } from "remotion";
1937
+ import { z as z34 } from "zod";
1938
+ import { jsx as jsx32, jsxs as jsxs15 } from "react/jsx-runtime";
1939
+ var ProgressRingPropsSchema = z34.object({
1940
+ percentage: z34.number().min(0).max(100),
1941
+ size: z34.number().min(100).max(500).default(200),
1942
+ strokeWidth: z34.number().min(5).max(50).default(20),
1943
+ color: z34.string().default("#00FF00"),
1944
+ backgroundColor: z34.string().default("rgba(255,255,255,0.2)"),
1945
+ showLabel: z34.boolean().default(true)
1946
+ });
1947
+ var ProgressRing = ({
1948
+ percentage,
1949
+ size,
1950
+ strokeWidth,
1951
+ color,
1952
+ backgroundColor,
1953
+ showLabel,
1954
+ __wavesDurationInFrames
1955
+ }) => {
1956
+ const frame = useCurrentFrame24();
1957
+ const total = Math.max(1, __wavesDurationInFrames ?? 1);
1958
+ const p = interpolate17(frame, [0, total], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
1959
+ const current = percentage * p;
1960
+ const r = (size - strokeWidth) / 2;
1961
+ const c = 2 * Math.PI * r;
1962
+ const dash = c;
1963
+ const offset = c - current / 100 * c;
1964
+ return /* @__PURE__ */ jsxs15(AbsoluteFill29, { style: { justifyContent: "center", alignItems: "center" }, children: [
1965
+ /* @__PURE__ */ jsxs15("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, children: [
1966
+ /* @__PURE__ */ jsx32(
1967
+ "circle",
1968
+ {
1969
+ cx: size / 2,
1970
+ cy: size / 2,
1971
+ r,
1972
+ stroke: backgroundColor,
1973
+ strokeWidth,
1974
+ fill: "transparent"
1975
+ }
1976
+ ),
1977
+ /* @__PURE__ */ jsx32(
1978
+ "circle",
1979
+ {
1980
+ cx: size / 2,
1981
+ cy: size / 2,
1982
+ r,
1983
+ stroke: color,
1984
+ strokeWidth,
1985
+ fill: "transparent",
1986
+ strokeDasharray: dash,
1987
+ strokeDashoffset: offset,
1988
+ strokeLinecap: "round",
1989
+ transform: `rotate(-90 ${size / 2} ${size / 2})`
1990
+ }
1991
+ )
1992
+ ] }),
1993
+ showLabel ? /* @__PURE__ */ jsxs15("div", { style: { position: "absolute", color: "#FFFFFF", fontWeight: 800, fontSize: Math.round(size * 0.22) }, children: [
1994
+ Math.round(current),
1995
+ "%"
1996
+ ] }) : null
1997
+ ] });
1998
+ };
1999
+ var ProgressRingComponentMetadata = {
2000
+ kind: "composite",
2001
+ category: "data",
2002
+ description: "Circular progress indicator (SVG) that animates from 0 to percentage over duration",
2003
+ llmGuidance: "Use for completion and goals. size 160-260 is typical. showLabel displays the percentage."
2004
+ };
2005
+
2006
+ // src/components/composites/SlideTransition.tsx
2007
+ import { AbsoluteFill as AbsoluteFill30, interpolate as interpolate18, useCurrentFrame as useCurrentFrame25 } from "remotion";
2008
+ import { z as z35 } from "zod";
2009
+ import { jsx as jsx33 } from "react/jsx-runtime";
2010
+ var SlideTransitionPropsSchema = z35.object({
2011
+ durationInFrames: z35.number().int().min(10).max(60).default(30),
2012
+ direction: z35.enum(["left", "right", "up", "down"]).default("left"),
2013
+ distance: z35.number().int().min(1).max(2e3).default(160),
2014
+ phase: z35.enum(["in", "out", "inOut"]).default("inOut")
2015
+ });
2016
+ function translateFor(direction, delta) {
2017
+ if (direction === "left") return { x: -delta, y: 0 };
2018
+ if (direction === "right") return { x: delta, y: 0 };
2019
+ if (direction === "up") return { x: 0, y: -delta };
2020
+ return { x: 0, y: delta };
2021
+ }
2022
+ var SlideTransition = ({
2023
+ durationInFrames,
2024
+ direction,
2025
+ distance,
2026
+ phase,
2027
+ children,
2028
+ __wavesDurationInFrames
2029
+ }) => {
2030
+ const frame = useCurrentFrame25();
2031
+ const total = Math.max(1, __wavesDurationInFrames ?? 1);
2032
+ const d = Math.min(durationInFrames, total);
2033
+ let opacity = 1;
2034
+ let tx = 0;
2035
+ let ty = 0;
2036
+ if (phase === "in" || phase === "inOut") {
2037
+ const t = interpolate18(frame, [0, d], [1, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
2038
+ const { x, y } = translateFor(direction, distance * t);
2039
+ tx += x;
2040
+ ty += y;
2041
+ opacity *= interpolate18(frame, [0, d], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
2042
+ }
2043
+ if (phase === "out" || phase === "inOut") {
2044
+ const start = Math.max(0, total - d);
2045
+ const t = interpolate18(frame, [start, total], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
2046
+ const opposite = direction === "left" ? "right" : direction === "right" ? "left" : direction === "up" ? "down" : "up";
2047
+ const { x, y } = translateFor(opposite, distance * t);
2048
+ tx += x;
2049
+ ty += y;
2050
+ opacity *= interpolate18(frame, [start, total], [1, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
2051
+ }
2052
+ return /* @__PURE__ */ jsx33(AbsoluteFill30, { style: { opacity, transform: `translate(${tx}px, ${ty}px)` }, children });
2053
+ };
2054
+ var SlideTransitionComponentMetadata = {
2055
+ kind: "composite",
2056
+ category: "transition",
2057
+ acceptsChildren: true,
2058
+ minChildren: 1,
2059
+ description: "Slide in/out wrapper (used for segment transitions and overlays)",
2060
+ llmGuidance: "Use for more dynamic transitions. direction controls where content enters from."
2061
+ };
2062
+
2063
+ // src/components/composites/SplitScreen.tsx
2064
+ import React from "react";
2065
+ import { AbsoluteFill as AbsoluteFill31 } from "remotion";
2066
+ import { z as z36 } from "zod";
2067
+ import { jsx as jsx34, jsxs as jsxs16 } from "react/jsx-runtime";
2068
+ var SplitScreenPropsSchema = z36.object({
2069
+ orientation: z36.enum(["vertical", "horizontal"]).default("vertical"),
2070
+ split: z36.number().min(0.1).max(0.9).default(0.5),
2071
+ gap: z36.number().min(0).default(48),
2072
+ padding: z36.number().min(0).default(80),
2073
+ dividerColor: z36.string().optional()
2074
+ });
2075
+ var SplitScreen = ({
2076
+ orientation,
2077
+ split,
2078
+ gap,
2079
+ padding,
2080
+ dividerColor,
2081
+ children
2082
+ }) => {
2083
+ const items = React.Children.toArray(children);
2084
+ const first = items[0] ?? null;
2085
+ const second = items[1] ?? null;
2086
+ const isVertical = orientation === "vertical";
2087
+ const flexDirection = isVertical ? "row" : "column";
2088
+ return /* @__PURE__ */ jsx34(AbsoluteFill31, { style: { padding, boxSizing: "border-box" }, children: /* @__PURE__ */ jsxs16("div", { style: { display: "flex", flexDirection, gap, width: "100%", height: "100%" }, children: [
2089
+ /* @__PURE__ */ jsx34("div", { style: { flex: split, position: "relative" }, children: first }),
2090
+ dividerColor ? /* @__PURE__ */ jsx34(
2091
+ "div",
2092
+ {
2093
+ style: {
2094
+ backgroundColor: dividerColor,
2095
+ width: isVertical ? 2 : "100%",
2096
+ height: isVertical ? "100%" : 2,
2097
+ opacity: 0.7
2098
+ }
2099
+ }
2100
+ ) : null,
2101
+ /* @__PURE__ */ jsx34("div", { style: { flex: 1 - split, position: "relative" }, children: second })
2102
+ ] }) });
2103
+ };
2104
+ var SplitScreenComponentMetadata = {
2105
+ kind: "composite",
2106
+ category: "layout",
2107
+ acceptsChildren: true,
2108
+ minChildren: 2,
2109
+ maxChildren: 2,
2110
+ description: "Two-panel split screen layout",
2111
+ llmGuidance: 'Provide exactly 2 children. Use orientation="vertical" for left/right and "horizontal" for top/bottom.'
2112
+ };
2113
+
2114
+ // src/components/composites/SplitText.tsx
2115
+ import { AbsoluteFill as AbsoluteFill32, spring as spring10, useCurrentFrame as useCurrentFrame26, useVideoConfig as useVideoConfig11 } from "remotion";
2116
+ import { z as z37 } from "zod";
2117
+ import { jsx as jsx35 } from "react/jsx-runtime";
2118
+ var SplitTextPropsSchema = z37.object({
2119
+ content: z37.string().max(200),
2120
+ fontSize: z37.number().min(8).max(200).default(48),
2121
+ color: z37.string().default("#FFFFFF"),
2122
+ fontFamily: z37.string().default("Inter"),
2123
+ position: z37.enum(["top", "center", "bottom"]).default("center"),
2124
+ splitBy: z37.enum(["word", "letter"]).default("word"),
2125
+ stagger: z37.number().int().min(1).max(10).default(3),
2126
+ animation: z37.enum(["fade", "slideUp", "slideDown", "scale", "rotate"]).default("slideUp")
2127
+ });
2128
+ var positionStyles4 = (position) => {
2129
+ if (position === "top") return { justifyContent: "center", alignItems: "flex-start", paddingTop: 80 };
2130
+ if (position === "bottom") return { justifyContent: "center", alignItems: "flex-end", paddingBottom: 80 };
2131
+ return { justifyContent: "center", alignItems: "center" };
2132
+ };
2133
+ function getItemStyle(progress, animation) {
2134
+ const clamped = Math.max(0, Math.min(1, progress));
2135
+ switch (animation) {
2136
+ case "fade":
2137
+ return { opacity: clamped };
2138
+ case "slideDown":
2139
+ return { opacity: clamped, transform: `translateY(${-20 * (1 - clamped)}px)` };
2140
+ case "scale":
2141
+ return { opacity: clamped, transform: `scale(${0.9 + 0.1 * clamped})` };
2142
+ case "rotate":
2143
+ return { opacity: clamped, transform: `rotate(${(-10 * (1 - clamped)).toFixed(2)}deg)` };
2144
+ case "slideUp":
2145
+ default:
2146
+ return { opacity: clamped, transform: `translateY(${20 * (1 - clamped)}px)` };
2147
+ }
2148
+ }
2149
+ var SplitText = ({
2150
+ content,
2151
+ fontSize,
2152
+ color,
2153
+ fontFamily,
2154
+ position,
2155
+ splitBy,
2156
+ stagger,
2157
+ animation
2158
+ }) => {
2159
+ const frame = useCurrentFrame26();
2160
+ const { fps } = useVideoConfig11();
2161
+ const items = splitBy === "letter" ? content.split("") : content.trim().split(/\s+/);
2162
+ return /* @__PURE__ */ jsx35(AbsoluteFill32, { style: { display: "flex", ...positionStyles4(position) }, children: /* @__PURE__ */ jsx35(
2163
+ "div",
2164
+ {
2165
+ style: {
2166
+ display: "flex",
2167
+ flexWrap: "wrap",
2168
+ justifyContent: "center",
2169
+ gap: splitBy === "letter" ? 0 : 12,
2170
+ fontSize,
2171
+ color,
2172
+ fontFamily,
2173
+ fontWeight: 700,
2174
+ textAlign: "center"
2175
+ },
2176
+ children: items.map((t, i) => {
2177
+ const progress = spring10({
2178
+ frame: frame - i * stagger,
2179
+ fps,
2180
+ config: { damping: 14, stiffness: 120, mass: 0.9 }
2181
+ });
2182
+ return /* @__PURE__ */ jsx35(
2183
+ "span",
2184
+ {
2185
+ style: {
2186
+ display: "inline-block",
2187
+ whiteSpace: t === " " ? "pre" : "pre-wrap",
2188
+ ...getItemStyle(progress, animation)
2189
+ },
2190
+ children: splitBy === "word" ? `${t} ` : t
2191
+ },
2192
+ `${i}-${t}`
2193
+ );
2194
+ })
2195
+ }
2196
+ ) });
2197
+ };
2198
+ var SplitTextComponentMetadata = {
2199
+ kind: "composite",
2200
+ category: "text",
2201
+ description: "Animated text where each word or letter enters with a staggered effect",
2202
+ llmGuidance: 'Use for titles. splitBy="word" is best for phrases; splitBy="letter" is dramatic for short words.',
2203
+ examples: [
2204
+ { content: "Welcome to Waves", splitBy: "word", stagger: 3, animation: "slideUp" },
2205
+ { content: "HELLO", splitBy: "letter", stagger: 2, animation: "scale" }
2206
+ ]
2207
+ };
2208
+
2209
+ // src/components/composites/SubtitleText.tsx
2210
+ import { AbsoluteFill as AbsoluteFill33, interpolate as interpolate19, useCurrentFrame as useCurrentFrame27 } from "remotion";
2211
+ import { z as z38 } from "zod";
2212
+ import { jsx as jsx36 } from "react/jsx-runtime";
2213
+ var SubtitleTextPropsSchema = z38.object({
2214
+ text: z38.string().max(200),
2215
+ fontSize: z38.number().min(12).max(80).default(36),
2216
+ color: z38.string().default("#FFFFFF"),
2217
+ backgroundColor: z38.string().default("rgba(0,0,0,0.7)"),
2218
+ fontFamily: z38.string().default("Inter"),
2219
+ position: z38.enum(["top", "bottom"]).default("bottom"),
2220
+ maxWidth: z38.number().min(200).max(1200).default(800),
2221
+ padding: z38.number().min(0).max(80).default(20),
2222
+ highlightWords: z38.array(z38.string()).optional()
2223
+ });
2224
+ function normalizeWord(w) {
2225
+ return w.toLowerCase().replace(/[^a-z0-9]/g, "");
2226
+ }
2227
+ var SubtitleText = ({
2228
+ text,
2229
+ fontSize,
2230
+ color,
2231
+ backgroundColor,
2232
+ fontFamily,
2233
+ position,
2234
+ maxWidth,
2235
+ padding,
2236
+ highlightWords,
2237
+ __wavesDurationInFrames
2238
+ }) => {
2239
+ const frame = useCurrentFrame27();
2240
+ const total = Math.max(1, __wavesDurationInFrames ?? 1);
2241
+ const inFade = interpolate19(frame, [0, 10], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
2242
+ const outFade = interpolate19(frame, [Math.max(0, total - 10), total], [1, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
2243
+ const opacity = inFade * outFade;
2244
+ const highlights = new Set((highlightWords ?? []).map(normalizeWord));
2245
+ const tokens = text.split(/\s+/);
2246
+ const yStyle = position === "top" ? { top: 70 } : { bottom: 90 };
2247
+ return /* @__PURE__ */ jsx36(AbsoluteFill33, { children: /* @__PURE__ */ jsx36("div", { style: { position: "absolute", left: "50%", transform: "translateX(-50%)", maxWidth, width: "100%", ...yStyle }, children: /* @__PURE__ */ jsx36(
2248
+ "div",
2249
+ {
2250
+ style: {
2251
+ display: "inline-block",
2252
+ backgroundColor,
2253
+ padding,
2254
+ borderRadius: 18,
2255
+ opacity,
2256
+ color,
2257
+ fontSize,
2258
+ fontFamily,
2259
+ fontWeight: 800,
2260
+ lineHeight: 1.2,
2261
+ textAlign: "center"
2262
+ },
2263
+ children: tokens.map((t, i) => {
2264
+ const n = normalizeWord(t);
2265
+ const isHighlighted = highlights.has(n);
2266
+ return /* @__PURE__ */ jsx36("span", { style: { color: isHighlighted ? "#FFD60A" : color, marginRight: 8 }, children: t }, i);
2267
+ })
2268
+ }
2269
+ ) }) });
2270
+ };
2271
+ var SubtitleTextComponentMetadata = {
2272
+ kind: "composite",
2273
+ category: "text",
2274
+ description: "Caption/subtitle box with fade in/out and optional highlighted words",
2275
+ llmGuidance: "Use for narration/captions. highlightWords helps emphasize key terms."
2276
+ };
2277
+
2278
+ // src/components/composites/TikTokCaption.tsx
2279
+ import { AbsoluteFill as AbsoluteFill34, interpolate as interpolate20, useCurrentFrame as useCurrentFrame28 } from "remotion";
2280
+ import { z as z39 } from "zod";
2281
+ import { jsx as jsx37 } from "react/jsx-runtime";
2282
+ var TikTokCaptionPropsSchema = z39.object({
2283
+ text: z39.string().max(150),
2284
+ fontSize: z39.number().min(12).max(120).default(48),
2285
+ color: z39.string().default("#FFFFFF"),
2286
+ strokeColor: z39.string().default("#000000"),
2287
+ strokeWidth: z39.number().min(0).max(10).default(3),
2288
+ position: z39.enum(["center", "bottom"]).default("center"),
2289
+ highlightStyle: z39.enum(["word", "bounce", "none"]).default("word")
2290
+ });
2291
+ var TikTokCaption = ({
2292
+ text,
2293
+ fontSize,
2294
+ color,
2295
+ strokeColor,
2296
+ strokeWidth,
2297
+ position,
2298
+ highlightStyle,
2299
+ __wavesDurationInFrames
2300
+ }) => {
2301
+ const frame = useCurrentFrame28();
2302
+ const total = Math.max(1, __wavesDurationInFrames ?? 1);
2303
+ const p = interpolate20(frame, [0, total], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
2304
+ const words = text.trim().split(/\s+/);
2305
+ const idx = highlightStyle === "none" ? -1 : Math.min(words.length - 1, Math.floor(p * words.length));
2306
+ const yStyle = position === "bottom" ? { alignItems: "flex-end", paddingBottom: 140 } : { alignItems: "center" };
2307
+ return /* @__PURE__ */ jsx37(AbsoluteFill34, { style: { display: "flex", justifyContent: "center", ...yStyle }, children: /* @__PURE__ */ jsx37("div", { style: { textAlign: "center", padding: "0 80px", fontWeight: 900, lineHeight: 1.1 }, children: words.map((w, i) => {
2308
+ const isActive = i === idx && highlightStyle !== "none";
2309
+ const bounce = isActive && highlightStyle === "bounce" ? interpolate20(frame % 18, [0, 9, 18], [1, 1.08, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" }) : 1;
2310
+ return /* @__PURE__ */ jsx37(
2311
+ "span",
2312
+ {
2313
+ style: {
2314
+ display: "inline-block",
2315
+ marginRight: 12,
2316
+ fontSize,
2317
+ color: isActive ? "#FFD60A" : color,
2318
+ WebkitTextStroke: `${strokeWidth}px ${strokeColor}`,
2319
+ transform: `scale(${bounce})`
2320
+ },
2321
+ children: w
2322
+ },
2323
+ `${i}-${w}`
2324
+ );
2325
+ }) }) });
2326
+ };
2327
+ var TikTokCaptionComponentMetadata = {
2328
+ kind: "composite",
2329
+ category: "social",
2330
+ description: "TikTok-style captions with stroke and optional word highlighting",
2331
+ llmGuidance: 'Always keep strokeWidth>=2 for readability. highlightStyle="word" or "bounce" makes captions feel dynamic.'
2332
+ };
2333
+
2334
+ // src/components/composites/ThirdLowerBanner.tsx
2335
+ import { AbsoluteFill as AbsoluteFill35, Img as Img12, interpolate as interpolate21, staticFile as staticFile14, useCurrentFrame as useCurrentFrame29 } from "remotion";
2336
+ import { z as z40 } from "zod";
2337
+ import { jsx as jsx38, jsxs as jsxs17 } from "react/jsx-runtime";
2338
+ var ThirdLowerBannerPropsSchema = z40.object({
2339
+ name: z40.string().max(50),
2340
+ title: z40.string().max(100),
2341
+ backgroundColor: z40.string().default("rgba(0,0,0,0.8)"),
2342
+ primaryColor: z40.string().default("#FFFFFF"),
2343
+ secondaryColor: z40.string().default("#CCCCCC"),
2344
+ accentColor: z40.string().default("#FF0000"),
2345
+ showAvatar: z40.boolean().default(false),
2346
+ avatarSrc: z40.string().optional()
2347
+ });
2348
+ var resolveAsset13 = (value) => isRemoteAssetPath(value) ? value : staticFile14(staticFileInputFromAssetPath(value));
2349
+ var ThirdLowerBanner = ({
2350
+ name,
2351
+ title,
2352
+ backgroundColor,
2353
+ primaryColor,
2354
+ secondaryColor,
2355
+ accentColor,
2356
+ showAvatar,
2357
+ avatarSrc
2358
+ }) => {
2359
+ const frame = useCurrentFrame29();
2360
+ const slide = interpolate21(frame, [0, 18], [-600, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
2361
+ const opacity = interpolate21(frame, [0, 10], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
2362
+ const avatar = showAvatar && typeof avatarSrc === "string" && avatarSrc.length > 0 ? avatarSrc : null;
2363
+ return /* @__PURE__ */ jsx38(AbsoluteFill35, { children: /* @__PURE__ */ jsxs17(
2364
+ "div",
2365
+ {
2366
+ style: {
2367
+ position: "absolute",
2368
+ left: 80,
2369
+ bottom: 80,
2370
+ width: 980,
2371
+ height: 160,
2372
+ transform: `translateX(${slide}px)`,
2373
+ opacity,
2374
+ display: "flex",
2375
+ overflow: "hidden",
2376
+ borderRadius: 18,
2377
+ backgroundColor
2378
+ },
2379
+ children: [
2380
+ /* @__PURE__ */ jsx38("div", { style: { width: 10, backgroundColor: accentColor } }),
2381
+ avatar ? /* @__PURE__ */ jsx38("div", { style: { width: 160, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsx38(
2382
+ Img12,
2383
+ {
2384
+ src: resolveAsset13(avatar),
2385
+ style: { width: 110, height: 110, borderRadius: 9999, objectFit: "cover" }
2386
+ }
2387
+ ) }) : null,
2388
+ /* @__PURE__ */ jsxs17("div", { style: { padding: "28px 36px", display: "flex", flexDirection: "column", justifyContent: "center" }, children: [
2389
+ /* @__PURE__ */ jsx38("div", { style: { color: primaryColor, fontSize: 54, fontWeight: 800, lineHeight: 1 }, children: name }),
2390
+ /* @__PURE__ */ jsx38("div", { style: { marginTop: 10, color: secondaryColor, fontSize: 28, fontWeight: 600 }, children: title })
2391
+ ] })
2392
+ ]
2393
+ }
2394
+ ) });
2395
+ };
2396
+ var ThirdLowerBannerComponentMetadata = {
2397
+ kind: "composite",
2398
+ category: "layout",
2399
+ description: "Broadcast-style lower-third banner with name/title and optional avatar",
2400
+ llmGuidance: "Use for speaker introductions. name = big label, title = smaller subtitle. showAvatar + avatarSrc for profile image.",
2401
+ examples: [
2402
+ { name: "Alex Chen", title: "Product Designer", accentColor: "#FF3B30" },
2403
+ { name: "Depths AI", title: "Waves v0.2.0", showAvatar: false }
2404
+ ]
2405
+ };
2406
+
2407
+ // src/components/composites/TypewriterText.tsx
2408
+ import { AbsoluteFill as AbsoluteFill36, interpolate as interpolate22, useCurrentFrame as useCurrentFrame30 } from "remotion";
2409
+ import { z as z41 } from "zod";
2410
+ import { jsx as jsx39, jsxs as jsxs18 } from "react/jsx-runtime";
2411
+ var TypewriterTextPropsSchema = z41.object({
2412
+ content: z41.string().max(500),
2413
+ fontSize: z41.number().min(8).max(200).default(48),
2414
+ color: z41.string().default("#FFFFFF"),
2415
+ fontFamily: z41.string().default("Inter"),
2416
+ position: z41.enum(["top", "center", "bottom"]).default("center"),
2417
+ speed: z41.number().min(0.5).max(5).default(2),
2418
+ showCursor: z41.boolean().default(true),
2419
+ cursorColor: z41.string().default("#FFFFFF")
2420
+ });
2421
+ var positionStyles5 = (position) => {
2422
+ if (position === "top") return { justifyContent: "center", alignItems: "flex-start", paddingTop: 80 };
2423
+ if (position === "bottom") return { justifyContent: "center", alignItems: "flex-end", paddingBottom: 80 };
2424
+ return { justifyContent: "center", alignItems: "center" };
2425
+ };
2426
+ var TypewriterText = ({
2427
+ content,
2428
+ fontSize,
2429
+ color,
2430
+ fontFamily,
2431
+ position,
2432
+ speed,
2433
+ showCursor,
2434
+ cursorColor
2435
+ }) => {
2436
+ const frame = useCurrentFrame30();
2437
+ const charCount = Math.min(content.length, Math.max(0, Math.floor(frame * speed)));
2438
+ const shown = content.slice(0, charCount);
2439
+ const cursorVisible = showCursor && charCount < content.length ? frame % 30 < 15 : false;
2440
+ const cursorOpacity = cursorVisible ? 1 : 0;
2441
+ const cursorFade = interpolate22(frame % 30, [0, 5], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
2442
+ return /* @__PURE__ */ jsx39(AbsoluteFill36, { style: { display: "flex", ...positionStyles5(position) }, children: /* @__PURE__ */ jsxs18("div", { style: { fontSize, color, fontFamily, fontWeight: 600, textAlign: "center", whiteSpace: "pre-wrap" }, children: [
2443
+ shown,
2444
+ showCursor ? /* @__PURE__ */ jsx39("span", { style: { color: cursorColor, opacity: cursorOpacity * cursorFade }, children: "|" }) : null
2445
+ ] }) });
2446
+ };
2447
+ var TypewriterTextComponentMetadata = {
2448
+ kind: "composite",
2449
+ category: "text",
2450
+ description: "Character-by-character text reveal with optional blinking cursor",
2451
+ llmGuidance: "Use for dramatic reveals and terminal-style text. speed ~1-2 is readable; 3-5 is fast.",
2452
+ examples: [
2453
+ { content: "Hello Waves", speed: 2, position: "center", fontSize: 72 },
2454
+ { content: 'console.log("hi")', speed: 1.5, fontFamily: "monospace", position: "top" }
2455
+ ]
2456
+ };
2457
+
2458
+ // src/components/composites/TwitterCard.tsx
2459
+ import { AbsoluteFill as AbsoluteFill37, Img as Img13, staticFile as staticFile15 } from "remotion";
2460
+ import { z as z42 } from "zod";
2461
+ import { jsx as jsx40, jsxs as jsxs19 } from "react/jsx-runtime";
2462
+ var TwitterCardPropsSchema = z42.object({
2463
+ author: z42.string().min(1),
2464
+ handle: z42.string().min(1),
2465
+ avatarSrc: z42.string().optional(),
2466
+ tweet: z42.string().max(280),
2467
+ image: z42.string().optional(),
2468
+ timestamp: z42.string().optional(),
2469
+ verified: z42.boolean().default(false)
2470
+ });
2471
+ var resolveAsset14 = (value) => isRemoteAssetPath(value) ? value : staticFile15(staticFileInputFromAssetPath(value));
2472
+ var TwitterCard = ({ author, handle, avatarSrc, tweet, image, timestamp, verified }) => {
2473
+ return /* @__PURE__ */ jsx40(AbsoluteFill37, { style: { backgroundColor: "#0B0F14", justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ jsxs19(
2474
+ "div",
2475
+ {
2476
+ style: {
2477
+ width: 1100,
2478
+ borderRadius: 28,
2479
+ backgroundColor: "#FFFFFF",
2480
+ padding: 48,
2481
+ boxSizing: "border-box",
2482
+ boxShadow: "0 30px 90px rgba(0,0,0,0.35)"
2483
+ },
2484
+ children: [
2485
+ /* @__PURE__ */ jsxs19("div", { style: { display: "flex", gap: 18, alignItems: "center" }, children: [
2486
+ avatarSrc ? /* @__PURE__ */ jsx40(Img13, { src: resolveAsset14(avatarSrc), style: { width: 78, height: 78, borderRadius: 9999, objectFit: "cover" } }) : /* @__PURE__ */ jsx40("div", { style: { width: 78, height: 78, borderRadius: 9999, backgroundColor: "#E5E7EB" } }),
2487
+ /* @__PURE__ */ jsxs19("div", { style: { display: "flex", flexDirection: "column" }, children: [
2488
+ /* @__PURE__ */ jsxs19("div", { style: { display: "flex", gap: 10, alignItems: "center" }, children: [
2489
+ /* @__PURE__ */ jsx40("div", { style: { fontSize: 34, fontWeight: 900, color: "#111827" }, children: author }),
2490
+ verified ? /* @__PURE__ */ jsx40("div", { style: { fontSize: 26, color: "#1D9BF0", fontWeight: 900 }, children: "\u2713" }) : null
2491
+ ] }),
2492
+ /* @__PURE__ */ jsx40("div", { style: { fontSize: 26, color: "#6B7280", fontWeight: 800 }, children: handle })
2493
+ ] })
2494
+ ] }),
2495
+ /* @__PURE__ */ jsx40("div", { style: { marginTop: 28, fontSize: 36, lineHeight: 1.25, color: "#111827", fontWeight: 700 }, children: tweet }),
2496
+ image ? /* @__PURE__ */ jsx40("div", { style: { marginTop: 28, width: "100%", height: 520, overflow: "hidden", borderRadius: 22, backgroundColor: "#F3F4F6" }, children: /* @__PURE__ */ jsx40(Img13, { src: resolveAsset14(image), style: { width: "100%", height: "100%", objectFit: "cover" } }) }) : null,
2497
+ timestamp ? /* @__PURE__ */ jsx40("div", { style: { marginTop: 22, fontSize: 22, color: "#6B7280", fontWeight: 700 }, children: timestamp }) : null
2498
+ ]
2499
+ }
2500
+ ) });
2501
+ };
2502
+ var TwitterCardComponentMetadata = {
2503
+ kind: "composite",
2504
+ category: "social",
2505
+ description: "Twitter/X post card layout with author header and optional image",
2506
+ llmGuidance: "Use for announcements/testimonials. Keep tweet short for readability."
2507
+ };
2508
+
2509
+ // src/components/composites/Watermark.tsx
2510
+ import { AbsoluteFill as AbsoluteFill38, Img as Img14, staticFile as staticFile16 } from "remotion";
2511
+ import { z as z43 } from "zod";
2512
+ import { jsx as jsx41 } from "react/jsx-runtime";
2513
+ var WatermarkPropsSchema = z43.object({
2514
+ type: z43.enum(["logo", "text"]).default("logo"),
2515
+ src: z43.string().optional(),
2516
+ text: z43.string().optional(),
2517
+ position: z43.enum(["topLeft", "topRight", "bottomLeft", "bottomRight"]).default("bottomRight"),
2518
+ opacity: z43.number().min(0.1).max(1).default(0.5),
2519
+ size: z43.number().min(30).max(150).default(60),
2520
+ color: z43.string().default("#FFFFFF")
2521
+ });
2522
+ var resolveAsset15 = (value) => isRemoteAssetPath(value) ? value : staticFile16(staticFileInputFromAssetPath(value));
2523
+ function posStyle(position) {
2524
+ const offset = 30;
2525
+ if (position === "topLeft") return { left: offset, top: offset };
2526
+ if (position === "topRight") return { right: offset, top: offset };
2527
+ if (position === "bottomLeft") return { left: offset, bottom: offset };
2528
+ return { right: offset, bottom: offset };
2529
+ }
2530
+ var Watermark = ({ type, src, text, position, opacity, size, color }) => {
2531
+ const style = {
2532
+ position: "absolute",
2533
+ ...posStyle(position),
2534
+ opacity,
2535
+ pointerEvents: "none"
2536
+ };
2537
+ return /* @__PURE__ */ jsx41(AbsoluteFill38, { children: type === "text" ? /* @__PURE__ */ jsx41("div", { style: { ...style, fontSize: Math.round(size * 0.6), color, fontWeight: 700 }, children: text ?? "" }) : src ? /* @__PURE__ */ jsx41(
2538
+ Img14,
2539
+ {
2540
+ src: resolveAsset15(src),
2541
+ style: { ...style, width: size, height: size, objectFit: "contain" }
2542
+ }
2543
+ ) : null });
2544
+ };
2545
+ var WatermarkComponentMetadata = {
2546
+ kind: "composite",
2547
+ category: "branding",
2548
+ description: "Persistent logo/text watermark in a corner",
2549
+ llmGuidance: "Use subtle opacity (0.3-0.6). bottomRight is standard.",
2550
+ examples: [
2551
+ { type: "text", text: "@depths.ai", position: "bottomRight", opacity: 0.4, size: 60 },
2552
+ { type: "logo", src: "/assets/logo.png", position: "topLeft", opacity: 0.5, size: 70 }
2553
+ ]
2554
+ };
2555
+
2556
+ // src/components/composites/WipeTransition.tsx
2557
+ import { AbsoluteFill as AbsoluteFill39, interpolate as interpolate23, useCurrentFrame as useCurrentFrame31 } from "remotion";
2558
+ import { z as z44 } from "zod";
2559
+ import { jsx as jsx42 } from "react/jsx-runtime";
2560
+ var WipeTransitionPropsSchema = z44.object({
2561
+ durationInFrames: z44.number().int().min(10).max(60).default(30),
2562
+ direction: z44.enum(["left", "right", "up", "down", "diagonal"]).default("right"),
2563
+ softEdge: z44.boolean().default(false),
2564
+ phase: z44.enum(["in", "out", "inOut"]).default("inOut")
2565
+ });
2566
+ function clipFor2(direction, p) {
2567
+ if (direction === "left") return `inset(0 ${100 * (1 - p)}% 0 0)`;
2568
+ if (direction === "right") return `inset(0 0 0 ${100 * (1 - p)}%)`;
2569
+ if (direction === "up") return `inset(0 0 ${100 * (1 - p)}% 0)`;
2570
+ if (direction === "down") return `inset(${100 * (1 - p)}% 0 0 0)`;
2571
+ return `polygon(0 0, ${100 * p}% 0, 0 ${100 * p}%)`;
2572
+ }
2573
+ var WipeTransition = ({
2574
+ durationInFrames,
2575
+ direction,
2576
+ softEdge,
2577
+ phase,
2578
+ children,
2579
+ __wavesDurationInFrames
2580
+ }) => {
2581
+ const frame = useCurrentFrame31();
2582
+ const total = Math.max(1, __wavesDurationInFrames ?? 1);
2583
+ const d = Math.min(durationInFrames, total);
2584
+ let clipPath;
2585
+ if (phase === "in" || phase === "inOut") {
2586
+ const t = interpolate23(frame, [0, d], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
2587
+ clipPath = clipFor2(direction, t);
2588
+ }
2589
+ if (phase === "out" || phase === "inOut") {
2590
+ const start = Math.max(0, total - d);
2591
+ const t = interpolate23(frame, [start, total], [1, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
2592
+ clipPath = clipFor2(direction, t);
2593
+ }
2594
+ return /* @__PURE__ */ jsx42(AbsoluteFill39, { style: { clipPath, filter: softEdge ? "blur(0.4px)" : void 0 }, children });
2595
+ };
2596
+ var WipeTransitionComponentMetadata = {
2597
+ kind: "composite",
2598
+ category: "transition",
2599
+ acceptsChildren: true,
2600
+ minChildren: 1,
2601
+ description: "Directional wipe reveal/hide wrapper transition",
2602
+ llmGuidance: "Use as a more stylized reveal. softEdge can make it feel less harsh."
2603
+ };
2604
+
2605
+ // src/components/composites/YouTubeThumbnail.tsx
2606
+ import { AbsoluteFill as AbsoluteFill40, Img as Img15, staticFile as staticFile17 } from "remotion";
2607
+ import { z as z45 } from "zod";
2608
+ import { jsx as jsx43, jsxs as jsxs20 } from "react/jsx-runtime";
2609
+ var YouTubeThumbnailPropsSchema = z45.object({
2610
+ backgroundImage: z45.string().min(1),
2611
+ title: z45.string().max(60),
2612
+ subtitle: z45.string().max(40).optional(),
2613
+ thumbnailFace: z45.string().optional(),
2614
+ accentColor: z45.string().default("#FF0000"),
2615
+ style: z45.enum(["bold", "minimal", "dramatic"]).default("bold")
2616
+ });
2617
+ var resolveAsset16 = (value) => isRemoteAssetPath(value) ? value : staticFile17(staticFileInputFromAssetPath(value));
2618
+ var YouTubeThumbnail = ({
2619
+ backgroundImage,
2620
+ title,
2621
+ subtitle,
2622
+ thumbnailFace,
2623
+ accentColor,
2624
+ style
2625
+ }) => {
2626
+ return /* @__PURE__ */ jsxs20(AbsoluteFill40, { children: [
2627
+ /* @__PURE__ */ jsx43(Img15, { src: resolveAsset16(backgroundImage), style: { width: "100%", height: "100%", objectFit: "cover" } }),
2628
+ style === "dramatic" ? /* @__PURE__ */ jsx43(AbsoluteFill40, { style: { backgroundColor: "rgba(0,0,0,0.35)" } }) : null,
2629
+ thumbnailFace ? /* @__PURE__ */ jsx43(
2630
+ Img15,
2631
+ {
2632
+ src: resolveAsset16(thumbnailFace),
2633
+ style: { position: "absolute", right: 60, bottom: 0, width: 520, height: 720, objectFit: "cover" }
2634
+ }
2635
+ ) : null,
2636
+ /* @__PURE__ */ jsxs20("div", { style: { position: "absolute", left: 70, top: 90, width: 1100 }, children: [
2637
+ /* @__PURE__ */ jsx43(
2638
+ "div",
2639
+ {
2640
+ style: {
2641
+ fontSize: style === "minimal" ? 86 : 110,
2642
+ fontWeight: 1e3,
2643
+ color: "#FFFFFF",
2644
+ textTransform: "uppercase",
2645
+ lineHeight: 0.95,
2646
+ WebkitTextStroke: style === "minimal" ? "0px transparent" : "10px #000000",
2647
+ textShadow: style === "minimal" ? "0 10px 40px rgba(0,0,0,0.6)" : void 0
2648
+ },
2649
+ children: title
2650
+ }
2651
+ ),
2652
+ subtitle ? /* @__PURE__ */ jsx43("div", { style: { marginTop: 26, fontSize: 52, fontWeight: 900, color: accentColor, textShadow: "0 10px 30px rgba(0,0,0,0.6)" }, children: subtitle }) : null
2653
+ ] }),
2654
+ style !== "minimal" ? /* @__PURE__ */ jsx43("div", { style: { position: "absolute", left: 70, bottom: 80, width: 260, height: 18, backgroundColor: accentColor, borderRadius: 9999 } }) : null
2655
+ ] });
2656
+ };
2657
+ var YouTubeThumbnailComponentMetadata = {
2658
+ kind: "composite",
2659
+ category: "social",
2660
+ description: "YouTube-style thumbnail layout (16:9) with bold title and optional face cutout",
2661
+ llmGuidance: 'Use 1280x720 video size. Keep title short and high-contrast. style="bold" is classic thumbnail.'
2662
+ };
2663
+
2664
+ // src/components/composites/VideoWithOverlay.tsx
2665
+ import { AbsoluteFill as AbsoluteFill41, Img as Img16, Video as RemotionVideo2, interpolate as interpolate24, staticFile as staticFile18, useCurrentFrame as useCurrentFrame32 } from "remotion";
2666
+ import { z as z46 } from "zod";
2667
+ import { jsx as jsx44, jsxs as jsxs21 } from "react/jsx-runtime";
2668
+ var OverlaySchema = z46.object({
2669
+ type: z46.enum(["text", "logo", "gradient"]),
2670
+ content: z46.string().optional(),
2671
+ opacity: z46.number().min(0).max(1).default(0.3),
2672
+ position: z46.enum(["top", "bottom", "center", "full"]).default("bottom")
2673
+ });
2674
+ var VideoWithOverlayPropsSchema = z46.object({
2675
+ src: z46.string().min(1),
2676
+ overlay: OverlaySchema.optional(),
2677
+ volume: z46.number().min(0).max(1).default(1),
2678
+ playbackRate: z46.number().min(0.5).max(2).default(1)
2679
+ });
2680
+ var resolveAsset17 = (value) => isRemoteAssetPath(value) ? value : staticFile18(staticFileInputFromAssetPath(value));
2681
+ var VideoWithOverlay = ({ src, overlay, volume, playbackRate }) => {
2682
+ const frame = useCurrentFrame32();
2683
+ const fade = interpolate24(frame, [0, 20], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
2684
+ const overlayNode = overlay ? overlay.type === "gradient" ? /* @__PURE__ */ jsx44(
2685
+ AbsoluteFill41,
2686
+ {
2687
+ style: {
2688
+ opacity: overlay.opacity,
2689
+ background: overlay.position === "top" ? "linear-gradient(rgba(0,0,0,0.85), transparent)" : overlay.position === "bottom" ? "linear-gradient(transparent, rgba(0,0,0,0.85))" : "linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6))"
2690
+ }
2691
+ }
2692
+ ) : overlay.type === "logo" && overlay.content ? /* @__PURE__ */ jsx44(AbsoluteFill41, { style: { justifyContent: "center", alignItems: "center", opacity: overlay.opacity }, children: /* @__PURE__ */ jsx44(Img16, { src: resolveAsset17(overlay.content), style: { width: 220, height: 220, objectFit: "contain" } }) }) : overlay.type === "text" && overlay.content ? /* @__PURE__ */ jsx44(AbsoluteFill41, { style: { justifyContent: "center", alignItems: "center", opacity: overlay.opacity }, children: /* @__PURE__ */ jsx44("div", { style: { color: "#FFFFFF", fontSize: 56, fontWeight: 900, textAlign: "center", padding: "0 80px" }, children: overlay.content }) }) : null : null;
2693
+ return /* @__PURE__ */ jsxs21(AbsoluteFill41, { children: [
2694
+ /* @__PURE__ */ jsx44(
2695
+ RemotionVideo2,
2696
+ {
2697
+ src: resolveAsset17(src),
2698
+ style: { width: "100%", height: "100%", objectFit: "cover", opacity: fade },
2699
+ muted: volume === 0,
2700
+ playbackRate
2701
+ }
2702
+ ),
2703
+ overlayNode
2704
+ ] });
2705
+ };
2706
+ var VideoWithOverlayComponentMetadata = {
2707
+ kind: "composite",
2708
+ category: "media",
2709
+ description: "Video background with an optional overlay (text/logo/gradient)",
2710
+ llmGuidance: "Use gradient overlay to improve text readability. Set volume=0 to mute."
2711
+ };
2712
+
2713
+ // src/components/composites/ZoomTransition.tsx
2714
+ import { AbsoluteFill as AbsoluteFill42, interpolate as interpolate25, useCurrentFrame as useCurrentFrame33 } from "remotion";
2715
+ import { z as z47 } from "zod";
2716
+ import { jsx as jsx45 } from "react/jsx-runtime";
2717
+ var ZoomTransitionPropsSchema = z47.object({
2718
+ durationInFrames: z47.number().int().min(10).max(60).default(30),
2719
+ type: z47.enum(["zoomIn", "zoomOut"]).default("zoomIn"),
2720
+ phase: z47.enum(["in", "out", "inOut"]).default("inOut")
2721
+ });
2722
+ var ZoomTransition = ({
2723
+ durationInFrames,
2724
+ type,
2725
+ phase,
2726
+ children,
2727
+ __wavesDurationInFrames
2728
+ }) => {
2729
+ const frame = useCurrentFrame33();
2730
+ const total = Math.max(1, __wavesDurationInFrames ?? 1);
2731
+ const d = Math.min(durationInFrames, total);
2732
+ let opacity = 1;
2733
+ let scale = 1;
2734
+ const enterFrom = type === "zoomIn" ? 1.2 : 0.85;
2735
+ const exitTo = type === "zoomIn" ? 1.25 : 0.75;
2736
+ if (phase === "in" || phase === "inOut") {
2737
+ const t = interpolate25(frame, [0, d], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
2738
+ scale *= enterFrom + (1 - enterFrom) * t;
2739
+ opacity *= t;
2740
+ }
2741
+ if (phase === "out" || phase === "inOut") {
2742
+ const start = Math.max(0, total - d);
2743
+ const t = interpolate25(frame, [start, total], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
2744
+ scale *= 1 + (exitTo - 1) * t;
2745
+ opacity *= 1 - t;
2746
+ }
2747
+ return /* @__PURE__ */ jsx45(AbsoluteFill42, { style: { opacity, transform: `scale(${scale})` }, children });
2748
+ };
2749
+ var ZoomTransitionComponentMetadata = {
2750
+ kind: "composite",
2751
+ category: "transition",
2752
+ acceptsChildren: true,
2753
+ minChildren: 1,
2754
+ description: "Zoom in/out wrapper transition",
2755
+ llmGuidance: 'Use for energetic cuts. type="zoomIn" feels punchy; type="zoomOut" feels calmer.'
2756
+ };
2757
+
2758
+ // src/components/registry.ts
2759
+ function registerBuiltInComponents() {
2760
+ if (!globalRegistry.has("Segment")) {
2761
+ globalRegistry.register({
2762
+ type: "Segment",
2763
+ component: Segment,
2764
+ propsSchema: SegmentPropsSchema,
2765
+ metadata: SegmentComponentMetadata
2766
+ });
2767
+ }
2768
+ if (!globalRegistry.has("Box")) {
2769
+ globalRegistry.register({
2770
+ type: "Box",
2771
+ component: Box,
2772
+ propsSchema: BoxPropsSchema,
2773
+ metadata: BoxComponentMetadata
2774
+ });
2775
+ }
2776
+ if (!globalRegistry.has("Stack")) {
2777
+ globalRegistry.register({
2778
+ type: "Stack",
2779
+ component: Stack,
2780
+ propsSchema: StackPropsSchema,
2781
+ metadata: StackComponentMetadata
2782
+ });
2783
+ }
2784
+ if (!globalRegistry.has("Grid")) {
2785
+ globalRegistry.register({
2786
+ type: "Grid",
2787
+ component: Grid,
2788
+ propsSchema: GridPropsSchema,
2789
+ metadata: GridComponentMetadata
2790
+ });
2791
+ }
2792
+ if (!globalRegistry.has("Image")) {
2793
+ globalRegistry.register({
2794
+ type: "Image",
2795
+ component: Image,
2796
+ propsSchema: ImagePropsSchema,
2797
+ metadata: ImageComponentMetadata
2798
+ });
2799
+ }
2800
+ if (!globalRegistry.has("Video")) {
2801
+ globalRegistry.register({
2802
+ type: "Video",
2803
+ component: Video2,
2804
+ propsSchema: VideoPropsSchema,
2805
+ metadata: VideoComponentMetadata
2806
+ });
2807
+ }
2808
+ if (!globalRegistry.has("Shape")) {
2809
+ globalRegistry.register({
2810
+ type: "Shape",
2811
+ component: Shape,
2812
+ propsSchema: ShapePropsSchema,
2813
+ metadata: ShapeComponentMetadata
2814
+ });
2815
+ }
2816
+ if (!globalRegistry.has("TypewriterText")) {
2817
+ globalRegistry.register({
2818
+ type: "TypewriterText",
2819
+ component: TypewriterText,
2820
+ propsSchema: TypewriterTextPropsSchema,
2821
+ metadata: TypewriterTextComponentMetadata
2822
+ });
2823
+ }
2824
+ if (!globalRegistry.has("SplitText")) {
2825
+ globalRegistry.register({
2826
+ type: "SplitText",
2827
+ component: SplitText,
2828
+ propsSchema: SplitTextPropsSchema,
2829
+ metadata: SplitTextComponentMetadata
2830
+ });
2831
+ }
2832
+ if (!globalRegistry.has("KenBurnsImage")) {
2833
+ globalRegistry.register({
2834
+ type: "KenBurnsImage",
2835
+ component: KenBurnsImage,
2836
+ propsSchema: KenBurnsImagePropsSchema,
2837
+ metadata: KenBurnsImageComponentMetadata
2838
+ });
2839
+ }
2840
+ if (!globalRegistry.has("FadeTransition")) {
2841
+ globalRegistry.register({
2842
+ type: "FadeTransition",
2843
+ component: FadeTransition,
2844
+ propsSchema: FadeTransitionPropsSchema,
2845
+ metadata: FadeTransitionComponentMetadata
2846
+ });
2847
+ }
2848
+ if (!globalRegistry.has("SlideTransition")) {
2849
+ globalRegistry.register({
2850
+ type: "SlideTransition",
2851
+ component: SlideTransition,
2852
+ propsSchema: SlideTransitionPropsSchema,
2853
+ metadata: SlideTransitionComponentMetadata
2854
+ });
2855
+ }
2856
+ if (!globalRegistry.has("SplitScreen")) {
2857
+ globalRegistry.register({
2858
+ type: "SplitScreen",
2859
+ component: SplitScreen,
2860
+ propsSchema: SplitScreenPropsSchema,
2861
+ metadata: SplitScreenComponentMetadata
2862
+ });
2863
+ }
2864
+ if (!globalRegistry.has("ThirdLowerBanner")) {
2865
+ globalRegistry.register({
2866
+ type: "ThirdLowerBanner",
2867
+ component: ThirdLowerBanner,
2868
+ propsSchema: ThirdLowerBannerPropsSchema,
2869
+ metadata: ThirdLowerBannerComponentMetadata
2870
+ });
2871
+ }
2872
+ if (!globalRegistry.has("AnimatedCounter")) {
2873
+ globalRegistry.register({
2874
+ type: "AnimatedCounter",
2875
+ component: AnimatedCounter,
2876
+ propsSchema: AnimatedCounterPropsSchema,
2877
+ metadata: AnimatedCounterComponentMetadata
2878
+ });
2879
+ }
2880
+ if (!globalRegistry.has("LogoReveal")) {
2881
+ globalRegistry.register({
2882
+ type: "LogoReveal",
2883
+ component: LogoReveal,
2884
+ propsSchema: LogoRevealPropsSchema,
2885
+ metadata: LogoRevealComponentMetadata
2886
+ });
2887
+ }
2888
+ if (!globalRegistry.has("Watermark")) {
2889
+ globalRegistry.register({
2890
+ type: "Watermark",
2891
+ component: Watermark,
2892
+ propsSchema: WatermarkPropsSchema,
2893
+ metadata: WatermarkComponentMetadata
2894
+ });
2895
+ }
2896
+ if (!globalRegistry.has("GlitchText")) {
2897
+ globalRegistry.register({
2898
+ type: "GlitchText",
2899
+ component: GlitchText,
2900
+ propsSchema: GlitchTextPropsSchema,
2901
+ metadata: GlitchTextComponentMetadata
2902
+ });
2903
+ }
2904
+ if (!globalRegistry.has("OutlineText")) {
2905
+ globalRegistry.register({
2906
+ type: "OutlineText",
2907
+ component: OutlineText,
2908
+ propsSchema: OutlineTextPropsSchema,
2909
+ metadata: OutlineTextComponentMetadata
2910
+ });
2911
+ }
2912
+ if (!globalRegistry.has("ImageReveal")) {
2913
+ globalRegistry.register({
2914
+ type: "ImageReveal",
2915
+ component: ImageReveal,
2916
+ propsSchema: ImageRevealPropsSchema,
2917
+ metadata: ImageRevealComponentMetadata
2918
+ });
2919
+ }
2920
+ if (!globalRegistry.has("ImageCollage")) {
2921
+ globalRegistry.register({
2922
+ type: "ImageCollage",
2923
+ component: ImageCollage,
2924
+ propsSchema: ImageCollagePropsSchema,
2925
+ metadata: ImageCollageComponentMetadata
2926
+ });
2927
+ }
2928
+ if (!globalRegistry.has("ProgressBar")) {
2929
+ globalRegistry.register({
2930
+ type: "ProgressBar",
2931
+ component: ProgressBar,
2932
+ propsSchema: ProgressBarPropsSchema,
2933
+ metadata: ProgressBarComponentMetadata
2934
+ });
2935
+ }
2936
+ if (!globalRegistry.has("ProgressRing")) {
2937
+ globalRegistry.register({
2938
+ type: "ProgressRing",
2939
+ component: ProgressRing,
2940
+ propsSchema: ProgressRingPropsSchema,
2941
+ metadata: ProgressRingComponentMetadata
2942
+ });
2943
+ }
2944
+ if (!globalRegistry.has("BarChart")) {
2945
+ globalRegistry.register({
2946
+ type: "BarChart",
2947
+ component: BarChart,
2948
+ propsSchema: BarChartPropsSchema,
2949
+ metadata: BarChartComponentMetadata
2950
+ });
2951
+ }
2952
+ if (!globalRegistry.has("InstagramStory")) {
2953
+ globalRegistry.register({
2954
+ type: "InstagramStory",
2955
+ component: InstagramStory,
2956
+ propsSchema: InstagramStoryPropsSchema,
2957
+ metadata: InstagramStoryComponentMetadata
2958
+ });
2959
+ }
2960
+ if (!globalRegistry.has("TikTokCaption")) {
2961
+ globalRegistry.register({
2962
+ type: "TikTokCaption",
2963
+ component: TikTokCaption,
2964
+ propsSchema: TikTokCaptionPropsSchema,
2965
+ metadata: TikTokCaptionComponentMetadata
2966
+ });
2967
+ }
2968
+ if (!globalRegistry.has("IntroScene")) {
2969
+ globalRegistry.register({
2970
+ type: "IntroScene",
2971
+ component: IntroScene,
2972
+ propsSchema: IntroScenePropsSchema,
2973
+ metadata: IntroSceneComponentMetadata
2974
+ });
2975
+ }
2976
+ if (!globalRegistry.has("CountUpText")) {
2977
+ globalRegistry.register({
2978
+ type: "CountUpText",
2979
+ component: CountUpText,
2980
+ propsSchema: CountUpTextPropsSchema,
2981
+ metadata: CountUpTextComponentMetadata
2982
+ });
2983
+ }
2984
+ if (!globalRegistry.has("KineticTypography")) {
2985
+ globalRegistry.register({
2986
+ type: "KineticTypography",
2987
+ component: KineticTypography,
2988
+ propsSchema: KineticTypographyPropsSchema,
2989
+ metadata: KineticTypographyComponentMetadata
2990
+ });
2991
+ }
2992
+ if (!globalRegistry.has("SubtitleText")) {
2993
+ globalRegistry.register({
2994
+ type: "SubtitleText",
2995
+ component: SubtitleText,
2996
+ propsSchema: SubtitleTextPropsSchema,
2997
+ metadata: SubtitleTextComponentMetadata
2998
+ });
2999
+ }
3000
+ if (!globalRegistry.has("ImageSequence")) {
3001
+ globalRegistry.register({
3002
+ type: "ImageSequence",
3003
+ component: ImageSequence,
3004
+ propsSchema: ImageSequencePropsSchema,
3005
+ metadata: ImageSequenceComponentMetadata
3006
+ });
3007
+ }
3008
+ if (!globalRegistry.has("ImageWithCaption")) {
3009
+ globalRegistry.register({
3010
+ type: "ImageWithCaption",
3011
+ component: ImageWithCaption,
3012
+ propsSchema: ImageWithCaptionPropsSchema,
3013
+ metadata: ImageWithCaptionComponentMetadata
3014
+ });
3015
+ }
3016
+ if (!globalRegistry.has("VideoWithOverlay")) {
3017
+ globalRegistry.register({
3018
+ type: "VideoWithOverlay",
3019
+ component: VideoWithOverlay,
3020
+ propsSchema: VideoWithOverlayPropsSchema,
3021
+ metadata: VideoWithOverlayComponentMetadata
3022
+ });
3023
+ }
3024
+ if (!globalRegistry.has("ZoomTransition")) {
3025
+ globalRegistry.register({
3026
+ type: "ZoomTransition",
3027
+ component: ZoomTransition,
3028
+ propsSchema: ZoomTransitionPropsSchema,
3029
+ metadata: ZoomTransitionComponentMetadata
3030
+ });
3031
+ }
3032
+ if (!globalRegistry.has("WipeTransition")) {
3033
+ globalRegistry.register({
3034
+ type: "WipeTransition",
3035
+ component: WipeTransition,
3036
+ propsSchema: WipeTransitionPropsSchema,
3037
+ metadata: WipeTransitionComponentMetadata
3038
+ });
3039
+ }
3040
+ if (!globalRegistry.has("CircularReveal")) {
3041
+ globalRegistry.register({
3042
+ type: "CircularReveal",
3043
+ component: CircularReveal,
3044
+ propsSchema: CircularRevealPropsSchema,
3045
+ metadata: CircularRevealComponentMetadata
3046
+ });
3047
+ }
3048
+ if (!globalRegistry.has("CardStack")) {
3049
+ globalRegistry.register({
3050
+ type: "CardStack",
3051
+ component: CardStack,
3052
+ propsSchema: CardStackPropsSchema,
3053
+ metadata: CardStackComponentMetadata
3054
+ });
3055
+ }
3056
+ if (!globalRegistry.has("GridLayout")) {
3057
+ globalRegistry.register({
3058
+ type: "GridLayout",
3059
+ component: GridLayout,
3060
+ propsSchema: GridLayoutPropsSchema,
3061
+ metadata: GridLayoutComponentMetadata
3062
+ });
3063
+ }
3064
+ if (!globalRegistry.has("LineGraph")) {
3065
+ globalRegistry.register({
3066
+ type: "LineGraph",
3067
+ component: LineGraph,
3068
+ propsSchema: LineGraphPropsSchema,
3069
+ metadata: LineGraphComponentMetadata
3070
+ });
3071
+ }
3072
+ if (!globalRegistry.has("YouTubeThumbnail")) {
3073
+ globalRegistry.register({
3074
+ type: "YouTubeThumbnail",
3075
+ component: YouTubeThumbnail,
3076
+ propsSchema: YouTubeThumbnailPropsSchema,
3077
+ metadata: YouTubeThumbnailComponentMetadata
3078
+ });
3079
+ }
3080
+ if (!globalRegistry.has("TwitterCard")) {
3081
+ globalRegistry.register({
3082
+ type: "TwitterCard",
3083
+ component: TwitterCard,
3084
+ propsSchema: TwitterCardPropsSchema,
3085
+ metadata: TwitterCardComponentMetadata
3086
+ });
3087
+ }
3088
+ if (!globalRegistry.has("OutroScene")) {
3089
+ globalRegistry.register({
3090
+ type: "OutroScene",
3091
+ component: OutroScene,
3092
+ propsSchema: OutroScenePropsSchema,
3093
+ metadata: OutroSceneComponentMetadata
3094
+ });
3095
+ }
3096
+ if (!globalRegistry.has("Scene")) {
3097
+ globalRegistry.register({
3098
+ type: "Scene",
3099
+ component: Scene,
3100
+ propsSchema: ScenePropsSchema,
3101
+ metadata: SceneComponentMetadata
3102
+ });
3103
+ }
3104
+ if (!globalRegistry.has("Text")) {
3105
+ globalRegistry.register({
3106
+ type: "Text",
3107
+ component: Text,
3108
+ propsSchema: TextPropsSchema,
3109
+ metadata: TextComponentMetadata
3110
+ });
3111
+ }
3112
+ if (!globalRegistry.has("Audio")) {
3113
+ globalRegistry.register({
3114
+ type: "Audio",
3115
+ component: Audio,
3116
+ propsSchema: AudioPropsSchema,
3117
+ metadata: AudioComponentMetadata
3118
+ });
3119
+ }
3120
+ }
3121
+
3122
+ // src/utils/errors.ts
3123
+ var WavesError = class _WavesError extends Error {
3124
+ constructor(message, context) {
3125
+ super(message);
3126
+ this.context = context;
3127
+ this.name = "WavesError";
3128
+ Object.setPrototypeOf(this, _WavesError.prototype);
3129
+ }
3130
+ };
3131
+ var WavesValidationError = class _WavesValidationError extends WavesError {
3132
+ constructor(message, context) {
3133
+ super(message, context);
3134
+ this.name = "WavesValidationError";
3135
+ Object.setPrototypeOf(this, _WavesValidationError.prototype);
3136
+ }
3137
+ };
3138
+ var WavesRenderError = class _WavesRenderError extends WavesError {
3139
+ constructor(message, context) {
3140
+ super(message, context);
3141
+ this.name = "WavesRenderError";
3142
+ Object.setPrototypeOf(this, _WavesRenderError.prototype);
3143
+ }
3144
+ };
3145
+
3146
+ export {
3147
+ __require,
3148
+ zodSchemaToJsonSchema,
3149
+ VideoIRv2Schema,
3150
+ VideoIRv2AuthoringSchema,
3151
+ VideoIRSchema,
3152
+ ComponentRegistry,
3153
+ globalRegistry,
3154
+ registerBuiltInComponents,
3155
+ WavesError,
3156
+ WavesValidationError,
3157
+ WavesRenderError
3158
+ };