@contentful/field-editor-rich-text 3.26.2 → 3.26.4

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.
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _cloneDeep = _interop_require_default(require("lodash/cloneDeep"));
6
5
  const _mitt = _interop_require_default(require("mitt"));
7
6
  const _sdkNavigatorSlideIn = require("./sdkNavigatorSlideIn");
8
7
  function _interop_require_default(obj) {
@@ -10,6 +9,11 @@ function _interop_require_default(obj) {
10
9
  default: obj
11
10
  };
12
11
  }
12
+ if (typeof globalThis.structuredClone !== 'function') {
13
+ globalThis.structuredClone = (obj)=>{
14
+ return JSON.parse(JSON.stringify(obj));
15
+ };
16
+ }
13
17
  function createFakeNavigatorAPI() {
14
18
  const localEmitter = (0, _mitt.default)();
15
19
  const navigatorEmitter = {
@@ -179,7 +183,7 @@ describe('watchCurrentSlide().unwatch()', ()=>{
179
183
  });
180
184
  it('does not update .info() after .unwatch()', ()=>{
181
185
  const slide = (0, _sdkNavigatorSlideIn.watchCurrentSlide)(api);
182
- const lastStatus = (0, _cloneDeep.default)(slide.status());
186
+ const lastStatus = structuredClone(slide.status());
183
187
  slide.unwatch();
184
188
  fake.slideIn({
185
189
  oldSlideLevel: 1,
@@ -1,6 +1,10 @@
1
- import cloneDeep from 'lodash/cloneDeep';
2
1
  import mitt from 'mitt';
3
2
  import { watchCurrentSlide } from './sdkNavigatorSlideIn';
3
+ if (typeof globalThis.structuredClone !== 'function') {
4
+ globalThis.structuredClone = (obj)=>{
5
+ return JSON.parse(JSON.stringify(obj));
6
+ };
7
+ }
4
8
  function createFakeNavigatorAPI() {
5
9
  const localEmitter = mitt();
6
10
  const navigatorEmitter = {
@@ -170,7 +174,7 @@ describe('watchCurrentSlide().unwatch()', ()=>{
170
174
  });
171
175
  it('does not update .info() after .unwatch()', ()=>{
172
176
  const slide = watchCurrentSlide(api);
173
- const lastStatus = cloneDeep(slide.status());
177
+ const lastStatus = structuredClone(slide.status());
174
178
  slide.unwatch();
175
179
  fake.slideIn({
176
180
  oldSlideLevel: 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-rich-text",
3
- "version": "3.26.2",
3
+ "version": "3.26.4",
4
4
  "source": "./src/index.tsx",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -44,7 +44,7 @@
44
44
  "@contentful/f36-icons": "^4.28.2",
45
45
  "@contentful/f36-tokens": "^4.0.5",
46
46
  "@contentful/f36-utils": "^4.24.3",
47
- "@contentful/field-editor-reference": "^5.30.3",
47
+ "@contentful/field-editor-reference": "^5.30.5",
48
48
  "@contentful/field-editor-shared": "^1.6.0",
49
49
  "@contentful/rich-text-plain-text-renderer": "^16.0.4",
50
50
  "@contentful/rich-text-types": "16.7.0",
@@ -86,5 +86,5 @@
86
86
  "publishConfig": {
87
87
  "registry": "https://npm.pkg.github.com/"
88
88
  },
89
- "gitHead": "759fde7b73a0ae4380021335304b3f387ceedce5"
89
+ "gitHead": "8013feb5bcc5b6abdf4d856a61496db8bd247b7f"
90
90
  }