@shotstack/schemas 1.9.7 → 1.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -121,8 +121,14 @@ export const cropSchema = cropCropSchema;
121
121
  export const akamaiNetStorageDestinationOptionsAkamaiNetStorageDestinationOptionsSchema = z.object({
122
122
  host: z.string(),
123
123
  cpCode: z.string(),
124
- path: z.optional(z.unknown()),
125
- filename: z.optional(z.unknown())
124
+ path: z.optional(z.union([
125
+ z.string(),
126
+ z.null()
127
+ ])),
128
+ filename: z.optional(z.union([
129
+ z.string(),
130
+ z.null()
131
+ ]))
126
132
  }).strict();
127
133
 
128
134
  /**
@@ -139,8 +145,14 @@ export const akamaiNetStorageDestinationAkamaiNetStorageDestinationSchema = z.ob
139
145
  export const azureBlobStorageDestinationOptionsAzureBlobStorageDestinationOptionsSchema = z.object({
140
146
  accountName: z.string(),
141
147
  container: z.string(),
142
- prefix: z.optional(z.unknown()),
143
- filename: z.optional(z.unknown())
148
+ prefix: z.optional(z.union([
149
+ z.string(),
150
+ z.null()
151
+ ])),
152
+ filename: z.optional(z.union([
153
+ z.string(),
154
+ z.null()
155
+ ]))
144
156
  }).strict();
145
157
 
146
158
  /**
@@ -1332,303 +1344,6 @@ export const svgassetSvgAssetSchema = z.object({
1332
1344
 
1333
1345
  export const svgAssetSchema = svgassetSvgAssetSchema;
1334
1346
 
1335
- /**
1336
- * A color stop in a gradient. Each stop defines a color at a specific position
1337
- * along the gradient vector. Gradients require at least 2 stops.
1338
- *
1339
- */
1340
- export const svgpropertiesSvgGradientStopSchema = z.object({
1341
- offset: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1342
- color: z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
1343
- }).strict();
1344
-
1345
- export const svgGradientStopSchema = svgpropertiesSvgGradientStopSchema;
1346
-
1347
- /**
1348
- * A linear gradient fill that transitions colors along a straight line.
1349
- * The gradient direction is controlled by the `angle` property.
1350
- *
1351
- */
1352
- export const svgpropertiesSvgLinearGradientFillSchema = z.object({
1353
- type: z.enum(['linear']),
1354
- angle: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(360)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1355
- stops: z.array(svgpropertiesSvgGradientStopSchema).min(2),
1356
- opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
1357
- }).strict();
1358
-
1359
- export const svgLinearGradientFillSchema = svgpropertiesSvgLinearGradientFillSchema;
1360
-
1361
- /**
1362
- * A radial gradient fill that transitions colors radiating outward from a center point.
1363
- * The gradient creates a circular or elliptical color transition.
1364
- *
1365
- */
1366
- export const svgpropertiesSvgRadialGradientFillSchema = z.object({
1367
- type: z.enum(['radial']),
1368
- stops: z.array(svgpropertiesSvgGradientStopSchema).min(2),
1369
- opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
1370
- }).strict();
1371
-
1372
- export const svgRadialGradientFillSchema = svgpropertiesSvgRadialGradientFillSchema;
1373
-
1374
- /**
1375
- * Drop shadow properties for SVG shapes. Creates a shadow effect behind the shape.
1376
- *
1377
- */
1378
- export const svgpropertiesSvgShadowSchema = z.object({
1379
- offsetX: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1380
- offsetY: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1381
- blur: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1382
- color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
1383
- opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5)
1384
- }).strict();
1385
-
1386
- export const svgShadowSchema = svgpropertiesSvgShadowSchema;
1387
-
1388
- /**
1389
- * A solid color fill for SVG shapes.
1390
- */
1391
- export const svgpropertiesSvgSolidFillSchema = z.object({
1392
- type: z.enum(['solid']),
1393
- color: z.string().regex(/^#[A-Fa-f0-9]{6}$/).default('#000000'),
1394
- opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
1395
- }).strict();
1396
-
1397
- export const svgSolidFillSchema = svgpropertiesSvgSolidFillSchema;
1398
-
1399
- /**
1400
- * Fill properties for SVG shapes. Supports solid colors and gradients.
1401
- * The fill defines how the interior of a shape is painted.
1402
- *
1403
- */
1404
- export const svgpropertiesSvgFillSchema = z.discriminatedUnion("type", [
1405
- svgpropertiesSvgSolidFillSchema,
1406
- svgpropertiesSvgLinearGradientFillSchema,
1407
- svgpropertiesSvgRadialGradientFillSchema,
1408
- ]);
1409
-
1410
- export const svgFillSchema = svgpropertiesSvgFillSchema;
1411
-
1412
- /**
1413
- * Stroke (outline) properties for SVG shapes. The stroke defines how the outline
1414
- * of a shape is painted, including its color, width, and line style.
1415
- *
1416
- */
1417
- export const svgpropertiesSvgStrokeSchema = z.object({
1418
- color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
1419
- width: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1420
- opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1421
- lineCap: z.optional(z.enum([
1422
- 'butt',
1423
- 'round',
1424
- 'square'
1425
- ])),
1426
- lineJoin: z.optional(z.enum([
1427
- 'miter',
1428
- 'round',
1429
- 'bevel'
1430
- ])),
1431
- dashArray: z.optional(z.array(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))),
1432
- dashOffset: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0)
1433
- }).strict();
1434
-
1435
- export const svgStrokeSchema = svgpropertiesSvgStrokeSchema;
1436
-
1437
- /**
1438
- * Transformation properties for positioning, rotating, and scaling SVG shapes.
1439
- *
1440
- */
1441
- export const svgpropertiesSvgTransformSchema = z.object({
1442
- x: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1443
- y: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1444
- rotation: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(-360).lte(360)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1445
- scale: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0.01).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1446
- originX: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
1447
- originY: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5)
1448
- }).strict();
1449
-
1450
- export const svgTransformSchema = svgpropertiesSvgTransformSchema;
1451
-
1452
- /**
1453
- * An arrow shape pointing to the right by default.
1454
- * Use transform rotation to change direction.
1455
- *
1456
- */
1457
- export const svgshapesSvgArrowShapeSchema = z.object({
1458
- type: z.enum(['arrow']),
1459
- length: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1460
- headWidth: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(1000)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1461
- headLength: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(1000)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1462
- shaftWidth: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(1000)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
1463
- }).strict();
1464
-
1465
- export const svgArrowShapeSchema = svgshapesSvgArrowShapeSchema;
1466
-
1467
- /**
1468
- * A perfect circle shape defined by its radius.
1469
- * The circle is centered at the shape's position.
1470
- *
1471
- */
1472
- export const svgshapesSvgCircleShapeSchema = z.object({
1473
- type: z.enum(['circle']),
1474
- radius: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
1475
- }).strict();
1476
-
1477
- export const svgCircleShapeSchema = svgshapesSvgCircleShapeSchema;
1478
-
1479
- /**
1480
- * A cross or plus shape with equal or different arm lengths.
1481
- * Can be styled as a plus sign (+) or a cross (x with rotation).
1482
- *
1483
- */
1484
- export const svgshapesSvgCrossShapeSchema = z.object({
1485
- type: z.enum(['cross']),
1486
- width: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1487
- height: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1488
- thickness: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
1489
- }).strict();
1490
-
1491
- export const svgCrossShapeSchema = svgshapesSvgCrossShapeSchema;
1492
-
1493
- /**
1494
- * An ellipse (oval) shape with separate horizontal and vertical radii.
1495
- * The ellipse is centered at the shape's position.
1496
- *
1497
- */
1498
- export const svgshapesSvgEllipseShapeSchema = z.object({
1499
- type: z.enum(['ellipse']),
1500
- radiusX: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1501
- radiusY: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
1502
- }).strict();
1503
-
1504
- export const svgEllipseShapeSchema = svgshapesSvgEllipseShapeSchema;
1505
-
1506
- /**
1507
- * A heart shape commonly used for love/like icons.
1508
- * The heart is defined by a single size parameter.
1509
- *
1510
- */
1511
- export const svgshapesSvgHeartShapeSchema = z.object({
1512
- type: z.enum(['heart']),
1513
- size: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
1514
- }).strict();
1515
-
1516
- export const svgHeartShapeSchema = svgshapesSvgHeartShapeSchema;
1517
-
1518
- /**
1519
- * A straight line shape with a specified length and thickness.
1520
- * The line is drawn horizontally by default and can be rotated using transform.
1521
- *
1522
- */
1523
- export const svgshapesSvgLineShapeSchema = z.object({
1524
- type: z.enum(['line']),
1525
- length: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1526
- thickness: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
1527
- }).strict();
1528
-
1529
- export const svgLineShapeSchema = svgshapesSvgLineShapeSchema;
1530
-
1531
- /**
1532
- * A custom shape defined by SVG path data.
1533
- * Supports all standard SVG path commands for creating complex shapes.
1534
- *
1535
- * **Path Commands:**
1536
- * - `M x y` / `m dx dy` - Move to (absolute/relative)
1537
- * - `L x y` / `l dx dy` - Line to
1538
- * - `H x` / `h dx` - Horizontal line to
1539
- * - `V y` / `v dy` - Vertical line to
1540
- * - `C x1 y1 x2 y2 x y` / `c` - Cubic Bezier curve
1541
- * - `S x2 y2 x y` / `s` - Smooth cubic Bezier
1542
- * - `Q x1 y1 x y` / `q` - Quadratic Bezier curve
1543
- * - `T x y` / `t` - Smooth quadratic Bezier
1544
- * - `A rx ry angle large-arc sweep x y` / `a` - Elliptical arc
1545
- * - `Z` / `z` - Close path
1546
- *
1547
- */
1548
- export const svgshapesSvgPathShapeSchema = z.object({
1549
- type: z.enum(['path']),
1550
- d: z.string().min(1).max(100000)
1551
- }).strict();
1552
-
1553
- export const svgPathShapeSchema = svgshapesSvgPathShapeSchema;
1554
-
1555
- /**
1556
- * A regular polygon shape with a specified number of sides.
1557
- * Examples: triangle (3), square (4), pentagon (5), hexagon (6), etc.
1558
- * The polygon is inscribed in a circle of the given radius.
1559
- *
1560
- */
1561
- export const svgshapesSvgPolygonShapeSchema = z.object({
1562
- type: z.enum(['polygon']),
1563
- sides: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int().gte(3).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1564
- radius: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
1565
- }).strict();
1566
-
1567
- export const svgPolygonShapeSchema = svgshapesSvgPolygonShapeSchema;
1568
-
1569
- /**
1570
- * A rectangle shape with optional rounded corners.
1571
- * The rectangle is defined by its width and height dimensions.
1572
- *
1573
- */
1574
- export const svgshapesSvgRectangleShapeSchema = z.object({
1575
- type: z.enum(['rectangle']),
1576
- width: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1577
- height: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1578
- cornerRadius: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0)
1579
- }).strict();
1580
-
1581
- export const svgRectangleShapeSchema = svgshapesSvgRectangleShapeSchema;
1582
-
1583
- /**
1584
- * A ring (donut/annulus) shape - a circle with a circular hole in the center.
1585
- * The ring is defined by outer and inner radii.
1586
- *
1587
- */
1588
- export const svgshapesSvgRingShapeSchema = z.object({
1589
- type: z.enum(['ring']),
1590
- outerRadius: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1591
- innerRadius: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
1592
- }).strict();
1593
-
1594
- export const svgRingShapeSchema = svgshapesSvgRingShapeSchema;
1595
-
1596
- /**
1597
- * A star shape with a specified number of points.
1598
- * The star is defined by outer and inner radii, creating the characteristic
1599
- * pointed appearance.
1600
- *
1601
- */
1602
- export const svgshapesSvgStarShapeSchema = z.object({
1603
- type: z.enum(['star']),
1604
- points: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int().gte(3).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1605
- outerRadius: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1606
- innerRadius: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
1607
- }).strict();
1608
-
1609
- export const svgStarShapeSchema = svgshapesSvgStarShapeSchema;
1610
-
1611
- /**
1612
- * The shape definition for an SVG asset. Each shape type has its own specific
1613
- * properties. The `type` field determines which shape is rendered.
1614
- *
1615
- */
1616
- export const svgshapesSvgShapeSchema = z.discriminatedUnion("type", [
1617
- svgshapesSvgRectangleShapeSchema,
1618
- svgshapesSvgCircleShapeSchema,
1619
- svgshapesSvgEllipseShapeSchema,
1620
- svgshapesSvgLineShapeSchema,
1621
- svgshapesSvgPolygonShapeSchema,
1622
- svgshapesSvgStarShapeSchema,
1623
- svgshapesSvgArrowShapeSchema,
1624
- svgshapesSvgHeartShapeSchema,
1625
- svgshapesSvgCrossShapeSchema,
1626
- svgshapesSvgRingShapeSchema,
1627
- svgshapesSvgPathShapeSchema,
1628
- ]);
1629
-
1630
- export const svgShapeSchema = svgshapesSvgShapeSchema;
1631
-
1632
1347
  /**
1633
1348
  * Configure the id and optional merge fields to render a template by id.
1634
1349
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shotstack/schemas",
3
- "version": "1.9.7",
3
+ "version": "1.9.8",
4
4
  "description": "Centralized OpenAPI schemas and TypeScript types for Shotstack API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",