@mengine/medeo-client 2.1.1-dsl.0 → 2.1.1-dsl.2
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 +15 -1
- package/dist/dsl-EV6kCdr6.js +5852 -0
- package/dist/dsl.d.ts +1 -1
- package/dist/dsl.js +2 -2
- package/dist/index-Cu7SdKN5.d.ts +940 -0
- package/dist/{index-B7fC7q7P.d.ts → index-D-3rdfUP.d.ts} +22 -3
- package/dist/{index-DQZUkrpg.d.ts → index-D-6uebu4.d.ts} +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +54 -4
- package/dist/legacy.d.ts +1 -1
- package/dist/legacy.js +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +2 -2
- package/dist/video-draft-types-TXRv3wS6.js +1419 -0
- package/package.json +8 -5
- package/dist/dsl-Dkecq_2c.js +0 -2814
- package/dist/index-DKDMTXUe.d.ts +0 -605
- package/dist/video-draft-types-DTXxvPt-.js +0 -449
package/dist/index-DKDMTXUe.d.ts
DELETED
|
@@ -1,605 +0,0 @@
|
|
|
1
|
-
import { B as Media, E as CaptionStyle, J as TextEdit, M as DslDiagnostic, N as DslMutation, Q as TimeAnchor, R as FieldPatch, T as CaptionSelection, c as VideoDraftInput, et as TrackRole, h as DslIdFactory, o as VideoDraftContent, p as CommitOptions, tt as Voice, w as CaptionContent, z as MedeoDslSnapshot } from "./video-draft-types-c_shaRyq.js";
|
|
2
|
-
import { Cursor, LoroDoc, PeerID } from "loro-crdt";
|
|
3
|
-
import { InferInputType, InferType } from "loro-mirror";
|
|
4
|
-
|
|
5
|
-
//#region src/dsl/action-context.d.ts
|
|
6
|
-
type ClipPlacement = {
|
|
7
|
-
kind: 'sequential';
|
|
8
|
-
} | {
|
|
9
|
-
kind: 'absolute';
|
|
10
|
-
startMs: number;
|
|
11
|
-
} | {
|
|
12
|
-
kind: 'anchored';
|
|
13
|
-
clipId: string;
|
|
14
|
-
offsetMs: number;
|
|
15
|
-
};
|
|
16
|
-
//#endregion
|
|
17
|
-
//#region src/dsl/clip-actions.d.ts
|
|
18
|
-
type ClipSource = {
|
|
19
|
-
sourceId: string;
|
|
20
|
-
media?: never;
|
|
21
|
-
} | {
|
|
22
|
-
media: Media;
|
|
23
|
-
sourceId?: never;
|
|
24
|
-
};
|
|
25
|
-
type AddDslClip = ClipSource & {
|
|
26
|
-
inMs?: number;
|
|
27
|
-
outMs?: number;
|
|
28
|
-
speed?: {
|
|
29
|
-
rate: number;
|
|
30
|
-
};
|
|
31
|
-
volume?: number;
|
|
32
|
-
fillTimeline?: true;
|
|
33
|
-
placement?: ClipPlacement;
|
|
34
|
-
};
|
|
35
|
-
interface AddDslClipsInput {
|
|
36
|
-
trackId: string;
|
|
37
|
-
clips: readonly AddDslClip[];
|
|
38
|
-
index?: number;
|
|
39
|
-
}
|
|
40
|
-
interface MoveDslClipsInput {
|
|
41
|
-
clipIds: readonly string[];
|
|
42
|
-
trackId: string;
|
|
43
|
-
index: number;
|
|
44
|
-
onAnchored: 'follow' | 'keepAbsolute';
|
|
45
|
-
}
|
|
46
|
-
interface ReplaceDslClipsInput {
|
|
47
|
-
clipIds: readonly string[];
|
|
48
|
-
clips: readonly AddDslClip[];
|
|
49
|
-
onAnchored: 'remap' | 'cascade';
|
|
50
|
-
}
|
|
51
|
-
interface DslClipUpdate {
|
|
52
|
-
clipId: string;
|
|
53
|
-
inMs?: number;
|
|
54
|
-
outMs?: number;
|
|
55
|
-
speed?: {
|
|
56
|
-
rate: number;
|
|
57
|
-
};
|
|
58
|
-
volume?: number;
|
|
59
|
-
placement?: ClipPlacement;
|
|
60
|
-
}
|
|
61
|
-
//#endregion
|
|
62
|
-
//#region ../medeo-dsl/src/schema/codec.d.ts
|
|
63
|
-
interface InvalidAtomic {
|
|
64
|
-
invalid: true;
|
|
65
|
-
raw: string;
|
|
66
|
-
reason: string;
|
|
67
|
-
}
|
|
68
|
-
declare function isInvalidAtomic(value: unknown): value is InvalidAtomic;
|
|
69
|
-
interface AtomicCodec<T> {
|
|
70
|
-
encode(value: T | InvalidAtomic): string;
|
|
71
|
-
decode(raw: string): T | InvalidAtomic;
|
|
72
|
-
}
|
|
73
|
-
declare const timeAnchorCodec: AtomicCodec<TimeAnchor>;
|
|
74
|
-
declare const captionContentCodec: AtomicCodec<CaptionContent>;
|
|
75
|
-
//#endregion
|
|
76
|
-
//#region ../medeo-dsl/src/schema/loro-shape.d.ts
|
|
77
|
-
/** Only direct children inherit mergeable identity. Body and ordinary entity rows keep normal identities. */
|
|
78
|
-
declare const medeoDslLoroShape: import("loro-mirror").RootSchemaType<{
|
|
79
|
-
'timeline-entities': import("loro-mirror").LoroMapSchemaWithCatchall<{}, import("loro-mirror").LoroMapSchema<{}> & {
|
|
80
|
-
options: {};
|
|
81
|
-
} & {
|
|
82
|
-
catchall: <C extends import("loro-mirror").SchemaType>(catchallSchema: C) => import("loro-mirror").LoroMapSchemaWithCatchall<{}, C>;
|
|
83
|
-
}> & {
|
|
84
|
-
options: {};
|
|
85
|
-
};
|
|
86
|
-
'track-entities': import("loro-mirror").LoroMapSchemaWithCatchall<{}, import("loro-mirror").LoroMapSchema<{
|
|
87
|
-
role: /*elided*/any;
|
|
88
|
-
hidden: /*elided*/any;
|
|
89
|
-
}> & {
|
|
90
|
-
options: {};
|
|
91
|
-
} & {
|
|
92
|
-
catchall: <C extends import("loro-mirror").SchemaType>(catchallSchema: C) => import("loro-mirror").LoroMapSchemaWithCatchall<{
|
|
93
|
-
role: /*elided*/any;
|
|
94
|
-
hidden: /*elided*/any;
|
|
95
|
-
}, C>;
|
|
96
|
-
}> & {
|
|
97
|
-
options: {};
|
|
98
|
-
};
|
|
99
|
-
'clip-entities': import("loro-mirror").LoroMapSchemaWithCatchall<{}, import("loro-mirror").LoroMapSchema<{
|
|
100
|
-
seqMarker: /*elided*/any;
|
|
101
|
-
volume: /*elided*/any;
|
|
102
|
-
}> & {
|
|
103
|
-
options: {};
|
|
104
|
-
} & {
|
|
105
|
-
catchall: <C extends import("loro-mirror").SchemaType>(catchallSchema: C) => import("loro-mirror").LoroMapSchemaWithCatchall<{
|
|
106
|
-
seqMarker: /*elided*/any;
|
|
107
|
-
volume: /*elided*/any;
|
|
108
|
-
}, C>;
|
|
109
|
-
}> & {
|
|
110
|
-
options: {};
|
|
111
|
-
};
|
|
112
|
-
'media-entities': import("loro-mirror").LoroMapSchemaWithCatchall<{}, import("loro-mirror").LoroMapSchema<{
|
|
113
|
-
kind: /*elided*/any;
|
|
114
|
-
system: /*elided*/any;
|
|
115
|
-
key: /*elided*/any;
|
|
116
|
-
storageKey: /*elided*/any;
|
|
117
|
-
durationMs: /*elided*/any;
|
|
118
|
-
digest: /*elided*/any;
|
|
119
|
-
}> & {
|
|
120
|
-
options: {};
|
|
121
|
-
} & {
|
|
122
|
-
catchall: <C extends import("loro-mirror").SchemaType>(catchallSchema: C) => import("loro-mirror").LoroMapSchemaWithCatchall<{
|
|
123
|
-
kind: /*elided*/any;
|
|
124
|
-
system: /*elided*/any;
|
|
125
|
-
key: /*elided*/any;
|
|
126
|
-
storageKey: /*elided*/any;
|
|
127
|
-
durationMs: /*elided*/any;
|
|
128
|
-
digest: /*elided*/any;
|
|
129
|
-
}, C>;
|
|
130
|
-
}> & {
|
|
131
|
-
options: {
|
|
132
|
-
readonly mergeableMapChildContainers: true;
|
|
133
|
-
};
|
|
134
|
-
};
|
|
135
|
-
'audio-script-entities': import("loro-mirror").LoroMapSchemaWithCatchall<{}, import("loro-mirror").LoroMapSchema<{
|
|
136
|
-
body: /*elided*/any;
|
|
137
|
-
defaultLanguage: /*elided*/any;
|
|
138
|
-
}> & {
|
|
139
|
-
options: {};
|
|
140
|
-
} & {
|
|
141
|
-
catchall: <C extends import("loro-mirror").SchemaType>(catchallSchema: C) => import("loro-mirror").LoroMapSchemaWithCatchall<{
|
|
142
|
-
body: /*elided*/any;
|
|
143
|
-
defaultLanguage: /*elided*/any;
|
|
144
|
-
}, C>;
|
|
145
|
-
}> & {
|
|
146
|
-
options: {};
|
|
147
|
-
};
|
|
148
|
-
'caption-entities': import("loro-mirror").LoroMapSchemaWithCatchall<{}, import("loro-mirror").LoroMapSchema<{
|
|
149
|
-
text: /*elided*/any;
|
|
150
|
-
style: /*elided*/any;
|
|
151
|
-
}> & {
|
|
152
|
-
options: {
|
|
153
|
-
readonly mergeableMapChildContainers: true;
|
|
154
|
-
};
|
|
155
|
-
} & {
|
|
156
|
-
catchall: <C extends import("loro-mirror").SchemaType>(catchallSchema: C) => import("loro-mirror").LoroMapSchemaWithCatchall<{
|
|
157
|
-
text: /*elided*/any;
|
|
158
|
-
style: /*elided*/any;
|
|
159
|
-
}, C>;
|
|
160
|
-
}> & {
|
|
161
|
-
options: {};
|
|
162
|
-
};
|
|
163
|
-
'voice-entities': import("loro-mirror").LoroMapSchemaWithCatchall<{}, import("loro-mirror").LoroMapSchema<{
|
|
164
|
-
system: /*elided*/any;
|
|
165
|
-
key: /*elided*/any;
|
|
166
|
-
name: /*elided*/any;
|
|
167
|
-
}> & {
|
|
168
|
-
options: {};
|
|
169
|
-
} & {
|
|
170
|
-
catchall: <C extends import("loro-mirror").SchemaType>(catchallSchema: C) => import("loro-mirror").LoroMapSchemaWithCatchall<{
|
|
171
|
-
system: /*elided*/any;
|
|
172
|
-
key: /*elided*/any;
|
|
173
|
-
name: /*elided*/any;
|
|
174
|
-
}, C>;
|
|
175
|
-
}> & {
|
|
176
|
-
options: {
|
|
177
|
-
readonly mergeableMapChildContainers: true;
|
|
178
|
-
};
|
|
179
|
-
};
|
|
180
|
-
'asset-entities': import("loro-mirror").LoroMapSchemaWithCatchall<{}, import("loro-mirror").LoroMapSchema<{
|
|
181
|
-
system: /*elided*/any;
|
|
182
|
-
key: /*elided*/any;
|
|
183
|
-
storageKey: /*elided*/any;
|
|
184
|
-
digest: /*elided*/any;
|
|
185
|
-
}> & {
|
|
186
|
-
options: {};
|
|
187
|
-
} & {
|
|
188
|
-
catchall: <C extends import("loro-mirror").SchemaType>(catchallSchema: C) => import("loro-mirror").LoroMapSchemaWithCatchall<{
|
|
189
|
-
system: /*elided*/any;
|
|
190
|
-
key: /*elided*/any;
|
|
191
|
-
storageKey: /*elided*/any;
|
|
192
|
-
digest: /*elided*/any;
|
|
193
|
-
}, C>;
|
|
194
|
-
}> & {
|
|
195
|
-
options: {
|
|
196
|
-
readonly mergeableMapChildContainers: true;
|
|
197
|
-
};
|
|
198
|
-
};
|
|
199
|
-
'contain-relations': import("loro-mirror").LoroTreeSchema<{
|
|
200
|
-
entityId: /*elided*/any;
|
|
201
|
-
}>;
|
|
202
|
-
'clip-source-relations': import("loro-mirror").LoroMapSchemaWithCatchall<{}, import("loro-mirror").LoroMapSchema<Record<string, import("loro-mirror").StringSchemaType<string> & {
|
|
203
|
-
options: {};
|
|
204
|
-
} & {
|
|
205
|
-
transform: <D>(def: import("loro-mirror").TransformDefinition<string, D>) => import("loro-mirror").StringSchemaType<string> & {
|
|
206
|
-
options: {};
|
|
207
|
-
transform: import("loro-mirror").TransformDefinition<string, D>;
|
|
208
|
-
};
|
|
209
|
-
}>> & {
|
|
210
|
-
options: {};
|
|
211
|
-
} & {
|
|
212
|
-
catchall: <C extends import("loro-mirror").SchemaType>(catchallSchema: C) => import("loro-mirror").LoroMapSchemaWithCatchall<Record<string, import("loro-mirror").StringSchemaType<string> & {
|
|
213
|
-
options: {};
|
|
214
|
-
} & {
|
|
215
|
-
transform: <D>(def: import("loro-mirror").TransformDefinition<string, D>) => import("loro-mirror").StringSchemaType<string> & {
|
|
216
|
-
options: {};
|
|
217
|
-
transform: import("loro-mirror").TransformDefinition<string, D>;
|
|
218
|
-
};
|
|
219
|
-
}>, C>;
|
|
220
|
-
}> & {
|
|
221
|
-
options: {
|
|
222
|
-
readonly mergeableMapChildContainers: true;
|
|
223
|
-
};
|
|
224
|
-
};
|
|
225
|
-
'time-anchor-relations': import("loro-mirror").LoroMapSchemaWithCatchall<{}, import("loro-mirror").StringSchemaType<string> & {
|
|
226
|
-
options: {};
|
|
227
|
-
transform: import("loro-mirror").TransformDefinition<string, TimeAnchor | InvalidAtomic>;
|
|
228
|
-
}> & {
|
|
229
|
-
options: {};
|
|
230
|
-
};
|
|
231
|
-
'caption-content-relations': import("loro-mirror").LoroMapSchemaWithCatchall<{}, import("loro-mirror").StringSchemaType<string> & {
|
|
232
|
-
options: {};
|
|
233
|
-
transform: import("loro-mirror").TransformDefinition<string, CaptionContent | InvalidAtomic>;
|
|
234
|
-
}> & {
|
|
235
|
-
options: {};
|
|
236
|
-
};
|
|
237
|
-
'caption-alignment-relations': import("loro-mirror").LoroMapSchemaWithCatchall<{}, import("loro-mirror").LoroMapSchema<{
|
|
238
|
-
captionId: /*elided*/any;
|
|
239
|
-
mediaId: /*elided*/any;
|
|
240
|
-
startMs: /*elided*/any;
|
|
241
|
-
endMs: /*elided*/any;
|
|
242
|
-
}> & {
|
|
243
|
-
options: {};
|
|
244
|
-
} & {
|
|
245
|
-
catchall: <C extends import("loro-mirror").SchemaType>(catchallSchema: C) => import("loro-mirror").LoroMapSchemaWithCatchall<{
|
|
246
|
-
captionId: /*elided*/any;
|
|
247
|
-
mediaId: /*elided*/any;
|
|
248
|
-
startMs: /*elided*/any;
|
|
249
|
-
endMs: /*elided*/any;
|
|
250
|
-
}, C>;
|
|
251
|
-
}> & {
|
|
252
|
-
options: {
|
|
253
|
-
readonly mergeableMapChildContainers: true;
|
|
254
|
-
};
|
|
255
|
-
};
|
|
256
|
-
'voice-timbre-relations': import("loro-mirror").LoroMapSchemaWithCatchall<{}, import("loro-mirror").LoroMapSchema<Record<string, import("loro-mirror").StringSchemaType<string> & {
|
|
257
|
-
options: {};
|
|
258
|
-
} & {
|
|
259
|
-
transform: <D>(def: import("loro-mirror").TransformDefinition<string, D>) => import("loro-mirror").StringSchemaType<string> & {
|
|
260
|
-
options: {};
|
|
261
|
-
transform: import("loro-mirror").TransformDefinition<string, D>;
|
|
262
|
-
};
|
|
263
|
-
}>> & {
|
|
264
|
-
options: {};
|
|
265
|
-
} & {
|
|
266
|
-
catchall: <C extends import("loro-mirror").SchemaType>(catchallSchema: C) => import("loro-mirror").LoroMapSchemaWithCatchall<Record<string, import("loro-mirror").StringSchemaType<string> & {
|
|
267
|
-
options: {};
|
|
268
|
-
} & {
|
|
269
|
-
transform: <D>(def: import("loro-mirror").TransformDefinition<string, D>) => import("loro-mirror").StringSchemaType<string> & {
|
|
270
|
-
options: {};
|
|
271
|
-
transform: import("loro-mirror").TransformDefinition<string, D>;
|
|
272
|
-
};
|
|
273
|
-
}>, C>;
|
|
274
|
-
}> & {
|
|
275
|
-
options: {
|
|
276
|
-
readonly mergeableMapChildContainers: true;
|
|
277
|
-
};
|
|
278
|
-
};
|
|
279
|
-
'derived-from-relations': import("loro-mirror").LoroMapSchemaWithCatchall<{}, import("loro-mirror").LoroMapSchema<Record<string, import("loro-mirror").StringSchemaType<string> & {
|
|
280
|
-
options: {};
|
|
281
|
-
} & {
|
|
282
|
-
transform: <D>(def: import("loro-mirror").TransformDefinition<string, D>) => import("loro-mirror").StringSchemaType<string> & {
|
|
283
|
-
options: {};
|
|
284
|
-
transform: import("loro-mirror").TransformDefinition<string, D>;
|
|
285
|
-
};
|
|
286
|
-
}>> & {
|
|
287
|
-
options: {};
|
|
288
|
-
} & {
|
|
289
|
-
catchall: <C extends import("loro-mirror").SchemaType>(catchallSchema: C) => import("loro-mirror").LoroMapSchemaWithCatchall<Record<string, import("loro-mirror").StringSchemaType<string> & {
|
|
290
|
-
options: {};
|
|
291
|
-
} & {
|
|
292
|
-
transform: <D>(def: import("loro-mirror").TransformDefinition<string, D>) => import("loro-mirror").StringSchemaType<string> & {
|
|
293
|
-
options: {};
|
|
294
|
-
transform: import("loro-mirror").TransformDefinition<string, D>;
|
|
295
|
-
};
|
|
296
|
-
}>, C>;
|
|
297
|
-
}> & {
|
|
298
|
-
options: {
|
|
299
|
-
readonly mergeableMapChildContainers: true;
|
|
300
|
-
};
|
|
301
|
-
};
|
|
302
|
-
'from-asset-relations': import("loro-mirror").LoroMapSchemaWithCatchall<{}, import("loro-mirror").LoroMapSchema<Record<string, import("loro-mirror").StringSchemaType<string> & {
|
|
303
|
-
options: {};
|
|
304
|
-
} & {
|
|
305
|
-
transform: <D>(def: import("loro-mirror").TransformDefinition<string, D>) => import("loro-mirror").StringSchemaType<string> & {
|
|
306
|
-
options: {};
|
|
307
|
-
transform: import("loro-mirror").TransformDefinition<string, D>;
|
|
308
|
-
};
|
|
309
|
-
}>> & {
|
|
310
|
-
options: {};
|
|
311
|
-
} & {
|
|
312
|
-
catchall: <C extends import("loro-mirror").SchemaType>(catchallSchema: C) => import("loro-mirror").LoroMapSchemaWithCatchall<Record<string, import("loro-mirror").StringSchemaType<string> & {
|
|
313
|
-
options: {};
|
|
314
|
-
} & {
|
|
315
|
-
transform: <D>(def: import("loro-mirror").TransformDefinition<string, D>) => import("loro-mirror").StringSchemaType<string> & {
|
|
316
|
-
options: {};
|
|
317
|
-
transform: import("loro-mirror").TransformDefinition<string, D>;
|
|
318
|
-
};
|
|
319
|
-
}>, C>;
|
|
320
|
-
}> & {
|
|
321
|
-
options: {
|
|
322
|
-
readonly mergeableMapChildContainers: true;
|
|
323
|
-
};
|
|
324
|
-
};
|
|
325
|
-
'to-asset-relations': import("loro-mirror").LoroMapSchemaWithCatchall<{}, import("loro-mirror").LoroMapSchema<Record<string, import("loro-mirror").StringSchemaType<string> & {
|
|
326
|
-
options: {};
|
|
327
|
-
} & {
|
|
328
|
-
transform: <D>(def: import("loro-mirror").TransformDefinition<string, D>) => import("loro-mirror").StringSchemaType<string> & {
|
|
329
|
-
options: {};
|
|
330
|
-
transform: import("loro-mirror").TransformDefinition<string, D>;
|
|
331
|
-
};
|
|
332
|
-
}>> & {
|
|
333
|
-
options: {};
|
|
334
|
-
} & {
|
|
335
|
-
catchall: <C extends import("loro-mirror").SchemaType>(catchallSchema: C) => import("loro-mirror").LoroMapSchemaWithCatchall<Record<string, import("loro-mirror").StringSchemaType<string> & {
|
|
336
|
-
options: {};
|
|
337
|
-
} & {
|
|
338
|
-
transform: <D>(def: import("loro-mirror").TransformDefinition<string, D>) => import("loro-mirror").StringSchemaType<string> & {
|
|
339
|
-
options: {};
|
|
340
|
-
transform: import("loro-mirror").TransformDefinition<string, D>;
|
|
341
|
-
};
|
|
342
|
-
}>, C>;
|
|
343
|
-
}> & {
|
|
344
|
-
options: {
|
|
345
|
-
readonly mergeableMapChildContainers: true;
|
|
346
|
-
};
|
|
347
|
-
};
|
|
348
|
-
}> & {
|
|
349
|
-
options: {};
|
|
350
|
-
};
|
|
351
|
-
type MedeoDslLoroState = InferType<typeof medeoDslLoroShape>;
|
|
352
|
-
/** Writable view: new containers do not yet have a $cid or TreeID. */
|
|
353
|
-
type Input = InferInputType<typeof medeoDslLoroShape>;
|
|
354
|
-
type ContainDraftNode = Omit<Input['contain-relations'][number], 'id' | 'children'> & {
|
|
355
|
-
readonly id?: string;
|
|
356
|
-
children: ContainDraftNode[];
|
|
357
|
-
};
|
|
358
|
-
type DraftFields<T> = T extends Cursor ? T : T extends (infer Item)[] ? DraftFields<Item>[] : T extends object ? { [K in keyof T as undefined extends T[K] ? never : K]: DraftFields<T[K]> } & { [K in keyof T as undefined extends T[K] ? K : never]?: DraftFields<T[K]> } : T;
|
|
359
|
-
type MedeoDslDraft = DraftFields<Omit<Input, 'contain-relations'>> & {
|
|
360
|
-
'contain-relations': ContainDraftNode[];
|
|
361
|
-
};
|
|
362
|
-
//#endregion
|
|
363
|
-
//#region ../medeo-dsl/src/schema/document-format.d.ts
|
|
364
|
-
/** Format discrimination does not register containers or alter the document. */
|
|
365
|
-
declare function documentFormat(doc: LoroDoc): 'dsl' | 'legacy' | 'mixed' | 'unknown';
|
|
366
|
-
declare class UnsupportedDocumentFormatError extends Error {
|
|
367
|
-
readonly code = "unsupported_document_format";
|
|
368
|
-
constructor();
|
|
369
|
-
}
|
|
370
|
-
/** Run after initial import, before opening an editable handle. Empty new documents still have one Timeline. */
|
|
371
|
-
declare function assertDslDocument(doc: LoroDoc): void;
|
|
372
|
-
//#endregion
|
|
373
|
-
//#region src/dsl/document/types.d.ts
|
|
374
|
-
/** Serialized once at the transaction exit, using the existing server audit envelope. */
|
|
375
|
-
interface DslAudit {
|
|
376
|
-
semantic_op: string;
|
|
377
|
-
payload: unknown;
|
|
378
|
-
intent?: unknown;
|
|
379
|
-
actor?: {
|
|
380
|
-
user_id: string;
|
|
381
|
-
role: 'user' | 'agent';
|
|
382
|
-
} | null;
|
|
383
|
-
}
|
|
384
|
-
/** Synchronous, scoped draft. Never retain this context or any draft object after the callback. */
|
|
385
|
-
interface DslTransaction {
|
|
386
|
-
readonly draft: MedeoDslDraft;
|
|
387
|
-
applyMutations(mutations: readonly DslMutation[]): void;
|
|
388
|
-
/** Offsets use the preview after preceding edits. Existing Text identities are checked when supplied. */
|
|
389
|
-
editText(audioScriptId: string, edits: readonly TextEdit[], expectedBodyId?: string): void;
|
|
390
|
-
/** Creates real Cursors during application; pending ranges are not exposed as draft Cursor objects. */
|
|
391
|
-
editCaptionText(captionId: string, edits: readonly TextEdit[], expectedBodyId?: string): void;
|
|
392
|
-
setCaptionContent(selection: CaptionSelection): void;
|
|
393
|
-
}
|
|
394
|
-
//#endregion
|
|
395
|
-
//#region src/dsl/document/medeo-dsl.d.ts
|
|
396
|
-
interface CreateMedeoDslOptions {
|
|
397
|
-
timelineId?: string;
|
|
398
|
-
peerId?: PeerID;
|
|
399
|
-
idFactory?: DslIdFactory;
|
|
400
|
-
}
|
|
401
|
-
/** One live DSL document. Business Actions belong to medeo-client, not this storage interface. */
|
|
402
|
-
declare class MedeoDsl {
|
|
403
|
-
readonly doc: LoroDoc;
|
|
404
|
-
private readonly options;
|
|
405
|
-
private disposed;
|
|
406
|
-
private writing;
|
|
407
|
-
private rejectTransaction?;
|
|
408
|
-
private listeners;
|
|
409
|
-
private changeSource;
|
|
410
|
-
private snapshot?;
|
|
411
|
-
private dirty;
|
|
412
|
-
private notifying;
|
|
413
|
-
private readonly mirror;
|
|
414
|
-
private readonly unsubscribe;
|
|
415
|
-
private ownsDoc;
|
|
416
|
-
/** Opens a borrowed LoroDoc; dispose releases subscriptions but does not free the caller's doc. */
|
|
417
|
-
constructor(doc: LoroDoc, options?: {
|
|
418
|
-
mutationGuard?: {
|
|
419
|
-
run<T>(mutation: () => T): T;
|
|
420
|
-
};
|
|
421
|
-
});
|
|
422
|
-
/** Creates and owns a fresh document; this handle frees it on dispose. */
|
|
423
|
-
static create(options?: CreateMedeoDslOptions): MedeoDsl;
|
|
424
|
-
getSnapshot(): MedeoDslSnapshot;
|
|
425
|
-
subscribe(listener: (source: 'local' | 'remote') => void): () => void;
|
|
426
|
-
/** One synchronous, audited edit. Preparation errors discard the whole draft before native writes. */
|
|
427
|
-
transact(edit: (tx: DslTransaction) => void, audit: DslAudit): void;
|
|
428
|
-
/** Preferred vocabulary for ordinary entity/relation/Tree edits and serializable native commands. */
|
|
429
|
-
applyMutations(mutations: readonly DslMutation[], audit: DslAudit): void;
|
|
430
|
-
editText(scriptId: string, expectedBodyId: string, edits: readonly TextEdit[], audit: DslAudit): void;
|
|
431
|
-
editCaptionText(captionId: string, expectedBodyId: string, edits: readonly TextEdit[], audit: DslAudit): void;
|
|
432
|
-
/** Local ranges exclude insertions at their start and include insertions at their end. K01 remains deferred. */
|
|
433
|
-
textRange(scriptId: string, start: number, end: number): Omit<CaptionContent, 'captionId'>;
|
|
434
|
-
dispose(): void;
|
|
435
|
-
private mutate;
|
|
436
|
-
private notify;
|
|
437
|
-
private assertActive;
|
|
438
|
-
}
|
|
439
|
-
//#endregion
|
|
440
|
-
//#region src/dsl/voiceover-actions.d.ts
|
|
441
|
-
interface VoiceoverCaptionInput {
|
|
442
|
-
clipId?: string;
|
|
443
|
-
startMs: number;
|
|
444
|
-
durationMs: number;
|
|
445
|
-
/** UTF-16 selection in the supplied AudioScript; timing remains a separate fact. */
|
|
446
|
-
range: {
|
|
447
|
-
start: number;
|
|
448
|
-
end: number;
|
|
449
|
-
};
|
|
450
|
-
style?: CaptionStyle;
|
|
451
|
-
}
|
|
452
|
-
interface ApplyVoiceoverInput {
|
|
453
|
-
clipId?: string;
|
|
454
|
-
trackId: string;
|
|
455
|
-
captionTrackId?: string;
|
|
456
|
-
media: Extract<Media, {
|
|
457
|
-
kind: 'audio' | 'voiceover-recording';
|
|
458
|
-
}> & {
|
|
459
|
-
kind: 'voiceover-recording';
|
|
460
|
-
};
|
|
461
|
-
script: {
|
|
462
|
-
audioScriptId: string;
|
|
463
|
-
body?: never;
|
|
464
|
-
} | {
|
|
465
|
-
body: string;
|
|
466
|
-
audioScriptId?: never;
|
|
467
|
-
defaultLanguage?: string;
|
|
468
|
-
};
|
|
469
|
-
placement: ClipPlacement;
|
|
470
|
-
volume?: number;
|
|
471
|
-
voice?: Voice;
|
|
472
|
-
/** Complete generated caption set for this use. Other uses of the recording are untouched. */
|
|
473
|
-
captions: readonly VoiceoverCaptionInput[];
|
|
474
|
-
}
|
|
475
|
-
interface VoiceoverResult {
|
|
476
|
-
clipId: string;
|
|
477
|
-
mediaId: string;
|
|
478
|
-
audioScriptId: string;
|
|
479
|
-
captionClipIds: string[];
|
|
480
|
-
captionIds: string[];
|
|
481
|
-
}
|
|
482
|
-
//#endregion
|
|
483
|
-
//#region src/dsl/dsl-editor.d.ts
|
|
484
|
-
/** Business edits write DSL facts in one audited transaction; layout is derived on read. */
|
|
485
|
-
declare class DslEditor {
|
|
486
|
-
readonly dsl: MedeoDsl;
|
|
487
|
-
private readonly idFactory;
|
|
488
|
-
constructor(dsl: MedeoDsl, idFactory?: DslIdFactory);
|
|
489
|
-
createTrack(role: TrackRole, options?: CommitOptions): string;
|
|
490
|
-
registerMedia(media: Media, options?: CommitOptions): string;
|
|
491
|
-
addClips(input: AddDslClipsInput, options?: CommitOptions): string[];
|
|
492
|
-
/** index is measured in the target's children after removing the moved Clip. */
|
|
493
|
-
moveClip(clipId: string, trackId: string, index?: number, options?: CommitOptions): void;
|
|
494
|
-
trimClip(clipId: string, window: {
|
|
495
|
-
inMs?: number;
|
|
496
|
-
outMs?: number;
|
|
497
|
-
}, options?: CommitOptions): void;
|
|
498
|
-
setClipSpeed(clipId: string, speed: {
|
|
499
|
-
rate: number;
|
|
500
|
-
} | undefined, options?: CommitOptions): void;
|
|
501
|
-
setClipVolume(clipId: string, volume: number | undefined, options?: CommitOptions): void;
|
|
502
|
-
createAudioScript(body: string, defaultLanguage?: string, options?: CommitOptions): string;
|
|
503
|
-
editAudioScript(scriptId: string, expectedBodyId: string, edits: readonly TextEdit[], options?: CommitOptions): void;
|
|
504
|
-
createCaption(input: ({
|
|
505
|
-
audioScriptId: string;
|
|
506
|
-
start: number;
|
|
507
|
-
end: number;
|
|
508
|
-
text?: never;
|
|
509
|
-
} | {
|
|
510
|
-
text: string;
|
|
511
|
-
audioScriptId?: never;
|
|
512
|
-
start?: never;
|
|
513
|
-
end?: never;
|
|
514
|
-
}) & {
|
|
515
|
-
style?: CaptionStyle;
|
|
516
|
-
}, options?: CommitOptions): string;
|
|
517
|
-
setCaptionContent(captionId: string, audioScriptId: string, start: number, end: number, options?: CommitOptions): void;
|
|
518
|
-
setCaptionText(captionId: string, text: string, options?: CommitOptions): void;
|
|
519
|
-
editCaptionText(captionId: string, expectedBodyId: string, edits: readonly TextEdit[], options?: CommitOptions): void;
|
|
520
|
-
moveTrack(trackId: string, index: number, options?: CommitOptions): void;
|
|
521
|
-
setTrackHidden(trackId: string, hidden: boolean | undefined, options?: CommitOptions): void;
|
|
522
|
-
deleteTrack(trackId: string, onAnchored: 'cascade' | 'detach', options?: CommitOptions): void;
|
|
523
|
-
setClipPlacement(clipId: string, placement: ClipPlacement, options?: CommitOptions): void;
|
|
524
|
-
moveClips(input: MoveDslClipsInput, options?: CommitOptions): void;
|
|
525
|
-
deleteClips(clipIds: readonly string[], onAnchored: 'cascade' | 'detach', options?: CommitOptions): void;
|
|
526
|
-
replaceClipSource(clipId: string, input: ClipSource & {
|
|
527
|
-
inMs: number;
|
|
528
|
-
outMs: number;
|
|
529
|
-
}, options?: CommitOptions): void;
|
|
530
|
-
replaceClips(input: ReplaceDslClipsInput, options?: CommitOptions): string[];
|
|
531
|
-
updateClips(updates: readonly DslClipUpdate[], options?: CommitOptions): void;
|
|
532
|
-
patchCaptionStyle(captionIds: readonly string[], patch: FieldPatch<CaptionStyle>, options?: CommitOptions): void;
|
|
533
|
-
applyVoiceover(input: ApplyVoiceoverInput, options?: CommitOptions): VoiceoverResult;
|
|
534
|
-
setBgm(input: ClipSource & {
|
|
535
|
-
trackId: string;
|
|
536
|
-
clipId?: string;
|
|
537
|
-
volume?: number;
|
|
538
|
-
}, options?: CommitOptions): string;
|
|
539
|
-
private write;
|
|
540
|
-
}
|
|
541
|
-
//#endregion
|
|
542
|
-
//#region src/dsl/initial-document.d.ts
|
|
543
|
-
/** One server/host creates the foundation; peers import its binary identity instead of initializing independently. */
|
|
544
|
-
declare function createInitialMedeoDsl(options?: CreateMedeoDslOptions): MedeoDsl;
|
|
545
|
-
//#endregion
|
|
546
|
-
//#region src/dsl/projection/types.d.ts
|
|
547
|
-
interface DslClipLayout {
|
|
548
|
-
clipId: string;
|
|
549
|
-
trackId: string;
|
|
550
|
-
sourceId?: string;
|
|
551
|
-
inMs: number;
|
|
552
|
-
outMs: number;
|
|
553
|
-
rate: number;
|
|
554
|
-
volume: number;
|
|
555
|
-
startMs: number;
|
|
556
|
-
durationMs: number;
|
|
557
|
-
mode: 'sequential' | 'absolute' | 'anchored' | 'fallback';
|
|
558
|
-
anchorClipId?: string;
|
|
559
|
-
fillTimeline: boolean;
|
|
560
|
-
}
|
|
561
|
-
interface DslTrackLayout {
|
|
562
|
-
trackId: string;
|
|
563
|
-
role: TrackRole;
|
|
564
|
-
hidden: boolean;
|
|
565
|
-
clips: DslClipLayout[];
|
|
566
|
-
}
|
|
567
|
-
interface DslLayout {
|
|
568
|
-
timelineId: string;
|
|
569
|
-
tracks: DslTrackLayout[];
|
|
570
|
-
clips: Record<string, DslClipLayout>;
|
|
571
|
-
durationMs: number;
|
|
572
|
-
diagnostics: DslDiagnostic[];
|
|
573
|
-
}
|
|
574
|
-
/** Unsupported legacy representations fail explicitly; recoverable CRDT state is returned as diagnostics. */
|
|
575
|
-
declare class DslProjectionError extends Error {
|
|
576
|
-
readonly issues: readonly DslDiagnostic[];
|
|
577
|
-
constructor(issues: readonly DslDiagnostic[]);
|
|
578
|
-
}
|
|
579
|
-
//#endregion
|
|
580
|
-
//#region src/dsl/projection/layout.d.ts
|
|
581
|
-
/** Pure deterministic solve. Constraints only move sequential roots; anchors retain their exact offsets. */
|
|
582
|
-
declare function resolveDslLayout(snapshot: MedeoDslSnapshot): DslLayout;
|
|
583
|
-
//#endregion
|
|
584
|
-
//#region src/dsl/projection/to-video-draft.d.ts
|
|
585
|
-
interface VideoDraftProjection {
|
|
586
|
-
content: VideoDraftContent;
|
|
587
|
-
diagnostics: DslDiagnostic[];
|
|
588
|
-
}
|
|
589
|
-
/** A content read view, not an archive of authoring identities, rich-text marks or provenance. */
|
|
590
|
-
declare function toVideoDraft(snapshot: MedeoDslSnapshot): VideoDraftProjection;
|
|
591
|
-
//#endregion
|
|
592
|
-
//#region src/dsl/projection/from-video-draft.d.ts
|
|
593
|
-
interface FromVideoDraftOptions extends CreateMedeoDslOptions {
|
|
594
|
-
/** Complete physical media facts, keyed by their external system/key; no IO runs in the converter. */
|
|
595
|
-
mediaFacts?: readonly Media[];
|
|
596
|
-
audit: DslAudit;
|
|
597
|
-
}
|
|
598
|
-
interface ImportedVideoDraft {
|
|
599
|
-
dsl: MedeoDsl;
|
|
600
|
-
diagnostics: DslDiagnostic[];
|
|
601
|
-
}
|
|
602
|
-
/** One-time import into a newly owned document; never reverse-diff a live collaborative document. */
|
|
603
|
-
declare function fromVideoDraft(input: VideoDraftInput, options: FromVideoDraftOptions): ImportedVideoDraft;
|
|
604
|
-
//#endregion
|
|
605
|
-
export { AddDslClip as A, MedeoDslDraft as C, captionContentCodec as D, InvalidAtomic as E, ReplaceDslClipsInput as F, ClipPlacement as I, ClipSource as M, DslClipUpdate as N, isInvalidAtomic as O, MoveDslClipsInput as P, documentFormat as S, medeoDslLoroShape as T, MedeoDsl as _, toVideoDraft as a, UnsupportedDocumentFormatError as b, DslLayout as c, createInitialMedeoDsl as d, DslEditor as f, CreateMedeoDslOptions as g, VoiceoverResult as h, VideoDraftProjection as i, AddDslClipsInput as j, timeAnchorCodec as k, DslProjectionError as l, VoiceoverCaptionInput as m, ImportedVideoDraft as n, resolveDslLayout as o, ApplyVoiceoverInput as p, fromVideoDraft as r, DslClipLayout as s, FromVideoDraftOptions as t, DslTrackLayout as u, DslAudit as v, MedeoDslLoroState as w, assertDslDocument as x, DslTransaction as y };
|