@shotstack/schemas 1.12.0 → 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.
@@ -417,9 +417,9 @@ export const fontSchema = fontFontSchema;
417
417
  */
418
418
  export const html5AssetHtml5AssetSchema = z.object({
419
419
  type: z.enum(['html5']),
420
- html: z.string(),
421
- css: z.optional(z.string()),
422
- js: z.optional(z.string())
420
+ html: z.string().max(1000000),
421
+ css: z.optional(z.string().max(500000)),
422
+ js: z.optional(z.string().max(500000))
423
423
  }).strict();
424
424
  export const html5AssetSchema = html5AssetHtml5AssetSchema;
425
425
  /**
@@ -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
  /**
@@ -373,9 +373,9 @@ export const fontSchema = fontFontSchema;
373
373
  */
374
374
  export const html5AssetHtml5AssetSchema = z.object({
375
375
  type: z.enum(['html5']),
376
- html: z.string(),
377
- css: z.optional(z.string()),
378
- js: z.optional(z.string())
376
+ html: z.string().max(1000000),
377
+ css: z.optional(z.string().max(500000)),
378
+ js: z.optional(z.string().max(500000))
379
379
  }).strict();
380
380
 
381
381
  export const html5AssetSchema = html5AssetHtml5AssetSchema;
@@ -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.0",
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",