@contentful/experiences-visual-editor-react 1.32.0-prerelease-20250220T1615-2f40399.0 → 1.32.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/renderApp.js CHANGED
@@ -43547,14 +43547,14 @@ const ComponentValueSchema$1 = z
43547
43547
  .strict();
43548
43548
  // TODO: finalize schema structure before release
43549
43549
  // https://contentful.atlassian.net/browse/LUMOS-523
43550
- const NoValueSchema$1 = z.object({ type: z.literal('NoValue') }).strict();
43550
+ const EmptyObjectSchema$1 = z.object({ type: z.undefined() });
43551
43551
  const ComponentPropertyValueSchema$1 = z.discriminatedUnion('type', [
43552
43552
  DesignValueSchema$1,
43553
43553
  BoundValueSchema$1,
43554
43554
  UnboundValueSchema$1,
43555
43555
  HyperlinkValueSchema$1,
43556
43556
  ComponentValueSchema$1,
43557
- NoValueSchema$1,
43557
+ EmptyObjectSchema$1,
43558
43558
  ]);
43559
43559
  // TODO: finalize schema structure before release
43560
43560
  // https://contentful.atlassian.net/browse/LUMOS-523
@@ -43567,12 +43567,13 @@ const VariableMappingsSchema$1 = z.record(propertyKeySchema$1, VariableMappingSc
43567
43567
  // TODO: finalize schema structure before release
43568
43568
  // https://contentful.atlassian.net/browse/LUMOS-523
43569
43569
  const PatternPropertyDefinitionSchema$1 = z.object({
43570
- defaultValue: z
43571
- .object({
43572
- path: z.string(),
43573
- type: z.literal('BoundValue'),
43574
- })
43575
- .optional(),
43570
+ defaultValue: z.union([
43571
+ z.object({
43572
+ path: z.string(),
43573
+ type: z.literal('BoundValue'),
43574
+ }),
43575
+ z.null(),
43576
+ ]),
43576
43577
  contentTypes: z.record(z.string(), z.any()),
43577
43578
  });
43578
43579
  const PatternPropertyDefinitionsSchema$1 = z.record(propertyKeySchema$1, PatternPropertyDefinitionSchema$1);
@@ -43581,7 +43582,6 @@ const PatternPropertyDefinitionsSchema$1 = z.record(propertyKeySchema$1, Pattern
43581
43582
  const PatternPropertySchema$1 = z.object({
43582
43583
  type: z.literal('BoundValue'),
43583
43584
  path: z.string(),
43584
- contenType: z.string(),
43585
43585
  });
43586
43586
  const PatternPropertysSchema$1 = z.record(propertyKeySchema$1, PatternPropertySchema$1);
43587
43587
  const BreakpointSchema$1 = z
@@ -58272,14 +58272,14 @@ const ComponentValueSchema = z
58272
58272
  .strict();
58273
58273
  // TODO: finalize schema structure before release
58274
58274
  // https://contentful.atlassian.net/browse/LUMOS-523
58275
- const NoValueSchema = z.object({ type: z.literal('NoValue') }).strict();
58275
+ const EmptyObjectSchema = z.object({ type: z.undefined() });
58276
58276
  const ComponentPropertyValueSchema = z.discriminatedUnion('type', [
58277
58277
  DesignValueSchema,
58278
58278
  BoundValueSchema,
58279
58279
  UnboundValueSchema,
58280
58280
  HyperlinkValueSchema,
58281
58281
  ComponentValueSchema,
58282
- NoValueSchema,
58282
+ EmptyObjectSchema,
58283
58283
  ]);
58284
58284
  // TODO: finalize schema structure before release
58285
58285
  // https://contentful.atlassian.net/browse/LUMOS-523
@@ -58292,12 +58292,13 @@ const VariableMappingsSchema = z.record(propertyKeySchema, VariableMappingSchema
58292
58292
  // TODO: finalize schema structure before release
58293
58293
  // https://contentful.atlassian.net/browse/LUMOS-523
58294
58294
  const PatternPropertyDefinitionSchema = z.object({
58295
- defaultValue: z
58296
- .object({
58297
- path: z.string(),
58298
- type: z.literal('BoundValue'),
58299
- })
58300
- .optional(),
58295
+ defaultValue: z.union([
58296
+ z.object({
58297
+ path: z.string(),
58298
+ type: z.literal('BoundValue'),
58299
+ }),
58300
+ z.null(),
58301
+ ]),
58301
58302
  contentTypes: z.record(z.string(), z.any()),
58302
58303
  });
58303
58304
  const PatternPropertyDefinitionsSchema = z.record(propertyKeySchema, PatternPropertyDefinitionSchema);
@@ -58306,7 +58307,6 @@ const PatternPropertyDefinitionsSchema = z.record(propertyKeySchema, PatternProp
58306
58307
  const PatternPropertySchema = z.object({
58307
58308
  type: z.literal('BoundValue'),
58308
58309
  path: z.string(),
58309
- contenType: z.string(),
58310
58310
  });
58311
58311
  const PatternPropertysSchema = z.record(propertyKeySchema, PatternPropertySchema);
58312
58312
  const BreakpointSchema = z
@@ -59657,7 +59657,9 @@ const useComponentProps = ({ node, areEntitiesFetched, resolveDesignValue, rende
59657
59657
  };
59658
59658
  const customComponentProps = {
59659
59659
  ...sharedProps,
59660
- isInExpEditorMode: true,
59660
+ // Allows custom components to render differently in the editor. This needs to be activated
59661
+ // through options as the component has to be aware of this prop to not cause any React warnings.
59662
+ ...(options?.enableCustomEditorView ? { isInExpEditorMode: true } : {}),
59661
59663
  ...sanitizeNodeProps(props),
59662
59664
  };
59663
59665
  const structuralOrPatternComponentProps = {