motionrender 0.2.1 → 0.2.2
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/dist/cli.js +2634 -528
- package/dist/index.js +46 -1
- package/dist/player.js +13 -13
- package/dist/react.js +704 -9
- package/dist/types/packages/ai/src/agent.d.ts +57 -0
- package/dist/types/packages/ai/src/brand-scraper.d.ts +35 -0
- package/dist/types/packages/ai/src/captions.d.ts +11 -0
- package/dist/types/packages/ai/src/compose.d.ts +2 -0
- package/dist/types/packages/ai/src/edit.d.ts +69 -0
- package/dist/types/packages/ai/src/index.d.ts +8 -1
- package/dist/types/packages/ai/src/plan.d.ts +42 -0
- package/dist/types/packages/ai/src/prompt.d.ts +18 -0
- package/dist/types/packages/ai/src/providers.d.ts +35 -2
- package/dist/types/packages/ai/src/registry.d.ts +81 -0
- package/dist/types/packages/ai/src/retime.d.ts +7 -0
- package/dist/types/packages/ai/src/shorts.d.ts +75 -0
- package/dist/types/packages/cli/src/agent-cli.d.ts +15 -0
- package/dist/types/packages/cli/src/ai-studio-page.d.ts +1 -1
- package/dist/types/packages/cli/src/ai.d.ts +1 -1
- package/dist/types/packages/cli/src/build.d.ts +2 -0
- package/dist/types/packages/cli/src/templates.d.ts +13 -4
- package/dist/types/packages/contracts/src/index.d.ts +12 -12
- package/dist/types/packages/core/src/review.d.ts +24 -0
- package/dist/types/packages/ffmpeg/src/index.d.ts +1 -0
- package/dist/types/packages/jobs/src/queue.d.ts +2 -2
- package/dist/types/packages/jobs/src/redis.d.ts +2 -2
- package/dist/types/packages/react/src/components.d.ts +166 -0
- package/dist/types/packages/react/src/index.d.ts +54 -2
- package/dist/types/packages/react/src/springs.d.ts +25 -0
- package/dist/types/packages/schema/src/captions.d.ts +2 -0
- package/dist/types/packages/schema/src/index.d.ts +66 -66
- package/dist/types/scripts/eval-briefs.d.ts +67 -0
- package/package.json +1 -1
- package/skills/ove/SKILL.md +40 -2
- package/skills/ove-agent/SKILL.md +144 -0
- package/skills/ove-code-video/SKILL.md +17 -9
- package/skills/ove-motion-graphics/SKILL.md +113 -0
- package/skills/ove-react-video/SKILL.md +212 -0
- package/skills/ove-remotion/SKILL.md +122 -0
- package/studio/assets/index-DmZj9wTZ.css +1 -0
- package/studio/assets/index-n3DJI_GV.js +10 -0
- package/studio/index.html +2 -2
- package/templates/case-study/composition.json +25 -10
- package/templates/event-invite/composition.json +12 -2
- package/templates/explainer-square/composition.json +1 -1
- package/templates/keynote-wide/composition.json +2 -2
- package/templates/kinetic-reel/composition.json +73 -0
- package/templates/kinetic-reel/composition.schema.json +9295 -0
- package/templates/kinetic-reel/template.json +17 -0
- package/templates/kinetic-reel/video.bundle.js +72 -0
- package/templates/kinetic-reel/video.tsx +283 -0
- package/templates/product-card/composition.json +7 -2
- package/templates/product-wide/composition.json +1 -1
- package/templates/quote-card/composition.json +6 -1
- package/templates/saas-launch/composition.json +70 -0
- package/templates/saas-launch/composition.schema.json +9295 -0
- package/templates/saas-launch/template.json +16 -0
- package/templates/saas-launch/video.bundle.js +72 -0
- package/templates/saas-launch/video.tsx +217 -0
- package/templates/sale-promo/composition.json +16 -1
- package/templates/showcase-tall/composition.json +4 -4
- package/templates/slideshow/composition.json +1 -1
- package/templates/social-reel/composition.json +19 -4
- package/templates/story-tall/composition.json +1 -1
- package/studio/assets/index-CzOvWv9w.css +0 -1
- package/studio/assets/index-J_fvKgng.js +0 -11
package/dist/index.js
CHANGED
|
@@ -483,7 +483,35 @@ var captionLines = (cues, maxWords) => cues.flatMap((cue) => cue.words && cue.wo
|
|
|
483
483
|
|
|
484
484
|
// packages/schema/src/index.ts
|
|
485
485
|
var color = z3.string().regex(colorPattern);
|
|
486
|
-
var
|
|
486
|
+
var fontWeightMap = {
|
|
487
|
+
thin: 100,
|
|
488
|
+
hairline: 100,
|
|
489
|
+
extralight: 200,
|
|
490
|
+
ultralight: 200,
|
|
491
|
+
"extra-light": 200,
|
|
492
|
+
"ultra-light": 200,
|
|
493
|
+
light: 300,
|
|
494
|
+
regular: 400,
|
|
495
|
+
medium: 500,
|
|
496
|
+
semibold: 600,
|
|
497
|
+
demibold: 600,
|
|
498
|
+
"semi-bold": 600,
|
|
499
|
+
"demi-bold": 600,
|
|
500
|
+
extrabold: 800,
|
|
501
|
+
ultrabold: 800,
|
|
502
|
+
"extra-bold": 800,
|
|
503
|
+
"ultra-bold": 800,
|
|
504
|
+
black: 900,
|
|
505
|
+
heavy: 900
|
|
506
|
+
};
|
|
507
|
+
var fontWeight = z3.preprocess((val) => {
|
|
508
|
+
if (typeof val === "string") {
|
|
509
|
+
const s = val.trim().toLowerCase();
|
|
510
|
+
if (/^\d+$/.test(s)) return parseInt(s, 10);
|
|
511
|
+
if (s in fontWeightMap) return fontWeightMap[s];
|
|
512
|
+
}
|
|
513
|
+
return val;
|
|
514
|
+
}, z3.union([z3.number().int().min(1).max(1e3), z3.enum(["normal", "bold"])]));
|
|
487
515
|
var fontStyle = z3.enum(["normal", "italic"]);
|
|
488
516
|
var easingSchema = z3.union([z3.enum(["linear", "easeIn", "easeOut", "easeInOut", "easeInCubic", "easeOutCubic", "easeInOutCubic", "easeInQuart", "easeOutQuart", "easeInOutQuart", "easeInExpo", "easeOutExpo", "easeInOutExpo", "easeInBack", "easeOutBack", "spring", "hold", "land", "snap", "glide", "pop", "move", "exit", "drift"]).describe("land, snap, glide and pop for entries, move within the frame, exit for leaving, drift for slow continuous motion; or a standard curve"), z3.tuple([z3.number().min(0).max(1), z3.number(), z3.number().min(0).max(1), z3.number()]).describe("Cubic B\xE9zier control points [x1, y1, x2, y2], as in CSS")]);
|
|
489
517
|
var colorProperties = ["fill", "color", "stroke"];
|
|
@@ -1932,6 +1960,16 @@ async function measureLoudness(composition, baseDir) {
|
|
|
1932
1960
|
var area = (a) => Math.max(0, a.x1 - a.x0) * Math.max(0, a.y1 - a.y0);
|
|
1933
1961
|
var overlap = (a, b) => Math.max(0, Math.min(a.x1, b.x1) - Math.max(a.x0, b.x0)) * Math.max(0, Math.min(a.y1, b.y1) - Math.max(a.y0, b.y0));
|
|
1934
1962
|
var seconds2 = (frame, fps) => `${(frame / fps).toFixed(1)} s`;
|
|
1963
|
+
function safeZoneBands(width, height, override) {
|
|
1964
|
+
const screen = width * 16 / 9, letterbox = height >= width ? Math.max(0, (screen - height) / 2) : 0;
|
|
1965
|
+
const inset = { ...height >= width ? { top: Math.max(0, 0.08 * screen - letterbox) / height, bottom: Math.max(0, 0.18 * screen - letterbox) / height, left: 0.02, right: 0.11 } : {}, ...override };
|
|
1966
|
+
const bands = [];
|
|
1967
|
+
if (inset.bottom) bands.push({ name: "bottom UI band", hint: `Reels and TikTok draw their controls over the bottom ${Math.round(inset.bottom * height)} px: keep text above y ${Math.round(height - inset.bottom * height)}`, x0: 0, y0: height - inset.bottom * height, x1: width, y1: height });
|
|
1968
|
+
if (inset.right) bands.push({ name: "right UI band", hint: `the action buttons cover the right ${Math.round(inset.right * width)} px: keep text left of x ${Math.round(width - inset.right * width)}`, x0: width - inset.right * width, y0: 0, x1: width, y1: height });
|
|
1969
|
+
if (inset.top) bands.push({ name: "top UI band", hint: `search and the camera cover the top ${Math.round(inset.top * height)} px: keep text below y ${Math.round(inset.top * height)}`, x0: 0, y0: 0, x1: width, y1: inset.top * height });
|
|
1970
|
+
if (inset.left) bands.push({ name: "left UI band", hint: `keep text right of x ${Math.round(inset.left * width)}`, x0: 0, y0: 0, x1: inset.left * width, y1: height });
|
|
1971
|
+
return bands;
|
|
1972
|
+
}
|
|
1935
1973
|
async function reviewComposition(composition, options = {}) {
|
|
1936
1974
|
const { fps, width, height, durationFrames } = composition, baseDir = options.baseDir ?? process.cwd();
|
|
1937
1975
|
const every = Math.max(1, Math.round(options.every ?? fps / 2)), frames = [];
|
|
@@ -1980,6 +2018,12 @@ async function reviewComposition(composition, options = {}) {
|
|
|
1980
2018
|
const other = report.texts.find((o) => o !== t && o.id !== t.id && visible(o) && overlap(t, o) > 0.15 * Math.min(area(t), area(o)) && (t.kind === "captions" || o.kind === "captions" || t.id < o.id));
|
|
1981
2019
|
return other ? t.kind === "captions" || other.kind === "captions" ? `"${(t.kind === "captions" ? other : t).text}" sits under the captions: keep content out of the captions band` : `"${t.text}" overlaps "${other.text}"` : void 0;
|
|
1982
2020
|
}, "error");
|
|
2021
|
+
const bands = safeZoneBands(width, height, options.safeZone);
|
|
2022
|
+
if (bands.length) persistent("safe-zone", hold, (t) => {
|
|
2023
|
+
if (!visible(t)) return;
|
|
2024
|
+
const band = bands.find((b) => overlap(t, b) > 0.25 * area(t));
|
|
2025
|
+
return band ? `"${t.text}" sits in the ${band.name}: ${band.hint}` : void 0;
|
|
2026
|
+
}, "warning");
|
|
1983
2027
|
const crowded = reports.map((r) => r.texts.filter((t) => visible(t) && t.kind === "text").reduce((n, t) => n + t.words, 0) > 40), busy = crowded.findIndex((_, i) => i + hold <= crowded.length && crowded.slice(i, i + hold).every(Boolean));
|
|
1984
2028
|
if (busy >= 0) issues.push({ severity: "warning", code: "busy", message: `More than 40 words on screen at ${seconds2(frames[busy], fps)}: split it across beats or cut words`, frame: frames[busy] });
|
|
1985
2029
|
const texts = reports.flatMap((r) => r.texts).filter((t) => visible(t) && t.kind === "text"), sizes = [...new Set(texts.map((t) => Math.round(t.baseSize)))].sort((a, b) => b - a), colours = [...new Set(texts.map((t) => t.color.toLowerCase()).filter((c) => c !== "gradient"))];
|
|
@@ -2272,6 +2316,7 @@ export {
|
|
|
2272
2316
|
exportSchema,
|
|
2273
2317
|
ffmpegPath,
|
|
2274
2318
|
ffprobePath,
|
|
2319
|
+
fillers,
|
|
2275
2320
|
formatCaptions,
|
|
2276
2321
|
formatForOutput,
|
|
2277
2322
|
frameToSeconds,
|