@mengine/medeo-client 2.1.1-dsl.10 → 2.1.1-dsl.11

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.
@@ -5054,6 +5054,132 @@ var MedeoDsl = class MedeoDsl {
5054
5054
  }
5055
5055
  };
5056
5056
  //#endregion
5057
+ //#region src/dsl/projection/audio-scripts.ts
5058
+ /**
5059
+ * The scripts a recording says. It follows derived-from from the recording; a PhoneticScript is a
5060
+ * variant, so its words are the base its phoneme names, and derived-from is not followed past it.
5061
+ * When nothing is found that way, a script read off the recording itself is what it says.
5062
+ */
5063
+ function spokenScripts(snapshot, recordingId) {
5064
+ const relations = Object.values(snapshot["derived-from-relations"]);
5065
+ const found = /* @__PURE__ */ new Map();
5066
+ const seen = /* @__PURE__ */ new Set();
5067
+ const visit = (id, phoneticScriptId) => {
5068
+ if (seen.has(id)) return;
5069
+ seen.add(id);
5070
+ if (snapshot["audio-script-entities"][id]) {
5071
+ if (!found.has(id)) found.set(id, phoneticScriptId);
5072
+ return;
5073
+ }
5074
+ const phonetic = snapshot["phonetic-script-entities"][id];
5075
+ if (phonetic) {
5076
+ visit(phonetic.phoneme.audioScriptId, id);
5077
+ return;
5078
+ }
5079
+ for (const r of relations) if (r.entityId === id) visit(r.sourceId, phoneticScriptId);
5080
+ };
5081
+ visit(recordingId);
5082
+ if (!found.size) {
5083
+ for (const r of relations) if (r.sourceId === recordingId && snapshot["audio-script-entities"][r.entityId]) found.set(r.entityId, void 0);
5084
+ }
5085
+ return [...found].map(([audioScriptId, phoneticScriptId]) => phoneticScriptId === void 0 ? { audioScriptId } : {
5086
+ audioScriptId,
5087
+ phoneticScriptId
5088
+ });
5089
+ }
5090
+ /** Every AudioScript in the document with its PhoneticScripts, the Speech Clips saying it and the Caption Clips showing it. */
5091
+ function toAudioScriptViews(snapshot) {
5092
+ const views = /* @__PURE__ */ new Map();
5093
+ const segmentIndex = (scriptId, segmentId) => {
5094
+ const index = snapshot["audio-script-entities"][scriptId]?.segments.findIndex((s) => s.id === segmentId) ?? -1;
5095
+ return index < 0 ? void 0 : index;
5096
+ };
5097
+ for (const [id, script] of Object.entries(snapshot["audio-script-entities"])) views.set(id, {
5098
+ id,
5099
+ segments: script.segments.map((segment) => {
5100
+ const rich = snapshot.richText[segment.id];
5101
+ const language = rich ? markedLanguage(langsFromDelta(rich.delta)) : void 0;
5102
+ return language === void 0 ? {
5103
+ id: segment.id,
5104
+ text: segment.text
5105
+ } : {
5106
+ id: segment.id,
5107
+ text: segment.text,
5108
+ language
5109
+ };
5110
+ }),
5111
+ sourceMediaIds: [],
5112
+ phoneticScripts: [],
5113
+ speeches: [],
5114
+ captions: []
5115
+ });
5116
+ for (const r of Object.values(snapshot["derived-from-relations"])) if (snapshot["media-entities"][r.sourceId]) views.get(r.entityId)?.sourceMediaIds.push(r.sourceId);
5117
+ for (const [id, phonetic] of Object.entries(snapshot["phonetic-script-entities"])) {
5118
+ const { audioScriptId, segmentId, phonemeScript } = phonetic.phoneme;
5119
+ const { digest } = phonetic;
5120
+ const segment = segmentIndex(audioScriptId, segmentId);
5121
+ const text = snapshot.phoneticText[id]?.text;
5122
+ views.get(audioScriptId)?.phoneticScripts.push({
5123
+ id,
5124
+ ...segment === void 0 ? {} : { segment },
5125
+ ...text === void 0 ? {} : { text },
5126
+ ...phonemeScript === void 0 ? {} : { phonemeScript },
5127
+ ...digest === void 0 ? {} : { digest }
5128
+ });
5129
+ }
5130
+ const timbres = Object.values(snapshot["voice-timbre-relations"]);
5131
+ for (const track of resolveDslLayout(snapshot).tracks) for (const { clipId } of track.clips) {
5132
+ const source = snapshot["clip-entities"][clipId]?.source;
5133
+ if (!source) continue;
5134
+ if (snapshot["media-entities"][source]?.kind === "voiceover-recording") {
5135
+ const voices = timbres.filter((r) => r.recordingId === source).flatMap((r) => {
5136
+ const voice = snapshot["voice-entities"][r.voiceId];
5137
+ if (!voice) return [];
5138
+ return [voice.name === void 0 ? {
5139
+ voiceId: r.voiceId,
5140
+ key: voice.key
5141
+ } : {
5142
+ voiceId: r.voiceId,
5143
+ key: voice.key,
5144
+ name: voice.name
5145
+ }];
5146
+ });
5147
+ for (const spoken of spokenScripts(snapshot, source)) {
5148
+ const applied = appliedSpeech(snapshot, source, spoken);
5149
+ views.get(spoken.audioScriptId)?.speeches.push({
5150
+ clipId,
5151
+ recordingId: source,
5152
+ ...spoken.phoneticScriptId === void 0 ? {} : { phoneticScriptId: spoken.phoneticScriptId },
5153
+ voices,
5154
+ ...applied === void 0 ? {} : { applied }
5155
+ });
5156
+ }
5157
+ continue;
5158
+ }
5159
+ const caption = snapshot["caption-entities"][source];
5160
+ if (!caption?.selection || caption.text !== void 0 || !snapshot.captionText[source]) continue;
5161
+ const { audioScriptId, segmentId } = caption.selection;
5162
+ const segment = segmentIndex(audioScriptId, segmentId);
5163
+ if (segment !== void 0) views.get(audioScriptId)?.captions.push({
5164
+ clipId,
5165
+ captionId: source,
5166
+ segment
5167
+ });
5168
+ }
5169
+ return [...views.values()];
5170
+ }
5171
+ /**
5172
+ * Whether a recording still matches what it was synthesized from: the digest its derived-from
5173
+ * records against the source's file digest now. An AudioScript has no file, so a recording
5174
+ * derived from a script directly is not judged.
5175
+ */
5176
+ function appliedSpeech(snapshot, recordingId, spoken) {
5177
+ const sourceId = spoken.phoneticScriptId ?? spoken.audioScriptId;
5178
+ const recorded = Object.values(snapshot["derived-from-relations"]).find((r) => r.entityId === recordingId && r.sourceId === sourceId)?.sourceDigest;
5179
+ const current = spoken.phoneticScriptId === void 0 ? void 0 : snapshot["phonetic-script-entities"][sourceId]?.digest;
5180
+ return recorded === void 0 || current === void 0 ? void 0 : recorded === current;
5181
+ }
5182
+ //#endregion
5057
5183
  //#region src/dsl/voiceover-actions.ts
