{"ast":null,"code":"import { useWindowResize } from \"beautiful-react-hooks\";\nimport { useState } from \"react\";\nimport useIsoEffect from \"./useIsoEffect\";\nexport const useClientWidth = () => {\n  const {\n    0: width,\n    1: setWidth\n  } = useState(1024);\n\n  const setClientWidth = () => setWidth(document.documentElement.clientWidth || document.body.clientWidth);\n\n  useIsoEffect(setClientWidth);\n  useWindowResize(event => setClientWidth());\n  return width;\n};\nexport const useClientHeight = () => {\n  const {\n    0: height,\n    1: setHeight\n  } = useState(800);\n\n  const setClientHeight = () => setHeight(document.documentElement.clientHeight || document.body.clientHeight);\n\n  useIsoEffect(setClientHeight);\n  useWindowResize(event => setClientHeight());\n  return height;\n};","map":{"version":3,"sources":["/home/gkkdzdg/www/src/hooks/useClientSize.js"],"names":["useWindowResize","useState","useIsoEffect","useClientWidth","width","setWidth","setClientWidth","document","documentElement","clientWidth","body","event","useClientHeight","height","setHeight","setClientHeight","clientHeight"],"mappings":"AAAA,SAASA,eAAT,QAAgC,uBAAhC;AACA,SAASC,QAAT,QAAyB,OAAzB;AACA,OAAOC,YAAP,MAAyB,gBAAzB;AAGA,OAAO,MAAMC,cAAc,GAAG,MAAM;AACjC,QAAM;AAAA,OAACC,KAAD;AAAA,OAAQC;AAAR,MAAoBJ,QAAQ,CAAC,IAAD,CAAlC;;AAEA,QAAMK,cAAc,GAAG,MAAMD,QAAQ,CAACE,QAAQ,CAACC,eAAT,CAAyBC,WAAzB,IAAwCF,QAAQ,CAACG,IAAT,CAAcD,WAAvD,CAArC;;AAEAP,EAAAA,YAAY,CAACI,cAAD,CAAZ;AACAN,EAAAA,eAAe,CAACW,KAAK,IAAIL,cAAc,EAAxB,CAAf;AAEA,SAAOF,KAAP;AACF,CATM;AAWP,OAAO,MAAMQ,eAAe,GAAG,MAAM;AAClC,QAAM;AAAA,OAACC,MAAD;AAAA,OAASC;AAAT,MAAsBb,QAAQ,CAAC,GAAD,CAApC;;AAEA,QAAMc,eAAe,GAAG,MAAMD,SAAS,CAACP,QAAQ,CAACC,eAAT,CAAyBQ,YAAzB,IAAyCT,QAAQ,CAACG,IAAT,CAAcM,YAAxD,CAAvC;;AAEAd,EAAAA,YAAY,CAACa,eAAD,CAAZ;AACAf,EAAAA,eAAe,CAACW,KAAK,IAAII,eAAe,EAAzB,CAAf;AAEA,SAAOF,MAAP;AACF,CATM","sourcesContent":["import { useWindowResize } from \"beautiful-react-hooks\"\nimport { useState } from \"react\"\nimport useIsoEffect from \"./useIsoEffect\"\n\n\nexport const useClientWidth = () => {\n   const [width, setWidth] = useState(1024)\n\n   const setClientWidth = () => setWidth(document.documentElement.clientWidth || document.body.clientWidth)\n   \n   useIsoEffect(setClientWidth)\n   useWindowResize(event => setClientWidth())\n\n   return width\n}\n\nexport const useClientHeight = () => {\n   const [height, setHeight] = useState(800)\n\n   const setClientHeight = () => setHeight(document.documentElement.clientHeight || document.body.clientHeight)\n   \n   useIsoEffect(setClientHeight)\n   useWindowResize(event => setClientHeight())\n\n   return height\n}"]},"metadata":{},"sourceType":"module"}