@shotstack/schemas 1.9.3 → 1.9.5

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.
@@ -1370,6 +1370,13 @@ export const richcaptionpropertiesRichCaptionActiveFontSchema = z.object({
1370
1370
  return v;
1371
1371
  return Number(v);
1372
1372
  } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1373
+ size: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1374
+ return undefined; if (Array.isArray(v))
1375
+ return v; if (typeof v === 'string') {
1376
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1377
+ return v;
1378
+ return Number(v);
1379
+ } return v; }), z.number().gte(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1373
1380
  textDecoration: z.optional(z.enum([
1374
1381
  'none',
1375
1382
  'underline',
@@ -1377,6 +1384,28 @@ export const richcaptionpropertiesRichCaptionActiveFontSchema = z.object({
1377
1384
  ]))
1378
1385
  }).strict();
1379
1386
  export const richCaptionActiveFontSchema = richcaptionpropertiesRichCaptionActiveFontSchema;
1387
+ /**
1388
+ * Word-level animation properties for caption effects.
1389
+ */
1390
+ export const richcaptionpropertiesRichCaptionAnimationSchema = z.object({
1391
+ style: z.enum([
1392
+ 'karaoke',
1393
+ 'highlight',
1394
+ 'pop',
1395
+ 'fade',
1396
+ 'slide',
1397
+ 'bounce',
1398
+ 'typewriter',
1399
+ 'none'
1400
+ ]),
1401
+ direction: z.optional(z.enum([
1402
+ 'left',
1403
+ 'right',
1404
+ 'up',
1405
+ 'down'
1406
+ ]))
1407
+ }).strict();
1408
+ export const richCaptionAnimationSchema = richcaptionpropertiesRichCaptionAnimationSchema;
1380
1409
  /**
1381
1410
  * Font properties for rich captions. Defaults to Roboto.
1382
1411
  */
@@ -1400,28 +1429,6 @@ export const richcaptionpropertiesRichCaptionFontSchema = z.object({
1400
1429
  } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1401
1430
  background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
1402
1431
  }).strict();
1403
- /**
1404
- * Word-level animation properties for caption effects.
1405
- */
1406
- export const richcaptionpropertiesRichCaptionWordAnimationSchema = z.object({
1407
- style: z.enum([
1408
- 'karaoke',
1409
- 'highlight',
1410
- 'pop',
1411
- 'fade',
1412
- 'slide',
1413
- 'bounce',
1414
- 'typewriter',
1415
- 'none'
1416
- ]),
1417
- direction: z.optional(z.enum([
1418
- 'left',
1419
- 'right',
1420
- 'up',
1421
- 'down'
1422
- ]))
1423
- }).strict();
1424
- export const richCaptionWordAnimationSchema = richcaptionpropertiesRichCaptionWordAnimationSchema;
1425
1432
  /**
1426
1433
  * Text alignment properties (horizontal and vertical).
1427
1434
  */
@@ -1562,6 +1569,13 @@ export const richcaptionpropertiesRichCaptionStyleSchema = z.object({
1562
1569
  'lowercase',
1563
1570
  'capitalize'
1564
1571
  ])),
