@contentful/experiences-components-react 3.7.0-prerelease-20250915T1724-8825648.0 → 3.7.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
@@ -3,7 +3,7 @@ import React, { forwardRef } from 'react';
3
3
  import { documentToReactComponents } from '@contentful/rich-text-react-renderer';
4
4
  import { BLOCKS } from '@contentful/rich-text-types';
5
5
  import { z } from 'zod';
6
- import { cloneDeep } from 'lodash-es';
6
+ import cloneDeep from 'lodash.clonedeep';
7
7
  import 'md5';
8
8
  import { create } from 'zustand';
9
9
 
@@ -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
  })
@@ -1541,7 +1541,8 @@ const validateAtMostOneNativeParameterDefinition = (parameterDefinitions, ctx) =
1541
1541
  };
1542
1542
  const validateNoOverlapBetweenMappingAndOverrides = (variableMappings, allowedVariableOverrides, ctx) => {
1543
1543
  const variableMappingKeys = Object.keys(variableMappings || {});
1544
- const overlap = variableMappingKeys.filter((key) => allowedVariableOverrides?.includes(key));
1544
+ const overridesSet = new Set(allowedVariableOverrides || []);
1545
+ const overlap = variableMappingKeys.filter((key) => overridesSet.has(key));
1545
1546
  if (overlap.length > 0) {
1546
1547
  ctx.addIssue({
1547
1548
  code: z.ZodIssueCode.custom,