alpha2 0.5.3 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -3
- package/THIRD_PARTY_NOTICES.md +7 -3
- package/dist/apply-edit.d.ts +124 -0
- package/dist/apply-edit.js +15 -0
- package/dist/assets.d.ts +12 -0
- package/dist/audio-layout.js +6 -3
- package/dist/audio-worklet-processor.js +27 -33
- package/dist/audio.d.ts +5 -4
- package/dist/audio.js +8 -6
- package/dist/compose.d.ts +105 -0
- package/dist/compose.js +63 -0
- package/dist/decoder-fallback.d.ts +3 -2
- package/dist/decoder-fallback.js +11 -3
- package/dist/decoder-stall.d.ts +15 -0
- package/dist/decoder-stall.js +52 -0
- package/dist/edit-data.d.ts +24 -0
- package/dist/edit-data.js +224 -0
- package/dist/edit-keys.d.ts +16 -0
- package/dist/edit-keys.js +233 -0
- package/dist/edit.d.ts +41 -8
- package/dist/edit.js +123 -30
- package/dist/export-failure.d.ts +10 -2
- package/dist/export-failure.js +55 -4
- package/dist/export-retry.d.ts +6 -1
- package/dist/export-retry.js +12 -1
- package/dist/exporter.d.ts +11 -7
- package/dist/exporter.js +10 -9
- package/dist/extract.d.ts +65 -0
- package/dist/extract.js +291 -0
- package/dist/extractor.d.ts +151 -0
- package/dist/extractor.js +141 -0
- package/dist/float32.d.ts +2 -0
- package/dist/float32.js +10 -0
- package/dist/frame-intake.d.ts +5 -0
- package/dist/frame-intake.js +10 -3
- package/dist/generated/builtin-effects.d.ts +3 -0
- package/dist/generated/builtin-effects.js +1804 -0
- package/dist/generated/project-schema.d.ts +636 -37
- package/dist/generated/project-schema.js +55 -0
- package/dist/generated/project-shape.js +950 -381
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/json-text.js +14 -2
- package/dist/layout-values.js +7 -1
- package/dist/layout.d.ts +12 -4
- package/dist/media.d.ts +43 -10
- package/dist/media.js +255 -66
- package/dist/mediabunny.d.ts +32 -12
- package/dist/mediabunny.js +276 -90
- package/dist/player.d.ts +9 -3
- package/dist/player.js +114 -18
- package/dist/plugins.d.ts +62 -0
- package/dist/plugins.js +506 -0
- package/dist/project-data.d.ts +56 -0
- package/dist/project-data.js +765 -0
- package/dist/project.d.ts +24 -1
- package/dist/project.js +456 -38
- package/dist/robustness.d.ts +6 -33
- package/dist/robustness.js +2 -63
- package/dist/sha256.d.ts +3 -2
- package/dist/sha256.js +14 -6
- package/dist/worker-error.d.ts +3 -2
- package/dist/worker-error.js +3 -1
- package/dist/worker.d.ts +13 -3
- package/dist/worker.js +36 -9
- package/package.json +26 -1
- package/wasm/alpha2_compose.d.ts +92 -0
- package/wasm/alpha2_compose.js +445 -0
- package/wasm/alpha2_compose_bg.wasm +0 -0
- package/wasm/alpha2_compose_bg.wasm.d.ts +17 -0
- package/wasm/alpha2_extensions_bg.wasm +0 -0
- package/wasm/alpha2_extensions_pdf_bg.wasm +0 -0
- package/wasm/alpha2_wasm.d.ts +151 -18
- package/wasm/alpha2_wasm.js +403 -59
- package/wasm/alpha2_wasm_bg.wasm +0 -0
- package/wasm/alpha2_wasm_bg.wasm.d.ts +21 -6
- package/wasm/rust-crate-licenses.md +5 -61
- package/wasm/snippets/alpha2-wasm-6749ed8b34a74067/inline3.js +7 -0
- /package/wasm/snippets/{alpha2-wasm-a6265983c9769e80/inline1.js → alpha2-wasm-6749ed8b34a74067/inline0.js} +0 -0
- /package/wasm/snippets/{alpha2-wasm-a6265983c9769e80/inline2.js → alpha2-wasm-6749ed8b34a74067/inline1.js} +0 -0
- /package/wasm/snippets/{alpha2-wasm-a6265983c9769e80/inline3.js → alpha2-wasm-6749ed8b34a74067/inline2.js} +0 -0
- /package/wasm/snippets/{alpha2-wasm-a6265983c9769e80/inline0.js → alpha2-wasm-6749ed8b34a74067/inline4.js} +0 -0
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
export declare const AUDIO_EFFECT_STATE_MARGIN_MS = 1100;
|
|
3
3
|
/** Mirrors `alpha2_model::CURRENT_SCHEMA_VERSION`. */
|
|
4
4
|
export declare const CURRENT_SCHEMA_VERSION = 1;
|
|
5
|
+
/** Mirrors `alpha2_model::MAX_ANIMATOR_OFFSET`. */
|
|
6
|
+
export declare const MAX_ANIMATOR_OFFSET = 1024;
|
|
5
7
|
/** Mirrors `alpha2_model::MAX_ANIMATOR_SCALE`. */
|
|
6
8
|
export declare const MAX_ANIMATOR_SCALE = 10;
|
|
9
|
+
/** Mirrors `alpha2_model::MAX_ASPECT_RATIO`. */
|
|
10
|
+
export declare const MAX_ASPECT_RATIO = 10000;
|
|
7
11
|
/** Mirrors `alpha2_model::MAX_AUDIO_CHANNELS`. */
|
|
8
12
|
export declare const MAX_AUDIO_CHANNELS = 24;
|
|
9
13
|
/** Mirrors `alpha2_model::MAX_AUDIO_DELAY_MS`. */
|
|
@@ -46,8 +50,34 @@ export declare const MAX_COMPOSITION_NODES = 256;
|
|
|
46
50
|
export declare const MAX_COMPRESSOR_RATIO = 100;
|
|
47
51
|
/** Mirrors `alpha2_model::MAX_DASH_ENTRIES`. */
|
|
48
52
|
export declare const MAX_DASH_ENTRIES = 16;
|
|
53
|
+
/** Mirrors `alpha2_model::MAX_DATA_CHANNELS`. */
|
|
54
|
+
export declare const MAX_DATA_CHANNELS = 64;
|
|
55
|
+
/** Mirrors `alpha2_model::MAX_DATA_COORDINATE`. */
|
|
56
|
+
export declare const MAX_DATA_COORDINATE = 16;
|
|
57
|
+
/** Mirrors `alpha2_model::MAX_DATA_ID_BYTES`. */
|
|
58
|
+
export declare const MAX_DATA_ID_BYTES = 64;
|
|
59
|
+
/** Mirrors `alpha2_model::MAX_DATA_INTERVALS`. */
|
|
60
|
+
export declare const MAX_DATA_INTERVALS = 200000;
|
|
61
|
+
/** Mirrors `alpha2_model::MAX_DATA_LABEL_BYTES`. */
|
|
62
|
+
export declare const MAX_DATA_LABEL_BYTES = 256;
|
|
63
|
+
/** Mirrors `alpha2_model::MAX_DATA_ROTATION_DEGREES`. */
|
|
64
|
+
export declare const MAX_DATA_ROTATION_DEGREES = 36000;
|
|
65
|
+
/** Mirrors `alpha2_model::MAX_DATA_SCALAR`. */
|
|
66
|
+
export declare const MAX_DATA_SCALAR = 1000000000;
|
|
67
|
+
/** Mirrors `alpha2_model::MAX_DATA_SCALE`. */
|
|
68
|
+
export declare const MAX_DATA_SCALE = 1000;
|
|
69
|
+
/** Mirrors `alpha2_model::MAX_DATA_SETS`. */
|
|
70
|
+
export declare const MAX_DATA_SETS = 256;
|
|
71
|
+
/** Mirrors `alpha2_model::MAX_DATA_VALUES`. */
|
|
72
|
+
export declare const MAX_DATA_VALUES = 4000000;
|
|
73
|
+
/** Mirrors `alpha2_model::MAX_DATA_WORDS`. */
|
|
74
|
+
export declare const MAX_DATA_WORDS = 200000;
|
|
75
|
+
/** Mirrors `alpha2_model::MAX_DERIVED_CUES`. */
|
|
76
|
+
export declare const MAX_DERIVED_CUES = 65536;
|
|
49
77
|
/** Mirrors `alpha2_model::MAX_EFFECT_INPUTS`. */
|
|
50
78
|
export declare const MAX_EFFECT_INPUTS = 8;
|
|
79
|
+
/** Mirrors `alpha2_model::MAX_EFFECT_RESOURCES`. */
|
|
80
|
+
export declare const MAX_EFFECT_RESOURCES = 10000;
|
|
51
81
|
/** Mirrors `alpha2_model::MAX_ENVELOPE_MS`. */
|
|
52
82
|
export declare const MAX_ENVELOPE_MS = 10000;
|
|
53
83
|
/** Mirrors `alpha2_model::MAX_EQ_BANDS`. */
|
|
@@ -58,6 +88,10 @@ export declare const MAX_EQ_FREQUENCY_HZ = 47040;
|
|
|
58
88
|
export declare const MAX_EQ_GAIN_DB = 36;
|
|
59
89
|
/** Mirrors `alpha2_model::MAX_EQ_Q`. */
|
|
60
90
|
export declare const MAX_EQ_Q = 50;
|
|
91
|
+
/** Mirrors `alpha2_model::MAX_FLEX_FACTOR`. */
|
|
92
|
+
export declare const MAX_FLEX_FACTOR = 1000000;
|
|
93
|
+
/** Mirrors `alpha2_model::MAX_FOLLOW_DEPTH`. */
|
|
94
|
+
export declare const MAX_FOLLOW_DEPTH = 8;
|
|
61
95
|
/** Mirrors `alpha2_model::MAX_FONT_FAMILY_BYTES`. */
|
|
62
96
|
export declare const MAX_FONT_FAMILY_BYTES = 256;
|
|
63
97
|
/** Mirrors `alpha2_model::MAX_FONT_WEIGHT`. */
|
|
@@ -76,6 +110,8 @@ export declare const MAX_GROUP_INPUTS = 16;
|
|
|
76
110
|
export declare const MAX_HDR_PEAK_NITS = 10000;
|
|
77
111
|
/** Mirrors `alpha2_model::MAX_INLINED_NODES`. */
|
|
78
112
|
export declare const MAX_INLINED_NODES = 65536;
|
|
113
|
+
/** Mirrors `alpha2_model::MAX_KEYFRAMES`. */
|
|
114
|
+
export declare const MAX_KEYFRAMES = 100000;
|
|
79
115
|
/** Mirrors `alpha2_model::MAX_LATEX_BYTES`. */
|
|
80
116
|
export declare const MAX_LATEX_BYTES = 4096;
|
|
81
117
|
/** Mirrors `alpha2_model::MAX_LATEX_FONT_SIZE`. */
|
|
@@ -84,10 +120,16 @@ export declare const MAX_LATEX_FONT_SIZE = 1024;
|
|
|
84
120
|
export declare const MAX_LAYOUT_DEPTH = 16;
|
|
85
121
|
/** Mirrors `alpha2_model::MAX_LAYOUT_FONT_SIZE`. */
|
|
86
122
|
export declare const MAX_LAYOUT_FONT_SIZE = 1;
|
|
123
|
+
/** Mirrors `alpha2_model::MAX_LAYOUT_FRACTION`. */
|
|
124
|
+
export declare const MAX_LAYOUT_FRACTION = 1024;
|
|
87
125
|
/** Mirrors `alpha2_model::MAX_LAYOUT_ISOLATED`. */
|
|
88
126
|
export declare const MAX_LAYOUT_ISOLATED = 16;
|
|
89
127
|
/** Mirrors `alpha2_model::MAX_LAYOUT_NODES`. */
|
|
90
128
|
export declare const MAX_LAYOUT_NODES = 256;
|
|
129
|
+
/** Mirrors `alpha2_model::MAX_LAYOUT_PERCENT`. */
|
|
130
|
+
export declare const MAX_LAYOUT_PERCENT = 100000;
|
|
131
|
+
/** Mirrors `alpha2_model::MAX_LAYOUT_PX`. */
|
|
132
|
+
export declare const MAX_LAYOUT_PX = 16777216;
|
|
91
133
|
/** Mirrors `alpha2_model::MAX_LAYOUT_TEXTS`. */
|
|
92
134
|
export declare const MAX_LAYOUT_TEXTS = 64;
|
|
93
135
|
/** Mirrors `alpha2_model::MAX_LETTER_SPACING`. */
|
|
@@ -96,6 +138,8 @@ export declare const MAX_LETTER_SPACING = 1;
|
|
|
96
138
|
export declare const MAX_LINE_HEIGHT = 3;
|
|
97
139
|
/** Mirrors `alpha2_model::MAX_LOOKAHEAD_MS`. */
|
|
98
140
|
export declare const MAX_LOOKAHEAD_MS = 100;
|
|
141
|
+
/** Mirrors `alpha2_model::MAX_LOOP_PASSES`. */
|
|
142
|
+
export declare const MAX_LOOP_PASSES = 65536;
|
|
99
143
|
/** Mirrors `alpha2_model::MAX_LOTTIE_DOCUMENT_BYTES`. */
|
|
100
144
|
export declare const MAX_LOTTIE_DOCUMENT_BYTES = 16777216;
|
|
101
145
|
/** Mirrors `alpha2_model::MAX_MERGE_LAYERS`. */
|
|
@@ -140,6 +184,8 @@ export declare const MAX_TEXT_CONTENT_BYTES = 4096;
|
|
|
140
184
|
export declare const MAX_TEXT_GENERATOR_FONT_SIZE = 1;
|
|
141
185
|
/** Mirrors `alpha2_model::MAX_TEXT_PADDING`. */
|
|
142
186
|
export declare const MAX_TEXT_PADDING = 2;
|
|
187
|
+
/** Mirrors `alpha2_model::MAX_TEXT_POSITION`. */
|
|
188
|
+
export declare const MAX_TEXT_POSITION = 1024;
|
|
143
189
|
/** Mirrors `alpha2_model::MAX_TEXT_RUNS`. */
|
|
144
190
|
export declare const MAX_TEXT_RUNS = 512;
|
|
145
191
|
/** Mirrors `alpha2_model::MAX_TEXT_SHADOWS`. */
|
|
@@ -156,6 +202,8 @@ export declare const MAX_TEXT_STROKE_EXTENT = 0.5;
|
|
|
156
202
|
export declare const MAX_TRACKS = 256;
|
|
157
203
|
/** Mirrors `alpha2_model::MAX_TRANSITIONS_PER_TRACK`. */
|
|
158
204
|
export declare const MAX_TRANSITIONS_PER_TRACK = 4096;
|
|
205
|
+
/** Mirrors `alpha2_model::MIN_ASPECT_RATIO`. */
|
|
206
|
+
export declare const MIN_ASPECT_RATIO = 0.0001;
|
|
159
207
|
/** Mirrors `alpha2_model::MIN_EQ_FREQUENCY_HZ`. */
|
|
160
208
|
export declare const MIN_EQ_FREQUENCY_HZ = 10;
|
|
161
209
|
/** Mirrors `alpha2_model::MIN_EQ_Q`. */
|
|
@@ -196,6 +244,10 @@ export declare const COLOR_MATRIX_VALUES: readonly ColorMatrix[];
|
|
|
196
244
|
export declare const COLOR_PRIMARIES_VALUES: readonly ColorPrimaries[];
|
|
197
245
|
/** Every {@link ColorRange}, in the model's order. */
|
|
198
246
|
export declare const COLOR_RANGE_VALUES: readonly ColorRange[];
|
|
247
|
+
/** Every {@link DataInterpolation}, in the model's order. */
|
|
248
|
+
export declare const DATA_INTERPOLATION_VALUES: readonly DataInterpolation[];
|
|
249
|
+
/** Every {@link DataSpace}, in the model's order. */
|
|
250
|
+
export declare const DATA_SPACE_VALUES: readonly DataSpace[];
|
|
199
251
|
/** Every {@link Display}, in the model's order. */
|
|
200
252
|
export declare const DISPLAY_VALUES: readonly Display[];
|
|
201
253
|
/** Every {@link DynamicRange}, in the model's order. */
|
|
@@ -265,6 +317,13 @@ export declare const TRIM_MODE_VALUES: readonly TrimMode[];
|
|
|
265
317
|
* then decides whether a well-shaped document is valid.
|
|
266
318
|
*/
|
|
267
319
|
export interface Project {
|
|
320
|
+
/**
|
|
321
|
+
* The schema the document follows (`https://alpha2.sh/schema/project.v1.json`), for editors
|
|
322
|
+
* and validators. The engine does not read or keep it.
|
|
323
|
+
*
|
|
324
|
+
* @defaultValue `null`
|
|
325
|
+
*/
|
|
326
|
+
readonly $schema?: string | null;
|
|
268
327
|
/**
|
|
269
328
|
* Master bus applied to the summed track audio.
|
|
270
329
|
*/
|
|
@@ -275,6 +334,12 @@ export interface Project {
|
|
|
275
334
|
* @defaultValue `[]`
|
|
276
335
|
*/
|
|
277
336
|
readonly compositions?: readonly Composition[];
|
|
337
|
+
/**
|
|
338
|
+
* Values derived from media, which properties and caption tracks can follow. At most 256.
|
|
339
|
+
*
|
|
340
|
+
* @defaultValue `[]`
|
|
341
|
+
*/
|
|
342
|
+
readonly data?: readonly DataSet[];
|
|
278
343
|
/**
|
|
279
344
|
* Non-media resources referenced by effect invocations.
|
|
280
345
|
*
|
|
@@ -315,7 +380,7 @@ export type AlignContent = "start" | "center" | "end" | "space_between" | "space
|
|
|
315
380
|
*/
|
|
316
381
|
export type AlignItems = "start" | "center" | "end" | "stretch";
|
|
317
382
|
/**
|
|
318
|
-
* A value that is
|
|
383
|
+
* A value that is constant, controlled by sorted keyframes, or following a data set.
|
|
319
384
|
*/
|
|
320
385
|
export type Animated<T> = {
|
|
321
386
|
/**
|
|
@@ -335,6 +400,36 @@ export type Animated<T> = {
|
|
|
335
400
|
* Values evaluated from their keyframe sequence.
|
|
336
401
|
*/
|
|
337
402
|
readonly mode: "keyframes";
|
|
403
|
+
} | {
|
|
404
|
+
/**
|
|
405
|
+
* The channel followed.
|
|
406
|
+
*/
|
|
407
|
+
readonly channel: string;
|
|
408
|
+
/**
|
|
409
|
+
* The data set, a `points` or `scalars` one.
|
|
410
|
+
*/
|
|
411
|
+
readonly data: DataSetId;
|
|
412
|
+
/**
|
|
413
|
+
* A channel of a data set, followed at render time.
|
|
414
|
+
*/
|
|
415
|
+
readonly mode: "data";
|
|
416
|
+
/**
|
|
417
|
+
* `[x, y]` added after the space mapping, in that space's normalized units (points only).
|
|
418
|
+
*/
|
|
419
|
+
readonly offset?: readonly [number, number] | null;
|
|
420
|
+
/**
|
|
421
|
+
* A linear map of the value (scalars only).
|
|
422
|
+
*/
|
|
423
|
+
readonly remap?: DataRemap | null;
|
|
424
|
+
/**
|
|
425
|
+
* Where a point is read (points with `via` only, where it is required).
|
|
426
|
+
*/
|
|
427
|
+
readonly space?: DataSpace | null;
|
|
428
|
+
/**
|
|
429
|
+
* The reader whose time map gives source time: required for a source-anchored set,
|
|
430
|
+
* forbidden for a timeline-anchored one.
|
|
431
|
+
*/
|
|
432
|
+
readonly via?: DataVia | null;
|
|
338
433
|
};
|
|
339
434
|
/**
|
|
340
435
|
* A position that can move along curves between its keyframes.
|
|
@@ -362,6 +457,36 @@ export type AnimatedPoint = {
|
|
|
362
457
|
* Values evaluated from their keyframe sequence.
|
|
363
458
|
*/
|
|
364
459
|
readonly mode: "keyframes";
|
|
460
|
+
} | {
|
|
461
|
+
/**
|
|
462
|
+
* The channel followed.
|
|
463
|
+
*/
|
|
464
|
+
readonly channel: string;
|
|
465
|
+
/**
|
|
466
|
+
* The data set, a `points` or `scalars` one.
|
|
467
|
+
*/
|
|
468
|
+
readonly data: DataSetId;
|
|
469
|
+
/**
|
|
470
|
+
* A channel of a data set, followed at render time.
|
|
471
|
+
*/
|
|
472
|
+
readonly mode: "data";
|
|
473
|
+
/**
|
|
474
|
+
* `[x, y]` added after the space mapping, in that space's normalized units (points only).
|
|
475
|
+
*/
|
|
476
|
+
readonly offset?: readonly [number, number] | null;
|
|
477
|
+
/**
|
|
478
|
+
* A linear map of the value (scalars only).
|
|
479
|
+
*/
|
|
480
|
+
readonly remap?: DataRemap | null;
|
|
481
|
+
/**
|
|
482
|
+
* Where a point is read (points with `via` only, where it is required).
|
|
483
|
+
*/
|
|
484
|
+
readonly space?: DataSpace | null;
|
|
485
|
+
/**
|
|
486
|
+
* The reader whose time map gives source time: required for a source-anchored set,
|
|
487
|
+
* forbidden for a timeline-anchored one.
|
|
488
|
+
*/
|
|
489
|
+
readonly via?: DataVia | null;
|
|
365
490
|
};
|
|
366
491
|
/**
|
|
367
492
|
* A serializable single-input audio effect applied to a clip or track bus.
|
|
@@ -506,6 +631,12 @@ export interface AudioStreamShape {
|
|
|
506
631
|
* `BlendSpace::SrgbEncoded`.
|
|
507
632
|
*/
|
|
508
633
|
export type BlendSpace = "linear_light" | "srgb_encoded";
|
|
634
|
+
/**
|
|
635
|
+
* What ends a line that a clamp cuts, as CSS `block-ellipsis`.
|
|
636
|
+
*/
|
|
637
|
+
export type BlockEllipsis = "no_ellipsis" | "ellipsis" | {
|
|
638
|
+
readonly string: string;
|
|
639
|
+
};
|
|
509
640
|
/**
|
|
510
641
|
* Whether a runtime may keep and reuse a clip's rendered picture.
|
|
511
642
|
*/
|
|
@@ -538,9 +669,16 @@ export interface CaptionCue {
|
|
|
538
669
|
*/
|
|
539
670
|
export interface Captions {
|
|
540
671
|
/**
|
|
541
|
-
* Cues in timeline order, none overlapping; a track shows one cue at a time.
|
|
672
|
+
* Cues in timeline order, none overlapping; a track shows one cue at a time. Empty when
|
|
673
|
+
* `from_words` gives the cues.
|
|
674
|
+
*
|
|
675
|
+
* @defaultValue `[]`
|
|
676
|
+
*/
|
|
677
|
+
readonly cues?: readonly CaptionCue[];
|
|
678
|
+
/**
|
|
679
|
+
* Cues built at evaluation from a `words` data set, instead of `cues`.
|
|
542
680
|
*/
|
|
543
|
-
readonly
|
|
681
|
+
readonly from_words?: CaptionsFromWords | null;
|
|
544
682
|
/**
|
|
545
683
|
* The style every cue starts from.
|
|
546
684
|
*/
|
|
@@ -551,6 +689,24 @@ export interface Captions {
|
|
|
551
689
|
*/
|
|
552
690
|
readonly styles?: Readonly<Record<string, TextStylePatch>>;
|
|
553
691
|
}
|
|
692
|
+
/**
|
|
693
|
+
* Caption cues built from a `words` data set.
|
|
694
|
+
*/
|
|
695
|
+
export interface CaptionsFromWords {
|
|
696
|
+
/**
|
|
697
|
+
* The data set, a `words` one.
|
|
698
|
+
*/
|
|
699
|
+
readonly data: DataSetId;
|
|
700
|
+
/**
|
|
701
|
+
* Most characters of one cue, at least 1.
|
|
702
|
+
*/
|
|
703
|
+
readonly max_chars: number;
|
|
704
|
+
/**
|
|
705
|
+
* For a source-anchored set, the track whose clips showing the source give the words their
|
|
706
|
+
* timeline times; forbidden for a timeline-anchored set.
|
|
707
|
+
*/
|
|
708
|
+
readonly track?: TrackId | null;
|
|
709
|
+
}
|
|
554
710
|
/**
|
|
555
711
|
* A reference to a source over independent timeline and source ranges.
|
|
556
712
|
*/
|
|
@@ -654,7 +810,9 @@ export interface ClipComposition {
|
|
|
654
810
|
*/
|
|
655
811
|
export interface ClipEffect {
|
|
656
812
|
/**
|
|
657
|
-
* Stable effect definition identifier.
|
|
813
|
+
* Stable effect definition identifier. Ids under `alpha2.` name built-ins
|
|
814
|
+
* (`schema/effects.v1.json`): validation checks such an invocation's version, kind,
|
|
815
|
+
* parameters, inputs and resources against its definition.
|
|
658
816
|
*/
|
|
659
817
|
readonly id: string;
|
|
660
818
|
/**
|
|
@@ -843,6 +1001,15 @@ export interface CompositionNode {
|
|
|
843
1001
|
*/
|
|
844
1002
|
readonly op: NodeOp;
|
|
845
1003
|
}
|
|
1004
|
+
/**
|
|
1005
|
+
* A `similarity` data set applied to a clip's own picture before its transform.
|
|
1006
|
+
*/
|
|
1007
|
+
export interface CorrectionRef {
|
|
1008
|
+
/**
|
|
1009
|
+
* The data set, a `similarity` one anchored to the clip's source.
|
|
1010
|
+
*/
|
|
1011
|
+
readonly data: DataSetId;
|
|
1012
|
+
}
|
|
846
1013
|
/**
|
|
847
1014
|
* A dash pattern.
|
|
848
1015
|
*/
|
|
@@ -860,6 +1027,279 @@ export interface Dash {
|
|
|
860
1027
|
*/
|
|
861
1028
|
readonly pattern: readonly Animated<number>[];
|
|
862
1029
|
}
|
|
1030
|
+
export type DataAnchor = {
|
|
1031
|
+
/**
|
|
1032
|
+
* The source.
|
|
1033
|
+
*/
|
|
1034
|
+
readonly source_id: SourceId;
|
|
1035
|
+
/**
|
|
1036
|
+
* Source time, the presentation times the source's pictures and sound carry once decoded.
|
|
1037
|
+
* Points are normalized to the displayed source picture.
|
|
1038
|
+
*/
|
|
1039
|
+
readonly type: "source";
|
|
1040
|
+
} | {
|
|
1041
|
+
/**
|
|
1042
|
+
* Timeline time. Points are normalized to the canvas.
|
|
1043
|
+
*/
|
|
1044
|
+
readonly type: "timeline";
|
|
1045
|
+
};
|
|
1046
|
+
/**
|
|
1047
|
+
* How a sampled data set reads between its samples.
|
|
1048
|
+
*/
|
|
1049
|
+
export type DataInterpolation = "hold" | "linear";
|
|
1050
|
+
/**
|
|
1051
|
+
* One timed range; `start == end` is an instant.
|
|
1052
|
+
*/
|
|
1053
|
+
export interface DataInterval {
|
|
1054
|
+
/**
|
|
1055
|
+
* When it ends; not before `start`.
|
|
1056
|
+
*/
|
|
1057
|
+
readonly end: MediaTime;
|
|
1058
|
+
/**
|
|
1059
|
+
* A free label, at most `MAX_DATA_LABEL_BYTES` bytes. Edit operations ignore it.
|
|
1060
|
+
*/
|
|
1061
|
+
readonly label?: string | null;
|
|
1062
|
+
/**
|
|
1063
|
+
* A free, finite score of at most `MAX_DATA_SCALAR` in magnitude; edit operations ignore it.
|
|
1064
|
+
*/
|
|
1065
|
+
readonly score?: number | null;
|
|
1066
|
+
/**
|
|
1067
|
+
* When it starts, in ticks on the anchor's clock.
|
|
1068
|
+
*/
|
|
1069
|
+
readonly start: MediaTime;
|
|
1070
|
+
}
|
|
1071
|
+
/**
|
|
1072
|
+
* A linear map from `input` to `output`, clamped to `output`.
|
|
1073
|
+
*/
|
|
1074
|
+
export interface DataRemap {
|
|
1075
|
+
/**
|
|
1076
|
+
* The input values mapped to `output[0]` and `output[1]`; distinct and finite.
|
|
1077
|
+
*/
|
|
1078
|
+
readonly input: readonly [number, number];
|
|
1079
|
+
/**
|
|
1080
|
+
* The output range; finite.
|
|
1081
|
+
*/
|
|
1082
|
+
readonly output: readonly [number, number];
|
|
1083
|
+
}
|
|
1084
|
+
/**
|
|
1085
|
+
* Values derived from media, anchored to a source's clock or the timeline's.
|
|
1086
|
+
*/
|
|
1087
|
+
export type DataSet = {
|
|
1088
|
+
/**
|
|
1089
|
+
* The clock the times are on.
|
|
1090
|
+
*/
|
|
1091
|
+
readonly anchor: DataAnchor;
|
|
1092
|
+
/**
|
|
1093
|
+
* Channel names, unique, 1 to 256 bytes each.
|
|
1094
|
+
*/
|
|
1095
|
+
readonly channels: readonly string[];
|
|
1096
|
+
/**
|
|
1097
|
+
* Stable identity, 1 to 64 bytes.
|
|
1098
|
+
*/
|
|
1099
|
+
readonly id: DataSetId;
|
|
1100
|
+
/**
|
|
1101
|
+
* How the values read between samples.
|
|
1102
|
+
*/
|
|
1103
|
+
readonly interpolation: DataInterpolation;
|
|
1104
|
+
/**
|
|
1105
|
+
* Named channels of normalized `(x, y)` points, each pair `null` when lost.
|
|
1106
|
+
*/
|
|
1107
|
+
readonly kind: "points";
|
|
1108
|
+
/**
|
|
1109
|
+
* Which extractor made it.
|
|
1110
|
+
*
|
|
1111
|
+
* @defaultValue `null`
|
|
1112
|
+
*/
|
|
1113
|
+
readonly made_by?: MadeBy | null;
|
|
1114
|
+
/**
|
|
1115
|
+
* The original source's fingerprint when it was made.
|
|
1116
|
+
*
|
|
1117
|
+
* @defaultValue `null`
|
|
1118
|
+
*/
|
|
1119
|
+
readonly made_from?: MediaFingerprint | null;
|
|
1120
|
+
/**
|
|
1121
|
+
* Sample times in ticks on the anchor's clock, strictly ascending.
|
|
1122
|
+
*/
|
|
1123
|
+
readonly times: readonly MediaTime[];
|
|
1124
|
+
/**
|
|
1125
|
+
* `times.len() * channels.len() * 2` numbers, sample after sample, channel after channel.
|
|
1126
|
+
*/
|
|
1127
|
+
readonly values: readonly (number | null)[];
|
|
1128
|
+
} | {
|
|
1129
|
+
/**
|
|
1130
|
+
* The clock the times are on.
|
|
1131
|
+
*/
|
|
1132
|
+
readonly anchor: DataAnchor;
|
|
1133
|
+
/**
|
|
1134
|
+
* Channel names, unique, 1 to 256 bytes each.
|
|
1135
|
+
*/
|
|
1136
|
+
readonly channels: readonly string[];
|
|
1137
|
+
/**
|
|
1138
|
+
* Stable identity, 1 to 64 bytes.
|
|
1139
|
+
*/
|
|
1140
|
+
readonly id: DataSetId;
|
|
1141
|
+
/**
|
|
1142
|
+
* How the values read between samples.
|
|
1143
|
+
*/
|
|
1144
|
+
readonly interpolation: DataInterpolation;
|
|
1145
|
+
/**
|
|
1146
|
+
* Named channels of numbers, each `null` when lost.
|
|
1147
|
+
*/
|
|
1148
|
+
readonly kind: "scalars";
|
|
1149
|
+
/**
|
|
1150
|
+
* Which extractor made it.
|
|
1151
|
+
*
|
|
1152
|
+
* @defaultValue `null`
|
|
1153
|
+
*/
|
|
1154
|
+
readonly made_by?: MadeBy | null;
|
|
1155
|
+
/**
|
|
1156
|
+
* The original source's fingerprint when it was made.
|
|
1157
|
+
*
|
|
1158
|
+
* @defaultValue `null`
|
|
1159
|
+
*/
|
|
1160
|
+
readonly made_from?: MediaFingerprint | null;
|
|
1161
|
+
/**
|
|
1162
|
+
* Sample times in ticks on the anchor's clock, strictly ascending.
|
|
1163
|
+
*/
|
|
1164
|
+
readonly times: readonly MediaTime[];
|
|
1165
|
+
/**
|
|
1166
|
+
* `times.len() * channels.len()` numbers, sample after sample, channel after channel.
|
|
1167
|
+
*/
|
|
1168
|
+
readonly values: readonly (number | null)[];
|
|
1169
|
+
} | {
|
|
1170
|
+
/**
|
|
1171
|
+
* The clock the times are on.
|
|
1172
|
+
*/
|
|
1173
|
+
readonly anchor: DataAnchor;
|
|
1174
|
+
/**
|
|
1175
|
+
* Stable identity, 1 to 64 bytes.
|
|
1176
|
+
*/
|
|
1177
|
+
readonly id: DataSetId;
|
|
1178
|
+
/**
|
|
1179
|
+
* How the values read between samples.
|
|
1180
|
+
*/
|
|
1181
|
+
readonly interpolation: DataInterpolation;
|
|
1182
|
+
/**
|
|
1183
|
+
* Translation (normalized), rotation (degrees) and uniform scale about the picture's
|
|
1184
|
+
* center, per sample; four `null`s when lost.
|
|
1185
|
+
*/
|
|
1186
|
+
readonly kind: "similarity";
|
|
1187
|
+
/**
|
|
1188
|
+
* Which extractor made it.
|
|
1189
|
+
*
|
|
1190
|
+
* @defaultValue `null`
|
|
1191
|
+
*/
|
|
1192
|
+
readonly made_by?: MadeBy | null;
|
|
1193
|
+
/**
|
|
1194
|
+
* The original source's fingerprint when it was made.
|
|
1195
|
+
*
|
|
1196
|
+
* @defaultValue `null`
|
|
1197
|
+
*/
|
|
1198
|
+
readonly made_from?: MediaFingerprint | null;
|
|
1199
|
+
/**
|
|
1200
|
+
* Sample times in ticks on the anchor's clock, strictly ascending.
|
|
1201
|
+
*/
|
|
1202
|
+
readonly times: readonly MediaTime[];
|
|
1203
|
+
/**
|
|
1204
|
+
* `times.len() * 4` numbers: `tx`, `ty`, rotation, scale per sample.
|
|
1205
|
+
*/
|
|
1206
|
+
readonly values: readonly (number | null)[];
|
|
1207
|
+
} | {
|
|
1208
|
+
/**
|
|
1209
|
+
* The clock the times are on.
|
|
1210
|
+
*/
|
|
1211
|
+
readonly anchor: DataAnchor;
|
|
1212
|
+
/**
|
|
1213
|
+
* Stable identity, 1 to 64 bytes.
|
|
1214
|
+
*/
|
|
1215
|
+
readonly id: DataSetId;
|
|
1216
|
+
/**
|
|
1217
|
+
* Timed words.
|
|
1218
|
+
*/
|
|
1219
|
+
readonly kind: "words";
|
|
1220
|
+
/**
|
|
1221
|
+
* Which extractor made it.
|
|
1222
|
+
*
|
|
1223
|
+
* @defaultValue `null`
|
|
1224
|
+
*/
|
|
1225
|
+
readonly made_by?: MadeBy | null;
|
|
1226
|
+
/**
|
|
1227
|
+
* The original source's fingerprint when it was made.
|
|
1228
|
+
*
|
|
1229
|
+
* @defaultValue `null`
|
|
1230
|
+
*/
|
|
1231
|
+
readonly made_from?: MediaFingerprint | null;
|
|
1232
|
+
/**
|
|
1233
|
+
* Words sorted by `(start, end)`.
|
|
1234
|
+
*/
|
|
1235
|
+
readonly words: readonly DataWord[];
|
|
1236
|
+
} | {
|
|
1237
|
+
/**
|
|
1238
|
+
* The clock the times are on.
|
|
1239
|
+
*/
|
|
1240
|
+
readonly anchor: DataAnchor;
|
|
1241
|
+
/**
|
|
1242
|
+
* Stable identity, 1 to 64 bytes.
|
|
1243
|
+
*/
|
|
1244
|
+
readonly id: DataSetId;
|
|
1245
|
+
/**
|
|
1246
|
+
* Intervals sorted by `(start, end)`.
|
|
1247
|
+
*/
|
|
1248
|
+
readonly intervals: readonly DataInterval[];
|
|
1249
|
+
/**
|
|
1250
|
+
* Timed ranges.
|
|
1251
|
+
*/
|
|
1252
|
+
readonly kind: "intervals";
|
|
1253
|
+
/**
|
|
1254
|
+
* Which extractor made it.
|
|
1255
|
+
*
|
|
1256
|
+
* @defaultValue `null`
|
|
1257
|
+
*/
|
|
1258
|
+
readonly made_by?: MadeBy | null;
|
|
1259
|
+
/**
|
|
1260
|
+
* The original source's fingerprint when it was made.
|
|
1261
|
+
*
|
|
1262
|
+
* @defaultValue `null`
|
|
1263
|
+
*/
|
|
1264
|
+
readonly made_from?: MediaFingerprint | null;
|
|
1265
|
+
};
|
|
1266
|
+
/**
|
|
1267
|
+
* A stable data-set identifier.
|
|
1268
|
+
*/
|
|
1269
|
+
export type DataSetId = string;
|
|
1270
|
+
/**
|
|
1271
|
+
* Where a bound point is read.
|
|
1272
|
+
*/
|
|
1273
|
+
export type DataSpace = "picture" | "canvas";
|
|
1274
|
+
/**
|
|
1275
|
+
* The reader whose clock maps time onto a source-anchored data set.
|
|
1276
|
+
*/
|
|
1277
|
+
export type DataVia = {
|
|
1278
|
+
readonly clip: ClipId;
|
|
1279
|
+
} | {
|
|
1280
|
+
readonly node: NodeId;
|
|
1281
|
+
};
|
|
1282
|
+
/**
|
|
1283
|
+
* One timed word.
|
|
1284
|
+
*/
|
|
1285
|
+
export interface DataWord {
|
|
1286
|
+
/**
|
|
1287
|
+
* When it ends; after `start`.
|
|
1288
|
+
*/
|
|
1289
|
+
readonly end: MediaTime;
|
|
1290
|
+
/**
|
|
1291
|
+
* Who says it, at most `MAX_DATA_LABEL_BYTES` bytes.
|
|
1292
|
+
*/
|
|
1293
|
+
readonly speaker?: string | null;
|
|
1294
|
+
/**
|
|
1295
|
+
* When the word starts, in ticks on the anchor's clock.
|
|
1296
|
+
*/
|
|
1297
|
+
readonly start: MediaTime;
|
|
1298
|
+
/**
|
|
1299
|
+
* The word, non-empty, at most `MAX_DATA_LABEL_BYTES` bytes.
|
|
1300
|
+
*/
|
|
1301
|
+
readonly text: string;
|
|
1302
|
+
}
|
|
863
1303
|
/**
|
|
864
1304
|
* How a box lays its children out.
|
|
865
1305
|
*/
|
|
@@ -1035,6 +1475,25 @@ export type FlexDirection = "row" | "column" | "row_reverse" | "column_reverse";
|
|
|
1035
1475
|
* Whether a flex container's children wrap.
|
|
1036
1476
|
*/
|
|
1037
1477
|
export type FlexWrap = "nowrap" | "wrap";
|
|
1478
|
+
/**
|
|
1479
|
+
* The font sizes a text is fitted between, as fractions of the canvas's shorter side.
|
|
1480
|
+
*
|
|
1481
|
+
* The text draws at the largest size in `[min, max]` at which no line breaks inside a word,
|
|
1482
|
+
* the lines fit the box's height, and there are no more lines than `line_clamp.max_lines`.
|
|
1483
|
+
* When no size fits, it draws at `min`. A `min` above `max` wins, as CSS `min-width` does.
|
|
1484
|
+
* Sizes are tried by bisection over `max`, `min` and the multiples of `1 / 8192` between.
|
|
1485
|
+
*/
|
|
1486
|
+
export interface FontSizeFit {
|
|
1487
|
+
/**
|
|
1488
|
+
* Largest font size, at least `min` and at most the holder's largest font size. `None`
|
|
1489
|
+
* is `font_size`, so the text only shrinks.
|
|
1490
|
+
*/
|
|
1491
|
+
readonly max?: number | null;
|
|
1492
|
+
/**
|
|
1493
|
+
* Smallest font size, positive. At most the holder's largest font size.
|
|
1494
|
+
*/
|
|
1495
|
+
readonly min: number;
|
|
1496
|
+
}
|
|
1038
1497
|
/**
|
|
1039
1498
|
* A positive rational frame rate in reduced form, at most one frame per tick (120 000 fps).
|
|
1040
1499
|
*/
|
|
@@ -1196,6 +1655,28 @@ export interface Keyframe<T> {
|
|
|
1196
1655
|
*/
|
|
1197
1656
|
readonly value: T;
|
|
1198
1657
|
}
|
|
1658
|
+
/**
|
|
1659
|
+
* A value that is constant or controlled by sorted keyframes.
|
|
1660
|
+
*/
|
|
1661
|
+
export type Keyframed<T> = {
|
|
1662
|
+
/**
|
|
1663
|
+
* A value without animation.
|
|
1664
|
+
*/
|
|
1665
|
+
readonly mode: "constant";
|
|
1666
|
+
/**
|
|
1667
|
+
* Value used at every timestamp.
|
|
1668
|
+
*/
|
|
1669
|
+
readonly value: T;
|
|
1670
|
+
} | {
|
|
1671
|
+
/**
|
|
1672
|
+
* Strictly ascending keyframes. The evaluator clamps outside the sequence.
|
|
1673
|
+
*/
|
|
1674
|
+
readonly keyframes: readonly Keyframe<T>[];
|
|
1675
|
+
/**
|
|
1676
|
+
* Values evaluated from their keyframe sequence.
|
|
1677
|
+
*/
|
|
1678
|
+
readonly mode: "keyframes";
|
|
1679
|
+
};
|
|
1199
1680
|
/**
|
|
1200
1681
|
* A border inside the border box, as wide on every side.
|
|
1201
1682
|
*/
|
|
@@ -1203,11 +1684,25 @@ export interface LayoutBorder {
|
|
|
1203
1684
|
/**
|
|
1204
1685
|
* What covers the border. Positions are normalized to the border box.
|
|
1205
1686
|
*/
|
|
1206
|
-
readonly paint:
|
|
1687
|
+
readonly paint: Keyframed<Paint>;
|
|
1207
1688
|
/**
|
|
1208
1689
|
* Width. At least 0.
|
|
1209
1690
|
*/
|
|
1210
|
-
readonly width:
|
|
1691
|
+
readonly width: Keyframed<LayoutSize>;
|
|
1692
|
+
}
|
|
1693
|
+
/**
|
|
1694
|
+
* The font sizes a layout text is fitted between, as a text style's
|
|
1695
|
+
* `FontSizeFit`, in layout sizes. A `min` above `max` wins.
|
|
1696
|
+
*/
|
|
1697
|
+
export interface LayoutFontSizeFit {
|
|
1698
|
+
/**
|
|
1699
|
+
* Largest font size, with the same limits. `None` is `font_size`, so the text only shrinks.
|
|
1700
|
+
*/
|
|
1701
|
+
readonly max?: LayoutSize | null;
|
|
1702
|
+
/**
|
|
1703
|
+
* Smallest font size, positive and at most `MAX_LAYOUT_FONT_SIZE` of the shorter side.
|
|
1704
|
+
*/
|
|
1705
|
+
readonly min: LayoutSize;
|
|
1211
1706
|
}
|
|
1212
1707
|
/**
|
|
1213
1708
|
* Where an absolute box lies in its parent's padding box. A missing side is auto; with
|
|
@@ -1217,19 +1712,19 @@ export interface LayoutInset {
|
|
|
1217
1712
|
/**
|
|
1218
1713
|
* Distance from the parent's bottom padding edge.
|
|
1219
1714
|
*/
|
|
1220
|
-
readonly bottom?:
|
|
1715
|
+
readonly bottom?: Keyframed<LayoutLength> | null;
|
|
1221
1716
|
/**
|
|
1222
1717
|
* Distance from the parent's left padding edge.
|
|
1223
1718
|
*/
|
|
1224
|
-
readonly left?:
|
|
1719
|
+
readonly left?: Keyframed<LayoutLength> | null;
|
|
1225
1720
|
/**
|
|
1226
1721
|
* Distance from the parent's right padding edge.
|
|
1227
1722
|
*/
|
|
1228
|
-
readonly right?:
|
|
1723
|
+
readonly right?: Keyframed<LayoutLength> | null;
|
|
1229
1724
|
/**
|
|
1230
1725
|
* Distance from the parent's top padding edge.
|
|
1231
1726
|
*/
|
|
1232
|
-
readonly top?:
|
|
1727
|
+
readonly top?: Keyframed<LayoutLength> | null;
|
|
1233
1728
|
}
|
|
1234
1729
|
/**
|
|
1235
1730
|
* A length: a number is a fraction of the layout picture's shorter side, "<n>px" pixels of the project canvas, "<n>%" a percent of the parent's content box along the field's axis.
|
|
@@ -1266,7 +1761,7 @@ export interface LayoutNode {
|
|
|
1266
1761
|
* What covers the border box, rounded by `border_radius`. Positions are normalized to the
|
|
1267
1762
|
* border box.
|
|
1268
1763
|
*/
|
|
1269
|
-
readonly background?:
|
|
1764
|
+
readonly background?: Keyframed<Paint> | null;
|
|
1270
1765
|
/**
|
|
1271
1766
|
* A border inside the border box.
|
|
1272
1767
|
*/
|
|
@@ -1275,7 +1770,7 @@ export interface LayoutNode {
|
|
|
1275
1770
|
* The corner radius of the border box. At least 0; default 0. Capped at half the box's
|
|
1276
1771
|
* shorter side.
|
|
1277
1772
|
*/
|
|
1278
|
-
readonly border_radius?:
|
|
1773
|
+
readonly border_radius?: Keyframed<LayoutSize> | null;
|
|
1279
1774
|
/**
|
|
1280
1775
|
* Boxes laid out in this one, in document (and paint) order. Not with `text` or `shape`.
|
|
1281
1776
|
*/
|
|
@@ -1283,7 +1778,7 @@ export interface LayoutNode {
|
|
|
1283
1778
|
/**
|
|
1284
1779
|
* Space between columns, in place of `gap`. At least 0.
|
|
1285
1780
|
*/
|
|
1286
|
-
readonly column_gap?:
|
|
1781
|
+
readonly column_gap?: Keyframed<LayoutSize> | null;
|
|
1287
1782
|
/**
|
|
1288
1783
|
* How the box lays its children out. Default `flex`. Like every container field, not on a
|
|
1289
1784
|
* box with text or shape content.
|
|
@@ -1296,7 +1791,7 @@ export interface LayoutNode {
|
|
|
1296
1791
|
/**
|
|
1297
1792
|
* The main size before growing and shrinking. `None` is auto.
|
|
1298
1793
|
*/
|
|
1299
|
-
readonly flex_basis?:
|
|
1794
|
+
readonly flex_basis?: Keyframed<LayoutLength> | null;
|
|
1300
1795
|
/**
|
|
1301
1796
|
* The main axis of a flex container's children. Default `row`.
|
|
1302
1797
|
*/
|
|
@@ -1324,7 +1819,13 @@ export interface LayoutNode {
|
|
|
1324
1819
|
* Font size: positive, at most `MAX_LAYOUT_FONT_SIZE` of the picture's shorter side.
|
|
1325
1820
|
* Inherited; the root's is 0.05.
|
|
1326
1821
|
*/
|
|
1327
|
-
readonly font_size?:
|
|
1822
|
+
readonly font_size?: Keyframed<LayoutSize> | null;
|
|
1823
|
+
/**
|
|
1824
|
+
* The range the font size of the box's own text is fitted in so the text fits its content
|
|
1825
|
+
* box, as a text style's `font_size_fit`. The box is laid out at `font_size` first, and
|
|
1826
|
+
* the fit never changes its size. Not inherited.
|
|
1827
|
+
*/
|
|
1828
|
+
readonly font_size_fit?: LayoutFontSizeFit | null;
|
|
1328
1829
|
/**
|
|
1329
1830
|
* The weight in `[1, 1000]` used to match the family's faces, as a text style's
|
|
1330
1831
|
* `font_weight`. Not animated. Inherited; the root's is 400.
|
|
@@ -1333,7 +1834,7 @@ export interface LayoutNode {
|
|
|
1333
1834
|
/**
|
|
1334
1835
|
* Space between children, on both axes. At least 0; default 0.
|
|
1335
1836
|
*/
|
|
1336
|
-
readonly gap?:
|
|
1837
|
+
readonly gap?: Keyframed<LayoutSize> | null;
|
|
1337
1838
|
/**
|
|
1338
1839
|
* The size of a grid's implicit columns. Default `auto`.
|
|
1339
1840
|
*/
|
|
@@ -1367,7 +1868,7 @@ export interface LayoutNode {
|
|
|
1367
1868
|
/**
|
|
1368
1869
|
* Border-box height. `None` is auto.
|
|
1369
1870
|
*/
|
|
1370
|
-
readonly height?:
|
|
1871
|
+
readonly height?: Keyframed<LayoutLength> | null;
|
|
1371
1872
|
/**
|
|
1372
1873
|
* Where an `absolute` box lies in its parent's padding box.
|
|
1373
1874
|
*/
|
|
@@ -1390,6 +1891,12 @@ export interface LayoutNode {
|
|
|
1390
1891
|
* style's `letter_spacing`. Not animated. Inherited; the root's is 0.
|
|
1391
1892
|
*/
|
|
1392
1893
|
readonly letter_spacing?: number | null;
|
|
1894
|
+
/**
|
|
1895
|
+
* Where the lines of the box's own text are cut and what ends the cut line, as CSS
|
|
1896
|
+
* `line-clamp` and a text style's `line_clamp`. The clamp point is also at the content
|
|
1897
|
+
* box's height. The box's automatic height ends at the clamp point. Not inherited.
|
|
1898
|
+
*/
|
|
1899
|
+
readonly line_clamp?: LineClamp | null;
|
|
1393
1900
|
/**
|
|
1394
1901
|
* Baseline-to-baseline distance in font sizes, in `[0.5, 3]`, as a text style's
|
|
1395
1902
|
* `line_height`. Inherited; the root's is 1.2.
|
|
@@ -1398,23 +1905,23 @@ export interface LayoutNode {
|
|
|
1398
1905
|
/**
|
|
1399
1906
|
* Space outside the border, written as `padding` is. Sides may be negative; no `auto`.
|
|
1400
1907
|
*/
|
|
1401
|
-
readonly margin?:
|
|
1908
|
+
readonly margin?: Keyframed<Insets> | null;
|
|
1402
1909
|
/**
|
|
1403
1910
|
* Largest height. `None` is none.
|
|
1404
1911
|
*/
|
|
1405
|
-
readonly max_height?:
|
|
1912
|
+
readonly max_height?: Keyframed<LayoutLength> | null;
|
|
1406
1913
|
/**
|
|
1407
1914
|
* Largest width. `None` is none.
|
|
1408
1915
|
*/
|
|
1409
|
-
readonly max_width?:
|
|
1916
|
+
readonly max_width?: Keyframed<LayoutLength> | null;
|
|
1410
1917
|
/**
|
|
1411
1918
|
* Smallest height. `None` is auto.
|
|
1412
1919
|
*/
|
|
1413
|
-
readonly min_height?:
|
|
1920
|
+
readonly min_height?: Keyframed<LayoutLength> | null;
|
|
1414
1921
|
/**
|
|
1415
1922
|
* Smallest width. `None` is auto, the CSS automatic minimum size.
|
|
1416
1923
|
*/
|
|
1417
|
-
readonly min_width?:
|
|
1924
|
+
readonly min_width?: Keyframed<LayoutLength> | null;
|
|
1418
1925
|
/**
|
|
1419
1926
|
* Opacity of the box and everything in it as one group, in `0..=1`. Applied after layout.
|
|
1420
1927
|
*/
|
|
@@ -1427,7 +1934,7 @@ export interface LayoutNode {
|
|
|
1427
1934
|
* Space inside the border: a length, the CSS shorthand (`"8px 16px"`), or the sides object.
|
|
1428
1935
|
* Sides at least 0; default 0.
|
|
1429
1936
|
*/
|
|
1430
|
-
readonly padding?:
|
|
1937
|
+
readonly padding?: Keyframed<Insets> | null;
|
|
1431
1938
|
/**
|
|
1432
1939
|
* Whether the box is in its parent's flow. Default `relative`.
|
|
1433
1940
|
*/
|
|
@@ -1441,7 +1948,7 @@ export interface LayoutNode {
|
|
|
1441
1948
|
* Space between rows (or lines of a wrapping row flex container), in place of `gap`. At
|
|
1442
1949
|
* least 0.
|
|
1443
1950
|
*/
|
|
1444
|
-
readonly row_gap?:
|
|
1951
|
+
readonly row_gap?: Keyframed<LayoutSize> | null;
|
|
1445
1952
|
/**
|
|
1446
1953
|
* Per-axis scale of the box and everything in it about its border-box centre, after layout.
|
|
1447
1954
|
*/
|
|
@@ -1466,7 +1973,7 @@ export interface LayoutNode {
|
|
|
1466
1973
|
* At most `MAX_TEXT_CONTENT_BYTES` bytes per value; may be empty. Keyframes all `hold`.
|
|
1467
1974
|
* Not with `children` or `shape`.
|
|
1468
1975
|
*/
|
|
1469
|
-
readonly text?:
|
|
1976
|
+
readonly text?: Keyframed<string> | null;
|
|
1470
1977
|
/**
|
|
1471
1978
|
* How lines align within the content width. Inherited; the root's is `start`.
|
|
1472
1979
|
*/
|
|
@@ -1481,11 +1988,11 @@ export interface LayoutNode {
|
|
|
1481
1988
|
* Offset of the box and everything in it after layout: the object, or one or two lengths as
|
|
1482
1989
|
* CSS `translate` writes them.
|
|
1483
1990
|
*/
|
|
1484
|
-
readonly translate?:
|
|
1991
|
+
readonly translate?: Keyframed<LayoutOffset> | null;
|
|
1485
1992
|
/**
|
|
1486
1993
|
* Border-box width. `None` is auto. Like every item field, not on the root.
|
|
1487
1994
|
*/
|
|
1488
|
-
readonly width?:
|
|
1995
|
+
readonly width?: Keyframed<LayoutLength> | null;
|
|
1489
1996
|
}
|
|
1490
1997
|
/**
|
|
1491
1998
|
* An offset, x right and y down: one or two lengths as CSS translate writes them (y 0 when missing), or {x, y}.
|
|
@@ -1525,6 +2032,27 @@ export interface Limiter {
|
|
|
1525
2032
|
* How an open stroke ends.
|
|
1526
2033
|
*/
|
|
1527
2034
|
export type LineCap = "butt" | "round" | "square";
|
|
2035
|
+
/**
|
|
2036
|
+
* Lines past a clamp point are discarded, as CSS Overflow 4 `line-clamp` discards them.
|
|
2037
|
+
*
|
|
2038
|
+
* The clamp point is after the last line within `max_lines` that fits the box's height, and
|
|
2039
|
+
* never before the first line. Unlike CSS, the height counts without `max-lines: auto`, so
|
|
2040
|
+
* clamped text stays inside a box that has one. A cut line is shortened to its last word end,
|
|
2041
|
+
* else its last character, at which the ellipsis fits after it. Text animators count no unit
|
|
2042
|
+
* for the ellipsis, which moves with the character before it.
|
|
2043
|
+
*/
|
|
2044
|
+
export interface LineClamp {
|
|
2045
|
+
/**
|
|
2046
|
+
* What ends the last kept line of cut text. Default `ellipsis`, as CSS `line-clamp` sets it.
|
|
2047
|
+
*
|
|
2048
|
+
* @defaultValue `"ellipsis"`
|
|
2049
|
+
*/
|
|
2050
|
+
readonly block_ellipsis?: BlockEllipsis;
|
|
2051
|
+
/**
|
|
2052
|
+
* Most lines, at least 1, as CSS `max-lines`. `None` cuts at the box's height alone.
|
|
2053
|
+
*/
|
|
2054
|
+
readonly max_lines?: number | null;
|
|
2055
|
+
}
|
|
1528
2056
|
/**
|
|
1529
2057
|
* How stroke segments meet at a vertex.
|
|
1530
2058
|
*/
|
|
@@ -1537,6 +2065,42 @@ export type LinearPrimaries = "bt709" | "bt2020" | "p3_d65" | "aces_ap0" | "aces
|
|
|
1537
2065
|
* How each pass of a `TimeMap::Loop` follows the one before.
|
|
1538
2066
|
*/
|
|
1539
2067
|
export type LoopMode = "repeat" | "ping_pong";
|
|
2068
|
+
/**
|
|
2069
|
+
* Which extractor made a data set. Recorded for hosts; the engine never reads it.
|
|
2070
|
+
*/
|
|
2071
|
+
export interface MadeBy {
|
|
2072
|
+
/**
|
|
2073
|
+
* The extractor's reverse-DNS id.
|
|
2074
|
+
*/
|
|
2075
|
+
readonly extractor: string;
|
|
2076
|
+
/**
|
|
2077
|
+
* The parameters it ran with.
|
|
2078
|
+
*
|
|
2079
|
+
* @defaultValue `{}`
|
|
2080
|
+
*/
|
|
2081
|
+
readonly params?: Readonly<Record<string, never>>;
|
|
2082
|
+
/**
|
|
2083
|
+
* The plugin that ran, when the extractor was one.
|
|
2084
|
+
*/
|
|
2085
|
+
readonly plugin?: MadeByPlugin | null;
|
|
2086
|
+
/**
|
|
2087
|
+
* The extractor's output-contract version.
|
|
2088
|
+
*/
|
|
2089
|
+
readonly version: number;
|
|
2090
|
+
}
|
|
2091
|
+
/**
|
|
2092
|
+
* The plugin build that made a data set.
|
|
2093
|
+
*/
|
|
2094
|
+
export interface MadeByPlugin {
|
|
2095
|
+
/**
|
|
2096
|
+
* SHA-256 of the artifact that ran, as 64 lowercase hexadecimal digits.
|
|
2097
|
+
*/
|
|
2098
|
+
readonly artifact_sha256: string;
|
|
2099
|
+
/**
|
|
2100
|
+
* The package's semantic version.
|
|
2101
|
+
*/
|
|
2102
|
+
readonly version: string;
|
|
2103
|
+
}
|
|
1540
2104
|
/**
|
|
1541
2105
|
* How a mask combines with the coverage of the masks before it.
|
|
1542
2106
|
*
|
|
@@ -1770,7 +2334,8 @@ export type NodeOp = {
|
|
|
1770
2334
|
/**
|
|
1771
2335
|
* The images the effect samples besides its input, by the names its definition declares
|
|
1772
2336
|
* (`sample_<name>` in its shader); at most `MAX_EFFECT_INPUTS`. An undeclared name, or a
|
|
1773
|
-
* declared one left out, fails the frames that draw the
|
|
2337
|
+
* declared one left out, is invalid for a built-in and fails the frames that draw the
|
|
2338
|
+
* node otherwise.
|
|
1774
2339
|
*/
|
|
1775
2340
|
readonly inputs?: Readonly<Record<string, NodeId | null>>;
|
|
1776
2341
|
/**
|
|
@@ -2378,7 +2943,7 @@ export type ShapeGeometry = {
|
|
|
2378
2943
|
/**
|
|
2379
2944
|
* The path.
|
|
2380
2945
|
*/
|
|
2381
|
-
readonly path:
|
|
2946
|
+
readonly path: Keyframed<Path>;
|
|
2382
2947
|
/**
|
|
2383
2948
|
* A Bezier path.
|
|
2384
2949
|
*/
|
|
@@ -2504,7 +3069,7 @@ export type ShapeItem = {
|
|
|
2504
3069
|
/**
|
|
2505
3070
|
* The path.
|
|
2506
3071
|
*/
|
|
2507
|
-
readonly path:
|
|
3072
|
+
readonly path: Keyframed<Path>;
|
|
2508
3073
|
/**
|
|
2509
3074
|
* A Bezier path.
|
|
2510
3075
|
*/
|
|
@@ -2519,7 +3084,7 @@ export type ShapeItem = {
|
|
|
2519
3084
|
/**
|
|
2520
3085
|
* What covers it.
|
|
2521
3086
|
*/
|
|
2522
|
-
readonly paint:
|
|
3087
|
+
readonly paint: Keyframed<Paint>;
|
|
2523
3088
|
/**
|
|
2524
3089
|
* Which regions of the compound path are inside.
|
|
2525
3090
|
*
|
|
@@ -2566,7 +3131,7 @@ export type ShapeItem = {
|
|
|
2566
3131
|
/**
|
|
2567
3132
|
* What covers the stroke.
|
|
2568
3133
|
*/
|
|
2569
|
-
readonly paint:
|
|
3134
|
+
readonly paint: Keyframed<Paint>;
|
|
2570
3135
|
/**
|
|
2571
3136
|
* Strokes the geometry listed before it in its group.
|
|
2572
3137
|
*/
|
|
@@ -2739,7 +3304,7 @@ export interface TextAnimatorProperties {
|
|
|
2739
3304
|
/**
|
|
2740
3305
|
* The fill color a fully selected character takes; a gradient fill is mixed toward it.
|
|
2741
3306
|
*/
|
|
2742
|
-
readonly fill?:
|
|
3307
|
+
readonly fill?: Keyframed<Rgba> | null;
|
|
2743
3308
|
/**
|
|
2744
3309
|
* Moves the character, in font sizes, +y down.
|
|
2745
3310
|
*/
|
|
@@ -2753,13 +3318,14 @@ export interface TextAnimatorProperties {
|
|
|
2753
3318
|
*/
|
|
2754
3319
|
readonly rotation_degrees?: Animated<number> | null;
|
|
2755
3320
|
/**
|
|
2756
|
-
* Scales the character about its centre; 1 is none. Each axis in `[0, 10]`.
|
|
3321
|
+
* Scales the character about its centre; 1 is none. Each axis in `[0, 10]`. The scales of
|
|
3322
|
+
* several animators multiply, and the product is at most 10 on each axis.
|
|
2757
3323
|
*/
|
|
2758
3324
|
readonly scale?: Animated<Vec2> | null;
|
|
2759
3325
|
/**
|
|
2760
3326
|
* The color every stroke of a fully selected character takes.
|
|
2761
3327
|
*/
|
|
2762
|
-
readonly stroke?:
|
|
3328
|
+
readonly stroke?: Keyframed<Rgba> | null;
|
|
2763
3329
|
/**
|
|
2764
3330
|
* Space added after the character, in font sizes, in `[-0.5, 1]`, as letter spacing adds
|
|
2765
3331
|
* it. Lines are not re-broken.
|
|
@@ -2947,7 +3513,7 @@ export interface TextStyle {
|
|
|
2947
3513
|
readonly align?: TextAlign;
|
|
2948
3514
|
/**
|
|
2949
3515
|
* The point of the text, background included, placed at `position`; `(0.5, 1)` is its
|
|
2950
|
-
* bottom centre.
|
|
3516
|
+
* bottom centre. Each coordinate within `MAX_TEXT_POSITION`.
|
|
2951
3517
|
*
|
|
2952
3518
|
* @defaultValue `{"x":0.5,"y":1}`
|
|
2953
3519
|
*/
|
|
@@ -2987,6 +3553,11 @@ export interface TextStyle {
|
|
|
2987
3553
|
* @defaultValue `0.05`
|
|
2988
3554
|
*/
|
|
2989
3555
|
readonly font_size?: number;
|
|
3556
|
+
/**
|
|
3557
|
+
* The range the font size is fitted in so the text fits its box. `None` draws at the
|
|
3558
|
+
* font size as set.
|
|
3559
|
+
*/
|
|
3560
|
+
readonly font_size_fit?: FontSizeFit | null;
|
|
2990
3561
|
/**
|
|
2991
3562
|
* The weight in `[1, 1000]` used to match a family's faces, as CSS Fonts 4 matches
|
|
2992
3563
|
* `font-weight`. Variable faces draw at it, clamped to their `wght` axis; no face is
|
|
@@ -3003,6 +3574,10 @@ export interface TextStyle {
|
|
|
3003
3574
|
* @defaultValue `0`
|
|
3004
3575
|
*/
|
|
3005
3576
|
readonly letter_spacing?: number;
|
|
3577
|
+
/**
|
|
3578
|
+
* Where lines are cut and what ends a cut line, as CSS `line-clamp`. `None` cuts nothing.
|
|
3579
|
+
*/
|
|
3580
|
+
readonly line_clamp?: LineClamp | null;
|
|
3006
3581
|
/**
|
|
3007
3582
|
* Baseline-to-baseline distance in font sizes, in `[0.5, 3]`. Each line's em box (0.8 font
|
|
3008
3583
|
* sizes above the baseline, 0.2 below) is centred in a taller line.
|
|
@@ -3010,6 +3585,12 @@ export interface TextStyle {
|
|
|
3010
3585
|
* @defaultValue `1.2`
|
|
3011
3586
|
*/
|
|
3012
3587
|
readonly line_height?: number;
|
|
3588
|
+
/**
|
|
3589
|
+
* Height the lines' box fits in, as a fraction of the canvas height, in `(0, 1]`, for
|
|
3590
|
+
* `font_size_fit` and `line_clamp`. Text taller than it still draws past it, as CSS
|
|
3591
|
+
* `max-height` lets a box with visible overflow. `None` sets no height.
|
|
3592
|
+
*/
|
|
3593
|
+
readonly max_height?: number | null;
|
|
3013
3594
|
/**
|
|
3014
3595
|
* Width text wraps at, as a fraction of the canvas width, in `(0, 1]`.
|
|
3015
3596
|
*
|
|
@@ -3017,7 +3598,8 @@ export interface TextStyle {
|
|
|
3017
3598
|
*/
|
|
3018
3599
|
readonly max_width?: number;
|
|
3019
3600
|
/**
|
|
3020
|
-
* Where on the canvas the text's anchor lies, `(0, 0)` top-left to `(1, 1)` bottom-right
|
|
3601
|
+
* Where on the canvas the text's anchor lies, `(0, 0)` top-left to `(1, 1)` bottom-right;
|
|
3602
|
+
* each coordinate within `MAX_TEXT_POSITION`.
|
|
3021
3603
|
*
|
|
3022
3604
|
* @defaultValue `{"x":0.5,"y":0.92}`
|
|
3023
3605
|
*/
|
|
@@ -3066,6 +3648,10 @@ export interface TextStylePatch {
|
|
|
3066
3648
|
* See `TextStyle::font_size`.
|
|
3067
3649
|
*/
|
|
3068
3650
|
readonly font_size?: number | null;
|
|
3651
|
+
/**
|
|
3652
|
+
* See `TextStyle::font_size_fit`; `null` removes the base's.
|
|
3653
|
+
*/
|
|
3654
|
+
readonly font_size_fit?: FontSizeFit | null;
|
|
3069
3655
|
/**
|
|
3070
3656
|
* See `TextStyle::font_weight`.
|
|
3071
3657
|
*/
|
|
@@ -3074,10 +3660,18 @@ export interface TextStylePatch {
|
|
|
3074
3660
|
* See `TextStyle::letter_spacing`.
|
|
3075
3661
|
*/
|
|
3076
3662
|
readonly letter_spacing?: number | null;
|
|
3663
|
+
/**
|
|
3664
|
+
* See `TextStyle::line_clamp`; `null` removes the base's.
|
|
3665
|
+
*/
|
|
3666
|
+
readonly line_clamp?: LineClamp | null;
|
|
3077
3667
|
/**
|
|
3078
3668
|
* See `TextStyle::line_height`.
|
|
3079
3669
|
*/
|
|
3080
3670
|
readonly line_height?: number | null;
|
|
3671
|
+
/**
|
|
3672
|
+
* See `TextStyle::max_height`; `null` removes the base's.
|
|
3673
|
+
*/
|
|
3674
|
+
readonly max_height?: number | null;
|
|
3081
3675
|
/**
|
|
3082
3676
|
* See `TextStyle::max_width`.
|
|
3083
3677
|
*/
|
|
@@ -3317,6 +3911,11 @@ export interface VisualProperties {
|
|
|
3317
3911
|
* @defaultValue `{"x":0.5,"y":0.5}`
|
|
3318
3912
|
*/
|
|
3319
3913
|
readonly anchor?: Vec2;
|
|
3914
|
+
/**
|
|
3915
|
+
* A `similarity` data set moving the clip's own picture, applied before this transform.
|
|
3916
|
+
* Clip visuals only.
|
|
3917
|
+
*/
|
|
3918
|
+
readonly correction?: CorrectionRef | null;
|
|
3320
3919
|
/**
|
|
3321
3920
|
* Animated opacity constrained to `0..=1`.
|
|
3322
3921
|
*
|