@mengine/medeo-client 2.1.1-dsl.24 → 2.1.1-dsl.26

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