@siberiacancode/reactuse 0.0.41 → 0.0.42

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 (320) hide show
  1. package/dist/cjs/{_rollupPluginBabelHelpers-CHVPwOFq.js → _rollupPluginBabelHelpers-CLCmCKJk.js} +3 -3
  2. package/dist/cjs/_rollupPluginBabelHelpers-CLCmCKJk.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/useBattery/useBattery.js.map +1 -1
  6. package/dist/cjs/hooks/useBoolean/useBoolean.js +2 -2
  7. package/dist/cjs/hooks/useBoolean/useBoolean.js.map +1 -1
  8. package/dist/cjs/hooks/useBrowserLanguage/useBrowserLanguage.js +1 -1
  9. package/dist/cjs/hooks/useBrowserLanguage/useBrowserLanguage.js.map +1 -1
  10. package/dist/cjs/hooks/useClickOutside/useClickOutside.js +1 -1
  11. package/dist/cjs/hooks/useClickOutside/useClickOutside.js.map +1 -1
  12. package/dist/cjs/hooks/useCopyToClipboard/useCopyToClipboard.js +2 -2
  13. package/dist/cjs/hooks/useCopyToClipboard/useCopyToClipboard.js.map +1 -1
  14. package/dist/cjs/hooks/useCounter/useCounter.js +2 -2
  15. package/dist/cjs/hooks/useCounter/useCounter.js.map +1 -1
  16. package/dist/cjs/hooks/useDebounceCallback/useDebounceCallback.js +1 -1
  17. package/dist/cjs/hooks/useDebounceCallback/useDebounceCallback.js.map +1 -1
  18. package/dist/cjs/hooks/useDebounceValue/useDebounceValue.js +2 -2
  19. package/dist/cjs/hooks/useDebounceValue/useDebounceValue.js.map +1 -1
  20. package/dist/cjs/hooks/useDefault/useDefault.js +2 -2
  21. package/dist/cjs/hooks/useDefault/useDefault.js.map +1 -1
  22. package/dist/cjs/hooks/useDidUpdate/useDidUpdate.js +1 -1
  23. package/dist/cjs/hooks/useDidUpdate/useDidUpdate.js.map +1 -1
  24. package/dist/cjs/hooks/useDisclosure/useDisclosure.js +2 -2
  25. package/dist/cjs/hooks/useDisclosure/useDisclosure.js.map +1 -1
  26. package/dist/cjs/hooks/useDocumentEvent/useDocumentEvent.js +1 -1
  27. package/dist/cjs/hooks/useDocumentEvent/useDocumentEvent.js.map +1 -1
  28. package/dist/cjs/hooks/useDocumentTitle/useDocumentTitle.js +2 -2
  29. package/dist/cjs/hooks/useDocumentTitle/useDocumentTitle.js.map +1 -1
  30. package/dist/cjs/hooks/useDocumentVisibility/useDocumentVisibility.js +1 -1
  31. package/dist/cjs/hooks/useDocumentVisibility/useDocumentVisibility.js.map +1 -1
  32. package/dist/cjs/hooks/useEvent/useEvent.js +1 -1
  33. package/dist/cjs/hooks/useEvent/useEvent.js.map +1 -1
  34. package/dist/cjs/hooks/useEventListener/useEventListener.js +1 -1
  35. package/dist/cjs/hooks/useEyeDropper/useEyeDropper.js +2 -2
  36. package/dist/cjs/hooks/useEyeDropper/useEyeDropper.js.map +1 -1
  37. package/dist/cjs/hooks/useFavicon/useFavicon.js +2 -2
  38. package/dist/cjs/hooks/useFavicon/useFavicon.js.map +1 -1
  39. package/dist/cjs/hooks/useField/useField.js +2 -2
  40. package/dist/cjs/hooks/useField/useField.js.map +1 -1
  41. package/dist/cjs/hooks/useFps/useFps.js +2 -2
  42. package/dist/cjs/hooks/useFps/useFps.js.map +1 -1
  43. package/dist/cjs/hooks/useFullscreen/useFullscreen.js +2 -2
  44. package/dist/cjs/hooks/useFullscreen/useFullscreen.js.map +1 -1
  45. package/dist/cjs/hooks/useHash/useHash.js +2 -2
  46. package/dist/cjs/hooks/useHash/useHash.js.map +1 -1
  47. package/dist/cjs/hooks/useHotkeys/useHotkeys.js +2 -2
  48. package/dist/cjs/hooks/useHotkeys/useHotkeys.js.map +1 -1
  49. package/dist/cjs/hooks/useHover/useHover.js +2 -2
  50. package/dist/cjs/hooks/useHover/useHover.js.map +1 -1
  51. package/dist/cjs/hooks/useIdle/useIdle.js +2 -2
  52. package/dist/cjs/hooks/useIdle/useIdle.js.map +1 -1
  53. package/dist/cjs/hooks/useIntersectionObserver/useIntersectionObserver.js +2 -2
  54. package/dist/cjs/hooks/useInterval/useInterval.js +2 -2
  55. package/dist/cjs/hooks/useInterval/useInterval.js.map +1 -1
  56. package/dist/cjs/hooks/useIsFirstRender/useIsFirstRender.js +1 -1
  57. package/dist/cjs/hooks/useIsFirstRender/useIsFirstRender.js.map +1 -1
  58. package/dist/cjs/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +1 -1
  59. package/dist/cjs/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js.map +1 -1
  60. package/dist/cjs/hooks/useKeyPress/useKeyPress.js +2 -2
  61. package/dist/cjs/hooks/useKeyPress/useKeyPress.js.map +1 -1
  62. package/dist/cjs/hooks/useKeyPressEvent/useKeyPressEvent.js +1 -1
  63. package/dist/cjs/hooks/useKeyboard/useKeyboard.js +1 -1
  64. package/dist/cjs/hooks/useKeyboard/useKeyboard.js.map +1 -1
  65. package/dist/cjs/hooks/useKeysPressed/useKeysPressed.js +2 -2
  66. package/dist/cjs/hooks/useKeysPressed/useKeysPressed.js.map +1 -1
  67. package/dist/cjs/hooks/useList/useList.js +2 -2
  68. package/dist/cjs/hooks/useList/useList.js.map +1 -1
  69. package/dist/cjs/hooks/useLocalStorage/useLocalStorage.js +2 -2
  70. package/dist/cjs/hooks/useLocalStorage/useLocalStorage.js.map +1 -1
  71. package/dist/cjs/hooks/useLogger/useLogger.js +2 -2
  72. package/dist/cjs/hooks/useLogger/useLogger.js.map +1 -1
  73. package/dist/cjs/hooks/useLongPress/useLongPress.js +2 -2
  74. package/dist/cjs/hooks/useLongPress/useLongPress.js.map +1 -1
  75. package/dist/cjs/hooks/useMap/useMap.js +2 -2
  76. package/dist/cjs/hooks/useMap/useMap.js.map +1 -1
  77. package/dist/cjs/hooks/useMediaQuery/useMediaQuery.js +1 -1
  78. package/dist/cjs/hooks/useMediaQuery/useMediaQuery.js.map +1 -1
  79. package/dist/cjs/hooks/useMemory/useMemory.js +2 -2
  80. package/dist/cjs/hooks/useMemory/useMemory.js.map +1 -1
  81. package/dist/cjs/hooks/useMount/useMount.js +1 -1
  82. package/dist/cjs/hooks/useMount/useMount.js.map +1 -1
  83. package/dist/cjs/hooks/useMouse/useMouse.js +2 -2
  84. package/dist/cjs/hooks/useMouse/useMouse.js.map +1 -1
  85. package/dist/cjs/hooks/useMutation/useMutation.js +2 -2
  86. package/dist/cjs/hooks/useMutation/useMutation.js.map +1 -1
  87. package/dist/cjs/hooks/useMutationObserver.js +1 -1
  88. package/dist/cjs/hooks/useNetwork/useNetwork.js +2 -2
  89. package/dist/cjs/hooks/useNetwork/useNetwork.js.map +1 -1
  90. package/dist/cjs/hooks/useOnline/useOnline.js +1 -1
  91. package/dist/cjs/hooks/useOnline/useOnline.js.map +1 -1
  92. package/dist/cjs/hooks/useOperatingSystem/useOperatingSystem.js +1 -1
  93. package/dist/cjs/hooks/useOperatingSystem/useOperatingSystem.js.map +1 -1
  94. package/dist/cjs/hooks/useOrientation/useOrientation.js +2 -2
  95. package/dist/cjs/hooks/useOrientation/useOrientation.js.map +1 -1
  96. package/dist/cjs/hooks/usePageLeave/usePageLeave.js +2 -2
  97. package/dist/cjs/hooks/usePageLeave/usePageLeave.js.map +1 -1
  98. package/dist/cjs/hooks/usePaint/helpers/Paint.js +3 -0
  99. package/dist/cjs/hooks/usePaint/helpers/Paint.js.map +1 -0
  100. package/dist/cjs/hooks/usePaint/helpers/Pointer.js +3 -0
  101. package/dist/cjs/hooks/usePaint/helpers/Pointer.js.map +1 -0
  102. package/dist/cjs/hooks/usePaint/usePaint.js +2 -2
  103. package/dist/cjs/hooks/usePaint/usePaint.js.map +1 -1
  104. package/dist/cjs/hooks/usePermission/usePermission.js +2 -2
  105. package/dist/cjs/hooks/usePermission/usePermission.js.map +1 -1
  106. package/dist/cjs/hooks/usePreferredColorScheme/usePreferredColorScheme.js +1 -1
  107. package/dist/cjs/hooks/usePreferredColorScheme/usePreferredColorScheme.js.map +1 -1
  108. package/dist/cjs/hooks/usePreferredLanguages/usePreferredLanguages.js +1 -1
  109. package/dist/cjs/hooks/usePreferredLanguages/usePreferredLanguages.js.map +1 -1
  110. package/dist/cjs/hooks/usePrevious/usePrevious.js +1 -1
  111. package/dist/cjs/hooks/usePrevious/usePrevious.js.map +1 -1
  112. package/dist/cjs/hooks/useQuery/useQuery.js +2 -2
  113. package/dist/cjs/hooks/useQuery/useQuery.js.map +1 -1
  114. package/dist/cjs/hooks/useQueue/useQueue.js +2 -2
  115. package/dist/cjs/hooks/useQueue/useQueue.js.map +1 -1
  116. package/dist/cjs/hooks/useRenderCount/useRenderCount.js +1 -1
  117. package/dist/cjs/hooks/useRenderCount/useRenderCount.js.map +1 -1
  118. package/dist/cjs/hooks/useRenderInfo/useRenderInfo.js +1 -1
  119. package/dist/cjs/hooks/useRenderInfo/useRenderInfo.js.map +1 -1
  120. package/dist/cjs/hooks/useRerender/useRerender.js +2 -2
  121. package/dist/cjs/hooks/useRerender/useRerender.js.map +1 -1
  122. package/dist/cjs/hooks/useScript/useScript.js +2 -2
  123. package/dist/cjs/hooks/useScript/useScript.js.map +1 -1
  124. package/dist/cjs/hooks/useSessionStorage/useSessionStorage.js +2 -2
  125. package/dist/cjs/hooks/useSessionStorage/useSessionStorage.js.map +1 -1
  126. package/dist/cjs/hooks/useSet/useSet.js +2 -2
  127. package/dist/cjs/hooks/useSet/useSet.js.map +1 -1
  128. package/dist/cjs/hooks/useShare/useShare.js +2 -2
  129. package/dist/cjs/hooks/useShare/useShare.js.map +1 -1
  130. package/dist/cjs/hooks/useStep/useStep.js +2 -2
  131. package/dist/cjs/hooks/useStep/useStep.js.map +1 -1
  132. package/dist/cjs/hooks/useStorage/useStorage.js +2 -2
  133. package/dist/cjs/hooks/useTextSelection/useTextSelection.js +2 -2
  134. package/dist/cjs/hooks/useTextSelection/useTextSelection.js.map +1 -1
  135. package/dist/cjs/hooks/useTime/useTime.js +2 -2
  136. package/dist/cjs/hooks/useTime/useTime.js.map +1 -1
  137. package/dist/cjs/hooks/useTimeout/useTimeout.js +2 -2
  138. package/dist/cjs/hooks/useTimeout/useTimeout.js.map +1 -1
  139. package/dist/cjs/hooks/useToggle/useToggle.js +2 -2
  140. package/dist/cjs/hooks/useToggle/useToggle.js.map +1 -1
  141. package/dist/cjs/hooks/useUnmount/useUnmount.js +1 -1
  142. package/dist/cjs/hooks/useUnmount/useUnmount.js.map +1 -1
  143. package/dist/cjs/hooks/useWebSocket/useWebSocket.js +2 -2
  144. package/dist/cjs/hooks/useWebSocket/useWebSocket.js.map +1 -1
  145. package/dist/cjs/hooks/useWindowEvent/useWindowEvent.js +1 -1
  146. package/dist/cjs/hooks/useWindowEvent/useWindowEvent.js.map +1 -1
  147. package/dist/cjs/hooks/useWindowSize/useWindowSize.js +2 -2
  148. package/dist/cjs/hooks/useWindowSize/useWindowSize.js.map +1 -1
  149. package/dist/cjs/hooks/useWizard/useWizard.js +2 -2
  150. package/dist/cjs/hooks/useWizard/useWizard.js.map +1 -1
  151. package/dist/cjs/index.js +2 -2
  152. package/dist/cjs/utils/helpers/debounce.js +1 -1
  153. package/dist/cjs/utils/helpers/getRetry.js +1 -1
  154. package/dist/cjs/utils/helpers/index.js +1 -1
  155. package/dist/cjs/utils/helpers/isClient.js +1 -1
  156. package/dist/cjs/utils/helpers/throttle.js +1 -1
  157. package/dist/cjs/utils/helpers/time/getDate.js +1 -1
  158. package/dist/cjs/utils/types/index.js +1 -1
  159. package/dist/esm/{_rollupPluginBabelHelpers-O3NENgAs.js → _rollupPluginBabelHelpers-BvpZjoHU.js} +3 -3
  160. package/dist/esm/_rollupPluginBabelHelpers-BvpZjoHU.js.map +1 -0
  161. package/dist/esm/hooks/index.js +2 -2
  162. package/dist/esm/hooks/useBattery/useBattery.js +2 -2
  163. package/dist/esm/hooks/useBattery/useBattery.js.map +1 -1
  164. package/dist/esm/hooks/useBoolean/useBoolean.js +2 -2
  165. package/dist/esm/hooks/useBoolean/useBoolean.js.map +1 -1
  166. package/dist/esm/hooks/useBrowserLanguage/useBrowserLanguage.js +1 -1
  167. package/dist/esm/hooks/useBrowserLanguage/useBrowserLanguage.js.map +1 -1
  168. package/dist/esm/hooks/useClickOutside/useClickOutside.js +1 -1
  169. package/dist/esm/hooks/useClickOutside/useClickOutside.js.map +1 -1
  170. package/dist/esm/hooks/useCopyToClipboard/useCopyToClipboard.js +2 -2
  171. package/dist/esm/hooks/useCopyToClipboard/useCopyToClipboard.js.map +1 -1
  172. package/dist/esm/hooks/useCounter/useCounter.js +2 -2
  173. package/dist/esm/hooks/useCounter/useCounter.js.map +1 -1
  174. package/dist/esm/hooks/useDebounceCallback/useDebounceCallback.js +1 -1
  175. package/dist/esm/hooks/useDebounceCallback/useDebounceCallback.js.map +1 -1
  176. package/dist/esm/hooks/useDebounceValue/useDebounceValue.js +2 -2
  177. package/dist/esm/hooks/useDebounceValue/useDebounceValue.js.map +1 -1
  178. package/dist/esm/hooks/useDefault/useDefault.js +2 -2
  179. package/dist/esm/hooks/useDefault/useDefault.js.map +1 -1
  180. package/dist/esm/hooks/useDidUpdate/useDidUpdate.js +1 -1
  181. package/dist/esm/hooks/useDidUpdate/useDidUpdate.js.map +1 -1
  182. package/dist/esm/hooks/useDisclosure/useDisclosure.js +2 -2
  183. package/dist/esm/hooks/useDisclosure/useDisclosure.js.map +1 -1
  184. package/dist/esm/hooks/useDocumentEvent/useDocumentEvent.js +1 -1
  185. package/dist/esm/hooks/useDocumentEvent/useDocumentEvent.js.map +1 -1
  186. package/dist/esm/hooks/useDocumentTitle/useDocumentTitle.js +2 -2
  187. package/dist/esm/hooks/useDocumentTitle/useDocumentTitle.js.map +1 -1
  188. package/dist/esm/hooks/useDocumentVisibility/useDocumentVisibility.js +1 -1
  189. package/dist/esm/hooks/useDocumentVisibility/useDocumentVisibility.js.map +1 -1
  190. package/dist/esm/hooks/useEvent/useEvent.js +1 -1
  191. package/dist/esm/hooks/useEvent/useEvent.js.map +1 -1
  192. package/dist/esm/hooks/useEventListener/useEventListener.js +1 -1
  193. package/dist/esm/hooks/useEyeDropper/useEyeDropper.js +2 -2
  194. package/dist/esm/hooks/useEyeDropper/useEyeDropper.js.map +1 -1
  195. package/dist/esm/hooks/useFavicon/useFavicon.js +2 -2
  196. package/dist/esm/hooks/useFavicon/useFavicon.js.map +1 -1
  197. package/dist/esm/hooks/useField/useField.js +2 -2
  198. package/dist/esm/hooks/useField/useField.js.map +1 -1
  199. package/dist/esm/hooks/useFps/useFps.js +2 -2
  200. package/dist/esm/hooks/useFps/useFps.js.map +1 -1
  201. package/dist/esm/hooks/useFullscreen/useFullscreen.js +2 -2
  202. package/dist/esm/hooks/useFullscreen/useFullscreen.js.map +1 -1
  203. package/dist/esm/hooks/useHash/useHash.js +2 -2
  204. package/dist/esm/hooks/useHash/useHash.js.map +1 -1
  205. package/dist/esm/hooks/useHotkeys/useHotkeys.js +2 -2
  206. package/dist/esm/hooks/useHotkeys/useHotkeys.js.map +1 -1
  207. package/dist/esm/hooks/useHover/useHover.js +2 -2
  208. package/dist/esm/hooks/useHover/useHover.js.map +1 -1
  209. package/dist/esm/hooks/useIdle/useIdle.js +2 -2
  210. package/dist/esm/hooks/useIdle/useIdle.js.map +1 -1
  211. package/dist/esm/hooks/useIntersectionObserver/useIntersectionObserver.js +2 -2
  212. package/dist/esm/hooks/useInterval/useInterval.js +2 -2
  213. package/dist/esm/hooks/useInterval/useInterval.js.map +1 -1
  214. package/dist/esm/hooks/useIsFirstRender/useIsFirstRender.js +1 -1
  215. package/dist/esm/hooks/useIsFirstRender/useIsFirstRender.js.map +1 -1
  216. package/dist/esm/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +1 -1
  217. package/dist/esm/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js.map +1 -1
  218. package/dist/esm/hooks/useKeyPress/useKeyPress.js +2 -2
  219. package/dist/esm/hooks/useKeyPress/useKeyPress.js.map +1 -1
  220. package/dist/esm/hooks/useKeyPressEvent/useKeyPressEvent.js +1 -1
  221. package/dist/esm/hooks/useKeyboard/useKeyboard.js +1 -1
  222. package/dist/esm/hooks/useKeyboard/useKeyboard.js.map +1 -1
  223. package/dist/esm/hooks/useKeysPressed/useKeysPressed.js +2 -2
  224. package/dist/esm/hooks/useKeysPressed/useKeysPressed.js.map +1 -1
  225. package/dist/esm/hooks/useList/useList.js +2 -2
  226. package/dist/esm/hooks/useList/useList.js.map +1 -1
  227. package/dist/esm/hooks/useLocalStorage/useLocalStorage.js +2 -2
  228. package/dist/esm/hooks/useLocalStorage/useLocalStorage.js.map +1 -1
  229. package/dist/esm/hooks/useLogger/useLogger.js +2 -2
  230. package/dist/esm/hooks/useLogger/useLogger.js.map +1 -1
  231. package/dist/esm/hooks/useLongPress/useLongPress.js +2 -2
  232. package/dist/esm/hooks/useLongPress/useLongPress.js.map +1 -1
  233. package/dist/esm/hooks/useMap/useMap.js +2 -2
  234. package/dist/esm/hooks/useMap/useMap.js.map +1 -1
  235. package/dist/esm/hooks/useMediaQuery/useMediaQuery.js +1 -1
  236. package/dist/esm/hooks/useMediaQuery/useMediaQuery.js.map +1 -1
  237. package/dist/esm/hooks/useMemory/useMemory.js +2 -2
  238. package/dist/esm/hooks/useMemory/useMemory.js.map +1 -1
  239. package/dist/esm/hooks/useMount/useMount.js +1 -1
  240. package/dist/esm/hooks/useMount/useMount.js.map +1 -1
  241. package/dist/esm/hooks/useMouse/useMouse.js +2 -2
  242. package/dist/esm/hooks/useMouse/useMouse.js.map +1 -1
  243. package/dist/esm/hooks/useMutation/useMutation.js +2 -2
  244. package/dist/esm/hooks/useMutation/useMutation.js.map +1 -1
  245. package/dist/esm/hooks/useMutationObserver.js +1 -1
  246. package/dist/esm/hooks/useNetwork/useNetwork.js +2 -2
  247. package/dist/esm/hooks/useNetwork/useNetwork.js.map +1 -1
  248. package/dist/esm/hooks/useOnline/useOnline.js +1 -1
  249. package/dist/esm/hooks/useOnline/useOnline.js.map +1 -1
  250. package/dist/esm/hooks/useOperatingSystem/useOperatingSystem.js +1 -1
  251. package/dist/esm/hooks/useOperatingSystem/useOperatingSystem.js.map +1 -1
  252. package/dist/esm/hooks/useOrientation/useOrientation.js +2 -2
  253. package/dist/esm/hooks/useOrientation/useOrientation.js.map +1 -1
  254. package/dist/esm/hooks/usePageLeave/usePageLeave.js +2 -2
  255. package/dist/esm/hooks/usePageLeave/usePageLeave.js.map +1 -1
  256. package/dist/esm/hooks/usePaint/helpers/Paint.js +3 -0
  257. package/dist/esm/hooks/usePaint/helpers/Paint.js.map +1 -0
  258. package/dist/esm/hooks/usePaint/helpers/Pointer.js +3 -0
  259. package/dist/esm/hooks/usePaint/helpers/Pointer.js.map +1 -0
  260. package/dist/esm/hooks/usePaint/usePaint.js +2 -2
  261. package/dist/esm/hooks/usePaint/usePaint.js.map +1 -1
  262. package/dist/esm/hooks/usePermission/usePermission.js +2 -2
  263. package/dist/esm/hooks/usePermission/usePermission.js.map +1 -1
  264. package/dist/esm/hooks/usePreferredColorScheme/usePreferredColorScheme.js +1 -1
  265. package/dist/esm/hooks/usePreferredColorScheme/usePreferredColorScheme.js.map +1 -1
  266. package/dist/esm/hooks/usePreferredLanguages/usePreferredLanguages.js +1 -1
  267. package/dist/esm/hooks/usePreferredLanguages/usePreferredLanguages.js.map +1 -1
  268. package/dist/esm/hooks/usePrevious/usePrevious.js +1 -1
  269. package/dist/esm/hooks/usePrevious/usePrevious.js.map +1 -1
  270. package/dist/esm/hooks/useQuery/useQuery.js +2 -2
  271. package/dist/esm/hooks/useQuery/useQuery.js.map +1 -1
  272. package/dist/esm/hooks/useQueue/useQueue.js +2 -2
  273. package/dist/esm/hooks/useQueue/useQueue.js.map +1 -1
  274. package/dist/esm/hooks/useRenderCount/useRenderCount.js +1 -1
  275. package/dist/esm/hooks/useRenderCount/useRenderCount.js.map +1 -1
  276. package/dist/esm/hooks/useRenderInfo/useRenderInfo.js +1 -1
  277. package/dist/esm/hooks/useRenderInfo/useRenderInfo.js.map +1 -1
  278. package/dist/esm/hooks/useRerender/useRerender.js +2 -2
  279. package/dist/esm/hooks/useRerender/useRerender.js.map +1 -1
  280. package/dist/esm/hooks/useScript/useScript.js +2 -2
  281. package/dist/esm/hooks/useScript/useScript.js.map +1 -1
  282. package/dist/esm/hooks/useSessionStorage/useSessionStorage.js +2 -2
  283. package/dist/esm/hooks/useSessionStorage/useSessionStorage.js.map +1 -1
  284. package/dist/esm/hooks/useSet/useSet.js +2 -2
  285. package/dist/esm/hooks/useSet/useSet.js.map +1 -1
  286. package/dist/esm/hooks/useShare/useShare.js +2 -2
  287. package/dist/esm/hooks/useShare/useShare.js.map +1 -1
  288. package/dist/esm/hooks/useStep/useStep.js +2 -2
  289. package/dist/esm/hooks/useStep/useStep.js.map +1 -1
  290. package/dist/esm/hooks/useStorage/useStorage.js +2 -2
  291. package/dist/esm/hooks/useTextSelection/useTextSelection.js +2 -2
  292. package/dist/esm/hooks/useTextSelection/useTextSelection.js.map +1 -1
  293. package/dist/esm/hooks/useTime/useTime.js +2 -2
  294. package/dist/esm/hooks/useTime/useTime.js.map +1 -1
  295. package/dist/esm/hooks/useTimeout/useTimeout.js +2 -2
  296. package/dist/esm/hooks/useTimeout/useTimeout.js.map +1 -1
  297. package/dist/esm/hooks/useToggle/useToggle.js +2 -2
  298. package/dist/esm/hooks/useToggle/useToggle.js.map +1 -1
  299. package/dist/esm/hooks/useUnmount/useUnmount.js +1 -1
  300. package/dist/esm/hooks/useUnmount/useUnmount.js.map +1 -1
  301. package/dist/esm/hooks/useWebSocket/useWebSocket.js +2 -2
  302. package/dist/esm/hooks/useWebSocket/useWebSocket.js.map +1 -1
  303. package/dist/esm/hooks/useWindowEvent/useWindowEvent.js +1 -1
  304. package/dist/esm/hooks/useWindowEvent/useWindowEvent.js.map +1 -1
  305. package/dist/esm/hooks/useWindowSize/useWindowSize.js +2 -2
  306. package/dist/esm/hooks/useWindowSize/useWindowSize.js.map +1 -1
  307. package/dist/esm/hooks/useWizard/useWizard.js +2 -2
  308. package/dist/esm/hooks/useWizard/useWizard.js.map +1 -1
  309. package/dist/esm/index.js +2 -2
  310. package/dist/esm/utils/helpers/debounce.js +1 -1
  311. package/dist/esm/utils/helpers/getRetry.js +1 -1
  312. package/dist/esm/utils/helpers/index.js +1 -1
  313. package/dist/esm/utils/helpers/isClient.js +1 -1
  314. package/dist/esm/utils/helpers/throttle.js +1 -1
  315. package/dist/esm/utils/helpers/time/getDate.js +1 -1
  316. package/dist/esm/utils/types/index.js +1 -1
  317. package/dist/index.d.ts +159 -35
  318. package/package.json +1 -1
  319. package/dist/cjs/_rollupPluginBabelHelpers-CHVPwOFq.js.map +0 -1
  320. package/dist/esm/_rollupPluginBabelHelpers-O3NENgAs.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -25,6 +25,7 @@ interface UseBatteryStateReturn {
25
25
  /**
26
26
  * @name useBattery
27
27
  * @description - Hook for getting information about battery status
28
+ * @category Browser
28
29
  *
29
30
  * @returns {UseBatteryStateReturn} Object containing battery information & Battery API support
30
31
  *
@@ -43,6 +44,7 @@ type UseBooleanReturn = [
43
44
  /**
44
45
  * @name useBoolean
45
46
  * @description - Hook provides a boolean state and a function to toggle the boolean value
47
+ * @category Utilities
46
48
  *
47
49
  * @param {boolean} [initialValue=false] The initial boolean value
48
50
  * @returns {UseBooleanReturn} An object containing the boolean state value and utility functions to manipulate the state
@@ -55,6 +57,7 @@ declare const useBoolean: (initialValue?: boolean) => UseBooleanReturn;
55
57
  /**
56
58
  * @name useBrowserLanguage
57
59
  * @description - Hook that returns the current browser language
60
+ * @category Browser
58
61
  *
59
62
  * @returns {string} The current browser language
60
63
  *
@@ -74,6 +77,7 @@ type UseClickOutside = {
74
77
  /**
75
78
  * @name useClickOutside
76
79
  * @description - Hook to handle click events outside the specified target element(s)
80
+ * @category Sensors
77
81
  *
78
82
  * @overload
79
83
  * @template Target The target element(s)
@@ -104,6 +108,7 @@ interface UseCopyToClipboardReturn {
104
108
  /**
105
109
  * @name useCopyToClipboard
106
110
  * @description - Hook that manages a copy to clipboard
111
+ * @category Browser
107
112
  *
108
113
  * @returns {UseCopyToClipboardReturn} An object containing the boolean state value and utility functions to manipulate the state
109
114
  *
@@ -147,6 +152,7 @@ type UseCounter = {
147
152
  /**
148
153
  * @name useCounter
149
154
  * @description - Hook that manages a counter with increment, decrement, reset, and set functionalities
155
+ * @category Utilities
150
156
  *
151
157
  * @overload
152
158
  * @param {number} [initialValue=0] The initial number value
@@ -171,6 +177,7 @@ declare const useCounter: UseCounter;
171
177
  /**
172
178
  * @name useDebounceCallback
173
179
  * @description - Hook that creates a debounced callback and returns a stable reference of it
180
+ * @category Utilities
174
181
  *
175
182
  * @template Params The type of the params
176
183
  * @template Return The type of the return
@@ -186,6 +193,7 @@ declare const useDebounceCallback: <Params extends unknown[], Return>(callback:
186
193
  /**
187
194
  * @name useDebounceValue
188
195
  * @description - Hook that creates a debounced value and returns a stable reference of it
196
+ * @category Utilities
189
197
  *
190
198
  * @template Value The type of the value
191
199
  * @param {Value} value The value to be debounced
@@ -200,6 +208,7 @@ declare const useDebounceValue: <Value>(value: Value, delay: number) => Value;
200
208
  /**
201
209
  * @name useDefault
202
210
  * @description - Hook that returns the default value
211
+ * @category Utilities
203
212
  *
204
213
  * @template Value The type of the value
205
214
  * @param {Value} initialValue The initial value
@@ -214,6 +223,7 @@ declare const useDefault: <Value>(initialValue: Value | (() => Value), defaultVa
214
223
  /**
215
224
  * @name useDidUpdate
216
225
  * @description – Hook that behaves like useEffect, but skips the effect on the initial render
226
+ * @category Lifecycle
217
227
  *
218
228
  * @param {EffectCallback} effect The effect callback
219
229
  * @param {DependencyList} [deps] The dependencies list for the effect
@@ -236,6 +246,7 @@ interface UseDisclosureReturn {
236
246
  /**
237
247
  * @name useDisclosure
238
248
  * @description - Hook that allows you to open and close a modal
249
+ * @category Utilities
239
250
  *
240
251
  * @param {boolean} initialValue The initial value of the component
241
252
  * @param {() => void} [options.onOpen] The callback function to be invoked on open
@@ -262,6 +273,7 @@ declare const useEventListener: UseEventListener;
262
273
  /**
263
274
  * @name useDocumentEvent
264
275
  * @description - Hook attaches an event listener to the document object for the specified event
276
+ * @category Browser
265
277
  *
266
278
  * @template Event Key of document event map.
267
279
  * @param {Event} event The event to listen for.
@@ -289,6 +301,7 @@ type UseDocumentTitleReturn = [
289
301
  /**
290
302
  * @name useDocumentTitle
291
303
  * @description - Hook that manages the document title and allows updating it
304
+ * @category Browser
292
305
  *
293
306
  * @param {string} [value] The initial title. If not provided, the current document title will be used
294
307
  * @param {boolean} [options.restoreOnUnmount] Restore the previous title on unmount
@@ -302,6 +315,7 @@ declare function useDocumentTitle(value?: string, options?: UseDocumentTitleOpti
302
315
  /**
303
316
  * @name useDocumentVisibility
304
317
  * @description – Hook that provides the current visibility state of the document
318
+ * @category Browser
305
319
  *
306
320
  * @returns {DocumentVisibilityState} The current visibility state of the document, which can be 'visible' or 'hidden'
307
321
  *
@@ -313,6 +327,7 @@ declare const useDocumentVisibility: () => DocumentVisibilityState;
313
327
  /**
314
328
  * @name useEvent
315
329
  * @description - Hook that creates an event and returns a stable reference of it
330
+ * @category Browser
316
331
  *
317
332
  * @template Params The type of the params
318
333
  * @template Return The type of the return
@@ -338,6 +353,7 @@ interface UseEyeDropperReturn {
338
353
  /**
339
354
  * @name useEyeDropper
340
355
  * @description - Hook that gives you access to the eye dropper
356
+ * @category Browser
341
357
  *
342
358
  * @param {string} [initialValue=undefined] The initial value for the eye dropper
343
359
  * @returns {UseEyeDropperReturn} An object containing the supported status, the value and the open method
@@ -350,6 +366,7 @@ declare const useEyeDropper: (initialValue?: string | undefined) => UseEyeDroppe
350
366
  /**
351
367
  * @name useFavicon
352
368
  * @description - Hook that manages the favicon
369
+ * @category Browser
353
370
  *
354
371
  * @param {string} [initialFavicon] The initial favicon. If not provided, the current favicon will be used
355
372
  * @returns {UseFaviconReturn} An array containing the current favicon and a function to update the favicon
@@ -439,8 +456,9 @@ interface UseFieldReturn<Value> {
439
456
  clearError: () => void;
440
457
  }
441
458
  /**
442
- * @name UseField
459
+ * @name useField
443
460
  * @description - Hook to manage a form field
461
+ * @category Utilities
444
462
  *
445
463
  * @template Value The input value
446
464
  * @template Type The input value type
@@ -460,6 +478,7 @@ declare const useField: <Value extends string | boolean = string, Type = Value e
460
478
  /**
461
479
  * @name useFps
462
480
  * @description - Hook that measures frames per second
481
+ * @category Sensors
463
482
  *
464
483
  * @returns {number} A number which determines frames per second
465
484
  *
@@ -495,6 +514,7 @@ type UseFullScreen = {
495
514
  /**
496
515
  * @name useFullscreen
497
516
  * @description - Hook to handle fullscreen events
517
+ * @category Browser
498
518
  *
499
519
  * @overload
500
520
  * @template Target The target element for fullscreen
@@ -524,6 +544,7 @@ type UseHashReturn = [string, (value: string) => void];
524
544
  /**
525
545
  * @name useHash
526
546
  * @description - Hook that manages the hash value
547
+ * @category Browser
527
548
  *
528
549
  * @returns {UseHashReturn} An array containing the hash value and a function to set the hash value
529
550
  *
@@ -547,6 +568,7 @@ type UseHotkeysHotkeys = string[] | string;
547
568
  /**
548
569
  * @name useHotkeys
549
570
  * @description - Hook that listens for hotkeys
571
+ * @category Sensors
550
572
  *
551
573
  * @param {UseHotkeysHotkeys} hotkeys The key or keys to listen for
552
574
  * @param {(event: KeyboardEvent) => void} callback The callback function to be called when the hotkey is pressed
@@ -579,6 +601,7 @@ type UseHover = {
579
601
  /**
580
602
  * @name useHover
581
603
  * @description - Hook that defines the logic when hovering an element
604
+ * @category Sensors
582
605
  *
583
606
  * @overload
584
607
  * @template Target The target element
@@ -635,6 +658,7 @@ interface UseIdleReturn {
635
658
  /**
636
659
  * @name useIdle
637
660
  * @description - Hook that defines the logic when the user is idle
661
+ * @category Sensors
638
662
  *
639
663
  * @param {number} [milliseconds=ONE_MINUTE] The idle time in milliseconds
640
664
  * @param {boolean} [options.initialState=false] The options for the hook
@@ -687,6 +711,7 @@ type UseInterval = {
687
711
  /**
688
712
  * @name useInterval
689
713
  * @description - Hook that makes and interval and returns controlling functions
714
+ * @category Time
690
715
  *
691
716
  * @overload
692
717
  * @param {() => void} callback Any callback function
@@ -710,6 +735,7 @@ declare const useInterval: UseInterval;
710
735
  /**
711
736
  * @name useIsFirstRender
712
737
  * @description - Hook that returns true if the component is first render
738
+ * @category Lifecycle
713
739
  *
714
740
  * @returns {boolean} True if the component is first render
715
741
  *
@@ -721,6 +747,7 @@ declare const useIsFirstRender: () => boolean;
721
747
  /**
722
748
  * @name useIsomorphicLayoutEffect
723
749
  * @description - Hook conditionally selects either `useLayoutEffect` or `useEffect` based on the environment
750
+ * @category Lifecycle
724
751
  *
725
752
  * @example
726
753
  * useIsomorphicLayoutEffect(() => console.log('effect'), [])
@@ -739,6 +766,7 @@ type UseKeyboardParams = {
739
766
  /**
740
767
  * @name useKeyboard
741
768
  * @description - Hook that help to listen for keyboard events
769
+ * @category Sensors
742
770
  *
743
771
  * @param {UseEventListenerTarget} [target=window] The target to attach the event listeners to
744
772
  * @param {(event: KeyboardEvent) => void} [onKeyDown] The callback function to be invoked on key down
@@ -759,6 +787,7 @@ type UseKeyPressOptions = {
759
787
  /**
760
788
  * @name useKeyPress
761
789
  * @description - Hook that listens for key press events
790
+ * @category Sensors
762
791
  *
763
792
  * @param {UseKeyPressKey} key The key or keys to listen for
764
793
  * @param {UseEventListenerTarget} [options.target=window] The target to attach the event listeners to
@@ -788,6 +817,7 @@ interface UseKeysPressedParams {
788
817
  /**
789
818
  * @name useKeysPressed
790
819
  * @description - Hook for get keys that were pressed
820
+ * @category Sensors
791
821
  *
792
822
  * @param {UseEventListenerTarget} [params.target=window] The target to attach the event listeners to
793
823
  * @param {boolean} [params.enabled=bollean] Enable or disable the event listeners
@@ -804,9 +834,10 @@ declare const useKeysPressed: (params?: UseKeysPressedParams) => {
804
834
  /**
805
835
  * @name useList
806
836
  * @description - Hook that defines the logic when unmounting a component
837
+ * @category Utilities
807
838
  *
808
- * @template Item - The type of the item
809
- * @param {Item[] | (() => Item[])} initialList - The initial list of items
839
+ * @template Item The type of the item
840
+ * @param {Item[] | (() => Item[])} initialList The initial list of items
810
841
  * @returns {UseListReturn} An object containing the current list and functions to interact with the list
811
842
  *
812
843
  * @example
@@ -835,6 +866,7 @@ declare const useStorage: <Value>(key: string, params?: UseStorageInitialValue<V
835
866
  /**
836
867
  * @name useLocalStorage
837
868
  * @description - Hook that manages local storage value
869
+ * @category Browser
838
870
  *
839
871
  * @template Value The type of the value
840
872
  * @param {string} key The key of the storage
@@ -849,6 +881,7 @@ declare const useLocalStorage: <Value>(key: string, initialValue?: UseStorageIni
849
881
  /**
850
882
  * @name useLogger
851
883
  * @description - Hook for debugging lifecycle
884
+ * @category Lifecycle
852
885
  *
853
886
  * @param {string} name The name or identifier for the logger
854
887
  * @param {unknown[]} params Additional arguments to be logged
@@ -873,6 +906,7 @@ type UseLongPress = {
873
906
  /**
874
907
  * @name useLongPress
875
908
  * @description - Hook that defines the logic when long pressing an element
909
+ * @category Sensors
876
910
  *
877
911
  * @overload
878
912
  * @template Target The target element
@@ -922,6 +956,7 @@ interface UseMapReturn<Key, Value> {
922
956
  /**
923
957
  * @name useMap
924
958
  * @description - Hook that manages a map structure
959
+ * @category Utilities
925
960
  *
926
961
  * @template Value The type of the value
927
962
  * @param {Value[]} [values] The initial array of the map
@@ -935,6 +970,7 @@ declare const useMap: <Key, Value>(values?: [Key, Value][]) => UseMapReturn<Key,
935
970
  /**
936
971
  * @name useMediaQuery
937
972
  * @description - Hook that manages a media query
973
+ * @category Browser
938
974
  *
939
975
  * @param {string} query The media query string
940
976
  * @returns {boolean} A boolean indicating if the media query matches
@@ -960,6 +996,7 @@ interface UseMemoryReturn {
960
996
  /**
961
997
  * @name useMemory
962
998
  * @description - Hook that gives you current memory usage
999
+ * @category Browser
963
1000
  *
964
1001
  * @returns {UseMemoryReturn} An object containing the current memory usage
965
1002
  *
@@ -971,6 +1008,7 @@ declare const useMemory: () => UseMemoryReturn;
971
1008
  /**
972
1009
  * @name useMount
973
1010
  * @description - Hook that executes a callback when the component mounts
1011
+ * @category Lifecycle
974
1012
  *
975
1013
  * @param {EffectCallback} effect The callback to execute
976
1014
  *
@@ -1005,6 +1043,7 @@ type UseMouse = {
1005
1043
  /**
1006
1044
  * @name useMouse
1007
1045
  * @description - Hook that manages a mouse position
1046
+ * @category Sensors
1008
1047
  *
1009
1048
  * @overload
1010
1049
  * @template Target The target element
@@ -1040,13 +1079,14 @@ interface UseMutationReturn<Body, Data> {
1040
1079
  /**
1041
1080
  * @name useMutation
1042
1081
  * @description - Hook that defines the logic when mutate data
1043
- *
1044
- * @template Body - The type of the body
1045
- * @template Data - The type of the data
1046
- * @param {(body: Body) => Promise<Data>} callback - The callback function to be invoked
1047
- * @param {boolean | number} [options.retry] - The retry count of requests
1048
- * @param {(data: Data) => void} [options.onSuccess] - The callback function to be invoked on success
1049
- * @param {(error: Error) => void} [options.onError] - The callback function to be invoked on error
1082
+ * @category Utilities
1083
+ *
1084
+ * @template Body The type of the body
1085
+ * @template Data The type of the data
1086
+ * @param {(body: Body) => Promise<Data>} callback The callback function to be invoked
1087
+ * @param {boolean | number} [options.retry] The retry count of requests
1088
+ * @param {(data: Data) => void} [options.onSuccess] The callback function to be invoked on success
1089
+ * @param {(error: Error) => void} [options.onError] The callback function to be invoked on error
1050
1090
  * @returns {UseMutationReturn<Data>} An object with the state of the mutation
1051
1091
  *
1052
1092
  * @example
@@ -1081,6 +1121,7 @@ interface UseNetworkReturn {
1081
1121
  /**
1082
1122
  * @name useNetwork
1083
1123
  * @description - Hook to track network status
1124
+ * @category Sensors
1084
1125
  *
1085
1126
  * @returns {UseNetworkReturn} An object containing the network status
1086
1127
  *
@@ -1092,6 +1133,7 @@ declare const useNetwork: () => UseNetworkReturn;
1092
1133
  /**
1093
1134
  * @name useOnline
1094
1135
  * @description - Hook that manages if the user is online
1136
+ * @category Sensors
1095
1137
  *
1096
1138
  * @returns {boolean} A boolean indicating if the user is online
1097
1139
  *
@@ -1105,6 +1147,7 @@ type OperatingSystem = 'undetermined' | 'macos' | 'ios' | 'windows' | 'android'
1105
1147
  /**
1106
1148
  * @name useOperatingSystem
1107
1149
  * @description - Hook that returns the operating system of the current browser
1150
+ * @category Browser
1108
1151
  *
1109
1152
  * @returns {OperatingSystem} The operating system
1110
1153
  *
@@ -1123,6 +1166,7 @@ interface UseOrientationReturn {
1123
1166
  /**
1124
1167
  * @name useOrientation
1125
1168
  * @description - Hook that returns the current screen orientation
1169
+ * @category Browser
1126
1170
  *
1127
1171
  * @returns {UseOrientationReturn} An object containing the current screen orientation
1128
1172
  *
@@ -1134,6 +1178,7 @@ declare const useOrientation: () => UseOrientationReturn;
1134
1178
  /**
1135
1179
  * @name usePageLeave
1136
1180
  * @description - Hook what calls given function when mouse leaves the page
1181
+ * @category Sensors
1137
1182
  *
1138
1183
  * @param {() => void} [callback] The callback function what calls then mouse leaves the page
1139
1184
  * @returns {boolean} A boolean which determines if the mouse left the page
@@ -1143,32 +1188,88 @@ declare const useOrientation: () => UseOrientationReturn;
1143
1188
  */
1144
1189
  declare const usePageLeave: (callback?: () => void) => boolean;
1145
1190
 
1146
- interface UsePaintPencil {
1147
- /** Pencil color */
1191
+ interface Point {
1192
+ x: number;
1193
+ y: number;
1194
+ }
1195
+ declare class Pointer implements Point {
1196
+ x: number;
1197
+ y: number;
1198
+ constructor(x: number, y: number);
1199
+ update(point: Point): void;
1200
+ getDifferenceTo(point: Point): Pointer;
1201
+ getDistanceTo(point: Point): number;
1202
+ getAngleTo(point: Point): number;
1203
+ equalsTo(point: Point): boolean;
1204
+ moveByAngle(angle: number, distance: number): this;
1205
+ }
1206
+
1207
+ declare class Paint {
1208
+ pointer: Pointer;
1209
+ brush: Pointer;
1210
+ radius: number;
1211
+ smooth: boolean;
1212
+ points: Point[];
1213
+ lines: {
1214
+ points: Point[];
1215
+ color: string;
1216
+ radius: number;
1217
+ opacity: number;
1218
+ }[];
1219
+ constructor({ x, y, radius, smooth }: {
1220
+ x: number;
1221
+ y: number;
1222
+ radius: number;
1223
+ smooth: boolean;
1224
+ });
1225
+ getBrushCoordinates(): {
1226
+ x: number;
1227
+ y: number;
1228
+ };
1229
+ getPointerCoordinates(): {
1230
+ x: number;
1231
+ y: number;
1232
+ };
1233
+ update(point: Point): boolean;
1234
+ }
1235
+
1236
+ interface UsePaintOptions {
1237
+ /** Brush color */
1148
1238
  color?: string;
1149
- /** Pencil width */
1150
- width?: number;
1151
- /** Pencil opacity */
1239
+ /** Brush radius */
1240
+ radius?: number;
1241
+ /** Smooth brush movement */
1242
+ smooth?: boolean;
1243
+ /** Brush opacity */
1152
1244
  opacity?: number;
1245
+ /** Initial lines */
1246
+ initialLines?: Paint['lines'];
1247
+ /** Callback when the mouse is down */
1248
+ onMouseDown?: (event: MouseEvent, paint: Paint) => void;
1249
+ /** Callback when the mouse is moved */
1250
+ onMouseMove?: (event: MouseEvent, paint: Paint) => void;
1251
+ /** Callback when the mouse is up */
1252
+ onMouseUp?: (event: MouseEvent, paint: Paint) => void;
1153
1253
  }
1154
- type UsePaintOptions = UsePaintPencil;
1155
- /** The use paint return type */
1156
1254
  interface UsePaintReturn {
1157
- pencil: UsePaintPencil & {
1158
- set: Dispatch<SetStateAction<UsePaintPencil>>;
1159
- };
1160
1255
  drawing: boolean;
1256
+ clear: () => void;
1257
+ undo: () => void;
1258
+ draw: (points: Point[], color: string, opacity: number, radius: number) => void;
1259
+ lines: Paint['lines'];
1161
1260
  }
1261
+ /** The use paint return type */
1162
1262
  type UsePaintTarget = RefObject<HTMLCanvasElement> | (() => HTMLCanvasElement) | HTMLCanvasElement;
1163
1263
  type UsePaint = {
1164
1264
  <Target extends UsePaintTarget>(target: Target, options?: UsePaintOptions): UsePaintReturn;
1165
- (options?: UsePaintOptions, target?: never): UsePaintReturn & {
1265
+ (options?: UsePaintOptions, target?: never): {
1166
1266
  ref: RefObject<HTMLCanvasElement>;
1167
- };
1267
+ } & UsePaintReturn;
1168
1268
  };
1169
1269
  /**
1170
1270
  * @name usePaint
1171
1271
  * @description - Hook that allows you to draw in a specific area
1272
+ * @category Browser
1172
1273
  *
1173
1274
  * @overload
1174
1275
  * @template Target The target element
@@ -1177,14 +1278,14 @@ type UsePaint = {
1177
1278
  * @returns {UsePaintReturn} An object containing the current pencil options and functions to interact with the paint
1178
1279
  *
1179
1280
  * @example
1180
- * const { pencil, drawing } = usePaint(canvasRef);
1281
+ * const drawing = usePaint(canvasRef);
1181
1282
  *
1182
1283
  * @overload
1183
1284
  * @param {UsePaintOptions} [options] The options to be used
1184
1285
  * @returns {UsePaintReturn & { ref: RefObject<HTMLCanvasElement> }} An object containing the current pencil options and functions to interact with the paint
1185
1286
  *
1186
1287
  * @example
1187
- * const { ref, pencil, drawing } = usePaint();
1288
+ * const { ref, drawing } = usePaint();
1188
1289
  */
1189
1290
  declare const usePaint: UsePaint;
1190
1291
 
@@ -1192,6 +1293,7 @@ type UsePermissionName = PermissionName | 'accelerometer' | 'accessibility-event
1192
1293
  /**
1193
1294
  * @name usePermission
1194
1295
  * @description - Hook that gives you the state of permission
1296
+ * @category Browser
1195
1297
  *
1196
1298
  * @returns {UsePermissionReturn} An object containing the state and the supported status
1197
1299
  *
@@ -1209,6 +1311,7 @@ type UsePreferredColorSchemeReturn = 'dark' | 'light' | 'no-preference';
1209
1311
  /**
1210
1312
  * @name usePreferredColorScheme
1211
1313
  * @description - Hook that returns user preferred color scheme
1314
+ * @category Browser
1212
1315
  *
1213
1316
  * @returns {UsePreferredColorSchemeReturn} String of preferred color scheme
1214
1317
  *
@@ -1220,6 +1323,7 @@ declare const usePreferredColorScheme: () => UsePreferredColorSchemeReturn;
1220
1323
  /**
1221
1324
  * @name usePreferredLanguages
1222
1325
  * @description Hook that returns a browser preferred languages from navigator
1326
+ * @category Browser
1223
1327
  *
1224
1328
  * @returns {readonly string[]} An array of strings representing the user's preferred languages
1225
1329
  *
@@ -1231,6 +1335,7 @@ declare const usePreferredLanguages: () => readonly string[];
1231
1335
  /**
1232
1336
  * @name usePrevious
1233
1337
  * @description - Hook that returns the previous value
1338
+ * @category Utilities
1234
1339
  *
1235
1340
  * @template Value The type of the value
1236
1341
  * @param {Value} value The value to get the previous value
@@ -1263,17 +1368,18 @@ interface UseQueryReturn<Data> {
1263
1368
  /**
1264
1369
  * @name useQuery
1265
1370
  * @description - Hook that defines the logic when query data
1266
- *
1267
- * @template Data - The type of the data
1268
- * @param {() => Promise<Data>} callback - The callback function to be invoked
1269
- * @param {DependencyList} [options.keys] - The dependencies for the hook
1270
- * @param {(data: Data) => void} [options.onSuccess] - The callback function to be invoked on success
1271
- * @param {(error: Error) => void} [options.onError] - The callback function to be invoked on error
1272
- * @param {UseQueryOptionsSelect<Data>} [options.select] - The select function to be invoked
1273
- * @param {Data | (() => Data)} [options.initialData] - The initial data for the hook
1274
- * @param {Data | (() => Data)} [options.placeholderData] - The placeholder data for the hook
1275
- * @param {number} [options.refetchInterval] - The refetch interval
1276
- * @param {boolean | number} [options.retry] - The retry count of requests
1371
+ * @category Utilities
1372
+ *
1373
+ * @template Data The type of the data
1374
+ * @param {() => Promise<Data>} callback The callback function to be invoked
1375
+ * @param {DependencyList} [options.keys] The dependencies for the hook
1376
+ * @param {(data: Data) => void} [options.onSuccess] The callback function to be invoked on success
1377
+ * @param {(error: Error) => void} [options.onError] The callback function to be invoked on error
1378
+ * @param {UseQueryOptionsSelect<Data>} [options.select] The select function to be invoked
1379
+ * @param {Data | (() => Data)} [options.initialData] The initial data for the hook
1380
+ * @param {Data | (() => Data)} [options.placeholderData] The placeholder data for the hook
1381
+ * @param {number} [options.refetchInterval] The refetch interval
1382
+ * @param {boolean | number} [options.retry] The retry count of requests
1277
1383
  * @returns {UseQueryReturn<Data>} An object with the state of the query
1278
1384
  *
1279
1385
  * @example
@@ -1301,6 +1407,7 @@ interface UseQueueReturn<Value> {
1301
1407
  /**
1302
1408
  * @name useQueue
1303
1409
  * @description - Hook that manages a queue
1410
+ * @category Utilities
1304
1411
  *
1305
1412
  * @template Value The type of the value
1306
1413
  * @param {Value[]} [initialValue=[]] The initial value of the queue
@@ -1314,6 +1421,7 @@ declare const useQueue: <Value>(initialValue?: Value[]) => UseQueueReturn<Value>
1314
1421
  /**
1315
1422
  * @name useRenderCount
1316
1423
  * @description - Hook returns count component render times
1424
+ * @category Lifecycle
1317
1425
  *
1318
1426
  * @returns {number} A number which determines how many times component renders
1319
1427
  *
@@ -1331,6 +1439,7 @@ interface UseRenderInfoReturn {
1331
1439
  /**
1332
1440
  * @name useRenderInfo
1333
1441
  * @description - Hook for getting information about component rerender
1442
+ * @category Lifecycle
1334
1443
  *
1335
1444
  * @param {string} [name='Unknown'] Component name
1336
1445
  * @param {boolean} [log=true] Toggle logging
@@ -1351,6 +1460,7 @@ interface UseRerenderReturns {
1351
1460
  /**
1352
1461
  * @name useRerender
1353
1462
  * @description - Hook that defines the logic to force rerender a component
1463
+ * @category Lifecycle
1354
1464
  *
1355
1465
  * @returns {UseRerenderReturns} An object containing the id and update function
1356
1466
  *
@@ -1369,6 +1479,7 @@ interface UseScriptOptions extends ComponentProps<'script'> {
1369
1479
  /**
1370
1480
  * @name useScript
1371
1481
  * @description - Hook that manages a script with onLoad, onError, and removeOnUnmount functionalities
1482
+ * @category Browser
1372
1483
  *
1373
1484
  * @param {string} src The source of the script
1374
1485
  * @param {UseScriptOptions} [options] The options of the script extends from attributes script tag
@@ -1384,6 +1495,7 @@ declare const useScript: (src: string, options?: UseScriptOptions) => UseScriptS
1384
1495
  /**
1385
1496
  * @name useSessionStorage
1386
1497
  * @description - Hook that manages session storage value
1498
+ * @category Browser
1387
1499
  *
1388
1500
  * @template Value The type of the value
1389
1501
  * @param {string} key The key of the storage
@@ -1436,6 +1548,7 @@ interface UseSetReturn<Value> {
1436
1548
  /**
1437
1549
  * @name useSet
1438
1550
  * @description - Hook that manages a set structure
1551
+ * @category Utilities
1439
1552
  *
1440
1553
  * @template Value The type of the value
1441
1554
  * @param {Value[]} [values] The initial array of the set
@@ -1460,6 +1573,7 @@ interface UseShareParams {
1460
1573
  /**
1461
1574
  * @name useShare
1462
1575
  * @description - Hook that utilizes the share api
1576
+ * @category Browser
1463
1577
  *
1464
1578
  * @param {UseShareParams} [params] The use share options
1465
1579
  * @returns {UseShareReturn}
@@ -1501,6 +1615,7 @@ interface UseStepReturn {
1501
1615
  /**
1502
1616
  * @name useStep
1503
1617
  * @description - Hook that create stepper
1618
+ * @category Utilities
1504
1619
  *
1505
1620
  * @overload
1506
1621
  * @param {number} max Maximum number of steps
@@ -1533,6 +1648,7 @@ interface UseTextSelectionReturn {
1533
1648
  /**
1534
1649
  * @name useTextSelection
1535
1650
  * @description - Hook that manages the text selection
1651
+ * @category Sensors
1536
1652
  *
1537
1653
  * @returns {UseTextSelectionReturn} An object containing the current text selection
1538
1654
  *
@@ -1557,6 +1673,7 @@ interface UseTimeReturn {
1557
1673
  /**
1558
1674
  * @name useTime
1559
1675
  * @description - Hook that gives you current time in different values
1676
+ * @category Time
1560
1677
  *
1561
1678
  * @returns {UseTimeReturn} An object containing the current time
1562
1679
  *
@@ -1575,6 +1692,7 @@ interface UseTimeoutReturn {
1575
1692
  /**
1576
1693
  * @name useTimeout
1577
1694
  * @description - Hook that executes a callback function after a specified delay
1695
+ * @category Time
1578
1696
  *
1579
1697
  * @param {() => void} callback The function to be executed after the timeout
1580
1698
  * @param {number} delay The delay in milliseconds before the timeout executes the callback function
@@ -1588,6 +1706,7 @@ declare function useTimeout(callback: () => void, delay: number): UseTimeoutRetu
1588
1706
  /**
1589
1707
  * @name useToggle
1590
1708
  * @description - Hook that create toggle
1709
+ * @category Utilities
1591
1710
  *
1592
1711
  * @template Value The type of the value
1593
1712
  * @param {Value[]} [values=[false, true]] The values to toggle
@@ -1603,6 +1722,7 @@ declare const useToggle: <Value = boolean>(values?: readonly Value[]) => readonl
1603
1722
  /**
1604
1723
  * @name useUnmount
1605
1724
  * @description - Hook that defines the logic when unmounting a component
1725
+ * @category Lifecycle
1606
1726
  *
1607
1727
  * @param {() => void} callback The callback function to be invoked on component unmount
1608
1728
  * @returns {void}
@@ -1632,6 +1752,7 @@ interface UseWebSocketReturn {
1632
1752
  /**
1633
1753
  * @name useWebSocket
1634
1754
  * @description - Hook that connects to a WebSocket server and handles incoming and outgoing messages
1755
+ * @category Network
1635
1756
  *
1636
1757
  * @param {UseWebSocketUrl} url The URL of the WebSocket server
1637
1758
  * @param {(webSocket: WebSocket) => void} [options.onConnected] The callback function that is called when the WebSocket connection is established
@@ -1650,6 +1771,7 @@ declare const useWebSocket: (url: UseWebSocketUrl, options?: UseWebSocketOptions
1650
1771
  /**
1651
1772
  * @name useWindowEvent
1652
1773
  * @description - Hook attaches an event listener to the window object for the specified event
1774
+ * @category Browser
1653
1775
  *
1654
1776
  * @template Event Key of window event map.
1655
1777
  * @param {Event} event The event to listen for.
@@ -1672,6 +1794,7 @@ interface UseWindowSizeParams {
1672
1794
  /**
1673
1795
  * @name useWindowSize
1674
1796
  * @description - Hook that manages a window size
1797
+ * @category Browser
1675
1798
  *
1676
1799
  * @param {number} [params.initialWidth=Number.POSITIVE_INFINITY] The initial window width
1677
1800
  * @param {number} [params.initialHeight=Number.POSITIVE_INFINITY] The initial window height
@@ -1692,6 +1815,7 @@ interface WizardItem<WizardStepId> {
1692
1815
  /**
1693
1816
  * @name useWizard
1694
1817
  * @description - Hook that manages a wizard
1818
+ * @category Utilities
1695
1819
  *
1696
1820
  * @param {WizardItem<WizardStepId>[]} map The map of the wizard
1697
1821
  * @param {WizardStepId} [initialStepId] The initial step id
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@siberiacancode/reactuse",
3
- "version": "0.0.41",
3
+ "version": "0.0.42",
4
4
  "description": "Ultimate tool",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"_rollupPluginBabelHelpers-CHVPwOFq.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_rollupPluginBabelHelpers-O3NENgAs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}