@xylabs/sdk-react 2.10.4 → 2.10.5
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/cjs5/index.js +1 -1
- package/dist/cjs5/index.js.map +1 -1
- package/dist/cjs5/lib/isLocalHost.d.ts +1 -1
- package/dist/esm2015/index.js +1 -1
- package/dist/esm2015/index.js.map +1 -1
- package/dist/esm2015/lib/isLocalHost.d.ts +1 -1
- package/dist/esm2017/index.js +1 -1
- package/dist/esm2017/index.js.map +1 -1
- package/dist/esm2017/lib/isLocalHost.d.ts +1 -1
- package/dist/esm5/index.js +1 -1
- package/dist/esm5/index.js.map +1 -1
- package/dist/esm5/lib/isLocalHost.d.ts +1 -1
- package/dist/lib/isLocalHost.d.ts +1 -1
- package/dist/lib/isLocalHost.js +1 -1
- package/dist/lib/isLocalHost.js.map +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/index.js.map +1 -1
- package/dist/node/lib/isLocalHost.d.ts +1 -1
- package/dist/node-esm/index.js +1 -1
- package/dist/node-esm/index.js.map +1 -1
- package/dist/node-esm/lib/isLocalHost.d.ts +1 -1
- package/package.json +22 -22
- package/src/lib/isLocalHost.ts +8 -7
package/package.json
CHANGED
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
"@emotion/react": "^11.8.2",
|
|
13
13
|
"@emotion/styled": "^11.8.1",
|
|
14
14
|
"@ethersproject/abstract-signer": "^5.6.0",
|
|
15
|
-
"@ethersproject/providers": "^5.6.
|
|
15
|
+
"@ethersproject/providers": "^5.6.2",
|
|
16
16
|
"@mui/icons-material": "^5.5.1",
|
|
17
|
-
"@mui/material": "^5.5.
|
|
18
|
-
"@mui/styles": "^5.5.
|
|
17
|
+
"@mui/material": "^5.5.3",
|
|
18
|
+
"@mui/styles": "^5.5.3",
|
|
19
19
|
"@xylabs/pixel": "^1.3.7",
|
|
20
20
|
"@xylabs/sdk-js": "^2.4.3",
|
|
21
21
|
"axios": "^0.26.1",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"react-dom": "^17.0.2",
|
|
29
29
|
"react-helmet": "^6.1.0",
|
|
30
30
|
"react-icons": "^4.3.1",
|
|
31
|
-
"react-router-dom": "^6.
|
|
31
|
+
"react-router-dom": "^6.3.0"
|
|
32
32
|
},
|
|
33
33
|
"description": "Common React library for all XY Labs projects that use React",
|
|
34
34
|
"devDependencies": {
|
|
@@ -38,40 +38,40 @@
|
|
|
38
38
|
"@rollup/plugin-replace": "^4.0.0",
|
|
39
39
|
"@rollup/plugin-strip": "^2.1.0",
|
|
40
40
|
"@rollup/plugin-typescript": "^8.3.1",
|
|
41
|
-
"@storybook/addon-actions": "^6.4.
|
|
42
|
-
"@storybook/addon-docs": "^6.4.
|
|
43
|
-
"@storybook/addon-essentials": "^6.4.
|
|
44
|
-
"@storybook/addon-links": "^6.4.
|
|
45
|
-
"@storybook/components": "^6.4.
|
|
46
|
-
"@storybook/core-events": "^6.4.
|
|
47
|
-
"@storybook/react": "^6.4.
|
|
41
|
+
"@storybook/addon-actions": "^6.4.20",
|
|
42
|
+
"@storybook/addon-docs": "^6.4.20",
|
|
43
|
+
"@storybook/addon-essentials": "^6.4.20",
|
|
44
|
+
"@storybook/addon-links": "^6.4.20",
|
|
45
|
+
"@storybook/components": "^6.4.20",
|
|
46
|
+
"@storybook/core-events": "^6.4.20",
|
|
47
|
+
"@storybook/react": "^6.4.20",
|
|
48
48
|
"@types/bn.js": "^5.1.0",
|
|
49
|
-
"@types/lodash": "^4.14.
|
|
49
|
+
"@types/lodash": "^4.14.181",
|
|
50
50
|
"@types/md5": "^2.3.2",
|
|
51
|
-
"@types/node": "^17.0.
|
|
51
|
+
"@types/node": "^17.0.23",
|
|
52
52
|
"@types/numeral": "^2.0.2",
|
|
53
|
-
"@types/react": "^17.0.
|
|
53
|
+
"@types/react": "^17.0.43",
|
|
54
54
|
"@types/react-dom": "^17.0.14",
|
|
55
55
|
"@types/react-helmet": "^6.1.5",
|
|
56
56
|
"@xylabs/eslint-config-react": "^2.1.3",
|
|
57
|
-
"@xylabs/rollup-config": "^1.1.
|
|
58
|
-
"@xylabs/ts-scripts": "^1.0.
|
|
57
|
+
"@xylabs/rollup-config": "^1.1.15",
|
|
58
|
+
"@xylabs/ts-scripts": "^1.0.52",
|
|
59
59
|
"@xylabs/tsconfig": "^1.0.12",
|
|
60
60
|
"babel-loader": "^8.2.4",
|
|
61
61
|
"copyfiles": "^2.4.1",
|
|
62
|
-
"eslint": "^8.
|
|
62
|
+
"eslint": "^8.12.0",
|
|
63
63
|
"eslint-plugin-prettier": "^4.0.0",
|
|
64
64
|
"eslint-plugin-react": "^7.29.4",
|
|
65
|
-
"eslint-plugin-react-hooks": "^4.
|
|
66
|
-
"prettier": "^2.6.
|
|
65
|
+
"eslint-plugin-react-hooks": "^4.4.0",
|
|
66
|
+
"prettier": "^2.6.2",
|
|
67
67
|
"rimraf": "^3.0.2",
|
|
68
68
|
"rollbar": "^2.24.1",
|
|
69
69
|
"rollup": "^2.70.1",
|
|
70
70
|
"rollup-plugin-svg": "^2.0.0",
|
|
71
71
|
"ts-node": "^10.7.0",
|
|
72
72
|
"tslib": "^2.3.1",
|
|
73
|
-
"typescript": "^4.6.
|
|
74
|
-
"webpack": "^5.
|
|
73
|
+
"typescript": "^4.6.3",
|
|
74
|
+
"webpack": "^5.71.0"
|
|
75
75
|
},
|
|
76
76
|
"esm5": "dist/esm5/index.js",
|
|
77
77
|
"exports": {
|
|
@@ -111,6 +111,6 @@
|
|
|
111
111
|
},
|
|
112
112
|
"sideEffects": false,
|
|
113
113
|
"types": "dist/index.d.ts",
|
|
114
|
-
"version": "2.10.
|
|
114
|
+
"version": "2.10.5",
|
|
115
115
|
"packageManager": "yarn@3.1.1"
|
|
116
116
|
}
|
package/src/lib/isLocalHost.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
const isLocalhost =
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
)
|
|
1
|
+
const isLocalhost = () =>
|
|
2
|
+
!!(
|
|
3
|
+
window.location.hostname === 'localhost' ||
|
|
4
|
+
// [::1] is the IPv6 localhost address.
|
|
5
|
+
window.location.hostname === '[::1]' ||
|
|
6
|
+
// 127.0.0.0/8 are considered localhost for IPv4.
|
|
7
|
+
window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)
|
|
8
|
+
)
|
|
8
9
|
|
|
9
10
|
export { isLocalhost }
|