@contentful/experiences-visual-editor-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
@@ -755,7 +755,7 @@ const BreakpointSchema$1 = z
755
755
  id: propertyKeySchema$1,
756
756
  // Can be replace with z.templateLiteral when upgrading to zod v4
757
757
  query: z.string().refine((s) => BREAKPOINT_QUERY_REGEX$1.test(s)),
758
- previewSize: z.string(),
758
+ previewSize: z.string().optional(),
759
759
  displayName: z.string(),
760
760
  displayIcon: z.enum(['desktop', 'tablet', 'mobile']).optional(),
761
761
  })
@@ -792,6 +792,19 @@ const ComponentVariableSchema$1 = z.object({
792
792
  });
793
793
  const ComponentTreeNodeSchema$1 = BaseComponentTreeNodeSchema$1.extend({
794
794
  children: z.lazy(() => ComponentTreeNodeSchema$1.array()),
795
+ }).superRefine(({ id, prebindingId, parameters }, ctx) => {
796
+ if (prebindingId && !parameters) {
797
+ ctx.addIssue({
798
+ code: z.ZodIssueCode.custom,
799
+ message: `Found "prebindingId" but no "parameters" for node with id: "${id}"`,
800
+ });
801
+ }
802
+ if (parameters && !prebindingId) {
803
+ ctx.addIssue({
804
+ code: z.ZodIssueCode.custom,
805
+ message: `Found "parameters" but no "prebindingId" for node with id: "${id}"`,
806
+ });
807
+ }
795
808
  });
796
809
  const ComponentTreeSchema$1 = z
797
810
  .object({
@@ -3734,7 +3747,7 @@ const BreakpointSchema = z
3734
3747
  id: propertyKeySchema,
3735
3748
  // Can be replace with z.templateLiteral when upgrading to zod v4
3736
3749
  query: z.string().refine((s) => BREAKPOINT_QUERY_REGEX.test(s)),
3737
- previewSize: z.string(),
3750
+ previewSize: z.string().optional(),
3738
3751
  displayName: z.string(),
3739
3752
  displayIcon: z.enum(['desktop', 'tablet', 'mobile']).optional(),
3740
3753
  })
@@ -3771,6 +3784,19 @@ const ComponentVariableSchema = z.object({
3771
3784
  });
3772
3785
  const ComponentTreeNodeSchema = BaseComponentTreeNodeSchema.extend({
3773
3786
  children: z.lazy(() => ComponentTreeNodeSchema.array()),
3787
+ }).superRefine(({ id, prebindingId, parameters }, ctx) => {
3788
+ if (prebindingId && !parameters) {
3789
+ ctx.addIssue({
3790
+ code: z.ZodIssueCode.custom,
3791
+ message: `Found "prebindingId" but no "parameters" for node with id: "${id}"`,
3792
+ });
3793
+ }
3794
+ if (parameters && !prebindingId) {
3795
+ ctx.addIssue({
3796
+ code: z.ZodIssueCode.custom,
3797
+ message: `Found "parameters" but no "prebindingId" for node with id: "${id}"`,
3798
+ });
3799
+ }
3774
3800
  });
3775
3801
  const ComponentTreeSchema = z
3776
3802
  .object({