@shotstack/schemas 1.9.4 → 1.9.6

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.
@@ -1361,7 +1361,7 @@ export const templateResponseSchema = templateresponseTemplateResponseSchema;
1361
1361
  * Font properties for the active/highlighted word.
1362
1362
  */
1363
1363
  export const richcaptionpropertiesRichCaptionActiveFontSchema = z.object({
1364
- color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#ffff00'),
1364
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1365
1365
  background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1366
1366
  opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1367
1367
  return undefined; if (Array.isArray(v))
@@ -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',
@@ -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',
@@ -1335,9 +1335,10 @@ export const templateResponseSchema = templateresponseTemplateResponseSchema;
1335
1335
  * Font properties for the active/highlighted word.
1336
1336
  */
1337
1337
  export const richcaptionpropertiesRichCaptionActiveFontSchema = z.object({
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'),
1338
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
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',
@@ -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',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shotstack/schemas",
3
- "version": "1.9.4",
3
+ "version": "1.9.6",
4
4
  "description": "Centralized OpenAPI schemas and TypeScript types for Shotstack API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",