@siberiacancode/reactuse 0.0.23 → 0.0.24

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.
Files changed (172) hide show
  1. package/dist/cjs/{_rollupPluginBabelHelpers-OXydtwwP.js → _rollupPluginBabelHelpers-Dp-teDDf.js} +2 -2
  2. package/dist/cjs/_rollupPluginBabelHelpers-Dp-teDDf.js.map +1 -0
  3. package/dist/cjs/hooks/index.js +2 -2
  4. package/dist/cjs/hooks/useBattery/useBattery.js +2 -2
  5. package/dist/cjs/hooks/useBoolean/useBoolean.js +2 -2
  6. package/dist/cjs/hooks/useBrowserLanguage/useBrowserLanguage.js +3 -0
  7. package/dist/cjs/hooks/useBrowserLanguage/useBrowserLanguage.js.map +1 -0
  8. package/dist/cjs/hooks/useClickOutside/useClickOutside.js +1 -1
  9. package/dist/cjs/hooks/useCopyToClipboard/useCopyToClipboard.js +2 -2
  10. package/dist/cjs/hooks/useCounter/useCounter.js +2 -2
  11. package/dist/cjs/hooks/useCounter/useCounter.js.map +1 -1
  12. package/dist/cjs/hooks/useDebouncedValue/useDebouncedValue.js +2 -2
  13. package/dist/cjs/hooks/useDefault/useDefault.js +2 -2
  14. package/dist/cjs/hooks/useDidUpdate/useDidUpdate.js +1 -1
  15. package/dist/cjs/hooks/useDocumentTitle/useDocumentTitle.js +2 -2
  16. package/dist/cjs/hooks/useDocumentVisibility/useDocumentVisibility.js +1 -1
  17. package/dist/cjs/hooks/useEvent/useEvent.js +1 -1
  18. package/dist/cjs/hooks/useEventListener/useEventListener.js +1 -1
  19. package/dist/cjs/hooks/useFavicon/useFavicon.js +2 -2
  20. package/dist/cjs/hooks/useFps/useFps.js +3 -0
  21. package/dist/cjs/hooks/useFps/useFps.js.map +1 -0
  22. package/dist/cjs/hooks/useFullscreen/useFullscreen.js +2 -2
  23. package/dist/cjs/hooks/useHash/useHash.js +2 -2
  24. package/dist/cjs/hooks/useHotkeys/useHotkeys.js +2 -2
  25. package/dist/cjs/hooks/useHover/useHover.js +2 -2
  26. package/dist/cjs/hooks/useIdle/useIdle.js +2 -2
  27. package/dist/cjs/hooks/useIntersectionObserver/useIntersectionObserver.js +2 -2
  28. package/dist/cjs/hooks/useIntersectionObserver/useIntersectionObserver.js.map +1 -1
  29. package/dist/cjs/hooks/useInterval/useInterval.js +2 -2
  30. package/dist/cjs/hooks/useInterval/useInterval.js.map +1 -1
  31. package/dist/cjs/hooks/useIsFirstRender/useIsFirstRender.js +1 -1
  32. package/dist/cjs/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +1 -1
  33. package/dist/cjs/hooks/useKeyPress/useKeyPress.js +2 -2
  34. package/dist/cjs/hooks/useKeyPressEvent/useKeyPressEvent.js +1 -1
  35. package/dist/cjs/hooks/useKeyboard/useKeyboard.js +1 -1
  36. package/dist/cjs/hooks/useKeysPressed/useKeysPressed.js +2 -2
  37. package/dist/cjs/hooks/useList/useList.js +2 -2
  38. package/dist/cjs/hooks/useLocalStorage/useLocalStorage.js +2 -2
  39. package/dist/cjs/hooks/useLogger/useLogger.js +2 -2
  40. package/dist/cjs/hooks/useLongPress/useLongPress.js +2 -2
  41. package/dist/cjs/hooks/useLongPress/useLongPress.js.map +1 -1
  42. package/dist/cjs/hooks/useMediaQuery/useMediaQuery.js +1 -1
  43. package/dist/cjs/hooks/useMount/useMount.js +1 -1
  44. package/dist/cjs/hooks/useMouse/useMouse.js +2 -2
  45. package/dist/cjs/hooks/useMouse/useMouse.js.map +1 -1
  46. package/dist/cjs/hooks/useMutation/useMutation.js +2 -2
  47. package/dist/cjs/hooks/useMutationObserver.js +1 -1
  48. package/dist/cjs/hooks/useNetwork/useNetwork.js +2 -2
  49. package/dist/cjs/hooks/useOnline/useOnline.js +1 -1
  50. package/dist/cjs/hooks/useOperatingSystem/useOperatingSystem.js +1 -1
  51. package/dist/cjs/hooks/useOrientation/useOrientation.js +2 -2
  52. package/dist/cjs/hooks/usePageLeave/usePageLeave.js +1 -1
  53. package/dist/cjs/hooks/usePaint/usePaint.js +3 -0
  54. package/dist/cjs/hooks/usePaint/usePaint.js.map +1 -0
  55. package/dist/cjs/hooks/usePreferredColorScheme/usePreferredColorScheme.js +1 -1
  56. package/dist/cjs/hooks/usePreferredLanguages/usePreferredLanguages.js +2 -2
  57. package/dist/cjs/hooks/usePreferredLanguages/usePreferredLanguages.js.map +1 -1
  58. package/dist/cjs/hooks/usePrevious/usePrevious.js +1 -1
  59. package/dist/cjs/hooks/useQuery/useQuery.js +2 -2
  60. package/dist/cjs/hooks/useQueue/useQueue.js +2 -2
  61. package/dist/cjs/hooks/useRenderCount/useRenderCount.js +1 -1
  62. package/dist/cjs/hooks/useRerender/useRerender.js +2 -2
  63. package/dist/cjs/hooks/useScript/useScript.js +2 -2
  64. package/dist/cjs/hooks/useSessionStorage/useSessionStorage.js +2 -2
  65. package/dist/cjs/hooks/useSet/useSet.js +2 -2
  66. package/dist/cjs/hooks/useStep/useStep.js +2 -2
  67. package/dist/cjs/hooks/useStorage/useStorage.js +2 -2
  68. package/dist/cjs/hooks/useTextSelection/useTextSelection.js +2 -2
  69. package/dist/cjs/hooks/useTime/useTime.js +3 -0
  70. package/dist/cjs/hooks/useTime/useTime.js.map +1 -0
  71. package/dist/cjs/hooks/useTimeout/useTimeout.js +2 -2
  72. package/dist/cjs/hooks/useTimeout/useTimeout.js.map +1 -1
  73. package/dist/cjs/hooks/useToggle/useToggle.js +2 -2
  74. package/dist/cjs/hooks/useUnmount/useUnmount.js +1 -1
  75. package/dist/cjs/hooks/useWindowEvent/useWindowEvent.js +1 -1
  76. package/dist/cjs/hooks/useWindowSize/useWindowSize.js +2 -2
  77. package/dist/cjs/index.js +2 -2
  78. package/dist/cjs/utils/helpers/debounce.js +1 -1
  79. package/dist/cjs/utils/helpers/getRetry.js +1 -1
  80. package/dist/cjs/utils/helpers/index.js +2 -2
  81. package/dist/cjs/utils/helpers/isClient.js +1 -1
  82. package/dist/cjs/utils/helpers/throttle.js +1 -1
  83. package/dist/cjs/utils/helpers/time/getDate.js +3 -0
  84. package/dist/cjs/utils/helpers/time/getDate.js.map +1 -0
  85. package/dist/esm/{_rollupPluginBabelHelpers-Ca7xtMt2.js → _rollupPluginBabelHelpers-BK7XeaSH.js} +2 -2
  86. package/dist/esm/_rollupPluginBabelHelpers-BK7XeaSH.js.map +1 -0
  87. package/dist/esm/hooks/index.js +2 -2
  88. package/dist/esm/hooks/useBattery/useBattery.js +2 -2
  89. package/dist/esm/hooks/useBoolean/useBoolean.js +2 -2
  90. package/dist/esm/hooks/useBrowserLanguage/useBrowserLanguage.js +3 -0
  91. package/dist/esm/hooks/useBrowserLanguage/useBrowserLanguage.js.map +1 -0
  92. package/dist/esm/hooks/useClickOutside/useClickOutside.js +1 -1
  93. package/dist/esm/hooks/useCopyToClipboard/useCopyToClipboard.js +2 -2
  94. package/dist/esm/hooks/useCounter/useCounter.js +2 -2
  95. package/dist/esm/hooks/useCounter/useCounter.js.map +1 -1
  96. package/dist/esm/hooks/useDebouncedValue/useDebouncedValue.js +2 -2
  97. package/dist/esm/hooks/useDefault/useDefault.js +2 -2
  98. package/dist/esm/hooks/useDidUpdate/useDidUpdate.js +1 -1
  99. package/dist/esm/hooks/useDocumentTitle/useDocumentTitle.js +2 -2
  100. package/dist/esm/hooks/useDocumentVisibility/useDocumentVisibility.js +1 -1
  101. package/dist/esm/hooks/useEvent/useEvent.js +1 -1
  102. package/dist/esm/hooks/useEventListener/useEventListener.js +1 -1
  103. package/dist/esm/hooks/useFavicon/useFavicon.js +2 -2
  104. package/dist/esm/hooks/useFps/useFps.js +3 -0
  105. package/dist/esm/hooks/useFps/useFps.js.map +1 -0
  106. package/dist/esm/hooks/useFullscreen/useFullscreen.js +2 -2
  107. package/dist/esm/hooks/useHash/useHash.js +2 -2
  108. package/dist/esm/hooks/useHotkeys/useHotkeys.js +2 -2
  109. package/dist/esm/hooks/useHover/useHover.js +2 -2
  110. package/dist/esm/hooks/useIdle/useIdle.js +2 -2
  111. package/dist/esm/hooks/useIntersectionObserver/useIntersectionObserver.js +2 -2
  112. package/dist/esm/hooks/useIntersectionObserver/useIntersectionObserver.js.map +1 -1
  113. package/dist/esm/hooks/useInterval/useInterval.js +2 -2
  114. package/dist/esm/hooks/useInterval/useInterval.js.map +1 -1
  115. package/dist/esm/hooks/useIsFirstRender/useIsFirstRender.js +1 -1
  116. package/dist/esm/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +1 -1
  117. package/dist/esm/hooks/useKeyPress/useKeyPress.js +2 -2
  118. package/dist/esm/hooks/useKeyPressEvent/useKeyPressEvent.js +1 -1
  119. package/dist/esm/hooks/useKeyboard/useKeyboard.js +1 -1
  120. package/dist/esm/hooks/useKeysPressed/useKeysPressed.js +2 -2
  121. package/dist/esm/hooks/useList/useList.js +2 -2
  122. package/dist/esm/hooks/useLocalStorage/useLocalStorage.js +2 -2
  123. package/dist/esm/hooks/useLogger/useLogger.js +2 -2
  124. package/dist/esm/hooks/useLongPress/useLongPress.js +2 -2
  125. package/dist/esm/hooks/useLongPress/useLongPress.js.map +1 -1
  126. package/dist/esm/hooks/useMediaQuery/useMediaQuery.js +1 -1
  127. package/dist/esm/hooks/useMount/useMount.js +1 -1
  128. package/dist/esm/hooks/useMouse/useMouse.js +2 -2
  129. package/dist/esm/hooks/useMouse/useMouse.js.map +1 -1
  130. package/dist/esm/hooks/useMutation/useMutation.js +2 -2
  131. package/dist/esm/hooks/useMutationObserver.js +1 -1
  132. package/dist/esm/hooks/useNetwork/useNetwork.js +2 -2
  133. package/dist/esm/hooks/useOnline/useOnline.js +1 -1
  134. package/dist/esm/hooks/useOperatingSystem/useOperatingSystem.js +1 -1
  135. package/dist/esm/hooks/useOrientation/useOrientation.js +2 -2
  136. package/dist/esm/hooks/usePageLeave/usePageLeave.js +1 -1
  137. package/dist/esm/hooks/usePaint/usePaint.js +3 -0
  138. package/dist/esm/hooks/usePaint/usePaint.js.map +1 -0
  139. package/dist/esm/hooks/usePreferredColorScheme/usePreferredColorScheme.js +1 -1
  140. package/dist/esm/hooks/usePreferredLanguages/usePreferredLanguages.js +2 -2
  141. package/dist/esm/hooks/usePreferredLanguages/usePreferredLanguages.js.map +1 -1
  142. package/dist/esm/hooks/usePrevious/usePrevious.js +1 -1
  143. package/dist/esm/hooks/useQuery/useQuery.js +2 -2
  144. package/dist/esm/hooks/useQueue/useQueue.js +2 -2
  145. package/dist/esm/hooks/useRenderCount/useRenderCount.js +1 -1
  146. package/dist/esm/hooks/useRerender/useRerender.js +2 -2
  147. package/dist/esm/hooks/useScript/useScript.js +2 -2
  148. package/dist/esm/hooks/useSessionStorage/useSessionStorage.js +2 -2
  149. package/dist/esm/hooks/useSet/useSet.js +2 -2
  150. package/dist/esm/hooks/useStep/useStep.js +2 -2
  151. package/dist/esm/hooks/useStorage/useStorage.js +2 -2
  152. package/dist/esm/hooks/useTextSelection/useTextSelection.js +2 -2
  153. package/dist/esm/hooks/useTime/useTime.js +3 -0
  154. package/dist/esm/hooks/useTime/useTime.js.map +1 -0
  155. package/dist/esm/hooks/useTimeout/useTimeout.js +2 -2
  156. package/dist/esm/hooks/useTimeout/useTimeout.js.map +1 -1
  157. package/dist/esm/hooks/useToggle/useToggle.js +2 -2
  158. package/dist/esm/hooks/useUnmount/useUnmount.js +1 -1
  159. package/dist/esm/hooks/useWindowEvent/useWindowEvent.js +1 -1
  160. package/dist/esm/hooks/useWindowSize/useWindowSize.js +2 -2
  161. package/dist/esm/index.js +2 -2
  162. package/dist/esm/utils/helpers/debounce.js +1 -1
  163. package/dist/esm/utils/helpers/getRetry.js +1 -1
  164. package/dist/esm/utils/helpers/index.js +2 -2
  165. package/dist/esm/utils/helpers/isClient.js +1 -1
  166. package/dist/esm/utils/helpers/throttle.js +1 -1
  167. package/dist/esm/utils/helpers/time/getDate.js +3 -0
  168. package/dist/esm/utils/helpers/time/getDate.js.map +1 -0
  169. package/dist/index.d.ts +112 -7
  170. package/package.json +1 -1
  171. package/dist/cjs/_rollupPluginBabelHelpers-OXydtwwP.js.map +0 -1
  172. package/dist/esm/_rollupPluginBabelHelpers-Ca7xtMt2.js.map +0 -1
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.23 */
2
- import{_ as e}from"../../_rollupPluginBabelHelpers-Ca7xtMt2.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};
1
+ /* @license @siberiacancode/reactuse v0.0.24 */
2
+ import{_ as e}from"../../_rollupPluginBabelHelpers-BK7XeaSH.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.23 */
2
- import{_ as r,c as t,d as n}from"../../_rollupPluginBabelHelpers-Ca7xtMt2.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};
1
+ /* @license @siberiacancode/reactuse v0.0.24 */
2
+ import{_ as r,c as t,d as n}from"../../_rollupPluginBabelHelpers-BK7XeaSH.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.23 */
1
+ /* @license @siberiacancode/reactuse v0.0.24 */
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
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.23 */
2
- import{_ as r}from"../../_rollupPluginBabelHelpers-Ca7xtMt2.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};
1
+ /* @license @siberiacancode/reactuse v0.0.24 */
2
+ import{_ as r}from"../../_rollupPluginBabelHelpers-BK7XeaSH.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.23 */
2
- import{_ as e}from"../../_rollupPluginBabelHelpers-Ca7xtMt2.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};
1
+ /* @license @siberiacancode/reactuse v0.0.24 */
2
+ import{_ as e}from"../../_rollupPluginBabelHelpers-BK7XeaSH.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.23 */
2
- import{b as o}from"../../_rollupPluginBabelHelpers-Ca7xtMt2.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};
1
+ /* @license @siberiacancode/reactuse v0.0.24 */
2
+ import{b as o}from"../../_rollupPluginBabelHelpers-BK7XeaSH.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.23 */
2
- import{_ as e}from"../../_rollupPluginBabelHelpers-Ca7xtMt2.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};
1
+ /* @license @siberiacancode/reactuse v0.0.24 */
2
+ import{_ as e}from"../../_rollupPluginBabelHelpers-BK7XeaSH.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.23 */
2
- import{a as t,_ as r}from"../../_rollupPluginBabelHelpers-Ca7xtMt2.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};
1
+ /* @license @siberiacancode/reactuse v0.0.24 */
2
+ import{a as t,_ as r}from"../../_rollupPluginBabelHelpers-BK7XeaSH.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.23 */
2
- import{a as e}from"../../_rollupPluginBabelHelpers-Ca7xtMt2.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};
1
+ /* @license @siberiacancode/reactuse v0.0.24 */
2
+ import{a as e}from"../../_rollupPluginBabelHelpers-BK7XeaSH.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.23 */
2
- import{_ as e}from"../../_rollupPluginBabelHelpers-Ca7xtMt2.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};
1
+ /* @license @siberiacancode/reactuse v0.0.24 */
2
+ import{_ as e}from"../../_rollupPluginBabelHelpers-BK7XeaSH.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
@@ -0,0 +1,3 @@
1
+ /* @license @siberiacancode/reactuse v0.0.24 */
2
+ import{_ as e}from"../../_rollupPluginBabelHelpers-BK7XeaSH.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
+ //# sourceMappingURL=useTime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTime.js","sources":["../../../../src/hooks/useTime/useTime.ts"],"sourcesContent":["import React from 'react';\n\nimport { useInterval } from '@/hooks';\nimport { getDate } from '@/utils/helpers';\n\nexport interface UseTimeReturn {\n seconds: number;\n minutes: number;\n hours: number;\n meridiemHours: { value: number; type: string };\n day: number;\n month: number;\n year: number;\n timestamp: number;\n}\n\n/**\n * @name useTime\n * @description - Hook that gives you current time in different values\n *\n * @returns {UseTimeReturn} An object containing the current time\n *\n * @example\n * const { seconds, minutes, hours, meridiemHours, day, month, year, timestamp } = useTime();\n */\n\nexport const useTime = (): UseTimeReturn => {\n const [time, setTime] = React.useState(getDate());\n useInterval(() => setTime(getDate()), 1000);\n return time;\n};\n"],"names":["useTime","_React$useState","React","useState","getDate","_React$useState2","_slicedToArray","time","setTime","useInterval"],"mappings":";kYA0BaA,EAAU,WACrB,IAAAC,EAAwBC,EAAMC,SAASC,KAAUC,EAAAC,EAAAL,EAAA,GAA1CM,EAAIF,EAAA,GAAEG,EAAOH,EAAA,GAEpB,OADAI,GAAY,WAAA,OAAMD,EAAQJ,IAAU,GAAE,KAC/BG,CACT"}
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.23 */
2
- import{_ as e}from"../../_rollupPluginBabelHelpers-Ca7xtMt2.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};
1
+ /* @license @siberiacancode/reactuse v0.0.24 */
2
+ import{_ as e}from"../../_rollupPluginBabelHelpers-BK7XeaSH.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 +1 @@
1
- {"version":3,"file":"useTimeout.js","sources":["../../../../src/hooks/useTimeout/useTimeout.ts"],"sourcesContent":["import React from 'react';\n\nimport { useEvent } from '../useEvent/useEvent';\n\n/** The use timeout return type */\ninterface UseTimeoutReturn {\n /** Timeout is ready state value */\n ready: boolean;\n /** Function to clear timeout */\n clear: () => void;\n}\n\n/**\n * @name useTimeout\n * @description Hook that executes a callback function after a specified delay\n *\n * @param {() => void} callback The function to be executed after the timeout\n * @param {number} delay The delay in milliseconds before the timeout executes the callback function\n * @returns {UseTimeoutReturn} An object with a `ready` boolean state value and a `clear` function to clear timeout\n *\n * @example\n * const { clear, ready } = useTimeout(() => {}, 5000);\n */\nexport function useTimeout(callback: () => void, delay: number): UseTimeoutReturn {\n const [ready, setReady] = React.useState(false);\n\n const timeoutIdRef = React.useRef<ReturnType<typeof setTimeout>>();\n const internalCallback = useEvent(callback);\n\n React.useEffect(() => {\n timeoutIdRef.current = setTimeout(() => {\n internalCallback();\n setReady(true);\n }, delay);\n\n return () => {\n clearTimeout(timeoutIdRef.current);\n };\n }, [delay]);\n\n const clear = () => {\n clearTimeout(timeoutIdRef.current);\n setReady(true);\n };\n\n return { ready, clear };\n}\n"],"names":["useTimeout","callback","delay","_React$useState","React","useState","_React$useState2","_slicedToArray","ready","setReady","timeoutIdRef","useRef","internalCallback","useEvent","useEffect","current","setTimeout","clearTimeout","clear"],"mappings":";kPAuBO,SAASA,EAAWC,EAAsBC,GAC/C,IAAAC,EAA0BC,EAAMC,UAAS,GAAMC,EAAAC,EAAAJ,EAAA,GAAxCK,EAAKF,EAAA,GAAEG,EAAQH,EAAA,GAEhBI,EAAeN,EAAMO,SACrBC,EAAmBC,EAASZ,GAElCG,EAAMU,WAAU,WAMd,OALAJ,EAAaK,QAAUC,YAAW,WAChCJ,IACAH,GAAS,EACV,GAAEP,GAEI,WACLe,aAAaP,EAAaK,SAE9B,GAAG,CAACb,IAOJ,MAAO,CAAEM,MAAAA,EAAOU,MALF,WACZD,aAAaP,EAAaK,SAC1BN,GAAS,IAIb"}
1
+ {"version":3,"file":"useTimeout.js","sources":["../../../../src/hooks/useTimeout/useTimeout.ts"],"sourcesContent":["import React from 'react';\n\nimport { useEvent } from '../useEvent/useEvent';\n\n/** The use timeout return type */\ninterface UseTimeoutReturn {\n /** Timeout is ready state value */\n ready: boolean;\n /** Function to clear timeout */\n clear: () => void;\n}\n\n/**\n * @name useTimeout\n * @description - Hook that executes a callback function after a specified delay\n *\n * @param {() => void} callback The function to be executed after the timeout\n * @param {number} delay The delay in milliseconds before the timeout executes the callback function\n * @returns {UseTimeoutReturn} An object with a `ready` boolean state value and a `clear` function to clear timeout\n *\n * @example\n * const { clear, ready } = useTimeout(() => {}, 5000);\n */\nexport function useTimeout(callback: () => void, delay: number): UseTimeoutReturn {\n const [ready, setReady] = React.useState(false);\n\n const timeoutIdRef = React.useRef<ReturnType<typeof setTimeout>>();\n const internalCallback = useEvent(callback);\n\n React.useEffect(() => {\n timeoutIdRef.current = setTimeout(() => {\n internalCallback();\n setReady(true);\n }, delay);\n\n return () => {\n clearTimeout(timeoutIdRef.current);\n };\n }, [delay]);\n\n const clear = () => {\n clearTimeout(timeoutIdRef.current);\n setReady(true);\n };\n\n return { ready, clear };\n}\n"],"names":["useTimeout","callback","delay","_React$useState","React","useState","_React$useState2","_slicedToArray","ready","setReady","timeoutIdRef","useRef","internalCallback","useEvent","useEffect","current","setTimeout","clearTimeout","clear"],"mappings":";kPAuBO,SAASA,EAAWC,EAAsBC,GAC/C,IAAAC,EAA0BC,EAAMC,UAAS,GAAMC,EAAAC,EAAAJ,EAAA,GAAxCK,EAAKF,EAAA,GAAEG,EAAQH,EAAA,GAEhBI,EAAeN,EAAMO,SACrBC,EAAmBC,EAASZ,GAElCG,EAAMU,WAAU,WAMd,OALAJ,EAAaK,QAAUC,YAAW,WAChCJ,IACAH,GAAS,EACV,GAAEP,GAEI,WACLe,aAAaP,EAAaK,SAE9B,GAAG,CAACb,IAOJ,MAAO,CAAEM,MAAAA,EAAOU,MALF,WACZD,aAAaP,EAAaK,SAC1BN,GAAS,IAIb"}
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.23 */
2
- import{_ as r}from"../../_rollupPluginBabelHelpers-Ca7xtMt2.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};
1
+ /* @license @siberiacancode/reactuse v0.0.24 */
2
+ import{_ as r}from"../../_rollupPluginBabelHelpers-BK7XeaSH.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.23 */
1
+ /* @license @siberiacancode/reactuse v0.0.24 */
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
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.23 */
1
+ /* @license @siberiacancode/reactuse v0.0.24 */
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.23 */
2
- import{_ as i}from"../../_rollupPluginBabelHelpers-Ca7xtMt2.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};
1
+ /* @license @siberiacancode/reactuse v0.0.24 */
2
+ import{_ as i}from"../../_rollupPluginBabelHelpers-BK7XeaSH.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.23 */
2
- export{useBattery}from"./hooks/useBattery/useBattery.js";export{useBoolean}from"./hooks/useBoolean/useBoolean.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{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{useFavicon}from"./hooks/useFavicon/useFavicon.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{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{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";import"./_rollupPluginBabelHelpers-Ca7xtMt2.js";import"react";import"./hooks/useMutationObserver.js";import"screenfull";import"react-dom";
1
+ /* @license @siberiacancode/reactuse v0.0.24 */
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{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{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-BK7XeaSH.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.23 */
1
+ /* @license @siberiacancode/reactuse v0.0.24 */
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.23 */
1
+ /* @license @siberiacancode/reactuse v0.0.24 */
2
2
  var r=function(r){return"number"==typeof r?r:r?1:0};export{r as getRetry};
3
3
  //# sourceMappingURL=getRetry.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.23 */
2
- export{debounce}from"./debounce.js";export{getRetry}from"./getRetry.js";export{isClient}from"./isClient.js";export{throttle}from"./throttle.js";
1
+ /* @license @siberiacancode/reactuse v0.0.24 */
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.23 */
1
+ /* @license @siberiacancode/reactuse v0.0.24 */
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.23 */
1
+ /* @license @siberiacancode/reactuse v0.0.24 */
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
@@ -0,0 +1,3 @@
1
+ /* @license @siberiacancode/reactuse v0.0.24 */
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(),year:e.getFullYear(),timestamp:e.getTime()}};export{e as getDate};
3
+ //# sourceMappingURL=getDate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDate.js","sources":["../../../../../src/utils/helpers/time/getDate.ts"],"sourcesContent":["export const getDate = (now: Date = new Date()) => {\n const seconds = now.getSeconds();\n const minutes = now.getMinutes();\n const hours = now.getHours();\n const meridiemHours = hours % 12 === 0 ? 12 : hours % 12;\n const meridiemType = hours >= 12 ? 'pm' : 'am';\n const day = now.getDate();\n const month = now.getMonth();\n const year = now.getFullYear();\n const timestamp = now.getTime();\n\n return {\n seconds,\n minutes,\n hours,\n meridiemHours: { value: meridiemHours, type: meridiemType },\n day,\n month,\n year,\n timestamp\n };\n};\n"],"names":["getDate","now","arguments","length","undefined","Date","seconds","getSeconds","minutes","getMinutes","hours","getHours","meridiemHours","value","type","day","month","getMonth","year","getFullYear","timestamp","getTime"],"mappings":";IAAaA,EAAU,WAA4B,IAA3BC,EAASC,UAAAC,OAAAD,QAAAE,IAAAF,UAAAE,GAAAF,UAAA,GAAG,IAAIG,KAChCC,EAAUL,EAAIM,aACdC,EAAUP,EAAIQ,aACdC,EAAQT,EAAIU,WAQlB,MAAO,CACLL,QAAAA,EACAE,QAAAA,EACAE,MAAAA,EACAE,cAAe,CAAEC,MAXGH,EAAQ,IAAO,EAAI,GAAKA,EAAQ,GAWbI,KAVpBJ,GAAS,GAAK,KAAO,MAWxCK,IAVUd,EAAID,UAWdgB,MAVYf,EAAIgB,WAWhBC,KAVWjB,EAAIkB,cAWfC,UAVgBnB,EAAIoB,UAYxB"}
package/dist/index.d.ts CHANGED
@@ -45,6 +45,17 @@ type UseBooleanReturn = [
45
45
  */
46
46
  declare const useBoolean: (initialValue?: boolean) => UseBooleanReturn;
47
47
 
48
+ /**
49
+ * @name useBrowserLanguage
50
+ * @description - Hook that returns the current browser language
51
+ *
52
+ * @returns {string} The current browser language
53
+ *
54
+ * @example
55
+ * const browserLanguage = useBrowserLanguage();
56
+ */
57
+ declare const useBrowserLanguage: () => string;
58
+
48
59
  /** The use click outside target element type */
49
60
  type UseClickOutsideTarget = React.RefObject<Element | null> | (() => Element) | Element;
50
61
  /** The use click outside return type */
@@ -95,7 +106,7 @@ interface UseCopyToClipboardReturn {
95
106
  */
96
107
  declare const useCopyToClipboard: () => UseCopyToClipboardReturn;
97
108
 
98
- /** The use counter options type */
109
+ /** The use counter options */
99
110
  interface UseCounterOptions {
100
111
  /** The min of count value */
101
112
  min?: number;
@@ -136,16 +147,15 @@ type UseCounter = {
136
147
  * @param {number} [options.min=Number.NEGATIVE_INFINITY] The min of count value
137
148
  * @param {number} [options.max=Number.POSITIVE_INFINITY] The max of count value
138
149
  * @returns {UseCounterReturn} An object containing the current count and functions to interact with the counter
139
- *
140
- * @example
141
- * const { count, dec, inc, reset, set } = useCounter(5);
142
- *
150
+
143
151
  * @overload
144
152
  * @param {number} [params.initialValue=0] The initial number value
145
153
  * @param {number} [params.min=Number.NEGATIVE_INFINITY] The min of count value
146
154
  * @param {number} [params.max=Number.POSITIVE_INFINITY] The max of count value
147
155
  * @returns {UseCounterReturn} An object containing the current count and functions to interact with the counter
148
156
  *
157
+ * @example
158
+ * const { count, dec, inc, reset, set } = useCounter(5);
149
159
  *
150
160
  * @example
151
161
  * const { count, dec, inc, reset, set } = useCounter({ initialValue: 5, min: 0, max: 10 });
@@ -264,6 +274,17 @@ declare const useFavicon: (initialHref?: string) => {
264
274
  readonly set: (favicon: string) => void;
265
275
  };
266
276
 
277
+ /**
278
+ * @name useFps
279
+ * @description - Hook that measures frames per second
280
+ *
281
+ * @returns {number} A number which determines frames per second
282
+ *
283
+ * @example
284
+ * const fps = useFps();
285
+ */
286
+ declare const useFps: () => number;
287
+
267
288
  /** The use fullscreen target element type */
268
289
  type UseFullScreenTarget = React.RefObject<Element | null> | (() => Element) | Element;
269
290
  /** The use fullscreen options type */
@@ -912,6 +933,52 @@ declare const useOrientation: () => UseOrientationReturn;
912
933
  */
913
934
  declare const usePageLeave: (callback: () => void) => void;
914
935
 
936
+ interface UsePaintPencil {
937
+ /** Pencil color */
938
+ color?: string;
939
+ /** Pencil width */
940
+ width?: number;
941
+ /** Pencil opacity */
942
+ opacity?: number;
943
+ }
944
+ type UsePaintOptions = UsePaintPencil;
945
+ /** The use paint return type */
946
+ interface UsePaintReturn {
947
+ pencil: UsePaintPencil & {
948
+ set: React.Dispatch<React.SetStateAction<UsePaintPencil>>;
949
+ };
950
+ drawing: boolean;
951
+ }
952
+ type UsePaintTarget = React.RefObject<HTMLCanvasElement> | (() => HTMLCanvasElement) | HTMLCanvasElement;
953
+ declare const getTargetElement: (target: UsePaintTarget) => HTMLCanvasElement | null;
954
+ type UsePaint = {
955
+ <Target extends UsePaintTarget>(target: Target, options?: UsePaintOptions): UsePaintReturn;
956
+ (options?: UsePaintOptions, target?: never): UsePaintReturn & {
957
+ ref: React.RefObject<HTMLCanvasElement>;
958
+ };
959
+ };
960
+ /**
961
+ * @name usePaint
962
+ * @description - Hook that allows you to draw in a specific area
963
+ *
964
+ * @overload
965
+ * @template Target The target element
966
+ * @param {Target} target The target element to be painted
967
+ * @param {UsePaintOptions} [options] The options to be used
968
+ * @returns {UsePaintReturn} An object containing the current pencil options and functions to interact with the paint
969
+ *
970
+ * @example
971
+ * const { pencil, drawing } = usePaint(canvasRef);
972
+ *
973
+ * @overload
974
+ * @param {UsePaintOptions} [options] The options to be used
975
+ * @returns {UsePaintReturn & { ref: React.RefObject<HTMLCanvasElement> }} An object containing the current pencil options and functions to interact with the paint
976
+ *
977
+ * @example
978
+ * const { ref, pencil, drawing } = usePaint();
979
+ */
980
+ declare const usePaint: UsePaint;
981
+
915
982
  /** The use preferred color scheme return type */
916
983
  type UsePreferredColorSchemeReturn = 'dark' | 'light' | 'no-preference';
917
984
  /**
@@ -1204,6 +1271,30 @@ interface UseTextSelectionReturn {
1204
1271
  */
1205
1272
  declare const useTextSelection: () => UseTextSelectionReturn;
1206
1273
 
1274
+ interface UseTimeReturn {
1275
+ seconds: number;
1276
+ minutes: number;
1277
+ hours: number;
1278
+ meridiemHours: {
1279
+ value: number;
1280
+ type: string;
1281
+ };
1282
+ day: number;
1283
+ month: number;
1284
+ year: number;
1285
+ timestamp: number;
1286
+ }
1287
+ /**
1288
+ * @name useTime
1289
+ * @description - Hook that gives you current time in different values
1290
+ *
1291
+ * @returns {UseTimeReturn} An object containing the current time
1292
+ *
1293
+ * @example
1294
+ * const { seconds, minutes, hours, meridiemHours, day, month, year, timestamp } = useTime();
1295
+ */
1296
+ declare const useTime: () => UseTimeReturn;
1297
+
1207
1298
  /** The use timeout return type */
1208
1299
  interface UseTimeoutReturn {
1209
1300
  /** Timeout is ready state value */
@@ -1213,7 +1304,7 @@ interface UseTimeoutReturn {
1213
1304
  }
1214
1305
  /**
1215
1306
  * @name useTimeout
1216
- * @description Hook that executes a callback function after a specified delay
1307
+ * @description - Hook that executes a callback function after a specified delay
1217
1308
  *
1218
1309
  * @param {() => void} callback The function to be executed after the timeout
1219
1310
  * @param {number} delay The delay in milliseconds before the timeout executes the callback function
@@ -1306,4 +1397,18 @@ declare const isClient: boolean;
1306
1397
 
1307
1398
  declare const throttle: <Params extends any[]>(callback: (...args: Params) => void, delay: number) => ((...args: Params) => void);
1308
1399
 
1309
- 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 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 UsePreferredColorSchemeReturn, type UseQueueReturn, type UseScriptOptions, type UseScriptStatus, type UseStorageInitialValue, type UseStorageOptions, type UseStorageReturn, type UseTextSelectionReturn, type UseToggleReturn, type UseWindowSizeReturn, debounce, dispatchStorageEvent, getConnection, getOperatingSystem, getRangesSelection, getRetry, isClient, isHotkeyMatch, legacyCopyToClipboard, throttle, useBattery, useBoolean, useClickOutside, useCopyToClipboard, useCounter, useDebouncedValue, useDefault, useDidUpdate, useDocumentTitle, useDocumentVisibility, useEvent, useEventListener, useFavicon, 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, usePreferredColorScheme, usePreferredLanguages, usePrevious, useQuery, useQueue, useRenderCount, useRerender, useScript, useSessionStorage, useSet, useStep, useStorage, useTextSelection, useTimeout, useToggle, useUnmount, useWindowEvent, useWindowSize };
1400
+ declare const getDate: (now?: Date) => {
1401
+ seconds: number;
1402
+ minutes: number;
1403
+ hours: number;
1404
+ meridiemHours: {
1405
+ value: number;
1406
+ type: string;
1407
+ };
1408
+ day: number;
1409
+ month: number;
1410
+ year: number;
1411
+ timestamp: number;
1412
+ };
1413
+
1414
+ 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 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, useDocumentTitle, useDocumentVisibility, useEvent, useEventListener, 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@siberiacancode/reactuse",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "description": "Ultimate tool",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"_rollupPluginBabelHelpers-OXydtwwP.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_rollupPluginBabelHelpers-Ca7xtMt2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}