@mengine/medeo-client 1.2.1-alpha.3 → 1.2.1-alpha.4
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/{document-vV4IbKWB.js → document-C-h5-rCG.js} +2 -2
- package/dist/{index-Xoa8gpfl.d.ts → index-CiDSfSMi.d.ts} +10 -10
- package/dist/{index-CVDZoBpY.d.ts → index-DkJ0JK2t.d.ts} +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/schemas.d.ts +1 -1
- package/dist/schemas.js +22 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +1 -1
- package/package.json +4 -4
|
@@ -111,7 +111,7 @@ const speechPart = schema.LoroMap({
|
|
|
111
111
|
volume: schema.Number(),
|
|
112
112
|
audio_storage_key: schema.String(),
|
|
113
113
|
origin_speech_id: schema.String(),
|
|
114
|
-
voice: schema.String().transform(jsonTransform()),
|
|
114
|
+
voice: schema.String({ required: false }).transform(jsonTransform()),
|
|
115
115
|
caption_ids: schema.String().transform(jsonTransform())
|
|
116
116
|
}, { required: false });
|
|
117
117
|
const captionStyle = schema.LoroMap({
|
|
@@ -870,7 +870,7 @@ const speechPartSchema = z.object({
|
|
|
870
870
|
volume: finiteNumber,
|
|
871
871
|
audio_storage_key: z.string(),
|
|
872
872
|
origin_speech_id: z.string(),
|
|
873
|
-
voice: z.unknown(),
|
|
873
|
+
voice: z.unknown().optional(),
|
|
874
874
|
caption_ids: z.array(z.string())
|
|
875
875
|
}).passthrough();
|
|
876
876
|
const captionPartSchema = z.object({
|
|
@@ -17,10 +17,10 @@ declare const addSpeechesInputSchema: z.ZodObject<{
|
|
|
17
17
|
duration_ms: z.ZodNumber;
|
|
18
18
|
audio_script: z.ZodString;
|
|
19
19
|
volume: z.ZodNumber;
|
|
20
|
-
voice: z.ZodObject<{
|
|
20
|
+
voice: z.ZodOptional<z.ZodObject<{
|
|
21
21
|
id: z.ZodString;
|
|
22
22
|
name: z.ZodString;
|
|
23
|
-
}, z.core.$strip
|
|
23
|
+
}, z.core.$strip>>;
|
|
24
24
|
origin_speech_id: z.ZodString;
|
|
25
25
|
caption_ids: z.ZodArray<z.ZodString>;
|
|
26
26
|
}, z.core.$strip>>;
|
|
@@ -122,10 +122,10 @@ declare const changeSpeechScriptInputSchema: z.ZodObject<{
|
|
|
122
122
|
duration_ms: z.ZodNumber;
|
|
123
123
|
audio_script: z.ZodString;
|
|
124
124
|
volume: z.ZodNumber;
|
|
125
|
-
voice: z.ZodObject<{
|
|
125
|
+
voice: z.ZodOptional<z.ZodObject<{
|
|
126
126
|
id: z.ZodString;
|
|
127
127
|
name: z.ZodString;
|
|
128
|
-
}, z.core.$strip
|
|
128
|
+
}, z.core.$strip>>;
|
|
129
129
|
origin_speech_id: z.ZodString;
|
|
130
130
|
caption_ids: z.ZodArray<z.ZodString>;
|
|
131
131
|
}, z.core.$strip>>;
|
|
@@ -146,10 +146,10 @@ declare const changeSpeechVoiceInputSchema: z.ZodObject<{
|
|
|
146
146
|
duration_ms: z.ZodNumber;
|
|
147
147
|
audio_script: z.ZodString;
|
|
148
148
|
volume: z.ZodNumber;
|
|
149
|
-
voice: z.ZodObject<{
|
|
149
|
+
voice: z.ZodOptional<z.ZodObject<{
|
|
150
150
|
id: z.ZodString;
|
|
151
151
|
name: z.ZodString;
|
|
152
|
-
}, z.core.$strip
|
|
152
|
+
}, z.core.$strip>>;
|
|
153
153
|
origin_speech_id: z.ZodString;
|
|
154
154
|
caption_ids: z.ZodArray<z.ZodString>;
|
|
155
155
|
}, z.core.$strip>>;
|
|
@@ -564,10 +564,10 @@ declare const speechAssetSchema: z.ZodObject<{
|
|
|
564
564
|
duration_ms: z.ZodNumber;
|
|
565
565
|
audio_script: z.ZodString;
|
|
566
566
|
volume: z.ZodNumber;
|
|
567
|
-
voice: z.ZodObject<{
|
|
567
|
+
voice: z.ZodOptional<z.ZodObject<{
|
|
568
568
|
id: z.ZodString;
|
|
569
569
|
name: z.ZodString;
|
|
570
|
-
}, z.core.$strip
|
|
570
|
+
}, z.core.$strip>>;
|
|
571
571
|
origin_speech_id: z.ZodString;
|
|
572
572
|
caption_ids: z.ZodArray<z.ZodString>;
|
|
573
573
|
}, z.core.$strip>;
|
|
@@ -588,10 +588,10 @@ declare const speechAssetsSchema: z.ZodObject<{
|
|
|
588
588
|
duration_ms: z.ZodNumber;
|
|
589
589
|
audio_script: z.ZodString;
|
|
590
590
|
volume: z.ZodNumber;
|
|
591
|
-
voice: z.ZodObject<{
|
|
591
|
+
voice: z.ZodOptional<z.ZodObject<{
|
|
592
592
|
id: z.ZodString;
|
|
593
593
|
name: z.ZodString;
|
|
594
|
-
}, z.core.$strip
|
|
594
|
+
}, z.core.$strip>>;
|
|
595
595
|
origin_speech_id: z.ZodString;
|
|
596
596
|
caption_ids: z.ZodArray<z.ZodString>;
|
|
597
597
|
}, z.core.$strip>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as MoveVideoClipsInput, B as MoveSpeechesInput, J as DeleteBgmInput, K as DeleteSpeechesInput, N as MoveVideoClipsByAnchorInput, O as ReplaceVideoClipContentInput, R as MoveBgmInput, S as SetBgmInput, T as ReplaceVideoClipSequenceInput, U as DeleteVideoClipsInput, X as ChangeSpeechScriptInput, Z as ChangeSpeechVoiceInput, b as SetCaptionStyleInput, ct as AddVideoClipsInput, et as AdjustVideoClipVolumeInput, g as SetVideoClipSpeedShiftInput, it as AdjustSpeechVolumeInput, nt as AdjustVideoClipDurationInput, ot as AdjustBgmVolumeInput, ut as AddSpeechesInput, v as SetCaptionVisibilityInput } from "./index-
|
|
1
|
+
import { A as MoveVideoClipsInput, B as MoveSpeechesInput, J as DeleteBgmInput, K as DeleteSpeechesInput, N as MoveVideoClipsByAnchorInput, O as ReplaceVideoClipContentInput, R as MoveBgmInput, S as SetBgmInput, T as ReplaceVideoClipSequenceInput, U as DeleteVideoClipsInput, X as ChangeSpeechScriptInput, Z as ChangeSpeechVoiceInput, b as SetCaptionStyleInput, ct as AddVideoClipsInput, et as AdjustVideoClipVolumeInput, g as SetVideoClipSpeedShiftInput, it as AdjustSpeechVolumeInput, nt as AdjustVideoClipDurationInput, ot as AdjustBgmVolumeInput, ut as AddSpeechesInput, v as SetCaptionVisibilityInput } from "./index-CiDSfSMi.js";
|
|
2
2
|
import { InferInputType } from "loro-mirror";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { LoroDoc, PeerID } from "loro-crdt";
|
|
@@ -1455,7 +1455,7 @@ declare const partUnionSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1455
1455
|
volume: z.ZodNumber;
|
|
1456
1456
|
audio_storage_key: z.ZodString;
|
|
1457
1457
|
origin_speech_id: z.ZodString;
|
|
1458
|
-
voice: z.ZodUnknown
|
|
1458
|
+
voice: z.ZodOptional<z.ZodUnknown>;
|
|
1459
1459
|
caption_ids: z.ZodArray<z.ZodString>;
|
|
1460
1460
|
}, z.core.$loose>;
|
|
1461
1461
|
}, z.core.$loose>, z.ZodObject<{
|
|
@@ -1555,7 +1555,7 @@ declare const videoDocumentSchema: z.ZodObject<{
|
|
|
1555
1555
|
volume: z.ZodNumber;
|
|
1556
1556
|
audio_storage_key: z.ZodString;
|
|
1557
1557
|
origin_speech_id: z.ZodString;
|
|
1558
|
-
voice: z.ZodUnknown
|
|
1558
|
+
voice: z.ZodOptional<z.ZodUnknown>;
|
|
1559
1559
|
caption_ids: z.ZodArray<z.ZodString>;
|
|
1560
1560
|
}, z.core.$loose>;
|
|
1561
1561
|
}, z.core.$loose>, z.ZodObject<{
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as index_d_exports } from "./index-
|
|
2
|
-
import { $ as Track, A as TrackDraft, B as DerivedItemPosition, C as SemanticOpKind, D as ValidationError, E as SnapshotReadable, F as VideoDocumentValidationError, G as toVideoDocument, H as buildSpeechHostMap, I as assertValidVideoDocument, J as DEFAULT_UNIT_TIME_MS, K as BgmPart, L as validateVideoDocument, M as VideoDocumentDraft, N as VideoDocumentMirrorSchema, O as PartIdFactory, P as videoDocumentMirrorSchema, Q as Timeline, R as InitialDocumentFacts, S as PlannedSemanticOpKind, T as SchemaValidator, U as derivePositionFromAbs, V as SpeechHostMap, W as fromVideoDocument, X as PartUnion, Y as PartKind, Z as SpeechPart, _ as SemanticOpInput, _t as Timeline$1, a as PlainMemoryAdapter, at as VideoDocumentSchemaVersion, b as IMPLEMENTED_SEMANTIC_OP_KINDS, c as MirrorVideoDocumentAdapter, ct as VideoDraft, d as createMirrorVideoDocumentAdapter, dt as speedOf, et as TrackItem, f as writeVideoDocumentToDraft, ft as Attachment, g as SemanticEditor, gt as SpeedShift, h as SemanticDocumentAdapter, ht as PartAggregation, i as JournalEntry, it as VideoDocument, j as TrackItemDraft, k as generatePartId, l as MirrorVideoDocumentOptions, lt as VideoDraftPartUnion, m as OpActor, mt as CaptionStyle, n as videoDocumentSchema, nt as VIDEO_DOCUMENT_SCHEMA_VERSION, o as PlainMemoryAdapterOptions, ot as VideoDocumentValidationIssue, p as CommitOptions, pt as CaptionPart$1, q as CaptionPart, r as readVideoDocumentFromDraft, rt as VideoClipPart, s as createPlainMemoryAdapter, st as VideoDocumentValidationIssueCode, t as partUnionSchema, tt as TrackItemTimePosition, u as createMirrorVideoDocument, ut as effectiveVideoClipDurationMs, v as SemanticOpName, vt as Track$1, w as isImplementedSemanticOpKind, x as ImplementedSemanticOpKind, y as TransactAudit, yt as TrackItem$1, z as buildInitialVideoDocument } from "./index-
|
|
1
|
+
import { t as index_d_exports } from "./index-CiDSfSMi.js";
|
|
2
|
+
import { $ as Track, A as TrackDraft, B as DerivedItemPosition, C as SemanticOpKind, D as ValidationError, E as SnapshotReadable, F as VideoDocumentValidationError, G as toVideoDocument, H as buildSpeechHostMap, I as assertValidVideoDocument, J as DEFAULT_UNIT_TIME_MS, K as BgmPart, L as validateVideoDocument, M as VideoDocumentDraft, N as VideoDocumentMirrorSchema, O as PartIdFactory, P as videoDocumentMirrorSchema, Q as Timeline, R as InitialDocumentFacts, S as PlannedSemanticOpKind, T as SchemaValidator, U as derivePositionFromAbs, V as SpeechHostMap, W as fromVideoDocument, X as PartUnion, Y as PartKind, Z as SpeechPart, _ as SemanticOpInput, _t as Timeline$1, a as PlainMemoryAdapter, at as VideoDocumentSchemaVersion, b as IMPLEMENTED_SEMANTIC_OP_KINDS, c as MirrorVideoDocumentAdapter, ct as VideoDraft, d as createMirrorVideoDocumentAdapter, dt as speedOf, et as TrackItem, f as writeVideoDocumentToDraft, ft as Attachment, g as SemanticEditor, gt as SpeedShift, h as SemanticDocumentAdapter, ht as PartAggregation, i as JournalEntry, it as VideoDocument, j as TrackItemDraft, k as generatePartId, l as MirrorVideoDocumentOptions, lt as VideoDraftPartUnion, m as OpActor, mt as CaptionStyle, n as videoDocumentSchema, nt as VIDEO_DOCUMENT_SCHEMA_VERSION, o as PlainMemoryAdapterOptions, ot as VideoDocumentValidationIssue, p as CommitOptions, pt as CaptionPart$1, q as CaptionPart, r as readVideoDocumentFromDraft, rt as VideoClipPart, s as createPlainMemoryAdapter, st as VideoDocumentValidationIssueCode, t as partUnionSchema, tt as TrackItemTimePosition, u as createMirrorVideoDocument, ut as effectiveVideoClipDurationMs, v as SemanticOpName, vt as Track$1, w as isImplementedSemanticOpKind, x as ImplementedSemanticOpKind, y as TransactAudit, yt as TrackItem$1, z as buildInitialVideoDocument } from "./index-DkJ0JK2t.js";
|
|
3
3
|
import { 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";
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as resolveAllSpeechOverlaps, B as effectiveVideoClipDurationMs, C as solveVideoDocument, D as reassignSpeechesToVideoClipsByTime, E as fillMainTrackTimeGaps, F as isEmptyVideoClip, G as base64ToBytes, H as partUnionToDraft, I as partDurationMs, K as bytesToBase64, L as safeDurationMs, M as resolveSpeechOverlapByShiftingVideos, N as syncAggregatedClipsTimePosition, O as recalculateTimelineDuration, P as TIMELINE_SKELETON_DURATION_MS, R as DEFAULT_UNIT_TIME_MS, S as laneTrackId, T as arrangeMainTrackSeamlessly, U as recordEntries, V as speedOf, W as videoDocumentMirrorSchema, _ as partUnionSchema, a as createMirrorVideoDocument, b as ensureLaneTrack, c as readVideoDocumentFromDraft, d as derivePositionFromAbs, f as fromVideoDocument, g as validateVideoDocument, h as assertValidVideoDocument, i as MirrorVideoDocumentAdapter, j as resolveAnchoredClipsTimePosition, k as recoverOrphanedSpeechAnchorsByTime, l as buildInitialVideoDocument, m as VideoDocumentValidationError, n as createPlainMemoryAdapter, o as createMirrorVideoDocumentAdapter, p as toVideoDocument, r as generatePartId, s as writeVideoDocumentToDraft, t as PlainMemoryAdapter, u as buildSpeechHostMap, v as videoDocumentSchema, w as cascadeAfterVideoClipChanges, x as findLaneTrack, y as LANE_KINDS_IN_STACK_ORDER, z as VIDEO_DOCUMENT_SCHEMA_VERSION } from "./document-
|
|
1
|
+
import { A as resolveAllSpeechOverlaps, B as effectiveVideoClipDurationMs, C as solveVideoDocument, D as reassignSpeechesToVideoClipsByTime, E as fillMainTrackTimeGaps, F as isEmptyVideoClip, G as base64ToBytes, H as partUnionToDraft, I as partDurationMs, K as bytesToBase64, L as safeDurationMs, M as resolveSpeechOverlapByShiftingVideos, N as syncAggregatedClipsTimePosition, O as recalculateTimelineDuration, P as TIMELINE_SKELETON_DURATION_MS, R as DEFAULT_UNIT_TIME_MS, S as laneTrackId, T as arrangeMainTrackSeamlessly, U as recordEntries, V as speedOf, W as videoDocumentMirrorSchema, _ as partUnionSchema, a as createMirrorVideoDocument, b as ensureLaneTrack, c as readVideoDocumentFromDraft, d as derivePositionFromAbs, f as fromVideoDocument, g as validateVideoDocument, h as assertValidVideoDocument, i as MirrorVideoDocumentAdapter, j as resolveAnchoredClipsTimePosition, k as recoverOrphanedSpeechAnchorsByTime, l as buildInitialVideoDocument, m as VideoDocumentValidationError, n as createPlainMemoryAdapter, o as createMirrorVideoDocumentAdapter, p as toVideoDocument, r as generatePartId, s as writeVideoDocumentToDraft, t as PlainMemoryAdapter, u as buildSpeechHostMap, v as videoDocumentSchema, w as cascadeAfterVideoClipChanges, x as findLaneTrack, y as LANE_KINDS_IN_STACK_ORDER, z as VIDEO_DOCUMENT_SCHEMA_VERSION } from "./document-C-h5-rCG.js";
|
|
2
2
|
import { addSpeechesInputSchema, addVideoClipsInputSchema, adjustBgmVolumeInputSchema, adjustSpeechVolumeInputSchema, adjustVideoClipDurationInputSchema, adjustVideoClipVolumeInputSchema, changeSpeechScriptInputSchema, changeSpeechVoiceInputSchema, deleteBgmInputSchema, deleteSpeechesInputSchema, deleteVideoClipsInputSchema, moveBgmInputSchema, moveSpeechesInputSchema, moveVideoClipsByAnchorInputSchema, moveVideoClipsInputSchema, replaceVideoClipContentInputSchema, replaceVideoClipSequenceInputSchema, setBgmInputSchema, setCaptionStyleInputSchema, setCaptionVisibilityInputSchema, setVideoClipSpeedShiftInputSchema, t as schemas_exports } from "./schemas.js";
|
|
3
3
|
import { LoroDoc, VersionVector } from "loro-crdt";
|
|
4
4
|
import { ClientServerSynchronizer, DocManager } from "@mengine/sync";
|
package/dist/schemas.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as changeSpeechVoiceInputSchema, A as MoveVideoClipsInput, B as MoveSpeechesInput, C as setBgmInputSchema, D as replaceVideoClipSequenceInputSchema, E as anchoredReplacePolicySchema, F as moveAnchorSchema, G as deleteVideoClipsInputSchema, H as AnchoredDeletePolicy, I as moveVideoClipsByAnchorInputSchema, J as DeleteBgmInput, K as DeleteSpeechesInput, L as movedClipAnchoredPolicySchema, M as MoveAnchor, N as MoveVideoClipsByAnchorInput, O as ReplaceVideoClipContentInput, P as MovedClipAnchoredPolicy, Q as changeSpeechScriptInputSchema, R as MoveBgmInput, S as SetBgmInput, T as ReplaceVideoClipSequenceInput, U as DeleteVideoClipsInput, V as moveSpeechesInputSchema, W as anchoredDeletePolicySchema, X as ChangeSpeechScriptInput, Y as deleteBgmInputSchema, Z as ChangeSpeechVoiceInput, _ as setVideoClipSpeedShiftInputSchema, a as speechAssetsSchema, at as adjustSpeechVolumeInputSchema, b as SetCaptionStyleInput, c as mediaIdSchema, ct as AddVideoClipsInput, d as speechIdsSchema, dt as addSpeechesInputSchema, et as AdjustVideoClipVolumeInput, f as speedShiftSchema, g as SetVideoClipSpeedShiftInput, h as volumeSchema, i as SpeechAssets, it as AdjustSpeechVolumeInput, j as moveVideoClipsInputSchema, k as replaceVideoClipContentInputSchema, l as positiveMsSchema, lt as addVideoClipsInputSchema, m as voiceSchema, n as CaptionAsset, nt as AdjustVideoClipDurationInput, o as clipIdSchema, ot as AdjustBgmVolumeInput, p as timelineMsSchema, q as deleteSpeechesInputSchema, r as SpeechAsset, rt as adjustVideoClipDurationInputSchema, s as clipIdsSchema, st as adjustBgmVolumeInputSchema, tt as adjustVideoClipVolumeInputSchema, u as speechIdSchema, ut as AddSpeechesInput, v as SetCaptionVisibilityInput, w as AnchoredReplacePolicy, x as setCaptionStyleInputSchema, y as setCaptionVisibilityInputSchema, z as moveBgmInputSchema } from "./index-
|
|
1
|
+
import { $ as changeSpeechVoiceInputSchema, A as MoveVideoClipsInput, B as MoveSpeechesInput, C as setBgmInputSchema, D as replaceVideoClipSequenceInputSchema, E as anchoredReplacePolicySchema, F as moveAnchorSchema, G as deleteVideoClipsInputSchema, H as AnchoredDeletePolicy, I as moveVideoClipsByAnchorInputSchema, J as DeleteBgmInput, K as DeleteSpeechesInput, L as movedClipAnchoredPolicySchema, M as MoveAnchor, N as MoveVideoClipsByAnchorInput, O as ReplaceVideoClipContentInput, P as MovedClipAnchoredPolicy, Q as changeSpeechScriptInputSchema, R as MoveBgmInput, S as SetBgmInput, T as ReplaceVideoClipSequenceInput, U as DeleteVideoClipsInput, V as moveSpeechesInputSchema, W as anchoredDeletePolicySchema, X as ChangeSpeechScriptInput, Y as deleteBgmInputSchema, Z as ChangeSpeechVoiceInput, _ as setVideoClipSpeedShiftInputSchema, a as speechAssetsSchema, at as adjustSpeechVolumeInputSchema, b as SetCaptionStyleInput, c as mediaIdSchema, ct as AddVideoClipsInput, d as speechIdsSchema, dt as addSpeechesInputSchema, et as AdjustVideoClipVolumeInput, f as speedShiftSchema, g as SetVideoClipSpeedShiftInput, h as volumeSchema, i as SpeechAssets, it as AdjustSpeechVolumeInput, j as moveVideoClipsInputSchema, k as replaceVideoClipContentInputSchema, l as positiveMsSchema, lt as addVideoClipsInputSchema, m as voiceSchema, n as CaptionAsset, nt as AdjustVideoClipDurationInput, o as clipIdSchema, ot as AdjustBgmVolumeInput, p as timelineMsSchema, q as deleteSpeechesInputSchema, r as SpeechAsset, rt as adjustVideoClipDurationInputSchema, s as clipIdsSchema, st as adjustBgmVolumeInputSchema, tt as adjustVideoClipVolumeInputSchema, u as speechIdSchema, ut as AddSpeechesInput, v as SetCaptionVisibilityInput, w as AnchoredReplacePolicy, x as setCaptionStyleInputSchema, y as setCaptionVisibilityInputSchema, z as moveBgmInputSchema } from "./index-CiDSfSMi.js";
|
|
2
2
|
export { AddSpeechesInput, AddVideoClipsInput, AdjustBgmVolumeInput, AdjustSpeechVolumeInput, AdjustVideoClipDurationInput, AdjustVideoClipVolumeInput, AnchoredDeletePolicy, AnchoredReplacePolicy, CaptionAsset, ChangeSpeechScriptInput, ChangeSpeechVoiceInput, DeleteBgmInput, DeleteSpeechesInput, DeleteVideoClipsInput, MoveAnchor, MoveBgmInput, MoveSpeechesInput, MoveVideoClipsByAnchorInput, MoveVideoClipsInput, MovedClipAnchoredPolicy, ReplaceVideoClipContentInput, ReplaceVideoClipSequenceInput, SetBgmInput, SetCaptionStyleInput, SetCaptionVisibilityInput, SetVideoClipSpeedShiftInput, SpeechAsset, SpeechAssets, addSpeechesInputSchema, addVideoClipsInputSchema, adjustBgmVolumeInputSchema, adjustSpeechVolumeInputSchema, adjustVideoClipDurationInputSchema, adjustVideoClipVolumeInputSchema, anchoredDeletePolicySchema, anchoredReplacePolicySchema, changeSpeechScriptInputSchema, changeSpeechVoiceInputSchema, clipIdSchema, clipIdsSchema, deleteBgmInputSchema, deleteSpeechesInputSchema, deleteVideoClipsInputSchema, mediaIdSchema, moveAnchorSchema, moveBgmInputSchema, moveSpeechesInputSchema, moveVideoClipsByAnchorInputSchema, moveVideoClipsInputSchema, movedClipAnchoredPolicySchema, positiveMsSchema, replaceVideoClipContentInputSchema, replaceVideoClipSequenceInputSchema, setBgmInputSchema, setCaptionStyleInputSchema, setCaptionVisibilityInputSchema, setVideoClipSpeedShiftInputSchema, speechAssetsSchema, speechIdSchema, speechIdsSchema, speedShiftSchema, timelineMsSchema, voiceSchema, volumeSchema };
|
package/dist/schemas.js
CHANGED
|
@@ -58,9 +58,15 @@ const speechAssetSchema = z.object({
|
|
|
58
58
|
duration_ms: positiveMsSchema,
|
|
59
59
|
audio_script: z.string(),
|
|
60
60
|
volume: volumeSchema,
|
|
61
|
-
voice: voiceSchema,
|
|
61
|
+
voice: voiceSchema.optional(),
|
|
62
62
|
origin_speech_id: z.string().min(1),
|
|
63
63
|
caption_ids: z.array(z.string().min(1)).describe("Caption part IDs owned by this speech")
|
|
64
|
+
}).superRefine((speech, ctx) => {
|
|
65
|
+
if (speech.audio_storage_key === speech.speech_id || speech.audio_storage_key === speech.origin_speech_id) ctx.addIssue({
|
|
66
|
+
code: z.ZodIssueCode.custom,
|
|
67
|
+
path: ["audio_storage_key"],
|
|
68
|
+
message: "audio_storage_key must be the materialized storage key, not a speech id"
|
|
69
|
+
});
|
|
64
70
|
});
|
|
65
71
|
const captionAssetSchema = z.object({
|
|
66
72
|
caption_id: z.string().min(1).describe("The caption part ID (= side-effect created_caption_parts[].id)"),
|
|
@@ -73,6 +79,21 @@ const captionAssetSchema = z.object({
|
|
|
73
79
|
const speechAssetsSchema = z.object({
|
|
74
80
|
speeches: z.array(speechAssetSchema).min(1).describe("Materialized speech parts to write"),
|
|
75
81
|
captions: z.array(captionAssetSchema).describe("Materialized caption parts owned by the speeches")
|
|
82
|
+
}).superRefine((assets, ctx) => {
|
|
83
|
+
const ownerByStorageKey = /* @__PURE__ */ new Map();
|
|
84
|
+
for (const [index, speech] of assets.speeches.entries()) {
|
|
85
|
+
const owner = ownerByStorageKey.get(speech.audio_storage_key);
|
|
86
|
+
if (owner != null && owner !== speech.speech_id) ctx.addIssue({
|
|
87
|
+
code: z.ZodIssueCode.custom,
|
|
88
|
+
path: [
|
|
89
|
+
"speeches",
|
|
90
|
+
index,
|
|
91
|
+
"audio_storage_key"
|
|
92
|
+
],
|
|
93
|
+
message: "one materialized audio_storage_key must belong to one speech part"
|
|
94
|
+
});
|
|
95
|
+
ownerByStorageKey.set(speech.audio_storage_key, speech.speech_id);
|
|
96
|
+
}
|
|
76
97
|
});
|
|
77
98
|
//#endregion
|
|
78
99
|
//#region src/editor/schemas/add-speeches.ts
|
package/dist/testing.d.ts
CHANGED
package/dist/testing.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as base64ToBytes, K as bytesToBase64, o as createMirrorVideoDocumentAdapter, z as VIDEO_DOCUMENT_SCHEMA_VERSION } from "./document-
|
|
1
|
+
import { G as base64ToBytes, K as bytesToBase64, o as createMirrorVideoDocumentAdapter, z as VIDEO_DOCUMENT_SCHEMA_VERSION } from "./document-C-h5-rCG.js";
|
|
2
2
|
import { t as classifyUpdate } from "./loro-relay-doc-ssdYpuef.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": "1.2.1-alpha.
|
|
3
|
+
"version": "1.2.1-alpha.4",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"immer": "^10.2.0",
|
|
28
28
|
"loro-mirror": "^2.2.0",
|
|
29
29
|
"zod": "^4.4.3",
|
|
30
|
-
"@mengine/storage": "1.2.1-alpha.
|
|
31
|
-
"@mengine/
|
|
32
|
-
"@mengine/
|
|
30
|
+
"@mengine/storage": "1.2.1-alpha.4",
|
|
31
|
+
"@mengine/utils": "1.2.1-alpha.4",
|
|
32
|
+
"@mengine/sync": "1.2.1-alpha.4"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/node": "^25.9.1",
|