@shotstack/schemas 1.8.3 → 1.8.4
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 +204 -972
- package/dist/json-schema/asset.json +3 -936
- package/dist/json-schema/clip.json +3 -936
- package/dist/json-schema/destinations.json +111 -23
- package/dist/json-schema/edit.json +256 -1083
- package/dist/json-schema/output.json +106 -0
- package/dist/json-schema/rich-caption-asset.json +140 -221
- package/dist/json-schema/schemas.json +295 -1207
- package/dist/json-schema/svg-asset.json +6 -857
- package/dist/json-schema/timeline.json +3 -936
- package/dist/json-schema/track.json +3 -936
- package/dist/schema.d.ts +68 -695
- package/dist/zod/zod.gen.cjs +44 -625
- package/dist/zod/zod.gen.d.ts +543 -8241
- package/dist/zod/zod.gen.js +38 -618
- package/dist/zod/zod.gen.ts +50 -382
- package/package.json +1 -1
- package/dist/json-schema/svg-arrow-shape.json +0 -49
- package/dist/json-schema/svg-circle-shape.json +0 -28
- package/dist/json-schema/svg-cross-shape.json +0 -42
- package/dist/json-schema/svg-ellipse-shape.json +0 -35
- package/dist/json-schema/svg-fill.json +0 -169
- package/dist/json-schema/svg-gradient-stop.json +0 -25
- package/dist/json-schema/svg-heart-shape.json +0 -28
- package/dist/json-schema/svg-line-shape.json +0 -35
- package/dist/json-schema/svg-linear-gradient-fill.json +0 -80
- package/dist/json-schema/svg-path-shape.json +0 -26
- package/dist/json-schema/svg-polygon-shape.json +0 -35
- package/dist/json-schema/svg-radial-gradient-fill.json +0 -66
- package/dist/json-schema/svg-rectangle-shape.json +0 -49
- package/dist/json-schema/svg-ring-shape.json +0 -35
- package/dist/json-schema/svg-shadow.json +0 -79
- package/dist/json-schema/svg-shape.json +0 -404
- package/dist/json-schema/svg-solid-fill.json +0 -40
- package/dist/json-schema/svg-star-shape.json +0 -42
- package/dist/json-schema/svg-stroke.json +0 -115
- package/dist/json-schema/svg-transform.json +0 -93
package/dist/zod/zod.gen.cjs
CHANGED
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.openAiGeneratedAssetSchema = exports.openaiGeneratedAssetOpenAiGeneratedAssetSchema = exports.openAiGeneratedAssetOptionsSchema = exports.openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema = exports.openAiTextGeneratorOptionsSchema = exports.openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema = exports.heyGenGeneratedAssetSchema = exports.heygenGeneratedAssetHeyGenGeneratedAssetSchema = exports.heyGenGeneratedAssetOptionsSchema = exports.heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema = exports.heyGenTextToAvatarOptionsSchema = exports.heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema = exports.elevenLabsGeneratedAssetSchema = exports.elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema = exports.elevenLabsGeneratedAssetOptionsSchema = exports.elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema = exports.elevenLabsTextToSpeechOptionsSchema = exports.elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema = exports.didGeneratedAssetSchema = exports.didGeneratedAssetDidGeneratedAssetSchema = exports.didGeneratedAssetOptionsSchema = exports.didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema = exports.didTextToAvatarOptionsSchema = exports.didTextToAvatarOptionsDidTextToAvatarOptionsSchema = 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.generateassetidRootSchema = exports.generateassetRootSchema = exports.assetsrenderidRootSchema = exports.assetsidRootSchema = exports.assetsRootSchema = exports.sourceRootSchema = exports.editRootSchema = void 0;
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
10
|
-
exports.
|
|
11
|
-
exports.getGeneratedAssetResponse = exports.getGeneratedAssetRequest = exports.postGenerateAssetResponse = exports.postGenerateAssetRequest = 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 = void 0;
|
|
5
|
+
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.generatedAssetSchema = exports.generatedAssetGeneratedAssetSchema = exports.stabilityAiGeneratedAssetSchema = exports.stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema = exports.stabilityAiGeneratedAssetOptionsSchema = exports.stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema = exports.stabilityAiTextToImageOptionsSchema = exports.stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema = exports.shotstackGeneratedAssetSchema = exports.shotstackGeneratedAssetShotstackGeneratedAssetSchema = exports.shotstackGeneratedAssetOptionsSchema = exports.shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema = exports.shotstackTextToSpeechOptionsSchema = exports.shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema = exports.shotstackTextToImageOptionsSchema = exports.shotstackTextToImageOptionsShotstackTextToImageOptionsSchema = exports.shotstackTextGeneratorOptionsSchema = exports.shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema = exports.shotstackImageToVideoOptionsSchema = exports.shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema = exports.generatedAssetResponseSchema = exports.generatedAssetResponseGeneratedAssetResponseSchema = exports.generatedAssetResponseDataSchema = exports.generatedAssetResponseDataGeneratedAssetResponseDataSchema = exports.generatedAssetResponseAttributesSchema = exports.generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema = exports.generatedAssetErrorResponseSchema = exports.generatedAssetErrorResponseGeneratedAssetErrorResponseSchema = exports.generatedAssetErrorResponseDataSchema = exports.generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema = void 0;
|
|
6
|
+
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 = exports.tiktokDestinationTiktokDestinationSchema = exports.tiktokDestinationOptionsTiktokDestinationOptionsSchema = exports.shotstackDestinationSchema = exports.shotstackDestinationShotstackDestinationSchema = exports.s3DestinationSchema = exports.s3DestinationS3DestinationSchema = void 0;
|
|
7
|
+
exports.richTextShadowSchema = exports.richtextpropertiesRichTextShadowSchema = exports.richtextpropertiesRichTextPaddingSchema = exports.richTextGradientSchema = exports.richtextpropertiesRichTextGradientSchema = exports.richtextpropertiesRichTextBorderSchema = exports.richTextBackgroundSchema = exports.richtextpropertiesRichTextBackgroundSchema = exports.richTextAnimationSchema = exports.richtextpropertiesRichTextAnimationSchema = exports.richTextAlignmentSchema = exports.richtextpropertiesRichTextAlignmentSchema = exports.wordTimingSchema = exports.richcaptionpropertiesWordTimingSchema = exports.richCaptionWordAnimationSchema = exports.richcaptionpropertiesRichCaptionWordAnimationSchema = 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 = exports.posterSchema = exports.posterPosterSchema = exports.mergeFieldSchema = exports.mergefieldMergeFieldSchema = exports.lumaAssetSchema = exports.lumaassetLumaAssetSchema = void 0;
|
|
8
|
+
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.richCaptionAssetSchema = exports.richcaptionassetRichCaptionAssetSchema = exports.richTextStyleSchema = exports.richtextpropertiesRichTextStyleSchema = exports.richTextFontSchema = exports.richtextpropertiesRichTextFontSchema = exports.richCaptionActiveSchema = exports.richcaptionpropertiesRichCaptionActiveSchema = exports.richTextStrokeSchema = exports.richtextpropertiesRichTextStrokeSchema = void 0;
|
|
9
|
+
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 = exports.textpropertiesTextStrokeSchema = exports.textFontSchema = exports.textpropertiesTextFontSchema = exports.textBackgroundSchema = exports.textpropertiesTextBackgroundSchema = exports.textpropertiesTextAnimationSchema = void 0;
|
|
10
|
+
exports.getGeneratedAssetResponse = exports.getGeneratedAssetRequest = exports.postGenerateAssetResponse = exports.postGenerateAssetRequest = 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 = exports.postRenderResponse = exports.postRenderRequest = exports.templateSchema = exports.templateTemplateSchema = exports.templateDataResponseSchema = exports.templatedataresponseTemplateDataResponseSchema = void 0;
|
|
12
11
|
const zod_1 = require("zod");
|
|
13
12
|
exports.editRootSchema = zod_1.z.unknown();
|
|
14
13
|
exports.sourceRootSchema = zod_1.z.unknown();
|
|
@@ -811,6 +810,38 @@ exports.cropCropSchema = zod_1.z.object({
|
|
|
811
810
|
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
812
811
|
}).strict();
|
|
813
812
|
exports.cropSchema = exports.cropCropSchema;
|
|
813
|
+
/**
|
|
814
|
+
* Pass additional options to control how files are stored in Akamai NetStorage.
|
|
815
|
+
*/
|
|
816
|
+
exports.akamaiNetStorageDestinationOptionsAkamaiNetStorageDestinationOptionsSchema = zod_1.z.object({
|
|
817
|
+
host: zod_1.z.string(),
|
|
818
|
+
cpCode: zod_1.z.string(),
|
|
819
|
+
path: zod_1.z.optional(zod_1.z.unknown()),
|
|
820
|
+
filename: zod_1.z.optional(zod_1.z.unknown()),
|
|
821
|
+
}).strict();
|
|
822
|
+
/**
|
|
823
|
+
* 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.
|
|
824
|
+
*/
|
|
825
|
+
exports.akamaiNetStorageDestinationAkamaiNetStorageDestinationSchema = zod_1.z.object({
|
|
826
|
+
provider: zod_1.z.string().default("akamai-netstorage"),
|
|
827
|
+
options: zod_1.z.optional(exports.akamaiNetStorageDestinationOptionsAkamaiNetStorageDestinationOptionsSchema),
|
|
828
|
+
}).strict();
|
|
829
|
+
/**
|
|
830
|
+
* Pass additional options to control how files are stored in Azure Blob Storage.
|
|
831
|
+
*/
|
|
832
|
+
exports.azureBlobStorageDestinationOptionsAzureBlobStorageDestinationOptionsSchema = zod_1.z.object({
|
|
833
|
+
accountName: zod_1.z.string(),
|
|
834
|
+
container: zod_1.z.string(),
|
|
835
|
+
prefix: zod_1.z.optional(zod_1.z.unknown()),
|
|
836
|
+
filename: zod_1.z.optional(zod_1.z.unknown()),
|
|
837
|
+
}).strict();
|
|
838
|
+
/**
|
|
839
|
+
* 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.
|
|
840
|
+
*/
|
|
841
|
+
exports.azureBlobStorageDestinationAzureBlobStorageDestinationSchema = zod_1.z.object({
|
|
842
|
+
provider: zod_1.z.string().default("azure-blob-storage"),
|
|
843
|
+
options: zod_1.z.optional(exports.azureBlobStorageDestinationOptionsAzureBlobStorageDestinationOptionsSchema),
|
|
844
|
+
}).strict();
|
|
814
845
|
/**
|
|
815
846
|
* Pass additional options to control how files are stored in Google Cloud Storage.
|
|
816
847
|
*/
|
|
@@ -1332,29 +1363,6 @@ exports.richcaptionpropertiesRichCaptionActiveFontSchema = zod_1.z.object({
|
|
|
1332
1363
|
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1333
1364
|
}).strict();
|
|
1334
1365
|
exports.richCaptionActiveFontSchema = exports.richcaptionpropertiesRichCaptionActiveFontSchema;
|
|
1335
|
-
/**
|
|
1336
|
-
* Font properties for rich captions. Defaults to Roboto.
|
|
1337
|
-
*/
|
|
1338
|
-
exports.richcaptionpropertiesRichCaptionFontSchema = zod_1.z.object({
|
|
1339
|
-
family: zod_1.z.optional(zod_1.z.string()).default("Roboto"),
|
|
1340
|
-
size: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1341
|
-
return undefined; if (Array.isArray(v))
|
|
1342
|
-
return v; if (typeof v === 'string') {
|
|
1343
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1344
|
-
return v;
|
|
1345
|
-
return Number(v);
|
|
1346
|
-
} return v; }), zod_1.z.number().int().gte(1).lte(500)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(24),
|
|
1347
|
-
weight: zod_1.z.optional(zod_1.z.unknown()).default("400"),
|
|
1348
|
-
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("#ffffff"),
|
|
1349
|
-
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1350
|
-
return undefined; if (Array.isArray(v))
|
|
1351
|
-
return v; if (typeof v === 'string') {
|
|
1352
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1353
|
-
return v;
|
|
1354
|
-
return Number(v);
|
|
1355
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1356
|
-
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*\}\}$/)])),
|
|
1357
|
-
}).strict();
|
|
1358
1366
|
/**
|
|
1359
1367
|
* Word-level animation properties for caption effects.
|
|
1360
1368
|
*/
|
|
@@ -1681,7 +1689,7 @@ exports.richcaptionassetRichCaptionAssetSchema = zod_1.z.object({
|
|
|
1681
1689
|
type: zod_1.z.enum(["rich-caption"]),
|
|
1682
1690
|
src: zod_1.z.optional(zod_1.z.string().min(1)),
|
|
1683
1691
|
words: zod_1.z.optional(zod_1.z.array(exports.richcaptionpropertiesWordTimingSchema).max(100000)),
|
|
1684
|
-
font: zod_1.z.optional(exports.
|
|
1692
|
+
font: zod_1.z.optional(exports.richtextpropertiesRichTextFontSchema),
|
|
1685
1693
|
style: zod_1.z.optional(exports.richtextpropertiesRichTextStyleSchema),
|
|
1686
1694
|
stroke: zod_1.z.optional(exports.richtextpropertiesRichTextStrokeSchema),
|
|
1687
1695
|
shadow: zod_1.z.optional(exports.richtextpropertiesRichTextShadowSchema),
|
|
@@ -2108,612 +2116,23 @@ exports.soundtrackSoundtrackSchema = zod_1.z.object({
|
|
|
2108
2116
|
}).strict();
|
|
2109
2117
|
exports.soundtrackSchema = exports.soundtrackSoundtrackSchema;
|
|
2110
2118
|
/**
|
|
2111
|
-
*
|
|
2112
|
-
*
|
|
2113
|
-
*
|
|
2114
|
-
*/
|
|
2115
|
-
exports.svgpropertiesSvgGradientStopSchema = zod_1.z.object({
|
|
2116
|
-
offset: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2117
|
-
return undefined; if (Array.isArray(v))
|
|
2118
|
-
return v; if (typeof v === 'string') {
|
|
2119
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2120
|
-
return v;
|
|
2121
|
-
return Number(v);
|
|
2122
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2123
|
-
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*\}\}$/)]),
|
|
2124
|
-
}).strict();
|
|
2125
|
-
exports.svgGradientStopSchema = exports.svgpropertiesSvgGradientStopSchema;
|
|
2126
|
-
/**
|
|
2127
|
-
* A linear gradient fill that transitions colors along a straight line.
|
|
2128
|
-
* The gradient direction is controlled by the `angle` property.
|
|
2129
|
-
*
|
|
2130
|
-
*/
|
|
2131
|
-
exports.svgpropertiesSvgLinearGradientFillSchema = zod_1.z.object({
|
|
2132
|
-
type: zod_1.z.enum(["linear"]),
|
|
2133
|
-
angle: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2134
|
-
return undefined; if (Array.isArray(v))
|
|
2135
|
-
return v; if (typeof v === 'string') {
|
|
2136
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2137
|
-
return v;
|
|
2138
|
-
return Number(v);
|
|
2139
|
-
} return v; }), zod_1.z.number().gte(0).lte(360)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
2140
|
-
stops: zod_1.z.array(exports.svgpropertiesSvgGradientStopSchema).min(2),
|
|
2141
|
-
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2142
|
-
return undefined; if (Array.isArray(v))
|
|
2143
|
-
return v; if (typeof v === 'string') {
|
|
2144
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2145
|
-
return v;
|
|
2146
|
-
return Number(v);
|
|
2147
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
2148
|
-
}).strict();
|
|
2149
|
-
exports.svgLinearGradientFillSchema = exports.svgpropertiesSvgLinearGradientFillSchema;
|
|
2150
|
-
/**
|
|
2151
|
-
* A radial gradient fill that transitions colors radiating outward from a center point.
|
|
2152
|
-
* The gradient creates a circular or elliptical color transition.
|
|
2119
|
+
* The SvgAsset is used to create scalable vector graphic (SVG) assets using
|
|
2120
|
+
* raw SVG markup.
|
|
2153
2121
|
*
|
|
2154
|
-
*/
|
|
2155
|
-
exports.svgpropertiesSvgRadialGradientFillSchema = zod_1.z.object({
|
|
2156
|
-
type: zod_1.z.enum(["radial"]),
|
|
2157
|
-
stops: zod_1.z.array(exports.svgpropertiesSvgGradientStopSchema).min(2),
|
|
2158
|
-
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2159
|
-
return undefined; if (Array.isArray(v))
|
|
2160
|
-
return v; if (typeof v === 'string') {
|
|
2161
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2162
|
-
return v;
|
|
2163
|
-
return Number(v);
|
|
2164
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
2165
|
-
}).strict();
|
|
2166
|
-
exports.svgRadialGradientFillSchema = exports.svgpropertiesSvgRadialGradientFillSchema;
|
|
2167
|
-
/**
|
|
2168
|
-
* Drop shadow properties for SVG shapes. Creates a shadow effect behind the shape.
|
|
2169
|
-
*
|
|
2170
|
-
*/
|
|
2171
|
-
exports.svgpropertiesSvgShadowSchema = zod_1.z.object({
|
|
2172
|
-
offsetX: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2173
|
-
return undefined; if (Array.isArray(v))
|
|
2174
|
-
return v; if (typeof v === 'string') {
|
|
2175
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2176
|
-
return v;
|
|
2177
|
-
return Number(v);
|
|
2178
|
-
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
2179
|
-
offsetY: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2180
|
-
return undefined; if (Array.isArray(v))
|
|
2181
|
-
return v; if (typeof v === 'string') {
|
|
2182
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2183
|
-
return v;
|
|
2184
|
-
return Number(v);
|
|
2185
|
-
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
2186
|
-
blur: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2187
|
-
return undefined; if (Array.isArray(v))
|
|
2188
|
-
return v; if (typeof v === 'string') {
|
|
2189
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2190
|
-
return v;
|
|
2191
|
-
return Number(v);
|
|
2192
|
-
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
2193
|
-
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"),
|
|
2194
|
-
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2195
|
-
return undefined; if (Array.isArray(v))
|
|
2196
|
-
return v; if (typeof v === 'string') {
|
|
2197
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2198
|
-
return v;
|
|
2199
|
-
return Number(v);
|
|
2200
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
|
|
2201
|
-
}).strict();
|
|
2202
|
-
exports.svgShadowSchema = exports.svgpropertiesSvgShadowSchema;
|
|
2203
|
-
/**
|
|
2204
|
-
* A solid color fill for SVG shapes.
|
|
2205
|
-
*/
|
|
2206
|
-
exports.svgpropertiesSvgSolidFillSchema = zod_1.z.object({
|
|
2207
|
-
type: zod_1.z.enum(["solid"]),
|
|
2208
|
-
color: zod_1.z
|
|
2209
|
-
.string()
|
|
2210
|
-
.regex(/^#[A-Fa-f0-9]{6}$/)
|
|
2211
|
-
.default("#000000"),
|
|
2212
|
-
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2213
|
-
return undefined; if (Array.isArray(v))
|
|
2214
|
-
return v; if (typeof v === 'string') {
|
|
2215
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2216
|
-
return v;
|
|
2217
|
-
return Number(v);
|
|
2218
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
2219
|
-
}).strict();
|
|
2220
|
-
exports.svgSolidFillSchema = exports.svgpropertiesSvgSolidFillSchema;
|
|
2221
|
-
/**
|
|
2222
|
-
* Fill properties for SVG shapes. Supports solid colors and gradients.
|
|
2223
|
-
* The fill defines how the interior of a shape is painted.
|
|
2224
|
-
*
|
|
2225
|
-
*/
|
|
2226
|
-
exports.svgpropertiesSvgFillSchema = zod_1.z.discriminatedUnion("type", [
|
|
2227
|
-
exports.svgpropertiesSvgSolidFillSchema,
|
|
2228
|
-
exports.svgpropertiesSvgLinearGradientFillSchema,
|
|
2229
|
-
exports.svgpropertiesSvgRadialGradientFillSchema,
|
|
2230
|
-
]);
|
|
2231
|
-
exports.svgFillSchema = exports.svgpropertiesSvgFillSchema;
|
|
2232
|
-
/**
|
|
2233
|
-
* Stroke (outline) properties for SVG shapes. The stroke defines how the outline
|
|
2234
|
-
* of a shape is painted, including its color, width, and line style.
|
|
2235
|
-
*
|
|
2236
|
-
*/
|
|
2237
|
-
exports.svgpropertiesSvgStrokeSchema = zod_1.z.object({
|
|
2238
|
-
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"),
|
|
2239
|
-
width: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2240
|
-
return undefined; if (Array.isArray(v))
|
|
2241
|
-
return v; if (typeof v === 'string') {
|
|
2242
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2243
|
-
return v;
|
|
2244
|
-
return Number(v);
|
|
2245
|
-
} return v; }), zod_1.z.number().gte(0).lte(100)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
2246
|
-
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2247
|
-
return undefined; if (Array.isArray(v))
|
|
2248
|
-
return v; if (typeof v === 'string') {
|
|
2249
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2250
|
-
return v;
|
|
2251
|
-
return Number(v);
|
|
2252
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
2253
|
-
lineCap: zod_1.z.optional(zod_1.z.enum(["butt", "round", "square"])),
|
|
2254
|
-
lineJoin: zod_1.z.optional(zod_1.z.enum(["miter", "round", "bevel"])),
|
|
2255
|
-
dashArray: zod_1.z.optional(zod_1.z.array(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2256
|
-
return undefined; if (Array.isArray(v))
|
|
2257
|
-
return v; if (typeof v === 'string') {
|
|
2258
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2259
|
-
return v;
|
|
2260
|
-
return Number(v);
|
|
2261
|
-
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))),
|
|
2262
|
-
dashOffset: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2263
|
-
return undefined; if (Array.isArray(v))
|
|
2264
|
-
return v; if (typeof v === 'string') {
|
|
2265
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2266
|
-
return v;
|
|
2267
|
-
return Number(v);
|
|
2268
|
-
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
2269
|
-
}).strict();
|
|
2270
|
-
exports.svgStrokeSchema = exports.svgpropertiesSvgStrokeSchema;
|
|
2271
|
-
/**
|
|
2272
|
-
* Transformation properties for positioning, rotating, and scaling SVG shapes.
|
|
2273
|
-
*
|
|
2274
|
-
*/
|
|
2275
|
-
exports.svgpropertiesSvgTransformSchema = zod_1.z.object({
|
|
2276
|
-
x: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2277
|
-
return undefined; if (Array.isArray(v))
|
|
2278
|
-
return v; if (typeof v === 'string') {
|
|
2279
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2280
|
-
return v;
|
|
2281
|
-
return Number(v);
|
|
2282
|
-
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
2283
|
-
y: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2284
|
-
return undefined; if (Array.isArray(v))
|
|
2285
|
-
return v; if (typeof v === 'string') {
|
|
2286
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2287
|
-
return v;
|
|
2288
|
-
return Number(v);
|
|
2289
|
-
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
2290
|
-
rotation: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2291
|
-
return undefined; if (Array.isArray(v))
|
|
2292
|
-
return v; if (typeof v === 'string') {
|
|
2293
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2294
|
-
return v;
|
|
2295
|
-
return Number(v);
|
|
2296
|
-
} return v; }), zod_1.z.number().gte(-360).lte(360)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
2297
|
-
scale: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2298
|
-
return undefined; if (Array.isArray(v))
|
|
2299
|
-
return v; if (typeof v === 'string') {
|
|
2300
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2301
|
-
return v;
|
|
2302
|
-
return Number(v);
|
|
2303
|
-
} return v; }), zod_1.z.number().gte(0.01).lte(100)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
2304
|
-
originX: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2305
|
-
return undefined; if (Array.isArray(v))
|
|
2306
|
-
return v; if (typeof v === 'string') {
|
|
2307
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2308
|
-
return v;
|
|
2309
|
-
return Number(v);
|
|
2310
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
|
|
2311
|
-
originY: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2312
|
-
return undefined; if (Array.isArray(v))
|
|
2313
|
-
return v; if (typeof v === 'string') {
|
|
2314
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2315
|
-
return v;
|
|
2316
|
-
return Number(v);
|
|
2317
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
|
|
2318
|
-
}).strict();
|
|
2319
|
-
exports.svgTransformSchema = exports.svgpropertiesSvgTransformSchema;
|
|
2320
|
-
/**
|
|
2321
|
-
* An arrow shape pointing to the right by default.
|
|
2322
|
-
* Use transform rotation to change direction.
|
|
2323
|
-
*
|
|
2324
|
-
*/
|
|
2325
|
-
exports.svgshapesSvgArrowShapeSchema = zod_1.z.object({
|
|
2326
|
-
type: zod_1.z.enum(["arrow"]),
|
|
2327
|
-
length: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2328
|
-
return undefined; if (Array.isArray(v))
|
|
2329
|
-
return v; if (typeof v === 'string') {
|
|
2330
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2331
|
-
return v;
|
|
2332
|
-
return Number(v);
|
|
2333
|
-
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2334
|
-
headWidth: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2335
|
-
return undefined; if (Array.isArray(v))
|
|
2336
|
-
return v; if (typeof v === 'string') {
|
|
2337
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2338
|
-
return v;
|
|
2339
|
-
return Number(v);
|
|
2340
|
-
} return v; }), zod_1.z.number().gte(1).lte(1000)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2341
|
-
headLength: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2342
|
-
return undefined; if (Array.isArray(v))
|
|
2343
|
-
return v; if (typeof v === 'string') {
|
|
2344
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2345
|
-
return v;
|
|
2346
|
-
return Number(v);
|
|
2347
|
-
} return v; }), zod_1.z.number().gte(1).lte(1000)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2348
|
-
shaftWidth: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2349
|
-
return undefined; if (Array.isArray(v))
|
|
2350
|
-
return v; if (typeof v === 'string') {
|
|
2351
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2352
|
-
return v;
|
|
2353
|
-
return Number(v);
|
|
2354
|
-
} return v; }), zod_1.z.number().gte(1).lte(1000)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2355
|
-
}).strict();
|
|
2356
|
-
exports.svgArrowShapeSchema = exports.svgshapesSvgArrowShapeSchema;
|
|
2357
|
-
/**
|
|
2358
|
-
* A perfect circle shape defined by its radius.
|
|
2359
|
-
* The circle is centered at the shape's position.
|
|
2360
|
-
*
|
|
2361
|
-
*/
|
|
2362
|
-
exports.svgshapesSvgCircleShapeSchema = zod_1.z.object({
|
|
2363
|
-
type: zod_1.z.enum(["circle"]),
|
|
2364
|
-
radius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2365
|
-
return undefined; if (Array.isArray(v))
|
|
2366
|
-
return v; if (typeof v === 'string') {
|
|
2367
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2368
|
-
return v;
|
|
2369
|
-
return Number(v);
|
|
2370
|
-
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2371
|
-
}).strict();
|
|
2372
|
-
exports.svgCircleShapeSchema = exports.svgshapesSvgCircleShapeSchema;
|
|
2373
|
-
/**
|
|
2374
|
-
* A cross or plus shape with equal or different arm lengths.
|
|
2375
|
-
* Can be styled as a plus sign (+) or a cross (x with rotation).
|
|
2376
|
-
*
|
|
2377
|
-
*/
|
|
2378
|
-
exports.svgshapesSvgCrossShapeSchema = zod_1.z.object({
|
|
2379
|
-
type: zod_1.z.enum(["cross"]),
|
|
2380
|
-
width: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2381
|
-
return undefined; if (Array.isArray(v))
|
|
2382
|
-
return v; if (typeof v === 'string') {
|
|
2383
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2384
|
-
return v;
|
|
2385
|
-
return Number(v);
|
|
2386
|
-
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2387
|
-
height: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2388
|
-
return undefined; if (Array.isArray(v))
|
|
2389
|
-
return v; if (typeof v === 'string') {
|
|
2390
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2391
|
-
return v;
|
|
2392
|
-
return Number(v);
|
|
2393
|
-
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2394
|
-
thickness: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2395
|
-
return undefined; if (Array.isArray(v))
|
|
2396
|
-
return v; if (typeof v === 'string') {
|
|
2397
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2398
|
-
return v;
|
|
2399
|
-
return Number(v);
|
|
2400
|
-
} return v; }), zod_1.z.number().gte(1).lte(500)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2401
|
-
}).strict();
|
|
2402
|
-
exports.svgCrossShapeSchema = exports.svgshapesSvgCrossShapeSchema;
|
|
2403
|
-
/**
|
|
2404
|
-
* An ellipse (oval) shape with separate horizontal and vertical radii.
|
|
2405
|
-
* The ellipse is centered at the shape's position.
|
|
2406
|
-
*
|
|
2407
|
-
*/
|
|
2408
|
-
exports.svgshapesSvgEllipseShapeSchema = zod_1.z.object({
|
|
2409
|
-
type: zod_1.z.enum(["ellipse"]),
|
|
2410
|
-
radiusX: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2411
|
-
return undefined; if (Array.isArray(v))
|
|
2412
|
-
return v; if (typeof v === 'string') {
|
|
2413
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2414
|
-
return v;
|
|
2415
|
-
return Number(v);
|
|
2416
|
-
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2417
|
-
radiusY: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2418
|
-
return undefined; if (Array.isArray(v))
|
|
2419
|
-
return v; if (typeof v === 'string') {
|
|
2420
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2421
|
-
return v;
|
|
2422
|
-
return Number(v);
|
|
2423
|
-
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2424
|
-
}).strict();
|
|
2425
|
-
exports.svgEllipseShapeSchema = exports.svgshapesSvgEllipseShapeSchema;
|
|
2426
|
-
/**
|
|
2427
|
-
* A heart shape commonly used for love/like icons.
|
|
2428
|
-
* The heart is defined by a single size parameter.
|
|
2429
|
-
*
|
|
2430
|
-
*/
|
|
2431
|
-
exports.svgshapesSvgHeartShapeSchema = zod_1.z.object({
|
|
2432
|
-
type: zod_1.z.enum(["heart"]),
|
|
2433
|
-
size: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2434
|
-
return undefined; if (Array.isArray(v))
|
|
2435
|
-
return v; if (typeof v === 'string') {
|
|
2436
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2437
|
-
return v;
|
|
2438
|
-
return Number(v);
|
|
2439
|
-
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2440
|
-
}).strict();
|
|
2441
|
-
exports.svgHeartShapeSchema = exports.svgshapesSvgHeartShapeSchema;
|
|
2442
|
-
/**
|
|
2443
|
-
* A straight line shape with a specified length and thickness.
|
|
2444
|
-
* The line is drawn horizontally by default and can be rotated using transform.
|
|
2445
|
-
*
|
|
2446
|
-
*/
|
|
2447
|
-
exports.svgshapesSvgLineShapeSchema = zod_1.z.object({
|
|
2448
|
-
type: zod_1.z.enum(["line"]),
|
|
2449
|
-
length: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2450
|
-
return undefined; if (Array.isArray(v))
|
|
2451
|
-
return v; if (typeof v === 'string') {
|
|
2452
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2453
|
-
return v;
|
|
2454
|
-
return Number(v);
|
|
2455
|
-
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2456
|
-
thickness: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2457
|
-
return undefined; if (Array.isArray(v))
|
|
2458
|
-
return v; if (typeof v === 'string') {
|
|
2459
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2460
|
-
return v;
|
|
2461
|
-
return Number(v);
|
|
2462
|
-
} return v; }), zod_1.z.number().gte(1).lte(500)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2463
|
-
}).strict();
|
|
2464
|
-
exports.svgLineShapeSchema = exports.svgshapesSvgLineShapeSchema;
|
|
2465
|
-
/**
|
|
2466
|
-
* A custom shape defined by SVG path data.
|
|
2467
|
-
* Supports all standard SVG path commands for creating complex shapes.
|
|
2468
|
-
*
|
|
2469
|
-
* **Path Commands:**
|
|
2470
|
-
* - `M x y` / `m dx dy` - Move to (absolute/relative)
|
|
2471
|
-
* - `L x y` / `l dx dy` - Line to
|
|
2472
|
-
* - `H x` / `h dx` - Horizontal line to
|
|
2473
|
-
* - `V y` / `v dy` - Vertical line to
|
|
2474
|
-
* - `C x1 y1 x2 y2 x y` / `c` - Cubic Bezier curve
|
|
2475
|
-
* - `S x2 y2 x y` / `s` - Smooth cubic Bezier
|
|
2476
|
-
* - `Q x1 y1 x y` / `q` - Quadratic Bezier curve
|
|
2477
|
-
* - `T x y` / `t` - Smooth quadratic Bezier
|
|
2478
|
-
* - `A rx ry angle large-arc sweep x y` / `a` - Elliptical arc
|
|
2479
|
-
* - `Z` / `z` - Close path
|
|
2480
|
-
*
|
|
2481
|
-
*/
|
|
2482
|
-
exports.svgshapesSvgPathShapeSchema = zod_1.z.object({
|
|
2483
|
-
type: zod_1.z.enum(["path"]),
|
|
2484
|
-
d: zod_1.z.string().min(1).max(100000),
|
|
2485
|
-
}).strict();
|
|
2486
|
-
exports.svgPathShapeSchema = exports.svgshapesSvgPathShapeSchema;
|
|
2487
|
-
/**
|
|
2488
|
-
* A regular polygon shape with a specified number of sides.
|
|
2489
|
-
* Examples: triangle (3), square (4), pentagon (5), hexagon (6), etc.
|
|
2490
|
-
* The polygon is inscribed in a circle of the given radius.
|
|
2491
|
-
*
|
|
2492
|
-
*/
|
|
2493
|
-
exports.svgshapesSvgPolygonShapeSchema = zod_1.z.object({
|
|
2494
|
-
type: zod_1.z.enum(["polygon"]),
|
|
2495
|
-
sides: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2496
|
-
return undefined; if (Array.isArray(v))
|
|
2497
|
-
return v; if (typeof v === 'string') {
|
|
2498
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2499
|
-
return v;
|
|
2500
|
-
return Number(v);
|
|
2501
|
-
} return v; }), zod_1.z.number().int().gte(3).lte(100)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2502
|
-
radius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2503
|
-
return undefined; if (Array.isArray(v))
|
|
2504
|
-
return v; if (typeof v === 'string') {
|
|
2505
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2506
|
-
return v;
|
|
2507
|
-
return Number(v);
|
|
2508
|
-
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2509
|
-
}).strict();
|
|
2510
|
-
exports.svgPolygonShapeSchema = exports.svgshapesSvgPolygonShapeSchema;
|
|
2511
|
-
/**
|
|
2512
|
-
* A rectangle shape with optional rounded corners.
|
|
2513
|
-
* The rectangle is defined by its width and height dimensions.
|
|
2514
|
-
*
|
|
2515
|
-
*/
|
|
2516
|
-
exports.svgshapesSvgRectangleShapeSchema = zod_1.z.object({
|
|
2517
|
-
type: zod_1.z.enum(["rectangle"]),
|
|
2518
|
-
width: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2519
|
-
return undefined; if (Array.isArray(v))
|
|
2520
|
-
return v; if (typeof v === 'string') {
|
|
2521
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2522
|
-
return v;
|
|
2523
|
-
return Number(v);
|
|
2524
|
-
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2525
|
-
height: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2526
|
-
return undefined; if (Array.isArray(v))
|
|
2527
|
-
return v; if (typeof v === 'string') {
|
|
2528
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2529
|
-
return v;
|
|
2530
|
-
return Number(v);
|
|
2531
|
-
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2532
|
-
cornerRadius: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2533
|
-
return undefined; if (Array.isArray(v))
|
|
2534
|
-
return v; if (typeof v === 'string') {
|
|
2535
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2536
|
-
return v;
|
|
2537
|
-
return Number(v);
|
|
2538
|
-
} return v; }), zod_1.z.number().gte(0).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
2539
|
-
}).strict();
|
|
2540
|
-
exports.svgRectangleShapeSchema = exports.svgshapesSvgRectangleShapeSchema;
|
|
2541
|
-
/**
|
|
2542
|
-
* A ring (donut/annulus) shape - a circle with a circular hole in the center.
|
|
2543
|
-
* The ring is defined by outer and inner radii.
|
|
2544
|
-
*
|
|
2545
|
-
*/
|
|
2546
|
-
exports.svgshapesSvgRingShapeSchema = zod_1.z.object({
|
|
2547
|
-
type: zod_1.z.enum(["ring"]),
|
|
2548
|
-
outerRadius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2549
|
-
return undefined; if (Array.isArray(v))
|
|
2550
|
-
return v; if (typeof v === 'string') {
|
|
2551
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2552
|
-
return v;
|
|
2553
|
-
return Number(v);
|
|
2554
|
-
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2555
|
-
innerRadius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2556
|
-
return undefined; if (Array.isArray(v))
|
|
2557
|
-
return v; if (typeof v === 'string') {
|
|
2558
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2559
|
-
return v;
|
|
2560
|
-
return Number(v);
|
|
2561
|
-
} return v; }), zod_1.z.number().gte(0).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2562
|
-
}).strict();
|
|
2563
|
-
exports.svgRingShapeSchema = exports.svgshapesSvgRingShapeSchema;
|
|
2564
|
-
/**
|
|
2565
|
-
* A star shape with a specified number of points.
|
|
2566
|
-
* The star is defined by outer and inner radii, creating the characteristic
|
|
2567
|
-
* pointed appearance.
|
|
2568
|
-
*
|
|
2569
|
-
*/
|
|
2570
|
-
exports.svgshapesSvgStarShapeSchema = zod_1.z.object({
|
|
2571
|
-
type: zod_1.z.enum(["star"]),
|
|
2572
|
-
points: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2573
|
-
return undefined; if (Array.isArray(v))
|
|
2574
|
-
return v; if (typeof v === 'string') {
|
|
2575
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2576
|
-
return v;
|
|
2577
|
-
return Number(v);
|
|
2578
|
-
} return v; }), zod_1.z.number().int().gte(3).lte(100)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2579
|
-
outerRadius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2580
|
-
return undefined; if (Array.isArray(v))
|
|
2581
|
-
return v; if (typeof v === 'string') {
|
|
2582
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2583
|
-
return v;
|
|
2584
|
-
return Number(v);
|
|
2585
|
-
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2586
|
-
innerRadius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2587
|
-
return undefined; if (Array.isArray(v))
|
|
2588
|
-
return v; if (typeof v === 'string') {
|
|
2589
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2590
|
-
return v;
|
|
2591
|
-
return Number(v);
|
|
2592
|
-
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2593
|
-
}).strict();
|
|
2594
|
-
exports.svgStarShapeSchema = exports.svgshapesSvgStarShapeSchema;
|
|
2595
|
-
/**
|
|
2596
|
-
* The shape definition for an SVG asset. Each shape type has its own specific
|
|
2597
|
-
* properties. The `type` field determines which shape is rendered.
|
|
2598
|
-
*
|
|
2599
|
-
*/
|
|
2600
|
-
exports.svgshapesSvgShapeSchema = zod_1.z.discriminatedUnion("type", [
|
|
2601
|
-
exports.svgshapesSvgRectangleShapeSchema,
|
|
2602
|
-
exports.svgshapesSvgCircleShapeSchema,
|
|
2603
|
-
exports.svgshapesSvgEllipseShapeSchema,
|
|
2604
|
-
exports.svgshapesSvgLineShapeSchema,
|
|
2605
|
-
exports.svgshapesSvgPolygonShapeSchema,
|
|
2606
|
-
exports.svgshapesSvgStarShapeSchema,
|
|
2607
|
-
exports.svgshapesSvgArrowShapeSchema,
|
|
2608
|
-
exports.svgshapesSvgHeartShapeSchema,
|
|
2609
|
-
exports.svgshapesSvgCrossShapeSchema,
|
|
2610
|
-
exports.svgshapesSvgRingShapeSchema,
|
|
2611
|
-
exports.svgshapesSvgPathShapeSchema,
|
|
2612
|
-
]);
|
|
2613
|
-
exports.svgShapeSchema = exports.svgshapesSvgShapeSchema;
|
|
2614
|
-
/**
|
|
2615
|
-
* The SvgAsset is used to add scalable vector graphics (SVG) shapes to a video.
|
|
2616
|
-
* It provides two mutually exclusive ways to define shapes:
|
|
2617
|
-
*
|
|
2618
|
-
* **Option 1: Import SVG markup using `src`**
|
|
2619
2122
|
* ```json
|
|
2620
2123
|
* {
|
|
2621
2124
|
* "type": "svg",
|
|
2622
2125
|
* "src": "<svg width=\"100\" height=\"100\"><circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"#FF0000\"/></svg>"
|
|
2623
2126
|
* }
|
|
2624
2127
|
* ```
|
|
2625
|
-
* When using `src`, no other properties are allowed. The fill, stroke, and dimensions
|
|
2626
|
-
* are automatically extracted from the SVG markup.
|
|
2627
|
-
*
|
|
2628
|
-
* **Option 2: Define shapes programmatically using `shape`**
|
|
2629
|
-
* ```json
|
|
2630
|
-
* {
|
|
2631
|
-
* "type": "svg",
|
|
2632
|
-
* "shape": { "type": "circle", "radius": 50 },
|
|
2633
|
-
* "fill": { "type": "solid", "color": "#FF0000" }
|
|
2634
|
-
* }
|
|
2635
|
-
* ```
|
|
2636
|
-
* When using `shape`, you can customize fill, stroke, shadow, transform, and other properties.
|
|
2637
|
-
* The `src` property is not allowed in this mode.
|
|
2638
|
-
*
|
|
2639
|
-
* **Important:** You must provide either `src` OR `shape`, but not both.
|
|
2640
|
-
* These two modes are mutually exclusive.
|
|
2641
|
-
*
|
|
2642
|
-
* **Available Shapes (Option 2 only):**
|
|
2643
|
-
* - `rectangle` - Rectangles with optional rounded corners
|
|
2644
|
-
* - `circle` - Perfect circles
|
|
2645
|
-
* - `ellipse` - Ellipses/ovals with separate x and y radii
|
|
2646
|
-
* - `line` - Straight lines with configurable thickness
|
|
2647
|
-
* - `polygon` - Regular polygons (triangle, pentagon, hexagon, etc.)
|
|
2648
|
-
* - `star` - Multi-pointed stars
|
|
2649
|
-
* - `arrow` - Directional arrows
|
|
2650
|
-
* - `heart` - Heart shapes
|
|
2651
|
-
* - `cross` - Plus/cross shapes
|
|
2652
|
-
* - `ring` - Donut/ring shapes
|
|
2653
|
-
* - `path` - Custom shapes using SVG path data
|
|
2654
2128
|
*
|
|
2655
|
-
* See [W3C SVG 2 Specification](https://www.w3.org/TR/SVG2/) for
|
|
2129
|
+
* See [W3C SVG 2 Specification](https://www.w3.org/TR/SVG2/) for SVG markup syntax.
|
|
2656
2130
|
*
|
|
2657
2131
|
*/
|
|
2658
2132
|
exports.svgassetSvgAssetSchema = zod_1.z.object({
|
|
2659
2133
|
type: zod_1.z.enum(["svg"]),
|
|
2660
|
-
src: zod_1.z.
|
|
2661
|
-
|
|
2662
|
-
fill: zod_1.z.optional(exports.svgpropertiesSvgFillSchema),
|
|
2663
|
-
stroke: zod_1.z.optional(exports.svgpropertiesSvgStrokeSchema),
|
|
2664
|
-
shadow: zod_1.z.optional(exports.svgpropertiesSvgShadowSchema),
|
|
2665
|
-
transform: zod_1.z.optional(exports.svgpropertiesSvgTransformSchema),
|
|
2666
|
-
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2667
|
-
return undefined; if (Array.isArray(v))
|
|
2668
|
-
return v; if (typeof v === 'string') {
|
|
2669
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2670
|
-
return v;
|
|
2671
|
-
return Number(v);
|
|
2672
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
2673
|
-
width: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2674
|
-
return undefined; if (Array.isArray(v))
|
|
2675
|
-
return v; if (typeof v === 'string') {
|
|
2676
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2677
|
-
return v;
|
|
2678
|
-
return Number(v);
|
|
2679
|
-
} return v; }), zod_1.z.number().int().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2680
|
-
height: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2681
|
-
return undefined; if (Array.isArray(v))
|
|
2682
|
-
return v; if (typeof v === 'string') {
|
|
2683
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2684
|
-
return v;
|
|
2685
|
-
return Number(v);
|
|
2686
|
-
} return v; }), zod_1.z.number().int().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2687
|
-
}).strict().superRefine((data, ctx) => {
|
|
2688
|
-
const hasShape = data.shape !== undefined;
|
|
2689
|
-
const hasSrc = data.src !== undefined && data.src.trim() !== "";
|
|
2690
|
-
if (!hasShape && !hasSrc) {
|
|
2691
|
-
ctx.addIssue({
|
|
2692
|
-
code: zod_1.z.ZodIssueCode.custom,
|
|
2693
|
-
message: "Either 'src' or 'shape' must be provided",
|
|
2694
|
-
path: [],
|
|
2695
|
-
});
|
|
2696
|
-
}
|
|
2697
|
-
if (hasShape && hasSrc) {
|
|
2698
|
-
ctx.addIssue({
|
|
2699
|
-
code: zod_1.z.ZodIssueCode.custom,
|
|
2700
|
-
message: "Provide either 'src' or 'shape', not both",
|
|
2701
|
-
path: ["src"],
|
|
2702
|
-
});
|
|
2703
|
-
}
|
|
2704
|
-
if (hasSrc) {
|
|
2705
|
-
const disallowedProps = ["shape", "fill", "stroke", "shadow", "transform", "width", "height"];
|
|
2706
|
-
for (const prop of disallowedProps) {
|
|
2707
|
-
if (data[prop] !== undefined) {
|
|
2708
|
-
ctx.addIssue({
|
|
2709
|
-
code: zod_1.z.ZodIssueCode.custom,
|
|
2710
|
-
message: `'${prop}' is not allowed when using 'src'. Only 'type' and 'src' are allowed in import mode`,
|
|
2711
|
-
path: [prop],
|
|
2712
|
-
});
|
|
2713
|
-
}
|
|
2714
|
-
}
|
|
2715
|
-
}
|
|
2716
|
-
});
|
|
2134
|
+
src: zod_1.z.string().min(1).max(500000),
|
|
2135
|
+
}).strict();
|
|
2717
2136
|
exports.svgAssetSchema = exports.svgassetSvgAssetSchema;
|
|
2718
2137
|
/**
|
|
2719
2138
|
* Configure the id and optional merge fields to render a template by id.
|