react-viewport-height 1.1.2 → 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 CHANGED
@@ -8,7 +8,6 @@
8
8
  [![GitHub Stars](https://img.shields.io/github/stars/dimazuien/react-viewport-height)](https://github.com/dimazuien/react-viewport-height/stargazers)
9
9
  ![CircleCI status](https://img.shields.io/circleci/build/github/dimazuien/react-viewport-height/main?label=circleci)
10
10
  ![Code scanning](https://img.shields.io/github/workflow/status/dimazuien/react-viewport-height/CodeQL?label=code%20scanning)
11
- [![Storybook](https://img.shields.io/badge/demos-%F0%9F%9A%80-yellow.svg?label=storybook)](https://dimazuien.github.io/react-viewport-height)
12
11
 
13
12
  A utility for React to set 100vh equal to the actual browser inner window height.
14
13
 
@@ -43,4 +42,4 @@ Read [the documentation](https://github.com/dimazuien/react-viewport-height/blob
43
42
 
44
43
  ## Support
45
44
 
46
- If you like this package and want to support it, you can fund us on [Patreon](https://www.patreon.com/dimazuien)
45
+ If you like this package and want to support it, you can do it on [Patreon](https://www.patreon.com/dimazuien)
package/index.d.ts ADDED
@@ -0,0 +1,18 @@
1
+ declare module 'react-viewport-height/src/index' {
2
+ import useVH from 'react-viewport-height/src/useVH';
3
+ export default useVH;
4
+
5
+ }
6
+ declare module 'react-viewport-height/src/useVH' {
7
+ const useVH: () => number;
8
+ export default useVH;
9
+
10
+ }
11
+ declare module 'react-viewport-height/tests/useVH.test' {
12
+ import '@testing-library/jest-dom/extend-expect';
13
+
14
+ }
15
+ declare module 'react-viewport-height' {
16
+ import main = require('react-viewport-height/src/index');
17
+ export = main;
18
+ }
package/lib/index.js ADDED
@@ -0,0 +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 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.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://dimazuien.github.io/react-viewport-height",
9
+ "homepage": "https://github.com/dimazuien/react-viewport-height#readme",
10
10
  "keywords": [
11
11
  "react",
12
12
  "hook",
@@ -28,76 +28,79 @@
28
28
  "url": "https://github.com/dimazuien/react-viewport-height/issues"
29
29
  },
30
30
  "source": "src/index.ts",
31
- "main": "dist/index.js",
32
- "browser": "dist/index.js",
33
- "module": "dist/index.module.js",
34
- "unpkg": "dist/index.umd.js",
35
- "types": "index.d.ts",
31
+ "main": "lib/index.js",
36
32
  "typings": "index.d.ts",
37
33
  "files": [
38
- "dist/"
34
+ "lib",
35
+ "index.d.ts"
39
36
  ],
40
37
  "sideEffects": false,
41
38
  "scripts": {
42
- "lint": "eslint './src/**/*.{js,jsx,ts,tsx}'",
39
+ "_postinstall": "husky install",
40
+ "build": "webpack",
41
+ "dts": "npx npm-dts generate -e src/index",
42
+ "lint": "eslint .",
43
43
  "test": "jest",
44
- "build": "microbundle --jsx React.createElement",
44
+ "prepublishOnly": "pinst --disable",
45
45
  "release": "semantic-release",
46
- "storybook": "start-storybook -p 6006",
47
- "storybook:build": "build-storybook",
48
- "storybook:upload": "gh-pages -d storybook-static --git \"$(which git)\""
46
+ "postpublish": "pinst --enable"
49
47
  },
50
- "dependencies": {},
51
48
  "devDependencies": {
52
- "@babel/core": "7.12.16",
53
- "@commitlint/cli": "11.0.0",
54
- "@commitlint/config-conventional": "11.0.0",
55
- "@semantic-release/changelog": "5.0.1",
56
- "@semantic-release/commit-analyzer": "8.0.1",
57
- "@semantic-release/git": "9.0.0",
58
- "@semantic-release/github": "7.2.0",
59
- "@semantic-release/npm": "7.0.10",
60
- "@semantic-release/release-notes-generator": "9.0.1",
61
- "@storybook/addon-docs": "6.1.17",
62
- "@storybook/react": "6.1.17",
63
- "@testing-library/jest-dom": "5.11.9",
64
- "@testing-library/react": "11.2.5",
65
- "@testing-library/user-event": "12.7.1",
66
- "@types/jest": "26.0.20",
67
- "@types/react": "17.0.1",
68
- "@types/react-dom": "17.0.0",
69
- "@types/react-router-dom": "5.1.7",
70
- "@types/testing-library__jest-dom": "5.9.5",
71
- "@typescript-eslint/eslint-plugin": "4.11.0",
72
- "@typescript-eslint/parser": "4.11.0",
73
- "babel-loader": "8.2.2",
74
- "commitizen": "4.2.3",
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
+ "@semantic-release/changelog": "6.0.1",
56
+ "@semantic-release/commit-analyzer": "9.0.2",
57
+ "@semantic-release/git": "10.0.1",
58
+ "@semantic-release/github": "8.0.5",
59
+ "@semantic-release/npm": "9.0.1",
60
+ "@semantic-release/release-notes-generator": "10.0.3",
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
+ "@types/react-router-dom": "5.3.3",
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
+ "commitizen": "4.2.4",
75
74
  "cz-conventional-changelog": "3.3.0",
76
- "eslint": "7.19.0",
77
- "eslint-config-airbnb": "18.2.1",
78
- "eslint-config-prettier": "7.2.0",
79
- "eslint-plugin-import": "2.22.1",
80
- "eslint-plugin-jest-dom": "3.6.5",
81
- "eslint-plugin-jsx-a11y": "6.4.1",
82
- "eslint-plugin-prettier": "3.3.1",
83
- "eslint-plugin-react": "7.22.0",
84
- "eslint-plugin-react-hooks": "4.2.0",
85
- "eslint-plugin-testing-library": "3.10.1",
86
- "gh-pages": "3.1.0",
87
- "husky": "4.3.8",
88
- "jest": "26.6.3",
89
- "lint-staged": "10.5.4",
90
- "microbundle": "0.13.0",
91
- "prettier": "2.2.1",
92
- "react": "17.0.1",
93
- "react-dom": "17.0.1",
94
- "semantic-release": "17.3.7",
95
- "ts-jest": "26.5.0",
96
- "ts-node": "9.1.1",
97
- "typescript": "4.1.3"
75
+ "eslint": "8.20.0",
76
+ "eslint-config-airbnb": "19.0.4",
77
+ "eslint-config-prettier": "8.5.0",
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
+ "eslint-plugin-simple-import-sort": "7.0.0",
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
+ "pinst": "3.0.0",
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"
98
101
  },
99
102
  "peerDependencies": {
100
- "react": "^16.8 || ^17",
101
- "react-dom": "^16.8 || ^17"
103
+ "react": "^16.8 || ^17 || ^18",
104
+ "react-dom": "^16.8 || ^17 || ^18"
102
105
  }
103
106
  }
package/CHANGELOG.md DELETED
@@ -1,22 +0,0 @@
1
- ## [1.1.2](https://github.com/dimazuien/react-viewport-height/compare/v1.1.1...v1.1.2) (2021-02-22)
2
-
3
-
4
- ### Bug Fixes
5
-
6
- * fix typing paths ([9d20410](https://github.com/dimazuien/react-viewport-height/commit/9d204101a9dd1b2d57858db965838dcd971d019c)), closes [#73](https://github.com/dimazuien/react-viewport-height/issues/73)
7
-
8
- ## [1.1.1](https://github.com/dimazuien/react-viewport-height/compare/v1.1.0...v1.1.1) (2021-02-22)
9
-
10
-
11
- ### Bug Fixes
12
-
13
- * change typings path ([8587a9a](https://github.com/dimazuien/react-viewport-height/commit/8587a9a84d374daf3c7fd5d43176e6da0596d8ef)), closes [#73](https://github.com/dimazuien/react-viewport-height/issues/73)
14
-
15
- # [1.1.0](https://github.com/dimazuien/react-viewport-height/compare/v1.0.0...v1.1.0) (2020-12-27)
16
-
17
- ### Features
18
-
19
- * add ssr check ([8b60760](https://github.com/dimazuien/react-viewport-height/commit/8b60760dd5a6a1c2059a591a2640511d09ab0e0a))
20
- * remove vh on unmount ([8b60760](https://github.com/dimazuien/react-viewport-height/commit/8b60760dd5a6a1c2059a591a2640511d09ab0e0a))
21
- * return vh from hook ([8b60760](https://github.com/dimazuien/react-viewport-height/commit/8b60760dd5a6a1c2059a591a2640511d09ab0e0a))
22
- * make multiple use possible ([8b60760](https://github.com/dimazuien/react-viewport-height/commit/8b60760dd5a6a1c2059a591a2640511d09ab0e0a))
package/dist/index.js DELETED
@@ -1,2 +0,0 @@
1
- var e=require("react"),n=function(){return"undefined"!=typeof window?Number((.01*window.innerHeight).toFixed(2)):0},t=0;module.exports=function(){var r=e.useState(n()),o=r[0],u=r[1],i=e.useCallback(function(){var e=n();document.documentElement.style.setProperty("--vh",e+"px"),u(e)},[u]);return e.useEffect(function(){return t+=1,i(),window.addEventListener("resize",i),function(){window.removeEventListener("resize",i),0==(t-=1)&&document.documentElement.style.removeProperty("--vh")}},[i]),o};
2
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../src/useVH.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\nconst VARIABLE_NAME = '--vh';\n\nconst getActualVh = () =>\n // window check for server-side rendering\n typeof window !== 'undefined'\n ? Number((window.innerHeight * 0.01).toFixed(2))\n : 0;\n\nlet count = 0;\n\nconst useVH = (): number => {\n const [vh, setVh] = useState(getActualVh());\n const updateVh = useCallback(() => {\n const newVh = getActualVh();\n\n document.documentElement.style.setProperty(VARIABLE_NAME, `${newVh}px`);\n setVh(newVh);\n }, [setVh]);\n\n useEffect(() => {\n count += 1;\n\n updateVh();\n\n window.addEventListener('resize', updateVh);\n\n return () => {\n window.removeEventListener('resize', updateVh);\n\n count -= 1;\n\n if (count === 0)\n document.documentElement.style.removeProperty(VARIABLE_NAME);\n };\n }, [updateVh]);\n\n return vh;\n};\n\nexport default useVH;\n"],"names":["getActualVh","window","Number","innerHeight","toFixed","count","useState","vh","setVh","updateVh","useCallback","newVh","document","documentElement","style","setProperty","useEffect","addEventListener","removeEventListener","removeProperty"],"mappings":"uBAIMA,EAAc,iBAEA,oBAAXC,OACHC,QAA6B,IAArBD,OAAOE,aAAoBC,QAAQ,IAC3C,GAEFC,EAAQ,iBAEE,iBACQC,WAASN,KAAtBO,OAAIC,OACLC,EAAWC,cAAY,WAC3B,IAAMC,EAAQX,IAEdY,SAASC,gBAAgBC,MAAMC,YAfb,OAe2CJ,QAC7DH,EAAMG,IACL,CAACH,IAmBJ,OAjBAQ,YAAU,WAOR,OANAX,GAAS,EAETI,IAEAR,OAAOgB,iBAAiB,SAAUR,cAGhCR,OAAOiB,oBAAoB,SAAUT,GAIvB,IAFdJ,GAAS,IAGPO,SAASC,gBAAgBC,MAAMK,eAhCjB,UAkCjB,CAACV,IAEGF"}
@@ -1,2 +0,0 @@
1
- import{useState as e,useCallback as t,useEffect as n}from"react";const o=()=>"undefined"!=typeof window?Number((.01*window.innerHeight).toFixed(2)):0;let r=0;export default()=>{const[d,i]=e(o()),m=t(()=>{const e=o();document.documentElement.style.setProperty("--vh",`${e}px`),i(e)},[i]);return n(()=>(r+=1,m(),window.addEventListener("resize",m),()=>{window.removeEventListener("resize",m),r-=1,0===r&&document.documentElement.style.removeProperty("--vh")}),[m]),d};
2
- //# sourceMappingURL=index.modern.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.modern.js","sources":["../src/useVH.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\nconst VARIABLE_NAME = '--vh';\n\nconst getActualVh = () =>\n // window check for server-side rendering\n typeof window !== 'undefined'\n ? Number((window.innerHeight * 0.01).toFixed(2))\n : 0;\n\nlet count = 0;\n\nconst useVH = (): number => {\n const [vh, setVh] = useState(getActualVh());\n const updateVh = useCallback(() => {\n const newVh = getActualVh();\n\n document.documentElement.style.setProperty(VARIABLE_NAME, `${newVh}px`);\n setVh(newVh);\n }, [setVh]);\n\n useEffect(() => {\n count += 1;\n\n updateVh();\n\n window.addEventListener('resize', updateVh);\n\n return () => {\n window.removeEventListener('resize', updateVh);\n\n count -= 1;\n\n if (count === 0)\n document.documentElement.style.removeProperty(VARIABLE_NAME);\n };\n }, [updateVh]);\n\n return vh;\n};\n\nexport default useVH;\n"],"names":["getActualVh","window","Number","innerHeight","toFixed","count","vh","setVh","useState","updateVh","useCallback","newVh","document","documentElement","style","setProperty","useEffect","addEventListener","removeEventListener","removeProperty"],"mappings":"iEAEA,MAEMA,EAAc,IAEA,oBAAXC,OACHC,QAA6B,IAArBD,OAAOE,aAAoBC,QAAQ,IAC3C,EAEN,IAAIC,EAAQ,gBAEE,KACZ,MAAOC,EAAIC,GAASC,EAASR,KACvBS,EAAWC,EAAY,KAC3B,MAAMC,EAAQX,IAEdY,SAASC,gBAAgBC,MAAMC,YAfb,UAe2CJ,OAC7DJ,EAAMI,IACL,CAACJ,IAmBJ,OAjBAS,EAAU,KACRX,GAAS,EAETI,IAEAR,OAAOgB,iBAAiB,SAAUR,GAE3B,KACLR,OAAOiB,oBAAoB,SAAUT,GAErCJ,GAAS,EAEK,IAAVA,GACFO,SAASC,gBAAgBC,MAAMK,eAhCjB,UAkCjB,CAACV,IAEGH"}
@@ -1,2 +0,0 @@
1
- import{useState as e,useCallback as n,useEffect as t}from"react";var r=function(){return"undefined"!=typeof window?Number((.01*window.innerHeight).toFixed(2)):0},o=0;export default function(){var i=e(r()),u=i[0],d=i[1],m=n(function(){var e=r();document.documentElement.style.setProperty("--vh",e+"px"),d(e)},[d]);return t(function(){return o+=1,m(),window.addEventListener("resize",m),function(){window.removeEventListener("resize",m),0==(o-=1)&&document.documentElement.style.removeProperty("--vh")}},[m]),u}
2
- //# sourceMappingURL=index.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.module.js","sources":["../src/useVH.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\nconst VARIABLE_NAME = '--vh';\n\nconst getActualVh = () =>\n // window check for server-side rendering\n typeof window !== 'undefined'\n ? Number((window.innerHeight * 0.01).toFixed(2))\n : 0;\n\nlet count = 0;\n\nconst useVH = (): number => {\n const [vh, setVh] = useState(getActualVh());\n const updateVh = useCallback(() => {\n const newVh = getActualVh();\n\n document.documentElement.style.setProperty(VARIABLE_NAME, `${newVh}px`);\n setVh(newVh);\n }, [setVh]);\n\n useEffect(() => {\n count += 1;\n\n updateVh();\n\n window.addEventListener('resize', updateVh);\n\n return () => {\n window.removeEventListener('resize', updateVh);\n\n count -= 1;\n\n if (count === 0)\n document.documentElement.style.removeProperty(VARIABLE_NAME);\n };\n }, [updateVh]);\n\n return vh;\n};\n\nexport default useVH;\n"],"names":["getActualVh","window","Number","innerHeight","toFixed","count","useState","vh","setVh","updateVh","useCallback","newVh","document","documentElement","style","setProperty","useEffect","addEventListener","removeEventListener","removeProperty"],"mappings":"iEAEA,IAEMA,EAAc,iBAEA,oBAAXC,OACHC,QAA6B,IAArBD,OAAOE,aAAoBC,QAAQ,IAC3C,GAEFC,EAAQ,iBAEE,iBACQC,EAASN,KAAtBO,OAAIC,OACLC,EAAWC,EAAY,WAC3B,IAAMC,EAAQX,IAEdY,SAASC,gBAAgBC,MAAMC,YAfb,OAe2CJ,QAC7DH,EAAMG,IACL,CAACH,IAmBJ,OAjBAQ,EAAU,WAOR,OANAX,GAAS,EAETI,IAEAR,OAAOgB,iBAAiB,SAAUR,cAGhCR,OAAOiB,oBAAoB,SAAUT,GAIvB,IAFdJ,GAAS,IAGPO,SAASC,gBAAgBC,MAAMK,eAhCjB,UAkCjB,CAACV,IAEGF"}
package/dist/index.umd.js DELETED
@@ -1,2 +0,0 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):(e||self).reactViewportHeight=t(e.react)}(this,function(e){var t="--vh",n=function(){return"undefined"!=typeof window?Number((.01*window.innerHeight).toFixed(2)):0},o=0;return function(){var r=e.useState(n()),i=r[0],u=r[1],d=e.useCallback(function(){var e=n();document.documentElement.style.setProperty(t,e+"px"),u(e)},[u]);return e.useEffect(function(){return o+=1,d(),window.addEventListener("resize",d),function(){window.removeEventListener("resize",d),0==(o-=1)&&document.documentElement.style.removeProperty(t)}},[d]),i}});
2
- //# sourceMappingURL=index.umd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.umd.js","sources":["../src/useVH.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\nconst VARIABLE_NAME = '--vh';\n\nconst getActualVh = () =>\n // window check for server-side rendering\n typeof window !== 'undefined'\n ? Number((window.innerHeight * 0.01).toFixed(2))\n : 0;\n\nlet count = 0;\n\nconst useVH = (): number => {\n const [vh, setVh] = useState(getActualVh());\n const updateVh = useCallback(() => {\n const newVh = getActualVh();\n\n document.documentElement.style.setProperty(VARIABLE_NAME, `${newVh}px`);\n setVh(newVh);\n }, [setVh]);\n\n useEffect(() => {\n count += 1;\n\n updateVh();\n\n window.addEventListener('resize', updateVh);\n\n return () => {\n window.removeEventListener('resize', updateVh);\n\n count -= 1;\n\n if (count === 0)\n document.documentElement.style.removeProperty(VARIABLE_NAME);\n };\n }, [updateVh]);\n\n return vh;\n};\n\nexport default useVH;\n"],"names":["VARIABLE_NAME","getActualVh","window","Number","innerHeight","toFixed","count","useState","vh","setVh","updateVh","useCallback","newVh","document","documentElement","style","setProperty","useEffect","addEventListener","removeEventListener","removeProperty"],"mappings":"wQAEA,IAAMA,EAAgB,OAEhBC,EAAc,iBAEA,oBAAXC,OACHC,QAA6B,IAArBD,OAAOE,aAAoBC,QAAQ,IAC3C,GAEFC,EAAQ,SAEE,iBACQC,WAASN,KAAtBO,OAAIC,OACLC,EAAWC,cAAY,WAC3B,IAAMC,EAAQX,IAEdY,SAASC,gBAAgBC,MAAMC,YAAYhB,EAAkBY,QAC7DH,EAAMG,IACL,CAACH,IAmBJ,OAjBAQ,YAAU,WAOR,OANAX,GAAS,EAETI,IAEAR,OAAOgB,iBAAiB,SAAUR,cAGhCR,OAAOiB,oBAAoB,SAAUT,GAIvB,IAFdJ,GAAS,IAGPO,SAASC,gBAAgBC,MAAMK,eAAepB,KAEjD,CAACU,IAEGF"}