@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.
- package/README.md +17 -16
- package/dist/{dsl-DbYqFFOb.js → dsl-Cpk8WxcZ.js} +2909 -453
- package/dist/dsl.d.ts +1 -2
- package/dist/dsl.js +1 -2
- package/dist/{index-Dpl4bT94.d.ts → index-Dldi944U.d.ts} +199 -3
- package/dist/{index-DHcMMn2M.d.ts → index-DuM7I4Ku.d.ts} +969 -42
- package/dist/index.d.ts +2 -4
- package/dist/index.js +815 -7
- package/dist/testing.d.ts +1 -2
- package/dist/testing.js +6 -9
- package/package.json +9 -12
- package/dist/index-Cx5DojM1.d.ts +0 -179
- package/dist/legacy.d.ts +0 -1044
- package/dist/legacy.js +0 -4349
- package/dist/schemas.d.ts +0 -606
- package/dist/schemas.js +0 -442
- package/dist/shared-iWnU2osE.js +0 -39
- package/dist/storage-BW3tI_ER.js +0 -801
- package/dist/video-draft-types-Bq15tPBP.d.ts +0 -821
- package/dist/video-draft-types-Ce8NDenQ.js +0 -1464
package/dist/dsl.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { A as MedeoDslDraft, C as UnsupportedDocumentFormatError, D as captionContentCodec, E as InvalidAtomic, F as ClipSource, I as DslClipUpdate, L as MoveDslClipsInput, M as medeoDslLoroShape, N as AddDslClip, O as isInvalidAtomic, P as AddDslClipsInput, R as ReplaceDslClipsInput, S as DslTransaction, T as documentFormat, _ as VoiceoverCaptionInput, a as toAudioScriptViews, b as MedeoDsl, c as resolveDslLayout, d as DslProjectionError, f as DslTrackLayout, g as ApplyVoiceoverInput, h as UploadText, i as AudioScriptView, j as MedeoDslLoroState, k as timeAnchorCodec, l as DslClipLayout, m as DslEditor, n as ImportedVideoDraft, o as VideoDraftProjection, p as createInitialMedeoDsl, r as fromVideoDraft, s as toVideoDraft, t as FromVideoDraftOptions, u as DslLayout, v as VoiceoverResult, w as assertDslDocument, x as DslAudit, y as CreateMedeoDslOptions, z as ClipPlacement } from "./index-DHcMMn2M.js";
|
|
1
|
+
import { $ as ClipPlacement, A as VoiceoverResult, At as RichTextSnapshot, B as isInvalidAtomic, Bt as Voice, C as DslProjectionError, Ct as MedeoDslSnapshot, D as UploadText, Dt as RelationTables, E as DslEditor, Et as RelationTable, F as UnsupportedDocumentFormatError, Ft as TextMutation, G as CommitOptions, H as MedeoDslDraft, I as assertDslDocument, It as TextRun, J as AddDslClipsInput, K as OpActor, L as documentFormat, Lt as TimeAnchor, M as MedeoDsl, Mt as TextDelta, N as DslAudit, Nt as TextEdit, O as ApplyVoiceoverInput, Ot as RelationValues, P as DslTransaction, Pt as TextMark, Q as ReplaceDslClipsInput, R as InvalidAtomic, Rt as Track, S as DslLayout, St as FieldPatch, T as createInitialMedeoDsl, Tt as RelationMutation, U as MedeoDslLoroState, V as timeAnchorCodec, W as medeoDslLoroShape, X as DslClipUpdate, Y as ClipSource, Z as MoveDslClipsInput, _ as VideoDraftTimeline, _t as DslMutation, a as toAudioScriptViews, at as tupleHash, b as resolveDslLayout, bt as EntityTables, c as CaptionDisplayCue, ct as CaptionContent, d as VideoDraft, dt as CaptionText, et as DslIdFactory, f as VideoDraftCaptionStyle, ft as Clip, g as VideoDraftPartUnion, gt as DslDiagnostic, h as VideoDraftInput, ht as DeepReadonly, i as AudioScriptView, it as resourceId, j as CreateMedeoDslOptions, jt as StoredFile, k as VoiceoverCaptionInput, kt as ResourceSystem, l as DEFAULT_UNIT_TIME_MS, lt as CaptionSelection, m as VideoDraftContentPartUnion, mt as ContainNode, n as ImportedVideoDraft, nt as defaultIdFactory, o as VideoDraftProjection, ot as AudioScript, p as VideoDraftContent, pt as ContainMutation, q as AddDslClip, r as fromVideoDraft, rt as relationId, s as toVideoDraft, st as Caption, t as FromVideoDraftOptions, tt as EntityIdKind, u as VideoCreationSettings, ut as CaptionStyle, v as VideoDraftTrack, vt as EntityMutation, w as DslTrackLayout, wt as Media, x as DslClipLayout, xt as EntityValues, y as VideoDraftTrackItem, yt as EntityTable, z as captionContentCodec, zt as TrackRole } from "./index-DuM7I4Ku.js";
|
|
3
2
|
export { type AddDslClip, type AddDslClipsInput, type ApplyVoiceoverInput, type AudioScript, type AudioScriptView, 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 StoredFile, type TextDelta, type TextEdit, type TextMark, type TextMutation, type TextRun, type TimeAnchor, type Track, type TrackRole, UnsupportedDocumentFormatError, type UploadText, 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, toAudioScriptViews, toVideoDraft, tupleHash };
|
package/dist/dsl.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { a as DslEditor, c as DslProjectionError, i as createInitialMedeoDsl, n as toVideoDraft, o as MedeoDsl, r as toAudioScriptViews, s as resolveDslLayout, t as fromVideoDraft } from "./dsl-DbYqFFOb.js";
|
|
1
|
+
import { _ as defaultIdFactory, a as DslEditor, b as tupleHash, c as UnsupportedDocumentFormatError, d as medeoDslLoroShape, f as captionContentCodec, g as DslProjectionError, h as resolveDslLayout, i as createInitialMedeoDsl, l as assertDslDocument, m as timeAnchorCodec, n as toVideoDraft, o as toAudioScriptViews, p as isInvalidAtomic, r as DEFAULT_UNIT_TIME_MS, s as MedeoDsl, t as fromVideoDraft, u as documentFormat, v as relationId, y as resourceId } from "./dsl-Cpk8WxcZ.js";
|
|
3
2
|
export { DEFAULT_UNIT_TIME_MS, DslEditor, DslProjectionError, MedeoDsl, UnsupportedDocumentFormatError, assertDslDocument, captionContentCodec, createInitialMedeoDsl, defaultIdFactory, documentFormat, fromVideoDraft, isInvalidAtomic, medeoDslLoroShape, relationId, resolveDslLayout, resourceId, timeAnchorCodec, toAudioScriptViews, toVideoDraft, tupleHash };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ct as MedeoDslSnapshot, D as UploadText, E as DslEditor, G as CommitOptions, M as MedeoDsl, gt as DslDiagnostic, i as AudioScriptView, kt as ResourceSystem, o as VideoDraftProjection, p as VideoDraftContent, zt as TrackRole } from "./index-DuM7I4Ku.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";
|
|
@@ -360,6 +360,187 @@ declare class ManualSyncTransport {
|
|
|
360
360
|
private serverVVFrom;
|
|
361
361
|
}
|
|
362
362
|
//#endregion
|
|
363
|
+
//#region src/manual-sync/manual-sync-doc.d.ts
|
|
364
|
+
/** Explicit synchronization over the same DSL/editor used by the live Session. */
|
|
365
|
+
declare class ManualSyncDoc extends ManualSyncTransport {
|
|
366
|
+
readonly dsl: MedeoDsl;
|
|
367
|
+
readonly editor: DslEditor;
|
|
368
|
+
private constructor();
|
|
369
|
+
/** `uploadText` stores raw content the editor writes, such as a PhoneticScript's text, in Memota. */
|
|
370
|
+
static open(options: ManualSyncDocOptions & {
|
|
371
|
+
uploadText?: UploadText;
|
|
372
|
+
}): Promise<ManualSyncDoc>;
|
|
373
|
+
snapshot(): {
|
|
374
|
+
readonly "timeline-entities": {
|
|
375
|
+
readonly [x: string]: {
|
|
376
|
+
readonly [x: string]: never;
|
|
377
|
+
};
|
|
378
|
+
};
|
|
379
|
+
readonly "track-entities": {
|
|
380
|
+
readonly [x: string]: {
|
|
381
|
+
readonly role: TrackRole;
|
|
382
|
+
readonly hidden?: boolean | undefined;
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
readonly "clip-entities": {
|
|
386
|
+
readonly [x: string]: {
|
|
387
|
+
readonly seqMarker: {
|
|
388
|
+
readonly inMs: number;
|
|
389
|
+
readonly outMs: number;
|
|
390
|
+
readonly rate?: number | undefined;
|
|
391
|
+
readonly fillTimeline?: true | undefined;
|
|
392
|
+
};
|
|
393
|
+
readonly volume?: number | undefined;
|
|
394
|
+
readonly source: string;
|
|
395
|
+
readonly anchor?: {
|
|
396
|
+
readonly to: string;
|
|
397
|
+
readonly offsetMs: number;
|
|
398
|
+
readonly fallback_abs_ms: number;
|
|
399
|
+
} | undefined;
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
readonly "media-entities": {
|
|
403
|
+
readonly [x: string]: {
|
|
404
|
+
readonly system: ResourceSystem;
|
|
405
|
+
readonly key: string;
|
|
406
|
+
readonly digest?: string | undefined;
|
|
407
|
+
readonly kind: "video";
|
|
408
|
+
readonly durationMs: number;
|
|
409
|
+
readonly storageKey?: string | undefined;
|
|
410
|
+
} | {
|
|
411
|
+
readonly system: ResourceSystem;
|
|
412
|
+
readonly key: string;
|
|
413
|
+
readonly digest?: string | undefined;
|
|
414
|
+
readonly kind: "audio" | "voiceover-recording";
|
|
415
|
+
readonly durationMs: number;
|
|
416
|
+
readonly storageKey: string;
|
|
417
|
+
} | {
|
|
418
|
+
readonly system: ResourceSystem;
|
|
419
|
+
readonly key: string;
|
|
420
|
+
readonly digest?: string | undefined;
|
|
421
|
+
readonly kind: "image";
|
|
422
|
+
readonly storageKey?: string | undefined;
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
readonly "audio-script-entities": {
|
|
426
|
+
readonly [x: string]: {
|
|
427
|
+
readonly segments: readonly {
|
|
428
|
+
readonly id: string;
|
|
429
|
+
readonly text: string;
|
|
430
|
+
readonly startMs?: number | undefined;
|
|
431
|
+
readonly endMs?: number | undefined;
|
|
432
|
+
}[];
|
|
433
|
+
readonly defaultLanguage?: string | undefined;
|
|
434
|
+
readonly system?: "memota" | undefined;
|
|
435
|
+
readonly key?: string | undefined;
|
|
436
|
+
readonly storageKey?: string | undefined;
|
|
437
|
+
readonly digest?: string | undefined;
|
|
438
|
+
};
|
|
439
|
+
};
|
|
440
|
+
readonly "phonetic-script-entities": {
|
|
441
|
+
readonly [x: string]: {
|
|
442
|
+
readonly phoneme: {
|
|
443
|
+
readonly phonemeScript?: string | undefined;
|
|
444
|
+
readonly audioScriptId: string;
|
|
445
|
+
readonly segmentId: string;
|
|
446
|
+
readonly start?: import("loro-crdt").Cursor | undefined;
|
|
447
|
+
readonly end?: import("loro-crdt").Cursor | undefined;
|
|
448
|
+
};
|
|
449
|
+
readonly system?: "memota" | undefined;
|
|
450
|
+
readonly key?: string | undefined;
|
|
451
|
+
readonly storageKey?: string | undefined;
|
|
452
|
+
readonly digest?: string | undefined;
|
|
453
|
+
};
|
|
454
|
+
};
|
|
455
|
+
readonly "caption-entities": {
|
|
456
|
+
readonly [x: string]: {
|
|
457
|
+
readonly selection?: {
|
|
458
|
+
readonly audioScriptId: string;
|
|
459
|
+
readonly segmentId: string;
|
|
460
|
+
readonly start?: import("loro-crdt").Cursor | undefined;
|
|
461
|
+
readonly end?: import("loro-crdt").Cursor | undefined;
|
|
462
|
+
} | undefined;
|
|
463
|
+
readonly text?: string | undefined;
|
|
464
|
+
readonly style?: {
|
|
465
|
+
readonly font?: {
|
|
466
|
+
readonly system: "font-library";
|
|
467
|
+
readonly key: string;
|
|
468
|
+
} | undefined;
|
|
469
|
+
readonly fontSize?: number | undefined;
|
|
470
|
+
readonly fontColor?: string | undefined;
|
|
471
|
+
readonly fontWeight?: number | undefined;
|
|
472
|
+
readonly entranceAnimation?: string | undefined;
|
|
473
|
+
readonly entranceAnimationDurationMs?: number | undefined;
|
|
474
|
+
readonly strokeColor?: string | undefined;
|
|
475
|
+
readonly strokeWidth?: number | undefined;
|
|
476
|
+
readonly positionX?: number | undefined;
|
|
477
|
+
readonly positionY?: number | undefined;
|
|
478
|
+
} | undefined;
|
|
479
|
+
};
|
|
480
|
+
};
|
|
481
|
+
readonly "voice-entities": {
|
|
482
|
+
readonly [x: string]: {
|
|
483
|
+
readonly system: "voice-library";
|
|
484
|
+
readonly key: string;
|
|
485
|
+
readonly name?: string | undefined;
|
|
486
|
+
};
|
|
487
|
+
};
|
|
488
|
+
readonly "voice-timbre-relations": {
|
|
489
|
+
readonly [x: string]: {
|
|
490
|
+
readonly recordingId: string;
|
|
491
|
+
readonly voiceId: string;
|
|
492
|
+
};
|
|
493
|
+
};
|
|
494
|
+
readonly "derived-from-relations": {
|
|
495
|
+
readonly [x: string]: {
|
|
496
|
+
readonly entityId: string;
|
|
497
|
+
readonly sourceId: string;
|
|
498
|
+
readonly sourceDigest?: string | undefined;
|
|
499
|
+
};
|
|
500
|
+
};
|
|
501
|
+
readonly 'contain-relations': readonly {
|
|
502
|
+
readonly treeId: import("loro-crdt").TreeID;
|
|
503
|
+
readonly entityId: string;
|
|
504
|
+
readonly children: readonly /*elided*/any[];
|
|
505
|
+
}[];
|
|
506
|
+
readonly richText: {
|
|
507
|
+
readonly [x: string]: {
|
|
508
|
+
readonly bodyId: string;
|
|
509
|
+
readonly plainText: string;
|
|
510
|
+
readonly delta: readonly {
|
|
511
|
+
readonly insert: string;
|
|
512
|
+
readonly attributes?: {
|
|
513
|
+
readonly [x: string]: unknown;
|
|
514
|
+
} | undefined;
|
|
515
|
+
}[];
|
|
516
|
+
};
|
|
517
|
+
};
|
|
518
|
+
readonly captionText: {
|
|
519
|
+
readonly [x: string]: {
|
|
520
|
+
readonly text: string;
|
|
521
|
+
readonly start: number;
|
|
522
|
+
readonly end: number;
|
|
523
|
+
readonly bodyId: string;
|
|
524
|
+
};
|
|
525
|
+
};
|
|
526
|
+
readonly phoneticText: {
|
|
527
|
+
readonly [x: string]: {
|
|
528
|
+
readonly text: string;
|
|
529
|
+
readonly start: number;
|
|
530
|
+
readonly end: number;
|
|
531
|
+
readonly bodyId: string;
|
|
532
|
+
};
|
|
533
|
+
};
|
|
534
|
+
readonly diagnostics: readonly {
|
|
535
|
+
readonly code: string;
|
|
536
|
+
readonly path: string;
|
|
537
|
+
readonly message: string;
|
|
538
|
+
}[];
|
|
539
|
+
};
|
|
540
|
+
projectVideoDraft(): VideoDraftProjection;
|
|
541
|
+
dispose(): void;
|
|
542
|
+
}
|
|
543
|
+
//#endregion
|
|
363
544
|
//#region src/storage/medeo-http-doc-storage.d.ts
|
|
364
545
|
interface MedeoHttpDocStorageOptions {
|
|
365
546
|
docId: string;
|
|
@@ -581,6 +762,7 @@ type DocumentSessionModel<Snapshot, Editor, Document> = (doc: LoroDoc, guard: Do
|
|
|
581
762
|
declare class DocumentSession<Snapshot, Editor, Document> {
|
|
582
763
|
private readonly options;
|
|
583
764
|
private readonly model;
|
|
765
|
+
private readonly validateDocument;
|
|
584
766
|
private readonly docId;
|
|
585
767
|
private readonly local;
|
|
586
768
|
private readonly server;
|
|
@@ -607,7 +789,7 @@ declare class DocumentSession<Snapshot, Editor, Document> {
|
|
|
607
789
|
* doc (e.g. nothing was edited since the last confirmed push).
|
|
608
790
|
*/
|
|
609
791
|
private serverVVValue;
|
|
610
|
-
constructor(options: MengineDocSessionOptions, model: DocumentSessionModel<Snapshot, Editor, Document
|
|
792
|
+
constructor(options: MengineDocSessionOptions, model: DocumentSessionModel<Snapshot, Editor, Document>, validateDocument: (doc: LoroDoc) => void);
|
|
611
793
|
/**
|
|
612
794
|
* Observe every push verdict, including `duplicate` and failures.
|
|
613
795
|
*
|
|
@@ -719,6 +901,20 @@ declare class DocumentSession<Snapshot, Editor, Document> {
|
|
|
719
901
|
private waitForInitialLoad;
|
|
720
902
|
}
|
|
721
903
|
//#endregion
|
|
904
|
+
//#region src/session/mengine-doc-session.d.ts
|
|
905
|
+
type MengineDocSessionUpdateEvent = DocumentSessionUpdateEvent<MedeoDslSnapshot>;
|
|
906
|
+
/** Default collaborative session: one DSL handle and one editor over the synchronized LoroDoc. */
|
|
907
|
+
declare class MengineDocSession extends DocumentSession<MedeoDslSnapshot, DslEditor, MedeoDsl> {
|
|
908
|
+
/** `uploadText` stores raw content the editor writes, such as a PhoneticScript's text, in Memota. */
|
|
909
|
+
constructor(options: MengineDocSessionOptions & {
|
|
910
|
+
uploadText?: UploadText;
|
|
911
|
+
});
|
|
912
|
+
get dsl(): MedeoDsl;
|
|
913
|
+
projectVideoDraft(): VideoDraftProjection;
|
|
914
|
+
/** The document's AudioScripts with what says and shows them; read from the same snapshot as the VideoDraft. */
|
|
915
|
+
projectAudioScripts(): AudioScriptView[];
|
|
916
|
+
}
|
|
917
|
+
//#endregion
|
|
722
918
|
//#region src/storage/memory-doc-storage.d.ts
|
|
723
919
|
/**
|
|
724
920
|
* Runtime-neutral local `DocStorage` backed by in-process memory.
|
|
@@ -744,4 +940,4 @@ declare class MemoryDocStorage extends BaseDocStorage {
|
|
|
744
940
|
private now;
|
|
745
941
|
}
|
|
746
942
|
//#endregion
|
|
747
|
-
export { MenginePushRejectedError as A, MengineSyncResponse as B, PushResult as C, MengineHttpClient as D, readMengineEventStream as E, MenginePushResponse as F, base64ToBytes as H, MenginePushUpdateResponse as I, MengineRejectedResponse as L, MengineAuditResponse as M, MengineDocumentVersion as N, MengineHttpClientOptions as O, MengineDraftResponse as P, MengineSnapshotResponse as R, PullResult as S, MengineEventStreamOptions as T, bytesToBase64 as U, MengineUpdateMeta as V,
|
|
943
|
+
export { MenginePushRejectedError as A, MengineSyncResponse as B, PushResult as C, MengineHttpClient as D, readMengineEventStream as E, MenginePushResponse as F, base64ToBytes as H, MenginePushUpdateResponse as I, MengineRejectedResponse as L, MengineAuditResponse as M, MengineDocumentVersion as N, MengineHttpClientOptions as O, MengineDraftResponse as P, MengineSnapshotResponse as R, PullResult as S, MengineEventStreamOptions as T, bytesToBase64 as U, MengineUpdateMeta as V, ManualSyncDocOptions as _, MengineDocSessionOptions as a, DocVersionMark as b, WaitForLocalSaveOptions as c, MengineUndoState as d, MedeoHttpDocStorage as f, ManualSyncDoc as g, PushOutcomeKind as h, MengineAckFailedError as i, MengineAuditEntry as j, MengineHttpRequestError as k, WaitForServerAckOptions as l, PushOutcome as m, MengineDocSession as n, MengineDocSyncState as o, MedeoHttpDocStorageOptions as p, MengineDocSessionUpdateEvent as r, MengineLocalSaveState as s, MemoryDocStorage as t, DocStorageLike as u, decodeDocVersionMark as v, PushResultKind as w, PullFailureReason as x, encodeDocVersionMark as y, MengineSseUpdateEvent as z };
|