@shotstack/schemas 1.9.1 → 1.9.3
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 +40 -7
- package/dist/json-schema/asset.json +74 -17
- package/dist/json-schema/clip.json +74 -17
- package/dist/json-schema/edit.json +74 -17
- package/dist/json-schema/rich-caption-asset.json +162 -105
- package/dist/json-schema/schemas.json +80 -19
- package/dist/json-schema/timeline.json +74 -17
- package/dist/json-schema/track.json +74 -17
- package/dist/schema.d.ts +27 -5
- package/dist/zod/zod.gen.cjs +67 -41
- package/dist/zod/zod.gen.d.ts +115 -337
- package/dist/zod/zod.gen.js +62 -36
- package/dist/zod/zod.gen.ts +47 -32
- package/package.json +1 -1
package/dist/zod/zod.gen.js
CHANGED
|
@@ -1398,12 +1398,7 @@ export const richcaptionpropertiesRichCaptionFontSchema = z.object({
|
|
|
1398
1398
|
return v;
|
|
1399
1399
|
return Number(v);
|
|
1400
1400
|
} return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1401
|
-
background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
1402
|
-
textDecoration: z.optional(z.enum([
|
|
1403
|
-
'none',
|
|
1404
|
-
'underline',
|
|
1405
|
-
'line-through'
|
|
1406
|
-
]))
|
|
1401
|
+
background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
1407
1402
|
}).strict();
|
|
1408
1403
|
/**
|
|
1409
1404
|
* Word-level animation properties for caption effects.
|
|
@@ -1543,6 +1538,37 @@ export const richtextpropertiesRichTextGradientSchema = z.object({
|
|
|
1543
1538
|
})).min(2)
|
|
1544
1539
|
}).strict();
|
|
1545
1540
|
export const richTextGradientSchema = richtextpropertiesRichTextGradientSchema;
|
|
1541
|
+
/**
|
|
1542
|
+
* Text style properties for rich captions. Same as RichTextStyle but without wordSpacing.
|
|
1543
|
+
*/
|
|
1544
|
+
export const richcaptionpropertiesRichCaptionStyleSchema = z.object({
|
|
1545
|
+
letterSpacing: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1546
|
+
return undefined; if (Array.isArray(v))
|
|
1547
|
+
return v; if (typeof v === 'string') {
|
|
1548
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1549
|
+
return v;
|
|
1550
|
+
return Number(v);
|
|
1551
|
+
} return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1552
|
+
lineHeight: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1553
|
+
return undefined; if (Array.isArray(v))
|
|
1554
|
+
return v; if (typeof v === 'string') {
|
|
1555
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1556
|
+
return v;
|
|
1557
|
+
return Number(v);
|
|
1558
|
+
} return v; }), z.number().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1.2),
|
|
1559
|
+
textTransform: z.optional(z.enum([
|
|
1560
|
+
'none',
|
|
1561
|
+
'uppercase',
|
|
1562
|
+
'lowercase',
|
|
1563
|
+
'capitalize'
|
|
1564
|
+
])),
|
|
1565
|
+
textDecoration: z.optional(z.enum([
|
|
1566
|
+
'none',
|
|
1567
|
+
'underline',
|
|
1568
|
+
'line-through'
|
|
1569
|
+
])),
|
|
1570
|
+
gradient: z.optional(richtextpropertiesRichTextGradientSchema)
|
|
1571
|
+
}).strict();
|
|
1546
1572
|
/**
|
|
1547
1573
|
* Padding properties for individual sides of the text bounding box.
|
|
1548
1574
|
*/
|
|
@@ -1654,6 +1680,36 @@ export const richcaptionpropertiesRichCaptionActiveSchema = z.object({
|
|
|
1654
1680
|
} return v; }), z.number().gte(0.5).lte(2)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
|
|
1655
1681
|
}).strict();
|
|
1656
1682
|
export const richCaptionActiveSchema = richcaptionpropertiesRichCaptionActiveSchema;
|
|
1683
|
+
/**
|
|
1684
|
+
* The RichCaptionAsset provides word-level caption animations with rich-text styling. It supports
|
|
1685
|
+
* karaoke-style highlighting, word-by-word animations, and advanced typography. Use with SRT/VTT
|
|
1686
|
+
* files or auto-transcription via aliases.
|
|
1687
|
+
*
|
|
1688
|
+
*/
|
|
1689
|
+
export const richcaptionassetRichCaptionAssetSchema = z.object({
|
|
1690
|
+
type: z.enum(['rich-caption']),
|
|
1691
|
+
src: z.string().min(1),
|
|
1692
|
+
font: z.optional(richcaptionpropertiesRichCaptionFontSchema),
|
|
1693
|
+
style: z.optional(richcaptionpropertiesRichCaptionStyleSchema),
|
|
1694
|
+
stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
|
|
1695
|
+
shadow: z.optional(richtextpropertiesRichTextShadowSchema),
|
|
1696
|
+
background: z.optional(richtextpropertiesRichTextBackgroundSchema),
|
|
1697
|
+
border: z.optional(richtextpropertiesRichTextBorderSchema),
|
|
1698
|
+
padding: z.optional(z.union([
|
|
1699
|
+
z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1700
|
+
return undefined; if (Array.isArray(v))
|
|
1701
|
+
return v; if (typeof v === 'string') {
|
|
1702
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1703
|
+
return v;
|
|
1704
|
+
return Number(v);
|
|
1705
|
+
} return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1706
|
+
richtextpropertiesRichTextPaddingSchema
|
|
1707
|
+
])),
|
|
1708
|
+
align: z.optional(richtextpropertiesRichTextAlignmentSchema),
|
|
1709
|
+
active: z.optional(richcaptionpropertiesRichCaptionActiveSchema),
|
|
1710
|
+
wordAnimation: z.optional(richcaptionpropertiesRichCaptionWordAnimationSchema)
|
|
1711
|
+
}).strict();
|
|
1712
|
+
export const richCaptionAssetSchema = richcaptionassetRichCaptionAssetSchema;
|
|
1657
1713
|
/**
|
|
1658
1714
|
* Font properties for rich text.
|
|
1659
1715
|
*/
|
|
@@ -1718,36 +1774,6 @@ export const richtextpropertiesRichTextStyleSchema = z.object({
|
|
|
1718
1774
|
gradient: z.optional(richtextpropertiesRichTextGradientSchema)
|
|
1719
1775
|
}).strict();
|
|
1720
1776
|
export const richTextStyleSchema = richtextpropertiesRichTextStyleSchema;
|
|
1721
|
-
/**
|
|
1722
|
-
* The RichCaptionAsset provides word-level caption animations with rich-text styling. It supports
|
|
1723
|
-
* karaoke-style highlighting, word-by-word animations, and advanced typography. Use with SRT/VTT
|
|
1724
|
-
* files or auto-transcription via aliases.
|
|
1725
|
-
*
|
|
1726
|
-
*/
|
|
1727
|
-
export const richcaptionassetRichCaptionAssetSchema = z.object({
|
|
1728
|
-
type: z.enum(['rich-caption']),
|
|
1729
|
-
src: z.string().min(1),
|
|
1730
|
-
font: z.optional(richcaptionpropertiesRichCaptionFontSchema),
|
|
1731
|
-
style: z.optional(richtextpropertiesRichTextStyleSchema),
|
|
1732
|
-
stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
|
|
1733
|
-
shadow: z.optional(richtextpropertiesRichTextShadowSchema),
|
|
1734
|
-
background: z.optional(richtextpropertiesRichTextBackgroundSchema),
|
|
1735
|
-
border: z.optional(richtextpropertiesRichTextBorderSchema),
|
|
1736
|
-
padding: z.optional(z.union([
|
|
1737
|
-
z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1738
|
-
return undefined; if (Array.isArray(v))
|
|
1739
|
-
return v; if (typeof v === 'string') {
|
|
1740
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1741
|
-
return v;
|
|
1742
|
-
return Number(v);
|
|
1743
|
-
} return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1744
|
-
richtextpropertiesRichTextPaddingSchema
|
|
1745
|
-
])),
|
|
1746
|
-
align: z.optional(richtextpropertiesRichTextAlignmentSchema),
|
|
1747
|
-
active: z.optional(richcaptionpropertiesRichCaptionActiveSchema),
|
|
1748
|
-
wordAnimation: z.optional(richcaptionpropertiesRichCaptionWordAnimationSchema)
|
|
1749
|
-
}).strict();
|
|
1750
|
-
export const richCaptionAssetSchema = richcaptionassetRichCaptionAssetSchema;
|
|
1751
1777
|
/**
|
|
1752
1778
|
* The RichTextAsset provides advanced text rendering with support for custom fonts, gradients, shadows, strokes,
|
|
1753
1779
|
* animations, and styling options. It offers more flexibility and visual effects than the basic TextAsset.
|
package/dist/zod/zod.gen.ts
CHANGED
|
@@ -1356,12 +1356,7 @@ export const richcaptionpropertiesRichCaptionFontSchema = z.object({
|
|
|
1356
1356
|
weight: z.optional(z.unknown()).default('400'),
|
|
1357
1357
|
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#ffffff'),
|
|
1358
1358
|
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),
|
|
1359
|
-
background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
1360
|
-
textDecoration: z.optional(z.enum([
|
|
1361
|
-
'none',
|
|
1362
|
-
'underline',
|
|
1363
|
-
'line-through'
|
|
1364
|
-
]))
|
|
1359
|
+
background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
1365
1360
|
}).strict();
|
|
1366
1361
|
|
|
1367
1362
|
/**
|
|
@@ -1465,6 +1460,26 @@ export const richtextpropertiesRichTextGradientSchema = z.object({
|
|
|
1465
1460
|
|
|
1466
1461
|
export const richTextGradientSchema = richtextpropertiesRichTextGradientSchema;
|
|
1467
1462
|
|
|
1463
|
+
/**
|
|
1464
|
+
* Text style properties for rich captions. Same as RichTextStyle but without wordSpacing.
|
|
1465
|
+
*/
|
|
1466
|
+
export const richcaptionpropertiesRichCaptionStyleSchema = z.object({
|
|
1467
|
+
letterSpacing: 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()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1468
|
+
lineHeight: 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(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1.2),
|
|
1469
|
+
textTransform: z.optional(z.enum([
|
|
1470
|
+
'none',
|
|
1471
|
+
'uppercase',
|
|
1472
|
+
'lowercase',
|
|
1473
|
+
'capitalize'
|
|
1474
|
+
])),
|
|
1475
|
+
textDecoration: z.optional(z.enum([
|
|
1476
|
+
'none',
|
|
1477
|
+
'underline',
|
|
1478
|
+
'line-through'
|
|
1479
|
+
])),
|
|
1480
|
+
gradient: z.optional(richtextpropertiesRichTextGradientSchema)
|
|
1481
|
+
}).strict();
|
|
1482
|
+
|
|
1468
1483
|
/**
|
|
1469
1484
|
* Padding properties for individual sides of the text bounding box.
|
|
1470
1485
|
*/
|
|
@@ -1517,6 +1532,32 @@ export const richcaptionpropertiesRichCaptionActiveSchema = z.object({
|
|
|
1517
1532
|
|
|
1518
1533
|
export const richCaptionActiveSchema = richcaptionpropertiesRichCaptionActiveSchema;
|
|
1519
1534
|
|
|
1535
|
+
/**
|
|
1536
|
+
* The RichCaptionAsset provides word-level caption animations with rich-text styling. It supports
|
|
1537
|
+
* karaoke-style highlighting, word-by-word animations, and advanced typography. Use with SRT/VTT
|
|
1538
|
+
* files or auto-transcription via aliases.
|
|
1539
|
+
*
|
|
1540
|
+
*/
|
|
1541
|
+
export const richcaptionassetRichCaptionAssetSchema = z.object({
|
|
1542
|
+
type: z.enum(['rich-caption']),
|
|
1543
|
+
src: z.string().min(1),
|
|
1544
|
+
font: z.optional(richcaptionpropertiesRichCaptionFontSchema),
|
|
1545
|
+
style: z.optional(richcaptionpropertiesRichCaptionStyleSchema),
|
|
1546
|
+
stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
|
|
1547
|
+
shadow: z.optional(richtextpropertiesRichTextShadowSchema),
|
|
1548
|
+
background: z.optional(richtextpropertiesRichTextBackgroundSchema),
|
|
1549
|
+
border: z.optional(richtextpropertiesRichTextBorderSchema),
|
|
1550
|
+
padding: z.optional(z.union([
|
|
1551
|
+
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*\}\}$/)]),
|
|
1552
|
+
richtextpropertiesRichTextPaddingSchema
|
|
1553
|
+
])),
|
|
1554
|
+
align: z.optional(richtextpropertiesRichTextAlignmentSchema),
|
|
1555
|
+
active: z.optional(richcaptionpropertiesRichCaptionActiveSchema),
|
|
1556
|
+
wordAnimation: z.optional(richcaptionpropertiesRichCaptionWordAnimationSchema)
|
|
1557
|
+
}).strict();
|
|
1558
|
+
|
|
1559
|
+
export const richCaptionAssetSchema = richcaptionassetRichCaptionAssetSchema;
|
|
1560
|
+
|
|
1520
1561
|
/**
|
|
1521
1562
|
* Font properties for rich text.
|
|
1522
1563
|
*/
|
|
@@ -1555,32 +1596,6 @@ export const richtextpropertiesRichTextStyleSchema = z.object({
|
|
|
1555
1596
|
|
|
1556
1597
|
export const richTextStyleSchema = richtextpropertiesRichTextStyleSchema;
|
|
1557
1598
|
|
|
1558
|
-
/**
|
|
1559
|
-
* The RichCaptionAsset provides word-level caption animations with rich-text styling. It supports
|
|
1560
|
-
* karaoke-style highlighting, word-by-word animations, and advanced typography. Use with SRT/VTT
|
|
1561
|
-
* files or auto-transcription via aliases.
|
|
1562
|
-
*
|
|
1563
|
-
*/
|
|
1564
|
-
export const richcaptionassetRichCaptionAssetSchema = z.object({
|
|
1565
|
-
type: z.enum(['rich-caption']),
|
|
1566
|
-
src: z.string().min(1),
|
|
1567
|
-
font: z.optional(richcaptionpropertiesRichCaptionFontSchema),
|
|
1568
|
-
style: z.optional(richtextpropertiesRichTextStyleSchema),
|
|
1569
|
-
stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
|
|
1570
|
-
shadow: z.optional(richtextpropertiesRichTextShadowSchema),
|
|
1571
|
-
background: z.optional(richtextpropertiesRichTextBackgroundSchema),
|
|
1572
|
-
border: z.optional(richtextpropertiesRichTextBorderSchema),
|
|
1573
|
-
padding: z.optional(z.union([
|
|
1574
|
-
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*\}\}$/)]),
|
|
1575
|
-
richtextpropertiesRichTextPaddingSchema
|
|
1576
|
-
])),
|
|
1577
|
-
align: z.optional(richtextpropertiesRichTextAlignmentSchema),
|
|
1578
|
-
active: z.optional(richcaptionpropertiesRichCaptionActiveSchema),
|
|
1579
|
-
wordAnimation: z.optional(richcaptionpropertiesRichCaptionWordAnimationSchema)
|
|
1580
|
-
}).strict();
|
|
1581
|
-
|
|
1582
|
-
export const richCaptionAssetSchema = richcaptionassetRichCaptionAssetSchema;
|
|
1583
|
-
|
|
1584
1599
|
/**
|
|
1585
1600
|
* The RichTextAsset provides advanced text rendering with support for custom fonts, gradients, shadows, strokes,
|
|
1586
1601
|
* animations, and styling options. It offers more flexibility and visual effects than the basic TextAsset.
|