@shotstack/schemas 1.12.1 → 1.12.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.
@@ -924,7 +924,14 @@ export const richtextpropertiesRichTextBackgroundSchema = z.object({
924
924
  return v;
925
925
  return Number(v);
926
926
  } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
927
- wrap: z.optional(z.boolean()).default(false)
927
+ wrap: z.optional(z.boolean()).default(false),
928
+ padding: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
929
+ return undefined; if (Array.isArray(v))
930
+ return v; if (typeof v === 'string') {
931
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
932
+ return v;
933
+ return Number(v);
934
+ } return v; }), z.number().int().gte(0).lte(200)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
928
935
  }).strict();
929
936
  export const richTextBackgroundSchema = richtextpropertiesRichTextBackgroundSchema;
930
937
  /**
@@ -865,7 +865,8 @@ export const richtextpropertiesRichTextBackgroundSchema = z.object({
865
865
  color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
866
866
  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),
867
867
  borderRadius: 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),
868
- wrap: z.optional(z.boolean()).default(false)
868
+ wrap: z.optional(z.boolean()).default(false),
869
+ padding: 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(0).lte(200)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
869
870
  }).strict();
870
871
 
871
872
  export const richTextBackgroundSchema = richtextpropertiesRichTextBackgroundSchema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shotstack/schemas",
3
- "version": "1.12.1",
3
+ "version": "1.12.2",
4
4
  "description": "Centralized OpenAPI schemas and TypeScript types for Shotstack API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",