@mengine/medeo-client 1.2.1-alpha.0 → 1.2.1-alpha.10
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/README.md +91 -1
- package/dist/{document-49OdvviW.js → document-CC9M0bf9.js} +1497 -6
- package/dist/{index-InEWX9rk.d.ts → index-CMa6ZCtX.d.ts} +2 -2
- package/dist/{index-BO2fSUKi.d.ts → index-PAM9x_fu.d.ts} +164 -19
- package/dist/index.d.ts +405 -3
- package/dist/index.js +2321 -7
- package/dist/schemas.d.ts +1 -1
- package/dist/schemas.js +1 -37
- package/dist/shared-iWnU2osE.js +39 -0
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +1 -1
- package/package.json +6 -5
package/dist/schemas.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as adjustVideoClipVolumeInputSchema, A as MoveVideoClipsInput, B as AnchoredDeletePolicy, C as setBgmInputSchema, D as replaceVideoClipSequenceInputSchema, E as anchoredReplacePolicySchema, F as moveAnchorSchema, G as deleteSpeechesInputSchema, H as anchoredDeletePolicySchema, I as moveVideoClipsByAnchorInputSchema, J as ChangeSpeechScriptInput, K as DeleteBgmInput, L as movedClipAnchoredPolicySchema, M as MoveAnchor, N as MoveVideoClipsByAnchorInput, O as ReplaceVideoClipContentInput, P as MovedClipAnchoredPolicy, Q as AdjustVideoClipVolumeInput, R as MoveSpeechesInput, S as SetBgmInput, T as ReplaceVideoClipSequenceInput, U as deleteVideoClipsInputSchema, V as DeleteVideoClipsInput, W as DeleteSpeechesInput, X as changeSpeechScriptInputSchema, Y as ChangeSpeechVoiceInput, Z as changeSpeechVoiceInputSchema, _ as setVideoClipSpeedShiftInputSchema, a as speechAssetsSchema, at as adjustBgmVolumeInputSchema, b as SetCaptionStyleInput, c as mediaIdSchema, ct as AddSpeechesInput, d as speechIdsSchema, et as AdjustVideoClipDurationInput, f as speedShiftSchema, g as SetVideoClipSpeedShiftInput, h as volumeSchema, i as SpeechAssets, it as AdjustBgmVolumeInput, j as moveVideoClipsInputSchema, k as replaceVideoClipContentInputSchema, l as positiveMsSchema, lt as addSpeechesInputSchema, m as voiceSchema, n as CaptionAsset, nt as AdjustSpeechVolumeInput, o as clipIdSchema, ot as AddVideoClipsInput, p as timelineMsSchema, q as deleteBgmInputSchema, r as SpeechAsset, rt as adjustSpeechVolumeInputSchema, s as clipIdsSchema, st as addVideoClipsInputSchema, tt as adjustVideoClipDurationInputSchema, u as speechIdSchema, v as SetCaptionVisibilityInput, w as AnchoredReplacePolicy, x as setCaptionStyleInputSchema, y as setCaptionVisibilityInputSchema, z as moveSpeechesInputSchema } from "./index-
|
|
1
|
+
import { $ as adjustVideoClipVolumeInputSchema, A as MoveVideoClipsInput, B as AnchoredDeletePolicy, C as setBgmInputSchema, D as replaceVideoClipSequenceInputSchema, E as anchoredReplacePolicySchema, F as moveAnchorSchema, G as deleteSpeechesInputSchema, H as anchoredDeletePolicySchema, I as moveVideoClipsByAnchorInputSchema, J as ChangeSpeechScriptInput, K as DeleteBgmInput, L as movedClipAnchoredPolicySchema, M as MoveAnchor, N as MoveVideoClipsByAnchorInput, O as ReplaceVideoClipContentInput, P as MovedClipAnchoredPolicy, Q as AdjustVideoClipVolumeInput, R as MoveSpeechesInput, S as SetBgmInput, T as ReplaceVideoClipSequenceInput, U as deleteVideoClipsInputSchema, V as DeleteVideoClipsInput, W as DeleteSpeechesInput, X as changeSpeechScriptInputSchema, Y as ChangeSpeechVoiceInput, Z as changeSpeechVoiceInputSchema, _ as setVideoClipSpeedShiftInputSchema, a as speechAssetsSchema, at as adjustBgmVolumeInputSchema, b as SetCaptionStyleInput, c as mediaIdSchema, ct as AddSpeechesInput, d as speechIdsSchema, et as AdjustVideoClipDurationInput, f as speedShiftSchema, g as SetVideoClipSpeedShiftInput, h as volumeSchema, i as SpeechAssets, it as AdjustBgmVolumeInput, j as moveVideoClipsInputSchema, k as replaceVideoClipContentInputSchema, l as positiveMsSchema, lt as addSpeechesInputSchema, m as voiceSchema, n as CaptionAsset, nt as AdjustSpeechVolumeInput, o as clipIdSchema, ot as AddVideoClipsInput, p as timelineMsSchema, q as deleteBgmInputSchema, r as SpeechAsset, rt as adjustSpeechVolumeInputSchema, s as clipIdsSchema, st as addVideoClipsInputSchema, tt as adjustVideoClipDurationInputSchema, u as speechIdSchema, v as SetCaptionVisibilityInput, w as AnchoredReplacePolicy, x as setCaptionStyleInputSchema, y as setCaptionVisibilityInputSchema, z as moveSpeechesInputSchema } from "./index-CMa6ZCtX.js";
|
|
2
2
|
export { AddSpeechesInput, AddVideoClipsInput, AdjustBgmVolumeInput, AdjustSpeechVolumeInput, AdjustVideoClipDurationInput, AdjustVideoClipVolumeInput, AnchoredDeletePolicy, AnchoredReplacePolicy, CaptionAsset, ChangeSpeechScriptInput, ChangeSpeechVoiceInput, DeleteBgmInput, DeleteSpeechesInput, DeleteVideoClipsInput, MoveAnchor, 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, moveSpeechesInputSchema, moveVideoClipsByAnchorInputSchema, moveVideoClipsInputSchema, movedClipAnchoredPolicySchema, positiveMsSchema, replaceVideoClipContentInputSchema, replaceVideoClipSequenceInputSchema, setBgmInputSchema, setCaptionStyleInputSchema, setCaptionVisibilityInputSchema, setVideoClipSpeedShiftInputSchema, speechAssetsSchema, speechIdSchema, speechIdsSchema, speedShiftSchema, timelineMsSchema, voiceSchema, volumeSchema };
|
package/dist/schemas.js
CHANGED
|
@@ -1,42 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-D7D4PA-g.js";
|
|
2
|
+
import { a as speechIdSchema, c as timelineMsSchema, i as positiveMsSchema, l as voiceSchema, n as clipIdsSchema, o as speechIdsSchema, r as mediaIdSchema, s as speedShiftSchema, t as clipIdSchema, u as volumeSchema } from "./shared-iWnU2osE.js";
|
|
2
3
|
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
4
|
//#region src/editor/schemas/speech-assets.ts
|
|
41
5
|
/**
|
|
42
6
|
* The materialized TTS result shared by `AddSpeeches` / `ChangeSpeechScript` /
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/editor/schemas/shared.ts
|
|
3
|
+
const clipIdSchema = z.string().min(1).describe("The clip part ID on the timeline");
|
|
4
|
+
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)");
|
|
5
|
+
const mediaIdSchema = z.string().min(1).describe("The media asset ID");
|
|
6
|
+
const speechIdSchema = z.string().min(1).describe("The speech part ID on the timeline");
|
|
7
|
+
const timelineMsSchema = z.number().int().min(0).describe("Time position in milliseconds on the timeline (>= 0)");
|
|
8
|
+
const positiveMsSchema = z.number().int().positive().describe("Duration in milliseconds (> 0)");
|
|
9
|
+
const volumeSchema = z.number().min(-60).max(20).describe("Volume in decibels (-60.0 to 20.0; 0.0 = original, -60 = mute, +20 = max)");
|
|
10
|
+
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)");
|
|
11
|
+
const tangentHandleSchema = z.object({
|
|
12
|
+
x: z.number().finite(),
|
|
13
|
+
y: z.number().finite()
|
|
14
|
+
}).describe("Bezier tangent handle (x, y)");
|
|
15
|
+
const speedKeyframeSchema = z.object({
|
|
16
|
+
position: z.number().min(0).max(1),
|
|
17
|
+
rate: z.number().min(0),
|
|
18
|
+
in_tangent: tangentHandleSchema.optional(),
|
|
19
|
+
out_tangent: tangentHandleSchema.optional()
|
|
20
|
+
}).describe("A speed keyframe: normalized position (0..1), rate, optional tangents");
|
|
21
|
+
/**
|
|
22
|
+
* A clip's playback-speed fact, the only thing `SetVideoClipSpeedShift` writes.
|
|
23
|
+
* Mirrors the IDL `SpeedShift`: `category` is `linear` | `curve`, and `config`
|
|
24
|
+
* is a discriminated union — `{ linear: { speed } }` for a constant multiplier
|
|
25
|
+
* (the multiplier projection reads at `config.linear.speed`) or `{ curve: {
|
|
26
|
+
* keyframes } }` for a Bezier-controlled variable speed (RFC 02 / `reference/16`
|
|
27
|
+
* §0). Exactly one of `linear` / `curve` is present.
|
|
28
|
+
*/
|
|
29
|
+
const speedShiftSchema = z.object({
|
|
30
|
+
category: z.enum(["linear", "curve"]),
|
|
31
|
+
mode: z.string(),
|
|
32
|
+
config: z.union([z.object({ linear: z.object({ speed: z.number().finite().positive() }) }), z.object({ curve: z.object({ keyframes: z.array(speedKeyframeSchema).min(2) }) })])
|
|
33
|
+
}).describe("Speed shift: linear multiplier or Bezier curve, mirroring the IDL shape");
|
|
34
|
+
const voiceSchema = z.object({
|
|
35
|
+
id: z.string().min(1),
|
|
36
|
+
name: z.string()
|
|
37
|
+
}).describe("TTS voice summary attached to a speech");
|
|
38
|
+
//#endregion
|
|
39
|
+
export { speechIdSchema as a, timelineMsSchema as c, positiveMsSchema as i, voiceSchema as l, clipIdsSchema as n, speechIdsSchema as o, mediaIdSchema as r, speedShiftSchema as s, clipIdSchema as t, volumeSchema as u };
|
package/dist/testing.d.ts
CHANGED
package/dist/testing.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { J as VIDEO_DOCUMENT_SCHEMA_VERSION, et as base64ToBytes, s as createMirrorVideoDocumentAdapter, tt as bytesToBase64 } from "./document-CC9M0bf9.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.10",
|
|
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/
|
|
31
|
-
"@mengine/
|
|
32
|
-
"@mengine/utils": "1.2.1-alpha.
|
|
30
|
+
"@mengine/sync": "1.2.1-alpha.10",
|
|
31
|
+
"@mengine/storage": "1.2.1-alpha.10",
|
|
32
|
+
"@mengine/utils": "1.2.1-alpha.10"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/node": "^25.9.1",
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
"typescript": "^6.0.3",
|
|
40
40
|
"vite-plugin-wasm": "^3.6.0",
|
|
41
41
|
"vite-plus": "^0.1.23",
|
|
42
|
-
"@mengine/idl-codegen": "0.0.0"
|
|
42
|
+
"@mengine/idl-codegen": "0.0.0",
|
|
43
|
+
"@mengine/medeo-dsl": "0.0.0"
|
|
43
44
|
},
|
|
44
45
|
"peerDependencies": {
|
|
45
46
|
"loro-crdt": "^1.13.6"
|