@mengine/medeo-client 2.1.1-dsl.25 → 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.
- package/README.md +5 -5
- package/dist/{dsl-DrQOG0a6.js → dsl-SmWJTQWV.js} +2117 -4
- package/dist/dsl.d.ts +1 -2
- package/dist/dsl.js +1 -2
- package/dist/{index-CmuDB_Gm.d.ts → index-B1Lqm_Z1.d.ts} +883 -5
- package/dist/{index-BOgr8p8C.d.ts → index-pULoWyd9.d.ts} +199 -2
- package/dist/index.d.ts +2 -4
- package/dist/index.js +803 -4
- package/dist/schemas.d.ts +21 -21
- package/dist/schemas.js +57 -21
- package/dist/testing.d.ts +1 -4
- package/dist/testing.js +27 -40
- package/package.json +5 -6
- package/dist/index-BGEcTwoD.d.ts +0 -202
- package/dist/legacy.d.ts +0 -1044
- package/dist/legacy.js +0 -4349
- package/dist/shared-iWnU2osE.js +0 -39
- package/dist/storage-evqvKS4B.js +0 -805
- package/dist/video-draft-types-DRGBN0we.js +0 -1551
- package/dist/video-draft-types-slnHaNs9.d.ts +0 -882
|
@@ -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-B1Lqm_Z1.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";
|
|
@@ -362,6 +362,189 @@ declare class ManualSyncTransport {
|
|
|
362
362
|
private serverVVFrom;
|
|
363
363
|
}
|
|
364
364
|
//#endregion
|
|
365
|
+
//#region src/manual-sync/manual-sync-doc.d.ts
|
|
366
|
+
/** Explicit synchronization over the same DSL/editor used by the live Session. */
|
|
367
|
+
declare class ManualSyncDoc extends ManualSyncTransport {
|
|
368
|
+
readonly dsl: MedeoDsl;
|
|
369
|
+
readonly editor: DslEditor;
|
|
370
|
+
private constructor();
|
|
371
|
+
/** `uploadText` stores raw content the editor writes, such as a PhoneticScript's text, in Memota. */
|
|
372
|
+
static open(options: ManualSyncDocOptions & {
|
|
373
|
+
uploadText?: UploadText;
|
|
374
|
+
}): Promise<ManualSyncDoc>;
|
|
375
|
+
snapshot(): {
|
|
376
|
+
readonly "timeline-entities": {
|
|
377
|
+
readonly [x: string]: {
|
|
378
|
+
readonly [x: string]: never;
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
readonly "track-entities": {
|
|
382
|
+
readonly [x: string]: {
|
|
383
|
+
readonly role: TrackRole;
|
|
384
|
+
readonly hidden?: boolean | undefined;
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
readonly "clip-entities": {
|
|
388
|
+
readonly [x: string]: {
|
|
389
|
+
readonly seqMarker: {
|
|
390
|
+
readonly inMs: number;
|
|
391
|
+
readonly outMs: number;
|
|
392
|
+
readonly rate?: number | undefined;
|
|
393
|
+
readonly fillTimeline?: true | undefined;
|
|
394
|
+
};
|
|
395
|
+
readonly volume?: number | undefined;
|
|
396
|
+
readonly source: string;
|
|
397
|
+
readonly anchor?: {
|
|
398
|
+
readonly to: string;
|
|
399
|
+
readonly offsetMs: number;
|
|
400
|
+
readonly fallback_abs_ms: number;
|
|
401
|
+
} | undefined;
|
|
402
|
+
};
|
|
403
|
+
};
|
|
404
|
+
readonly "media-entities": {
|
|
405
|
+
readonly [x: string]: {
|
|
406
|
+
readonly system: ResourceSystem;
|
|
407
|
+
readonly key: string;
|
|
408
|
+
readonly digest?: string | undefined;
|
|
409
|
+
readonly kind: "video";
|
|
410
|
+
readonly durationMs: number;
|
|
411
|
+
readonly storageKey?: string | undefined;
|
|
412
|
+
} | {
|
|
413
|
+
readonly system: ResourceSystem;
|
|
414
|
+
readonly key: string;
|
|
415
|
+
readonly digest?: string | undefined;
|
|
416
|
+
readonly kind: "audio" | "voiceover-recording";
|
|
417
|
+
readonly durationMs: number;
|
|
418
|
+
readonly storageKey: string;
|
|
419
|
+
} | {
|
|
420
|
+
readonly system: ResourceSystem;
|
|
421
|
+
readonly key: string;
|
|
422
|
+
readonly digest?: string | undefined;
|
|
423
|
+
readonly kind: "image";
|
|
424
|
+
readonly storageKey?: string | undefined;
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
readonly "audio-script-entities": {
|
|
428
|
+
readonly [x: string]: {
|
|
429
|
+
readonly segments: readonly {
|
|
430
|
+
readonly id: string;
|
|
431
|
+
readonly text: string;
|
|
432
|
+
readonly startMs?: number | undefined;
|
|
433
|
+
readonly endMs?: number | undefined;
|
|
434
|
+
}[];
|
|
435
|
+
readonly defaultLanguage?: string | undefined;
|
|
436
|
+
readonly system?: "memota" | undefined;
|
|
437
|
+
readonly key?: string | undefined;
|
|
438
|
+
readonly storageKey?: string | undefined;
|
|
439
|
+
readonly digest?: string | undefined;
|
|
440
|
+
};
|
|
441
|
+
};
|
|
442
|
+
readonly "phonetic-script-entities": {
|
|
443
|
+
readonly [x: string]: {
|
|
444
|
+
readonly phoneme: {
|
|
445
|
+
readonly phonemeScript?: string | undefined;
|
|
446
|
+
readonly audioScriptId: string;
|
|
447
|
+
readonly segmentId: string;
|
|
448
|
+
readonly start?: import("loro-crdt").Cursor | undefined;
|
|
449
|
+
readonly end?: import("loro-crdt").Cursor | undefined;
|
|
450
|
+
};
|
|
451
|
+
readonly system?: "memota" | undefined;
|
|
452
|
+
readonly key?: string | undefined;
|
|
453
|
+
readonly storageKey?: string | undefined;
|
|
454
|
+
readonly digest?: string | undefined;
|
|
455
|
+
};
|
|
456
|
+
};
|
|
457
|
+
readonly "caption-entities": {
|
|
458
|
+
readonly [x: string]: {
|
|
459
|
+
readonly selection?: {
|
|
460
|
+
readonly audioScriptId: string;
|
|
461
|
+
readonly segmentId: string;
|
|
462
|
+
readonly start?: import("loro-crdt").Cursor | undefined;
|
|
463
|
+
readonly end?: import("loro-crdt").Cursor | undefined;
|
|
464
|
+
} | undefined;
|
|
465
|
+
readonly text?: string | undefined;
|
|
466
|
+
readonly style?: {
|
|
467
|
+
readonly font?: {
|
|
468
|
+
readonly system: "font-library";
|
|
469
|
+
readonly key: string;
|
|
470
|
+
} | undefined;
|
|
471
|
+
readonly fontSize?: number | undefined;
|
|
472
|
+
readonly fontColor?: string | undefined;
|
|
473
|
+
readonly fontWeight?: number | undefined;
|
|
474
|
+
readonly entranceAnimation?: string | undefined;
|
|
475
|
+
readonly entranceAnimationDurationMs?: number | undefined;
|
|
476
|
+
readonly strokeColor?: string | undefined;
|
|
477
|
+
readonly strokeWidth?: number | undefined;
|
|
478
|
+
readonly positionX?: number | undefined;
|
|
479
|
+
readonly positionY?: number | undefined;
|
|
480
|
+
} | undefined;
|
|
481
|
+
};
|
|
482
|
+
};
|
|
483
|
+
readonly "voice-entities": {
|
|
484
|
+
readonly [x: string]: {
|
|
485
|
+
readonly system: "voice-library";
|
|
486
|
+
readonly key: string;
|
|
487
|
+
readonly name?: string | undefined;
|
|
488
|
+
};
|
|
489
|
+
};
|
|
490
|
+
readonly "voice-timbre-relations": {
|
|
491
|
+
readonly [x: string]: {
|
|
492
|
+
readonly recordingId: string;
|
|
493
|
+
readonly voiceId: string;
|
|
494
|
+
};
|
|
495
|
+
};
|
|
496
|
+
readonly "derived-from-relations": {
|
|
497
|
+
readonly [x: string]: {
|
|
498
|
+
readonly entityId: string;
|
|
499
|
+
readonly sourceId: string;
|
|
500
|
+
readonly sourceDigest?: string | undefined;
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
readonly 'contain-relations': readonly {
|
|
504
|
+
readonly treeId: import("loro-crdt").TreeID;
|
|
505
|
+
readonly entityId: string;
|
|
506
|
+
readonly children: readonly /*elided*/any[];
|
|
507
|
+
}[];
|
|
508
|
+
readonly richText: {
|
|
509
|
+
readonly [x: string]: {
|
|
510
|
+
readonly bodyId: string;
|
|
511
|
+
readonly plainText: string;
|
|
512
|
+
readonly delta: readonly {
|
|
513
|
+
readonly insert: string;
|
|
514
|
+
readonly attributes?: {
|
|
515
|
+
readonly [x: string]: unknown;
|
|
516
|
+
} | undefined;
|
|
517
|
+
}[];
|
|
518
|
+
};
|
|
519
|
+
};
|
|
520
|
+
readonly captionText: {
|
|
521
|
+
readonly [x: string]: {
|
|
522
|
+
readonly text: string;
|
|
523
|
+
readonly start: number;
|
|
524
|
+
readonly end: number;
|
|
525
|
+
readonly bodyId: string;
|
|
526
|
+
};
|
|
527
|
+
};
|
|
528
|
+
readonly phoneticText: {
|
|
529
|
+
readonly [x: string]: {
|
|
530
|
+
readonly text: string;
|
|
531
|
+
readonly start: number;
|
|
532
|
+
readonly end: number;
|
|
533
|
+
readonly bodyId: string;
|
|
534
|
+
};
|
|
535
|
+
};
|
|
536
|
+
readonly diagnostics: readonly {
|
|
537
|
+
readonly code: string;
|
|
538
|
+
readonly path: string;
|
|
539
|
+
readonly message: string;
|
|
540
|
+
}[];
|
|
541
|
+
};
|
|
542
|
+
projectVideoDraft(): VideoDraftProjection;
|
|
543
|
+
/** Read the acknowledged server revision; without a new push, confirm against the current server view. */
|
|
544
|
+
readPersistedDraft(updateSeq?: number): Promise<MengineDraftResponse>;
|
|
545
|
+
dispose(): void;
|
|
546
|
+
}
|
|
547
|
+
//#endregion
|
|
365
548
|
//#region src/storage/medeo-http-doc-storage.d.ts
|
|
366
549
|
interface MedeoHttpDocStorageOptions {
|
|
367
550
|
docId: string;
|
|
@@ -722,6 +905,20 @@ declare class DocumentSession<Snapshot, Editor, Document> {
|
|
|
722
905
|
private waitForInitialLoad;
|
|
723
906
|
}
|
|
724
907
|
//#endregion
|
|
908
|
+
//#region src/session/mengine-doc-session.d.ts
|
|
909
|
+
type MengineDocSessionUpdateEvent = DocumentSessionUpdateEvent<MedeoDslSnapshot>;
|
|
910
|
+
/** Default collaborative session: one DSL handle and one editor over the synchronized LoroDoc. */
|
|
911
|
+
declare class MengineDocSession extends DocumentSession<MedeoDslSnapshot, DslEditor, MedeoDsl> {
|
|
912
|
+
/** `uploadText` stores raw content the editor writes, such as a PhoneticScript's text, in Memota. */
|
|
913
|
+
constructor(options: MengineDocSessionOptions & {
|
|
914
|
+
uploadText?: UploadText;
|
|
915
|
+
});
|
|
916
|
+
get dsl(): MedeoDsl;
|
|
917
|
+
projectVideoDraft(): VideoDraftProjection;
|
|
918
|
+
/** The document's AudioScripts with what says and shows them; read from the same snapshot as the VideoDraft. */
|
|
919
|
+
projectAudioScripts(): AudioScriptView[];
|
|
920
|
+
}
|
|
921
|
+
//#endregion
|
|
725
922
|
//#region src/storage/memory-doc-storage.d.ts
|
|
726
923
|
/**
|
|
727
924
|
* Runtime-neutral local `DocStorage` backed by in-process memory.
|
|
@@ -747,4 +944,4 @@ declare class MemoryDocStorage extends BaseDocStorage {
|
|
|
747
944
|
private now;
|
|
748
945
|
}
|
|
749
946
|
//#endregion
|
|
750
|
-
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,
|
|
947
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { A 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-BOgr8p8C.js";
|
|
4
|
-
import { n as MengineDocSessionUpdateEvent, r as ManualSyncDoc, t as MengineDocSession } from "./index-BGEcTwoD.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-B1Lqm_Z1.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 ManualSyncDocOptions, a as MengineDocSessionOptions, b as DocVersionMark, c as WaitForLocalSaveOptions, d as MengineUndoState, f as MedeoHttpDocStorage, g as ManualSyncDoc, h as PushOutcomeKind, i as MengineAckFailedError, j as MengineAuditEntry, k as MengineHttpRequestError, l as WaitForServerAckOptions, m as PushOutcome, n as MengineDocSession, o as MengineDocSyncState, p as MedeoHttpDocStorageOptions, r as MengineDocSessionUpdateEvent, 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-pULoWyd9.js";
|
|
5
3
|
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 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 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, type WaitForLocalSaveOptions, type WaitForServerAckOptions, assertDslDocument, base64ToBytes, bytesToBase64, captionContentCodec, createInitialMedeoDsl, decodeDocVersionMark, defaultIdFactory, documentFormat, encodeDocVersionMark, fromVideoDraft, isInvalidAtomic, medeoDslLoroShape, readMengineEventStream, relationId, resolveDslLayout, resourceId, timeAnchorCodec, toAudioScriptViews, toVideoDraft, tupleHash };
|