react-viewport-height 1.2.0 → 1.2.1
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/README.md +1 -1
- package/lib/index.js +1 -1
- package/package.json +42 -42
package/README.md
CHANGED
|
@@ -42,4 +42,4 @@ Read [the documentation](https://github.com/dimazuien/react-viewport-height/blob
|
|
|
42
42
|
|
|
43
43
|
## Support
|
|
44
44
|
|
|
45
|
-
If you like this package and want to support it, you can
|
|
45
|
+
If you like this package and want to support it, you can do it on [Patreon](https://www.patreon.com/dimazuien)
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["react-viewport-height"]=t():e["react-viewport-height"]=t()}(self,(function(){return function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:function(){return
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["react-viewport-height"]=t():e["react-viewport-height"]=t()}(self,(function(){return function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:function(){return u}});var r=require("react");function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var o="--vh",i=0,u=function(){var e,t,u=(e=(0,r.useState)(0),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],u=!0,a=!1;try{for(r=r.call(e);!(u=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);u=!0);}catch(e){a=!0,o=e}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=u[0],c=u[1],l=(0,r.useCallback)((function(){var e=Number((.01*window.innerHeight).toFixed(2));document.documentElement.style.setProperty(o,"".concat(e,"px")),c(e)}),[c]);return(0,r.useEffect)((function(){return"undefined"!=typeof window&&(i+=1,l(),window.addEventListener("resize",l)),function(){window.removeEventListener("resize",l),0==(i-=1)&&document.documentElement.style.removeProperty(o)}}),[l]),a};return t}()}));
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-viewport-height",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "A utility for React to set 100vh equal to the actual browser inner window height.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/dimazuien/react-viewport-height.git"
|
|
8
8
|
},
|
|
9
|
-
"homepage": "https://
|
|
9
|
+
"homepage": "https://github.com/dimazuien/react-viewport-height#readme",
|
|
10
10
|
"keywords": [
|
|
11
11
|
"react",
|
|
12
12
|
"hook",
|
|
@@ -46,58 +46,58 @@
|
|
|
46
46
|
"postpublish": "pinst --enable"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@babel/core": "7.
|
|
50
|
-
"@babel/preset-env": "7.
|
|
51
|
-
"@babel/preset-react": "7.
|
|
52
|
-
"@babel/preset-typescript": "7.
|
|
53
|
-
"@commitlint/cli": "
|
|
54
|
-
"@commitlint/config-conventional": "
|
|
49
|
+
"@babel/core": "7.18.6",
|
|
50
|
+
"@babel/preset-env": "7.18.6",
|
|
51
|
+
"@babel/preset-react": "7.18.6",
|
|
52
|
+
"@babel/preset-typescript": "7.18.6",
|
|
53
|
+
"@commitlint/cli": "17.0.3",
|
|
54
|
+
"@commitlint/config-conventional": "17.0.3",
|
|
55
55
|
"@semantic-release/changelog": "6.0.1",
|
|
56
56
|
"@semantic-release/commit-analyzer": "9.0.2",
|
|
57
57
|
"@semantic-release/git": "10.0.1",
|
|
58
|
-
"@semantic-release/github": "8.0.
|
|
58
|
+
"@semantic-release/github": "8.0.5",
|
|
59
59
|
"@semantic-release/npm": "9.0.1",
|
|
60
60
|
"@semantic-release/release-notes-generator": "10.0.3",
|
|
61
|
-
"@testing-library/dom": "8.
|
|
62
|
-
"@testing-library/jest-dom": "5.16.
|
|
63
|
-
"@testing-library/react": "13.
|
|
64
|
-
"@testing-library/user-event": "14.
|
|
65
|
-
"@types/jest": "
|
|
66
|
-
"@types/react": "
|
|
67
|
-
"@types/react-dom": "
|
|
61
|
+
"@testing-library/dom": "8.16.0",
|
|
62
|
+
"@testing-library/jest-dom": "5.16.4",
|
|
63
|
+
"@testing-library/react": "13.3.0",
|
|
64
|
+
"@testing-library/user-event": "14.2.5",
|
|
65
|
+
"@types/jest": "28.1.6",
|
|
66
|
+
"@types/react": "18.0.15",
|
|
67
|
+
"@types/react-dom": "18.0.6",
|
|
68
68
|
"@types/react-router-dom": "5.3.3",
|
|
69
|
-
"@types/testing-library__jest-dom": "5.14.
|
|
70
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
71
|
-
"@typescript-eslint/parser": "5.
|
|
72
|
-
"babel-loader": "8.2.
|
|
69
|
+
"@types/testing-library__jest-dom": "5.14.5",
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "5.30.6",
|
|
71
|
+
"@typescript-eslint/parser": "5.30.6",
|
|
72
|
+
"babel-loader": "8.2.5",
|
|
73
73
|
"commitizen": "4.2.4",
|
|
74
74
|
"cz-conventional-changelog": "3.3.0",
|
|
75
|
-
"eslint": "8.
|
|
75
|
+
"eslint": "8.20.0",
|
|
76
76
|
"eslint-config-airbnb": "19.0.4",
|
|
77
77
|
"eslint-config-prettier": "8.5.0",
|
|
78
|
-
"eslint-plugin-import": "2.
|
|
79
|
-
"eslint-plugin-jest-dom": "4.0.
|
|
80
|
-
"eslint-plugin-jsx-a11y": "6.
|
|
81
|
-
"eslint-plugin-prettier": "4.
|
|
82
|
-
"eslint-plugin-react": "7.
|
|
83
|
-
"eslint-plugin-react-hooks": "4.
|
|
78
|
+
"eslint-plugin-import": "2.26.0",
|
|
79
|
+
"eslint-plugin-jest-dom": "4.0.2",
|
|
80
|
+
"eslint-plugin-jsx-a11y": "6.6.0",
|
|
81
|
+
"eslint-plugin-prettier": "4.2.1",
|
|
82
|
+
"eslint-plugin-react": "7.30.1",
|
|
83
|
+
"eslint-plugin-react-hooks": "4.6.0",
|
|
84
84
|
"eslint-plugin-simple-import-sort": "7.0.0",
|
|
85
|
-
"eslint-plugin-testing-library": "5.
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"jest": "
|
|
89
|
-
"lint-staged": "
|
|
90
|
-
"npm-dts": "1.3.
|
|
85
|
+
"eslint-plugin-testing-library": "5.5.1",
|
|
86
|
+
"husky": "8.0.1",
|
|
87
|
+
"jest": "28.1.3",
|
|
88
|
+
"jest-environment-jsdom": "28.1.3",
|
|
89
|
+
"lint-staged": "13.0.3",
|
|
90
|
+
"npm-dts": "1.3.12",
|
|
91
91
|
"pinst": "3.0.0",
|
|
92
|
-
"prettier": "2.
|
|
93
|
-
"react": "18.
|
|
94
|
-
"react-dom": "18.
|
|
95
|
-
"semantic-release": "19.0.
|
|
96
|
-
"ts-jest": "
|
|
97
|
-
"ts-node": "10.
|
|
98
|
-
"typescript": "4.
|
|
99
|
-
"webpack": "5.
|
|
100
|
-
"webpack-cli": "4.
|
|
92
|
+
"prettier": "2.7.1",
|
|
93
|
+
"react": "18.2.0",
|
|
94
|
+
"react-dom": "18.2.0",
|
|
95
|
+
"semantic-release": "19.0.3",
|
|
96
|
+
"ts-jest": "28.0.7",
|
|
97
|
+
"ts-node": "10.9.1",
|
|
98
|
+
"typescript": "4.7.4",
|
|
99
|
+
"webpack": "5.73.0",
|
|
100
|
+
"webpack-cli": "4.10.0"
|
|
101
101
|
},
|
|
102
102
|
"peerDependencies": {
|
|
103
103
|
"react": "^16.8 || ^17 || ^18",
|