@mengine/medeo-client 3.0.1-dsl.0 → 3.0.1-dsl.2

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.
@@ -7314,12 +7314,13 @@ function spokenScripts(snapshot, recordingId) {
7314
7314
  const found = /* @__PURE__ */ new Map();
7315
7315
  const seen = /* @__PURE__ */ new Set();
7316
7316
  const visit = (id, phoneticScriptId) => {
7317
- if (seen.has(id)) return;
7318
- seen.add(id);
7319
7317
  if (snapshot["audio-script-entities"][id]) {
7320
- if (!found.has(id)) found.set(id, phoneticScriptId);
7318
+ if (!found.has(id)) found.set(id, /* @__PURE__ */ new Set());
7319
+ if (phoneticScriptId !== void 0) found.get(id).add(phoneticScriptId);
7321
7320
  return;
7322
7321
  }
7322
+ if (seen.has(id)) return;
7323
+ seen.add(id);
7323
7324
  const phonetic = snapshot["phonetic-script-entities"][id];
7324
7325
  if (phonetic) {
7325
7326
  visit(phonetic.phoneme.audioScriptId, id);
@@ -7329,11 +7330,18 @@ function spokenScripts(snapshot, recordingId) {
7329
7330
  };
7330
7331
  visit(recordingId);
7331
7332
  if (!found.size) {
7332
- for (const r of relations) if (r.sourceId === recordingId && snapshot["audio-script-entities"][r.entityId]) found.set(r.entityId, void 0);
7333
+ for (const r of relations) if (r.sourceId === recordingId && snapshot["audio-script-entities"][r.entityId]) found.set(r.entityId, /* @__PURE__ */ new Set());
7333
7334
  }
7334
- return [...found].map(([audioScriptId, phoneticScriptId]) => phoneticScriptId === void 0 ? { audioScriptId } : {
7335
- audioScriptId,
7336
- phoneticScriptId
7335
+ return [...found].map(([audioScriptId, ids]) => {
7336
+ const phoneticScriptIds = [...ids];
7337
+ if (phoneticScriptIds.length === 1) return {
7338
+ audioScriptId,
7339
+ phoneticScriptId: phoneticScriptIds[0]
7340
+ };
7341
+ return phoneticScriptIds.length ? {
7342
+ audioScriptId,
7343
+ phoneticScriptIds
7344
+ } : { audioScriptId };
7337
7345
  });
7338
7346
  }
7339
7347
  /** Every AudioScript in the document with its PhoneticScripts, the Speech Clips saying it and the Caption Clips showing it. */
@@ -7378,7 +7386,6 @@ function toAudioScriptViews(snapshot) {
7378
7386
  });
7379
7387
  }
7380
7388
  const layout = resolveDslLayout(snapshot);
7381
- for (const view of views.values()) placeTranscript(snapshot, layout, view);
7382
7389
  const timbres = Object.values(snapshot["voice-timbre-relations"]);
7383
7390
  for (const track of layout.tracks) for (const { clipId } of track.clips) {
7384
7391
  const source = snapshot["clip-entities"][clipId]?.source;
@@ -7402,6 +7409,7 @@ function toAudioScriptViews(snapshot) {
7402
7409
  clipId,
7403
7410
  recordingId: source,
7404
7411
  ...spoken.phoneticScriptId === void 0 ? {} : { phoneticScriptId: spoken.phoneticScriptId },
7412
+ ...spoken.phoneticScriptIds === void 0 ? {} : { phoneticScriptIds: spoken.phoneticScriptIds },
7405
7413
  voices,
7406
7414
  ...applied === void 0 ? {} : { applied }
7407
7415
  });
@@ -7418,19 +7426,23 @@ function toAudioScriptViews(snapshot) {
7418
7426
  segment
7419
7427
  });
7420
7428
  }
7429
+ for (const view of views.values()) placeTranscript(snapshot, layout, view);
7421
7430
  return [...views.values()];
7422
7431
  }
7423
7432
  /**
7424
7433
  * A transcript's segments on the Timeline: a segment's time is in the medium the script was read
7425
- * off, so it lands where the earliest Clip playing that medium holds that moment in its window.
7434
+ * off. An authored Caption anchor identifies its use of that medium; otherwise the earliest
7435
+ * Clip holding that source moment is used. The source time is never taken from the Caption.
7426
7436
  */