5058
5184
  function voiceoverPlan(s, input, result) {
5059
5185
  if (requireTrack(s, input.trackId).role !== "speech" || input.media.kind !== "voiceover-recording") throw new Error("Voiceover requires a speech Track and a recording");
@@ -5154,7 +5280,7 @@ function voiceoverPlan(s, input, result) {
5154
5280
  mutations.push(...placementMutations(s, result.clipId, input.placement));
5155
5281
  uniqueIds(result.captionClipIds);
5156
5282
  const retained = new Set(result.captionClipIds);
5157
- const oldCaptions = anchoredTo(s, new Set([result.clipId])).filter((id) => requireTrack(s, trackOf(s, id)).role === "caption");
5283
+ const oldCaptions = existing ? captionsShowing(s, existing.source) : [];
5158
5284
  mutations.push(...deleteClips(s, oldCaptions.filter((id) => !retained.has(id)), "cascade"));
5159
5285
  const placement = mutations.find((m) => m.type === "patch-entity" && m.table === "clip-entities" && m.id === result.clipId && "anchor" in m.patch);
5160
5286
  const anchor = placement?.type === "patch-entity" && placement.table === "clip-entities" ? placement.patch.anchor : void 0;
@@ -5225,6 +5351,33 @@ function voiceoverPlan(s, input, result) {
5225
5351
  });
5226
5352
  return mutations;
5227
5353
  }
