@mengine/medeo-client 1.0.0 → 1.0.1-alpha.0
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-DgffKwRw.js +1593 -0
- package/dist/index-6e5cbdM3.d.ts +475 -0
- package/dist/index-DRUGsbm2.d.ts +1421 -0
- package/dist/index.d.ts +28 -1813
- package/dist/index.js +124 -1900
- package/dist/schemas.d.ts +2 -0
- package/dist/schemas.js +378 -0
- package/dist/testing.d.ts +46 -0
- package/dist/testing.js +339 -0
- package/package.json +8 -4
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/editor/schemas/add-speeches.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Add speeches (and their captions). TTS runs upstream; the stable speech /
|
|
6
|
+
* caption parts arrive materialized (see `speech-assets.ts`). The op writes the
|
|
7
|
+
* parts and each speech's `{ mode:'anchored', anchorPartId, offsetMs }` fact
|
|
8
|
+
* verbatim — no write-time host-picking, no cascade (RFC 02 §4). The projection
|
|
9
|
+
* derives absolute positions on read.
|
|
10
|
+
*/
|
|
11
|
+
declare const addSpeechesInputSchema: z.ZodObject<{
|
|
12
|
+
speeches: z.ZodArray<z.ZodObject<{
|
|
13
|
+
speech_id: z.ZodString;
|
|
14
|
+
anchor_part_id: z.ZodString;
|
|
15
|
+
offset_ms: z.ZodNumber;
|
|
16
|
+
audio_storage_key: z.ZodString;
|
|
17
|
+
duration_ms: z.ZodNumber;
|
|
18
|
+
audio_script: z.ZodString;
|
|
19
|
+
volume: z.ZodNumber;
|
|
20
|
+
voice: z.ZodObject<{
|
|
21
|
+
id: z.ZodString;
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
origin_speech_id: z.ZodString;
|
|
25
|
+
caption_ids: z.ZodArray<z.ZodString>;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
captions: z.ZodArray<z.ZodObject<{
|
|
28
|
+
caption_id: z.ZodString;
|
|
29
|
+
speech_part_id: z.ZodString;
|
|
30
|
+
text: z.ZodString;
|
|
31
|
+
start_ms: z.ZodNumber;
|
|
32
|
+
duration_ms: z.ZodNumber;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
type AddSpeechesInput = z.infer<typeof addSpeechesInputSchema>;
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/editor/schemas/add-video-clips.d.ts
|
|
38
|
+
/**
|
|
39
|
+
* Add video clips to a track. Each clip's duration facts are separated so a
|
|
40
|
+
* single number is never overloaded (RFC 02 / `reference/16` §0b):
|
|
41
|
+
*
|
|
42
|
+
* - `media_duration_ms` is the source media's intrinsic full length (a resource
|
|
43
|
+
* fact, written to the part);
|
|
44
|
+
* - `play_in` / `play_out` are the optional trim window into that media; when
|
|
45
|
+
* omitted the whole media is used (`play_in=0`, `play_out=media_duration_ms`).
|
|
46
|
+
*
|
|
47
|
+
* The clip's effective timeline duration is derived by the projection from the
|
|
48
|
+
* trim window and `speed_shift` — it is never an input here.
|
|
49
|
+
*/
|
|
50
|
+
declare const addVideoClipsInputSchema: z.ZodObject<{
|
|
51
|
+
clips: z.ZodArray<z.ZodObject<{
|
|
52
|
+
media_id: z.ZodString;
|
|
53
|
+
start_ms: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
media_duration_ms: z.ZodNumber;
|
|
55
|
+
play_in: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
play_out: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
track_id: z.ZodOptional<z.ZodString>;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
before_clip_id: z.ZodOptional<z.ZodString>;
|
|
60
|
+
after_clip_id: z.ZodOptional<z.ZodString>;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
type AddVideoClipsInput = z.infer<typeof addVideoClipsInputSchema>;
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/editor/schemas/adjust-bgm-volume.d.ts
|
|
65
|
+
declare const adjustBgmVolumeInputSchema: z.ZodObject<{
|
|
66
|
+
bgm: z.ZodArray<z.ZodObject<{
|
|
67
|
+
bgm_id: z.ZodString;
|
|
68
|
+
volume: z.ZodNumber;
|
|
69
|
+
}, z.core.$strip>>;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
type AdjustBgmVolumeInput = z.infer<typeof adjustBgmVolumeInputSchema>;
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/editor/schemas/adjust-speech-volume.d.ts
|
|
74
|
+
declare const adjustSpeechVolumeInputSchema: z.ZodObject<{
|
|
75
|
+
speeches: z.ZodArray<z.ZodObject<{
|
|
76
|
+
speech_id: z.ZodString;
|
|
77
|
+
volume: z.ZodNumber;
|
|
78
|
+
}, z.core.$strip>>;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
type AdjustSpeechVolumeInput = z.infer<typeof adjustSpeechVolumeInputSchema>;
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region src/editor/schemas/adjust-video-clip-duration.d.ts
|
|
83
|
+
/**
|
|
84
|
+
* Re-trim existing video clips (the user-facing "adjust duration" gesture is a
|
|
85
|
+
* trim of the source window). The new `play_in` / `play_out` are the facts; the
|
|
86
|
+
* effective timeline duration is derived from them and the clip's `speed_shift`,
|
|
87
|
+
* and the change reflows downstream clips, speeches, and the timeline inside the
|
|
88
|
+
* op's transaction (no caller-materialized cascade).
|
|
89
|
+
*/
|
|
90
|
+
declare const adjustVideoClipDurationInputSchema: z.ZodObject<{
|
|
91
|
+
clips: z.ZodArray<z.ZodObject<{
|
|
92
|
+
clip_id: z.ZodString;
|
|
93
|
+
play_in: z.ZodNumber;
|
|
94
|
+
play_out: z.ZodNumber;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
type AdjustVideoClipDurationInput = z.infer<typeof adjustVideoClipDurationInputSchema>;
|
|
98
|
+
//#endregion
|
|
99
|
+
//#region src/editor/schemas/adjust-video-clip-volume.d.ts
|
|
100
|
+
declare const adjustVideoClipVolumeInputSchema: z.ZodObject<{
|
|
101
|
+
clips: z.ZodArray<z.ZodObject<{
|
|
102
|
+
clip_id: z.ZodString;
|
|
103
|
+
volume: z.ZodNumber;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
type AdjustVideoClipVolumeInput = z.infer<typeof adjustVideoClipVolumeInputSchema>;
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region src/editor/schemas/change-speech.d.ts
|
|
109
|
+
/**
|
|
110
|
+
* Change a speech's script or voice. Both re-run TTS upstream and return the
|
|
111
|
+
* regenerated speech / caption parts in the same materialized shape as
|
|
112
|
+
* `AddSpeeches` (`speech-assets.ts`); the op upserts them by id (the speech part
|
|
113
|
+
* id is preserved across a re-TTS), re-seats at `start_ms`, and reflows. Old
|
|
114
|
+
* caption parts no longer owned by the speech are removed via `caption_ids`.
|
|
115
|
+
*/
|
|
116
|
+
declare const changeSpeechScriptInputSchema: z.ZodObject<{
|
|
117
|
+
speeches: z.ZodArray<z.ZodObject<{
|
|
118
|
+
speech_id: z.ZodString;
|
|
119
|
+
anchor_part_id: z.ZodString;
|
|
120
|
+
offset_ms: z.ZodNumber;
|
|
121
|
+
audio_storage_key: z.ZodString;
|
|
122
|
+
duration_ms: z.ZodNumber;
|
|
123
|
+
audio_script: z.ZodString;
|
|
124
|
+
volume: z.ZodNumber;
|
|
125
|
+
voice: z.ZodObject<{
|
|
126
|
+
id: z.ZodString;
|
|
127
|
+
name: z.ZodString;
|
|
128
|
+
}, z.core.$strip>;
|
|
129
|
+
origin_speech_id: z.ZodString;
|
|
130
|
+
caption_ids: z.ZodArray<z.ZodString>;
|
|
131
|
+
}, z.core.$strip>>;
|
|
132
|
+
captions: z.ZodArray<z.ZodObject<{
|
|
133
|
+
caption_id: z.ZodString;
|
|
134
|
+
speech_part_id: z.ZodString;
|
|
135
|
+
text: z.ZodString;
|
|
136
|
+
start_ms: z.ZodNumber;
|
|
137
|
+
duration_ms: z.ZodNumber;
|
|
138
|
+
}, z.core.$strip>>;
|
|
139
|
+
}, z.core.$strip>;
|
|
140
|
+
declare const changeSpeechVoiceInputSchema: z.ZodObject<{
|
|
141
|
+
speeches: z.ZodArray<z.ZodObject<{
|
|
142
|
+
speech_id: z.ZodString;
|
|
143
|
+
anchor_part_id: z.ZodString;
|
|
144
|
+
offset_ms: z.ZodNumber;
|
|
145
|
+
audio_storage_key: z.ZodString;
|
|
146
|
+
duration_ms: z.ZodNumber;
|
|
147
|
+
audio_script: z.ZodString;
|
|
148
|
+
volume: z.ZodNumber;
|
|
149
|
+
voice: z.ZodObject<{
|
|
150
|
+
id: z.ZodString;
|
|
151
|
+
name: z.ZodString;
|
|
152
|
+
}, z.core.$strip>;
|
|
153
|
+
origin_speech_id: z.ZodString;
|
|
154
|
+
caption_ids: z.ZodArray<z.ZodString>;
|
|
155
|
+
}, z.core.$strip>>;
|
|
156
|
+
captions: z.ZodArray<z.ZodObject<{
|
|
157
|
+
caption_id: z.ZodString;
|
|
158
|
+
speech_part_id: z.ZodString;
|
|
159
|
+
text: z.ZodString;
|
|
160
|
+
start_ms: z.ZodNumber;
|
|
161
|
+
duration_ms: z.ZodNumber;
|
|
162
|
+
}, z.core.$strip>>;
|
|
163
|
+
}, z.core.$strip>;
|
|
164
|
+
type ChangeSpeechScriptInput = z.infer<typeof changeSpeechScriptInputSchema>;
|
|
165
|
+
type ChangeSpeechVoiceInput = z.infer<typeof changeSpeechVoiceInputSchema>;
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region src/editor/schemas/delete-bgm.d.ts
|
|
168
|
+
/**
|
|
169
|
+
* Remove the document BGM. Pure document edit: clears the bgm lane and removes
|
|
170
|
+
* the bgm part. Takes no input (a document holds at most one bgm); an empty
|
|
171
|
+
* object keeps the op signature uniform with the rest.
|
|
172
|
+
*/
|
|
173
|
+
declare const deleteBgmInputSchema: z.ZodObject<{}, z.core.$strip>;
|
|
174
|
+
type DeleteBgmInput = z.infer<typeof deleteBgmInputSchema>;
|
|
175
|
+
//#endregion
|
|
176
|
+
//#region src/editor/schemas/delete-speeches.d.ts
|
|
177
|
+
/**
|
|
178
|
+
* Delete speeches with their captions. Pure document edit (no side effect): the
|
|
179
|
+
* op removes each speech part, cascade-deletes the captions it owns (via
|
|
180
|
+
* `caption_ids` / `speech_part_id`), drops their track items, and reflows.
|
|
181
|
+
*/
|
|
182
|
+
declare const deleteSpeechesInputSchema: z.ZodObject<{
|
|
183
|
+
speech_ids: z.ZodArray<z.ZodString>;
|
|
184
|
+
}, z.core.$strip>;
|
|
185
|
+
type DeleteSpeechesInput = z.infer<typeof deleteSpeechesInputSchema>;
|
|
186
|
+
//#endregion
|
|
187
|
+
//#region src/editor/schemas/delete-video-clips.d.ts
|
|
188
|
+
/**
|
|
189
|
+
* How a delete handles the anchored subtree (speeches anchored to a deleted clip,
|
|
190
|
+
* and their captions) — a delete-op policy, not a data-model field (reference/17
|
|
191
|
+
* §6). `cascade` (default) removes the subtree; `detach` keeps the direct
|
|
192
|
+
* anchored children, re-pinning them to `absolute` so they stay on the timeline.
|
|
193
|
+
*/
|
|
194
|
+
declare const anchoredDeletePolicySchema: z.ZodEnum<{
|
|
195
|
+
cascade: "cascade";
|
|
196
|
+
detach: "detach";
|
|
197
|
+
}>;
|
|
198
|
+
type AnchoredDeletePolicy = z.infer<typeof anchoredDeletePolicySchema>;
|
|
199
|
+
declare const deleteVideoClipsInputSchema: z.ZodObject<{
|
|
200
|
+
clip_ids: z.ZodArray<z.ZodString>;
|
|
201
|
+
on_anchored: z.ZodOptional<z.ZodEnum<{
|
|
202
|
+
cascade: "cascade";
|
|
203
|
+
detach: "detach";
|
|
204
|
+
}>>;
|
|
205
|
+
}, z.core.$strip>;
|
|
206
|
+
type DeleteVideoClipsInput = z.infer<typeof deleteVideoClipsInputSchema>;
|
|
207
|
+
//#endregion
|
|
208
|
+
//#region src/editor/schemas/move-speeches.d.ts
|
|
209
|
+
/**
|
|
210
|
+
* Move speeches in time. Pure document edit: the op re-seats each speech at its
|
|
211
|
+
* new absolute `start_ms`; the cascade reassigns it to the host video clip,
|
|
212
|
+
* resolves overlaps, and reflows. Captions follow their speech.
|
|
213
|
+
*/
|
|
214
|
+
declare const moveSpeechesInputSchema: z.ZodObject<{
|
|
215
|
+
speeches: z.ZodArray<z.ZodObject<{
|
|
216
|
+
speech_id: z.ZodString;
|
|
217
|
+
new_start_ms: z.ZodNumber;
|
|
218
|
+
}, z.core.$strip>>;
|
|
219
|
+
}, z.core.$strip>;
|
|
220
|
+
type MoveSpeechesInput = z.infer<typeof moveSpeechesInputSchema>;
|
|
221
|
+
//#endregion
|
|
222
|
+
//#region src/editor/schemas/move-video-clips.d.ts
|
|
223
|
+
declare const moveVideoClipsInputSchema: z.ZodObject<{
|
|
224
|
+
clips: z.ZodArray<z.ZodObject<{
|
|
225
|
+
clip_id: z.ZodString;
|
|
226
|
+
new_start_ms: z.ZodNumber;
|
|
227
|
+
new_track_id: z.ZodOptional<z.ZodString>;
|
|
228
|
+
}, z.core.$strip>>;
|
|
229
|
+
}, z.core.$strip>;
|
|
230
|
+
type MoveVideoClipsInput = z.infer<typeof moveVideoClipsInputSchema>;
|
|
231
|
+
//#endregion
|
|
232
|
+
//#region src/editor/schemas/replace-video-clip-content.d.ts
|
|
233
|
+
/**
|
|
234
|
+
* Replace the media backing existing video clips. The media import runs upstream
|
|
235
|
+
* (Director); its stable result — the new media id, intrinsic length, and the
|
|
236
|
+
* reset trim window — arrives materialized (see
|
|
237
|
+
* `results/phase-4-side-effect-payload-contract.md` §4). Director resets
|
|
238
|
+
* `play_in=0` / `play_out=media_duration_ms` and clears `speed_shift` on
|
|
239
|
+
* replacement. The clip `part_id`s (hence their track items) are unchanged; the
|
|
240
|
+
* editor reflows the main track from the new effective durations.
|
|
241
|
+
*/
|
|
242
|
+
declare const replaceVideoClipContentInputSchema: z.ZodObject<{
|
|
243
|
+
clips: z.ZodArray<z.ZodObject<{
|
|
244
|
+
clip_id: z.ZodString;
|
|
245
|
+
origin_media_id: z.ZodString;
|
|
246
|
+
media_duration_ms: z.ZodNumber;
|
|
247
|
+
play_in: z.ZodNumber;
|
|
248
|
+
play_out: z.ZodNumber;
|
|
249
|
+
volume: z.ZodNumber;
|
|
250
|
+
}, z.core.$strip>>;
|
|
251
|
+
}, z.core.$strip>;
|
|
252
|
+
type ReplaceVideoClipContentInput = z.infer<typeof replaceVideoClipContentInputSchema>;
|
|
253
|
+
//#endregion
|
|
254
|
+
//#region src/editor/schemas/set-bgm.d.ts
|
|
255
|
+
/**
|
|
256
|
+
* Set the document BGM. The media's stable result (storage key) arrives
|
|
257
|
+
* materialized from upstream (see
|
|
258
|
+
* `results/phase-4-side-effect-payload-contract.md` §3). The op upserts the bgm
|
|
259
|
+
* part and seats it on the bgm lane; its effective length is always the whole
|
|
260
|
+
* timeline, derived by the projection on read — so there is no `duration_ms`
|
|
261
|
+
* input or fact (RFC 02 / `reference/16` §0b). A `bgm_id` lets the op replace an
|
|
262
|
+
* existing bgm part by id.
|
|
263
|
+
*/
|
|
264
|
+
declare const setBgmInputSchema: z.ZodObject<{
|
|
265
|
+
bgm_id: z.ZodString;
|
|
266
|
+
audio_storage_key: z.ZodString;
|
|
267
|
+
origin_media_id: z.ZodString;
|
|
268
|
+
volume: z.ZodNumber;
|
|
269
|
+
}, z.core.$strip>;
|
|
270
|
+
type SetBgmInput = z.infer<typeof setBgmInputSchema>;
|
|
271
|
+
//#endregion
|
|
272
|
+
//#region src/editor/schemas/set-caption-style.d.ts
|
|
273
|
+
/**
|
|
274
|
+
* Set the caption visual style. GLOBAL by design: the style applies to every
|
|
275
|
+
* caption part in the document — it carries NO `caption_id`. This mirrors the FE,
|
|
276
|
+
* whose caption-style store (`caption-style.ts:persistCaptionStylePatch`) iterates
|
|
277
|
+
* ALL captions and writes the same normalized style to each; the product has a
|
|
278
|
+
* single document-wide caption style, not per-caption styling.
|
|
279
|
+
*
|
|
280
|
+
* Every field is optional and maps to a `CaptionStyle` attribute (snake_case
|
|
281
|
+
* IDL). A field present in the input is written to every caption; a field ABSENT
|
|
282
|
+
* from the input is left untouched on each caption (the editor merges the patch
|
|
283
|
+
* onto each caption's existing style — this is a value edit, not a full-style
|
|
284
|
+
* replace, so a partial patch such as "recolor only" does not wipe font size).
|
|
285
|
+
*
|
|
286
|
+
* Pure document edit, no cascade — captions keep their positions; only the style
|
|
287
|
+
* sub-map of each caption part changes.
|
|
288
|
+
*/
|
|
289
|
+
declare const setCaptionStyleInputSchema: z.ZodObject<{
|
|
290
|
+
font_id: z.ZodOptional<z.ZodString>;
|
|
291
|
+
font_size: z.ZodOptional<z.ZodNumber>;
|
|
292
|
+
font_color: z.ZodOptional<z.ZodString>;
|
|
293
|
+
font_weight: z.ZodOptional<z.ZodNumber>;
|
|
294
|
+
entrance_animation: z.ZodOptional<z.ZodString>;
|
|
295
|
+
entrance_animation_duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
296
|
+
stroke_color: z.ZodOptional<z.ZodString>;
|
|
297
|
+
stroke_width: z.ZodOptional<z.ZodNumber>;
|
|
298
|
+
position_x: z.ZodOptional<z.ZodNumber>;
|
|
299
|
+
position_y: z.ZodOptional<z.ZodNumber>;
|
|
300
|
+
}, z.core.$strip>;
|
|
301
|
+
type SetCaptionStyleInput = z.infer<typeof setCaptionStyleInputSchema>;
|
|
302
|
+
//#endregion
|
|
303
|
+
//#region src/editor/schemas/set-caption-visibility.d.ts
|
|
304
|
+
/**
|
|
305
|
+
* Toggle caption visibility (the caption track's `is_hidden` flag). Pure
|
|
306
|
+
* document edit, no cascade — captions keep their positions; only the lane's
|
|
307
|
+
* hidden flag changes.
|
|
308
|
+
*/
|
|
309
|
+
declare const setCaptionVisibilityInputSchema: z.ZodObject<{
|
|
310
|
+
is_hidden: z.ZodBoolean;
|
|
311
|
+
}, z.core.$strip>;
|
|
312
|
+
type SetCaptionVisibilityInput = z.infer<typeof setCaptionVisibilityInputSchema>;
|
|
313
|
+
//#endregion
|
|
314
|
+
//#region src/editor/schemas/set-video-clip-speed-shift.d.ts
|
|
315
|
+
/**
|
|
316
|
+
* Set the playback speed of existing video clips. Per the speed-shift decision
|
|
317
|
+
* (`reference/16` §0): the op writes only the `speed_shift` fact — it does NOT
|
|
318
|
+
* store an effective `duration_ms` (projection derives it from the trim window /
|
|
319
|
+
* speed) and does NOT scale anchored speeches' relative offsets (offsets stay
|
|
320
|
+
* put; the cascade reflows absolute positions). A `null` speed_shift clears the
|
|
321
|
+
* speed back to original (1×).
|
|
322
|
+
*/
|
|
323
|
+
declare const setVideoClipSpeedShiftInputSchema: z.ZodObject<{
|
|
324
|
+
clips: z.ZodArray<z.ZodObject<{
|
|
325
|
+
clip_id: z.ZodString;
|
|
326
|
+
speed_shift: z.ZodNullable<z.ZodObject<{
|
|
327
|
+
category: z.ZodEnum<{
|
|
328
|
+
curve: "curve";
|
|
329
|
+
linear: "linear";
|
|
330
|
+
}>;
|
|
331
|
+
mode: z.ZodString;
|
|
332
|
+
config: z.ZodUnion<readonly [z.ZodObject<{
|
|
333
|
+
linear: z.ZodObject<{
|
|
334
|
+
speed: z.ZodNumber;
|
|
335
|
+
}, z.core.$strip>;
|
|
336
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
337
|
+
curve: z.ZodObject<{
|
|
338
|
+
keyframes: z.ZodArray<z.ZodObject<{
|
|
339
|
+
position: z.ZodNumber;
|
|
340
|
+
rate: z.ZodNumber;
|
|
341
|
+
in_tangent: z.ZodOptional<z.ZodObject<{
|
|
342
|
+
x: z.ZodNumber;
|
|
343
|
+
y: z.ZodNumber;
|
|
344
|
+
}, z.core.$strip>>;
|
|
345
|
+
out_tangent: z.ZodOptional<z.ZodObject<{
|
|
346
|
+
x: z.ZodNumber;
|
|
347
|
+
y: z.ZodNumber;
|
|
348
|
+
}, z.core.$strip>>;
|
|
349
|
+
}, z.core.$strip>>;
|
|
350
|
+
}, z.core.$strip>;
|
|
351
|
+
}, z.core.$strip>]>;
|
|
352
|
+
}, z.core.$strip>>;
|
|
353
|
+
}, z.core.$strip>>;
|
|
354
|
+
}, z.core.$strip>;
|
|
355
|
+
type SetVideoClipSpeedShiftInput = z.infer<typeof setVideoClipSpeedShiftInputSchema>;
|
|
356
|
+
//#endregion
|
|
357
|
+
//#region src/editor/schemas/shared.d.ts
|
|
358
|
+
declare const clipIdSchema: z.ZodString;
|
|
359
|
+
declare const clipIdsSchema: z.ZodArray<z.ZodString>;
|
|
360
|
+
declare const mediaIdSchema: z.ZodString;
|
|
361
|
+
declare const speechIdSchema: z.ZodString;
|
|
362
|
+
declare const timelineMsSchema: z.ZodNumber;
|
|
363
|
+
declare const positiveMsSchema: z.ZodNumber;
|
|
364
|
+
declare const volumeSchema: z.ZodNumber;
|
|
365
|
+
declare const speechIdsSchema: z.ZodArray<z.ZodString>;
|
|
366
|
+
/**
|
|
367
|
+
* A clip's playback-speed fact, the only thing `SetVideoClipSpeedShift` writes.
|
|
368
|
+
* Mirrors the IDL `SpeedShift`: `category` is `linear` | `curve`, and `config`
|
|
369
|
+
* is a discriminated union — `{ linear: { speed } }` for a constant multiplier
|
|
370
|
+
* (the multiplier projection reads at `config.linear.speed`) or `{ curve: {
|
|
371
|
+
* keyframes } }` for a Bezier-controlled variable speed (RFC 02 / `reference/16`
|
|
372
|
+
* §0). Exactly one of `linear` / `curve` is present.
|
|
373
|
+
*/
|
|
374
|
+
declare const speedShiftSchema: z.ZodObject<{
|
|
375
|
+
category: z.ZodEnum<{
|
|
376
|
+
curve: "curve";
|
|
377
|
+
linear: "linear";
|
|
378
|
+
}>;
|
|
379
|
+
mode: z.ZodString;
|
|
380
|
+
config: z.ZodUnion<readonly [z.ZodObject<{
|
|
381
|
+
linear: z.ZodObject<{
|
|
382
|
+
speed: z.ZodNumber;
|
|
383
|
+
}, z.core.$strip>;
|
|
384
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
385
|
+
curve: z.ZodObject<{
|
|
386
|
+
keyframes: z.ZodArray<z.ZodObject<{
|
|
387
|
+
position: z.ZodNumber;
|
|
388
|
+
rate: z.ZodNumber;
|
|
389
|
+
in_tangent: z.ZodOptional<z.ZodObject<{
|
|
390
|
+
x: z.ZodNumber;
|
|
391
|
+
y: z.ZodNumber;
|
|
392
|
+
}, z.core.$strip>>;
|
|
393
|
+
out_tangent: z.ZodOptional<z.ZodObject<{
|
|
394
|
+
x: z.ZodNumber;
|
|
395
|
+
y: z.ZodNumber;
|
|
396
|
+
}, z.core.$strip>>;
|
|
397
|
+
}, z.core.$strip>>;
|
|
398
|
+
}, z.core.$strip>;
|
|
399
|
+
}, z.core.$strip>]>;
|
|
400
|
+
}, z.core.$strip>;
|
|
401
|
+
declare const voiceSchema: z.ZodObject<{
|
|
402
|
+
id: z.ZodString;
|
|
403
|
+
name: z.ZodString;
|
|
404
|
+
}, z.core.$strip>;
|
|
405
|
+
//#endregion
|
|
406
|
+
//#region src/editor/schemas/speech-assets.d.ts
|
|
407
|
+
/**
|
|
408
|
+
* The materialized TTS result shared by `AddSpeeches` / `ChangeSpeechScript` /
|
|
409
|
+
* `ChangeSpeechVoice` (see `results/phase-4-side-effect-payload-contract.md`
|
|
410
|
+
* §1/§2). The side effect (TTS/ASR + billing) runs upstream; the op receives the
|
|
411
|
+
* stable speech + caption parts and writes them as authoritative facts. No
|
|
412
|
+
* cascade runs on write — the projection derives absolute positions on read.
|
|
413
|
+
*
|
|
414
|
+
* Each speech carries the anchoring fact directly (RFC 02 §4): the host video
|
|
415
|
+
* clip `anchor_part_id` and the `offset_ms` within it. The upstream caller
|
|
416
|
+
* already knows which clip a speech attaches to, so the op writes
|
|
417
|
+
* `{ mode:'anchored', anchorPartId, offsetMs }` verbatim — no write-time
|
|
418
|
+
* host-picking. Captions anchor to their speech via the caption part's
|
|
419
|
+
* `start_ms` (offset within the speech).
|
|
420
|
+
*/
|
|
421
|
+
declare const speechAssetSchema: z.ZodObject<{
|
|
422
|
+
speech_id: z.ZodString;
|
|
423
|
+
anchor_part_id: z.ZodString;
|
|
424
|
+
offset_ms: z.ZodNumber;
|
|
425
|
+
audio_storage_key: z.ZodString;
|
|
426
|
+
duration_ms: z.ZodNumber;
|
|
427
|
+
audio_script: z.ZodString;
|
|
428
|
+
volume: z.ZodNumber;
|
|
429
|
+
voice: z.ZodObject<{
|
|
430
|
+
id: z.ZodString;
|
|
431
|
+
name: z.ZodString;
|
|
432
|
+
}, z.core.$strip>;
|
|
433
|
+
origin_speech_id: z.ZodString;
|
|
434
|
+
caption_ids: z.ZodArray<z.ZodString>;
|
|
435
|
+
}, z.core.$strip>;
|
|
436
|
+
declare const captionAssetSchema: z.ZodObject<{
|
|
437
|
+
caption_id: z.ZodString;
|
|
438
|
+
speech_part_id: z.ZodString;
|
|
439
|
+
text: z.ZodString;
|
|
440
|
+
start_ms: z.ZodNumber;
|
|
441
|
+
duration_ms: z.ZodNumber;
|
|
442
|
+
}, z.core.$strip>;
|
|
443
|
+
/** A materialized speech-subtree write (speeches + their captions). */
|
|
444
|
+
declare const speechAssetsSchema: z.ZodObject<{
|
|
445
|
+
speeches: z.ZodArray<z.ZodObject<{
|
|
446
|
+
speech_id: z.ZodString;
|
|
447
|
+
anchor_part_id: z.ZodString;
|
|
448
|
+
offset_ms: z.ZodNumber;
|
|
449
|
+
audio_storage_key: z.ZodString;
|
|
450
|
+
duration_ms: z.ZodNumber;
|
|
451
|
+
audio_script: z.ZodString;
|
|
452
|
+
volume: z.ZodNumber;
|
|
453
|
+
voice: z.ZodObject<{
|
|
454
|
+
id: z.ZodString;
|
|
455
|
+
name: z.ZodString;
|
|
456
|
+
}, z.core.$strip>;
|
|
457
|
+
origin_speech_id: z.ZodString;
|
|
458
|
+
caption_ids: z.ZodArray<z.ZodString>;
|
|
459
|
+
}, z.core.$strip>>;
|
|
460
|
+
captions: z.ZodArray<z.ZodObject<{
|
|
461
|
+
caption_id: z.ZodString;
|
|
462
|
+
speech_part_id: z.ZodString;
|
|
463
|
+
text: z.ZodString;
|
|
464
|
+
start_ms: z.ZodNumber;
|
|
465
|
+
duration_ms: z.ZodNumber;
|
|
466
|
+
}, z.core.$strip>>;
|
|
467
|
+
}, z.core.$strip>;
|
|
468
|
+
type SpeechAsset = z.infer<typeof speechAssetSchema>;
|
|
469
|
+
type CaptionAsset = z.infer<typeof captionAssetSchema>;
|
|
470
|
+
type SpeechAssets = z.infer<typeof speechAssetsSchema>;
|
|
471
|
+
declare namespace index_d_exports {
|
|
472
|
+
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 };
|
|
473
|
+
}
|
|
474
|
+
//#endregion
|
|
475
|
+
export { addSpeechesInputSchema as $, AnchoredDeletePolicy as A, changeSpeechScriptInputSchema as B, setBgmInputSchema as C, moveVideoClipsInputSchema as D, MoveVideoClipsInput as E, deleteSpeechesInputSchema as F, adjustVideoClipDurationInputSchema as G, AdjustVideoClipVolumeInput as H, DeleteBgmInput as I, AdjustBgmVolumeInput as J, AdjustSpeechVolumeInput as K, deleteBgmInputSchema as L, anchoredDeletePolicySchema as M, deleteVideoClipsInputSchema as N, MoveSpeechesInput as O, DeleteSpeechesInput as P, AddSpeechesInput as Q, ChangeSpeechScriptInput as R, SetBgmInput as S, replaceVideoClipContentInputSchema as T, adjustVideoClipVolumeInputSchema as U, changeSpeechVoiceInputSchema as V, AdjustVideoClipDurationInput as W, AddVideoClipsInput as X, adjustBgmVolumeInputSchema as Y, addVideoClipsInputSchema as Z, setVideoClipSpeedShiftInputSchema as _, speechAssetsSchema as a, SetCaptionStyleInput as b, mediaIdSchema as c, speechIdsSchema as d, speedShiftSchema as f, SetVideoClipSpeedShiftInput as g, volumeSchema as h, SpeechAssets as i, DeleteVideoClipsInput as j, moveSpeechesInputSchema as k, positiveMsSchema as l, voiceSchema as m, CaptionAsset as n, clipIdSchema as o, timelineMsSchema as p, adjustSpeechVolumeInputSchema as q, SpeechAsset as r, clipIdsSchema as s, index_d_exports as t, speechIdSchema as u, SetCaptionVisibilityInput as v, ReplaceVideoClipContentInput as w, setCaptionStyleInputSchema as x, setCaptionVisibilityInputSchema as y, ChangeSpeechVoiceInput as z };
|