@uxf/core-react 11.122.2 → 11.124.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.
@@ -12,9 +12,11 @@ beforeAll(() => {
12
12
  });
13
13
  window.removeEventListener = jest.fn();
14
14
  });
15
+ // globalThis, not window: babel-plugin-jest-hoist rejects out-of-scope variables inside a
16
+ // jest.mock factory and `window` is not on its allowlist. Under jsdom the two are the same object.
15
17
  jest.mock("./use-raf-state", () => ({
16
18
  useRafState: jest.fn().mockImplementation(() => {
17
- const state = { x: window.scrollX, y: window.scrollY };
19
+ const state = { x: globalThis.scrollX, y: globalThis.scrollY };
18
20
  const setState = jest.fn((newState) => {
19
21
  state.x = newState.x;
20
22
  state.y = newState.y;
@@ -13,9 +13,11 @@ beforeAll(() => {
13
13
  });
14
14
  window.removeEventListener = jest.fn();
15
15
  });
16
+ // globalThis, not window: babel-plugin-jest-hoist rejects out-of-scope variables inside a
17
+ // jest.mock factory and `window` is not on its allowlist. Under jsdom the two are the same object.
16
18
  jest.mock("./use-raf-state", () => ({
17
19
  useRafState: jest.fn().mockImplementation(() => {
18
- const state = { width: window.innerWidth, height: window.innerHeight };
20
+ const state = { width: globalThis.innerWidth, height: globalThis.innerHeight };
19
21
  const setState = jest.fn();
20
22
  return [state, setState];
21
23
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/core-react",
3
- "version": "11.122.2",
3
+ "version": "11.124.0",
4
4
  "description": "UXF Core",
5
5
  "author": "UX Fans s.r.o",
6
6
  "license": "MIT",
@@ -9,21 +9,21 @@
9
9
  },
10
10
  "scripts": {
11
11
  "build": "tsc -P tsconfig.json",
12
- "typecheck": "tsc --noEmit --skipLibCheck"
12
+ "typecheck": "tsc --noEmit"
13
13
  },
14
14
  "peerDependencies": {
15
15
  "@dnd-kit/core": "^6.3.1",
16
16
  "@dnd-kit/sortable": "^10.0.0",
17
- "@uxf/core": "11.114.0",
17
+ "@uxf/core": "11.124.0",
18
18
  "react": ">=18.2.0",
19
19
  "react-dom": ">=18.2.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@dnd-kit/core": "^6.3.1",
23
23
  "@dnd-kit/sortable": "^10.0.0",
24
- "@types/react": "18.3.27",
24
+ "@types/react": "18.3.31",
25
25
  "@types/react-dom": "18.3.7",
26
- "@uxf/core": "11.114.0",
26
+ "@uxf/core": "11.124.0",
27
27
  "react": "18.3.1",
28
28
  "react-dom": "18.3.1"
29
29
  }