@contentful/experiences-components-react 3.7.0-dev-20250918T1641-6da833a.0 → 3.7.0-dev-20250919T0754-9f36582.0

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.
package/dist/index.js CHANGED
@@ -1339,7 +1339,7 @@ const BreakpointSchema = z
1339
1339
  id: propertyKeySchema,
1340
1340
  // Can be replace with z.templateLiteral when upgrading to zod v4
1341
1341
  query: z.string().refine((s) => BREAKPOINT_QUERY_REGEX.test(s)),
1342
- previewSize: z.string(),
1342
+ previewSize: z.string().optional(),
1343
1343
  displayName: z.string(),
1344
1344
  displayIcon: z.enum(['desktop', 'tablet', 'mobile']).optional(),
1345
1345
  })
@@ -1376,6 +1376,19 @@ const ComponentVariableSchema = z.object({
1376
1376
  });
1377
1377
  const ComponentTreeNodeSchema = BaseComponentTreeNodeSchema.extend({
1378
1378
  children: z.lazy(() => ComponentTreeNodeSchema.array()),
1379
+ }).superRefine(({ id, prebindingId, parameters }, ctx) => {
1380
+ if (prebindingId && !parameters) {
1381
+ ctx.addIssue({
1382
+ code: z.ZodIssueCode.custom,
1383
+ message: `Found "prebindingId" but no "parameters" for node with id: "${id}"`,
1384
+ });
1385
+ }
1386
+ if (parameters && !prebindingId) {
1387
+ ctx.addIssue({
1388
+ code: z.ZodIssueCode.custom,
1389
+ message: `Found "parameters" but no "prebindingId" for node with id: "${id}"`,
1390
+ });
1391
+ }
1379
1392
  });
1380
1393
  const ComponentTreeSchema = z
1381
1394
  .object({