@nodetool-ai/timeline 0.8.2 → 0.8.3

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.
Files changed (124) hide show
  1. package/dist/.nodetool-build-stamp +1 -1
  2. package/dist/animation/compile.d.ts.map +1 -1
  3. package/dist/animation/compile.js +5 -1
  4. package/dist/animation/compile.js.map +1 -1
  5. package/dist/clipAudio.d.ts +32 -0
  6. package/dist/clipAudio.d.ts.map +1 -0
  7. package/dist/clipAudio.js +70 -0
  8. package/dist/clipAudio.js.map +1 -0
  9. package/dist/clipSpeed.d.ts +17 -0
  10. package/dist/clipSpeed.d.ts.map +1 -0
  11. package/dist/clipSpeed.js +58 -0
  12. package/dist/clipSpeed.js.map +1 -0
  13. package/dist/dropResolve.d.ts +14 -6
  14. package/dist/dropResolve.d.ts.map +1 -1
  15. package/dist/dropResolve.js +113 -37
  16. package/dist/dropResolve.js.map +1 -1
  17. package/dist/finish-storyboard.d.ts.map +1 -1
  18. package/dist/finish-storyboard.js +46 -39
  19. package/dist/finish-storyboard.js.map +1 -1
  20. package/dist/fonts/google-fonts.d.ts +6 -0
  21. package/dist/fonts/google-fonts.d.ts.map +1 -1
  22. package/dist/fonts/google-fonts.js +7 -1
  23. package/dist/fonts/google-fonts.js.map +1 -1
  24. package/dist/group.d.ts +16 -4
  25. package/dist/group.d.ts.map +1 -1
  26. package/dist/group.js +53 -6
  27. package/dist/group.js.map +1 -1
  28. package/dist/index.d.ts +4 -0
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +4 -0
  31. package/dist/index.js.map +1 -1
  32. package/dist/interchange.d.ts +8 -0
  33. package/dist/interchange.d.ts.map +1 -1
  34. package/dist/interchange.js +217 -27
  35. package/dist/interchange.js.map +1 -1
  36. package/dist/interchangeImport.d.ts +87 -0
  37. package/dist/interchangeImport.d.ts.map +1 -0
  38. package/dist/interchangeImport.js +404 -0
  39. package/dist/interchangeImport.js.map +1 -0
  40. package/dist/keyframes.d.ts +12 -1
  41. package/dist/keyframes.d.ts.map +1 -1
  42. package/dist/keyframes.js +78 -21
  43. package/dist/keyframes.js.map +1 -1
  44. package/dist/linked.js +1 -1
  45. package/dist/mediaTrack.d.ts +11 -0
  46. package/dist/mediaTrack.d.ts.map +1 -1
  47. package/dist/mediaTrack.js +25 -0
  48. package/dist/mediaTrack.js.map +1 -1
  49. package/dist/midi/edit.d.ts +5 -0
  50. package/dist/midi/edit.d.ts.map +1 -1
  51. package/dist/midi/edit.js +2 -1
  52. package/dist/midi/edit.js.map +1 -1
  53. package/dist/midi/grid.d.ts.map +1 -1
  54. package/dist/midi/grid.js +8 -4
  55. package/dist/midi/grid.js.map +1 -1
  56. package/dist/midi/tempo.d.ts.map +1 -1
  57. package/dist/midi/tempo.js +8 -0
  58. package/dist/midi/tempo.js.map +1 -1
  59. package/dist/ops/apply.d.ts +9 -0
  60. package/dist/ops/apply.d.ts.map +1 -1
  61. package/dist/ops/apply.js +1816 -1425
  62. package/dist/ops/apply.js.map +1 -1
  63. package/dist/ops/parse.d.ts.map +1 -1
  64. package/dist/ops/parse.js +318 -357
  65. package/dist/ops/parse.js.map +1 -1
  66. package/dist/render/draw.d.ts +43 -1
  67. package/dist/render/draw.d.ts.map +1 -1
  68. package/dist/render/draw.js +123 -3
  69. package/dist/render/draw.js.map +1 -1
  70. package/dist/render/frameCompositor.d.ts +31 -3
  71. package/dist/render/frameCompositor.d.ts.map +1 -1
  72. package/dist/render/frameCompositor.js +58 -10
  73. package/dist/render/frameCompositor.js.map +1 -1
  74. package/dist/render/sceneModel.d.ts +18 -6
  75. package/dist/render/sceneModel.d.ts.map +1 -1
  76. package/dist/render/sceneModel.js +231 -85
  77. package/dist/render/sceneModel.js.map +1 -1
  78. package/dist/render/temporal.d.ts +9 -1
  79. package/dist/render/temporal.d.ts.map +1 -1
  80. package/dist/render/temporal.js +18 -1
  81. package/dist/render/temporal.js.map +1 -1
  82. package/dist/render/textLayout.d.ts +6 -0
  83. package/dist/render/textLayout.d.ts.map +1 -1
  84. package/dist/render/textLayout.js +13 -1
  85. package/dist/render/textLayout.js.map +1 -1
  86. package/dist/rippleEdit.d.ts +20 -3
  87. package/dist/rippleEdit.d.ts.map +1 -1
  88. package/dist/rippleEdit.js +89 -17
  89. package/dist/rippleEdit.js.map +1 -1
  90. package/dist/shotLink.d.ts +47 -0
  91. package/dist/shotLink.d.ts.map +1 -0
  92. package/dist/shotLink.js +92 -0
  93. package/dist/shotLink.js.map +1 -0
  94. package/dist/splitClip.d.ts.map +1 -1
  95. package/dist/splitClip.js +16 -2
  96. package/dist/splitClip.js.map +1 -1
  97. package/dist/storyboard.js +1 -1
  98. package/dist/takes.d.ts.map +1 -1
  99. package/dist/takes.js +15 -2
  100. package/dist/takes.js.map +1 -1
  101. package/dist/testing/host-ops.d.ts +16 -0
  102. package/dist/testing/host-ops.d.ts.map +1 -0
  103. package/dist/testing/host-ops.js +378 -0
  104. package/dist/testing/host-ops.js.map +1 -0
  105. package/dist/testing/index.d.ts +3 -0
  106. package/dist/testing/index.d.ts.map +1 -0
  107. package/dist/testing/index.js +3 -0
  108. package/dist/testing/index.js.map +1 -0
  109. package/dist/testing/ops.d.ts +30 -0
  110. package/dist/testing/ops.d.ts.map +1 -0
  111. package/dist/testing/ops.js +814 -0
  112. package/dist/testing/ops.js.map +1 -0
  113. package/dist/transitionAtCut.d.ts +29 -5
  114. package/dist/transitionAtCut.d.ts.map +1 -1
  115. package/dist/transitionAtCut.js +69 -33
  116. package/dist/transitionAtCut.js.map +1 -1
  117. package/dist/trimClip.d.ts +5 -8
  118. package/dist/trimClip.d.ts.map +1 -1
  119. package/dist/trimClip.js +38 -2
  120. package/dist/trimClip.js.map +1 -1
  121. package/dist/types.d.ts +11 -0
  122. package/dist/types.d.ts.map +1 -1
  123. package/dist/types.js.map +1 -1
  124. package/package.json +11 -5
