@shotstack/shotstack-studio 1.10.0 → 2.0.0-beta.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/dist/index.d.ts +7661 -4528
- package/dist/schema/assets/fonts/Montserrat.ttf +0 -0
- package/dist/schema/assets/fonts/OpenSans.ttf +0 -0
- package/dist/schema/assets/fonts/Roboto.ttf +0 -0
- package/dist/schema/assets/fonts/WorkSans.ttf +0 -0
- package/dist/schema/index.cjs +1 -1
- package/dist/schema/index.d.ts +7661 -4528
- package/dist/schema/index.mjs +288 -191
- package/dist/shotstack-studio.es.js +39229 -19778
- package/dist/shotstack-studio.umd.js +953 -35
- package/package.json +8 -4
- package/readme.md +95 -294
package/dist/schema/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as t from "zod";
|
|
2
|
-
const
|
|
2
|
+
const j = t.enum(["linear", "bezier", "constant"]), v = t.enum([
|
|
3
|
+
"smooth",
|
|
3
4
|
"ease",
|
|
4
5
|
"easeIn",
|
|
5
6
|
"easeOut",
|
|
@@ -28,80 +29,112 @@ const x = t.enum(["linear", "bezier", "constant"]), y = t.enum([
|
|
|
28
29
|
"easeInOutExpo",
|
|
29
30
|
"easeInOutCirc",
|
|
30
31
|
"easeInOutBack"
|
|
31
|
-
]),
|
|
32
|
+
]), n = t.object({
|
|
32
33
|
from: t.number(),
|
|
33
34
|
to: t.number(),
|
|
34
35
|
start: t.number().min(0),
|
|
35
36
|
length: t.number().positive(),
|
|
36
|
-
interpolation:
|
|
37
|
-
easing:
|
|
38
|
-
}).strict(),
|
|
37
|
+
interpolation: j.optional(),
|
|
38
|
+
easing: v.optional()
|
|
39
|
+
}).strict(), I = t.string().url("Invalid audio url format."), C = n.extend({
|
|
39
40
|
from: t.number().min(0).max(1),
|
|
40
41
|
to: t.number().min(0).max(1)
|
|
41
|
-
}).array().or(t.number().min(0).max(1)),
|
|
42
|
+
}).array().or(t.number().min(0).max(1)), k = t.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"]), s = t.object({
|
|
42
43
|
type: t.literal("audio"),
|
|
43
|
-
src:
|
|
44
|
+
src: I,
|
|
44
45
|
trim: t.number().optional(),
|
|
45
|
-
volume:
|
|
46
|
-
effect:
|
|
47
|
-
}).strict(),
|
|
46
|
+
volume: C.optional(),
|
|
47
|
+
effect: k.optional()
|
|
48
|
+
}).strict(), a = t.string().regex(/^#([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})|transparent$/, "Invalid color format."), O = t.object({
|
|
49
|
+
family: t.string().optional(),
|
|
50
|
+
size: t.coerce.number().min(1).max(512).optional(),
|
|
51
|
+
weight: t.number().optional(),
|
|
52
|
+
color: a.optional(),
|
|
53
|
+
lineHeight: t.number().min(0).max(10).optional(),
|
|
54
|
+
opacity: t.number().min(0).max(1).optional()
|
|
55
|
+
}).strict(), T = t.object({
|
|
56
|
+
width: t.number().min(0).max(10).optional(),
|
|
57
|
+
color: a.optional()
|
|
58
|
+
}).strict(), F = t.object({
|
|
59
|
+
color: a.optional(),
|
|
60
|
+
opacity: t.number().min(0).max(1).optional(),
|
|
61
|
+
padding: t.number().min(0).max(100).optional(),
|
|
62
|
+
borderRadius: t.number().min(0).optional()
|
|
63
|
+
}).strict(), R = t.object({
|
|
64
|
+
horizontal: t.enum(["left", "center", "right"]).optional(),
|
|
65
|
+
vertical: t.enum(["top", "center", "bottom"]).optional()
|
|
66
|
+
}).strict(), w = /^alias:\/\/[a-zA-Z0-9_-]+$/, c = t.object({
|
|
67
|
+
type: t.literal("caption"),
|
|
68
|
+
src: t.union([
|
|
69
|
+
t.string().url("Invalid subtitle URL format."),
|
|
70
|
+
t.string().regex(w, "Invalid alias reference format.")
|
|
71
|
+
]),
|
|
72
|
+
font: O.optional(),
|
|
73
|
+
stroke: T.optional(),
|
|
74
|
+
background: F.optional(),
|
|
75
|
+
alignment: R.optional(),
|
|
76
|
+
width: t.number().min(1).optional(),
|
|
77
|
+
height: t.number().min(1).optional(),
|
|
78
|
+
trim: t.number().min(0).optional()
|
|
79
|
+
}).strict(), E = t.enum(["top", "topRight", "right", "bottomRight", "bottom", "bottomLeft", "left", "topLeft", "center"]), m = t.object({
|
|
48
80
|
type: t.literal("html"),
|
|
49
81
|
html: t.string(),
|
|
50
82
|
css: t.string(),
|
|
51
83
|
width: t.number().positive().optional(),
|
|
52
84
|
height: t.number().positive().optional(),
|
|
53
|
-
position:
|
|
54
|
-
}).strict(),
|
|
85
|
+
position: E.optional()
|
|
86
|
+
}).strict(), P = t.string().url("Invalid image url format."), z = t.object({
|
|
55
87
|
top: t.number().min(0).optional(),
|
|
56
88
|
right: t.number().min(0).optional(),
|
|
57
89
|
bottom: t.number().min(0).optional(),
|
|
58
90
|
left: t.number().min(0).optional()
|
|
59
|
-
}).strict(),
|
|
91
|
+
}).strict(), l = t.object({
|
|
60
92
|
type: t.literal("image"),
|
|
61
|
-
src:
|
|
62
|
-
crop:
|
|
63
|
-
}).strict(),
|
|
93
|
+
src: P,
|
|
94
|
+
crop: z.optional()
|
|
95
|
+
}).strict(), L = t.string().url("Invalid luma url format."), u = t.object({
|
|
64
96
|
type: t.literal("luma"),
|
|
65
|
-
src:
|
|
66
|
-
}).strict(),
|
|
97
|
+
src: L
|
|
98
|
+
}).strict(), o = t.string().regex(/^#[A-Fa-f0-9]{6}$/, "Invalid hex color format"), D = t.object({
|
|
67
99
|
offset: t.number().min(0).max(1),
|
|
68
|
-
color:
|
|
69
|
-
}).strict(),
|
|
100
|
+
color: o
|
|
101
|
+
}).strict(), H = t.object({
|
|
70
102
|
type: t.enum(["linear", "radial"]).default("linear"),
|
|
71
103
|
angle: t.number().min(0).max(360).default(0),
|
|
72
|
-
stops: t.array(
|
|
73
|
-
}).strict(),
|
|
104
|
+
stops: t.array(D).min(2)
|
|
105
|
+
}).strict(), V = t.object({
|
|
106
|
+
width: t.number().min(0).default(0),
|
|
107
|
+
color: o.default("#000000"),
|
|
108
|
+
opacity: t.number().min(0).max(1).default(1)
|
|
109
|
+
}).strict(), Q = t.object({
|
|
74
110
|
family: t.string().default("Roboto"),
|
|
75
111
|
size: t.number().min(8).max(500).default(48),
|
|
76
112
|
weight: t.union([t.string(), t.number()]).default("400"),
|
|
77
|
-
color:
|
|
78
|
-
opacity: t.number().min(0).max(1).default(1)
|
|
79
|
-
|
|
113
|
+
color: o.default("#000000"),
|
|
114
|
+
opacity: t.number().min(0).max(1).default(1),
|
|
115
|
+
background: o.optional(),
|
|
116
|
+
stroke: V.optional()
|
|
117
|
+
}).strict(), $ = t.object({
|
|
80
118
|
letterSpacing: t.number().default(0),
|
|
81
119
|
lineHeight: t.number().min(0.1).max(10).default(1.2),
|
|
82
120
|
textTransform: t.enum(["none", "uppercase", "lowercase", "capitalize"]).default("none"),
|
|
83
121
|
textDecoration: t.enum(["none", "underline", "line-through"]).default("none"),
|
|
84
|
-
gradient:
|
|
85
|
-
}).strict(),
|
|
86
|
-
width: t.number().min(0).default(0),
|
|
87
|
-
color: i.default("#000000"),
|
|
88
|
-
opacity: t.number().min(0).max(1).default(1)
|
|
89
|
-
}).strict(), L = t.object({
|
|
122
|
+
gradient: H.optional()
|
|
123
|
+
}).strict(), B = t.object({
|
|
90
124
|
offsetX: t.number().default(0),
|
|
91
125
|
offsetY: t.number().default(0),
|
|
92
126
|
blur: t.number().min(0).default(0),
|
|
93
|
-
color:
|
|
127
|
+
color: o.default("#000000"),
|
|
94
128
|
opacity: t.number().min(0).max(1).default(0.5)
|
|
95
|
-
}).strict(),
|
|
129
|
+
}).strict(), U = t.object({
|
|
96
130
|
width: t.number().min(0).default(0),
|
|
97
|
-
color:
|
|
98
|
-
opacity: t.number().min(0).max(1).default(1)
|
|
99
|
-
}).strict(), z = t.object({
|
|
100
|
-
color: i.optional(),
|
|
131
|
+
color: o.default("#000000"),
|
|
101
132
|
opacity: t.number().min(0).max(1).default(1),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
133
|
+
radius: t.number().min(0).default(0)
|
|
134
|
+
}).strict(), _ = t.object({
|
|
135
|
+
color: o.optional(),
|
|
136
|
+
opacity: t.number().min(0).max(1).default(1)
|
|
137
|
+
}).strict(), M = t.union([
|
|
105
138
|
t.number().min(0),
|
|
106
139
|
t.object({
|
|
107
140
|
top: t.number().min(0).default(0),
|
|
@@ -109,208 +142,272 @@ const x = t.enum(["linear", "bezier", "constant"]), y = t.enum([
|
|
|
109
142
|
bottom: t.number().min(0).default(0),
|
|
110
143
|
left: t.number().min(0).default(0)
|
|
111
144
|
}).strict()
|
|
112
|
-
]),
|
|
145
|
+
]), G = t.object({
|
|
113
146
|
horizontal: t.enum(["left", "center", "right"]).default("left"),
|
|
114
147
|
vertical: t.enum(["top", "middle", "bottom"]).default("middle")
|
|
115
|
-
}).strict(),
|
|
116
|
-
preset: t.enum(["
|
|
117
|
-
speed: t.number().min(0.1).max(10).default(1),
|
|
148
|
+
}).strict(), N = t.object({
|
|
149
|
+
preset: t.enum(["typewriter", "fadeIn", "slideIn", "ascend", "shift", "movingLetters"]),
|
|
118
150
|
duration: t.number().min(0.1).max(60).optional(),
|
|
119
151
|
style: t.enum(["character", "word"]).optional(),
|
|
120
152
|
direction: t.enum(["left", "right", "up", "down"]).optional()
|
|
121
|
-
}).strict(),
|
|
122
|
-
src: t.string().url("Invalid font URL"),
|
|
123
|
-
family: t.string(),
|
|
124
|
-
weight: t.union([t.string(), t.number()]).default("400")
|
|
125
|
-
}).strict(), l = t.object({
|
|
153
|
+
}).strict(), p = t.object({
|
|
126
154
|
type: t.literal("rich-text"),
|
|
127
155
|
text: t.string().max(1e4).default(""),
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
animation: B.optional(),
|
|
138
|
-
customFonts: t.array(U).optional()
|
|
139
|
-
}).strict(), S = t.string().regex(/^#([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})|transparent$/, "Invalid color format."), u = t.object({
|
|
156
|
+
font: Q.optional(),
|
|
157
|
+
style: $.optional(),
|
|
158
|
+
shadow: B.optional(),
|
|
159
|
+
background: _.optional(),
|
|
160
|
+
border: U.optional(),
|
|
161
|
+
padding: M.optional(),
|
|
162
|
+
align: G.optional(),
|
|
163
|
+
animation: N.optional()
|
|
164
|
+
}).strict(), A = t.string().regex(/^#([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})|transparent$/, "Invalid color format."), b = t.object({
|
|
140
165
|
width: t.number().positive(),
|
|
141
166
|
height: t.number().positive()
|
|
142
|
-
}).strict(), p = t.object({
|
|
143
|
-
radius: t.number().positive()
|
|
144
167
|
}).strict(), f = t.object({
|
|
168
|
+
radius: t.number().positive()
|
|
169
|
+
}).strict(), d = t.object({
|
|
145
170
|
length: t.number().positive(),
|
|
146
171
|
thickness: t.number().positive()
|
|
147
|
-
}).strict(),
|
|
148
|
-
color:
|
|
172
|
+
}).strict(), W = t.object({
|
|
173
|
+
color: A,
|
|
149
174
|
opacity: t.number().min(0).max(1)
|
|
150
175
|
}).strict(), K = t.object({
|
|
151
|
-
color:
|
|
152
|
-
width: t.number().
|
|
153
|
-
}).strict(),
|
|
176
|
+
color: A.optional(),
|
|
177
|
+
width: t.number().min(0).optional()
|
|
178
|
+
}).strict(), h = t.object({
|
|
154
179
|
type: t.literal("shape"),
|
|
155
180
|
width: t.number().positive().optional(),
|
|
156
181
|
height: t.number().positive().optional(),
|
|
157
182
|
shape: t.enum(["rectangle", "circle", "line"]),
|
|
158
|
-
fill:
|
|
183
|
+
fill: W.optional(),
|
|
159
184
|
stroke: K.optional(),
|
|
160
|
-
rectangle:
|
|
161
|
-
circle:
|
|
162
|
-
line:
|
|
163
|
-
}).strict().refine((e) => e.shape === "rectangle" ?
|
|
164
|
-
color:
|
|
185
|
+
rectangle: b.optional(),
|
|
186
|
+
circle: f.optional(),
|
|
187
|
+
line: d.optional()
|
|
188
|
+
}).strict().refine((e) => e.shape === "rectangle" ? b.safeParse(e.rectangle) : e.shape === "circle" ? f.safeParse(e.circle) : e.shape === "line" ? d.safeParse(e.line) : !1), r = t.string().regex(/^#([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})|transparent$/, "Invalid color format."), X = t.object({
|
|
189
|
+
color: r.optional(),
|
|
165
190
|
family: t.string().optional(),
|
|
166
|
-
size: t.number().positive().optional(),
|
|
191
|
+
size: t.coerce.number().positive().optional(),
|
|
167
192
|
weight: t.number().optional(),
|
|
168
|
-
lineHeight: t.number().optional()
|
|
169
|
-
|
|
193
|
+
lineHeight: t.number().optional(),
|
|
194
|
+
opacity: t.number().min(0).max(1).optional()
|
|
195
|
+
}).strict(), Y = t.object({
|
|
170
196
|
horizontal: t.enum(["left", "center", "right"]).optional(),
|
|
171
197
|
vertical: t.enum(["top", "center", "bottom"]).optional()
|
|
172
|
-
}).strict(),
|
|
173
|
-
color:
|
|
174
|
-
opacity: t.number().min(0).max(1)
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
198
|
+
}).strict(), Z = t.object({
|
|
199
|
+
color: r.optional(),
|
|
200
|
+
opacity: t.number().min(0).max(1).default(1),
|
|
201
|
+
padding: t.number().min(0).max(100).optional(),
|
|
202
|
+
borderRadius: t.number().min(0).optional()
|
|
203
|
+
}).strict(), q = t.object({
|
|
204
|
+
width: t.number().min(0).optional(),
|
|
205
|
+
color: r.optional()
|
|
206
|
+
}).strict(), g = t.object({
|
|
179
207
|
type: t.literal("text"),
|
|
180
|
-
text: t.string(),
|
|
208
|
+
text: t.string().optional(),
|
|
181
209
|
width: t.number().positive().optional(),
|
|
182
210
|
height: t.number().positive().optional(),
|
|
183
|
-
font:
|
|
184
|
-
alignment:
|
|
185
|
-
background:
|
|
186
|
-
stroke:
|
|
187
|
-
}).strict(),
|
|
211
|
+
font: X.optional(),
|
|
212
|
+
alignment: Y.optional(),
|
|
213
|
+
background: Z.optional(),
|
|
214
|
+
stroke: q.optional()
|
|
215
|
+
}).strict(), J = t.string().url("Invalid video url format."), tt = t.object({
|
|
188
216
|
top: t.number().min(0).optional(),
|
|
189
217
|
right: t.number().min(0).optional(),
|
|
190
218
|
bottom: t.number().min(0).optional(),
|
|
191
219
|
left: t.number().min(0).optional()
|
|
192
|
-
}).strict(),
|
|
220
|
+
}).strict(), et = n.extend({
|
|
193
221
|
from: t.number().min(0).max(1),
|
|
194
222
|
to: t.number().min(0).max(1)
|
|
195
|
-
}).array().or(t.number().min(0).max(1)),
|
|
223
|
+
}).array().or(t.number().min(0).max(1)), S = t.object({
|
|
196
224
|
type: t.literal("video"),
|
|
197
|
-
src:
|
|
225
|
+
src: J,
|
|
198
226
|
trim: t.number().optional(),
|
|
199
|
-
crop:
|
|
200
|
-
volume:
|
|
201
|
-
}).strict(),
|
|
227
|
+
crop: tt.optional(),
|
|
228
|
+
volume: et.optional()
|
|
229
|
+
}).strict(), ot = t.union([
|
|
230
|
+
g,
|
|
231
|
+
p,
|
|
202
232
|
h,
|
|
233
|
+
m,
|
|
203
234
|
l,
|
|
204
|
-
|
|
235
|
+
S,
|
|
236
|
+
u,
|
|
205
237
|
s,
|
|
206
|
-
c
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
from:
|
|
212
|
-
to:
|
|
213
|
-
}).array().or(
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
}).
|
|
217
|
-
x: Z.default(0),
|
|
218
|
-
y: _.default(0)
|
|
219
|
-
}).strict(), et = o.extend({
|
|
238
|
+
c
|
|
239
|
+
]).refine((e) => e.type === "text" ? g.safeParse(e) : e.type === "rich-text" ? p.safeParse(e) : e.type === "shape" ? h.safeParse(e) : e.type === "html" ? m.safeParse(e) : e.type === "image" ? l.safeParse(e) : e.type === "video" ? S.safeParse(e) : e.type === "luma" ? u.safeParse(e) : e.type === "audio" ? s.safeParse(e) : e.type === "caption" ? c.safeParse(e) : !1), x = /^alias:\/\/[a-zA-Z0-9_-]+$/, nt = t.enum(["topLeft", "top", "topRight", "left", "center", "right", "bottomLeft", "bottom", "bottomRight"]), it = t.enum(["crop", "cover", "contain", "none"]), i = t.coerce.number().min(-10).max(10).default(0), at = n.extend({
|
|
240
|
+
from: i,
|
|
241
|
+
to: i
|
|
242
|
+
}).array().or(i), rt = n.extend({
|
|
243
|
+
from: i,
|
|
244
|
+
to: i
|
|
245
|
+
}).array().or(i), st = t.object({
|
|
246
|
+
x: at.default(0),
|
|
247
|
+
y: rt.default(0)
|
|
248
|
+
}).strict(), ct = n.extend({
|
|
220
249
|
from: t.number().min(0).max(1),
|
|
221
250
|
to: t.number().min(0).max(1)
|
|
222
|
-
}).array().or(t.number().min(0).max(1)),
|
|
251
|
+
}).array().or(t.number().min(0).max(1)), mt = n.extend({
|
|
223
252
|
from: t.number().min(0),
|
|
224
253
|
to: t.number().min(0)
|
|
225
|
-
}).array().or(t.number().min(0)),
|
|
226
|
-
angle:
|
|
254
|
+
}).array().or(t.number().min(0)), lt = t.object({
|
|
255
|
+
angle: n.extend({
|
|
227
256
|
from: t.number(),
|
|
228
257
|
to: t.number()
|
|
229
258
|
}).array().or(t.number())
|
|
230
|
-
}).strict(),
|
|
231
|
-
in:
|
|
232
|
-
out:
|
|
233
|
-
}).strict(),
|
|
234
|
-
rotate:
|
|
235
|
-
}).strict(),
|
|
236
|
-
asset:
|
|
237
|
-
start: t.union([t.number().min(0), t.literal("auto")]),
|
|
238
|
-
length: t.union([t.number().positive(), t.literal("auto"), t.literal("end")]),
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
259
|
+
}).strict(), ut = t.string(), y = t.string(), pt = t.object({
|
|
260
|
+
in: y.optional(),
|
|
261
|
+
out: y.optional()
|
|
262
|
+
}).strict(), bt = t.object({
|
|
263
|
+
rotate: lt.default({ angle: 0 })
|
|
264
|
+
}).strict(), ft = t.object({
|
|
265
|
+
asset: ot,
|
|
266
|
+
start: t.union([t.number().min(0), t.literal("auto"), t.string().regex(x)]),
|
|
267
|
+
length: t.union([t.number().positive(), t.literal("auto"), t.literal("end"), t.string().regex(x)]),
|
|
268
|
+
alias: t.string().optional(),
|
|
269
|
+
position: nt.default("center").optional(),
|
|
270
|
+
fit: it.optional(),
|
|
271
|
+
offset: st.default({ x: 0, y: 0 }).optional(),
|
|
272
|
+
opacity: ct.default(1).optional(),
|
|
273
|
+
scale: mt.default(1).optional(),
|
|
274
|
+
transform: bt.default({ rotate: { angle: 0 } }).optional(),
|
|
275
|
+
effect: ut.optional(),
|
|
276
|
+
transition: pt.optional(),
|
|
247
277
|
width: t.number().min(1).max(3840).optional(),
|
|
248
278
|
height: t.number().min(1).max(2160).optional()
|
|
249
279
|
}).strict().transform((e) => ({
|
|
250
280
|
...e,
|
|
251
|
-
fit: e.fit ?? (e.asset.type === "rich-text" ? "
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
})),
|
|
255
|
-
|
|
256
|
-
}).strict(),
|
|
257
|
-
src:
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
281
|
+
fit: e.fit ?? (e.asset.type === "rich-text" ? "cover" : "crop")
|
|
282
|
+
})), dt = t.object({
|
|
283
|
+
clips: ft.array()
|
|
284
|
+
}).strict(), ht = t.string().url("Invalid image url format."), gt = t.object({
|
|
285
|
+
src: ht
|
|
286
|
+
}).strict(), St = t.enum(["fadeIn", "fadeOut", "fadeInFadeOut"]), xt = t.object({
|
|
287
|
+
src: t.string().url(),
|
|
288
|
+
effect: St.optional(),
|
|
289
|
+
volume: t.number().min(0).max(1).optional()
|
|
290
|
+
}).strict(), yt = t.string().regex(/^#[A-Fa-f0-9]{6}$/, "Must be a valid hex color (e.g., #000000)"), At = t.object({
|
|
291
|
+
background: yt.optional(),
|
|
292
|
+
fonts: gt.array().optional(),
|
|
293
|
+
tracks: dt.array(),
|
|
294
|
+
soundtrack: xt.optional()
|
|
295
|
+
}).strict(), jt = t.object({
|
|
296
|
+
provider: t.literal("shotstack"),
|
|
297
|
+
exclude: t.boolean().optional()
|
|
298
|
+
}).strict(), vt = t.object({
|
|
299
|
+
provider: t.literal("s3"),
|
|
300
|
+
options: t.object({
|
|
301
|
+
region: t.string(),
|
|
302
|
+
bucket: t.string().min(3).max(63),
|
|
303
|
+
prefix: t.string().optional(),
|
|
304
|
+
filename: t.string().optional(),
|
|
305
|
+
acl: t.string().optional()
|
|
306
|
+
}).strict()
|
|
307
|
+
}).strict(), It = t.object({
|
|
308
|
+
provider: t.literal("mux"),
|
|
309
|
+
options: t.object({
|
|
310
|
+
playbackPolicy: t.array(t.enum(["public", "signed"])).optional(),
|
|
311
|
+
passthrough: t.string().max(255).optional()
|
|
312
|
+
}).strict().optional()
|
|
313
|
+
}).strict(), Ct = t.object({
|
|
314
|
+
provider: t.literal("google-cloud-storage"),
|
|
315
|
+
options: t.object({
|
|
316
|
+
bucket: t.string().optional(),
|
|
317
|
+
prefix: t.string().optional(),
|
|
318
|
+
filename: t.string().optional()
|
|
319
|
+
}).strict().optional()
|
|
320
|
+
}).strict(), kt = t.object({
|
|
321
|
+
provider: t.literal("google-drive"),
|
|
322
|
+
options: t.object({
|
|
323
|
+
filename: t.string().optional(),
|
|
324
|
+
folderId: t.string().optional()
|
|
325
|
+
}).strict().optional()
|
|
326
|
+
}).strict(), Ot = t.object({
|
|
327
|
+
provider: t.literal("vimeo"),
|
|
328
|
+
options: t.object({
|
|
329
|
+
name: t.string().optional(),
|
|
330
|
+
description: t.string().optional(),
|
|
331
|
+
privacy: t.object({
|
|
332
|
+
view: t.enum(["anybody", "nobody", "contacts", "password", "unlisted"]).optional(),
|
|
333
|
+
embed: t.enum(["public", "private", "whitelist"]).optional(),
|
|
334
|
+
comments: t.enum(["anybody", "nobody", "contacts"]).optional()
|
|
335
|
+
}).strict().optional(),
|
|
336
|
+
folderUri: t.string().optional()
|
|
337
|
+
}).strict().optional()
|
|
338
|
+
}).strict(), Tt = t.object({
|
|
339
|
+
provider: t.literal("tiktok")
|
|
340
|
+
}).strict(), Ft = t.union([
|
|
341
|
+
jt,
|
|
342
|
+
vt,
|
|
343
|
+
It,
|
|
344
|
+
Ct,
|
|
345
|
+
kt,
|
|
346
|
+
Ot,
|
|
347
|
+
Tt
|
|
348
|
+
]), Rt = t.enum(["mp4", "gif", "mp3", "jpg", "png", "bmp"], {
|
|
349
|
+
errorMap: () => ({ message: "Must be one of mp4, gif, mp3, jpg, png, bmp" })
|
|
350
|
+
}), wt = [12, 15, 23.976, 24, 25, 29.97, 30, 48, 50, 59.94, 60], Et = t.number().refine((e) => wt.includes(e), {
|
|
351
|
+
message: "Must be one of 12, 15, 23.976, 24, 25, 29.97, 30, 48, 50, 59.94, 60"
|
|
352
|
+
}), Pt = t.object({
|
|
353
|
+
width: t.number({ message: "Width must be a number" }).int({ message: "Width must be an integer" }).min(1, { message: "Width must be at least 1" }).max(3840, { message: "Width must be at most 3840" }),
|
|
354
|
+
height: t.number({ message: "Height must be a number" }).int({ message: "Height must be an integer" }).min(1, { message: "Height must be at least 1" }).max(3840, { message: "Height must be at most 3840" })
|
|
355
|
+
}).strict(), zt = t.object({
|
|
356
|
+
size: Pt,
|
|
357
|
+
fps: Et.optional(),
|
|
358
|
+
format: Rt,
|
|
359
|
+
destinations: t.array(Ft).optional()
|
|
360
|
+
}).strict(), Lt = t.object({
|
|
270
361
|
find: t.string().min(1),
|
|
271
362
|
replace: t.string()
|
|
272
|
-
}),
|
|
273
|
-
timeline:
|
|
274
|
-
output:
|
|
275
|
-
merge: t.array(
|
|
363
|
+
}), Dt = t.object({
|
|
364
|
+
timeline: At,
|
|
365
|
+
output: zt,
|
|
366
|
+
merge: t.array(Lt).optional()
|
|
276
367
|
}).strict();
|
|
277
368
|
export {
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
369
|
+
ot as AssetSchema,
|
|
370
|
+
s as AudioAssetSchema,
|
|
371
|
+
I as AudioAssetUrlSchema,
|
|
372
|
+
C as AudioAssetVolumeSchema,
|
|
373
|
+
R as CaptionAssetAlignmentSchema,
|
|
374
|
+
F as CaptionAssetBackgroundSchema,
|
|
375
|
+
a as CaptionAssetColorSchema,
|
|
376
|
+
O as CaptionAssetFontSchema,
|
|
377
|
+
c as CaptionAssetSchema,
|
|
378
|
+
T as CaptionAssetStrokeSchema,
|
|
379
|
+
ft as ClipSchema,
|
|
380
|
+
Dt as EditSchema,
|
|
381
|
+
gt as FontSourceSchema,
|
|
382
|
+
ht as FontSourceUrlSchema,
|
|
383
|
+
m as HtmlAssetSchema,
|
|
384
|
+
z as ImageAssetCropSchema,
|
|
385
|
+
l as ImageAssetSchema,
|
|
386
|
+
P as ImageAssetUrlSchema,
|
|
387
|
+
v as KeyframeEasingSchema,
|
|
388
|
+
j as KeyframeInterpolationSchema,
|
|
389
|
+
n as KeyframeSchema,
|
|
390
|
+
u as LumaAssetSchema,
|
|
391
|
+
L as LumaAssetUrlSchema,
|
|
392
|
+
zt as OutputSchema,
|
|
393
|
+
p as RichTextAssetSchema,
|
|
394
|
+
f as ShapeAssetCircleSchema,
|
|
395
|
+
A as ShapeAssetColorSchema,
|
|
396
|
+
W as ShapeAssetFillSchema,
|
|
397
|
+
d as ShapeAssetLineSchema,
|
|
398
|
+
b as ShapeAssetRectangleSchema,
|
|
399
|
+
h as ShapeAssetSchema,
|
|
303
400
|
K as ShapeAssetStrokeSchema,
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
401
|
+
Y as TextAssetAlignmentSchema,
|
|
402
|
+
Z as TextAssetBackgroundSchema,
|
|
403
|
+
r as TextAssetColorSchema,
|
|
404
|
+
X as TextAssetFontSchema,
|
|
405
|
+
g as TextAssetSchema,
|
|
406
|
+
q as TextAssetStrokeSchema,
|
|
407
|
+
At as TimelineSchema,
|
|
408
|
+
dt as TrackSchema,
|
|
409
|
+
tt as VideoAssetCropSchema,
|
|
410
|
+
S as VideoAssetSchema,
|
|
411
|
+
J as VideoAssetUrlSchema,
|
|
412
|
+
et as VideoAssetVolumeSchema
|
|
316
413
|
};
|