@mengine/medeo-client 1.0.0 → 1.0.1-alpha.1

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.
@@ -0,0 +1,2 @@
1
+ import { $ as addSpeechesInputSchema, A as AnchoredDeletePolicy, B as changeSpeechScriptInputSchema, C as setBgmInputSchema, D as moveVideoClipsInputSchema, E as MoveVideoClipsInput, F as deleteSpeechesInputSchema, G as adjustVideoClipDurationInputSchema, H as AdjustVideoClipVolumeInput, I as DeleteBgmInput, J as AdjustBgmVolumeInput, K as AdjustSpeechVolumeInput, L as deleteBgmInputSchema, M as anchoredDeletePolicySchema, N as deleteVideoClipsInputSchema, O as MoveSpeechesInput, P as DeleteSpeechesInput, Q as AddSpeechesInput, R as ChangeSpeechScriptInput, S as SetBgmInput, T as replaceVideoClipContentInputSchema, U as adjustVideoClipVolumeInputSchema, V as changeSpeechVoiceInputSchema, W as AdjustVideoClipDurationInput, X as AddVideoClipsInput, Y as adjustBgmVolumeInputSchema, Z as addVideoClipsInputSchema, _ as setVideoClipSpeedShiftInputSchema, a as speechAssetsSchema, b as SetCaptionStyleInput, c as mediaIdSchema, d as speechIdsSchema, f as speedShiftSchema, g as SetVideoClipSpeedShiftInput, h as volumeSchema, i as SpeechAssets, j as DeleteVideoClipsInput, k as moveSpeechesInputSchema, l as positiveMsSchema, m as voiceSchema, n as CaptionAsset, o as clipIdSchema, p as timelineMsSchema, q as adjustSpeechVolumeInputSchema, r as SpeechAsset, s as clipIdsSchema, u as speechIdSchema, v as SetCaptionVisibilityInput, w as ReplaceVideoClipContentInput, x as setCaptionStyleInputSchema, y as setCaptionVisibilityInputSchema, z as ChangeSpeechVoiceInput } from "./index-6e5cbdM3.js";
2
+ export { AddSpeechesInput, AddVideoClipsInput, AdjustBgmVolumeInput, AdjustSpeechVolumeInput, AdjustVideoClipDurationInput, AdjustVideoClipVolumeInput, AnchoredDeletePolicy, CaptionAsset, ChangeSpeechScriptInput, ChangeSpeechVoiceInput, DeleteBgmInput, DeleteSpeechesInput, DeleteVideoClipsInput, MoveSpeechesInput, MoveVideoClipsInput, ReplaceVideoClipContentInput, SetBgmInput, SetCaptionStyleInput, SetCaptionVisibilityInput, SetVideoClipSpeedShiftInput, SpeechAsset, SpeechAssets, addSpeechesInputSchema, addVideoClipsInputSchema, adjustBgmVolumeInputSchema, adjustSpeechVolumeInputSchema, adjustVideoClipDurationInputSchema, adjustVideoClipVolumeInputSchema, anchoredDeletePolicySchema, changeSpeechScriptInputSchema, changeSpeechVoiceInputSchema, clipIdSchema, clipIdsSchema, deleteBgmInputSchema, deleteSpeechesInputSchema, deleteVideoClipsInputSchema, mediaIdSchema, moveSpeechesInputSchema, moveVideoClipsInputSchema, positiveMsSchema, replaceVideoClipContentInputSchema, setBgmInputSchema, setCaptionStyleInputSchema, setCaptionVisibilityInputSchema, setVideoClipSpeedShiftInputSchema, speechAssetsSchema, speechIdSchema, speechIdsSchema, speedShiftSchema, timelineMsSchema, voiceSchema, volumeSchema };
@@ -0,0 +1,378 @@
1
+ import { t as __exportAll } from "./chunk-D7D4PA-g.js";
2
+ import { z } from "zod";
3
+ //#region src/editor/schemas/shared.ts
4
+ const clipIdSchema = z.string().min(1).describe("The clip part ID on the timeline");
5
+ const clipIdsSchema = z.array(clipIdSchema).min(1).refine((ids) => new Set(ids).size === ids.length, { message: "Duplicate clip IDs are not allowed" }).describe("List of clip part IDs (no duplicates allowed)");
6
+ const mediaIdSchema = z.string().min(1).describe("The media asset ID");
7
+ const speechIdSchema = z.string().min(1).describe("The speech part ID on the timeline");
8
+ const timelineMsSchema = z.number().int().min(0).describe("Time position in milliseconds on the timeline (>= 0)");
9
+ const positiveMsSchema = z.number().int().positive().describe("Duration in milliseconds (> 0)");
10
+ const volumeSchema = z.number().min(-60).max(20).describe("Volume in decibels (-60.0 to 20.0; 0.0 = original, -60 = mute, +20 = max)");
11
+ const speechIdsSchema = z.array(speechIdSchema).min(1).refine((ids) => new Set(ids).size === ids.length, { message: "Duplicate speech IDs are not allowed" }).describe("List of speech part IDs (no duplicates allowed)");
12
+ const tangentHandleSchema = z.object({
13
+ x: z.number().finite(),
14
+ y: z.number().finite()
15
+ }).describe("Bezier tangent handle (x, y)");
16
+ const speedKeyframeSchema = z.object({
17
+ position: z.number().min(0).max(1),
18
+ rate: z.number().min(0),
19
+ in_tangent: tangentHandleSchema.optional(),
20
+ out_tangent: tangentHandleSchema.optional()
21
+ }).describe("A speed keyframe: normalized position (0..1), rate, optional tangents");
22
+ /**
23
+ * A clip's playback-speed fact, the only thing `SetVideoClipSpeedShift` writes.
24
+ * Mirrors the IDL `SpeedShift`: `category` is `linear` | `curve`, and `config`
25
+ * is a discriminated union — `{ linear: { speed } }` for a constant multiplier
26
+ * (the multiplier projection reads at `config.linear.speed`) or `{ curve: {
27
+ * keyframes } }` for a Bezier-controlled variable speed (RFC 02 / `reference/16`
28
+ * §0). Exactly one of `linear` / `curve` is present.
29
+ */
30
+ const speedShiftSchema = z.object({
31
+ category: z.enum(["linear", "curve"]),
32
+ mode: z.string(),
33
+ config: z.union([z.object({ linear: z.object({ speed: z.number().finite().positive() }) }), z.object({ curve: z.object({ keyframes: z.array(speedKeyframeSchema).min(2) }) })])
34
+ }).describe("Speed shift: linear multiplier or Bezier curve, mirroring the IDL shape");
35
+ const voiceSchema = z.object({
36
+ id: z.string().min(1),
37
+ name: z.string()
38
+ }).describe("TTS voice summary attached to a speech");
39
+ //#endregion
40
+ //#region src/editor/schemas/speech-assets.ts
41
+ /**
42
+ * The materialized TTS result shared by `AddSpeeches` / `ChangeSpeechScript` /
43
+ * `ChangeSpeechVoice` (see `results/phase-4-side-effect-payload-contract.md`
44
+ * §1/§2). The side effect (TTS/ASR + billing) runs upstream; the op receives the
45
+ * stable speech + caption parts and writes them as authoritative facts. No
46
+ * cascade runs on write — the projection derives absolute positions on read.
47
+ *
48
+ * Each speech carries the anchoring fact directly (RFC 02 §4): the host video
49
+ * clip `anchor_part_id` and the `offset_ms` within it. The upstream caller
50
+ * already knows which clip a speech attaches to, so the op writes
51
+ * `{ mode:'anchored', anchorPartId, offsetMs }` verbatim — no write-time
52
+ * host-picking. Captions anchor to their speech via the caption part's
53
+ * `start_ms` (offset within the speech).
54
+ */
55
+ const speechAssetSchema = z.object({
56
+ speech_id: speechIdSchema.describe("The speech part ID (= side-effect speech_parts[].id)"),
57
+ anchor_part_id: clipIdSchema.describe("Host video clip part ID the speech anchors to (RFC 02 §4)"),
58
+ offset_ms: timelineMsSchema.describe("Offset within the host clip (speech.abs = host.abs + offset_ms)"),
59
+ audio_storage_key: z.string().min(1),
60
+ duration_ms: positiveMsSchema,
61
+ audio_script: z.string(),
62
+ volume: volumeSchema,
63
+ voice: voiceSchema,
64
+ origin_speech_id: z.string().min(1),
65
+ caption_ids: z.array(z.string().min(1)).describe("Caption part IDs owned by this speech")
66
+ });
67
+ const captionAssetSchema = z.object({
68
+ caption_id: z.string().min(1).describe("The caption part ID (= side-effect created_caption_parts[].id)"),
69
+ speech_part_id: speechIdSchema.describe("The owning speech part ID"),
70
+ text: z.string(),
71
+ start_ms: timelineMsSchema.describe("Offset within the host speech (caption.abs = speech.abs + start_ms)"),
72
+ duration_ms: positiveMsSchema
73
+ });
74
+ /** A materialized speech-subtree write (speeches + their captions). */
75
+ const speechAssetsSchema = z.object({
76
+ speeches: z.array(speechAssetSchema).min(1).describe("Materialized speech parts to write"),
77
+ captions: z.array(captionAssetSchema).describe("Materialized caption parts owned by the speeches")
78
+ });
79
+ //#endregion
80
+ //#region src/editor/schemas/add-speeches.ts
81
+ /**
82
+ * Add speeches (and their captions). TTS runs upstream; the stable speech /
83
+ * caption parts arrive materialized (see `speech-assets.ts`). The op writes the
84
+ * parts and each speech's `{ mode:'anchored', anchorPartId, offsetMs }` fact
85
+ * verbatim — no write-time host-picking, no cascade (RFC 02 §4). The projection
86
+ * derives absolute positions on read.
87
+ */
88
+ const addSpeechesInputSchema = speechAssetsSchema.describe("Materialized speeches + captions to add");
89
+ //#endregion
90
+ //#region src/editor/schemas/add-video-clips.ts
91
+ /**
92
+ * Add video clips to a track. Each clip's duration facts are separated so a
93
+ * single number is never overloaded (RFC 02 / `reference/16` §0b):
94
+ *
95
+ * - `media_duration_ms` is the source media's intrinsic full length (a resource
96
+ * fact, written to the part);
97
+ * - `play_in` / `play_out` are the optional trim window into that media; when
98
+ * omitted the whole media is used (`play_in=0`, `play_out=media_duration_ms`).
99
+ *
100
+ * The clip's effective timeline duration is derived by the projection from the
101
+ * trim window and `speed_shift` — it is never an input here.
102
+ */
103
+ const addVideoClipsInputSchema = z.object({
104
+ clips: z.array(z.object({
105
+ media_id: mediaIdSchema.describe("The media asset ID for the video clip"),
106
+ start_ms: timelineMsSchema.optional().describe("Absolute start time in milliseconds on the timeline"),
107
+ media_duration_ms: positiveMsSchema.describe("The source media's intrinsic full length in ms"),
108
+ play_in: timelineMsSchema.optional().describe("Trim window start in the media (default 0)"),
109
+ play_out: positiveMsSchema.optional().describe("Trim window end in the media (default media_duration_ms)"),
110
+ track_id: z.string().min(1).optional().describe("Target track ID (optional, defaults to main track)")
111
+ })).min(1).describe("List of video clips to create"),
112
+ before_clip_id: z.string().min(1).optional().describe("Insert new clips before this clip ID"),
113
+ after_clip_id: z.string().min(1).optional().describe("Insert new clips after this clip ID")
114
+ }).superRefine((data, ctx) => {
115
+ if (data.before_clip_id != null && data.after_clip_id != null) {
116
+ ctx.addIssue({
117
+ code: z.ZodIssueCode.custom,
118
+ message: "Cannot provide both before_clip_id and after_clip_id"
119
+ });
120
+ return;
121
+ }
122
+ const hasRelative = data.before_clip_id != null || data.after_clip_id != null;
123
+ for (let i = 0; i < data.clips.length; i++) {
124
+ const clip = data.clips[i];
125
+ if (hasRelative && clip.start_ms != null) ctx.addIssue({
126
+ code: z.ZodIssueCode.custom,
127
+ message: `clips[${i}].start_ms must not be provided when using before_clip_id or after_clip_id`,
128
+ path: [
129
+ "clips",
130
+ i,
131
+ "start_ms"
132
+ ]
133
+ });
134
+ if (!hasRelative && clip.start_ms == null) ctx.addIssue({
135
+ code: z.ZodIssueCode.custom,
136
+ message: `clips[${i}].start_ms is required when not using relative positioning`,
137
+ path: [
138
+ "clips",
139
+ i,
140
+ "start_ms"
141
+ ]
142
+ });
143
+ const playIn = clip.play_in ?? 0;
144
+ const playOut = clip.play_out ?? clip.media_duration_ms;
145
+ if (playOut > clip.media_duration_ms) ctx.addIssue({
146
+ code: z.ZodIssueCode.custom,
147
+ message: `clips[${i}].play_out ${playOut}ms exceeds media_duration_ms ${clip.media_duration_ms}ms`,
148
+ path: [
149
+ "clips",
150
+ i,
151
+ "play_out"
152
+ ]
153
+ });
154
+ if (playIn >= playOut) ctx.addIssue({
155
+ code: z.ZodIssueCode.custom,
156
+ message: `clips[${i}].play_in ${playIn}ms must be less than play_out ${playOut}ms`,
157
+ path: [
158
+ "clips",
159
+ i,
160
+ "play_in"
161
+ ]
162
+ });
163
+ }
164
+ });
165
+ //#endregion
166
+ //#region src/editor/schemas/adjust-bgm-volume.ts
167
+ const adjustBgmVolumeInputSchema = z.object({ bgm: z.array(z.object({
168
+ bgm_id: clipIdSchema.describe("The bgm part ID to adjust volume for"),
169
+ volume: volumeSchema.describe("Volume in decibels (-60.0 to 20.0; 0.0 = original)")
170
+ })).min(1).describe("List of bgm parts with their new volume settings") });
171
+ //#endregion
172
+ //#region src/editor/schemas/adjust-speech-volume.ts
173
+ const adjustSpeechVolumeInputSchema = z.object({ speeches: z.array(z.object({
174
+ speech_id: speechIdSchema.describe("The speech part ID to adjust volume for"),
175
+ volume: volumeSchema.describe("Volume in decibels (-60.0 to 20.0; 0.0 = original)")
176
+ })).min(1).describe("List of speeches with their new volume settings") });
177
+ //#endregion
178
+ //#region src/editor/schemas/adjust-video-clip-duration.ts
179
+ /**
180
+ * Re-trim existing video clips (the user-facing "adjust duration" gesture is a
181
+ * trim of the source window). The new `play_in` / `play_out` are the facts; the
182
+ * effective timeline duration is derived from them and the clip's `speed_shift`,
183
+ * and the change reflows downstream clips, speeches, and the timeline inside the
184
+ * op's transaction (no caller-materialized cascade).
185
+ */
186
+ const adjustVideoClipDurationInputSchema = z.object({ clips: z.array(z.object({
187
+ clip_id: clipIdSchema.describe("The video clip part ID to re-trim"),
188
+ play_in: timelineMsSchema.describe("New trim window start in the source media"),
189
+ play_out: positiveMsSchema.describe("New trim window end in the source media")
190
+ })).min(1).describe("Video clips with their new trim windows") });
191
+ //#endregion
192
+ //#region src/editor/schemas/adjust-video-clip-volume.ts
193
+ const adjustVideoClipVolumeInputSchema = z.object({ clips: z.array(z.object({
194
+ clip_id: clipIdSchema.describe("The video clip part ID to adjust volume for"),
195
+ volume: volumeSchema.describe("Volume in decibels (-60.0 to 20.0; 0.0 = original)")
196
+ })).min(1).describe("List of video clips with their new volume settings") });
197
+ //#endregion
198
+ //#region src/editor/schemas/change-speech.ts
199
+ /**
200
+ * Change a speech's script or voice. Both re-run TTS upstream and return the
201
+ * regenerated speech / caption parts in the same materialized shape as
202
+ * `AddSpeeches` (`speech-assets.ts`); the op upserts them by id (the speech part
203
+ * id is preserved across a re-TTS), re-seats at `start_ms`, and reflows. Old
204
+ * caption parts no longer owned by the speech are removed via `caption_ids`.
205
+ */
206
+ const changeSpeechScriptInputSchema = speechAssetsSchema.describe("Regenerated speeches + captions (new script)");
207
+ const changeSpeechVoiceInputSchema = speechAssetsSchema.describe("Regenerated speeches + captions (new voice)");
208
+ //#endregion
209
+ //#region src/editor/schemas/delete-bgm.ts
210
+ /**
211
+ * Remove the document BGM. Pure document edit: clears the bgm lane and removes
212
+ * the bgm part. Takes no input (a document holds at most one bgm); an empty
213
+ * object keeps the op signature uniform with the rest.
214
+ */
215
+ const deleteBgmInputSchema = z.object({}).describe("Remove the document BGM (no parameters)");
216
+ //#endregion
217
+ //#region src/editor/schemas/delete-speeches.ts
218
+ /**
219
+ * Delete speeches with their captions. Pure document edit (no side effect): the
220
+ * op removes each speech part, cascade-deletes the captions it owns (via
221
+ * `caption_ids` / `speech_part_id`), drops their track items, and reflows.
222
+ */
223
+ const deleteSpeechesInputSchema = z.object({ speech_ids: speechIdsSchema.describe("Speech part IDs to delete (their captions cascade-delete)") });
224
+ //#endregion
225
+ //#region src/editor/schemas/delete-video-clips.ts
226
+ /**
227
+ * How a delete handles the anchored subtree (speeches anchored to a deleted clip,
228
+ * and their captions) — a delete-op policy, not a data-model field (reference/17
229
+ * §6). `cascade` (default) removes the subtree; `detach` keeps the direct
230
+ * anchored children, re-pinning them to `absolute` so they stay on the timeline.
231
+ */
232
+ const anchoredDeletePolicySchema = z.enum(["cascade", "detach"]);
233
+ const deleteVideoClipsInputSchema = z.object({
234
+ clip_ids: clipIdsSchema.describe("List of video clip part IDs to delete from the main track"),
235
+ on_anchored: anchoredDeletePolicySchema.optional().describe("How to treat anchored children (default cascade)")
236
+ });
237
+ //#endregion
238
+ //#region src/editor/schemas/move-speeches.ts
239
+ /**
240
+ * Move speeches in time. Pure document edit: the op re-seats each speech at its
241
+ * new absolute `start_ms`; the cascade reassigns it to the host video clip,
242
+ * resolves overlaps, and reflows. Captions follow their speech.
243
+ */
244
+ const moveSpeechesInputSchema = z.object({ speeches: z.array(z.object({
245
+ speech_id: speechIdSchema.describe("The speech part ID to move"),
246
+ new_start_ms: timelineMsSchema.describe("New absolute start time on the timeline")
247
+ })).min(1).describe("Speeches to move to new positions") });
248
+ //#endregion
249
+ //#region src/editor/schemas/move-video-clips.ts
250
+ const moveVideoClipsInputSchema = z.object({ clips: z.array(z.object({
251
+ clip_id: clipIdSchema.describe("The video clip part ID to move"),
252
+ new_start_ms: timelineMsSchema.describe("New absolute start time in milliseconds on the timeline"),
253
+ new_track_id: z.string().min(1).optional().describe("Target track ID to move the clip to (optional)")
254
+ })).min(1).describe("List of video clips to move to new positions") });
255
+ //#endregion
256
+ //#region src/editor/schemas/replace-video-clip-content.ts
257
+ /**
258
+ * Replace the media backing existing video clips. The media import runs upstream
259
+ * (Director); its stable result — the new media id, intrinsic length, and the
260
+ * reset trim window — arrives materialized (see
261
+ * `results/phase-4-side-effect-payload-contract.md` §4). Director resets
262
+ * `play_in=0` / `play_out=media_duration_ms` and clears `speed_shift` on
263
+ * replacement. The clip `part_id`s (hence their track items) are unchanged; the
264
+ * editor reflows the main track from the new effective durations.
265
+ */
266
+ const replaceVideoClipContentInputSchema = z.object({ clips: z.array(z.object({
267
+ clip_id: clipIdSchema.describe("Existing video clip part ID to re-point"),
268
+ origin_media_id: mediaIdSchema.describe("The new media asset ID"),
269
+ media_duration_ms: positiveMsSchema.describe("The new media's intrinsic full length"),
270
+ play_in: timelineMsSchema.describe("Trim window start in the new media (usually 0)"),
271
+ play_out: positiveMsSchema.describe("Trim window end in the new media (usually = media_duration_ms)"),
272
+ volume: volumeSchema
273
+ })).min(1).describe("Video clips whose media is being replaced") });
274
+ //#endregion
275
+ //#region src/editor/schemas/set-bgm.ts
276
+ /**
277
+ * Set the document BGM. The media's stable result (storage key) arrives
278
+ * materialized from upstream (see
279
+ * `results/phase-4-side-effect-payload-contract.md` §3). The op upserts the bgm
280
+ * part and seats it on the bgm lane; its effective length is always the whole
281
+ * timeline, derived by the projection on read — so there is no `duration_ms`
282
+ * input or fact (RFC 02 / `reference/16` §0b). A `bgm_id` lets the op replace an
283
+ * existing bgm part by id.
284
+ */
285
+ const setBgmInputSchema = z.object({
286
+ bgm_id: z.string().min(1).describe("The bgm part ID to write"),
287
+ audio_storage_key: z.string().min(1),
288
+ origin_media_id: mediaIdSchema,
289
+ volume: volumeSchema
290
+ });
291
+ //#endregion
292
+ //#region src/editor/schemas/set-caption-style.ts
293
+ /**
294
+ * Set the caption visual style. GLOBAL by design: the style applies to every
295
+ * caption part in the document — it carries NO `caption_id`. This mirrors the FE,
296
+ * whose caption-style store (`caption-style.ts:persistCaptionStylePatch`) iterates
297
+ * ALL captions and writes the same normalized style to each; the product has a
298
+ * single document-wide caption style, not per-caption styling.
299
+ *
300
+ * Every field is optional and maps to a `CaptionStyle` attribute (snake_case
301
+ * IDL). A field present in the input is written to every caption; a field ABSENT
302
+ * from the input is left untouched on each caption (the editor merges the patch
303
+ * onto each caption's existing style — this is a value edit, not a full-style
304
+ * replace, so a partial patch such as "recolor only" does not wipe font size).
305
+ *
306
+ * Pure document edit, no cascade — captions keep their positions; only the style
307
+ * sub-map of each caption part changes.
308
+ */
309
+ const setCaptionStyleInputSchema = z.object({
310
+ font_id: z.string().min(1).optional().describe("Font ID referencing a font from the font library"),
311
+ font_size: z.number().positive().optional().describe("Font size in points"),
312
+ font_color: z.string().min(1).optional().describe("Font color as hex string, e.g. \"#FFFFFF\""),
313
+ font_weight: z.number().int().optional().describe("Numeric font weight, e.g. 400 or 700"),
314
+ entrance_animation: z.string().optional().describe("Entrance animation preset ID, e.g. \"fade\" or \"none\""),
315
+ entrance_animation_duration_ms: z.number().min(0).optional().describe("Entrance animation duration in ms"),
316
+ stroke_color: z.string().min(1).optional().describe("Outline/stroke color as hex string, e.g. \"#000000\""),
317
+ stroke_width: z.number().min(0).optional().describe("Outline/stroke width in pixels"),
318
+ position_x: z.number().optional().describe("Caption center X as a fraction (0.0 to 1.0)"),
319
+ position_y: z.number().optional().describe("Caption center Y as a fraction (0.0 to 1.0)")
320
+ }).describe("Document-wide caption style patch (no caption_id; applies to every caption)");
321
+ //#endregion
322
+ //#region src/editor/schemas/set-caption-visibility.ts
323
+ /**
324
+ * Toggle caption visibility (the caption track's `is_hidden` flag). Pure
325
+ * document edit, no cascade — captions keep their positions; only the lane's
326
+ * hidden flag changes.
327
+ */
328
+ const setCaptionVisibilityInputSchema = z.object({ is_hidden: z.boolean().describe("Whether the caption track is hidden") });
329
+ //#endregion
330
+ //#region src/editor/schemas/set-video-clip-speed-shift.ts
331
+ /**
332
+ * Set the playback speed of existing video clips. Per the speed-shift decision
333
+ * (`reference/16` §0): the op writes only the `speed_shift` fact — it does NOT
334
+ * store an effective `duration_ms` (projection derives it from the trim window /
335
+ * speed) and does NOT scale anchored speeches' relative offsets (offsets stay
336
+ * put; the cascade reflows absolute positions). A `null` speed_shift clears the
337
+ * speed back to original (1×).
338
+ */
339
+ const setVideoClipSpeedShiftInputSchema = z.object({ clips: z.array(z.object({
340
+ clip_id: clipIdSchema.describe("The video clip part ID to set speed for"),
341
+ speed_shift: speedShiftSchema.nullable().describe("The new speed setting, or null to reset to 1×")
342
+ })).min(1).describe("Video clips with their new speed settings") });
343
+ //#endregion
344
+ //#region src/editor/schemas/index.ts
345
+ var schemas_exports = /* @__PURE__ */ __exportAll({
346
+ addSpeechesInputSchema: () => addSpeechesInputSchema,
347
+ addVideoClipsInputSchema: () => addVideoClipsInputSchema,
348
+ adjustBgmVolumeInputSchema: () => adjustBgmVolumeInputSchema,
349
+ adjustSpeechVolumeInputSchema: () => adjustSpeechVolumeInputSchema,
350
+ adjustVideoClipDurationInputSchema: () => adjustVideoClipDurationInputSchema,
351
+ adjustVideoClipVolumeInputSchema: () => adjustVideoClipVolumeInputSchema,
352
+ anchoredDeletePolicySchema: () => anchoredDeletePolicySchema,
353
+ changeSpeechScriptInputSchema: () => changeSpeechScriptInputSchema,
354
+ changeSpeechVoiceInputSchema: () => changeSpeechVoiceInputSchema,
355
+ clipIdSchema: () => clipIdSchema,
356
+ clipIdsSchema: () => clipIdsSchema,
357
+ deleteBgmInputSchema: () => deleteBgmInputSchema,
358
+ deleteSpeechesInputSchema: () => deleteSpeechesInputSchema,
359
+ deleteVideoClipsInputSchema: () => deleteVideoClipsInputSchema,
360
+ mediaIdSchema: () => mediaIdSchema,
361
+ moveSpeechesInputSchema: () => moveSpeechesInputSchema,
362
+ moveVideoClipsInputSchema: () => moveVideoClipsInputSchema,
363
+ positiveMsSchema: () => positiveMsSchema,
364
+ replaceVideoClipContentInputSchema: () => replaceVideoClipContentInputSchema,
365
+ setBgmInputSchema: () => setBgmInputSchema,
366
+ setCaptionStyleInputSchema: () => setCaptionStyleInputSchema,
367
+ setCaptionVisibilityInputSchema: () => setCaptionVisibilityInputSchema,
368
+ setVideoClipSpeedShiftInputSchema: () => setVideoClipSpeedShiftInputSchema,
369
+ speechAssetsSchema: () => speechAssetsSchema,
370
+ speechIdSchema: () => speechIdSchema,
371
+ speechIdsSchema: () => speechIdsSchema,
372
+ speedShiftSchema: () => speedShiftSchema,
373
+ timelineMsSchema: () => timelineMsSchema,
374
+ voiceSchema: () => voiceSchema,
375
+ volumeSchema: () => volumeSchema
376
+ });
377
+ //#endregion
378
+ export { addSpeechesInputSchema, addVideoClipsInputSchema, adjustBgmVolumeInputSchema, adjustSpeechVolumeInputSchema, adjustVideoClipDurationInputSchema, adjustVideoClipVolumeInputSchema, anchoredDeletePolicySchema, changeSpeechScriptInputSchema, changeSpeechVoiceInputSchema, clipIdSchema, clipIdsSchema, deleteBgmInputSchema, deleteSpeechesInputSchema, deleteVideoClipsInputSchema, mediaIdSchema, moveSpeechesInputSchema, moveVideoClipsInputSchema, positiveMsSchema, replaceVideoClipContentInputSchema, setBgmInputSchema, setCaptionStyleInputSchema, setCaptionVisibilityInputSchema, setVideoClipSpeedShiftInputSchema, speechAssetsSchema, speechIdSchema, speechIdsSchema, speedShiftSchema, schemas_exports as t, timelineMsSchema, voiceSchema, volumeSchema };
@@ -0,0 +1,46 @@
1
+ import { c as MirrorVideoDocumentAdapter, it as VideoDraft } from "./index-DRUGsbm2.js";
2
+
3
+ //#region src/testing/in-memory-mengine-server.d.ts
4
+ /**
5
+ * In-memory stand-in for `mengine-server`, exposed as a `fetchImpl`.
6
+ *
7
+ * It models the surface the client runtime uses under the Loro-native protocol
8
+ * (Phase 5 §A1.5): snapshot, VV-diff pull (`GET .../sync?from=<vv b64>`), update
9
+ * push with an `update_seq` ack, and an SSE `events` stream that broadcasts each
10
+ * new update with its metadata — so multiple runtimes can converge through one
11
+ * shared server without a real HTTP host. It is a test double, not a persistence
12
+ * model: state lives in process and dies with it.
13
+ */
14
+ declare class InMemoryMengineServer {
15
+ private readonly doc;
16
+ private readonly updates;
17
+ private readonly subscribers;
18
+ private seq;
19
+ private hasSnapshot;
20
+ /**
21
+ * Close every open SSE stream, simulating a network drop. Clients reconnect
22
+ * (a fresh `/events`) and catch up via their next sync — used to exercise
23
+ * disconnect recovery.
24
+ */
25
+ dropStreams(): void;
26
+ readonly fetchImpl: typeof fetch;
27
+ private parsePath;
28
+ private version;
29
+ private handleSnapshot;
30
+ private handleBootstrap;
31
+ private handleSync;
32
+ private handlePush;
33
+ private handleEvents;
34
+ }
35
+ //#endregion
36
+ //#region src/testing/index.d.ts
37
+ declare const ACTOR_TEST = "1001";
38
+ interface SeedOptions {
39
+ parts?: Record<string, Record<string, unknown>>;
40
+ mainTrack?: string[];
41
+ }
42
+ declare function createTestDraft(): VideoDraft;
43
+ declare function createSeededDoc(docId: string, opts?: SeedOptions, actor?: `${number}`): MirrorVideoDocumentAdapter;
44
+ declare function mainTrackPartIds(doc: MirrorVideoDocumentAdapter): string[];
45
+ //#endregion
46
+ export { ACTOR_TEST, InMemoryMengineServer, SeedOptions, createSeededDoc, createTestDraft, mainTrackPartIds };