@@ -0,0 +1,814 @@
1
+ import { DEFAULT_MIDI_INSTRUMENT, DEFAULT_MODEL3D_STYLE, DEFAULT_TEMPO, makeClip, makeTrack } from "../index.js";
2
+ export const COMPOSITION = {
3
+ id: "lower_third",
4
+ name: "Lower Third",
5
+ params: {
6
+ name: { type: "string", default: "Ada", path: "/0/textStyle/text" }
7
+ },
8
+ group: makeClip({
9
+ id: "tpl_group",
10
+ trackId: "group",
11
+ name: "Lower Third",
12
+ startMs: 0,
13
+ durationMs: 3000,
14
+ mediaType: "group",
15
+ sourceType: "imported",
16
+ status: "generated"
17
+ }),
18
+ children: [
19
+ makeClip({
20
+ id: "tpl_text",
21
+ trackId: "Name",
22
+ name: "Name",
23
+ startMs: 0,
24
+ durationMs: 3000,
25
+ mediaType: "text",
26
+ sourceType: "imported",
27
+ status: "generated",
28
+ textStyle: { text: "Ada", fontSizePx: 64, color: "#ffffff" }
29
+ })
30
+ ]
31
+ };
32
+ export function seedTracks() {
33
+ return [
34
+ makeTrack({ id: "track_a", type: "video", name: "Video 1", index: 0 }),
35
+ makeTrack({ id: "track_b", type: "overlay", name: "Overlay 1", index: 1 }),
36
+ makeTrack({
37
+ id: "track_midi",
38
+ type: "midi",
39
+ name: "Music",
40
+ index: 2,
41
+ instrument: DEFAULT_MIDI_INSTRUMENT
42
+ })
43
+ ];
44
+ }
45
+ export function seedClips() {
46
+ return [
47
+ makeClip({
48
+ id: "clip_a",
49
+ trackId: "track_a",
50
+ name: "Shot A",
51
+ startMs: 0,
52
+ durationMs: 4000,
53
+ mediaType: "video",
54
+ sourceType: "imported",
55
+ status: "generated",
56
+ // Two finished takes, the second active, so the take ops
57
+ // (list/select/rename/delete_take) have something to work with.
58
+ currentAssetId: "asset_take_2",
59
+ reframe: { mode: "center" },
60
+ animations: [
61
+ { id: "anim_a", role: "in", preset: "fade", durationMs: 500 }
62
+ ],
63
+ activeTakeId: "take_2",
64
+ dependencyHash: "hash_take_2",
65
+ versions: [
66
+ {
67
+ id: "take_1",
68
+ createdAt: "2026-01-01T00:00:00.000Z",
69
+ jobId: "job_1",
70
+ assetId: "asset_take_1",
71
+ workflowUpdatedAt: "2026-01-01T00:00:00.000Z",
72
+ dependencyHash: "hash_take_1",
73
+ paramOverridesSnapshot: {},
74
+ status: "success"
75
+ },
76
+ {
77
+ id: "take_2",
78
+ createdAt: "2026-01-02T00:00:00.000Z",
79
+ jobId: "job_2",
80
+ assetId: "asset_take_2",
81
+ workflowUpdatedAt: "2026-01-02T00:00:00.000Z",
82
+ dependencyHash: "hash_take_2",
83
+ paramOverridesSnapshot: {},
84
+ status: "success"
85
+ }
86
+ ]
87
+ }),
88
+ makeClip({
89
+ id: "clip_b",
90
+ trackId: "track_b",
91
+ name: "Title",
92
+ startMs: 0,
93
+ durationMs: 3000,
94
+ mediaType: "text",
95
+ sourceType: "imported",
96
+ status: "generated",
97
+ textStyle: { text: "Hello world", fontSizePx: 64, color: "#ffffff" },
98
+ animations: [
99
+ { id: "anim_b", role: "in", preset: "fade", durationMs: 500 }
100
+ ],
101
+ // Follows the seeded media track, so `unbind_track` has a binding to
102
+ // clear and `delete_track_object` has a referencing clip to unbind.
103
+ trackBinding: { trackId: "mtrack_a", mode: "position" }
104
+ }),
105
+ makeClip({
106
+ id: "clip_c",
107
+ trackId: "track_a",
108
+ name: "Gen",
109
+ startMs: 4000,
110
+ durationMs: 5000,
111
+ mediaType: "video",
112
+ sourceType: "generated",
113
+ status: "generated",
114
+ prompt: "a cat",
115
+ // `set_generated_matte` only adjusts a matte that exists, so one clip
116
+ // carries a finished generation with a version behind it.
117
+ generatedMatte: {
118
+ assetId: "asset_mask_2",
119
+ sourceAssetId: "asset_src",
120
+ sourceRange: { fromMs: 0, toMs: 5000 },
121
+ settings: { model: "Matting" },
122
+ status: "ready",
123
+ versions: [
124
+ {
125
+ assetId: "asset_mask_1",
126
+ sourceAssetId: "asset_src",
127
+ createdAt: "2026-01-01T00:00:00.000Z",
128
+ settings: { model: "General Use (Light)" }
129
+ }
130
+ ]
131
+ }
132
+ }),
133
+ makeClip({
134
+ id: "clip_m",
135
+ trackId: "track_b",
136
+ name: "Model",
137
+ startMs: 0,
138
+ durationMs: 4000,
139
+ mediaType: "model3d",
140
+ sourceType: "imported",
141
+ status: "generated",
142
+ currentAssetId: "asset_glb",
143
+ // Opaque on purpose: a transparent style is refused until the alpha
144
+ // encode lands (T13), and `bake_model3d_clip` has to be drivable here.
145
+ model3dStyle: {
146
+ ...DEFAULT_MODEL3D_STYLE,
147
+ background: { transparent: false, color: "#101010" }
148
+ }
149
+ }),
150
+ makeClip({
151
+ id: "clip_midi",
152
+ trackId: "track_midi",
153
+ name: "Phrase",
154
+ startMs: 1000,
155
+ durationMs: 2000,
156
+ mediaType: "midi",
157
+ sourceType: "imported",
158
+ status: "generated",
159
+ notes: [
160
+ {
161
+ id: "note_a",
162
+ pitch: 60,
163
+ velocity: 80,
164
+ startTick: 125,
165
+ durationTick: 480
166
+ }
167
+ ]
168
+ }),
169
+ makeClip({
170
+ id: "clip_g",
171
+ trackId: "track_b",
172
+ name: "Group",
173
+ startMs: 0,
174
+ durationMs: 3000,
175
+ mediaType: "group",
176
+ sourceType: "imported",
177
+ status: "generated"
178
+ })
179
+ ];
180
+ }
181
+ export function seedMarkers() {
182
+ return [{ id: "marker_a", timeMs: 1000, label: "One" }];
183
+ }
184
+ /**
185
+ * One subject/object track on `clip_a`, so the track ops (list_tracks,
186
+ * bind_to_track, delete_track_object) have something to address, and
187
+ * `clip_b` follows it so `unbind_track` has a binding to clear.
188
+ */
189
+ export function seedMediaTracks() {
190
+ return [
191
+ {
192
+ id: "mtrack_a",
193
+ clipId: "clip_a",
194
+ sourceAssetId: "asset_take_2",
195
+ name: "Product",
196
+ kind: "box",
197
+ sourceStartMs: 0,
198
+ sourceEndMs: 4000,
199
+ samples: [
200
+ { sourceMs: 0, x: 0.1, y: 0.1, width: 0.2, height: 0.2 },
201
+ { sourceMs: 4000, x: 0.6, y: 0.6, width: 0.2, height: 0.2 }
202
+ ],
203
+ status: "ready"
204
+ }
205
+ ];
206
+ }
207
+ export const ASSET = {
208
+ id: "asset_1",
209
+ name: "Clip.mp4",
210
+ contentType: "video/mp4",
211
+ durationMs: 2500
212
+ };
213
+ /** The bridge's id minting, replayed so the direct run mints the same ids. */
214
+ export function directContext(state) {
215
+ const used = new Set();
216
+ for (const t of state.tracks)
217
+ used.add(t.id);
218
+ for (const c of state.clips) {
219
+ used.add(c.id);
220
+ for (const a of c.animations ?? [])
221
+ used.add(a.id);
222
+ }
223
+ for (const m of state.markers)
224
+ used.add(m.id);
225
+ const counters = {
226
+ track: 0,
227
+ clip: 0,
228
+ anim: 0,
229
+ marker: 0,
230
+ note: 0,
231
+ beat: 0,
232
+ link: 0,
233
+ version: 0
234
+ };
235
+ return {
236
+ generateFromBeats: async (document) => {
237
+ const clip = makeClip({
238
+ id: "clip_1",
239
+ trackId: "track_a",
240
+ name: "Beat 1",
241
+ startMs: 0,
242
+ durationMs: 2000,
243
+ mediaType: "video",
244
+ sourceType: "generated",
245
+ bindingKind: "text-to-video",
246
+ prompt: "Opening",
247
+ provider: undefined,
248
+ model: undefined,
249
+ beatId: "beat_a",
250
+ status: "draft"
251
+ });
252
+ return {
253
+ state: {
254
+ ...document,
255
+ clips: [...document.clips, clip],
256
+ setup: {
257
+ stage: "done",
258
+ brief: "A product film",
259
+ format: undefined,
260
+ voiceover: undefined,
261
+ beats: [
262
+ {
263
+ id: "beat_a",
264
+ prompt: "Opening",
265
+ duration_ms: 2000,
266
+ clip_id: "clip_1"
267
+ }
268
+ ]
269
+ }
270
+ },
271
+ changedClipIds: [clip.id],
272
+ result: {
273
+ ok: true,
274
+ videoClipIds: ["clip_1"],
275
+ voiceoverClipIds: [],
276
+ musicClipId: null,
277
+ startedClipIds: [],
278
+ note: "Clips created as drafts — this surface renders nothing."
279
+ }
280
+ };
281
+ },
282
+ newId: (kind) => {
283
+ let id = `${kind}_${++counters[kind]}`;
284
+ while (used.has(id))
285
+ id = `${kind}_${++counters[kind]}`;
286
+ used.add(id);
287
+ return id;
288
+ },
289
+ now: () => "2026-01-01T00:00:00.000Z",
290
+ resolveAsset: async (ref) => (ref.includes("asset_1") ? ASSET : null),
291
+ loadComposition: {
292
+ get: async (id) => (id === COMPOSITION.id ? COMPOSITION : null),
293
+ listIds: async () => [COMPOSITION.id]
294
+ },
295
+ retargetFormat: async () => ({ sequenceId: "adapted_1", name: "Adapted" }),
296
+ parseSvgPath: () => ({ ok: true })
297
+ };
298
+ }
299
+ export function directState() {
300
+ return {
301
+ tempo: DEFAULT_TEMPO,
302
+ setup: {
303
+ stage: "review",
304
+ brief: "A product film",
305
+ beats: [{ id: "beat_a", prompt: "Opening", duration_ms: 2000 }]
306
+ },
307
+ fps: 30,
308
+ width: 1920,
309
+ height: 1080,
310
+ tracks: seedTracks(),
311
+ clips: seedClips(),
312
+ markers: seedMarkers(),
313
+ mediaTracks: seedMediaTracks(),
314
+ playheadMs: 0,
315
+ selectedClipIds: []
316
+ };
317
+ }
318
+ export const FIXTURES = [
319
+ { tool: "generate_from_beats", args: {}, op: { op: "generate_from_beats" } },
320
+ {
321
+ tool: "add_midi_clip",
322
+ args: {
323
+ track: "track_midi",
324
+ start_ms: 0,
325
+ duration_ms: 2000,
326
+ notes: [{ id: "note_new", pitch: 64, start_tick: 0, duration_tick: 960 }]
327
+ },
328
+ op: {
329
+ op: "add_midi_clip",
330
+ track: "track_midi",
331
+ start_ms: 0,
332
+ duration_ms: 2000,
333
+ notes: [{ id: "note_new", pitch: 64, start_tick: 0, duration_tick: 960 }]
334
+ }
335
+ },
336
+ {
337
+ tool: "set_notes",
338
+ args: {
339
+ clip: "clip_midi",
340
+ notes: [{ id: "note_new", pitch: 67, start_tick: 0, duration_tick: 480 }]
341
+ },
342
+ op: {
343
+ op: "set_notes",
344
+ clip: "clip_midi",
345
+ notes: [{ id: "note_new", pitch: 67, start_tick: 0, duration_tick: 480 }]
346
+ }
347
+ },
348
+ { tool: "set_tempo", args: { bpm: 100 }, op: { op: "set_tempo", bpm: 100 } },
349
+ {
350
+ tool: "set_track_instrument",
351
+ args: { track: "track_midi", instrument: { preset: "bass" } },
352
+ op: {
353
+ op: "set_track_instrument",
354
+ track: "track_midi",
355
+ instrument: { preset: "bass" }
356
+ }
357
+ },
358
+ {
359
+ tool: "transpose_clip",
360
+ args: { clip: "clip_midi", semitones: 7 },
361
+ op: { op: "transpose_clip", clip: "clip_midi", semitones: 7 }
362
+ },
363
+ {
364
+ tool: "quantize_notes",
365
+ args: { clip: "clip_midi", division: "1/16" },
366
+ op: { op: "quantize_notes", clip: "clip_midi", division: "1/16" }
367
+ },
368
+ {
369
+ tool: "scale_velocity",
370
+ args: { clip: "clip_midi", factor: 1.5 },
371
+ op: { op: "scale_velocity", clip: "clip_midi", factor: 1.5 }
372
+ },
373
+ {
374
+ tool: "set_reframe_subject",
375
+ args: { clip_id: "clip_a", track_id: "mtrack_a", safe_margin: 0.2 },
376
+ op: {
377
+ op: "set_reframe_subject",
378
+ clip_id: "clip_a",
379
+ track_id: "mtrack_a",
380
+ safe_margin: 0.2
381
+ }
382
+ },
383
+ {
384
+ tool: "add_reframe_keyframe",
385
+ args: { clip_id: "clip_a", source_ms: 1000, x: 0.4, y: 0.6 },
386
+ op: {
387
+ op: "add_reframe_keyframe",
388
+ clip_id: "clip_a",
389
+ source_ms: 1000,
390
+ x: 0.4,
391
+ y: 0.6
392
+ }
393
+ },
394
+ {
395
+ tool: "clear_reframe",
396
+ args: { clip_id: "clip_a" },
397
+ op: { op: "clear_reframe", clip_id: "clip_a" }
398
+ },
399
+ {
400
+ tool: "retarget_format",
401
+ args: { aspect_ratio: "9:16", strategy: "center" },
402
+ op: { op: "retarget_format", aspect_ratio: "9:16", strategy: "center" }
403
+ },
404
+ {
405
+ tool: "stagger_animations",
406
+ args: { clip_ids: ["clip_a", "clip_b"], offset_ms: 200 },
407
+ op: {
408
+ op: "stagger_animations",
409
+ clip_ids: ["clip_a", "clip_b"],
410
+ offset_ms: 200
411
+ }
412
+ },
413
+ {
414
+ tool: "set_setup",
415
+ args: { brief: "Updated brief", voiceover: false },
416
+ op: { op: "set_setup", brief: "Updated brief", voiceover: false }
417
+ },
418
+ {
419
+ tool: "plan_beats",
420
+ args: { beats: [{ prompt: "Hero shot", durationMs: 3000 }] },
421
+ op: { op: "plan_beats", beats: [{ prompt: "Hero shot", durationMs: 3000 }] }
422
+ },
423
+ {
424
+ tool: "update_beat",
425
+ args: { beat: "beat_a", prompt: "Updated shot", transition: null },
426
+ op: {
427
+ op: "update_beat",
428
+ beat: "beat_a",
429
+ prompt: "Updated shot",
430
+ transition: null
431
+ }
432
+ },
433
+ {
434
+ tool: "remove_beat",
435
+ args: { beat: "1" },
436
+ op: { op: "remove_beat", beat: "1" }
437
+ },
438
+ { tool: "get_state", args: {}, op: { op: "get_state" } },
439
+ {
440
+ tool: "add_track",
441
+ args: { type: "audio", name: "Score" },
442
+ op: { op: "add_track", type: "audio", name: "Score" }
443
+ },
444
+ {
445
+ tool: "move_track",
446
+ args: { target: "track_b", toIndex: 0 },
447
+ op: { op: "move_track", target: "track_b", toIndex: 0 }
448
+ },
449
+ {
450
+ tool: "delete_track",
451
+ args: { target: "track_a", deleteClips: true },
452
+ op: { op: "delete_track", target: "track_a", deleteClips: true }
453
+ },
454
+ {
455
+ tool: "add_text_clip",
456
+ args: { text: "New title", fontSizePx: 48 },
457
+ op: {
458
+ op: "add_text_clip",
459
+ text: "New title",
460
+ loose: { fontSizePx: 48 }
461
+ }
462
+ },
463
+ {
464
+ tool: "add_media_clip",
465
+ args: { asset: "asset://asset_1.mp4" },
466
+ op: { op: "add_media_clip", asset: "asset://asset_1.mp4" }
467
+ },
468
+ {
469
+ tool: "add_shape_clip",
470
+ args: { kind: "rect", width: 0.5 },
471
+ op: { op: "add_shape_clip", loose: { kind: "rect", width: 0.5 } }
472
+ },
473
+ {
474
+ tool: "add_model3d_clip",
475
+ args: { assetId: "asset_glb", durationMs: 6000 },
476
+ op: { op: "add_model3d_clip", assetId: "asset_glb", durationMs: 6000 }
477
+ },
478
+ {
479
+ tool: "set_model3d_style",
480
+ args: {
481
+ target: "clip_m",
482
+ patch: { camera: { azimuthDeg: 120 }, lighting: "soft" }
483
+ },
484
+ op: {
485
+ op: "set_model3d_style",
486
+ target: "clip_m",
487
+ patch: { camera: { azimuthDeg: 120 }, lighting: "soft" }
488
+ }
489
+ },
490
+ {
491
+ tool: "bake_model3d_clip",
492
+ args: { target: "clip_m" },
493
+ op: { op: "bake_model3d_clip", target: "clip_m" }
494
+ },
495
+ {
496
+ tool: "add_group",
497
+ args: {
498
+ name: "Band",
499
+ startMs: 0,
500
+ durationMs: 2000,
501
+ children: ["clip_b"]
502
+ },
503
+ op: {
504
+ op: "add_group",
505
+ name: "Band",
506
+ startMs: 0,
507
+ durationMs: 2000,
508
+ children: ["clip_b"]
509
+ }
510
+ },
511
+ {
512
+ tool: "generate_clip",
513
+ args: { kind: "text-to-image", prompt: "a fox" },
514
+ op: { op: "generate_clip", kind: "text-to-image", prompt: "a fox" }
515
+ },
516
+ {
517
+ tool: "split_clip",
518
+ args: { target: "clip_a", atMs: 2000 },
519
+ op: { op: "split_clip", target: "clip_a", atMs: 2000 }
520
+ },
521
+ {
522
+ tool: "trim_clip",
523
+ args: { target: "clip_a", durationMs: 2500 },
524
+ op: { op: "trim_clip", target: "clip_a", durationMs: 2500 }
525
+ },
526
+ {
527
+ tool: "move_clip",
528
+ args: { target: "clip_a", startMs: 500, trackId: "track_b" },
529
+ op: { op: "move_clip", target: "clip_a", startMs: 500, trackId: "track_b" }
530
+ },
531
+ {
532
+ tool: "delete_clip",
533
+ args: { target: "clip_a" },
534
+ op: { op: "delete_clip", target: "clip_a" }
535
+ },
536
+ {
537
+ tool: "duplicate_clip",
538
+ args: { target: "clip_a", gapMs: 100 },
539
+ op: { op: "duplicate_clip", target: "clip_a", gapMs: 100 }
540
+ },
541
+ {
542
+ tool: "set_clip_params",
543
+ args: {
544
+ target: "clip_b",
545
+ startMs: 1200,
546
+ durationMs: 2000,
547
+ fontSizePx: 80,
548
+ opacity: 0.5
549
+ },
550
+ op: {
551
+ op: "set_clip_params",
552
+ target: "clip_b",
553
+ patch: {
554
+ startMs: 1200,
555
+ durationMs: 2000,
556
+ fontSizePx: 80,
557
+ opacity: 0.5
558
+ }
559
+ }
560
+ },
561
+ {
562
+ tool: "set_parent",
563
+ args: { target: "clip_b", parentId: "clip_g" },
564
+ op: { op: "set_parent", target: "clip_b", parentId: "clip_g" }
565
+ },
566
+ {
567
+ tool: "set_transition",
568
+ args: {
569
+ target: "clip_a",
570
+ transition: { type: "crossfade", durationMs: 500 }
571
+ },
572
+ op: {
573
+ op: "set_transition",
574
+ target: "clip_a",
575
+ transition: { type: "crossfade", durationMs: 500 }
576
+ }
577
+ },
578
+ {
579
+ tool: "apply_transition_at_cut",
580
+ args: {
581
+ outgoingClipId: "clip_a",
582
+ incomingClipId: "clip_c",
583
+ durationMs: 500,
584
+ type: "wipe",
585
+ direction: "right",
586
+ softness: 0.2
587
+ },
588
+ op: {
589
+ op: "apply_transition_at_cut",
590
+ outgoingClipId: "clip_a",
591
+ incomingClipId: "clip_c",
592
+ durationMs: 500,
593
+ type: "wipe",
594
+ direction: "right",
595
+ softness: 0.2
596
+ }
597
+ },
598
+ {
599
+ tool: "set_mask",
600
+ args: { target: "clip_a", mask: { kind: "ellipse", featherPx: 4 } },
601
+ op: {
602
+ op: "set_mask",
603
+ target: "clip_a",
604
+ mask: { kind: "ellipse", featherPx: 4 }
605
+ }
606
+ },
607
+ {
608
+ tool: "set_matte",
609
+ args: { target: "clip_a", matte: { source: "clip_b", mode: "luma" } },
610
+ op: {
611
+ op: "set_matte",
612
+ target: "clip_a",
613
+ matte: { source: "clip_b", mode: "luma" }
614
+ }
615
+ },
616
+ {
617
+ tool: "set_time_remap",
618
+ args: {
619
+ target: "clip_a",
620
+ timeRemap: {
621
+ keyframes: [
622
+ { t: 0, sourceMs: 0 },
623
+ { t: 1, sourceMs: 2000 }
624
+ ]
625
+ }
626
+ },
627
+ op: {
628
+ op: "set_time_remap",
629
+ target: "clip_a",
630
+ timeRemap: {
631
+ keyframes: [
632
+ { t: 0, sourceMs: 0 },
633
+ { t: 1, sourceMs: 2000 }
634
+ ]
635
+ }
636
+ }
637
+ },
638
+ {
639
+ tool: "set_effects",
640
+ args: { target: "clip_a", effects: [{ type: "blur", radius: 6 }] },
641
+ op: {
642
+ op: "set_effects",
643
+ target: "clip_a",
644
+ effects: [{ type: "blur", radius: 6 }]
645
+ }
646
+ },
647
+ {
648
+ tool: "set_clip_binding",
649
+ args: { target: "clip_c", prompt: "a dog", regenerate: true },
650
+ op: {
651
+ op: "set_clip_binding",
652
+ target: "clip_c",
653
+ prompt: "a dog",
654
+ regenerate: true
655
+ }
656
+ },
657
+ {
658
+ tool: "animate_clip",
659
+ args: {
660
+ target: "clip_b",
661
+ animations: [{ role: "in", preset: "fade" }]
662
+ },
663
+ op: {
664
+ op: "animate_clip",
665
+ target: "clip_b",
666
+ animations: [{ role: "in", preset: "fade" }]
667
+ }
668
+ },
669
+ {
670
+ tool: "clear_animations",
671
+ args: { target: "clip_b" },
672
+ op: { op: "clear_animations", target: "clip_b" }
673
+ },
674
+ {
675
+ tool: "list_animation_presets",
676
+ args: {},
677
+ op: { op: "list_animation_presets" }
678
+ },
679
+ {
680
+ tool: "select_clip",
681
+ args: { target: "clip_a" },
682
+ op: { op: "select_clip", target: "clip_a" }
683
+ },
684
+ { tool: "seek", args: { timeMs: 900 }, op: { op: "seek", timeMs: 900 } },
685
+ {
686
+ tool: "add_marker",
687
+ args: { timeMs: 2000, label: "Two" },
688
+ op: { op: "add_marker", timeMs: 2000, label: "Two" }
689
+ },
690
+ {
691
+ tool: "delete_marker",
692
+ args: { target: "One" },
693
+ op: { op: "delete_marker", target: "One" }
694
+ },
695
+ {
696
+ tool: "set_markers_from_beats",
697
+ args: { bpm: 120, count: 4 },
698
+ op: { op: "set_markers_from_beats", bpm: 120, count: 4 }
699
+ },
700
+ {
701
+ tool: "snap_to_beats",
702
+ args: { bpm: 120, targets: ["clip_a"] },
703
+ op: { op: "snap_to_beats", bpm: 120, targets: ["clip_a"] }
704
+ },
705
+ {
706
+ tool: "set_baked_animation",
707
+ args: {
708
+ target: "clip_a",
709
+ animation: {
710
+ property: "scale",
711
+ keyframes: [
712
+ { sourceMs: 0, value: 1 },
713
+ { sourceMs: 400, value: 1.3 }
714
+ ],
715
+ bakedFrom: { kind: "audio", assetId: "asset_1" }
716
+ }
717
+ },
718
+ op: {
719
+ op: "set_baked_animation",
720
+ target: "clip_a",
721
+ animation: {
722
+ property: "scale",
723
+ keyframes: [
724
+ { sourceMs: 0, value: 1 },
725
+ { sourceMs: 400, value: 1.3 }
726
+ ],
727
+ bakedFrom: { kind: "audio", assetId: "asset_1" }
728
+ }
729
+ }
730
+ },
731
+ {
732
+ tool: "set_generated_matte",
733
+ args: {
734
+ target: "clip_c",
735
+ invert: true,
736
+ strength: 0.75,
737
+ featherPx: 3,
738
+ selectVersionAssetId: "asset_mask_1"
739
+ },
740
+ op: {
741
+ op: "set_generated_matte",
742
+ target: "clip_c",
743
+ invert: true,
744
+ strength: 0.75,
745
+ featherPx: 3,
746
+ selectVersionAssetId: "asset_mask_1"
747
+ }
748
+ },
749
+ {
750
+ tool: "insert_composition",
751
+ args: { composition_id: "lower_third", startMs: 1000 },
752
+ op: {
753
+ op: "insert_composition",
754
+ composition_id: "lower_third",
755
+ startMs: 1000
756
+ }
757
+ },
758
+ {
759
+ tool: "list_takes",
760
+ args: { target: "clip_a" },
761
+ op: { op: "list_takes", target: "clip_a" }
762
+ },
763
+ {
764
+ tool: "select_take",
765
+ args: { target: "clip_a", takeId: "take_1" },
766
+ op: { op: "select_take", target: "clip_a", takeId: "take_1" }
767
+ },
768
+ {
769
+ tool: "rename_take",
770
+ args: { target: "clip_a", takeId: "take_1", label: "Wide" },
771
+ op: { op: "rename_take", target: "clip_a", takeId: "take_1", label: "Wide" }
772
+ },
773
+ {
774
+ tool: "delete_take",
775
+ args: { target: "clip_a", takeId: "take_1" },
776
+ op: { op: "delete_take", target: "clip_a", takeId: "take_1" }
777
+ },
778
+ {
779
+ tool: "list_tracks",
780
+ args: { target: "clip_a" },
781
+ op: { op: "list_tracks", target: "clip_a" }
782
+ },
783
+ {
784
+ tool: "delete_track_object",
785
+ args: { trackId: "mtrack_a" },
786
+ op: { op: "delete_track_object", trackId: "mtrack_a" }
787
+ },
788
+ {
789
+ tool: "bind_to_track",
790
+ args: {
791
+ target: "clip_b",
792
+ trackId: "mtrack_a",
793
+ mode: "position_scale",
794
+ offset: { x: 12, y: -8 },
795
+ scale: 1.25,
796
+ smoothing: 0.3
797
+ },
798
+ op: {
799
+ op: "bind_to_track",
800
+ target: "clip_b",
801
+ trackId: "mtrack_a",
802
+ mode: "position_scale",
803
+ offset: { x: 12, y: -8 },
804
+ scale: 1.25,
805
+ smoothing: 0.3
806
+ }
807
+ },
808
+ {
809
+ tool: "unbind_track",
810
+ args: { target: "clip_b" },
811
+ op: { op: "unbind_track", target: "clip_b" }
812
+ }
813
+ ];
814
+ //# sourceMappingURL=ops.js.map