@shotstack/schemas 1.9.0 → 1.9.2

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.
@@ -1398,12 +1398,7 @@ export const richcaptionpropertiesRichCaptionFontSchema = z.object({
1398
1398
  return v;
1399
1399
  return Number(v);
1400
1400
  } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1401
- background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1402
- textDecoration: z.optional(z.enum([
1403
- 'none',
1404
- 'underline',
1405
- 'line-through'
1406
- ]))
1401
+ background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
1407
1402
  }).strict();
1408
1403
  /**
1409
1404
  * Word-level animation properties for caption effects.
@@ -1419,13 +1414,6 @@ export const richcaptionpropertiesRichCaptionWordAnimationSchema = z.object({
1419
1414
  'typewriter',
1420
1415
  'none'
1421
1416
  ]),
1422
- speed: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1423
- return undefined; if (Array.isArray(v))
1424
- return v; if (typeof v === 'string') {
1425
- if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1426
- return v;
1427
- return Number(v);
1428
- } return v; }), z.number().gte(0.5).lte(2)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1429
1417
  direction: z.optional(z.enum([
1430
1418
  'left',
1431
1419
  'right',
@@ -1644,8 +1632,14 @@ export const richTextStrokeSchema = richtextpropertiesRichTextStrokeSchema;
1644
1632
  */
1645
1633
  export const richcaptionpropertiesRichCaptionActiveSchema = z.object({
1646
1634
  font: z.optional(richcaptionpropertiesRichCaptionActiveFontSchema),
1647
- stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
1648
- shadow: z.optional(richtextpropertiesRichTextShadowSchema),
1635
+ stroke: z.optional(z.union([
1636
+ richtextpropertiesRichTextStrokeSchema,
1637
+ z.enum(['none'])
1638
+ ])),
1639
+ shadow: z.optional(z.union([
1640
+ richtextpropertiesRichTextShadowSchema,
1641
+ z.enum(['none'])
1642
+ ])),
1649
1643
  scale: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1650
1644
  return undefined; if (Array.isArray(v))
1651
1645
  return v; if (typeof v === 'string') {
@@ -1356,12 +1356,7 @@ export const richcaptionpropertiesRichCaptionFontSchema = z.object({
1356
1356
  weight: z.optional(z.unknown()).default('400'),
1357
1357
  color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#ffffff'),
1358
1358
  opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1359
- background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1360
- textDecoration: z.optional(z.enum([
1361
- 'none',
1362
- 'underline',
1363
- 'line-through'
1364
- ]))
1359
+ background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
1365
1360
  }).strict();
1366
1361
 
1367
1362
  /**
@@ -1378,7 +1373,6 @@ export const richcaptionpropertiesRichCaptionWordAnimationSchema = z.object({
1378
1373
  'typewriter',
1379
1374
  'none'
1380
1375
  ]),
1381
- speed: 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.5).lte(2)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1382
1376
  direction: z.optional(z.enum([
1383
1377
  'left',
1384
1378
  'right',
@@ -1505,8 +1499,14 @@ export const richTextStrokeSchema = richtextpropertiesRichTextStrokeSchema;
1505
1499
  */
1506
1500
  export const richcaptionpropertiesRichCaptionActiveSchema = z.object({
1507
1501
  font: z.optional(richcaptionpropertiesRichCaptionActiveFontSchema),
1508
- stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
1509
- shadow: z.optional(richtextpropertiesRichTextShadowSchema),
1502
+ stroke: z.optional(z.union([
1503
+ richtextpropertiesRichTextStrokeSchema,
1504
+ z.enum(['none'])
1505
+ ])),
1506
+ shadow: z.optional(z.union([
1507
+ richtextpropertiesRichTextShadowSchema,
1508
+ z.enum(['none'])
1509
+ ])),
1510
1510
  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.5).lte(2)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
1511
1511
  }).strict();
1512
1512
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shotstack/schemas",
3
- "version": "1.9.0",
3
+ "version": "1.9.2",
4
4
  "description": "Centralized OpenAPI schemas and TypeScript types for Shotstack API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",