@shotstack/shotstack-studio 1.10.0 → 1.10.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 +0 -440
- package/dist/schema/index.cjs +1 -1
- package/dist/schema/index.d.ts +0 -440
- package/dist/schema/index.mjs +72 -79
- package/dist/shotstack-studio.es.js +1977 -1967
- package/dist/shotstack-studio.umd.js +26 -26
- package/package.json +2 -2
package/dist/schema/index.mjs
CHANGED
|
@@ -86,21 +86,21 @@ const x = t.enum(["linear", "bezier", "constant"]), y = t.enum([
|
|
|
86
86
|
width: t.number().min(0).default(0),
|
|
87
87
|
color: i.default("#000000"),
|
|
88
88
|
opacity: t.number().min(0).max(1).default(1)
|
|
89
|
-
}).strict(),
|
|
89
|
+
}).strict(), Q = t.object({
|
|
90
90
|
offsetX: t.number().default(0),
|
|
91
91
|
offsetY: t.number().default(0),
|
|
92
92
|
blur: t.number().min(0).default(0),
|
|
93
93
|
color: i.default("#000000"),
|
|
94
94
|
opacity: t.number().min(0).max(1).default(0.5)
|
|
95
|
-
}).strict(),
|
|
95
|
+
}).strict(), z = t.object({
|
|
96
96
|
width: t.number().min(0).default(0),
|
|
97
97
|
color: i.default("#000000"),
|
|
98
98
|
opacity: t.number().min(0).max(1).default(1)
|
|
99
|
-
}).strict(),
|
|
99
|
+
}).strict(), L = t.object({
|
|
100
100
|
color: i.optional(),
|
|
101
101
|
opacity: t.number().min(0).max(1).default(1),
|
|
102
102
|
borderRadius: t.number().min(0).default(0),
|
|
103
|
-
border:
|
|
103
|
+
border: z.optional()
|
|
104
104
|
}).strict(), V = t.union([
|
|
105
105
|
t.number().min(0),
|
|
106
106
|
t.object({
|
|
@@ -118,24 +118,17 @@ const x = t.enum(["linear", "bezier", "constant"]), y = t.enum([
|
|
|
118
118
|
duration: t.number().min(0.1).max(60).optional(),
|
|
119
119
|
style: t.enum(["character", "word"]).optional(),
|
|
120
120
|
direction: t.enum(["left", "right", "up", "down"]).optional()
|
|
121
|
-
}).strict(), U = t.object({
|
|
122
|
-
src: t.string().url("Invalid font URL"),
|
|
123
|
-
family: t.string(),
|
|
124
|
-
weight: t.union([t.string(), t.number()]).default("400")
|
|
125
121
|
}).strict(), l = t.object({
|
|
126
122
|
type: t.literal("rich-text"),
|
|
127
123
|
text: t.string().max(1e4).default(""),
|
|
128
|
-
width: t.number().min(1).max(8192).optional(),
|
|
129
|
-
height: t.number().min(1).max(8192).optional(),
|
|
130
124
|
font: k.optional(),
|
|
131
125
|
style: F.optional(),
|
|
132
126
|
stroke: P.optional(),
|
|
133
|
-
shadow:
|
|
134
|
-
background:
|
|
127
|
+
shadow: Q.optional(),
|
|
128
|
+
background: L.optional(),
|
|
135
129
|
padding: V.optional(),
|
|
136
130
|
align: E.optional(),
|
|
137
|
-
animation: B.optional()
|
|
138
|
-
customFonts: t.array(U).optional()
|
|
131
|
+
animation: B.optional()
|
|
139
132
|
}).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({
|
|
140
133
|
width: t.number().positive(),
|
|
141
134
|
height: t.number().positive()
|
|
@@ -147,7 +140,7 @@ const x = t.enum(["linear", "bezier", "constant"]), y = t.enum([
|
|
|
147
140
|
}).strict(), H = t.object({
|
|
148
141
|
color: S,
|
|
149
142
|
opacity: t.number().min(0).max(1)
|
|
150
|
-
}).strict(),
|
|
143
|
+
}).strict(), U = t.object({
|
|
151
144
|
color: S,
|
|
152
145
|
width: t.number().positive()
|
|
153
146
|
}).strict(), b = t.object({
|
|
@@ -156,23 +149,23 @@ const x = t.enum(["linear", "bezier", "constant"]), y = t.enum([
|
|
|
156
149
|
height: t.number().positive().optional(),
|
|
157
150
|
shape: t.enum(["rectangle", "circle", "line"]),
|
|
158
151
|
fill: H.optional(),
|
|
159
|
-
stroke:
|
|
152
|
+
stroke: U.optional(),
|
|
160
153
|
rectangle: u.optional(),
|
|
161
154
|
circle: p.optional(),
|
|
162
155
|
line: f.optional()
|
|
163
|
-
}).strict().refine((e) => e.shape === "rectangle" ? u.safeParse(e.rectangle) : e.shape === "circle" ? p.safeParse(e.circle) : e.shape === "line" ? f.safeParse(e.line) : !1), a = t.string().regex(/^#([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})|transparent$/, "Invalid color format."),
|
|
156
|
+
}).strict().refine((e) => e.shape === "rectangle" ? u.safeParse(e.rectangle) : e.shape === "circle" ? p.safeParse(e.circle) : e.shape === "line" ? f.safeParse(e.line) : !1), a = t.string().regex(/^#([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})|transparent$/, "Invalid color format."), K = t.object({
|
|
164
157
|
color: a.optional(),
|
|
165
158
|
family: t.string().optional(),
|
|
166
159
|
size: t.number().positive().optional(),
|
|
167
160
|
weight: t.number().optional(),
|
|
168
161
|
lineHeight: t.number().optional()
|
|
169
|
-
}).strict(),
|
|
162
|
+
}).strict(), $ = t.object({
|
|
170
163
|
horizontal: t.enum(["left", "center", "right"]).optional(),
|
|
171
164
|
vertical: t.enum(["top", "center", "bottom"]).optional()
|
|
172
|
-
}).strict(),
|
|
165
|
+
}).strict(), G = t.object({
|
|
173
166
|
color: a,
|
|
174
167
|
opacity: t.number().min(0).max(1)
|
|
175
|
-
}).strict(),
|
|
168
|
+
}).strict(), X = t.object({
|
|
176
169
|
width: t.number().positive(),
|
|
177
170
|
color: a
|
|
178
171
|
}).strict(), h = t.object({
|
|
@@ -180,25 +173,25 @@ const x = t.enum(["linear", "bezier", "constant"]), y = t.enum([
|
|
|
180
173
|
text: t.string(),
|
|
181
174
|
width: t.number().positive().optional(),
|
|
182
175
|
height: t.number().positive().optional(),
|
|
183
|
-
font:
|
|
184
|
-
alignment:
|
|
185
|
-
background:
|
|
186
|
-
stroke:
|
|
187
|
-
}).strict(),
|
|
176
|
+
font: K.optional(),
|
|
177
|
+
alignment: $.optional(),
|
|
178
|
+
background: G.optional(),
|
|
179
|
+
stroke: X.optional()
|
|
180
|
+
}).strict(), Y = t.string().url("Invalid video url format."), D = t.object({
|
|
188
181
|
top: t.number().min(0).optional(),
|
|
189
182
|
right: t.number().min(0).optional(),
|
|
190
183
|
bottom: t.number().min(0).optional(),
|
|
191
184
|
left: t.number().min(0).optional()
|
|
192
|
-
}).strict(),
|
|
185
|
+
}).strict(), M = o.extend({
|
|
193
186
|
from: t.number().min(0).max(1),
|
|
194
187
|
to: t.number().min(0).max(1)
|
|
195
188
|
}).array().or(t.number().min(0).max(1)), d = t.object({
|
|
196
189
|
type: t.literal("video"),
|
|
197
|
-
src:
|
|
190
|
+
src: Y,
|
|
198
191
|
trim: t.number().optional(),
|
|
199
|
-
crop:
|
|
200
|
-
volume:
|
|
201
|
-
}).strict(),
|
|
192
|
+
crop: D.optional(),
|
|
193
|
+
volume: M.optional()
|
|
194
|
+
}).strict(), q = t.union([
|
|
202
195
|
h,
|
|
203
196
|
l,
|
|
204
197
|
b,
|
|
@@ -207,43 +200,43 @@ const x = t.enum(["linear", "bezier", "constant"]), y = t.enum([
|
|
|
207
200
|
d,
|
|
208
201
|
m,
|
|
209
202
|
r
|
|
210
|
-
]).refine((e) => e.type === "text" ? h.safeParse(e) : e.type === "rich-text" ? l.safeParse(e) : e.type === "shape" ? b.safeParse(e) : e.type === "html" ? s.safeParse(e) : e.type === "image" ? c.safeParse(e) : e.type === "video" ? d.safeParse(e) : e.type === "luma" ? m.safeParse(e) : e.type === "audio" ? r.safeParse(e) : !1),
|
|
203
|
+
]).refine((e) => e.type === "text" ? h.safeParse(e) : e.type === "rich-text" ? l.safeParse(e) : e.type === "shape" ? b.safeParse(e) : e.type === "html" ? s.safeParse(e) : e.type === "image" ? c.safeParse(e) : e.type === "video" ? d.safeParse(e) : e.type === "luma" ? m.safeParse(e) : e.type === "audio" ? r.safeParse(e) : !1), J = t.enum(["topLeft", "top", "topRight", "left", "center", "right", "bottomLeft", "bottom", "bottomRight"]), N = t.enum(["crop", "cover", "contain", "none"]), n = t.number().min(-10).max(10).default(0), W = o.extend({
|
|
211
204
|
from: n,
|
|
212
205
|
to: n
|
|
213
|
-
}).array().or(n),
|
|
206
|
+
}).array().or(n), Z = o.extend({
|
|
214
207
|
from: n,
|
|
215
208
|
to: n
|
|
216
|
-
}).array().or(n),
|
|
217
|
-
x:
|
|
218
|
-
y:
|
|
219
|
-
}).strict(),
|
|
209
|
+
}).array().or(n), _ = t.object({
|
|
210
|
+
x: W.default(0),
|
|
211
|
+
y: Z.default(0)
|
|
212
|
+
}).strict(), tt = o.extend({
|
|
220
213
|
from: t.number().min(0).max(1),
|
|
221
214
|
to: t.number().min(0).max(1)
|
|
222
|
-
}).array().or(t.number().min(0).max(1)),
|
|
215
|
+
}).array().or(t.number().min(0).max(1)), et = o.extend({
|
|
223
216
|
from: t.number().min(0),
|
|
224
217
|
to: t.number().min(0)
|
|
225
|
-
}).array().or(t.number().min(0)),
|
|
218
|
+
}).array().or(t.number().min(0)), ot = t.object({
|
|
226
219
|
angle: o.extend({
|
|
227
220
|
from: t.number(),
|
|
228
221
|
to: t.number()
|
|
229
222
|
}).array().or(t.number())
|
|
230
|
-
}).strict(),
|
|
223
|
+
}).strict(), nt = t.string(), g = t.string(), it = t.object({
|
|
231
224
|
in: g.optional(),
|
|
232
225
|
out: g.optional()
|
|
226
|
+
}).strict(), at = t.object({
|
|
227
|
+
rotate: ot.default({ angle: 0 })
|
|
233
228
|
}).strict(), rt = t.object({
|
|
234
|
-
|
|
235
|
-
}).strict(), st = t.object({
|
|
236
|
-
asset: J,
|
|
229
|
+
asset: q,
|
|
237
230
|
start: t.union([t.number().min(0), t.literal("auto")]),
|
|
238
231
|
length: t.union([t.number().positive(), t.literal("auto"), t.literal("end")]),
|
|
239
|
-
position:
|
|
240
|
-
fit:
|
|
241
|
-
offset:
|
|
242
|
-
opacity:
|
|
243
|
-
scale:
|
|
244
|
-
transform:
|
|
245
|
-
effect:
|
|
246
|
-
transition:
|
|
232
|
+
position: J.default("center").optional(),
|
|
233
|
+
fit: N.optional(),
|
|
234
|
+
offset: _.default({ x: 0, y: 0 }).optional(),
|
|
235
|
+
opacity: tt.default(1).optional(),
|
|
236
|
+
scale: et.default(1).optional(),
|
|
237
|
+
transform: at.default({ rotate: { angle: 0 } }).optional(),
|
|
238
|
+
effect: nt.optional(),
|
|
239
|
+
transition: it.optional(),
|
|
247
240
|
width: t.number().min(1).max(3840).optional(),
|
|
248
241
|
height: t.number().min(1).max(2160).optional()
|
|
249
242
|
}).strict().transform((e) => ({
|
|
@@ -251,38 +244,38 @@ const x = t.enum(["linear", "bezier", "constant"]), y = t.enum([
|
|
|
251
244
|
fit: e.fit ?? (e.asset.type === "rich-text" ? "none" : "crop"),
|
|
252
245
|
start: e.start,
|
|
253
246
|
length: e.length
|
|
254
|
-
})),
|
|
255
|
-
clips:
|
|
256
|
-
}).strict(),
|
|
257
|
-
src:
|
|
258
|
-
}).strict(),
|
|
247
|
+
})), st = t.object({
|
|
248
|
+
clips: rt.array()
|
|
249
|
+
}).strict(), ct = t.string().url("Invalid image url format."), mt = t.object({
|
|
250
|
+
src: ct
|
|
251
|
+
}).strict(), lt = t.object({
|
|
259
252
|
background: t.string().optional(),
|
|
260
|
-
fonts:
|
|
261
|
-
tracks:
|
|
262
|
-
}).strict(),
|
|
253
|
+
fonts: mt.array().optional(),
|
|
254
|
+
tracks: st.array()
|
|
255
|
+
}).strict(), ut = t.object({
|
|
263
256
|
size: t.object({
|
|
264
257
|
width: t.number().positive(),
|
|
265
258
|
height: t.number().positive()
|
|
266
259
|
}).strict(),
|
|
267
260
|
fps: t.number().positive().optional(),
|
|
268
261
|
format: t.string()
|
|
269
|
-
}).strict(),
|
|
262
|
+
}).strict(), pt = t.object({
|
|
270
263
|
find: t.string().min(1),
|
|
271
264
|
replace: t.string()
|
|
272
|
-
}),
|
|
273
|
-
timeline:
|
|
274
|
-
output:
|
|
275
|
-
merge: t.array(
|
|
265
|
+
}), ft = t.object({
|
|
266
|
+
timeline: lt,
|
|
267
|
+
output: ut,
|
|
268
|
+
merge: t.array(pt).optional()
|
|
276
269
|
}).strict();
|
|
277
270
|
export {
|
|
278
|
-
|
|
271
|
+
q as AssetSchema,
|
|
279
272
|
r as AudioAssetSchema,
|
|
280
273
|
A as AudioAssetUrlSchema,
|
|
281
274
|
j as AudioAssetVolumeSchema,
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
275
|
+
rt as ClipSchema,
|
|
276
|
+
ft as EditSchema,
|
|
277
|
+
mt as FontSourceSchema,
|
|
278
|
+
ct as FontSourceUrlSchema,
|
|
286
279
|
s as HtmlAssetSchema,
|
|
287
280
|
O as ImageAssetCropSchema,
|
|
288
281
|
c as ImageAssetSchema,
|
|
@@ -292,7 +285,7 @@ export {
|
|
|
292
285
|
o as KeyframeSchema,
|
|
293
286
|
m as LumaAssetSchema,
|
|
294
287
|
T as LumaAssetUrlSchema,
|
|
295
|
-
|
|
288
|
+
ut as OutputSchema,
|
|
296
289
|
l as RichTextAssetSchema,
|
|
297
290
|
p as ShapeAssetCircleSchema,
|
|
298
291
|
S as ShapeAssetColorSchema,
|
|
@@ -300,17 +293,17 @@ export {
|
|
|
300
293
|
f as ShapeAssetLineSchema,
|
|
301
294
|
u as ShapeAssetRectangleSchema,
|
|
302
295
|
b as ShapeAssetSchema,
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
296
|
+
U as ShapeAssetStrokeSchema,
|
|
297
|
+
$ as TextAssetAlignmentSchema,
|
|
298
|
+
G as TextAssetBackgroundSchema,
|
|
306
299
|
a as TextAssetColorSchema,
|
|
307
|
-
|
|
300
|
+
K as TextAssetFontSchema,
|
|
308
301
|
h as TextAssetSchema,
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
302
|
+
X as TextAssetStrokeSchema,
|
|
303
|
+
lt as TimelineSchema,
|
|
304
|
+
st as TrackSchema,
|
|
305
|
+
D as VideoAssetCropSchema,
|
|
313
306
|
d as VideoAssetSchema,
|
|
314
|
-
|
|
315
|
-
|
|
307
|
+
Y as VideoAssetUrlSchema,
|
|
308
|
+
M as VideoAssetVolumeSchema
|
|
316
309
|
};
|