@contentful/experiences-components-react 3.3.0-dev-20250820T0950-c569ea0.0 → 3.3.1-beta.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 'lodash-es';
6
+ import { cloneDeep } from 'lodash-es';
7
7
  import 'md5';
8
8
  import { create } from 'zustand';
9
9
 
@@ -1679,10 +1679,6 @@ const isLink = (maybeLink) => {
1679
1679
  const link = maybeLink;
1680
1680
  return Boolean(link.sys?.id) && link.sys?.type === 'Link' && Boolean(link.sys?.linkType);
1681
1681
  };
1682
-
1683
- /**
1684
- * This module encapsulates format of the path to a deep reference.
1685
- */
1686
1682
  const parseDataSourcePathIntoFieldset = (path) => {
1687
1683
  const parsedPath = parseDeepPath(path);
1688
1684
  if (null === parsedPath) {
@@ -1914,11 +1910,11 @@ class EntityStoreBase {
1914
1910
  addEntity(entity) {
1915
1911
  if (isAsset(entity)) {
1916
1912
  // cloned and frozen
1917
- this.assetMap.set(entity.sys.id, deepFreeze(structuredClone(entity)));
1913
+ this.assetMap.set(entity.sys.id, deepFreeze(cloneDeep(entity)));
1918
1914
  }
1919
1915
  else if (isEntry(entity)) {
1920
1916
  // cloned and frozen
1921
- this.entryMap.set(entity.sys.id, deepFreeze(structuredClone(entity)));
1917
+ this.entryMap.set(entity.sys.id, deepFreeze(cloneDeep(entity)));
1922
1918
  }
1923
1919
  else {
1924
1920
  throw new Error(`Attempted to add an entity to the store that is neither Asset nor Entry: '${JSON.stringify(entity)}'`);