@shotstack/shotstack-studio 2.0.0-beta.14 → 2.0.0-beta.16
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 +71 -3
- package/dist/internal.es.js +3346 -3092
- package/dist/internal.umd.js +16 -16
- package/dist/schema/index.cjs +1 -1
- package/dist/schema/index.d.ts +71 -3
- package/dist/schema/index.mjs +59 -57
- package/dist/shotstack-studio.es.js +3753 -3466
- package/dist/shotstack-studio.umd.js +75 -75
- package/package.json +2 -2
package/dist/schema/index.mjs
CHANGED
|
@@ -62,7 +62,7 @@ const E = e.object({
|
|
|
62
62
|
if (!(t === "" || t === null || t === void 0 || Array.isArray(t)))
|
|
63
63
|
return typeof t == "string" ? Number(t) : t;
|
|
64
64
|
}, e.number()))
|
|
65
|
-
}),
|
|
65
|
+
}), c = e.object({
|
|
66
66
|
type: e.enum(["caption"]),
|
|
67
67
|
src: e.string(),
|
|
68
68
|
font: e.optional(q),
|
|
@@ -76,7 +76,7 @@ const E = e.object({
|
|
|
76
76
|
if (!(t === "" || t === null || t === void 0 || Array.isArray(t)))
|
|
77
77
|
return typeof t == "string" ? Number(t) : t;
|
|
78
78
|
}, e.number().gte(0).lte(10)))
|
|
79
|
-
}), Ht =
|
|
79
|
+
}), Ht = c, $ = e.object({
|
|
80
80
|
color: e.optional(e.string()),
|
|
81
81
|
threshold: e.optional(e.preprocess((t) => {
|
|
82
82
|
if (!(t === "" || t === null || t === void 0 || Array.isArray(t)))
|
|
@@ -613,7 +613,7 @@ const re = e.object({
|
|
|
613
613
|
vertical: e.optional(e.boolean())
|
|
614
614
|
}), Re = e.object({
|
|
615
615
|
src: e.string()
|
|
616
|
-
}),
|
|
616
|
+
}), m = e.object({
|
|
617
617
|
type: e.enum(["html"]),
|
|
618
618
|
html: e.string(),
|
|
619
619
|
css: e.optional(e.string()),
|
|
@@ -637,11 +637,11 @@ const re = e.object({
|
|
|
637
637
|
"topLeft",
|
|
638
638
|
"center"
|
|
639
639
|
]))
|
|
640
|
-
}), Vt =
|
|
640
|
+
}), Vt = m, g = e.object({
|
|
641
641
|
type: e.enum(["image"]),
|
|
642
642
|
src: e.string(),
|
|
643
643
|
crop: e.optional(n)
|
|
644
|
-
}), Qt =
|
|
644
|
+
}), Qt = g, Oe = e.object({
|
|
645
645
|
type: e.optional(e.enum(["image-to-video"])),
|
|
646
646
|
src: e.optional(e.string()),
|
|
647
647
|
prompt: e.optional(e.string()),
|
|
@@ -713,14 +713,14 @@ const qe = e.object({
|
|
|
713
713
|
preservePitch: e.optional(e.boolean())
|
|
714
714
|
}), Pe = e.object({
|
|
715
715
|
format: e.optional(e.enum(["srt", "vtt"]))
|
|
716
|
-
}),
|
|
716
|
+
}), y = e.object({
|
|
717
717
|
type: e.enum(["luma"]),
|
|
718
718
|
src: e.string(),
|
|
719
719
|
trim: e.optional(e.preprocess((t) => {
|
|
720
720
|
if (!(t === "" || t === null || t === void 0 || Array.isArray(t)))
|
|
721
721
|
return typeof t == "string" ? Number(t) : t;
|
|
722
722
|
}, e.number()))
|
|
723
|
-
}), Wt =
|
|
723
|
+
}), Wt = y, b = e.object({
|
|
724
724
|
find: e.string(),
|
|
725
725
|
replace: e.unknown()
|
|
726
726
|
}), $e = e.object({
|
|
@@ -753,15 +753,15 @@ const qe = e.object({
|
|
|
753
753
|
]),
|
|
754
754
|
created: e.optional(e.string()),
|
|
755
755
|
updated: e.optional(e.string())
|
|
756
|
-
}),
|
|
756
|
+
}), h = e.object({
|
|
757
757
|
type: e.string(),
|
|
758
758
|
attributes: Ue
|
|
759
759
|
});
|
|
760
760
|
e.object({
|
|
761
|
-
data: e.array(
|
|
761
|
+
data: e.array(h)
|
|
762
762
|
});
|
|
763
763
|
e.object({
|
|
764
|
-
data:
|
|
764
|
+
data: h
|
|
765
765
|
});
|
|
766
766
|
e.object({
|
|
767
767
|
success: e.boolean(),
|
|
@@ -952,7 +952,7 @@ const Ke = e.object({
|
|
|
952
952
|
"line-through"
|
|
953
953
|
])),
|
|
954
954
|
gradient: e.optional(Xe)
|
|
955
|
-
}),
|
|
955
|
+
}), A = e.object({
|
|
956
956
|
type: e.enum(["rich-text"]),
|
|
957
957
|
text: e.string().max(5e3),
|
|
958
958
|
font: e.optional(tt),
|
|
@@ -969,7 +969,7 @@ const Ke = e.object({
|
|
|
969
969
|
])),
|
|
970
970
|
align: e.optional(Ke),
|
|
971
971
|
animation: e.optional(Ve)
|
|
972
|
-
}), Xt =
|
|
972
|
+
}), Xt = A, nt = e.object({
|
|
973
973
|
id: e.optional(e.string()),
|
|
974
974
|
owner: e.optional(e.string()),
|
|
975
975
|
status: e.optional(e.enum(["queued", "failed"])),
|
|
@@ -985,7 +985,7 @@ const ot = e.object({
|
|
|
985
985
|
url: e.string(),
|
|
986
986
|
id: e.string(),
|
|
987
987
|
destinations: e.array(o)
|
|
988
|
-
}),
|
|
988
|
+
}), S = e.object({
|
|
989
989
|
type: e.enum(["shape"]),
|
|
990
990
|
shape: e.enum([
|
|
991
991
|
"rectangle",
|
|
@@ -1044,7 +1044,7 @@ const ot = e.object({
|
|
|
1044
1044
|
return typeof t == "string" ? Number(t) : t;
|
|
1045
1045
|
}, e.number().int())
|
|
1046
1046
|
}))
|
|
1047
|
-
}), Yt =
|
|
1047
|
+
}), Yt = S, p = e.object({
|
|
1048
1048
|
width: e.optional(e.preprocess((t) => {
|
|
1049
1049
|
if (!(t === "" || t === null || t === void 0 || Array.isArray(t)))
|
|
1050
1050
|
return typeof t == "string" ? Number(t) : t;
|
|
@@ -1053,7 +1053,7 @@ const ot = e.object({
|
|
|
1053
1053
|
if (!(t === "" || t === null || t === void 0 || Array.isArray(t)))
|
|
1054
1054
|
return typeof t == "string" ? Number(t) : t;
|
|
1055
1055
|
}, e.number().int().gte(1).lte(4096)))
|
|
1056
|
-
}), at =
|
|
1056
|
+
}), at = p, j = e.object({
|
|
1057
1057
|
format: e.optional(e.enum([
|
|
1058
1058
|
"mp4",
|
|
1059
1059
|
"webm",
|
|
@@ -1071,7 +1071,7 @@ const ot = e.object({
|
|
|
1071
1071
|
"webp",
|
|
1072
1072
|
"tif"
|
|
1073
1073
|
])),
|
|
1074
|
-
size: e.optional(
|
|
1074
|
+
size: e.optional(p),
|
|
1075
1075
|
fit: e.optional(e.enum([
|
|
1076
1076
|
"cover",
|
|
1077
1077
|
"contain",
|
|
@@ -1111,7 +1111,7 @@ const ot = e.object({
|
|
|
1111
1111
|
enhance: e.optional(Ge),
|
|
1112
1112
|
filename: e.optional(e.string())
|
|
1113
1113
|
}), st = e.object({
|
|
1114
|
-
renditions: e.optional(e.array(
|
|
1114
|
+
renditions: e.optional(e.array(j)),
|
|
1115
1115
|
transcription: e.optional(Pe)
|
|
1116
1116
|
}), ut = e.object({
|
|
1117
1117
|
id: e.string(),
|
|
@@ -1128,7 +1128,7 @@ const ot = e.object({
|
|
|
1128
1128
|
if (!(t === "" || t === null || t === void 0 || Array.isArray(t)))
|
|
1129
1129
|
return typeof t == "string" ? Number(t) : t;
|
|
1130
1130
|
}, e.number())),
|
|
1131
|
-
transformation: e.optional(
|
|
1131
|
+
transformation: e.optional(j),
|
|
1132
1132
|
width: e.optional(e.preprocess((t) => {
|
|
1133
1133
|
if (!(t === "" || t === null || t === void 0 || Array.isArray(t)))
|
|
1134
1134
|
return typeof t == "string" ? Number(t) : t;
|
|
@@ -1179,16 +1179,16 @@ const ot = e.object({
|
|
|
1179
1179
|
}, e.number())),
|
|
1180
1180
|
created: e.optional(e.string()),
|
|
1181
1181
|
updated: e.optional(e.string())
|
|
1182
|
-
}),
|
|
1182
|
+
}), N = e.object({
|
|
1183
1183
|
type: e.string(),
|
|
1184
1184
|
id: e.string(),
|
|
1185
1185
|
attributes: pt
|
|
1186
1186
|
});
|
|
1187
1187
|
e.object({
|
|
1188
|
-
data: e.array(
|
|
1188
|
+
data: e.array(N)
|
|
1189
1189
|
});
|
|
1190
1190
|
e.object({
|
|
1191
|
-
data:
|
|
1191
|
+
data: N
|
|
1192
1192
|
});
|
|
1193
1193
|
const dt = e.object({
|
|
1194
1194
|
url: e.optional(e.string()),
|
|
@@ -1206,7 +1206,7 @@ const dt = e.object({
|
|
|
1206
1206
|
if (!(t === "" || t === null || t === void 0 || Array.isArray(t)))
|
|
1207
1207
|
return typeof t == "string" ? Number(t) : t;
|
|
1208
1208
|
}, e.number()))
|
|
1209
|
-
}),
|
|
1209
|
+
}), w = e.object({
|
|
1210
1210
|
offset: e.preprocess((t) => {
|
|
1211
1211
|
if (!(t === "" || t === null || t === void 0 || Array.isArray(t)))
|
|
1212
1212
|
return typeof t == "string" ? Number(t) : t;
|
|
@@ -1218,14 +1218,14 @@ const dt = e.object({
|
|
|
1218
1218
|
if (!(t === "" || t === null || t === void 0 || Array.isArray(t)))
|
|
1219
1219
|
return typeof t == "string" ? Number(t) : t;
|
|
1220
1220
|
}, e.number().gte(0).lte(360))).default(0),
|
|
1221
|
-
stops: e.array(
|
|
1221
|
+
stops: e.array(w).min(2),
|
|
1222
1222
|
opacity: e.optional(e.preprocess((t) => {
|
|
1223
1223
|
if (!(t === "" || t === null || t === void 0 || Array.isArray(t)))
|
|
1224
1224
|
return typeof t == "string" ? Number(t) : t;
|
|
1225
1225
|
}, e.number().gte(0).lte(1))).default(1)
|
|
1226
1226
|
}), mt = e.object({
|
|
1227
1227
|
type: e.enum(["radial"]),
|
|
1228
|
-
stops: e.array(
|
|
1228
|
+
stops: e.array(w).min(2),
|
|
1229
1229
|
opacity: e.optional(e.preprocess((t) => {
|
|
1230
1230
|
if (!(t === "" || t === null || t === void 0 || Array.isArray(t)))
|
|
1231
1231
|
return typeof t == "string" ? Number(t) : t;
|
|
@@ -1439,7 +1439,7 @@ const dt = e.object({
|
|
|
1439
1439
|
Nt,
|
|
1440
1440
|
Ot,
|
|
1441
1441
|
kt
|
|
1442
|
-
]),
|
|
1442
|
+
]), x = e.object({
|
|
1443
1443
|
type: e.enum(["svg"]),
|
|
1444
1444
|
src: e.optional(e.string().min(1).max(5e5)),
|
|
1445
1445
|
shape: e.optional(Lt),
|
|
@@ -1468,28 +1468,28 @@ const dt = e.object({
|
|
|
1468
1468
|
if (!(t === "" || t === null || t === void 0 || Array.isArray(t)))
|
|
1469
1469
|
return typeof t == "string" ? Number(t) : t;
|
|
1470
1470
|
}, e.number().int().gte(1).lte(4096))))
|
|
1471
|
-
}).superRefine((t,
|
|
1472
|
-
const
|
|
1473
|
-
if (!
|
|
1471
|
+
}).superRefine((t, s) => {
|
|
1472
|
+
const f = t.shape !== void 0, u = t.src !== void 0 && t.src.trim() !== "";
|
|
1473
|
+
if (!f && !u && s.addIssue({
|
|
1474
1474
|
code: e.ZodIssueCode.custom,
|
|
1475
1475
|
message: "Either 'src' or 'shape' must be provided",
|
|
1476
1476
|
path: []
|
|
1477
|
-
}),
|
|
1477
|
+
}), f && u && s.addIssue({
|
|
1478
1478
|
code: e.ZodIssueCode.custom,
|
|
1479
1479
|
message: "Provide either 'src' or 'shape', not both",
|
|
1480
1480
|
path: ["src"]
|
|
1481
|
-
}),
|
|
1481
|
+
}), u) {
|
|
1482
1482
|
const B = ["shape", "fill", "stroke", "shadow", "transform", "width", "height"];
|
|
1483
|
-
for (const
|
|
1484
|
-
t[
|
|
1483
|
+
for (const l of B)
|
|
1484
|
+
t[l] !== void 0 && s.addIssue({
|
|
1485
1485
|
code: e.ZodIssueCode.custom,
|
|
1486
|
-
message: `'${
|
|
1487
|
-
path: [
|
|
1486
|
+
message: `'${l}' is not allowed when using 'src'. Only 'type' and 'src' are allowed in import mode`,
|
|
1487
|
+
path: [l]
|
|
1488
1488
|
});
|
|
1489
1489
|
}
|
|
1490
|
-
}), vt =
|
|
1490
|
+
}), vt = x, It = e.object({
|
|
1491
1491
|
id: e.string(),
|
|
1492
|
-
merge: e.optional(e.array(
|
|
1492
|
+
merge: e.optional(e.array(b))
|
|
1493
1493
|
}), Gt = e.object({
|
|
1494
1494
|
horizontal: e.optional(e.enum([
|
|
1495
1495
|
"left",
|
|
@@ -1546,7 +1546,7 @@ const dt = e.object({
|
|
|
1546
1546
|
return typeof t == "string" ? Number(t) : t;
|
|
1547
1547
|
}, e.number().gte(0).lte(10))),
|
|
1548
1548
|
color: e.optional(e.string().regex(/^#[A-Fa-f0-9]{6}$/))
|
|
1549
|
-
}),
|
|
1549
|
+
}), T = e.object({
|
|
1550
1550
|
type: e.enum(["text"]),
|
|
1551
1551
|
text: e.string(),
|
|
1552
1552
|
width: e.optional(e.preprocess((t) => {
|
|
@@ -1563,7 +1563,7 @@ const dt = e.object({
|
|
|
1563
1563
|
stroke: e.optional(Et),
|
|
1564
1564
|
animation: e.optional(Ct),
|
|
1565
1565
|
ellipsis: e.optional(e.string())
|
|
1566
|
-
}), er =
|
|
1566
|
+
}), er = T, qt = e.object({
|
|
1567
1567
|
type: e.enum(["text-to-image"]),
|
|
1568
1568
|
prompt: e.string(),
|
|
1569
1569
|
width: e.optional(e.preprocess((t) => {
|
|
@@ -1584,7 +1584,7 @@ const dt = e.object({
|
|
|
1584
1584
|
if (!(t === "" || t === null || t === void 0 || Array.isArray(t)))
|
|
1585
1585
|
return typeof t == "string" ? Number(t) : t;
|
|
1586
1586
|
}, e.number().gte(0).lte(1))
|
|
1587
|
-
}),
|
|
1587
|
+
}), k = e.object({
|
|
1588
1588
|
format: e.enum([
|
|
1589
1589
|
"mp4",
|
|
1590
1590
|
"gif",
|
|
@@ -1608,7 +1608,7 @@ const dt = e.object({
|
|
|
1608
1608
|
"4:5",
|
|
1609
1609
|
"4:3"
|
|
1610
1610
|
])),
|
|
1611
|
-
size: e.optional(
|
|
1611
|
+
size: e.optional(p),
|
|
1612
1612
|
fps: e.optional(e.union([
|
|
1613
1613
|
e.literal(12),
|
|
1614
1614
|
e.literal(15),
|
|
@@ -1643,7 +1643,7 @@ const dt = e.object({
|
|
|
1643
1643
|
poster: e.optional($e),
|
|
1644
1644
|
thumbnail: e.optional(Pt),
|
|
1645
1645
|
destinations: e.optional(e.array(o))
|
|
1646
|
-
}),
|
|
1646
|
+
}), a = k, F = e.object({
|
|
1647
1647
|
in: e.optional(e.enum([
|
|
1648
1648
|
"none",
|
|
1649
1649
|
"fade",
|
|
@@ -1842,7 +1842,7 @@ const dt = e.object({
|
|
|
1842
1842
|
"fadeOut",
|
|
1843
1843
|
"fadeInFadeOut"
|
|
1844
1844
|
]))
|
|
1845
|
-
}), nr = R,
|
|
1845
|
+
}), nr = R, d = e.object({
|
|
1846
1846
|
x: e.optional(e.union([
|
|
1847
1847
|
e.preprocess((t) => {
|
|
1848
1848
|
if (!(t === "" || t === null || t === void 0 || Array.isArray(t)))
|
|
@@ -1857,7 +1857,7 @@ const dt = e.object({
|
|
|
1857
1857
|
}, e.number().gte(-10).lte(10)),
|
|
1858
1858
|
e.array(r)
|
|
1859
1859
|
]))
|
|
1860
|
-
}), ir =
|
|
1860
|
+
}), ir = d, $t = e.object({
|
|
1861
1861
|
angle: e.optional(e.union([
|
|
1862
1862
|
e.preprocess((t) => {
|
|
1863
1863
|
if (!(t === "" || t === null || t === void 0 || Array.isArray(t)))
|
|
@@ -1917,7 +1917,7 @@ const dt = e.object({
|
|
|
1917
1917
|
"topLeft",
|
|
1918
1918
|
"center"
|
|
1919
1919
|
])),
|
|
1920
|
-
offset: e.optional(
|
|
1920
|
+
offset: e.optional(d)
|
|
1921
1921
|
}), O = e.object({
|
|
1922
1922
|
rotate: e.optional($t),
|
|
1923
1923
|
skew: e.optional(_t),
|
|
@@ -1951,16 +1951,16 @@ const dt = e.object({
|
|
|
1951
1951
|
chromaKey: e.optional($)
|
|
1952
1952
|
}), ar = D, L = e.discriminatedUnion("type", [
|
|
1953
1953
|
D,
|
|
1954
|
-
m,
|
|
1955
|
-
x,
|
|
1956
|
-
h,
|
|
1957
|
-
R,
|
|
1958
1954
|
g,
|
|
1959
|
-
|
|
1955
|
+
T,
|
|
1956
|
+
A,
|
|
1957
|
+
R,
|
|
1958
|
+
y,
|
|
1960
1959
|
c,
|
|
1960
|
+
m,
|
|
1961
1961
|
Ut,
|
|
1962
|
-
|
|
1963
|
-
|
|
1962
|
+
S,
|
|
1963
|
+
x,
|
|
1964
1964
|
qt,
|
|
1965
1965
|
Oe
|
|
1966
1966
|
]), sr = L, I = e.object({
|
|
@@ -2009,7 +2009,7 @@ const dt = e.object({
|
|
|
2009
2009
|
"topLeft",
|
|
2010
2010
|
"center"
|
|
2011
2011
|
])),
|
|
2012
|
-
offset: e.optional(
|
|
2012
|
+
offset: e.optional(d),
|
|
2013
2013
|
transition: e.optional(F),
|
|
2014
2014
|
effect: e.optional(e.enum([
|
|
2015
2015
|
"zoomIn",
|
|
@@ -2061,8 +2061,8 @@ const dt = e.object({
|
|
|
2061
2061
|
cache: e.optional(e.boolean())
|
|
2062
2062
|
}), pr = C, i = e.object({
|
|
2063
2063
|
timeline: C,
|
|
2064
|
-
output:
|
|
2065
|
-
merge: e.optional(e.array(
|
|
2064
|
+
output: k,
|
|
2065
|
+
merge: e.optional(e.array(b)),
|
|
2066
2066
|
callback: e.optional(e.string()),
|
|
2067
2067
|
disk: e.optional(e.enum(["local", "mount"]))
|
|
2068
2068
|
}), dr = i, Zt = e.object({
|
|
@@ -2248,7 +2248,7 @@ e.object({
|
|
|
2248
2248
|
}),
|
|
2249
2249
|
query: e.optional(e.never())
|
|
2250
2250
|
});
|
|
2251
|
-
const fr = ke, cr = at, mr =
|
|
2251
|
+
const fr = ke, cr = at, mr = a.shape.format, gr = a.shape.fps.unwrap(), yr = a.shape.resolution, br = a.shape.aspectRatio, hr = e.string().regex(/^#[0-9A-Fa-f]{6}$|^#[0-9A-Fa-f]{8}$/);
|
|
2252
2252
|
export {
|
|
2253
2253
|
sr as AssetSchema,
|
|
2254
2254
|
nr as AudioAssetSchema,
|
|
@@ -2257,15 +2257,17 @@ export {
|
|
|
2257
2257
|
Kt as CropSchema,
|
|
2258
2258
|
fr as DestinationSchema,
|
|
2259
2259
|
dr as EditSchema,
|
|
2260
|
-
|
|
2260
|
+
hr as HexColorSchema,
|
|
2261
2261
|
Vt as HtmlAssetSchema,
|
|
2262
2262
|
Qt as ImageAssetSchema,
|
|
2263
2263
|
rr as KeyframeSchema,
|
|
2264
2264
|
Wt as LumaAssetSchema,
|
|
2265
2265
|
ir as OffsetSchema,
|
|
2266
|
+
br as OutputAspectRatioSchema,
|
|
2266
2267
|
mr as OutputFormatSchema,
|
|
2267
2268
|
gr as OutputFpsSchema,
|
|
2268
|
-
|
|
2269
|
+
yr as OutputResolutionSchema,
|
|
2270
|
+
a as OutputSchema,
|
|
2269
2271
|
cr as OutputSizeSchema,
|
|
2270
2272
|
Xt as RichTextAssetSchema,
|
|
2271
2273
|
Yt as ShapeAssetSchema,
|