@shotstack/schemas 1.9.7 → 1.9.8
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 +8 -767
- package/dist/json-schema/destinations.json +28 -12
- package/dist/json-schema/edit.json +28 -12
- package/dist/json-schema/output.json +28 -12
- package/dist/json-schema/schemas.json +32 -16
- package/dist/schema.d.ts +0 -513
- package/dist/zod/zod.gen.cjs +19 -517
- package/dist/zod/zod.gen.d.ts +116 -702
- package/dist/zod/zod.gen.js +16 -513
- package/dist/zod/zod.gen.ts +16 -301
- package/package.json +1 -1
package/dist/zod/zod.gen.js
CHANGED
|
@@ -201,8 +201,14 @@ export const cropSchema = cropCropSchema;
|
|
|
201
201
|
export const akamaiNetStorageDestinationOptionsAkamaiNetStorageDestinationOptionsSchema = z.object({
|
|
202
202
|
host: z.string(),
|
|
203
203
|
cpCode: z.string(),
|
|
204
|
-
path: z.optional(z.
|
|
205
|
-
|
|
204
|
+
path: z.optional(z.union([
|
|
205
|
+
z.string(),
|
|
206
|
+
z.null()
|
|
207
|
+
])),
|
|
208
|
+
filename: z.optional(z.union([
|
|
209
|
+
z.string(),
|
|
210
|
+
z.null()
|
|
211
|
+
]))
|
|
206
212
|
}).strict();
|
|
207
213
|
/**
|
|
208
214
|
* Send videos and assets to [Akamai NetStorage](https://techdocs.akamai.com/netstorage-usage/docs). Send files to your NetStorage upload directory with a custom path and filename. Akamai credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/akamai-netstorage), not in the request.
|
|
@@ -217,8 +223,14 @@ export const akamaiNetStorageDestinationAkamaiNetStorageDestinationSchema = z.ob
|
|
|
217
223
|
export const azureBlobStorageDestinationOptionsAzureBlobStorageDestinationOptionsSchema = z.object({
|
|
218
224
|
accountName: z.string(),
|
|
219
225
|
container: z.string(),
|
|
220
|
-
prefix: z.optional(z.
|
|
221
|
-
|
|
226
|
+
prefix: z.optional(z.union([
|
|
227
|
+
z.string(),
|
|
228
|
+
z.null()
|
|
229
|
+
])),
|
|
230
|
+
filename: z.optional(z.union([
|
|
231
|
+
z.string(),
|
|
232
|
+
z.null()
|
|
233
|
+
]))
|
|
222
234
|
}).strict();
|
|
223
235
|
/**
|
|
224
236
|
* Send videos and assets to [Azure Blob Storage](https://learn.microsoft.com/en-us/azure/storage/blobs/). Send files to any container with a custom prefix and filename. Azure credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/azure-blob-storage), not in the request.
|
|
@@ -1638,515 +1650,6 @@ export const svgassetSvgAssetSchema = z.object({
|
|
|
1638
1650
|
src: z.string().min(1).max(500000),
|
|
1639
1651
|
}).strict();
|
|
1640
1652
|
export const svgAssetSchema = svgassetSvgAssetSchema;
|
|
1641
|
-
/**
|
|
1642
|
-
* A color stop in a gradient. Each stop defines a color at a specific position
|
|
1643
|
-
* along the gradient vector. Gradients require at least 2 stops.
|
|
1644
|
-
*
|
|
1645
|
-
*/
|
|
1646
|
-
export const svgpropertiesSvgGradientStopSchema = z.object({
|
|
1647
|
-
offset: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1648
|
-
return undefined; if (Array.isArray(v))
|
|
1649
|
-
return v; if (typeof v === 'string') {
|
|
1650
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1651
|
-
return v;
|
|
1652
|
-
return Number(v);
|
|
1653
|
-
} return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1654
|
-
color: z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
1655
|
-
}).strict();
|
|
1656
|
-
export const svgGradientStopSchema = svgpropertiesSvgGradientStopSchema;
|
|
1657
|
-
/**
|
|
1658
|
-
* A linear gradient fill that transitions colors along a straight line.
|
|
1659
|
-
* The gradient direction is controlled by the `angle` property.
|
|
1660
|
-
*
|
|
1661
|
-
*/
|
|
1662
|
-
export const svgpropertiesSvgLinearGradientFillSchema = z.object({
|
|
1663
|
-
type: z.enum(['linear']),
|
|
1664
|
-
angle: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1665
|
-
return undefined; if (Array.isArray(v))
|
|
1666
|
-
return v; if (typeof v === 'string') {
|
|
1667
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1668
|
-
return v;
|
|
1669
|
-
return Number(v);
|
|
1670
|
-
} return v; }), z.number().gte(0).lte(360)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1671
|
-
stops: z.array(svgpropertiesSvgGradientStopSchema).min(2),
|
|
1672
|
-
opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1673
|
-
return undefined; if (Array.isArray(v))
|
|
1674
|
-
return v; if (typeof v === 'string') {
|
|
1675
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1676
|
-
return v;
|
|
1677
|
-
return Number(v);
|
|
1678
|
-
} return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
|
|
1679
|
-
}).strict();
|
|
1680
|
-
export const svgLinearGradientFillSchema = svgpropertiesSvgLinearGradientFillSchema;
|
|
1681
|
-
/**
|
|
1682
|
-
* A radial gradient fill that transitions colors radiating outward from a center point.
|
|
1683
|
-
* The gradient creates a circular or elliptical color transition.
|
|
1684
|
-
*
|
|
1685
|
-
*/
|
|
1686
|
-
export const svgpropertiesSvgRadialGradientFillSchema = z.object({
|
|
1687
|
-
type: z.enum(['radial']),
|
|
1688
|
-
stops: z.array(svgpropertiesSvgGradientStopSchema).min(2),
|
|
1689
|
-
opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1690
|
-
return undefined; if (Array.isArray(v))
|
|
1691
|
-
return v; if (typeof v === 'string') {
|
|
1692
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1693
|
-
return v;
|
|
1694
|
-
return Number(v);
|
|
1695
|
-
} return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
|
|
1696
|
-
}).strict();
|
|
1697
|
-
export const svgRadialGradientFillSchema = svgpropertiesSvgRadialGradientFillSchema;
|
|
1698
|
-
/**
|
|
1699
|
-
* Drop shadow properties for SVG shapes. Creates a shadow effect behind the shape.
|
|
1700
|
-
*
|
|
1701
|
-
*/
|
|
1702
|
-
export const svgpropertiesSvgShadowSchema = z.object({
|
|
1703
|
-
offsetX: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1704
|
-
return undefined; if (Array.isArray(v))
|
|
1705
|
-
return v; if (typeof v === 'string') {
|
|
1706
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1707
|
-
return v;
|
|
1708
|
-
return Number(v);
|
|
1709
|
-
} return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1710
|
-
offsetY: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1711
|
-
return undefined; if (Array.isArray(v))
|
|
1712
|
-
return v; if (typeof v === 'string') {
|
|
1713
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1714
|
-
return v;
|
|
1715
|
-
return Number(v);
|
|
1716
|
-
} return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1717
|
-
blur: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1718
|
-
return undefined; if (Array.isArray(v))
|
|
1719
|
-
return v; if (typeof v === 'string') {
|
|
1720
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1721
|
-
return v;
|
|
1722
|
-
return Number(v);
|
|
1723
|
-
} return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1724
|
-
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
|
|
1725
|
-
opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1726
|
-
return undefined; if (Array.isArray(v))
|
|
1727
|
-
return v; if (typeof v === 'string') {
|
|
1728
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1729
|
-
return v;
|
|
1730
|
-
return Number(v);
|
|
1731
|
-
} return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5)
|
|
1732
|
-
}).strict();
|
|
1733
|
-
export const svgShadowSchema = svgpropertiesSvgShadowSchema;
|
|
1734
|
-
/**
|
|
1735
|
-
* A solid color fill for SVG shapes.
|
|
1736
|
-
*/
|
|
1737
|
-
export const svgpropertiesSvgSolidFillSchema = z.object({
|
|
1738
|
-
type: z.enum(['solid']),
|
|
1739
|
-
color: z.string().regex(/^#[A-Fa-f0-9]{6}$/).default('#000000'),
|
|
1740
|
-
opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1741
|
-
return undefined; if (Array.isArray(v))
|
|
1742
|
-
return v; if (typeof v === 'string') {
|
|
1743
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1744
|
-
return v;
|
|
1745
|
-
return Number(v);
|
|
1746
|
-
} return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
|
|
1747
|
-
}).strict();
|
|
1748
|
-
export const svgSolidFillSchema = svgpropertiesSvgSolidFillSchema;
|
|
1749
|
-
/**
|
|
1750
|
-
* Fill properties for SVG shapes. Supports solid colors and gradients.
|
|
1751
|
-
* The fill defines how the interior of a shape is painted.
|
|
1752
|
-
*
|
|
1753
|
-
*/
|
|
1754
|
-
export const svgpropertiesSvgFillSchema = z.discriminatedUnion("type", [
|
|
1755
|
-
svgpropertiesSvgSolidFillSchema,
|
|
1756
|
-
svgpropertiesSvgLinearGradientFillSchema,
|
|
1757
|
-
svgpropertiesSvgRadialGradientFillSchema,
|
|
1758
|
-
]);
|
|
1759
|
-
export const svgFillSchema = svgpropertiesSvgFillSchema;
|
|
1760
|
-
/**
|
|
1761
|
-
* Stroke (outline) properties for SVG shapes. The stroke defines how the outline
|
|
1762
|
-
* of a shape is painted, including its color, width, and line style.
|
|
1763
|
-
*
|
|
1764
|
-
*/
|
|
1765
|
-
export const svgpropertiesSvgStrokeSchema = z.object({
|
|
1766
|
-
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
|
|
1767
|
-
width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1768
|
-
return undefined; if (Array.isArray(v))
|
|
1769
|
-
return v; if (typeof v === 'string') {
|
|
1770
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1771
|
-
return v;
|
|
1772
|
-
return Number(v);
|
|
1773
|
-
} return v; }), z.number().gte(0).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1774
|
-
opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1775
|
-
return undefined; if (Array.isArray(v))
|
|
1776
|
-
return v; if (typeof v === 'string') {
|
|
1777
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1778
|
-
return v;
|
|
1779
|
-
return Number(v);
|
|
1780
|
-
} return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1781
|
-
lineCap: z.optional(z.enum([
|
|
1782
|
-
'butt',
|
|
1783
|
-
'round',
|
|
1784
|
-
'square'
|
|
1785
|
-
])),
|
|
1786
|
-
lineJoin: z.optional(z.enum([
|
|
1787
|
-
'miter',
|
|
1788
|
-
'round',
|
|
1789
|
-
'bevel'
|
|
1790
|
-
])),
|
|
1791
|
-
dashArray: z.optional(z.array(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1792
|
-
return undefined; if (Array.isArray(v))
|
|
1793
|
-
return v; if (typeof v === 'string') {
|
|
1794
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1795
|
-
return v;
|
|
1796
|
-
return Number(v);
|
|
1797
|
-
} return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))),
|
|
1798
|
-
dashOffset: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1799
|
-
return undefined; if (Array.isArray(v))
|
|
1800
|
-
return v; if (typeof v === 'string') {
|
|
1801
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1802
|
-
return v;
|
|
1803
|
-
return Number(v);
|
|
1804
|
-
} return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0)
|
|
1805
|
-
}).strict();
|
|
1806
|
-
export const svgStrokeSchema = svgpropertiesSvgStrokeSchema;
|
|
1807
|
-
/**
|
|
1808
|
-
* Transformation properties for positioning, rotating, and scaling SVG shapes.
|
|
1809
|
-
*
|
|
1810
|
-
*/
|
|
1811
|
-
export const svgpropertiesSvgTransformSchema = z.object({
|
|
1812
|
-
x: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1813
|
-
return undefined; if (Array.isArray(v))
|
|
1814
|
-
return v; if (typeof v === 'string') {
|
|
1815
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1816
|
-
return v;
|
|
1817
|
-
return Number(v);
|
|
1818
|
-
} return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1819
|
-
y: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1820
|
-
return undefined; if (Array.isArray(v))
|
|
1821
|
-
return v; if (typeof v === 'string') {
|
|
1822
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1823
|
-
return v;
|
|
1824
|
-
return Number(v);
|
|
1825
|
-
} return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1826
|
-
rotation: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1827
|
-
return undefined; if (Array.isArray(v))
|
|
1828
|
-
return v; if (typeof v === 'string') {
|
|
1829
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1830
|
-
return v;
|
|
1831
|
-
return Number(v);
|
|
1832
|
-
} return v; }), z.number().gte(-360).lte(360)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1833
|
-
scale: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1834
|
-
return undefined; if (Array.isArray(v))
|
|
1835
|
-
return v; if (typeof v === 'string') {
|
|
1836
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1837
|
-
return v;
|
|
1838
|
-
return Number(v);
|
|
1839
|
-
} return v; }), z.number().gte(0.01).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1840
|
-
originX: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1841
|
-
return undefined; if (Array.isArray(v))
|
|
1842
|
-
return v; if (typeof v === 'string') {
|
|
1843
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1844
|
-
return v;
|
|
1845
|
-
return Number(v);
|
|
1846
|
-
} return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
|
|
1847
|
-
originY: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1848
|
-
return undefined; if (Array.isArray(v))
|
|
1849
|
-
return v; if (typeof v === 'string') {
|
|
1850
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1851
|
-
return v;
|
|
1852
|
-
return Number(v);
|
|
1853
|
-
} return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5)
|
|
1854
|
-
}).strict();
|
|
1855
|
-
export const svgTransformSchema = svgpropertiesSvgTransformSchema;
|
|
1856
|
-
/**
|
|
1857
|
-
* An arrow shape pointing to the right by default.
|
|
1858
|
-
* Use transform rotation to change direction.
|
|
1859
|
-
*
|
|
1860
|
-
*/
|
|
1861
|
-
export const svgshapesSvgArrowShapeSchema = z.object({
|
|
1862
|
-
type: z.enum(['arrow']),
|
|
1863
|
-
length: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1864
|
-
return undefined; if (Array.isArray(v))
|
|
1865
|
-
return v; if (typeof v === 'string') {
|
|
1866
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1867
|
-
return v;
|
|
1868
|
-
return Number(v);
|
|
1869
|
-
} return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1870
|
-
headWidth: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1871
|
-
return undefined; if (Array.isArray(v))
|
|
1872
|
-
return v; if (typeof v === 'string') {
|
|
1873
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1874
|
-
return v;
|
|
1875
|
-
return Number(v);
|
|
1876
|
-
} return v; }), z.number().gte(1).lte(1000)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1877
|
-
headLength: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1878
|
-
return undefined; if (Array.isArray(v))
|
|
1879
|
-
return v; if (typeof v === 'string') {
|
|
1880
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1881
|
-
return v;
|
|
1882
|
-
return Number(v);
|
|
1883
|
-
} return v; }), z.number().gte(1).lte(1000)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1884
|
-
shaftWidth: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1885
|
-
return undefined; if (Array.isArray(v))
|
|
1886
|
-
return v; if (typeof v === 'string') {
|
|
1887
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1888
|
-
return v;
|
|
1889
|
-
return Number(v);
|
|
1890
|
-
} return v; }), z.number().gte(1).lte(1000)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
1891
|
-
}).strict();
|
|
1892
|
-
export const svgArrowShapeSchema = svgshapesSvgArrowShapeSchema;
|
|
1893
|
-
/**
|
|
1894
|
-
* A perfect circle shape defined by its radius.
|
|
1895
|
-
* The circle is centered at the shape's position.
|
|
1896
|
-
*
|
|
1897
|
-
*/
|
|
1898
|
-
export const svgshapesSvgCircleShapeSchema = z.object({
|
|
1899
|
-
type: z.enum(['circle']),
|
|
1900
|
-
radius: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1901
|
-
return undefined; if (Array.isArray(v))
|
|
1902
|
-
return v; if (typeof v === 'string') {
|
|
1903
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1904
|
-
return v;
|
|
1905
|
-
return Number(v);
|
|
1906
|
-
} return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
1907
|
-
}).strict();
|
|
1908
|
-
export const svgCircleShapeSchema = svgshapesSvgCircleShapeSchema;
|
|
1909
|
-
/**
|
|
1910
|
-
* A cross or plus shape with equal or different arm lengths.
|
|
1911
|
-
* Can be styled as a plus sign (+) or a cross (x with rotation).
|
|
1912
|
-
*
|
|
1913
|
-
*/
|
|
1914
|
-
export const svgshapesSvgCrossShapeSchema = z.object({
|
|
1915
|
-
type: z.enum(['cross']),
|
|
1916
|
-
width: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1917
|
-
return undefined; if (Array.isArray(v))
|
|
1918
|
-
return v; if (typeof v === 'string') {
|
|
1919
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1920
|
-
return v;
|
|
1921
|
-
return Number(v);
|
|
1922
|
-
} return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1923
|
-
height: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1924
|
-
return undefined; if (Array.isArray(v))
|
|
1925
|
-
return v; if (typeof v === 'string') {
|
|
1926
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1927
|
-
return v;
|
|
1928
|
-
return Number(v);
|
|
1929
|
-
} return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1930
|
-
thickness: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1931
|
-
return undefined; if (Array.isArray(v))
|
|
1932
|
-
return v; if (typeof v === 'string') {
|
|
1933
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1934
|
-
return v;
|
|
1935
|
-
return Number(v);
|
|
1936
|
-
} return v; }), z.number().gte(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
1937
|
-
}).strict();
|
|
1938
|
-
export const svgCrossShapeSchema = svgshapesSvgCrossShapeSchema;
|
|
1939
|
-
/**
|
|
1940
|
-
* An ellipse (oval) shape with separate horizontal and vertical radii.
|
|
1941
|
-
* The ellipse is centered at the shape's position.
|
|
1942
|
-
*
|
|
1943
|
-
*/
|
|
1944
|
-
export const svgshapesSvgEllipseShapeSchema = z.object({
|
|
1945
|
-
type: z.enum(['ellipse']),
|
|
1946
|
-
radiusX: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1947
|
-
return undefined; if (Array.isArray(v))
|
|
1948
|
-
return v; if (typeof v === 'string') {
|
|
1949
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1950
|
-
return v;
|
|
1951
|
-
return Number(v);
|
|
1952
|
-
} return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1953
|
-
radiusY: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1954
|
-
return undefined; if (Array.isArray(v))
|
|
1955
|
-
return v; if (typeof v === 'string') {
|
|
1956
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1957
|
-
return v;
|
|
1958
|
-
return Number(v);
|
|
1959
|
-
} return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
1960
|
-
}).strict();
|
|
1961
|
-
export const svgEllipseShapeSchema = svgshapesSvgEllipseShapeSchema;
|
|
1962
|
-
/**
|
|
1963
|
-
* A heart shape commonly used for love/like icons.
|
|
1964
|
-
* The heart is defined by a single size parameter.
|
|
1965
|
-
*
|
|
1966
|
-
*/
|
|
1967
|
-
export const svgshapesSvgHeartShapeSchema = z.object({
|
|
1968
|
-
type: z.enum(['heart']),
|
|
1969
|
-
size: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1970
|
-
return undefined; if (Array.isArray(v))
|
|
1971
|
-
return v; if (typeof v === 'string') {
|
|
1972
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1973
|
-
return v;
|
|
1974
|
-
return Number(v);
|
|
1975
|
-
} return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
1976
|
-
}).strict();
|
|
1977
|
-
export const svgHeartShapeSchema = svgshapesSvgHeartShapeSchema;
|
|
1978
|
-
/**
|
|
1979
|
-
* A straight line shape with a specified length and thickness.
|
|
1980
|
-
* The line is drawn horizontally by default and can be rotated using transform.
|
|
1981
|
-
*
|
|
1982
|
-
*/
|
|
1983
|
-
export const svgshapesSvgLineShapeSchema = z.object({
|
|
1984
|
-
type: z.enum(['line']),
|
|
1985
|
-
length: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1986
|
-
return undefined; if (Array.isArray(v))
|
|
1987
|
-
return v; if (typeof v === 'string') {
|
|
1988
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1989
|
-
return v;
|
|
1990
|
-
return Number(v);
|
|
1991
|
-
} return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1992
|
-
thickness: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1993
|
-
return undefined; if (Array.isArray(v))
|
|
1994
|
-
return v; if (typeof v === 'string') {
|
|
1995
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1996
|
-
return v;
|
|
1997
|
-
return Number(v);
|
|
1998
|
-
} return v; }), z.number().gte(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
1999
|
-
}).strict();
|
|
2000
|
-
export const svgLineShapeSchema = svgshapesSvgLineShapeSchema;
|
|
2001
|
-
/**
|
|
2002
|
-
* A custom shape defined by SVG path data.
|
|
2003
|
-
* Supports all standard SVG path commands for creating complex shapes.
|
|
2004
|
-
*
|
|
2005
|
-
* **Path Commands:**
|
|
2006
|
-
* - `M x y` / `m dx dy` - Move to (absolute/relative)
|
|
2007
|
-
* - `L x y` / `l dx dy` - Line to
|
|
2008
|
-
* - `H x` / `h dx` - Horizontal line to
|
|
2009
|
-
* - `V y` / `v dy` - Vertical line to
|
|
2010
|
-
* - `C x1 y1 x2 y2 x y` / `c` - Cubic Bezier curve
|
|
2011
|
-
* - `S x2 y2 x y` / `s` - Smooth cubic Bezier
|
|
2012
|
-
* - `Q x1 y1 x y` / `q` - Quadratic Bezier curve
|
|
2013
|
-
* - `T x y` / `t` - Smooth quadratic Bezier
|
|
2014
|
-
* - `A rx ry angle large-arc sweep x y` / `a` - Elliptical arc
|
|
2015
|
-
* - `Z` / `z` - Close path
|
|
2016
|
-
*
|
|
2017
|
-
*/
|
|
2018
|
-
export const svgshapesSvgPathShapeSchema = z.object({
|
|
2019
|
-
type: z.enum(['path']),
|
|
2020
|
-
d: z.string().min(1).max(100000)
|
|
2021
|
-
}).strict();
|
|
2022
|
-
export const svgPathShapeSchema = svgshapesSvgPathShapeSchema;
|
|
2023
|
-
/**
|
|
2024
|
-
* A regular polygon shape with a specified number of sides.
|
|
2025
|
-
* Examples: triangle (3), square (4), pentagon (5), hexagon (6), etc.
|
|
2026
|
-
* The polygon is inscribed in a circle of the given radius.
|
|
2027
|
-
*
|
|
2028
|
-
*/
|
|
2029
|
-
export const svgshapesSvgPolygonShapeSchema = z.object({
|
|
2030
|
-
type: z.enum(['polygon']),
|
|
2031
|
-
sides: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2032
|
-
return undefined; if (Array.isArray(v))
|
|
2033
|
-
return v; if (typeof v === 'string') {
|
|
2034
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2035
|
-
return v;
|
|
2036
|
-
return Number(v);
|
|
2037
|
-
} return v; }), z.number().int().gte(3).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2038
|
-
radius: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2039
|
-
return undefined; if (Array.isArray(v))
|
|
2040
|
-
return v; if (typeof v === 'string') {
|
|
2041
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2042
|
-
return v;
|
|
2043
|
-
return Number(v);
|
|
2044
|
-
} return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
2045
|
-
}).strict();
|
|
2046
|
-
export const svgPolygonShapeSchema = svgshapesSvgPolygonShapeSchema;
|
|
2047
|
-
/**
|
|
2048
|
-
* A rectangle shape with optional rounded corners.
|
|
2049
|
-
* The rectangle is defined by its width and height dimensions.
|
|
2050
|
-
*
|
|
2051
|
-
*/
|
|
2052
|
-
export const svgshapesSvgRectangleShapeSchema = z.object({
|
|
2053
|
-
type: z.enum(['rectangle']),
|
|
2054
|
-
width: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2055
|
-
return undefined; if (Array.isArray(v))
|
|
2056
|
-
return v; if (typeof v === 'string') {
|
|
2057
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2058
|
-
return v;
|
|
2059
|
-
return Number(v);
|
|
2060
|
-
} return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2061
|
-
height: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2062
|
-
return undefined; if (Array.isArray(v))
|
|
2063
|
-
return v; if (typeof v === 'string') {
|
|
2064
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2065
|
-
return v;
|
|
2066
|
-
return Number(v);
|
|
2067
|
-
} return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2068
|
-
cornerRadius: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2069
|
-
return undefined; if (Array.isArray(v))
|
|
2070
|
-
return v; if (typeof v === 'string') {
|
|
2071
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2072
|
-
return v;
|
|
2073
|
-
return Number(v);
|
|
2074
|
-
} return v; }), z.number().gte(0).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0)
|
|
2075
|
-
}).strict();
|
|
2076
|
-
export const svgRectangleShapeSchema = svgshapesSvgRectangleShapeSchema;
|
|
2077
|
-
/**
|
|
2078
|
-
* A ring (donut/annulus) shape - a circle with a circular hole in the center.
|
|
2079
|
-
* The ring is defined by outer and inner radii.
|
|
2080
|
-
*
|
|
2081
|
-
*/
|
|
2082
|
-
export const svgshapesSvgRingShapeSchema = z.object({
|
|
2083
|
-
type: z.enum(['ring']),
|
|
2084
|
-
outerRadius: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2085
|
-
return undefined; if (Array.isArray(v))
|
|
2086
|
-
return v; if (typeof v === 'string') {
|
|
2087
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2088
|
-
return v;
|
|
2089
|
-
return Number(v);
|
|
2090
|
-
} return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2091
|
-
innerRadius: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2092
|
-
return undefined; if (Array.isArray(v))
|
|
2093
|
-
return v; if (typeof v === 'string') {
|
|
2094
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2095
|
-
return v;
|
|
2096
|
-
return Number(v);
|
|
2097
|
-
} return v; }), z.number().gte(0).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
2098
|
-
}).strict();
|
|
2099
|
-
export const svgRingShapeSchema = svgshapesSvgRingShapeSchema;
|
|
2100
|
-
/**
|
|
2101
|
-
* A star shape with a specified number of points.
|
|
2102
|
-
* The star is defined by outer and inner radii, creating the characteristic
|
|
2103
|
-
* pointed appearance.
|
|
2104
|
-
*
|
|
2105
|
-
*/
|
|
2106
|
-
export const svgshapesSvgStarShapeSchema = z.object({
|
|
2107
|
-
type: z.enum(['star']),
|
|
2108
|
-
points: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2109
|
-
return undefined; if (Array.isArray(v))
|
|
2110
|
-
return v; if (typeof v === 'string') {
|
|
2111
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2112
|
-
return v;
|
|
2113
|
-
return Number(v);
|
|
2114
|
-
} return v; }), z.number().int().gte(3).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2115
|
-
outerRadius: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2116
|
-
return undefined; if (Array.isArray(v))
|
|
2117
|
-
return v; if (typeof v === 'string') {
|
|
2118
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2119
|
-
return v;
|
|
2120
|
-
return Number(v);
|
|
2121
|
-
} return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2122
|
-
innerRadius: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2123
|
-
return undefined; if (Array.isArray(v))
|
|
2124
|
-
return v; if (typeof v === 'string') {
|
|
2125
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2126
|
-
return v;
|
|
2127
|
-
return Number(v);
|
|
2128
|
-
} return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
2129
|
-
}).strict();
|
|
2130
|
-
export const svgStarShapeSchema = svgshapesSvgStarShapeSchema;
|
|
2131
|
-
/**
|
|
2132
|
-
* The shape definition for an SVG asset. Each shape type has its own specific
|
|
2133
|
-
* properties. The `type` field determines which shape is rendered.
|
|
2134
|
-
*
|
|
2135
|
-
*/
|
|
2136
|
-
export const svgshapesSvgShapeSchema = z.discriminatedUnion("type", [
|
|
2137
|
-
svgshapesSvgRectangleShapeSchema,
|
|
2138
|
-
svgshapesSvgCircleShapeSchema,
|
|
2139
|
-
svgshapesSvgEllipseShapeSchema,
|
|
2140
|
-
svgshapesSvgLineShapeSchema,
|
|
2141
|
-
svgshapesSvgPolygonShapeSchema,
|
|
2142
|
-
svgshapesSvgStarShapeSchema,
|
|
2143
|
-
svgshapesSvgArrowShapeSchema,
|
|
2144
|
-
svgshapesSvgHeartShapeSchema,
|
|
2145
|
-
svgshapesSvgCrossShapeSchema,
|
|
2146
|
-
svgshapesSvgRingShapeSchema,
|
|
2147
|
-
svgshapesSvgPathShapeSchema,
|
|
2148
|
-
]);
|
|
2149
|
-
export const svgShapeSchema = svgshapesSvgShapeSchema;
|
|
2150
1653
|
/**
|
|
2151
1654
|
* Configure the id and optional merge fields to render a template by id.
|
|
2152
1655
|
*/
|