7427
7437
  function placeTranscript(snapshot, layout, view) {
7428
7438
  if (!view.sourceMediaIds.length) return;
7429
7439
  const plays = layout.tracks.flatMap((track) => track.clips).filter((clip) => view.sourceMediaIds.includes(snapshot["clip-entities"][clip.clipId]?.source ?? "")).sort((a, b) => a.startMs - b.startMs);
7430
- for (const segment of view.segments) {
7440
+ for (const [index, segment] of view.segments.entries()) {
7431
7441
  const at = segment.startMs;
7432
7442
  if (at === void 0) continue;
7433
- const clip = plays.find((c) => c.inMs <= at && at < c.outMs);
7443
+ const anchoredUses = new Set(view.captions.filter((caption) => caption.segment === index).map((caption) => layout.clips[caption.clipId]?.anchorClipId));
7444
+ const candidates = plays.filter((c) => c.inMs <= at && at < c.outMs);
7445
+ const clip = candidates.find((c) => anchoredUses.has(c.clipId)) ?? candidates[0];
7434
7446
  if (clip) segment.timelineMs = Math.round(clip.startMs + (at - clip.inMs) / clip.rate);
7435
7447
  }
7436
7448
  }
@@ -7441,14 +7453,26 @@ function placeTranscript(snapshot, layout, view) {
7441
7453
  * not what a take was synthesized from (D190).
7442
7454
  */
7443
7455
  function appliedSpeech(snapshot, recordingId, spoken) {
7444
- const sourceId = spoken.phoneticScriptId ?? spoken.audioScriptId;
7445
- const recorded = Object.values(snapshot["derived-from-relations"]).find((r) => r.entityId === recordingId && r.sourceId === sourceId)?.sourceDigest;
7446
- const current = spoken.phoneticScriptId === void 0 ? void 0 : snapshot["phonetic-script-entities"][sourceId]?.digest;
7447
- return recorded === void 0 || current === void 0 ? void 0 : recorded === current;
7456
+ const ids = spoken.phoneticScriptIds ?? (spoken.phoneticScriptId === void 0 ? [] : [spoken.phoneticScriptId]);
7457
+ if (!ids.length) return void 0;
7458
+ let unknown = false;
7459
+ for (const sourceId of ids) {
7460
+ const recorded = Object.values(snapshot["derived-from-relations"]).find((r) => r.entityId === recordingId && r.sourceId === sourceId)?.sourceDigest;
7461
+ const current = snapshot["phonetic-script-entities"][sourceId]?.digest;
7462
+ if (recorded === void 0 || current === void 0) unknown = true;
7463
+ else if (recorded !== current) return false;
7464
+ }
7465
+ return unknown ? void 0 : true;
7448
7466
  }
7449
7467
  //#endregion
7450
7468
  //#region src/dsl/voiceover-actions.ts
7451
- function voiceoverPlan(s, input, result) {
7469
+ function matchesPlainPhoneticOrigin(s, id, scriptId, segmentId) {
7470
+ const phonetic = s["phonetic-script-entities"][id];
7471
+ const run = s.phoneticText[id];
7472
+ const segment = s["audio-script-entities"][scriptId]?.segments.find((item) => item.id === segmentId);
7473
+ return phonetic?.phoneme.audioScriptId === scriptId && phonetic.phoneme.segmentId === segmentId && phonetic.phoneme.phonemeScript === void 0 && run?.start === 0 && run.end === segment?.text.length;
7474
+ }
7475
+ function voiceoverPlan(s, input, result, plainPhoneticIds) {
7452
7476
  if (requireTrack(s, input.trackId).role !== "speech" || input.media.kind !== "voiceover-recording") throw new Error("Voiceover requires a speech Track and a recording");
7453
7477
  if (input.captions.length && (!input.captionTrackId || requireTrack(s, input.captionTrackId).role !== "caption")) throw new Error("Caption Track is required");
7454
7478
  const existing = s["clip-entities"][result.clipId];
@@ -7487,15 +7511,41 @@ function voiceoverPlan(s, input, result) {
7487
7511
  inMs: 0,
7488
7512
  outMs: input.media.durationMs
7489
7513
  }, input.media.durationMs);
7490
- mutations.push({
7514
+ if (phoneticScriptId !== void 0) mutations.push({
7491
7515
  type: "set-relation",
7492
7516
  table: "derived-from-relations",
7493
7517
  value: {
7494
7518
  entityId: result.mediaId,
7495
- sourceId: phoneticScriptId ?? result.audioScriptId,
7519
+ sourceId: phoneticScriptId,
7496
7520
  ...input.sourceDigest === void 0 ? {} : { sourceDigest: input.sourceDigest }
7497
7521
  }
7498
7522
  });
7523
+ else {
7524
+ if (input.sourceDigest !== void 0) throw new Error("A synthesis digest requires its PhoneticScript");
7525
+ if (plainPhoneticIds.length !== segmentIds.length) throw new Error("Expected one PhoneticScript id per plain segment");
7526
+ segmentIds.forEach((segmentId, i) => {
7527
+ const id = plainPhoneticIds[i];
7528
+ if (s["phonetic-script-entities"][id]) {
7529
+ if (!matchesPlainPhoneticOrigin(s, id, result.audioScriptId, segmentId)) throw new Error("PhoneticScript id already names another synthesis origin");
7530
+ } else mutations.push({
7531
+ type: "create-entity",
7532
+ table: "phonetic-script-entities",
7533
+ id,
7534
+ value: { phoneme: {
7535
+ audioScriptId: result.audioScriptId,
7536
+ segmentId
7537
+ } }
7538
+ });
7539
+ if (!Object.values(s["derived-from-relations"]).some((origin) => origin.entityId === result.mediaId && origin.sourceId === id)) mutations.push({
7540
+ type: "set-relation",
7541
+ table: "derived-from-relations",
7542
+ value: {
7543
+ entityId: result.mediaId,
7544
+ sourceId: id
7545
+ }
7546
+ });
7547
+ });
7548
+ }
7499
7549
  if (input.voice) {
7500
7550
  const id = resourceId("voice", input.voice.system, input.voice.key);
7501
7551
  mutations.push({
@@ -7992,10 +8042,20 @@ var DslEditor = class {
7992
8042
  captionClipIds: input.captions.map((c) => c.clipId ?? this.idFactory("clip")),
7993
8043
  captionIds: input.captions.map(() => this.idFactory("caption"))
7994
8044
  };
8045
+ const state = this.dsl.getSnapshot();
8046
+ const plainSegments = input.script.segments === void 0 ? state["audio-script-entities"][result.audioScriptId]?.segments.map((segment) => segment.id) ?? [] : result.segmentIds;
8047
+ const plainPhoneticIds = input.script.phoneticScriptId === void 0 ? plainSegments.map((segmentId) => {
8048
+ const origins = Object.values(state["derived-from-relations"]).filter((origin) => {
8049
+ if (origin.entityId !== result.mediaId) return false;
8050
+ return matchesPlainPhoneticOrigin(state, origin.sourceId, result.audioScriptId, segmentId);
8051
+ });
8052
+ if (origins.length > 1) throw new Error("Ambiguous plain recording origin");
8053
+ return origins[0]?.sourceId ?? this.idFactory("phonetic-script");
8054
+ }) : [];
7995
8055
  this.write("applyVoiceover", {
7996
8056
  input,
7997
8057
  result
7998
- }, voiceoverPlan(this.dsl.getSnapshot(), input, result), options);
8058
+ }, voiceoverPlan(state, input, result, plainPhoneticIds), options);
7999
8059
  return result;
8000
8060
  }
8001
8061
  voiceoverScriptId(script) {
@@ -8355,6 +8415,15 @@ function spokenText(snapshot, recordingId) {
8355
8415
  if (!first) return "";
8356
8416
  if (first.phoneticScriptId !== void 0) return snapshot.phoneticText[first.phoneticScriptId]?.text ?? "";
8357
8417
  const script = snapshot["audio-script-entities"][first.audioScriptId];
8418
+ if (first.phoneticScriptIds !== void 0 && script) {
8419
+ const ids = first.phoneticScriptIds;
8420
+ const selections = ids.map((id) => snapshot["phonetic-script-entities"][id]);
8421
+ if (!(ids.length === script.segments.length && script.segments.every((segment) => {
8422
+ const matching = ids.filter((id) => snapshot["phonetic-script-entities"][id]?.phoneme.segmentId === segment.id);
8423
+ const run = matching.length === 1 ? snapshot.phoneticText[matching[0]] : void 0;
8424
+ return run?.start === 0 && run.end === segment.text.length;
8425
+ })) || selections.some((selection) => selection.phoneme.phonemeScript !== void 0)) projectionError("ambiguous-script", `media-entities/${recordingId}`, "Multiple phonetic sources require complete plain selections of one script");
8426
+ }
8358
8427
  return script ? script.segments.map((segment) => segment.text).join("\n") : "";
8359
8428
  }
8360
8429
  //#endregion
@@ -8694,4 +8763,4 @@ function importedScript(id, text, mintSegment) {
8694
8763
  };
8695
8764
  }
8696
8765
  //#endregion
8697
- export { DslProjectionError as _, DslEditor as a, resourceId as b, UnsupportedDocumentFormatError as c, documentFormat as d, medeoDslLoroShape as f, resolveDslLayout as g, timeAnchorCodec as h, createInitialMedeoDsl as i, assertDslDocument as l, isInvalidAtomic as m, toVideoDraft as n, toAudioScriptViews as o, captionContentCodec as p, DEFAULT_UNIT_TIME_MS as r, MedeoDsl as s, fromVideoDraft as t, assertPhoneticBindingFormat as u, defaultIdFactory as v, tupleHash as x, relationId as y };
8766
+ export { tupleHash as S, resolveDslLayout as _, DslEditor as a, relationId as b, MedeoDsl as c, assertPhoneticBindingFormat as d, documentFormat as f, timeAnchorCodec as g, isInvalidAtomic as h, createInitialMedeoDsl as i, UnsupportedDocumentFormatError as l, captionContentCodec as m, toVideoDraft as n, spokenScripts as o, medeoDslLoroShape as p, DEFAULT_UNIT_TIME_MS as r, toAudioScriptViews as s, fromVideoDraft as t, assertDslDocument as u, DslProjectionError as v, resourceId as x, defaultIdFactory as y };
package/dist/dsl.d.ts CHANGED
@@ -1,2 +1,2 @@
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
- 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 };
1
+ import { $ as MoveDslClipsInput, A as ApplyVoiceoverInput, At as RelationValues, B as InvalidAtomic, Bt as Track, C as DslClipLayout, Ct as EntityValues, D as createInitialMedeoDsl, Dt as RelationMutation, E as DslTrackLayout, Et as Media, F as DslAudit, Ft as TextEdit, G as MedeoDslLoroState, H as isInvalidAtomic, Ht as Voice, I as DslTransaction, It as TextMark, J as OpActor, K as medeoDslLoroShape, L as UnsupportedDocumentFormatError, Lt as TextMutation, M as VoiceoverResult, Mt as RichTextSnapshot, N as CreateMedeoDslOptions, Nt as StoredFile, O as DslEditor, Ot as RelationTable, P as MedeoDsl, Pt as TextDelta, Q as DslClipUpdate, R as assertDslDocument, Rt as TextRun, S as resolveDslLayout, St as EntityTables, T as DslProjectionError, Tt as MedeoDslSnapshot, U as timeAnchorCodec, V as captionContentCodec, Vt as TrackRole, W as MedeoDslDraft, X as AddDslClipsInput, Y as AddDslClip, Z as ClipSource, _ as VideoDraftInput, _t as DeepReadonly, a as SpokenScript, at as relationId, b as VideoDraftTrack, bt as EntityMutation, c as VideoDraftProjection, ct as AudioScript, d as DEFAULT_UNIT_TIME_MS, dt as CaptionSelection, et as ReplaceDslClipsInput, f as VideoCreationSettings, ft as CaptionStyle, g as VideoDraftContentPartUnion, gt as ContainNode, h as VideoDraftContent, ht as ContainMutation, i as AudioScriptView, it as defaultIdFactory, j as VoiceoverCaptionInput, jt as ResourceSystem, k as UploadText, kt as RelationTables, l as toVideoDraft, lt as Caption, m as VideoDraftCaptionStyle, mt as Clip, n as ImportedVideoDraft, nt as DslIdFactory, o as spokenScripts, ot as resourceId, p as VideoDraft, pt as CaptionText, q as CommitOptions, r as fromVideoDraft, rt as EntityIdKind, s as toAudioScriptViews, st as tupleHash, t as FromVideoDraftOptions, tt as ClipPlacement, u as CaptionDisplayCue, ut as CaptionContent, v as VideoDraftPartUnion, vt as DslDiagnostic, w as DslLayout, wt as FieldPatch, x as VideoDraftTrackItem, xt as EntityTable, y as VideoDraftTimeline, yt as DslMutation, z as documentFormat, zt as TimeAnchor } from "./index-D1EvUTdG.js";
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 SpokenScript, 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, spokenScripts, timeAnchorCodec, toAudioScriptViews, toVideoDraft, tupleHash };
package/dist/dsl.js CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as DslProjectionError, a as DslEditor, b as resourceId, c as UnsupportedDocumentFormatError, d as documentFormat, f as medeoDslLoroShape, g as resolveDslLayout, h as timeAnchorCodec, i as createInitialMedeoDsl, l as assertDslDocument, m as isInvalidAtomic, n as toVideoDraft, o as toAudioScriptViews, p as captionContentCodec, r as DEFAULT_UNIT_TIME_MS, s as MedeoDsl, t as fromVideoDraft, v as defaultIdFactory, x as tupleHash, y as relationId } from "./dsl-BngbR2zr.js";
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
+ import { S as tupleHash, _ as resolveDslLayout, a as DslEditor, b as relationId, c as MedeoDsl, f as documentFormat, g as timeAnchorCodec, h as isInvalidAtomic, i as createInitialMedeoDsl, l as UnsupportedDocumentFormatError, m as captionContentCodec, n as toVideoDraft, o as spokenScripts, p as medeoDslLoroShape, r as DEFAULT_UNIT_TIME_MS, s as toAudioScriptViews, t as fromVideoDraft, u as assertDslDocument, v as DslProjectionError, x as resourceId, y as defaultIdFactory } from "./dsl-B5vCSVnA.js";
2
+ export { DEFAULT_UNIT_TIME_MS, DslEditor, DslProjectionError, MedeoDsl, UnsupportedDocumentFormatError, assertDslDocument, captionContentCodec, createInitialMedeoDsl, defaultIdFactory, documentFormat, fromVideoDraft, isInvalidAtomic, medeoDslLoroShape, relationId, resolveDslLayout, resourceId, spokenScripts, timeAnchorCodec, toAudioScriptViews, toVideoDraft, tupleHash };
@@ -1068,9 +1068,9 @@ interface ApplyVoiceoverInput {
1068
1068
  kind: 'voiceover-recording';
1069
1069
  };
1070
1070
  /**
1071
- * What the recording says: an existing AudioScript, a new one of these `segments`, or a
1072
- * PhoneticScript it was spoken from. A recording spoken from a PhoneticScript is derived-from it,
1073
- * and its captions select segments of that variant's base script.
1071
+ * What the recording says: a PhoneticScript it was spoken from, or plain words from an existing
1072
+ * or new AudioScript. Plain words get selection-only PhoneticScripts (D190), one per segment;
1073
+ * no control content, file or digest is invented. Captions keep selecting the base script.
1074
1074
  */
1075
1075
  script: {
1076
1076
  audioScriptId: string;
@@ -1777,6 +1777,13 @@ interface VideoDraftProjection {
1777
1777
  declare function toVideoDraft(snapshot: MedeoDslSnapshot): VideoDraftProjection;
1778
1778
  //#endregion
1779
1779
  //#region src/dsl/projection/audio-scripts.d.ts
1780
+ /** The script a recording says and its phonetic origins; old direct script origins remain readable. */
1781
+ interface SpokenScript {
1782
+ audioScriptId: string;
1783
+ phoneticScriptId?: string;
1784
+ /** Several plain selections of the same script; the singular summary is omitted. */
1785
+ phoneticScriptIds?: string[];
1786
+ }
1780
1787
  /**
1781
1788
  * An AudioScript with everything that says or shows it, read from the same snapshot as the
1782
1789
  * VideoDraft. Speeches and captions come in playback order.
@@ -1812,8 +1819,9 @@ interface AudioScriptView {
1812
1819
  /** Speech Clips playing a recording of these words. */
1813
1820
  speeches: {
1814
1821
  clipId: string;
1815
- recordingId: string; /** The PhoneticScript the recording was spoken from; absent when it derives from the script directly. */
1816
- phoneticScriptId?: string;
1822
+ recordingId: string; /** Its single phonetic origin; omitted for multiple origins or an old direct script origin. */
1823
+ phoneticScriptId?: string; /** Multiple segment selections used by one recording, without duplicating its Clip. */
1824
+ phoneticScriptIds?: string[];
1817
1825
  voices: {
1818
1826
  voiceId: string;
1819
1827
  key: string;
@@ -1832,6 +1840,12 @@ interface AudioScriptView {
1832
1840
  segment: number;
1833
1841
  }[];
1834
1842
  }
1843
+ /**
1844
+ * The scripts a recording says. It follows derived-from from the recording; a PhoneticScript is a
1845
+ * variant, so its words are the base its phoneme names, and derived-from is not followed past it.
1846
+ * When nothing is found that way, a script read off the recording itself is what it says.
1847
+ */
1848
+ declare function spokenScripts(snapshot: MedeoDslSnapshot, recordingId: string): SpokenScript[];
1835
1849
  /** Every AudioScript in the document with its PhoneticScripts, the Speech Clips saying it and the Caption Clips showing it. */
1836
1850
  declare function toAudioScriptViews(snapshot: MedeoDslSnapshot): AudioScriptView[];
1837
1851
  //#endregion
@@ -1848,4 +1862,4 @@ interface ImportedVideoDraft {
1848
1862
  /** One-time import into a newly owned document; never reverse-diff a live collaborative document. */
1849
1863
  declare function fromVideoDraft(input: VideoDraftInput, options: FromVideoDraftOptions): ImportedVideoDraft;
1850
1864
  //#endregion
1851
- export { ClipPlacement as $, VoiceoverResult as A, RichTextSnapshot as At, isInvalidAtomic as B, Voice as Bt, DslProjectionError as C, MedeoDslSnapshot as Ct, UploadText as D, RelationTables as Dt, DslEditor as E, RelationTable as Et, UnsupportedDocumentFormatError as F, TextMutation as Ft, CommitOptions as G, MedeoDslDraft as H, assertDslDocument as I, TextRun as It, AddDslClipsInput as J, OpActor as K, documentFormat as L, TimeAnchor as Lt, MedeoDsl as M, TextDelta as Mt, DslAudit as N, TextEdit as Nt, ApplyVoiceoverInput as O, RelationValues as Ot, DslTransaction as P, TextMark as Pt, ReplaceDslClipsInput as Q, InvalidAtomic as R, Track$1 as Rt, DslLayout as S, FieldPatch as St, createInitialMedeoDsl as T, RelationMutation as Tt, MedeoDslLoroState as U, timeAnchorCodec as V, medeoDslLoroShape as W, DslClipUpdate as X, ClipSource as Y, MoveDslClipsInput as Z, VideoDraftTimeline as _, DslMutation as _t, toAudioScriptViews as a, tupleHash as at, resolveDslLayout as b, EntityTables as bt, CaptionDisplayCue as c, CaptionContent as ct, VideoDraft as d, CaptionText as dt, DslIdFactory as et, VideoDraftCaptionStyle as f, Clip as ft, VideoDraftPartUnion as g, DslDiagnostic as gt, VideoDraftInput as h, DeepReadonly as ht, AudioScriptView as i, resourceId as it, CreateMedeoDslOptions as j, StoredFile as jt, VoiceoverCaptionInput as k, ResourceSystem as kt, DEFAULT_UNIT_TIME_MS as l, CaptionSelection as lt, VideoDraftContentPartUnion as m, ContainNode as mt, ImportedVideoDraft as n, defaultIdFactory as nt, VideoDraftProjection as o, AudioScript as ot, VideoDraftContent as p, ContainMutation as pt, AddDslClip as q, fromVideoDraft as r, relationId as rt, toVideoDraft as s, Caption as st, FromVideoDraftOptions as t, EntityIdKind as tt, VideoCreationSettings as u, CaptionStyle$1 as ut, VideoDraftTrack as v, EntityMutation as vt, DslTrackLayout as w, Media as wt, DslClipLayout as x, EntityValues as xt, VideoDraftTrackItem as y, EntityTable as yt, captionContentCodec as z, TrackRole as zt };
1865
+ export { MoveDslClipsInput as $, ApplyVoiceoverInput as A, RelationValues as At, InvalidAtomic as B, Track$1 as Bt, DslClipLayout as C, EntityValues as Ct, createInitialMedeoDsl as D, RelationMutation as Dt, DslTrackLayout as E, Media as Et, DslAudit as F, TextEdit as Ft, MedeoDslLoroState as G, isInvalidAtomic as H, Voice as Ht, DslTransaction as I, TextMark as It, OpActor as J, medeoDslLoroShape as K, UnsupportedDocumentFormatError as L, TextMutation as Lt, VoiceoverResult as M, RichTextSnapshot as Mt, CreateMedeoDslOptions as N, StoredFile as Nt, DslEditor as O, RelationTable as Ot, MedeoDsl as P, TextDelta as Pt, DslClipUpdate as Q, assertDslDocument as R, TextRun as Rt, resolveDslLayout as S, EntityTables as St, DslProjectionError as T, MedeoDslSnapshot as Tt, timeAnchorCodec as U, captionContentCodec as V, TrackRole as Vt, MedeoDslDraft as W, AddDslClipsInput as X, AddDslClip as Y, ClipSource as Z, VideoDraftInput as _, DeepReadonly as _t, SpokenScript as a, relationId as at, VideoDraftTrack as b, EntityMutation as bt, VideoDraftProjection as c, AudioScript as ct, DEFAULT_UNIT_TIME_MS as d, CaptionSelection as dt, ReplaceDslClipsInput as et, VideoCreationSettings as f, CaptionStyle$1 as ft, VideoDraftContentPartUnion as g, ContainNode as gt, VideoDraftContent as h, ContainMutation as ht, AudioScriptView as i, defaultIdFactory as it, VoiceoverCaptionInput as j, ResourceSystem as jt, UploadText as k, RelationTables as kt, toVideoDraft as l, Caption as lt, VideoDraftCaptionStyle as m, Clip as mt, ImportedVideoDraft as n, DslIdFactory as nt, spokenScripts as o, resourceId as ot, VideoDraft as p, CaptionText as pt, CommitOptions as q, fromVideoDraft as r, EntityIdKind as rt, toAudioScriptViews as s, tupleHash as st, FromVideoDraftOptions as t, ClipPlacement as tt, CaptionDisplayCue as u, CaptionContent as ut, VideoDraftPartUnion as v, DslDiagnostic as vt, DslLayout as w, FieldPatch as wt, VideoDraftTrackItem as x, EntityTable as xt, VideoDraftTimeline as y, DslMutation as yt, documentFormat as z, TimeAnchor as zt };
@@ -1,4 +1,4 @@
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";
1
+ import { O as DslEditor, P as MedeoDsl, Tt as MedeoDslSnapshot, Vt as TrackRole, c as VideoDraftProjection, h as VideoDraftContent, i as AudioScriptView, jt as ResourceSystem, k as UploadText, q as CommitOptions, vt as DslDiagnostic } from "./index-D1EvUTdG.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";
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
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";
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 };
1
+ import { $ as MoveDslClipsInput, A as ApplyVoiceoverInput, At as RelationValues, B as InvalidAtomic, Bt as Track, C as DslClipLayout, Ct as EntityValues, D as createInitialMedeoDsl, Dt as RelationMutation, E as DslTrackLayout, Et as Media, F as DslAudit, Ft as TextEdit, G as MedeoDslLoroState, H as isInvalidAtomic, Ht as Voice, I as DslTransaction, It as TextMark, J as OpActor, K as medeoDslLoroShape, L as UnsupportedDocumentFormatError, Lt as TextMutation, M as VoiceoverResult, Mt as RichTextSnapshot, N as CreateMedeoDslOptions, Nt as StoredFile, O as DslEditor, Ot as RelationTable, P as MedeoDsl, Pt as TextDelta, Q as DslClipUpdate, R as assertDslDocument, Rt as TextRun, S as resolveDslLayout, St as EntityTables, T as DslProjectionError, Tt as MedeoDslSnapshot, U as timeAnchorCodec, V as captionContentCodec, Vt as TrackRole, W as MedeoDslDraft, X as AddDslClipsInput, Y as AddDslClip, Z as ClipSource, _ as VideoDraftInput, _t as DeepReadonly, a as SpokenScript, at as relationId, b as VideoDraftTrack, bt as EntityMutation, c as VideoDraftProjection, ct as AudioScript, d as DEFAULT_UNIT_TIME_MS, dt as CaptionSelection, et as ReplaceDslClipsInput, f as VideoCreationSettings, ft as CaptionStyle, g as VideoDraftContentPartUnion, gt as ContainNode, h as VideoDraftContent, ht as ContainMutation, i as AudioScriptView, it as defaultIdFactory, j as VoiceoverCaptionInput, jt as ResourceSystem, k as UploadText, kt as RelationTables, l as toVideoDraft, lt as Caption, m as VideoDraftCaptionStyle, mt as Clip, n as ImportedVideoDraft, nt as DslIdFactory, o as spokenScripts, ot as resourceId, p as VideoDraft, pt as CaptionText, q as CommitOptions, r as fromVideoDraft, rt as EntityIdKind, s as toAudioScriptViews, st as tupleHash, t as FromVideoDraftOptions, tt as ClipPlacement, u as CaptionDisplayCue, ut as CaptionContent, v as VideoDraftPartUnion, vt as DslDiagnostic, w as DslLayout, wt as FieldPatch, x as VideoDraftTrackItem, xt as EntityTable, y as VideoDraftTimeline, yt as DslMutation, z as documentFormat, zt as TimeAnchor } from "./index-D1EvUTdG.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-iEPbMfoP.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 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 SpokenScript, 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, spokenScripts, timeAnchorCodec, toAudioScriptViews, toVideoDraft, tupleHash };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { n as bytesToBase64, t as base64ToBytes } from "./base64-D-jd-dr5.js";
2
- import { _ as DslProjectionError, a as DslEditor, b as resourceId, c as UnsupportedDocumentFormatError, d as documentFormat, f as medeoDslLoroShape, g as resolveDslLayout, h as timeAnchorCodec, i as createInitialMedeoDsl, l as assertDslDocument, m as isInvalidAtomic, n as toVideoDraft, o as toAudioScriptViews, p as captionContentCodec, r as DEFAULT_UNIT_TIME_MS, s as MedeoDsl, t as fromVideoDraft, v as defaultIdFactory, x as tupleHash, y as relationId } from "./dsl-BngbR2zr.js";
2
+ import { S as tupleHash, _ as resolveDslLayout, a as DslEditor, b as relationId, c as MedeoDsl, f as documentFormat, g as timeAnchorCodec, h as isInvalidAtomic, i as createInitialMedeoDsl, l as UnsupportedDocumentFormatError, m as captionContentCodec, n as toVideoDraft, o as spokenScripts, p as medeoDslLoroShape, r as DEFAULT_UNIT_TIME_MS, s as toAudioScriptViews, t as fromVideoDraft, u as assertDslDocument, v as DslProjectionError, x as resourceId, y as defaultIdFactory } from "./dsl-B5vCSVnA.js";
3
3
  import { LoroDoc, UndoManager, VersionVector, decodeImportBlobMeta } from "loro-crdt";
4
4
  import { ClientServerSynchronizer, DocManager } from "@mengine/sync";
5
5
  import { DisposableSet, EventBus, Task } from "@mengine/utils";
@@ -1472,4 +1472,4 @@ var MengineDocSession = class extends DocumentSession {
1472
1472
  }
1473
1473
  };
1474
1474
  //#endregion
1475
- export { DEFAULT_UNIT_TIME_MS, DslEditor, DslProjectionError, ManualSyncDoc, MedeoDsl, MedeoHttpDocStorage, MemoryDocStorage, MengineAckFailedError, MengineDocSession, MengineHttpClient, MengineHttpRequestError, MenginePushRejectedError, UnsupportedDocumentFormatError, assertDslDocument, base64ToBytes, bytesToBase64, captionContentCodec, createInitialMedeoDsl, decodeDocVersionMark, defaultIdFactory, documentFormat, encodeDocVersionMark, fromVideoDraft, isInvalidAtomic, medeoDslLoroShape, readMengineEventStream, relationId, resolveDslLayout, resourceId, timeAnchorCodec, toAudioScriptViews, toVideoDraft, tupleHash };
1475
+ export { DEFAULT_UNIT_TIME_MS, DslEditor, DslProjectionError, ManualSyncDoc, MedeoDsl, MedeoHttpDocStorage, MemoryDocStorage, MengineAckFailedError, MengineDocSession, MengineHttpClient, MengineHttpRequestError, MenginePushRejectedError, UnsupportedDocumentFormatError, assertDslDocument, base64ToBytes, bytesToBase64, captionContentCodec, createInitialMedeoDsl, decodeDocVersionMark, defaultIdFactory, documentFormat, encodeDocVersionMark, fromVideoDraft, isInvalidAtomic, medeoDslLoroShape, readMengineEventStream, relationId, resolveDslLayout, resourceId, spokenScripts, timeAnchorCodec, toAudioScriptViews, toVideoDraft, tupleHash };
package/dist/testing.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { M as MedeoDsl, d as VideoDraft } from "./index-B1Lqm_Z1.js";
1
+ import { P as MedeoDsl, p as VideoDraft } from "./index-D1EvUTdG.js";
2
2
  import { LoroDoc } from "loro-crdt";
3
3
 
4
4
  //#region src/testing/in-memory-mengine-server.d.ts
package/dist/testing.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { n as bytesToBase64, t as base64ToBytes } from "./base64-D-jd-dr5.js";
2
- import { _ as DslProjectionError, a as DslEditor, d as documentFormat, i as createInitialMedeoDsl, l as assertDslDocument, n as toVideoDraft, s as MedeoDsl, u as assertPhoneticBindingFormat } from "./dsl-BngbR2zr.js";
2
+ import { a as DslEditor, c as MedeoDsl, d as assertPhoneticBindingFormat, f as documentFormat, i as createInitialMedeoDsl, n as toVideoDraft, u as assertDslDocument, v as DslProjectionError } from "./dsl-B5vCSVnA.js";
3
3
  import { t as classifyUpdate } from "./loro-relay-doc-Bi6JKqtQ.js";
4
4
  import { LoroDoc, VersionVector, encodeFrontiers } from "loro-crdt";
5
5
  //#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": "3.0.1-dsl.0",
3
+ "version": "3.0.1-dsl.2",
4
4
  "license": "UNLICENSED",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,9 +27,9 @@
27
27
  "dependencies": {
28
28
  "@noble/hashes": "^2.4.0",
29
29
  "zod": "^4.4.3",
30
- "@mengine/storage": "3.0.1-dsl.0",
31
- "@mengine/utils": "3.0.1-dsl.0",
32
- "@mengine/sync": "3.0.1-dsl.0"
30
+ "@mengine/storage": "3.0.1-dsl.2",
31
+ "@mengine/sync": "3.0.1-dsl.2",
32
+ "@mengine/utils": "3.0.1-dsl.2"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/node": "^25.9.1",
@@ -40,8 +40,8 @@
40
40
  "typescript": "^6.0.3",
41
41
  "vite-plugin-wasm": "^3.6.0",
42
42
  "vite-plus": "^0.1.23",
43
- "@mengine/idl-codegen": "0.0.0",
44
- "@mengine/medeo-dsl": "0.0.0"
43
+ "@mengine/medeo-dsl": "0.0.0",
44
+ "@mengine/idl-codegen": "0.0.0"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "loro-crdt": "^1.16.1"