@mengine/medeo-client 2.0.1-alpha.22 → 2.0.1-alpha.23

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as index_d_exports } from "./index-CMa6ZCtX.js";
2
- import { $ as SpeechHostMap, A as assertValidVideoDocument, At as VideoDocumentValidationIssueCode, B as EntityRow, Bt as SpeedShift, C as isImplementedSemanticOpKind, Ct as Timeline, D as PartIdFactory, Dt as VideoClipPart, E as ValidationError, Et as TrackItemTimePosition, F as ResolvedEntityTrack, Ft as speedOf, G as SequenceDuration, H as CaptionSegmentSelection, Ht as Track$1, I as resolveEntityTimelineLayout, It as Attachment, J as JsonObject, K as SequenceRange, L as projectEntityTimeline, Lt as CaptionPart$1, M as EntityTimelineTrackRole, Mt as VideoDraftContent, N as ResolvedEntityClipPlacement, Nt as VideoDraftPartUnion, O as generatePartId, Ot as VideoDocument, P as ResolvedEntityTimelineLayout, Pt as effectiveVideoClipDurationMs, Q as DerivedItemPosition, R as EntityTimelineProjectionError, Rt as CaptionStyle, S as SemanticOpKind, St as SpeechPart, T as SnapshotReadable, Tt as TrackItem, U as CaptionStyleFields, Ut as TrackItem$1, V as RelationRow, Vt as Timeline$1, W as ScriptTextSegment, X as EntityId, Y as JsonValue, Z as buildInitialVideoDocument, _ as SemanticOpName, _t as CaptionDisplayCue, a as PlainMemoryAdapter, at as LaneKind, b as ImplementedSemanticOpKind, bt as PartKind, c as MirrorVideoDocumentAdapter, ct as findLaneTrack, d as createMirrorVideoDocumentAdapter, dt as TrackDraft, et as buildSpeechHostMap, f as CommitOptions, ft as TrackItemDraft, g as SemanticOpInput, gt as BgmPart, h as SemanticEditor, ht as videoDocumentMirrorSchema, i as JournalEntry, it as LANE_KINDS_IN_STACK_ORDER, j as validateVideoDocument, jt as VideoDraft, k as VideoDocumentValidationError, kt as VideoDocumentValidationIssue, l as MirrorVideoDocumentOptions, lt as laneTrackId, m as SemanticDocumentAdapter, mt as VideoDocumentMirrorSchema, n as videoDocumentSchema, nt as fromVideoDocument, o as PlainMemoryAdapterOptions, ot as SolvedVideoDocument, p as OpActor, pt as VideoDocumentDraft, q as VoiceDescriptor, r as readVideoDocumentFromDraft, rt as toVideoDocument, s as createPlainMemoryAdapter, st as ensureLaneTrack, t as partUnionSchema, tt as derivePositionFromAbs, u as createMirrorVideoDocument, ut as solveVideoDocument, v as TransactAudit, vt as CaptionPart, w as SchemaValidator, wt as Track, x as PlannedSemanticOpKind, xt as PartUnion, y as IMPLEMENTED_SEMANTIC_OP_KINDS, yt as DEFAULT_UNIT_TIME_MS, z as EntityRelationRows, zt as PartAggregation } from "./index-C0uUWqkz.js";
2
+ import { $ as DerivedItemPosition, A as assertValidVideoDocument, At as VideoDocument, B as EntityRelationRows, Bt as CaptionStyle, C as isImplementedSemanticOpKind, Ct as SpeechOriginAssetSystem, D as PartIdFactory, Dt as TrackItem, E as ValidationError, Et as Track, F as ResolvedEntityTrack, Ft as VideoDraftPartUnion, G as ScriptTextSegment, Gt as TrackItem$1, H as RelationRow, Ht as SpeedShift, I as resolveEntityTimelineLayout, It as effectiveVideoClipDurationMs, J as VoiceDescriptor, K as SequenceDuration, L as EntityTimelineProjectionDocument, Lt as speedOf, M as EntityTimelineTrackRole, Mt as VideoDocumentValidationIssueCode, N as ResolvedEntityClipPlacement, Nt as VideoDraft, O as generatePartId, Ot as TrackItemTimePosition, P as ResolvedEntityTimelineLayout, Pt as VideoDraftContent, Q as buildInitialVideoDocument, R as projectEntityTimeline, Rt as Attachment, S as SemanticOpKind, St as PartUnion, T as SnapshotReadable, Tt as Timeline, U as CaptionSegmentSelection, Ut as Timeline$1, V as EntityRow, Vt as PartAggregation, W as CaptionStyleFields, Wt as Track$1, X as JsonValue, Y as JsonObject, Z as EntityId, _ as SemanticOpName, _t as BgmPart, a as PlainMemoryAdapter, at as LANE_KINDS_IN_STACK_ORDER, b as ImplementedSemanticOpKind, bt as DEFAULT_UNIT_TIME_MS, c as MirrorVideoDocumentAdapter, ct as ensureLaneTrack, d as createMirrorVideoDocumentAdapter, dt as solveVideoDocument, et as SpeechHostMap, f as CommitOptions, ft as TrackDraft, g as SemanticOpInput, gt as videoDocumentMirrorSchema, h as SemanticEditor, ht as VideoDocumentMirrorSchema, i as JournalEntry, it as toVideoDocument, j as validateVideoDocument, jt as VideoDocumentValidationIssue, k as VideoDocumentValidationError, kt as VideoClipPart, l as MirrorVideoDocumentOptions, lt as findLaneTrack, m as SemanticDocumentAdapter, mt as VideoDocumentDraft, n as videoDocumentSchema, nt as derivePositionFromAbs, o as PlainMemoryAdapterOptions, ot as LaneKind, p as OpActor, pt as TrackItemDraft, q as SequenceRange, r as readVideoDocumentFromDraft, rt as fromVideoDocument, s as createPlainMemoryAdapter, st as SolvedVideoDocument, t as partUnionSchema, tt as buildSpeechHostMap, u as createMirrorVideoDocument, ut as laneTrackId, v as TransactAudit, vt as CaptionDisplayCue, w as SchemaValidator, wt as SpeechPart, x as PlannedSemanticOpKind, xt as PartKind, y as IMPLEMENTED_SEMANTIC_OP_KINDS, yt as CaptionPart, z as EntityTimelineProjectionError, zt as CaptionPart$1 } from "./index-mGObzOh4.js";
3
3
  import { LoroDoc, PeerID } from "loro-crdt";
4
4
  import { DocState } from "@mengine/sync";
5
5
  import { BaseDocStorage, Connection, DocDiff, DocPushReceipt, DocSnapshotRecord, DocStorage, DocStorageOptions, DocUpdate, DocUpdateRecord } from "@mengine/storage";
