vidspotai-shared 1.0.91 → 1.0.93
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/lib/schemas/demoSpec.schema.d.ts +689 -0
- package/lib/schemas/demoSpec.schema.d.ts.map +1 -0
- package/lib/schemas/demoSpec.schema.js +276 -0
- package/lib/schemas/index.d.ts +1 -0
- package/lib/schemas/index.d.ts.map +1 -1
- package/lib/schemas/index.js +1 -0
- package/lib/schemas/project.schema.d.ts +78 -0
- package/lib/schemas/project.schema.d.ts.map +1 -1
- package/lib/schemas/project.schema.js +55 -1
- package/lib/schemas/videoPlan.schema.d.ts +69 -0
- package/lib/schemas/videoPlan.schema.d.ts.map +1 -1
- package/lib/schemas/videoPlan.schema.js +30 -1
- package/lib/services/agent/editClassifier.d.ts +16 -0
- package/lib/services/agent/editClassifier.d.ts.map +1 -1
- package/lib/services/agent/index.d.ts +1 -0
- package/lib/services/agent/index.d.ts.map +1 -1
- package/lib/services/agent/index.js +1 -0
- package/lib/services/agent/overlayRenderer.d.ts.map +1 -1
- package/lib/services/agent/overlayRenderer.js +8 -0
- package/lib/services/agent/planner/Planner.d.ts.map +1 -1
- package/lib/services/agent/planner/Planner.js +13 -2
- package/lib/services/agent/planner/structuralRules.d.ts.map +1 -1
- package/lib/services/agent/planner/structuralRules.js +6 -1
- package/lib/services/agent/textStylePacks.d.ts +35 -0
- package/lib/services/agent/textStylePacks.d.ts.map +1 -0
- package/lib/services/agent/textStylePacks.js +70 -0
- package/lib/services/agent/tools/composeScene.tool.d.ts +46 -0
- package/lib/services/agent/tools/composeScene.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/estimateCost.tool.d.ts +16 -0
- package/lib/services/agent/tools/estimateCost.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/planVideo.tool.d.ts +27 -0
- package/lib/services/agent/tools/planVideo.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/render.tool.d.ts +16 -0
- package/lib/services/agent/tools/render.tool.d.ts.map +1 -1
- package/lib/services/aiGen/providers/bytedance/bytedance.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/bytedance/bytedance.service.js +8 -8
- package/lib/services/aiGen/providers/google/google.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/google/google.service.js +54 -18
- package/lib/services/aiGen/providers/google/googleApiKeys.d.ts +10 -6
- package/lib/services/aiGen/providers/google/googleApiKeys.d.ts.map +1 -1
- package/lib/services/aiGen/providers/google/googleApiKeys.js +10 -6
- package/lib/services/aiGen/providers/google/googleErrors.d.ts +17 -10
- package/lib/services/aiGen/providers/google/googleErrors.d.ts.map +1 -1
- package/lib/services/aiGen/providers/google/googleErrors.js +60 -21
- package/lib/services/aiGen/providers/google/googleKeyPool.d.ts.map +1 -1
- package/lib/services/aiGen/providers/google/googleKeyPool.js +40 -12
- package/lib/services/asr/index.d.ts +1 -0
- package/lib/services/asr/index.d.ts.map +1 -1
- package/lib/services/asr/index.js +1 -0
- package/lib/services/asr/transcribeWithFallback.d.ts +54 -0
- package/lib/services/asr/transcribeWithFallback.d.ts.map +1 -0
- package/lib/services/asr/transcribeWithFallback.js +87 -0
- package/lib/services/editor/designToProject.d.ts +2 -0
- package/lib/services/editor/designToProject.d.ts.map +1 -1
- package/lib/services/editor/designToProject.js +10 -0
- package/lib/services/editor/planToProject.d.ts.map +1 -1
- package/lib/services/editor/planToProject.helpers.d.ts +9 -3
- package/lib/services/editor/planToProject.helpers.d.ts.map +1 -1
- package/lib/services/editor/planToProject.helpers.js +17 -2
- package/lib/services/editor/planToProject.js +21 -3
- package/package.json +1 -1
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DemoSpecSchema = exports.DemoSceneSchema = exports.ChatTurnSchema = exports.DemoCardSchema = exports.StatSchema = exports.SceneCaptionSchema = exports.DemoStyleSchema = exports.VisualStyleSchema = exports.DemoBrandSchema = exports.DEMO_SPEC_SCHEMA_VERSION = void 0;
|
|
4
|
+
exports.demoSpecDurationMs = demoSpecDurationMs;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const project_schema_1 = require("./project.schema");
|
|
7
|
+
const brandKit_schema_1 = require("./brandKit.schema");
|
|
8
|
+
/**
|
|
9
|
+
* DemoSpec — the canonical, editable contract for an autonomous SaaS product-demo video.
|
|
10
|
+
*
|
|
11
|
+
* This is the single source of truth shared by:
|
|
12
|
+
* - the LLM author (Claude produces this via `.structured<DemoSpec>()` from the user's
|
|
13
|
+
* brand + features + screenshots + wizard answers)
|
|
14
|
+
* - the demo render engine (Remotion scene-template library consumes this -> MP4)
|
|
15
|
+
* - the persistence/editor layer (stored on `demoVideoProjects.demoSpec`; "change X"
|
|
16
|
+
* requests patch this and re-render — this is the "keep the source so you can edit
|
|
17
|
+
* later" requirement, structured instead of exported HTML)
|
|
18
|
+
* - the script/voiceover stage (reads the scene timeline + narration hints)
|
|
19
|
+
*
|
|
20
|
+
* Two render paths share this one contract (the "hybrid engine" decision):
|
|
21
|
+
* - Path A — parametric scene-template components (scene `type` !== "custom")
|
|
22
|
+
* - Path B — arbitrary Remotion TSX authored by the LLM (scene `type` === "custom"),
|
|
23
|
+
* dynamically bundled + sandboxed. Additive — Path A ignores `custom` scenes' tsx.
|
|
24
|
+
*
|
|
25
|
+
* Fields evolve forward only. Add new optional fields; never repurpose existing ones.
|
|
26
|
+
* Bump DEMO_SPEC_SCHEMA_VERSION on any breaking change.
|
|
27
|
+
*
|
|
28
|
+
* See notes/SAAS_DEMO_GENERATOR_PLAN.md for the full plan.
|
|
29
|
+
*/
|
|
30
|
+
exports.DEMO_SPEC_SCHEMA_VERSION = 1;
|
|
31
|
+
// ─── brand (resolved, render-ready) ──────────────────────────────────────────
|
|
32
|
+
// Reuses the BrandKit field shapes but provides concrete fallbacks so the engine
|
|
33
|
+
// never renders an undefined color/font. The author/extraction stage fills these.
|
|
34
|
+
exports.DemoBrandSchema = zod_1.z.object({
|
|
35
|
+
identity: brandKit_schema_1.BrandIdentitySchema.default({}),
|
|
36
|
+
colors: brandKit_schema_1.BrandColorsSchema.default({ palette: [] }),
|
|
37
|
+
fonts: brandKit_schema_1.BrandFontsSchema.default({}),
|
|
38
|
+
});
|
|
39
|
+
// ─── style system (cross-cutting render mode) ────────────────────────────────
|
|
40
|
+
// Derived directly from Claude Design's option taxonomy (the screenshotted wizard).
|
|
41
|
+
// These axes change how EVERY scene looks/moves, independent of scene content — the
|
|
42
|
+
// difference between MyCounsel (clean-ui), LinkedNav (split-headline) and LangEase
|
|
43
|
+
// (kinetic-typography + 3D device mockups). One DemoSpec = one resolved style/version;
|
|
44
|
+
// requesting "N distinct styles to compare" produces N DemoSpecs.
|
|
45
|
+
/** The overarching visual language. */
|
|
46
|
+
exports.VisualStyleSchema = zod_1.z.enum([
|
|
47
|
+
"clean-ui-walkthrough", // animated real/fake screens + cursor (MyCounsel)
|
|
48
|
+
"split-headline", // bold headline + isolated UI component, numbered steps (LinkedNav)
|
|
49
|
+
"kinetic-typography", // big animated words, text-led (value-prop / LangEase intro)
|
|
50
|
+
"cinematic", // dramatic, slow, atmospheric premium motion graphics
|
|
51
|
+
"minimal-calm", // lots of whitespace, slow gentle moves
|
|
52
|
+
"energetic-punchy", // quick cuts, snappy transitions, 3D mockups, celebration beats (LangEase)
|
|
53
|
+
]);
|
|
54
|
+
exports.DemoStyleSchema = zod_1.z.object({
|
|
55
|
+
visual: exports.VisualStyleSchema.default("clean-ui-walkthrough"),
|
|
56
|
+
/** Cut rhythm / beat length. */
|
|
57
|
+
pace: zod_1.z.enum(["fast", "medium", "slow"]).default("medium"),
|
|
58
|
+
/** Surface treatment + palette resolution strategy. */
|
|
59
|
+
colorMood: zod_1.z.enum(["light", "dark", "brand-forward"]).default("dark"),
|
|
60
|
+
/** Guides on-screen TEXT DENSITY (captions-led vs sparse-for-VO vs minimal-for-music). */
|
|
61
|
+
audioIntent: zod_1.z.enum(["captions", "voiceover", "music"]).default("captions"),
|
|
62
|
+
/** Motion intensity; usually derived from `visual`+`pace` but explicit for the engine. */
|
|
63
|
+
motion: zod_1.z.enum(["subtle", "balanced", "dynamic"]).default("balanced"),
|
|
64
|
+
});
|
|
65
|
+
// ─── shared scene primitives ─────────────────────────────────────────────────
|
|
66
|
+
/** A lower-third on-screen caption (VO-ready headline), per the studied Caption component. */
|
|
67
|
+
exports.SceneCaptionSchema = zod_1.z.object({
|
|
68
|
+
title: zod_1.z.string(),
|
|
69
|
+
sub: zod_1.z.string().optional(),
|
|
70
|
+
});
|
|
71
|
+
/** Common to every scene regardless of type. */
|
|
72
|
+
const SceneBaseSchema = zod_1.z.object({
|
|
73
|
+
/** Stable id so edits/patches can target a specific scene. */
|
|
74
|
+
id: zod_1.z.string(),
|
|
75
|
+
/** Scene length on the timeline, milliseconds. */
|
|
76
|
+
durationMs: zod_1.z.number().int().positive(),
|
|
77
|
+
/** Optional on-screen lower-third caption. */
|
|
78
|
+
caption: exports.SceneCaptionSchema.optional(),
|
|
79
|
+
/**
|
|
80
|
+
* Optional hint for the narration/script stage. The final script is generated
|
|
81
|
+
* later (timeline-synced), but the author may seed intent per scene.
|
|
82
|
+
*/
|
|
83
|
+
narrationHint: zod_1.z.string().optional(),
|
|
84
|
+
});
|
|
85
|
+
/** A UI metric/stat chip used across dashboard/stats scenes. */
|
|
86
|
+
exports.StatSchema = zod_1.z.object({
|
|
87
|
+
label: zod_1.z.string(),
|
|
88
|
+
/** Numeric value for count-up animation; use `valueText` for non-numeric. */
|
|
89
|
+
value: zod_1.z.number().optional(),
|
|
90
|
+
valueText: zod_1.z.string().optional(),
|
|
91
|
+
suffix: zod_1.z.string().optional(),
|
|
92
|
+
icon: zod_1.z.string().optional(),
|
|
93
|
+
});
|
|
94
|
+
/** A generic card used in featureShowcase / cardGrid scenes. */
|
|
95
|
+
exports.DemoCardSchema = zod_1.z.object({
|
|
96
|
+
title: zod_1.z.string(),
|
|
97
|
+
subtitle: zod_1.z.string().optional(),
|
|
98
|
+
badge: zod_1.z.string().optional(),
|
|
99
|
+
badgeKind: zod_1.z.enum(["neutral", "positive", "warning", "danger"]).optional(),
|
|
100
|
+
icon: zod_1.z.string().optional(),
|
|
101
|
+
});
|
|
102
|
+
/** A single chat turn for the AI-assistant scene. */
|
|
103
|
+
exports.ChatTurnSchema = zod_1.z.object({
|
|
104
|
+
role: zod_1.z.enum(["user", "assistant"]),
|
|
105
|
+
text: zod_1.z.string(),
|
|
106
|
+
/** Optional cited chips (e.g. precedents/sources) under an assistant turn. */
|
|
107
|
+
chips: zod_1.z.array(zod_1.z.string()).default([]),
|
|
108
|
+
});
|
|
109
|
+
// ─── scene type variants (Path A: template library) ──────────────────────────
|
|
110
|
+
const ProblemSceneSchema = SceneBaseSchema.extend({
|
|
111
|
+
type: zod_1.z.literal("problem"),
|
|
112
|
+
headline: zod_1.z.string(),
|
|
113
|
+
/** Floating context items (e.g. scattered papers) for the problem montage. */
|
|
114
|
+
motifs: zod_1.z.array(zod_1.z.string()).default([]),
|
|
115
|
+
});
|
|
116
|
+
const LogoRevealSceneSchema = SceneBaseSchema.extend({
|
|
117
|
+
type: zod_1.z.literal("logoReveal"),
|
|
118
|
+
tagline: zod_1.z.string().optional(),
|
|
119
|
+
});
|
|
120
|
+
const FeatureShowcaseSceneSchema = SceneBaseSchema.extend({
|
|
121
|
+
type: zod_1.z.literal("featureShowcase"),
|
|
122
|
+
/** Feature/page title shown in the fake app. */
|
|
123
|
+
title: zod_1.z.string(),
|
|
124
|
+
/**
|
|
125
|
+
* Which product surface to render. Mirrors the reusable "Mini-UI" registry pattern
|
|
126
|
+
* observed across the MyCounsel teasers (search/chat/editor/analysis/marketplace),
|
|
127
|
+
* where one surface component is re-embedded across every style. See plan §2.6 (Layer 0.5).
|
|
128
|
+
*/
|
|
129
|
+
surface: zod_1.z
|
|
130
|
+
.enum([
|
|
131
|
+
"search",
|
|
132
|
+
"form",
|
|
133
|
+
"table",
|
|
134
|
+
"detail",
|
|
135
|
+
"chat",
|
|
136
|
+
"editor",
|
|
137
|
+
"analysis",
|
|
138
|
+
"marketplace",
|
|
139
|
+
"dashboard",
|
|
140
|
+
])
|
|
141
|
+
.default("search"),
|
|
142
|
+
/** Text the animated cursor "types" (typewriter). */
|
|
143
|
+
cursorTypes: zod_1.z.string().optional(),
|
|
144
|
+
/** Active sidebar item for the app shell. */
|
|
145
|
+
activeNav: zod_1.z.string().optional(),
|
|
146
|
+
cards: zod_1.z.array(exports.DemoCardSchema).default([]),
|
|
147
|
+
/**
|
|
148
|
+
* Optional real product screenshot to composite instead of fully fake-coding the
|
|
149
|
+
* surface. Often MORE accurate + reliable than a coded replica (see plan §2.6).
|
|
150
|
+
*/
|
|
151
|
+
screenshotUrl: zod_1.z.string().optional(),
|
|
152
|
+
});
|
|
153
|
+
/** Bold headline + an isolated UI component/screenshot beside it (LinkedNav style). */
|
|
154
|
+
const SplitFeatureSceneSchema = SceneBaseSchema.extend({
|
|
155
|
+
type: zod_1.z.literal("splitFeature"),
|
|
156
|
+
headline: zod_1.z.string(),
|
|
157
|
+
body: zod_1.z.string().optional(),
|
|
158
|
+
/** Optional "STEP 3 — …" eyebrow label. */
|
|
159
|
+
stepLabel: zod_1.z.string().optional(),
|
|
160
|
+
side: zod_1.z.enum(["left", "right"]).default("right"),
|
|
161
|
+
/** The isolated UI shown beside the headline: a screenshot or a small card set. */
|
|
162
|
+
screenshotUrl: zod_1.z.string().optional(),
|
|
163
|
+
cards: zod_1.z.array(exports.DemoCardSchema).default([]),
|
|
164
|
+
});
|
|
165
|
+
/** Large animated words, text-led (kinetic typography / value-prop / LangEase intro). */
|
|
166
|
+
const BigStatementSceneSchema = SceneBaseSchema.extend({
|
|
167
|
+
type: zod_1.z.literal("bigStatement"),
|
|
168
|
+
/** Lines revealed in sequence; an emphasized span may be marked with **double asterisks**. */
|
|
169
|
+
lines: zod_1.z.array(zod_1.z.string()).min(1),
|
|
170
|
+
/** Optional small kicker above the statement. */
|
|
171
|
+
kicker: zod_1.z.string().optional(),
|
|
172
|
+
});
|
|
173
|
+
/** Real screenshot(s) composited into 3D-perspective device frames w/ parallax (LangEase). */
|
|
174
|
+
const DeviceMockupSceneSchema = SceneBaseSchema.extend({
|
|
175
|
+
type: zod_1.z.literal("deviceMockup"),
|
|
176
|
+
device: zod_1.z.enum(["browser", "laptop", "phone", "tablet"]).default("browser"),
|
|
177
|
+
/** One or more screenshots to showcase (scroll/parallax/zoom across them). */
|
|
178
|
+
screenshotUrls: zod_1.z.array(zod_1.z.string()).min(1),
|
|
179
|
+
/** Camera move applied to the mockup. */
|
|
180
|
+
motion: zod_1.z.enum(["tilt", "parallax", "scroll", "zoom-in", "orbit"]).default("parallax"),
|
|
181
|
+
headline: zod_1.z.string().optional(),
|
|
182
|
+
});
|
|
183
|
+
const ChatSceneSchema = SceneBaseSchema.extend({
|
|
184
|
+
type: zod_1.z.literal("chat"),
|
|
185
|
+
title: zod_1.z.string().default("AI Assistant"),
|
|
186
|
+
turns: zod_1.z.array(exports.ChatTurnSchema).min(1),
|
|
187
|
+
});
|
|
188
|
+
const DashboardSceneSchema = SceneBaseSchema.extend({
|
|
189
|
+
type: zod_1.z.literal("dashboard"),
|
|
190
|
+
title: zod_1.z.string(),
|
|
191
|
+
stats: zod_1.z.array(exports.StatSchema).default([]),
|
|
192
|
+
/** Optional simple chart series (bar/line) values, 0..1 normalized. */
|
|
193
|
+
chart: zod_1.z.array(zod_1.z.number()).default([]),
|
|
194
|
+
});
|
|
195
|
+
const DocAnalysisSceneSchema = SceneBaseSchema.extend({
|
|
196
|
+
type: zod_1.z.literal("docAnalysis"),
|
|
197
|
+
title: zod_1.z.string(),
|
|
198
|
+
/** Insight rows revealed by the scan line. */
|
|
199
|
+
insights: zod_1.z.array(exports.DemoCardSchema).default([]),
|
|
200
|
+
});
|
|
201
|
+
const CardGridSceneSchema = SceneBaseSchema.extend({
|
|
202
|
+
type: zod_1.z.literal("cardGrid"),
|
|
203
|
+
title: zod_1.z.string(),
|
|
204
|
+
cards: zod_1.z.array(exports.DemoCardSchema).min(1),
|
|
205
|
+
});
|
|
206
|
+
const StatsSceneSchema = SceneBaseSchema.extend({
|
|
207
|
+
type: zod_1.z.literal("stats"),
|
|
208
|
+
headline: zod_1.z.string().optional(),
|
|
209
|
+
stats: zod_1.z.array(exports.StatSchema).min(1),
|
|
210
|
+
});
|
|
211
|
+
const CtaSceneSchema = SceneBaseSchema.extend({
|
|
212
|
+
type: zod_1.z.literal("cta"),
|
|
213
|
+
headline: zod_1.z.string(),
|
|
214
|
+
buttonText: zod_1.z.string().default("Start free"),
|
|
215
|
+
url: zod_1.z.string().optional(),
|
|
216
|
+
stats: zod_1.z.array(exports.StatSchema).default([]),
|
|
217
|
+
});
|
|
218
|
+
// ─── scene type variant (Path B: arbitrary codegen — additive, Phase 8) ──────
|
|
219
|
+
const CustomSceneSchema = SceneBaseSchema.extend({
|
|
220
|
+
type: zod_1.z.literal("custom"),
|
|
221
|
+
/**
|
|
222
|
+
* Raw Remotion TSX authored by the LLM. Rendered only by the Path B dynamic
|
|
223
|
+
* bundler inside a sandbox (no network/fs, whitelisted imports). Path A engines
|
|
224
|
+
* MUST skip/placeholder these. Empty until Phase 8.
|
|
225
|
+
*/
|
|
226
|
+
tsx: zod_1.z.string(),
|
|
227
|
+
/** Optional prop bag injected into the custom component. */
|
|
228
|
+
props: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).default({}),
|
|
229
|
+
});
|
|
230
|
+
exports.DemoSceneSchema = zod_1.z.discriminatedUnion("type", [
|
|
231
|
+
ProblemSceneSchema,
|
|
232
|
+
LogoRevealSceneSchema,
|
|
233
|
+
FeatureShowcaseSceneSchema,
|
|
234
|
+
SplitFeatureSceneSchema,
|
|
235
|
+
BigStatementSceneSchema,
|
|
236
|
+
DeviceMockupSceneSchema,
|
|
237
|
+
ChatSceneSchema,
|
|
238
|
+
DashboardSceneSchema,
|
|
239
|
+
DocAnalysisSceneSchema,
|
|
240
|
+
CardGridSceneSchema,
|
|
241
|
+
StatsSceneSchema,
|
|
242
|
+
CtaSceneSchema,
|
|
243
|
+
CustomSceneSchema,
|
|
244
|
+
]);
|
|
245
|
+
// ─── top-level DemoSpec ──────────────────────────────────────────────────────
|
|
246
|
+
exports.DemoSpecSchema = zod_1.z.object({
|
|
247
|
+
schemaVersion: zod_1.z.literal(exports.DEMO_SPEC_SCHEMA_VERSION).default(exports.DEMO_SPEC_SCHEMA_VERSION),
|
|
248
|
+
/** Product display name (overlay text, never AI-rendered into pixels). */
|
|
249
|
+
productName: zod_1.z.string(),
|
|
250
|
+
/** One-line value proposition. */
|
|
251
|
+
tagline: zod_1.z.string().optional(),
|
|
252
|
+
brand: exports.DemoBrandSchema,
|
|
253
|
+
/** Cross-cutting visual language (style/pace/colorMood/audioIntent). */
|
|
254
|
+
style: exports.DemoStyleSchema.default({}),
|
|
255
|
+
/** Output geometry. */
|
|
256
|
+
aspect: project_schema_1.AspectSchema.default("16:9"),
|
|
257
|
+
fps: zod_1.z.number().int().positive().default(30),
|
|
258
|
+
/** Narrative arc the author followed (drives scene ordering + script tone). */
|
|
259
|
+
narrative: zod_1.z
|
|
260
|
+
.enum([
|
|
261
|
+
"problem-solution",
|
|
262
|
+
"feature-showcase",
|
|
263
|
+
"day-in-the-life",
|
|
264
|
+
"hero-workflow",
|
|
265
|
+
"value-prop",
|
|
266
|
+
])
|
|
267
|
+
.default("problem-solution"),
|
|
268
|
+
/** Target audience hint for script tone. */
|
|
269
|
+
audience: zod_1.z.string().optional(),
|
|
270
|
+
/** Ordered scenes. Total duration = sum of scene.durationMs. */
|
|
271
|
+
scenes: zod_1.z.array(exports.DemoSceneSchema).min(1),
|
|
272
|
+
});
|
|
273
|
+
/** Sum of scene durations — the canonical total timeline length in ms. */
|
|
274
|
+
function demoSpecDurationMs(spec) {
|
|
275
|
+
return spec.scenes.reduce((acc, s) => acc + s.durationMs, 0);
|
|
276
|
+
}
|
package/lib/schemas/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from "./project.schema";
|
|
|
2
2
|
export * from "./brief.schema";
|
|
3
3
|
export * from "./videoPlan.schema";
|
|
4
4
|
export * from "./brandKit.schema";
|
|
5
|
+
export * from "./demoSpec.schema";
|
|
5
6
|
export * from "./agentPersona.schema";
|
|
6
7
|
export * from "./agentRunJob.schema";
|
|
7
8
|
export * from "./social.schema";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC"}
|
package/lib/schemas/index.js
CHANGED
|
@@ -18,6 +18,7 @@ __exportStar(require("./project.schema"), exports);
|
|
|
18
18
|
__exportStar(require("./brief.schema"), exports);
|
|
19
19
|
__exportStar(require("./videoPlan.schema"), exports);
|
|
20
20
|
__exportStar(require("./brandKit.schema"), exports);
|
|
21
|
+
__exportStar(require("./demoSpec.schema"), exports);
|
|
21
22
|
__exportStar(require("./agentPersona.schema"), exports);
|
|
22
23
|
__exportStar(require("./agentRunJob.schema"), exports);
|
|
23
24
|
__exportStar(require("./social.schema"), exports);
|
|
@@ -107,6 +107,39 @@ export declare const TransitionSchema: z.ZodObject<{
|
|
|
107
107
|
"from-bottom-left": "from-bottom-left";
|
|
108
108
|
}>>;
|
|
109
109
|
}, z.core.$strip>;
|
|
110
|
+
/**
|
|
111
|
+
* Named animation preset for a TextClip. Each id maps 1:1 to a React sub-
|
|
112
|
+
* component in `vidspotai-remotion-components/src/presets` that owns the
|
|
113
|
+
* clip's *animation* (the shared shell still owns layout / safe-area /
|
|
114
|
+
* background decoration). Because the same registry is imported by both the
|
|
115
|
+
* editor `@remotion/player` preview and the server `renderMedia`, a preset
|
|
116
|
+
* looks identical in preview and export by construction.
|
|
117
|
+
*
|
|
118
|
+
* Additive: when `preset` is absent the renderer falls back to the legacy
|
|
119
|
+
* `metadata.animation` enum, so old plans/projects keep working unchanged.
|
|
120
|
+
* Adding a preset = add its id here AND register its component — keep the two
|
|
121
|
+
* in lock-step.
|
|
122
|
+
*/
|
|
123
|
+
export declare const TextPresetSchema: z.ZodEnum<{
|
|
124
|
+
none: "none";
|
|
125
|
+
"fade-soft": "fade-soft";
|
|
126
|
+
"kinetic-pop": "kinetic-pop";
|
|
127
|
+
"editorial-wipe": "editorial-wipe";
|
|
128
|
+
"bold-slam": "bold-slam";
|
|
129
|
+
"type-on": "type-on";
|
|
130
|
+
}>;
|
|
131
|
+
export type TextPreset = z.infer<typeof TextPresetSchema>;
|
|
132
|
+
/**
|
|
133
|
+
* Named animation preset for a CaptionClip (word-timed). Drives the active-
|
|
134
|
+
* word highlight style. Same registry/parity guarantees as TextPresetSchema.
|
|
135
|
+
*/
|
|
136
|
+
export declare const CaptionPresetSchema: z.ZodEnum<{
|
|
137
|
+
none: "none";
|
|
138
|
+
"tiktok-word": "tiktok-word";
|
|
139
|
+
"karaoke-fill": "karaoke-fill";
|
|
140
|
+
"block-cut": "block-cut";
|
|
141
|
+
}>;
|
|
142
|
+
export type CaptionPreset = z.infer<typeof CaptionPresetSchema>;
|
|
110
143
|
export declare const CaptionWordSchema: z.ZodObject<{
|
|
111
144
|
word: z.ZodString;
|
|
112
145
|
start: z.ZodNumber;
|
|
@@ -303,6 +336,14 @@ export declare const TextClipSchema: z.ZodObject<{
|
|
|
303
336
|
}>>;
|
|
304
337
|
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
305
338
|
shadow: z.ZodOptional<z.ZodString>;
|
|
339
|
+
preset: z.ZodOptional<z.ZodEnum<{
|
|
340
|
+
none: "none";
|
|
341
|
+
"fade-soft": "fade-soft";
|
|
342
|
+
"kinetic-pop": "kinetic-pop";
|
|
343
|
+
"editorial-wipe": "editorial-wipe";
|
|
344
|
+
"bold-slam": "bold-slam";
|
|
345
|
+
"type-on": "type-on";
|
|
346
|
+
}>>;
|
|
306
347
|
id: z.ZodString;
|
|
307
348
|
trackId: z.ZodString;
|
|
308
349
|
display: z.ZodObject<{
|
|
@@ -359,6 +400,12 @@ export declare const CaptionClipSchema: z.ZodObject<{
|
|
|
359
400
|
color: z.ZodDefault<z.ZodString>;
|
|
360
401
|
highlightColor: z.ZodOptional<z.ZodString>;
|
|
361
402
|
language: z.ZodDefault<z.ZodString>;
|
|
403
|
+
preset: z.ZodOptional<z.ZodEnum<{
|
|
404
|
+
none: "none";
|
|
405
|
+
"tiktok-word": "tiktok-word";
|
|
406
|
+
"karaoke-fill": "karaoke-fill";
|
|
407
|
+
"block-cut": "block-cut";
|
|
408
|
+
}>>;
|
|
362
409
|
id: z.ZodString;
|
|
363
410
|
trackId: z.ZodString;
|
|
364
411
|
display: z.ZodObject<{
|
|
@@ -589,6 +636,14 @@ export declare const ClipSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
589
636
|
}>>;
|
|
590
637
|
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
591
638
|
shadow: z.ZodOptional<z.ZodString>;
|
|
639
|
+
preset: z.ZodOptional<z.ZodEnum<{
|
|
640
|
+
none: "none";
|
|
641
|
+
"fade-soft": "fade-soft";
|
|
642
|
+
"kinetic-pop": "kinetic-pop";
|
|
643
|
+
"editorial-wipe": "editorial-wipe";
|
|
644
|
+
"bold-slam": "bold-slam";
|
|
645
|
+
"type-on": "type-on";
|
|
646
|
+
}>>;
|
|
592
647
|
id: z.ZodString;
|
|
593
648
|
trackId: z.ZodString;
|
|
594
649
|
display: z.ZodObject<{
|
|
@@ -644,6 +699,12 @@ export declare const ClipSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
644
699
|
color: z.ZodDefault<z.ZodString>;
|
|
645
700
|
highlightColor: z.ZodOptional<z.ZodString>;
|
|
646
701
|
language: z.ZodDefault<z.ZodString>;
|
|
702
|
+
preset: z.ZodOptional<z.ZodEnum<{
|
|
703
|
+
none: "none";
|
|
704
|
+
"tiktok-word": "tiktok-word";
|
|
705
|
+
"karaoke-fill": "karaoke-fill";
|
|
706
|
+
"block-cut": "block-cut";
|
|
707
|
+
}>>;
|
|
647
708
|
id: z.ZodString;
|
|
648
709
|
trackId: z.ZodString;
|
|
649
710
|
display: z.ZodObject<{
|
|
@@ -703,6 +764,7 @@ export declare const TrackSchema: z.ZodObject<{
|
|
|
703
764
|
fx: "fx";
|
|
704
765
|
}>;
|
|
705
766
|
name: z.ZodOptional<z.ZodString>;
|
|
767
|
+
sourceTrackId: z.ZodOptional<z.ZodString>;
|
|
706
768
|
index: z.ZodNumber;
|
|
707
769
|
muted: z.ZodDefault<z.ZodBoolean>;
|
|
708
770
|
hidden: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -753,6 +815,7 @@ export declare const ProjectSchema: z.ZodObject<{
|
|
|
753
815
|
fx: "fx";
|
|
754
816
|
}>;
|
|
755
817
|
name: z.ZodOptional<z.ZodString>;
|
|
818
|
+
sourceTrackId: z.ZodOptional<z.ZodString>;
|
|
756
819
|
index: z.ZodNumber;
|
|
757
820
|
muted: z.ZodDefault<z.ZodBoolean>;
|
|
758
821
|
hidden: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -947,6 +1010,14 @@ export declare const ProjectSchema: z.ZodObject<{
|
|
|
947
1010
|
}>>;
|
|
948
1011
|
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
949
1012
|
shadow: z.ZodOptional<z.ZodString>;
|
|
1013
|
+
preset: z.ZodOptional<z.ZodEnum<{
|
|
1014
|
+
none: "none";
|
|
1015
|
+
"fade-soft": "fade-soft";
|
|
1016
|
+
"kinetic-pop": "kinetic-pop";
|
|
1017
|
+
"editorial-wipe": "editorial-wipe";
|
|
1018
|
+
"bold-slam": "bold-slam";
|
|
1019
|
+
"type-on": "type-on";
|
|
1020
|
+
}>>;
|
|
950
1021
|
id: z.ZodString;
|
|
951
1022
|
trackId: z.ZodString;
|
|
952
1023
|
display: z.ZodObject<{
|
|
@@ -1002,6 +1073,12 @@ export declare const ProjectSchema: z.ZodObject<{
|
|
|
1002
1073
|
color: z.ZodDefault<z.ZodString>;
|
|
1003
1074
|
highlightColor: z.ZodOptional<z.ZodString>;
|
|
1004
1075
|
language: z.ZodDefault<z.ZodString>;
|
|
1076
|
+
preset: z.ZodOptional<z.ZodEnum<{
|
|
1077
|
+
none: "none";
|
|
1078
|
+
"tiktok-word": "tiktok-word";
|
|
1079
|
+
"karaoke-fill": "karaoke-fill";
|
|
1080
|
+
"block-cut": "block-cut";
|
|
1081
|
+
}>>;
|
|
1005
1082
|
id: z.ZodString;
|
|
1006
1083
|
trackId: z.ZodString;
|
|
1007
1084
|
display: z.ZodObject<{
|
|
@@ -1070,6 +1147,7 @@ export declare const ProjectSchema: z.ZodObject<{
|
|
|
1070
1147
|
"from-bottom-left": "from-bottom-left";
|
|
1071
1148
|
}>>;
|
|
1072
1149
|
}, z.core.$strip>>>;
|
|
1150
|
+
masterVolume: z.ZodDefault<z.ZodNumber>;
|
|
1073
1151
|
agentRunId: z.ZodOptional<z.ZodString>;
|
|
1074
1152
|
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1075
1153
|
createdAt: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/project.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM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CAAC;AACpD,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAC9C,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAChD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAClD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAC9C,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAClD,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProjectSchema = exports.ProjectBackgroundSchema = exports.TrackSchema = exports.TrackKindSchema = exports.ClipSchema = exports.CaptionClipSchema = exports.TextClipSchema = exports.AudioClipSchema = exports.ImageClipSchema = exports.VideoClipSchema = exports.CaptionWordSchema = exports.TransitionSchema = exports.EffectSchema = exports.ProvenanceSchema = exports.TierSchema = exports.ColorGradeSchema = exports.TransformSchema = exports.TrimSchema = exports.TimeRangeSchema = exports.AspectSchema = exports.SizeSchema = exports.PROJECT_SCHEMA_VERSION = void 0;
|
|
3
|
+
exports.ProjectSchema = exports.ProjectBackgroundSchema = exports.TrackSchema = exports.TrackKindSchema = exports.ClipSchema = exports.CaptionClipSchema = exports.TextClipSchema = exports.AudioClipSchema = exports.ImageClipSchema = exports.VideoClipSchema = exports.CaptionWordSchema = exports.CaptionPresetSchema = exports.TextPresetSchema = exports.TransitionSchema = exports.EffectSchema = exports.ProvenanceSchema = exports.TierSchema = exports.ColorGradeSchema = exports.TransformSchema = exports.TrimSchema = exports.TimeRangeSchema = exports.AspectSchema = exports.SizeSchema = exports.PROJECT_SCHEMA_VERSION = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
/**
|
|
6
6
|
* Canonical Project JSON schema.
|
|
@@ -121,6 +121,38 @@ exports.TransitionSchema = zod_1.z.object({
|
|
|
121
121
|
])
|
|
122
122
|
.optional(),
|
|
123
123
|
});
|
|
124
|
+
// ─── animated text / caption presets ──────────────────────────────────────
|
|
125
|
+
/**
|
|
126
|
+
* Named animation preset for a TextClip. Each id maps 1:1 to a React sub-
|
|
127
|
+
* component in `vidspotai-remotion-components/src/presets` that owns the
|
|
128
|
+
* clip's *animation* (the shared shell still owns layout / safe-area /
|
|
129
|
+
* background decoration). Because the same registry is imported by both the
|
|
130
|
+
* editor `@remotion/player` preview and the server `renderMedia`, a preset
|
|
131
|
+
* looks identical in preview and export by construction.
|
|
132
|
+
*
|
|
133
|
+
* Additive: when `preset` is absent the renderer falls back to the legacy
|
|
134
|
+
* `metadata.animation` enum, so old plans/projects keep working unchanged.
|
|
135
|
+
* Adding a preset = add its id here AND register its component — keep the two
|
|
136
|
+
* in lock-step.
|
|
137
|
+
*/
|
|
138
|
+
exports.TextPresetSchema = zod_1.z.enum([
|
|
139
|
+
"none", // static — no entrance animation
|
|
140
|
+
"fade-soft", // gentle fade + tiny rise (the historical default, named)
|
|
141
|
+
"kinetic-pop", // per-word spring scale + rise
|
|
142
|
+
"editorial-wipe", // clip-path mask reveal, left-to-right
|
|
143
|
+
"bold-slam", // oversized weight slams down to rest scale
|
|
144
|
+
"type-on", // typewriter reveal with caret
|
|
145
|
+
]);
|
|
146
|
+
/**
|
|
147
|
+
* Named animation preset for a CaptionClip (word-timed). Drives the active-
|
|
148
|
+
* word highlight style. Same registry/parity guarantees as TextPresetSchema.
|
|
149
|
+
*/
|
|
150
|
+
exports.CaptionPresetSchema = zod_1.z.enum([
|
|
151
|
+
"none", // all words shown, active word recolored (legacy default)
|
|
152
|
+
"tiktok-word", // active word scales + recolors with a pop
|
|
153
|
+
"karaoke-fill", // left-to-right fill of the active word
|
|
154
|
+
"block-cut", // 1–3 word hard-cut pages (no carry-over text)
|
|
155
|
+
]);
|
|
124
156
|
// ─── caption sub-shape ───────────────────────────────────────────────────
|
|
125
157
|
exports.CaptionWordSchema = zod_1.z.object({
|
|
126
158
|
word: zod_1.z.string(),
|
|
@@ -196,6 +228,13 @@ exports.TextClipSchema = zod_1.z.object({
|
|
|
196
228
|
align: zod_1.z.enum(["left", "center", "right"]).default("center"),
|
|
197
229
|
backgroundColor: zod_1.z.string().optional(),
|
|
198
230
|
shadow: zod_1.z.string().optional(),
|
|
231
|
+
/**
|
|
232
|
+
* Named animation preset (see TextPresetSchema). First-class on the clip so
|
|
233
|
+
* the editor and round-trip (storeToProject) carry it explicitly rather than
|
|
234
|
+
* burying it in metadata. When absent the renderer falls back to
|
|
235
|
+
* metadata.animation. Authoritative over metadata.animation when both set.
|
|
236
|
+
*/
|
|
237
|
+
preset: exports.TextPresetSchema.optional(),
|
|
199
238
|
});
|
|
200
239
|
exports.CaptionClipSchema = zod_1.z.object({
|
|
201
240
|
...ClipBase,
|
|
@@ -210,6 +249,8 @@ exports.CaptionClipSchema = zod_1.z.object({
|
|
|
210
249
|
color: zod_1.z.string().default("#ffffff"),
|
|
211
250
|
highlightColor: zod_1.z.string().optional(),
|
|
212
251
|
language: zod_1.z.string().default("en"),
|
|
252
|
+
/** Named caption animation preset (see CaptionPresetSchema). Absent → "none". */
|
|
253
|
+
preset: exports.CaptionPresetSchema.optional(),
|
|
213
254
|
});
|
|
214
255
|
exports.ClipSchema = zod_1.z.discriminatedUnion("type", [
|
|
215
256
|
exports.VideoClipSchema,
|
|
@@ -230,6 +271,13 @@ exports.TrackSchema = zod_1.z.object({
|
|
|
230
271
|
id: zod_1.z.string(),
|
|
231
272
|
kind: exports.TrackKindSchema,
|
|
232
273
|
name: zod_1.z.string().optional(),
|
|
274
|
+
/**
|
|
275
|
+
* For a caption track: the id of the SOURCE track whose clips it captions
|
|
276
|
+
* (its "caption group"). The editor reads this to route regenerated/added
|
|
277
|
+
* captions back onto the right caption row, and to keep one caption track per
|
|
278
|
+
* source group. Absent on non-caption tracks.
|
|
279
|
+
*/
|
|
280
|
+
sourceTrackId: zod_1.z.string().optional(),
|
|
233
281
|
/** Track stacking order; lower = behind. */
|
|
234
282
|
index: zod_1.z.number().int().nonnegative(),
|
|
235
283
|
muted: zod_1.z.boolean().default(false),
|
|
@@ -259,6 +307,12 @@ exports.ProjectSchema = zod_1.z.object({
|
|
|
259
307
|
tracks: zod_1.z.array(exports.TrackSchema),
|
|
260
308
|
clips: zod_1.z.array(exports.ClipSchema),
|
|
261
309
|
transitions: zod_1.z.array(exports.TransitionSchema).default([]),
|
|
310
|
+
/**
|
|
311
|
+
* Project-level master volume multiplier (0–1, 1 = unchanged). Scales every
|
|
312
|
+
* audio/video clip's volume in the render. Must be declared here or Zod's
|
|
313
|
+
* object parse strips it before the project reaches the renderer.
|
|
314
|
+
*/
|
|
315
|
+
masterVolume: zod_1.z.number().min(0).max(1).default(1),
|
|
262
316
|
/** Top-level provenance: which agent run produced this project, if any. */
|
|
263
317
|
agentRunId: zod_1.z.string().optional(),
|
|
264
318
|
/** Free-form per-app metadata. Renderer ignores. */
|