@shotstack/schemas 1.8.6 → 1.8.7
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/api.bundled.json +50 -75
- package/dist/json-schema/asset.json +95 -101
- package/dist/json-schema/clip.json +95 -101
- package/dist/json-schema/edit.json +95 -101
- package/dist/json-schema/rich-caption-asset.json +234 -240
- package/dist/json-schema/schemas.json +103 -111
- package/dist/json-schema/timeline.json +95 -101
- package/dist/json-schema/track.json +95 -101
- package/dist/schema.d.ts +40 -47
- package/dist/zod/zod.gen.cjs +31 -51
- package/dist/zod/zod.gen.d.ts +494 -1158
- package/dist/zod/zod.gen.js +26 -46
- package/dist/zod/zod.gen.ts +15 -18
- package/package.json +1 -1
- package/dist/json-schema/word-timing.json +0 -44
package/dist/zod/zod.gen.js
CHANGED
|
@@ -1356,6 +1356,29 @@ export const richcaptionpropertiesRichCaptionActiveFontSchema = z.object({
|
|
|
1356
1356
|
} return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1357
1357
|
}).strict();
|
|
1358
1358
|
export const richCaptionActiveFontSchema = richcaptionpropertiesRichCaptionActiveFontSchema;
|
|
1359
|
+
/**
|
|
1360
|
+
* Font properties for rich captions. Defaults to Roboto.
|
|
1361
|
+
*/
|
|
1362
|
+
export const richcaptionpropertiesRichCaptionFontSchema = z.object({
|
|
1363
|
+
family: z.optional(z.string()).default("Roboto"),
|
|
1364
|
+
size: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1365
|
+
return undefined; if (Array.isArray(v))
|
|
1366
|
+
return v; if (typeof v === 'string') {
|
|
1367
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1368
|
+
return v;
|
|
1369
|
+
return Number(v);
|
|
1370
|
+
} return v; }), z.number().int().gte(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(24),
|
|
1371
|
+
weight: z.optional(z.unknown()).default("400"),
|
|
1372
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#ffffff"),
|
|
1373
|
+
opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1374
|
+
return undefined; if (Array.isArray(v))
|
|
1375
|
+
return v; if (typeof v === 'string') {
|
|
1376
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1377
|
+
return v;
|
|
1378
|
+
return Number(v);
|
|
1379
|
+
} return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1380
|
+
background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1381
|
+
}).strict();
|
|
1359
1382
|
/**
|
|
1360
1383
|
* Word-level animation properties for caption effects.
|
|
1361
1384
|
*/
|
|
@@ -1380,34 +1403,6 @@ export const richcaptionpropertiesRichCaptionWordAnimationSchema = z.object({
|
|
|
1380
1403
|
direction: z.optional(z.enum(["left", "right", "up", "down"])),
|
|
1381
1404
|
}).strict();
|
|
1382
1405
|
export const richCaptionWordAnimationSchema = richcaptionpropertiesRichCaptionWordAnimationSchema;
|
|
1383
|
-
/**
|
|
1384
|
-
* Word-level timing information for caption animation.
|
|
1385
|
-
*/
|
|
1386
|
-
export const richcaptionpropertiesWordTimingSchema = z.object({
|
|
1387
|
-
text: z.string().min(1),
|
|
1388
|
-
start: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1389
|
-
return undefined; if (Array.isArray(v))
|
|
1390
|
-
return v; if (typeof v === 'string') {
|
|
1391
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1392
|
-
return v;
|
|
1393
|
-
return Number(v);
|
|
1394
|
-
} return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1395
|
-
end: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1396
|
-
return undefined; if (Array.isArray(v))
|
|
1397
|
-
return v; if (typeof v === 'string') {
|
|
1398
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1399
|
-
return v;
|
|
1400
|
-
return Number(v);
|
|
1401
|
-
} return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1402
|
-
confidence: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1403
|
-
return undefined; if (Array.isArray(v))
|
|
1404
|
-
return v; if (typeof v === 'string') {
|
|
1405
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1406
|
-
return v;
|
|
1407
|
-
return Number(v);
|
|
1408
|
-
} return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1409
|
-
}).strict();
|
|
1410
|
-
export const wordTimingSchema = richcaptionpropertiesWordTimingSchema;
|
|
1411
1406
|
/**
|
|
1412
1407
|
* Text alignment properties (horizontal and vertical).
|
|
1413
1408
|
*/
|
|
@@ -1680,13 +1675,13 @@ export const richTextStyleSchema = richtextpropertiesRichTextStyleSchema;
|
|
|
1680
1675
|
*/
|
|
1681
1676
|
export const richcaptionassetRichCaptionAssetSchema = z.object({
|
|
1682
1677
|
type: z.enum(["rich-caption"]),
|
|
1683
|
-
src: z.
|
|
1684
|
-
|
|
1685
|
-
font: z.optional(richtextpropertiesRichTextFontSchema),
|
|
1678
|
+
src: z.string().min(1),
|
|
1679
|
+
font: z.optional(richcaptionpropertiesRichCaptionFontSchema),
|
|
1686
1680
|
style: z.optional(richtextpropertiesRichTextStyleSchema),
|
|
1687
1681
|
stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
|
|
1688
1682
|
shadow: z.optional(richtextpropertiesRichTextShadowSchema),
|
|
1689
1683
|
background: z.optional(richtextpropertiesRichTextBackgroundSchema),
|
|
1684
|
+
border: z.optional(richtextpropertiesRichTextBorderSchema),
|
|
1690
1685
|
padding: z.optional(z.union([z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1691
1686
|
return undefined; if (Array.isArray(v))
|
|
1692
1687
|
return v; if (typeof v === 'string') {
|
|
@@ -1697,21 +1692,6 @@ export const richcaptionassetRichCaptionAssetSchema = z.object({
|
|
|
1697
1692
|
align: z.optional(richtextpropertiesRichTextAlignmentSchema),
|
|
1698
1693
|
active: z.optional(richcaptionpropertiesRichCaptionActiveSchema),
|
|
1699
1694
|
wordAnimation: z.optional(richcaptionpropertiesRichCaptionWordAnimationSchema),
|
|
1700
|
-
position: z.optional(z.enum(["top", "center", "bottom"])),
|
|
1701
|
-
maxWidth: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1702
|
-
return undefined; if (Array.isArray(v))
|
|
1703
|
-
return v; if (typeof v === 'string') {
|
|
1704
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1705
|
-
return v;
|
|
1706
|
-
return Number(v);
|
|
1707
|
-
} return v; }), z.number().gte(0.1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.9),
|
|
1708
|
-
maxLines: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1709
|
-
return undefined; if (Array.isArray(v))
|
|
1710
|
-
return v; if (typeof v === 'string') {
|
|
1711
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1712
|
-
return v;
|
|
1713
|
-
return Number(v);
|
|
1714
|
-
} return v; }), z.number().int().gte(1).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(2),
|
|
1715
1695
|
}).strict();
|
|
1716
1696
|
export const richCaptionAssetSchema = richcaptionassetRichCaptionAssetSchema;
|
|
1717
1697
|
/**
|
package/dist/zod/zod.gen.ts
CHANGED
|
@@ -1438,6 +1438,18 @@ export const richcaptionpropertiesRichCaptionActiveFontSchema = z.object({
|
|
|
1438
1438
|
export const richCaptionActiveFontSchema =
|
|
1439
1439
|
richcaptionpropertiesRichCaptionActiveFontSchema;
|
|
1440
1440
|
|
|
1441
|
+
/**
|
|
1442
|
+
* Font properties for rich captions. Defaults to Roboto.
|
|
1443
|
+
*/
|
|
1444
|
+
export const richcaptionpropertiesRichCaptionFontSchema = z.object({
|
|
1445
|
+
family: z.optional(z.string()).default("Roboto"),
|
|
1446
|
+
size: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int().gte(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(24),
|
|
1447
|
+
weight: z.optional(z.unknown()).default("400"),
|
|
1448
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#ffffff"),
|
|
1449
|
+
opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1450
|
+
background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1451
|
+
}).strict();
|
|
1452
|
+
|
|
1441
1453
|
/**
|
|
1442
1454
|
* Word-level animation properties for caption effects.
|
|
1443
1455
|
*/
|
|
@@ -1459,18 +1471,6 @@ export const richcaptionpropertiesRichCaptionWordAnimationSchema = z.object({
|
|
|
1459
1471
|
export const richCaptionWordAnimationSchema =
|
|
1460
1472
|
richcaptionpropertiesRichCaptionWordAnimationSchema;
|
|
1461
1473
|
|
|
1462
|
-
/**
|
|
1463
|
-
* Word-level timing information for caption animation.
|
|
1464
|
-
*/
|
|
1465
|
-
export const richcaptionpropertiesWordTimingSchema = z.object({
|
|
1466
|
-
text: z.string().min(1),
|
|
1467
|
-
start: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1468
|
-
end: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1469
|
-
confidence: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1470
|
-
}).strict();
|
|
1471
|
-
|
|
1472
|
-
export const wordTimingSchema = richcaptionpropertiesWordTimingSchema;
|
|
1473
|
-
|
|
1474
1474
|
/**
|
|
1475
1475
|
* Text alignment properties (horizontal and vertical).
|
|
1476
1476
|
*/
|
|
@@ -1627,13 +1627,13 @@ export const richTextStyleSchema = richtextpropertiesRichTextStyleSchema;
|
|
|
1627
1627
|
*/
|
|
1628
1628
|
export const richcaptionassetRichCaptionAssetSchema = z.object({
|
|
1629
1629
|
type: z.enum(["rich-caption"]),
|
|
1630
|
-
src: z.
|
|
1631
|
-
|
|
1632
|
-
font: z.optional(richtextpropertiesRichTextFontSchema),
|
|
1630
|
+
src: z.string().min(1),
|
|
1631
|
+
font: z.optional(richcaptionpropertiesRichCaptionFontSchema),
|
|
1633
1632
|
style: z.optional(richtextpropertiesRichTextStyleSchema),
|
|
1634
1633
|
stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
|
|
1635
1634
|
shadow: z.optional(richtextpropertiesRichTextShadowSchema),
|
|
1636
1635
|
background: z.optional(richtextpropertiesRichTextBackgroundSchema),
|
|
1636
|
+
border: z.optional(richtextpropertiesRichTextBorderSchema),
|
|
1637
1637
|
padding: z.optional(
|
|
1638
1638
|
z.union([z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), richtextpropertiesRichTextPaddingSchema]),
|
|
1639
1639
|
),
|
|
@@ -1642,9 +1642,6 @@ export const richcaptionassetRichCaptionAssetSchema = z.object({
|
|
|
1642
1642
|
wordAnimation: z.optional(
|
|
1643
1643
|
richcaptionpropertiesRichCaptionWordAnimationSchema,
|
|
1644
1644
|
),
|
|
1645
|
-
position: z.optional(z.enum(["top", "center", "bottom"])),
|
|
1646
|
-
maxWidth: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0.1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.9),
|
|
1647
|
-
maxLines: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int().gte(1).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(2),
|
|
1648
1645
|
}).strict();
|
|
1649
1646
|
|
|
1650
1647
|
export const richCaptionAssetSchema = richcaptionassetRichCaptionAssetSchema;
|
package/package.json
CHANGED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "WordTiming",
|
|
3
|
-
"strict": true,
|
|
4
|
-
"schema": {
|
|
5
|
-
"description": "Word-level timing information for caption animation.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"properties": {
|
|
8
|
-
"text": {
|
|
9
|
-
"description": "The word text to display.",
|
|
10
|
-
"type": "string"
|
|
11
|
-
},
|
|
12
|
-
"start": {
|
|
13
|
-
"description": "Start time of the word in milliseconds.",
|
|
14
|
-
"type": "number",
|
|
15
|
-
"minimum": 0
|
|
16
|
-
},
|
|
17
|
-
"end": {
|
|
18
|
-
"description": "End time of the word in milliseconds.",
|
|
19
|
-
"type": "number",
|
|
20
|
-
"minimum": 0
|
|
21
|
-
},
|
|
22
|
-
"confidence": {
|
|
23
|
-
"anyOf": [
|
|
24
|
-
{
|
|
25
|
-
"type": "number",
|
|
26
|
-
"description": "Speech-to-text confidence score between 0 and 1.",
|
|
27
|
-
"minimum": 0,
|
|
28
|
-
"maximum": 1
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"type": "null"
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"additionalProperties": false,
|
|
37
|
-
"required": [
|
|
38
|
-
"text",
|
|
39
|
-
"start",
|
|
40
|
-
"end",
|
|
41
|
-
"confidence"
|
|
42
|
-
]
|
|
43
|
-
}
|
|
44
|
-
}
|