5354
+ /**
5355
+ * Caption Clips showing what a recording says (D183): their Caption selects the run of the segment
5356
+ * the PhoneticScript it was spoken from is written for, or any segment of the script it was read
5357
+ * from directly.
5358
+ */
5359
+ function captionsShowing(s, recordingId) {
5360
+ const said = spokenScripts(s, recordingId).map(({ audioScriptId, phoneticScriptId }) => {
5361
+ if (phoneticScriptId === void 0) return { audioScriptId };
5362
+ const { segmentId } = s["phonetic-script-entities"][phoneticScriptId].phoneme;
5363
+ return {
5364
+ audioScriptId,
5365
+ segmentId,
5366
+ run: s.phoneticText[phoneticScriptId]
5367
+ };
5368
+ });
5369
+ return Object.entries(s["clip-entities"]).flatMap(([id, clip]) => {
5370
+ const selection = s["caption-entities"][clip.source]?.selection;
5371
+ const shown = s.captionText[clip.source];
5372
+ if (!selection) return [];
5373
+ return said.some((words) => {
5374
+ if (selection.audioScriptId !== words.audioScriptId) return false;
5375
+ if (!("segmentId" in words)) return true;
5376
+ if (selection.segmentId !== words.segmentId || !shown || !words.run) return false;
5377
+ return shown.start < words.run.end && words.run.start < shown.end;
5378
+ }) && requireTrack(s, trackOf(s, id)).role === "caption" ? [id] : [];
5379
+ });
5380
+ }
5228
5381
  //#endregion
5229
5382
  //#region src/dsl/dsl-editor.ts
5230
5383
  /** Business edits write DSL facts in one audited transaction; layout is derived on read. */
@@ -5743,132 +5896,6 @@ function createInitialMedeoDsl(options = {}) {
5743
5896
  }
5744
5897
  }
5745
5898
  //#endregion
