@lotte-innovate/ui-component-test 0.0.141 → 0.0.142

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,6 +14,6 @@ export function useWindowSize() {
14
14
  window.addEventListener('resize', handleResize);
15
15
  handleResize();
16
16
  return function () { return window.removeEventListener('resize', handleResize); };
17
- }, [window]);
17
+ }, []);
18
18
  return size;
19
19
  }
@@ -1,2 +1,2 @@
1
- import{useState as n,useEffect as e}from"react";function i(){var i=n(250),r=i[0],t=i[1];return e((function(){function n(){if(window){var n=130+.15*window.innerWidth;n=Math.max(n,250),n=Math.min(n,300),t(n)}}return window.addEventListener("resize",n),n(),function(){return window.removeEventListener("resize",n)}}),[window]),r}export{i as useWindowSize};
1
+ import{useState as n,useEffect as e}from"react";function r(){var r=n(250),i=r[0],t=r[1];return e((function(){function n(){if(window){var n=130+.15*window.innerWidth;n=Math.max(n,250),n=Math.min(n,300),t(n)}}return window.addEventListener("resize",n),n(),function(){return window.removeEventListener("resize",n)}}),[]),i}export{r as useWindowSize};
2
2
  //# sourceMappingURL=useWindowSize.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"useWindowSize.mjs","sources":["../../lib/utils/useWindowSize.js"],"sourcesContent":["import { useState, useEffect } from 'react';\nvar MIN_SIZE = 250;\nexport function useWindowSize() {\n var _a = useState(MIN_SIZE), size = _a[0], setSize = _a[1];\n useEffect(function () {\n function handleResize() {\n if (!window)\n return;\n var width = 130 + window.innerWidth * 0.15;\n width = Math.max(width, MIN_SIZE);\n width = Math.min(width, 300);\n setSize(width);\n }\n window.addEventListener('resize', handleResize);\n handleResize();\n return function () { return window.removeEventListener('resize', handleResize); };\n }, [window]);\n return size;\n}\n"],"names":["useWindowSize","_a","useState","size","setSize","useEffect","handleResize","window","width","innerWidth","Math","max","min","addEventListener","removeEventListener"],"mappings":"gDAEO,SAASA,IACZ,IAAIC,EAAKC,EAFE,KAEkBC,EAAOF,EAAG,GAAIG,EAAUH,EAAG,GAcxD,OAbAI,GAAU,WACN,SAASC,IACL,GAAKC,OAAL,CAEA,IAAIC,EAAQ,IAA0B,IAApBD,OAAOE,WACzBD,EAAQE,KAAKC,IAAIH,EARd,KASHA,EAAQE,KAAKE,IAAIJ,EAAO,KACxBJ,EAAQI,EAJG,CAKd,CAGD,OAFAD,OAAOM,iBAAiB,SAAUP,GAClCA,IACO,WAAc,OAAOC,OAAOO,oBAAoB,SAAUR,GACzE,GAAO,CAACC,SACGJ,CACX"}
1
+ {"version":3,"file":"useWindowSize.mjs","sources":["../../lib/utils/useWindowSize.js"],"sourcesContent":["import { useState, useEffect } from 'react';\nvar MIN_SIZE = 250;\nexport function useWindowSize() {\n var _a = useState(MIN_SIZE), size = _a[0], setSize = _a[1];\n useEffect(function () {\n function handleResize() {\n if (!window)\n return;\n var width = 130 + window.innerWidth * 0.15;\n width = Math.max(width, MIN_SIZE);\n width = Math.min(width, 300);\n setSize(width);\n }\n window.addEventListener('resize', handleResize);\n handleResize();\n return function () { return window.removeEventListener('resize', handleResize); };\n }, []);\n return size;\n}\n"],"names":["useWindowSize","_a","useState","size","setSize","useEffect","handleResize","window","width","innerWidth","Math","max","min","addEventListener","removeEventListener"],"mappings":"gDAEO,SAASA,IACZ,IAAIC,EAAKC,EAFE,KAEkBC,EAAOF,EAAG,GAAIG,EAAUH,EAAG,GAcxD,OAbAI,GAAU,WACN,SAASC,IACL,GAAKC,OAAL,CAEA,IAAIC,EAAQ,IAA0B,IAApBD,OAAOE,WACzBD,EAAQE,KAAKC,IAAIH,EARd,KASHA,EAAQE,KAAKE,IAAIJ,EAAO,KACxBJ,EAAQI,EAJG,CAKd,CAGD,OAFAD,OAAOM,iBAAiB,SAAUP,GAClCA,IACO,WAAc,OAAOC,OAAOO,oBAAoB,SAAUR,GACpE,GAAE,IACIH,CACX"}