@tongue-core/project 0.1.0-rc.2 → 0.1.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build/extract.d.ts +32 -13
- package/dist/doc/assemble.d.ts +96 -39
- package/dist/doc/assemble.js +8 -4
- package/dist/doc/check.d.ts +64 -26
- package/dist/doc/film-doc.d.ts +85 -0
- package/dist/doc/film-doc.js +22 -3
- package/dist/doc/from-plan.d.ts +32 -13
- package/dist/doc/from-plan.js +6 -4
- package/dist/doc/plan-doc.d.ts +32 -13
- package/package.json +2 -2
package/dist/build/extract.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export declare const extractFilm: (project: LoadedProject, options?: ExtractOpti
|
|
|
42
42
|
readonly kind: "font";
|
|
43
43
|
readonly name: string;
|
|
44
44
|
readonly source: string;
|
|
45
|
+
readonly italic?: string | undefined;
|
|
45
46
|
} | {
|
|
46
47
|
readonly kind: "image";
|
|
47
48
|
readonly name: string;
|
|
@@ -61,10 +62,11 @@ export declare const extractFilm: (project: LoadedProject, options?: ExtractOpti
|
|
|
61
62
|
readonly id: string;
|
|
62
63
|
readonly kind: "audio" | "visual";
|
|
63
64
|
readonly clips: readonly ({
|
|
64
|
-
readonly
|
|
65
|
+
readonly kind: "scene";
|
|
66
|
+
readonly id: string;
|
|
65
67
|
readonly props: import("effect/Schema").Json;
|
|
68
|
+
readonly scene: string;
|
|
66
69
|
readonly opacity: number;
|
|
67
|
-
readonly id: string;
|
|
68
70
|
readonly start: number;
|
|
69
71
|
readonly duration: number;
|
|
70
72
|
readonly end: number;
|
|
@@ -72,17 +74,13 @@ export declare const extractFilm: (project: LoadedProject, options?: ExtractOpti
|
|
|
72
74
|
readonly file: string;
|
|
73
75
|
readonly line: number;
|
|
74
76
|
} | null;
|
|
75
|
-
readonly
|
|
77
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
76
78
|
} | {
|
|
77
|
-
readonly asset: string;
|
|
78
79
|
readonly in: number;
|
|
79
80
|
readonly out: number;
|
|
80
|
-
readonly
|
|
81
|
-
readonly reverse: boolean;
|
|
82
|
-
readonly freeze: boolean;
|
|
83
|
-
readonly fit: "cover" | "contain";
|
|
84
|
-
readonly opacity: number;
|
|
81
|
+
readonly kind: "video";
|
|
85
82
|
readonly id: string;
|
|
83
|
+
readonly opacity: number;
|
|
86
84
|
readonly start: number;
|
|
87
85
|
readonly duration: number;
|
|
88
86
|
readonly end: number;
|
|
@@ -90,12 +88,16 @@ export declare const extractFilm: (project: LoadedProject, options?: ExtractOpti
|
|
|
90
88
|
readonly file: string;
|
|
91
89
|
readonly line: number;
|
|
92
90
|
} | null;
|
|
93
|
-
readonly kind: "video";
|
|
94
|
-
} | {
|
|
95
91
|
readonly asset: string;
|
|
92
|
+
readonly speed: number;
|
|
93
|
+
readonly reverse: boolean;
|
|
94
|
+
readonly freeze: boolean;
|
|
96
95
|
readonly fit: "cover" | "contain";
|
|
97
|
-
readonly
|
|
96
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
97
|
+
} | {
|
|
98
|
+
readonly kind: "image";
|
|
98
99
|
readonly id: string;
|
|
100
|
+
readonly opacity: number;
|
|
99
101
|
readonly start: number;
|
|
100
102
|
readonly duration: number;
|
|
101
103
|
readonly end: number;
|
|
@@ -103,7 +105,9 @@ export declare const extractFilm: (project: LoadedProject, options?: ExtractOpti
|
|
|
103
105
|
readonly file: string;
|
|
104
106
|
readonly line: number;
|
|
105
107
|
} | null;
|
|
106
|
-
readonly
|
|
108
|
+
readonly asset: string;
|
|
109
|
+
readonly fit: "cover" | "contain";
|
|
110
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
107
111
|
} | {
|
|
108
112
|
readonly asset: string;
|
|
109
113
|
readonly in: number;
|
|
@@ -202,6 +206,21 @@ export declare const extractFilm: (project: LoadedProject, options?: ExtractOpti
|
|
|
202
206
|
readonly line: number;
|
|
203
207
|
} | null;
|
|
204
208
|
readonly style: "morph";
|
|
209
|
+
} | {
|
|
210
|
+
readonly noise: "cloud" | "ridged";
|
|
211
|
+
readonly size: number;
|
|
212
|
+
readonly edge: string | null;
|
|
213
|
+
readonly from: string;
|
|
214
|
+
readonly to: string;
|
|
215
|
+
readonly frames: number;
|
|
216
|
+
readonly ease: "linear" | "glide" | "settle" | "snap" | "in" | "out" | "swift";
|
|
217
|
+
readonly start: number;
|
|
218
|
+
readonly end: number;
|
|
219
|
+
readonly origin: {
|
|
220
|
+
readonly file: string;
|
|
221
|
+
readonly line: number;
|
|
222
|
+
} | null;
|
|
223
|
+
readonly style: "dissolve";
|
|
205
224
|
})[];
|
|
206
225
|
}[];
|
|
207
226
|
readonly warnings: readonly string[];
|
package/dist/doc/assemble.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export declare const assembleFilm: (doc: {
|
|
|
40
40
|
readonly kind: "font";
|
|
41
41
|
readonly name: string;
|
|
42
42
|
readonly source: string;
|
|
43
|
+
readonly italic?: string | undefined;
|
|
43
44
|
} | {
|
|
44
45
|
readonly kind: "image";
|
|
45
46
|
readonly name: string;
|
|
@@ -59,10 +60,11 @@ export declare const assembleFilm: (doc: {
|
|
|
59
60
|
readonly id: string;
|
|
60
61
|
readonly kind: "audio" | "visual";
|
|
61
62
|
readonly clips: readonly ({
|
|
62
|
-
readonly
|
|
63
|
+
readonly kind: "scene";
|
|
64
|
+
readonly id: string;
|
|
63
65
|
readonly props: import("effect/Schema").Json;
|
|
66
|
+
readonly scene: string;
|
|
64
67
|
readonly opacity: number;
|
|
65
|
-
readonly id: string;
|
|
66
68
|
readonly start: number;
|
|
67
69
|
readonly duration: number;
|
|
68
70
|
readonly end: number;
|
|
@@ -70,17 +72,13 @@ export declare const assembleFilm: (doc: {
|
|
|
70
72
|
readonly file: string;
|
|
71
73
|
readonly line: number;
|
|
72
74
|
} | null;
|
|
73
|
-
readonly
|
|
75
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
74
76
|
} | {
|
|
75
|
-
readonly asset: string;
|
|
76
77
|
readonly in: number;
|
|
77
78
|
readonly out: number;
|
|
78
|
-
readonly
|
|
79
|
-
readonly reverse: boolean;
|
|
80
|
-
readonly freeze: boolean;
|
|
81
|
-
readonly fit: "cover" | "contain";
|
|
82
|
-
readonly opacity: number;
|
|
79
|
+
readonly kind: "video";
|
|
83
80
|
readonly id: string;
|
|
81
|
+
readonly opacity: number;
|
|
84
82
|
readonly start: number;
|
|
85
83
|
readonly duration: number;
|
|
86
84
|
readonly end: number;
|
|
@@ -88,12 +86,16 @@ export declare const assembleFilm: (doc: {
|
|
|
88
86
|
readonly file: string;
|
|
89
87
|
readonly line: number;
|
|
90
88
|
} | null;
|
|
91
|
-
readonly kind: "video";
|
|
92
|
-
} | {
|
|
93
89
|
readonly asset: string;
|
|
90
|
+
readonly speed: number;
|
|
91
|
+
readonly reverse: boolean;
|
|
92
|
+
readonly freeze: boolean;
|
|
94
93
|
readonly fit: "cover" | "contain";
|
|
95
|
-
readonly
|
|
94
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
95
|
+
} | {
|
|
96
|
+
readonly kind: "image";
|
|
96
97
|
readonly id: string;
|
|
98
|
+
readonly opacity: number;
|
|
97
99
|
readonly start: number;
|
|
98
100
|
readonly duration: number;
|
|
99
101
|
readonly end: number;
|
|
@@ -101,7 +103,9 @@ export declare const assembleFilm: (doc: {
|
|
|
101
103
|
readonly file: string;
|
|
102
104
|
readonly line: number;
|
|
103
105
|
} | null;
|
|
104
|
-
readonly
|
|
106
|
+
readonly asset: string;
|
|
107
|
+
readonly fit: "cover" | "contain";
|
|
108
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
105
109
|
} | {
|
|
106
110
|
readonly asset: string;
|
|
107
111
|
readonly in: number;
|
|
@@ -200,6 +204,21 @@ export declare const assembleFilm: (doc: {
|
|
|
200
204
|
readonly line: number;
|
|
201
205
|
} | null;
|
|
202
206
|
readonly style: "morph";
|
|
207
|
+
} | {
|
|
208
|
+
readonly noise: "cloud" | "ridged";
|
|
209
|
+
readonly size: number;
|
|
210
|
+
readonly edge: string | null;
|
|
211
|
+
readonly from: string;
|
|
212
|
+
readonly to: string;
|
|
213
|
+
readonly frames: number;
|
|
214
|
+
readonly ease: "linear" | "glide" | "settle" | "snap" | "in" | "out" | "swift";
|
|
215
|
+
readonly start: number;
|
|
216
|
+
readonly end: number;
|
|
217
|
+
readonly origin: {
|
|
218
|
+
readonly file: string;
|
|
219
|
+
readonly line: number;
|
|
220
|
+
} | null;
|
|
221
|
+
readonly style: "dissolve";
|
|
203
222
|
})[];
|
|
204
223
|
}[];
|
|
205
224
|
readonly warnings: readonly string[];
|
|
@@ -236,6 +255,7 @@ export declare const sceneFilmDoc: (doc: {
|
|
|
236
255
|
readonly kind: "font";
|
|
237
256
|
readonly name: string;
|
|
238
257
|
readonly source: string;
|
|
258
|
+
readonly italic?: string | undefined;
|
|
239
259
|
} | {
|
|
240
260
|
readonly kind: "image";
|
|
241
261
|
readonly name: string;
|
|
@@ -255,10 +275,11 @@ export declare const sceneFilmDoc: (doc: {
|
|
|
255
275
|
readonly id: string;
|
|
256
276
|
readonly kind: "audio" | "visual";
|
|
257
277
|
readonly clips: readonly ({
|
|
258
|
-
readonly
|
|
278
|
+
readonly kind: "scene";
|
|
279
|
+
readonly id: string;
|
|
259
280
|
readonly props: import("effect/Schema").Json;
|
|
281
|
+
readonly scene: string;
|
|
260
282
|
readonly opacity: number;
|
|
261
|
-
readonly id: string;
|
|
262
283
|
readonly start: number;
|
|
263
284
|
readonly duration: number;
|
|
264
285
|
readonly end: number;
|
|
@@ -266,17 +287,13 @@ export declare const sceneFilmDoc: (doc: {
|
|
|
266
287
|
readonly file: string;
|
|
267
288
|
readonly line: number;
|
|
268
289
|
} | null;
|
|
269
|
-
readonly
|
|
290
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
270
291
|
} | {
|
|
271
|
-
readonly asset: string;
|
|
272
292
|
readonly in: number;
|
|
273
293
|
readonly out: number;
|
|
274
|
-
readonly
|
|
275
|
-
readonly reverse: boolean;
|
|
276
|
-
readonly freeze: boolean;
|
|
277
|
-
readonly fit: "cover" | "contain";
|
|
278
|
-
readonly opacity: number;
|
|
294
|
+
readonly kind: "video";
|
|
279
295
|
readonly id: string;
|
|
296
|
+
readonly opacity: number;
|
|
280
297
|
readonly start: number;
|
|
281
298
|
readonly duration: number;
|
|
282
299
|
readonly end: number;
|
|
@@ -284,12 +301,16 @@ export declare const sceneFilmDoc: (doc: {
|
|
|
284
301
|
readonly file: string;
|
|
285
302
|
readonly line: number;
|
|
286
303
|
} | null;
|
|
287
|
-
readonly kind: "video";
|
|
288
|
-
} | {
|
|
289
304
|
readonly asset: string;
|
|
305
|
+
readonly speed: number;
|
|
306
|
+
readonly reverse: boolean;
|
|
307
|
+
readonly freeze: boolean;
|
|
290
308
|
readonly fit: "cover" | "contain";
|
|
291
|
-
readonly
|
|
309
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
310
|
+
} | {
|
|
311
|
+
readonly kind: "image";
|
|
292
312
|
readonly id: string;
|
|
313
|
+
readonly opacity: number;
|
|
293
314
|
readonly start: number;
|
|
294
315
|
readonly duration: number;
|
|
295
316
|
readonly end: number;
|
|
@@ -297,7 +318,9 @@ export declare const sceneFilmDoc: (doc: {
|
|
|
297
318
|
readonly file: string;
|
|
298
319
|
readonly line: number;
|
|
299
320
|
} | null;
|
|
300
|
-
readonly
|
|
321
|
+
readonly asset: string;
|
|
322
|
+
readonly fit: "cover" | "contain";
|
|
323
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
301
324
|
} | {
|
|
302
325
|
readonly asset: string;
|
|
303
326
|
readonly in: number;
|
|
@@ -396,6 +419,21 @@ export declare const sceneFilmDoc: (doc: {
|
|
|
396
419
|
readonly line: number;
|
|
397
420
|
} | null;
|
|
398
421
|
readonly style: "morph";
|
|
422
|
+
} | {
|
|
423
|
+
readonly noise: "cloud" | "ridged";
|
|
424
|
+
readonly size: number;
|
|
425
|
+
readonly edge: string | null;
|
|
426
|
+
readonly from: string;
|
|
427
|
+
readonly to: string;
|
|
428
|
+
readonly frames: number;
|
|
429
|
+
readonly ease: "linear" | "glide" | "settle" | "snap" | "in" | "out" | "swift";
|
|
430
|
+
readonly start: number;
|
|
431
|
+
readonly end: number;
|
|
432
|
+
readonly origin: {
|
|
433
|
+
readonly file: string;
|
|
434
|
+
readonly line: number;
|
|
435
|
+
} | null;
|
|
436
|
+
readonly style: "dissolve";
|
|
399
437
|
})[];
|
|
400
438
|
}[];
|
|
401
439
|
readonly warnings: readonly string[];
|
|
@@ -429,6 +467,7 @@ export declare const sceneFilmDoc: (doc: {
|
|
|
429
467
|
readonly kind: "font";
|
|
430
468
|
readonly name: string;
|
|
431
469
|
readonly source: string;
|
|
470
|
+
readonly italic?: string | undefined;
|
|
432
471
|
} | {
|
|
433
472
|
readonly kind: "image";
|
|
434
473
|
readonly name: string;
|
|
@@ -448,10 +487,11 @@ export declare const sceneFilmDoc: (doc: {
|
|
|
448
487
|
readonly id: string;
|
|
449
488
|
readonly kind: "audio" | "visual";
|
|
450
489
|
readonly clips: readonly ({
|
|
451
|
-
readonly
|
|
490
|
+
readonly kind: "scene";
|
|
491
|
+
readonly id: string;
|
|
452
492
|
readonly props: import("effect/Schema").Json;
|
|
493
|
+
readonly scene: string;
|
|
453
494
|
readonly opacity: number;
|
|
454
|
-
readonly id: string;
|
|
455
495
|
readonly start: number;
|
|
456
496
|
readonly duration: number;
|
|
457
497
|
readonly end: number;
|
|
@@ -459,17 +499,13 @@ export declare const sceneFilmDoc: (doc: {
|
|
|
459
499
|
readonly file: string;
|
|
460
500
|
readonly line: number;
|
|
461
501
|
} | null;
|
|
462
|
-
readonly
|
|
502
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
463
503
|
} | {
|
|
464
|
-
readonly asset: string;
|
|
465
504
|
readonly in: number;
|
|
466
505
|
readonly out: number;
|
|
467
|
-
readonly
|
|
468
|
-
readonly reverse: boolean;
|
|
469
|
-
readonly freeze: boolean;
|
|
470
|
-
readonly fit: "cover" | "contain";
|
|
471
|
-
readonly opacity: number;
|
|
506
|
+
readonly kind: "video";
|
|
472
507
|
readonly id: string;
|
|
508
|
+
readonly opacity: number;
|
|
473
509
|
readonly start: number;
|
|
474
510
|
readonly duration: number;
|
|
475
511
|
readonly end: number;
|
|
@@ -477,12 +513,16 @@ export declare const sceneFilmDoc: (doc: {
|
|
|
477
513
|
readonly file: string;
|
|
478
514
|
readonly line: number;
|
|
479
515
|
} | null;
|
|
480
|
-
readonly kind: "video";
|
|
481
|
-
} | {
|
|
482
516
|
readonly asset: string;
|
|
517
|
+
readonly speed: number;
|
|
518
|
+
readonly reverse: boolean;
|
|
519
|
+
readonly freeze: boolean;
|
|
483
520
|
readonly fit: "cover" | "contain";
|
|
484
|
-
readonly
|
|
521
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
522
|
+
} | {
|
|
523
|
+
readonly kind: "image";
|
|
485
524
|
readonly id: string;
|
|
525
|
+
readonly opacity: number;
|
|
486
526
|
readonly start: number;
|
|
487
527
|
readonly duration: number;
|
|
488
528
|
readonly end: number;
|
|
@@ -490,7 +530,9 @@ export declare const sceneFilmDoc: (doc: {
|
|
|
490
530
|
readonly file: string;
|
|
491
531
|
readonly line: number;
|
|
492
532
|
} | null;
|
|
493
|
-
readonly
|
|
533
|
+
readonly asset: string;
|
|
534
|
+
readonly fit: "cover" | "contain";
|
|
535
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
494
536
|
} | {
|
|
495
537
|
readonly asset: string;
|
|
496
538
|
readonly in: number;
|
|
@@ -589,6 +631,21 @@ export declare const sceneFilmDoc: (doc: {
|
|
|
589
631
|
readonly line: number;
|
|
590
632
|
} | null;
|
|
591
633
|
readonly style: "morph";
|
|
634
|
+
} | {
|
|
635
|
+
readonly noise: "cloud" | "ridged";
|
|
636
|
+
readonly size: number;
|
|
637
|
+
readonly edge: string | null;
|
|
638
|
+
readonly from: string;
|
|
639
|
+
readonly to: string;
|
|
640
|
+
readonly frames: number;
|
|
641
|
+
readonly ease: "linear" | "glide" | "settle" | "snap" | "in" | "out" | "swift";
|
|
642
|
+
readonly start: number;
|
|
643
|
+
readonly end: number;
|
|
644
|
+
readonly origin: {
|
|
645
|
+
readonly file: string;
|
|
646
|
+
readonly line: number;
|
|
647
|
+
} | null;
|
|
648
|
+
readonly style: "dissolve";
|
|
592
649
|
})[];
|
|
593
650
|
}[];
|
|
594
651
|
readonly warnings: readonly string[];
|
package/dist/doc/assemble.js
CHANGED
|
@@ -7,7 +7,10 @@ import { docError } from "./issues.js";
|
|
|
7
7
|
export function assetsOf(doc) {
|
|
8
8
|
return doc.assets.map((a) => {
|
|
9
9
|
switch (a.kind) {
|
|
10
|
-
case "font":
|
|
10
|
+
case "font": {
|
|
11
|
+
const italic = a.italic === undefined ? undefined : doc.assets.find((other) => other.kind === "font" && other.name === a.italic);
|
|
12
|
+
return font(a.source, italic ? { name: a.name, italic: italic.source } : { name: a.name });
|
|
13
|
+
}
|
|
11
14
|
case "image": return image(a.source, { name: a.name, maxSize: a.maxSize });
|
|
12
15
|
case "video": return video(a.source, { name: a.name, maxSize: a.maxSize });
|
|
13
16
|
case "audio": return audio(a.source, { name: a.name });
|
|
@@ -64,12 +67,12 @@ function clipNode(clip, path, reader) {
|
|
|
64
67
|
switch (clip.kind) {
|
|
65
68
|
case "scene": {
|
|
66
69
|
const scene = reader.scene(clip.scene, `${path}.scene`);
|
|
67
|
-
return Clip({ ...placed, scene, props: reader.read(scene.propsSchema, clip.props, `${path}.props`), opacity: clip.opacity });
|
|
70
|
+
return Clip({ ...placed, scene, props: reader.read(scene.propsSchema, clip.props, `${path}.props`), opacity: clip.opacity, blend: clip.blend ?? "normal" });
|
|
68
71
|
}
|
|
69
72
|
case "video":
|
|
70
|
-
return Clip({ ...placed, video: reader.asset("video", clip.asset, `${path}.asset`), in: clip.in, out: clip.out, speed: clip.speed, reverse: clip.reverse, freeze: clip.freeze, fit: clip.fit, opacity: clip.opacity });
|
|
73
|
+
return Clip({ ...placed, video: reader.asset("video", clip.asset, `${path}.asset`), in: clip.in, out: clip.out, speed: clip.speed, reverse: clip.reverse, freeze: clip.freeze, fit: clip.fit, opacity: clip.opacity, blend: clip.blend ?? "normal" });
|
|
71
74
|
case "image":
|
|
72
|
-
return Clip({ ...placed, image: reader.asset("image", clip.asset, `${path}.asset`), fit: clip.fit, opacity: clip.opacity });
|
|
75
|
+
return Clip({ ...placed, image: reader.asset("image", clip.asset, `${path}.asset`), fit: clip.fit, opacity: clip.opacity, blend: clip.blend ?? "normal" });
|
|
73
76
|
case "audio":
|
|
74
77
|
return Clip({ ...placed, audio: reader.asset("audio", clip.asset, `${path}.asset`), in: clip.in, out: clip.out, speed: clip.speed, gain: clip.gain, fadeIn: clip.fadeIn, fadeOut: clip.fadeOut });
|
|
75
78
|
}
|
|
@@ -79,6 +82,7 @@ function transitionNode(t) {
|
|
|
79
82
|
case "fade": return Transition.Fade({ frames: t.frames, ease: t.ease });
|
|
80
83
|
case "wipe": return Transition.Wipe({ frames: t.frames, ease: t.ease, direction: t.direction });
|
|
81
84
|
case "push": return Transition.Push({ frames: t.frames, ease: t.ease, direction: t.direction });
|
|
85
|
+
case "dissolve": return Transition.Dissolve(t.edge === null ? { frames: t.frames, ease: t.ease, noise: t.noise, size: t.size } : { frames: t.frames, ease: t.ease, noise: t.noise, size: t.size, edge: t.edge });
|
|
82
86
|
case "morph": return Transition.Morph({ frames: t.frames, ease: t.ease, others: t.others });
|
|
83
87
|
}
|
|
84
88
|
}
|
package/dist/doc/check.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export declare const decodeFilmDoc: (json: unknown) => Effect.Effect<{
|
|
|
34
34
|
readonly kind: "font";
|
|
35
35
|
readonly name: string;
|
|
36
36
|
readonly source: string;
|
|
37
|
+
readonly italic?: string | undefined;
|
|
37
38
|
} | {
|
|
38
39
|
readonly kind: "image";
|
|
39
40
|
readonly name: string;
|
|
@@ -53,10 +54,11 @@ export declare const decodeFilmDoc: (json: unknown) => Effect.Effect<{
|
|
|
53
54
|
readonly id: string;
|
|
54
55
|
readonly kind: "audio" | "visual";
|
|
55
56
|
readonly clips: readonly ({
|
|
56
|
-
readonly
|
|
57
|
+
readonly kind: "scene";
|
|
58
|
+
readonly id: string;
|
|
57
59
|
readonly props: Schema.Json;
|
|
60
|
+
readonly scene: string;
|
|
58
61
|
readonly opacity: number;
|
|
59
|
-
readonly id: string;
|
|
60
62
|
readonly start: number;
|
|
61
63
|
readonly duration: number;
|
|
62
64
|
readonly end: number;
|
|
@@ -64,17 +66,13 @@ export declare const decodeFilmDoc: (json: unknown) => Effect.Effect<{
|
|
|
64
66
|
readonly file: string;
|
|
65
67
|
readonly line: number;
|
|
66
68
|
} | null;
|
|
67
|
-
readonly
|
|
69
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
68
70
|
} | {
|
|
69
|
-
readonly asset: string;
|
|
70
71
|
readonly in: number;
|
|
71
72
|
readonly out: number;
|
|
72
|
-
readonly
|
|
73
|
-
readonly reverse: boolean;
|
|
74
|
-
readonly freeze: boolean;
|
|
75
|
-
readonly fit: "cover" | "contain";
|
|
76
|
-
readonly opacity: number;
|
|
73
|
+
readonly kind: "video";
|
|
77
74
|
readonly id: string;
|
|
75
|
+
readonly opacity: number;
|
|
78
76
|
readonly start: number;
|
|
79
77
|
readonly duration: number;
|
|
80
78
|
readonly end: number;
|
|
@@ -82,12 +80,16 @@ export declare const decodeFilmDoc: (json: unknown) => Effect.Effect<{
|
|
|
82
80
|
readonly file: string;
|
|
83
81
|
readonly line: number;
|
|
84
82
|
} | null;
|
|
85
|
-
readonly kind: "video";
|
|
86
|
-
} | {
|
|
87
83
|
readonly asset: string;
|
|
84
|
+
readonly speed: number;
|
|
85
|
+
readonly reverse: boolean;
|
|
86
|
+
readonly freeze: boolean;
|
|
88
87
|
readonly fit: "cover" | "contain";
|
|
89
|
-
readonly
|
|
88
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
89
|
+
} | {
|
|
90
|
+
readonly kind: "image";
|
|
90
91
|
readonly id: string;
|
|
92
|
+
readonly opacity: number;
|
|
91
93
|
readonly start: number;
|
|
92
94
|
readonly duration: number;
|
|
93
95
|
readonly end: number;
|
|
@@ -95,7 +97,9 @@ export declare const decodeFilmDoc: (json: unknown) => Effect.Effect<{
|
|
|
95
97
|
readonly file: string;
|
|
96
98
|
readonly line: number;
|
|
97
99
|
} | null;
|
|
98
|
-
readonly
|
|
100
|
+
readonly asset: string;
|
|
101
|
+
readonly fit: "cover" | "contain";
|
|
102
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
99
103
|
} | {
|
|
100
104
|
readonly asset: string;
|
|
101
105
|
readonly in: number;
|
|
@@ -194,6 +198,21 @@ export declare const decodeFilmDoc: (json: unknown) => Effect.Effect<{
|
|
|
194
198
|
readonly line: number;
|
|
195
199
|
} | null;
|
|
196
200
|
readonly style: "morph";
|
|
201
|
+
} | {
|
|
202
|
+
readonly noise: "cloud" | "ridged";
|
|
203
|
+
readonly size: number;
|
|
204
|
+
readonly edge: string | null;
|
|
205
|
+
readonly from: string;
|
|
206
|
+
readonly to: string;
|
|
207
|
+
readonly frames: number;
|
|
208
|
+
readonly ease: "linear" | "glide" | "settle" | "snap" | "in" | "out" | "swift";
|
|
209
|
+
readonly start: number;
|
|
210
|
+
readonly end: number;
|
|
211
|
+
readonly origin: {
|
|
212
|
+
readonly file: string;
|
|
213
|
+
readonly line: number;
|
|
214
|
+
} | null;
|
|
215
|
+
readonly style: "dissolve";
|
|
197
216
|
})[];
|
|
198
217
|
}[];
|
|
199
218
|
readonly warnings: readonly string[];
|
|
@@ -229,6 +248,7 @@ export declare const parseFilmDoc: (text: string) => Effect.Effect<{
|
|
|
229
248
|
readonly kind: "font";
|
|
230
249
|
readonly name: string;
|
|
231
250
|
readonly source: string;
|
|
251
|
+
readonly italic?: string | undefined;
|
|
232
252
|
} | {
|
|
233
253
|
readonly kind: "image";
|
|
234
254
|
readonly name: string;
|
|
@@ -248,10 +268,11 @@ export declare const parseFilmDoc: (text: string) => Effect.Effect<{
|
|
|
248
268
|
readonly id: string;
|
|
249
269
|
readonly kind: "audio" | "visual";
|
|
250
270
|
readonly clips: readonly ({
|
|
251
|
-
readonly
|
|
271
|
+
readonly kind: "scene";
|
|
272
|
+
readonly id: string;
|
|
252
273
|
readonly props: Schema.Json;
|
|
274
|
+
readonly scene: string;
|
|
253
275
|
readonly opacity: number;
|
|
254
|
-
readonly id: string;
|
|
255
276
|
readonly start: number;
|
|
256
277
|
readonly duration: number;
|
|
257
278
|
readonly end: number;
|
|
@@ -259,17 +280,13 @@ export declare const parseFilmDoc: (text: string) => Effect.Effect<{
|
|
|
259
280
|
readonly file: string;
|
|
260
281
|
readonly line: number;
|
|
261
282
|
} | null;
|
|
262
|
-
readonly
|
|
283
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
263
284
|
} | {
|
|
264
|
-
readonly asset: string;
|
|
265
285
|
readonly in: number;
|
|
266
286
|
readonly out: number;
|
|
267
|
-
readonly
|
|
268
|
-
readonly reverse: boolean;
|
|
269
|
-
readonly freeze: boolean;
|
|
270
|
-
readonly fit: "cover" | "contain";
|
|
271
|
-
readonly opacity: number;
|
|
287
|
+
readonly kind: "video";
|
|
272
288
|
readonly id: string;
|
|
289
|
+
readonly opacity: number;
|
|
273
290
|
readonly start: number;
|
|
274
291
|
readonly duration: number;
|
|
275
292
|
readonly end: number;
|
|
@@ -277,12 +294,16 @@ export declare const parseFilmDoc: (text: string) => Effect.Effect<{
|
|
|
277
294
|
readonly file: string;
|
|
278
295
|
readonly line: number;
|
|
279
296
|
} | null;
|
|
280
|
-
readonly kind: "video";
|
|
281
|
-
} | {
|
|
282
297
|
readonly asset: string;
|
|
298
|
+
readonly speed: number;
|
|
299
|
+
readonly reverse: boolean;
|
|
300
|
+
readonly freeze: boolean;
|
|
283
301
|
readonly fit: "cover" | "contain";
|
|
284
|
-
readonly
|
|
302
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
303
|
+
} | {
|
|
304
|
+
readonly kind: "image";
|
|
285
305
|
readonly id: string;
|
|
306
|
+
readonly opacity: number;
|
|
286
307
|
readonly start: number;
|
|
287
308
|
readonly duration: number;
|
|
288
309
|
readonly end: number;
|
|
@@ -290,7 +311,9 @@ export declare const parseFilmDoc: (text: string) => Effect.Effect<{
|
|
|
290
311
|
readonly file: string;
|
|
291
312
|
readonly line: number;
|
|
292
313
|
} | null;
|
|
293
|
-
readonly
|
|
314
|
+
readonly asset: string;
|
|
315
|
+
readonly fit: "cover" | "contain";
|
|
316
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
294
317
|
} | {
|
|
295
318
|
readonly asset: string;
|
|
296
319
|
readonly in: number;
|
|
@@ -389,6 +412,21 @@ export declare const parseFilmDoc: (text: string) => Effect.Effect<{
|
|
|
389
412
|
readonly line: number;
|
|
390
413
|
} | null;
|
|
391
414
|
readonly style: "morph";
|
|
415
|
+
} | {
|
|
416
|
+
readonly noise: "cloud" | "ridged";
|
|
417
|
+
readonly size: number;
|
|
418
|
+
readonly edge: string | null;
|
|
419
|
+
readonly from: string;
|
|
420
|
+
readonly to: string;
|
|
421
|
+
readonly frames: number;
|
|
422
|
+
readonly ease: "linear" | "glide" | "settle" | "snap" | "in" | "out" | "swift";
|
|
423
|
+
readonly start: number;
|
|
424
|
+
readonly end: number;
|
|
425
|
+
readonly origin: {
|
|
426
|
+
readonly file: string;
|
|
427
|
+
readonly line: number;
|
|
428
|
+
} | null;
|
|
429
|
+
readonly style: "dissolve";
|
|
392
430
|
})[];
|
|
393
431
|
}[];
|
|
394
432
|
readonly warnings: readonly string[];
|
package/dist/doc/film-doc.d.ts
CHANGED
|
@@ -49,6 +49,8 @@ export declare const AssetDoc: Schema.Union<readonly [Schema.Struct<{
|
|
|
49
49
|
readonly kind: Schema.Literal<"font">;
|
|
50
50
|
readonly name: Schema.String;
|
|
51
51
|
readonly source: Schema.String;
|
|
52
|
+
/** The name of the font asset `fontStyle: "italic"` uses. */
|
|
53
|
+
readonly italic: Schema.optionalKey<Schema.String>;
|
|
52
54
|
}>, Schema.Struct<{
|
|
53
55
|
readonly kind: Schema.Literal<"image">;
|
|
54
56
|
readonly name: Schema.String;
|
|
@@ -70,6 +72,7 @@ export declare const SceneClipDoc: Schema.Struct<{
|
|
|
70
72
|
/** Written by the scene's props schema (see `scenes[].props`). */
|
|
71
73
|
readonly props: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
72
74
|
readonly opacity: Schema.Finite;
|
|
75
|
+
readonly blend: Schema.optionalKey<Schema.Literals<readonly ["multiply", "screen", "overlay", "soft-light", "color-dodge", "normal"]>>;
|
|
73
76
|
readonly id: Schema.String;
|
|
74
77
|
readonly start: Schema.Finite;
|
|
75
78
|
readonly duration: Schema.Finite;
|
|
@@ -90,6 +93,7 @@ export declare const VideoClipDoc: Schema.Struct<{
|
|
|
90
93
|
readonly freeze: Schema.Boolean;
|
|
91
94
|
readonly fit: Schema.Literals<readonly ["cover", "contain"]>;
|
|
92
95
|
readonly opacity: Schema.Finite;
|
|
96
|
+
readonly blend: Schema.optionalKey<Schema.Literals<readonly ["multiply", "screen", "overlay", "soft-light", "color-dodge", "normal"]>>;
|
|
93
97
|
readonly id: Schema.String;
|
|
94
98
|
readonly start: Schema.Finite;
|
|
95
99
|
readonly duration: Schema.Finite;
|
|
@@ -105,6 +109,7 @@ export declare const ImageClipDoc: Schema.Struct<{
|
|
|
105
109
|
readonly asset: Schema.String;
|
|
106
110
|
readonly fit: Schema.Literals<readonly ["cover", "contain"]>;
|
|
107
111
|
readonly opacity: Schema.Finite;
|
|
112
|
+
readonly blend: Schema.optionalKey<Schema.Literals<readonly ["multiply", "screen", "overlay", "soft-light", "color-dodge", "normal"]>>;
|
|
108
113
|
readonly id: Schema.String;
|
|
109
114
|
readonly start: Schema.Finite;
|
|
110
115
|
readonly duration: Schema.Finite;
|
|
@@ -142,6 +147,7 @@ export declare const ClipDoc: Schema.Union<readonly [Schema.Struct<{
|
|
|
142
147
|
/** Written by the scene's props schema (see `scenes[].props`). */
|
|
143
148
|
readonly props: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
144
149
|
readonly opacity: Schema.Finite;
|
|
150
|
+
readonly blend: Schema.optionalKey<Schema.Literals<readonly ["multiply", "screen", "overlay", "soft-light", "color-dodge", "normal"]>>;
|
|
145
151
|
readonly id: Schema.String;
|
|
146
152
|
readonly start: Schema.Finite;
|
|
147
153
|
readonly duration: Schema.Finite;
|
|
@@ -160,6 +166,7 @@ export declare const ClipDoc: Schema.Union<readonly [Schema.Struct<{
|
|
|
160
166
|
readonly freeze: Schema.Boolean;
|
|
161
167
|
readonly fit: Schema.Literals<readonly ["cover", "contain"]>;
|
|
162
168
|
readonly opacity: Schema.Finite;
|
|
169
|
+
readonly blend: Schema.optionalKey<Schema.Literals<readonly ["multiply", "screen", "overlay", "soft-light", "color-dodge", "normal"]>>;
|
|
163
170
|
readonly id: Schema.String;
|
|
164
171
|
readonly start: Schema.Finite;
|
|
165
172
|
readonly duration: Schema.Finite;
|
|
@@ -173,6 +180,7 @@ export declare const ClipDoc: Schema.Union<readonly [Schema.Struct<{
|
|
|
173
180
|
readonly asset: Schema.String;
|
|
174
181
|
readonly fit: Schema.Literals<readonly ["cover", "contain"]>;
|
|
175
182
|
readonly opacity: Schema.Finite;
|
|
183
|
+
readonly blend: Schema.optionalKey<Schema.Literals<readonly ["multiply", "screen", "overlay", "soft-light", "color-dodge", "normal"]>>;
|
|
176
184
|
readonly id: Schema.String;
|
|
177
185
|
readonly start: Schema.Finite;
|
|
178
186
|
readonly duration: Schema.Finite;
|
|
@@ -216,6 +224,24 @@ export declare const FadeDoc: Schema.Struct<{
|
|
|
216
224
|
}>>;
|
|
217
225
|
readonly style: Schema.Literal<"fade">;
|
|
218
226
|
}>;
|
|
227
|
+
export declare const DissolveDoc: Schema.Struct<{
|
|
228
|
+
readonly noise: Schema.Literals<readonly ["cloud", "ridged"]>;
|
|
229
|
+
/** Pixels. */
|
|
230
|
+
readonly size: Schema.Finite;
|
|
231
|
+
/** The moving edge's color, when it has one. */
|
|
232
|
+
readonly edge: Schema.NullOr<Schema.String>;
|
|
233
|
+
readonly from: Schema.String;
|
|
234
|
+
readonly to: Schema.String;
|
|
235
|
+
readonly frames: Schema.Finite;
|
|
236
|
+
readonly ease: Schema.Literals<readonly ["linear", "glide", "settle", "snap", "in", "out", "swift"]>;
|
|
237
|
+
readonly start: Schema.Finite;
|
|
238
|
+
readonly end: Schema.Finite;
|
|
239
|
+
readonly origin: Schema.NullOr<Schema.Struct<{
|
|
240
|
+
readonly file: Schema.String;
|
|
241
|
+
readonly line: Schema.Int;
|
|
242
|
+
}>>;
|
|
243
|
+
readonly style: Schema.Literal<"dissolve">;
|
|
244
|
+
}>;
|
|
219
245
|
export declare const SlideDoc: Schema.Struct<{
|
|
220
246
|
readonly direction: Schema.Literals<readonly ["left", "right", "up", "down"]>;
|
|
221
247
|
readonly from: Schema.String;
|
|
@@ -370,6 +396,23 @@ export declare const TransitionDoc: Schema.Union<readonly [Schema.Struct<{
|
|
|
370
396
|
readonly line: Schema.Int;
|
|
371
397
|
}>>;
|
|
372
398
|
readonly style: Schema.Literal<"morph">;
|
|
399
|
+
}>, Schema.Struct<{
|
|
400
|
+
readonly noise: Schema.Literals<readonly ["cloud", "ridged"]>;
|
|
401
|
+
/** Pixels. */
|
|
402
|
+
readonly size: Schema.Finite;
|
|
403
|
+
/** The moving edge's color, when it has one. */
|
|
404
|
+
readonly edge: Schema.NullOr<Schema.String>;
|
|
405
|
+
readonly from: Schema.String;
|
|
406
|
+
readonly to: Schema.String;
|
|
407
|
+
readonly frames: Schema.Finite;
|
|
408
|
+
readonly ease: Schema.Literals<readonly ["linear", "glide", "settle", "snap", "in", "out", "swift"]>;
|
|
409
|
+
readonly start: Schema.Finite;
|
|
410
|
+
readonly end: Schema.Finite;
|
|
411
|
+
readonly origin: Schema.NullOr<Schema.Struct<{
|
|
412
|
+
readonly file: Schema.String;
|
|
413
|
+
readonly line: Schema.Int;
|
|
414
|
+
}>>;
|
|
415
|
+
readonly style: Schema.Literal<"dissolve">;
|
|
373
416
|
}>]>;
|
|
374
417
|
export type TransitionDoc = typeof TransitionDoc.Type;
|
|
375
418
|
export type MorphDoc = typeof MorphDoc.Type;
|
|
@@ -382,6 +425,7 @@ export declare const TrackDoc: Schema.Struct<{
|
|
|
382
425
|
/** Written by the scene's props schema (see `scenes[].props`). */
|
|
383
426
|
readonly props: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
384
427
|
readonly opacity: Schema.Finite;
|
|
428
|
+
readonly blend: Schema.optionalKey<Schema.Literals<readonly ["multiply", "screen", "overlay", "soft-light", "color-dodge", "normal"]>>;
|
|
385
429
|
readonly id: Schema.String;
|
|
386
430
|
readonly start: Schema.Finite;
|
|
387
431
|
readonly duration: Schema.Finite;
|
|
@@ -400,6 +444,7 @@ export declare const TrackDoc: Schema.Struct<{
|
|
|
400
444
|
readonly freeze: Schema.Boolean;
|
|
401
445
|
readonly fit: Schema.Literals<readonly ["cover", "contain"]>;
|
|
402
446
|
readonly opacity: Schema.Finite;
|
|
447
|
+
readonly blend: Schema.optionalKey<Schema.Literals<readonly ["multiply", "screen", "overlay", "soft-light", "color-dodge", "normal"]>>;
|
|
403
448
|
readonly id: Schema.String;
|
|
404
449
|
readonly start: Schema.Finite;
|
|
405
450
|
readonly duration: Schema.Finite;
|
|
@@ -413,6 +458,7 @@ export declare const TrackDoc: Schema.Struct<{
|
|
|
413
458
|
readonly asset: Schema.String;
|
|
414
459
|
readonly fit: Schema.Literals<readonly ["cover", "contain"]>;
|
|
415
460
|
readonly opacity: Schema.Finite;
|
|
461
|
+
readonly blend: Schema.optionalKey<Schema.Literals<readonly ["multiply", "screen", "overlay", "soft-light", "color-dodge", "normal"]>>;
|
|
416
462
|
readonly id: Schema.String;
|
|
417
463
|
readonly start: Schema.Finite;
|
|
418
464
|
readonly duration: Schema.Finite;
|
|
@@ -524,6 +570,23 @@ export declare const TrackDoc: Schema.Struct<{
|
|
|
524
570
|
readonly line: Schema.Int;
|
|
525
571
|
}>>;
|
|
526
572
|
readonly style: Schema.Literal<"morph">;
|
|
573
|
+
}>, Schema.Struct<{
|
|
574
|
+
readonly noise: Schema.Literals<readonly ["cloud", "ridged"]>;
|
|
575
|
+
/** Pixels. */
|
|
576
|
+
readonly size: Schema.Finite;
|
|
577
|
+
/** The moving edge's color, when it has one. */
|
|
578
|
+
readonly edge: Schema.NullOr<Schema.String>;
|
|
579
|
+
readonly from: Schema.String;
|
|
580
|
+
readonly to: Schema.String;
|
|
581
|
+
readonly frames: Schema.Finite;
|
|
582
|
+
readonly ease: Schema.Literals<readonly ["linear", "glide", "settle", "snap", "in", "out", "swift"]>;
|
|
583
|
+
readonly start: Schema.Finite;
|
|
584
|
+
readonly end: Schema.Finite;
|
|
585
|
+
readonly origin: Schema.NullOr<Schema.Struct<{
|
|
586
|
+
readonly file: Schema.String;
|
|
587
|
+
readonly line: Schema.Int;
|
|
588
|
+
}>>;
|
|
589
|
+
readonly style: Schema.Literal<"dissolve">;
|
|
527
590
|
}>]>>;
|
|
528
591
|
}>;
|
|
529
592
|
export type TrackDoc = typeof TrackDoc.Type;
|
|
@@ -571,6 +634,8 @@ export declare const FilmDoc: Schema.Struct<{
|
|
|
571
634
|
readonly kind: Schema.Literal<"font">;
|
|
572
635
|
readonly name: Schema.String;
|
|
573
636
|
readonly source: Schema.String;
|
|
637
|
+
/** The name of the font asset `fontStyle: "italic"` uses. */
|
|
638
|
+
readonly italic: Schema.optionalKey<Schema.String>;
|
|
574
639
|
}>, Schema.Struct<{
|
|
575
640
|
readonly kind: Schema.Literal<"image">;
|
|
576
641
|
readonly name: Schema.String;
|
|
@@ -596,6 +661,7 @@ export declare const FilmDoc: Schema.Struct<{
|
|
|
596
661
|
/** Written by the scene's props schema (see `scenes[].props`). */
|
|
597
662
|
readonly props: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
598
663
|
readonly opacity: Schema.Finite;
|
|
664
|
+
readonly blend: Schema.optionalKey<Schema.Literals<readonly ["multiply", "screen", "overlay", "soft-light", "color-dodge", "normal"]>>;
|
|
599
665
|
readonly id: Schema.String;
|
|
600
666
|
readonly start: Schema.Finite;
|
|
601
667
|
readonly duration: Schema.Finite;
|
|
@@ -614,6 +680,7 @@ export declare const FilmDoc: Schema.Struct<{
|
|
|
614
680
|
readonly freeze: Schema.Boolean;
|
|
615
681
|
readonly fit: Schema.Literals<readonly ["cover", "contain"]>;
|
|
616
682
|
readonly opacity: Schema.Finite;
|
|
683
|
+
readonly blend: Schema.optionalKey<Schema.Literals<readonly ["multiply", "screen", "overlay", "soft-light", "color-dodge", "normal"]>>;
|
|
617
684
|
readonly id: Schema.String;
|
|
618
685
|
readonly start: Schema.Finite;
|
|
619
686
|
readonly duration: Schema.Finite;
|
|
@@ -627,6 +694,7 @@ export declare const FilmDoc: Schema.Struct<{
|
|
|
627
694
|
readonly asset: Schema.String;
|
|
628
695
|
readonly fit: Schema.Literals<readonly ["cover", "contain"]>;
|
|
629
696
|
readonly opacity: Schema.Finite;
|
|
697
|
+
readonly blend: Schema.optionalKey<Schema.Literals<readonly ["multiply", "screen", "overlay", "soft-light", "color-dodge", "normal"]>>;
|
|
630
698
|
readonly id: Schema.String;
|
|
631
699
|
readonly start: Schema.Finite;
|
|
632
700
|
readonly duration: Schema.Finite;
|
|
@@ -738,6 +806,23 @@ export declare const FilmDoc: Schema.Struct<{
|
|
|
738
806
|
readonly line: Schema.Int;
|
|
739
807
|
}>>;
|
|
740
808
|
readonly style: Schema.Literal<"morph">;
|
|
809
|
+
}>, Schema.Struct<{
|
|
810
|
+
readonly noise: Schema.Literals<readonly ["cloud", "ridged"]>;
|
|
811
|
+
/** Pixels. */
|
|
812
|
+
readonly size: Schema.Finite;
|
|
813
|
+
/** The moving edge's color, when it has one. */
|
|
814
|
+
readonly edge: Schema.NullOr<Schema.String>;
|
|
815
|
+
readonly from: Schema.String;
|
|
816
|
+
readonly to: Schema.String;
|
|
817
|
+
readonly frames: Schema.Finite;
|
|
818
|
+
readonly ease: Schema.Literals<readonly ["linear", "glide", "settle", "snap", "in", "out", "swift"]>;
|
|
819
|
+
readonly start: Schema.Finite;
|
|
820
|
+
readonly end: Schema.Finite;
|
|
821
|
+
readonly origin: Schema.NullOr<Schema.Struct<{
|
|
822
|
+
readonly file: Schema.String;
|
|
823
|
+
readonly line: Schema.Int;
|
|
824
|
+
}>>;
|
|
825
|
+
readonly style: Schema.Literal<"dissolve">;
|
|
741
826
|
}>]>>;
|
|
742
827
|
}>>;
|
|
743
828
|
/** Things that will work, but probably not as intended. */
|
package/dist/doc/film-doc.js
CHANGED
|
@@ -52,13 +52,21 @@ export const SceneDoc = Schema.Struct({
|
|
|
52
52
|
/** Its props, as JSON Schema. */
|
|
53
53
|
props: Schema.Json,
|
|
54
54
|
});
|
|
55
|
-
const FontDoc = Schema.Struct({
|
|
55
|
+
const FontDoc = Schema.Struct({
|
|
56
|
+
kind: Schema.Literal("font"),
|
|
57
|
+
name: Name,
|
|
58
|
+
source: Schema.String,
|
|
59
|
+
/** The name of the font asset `fontStyle: "italic"` uses. */
|
|
60
|
+
italic: Schema.optionalKey(Name),
|
|
61
|
+
});
|
|
56
62
|
const ImageDoc = Schema.Struct({ kind: Schema.Literal("image"), name: Name, source: Schema.String, maxSize: Pixels });
|
|
57
63
|
const VideoDoc = Schema.Struct({ kind: Schema.Literal("video"), name: Name, source: Schema.String, maxSize: Pixels });
|
|
58
64
|
const AudioDoc = Schema.Struct({ kind: Schema.Literal("audio"), name: Name, source: Schema.String });
|
|
59
65
|
/** A file the film loads; `source` is relative to the project. Names are unique per kind. */
|
|
60
66
|
export const AssetDoc = Schema.Union([FontDoc, ImageDoc, VideoDoc, AudioDoc]);
|
|
61
67
|
// ---------------------------------------------------------------- clips
|
|
68
|
+
/** How a clip combines with the tracks under it; left out when it is "normal". */
|
|
69
|
+
const Blend = Schema.Literals(["multiply", "screen", "overlay", "soft-light", "color-dodge", "normal"]);
|
|
62
70
|
const placement = {
|
|
63
71
|
id: Id,
|
|
64
72
|
start: Frames,
|
|
@@ -74,6 +82,7 @@ export const SceneClipDoc = Schema.Struct({
|
|
|
74
82
|
/** Written by the scene's props schema (see `scenes[].props`). */
|
|
75
83
|
props: Schema.Json,
|
|
76
84
|
opacity: Unit,
|
|
85
|
+
blend: Schema.optionalKey(Blend),
|
|
77
86
|
});
|
|
78
87
|
export const VideoClipDoc = Schema.Struct({
|
|
79
88
|
kind: Schema.Literal("video"),
|
|
@@ -86,8 +95,9 @@ export const VideoClipDoc = Schema.Struct({
|
|
|
86
95
|
freeze: Schema.Boolean,
|
|
87
96
|
fit: Fit,
|
|
88
97
|
opacity: Unit,
|
|
98
|
+
blend: Schema.optionalKey(Blend),
|
|
89
99
|
});
|
|
90
|
-
export const ImageClipDoc = Schema.Struct({ kind: Schema.Literal("image"), ...placement, asset: Name, fit: Fit, opacity: Unit });
|
|
100
|
+
export const ImageClipDoc = Schema.Struct({ kind: Schema.Literal("image"), ...placement, asset: Name, fit: Fit, opacity: Unit, blend: Schema.optionalKey(Blend) });
|
|
91
101
|
export const AudioClipDoc = Schema.Struct({
|
|
92
102
|
kind: Schema.Literal("audio"),
|
|
93
103
|
...placement,
|
|
@@ -137,6 +147,15 @@ const joining = {
|
|
|
137
147
|
origin: Origin,
|
|
138
148
|
};
|
|
139
149
|
export const FadeDoc = Schema.Struct({ style: Schema.Literal("fade"), ...joining });
|
|
150
|
+
export const DissolveDoc = Schema.Struct({
|
|
151
|
+
style: Schema.Literal("dissolve"),
|
|
152
|
+
...joining,
|
|
153
|
+
noise: Schema.Literals(["cloud", "ridged"]),
|
|
154
|
+
/** Pixels. */
|
|
155
|
+
size: Length,
|
|
156
|
+
/** The moving edge's color, when it has one. */
|
|
157
|
+
edge: Schema.NullOr(Schema.String),
|
|
158
|
+
});
|
|
140
159
|
export const SlideDoc = Schema.Struct({ style: Schema.Literals(["wipe", "push"]), ...joining, direction: Direction });
|
|
141
160
|
export const MorphDoc = Schema.Struct({
|
|
142
161
|
style: Schema.Literal("morph"),
|
|
@@ -146,7 +165,7 @@ export const MorphDoc = Schema.Struct({
|
|
|
146
165
|
/** Morph keys both scenes declare (null when either declares none). */
|
|
147
166
|
sharedKeys: Schema.NullOr(Schema.Array(Schema.String)),
|
|
148
167
|
});
|
|
149
|
-
export const TransitionDoc = Schema.Union([FadeDoc, SlideDoc, MorphDoc]);
|
|
168
|
+
export const TransitionDoc = Schema.Union([FadeDoc, SlideDoc, MorphDoc, DissolveDoc]);
|
|
150
169
|
// ---------------------------------------------------------------- tracks and the document
|
|
151
170
|
export const TrackDoc = Schema.Struct({
|
|
152
171
|
id: Id,
|
package/dist/doc/from-plan.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export declare const filmDocOf: (plan: FilmPlan, background: string, scenes: rea
|
|
|
39
39
|
readonly kind: "font";
|
|
40
40
|
readonly name: string;
|
|
41
41
|
readonly source: string;
|
|
42
|
+
readonly italic?: string | undefined;
|
|
42
43
|
} | {
|
|
43
44
|
readonly kind: "image";
|
|
44
45
|
readonly name: string;
|
|
@@ -58,10 +59,11 @@ export declare const filmDocOf: (plan: FilmPlan, background: string, scenes: rea
|
|
|
58
59
|
readonly id: string;
|
|
59
60
|
readonly kind: "audio" | "visual";
|
|
60
61
|
readonly clips: readonly ({
|
|
61
|
-
readonly
|
|
62
|
+
readonly kind: "scene";
|
|
63
|
+
readonly id: string;
|
|
62
64
|
readonly props: Schema.Json;
|
|
65
|
+
readonly scene: string;
|
|
63
66
|
readonly opacity: number;
|
|
64
|
-
readonly id: string;
|
|
65
67
|
readonly start: number;
|
|
66
68
|
readonly duration: number;
|
|
67
69
|
readonly end: number;
|
|
@@ -69,17 +71,13 @@ export declare const filmDocOf: (plan: FilmPlan, background: string, scenes: rea
|
|
|
69
71
|
readonly file: string;
|
|
70
72
|
readonly line: number;
|
|
71
73
|
} | null;
|
|
72
|
-
readonly
|
|
74
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
73
75
|
} | {
|
|
74
|
-
readonly asset: string;
|
|
75
76
|
readonly in: number;
|
|
76
77
|
readonly out: number;
|
|
77
|
-
readonly
|
|
78
|
-
readonly reverse: boolean;
|
|
79
|
-
readonly freeze: boolean;
|
|
80
|
-
readonly fit: "cover" | "contain";
|
|
81
|
-
readonly opacity: number;
|
|
78
|
+
readonly kind: "video";
|
|
82
79
|
readonly id: string;
|
|
80
|
+
readonly opacity: number;
|
|
83
81
|
readonly start: number;
|
|
84
82
|
readonly duration: number;
|
|
85
83
|
readonly end: number;
|
|
@@ -87,12 +85,16 @@ export declare const filmDocOf: (plan: FilmPlan, background: string, scenes: rea
|
|
|
87
85
|
readonly file: string;
|
|
88
86
|
readonly line: number;
|
|
89
87
|
} | null;
|
|
90
|
-
readonly kind: "video";
|
|
91
|
-
} | {
|
|
92
88
|
readonly asset: string;
|
|
89
|
+
readonly speed: number;
|
|
90
|
+
readonly reverse: boolean;
|
|
91
|
+
readonly freeze: boolean;
|
|
93
92
|
readonly fit: "cover" | "contain";
|
|
94
|
-
readonly
|
|
93
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
94
|
+
} | {
|
|
95
|
+
readonly kind: "image";
|
|
95
96
|
readonly id: string;
|
|
97
|
+
readonly opacity: number;
|
|
96
98
|
readonly start: number;
|
|
97
99
|
readonly duration: number;
|
|
98
100
|
readonly end: number;
|
|
@@ -100,7 +102,9 @@ export declare const filmDocOf: (plan: FilmPlan, background: string, scenes: rea
|
|
|
100
102
|
readonly file: string;
|
|
101
103
|
readonly line: number;
|
|
102
104
|
} | null;
|
|
103
|
-
readonly
|
|
105
|
+
readonly asset: string;
|
|
106
|
+
readonly fit: "cover" | "contain";
|
|
107
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
104
108
|
} | {
|
|
105
109
|
readonly asset: string;
|
|
106
110
|
readonly in: number;
|
|
@@ -199,6 +203,21 @@ export declare const filmDocOf: (plan: FilmPlan, background: string, scenes: rea
|
|
|
199
203
|
readonly line: number;
|
|
200
204
|
} | null;
|
|
201
205
|
readonly style: "morph";
|
|
206
|
+
} | {
|
|
207
|
+
readonly noise: "cloud" | "ridged";
|
|
208
|
+
readonly size: number;
|
|
209
|
+
readonly edge: string | null;
|
|
210
|
+
readonly from: string;
|
|
211
|
+
readonly to: string;
|
|
212
|
+
readonly frames: number;
|
|
213
|
+
readonly ease: "linear" | "glide" | "settle" | "snap" | "in" | "out" | "swift";
|
|
214
|
+
readonly start: number;
|
|
215
|
+
readonly end: number;
|
|
216
|
+
readonly origin: {
|
|
217
|
+
readonly file: string;
|
|
218
|
+
readonly line: number;
|
|
219
|
+
} | null;
|
|
220
|
+
readonly style: "dissolve";
|
|
202
221
|
})[];
|
|
203
222
|
}[];
|
|
204
223
|
readonly warnings: readonly string[];
|
package/dist/doc/from-plan.js
CHANGED
|
@@ -25,18 +25,19 @@ function jsonOf(schema, value, clip, subject) {
|
|
|
25
25
|
function clipDoc(clip, ids) {
|
|
26
26
|
const placed = { id: clip.id, start: clip.start, duration: clip.duration, end: clip.end, origin: originDoc(clip.origin) };
|
|
27
27
|
const s = clip.source;
|
|
28
|
+
const blended = clip.blend === "normal" ? {} : { blend: clip.blend };
|
|
28
29
|
switch (s.kind) {
|
|
29
30
|
case "scene": {
|
|
30
31
|
const scene = s.instance.scene;
|
|
31
32
|
const id = ids.get(scene);
|
|
32
33
|
if (id === undefined)
|
|
33
34
|
throw new Refusal(clip.id, `Clip "${clip.id}" plays scene "${scene.name}", which isn't one of the project's scenes; move it to scenes/${scene.name}.tsx.`);
|
|
34
|
-
return { kind: "scene", ...placed, scene: id, props: jsonOf(scene.propsSchema, s.instance.props, clip.id, `Clip "${clip.id}"'s props`), opacity: clip.opacity };
|
|
35
|
+
return { kind: "scene", ...placed, scene: id, props: jsonOf(scene.propsSchema, s.instance.props, clip.id, `Clip "${clip.id}"'s props`), opacity: clip.opacity, ...blended };
|
|
35
36
|
}
|
|
36
37
|
case "video":
|
|
37
|
-
return { kind: "video", ...placed, asset: s.asset.name, in: s.in, out: s.out, speed: s.speed, reverse: s.reverse, freeze: s.freeze, fit: s.fit, opacity: clip.opacity };
|
|
38
|
+
return { kind: "video", ...placed, asset: s.asset.name, in: s.in, out: s.out, speed: s.speed, reverse: s.reverse, freeze: s.freeze, fit: s.fit, opacity: clip.opacity, ...blended };
|
|
38
39
|
case "image":
|
|
39
|
-
return { kind: "image", ...placed, asset: s.asset.name, fit: s.fit, opacity: clip.opacity };
|
|
40
|
+
return { kind: "image", ...placed, asset: s.asset.name, fit: s.fit, opacity: clip.opacity, ...blended };
|
|
40
41
|
case "audio":
|
|
41
42
|
if (s.voice)
|
|
42
43
|
throw new Refusal(clip.id, `Clip "${clip.id}" plays narration, which film.json can't hold yet; render this film from film.tsx.`);
|
|
@@ -68,6 +69,7 @@ function transitionDoc(t) {
|
|
|
68
69
|
case "fade": return { style: "fade", ...joining };
|
|
69
70
|
case "wipe": return { style: "wipe", ...joining, direction: t.direction };
|
|
70
71
|
case "push": return { style: "push", ...joining, direction: t.direction };
|
|
72
|
+
case "dissolve": return { style: "dissolve", ...joining, noise: t.dissolve.noise, size: t.dissolve.size, edge: t.dissolve.edge };
|
|
71
73
|
case "morph":
|
|
72
74
|
return { style: "morph", ...joining, others: { enter: enterDoc(t.others.enter, where, t.to), exit: exitDoc(t.others.exit, where, t.to), stagger: t.others.stagger }, sharedKeys: t.sharedKeys };
|
|
73
75
|
}
|
|
@@ -87,7 +89,7 @@ function kitDoc(kit, scenes) {
|
|
|
87
89
|
}
|
|
88
90
|
const assetDoc = (a) => {
|
|
89
91
|
switch (a.kind) {
|
|
90
|
-
case "font": return { kind: "font", name: a.name, source: a.source };
|
|
92
|
+
case "font": return a.italic ? { kind: "font", name: a.name, source: a.source, italic: a.italic.name } : { kind: "font", name: a.name, source: a.source };
|
|
91
93
|
case "image": return { kind: "image", name: a.name, source: a.source, maxSize: a.maxSize };
|
|
92
94
|
case "video": return { kind: "video", name: a.name, source: a.source, maxSize: a.maxSize };
|
|
93
95
|
case "audio": return { kind: "audio", name: a.name, source: a.source };
|
package/dist/doc/plan-doc.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export declare const planFilmDoc: (doc: {
|
|
|
33
33
|
readonly kind: "font";
|
|
34
34
|
readonly name: string;
|
|
35
35
|
readonly source: string;
|
|
36
|
+
readonly italic?: string | undefined;
|
|
36
37
|
} | {
|
|
37
38
|
readonly kind: "image";
|
|
38
39
|
readonly name: string;
|
|
@@ -52,10 +53,11 @@ export declare const planFilmDoc: (doc: {
|
|
|
52
53
|
readonly id: string;
|
|
53
54
|
readonly kind: "audio" | "visual";
|
|
54
55
|
readonly clips: readonly ({
|
|
55
|
-
readonly
|
|
56
|
+
readonly kind: "scene";
|
|
57
|
+
readonly id: string;
|
|
56
58
|
readonly props: import("effect/Schema").Json;
|
|
59
|
+
readonly scene: string;
|
|
57
60
|
readonly opacity: number;
|
|
58
|
-
readonly id: string;
|
|
59
61
|
readonly start: number;
|
|
60
62
|
readonly duration: number;
|
|
61
63
|
readonly end: number;
|
|
@@ -63,17 +65,13 @@ export declare const planFilmDoc: (doc: {
|
|
|
63
65
|
readonly file: string;
|
|
64
66
|
readonly line: number;
|
|
65
67
|
} | null;
|
|
66
|
-
readonly
|
|
68
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
67
69
|
} | {
|
|
68
|
-
readonly asset: string;
|
|
69
70
|
readonly in: number;
|
|
70
71
|
readonly out: number;
|
|
71
|
-
readonly
|
|
72
|
-
readonly reverse: boolean;
|
|
73
|
-
readonly freeze: boolean;
|
|
74
|
-
readonly fit: "cover" | "contain";
|
|
75
|
-
readonly opacity: number;
|
|
72
|
+
readonly kind: "video";
|
|
76
73
|
readonly id: string;
|
|
74
|
+
readonly opacity: number;
|
|
77
75
|
readonly start: number;
|
|
78
76
|
readonly duration: number;
|
|
79
77
|
readonly end: number;
|
|
@@ -81,12 +79,16 @@ export declare const planFilmDoc: (doc: {
|
|
|
81
79
|
readonly file: string;
|
|
82
80
|
readonly line: number;
|
|
83
81
|
} | null;
|
|
84
|
-
readonly kind: "video";
|
|
85
|
-
} | {
|
|
86
82
|
readonly asset: string;
|
|
83
|
+
readonly speed: number;
|
|
84
|
+
readonly reverse: boolean;
|
|
85
|
+
readonly freeze: boolean;
|
|
87
86
|
readonly fit: "cover" | "contain";
|
|
88
|
-
readonly
|
|
87
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
88
|
+
} | {
|
|
89
|
+
readonly kind: "image";
|
|
89
90
|
readonly id: string;
|
|
91
|
+
readonly opacity: number;
|
|
90
92
|
readonly start: number;
|
|
91
93
|
readonly duration: number;
|
|
92
94
|
readonly end: number;
|
|
@@ -94,7 +96,9 @@ export declare const planFilmDoc: (doc: {
|
|
|
94
96
|
readonly file: string;
|
|
95
97
|
readonly line: number;
|
|
96
98
|
} | null;
|
|
97
|
-
readonly
|
|
99
|
+
readonly asset: string;
|
|
100
|
+
readonly fit: "cover" | "contain";
|
|
101
|
+
readonly blend?: "multiply" | "screen" | "overlay" | "soft-light" | "color-dodge" | "normal" | undefined;
|
|
98
102
|
} | {
|
|
99
103
|
readonly asset: string;
|
|
100
104
|
readonly in: number;
|
|
@@ -193,6 +197,21 @@ export declare const planFilmDoc: (doc: {
|
|
|
193
197
|
readonly line: number;
|
|
194
198
|
} | null;
|
|
195
199
|
readonly style: "morph";
|
|
200
|
+
} | {
|
|
201
|
+
readonly noise: "cloud" | "ridged";
|
|
202
|
+
readonly size: number;
|
|
203
|
+
readonly edge: string | null;
|
|
204
|
+
readonly from: string;
|
|
205
|
+
readonly to: string;
|
|
206
|
+
readonly frames: number;
|
|
207
|
+
readonly ease: "linear" | "glide" | "settle" | "snap" | "in" | "out" | "swift";
|
|
208
|
+
readonly start: number;
|
|
209
|
+
readonly end: number;
|
|
210
|
+
readonly origin: {
|
|
211
|
+
readonly file: string;
|
|
212
|
+
readonly line: number;
|
|
213
|
+
} | null;
|
|
214
|
+
readonly style: "dissolve";
|
|
196
215
|
})[];
|
|
197
216
|
}[];
|
|
198
217
|
readonly warnings: readonly string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tongue-core/project",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.4",
|
|
4
4
|
"description": "Film projects: their shape, building one into film.json and a bundle per scene, film.json's schema and checks, and turning it back into a film. No Bun, Node or ffmpeg: runs in Bun, browsers and Workers.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"README.md"
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@tongue-core/film": "0.1.0-rc.
|
|
43
|
+
"@tongue-core/film": "0.1.0-rc.4",
|
|
44
44
|
"sucrase": "3.35.1"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|