1572
+ size: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1573
+ return undefined; if (Array.isArray(v))
1574
+ return v; if (typeof v === 'string') {
1575
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1576
+ return v;
1577
+ return Number(v);
1578
+ } return v; }), z.number().gte(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1565
1579
  textDecoration: z.optional(z.enum([
1566
1580
  'none',
1567
1581
  'underline',
@@ -1707,7 +1721,7 @@ export const richcaptionassetRichCaptionAssetSchema = z.object({
1707
1721
  ])),
1708
1722
  align: z.optional(richtextpropertiesRichTextAlignmentSchema),
1709
1723
  active: z.optional(richcaptionpropertiesRichCaptionActiveSchema),
1710
- wordAnimation: z.optional(richcaptionpropertiesRichCaptionWordAnimationSchema)
1724
+ animation: z.optional(richcaptionpropertiesRichCaptionAnimationSchema)
1711
1725
  }).strict();
1712
1726
  export const richCaptionAssetSchema = richcaptionassetRichCaptionAssetSchema;
1713
1727
  /**
@@ -1338,6 +1338,7 @@ export const richcaptionpropertiesRichCaptionActiveFontSchema = z.object({
1338
1338
  color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#ffff00'),
1339
1339
  background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1340
1340
  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),
1341
+ size: 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(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1341
1342
  textDecoration: z.optional(z.enum([
1342
1343
  'none',
1343
1344
  'underline',
@@ -1347,22 +1348,10 @@ export const richcaptionpropertiesRichCaptionActiveFontSchema = z.object({
1347
1348
 
1348
1349
  export const richCaptionActiveFontSchema = richcaptionpropertiesRichCaptionActiveFontSchema;
1349
1350
 
1350
- /**
1351
- * Font properties for rich captions. Defaults to Roboto.
1352
- */
1353
- export const richcaptionpropertiesRichCaptionFontSchema = z.object({
1354
- family: z.optional(z.string()).default('Roboto'),
1355
- size: 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().int().gte(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(24),
1356
- weight: z.optional(z.unknown()).default('400'),
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
- 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
- }).strict();
1361
-
1362
1351
  /**
1363
1352
  * Word-level animation properties for caption effects.
1364
1353
  */
1365
- export const richcaptionpropertiesRichCaptionWordAnimationSchema = z.object({
1354
+ export const richcaptionpropertiesRichCaptionAnimationSchema = z.object({
1366
1355
  style: z.enum([
1367
1356
  'karaoke',
1368
1357
  'highlight',
@@ -1381,7 +1370,19 @@ export const richcaptionpropertiesRichCaptionWordAnimationSchema = z.object({
1381
1370
  ]))
1382
1371
  }).strict();
1383
1372
 
1384
- export const richCaptionWordAnimationSchema = richcaptionpropertiesRichCaptionWordAnimationSchema;
1373
+ export const richCaptionAnimationSchema = richcaptionpropertiesRichCaptionAnimationSchema;
1374
+
1375
+ /**
1376
+ * Font properties for rich captions. Defaults to Roboto.
1377
+ */
1378
+ export const richcaptionpropertiesRichCaptionFontSchema = z.object({
1379
+ family: z.optional(z.string()).default('Roboto'),
1380
+ size: 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().int().gte(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(24),
1381
+ weight: z.optional(z.unknown()).default('400'),
1382
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#ffffff'),
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(1),
1384
+ background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
1385
+ }).strict();
1385
1386
 
1386
1387
  /**
1387
1388
  * Text alignment properties (horizontal and vertical).
@@ -1472,6 +1473,7 @@ export const richcaptionpropertiesRichCaptionStyleSchema = z.object({
1472
1473
  'lowercase',
1473
1474
  'capitalize'
1474
1475
  ])),
1476
+ size: 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(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1475
1477
  textDecoration: z.optional(z.enum([
1476
1478
  'none',
1477
1479
  'underline',
@@ -1553,7 +1555,7 @@ export const richcaptionassetRichCaptionAssetSchema = z.object({
1553
1555
  ])),
1554
1556
  align: z.optional(richtextpropertiesRichTextAlignmentSchema),
1555
1557
  active: z.optional(richcaptionpropertiesRichCaptionActiveSchema),
1556
- wordAnimation: z.optional(richcaptionpropertiesRichCaptionWordAnimationSchema)
1558
+ animation: z.optional(richcaptionpropertiesRichCaptionAnimationSchema)
1557
1559
  }).strict();
1558
1560
 
1559
1561
  export const richCaptionAssetSchema = richcaptionassetRichCaptionAssetSchema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shotstack/schemas",
3
- "version": "1.9.3",
3
+ "version": "1.9.5",
4
4
  "description": "Centralized OpenAPI schemas and TypeScript types for Shotstack API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",