5746
- //#region src/dsl/projection/audio-scripts.ts
5747
- /**
5748
- * The scripts a recording says. It follows derived-from from the recording; a PhoneticScript is a
5749
- * variant, so its words are the base its phoneme names, and derived-from is not followed past it.
5750
- * When nothing is found that way, a script read off the recording itself is what it says.
5751
- */
5752
- function spokenScripts(snapshot, recordingId) {
5753
- const relations = Object.values(snapshot["derived-from-relations"]);
5754
- const found = /* @__PURE__ */ new Map();
5755
- const seen = /* @__PURE__ */ new Set();
5756
- const visit = (id, phoneticScriptId) => {
5757
- if (seen.has(id)) return;
5758
- seen.add(id);
5759
- if (snapshot["audio-script-entities"][id]) {
5760
- if (!found.has(id)) found.set(id, phoneticScriptId);
5761
- return;
5762
- }
5763
- const phonetic = snapshot["phonetic-script-entities"][id];
5764
- if (phonetic) {
5765
- visit(phonetic.phoneme.audioScriptId, id);
5766
- return;
5767
- }
5768
- for (const r of relations) if (r.entityId === id) visit(r.sourceId, phoneticScriptId);
5769
- };
5770
- visit(recordingId);
5771
- if (!found.size) {
5772
- for (const r of relations) if (r.sourceId === recordingId && snapshot["audio-script-entities"][r.entityId]) found.set(r.entityId, void 0);
5773
- }
5774
- return [...found].map(([audioScriptId, phoneticScriptId]) => phoneticScriptId === void 0 ? { audioScriptId } : {
5775
- audioScriptId,
5776
- phoneticScriptId
5777
- });
5778
- }
5779
- /** Every AudioScript in the document with its PhoneticScripts, the Speech Clips saying it and the Caption Clips showing it. */
5780
- function toAudioScriptViews(snapshot) {
5781
- const views = /* @__PURE__ */ new Map();
5782
- const segmentIndex = (scriptId, segmentId) => {
5783
- const index = snapshot["audio-script-entities"][scriptId]?.segments.findIndex((s) => s.id === segmentId) ?? -1;
5784
- return index < 0 ? void 0 : index;
5785
- };
5786
- for (const [id, script] of Object.entries(snapshot["audio-script-entities"])) views.set(id, {
5787
- id,
5788
- segments: script.segments.map((segment) => {
5789
- const rich = snapshot.richText[segment.id];
5790
- const language = rich ? markedLanguage(langsFromDelta(rich.delta)) : void 0;
5791
- return language === void 0 ? {
5792
- id: segment.id,
5793
- text: segment.text
5794
- } : {
5795
- id: segment.id,
5796
- text: segment.text,
5797
- language
5798
- };
5799
- }),
5800
- sourceMediaIds: [],
5801
- phoneticScripts: [],
5802
- speeches: [],
5803
- captions: []
5804
- });
5805
- for (const r of Object.values(snapshot["derived-from-relations"])) if (snapshot["media-entities"][r.sourceId]) views.get(r.entityId)?.sourceMediaIds.push(r.sourceId);
5806
- for (const [id, phonetic] of Object.entries(snapshot["phonetic-script-entities"])) {
5807
- const { audioScriptId, segmentId, phonemeScript } = phonetic.phoneme;
5808
- const { digest } = phonetic;
5809
- const segment = segmentIndex(audioScriptId, segmentId);
5810
- const text = snapshot.phoneticText[id]?.text;
5811
- views.get(audioScriptId)?.phoneticScripts.push({
5812
- id,
5813
- ...segment === void 0 ? {} : { segment },
5814
- ...text === void 0 ? {} : { text },
5815
- ...phonemeScript === void 0 ? {} : { phonemeScript },
5816
- ...digest === void 0 ? {} : { digest }
5817
- });
5818
- }
5819
- const timbres = Object.values(snapshot["voice-timbre-relations"]);
5820
- for (const track of resolveDslLayout(snapshot).tracks) for (const { clipId } of track.clips) {
5821
- const source = snapshot["clip-entities"][clipId]?.source;
5822
- if (!source) continue;
5823
- if (snapshot["media-entities"][source]?.kind === "voiceover-recording") {
5824
- const voices = timbres.filter((r) => r.recordingId === source).flatMap((r) => {
5825
- const voice = snapshot["voice-entities"][r.voiceId];
5826
- if (!voice) return [];
5827
- return [voice.name === void 0 ? {
5828
- voiceId: r.voiceId,
5829
- key: voice.key
5830
- } : {
5831
- voiceId: r.voiceId,
5832
- key: voice.key,
5833
- name: voice.name
5834
- }];
5835
- });
5836
- for (const spoken of spokenScripts(snapshot, source)) {
5837
- const applied = appliedSpeech(snapshot, source, spoken);
5838
- views.get(spoken.audioScriptId)?.speeches.push({
5839
- clipId,
5840
- recordingId: source,
5841
- ...spoken.phoneticScriptId === void 0 ? {} : { phoneticScriptId: spoken.phoneticScriptId },
5842
- voices,
5843
- ...applied === void 0 ? {} : { applied }
5844
- });
5845
- }
5846
- continue;
5847
- }
5848
- const caption = snapshot["caption-entities"][source];
5849
- if (!caption?.selection || caption.text !== void 0 || !snapshot.captionText[source]) continue;
5850
- const { audioScriptId, segmentId } = caption.selection;
5851
- const segment = segmentIndex(audioScriptId, segmentId);
5852
- if (segment !== void 0) views.get(audioScriptId)?.captions.push({
5853
- clipId,
5854
- captionId: source,
5855
- segment
5856
- });
5857
- }
5858
- return [...views.values()];
5859
- }
5860
- /**
5861
- * Whether a recording still matches what it was synthesized from: the digest its derived-from
5862
- * records against the source's file digest now. An AudioScript has no file, so a recording
5863
- * derived from a script directly is not judged.
5864
- */
5865
- function appliedSpeech(snapshot, recordingId, spoken) {
5866
- const sourceId = spoken.phoneticScriptId ?? spoken.audioScriptId;
5867
- const recorded = Object.values(snapshot["derived-from-relations"]).find((r) => r.entityId === recordingId && r.sourceId === sourceId)?.sourceDigest;
5868
- const current = spoken.phoneticScriptId === void 0 ? void 0 : snapshot["phonetic-script-entities"][sourceId]?.digest;
5869
- return recorded === void 0 || current === void 0 ? void 0 : recorded === current;
5870
- }
5871
- //#endregion
5872
5899
  //#region src/dsl/projection/caption-style.ts
5873
5900
  const fields = {
5874
5901
  fontSize: "font_size",
@@ -6392,4 +6419,4 @@ function importedScript(id, text, mintSegment) {
6392
6419
  };
6393
6420
  }
6394
6421
  //#endregion
