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