@siberiacancode/reactuse 0.0.26 → 0.0.28
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/cjs/{_rollupPluginBabelHelpers-D94plMsx.js → _rollupPluginBabelHelpers-CntznmQ7.js} +2 -2
- package/dist/cjs/_rollupPluginBabelHelpers-CntznmQ7.js.map +1 -0
- package/dist/cjs/hooks/index.js +2 -2
- package/dist/cjs/hooks/useBattery/useBattery.js +2 -2
- package/dist/cjs/hooks/useBoolean/useBoolean.js +2 -2
- package/dist/cjs/hooks/useBrowserLanguage/useBrowserLanguage.js +1 -1
- package/dist/cjs/hooks/useClickOutside/useClickOutside.js +1 -1
- package/dist/cjs/hooks/useCopyToClipboard/useCopyToClipboard.js +2 -2
- package/dist/cjs/hooks/useCounter/useCounter.js +2 -2
- package/dist/cjs/hooks/useDebouncedValue/useDebouncedValue.js +2 -2
- package/dist/cjs/hooks/useDefault/useDefault.js +2 -2
- package/dist/cjs/hooks/useDidUpdate/useDidUpdate.js +1 -1
- package/dist/cjs/hooks/useDocumentEvent/useDocumentEvent.js +1 -1
- package/dist/cjs/hooks/useDocumentTitle/useDocumentTitle.js +2 -2
- package/dist/cjs/hooks/useDocumentVisibility/useDocumentVisibility.js +1 -1
- package/dist/cjs/hooks/useEvent/useEvent.js +1 -1
- package/dist/cjs/hooks/useEventListener/useEventListener.js +1 -1
- package/dist/cjs/hooks/useEyeDropper/useEyeDropper.js +2 -2
- package/dist/cjs/hooks/useFavicon/useFavicon.js +2 -2
- package/dist/cjs/hooks/useFps/useFps.js +2 -2
- package/dist/cjs/hooks/useFullscreen/useFullscreen.js +2 -2
- package/dist/cjs/hooks/useHash/useHash.js +2 -2
- package/dist/cjs/hooks/useHotkeys/useHotkeys.js +2 -2
- package/dist/cjs/hooks/useHover/useHover.js +2 -2
- package/dist/cjs/hooks/useIdle/useIdle.js +2 -2
- package/dist/cjs/hooks/useIntersectionObserver/useIntersectionObserver.js +2 -2
- package/dist/cjs/hooks/useInterval/useInterval.js +2 -2
- package/dist/cjs/hooks/useIsFirstRender/useIsFirstRender.js +1 -1
- package/dist/cjs/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +1 -1
- package/dist/cjs/hooks/useKeyPress/useKeyPress.js +2 -2
- package/dist/cjs/hooks/useKeyPressEvent/useKeyPressEvent.js +1 -1
- package/dist/cjs/hooks/useKeyboard/useKeyboard.js +1 -1
- package/dist/cjs/hooks/useKeysPressed/useKeysPressed.js +2 -2
- package/dist/cjs/hooks/useList/useList.js +2 -2
- package/dist/cjs/hooks/useLocalStorage/useLocalStorage.js +2 -2
- package/dist/cjs/hooks/useLogger/useLogger.js +2 -2
- package/dist/cjs/hooks/useLongPress/useLongPress.js +2 -2
- package/dist/cjs/hooks/useMediaQuery/useMediaQuery.js +1 -1
- package/dist/cjs/hooks/useMount/useMount.js +1 -1
- package/dist/cjs/hooks/useMouse/useMouse.js +2 -2
- package/dist/cjs/hooks/useMutation/useMutation.js +2 -2
- package/dist/cjs/hooks/useMutationObserver.js +1 -1
- package/dist/cjs/hooks/useNetwork/useNetwork.js +2 -2
- package/dist/cjs/hooks/useOnline/useOnline.js +1 -1
- package/dist/cjs/hooks/useOperatingSystem/useOperatingSystem.js +1 -1
- package/dist/cjs/hooks/useOrientation/useOrientation.js +2 -2
- package/dist/cjs/hooks/usePageLeave/usePageLeave.js +2 -2
- package/dist/cjs/hooks/usePaint/usePaint.js +2 -2
- package/dist/cjs/hooks/usePreferredColorScheme/usePreferredColorScheme.js +1 -1
- package/dist/cjs/hooks/usePreferredLanguages/usePreferredLanguages.js +1 -1
- package/dist/cjs/hooks/usePrevious/usePrevious.js +1 -1
- package/dist/cjs/hooks/useQRCode/useQRCode.js +3 -0
- package/dist/cjs/hooks/useQRCode/useQRCode.js.map +1 -0
- package/dist/cjs/hooks/useQuery/useQuery.js +2 -2
- package/dist/cjs/hooks/useQueue/useQueue.js +2 -2
- package/dist/cjs/hooks/useRenderCount/useRenderCount.js +1 -1
- package/dist/cjs/hooks/useRenderInfo/useRenderInfo.js +3 -0
- package/dist/cjs/hooks/useRenderInfo/useRenderInfo.js.map +1 -0
- package/dist/cjs/hooks/useRerender/useRerender.js +2 -2
- package/dist/cjs/hooks/useScript/useScript.js +2 -2
- package/dist/cjs/hooks/useSessionStorage/useSessionStorage.js +2 -2
- package/dist/cjs/hooks/useSet/useSet.js +2 -2
- package/dist/cjs/hooks/useStep/useStep.js +2 -2
- package/dist/cjs/hooks/useStorage/useStorage.js +2 -2
- package/dist/cjs/hooks/useTextSelection/useTextSelection.js +2 -2
- package/dist/cjs/hooks/useTime/useTime.js +2 -2
- package/dist/cjs/hooks/useTimeout/useTimeout.js +2 -2
- package/dist/cjs/hooks/useToggle/useToggle.js +2 -2
- package/dist/cjs/hooks/useUnmount/useUnmount.js +1 -1
- package/dist/cjs/hooks/useWebSocket/useWebSocket.js +3 -0
- package/dist/cjs/hooks/useWebSocket/useWebSocket.js.map +1 -0
- package/dist/cjs/hooks/useWindowEvent/useWindowEvent.js +1 -1
- package/dist/cjs/hooks/useWindowSize/useWindowSize.js +2 -2
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/utils/helpers/debounce.js +1 -1
- package/dist/cjs/utils/helpers/getRetry.js +1 -1
- package/dist/cjs/utils/helpers/index.js +1 -1
- package/dist/cjs/utils/helpers/isClient.js +1 -1
- package/dist/cjs/utils/helpers/throttle.js +1 -1
- package/dist/cjs/utils/helpers/time/getDate.js +1 -1
- package/dist/esm/{_rollupPluginBabelHelpers-IRPAje5z.js → _rollupPluginBabelHelpers-DsV9C8-q.js} +2 -2
- package/dist/esm/_rollupPluginBabelHelpers-DsV9C8-q.js.map +1 -0
- package/dist/esm/hooks/index.js +2 -2
- package/dist/esm/hooks/useBattery/useBattery.js +2 -2
- package/dist/esm/hooks/useBoolean/useBoolean.js +2 -2
- package/dist/esm/hooks/useBrowserLanguage/useBrowserLanguage.js +1 -1
- package/dist/esm/hooks/useClickOutside/useClickOutside.js +1 -1
- package/dist/esm/hooks/useCopyToClipboard/useCopyToClipboard.js +2 -2
- package/dist/esm/hooks/useCounter/useCounter.js +2 -2
- package/dist/esm/hooks/useDebouncedValue/useDebouncedValue.js +2 -2
- package/dist/esm/hooks/useDefault/useDefault.js +2 -2
- package/dist/esm/hooks/useDidUpdate/useDidUpdate.js +1 -1
- package/dist/esm/hooks/useDocumentEvent/useDocumentEvent.js +1 -1
- package/dist/esm/hooks/useDocumentTitle/useDocumentTitle.js +2 -2
- package/dist/esm/hooks/useDocumentVisibility/useDocumentVisibility.js +1 -1
- package/dist/esm/hooks/useEvent/useEvent.js +1 -1
- package/dist/esm/hooks/useEventListener/useEventListener.js +1 -1
- package/dist/esm/hooks/useEyeDropper/useEyeDropper.js +2 -2
- package/dist/esm/hooks/useFavicon/useFavicon.js +2 -2
- package/dist/esm/hooks/useFps/useFps.js +2 -2
- package/dist/esm/hooks/useFullscreen/useFullscreen.js +2 -2
- package/dist/esm/hooks/useHash/useHash.js +2 -2
- package/dist/esm/hooks/useHotkeys/useHotkeys.js +2 -2
- package/dist/esm/hooks/useHover/useHover.js +2 -2
- package/dist/esm/hooks/useIdle/useIdle.js +2 -2
- package/dist/esm/hooks/useIntersectionObserver/useIntersectionObserver.js +2 -2
- package/dist/esm/hooks/useInterval/useInterval.js +2 -2
- package/dist/esm/hooks/useIsFirstRender/useIsFirstRender.js +1 -1
- package/dist/esm/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +1 -1
- package/dist/esm/hooks/useKeyPress/useKeyPress.js +2 -2
- package/dist/esm/hooks/useKeyPressEvent/useKeyPressEvent.js +1 -1
- package/dist/esm/hooks/useKeyboard/useKeyboard.js +1 -1
- package/dist/esm/hooks/useKeysPressed/useKeysPressed.js +2 -2
- package/dist/esm/hooks/useList/useList.js +2 -2
- package/dist/esm/hooks/useLocalStorage/useLocalStorage.js +2 -2
- package/dist/esm/hooks/useLogger/useLogger.js +2 -2
- package/dist/esm/hooks/useLongPress/useLongPress.js +2 -2
- package/dist/esm/hooks/useMediaQuery/useMediaQuery.js +1 -1
- package/dist/esm/hooks/useMount/useMount.js +1 -1
- package/dist/esm/hooks/useMouse/useMouse.js +2 -2
- package/dist/esm/hooks/useMutation/useMutation.js +2 -2
- package/dist/esm/hooks/useMutationObserver.js +1 -1
- package/dist/esm/hooks/useNetwork/useNetwork.js +2 -2
- package/dist/esm/hooks/useOnline/useOnline.js +1 -1
- package/dist/esm/hooks/useOperatingSystem/useOperatingSystem.js +1 -1
- package/dist/esm/hooks/useOrientation/useOrientation.js +2 -2
- package/dist/esm/hooks/usePageLeave/usePageLeave.js +2 -2
- package/dist/esm/hooks/usePaint/usePaint.js +2 -2
- package/dist/esm/hooks/usePreferredColorScheme/usePreferredColorScheme.js +1 -1
- package/dist/esm/hooks/usePreferredLanguages/usePreferredLanguages.js +1 -1
- package/dist/esm/hooks/usePrevious/usePrevious.js +1 -1
- package/dist/esm/hooks/useQRCode/useQRCode.js +3 -0
- package/dist/esm/hooks/useQRCode/useQRCode.js.map +1 -0
- package/dist/esm/hooks/useQuery/useQuery.js +2 -2
- package/dist/esm/hooks/useQueue/useQueue.js +2 -2
- package/dist/esm/hooks/useRenderCount/useRenderCount.js +1 -1
- package/dist/esm/hooks/useRenderInfo/useRenderInfo.js +3 -0
- package/dist/esm/hooks/useRenderInfo/useRenderInfo.js.map +1 -0
- package/dist/esm/hooks/useRerender/useRerender.js +2 -2
- package/dist/esm/hooks/useScript/useScript.js +2 -2
- package/dist/esm/hooks/useSessionStorage/useSessionStorage.js +2 -2
- package/dist/esm/hooks/useSet/useSet.js +2 -2
- package/dist/esm/hooks/useStep/useStep.js +2 -2
- package/dist/esm/hooks/useStorage/useStorage.js +2 -2
- package/dist/esm/hooks/useTextSelection/useTextSelection.js +2 -2
- package/dist/esm/hooks/useTime/useTime.js +2 -2
- package/dist/esm/hooks/useTimeout/useTimeout.js +2 -2
- package/dist/esm/hooks/useToggle/useToggle.js +2 -2
- package/dist/esm/hooks/useUnmount/useUnmount.js +1 -1
- package/dist/esm/hooks/useWebSocket/useWebSocket.js +3 -0
- package/dist/esm/hooks/useWebSocket/useWebSocket.js.map +1 -0
- package/dist/esm/hooks/useWindowEvent/useWindowEvent.js +1 -1
- package/dist/esm/hooks/useWindowSize/useWindowSize.js +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/utils/helpers/debounce.js +1 -1
- package/dist/esm/utils/helpers/getRetry.js +1 -1
- package/dist/esm/utils/helpers/index.js +1 -1
- package/dist/esm/utils/helpers/isClient.js +1 -1
- package/dist/esm/utils/helpers/throttle.js +1 -1
- package/dist/esm/utils/helpers/time/getDate.js +1 -1
- package/dist/index.d.ts +20 -1
- package/package.json +4 -1
- package/dist/cjs/_rollupPluginBabelHelpers-D94plMsx.js.map +0 -1
- package/dist/esm/_rollupPluginBabelHelpers-IRPAje5z.js.map +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{a as n,_ as e,b as t}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{a as n,_ as e,b as t}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import r from"react";var o=function(){var o,i="object"!==n(arguments.length<=0?void 0:arguments[0])||"current"in(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,l=i?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0],u=null===(o=null==l?void 0:l.enabled)||void 0===o||o,c=r.useState(),s=e(c,2),v=s[0],a=s[1],f=r.useRef(null),d=r.useRef();return d.current=null==l?void 0:l.onChange,r.useEffect((function(){if(u){var n,r=i?function(n){return"function"==typeof n?n():n instanceof Element?n:n.current}(i):f.current,o=new IntersectionObserver((function(n){var t,r=e(n,1)[0];a(r),null===(t=d.current)||void 0===t||t.call(d,r)}),t(t({},l),{},{root:(n=null==l?void 0:l.root,n?n instanceof Element||n instanceof Document?n:n.current:document)}));return o.observe(r),function(){o.disconnect()}}}),[i,null==l?void 0:l.rootMargin,null==l?void 0:l.threshold,u]),i?{entry:v,inView:!(null==v||!v.isIntersecting)}:{ref:f,entry:v,inView:!(null==v||!v.isIntersecting)}};export{o as useIntersectionObserver};
|
|
3
3
|
//# sourceMappingURL=useIntersectionObserver.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{a as e,_ as r}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{a as e,_ as r}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import t from"react";import{useEvent as n}from"../useEvent/useEvent.js";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";import"../../utils/helpers/isClient.js";var u=function(){for(var u,l,o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];var i=s[0],c=null!==(u="number"==typeof s[1]?s[1]:s[1].interval)&&void 0!==u?u:1e3,f="object"===e(s[1])?s[1]:s[2],v=null===(l=null==f?void 0:f.enabled)||void 0===l||l,p=t.useState(null==v||v),m=r(p,2),I=m[0],j=m[1],E=t.useRef(),b=n(i);t.useEffect((function(){if(v)return E.current=setInterval(b,c),function(){clearInterval(E.current)}}),[v,c]);return{isActive:I,pause:function(){j(!1),clearInterval(E.current)},resume:function(){c<=0||(j(!0),clearInterval(E.current),E.current=setInterval(b,c))}}};export{u as useInterval};
|
|
3
3
|
//# sourceMappingURL=useInterval.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
2
|
import r from"react";var e=function(){var e=r.useRef(!0);return!0===e.current?(e.current=!1,!0):e.current};export{e as useIsFirstRender};
|
|
3
3
|
//# sourceMappingURL=useIsFirstRender.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
2
|
import e from"react";import{isClient as t}from"../../utils/helpers/isClient.js";var r=t?e.useLayoutEffect:e.useEffect;export{r as useIsomorphicLayoutEffect};
|
|
3
3
|
//# sourceMappingURL=useIsomorphicLayoutEffect.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as e}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{_ as e}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import r from"react";import{useEventListener as t}from"../useEventListener/useEventListener.js";import"../useEvent/useEvent.js";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";import"../../utils/helpers/isClient.js";var i=function(i,o){var s,n,u=r.useState(!1),l=e(u,2),a=l[0],p=l[1];return t(null!==(s=null==o?void 0:o.target)&&void 0!==s?s:window,"keydown",(function(e){(Array.isArray(i)?i.includes(e.key):e.key===i)&&p(!0)})),t(null!==(n=null==o?void 0:o.target)&&void 0!==n?n:window,"keyup",(function(e){(Array.isArray(i)?i.includes(e.key):e.key===i)&&p(!1)})),a};export{i as useKeyPress};
|
|
3
3
|
//# sourceMappingURL=useKeyPress.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
2
|
import{useEventListener as e}from"../useEventListener/useEventListener.js";import"react";import"../useEvent/useEvent.js";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";import"../../utils/helpers/isClient.js";var t=function(){var t=Array.isArray(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:[arguments.length<=0?void 0:arguments[0]],n=(arguments.length<=1?void 0:arguments[1])instanceof Function?null:arguments.length<=1?void 0:arguments[1],i=n?arguments.length<=2?void 0:arguments[2]:arguments.length<=1?void 0:arguments[1];e(null!=n?n:window,"keydown",(function(e){t.includes(e.key)&&i(e)}),n?arguments.length<=3?void 0:arguments[3]:arguments.length<=2?void 0:arguments[2])};export{t as useKeyPressEvent};
|
|
3
3
|
//# sourceMappingURL=useKeyPressEvent.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
2
|
import{useEventListener as o}from"../useEventListener/useEventListener.js";import"react";import"../useEvent/useEvent.js";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";import"../../utils/helpers/isClient.js";var e=function(e){var n,t;o(null!==(n=null==e?void 0:e.target)&&void 0!==n?n:window,"keydown",(function(o){var n;return null==e||null===(n=e.onKeyDown)||void 0===n?void 0:n.call(e,o)})),o(null!==(t=null==e?void 0:e.target)&&void 0!==t?t:window,"keyup",(function(o){var n;return null==e||null===(n=e.onKeyUp)||void 0===n?void 0:n.call(e,o)}))};export{e as useKeyboard};
|
|
3
3
|
//# sourceMappingURL=useKeyboard.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as e,c as o}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{_ as e,c as o}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import t from"react";import{useDidUpdate as n}from"../useDidUpdate/useDidUpdate.js";import{useEventListener as r}from"../useEventListener/useEventListener.js";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";import"../../utils/helpers/isClient.js";import"../useEvent/useEvent.js";var i=function(i){var u,s,c,l=null===(u=null==i?void 0:i.enabled)||void 0===u||u,d=t.useState([]),f=e(d,2),p=f[0],a=f[1];return n((function(){a([])}),[l]),r(null!==(s=null==i?void 0:i.target)&&void 0!==s?s:window,"keydown",(function(e){l&&a((function(t){return t.some((function(o){return o.code===e.code}))?t:[].concat(o(t),[{key:e.key,code:e.code}])}))})),r(null!==(c=null==i?void 0:i.target)&&void 0!==c?c:window,"keyup",(function(e){l&&a((function(o){return o.filter((function(o){return o.code!==e.code}))}))})),p};export{i as useKeysPressed};
|
|
3
3
|
//# sourceMappingURL=useKeysPressed.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as n,c as t}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{_ as n,c as t}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import r from"react";var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],u=r.useState(e),c=n(u,2),o=c[0],i=c[1];return{value:o,set:function(n){return i(n)},push:function(n){return i((function(r){return[].concat(t(r),[n])}))},removeAt:function(n){return i((function(r){return[].concat(t(r.slice(0,n)),t(r.slice(n+1)))}))},insertAt:function(n,r){return i((function(e){return[].concat(t(e.slice(0,n)),[r],t(e.slice(n)))}))},updateAt:function(n,t){return i((function(r){return r.map((function(r,e){return e===n?t:r}))}))},clear:function(){return i([])},reset:function(){return i(e)}}};export{e as useList};
|
|
3
3
|
//# sourceMappingURL=useList.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{b as o}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{b as o}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import{useStorage as r}from"../useStorage/useStorage.js";import"react";import"../../utils/helpers/isClient.js";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";var e=function(e,t,i){return r(e,o({initialValue:t,storage:window.localStorage},i))};export{e as useLocalStorage};
|
|
3
3
|
//# sourceMappingURL=useLocalStorage.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{c as o}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{c as o}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import t from"react";import{useDidUpdate as e}from"../useDidUpdate/useDidUpdate.js";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";import"../../utils/helpers/isClient.js";var c=function(c,n){t.useEffect((function(){var t;return(t=console).log.apply(t,["".concat(c," mounted")].concat(o(n))),function(){return console.log("".concat(c," unmounted"))}}),[]),e((function(){var t;(t=console).log.apply(t,["".concat(c," updated")].concat(o(n)))}),n)};export{c as useLogger};
|
|
3
3
|
//# sourceMappingURL=useLogger.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as e}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{_ as e}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import n from"react";import{useEventListener as t}from"../useEventListener/useEventListener.js";import"../useEvent/useEvent.js";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";import"../../utils/helpers/isClient.js";var l=function(){var l=(arguments.length<=0?void 0:arguments[0])instanceof Function||!("current"in(arguments.length<=0?void 0:arguments[0]))||arguments.length<=0?void 0:arguments[0],u=l?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0],o=l?arguments.length<=2?void 0:arguments[2]:arguments.length<=1?void 0:arguments[1],r=n.useState(!1),i=e(r,2),s=i[0],c=i[1],v=n.useRef(null),a=n.useRef(),f=n.useRef(!1),d=function(e){var n,t;null==o||null===(n=o.onStart)||void 0===n||n.call(o,e),f.current=!0,a.current=setTimeout((function(){u(e),c(!0)}),null!==(t=null==o?void 0:o.threshold)&&void 0!==t?t:400)},h=function(e){var n;if(s)null==o||null===(n=o.onFinish)||void 0===n||n.call(o,e);else if(f.current){var t;null==o||null===(t=o.onCancel)||void 0===t||t.call(o,e)}c(!1),f.current=!1,a.current&&clearTimeout(a.current)};return t(null!=l?l:v,"mousedown",d),t(null!=l?l:v,"touchstart",d),t(null!=l?l:v,"mouseup",h),t(null!=l?l:v,"touchend",h),l?s:[v,s]};export{l as useLongPress};
|
|
3
3
|
//# sourceMappingURL=useLongPress.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
2
|
import n from"react";var e=function(){return!1},t=function(t){var r=n.useCallback((function(n){var e=window.matchMedia(t);return e.addEventListener("change",n),function(){e.removeEventListener("change",n)}}),[t]);return n.useSyncExternalStore(r,(function(){return window.matchMedia(t).matches}),e)};export{t as useMediaQuery};
|
|
3
3
|
//# sourceMappingURL=useMediaQuery.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as e,b as t}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{_ as e,b as t}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import n from"react";import{useIsomorphicLayoutEffect as o}from"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";import"../../utils/helpers/isClient.js";var r=function(){for(var r=arguments.length,i=new Array(r),u=0;u<r;u++)i[u]=arguments[u];var l=i[0],s=n.useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0}),m=e(s,2),f=m[0],a=m[1],c=n.useRef(null);return o((function(){var e=function(e){var n=l?function(e){return"function"==typeof e?e():e instanceof Element?e:e.current}(l):c.current;if(n){var o={x:e.pageX,y:e.pageY},r=n.getBoundingClientRect(),i=r.left,u=r.top,s=i+window.scrollX,m=u+window.scrollY,f=e.pageX-s,p=e.pageY-m;o.elementX=f,o.elementY=p,o.elementPositionX=s,o.elementPositionY=m,a((function(e){return t(t({},e),o)}))}};return document.addEventListener("mousemove",e),function(){document.removeEventListener("mousemove",e)}}),[]),l?f:t(t({},f),{},{ref:c})};export{r as useMouse};
|
|
3
3
|
//# sourceMappingURL=useMouse.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as r,e as t,f as e}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{_ as r,e as t,f as e}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import n from"react";import{getRetry as u}from"../../utils/helpers/getRetry.js";import"../../utils/helpers/isClient.js";var l=function(l,s){var a=n.useRef(null!=s&&s.retry?u(s.retry):0),o=n.useState(!1),i=r(o,2),c=i[0],f=i[1],p=n.useState(!1),m=r(p,2),v=m[0],y=m[1],S=n.useState(!1),h=r(S,2),d=h[0],g=h[1],j=n.useState(null),b=r(j,2),w=b[0],x=b[1],E=n.useState(null),R=r(E,2),_=R[0],k=R[1],A=function r(t){return f(!0),l(t).then((function(r){var t;return null==s||null===(t=s.onSuccess)||void 0===t||t.call(s,r),k(r),g(!0),f(!1),x(null),y(!1),r})).catch((function(e){var n;if(a.current>0)return a.current-=1,r(t);null==s||null===(n=s.onError)||void 0===n||n.call(s,e),k(null),g(!1),f(!1),x(e),y(!0),a.current=null!=s&&s.retry?u(s.retry):0}))},B=function(){var r=t(e().mark((function r(t){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",A(t));case 1:case"end":return r.stop()}}),r)})));return function(t){return r.apply(this,arguments)}}();return{data:_,error:w,mutate:function(r){A(r)},mutateAsync:B,isLoading:c,isError:v,isSuccess:d}};export{l as useMutation};
|
|
3
3
|
//# sourceMappingURL=useMutation.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
2
|
import r from"react";function e(e,n,t){var u=r.useRef(),c=r.useRef(null);return r.useEffect((function(){var r="function"==typeof t?t():t;return(r||c.current)&&(u.current=new MutationObserver(e),u.current.observe(r||c.current,n)),function(){var r;null===(r=u.current)||void 0===r||r.disconnect()}}),[e,n]),c}export{e as useMutationObserver};
|
|
3
3
|
//# sourceMappingURL=useMutationObserver.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as n}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{_ as n}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import e from"react";import{isClient as i}from"../../utils/helpers/isClient.js";var o=function(){var n,e,i;return(null===(n=navigator)||void 0===n?void 0:n.connection)||(null===(e=navigator)||void 0===e?void 0:e.mozConnection)||(null===(i=navigator)||void 0===i?void 0:i.webkitConnection)},t=function(){var t=e.useState((function(){if(!i)return{online:!1,type:void 0,effectiveType:void 0,saveData:!1,downlink:0,downlinkMax:0,rtt:0};var n=navigator.onLine,e=o();return{online:n,downlink:null==e?void 0:e.downlink,downlinkMax:null==e?void 0:e.downlinkMax,effectiveType:null==e?void 0:e.effectiveType,rtt:null==e?void 0:e.rtt,saveData:null==e?void 0:e.saveData,type:null==e?void 0:e.type}})),l=n(t,2),v=l[0],a=l[1];return e.useEffect((function(){var n=function(){var n=navigator.onLine,e=o();a({online:n,downlink:null==e?void 0:e.downlink,downlinkMax:null==e?void 0:e.downlinkMax,effectiveType:null==e?void 0:e.effectiveType,rtt:null==e?void 0:e.rtt,saveData:null==e?void 0:e.saveData,type:null==e?void 0:e.type})};window.addEventListener("online",n,{passive:!0}),window.addEventListener("offline",n,{passive:!0});var e=o();return e&&e.addEventListener("change",n,{passive:!0}),function(){window.removeEventListener("online",n),window.removeEventListener("offline",n),e&&e.removeEventListener("change",n)}})),v};export{o as getConnection,t as useNetwork};
|
|
3
3
|
//# sourceMappingURL=useNetwork.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
2
|
import n from"react";var e=function(){return navigator.onLine},t=function(){return!1},r=function(n){return window.addEventListener("online",n),window.addEventListener("offline",n),function(){window.removeEventListener("online",n),window.removeEventListener("offline",n)}},o=function(){return n.useSyncExternalStore(r,e,t)};export{o as useOnline};
|
|
3
3
|
//# sourceMappingURL=useOnline.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
2
|
import n from"react";var i=function(){if("undefined"==typeof window)return"undetermined";var n=window.navigator.userAgent;return/(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)/i.test(n)?"macos":/(iPhone)|(iPad)|(iPod)/i.test(n)?"ios":/(Win32)|(Win64)|(Windows)|(WinCE)/i.test(n)?"windows":/Android/i.test(n)?"android":/Linux/i.test(n)?"linux":"undetermined"},e=function(){return n.useRef(i()).current};export{i as getOperatingSystem,e as useOperatingSystem};
|
|
3
3
|
//# sourceMappingURL=useOperatingSystem.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as e}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{_ as e}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import n from"react";import{useIsomorphicLayoutEffect as r}from"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";import"../../utils/helpers/isClient.js";var t=function(){var t=n.useState({angle:0,type:"landscape-primary"}),o=e(t,2),i=o[0],a=o[1];return r((function(){var e,n=function(){var e=window.screen.orientation,n=e.angle,r=e.type;a({angle:n,type:r})};return null===(e=window.screen.orientation)||void 0===e||e.addEventListener("change",n),function(){var e;return null===(e=window.screen.orientation)||void 0===e?void 0:e.removeEventListener("change",n)}}),[]),i};export{t as useOrientation};
|
|
3
3
|
//# sourceMappingURL=useOrientation.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as e}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{_ as e}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import t from"react";import{useEvent as r}from"../useEvent/useEvent.js";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";import"../../utils/helpers/isClient.js";var n=function(n){var o=t.useState(!1),s=e(o,2),u=s[0],i=s[1],m=r((function(){if(u)return i(!1);null==n||n(),i(!0)}));return t.useEffect((function(){return document.addEventListener("mouseleave",m,{passive:!0}),document.addEventListener("mouseenter",m,{passive:!0}),function(){document.removeEventListener("mouseenter",m),document.removeEventListener("mouseleave",m)}}),[]),u};export{n as usePageLeave};
|
|
3
3
|
//# sourceMappingURL=usePageLeave.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{a as e,_ as t,b as n}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{a as e,_ as t,b as n}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import r from"react";import{useEvent as o}from"../useEvent/useEvent.js";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";import"../../utils/helpers/isClient.js";var u=function(e){return"function"==typeof e?e():e instanceof Element?e:e.current},i=function(){var i,c,s,l="object"!==e(arguments.length<=0?void 0:arguments[0])||"current"in(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,f=l?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0],d=r.useState(!1),v=t(d,2),a=v[0],m=v[1],p=r.useRef(null),h=r.useRef(null),E=r.useState({width:null!==(i=null==f?void 0:f.width)&&void 0!==i?i:5,color:null!==(c=null==f?void 0:f.color)&&void 0!==c?c:"black",opacity:null!==(s=null==f?void 0:f.opacity)&&void 0!==s?s:.1}),g=t(E,2),w=g[0],L=g[1],y=o((function(e){a&&h.current&&(h.current.lineTo(e.offsetX,e.offsetY),h.current.stroke())}));return r.useEffect((function(){var e=l?u(l):p.current;if(e){h.current=e.getContext("2d");var t=function(e){h.current&&(h.current.beginPath(),h.current.moveTo(e.offsetX,e.offsetY),m(!0))},n=function(){h.current&&(h.current.closePath(),m(!1))};return e.addEventListener("mousedown",t),e.addEventListener("mousemove",y),e.addEventListener("mouseup",n),function(){e&&(e.removeEventListener("mousedown",t),e.removeEventListener("mousemove",y),e.removeEventListener("mouseup",n))}}}),[]),r.useEffect((function(){h.current&&(h.current.strokeStyle=w.color,h.current.lineWidth=w.width,h.current.lineCap="round",h.current.lineJoin="round")}),[w.color,w.width,w.opacity]),l?{pencil:n(n({},w),{},{set:L}),drawing:a}:{pencil:n(n({},w),{},{set:L}),ref:p,drawing:a}};export{u as getTargetElement,i as usePaint};
|
|
3
3
|
//# sourceMappingURL=usePaint.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
2
|
import{useMediaQuery as e}from"../useMediaQuery/useMediaQuery.js";import"react";var r=function(){var r=e("(prefers-color-scheme: light)"),o=e("(prefers-color-scheme: dark)");return r?"light":o?"dark":"no-preference"};export{r as usePreferredColorScheme};
|
|
3
3
|
//# sourceMappingURL=usePreferredColorScheme.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
2
|
import n from"react";var e=function(){return window.navigator.languages},r=function(){return[]},t=function(n){return window.addEventListener("languagechange",n),function(){window.removeEventListener("languagechange",n)}},a=function(){return n.useSyncExternalStore(t,e,r)};export{a as usePreferredLanguages};
|
|
3
3
|
//# sourceMappingURL=usePreferredLanguages.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
2
|
import r from"react";var e=function(e){var t=r.useRef();return r.useEffect((function(){t.current=e})),t.current};export{e as usePrevious};
|
|
3
3
|
//# sourceMappingURL=usePrevious.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{_ as t,e as r,f as e}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import o from"react";import n from"qrcode";import{useIsomorphicLayoutEffect as s}from"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";import"../../utils/helpers/isClient.js";var a=function(a,u){var i=o.useState(!1),c=t(i,2),f=c[0],p=c[1],m=o.useState(),l=t(m,2),v=l[0],h=l[1],L=function(){var t=r(e().mark((function t(r){var o;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return p(!0),t.next=3,n.toDataURL(r,u);case 3:o=t.sent,h(o);case 5:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}();s((function(){a&&L(a)}),[]);return{value:v,set:function(t){return L(t)},isLoading:f}};export{a as useQRCode};
|
|
3
|
+
//# sourceMappingURL=useQRCode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useQRCode.js","sources":["../../../../src/hooks/useQRCode/useQRCode.ts"],"sourcesContent":["import React from 'react';\nimport QRCode from 'qrcode';\n\nimport { useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect';\n\n/**\n * @name useQRCode\n * @description - Hook that generates a QR code\n *\n * @param {string} text The text to be encoded in the QR code\n * @param {QRCode.QRCodeToDataURLOptions} [options] The options of the QR code\n * @returns {UseQrCodeReturn} An object with the QR code value and a setter\n *\n * @example\n * const { value, set } = useQRCode('url');\n */\nexport const useQRCode = (text?: string, options?: QRCode.QRCodeToDataURLOptions) => {\n const [isLoading, setIsLoading] = React.useState(false);\n const [value, setValue] = React.useState<string | undefined>();\n\n const generateQrCode = async (value: string) => {\n setIsLoading(true);\n const qrCode = await QRCode.toDataURL(value, options);\n setValue(qrCode);\n };\n\n useIsomorphicLayoutEffect(() => {\n if (text) generateQrCode(text);\n }, []);\n\n const set = (value: string) => generateQrCode(value);\n\n return { value, set, isLoading };\n};\n"],"names":["useQRCode","text","options","_React$useState","React","useState","_React$useState2","_slicedToArray","isLoading","setIsLoading","_React$useState3","_React$useState4","value","setValue","generateQrCode","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","qrCode","wrap","_context","prev","next","QRCode","toDataURL","sent","stop","_x","apply","this","arguments","useIsomorphicLayoutEffect","set"],"mappings":";uQAgBO,IAAMA,EAAY,SAACC,EAAeC,GACvC,IAAAC,EAAkCC,EAAMC,UAAS,GAAMC,EAAAC,EAAAJ,EAAA,GAAhDK,EAASF,EAAA,GAAEG,EAAYH,EAAA,GAC9BI,EAA0BN,EAAMC,WAA8BM,EAAAJ,EAAAG,EAAA,GAAvDE,EAAKD,EAAA,GAAEE,EAAQF,EAAA,GAEhBG,EAAc,WAAA,IAAAC,EAAAC,EAAAC,IAAAC,MAAG,SAAAC,EAAOP,GAAa,IAAAQ,EAAA,OAAAH,IAAAI,MAAA,SAAAC,GAAA,cAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EACtB,OAAnBf,GAAa,GAAMa,EAAAE,KAAA,EACEC,EAAOC,UAAUd,EAAOV,GAAQ,KAAA,EAA/CkB,EAAME,EAAAK,KACZd,EAASO,GAAQ,KAAA,EAAA,IAAA,MAAA,OAAAE,EAAAM,OAAA,GAAAT,EAClB,KAAA,OAJKL,SAAce,GAAA,OAAAd,EAAAe,MAAAC,KAAAC,UAAA,EAAA,GAMpBC,GAA0B,WACpBhC,GAAMa,EAAeb,EAC1B,GAAE,IAIH,MAAO,CAAEW,MAAAA,EAAOsB,IAFJ,SAACtB,GAAa,OAAKE,EAAeF,EAAM,EAE/BJ,UAAAA,EACvB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as e}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{_ as e}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import t from"react";import{getRetry as l}from"../../utils/helpers/getRetry.js";import"../../utils/helpers/isClient.js";var r=function(r,n){var i,u=t.useRef(null!=n&&n.retry?l(n.retry):0),a=t.useState(!1),o=e(a,2),c=o[0],s=o[1],f=t.useState(!1),d=e(f,2),v=d[0],h=d[1],p=t.useState(!1),S=e(p,2),m=S[0],y=S[1],D=t.useState(!(null==n||!n.initialData)),g=e(D,2),j=g[0],E=g[1],R=t.useState(void 0),_=e(R,2),b=_[0],k=_[1],x=t.useState(null==n?void 0:n.initialData),B=e(x,2),C=B[0],F=B[1],H=function e(t){s(!0),"refetch"===t&&y(!0),r().then((function(e){var l,r=null!=n&&n.select?null==n?void 0:n.select(e):e;null==n||null===(l=n.onSuccess)||void 0===l||l.call(n,r),F(r),E(!0),s(!1),k(void 0),h(!1),"refetch"===t&&y(!1)})).catch((function(r){var i;if(u.current>0)return u.current-=1,e(t);null==n||null===(i=n.onError)||void 0===i||i.call(n,r),F(void 0),E(!1),s(!1),k(r),h(!0),"refetch"===t&&y(!1),u.current=null!=n&&n.retry?l(n.retry):0}))};t.useEffect((function(){null!=n&&n.initialData||H("init")}),null!==(i=null==n?void 0:n.keys)&&void 0!==i?i:[]);var L=(null==n?void 0:n.placeholderData)instanceof Function?null==n?void 0:n.placeholderData():null==n?void 0:n.placeholderData;return{data:null!=C?C:L,error:b,refetch:function(){return H("refetch")},isLoading:c,isError:v,isSuccess:j,isRefetching:m}};export{r as useQuery};
|
|
3
3
|
//# sourceMappingURL=useQuery.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as r,c as t,d as n}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{_ as r,c as t,d as n}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import e from"react";import{flushSync as o}from"react-dom";var u=function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],a=e.useState(u),i=r(a,2),c=i[0],f=i[1];return{add:function(r){return f((function(n){return[].concat(t(n),[r])}))},remove:function(){var r;return o((function(){f((function(t){var e=n(t),o=e[0],u=e.slice(1);return r=o,u}))})),r},clear:function(){return f([])},first:c[0],last:c[c.length-1],size:c.length,queue:c}};export{u as useQueue};
|
|
3
3
|
//# sourceMappingURL=useQueue.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
2
|
import r from"react";var e=function(){var e=r.useRef(0);return r.useEffect((function(){e.current+=1})),e.current};export{e as useRenderCount};
|
|
3
3
|
//# sourceMappingURL=useRenderCount.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import e from"react";var n=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Unknown",r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=e.useRef({component:n,renders:0,timestamp:Date.now(),sinceLast:0}),c=Date.now();return t.current.renders+=1,t.current.sinceLast=t.current.timestamp?c-t.current.timestamp:0,t.current.timestamp=c,r&&(console.group("".concat(n," info, render number: ").concat(t.current.renders)),console.log("Timestamp: ".concat(t.current.timestamp)),console.log("Since last render: ".concat(t.current.sinceLast)),console.log("Renders: ".concat(t.current.renders)),console.dir(t.current),console.groupEnd()),t.current};export{n as useRenderInfo};
|
|
3
|
+
//# sourceMappingURL=useRenderInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRenderInfo.js","sources":["../../../../src/hooks/useRenderInfo/useRenderInfo.ts"],"sourcesContent":["import React from 'react';\n\nexport interface UseRenderInfoReturn {\n component: string;\n renders: number;\n timestamp: null | number;\n sinceLast: number;\n}\n\n/**\n * @name useRenderInfo\n * @description - Hook for getting information about component rerender\n *\n * @param {string} [name='Unknown'] Component name\n * @param {boolean} [log=true] Toggle logging\n * @returns {UseRenderInfoReturn} An object containing rerender information\n *\n * @example\n * const rerenderInfo = useRenderInfo('Component');\n */\nexport const useRenderInfo = (name: string = 'Unknown', log: boolean = true) => {\n const renderInfoRef = React.useRef<UseRenderInfoReturn>({\n component: name,\n renders: 0,\n timestamp: Date.now(),\n sinceLast: 0\n });\n const now = Date.now();\n\n renderInfoRef.current.renders += 1;\n renderInfoRef.current.sinceLast = renderInfoRef.current.timestamp\n ? now - renderInfoRef.current.timestamp\n : 0;\n renderInfoRef.current.timestamp = now;\n\n if (log) {\n console.group(`${name} info, render number: ${renderInfoRef.current.renders}`);\n console.log(`Timestamp: ${renderInfoRef.current.timestamp}`);\n console.log(`Since last render: ${renderInfoRef.current.sinceLast}`);\n console.log(`Renders: ${renderInfoRef.current.renders}`);\n console.dir(renderInfoRef.current);\n console.groupEnd();\n }\n\n return renderInfoRef.current;\n};\n"],"names":["useRenderInfo","name","arguments","length","undefined","log","renderInfoRef","React","useRef","component","renders","timestamp","Date","now","sinceLast","current","console","group","concat","dir","groupEnd"],"mappings":";yBAoBaA,EAAgB,WAAmD,IAAlDC,EAAYC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,UAAWG,IAAYH,UAAAC,OAAA,QAAAC,IAAAF,UAAA,KAAAA,UAAA,GAC5DI,EAAgBC,EAAMC,OAA4B,CACtDC,UAAWR,EACXS,QAAS,EACTC,UAAWC,KAAKC,MAChBC,UAAW,IAEPD,EAAMD,KAAKC,MAiBjB,OAfAP,EAAcS,QAAQL,SAAW,EACjCJ,EAAcS,QAAQD,UAAYR,EAAcS,QAAQJ,UACpDE,EAAMP,EAAcS,QAAQJ,UAC5B,EACJL,EAAcS,QAAQJ,UAAYE,EAE9BR,IACFW,QAAQC,MAAKC,GAAAA,OAAIjB,EAAI,0BAAAiB,OAAyBZ,EAAcS,QAAQL,UACpEM,QAAQX,IAAG,cAAAa,OAAeZ,EAAcS,QAAQJ,YAChDK,QAAQX,IAAG,sBAAAa,OAAuBZ,EAAcS,QAAQD,YACxDE,QAAQX,IAAG,YAAAa,OAAaZ,EAAcS,QAAQL,UAC9CM,QAAQG,IAAIb,EAAcS,SAC1BC,QAAQI,YAGHd,EAAcS,OACvB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as r}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{_ as r}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import t from"react";var e=function(){var e=t.useId(),o=t.useState(e),a=r(o,2),n=a[0],u=a[1];return{id:n,update:function(){return u(Math.random().toString())}}};export{e as useRerender};
|
|
3
3
|
//# sourceMappingURL=useRerender.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as e}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{_ as e}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import t from"react";var r="script-status",n=function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.useState((function(){var e=document.querySelector('script[src="'.concat(n,'"]')),t=null==e?void 0:e.getAttribute(r);return t||(e?"unknown":"loading")})),u=e(i,2),c=u[0],a=u[1],s=o.removeOnUnmount,d=void 0===s||s,v=o.async,l=void 0===v||v;return t.useEffect((function(){var t=document.querySelector('script[src="'.concat(n,'"]')),i=null==t?void 0:t.getAttribute(r);if(i)return a(i);if(t)return a("unknown");var u=document.createElement("script");u.src=n,u.async=l;for(var c=0,s=Object.entries(o);c<s.length;c++){var v=e(s[c],2),m=v[0],f=v[1];u.setAttribute(m,String(f))}u.setAttribute(r,"loading"),document.body.appendChild(u);var p=function(){u.setAttribute(r,"ready"),a("ready")},b=function(){u.setAttribute(r,"error"),a("error")};return u.addEventListener("load",p),u.addEventListener("error",b),function(){d&&(u.remove(),u.removeEventListener("load",p),u.removeEventListener("error",b))}}),[n,d]),c};export{r as SCRIPT_STATUS_ATTRIBUTE_NAME,n as useScript};
|
|
3
3
|
//# sourceMappingURL=useScript.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{b as o}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{b as o}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import{useStorage as e}from"../useStorage/useStorage.js";import"react";import"../../utils/helpers/isClient.js";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";var r=function(r,t,s){return e(r,o({initialValue:t,storage:window.sessionStorage},s))};export{r as useSessionStorage};
|
|
3
3
|
//# sourceMappingURL=useSessionStorage.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as e}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{_ as e}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import n from"react";var r=function(r){var t=n.useState(new Set(r)),u=e(t,2),i=u[0],f=u[1];return{value:i,size:i.size,has:function(e){return i.has(e)},add:function(e){return f((function(n){return new Set(n).add(e)}))},remove:function(e){return f((function(n){if(!n.has(e))return n;var r=new Set(n);return r.delete(e),r}))},clear:function(){return f(new Set)},reset:function(){return f(new Set(r))},toggle:function(e){return f((function(n){if(!n.has(e))return new Set(n).add(e);var r=new Set(n);return r.delete(e),r}))},union:function(e){return f(i.union(e))},difference:function(e){return f(i.difference(e))},symmetricDifference:function(e){return f(i.symmetricDifference(e))},intersection:function(e){return f(i.intersection(e))}}};export{r as useSet};
|
|
3
3
|
//# sourceMappingURL=useSet.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{a as t,_ as r}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{a as t,_ as r}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import n from"react";var e=function(e){var u="object"===t(e)?e.max:e,i="object"===t(e)?e.initial:1,o=n.useRef(i>u||i<1?1:i),c=n.useState(i),s=r(c,2),a=s[0],f=s[1],l=1===a,p=a===u;return{counts:u,currentStep:a,isFirst:l,isLast:p,next:function(){p||f((function(t){return t+1}))},back:function(){l||f((function(t){return t-1}))},reset:function(){return f(o.current)},set:function(t){return"first"===t?f(o.current):"last"===t||t>=u?f(u):t<=1?f(1):void f(t)}}};export{e as useStep};
|
|
3
3
|
//# sourceMappingURL=useStep.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{a as e}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{a as e}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import n from"react";import{isClient as t}from"../../utils/helpers/isClient.js";import{useIsomorphicLayoutEffect as r}from"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";var i=function(e){return window.dispatchEvent(new StorageEvent("storage",e))},o=function(e,n,t){var r=e.getItem(n);e.setItem(n,t),i({key:n,oldValue:r,newValue:t,storageArea:e})},u=function(e,n){var t=e.getItem(n);e.removeItem(n),i({key:n,oldValue:t,newValue:null,storageArea:e})},a=function(e,n){var t=e.getItem(n);if(t)return t},l=function(e){return window.addEventListener("storage",e),function(){return window.removeEventListener("storage",e)}},s=function(){},f=function(i,f){var c,d="object"===e(f)?f:void 0,v=d?null==d?void 0:d.initialValue:f,m=null!==(c=null==d?void 0:d.storage)&&void 0!==c?c:window.localStorage,g=function(e){return null!=d&&d.serializer?d.serializer(e):JSON.stringify(e)},p=n.useSyncExternalStore(l,(function(){return a(m,i)}),s),w=function(e){if(null===e)return u(m,i);o(m,i,g(e))};r((function(){(void 0===a(m,i)||v)&&o(m,i,g(v instanceof Function?v():v))}),[i]);var y=function(){return u(m,i)};return t?[p?function(e){if(null!=d&&d.deserializer)return d.deserializer(e);if("undefined"!==e)try{return JSON.parse(e)}catch(n){return e}}(p):void 0,w,y]:[v instanceof Function?v():v,w,y]};export{i as dispatchStorageEvent,f as useStorage};
|
|
3
3
|
//# sourceMappingURL=useStorage.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as e}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{_ as e}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import n from"react";import{isClient as t}from"../../utils/helpers/isClient.js";import{useRerender as r}from"../useRerender/useRerender.js";var o=function(e){var n,t=null!==(n=e.rangeCount)&&void 0!==n?n:0;return Array.from({length:t},(function(n,t){return e.getRangeAt(t)}))},u=function(){var u,i=r(),l=n.useState(t?document.getSelection():null),c=e(l,2),s=c[0],a=c[1];n.useEffect((function(){var e=function(){a(document.getSelection()),i.update()};return document.addEventListener("selectionchange",e),function(){return document.removeEventListener("selectionchange",e)}}),[]);var m=null!==(u=null==s?void 0:s.toString())&&void 0!==u?u:"",f=s?o(s):[],d=f.map((function(e){return e.getBoundingClientRect()}));return{text:m,ranges:f,rects:d,selection:s}};export{o as getRangesSelection,u as useTextSelection};
|
|
3
3
|
//# sourceMappingURL=useTextSelection.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as e}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{_ as e}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import t from"react";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";import"../../utils/helpers/isClient.js";import{getDate as r}from"../../utils/helpers/time/getDate.js";import"screenfull";import{useInterval as o}from"../useInterval/useInterval.js";import"react-dom";import"../useEvent/useEvent.js";var s=function(){var s=t.useState(r()),i=e(s,2),u=i[0],m=i[1];return o((function(){return m(r())}),1e3),u};export{s as useTime};
|
|
3
3
|
//# sourceMappingURL=useTime.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as e}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{_ as e}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import t from"react";import{useEvent as r}from"../useEvent/useEvent.js";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";import"../../utils/helpers/isClient.js";function u(u,o){var i=t.useState(!1),n=e(i,2),s=n[0],c=n[1],f=t.useRef(),m=r(u);t.useEffect((function(){return f.current=setTimeout((function(){m(),c(!0)}),o),function(){clearTimeout(f.current)}}),[o]);return{ready:s,clear:function(){clearTimeout(f.current),c(!0)}}}export{u as useTimeout};
|
|
3
3
|
//# sourceMappingURL=useTimeout.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as r}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{_ as r}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import e from"react";var n=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[!1,!0],t=e.useReducer((function(r,e){var n=e instanceof Function?e(r[0]):e,t=Math.abs(r.indexOf(n));return r.slice(t).concat(r.slice(0,t))}),n),o=r(t,2);return[r(o[0],1)[0],o[1]]};export{n as useToggle};
|
|
3
3
|
//# sourceMappingURL=useToggle.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
2
|
import r from"react";var t=function(t){var e=r.useRef(t);e.current=t,r.useEffect((function(){return function(){e.current()}}),[])};export{t as useUnmount};
|
|
3
3
|
//# sourceMappingURL=useUnmount.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{_ as n}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import e from"react";import{getRetry as r}from"../../utils/helpers/getRetry.js";import"../../utils/helpers/isClient.js";import{useEvent as t}from"../useEvent/useEvent.js";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";var o=function(o,u){var c=e.useRef(),l=e.useRef(null!=u&&u.retry?r(u.retry):0),i=e.useRef(!1),s=e.useState("connecting"),f=n(s,2),a=f[0],v=f[1],d=t((function(){c.current=new WebSocket("function"==typeof o?o():o,null==u?void 0:u.protocols),v("connecting");var n=c.current;n&&(n.onopen=function(){var e;v("connected"),null==u||null===(e=u.onConnected)||void 0===e||e.call(u,n)},n.onerror=function(e){var r;v("failed"),null==u||null===(r=u.onError)||void 0===r||r.call(u,e,n)},n.onmessage=function(e){var r;return null==u||null===(r=u.onMessage)||void 0===r?void 0:r.call(u,e,n)},n.onclose=function(e){var t;if(v("disconnected"),null==u||null===(t=u.onDisconnected)||void 0===t||t.call(u,e,n),!i.current)return l.current>0?(l.current-=1,d()):void(l.current=null!=u&&u.retry?r(u.retry):0)})}));e.useEffect((function(){return d(),function(){c.current&&(c.current.close(),c.current=void 0)}}),[o]);return{client:c.current,close:function(){var n;i.current=!0,null===(n=c.current)||void 0===n||n.close()},open:function(){i.current=!1,d()},send:function(n){var e;return null===(e=c.current)||void 0===e?void 0:e.send(n)},status:a}};export{o as useWebSocket};
|
|
3
|
+
//# sourceMappingURL=useWebSocket.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWebSocket.js","sources":["../../../../src/hooks/useWebSocket/useWebSocket.ts"],"sourcesContent":["import React from 'react';\n\nimport { getRetry } from '@/utils/helpers';\n\nimport { useEvent } from '../useEvent/useEvent';\n\nexport type UseWebSocketUrl = string | (() => string);\n\nexport interface UseWebSocketOptions {\n onConnected?: (webSocket: WebSocket) => void;\n onDisconnected?: (event: CloseEvent, webSocket: WebSocket) => void;\n onError?: (event: Event, webSocket: WebSocket) => void;\n onMessage?: (event: MessageEvent, webSocket: WebSocket) => void;\n retry?: boolean | number;\n protocols?: Array<'soap' | 'wasm'>;\n}\n\nexport type UseWebSocketStatus = 'connecting' | 'failed' | 'connected' | 'disconnected';\n\nexport interface UseWebSocketReturn {\n status: UseWebSocketStatus;\n close: WebSocket['close'];\n send: WebSocket['send'];\n open: () => void;\n client?: WebSocket;\n}\n\n/**\n * @name useWebSocket\n * @description - Hook that connects to a WebSocket server and handles incoming and outgoing messages\n *\n * @param {UseWebSocketUrl} url The URL of the WebSocket server\n * @param {(webSocket: WebSocket) => void} [options.onConnected] The callback function that is called when the WebSocket connection is established\n * @param {(event: CloseEvent, webSocket: WebSocket) => void} [options.onDisconnected] The callback function that is called when the WebSocket connection is closed\n * @param {(event: Event, webSocket: WebSocket) => void} [options.onError] The callback function that is called when an error occurs\n * @param {(event: MessageEvent, webSocket: WebSocket) => void} [options.onMessage] The callback function that is called when a message is received\n * @param {boolean | number} [options.retry] The number of times to retry the connection\n * @param {Array<'soap' | 'wasm'>} [options.protocols] The list of protocols to use\n * @returns {UseWebSocketReturn} An object with the status, close, send, open, and ws properties\n *\n * @example\n * const { status, close, send, open, client } = useWebSocket('url');\n */\nexport const useWebSocket = (\n url: UseWebSocketUrl,\n options?: UseWebSocketOptions\n): UseWebSocketReturn => {\n const webSocketRef = React.useRef<WebSocket>();\n const retryCountRef = React.useRef(options?.retry ? getRetry(options.retry) : 0);\n const explicityCloseRef = React.useRef(false);\n\n const [status, setStatus] = React.useState<UseWebSocketStatus>('connecting');\n\n const send = (data: string | Blob | ArrayBufferLike | ArrayBufferView) =>\n webSocketRef.current?.send(data);\n\n const close = () => {\n explicityCloseRef.current = true;\n webSocketRef.current?.close();\n };\n\n const init = useEvent(() => {\n webSocketRef.current = new WebSocket(\n typeof url === 'function' ? url() : url,\n options?.protocols\n );\n setStatus('connecting');\n\n const webSocket = webSocketRef.current;\n if (!webSocket) return;\n\n webSocket.onopen = () => {\n setStatus('connected');\n options?.onConnected?.(webSocket);\n };\n\n webSocket.onerror = (event) => {\n setStatus('failed');\n options?.onError?.(event, webSocket);\n };\n\n webSocket.onmessage = (event) => options?.onMessage?.(event, webSocket);\n\n webSocket.onclose = (event) => {\n setStatus('disconnected');\n options?.onDisconnected?.(event, webSocket);\n if (explicityCloseRef.current) return;\n\n if (retryCountRef.current > 0) {\n retryCountRef.current -= 1;\n return init();\n }\n retryCountRef.current = options?.retry ? getRetry(options.retry) : 0;\n };\n });\n\n React.useEffect(() => {\n init();\n\n return () => {\n if (!webSocketRef.current) return;\n webSocketRef.current.close();\n webSocketRef.current = undefined;\n };\n }, [url]);\n\n const open = () => {\n explicityCloseRef.current = false;\n init();\n };\n\n return { client: webSocketRef.current, close, open, send, status };\n};\n"],"names":["useWebSocket","url","options","webSocketRef","React","useRef","retryCountRef","retry","getRetry","explicityCloseRef","_React$useState","useState","_React$useState2","_slicedToArray","status","setStatus","init","useEvent","current","WebSocket","protocols","webSocket","onopen","_options$onConnected","onConnected","call","onerror","event","_options$onError","onError","onmessage","_options$onMessage","onMessage","onclose","_options$onDisconnect","onDisconnected","useEffect","close","undefined","client","_webSocketRef$current2","open","send","data","_webSocketRef$current"],"mappings":";6SA2CO,IAAMA,EAAe,SAC1BC,EACAC,GAEA,IAAMC,EAAeC,EAAMC,SACrBC,EAAgBF,EAAMC,OAAOH,SAAAA,EAASK,MAAQC,EAASN,EAAQK,OAAS,GACxEE,EAAoBL,EAAMC,QAAO,GAEvCK,EAA4BN,EAAMO,SAA6B,cAAaC,EAAAC,EAAAH,EAAA,GAArEI,EAAMF,EAAA,GAAEG,EAASH,EAAA,GAUlBI,EAAOC,GAAS,WACpBd,EAAae,QAAU,IAAIC,UACV,mBAARlB,EAAqBA,IAAQA,EACpCC,aAAAA,EAAAA,EAASkB,WAEXL,EAAU,cAEV,IAAMM,EAAYlB,EAAae,QAC1BG,IAELA,EAAUC,OAAS,WAAM,IAAAC,EACvBR,EAAU,aACVb,SAAoB,QAAbqB,EAAPrB,EAASsB,mBAAW,IAAAD,GAApBA,EAAAE,KAAAvB,EAAuBmB,IAGzBA,EAAUK,QAAU,SAACC,GAAU,IAAAC,EAC7Bb,EAAU,UACVb,SAAgB0B,QAATA,EAAP1B,EAAS2B,mBAAOD,GAAhBA,EAAAH,KAAAvB,EAAmByB,EAAON,IAG5BA,EAAUS,UAAY,SAACH,GAAK,IAAAI,EAAA,OAAK7B,SAAkB,QAAX6B,EAAP7B,EAAS8B,iBAATD,IAAkBA,OAAlBA,EAAAA,EAAAN,KAAAvB,EAAqByB,EAAON,EAAU,EAEvEA,EAAUY,QAAU,SAACN,GAAU,IAAAO,EAG7B,GAFAnB,EAAU,gBACVb,SAAuBgC,QAAhBA,EAAPhC,EAASiC,0BAAcD,GAAvBA,EAAAT,KAAAvB,EAA0ByB,EAAON,IAC7BZ,EAAkBS,QAEtB,OAAIZ,EAAcY,QAAU,GAC1BZ,EAAcY,SAAW,EAClBF,UAETV,EAAcY,QAAUhB,SAAAA,EAASK,MAAQC,EAASN,EAAQK,OAAS,IAEvE,IAEAH,EAAMgC,WAAU,WAGd,OAFApB,IAEO,WACAb,EAAae,UAClBf,EAAae,QAAQmB,QACrBlC,EAAae,aAAUoB,GAE3B,GAAG,CAACrC,IAOJ,MAAO,CAAEsC,OAAQpC,EAAae,QAASmB,MAvDzB,WAAM,IAAAG,EAClB/B,EAAkBS,SAAU,EACR,QAApBsB,EAAArC,EAAae,eAAO,IAAAsB,GAApBA,EAAsBH,SAqDsBI,KALjC,WACXhC,EAAkBS,SAAU,EAC5BF,KAGkD0B,KA1DvC,SAACC,GAAuD,IAAAC,EAAA,OAC/C,QAD+CA,EACnEzC,EAAae,eAAO,IAAA0B,OAAA,EAApBA,EAAsBF,KAAKC,EAAK,EAyDwB7B,OAAAA,EAC5D"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
2
|
import{useEventListener as e}from"../useEventListener/useEventListener.js";import"react";import"../useEvent/useEvent.js";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";import"../../utils/helpers/isClient.js";var t=function(t,s,r){return e(window,t,s,r)};export{t as useWindowEvent};
|
|
3
3
|
//# sourceMappingURL=useWindowEvent.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as i}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
import{_ as i}from"../../_rollupPluginBabelHelpers-DsV9C8-q.js";import e from"react";import{isClient as n}from"../../utils/helpers/isClient.js";var t=function(t){var r,o,d=e.useState({width:n?window.innerWidth:null!==(r=null==t?void 0:t.initialWidth)&&void 0!==r?r:Number.POSITIVE_INFINITY,height:n?window.innerHeight:null!==(o=null==t?void 0:t.initialWidth)&&void 0!==o?o:Number.POSITIVE_INFINITY}),l=i(d,2),u=l[0],w=l[1];return e.useEffect((function(){var i=function(){w({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",i),function(){window.removeEventListener("resize",i)}}),[]),u};export{t as useWindowSize};
|
|
3
3
|
//# sourceMappingURL=useWindowSize.js.map
|
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
export{useBattery}from"./hooks/useBattery/useBattery.js";export{useBoolean}from"./hooks/useBoolean/useBoolean.js";export{useBrowserLanguage}from"./hooks/useBrowserLanguage/useBrowserLanguage.js";export{useClickOutside}from"./hooks/useClickOutside/useClickOutside.js";export{legacyCopyToClipboard,useCopyToClipboard}from"./hooks/useCopyToClipboard/useCopyToClipboard.js";export{useCounter}from"./hooks/useCounter/useCounter.js";export{useDebouncedValue}from"./hooks/useDebouncedValue/useDebouncedValue.js";export{useDefault}from"./hooks/useDefault/useDefault.js";export{useDidUpdate}from"./hooks/useDidUpdate/useDidUpdate.js";export{useDocumentEvent}from"./hooks/useDocumentEvent/useDocumentEvent.js";export{useDocumentTitle}from"./hooks/useDocumentTitle/useDocumentTitle.js";export{useDocumentVisibility}from"./hooks/useDocumentVisibility/useDocumentVisibility.js";export{useEvent}from"./hooks/useEvent/useEvent.js";export{useEventListener}from"./hooks/useEventListener/useEventListener.js";export{useEyeDropper}from"./hooks/useEyeDropper/useEyeDropper.js";export{useFavicon}from"./hooks/useFavicon/useFavicon.js";export{useFps}from"./hooks/useFps/useFps.js";export{useFullscreen}from"./hooks/useFullscreen/useFullscreen.js";export{useHash}from"./hooks/useHash/useHash.js";export{isHotkeyMatch,useHotkeys}from"./hooks/useHotkeys/useHotkeys.js";export{useHover}from"./hooks/useHover/useHover.js";export{useIdle}from"./hooks/useIdle/useIdle.js";export{useIntersectionObserver}from"./hooks/useIntersectionObserver/useIntersectionObserver.js";export{useInterval}from"./hooks/useInterval/useInterval.js";export{useIsFirstRender}from"./hooks/useIsFirstRender/useIsFirstRender.js";export{useIsomorphicLayoutEffect}from"./hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";export{useKeyboard}from"./hooks/useKeyboard/useKeyboard.js";export{useKeyPress}from"./hooks/useKeyPress/useKeyPress.js";export{useKeyPressEvent}from"./hooks/useKeyPressEvent/useKeyPressEvent.js";export{useKeysPressed}from"./hooks/useKeysPressed/useKeysPressed.js";export{useList}from"./hooks/useList/useList.js";export{useLocalStorage}from"./hooks/useLocalStorage/useLocalStorage.js";export{useLogger}from"./hooks/useLogger/useLogger.js";export{useLongPress}from"./hooks/useLongPress/useLongPress.js";export{useMediaQuery}from"./hooks/useMediaQuery/useMediaQuery.js";export{useMount}from"./hooks/useMount/useMount.js";export{useMouse}from"./hooks/useMouse/useMouse.js";export{useMutation}from"./hooks/useMutation/useMutation.js";export{getConnection,useNetwork}from"./hooks/useNetwork/useNetwork.js";export{useOnline}from"./hooks/useOnline/useOnline.js";export{getOperatingSystem,useOperatingSystem}from"./hooks/useOperatingSystem/useOperatingSystem.js";export{useOrientation}from"./hooks/useOrientation/useOrientation.js";export{usePageLeave}from"./hooks/usePageLeave/usePageLeave.js";export{getTargetElement,usePaint}from"./hooks/usePaint/usePaint.js";export{usePreferredColorScheme}from"./hooks/usePreferredColorScheme/usePreferredColorScheme.js";export{usePreferredLanguages}from"./hooks/usePreferredLanguages/usePreferredLanguages.js";export{usePrevious}from"./hooks/usePrevious/usePrevious.js";export{useQuery}from"./hooks/useQuery/useQuery.js";export{useQueue}from"./hooks/useQueue/useQueue.js";export{useRenderCount}from"./hooks/useRenderCount/useRenderCount.js";export{useRerender}from"./hooks/useRerender/useRerender.js";export{SCRIPT_STATUS_ATTRIBUTE_NAME,useScript}from"./hooks/useScript/useScript.js";export{useSessionStorage}from"./hooks/useSessionStorage/useSessionStorage.js";export{useSet}from"./hooks/useSet/useSet.js";export{useStep}from"./hooks/useStep/useStep.js";export{dispatchStorageEvent,useStorage}from"./hooks/useStorage/useStorage.js";export{getRangesSelection,useTextSelection}from"./hooks/useTextSelection/useTextSelection.js";export{useTime}from"./hooks/useTime/useTime.js";export{useTimeout}from"./hooks/useTimeout/useTimeout.js";export{useToggle}from"./hooks/useToggle/useToggle.js";export{useUnmount}from"./hooks/useUnmount/useUnmount.js";export{useWindowEvent}from"./hooks/useWindowEvent/useWindowEvent.js";export{useWindowSize}from"./hooks/useWindowSize/useWindowSize.js";export{debounce}from"./utils/helpers/debounce.js";export{getRetry}from"./utils/helpers/getRetry.js";export{isClient}from"./utils/helpers/isClient.js";export{throttle}from"./utils/helpers/throttle.js";export{getDate}from"./utils/helpers/time/getDate.js";import"./_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
|
+
export{useBattery}from"./hooks/useBattery/useBattery.js";export{useBoolean}from"./hooks/useBoolean/useBoolean.js";export{useBrowserLanguage}from"./hooks/useBrowserLanguage/useBrowserLanguage.js";export{useClickOutside}from"./hooks/useClickOutside/useClickOutside.js";export{legacyCopyToClipboard,useCopyToClipboard}from"./hooks/useCopyToClipboard/useCopyToClipboard.js";export{useCounter}from"./hooks/useCounter/useCounter.js";export{useDebouncedValue}from"./hooks/useDebouncedValue/useDebouncedValue.js";export{useDefault}from"./hooks/useDefault/useDefault.js";export{useDidUpdate}from"./hooks/useDidUpdate/useDidUpdate.js";export{useDocumentEvent}from"./hooks/useDocumentEvent/useDocumentEvent.js";export{useDocumentTitle}from"./hooks/useDocumentTitle/useDocumentTitle.js";export{useDocumentVisibility}from"./hooks/useDocumentVisibility/useDocumentVisibility.js";export{useEvent}from"./hooks/useEvent/useEvent.js";export{useEventListener}from"./hooks/useEventListener/useEventListener.js";export{useEyeDropper}from"./hooks/useEyeDropper/useEyeDropper.js";export{useFavicon}from"./hooks/useFavicon/useFavicon.js";export{useFps}from"./hooks/useFps/useFps.js";export{useFullscreen}from"./hooks/useFullscreen/useFullscreen.js";export{useHash}from"./hooks/useHash/useHash.js";export{isHotkeyMatch,useHotkeys}from"./hooks/useHotkeys/useHotkeys.js";export{useHover}from"./hooks/useHover/useHover.js";export{useIdle}from"./hooks/useIdle/useIdle.js";export{useIntersectionObserver}from"./hooks/useIntersectionObserver/useIntersectionObserver.js";export{useInterval}from"./hooks/useInterval/useInterval.js";export{useIsFirstRender}from"./hooks/useIsFirstRender/useIsFirstRender.js";export{useIsomorphicLayoutEffect}from"./hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";export{useKeyboard}from"./hooks/useKeyboard/useKeyboard.js";export{useKeyPress}from"./hooks/useKeyPress/useKeyPress.js";export{useKeyPressEvent}from"./hooks/useKeyPressEvent/useKeyPressEvent.js";export{useKeysPressed}from"./hooks/useKeysPressed/useKeysPressed.js";export{useList}from"./hooks/useList/useList.js";export{useLocalStorage}from"./hooks/useLocalStorage/useLocalStorage.js";export{useLogger}from"./hooks/useLogger/useLogger.js";export{useLongPress}from"./hooks/useLongPress/useLongPress.js";export{useMediaQuery}from"./hooks/useMediaQuery/useMediaQuery.js";export{useMount}from"./hooks/useMount/useMount.js";export{useMouse}from"./hooks/useMouse/useMouse.js";export{useMutation}from"./hooks/useMutation/useMutation.js";export{getConnection,useNetwork}from"./hooks/useNetwork/useNetwork.js";export{useOnline}from"./hooks/useOnline/useOnline.js";export{getOperatingSystem,useOperatingSystem}from"./hooks/useOperatingSystem/useOperatingSystem.js";export{useOrientation}from"./hooks/useOrientation/useOrientation.js";export{usePageLeave}from"./hooks/usePageLeave/usePageLeave.js";export{getTargetElement,usePaint}from"./hooks/usePaint/usePaint.js";export{usePreferredColorScheme}from"./hooks/usePreferredColorScheme/usePreferredColorScheme.js";export{usePreferredLanguages}from"./hooks/usePreferredLanguages/usePreferredLanguages.js";export{usePrevious}from"./hooks/usePrevious/usePrevious.js";export{useQuery}from"./hooks/useQuery/useQuery.js";export{useQueue}from"./hooks/useQueue/useQueue.js";export{useRenderCount}from"./hooks/useRenderCount/useRenderCount.js";export{useRenderInfo}from"./hooks/useRenderInfo/useRenderInfo.js";export{useRerender}from"./hooks/useRerender/useRerender.js";export{SCRIPT_STATUS_ATTRIBUTE_NAME,useScript}from"./hooks/useScript/useScript.js";export{useSessionStorage}from"./hooks/useSessionStorage/useSessionStorage.js";export{useSet}from"./hooks/useSet/useSet.js";export{useStep}from"./hooks/useStep/useStep.js";export{dispatchStorageEvent,useStorage}from"./hooks/useStorage/useStorage.js";export{getRangesSelection,useTextSelection}from"./hooks/useTextSelection/useTextSelection.js";export{useTime}from"./hooks/useTime/useTime.js";export{useTimeout}from"./hooks/useTimeout/useTimeout.js";export{useToggle}from"./hooks/useToggle/useToggle.js";export{useUnmount}from"./hooks/useUnmount/useUnmount.js";export{useWindowEvent}from"./hooks/useWindowEvent/useWindowEvent.js";export{useWindowSize}from"./hooks/useWindowSize/useWindowSize.js";export{debounce}from"./utils/helpers/debounce.js";export{getRetry}from"./utils/helpers/getRetry.js";export{isClient}from"./utils/helpers/isClient.js";export{throttle}from"./utils/helpers/throttle.js";export{getDate}from"./utils/helpers/time/getDate.js";import"./_rollupPluginBabelHelpers-DsV9C8-q.js";import"react";import"./hooks/useMutationObserver.js";import"screenfull";import"react-dom";
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
2
|
var r=function(r,n){var t;return function(){for(var e=arguments.length,o=new Array(e),u=0;u<e;u++)o[u]=arguments[u];clearTimeout(t),t=setTimeout((function(){return r.apply(void 0,o)}),n)}};export{r as debounce};
|
|
3
3
|
//# sourceMappingURL=debounce.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
2
|
export{debounce}from"./debounce.js";export{getRetry}from"./getRetry.js";export{isClient}from"./isClient.js";export{throttle}from"./throttle.js";export{getDate}from"./time/getDate.js";
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
2
|
var n,d,e=!("undefined"==typeof window||null===(n=window)||void 0===n||!n.document||null===(d=window)||void 0===d||null===(d=d.document)||void 0===d||!d.createElement);export{e as isClient};
|
|
3
3
|
//# sourceMappingURL=isClient.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
2
|
var n=function(n,t){var o=!1;return function(){o||(n.apply(void 0,arguments),o=!0,setTimeout((function(){o=!1}),t))}};export{n as throttle};
|
|
3
3
|
//# sourceMappingURL=throttle.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.28 */
|
|
2
2
|
var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=e.getSeconds(),n=e.getMinutes(),r=e.getHours();return{seconds:t,minutes:n,hours:r,meridiemHours:{value:r%12==0?12:r%12,type:r>=12?"pm":"am"},day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear(),timestamp:e.getTime()}};export{e as getDate};
|
|
3
3
|
//# sourceMappingURL=getDate.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1127,6 +1127,25 @@ declare const useQueue: <Value>(initialValue?: Value[]) => UseQueueReturn<Value>
|
|
|
1127
1127
|
*/
|
|
1128
1128
|
declare const useRenderCount: () => number;
|
|
1129
1129
|
|
|
1130
|
+
interface UseRenderInfoReturn {
|
|
1131
|
+
component: string;
|
|
1132
|
+
renders: number;
|
|
1133
|
+
timestamp: null | number;
|
|
1134
|
+
sinceLast: number;
|
|
1135
|
+
}
|
|
1136
|
+
/**
|
|
1137
|
+
* @name useRenderInfo
|
|
1138
|
+
* @description - Hook for getting information about component rerender
|
|
1139
|
+
*
|
|
1140
|
+
* @param {string} [name='Unknown'] Component name
|
|
1141
|
+
* @param {boolean} [log=true] Toggle logging
|
|
1142
|
+
* @returns {UseRenderInfoReturn} An object containing rerender information
|
|
1143
|
+
*
|
|
1144
|
+
* @example
|
|
1145
|
+
* const rerenderInfo = useRenderInfo('Component');
|
|
1146
|
+
*/
|
|
1147
|
+
declare const useRenderInfo: (name?: string, log?: boolean) => UseRenderInfoReturn;
|
|
1148
|
+
|
|
1130
1149
|
/** The use rerender return type */
|
|
1131
1150
|
interface UseRerenderReturns {
|
|
1132
1151
|
/** The id of the rerender */
|
|
@@ -1443,4 +1462,4 @@ declare const getDate: (now?: Date) => {
|
|
|
1443
1462
|
timestamp: number;
|
|
1444
1463
|
};
|
|
1445
1464
|
|
|
1446
|
-
export { type ConnectionEffectiveType, type ConnectionType, type OperatingSystem, SCRIPT_STATUS_ATTRIBUTE_NAME, type UseClickOutside, type UseClickOutsideReturn, type UseCounter, type UseCounterOptions, type UseCounterParams, type UseCounterReturn, type UseDocumentTitleOptions, type UseDocumentTitleReturn, type UseEventListener, type UseEventListenerOptions, type UseEventListenerReturn, type UseEventListenerTarget, type UseEyeDropperReturn, type UseFaviconReturn, type UseFullScreen, type UseFullScreenOptions, type UseFullScreenReturn, type UseHotkeysHotkeys, type UseHotkeysKey, type UseHotkeysOptions, type UseHover, type UseHoverOptions, type UseHoverReturn, type UseHoverTarget, type UseIdleReturn, type UseIntersectionObserver, type UseIntersectionObserverOptions, type UseIntersectionObserverReturn, type UseIntersectionObserverTarget, type UseIntervalOptions, type UseIntervalReturn, type UseKeyPressEvent, type UseKeyPressEventKey, type UseKeyPressKey, type UseKeyPressOptions, type UseKeyboardParams, type UseListReturn, type UseLongPress, type UseLongPressReturn, type UseLongPressTarget, type UseMouse, type UseMouseReturn, type UseNetworkReturn, type UseOrientationReturn, type UsePaint, type UsePaintOptions, type UsePaintPencil, type UsePaintReturn, type UsePaintTarget, type UsePreferredColorSchemeReturn, type UseQueueReturn, type UseScriptOptions, type UseScriptStatus, type UseStorageInitialValue, type UseStorageOptions, type UseStorageReturn, type UseTextSelectionReturn, type UseTimeReturn, type UseToggleReturn, type UseWindowSizeReturn, debounce, dispatchStorageEvent, getConnection, getDate, getOperatingSystem, getRangesSelection, getRetry, getTargetElement, isClient, isHotkeyMatch, legacyCopyToClipboard, throttle, useBattery, useBoolean, useBrowserLanguage, useClickOutside, useCopyToClipboard, useCounter, useDebouncedValue, useDefault, useDidUpdate, useDocumentEvent, useDocumentTitle, useDocumentVisibility, useEvent, useEventListener, useEyeDropper, useFavicon, useFps, useFullscreen, useHash, useHotkeys, useHover, useIdle, useIntersectionObserver, useInterval, useIsFirstRender, useIsomorphicLayoutEffect, useKeyPress, useKeyPressEvent, useKeyboard, useKeysPressed, useList, useLocalStorage, useLogger, useLongPress, useMediaQuery, useMount, useMouse, useMutation, useNetwork, useOnline, useOperatingSystem, useOrientation, usePageLeave, usePaint, usePreferredColorScheme, usePreferredLanguages, usePrevious, useQuery, useQueue, useRenderCount, useRerender, useScript, useSessionStorage, useSet, useStep, useStorage, useTextSelection, useTime, useTimeout, useToggle, useUnmount, useWindowEvent, useWindowSize };
|
|
1465
|
+
export { type ConnectionEffectiveType, type ConnectionType, type OperatingSystem, SCRIPT_STATUS_ATTRIBUTE_NAME, type UseClickOutside, type UseClickOutsideReturn, type UseCounter, type UseCounterOptions, type UseCounterParams, type UseCounterReturn, type UseDocumentTitleOptions, type UseDocumentTitleReturn, type UseEventListener, type UseEventListenerOptions, type UseEventListenerReturn, type UseEventListenerTarget, type UseEyeDropperReturn, type UseFaviconReturn, type UseFullScreen, type UseFullScreenOptions, type UseFullScreenReturn, type UseHotkeysHotkeys, type UseHotkeysKey, type UseHotkeysOptions, type UseHover, type UseHoverOptions, type UseHoverReturn, type UseHoverTarget, type UseIdleReturn, type UseIntersectionObserver, type UseIntersectionObserverOptions, type UseIntersectionObserverReturn, type UseIntersectionObserverTarget, type UseIntervalOptions, type UseIntervalReturn, type UseKeyPressEvent, type UseKeyPressEventKey, type UseKeyPressKey, type UseKeyPressOptions, type UseKeyboardParams, type UseListReturn, type UseLongPress, type UseLongPressReturn, type UseLongPressTarget, type UseMouse, type UseMouseReturn, type UseNetworkReturn, type UseOrientationReturn, type UsePaint, type UsePaintOptions, type UsePaintPencil, type UsePaintReturn, type UsePaintTarget, type UsePreferredColorSchemeReturn, type UseQueueReturn, type UseRenderInfoReturn, type UseScriptOptions, type UseScriptStatus, type UseStorageInitialValue, type UseStorageOptions, type UseStorageReturn, type UseTextSelectionReturn, type UseTimeReturn, type UseToggleReturn, type UseWindowSizeReturn, debounce, dispatchStorageEvent, getConnection, getDate, getOperatingSystem, getRangesSelection, getRetry, getTargetElement, isClient, isHotkeyMatch, legacyCopyToClipboard, throttle, useBattery, useBoolean, useBrowserLanguage, useClickOutside, useCopyToClipboard, useCounter, useDebouncedValue, useDefault, useDidUpdate, useDocumentEvent, useDocumentTitle, useDocumentVisibility, useEvent, useEventListener, useEyeDropper, useFavicon, useFps, useFullscreen, useHash, useHotkeys, useHover, useIdle, useIntersectionObserver, useInterval, useIsFirstRender, useIsomorphicLayoutEffect, useKeyPress, useKeyPressEvent, useKeyboard, useKeysPressed, useList, useLocalStorage, useLogger, useLongPress, useMediaQuery, useMount, useMouse, useMutation, useNetwork, useOnline, useOperatingSystem, useOrientation, usePageLeave, usePaint, usePreferredColorScheme, usePreferredLanguages, usePrevious, useQuery, useQueue, useRenderCount, useRenderInfo, useRerender, useScript, useSessionStorage, useSet, useStep, useStorage, useTextSelection, useTime, useTimeout, useToggle, useUnmount, useWindowEvent, useWindowSize };
|