@mengine/medeo-client 2.1.1-dsl.2 → 2.1.1-dsl.20

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/dist/dsl.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { $ as Track, A as ContainNode, B as Media, C as Caption, D as CaptionText, E as CaptionStyle, F as EntityTable, G as ResourceSystem, H as RelationTable, I as EntityTables, J as TextEdit, K as RichTextSnapshot, L as EntityValues, M as DslDiagnostic, N as DslMutation, O as Clip, P as EntityMutation, Q as TimeAnchor, R as FieldPatch, S as AudioScript, T as CaptionSelection, U as RelationTables, V as RelationMutation, W as RelationValues, X as TextMutation, Y as TextMark, Z as TextRun, _ as defaultIdFactory, a as VideoDraftCaptionStyle, b as tupleHash, c as VideoDraftInput, d as VideoDraftTrack, et as TrackRole, f as VideoDraftTrackItem, g as EntityIdKind, h as DslIdFactory, i as VideoDraft, j as DeepReadonly, k as ContainMutation, l as VideoDraftPartUnion, m as OpActor, n as DEFAULT_UNIT_TIME_MS, o as VideoDraftContent, p as CommitOptions, q as TextDelta, r as VideoCreationSettings, s as VideoDraftContentPartUnion, t as CaptionDisplayCue, tt as Voice, u as VideoDraftTimeline, v as relationId, w as CaptionContent, x as Asset, y as resourceId, z as MedeoDslSnapshot } from "./video-draft-types-c_shaRyq.js";
2
- import { A as AddDslClip, C as MedeoDslDraft, D as captionContentCodec, E as InvalidAtomic, F as ReplaceDslClipsInput, I as ClipPlacement, M as ClipSource, N as DslClipUpdate, O as isInvalidAtomic, P as MoveDslClipsInput, S as documentFormat, T as medeoDslLoroShape, _ 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 timeAnchorCodec, 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 MedeoDslLoroState, x as assertDslDocument, y as DslTransaction } from "./index-Cu7SdKN5.js";
3
- export { type AddDslClip, type AddDslClipsInput, type ApplyVoiceoverInput, type Asset, 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 };
1
+ import { $ as TextMutation, A as DeepReadonly, C as CaptionContent, D as Clip, E as CaptionText, F as EntityTables, G as ResourceSystem, H as RelationTable, I as EntityValues, K as RichTextSnapshot, L as FieldPatch, M as DslMutation, N as EntityMutation, O as ContainMutation, P as EntityTable, Q as TextMark, R as MedeoDslSnapshot, S as Caption, T as CaptionStyle, U as RelationTables, V as RelationMutation, W as RelationValues, X as TextDelta, Y as StoredFile, Z as TextEdit, _ as defaultIdFactory, a as VideoDraftCaptionStyle, b as tupleHash, c as VideoDraftInput, d as VideoDraftTrack, et as TextRun, f as VideoDraftTrackItem, g as EntityIdKind, h as DslIdFactory, i as VideoDraft, it as Voice, j as DslDiagnostic, k as ContainNode, l as VideoDraftPartUnion, m as OpActor, n as DEFAULT_UNIT_TIME_MS, nt as Track, o as VideoDraftContent, p as CommitOptions, r as VideoCreationSettings, rt as TrackRole, s as VideoDraftContentPartUnion, t as CaptionDisplayCue, tt as TimeAnchor, u as VideoDraftTimeline, v as relationId, w as CaptionSelection, x as AudioScript, y as resourceId, z as Media } from "./video-draft-types-BOdawmig.js";
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-CTai9I2R.js";
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 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,3 @@
1
- import { a as documentFormat, c as isInvalidAtomic, ct as relationId, i as assertDslDocument, l as timeAnchorCodec, lt as resourceId, o as medeoDslLoroShape, r as UnsupportedDocumentFormatError, s as captionContentCodec, st as defaultIdFactory, t as DEFAULT_UNIT_TIME_MS, ut as tupleHash } from "./video-draft-types-TXRv3wS6.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-EV6kCdr6.js";
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
+ import { _t as resourceId, a as documentFormat, c as isInvalidAtomic, gt as relationId, ht as defaultIdFactory, i as assertDslDocument, o as medeoDslLoroShape, r as UnsupportedDocumentFormatError, s as captionContentCodec, t as DEFAULT_UNIT_TIME_MS, u as timeAnchorCodec, vt as tupleHash } from "./video-draft-types-DKo53mZ8.js";
2
+ import { a as toAudioScriptViews, c as DslProjectionError, i as DslEditor, n as toVideoDraft, o as MedeoDsl, r as createInitialMedeoDsl, s as resolveDslLayout, t as fromVideoDraft } from "./dsl-wdel0lX7.js";
3
+ 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,6 +1,6 @@
1
- import { G as ResourceSystem, et as TrackRole, z as MedeoDslSnapshot } from "./video-draft-types-c_shaRyq.js";
2
- import { _ as MedeoDsl, f as DslEditor, i as VideoDraftProjection } from "./index-Cu7SdKN5.js";
3
- import { _ as ManualSyncTransport, a as MengineDocSessionOptions, g as ManualSyncDocOptions, n as DocumentSession, r as DocumentSessionUpdateEvent } from "./index-D-3rdfUP.js";
1
+ import { G as ResourceSystem, R as MedeoDslSnapshot, rt as TrackRole } from "./video-draft-types-BOdawmig.js";
2
+ import { b as MedeoDsl, h as UploadText, i as AudioScriptView, m as DslEditor, o as VideoDraftProjection } from "./index-CTai9I2R.js";
3
+ import { _ as ManualSyncTransport, a as MengineDocSessionOptions, g as ManualSyncDocOptions, n as DocumentSession, r as DocumentSessionUpdateEvent } from "./index-CwZ0zt-E.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. */
@@ -8,7 +8,10 @@ declare class ManualSyncDoc extends ManualSyncTransport {
8
8
  readonly dsl: MedeoDsl;
9
9
  readonly editor: DslEditor;
10
10
  private constructor();
11
- static open(options: ManualSyncDocOptions): Promise<ManualSyncDoc>;
11
+ /** `uploadText` stores raw content the editor writes, such as a PhoneticScript's text, in Memota. */
12
+ static open(options: ManualSyncDocOptions & {
13
+ uploadText?: UploadText;
14
+ }): Promise<ManualSyncDoc>;
12
15
  snapshot(): {
13
16
  readonly "timeline-entities": {
14
17
  readonly [x: string]: {
@@ -30,6 +33,12 @@ declare class ManualSyncDoc extends ManualSyncTransport {
30
33
  readonly fillTimeline?: true | undefined;
31
34
  };
32
35
  readonly volume?: number | undefined;
36
+ readonly source: string;
37
+ readonly anchor?: {
38
+ readonly to: string;
39
+ readonly offsetMs: number;
40
+ readonly fallback_abs_ms: number;
41
+ } | undefined;
33
42
  };
34
43
  };
35
44
  readonly "media-entities": {
@@ -57,12 +66,42 @@ declare class ManualSyncDoc extends ManualSyncTransport {
57
66
  };
58
67
  readonly "audio-script-entities": {
59
68
  readonly [x: string]: {
60
- readonly body: string;
69
+ readonly segments: readonly {
70
+ readonly id: string;
71
+ readonly text: string;
72
+ readonly startMs?: number | undefined;
73
+ readonly endMs?: number | undefined;
74
+ }[];
61
75
  readonly defaultLanguage?: string | undefined;
76
+ readonly system?: "memota" | undefined;
77
+ readonly key?: string | undefined;
78
+ readonly storageKey?: string | undefined;
79
+ readonly digest?: string | undefined;
80
+ };
81
+ };
82
+ readonly "phonetic-script-entities": {
83
+ readonly [x: string]: {
84
+ readonly phoneme: {
85
+ readonly phonemeScript?: string | undefined;
86
+ readonly audioScriptId: string;
87
+ readonly segmentId: string;
88
+ readonly start?: import("loro-crdt").Cursor | undefined;
89
+ readonly end?: import("loro-crdt").Cursor | undefined;
90
+ };
91
+ readonly system?: "memota" | undefined;
92
+ readonly key?: string | undefined;
93
+ readonly storageKey?: string | undefined;
94
+ readonly digest?: string | undefined;
62
95
  };
63
96
  };
64
97
  readonly "caption-entities": {
65
98
  readonly [x: string]: {
99
+ readonly selection?: {
100
+ readonly audioScriptId: string;
101
+ readonly segmentId: string;
102
+ readonly start?: import("loro-crdt").Cursor | undefined;
103
+ readonly end?: import("loro-crdt").Cursor | undefined;
104
+ } | undefined;
66
105
  readonly text?: string | undefined;
67
106
  readonly style?: {
68
107
  readonly font?: {
@@ -88,44 +127,6 @@ declare class ManualSyncDoc extends ManualSyncTransport {
88
127
  readonly name?: string | undefined;
89
128
  };
90
129
  };
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
130
  readonly "voice-timbre-relations": {
130
131
  readonly [x: string]: {
131
132
  readonly recordingId: string;
@@ -136,18 +137,7 @@ declare class ManualSyncDoc extends ManualSyncTransport {
136
137
  readonly [x: string]: {
137
138
  readonly entityId: string;
138
139
  readonly sourceId: string;
139
- };
140
- };
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;
140
+ readonly sourceDigest?: string | undefined;
151
141
  };
152
142
  };
153
143
  readonly 'contain-relations': readonly {
@@ -175,6 +165,14 @@ declare class ManualSyncDoc extends ManualSyncTransport {
175
165
  readonly bodyId: string;
176
166
  };
177
167
  };
168
+ readonly phoneticText: {
169
+ readonly [x: string]: {
170
+ readonly text: string;
171
+ readonly start: number;
172
+ readonly end: number;
173
+ readonly bodyId: string;
174
+ };
175
+ };
178
176
  readonly diagnostics: readonly {
179
177
  readonly code: string;
180
178
  readonly path: string;
@@ -189,9 +187,14 @@ declare class ManualSyncDoc extends ManualSyncTransport {
189
187
  type MengineDocSessionUpdateEvent = DocumentSessionUpdateEvent<MedeoDslSnapshot>;
190
188
  /** Default collaborative session: one DSL handle and one editor over the synchronized LoroDoc. */
191
189
  declare class MengineDocSession extends DocumentSession<MedeoDslSnapshot, DslEditor, MedeoDsl> {
192
- constructor(options: MengineDocSessionOptions);
190
+ /** `uploadText` stores raw content the editor writes, such as a PhoneticScript's text, in Memota. */
191
+ constructor(options: MengineDocSessionOptions & {
192
+ uploadText?: UploadText;
193
+ });
193
194
  get dsl(): MedeoDsl;
194
195
  projectVideoDraft(): VideoDraftProjection;
196
+ /** The document's AudioScripts with what says and shows them; read from the same snapshot as the VideoDraft. */
197
+ projectAudioScripts(): AudioScriptView[];
195
198
  }
196
199
  //#endregion
197
200
  export { MengineDocSessionUpdateEvent as n, ManualSyncDoc as r, MengineDocSession as t };