@mengine/medeo-client 2.1.1-dsl.2 → 2.1.1-dsl.4
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 +3 -3
- package/dist/{dsl-EV6kCdr6.js → dsl-BCcld0Ca.js} +312 -354
- package/dist/dsl.d.ts +3 -3
- package/dist/dsl.js +2 -2
- package/dist/{index-D-3rdfUP.d.ts → index-CwG4lYKp.d.ts} +1 -1
- package/dist/{index-Cu7SdKN5.d.ts → index-DP9FG0z_.d.ts} +41 -137
- package/dist/{index-D-6uebu4.d.ts → index-W1eHhVus.d.ts} +22 -53
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/dist/legacy.d.ts +2 -2
- package/dist/legacy.js +1 -1
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +2 -2
- package/dist/{video-draft-types-c_shaRyq.d.ts → video-draft-types-BfkIuW5f.d.ts} +40 -44
- package/dist/{video-draft-types-TXRv3wS6.js → video-draft-types-DvPeam87.js} +105 -98
- package/package.json +4 -4
package/dist/dsl.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { A as AddDslClip, C as
|
|
3
|
-
export { type AddDslClip, type AddDslClipsInput, type ApplyVoiceoverInput, type
|
|
1
|
+
import { $ as TrackRole, A as DeepReadonly, B as RelationMutation, C as CaptionContent, D as Clip, E as CaptionText, F as EntityTables, G as RichTextSnapshot, H as RelationTables, I as EntityValues, J as TextMark, K as TextDelta, L as FieldPatch, M as DslMutation, N as EntityMutation, O as ContainMutation, P as EntityTable, Q as Track, R as MedeoDslSnapshot, S as Caption, T as CaptionStyle, U as RelationValues, V as RelationTable, W as ResourceSystem, X as TextRun, Y as TextMutation, Z as TimeAnchor, _ as defaultIdFactory, a as VideoDraftCaptionStyle, b as tupleHash, c as VideoDraftInput, d as VideoDraftTrack, et as Voice, f as VideoDraftTrackItem, g as EntityIdKind, h as DslIdFactory, i as VideoDraft, j as DslDiagnostic, k as ContainNode, l as VideoDraftPartUnion, m as OpActor, n as DEFAULT_UNIT_TIME_MS, o as VideoDraftContent, p as CommitOptions, q as TextEdit, r as VideoCreationSettings, s as VideoDraftContentPartUnion, t as CaptionDisplayCue, u as VideoDraftTimeline, v as relationId, w as CaptionSelection, x as AudioScript, y as resourceId, z as Media } from "./video-draft-types-BfkIuW5f.js";
|
|
2
|
+
import { A as AddDslClip, C as InvalidAtomic, D as MedeoDslDraft, E as timeAnchorCodec, F as ReplaceDslClipsInput, I as ClipPlacement, M as ClipSource, N as DslClipUpdate, O as MedeoDslLoroState, P as MoveDslClipsInput, S as documentFormat, T as isInvalidAtomic, _ as MedeoDsl, a as toVideoDraft, b as UnsupportedDocumentFormatError, c as DslLayout, d as createInitialMedeoDsl, f as DslEditor, g as CreateMedeoDslOptions, h as VoiceoverResult, i as VideoDraftProjection, j as AddDslClipsInput, k as medeoDslLoroShape, l as DslProjectionError, m as VoiceoverCaptionInput, n as ImportedVideoDraft, o as resolveDslLayout, p as ApplyVoiceoverInput, r as fromVideoDraft, s as DslClipLayout, t as FromVideoDraftOptions, u as DslTrackLayout, v as DslAudit, w as captionContentCodec, x as assertDslDocument, y as DslTransaction } from "./index-DP9FG0z_.js";
|
|
3
|
+
export { type AddDslClip, type AddDslClipsInput, type ApplyVoiceoverInput, type AudioScript, type Caption, type CaptionContent, type CaptionDisplayCue, type CaptionSelection, type CaptionStyle, type CaptionText, type Clip, type ClipPlacement, type ClipSource, type CommitOptions, type ContainMutation, type ContainNode, type CreateMedeoDslOptions, DEFAULT_UNIT_TIME_MS, type DeepReadonly, type DslAudit, type DslClipLayout, type DslClipUpdate, type DslDiagnostic, DslEditor, type DslIdFactory, type DslLayout, type DslMutation, DslProjectionError, type DslTrackLayout, type DslTransaction, type EntityIdKind, type EntityMutation, type EntityTable, type EntityTables, type EntityValues, type FieldPatch, type FromVideoDraftOptions, type ImportedVideoDraft, type InvalidAtomic, MedeoDsl, type MedeoDslDraft, type MedeoDslLoroState, type MedeoDslSnapshot, type Media, type MoveDslClipsInput, type OpActor, type RelationMutation, type RelationTable, type RelationTables, type RelationValues, type ReplaceDslClipsInput, type ResourceSystem, type RichTextSnapshot, type TextDelta, type TextEdit, type TextMark, type TextMutation, type TextRun, type TimeAnchor, type Track, type TrackRole, UnsupportedDocumentFormatError, type VideoCreationSettings, type VideoDraft, type VideoDraftCaptionStyle, type VideoDraftContent, type VideoDraftContentPartUnion, type VideoDraftInput, type VideoDraftPartUnion, type VideoDraftProjection, type VideoDraftTimeline, type VideoDraftTrack, type VideoDraftTrackItem, type Voice, type VoiceoverCaptionInput, type VoiceoverResult, assertDslDocument, captionContentCodec, createInitialMedeoDsl, defaultIdFactory, documentFormat, fromVideoDraft, isInvalidAtomic, medeoDslLoroShape, relationId, resolveDslLayout, resourceId, timeAnchorCodec, toVideoDraft, tupleHash };
|
package/dist/dsl.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as documentFormat, c as isInvalidAtomic,
|
|
2
|
-
import { a as MedeoDsl, i as DslEditor, n as toVideoDraft, o as resolveDslLayout, r as createInitialMedeoDsl, s as DslProjectionError, t as fromVideoDraft } from "./dsl-
|
|
1
|
+
import { a as documentFormat, c as isInvalidAtomic, ft as defaultIdFactory, ht as tupleHash, i as assertDslDocument, l as timeAnchorCodec, mt as resourceId, o as medeoDslLoroShape, pt as relationId, r as UnsupportedDocumentFormatError, s as captionContentCodec, t as DEFAULT_UNIT_TIME_MS } from "./video-draft-types-DvPeam87.js";
|
|
2
|
+
import { a as MedeoDsl, i as DslEditor, n as toVideoDraft, o as resolveDslLayout, r as createInitialMedeoDsl, s as DslProjectionError, t as fromVideoDraft } from "./dsl-BCcld0Ca.js";
|
|
3
3
|
export { DEFAULT_UNIT_TIME_MS, DslEditor, DslProjectionError, MedeoDsl, UnsupportedDocumentFormatError, assertDslDocument, captionContentCodec, createInitialMedeoDsl, defaultIdFactory, documentFormat, fromVideoDraft, isInvalidAtomic, medeoDslLoroShape, relationId, resolveDslLayout, resourceId, timeAnchorCodec, toVideoDraft, tupleHash };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { j as DslDiagnostic, o as VideoDraftContent, p as CommitOptions } from "./video-draft-types-BfkIuW5f.js";
|
|
2
2
|
import { LoroDoc, PeerID, VersionVector } from "loro-crdt";
|
|
3
3
|
import { DocState, LocalSaveState } from "@mengine/sync";
|
|
4
4
|
import { BaseDocStorage, Connection, DocDiff, DocPushReceipt, DocSnapshotRecord, DocStorage, DocStorageOptions, DocUpdate, DocUpdateRecord } from "@mengine/storage";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as TrackRole, C as CaptionContent, L as FieldPatch, M as DslMutation, R as MedeoDslSnapshot, T as CaptionStyle, Z as TimeAnchor, c as VideoDraftInput, et as Voice, h as DslIdFactory, j as DslDiagnostic, o as VideoDraftContent, p as CommitOptions, q as TextEdit, w as CaptionSelection, z as Media } from "./video-draft-types-BfkIuW5f.js";
|
|
2
2
|
import { ContainerType, Cursor, LoroDoc, PeerID, TreeID } from "loro-crdt";
|
|
3
3
|
|
|
4
4
|
//#region src/dsl/action-context.d.ts
|
|
@@ -394,22 +394,12 @@ type InferBooleanType<S extends SchemaType> = S extends {
|
|
|
394
394
|
transform: TransformDefinition<infer _C, infer D>;
|
|
395
395
|
} ? WithOptionality<D, S> : WithOptionality<boolean, S>;
|
|
396
396
|
//#endregion
|
|
397
|
-
//#region ../medeo-dsl/src/schema/codec.d.ts
|
|
398
|
-
interface InvalidAtomic {
|
|
399
|
-
invalid: true;
|
|
400
|
-
raw: string;
|
|
401
|
-
reason: string;
|
|
402
|
-
}
|
|
403
|
-
declare function isInvalidAtomic(value: unknown): value is InvalidAtomic;
|
|
404
|
-
interface AtomicCodec<T> {
|
|
405
|
-
encode(value: T | InvalidAtomic): string;
|
|
406
|
-
decode(raw: string): T | InvalidAtomic;
|
|
407
|
-
}
|
|
408
|
-
declare const timeAnchorCodec: AtomicCodec<TimeAnchor>;
|
|
409
|
-
declare const captionContentCodec: AtomicCodec<CaptionContent>;
|
|
410
|
-
//#endregion
|
|
411
397
|
//#region ../medeo-dsl/src/schema/loro-shape.d.ts
|
|
412
|
-
/**
|
|
398
|
+
/**
|
|
399
|
+
* Only direct children inherit mergeable identity. Body and ordinary entity rows keep normal
|
|
400
|
+
* identities, so deleting a row also drops what a peer wrote into it concurrently: a relation an
|
|
401
|
+
* entity holds at most one of is a field of that row and never outlives it.
|
|
402
|
+
*/
|
|
413
403
|
declare const medeoDslLoroShape: RootSchemaType<{
|
|
414
404
|
'timeline-entities': LoroMapSchemaWithCatchall<{}, LoroMapSchema<{}> & {
|
|
415
405
|
options: {};
|
|
@@ -434,12 +424,16 @@ declare const medeoDslLoroShape: RootSchemaType<{
|
|
|
434
424
|
'clip-entities': LoroMapSchemaWithCatchall<{}, LoroMapSchema<{
|
|
435
425
|
seqMarker: /*elided*/any;
|
|
436
426
|
volume: /*elided*/any;
|
|
427
|
+
source: /*elided*/any;
|
|
428
|
+
anchor: /*elided*/any;
|
|
437
429
|
}> & {
|
|
438
430
|
options: {};
|
|
439
431
|
} & {
|
|
440
432
|
catchall: <C extends SchemaType>(catchallSchema: C) => LoroMapSchemaWithCatchall<{
|
|
441
433
|
seqMarker: /*elided*/any;
|
|
442
434
|
volume: /*elided*/any;
|
|
435
|
+
source: /*elided*/any;
|
|
436
|
+
anchor: /*elided*/any;
|
|
443
437
|
}, C>;
|
|
444
438
|
}> & {
|
|
445
439
|
options: {};
|
|
@@ -480,7 +474,19 @@ declare const medeoDslLoroShape: RootSchemaType<{
|
|
|
480
474
|
}> & {
|
|
481
475
|
options: {};
|
|
482
476
|
};
|
|
477
|
+
'phonetic-script-entities': LoroMapSchemaWithCatchall<{}, LoroMapSchema<{
|
|
478
|
+
phoneme: /*elided*/any;
|
|
479
|
+
}> & {
|
|
480
|
+
options: {};
|
|
481
|
+
} & {
|
|
482
|
+
catchall: <C extends SchemaType>(catchallSchema: C) => LoroMapSchemaWithCatchall<{
|
|
483
|
+
phoneme: /*elided*/any;
|
|
484
|
+
}, C>;
|
|
485
|
+
}> & {
|
|
486
|
+
options: {};
|
|
487
|
+
};
|
|
483
488
|
'caption-entities': LoroMapSchemaWithCatchall<{}, LoroMapSchema<{
|
|
489
|
+
selection: /*elided*/any;
|
|
484
490
|
text: /*elided*/any;
|
|
485
491
|
style: /*elided*/any;
|
|
486
492
|
}> & {
|
|
@@ -489,6 +495,7 @@ declare const medeoDslLoroShape: RootSchemaType<{
|
|
|
489
495
|
};
|
|
490
496
|
} & {
|
|
491
497
|
catchall: <C extends SchemaType>(catchallSchema: C) => LoroMapSchemaWithCatchall<{
|
|
498
|
+
selection: /*elided*/any;
|
|
492
499
|
text: /*elided*/any;
|
|
493
500
|
style: /*elided*/any;
|
|
494
501
|
}, C>;
|
|
@@ -512,82 +519,9 @@ declare const medeoDslLoroShape: RootSchemaType<{
|
|
|
512
519
|
readonly mergeableMapChildContainers: true;
|
|
513
520
|
};
|
|
514
521
|
};
|
|
515
|
-
'asset-entities': LoroMapSchemaWithCatchall<{}, LoroMapSchema<{
|
|
516
|
-
system: /*elided*/any;
|
|
517
|
-
key: /*elided*/any;
|
|
518
|
-
storageKey: /*elided*/any;
|
|
519
|
-
digest: /*elided*/any;
|
|
520
|
-
}> & {
|
|
521
|
-
options: {};
|
|
522
|
-
} & {
|
|
523
|
-
catchall: <C extends SchemaType>(catchallSchema: C) => LoroMapSchemaWithCatchall<{
|
|
524
|
-
system: /*elided*/any;
|
|
525
|
-
key: /*elided*/any;
|
|
526
|
-
storageKey: /*elided*/any;
|
|
527
|
-
digest: /*elided*/any;
|
|
528
|
-
}, C>;
|
|
529
|
-
}> & {
|
|
530
|
-
options: {
|
|
531
|
-
readonly mergeableMapChildContainers: true;
|
|
532
|
-
};
|
|
533
|
-
};
|
|
534
522
|
'contain-relations': LoroTreeSchema<{
|
|
535
523
|
entityId: /*elided*/any;
|
|
536
524
|
}>;
|
|
537
|
-
'clip-source-relations': LoroMapSchemaWithCatchall<{}, LoroMapSchema<Record<string, StringSchemaType<string> & {
|
|
538
|
-
options: {};
|
|
539
|
-
} & {
|
|
540
|
-
transform: <D>(def: TransformDefinition<string, D>) => StringSchemaType<string> & {
|
|
541
|
-
options: {};
|
|
542
|
-
transform: TransformDefinition<string, D>;
|
|
543
|
-
};
|
|
544
|
-
}>> & {
|
|
545
|
-
options: {};
|
|
546
|
-
} & {
|
|
547
|
-
catchall: <C extends SchemaType>(catchallSchema: C) => LoroMapSchemaWithCatchall<Record<string, StringSchemaType<string> & {
|
|
548
|
-
options: {};
|
|
549
|
-
} & {
|
|
550
|
-
transform: <D>(def: TransformDefinition<string, D>) => StringSchemaType<string> & {
|
|
551
|
-
options: {};
|
|
552
|
-
transform: TransformDefinition<string, D>;
|
|
553
|
-
};
|
|
554
|
-
}>, C>;
|
|
555
|
-
}> & {
|
|
556
|
-
options: {
|
|
557
|
-
readonly mergeableMapChildContainers: true;
|
|
558
|
-
};
|
|
559
|
-
};
|
|
560
|
-
'time-anchor-relations': LoroMapSchemaWithCatchall<{}, StringSchemaType<string> & {
|
|
561
|
-
options: {};
|
|
562
|
-
transform: TransformDefinition<string, TimeAnchor | InvalidAtomic>;
|
|
563
|
-
}> & {
|
|
564
|
-
options: {};
|
|
565
|
-
};
|
|
566
|
-
'caption-content-relations': LoroMapSchemaWithCatchall<{}, StringSchemaType<string> & {
|
|
567
|
-
options: {};
|
|
568
|
-
transform: TransformDefinition<string, CaptionContent | InvalidAtomic>;
|
|
569
|
-
}> & {
|
|
570
|
-
options: {};
|
|
571
|
-
};
|
|
572
|
-
'caption-alignment-relations': LoroMapSchemaWithCatchall<{}, LoroMapSchema<{
|
|
573
|
-
captionId: /*elided*/any;
|
|
574
|
-
mediaId: /*elided*/any;
|
|
575
|
-
startMs: /*elided*/any;
|
|
576
|
-
endMs: /*elided*/any;
|
|
577
|
-
}> & {
|
|
578
|
-
options: {};
|
|
579
|
-
} & {
|
|
580
|
-
catchall: <C extends SchemaType>(catchallSchema: C) => LoroMapSchemaWithCatchall<{
|
|
581
|
-
captionId: /*elided*/any;
|
|
582
|
-
mediaId: /*elided*/any;
|
|
583
|
-
startMs: /*elided*/any;
|
|
584
|
-
endMs: /*elided*/any;
|
|
585
|
-
}, C>;
|
|
586
|
-
}> & {
|
|
587
|
-
options: {
|
|
588
|
-
readonly mergeableMapChildContainers: true;
|
|
589
|
-
};
|
|
590
|
-
};
|
|
591
525
|
'voice-timbre-relations': LoroMapSchemaWithCatchall<{}, LoroMapSchema<Record<string, StringSchemaType<string> & {
|
|
592
526
|
options: {};
|
|
593
527
|
} & {
|
|
@@ -634,52 +568,6 @@ declare const medeoDslLoroShape: RootSchemaType<{
|
|
|
634
568
|
readonly mergeableMapChildContainers: true;
|
|
635
569
|
};
|
|
636
570
|
};
|
|
637
|
-
'from-asset-relations': LoroMapSchemaWithCatchall<{}, LoroMapSchema<Record<string, StringSchemaType<string> & {
|
|
638
|
-
options: {};
|
|
639
|
-
} & {
|
|
640
|
-
transform: <D>(def: TransformDefinition<string, D>) => StringSchemaType<string> & {
|
|
641
|
-
options: {};
|
|
642
|
-
transform: TransformDefinition<string, D>;
|
|
643
|
-
};
|
|
644
|
-
}>> & {
|
|
645
|
-
options: {};
|
|
646
|
-
} & {
|
|
647
|
-
catchall: <C extends SchemaType>(catchallSchema: C) => LoroMapSchemaWithCatchall<Record<string, StringSchemaType<string> & {
|
|
648
|
-
options: {};
|
|
649
|
-
} & {
|
|
650
|
-
transform: <D>(def: TransformDefinition<string, D>) => StringSchemaType<string> & {
|
|
651
|
-
options: {};
|
|
652
|
-
transform: TransformDefinition<string, D>;
|
|
653
|
-
};
|
|
654
|
-
}>, C>;
|
|
655
|
-
}> & {
|
|
656
|
-
options: {
|
|
657
|
-
readonly mergeableMapChildContainers: true;
|
|
658
|
-
};
|
|
659
|
-
};
|
|
660
|
-
'to-asset-relations': LoroMapSchemaWithCatchall<{}, LoroMapSchema<Record<string, StringSchemaType<string> & {
|
|
661
|
-
options: {};
|
|
662
|
-
} & {
|
|
663
|
-
transform: <D>(def: TransformDefinition<string, D>) => StringSchemaType<string> & {
|
|
664
|
-
options: {};
|
|
665
|
-
transform: TransformDefinition<string, D>;
|
|
666
|
-
};
|
|
667
|
-
}>> & {
|
|
668
|
-
options: {};
|
|
669
|
-
} & {
|
|
670
|
-
catchall: <C extends SchemaType>(catchallSchema: C) => LoroMapSchemaWithCatchall<Record<string, StringSchemaType<string> & {
|
|
671
|
-
options: {};
|
|
672
|
-
} & {
|
|
673
|
-
transform: <D>(def: TransformDefinition<string, D>) => StringSchemaType<string> & {
|
|
674
|
-
options: {};
|
|
675
|
-
transform: TransformDefinition<string, D>;
|
|
676
|
-
};
|
|
677
|
-
}>, C>;
|
|
678
|
-
}> & {
|
|
679
|
-
options: {
|
|
680
|
-
readonly mergeableMapChildContainers: true;
|
|
681
|
-
};
|
|
682
|
-
};
|
|
683
571
|
}> & {
|
|
684
572
|
options: {};
|
|
685
573
|
};
|
|
@@ -695,6 +583,22 @@ type MedeoDslDraft = DraftFields<Omit<Input, 'contain-relations'>> & {
|
|
|
695
583
|
'contain-relations': ContainDraftNode[];
|
|
696
584
|
};
|
|
697
585
|
//#endregion
|
|
586
|
+
//#region ../medeo-dsl/src/schema/codec.d.ts
|
|
587
|
+
interface InvalidAtomic {
|
|
588
|
+
invalid: true;
|
|
589
|
+
raw: string;
|
|
590
|
+
reason: string;
|
|
591
|
+
}
|
|
592
|
+
declare function isInvalidAtomic(value: unknown): value is InvalidAtomic;
|
|
593
|
+
interface AtomicCodec<T> {
|
|
594
|
+
encode(value: T | InvalidAtomic): string;
|
|
595
|
+
decode(raw: string): T | InvalidAtomic;
|
|
596
|
+
}
|
|
597
|
+
/** A Clip's time anchor; the Clip holding it is the anchored end. */
|
|
598
|
+
declare const timeAnchorCodec: AtomicCodec<TimeAnchor>;
|
|
599
|
+
/** A Caption's selection; Cursors are stored as their native bytes in unpadded base64url. */
|
|
600
|
+
declare const captionContentCodec: AtomicCodec<CaptionContent>;
|
|
601
|
+
//#endregion
|
|
698
602
|
//#region ../medeo-dsl/src/schema/document-format.d.ts
|
|
699
603
|
/** Format discrimination does not register containers or alter the document. */
|
|
700
604
|
declare function documentFormat(doc: LoroDoc): 'dsl' | 'legacy' | 'mixed' | 'unknown';
|
|
@@ -765,7 +669,7 @@ declare class MedeoDsl {
|
|
|
765
669
|
editText(scriptId: string, expectedBodyId: string, edits: readonly TextEdit[], audit: DslAudit): void;
|
|
766
670
|
editCaptionText(captionId: string, expectedBodyId: string, edits: readonly TextEdit[], audit: DslAudit): void;
|
|
767
671
|
/** Local ranges exclude insertions at their start and include insertions at their end. K01 remains deferred. */
|
|
768
|
-
textRange(scriptId: string, start: number, end: number):
|
|
672
|
+
textRange(scriptId: string, start: number, end: number): CaptionContent;
|
|
769
673
|
dispose(): void;
|
|
770
674
|
private mutate;
|
|
771
675
|
private notify;
|
|
@@ -937,4 +841,4 @@ interface ImportedVideoDraft {
|
|
|
937
841
|
/** One-time import into a newly owned document; never reverse-diff a live collaborative document. */
|
|
938
842
|
declare function fromVideoDraft(input: VideoDraftInput, options: FromVideoDraftOptions): ImportedVideoDraft;
|
|
939
843
|
//#endregion
|
|
940
|
-
export { AddDslClip as A,
|
|
844
|
+
export { AddDslClip as A, InvalidAtomic as C, MedeoDslDraft as D, timeAnchorCodec as E, ReplaceDslClipsInput as F, ClipPlacement as I, ClipSource as M, DslClipUpdate as N, MedeoDslLoroState as O, MoveDslClipsInput as P, documentFormat as S, isInvalidAtomic as T, MedeoDsl as _, toVideoDraft as a, UnsupportedDocumentFormatError as b, DslLayout as c, createInitialMedeoDsl as d, DslEditor as f, CreateMedeoDslOptions as g, VoiceoverResult as h, VideoDraftProjection as i, AddDslClipsInput as j, medeoDslLoroShape as k, DslProjectionError as l, VoiceoverCaptionInput as m, ImportedVideoDraft as n, resolveDslLayout as o, ApplyVoiceoverInput as p, fromVideoDraft as r, DslClipLayout as s, FromVideoDraftOptions as t, DslTrackLayout as u, DslAudit as v, captionContentCodec as w, assertDslDocument as x, DslTransaction as y };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as MedeoDsl, f as DslEditor, i as VideoDraftProjection } from "./index-
|
|
3
|
-
import { _ as ManualSyncTransport, a as MengineDocSessionOptions, g as ManualSyncDocOptions, n as DocumentSession, r as DocumentSessionUpdateEvent } from "./index-
|
|
1
|
+
import { $ as TrackRole, R as MedeoDslSnapshot, W as ResourceSystem } from "./video-draft-types-BfkIuW5f.js";
|
|
2
|
+
import { _ as MedeoDsl, f as DslEditor, i as VideoDraftProjection } from "./index-DP9FG0z_.js";
|
|
3
|
+
import { _ as ManualSyncTransport, a as MengineDocSessionOptions, g as ManualSyncDocOptions, n as DocumentSession, r as DocumentSessionUpdateEvent } from "./index-CwG4lYKp.js";
|
|
4
4
|
|
|
5
5
|
//#region src/manual-sync/manual-sync-doc.d.ts
|
|
6
6
|
/** Explicit synchronization over the same DSL/editor used by the live Session. */
|
|
@@ -30,6 +30,12 @@ declare class ManualSyncDoc extends ManualSyncTransport {
|
|
|
30
30
|
readonly fillTimeline?: true | undefined;
|
|
31
31
|
};
|
|
32
32
|
readonly volume?: number | undefined;
|
|
33
|
+
readonly source: string;
|
|
34
|
+
readonly anchor?: {
|
|
35
|
+
readonly to: string;
|
|
36
|
+
readonly offsetMs: number;
|
|
37
|
+
readonly fallback_abs_ms: number;
|
|
38
|
+
} | undefined;
|
|
33
39
|
};
|
|
34
40
|
};
|
|
35
41
|
readonly "media-entities": {
|
|
@@ -61,8 +67,21 @@ declare class ManualSyncDoc extends ManualSyncTransport {
|
|
|
61
67
|
readonly defaultLanguage?: string | undefined;
|
|
62
68
|
};
|
|
63
69
|
};
|
|
70
|
+
readonly "phonetic-script-entities": {
|
|
71
|
+
readonly [x: string]: {
|
|
72
|
+
readonly phoneme: {
|
|
73
|
+
readonly audioScriptId: string;
|
|
74
|
+
readonly phonemeScript?: string | undefined;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
};
|
|
64
78
|
readonly "caption-entities": {
|
|
65
79
|
readonly [x: string]: {
|
|
80
|
+
readonly selection?: {
|
|
81
|
+
readonly audioScriptId: string;
|
|
82
|
+
readonly start: import("loro-crdt").Cursor;
|
|
83
|
+
readonly end: import("loro-crdt").Cursor;
|
|
84
|
+
} | undefined;
|
|
66
85
|
readonly text?: string | undefined;
|
|
67
86
|
readonly style?: {
|
|
68
87
|
readonly font?: {
|
|
@@ -88,44 +107,6 @@ declare class ManualSyncDoc extends ManualSyncTransport {
|
|
|
88
107
|
readonly name?: string | undefined;
|
|
89
108
|
};
|
|
90
109
|
};
|
|
91
|
-
readonly "asset-entities": {
|
|
92
|
-
readonly [x: string]: {
|
|
93
|
-
readonly system: ResourceSystem;
|
|
94
|
-
readonly key: string;
|
|
95
|
-
readonly storageKey?: string | undefined;
|
|
96
|
-
readonly digest?: string | undefined;
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
readonly "clip-source-relations": {
|
|
100
|
-
readonly [x: string]: {
|
|
101
|
-
readonly clipId: string;
|
|
102
|
-
readonly sourceId: string;
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
readonly "time-anchor-relations": {
|
|
106
|
-
readonly [x: string]: {
|
|
107
|
-
readonly from: string;
|
|
108
|
-
readonly to: string;
|
|
109
|
-
readonly offsetMs: number;
|
|
110
|
-
readonly fallback_abs_ms: number;
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
readonly "caption-content-relations": {
|
|
114
|
-
readonly [x: string]: {
|
|
115
|
-
readonly captionId: string;
|
|
116
|
-
readonly audioScriptId: string;
|
|
117
|
-
readonly start: import("loro-crdt").Cursor;
|
|
118
|
-
readonly end: import("loro-crdt").Cursor;
|
|
119
|
-
};
|
|
120
|
-
};
|
|
121
|
-
readonly "caption-alignment-relations": {
|
|
122
|
-
readonly [x: string]: {
|
|
123
|
-
readonly captionId: string;
|
|
124
|
-
readonly mediaId: string;
|
|
125
|
-
readonly startMs: number;
|
|
126
|
-
readonly endMs: number;
|
|
127
|
-
};
|
|
128
|
-
};
|
|
129
110
|
readonly "voice-timbre-relations": {
|
|
130
111
|
readonly [x: string]: {
|
|
131
112
|
readonly recordingId: string;
|
|
@@ -138,18 +119,6 @@ declare class ManualSyncDoc extends ManualSyncTransport {
|
|
|
138
119
|
readonly sourceId: string;
|
|
139
120
|
};
|
|
140
121
|
};
|
|
141
|
-
readonly "from-asset-relations": {
|
|
142
|
-
readonly [x: string]: {
|
|
143
|
-
readonly audioScriptId: string;
|
|
144
|
-
readonly assetId: string;
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
readonly "to-asset-relations": {
|
|
148
|
-
readonly [x: string]: {
|
|
149
|
-
readonly audioScriptId: string;
|
|
150
|
-
readonly assetId: string;
|
|
151
|
-
};
|
|
152
|
-
};
|
|
153
122
|
readonly 'contain-relations': readonly {
|
|
154
123
|
readonly treeId: import("loro-crdt").TreeID;
|
|
155
124
|
readonly entityId: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { A as AddDslClip, C as
|
|
3
|
-
import { A as MenginePushRejectedError, B as MengineSyncResponse, C as PushResult, D as MengineHttpClient, E as readMengineEventStream, F as MenginePushResponse, H as base64ToBytes, I as MenginePushUpdateResponse, L as MengineRejectedResponse, M as MengineAuditResponse, N as MengineDocumentVersion, O as MengineHttpClientOptions, P as MengineDraftResponse, R as MengineSnapshotResponse, S as PullResult, T as MengineEventStreamOptions, U as bytesToBase64, V as MengineUpdateMeta, a as MengineDocSessionOptions, b as DocVersionMark, c as WaitForLocalSaveOptions, d as MengineUndoState, f as MedeoHttpDocStorage, g as ManualSyncDocOptions, h as PushOutcomeKind, i as MengineAckFailedError, j as MengineAuditEntry, k as MengineHttpRequestError, l as WaitForServerAckOptions, m as PushOutcome, o as MengineDocSyncState, p as MedeoHttpDocStorageOptions, s as MengineLocalSaveState, t as MemoryDocStorage, u as DocStorageLike, v as decodeDocVersionMark, w as PushResultKind, x as PullFailureReason, y as encodeDocVersionMark, z as MengineSseUpdateEvent } from "./index-
|
|
4
|
-
import { n as MengineDocSessionUpdateEvent, r as ManualSyncDoc, t as MengineDocSession } from "./index-
|
|
5
|
-
export { type AddDslClip, type AddDslClipsInput, type ApplyVoiceoverInput, type
|
|
1
|
+
import { $ as TrackRole, A as DeepReadonly, B as RelationMutation, C as CaptionContent, D as Clip, E as CaptionText, F as EntityTables, G as RichTextSnapshot, H as RelationTables, I as EntityValues, J as TextMark, K as TextDelta, L as FieldPatch, M as DslMutation, N as EntityMutation, O as ContainMutation, P as EntityTable, Q as Track, R as MedeoDslSnapshot, S as Caption, T as CaptionStyle, U as RelationValues, V as RelationTable, W as ResourceSystem, X as TextRun, Y as TextMutation, Z as TimeAnchor, _ as defaultIdFactory, a as VideoDraftCaptionStyle, b as tupleHash, c as VideoDraftInput, d as VideoDraftTrack, et as Voice, f as VideoDraftTrackItem, g as EntityIdKind, h as DslIdFactory, i as VideoDraft, j as DslDiagnostic, k as ContainNode, l as VideoDraftPartUnion, m as OpActor, n as DEFAULT_UNIT_TIME_MS, o as VideoDraftContent, p as CommitOptions, q as TextEdit, r as VideoCreationSettings, s as VideoDraftContentPartUnion, t as CaptionDisplayCue, u as VideoDraftTimeline, v as relationId, w as CaptionSelection, x as AudioScript, y as resourceId, z as Media } from "./video-draft-types-BfkIuW5f.js";
|
|
2
|
+
import { A as AddDslClip, C as InvalidAtomic, D as MedeoDslDraft, E as timeAnchorCodec, F as ReplaceDslClipsInput, I as ClipPlacement, M as ClipSource, N as DslClipUpdate, O as MedeoDslLoroState, P as MoveDslClipsInput, S as documentFormat, T as isInvalidAtomic, _ as MedeoDsl, a as toVideoDraft, b as UnsupportedDocumentFormatError, c as DslLayout, d as createInitialMedeoDsl, f as DslEditor, g as CreateMedeoDslOptions, h as VoiceoverResult, i as VideoDraftProjection, j as AddDslClipsInput, k as medeoDslLoroShape, l as DslProjectionError, m as VoiceoverCaptionInput, n as ImportedVideoDraft, o as resolveDslLayout, p as ApplyVoiceoverInput, r as fromVideoDraft, s as DslClipLayout, t as FromVideoDraftOptions, u as DslTrackLayout, v as DslAudit, w as captionContentCodec, x as assertDslDocument, y as DslTransaction } from "./index-DP9FG0z_.js";
|
|
3
|
+
import { A as MenginePushRejectedError, B as MengineSyncResponse, C as PushResult, D as MengineHttpClient, E as readMengineEventStream, F as MenginePushResponse, H as base64ToBytes, I as MenginePushUpdateResponse, L as MengineRejectedResponse, M as MengineAuditResponse, N as MengineDocumentVersion, O as MengineHttpClientOptions, P as MengineDraftResponse, R as MengineSnapshotResponse, S as PullResult, T as MengineEventStreamOptions, U as bytesToBase64, V as MengineUpdateMeta, a as MengineDocSessionOptions, b as DocVersionMark, c as WaitForLocalSaveOptions, d as MengineUndoState, f as MedeoHttpDocStorage, g as ManualSyncDocOptions, h as PushOutcomeKind, i as MengineAckFailedError, j as MengineAuditEntry, k as MengineHttpRequestError, l as WaitForServerAckOptions, m as PushOutcome, o as MengineDocSyncState, p as MedeoHttpDocStorageOptions, s as MengineLocalSaveState, t as MemoryDocStorage, u as DocStorageLike, v as decodeDocVersionMark, w as PushResultKind, x as PullFailureReason, y as encodeDocVersionMark, z as MengineSseUpdateEvent } from "./index-CwG4lYKp.js";
|
|
4
|
+
import { n as MengineDocSessionUpdateEvent, r as ManualSyncDoc, t as MengineDocSession } from "./index-W1eHhVus.js";
|
|
5
|
+
export { type AddDslClip, type AddDslClipsInput, type ApplyVoiceoverInput, type AudioScript, type Caption, type CaptionContent, type CaptionDisplayCue, type CaptionSelection, type CaptionStyle, type CaptionText, type Clip, type ClipPlacement, type ClipSource, type CommitOptions, type ContainMutation, type ContainNode, type CreateMedeoDslOptions, DEFAULT_UNIT_TIME_MS, type DeepReadonly, type DocStorageLike, type DocVersionMark, type DslAudit, type DslClipLayout, type DslClipUpdate, type DslDiagnostic, DslEditor, type DslIdFactory, type DslLayout, type DslMutation, DslProjectionError, type DslTrackLayout, type DslTransaction, type EntityIdKind, type EntityMutation, type EntityTable, type EntityTables, type EntityValues, type FieldPatch, type FromVideoDraftOptions, type ImportedVideoDraft, type InvalidAtomic, ManualSyncDoc, type ManualSyncDocOptions, MedeoDsl, type MedeoDslDraft, type MedeoDslLoroState, type MedeoDslSnapshot, MedeoHttpDocStorage, type MedeoHttpDocStorageOptions, type Media, MemoryDocStorage, MengineAckFailedError, type MengineAuditEntry, type MengineAuditResponse, MengineDocSession, type MengineDocSessionOptions, type MengineDocSessionUpdateEvent, type MengineDocSyncState, type MengineDocumentVersion, type MengineDraftResponse, type MengineEventStreamOptions, MengineHttpClient, type MengineHttpClientOptions, MengineHttpRequestError, type MengineLocalSaveState, MenginePushRejectedError, type MenginePushResponse, type MenginePushUpdateResponse, type MengineRejectedResponse, type MengineSnapshotResponse, type MengineSseUpdateEvent, type MengineSyncResponse, type MengineUndoState, type MengineUpdateMeta, type MoveDslClipsInput, type OpActor, type PullFailureReason, type PullResult, type PushOutcome, type PushOutcomeKind, type PushResult, type PushResultKind, type RelationMutation, type RelationTable, type RelationTables, type RelationValues, type ReplaceDslClipsInput, type ResourceSystem, type RichTextSnapshot, type TextDelta, type TextEdit, type TextMark, type TextMutation, type TextRun, type TimeAnchor, type Track, type TrackRole, UnsupportedDocumentFormatError, type VideoCreationSettings, type VideoDraft, type VideoDraftCaptionStyle, type VideoDraftContent, type VideoDraftContentPartUnion, type VideoDraftInput, type VideoDraftPartUnion, type VideoDraftProjection, type VideoDraftTimeline, type VideoDraftTrack, type VideoDraftTrackItem, type Voice, type VoiceoverCaptionInput, type VoiceoverResult, type WaitForLocalSaveOptions, type WaitForServerAckOptions, assertDslDocument, base64ToBytes, bytesToBase64, captionContentCodec, createInitialMedeoDsl, decodeDocVersionMark, defaultIdFactory, documentFormat, encodeDocVersionMark, fromVideoDraft, isInvalidAtomic, medeoDslLoroShape, readMengineEventStream, relationId, resolveDslLayout, resourceId, timeAnchorCodec, toVideoDraft, tupleHash };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as bytesToBase64, t as base64ToBytes } from "./base64-D-jd-dr5.js";
|
|
2
2
|
import { a as covers, c as readMengineEventStream, d as MenginePushRejectedError, i as openManualDocument, l as MengineHttpClient, n as MedeoHttpDocStorage, o as decodeDocVersionMark, r as ManualSyncTransport, s as encodeDocVersionMark, t as MemoryDocStorage, u as MengineHttpRequestError } from "./storage-BW3tI_ER.js";
|
|
3
|
-
import { a as documentFormat, c as isInvalidAtomic,
|
|
4
|
-
import { a as MedeoDsl, i as DslEditor, n as toVideoDraft, o as resolveDslLayout, r as createInitialMedeoDsl, s as DslProjectionError, t as fromVideoDraft } from "./dsl-
|
|
3
|
+
import { a as documentFormat, c as isInvalidAtomic, ft as defaultIdFactory, ht as tupleHash, i as assertDslDocument, l as timeAnchorCodec, mt as resourceId, o as medeoDslLoroShape, pt as relationId, r as UnsupportedDocumentFormatError, s as captionContentCodec, t as DEFAULT_UNIT_TIME_MS } from "./video-draft-types-DvPeam87.js";
|
|
4
|
+
import { a as MedeoDsl, i as DslEditor, n as toVideoDraft, o as resolveDslLayout, r as createInitialMedeoDsl, s as DslProjectionError, t as fromVideoDraft } from "./dsl-BCcld0Ca.js";
|
|
5
5
|
import { UndoManager, VersionVector, decodeImportBlobMeta } from "loro-crdt";
|
|
6
6
|
import { ClientServerSynchronizer, DocManager } from "@mengine/sync";
|
|
7
7
|
import { DisposableSet, EventBus } from "@mengine/utils";
|
package/dist/legacy.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as VideoDraft, l as VideoDraftPartUnion, o as VideoDraftContent, p as CommitOptions, t as CaptionDisplayCue } from "./video-draft-types-
|
|
2
|
-
import { A as MenginePushRejectedError, B as MengineSyncResponse, C as PushResult, D as MengineHttpClient, E as readMengineEventStream, F as MenginePushResponse, H as base64ToBytes, I as MenginePushUpdateResponse, L as MengineRejectedResponse, M as MengineAuditResponse, N as MengineDocumentVersion, O as MengineHttpClientOptions, P as MengineDraftResponse, R as MengineSnapshotResponse, S as PullResult, T as MengineEventStreamOptions, U as bytesToBase64, V as MengineUpdateMeta, _ as ManualSyncTransport, a as MengineDocSessionOptions, b as DocVersionMark, d as MengineUndoState, f as MedeoHttpDocStorage, g as ManualSyncDocOptions, h as PushOutcomeKind, j as MengineAuditEntry, k as MengineHttpRequestError, l as WaitForServerAckOptions, m as PushOutcome, o as MengineDocSyncState, p as MedeoHttpDocStorageOptions, t as MemoryDocStorage, u as DocStorageLike, v as decodeDocVersionMark, w as PushResultKind, x as PullFailureReason, y as encodeDocVersionMark, z as MengineSseUpdateEvent } from "./index-
|
|
1
|
+
import { i as VideoDraft, l as VideoDraftPartUnion, o as VideoDraftContent, p as CommitOptions, t as CaptionDisplayCue } from "./video-draft-types-BfkIuW5f.js";
|
|
2
|
+
import { A as MenginePushRejectedError, B as MengineSyncResponse, C as PushResult, D as MengineHttpClient, E as readMengineEventStream, F as MenginePushResponse, H as base64ToBytes, I as MenginePushUpdateResponse, L as MengineRejectedResponse, M as MengineAuditResponse, N as MengineDocumentVersion, O as MengineHttpClientOptions, P as MengineDraftResponse, R as MengineSnapshotResponse, S as PullResult, T as MengineEventStreamOptions, U as bytesToBase64, V as MengineUpdateMeta, _ as ManualSyncTransport, a as MengineDocSessionOptions, b as DocVersionMark, d as MengineUndoState, f as MedeoHttpDocStorage, g as ManualSyncDocOptions, h as PushOutcomeKind, j as MengineAuditEntry, k as MengineHttpRequestError, l as WaitForServerAckOptions, m as PushOutcome, o as MengineDocSyncState, p as MedeoHttpDocStorageOptions, t as MemoryDocStorage, u as DocStorageLike, v as decodeDocVersionMark, w as PushResultKind, x as PullFailureReason, y as encodeDocVersionMark, z as MengineSseUpdateEvent } from "./index-CwG4lYKp.js";
|
|
3
3
|
import { LoroDoc, PeerID } from "loro-crdt";
|
|
4
4
|
|
|
5
5
|
//#region ../medeo-dsl/depreacted/sandbox.d.ts
|
package/dist/legacy.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as bytesToBase64, t as base64ToBytes } from "./base64-D-jd-dr5.js";
|
|
2
2
|
import { c as readMengineEventStream, d as MenginePushRejectedError, i as openManualDocument, l as MengineHttpClient, n as MedeoHttpDocStorage, o as decodeDocVersionMark, r as ManualSyncTransport, s as encodeDocVersionMark, t as MemoryDocStorage, u as MengineHttpRequestError } from "./storage-BW3tI_ER.js";
|
|
3
|
-
import { a as documentFormat, r as UnsupportedDocumentFormatError, t as DEFAULT_UNIT_TIME_MS } from "./video-draft-types-
|
|
3
|
+
import { a as documentFormat, r as UnsupportedDocumentFormatError, t as DEFAULT_UNIT_TIME_MS } from "./video-draft-types-DvPeam87.js";
|
|
4
4
|
import { u as volumeSchema } from "./shared-iWnU2osE.js";
|
|
5
5
|
import { sha256 } from "@noble/hashes/sha2.js";
|
|
6
6
|
import { LoroDoc, LoroMap, LoroMovableList, LoroText, UndoManager } from "loro-crdt";
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as VideoDraft } from "./video-draft-types-
|
|
2
|
-
import { _ as MedeoDsl } from "./index-
|
|
1
|
+
import { i as VideoDraft } from "./video-draft-types-BfkIuW5f.js";
|
|
2
|
+
import { _ as MedeoDsl } from "./index-DP9FG0z_.js";
|
|
3
3
|
import { LoroDoc } from "loro-crdt";
|
|
4
4
|
|
|
5
5
|
//#region src/testing/in-memory-mengine-server.d.ts
|
package/dist/testing.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as bytesToBase64, t as base64ToBytes } from "./base64-D-jd-dr5.js";
|
|
2
|
-
import { a as documentFormat, i as assertDslDocument } from "./video-draft-types-
|
|
3
|
-
import { a as MedeoDsl, i as DslEditor, n as toVideoDraft, r as createInitialMedeoDsl } from "./dsl-
|
|
2
|
+
import { a as documentFormat, i as assertDslDocument } from "./video-draft-types-DvPeam87.js";
|
|
3
|
+
import { a as MedeoDsl, i as DslEditor, n as toVideoDraft, r as createInitialMedeoDsl } from "./dsl-BCcld0Ca.js";
|
|
4
4
|
import { t as classifyUpdate } from "./loro-relay-doc-Bi6JKqtQ.js";
|
|
5
5
|
import { LoroDoc, VersionVector, encodeFrontiers } from "loro-crdt";
|
|
6
6
|
//#region src/testing/in-memory-mengine-server.ts
|
|
@@ -17,9 +17,24 @@ interface SeqMarker {
|
|
|
17
17
|
rate?: number;
|
|
18
18
|
fillTimeline?: true;
|
|
19
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. */
|
|
20
32
|
interface Clip {
|
|
21
33
|
seqMarker: SeqMarker;
|
|
22
34
|
volume?: number;
|
|
35
|
+
/** The media or Caption this use plays. */
|
|
36
|
+
source: string;
|
|
37
|
+
anchor?: TimeAnchor;
|
|
23
38
|
}
|
|
24
39
|
interface MediaLocator {
|
|
25
40
|
system: ResourceSystem;
|
|
@@ -57,21 +72,33 @@ interface CaptionStyle$1 {
|
|
|
57
72
|
positionX?: number;
|
|
58
73
|
positionY?: number;
|
|
59
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. */
|
|
60
82
|
interface Caption {
|
|
83
|
+
selection?: CaptionContent;
|
|
61
84
|
text?: string;
|
|
62
85
|
style?: CaptionStyle$1;
|
|
63
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 variant of an AudioScript: the script it reads, plus how to pronounce it. */
|
|
94
|
+
interface PhoneticScript {
|
|
95
|
+
phoneme: Phoneme;
|
|
96
|
+
}
|
|
64
97
|
interface Voice {
|
|
65
98
|
system: 'voice-library';
|
|
66
99
|
key: string;
|
|
67
100
|
name?: string;
|
|
68
101
|
}
|
|
69
|
-
interface Asset {
|
|
70
|
-
system: ResourceSystem;
|
|
71
|
-
key: string;
|
|
72
|
-
storageKey?: string;
|
|
73
|
-
digest?: string;
|
|
74
|
-
}
|
|
75
102
|
/** Table keys carry entity identity; values never duplicate an id or a single-table kind. */
|
|
76
103
|
interface EntityValues {
|
|
77
104
|
'timeline-entities': Record<string, never>;
|
|
@@ -79,35 +106,12 @@ interface EntityValues {
|
|
|
79
106
|
'clip-entities': Clip;
|
|
80
107
|
'media-entities': Media;
|
|
81
108
|
'audio-script-entities': AudioScript;
|
|
109
|
+
'phonetic-script-entities': PhoneticScript;
|
|
82
110
|
'caption-entities': Caption;
|
|
83
111
|
'voice-entities': Voice;
|
|
84
|
-
'asset-entities': Asset;
|
|
85
|
-
}
|
|
86
|
-
interface TimeAnchor {
|
|
87
|
-
from: string;
|
|
88
|
-
to: string;
|
|
89
|
-
offsetMs: number;
|
|
90
|
-
fallback_abs_ms: number;
|
|
91
|
-
}
|
|
92
|
-
interface CaptionContent {
|
|
93
|
-
captionId: string;
|
|
94
|
-
audioScriptId: string;
|
|
95
|
-
start: Cursor;
|
|
96
|
-
end: Cursor;
|
|
97
112
|
}
|
|
113
|
+
/** Only relations an entity may hold many of have tables; single-valued ones are fields of their owner. */
|
|
98
114
|
interface RelationValues {
|
|
99
|
-
'clip-source-relations': {
|
|
100
|
-
clipId: string;
|
|
101
|
-
sourceId: string;
|
|
102
|
-
};
|
|
103
|
-
'time-anchor-relations': TimeAnchor;
|
|
104
|
-
'caption-content-relations': CaptionContent;
|
|
105
|
-
'caption-alignment-relations': {
|
|
106
|
-
captionId: string;
|
|
107
|
-
mediaId: string;
|
|
108
|
-
startMs: number;
|
|
109
|
-
endMs: number;
|
|
110
|
-
};
|
|
111
115
|
'voice-timbre-relations': {
|
|
112
116
|
recordingId: string;
|
|
113
117
|
voiceId: string;
|
|
@@ -116,14 +120,6 @@ interface RelationValues {
|
|
|
116
120
|
entityId: string;
|
|
117
121
|
sourceId: string;
|
|
118
122
|
};
|
|
119
|
-
'from-asset-relations': {
|
|
120
|
-
audioScriptId: string;
|
|
121
|
-
assetId: string;
|
|
122
|
-
};
|
|
123
|
-
'to-asset-relations': {
|
|
124
|
-
audioScriptId: string;
|
|
125
|
-
assetId: string;
|
|
126
|
-
};
|
|
127
123
|
}
|
|
128
124
|
type EntityTable = keyof EntityValues;
|
|
129
125
|
type RelationTable = keyof RelationValues;
|
|
@@ -220,7 +216,7 @@ type MedeoDslSnapshot = DeepReadonly<EntityTables & RelationTables & {
|
|
|
220
216
|
captionText: Record<string, CaptionText>;
|
|
221
217
|
diagnostics: DslDiagnostic[];
|
|
222
218
|
}>;
|
|
223
|
-
type TextMark = 'language'
|
|
219
|
+
type TextMark = 'language';
|
|
224
220
|
type TextEdit = {
|
|
225
221
|
type: 'insert';
|
|
226
222
|
at: number;
|
|
@@ -234,7 +230,7 @@ type TextEdit = {
|
|
|
234
230
|
start: number;
|
|
235
231
|
end: number;
|
|
236
232
|
key: TextMark;
|
|
237
|
-
value: string
|
|
233
|
+
value: string;
|
|
238
234
|
} | {
|
|
239
235
|
type: 'unmark';
|
|
240
236
|
start: number;
|
|
@@ -256,9 +252,9 @@ type TextDelta = {
|
|
|
256
252
|
//#endregion
|
|
257
253
|
//#region ../medeo-dsl/src/ids.d.ts
|
|
258
254
|
declare function tupleHash(tuple: readonly string[]): string;
|
|
259
|
-
declare function resourceId(kind: 'media' | 'voice'
|
|
255
|
+
declare function resourceId(kind: 'media' | 'voice', system: string, key: string): string;
|
|
260
256
|
declare function relationId<K extends RelationTable>(table: K, value: RelationValues[K]): string;
|
|
261
|
-
type EntityIdKind = 'timeline' | 'track' | 'clip' | 'audio-script' | 'caption';
|
|
257
|
+
type EntityIdKind = 'timeline' | 'track' | 'clip' | 'audio-script' | 'phonetic-script' | 'caption';
|
|
262
258
|
type DslIdFactory = (kind: EntityIdKind) => string;
|
|
263
259
|
declare const defaultIdFactory: DslIdFactory;
|
|
264
260
|
//#endregion
|
|
@@ -806,4 +802,4 @@ type VideoDraftContent = Pick<VideoDraft, 'timeline' | 'main_track' | 'above_mai
|
|
|
806
802
|
type VideoDraftInput = Pick<VideoDraft, keyof VideoDraftContent>;
|
|
807
803
|
declare const DEFAULT_UNIT_TIME_MS = 33.333;
|
|
808
804
|
//#endregion
|
|
809
|
-
export {
|
|
805
|
+
export { TrackRole 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, TextMark as J, TextDelta as K, FieldPatch as L, DslMutation as M, EntityMutation as N, ContainMutation as O, EntityTable as P, Track$1 as Q, MedeoDslSnapshot as R, Caption as S, CaptionStyle$1 as T, RelationValues as U, RelationTable as V, ResourceSystem as W, TextRun as X, TextMutation as Y, TimeAnchor as Z, defaultIdFactory as _, VideoDraftCaptionStyle as a, tupleHash as b, VideoDraftInput as c, VideoDraftTrack as d, Voice 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, TextEdit as q, VideoCreationSettings as r, VideoDraftContentPartUnion as s, CaptionDisplayCue as t, VideoDraftTimeline as u, relationId as v, CaptionSelection as w, AudioScript as x, resourceId as y, Media as z };
|