@shotstack/schemas 1.9.7 → 1.9.9
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 +164 -922
- package/dist/json-schema/asset.json +23 -14
- package/dist/json-schema/clip.json +23 -14
- package/dist/json-schema/destinations.json +28 -12
- package/dist/json-schema/edit.json +51 -26
- package/dist/json-schema/output.json +28 -12
- package/dist/json-schema/rich-caption-active-font.json +25 -1
- package/dist/json-schema/rich-caption-active.json +26 -16
- package/dist/json-schema/rich-caption-asset.json +23 -14
- package/dist/json-schema/schemas.json +59 -33
- package/dist/json-schema/timeline.json +23 -14
- package/dist/json-schema/track.json +23 -14
- package/dist/schema.d.ts +12 -521
- package/dist/zod/zod.gen.cjs +22 -525
- package/dist/zod/zod.gen.d.ts +262 -773
- package/dist/zod/zod.gen.js +19 -521
- package/dist/zod/zod.gen.ts +19 -303
- package/package.json +1 -1
package/dist/zod/zod.gen.cjs
CHANGED
|
@@ -4,10 +4,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.tiktokDestinationTiktokDestinationSchema = exports.tiktokDestinationOptionsTiktokDestinationOptionsSchema = exports.shotstackDestinationSchema = exports.shotstackDestinationShotstackDestinationSchema = exports.s3DestinationSchema = exports.s3DestinationS3DestinationSchema = exports.s3DestinationOptionsSchema = exports.s3DestinationOptionsS3DestinationOptionsSchema = exports.muxDestinationSchema = exports.muxDestinationMuxDestinationSchema = exports.muxDestinationOptionsSchema = exports.muxDestinationOptionsMuxDestinationOptionsSchema = exports.googleDriveDestinationSchema = exports.googleDriveDestinationGoogleDriveDestinationSchema = exports.googleDriveDestinationOptionsSchema = exports.googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema = exports.googleCloudStorageDestinationSchema = exports.googleCloudStorageDestinationGoogleCloudStorageDestinationSchema = exports.googleCloudStorageDestinationOptionsSchema = exports.googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema = exports.azureBlobStorageDestinationAzureBlobStorageDestinationSchema = exports.azureBlobStorageDestinationOptionsAzureBlobStorageDestinationOptionsSchema = exports.akamaiNetStorageDestinationAkamaiNetStorageDestinationSchema = exports.akamaiNetStorageDestinationOptionsAkamaiNetStorageDestinationOptionsSchema = exports.cropSchema = exports.cropCropSchema = exports.chromaKeySchema = exports.chromakeyChromaKeySchema = exports.captionAssetSchema = exports.captionassetCaptionAssetSchema = exports.captionMarginSchema = exports.captionpropertiesCaptionMarginSchema = exports.captionFontSchema = exports.captionpropertiesCaptionFontSchema = exports.captionBackgroundSchema = exports.captionpropertiesCaptionBackgroundSchema = exports.uploadRootSchema = exports.templatesrenderRootSchema = exports.templatesidRootSchema = exports.templatesRootSchema = exports.sourcesidRootSchema = exports.sourcesRootSchema = exports.renderidRootSchema = exports.renderRootSchema = exports.probeRootSchema = exports.assetsrenderidRootSchema = exports.assetsidRootSchema = exports.assetsRootSchema = exports.sourceRootSchema = exports.editRootSchema = void 0;
|
|
5
5
|
exports.posterSchema = exports.posterPosterSchema = exports.mergeFieldSchema = exports.mergefieldMergeFieldSchema = exports.lumaAssetSchema = exports.lumaassetLumaAssetSchema = exports.transcriptionSchema = exports.transcriptionTranscriptionSchema = exports.speedSchema = exports.speedSpeedSchema = exports.uploadResponseSchema = exports.uploadresponseUploadResponseSchema = exports.uploadResponseDataSchema = exports.uploadresponsedataUploadResponseDataSchema = exports.uploadResponseAttributesSchema = exports.uploadresponseattributesUploadResponseAttributesSchema = exports.queuedSourceResponseSchema = exports.queuedsourceresponseQueuedSourceResponseSchema = exports.queuedSourceResponseDataSchema = exports.queuedsourceresponsedataQueuedSourceResponseDataSchema = exports.ingestErrorResponseSchema = exports.ingesterrorresponseIngestErrorResponseSchema = exports.ingestErrorResponseDataSchema = exports.ingesterrorresponsedataIngestErrorResponseDataSchema = exports.enhancementsSchema = exports.enhancementsEnhancementsSchema = exports.audioEnhancementSchema = exports.audioEnhancementAudioEnhancementSchema = exports.dolbyEnhancementSchema = exports.dolbyEnhancementDolbyEnhancementSchema = exports.dolbyEnhancementOptionsSchema = exports.dolbyEnhancementOptionsDolbyEnhancementOptionsSchema = exports.imageToVideoAssetSchema = exports.imagetovideoassetImageToVideoAssetSchema = exports.imageAssetSchema = exports.imageassetImageAssetSchema = exports.htmlAssetSchema = exports.htmlassetHtmlAssetSchema = exports.fontSchema = exports.fontFontSchema = exports.flipTransformationSchema = exports.fliptransformationFlipTransformationSchema = exports.destinationsSchema = exports.destinationsDestinationsSchema = exports.vimeoDestinationSchema = exports.vimeoDestinationVimeoDestinationSchema = exports.vimeoDestinationOptionsSchema = exports.vimeoDestinationOptionsVimeoDestinationOptionsSchema = exports.vimeoDestinationPrivacyOptionsSchema = exports.vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema = void 0;
|
|
6
6
|
exports.richCaptionAssetSchema = exports.richcaptionassetRichCaptionAssetSchema = exports.richCaptionActiveSchema = exports.richcaptionpropertiesRichCaptionActiveSchema = exports.richTextStrokeSchema = exports.richtextpropertiesRichTextStrokeSchema = exports.richTextShadowSchema = exports.richtextpropertiesRichTextShadowSchema = exports.richtextpropertiesRichTextPaddingSchema = exports.richcaptionpropertiesRichCaptionStyleSchema = exports.richTextGradientSchema = exports.richtextpropertiesRichTextGradientSchema = exports.richtextpropertiesRichTextBorderSchema = exports.richTextBackgroundSchema = exports.richtextpropertiesRichTextBackgroundSchema = exports.richTextAnimationSchema = exports.richtextpropertiesRichTextAnimationSchema = exports.richTextAlignmentSchema = exports.richtextpropertiesRichTextAlignmentSchema = exports.richcaptionpropertiesRichCaptionFontSchema = exports.richCaptionAnimationSchema = exports.richcaptionpropertiesRichCaptionAnimationSchema = exports.richCaptionActiveFontSchema = exports.richcaptionpropertiesRichCaptionActiveFontSchema = exports.templateResponseSchema = exports.templateresponseTemplateResponseSchema = exports.templateResponseDataSchema = exports.templateresponsedataTemplateResponseDataSchema = exports.templateListResponseSchema = exports.templatelistresponseTemplateListResponseSchema = exports.templateListResponseDataSchema = exports.templatelistresponsedataTemplateListResponseDataSchema = exports.templateListResponseItemSchema = exports.templatelistresponseitemTemplateListResponseItemSchema = exports.queuedResponseSchema = exports.queuedresponseQueuedResponseSchema = exports.queuedResponseDataSchema = exports.queuedresponsedataQueuedResponseDataSchema = exports.probeResponseSchema = exports.proberesponseProbeResponseSchema = exports.assetResponseSchema = exports.assetresponseAssetResponseSchema = exports.assetRenderResponseSchema = exports.assetrenderresponseAssetRenderResponseSchema = exports.assetResponseDataSchema = exports.assetresponsedataAssetResponseDataSchema = exports.assetResponseAttributesSchema = exports.assetresponseattributesAssetResponseAttributesSchema = exports.rangeSchema = exports.rangeRangeSchema = void 0;
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
10
|
-
exports.getUploadSignedUrlResponse = exports.getUploadSignedUrlRequest = exports.getSourceResponse = exports.getSourceRequest = exports.deleteSourceResponse = exports.deleteSourceRequest = exports.postSourceResponse = exports.postSourceRequest = exports.getSourcesResponse = exports.getSourcesRequest = exports.postServeAssetResponse = exports.postServeAssetRequest = exports.getAssetByRenderIdResponse = exports.getAssetByRenderIdRequest = exports.getAssetResponse = exports.getAssetRequest = exports.deleteAssetResponse = exports.deleteAssetRequest = exports.probeResponse = exports.probeRequest = exports.postTemplateRenderResponse = exports.postTemplateRenderRequest = exports.putTemplateResponse = exports.putTemplateRequest = void 0;
|
|
7
|
+
exports.textpropertiesTextStrokeSchema = exports.textFontSchema = exports.textpropertiesTextFontSchema = exports.textBackgroundSchema = exports.textpropertiesTextBackgroundSchema = exports.textpropertiesTextAnimationSchema = exports.textAlignmentSchema = exports.textpropertiesTextAlignmentSchema = exports.templateRenderSchema = exports.templaterenderTemplateRenderSchema = exports.svgAssetSchema = exports.svgassetSvgAssetSchema = exports.soundtrackSchema = exports.soundtrackSoundtrackSchema = exports.sourceSchema = exports.sourceSourceSchema = exports.sourceResponseSchema = exports.sourceresponseSourceResponseSchema = exports.sourceListResponseSchema = exports.sourcelistresponseSourceListResponseSchema = exports.sourceResponseDataSchema = exports.sourceresponsedataSourceResponseDataSchema = exports.sourceResponseAttributesSchema = exports.sourceresponseattributesSourceResponseAttributesSchema = exports.outputsResponseSchema = exports.outputsresponseOutputsResponseSchema = exports.renditionResponseAttributesSchema = exports.renditionresponseattributesRenditionResponseAttributesSchema = exports.outputsSchema = exports.outputsOutputsSchema = exports.renditionSchema = exports.renditionRenditionSchema = exports.sizeSchema = exports.sizeSizeSchema = exports.shapeAssetSchema = exports.shapeassetShapeAssetSchema = exports.transferSchema = exports.transferTransferSchema = exports.transferResponseSchema = exports.transferresponseTransferResponseSchema = exports.transferResponseDataSchema = exports.transferresponsedataTransferResponseDataSchema = exports.transferResponseAttributesSchema = exports.transferresponseattributesTransferResponseAttributesSchema = exports.richTextAssetSchema = exports.richtextassetRichTextAssetSchema = exports.richTextStyleSchema = exports.richtextpropertiesRichTextStyleSchema = exports.richTextFontSchema = exports.richtextpropertiesRichTextFontSchema = void 0;
|
|
8
|
+
exports.postRenderResponse = exports.postRenderRequest = exports.templateSchema = exports.templateTemplateSchema = exports.templateDataResponseSchema = exports.templatedataresponseTemplateDataResponseSchema = exports.templateDataResponseDataSchema = exports.templatedataresponsedataTemplateDataResponseDataSchema = exports.renderResponseSchema = exports.renderresponseRenderResponseSchema = exports.renderResponseDataSchema = exports.renderresponsedataRenderResponseDataSchema = exports.editSchema = exports.editEditSchema = exports.timelineSchema = exports.timelineTimelineSchema = exports.trackSchema = exports.trackTrackSchema = exports.clipSchema = exports.clipClipSchema = exports.assetSchema = exports.assetAssetSchema = exports.videoAssetSchema = exports.videoassetVideoAssetSchema = exports.transformationSchema = exports.transformationTransformationSchema = exports.titleAssetSchema = exports.titleassetTitleAssetSchema = exports.textToSpeechAssetSchema = exports.texttospeechassetTextToSpeechAssetSchema = exports.skewTransformationSchema = exports.skewtransformationSkewTransformationSchema = exports.rotateTransformationSchema = exports.rotatetransformationRotateTransformationSchema = exports.offsetSchema = exports.offsetOffsetSchema = exports.audioAssetSchema = exports.audioassetAudioAssetSchema = exports.tweenSchema = exports.tweenTweenSchema = exports.transitionSchema = exports.transitionTransitionSchema = exports.outputSchema = exports.outputOutputSchema = exports.thumbnailSchema = exports.thumbnailThumbnailSchema = exports.textToImageAssetSchema = exports.texttoimageassetTextToImageAssetSchema = exports.textAssetSchema = exports.textassetTextAssetSchema = void 0;
|
|
9
|
+
exports.getUploadSignedUrlResponse = exports.getUploadSignedUrlRequest = exports.getSourceResponse = exports.getSourceRequest = exports.deleteSourceResponse = exports.deleteSourceRequest = exports.postSourceResponse = exports.postSourceRequest = exports.getSourcesResponse = exports.getSourcesRequest = exports.postServeAssetResponse = exports.postServeAssetRequest = exports.getAssetByRenderIdResponse = exports.getAssetByRenderIdRequest = exports.getAssetResponse = exports.getAssetRequest = exports.deleteAssetResponse = exports.deleteAssetRequest = exports.probeResponse = exports.probeRequest = exports.postTemplateRenderResponse = exports.postTemplateRenderRequest = exports.putTemplateResponse = exports.putTemplateRequest = exports.getTemplateResponse = exports.getTemplateRequest = exports.deleteTemplateResponse = exports.deleteTemplateRequest = exports.postTemplateResponse = exports.postTemplateRequest = exports.getTemplatesResponse = exports.getTemplatesRequest = exports.getRenderResponse = exports.getRenderRequest = void 0;
|
|
11
10
|
const zod_1 = require("zod");
|
|
12
11
|
exports.editRootSchema = zod_1.z.unknown();
|
|
13
12
|
exports.sourceRootSchema = zod_1.z.unknown();
|
|
@@ -210,8 +209,14 @@ exports.cropSchema = exports.cropCropSchema;
|
|
|
210
209
|
exports.akamaiNetStorageDestinationOptionsAkamaiNetStorageDestinationOptionsSchema = zod_1.z.object({
|
|
211
210
|
host: zod_1.z.string(),
|
|
212
211
|
cpCode: zod_1.z.string(),
|
|
213
|
-
path: zod_1.z.optional(zod_1.z.
|
|
214
|
-
|
|
212
|
+
path: zod_1.z.optional(zod_1.z.union([
|
|
213
|
+
zod_1.z.string(),
|
|
214
|
+
zod_1.z.null()
|
|
215
|
+
])),
|
|
216
|
+
filename: zod_1.z.optional(zod_1.z.union([
|
|
217
|
+
zod_1.z.string(),
|
|
218
|
+
zod_1.z.null()
|
|
219
|
+
]))
|
|
215
220
|
}).strict();
|
|
216
221
|
/**
|
|
217
222
|
* 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.
|
|
@@ -226,8 +231,14 @@ exports.akamaiNetStorageDestinationAkamaiNetStorageDestinationSchema = zod_1.z.o
|
|
|
226
231
|
exports.azureBlobStorageDestinationOptionsAzureBlobStorageDestinationOptionsSchema = zod_1.z.object({
|
|
227
232
|
accountName: zod_1.z.string(),
|
|
228
233
|
container: zod_1.z.string(),
|
|
229
|
-
prefix: zod_1.z.optional(zod_1.z.
|
|
230
|
-
|
|
234
|
+
prefix: zod_1.z.optional(zod_1.z.union([
|
|
235
|
+
zod_1.z.string(),
|
|
236
|
+
zod_1.z.null()
|
|
237
|
+
])),
|
|
238
|
+
filename: zod_1.z.optional(zod_1.z.union([
|
|
239
|
+
zod_1.z.string(),
|
|
240
|
+
zod_1.z.null()
|
|
241
|
+
]))
|
|
231
242
|
}).strict();
|
|
232
243
|
/**
|
|
233
244
|
* 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.
|
|
@@ -777,6 +788,8 @@ exports.templateResponseSchema = exports.templateresponseTemplateResponseSchema;
|
|
|
777
788
|
* Font properties for the active/highlighted word.
|
|
778
789
|
*/
|
|
779
790
|
exports.richcaptionpropertiesRichCaptionActiveFontSchema = zod_1.z.object({
|
|
791
|
+
family: zod_1.z.optional(zod_1.z.string()),
|
|
792
|
+
weight: zod_1.z.optional(zod_1.z.unknown()).default('400'),
|
|
780
793
|
color: zod_1.z.optional(zod_1.z.union([zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
781
794
|
background: zod_1.z.optional(zod_1.z.union([zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
782
795
|
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
@@ -1100,14 +1113,7 @@ exports.richcaptionpropertiesRichCaptionActiveSchema = zod_1.z.object({
|
|
|
1100
1113
|
shadow: zod_1.z.optional(zod_1.z.union([
|
|
1101
1114
|
exports.richtextpropertiesRichTextShadowSchema,
|
|
1102
1115
|
zod_1.z.enum(['none'])
|
|
1103
|
-
]))
|
|
1104
|
-
scale: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1105
|
-
return undefined; if (Array.isArray(v))
|
|
1106
|
-
return v; if (typeof v === 'string') {
|
|
1107
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1108
|
-
return v;
|
|
1109
|
-
return Number(v);
|
|
1110
|
-
} return v; }), zod_1.z.number().gte(0.5).lte(2)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
|
|
1116
|
+
]))
|
|
1111
1117
|
}).strict();
|
|
1112
1118
|
exports.richCaptionActiveSchema = exports.richcaptionpropertiesRichCaptionActiveSchema;
|
|
1113
1119
|
/**
|
|
@@ -1647,515 +1653,6 @@ exports.svgassetSvgAssetSchema = zod_1.z.object({
|
|
|
1647
1653
|
src: zod_1.z.string().min(1).max(500000),
|
|
1648
1654
|
}).strict();
|
|
1649
1655
|
exports.svgAssetSchema = exports.svgassetSvgAssetSchema;
|
|
1650
|
-
/**
|
|
1651
|
-
* A color stop in a gradient. Each stop defines a color at a specific position
|
|
1652
|
-
* along the gradient vector. Gradients require at least 2 stops.
|
|
1653
|
-
*
|
|
1654
|
-
*/
|
|
1655
|
-
exports.svgpropertiesSvgGradientStopSchema = zod_1.z.object({
|
|
1656
|
-
offset: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1657
|
-
return undefined; if (Array.isArray(v))
|
|
1658
|
-
return v; if (typeof v === 'string') {
|
|
1659
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1660
|
-
return v;
|
|
1661
|
-
return Number(v);
|
|
1662
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1663
|
-
color: zod_1.z.union([zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
1664
|
-
}).strict();
|
|
1665
|
-
exports.svgGradientStopSchema = exports.svgpropertiesSvgGradientStopSchema;
|
|
1666
|
-
/**
|
|
1667
|
-
* A linear gradient fill that transitions colors along a straight line.
|
|
1668
|
-
* The gradient direction is controlled by the `angle` property.
|
|
1669
|
-
*
|
|
1670
|
-
*/
|
|
1671
|
-
exports.svgpropertiesSvgLinearGradientFillSchema = zod_1.z.object({
|
|
1672
|
-
type: zod_1.z.enum(['linear']),
|
|
1673
|
-
angle: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1674
|
-
return undefined; if (Array.isArray(v))
|
|
1675
|
-
return v; if (typeof v === 'string') {
|
|
1676
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1677
|
-
return v;
|
|
1678
|
-
return Number(v);
|
|
1679
|
-
} return v; }), zod_1.z.number().gte(0).lte(360)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1680
|
-
stops: zod_1.z.array(exports.svgpropertiesSvgGradientStopSchema).min(2),
|
|
1681
|
-
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1682
|
-
return undefined; if (Array.isArray(v))
|
|
1683
|
-
return v; if (typeof v === 'string') {
|
|
1684
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1685
|
-
return v;
|
|
1686
|
-
return Number(v);
|
|
1687
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
|
|
1688
|
-
}).strict();
|
|
1689
|
-
exports.svgLinearGradientFillSchema = exports.svgpropertiesSvgLinearGradientFillSchema;
|
|
1690
|
-
/**
|
|
1691
|
-
* A radial gradient fill that transitions colors radiating outward from a center point.
|
|
1692
|
-
* The gradient creates a circular or elliptical color transition.
|
|
1693
|
-
*
|
|
1694
|
-
*/
|
|
1695
|
-
exports.svgpropertiesSvgRadialGradientFillSchema = zod_1.z.object({
|
|
1696
|
-
type: zod_1.z.enum(['radial']),
|
|
1697
|
-
stops: zod_1.z.array(exports.svgpropertiesSvgGradientStopSchema).min(2),
|
|
1698
|
-
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1699
|
-
return undefined; if (Array.isArray(v))
|
|
1700
|
-
return v; if (typeof v === 'string') {
|
|
1701
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1702
|
-
return v;
|
|
1703
|
-
return Number(v);
|
|
1704
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
|
|
1705
|
-
}).strict();
|
|
1706
|
-
exports.svgRadialGradientFillSchema = exports.svgpropertiesSvgRadialGradientFillSchema;
|
|
1707
|
-
/**
|
|
1708
|
-
* Drop shadow properties for SVG shapes. Creates a shadow effect behind the shape.
|
|
1709
|
-
*
|
|
1710
|
-
*/
|
|
1711
|
-
exports.svgpropertiesSvgShadowSchema = zod_1.z.object({
|
|
1712
|
-
offsetX: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1713
|
-
return undefined; if (Array.isArray(v))
|
|
1714
|
-
return v; if (typeof v === 'string') {
|
|
1715
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1716
|
-
return v;
|
|
1717
|
-
return Number(v);
|
|
1718
|
-
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1719
|
-
offsetY: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1720
|
-
return undefined; if (Array.isArray(v))
|
|
1721
|
-
return v; if (typeof v === 'string') {
|
|
1722
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1723
|
-
return v;
|
|
1724
|
-
return Number(v);
|
|
1725
|
-
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1726
|
-
blur: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1727
|
-
return undefined; if (Array.isArray(v))
|
|
1728
|
-
return v; if (typeof v === 'string') {
|
|
1729
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1730
|
-
return v;
|
|
1731
|
-
return Number(v);
|
|
1732
|
-
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1733
|
-
color: zod_1.z.optional(zod_1.z.union([zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
|
|
1734
|
-
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1735
|
-
return undefined; if (Array.isArray(v))
|
|
1736
|
-
return v; if (typeof v === 'string') {
|
|
1737
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1738
|
-
return v;
|
|
1739
|
-
return Number(v);
|
|
1740
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5)
|
|
1741
|
-
}).strict();
|
|
1742
|
-
exports.svgShadowSchema = exports.svgpropertiesSvgShadowSchema;
|
|
1743
|
-
/**
|
|
1744
|
-
* A solid color fill for SVG shapes.
|
|
1745
|
-
*/
|
|
1746
|
-
exports.svgpropertiesSvgSolidFillSchema = zod_1.z.object({
|
|
1747
|
-
type: zod_1.z.enum(['solid']),
|
|
1748
|
-
color: zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/).default('#000000'),
|
|
1749
|
-
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1750
|
-
return undefined; if (Array.isArray(v))
|
|
1751
|
-
return v; if (typeof v === 'string') {
|
|
1752
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1753
|
-
return v;
|
|
1754
|
-
return Number(v);
|
|
1755
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
|
|
1756
|
-
}).strict();
|
|
1757
|
-
exports.svgSolidFillSchema = exports.svgpropertiesSvgSolidFillSchema;
|
|
1758
|
-
/**
|
|
1759
|
-
* Fill properties for SVG shapes. Supports solid colors and gradients.
|
|
1760
|
-
* The fill defines how the interior of a shape is painted.
|
|
1761
|
-
*
|
|
1762
|
-
*/
|
|
1763
|
-
exports.svgpropertiesSvgFillSchema = zod_1.z.discriminatedUnion("type", [
|
|
1764
|
-
exports.svgpropertiesSvgSolidFillSchema,
|
|
1765
|
-
exports.svgpropertiesSvgLinearGradientFillSchema,
|
|
1766
|
-
exports.svgpropertiesSvgRadialGradientFillSchema,
|
|
1767
|
-
]);
|
|
1768
|
-
exports.svgFillSchema = exports.svgpropertiesSvgFillSchema;
|
|
1769
|
-
/**
|
|
1770
|
-
* Stroke (outline) properties for SVG shapes. The stroke defines how the outline
|
|
1771
|
-
* of a shape is painted, including its color, width, and line style.
|
|
1772
|
-
*
|
|
1773
|
-
*/
|
|
1774
|
-
exports.svgpropertiesSvgStrokeSchema = zod_1.z.object({
|
|
1775
|
-
color: zod_1.z.optional(zod_1.z.union([zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
|
|
1776
|
-
width: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1777
|
-
return undefined; if (Array.isArray(v))
|
|
1778
|
-
return v; if (typeof v === 'string') {
|
|
1779
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1780
|
-
return v;
|
|
1781
|
-
return Number(v);
|
|
1782
|
-
} return v; }), zod_1.z.number().gte(0).lte(100)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1783
|
-
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1784
|
-
return undefined; if (Array.isArray(v))
|
|
1785
|
-
return v; if (typeof v === 'string') {
|
|
1786
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1787
|
-
return v;
|
|
1788
|
-
return Number(v);
|
|
1789
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1790
|
-
lineCap: zod_1.z.optional(zod_1.z.enum([
|
|
1791
|
-
'butt',
|
|
1792
|
-
'round',
|
|
1793
|
-
'square'
|
|
1794
|
-
])),
|
|
1795
|
-
lineJoin: zod_1.z.optional(zod_1.z.enum([
|
|
1796
|
-
'miter',
|
|
1797
|
-
'round',
|
|
1798
|
-
'bevel'
|
|
1799
|
-
])),
|
|
1800
|
-
dashArray: zod_1.z.optional(zod_1.z.array(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1801
|
-
return undefined; if (Array.isArray(v))
|
|
1802
|
-
return v; if (typeof v === 'string') {
|
|
1803
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1804
|
-
return v;
|
|
1805
|
-
return Number(v);
|
|
1806
|
-
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))),
|
|
1807
|
-
dashOffset: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1808
|
-
return undefined; if (Array.isArray(v))
|
|
1809
|
-
return v; if (typeof v === 'string') {
|
|
1810
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1811
|
-
return v;
|
|
1812
|
-
return Number(v);
|
|
1813
|
-
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0)
|
|
1814
|
-
}).strict();
|
|
1815
|
-
exports.svgStrokeSchema = exports.svgpropertiesSvgStrokeSchema;
|
|
1816
|
-
/**
|
|
1817
|
-
* Transformation properties for positioning, rotating, and scaling SVG shapes.
|
|
1818
|
-
*
|
|
1819
|
-
*/
|
|
1820
|
-
exports.svgpropertiesSvgTransformSchema = zod_1.z.object({
|
|
1821
|
-
x: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1822
|
-
return undefined; if (Array.isArray(v))
|
|
1823
|
-
return v; if (typeof v === 'string') {
|
|
1824
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1825
|
-
return v;
|
|
1826
|
-
return Number(v);
|
|
1827
|
-
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1828
|
-
y: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1829
|
-
return undefined; if (Array.isArray(v))
|
|
1830
|
-
return v; if (typeof v === 'string') {
|
|
1831
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1832
|
-
return v;
|
|
1833
|
-
return Number(v);
|
|
1834
|
-
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1835
|
-
rotation: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1836
|
-
return undefined; if (Array.isArray(v))
|
|
1837
|
-
return v; if (typeof v === 'string') {
|
|
1838
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1839
|
-
return v;
|
|
1840
|
-
return Number(v);
|
|
1841
|
-
} return v; }), zod_1.z.number().gte(-360).lte(360)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1842
|
-
scale: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1843
|
-
return undefined; if (Array.isArray(v))
|
|
1844
|
-
return v; if (typeof v === 'string') {
|
|
1845
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1846
|
-
return v;
|
|
1847
|
-
return Number(v);
|
|
1848
|
-
} return v; }), zod_1.z.number().gte(0.01).lte(100)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1849
|
-
originX: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1850
|
-
return undefined; if (Array.isArray(v))
|
|
1851
|
-
return v; if (typeof v === 'string') {
|
|
1852
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1853
|
-
return v;
|
|
1854
|
-
return Number(v);
|
|
1855
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
|
|
1856
|
-
originY: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1857
|
-
return undefined; if (Array.isArray(v))
|
|
1858
|
-
return v; if (typeof v === 'string') {
|
|
1859
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1860
|
-
return v;
|
|
1861
|
-
return Number(v);
|
|
1862
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5)
|
|
1863
|
-
}).strict();
|
|
1864
|
-
exports.svgTransformSchema = exports.svgpropertiesSvgTransformSchema;
|
|
1865
|
-
/**
|
|
1866
|
-
* An arrow shape pointing to the right by default.
|
|
1867
|
-
* Use transform rotation to change direction.
|
|
1868
|
-
*
|
|
1869
|
-
*/
|
|
1870
|
-
exports.svgshapesSvgArrowShapeSchema = zod_1.z.object({
|
|
1871
|
-
type: zod_1.z.enum(['arrow']),
|
|
1872
|
-
length: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1873
|
-
return undefined; if (Array.isArray(v))
|
|
1874
|
-
return v; if (typeof v === 'string') {
|
|
1875
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1876
|
-
return v;
|
|
1877
|
-
return Number(v);
|
|
1878
|
-
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1879
|
-
headWidth: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1880
|
-
return undefined; if (Array.isArray(v))
|
|
1881
|
-
return v; if (typeof v === 'string') {
|
|
1882
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1883
|
-
return v;
|
|
1884
|
-
return Number(v);
|
|
1885
|
-
} return v; }), zod_1.z.number().gte(1).lte(1000)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1886
|
-
headLength: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1887
|
-
return undefined; if (Array.isArray(v))
|
|
1888
|
-
return v; if (typeof v === 'string') {
|
|
1889
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1890
|
-
return v;
|
|
1891
|
-
return Number(v);
|
|
1892
|
-
} return v; }), zod_1.z.number().gte(1).lte(1000)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1893
|
-
shaftWidth: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1894
|
-
return undefined; if (Array.isArray(v))
|
|
1895
|
-
return v; if (typeof v === 'string') {
|
|
1896
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1897
|
-
return v;
|
|
1898
|
-
return Number(v);
|
|
1899
|
-
} return v; }), zod_1.z.number().gte(1).lte(1000)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
1900
|
-
}).strict();
|
|
1901
|
-
exports.svgArrowShapeSchema = exports.svgshapesSvgArrowShapeSchema;
|
|
1902
|
-
/**
|
|
1903
|
-
* A perfect circle shape defined by its radius.
|
|
1904
|
-
* The circle is centered at the shape's position.
|
|
1905
|
-
*
|
|
1906
|
-
*/
|
|
1907
|
-
exports.svgshapesSvgCircleShapeSchema = zod_1.z.object({
|
|
1908
|
-
type: zod_1.z.enum(['circle']),
|
|
1909
|
-
radius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1910
|
-
return undefined; if (Array.isArray(v))
|
|
1911
|
-
return v; if (typeof v === 'string') {
|
|
1912
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1913
|
-
return v;
|
|
1914
|
-
return Number(v);
|
|
1915
|
-
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
1916
|
-
}).strict();
|
|
1917
|
-
exports.svgCircleShapeSchema = exports.svgshapesSvgCircleShapeSchema;
|
|
1918
|
-
/**
|
|
1919
|
-
* A cross or plus shape with equal or different arm lengths.
|
|
1920
|
-
* Can be styled as a plus sign (+) or a cross (x with rotation).
|
|
1921
|
-
*
|
|
1922
|
-
*/
|
|
1923
|
-
exports.svgshapesSvgCrossShapeSchema = zod_1.z.object({
|
|
1924
|
-
type: zod_1.z.enum(['cross']),
|
|
1925
|
-
width: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1926
|
-
return undefined; if (Array.isArray(v))
|
|
1927
|
-
return v; if (typeof v === 'string') {
|
|
1928
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1929
|
-
return v;
|
|
1930
|
-
return Number(v);
|
|
1931
|
-
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1932
|
-
height: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1933
|
-
return undefined; if (Array.isArray(v))
|
|
1934
|
-
return v; if (typeof v === 'string') {
|
|
1935
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1936
|
-
return v;
|
|
1937
|
-
return Number(v);
|
|
1938
|
-
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1939
|
-
thickness: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1940
|
-
return undefined; if (Array.isArray(v))
|
|
1941
|
-
return v; if (typeof v === 'string') {
|
|
1942
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1943
|
-
return v;
|
|
1944
|
-
return Number(v);
|
|
1945
|
-
} return v; }), zod_1.z.number().gte(1).lte(500)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
1946
|
-
}).strict();
|
|
1947
|
-
exports.svgCrossShapeSchema = exports.svgshapesSvgCrossShapeSchema;
|
|
1948
|
-
/**
|
|
1949
|
-
* An ellipse (oval) shape with separate horizontal and vertical radii.
|
|
1950
|
-
* The ellipse is centered at the shape's position.
|
|
1951
|
-
*
|
|
1952
|
-
*/
|
|
1953
|
-
exports.svgshapesSvgEllipseShapeSchema = zod_1.z.object({
|
|
1954
|
-
type: zod_1.z.enum(['ellipse']),
|
|
1955
|
-
radiusX: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1956
|
-
return undefined; if (Array.isArray(v))
|
|
1957
|
-
return v; if (typeof v === 'string') {
|
|
1958
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1959
|
-
return v;
|
|
1960
|
-
return Number(v);
|
|
1961
|
-
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1962
|
-
radiusY: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1963
|
-
return undefined; if (Array.isArray(v))
|
|
1964
|
-
return v; if (typeof v === 'string') {
|
|
1965
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1966
|
-
return v;
|
|
1967
|
-
return Number(v);
|
|
1968
|
-
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
1969
|
-
}).strict();
|
|
1970
|
-
exports.svgEllipseShapeSchema = exports.svgshapesSvgEllipseShapeSchema;
|
|
1971
|
-
/**
|
|
1972
|
-
* A heart shape commonly used for love/like icons.
|
|
1973
|
-
* The heart is defined by a single size parameter.
|
|
1974
|
-
*
|
|
1975
|
-
*/
|
|
1976
|
-
exports.svgshapesSvgHeartShapeSchema = zod_1.z.object({
|
|
1977
|
-
type: zod_1.z.enum(['heart']),
|
|
1978
|
-
size: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1979
|
-
return undefined; if (Array.isArray(v))
|
|
1980
|
-
return v; if (typeof v === 'string') {
|
|
1981
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1982
|
-
return v;
|
|
1983
|
-
return Number(v);
|
|
1984
|
-
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
1985
|
-
}).strict();
|
|
1986
|
-
exports.svgHeartShapeSchema = exports.svgshapesSvgHeartShapeSchema;
|
|
1987
|
-
/**
|
|
1988
|
-
* A straight line shape with a specified length and thickness.
|
|
1989
|
-
* The line is drawn horizontally by default and can be rotated using transform.
|
|
1990
|
-
*
|
|
1991
|
-
*/
|
|
1992
|
-
exports.svgshapesSvgLineShapeSchema = zod_1.z.object({
|
|
1993
|
-
type: zod_1.z.enum(['line']),
|
|
1994
|
-
length: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1995
|
-
return undefined; if (Array.isArray(v))
|
|
1996
|
-
return v; if (typeof v === 'string') {
|
|
1997
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1998
|
-
return v;
|
|
1999
|
-
return Number(v);
|
|
2000
|
-
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2001
|
-
thickness: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2002
|
-
return undefined; if (Array.isArray(v))
|
|
2003
|
-
return v; if (typeof v === 'string') {
|
|
2004
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2005
|
-
return v;
|
|
2006
|
-
return Number(v);
|
|
2007
|
-
} return v; }), zod_1.z.number().gte(1).lte(500)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
2008
|
-
}).strict();
|
|
2009
|
-
exports.svgLineShapeSchema = exports.svgshapesSvgLineShapeSchema;
|
|
2010
|
-
/**
|
|
2011
|
-
* A custom shape defined by SVG path data.
|
|
2012
|
-
* Supports all standard SVG path commands for creating complex shapes.
|
|
2013
|
-
*
|
|
2014
|
-
* **Path Commands:**
|
|
2015
|
-
* - `M x y` / `m dx dy` - Move to (absolute/relative)
|
|
2016
|
-
* - `L x y` / `l dx dy` - Line to
|
|
2017
|
-
* - `H x` / `h dx` - Horizontal line to
|
|
2018
|
-
* - `V y` / `v dy` - Vertical line to
|
|
2019
|
-
* - `C x1 y1 x2 y2 x y` / `c` - Cubic Bezier curve
|
|
2020
|
-
* - `S x2 y2 x y` / `s` - Smooth cubic Bezier
|
|
2021
|
-
* - `Q x1 y1 x y` / `q` - Quadratic Bezier curve
|
|
2022
|
-
* - `T x y` / `t` - Smooth quadratic Bezier
|
|
2023
|
-
* - `A rx ry angle large-arc sweep x y` / `a` - Elliptical arc
|
|
2024
|
-
* - `Z` / `z` - Close path
|
|
2025
|
-
*
|
|
2026
|
-
*/
|
|
2027
|
-
exports.svgshapesSvgPathShapeSchema = zod_1.z.object({
|
|
2028
|
-
type: zod_1.z.enum(['path']),
|
|
2029
|
-
d: zod_1.z.string().min(1).max(100000)
|
|
2030
|
-
}).strict();
|
|
2031
|
-
exports.svgPathShapeSchema = exports.svgshapesSvgPathShapeSchema;
|
|
2032
|
-
/**
|
|
2033
|
-
* A regular polygon shape with a specified number of sides.
|
|
2034
|
-
* Examples: triangle (3), square (4), pentagon (5), hexagon (6), etc.
|
|
2035
|
-
* The polygon is inscribed in a circle of the given radius.
|
|
2036
|
-
*
|
|
2037
|
-
*/
|
|
2038
|
-
exports.svgshapesSvgPolygonShapeSchema = zod_1.z.object({
|
|
2039
|
-
type: zod_1.z.enum(['polygon']),
|
|
2040
|
-
sides: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2041
|
-
return undefined; if (Array.isArray(v))
|
|
2042
|
-
return v; if (typeof v === 'string') {
|
|
2043
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2044
|
-
return v;
|
|
2045
|
-
return Number(v);
|
|
2046
|
-
} return v; }), zod_1.z.number().int().gte(3).lte(100)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2047
|
-
radius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2048
|
-
return undefined; if (Array.isArray(v))
|
|
2049
|
-
return v; if (typeof v === 'string') {
|
|
2050
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2051
|
-
return v;
|
|
2052
|
-
return Number(v);
|
|
2053
|
-
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
2054
|
-
}).strict();
|
|
2055
|
-
exports.svgPolygonShapeSchema = exports.svgshapesSvgPolygonShapeSchema;
|
|
2056
|
-
/**
|
|
2057
|
-
* A rectangle shape with optional rounded corners.
|
|
2058
|
-
* The rectangle is defined by its width and height dimensions.
|
|
2059
|
-
*
|
|
2060
|
-
*/
|
|
2061
|
-
exports.svgshapesSvgRectangleShapeSchema = zod_1.z.object({
|
|
2062
|
-
type: zod_1.z.enum(['rectangle']),
|
|
2063
|
-
width: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2064
|
-
return undefined; if (Array.isArray(v))
|
|
2065
|
-
return v; if (typeof v === 'string') {
|
|
2066
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2067
|
-
return v;
|
|
2068
|
-
return Number(v);
|
|
2069
|
-
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2070
|
-
height: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2071
|
-
return undefined; if (Array.isArray(v))
|
|
2072
|
-
return v; if (typeof v === 'string') {
|
|
2073
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2074
|
-
return v;
|
|
2075
|
-
return Number(v);
|
|
2076
|
-
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2077
|
-
cornerRadius: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2078
|
-
return undefined; if (Array.isArray(v))
|
|
2079
|
-
return v; if (typeof v === 'string') {
|
|
2080
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2081
|
-
return v;
|
|
2082
|
-
return Number(v);
|
|
2083
|
-
} return v; }), zod_1.z.number().gte(0).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0)
|
|
2084
|
-
}).strict();
|
|
2085
|
-
exports.svgRectangleShapeSchema = exports.svgshapesSvgRectangleShapeSchema;
|
|
2086
|
-
/**
|
|
2087
|
-
* A ring (donut/annulus) shape - a circle with a circular hole in the center.
|
|
2088
|
-
* The ring is defined by outer and inner radii.
|
|
2089
|
-
*
|
|
2090
|
-
*/
|
|
2091
|
-
exports.svgshapesSvgRingShapeSchema = zod_1.z.object({
|
|
2092
|
-
type: zod_1.z.enum(['ring']),
|
|
2093
|
-
outerRadius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2094
|
-
return undefined; if (Array.isArray(v))
|
|
2095
|
-
return v; if (typeof v === 'string') {
|
|
2096
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2097
|
-
return v;
|
|
2098
|
-
return Number(v);
|
|
2099
|
-
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2100
|
-
innerRadius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2101
|
-
return undefined; if (Array.isArray(v))
|
|
2102
|
-
return v; if (typeof v === 'string') {
|
|
2103
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2104
|
-
return v;
|
|
2105
|
-
return Number(v);
|
|
2106
|
-
} return v; }), zod_1.z.number().gte(0).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
2107
|
-
}).strict();
|
|
2108
|
-
exports.svgRingShapeSchema = exports.svgshapesSvgRingShapeSchema;
|
|
2109
|
-
/**
|
|
2110
|
-
* A star shape with a specified number of points.
|
|
2111
|
-
* The star is defined by outer and inner radii, creating the characteristic
|
|
2112
|
-
* pointed appearance.
|
|
2113
|
-
*
|
|
2114
|
-
*/
|
|
2115
|
-
exports.svgshapesSvgStarShapeSchema = zod_1.z.object({
|
|
2116
|
-
type: zod_1.z.enum(['star']),
|
|
2117
|
-
points: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2118
|
-
return undefined; if (Array.isArray(v))
|
|
2119
|
-
return v; if (typeof v === 'string') {
|
|
2120
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2121
|
-
return v;
|
|
2122
|
-
return Number(v);
|
|
2123
|
-
} return v; }), zod_1.z.number().int().gte(3).lte(100)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2124
|
-
outerRadius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2125
|
-
return undefined; if (Array.isArray(v))
|
|
2126
|
-
return v; if (typeof v === 'string') {
|
|
2127
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2128
|
-
return v;
|
|
2129
|
-
return Number(v);
|
|
2130
|
-
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2131
|
-
innerRadius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2132
|
-
return undefined; if (Array.isArray(v))
|
|
2133
|
-
return v; if (typeof v === 'string') {
|
|
2134
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2135
|
-
return v;
|
|
2136
|
-
return Number(v);
|
|
2137
|
-
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
2138
|
-
}).strict();
|
|
2139
|
-
exports.svgStarShapeSchema = exports.svgshapesSvgStarShapeSchema;
|
|
2140
|
-
/**
|
|
2141
|
-
* The shape definition for an SVG asset. Each shape type has its own specific
|
|
2142
|
-
* properties. The `type` field determines which shape is rendered.
|
|
2143
|
-
*
|
|
2144
|
-
*/
|
|
2145
|
-
exports.svgshapesSvgShapeSchema = zod_1.z.discriminatedUnion("type", [
|
|
2146
|
-
exports.svgshapesSvgRectangleShapeSchema,
|
|
2147
|
-
exports.svgshapesSvgCircleShapeSchema,
|
|
2148
|
-
exports.svgshapesSvgEllipseShapeSchema,
|
|
2149
|
-
exports.svgshapesSvgLineShapeSchema,
|
|
2150
|
-
exports.svgshapesSvgPolygonShapeSchema,
|
|
2151
|
-
exports.svgshapesSvgStarShapeSchema,
|
|
2152
|
-
exports.svgshapesSvgArrowShapeSchema,
|
|
2153
|
-
exports.svgshapesSvgHeartShapeSchema,
|
|
2154
|
-
exports.svgshapesSvgCrossShapeSchema,
|
|
2155
|
-
exports.svgshapesSvgRingShapeSchema,
|
|
2156
|
-
exports.svgshapesSvgPathShapeSchema,
|
|
2157
|
-
]);
|
|
2158
|
-
exports.svgShapeSchema = exports.svgshapesSvgShapeSchema;
|
|
2159
1656
|
/**
|
|
2160
1657
|
* Configure the id and optional merge fields to render a template by id.
|
|
2161
1658
|
*/
|