@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.
- package/README.md +2040 -300
- package/dist/chunk-7QPNRHMW.mjs +484 -0
- package/dist/chunk-PKLHVWMD.mjs +3158 -0
- package/dist/cli.js +3212 -180
- package/dist/cli.mjs +132 -56
- package/dist/index.d.mts +27 -12
- package/dist/index.d.ts +27 -12
- package/dist/index.js +3140 -191
- package/dist/index.mjs +3 -5
- package/dist/registry-C6H9G0df.d.mts +204 -0
- package/dist/registry-C6H9G0df.d.ts +204 -0
- package/dist/remotion/index.d.mts +3 -3
- package/dist/remotion/index.d.ts +3 -3
- package/dist/remotion/index.js +2860 -106
- package/dist/remotion/index.mjs +3 -6
- package/package.json +19 -19
- package/dist/chunk-TGAL5RQN.mjs +0 -404
- package/dist/chunk-WGQITADJ.mjs +0 -284
- package/dist/registry-hVIyqwS6.d.mts +0 -355
- package/dist/registry-hVIyqwS6.d.ts +0 -355
package/dist/index.js
CHANGED
|
@@ -31,7 +31,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
ComponentRegistry: () => ComponentRegistry,
|
|
34
|
-
ComponentSchemas: () => ComponentSchemas,
|
|
35
34
|
IRValidator: () => IRValidator,
|
|
36
35
|
VideoIRSchema: () => VideoIRSchema,
|
|
37
36
|
WavesEngine: () => WavesEngine,
|
|
@@ -48,7 +47,7 @@ __export(index_exports, {
|
|
|
48
47
|
module.exports = __toCommonJS(index_exports);
|
|
49
48
|
|
|
50
49
|
// src/version.ts
|
|
51
|
-
var __wavesVersion = "0.
|
|
50
|
+
var __wavesVersion = "0.2.0";
|
|
52
51
|
|
|
53
52
|
// src/core/engine.ts
|
|
54
53
|
var import_bundler = require("@remotion/bundler");
|
|
@@ -77,12 +76,23 @@ var ComponentRegistry = class {
|
|
|
77
76
|
getTypes() {
|
|
78
77
|
return Array.from(this.components.keys());
|
|
79
78
|
}
|
|
79
|
+
getTypesForLLM(options) {
|
|
80
|
+
const includeInternal = options?.includeInternal ?? false;
|
|
81
|
+
const out = [];
|
|
82
|
+
for (const [type, reg] of this.components) {
|
|
83
|
+
if (!includeInternal && reg.metadata.internal) continue;
|
|
84
|
+
out.push(type);
|
|
85
|
+
}
|
|
86
|
+
return out;
|
|
87
|
+
}
|
|
80
88
|
has(type) {
|
|
81
89
|
return this.components.has(type);
|
|
82
90
|
}
|
|
83
|
-
getJSONSchemaForLLM() {
|
|
91
|
+
getJSONSchemaForLLM(options) {
|
|
92
|
+
const includeInternal = options?.includeInternal ?? false;
|
|
84
93
|
const schemas = {};
|
|
85
94
|
for (const [type, registration] of this.components) {
|
|
95
|
+
if (!includeInternal && registration.metadata.internal) continue;
|
|
86
96
|
schemas[type] = {
|
|
87
97
|
schema: zodSchemaToJsonSchema(registration.propsSchema),
|
|
88
98
|
metadata: registration.metadata
|
|
@@ -187,8 +197,8 @@ var WavesEngine = class {
|
|
|
187
197
|
};
|
|
188
198
|
function collectComponentTypes(ir) {
|
|
189
199
|
const types = /* @__PURE__ */ new Set();
|
|
190
|
-
for (const
|
|
191
|
-
walkComponent(
|
|
200
|
+
for (const node of ir.timeline) {
|
|
201
|
+
walkComponent(node, types);
|
|
192
202
|
}
|
|
193
203
|
return types;
|
|
194
204
|
}
|
|
@@ -263,70 +273,128 @@ var BackgroundSpecSchema = import_zod2.z.discriminatedUnion("type", [
|
|
|
263
273
|
value: AssetPathSchema
|
|
264
274
|
})
|
|
265
275
|
]);
|
|
266
|
-
var
|
|
267
|
-
id: import_zod2.z.string().
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
var TextComponentIRSchema = BaseComponentIRSchema.extend({
|
|
273
|
-
type: import_zod2.z.literal("Text"),
|
|
274
|
-
props: import_zod2.z.object({
|
|
275
|
-
content: import_zod2.z.string().min(1).max(1e3),
|
|
276
|
-
fontSize: import_zod2.z.number().int().min(12).max(200).default(48),
|
|
277
|
-
color: import_zod2.z.string().regex(/^#[0-9A-Fa-f]{6}$/).default("#FFFFFF"),
|
|
278
|
-
position: import_zod2.z.enum(["top", "center", "bottom", "left", "right"]).default("center"),
|
|
279
|
-
animation: import_zod2.z.enum(["none", "fade", "slide", "zoom"]).default("fade")
|
|
280
|
-
})
|
|
276
|
+
var VideoConfigSchema = import_zod2.z.object({
|
|
277
|
+
id: import_zod2.z.string().default("main"),
|
|
278
|
+
width: import_zod2.z.number().int().min(360).max(7680),
|
|
279
|
+
height: import_zod2.z.number().int().min(360).max(4320),
|
|
280
|
+
fps: import_zod2.z.number().int().min(1).max(120).default(30),
|
|
281
|
+
durationInFrames: import_zod2.z.number().int().positive()
|
|
281
282
|
});
|
|
282
|
-
var
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
})
|
|
283
|
+
var AudioSpecSchema = import_zod2.z.object({
|
|
284
|
+
background: AssetPathSchema.optional(),
|
|
285
|
+
volume: import_zod2.z.number().min(0).max(1).default(0.5)
|
|
286
|
+
}).optional();
|
|
287
|
+
var TransitionSpecSchema = import_zod2.z.object({
|
|
288
|
+
type: import_zod2.z.string().min(1),
|
|
289
|
+
durationInFrames: import_zod2.z.number().int().positive(),
|
|
290
|
+
props: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.unknown()).optional()
|
|
291
291
|
});
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
292
|
+
var ComponentNodeSchema = import_zod2.z.lazy(
|
|
293
|
+
() => import_zod2.z.object({
|
|
294
|
+
id: import_zod2.z.string().min(1).max(100).describe("Unique component instance ID"),
|
|
295
|
+
type: import_zod2.z.string().min(1).describe("Registered component type identifier"),
|
|
296
|
+
timing: TimingSpecSchema.optional().describe("Optional timing (frames)"),
|
|
297
|
+
props: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.unknown()).optional().describe("Component props object"),
|
|
298
|
+
metadata: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.unknown()).optional().describe("Optional metadata"),
|
|
299
|
+
children: import_zod2.z.array(ComponentNodeSchema).optional().describe("Nested children nodes")
|
|
300
|
+
})
|
|
301
|
+
);
|
|
302
|
+
var SegmentSchema = import_zod2.z.object({
|
|
303
|
+
id: import_zod2.z.string().min(1).max(100),
|
|
304
|
+
durationInFrames: import_zod2.z.number().int().positive(),
|
|
305
|
+
root: ComponentNodeSchema,
|
|
306
|
+
transitionToNext: TransitionSpecSchema.optional()
|
|
301
307
|
});
|
|
302
|
-
var
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
volume: import_zod2.z.number().min(0).max(1).default(0.5)
|
|
319
|
-
}).optional(),
|
|
320
|
-
scenes: import_zod2.z.array(SceneComponentIRSchema).min(1)
|
|
308
|
+
var VideoIRv2Schema = import_zod2.z.object({
|
|
309
|
+
version: import_zod2.z.literal("2.0").describe("IR schema version"),
|
|
310
|
+
video: VideoConfigSchema,
|
|
311
|
+
audio: AudioSpecSchema,
|
|
312
|
+
segments: import_zod2.z.array(SegmentSchema).min(1).optional(),
|
|
313
|
+
timeline: import_zod2.z.array(ComponentNodeSchema).min(1).optional()
|
|
314
|
+
}).superRefine((v, ctx) => {
|
|
315
|
+
const hasSegments = Array.isArray(v.segments);
|
|
316
|
+
const hasTimeline = Array.isArray(v.timeline);
|
|
317
|
+
if (hasSegments === hasTimeline) {
|
|
318
|
+
ctx.addIssue({
|
|
319
|
+
code: import_zod2.z.ZodIssueCode.custom,
|
|
320
|
+
message: 'Exactly one of "segments" or "timeline" must be provided',
|
|
321
|
+
path: []
|
|
322
|
+
});
|
|
323
|
+
}
|
|
321
324
|
});
|
|
322
|
-
var
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
325
|
+
var VideoIRv2AuthoringSchema = import_zod2.z.object({
|
|
326
|
+
version: import_zod2.z.literal("2.0").describe("IR schema version"),
|
|
327
|
+
video: VideoConfigSchema,
|
|
328
|
+
audio: AudioSpecSchema,
|
|
329
|
+
segments: import_zod2.z.array(SegmentSchema).min(1),
|
|
330
|
+
timeline: import_zod2.z.never().optional()
|
|
331
|
+
}).describe("Preferred authoring format: sequential segments with optional transitions");
|
|
332
|
+
var VideoIRSchema = VideoIRv2Schema;
|
|
333
|
+
|
|
334
|
+
// src/ir/migrations.ts
|
|
335
|
+
function fillNodeTiming(node, parentDurationInFrames) {
|
|
336
|
+
const timing = node.timing ?? { from: 0, durationInFrames: parentDurationInFrames };
|
|
337
|
+
const children = node.children?.map((c) => fillNodeTiming(c, timing.durationInFrames));
|
|
338
|
+
return {
|
|
339
|
+
id: node.id,
|
|
340
|
+
type: node.type,
|
|
341
|
+
timing,
|
|
342
|
+
props: node.props,
|
|
343
|
+
metadata: node.metadata,
|
|
344
|
+
children: children && children.length ? children : void 0
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
function compileToRenderGraph(v2) {
|
|
348
|
+
const parsed = VideoIRv2Schema.parse(v2);
|
|
349
|
+
if (parsed.timeline) {
|
|
350
|
+
const timeline2 = parsed.timeline.map((n) => {
|
|
351
|
+
const timing = n.timing ?? { from: 0, durationInFrames: parsed.video.durationInFrames };
|
|
352
|
+
return fillNodeTiming({ ...n, timing }, parsed.video.durationInFrames);
|
|
353
|
+
});
|
|
354
|
+
return {
|
|
355
|
+
version: "2.0",
|
|
356
|
+
video: parsed.video,
|
|
357
|
+
audio: parsed.audio,
|
|
358
|
+
timeline: timeline2
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
const segments = parsed.segments ?? [];
|
|
362
|
+
const timeline = [];
|
|
363
|
+
let start = 0;
|
|
364
|
+
let pendingEnter;
|
|
365
|
+
for (let i = 0; i < segments.length; i++) {
|
|
366
|
+
const seg = segments[i];
|
|
367
|
+
const hasNext = i < segments.length - 1;
|
|
368
|
+
const exit = hasNext ? seg.transitionToNext : void 0;
|
|
369
|
+
const enter = pendingEnter;
|
|
370
|
+
const rootFilled = fillNodeTiming(seg.root, seg.durationInFrames);
|
|
371
|
+
timeline.push({
|
|
372
|
+
id: `segment:${seg.id}`,
|
|
373
|
+
type: "Segment",
|
|
374
|
+
timing: { from: start, durationInFrames: seg.durationInFrames },
|
|
375
|
+
props: {
|
|
376
|
+
enterTransition: enter,
|
|
377
|
+
exitTransition: exit
|
|
378
|
+
},
|
|
379
|
+
children: [rootFilled]
|
|
380
|
+
});
|
|
381
|
+
pendingEnter = exit;
|
|
382
|
+
const overlap = exit?.durationInFrames ?? 0;
|
|
383
|
+
start += seg.durationInFrames - overlap;
|
|
384
|
+
}
|
|
385
|
+
return {
|
|
386
|
+
version: "2.0",
|
|
387
|
+
video: parsed.video,
|
|
388
|
+
audio: parsed.audio,
|
|
389
|
+
timeline
|
|
390
|
+
};
|
|
391
|
+
}
|
|
327
392
|
|
|
328
393
|
// src/core/validator.ts
|
|
329
394
|
var IRValidator = class {
|
|
395
|
+
constructor(registry) {
|
|
396
|
+
this.registry = registry;
|
|
397
|
+
}
|
|
330
398
|
validateSchema(ir) {
|
|
331
399
|
const result = VideoIRSchema.safeParse(ir);
|
|
332
400
|
if (!result.success) {
|
|
@@ -341,41 +409,75 @@ var IRValidator = class {
|
|
|
341
409
|
}
|
|
342
410
|
return { success: true, data: result.data };
|
|
343
411
|
}
|
|
344
|
-
validateSemantics(
|
|
412
|
+
validateSemantics(latest) {
|
|
345
413
|
const errors = [];
|
|
346
|
-
|
|
347
|
-
|
|
414
|
+
if (latest.segments) {
|
|
415
|
+
for (const [i, seg] of latest.segments.entries()) {
|
|
416
|
+
const exit = seg.transitionToNext;
|
|
417
|
+
const overlap = exit?.durationInFrames ?? 0;
|
|
418
|
+
if (exit && i === latest.segments.length - 1) {
|
|
419
|
+
errors.push({
|
|
420
|
+
path: ["segments", String(i), "transitionToNext"],
|
|
421
|
+
message: "transitionToNext is not allowed on the last segment",
|
|
422
|
+
code: "TRANSITION_ON_LAST_SEGMENT"
|
|
423
|
+
});
|
|
424
|
+
continue;
|
|
425
|
+
}
|
|
426
|
+
if (overlap > 0 && i < latest.segments.length - 1) {
|
|
427
|
+
const next = latest.segments[i + 1];
|
|
428
|
+
if (overlap > seg.durationInFrames) {
|
|
429
|
+
errors.push({
|
|
430
|
+
path: ["segments", String(i), "transitionToNext", "durationInFrames"],
|
|
431
|
+
message: `Transition overlap (${overlap}) exceeds segment duration (${seg.durationInFrames})`,
|
|
432
|
+
code: "TRANSITION_OVERLAP_TOO_LARGE"
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
if (overlap > next.durationInFrames) {
|
|
436
|
+
errors.push({
|
|
437
|
+
path: ["segments", String(i + 1), "durationInFrames"],
|
|
438
|
+
message: `Transition overlap (${overlap}) exceeds next segment duration (${next.durationInFrames})`,
|
|
439
|
+
code: "TRANSITION_OVERLAP_TOO_LARGE"
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
const compiled = compileToRenderGraph(latest);
|
|
446
|
+
const maxEnd = getMaxEnd(compiled.timeline);
|
|
447
|
+
if (maxEnd !== compiled.video.durationInFrames) {
|
|
348
448
|
errors.push({
|
|
349
|
-
path: ["
|
|
350
|
-
message: `
|
|
449
|
+
path: ["video", "durationInFrames"],
|
|
450
|
+
message: `Max timeline end (${maxEnd}) does not match video duration (${compiled.video.durationInFrames})`,
|
|
351
451
|
code: "DURATION_MISMATCH"
|
|
352
452
|
});
|
|
353
453
|
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
if (
|
|
454
|
+
for (const [i, root] of compiled.timeline.entries()) {
|
|
455
|
+
const end = root.timing.from + root.timing.durationInFrames;
|
|
456
|
+
if (root.timing.from < 0 || root.timing.durationInFrames <= 0) {
|
|
357
457
|
errors.push({
|
|
358
|
-
path: ["
|
|
359
|
-
message:
|
|
360
|
-
code: "
|
|
458
|
+
path: ["timeline", String(i), "timing"],
|
|
459
|
+
message: "Timing must have from>=0 and durationInFrames>0",
|
|
460
|
+
code: "INVALID_TIMING"
|
|
361
461
|
});
|
|
362
462
|
}
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
scene.timing.durationInFrames,
|
|
370
|
-
["scenes", String(i)],
|
|
371
|
-
errors
|
|
372
|
-
);
|
|
463
|
+
if (end > compiled.video.durationInFrames) {
|
|
464
|
+
errors.push({
|
|
465
|
+
path: ["timeline", String(i), "timing"],
|
|
466
|
+
message: `Root node exceeds video duration (${end} > ${compiled.video.durationInFrames})`,
|
|
467
|
+
code: "COMPONENT_EXCEEDS_VIDEO"
|
|
468
|
+
});
|
|
373
469
|
}
|
|
470
|
+
if (root.children?.length) {
|
|
471
|
+
this.validateComponentTimingRecursive(root.children, root.timing.durationInFrames, ["timeline", String(i)], errors);
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
if (this.registry) {
|
|
475
|
+
this.validateRegistryContracts(compiled, errors);
|
|
374
476
|
}
|
|
375
477
|
if (errors.length > 0) {
|
|
376
478
|
return { success: false, errors };
|
|
377
479
|
}
|
|
378
|
-
return { success: true };
|
|
480
|
+
return { success: true, data: compiled };
|
|
379
481
|
}
|
|
380
482
|
validate(ir) {
|
|
381
483
|
const schemaResult = this.validateSchema(ir);
|
|
@@ -386,7 +488,7 @@ var IRValidator = class {
|
|
|
386
488
|
if (!semanticsResult.success) {
|
|
387
489
|
return { success: false, errors: semanticsResult.errors ?? [] };
|
|
388
490
|
}
|
|
389
|
-
return
|
|
491
|
+
return semanticsResult;
|
|
390
492
|
}
|
|
391
493
|
validateComponentTimingRecursive(components, parentDuration, pathPrefix, errors) {
|
|
392
494
|
for (const [i, component] of components.entries()) {
|
|
@@ -398,7 +500,7 @@ var IRValidator = class {
|
|
|
398
500
|
code: "COMPONENT_EXCEEDS_PARENT"
|
|
399
501
|
});
|
|
400
502
|
}
|
|
401
|
-
if (component.
|
|
503
|
+
if (component.children && component.children.length > 0) {
|
|
402
504
|
this.validateComponentTimingRecursive(
|
|
403
505
|
component.children,
|
|
404
506
|
component.timing.durationInFrames,
|
|
@@ -408,7 +510,87 @@ var IRValidator = class {
|
|
|
408
510
|
}
|
|
409
511
|
}
|
|
410
512
|
}
|
|
513
|
+
validateRegistryContracts(compiled, errors) {
|
|
514
|
+
const registry = this.registry;
|
|
515
|
+
const stack = compiled.timeline.map((n, i) => ({
|
|
516
|
+
node: n,
|
|
517
|
+
path: ["timeline", String(i)]
|
|
518
|
+
}));
|
|
519
|
+
while (stack.length) {
|
|
520
|
+
const { node, path: path2 } = stack.pop();
|
|
521
|
+
const reg = registry.get(node.type);
|
|
522
|
+
if (!reg) {
|
|
523
|
+
errors.push({
|
|
524
|
+
path: [...path2, "type"],
|
|
525
|
+
message: `Unknown component type: ${node.type}`,
|
|
526
|
+
code: "UNKNOWN_COMPONENT_TYPE"
|
|
527
|
+
});
|
|
528
|
+
continue;
|
|
529
|
+
}
|
|
530
|
+
const rawProps = node.props ?? {};
|
|
531
|
+
if (rawProps === null || typeof rawProps !== "object") {
|
|
532
|
+
errors.push({
|
|
533
|
+
path: [...path2, "props"],
|
|
534
|
+
message: "Component props must be an object",
|
|
535
|
+
code: "PROPS_NOT_OBJECT"
|
|
536
|
+
});
|
|
537
|
+
} else {
|
|
538
|
+
const propsValidation = registry.validateProps(node.type, rawProps);
|
|
539
|
+
if (!propsValidation.success) {
|
|
540
|
+
for (const issue of propsValidation.error.issues) {
|
|
541
|
+
errors.push({
|
|
542
|
+
path: [...path2, "props", ...issue.path.map((p) => String(p))],
|
|
543
|
+
message: issue.message,
|
|
544
|
+
code: "PROPS_INVALID"
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
} else {
|
|
548
|
+
node.props = propsValidation.data;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
const childCount = node.children?.length ?? 0;
|
|
552
|
+
const meta = reg.metadata;
|
|
553
|
+
const acceptsChildren = Boolean(meta.acceptsChildren);
|
|
554
|
+
if (childCount > 0 && !acceptsChildren) {
|
|
555
|
+
errors.push({
|
|
556
|
+
path: [...path2, "children"],
|
|
557
|
+
message: `Component type "${node.type}" does not accept children`,
|
|
558
|
+
code: "CHILDREN_NOT_ALLOWED"
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
if (typeof meta.minChildren === "number" && childCount < meta.minChildren) {
|
|
562
|
+
errors.push({
|
|
563
|
+
path: [...path2, "children"],
|
|
564
|
+
message: `Component requires at least ${meta.minChildren} children`,
|
|
565
|
+
code: "TOO_FEW_CHILDREN"
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
if (typeof meta.maxChildren === "number" && childCount > meta.maxChildren) {
|
|
569
|
+
errors.push({
|
|
570
|
+
path: [...path2, "children"],
|
|
571
|
+
message: `Component allows at most ${meta.maxChildren} children`,
|
|
572
|
+
code: "TOO_MANY_CHILDREN"
|
|
573
|
+
});
|
|
574
|
+
}
|
|
575
|
+
if (node.children?.length) {
|
|
576
|
+
for (let i = 0; i < node.children.length; i++) {
|
|
577
|
+
stack.push({ node: node.children[i], path: [...path2, "children", String(i)] });
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
}
|
|
411
582
|
};
|
|
583
|
+
function getMaxEnd(nodes) {
|
|
584
|
+
let max = 0;
|
|
585
|
+
const stack = [...nodes];
|
|
586
|
+
while (stack.length) {
|
|
587
|
+
const n = stack.pop();
|
|
588
|
+
const end = n.timing.from + n.timing.durationInFrames;
|
|
589
|
+
if (end > max) max = end;
|
|
590
|
+
if (n.children?.length) stack.push(...n.children);
|
|
591
|
+
}
|
|
592
|
+
return max;
|
|
593
|
+
}
|
|
412
594
|
|
|
413
595
|
// src/components/primitives/Audio.tsx
|
|
414
596
|
var import_remotion = require("remotion");
|
|
@@ -464,55 +646,432 @@ var Audio = ({
|
|
|
464
646
|
);
|
|
465
647
|
};
|
|
466
648
|
var AudioComponentMetadata = {
|
|
467
|
-
|
|
649
|
+
kind: "primitive",
|
|
650
|
+
category: "media",
|
|
468
651
|
description: "Plays an audio file with optional trimming and fade in/out",
|
|
469
652
|
llmGuidance: "Use for background music or sound effects. Prefer short clips for SFX. Use fadeIn/fadeOut (in frames) for smoother audio starts/ends."
|
|
470
653
|
};
|
|
471
654
|
|
|
472
|
-
// src/components/primitives/
|
|
473
|
-
var import_remotion2 = require("remotion");
|
|
655
|
+
// src/components/primitives/Box.tsx
|
|
474
656
|
var import_zod4 = require("zod");
|
|
475
657
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
476
|
-
var
|
|
658
|
+
var BoxPropsSchema = import_zod4.z.object({
|
|
659
|
+
x: import_zod4.z.number().default(0).describe("Left offset in pixels"),
|
|
660
|
+
y: import_zod4.z.number().default(0).describe("Top offset in pixels"),
|
|
661
|
+
width: import_zod4.z.number().positive().optional().describe("Width in pixels (omit for auto)"),
|
|
662
|
+
height: import_zod4.z.number().positive().optional().describe("Height in pixels (omit for auto)"),
|
|
663
|
+
padding: import_zod4.z.number().min(0).default(0).describe("Padding in pixels"),
|
|
664
|
+
backgroundColor: import_zod4.z.string().optional().describe("CSS color (e.g. #RRGGBB)"),
|
|
665
|
+
borderRadius: import_zod4.z.number().min(0).default(0).describe("Border radius in pixels"),
|
|
666
|
+
opacity: import_zod4.z.number().min(0).max(1).default(1).describe("Opacity 0..1")
|
|
667
|
+
});
|
|
668
|
+
var Box = ({
|
|
669
|
+
x,
|
|
670
|
+
y,
|
|
671
|
+
width,
|
|
672
|
+
height,
|
|
673
|
+
padding,
|
|
674
|
+
backgroundColor,
|
|
675
|
+
borderRadius,
|
|
676
|
+
opacity,
|
|
677
|
+
children
|
|
678
|
+
}) => {
|
|
679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
680
|
+
"div",
|
|
681
|
+
{
|
|
682
|
+
style: {
|
|
683
|
+
position: "absolute",
|
|
684
|
+
left: x,
|
|
685
|
+
top: y,
|
|
686
|
+
width,
|
|
687
|
+
height,
|
|
688
|
+
padding,
|
|
689
|
+
backgroundColor,
|
|
690
|
+
borderRadius,
|
|
691
|
+
opacity,
|
|
692
|
+
boxSizing: "border-box"
|
|
693
|
+
},
|
|
694
|
+
children
|
|
695
|
+
}
|
|
696
|
+
);
|
|
697
|
+
};
|
|
698
|
+
var BoxComponentMetadata = {
|
|
699
|
+
kind: "primitive",
|
|
700
|
+
category: "layout",
|
|
701
|
+
acceptsChildren: true,
|
|
702
|
+
description: "Positioned container box for layout and backgrounds",
|
|
703
|
+
llmGuidance: "Use Box to position content by x/y and optionally constrain width/height. Prefer Box+Stack/Grid for layouts."
|
|
704
|
+
};
|
|
705
|
+
|
|
706
|
+
// src/components/primitives/Grid.tsx
|
|
707
|
+
var import_remotion2 = require("remotion");
|
|
708
|
+
var import_zod5 = require("zod");
|
|
709
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
710
|
+
var GridPropsSchema = import_zod5.z.object({
|
|
711
|
+
columns: import_zod5.z.number().int().min(1).max(12).default(2),
|
|
712
|
+
rows: import_zod5.z.number().int().min(1).max(12).default(1),
|
|
713
|
+
gap: import_zod5.z.number().min(0).default(24),
|
|
714
|
+
padding: import_zod5.z.number().min(0).default(0),
|
|
715
|
+
align: import_zod5.z.enum(["start", "center", "end", "stretch"]).default("stretch"),
|
|
716
|
+
justify: import_zod5.z.enum(["start", "center", "end", "stretch"]).default("stretch")
|
|
717
|
+
});
|
|
718
|
+
var mapAlign = (a) => {
|
|
719
|
+
if (a === "start") return "start";
|
|
720
|
+
if (a === "end") return "end";
|
|
721
|
+
if (a === "center") return "center";
|
|
722
|
+
return "stretch";
|
|
723
|
+
};
|
|
724
|
+
var mapJustify = (j) => {
|
|
725
|
+
if (j === "start") return "start";
|
|
726
|
+
if (j === "end") return "end";
|
|
727
|
+
if (j === "center") return "center";
|
|
728
|
+
return "stretch";
|
|
729
|
+
};
|
|
730
|
+
var Grid = ({ columns, rows, gap, padding, align, justify, children }) => {
|
|
731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
732
|
+
import_remotion2.AbsoluteFill,
|
|
733
|
+
{
|
|
734
|
+
style: {
|
|
735
|
+
display: "grid",
|
|
736
|
+
gridTemplateColumns: `repeat(${columns}, 1fr)`,
|
|
737
|
+
gridTemplateRows: `repeat(${rows}, 1fr)`,
|
|
738
|
+
gap,
|
|
739
|
+
padding,
|
|
740
|
+
alignItems: mapAlign(align),
|
|
741
|
+
justifyItems: mapJustify(justify),
|
|
742
|
+
boxSizing: "border-box"
|
|
743
|
+
},
|
|
744
|
+
children
|
|
745
|
+
}
|
|
746
|
+
);
|
|
747
|
+
};
|
|
748
|
+
var GridComponentMetadata = {
|
|
749
|
+
kind: "primitive",
|
|
750
|
+
category: "layout",
|
|
751
|
+
acceptsChildren: true,
|
|
752
|
+
description: "Grid layout container with configurable rows/columns",
|
|
753
|
+
llmGuidance: "Use Grid for photo collages and dashboards. Provide exactly rows*columns children when possible."
|
|
754
|
+
};
|
|
755
|
+
|
|
756
|
+
// src/components/primitives/Image.tsx
|
|
757
|
+
var import_remotion3 = require("remotion");
|
|
758
|
+
var import_zod6 = require("zod");
|
|
759
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
760
|
+
var ImagePropsSchema = import_zod6.z.object({
|
|
761
|
+
src: import_zod6.z.string().min(1),
|
|
762
|
+
fit: import_zod6.z.enum(["cover", "contain"]).default("cover"),
|
|
763
|
+
borderRadius: import_zod6.z.number().min(0).default(0),
|
|
764
|
+
opacity: import_zod6.z.number().min(0).max(1).default(1)
|
|
765
|
+
});
|
|
766
|
+
var resolveAsset = (value) => isRemoteAssetPath(value) ? value : (0, import_remotion3.staticFile)(staticFileInputFromAssetPath(value));
|
|
767
|
+
var Image = ({ src, fit, borderRadius, opacity }) => {
|
|
768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_remotion3.AbsoluteFill, { style: { opacity }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
769
|
+
import_remotion3.Img,
|
|
770
|
+
{
|
|
771
|
+
src: resolveAsset(src),
|
|
772
|
+
style: { width: "100%", height: "100%", objectFit: fit, borderRadius }
|
|
773
|
+
}
|
|
774
|
+
) });
|
|
775
|
+
};
|
|
776
|
+
var ImageComponentMetadata = {
|
|
777
|
+
kind: "primitive",
|
|
778
|
+
category: "image",
|
|
779
|
+
description: "Full-frame image with object-fit options",
|
|
780
|
+
llmGuidance: 'Use Image for pictures and backgrounds. Use fit="cover" for full-bleed, fit="contain" to avoid cropping.'
|
|
781
|
+
};
|
|
782
|
+
|
|
783
|
+
// src/components/primitives/Scene.tsx
|
|
784
|
+
var import_remotion4 = require("remotion");
|
|
785
|
+
var import_zod7 = require("zod");
|
|
786
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
787
|
+
var ScenePropsSchema = import_zod7.z.object({
|
|
477
788
|
background: BackgroundSpecSchema
|
|
478
789
|
});
|
|
479
|
-
var
|
|
480
|
-
return isRemoteAssetPath(value) ? value : (0,
|
|
790
|
+
var resolveAsset2 = (value) => {
|
|
791
|
+
return isRemoteAssetPath(value) ? value : (0, import_remotion4.staticFile)(staticFileInputFromAssetPath(value));
|
|
481
792
|
};
|
|
482
793
|
var Scene = ({ background, children }) => {
|
|
483
|
-
return /* @__PURE__ */ (0,
|
|
484
|
-
background.type === "color" ? /* @__PURE__ */ (0,
|
|
485
|
-
|
|
794
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_remotion4.AbsoluteFill, { children: [
|
|
795
|
+
background.type === "color" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_remotion4.AbsoluteFill, { style: { backgroundColor: background.value } }) : background.type === "image" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
796
|
+
import_remotion4.Img,
|
|
486
797
|
{
|
|
487
|
-
src:
|
|
798
|
+
src: resolveAsset2(background.value),
|
|
488
799
|
style: { width: "100%", height: "100%", objectFit: "cover" }
|
|
489
800
|
}
|
|
490
|
-
) : /* @__PURE__ */ (0,
|
|
491
|
-
|
|
801
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
802
|
+
import_remotion4.Video,
|
|
492
803
|
{
|
|
493
|
-
src:
|
|
804
|
+
src: resolveAsset2(background.value),
|
|
494
805
|
style: { width: "100%", height: "100%", objectFit: "cover" }
|
|
495
806
|
}
|
|
496
807
|
),
|
|
497
|
-
/* @__PURE__ */ (0,
|
|
808
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_remotion4.AbsoluteFill, { children })
|
|
498
809
|
] });
|
|
499
810
|
};
|
|
500
811
|
var SceneComponentMetadata = {
|
|
501
|
-
|
|
812
|
+
kind: "primitive",
|
|
813
|
+
category: "layout",
|
|
814
|
+
acceptsChildren: true,
|
|
502
815
|
description: "Scene container with a background and nested children",
|
|
503
816
|
llmGuidance: "Use Scene to define a segment of the video. Scene timings must be sequential with no gaps. Put Text and Audio as children."
|
|
504
817
|
};
|
|
505
818
|
|
|
819
|
+
// src/components/primitives/Segment.tsx
|
|
820
|
+
var import_remotion5 = require("remotion");
|
|
821
|
+
var import_zod8 = require("zod");
|
|
822
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
823
|
+
var TransitionPropsSchema = import_zod8.z.object({
|
|
824
|
+
type: import_zod8.z.string().min(1),
|
|
825
|
+
durationInFrames: import_zod8.z.number().int().positive(),
|
|
826
|
+
props: import_zod8.z.record(import_zod8.z.string(), import_zod8.z.unknown()).optional()
|
|
827
|
+
});
|
|
828
|
+
var SegmentPropsSchema = import_zod8.z.object({
|
|
829
|
+
enterTransition: TransitionPropsSchema.optional(),
|
|
830
|
+
exitTransition: TransitionPropsSchema.optional()
|
|
831
|
+
});
|
|
832
|
+
function getSlideOptions(raw) {
|
|
833
|
+
const parsed = import_zod8.z.object({
|
|
834
|
+
direction: import_zod8.z.enum(["left", "right", "up", "down"]).default("left"),
|
|
835
|
+
distance: import_zod8.z.number().int().min(1).max(2e3).default(80)
|
|
836
|
+
}).safeParse(raw ?? {});
|
|
837
|
+
if (parsed.success) return parsed.data;
|
|
838
|
+
return { direction: "left", distance: 80 };
|
|
839
|
+
}
|
|
840
|
+
function getZoomOptions(raw) {
|
|
841
|
+
const parsed = import_zod8.z.object({
|
|
842
|
+
type: import_zod8.z.enum(["zoomIn", "zoomOut"]).default("zoomIn")
|
|
843
|
+
}).safeParse(raw ?? {});
|
|
844
|
+
if (parsed.success) return parsed.data;
|
|
845
|
+
return { type: "zoomIn" };
|
|
846
|
+
}
|
|
847
|
+
function getWipeOptions(raw) {
|
|
848
|
+
const parsed = import_zod8.z.object({
|
|
849
|
+
direction: import_zod8.z.enum(["left", "right", "up", "down", "diagonal"]).default("right"),
|
|
850
|
+
softEdge: import_zod8.z.boolean().default(false)
|
|
851
|
+
}).safeParse(raw ?? {});
|
|
852
|
+
if (parsed.success) return parsed.data;
|
|
853
|
+
return { direction: "right", softEdge: false };
|
|
854
|
+
}
|
|
855
|
+
function clipFor(direction, p) {
|
|
856
|
+
if (direction === "left") return `inset(0 ${100 * (1 - p)}% 0 0)`;
|
|
857
|
+
if (direction === "right") return `inset(0 0 0 ${100 * (1 - p)}%)`;
|
|
858
|
+
if (direction === "up") return `inset(0 0 ${100 * (1 - p)}% 0)`;
|
|
859
|
+
if (direction === "down") return `inset(${100 * (1 - p)}% 0 0 0)`;
|
|
860
|
+
return `polygon(0 0, ${100 * p}% 0, 0 ${100 * p}%)`;
|
|
861
|
+
}
|
|
862
|
+
function getCircularOptions(raw) {
|
|
863
|
+
const parsed = import_zod8.z.object({
|
|
864
|
+
direction: import_zod8.z.enum(["open", "close"]).default("open"),
|
|
865
|
+
center: import_zod8.z.object({
|
|
866
|
+
x: import_zod8.z.number().min(0).max(1).default(0.5),
|
|
867
|
+
y: import_zod8.z.number().min(0).max(1).default(0.5)
|
|
868
|
+
}).default({ x: 0.5, y: 0.5 })
|
|
869
|
+
}).safeParse(raw ?? {});
|
|
870
|
+
if (parsed.success) return parsed.data;
|
|
871
|
+
return { direction: "open", center: { x: 0.5, y: 0.5 } };
|
|
872
|
+
}
|
|
873
|
+
var Segment = ({ enterTransition, exitTransition, children, __wavesDurationInFrames }) => {
|
|
874
|
+
const frame = (0, import_remotion5.useCurrentFrame)();
|
|
875
|
+
const durationInFrames = __wavesDurationInFrames ?? 0;
|
|
876
|
+
let opacity = 1;
|
|
877
|
+
let translateX = 0;
|
|
878
|
+
let translateY = 0;
|
|
879
|
+
let scale = 1;
|
|
880
|
+
let clipPath;
|
|
881
|
+
let filter;
|
|
882
|
+
if (enterTransition) {
|
|
883
|
+
const d = enterTransition.durationInFrames;
|
|
884
|
+
if (enterTransition.type === "FadeTransition") {
|
|
885
|
+
opacity *= (0, import_remotion5.interpolate)(frame, [0, d], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
886
|
+
}
|
|
887
|
+
if (enterTransition.type === "SlideTransition") {
|
|
888
|
+
const opts = getSlideOptions(enterTransition.props);
|
|
889
|
+
const t = (0, import_remotion5.interpolate)(frame, [0, d], [1, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
890
|
+
const delta = opts.distance * t;
|
|
891
|
+
if (opts.direction === "left") translateX += -delta;
|
|
892
|
+
if (opts.direction === "right") translateX += delta;
|
|
893
|
+
if (opts.direction === "up") translateY += -delta;
|
|
894
|
+
if (opts.direction === "down") translateY += delta;
|
|
895
|
+
opacity *= (0, import_remotion5.interpolate)(frame, [0, d], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
896
|
+
}
|
|
897
|
+
if (enterTransition.type === "ZoomTransition") {
|
|
898
|
+
const opts = getZoomOptions(enterTransition.props);
|
|
899
|
+
const fromScale = opts.type === "zoomIn" ? 1.2 : 0.85;
|
|
900
|
+
const t = (0, import_remotion5.interpolate)(frame, [0, d], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
901
|
+
scale *= fromScale + (1 - fromScale) * t;
|
|
902
|
+
opacity *= t;
|
|
903
|
+
}
|
|
904
|
+
if (enterTransition.type === "WipeTransition") {
|
|
905
|
+
const opts = getWipeOptions(enterTransition.props);
|
|
906
|
+
const t = (0, import_remotion5.interpolate)(frame, [0, d], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
907
|
+
clipPath = clipFor(opts.direction, t);
|
|
908
|
+
filter = opts.softEdge ? "blur(0.4px)" : void 0;
|
|
909
|
+
}
|
|
910
|
+
if (enterTransition.type === "CircularReveal") {
|
|
911
|
+
const opts = getCircularOptions(enterTransition.props);
|
|
912
|
+
const open = opts.direction === "open";
|
|
913
|
+
const t = (0, import_remotion5.interpolate)(frame, [0, d], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
914
|
+
const radiusPct = open ? 150 * t : 150 * (1 - t);
|
|
915
|
+
clipPath = `circle(${radiusPct}% at ${Math.round(opts.center.x * 100)}% ${Math.round(opts.center.y * 100)}%)`;
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
if (exitTransition && durationInFrames > 0) {
|
|
919
|
+
const d = exitTransition.durationInFrames;
|
|
920
|
+
const start = Math.max(0, durationInFrames - d);
|
|
921
|
+
if (exitTransition.type === "FadeTransition") {
|
|
922
|
+
opacity *= (0, import_remotion5.interpolate)(frame, [start, durationInFrames], [1, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
923
|
+
}
|
|
924
|
+
if (exitTransition.type === "SlideTransition") {
|
|
925
|
+
const opts = getSlideOptions(exitTransition.props);
|
|
926
|
+
const t = (0, import_remotion5.interpolate)(frame, [start, durationInFrames], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
927
|
+
const delta = opts.distance * t;
|
|
928
|
+
if (opts.direction === "left") translateX += delta;
|
|
929
|
+
if (opts.direction === "right") translateX += -delta;
|
|
930
|
+
if (opts.direction === "up") translateY += delta;
|
|
931
|
+
if (opts.direction === "down") translateY += -delta;
|
|
932
|
+
opacity *= (0, import_remotion5.interpolate)(frame, [start, durationInFrames], [1, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
933
|
+
}
|
|
934
|
+
if (exitTransition.type === "ZoomTransition") {
|
|
935
|
+
const opts = getZoomOptions(exitTransition.props);
|
|
936
|
+
const toScale = opts.type === "zoomIn" ? 1.25 : 0.75;
|
|
937
|
+
const t = (0, import_remotion5.interpolate)(frame, [start, durationInFrames], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
938
|
+
scale *= 1 + (toScale - 1) * t;
|
|
939
|
+
opacity *= 1 - t;
|
|
940
|
+
}
|
|
941
|
+
if (exitTransition.type === "WipeTransition") {
|
|
942
|
+
const opts = getWipeOptions(exitTransition.props);
|
|
943
|
+
const t = (0, import_remotion5.interpolate)(frame, [start, durationInFrames], [1, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
944
|
+
clipPath = clipFor(opts.direction, t);
|
|
945
|
+
filter = opts.softEdge ? "blur(0.4px)" : void 0;
|
|
946
|
+
}
|
|
947
|
+
if (exitTransition.type === "CircularReveal") {
|
|
948
|
+
const opts = getCircularOptions(exitTransition.props);
|
|
949
|
+
const open = opts.direction === "open";
|
|
950
|
+
const t = (0, import_remotion5.interpolate)(frame, [start, durationInFrames], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
951
|
+
const radiusPct = open ? 150 * (1 - t) : 150 * t;
|
|
952
|
+
clipPath = `circle(${radiusPct}% at ${Math.round(opts.center.x * 100)}% ${Math.round(opts.center.y * 100)}%)`;
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
const transform = `translate(${translateX}px, ${translateY}px) scale(${scale})`;
|
|
956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_remotion5.AbsoluteFill, { style: { opacity, transform, clipPath, filter }, children });
|
|
957
|
+
};
|
|
958
|
+
var SegmentComponentMetadata = {
|
|
959
|
+
kind: "primitive",
|
|
960
|
+
category: "layout",
|
|
961
|
+
internal: true,
|
|
962
|
+
acceptsChildren: true,
|
|
963
|
+
minChildren: 1,
|
|
964
|
+
maxChildren: 1,
|
|
965
|
+
description: "Internal segment wrapper (used by v2 segments compiler)"
|
|
966
|
+
};
|
|
967
|
+
|
|
968
|
+
// src/components/primitives/Shape.tsx
|
|
969
|
+
var import_zod9 = require("zod");
|
|
970
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
971
|
+
var ShapePropsSchema = import_zod9.z.object({
|
|
972
|
+
shape: import_zod9.z.enum(["rect", "circle"]).default("rect"),
|
|
973
|
+
x: import_zod9.z.number().default(0),
|
|
974
|
+
y: import_zod9.z.number().default(0),
|
|
975
|
+
width: import_zod9.z.number().positive().default(100),
|
|
976
|
+
height: import_zod9.z.number().positive().default(100),
|
|
977
|
+
fill: import_zod9.z.string().default("#FFFFFF"),
|
|
978
|
+
strokeColor: import_zod9.z.string().optional(),
|
|
979
|
+
strokeWidth: import_zod9.z.number().min(0).default(0),
|
|
980
|
+
opacity: import_zod9.z.number().min(0).max(1).default(1)
|
|
981
|
+
});
|
|
982
|
+
var Shape = ({
|
|
983
|
+
shape,
|
|
984
|
+
x,
|
|
985
|
+
y,
|
|
986
|
+
width,
|
|
987
|
+
height,
|
|
988
|
+
fill,
|
|
989
|
+
strokeColor,
|
|
990
|
+
strokeWidth,
|
|
991
|
+
opacity
|
|
992
|
+
}) => {
|
|
993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
994
|
+
"div",
|
|
995
|
+
{
|
|
996
|
+
style: {
|
|
997
|
+
position: "absolute",
|
|
998
|
+
left: x,
|
|
999
|
+
top: y,
|
|
1000
|
+
width,
|
|
1001
|
+
height,
|
|
1002
|
+
backgroundColor: fill,
|
|
1003
|
+
borderRadius: shape === "circle" ? 9999 : 0,
|
|
1004
|
+
border: strokeWidth > 0 ? `${strokeWidth}px solid ${strokeColor ?? fill}` : void 0,
|
|
1005
|
+
opacity
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
);
|
|
1009
|
+
};
|
|
1010
|
+
var ShapeComponentMetadata = {
|
|
1011
|
+
kind: "primitive",
|
|
1012
|
+
category: "layout",
|
|
1013
|
+
description: "Simple rect/circle shape for UI accents",
|
|
1014
|
+
llmGuidance: "Use Shape for lines, badges, and simple UI blocks. Use circle for dots and rings."
|
|
1015
|
+
};
|
|
1016
|
+
|
|
1017
|
+
// src/components/primitives/Stack.tsx
|
|
1018
|
+
var import_remotion6 = require("remotion");
|
|
1019
|
+
var import_zod10 = require("zod");
|
|
1020
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1021
|
+
var StackPropsSchema = import_zod10.z.object({
|
|
1022
|
+
direction: import_zod10.z.enum(["row", "column"]).default("column"),
|
|
1023
|
+
gap: import_zod10.z.number().min(0).default(24),
|
|
1024
|
+
padding: import_zod10.z.number().min(0).default(0),
|
|
1025
|
+
align: import_zod10.z.enum(["start", "center", "end", "stretch"]).default("center"),
|
|
1026
|
+
justify: import_zod10.z.enum(["start", "center", "end", "between"]).default("center")
|
|
1027
|
+
});
|
|
1028
|
+
var mapAlign2 = (a) => {
|
|
1029
|
+
if (a === "start") return "flex-start";
|
|
1030
|
+
if (a === "end") return "flex-end";
|
|
1031
|
+
if (a === "stretch") return "stretch";
|
|
1032
|
+
return "center";
|
|
1033
|
+
};
|
|
1034
|
+
var mapJustify2 = (j) => {
|
|
1035
|
+
if (j === "start") return "flex-start";
|
|
1036
|
+
if (j === "end") return "flex-end";
|
|
1037
|
+
if (j === "between") return "space-between";
|
|
1038
|
+
return "center";
|
|
1039
|
+
};
|
|
1040
|
+
var Stack = ({ direction, gap, padding, align, justify, children }) => {
|
|
1041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1042
|
+
import_remotion6.AbsoluteFill,
|
|
1043
|
+
{
|
|
1044
|
+
style: {
|
|
1045
|
+
display: "flex",
|
|
1046
|
+
flexDirection: direction,
|
|
1047
|
+
gap,
|
|
1048
|
+
padding,
|
|
1049
|
+
alignItems: mapAlign2(align),
|
|
1050
|
+
justifyContent: mapJustify2(justify),
|
|
1051
|
+
boxSizing: "border-box"
|
|
1052
|
+
},
|
|
1053
|
+
children
|
|
1054
|
+
}
|
|
1055
|
+
);
|
|
1056
|
+
};
|
|
1057
|
+
var StackComponentMetadata = {
|
|
1058
|
+
kind: "primitive",
|
|
1059
|
+
category: "layout",
|
|
1060
|
+
acceptsChildren: true,
|
|
1061
|
+
description: "Flexbox stack layout (row/column) with gap and alignment",
|
|
1062
|
+
llmGuidance: "Use Stack to arrange child components in a row or column without manual positioning."
|
|
1063
|
+
};
|
|
1064
|
+
|
|
506
1065
|
// src/components/primitives/Text.tsx
|
|
507
|
-
var
|
|
508
|
-
var
|
|
509
|
-
var
|
|
510
|
-
var TextPropsSchema =
|
|
511
|
-
content:
|
|
512
|
-
fontSize:
|
|
513
|
-
color:
|
|
514
|
-
position:
|
|
515
|
-
animation:
|
|
1066
|
+
var import_remotion7 = require("remotion");
|
|
1067
|
+
var import_zod11 = require("zod");
|
|
1068
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1069
|
+
var TextPropsSchema = import_zod11.z.object({
|
|
1070
|
+
content: import_zod11.z.string(),
|
|
1071
|
+
fontSize: import_zod11.z.number().default(48),
|
|
1072
|
+
color: import_zod11.z.string().default("#FFFFFF"),
|
|
1073
|
+
position: import_zod11.z.enum(["top", "center", "bottom", "left", "right"]).default("center"),
|
|
1074
|
+
animation: import_zod11.z.enum(["none", "fade", "slide", "zoom"]).default("fade")
|
|
516
1075
|
});
|
|
517
1076
|
var getPositionStyles = (position) => {
|
|
518
1077
|
const base = {
|
|
@@ -537,29 +1096,29 @@ var getAnimationStyle = (frame, animation) => {
|
|
|
537
1096
|
const animDuration = 30;
|
|
538
1097
|
switch (animation) {
|
|
539
1098
|
case "fade": {
|
|
540
|
-
const opacity = (0,
|
|
1099
|
+
const opacity = (0, import_remotion7.interpolate)(frame, [0, animDuration], [0, 1], {
|
|
541
1100
|
extrapolateLeft: "clamp",
|
|
542
1101
|
extrapolateRight: "clamp"
|
|
543
1102
|
});
|
|
544
1103
|
return { opacity };
|
|
545
1104
|
}
|
|
546
1105
|
case "slide": {
|
|
547
|
-
const translateY = (0,
|
|
1106
|
+
const translateY = (0, import_remotion7.interpolate)(frame, [0, animDuration], [50, 0], {
|
|
548
1107
|
extrapolateLeft: "clamp",
|
|
549
1108
|
extrapolateRight: "clamp"
|
|
550
1109
|
});
|
|
551
|
-
const opacity = (0,
|
|
1110
|
+
const opacity = (0, import_remotion7.interpolate)(frame, [0, animDuration], [0, 1], {
|
|
552
1111
|
extrapolateLeft: "clamp",
|
|
553
1112
|
extrapolateRight: "clamp"
|
|
554
1113
|
});
|
|
555
1114
|
return { transform: `translateY(${translateY}px)`, opacity };
|
|
556
1115
|
}
|
|
557
1116
|
case "zoom": {
|
|
558
|
-
const scale = (0,
|
|
1117
|
+
const scale = (0, import_remotion7.interpolate)(frame, [0, animDuration], [0.8, 1], {
|
|
559
1118
|
extrapolateLeft: "clamp",
|
|
560
1119
|
extrapolateRight: "clamp"
|
|
561
1120
|
});
|
|
562
|
-
const opacity = (0,
|
|
1121
|
+
const opacity = (0, import_remotion7.interpolate)(frame, [0, animDuration], [0, 1], {
|
|
563
1122
|
extrapolateLeft: "clamp",
|
|
564
1123
|
extrapolateRight: "clamp"
|
|
565
1124
|
});
|
|
@@ -570,10 +1129,10 @@ var getAnimationStyle = (frame, animation) => {
|
|
|
570
1129
|
}
|
|
571
1130
|
};
|
|
572
1131
|
var Text = ({ content, fontSize, color, position, animation }) => {
|
|
573
|
-
const frame = (0,
|
|
574
|
-
const
|
|
1132
|
+
const frame = (0, import_remotion7.useCurrentFrame)();
|
|
1133
|
+
const positionStyles6 = getPositionStyles(position);
|
|
575
1134
|
const animationStyles = getAnimationStyle(frame, animation);
|
|
576
|
-
return /* @__PURE__ */ (0,
|
|
1135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_remotion7.AbsoluteFill, { style: positionStyles6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
577
1136
|
"div",
|
|
578
1137
|
{
|
|
579
1138
|
style: {
|
|
@@ -588,7 +1147,8 @@ var Text = ({ content, fontSize, color, position, animation }) => {
|
|
|
588
1147
|
) });
|
|
589
1148
|
};
|
|
590
1149
|
var TextComponentMetadata = {
|
|
591
|
-
|
|
1150
|
+
kind: "primitive",
|
|
1151
|
+
category: "text",
|
|
592
1152
|
description: "Displays animated text with positioning and animation options",
|
|
593
1153
|
llmGuidance: 'Use for titles, subtitles, captions. Keep content under 100 characters for readability. Position "center" works best for titles.',
|
|
594
1154
|
examples: [
|
|
@@ -609,89 +1169,2479 @@ var TextComponentMetadata = {
|
|
|
609
1169
|
]
|
|
610
1170
|
};
|
|
611
1171
|
|
|
612
|
-
// src/components/
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
1172
|
+
// src/components/primitives/Video.tsx
|
|
1173
|
+
var import_remotion8 = require("remotion");
|
|
1174
|
+
var import_zod12 = require("zod");
|
|
1175
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1176
|
+
var VideoPropsSchema = import_zod12.z.object({
|
|
1177
|
+
src: import_zod12.z.string().min(1),
|
|
1178
|
+
fit: import_zod12.z.enum(["cover", "contain"]).default("cover"),
|
|
1179
|
+
borderRadius: import_zod12.z.number().min(0).default(0),
|
|
1180
|
+
opacity: import_zod12.z.number().min(0).max(1).default(1),
|
|
1181
|
+
muted: import_zod12.z.boolean().default(true)
|
|
1182
|
+
});
|
|
1183
|
+
var resolveAsset3 = (value) => isRemoteAssetPath(value) ? value : (0, import_remotion8.staticFile)(staticFileInputFromAssetPath(value));
|
|
1184
|
+
var Video2 = ({ src, fit, borderRadius, opacity, muted }) => {
|
|
1185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_remotion8.AbsoluteFill, { style: { opacity }, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1186
|
+
import_remotion8.Video,
|
|
1187
|
+
{
|
|
1188
|
+
src: resolveAsset3(src),
|
|
1189
|
+
muted,
|
|
1190
|
+
style: { width: "100%", height: "100%", objectFit: fit, borderRadius }
|
|
1191
|
+
}
|
|
1192
|
+
) });
|
|
1193
|
+
};
|
|
1194
|
+
var VideoComponentMetadata = {
|
|
1195
|
+
kind: "primitive",
|
|
1196
|
+
category: "media",
|
|
1197
|
+
description: "Full-frame video with object-fit options",
|
|
1198
|
+
llmGuidance: "Use Video for B-roll. Keep videos short and muted unless you intentionally want audio."
|
|
1199
|
+
};
|
|
1200
|
+
|
|
1201
|
+
// src/components/composites/AnimatedCounter.tsx
|
|
1202
|
+
var import_remotion9 = require("remotion");
|
|
1203
|
+
var import_zod13 = require("zod");
|
|
1204
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1205
|
+
var AnimatedCounterPropsSchema = import_zod13.z.object({
|
|
1206
|
+
from: import_zod13.z.number().default(0),
|
|
1207
|
+
to: import_zod13.z.number().default(100),
|
|
1208
|
+
fontSize: import_zod13.z.number().min(8).max(300).default(96),
|
|
1209
|
+
color: import_zod13.z.string().default("#FFFFFF"),
|
|
1210
|
+
fontFamily: import_zod13.z.string().default("Inter"),
|
|
1211
|
+
fontWeight: import_zod13.z.number().int().min(100).max(900).default(700),
|
|
1212
|
+
icon: import_zod13.z.string().optional(),
|
|
1213
|
+
suffix: import_zod13.z.string().optional(),
|
|
1214
|
+
animationType: import_zod13.z.enum(["spring", "linear"]).default("spring")
|
|
1215
|
+
});
|
|
1216
|
+
var AnimatedCounter = ({
|
|
1217
|
+
from,
|
|
1218
|
+
to,
|
|
1219
|
+
fontSize,
|
|
1220
|
+
color,
|
|
1221
|
+
fontFamily,
|
|
1222
|
+
fontWeight,
|
|
1223
|
+
icon,
|
|
1224
|
+
suffix,
|
|
1225
|
+
animationType,
|
|
1226
|
+
__wavesDurationInFrames
|
|
1227
|
+
}) => {
|
|
1228
|
+
const frame = (0, import_remotion9.useCurrentFrame)();
|
|
1229
|
+
const { fps } = (0, import_remotion9.useVideoConfig)();
|
|
1230
|
+
const total = Math.max(1, __wavesDurationInFrames ?? 1);
|
|
1231
|
+
const progress = animationType === "spring" ? (0, import_remotion9.spring)({ frame, fps, config: { damping: 14, stiffness: 110, mass: 0.9 } }) : (0, import_remotion9.interpolate)(frame, [0, total], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
1232
|
+
const value = from + (to - from) * Math.max(0, Math.min(1, progress));
|
|
1233
|
+
const rounded = Math.round(value);
|
|
1234
|
+
const label = `${rounded.toLocaleString()}${suffix ?? ""}`;
|
|
1235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_remotion9.AbsoluteFill, { style: { display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { style: { textAlign: "center" }, children: [
|
|
1236
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: { fontSize: Math.round(fontSize * 0.5), marginBottom: 18 }, children: icon }) : null,
|
|
1237
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: { fontSize, color, fontFamily, fontWeight, lineHeight: 1 }, children: label })
|
|
1238
|
+
] }) });
|
|
1239
|
+
};
|
|
1240
|
+
var AnimatedCounterComponentMetadata = {
|
|
1241
|
+
kind: "composite",
|
|
1242
|
+
category: "data",
|
|
1243
|
+
description: "Animated numeric counter (spring or linear), optionally with an icon and suffix",
|
|
1244
|
+
llmGuidance: 'Use for big stats. animationType="spring" feels natural. suffix for units (%, K, M).',
|
|
1245
|
+
examples: [
|
|
1246
|
+
{ from: 0, to: 100, suffix: "%", icon: "\u{1F4C8}" },
|
|
1247
|
+
{ from: 0, to: 25e3, suffix: "+", animationType: "linear" }
|
|
1248
|
+
]
|
|
1249
|
+
};
|
|
1250
|
+
|
|
1251
|
+
// src/components/composites/BarChart.tsx
|
|
1252
|
+
var import_remotion10 = require("remotion");
|
|
1253
|
+
var import_zod14 = require("zod");
|
|
1254
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1255
|
+
var BarChartPropsSchema = import_zod14.z.object({
|
|
1256
|
+
data: import_zod14.z.array(import_zod14.z.object({
|
|
1257
|
+
label: import_zod14.z.string().min(1),
|
|
1258
|
+
value: import_zod14.z.number(),
|
|
1259
|
+
color: import_zod14.z.string().optional()
|
|
1260
|
+
})).min(2).max(8),
|
|
1261
|
+
orientation: import_zod14.z.enum(["horizontal", "vertical"]).default("vertical"),
|
|
1262
|
+
showValues: import_zod14.z.boolean().default(true),
|
|
1263
|
+
showGrid: import_zod14.z.boolean().default(false),
|
|
1264
|
+
maxValue: import_zod14.z.number().optional()
|
|
1265
|
+
});
|
|
1266
|
+
var BarChart = ({ data, orientation, showValues, showGrid, maxValue }) => {
|
|
1267
|
+
const frame = (0, import_remotion10.useCurrentFrame)();
|
|
1268
|
+
const { fps } = (0, import_remotion10.useVideoConfig)();
|
|
1269
|
+
const max = maxValue ?? Math.max(...data.map((d) => d.value));
|
|
1270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_remotion10.AbsoluteFill, { style: { padding: 90, boxSizing: "border-box" }, children: [
|
|
1271
|
+
showGrid ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("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,
|
|
1272
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1273
|
+
"div",
|
|
1274
|
+
{
|
|
1275
|
+
style: {
|
|
1276
|
+
display: "flex",
|
|
1277
|
+
flexDirection: orientation === "vertical" ? "row" : "column",
|
|
1278
|
+
gap: 24,
|
|
1279
|
+
width: "100%",
|
|
1280
|
+
height: "100%",
|
|
1281
|
+
alignItems: orientation === "vertical" ? "flex-end" : "stretch",
|
|
1282
|
+
justifyContent: "space-between"
|
|
1283
|
+
},
|
|
1284
|
+
children: data.map((d, i) => {
|
|
1285
|
+
const p = (0, import_remotion10.spring)({ frame: frame - i * 4, fps, config: { damping: 14, stiffness: 120, mass: 0.9 } });
|
|
1286
|
+
const ratio = max === 0 ? 0 : d.value / max * p;
|
|
1287
|
+
const color = d.color ?? "#0A84FF";
|
|
1288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", alignItems: "center", gap: 10 }, children: [
|
|
1289
|
+
orientation === "vertical" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { style: { width: "100%", flex: 1, display: "flex", alignItems: "flex-end" }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { style: { width: "100%", height: `${Math.round(ratio * 100)}%`, backgroundColor: color, borderRadius: 12 } }) }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { style: { width: "100%", display: "flex", alignItems: "center", gap: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { style: { flex: 1, height: 18, backgroundColor: "rgba(255,255,255,0.15)", borderRadius: 9999, overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { style: { width: `${Math.round(ratio * 100)}%`, height: "100%", backgroundColor: color } }) }) }),
|
|
1290
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { style: { color: "#FFFFFF", fontWeight: 700, fontSize: 22, opacity: 0.9 }, children: d.label }),
|
|
1291
|
+
showValues ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { style: { color: "#FFFFFF", fontWeight: 800, fontSize: 26 }, children: Math.round(d.value).toLocaleString() }) : null
|
|
1292
|
+
] }, d.label);
|
|
1293
|
+
})
|
|
1294
|
+
}
|
|
1295
|
+
)
|
|
1296
|
+
] });
|
|
1297
|
+
};
|
|
1298
|
+
var BarChartComponentMetadata = {
|
|
1299
|
+
kind: "composite",
|
|
1300
|
+
category: "data",
|
|
1301
|
+
description: "Animated bar chart (vertical or horizontal)",
|
|
1302
|
+
llmGuidance: "Use 2-6 bars. Provide maxValue to lock scale across multiple charts."
|
|
1303
|
+
};
|
|
1304
|
+
|
|
1305
|
+
// src/components/composites/CardStack.tsx
|
|
1306
|
+
var import_remotion11 = require("remotion");
|
|
1307
|
+
var import_zod15 = require("zod");
|
|
1308
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1309
|
+
var CardSchema = import_zod15.z.object({
|
|
1310
|
+
title: import_zod15.z.string().min(1),
|
|
1311
|
+
content: import_zod15.z.string().min(1),
|
|
1312
|
+
backgroundColor: import_zod15.z.string().optional()
|
|
1313
|
+
});
|
|
1314
|
+
var CardStackPropsSchema = import_zod15.z.object({
|
|
1315
|
+
cards: import_zod15.z.array(CardSchema).min(2).max(5),
|
|
1316
|
+
transition: import_zod15.z.enum(["flip", "slide", "fade"]).default("flip"),
|
|
1317
|
+
displayDuration: import_zod15.z.number().int().min(30).max(150).default(90)
|
|
1318
|
+
});
|
|
1319
|
+
var CardStack = ({ cards, transition, displayDuration }) => {
|
|
1320
|
+
const frame = (0, import_remotion11.useCurrentFrame)();
|
|
1321
|
+
const { fps } = (0, import_remotion11.useVideoConfig)();
|
|
1322
|
+
const index = Math.min(cards.length - 1, Math.floor(frame / displayDuration));
|
|
1323
|
+
const local = frame - index * displayDuration;
|
|
1324
|
+
const p = (0, import_remotion11.spring)({ frame: local, fps, config: { damping: 14, stiffness: 120, mass: 0.9 } });
|
|
1325
|
+
const card = cards[index];
|
|
1326
|
+
const bg = card.backgroundColor ?? "rgba(255,255,255,0.1)";
|
|
1327
|
+
const opacity = transition === "fade" ? p : 1;
|
|
1328
|
+
const slideX = transition === "slide" ? (0, import_remotion11.interpolate)(p, [0, 1], [80, 0]) : 0;
|
|
1329
|
+
const rotateY = transition === "flip" ? (0, import_remotion11.interpolate)(p, [0, 1], [70, 0]) : 0;
|
|
1330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_remotion11.AbsoluteFill, { style: { justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1331
|
+
"div",
|
|
1332
|
+
{
|
|
1333
|
+
style: {
|
|
1334
|
+
width: 980,
|
|
1335
|
+
height: 520,
|
|
1336
|
+
borderRadius: 28,
|
|
1337
|
+
padding: 60,
|
|
1338
|
+
boxSizing: "border-box",
|
|
1339
|
+
backgroundColor: bg,
|
|
1340
|
+
boxShadow: "0 30px 90px rgba(0,0,0,0.35)",
|
|
1341
|
+
color: "#FFFFFF",
|
|
1342
|
+
transform: `translateX(${slideX}px) rotateY(${rotateY}deg)`,
|
|
1343
|
+
transformStyle: "preserve-3d",
|
|
1344
|
+
opacity
|
|
1345
|
+
},
|
|
1346
|
+
children: [
|
|
1347
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { style: { fontSize: 56, fontWeight: 900, marginBottom: 22 }, children: card.title }),
|
|
1348
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { style: { fontSize: 30, fontWeight: 700, opacity: 0.9, lineHeight: 1.3 }, children: card.content })
|
|
1349
|
+
]
|
|
1350
|
+
}
|
|
1351
|
+
) });
|
|
1352
|
+
};
|
|
1353
|
+
var CardStackComponentMetadata = {
|
|
1354
|
+
kind: "composite",
|
|
1355
|
+
category: "layout",
|
|
1356
|
+
description: "Sequential stacked cards (2-5) with flip/slide/fade transitions",
|
|
1357
|
+
llmGuidance: "Use for steps/features. displayDuration is frames per card."
|
|
1358
|
+
};
|
|
1359
|
+
|
|
1360
|
+
// src/components/composites/CircularReveal.tsx
|
|
1361
|
+
var import_remotion12 = require("remotion");
|
|
1362
|
+
var import_zod16 = require("zod");
|
|
1363
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1364
|
+
var CenterSchema = import_zod16.z.object({
|
|
1365
|
+
x: import_zod16.z.number().min(0).max(1).default(0.5),
|
|
1366
|
+
y: import_zod16.z.number().min(0).max(1).default(0.5)
|
|
1367
|
+
});
|
|
1368
|
+
var CircularRevealPropsSchema = import_zod16.z.object({
|
|
1369
|
+
durationInFrames: import_zod16.z.number().int().min(10).max(60).default(30),
|
|
1370
|
+
direction: import_zod16.z.enum(["open", "close"]).default("open"),
|
|
1371
|
+
center: CenterSchema.optional(),
|
|
1372
|
+
phase: import_zod16.z.enum(["in", "out", "inOut"]).default("inOut")
|
|
1373
|
+
});
|
|
1374
|
+
var CircularReveal = ({
|
|
1375
|
+
durationInFrames,
|
|
1376
|
+
direction,
|
|
1377
|
+
center,
|
|
1378
|
+
phase,
|
|
1379
|
+
children,
|
|
1380
|
+
__wavesDurationInFrames
|
|
1381
|
+
}) => {
|
|
1382
|
+
const frame = (0, import_remotion12.useCurrentFrame)();
|
|
1383
|
+
const total = Math.max(1, __wavesDurationInFrames ?? 1);
|
|
1384
|
+
const d = Math.min(durationInFrames, total);
|
|
1385
|
+
const c = center ?? { x: 0.5, y: 0.5 };
|
|
1386
|
+
const open = direction === "open";
|
|
1387
|
+
let radiusPct = open ? 0 : 150;
|
|
1388
|
+
if (phase === "in" || phase === "inOut") {
|
|
1389
|
+
const t = (0, import_remotion12.interpolate)(frame, [0, d], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
1390
|
+
radiusPct = open ? 150 * t : 150 * (1 - t);
|
|
629
1391
|
}
|
|
630
|
-
if (
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
propsSchema: AudioPropsSchema,
|
|
635
|
-
metadata: AudioComponentMetadata
|
|
636
|
-
});
|
|
1392
|
+
if (phase === "out" || phase === "inOut") {
|
|
1393
|
+
const start = Math.max(0, total - d);
|
|
1394
|
+
const t = (0, import_remotion12.interpolate)(frame, [start, total], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
1395
|
+
radiusPct = open ? 150 * (1 - t) : 150 * t;
|
|
637
1396
|
}
|
|
1397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_remotion12.AbsoluteFill, { style: { clipPath: `circle(${radiusPct}% at ${Math.round(c.x * 100)}% ${Math.round(c.y * 100)}%)` }, children });
|
|
1398
|
+
};
|
|
1399
|
+
var CircularRevealComponentMetadata = {
|
|
1400
|
+
kind: "composite",
|
|
1401
|
+
category: "transition",
|
|
1402
|
+
acceptsChildren: true,
|
|
1403
|
+
minChildren: 1,
|
|
1404
|
+
description: "Circular iris reveal/hide transition wrapper",
|
|
1405
|
+
llmGuidance: 'direction="open" reveals from center, direction="close" hides to a point. center controls origin.'
|
|
1406
|
+
};
|
|
1407
|
+
|
|
1408
|
+
// src/components/composites/CountUpText.tsx
|
|
1409
|
+
var import_remotion13 = require("remotion");
|
|
1410
|
+
var import_zod17 = require("zod");
|
|
1411
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1412
|
+
var CountUpTextPropsSchema = import_zod17.z.object({
|
|
1413
|
+
from: import_zod17.z.number().default(0),
|
|
1414
|
+
to: import_zod17.z.number().default(100),
|
|
1415
|
+
fontSize: import_zod17.z.number().min(8).max(240).default(72),
|
|
1416
|
+
color: import_zod17.z.string().default("#FFFFFF"),
|
|
1417
|
+
fontFamily: import_zod17.z.string().default("Inter"),
|
|
1418
|
+
fontWeight: import_zod17.z.number().int().min(100).max(900).default(700),
|
|
1419
|
+
position: import_zod17.z.enum(["top", "center", "bottom"]).default("center"),
|
|
1420
|
+
format: import_zod17.z.enum(["integer", "decimal", "currency", "percentage"]).default("integer"),
|
|
1421
|
+
decimals: import_zod17.z.number().int().min(0).max(4).default(0),
|
|
1422
|
+
prefix: import_zod17.z.string().optional(),
|
|
1423
|
+
suffix: import_zod17.z.string().optional()
|
|
1424
|
+
});
|
|
1425
|
+
var positionStyles = (position) => {
|
|
1426
|
+
if (position === "top") return { justifyContent: "center", alignItems: "flex-start", paddingTop: 90 };
|
|
1427
|
+
if (position === "bottom") return { justifyContent: "center", alignItems: "flex-end", paddingBottom: 90 };
|
|
1428
|
+
return { justifyContent: "center", alignItems: "center" };
|
|
1429
|
+
};
|
|
1430
|
+
function formatValue(v, format, decimals) {
|
|
1431
|
+
if (format === "integer") return Math.round(v).toLocaleString();
|
|
1432
|
+
if (format === "decimal") return v.toFixed(decimals);
|
|
1433
|
+
if (format === "currency") return `$${v.toFixed(decimals).toLocaleString()}`;
|
|
1434
|
+
return `${(v * 100).toFixed(decimals)}%`;
|
|
638
1435
|
}
|
|
1436
|
+
var CountUpText = ({
|
|
1437
|
+
from,
|
|
1438
|
+
to,
|
|
1439
|
+
fontSize,
|
|
1440
|
+
color,
|
|
1441
|
+
fontFamily,
|
|
1442
|
+
fontWeight,
|
|
1443
|
+
position,
|
|
1444
|
+
format,
|
|
1445
|
+
decimals,
|
|
1446
|
+
prefix,
|
|
1447
|
+
suffix,
|
|
1448
|
+
__wavesDurationInFrames
|
|
1449
|
+
}) => {
|
|
1450
|
+
const frame = (0, import_remotion13.useCurrentFrame)();
|
|
1451
|
+
const { fps } = (0, import_remotion13.useVideoConfig)();
|
|
1452
|
+
const total = Math.max(1, __wavesDurationInFrames ?? 1);
|
|
1453
|
+
const p = (0, import_remotion13.spring)({ frame, fps, config: { damping: 14, stiffness: 110, mass: 0.9 } });
|
|
1454
|
+
const progress = Math.max(0, Math.min(1, p));
|
|
1455
|
+
const value = from + (to - from) * progress;
|
|
1456
|
+
const fade = (0, import_remotion13.interpolate)(frame, [0, Math.min(12, total)], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
1457
|
+
const label = `${prefix ?? ""}${formatValue(value, format, decimals)}${suffix ?? ""}`;
|
|
1458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_remotion13.AbsoluteFill, { style: { display: "flex", ...positionStyles(position) }, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: { fontSize, color, fontFamily, fontWeight, opacity: fade, lineHeight: 1 }, children: label }) });
|
|
1459
|
+
};
|
|
1460
|
+
var CountUpTextComponentMetadata = {
|
|
1461
|
+
kind: "composite",
|
|
1462
|
+
category: "text",
|
|
1463
|
+
description: "Counts from a start value to an end value with formatting options",
|
|
1464
|
+
llmGuidance: 'Use for metrics. format="currency" adds $, format="percentage" multiplies by 100 and adds %.'
|
|
1465
|
+
};
|
|
639
1466
|
|
|
640
|
-
// src/
|
|
641
|
-
var
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
1467
|
+
// src/components/composites/FadeTransition.tsx
|
|
1468
|
+
var import_remotion14 = require("remotion");
|
|
1469
|
+
var import_zod18 = require("zod");
|
|
1470
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1471
|
+
var EasingSchema = import_zod18.z.enum(["linear", "easeIn", "easeOut", "easeInOut"]);
|
|
1472
|
+
function ease(t, easing) {
|
|
1473
|
+
const x = Math.max(0, Math.min(1, t));
|
|
1474
|
+
if (easing === "linear") return x;
|
|
1475
|
+
if (easing === "easeIn") return x * x;
|
|
1476
|
+
if (easing === "easeOut") return 1 - (1 - x) * (1 - x);
|
|
1477
|
+
return x < 0.5 ? 2 * x * x : 1 - 2 * (1 - x) * (1 - x);
|
|
1478
|
+
}
|
|
1479
|
+
var FadeTransitionPropsSchema = import_zod18.z.object({
|
|
1480
|
+
durationInFrames: import_zod18.z.number().int().min(10).max(60).default(30),
|
|
1481
|
+
easing: EasingSchema.default("easeInOut"),
|
|
1482
|
+
phase: import_zod18.z.enum(["in", "out", "inOut"]).default("inOut")
|
|
1483
|
+
});
|
|
1484
|
+
var FadeTransition = ({
|
|
1485
|
+
durationInFrames,
|
|
1486
|
+
easing,
|
|
1487
|
+
phase,
|
|
1488
|
+
children,
|
|
1489
|
+
__wavesDurationInFrames
|
|
1490
|
+
}) => {
|
|
1491
|
+
const frame = (0, import_remotion14.useCurrentFrame)();
|
|
1492
|
+
const total = Math.max(1, __wavesDurationInFrames ?? 1);
|
|
1493
|
+
const d = Math.min(durationInFrames, total);
|
|
1494
|
+
let opacity = 1;
|
|
1495
|
+
if (phase === "in" || phase === "inOut") {
|
|
1496
|
+
const t = (0, import_remotion14.interpolate)(frame, [0, d], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
1497
|
+
opacity *= ease(t, easing);
|
|
1498
|
+
}
|
|
1499
|
+
if (phase === "out" || phase === "inOut") {
|
|
1500
|
+
const start = Math.max(0, total - d);
|
|
1501
|
+
const t = (0, import_remotion14.interpolate)(frame, [start, total], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
1502
|
+
opacity *= 1 - ease(t, easing);
|
|
1503
|
+
}
|
|
1504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_remotion14.AbsoluteFill, { style: { opacity }, children });
|
|
662
1505
|
};
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
1506
|
+
var FadeTransitionComponentMetadata = {
|
|
1507
|
+
kind: "composite",
|
|
1508
|
+
category: "transition",
|
|
1509
|
+
acceptsChildren: true,
|
|
1510
|
+
minChildren: 1,
|
|
1511
|
+
description: "Fade in/out wrapper (used for segment transitions and overlays)",
|
|
1512
|
+
llmGuidance: "Use for gentle transitions. durationInFrames ~30 is standard."
|
|
1513
|
+
};
|
|
1514
|
+
|
|
1515
|
+
// src/components/composites/GlitchText.tsx
|
|
1516
|
+
var import_remotion15 = require("remotion");
|
|
1517
|
+
var import_zod19 = require("zod");
|
|
1518
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1519
|
+
var GlitchTextPropsSchema = import_zod19.z.object({
|
|
1520
|
+
content: import_zod19.z.string().max(100),
|
|
1521
|
+
fontSize: import_zod19.z.number().min(8).max(240).default(72),
|
|
1522
|
+
color: import_zod19.z.string().default("#FFFFFF"),
|
|
1523
|
+
fontFamily: import_zod19.z.string().default("monospace"),
|
|
1524
|
+
position: import_zod19.z.enum(["top", "center", "bottom"]).default("center"),
|
|
1525
|
+
intensity: import_zod19.z.number().int().min(1).max(10).default(5),
|
|
1526
|
+
glitchDuration: import_zod19.z.number().int().min(5).max(30).default(10)
|
|
1527
|
+
});
|
|
1528
|
+
var positionStyles2 = (position) => {
|
|
1529
|
+
if (position === "top") return { justifyContent: "center", alignItems: "flex-start", paddingTop: 90 };
|
|
1530
|
+
if (position === "bottom") return { justifyContent: "center", alignItems: "flex-end", paddingBottom: 90 };
|
|
1531
|
+
return { justifyContent: "center", alignItems: "center" };
|
|
1532
|
+
};
|
|
1533
|
+
function pseudoRandom(n) {
|
|
1534
|
+
const x = Math.sin(n * 12.9898) * 43758.5453;
|
|
1535
|
+
return x - Math.floor(x);
|
|
683
1536
|
}
|
|
684
|
-
|
|
1537
|
+
var GlitchText = ({
|
|
1538
|
+
content,
|
|
1539
|
+
fontSize,
|
|
1540
|
+
color,
|
|
1541
|
+
fontFamily,
|
|
1542
|
+
position,
|
|
1543
|
+
intensity,
|
|
1544
|
+
glitchDuration
|
|
1545
|
+
}) => {
|
|
1546
|
+
const frame = (0, import_remotion15.useCurrentFrame)();
|
|
1547
|
+
const active = frame < glitchDuration;
|
|
1548
|
+
const seed = frame + 1;
|
|
1549
|
+
const jitter = active ? (pseudoRandom(seed) - 0.5) * intensity * 6 : 0;
|
|
1550
|
+
const jitterY = active ? (pseudoRandom(seed + 99) - 0.5) * intensity * 3 : 0;
|
|
1551
|
+
const baseStyle = {
|
|
1552
|
+
position: "absolute",
|
|
1553
|
+
fontSize,
|
|
1554
|
+
fontFamily,
|
|
1555
|
+
fontWeight: 800,
|
|
1556
|
+
letterSpacing: 1,
|
|
1557
|
+
textTransform: "uppercase",
|
|
1558
|
+
textAlign: "center"
|
|
1559
|
+
};
|
|
1560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_remotion15.AbsoluteFill, { style: { display: "flex", ...positionStyles2(position) }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { position: "relative" }, children: [
|
|
1561
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { ...baseStyle, color, transform: `translate(${jitter}px, ${jitterY}px)` }, children: content }),
|
|
1562
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { ...baseStyle, color: "#FF3B30", transform: `translate(${jitter + 4}px, ${jitterY}px)`, mixBlendMode: "screen", opacity: active ? 0.9 : 0 }, children: content }),
|
|
1563
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { ...baseStyle, color: "#0A84FF", transform: `translate(${jitter - 4}px, ${jitterY}px)`, mixBlendMode: "screen", opacity: active ? 0.9 : 0 }, children: content })
|
|
1564
|
+
] }) });
|
|
1565
|
+
};
|
|
1566
|
+
var GlitchTextComponentMetadata = {
|
|
1567
|
+
kind: "composite",
|
|
1568
|
+
category: "text",
|
|
1569
|
+
description: "Cyberpunk-style glitch text with RGB split jitter",
|
|
1570
|
+
llmGuidance: "Use for tech/error moments. intensity 1-3 subtle, 7-10 extreme. glitchDuration is frames at start."
|
|
1571
|
+
};
|
|
1572
|
+
|
|
1573
|
+
// src/components/composites/GridLayout.tsx
|
|
1574
|
+
var import_remotion16 = require("remotion");
|
|
1575
|
+
var import_zod20 = require("zod");
|
|
1576
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1577
|
+
var GridLayoutPropsSchema = import_zod20.z.object({
|
|
1578
|
+
columns: import_zod20.z.number().int().min(1).max(4).default(2),
|
|
1579
|
+
rows: import_zod20.z.number().int().min(1).max(4).default(2),
|
|
1580
|
+
gap: import_zod20.z.number().min(0).max(50).default(20),
|
|
1581
|
+
padding: import_zod20.z.number().min(0).max(100).default(40)
|
|
1582
|
+
});
|
|
1583
|
+
var GridLayout = ({ columns, rows, gap, padding, children }) => {
|
|
1584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_remotion16.AbsoluteFill, { style: { padding, boxSizing: "border-box" }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1585
|
+
"div",
|
|
1586
|
+
{
|
|
1587
|
+
style: {
|
|
1588
|
+
display: "grid",
|
|
1589
|
+
gridTemplateColumns: `repeat(${columns}, 1fr)`,
|
|
1590
|
+
gridTemplateRows: `repeat(${rows}, 1fr)`,
|
|
1591
|
+
gap,
|
|
1592
|
+
width: "100%",
|
|
1593
|
+
height: "100%"
|
|
1594
|
+
},
|
|
1595
|
+
children
|
|
1596
|
+
}
|
|
1597
|
+
) });
|
|
1598
|
+
};
|
|
1599
|
+
var GridLayoutComponentMetadata = {
|
|
1600
|
+
kind: "composite",
|
|
1601
|
+
category: "layout",
|
|
1602
|
+
acceptsChildren: true,
|
|
1603
|
+
minChildren: 1,
|
|
1604
|
+
description: "Simple responsive grid layout for child components",
|
|
1605
|
+
llmGuidance: "Use for dashboards and collages. 2x2 is a good default for 4 items."
|
|
1606
|
+
};
|
|
1607
|
+
|
|
1608
|
+
// src/components/composites/ImageCollage.tsx
|
|
1609
|
+
var import_remotion17 = require("remotion");
|
|
1610
|
+
var import_zod21 = require("zod");
|
|
1611
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1612
|
+
var ImageCollagePropsSchema = import_zod21.z.object({
|
|
1613
|
+
images: import_zod21.z.array(import_zod21.z.object({ src: import_zod21.z.string().min(1), caption: import_zod21.z.string().optional() })).min(2).max(9),
|
|
1614
|
+
layout: import_zod21.z.enum(["grid", "stack", "scatter"]).default("grid"),
|
|
1615
|
+
stagger: import_zod21.z.number().int().min(2).max(10).default(5)
|
|
1616
|
+
});
|
|
1617
|
+
var resolveAsset4 = (value) => isRemoteAssetPath(value) ? value : (0, import_remotion17.staticFile)(staticFileInputFromAssetPath(value));
|
|
1618
|
+
var ImageCollage = ({ images, layout, stagger }) => {
|
|
1619
|
+
const frame = (0, import_remotion17.useCurrentFrame)();
|
|
1620
|
+
const { fps } = (0, import_remotion17.useVideoConfig)();
|
|
1621
|
+
const n = images.length;
|
|
1622
|
+
const cols = Math.ceil(Math.sqrt(n));
|
|
1623
|
+
const rows = Math.ceil(n / cols);
|
|
1624
|
+
if (layout === "grid") {
|
|
1625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_remotion17.AbsoluteFill, { style: { padding: 80, boxSizing: "border-box" }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1626
|
+
"div",
|
|
1627
|
+
{
|
|
1628
|
+
style: {
|
|
1629
|
+
display: "grid",
|
|
1630
|
+
gridTemplateColumns: `repeat(${cols}, 1fr)`,
|
|
1631
|
+
gridTemplateRows: `repeat(${rows}, 1fr)`,
|
|
1632
|
+
gap: 24,
|
|
1633
|
+
width: "100%",
|
|
1634
|
+
height: "100%"
|
|
1635
|
+
},
|
|
1636
|
+
children: images.map((img, i) => {
|
|
1637
|
+
const p = (0, import_remotion17.spring)({ frame: frame - i * stagger, fps, config: { damping: 14, stiffness: 120, mass: 0.9 } });
|
|
1638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { style: { position: "relative", overflow: "hidden", borderRadius: 18, opacity: p, transform: `scale(${0.92 + 0.08 * p})` }, children: [
|
|
1639
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_remotion17.Img, { src: resolveAsset4(img.src), style: { width: "100%", height: "100%", objectFit: "cover" } }),
|
|
1640
|
+
img.caption ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("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
|
|
1641
|
+
] }, i);
|
|
1642
|
+
})
|
|
1643
|
+
}
|
|
1644
|
+
) });
|
|
1645
|
+
}
|
|
1646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_remotion17.AbsoluteFill, { children: images.map((img, i) => {
|
|
1647
|
+
const p = (0, import_remotion17.spring)({ frame: frame - i * stagger, fps, config: { damping: 14, stiffness: 120, mass: 0.9 } });
|
|
1648
|
+
const baseRotate = layout === "stack" ? (i - (n - 1) / 2) * 4 : i * 17 % 20 - 10;
|
|
1649
|
+
const baseX = layout === "scatter" ? i * 137 % 300 - 150 : 0;
|
|
1650
|
+
const baseY = layout === "scatter" ? (i + 3) * 89 % 200 - 100 : 0;
|
|
1651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1652
|
+
"div",
|
|
1653
|
+
{
|
|
1654
|
+
style: {
|
|
1655
|
+
position: "absolute",
|
|
1656
|
+
left: "50%",
|
|
1657
|
+
top: "50%",
|
|
1658
|
+
width: 520,
|
|
1659
|
+
height: 360,
|
|
1660
|
+
transform: `translate(-50%, -50%) translate(${baseX}px, ${baseY}px) rotate(${baseRotate}deg) scale(${0.85 + 0.15 * p})`,
|
|
1661
|
+
opacity: p,
|
|
1662
|
+
borderRadius: 18,
|
|
1663
|
+
overflow: "hidden",
|
|
1664
|
+
boxShadow: "0 20px 60px rgba(0,0,0,0.35)"
|
|
1665
|
+
},
|
|
1666
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_remotion17.Img, { src: resolveAsset4(img.src), style: { width: "100%", height: "100%", objectFit: "cover" } })
|
|
1667
|
+
},
|
|
1668
|
+
i
|
|
1669
|
+
);
|
|
1670
|
+
}) });
|
|
1671
|
+
};
|
|
1672
|
+
var ImageCollageComponentMetadata = {
|
|
1673
|
+
kind: "composite",
|
|
1674
|
+
category: "image",
|
|
1675
|
+
description: "Collage of multiple images in a grid/stack/scatter layout with staggered entrances",
|
|
1676
|
+
llmGuidance: 'Use 2-6 images for best results. layout="grid" is clean; "scatter" is energetic.'
|
|
1677
|
+
};
|
|
1678
|
+
|
|
1679
|
+
// src/components/composites/ImageReveal.tsx
|
|
1680
|
+
var import_remotion18 = require("remotion");
|
|
1681
|
+
var import_zod22 = require("zod");
|
|
1682
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1683
|
+
var ImageRevealPropsSchema = import_zod22.z.object({
|
|
1684
|
+
src: import_zod22.z.string().min(1),
|
|
1685
|
+
direction: import_zod22.z.enum(["left", "right", "top", "bottom", "center"]).default("left"),
|
|
1686
|
+
revealType: import_zod22.z.enum(["wipe", "expand", "iris"]).default("wipe")
|
|
1687
|
+
});
|
|
1688
|
+
var resolveAsset5 = (value) => isRemoteAssetPath(value) ? value : (0, import_remotion18.staticFile)(staticFileInputFromAssetPath(value));
|
|
1689
|
+
var ImageReveal = ({ src, direction, revealType, __wavesDurationInFrames }) => {
|
|
1690
|
+
const frame = (0, import_remotion18.useCurrentFrame)();
|
|
1691
|
+
const total = Math.max(1, __wavesDurationInFrames ?? 1);
|
|
1692
|
+
const d = Math.min(30, total);
|
|
1693
|
+
const p = (0, import_remotion18.interpolate)(frame, [0, d], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
1694
|
+
let clipPath;
|
|
1695
|
+
let transform = "none";
|
|
1696
|
+
let transformOrigin = "center center";
|
|
1697
|
+
if (revealType === "wipe") {
|
|
1698
|
+
if (direction === "left") clipPath = `inset(0 ${100 * (1 - p)}% 0 0)`;
|
|
1699
|
+
if (direction === "right") clipPath = `inset(0 0 0 ${100 * (1 - p)}%)`;
|
|
1700
|
+
if (direction === "top") clipPath = `inset(0 0 ${100 * (1 - p)}% 0)`;
|
|
1701
|
+
if (direction === "bottom") clipPath = `inset(${100 * (1 - p)}% 0 0 0)`;
|
|
1702
|
+
if (direction === "center") clipPath = `inset(${50 * (1 - p)}% ${50 * (1 - p)}% ${50 * (1 - p)}% ${50 * (1 - p)}%)`;
|
|
1703
|
+
}
|
|
1704
|
+
if (revealType === "expand") {
|
|
1705
|
+
const s = 0.85 + 0.15 * p;
|
|
1706
|
+
transform = `scale(${s})`;
|
|
1707
|
+
if (direction === "left") transformOrigin = "left center";
|
|
1708
|
+
if (direction === "right") transformOrigin = "right center";
|
|
1709
|
+
if (direction === "top") transformOrigin = "center top";
|
|
1710
|
+
if (direction === "bottom") transformOrigin = "center bottom";
|
|
1711
|
+
}
|
|
1712
|
+
if (revealType === "iris") {
|
|
1713
|
+
clipPath = `circle(${Math.round(150 * p)}% at 50% 50%)`;
|
|
1714
|
+
}
|
|
1715
|
+
const opacity = revealType === "expand" ? p : 1;
|
|
1716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_remotion18.AbsoluteFill, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1717
|
+
import_remotion18.Img,
|
|
1718
|
+
{
|
|
1719
|
+
src: resolveAsset5(src),
|
|
1720
|
+
style: {
|
|
1721
|
+
width: "100%",
|
|
1722
|
+
height: "100%",
|
|
1723
|
+
objectFit: "cover",
|
|
1724
|
+
clipPath,
|
|
1725
|
+
transform,
|
|
1726
|
+
transformOrigin,
|
|
1727
|
+
opacity
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
) });
|
|
1731
|
+
};
|
|
1732
|
+
var ImageRevealComponentMetadata = {
|
|
1733
|
+
kind: "composite",
|
|
1734
|
+
category: "image",
|
|
1735
|
+
description: "Reveals an image with wipe/expand/iris entrance effects",
|
|
1736
|
+
llmGuidance: "Use wipe for directional reveals, expand for subtle pop-in, iris for circular mask openings."
|
|
1737
|
+
};
|
|
1738
|
+
|
|
1739
|
+
// src/components/composites/ImageSequence.tsx
|
|
1740
|
+
var import_remotion19 = require("remotion");
|
|
1741
|
+
var import_zod23 = require("zod");
|
|
1742
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1743
|
+
var ImageSequencePropsSchema = import_zod23.z.object({
|
|
1744
|
+
basePath: import_zod23.z.string().min(1),
|
|
1745
|
+
frameCount: import_zod23.z.number().int().positive(),
|
|
1746
|
+
filePattern: import_zod23.z.string().default("frame_{frame}.png"),
|
|
1747
|
+
fps: import_zod23.z.number().int().min(1).max(120).default(30)
|
|
1748
|
+
});
|
|
1749
|
+
function joinPath(base, file) {
|
|
1750
|
+
if (base.endsWith("/")) return `${base}${file}`;
|
|
1751
|
+
return `${base}/${file}`;
|
|
1752
|
+
}
|
|
1753
|
+
var resolveAsset6 = (value) => isRemoteAssetPath(value) ? value : (0, import_remotion19.staticFile)(staticFileInputFromAssetPath(value));
|
|
1754
|
+
var ImageSequence = ({ basePath, frameCount, filePattern, fps }) => {
|
|
1755
|
+
const frame = (0, import_remotion19.useCurrentFrame)();
|
|
1756
|
+
const { fps: compFps } = (0, import_remotion19.useVideoConfig)();
|
|
1757
|
+
const index = Math.min(frameCount - 1, Math.max(0, Math.floor(frame * fps / compFps)));
|
|
1758
|
+
const file = filePattern.replace("{frame}", String(index));
|
|
1759
|
+
const src = joinPath(basePath, file);
|
|
1760
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_remotion19.AbsoluteFill, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_remotion19.Img, { src: resolveAsset6(src), style: { width: "100%", height: "100%", objectFit: "cover" } }) });
|
|
1761
|
+
};
|
|
1762
|
+
var ImageSequenceComponentMetadata = {
|
|
1763
|
+
kind: "composite",
|
|
1764
|
+
category: "image",
|
|
1765
|
+
description: "Plays a numbered image sequence (frame-by-frame)",
|
|
1766
|
+
llmGuidance: "Use for exported sprite sequences. basePath can be /assets/seq and filePattern like img_{frame}.png."
|
|
1767
|
+
};
|
|
1768
|
+
|
|
1769
|
+
// src/components/composites/ImageWithCaption.tsx
|
|
1770
|
+
var import_remotion20 = require("remotion");
|
|
1771
|
+
var import_zod24 = require("zod");
|
|
1772
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1773
|
+
var CaptionStyleSchema = import_zod24.z.object({
|
|
1774
|
+
fontSize: import_zod24.z.number().min(12).max(80).default(32),
|
|
1775
|
+
color: import_zod24.z.string().default("#FFFFFF"),
|
|
1776
|
+
backgroundColor: import_zod24.z.string().default("rgba(0,0,0,0.7)")
|
|
1777
|
+
});
|
|
1778
|
+
var ImageWithCaptionPropsSchema = import_zod24.z.object({
|
|
1779
|
+
src: import_zod24.z.string().min(1),
|
|
1780
|
+
caption: import_zod24.z.string().max(200),
|
|
1781
|
+
captionPosition: import_zod24.z.enum(["top", "bottom", "overlay"]).default("bottom"),
|
|
1782
|
+
captionStyle: CaptionStyleSchema.optional()
|
|
1783
|
+
});
|
|
1784
|
+
var resolveAsset7 = (value) => isRemoteAssetPath(value) ? value : (0, import_remotion20.staticFile)(staticFileInputFromAssetPath(value));
|
|
1785
|
+
var ImageWithCaption = ({ src, caption, captionPosition, captionStyle }) => {
|
|
1786
|
+
const frame = (0, import_remotion20.useCurrentFrame)();
|
|
1787
|
+
const p = (0, import_remotion20.interpolate)(frame, [8, 24], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
1788
|
+
const style = captionStyle ?? { fontSize: 32, color: "#FFFFFF", backgroundColor: "rgba(0,0,0,0.7)" };
|
|
1789
|
+
const captionBox = /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1790
|
+
"div",
|
|
1791
|
+
{
|
|
1792
|
+
style: {
|
|
1793
|
+
width: "100%",
|
|
1794
|
+
padding: 22,
|
|
1795
|
+
boxSizing: "border-box",
|
|
1796
|
+
backgroundColor: style.backgroundColor,
|
|
1797
|
+
color: style.color,
|
|
1798
|
+
fontWeight: 800,
|
|
1799
|
+
fontSize: style.fontSize,
|
|
1800
|
+
opacity: p
|
|
1801
|
+
},
|
|
1802
|
+
children: caption
|
|
1803
|
+
}
|
|
1804
|
+
);
|
|
1805
|
+
if (captionPosition === "top" || captionPosition === "bottom") {
|
|
1806
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_remotion20.AbsoluteFill, { style: { display: "flex", flexDirection: "column" }, children: [
|
|
1807
|
+
captionPosition === "top" ? captionBox : null,
|
|
1808
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { style: { flex: 1, position: "relative" }, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_remotion20.Img, { src: resolveAsset7(src), style: { width: "100%", height: "100%", objectFit: "cover" } }) }),
|
|
1809
|
+
captionPosition === "bottom" ? captionBox : null
|
|
1810
|
+
] });
|
|
1811
|
+
}
|
|
1812
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_remotion20.AbsoluteFill, { children: [
|
|
1813
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_remotion20.Img, { src: resolveAsset7(src), style: { width: "100%", height: "100%", objectFit: "cover" } }),
|
|
1814
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { style: { position: "absolute", left: 0, right: 0, bottom: 0 }, children: captionBox })
|
|
1815
|
+
] });
|
|
1816
|
+
};
|
|
1817
|
+
var ImageWithCaptionComponentMetadata = {
|
|
1818
|
+
kind: "composite",
|
|
1819
|
+
category: "image",
|
|
1820
|
+
description: "Image with a caption strip (top/bottom) or overlay caption",
|
|
1821
|
+
llmGuidance: "Use overlay for quotes/testimonials over photos. Use bottom for standard captions."
|
|
1822
|
+
};
|
|
1823
|
+
|
|
1824
|
+
// src/components/composites/InstagramStory.tsx
|
|
1825
|
+
var import_remotion21 = require("remotion");
|
|
1826
|
+
var import_zod25 = require("zod");
|
|
1827
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1828
|
+
var InstagramStoryPropsSchema = import_zod25.z.object({
|
|
1829
|
+
backgroundImage: import_zod25.z.string().optional(),
|
|
1830
|
+
backgroundColor: import_zod25.z.string().default("#000000"),
|
|
1831
|
+
profilePic: import_zod25.z.string().optional(),
|
|
1832
|
+
username: import_zod25.z.string().optional(),
|
|
1833
|
+
text: import_zod25.z.string().max(100).optional(),
|
|
1834
|
+
sticker: import_zod25.z.enum(["none", "poll", "question", "countdown"]).default("none"),
|
|
1835
|
+
musicTrack: import_zod25.z.string().optional()
|
|
1836
|
+
});
|
|
1837
|
+
var resolveAsset8 = (value) => isRemoteAssetPath(value) ? value : (0, import_remotion21.staticFile)(staticFileInputFromAssetPath(value));
|
|
1838
|
+
var InstagramStory = ({
|
|
1839
|
+
backgroundImage,
|
|
1840
|
+
backgroundColor,
|
|
1841
|
+
profilePic,
|
|
1842
|
+
username,
|
|
1843
|
+
text,
|
|
1844
|
+
sticker,
|
|
1845
|
+
musicTrack
|
|
1846
|
+
}) => {
|
|
1847
|
+
const frame = (0, import_remotion21.useCurrentFrame)();
|
|
1848
|
+
const fade = (0, import_remotion21.interpolate)(frame, [0, 20], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
1849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_remotion21.AbsoluteFill, { style: { backgroundColor }, children: [
|
|
1850
|
+
musicTrack ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_remotion21.Audio, { src: resolveAsset8(musicTrack), volume: 0.6 }) : null,
|
|
1851
|
+
backgroundImage ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_remotion21.Img, { src: resolveAsset8(backgroundImage), style: { width: "100%", height: "100%", objectFit: "cover", opacity: fade } }) : null,
|
|
1852
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_remotion21.AbsoluteFill, { style: { padding: 60, boxSizing: "border-box" }, children: [
|
|
1853
|
+
profilePic || username ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 18 }, children: [
|
|
1854
|
+
profilePic ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_remotion21.Img, { src: resolveAsset8(profilePic), style: { width: 78, height: 78, borderRadius: 9999, objectFit: "cover" } }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { style: { width: 78, height: 78, borderRadius: 9999, backgroundColor: "rgba(255,255,255,0.2)" } }),
|
|
1855
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { style: { color: "#FFFFFF", fontWeight: 800, fontSize: 34 }, children: username ?? "username" })
|
|
1856
|
+
] }) : null,
|
|
1857
|
+
text ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1858
|
+
"div",
|
|
1859
|
+
{
|
|
1860
|
+
style: {
|
|
1861
|
+
marginTop: 120,
|
|
1862
|
+
color: "#FFFFFF",
|
|
1863
|
+
fontSize: 54,
|
|
1864
|
+
fontWeight: 900,
|
|
1865
|
+
textShadow: "0 8px 30px rgba(0,0,0,0.6)",
|
|
1866
|
+
maxWidth: 900
|
|
1867
|
+
},
|
|
1868
|
+
children: text
|
|
1869
|
+
}
|
|
1870
|
+
) : null,
|
|
1871
|
+
sticker !== "none" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1872
|
+
"div",
|
|
1873
|
+
{
|
|
1874
|
+
style: {
|
|
1875
|
+
position: "absolute",
|
|
1876
|
+
left: 60,
|
|
1877
|
+
bottom: 180,
|
|
1878
|
+
width: 520,
|
|
1879
|
+
padding: 28,
|
|
1880
|
+
borderRadius: 22,
|
|
1881
|
+
backgroundColor: "rgba(255,255,255,0.9)",
|
|
1882
|
+
color: "#111",
|
|
1883
|
+
fontWeight: 900,
|
|
1884
|
+
fontSize: 30
|
|
1885
|
+
},
|
|
1886
|
+
children: sticker === "poll" ? "POLL" : sticker === "question" ? "QUESTION" : "COUNTDOWN"
|
|
1887
|
+
}
|
|
1888
|
+
) : null
|
|
1889
|
+
] })
|
|
1890
|
+
] });
|
|
1891
|
+
};
|
|
1892
|
+
var InstagramStoryComponentMetadata = {
|
|
1893
|
+
kind: "composite",
|
|
1894
|
+
category: "social",
|
|
1895
|
+
description: "Instagram story-style layout with profile header, text overlay, and optional sticker",
|
|
1896
|
+
llmGuidance: "Best with 1080x1920 (9:16). Use backgroundImage + short text + optional sticker for mobile-style content."
|
|
1897
|
+
};
|
|
1898
|
+
|
|
1899
|
+
// src/components/composites/IntroScene.tsx
|
|
1900
|
+
var import_remotion22 = require("remotion");
|
|
1901
|
+
var import_zod26 = require("zod");
|
|
1902
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1903
|
+
var IntroScenePropsSchema = import_zod26.z.object({
|
|
1904
|
+
logoSrc: import_zod26.z.string().min(1),
|
|
1905
|
+
companyName: import_zod26.z.string().min(1),
|
|
1906
|
+
tagline: import_zod26.z.string().optional(),
|
|
1907
|
+
backgroundColor: import_zod26.z.string().default("#000000"),
|
|
1908
|
+
primaryColor: import_zod26.z.string().default("#FFFFFF"),
|
|
1909
|
+
musicTrack: import_zod26.z.string().optional()
|
|
1910
|
+
});
|
|
1911
|
+
var resolveAsset9 = (value) => isRemoteAssetPath(value) ? value : (0, import_remotion22.staticFile)(staticFileInputFromAssetPath(value));
|
|
1912
|
+
var IntroScene = ({
|
|
1913
|
+
logoSrc,
|
|
1914
|
+
companyName,
|
|
1915
|
+
tagline,
|
|
1916
|
+
backgroundColor,
|
|
1917
|
+
primaryColor,
|
|
1918
|
+
musicTrack,
|
|
1919
|
+
__wavesDurationInFrames
|
|
1920
|
+
}) => {
|
|
1921
|
+
const frame = (0, import_remotion22.useCurrentFrame)();
|
|
1922
|
+
const { fps } = (0, import_remotion22.useVideoConfig)();
|
|
1923
|
+
const total = Math.max(1, __wavesDurationInFrames ?? 1);
|
|
1924
|
+
const logoP = (0, import_remotion22.spring)({ frame, fps, config: { damping: 14, stiffness: 120, mass: 0.9 } });
|
|
1925
|
+
const nameOpacity = (0, import_remotion22.interpolate)(frame, [20, 60], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
1926
|
+
const taglineY = (0, import_remotion22.interpolate)(frame, [50, 80], [20, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
1927
|
+
const outroFade = (0, import_remotion22.interpolate)(frame, [Math.max(0, total - 20), total], [1, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
1928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_remotion22.AbsoluteFill, { style: { backgroundColor, justifyContent: "center", alignItems: "center" }, children: [
|
|
1929
|
+
musicTrack ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_remotion22.Audio, { src: resolveAsset9(musicTrack), volume: 0.7 }) : null,
|
|
1930
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { style: { textAlign: "center", opacity: outroFade }, children: [
|
|
1931
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1932
|
+
import_remotion22.Img,
|
|
1933
|
+
{
|
|
1934
|
+
src: resolveAsset9(logoSrc),
|
|
1935
|
+
style: { width: 280, height: 280, objectFit: "contain", transform: `scale(${logoP})` }
|
|
1936
|
+
}
|
|
1937
|
+
),
|
|
1938
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { style: { marginTop: 24, color: primaryColor, fontSize: 64, fontWeight: 900, opacity: nameOpacity }, children: companyName }),
|
|
1939
|
+
tagline ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1940
|
+
"div",
|
|
1941
|
+
{
|
|
1942
|
+
style: {
|
|
1943
|
+
marginTop: 12,
|
|
1944
|
+
color: primaryColor,
|
|
1945
|
+
fontSize: 32,
|
|
1946
|
+
fontWeight: 700,
|
|
1947
|
+
opacity: nameOpacity,
|
|
1948
|
+
transform: `translateY(${taglineY}px)`
|
|
1949
|
+
},
|
|
1950
|
+
children: tagline
|
|
1951
|
+
}
|
|
1952
|
+
) : null
|
|
1953
|
+
] })
|
|
1954
|
+
] });
|
|
1955
|
+
};
|
|
1956
|
+
var IntroSceneComponentMetadata = {
|
|
1957
|
+
kind: "composite",
|
|
1958
|
+
category: "branding",
|
|
1959
|
+
description: "Branded intro scene (logo + company name + optional tagline)",
|
|
1960
|
+
llmGuidance: "Use as the first segment. Works best at 3-5 seconds. musicTrack can add ambience."
|
|
1961
|
+
};
|
|
1962
|
+
|
|
1963
|
+
// src/components/composites/KenBurnsImage.tsx
|
|
1964
|
+
var import_remotion23 = require("remotion");
|
|
1965
|
+
var import_zod27 = require("zod");
|
|
1966
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1967
|
+
var KenBurnsImagePropsSchema = import_zod27.z.object({
|
|
1968
|
+
src: import_zod27.z.string().min(1),
|
|
1969
|
+
startScale: import_zod27.z.number().min(1).max(2).default(1),
|
|
1970
|
+
endScale: import_zod27.z.number().min(1).max(2).default(1.2),
|
|
1971
|
+
panDirection: import_zod27.z.enum(["none", "left", "right", "up", "down"]).default("none"),
|
|
1972
|
+
panAmount: import_zod27.z.number().min(0).max(100).default(50)
|
|
1973
|
+
});
|
|
1974
|
+
var resolveAsset10 = (value) => isRemoteAssetPath(value) ? value : (0, import_remotion23.staticFile)(staticFileInputFromAssetPath(value));
|
|
1975
|
+
var KenBurnsImage = ({
|
|
1976
|
+
src,
|
|
1977
|
+
startScale,
|
|
1978
|
+
endScale,
|
|
1979
|
+
panDirection,
|
|
1980
|
+
panAmount,
|
|
1981
|
+
__wavesDurationInFrames
|
|
1982
|
+
}) => {
|
|
1983
|
+
const frame = (0, import_remotion23.useCurrentFrame)();
|
|
1984
|
+
const duration = Math.max(1, __wavesDurationInFrames ?? 1);
|
|
1985
|
+
const t = (0, import_remotion23.interpolate)(frame, [0, duration], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
1986
|
+
const scale = startScale + (endScale - startScale) * t;
|
|
1987
|
+
const dx = panDirection === "left" ? -panAmount * t : panDirection === "right" ? panAmount * t : 0;
|
|
1988
|
+
const dy = panDirection === "up" ? -panAmount * t : panDirection === "down" ? panAmount * t : 0;
|
|
1989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_remotion23.AbsoluteFill, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1990
|
+
import_remotion23.Img,
|
|
1991
|
+
{
|
|
1992
|
+
src: resolveAsset10(src),
|
|
1993
|
+
style: {
|
|
1994
|
+
width: "110%",
|
|
1995
|
+
height: "110%",
|
|
1996
|
+
objectFit: "cover",
|
|
1997
|
+
transform: `translate(${dx}px, ${dy}px) scale(${scale})`,
|
|
1998
|
+
transformOrigin: "center center"
|
|
1999
|
+
}
|
|
2000
|
+
}
|
|
2001
|
+
) });
|
|
2002
|
+
};
|
|
2003
|
+
var KenBurnsImageComponentMetadata = {
|
|
2004
|
+
kind: "composite",
|
|
2005
|
+
category: "image",
|
|
2006
|
+
description: "Slow zoom and pan (Ken Burns effect) for a still image",
|
|
2007
|
+
llmGuidance: "Classic documentary-style motion. startScale 1 -> endScale 1.2 is subtle; add panDirection for extra movement."
|
|
2008
|
+
};
|
|
2009
|
+
|
|
2010
|
+
// src/components/composites/KineticTypography.tsx
|
|
2011
|
+
var import_remotion24 = require("remotion");
|
|
2012
|
+
var import_zod28 = require("zod");
|
|
2013
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2014
|
+
var WordSchema = import_zod28.z.object({
|
|
2015
|
+
text: import_zod28.z.string().min(1),
|
|
2016
|
+
emphasis: import_zod28.z.enum(["normal", "bold", "giant"]).default("normal")
|
|
2017
|
+
});
|
|
2018
|
+
var KineticTypographyPropsSchema = import_zod28.z.object({
|
|
2019
|
+
words: import_zod28.z.array(WordSchema).min(1).max(50),
|
|
2020
|
+
fontSize: import_zod28.z.number().min(12).max(140).default(48),
|
|
2021
|
+
color: import_zod28.z.string().default("#FFFFFF"),
|
|
2022
|
+
fontFamily: import_zod28.z.string().default("Inter"),
|
|
2023
|
+
timing: import_zod28.z.array(import_zod28.z.number().int().min(0)).min(1).describe("Frame timing for each word"),
|
|
2024
|
+
transition: import_zod28.z.enum(["fade", "scale", "slideLeft", "slideRight"]).default("scale")
|
|
2025
|
+
});
|
|
2026
|
+
var KineticTypography = ({
|
|
2027
|
+
words,
|
|
2028
|
+
fontSize,
|
|
2029
|
+
color,
|
|
2030
|
+
fontFamily,
|
|
2031
|
+
timing,
|
|
2032
|
+
transition
|
|
2033
|
+
}) => {
|
|
2034
|
+
const frame = (0, import_remotion24.useCurrentFrame)();
|
|
2035
|
+
const { fps } = (0, import_remotion24.useVideoConfig)();
|
|
2036
|
+
const starts = (() => {
|
|
2037
|
+
if (timing.length >= words.length) return timing.slice(0, words.length);
|
|
2038
|
+
const last = timing.length ? timing[timing.length - 1] : 0;
|
|
2039
|
+
const extra = Array.from({ length: words.length - timing.length }, () => last + 15);
|
|
2040
|
+
return [...timing, ...extra];
|
|
2041
|
+
})();
|
|
2042
|
+
let activeIndex = 0;
|
|
2043
|
+
for (let i = 0; i < words.length; i++) {
|
|
2044
|
+
if (frame >= (starts[i] ?? 0)) activeIndex = i;
|
|
2045
|
+
}
|
|
2046
|
+
const word = words[activeIndex];
|
|
2047
|
+
const start = starts[activeIndex] ?? 0;
|
|
2048
|
+
const p = (0, import_remotion24.spring)({ frame: frame - start, fps, config: { damping: 14, stiffness: 120, mass: 0.9 } });
|
|
2049
|
+
const progress = Math.max(0, Math.min(1, p));
|
|
2050
|
+
const scaleBase = word.emphasis === "giant" ? 2 : word.emphasis === "bold" ? 1.3 : 1;
|
|
2051
|
+
const opacity = transition === "fade" ? progress : 1;
|
|
2052
|
+
const scale = transition === "scale" ? (0.85 + 0.15 * progress) * scaleBase : 1 * scaleBase;
|
|
2053
|
+
const tx = transition === "slideLeft" ? 40 * (1 - progress) : transition === "slideRight" ? -40 * (1 - progress) : 0;
|
|
2054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_remotion24.AbsoluteFill, { style: { justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2055
|
+
"div",
|
|
2056
|
+
{
|
|
2057
|
+
style: {
|
|
2058
|
+
fontSize,
|
|
2059
|
+
color,
|
|
2060
|
+
fontFamily,
|
|
2061
|
+
fontWeight: word.emphasis === "normal" ? 800 : 900,
|
|
2062
|
+
textTransform: "uppercase",
|
|
2063
|
+
letterSpacing: 1,
|
|
2064
|
+
opacity,
|
|
2065
|
+
transform: `translateX(${tx}px) scale(${scale})`
|
|
2066
|
+
},
|
|
2067
|
+
children: word.text
|
|
2068
|
+
}
|
|
2069
|
+
) });
|
|
2070
|
+
};
|
|
2071
|
+
var KineticTypographyComponentMetadata = {
|
|
2072
|
+
kind: "composite",
|
|
2073
|
+
category: "text",
|
|
2074
|
+
description: "Rhythmic single-word kinetic typography driven by a timing array",
|
|
2075
|
+
llmGuidance: 'Provide timing frames for when each word appears. Use emphasis="giant" sparingly for impact.'
|
|
2076
|
+
};
|
|
2077
|
+
|
|
2078
|
+
// src/components/composites/LineGraph.tsx
|
|
2079
|
+
var import_remotion25 = require("remotion");
|
|
2080
|
+
var import_zod29 = require("zod");
|
|
2081
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2082
|
+
var PointSchema = import_zod29.z.object({ x: import_zod29.z.number(), y: import_zod29.z.number() });
|
|
2083
|
+
var LineGraphPropsSchema = import_zod29.z.object({
|
|
2084
|
+
data: import_zod29.z.array(PointSchema).min(2).max(50),
|
|
2085
|
+
color: import_zod29.z.string().default("#00FF00"),
|
|
2086
|
+
strokeWidth: import_zod29.z.number().min(1).max(10).default(3),
|
|
2087
|
+
showDots: import_zod29.z.boolean().default(true),
|
|
2088
|
+
fillArea: import_zod29.z.boolean().default(false),
|
|
2089
|
+
animate: import_zod29.z.enum(["draw", "reveal"]).default("draw")
|
|
2090
|
+
});
|
|
2091
|
+
function normalize(data, w, h, pad) {
|
|
2092
|
+
const xs = data.map((d) => d.x);
|
|
2093
|
+
const ys = data.map((d) => d.y);
|
|
2094
|
+
const minX = Math.min(...xs);
|
|
2095
|
+
const maxX = Math.max(...xs);
|
|
2096
|
+
const minY = Math.min(...ys);
|
|
2097
|
+
const maxY = Math.max(...ys);
|
|
2098
|
+
return data.map((d) => ({
|
|
2099
|
+
x: pad + (maxX === minX ? (w - 2 * pad) / 2 : (d.x - minX) / (maxX - minX) * (w - 2 * pad)),
|
|
2100
|
+
y: pad + (maxY === minY ? (h - 2 * pad) / 2 : (1 - (d.y - minY) / (maxY - minY)) * (h - 2 * pad))
|
|
2101
|
+
}));
|
|
2102
|
+
}
|
|
2103
|
+
function toPath(points) {
|
|
2104
|
+
return points.reduce((acc, p, i) => i === 0 ? `M ${p.x} ${p.y}` : `${acc} L ${p.x} ${p.y}`, "");
|
|
2105
|
+
}
|
|
2106
|
+
var LineGraph = ({
|
|
2107
|
+
data,
|
|
2108
|
+
color,
|
|
2109
|
+
strokeWidth,
|
|
2110
|
+
showDots,
|
|
2111
|
+
fillArea,
|
|
2112
|
+
animate,
|
|
2113
|
+
__wavesDurationInFrames
|
|
2114
|
+
}) => {
|
|
2115
|
+
const frame = (0, import_remotion25.useCurrentFrame)();
|
|
2116
|
+
const total = Math.max(1, __wavesDurationInFrames ?? 1);
|
|
2117
|
+
const progress = (0, import_remotion25.interpolate)(frame, [0, total], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
2118
|
+
const w = 1e3;
|
|
2119
|
+
const h = 520;
|
|
2120
|
+
const pad = 30;
|
|
2121
|
+
const pts = normalize(data, w, h, pad);
|
|
2122
|
+
const d = toPath(pts);
|
|
2123
|
+
const dash = 3e3;
|
|
2124
|
+
const dashOffset = dash * (1 - progress);
|
|
2125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_remotion25.AbsoluteFill, { style: { justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("svg", { width: w, height: h, viewBox: `0 0 ${w} ${h}`, children: [
|
|
2126
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("clipPath", { id: "waves-line-reveal", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("rect", { x: "0", y: "0", width: w * progress, height: h }) }) }),
|
|
2127
|
+
fillArea ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2128
|
+
"path",
|
|
2129
|
+
{
|
|
2130
|
+
d: `${d} L ${pts[pts.length - 1].x} ${h - pad} L ${pts[0].x} ${h - pad} Z`,
|
|
2131
|
+
fill: color,
|
|
2132
|
+
opacity: 0.12,
|
|
2133
|
+
clipPath: animate === "reveal" ? "url(#waves-line-reveal)" : void 0
|
|
2134
|
+
}
|
|
2135
|
+
) : null,
|
|
2136
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2137
|
+
"path",
|
|
2138
|
+
{
|
|
2139
|
+
d,
|
|
2140
|
+
fill: "none",
|
|
2141
|
+
stroke: color,
|
|
2142
|
+
strokeWidth,
|
|
2143
|
+
strokeLinecap: "round",
|
|
2144
|
+
strokeLinejoin: "round",
|
|
2145
|
+
strokeDasharray: animate === "draw" ? dash : void 0,
|
|
2146
|
+
strokeDashoffset: animate === "draw" ? dashOffset : void 0,
|
|
2147
|
+
clipPath: animate === "reveal" ? "url(#waves-line-reveal)" : void 0
|
|
2148
|
+
}
|
|
2149
|
+
),
|
|
2150
|
+
showDots ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { clipPath: animate === "reveal" ? "url(#waves-line-reveal)" : void 0, children: pts.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("circle", { cx: p.x, cy: p.y, r: 6, fill: color }, i)) }) : null
|
|
2151
|
+
] }) });
|
|
2152
|
+
};
|
|
2153
|
+
var LineGraphComponentMetadata = {
|
|
2154
|
+
kind: "composite",
|
|
2155
|
+
category: "data",
|
|
2156
|
+
description: "Animated line graph (SVG) with draw/reveal modes",
|
|
2157
|
+
llmGuidance: 'Use 5-20 points. animate="draw" traces the line; animate="reveal" wipes it left-to-right.'
|
|
2158
|
+
};
|
|
2159
|
+
|
|
2160
|
+
// src/components/composites/LogoReveal.tsx
|
|
2161
|
+
var import_remotion26 = require("remotion");
|
|
2162
|
+
var import_zod30 = require("zod");
|
|
2163
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2164
|
+
var LogoRevealPropsSchema = import_zod30.z.object({
|
|
2165
|
+
logoSrc: import_zod30.z.string().min(1),
|
|
2166
|
+
effect: import_zod30.z.enum(["fade", "scale", "rotate", "slide"]).default("scale"),
|
|
2167
|
+
backgroundColor: import_zod30.z.string().default("#000000"),
|
|
2168
|
+
soundEffect: import_zod30.z.string().optional()
|
|
2169
|
+
});
|
|
2170
|
+
var resolveAsset11 = (value) => isRemoteAssetPath(value) ? value : (0, import_remotion26.staticFile)(staticFileInputFromAssetPath(value));
|
|
2171
|
+
var LogoReveal = ({ logoSrc, effect, backgroundColor, soundEffect }) => {
|
|
2172
|
+
const frame = (0, import_remotion26.useCurrentFrame)();
|
|
2173
|
+
const { fps } = (0, import_remotion26.useVideoConfig)();
|
|
2174
|
+
const p = (0, import_remotion26.spring)({ frame, fps, config: { damping: 14, stiffness: 110, mass: 0.9 } });
|
|
2175
|
+
const opacity = effect === "fade" ? p : Math.min(1, Math.max(0, p));
|
|
2176
|
+
const scale = effect === "scale" ? p : 1;
|
|
2177
|
+
const rotate = effect === "rotate" ? (1 - p) * 360 : 0;
|
|
2178
|
+
const translateY = effect === "slide" ? -200 * (1 - p) : 0;
|
|
2179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_remotion26.AbsoluteFill, { style: { backgroundColor, justifyContent: "center", alignItems: "center" }, children: [
|
|
2180
|
+
soundEffect ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_remotion26.Audio, { src: resolveAsset11(soundEffect), volume: 1 }) : null,
|
|
2181
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2182
|
+
import_remotion26.Img,
|
|
2183
|
+
{
|
|
2184
|
+
src: resolveAsset11(logoSrc),
|
|
2185
|
+
style: {
|
|
2186
|
+
width: 320,
|
|
2187
|
+
height: 320,
|
|
2188
|
+
objectFit: "contain",
|
|
2189
|
+
opacity,
|
|
2190
|
+
transform: `translateY(${translateY}px) scale(${scale}) rotate(${rotate}deg)`
|
|
2191
|
+
}
|
|
2192
|
+
}
|
|
2193
|
+
)
|
|
2194
|
+
] });
|
|
2195
|
+
};
|
|
2196
|
+
var LogoRevealComponentMetadata = {
|
|
2197
|
+
kind: "composite",
|
|
2198
|
+
category: "branding",
|
|
2199
|
+
description: "Logo intro animation (fade/scale/rotate/slide), optionally with a sound effect",
|
|
2200
|
+
llmGuidance: "Use for intros/outros. Keep the logo high-contrast and centered. soundEffect can be a short sting."
|
|
2201
|
+
};
|
|
2202
|
+
|
|
2203
|
+
// src/components/composites/OutroScene.tsx
|
|
2204
|
+
var import_remotion27 = require("remotion");
|
|
2205
|
+
var import_zod31 = require("zod");
|
|
2206
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2207
|
+
var CtaSchema = import_zod31.z.object({ text: import_zod31.z.string().min(1), icon: import_zod31.z.string().optional() });
|
|
2208
|
+
var HandleSchema = import_zod31.z.object({
|
|
2209
|
+
platform: import_zod31.z.enum(["twitter", "instagram", "youtube", "linkedin"]),
|
|
2210
|
+
handle: import_zod31.z.string().min(1)
|
|
2211
|
+
});
|
|
2212
|
+
var OutroScenePropsSchema = import_zod31.z.object({
|
|
2213
|
+
logoSrc: import_zod31.z.string().min(1),
|
|
2214
|
+
message: import_zod31.z.string().default("Thank You"),
|
|
2215
|
+
ctaButtons: import_zod31.z.array(CtaSchema).max(3).optional(),
|
|
2216
|
+
socialHandles: import_zod31.z.array(HandleSchema).max(4).optional(),
|
|
2217
|
+
backgroundColor: import_zod31.z.string().default("#000000")
|
|
2218
|
+
});
|
|
2219
|
+
var resolveAsset12 = (value) => isRemoteAssetPath(value) ? value : (0, import_remotion27.staticFile)(staticFileInputFromAssetPath(value));
|
|
2220
|
+
var OutroScene = ({ logoSrc, message, ctaButtons, socialHandles, backgroundColor }) => {
|
|
2221
|
+
const frame = (0, import_remotion27.useCurrentFrame)();
|
|
2222
|
+
const { fps } = (0, import_remotion27.useVideoConfig)();
|
|
2223
|
+
const logoP = (0, import_remotion27.spring)({ frame, fps, config: { damping: 14, stiffness: 120, mass: 0.9 } });
|
|
2224
|
+
const msgP = (0, import_remotion27.spring)({ frame: frame - 18, fps, config: { damping: 14, stiffness: 120, mass: 0.9 } });
|
|
2225
|
+
const ctaP = (0, import_remotion27.spring)({ frame: frame - 40, fps, config: { damping: 14, stiffness: 120, mass: 0.9 } });
|
|
2226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_remotion27.AbsoluteFill, { style: { backgroundColor, justifyContent: "center", alignItems: "center", padding: 80, boxSizing: "border-box" }, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { style: { textAlign: "center" }, children: [
|
|
2227
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_remotion27.Img, { src: resolveAsset12(logoSrc), style: { width: 220, height: 220, objectFit: "contain", transform: `scale(${logoP})` } }),
|
|
2228
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { style: { marginTop: 24, color: "#FFFFFF", fontSize: 72, fontWeight: 1e3, opacity: msgP }, children: message }),
|
|
2229
|
+
ctaButtons?.length ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { style: { marginTop: 34, display: "flex", gap: 18, justifyContent: "center", opacity: ctaP }, children: ctaButtons.map((b, i) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
2230
|
+
"div",
|
|
2231
|
+
{
|
|
2232
|
+
style: {
|
|
2233
|
+
padding: "18px 28px",
|
|
2234
|
+
borderRadius: 18,
|
|
2235
|
+
backgroundColor: "rgba(255,255,255,0.12)",
|
|
2236
|
+
color: "#FFFFFF",
|
|
2237
|
+
fontSize: 28,
|
|
2238
|
+
fontWeight: 900
|
|
2239
|
+
},
|
|
2240
|
+
children: [
|
|
2241
|
+
b.icon ? `${b.icon} ` : "",
|
|
2242
|
+
b.text
|
|
2243
|
+
]
|
|
2244
|
+
},
|
|
2245
|
+
i
|
|
2246
|
+
)) }) : null,
|
|
2247
|
+
socialHandles?.length ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { style: { marginTop: 50, display: "flex", flexDirection: "column", gap: 10, opacity: ctaP }, children: socialHandles.map((h, i) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { style: { color: "rgba(255,255,255,0.85)", fontSize: 26, fontWeight: 800 }, children: [
|
|
2248
|
+
h.platform,
|
|
2249
|
+
": ",
|
|
2250
|
+
h.handle
|
|
2251
|
+
] }, i)) }) : null
|
|
2252
|
+
] }) });
|
|
2253
|
+
};
|
|
2254
|
+
var OutroSceneComponentMetadata = {
|
|
2255
|
+
kind: "composite",
|
|
2256
|
+
category: "branding",
|
|
2257
|
+
description: "End screen with logo, message, optional CTA buttons and social handles",
|
|
2258
|
+
llmGuidance: "Use as the last segment. Keep CTAs <=3 for clarity."
|
|
2259
|
+
};
|
|
2260
|
+
|
|
2261
|
+
// src/components/composites/OutlineText.tsx
|
|
2262
|
+
var import_remotion28 = require("remotion");
|
|
2263
|
+
var import_zod32 = require("zod");
|
|
2264
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2265
|
+
var OutlineTextPropsSchema = import_zod32.z.object({
|
|
2266
|
+
content: import_zod32.z.string().max(50),
|
|
2267
|
+
fontSize: import_zod32.z.number().min(8).max(240).default(96),
|
|
2268
|
+
outlineColor: import_zod32.z.string().default("#FFFFFF"),
|
|
2269
|
+
fillColor: import_zod32.z.string().default("#000000"),
|
|
2270
|
+
fontFamily: import_zod32.z.string().default("Inter"),
|
|
2271
|
+
fontWeight: import_zod32.z.number().int().min(100).max(900).default(800),
|
|
2272
|
+
position: import_zod32.z.enum(["top", "center", "bottom"]).default("center"),
|
|
2273
|
+
animation: import_zod32.z.enum(["draw", "fill"]).default("draw"),
|
|
2274
|
+
strokeWidth: import_zod32.z.number().min(1).max(10).default(3)
|
|
2275
|
+
});
|
|
2276
|
+
var positionStyles3 = (position) => {
|
|
2277
|
+
if (position === "top") return { justifyContent: "center", alignItems: "flex-start", paddingTop: 90 };
|
|
2278
|
+
if (position === "bottom") return { justifyContent: "center", alignItems: "flex-end", paddingBottom: 90 };
|
|
2279
|
+
return { justifyContent: "center", alignItems: "center" };
|
|
2280
|
+
};
|
|
2281
|
+
var OutlineText = ({
|
|
2282
|
+
content,
|
|
2283
|
+
fontSize,
|
|
2284
|
+
outlineColor,
|
|
2285
|
+
fillColor,
|
|
2286
|
+
fontFamily,
|
|
2287
|
+
fontWeight,
|
|
2288
|
+
position,
|
|
2289
|
+
animation,
|
|
2290
|
+
strokeWidth
|
|
2291
|
+
}) => {
|
|
2292
|
+
const frame = (0, import_remotion28.useCurrentFrame)();
|
|
2293
|
+
const t = (0, import_remotion28.interpolate)(frame, [0, 24], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
2294
|
+
const strokeOpacity = animation === "draw" ? t : 1;
|
|
2295
|
+
const fillOpacity = animation === "fill" ? t : 0;
|
|
2296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_remotion28.AbsoluteFill, { style: { display: "flex", ...positionStyles3(position) }, children: [
|
|
2297
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2298
|
+
"div",
|
|
2299
|
+
{
|
|
2300
|
+
style: {
|
|
2301
|
+
fontSize,
|
|
2302
|
+
fontFamily,
|
|
2303
|
+
fontWeight,
|
|
2304
|
+
color: fillColor,
|
|
2305
|
+
opacity: fillOpacity,
|
|
2306
|
+
WebkitTextStroke: `${strokeWidth}px ${outlineColor}`,
|
|
2307
|
+
textShadow: `0 0 1px ${outlineColor}`,
|
|
2308
|
+
textAlign: "center",
|
|
2309
|
+
lineHeight: 1
|
|
2310
|
+
},
|
|
2311
|
+
children: content
|
|
2312
|
+
}
|
|
2313
|
+
),
|
|
2314
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2315
|
+
"div",
|
|
2316
|
+
{
|
|
2317
|
+
style: {
|
|
2318
|
+
position: "absolute",
|
|
2319
|
+
fontSize,
|
|
2320
|
+
fontFamily,
|
|
2321
|
+
fontWeight,
|
|
2322
|
+
color: "transparent",
|
|
2323
|
+
opacity: strokeOpacity,
|
|
2324
|
+
WebkitTextStroke: `${strokeWidth}px ${outlineColor}`,
|
|
2325
|
+
textAlign: "center",
|
|
2326
|
+
lineHeight: 1
|
|
2327
|
+
},
|
|
2328
|
+
children: content
|
|
2329
|
+
}
|
|
2330
|
+
)
|
|
2331
|
+
] });
|
|
2332
|
+
};
|
|
2333
|
+
var OutlineTextComponentMetadata = {
|
|
2334
|
+
kind: "composite",
|
|
2335
|
+
category: "text",
|
|
2336
|
+
description: "Outlined title text with simple draw/fill animation",
|
|
2337
|
+
llmGuidance: 'Use for bold titles. animation="draw" emphasizes the outline; animation="fill" reveals the fill color.'
|
|
2338
|
+
};
|
|
2339
|
+
|
|
2340
|
+
// src/components/composites/ProgressBar.tsx
|
|
2341
|
+
var import_remotion29 = require("remotion");
|
|
2342
|
+
var import_zod33 = require("zod");
|
|
2343
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2344
|
+
var ProgressBarPropsSchema = import_zod33.z.object({
|
|
2345
|
+
label: import_zod33.z.string().optional(),
|
|
2346
|
+
color: import_zod33.z.string().default("#00FF00"),
|
|
2347
|
+
backgroundColor: import_zod33.z.string().default("rgba(255,255,255,0.2)"),
|
|
2348
|
+
height: import_zod33.z.number().min(5).max(50).default(10),
|
|
2349
|
+
position: import_zod33.z.enum(["top", "bottom"]).default("bottom"),
|
|
2350
|
+
showPercentage: import_zod33.z.boolean().default(true)
|
|
2351
|
+
});
|
|
2352
|
+
var ProgressBar = ({
|
|
2353
|
+
label,
|
|
2354
|
+
color,
|
|
2355
|
+
backgroundColor,
|
|
2356
|
+
height,
|
|
2357
|
+
position,
|
|
2358
|
+
showPercentage,
|
|
2359
|
+
__wavesDurationInFrames
|
|
2360
|
+
}) => {
|
|
2361
|
+
const frame = (0, import_remotion29.useCurrentFrame)();
|
|
2362
|
+
const total = Math.max(1, __wavesDurationInFrames ?? 1);
|
|
2363
|
+
const p = (0, import_remotion29.interpolate)(frame, [0, total], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
2364
|
+
const pct = Math.round(p * 100);
|
|
2365
|
+
const yStyle = position === "top" ? { top: 50 } : { bottom: 50 };
|
|
2366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_remotion29.AbsoluteFill, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { style: { position: "absolute", left: 80, right: 80, ...yStyle }, children: [
|
|
2367
|
+
label || showPercentage ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { style: { display: "flex", justifyContent: "space-between", marginBottom: 10, color: "#FFFFFF", fontWeight: 700 }, children: [
|
|
2368
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: label ?? "" }),
|
|
2369
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: showPercentage ? `${pct}%` : "" })
|
|
2370
|
+
] }) : null,
|
|
2371
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { style: { width: "100%", height, backgroundColor, borderRadius: 9999, overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { style: { width: `${pct}%`, height: "100%", backgroundColor: color } }) })
|
|
2372
|
+
] }) });
|
|
2373
|
+
};
|
|
2374
|
+
var ProgressBarComponentMetadata = {
|
|
2375
|
+
kind: "composite",
|
|
2376
|
+
category: "data",
|
|
2377
|
+
description: "Animated progress bar that fills over the component duration",
|
|
2378
|
+
llmGuidance: "Use for loading/countdowns. showPercentage=true is helpful for clarity."
|
|
2379
|
+
};
|
|
2380
|
+
|
|
2381
|
+
// src/components/composites/ProgressRing.tsx
|
|
2382
|
+
var import_remotion30 = require("remotion");
|
|
2383
|
+
var import_zod34 = require("zod");
|
|
2384
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2385
|
+
var ProgressRingPropsSchema = import_zod34.z.object({
|
|
2386
|
+
percentage: import_zod34.z.number().min(0).max(100),
|
|
2387
|
+
size: import_zod34.z.number().min(100).max(500).default(200),
|
|
2388
|
+
strokeWidth: import_zod34.z.number().min(5).max(50).default(20),
|
|
2389
|
+
color: import_zod34.z.string().default("#00FF00"),
|
|
2390
|
+
backgroundColor: import_zod34.z.string().default("rgba(255,255,255,0.2)"),
|
|
2391
|
+
showLabel: import_zod34.z.boolean().default(true)
|
|
2392
|
+
});
|
|
2393
|
+
var ProgressRing = ({
|
|
2394
|
+
percentage,
|
|
2395
|
+
size,
|
|
2396
|
+
strokeWidth,
|
|
2397
|
+
color,
|
|
2398
|
+
backgroundColor,
|
|
2399
|
+
showLabel,
|
|
2400
|
+
__wavesDurationInFrames
|
|
2401
|
+
}) => {
|
|
2402
|
+
const frame = (0, import_remotion30.useCurrentFrame)();
|
|
2403
|
+
const total = Math.max(1, __wavesDurationInFrames ?? 1);
|
|
2404
|
+
const p = (0, import_remotion30.interpolate)(frame, [0, total], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
2405
|
+
const current = percentage * p;
|
|
2406
|
+
const r = (size - strokeWidth) / 2;
|
|
2407
|
+
const c = 2 * Math.PI * r;
|
|
2408
|
+
const dash = c;
|
|
2409
|
+
const offset = c - current / 100 * c;
|
|
2410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_remotion30.AbsoluteFill, { style: { justifyContent: "center", alignItems: "center" }, children: [
|
|
2411
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, children: [
|
|
2412
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2413
|
+
"circle",
|
|
2414
|
+
{
|
|
2415
|
+
cx: size / 2,
|
|
2416
|
+
cy: size / 2,
|
|
2417
|
+
r,
|
|
2418
|
+
stroke: backgroundColor,
|
|
2419
|
+
strokeWidth,
|
|
2420
|
+
fill: "transparent"
|
|
2421
|
+
}
|
|
2422
|
+
),
|
|
2423
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2424
|
+
"circle",
|
|
2425
|
+
{
|
|
2426
|
+
cx: size / 2,
|
|
2427
|
+
cy: size / 2,
|
|
2428
|
+
r,
|
|
2429
|
+
stroke: color,
|
|
2430
|
+
strokeWidth,
|
|
2431
|
+
fill: "transparent",
|
|
2432
|
+
strokeDasharray: dash,
|
|
2433
|
+
strokeDashoffset: offset,
|
|
2434
|
+
strokeLinecap: "round",
|
|
2435
|
+
transform: `rotate(-90 ${size / 2} ${size / 2})`
|
|
2436
|
+
}
|
|
2437
|
+
)
|
|
2438
|
+
] }),
|
|
2439
|
+
showLabel ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { style: { position: "absolute", color: "#FFFFFF", fontWeight: 800, fontSize: Math.round(size * 0.22) }, children: [
|
|
2440
|
+
Math.round(current),
|
|
2441
|
+
"%"
|
|
2442
|
+
] }) : null
|
|
2443
|
+
] });
|
|
2444
|
+
};
|
|
2445
|
+
var ProgressRingComponentMetadata = {
|
|
2446
|
+
kind: "composite",
|
|
2447
|
+
category: "data",
|
|
2448
|
+
description: "Circular progress indicator (SVG) that animates from 0 to percentage over duration",
|
|
2449
|
+
llmGuidance: "Use for completion and goals. size 160-260 is typical. showLabel displays the percentage."
|
|
2450
|
+
};
|
|
2451
|
+
|
|
2452
|
+
// src/components/composites/SlideTransition.tsx
|
|
2453
|
+
var import_remotion31 = require("remotion");
|
|
2454
|
+
var import_zod35 = require("zod");
|
|
2455
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2456
|
+
var SlideTransitionPropsSchema = import_zod35.z.object({
|
|
2457
|
+
durationInFrames: import_zod35.z.number().int().min(10).max(60).default(30),
|
|
2458
|
+
direction: import_zod35.z.enum(["left", "right", "up", "down"]).default("left"),
|
|
2459
|
+
distance: import_zod35.z.number().int().min(1).max(2e3).default(160),
|
|
2460
|
+
phase: import_zod35.z.enum(["in", "out", "inOut"]).default("inOut")
|
|
2461
|
+
});
|
|
2462
|
+
function translateFor(direction, delta) {
|
|
2463
|
+
if (direction === "left") return { x: -delta, y: 0 };
|
|
2464
|
+
if (direction === "right") return { x: delta, y: 0 };
|
|
2465
|
+
if (direction === "up") return { x: 0, y: -delta };
|
|
2466
|
+
return { x: 0, y: delta };
|
|
2467
|
+
}
|
|
2468
|
+
var SlideTransition = ({
|
|
2469
|
+
durationInFrames,
|
|
2470
|
+
direction,
|
|
2471
|
+
distance,
|
|
2472
|
+
phase,
|
|
2473
|
+
children,
|
|
2474
|
+
__wavesDurationInFrames
|
|
2475
|
+
}) => {
|
|
2476
|
+
const frame = (0, import_remotion31.useCurrentFrame)();
|
|
2477
|
+
const total = Math.max(1, __wavesDurationInFrames ?? 1);
|
|
2478
|
+
const d = Math.min(durationInFrames, total);
|
|
2479
|
+
let opacity = 1;
|
|
2480
|
+
let tx = 0;
|
|
2481
|
+
let ty = 0;
|
|
2482
|
+
if (phase === "in" || phase === "inOut") {
|
|
2483
|
+
const t = (0, import_remotion31.interpolate)(frame, [0, d], [1, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
2484
|
+
const { x, y } = translateFor(direction, distance * t);
|
|
2485
|
+
tx += x;
|
|
2486
|
+
ty += y;
|
|
2487
|
+
opacity *= (0, import_remotion31.interpolate)(frame, [0, d], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
2488
|
+
}
|
|
2489
|
+
if (phase === "out" || phase === "inOut") {
|
|
2490
|
+
const start = Math.max(0, total - d);
|
|
2491
|
+
const t = (0, import_remotion31.interpolate)(frame, [start, total], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
2492
|
+
const opposite = direction === "left" ? "right" : direction === "right" ? "left" : direction === "up" ? "down" : "up";
|
|
2493
|
+
const { x, y } = translateFor(opposite, distance * t);
|
|
2494
|
+
tx += x;
|
|
2495
|
+
ty += y;
|
|
2496
|
+
opacity *= (0, import_remotion31.interpolate)(frame, [start, total], [1, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
2497
|
+
}
|
|
2498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_remotion31.AbsoluteFill, { style: { opacity, transform: `translate(${tx}px, ${ty}px)` }, children });
|
|
2499
|
+
};
|
|
2500
|
+
var SlideTransitionComponentMetadata = {
|
|
2501
|
+
kind: "composite",
|
|
2502
|
+
category: "transition",
|
|
2503
|
+
acceptsChildren: true,
|
|
2504
|
+
minChildren: 1,
|
|
2505
|
+
description: "Slide in/out wrapper (used for segment transitions and overlays)",
|
|
2506
|
+
llmGuidance: "Use for more dynamic transitions. direction controls where content enters from."
|
|
2507
|
+
};
|
|
2508
|
+
|
|
2509
|
+
// src/components/composites/SplitScreen.tsx
|
|
2510
|
+
var import_react = __toESM(require("react"));
|
|
2511
|
+
var import_remotion32 = require("remotion");
|
|
2512
|
+
var import_zod36 = require("zod");
|
|
2513
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2514
|
+
var SplitScreenPropsSchema = import_zod36.z.object({
|
|
2515
|
+
orientation: import_zod36.z.enum(["vertical", "horizontal"]).default("vertical"),
|
|
2516
|
+
split: import_zod36.z.number().min(0.1).max(0.9).default(0.5),
|
|
2517
|
+
gap: import_zod36.z.number().min(0).default(48),
|
|
2518
|
+
padding: import_zod36.z.number().min(0).default(80),
|
|
2519
|
+
dividerColor: import_zod36.z.string().optional()
|
|
2520
|
+
});
|
|
2521
|
+
var SplitScreen = ({
|
|
2522
|
+
orientation,
|
|
2523
|
+
split,
|
|
2524
|
+
gap,
|
|
2525
|
+
padding,
|
|
2526
|
+
dividerColor,
|
|
2527
|
+
children
|
|
2528
|
+
}) => {
|
|
2529
|
+
const items = import_react.default.Children.toArray(children);
|
|
2530
|
+
const first = items[0] ?? null;
|
|
2531
|
+
const second = items[1] ?? null;
|
|
2532
|
+
const isVertical = orientation === "vertical";
|
|
2533
|
+
const flexDirection = isVertical ? "row" : "column";
|
|
2534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_remotion32.AbsoluteFill, { style: { padding, boxSizing: "border-box" }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { style: { display: "flex", flexDirection, gap, width: "100%", height: "100%" }, children: [
|
|
2535
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: { flex: split, position: "relative" }, children: first }),
|
|
2536
|
+
dividerColor ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2537
|
+
"div",
|
|
2538
|
+
{
|
|
2539
|
+
style: {
|
|
2540
|
+
backgroundColor: dividerColor,
|
|
2541
|
+
width: isVertical ? 2 : "100%",
|
|
2542
|
+
height: isVertical ? "100%" : 2,
|
|
2543
|
+
opacity: 0.7
|
|
2544
|
+
}
|
|
2545
|
+
}
|
|
2546
|
+
) : null,
|
|
2547
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: { flex: 1 - split, position: "relative" }, children: second })
|
|
2548
|
+
] }) });
|
|
2549
|
+
};
|
|
2550
|
+
var SplitScreenComponentMetadata = {
|
|
2551
|
+
kind: "composite",
|
|
2552
|
+
category: "layout",
|
|
2553
|
+
acceptsChildren: true,
|
|
2554
|
+
minChildren: 2,
|
|
2555
|
+
maxChildren: 2,
|
|
2556
|
+
description: "Two-panel split screen layout",
|
|
2557
|
+
llmGuidance: 'Provide exactly 2 children. Use orientation="vertical" for left/right and "horizontal" for top/bottom.'
|
|
2558
|
+
};
|
|
2559
|
+
|
|
2560
|
+
// src/components/composites/SplitText.tsx
|
|
2561
|
+
var import_remotion33 = require("remotion");
|
|
2562
|
+
var import_zod37 = require("zod");
|
|
2563
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2564
|
+
var SplitTextPropsSchema = import_zod37.z.object({
|
|
2565
|
+
content: import_zod37.z.string().max(200),
|
|
2566
|
+
fontSize: import_zod37.z.number().min(8).max(200).default(48),
|
|
2567
|
+
color: import_zod37.z.string().default("#FFFFFF"),
|
|
2568
|
+
fontFamily: import_zod37.z.string().default("Inter"),
|
|
2569
|
+
position: import_zod37.z.enum(["top", "center", "bottom"]).default("center"),
|
|
2570
|
+
splitBy: import_zod37.z.enum(["word", "letter"]).default("word"),
|
|
2571
|
+
stagger: import_zod37.z.number().int().min(1).max(10).default(3),
|
|
2572
|
+
animation: import_zod37.z.enum(["fade", "slideUp", "slideDown", "scale", "rotate"]).default("slideUp")
|
|
2573
|
+
});
|
|
2574
|
+
var positionStyles4 = (position) => {
|
|
2575
|
+
if (position === "top") return { justifyContent: "center", alignItems: "flex-start", paddingTop: 80 };
|
|
2576
|
+
if (position === "bottom") return { justifyContent: "center", alignItems: "flex-end", paddingBottom: 80 };
|
|
2577
|
+
return { justifyContent: "center", alignItems: "center" };
|
|
2578
|
+
};
|
|
2579
|
+
function getItemStyle(progress, animation) {
|
|
2580
|
+
const clamped = Math.max(0, Math.min(1, progress));
|
|
2581
|
+
switch (animation) {
|
|
2582
|
+
case "fade":
|
|
2583
|
+
return { opacity: clamped };
|
|
2584
|
+
case "slideDown":
|
|
2585
|
+
return { opacity: clamped, transform: `translateY(${-20 * (1 - clamped)}px)` };
|
|
2586
|
+
case "scale":
|
|
2587
|
+
return { opacity: clamped, transform: `scale(${0.9 + 0.1 * clamped})` };
|
|
2588
|
+
case "rotate":
|
|
2589
|
+
return { opacity: clamped, transform: `rotate(${(-10 * (1 - clamped)).toFixed(2)}deg)` };
|
|
2590
|
+
case "slideUp":
|
|
2591
|
+
default:
|
|
2592
|
+
return { opacity: clamped, transform: `translateY(${20 * (1 - clamped)}px)` };
|
|
2593
|
+
}
|
|
2594
|
+
}
|
|
2595
|
+
var SplitText = ({
|
|
2596
|
+
content,
|
|
2597
|
+
fontSize,
|
|
2598
|
+
color,
|
|
2599
|
+
fontFamily,
|
|
2600
|
+
position,
|
|
2601
|
+
splitBy,
|
|
2602
|
+
stagger,
|
|
2603
|
+
animation
|
|
2604
|
+
}) => {
|
|
2605
|
+
const frame = (0, import_remotion33.useCurrentFrame)();
|
|
2606
|
+
const { fps } = (0, import_remotion33.useVideoConfig)();
|
|
2607
|
+
const items = splitBy === "letter" ? content.split("") : content.trim().split(/\s+/);
|
|
2608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_remotion33.AbsoluteFill, { style: { display: "flex", ...positionStyles4(position) }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2609
|
+
"div",
|
|
2610
|
+
{
|
|
2611
|
+
style: {
|
|
2612
|
+
display: "flex",
|
|
2613
|
+
flexWrap: "wrap",
|
|
2614
|
+
justifyContent: "center",
|
|
2615
|
+
gap: splitBy === "letter" ? 0 : 12,
|
|
2616
|
+
fontSize,
|
|
2617
|
+
color,
|
|
2618
|
+
fontFamily,
|
|
2619
|
+
fontWeight: 700,
|
|
2620
|
+
textAlign: "center"
|
|
2621
|
+
},
|
|
2622
|
+
children: items.map((t, i) => {
|
|
2623
|
+
const progress = (0, import_remotion33.spring)({
|
|
2624
|
+
frame: frame - i * stagger,
|
|
2625
|
+
fps,
|
|
2626
|
+
config: { damping: 14, stiffness: 120, mass: 0.9 }
|
|
2627
|
+
});
|
|
2628
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2629
|
+
"span",
|
|
2630
|
+
{
|
|
2631
|
+
style: {
|
|
2632
|
+
display: "inline-block",
|
|
2633
|
+
whiteSpace: t === " " ? "pre" : "pre-wrap",
|
|
2634
|
+
...getItemStyle(progress, animation)
|
|
2635
|
+
},
|
|
2636
|
+
children: splitBy === "word" ? `${t} ` : t
|
|
2637
|
+
},
|
|
2638
|
+
`${i}-${t}`
|
|
2639
|
+
);
|
|
2640
|
+
})
|
|
2641
|
+
}
|
|
2642
|
+
) });
|
|
2643
|
+
};
|
|
2644
|
+
var SplitTextComponentMetadata = {
|
|
2645
|
+
kind: "composite",
|
|
2646
|
+
category: "text",
|
|
2647
|
+
description: "Animated text where each word or letter enters with a staggered effect",
|
|
2648
|
+
llmGuidance: 'Use for titles. splitBy="word" is best for phrases; splitBy="letter" is dramatic for short words.',
|
|
2649
|
+
examples: [
|
|
2650
|
+
{ content: "Welcome to Waves", splitBy: "word", stagger: 3, animation: "slideUp" },
|
|
2651
|
+
{ content: "HELLO", splitBy: "letter", stagger: 2, animation: "scale" }
|
|
2652
|
+
]
|
|
2653
|
+
};
|
|
2654
|
+
|
|
2655
|
+
// src/components/composites/SubtitleText.tsx
|
|
2656
|
+
var import_remotion34 = require("remotion");
|
|
2657
|
+
var import_zod38 = require("zod");
|
|
2658
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2659
|
+
var SubtitleTextPropsSchema = import_zod38.z.object({
|
|
2660
|
+
text: import_zod38.z.string().max(200),
|
|
2661
|
+
fontSize: import_zod38.z.number().min(12).max(80).default(36),
|
|
2662
|
+
color: import_zod38.z.string().default("#FFFFFF"),
|
|
2663
|
+
backgroundColor: import_zod38.z.string().default("rgba(0,0,0,0.7)"),
|
|
2664
|
+
fontFamily: import_zod38.z.string().default("Inter"),
|
|
2665
|
+
position: import_zod38.z.enum(["top", "bottom"]).default("bottom"),
|
|
2666
|
+
maxWidth: import_zod38.z.number().min(200).max(1200).default(800),
|
|
2667
|
+
padding: import_zod38.z.number().min(0).max(80).default(20),
|
|
2668
|
+
highlightWords: import_zod38.z.array(import_zod38.z.string()).optional()
|
|
2669
|
+
});
|
|
2670
|
+
function normalizeWord(w) {
|
|
2671
|
+
return w.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
2672
|
+
}
|
|
2673
|
+
var SubtitleText = ({
|
|
2674
|
+
text,
|
|
2675
|
+
fontSize,
|
|
2676
|
+
color,
|
|
2677
|
+
backgroundColor,
|
|
2678
|
+
fontFamily,
|
|
2679
|
+
position,
|
|
2680
|
+
maxWidth,
|
|
2681
|
+
padding,
|
|
2682
|
+
highlightWords,
|
|
2683
|
+
__wavesDurationInFrames
|
|
2684
|
+
}) => {
|
|
2685
|
+
const frame = (0, import_remotion34.useCurrentFrame)();
|
|
2686
|
+
const total = Math.max(1, __wavesDurationInFrames ?? 1);
|
|
2687
|
+
const inFade = (0, import_remotion34.interpolate)(frame, [0, 10], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
2688
|
+
const outFade = (0, import_remotion34.interpolate)(frame, [Math.max(0, total - 10), total], [1, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
2689
|
+
const opacity = inFade * outFade;
|
|
2690
|
+
const highlights = new Set((highlightWords ?? []).map(normalizeWord));
|
|
2691
|
+
const tokens = text.split(/\s+/);
|
|
2692
|
+
const yStyle = position === "top" ? { top: 70 } : { bottom: 90 };
|
|
2693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_remotion34.AbsoluteFill, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { style: { position: "absolute", left: "50%", transform: "translateX(-50%)", maxWidth, width: "100%", ...yStyle }, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2694
|
+
"div",
|
|
2695
|
+
{
|
|
2696
|
+
style: {
|
|
2697
|
+
display: "inline-block",
|
|
2698
|
+
backgroundColor,
|
|
2699
|
+
padding,
|
|
2700
|
+
borderRadius: 18,
|
|
2701
|
+
opacity,
|
|
2702
|
+
color,
|
|
2703
|
+
fontSize,
|
|
2704
|
+
fontFamily,
|
|
2705
|
+
fontWeight: 800,
|
|
2706
|
+
lineHeight: 1.2,
|
|
2707
|
+
textAlign: "center"
|
|
2708
|
+
},
|
|
2709
|
+
children: tokens.map((t, i) => {
|
|
2710
|
+
const n = normalizeWord(t);
|
|
2711
|
+
const isHighlighted = highlights.has(n);
|
|
2712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { style: { color: isHighlighted ? "#FFD60A" : color, marginRight: 8 }, children: t }, i);
|
|
2713
|
+
})
|
|
2714
|
+
}
|
|
2715
|
+
) }) });
|
|
2716
|
+
};
|
|
2717
|
+
var SubtitleTextComponentMetadata = {
|
|
2718
|
+
kind: "composite",
|
|
2719
|
+
category: "text",
|
|
2720
|
+
description: "Caption/subtitle box with fade in/out and optional highlighted words",
|
|
2721
|
+
llmGuidance: "Use for narration/captions. highlightWords helps emphasize key terms."
|
|
2722
|
+
};
|
|
2723
|
+
|
|
2724
|
+
// src/components/composites/TikTokCaption.tsx
|
|
2725
|
+
var import_remotion35 = require("remotion");
|
|
2726
|
+
var import_zod39 = require("zod");
|
|
2727
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2728
|
+
var TikTokCaptionPropsSchema = import_zod39.z.object({
|
|
2729
|
+
text: import_zod39.z.string().max(150),
|
|
2730
|
+
fontSize: import_zod39.z.number().min(12).max(120).default(48),
|
|
2731
|
+
color: import_zod39.z.string().default("#FFFFFF"),
|
|
2732
|
+
strokeColor: import_zod39.z.string().default("#000000"),
|
|
2733
|
+
strokeWidth: import_zod39.z.number().min(0).max(10).default(3),
|
|
2734
|
+
position: import_zod39.z.enum(["center", "bottom"]).default("center"),
|
|
2735
|
+
highlightStyle: import_zod39.z.enum(["word", "bounce", "none"]).default("word")
|
|
2736
|
+
});
|
|
2737
|
+
var TikTokCaption = ({
|
|
2738
|
+
text,
|
|
2739
|
+
fontSize,
|
|
2740
|
+
color,
|
|
2741
|
+
strokeColor,
|
|
2742
|
+
strokeWidth,
|
|
2743
|
+
position,
|
|
2744
|
+
highlightStyle,
|
|
2745
|
+
__wavesDurationInFrames
|
|
2746
|
+
}) => {
|
|
2747
|
+
const frame = (0, import_remotion35.useCurrentFrame)();
|
|
2748
|
+
const total = Math.max(1, __wavesDurationInFrames ?? 1);
|
|
2749
|
+
const p = (0, import_remotion35.interpolate)(frame, [0, total], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
2750
|
+
const words = text.trim().split(/\s+/);
|
|
2751
|
+
const idx = highlightStyle === "none" ? -1 : Math.min(words.length - 1, Math.floor(p * words.length));
|
|
2752
|
+
const yStyle = position === "bottom" ? { alignItems: "flex-end", paddingBottom: 140 } : { alignItems: "center" };
|
|
2753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_remotion35.AbsoluteFill, { style: { display: "flex", justifyContent: "center", ...yStyle }, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { style: { textAlign: "center", padding: "0 80px", fontWeight: 900, lineHeight: 1.1 }, children: words.map((w, i) => {
|
|
2754
|
+
const isActive = i === idx && highlightStyle !== "none";
|
|
2755
|
+
const bounce = isActive && highlightStyle === "bounce" ? (0, import_remotion35.interpolate)(frame % 18, [0, 9, 18], [1, 1.08, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" }) : 1;
|
|
2756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2757
|
+
"span",
|
|
2758
|
+
{
|
|
2759
|
+
style: {
|
|
2760
|
+
display: "inline-block",
|
|
2761
|
+
marginRight: 12,
|
|
2762
|
+
fontSize,
|
|
2763
|
+
color: isActive ? "#FFD60A" : color,
|
|
2764
|
+
WebkitTextStroke: `${strokeWidth}px ${strokeColor}`,
|
|
2765
|
+
transform: `scale(${bounce})`
|
|
2766
|
+
},
|
|
2767
|
+
children: w
|
|
2768
|
+
},
|
|
2769
|
+
`${i}-${w}`
|
|
2770
|
+
);
|
|
2771
|
+
}) }) });
|
|
2772
|
+
};
|
|
2773
|
+
var TikTokCaptionComponentMetadata = {
|
|
2774
|
+
kind: "composite",
|
|
2775
|
+
category: "social",
|
|
2776
|
+
description: "TikTok-style captions with stroke and optional word highlighting",
|
|
2777
|
+
llmGuidance: 'Always keep strokeWidth>=2 for readability. highlightStyle="word" or "bounce" makes captions feel dynamic.'
|
|
2778
|
+
};
|
|
2779
|
+
|
|
2780
|
+
// src/components/composites/ThirdLowerBanner.tsx
|
|
2781
|
+
var import_remotion36 = require("remotion");
|
|
2782
|
+
var import_zod40 = require("zod");
|
|
2783
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2784
|
+
var ThirdLowerBannerPropsSchema = import_zod40.z.object({
|
|
2785
|
+
name: import_zod40.z.string().max(50),
|
|
2786
|
+
title: import_zod40.z.string().max(100),
|
|
2787
|
+
backgroundColor: import_zod40.z.string().default("rgba(0,0,0,0.8)"),
|
|
2788
|
+
primaryColor: import_zod40.z.string().default("#FFFFFF"),
|
|
2789
|
+
secondaryColor: import_zod40.z.string().default("#CCCCCC"),
|
|
2790
|
+
accentColor: import_zod40.z.string().default("#FF0000"),
|
|
2791
|
+
showAvatar: import_zod40.z.boolean().default(false),
|
|
2792
|
+
avatarSrc: import_zod40.z.string().optional()
|
|
2793
|
+
});
|
|
2794
|
+
var resolveAsset13 = (value) => isRemoteAssetPath(value) ? value : (0, import_remotion36.staticFile)(staticFileInputFromAssetPath(value));
|
|
2795
|
+
var ThirdLowerBanner = ({
|
|
2796
|
+
name,
|
|
2797
|
+
title,
|
|
2798
|
+
backgroundColor,
|
|
2799
|
+
primaryColor,
|
|
2800
|
+
secondaryColor,
|
|
2801
|
+
accentColor,
|
|
2802
|
+
showAvatar,
|
|
2803
|
+
avatarSrc
|
|
2804
|
+
}) => {
|
|
2805
|
+
const frame = (0, import_remotion36.useCurrentFrame)();
|
|
2806
|
+
const slide = (0, import_remotion36.interpolate)(frame, [0, 18], [-600, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
2807
|
+
const opacity = (0, import_remotion36.interpolate)(frame, [0, 10], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
2808
|
+
const avatar = showAvatar && typeof avatarSrc === "string" && avatarSrc.length > 0 ? avatarSrc : null;
|
|
2809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_remotion36.AbsoluteFill, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
2810
|
+
"div",
|
|
2811
|
+
{
|
|
2812
|
+
style: {
|
|
2813
|
+
position: "absolute",
|
|
2814
|
+
left: 80,
|
|
2815
|
+
bottom: 80,
|
|
2816
|
+
width: 980,
|
|
2817
|
+
height: 160,
|
|
2818
|
+
transform: `translateX(${slide}px)`,
|
|
2819
|
+
opacity,
|
|
2820
|
+
display: "flex",
|
|
2821
|
+
overflow: "hidden",
|
|
2822
|
+
borderRadius: 18,
|
|
2823
|
+
backgroundColor
|
|
2824
|
+
},
|
|
2825
|
+
children: [
|
|
2826
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { style: { width: 10, backgroundColor: accentColor } }),
|
|
2827
|
+
avatar ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { style: { width: 160, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2828
|
+
import_remotion36.Img,
|
|
2829
|
+
{
|
|
2830
|
+
src: resolveAsset13(avatar),
|
|
2831
|
+
style: { width: 110, height: 110, borderRadius: 9999, objectFit: "cover" }
|
|
2832
|
+
}
|
|
2833
|
+
) }) : null,
|
|
2834
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { style: { padding: "28px 36px", display: "flex", flexDirection: "column", justifyContent: "center" }, children: [
|
|
2835
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { style: { color: primaryColor, fontSize: 54, fontWeight: 800, lineHeight: 1 }, children: name }),
|
|
2836
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { style: { marginTop: 10, color: secondaryColor, fontSize: 28, fontWeight: 600 }, children: title })
|
|
2837
|
+
] })
|
|
2838
|
+
]
|
|
2839
|
+
}
|
|
2840
|
+
) });
|
|
2841
|
+
};
|
|
2842
|
+
var ThirdLowerBannerComponentMetadata = {
|
|
2843
|
+
kind: "composite",
|
|
2844
|
+
category: "layout",
|
|
2845
|
+
description: "Broadcast-style lower-third banner with name/title and optional avatar",
|
|
2846
|
+
llmGuidance: "Use for speaker introductions. name = big label, title = smaller subtitle. showAvatar + avatarSrc for profile image.",
|
|
2847
|
+
examples: [
|
|
2848
|
+
{ name: "Alex Chen", title: "Product Designer", accentColor: "#FF3B30" },
|
|
2849
|
+
{ name: "Depths AI", title: "Waves v0.2.0", showAvatar: false }
|
|
2850
|
+
]
|
|
2851
|
+
};
|
|
2852
|
+
|
|
2853
|
+
// src/components/composites/TypewriterText.tsx
|
|
2854
|
+
var import_remotion37 = require("remotion");
|
|
2855
|
+
var import_zod41 = require("zod");
|
|
2856
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2857
|
+
var TypewriterTextPropsSchema = import_zod41.z.object({
|
|
2858
|
+
content: import_zod41.z.string().max(500),
|
|
2859
|
+
fontSize: import_zod41.z.number().min(8).max(200).default(48),
|
|
2860
|
+
color: import_zod41.z.string().default("#FFFFFF"),
|
|
2861
|
+
fontFamily: import_zod41.z.string().default("Inter"),
|
|
2862
|
+
position: import_zod41.z.enum(["top", "center", "bottom"]).default("center"),
|
|
2863
|
+
speed: import_zod41.z.number().min(0.5).max(5).default(2),
|
|
2864
|
+
showCursor: import_zod41.z.boolean().default(true),
|
|
2865
|
+
cursorColor: import_zod41.z.string().default("#FFFFFF")
|
|
2866
|
+
});
|
|
2867
|
+
var positionStyles5 = (position) => {
|
|
2868
|
+
if (position === "top") return { justifyContent: "center", alignItems: "flex-start", paddingTop: 80 };
|
|
2869
|
+
if (position === "bottom") return { justifyContent: "center", alignItems: "flex-end", paddingBottom: 80 };
|
|
2870
|
+
return { justifyContent: "center", alignItems: "center" };
|
|
2871
|
+
};
|
|
2872
|
+
var TypewriterText = ({
|
|
2873
|
+
content,
|
|
2874
|
+
fontSize,
|
|
2875
|
+
color,
|
|
2876
|
+
fontFamily,
|
|
2877
|
+
position,
|
|
2878
|
+
speed,
|
|
2879
|
+
showCursor,
|
|
2880
|
+
cursorColor
|
|
2881
|
+
}) => {
|
|
2882
|
+
const frame = (0, import_remotion37.useCurrentFrame)();
|
|
2883
|
+
const charCount = Math.min(content.length, Math.max(0, Math.floor(frame * speed)));
|
|
2884
|
+
const shown = content.slice(0, charCount);
|
|
2885
|
+
const cursorVisible = showCursor && charCount < content.length ? frame % 30 < 15 : false;
|
|
2886
|
+
const cursorOpacity = cursorVisible ? 1 : 0;
|
|
2887
|
+
const cursorFade = (0, import_remotion37.interpolate)(frame % 30, [0, 5], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
2888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_remotion37.AbsoluteFill, { style: { display: "flex", ...positionStyles5(position) }, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { style: { fontSize, color, fontFamily, fontWeight: 600, textAlign: "center", whiteSpace: "pre-wrap" }, children: [
|
|
2889
|
+
shown,
|
|
2890
|
+
showCursor ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { style: { color: cursorColor, opacity: cursorOpacity * cursorFade }, children: "|" }) : null
|
|
2891
|
+
] }) });
|
|
2892
|
+
};
|
|
2893
|
+
var TypewriterTextComponentMetadata = {
|
|
2894
|
+
kind: "composite",
|
|
2895
|
+
category: "text",
|
|
2896
|
+
description: "Character-by-character text reveal with optional blinking cursor",
|
|
2897
|
+
llmGuidance: "Use for dramatic reveals and terminal-style text. speed ~1-2 is readable; 3-5 is fast.",
|
|
2898
|
+
examples: [
|
|
2899
|
+
{ content: "Hello Waves", speed: 2, position: "center", fontSize: 72 },
|
|
2900
|
+
{ content: 'console.log("hi")', speed: 1.5, fontFamily: "monospace", position: "top" }
|
|
2901
|
+
]
|
|
2902
|
+
};
|
|
2903
|
+
|
|
2904
|
+
// src/components/composites/TwitterCard.tsx
|
|
2905
|
+
var import_remotion38 = require("remotion");
|
|
2906
|
+
var import_zod42 = require("zod");
|
|
2907
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2908
|
+
var TwitterCardPropsSchema = import_zod42.z.object({
|
|
2909
|
+
author: import_zod42.z.string().min(1),
|
|
2910
|
+
handle: import_zod42.z.string().min(1),
|
|
2911
|
+
avatarSrc: import_zod42.z.string().optional(),
|
|
2912
|
+
tweet: import_zod42.z.string().max(280),
|
|
2913
|
+
image: import_zod42.z.string().optional(),
|
|
2914
|
+
timestamp: import_zod42.z.string().optional(),
|
|
2915
|
+
verified: import_zod42.z.boolean().default(false)
|
|
2916
|
+
});
|
|
2917
|
+
var resolveAsset14 = (value) => isRemoteAssetPath(value) ? value : (0, import_remotion38.staticFile)(staticFileInputFromAssetPath(value));
|
|
2918
|
+
var TwitterCard = ({ author, handle, avatarSrc, tweet, image, timestamp, verified }) => {
|
|
2919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_remotion38.AbsoluteFill, { style: { backgroundColor: "#0B0F14", justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2920
|
+
"div",
|
|
2921
|
+
{
|
|
2922
|
+
style: {
|
|
2923
|
+
width: 1100,
|
|
2924
|
+
borderRadius: 28,
|
|
2925
|
+
backgroundColor: "#FFFFFF",
|
|
2926
|
+
padding: 48,
|
|
2927
|
+
boxSizing: "border-box",
|
|
2928
|
+
boxShadow: "0 30px 90px rgba(0,0,0,0.35)"
|
|
2929
|
+
},
|
|
2930
|
+
children: [
|
|
2931
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { style: { display: "flex", gap: 18, alignItems: "center" }, children: [
|
|
2932
|
+
avatarSrc ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_remotion38.Img, { src: resolveAsset14(avatarSrc), style: { width: 78, height: 78, borderRadius: 9999, objectFit: "cover" } }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { style: { width: 78, height: 78, borderRadius: 9999, backgroundColor: "#E5E7EB" } }),
|
|
2933
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
2934
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { style: { display: "flex", gap: 10, alignItems: "center" }, children: [
|
|
2935
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { style: { fontSize: 34, fontWeight: 900, color: "#111827" }, children: author }),
|
|
2936
|
+
verified ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { style: { fontSize: 26, color: "#1D9BF0", fontWeight: 900 }, children: "\u2713" }) : null
|
|
2937
|
+
] }),
|
|
2938
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { style: { fontSize: 26, color: "#6B7280", fontWeight: 800 }, children: handle })
|
|
2939
|
+
] })
|
|
2940
|
+
] }),
|
|
2941
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { style: { marginTop: 28, fontSize: 36, lineHeight: 1.25, color: "#111827", fontWeight: 700 }, children: tweet }),
|
|
2942
|
+
image ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { style: { marginTop: 28, width: "100%", height: 520, overflow: "hidden", borderRadius: 22, backgroundColor: "#F3F4F6" }, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_remotion38.Img, { src: resolveAsset14(image), style: { width: "100%", height: "100%", objectFit: "cover" } }) }) : null,
|
|
2943
|
+
timestamp ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { style: { marginTop: 22, fontSize: 22, color: "#6B7280", fontWeight: 700 }, children: timestamp }) : null
|
|
2944
|
+
]
|
|
2945
|
+
}
|
|
2946
|
+
) });
|
|
2947
|
+
};
|
|
2948
|
+
var TwitterCardComponentMetadata = {
|
|
2949
|
+
kind: "composite",
|
|
2950
|
+
category: "social",
|
|
2951
|
+
description: "Twitter/X post card layout with author header and optional image",
|
|
2952
|
+
llmGuidance: "Use for announcements/testimonials. Keep tweet short for readability."
|
|
2953
|
+
};
|
|
2954
|
+
|
|
2955
|
+
// src/components/composites/Watermark.tsx
|
|
2956
|
+
var import_remotion39 = require("remotion");
|
|
2957
|
+
var import_zod43 = require("zod");
|
|
2958
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2959
|
+
var WatermarkPropsSchema = import_zod43.z.object({
|
|
2960
|
+
type: import_zod43.z.enum(["logo", "text"]).default("logo"),
|
|
2961
|
+
src: import_zod43.z.string().optional(),
|
|
2962
|
+
text: import_zod43.z.string().optional(),
|
|
2963
|
+
position: import_zod43.z.enum(["topLeft", "topRight", "bottomLeft", "bottomRight"]).default("bottomRight"),
|
|
2964
|
+
opacity: import_zod43.z.number().min(0.1).max(1).default(0.5),
|
|
2965
|
+
size: import_zod43.z.number().min(30).max(150).default(60),
|
|
2966
|
+
color: import_zod43.z.string().default("#FFFFFF")
|
|
2967
|
+
});
|
|
2968
|
+
var resolveAsset15 = (value) => isRemoteAssetPath(value) ? value : (0, import_remotion39.staticFile)(staticFileInputFromAssetPath(value));
|
|
2969
|
+
function posStyle(position) {
|
|
2970
|
+
const offset = 30;
|
|
2971
|
+
if (position === "topLeft") return { left: offset, top: offset };
|
|
2972
|
+
if (position === "topRight") return { right: offset, top: offset };
|
|
2973
|
+
if (position === "bottomLeft") return { left: offset, bottom: offset };
|
|
2974
|
+
return { right: offset, bottom: offset };
|
|
2975
|
+
}
|
|
2976
|
+
var Watermark = ({ type, src, text, position, opacity, size, color }) => {
|
|
2977
|
+
const style = {
|
|
2978
|
+
position: "absolute",
|
|
2979
|
+
...posStyle(position),
|
|
2980
|
+
opacity,
|
|
2981
|
+
pointerEvents: "none"
|
|
2982
|
+
};
|
|
2983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_remotion39.AbsoluteFill, { children: type === "text" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { style: { ...style, fontSize: Math.round(size * 0.6), color, fontWeight: 700 }, children: text ?? "" }) : src ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2984
|
+
import_remotion39.Img,
|
|
2985
|
+
{
|
|
2986
|
+
src: resolveAsset15(src),
|
|
2987
|
+
style: { ...style, width: size, height: size, objectFit: "contain" }
|
|
2988
|
+
}
|
|
2989
|
+
) : null });
|
|
2990
|
+
};
|
|
2991
|
+
var WatermarkComponentMetadata = {
|
|
2992
|
+
kind: "composite",
|
|
2993
|
+
category: "branding",
|
|
2994
|
+
description: "Persistent logo/text watermark in a corner",
|
|
2995
|
+
llmGuidance: "Use subtle opacity (0.3-0.6). bottomRight is standard.",
|
|
2996
|
+
examples: [
|
|
2997
|
+
{ type: "text", text: "@depths.ai", position: "bottomRight", opacity: 0.4, size: 60 },
|
|
2998
|
+
{ type: "logo", src: "/assets/logo.png", position: "topLeft", opacity: 0.5, size: 70 }
|
|
2999
|
+
]
|
|
3000
|
+
};
|
|
3001
|
+
|
|
3002
|
+
// src/components/composites/WipeTransition.tsx
|
|
3003
|
+
var import_remotion40 = require("remotion");
|
|
3004
|
+
var import_zod44 = require("zod");
|
|
3005
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3006
|
+
var WipeTransitionPropsSchema = import_zod44.z.object({
|
|
3007
|
+
durationInFrames: import_zod44.z.number().int().min(10).max(60).default(30),
|
|
3008
|
+
direction: import_zod44.z.enum(["left", "right", "up", "down", "diagonal"]).default("right"),
|
|
3009
|
+
softEdge: import_zod44.z.boolean().default(false),
|
|
3010
|
+
phase: import_zod44.z.enum(["in", "out", "inOut"]).default("inOut")
|
|
3011
|
+
});
|
|
3012
|
+
function clipFor2(direction, p) {
|
|
3013
|
+
if (direction === "left") return `inset(0 ${100 * (1 - p)}% 0 0)`;
|
|
3014
|
+
if (direction === "right") return `inset(0 0 0 ${100 * (1 - p)}%)`;
|
|
3015
|
+
if (direction === "up") return `inset(0 0 ${100 * (1 - p)}% 0)`;
|
|
3016
|
+
if (direction === "down") return `inset(${100 * (1 - p)}% 0 0 0)`;
|
|
3017
|
+
return `polygon(0 0, ${100 * p}% 0, 0 ${100 * p}%)`;
|
|
3018
|
+
}
|
|
3019
|
+
var WipeTransition = ({
|
|
3020
|
+
durationInFrames,
|
|
3021
|
+
direction,
|
|
3022
|
+
softEdge,
|
|
3023
|
+
phase,
|
|
3024
|
+
children,
|
|
3025
|
+
__wavesDurationInFrames
|
|
3026
|
+
}) => {
|
|
3027
|
+
const frame = (0, import_remotion40.useCurrentFrame)();
|
|
3028
|
+
const total = Math.max(1, __wavesDurationInFrames ?? 1);
|
|
3029
|
+
const d = Math.min(durationInFrames, total);
|
|
3030
|
+
let clipPath;
|
|
3031
|
+
if (phase === "in" || phase === "inOut") {
|
|
3032
|
+
const t = (0, import_remotion40.interpolate)(frame, [0, d], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
3033
|
+
clipPath = clipFor2(direction, t);
|
|
3034
|
+
}
|
|
3035
|
+
if (phase === "out" || phase === "inOut") {
|
|
3036
|
+
const start = Math.max(0, total - d);
|
|
3037
|
+
const t = (0, import_remotion40.interpolate)(frame, [start, total], [1, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
3038
|
+
clipPath = clipFor2(direction, t);
|
|
3039
|
+
}
|
|
3040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_remotion40.AbsoluteFill, { style: { clipPath, filter: softEdge ? "blur(0.4px)" : void 0 }, children });
|
|
3041
|
+
};
|
|
3042
|
+
var WipeTransitionComponentMetadata = {
|
|
3043
|
+
kind: "composite",
|
|
3044
|
+
category: "transition",
|
|
3045
|
+
acceptsChildren: true,
|
|
3046
|
+
minChildren: 1,
|
|
3047
|
+
description: "Directional wipe reveal/hide wrapper transition",
|
|
3048
|
+
llmGuidance: "Use as a more stylized reveal. softEdge can make it feel less harsh."
|
|
3049
|
+
};
|
|
3050
|
+
|
|
3051
|
+
// src/components/composites/YouTubeThumbnail.tsx
|
|
3052
|
+
var import_remotion41 = require("remotion");
|
|
3053
|
+
var import_zod45 = require("zod");
|
|
3054
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3055
|
+
var YouTubeThumbnailPropsSchema = import_zod45.z.object({
|
|
3056
|
+
backgroundImage: import_zod45.z.string().min(1),
|
|
3057
|
+
title: import_zod45.z.string().max(60),
|
|
3058
|
+
subtitle: import_zod45.z.string().max(40).optional(),
|
|
3059
|
+
thumbnailFace: import_zod45.z.string().optional(),
|
|
3060
|
+
accentColor: import_zod45.z.string().default("#FF0000"),
|
|
3061
|
+
style: import_zod45.z.enum(["bold", "minimal", "dramatic"]).default("bold")
|
|
3062
|
+
});
|
|
3063
|
+
var resolveAsset16 = (value) => isRemoteAssetPath(value) ? value : (0, import_remotion41.staticFile)(staticFileInputFromAssetPath(value));
|
|
3064
|
+
var YouTubeThumbnail = ({
|
|
3065
|
+
backgroundImage,
|
|
3066
|
+
title,
|
|
3067
|
+
subtitle,
|
|
3068
|
+
thumbnailFace,
|
|
3069
|
+
accentColor,
|
|
3070
|
+
style
|
|
3071
|
+
}) => {
|
|
3072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_remotion41.AbsoluteFill, { children: [
|
|
3073
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_remotion41.Img, { src: resolveAsset16(backgroundImage), style: { width: "100%", height: "100%", objectFit: "cover" } }),
|
|
3074
|
+
style === "dramatic" ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_remotion41.AbsoluteFill, { style: { backgroundColor: "rgba(0,0,0,0.35)" } }) : null,
|
|
3075
|
+
thumbnailFace ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3076
|
+
import_remotion41.Img,
|
|
3077
|
+
{
|
|
3078
|
+
src: resolveAsset16(thumbnailFace),
|
|
3079
|
+
style: { position: "absolute", right: 60, bottom: 0, width: 520, height: 720, objectFit: "cover" }
|
|
3080
|
+
}
|
|
3081
|
+
) : null,
|
|
3082
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { style: { position: "absolute", left: 70, top: 90, width: 1100 }, children: [
|
|
3083
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3084
|
+
"div",
|
|
3085
|
+
{
|
|
3086
|
+
style: {
|
|
3087
|
+
fontSize: style === "minimal" ? 86 : 110,
|
|
3088
|
+
fontWeight: 1e3,
|
|
3089
|
+
color: "#FFFFFF",
|
|
3090
|
+
textTransform: "uppercase",
|
|
3091
|
+
lineHeight: 0.95,
|
|
3092
|
+
WebkitTextStroke: style === "minimal" ? "0px transparent" : "10px #000000",
|
|
3093
|
+
textShadow: style === "minimal" ? "0 10px 40px rgba(0,0,0,0.6)" : void 0
|
|
3094
|
+
},
|
|
3095
|
+
children: title
|
|
3096
|
+
}
|
|
3097
|
+
),
|
|
3098
|
+
subtitle ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { style: { marginTop: 26, fontSize: 52, fontWeight: 900, color: accentColor, textShadow: "0 10px 30px rgba(0,0,0,0.6)" }, children: subtitle }) : null
|
|
3099
|
+
] }),
|
|
3100
|
+
style !== "minimal" ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { style: { position: "absolute", left: 70, bottom: 80, width: 260, height: 18, backgroundColor: accentColor, borderRadius: 9999 } }) : null
|
|
3101
|
+
] });
|
|
3102
|
+
};
|
|
3103
|
+
var YouTubeThumbnailComponentMetadata = {
|
|
3104
|
+
kind: "composite",
|
|
3105
|
+
category: "social",
|
|
3106
|
+
description: "YouTube-style thumbnail layout (16:9) with bold title and optional face cutout",
|
|
3107
|
+
llmGuidance: 'Use 1280x720 video size. Keep title short and high-contrast. style="bold" is classic thumbnail.'
|
|
3108
|
+
};
|
|
3109
|
+
|
|
3110
|
+
// src/components/composites/VideoWithOverlay.tsx
|
|
3111
|
+
var import_remotion42 = require("remotion");
|
|
3112
|
+
var import_zod46 = require("zod");
|
|
3113
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3114
|
+
var OverlaySchema = import_zod46.z.object({
|
|
3115
|
+
type: import_zod46.z.enum(["text", "logo", "gradient"]),
|
|
3116
|
+
content: import_zod46.z.string().optional(),
|
|
3117
|
+
opacity: import_zod46.z.number().min(0).max(1).default(0.3),
|
|
3118
|
+
position: import_zod46.z.enum(["top", "bottom", "center", "full"]).default("bottom")
|
|
3119
|
+
});
|
|
3120
|
+
var VideoWithOverlayPropsSchema = import_zod46.z.object({
|
|
3121
|
+
src: import_zod46.z.string().min(1),
|
|
3122
|
+
overlay: OverlaySchema.optional(),
|
|
3123
|
+
volume: import_zod46.z.number().min(0).max(1).default(1),
|
|
3124
|
+
playbackRate: import_zod46.z.number().min(0.5).max(2).default(1)
|
|
3125
|
+
});
|
|
3126
|
+
var resolveAsset17 = (value) => isRemoteAssetPath(value) ? value : (0, import_remotion42.staticFile)(staticFileInputFromAssetPath(value));
|
|
3127
|
+
var VideoWithOverlay = ({ src, overlay, volume, playbackRate }) => {
|
|
3128
|
+
const frame = (0, import_remotion42.useCurrentFrame)();
|
|
3129
|
+
const fade = (0, import_remotion42.interpolate)(frame, [0, 20], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
3130
|
+
const overlayNode = overlay ? overlay.type === "gradient" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3131
|
+
import_remotion42.AbsoluteFill,
|
|
3132
|
+
{
|
|
3133
|
+
style: {
|
|
3134
|
+
opacity: overlay.opacity,
|
|
3135
|
+
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))"
|
|
3136
|
+
}
|
|
3137
|
+
}
|
|
3138
|
+
) : overlay.type === "logo" && overlay.content ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_remotion42.AbsoluteFill, { style: { justifyContent: "center", alignItems: "center", opacity: overlay.opacity }, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_remotion42.Img, { src: resolveAsset17(overlay.content), style: { width: 220, height: 220, objectFit: "contain" } }) }) : overlay.type === "text" && overlay.content ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_remotion42.AbsoluteFill, { style: { justifyContent: "center", alignItems: "center", opacity: overlay.opacity }, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { style: { color: "#FFFFFF", fontSize: 56, fontWeight: 900, textAlign: "center", padding: "0 80px" }, children: overlay.content }) }) : null : null;
|
|
3139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_remotion42.AbsoluteFill, { children: [
|
|
3140
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3141
|
+
import_remotion42.Video,
|
|
3142
|
+
{
|
|
3143
|
+
src: resolveAsset17(src),
|
|
3144
|
+
style: { width: "100%", height: "100%", objectFit: "cover", opacity: fade },
|
|
3145
|
+
muted: volume === 0,
|
|
3146
|
+
playbackRate
|
|
3147
|
+
}
|
|
3148
|
+
),
|
|
3149
|
+
overlayNode
|
|
3150
|
+
] });
|
|
3151
|
+
};
|
|
3152
|
+
var VideoWithOverlayComponentMetadata = {
|
|
3153
|
+
kind: "composite",
|
|
3154
|
+
category: "media",
|
|
3155
|
+
description: "Video background with an optional overlay (text/logo/gradient)",
|
|
3156
|
+
llmGuidance: "Use gradient overlay to improve text readability. Set volume=0 to mute."
|
|
3157
|
+
};
|
|
3158
|
+
|
|
3159
|
+
// src/components/composites/ZoomTransition.tsx
|
|
3160
|
+
var import_remotion43 = require("remotion");
|
|
3161
|
+
var import_zod47 = require("zod");
|
|
3162
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3163
|
+
var ZoomTransitionPropsSchema = import_zod47.z.object({
|
|
3164
|
+
durationInFrames: import_zod47.z.number().int().min(10).max(60).default(30),
|
|
3165
|
+
type: import_zod47.z.enum(["zoomIn", "zoomOut"]).default("zoomIn"),
|
|
3166
|
+
phase: import_zod47.z.enum(["in", "out", "inOut"]).default("inOut")
|
|
3167
|
+
});
|
|
3168
|
+
var ZoomTransition = ({
|
|
3169
|
+
durationInFrames,
|
|
3170
|
+
type,
|
|
3171
|
+
phase,
|
|
3172
|
+
children,
|
|
3173
|
+
__wavesDurationInFrames
|
|
3174
|
+
}) => {
|
|
3175
|
+
const frame = (0, import_remotion43.useCurrentFrame)();
|
|
3176
|
+
const total = Math.max(1, __wavesDurationInFrames ?? 1);
|
|
3177
|
+
const d = Math.min(durationInFrames, total);
|
|
3178
|
+
let opacity = 1;
|
|
3179
|
+
let scale = 1;
|
|
3180
|
+
const enterFrom = type === "zoomIn" ? 1.2 : 0.85;
|
|
3181
|
+
const exitTo = type === "zoomIn" ? 1.25 : 0.75;
|
|
3182
|
+
if (phase === "in" || phase === "inOut") {
|
|
3183
|
+
const t = (0, import_remotion43.interpolate)(frame, [0, d], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
3184
|
+
scale *= enterFrom + (1 - enterFrom) * t;
|
|
3185
|
+
opacity *= t;
|
|
3186
|
+
}
|
|
3187
|
+
if (phase === "out" || phase === "inOut") {
|
|
3188
|
+
const start = Math.max(0, total - d);
|
|
3189
|
+
const t = (0, import_remotion43.interpolate)(frame, [start, total], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
3190
|
+
scale *= 1 + (exitTo - 1) * t;
|
|
3191
|
+
opacity *= 1 - t;
|
|
3192
|
+
}
|
|
3193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_remotion43.AbsoluteFill, { style: { opacity, transform: `scale(${scale})` }, children });
|
|
3194
|
+
};
|
|
3195
|
+
var ZoomTransitionComponentMetadata = {
|
|
3196
|
+
kind: "composite",
|
|
3197
|
+
category: "transition",
|
|
3198
|
+
acceptsChildren: true,
|
|
3199
|
+
minChildren: 1,
|
|
3200
|
+
description: "Zoom in/out wrapper transition",
|
|
3201
|
+
llmGuidance: 'Use for energetic cuts. type="zoomIn" feels punchy; type="zoomOut" feels calmer.'
|
|
3202
|
+
};
|
|
3203
|
+
|
|
3204
|
+
// src/components/registry.ts
|
|
3205
|
+
function registerBuiltInComponents() {
|
|
3206
|
+
if (!globalRegistry.has("Segment")) {
|
|
3207
|
+
globalRegistry.register({
|
|
3208
|
+
type: "Segment",
|
|
3209
|
+
component: Segment,
|
|
3210
|
+
propsSchema: SegmentPropsSchema,
|
|
3211
|
+
metadata: SegmentComponentMetadata
|
|
3212
|
+
});
|
|
3213
|
+
}
|
|
3214
|
+
if (!globalRegistry.has("Box")) {
|
|
3215
|
+
globalRegistry.register({
|
|
3216
|
+
type: "Box",
|
|
3217
|
+
component: Box,
|
|
3218
|
+
propsSchema: BoxPropsSchema,
|
|
3219
|
+
metadata: BoxComponentMetadata
|
|
3220
|
+
});
|
|
3221
|
+
}
|
|
3222
|
+
if (!globalRegistry.has("Stack")) {
|
|
3223
|
+
globalRegistry.register({
|
|
3224
|
+
type: "Stack",
|
|
3225
|
+
component: Stack,
|
|
3226
|
+
propsSchema: StackPropsSchema,
|
|
3227
|
+
metadata: StackComponentMetadata
|
|
3228
|
+
});
|
|
3229
|
+
}
|
|
3230
|
+
if (!globalRegistry.has("Grid")) {
|
|
3231
|
+
globalRegistry.register({
|
|
3232
|
+
type: "Grid",
|
|
3233
|
+
component: Grid,
|
|
3234
|
+
propsSchema: GridPropsSchema,
|
|
3235
|
+
metadata: GridComponentMetadata
|
|
3236
|
+
});
|
|
3237
|
+
}
|
|
3238
|
+
if (!globalRegistry.has("Image")) {
|
|
3239
|
+
globalRegistry.register({
|
|
3240
|
+
type: "Image",
|
|
3241
|
+
component: Image,
|
|
3242
|
+
propsSchema: ImagePropsSchema,
|
|
3243
|
+
metadata: ImageComponentMetadata
|
|
3244
|
+
});
|
|
3245
|
+
}
|
|
3246
|
+
if (!globalRegistry.has("Video")) {
|
|
3247
|
+
globalRegistry.register({
|
|
3248
|
+
type: "Video",
|
|
3249
|
+
component: Video2,
|
|
3250
|
+
propsSchema: VideoPropsSchema,
|
|
3251
|
+
metadata: VideoComponentMetadata
|
|
3252
|
+
});
|
|
3253
|
+
}
|
|
3254
|
+
if (!globalRegistry.has("Shape")) {
|
|
3255
|
+
globalRegistry.register({
|
|
3256
|
+
type: "Shape",
|
|
3257
|
+
component: Shape,
|
|
3258
|
+
propsSchema: ShapePropsSchema,
|
|
3259
|
+
metadata: ShapeComponentMetadata
|
|
3260
|
+
});
|
|
3261
|
+
}
|
|
3262
|
+
if (!globalRegistry.has("TypewriterText")) {
|
|
3263
|
+
globalRegistry.register({
|
|
3264
|
+
type: "TypewriterText",
|
|
3265
|
+
component: TypewriterText,
|
|
3266
|
+
propsSchema: TypewriterTextPropsSchema,
|
|
3267
|
+
metadata: TypewriterTextComponentMetadata
|
|
3268
|
+
});
|
|
3269
|
+
}
|
|
3270
|
+
if (!globalRegistry.has("SplitText")) {
|
|
3271
|
+
globalRegistry.register({
|
|
3272
|
+
type: "SplitText",
|
|
3273
|
+
component: SplitText,
|
|
3274
|
+
propsSchema: SplitTextPropsSchema,
|
|
3275
|
+
metadata: SplitTextComponentMetadata
|
|
3276
|
+
});
|
|
3277
|
+
}
|
|
3278
|
+
if (!globalRegistry.has("KenBurnsImage")) {
|
|
3279
|
+
globalRegistry.register({
|
|
3280
|
+
type: "KenBurnsImage",
|
|
3281
|
+
component: KenBurnsImage,
|
|
3282
|
+
propsSchema: KenBurnsImagePropsSchema,
|
|
3283
|
+
metadata: KenBurnsImageComponentMetadata
|
|
3284
|
+
});
|
|
3285
|
+
}
|
|
3286
|
+
if (!globalRegistry.has("FadeTransition")) {
|
|
3287
|
+
globalRegistry.register({
|
|
3288
|
+
type: "FadeTransition",
|
|
3289
|
+
component: FadeTransition,
|
|
3290
|
+
propsSchema: FadeTransitionPropsSchema,
|
|
3291
|
+
metadata: FadeTransitionComponentMetadata
|
|
3292
|
+
});
|
|
3293
|
+
}
|
|
3294
|
+
if (!globalRegistry.has("SlideTransition")) {
|
|
3295
|
+
globalRegistry.register({
|
|
3296
|
+
type: "SlideTransition",
|
|
3297
|
+
component: SlideTransition,
|
|
3298
|
+
propsSchema: SlideTransitionPropsSchema,
|
|
3299
|
+
metadata: SlideTransitionComponentMetadata
|
|
3300
|
+
});
|
|
3301
|
+
}
|
|
3302
|
+
if (!globalRegistry.has("SplitScreen")) {
|
|
3303
|
+
globalRegistry.register({
|
|
3304
|
+
type: "SplitScreen",
|
|
3305
|
+
component: SplitScreen,
|
|
3306
|
+
propsSchema: SplitScreenPropsSchema,
|
|
3307
|
+
metadata: SplitScreenComponentMetadata
|
|
3308
|
+
});
|
|
3309
|
+
}
|
|
3310
|
+
if (!globalRegistry.has("ThirdLowerBanner")) {
|
|
3311
|
+
globalRegistry.register({
|
|
3312
|
+
type: "ThirdLowerBanner",
|
|
3313
|
+
component: ThirdLowerBanner,
|
|
3314
|
+
propsSchema: ThirdLowerBannerPropsSchema,
|
|
3315
|
+
metadata: ThirdLowerBannerComponentMetadata
|
|
3316
|
+
});
|
|
3317
|
+
}
|
|
3318
|
+
if (!globalRegistry.has("AnimatedCounter")) {
|
|
3319
|
+
globalRegistry.register({
|
|
3320
|
+
type: "AnimatedCounter",
|
|
3321
|
+
component: AnimatedCounter,
|
|
3322
|
+
propsSchema: AnimatedCounterPropsSchema,
|
|
3323
|
+
metadata: AnimatedCounterComponentMetadata
|
|
3324
|
+
});
|
|
3325
|
+
}
|
|
3326
|
+
if (!globalRegistry.has("LogoReveal")) {
|
|
3327
|
+
globalRegistry.register({
|
|
3328
|
+
type: "LogoReveal",
|
|
3329
|
+
component: LogoReveal,
|
|
3330
|
+
propsSchema: LogoRevealPropsSchema,
|
|
3331
|
+
metadata: LogoRevealComponentMetadata
|
|
3332
|
+
});
|
|
3333
|
+
}
|
|
3334
|
+
if (!globalRegistry.has("Watermark")) {
|
|
3335
|
+
globalRegistry.register({
|
|
3336
|
+
type: "Watermark",
|
|
3337
|
+
component: Watermark,
|
|
3338
|
+
propsSchema: WatermarkPropsSchema,
|
|
3339
|
+
metadata: WatermarkComponentMetadata
|
|
3340
|
+
});
|
|
3341
|
+
}
|
|
3342
|
+
if (!globalRegistry.has("GlitchText")) {
|
|
3343
|
+
globalRegistry.register({
|
|
3344
|
+
type: "GlitchText",
|
|
3345
|
+
component: GlitchText,
|
|
3346
|
+
propsSchema: GlitchTextPropsSchema,
|
|
3347
|
+
metadata: GlitchTextComponentMetadata
|
|
3348
|
+
});
|
|
3349
|
+
}
|
|
3350
|
+
if (!globalRegistry.has("OutlineText")) {
|
|
3351
|
+
globalRegistry.register({
|
|
3352
|
+
type: "OutlineText",
|
|
3353
|
+
component: OutlineText,
|
|
3354
|
+
propsSchema: OutlineTextPropsSchema,
|
|
3355
|
+
metadata: OutlineTextComponentMetadata
|
|
3356
|
+
});
|
|
3357
|
+
}
|
|
3358
|
+
if (!globalRegistry.has("ImageReveal")) {
|
|
3359
|
+
globalRegistry.register({
|
|
3360
|
+
type: "ImageReveal",
|
|
3361
|
+
component: ImageReveal,
|
|
3362
|
+
propsSchema: ImageRevealPropsSchema,
|
|
3363
|
+
metadata: ImageRevealComponentMetadata
|
|
3364
|
+
});
|
|
3365
|
+
}
|
|
3366
|
+
if (!globalRegistry.has("ImageCollage")) {
|
|
3367
|
+
globalRegistry.register({
|
|
3368
|
+
type: "ImageCollage",
|
|
3369
|
+
component: ImageCollage,
|
|
3370
|
+
propsSchema: ImageCollagePropsSchema,
|
|
3371
|
+
metadata: ImageCollageComponentMetadata
|
|
3372
|
+
});
|
|
3373
|
+
}
|
|
3374
|
+
if (!globalRegistry.has("ProgressBar")) {
|
|
3375
|
+
globalRegistry.register({
|
|
3376
|
+
type: "ProgressBar",
|
|
3377
|
+
component: ProgressBar,
|
|
3378
|
+
propsSchema: ProgressBarPropsSchema,
|
|
3379
|
+
metadata: ProgressBarComponentMetadata
|
|
3380
|
+
});
|
|
3381
|
+
}
|
|
3382
|
+
if (!globalRegistry.has("ProgressRing")) {
|
|
3383
|
+
globalRegistry.register({
|
|
3384
|
+
type: "ProgressRing",
|
|
3385
|
+
component: ProgressRing,
|
|
3386
|
+
propsSchema: ProgressRingPropsSchema,
|
|
3387
|
+
metadata: ProgressRingComponentMetadata
|
|
3388
|
+
});
|
|
3389
|
+
}
|
|
3390
|
+
if (!globalRegistry.has("BarChart")) {
|
|
3391
|
+
globalRegistry.register({
|
|
3392
|
+
type: "BarChart",
|
|
3393
|
+
component: BarChart,
|
|
3394
|
+
propsSchema: BarChartPropsSchema,
|
|
3395
|
+
metadata: BarChartComponentMetadata
|
|
3396
|
+
});
|
|
3397
|
+
}
|
|
3398
|
+
if (!globalRegistry.has("InstagramStory")) {
|
|
3399
|
+
globalRegistry.register({
|
|
3400
|
+
type: "InstagramStory",
|
|
3401
|
+
component: InstagramStory,
|
|
3402
|
+
propsSchema: InstagramStoryPropsSchema,
|
|
3403
|
+
metadata: InstagramStoryComponentMetadata
|
|
3404
|
+
});
|
|
3405
|
+
}
|
|
3406
|
+
if (!globalRegistry.has("TikTokCaption")) {
|
|
3407
|
+
globalRegistry.register({
|
|
3408
|
+
type: "TikTokCaption",
|
|
3409
|
+
component: TikTokCaption,
|
|
3410
|
+
propsSchema: TikTokCaptionPropsSchema,
|
|
3411
|
+
metadata: TikTokCaptionComponentMetadata
|
|
3412
|
+
});
|
|
3413
|
+
}
|
|
3414
|
+
if (!globalRegistry.has("IntroScene")) {
|
|
3415
|
+
globalRegistry.register({
|
|
3416
|
+
type: "IntroScene",
|
|
3417
|
+
component: IntroScene,
|
|
3418
|
+
propsSchema: IntroScenePropsSchema,
|
|
3419
|
+
metadata: IntroSceneComponentMetadata
|
|
3420
|
+
});
|
|
3421
|
+
}
|
|
3422
|
+
if (!globalRegistry.has("CountUpText")) {
|
|
3423
|
+
globalRegistry.register({
|
|
3424
|
+
type: "CountUpText",
|
|
3425
|
+
component: CountUpText,
|
|
3426
|
+
propsSchema: CountUpTextPropsSchema,
|
|
3427
|
+
metadata: CountUpTextComponentMetadata
|
|
3428
|
+
});
|
|
3429
|
+
}
|
|
3430
|
+
if (!globalRegistry.has("KineticTypography")) {
|
|
3431
|
+
globalRegistry.register({
|
|
3432
|
+
type: "KineticTypography",
|
|
3433
|
+
component: KineticTypography,
|
|
3434
|
+
propsSchema: KineticTypographyPropsSchema,
|
|
3435
|
+
metadata: KineticTypographyComponentMetadata
|
|
3436
|
+
});
|
|
3437
|
+
}
|
|
3438
|
+
if (!globalRegistry.has("SubtitleText")) {
|
|
3439
|
+
globalRegistry.register({
|
|
3440
|
+
type: "SubtitleText",
|
|
3441
|
+
component: SubtitleText,
|
|
3442
|
+
propsSchema: SubtitleTextPropsSchema,
|
|
3443
|
+
metadata: SubtitleTextComponentMetadata
|
|
3444
|
+
});
|
|
3445
|
+
}
|
|
3446
|
+
if (!globalRegistry.has("ImageSequence")) {
|
|
3447
|
+
globalRegistry.register({
|
|
3448
|
+
type: "ImageSequence",
|
|
3449
|
+
component: ImageSequence,
|
|
3450
|
+
propsSchema: ImageSequencePropsSchema,
|
|
3451
|
+
metadata: ImageSequenceComponentMetadata
|
|
3452
|
+
});
|
|
3453
|
+
}
|
|
3454
|
+
if (!globalRegistry.has("ImageWithCaption")) {
|
|
3455
|
+
globalRegistry.register({
|
|
3456
|
+
type: "ImageWithCaption",
|
|
3457
|
+
component: ImageWithCaption,
|
|
3458
|
+
propsSchema: ImageWithCaptionPropsSchema,
|
|
3459
|
+
metadata: ImageWithCaptionComponentMetadata
|
|
3460
|
+
});
|
|
3461
|
+
}
|
|
3462
|
+
if (!globalRegistry.has("VideoWithOverlay")) {
|
|
3463
|
+
globalRegistry.register({
|
|
3464
|
+
type: "VideoWithOverlay",
|
|
3465
|
+
component: VideoWithOverlay,
|
|
3466
|
+
propsSchema: VideoWithOverlayPropsSchema,
|
|
3467
|
+
metadata: VideoWithOverlayComponentMetadata
|
|
3468
|
+
});
|
|
3469
|
+
}
|
|
3470
|
+
if (!globalRegistry.has("ZoomTransition")) {
|
|
3471
|
+
globalRegistry.register({
|
|
3472
|
+
type: "ZoomTransition",
|
|
3473
|
+
component: ZoomTransition,
|
|
3474
|
+
propsSchema: ZoomTransitionPropsSchema,
|
|
3475
|
+
metadata: ZoomTransitionComponentMetadata
|
|
3476
|
+
});
|
|
3477
|
+
}
|
|
3478
|
+
if (!globalRegistry.has("WipeTransition")) {
|
|
3479
|
+
globalRegistry.register({
|
|
3480
|
+
type: "WipeTransition",
|
|
3481
|
+
component: WipeTransition,
|
|
3482
|
+
propsSchema: WipeTransitionPropsSchema,
|
|
3483
|
+
metadata: WipeTransitionComponentMetadata
|
|
3484
|
+
});
|
|
3485
|
+
}
|
|
3486
|
+
if (!globalRegistry.has("CircularReveal")) {
|
|
3487
|
+
globalRegistry.register({
|
|
3488
|
+
type: "CircularReveal",
|
|
3489
|
+
component: CircularReveal,
|
|
3490
|
+
propsSchema: CircularRevealPropsSchema,
|
|
3491
|
+
metadata: CircularRevealComponentMetadata
|
|
3492
|
+
});
|
|
3493
|
+
}
|
|
3494
|
+
if (!globalRegistry.has("CardStack")) {
|
|
3495
|
+
globalRegistry.register({
|
|
3496
|
+
type: "CardStack",
|
|
3497
|
+
component: CardStack,
|
|
3498
|
+
propsSchema: CardStackPropsSchema,
|
|
3499
|
+
metadata: CardStackComponentMetadata
|
|
3500
|
+
});
|
|
3501
|
+
}
|
|
3502
|
+
if (!globalRegistry.has("GridLayout")) {
|
|
3503
|
+
globalRegistry.register({
|
|
3504
|
+
type: "GridLayout",
|
|
3505
|
+
component: GridLayout,
|
|
3506
|
+
propsSchema: GridLayoutPropsSchema,
|
|
3507
|
+
metadata: GridLayoutComponentMetadata
|
|
3508
|
+
});
|
|
3509
|
+
}
|
|
3510
|
+
if (!globalRegistry.has("LineGraph")) {
|
|
3511
|
+
globalRegistry.register({
|
|
3512
|
+
type: "LineGraph",
|
|
3513
|
+
component: LineGraph,
|
|
3514
|
+
propsSchema: LineGraphPropsSchema,
|
|
3515
|
+
metadata: LineGraphComponentMetadata
|
|
3516
|
+
});
|
|
3517
|
+
}
|
|
3518
|
+
if (!globalRegistry.has("YouTubeThumbnail")) {
|
|
3519
|
+
globalRegistry.register({
|
|
3520
|
+
type: "YouTubeThumbnail",
|
|
3521
|
+
component: YouTubeThumbnail,
|
|
3522
|
+
propsSchema: YouTubeThumbnailPropsSchema,
|
|
3523
|
+
metadata: YouTubeThumbnailComponentMetadata
|
|
3524
|
+
});
|
|
3525
|
+
}
|
|
3526
|
+
if (!globalRegistry.has("TwitterCard")) {
|
|
3527
|
+
globalRegistry.register({
|
|
3528
|
+
type: "TwitterCard",
|
|
3529
|
+
component: TwitterCard,
|
|
3530
|
+
propsSchema: TwitterCardPropsSchema,
|
|
3531
|
+
metadata: TwitterCardComponentMetadata
|
|
3532
|
+
});
|
|
3533
|
+
}
|
|
3534
|
+
if (!globalRegistry.has("OutroScene")) {
|
|
3535
|
+
globalRegistry.register({
|
|
3536
|
+
type: "OutroScene",
|
|
3537
|
+
component: OutroScene,
|
|
3538
|
+
propsSchema: OutroScenePropsSchema,
|
|
3539
|
+
metadata: OutroSceneComponentMetadata
|
|
3540
|
+
});
|
|
3541
|
+
}
|
|
3542
|
+
if (!globalRegistry.has("Scene")) {
|
|
3543
|
+
globalRegistry.register({
|
|
3544
|
+
type: "Scene",
|
|
3545
|
+
component: Scene,
|
|
3546
|
+
propsSchema: ScenePropsSchema,
|
|
3547
|
+
metadata: SceneComponentMetadata
|
|
3548
|
+
});
|
|
3549
|
+
}
|
|
3550
|
+
if (!globalRegistry.has("Text")) {
|
|
3551
|
+
globalRegistry.register({
|
|
3552
|
+
type: "Text",
|
|
3553
|
+
component: Text,
|
|
3554
|
+
propsSchema: TextPropsSchema,
|
|
3555
|
+
metadata: TextComponentMetadata
|
|
3556
|
+
});
|
|
3557
|
+
}
|
|
3558
|
+
if (!globalRegistry.has("Audio")) {
|
|
3559
|
+
globalRegistry.register({
|
|
3560
|
+
type: "Audio",
|
|
3561
|
+
component: Audio,
|
|
3562
|
+
propsSchema: AudioPropsSchema,
|
|
3563
|
+
metadata: AudioComponentMetadata
|
|
3564
|
+
});
|
|
3565
|
+
}
|
|
3566
|
+
}
|
|
3567
|
+
|
|
3568
|
+
// src/llm/prompt.ts
|
|
3569
|
+
var RULES = {
|
|
3570
|
+
timing: [
|
|
3571
|
+
"All timing is in frames (integers).",
|
|
3572
|
+
'Prefer authoring using "segments" (high-level). Each segment has { durationInFrames, root } and start times are derived by order.',
|
|
3573
|
+
'Use "timeline" only for advanced cases (explicit timings, overlaps).',
|
|
3574
|
+
"If you provide timing on nodes, timing is { from, durationInFrames } and children timing is relative to the parent duration.",
|
|
3575
|
+
"Total duration must match video.durationInFrames."
|
|
3576
|
+
],
|
|
3577
|
+
assets: [
|
|
3578
|
+
'Asset paths must be either full URLs (http:// or https://) or absolute public paths starting with "/".',
|
|
3579
|
+
'When using absolute public paths ("/assets/..."), the renderer resolves them relative to the --publicDir passed at render time.'
|
|
3580
|
+
],
|
|
3581
|
+
ids: [
|
|
3582
|
+
"Every component must have a stable string id.",
|
|
3583
|
+
"Ids should be unique within the whole IR."
|
|
3584
|
+
],
|
|
3585
|
+
output: [
|
|
3586
|
+
"Return only a single JSON object (no markdown fences, no commentary).",
|
|
3587
|
+
"The JSON must validate against the provided JSON Schemas.",
|
|
3588
|
+
'Only use component "type" values that exist in schemas.components.'
|
|
3589
|
+
]
|
|
3590
|
+
};
|
|
3591
|
+
function getSystemPrompt(registeredTypes) {
|
|
3592
|
+
const maxInline = 40;
|
|
3593
|
+
const typesLine = registeredTypes.length <= maxInline ? registeredTypes.length ? registeredTypes.join(", ") : "(none)" : `${registeredTypes.length} types (see schemas.components keys). Example: ${registeredTypes.slice(0, 20).join(", ")}, ...`;
|
|
3594
|
+
return [
|
|
3595
|
+
"You generate JSON for @depths/waves Video IR (version 2.0).",
|
|
3596
|
+
"",
|
|
3597
|
+
"Goal:",
|
|
3598
|
+
"- Produce a single JSON object that conforms to the provided Video IR JSON Schema and uses only registered component types.",
|
|
3599
|
+
"",
|
|
3600
|
+
"Registered component types:",
|
|
3601
|
+
`- ${typesLine}`,
|
|
3602
|
+
"",
|
|
3603
|
+
"Authoring rules:",
|
|
3604
|
+
...RULES.output.map((r) => `- ${r}`),
|
|
3605
|
+
...RULES.timing.map((r) => `- ${r}`),
|
|
3606
|
+
...RULES.assets.map((r) => `- ${r}`),
|
|
3607
|
+
...RULES.ids.map((r) => `- ${r}`),
|
|
3608
|
+
"",
|
|
3609
|
+
"If you are unsure about an asset, prefer a solid color Scene background and omit optional props to use defaults.",
|
|
3610
|
+
""
|
|
3611
|
+
].join("\n");
|
|
3612
|
+
}
|
|
3613
|
+
function getPromptPayload(options) {
|
|
685
3614
|
registerBuiltInComponents();
|
|
686
3615
|
const registry = options?.registry ?? globalRegistry;
|
|
687
|
-
const types = registry.
|
|
3616
|
+
const types = registry.getTypesForLLM().sort();
|
|
3617
|
+
const categories = {};
|
|
3618
|
+
const items = [];
|
|
3619
|
+
for (const t of types) {
|
|
3620
|
+
const reg = registry.get(t);
|
|
3621
|
+
if (!reg) continue;
|
|
3622
|
+
const cat = reg.metadata.category;
|
|
3623
|
+
if (!categories[cat]) categories[cat] = [];
|
|
3624
|
+
categories[cat].push(t);
|
|
3625
|
+
const llmGuidance = reg.metadata.llmGuidance;
|
|
3626
|
+
items.push({
|
|
3627
|
+
type: t,
|
|
3628
|
+
kind: reg.metadata.kind,
|
|
3629
|
+
category: cat,
|
|
3630
|
+
description: reg.metadata.description,
|
|
3631
|
+
...typeof llmGuidance === "string" ? { llmGuidance } : {}
|
|
3632
|
+
});
|
|
3633
|
+
}
|
|
688
3634
|
return {
|
|
689
3635
|
package: "@depths/waves",
|
|
690
3636
|
version: __wavesVersion,
|
|
691
|
-
irVersion: "
|
|
3637
|
+
irVersion: "2.0",
|
|
692
3638
|
systemPrompt: getSystemPrompt(types),
|
|
3639
|
+
catalog: {
|
|
3640
|
+
categories,
|
|
3641
|
+
items
|
|
3642
|
+
},
|
|
693
3643
|
schemas: {
|
|
694
|
-
videoIR: zodSchemaToJsonSchema(
|
|
3644
|
+
videoIR: zodSchemaToJsonSchema(VideoIRv2AuthoringSchema),
|
|
695
3645
|
components: registry.getJSONSchemaForLLM()
|
|
696
3646
|
},
|
|
697
3647
|
rules: {
|
|
@@ -706,13 +3656,12 @@ function getPromptPayload(options) {
|
|
|
706
3656
|
// src/index.ts
|
|
707
3657
|
async function renderVideo(ir, options) {
|
|
708
3658
|
registerBuiltInComponents();
|
|
709
|
-
const engine = new WavesEngine(globalRegistry, new IRValidator());
|
|
3659
|
+
const engine = new WavesEngine(globalRegistry, new IRValidator(globalRegistry));
|
|
710
3660
|
await engine.render(ir, options);
|
|
711
3661
|
}
|
|
712
3662
|
// Annotate the CommonJS export names for ESM import in node:
|
|
713
3663
|
0 && (module.exports = {
|
|
714
3664
|
ComponentRegistry,
|
|
715
|
-
ComponentSchemas,
|
|
716
3665
|
IRValidator,
|
|
717
3666
|
VideoIRSchema,
|
|
718
3667
|
WavesEngine,
|