@shotstack/shotstack-studio 1.8.1 → 1.9.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/dist/index.d.ts +72 -228
- package/dist/schema/index.cjs +1 -1
- package/dist/schema/index.d.ts +72 -228
- package/dist/schema/index.mjs +26 -28
- package/dist/shotstack-studio.es.js +10534 -9685
- package/dist/shotstack-studio.umd.js +34 -34
- package/package.json +2 -2
package/dist/schema/index.mjs
CHANGED
|
@@ -43,7 +43,7 @@ const y = e.enum(["linear", "bezier", "constant"]), A = e.enum([
|
|
|
43
43
|
src: j,
|
|
44
44
|
trim: e.number().optional(),
|
|
45
45
|
volume: v.optional()
|
|
46
|
-
}), I = e.enum(["top", "topRight", "right", "bottomRight", "bottom", "bottomLeft", "left", "topLeft", "center"]),
|
|
46
|
+
}), I = e.enum(["top", "topRight", "right", "bottomRight", "bottom", "bottomLeft", "left", "topLeft", "center"]), s = e.object({
|
|
47
47
|
type: e.literal("html"),
|
|
48
48
|
html: e.string(),
|
|
49
49
|
css: e.string(),
|
|
@@ -55,7 +55,7 @@ const y = e.enum(["linear", "bezier", "constant"]), A = e.enum([
|
|
|
55
55
|
right: e.number().min(0).optional(),
|
|
56
56
|
bottom: e.number().min(0).optional(),
|
|
57
57
|
left: e.number().min(0).optional()
|
|
58
|
-
}),
|
|
58
|
+
}), m = e.object({
|
|
59
59
|
type: e.literal("image"),
|
|
60
60
|
src: C,
|
|
61
61
|
crop: O.optional()
|
|
@@ -73,7 +73,6 @@ const y = e.enum(["linear", "bezier", "constant"]), A = e.enum([
|
|
|
73
73
|
family: e.string().default("Roboto"),
|
|
74
74
|
size: e.number().min(8).max(500).default(48),
|
|
75
75
|
weight: e.union([e.string(), e.number()]).default("400"),
|
|
76
|
-
style: e.enum(["normal", "italic", "oblique"]).default("normal"),
|
|
77
76
|
color: a.default("#000000"),
|
|
78
77
|
opacity: e.number().min(0).max(1).default(1)
|
|
79
78
|
}).strict(), F = e.object({
|
|
@@ -108,8 +107,7 @@ const y = e.enum(["linear", "bezier", "constant"]), A = e.enum([
|
|
|
108
107
|
}).strict(), E = e.object({
|
|
109
108
|
src: e.string().url("Invalid font URL"),
|
|
110
109
|
family: e.string(),
|
|
111
|
-
weight: e.union([e.string(), e.number()]).default("400")
|
|
112
|
-
style: e.enum(["normal", "italic", "oblique"]).default("normal")
|
|
110
|
+
weight: e.union([e.string(), e.number()]).default("400")
|
|
113
111
|
}).strict(), c = e.object({
|
|
114
112
|
type: e.literal("rich-text"),
|
|
115
113
|
text: e.string().max(1e4).default(""),
|
|
@@ -161,7 +159,7 @@ const y = e.enum(["linear", "bezier", "constant"]), A = e.enum([
|
|
|
161
159
|
}), $ = e.object({
|
|
162
160
|
color: i,
|
|
163
161
|
opacity: e.number().min(0).max(1)
|
|
164
|
-
}),
|
|
162
|
+
}), G = e.object({
|
|
165
163
|
width: e.number().positive(),
|
|
166
164
|
color: i
|
|
167
165
|
}), h = e.object({
|
|
@@ -172,31 +170,31 @@ const y = e.enum(["linear", "bezier", "constant"]), A = e.enum([
|
|
|
172
170
|
font: H.optional(),
|
|
173
171
|
alignment: K.optional(),
|
|
174
172
|
background: $.optional(),
|
|
175
|
-
stroke:
|
|
176
|
-
}),
|
|
173
|
+
stroke: G.optional()
|
|
174
|
+
}), X = e.string().url("Invalid video url format."), Y = e.object({
|
|
177
175
|
top: e.number().min(0).optional(),
|
|
178
176
|
right: e.number().min(0).optional(),
|
|
179
177
|
bottom: e.number().min(0).optional(),
|
|
180
178
|
left: e.number().min(0).optional()
|
|
181
|
-
}),
|
|
179
|
+
}), D = o.extend({
|
|
182
180
|
from: e.number().min(0).max(1),
|
|
183
181
|
to: e.number().min(0).max(1)
|
|
184
182
|
}).array().or(e.number().min(0).max(1)), d = e.object({
|
|
185
183
|
type: e.literal("video"),
|
|
186
|
-
src:
|
|
184
|
+
src: X,
|
|
187
185
|
trim: e.number().optional(),
|
|
188
|
-
crop:
|
|
189
|
-
volume:
|
|
190
|
-
}),
|
|
186
|
+
crop: Y.optional(),
|
|
187
|
+
volume: D.optional()
|
|
188
|
+
}), q = e.union([
|
|
191
189
|
h,
|
|
192
190
|
c,
|
|
193
191
|
b,
|
|
194
|
-
m,
|
|
195
192
|
s,
|
|
193
|
+
m,
|
|
196
194
|
d,
|
|
197
195
|
l,
|
|
198
196
|
r
|
|
199
|
-
]).refine((t) => t.type === "text" ? h.safeParse(t) : t.type === "rich-text" ? c.safeParse(t) : t.type === "shape" ? b.safeParse(t) : t.type === "html" ?
|
|
197
|
+
]).refine((t) => t.type === "text" ? h.safeParse(t) : t.type === "rich-text" ? c.safeParse(t) : t.type === "shape" ? b.safeParse(t) : t.type === "html" ? s.safeParse(t) : t.type === "image" ? m.safeParse(t) : t.type === "video" ? d.safeParse(t) : t.type === "luma" ? l.safeParse(t) : t.type === "audio" ? r.safeParse(t) : !1), J = e.enum(["topLeft", "top", "topRight", "left", "center", "right", "bottomLeft", "bottom", "bottomRight"]), M = e.enum(["crop", "cover", "contain", "none"]), n = e.number().min(-10).max(10).default(0), N = o.extend({
|
|
200
198
|
from: n,
|
|
201
199
|
to: n
|
|
202
200
|
}).array().or(n), W = o.extend({
|
|
@@ -222,7 +220,7 @@ const y = e.enum(["linear", "bezier", "constant"]), A = e.enum([
|
|
|
222
220
|
}), ae = e.object({
|
|
223
221
|
rotate: te.default({ angle: 0 })
|
|
224
222
|
}), ie = e.object({
|
|
225
|
-
asset:
|
|
223
|
+
asset: q,
|
|
226
224
|
start: e.number().min(0),
|
|
227
225
|
length: e.number().positive(),
|
|
228
226
|
position: J.default("center").optional(),
|
|
@@ -242,11 +240,11 @@ const y = e.enum(["linear", "bezier", "constant"]), A = e.enum([
|
|
|
242
240
|
return { ...t, fit: x };
|
|
243
241
|
}), re = e.object({
|
|
244
242
|
clips: ie.array()
|
|
245
|
-
}),
|
|
246
|
-
src:
|
|
243
|
+
}), se = e.string().url("Invalid image url format."), me = e.object({
|
|
244
|
+
src: se
|
|
247
245
|
}), le = e.object({
|
|
248
246
|
background: e.string().optional(),
|
|
249
|
-
fonts:
|
|
247
|
+
fonts: me.array().optional(),
|
|
250
248
|
tracks: re.array()
|
|
251
249
|
}), ce = e.object({
|
|
252
250
|
size: e.object({
|
|
@@ -260,17 +258,17 @@ const y = e.enum(["linear", "bezier", "constant"]), A = e.enum([
|
|
|
260
258
|
output: ce
|
|
261
259
|
});
|
|
262
260
|
export {
|
|
263
|
-
|
|
261
|
+
q as AssetSchema,
|
|
264
262
|
r as AudioAssetSchema,
|
|
265
263
|
j as AudioAssetUrlSchema,
|
|
266
264
|
v as AudioAssetVolumeSchema,
|
|
267
265
|
ie as ClipSchema,
|
|
268
266
|
ue as EditSchema,
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
267
|
+
me as FontSourceSchema,
|
|
268
|
+
se as FontSourceUrlSchema,
|
|
269
|
+
s as HtmlAssetSchema,
|
|
272
270
|
O as ImageAssetCropSchema,
|
|
273
|
-
|
|
271
|
+
m as ImageAssetSchema,
|
|
274
272
|
C as ImageAssetUrlSchema,
|
|
275
273
|
A as KeyframeEasingSchema,
|
|
276
274
|
y as KeyframeInterpolationSchema,
|
|
@@ -291,11 +289,11 @@ export {
|
|
|
291
289
|
i as TextAssetColorSchema,
|
|
292
290
|
H as TextAssetFontSchema,
|
|
293
291
|
h as TextAssetSchema,
|
|
294
|
-
|
|
292
|
+
G as TextAssetStrokeSchema,
|
|
295
293
|
le as TimelineSchema,
|
|
296
294
|
re as TrackSchema,
|
|
297
|
-
|
|
295
|
+
Y as VideoAssetCropSchema,
|
|
298
296
|
d as VideoAssetSchema,
|
|
299
|
-
|
|
300
|
-
|
|
297
|
+
X as VideoAssetUrlSchema,
|
|
298
|
+
D as VideoAssetVolumeSchema
|
|
301
299
|
};
|