@etsoo/react 1.5.86 → 1.5.87

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.
@@ -6,8 +6,8 @@ import React from 'react';
6
6
  export const useWindowScroll = () => {
7
7
  // State
8
8
  const [pos, setPos] = React.useState({
9
- x: window.pageXOffset,
10
- y: window.pageYOffset
9
+ x: window.scrollX,
10
+ y: window.scrollY
11
11
  });
12
12
  React.useEffect(() => {
13
13
  let ticking = false;
@@ -15,8 +15,8 @@ export const useWindowScroll = () => {
15
15
  let requestAnimationFrameSeed = 0;
16
16
  const scrollHandler = () => {
17
17
  lastPos = {
18
- x: window.pageXOffset,
19
- y: window.pageYOffset
18
+ x: window.scrollX,
19
+ y: window.scrollY
20
20
  };
21
21
  if (!ticking) {
22
22
  requestAnimationFrameSeed = window.requestAnimationFrame(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/react",
3
- "version": "1.5.86",
3
+ "version": "1.5.87",
4
4
  "description": "TypeScript ReactJs UI Independent Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -50,9 +50,9 @@
50
50
  "@emotion/css": "^11.10.0",
51
51
  "@emotion/react": "^11.10.4",
52
52
  "@emotion/styled": "^11.10.4",
53
- "@etsoo/appscript": "^1.2.88",
53
+ "@etsoo/appscript": "^1.2.89",
54
54
  "@etsoo/notificationbase": "^1.1.7",
55
- "@etsoo/shared": "^1.1.51",
55
+ "@etsoo/shared": "^1.1.52",
56
56
  "@types/react": "^18.0.18",
57
57
  "@types/react-dom": "^18.0.6",
58
58
  "@types/react-window": "^1.8.5",
@@ -63,19 +63,19 @@
63
63
  },
64
64
  "devDependencies": {
65
65
  "@babel/cli": "^7.18.10",
66
- "@babel/core": "^7.18.13",
66
+ "@babel/core": "^7.19.0",
67
67
  "@babel/plugin-transform-runtime": "^7.18.10",
68
- "@babel/preset-env": "^7.18.10",
69
- "@babel/runtime-corejs3": "^7.18.9",
68
+ "@babel/preset-env": "^7.19.0",
69
+ "@babel/runtime-corejs3": "^7.19.0",
70
70
  "@testing-library/jest-dom": "^5.16.5",
71
- "@testing-library/react": "^13.3.0",
71
+ "@testing-library/react": "^13.4.0",
72
72
  "@types/jest": "^29.0.0",
73
- "@typescript-eslint/eslint-plugin": "^5.36.1",
74
- "@typescript-eslint/parser": "^5.36.1",
73
+ "@typescript-eslint/eslint-plugin": "^5.36.2",
74
+ "@typescript-eslint/parser": "^5.36.2",
75
75
  "eslint": "^8.23.0",
76
76
  "eslint-config-airbnb-base": "^15.0.0",
77
77
  "eslint-plugin-import": "^2.26.0",
78
- "eslint-plugin-react": "^7.31.1",
78
+ "eslint-plugin-react": "^7.31.7",
79
79
  "jest": "^28.1.3",
80
80
  "jest-environment-jsdom": "^28.1.3",
81
81
  "ts-jest": "^28.0.8",
@@ -12,8 +12,8 @@ interface IScrollPos {
12
12
  export const useWindowScroll = () => {
13
13
  // State
14
14
  const [pos, setPos] = React.useState<IScrollPos>({
15
- x: window.pageXOffset,
16
- y: window.pageYOffset
15
+ x: window.scrollX,
16
+ y: window.scrollY
17
17
  });
18
18
 
19
19
  React.useEffect(() => {
@@ -23,8 +23,8 @@ export const useWindowScroll = () => {
23
23
 
24
24
  const scrollHandler = () => {
25
25
  lastPos = {
26
- x: window.pageXOffset,
27
- y: window.pageYOffset
26
+ x: window.scrollX,
27
+ y: window.scrollY
28
28
  };
29
29
 
30
30
  if (!ticking) {