6395
- export { DslEditor as a, DslProjectionError as c, createInitialMedeoDsl as i, toVideoDraft as n, MedeoDsl as o, toAudioScriptViews as r, resolveDslLayout as s, fromVideoDraft as t };
6422
+ export { toAudioScriptViews as a, DslProjectionError as c, DslEditor as i, toVideoDraft as n, MedeoDsl as o, createInitialMedeoDsl as r, resolveDslLayout as s, fromVideoDraft as t };
package/dist/dsl.d.ts CHANGED
@@ -1,3 +1,3 @@
1
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-GqXnsOzA.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-C5wDKYqC.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-DSpKN_ta.js";
3
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
1
  import { _t as tupleHash, a as documentFormat, c as isInvalidAtomic, gt as resourceId, ht as relationId, i as assertDslDocument, mt as defaultIdFactory, o as medeoDslLoroShape, r as UnsupportedDocumentFormatError, s as captionContentCodec, t as DEFAULT_UNIT_TIME_MS, u as timeAnchorCodec } from "./video-draft-types-BnbfWrBx.js";
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-COyzz7Fp.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-Co3RI5F1.js";
3
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 };
@@ -738,7 +738,10 @@ interface ApplyVoiceoverInput {
738
738
  sourceDigest?: string;
739
739
  volume?: number;
740
740
  voice?: Voice;
741
- /** Complete generated caption set for this use. Other uses of the recording are untouched. */
741
+ /**
742
+ * Complete generated caption set for this use. It replaces the Caption Clips showing what the
743
+ * use's current take says: those whose Caption selects it (D183).
744
+ */
742
745
  captions: readonly VoiceoverCaptionInput[];
743
746
  }
744
747
  interface VoiceoverResult {
@@ -1,5 +1,5 @@
1
1
  import { G as ResourceSystem, R as MedeoDslSnapshot, rt as TrackRole } from "./video-draft-types-GqXnsOzA.js";
2
- import { b as MedeoDsl, h as UploadText, i as AudioScriptView, m as DslEditor, o as VideoDraftProjection } from "./index-C5wDKYqC.js";
2
+ import { b as MedeoDsl, h as UploadText, i as AudioScriptView, m as DslEditor, o as VideoDraftProjection } from "./index-DSpKN_ta.js";
3
3
  import { _ as ManualSyncTransport, a as MengineDocSessionOptions, g as ManualSyncDocOptions, n as DocumentSession, r as DocumentSessionUpdateEvent } from "./index-DAfOkcnZ.js";
4
4
 
5
5
  //#region src/manual-sync/manual-sync-doc.d.ts
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
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-GqXnsOzA.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-C5wDKYqC.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-DSpKN_ta.js";
3
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-DAfOkcnZ.js";
4
- import { n as MengineDocSessionUpdateEvent, r as ManualSyncDoc, t as MengineDocSession } from "./index-CHiPztZr.js";
4
+ import { n as MengineDocSessionUpdateEvent, r as ManualSyncDoc, t as MengineDocSession } from "./index-JWERGMrC.js";
5
5
  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 };
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
3
  import { _t as tupleHash, a as documentFormat, c as isInvalidAtomic, gt as resourceId, ht as relationId, i as assertDslDocument, mt as defaultIdFactory, o as medeoDslLoroShape, r as UnsupportedDocumentFormatError, s as captionContentCodec, t as DEFAULT_UNIT_TIME_MS, u as timeAnchorCodec } from "./video-draft-types-BnbfWrBx.js";
4
- 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-COyzz7Fp.js";
4
+ 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-Co3RI5F1.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/testing.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { i as VideoDraft } from "./video-draft-types-GqXnsOzA.js";
2
- import { b as MedeoDsl } from "./index-C5wDKYqC.js";
2
+ import { b as MedeoDsl } from "./index-DSpKN_ta.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
2
  import { a as documentFormat, i as assertDslDocument } from "./video-draft-types-BnbfWrBx.js";
3
- import { a as DslEditor, i as createInitialMedeoDsl, n as toVideoDraft, o as MedeoDsl } from "./dsl-COyzz7Fp.js";
3
+ import { i as DslEditor, n as toVideoDraft, o as MedeoDsl, r as createInitialMedeoDsl } from "./dsl-Co3RI5F1.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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mengine/medeo-client",
3
- "version": "2.1.1-dsl.10",
3
+ "version": "2.1.1-dsl.11",
4
4
  "license": "UNLICENSED",
5
5
  "repository": {
6
6
  "type": "git",
@@ -29,9 +29,9 @@
29
29
  "@noble/hashes": "^2.4.0",
30
30
  "immer": "^10.2.0",
31
31
  "zod": "^4.4.3",
32
- "@mengine/sync": "2.1.1-dsl.10",
33
- "@mengine/utils": "2.1.1-dsl.10",
34
- "@mengine/storage": "2.1.1-dsl.10"
32
+ "@mengine/storage": "2.1.1-dsl.11",
33
+ "@mengine/sync": "2.1.1-dsl.11",
34
+ "@mengine/utils": "2.1.1-dsl.11"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "^25.9.1",