@@ -583,11 +583,10 @@ declare class EntityTimelineEditor {
583
583
  private ensureRoleTrack;
584
584
  /** The existing pronunciation variant a voiceover consumes; composition is required. */
585
585
  private requireComposedPhoneticScript;
586
- /** Preserve the factual synthesis input, regardless of persisted endpoint positions. */
586
+ /** Preserve the factual synthesis input as `[rendered Audio, PhoneticScript]`. */
587
587
  private ensurePhoneticRender;
588
588
  private reconcileVoiceoverCaptions;
589
589
  private ensureRoleTrackForClip;
590
- private replaceCaptionAlignment;
591
590
  /**
592
591
  * Remove one placed Caption use. The composed AudioScript outlives the
593
592
  * caption: it may anchor further captions and remains the text owner.
@@ -608,6 +607,35 @@ declare class EntityTimelineEditor {
608
607
  private mintRelationId;
609
608
  }
610
609
  //#endregion
610
+ //#region src/entity-editor/revise-audio-script.d.ts
611
+ interface ReviseAudioScriptInput {
612
+ readonly editId: string;
613
+ readonly sourceAudioScriptEntityId: string;
614
+ readonly edits: readonly {
615
+ readonly segmentId: string;
616
+ readonly text: string;
617
+ }[];
618
+ readonly captionUsages?: readonly {
619
+ readonly clipEntityId: string;
620
+ readonly captionEntityId: string;
621
+ readonly markerEntityId: string;
622
+ readonly selection?: CaptionSegmentSelection;
623
+ }[];
624
+ }
625
+ interface ReviseAudioScriptResult {
626
+ readonly rows: EntityRelationRows;
627
+ readonly audioScriptEntityId: string;
628
+ readonly captionUsages: readonly {
629
+ readonly clipEntityId: string;
630
+ readonly previousCaptionEntityId: string;
631
+ readonly captionEntityId: string;
632
+ readonly markerEntityId: string;
633
+ }[];
634
+ readonly changed: boolean;
635
+ }
636
+ /** Revise text as an independent authored document, never as a version-family mutation. */
637
+ declare function reviseAudioScript(rows: EntityRelationRows, input: ReviseAudioScriptInput): ReviseAudioScriptResult;
638
+ //#endregion
611
639
  //#region src/entity-editor/editor-resources.d.ts
612
640
  declare const roleOrder: {
613
641
  readonly caption: 0;
@@ -746,6 +774,12 @@ interface EntityDocumentState {
746
774
  readonly rows: EntityRelationRows;
747
775
  readonly project: Readonly<Record<string, string>>;
748
776
  }
777
+ /** One stable native relation root, including records tombstoned from the active projection. */
778
+ interface EntityRelationRecord extends RelationRow {
779
+ readonly deleted: boolean;
780
+ }
781
+ /** Read persisted relation roots before current entity versions are projected. */
782
+ declare function readEntityRelationRecords(doc: LoroDoc): readonly EntityRelationRecord[];
749
783
  type Command = {
750
784
  type: 'create';
751
785
  row: EntityRow;
@@ -850,7 +884,19 @@ declare class LoroEntityDraft {
850
884
  delete(entityId: string): void;
851
885
  attach(slot: string, entityId: string): void;
852
886
  link(row: RelationRow): void;
853
- patchRelation(relationId: string, metadata: JsonObject, trace: JsonObject): void;
887
+ linkGenerated(input: {
888
+ relationId: RelationRow['relationId'];
889
+ outputEntityId: RelationRow['endpoint0EntityId'];
890
+ inputEntityId: RelationRow['endpoint1EntityId'];
891
+ trace?: JsonObject;
892
+ }): void;
893
+ linkClipAnchor(input: {
894
+ relationId: RelationRow['relationId'];
895
+ childClipEntityId: RelationRow['endpoint0EntityId'];
896
+ hostClipEntityId: RelationRow['endpoint1EntityId'];
897
+ trace?: JsonObject;
898
+ }): void;
899
+ patchRelationTrace(relationId: string, trace: JsonObject): void;
854
900
  unlink(relationId: string): void;
855
901
  private relationRoot;
856
902
  update(entityId: string, fields: JsonObject): void;
@@ -1772,4 +1818,4 @@ declare function phoneticScriptAssetHash(rows: EntityRelationRows, entityId: str
1772
1818
  /** The Asset a PhoneticScript was written out to, read from the graph. */
1773
1819
  declare function phoneticScriptAssetOf(rows: EntityRelationRows, entityId: string): EntityRow | undefined;
1774
1820
  //#endregion
1775
- export { type Aggregation, type AssembledCaptionContent, type AssembledPhoneticScriptContent, type Attachment, type AudioMediaAssetFact, type BgmPart, type CaptionContentInput, type CaptionDisplayCue, type CaptionPart, type CaptionSegmentSelection, type CaptionStyle, type ClipEntityId, type ClipPlacement, type CommitOptions, DEFAULT_UNIT_TIME_MS, type DeleteBgmInput, type DeleteClipInput, type DeleteClipTreeInput, type DeleteVoiceoverInput, type DerivedItemPosition, type DocStorageLike, type DocVersionMark, type DocumentAudioScript, type DocumentAudioScriptState, type EditorFoundation, EntityDocumentState, type EntityGraphCommitOptions, EntityGraphHttpClient, type EntityGraphState, EntityTimelineEditor, type EntityTimelineIdFactory, EntityTimelineProjectionError, type EntityTimelineTrackRole, type FieldChange, type FieldPath, IMPLEMENTED_SEMANTIC_OP_KINDS, type ImageMediaAssetFact, type ImplementedSemanticOpKind, type ImportedMediaAsset, type InsertCaptionClipInput, type InsertClipInput, type InsertMediaClipInput, type InsertMediaClipsInput, type InsertPlacedClipInput, type JournalEntry, LANE_KINDS_IN_STACK_ORDER, LORO_ENTITY_SCHEMA, type LaneKind, type LinearClipSpeed, LoroEntityDocument, LoroEntityDraft, type MainClipRange, type MakeEmptyPart, ManualSyncDoc, type ManualSyncDocOptions, MedeoHttpDocStorage, type MedeoHttpDocStorageOptions, type MediaAssetFact, type MediaClipInsertion, MemoryDocStorage, MengineAckFailedError, type MengineAuditEntry, type MengineAuditResponse, MengineDocSession, type MengineDocSessionOptions, type MengineDocSessionUpdateEvent, type MengineDocSyncState, type MengineDocumentVersion, type MengineEventStreamOptions, MengineHttpClient, type MengineHttpClientOptions, MengineHttpRequestError, MenginePushRejectedError, type MenginePushResponse, type MenginePushUpdateResponse, type MengineRejectedResponse, type MengineSnapshotResponse, type MengineSseUpdateEvent, type MengineSyncResponse, type MengineUndoState, type MengineUpdateMeta, MirrorVideoDocumentAdapter, type MirrorVideoDocumentOptions, type MoveClipInput, type MoveClipsToStartsInput, type MoveSequentialClipsInput, type MoveVoiceoverInput, type OpActor, type PartAggregation, type PartIdFactory, type PartKind, type PartUnion, type PatchCaptionStyleInput, PlainMemoryAdapter, type PlainMemoryAdapterOptions, type PlannedSemanticOpKind, type PullFailureReason, type PullResult, type PushOutcome, type PushOutcomeKind, type PushResult, type PushResultKind, type ReplaceClipContentInput, type ReplaceMediaClipInput, type ReplaceSequentialClipsInput, type ReplacementMediaClipInput, type ResolvedEntityClipPlacement, type ResolvedEntityTimelineLayout, type ResolvedEntityTrack, SchemaValidator, ScriptCompositionError, type SemanticDocumentAdapter, SemanticEditor, type SemanticOpInput, type SemanticOpKind, type SemanticOpName, type SequentialClipAnchor, type SetBgmInput, type SetCaptionVisibilityInput, type SetClipPlacementInput, type SetClipSpeedInput, type SetClipVolumeInput, type SnapshotReadable, type SolvedVideoDocument, type SpeechHostMap, type SpeechPart, type SpeedShift, TIMELINE_SKELETON_DURATION_MS, type Timeline, type TimelineDoc, type TimelineItem, type Track, type TrackDraft, type TrackItem, type TrackItemDraft, type TrackItemTimePosition, type TransactAudit, type TrimClipInput, type UpdateClipInput, type UpdateClipMarkerInput, ValidationError, type VideoClipPart, type VideoDocument, type VideoDocumentDraft, type VideoDocumentMirrorSchema, VideoDocumentValidationError, type VideoDocumentValidationIssue, type VideoDocumentValidationIssueCode, type VideoDraft, type CaptionPart$1 as VideoDraftCaptionPart, type VideoDraftContent, type VideoDraftPartUnion, type Timeline$1 as VideoDraftTimeline, type Track$1 as VideoDraftTrack, type TrackItem$1 as VideoDraftTrackItem, type VideoMediaAssetFact, type VisualMediaAssetFact, type VoiceoverCaptionFact, type VoiceoverMediaAssetFact, type VoiceoverTakeInput, type VoiceoverTakeResult, type WaitForServerAckOptions, applyEntityRows, applyFieldChanges, arrangeMainTrackSeamlessly, assembleCaptionContent, assembleEntityContent, assemblePhoneticScriptContent, assembleScriptText, assertCanonicalEditorResources, assertEntityProjectionPreservesLegacy, assertFieldChanges, assertMediaAssetWritePolicy, assertValidVideoDocument, audioScriptAssetContent, audioScriptAssetFields, audioScriptAssetHash, audioScriptAssetOf, base64ToBytes, buildInitialVideoDocument, buildSpeechHostMap, bytesToBase64, cascadeAfterVideoClipChanges, compileEntityRows, createEditSandbox, createMirrorVideoDocument, createMirrorVideoDocumentAdapter, createPlainMemoryAdapter, decodeDocVersionMark, derivePositionFromAbs, effectiveVideoClipDurationMs, encodeDocVersionMark, ensureEditorFoundation, ensureLaneTrack, fillMainTrackTimeGaps, findComposedAudioScript, findLaneTrack, fromVideoDocument, generatePartId, getAt, hostForAbsMs, importMediaAsset, isEmptyVideoClip, isImplementedSemanticOpKind, isMap, laneTrackId, mainTrackRanges, migrateLegacyTimelineToEntities, partDurationMs, partUnionSchema, phoneticScriptAssetContent, phoneticScriptAssetHash, phoneticScriptAssetOf, prepareCaptionContent, projectEntityTimeline, readDocumentAudioScript, readEntityDocument, readMainTrackItems, readMengineEventStream, readPart, readPartDurationMs, readVideoDocumentFromDraft, reassignSpeechesToVideoClipsByTime, recalculateTimelineDuration, relativePositionForAbs, replayJournal, resolveAllSpeechOverlaps, resolveEntityTimelineLayout, resolveFieldPath, resolveSpeechOverlapByShiftingVideos, safeDurationMs, index_d_exports as schemas, scriptSourceAssetOf, selectAudioScriptSegment, snapshotToPlain, solveVideoDocument, speedOf, syncAggregatedClipsTimePosition, toVideoDocument, validateVideoDocument, videoDocumentMirrorSchema, videoDocumentSchema };
1821
+ export { type Aggregation, type AssembledCaptionContent, type AssembledPhoneticScriptContent, type Attachment, type AudioMediaAssetFact, type BgmPart, type CaptionContentInput, type CaptionDisplayCue, type CaptionPart, type CaptionSegmentSelection, type CaptionStyle, type ClipEntityId, type ClipPlacement, type CommitOptions, DEFAULT_UNIT_TIME_MS, type DeleteBgmInput, type DeleteClipInput, type DeleteClipTreeInput, type DeleteVoiceoverInput, type DerivedItemPosition, type DocStorageLike, type DocVersionMark, type DocumentAudioScript, type DocumentAudioScriptState, type EditorFoundation, EntityDocumentState, type EntityGraphCommitOptions, EntityGraphHttpClient, type EntityGraphState, EntityRelationRecord, EntityTimelineEditor, type EntityTimelineIdFactory, type EntityTimelineProjectionDocument, EntityTimelineProjectionError, type EntityTimelineTrackRole, type FieldChange, type FieldPath, IMPLEMENTED_SEMANTIC_OP_KINDS, type ImageMediaAssetFact, type ImplementedSemanticOpKind, type ImportedMediaAsset, type InsertCaptionClipInput, type InsertClipInput, type InsertMediaClipInput, type InsertMediaClipsInput, type InsertPlacedClipInput, type JournalEntry, LANE_KINDS_IN_STACK_ORDER, LORO_ENTITY_SCHEMA, type LaneKind, type LinearClipSpeed, LoroEntityDocument, LoroEntityDraft, type MainClipRange, type MakeEmptyPart, ManualSyncDoc, type ManualSyncDocOptions, MedeoHttpDocStorage, type MedeoHttpDocStorageOptions, type MediaAssetFact, type MediaClipInsertion, MemoryDocStorage, MengineAckFailedError, type MengineAuditEntry, type MengineAuditResponse, MengineDocSession, type MengineDocSessionOptions, type MengineDocSessionUpdateEvent, type MengineDocSyncState, type MengineDocumentVersion, type MengineEventStreamOptions, MengineHttpClient, type MengineHttpClientOptions, MengineHttpRequestError, MenginePushRejectedError, type MenginePushResponse, type MenginePushUpdateResponse, type MengineRejectedResponse, type MengineSnapshotResponse, type MengineSseUpdateEvent, type MengineSyncResponse, type MengineUndoState, type MengineUpdateMeta, MirrorVideoDocumentAdapter, type MirrorVideoDocumentOptions, type MoveClipInput, type MoveClipsToStartsInput, type MoveSequentialClipsInput, type MoveVoiceoverInput, type OpActor, type PartAggregation, type PartIdFactory, type PartKind, type PartUnion, type PatchCaptionStyleInput, PlainMemoryAdapter, type PlainMemoryAdapterOptions, type PlannedSemanticOpKind, type PullFailureReason, type PullResult, type PushOutcome, type PushOutcomeKind, type PushResult, type PushResultKind, type ReplaceClipContentInput, type ReplaceMediaClipInput, type ReplaceSequentialClipsInput, type ReplacementMediaClipInput, type ResolvedEntityClipPlacement, type ResolvedEntityTimelineLayout, type ResolvedEntityTrack, type ReviseAudioScriptInput, type ReviseAudioScriptResult, SchemaValidator, ScriptCompositionError, type SemanticDocumentAdapter, SemanticEditor, type SemanticOpInput, type SemanticOpKind, type SemanticOpName, type SequentialClipAnchor, type SetBgmInput, type SetCaptionVisibilityInput, type SetClipPlacementInput, type SetClipSpeedInput, type SetClipVolumeInput, type SnapshotReadable, type SolvedVideoDocument, type SpeechHostMap, type SpeechOriginAssetSystem, type SpeechPart, type SpeedShift, TIMELINE_SKELETON_DURATION_MS, type Timeline, type TimelineDoc, type TimelineItem, type Track, type TrackDraft, type TrackItem, type TrackItemDraft, type TrackItemTimePosition, type TransactAudit, type TrimClipInput, type UpdateClipInput, type UpdateClipMarkerInput, ValidationError, type VideoClipPart, type VideoDocument, type VideoDocumentDraft, type VideoDocumentMirrorSchema, VideoDocumentValidationError, type VideoDocumentValidationIssue, type VideoDocumentValidationIssueCode, type VideoDraft, type CaptionPart$1 as VideoDraftCaptionPart, type VideoDraftContent, type VideoDraftPartUnion, type Timeline$1 as VideoDraftTimeline, type Track$1 as VideoDraftTrack, type TrackItem$1 as VideoDraftTrackItem, type VideoMediaAssetFact, type VisualMediaAssetFact, type VoiceoverCaptionFact, type VoiceoverMediaAssetFact, type VoiceoverTakeInput, type VoiceoverTakeResult, type WaitForServerAckOptions, applyEntityRows, applyFieldChanges, arrangeMainTrackSeamlessly, assembleCaptionContent, assembleEntityContent, assemblePhoneticScriptContent, assembleScriptText, assertCanonicalEditorResources, assertEntityProjectionPreservesLegacy, assertFieldChanges, assertMediaAssetWritePolicy, assertValidVideoDocument, audioScriptAssetContent, audioScriptAssetFields, audioScriptAssetHash, audioScriptAssetOf, base64ToBytes, buildInitialVideoDocument, buildSpeechHostMap, bytesToBase64, cascadeAfterVideoClipChanges, compileEntityRows, createEditSandbox, createMirrorVideoDocument, createMirrorVideoDocumentAdapter, createPlainMemoryAdapter, decodeDocVersionMark, derivePositionFromAbs, effectiveVideoClipDurationMs, encodeDocVersionMark, ensureEditorFoundation, ensureLaneTrack, fillMainTrackTimeGaps, findComposedAudioScript, findLaneTrack, fromVideoDocument, generatePartId, getAt, hostForAbsMs, importMediaAsset, isEmptyVideoClip, isImplementedSemanticOpKind, isMap, laneTrackId, mainTrackRanges, migrateLegacyTimelineToEntities, partDurationMs, partUnionSchema, phoneticScriptAssetContent, phoneticScriptAssetHash, phoneticScriptAssetOf, prepareCaptionContent, projectEntityTimeline, readDocumentAudioScript, readEntityDocument, readEntityRelationRecords, readMainTrackItems, readMengineEventStream, readPart, readPartDurationMs, readVideoDocumentFromDraft, reassignSpeechesToVideoClipsByTime, recalculateTimelineDuration, relativePositionForAbs, replayJournal, resolveAllSpeechOverlaps, resolveEntityTimelineLayout, resolveFieldPath, resolveSpeechOverlapByShiftingVideos, reviseAudioScript, safeDurationMs, index_d_exports as schemas, scriptSourceAssetOf, selectAudioScriptSegment, snapshotToPlain, solveVideoDocument, speedOf, syncAggregatedClipsTimePosition, toVideoDocument, validateVideoDocument, videoDocumentMirrorSchema, videoDocumentSchema };
package/dist/index.js CHANGED
@@ -1,6 +1,8 @@
1
- import { $ as partUnionSchema, A as decodeEntityRelationRows, B as isJsonObject, C as applyFieldChanges, Ct as recordEntries, D as EntityProjectionGraph, E as projectEntityTimeline, Et as bytesToBase64, F as assembleScriptText, G as buildInitialVideoDocument, H as createRelationId, I as findComposedAudioScript, J as fromVideoDocument, K as buildSpeechHostMap, L as selectAudioScriptSegment, M as assembleCaptionContent, N as assembleEntityContent, O as resolveEntityTimelineLayout, P as assemblePhoneticScriptContent, Q as validateVideoDocument, R as updateEntityFields, S as equalJson, St as partUnionToDraft, T as resolveFieldPath, Tt as base64ToBytes, U as hasSequence, V as createEntityId, W as isMediaAssetVariantKind, X as VideoDocumentValidationError, Y as toVideoDocument, Z as assertValidVideoDocument, _ as audioScriptAssetOf, _t as partDurationMs, a as createMirrorVideoDocument, at as laneTrackId, b as phoneticScriptAssetOf, bt as effectiveVideoClipDurationMs, c as DocumentMutationGuard, ct as arrangeMainTrackSeamlessly, d as LoroEntityDraft, dt as recalculateTimelineDuration, et as videoDocumentSchema, f as readEntityDocument, ft as resolveAllSpeechOverlaps, g as audioScriptAssetHash, gt as isEmptyVideoClip, h as audioScriptAssetFields, ht as TIMELINE_SKELETON_DURATION_MS, i as MirrorVideoDocumentAdapter, it as hasResolvedPlacement, j as ScriptCompositionError, k as EntityTimelineProjectionError, l as LORO_ENTITY_SCHEMA, lt as fillMainTrackTimeGaps, m as audioScriptAssetContent, mt as syncAggregatedClipsTimePosition, n as createPlainMemoryAdapter, nt as ensureLaneTrack, o as createMirrorVideoDocumentAdapter, ot as solveVideoDocument, p as entityOrderGroups, pt as resolveSpeechOverlapByShiftingVideos, q as derivePositionFromAbs, r as generatePartId, rt as findLaneTrack, s as readVideoDocumentFromDraft, st as cascadeAfterVideoClipChanges, t as PlainMemoryAdapter, tt as LANE_KINDS_IN_STACK_ORDER, u as LoroEntityDocument, ut as reassignSpeechesToVideoClipsByTime, v as phoneticScriptAssetContent, vt as safeDurationMs, w as assertFieldChanges, wt as videoDocumentMirrorSchema, x as scriptSourceAssetOf, xt as speedOf, y as phoneticScriptAssetHash, yt as DEFAULT_UNIT_TIME_MS, z as variantBaseEntityIds } from "./document-BB8U25jt.js";
1
+ import { $ as VideoDocumentValidationError, A as resolveEntityTimelineLayout, B as selectAudioScriptSegment, C as canonicalJson, Ct as effectiveVideoClipDurationMs, D as resolveFieldPath, Dt as videoDocumentMirrorSchema, E as assertFieldChanges, Et as recordEntries, F as assembleCaptionContent, G as createRelationId, H as variantBaseEntityIds, I as assembleEntityContent, J as buildInitialVideoDocument, K as hasSequence, L as assemblePhoneticScriptContent, M as validateEntityRelationTransition, N as decodeEntityRelationRows, O as projectEntityTimeline, Ot as base64ToBytes, P as ScriptCompositionError, Q as toVideoDocument, R as assembleScriptText, S as scriptSourceAssetOf, St as DEFAULT_UNIT_TIME_MS, T as applyFieldChanges, Tt as partUnionToDraft, U as isJsonObject, V as updateEntityFields, W as createEntityId, X as derivePositionFromAbs, Y as buildSpeechHostMap, Z as fromVideoDocument, _ as audioScriptAssetHash, _t as syncAggregatedClipsTimePosition, a as createMirrorVideoDocument, at as ensureLaneTrack, b as phoneticScriptAssetHash, bt as partDurationMs, c as DocumentMutationGuard, ct as laneTrackId, d as LoroEntityDraft, dt as arrangeMainTrackSeamlessly, et as assertValidVideoDocument, f as readEntityDocument, ft as fillMainTrackTimeGaps, g as audioScriptAssetFields, gt as resolveSpeechOverlapByShiftingVideos, h as audioScriptAssetContent, ht as resolveAllSpeechOverlaps, i as MirrorVideoDocumentAdapter, it as LANE_KINDS_IN_STACK_ORDER, j as EntityTimelineProjectionError, k as EntityProjectionGraph, kt as bytesToBase64, l as LORO_ENTITY_SCHEMA, lt as solveVideoDocument, m as entityOrderGroups, mt as recalculateTimelineDuration, n as createPlainMemoryAdapter, nt as partUnionSchema, o as createMirrorVideoDocumentAdapter, ot as findLaneTrack, p as readEntityRelationRecords, pt as reassignSpeechesToVideoClipsByTime, q as isMediaAssetVariantKind, r as generatePartId, rt as videoDocumentSchema, s as readVideoDocumentFromDraft, st as hasResolvedPlacement, t as PlainMemoryAdapter, tt as validateVideoDocument, u as LoroEntityDocument, ut as cascadeAfterVideoClipChanges, v as audioScriptAssetOf, vt as TIMELINE_SKELETON_DURATION_MS, w as equalJson, wt as speedOf, x as phoneticScriptAssetOf, xt as safeDurationMs, y as phoneticScriptAssetContent, yt as isEmptyVideoClip, z as findComposedAudioScript } from "./document-7Vi1AeQc.js";
2
2
  import { addSpeechesInputSchema, addVideoClipsInputSchema, adjustBgmVolumeInputSchema, adjustSpeechVolumeInputSchema, adjustVideoClipDurationInputSchema, adjustVideoClipVolumeInputSchema, changeSpeechScriptInputSchema, changeSpeechVoiceInputSchema, deleteBgmInputSchema, deleteSpeechesInputSchema, deleteVideoClipsInputSchema, moveSpeechesInputSchema, moveVideoClipsByAnchorInputSchema, moveVideoClipsInputSchema, replaceVideoClipContentInputSchema, replaceVideoClipSequenceInputSchema, setBgmInputSchema, setCaptionStyleInputSchema, setCaptionVisibilityInputSchema, setVideoClipSpeedShiftInputSchema, t as schemas_exports } from "./schemas.js";
3
3
  import { LoroDoc, UndoManager, VersionVector } from "loro-crdt";
4
+ import { sha256 } from "@noble/hashes/sha2.js";
5
+ import { bytesToHex } from "@noble/hashes/utils.js";
4
6
  import { ClientServerSynchronizer, DocManager } from "@mengine/sync";
5
7
  import { DisposableSet, EventBus, Task } from "@mengine/utils";
6
8
  import { BaseDocStorage, DummyConnection } from "@mengine/storage";
@@ -228,6 +230,7 @@ function applyEntityRows(editor, rows) {
228
230
  const oldRelations = new Map(before.relations.map((row) => [row.relationId, row]));
229
231
  const newRelations = new Map(rows.relations.map((row) => [row.relationId, row]));
230
232
  if (newEntities.size !== rows.entities.length || newRelations.size !== rows.relations.length) throw new Error("Duplicate domain identity");
233
+ validateEntityRelationTransition(before, rows);
231
234
  return {
232
235
  update: editor.transact((draft) => {
233
236
  for (const row of before.relations) {
@@ -235,7 +238,7 @@ function applyEntityRows(editor, rows) {
235
238
  if (!next) draft.unlink(row.relationId);
236
239
  else {
237
240
  if (next.relationKind !== row.relationKind || next.endpoint0EntityId !== row.endpoint0EntityId || next.endpoint1EntityId !== row.endpoint1EntityId) throw new Error("Relation identity cannot change kind or endpoint positions");
238
- if (!equalJson(row.metadata, next.metadata) || !equalJson(row.trace, next.trace)) draft.patchRelation(row.relationId, next.metadata, next.trace);
241
+ if (!equalJson(row.trace, next.trace)) draft.patchRelationTrace(row.relationId, next.trace);
239
242
  }
240
243
  }
241
244
  let attached = baseline.project.audioScriptEntityId !== void 0;
@@ -252,7 +255,22 @@ function applyEntityRows(editor, rows) {
252
255
  if (!equalJson(previous.payload, row.payload)) draft.replaceOwned(row.entityId, row.payload);
253
256
  }
254
257
  }
255
- for (const row of rows.relations) if (!oldRelations.has(row.relationId)) draft.link(row);
258
+ for (const row of rows.relations) {
259
+ if (oldRelations.has(row.relationId)) continue;
260
+ if (row.relationKind === "generated") draft.linkGenerated({
261
+ relationId: row.relationId,
262
+ outputEntityId: row.endpoint0EntityId,
263
+ inputEntityId: row.endpoint1EntityId,
264
+ trace: row.trace
265
+ });
266
+ else if (row.relationKind === "clip-anchor") draft.linkClipAnchor({
267
+ relationId: row.relationId,
268
+ childClipEntityId: row.endpoint0EntityId,
269
+ hostClipEntityId: row.endpoint1EntityId,
270
+ trace: row.trace
271
+ });
272
+ else draft.link(row);
273
+ }
256
274
  const beforeOrder = entityOrderGroups(before), afterOrder = entityOrderGroups(rows);
257
275
  for (const group of new Set([...beforeOrder.keys(), ...afterOrder.keys()])) {
258
276
  const next = afterOrder.get(group) ?? [];
@@ -1318,7 +1336,7 @@ var EntityTimelineEditor = class {
1318
1336
  }
1319
1337
  });
1320
1338
  }
1321
- this.reconcileVoiceoverCaptions(draft, voiceoverClipEntityId, voiceover.entityId, phonetic.entityId, input.captions);
1339
+ this.reconcileVoiceoverCaptions(draft, voiceoverClipEntityId, phonetic.entityId, input.captions);
1322
1340
  this.resolveOneVoiceoverOverlap(draft);
1323
1341
  return {
1324
1342
  voiceoverClipEntityId,
@@ -1529,7 +1547,7 @@ var EntityTimelineEditor = class {
1529
1547
  requireComposedAudioScript(draft, phonetic.entityId);
1530
1548
  return phonetic;
1531
1549
  }
1532
- /** Preserve the factual synthesis input, regardless of persisted endpoint positions. */
1550
+ /** Preserve the factual synthesis input as `[rendered Audio, PhoneticScript]`. */
1533
1551
  ensurePhoneticRender(draft, voiceoverAudioEntityId, phoneticScriptEntityId) {
1534
1552
  const renders = draft.relations.filter((relation) => relation.relationKind === "phonetic-script-render" && (relation.endpoint0EntityId === voiceoverAudioEntityId || relation.endpoint1EntityId === voiceoverAudioEntityId));
1535
1553
  if (renders.length > 1) throw new Error(`Voiceover "${voiceoverAudioEntityId}" has multiple PhoneticScript render relations`);
@@ -1539,7 +1557,7 @@ var EntityTimelineEditor = class {
1539
1557
  }
1540
1558
  draft.relations.push(this.createRelation(draft, "phonetic-script-render", voiceoverAudioEntityId, phoneticScriptEntityId));
1541
1559
  }
1542
- reconcileVoiceoverCaptions(draft, voiceoverClipEntityId, voiceoverAudioEntityId, phoneticScriptEntityId, captions) {
1560
+ reconcileVoiceoverCaptions(draft, voiceoverClipEntityId, phoneticScriptEntityId, captions) {
1543
1561
  const audioScriptEntityId = requireComposedAudioScript(draft, phoneticScriptEntityId);
1544
1562
  const requested = new Set(captions.map((caption) => caption.captionClipEntityId));
1545
1563
  if (requested.size !== captions.length) throw new Error("Caption Clip ids must be unique within a voiceover take");
@@ -1564,10 +1582,6 @@ var EntityTimelineEditor = class {
1564
1582
  };
1565
1583
  draft.entities.push(content);
1566
1584
  assertCaptionScript(draft, content.entityId, audioScriptEntityId);
1567
- draft.relations.push(this.createRelation(draft, "caption-alignment", content.entityId, voiceoverAudioEntityId, { alignment: {
1568
- start: startMs,
1569
- end: startMs + durationMs
1570
- } }));
1571
1585
  this.insertPlacedClipIntoDraft(draft, {
1572
1586
  clipEntityId: caption.captionClipEntityId,
1573
1587
  trackEntityId: captionTrack.entityId,
@@ -1621,7 +1635,6 @@ var EntityTimelineEditor = class {
1621
1635
  }
1622
1636
  }
1623
1637
  });
1624
- this.replaceCaptionAlignment(draft, content.entityId, voiceoverAudioEntityId, startMs, durationMs);
1625
1638
  }
1626
1639
  }
1627
1640
  ensureRoleTrackForClip(draft, clipEntityId, role) {
@@ -1630,14 +1643,6 @@ var EntityTimelineEditor = class {
1630
1643
  const timeline = requireEntityKind(draft, otherEndpoint(requireOneRelation(draft, track.entityId, "timeline-track"), track.entityId), "timeline");
1631
1644
  return this.ensureRoleTrack(draft, timeline.entityId, role);
1632
1645
  }
1633
- replaceCaptionAlignment(draft, captionEntityId, voiceoverAudioEntityId, startMs, durationMs) {
1634
- const removed = new Set(incidentRelations(draft, captionEntityId).filter((relation) => relation.relationKind === "caption-alignment").map((relation) => relation.relationId));
1635
- draft.relations = draft.relations.filter((relation) => !removed.has(relation.relationId));
1636
- draft.relations.push(this.createRelation(draft, "caption-alignment", captionEntityId, voiceoverAudioEntityId, { alignment: {
1637
- start: startMs,
1638
- end: startMs + durationMs
1639
- } }));
1640
- }
1641
1646
  /**
1642
1647
  * Remove one placed Caption use. The composed AudioScript outlives the
1643
1648
  * caption: it may anchor further captions and remains the text owner.
@@ -2034,6 +2039,161 @@ const numericMarkerValidation = { compareMarkerPoints: (_marker, _range, left, r
2034
2039
  return left - right;
2035
2040
  } };
2036
2041
  //#endregion
2042
+ //#region src/entity-editor/revise-audio-script.ts
2043
+ /** Revise text as an independent authored document, never as a version-family mutation. */
2044
+ function reviseAudioScript(rows, input) {
2045
+ if (typeof input.editId !== "string" || !input.editId.trim()) throw new Error("editId is required");
2046
+ if (!Array.isArray(input.edits) || !input.edits.length) throw new Error("At least one segment edit is required");
2047
+ const edits = /* @__PURE__ */ new Map();
2048
+ for (const edit of input.edits) {
2049
+ if (!edit.segmentId?.trim() || typeof edit.text !== "string" || !edit.text.trim()) throw new Error("Segment text must be nonempty");
2050
+ if (edits.has(edit.segmentId)) throw new Error("Duplicate segment edit");
2051
+ edits.set(edit.segmentId, edit.text);
2052
+ }
2053
+ const signature = hash({
2054
+ ...input,
2055
+ captionUsages: input.captionUsages ?? []
2056
+ });
2057
+ const prior = rows.relations.filter((r) => r.relationKind === "generated" && r.trace.command === "revise-audio-script" && r.trace.editId === input.editId);
2058
+ if (prior.length) {
2059
+ if (prior.length !== 1 || prior[0].trace.signature !== signature) throw new Error("AudioScript edit identity conflict");
2060
+ const captionUsages = (input.captionUsages ?? []).map((usage, index) => {
2061
+ const edge = rows.relations.find((r) => r.relationKind === "marker-content" && r.trace.command === "revise-audio-script" && r.trace.editId === input.editId && r.trace.usageIndex === index);
2062
+ if (!edge || edge.endpoint0EntityId !== usage.markerEntityId) throw new Error("Caption usage conflict after revision");
2063
+ return {
2064
+ clipEntityId: usage.clipEntityId,
2065
+ markerEntityId: usage.markerEntityId,
2066
+ previousCaptionEntityId: usage.captionEntityId,
2067
+ captionEntityId: String(edge.endpoint1EntityId)
2068
+ };
2069
+ });
2070
+ return {
2071
+ rows,
2072
+ audioScriptEntityId: String(prior[0].endpoint0EntityId),
2073
+ captionUsages,
2074
+ changed: false
2075
+ };
2076
+ }
2077
+ const source = rows.entities.find((row) => row.entityId === input.sourceAudioScriptEntityId);
2078
+ if (source?.entityKind !== "audio-script") throw new Error("AudioScript source is missing");
2079
+ assembleScriptText({
2080
+ ...source,
2081
+ entityKind: "audio-script"
2082
+ });
2083
+ const payload = structuredClone(source.payload);
2084
+ if (!Array.isArray(payload.segments)) throw new Error("AudioScript must own its segments");
2085
+ const segmentIds = new Set(payload.segments.filter(isJsonObject).map((segment) => segment.segmentId));
2086
+ for (const segmentId of edits.keys()) if (!segmentIds.has(segmentId)) throw new Error(`Unknown segment ${segmentId}`);
2087
+ const changedSegments = /* @__PURE__ */ new Set();
2088
+ payload.segments = payload.segments.map((segment) => {
2089
+ if (segment === null || typeof segment !== "object" || Array.isArray(segment)) throw new Error("Invalid segment");
2090
+ const text = edits.get(String(segment.segmentId)) ?? segment.text;
2091
+ if (text !== segment.text) changedSegments.add(String(segment.segmentId));
2092
+ return {
2093
+ ...segment,
2094
+ text
2095
+ };
2096
+ });
2097
+ if (!changedSegments.size) return {
2098
+ rows,
2099
+ audioScriptEntityId: source.entityId,
2100
+ captionUsages: [],
2101
+ changed: false
2102
+ };
2103
+ delete payload.assetContentHash;
2104
+ const id = hash(input.editId);
2105
+ const audioScriptEntityId = createEntityId(`entity_script_revision_${id}`);
2106
+ const result = {
2107
+ entities: [...rows.entities, {
2108
+ entityId: audioScriptEntityId,
2109
+ entityKind: "audio-script",
2110
+ payload
2111
+ }],
2112
+ relations: [...rows.relations, {
2113
+ relationId: createRelationId(`relation_script_revision_${id}`),
2114
+ relationKind: "generated",
2115
+ endpoint0EntityId: audioScriptEntityId,
2116
+ endpoint1EntityId: source.entityId,
2117
+ metadata: {},
2118
+ trace: {
2119
+ command: "revise-audio-script",
2120
+ editId: input.editId,
2121
+ signature
2122
+ }
2123
+ }]
2124
+ };
2125
+ const entities = [...result.entities];
2126
+ let relations = [...result.relations];
2127
+ const captionUsages = [];
2128
+ const selectedMarkers = /* @__PURE__ */ new Set();
2129
+ for (const [index, usage] of (input.captionUsages ?? []).entries()) {
2130
+ if (selectedMarkers.has(usage.markerEntityId)) throw new Error("Duplicate caption usage");
2131
+ selectedMarkers.add(usage.markerEntityId);
2132
+ const caption = rows.entities.find((row) => row.entityId === usage.captionEntityId);
2133
+ if (caption?.entityKind !== "caption") throw new Error("Caption is missing");
2134
+ const assembled = assembleCaptionContent(rows, caption.entityId);
2135
+ if (assembled.audioScript.entityId !== source.entityId) throw new Error("Caption does not use the source AudioScript");
2136
+ const selection = assembled.caption.payload.selection;
2137
+ if (isJsonObject(selection) && selection.textRange !== void 0 && typeof selection.segmentId === "string" && changedSegments.has(selection.segmentId) && usage.selection === void 0) throw new Error("Changed partial Caption requires an explicit selection");
2138
+ const bases = caption.payload.baseEntityIds;
2139
+ if (!Array.isArray(bases) || !bases.includes(source.entityId)) throw new Error("Caption requires a direct AudioScript base");
2140
+ const clipMarkers = rows.relations.filter((r) => r.relationKind === "clip-marker" && r.endpoint0EntityId === usage.clipEntityId);
2141
+ const markerContents = rows.relations.filter((r) => r.relationKind === "marker-content" && r.endpoint0EntityId === usage.markerEntityId);
2142
+ const markerOwners = rows.relations.filter((r) => (r.relationKind === "clip-marker" || r.relationKind === "axvideo-marker") && r.endpoint1EntityId === usage.markerEntityId);
2143
+ if (clipMarkers.length !== 1 || clipMarkers[0].endpoint1EntityId !== usage.markerEntityId || markerOwners.length !== 1 || markerContents.length !== 1 || markerContents[0].endpoint1EntityId !== usage.captionEntityId) throw new Error("Caption usage conflict");
2144
+ const newCaptionId = createEntityId(`entity_caption_revision_${id}_${index}`);
2145
+ const clone = {
2146
+ ...caption,
2147
+ entityId: newCaptionId,
2148
+ payload: {
2149
+ ...structuredClone(caption.payload),
2150
+ baseEntityIds: bases.map((base) => base === source.entityId ? audioScriptEntityId : base),
2151
+ ...usage.selection === void 0 ? {} : { selection: structuredClone(usage.selection) }
2152
+ }
2153
+ };
2154
+ entities.push(clone);
2155
+ assembleCaptionContent({
2156
+ entities,
2157
+ relations
2158
+ }, newCaptionId);
2159
+ relations = relations.filter((r) => r.relationId !== markerContents[0].relationId);
2160
+ relations.push({
2161
+ ...markerContents[0],
2162
+ relationId: createRelationId(`relation_caption_revision_${id}_${index}`),
2163
+ endpoint1EntityId: newCaptionId,
2164
+ trace: {
2165
+ command: "revise-audio-script",
2166
+ editId: input.editId,
2167
+ usageIndex: index
2168
+ }
2169
+ });
2170
+ captionUsages.push({
2171
+ clipEntityId: usage.clipEntityId,
2172
+ markerEntityId: usage.markerEntityId,
2173
+ previousCaptionEntityId: usage.captionEntityId,
2174
+ captionEntityId: newCaptionId
2175
+ });
2176
+ }
2177
+ const revised = {
2178
+ entities,
2179
+ relations
2180
+ };
2181
+ decodeEntityRelationRows(revised, { compareMarkerPoints: (_marker, _range, left, right) => {
2182
+ if (typeof left !== "number" || typeof right !== "number" || !Number.isFinite(left) || !Number.isFinite(right)) throw new Error("Sequence Marker points must use finite numeric coordinates");
2183
+ return left - right;
2184
+ } });
2185
+ validateEntityRelationTransition(rows, revised);
2186
+ return {
2187
+ rows: revised,
2188
+ audioScriptEntityId,
2189
+ captionUsages,
2190
+ changed: true
2191
+ };
2192
+ }
2193
+ function hash(value) {
2194
+ return bytesToHex(sha256(new TextEncoder().encode(canonicalJson(value))));
2195
+ }
2196
+ //#endregion
2037
2197
  //#region src/entity-editor/legacy-entity-migration.ts
2038
2198
  /** One-time import only. Ordinary editor operations must never reverse-diff a legacy document. */
2039
2199
  function migrateLegacyTimelineToEntities(legacy, assetFacts, initial = {
@@ -2214,10 +2374,6 @@ function migrateLegacyTimelineToEntities(legacy, assetFacts, initial = {
2214
2374
  selection,
2215
2375
  ...caption.style === void 0 ? {} : { style: toEntityCaptionStyle(caption.style) }
2216
2376
  });
2217
- link("caption-alignment", content, voiceover, { alignment: {
2218
- start: caption.start_ms,
2219
- end: caption.start_ms + duration
2220
- } });
2221
2377
  markerPayload = {
2222
2378
  sourceRange: {
2223
2379
  start: 0,
@@ -2283,6 +2439,7 @@ function assertEntityProjectionPreservesLegacy(legacy, projection, rows) {
2283
2439
  for (const part of Object.values(view.part_library ?? {})) {
2284
2440
  const speech = part.speech;
2285
2441
  if (speech?.phoneme_script === null) delete speech.phoneme_script;
2442
+ if (speech !== void 0) delete speech.origin_asset_system;
2286
2443
  }
2287
2444
  return { view };
2288
2445
  };
@@ -5157,4 +5314,4 @@ function serverCovers(serverVV, target) {
5157
5314
  return covers(server, target);
5158
5315
  }
5159
5316
  //#endregion
5160
- export { DEFAULT_UNIT_TIME_MS, EntityGraphHttpClient, EntityTimelineEditor, EntityTimelineProjectionError, IMPLEMENTED_SEMANTIC_OP_KINDS, LANE_KINDS_IN_STACK_ORDER, LORO_ENTITY_SCHEMA, LoroEntityDocument, LoroEntityDraft, ManualSyncDoc, MedeoHttpDocStorage, MemoryDocStorage, MengineAckFailedError, MengineDocSession, MengineHttpClient, MengineHttpRequestError, MenginePushRejectedError, MirrorVideoDocumentAdapter, PlainMemoryAdapter, SchemaValidator, ScriptCompositionError, SemanticEditor, TIMELINE_SKELETON_DURATION_MS, ValidationError, VideoDocumentValidationError, applyEntityRows, applyFieldChanges, arrangeMainTrackSeamlessly, assembleCaptionContent, assembleEntityContent, assemblePhoneticScriptContent, assembleScriptText, assertCanonicalEditorResources, assertEntityProjectionPreservesLegacy, assertFieldChanges, assertMediaAssetWritePolicy, assertValidVideoDocument, audioScriptAssetContent, audioScriptAssetFields, audioScriptAssetHash, audioScriptAssetOf, base64ToBytes, buildInitialVideoDocument, buildSpeechHostMap, bytesToBase64, cascadeAfterVideoClipChanges, compileEntityRows, createEditSandbox, createMirrorVideoDocument, createMirrorVideoDocumentAdapter, createPlainMemoryAdapter, decodeDocVersionMark, derivePositionFromAbs, effectiveVideoClipDurationMs, encodeDocVersionMark, ensureEditorFoundation, ensureLaneTrack, fillMainTrackTimeGaps, findComposedAudioScript, findLaneTrack, fromVideoDocument, generatePartId, getAt, hostForAbsMs, importMediaAsset, isEmptyVideoClip, isImplementedSemanticOpKind, isMap, laneTrackId, mainTrackRanges, migrateLegacyTimelineToEntities, partDurationMs, partUnionSchema, phoneticScriptAssetContent, phoneticScriptAssetHash, phoneticScriptAssetOf, prepareCaptionContent, projectEntityTimeline, readDocumentAudioScript, readEntityDocument, readMainTrackItems, readMengineEventStream, readPart, readPartDurationMs, readVideoDocumentFromDraft, reassignSpeechesToVideoClipsByTime, recalculateTimelineDuration, relativePositionForAbs, replayJournal, resolveAllSpeechOverlaps, resolveEntityTimelineLayout, resolveFieldPath, resolveSpeechOverlapByShiftingVideos, safeDurationMs, schemas_exports as schemas, scriptSourceAssetOf, selectAudioScriptSegment, snapshotToPlain, solveVideoDocument, speedOf, syncAggregatedClipsTimePosition, toVideoDocument, validateVideoDocument, videoDocumentMirrorSchema, videoDocumentSchema };
5317
+ export { DEFAULT_UNIT_TIME_MS, EntityGraphHttpClient, EntityTimelineEditor, EntityTimelineProjectionError, IMPLEMENTED_SEMANTIC_OP_KINDS, LANE_KINDS_IN_STACK_ORDER, LORO_ENTITY_SCHEMA, LoroEntityDocument, LoroEntityDraft, ManualSyncDoc, MedeoHttpDocStorage, MemoryDocStorage, MengineAckFailedError, MengineDocSession, MengineHttpClient, MengineHttpRequestError, MenginePushRejectedError, MirrorVideoDocumentAdapter, PlainMemoryAdapter, SchemaValidator, ScriptCompositionError, SemanticEditor, TIMELINE_SKELETON_DURATION_MS, ValidationError, VideoDocumentValidationError, applyEntityRows, applyFieldChanges, arrangeMainTrackSeamlessly, assembleCaptionContent, assembleEntityContent, assemblePhoneticScriptContent, assembleScriptText, assertCanonicalEditorResources, assertEntityProjectionPreservesLegacy, assertFieldChanges, assertMediaAssetWritePolicy, assertValidVideoDocument, audioScriptAssetContent, audioScriptAssetFields, audioScriptAssetHash, audioScriptAssetOf, base64ToBytes, buildInitialVideoDocument, buildSpeechHostMap, bytesToBase64, cascadeAfterVideoClipChanges, compileEntityRows, createEditSandbox, createMirrorVideoDocument, createMirrorVideoDocumentAdapter, createPlainMemoryAdapter, decodeDocVersionMark, derivePositionFromAbs, effectiveVideoClipDurationMs, encodeDocVersionMark, ensureEditorFoundation, ensureLaneTrack, fillMainTrackTimeGaps, findComposedAudioScript, findLaneTrack, fromVideoDocument, generatePartId, getAt, hostForAbsMs, importMediaAsset, isEmptyVideoClip, isImplementedSemanticOpKind, isMap, laneTrackId, mainTrackRanges, migrateLegacyTimelineToEntities, partDurationMs, partUnionSchema, phoneticScriptAssetContent, phoneticScriptAssetHash, phoneticScriptAssetOf, prepareCaptionContent, projectEntityTimeline, readDocumentAudioScript, readEntityDocument, readEntityRelationRecords, readMainTrackItems, readMengineEventStream, readPart, readPartDurationMs, readVideoDocumentFromDraft, reassignSpeechesToVideoClipsByTime, recalculateTimelineDuration, relativePositionForAbs, replayJournal, resolveAllSpeechOverlaps, resolveEntityTimelineLayout, resolveFieldPath, resolveSpeechOverlapByShiftingVideos, reviseAudioScript, safeDurationMs, schemas_exports as schemas, scriptSourceAssetOf, selectAudioScriptSegment, snapshotToPlain, solveVideoDocument, speedOf, syncAggregatedClipsTimePosition, toVideoDocument, validateVideoDocument, videoDocumentMirrorSchema, videoDocumentSchema };
package/dist/testing.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { c as MirrorVideoDocumentAdapter, jt as VideoDraft } from "./index-C0uUWqkz.js";
1
+ import { Nt as VideoDraft, c as MirrorVideoDocumentAdapter } from "./index-mGObzOh4.js";
2
2
 
3
3
  //#region src/testing/in-memory-mengine-server.d.ts
4
4
  /**
package/dist/testing.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Et as bytesToBase64, Tt as base64ToBytes, o as createMirrorVideoDocumentAdapter } from "./document-BB8U25jt.js";
1
+ import { Ot as base64ToBytes, kt as bytesToBase64, o as createMirrorVideoDocumentAdapter } from "./document-7Vi1AeQc.js";
2
2
  import { t as classifyUpdate } from "./loro-relay-doc-cJSY-uau.js";
3
3
  import { LoroDoc, VersionVector, encodeFrontiers } from "loro-crdt";
4
4
  //#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.0.1-alpha.22",
3
+ "version": "2.0.1-alpha.23",
4
4
  "license": "UNLICENSED",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,9 +28,9 @@
28
28
  "immer": "^10.2.0",
29
29
  "loro-mirror": "^2.3.3",
30
30
  "zod": "^4.4.3",
31
- "@mengine/storage": "2.0.1-alpha.22",
32
- "@mengine/sync": "2.0.1-alpha.22",
33
- "@mengine/utils": "2.0.1-alpha.22"
31
+ "@mengine/storage": "2.0.1-alpha.23",
32
+ "@mengine/sync": "2.0.1-alpha.23",
33
+ "@mengine/utils": "2.0.1-alpha.23"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^25.9.1",