agentcut 0.2.26 → 0.2.28
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 +177 -177
- package/dist/studio/agents/claude.js +3 -2
- package/dist/studio/agents/claude.js.map +1 -1
- package/dist/studio/chat.js +1 -1
- package/dist/studio/chat.js.map +1 -1
- package/dist/studio/cli.js +24 -24
- package/dist/studio/download.d.ts +24 -0
- package/dist/studio/download.js +234 -0
- package/dist/studio/download.js.map +1 -0
- package/dist/studio/host.js +8 -0
- package/dist/studio/host.js.map +1 -1
- package/dist/studio/housekeeping.d.ts +2 -2
- package/dist/studio/housekeeping.js +18 -17
- package/dist/studio/housekeeping.js.map +1 -1
- package/dist/studio/release-cursor.js +21 -21
- package/dist/studio/release-video.js +10 -10
- package/dist/studio/schema.d.ts +102 -0
- package/dist/studio/schema.js +5 -0
- package/dist/studio/schema.js.map +1 -1
- package/dist/studio/tools.js +7 -0
- package/dist/studio/tools.js.map +1 -1
- package/package.json +56 -56
- package/template/AGENTS.md +14 -14
- package/template/components/README.md +70 -70
- package/template/components/before-after/BeforeAfter.tsx +89 -89
- package/template/components/catalog.ts +107 -107
- package/template/components/cinematic/Device3D.tsx +324 -324
- package/template/components/cinematic/devices3d/display-model.ts +184 -184
- package/template/components/cinematic/devices3d/iphone-model.ts +643 -643
- package/template/components/cinematic/devices3d/macbook-model.ts +608 -608
- package/template/components/cinematic/devices3d/models.ts +657 -657
- package/template/components/cinematic/devices3d/runtime.ts +267 -267
- package/template/components/cinematic/math.ts +100 -100
- package/template/components/color/grade-effect.ts +650 -650
- package/template/components/color/grade.ts +512 -512
- package/template/components/color/looks.ts +154 -154
- package/template/components/countdown/Countdown.tsx +166 -166
- package/template/components/dot-trace-title/DotTraceTitle.tsx +181 -181
- package/template/components/dot-trace-title/meta.json +51 -51
- package/template/components/generate/GenerateReveal.tsx +381 -381
- package/template/components/hook-card/HookCard.tsx +554 -554
- package/template/components/index.ts +199 -199
- package/template/components/lib.ts +191 -191
- package/template/components/line-diagram/LineDiagram.tsx +205 -205
- package/template/components/line-diagram/meta.json +215 -215
- package/template/components/list-card/ListCard.tsx +104 -104
- package/template/components/live-clip.ts +75 -75
- package/template/components/looks.tsx +1447 -1447
- package/template/components/loops/LoopCanvas.tsx +132 -132
- package/template/components/loops/engine.ts +184 -184
- package/template/components/loops/library.ts +667 -667
- package/template/components/loops/library2.ts +777 -777
- package/template/components/motion-loop/MotionLoop.tsx +37 -37
- package/template/components/motion-loop/meta.json +311 -311
- package/template/components/props.ts +73 -73
- package/template/components/quote-card/QuoteCard.tsx +71 -71
- package/template/components/style-layer.tsx +233 -233
- package/template/components/styles.ts +113 -113
- package/template/components/types.ts +66 -66
- package/template/components/word-pop/WordPop.tsx +59 -59
- package/template/components/word-stack/WordStack.tsx +122 -122
- package/template/presets/charcoal-sketch/PROMPT.md +48 -48
- package/template/presets/charcoal-sketch/scripts/duck_music.py +34 -34
- package/template/presets/punk-cut-paper/scenes/Motif.tsx +376 -376
- package/template/presets/punk-cut-paper/scenes/Photo.tsx +73 -73
- package/template/presets/punk-cut-paper/scenes/Ransom.tsx +119 -119
- package/template/runtime/composition.tsx +1207 -1189
- package/template/runtime/helpers.tsx +230 -230
- package/template/runtime/index.tsx +26 -22
- package/template/runtime/types.ts +324 -315
- package/template/skill/SKILL.md +188 -187
- package/template/skill/references/broll.md +44 -44
- package/template/skill/references/browser-export.md +61 -61
- package/template/skill/references/cinematic.md +206 -206
- package/template/skill/references/color.md +79 -79
- package/template/skill/references/craft.md +97 -97
- package/template/skill/references/editing-styles.md +57 -57
- package/template/skill/references/feature-launch.md +34 -34
- package/template/skill/references/footage.md +72 -72
- package/template/skill/references/format.md +145 -142
- package/template/skill/references/how-to.md +146 -146
- package/template/skill/references/launch-direction.md +89 -89
- package/template/skill/references/loops.md +151 -151
- package/template/skill/references/mcp-external.md +19 -19
- package/template/skill/references/performance.md +93 -93
- package/template/skill/references/person-cutout.md +19 -19
- package/template/skill/references/presets.md +60 -60
- package/template/skill/references/product-launch.md +134 -134
- package/template/skill/references/release-capture.md +53 -53
- package/template/skill/references/sound.md +167 -166
- package/template/skill/references/style-spy.md +160 -160
- package/template/skill/references/website-howto.md +45 -45
- package/template/starter/.studio/chat.json +1 -1
- package/template/starter/layers.json +46 -46
- package/template/starter/notes.md +4 -4
- package/template/starter/project.json +13 -13
- package/template/starter/scenes/Title.tsx +38 -38
|
@@ -1,315 +1,324 @@
|
|
|
1
|
-
// Agentcut project format (v1).
|
|
2
|
-
// Keep in sync with lib/studio/types.ts (repo root) and src/studio/schema.ts.
|
|
3
|
-
|
|
4
|
-
export type TrackKind = "scene" | "video" | "image" | "text" | "captions" | "audio" | "adjustment";
|
|
5
|
-
|
|
6
|
-
export interface StudioProject {
|
|
7
|
-
version: 1;
|
|
8
|
-
name: string;
|
|
9
|
-
fps: number;
|
|
10
|
-
durationInFrames: number;
|
|
11
|
-
background: string;
|
|
12
|
-
variants: Record<string, { width: number; height: number }>;
|
|
13
|
-
defaultVariant: string;
|
|
14
|
-
/** Google Fonts specs ("Inter:400;800") or local font files. */
|
|
15
|
-
fonts: StudioFont[];
|
|
16
|
-
/** Look for the whole video (components/styles.ts): components, captions and text follow it. */
|
|
17
|
-
style?: string;
|
|
18
|
-
/** A grade over all footage, after each clip's own grade and any adjustment layers. */
|
|
19
|
-
grade?: ColorGrade;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export type StudioFont = string | { family: string; src: string; weight?: string; style?: "normal" | "italic" };
|
|
23
|
-
|
|
24
|
-
export interface Box {
|
|
25
|
-
x: number;
|
|
26
|
-
y: number;
|
|
27
|
-
width: number;
|
|
28
|
-
height: number;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export type ClipAnimPreset =
|
|
32
|
-
| "fade"
|
|
33
|
-
| "slide-up"
|
|
34
|
-
| "slide-down"
|
|
35
|
-
| "slide-left"
|
|
36
|
-
| "slide-right"
|
|
37
|
-
| "pop"
|
|
38
|
-
| "scale"
|
|
39
|
-
| "blur"
|
|
40
|
-
| "none";
|
|
41
|
-
|
|
42
|
-
export interface ClipAnim {
|
|
43
|
-
preset: ClipAnimPreset;
|
|
44
|
-
frames: number;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export interface TextStyle {
|
|
48
|
-
fontFamily?: string;
|
|
49
|
-
fontSize?: number;
|
|
50
|
-
fontWeight?: number;
|
|
51
|
-
color?: string;
|
|
52
|
-
align?: "left" | "center" | "right";
|
|
53
|
-
lineHeight?: number;
|
|
54
|
-
letterSpacing?: number;
|
|
55
|
-
textTransform?: "none" | "uppercase" | "lowercase" | "capitalize";
|
|
56
|
-
shadow?: string;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export interface CaptionStyle {
|
|
60
|
-
preset?: "pop" | "karaoke" | "plain";
|
|
61
|
-
fontFamily?: string;
|
|
62
|
-
fontSize?: number;
|
|
63
|
-
fontWeight?: number;
|
|
64
|
-
color?: string;
|
|
65
|
-
highlight?: string;
|
|
66
|
-
position?: "bottom" | "center" | "top";
|
|
67
|
-
maxWordsPerLine?: number;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
interface BaseClipFields {
|
|
71
|
-
id: string;
|
|
72
|
-
name?: string;
|
|
73
|
-
from: number;
|
|
74
|
-
duration: number;
|
|
75
|
-
enter?: ClipAnim;
|
|
76
|
-
exit?: ClipAnim;
|
|
77
|
-
opacity?: number;
|
|
78
|
-
note?: string;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
/** A
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
export
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
|
|
170
|
-
/** "
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
export
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
export
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
}
|
|
1
|
+
// Agentcut project format (v1).
|
|
2
|
+
// Keep in sync with lib/studio/types.ts (repo root) and src/studio/schema.ts.
|
|
3
|
+
|
|
4
|
+
export type TrackKind = "scene" | "video" | "image" | "text" | "captions" | "audio" | "adjustment";
|
|
5
|
+
|
|
6
|
+
export interface StudioProject {
|
|
7
|
+
version: 1;
|
|
8
|
+
name: string;
|
|
9
|
+
fps: number;
|
|
10
|
+
durationInFrames: number;
|
|
11
|
+
background: string;
|
|
12
|
+
variants: Record<string, { width: number; height: number }>;
|
|
13
|
+
defaultVariant: string;
|
|
14
|
+
/** Google Fonts specs ("Inter:400;800") or local font files. */
|
|
15
|
+
fonts: StudioFont[];
|
|
16
|
+
/** Look for the whole video (components/styles.ts): components, captions and text follow it. */
|
|
17
|
+
style?: string;
|
|
18
|
+
/** A grade over all footage, after each clip's own grade and any adjustment layers. */
|
|
19
|
+
grade?: ColorGrade;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type StudioFont = string | { family: string; src: string; weight?: string; style?: "normal" | "italic" };
|
|
23
|
+
|
|
24
|
+
export interface Box {
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type ClipAnimPreset =
|
|
32
|
+
| "fade"
|
|
33
|
+
| "slide-up"
|
|
34
|
+
| "slide-down"
|
|
35
|
+
| "slide-left"
|
|
36
|
+
| "slide-right"
|
|
37
|
+
| "pop"
|
|
38
|
+
| "scale"
|
|
39
|
+
| "blur"
|
|
40
|
+
| "none";
|
|
41
|
+
|
|
42
|
+
export interface ClipAnim {
|
|
43
|
+
preset: ClipAnimPreset;
|
|
44
|
+
frames: number;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface TextStyle {
|
|
48
|
+
fontFamily?: string;
|
|
49
|
+
fontSize?: number;
|
|
50
|
+
fontWeight?: number;
|
|
51
|
+
color?: string;
|
|
52
|
+
align?: "left" | "center" | "right";
|
|
53
|
+
lineHeight?: number;
|
|
54
|
+
letterSpacing?: number;
|
|
55
|
+
textTransform?: "none" | "uppercase" | "lowercase" | "capitalize";
|
|
56
|
+
shadow?: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface CaptionStyle {
|
|
60
|
+
preset?: "pop" | "karaoke" | "plain";
|
|
61
|
+
fontFamily?: string;
|
|
62
|
+
fontSize?: number;
|
|
63
|
+
fontWeight?: number;
|
|
64
|
+
color?: string;
|
|
65
|
+
highlight?: string;
|
|
66
|
+
position?: "bottom" | "center" | "top";
|
|
67
|
+
maxWordsPerLine?: number;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
interface BaseClipFields {
|
|
71
|
+
id: string;
|
|
72
|
+
name?: string;
|
|
73
|
+
from: number;
|
|
74
|
+
duration: number;
|
|
75
|
+
enter?: ClipAnim;
|
|
76
|
+
exit?: ClipAnim;
|
|
77
|
+
opacity?: number;
|
|
78
|
+
note?: string;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** Where a scene was moved and resized by hand: x/y in frame fractions, scale about the frame's centre. */
|
|
82
|
+
export interface ClipTransform {
|
|
83
|
+
x?: number;
|
|
84
|
+
y?: number;
|
|
85
|
+
scale?: number;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface SceneClipFields {
|
|
89
|
+
/** A scene file in scenes/ ("Hook" → scenes/Hook.tsx)… */
|
|
90
|
+
scene?: string;
|
|
91
|
+
/** …or an Agentcut library component ("text-reveal"). Exactly one of the two. */
|
|
92
|
+
component?: string;
|
|
93
|
+
props?: Record<string, unknown>;
|
|
94
|
+
/** Moves and scales everything the scene draws (the user drags it on the preview). */
|
|
95
|
+
transform?: ClipTransform;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** A colour wheel: x/y push towards a hue on the vectorscope disk (-1…1), level moves the brightness. */
|
|
99
|
+
export interface GradeWheel { x?: number; y?: number; level?: number }
|
|
100
|
+
export type GradeBand = "red" | "orange" | "yellow" | "green" | "aqua" | "blue" | "purple" | "magenta";
|
|
101
|
+
export type GradeCurvePoint = [number, number];
|
|
102
|
+
|
|
103
|
+
/** See skills/agentcut/references/color.md. Multipliers are neutral at 1, amounts at 0 (-1…1 unless noted). */
|
|
104
|
+
export interface GradeFields {
|
|
105
|
+
brightness?: number;
|
|
106
|
+
contrast?: number;
|
|
107
|
+
saturation?: number;
|
|
108
|
+
/** -1 (cool) … 1 (warm). */
|
|
109
|
+
warmth?: number;
|
|
110
|
+
/** Degrees. */
|
|
111
|
+
hue?: number;
|
|
112
|
+
/** Stops, -5…5. */
|
|
113
|
+
exposure?: number;
|
|
114
|
+
temperature?: number;
|
|
115
|
+
tint?: number;
|
|
116
|
+
highlights?: number;
|
|
117
|
+
shadows?: number;
|
|
118
|
+
whites?: number;
|
|
119
|
+
blacks?: number;
|
|
120
|
+
vibrance?: number;
|
|
121
|
+
pivot?: number;
|
|
122
|
+
blackPoint?: number;
|
|
123
|
+
whitePoint?: number;
|
|
124
|
+
gamma?: number;
|
|
125
|
+
wheels?: { shadows?: GradeWheel; midtones?: GradeWheel; highlights?: GradeWheel };
|
|
126
|
+
curves?: { master?: GradeCurvePoint[]; r?: GradeCurvePoint[]; g?: GradeCurvePoint[]; b?: GradeCurvePoint[] };
|
|
127
|
+
hsl?: Partial<Record<GradeBand, { hue?: number; saturation?: number; luminance?: number }>>;
|
|
128
|
+
/** Built-in look id (agentcut_color_looks). */
|
|
129
|
+
look?: string;
|
|
130
|
+
lookStrength?: number;
|
|
131
|
+
/** A .cube file in the project. */
|
|
132
|
+
lut?: string;
|
|
133
|
+
lutStrength?: number;
|
|
134
|
+
/** 0…1: keep skin tones out of the colour changes. */
|
|
135
|
+
skinProtect?: number;
|
|
136
|
+
/** Written by shot matching. */
|
|
137
|
+
match?: { gains?: [number, number, number]; contrast?: number; saturation?: number; anchor?: string };
|
|
138
|
+
grain?: number;
|
|
139
|
+
grainSize?: number;
|
|
140
|
+
halation?: number;
|
|
141
|
+
bloom?: number;
|
|
142
|
+
vignette?: number;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/** A grade at one clip-local frame. `hold` jumps instead of easing into the next key. */
|
|
146
|
+
export type GradeKey = GradeFields & { frame: number; hold?: boolean };
|
|
147
|
+
|
|
148
|
+
/** Color grade for footage and images. */
|
|
149
|
+
export interface ColorGrade extends GradeFields {
|
|
150
|
+
keys?: GradeKey[];
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export interface FramingKeyframe { seconds: number; crop: Box }
|
|
154
|
+
|
|
155
|
+
export interface VideoClipFields {
|
|
156
|
+
src: string;
|
|
157
|
+
trimStart?: number;
|
|
158
|
+
grade?: ColorGrade;
|
|
159
|
+
/** false keeps the project grade and adjustment layers off this clip (default true). */
|
|
160
|
+
inheritGrade?: boolean;
|
|
161
|
+
volume?: number;
|
|
162
|
+
muted?: boolean;
|
|
163
|
+
fit?: "cover" | "contain";
|
|
164
|
+
box?: Box;
|
|
165
|
+
/** Corner radius in px (half the short side makes a circle). */
|
|
166
|
+
radius?: number;
|
|
167
|
+
playbackRate?: number;
|
|
168
|
+
/** Draw the recorded mouse over this clip (Companion recordings). */
|
|
169
|
+
cursor?: VideoCursor;
|
|
170
|
+
/** "none" keeps the project style's camera moves off this clip. */
|
|
171
|
+
camera?: "style" | "none";
|
|
172
|
+
/** Stable crop in upright source fractions, shared by preview and export. */
|
|
173
|
+
framing?: { crop: Box; path?: FramingKeyframe[]; before?: Box | null; beforePath?: FramingKeyframe[] };
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export interface VideoCursor {
|
|
177
|
+
/** `<video>.cursor.json`: path, clicks and scrolls in frames of the video file. */
|
|
178
|
+
src: string;
|
|
179
|
+
/** "hidden" draws no pointer (the video already shows one) but keeps click effects. */
|
|
180
|
+
style?: "classic" | "accent" | "spotlight" | "hand" | "hidden";
|
|
181
|
+
/** Percent of the default size (50–200). */
|
|
182
|
+
size?: number;
|
|
183
|
+
/** Ring that spreads from each click. */
|
|
184
|
+
clicks?: boolean;
|
|
185
|
+
/** 0 follows the raw path, 1 glides. */
|
|
186
|
+
smoothing?: number;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/** Contents of a `<video>.cursor.json`. */
|
|
190
|
+
export interface CursorTrack {
|
|
191
|
+
version: 1;
|
|
192
|
+
fps: number;
|
|
193
|
+
durationInFrames: number;
|
|
194
|
+
width?: number;
|
|
195
|
+
height?: number;
|
|
196
|
+
space: "video" | "source";
|
|
197
|
+
cursorInVideo: boolean;
|
|
198
|
+
path: [number, number | null, number | null][];
|
|
199
|
+
kinds: [number, string][];
|
|
200
|
+
clicks: { frame: number; x: number; y: number; button: string }[];
|
|
201
|
+
scrolls: { frame: number; x: number; y: number; dy: number }[];
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export interface ImageClipFields {
|
|
205
|
+
src: string;
|
|
206
|
+
grade?: ColorGrade;
|
|
207
|
+
/** true also applies the project grade and adjustment layers (default false, so logos keep their colours). */
|
|
208
|
+
inheritGrade?: boolean;
|
|
209
|
+
fit?: "cover" | "contain";
|
|
210
|
+
box?: Box;
|
|
211
|
+
radius?: number;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export interface TextClipFields {
|
|
215
|
+
text: string;
|
|
216
|
+
box?: Box;
|
|
217
|
+
style?: TextStyle;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export interface CaptionWord {
|
|
221
|
+
text: string;
|
|
222
|
+
from: number;
|
|
223
|
+
to: number;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export interface CaptionsClipFields {
|
|
227
|
+
words: CaptionWord[];
|
|
228
|
+
style?: CaptionStyle;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export interface AudioClipFields {
|
|
232
|
+
src: string;
|
|
233
|
+
volume?: number;
|
|
234
|
+
trimStart?: number;
|
|
235
|
+
fadeIn?: number;
|
|
236
|
+
fadeOut?: number;
|
|
237
|
+
loop?: boolean;
|
|
238
|
+
playbackRate?: number;
|
|
239
|
+
role?: "voice" | "music" | "sfx" | "ambience";
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
type WithVariants<T> = T & {
|
|
243
|
+
variants?: Record<string, Partial<Omit<T, "id">>>;
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
/** A grade over the footage below it on the timeline, for as long as the clip runs. */
|
|
247
|
+
export interface AdjustmentClipFields {
|
|
248
|
+
grade: ColorGrade;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export type SceneClip = WithVariants<BaseClipFields & SceneClipFields>;
|
|
252
|
+
export type VideoClip = WithVariants<BaseClipFields & VideoClipFields>;
|
|
253
|
+
export type ImageClip = WithVariants<BaseClipFields & ImageClipFields>;
|
|
254
|
+
export type TextClip = WithVariants<BaseClipFields & TextClipFields>;
|
|
255
|
+
export type CaptionsClip = WithVariants<BaseClipFields & CaptionsClipFields>;
|
|
256
|
+
export type AudioClip = WithVariants<BaseClipFields & AudioClipFields>;
|
|
257
|
+
export type AdjustmentClip = WithVariants<BaseClipFields & AdjustmentClipFields>;
|
|
258
|
+
|
|
259
|
+
export type StudioClip =
|
|
260
|
+
| SceneClip
|
|
261
|
+
| VideoClip
|
|
262
|
+
| ImageClip
|
|
263
|
+
| TextClip
|
|
264
|
+
| CaptionsClip
|
|
265
|
+
| AudioClip
|
|
266
|
+
| AdjustmentClip;
|
|
267
|
+
|
|
268
|
+
export interface ClipByKind {
|
|
269
|
+
scene: SceneClip;
|
|
270
|
+
video: VideoClip;
|
|
271
|
+
image: ImageClip;
|
|
272
|
+
text: TextClip;
|
|
273
|
+
captions: CaptionsClip;
|
|
274
|
+
audio: AudioClip;
|
|
275
|
+
adjustment: AdjustmentClip;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export interface StudioTrack<K extends TrackKind = TrackKind> {
|
|
279
|
+
id: string;
|
|
280
|
+
name: string;
|
|
281
|
+
kind: K;
|
|
282
|
+
hidden?: boolean;
|
|
283
|
+
muted?: boolean;
|
|
284
|
+
locked?: boolean;
|
|
285
|
+
volume?: number;
|
|
286
|
+
clips: ClipByKind[K][];
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
export interface StudioMarker {
|
|
290
|
+
id: string;
|
|
291
|
+
frame: number;
|
|
292
|
+
label: string;
|
|
293
|
+
kind?: "beat" | "cue" | "section";
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export interface StudioLayers {
|
|
297
|
+
version: 1;
|
|
298
|
+
tracks: StudioTrack[];
|
|
299
|
+
markers: StudioMarker[];
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/** Props the runtime passes to `StudioComposition`. */
|
|
303
|
+
export interface StudioCompositionProps extends Record<string, unknown> {
|
|
304
|
+
project: StudioProject;
|
|
305
|
+
layers: StudioLayers;
|
|
306
|
+
variant: string;
|
|
307
|
+
/** Base URL for `assets/…` paths, e.g. http://127.0.0.1:32118/studio/files/<slug> */
|
|
308
|
+
assetBase: string;
|
|
309
|
+
/** Base URL for `library:` paths, e.g. http://127.0.0.1:32118/studio/library */
|
|
310
|
+
libraryBase: string;
|
|
311
|
+
/** Linear gain applied to every audio clip (export loudness normalization). */
|
|
312
|
+
masterGain?: number;
|
|
313
|
+
/** Fast-seeking copies of footage, project path → URL. Only the live preview passes these. */
|
|
314
|
+
previewProxies?: Record<string, string>;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/** Props every scene component receives (plus the clip's own `props`). */
|
|
318
|
+
export interface SceneProps {
|
|
319
|
+
clip: { id: string; from: number; duration: number };
|
|
320
|
+
variant: string;
|
|
321
|
+
width: number;
|
|
322
|
+
height: number;
|
|
323
|
+
fps: number;
|
|
324
|
+
}
|