@mengine/medeo-client 2.1.1-dsl.8 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,821 +0,0 @@
1
- import { Cursor, TreeID } from "loro-crdt";
2
-
3
- //#region ../medeo-dsl/src/types.d.ts
4
- type TrackRole = 'video_clip' | 'speech' | 'caption' | 'bgm';
5
- type ResourceSystem = 'memota' | 'memota-speech';
6
- interface Track$1 {
7
- role: TrackRole;
8
- hidden?: boolean;
9
- }
10
- /**
11
- * How a Clip plays its content: the window it takes from the source, its pace, and whether it
12
- * fills the Timeline. One value: concurrent edits of the same marker keep one whole marker.
13
- */
14
- interface SeqMarker {
15
- inMs: number;
16
- outMs: number;
17
- rate?: number;
18
- fillTimeline?: true;
19
- }
20
- /**
21
- * Where a Clip starts: at an absolute time on the Timeline, or following another Clip. No anchor
22
- * means it plays in Tree order. One value, so concurrent placements keep one whole placement.
23
- */
24
- interface TimeAnchor {
25
- /** The Timeline (absolute) or another Clip (following). */
26
- to: string;
27
- offsetMs: number;
28
- /** The absolute start recorded by the placement edit; used when the anchor cannot be solved. */
29
- fallback_abs_ms: number;
30
- }
31
- /** A Clip's single-valued relations are fields of its own row: its content and its time anchor. */
32
- interface Clip {
33
- seqMarker: SeqMarker;
34
- volume?: number;
35
- /** The media or Caption this use plays. */
36
- source: string;
37
- anchor?: TimeAnchor;
38
- }
39
- interface MediaLocator {
40
- system: ResourceSystem;
41
- key: string;
42
- digest?: string;
43
- }
44
- type Media = MediaLocator & ({
45
- kind: 'video';
46
- durationMs: number;
47
- storageKey?: string;
48
- } | {
49
- kind: 'audio' | 'voiceover-recording';
50
- durationMs: number;
51
- storageKey: string;
52
- } | {
53
- kind: 'image';
54
- storageKey?: string;
55
- });
56
- interface AudioScript {
57
- body: string;
58
- defaultLanguage?: string;
59
- }
60
- interface CaptionStyle$1 {
61
- font?: {
62
- system: 'font-library';
63
- key: string;
64
- };
65
- fontSize?: number;
66
- fontColor?: string;
67
- fontWeight?: number;
68
- entranceAnimation?: string;
69
- entranceAnimationDurationMs?: number;
70
- strokeColor?: string;
71
- strokeWidth?: number;
72
- positionX?: number;
73
- positionY?: number;
74
- }
75
- /** A run of a script's body a Caption reads its words from. One value: script and range move together. */
76
- interface CaptionContent {
77
- audioScriptId: string;
78
- start: Cursor;
79
- end: Cursor;
80
- }
81
- /** Words come from a selected run of a script or from the Caption's own text, never both. */
82
- interface Caption {
83
- selection?: CaptionContent;
84
- text?: string;
85
- style?: CaptionStyle$1;
86
- }
87
- /** A phonetic script's base script and the pronunciation written for it, taken or replaced together. */
88
- interface Phoneme {
89
- audioScriptId: string;
90
- /** One whole script in the target TTS vocabulary, such as a `<speak>` document. */
91
- phonemeScript?: string;
92
- }
93
- /** A file Memota stored from raw content: how a Media File entity names it, and its digest. */
94
- interface StoredFile {
95
- system: 'memota';
96
- key: string;
97
- storageKey?: string;
98
- digest: string;
99
- }
100
- /**
101
- * A variant of an AudioScript: the script it reads, plus how to pronounce it. It has the Media File
102
- * trait (D178): its `phonemeScript` is raw content, stored in Memota as a text file whenever it is
103
- * written, and the file's facts are kept beside it. Without a `phonemeScript` it has no file.
104
- */
105
- interface PhoneticScript extends Partial<StoredFile> {
106
- phoneme: Phoneme;
107
- }
108
- interface Voice {
109
- system: 'voice-library';
110
- key: string;
111
- name?: string;
112
- }
113
- /** Table keys carry entity identity; values never duplicate an id or a single-table kind. */
114
- interface EntityValues {
115
- 'timeline-entities': Record<string, never>;
116
- 'track-entities': Track$1;
117
- 'clip-entities': Clip;
118
- 'media-entities': Media;
119
- 'audio-script-entities': AudioScript;
120
- 'phonetic-script-entities': PhoneticScript;
121
- 'caption-entities': Caption;
122
- 'voice-entities': Voice;
123
- }
124
- /** Only relations an entity may hold many of have tables; single-valued ones are fields of their owner. */
125
- interface RelationValues {
126
- 'voice-timbre-relations': {
127
- recordingId: string;
128
- voiceId: string;
129
- };
130
- /**
131
- * `sourceDigest`: the source's digest when the product was made from it (D177). A product whose
132
- * source's digest differs now was made from content the source no longer has.
133
- */
134
- 'derived-from-relations': {
135
- entityId: string;
136
- sourceId: string;
137
- sourceDigest?: string;
138
- };
139
- }
140
- type EntityTable = keyof EntityValues;
141
- type RelationTable = keyof RelationValues;
142
- type EntityTables = { [K in EntityTable]: Record<string, EntityValues[K]> };
143
- type RelationTables = { [K in RelationTable]: Record<string, RelationValues[K]> };
144
- type FieldPatch<T> = { [K in keyof T]?: NonNullable<T[K]> extends object ? FieldPatch<NonNullable<T[K]>> : T[K] | undefined };
145
- type EntityMutation = { [K in EntityTable]: {
146
- type: 'create-entity';
147
- table: K;
148
- id: string;
149
- value: EntityValues[K];
150
- } | {
151
- type: 'patch-entity';
152
- table: K;
153
- id: string;
154
- patch: FieldPatch<EntityValues[K]>;
155
- } | {
156
- type: 'delete-entity';
157
- table: K;
158
- id: string;
159
- } }[EntityTable];
160
- type RelationMutation = { [K in RelationTable]: {
161
- type: 'set-relation';
162
- table: K;
163
- value: RelationValues[K];
164
- } | {
165
- type: 'delete-relation';
166
- table: K;
167
- id: string;
168
- } }[RelationTable];
169
- type ContainMutation = {
170
- type: 'insert-node';
171
- entityId: string;
172
- parentId?: string;
173
- index?: number;
174
- } | {
175
- type: 'move-node';
176
- entityId: string;
177
- parentId?: string;
178
- index?: number;
179
- } | {
180
- type: 'delete-node';
181
- entityId: string;
182
- };
183
- interface CaptionSelection {
184
- captionId: string;
185
- audioScriptId: string;
186
- start: number;
187
- end: number;
188
- }
189
- type TextMutation = {
190
- type: 'edit-caption-text';
191
- captionId: string;
192
- expectedBodyId?: string;
193
- edits: readonly TextEdit[];
194
- } | {
195
- type: 'edit-text';
196
- audioScriptId: string;
197
- expectedBodyId?: string;
198
- edits: readonly TextEdit[];
199
- } | ({
200
- type: 'set-caption-content';
201
- } & CaptionSelection);
202
- type DslMutation = EntityMutation | RelationMutation | ContainMutation | TextMutation;
203
- interface ContainNode {
204
- treeId: TreeID;
205
- entityId: string;
206
- children: ContainNode[];
207
- }
208
- interface DslDiagnostic {
209
- code: string;
210
- path: string;
211
- message: string;
212
- }
213
- interface TextRun {
214
- insert: string;
215
- attributes?: Record<string, unknown>;
216
- }
217
- interface RichTextSnapshot {
218
- bodyId: string;
219
- plainText: string;
220
- delta: TextRun[];
221
- }
222
- interface CaptionText {
223
- text: string;
224
- start: number;
225
- end: number;
226
- bodyId: string;
227
- }
228
- type DeepReadonly<T> = T extends Cursor ? T : T extends object ? { readonly [K in keyof T]: DeepReadonly<T[K]> } : T;
229
- type MedeoDslSnapshot = DeepReadonly<EntityTables & RelationTables & {
230
- 'contain-relations': ContainNode[];
231
- richText: Record<string, RichTextSnapshot>;
232
- captionText: Record<string, CaptionText>;
233
- diagnostics: DslDiagnostic[];
234
- }>;
235
- type TextMark = 'language';
236
- type TextEdit = {
237
- type: 'insert';
238
- at: number;
239
- text: string;
240
- } | {
241
- type: 'delete';
242
- at: number;
243
- length: number;
244
- } | {
245
- type: 'mark';
246
- start: number;
247
- end: number;
248
- key: TextMark;
249
- value: string;
250
- } | {
251
- type: 'unmark';
252
- start: number;
253
- end: number;
254
- key: TextMark;
255
- } | {
256
- type: 'delta';
257
- delta: TextDelta[];
258
- };
259
- type TextDelta = {
260
- insert: string;
261
- attributes?: Record<string, string | number | null>;
262
- } | {
263
- retain: number;
264
- attributes?: Record<string, string | number | null>;
265
- } | {
266
- delete: number;
267
- };
268
- //#endregion
269
- //#region ../medeo-dsl/src/ids.d.ts
270
- declare function tupleHash(tuple: readonly string[]): string;
271
- declare function resourceId(kind: 'media' | 'voice', system: string, key: string): string;
272
- declare function relationId<K extends RelationTable>(table: K, value: RelationValues[K]): string;
273
- type EntityIdKind = 'timeline' | 'track' | 'clip' | 'audio-script' | 'phonetic-script' | 'caption';
274
- type DslIdFactory = (kind: EntityIdKind) => string;
275
- declare const defaultIdFactory: DslIdFactory;
276
- //#endregion
277
- //#region src/dsl/commit-options.d.ts
278
- /** Self-reported audit author; authorization remains the server's responsibility. */
279
- interface OpActor {
280
- user_id: string;
281
- role: 'user' | 'agent';
282
- }
283
- interface CommitOptions {
284
- /** The server audit view exposes string intents; other JSON values remain in the native message. */
285
- intent?: unknown;
286
- actor?: OpActor;
287
- }
288
- //#endregion
289
- //#region src/dsl/projection/generated/video-draft-idl.d.ts
290
- /**
291
- * @generated by @mengine/idl-codegen — DO NOT EDIT MANUALLY.
292
- *
293
- * VideoDraft read-view types extracted from the Smithy IDL
294
- * (medeo-v2-design-materials). Re-run `vp run @mengine/idl-codegen#sync`.
295
- * Source IDL commit: 902e82e3fec1e94b36e14ef671de91abd210dc86
296
- *
297
- * WHY EVERY FIELD IS `T | undefined`:
298
- * AWS `smithy-typescript-codegen` widens every structure member to
299
- * `T | undefined` regardless of the Smithy `@required` trait — it favours
300
- * deserialization robustness (a peer may omit a field on the wire) over
301
- * encoding requiredness in the static type. So these generated types are NOT
302
- * the source of truth for which fields are required: the Smithy `.smithy`
303
- * model is. Many fields here (e.g. `VideoClipPart.play_in` / `play_out` /
304
- * `volume` / `origin_media_id`) are `@required` in the contract.
305
- *
306
- * Requiredness is restored by import and write-time validation, not here.
307
- * DSL content constraints are owned by medeo-dsl and enforced at the medeo-client
308
- * transaction and import boundaries.
309
- * Do not assume a
310
- * field is optional just because its type is `| undefined`.
311
- */
312
- /**
313
- * @public
314
- * @enum
315
- */
316
- declare const PartKind: {
317
- readonly BGM: "bgm";
318
- readonly CAPTION: "caption";
319
- readonly SPEECH: "speech";
320
- readonly VIDEO_CLIP: "video_clip";
321
- };
322
- /**
323
- * @public
324
- */
325
- type PartKind = (typeof PartKind)[keyof typeof PartKind];
326
- /**
327
- * @public
328
- */
329
- interface VoiceSummary {
330
- name: string | undefined;
331
- id: string | undefined;
332
- }
333
- /**
334
- * @public
335
- */
336
- interface SpeechPart$1 {
337
- id: string | undefined;
338
- duration_ms: number | undefined;
339
- /**
340
- * Types of parts that can be contained in tracks
341
- * @public
342
- */
343
- kind: PartKind | undefined;
344
- audio_script: string | undefined;
345
- volume: number | undefined;
346
- audio_storage_key: string | undefined;
347
- origin_speech_id: string | undefined;
348
- voice: VoiceSummary | undefined;
349
- caption_ids: string[] | undefined;
350
- }
351
- /**
352
- * Caption visual style configuration
353
- * @public
354
- */
355
- interface CaptionStyle {
356
- /**
357
- * Font ID referencing a font from the font library. Defaults to system font if not provided
358
- * @public
359
- */
360
- font_id?: string | undefined;
361
- /**
362
- * Font size in points
363
- * @public
364
- */
365
- font_size?: number | undefined;
366
- /**
367
- * Font color as hex string (e.g. "#FFFFFF")
368
- * @public
369
- */
370
- font_color?: string | undefined;
371
- /**
372
- * Numeric font weight, e.g. 400 for regular or 700 for bold
373
- * @public
374
- */
375
- font_weight?: number | undefined;
376
- /**
377
- * Caption entrance animation preset ID, e.g. "fade", "slideUp", or "none"
378
- * @public
379
- */
380
- entrance_animation?: string | undefined;
381
- /**
382
- * Caption entrance animation duration in milliseconds
383
- * @public
384
- */
385
- entrance_animation_duration_ms?: number | undefined;
386
- /**
387
- * Caption outline/stroke color as hex string (e.g. "#000000")
388
- * @public
389
- */
390
- stroke_color?: string | undefined;
391
- /**
392
- * Caption outline/stroke width in pixels
393
- * @public
394
- */
395
- stroke_width?: number | undefined;
396
- /**
397
- * Caption center X position as a percentage (0.0 to 1.0)
398
- * @public
399
- */
400
- position_x?: number | undefined;
401
- /**
402
- * Caption center Y position as a percentage (0.0 to 1.0)
403
- * @public
404
- */
405
- position_y?: number | undefined;
406
- }
407
- /**
408
- * @public
409
- */
410
- interface CaptionPart$1 {
411
- id: string | undefined;
412
- duration_ms: number | undefined;
413
- /**
414
- * Types of parts that can be contained in tracks
415
- * @public
416
- */
417
- kind: PartKind | undefined;
418
- speech_part_id: string | undefined;
419
- text: string | undefined;
420
- start_ms: number | undefined;
421
- /**
422
- * Caption visual style (font, size, color, weight, animation, outline). Uses default style if not provided
423
- * @public
424
- */
425
- style?: CaptionStyle | undefined;
426
- }
427
- /**
428
- * @public
429
- * @enum
430
- */
431
- declare const AspectRatio: {
432
- readonly RATIO_16_9: "16:9";
433
- readonly RATIO_9_16: "9:16";
434
- };
435
- /**
436
- * @public
437
- */
438
- type AspectRatio = (typeof AspectRatio)[keyof typeof AspectRatio];
439
- /**
440
- * @public
441
- * @enum
442
- */
443
- declare const AssetSource: {
444
- readonly AI_IMAGES: "ai_images";
445
- readonly AI_VIDEOS: "ai_videos";
446
- readonly MY_UPLOADED_ASSETS: "my_uploaded_assets";
447
- readonly STOCK_VIDEOS: "stock_videos";
448
- };
449
- /**
450
- * @public
451
- */
452
- type AssetSource = (typeof AssetSource)[keyof typeof AssetSource];
453
- /**
454
- * An extra aspect ratio variant with independent storage keys for thumbnail,
455
- * preview video, and highlight video. Stored inside video_settings JSONB.
456
- * @public
457
- */
458
- interface RatioVariant {
459
- aspect_ratio: string | undefined;
460
- thumb_storage_key: string | undefined;
461
- video_storage_key: string | undefined;
462
- highlight_video_storage_key?: string | undefined;
463
- }
464
- /**
465
- * @public
466
- */
467
- interface VideoCreationSettings$1 {
468
- voice_id?: string | undefined;
469
- duration_ms?: number | undefined;
470
- aspect_ratio?: AspectRatio | undefined;
471
- video_style_id?: string | undefined;
472
- asset_sources?: AssetSource[] | undefined;
473
- recipe_id?: string | undefined;
474
- enable_high_cost_confirm?: boolean | undefined;
475
- user_confirm_cost_threshold?: number | undefined;
476
- /**
477
- * Extra aspect ratio variants with independent storage keys.
478
- * Each variant carries its own thumbnail, preview video, and optional highlight video.
479
- * Used when a recipe supports multiple aspect ratios (e.g. both 16:9 and 9:16).
480
- * @public
481
- */
482
- extra_ratios?: RatioVariant[] | undefined;
483
- }
484
- /**
485
- * @public
486
- */
487
- interface TrackItem {
488
- abs_time_position: number | undefined;
489
- part_id: string | undefined;
490
- }
491
- /**
492
- * @public
493
- */
494
- interface Track {
495
- id: string | undefined;
496
- /**
497
- * Types of parts that can be contained in tracks
498
- * @public
499
- */
500
- parts_kind: PartKind | undefined;
501
- is_hidden: boolean | undefined;
502
- items: TrackItem[] | undefined;
503
- }
504
- /**
505
- * @public
506
- */
507
- interface Attachment {
508
- part_id: string | undefined;
509
- relative_time_position: number | undefined;
510
- }
511
- /**
512
- * @public
513
- */
514
- interface PartAggregation {
515
- body_part_id: string | undefined;
516
- attachments: Attachment[] | undefined;
517
- }
518
- /**
519
- * @public
520
- */
521
- interface BgmPart$1 {
522
- id: string | undefined;
523
- duration_ms: number | undefined;
524
- /**
525
- * Types of parts that can be contained in tracks
526
- * @public
527
- */
528
- kind: PartKind | undefined;
529
- audio_storage_key: string | undefined;
530
- volume: number | undefined;
531
- origin_media_id: string | undefined;
532
- }
533
- /**
534
- * @public
535
- * @enum
536
- */
537
- declare const SpeedShiftCategory: {
538
- /**
539
- * Variable speed controlled by Bezier keyframes
540
- */
541
- readonly CURVE: "curve";
542
- /**
543
- * Constant speed multiplier across the entire clip
544
- */
545
- readonly LINEAR: "linear";
546
- };
547
- /**
548
- * @public
549
- */
550
- type SpeedShiftCategory = (typeof SpeedShiftCategory)[keyof typeof SpeedShiftCategory];
551
- /**
552
- * @public
553
- */
554
- interface TangentHandle {
555
- x: number | undefined;
556
- y: number | undefined;
557
- }
558
- /**
559
- * @public
560
- */
561
- interface SpeedKeyframe {
562
- position: number | undefined;
563
- rate: number | undefined;
564
- in_tangent?: TangentHandle | undefined;
565
- out_tangent?: TangentHandle | undefined;
566
- }
567
- /**
568
- * @public
569
- */
570
- interface CurveConfig {
571
- keyframes: SpeedKeyframe[] | undefined;
572
- }
573
- /**
574
- * @public
575
- */
576
- interface LinearConfig {
577
- speed: number | undefined;
578
- }
579
- /**
580
- * @public
581
- */
582
- type SpeedShiftConfigUnion = SpeedShiftConfigUnion.CurveMember | SpeedShiftConfigUnion.LinearMember | SpeedShiftConfigUnion.$UnknownMember;
583
- /**
584
- * @public
585
- */
586
- declare namespace SpeedShiftConfigUnion {
587
- interface LinearMember {
588
- linear: LinearConfig;
589
- curve?: never;
590
- $unknown?: never;
591
- }
592
- interface CurveMember {
593
- linear?: never;
594
- curve: CurveConfig;
595
- $unknown?: never;
596
- }
597
- /**
598
- * @public
599
- */
600
- interface $UnknownMember {
601
- linear?: never;
602
- curve?: never;
603
- $unknown: [string, any];
604
- }
605
- interface Visitor<T> {
606
- linear: (value: LinearConfig) => T;
607
- curve: (value: CurveConfig) => T;
608
- _: (name: string, value: any) => T;
609
- }
610
- const visit: <T>(value: SpeedShiftConfigUnion, visitor: Visitor<T>) => T;
611
- }
612
- /**
613
- * @public
614
- */
615
- interface SpeedShift {
616
- category: SpeedShiftCategory | undefined;
617
- mode: string | undefined;
618
- config: SpeedShiftConfigUnion | undefined;
619
- }
620
- /**
621
- * @public
622
- */
623
- interface VideoClipPart {
624
- id: string | undefined;
625
- duration_ms: number | undefined;
626
- /**
627
- * Types of parts that can be contained in tracks
628
- * @public
629
- */
630
- kind: PartKind | undefined;
631
- play_in: number | undefined;
632
- play_out: number | undefined;
633
- volume: number | undefined;
634
- origin_media_id: string | undefined;
635
- speed_shift?: SpeedShift | undefined;
636
- }
637
- /**
638
- * @public
639
- */
640
- type PartUnion = PartUnion.BgmMember | PartUnion.CaptionMember | PartUnion.SpeechMember | PartUnion.Video_clipMember | PartUnion.$UnknownMember;
641
- /**
642
- * @public
643
- */
644
- declare namespace PartUnion {
645
- interface Video_clipMember {
646
- video_clip: VideoClipPart;
647
- bgm?: never;
648
- speech?: never;
649
- caption?: never;
650
- $unknown?: never;
651
- }
652
- interface BgmMember {
653
- video_clip?: never;
654
- bgm: BgmPart$1;
655
- speech?: never;
656
- caption?: never;
657
- $unknown?: never;
658
- }
659
- interface SpeechMember {
660
- video_clip?: never;
661
- bgm?: never;
662
- speech: SpeechPart$1;
663
- caption?: never;
664
- $unknown?: never;
665
- }
666
- interface CaptionMember {
667
- video_clip?: never;
668
- bgm?: never;
669
- speech?: never;
670
- caption: CaptionPart$1;
671
- $unknown?: never;
672
- }
673
- /**
674
- * @public
675
- */
676
- interface $UnknownMember {
677
- video_clip?: never;
678
- bgm?: never;
679
- speech?: never;
680
- caption?: never;
681
- $unknown: [string, any];
682
- }
683
- interface Visitor<T> {
684
- video_clip: (value: VideoClipPart) => T;
685
- bgm: (value: BgmPart$1) => T;
686
- speech: (value: SpeechPart$1) => T;
687
- caption: (value: CaptionPart$1) => T;
688
- _: (name: string, value: any) => T;
689
- }
690
- const visit: <T>(value: PartUnion, visitor: Visitor<T>) => T;
691
- }
692
- /**
693
- * Timeline configuration for video editing
694
- * @public
695
- */
696
- interface Timeline {
697
- duration_ms: number | undefined;
698
- unit_time_ms: number | undefined;
699
- }
700
- /**
701
- * Complete video draft information with timeline and tracks
702
- * @public
703
- */
704
- interface VideoDraft$1 {
705
- id?: string | undefined;
706
- project_id: string | undefined;
707
- owner_id: string | undefined;
708
- /**
709
- * for-code-gen: property value may be empty string ("")
710
- * @public
711
- */
712
- thumbnail_storage_key: string | undefined;
713
- /**
714
- * Timeline configuration for video editing
715
- * @public
716
- */
717
- timeline?: Timeline | undefined;
718
- video_creation_settings?: VideoCreationSettings$1 | undefined;
719
- chat_session_id: string | undefined;
720
- main_track?: Track | undefined;
721
- above_main_tracks: Track[] | undefined;
722
- below_main_tracks: Track[] | undefined;
723
- part_aggregations: PartAggregation[] | undefined;
724
- part_library: Record<string, PartUnion> | undefined;
725
- version: number | undefined;
726
- }
727
- //#endregion
728
- //#region src/dsl/projection/video-draft-types.d.ts
729
- type VideoDraftTrack = Track;
730
- type VideoDraftTrackItem = TrackItem;
731
- type VideoDraftTimeline = Timeline;
732
- type VideoDraftCaptionStyle = CaptionStyle;
733
- interface CaptionDisplayCue {
734
- segmentId: string;
735
- text: string;
736
- startMs: number;
737
- durationMs: number;
738
- }
739
- type VideoCreationSettings = Omit<VideoCreationSettings$1, 'video_style_id' | 'duration_ms'> & {
740
- video_style_id?: string | null;
741
- duration_ms?: number | null;
742
- };
743
- type VideoPart = Omit<VideoClipPart, 'duration_ms'>;
744
- type SpeechPart = Omit<SpeechPart$1, 'duration_ms'> & {
745
- media_duration_ms?: number;
746
- };
747
- type CaptionPart = Omit<CaptionPart$1, 'duration_ms'> & {
748
- initial_duration_ms?: number;
749
- display_cues?: CaptionDisplayCue[];
750
- };
751
- type BgmPart = Omit<BgmPart$1, 'duration_ms'>;
752
- /** Legacy inputs may omit derived durations; output always states the field. */
753
- type VideoDraftPartUnion = {
754
- video_clip: VideoPart & {
755
- duration_ms?: number;
756
- };
757
- speech?: never;
758
- caption?: never;
759
- bgm?: never;
760
- } | {
761
- video_clip?: never;
762
- speech: SpeechPart & {
763
- duration_ms?: number;
764
- };
765
- caption?: never;
766
- bgm?: never;
767
- } | {
768
- video_clip?: never;
769
- speech?: never;
770
- caption: CaptionPart & {
771
- duration_ms?: number;
772
- };
773
- bgm?: never;
774
- } | {
775
- video_clip?: never;
776
- speech?: never;
777
- caption?: never;
778
- bgm: BgmPart & {
779
- duration_ms?: number;
780
- };
781
- };
782
- type VideoDraftContentPartUnion = {
783
- video_clip: VideoPart & {
784
- duration_ms: number | undefined;
785
- };
786
- speech?: never;
787
- caption?: never;
788
- bgm?: never;
789
- } | {
790
- video_clip?: never;
791
- speech: SpeechPart & {
792
- duration_ms: number | undefined;
793
- };
794
- caption?: never;
795
- bgm?: never;
796
- } | {
797
- video_clip?: never;
798
- speech?: never;
799
- caption: CaptionPart & {
800
- duration_ms: number | undefined;
801
- };
802
- bgm?: never;
803
- } | {
804
- video_clip?: never;
805
- speech?: never;
806
- caption?: never;
807
- bgm: BgmPart & {
808
- duration_ms: number | undefined;
809
- };
810
- };
811
- type VideoDraft = Omit<VideoDraft$1, 'part_library' | 'video_creation_settings'> & {
812
- part_library: Record<string, VideoDraftPartUnion> | undefined;
813
- video_creation_settings?: VideoCreationSettings;
814
- };
815
- type VideoDraftContent = Pick<VideoDraft, 'timeline' | 'main_track' | 'above_main_tracks' | 'below_main_tracks' | 'part_aggregations'> & {
816
- part_library: Record<string, VideoDraftContentPartUnion> | undefined;
817
- };
818
- type VideoDraftInput = Pick<VideoDraft, keyof VideoDraftContent>;
819
- declare const DEFAULT_UNIT_TIME_MS = 33.333;
820
- //#endregion
821
- export { Track$1 as $, DeepReadonly as A, RelationMutation as B, CaptionContent as C, Clip as D, CaptionText as E, EntityTables as F, RichTextSnapshot as G, RelationTables as H, EntityValues as I, TextEdit as J, StoredFile as K, FieldPatch as L, DslMutation as M, EntityMutation as N, ContainMutation as O, EntityTable as P, TimeAnchor as Q, MedeoDslSnapshot as R, Caption as S, CaptionStyle$1 as T, RelationValues as U, RelationTable as V, ResourceSystem as W, TextMutation as X, TextMark as Y, TextRun as Z, defaultIdFactory as _, VideoDraftCaptionStyle as a, tupleHash as b, VideoDraftInput as c, VideoDraftTrack as d, TrackRole as et, VideoDraftTrackItem as f, EntityIdKind as g, DslIdFactory as h, VideoDraft as i, DslDiagnostic as j, ContainNode as k, VideoDraftPartUnion as l, OpActor as m, DEFAULT_UNIT_TIME_MS as n, VideoDraftContent as o, CommitOptions as p, TextDelta as q, VideoCreationSettings as r, VideoDraftContentPartUnion as s, CaptionDisplayCue as t, Voice as tt, VideoDraftTimeline as u, relationId as v, CaptionSelection as w, AudioScript as x, resourceId as y, Media as z };