alpha2 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/frame-supply.d.ts +28 -0
- package/dist/frame-supply.js +161 -23
- package/dist/generated/project-schema.d.ts +420 -5
- package/dist/generated/project-schema.js +60 -0
- package/dist/generated/project-shape.js +489 -9
- package/dist/hdr-frames.d.ts +16 -6
- package/dist/hdr-frames.js +47 -39
- package/dist/layout-values.d.ts +96 -0
- package/dist/layout-values.js +370 -0
- package/dist/layout.d.ts +167 -0
- package/dist/layout.js +199 -0
- package/dist/mediabunny.d.ts +3 -1
- package/dist/mediabunny.js +17 -1
- package/dist/project.d.ts +56 -1
- package/dist/project.js +850 -11
- package/package.json +5 -1
- package/wasm/alpha2_extensions_bg.wasm +0 -0
- package/wasm/alpha2_wasm.d.ts +27 -6
- package/wasm/alpha2_wasm.js +79 -33
- package/wasm/alpha2_wasm_bg.wasm +0 -0
- package/wasm/alpha2_wasm_bg.wasm.d.ts +4 -3
- package/wasm/rust-crate-licenses.md +1 -1
- /package/wasm/snippets/{alpha2-wasm-7f557ec9a60cc69b → alpha2-wasm-d60137a7bad549ac}/inline0.js +0 -0
- /package/wasm/snippets/{alpha2-wasm-7f557ec9a60cc69b → alpha2-wasm-d60137a7bad549ac}/inline1.js +0 -0
- /package/wasm/snippets/{alpha2-wasm-7f557ec9a60cc69b → alpha2-wasm-d60137a7bad549ac}/inline2.js +0 -0
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
/** The project schema's shape rules, without its documentation. */
|
|
4
4
|
export const PROJECT_SHAPE = {
|
|
5
5
|
$defs: {
|
|
6
|
+
AlignContent: {
|
|
7
|
+
oneOf: [
|
|
8
|
+
{ const: "start", type: "string" },
|
|
9
|
+
{ const: "center", type: "string" },
|
|
10
|
+
{ const: "end", type: "string" },
|
|
11
|
+
{ const: "space_between", type: "string" },
|
|
12
|
+
{ const: "space_around", type: "string" },
|
|
13
|
+
{ const: "space_evenly", type: "string" },
|
|
14
|
+
{ const: "stretch", type: "string" },
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
AlignItems: {
|
|
18
|
+
oneOf: [
|
|
19
|
+
{ const: "start", type: "string" },
|
|
20
|
+
{ const: "center", type: "string" },
|
|
21
|
+
{ const: "end", type: "string" },
|
|
22
|
+
{ const: "stretch", type: "string" },
|
|
23
|
+
],
|
|
24
|
+
},
|
|
6
25
|
AnimatedPoint: {
|
|
7
26
|
oneOf: [
|
|
8
27
|
{
|
|
@@ -53,6 +72,106 @@ export const PROJECT_SHAPE = {
|
|
|
53
72
|
},
|
|
54
73
|
],
|
|
55
74
|
},
|
|
75
|
+
Animated_Insets: {
|
|
76
|
+
oneOf: [
|
|
77
|
+
{
|
|
78
|
+
additionalProperties: false,
|
|
79
|
+
properties: {
|
|
80
|
+
mode: { const: "constant", type: "string" },
|
|
81
|
+
value: { $ref: "#/$defs/Insets" },
|
|
82
|
+
},
|
|
83
|
+
required: ["mode", "value"],
|
|
84
|
+
type: "object",
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
additionalProperties: false,
|
|
88
|
+
properties: {
|
|
89
|
+
keyframes: {
|
|
90
|
+
items: { $ref: "#/$defs/Keyframe_Insets" },
|
|
91
|
+
type: "array",
|
|
92
|
+
},
|
|
93
|
+
mode: { const: "keyframes", type: "string" },
|
|
94
|
+
},
|
|
95
|
+
required: ["mode", "keyframes"],
|
|
96
|
+
type: "object",
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
Animated_LayoutLength: {
|
|
101
|
+
oneOf: [
|
|
102
|
+
{
|
|
103
|
+
additionalProperties: false,
|
|
104
|
+
properties: {
|
|
105
|
+
mode: { const: "constant", type: "string" },
|
|
106
|
+
value: { $ref: "#/$defs/LayoutLength" },
|
|
107
|
+
},
|
|
108
|
+
required: ["mode", "value"],
|
|
109
|
+
type: "object",
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
additionalProperties: false,
|
|
113
|
+
properties: {
|
|
114
|
+
keyframes: {
|
|
115
|
+
items: { $ref: "#/$defs/Keyframe_LayoutLength" },
|
|
116
|
+
type: "array",
|
|
117
|
+
},
|
|
118
|
+
mode: { const: "keyframes", type: "string" },
|
|
119
|
+
},
|
|
120
|
+
required: ["mode", "keyframes"],
|
|
121
|
+
type: "object",
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
},
|
|
125
|
+
Animated_LayoutOffset: {
|
|
126
|
+
oneOf: [
|
|
127
|
+
{
|
|
128
|
+
additionalProperties: false,
|
|
129
|
+
properties: {
|
|
130
|
+
mode: { const: "constant", type: "string" },
|
|
131
|
+
value: { $ref: "#/$defs/LayoutOffset" },
|
|
132
|
+
},
|
|
133
|
+
required: ["mode", "value"],
|
|
134
|
+
type: "object",
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
additionalProperties: false,
|
|
138
|
+
properties: {
|
|
139
|
+
keyframes: {
|
|
140
|
+
items: { $ref: "#/$defs/Keyframe_LayoutOffset" },
|
|
141
|
+
type: "array",
|
|
142
|
+
},
|
|
143
|
+
mode: { const: "keyframes", type: "string" },
|
|
144
|
+
},
|
|
145
|
+
required: ["mode", "keyframes"],
|
|
146
|
+
type: "object",
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
},
|
|
150
|
+
Animated_LayoutSize: {
|
|
151
|
+
oneOf: [
|
|
152
|
+
{
|
|
153
|
+
additionalProperties: false,
|
|
154
|
+
properties: {
|
|
155
|
+
mode: { const: "constant", type: "string" },
|
|
156
|
+
value: { $ref: "#/$defs/LayoutSize" },
|
|
157
|
+
},
|
|
158
|
+
required: ["mode", "value"],
|
|
159
|
+
type: "object",
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
additionalProperties: false,
|
|
163
|
+
properties: {
|
|
164
|
+
keyframes: {
|
|
165
|
+
items: { $ref: "#/$defs/Keyframe_LayoutSize" },
|
|
166
|
+
type: "array",
|
|
167
|
+
},
|
|
168
|
+
mode: { const: "keyframes", type: "string" },
|
|
169
|
+
},
|
|
170
|
+
required: ["mode", "keyframes"],
|
|
171
|
+
type: "object",
|
|
172
|
+
},
|
|
173
|
+
],
|
|
174
|
+
},
|
|
56
175
|
Animated_Paint: {
|
|
57
176
|
oneOf: [
|
|
58
177
|
{
|
|
@@ -153,6 +272,31 @@ export const PROJECT_SHAPE = {
|
|
|
153
272
|
},
|
|
154
273
|
],
|
|
155
274
|
},
|
|
275
|
+
Animated_string: {
|
|
276
|
+
oneOf: [
|
|
277
|
+
{
|
|
278
|
+
additionalProperties: false,
|
|
279
|
+
properties: {
|
|
280
|
+
mode: { const: "constant", type: "string" },
|
|
281
|
+
value: { type: "string" },
|
|
282
|
+
},
|
|
283
|
+
required: ["mode", "value"],
|
|
284
|
+
type: "object",
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
additionalProperties: false,
|
|
288
|
+
properties: {
|
|
289
|
+
keyframes: {
|
|
290
|
+
items: { $ref: "#/$defs/Keyframe_string" },
|
|
291
|
+
type: "array",
|
|
292
|
+
},
|
|
293
|
+
mode: { const: "keyframes", type: "string" },
|
|
294
|
+
},
|
|
295
|
+
required: ["mode", "keyframes"],
|
|
296
|
+
type: "object",
|
|
297
|
+
},
|
|
298
|
+
],
|
|
299
|
+
},
|
|
156
300
|
AudioEffect: {
|
|
157
301
|
oneOf: [
|
|
158
302
|
{
|
|
@@ -436,6 +580,12 @@ export const PROJECT_SHAPE = {
|
|
|
436
580
|
required: ["pattern"],
|
|
437
581
|
type: "object",
|
|
438
582
|
},
|
|
583
|
+
Display: {
|
|
584
|
+
oneOf: [
|
|
585
|
+
{ const: "flex", type: "string" },
|
|
586
|
+
{ const: "grid", type: "string" },
|
|
587
|
+
],
|
|
588
|
+
},
|
|
439
589
|
Ducking: {
|
|
440
590
|
additionalProperties: false,
|
|
441
591
|
properties: {
|
|
@@ -602,6 +752,20 @@ export const PROJECT_SHAPE = {
|
|
|
602
752
|
{ const: "evenodd", type: "string" },
|
|
603
753
|
],
|
|
604
754
|
},
|
|
755
|
+
FlexDirection: {
|
|
756
|
+
oneOf: [
|
|
757
|
+
{ const: "row", type: "string" },
|
|
758
|
+
{ const: "column", type: "string" },
|
|
759
|
+
{ const: "row_reverse", type: "string" },
|
|
760
|
+
{ const: "column_reverse", type: "string" },
|
|
761
|
+
],
|
|
762
|
+
},
|
|
763
|
+
FlexWrap: {
|
|
764
|
+
oneOf: [
|
|
765
|
+
{ const: "nowrap", type: "string" },
|
|
766
|
+
{ const: "wrap", type: "string" },
|
|
767
|
+
],
|
|
768
|
+
},
|
|
605
769
|
FrameRate: {
|
|
606
770
|
additionalProperties: false,
|
|
607
771
|
properties: {
|
|
@@ -651,6 +815,15 @@ export const PROJECT_SHAPE = {
|
|
|
651
815
|
required: ["type", "text"],
|
|
652
816
|
type: "object",
|
|
653
817
|
},
|
|
818
|
+
{
|
|
819
|
+
additionalProperties: false,
|
|
820
|
+
properties: {
|
|
821
|
+
root: { $ref: "#/$defs/LayoutNode" },
|
|
822
|
+
type: { const: "layout", type: "string" },
|
|
823
|
+
},
|
|
824
|
+
required: ["type", "root"],
|
|
825
|
+
type: "object",
|
|
826
|
+
},
|
|
654
827
|
],
|
|
655
828
|
},
|
|
656
829
|
GradientStop: {
|
|
@@ -662,12 +835,45 @@ export const PROJECT_SHAPE = {
|
|
|
662
835
|
required: ["offset", "color"],
|
|
663
836
|
type: "object",
|
|
664
837
|
},
|
|
838
|
+
GridAutoFlow: {
|
|
839
|
+
oneOf: [
|
|
840
|
+
{ const: "row", type: "string" },
|
|
841
|
+
{ const: "column", type: "string" },
|
|
842
|
+
{ const: "row_dense", type: "string" },
|
|
843
|
+
{ const: "column_dense", type: "string" },
|
|
844
|
+
],
|
|
845
|
+
},
|
|
846
|
+
GridPlacement: {
|
|
847
|
+
anyOf: [
|
|
848
|
+
{ maximum: 32767, minimum: -32768, type: "integer" },
|
|
849
|
+
{ type: "string" },
|
|
850
|
+
],
|
|
851
|
+
},
|
|
665
852
|
HdrSources: {
|
|
666
853
|
oneOf: [
|
|
667
854
|
{ const: "tone_map", type: "string" },
|
|
668
855
|
{ const: "reject", type: "string" },
|
|
669
856
|
],
|
|
670
857
|
},
|
|
858
|
+
Insets: {
|
|
859
|
+
anyOf: [
|
|
860
|
+
{ format: "float", type: "number" },
|
|
861
|
+
{
|
|
862
|
+
pattern: "^ *-?(\\d+\\.?\\d*|\\.\\d+)(px)?( +-?(\\d+\\.?\\d*|\\.\\d+)(px)?){0,3} *$",
|
|
863
|
+
type: "string",
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
additionalProperties: false,
|
|
867
|
+
properties: {
|
|
868
|
+
bottom: { $ref: "#/$defs/LayoutSize" },
|
|
869
|
+
left: { $ref: "#/$defs/LayoutSize" },
|
|
870
|
+
right: { $ref: "#/$defs/LayoutSize" },
|
|
871
|
+
top: { $ref: "#/$defs/LayoutSize" },
|
|
872
|
+
},
|
|
873
|
+
type: "object",
|
|
874
|
+
},
|
|
875
|
+
],
|
|
876
|
+
},
|
|
671
877
|
Interpolation: {
|
|
672
878
|
oneOf: [
|
|
673
879
|
{
|
|
@@ -696,6 +902,16 @@ export const PROJECT_SHAPE = {
|
|
|
696
902
|
},
|
|
697
903
|
],
|
|
698
904
|
},
|
|
905
|
+
JustifyContent: {
|
|
906
|
+
oneOf: [
|
|
907
|
+
{ const: "start", type: "string" },
|
|
908
|
+
{ const: "center", type: "string" },
|
|
909
|
+
{ const: "end", type: "string" },
|
|
910
|
+
{ const: "space_between", type: "string" },
|
|
911
|
+
{ const: "space_around", type: "string" },
|
|
912
|
+
{ const: "space_evenly", type: "string" },
|
|
913
|
+
],
|
|
914
|
+
},
|
|
699
915
|
Keyframe_EffectValue: {
|
|
700
916
|
additionalProperties: false,
|
|
701
917
|
properties: {
|
|
@@ -706,6 +922,46 @@ export const PROJECT_SHAPE = {
|
|
|
706
922
|
required: ["time", "value", "interpolation"],
|
|
707
923
|
type: "object",
|
|
708
924
|
},
|
|
925
|
+
Keyframe_Insets: {
|
|
926
|
+
additionalProperties: false,
|
|
927
|
+
properties: {
|
|
928
|
+
interpolation: { $ref: "#/$defs/Interpolation" },
|
|
929
|
+
time: { $ref: "#/$defs/MediaTime" },
|
|
930
|
+
value: { $ref: "#/$defs/Insets" },
|
|
931
|
+
},
|
|
932
|
+
required: ["time", "value", "interpolation"],
|
|
933
|
+
type: "object",
|
|
934
|
+
},
|
|
935
|
+
Keyframe_LayoutLength: {
|
|
936
|
+
additionalProperties: false,
|
|
937
|
+
properties: {
|
|
938
|
+
interpolation: { $ref: "#/$defs/Interpolation" },
|
|
939
|
+
time: { $ref: "#/$defs/MediaTime" },
|
|
940
|
+
value: { $ref: "#/$defs/LayoutLength" },
|
|
941
|
+
},
|
|
942
|
+
required: ["time", "value", "interpolation"],
|
|
943
|
+
type: "object",
|
|
944
|
+
},
|
|
945
|
+
Keyframe_LayoutOffset: {
|
|
946
|
+
additionalProperties: false,
|
|
947
|
+
properties: {
|
|
948
|
+
interpolation: { $ref: "#/$defs/Interpolation" },
|
|
949
|
+
time: { $ref: "#/$defs/MediaTime" },
|
|
950
|
+
value: { $ref: "#/$defs/LayoutOffset" },
|
|
951
|
+
},
|
|
952
|
+
required: ["time", "value", "interpolation"],
|
|
953
|
+
type: "object",
|
|
954
|
+
},
|
|
955
|
+
Keyframe_LayoutSize: {
|
|
956
|
+
additionalProperties: false,
|
|
957
|
+
properties: {
|
|
958
|
+
interpolation: { $ref: "#/$defs/Interpolation" },
|
|
959
|
+
time: { $ref: "#/$defs/MediaTime" },
|
|
960
|
+
value: { $ref: "#/$defs/LayoutSize" },
|
|
961
|
+
},
|
|
962
|
+
required: ["time", "value", "interpolation"],
|
|
963
|
+
type: "object",
|
|
964
|
+
},
|
|
709
965
|
Keyframe_Paint: {
|
|
710
966
|
additionalProperties: false,
|
|
711
967
|
properties: {
|
|
@@ -746,6 +1002,208 @@ export const PROJECT_SHAPE = {
|
|
|
746
1002
|
required: ["time", "value", "interpolation"],
|
|
747
1003
|
type: "object",
|
|
748
1004
|
},
|
|
1005
|
+
Keyframe_string: {
|
|
1006
|
+
additionalProperties: false,
|
|
1007
|
+
properties: {
|
|
1008
|
+
interpolation: { $ref: "#/$defs/Interpolation" },
|
|
1009
|
+
time: { $ref: "#/$defs/MediaTime" },
|
|
1010
|
+
value: { type: "string" },
|
|
1011
|
+
},
|
|
1012
|
+
required: ["time", "value", "interpolation"],
|
|
1013
|
+
type: "object",
|
|
1014
|
+
},
|
|
1015
|
+
LayoutBorder: {
|
|
1016
|
+
additionalProperties: false,
|
|
1017
|
+
properties: {
|
|
1018
|
+
paint: { $ref: "#/$defs/Animated_Paint" },
|
|
1019
|
+
width: { $ref: "#/$defs/Animated_LayoutSize" },
|
|
1020
|
+
},
|
|
1021
|
+
required: ["width", "paint"],
|
|
1022
|
+
type: "object",
|
|
1023
|
+
},
|
|
1024
|
+
LayoutInset: {
|
|
1025
|
+
additionalProperties: false,
|
|
1026
|
+
properties: {
|
|
1027
|
+
bottom: {
|
|
1028
|
+
anyOf: [{ $ref: "#/$defs/Animated_LayoutLength" }, { type: "null" }],
|
|
1029
|
+
},
|
|
1030
|
+
left: {
|
|
1031
|
+
anyOf: [{ $ref: "#/$defs/Animated_LayoutLength" }, { type: "null" }],
|
|
1032
|
+
},
|
|
1033
|
+
right: {
|
|
1034
|
+
anyOf: [{ $ref: "#/$defs/Animated_LayoutLength" }, { type: "null" }],
|
|
1035
|
+
},
|
|
1036
|
+
top: {
|
|
1037
|
+
anyOf: [{ $ref: "#/$defs/Animated_LayoutLength" }, { type: "null" }],
|
|
1038
|
+
},
|
|
1039
|
+
},
|
|
1040
|
+
type: "object",
|
|
1041
|
+
},
|
|
1042
|
+
LayoutLength: {
|
|
1043
|
+
anyOf: [
|
|
1044
|
+
{ format: "float", type: "number" },
|
|
1045
|
+
{ pattern: "^ *-?(\\d+\\.?\\d*|\\.\\d+)(px|%)? *$", type: "string" },
|
|
1046
|
+
],
|
|
1047
|
+
},
|
|
1048
|
+
LayoutNode: {
|
|
1049
|
+
additionalProperties: false,
|
|
1050
|
+
properties: {
|
|
1051
|
+
align_content: {
|
|
1052
|
+
anyOf: [{ $ref: "#/$defs/AlignContent" }, { type: "null" }],
|
|
1053
|
+
},
|
|
1054
|
+
align_items: {
|
|
1055
|
+
anyOf: [{ $ref: "#/$defs/AlignItems" }, { type: "null" }],
|
|
1056
|
+
},
|
|
1057
|
+
align_self: {
|
|
1058
|
+
anyOf: [{ $ref: "#/$defs/AlignItems" }, { type: "null" }],
|
|
1059
|
+
},
|
|
1060
|
+
aspect_ratio: { format: "float", type: ["number", "null"] },
|
|
1061
|
+
background: {
|
|
1062
|
+
anyOf: [{ $ref: "#/$defs/Animated_Paint" }, { type: "null" }],
|
|
1063
|
+
},
|
|
1064
|
+
border: { anyOf: [{ $ref: "#/$defs/LayoutBorder" }, { type: "null" }] },
|
|
1065
|
+
border_radius: {
|
|
1066
|
+
anyOf: [{ $ref: "#/$defs/Animated_LayoutSize" }, { type: "null" }],
|
|
1067
|
+
},
|
|
1068
|
+
children: { items: { $ref: "#/$defs/LayoutNode" }, type: "array" },
|
|
1069
|
+
color: { anyOf: [{ $ref: "#/$defs/Rgba" }, { type: "null" }] },
|
|
1070
|
+
column_gap: {
|
|
1071
|
+
anyOf: [{ $ref: "#/$defs/Animated_LayoutSize" }, { type: "null" }],
|
|
1072
|
+
},
|
|
1073
|
+
display: { anyOf: [{ $ref: "#/$defs/Display" }, { type: "null" }] },
|
|
1074
|
+
flex_basis: {
|
|
1075
|
+
anyOf: [{ $ref: "#/$defs/Animated_LayoutLength" }, { type: "null" }],
|
|
1076
|
+
},
|
|
1077
|
+
flex_direction: {
|
|
1078
|
+
anyOf: [{ $ref: "#/$defs/FlexDirection" }, { type: "null" }],
|
|
1079
|
+
},
|
|
1080
|
+
flex_grow: {
|
|
1081
|
+
anyOf: [{ $ref: "#/$defs/Animated_float" }, { type: "null" }],
|
|
1082
|
+
},
|
|
1083
|
+
flex_shrink: {
|
|
1084
|
+
anyOf: [{ $ref: "#/$defs/Animated_float" }, { type: "null" }],
|
|
1085
|
+
},
|
|
1086
|
+
flex_wrap: { anyOf: [{ $ref: "#/$defs/FlexWrap" }, { type: "null" }] },
|
|
1087
|
+
font_family: { type: ["string", "null"] },
|
|
1088
|
+
font_size: {
|
|
1089
|
+
anyOf: [{ $ref: "#/$defs/Animated_LayoutSize" }, { type: "null" }],
|
|
1090
|
+
},
|
|
1091
|
+
gap: {
|
|
1092
|
+
anyOf: [{ $ref: "#/$defs/Animated_LayoutSize" }, { type: "null" }],
|
|
1093
|
+
},
|
|
1094
|
+
grid_auto_columns: {
|
|
1095
|
+
anyOf: [{ $ref: "#/$defs/TrackList" }, { type: "null" }],
|
|
1096
|
+
},
|
|
1097
|
+
grid_auto_flow: {
|
|
1098
|
+
anyOf: [{ $ref: "#/$defs/GridAutoFlow" }, { type: "null" }],
|
|
1099
|
+
},
|
|
1100
|
+
grid_auto_rows: {
|
|
1101
|
+
anyOf: [{ $ref: "#/$defs/TrackList" }, { type: "null" }],
|
|
1102
|
+
},
|
|
1103
|
+
grid_column: {
|
|
1104
|
+
anyOf: [{ $ref: "#/$defs/GridPlacement" }, { type: "null" }],
|
|
1105
|
+
},
|
|
1106
|
+
grid_row: {
|
|
1107
|
+
anyOf: [{ $ref: "#/$defs/GridPlacement" }, { type: "null" }],
|
|
1108
|
+
},
|
|
1109
|
+
grid_template_columns: {
|
|
1110
|
+
anyOf: [{ $ref: "#/$defs/TrackList" }, { type: "null" }],
|
|
1111
|
+
},
|
|
1112
|
+
grid_template_rows: {
|
|
1113
|
+
anyOf: [{ $ref: "#/$defs/TrackList" }, { type: "null" }],
|
|
1114
|
+
},
|
|
1115
|
+
height: {
|
|
1116
|
+
anyOf: [{ $ref: "#/$defs/Animated_LayoutLength" }, { type: "null" }],
|
|
1117
|
+
},
|
|
1118
|
+
inset: { anyOf: [{ $ref: "#/$defs/LayoutInset" }, { type: "null" }] },
|
|
1119
|
+
justify_content: {
|
|
1120
|
+
anyOf: [{ $ref: "#/$defs/JustifyContent" }, { type: "null" }],
|
|
1121
|
+
},
|
|
1122
|
+
justify_items: {
|
|
1123
|
+
anyOf: [{ $ref: "#/$defs/AlignItems" }, { type: "null" }],
|
|
1124
|
+
},
|
|
1125
|
+
justify_self: {
|
|
1126
|
+
anyOf: [{ $ref: "#/$defs/AlignItems" }, { type: "null" }],
|
|
1127
|
+
},
|
|
1128
|
+
line_height: { format: "float", type: ["number", "null"] },
|
|
1129
|
+
margin: {
|
|
1130
|
+
anyOf: [{ $ref: "#/$defs/Animated_Insets" }, { type: "null" }],
|
|
1131
|
+
},
|
|
1132
|
+
max_height: {
|
|
1133
|
+
anyOf: [{ $ref: "#/$defs/Animated_LayoutLength" }, { type: "null" }],
|
|
1134
|
+
},
|
|
1135
|
+
max_width: {
|
|
1136
|
+
anyOf: [{ $ref: "#/$defs/Animated_LayoutLength" }, { type: "null" }],
|
|
1137
|
+
},
|
|
1138
|
+
min_height: {
|
|
1139
|
+
anyOf: [{ $ref: "#/$defs/Animated_LayoutLength" }, { type: "null" }],
|
|
1140
|
+
},
|
|
1141
|
+
min_width: {
|
|
1142
|
+
anyOf: [{ $ref: "#/$defs/Animated_LayoutLength" }, { type: "null" }],
|
|
1143
|
+
},
|
|
1144
|
+
opacity: {
|
|
1145
|
+
anyOf: [{ $ref: "#/$defs/Animated_float" }, { type: "null" }],
|
|
1146
|
+
},
|
|
1147
|
+
outline: { anyOf: [{ $ref: "#/$defs/TextOutline" }, { type: "null" }] },
|
|
1148
|
+
overflow: { anyOf: [{ $ref: "#/$defs/Overflow" }, { type: "null" }] },
|
|
1149
|
+
padding: {
|
|
1150
|
+
anyOf: [{ $ref: "#/$defs/Animated_Insets" }, { type: "null" }],
|
|
1151
|
+
},
|
|
1152
|
+
position: { anyOf: [{ $ref: "#/$defs/Position" }, { type: "null" }] },
|
|
1153
|
+
rotation_degrees: {
|
|
1154
|
+
anyOf: [{ $ref: "#/$defs/Animated_float" }, { type: "null" }],
|
|
1155
|
+
},
|
|
1156
|
+
row_gap: {
|
|
1157
|
+
anyOf: [{ $ref: "#/$defs/Animated_LayoutSize" }, { type: "null" }],
|
|
1158
|
+
},
|
|
1159
|
+
scale: { anyOf: [{ $ref: "#/$defs/Animated_Vec2" }, { type: "null" }] },
|
|
1160
|
+
shape: { anyOf: [{ $ref: "#/$defs/LayoutShape" }, { type: "null" }] },
|
|
1161
|
+
text: {
|
|
1162
|
+
anyOf: [{ $ref: "#/$defs/Animated_string" }, { type: "null" }],
|
|
1163
|
+
},
|
|
1164
|
+
text_align: {
|
|
1165
|
+
anyOf: [{ $ref: "#/$defs/TextAlign" }, { type: "null" }],
|
|
1166
|
+
},
|
|
1167
|
+
translate: {
|
|
1168
|
+
anyOf: [{ $ref: "#/$defs/Animated_LayoutOffset" }, { type: "null" }],
|
|
1169
|
+
},
|
|
1170
|
+
width: {
|
|
1171
|
+
anyOf: [{ $ref: "#/$defs/Animated_LayoutLength" }, { type: "null" }],
|
|
1172
|
+
},
|
|
1173
|
+
},
|
|
1174
|
+
type: "object",
|
|
1175
|
+
},
|
|
1176
|
+
LayoutOffset: {
|
|
1177
|
+
anyOf: [
|
|
1178
|
+
{
|
|
1179
|
+
pattern: "^ *-?(\\d+\\.?\\d*|\\.\\d+)(px)?( +-?(\\d+\\.?\\d*|\\.\\d+)(px)?)? *$",
|
|
1180
|
+
type: "string",
|
|
1181
|
+
},
|
|
1182
|
+
{
|
|
1183
|
+
additionalProperties: false,
|
|
1184
|
+
properties: {
|
|
1185
|
+
x: { $ref: "#/$defs/LayoutSize" },
|
|
1186
|
+
y: { $ref: "#/$defs/LayoutSize" },
|
|
1187
|
+
},
|
|
1188
|
+
required: ["x", "y"],
|
|
1189
|
+
type: "object",
|
|
1190
|
+
},
|
|
1191
|
+
],
|
|
1192
|
+
},
|
|
1193
|
+
LayoutShape: {
|
|
1194
|
+
additionalProperties: false,
|
|
1195
|
+
properties: {
|
|
1196
|
+
items: { items: { $ref: "#/$defs/ShapeItem" }, type: "array" },
|
|
1197
|
+
},
|
|
1198
|
+
required: ["items"],
|
|
1199
|
+
type: "object",
|
|
1200
|
+
},
|
|
1201
|
+
LayoutSize: {
|
|
1202
|
+
anyOf: [
|
|
1203
|
+
{ format: "float", type: "number" },
|
|
1204
|
+
{ pattern: "^ *-?(\\d+\\.?\\d*|\\.\\d+)(px)? *$", type: "string" },
|
|
1205
|
+
],
|
|
1206
|
+
},
|
|
749
1207
|
Limiter: {
|
|
750
1208
|
additionalProperties: false,
|
|
751
1209
|
properties: {
|
|
@@ -1019,6 +1477,12 @@ export const PROJECT_SHAPE = {
|
|
|
1019
1477
|
},
|
|
1020
1478
|
],
|
|
1021
1479
|
},
|
|
1480
|
+
Overflow: {
|
|
1481
|
+
oneOf: [
|
|
1482
|
+
{ const: "visible", type: "string" },
|
|
1483
|
+
{ const: "hidden", type: "string" },
|
|
1484
|
+
],
|
|
1485
|
+
},
|
|
1022
1486
|
Paint: {
|
|
1023
1487
|
oneOf: [
|
|
1024
1488
|
{
|
|
@@ -1065,6 +1529,7 @@ export const PROJECT_SHAPE = {
|
|
|
1065
1529
|
required: ["type", "center", "stops"],
|
|
1066
1530
|
type: "object",
|
|
1067
1531
|
},
|
|
1532
|
+
{ $ref: "#/$defs/Rgba" },
|
|
1068
1533
|
],
|
|
1069
1534
|
},
|
|
1070
1535
|
Path: {
|
|
@@ -1103,6 +1568,12 @@ export const PROJECT_SHAPE = {
|
|
|
1103
1568
|
{ const: "polygon", type: "string" },
|
|
1104
1569
|
],
|
|
1105
1570
|
},
|
|
1571
|
+
Position: {
|
|
1572
|
+
oneOf: [
|
|
1573
|
+
{ const: "relative", type: "string" },
|
|
1574
|
+
{ const: "absolute", type: "string" },
|
|
1575
|
+
],
|
|
1576
|
+
},
|
|
1106
1577
|
ProjectId: { minLength: 1, type: "string" },
|
|
1107
1578
|
ProjectSettings: {
|
|
1108
1579
|
additionalProperties: false,
|
|
@@ -1195,15 +1666,23 @@ export const PROJECT_SHAPE = {
|
|
|
1195
1666
|
type: "object",
|
|
1196
1667
|
},
|
|
1197
1668
|
Rgba: {
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1669
|
+
anyOf: [
|
|
1670
|
+
{
|
|
1671
|
+
additionalProperties: false,
|
|
1672
|
+
properties: {
|
|
1673
|
+
alpha: { format: "float", type: "number" },
|
|
1674
|
+
blue: { format: "float", type: "number" },
|
|
1675
|
+
green: { format: "float", type: "number" },
|
|
1676
|
+
red: { format: "float", type: "number" },
|
|
1677
|
+
},
|
|
1678
|
+
required: ["red", "green", "blue", "alpha"],
|
|
1679
|
+
type: "object",
|
|
1680
|
+
},
|
|
1681
|
+
{
|
|
1682
|
+
pattern: "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
|
|
1683
|
+
type: "string",
|
|
1684
|
+
},
|
|
1685
|
+
],
|
|
1207
1686
|
},
|
|
1208
1687
|
ShapeGeometry: {
|
|
1209
1688
|
oneOf: [
|
|
@@ -1559,6 +2038,7 @@ export const PROJECT_SHAPE = {
|
|
|
1559
2038
|
{ const: "caption", type: "string" },
|
|
1560
2039
|
],
|
|
1561
2040
|
},
|
|
2041
|
+
TrackList: { type: "string" },
|
|
1562
2042
|
TransferFunction: {
|
|
1563
2043
|
oneOf: [
|
|
1564
2044
|
{ const: "bt709", type: "string" },
|
package/dist/hdr-frames.d.ts
CHANGED
|
@@ -2,6 +2,13 @@ import type { ChromaSiting } from "./chroma-siting.js";
|
|
|
2
2
|
import type { FrameUploadReceipt } from "./effects.js";
|
|
3
3
|
import type { ColorMetadata } from "./generated/project-schema.js";
|
|
4
4
|
export { type ChromaSiting, chromaSitingForCodec, chromaSitingForStream, type SampleAspect, sampleAspectForStream, } from "./chroma-siting.js";
|
|
5
|
+
/** What a planar copy carries of its frame's identity beyond the frame itself. */
|
|
6
|
+
export interface PlanarFrameIdentity {
|
|
7
|
+
readonly physicalTimeMicroseconds?: number;
|
|
8
|
+
readonly rotation?: 0 | 90 | 180 | 270;
|
|
9
|
+
readonly mirror?: boolean;
|
|
10
|
+
readonly chromaSiting?: ChromaSiting;
|
|
11
|
+
}
|
|
5
12
|
/** A decoded frame copied out as planar YUV, with the color it carries. */
|
|
6
13
|
export interface PlanarYuvFrame {
|
|
7
14
|
readonly kind: "yuv-frame";
|
|
@@ -103,12 +110,15 @@ export declare class PlanarCopyPool {
|
|
|
103
110
|
* With `pool`, the copy's `data` is a buffer from it, which the caller gives back with
|
|
104
111
|
* {@link PlanarCopyPool.release} after uploading; a failed copy gives it back itself.
|
|
105
112
|
*/
|
|
106
|
-
export declare function copyPlanarYuvFrame(frame: VideoFrame, declared: ColorMetadata | null, identity?:
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
113
|
+
export declare function copyPlanarYuvFrame(frame: VideoFrame, declared: ColorMetadata | null, identity?: PlanarFrameIdentity, pool?: PlanarCopyPool): Promise<PlanarYuvFrame>;
|
|
114
|
+
/**
|
|
115
|
+
* {@link copyPlanarYuvFrame} without closing `frame`: the caller owns it whether the copy succeeds
|
|
116
|
+
* or not, so a frame whose planes the browser could not read back can be read again. Rejects as
|
|
117
|
+
* {@link copyPlanarYuvFrame} does; with `pool`, a failed copy gives its buffer back.
|
|
118
|
+
*
|
|
119
|
+
* @internal For `FrameSupply`.
|
|
120
|
+
*/
|
|
121
|
+
export declare function readPlanarYuvFrame(frame: VideoFrame, declared: ColorMetadata | null, identity?: PlanarFrameIdentity, pool?: PlanarCopyPool): Promise<PlanarYuvFrame>;
|
|
112
122
|
/**
|
|
113
123
|
* Uploads a planar frame for the engine to convert and present at
|
|
114
124
|
* `outputWidth` x `outputHeight`, the size it is shown upright at. Throws what
|