@siberiacancode/reactuse 0.0.111 → 0.0.113

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 (1244) hide show
  1. package/dist/cjs/hooks/useActiveElement/useActiveElement.cjs +2 -0
  2. package/dist/cjs/hooks/useActiveElement/useActiveElement.cjs.map +1 -0
  3. package/dist/cjs/hooks/useAsync/useAsync.cjs +2 -0
  4. package/dist/cjs/hooks/useAsync/useAsync.cjs.map +1 -0
  5. package/dist/cjs/hooks/useBattery/useBattery.cjs +2 -0
  6. package/dist/cjs/hooks/useBattery/useBattery.cjs.map +1 -0
  7. package/dist/cjs/hooks/useBluetooth/useBluetooth.cjs +2 -0
  8. package/dist/cjs/hooks/useBluetooth/useBluetooth.cjs.map +1 -0
  9. package/dist/cjs/hooks/useBoolean/useBoolean.cjs +2 -0
  10. package/dist/cjs/hooks/useBoolean/useBoolean.cjs.map +1 -0
  11. package/dist/cjs/hooks/useBreakpoints/useBreakpoints.cjs +2 -0
  12. package/dist/cjs/hooks/useBreakpoints/useBreakpoints.cjs.map +1 -0
  13. package/dist/cjs/hooks/useBrowserLanguage/useBrowserLanguage.cjs +2 -0
  14. package/dist/cjs/hooks/useBrowserLanguage/useBrowserLanguage.cjs.map +1 -0
  15. package/dist/cjs/hooks/useClickOutside/useClickOutside.cjs +2 -0
  16. package/dist/cjs/hooks/useClickOutside/useClickOutside.cjs.map +1 -0
  17. package/dist/cjs/hooks/useClipboard/useClipboard.cjs +2 -0
  18. package/dist/cjs/hooks/useClipboard/useClipboard.cjs.map +1 -0
  19. package/dist/cjs/hooks/useConst/useConst.cjs +2 -0
  20. package/dist/cjs/hooks/useConst/useConst.cjs.map +1 -0
  21. package/dist/cjs/hooks/useCookie/useCookie.cjs +2 -0
  22. package/dist/cjs/hooks/useCookie/useCookie.cjs.map +1 -0
  23. package/dist/cjs/hooks/useCookies/useCookies.cjs +2 -0
  24. package/dist/cjs/hooks/useCookies/useCookies.cjs.map +1 -0
  25. package/dist/cjs/hooks/useCopy/useCopy.cjs +2 -0
  26. package/dist/cjs/hooks/useCopy/useCopy.cjs.map +1 -0
  27. package/dist/cjs/hooks/useCounter/useCounter.cjs +2 -0
  28. package/dist/cjs/hooks/useCounter/useCounter.cjs.map +1 -0
  29. package/dist/cjs/hooks/useCssVar/useCssVar.cjs +2 -0
  30. package/dist/cjs/hooks/useCssVar/useCssVar.cjs.map +1 -0
  31. package/dist/cjs/hooks/useDebounceCallback/useDebounceCallback.cjs +2 -0
  32. package/dist/cjs/hooks/useDebounceCallback/useDebounceCallback.cjs.map +1 -0
  33. package/dist/cjs/hooks/useDebounceValue/useDebounceValue.cjs +2 -0
  34. package/dist/cjs/hooks/useDebounceValue/useDebounceValue.cjs.map +1 -0
  35. package/dist/cjs/hooks/useDefault/useDefault.cjs +2 -0
  36. package/dist/cjs/hooks/useDefault/useDefault.cjs.map +1 -0
  37. package/dist/cjs/hooks/useDeviceMotion/useDeviceMotion.cjs +2 -0
  38. package/dist/cjs/hooks/useDeviceMotion/useDeviceMotion.cjs.map +1 -0
  39. package/dist/cjs/hooks/useDeviceOrientation/useDeviceOrientation.cjs +2 -0
  40. package/dist/cjs/hooks/useDeviceOrientation/useDeviceOrientation.cjs.map +1 -0
  41. package/dist/cjs/hooks/useDevicePixelRatio/useDevicePixelRatio.cjs +2 -0
  42. package/dist/cjs/hooks/useDevicePixelRatio/useDevicePixelRatio.cjs.map +1 -0
  43. package/dist/cjs/hooks/useDidUpdate/useDidUpdate.cjs +2 -0
  44. package/dist/cjs/hooks/useDidUpdate/useDidUpdate.cjs.map +1 -0
  45. package/dist/cjs/hooks/useDisclosure/useDisclosure.cjs +2 -0
  46. package/dist/cjs/hooks/useDisclosure/useDisclosure.cjs.map +1 -0
  47. package/dist/cjs/hooks/useDisplayMedia/useDisplayMedia.cjs +2 -0
  48. package/dist/cjs/hooks/useDisplayMedia/useDisplayMedia.cjs.map +1 -0
  49. package/dist/cjs/hooks/useDocumentEvent/useDocumentEvent.cjs +2 -0
  50. package/dist/cjs/hooks/useDocumentEvent/useDocumentEvent.cjs.map +1 -0
  51. package/dist/cjs/hooks/useDocumentTitle/useDocumentTitle.cjs +2 -0
  52. package/dist/cjs/hooks/useDocumentTitle/useDocumentTitle.cjs.map +1 -0
  53. package/dist/cjs/hooks/useDocumentVisibility/useDocumentVisibility.cjs +2 -0
  54. package/dist/cjs/hooks/useDocumentVisibility/useDocumentVisibility.cjs.map +1 -0
  55. package/dist/cjs/hooks/useElementSize/useElementSize.cjs +2 -0
  56. package/dist/cjs/hooks/useElementSize/useElementSize.cjs.map +1 -0
  57. package/dist/cjs/hooks/useEvent/useEvent.cjs +2 -0
  58. package/dist/cjs/hooks/useEvent/useEvent.cjs.map +1 -0
  59. package/dist/cjs/hooks/useEventListener/useEventListener.cjs +2 -0
  60. package/dist/cjs/hooks/useEventListener/useEventListener.cjs.map +1 -0
  61. package/dist/cjs/hooks/useEyeDropper/useEyeDropper.cjs +2 -0
  62. package/dist/cjs/hooks/useEyeDropper/useEyeDropper.cjs.map +1 -0
  63. package/dist/cjs/hooks/useFavicon/useFavicon.cjs +2 -0
  64. package/dist/cjs/hooks/useFavicon/useFavicon.cjs.map +1 -0
  65. package/dist/cjs/hooks/useField/useField.cjs +2 -0
  66. package/dist/cjs/hooks/useField/useField.cjs.map +1 -0
  67. package/dist/cjs/hooks/useFileDialog/useFileDialog.cjs +2 -0
  68. package/dist/cjs/hooks/useFileDialog/useFileDialog.cjs.map +1 -0
  69. package/dist/cjs/hooks/useFocus/useFocus.cjs +2 -0
  70. package/dist/cjs/hooks/useFocus/useFocus.cjs.map +1 -0
  71. package/dist/cjs/hooks/useFps/useFps.cjs +2 -0
  72. package/dist/cjs/hooks/useFps/useFps.cjs.map +1 -0
  73. package/dist/cjs/hooks/useFullscreen/useFullscreen.cjs +2 -0
  74. package/dist/cjs/hooks/useFullscreen/useFullscreen.cjs.map +1 -0
  75. package/dist/cjs/hooks/useGamepad/useGamepad.cjs +2 -0
  76. package/dist/cjs/hooks/useGamepad/useGamepad.cjs.map +1 -0
  77. package/dist/cjs/hooks/useGeolocation/useGeolocation.cjs +2 -0
  78. package/dist/cjs/hooks/useGeolocation/useGeolocation.cjs.map +1 -0
  79. package/dist/cjs/hooks/useHash/useHash.cjs +2 -0
  80. package/dist/cjs/hooks/useHash/useHash.cjs.map +1 -0
  81. package/dist/cjs/hooks/useHotkeys/useHotkeys.cjs +2 -0
  82. package/dist/cjs/hooks/useHotkeys/useHotkeys.cjs.map +1 -0
  83. package/dist/cjs/hooks/useHover/useHover.cjs +2 -0
  84. package/dist/cjs/hooks/useHover/useHover.cjs.map +1 -0
  85. package/dist/cjs/hooks/useIdle/useIdle.cjs +2 -0
  86. package/dist/cjs/hooks/useIdle/useIdle.cjs.map +1 -0
  87. package/dist/cjs/hooks/useImage/useImage.cjs +2 -0
  88. package/dist/cjs/hooks/useImage/useImage.cjs.map +1 -0
  89. package/dist/cjs/hooks/useInfiniteScroll/useInfiniteScroll.cjs +2 -0
  90. package/dist/cjs/hooks/useInfiniteScroll/useInfiniteScroll.cjs.map +1 -0
  91. package/dist/cjs/hooks/useIntersectionObserver/useIntersectionObserver.cjs +2 -0
  92. package/dist/cjs/hooks/useIntersectionObserver/useIntersectionObserver.cjs.map +1 -0
  93. package/dist/cjs/hooks/useInterval/useInterval.cjs +2 -0
  94. package/dist/cjs/hooks/useInterval/useInterval.cjs.map +1 -0
  95. package/dist/cjs/hooks/useIsFirstRender/useIsFirstRender.cjs +2 -0
  96. package/dist/cjs/hooks/useIsFirstRender/useIsFirstRender.cjs.map +1 -0
  97. package/dist/cjs/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.cjs +2 -0
  98. package/dist/cjs/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.cjs.map +1 -0
  99. package/dist/cjs/hooks/useKeyPress/useKeyPress.cjs +2 -0
  100. package/dist/cjs/hooks/useKeyPress/useKeyPress.cjs.map +1 -0
  101. package/dist/cjs/hooks/useKeyPressEvent/useKeyPressEvent.cjs +2 -0
  102. package/dist/cjs/hooks/useKeyPressEvent/useKeyPressEvent.cjs.map +1 -0
  103. package/dist/cjs/hooks/useKeyboard/useKeyboard.cjs +2 -0
  104. package/dist/cjs/hooks/useKeyboard/useKeyboard.cjs.map +1 -0
  105. package/dist/cjs/hooks/useKeysPressed/useKeysPressed.cjs +2 -0
  106. package/dist/cjs/hooks/useKeysPressed/useKeysPressed.cjs.map +1 -0
  107. package/dist/cjs/hooks/useLastChanged/useLastChanged.cjs +2 -0
  108. package/dist/cjs/hooks/useLastChanged/useLastChanged.cjs.map +1 -0
  109. package/dist/cjs/hooks/useLatest/useLatest.cjs +2 -0
  110. package/dist/cjs/hooks/useLatest/useLatest.cjs.map +1 -0
  111. package/dist/cjs/hooks/useLess/useLess.cjs +2 -0
  112. package/dist/cjs/hooks/useLess/useLess.cjs.map +1 -0
  113. package/dist/cjs/hooks/useList/useList.cjs +2 -0
  114. package/dist/cjs/hooks/useList/useList.cjs.map +1 -0
  115. package/dist/cjs/hooks/useLocalStorage/useLocalStorage.cjs +2 -0
  116. package/dist/cjs/hooks/useLocalStorage/useLocalStorage.cjs.map +1 -0
  117. package/dist/cjs/hooks/useLockCallback/useLockCallback.cjs +2 -0
  118. package/dist/cjs/hooks/useLockCallback/useLockCallback.cjs.map +1 -0
  119. package/dist/cjs/hooks/useLogger/useLogger.cjs +2 -0
  120. package/dist/cjs/hooks/useLogger/useLogger.cjs.map +1 -0
  121. package/dist/cjs/hooks/useLongPress/useLongPress.cjs +2 -0
  122. package/dist/cjs/hooks/useLongPress/useLongPress.cjs.map +1 -0
  123. package/dist/cjs/hooks/useMap/useMap.cjs +2 -0
  124. package/dist/cjs/hooks/useMap/useMap.cjs.map +1 -0
  125. package/dist/cjs/hooks/useMeasure/useMeasure.cjs +2 -0
  126. package/dist/cjs/hooks/useMeasure/useMeasure.cjs.map +1 -0
  127. package/dist/cjs/hooks/useMediaQuery/useMediaQuery.cjs +2 -0
  128. package/dist/cjs/hooks/useMediaQuery/useMediaQuery.cjs.map +1 -0
  129. package/dist/cjs/hooks/useMemory/useMemory.cjs +2 -0
  130. package/dist/cjs/hooks/useMemory/useMemory.cjs.map +1 -0
  131. package/dist/cjs/hooks/useMount/useMount.cjs +2 -0
  132. package/dist/cjs/hooks/useMount/useMount.cjs.map +1 -0
  133. package/dist/cjs/hooks/useMouse/useMouse.cjs +2 -0
  134. package/dist/cjs/hooks/useMouse/useMouse.cjs.map +1 -0
  135. package/dist/cjs/hooks/useMutation/useMutation.cjs +2 -0
  136. package/dist/cjs/hooks/useMutation/useMutation.cjs.map +1 -0
  137. package/dist/cjs/hooks/useMutationObserver/useMutationObserver.cjs +2 -0
  138. package/dist/cjs/hooks/useMutationObserver/useMutationObserver.cjs.map +1 -0
  139. package/dist/cjs/hooks/useNetwork/useNetwork.cjs +2 -0
  140. package/dist/cjs/hooks/useNetwork/useNetwork.cjs.map +1 -0
  141. package/dist/cjs/hooks/useOffsetPagination/useOffsetPagination.cjs +2 -0
  142. package/dist/cjs/hooks/useOffsetPagination/useOffsetPagination.cjs.map +1 -0
  143. package/dist/cjs/hooks/useOnce/useOnce.cjs +2 -0
  144. package/dist/cjs/hooks/useOnce/useOnce.cjs.map +1 -0
  145. package/dist/cjs/hooks/useOnline/useOnline.cjs +2 -0
  146. package/dist/cjs/hooks/useOnline/useOnline.cjs.map +1 -0
  147. package/dist/cjs/hooks/useOperatingSystem/useOperatingSystem.cjs +2 -0
  148. package/dist/cjs/hooks/useOperatingSystem/useOperatingSystem.cjs.map +1 -0
  149. package/dist/cjs/hooks/useOptimistic/useOptimistic.cjs +2 -0
  150. package/dist/cjs/hooks/useOptimistic/useOptimistic.cjs.map +1 -0
  151. package/dist/cjs/hooks/useOrientation/useOrientation.cjs +2 -0
  152. package/dist/cjs/hooks/useOrientation/useOrientation.cjs.map +1 -0
  153. package/dist/cjs/hooks/useOtpCredential/useOtpCredential.cjs +2 -0
  154. package/dist/cjs/hooks/useOtpCredential/useOtpCredential.cjs.map +1 -0
  155. package/dist/cjs/hooks/usePageLeave/usePageLeave.cjs +2 -0
  156. package/dist/cjs/hooks/usePageLeave/usePageLeave.cjs.map +1 -0
  157. package/dist/cjs/hooks/usePaint/usePaint.cjs +2 -0
  158. package/dist/cjs/hooks/usePaint/usePaint.cjs.map +1 -0
  159. package/dist/cjs/hooks/useParallax/useParallax.cjs +2 -0
  160. package/dist/cjs/hooks/useParallax/useParallax.cjs.map +1 -0
  161. package/dist/cjs/hooks/usePerformanceObserver/usePerformanceObserver.cjs +2 -0
  162. package/dist/cjs/hooks/usePerformanceObserver/usePerformanceObserver.cjs.map +1 -0
  163. package/dist/cjs/hooks/usePermission/usePermission.cjs +2 -0
  164. package/dist/cjs/hooks/usePermission/usePermission.cjs.map +1 -0
  165. package/dist/cjs/hooks/usePointerLock/usePointerLock.cjs +2 -0
  166. package/dist/cjs/hooks/usePointerLock/usePointerLock.cjs.map +1 -0
  167. package/dist/cjs/hooks/usePostMessage/usePostMessage.cjs +2 -0
  168. package/dist/cjs/hooks/usePostMessage/usePostMessage.cjs.map +1 -0
  169. package/dist/cjs/hooks/usePreferredColorScheme/usePreferredColorScheme.cjs +2 -0
  170. package/dist/cjs/hooks/usePreferredColorScheme/usePreferredColorScheme.cjs.map +1 -0
  171. package/dist/cjs/hooks/usePreferredContrast/usePreferredContrast.cjs +2 -0
  172. package/dist/cjs/hooks/usePreferredContrast/usePreferredContrast.cjs.map +1 -0
  173. package/dist/cjs/hooks/usePreferredDark/usePreferredDark.cjs +2 -0
  174. package/dist/cjs/hooks/usePreferredDark/usePreferredDark.cjs.map +1 -0
  175. package/dist/cjs/hooks/usePreferredLanguages/usePreferredLanguages.cjs +2 -0
  176. package/dist/cjs/hooks/usePreferredLanguages/usePreferredLanguages.cjs.map +1 -0
  177. package/dist/cjs/hooks/usePreferredReducedMotion/usePreferredReducedMotion.cjs +2 -0
  178. package/dist/cjs/hooks/usePreferredReducedMotion/usePreferredReducedMotion.cjs.map +1 -0
  179. package/dist/cjs/hooks/usePrevious/usePrevious.cjs +2 -0
  180. package/dist/cjs/hooks/usePrevious/usePrevious.cjs.map +1 -0
  181. package/dist/cjs/hooks/useQuery/useQuery.cjs +2 -0
  182. package/dist/cjs/hooks/useQuery/useQuery.cjs.map +1 -0
  183. package/dist/cjs/hooks/useQueue/useQueue.cjs +2 -0
  184. package/dist/cjs/hooks/useQueue/useQueue.cjs.map +1 -0
  185. package/dist/cjs/hooks/useRaf/useRaf.cjs +2 -0
  186. package/dist/cjs/hooks/useRaf/useRaf.cjs.map +1 -0
  187. package/dist/cjs/hooks/useRafValue/useRafValue.cjs +2 -0
  188. package/dist/cjs/hooks/useRafValue/useRafValue.cjs.map +1 -0
  189. package/dist/cjs/hooks/useRefState/useRefState.cjs +2 -0
  190. package/dist/cjs/hooks/useRefState/useRefState.cjs.map +1 -0
  191. package/dist/cjs/hooks/useRenderCount/useRenderCount.cjs +2 -0
  192. package/dist/cjs/hooks/useRenderCount/useRenderCount.cjs.map +1 -0
  193. package/dist/cjs/hooks/useRenderInfo/useRenderInfo.cjs +2 -0
  194. package/dist/cjs/hooks/useRenderInfo/useRenderInfo.cjs.map +1 -0
  195. package/dist/cjs/hooks/useRerender/useRerender.cjs +2 -0
  196. package/dist/cjs/hooks/useRerender/useRerender.cjs.map +1 -0
  197. package/dist/cjs/hooks/useResizeObserver/useResizeObserver.cjs +2 -0
  198. package/dist/cjs/hooks/useResizeObserver/useResizeObserver.cjs.map +1 -0
  199. package/dist/cjs/hooks/useScreenOrientation/useScreenOrientation.cjs +2 -0
  200. package/dist/cjs/hooks/useScreenOrientation/useScreenOrientation.cjs.map +1 -0
  201. package/dist/cjs/hooks/useScript/useScript.cjs +2 -0
  202. package/dist/cjs/hooks/useScript/useScript.cjs.map +1 -0
  203. package/dist/cjs/hooks/useScroll/useScroll.cjs +2 -0
  204. package/dist/cjs/hooks/useScroll/useScroll.cjs.map +1 -0
  205. package/dist/cjs/hooks/useScrollIntoView/useScrollIntoView.cjs +2 -0
  206. package/dist/cjs/hooks/useScrollIntoView/useScrollIntoView.cjs.map +1 -0
  207. package/dist/cjs/hooks/useScrollTo/useScrollTo.cjs +2 -0
  208. package/dist/cjs/hooks/useScrollTo/useScrollTo.cjs.map +1 -0
  209. package/dist/cjs/hooks/useSessionStorage/useSessionStorage.cjs +2 -0
  210. package/dist/cjs/hooks/useSessionStorage/useSessionStorage.cjs.map +1 -0
  211. package/dist/cjs/hooks/useSet/useSet.cjs +2 -0
  212. package/dist/cjs/hooks/useSet/useSet.cjs.map +1 -0
  213. package/dist/cjs/hooks/useShare/useShare.cjs +2 -0
  214. package/dist/cjs/hooks/useShare/useShare.cjs.map +1 -0
  215. package/dist/cjs/hooks/useStateHistory/useStateHistory.cjs +2 -0
  216. package/dist/cjs/hooks/useStateHistory/useStateHistory.cjs.map +1 -0
  217. package/dist/cjs/hooks/useStep/useStep.cjs +2 -0
  218. package/dist/cjs/hooks/useStep/useStep.cjs.map +1 -0
  219. package/dist/cjs/hooks/useSticky/useSticky.cjs +2 -0
  220. package/dist/cjs/hooks/useSticky/useSticky.cjs.map +1 -0
  221. package/dist/cjs/hooks/useStopwatch/useStopwatch.cjs +2 -0
  222. package/dist/cjs/hooks/useStopwatch/useStopwatch.cjs.map +1 -0
  223. package/dist/cjs/hooks/useStorage/useStorage.cjs +2 -0
  224. package/dist/cjs/hooks/useStorage/useStorage.cjs.map +1 -0
  225. package/dist/cjs/hooks/useTextDirection/useTextDirection.cjs +2 -0
  226. package/dist/cjs/hooks/useTextDirection/useTextDirection.cjs.map +1 -0
  227. package/dist/cjs/hooks/useTextSelection/useTextSelection.cjs +2 -0
  228. package/dist/cjs/hooks/useTextSelection/useTextSelection.cjs.map +1 -0
  229. package/dist/cjs/hooks/useThrottleCallback/useThrottleCallback.cjs +2 -0
  230. package/dist/cjs/hooks/useThrottleCallback/useThrottleCallback.cjs.map +1 -0
  231. package/dist/cjs/hooks/useThrottleValue/useThrottleValue.cjs +2 -0
  232. package/dist/cjs/hooks/useThrottleValue/useThrottleValue.cjs.map +1 -0
  233. package/dist/cjs/hooks/useTime/useTime.cjs +2 -0
  234. package/dist/cjs/hooks/useTime/useTime.cjs.map +1 -0
  235. package/dist/cjs/hooks/useTimeout/useTimeout.cjs +2 -0
  236. package/dist/cjs/hooks/useTimeout/useTimeout.cjs.map +1 -0
  237. package/dist/cjs/hooks/useTimer/useTimer.cjs +2 -0
  238. package/dist/cjs/hooks/useTimer/useTimer.cjs.map +1 -0
  239. package/dist/cjs/hooks/useToggle/useToggle.cjs +2 -0
  240. package/dist/cjs/hooks/useToggle/useToggle.cjs.map +1 -0
  241. package/dist/cjs/hooks/useUnmount/useUnmount.cjs +2 -0
  242. package/dist/cjs/hooks/useUnmount/useUnmount.cjs.map +1 -0
  243. package/dist/cjs/hooks/useVibrate/useVibrate.cjs +2 -0
  244. package/dist/cjs/hooks/useVibrate/useVibrate.cjs.map +1 -0
  245. package/dist/cjs/hooks/useWebSocket/useWebSocket.cjs +2 -0
  246. package/dist/cjs/hooks/useWebSocket/useWebSocket.cjs.map +1 -0
  247. package/dist/cjs/hooks/useWindowEvent/useWindowEvent.cjs +2 -0
  248. package/dist/cjs/hooks/useWindowEvent/useWindowEvent.cjs.map +1 -0
  249. package/dist/cjs/hooks/useWindowFocus/useWindowFocus.cjs +2 -0
  250. package/dist/cjs/hooks/useWindowFocus/useWindowFocus.cjs.map +1 -0
  251. package/dist/cjs/hooks/useWindowScroll/useWindowScroll.cjs +2 -0
  252. package/dist/cjs/hooks/useWindowScroll/useWindowScroll.cjs.map +1 -0
  253. package/dist/cjs/hooks/useWindowSize/useWindowSize.cjs +2 -0
  254. package/dist/cjs/hooks/useWindowSize/useWindowSize.cjs.map +1 -0
  255. package/dist/cjs/hooks/useWizard/useWizard.cjs +2 -0
  256. package/dist/cjs/hooks/useWizard/useWizard.cjs.map +1 -0
  257. package/dist/cjs/index.cjs +2 -0
  258. package/dist/cjs/index.cjs.map +1 -0
  259. package/dist/cjs/utils/helpers/copy.cjs +2 -0
  260. package/dist/cjs/utils/helpers/copy.cjs.map +1 -0
  261. package/dist/cjs/utils/helpers/debounce.cjs +2 -0
  262. package/dist/cjs/utils/helpers/debounce.cjs.map +1 -0
  263. package/dist/cjs/utils/helpers/getDate.cjs +2 -0
  264. package/dist/cjs/utils/helpers/getDate.cjs.map +1 -0
  265. package/dist/cjs/utils/helpers/getElement.cjs +2 -0
  266. package/dist/cjs/utils/helpers/getElement.cjs.map +1 -0
  267. package/dist/cjs/utils/helpers/getRetry.cjs +2 -0
  268. package/dist/cjs/utils/helpers/getRetry.cjs.map +1 -0
  269. package/dist/cjs/utils/helpers/isTarget.cjs +2 -0
  270. package/dist/cjs/utils/helpers/isTarget.cjs.map +1 -0
  271. package/dist/cjs/utils/helpers/throttle.cjs +2 -0
  272. package/dist/cjs/utils/helpers/throttle.cjs.map +1 -0
  273. package/dist/esm/hooks/useActiveElement/useActiveElement.mjs +26 -0
  274. package/dist/esm/hooks/useActiveElement/useActiveElement.mjs.map +1 -0
  275. package/dist/esm/hooks/useAsync/useAsync.mjs +22 -0
  276. package/dist/esm/hooks/useAsync/useAsync.mjs.map +1 -0
  277. package/dist/esm/hooks/useBattery/useBattery.mjs +30 -0
  278. package/dist/esm/hooks/useBattery/useBattery.mjs.map +1 -0
  279. package/dist/esm/hooks/useBluetooth/useBluetooth.mjs +37 -0
  280. package/dist/esm/hooks/useBluetooth/useBluetooth.mjs.map +1 -0
  281. package/dist/esm/hooks/useBoolean/useBoolean.mjs +9 -0
  282. package/dist/esm/hooks/useBoolean/useBoolean.mjs.map +1 -0
  283. package/dist/esm/hooks/useBreakpoints/useBreakpoints.mjs +111 -0
  284. package/dist/esm/hooks/useBreakpoints/useBreakpoints.mjs.map +1 -0
  285. package/dist/esm/hooks/useBrowserLanguage/useBrowserLanguage.mjs +6 -0
  286. package/dist/esm/hooks/useBrowserLanguage/useBrowserLanguage.mjs.map +1 -0
  287. package/dist/esm/hooks/useClickOutside/useClickOutside.mjs +22 -0
  288. package/dist/esm/hooks/useClickOutside/useClickOutside.mjs.map +1 -0
  289. package/dist/esm/hooks/useClipboard/useClipboard.mjs +25 -0
  290. package/dist/esm/hooks/useClipboard/useClipboard.mjs.map +1 -0
  291. package/dist/esm/hooks/useConst/useConst.mjs +6 -0
  292. package/dist/esm/hooks/useConst/useConst.mjs.map +1 -0
  293. package/dist/esm/hooks/useCookie/useCookie.mjs +57 -0
  294. package/dist/esm/hooks/useCookie/useCookie.mjs.map +1 -0
  295. package/dist/esm/hooks/useCookies/useCookies.mjs +42 -0
  296. package/dist/esm/hooks/useCookies/useCookies.mjs.map +1 -0
  297. package/dist/esm/hooks/useCopy/useCopy.mjs +12 -0
  298. package/dist/esm/hooks/useCopy/useCopy.mjs.map +1 -0
  299. package/dist/esm/hooks/useCounter/useCounter.mjs +24 -0
  300. package/dist/esm/hooks/useCounter/useCounter.mjs.map +1 -0
  301. package/dist/esm/hooks/useCssVar/useCssVar.mjs +35 -0
  302. package/dist/esm/hooks/useCssVar/useCssVar.mjs.map +1 -0
  303. package/dist/esm/hooks/useDebounceCallback/useDebounceCallback.mjs +11 -0
  304. package/dist/esm/hooks/useDebounceCallback/useDebounceCallback.mjs.map +1 -0
  305. package/dist/esm/hooks/useDebounceValue/useDebounceValue.mjs +12 -0
  306. package/dist/esm/hooks/useDebounceValue/useDebounceValue.mjs.map +1 -0
  307. package/dist/esm/hooks/useDefault/useDefault.mjs +9 -0
  308. package/dist/esm/hooks/useDefault/useDefault.mjs.map +1 -0
  309. package/dist/esm/hooks/useDeviceMotion/useDeviceMotion.mjs +38 -0
  310. package/dist/esm/hooks/useDeviceMotion/useDeviceMotion.mjs.map +1 -0
  311. package/dist/esm/hooks/useDeviceOrientation/useDeviceOrientation.mjs +28 -0
  312. package/dist/esm/hooks/useDeviceOrientation/useDeviceOrientation.mjs.map +1 -0
  313. package/dist/esm/hooks/useDevicePixelRatio/useDevicePixelRatio.mjs +15 -0
  314. package/dist/esm/hooks/useDevicePixelRatio/useDevicePixelRatio.mjs.map +1 -0
  315. package/dist/esm/hooks/useDidUpdate/useDidUpdate.mjs +18 -0
  316. package/dist/esm/hooks/useDidUpdate/useDidUpdate.mjs.map +1 -0
  317. package/dist/esm/hooks/useDisclosure/useDisclosure.mjs +15 -0
  318. package/dist/esm/hooks/useDisclosure/useDisclosure.mjs.map +1 -0
  319. package/dist/esm/hooks/useDisplayMedia/useDisplayMedia.mjs +43 -0
  320. package/dist/esm/hooks/useDisplayMedia/useDisplayMedia.mjs.map +1 -0
  321. package/dist/esm/hooks/useDocumentEvent/useDocumentEvent.mjs +6 -0
  322. package/dist/esm/hooks/useDocumentEvent/useDocumentEvent.mjs.map +1 -0
  323. package/dist/esm/hooks/useDocumentTitle/useDocumentTitle.mjs +26 -0
  324. package/dist/esm/hooks/useDocumentTitle/useDocumentTitle.mjs.map +1 -0
  325. package/dist/esm/hooks/useDocumentVisibility/useDocumentVisibility.mjs +8 -0
  326. package/dist/esm/hooks/useDocumentVisibility/useDocumentVisibility.mjs.map +1 -0
  327. package/dist/esm/hooks/useElementSize/useElementSize.mjs +30 -0
  328. package/dist/esm/hooks/useElementSize/useElementSize.mjs.map +1 -0
  329. package/dist/esm/hooks/useEvent/useEvent.mjs +12 -0
  330. package/dist/esm/hooks/useEvent/useEvent.mjs.map +1 -0
  331. package/dist/esm/hooks/useEventListener/useEventListener.mjs +21 -0
  332. package/dist/esm/hooks/useEventListener/useEventListener.mjs.map +1 -0
  333. package/dist/esm/hooks/useEyeDropper/useEyeDropper.mjs +17 -0
  334. package/dist/esm/hooks/useEyeDropper/useEyeDropper.mjs.map +1 -0
  335. package/dist/esm/hooks/useFavicon/useFavicon.mjs +23 -0
  336. package/dist/esm/hooks/useFavicon/useFavicon.mjs.map +1 -0
  337. package/dist/esm/hooks/useField/useField.mjs +73 -0
  338. package/dist/esm/hooks/useField/useField.mjs.map +1 -0
  339. package/dist/esm/hooks/useFileDialog/useFileDialog.mjs +36 -0
  340. package/dist/esm/hooks/useFileDialog/useFileDialog.mjs.map +1 -0
  341. package/dist/esm/hooks/useFocus/useFocus.mjs +40 -0
  342. package/dist/esm/hooks/useFocus/useFocus.mjs.map +1 -0
  343. package/dist/esm/hooks/useFps/useFps.mjs +23 -0
  344. package/dist/esm/hooks/useFps/useFps.mjs.map +1 -0
  345. package/dist/esm/hooks/useFullscreen/useFullscreen.mjs +45 -0
  346. package/dist/esm/hooks/useFullscreen/useFullscreen.mjs.map +1 -0
  347. package/dist/esm/hooks/useGamepad/useGamepad.mjs +79 -0
  348. package/dist/esm/hooks/useGamepad/useGamepad.mjs.map +1 -0
  349. package/dist/esm/hooks/useGeolocation/useGeolocation.mjs +46 -0
  350. package/dist/esm/hooks/useGeolocation/useGeolocation.mjs.map +1 -0
  351. package/dist/esm/hooks/useHash/useHash.mjs +16 -0
  352. package/dist/esm/hooks/useHash/useHash.mjs.map +1 -0
  353. package/dist/esm/hooks/useHotkeys/useHotkeys.mjs +33 -0
  354. package/dist/esm/hooks/useHotkeys/useHotkeys.mjs.map +1 -0
  355. package/dist/esm/hooks/useHover/useHover.mjs +26 -0
  356. package/dist/esm/hooks/useHover/useHover.mjs.map +1 -0
  357. package/dist/esm/hooks/useIdle/useIdle.mjs +27 -0
  358. package/dist/esm/hooks/useIdle/useIdle.mjs.map +1 -0
  359. package/dist/esm/hooks/useImage/useImage.mjs +12 -0
  360. package/dist/esm/hooks/useImage/useImage.mjs.map +1 -0
  361. package/dist/esm/hooks/useInfiniteScroll/useInfiniteScroll.mjs +34 -0
  362. package/dist/esm/hooks/useInfiniteScroll/useInfiniteScroll.mjs.map +1 -0
  363. package/dist/esm/hooks/useIntersectionObserver/useIntersectionObserver.mjs +33 -0
  364. package/dist/esm/hooks/useIntersectionObserver/useIntersectionObserver.mjs.map +1 -0
  365. package/dist/esm/hooks/useInterval/useInterval.mjs +21 -0
  366. package/dist/esm/hooks/useInterval/useInterval.mjs.map +1 -0
  367. package/dist/esm/hooks/useIsFirstRender/useIsFirstRender.mjs +9 -0
  368. package/dist/esm/hooks/useIsFirstRender/useIsFirstRender.mjs.map +1 -0
  369. package/dist/esm/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs +6 -0
  370. package/dist/esm/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs.map +1 -0
  371. package/dist/esm/hooks/useKeyPress/useKeyPress.mjs +30 -0
  372. package/dist/esm/hooks/useKeyPress/useKeyPress.mjs.map +1 -0
  373. package/dist/esm/hooks/useKeyPressEvent/useKeyPressEvent.mjs +31 -0
  374. package/dist/esm/hooks/useKeyPressEvent/useKeyPressEvent.mjs.map +1 -0
  375. package/dist/esm/hooks/useKeyboard/useKeyboard.mjs +27 -0
  376. package/dist/esm/hooks/useKeyboard/useKeyboard.mjs.map +1 -0
  377. package/dist/esm/hooks/useKeysPressed/useKeysPressed.mjs +27 -0
  378. package/dist/esm/hooks/useKeysPressed/useKeysPressed.mjs.map +1 -0
  379. package/dist/esm/hooks/useLastChanged/useLastChanged.mjs +10 -0
  380. package/dist/esm/hooks/useLastChanged/useLastChanged.mjs.map +1 -0
  381. package/dist/esm/hooks/useLatest/useLatest.mjs +9 -0
  382. package/dist/esm/hooks/useLatest/useLatest.mjs.map +1 -0
  383. package/dist/esm/hooks/useLess/useLess.mjs +8 -0
  384. package/dist/esm/hooks/useLess/useLess.mjs.map +1 -0
  385. package/dist/esm/hooks/useList/useList.mjs +14 -0
  386. package/dist/esm/hooks/useList/useList.mjs.map +1 -0
  387. package/dist/esm/hooks/useLocalStorage/useLocalStorage.mjs +10 -0
  388. package/dist/esm/hooks/useLocalStorage/useLocalStorage.mjs.map +1 -0
  389. package/dist/esm/hooks/useLockCallback/useLockCallback.mjs +18 -0
  390. package/dist/esm/hooks/useLockCallback/useLockCallback.mjs.map +1 -0
  391. package/dist/esm/hooks/useLogger/useLogger.mjs +11 -0
  392. package/dist/esm/hooks/useLogger/useLogger.mjs.map +1 -0
  393. package/dist/esm/hooks/useLongPress/useLongPress.mjs +22 -0
  394. package/dist/esm/hooks/useLongPress/useLongPress.mjs.map +1 -0
  395. package/dist/esm/hooks/useMap/useMap.mjs +21 -0
  396. package/dist/esm/hooks/useMap/useMap.mjs.map +1 -0
  397. package/dist/esm/hooks/useMeasure/useMeasure.mjs +34 -0
  398. package/dist/esm/hooks/useMeasure/useMeasure.mjs.map +1 -0
  399. package/dist/esm/hooks/useMediaQuery/useMediaQuery.mjs +17 -0
  400. package/dist/esm/hooks/useMediaQuery/useMediaQuery.mjs.map +1 -0
  401. package/dist/esm/hooks/useMemory/useMemory.mjs +14 -0
  402. package/dist/esm/hooks/useMemory/useMemory.mjs.map +1 -0
  403. package/dist/esm/hooks/useMount/useMount.mjs +6 -0
  404. package/dist/esm/hooks/useMount/useMount.mjs.map +1 -0
  405. package/dist/esm/hooks/useMouse/useMouse.mjs +40 -0
  406. package/dist/esm/hooks/useMouse/useMouse.mjs.map +1 -0
  407. package/dist/esm/hooks/useMutation/useMutation.mjs +64 -0
  408. package/dist/esm/hooks/useMutation/useMutation.mjs.map +1 -0
  409. package/dist/esm/hooks/useMutationObserver/useMutationObserver.mjs +28 -0
  410. package/dist/esm/hooks/useMutationObserver/useMutationObserver.mjs.map +1 -0
  411. package/dist/esm/hooks/useNetwork/useNetwork.mjs +49 -0
  412. package/dist/esm/hooks/useNetwork/useNetwork.mjs.map +1 -0
  413. package/dist/esm/hooks/useOffsetPagination/useOffsetPagination.mjs +48 -0
  414. package/dist/esm/hooks/useOffsetPagination/useOffsetPagination.mjs.map +1 -0
  415. package/dist/esm/hooks/useOnce/useOnce.mjs +14 -0
  416. package/dist/esm/hooks/useOnce/useOnce.mjs.map +1 -0
  417. package/dist/esm/hooks/useOnline/useOnline.mjs +8 -0
  418. package/dist/esm/hooks/useOnline/useOnline.mjs.map +1 -0
  419. package/dist/esm/hooks/useOperatingSystem/useOperatingSystem.mjs +14 -0
  420. package/dist/esm/hooks/useOperatingSystem/useOperatingSystem.mjs.map +1 -0
  421. package/dist/esm/hooks/useOptimistic/useOptimistic.mjs +14 -0
  422. package/dist/esm/hooks/useOptimistic/useOptimistic.mjs.map +1 -0
  423. package/dist/esm/hooks/useOrientation/useOrientation.mjs +14 -0
  424. package/dist/esm/hooks/useOrientation/useOrientation.mjs.map +1 -0
  425. package/dist/esm/hooks/useOtpCredential/useOtpCredential.mjs +25 -0
  426. package/dist/esm/hooks/useOtpCredential/useOtpCredential.mjs.map +1 -0
  427. package/dist/esm/hooks/usePageLeave/usePageLeave.mjs +15 -0
  428. package/dist/esm/hooks/usePageLeave/usePageLeave.mjs.map +1 -0
  429. package/dist/esm/hooks/usePaint/usePaint.mjs +147 -0
  430. package/dist/esm/hooks/usePaint/usePaint.mjs.map +1 -0
  431. package/dist/esm/hooks/useParallax/useParallax.mjs +94 -0
  432. package/dist/esm/hooks/useParallax/useParallax.mjs.map +1 -0
  433. package/dist/esm/hooks/usePerformanceObserver/usePerformanceObserver.mjs +26 -0
  434. package/dist/esm/hooks/usePerformanceObserver/usePerformanceObserver.mjs.map +1 -0
  435. package/dist/esm/hooks/usePermission/usePermission.mjs +28 -0
  436. package/dist/esm/hooks/usePermission/usePermission.mjs.map +1 -0
  437. package/dist/esm/hooks/usePointerLock/usePointerLock.mjs +31 -0
  438. package/dist/esm/hooks/usePointerLock/usePointerLock.mjs.map +1 -0
  439. package/dist/esm/hooks/usePostMessage/usePostMessage.mjs +20 -0
  440. package/dist/esm/hooks/usePostMessage/usePostMessage.mjs.map +1 -0
  441. package/dist/esm/hooks/usePreferredColorScheme/usePreferredColorScheme.mjs +9 -0
  442. package/dist/esm/hooks/usePreferredColorScheme/usePreferredColorScheme.mjs.map +1 -0
  443. package/dist/esm/hooks/usePreferredContrast/usePreferredContrast.mjs +9 -0
  444. package/dist/esm/hooks/usePreferredContrast/usePreferredContrast.mjs.map +1 -0
  445. package/dist/esm/hooks/usePreferredDark/usePreferredDark.mjs +6 -0
  446. package/dist/esm/hooks/usePreferredDark/usePreferredDark.mjs.map +1 -0
  447. package/dist/esm/hooks/usePreferredLanguages/usePreferredLanguages.mjs +8 -0
  448. package/dist/esm/hooks/usePreferredLanguages/usePreferredLanguages.mjs.map +1 -0
  449. package/dist/esm/hooks/usePreferredReducedMotion/usePreferredReducedMotion.mjs +6 -0
  450. package/dist/esm/hooks/usePreferredReducedMotion/usePreferredReducedMotion.mjs.map +1 -0
  451. package/dist/esm/hooks/usePrevious/usePrevious.mjs +9 -0
  452. package/dist/esm/hooks/usePrevious/usePrevious.mjs.map +1 -0
  453. package/dist/esm/hooks/useQuery/useQuery.mjs +57 -0
  454. package/dist/esm/hooks/useQuery/useQuery.mjs.map +1 -0
  455. package/dist/esm/hooks/useQueue/useQueue.mjs +23 -0
  456. package/dist/esm/hooks/useQueue/useQueue.mjs.map +1 -0
  457. package/dist/esm/hooks/useRaf/useRaf.mjs +30 -0
  458. package/dist/esm/hooks/useRaf/useRaf.mjs.map +1 -0
  459. package/dist/esm/hooks/useRafValue/useRafValue.mjs +12 -0
  460. package/dist/esm/hooks/useRafValue/useRafValue.mjs.map +1 -0
  461. package/dist/esm/hooks/useRefState/useRefState.mjs +24 -0
  462. package/dist/esm/hooks/useRefState/useRefState.mjs.map +1 -0
  463. package/dist/esm/hooks/useRenderCount/useRenderCount.mjs +11 -0
  464. package/dist/esm/hooks/useRenderCount/useRenderCount.mjs.map +1 -0
  465. package/dist/esm/hooks/useRenderInfo/useRenderInfo.mjs +14 -0
  466. package/dist/esm/hooks/useRenderInfo/useRenderInfo.mjs.map +1 -0
  467. package/dist/esm/hooks/useRerender/useRerender.mjs +6 -0
  468. package/dist/esm/hooks/useRerender/useRerender.mjs.map +1 -0
  469. package/dist/esm/hooks/useResizeObserver/useResizeObserver.mjs +26 -0
  470. package/dist/esm/hooks/useResizeObserver/useResizeObserver.mjs.map +1 -0
  471. package/dist/esm/hooks/useScreenOrientation/useScreenOrientation.mjs +31 -0
  472. package/dist/esm/hooks/useScreenOrientation/useScreenOrientation.mjs.map +1 -0
  473. package/dist/esm/hooks/useScript/useScript.mjs +32 -0
  474. package/dist/esm/hooks/useScript/useScript.mjs.map +1 -0
  475. package/dist/esm/hooks/useScroll/useScroll.mjs +51 -0
  476. package/dist/esm/hooks/useScroll/useScroll.mjs.map +1 -0
  477. package/dist/esm/hooks/useScrollIntoView/useScrollIntoView.mjs +36 -0
  478. package/dist/esm/hooks/useScrollIntoView/useScrollIntoView.mjs.map +1 -0
  479. package/dist/esm/hooks/useScrollTo/useScrollTo.mjs +23 -0
  480. package/dist/esm/hooks/useScrollTo/useScrollTo.mjs.map +1 -0
  481. package/dist/esm/hooks/useSessionStorage/useSessionStorage.mjs +10 -0
  482. package/dist/esm/hooks/useSessionStorage/useSessionStorage.mjs.map +1 -0
  483. package/dist/esm/hooks/useSet/useSet.mjs +30 -0
  484. package/dist/esm/hooks/useSet/useSet.mjs.map +1 -0
  485. package/dist/esm/hooks/useShare/useShare.mjs +15 -0
  486. package/dist/esm/hooks/useShare/useShare.mjs.map +1 -0
  487. package/dist/esm/hooks/useStateHistory/useStateHistory.mjs +31 -0
  488. package/dist/esm/hooks/useStateHistory/useStateHistory.mjs.map +1 -0
  489. package/dist/esm/hooks/useStep/useStep.mjs +29 -0
  490. package/dist/esm/hooks/useStep/useStep.mjs.map +1 -0
  491. package/dist/esm/hooks/useSticky/useSticky.mjs +32 -0
  492. package/dist/esm/hooks/useSticky/useSticky.mjs.map +1 -0
  493. package/dist/esm/hooks/useStopwatch/useStopwatch.mjs +59 -0
  494. package/dist/esm/hooks/useStopwatch/useStopwatch.mjs.map +1 -0
  495. package/dist/esm/hooks/useStorage/useStorage.mjs +51 -0
  496. package/dist/esm/hooks/useStorage/useStorage.mjs.map +1 -0
  497. package/dist/esm/hooks/useTextDirection/useTextDirection.mjs +37 -0
  498. package/dist/esm/hooks/useTextDirection/useTextDirection.mjs.map +1 -0
  499. package/dist/esm/hooks/useTextSelection/useTextSelection.mjs +28 -0
  500. package/dist/esm/hooks/useTextSelection/useTextSelection.mjs.map +1 -0
  501. package/dist/esm/hooks/useThrottleCallback/useThrottleCallback.mjs +11 -0
  502. package/dist/esm/hooks/useThrottleCallback/useThrottleCallback.mjs.map +1 -0
  503. package/dist/esm/hooks/useThrottleValue/useThrottleValue.mjs +12 -0
  504. package/dist/esm/hooks/useThrottleValue/useThrottleValue.mjs.map +1 -0
  505. package/dist/esm/hooks/useTime/useTime.mjs +11 -0
  506. package/dist/esm/hooks/useTime/useTime.mjs.map +1 -0
  507. package/dist/esm/hooks/useTimeout/useTimeout.mjs +16 -0
  508. package/dist/esm/hooks/useTimeout/useTimeout.mjs.map +1 -0
  509. package/dist/esm/hooks/useTimer/useTimer.mjs +69 -0
  510. package/dist/esm/hooks/useTimer/useTimer.mjs.map +1 -0
  511. package/dist/esm/hooks/useToggle/useToggle.mjs +12 -0
  512. package/dist/esm/hooks/useToggle/useToggle.mjs.map +1 -0
  513. package/dist/esm/hooks/useUnmount/useUnmount.mjs +14 -0
  514. package/dist/esm/hooks/useUnmount/useUnmount.mjs.map +1 -0
  515. package/dist/esm/hooks/useVibrate/useVibrate.mjs +22 -0
  516. package/dist/esm/hooks/useVibrate/useVibrate.mjs.map +1 -0
  517. package/dist/esm/hooks/useWebSocket/useWebSocket.mjs +46 -0
  518. package/dist/esm/hooks/useWebSocket/useWebSocket.mjs.map +1 -0
  519. package/dist/esm/hooks/useWindowEvent/useWindowEvent.mjs +6 -0
  520. package/dist/esm/hooks/useWindowEvent/useWindowEvent.mjs.map +1 -0
  521. package/dist/esm/hooks/useWindowFocus/useWindowFocus.mjs +14 -0
  522. package/dist/esm/hooks/useWindowFocus/useWindowFocus.mjs.map +1 -0
  523. package/dist/esm/hooks/useWindowScroll/useWindowScroll.mjs +25 -0
  524. package/dist/esm/hooks/useWindowScroll/useWindowScroll.mjs.map +1 -0
  525. package/dist/esm/hooks/useWindowSize/useWindowSize.mjs +28 -0
  526. package/dist/esm/hooks/useWindowSize/useWindowSize.mjs.map +1 -0
  527. package/dist/esm/hooks/useWizard/useWizard.mjs +23 -0
  528. package/dist/esm/hooks/useWizard/useWizard.mjs.map +1 -0
  529. package/dist/esm/index.mjs +307 -0
  530. package/dist/esm/index.mjs.map +1 -0
  531. package/dist/esm/utils/helpers/copy.mjs +19 -0
  532. package/dist/esm/utils/helpers/copy.mjs.map +1 -0
  533. package/dist/esm/utils/helpers/debounce.mjs +10 -0
  534. package/dist/esm/utils/helpers/debounce.mjs.map +1 -0
  535. package/dist/esm/utils/helpers/getDate.mjs +17 -0
  536. package/dist/esm/utils/helpers/getDate.mjs.map +1 -0
  537. package/dist/esm/utils/helpers/getElement.mjs +10 -0
  538. package/dist/esm/utils/helpers/getElement.mjs.map +1 -0
  539. package/dist/esm/utils/helpers/getRetry.mjs +5 -0
  540. package/dist/esm/utils/helpers/getRetry.mjs.map +1 -0
  541. package/dist/esm/utils/helpers/isTarget.mjs +6 -0
  542. package/dist/esm/utils/helpers/isTarget.mjs.map +1 -0
  543. package/dist/esm/utils/helpers/throttle.mjs +21 -0
  544. package/dist/esm/utils/helpers/throttle.mjs.map +1 -0
  545. package/dist/types/hooks/index.d.ts +128 -0
  546. package/dist/types/hooks/useActiveElement/useActiveElement.d.ts +11 -0
  547. package/dist/types/hooks/useAsync/useAsync.d.ts +20 -0
  548. package/dist/types/hooks/useBattery/useBattery.d.ts +44 -0
  549. package/dist/types/hooks/useBluetooth/useBluetooth.d.ts +38 -0
  550. package/dist/types/hooks/useBoolean/useBoolean.d.ts +19 -0
  551. package/dist/types/hooks/useBreakpoints/useBreakpoints.d.ts +125 -0
  552. package/dist/types/hooks/useBrowserLanguage/useBrowserLanguage.d.ts +13 -0
  553. package/dist/types/hooks/useClickOutside/useClickOutside.d.ts +28 -0
  554. package/dist/types/hooks/useClipboard/useClipboard.d.ts +26 -0
  555. package/dist/types/hooks/useConst/useConst.d.ts +13 -0
  556. package/dist/types/hooks/useCookie/useCookie.d.ts +65 -0
  557. package/dist/types/hooks/useCookies/useCookies.d.ts +27 -0
  558. package/dist/types/hooks/useCopy/useCopy.d.ts +28 -0
  559. package/dist/types/hooks/useCounter/useCounter.d.ts +51 -0
  560. package/dist/types/hooks/useCssVar/useCssVar.d.ts +38 -0
  561. package/dist/types/hooks/useDebounceCallback/useDebounceCallback.d.ts +15 -0
  562. package/dist/types/hooks/useDebounceValue/useDebounceValue.d.ts +14 -0
  563. package/dist/types/hooks/useDefault/useDefault.d.ts +14 -0
  564. package/dist/types/hooks/useDeviceMotion/useDeviceMotion.d.ts +30 -0
  565. package/dist/types/hooks/useDeviceOrientation/useDeviceOrientation.d.ts +29 -0
  566. package/dist/types/hooks/useDevicePixelRatio/useDevicePixelRatio.d.ts +20 -0
  567. package/dist/types/hooks/useDidUpdate/useDidUpdate.d.ts +13 -0
  568. package/dist/types/hooks/useDisclosure/useDisclosure.d.ts +32 -0
  569. package/dist/types/hooks/useDisplayMedia/useDisplayMedia.d.ts +58 -0
  570. package/dist/types/hooks/useDocumentEvent/useDocumentEvent.d.ts +16 -0
  571. package/dist/types/hooks/useDocumentTitle/useDocumentTitle.d.ts +25 -0
  572. package/dist/types/hooks/useDocumentVisibility/useDocumentVisibility.d.ts +11 -0
  573. package/dist/types/hooks/useElementSize/useElementSize.d.ts +38 -0
  574. package/dist/types/hooks/useEvent/useEvent.d.ts +14 -0
  575. package/dist/types/hooks/useEventListener/useEventListener.d.ts +64 -0
  576. package/dist/types/hooks/useEyeDropper/useEyeDropper.d.ts +40 -0
  577. package/dist/types/hooks/useFavicon/useFavicon.d.ts +18 -0
  578. package/dist/types/hooks/useField/useField.d.ts +95 -0
  579. package/dist/types/hooks/useFileDialog/useFileDialog.d.ts +46 -0
  580. package/dist/types/hooks/useFocus/useFocus.d.ts +52 -0
  581. package/dist/types/hooks/useFps/useFps.d.ts +13 -0
  582. package/dist/types/hooks/useFul/useFul.d.ts +15 -0
  583. package/dist/types/hooks/useFullscreen/useFullscreen.d.ts +54 -0
  584. package/dist/types/hooks/useGamepad/useGamepad.d.ts +67 -0
  585. package/dist/types/hooks/useGeolocation/useGeolocation.d.ts +41 -0
  586. package/dist/types/hooks/useHash/useHash.d.ts +14 -0
  587. package/dist/types/hooks/useHotkeys/useHotkeys.d.ts +58 -0
  588. package/dist/types/hooks/useHover/useHover.d.ts +55 -0
  589. package/dist/types/hooks/useIdle/useIdle.d.ts +28 -0
  590. package/dist/types/hooks/useImage/useImage.d.ts +44 -0
  591. package/dist/types/hooks/useInfiniteScroll/useInfiniteScroll.d.ts +42 -0
  592. package/dist/types/hooks/useIntersectionObserver/useIntersectionObserver.d.ts +45 -0
  593. package/dist/types/hooks/useInterval/useInterval.d.ts +46 -0
  594. package/dist/types/hooks/useIsFirstRender/useIsFirstRender.d.ts +11 -0
  595. package/dist/types/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts +10 -0
  596. package/dist/types/hooks/useKeyPress/useKeyPress.d.ts +37 -0
  597. package/dist/types/hooks/useKeyPressEvent/useKeyPressEvent.d.ts +45 -0
  598. package/dist/types/hooks/useKeyboard/useKeyboard.d.ts +39 -0
  599. package/dist/types/hooks/useKeysPressed/useKeysPressed.d.ts +44 -0
  600. package/dist/types/hooks/useLastChanged/useLastChanged.d.ts +17 -0
  601. package/dist/types/hooks/useLatest/useLatest.d.ts +13 -0
  602. package/dist/types/hooks/useLess/useLess.d.ts +15 -0
  603. package/dist/types/hooks/useList/useList.d.ts +39 -0
  604. package/dist/types/hooks/useLocalStorage/useLocalStorage.d.ts +21 -0
  605. package/dist/types/hooks/useLockCallback/useLockCallback.d.ts +12 -0
  606. package/dist/types/hooks/useLogger/useLogger.d.ts +12 -0
  607. package/dist/types/hooks/useLongPress/useLongPress.d.ts +38 -0
  608. package/dist/types/hooks/useMap/useMap.d.ts +30 -0
  609. package/dist/types/hooks/useMeasure/useMeasure.d.ts +30 -0
  610. package/dist/types/hooks/useMediaQuery/useMediaQuery.d.ts +14 -0
  611. package/dist/types/hooks/useMemory/useMemory.d.ts +29 -0
  612. package/dist/types/hooks/useMount/useMount.d.ts +12 -0
  613. package/dist/types/hooks/useMouse/useMouse.d.ts +45 -0
  614. package/dist/types/hooks/useMutation/useMutation.d.ts +36 -0
  615. package/dist/types/hooks/useMutationObserver/useMutationObserver.d.ts +60 -0
  616. package/dist/types/hooks/useNetwork/useNetwork.d.ts +51 -0
  617. package/dist/types/hooks/useOffsetPagination/useOffsetPagination.d.ts +68 -0
  618. package/dist/types/hooks/useOnce/useOnce.d.ts +14 -0
  619. package/dist/types/hooks/useOnline/useOnline.d.ts +13 -0
  620. package/dist/types/hooks/useOperatingSystem/useOperatingSystem.d.ts +14 -0
  621. package/dist/types/hooks/useOptimistic/useOptimistic.d.ts +18 -0
  622. package/dist/types/hooks/useOrientation/useOrientation.d.ts +20 -0
  623. package/dist/types/hooks/useOtpCredential/useOtpCredential.d.ts +49 -0
  624. package/dist/types/hooks/usePageLeave/usePageLeave.d.ts +12 -0
  625. package/dist/types/hooks/usePaint/usePaint.d.ts +97 -0
  626. package/dist/types/hooks/useParallax/useParallax.d.ts +54 -0
  627. package/dist/types/hooks/usePerformanceObserver/usePerformanceObserver.d.ts +25 -0
  628. package/dist/types/hooks/usePermission/usePermission.d.ts +35 -0
  629. package/dist/types/hooks/usePointerLock/usePointerLock.d.ts +26 -0
  630. package/dist/types/hooks/usePostMessage/usePostMessage.d.ts +16 -0
  631. package/dist/types/hooks/usePreferredColorScheme/usePreferredColorScheme.d.ts +13 -0
  632. package/dist/types/hooks/usePreferredContrast/usePreferredContrast.d.ts +13 -0
  633. package/dist/types/hooks/usePreferredDark/usePreferredDark.d.ts +9 -0
  634. package/dist/types/hooks/usePreferredLanguages/usePreferredLanguages.d.ts +13 -0
  635. package/dist/types/hooks/usePreferredReducedMotion/usePreferredReducedMotion.d.ts +13 -0
  636. package/dist/types/hooks/usePrevious/usePrevious.d.ts +17 -0
  637. package/dist/types/hooks/useQuery/useQuery.d.ts +50 -0
  638. package/dist/types/hooks/useQueue/useQueue.d.ts +30 -0
  639. package/dist/types/hooks/useRaf/useRaf.d.ts +37 -0
  640. package/dist/types/hooks/useRafValue/useRafValue.d.ts +14 -0
  641. package/dist/types/hooks/useRefState/useRefState.d.ts +18 -0
  642. package/dist/types/hooks/useRenderCount/useRenderCount.d.ts +11 -0
  643. package/dist/types/hooks/useRenderInfo/useRenderInfo.d.ts +19 -0
  644. package/dist/types/hooks/useRerender/useRerender.d.ts +14 -0
  645. package/dist/types/hooks/useResizeObserver/useResizeObserver.d.ts +49 -0
  646. package/dist/types/hooks/useScreenOrientation/useScreenOrientation.d.ts +35 -0
  647. package/dist/types/hooks/useScript/useScript.d.ts +24 -0
  648. package/dist/types/hooks/useScroll/useScroll.d.ts +99 -0
  649. package/dist/types/hooks/useScrollIntoView/useScrollIntoView.d.ts +48 -0
  650. package/dist/types/hooks/useScrollTo/useScrollTo.d.ts +50 -0
  651. package/dist/types/hooks/useSessionStorage/useSessionStorage.d.ts +21 -0
  652. package/dist/types/hooks/useSet/useSet.d.ts +41 -0
  653. package/dist/types/hooks/useShare/useShare.d.ts +33 -0
  654. package/dist/types/hooks/useStateHistory/useStateHistory.d.ts +33 -0
  655. package/dist/types/hooks/useStep/useStep.d.ts +48 -0
  656. package/dist/types/hooks/useSticky/useSticky.d.ts +42 -0
  657. package/dist/types/hooks/useStopwatch/useStopwatch.d.ts +59 -0
  658. package/dist/types/hooks/useStorage/useStorage.d.ts +40 -0
  659. package/dist/types/hooks/useTextDirection/useTextDirection.d.ts +41 -0
  660. package/dist/types/hooks/useTextSelection/useTextSelection.d.ts +25 -0
  661. package/dist/types/hooks/useThrottleCallback/useThrottleCallback.d.ts +15 -0
  662. package/dist/types/hooks/useThrottleValue/useThrottleValue.d.ts +14 -0
  663. package/dist/types/hooks/useTime/useTime.d.ts +24 -0
  664. package/dist/types/hooks/useTimeout/useTimeout.d.ts +21 -0
  665. package/dist/types/hooks/useTimer/useTimer.d.ts +84 -0
  666. package/dist/types/hooks/useToggle/useToggle.d.ts +18 -0
  667. package/dist/types/hooks/useUnmount/useUnmount.d.ts +12 -0
  668. package/dist/types/hooks/useVibrate/useVibrate.d.ts +40 -0
  669. package/dist/types/hooks/useWebSocket/useWebSocket.d.ts +35 -0
  670. package/dist/types/hooks/useWindowEvent/useWindowEvent.d.ts +16 -0
  671. package/dist/types/hooks/useWindowFocus/useWindowFocus.d.ts +11 -0
  672. package/dist/types/hooks/useWindowScroll/useWindowScroll.d.ts +19 -0
  673. package/dist/types/hooks/useWindowSize/useWindowSize.d.ts +29 -0
  674. package/dist/types/hooks/useWizard/useWizard.d.ts +27 -0
  675. package/dist/types/index.d.ts +2 -4215
  676. package/dist/types/utils/helpers/copy.d.ts +2 -0
  677. package/dist/types/utils/helpers/debounce.d.ts +1 -0
  678. package/dist/types/utils/helpers/getDate.d.ts +13 -0
  679. package/dist/types/utils/helpers/getElement.d.ts +12 -0
  680. package/dist/types/utils/helpers/getRetry.d.ts +1 -0
  681. package/dist/types/utils/helpers/index.d.ts +7 -0
  682. package/dist/types/utils/helpers/isTarget.d.ts +2 -0
  683. package/dist/types/utils/helpers/throttle.d.ts +1 -0
  684. package/package.json +7 -6
  685. package/dist/cjs/_rollupPluginBabelHelpers-COP1ZJjT.js +0 -3
  686. package/dist/cjs/_rollupPluginBabelHelpers-COP1ZJjT.js.map +0 -1
  687. package/dist/cjs/hooks/index.js +0 -3
  688. package/dist/cjs/hooks/index.js.map +0 -1
  689. package/dist/cjs/hooks/useActiveElement/useActiveElement.js +0 -3
  690. package/dist/cjs/hooks/useActiveElement/useActiveElement.js.map +0 -1
  691. package/dist/cjs/hooks/useAsync/useAsync.js +0 -3
  692. package/dist/cjs/hooks/useAsync/useAsync.js.map +0 -1
  693. package/dist/cjs/hooks/useBattery/useBattery.js +0 -3
  694. package/dist/cjs/hooks/useBattery/useBattery.js.map +0 -1
  695. package/dist/cjs/hooks/useBluetooth/useBluetooth.js +0 -3
  696. package/dist/cjs/hooks/useBluetooth/useBluetooth.js.map +0 -1
  697. package/dist/cjs/hooks/useBoolean/useBoolean.js +0 -3
  698. package/dist/cjs/hooks/useBoolean/useBoolean.js.map +0 -1
  699. package/dist/cjs/hooks/useBreakpoints/useBreakpoints.js +0 -3
  700. package/dist/cjs/hooks/useBreakpoints/useBreakpoints.js.map +0 -1
  701. package/dist/cjs/hooks/useBrowserLanguage/useBrowserLanguage.js +0 -3
  702. package/dist/cjs/hooks/useBrowserLanguage/useBrowserLanguage.js.map +0 -1
  703. package/dist/cjs/hooks/useClickOutside/useClickOutside.js +0 -3
  704. package/dist/cjs/hooks/useClickOutside/useClickOutside.js.map +0 -1
  705. package/dist/cjs/hooks/useClipboard/useClipboard.js +0 -3
  706. package/dist/cjs/hooks/useClipboard/useClipboard.js.map +0 -1
  707. package/dist/cjs/hooks/useConst/useConst.js +0 -3
  708. package/dist/cjs/hooks/useConst/useConst.js.map +0 -1
  709. package/dist/cjs/hooks/useCookie/useCookie.js +0 -3
  710. package/dist/cjs/hooks/useCookie/useCookie.js.map +0 -1
  711. package/dist/cjs/hooks/useCookies/useCookies.js +0 -3
  712. package/dist/cjs/hooks/useCookies/useCookies.js.map +0 -1
  713. package/dist/cjs/hooks/useCopy/useCopy.js +0 -3
  714. package/dist/cjs/hooks/useCopy/useCopy.js.map +0 -1
  715. package/dist/cjs/hooks/useCounter/useCounter.js +0 -3
  716. package/dist/cjs/hooks/useCounter/useCounter.js.map +0 -1
  717. package/dist/cjs/hooks/useCssVar/useCssVar.js +0 -3
  718. package/dist/cjs/hooks/useCssVar/useCssVar.js.map +0 -1
  719. package/dist/cjs/hooks/useDebounceCallback/useDebounceCallback.js +0 -3
  720. package/dist/cjs/hooks/useDebounceCallback/useDebounceCallback.js.map +0 -1
  721. package/dist/cjs/hooks/useDebounceValue/useDebounceValue.js +0 -3
  722. package/dist/cjs/hooks/useDebounceValue/useDebounceValue.js.map +0 -1
  723. package/dist/cjs/hooks/useDefault/useDefault.js +0 -3
  724. package/dist/cjs/hooks/useDefault/useDefault.js.map +0 -1
  725. package/dist/cjs/hooks/useDeviceMotion/useDeviceMotion.js +0 -3
  726. package/dist/cjs/hooks/useDeviceMotion/useDeviceMotion.js.map +0 -1
  727. package/dist/cjs/hooks/useDeviceOrientation/useDeviceOrientation.js +0 -3
  728. package/dist/cjs/hooks/useDeviceOrientation/useDeviceOrientation.js.map +0 -1
  729. package/dist/cjs/hooks/useDevicePixelRatio/useDevicePixelRatio.js +0 -3
  730. package/dist/cjs/hooks/useDevicePixelRatio/useDevicePixelRatio.js.map +0 -1
  731. package/dist/cjs/hooks/useDidUpdate/useDidUpdate.js +0 -3
  732. package/dist/cjs/hooks/useDidUpdate/useDidUpdate.js.map +0 -1
  733. package/dist/cjs/hooks/useDisclosure/useDisclosure.js +0 -3
  734. package/dist/cjs/hooks/useDisclosure/useDisclosure.js.map +0 -1
  735. package/dist/cjs/hooks/useDisplayMedia/useDisplayMedia.js +0 -3
  736. package/dist/cjs/hooks/useDisplayMedia/useDisplayMedia.js.map +0 -1
  737. package/dist/cjs/hooks/useDocumentEvent/useDocumentEvent.js +0 -3
  738. package/dist/cjs/hooks/useDocumentEvent/useDocumentEvent.js.map +0 -1
  739. package/dist/cjs/hooks/useDocumentTitle/useDocumentTitle.js +0 -3
  740. package/dist/cjs/hooks/useDocumentTitle/useDocumentTitle.js.map +0 -1
  741. package/dist/cjs/hooks/useDocumentVisibility/useDocumentVisibility.js +0 -3
  742. package/dist/cjs/hooks/useDocumentVisibility/useDocumentVisibility.js.map +0 -1
  743. package/dist/cjs/hooks/useElementSize/useElementSize.js +0 -3
  744. package/dist/cjs/hooks/useElementSize/useElementSize.js.map +0 -1
  745. package/dist/cjs/hooks/useEvent/useEvent.js +0 -3
  746. package/dist/cjs/hooks/useEvent/useEvent.js.map +0 -1
  747. package/dist/cjs/hooks/useEventListener/useEventListener.js +0 -3
  748. package/dist/cjs/hooks/useEventListener/useEventListener.js.map +0 -1
  749. package/dist/cjs/hooks/useEyeDropper/useEyeDropper.js +0 -3
  750. package/dist/cjs/hooks/useEyeDropper/useEyeDropper.js.map +0 -1
  751. package/dist/cjs/hooks/useFavicon/useFavicon.js +0 -3
  752. package/dist/cjs/hooks/useFavicon/useFavicon.js.map +0 -1
  753. package/dist/cjs/hooks/useField/useField.js +0 -3
  754. package/dist/cjs/hooks/useField/useField.js.map +0 -1
  755. package/dist/cjs/hooks/useFileDialog/useFileDialog.js +0 -3
  756. package/dist/cjs/hooks/useFileDialog/useFileDialog.js.map +0 -1
  757. package/dist/cjs/hooks/useFocus/useFocus.js +0 -3
  758. package/dist/cjs/hooks/useFocus/useFocus.js.map +0 -1
  759. package/dist/cjs/hooks/useFps/useFps.js +0 -3
  760. package/dist/cjs/hooks/useFps/useFps.js.map +0 -1
  761. package/dist/cjs/hooks/useFul/useFul.js +0 -3
  762. package/dist/cjs/hooks/useFul/useFul.js.map +0 -1
  763. package/dist/cjs/hooks/useFullscreen/useFullscreen.js +0 -3
  764. package/dist/cjs/hooks/useFullscreen/useFullscreen.js.map +0 -1
  765. package/dist/cjs/hooks/useGamepad/useGamepad.js +0 -3
  766. package/dist/cjs/hooks/useGamepad/useGamepad.js.map +0 -1
  767. package/dist/cjs/hooks/useGeolocation/useGeolocation.js +0 -3
  768. package/dist/cjs/hooks/useGeolocation/useGeolocation.js.map +0 -1
  769. package/dist/cjs/hooks/useHash/useHash.js +0 -3
  770. package/dist/cjs/hooks/useHash/useHash.js.map +0 -1
  771. package/dist/cjs/hooks/useHotkeys/useHotkeys.js +0 -3
  772. package/dist/cjs/hooks/useHotkeys/useHotkeys.js.map +0 -1
  773. package/dist/cjs/hooks/useHover/useHover.js +0 -3
  774. package/dist/cjs/hooks/useHover/useHover.js.map +0 -1
  775. package/dist/cjs/hooks/useIdle/useIdle.js +0 -3
  776. package/dist/cjs/hooks/useIdle/useIdle.js.map +0 -1
  777. package/dist/cjs/hooks/useImage/useImage.js +0 -3
  778. package/dist/cjs/hooks/useImage/useImage.js.map +0 -1
  779. package/dist/cjs/hooks/useInfiniteScroll/useInfiniteScroll.js +0 -3
  780. package/dist/cjs/hooks/useInfiniteScroll/useInfiniteScroll.js.map +0 -1
  781. package/dist/cjs/hooks/useIntersectionObserver/useIntersectionObserver.js +0 -3
  782. package/dist/cjs/hooks/useIntersectionObserver/useIntersectionObserver.js.map +0 -1
  783. package/dist/cjs/hooks/useInterval/useInterval.js +0 -3
  784. package/dist/cjs/hooks/useInterval/useInterval.js.map +0 -1
  785. package/dist/cjs/hooks/useIsFirstRender/useIsFirstRender.js +0 -3
  786. package/dist/cjs/hooks/useIsFirstRender/useIsFirstRender.js.map +0 -1
  787. package/dist/cjs/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +0 -3
  788. package/dist/cjs/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js.map +0 -1
  789. package/dist/cjs/hooks/useKeyPress/useKeyPress.js +0 -3
  790. package/dist/cjs/hooks/useKeyPress/useKeyPress.js.map +0 -1
  791. package/dist/cjs/hooks/useKeyPressEvent/useKeyPressEvent.js +0 -3
  792. package/dist/cjs/hooks/useKeyPressEvent/useKeyPressEvent.js.map +0 -1
  793. package/dist/cjs/hooks/useKeyboard/useKeyboard.js +0 -3
  794. package/dist/cjs/hooks/useKeyboard/useKeyboard.js.map +0 -1
  795. package/dist/cjs/hooks/useKeysPressed/useKeysPressed.js +0 -3
  796. package/dist/cjs/hooks/useKeysPressed/useKeysPressed.js.map +0 -1
  797. package/dist/cjs/hooks/useLastChanged/useLastChanged.js +0 -3
  798. package/dist/cjs/hooks/useLastChanged/useLastChanged.js.map +0 -1
  799. package/dist/cjs/hooks/useLatest/useLatest.js +0 -3
  800. package/dist/cjs/hooks/useLatest/useLatest.js.map +0 -1
  801. package/dist/cjs/hooks/useLess/useLess.js +0 -3
  802. package/dist/cjs/hooks/useLess/useLess.js.map +0 -1
  803. package/dist/cjs/hooks/useList/useList.js +0 -3
  804. package/dist/cjs/hooks/useList/useList.js.map +0 -1
  805. package/dist/cjs/hooks/useLocalStorage/useLocalStorage.js +0 -3
  806. package/dist/cjs/hooks/useLocalStorage/useLocalStorage.js.map +0 -1
  807. package/dist/cjs/hooks/useLockCallback/useLockCallback.js +0 -3
  808. package/dist/cjs/hooks/useLockCallback/useLockCallback.js.map +0 -1
  809. package/dist/cjs/hooks/useLogger/useLogger.js +0 -3
  810. package/dist/cjs/hooks/useLogger/useLogger.js.map +0 -1
  811. package/dist/cjs/hooks/useLongPress/useLongPress.js +0 -3
  812. package/dist/cjs/hooks/useLongPress/useLongPress.js.map +0 -1
  813. package/dist/cjs/hooks/useMap/useMap.js +0 -3
  814. package/dist/cjs/hooks/useMap/useMap.js.map +0 -1
  815. package/dist/cjs/hooks/useMeasure/useMeasure.js +0 -3
  816. package/dist/cjs/hooks/useMeasure/useMeasure.js.map +0 -1
  817. package/dist/cjs/hooks/useMediaQuery/useMediaQuery.js +0 -3
  818. package/dist/cjs/hooks/useMediaQuery/useMediaQuery.js.map +0 -1
  819. package/dist/cjs/hooks/useMemory/useMemory.js +0 -3
  820. package/dist/cjs/hooks/useMemory/useMemory.js.map +0 -1
  821. package/dist/cjs/hooks/useMount/useMount.js +0 -3
  822. package/dist/cjs/hooks/useMount/useMount.js.map +0 -1
  823. package/dist/cjs/hooks/useMouse/useMouse.js +0 -3
  824. package/dist/cjs/hooks/useMouse/useMouse.js.map +0 -1
  825. package/dist/cjs/hooks/useMutation/useMutation.js +0 -3
  826. package/dist/cjs/hooks/useMutation/useMutation.js.map +0 -1
  827. package/dist/cjs/hooks/useMutationObserver/useMutationObserver.js +0 -3
  828. package/dist/cjs/hooks/useMutationObserver/useMutationObserver.js.map +0 -1
  829. package/dist/cjs/hooks/useNetwork/useNetwork.js +0 -3
  830. package/dist/cjs/hooks/useNetwork/useNetwork.js.map +0 -1
  831. package/dist/cjs/hooks/useOffsetPagination/useOffsetPagination.js +0 -3
  832. package/dist/cjs/hooks/useOffsetPagination/useOffsetPagination.js.map +0 -1
  833. package/dist/cjs/hooks/useOnce/useOnce.js +0 -3
  834. package/dist/cjs/hooks/useOnce/useOnce.js.map +0 -1
  835. package/dist/cjs/hooks/useOnline/useOnline.js +0 -3
  836. package/dist/cjs/hooks/useOnline/useOnline.js.map +0 -1
  837. package/dist/cjs/hooks/useOperatingSystem/useOperatingSystem.js +0 -3
  838. package/dist/cjs/hooks/useOperatingSystem/useOperatingSystem.js.map +0 -1
  839. package/dist/cjs/hooks/useOptimistic/useOptimistic.js +0 -3
  840. package/dist/cjs/hooks/useOptimistic/useOptimistic.js.map +0 -1
  841. package/dist/cjs/hooks/useOrientation/useOrientation.js +0 -3
  842. package/dist/cjs/hooks/useOrientation/useOrientation.js.map +0 -1
  843. package/dist/cjs/hooks/useOtpCredential/useOtpCredential.js +0 -3
  844. package/dist/cjs/hooks/useOtpCredential/useOtpCredential.js.map +0 -1
  845. package/dist/cjs/hooks/usePageLeave/usePageLeave.js +0 -3
  846. package/dist/cjs/hooks/usePageLeave/usePageLeave.js.map +0 -1
  847. package/dist/cjs/hooks/usePaint/usePaint.js +0 -3
  848. package/dist/cjs/hooks/usePaint/usePaint.js.map +0 -1
  849. package/dist/cjs/hooks/useParallax/useParallax.js +0 -3
  850. package/dist/cjs/hooks/useParallax/useParallax.js.map +0 -1
  851. package/dist/cjs/hooks/usePerformanceObserver/usePerformanceObserver.js +0 -3
  852. package/dist/cjs/hooks/usePerformanceObserver/usePerformanceObserver.js.map +0 -1
  853. package/dist/cjs/hooks/usePermission/usePermission.js +0 -3
  854. package/dist/cjs/hooks/usePermission/usePermission.js.map +0 -1
  855. package/dist/cjs/hooks/usePointerLock/usePointerLock.js +0 -3
  856. package/dist/cjs/hooks/usePointerLock/usePointerLock.js.map +0 -1
  857. package/dist/cjs/hooks/usePostMessage/usePostMessage.js +0 -3
  858. package/dist/cjs/hooks/usePostMessage/usePostMessage.js.map +0 -1
  859. package/dist/cjs/hooks/usePreferredColorScheme/usePreferredColorScheme.js +0 -3
  860. package/dist/cjs/hooks/usePreferredColorScheme/usePreferredColorScheme.js.map +0 -1
  861. package/dist/cjs/hooks/usePreferredContrast/usePreferredContrast.js +0 -3
  862. package/dist/cjs/hooks/usePreferredContrast/usePreferredContrast.js.map +0 -1
  863. package/dist/cjs/hooks/usePreferredDark/usePreferredDark.js +0 -3
  864. package/dist/cjs/hooks/usePreferredDark/usePreferredDark.js.map +0 -1
  865. package/dist/cjs/hooks/usePreferredLanguages/usePreferredLanguages.js +0 -3
  866. package/dist/cjs/hooks/usePreferredLanguages/usePreferredLanguages.js.map +0 -1
  867. package/dist/cjs/hooks/usePreferredReducedMotion/usePreferredReducedMotion.js +0 -3
  868. package/dist/cjs/hooks/usePreferredReducedMotion/usePreferredReducedMotion.js.map +0 -1
  869. package/dist/cjs/hooks/usePrevious/usePrevious.js +0 -3
  870. package/dist/cjs/hooks/usePrevious/usePrevious.js.map +0 -1
  871. package/dist/cjs/hooks/useQuery/useQuery.js +0 -3
  872. package/dist/cjs/hooks/useQuery/useQuery.js.map +0 -1
  873. package/dist/cjs/hooks/useQueue/useQueue.js +0 -3
  874. package/dist/cjs/hooks/useQueue/useQueue.js.map +0 -1
  875. package/dist/cjs/hooks/useRaf/useRaf.js +0 -3
  876. package/dist/cjs/hooks/useRaf/useRaf.js.map +0 -1
  877. package/dist/cjs/hooks/useRafValue/useRafValue.js +0 -3
  878. package/dist/cjs/hooks/useRafValue/useRafValue.js.map +0 -1
  879. package/dist/cjs/hooks/useRefState/useRefState.js +0 -3
  880. package/dist/cjs/hooks/useRefState/useRefState.js.map +0 -1
  881. package/dist/cjs/hooks/useRenderCount/useRenderCount.js +0 -3
  882. package/dist/cjs/hooks/useRenderCount/useRenderCount.js.map +0 -1
  883. package/dist/cjs/hooks/useRenderInfo/useRenderInfo.js +0 -3
  884. package/dist/cjs/hooks/useRenderInfo/useRenderInfo.js.map +0 -1
  885. package/dist/cjs/hooks/useRerender/useRerender.js +0 -3
  886. package/dist/cjs/hooks/useRerender/useRerender.js.map +0 -1
  887. package/dist/cjs/hooks/useResizeObserver/useResizeObserver.js +0 -3
  888. package/dist/cjs/hooks/useResizeObserver/useResizeObserver.js.map +0 -1
  889. package/dist/cjs/hooks/useScreenOrientation/useScreenOrientation.js +0 -3
  890. package/dist/cjs/hooks/useScreenOrientation/useScreenOrientation.js.map +0 -1
  891. package/dist/cjs/hooks/useScript/useScript.js +0 -3
  892. package/dist/cjs/hooks/useScript/useScript.js.map +0 -1
  893. package/dist/cjs/hooks/useScroll/useScroll.js +0 -3
  894. package/dist/cjs/hooks/useScroll/useScroll.js.map +0 -1
  895. package/dist/cjs/hooks/useScrollIntoView/useScrollIntoView.js +0 -3
  896. package/dist/cjs/hooks/useScrollIntoView/useScrollIntoView.js.map +0 -1
  897. package/dist/cjs/hooks/useScrollTo/useScrollTo.js +0 -3
  898. package/dist/cjs/hooks/useScrollTo/useScrollTo.js.map +0 -1
  899. package/dist/cjs/hooks/useSessionStorage/useSessionStorage.js +0 -3
  900. package/dist/cjs/hooks/useSessionStorage/useSessionStorage.js.map +0 -1
  901. package/dist/cjs/hooks/useSet/useSet.js +0 -3
  902. package/dist/cjs/hooks/useSet/useSet.js.map +0 -1
  903. package/dist/cjs/hooks/useShare/useShare.js +0 -3
  904. package/dist/cjs/hooks/useShare/useShare.js.map +0 -1
  905. package/dist/cjs/hooks/useStateHistory/useStateHistory.js +0 -3
  906. package/dist/cjs/hooks/useStateHistory/useStateHistory.js.map +0 -1
  907. package/dist/cjs/hooks/useStep/useStep.js +0 -3
  908. package/dist/cjs/hooks/useStep/useStep.js.map +0 -1
  909. package/dist/cjs/hooks/useSticky/useSticky.js +0 -3
  910. package/dist/cjs/hooks/useSticky/useSticky.js.map +0 -1
  911. package/dist/cjs/hooks/useStopwatch/useStopwatch.js +0 -3
  912. package/dist/cjs/hooks/useStopwatch/useStopwatch.js.map +0 -1
  913. package/dist/cjs/hooks/useStorage/useStorage.js +0 -3
  914. package/dist/cjs/hooks/useStorage/useStorage.js.map +0 -1
  915. package/dist/cjs/hooks/useTextDirection/useTextDirection.js +0 -3
  916. package/dist/cjs/hooks/useTextDirection/useTextDirection.js.map +0 -1
  917. package/dist/cjs/hooks/useTextSelection/useTextSelection.js +0 -3
  918. package/dist/cjs/hooks/useTextSelection/useTextSelection.js.map +0 -1
  919. package/dist/cjs/hooks/useThrottleCallback/useThrottleCallback.js +0 -3
  920. package/dist/cjs/hooks/useThrottleCallback/useThrottleCallback.js.map +0 -1
  921. package/dist/cjs/hooks/useThrottleValue/useThrottleValue.js +0 -3
  922. package/dist/cjs/hooks/useThrottleValue/useThrottleValue.js.map +0 -1
  923. package/dist/cjs/hooks/useTime/useTime.js +0 -3
  924. package/dist/cjs/hooks/useTime/useTime.js.map +0 -1
  925. package/dist/cjs/hooks/useTimeout/useTimeout.js +0 -3
  926. package/dist/cjs/hooks/useTimeout/useTimeout.js.map +0 -1
  927. package/dist/cjs/hooks/useTimer/useTimer.js +0 -3
  928. package/dist/cjs/hooks/useTimer/useTimer.js.map +0 -1
  929. package/dist/cjs/hooks/useToggle/useToggle.js +0 -3
  930. package/dist/cjs/hooks/useToggle/useToggle.js.map +0 -1
  931. package/dist/cjs/hooks/useUnmount/useUnmount.js +0 -3
  932. package/dist/cjs/hooks/useUnmount/useUnmount.js.map +0 -1
  933. package/dist/cjs/hooks/useVibrate/useVibrate.js +0 -3
  934. package/dist/cjs/hooks/useVibrate/useVibrate.js.map +0 -1
  935. package/dist/cjs/hooks/useWebSocket/useWebSocket.js +0 -3
  936. package/dist/cjs/hooks/useWebSocket/useWebSocket.js.map +0 -1
  937. package/dist/cjs/hooks/useWindowEvent/useWindowEvent.js +0 -3
  938. package/dist/cjs/hooks/useWindowEvent/useWindowEvent.js.map +0 -1
  939. package/dist/cjs/hooks/useWindowFocus/useWindowFocus.js +0 -3
  940. package/dist/cjs/hooks/useWindowFocus/useWindowFocus.js.map +0 -1
  941. package/dist/cjs/hooks/useWindowScroll/useWindowScroll.js +0 -3
  942. package/dist/cjs/hooks/useWindowScroll/useWindowScroll.js.map +0 -1
  943. package/dist/cjs/hooks/useWindowSize/useWindowSize.js +0 -3
  944. package/dist/cjs/hooks/useWindowSize/useWindowSize.js.map +0 -1
  945. package/dist/cjs/hooks/useWizard/useWizard.js +0 -3
  946. package/dist/cjs/hooks/useWizard/useWizard.js.map +0 -1
  947. package/dist/cjs/index.js +0 -3
  948. package/dist/cjs/index.js.map +0 -1
  949. package/dist/cjs/utils/helpers/copy.js +0 -3
  950. package/dist/cjs/utils/helpers/copy.js.map +0 -1
  951. package/dist/cjs/utils/helpers/debounce.js +0 -3
  952. package/dist/cjs/utils/helpers/debounce.js.map +0 -1
  953. package/dist/cjs/utils/helpers/getDate.js +0 -3
  954. package/dist/cjs/utils/helpers/getDate.js.map +0 -1
  955. package/dist/cjs/utils/helpers/getElement.js +0 -3
  956. package/dist/cjs/utils/helpers/getElement.js.map +0 -1
  957. package/dist/cjs/utils/helpers/getRetry.js +0 -3
  958. package/dist/cjs/utils/helpers/getRetry.js.map +0 -1
  959. package/dist/cjs/utils/helpers/index.js +0 -3
  960. package/dist/cjs/utils/helpers/index.js.map +0 -1
  961. package/dist/cjs/utils/helpers/isTarget.js +0 -3
  962. package/dist/cjs/utils/helpers/isTarget.js.map +0 -1
  963. package/dist/cjs/utils/helpers/throttle.js +0 -3
  964. package/dist/cjs/utils/helpers/throttle.js.map +0 -1
  965. package/dist/esm/_rollupPluginBabelHelpers-DoUxcpfK.js +0 -3
  966. package/dist/esm/_rollupPluginBabelHelpers-DoUxcpfK.js.map +0 -1
  967. package/dist/esm/hooks/index.js +0 -3
  968. package/dist/esm/hooks/index.js.map +0 -1
  969. package/dist/esm/hooks/useActiveElement/useActiveElement.js +0 -3
  970. package/dist/esm/hooks/useActiveElement/useActiveElement.js.map +0 -1
  971. package/dist/esm/hooks/useAsync/useAsync.js +0 -3
  972. package/dist/esm/hooks/useAsync/useAsync.js.map +0 -1
  973. package/dist/esm/hooks/useBattery/useBattery.js +0 -3
  974. package/dist/esm/hooks/useBattery/useBattery.js.map +0 -1
  975. package/dist/esm/hooks/useBluetooth/useBluetooth.js +0 -3
  976. package/dist/esm/hooks/useBluetooth/useBluetooth.js.map +0 -1
  977. package/dist/esm/hooks/useBoolean/useBoolean.js +0 -3
  978. package/dist/esm/hooks/useBoolean/useBoolean.js.map +0 -1
  979. package/dist/esm/hooks/useBreakpoints/useBreakpoints.js +0 -3
  980. package/dist/esm/hooks/useBreakpoints/useBreakpoints.js.map +0 -1
  981. package/dist/esm/hooks/useBrowserLanguage/useBrowserLanguage.js +0 -3
  982. package/dist/esm/hooks/useBrowserLanguage/useBrowserLanguage.js.map +0 -1
  983. package/dist/esm/hooks/useClickOutside/useClickOutside.js +0 -3
  984. package/dist/esm/hooks/useClickOutside/useClickOutside.js.map +0 -1
  985. package/dist/esm/hooks/useClipboard/useClipboard.js +0 -3
  986. package/dist/esm/hooks/useClipboard/useClipboard.js.map +0 -1
  987. package/dist/esm/hooks/useConst/useConst.js +0 -3
  988. package/dist/esm/hooks/useConst/useConst.js.map +0 -1
  989. package/dist/esm/hooks/useCookie/useCookie.js +0 -3
  990. package/dist/esm/hooks/useCookie/useCookie.js.map +0 -1
  991. package/dist/esm/hooks/useCookies/useCookies.js +0 -3
  992. package/dist/esm/hooks/useCookies/useCookies.js.map +0 -1
  993. package/dist/esm/hooks/useCopy/useCopy.js +0 -3
  994. package/dist/esm/hooks/useCopy/useCopy.js.map +0 -1
  995. package/dist/esm/hooks/useCounter/useCounter.js +0 -3
  996. package/dist/esm/hooks/useCounter/useCounter.js.map +0 -1
  997. package/dist/esm/hooks/useCssVar/useCssVar.js +0 -3
  998. package/dist/esm/hooks/useCssVar/useCssVar.js.map +0 -1
  999. package/dist/esm/hooks/useDebounceCallback/useDebounceCallback.js +0 -3
  1000. package/dist/esm/hooks/useDebounceCallback/useDebounceCallback.js.map +0 -1
  1001. package/dist/esm/hooks/useDebounceValue/useDebounceValue.js +0 -3
  1002. package/dist/esm/hooks/useDebounceValue/useDebounceValue.js.map +0 -1
  1003. package/dist/esm/hooks/useDefault/useDefault.js +0 -3
  1004. package/dist/esm/hooks/useDefault/useDefault.js.map +0 -1
  1005. package/dist/esm/hooks/useDeviceMotion/useDeviceMotion.js +0 -3
  1006. package/dist/esm/hooks/useDeviceMotion/useDeviceMotion.js.map +0 -1
  1007. package/dist/esm/hooks/useDeviceOrientation/useDeviceOrientation.js +0 -3
  1008. package/dist/esm/hooks/useDeviceOrientation/useDeviceOrientation.js.map +0 -1
  1009. package/dist/esm/hooks/useDevicePixelRatio/useDevicePixelRatio.js +0 -3
  1010. package/dist/esm/hooks/useDevicePixelRatio/useDevicePixelRatio.js.map +0 -1
  1011. package/dist/esm/hooks/useDidUpdate/useDidUpdate.js +0 -3
  1012. package/dist/esm/hooks/useDidUpdate/useDidUpdate.js.map +0 -1
  1013. package/dist/esm/hooks/useDisclosure/useDisclosure.js +0 -3
  1014. package/dist/esm/hooks/useDisclosure/useDisclosure.js.map +0 -1
  1015. package/dist/esm/hooks/useDisplayMedia/useDisplayMedia.js +0 -3
  1016. package/dist/esm/hooks/useDisplayMedia/useDisplayMedia.js.map +0 -1
  1017. package/dist/esm/hooks/useDocumentEvent/useDocumentEvent.js +0 -3
  1018. package/dist/esm/hooks/useDocumentEvent/useDocumentEvent.js.map +0 -1
  1019. package/dist/esm/hooks/useDocumentTitle/useDocumentTitle.js +0 -3
  1020. package/dist/esm/hooks/useDocumentTitle/useDocumentTitle.js.map +0 -1
  1021. package/dist/esm/hooks/useDocumentVisibility/useDocumentVisibility.js +0 -3
  1022. package/dist/esm/hooks/useDocumentVisibility/useDocumentVisibility.js.map +0 -1
  1023. package/dist/esm/hooks/useElementSize/useElementSize.js +0 -3
  1024. package/dist/esm/hooks/useElementSize/useElementSize.js.map +0 -1
  1025. package/dist/esm/hooks/useEvent/useEvent.js +0 -3
  1026. package/dist/esm/hooks/useEvent/useEvent.js.map +0 -1
  1027. package/dist/esm/hooks/useEventListener/useEventListener.js +0 -3
  1028. package/dist/esm/hooks/useEventListener/useEventListener.js.map +0 -1
  1029. package/dist/esm/hooks/useEyeDropper/useEyeDropper.js +0 -3
  1030. package/dist/esm/hooks/useEyeDropper/useEyeDropper.js.map +0 -1
  1031. package/dist/esm/hooks/useFavicon/useFavicon.js +0 -3
  1032. package/dist/esm/hooks/useFavicon/useFavicon.js.map +0 -1
  1033. package/dist/esm/hooks/useField/useField.js +0 -3
  1034. package/dist/esm/hooks/useField/useField.js.map +0 -1
  1035. package/dist/esm/hooks/useFileDialog/useFileDialog.js +0 -3
  1036. package/dist/esm/hooks/useFileDialog/useFileDialog.js.map +0 -1
  1037. package/dist/esm/hooks/useFocus/useFocus.js +0 -3
  1038. package/dist/esm/hooks/useFocus/useFocus.js.map +0 -1
  1039. package/dist/esm/hooks/useFps/useFps.js +0 -3
  1040. package/dist/esm/hooks/useFps/useFps.js.map +0 -1
  1041. package/dist/esm/hooks/useFul/useFul.js +0 -3
  1042. package/dist/esm/hooks/useFul/useFul.js.map +0 -1
  1043. package/dist/esm/hooks/useFullscreen/useFullscreen.js +0 -3
  1044. package/dist/esm/hooks/useFullscreen/useFullscreen.js.map +0 -1
  1045. package/dist/esm/hooks/useGamepad/useGamepad.js +0 -3
  1046. package/dist/esm/hooks/useGamepad/useGamepad.js.map +0 -1
  1047. package/dist/esm/hooks/useGeolocation/useGeolocation.js +0 -3
  1048. package/dist/esm/hooks/useGeolocation/useGeolocation.js.map +0 -1
  1049. package/dist/esm/hooks/useHash/useHash.js +0 -3
  1050. package/dist/esm/hooks/useHash/useHash.js.map +0 -1
  1051. package/dist/esm/hooks/useHotkeys/useHotkeys.js +0 -3
  1052. package/dist/esm/hooks/useHotkeys/useHotkeys.js.map +0 -1
  1053. package/dist/esm/hooks/useHover/useHover.js +0 -3
  1054. package/dist/esm/hooks/useHover/useHover.js.map +0 -1
  1055. package/dist/esm/hooks/useIdle/useIdle.js +0 -3
  1056. package/dist/esm/hooks/useIdle/useIdle.js.map +0 -1
  1057. package/dist/esm/hooks/useImage/useImage.js +0 -3
  1058. package/dist/esm/hooks/useImage/useImage.js.map +0 -1
  1059. package/dist/esm/hooks/useInfiniteScroll/useInfiniteScroll.js +0 -3
  1060. package/dist/esm/hooks/useInfiniteScroll/useInfiniteScroll.js.map +0 -1
  1061. package/dist/esm/hooks/useIntersectionObserver/useIntersectionObserver.js +0 -3
  1062. package/dist/esm/hooks/useIntersectionObserver/useIntersectionObserver.js.map +0 -1
  1063. package/dist/esm/hooks/useInterval/useInterval.js +0 -3
  1064. package/dist/esm/hooks/useInterval/useInterval.js.map +0 -1
  1065. package/dist/esm/hooks/useIsFirstRender/useIsFirstRender.js +0 -3
  1066. package/dist/esm/hooks/useIsFirstRender/useIsFirstRender.js.map +0 -1
  1067. package/dist/esm/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +0 -3
  1068. package/dist/esm/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js.map +0 -1
  1069. package/dist/esm/hooks/useKeyPress/useKeyPress.js +0 -3
  1070. package/dist/esm/hooks/useKeyPress/useKeyPress.js.map +0 -1
  1071. package/dist/esm/hooks/useKeyPressEvent/useKeyPressEvent.js +0 -3
  1072. package/dist/esm/hooks/useKeyPressEvent/useKeyPressEvent.js.map +0 -1
  1073. package/dist/esm/hooks/useKeyboard/useKeyboard.js +0 -3
  1074. package/dist/esm/hooks/useKeyboard/useKeyboard.js.map +0 -1
  1075. package/dist/esm/hooks/useKeysPressed/useKeysPressed.js +0 -3
  1076. package/dist/esm/hooks/useKeysPressed/useKeysPressed.js.map +0 -1
  1077. package/dist/esm/hooks/useLastChanged/useLastChanged.js +0 -3
  1078. package/dist/esm/hooks/useLastChanged/useLastChanged.js.map +0 -1
  1079. package/dist/esm/hooks/useLatest/useLatest.js +0 -3
  1080. package/dist/esm/hooks/useLatest/useLatest.js.map +0 -1
  1081. package/dist/esm/hooks/useLess/useLess.js +0 -3
  1082. package/dist/esm/hooks/useLess/useLess.js.map +0 -1
  1083. package/dist/esm/hooks/useList/useList.js +0 -3
  1084. package/dist/esm/hooks/useList/useList.js.map +0 -1
  1085. package/dist/esm/hooks/useLocalStorage/useLocalStorage.js +0 -3
  1086. package/dist/esm/hooks/useLocalStorage/useLocalStorage.js.map +0 -1
  1087. package/dist/esm/hooks/useLockCallback/useLockCallback.js +0 -3
  1088. package/dist/esm/hooks/useLockCallback/useLockCallback.js.map +0 -1
  1089. package/dist/esm/hooks/useLogger/useLogger.js +0 -3
  1090. package/dist/esm/hooks/useLogger/useLogger.js.map +0 -1
  1091. package/dist/esm/hooks/useLongPress/useLongPress.js +0 -3
  1092. package/dist/esm/hooks/useLongPress/useLongPress.js.map +0 -1
  1093. package/dist/esm/hooks/useMap/useMap.js +0 -3
  1094. package/dist/esm/hooks/useMap/useMap.js.map +0 -1
  1095. package/dist/esm/hooks/useMeasure/useMeasure.js +0 -3
  1096. package/dist/esm/hooks/useMeasure/useMeasure.js.map +0 -1
  1097. package/dist/esm/hooks/useMediaQuery/useMediaQuery.js +0 -3
  1098. package/dist/esm/hooks/useMediaQuery/useMediaQuery.js.map +0 -1
  1099. package/dist/esm/hooks/useMemory/useMemory.js +0 -3
  1100. package/dist/esm/hooks/useMemory/useMemory.js.map +0 -1
  1101. package/dist/esm/hooks/useMount/useMount.js +0 -3
  1102. package/dist/esm/hooks/useMount/useMount.js.map +0 -1
  1103. package/dist/esm/hooks/useMouse/useMouse.js +0 -3
  1104. package/dist/esm/hooks/useMouse/useMouse.js.map +0 -1
  1105. package/dist/esm/hooks/useMutation/useMutation.js +0 -3
  1106. package/dist/esm/hooks/useMutation/useMutation.js.map +0 -1
  1107. package/dist/esm/hooks/useMutationObserver/useMutationObserver.js +0 -3
  1108. package/dist/esm/hooks/useMutationObserver/useMutationObserver.js.map +0 -1
  1109. package/dist/esm/hooks/useNetwork/useNetwork.js +0 -3
  1110. package/dist/esm/hooks/useNetwork/useNetwork.js.map +0 -1
  1111. package/dist/esm/hooks/useOffsetPagination/useOffsetPagination.js +0 -3
  1112. package/dist/esm/hooks/useOffsetPagination/useOffsetPagination.js.map +0 -1
  1113. package/dist/esm/hooks/useOnce/useOnce.js +0 -3
  1114. package/dist/esm/hooks/useOnce/useOnce.js.map +0 -1
  1115. package/dist/esm/hooks/useOnline/useOnline.js +0 -3
  1116. package/dist/esm/hooks/useOnline/useOnline.js.map +0 -1
  1117. package/dist/esm/hooks/useOperatingSystem/useOperatingSystem.js +0 -3
  1118. package/dist/esm/hooks/useOperatingSystem/useOperatingSystem.js.map +0 -1
  1119. package/dist/esm/hooks/useOptimistic/useOptimistic.js +0 -3
  1120. package/dist/esm/hooks/useOptimistic/useOptimistic.js.map +0 -1
  1121. package/dist/esm/hooks/useOrientation/useOrientation.js +0 -3
  1122. package/dist/esm/hooks/useOrientation/useOrientation.js.map +0 -1
  1123. package/dist/esm/hooks/useOtpCredential/useOtpCredential.js +0 -3
  1124. package/dist/esm/hooks/useOtpCredential/useOtpCredential.js.map +0 -1
  1125. package/dist/esm/hooks/usePageLeave/usePageLeave.js +0 -3
  1126. package/dist/esm/hooks/usePageLeave/usePageLeave.js.map +0 -1
  1127. package/dist/esm/hooks/usePaint/usePaint.js +0 -3
  1128. package/dist/esm/hooks/usePaint/usePaint.js.map +0 -1
  1129. package/dist/esm/hooks/useParallax/useParallax.js +0 -3
  1130. package/dist/esm/hooks/useParallax/useParallax.js.map +0 -1
  1131. package/dist/esm/hooks/usePerformanceObserver/usePerformanceObserver.js +0 -3
  1132. package/dist/esm/hooks/usePerformanceObserver/usePerformanceObserver.js.map +0 -1
  1133. package/dist/esm/hooks/usePermission/usePermission.js +0 -3
  1134. package/dist/esm/hooks/usePermission/usePermission.js.map +0 -1
  1135. package/dist/esm/hooks/usePointerLock/usePointerLock.js +0 -3
  1136. package/dist/esm/hooks/usePointerLock/usePointerLock.js.map +0 -1
  1137. package/dist/esm/hooks/usePostMessage/usePostMessage.js +0 -3
  1138. package/dist/esm/hooks/usePostMessage/usePostMessage.js.map +0 -1
  1139. package/dist/esm/hooks/usePreferredColorScheme/usePreferredColorScheme.js +0 -3
  1140. package/dist/esm/hooks/usePreferredColorScheme/usePreferredColorScheme.js.map +0 -1
  1141. package/dist/esm/hooks/usePreferredContrast/usePreferredContrast.js +0 -3
  1142. package/dist/esm/hooks/usePreferredContrast/usePreferredContrast.js.map +0 -1
  1143. package/dist/esm/hooks/usePreferredDark/usePreferredDark.js +0 -3
  1144. package/dist/esm/hooks/usePreferredDark/usePreferredDark.js.map +0 -1
  1145. package/dist/esm/hooks/usePreferredLanguages/usePreferredLanguages.js +0 -3
  1146. package/dist/esm/hooks/usePreferredLanguages/usePreferredLanguages.js.map +0 -1
  1147. package/dist/esm/hooks/usePreferredReducedMotion/usePreferredReducedMotion.js +0 -3
  1148. package/dist/esm/hooks/usePreferredReducedMotion/usePreferredReducedMotion.js.map +0 -1
  1149. package/dist/esm/hooks/usePrevious/usePrevious.js +0 -3
  1150. package/dist/esm/hooks/usePrevious/usePrevious.js.map +0 -1
  1151. package/dist/esm/hooks/useQuery/useQuery.js +0 -3
  1152. package/dist/esm/hooks/useQuery/useQuery.js.map +0 -1
  1153. package/dist/esm/hooks/useQueue/useQueue.js +0 -3
  1154. package/dist/esm/hooks/useQueue/useQueue.js.map +0 -1
  1155. package/dist/esm/hooks/useRaf/useRaf.js +0 -3
  1156. package/dist/esm/hooks/useRaf/useRaf.js.map +0 -1
  1157. package/dist/esm/hooks/useRafValue/useRafValue.js +0 -3
  1158. package/dist/esm/hooks/useRafValue/useRafValue.js.map +0 -1
  1159. package/dist/esm/hooks/useRefState/useRefState.js +0 -3
  1160. package/dist/esm/hooks/useRefState/useRefState.js.map +0 -1
  1161. package/dist/esm/hooks/useRenderCount/useRenderCount.js +0 -3
  1162. package/dist/esm/hooks/useRenderCount/useRenderCount.js.map +0 -1
  1163. package/dist/esm/hooks/useRenderInfo/useRenderInfo.js +0 -3
  1164. package/dist/esm/hooks/useRenderInfo/useRenderInfo.js.map +0 -1
  1165. package/dist/esm/hooks/useRerender/useRerender.js +0 -3
  1166. package/dist/esm/hooks/useRerender/useRerender.js.map +0 -1
  1167. package/dist/esm/hooks/useResizeObserver/useResizeObserver.js +0 -3
  1168. package/dist/esm/hooks/useResizeObserver/useResizeObserver.js.map +0 -1
  1169. package/dist/esm/hooks/useScreenOrientation/useScreenOrientation.js +0 -3
  1170. package/dist/esm/hooks/useScreenOrientation/useScreenOrientation.js.map +0 -1
  1171. package/dist/esm/hooks/useScript/useScript.js +0 -3
  1172. package/dist/esm/hooks/useScript/useScript.js.map +0 -1
  1173. package/dist/esm/hooks/useScroll/useScroll.js +0 -3
  1174. package/dist/esm/hooks/useScroll/useScroll.js.map +0 -1
  1175. package/dist/esm/hooks/useScrollIntoView/useScrollIntoView.js +0 -3
  1176. package/dist/esm/hooks/useScrollIntoView/useScrollIntoView.js.map +0 -1
  1177. package/dist/esm/hooks/useScrollTo/useScrollTo.js +0 -3
  1178. package/dist/esm/hooks/useScrollTo/useScrollTo.js.map +0 -1
  1179. package/dist/esm/hooks/useSessionStorage/useSessionStorage.js +0 -3
  1180. package/dist/esm/hooks/useSessionStorage/useSessionStorage.js.map +0 -1
  1181. package/dist/esm/hooks/useSet/useSet.js +0 -3
  1182. package/dist/esm/hooks/useSet/useSet.js.map +0 -1
  1183. package/dist/esm/hooks/useShare/useShare.js +0 -3
  1184. package/dist/esm/hooks/useShare/useShare.js.map +0 -1
  1185. package/dist/esm/hooks/useStateHistory/useStateHistory.js +0 -3
  1186. package/dist/esm/hooks/useStateHistory/useStateHistory.js.map +0 -1
  1187. package/dist/esm/hooks/useStep/useStep.js +0 -3
  1188. package/dist/esm/hooks/useStep/useStep.js.map +0 -1
  1189. package/dist/esm/hooks/useSticky/useSticky.js +0 -3
  1190. package/dist/esm/hooks/useSticky/useSticky.js.map +0 -1
  1191. package/dist/esm/hooks/useStopwatch/useStopwatch.js +0 -3
  1192. package/dist/esm/hooks/useStopwatch/useStopwatch.js.map +0 -1
  1193. package/dist/esm/hooks/useStorage/useStorage.js +0 -3
  1194. package/dist/esm/hooks/useStorage/useStorage.js.map +0 -1
  1195. package/dist/esm/hooks/useTextDirection/useTextDirection.js +0 -3
  1196. package/dist/esm/hooks/useTextDirection/useTextDirection.js.map +0 -1
  1197. package/dist/esm/hooks/useTextSelection/useTextSelection.js +0 -3
  1198. package/dist/esm/hooks/useTextSelection/useTextSelection.js.map +0 -1
  1199. package/dist/esm/hooks/useThrottleCallback/useThrottleCallback.js +0 -3
  1200. package/dist/esm/hooks/useThrottleCallback/useThrottleCallback.js.map +0 -1
  1201. package/dist/esm/hooks/useThrottleValue/useThrottleValue.js +0 -3
  1202. package/dist/esm/hooks/useThrottleValue/useThrottleValue.js.map +0 -1
  1203. package/dist/esm/hooks/useTime/useTime.js +0 -3
  1204. package/dist/esm/hooks/useTime/useTime.js.map +0 -1
  1205. package/dist/esm/hooks/useTimeout/useTimeout.js +0 -3
  1206. package/dist/esm/hooks/useTimeout/useTimeout.js.map +0 -1
  1207. package/dist/esm/hooks/useTimer/useTimer.js +0 -3
  1208. package/dist/esm/hooks/useTimer/useTimer.js.map +0 -1
  1209. package/dist/esm/hooks/useToggle/useToggle.js +0 -3
  1210. package/dist/esm/hooks/useToggle/useToggle.js.map +0 -1
  1211. package/dist/esm/hooks/useUnmount/useUnmount.js +0 -3
  1212. package/dist/esm/hooks/useUnmount/useUnmount.js.map +0 -1
  1213. package/dist/esm/hooks/useVibrate/useVibrate.js +0 -3
  1214. package/dist/esm/hooks/useVibrate/useVibrate.js.map +0 -1
  1215. package/dist/esm/hooks/useWebSocket/useWebSocket.js +0 -3
  1216. package/dist/esm/hooks/useWebSocket/useWebSocket.js.map +0 -1
  1217. package/dist/esm/hooks/useWindowEvent/useWindowEvent.js +0 -3
  1218. package/dist/esm/hooks/useWindowEvent/useWindowEvent.js.map +0 -1
  1219. package/dist/esm/hooks/useWindowFocus/useWindowFocus.js +0 -3
  1220. package/dist/esm/hooks/useWindowFocus/useWindowFocus.js.map +0 -1
  1221. package/dist/esm/hooks/useWindowScroll/useWindowScroll.js +0 -3
  1222. package/dist/esm/hooks/useWindowScroll/useWindowScroll.js.map +0 -1
  1223. package/dist/esm/hooks/useWindowSize/useWindowSize.js +0 -3
  1224. package/dist/esm/hooks/useWindowSize/useWindowSize.js.map +0 -1
  1225. package/dist/esm/hooks/useWizard/useWizard.js +0 -3
  1226. package/dist/esm/hooks/useWizard/useWizard.js.map +0 -1
  1227. package/dist/esm/index.js +0 -3
  1228. package/dist/esm/index.js.map +0 -1
  1229. package/dist/esm/utils/helpers/copy.js +0 -3
  1230. package/dist/esm/utils/helpers/copy.js.map +0 -1
  1231. package/dist/esm/utils/helpers/debounce.js +0 -3
  1232. package/dist/esm/utils/helpers/debounce.js.map +0 -1
  1233. package/dist/esm/utils/helpers/getDate.js +0 -3
  1234. package/dist/esm/utils/helpers/getDate.js.map +0 -1
  1235. package/dist/esm/utils/helpers/getElement.js +0 -3
  1236. package/dist/esm/utils/helpers/getElement.js.map +0 -1
  1237. package/dist/esm/utils/helpers/getRetry.js +0 -3
  1238. package/dist/esm/utils/helpers/getRetry.js.map +0 -1
  1239. package/dist/esm/utils/helpers/index.js +0 -3
  1240. package/dist/esm/utils/helpers/index.js.map +0 -1
  1241. package/dist/esm/utils/helpers/isTarget.js +0 -3
  1242. package/dist/esm/utils/helpers/isTarget.js.map +0 -1
  1243. package/dist/esm/utils/helpers/throttle.js +0 -3
  1244. package/dist/esm/utils/helpers/throttle.js.map +0 -1
@@ -1,4215 +1,2 @@
1
- import * as react from 'react';
2
- import { DependencyList, Dispatch, SetStateAction, EffectCallback, ComponentProps, useEffect, RefObject, MouseEventHandler, TouchEventHandler, MouseEvent as MouseEvent$1 } from 'react';
3
- import { HookTarget as HookTarget$1 } from '@/utils/helpers';
4
-
5
- /**
6
- * @name useActiveElement
7
- * @description - Hook that returns the active element
8
- * @category Elements
9
- *
10
- * @returns {ActiveElement | null} The active element
11
- *
12
- * @example
13
- * const activeElement = useActiveElement();
14
- */
15
- declare const useActiveElement: <ActiveElement extends HTMLElement>() => ActiveElement | null;
16
-
17
- interface UseAsyncReturn<Data> {
18
- data?: Data;
19
- error?: Error;
20
- isError: boolean;
21
- isLoading: boolean;
22
- }
23
- /**
24
- * @name useAsync
25
- * @description - Hook that provides the state of an async callback
26
- * @category Utilities
27
- *
28
- * @param {() => Promise<Data>} callback - The async callback
29
- * @param {DependencyList} deps - The dependencies of the callback
30
- * @returns {UseAsyncReturn<Data>} - The state of the async callback
31
- *
32
- * @example
33
- * const { data, isLoading, isError, error } = useAsync(() => fetch('url'), [deps]);
34
- */
35
- declare const useAsync: <Data>(callback: () => Promise<Data>, deps: DependencyList) => UseAsyncReturn<Data>;
36
-
37
- interface BatteryManager extends EventTarget {
38
- charging: boolean;
39
- chargingTime: number;
40
- dischargingTime: number;
41
- level: number;
42
- }
43
- declare global {
44
- interface Navigator {
45
- readonly getBattery: () => Promise<BatteryManager>;
46
- }
47
- }
48
- /** The use battery value type */
49
- interface UseBatteryValue {
50
- /** Is charging battery? */
51
- charging: boolean;
52
- /** Time until the battery is fully charged */
53
- chargingTime: number;
54
- /** Time until the battery is completely discharged */
55
- dischargingTime: number;
56
- /** Battery charge level from 0 to 1 */
57
- level: number;
58
- /** Is battery information loading? */
59
- loading: boolean;
60
- }
61
- /** The use battery return type */
62
- interface UseBatteryStateReturn {
63
- /** Whether the battery api is supported*/
64
- supported: boolean;
65
- /** The use battery value type */
66
- value: UseBatteryValue;
67
- }
68
- /**
69
- * @name useBattery
70
- * @description - Hook for getting information about battery status
71
- * @category Browser
72
- *
73
- * @browserapi navigator.getBattery https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getBattery
74
- *
75
- * @returns {UseBatteryStateReturn} Object containing battery information & Battery API support
76
- *
77
- * @example
78
- * const { supported, loading, charging, chargingTime, dischargingTime, level } = useBattery();
79
- */
80
- declare const useBattery: () => UseBatteryStateReturn;
81
-
82
- /** The use bluetooth return type */
83
- interface UseBluetoothReturn {
84
- /** Indicates if bluetooth device is currently connected */
85
- connected: boolean;
86
- /** Describe connected bluetooth device */
87
- device?: BluetoothDevice;
88
- /** The GATT server for connected bluetooth device */
89
- server?: BluetoothRemoteGATTServer;
90
- /** Whether the bluetooth is supported*/
91
- supported: boolean;
92
- /** Function to request bluetooth device from the user */
93
- requestDevice: () => Promise<void>;
94
- }
95
- /** The use bluetooth options type */
96
- interface UseBluetoothOptions {
97
- /** The options to request all bluetooth devices */
98
- acceptAllDevices?: boolean;
99
- /** Array of filters to apply when scanning bluetooth devices */
100
- filters?: BluetoothLEScanFilter[];
101
- /** Array of optional services that the application can use */
102
- optionalServices?: BluetoothServiceUUID[];
103
- }
104
- /**
105
- * @name useBluetooth
106
- * @description - Hook for getting information about bluetooth
107
- * @category Browser
108
- *
109
- * @browserapi navigator.bluetooth https://developer.mozilla.org/en-US/docs/Web/API/Navigator/bluetooth
110
- *
111
- * @param {boolean} [options.acceptAllDevices=false] The options to request all Bluetooth devices
112
- * @param {Array<BluetoothLEScanFilter>} [options.filters] Array of filters to apply when scanning Bluetooth devices
113
- * @param {Array<BluetoothServiceUUID>} [options.optionalServices] Array of optional services that the application can use
114
- * @returns {UseBluetoothReturn} Object containing battery information & Battery API support
115
- *
116
- * @example
117
- * const { supported, connected, device, requestDevice, server } = useBluetooth(options);
118
- */
119
- declare const useBluetooth: (options?: UseBluetoothOptions) => UseBluetoothReturn;
120
-
121
- /** The use boolean return type */
122
- type UseBooleanReturn = [
123
- /** The current boolean state value */
124
- value: boolean,
125
- /** Function to toggle the boolean state */
126
- toggle: (value?: boolean) => void
127
- ];
128
- /**
129
- * @name useBoolean
130
- * @description - Hook provides opportunity to manage boolean state
131
- * @category Utilities
132
- *
133
- * @param {boolean} [initialValue=false] The initial boolean value
134
- * @returns {UseBooleanReturn} An object containing the boolean state value and utility functions to manipulate the state
135
- *
136
- * @example
137
- * const [on, toggle] = useBoolean()
138
- */
139
- declare const useBoolean: (initialValue?: boolean) => UseBooleanReturn;
140
-
141
- /** The breakpoints type */
142
- type Breakpoints<Breakpoint extends string = string> = Record<Breakpoint, number>;
143
- /** The use breakpoints strategy */
144
- type UseBreakpointsStrategy = 'desktop-first' | 'mobile-first';
145
- /** The use breakpoints return type */
146
- type UseBreakpointsReturn<Breakpoint extends string = string> = {
147
- /** The function that checks if the current breakpoint is greater than to the given breakpoint */
148
- greater: (breakpoint: Breakpoint) => boolean;
149
- /** The function that checks if the current breakpoint is greater than or equal to the given breakpoint */
150
- greaterOrEqual: (breakpoint: Breakpoint) => boolean;
151
- /** The function that checks if the current breakpoint is smaller than to the given breakpoint */
152
- smaller: (breakpoint: Breakpoint) => boolean;
153
- /** The function that checks if the current breakpoint is smaller than or equal to the given breakpoint */
154
- smallerOrEqual: (breakpoint: Breakpoint) => boolean;
155
- /** The function that checks if the current breakpoint is between to the given breakpoints */
156
- between: (a: Breakpoint, b: Breakpoint) => boolean;
157
- /** The function that checks if the current breakpoint is greater than to the given breakpoint */
158
- isGreater: (breakpoint: Breakpoint) => boolean;
159
- /** The function that checks if the current breakpoint is greater than or equal to the given breakpoint */
160
- isGreaterOrEqual: (breakpoint: Breakpoint) => boolean;
161
- /** The function that checks if the current breakpoint is smaller than to the given breakpoint */
162
- isSmaller: (breakpoint: Breakpoint) => boolean;
163
- /** The function that checks if the current breakpoint is smaller than or equal to the given breakpoint */
164
- isSmallerOrEqual: (breakpoint: Breakpoint) => boolean;
165
- /** The function that checks if the current breakpoint is between to the given breakpoints */
166
- isInBetween: (a: Breakpoint, b: Breakpoint) => boolean;
167
- /** The function that returns the current breakpoints */
168
- current: () => Breakpoint[];
169
- /** The function that returns the current active breakpoint */
170
- active: () => Breakpoint;
171
- } & Record<Breakpoint, boolean>;
172
- /**
173
- * @name useBreakpoints
174
- * @description - Hook that manages breakpoints
175
- * @category Browser
176
- *
177
- * @template {string} Breakpoint The name of the breakpoint
178
- * @param {Breakpoints<Breakpoint>} breakpoints The breakpoints to use
179
- * @param {UseBreakpointsStrategy} [strategy=min-width] The strategy to use for matching
180
- * @returns {UseBreakpointsReturn<Breakpoint>} An object containing the current breakpoint
181
- *
182
- * @example
183
- * const { greaterOrEqual, smallerOrEqual, current } = useBreakpoints({ mobile: 0, tablet: 640, laptop: 1024, desktop: 1280 });
184
- */
185
- declare const useBreakpoints: <Breakpoint extends string>(breakpoints: Breakpoints<Breakpoint>, strategy?: UseBreakpointsStrategy) => UseBreakpointsReturn<Breakpoint>;
186
- /** Breakpoints from Material UI */
187
- declare const BREAKPOINTS_MATERIAL_UI: {
188
- xs: number;
189
- sm: number;
190
- md: number;
191
- lg: number;
192
- xl: number;
193
- };
194
- /** Breakpoints from Mantine */
195
- declare const BREAKPOINTS_MANTINE: {
196
- xs: number;
197
- sm: number;
198
- md: number;
199
- lg: number;
200
- xl: number;
201
- };
202
- /** Breakpoints from Tailwind */
203
- declare const BREAKPOINTS_TAILWIND: {
204
- sm: number;
205
- md: number;
206
- lg: number;
207
- xl: number;
208
- '2xl': number;
209
- };
210
- /** Breakpoints from Bootstrap V5 */
211
- declare const BREAKPOINTS_BOOTSTRAP_V5: {
212
- xs: number;
213
- sm: number;
214
- md: number;
215
- lg: number;
216
- xl: number;
217
- xxl: number;
218
- };
219
- /** Breakpoints from Ant Design */
220
- declare const BREAKPOINTS_ANT_DESIGN: {
221
- xs: number;
222
- sm: number;
223
- md: number;
224
- lg: number;
225
- xl: number;
226
- xxl: number;
227
- };
228
- /** Breakpoints from Quasar V2 */
229
- declare const BREAKPOINTS_QUASAR_V2: {
230
- xs: number;
231
- sm: number;
232
- md: number;
233
- lg: number;
234
- xl: number;
235
- };
236
- /** Sematic Breakpoints */
237
- declare const BREAKPOINTS_SEMANTIC: {
238
- mobileS: number;
239
- mobileM: number;
240
- mobileL: number;
241
- tablet: number;
242
- laptop: number;
243
- laptopL: number;
244
- desktop4K: number;
245
- };
246
- /** Breakpoints from Master CSS */
247
- declare const BREAKPOINTS_MASTER_CSS: {
248
- '3xs': number;
249
- '2xs': number;
250
- xs: number;
251
- sm: number;
252
- md: number;
253
- lg: number;
254
- xl: number;
255
- '2xl': number;
256
- '3xl': number;
257
- '4xl': number;
258
- };
259
- /** Breakpoints from PrimeFlex */
260
- declare const BREAKPOINTS_PRIME_FLEX: {
261
- sm: number;
262
- md: number;
263
- lg: number;
264
- xl: number;
265
- };
266
-
267
- /**
268
- * @name useBrowserLanguage
269
- * @description - Hook that returns the current browser language
270
- * @category Browser
271
- *
272
- * @browserapi navigator.language https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language
273
- *
274
- * @returns {string} The current browser language
275
- *
276
- * @example
277
- * const browserLanguage = useBrowserLanguage();
278
- */
279
- declare const useBrowserLanguage: () => string;
280
-
281
- interface StateRef<Value> {
282
- (node: Value): void;
283
- current: Value;
284
- state?: Value;
285
- }
286
- /**
287
- * @name useRefState
288
- * @description - Hook that returns the state reference of the value
289
- * @category Utilities
290
- *
291
- * @template Value The type of the value
292
- * @param {Value} [initialValue] The initial value
293
- * @returns {StateRef<Value>} The current value
294
- *
295
- * @example
296
- * const internalRefState = useRefState();
297
- */
298
- declare const useRefState: <Value>(initialValue?: Value) => StateRef<Value>;
299
-
300
- interface UseClickOutside {
301
- (target: HookTarget$1, callback: (event: Event) => void): void;
302
- <Target extends Element>(callback: (event: Event) => void, target?: never): StateRef<Target>;
303
- }
304
- /**
305
- * @name useClickOutside
306
- * @description - Hook to handle click events outside the specified target element(s)
307
- * @category Sensors
308
- *
309
- * @overload
310
- * @param {HookTarget} target The target element(s) to detect outside clicks for
311
- * @param {(event: Event) => void} callback The callback to execute when a click outside the target is detected
312
- * @returns {void}
313
- *
314
- * @example
315
- * useClickOutside(ref, () => console.log('click outside'));
316
- *
317
- * @overload
318
- * @template Target The target element(s)
319
- * @param {(event: Event) => void} callback The callback to execute when a click outside the target is detected
320
- * @returns {(node: Target) => void} A React ref to attach to the target element
321
- *
322
- * @example
323
- * const ref = useClickOutside<HTMLDivElement>(() => console.log('click outside'));
324
- */
325
- declare const useClickOutside: UseClickOutside;
326
-
327
- /** The use copy to clipboard return type */
328
- interface UseCopyToClipboardReturn {
329
- /** The copied value */
330
- value: string | null;
331
- /** Function to copy to clipboard */
332
- copy: (value: string) => Promise<void>;
333
- }
334
- /** The use copy to clipboard params type */
335
- interface UseCopyToClipboardParams {
336
- /** Whether the copy to clipboard is enabled */
337
- enabled: boolean;
338
- }
339
- /**
340
- * @name useClipboard
341
- * @description - Hook that manages a copy to clipboard
342
- * @category Browser
343
- *
344
- * @browserapi navigator.clipboard https://developer.mozilla.org/en-US/docs/Web/API/Navigator/clipboard
345
- *
346
- * @param {boolean} [params.enabled=false] Whether the copy to clipboard is enabled
347
- * @returns {UseCopyToClipboardReturn} An object containing the boolean state value and utility functions to manipulate the state
348
- *
349
- * @example
350
- * const { supported, value, copy } = useClipboard();
351
- */
352
- declare const useClipboard: (params?: UseCopyToClipboardParams) => UseCopyToClipboardReturn;
353
-
354
- /**
355
- * @name useConst
356
- * @description - Hook that returns the constant value
357
- * @category Utilities
358
- *
359
- * @template Value The type of the value
360
- * @param {(() => Value) | Value} initialValue The initial value of the constant
361
- * @returns {Value} The constant value
362
- *
363
- * @example
364
- * const value = useConst('value');
365
- */
366
- declare const useConst: <Value>(initialValue: (() => Value) | Value) => Value;
367
-
368
- declare const getCookies: () => {
369
- [k: string]: string;
370
- };
371
- interface RemoveCookieParams {
372
- domain?: string;
373
- expires?: Date;
374
- maxAge?: number;
375
- path?: string;
376
- sameSite?: 'Lax' | 'None' | 'Strict';
377
- secure?: boolean;
378
- }
379
- declare const removeCookie: (key: string, options?: RemoveCookieParams) => void;
380
- interface SetCookieParams {
381
- domain?: string;
382
- expires?: Date;
383
- httpOnly?: boolean;
384
- maxAge?: number;
385
- path?: string;
386
- sameSite?: 'Lax' | 'None' | 'Strict';
387
- secure?: boolean;
388
- }
389
- declare const setCookie: (key: string, value: string, options?: SetCookieParams) => void;
390
- type UseCookieInitialValue<Value> = (() => Value) | Value;
391
- interface UseCookieOptions<Value> {
392
- domain?: string;
393
- expires?: Date;
394
- httpOnly?: boolean;
395
- initialValue?: UseCookieInitialValue<Value>;
396
- maxAge?: number;
397
- path?: string;
398
- sameSite?: 'Lax' | 'None' | 'Strict';
399
- secure?: boolean;
400
- updateOnChange?: boolean;
401
- deserializer?: (value: string) => Value;
402
- serializer?: (value: Value) => string;
403
- }
404
- interface UseCookieReturn<Value> {
405
- value: Value;
406
- remove: (options?: RemoveCookieParams) => void;
407
- set: (value: Value, options?: SetCookieParams) => void;
408
- }
409
- declare const COOKIE_EVENT = "reactuse-cookie";
410
- declare const dispatchCookieEvent: () => boolean;
411
- declare const setCookieItem: (key: string, value: string, options?: SetCookieParams) => void;
412
- declare const removeCookieItem: (key: string, options?: RemoveCookieParams) => void;
413
- declare const getCookie: (key: string) => string | undefined;
414
- /**
415
- * @name useCookie
416
- * @description - Hook that manages cookie value
417
- * @category Browser
418
- *
419
- * @overload
420
- * @template Value The type of the cookie value
421
- * @param {string} key The key of the cookie
422
- * @param {UseCookieInitialValue<Value>} [initialValue] The initial value of the cookie
423
- * @returns {UseCookieReturn<Value>} The value and the set function
424
- *
425
- * @example
426
- * const { value, set, remove } = useCookie('key', 'value');
427
- */
428
- declare const useCookie: <Value>(key: string, params?: UseCookieInitialValue<Value> | UseCookieOptions<Value>) => {
429
- value: Value | undefined;
430
- set: (value: Value, params?: SetCookieParams) => void;
431
- remove: (params?: RemoveCookieParams) => void;
432
- };
433
-
434
- declare const getParsedCookies: () => {
435
- [k: string]: any;
436
- };
437
- declare const clearCookies: () => void;
438
- /**
439
- * @name useCookies
440
- * @description - Hook that manages cookie values
441
- * @category Browser
442
- *
443
- * @overload
444
- * @template {object} Value The type of the cookie values
445
- * @param {string} key The key of the cookie
446
- * @returns {UseCookieReturn<Value>} The value and the set function
447
- *
448
- * @example
449
- * const { value, set, remove, getAll, clear } = useCookies();
450
- */
451
- declare const useCookies: <Value>() => {
452
- value: Value;
453
- set: (key: string, value: Value, options?: SetCookieParams) => void;
454
- remove: (key: string, options?: RemoveCookieParams) => void;
455
- getAll: () => {
456
- [k: string]: any;
457
- };
458
- clear: () => void;
459
- };
460
-
461
- /** The use copy return type */
462
- interface UseCopyReturn {
463
- /** Whether copy is in progress */
464
- copied: boolean;
465
- /** The copied value */
466
- value: string | null;
467
- /** Function to copy text */
468
- copy: (value: string) => Promise<void>;
469
- }
470
- /** The use copy params type */
471
- interface UseCopyParams {
472
- /** Reset delay in milliseconds */
473
- resetDelay?: number;
474
- }
475
- /**
476
- * @name useCopy
477
- * @description - Hook that manages copying text with status reset
478
- * @category Browser
479
- *
480
- * @browserapi navigator.clipboard https://developer.mozilla.org/en-US/docs/Web/API/Navigator/clipboard
481
- *
482
- * @param {number} [delay=1000] Delay in ms before resetting copied status
483
- * @returns {UseCopyReturn} An object containing the copied value, status and copy function
484
- *
485
- * @example
486
- * const { copied, value, copy } = useCopy();
487
- */
488
- declare const useCopy: (delay?: number) => UseCopyReturn;
489
-
490
- /** The use counter options */
491
- interface UseCounterOptions {
492
- /** The max of count value */
493
- max?: number;
494
- /** The min of count value */
495
- min?: number;
496
- }
497
- /** The use counter return type */
498
- interface UseCounterReturn {
499
- /** Function to set a specific value to the counter */
500
- set: Dispatch<SetStateAction<number>>;
501
- /** The current count value */
502
- value: number;
503
- /** Function to decrement the counter */
504
- dec: (value?: number) => void;
505
- /** Function to increment the counter */
506
- inc: (value?: number) => void;
507
- /** Function to reset the counter to its initial value. */
508
- reset: () => void;
509
- }
510
- interface UseCounter {
511
- (initialValue?: number, options?: UseCounterOptions): UseCounterReturn;
512
- (options: UseCounterOptions & {
513
- initialValue?: number;
514
- }, initialValue?: never): UseCounterReturn;
515
- }
516
- /**
517
- * @name useCounter
518
- * @description - Hook that manages a counter
519
- * @category Utilities
520
- *
521
- * @overload
522
- * @param {number} [initialValue=0] The initial number value
523
- * @param {number} [options.min=Number.NEGATIVE_INFINITY] The min of count value
524
- * @param {number} [options.max=Number.POSITIVE_INFINITY] The max of count value
525
- * @returns {UseCounterReturn} An object containing the current count and functions to interact with the counter
526
-
527
- * @overload
528
- * @param {number} [params.initialValue=0] The initial number value
529
- * @param {number} [params.min=Number.NEGATIVE_INFINITY] The min of count value
530
- * @param {number} [params.max=Number.POSITIVE_INFINITY] The max of count value
531
- * @returns {UseCounterReturn} An object containing the current count and functions to interact with the counter
532
- *
533
- * @example
534
- * const { count, dec, inc, reset, set } = useCounter(5);
535
- *
536
- * @example
537
- * const { count, dec, inc, reset, set } = useCounter({ initialValue: 5, min: 0, max: 10 });
538
- */
539
- declare const useCounter: UseCounter;
540
-
541
- /** The css variable return type */
542
- interface UseCssVarReturn {
543
- /** The value of the CSS variable */
544
- value: string;
545
- /** Set the value of the CSS variable */
546
- set: (value: string) => void;
547
- }
548
- interface UseCssVar {
549
- (key: string, initialValue?: string): UseCssVarReturn & {
550
- ref: StateRef<Element>;
551
- };
552
- (target: HookTarget$1, key: string, initialValue?: string): UseCssVarReturn;
553
- }
554
- /**
555
- * @name useCssVar
556
- * @description - Hook that returns the value of a css variable
557
- * @category Utilities
558
- *
559
- * @overload
560
- * @param {string} key The CSS variable key
561
- * @param {string} initialValue The initial value of the CSS variable
562
- * @returns {UseCssVarReturn & { ref: StateRef<Element> }} The object containing the value of the CSS variable and ref
563
- *
564
- * @example
565
- * const { ref, value, set } = useCssVar('--color', 'red');
566
- *
567
- * @overload
568
- * @param {HookTarget} target The target element
569
- * @param {string} key The CSS variable key
570
- * @param {string} initialValue The initial value of the CSS variable
571
- * @returns {UseCssVarReturn} The object containing the value of the CSS variable
572
- *
573
- * @example
574
- * const { value, set } = useCssVar(ref, '--color', 'red');
575
- */
576
- declare const useCssVar: UseCssVar;
577
-
578
- /**
579
- * @name useDebounceCallback
580
- * @description - Hook that creates a debounced callback
581
- * @category Utilities
582
- *
583
- * @template Params The type of the params
584
- * @template Return The type of the return
585
- * @param {(...args: Params) => Return} callback The callback function
586
- * @param {number} delay The delay in milliseconds
587
- * @returns {(...args: Params) => Return} The callback with debounce
588
- *
589
- * @example
590
- * const debouncedCallback = useDebounceCallback(() => console.log('callback'), 500);
591
- */
592
- declare const useDebounceCallback: <Params extends unknown[], Return>(callback: (...args: Params) => Return, delay: number) => (...args: Params) => void;
593
-
594
- /**
595
- * @name useDebounceValue
596
- * @description - Hook that creates a debounced value
597
- * @category Utilities
598
- *
599
- * @template Value The type of the value
600
- * @param {Value} value The value to be debounced
601
- * @param {number} delay The delay in milliseconds
602
- * @returns {Value} The debounced value
603
- *
604
- * @example
605
- * const debouncedValue = useDebounceValue(value, 500);
606
- */
607
- declare const useDebounceValue: <Value>(value: Value, delay: number) => Value;
608
-
609
- /**
610
- * @name useDefault
611
- * @description - Hook that returns the default value
612
- * @category Utilities
613
- *
614
- * @template Value The type of the value
615
- * @param {Value} initialValue The initial value
616
- * @param {Value} defaultValue The default value
617
- * @returns {[Value, (value: Value) => void]} An array containing the current value and a function to set the value
618
- *
619
- * @example
620
- * const [value, setValue] = useDefault(initialValue, defaultValue);
621
- */
622
- declare const useDefault: <Value>(initialValue: (() => Value) | Value, defaultValue: Value) => readonly [Value, react.Dispatch<react.SetStateAction<Value | null | undefined>>];
623
-
624
- interface UseDeviceMotionReturn {
625
- acceleration: DeviceMotionEventAcceleration;
626
- accelerationIncludingGravity: DeviceMotionEventAcceleration;
627
- interval: DeviceMotionEvent['interval'];
628
- rotationRate: DeviceMotionEventRotationRate;
629
- }
630
- interface UseDeviceMotionParams {
631
- /** The delay in milliseconds */
632
- delay?: number;
633
- /** Whether to enable the hook */
634
- enabled?: boolean;
635
- /** The callback function to be invoked */
636
- callback?: (event: DeviceMotionEvent) => void;
637
- }
638
- /**
639
- * @name useDeviceMotion
640
- * @description - Hook that work with device motion
641
- * @category Utilities
642
- *
643
- * @browserapi DeviceMotionEvent https://developer.mozilla.org/en-US/docs/Web/API/Window/DeviceMotionEvent
644
- *
645
- * @param {number} [delay=1000] The delay in milliseconds
646
- * @param {(event: DeviceMotionEvent) => void} [callback] The callback function to be invoked
647
- * @param {boolean} [enabled=true] Whether to enable the hook
648
- * @returns {UseDeviceMotionReturn} The device motion data and interval
649
- *
650
- * @example
651
- * const { interval, rotationRate, acceleration, accelerationIncludingGravity } = useDeviceMotion();
652
- */
653
- declare const useDeviceMotion: (params?: UseDeviceMotionParams) => UseDeviceMotionReturn;
654
-
655
- interface UseDeviceOrientationValue {
656
- /** The current absolute value */
657
- absolute: boolean;
658
- /** A number representing the motion of the device around the z axis, express in degrees with values ranging from 0 to 360 */
659
- alpha: number | null;
660
- /** A number representing the motion of the device around the x axis, express in degrees with values ranging from -180 to 180 */
661
- beta: number | null;
662
- /** A number representing the motion of the device around the y axis, express in degrees with values ranging from -90 to 90 */
663
- gamma: number | null;
664
- }
665
- interface UseDeviceOrientationReturn {
666
- /** Whether the device orientation is supported */
667
- supported: boolean;
668
- /** The current device orientation value */
669
- value: UseDeviceOrientationValue;
670
- }
671
- /**
672
- * @name useDeviceOrientation
673
- * @description - Hook that provides the current device orientation
674
- * @category Sensors
675
- *
676
- * @browserapi DeviceOrientationEvent https://developer.mozilla.org/en-US/docs/Web/API/Window/DeviceOrientationEvent
677
- *
678
- * @returns {UseDeviceOrientationReturn} The current device orientation
679
- *
680
- * @example
681
- * const { supported, value } = useDeviceOrientation();
682
- */
683
- declare const useDeviceOrientation: () => UseDeviceOrientationReturn;
684
-
685
- /** The use device pixel ratio return type */
686
- interface UseDevicePixelRatioReturn {
687
- /** The ratio of the resolution in physical pixels to the resolution in CSS pixels */
688
- ratio: number;
689
- /** Whether the device pixel ratio is supported*/
690
- supported: boolean;
691
- }
692
- /**
693
- * @name useDevicePixelRatio
694
- * @description - Hook that returns the device's pixel ratio
695
- * @category Utilities
696
- *
697
- * @browserapi window.devicePixelRatio https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio
698
- *
699
- * @returns {UseDevicePixelRatioReturn} The ratio and supported flag
700
- *
701
- * @example
702
- * const { supported, ratio } = useDevicePixelRatio();
703
- */
704
- declare const useDevicePixelRatio: () => UseDevicePixelRatioReturn;
705
-
706
- /**
707
- * @name useDidUpdate
708
- * @description – Hook that triggers the effect callback on updates
709
- * @category Lifecycle
710
- *
711
- * @param {EffectCallback} effect The effect callback
712
- * @param {DependencyList} [deps] The dependencies list for the effect
713
- *
714
- * @example
715
- * useDidUpdate(() => console.log("effect runs on updates"), [deps]);
716
- */
717
- declare const useDidUpdate: (effect: EffectCallback, deps?: DependencyList) => void;
718
-
719
- /** The use disclosure options type */
720
- interface UseDisclosureOptions {
721
- /** The callback function to be invoked on close */
722
- onClose?: () => void;
723
- /** The callback function to be invoked on open */
724
- onOpen?: () => void;
725
- }
726
- /** The use disclosure return type */
727
- interface UseDisclosureReturn {
728
- /** The opened value */
729
- opened: boolean;
730
- /** Function to close the modal */
731
- close: () => void;
732
- /** Function to open the modal */
733
- open: () => void;
734
- /** Function to toggle the modal */
735
- toggle: () => void;
736
- }
737
- /**
738
- * @name useDisclosure
739
- * @description - Hook that allows you to open and close a modal
740
- * @category Utilities
741
- *
742
- * @param {boolean} [initialValue=false] The initial value of the component
743
- * @param {() => void} [options.onOpen] The callback function to be invoked on open
744
- * @param {() => void} [options.onClose] The callback function to be invoked on close
745
- * @returns {UseDisclosureReturn} An object with the opened, open, close, and toggle properties
746
- *
747
- * @example
748
- * const { opened, open, close, toggle } = useDisclosure();
749
- */
750
- declare const useDisclosure: (initialValue?: boolean, options?: UseDisclosureOptions) => UseDisclosureReturn;
751
-
752
- /** The use display media return type */
753
- interface UseDisplayMediaReturn {
754
- /** Whether screen sharing is currently active */
755
- sharing: boolean;
756
- /** The media stream object */
757
- stream: MediaStream | null;
758
- /** Whether the display media API is supported */
759
- supported: boolean;
760
- /** Start screen sharing */
761
- start: () => Promise<void>;
762
- /** Stop screen sharing */
763
- stop: () => void;
764
- }
765
- /** The use display media options type */
766
- interface UseDisplayMediaOptions {
767
- /** Whether to enable audio sharing */
768
- audio?: boolean | MediaTrackConstraints;
769
- /** Whether to start immediately */
770
- immediately?: boolean;
771
- /** Whether to enable video sharing */
772
- video?: boolean | MediaTrackConstraints;
773
- }
774
- interface UseDisplayMedia {
775
- (target: HookTarget$1, options?: UseDisplayMediaOptions): UseDisplayMediaReturn;
776
- <Target extends HTMLVideoElement>(options?: UseDisplayMediaOptions, target?: never): {
777
- ref: StateRef<Target>;
778
- } & UseDisplayMediaReturn;
779
- }
780
- /**
781
- * @name useDisplayMedia
782
- * @description - Hook that provides screen sharing functionality
783
- * @category Browser
784
- *
785
- * @browserapi mediaDevices.getDisplayMedia https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia
786
- *
787
- * @overload
788
- * @param {HookTarget} target The target video element to display the media stream
789
- * @param {boolean | MediaTrackConstraints} [options.audio] Whether to enable audio sharing
790
- * @param {boolean} [options.immediately=false] Whether to start immediately
791
- * @param {boolean | MediaTrackConstraints} [options.video] Whether to enable video sharing
792
- * @returns {UseDisplayMediaReturn} Object containing stream, sharing status and control methods
793
- *
794
- * @example
795
- * const { stream, sharing, start, stop } = useDisplayMedia(ref);
796
- *
797
- * @overload
798
- * @template Target The target video element
799
- * @param {boolean | MediaTrackConstraints} [options.audio] Whether to enable audio sharing
800
- * @param {boolean} [options.immediately=false] Whether to start immediately
801
- * @param {boolean | MediaTrackConstraints} [options.video] Whether to enable video sharing
802
- * @returns {UseDisplayMediaReturn & { ref: StateRef<HTMLVideoElement> }} Object containing stream, sharing status, control methods and ref
803
- *
804
- * @example
805
- * const { ref, stream, sharing, start, stop } = useDisplayMedia<HTMLVideoElement>();
806
- */
807
- declare const useDisplayMedia: UseDisplayMedia;
808
-
809
- /** The use event listener options */
810
- type UseEventListenerOptions = boolean | AddEventListenerOptions;
811
- /** The use event listener return type */
812
- type UseEventListenerReturn<Target extends Element> = StateRef<Target>;
813
- interface UseEventListener {
814
- <Event extends keyof WindowEventMap = keyof WindowEventMap>(target: Window, event: Event | Event[], listener: (this: Window, event: WindowEventMap[Event]) => void, options?: UseEventListenerOptions): void;
815
- <Event extends keyof DocumentEventMap = keyof DocumentEventMap>(target: Document, event: Event | Event[], listener: (this: Document, event: DocumentEventMap[Event]) => void, options?: UseEventListenerOptions): void;
816
- <Event extends keyof HTMLElementEventMap = keyof HTMLElementEventMap>(target: HookTarget$1, event: Event | Event[], listener: (this: Element, event: HTMLElementEventMap[Event]) => void, options?: UseEventListenerOptions): void;
817
- <Target extends Element, Event extends keyof HTMLElementEventMap = keyof HTMLElementEventMap>(event: Event | Event[], listener: (this: Target, event: HTMLElementEventMap[Event]) => void, options?: UseEventListenerOptions, target?: never): UseEventListenerReturn<Target>;
818
- <Target extends Element, Event extends keyof MediaQueryListEventMap = keyof MediaQueryListEventMap>(event: Event | Event[], listener: (this: Target, event: MediaQueryListEventMap[Event]) => void, options?: UseEventListenerOptions, target?: never): UseEventListenerReturn<Target>;
819
- }
820
- /**
821
- * @name useEventListener
822
- * @description - Hook that attaches an event listener to the specified target
823
- * @category Browser
824
- *
825
- * @overload
826
- * @template Event Key of window event map
827
- * @param {Window} target The window object to attach the event listener to
828
- * @param {Event | Event[]} event An array of event types to listen for
829
- * @param {(this: Window, event: WindowEventMap[Event]) => void} handler The event handler function
830
- * @param {UseEventListenerOptions} [options] Options for the event listener
831
- * @returns {void}
832
- *
833
- * @example
834
- * useEventListener(window, 'click', () => console.log('click'));
835
- *
836
- * @overload
837
- * @template Event Key of window event map
838
- * @param {Document} target The window object to attach the event listener to
839
- * @param {Event | Event[]} event An array of event types to listen for
840
- * @param {(this: Document, event: DocumentEventMap[Event]) => void} handler The event handler function
841
- * @param {UseEventListenerOptions} [options] Options for the event listener
842
- * @returns {void}
843
- *
844
- * @example
845
- * useEventListener(document, 'click', () => console.log('click'));
846
- *
847
- * @overload
848
- * @template Event Key of window event map
849
- * @template Target The target element
850
- * @param {HookTarget} target The target element to attach the event listener to
851
- * @param {Event | Event[]} event An array of event types to listen for
852
- * @param {(this: Target, event: HTMLElementEventMap[Event]) => void} handler The event handler function
853
- * @param {UseEventListenerOptions} [options] Options for the event listener
854
- * @returns {void}
855
- *
856
- * @example
857
- * useEventListener(ref, 'click', () => console.log('click'));
858
- *
859
- * @overload
860
- * @template Event Key of window event map
861
- * @template Target The target element
862
- * @param {Event | Event[]} event An array of event types to listen for
863
- * @param {(this: Target, event: HTMLElementEventMap[Event] | MediaQueryListEventMap[Event]) => void} handler The event handler function
864
- * @param {UseEventListenerOptions} [options] Options for the event listener
865
- * @returns {UseEventListenerReturn<Target>} A reference to the target element
866
- *
867
- * @example
868
- * const ref = useEventListener('click', () => console.log('click'));
869
- */
870
- declare const useEventListener: UseEventListener;
871
-
872
- /**
873
- * @name useDocumentEvent
874
- * @description - Hook attaches an event listener to the document object for the specified event
875
- * @category Browser
876
- *
877
- * @template Event Key of document event map.
878
- * @param {Event} event The event to listen for.
879
- * @param {(event: DocumentEventMap[Event]) => void} listener The callback function to be executed when the event is triggered
880
- * @param {UseEventListenerOptions} [options] The options for the event listener
881
- * @returns {void}
882
- *
883
- * @example
884
- * useDocumentEvent('click', () => console.log('clicked'));
885
- */
886
- declare const useDocumentEvent: <Event extends keyof DocumentEventMap>(event: Event, listener: (this: Document, event: DocumentEventMap[Event]) => any, options?: UseEventListenerOptions) => void;
887
-
888
- /** The use document title options type */
889
- interface UseDocumentTitleOptions {
890
- /** Restore the previous title on unmount */
891
- restoreOnUnmount?: boolean;
892
- }
893
- /** The use document title return type */
894
- interface UseDocumentTitleReturn {
895
- /** The current title */
896
- value: string;
897
- /** Function to update the title */
898
- set: (title: string) => void;
899
- }
900
- /**
901
- * @name useDocumentTitle
902
- * @description - Hook that manages the document title and allows updating it
903
- * @category Browser
904
- *
905
- * @param {string} [initialValue] The initial title. If not provided, the current document title will be used
906
- * @param {boolean} [options.restoreOnUnmount] Restore the previous title on unmount
907
- * @returns {UseDocumentTitleReturn} An array containing the current title and a function to update the title
908
- *
909
- * @example
910
- * const { value, set } = useDocumentTitle();
911
- */
912
- declare function useDocumentTitle(initialValue?: string, options?: UseDocumentTitleOptions): UseDocumentTitleReturn;
913
-
914
- /**
915
- * @name useDocumentVisibility
916
- * @description – Hook that provides the current visibility state of the document
917
- * @category Browser
918
- *
919
- * @returns {DocumentVisibilityState} The current visibility state of the document, which can be 'visible' or 'hidden'
920
- *
921
- * @example
922
- * const visibilityState = useDocumentVisibility();
923
- */
924
- declare const useDocumentVisibility: () => DocumentVisibilityState;
925
-
926
- /** The element size value type */
927
- interface UseElementSizeValue {
928
- /** The element's height */
929
- height: number;
930
- /** The element's width */
931
- width: number;
932
- }
933
- /** The use element size return type */
934
- interface UseElementSizeReturn {
935
- value: UseElementSizeValue;
936
- }
937
- interface UseElementSize {
938
- (target: HookTarget$1): UseElementSizeReturn;
939
- <Target extends Element>(target?: never): {
940
- ref: StateRef<Target>;
941
- } & UseElementSizeReturn;
942
- }
943
- /**
944
- * @name useElementSize
945
- * @description - Hook that observes and returns the width and height of element
946
- * @category Elements
947
- *
948
- * @overload
949
- * @param {HookTarget} target The target element to observe
950
- * @returns {UseElementSizeReturn} An object containing the current width and height of the element
951
- *
952
- * @example
953
- * const { value } = useElementSize(ref);
954
- *
955
- * @overload
956
- * @returns { { ref: StateRef<Target> } & UseElementSizeReturn } An object containing the current width and height of the element
957
- *
958
- * @example
959
- * const { ref, value } = useElementSize();
960
- */
961
- declare const useElementSize: UseElementSize;
962
-
963
- /**
964
- * @name useEvent
965
- * @description - Hook that creates an event and returns a stable reference of it
966
- * @category Browser
967
- *
968
- * @template Params The type of the params
969
- * @template Return The type of the return
970
- * @param {(...args: Params) => Return} callback The callback function
971
- * @returns {(...args: Params) => Return} The callback
972
- *
973
- * @example
974
- * const onClick = useEvent(() => console.log('clicked'));
975
- */
976
- declare const useEvent: <Params extends unknown[], Return>(callback: (...args: Params) => Return) => ((...args: Params) => Return);
977
-
978
- interface ColorSelectionOptions {
979
- signal?: AbortSignal;
980
- }
981
- interface ColorSelectionResult {
982
- sRGBHex: string;
983
- }
984
- interface EyeDropper {
985
- open: (options?: ColorSelectionOptions) => Promise<ColorSelectionResult>;
986
- }
987
- interface EyeDropperConstructor {
988
- new (): EyeDropper;
989
- }
990
- declare global {
991
- interface Window {
992
- readonly EyeDropper?: EyeDropperConstructor | undefined;
993
- }
994
- }
995
- /** The color selection return type */
996
- interface UseEyeDropperReturn {
997
- /** The eye dropper supported status */
998
- supported: boolean;
999
- /** The eye dropper value */
1000
- value?: string;
1001
- /** The eye dropper open method */
1002
- open: (colorSelectionOptions?: ColorSelectionOptions) => Promise<ColorSelectionResult>;
1003
- }
1004
- /**
1005
- * @name useEyeDropper
1006
- * @description - Hook that gives you access to the eye dropper
1007
- * @category Browser
1008
- *
1009
- * @browserapi EyeDropper https://developer.mozilla.org/en-US/docs/Web/API/EyeDropper
1010
- *
1011
- * @param {string} [initialValue=undefined] The initial value for the eye dropper
1012
- * @returns {UseEyeDropperReturn} An object containing the supported status, the value and the open method
1013
- *
1014
- * @example
1015
- * const { supported, value, open } = useEyeDropper();
1016
- */
1017
- declare const useEyeDropper: (initialValue?: string | undefined) => UseEyeDropperReturn;
1018
-
1019
- /** The use favicon return type */
1020
- type UseFaviconReturn = [string, Dispatch<SetStateAction<string>>];
1021
- /**
1022
- * @name useFavicon
1023
- * @description - Hook that manages the favicon
1024
- * @category Browser
1025
- *
1026
- * @param {string} [initialFavicon] The initial favicon. If not provided, the current favicon will be used
1027
- * @returns {UseFaviconReturn} An array containing the current favicon and a function to update the favicon
1028
- *
1029
- * @example
1030
- * const { href, set } = useFavicon('https://www.google.com/favicon.ico');
1031
- */
1032
- declare const useFavicon: (initialHref?: string) => {
1033
- readonly href: string | undefined;
1034
- readonly set: (favicon: string) => void;
1035
- };
1036
-
1037
- /** The use field params type */
1038
- interface UseFieldParams<Value> {
1039
- /** The auto focus */
1040
- autoFocus?: boolean;
1041
- /** The initial touched */
1042
- initialTouched?: boolean;
1043
- /** The initial value */
1044
- initialValue?: Value;
1045
- /** The validate on blur */
1046
- validateOnBlur?: boolean;
1047
- /** The validate on mount */
1048
- validateOnChange?: boolean;
1049
- /** The validate on mount */
1050
- validateOnMount?: boolean;
1051
- }
1052
- /** The use field register params type */
1053
- interface UseFieldRegisterParams {
1054
- /** The required validation */
1055
- required?: string;
1056
- /** The custom validation */
1057
- validate?: (value: string) => Promise<string | true>;
1058
- /** The min value validation */
1059
- max?: {
1060
- value: number;
1061
- message: string;
1062
- };
1063
- /** The max length validation */
1064
- maxLength?: {
1065
- value: number;
1066
- message: string;
1067
- };
1068
- /** The max value validation */
1069
- min?: {
1070
- value: number;
1071
- message: string;
1072
- };
1073
- /** The min length validation */
1074
- minLength?: {
1075
- value: number;
1076
- message: string;
1077
- };
1078
- /** The pattern validation */
1079
- pattern?: {
1080
- value: RegExp;
1081
- message: string;
1082
- };
1083
- }
1084
- /** The use field return type */
1085
- interface UseFieldReturn<Value> {
1086
- /** The dirty state */
1087
- dirty: boolean;
1088
- /** The error state */
1089
- error?: string;
1090
- /** The set error function */
1091
- touched: boolean;
1092
- /** The set error function */
1093
- clearError: () => void;
1094
- /** The focus function */
1095
- focus: () => void;
1096
- /** The get value function */
1097
- getValue: () => Value;
1098
- /** The register function */
1099
- register: (params?: UseFieldRegisterParams) => {
1100
- onBlur: () => void;
1101
- onChange: () => void;
1102
- ref: (node: HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement | null | undefined) => void;
1103
- };
1104
- /** The reset function */
1105
- reset: () => void;
1106
- /** The set error function */
1107
- setError: (error: string) => void;
1108
- /** The set value function */
1109
- setValue: (value: Value) => void;
1110
- /** The watch function */
1111
- watch: () => Value;
1112
- }
1113
- /**
1114
- * @name useField
1115
- * @description - Hook to manage a form field
1116
- * @category Utilities
1117
- *
1118
- * @template Value The input value
1119
- * @template Type The input value type
1120
- * @param {Value} [params.initialValue] Initial value
1121
- * @param {boolean} [params.initialTouched=false] Initial touched state
1122
- * @param {boolean} [params.autoFocus=false] Auto focus
1123
- * @param {boolean} [params.validateOnChange=false] Validate on change
1124
- * @param {boolean} [params.validateOnBlur=false] Validate on blur
1125
- * @param {boolean} [params.validateOnMount=false] Validate on mount
1126
- * @returns {UseFieldReturn<Value>} An object containing input information
1127
- *
1128
- * @example
1129
- * const { register, getValue, setValue, reset, dirty, error, setError, clearError, touched, focus, watch } = useField();
1130
- */
1131
- declare const useField: <Value extends boolean | number | string = string, Type = Value extends string ? string : Value extends boolean ? boolean : number>(params?: UseFieldParams<Value>) => UseFieldReturn<Type>;
1132
-
1133
- interface UseFileDialogOptions extends Pick<ComponentProps<'input'>, 'accept' | 'multiple'> {
1134
- /** The capture value */
1135
- capture?: string;
1136
- /** The reset value */
1137
- reset?: boolean;
1138
- }
1139
- interface UseFileDialogReturn {
1140
- /** The selected files */
1141
- value: FileList | null;
1142
- /** The open function */
1143
- open: (openParams?: UseFileDialogOptions) => void;
1144
- /** The reset function */
1145
- reset: () => void;
1146
- }
1147
- interface UseFileDialog {
1148
- (callback?: (value: FileList | null) => void, options?: UseFileDialogOptions): UseFileDialogReturn;
1149
- (options?: UseFileDialogOptions, callback?: never): UseFileDialogReturn;
1150
- }
1151
- /**
1152
- * @name useFileDialog
1153
- * @description - Hook to handle file input
1154
- * @category Browser
1155
- *
1156
- * @overload
1157
- * @param {(value: FileList | null) => void} callback The callback to execute when a file is selected
1158
- * @param {boolean} [options.multiple=true] Whether multiple files can be selected
1159
- * @param {string} [options.accept='*'] The accepted file types
1160
- * @param {boolean} [options.reset=false] Whether the input should be reset when the callback is called
1161
- * @param {string} [options.capture] The capture value
1162
- * @returns {UseFileDialogReturn} An object containing the selected files
1163
- *
1164
- * @example
1165
- * const { values, open, reset } = useFileDialog((value) => console.log(value));
1166
- *
1167
- * @overload
1168
- * @param {boolean} [options.multiple=true] Whether multiple files can be selected
1169
- * @param {string} [options.accept='*'] The accepted file types
1170
- * @param {boolean} [options.reset=false] Whether the input should be reset when the callback is called
1171
- * @param {string} [options.capture] The capture value
1172
- * @returns {UseFileDialogReturn} An object containing the selected files
1173
- *
1174
- * @example
1175
- * const { values, open, reset } = useFileDialog({ accept: 'image/*' });
1176
- */
1177
- declare const useFileDialog: UseFileDialog;
1178
-
1179
- /** The use focus options type */
1180
- interface UseFocusOptions {
1181
- /** The initial focus state of the target */
1182
- initialValue?: boolean;
1183
- /** The on blur callback */
1184
- onBlur?: (event: FocusEvent) => void;
1185
- /** The on focus callback */
1186
- onFocus?: (event: FocusEvent) => void;
1187
- }
1188
- /** The use focus return type */
1189
- interface UseFocusReturn {
1190
- /** The boolean state value of the target */
1191
- focused: boolean;
1192
- /** Blur the target */
1193
- blur: () => void;
1194
- /** Focus the target */
1195
- focus: () => void;
1196
- }
1197
- interface UseFocus {
1198
- (target: HookTarget$1, options?: UseFocusOptions): UseFocusReturn;
1199
- <Target extends Element>(options?: UseFocusOptions, target?: never): UseFocusReturn & {
1200
- ref: StateRef<Target>;
1201
- };
1202
- }
1203
- /**
1204
- * @name useFocus
1205
- * @description - Hook that allows you to focus on a specific element
1206
- * @category Browser
1207
- *
1208
- * @overload
1209
- * @param {HookTarget} target The target element to focus
1210
- * @param {boolean} [options.initialValue=false] The initial focus state of the target
1211
- * @param {(event: FocusEvent) => void} [options.onFocus] The callback function to be invoked on focus
1212
- * @param {(event: FocusEvent) => void} [options.onBlur] The callback function to be invoked on blur
1213
- * @returns {UseFocusReturn} An object with focus state and methods
1214
- *
1215
- * @example
1216
- * const { focus, blur, focused } = useFocus(ref);
1217
- *
1218
- * @overload
1219
- * @template Target The target element
1220
- * @param {boolean} [options.initialValue=false] The initial focus state of the target
1221
- * @param {(event: FocusEvent) => void} [options.onFocus] The callback function to be invoked on focus
1222
- * @param {(event: FocusEvent) => void} [options.onBlur] The callback function to be invoked on blur
1223
- * @returns {UseFocusReturn & { ref: StateRef<Target> }} An object with focus state, methods and ref
1224
- *
1225
- * @example
1226
- * const { ref, focus, blur, focused } = useFocus();
1227
- */
1228
- declare const useFocus: UseFocus;
1229
-
1230
- /**
1231
- * @name useFps
1232
- * @description - Hook that measures frames per second
1233
- * @category Sensors
1234
- *
1235
- * @browserapi requestAnimationFrame https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
1236
- *
1237
- * @returns {number} A number which determines frames per second
1238
- *
1239
- * @example
1240
- * const fps = useFps();
1241
- */
1242
- declare const useFps: () => number;
1243
-
1244
- /** The use fullscreen options type */
1245
- interface UseFullScreenOptions {
1246
- /** initial value */
1247
- initialValue?: boolean;
1248
- /** on enter fullscreen */
1249
- onEnter?: () => void;
1250
- /** on exit fullscreen */
1251
- onExit?: () => void;
1252
- }
1253
- /** The use click outside return type */
1254
- interface UseFullScreenReturn {
1255
- /** The fullscreen state */
1256
- value: boolean;
1257
- /** The fullscreen enter method */
1258
- enter: () => void;
1259
- /** The fullscreen exit method */
1260
- exit: () => void;
1261
- /** The fullscreen toggle method */
1262
- toggle: () => void;
1263
- }
1264
- interface UseFullScreen {
1265
- (target: HookTarget$1, options?: UseFullScreenOptions): UseFullScreenReturn;
1266
- <Target extends Element>(options?: UseFullScreenOptions, target?: never): UseFullScreenReturn & {
1267
- ref: StateRef<Target>;
1268
- };
1269
- }
1270
- /**
1271
- * @name useFullscreen
1272
- * @description - Hook to handle fullscreen events
1273
- * @category Browser
1274
- *
1275
- * @overload
1276
- * @param {HookTarget} target The target element for fullscreen
1277
- * @param {boolean} [options.initialValue=false] initial value of fullscreen
1278
- * @param {() => void} [options.onEnter] on enter fullscreen
1279
- * @param {() => void} [options.onExit] on exit fullscreen
1280
- * @returns {UseFullScreenReturn} An object with the fullscreen state and methods
1281
- *
1282
- * @example
1283
- * const { enter, exit, toggle, value } = useFullscreen(ref);
1284
- *
1285
- * @overload
1286
- * @template Target The target element for fullscreen
1287
- * @param {boolean} [options.initialValue=false] initial value of fullscreen
1288
- * @param {() => void} [options.onEnter] on enter fullscreen
1289
- * @param {() => void} [options.onExit] on exit fullscreen
1290
- * @returns {UseFullScreenReturn & { ref: RefObject<Target> }} An object with the fullscreen state and methods
1291
- *
1292
- * @example
1293
- * const { ref, enter, exit, toggle, value } = useFullscreen();
1294
- */
1295
- declare const useFullscreen: UseFullScreen;
1296
-
1297
- declare global {
1298
- interface Gamepad {
1299
- hapticActuators?: GamepadHapticActuator[];
1300
- }
1301
- }
1302
- /** The use gamepad return type */
1303
- interface UseGamepadStateReturn {
1304
- /** The gamepad active status */
1305
- active: boolean;
1306
- /** The gamepad state */
1307
- gamepads: Gamepad[];
1308
- /** The gamepad supported status */
1309
- supported: boolean;
1310
- }
1311
- /**
1312
- * @name useGamepad
1313
- * @description - Hook for getting information about gamepad
1314
- * @category Browser
1315
- *
1316
- * @browserapi navigator.getGamepads https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getGamepads
1317
- *
1318
- * @returns {UseGamepadStateReturn} An object containing the gamepad information
1319
- *
1320
- * @example
1321
- * const { supported, gamepads, active } = useGamepad();
1322
- */
1323
- declare const useGamepad: () => {
1324
- active: boolean;
1325
- supported: boolean;
1326
- gamepads: Gamepad[];
1327
- };
1328
- declare const mapGamepadToXbox360Controller: (gamepad: Gamepad) => {
1329
- buttons: {
1330
- a: GamepadButton;
1331
- b: GamepadButton;
1332
- x: GamepadButton;
1333
- y: GamepadButton;
1334
- };
1335
- bumper: {
1336
- left: GamepadButton;
1337
- right: GamepadButton;
1338
- };
1339
- triggers: {
1340
- left: GamepadButton;
1341
- right: GamepadButton;
1342
- };
1343
- stick: {
1344
- left: {
1345
- horizontal: number;
1346
- vertical: number;
1347
- button: GamepadButton;
1348
- };
1349
- right: {
1350
- horizontal: number;
1351
- vertical: number;
1352
- button: GamepadButton;
1353
- };
1354
- };
1355
- dpad: {
1356
- up: GamepadButton;
1357
- down: GamepadButton;
1358
- left: GamepadButton;
1359
- right: GamepadButton;
1360
- };
1361
- back: GamepadButton;
1362
- start: GamepadButton;
1363
- };
1364
-
1365
- /** The use geolocation return type */
1366
- interface UseGeolocationReturn {
1367
- /** The accuracy of the last position update */
1368
- accuracy: number | null;
1369
- /** The altitude of the last position update */
1370
- altitude: number | null;
1371
- /** The altitude accuracy of the last position update */
1372
- altitudeAccuracy: number | null;
1373
- /** The error of the last position update */
1374
- error: GeolocationPositionError | null;
1375
- /** The heading of the last position update */
1376
- heading: number | null;
1377
- /** The latitude of the last position update */
1378
- latitude: number | null;
1379
- /** The loading state */
1380
- loading: boolean;
1381
- /** The longitude of the last position update */
1382
- longitude: number | null;
1383
- /** The speed of the last position update */
1384
- speed: number | null;
1385
- /** The timestamp of the last position update */
1386
- timestamp: number | null;
1387
- }
1388
- /** The use geolocation params type */
1389
- type UseGeolocationParams = PositionOptions;
1390
- /**
1391
- * @name useGeolocation
1392
- * @description - Hook that returns the current geolocation
1393
- * @category Browser
1394
- *
1395
- * @browserapi navigator.geolocation https://developer.mozilla.org/en-US/docs/Web/API/Navigator/geolocation
1396
- *
1397
- * @param {boolean} [params.enableHighAccuracy] Enable high accuracy
1398
- * @param {number} [params.maximumAge] Maximum age
1399
- * @param {number} [params.timeout] Timeout
1400
- * @returns {UseGeolocationReturn}
1401
- *
1402
- * @example
1403
- * const { loading, error, timestamp, accuracy, latitude, longitude, altitude, altitudeAccuracy, heading, speed } = useGeolocation();
1404
- */
1405
- declare const useGeolocation: (params?: UseGeolocationParams) => UseGeolocationReturn;
1406
-
1407
- /** The use hash return type */
1408
- type UseHashReturn = [string, (value: string) => void];
1409
- /**
1410
- * @name useHash
1411
- * @description - Hook that manages the hash value
1412
- * @category Browser
1413
- *
1414
- * @returns {UseHashReturn} An array containing the hash value and a function to set the hash value
1415
- *
1416
- * @example
1417
- * const [hash, setHash] = useHash();
1418
- */
1419
- declare const useHash: () => UseHashReturn;
1420
-
1421
- /** The use hotkeys params type */
1422
- interface UseHotkeysOptions {
1423
- /** Alias map for hotkeys */
1424
- alias?: Record<string, string>;
1425
- /** Enable or disable the event listeners */
1426
- enabled?: boolean;
1427
- }
1428
- declare const isHotkeyMatch: (hotkey: string, keys: UseHotkeysKey[]) => boolean;
1429
- /** The hotkeys string type */
1430
- type UseHotkeysHotkeys = string;
1431
- /** The hotkey key information */
1432
- interface UseHotkeysKey {
1433
- /** The alias for the key */
1434
- alias: string;
1435
- /** The key code */
1436
- code: string;
1437
- /** The key value */
1438
- key: string;
1439
- }
1440
- /** The use hotkeys target type */
1441
- type UseHotkeysTarget = Element | React.RefObject<Element | null | undefined>;
1442
- interface UseHotkeys {
1443
- (target: UseHotkeysTarget, hotkeys: UseHotkeysHotkeys, callback: (event: KeyboardEvent) => void, options?: UseHotkeysOptions): void;
1444
- <Target extends Element>(hotkeys: UseHotkeysHotkeys, callback: (event: KeyboardEvent) => void, options?: UseHotkeysOptions, target?: never): StateRef<Target>;
1445
- }
1446
- /**
1447
- * @name useHotkeys
1448
- * @description - Hook that listens for hotkeys
1449
- * @category Sensors
1450
- *
1451
- * @overload
1452
- * @param {HookTarget} [target=window] The target element to attach the event listener to
1453
- * @param {string} hotkeys The hotkey to listen for
1454
- * @param {(event: KeyboardEvent) => void} callback The callback function to execute when hotkey is pressed
1455
- * @param {Record<string, string>} [options.alias] Alias map for hotkeys
1456
- * @param {boolean} [options.enabled=true] Enable or disable the event listeners
1457
- * @returns {void}
1458
- *
1459
- * @example
1460
- * useHotkeys(ref, 'ctrl+a', () => console.log('hotkey pressed'));
1461
- * @example
1462
- * useHotkeys(ref, 'ctrl+a, ctrl+b', () => console.log('hotkey pressed'));
1463
- *
1464
- * @overload
1465
- * @template Target The target element
1466
- * @param {string} hotkeys The hotkey to listen for
1467
- * @param {(event: KeyboardEvent) => void} callback The callback function to execute when hotkey is pressed
1468
- * @param {Record<string, string>} [options.alias] Alias map for hotkeys
1469
- * @param {boolean} [options.enabled=true] Enable or disable the event listeners
1470
- * @returns {StateRef<Target>} A reference to the target element
1471
- *
1472
- * @example
1473
- * const ref = useHotkeys('ctrl+a', () => console.log('hotkey pressed'));
1474
- * @example
1475
- * const ref = useHotkeys('ctrl+a, ctrl+b', () => console.log('hotkey pressed'));
1476
- */
1477
- declare const useHotkeys: UseHotkeys;
1478
-
1479
- /** The use hover options type */
1480
- interface UseHoverOptions {
1481
- /** The on entry callback */
1482
- onEntry?: (event: Event) => void;
1483
- /** The on leave callback */
1484
- onLeave?: (event: Event) => void;
1485
- }
1486
- interface UseHover {
1487
- (target: HookTarget$1, callback?: (event: Event) => void): boolean;
1488
- (target: HookTarget$1, options?: UseHoverOptions): boolean;
1489
- <Target extends Element>(callback?: (event: Event) => void, target?: never): [StateRef<Target>, boolean];
1490
- <Target extends Element>(options?: UseHoverOptions, target?: never): [StateRef<Target>, boolean];
1491
- }
1492
- /**
1493
- * @name useHover
1494
- * @description - Hook that defines the logic when hovering an element
1495
- * @category Sensors
1496
- *
1497
- * @overload
1498
- * @param {HookTarget} target The target element to be hovered
1499
- * @param {(event: Event) => void} [callback] The callback function to be invoked on mouse enter
1500
- * @returns {boolean} The state of the hover
1501
- *
1502
- * @example
1503
- * const hovering = useHover(ref, () => console.log('callback'));
1504
- *
1505
- * @overload
1506
- * @param {HookTarget} target The target element to be hovered
1507
- * @param {(event: Event) => void} [options.onEntry] The callback function to be invoked on mouse enter
1508
- * @param {(event: Event) => void} [options.onLeave] The callback function to be invoked on mouse leave
1509
- * @returns {boolean} The state of the hover
1510
- *
1511
- * @example
1512
- * const hovering = useHover(ref, options);
1513
- *
1514
- * @overload
1515
- * @template Target The target element
1516
- * @param {(event: Event) => void} [callback] The callback function to be invoked on mouse enter
1517
- * @returns {UseHoverReturn<Target>} The state of the hover
1518
- *
1519
- * @example
1520
- * const [ref, hovering] = useHover(() => console.log('callback'));
1521
- *
1522
- * @overload
1523
- * @template Target The target element
1524
- * @param {(event: Event) => void} [options.onEntry] The callback function to be invoked on mouse enter
1525
- * @param {(event: Event) => void} [options.onLeave] The callback function to be invoked on mouse leave
1526
- * @returns {UseHoverReturn<Target>} The state of the hover
1527
- *
1528
- * @example
1529
- * const [ref, hovering] = useHover(options);
1530
- */
1531
- declare const useHover: UseHover;
1532
-
1533
- /** The use idle options type */
1534
- interface UseIdleOptions {
1535
- /** The idle events */
1536
- events?: Array<keyof DocumentEventMap>;
1537
- /** The idle state */
1538
- initialValue?: boolean;
1539
- }
1540
- /** The use idle return type */
1541
- interface UseIdleReturn {
1542
- /** The idle state */
1543
- idle: boolean;
1544
- /** The last active time */
1545
- lastActive: number;
1546
- }
1547
- /**
1548
- * @name useIdle
1549
- * @description - Hook that defines the logic when the user is idle
1550
- * @category Sensors
1551
- *
1552
- * @param {number} [milliseconds=ONE_MINUTE] The idle time in milliseconds
1553
- * @param {boolean} [options.initialState=false] The options for the hook
1554
- * @param {Array<keyof WindowEventMap>} [options.events=IDLE_EVENTS]
1555
- * @returns {UseIdleReturn} An object containing the idle state and the last active time
1556
- *
1557
- * @example
1558
- * const { idle, lastActive } = useIdle();
1559
- */
1560
- declare const useIdle: (milliseconds?: number, { initialValue, events }?: UseIdleOptions) => UseIdleReturn;
1561
-
1562
- interface UseQueryOptions<QueryData, Data> {
1563
- enabled?: boolean;
1564
- initialData?: (() => Data) | Data;
1565
- keys?: DependencyList;
1566
- placeholderData?: (() => Data) | Data;
1567
- refetchInterval?: number;
1568
- retry?: boolean | number;
1569
- retryDelay?: ((retry: number, error: Error) => number) | number;
1570
- onError?: (error: Error) => void;
1571
- onSuccess?: (data: Data) => void;
1572
- select?: (data: QueryData) => Data;
1573
- }
1574
- interface UseQueryCallbackParams {
1575
- keys: DependencyList;
1576
- signal: AbortSignal;
1577
- }
1578
- interface UseQueryReturn<Data> {
1579
- abort: AbortController['abort'];
1580
- data?: Data;
1581
- error?: Error;
1582
- isError: boolean;
1583
- isFetching: boolean;
1584
- isLoading: boolean;
1585
- isRefetching: boolean;
1586
- isSuccess: boolean;
1587
- refetch: () => void;
1588
- }
1589
- /**
1590
- * @name useQuery
1591
- * @description - Hook that defines the logic when query data
1592
- * @category Utilities
1593
- *
1594
- * @template Data The type of the data
1595
- * @param {() => Promise<Data>} callback The callback function to be invoked
1596
- * @param {DependencyList} [options.keys] The dependencies for the hook
1597
- * @param {(data: Data) => void} [options.onSuccess] The callback function to be invoked on success
1598
- * @param {(error: Error) => void} [options.onError] The callback function to be invoked on error
1599
- * @param {UseQueryOptionsSelect<Data>} [options.select] The select function to be invoked
1600
- * @param {Data | (() => Data)} [options.initialData] The initial data for the hook
1601
- * @param {Data | (() => Data)} [options.placeholderData] The placeholder data for the hook
1602
- * @param {number} [options.refetchInterval] The refetch interval
1603
- * @param {boolean | number} [options.retry] The retry count of requests
1604
- * @returns {UseQueryReturn<Data>} An object with the state of the query
1605
- *
1606
- * @example
1607
- * const { data, isFetching, isLoading, isError, isSuccess, error, refetch, isRefetching, abort, aborted } = useQuery(() => fetch('url'));
1608
- */
1609
- declare const useQuery: <QueryData, Data = QueryData>(callback: (params: UseQueryCallbackParams) => Promise<QueryData>, options?: UseQueryOptions<QueryData, Data>) => UseQueryReturn<Data>;
1610
-
1611
- /** The use image options */
1612
- interface UseImageOptions {
1613
- /** The alt of the image */
1614
- alt?: string;
1615
- /** The class of the image */
1616
- class?: string;
1617
- /** The crossorigin of the image */
1618
- crossorigin?: string;
1619
- /** The loading of the image */
1620
- loading?: HTMLImageElement['loading'];
1621
- /** The referrer policy of the image */
1622
- referrerPolicy?: HTMLImageElement['referrerPolicy'];
1623
- /** The sizes of the image */
1624
- sizes?: string;
1625
- /** The srcset of the image */
1626
- srcset?: string;
1627
- }
1628
- /** The use image return type */
1629
- type UseImageReturn = UseQueryReturn<HTMLImageElement>;
1630
- /**
1631
- * @name useImage
1632
- * @description - Hook that load an image in the browser
1633
- * @category Browser
1634
- *
1635
- * @param {string} src The source of the image
1636
- * @param {string} [options.srcset] The srcset of the image
1637
- * @param {string} [options.sizes] The sizes of the image
1638
- * @param {string} [options.alt] The alt of the image
1639
- * @param {string} [options.class] The class of the image
1640
- * @param {HTMLImageElement['loading']} [options.loading] The loading of the image
1641
- * @param {string} [options.crossorigin] The crossorigin of the image
1642
- * @param {HTMLImageElement['referrerPolicy']} [options.referrerPolicy] The referrerPolicy of the image
1643
- * @param {DependencyList} [useQueryOptions.keys] The dependencies for the hook
1644
- * @param {(data: Data) => void} [useQueryOptions.onSuccess] The callback function to be invoked on success
1645
- * @param {(error: Error) => void} [useQueryOptions.onError] The callback function to be invoked on error
1646
- * @param {number} [useQueryOptions.refetchInterval] The refetch interval
1647
- * @param {boolean | number} [useQueryOptions.retry] The retry count of requests
1648
- * @returns {UseImageReturn} An object with the state of the image
1649
- *
1650
- * @example
1651
- * const { data, isLoading, isError, isSuccess, error, refetch, isRefetching } = useImage('https://example.com/image.png');
1652
- */
1653
- declare const useImage: (src: string, options?: UseImageOptions, useQueryOptions?: Omit<UseQueryOptions<HTMLImageElement, HTMLImageElement>, "initialData" | "placeholderData" | "select">) => UseQueryReturn<HTMLImageElement>;
1654
-
1655
- /** The use infinite scroll options type */
1656
- interface UseInfiniteScrollOptions {
1657
- /** The direction to trigger the callback */
1658
- direction?: 'bottom' | 'left' | 'right' | 'top';
1659
- /** The distance in pixels to trigger the callback */
1660
- distance?: number;
1661
- }
1662
- interface UseInfiniteScroll {
1663
- (target: HookTarget$1, callback: (event: Event) => void, options?: UseInfiniteScrollOptions): boolean;
1664
- <Target extends Element>(callback: (event: Event) => void, options?: UseInfiniteScrollOptions, target?: never): {
1665
- ref: StateRef<Target>;
1666
- loading: boolean;
1667
- };
1668
- }
1669
- /**
1670
- * @name useInfiniteScroll
1671
- * @description - Hook that defines the logic for infinite scroll
1672
- * @category Sensors
1673
- *
1674
- * @overload
1675
- * @template Target The target element
1676
- * @param {(event: Event) => void} callback The callback to execute when a click outside the target is detected
1677
- * @param {number} [options.distance=10] The distance in pixels to trigger the callback
1678
- * @param {string} [options.direction='bottom'] The direction to trigger the callback
1679
- * @returns {{ ref: StateRef<Target>, loading: boolean }} An object containing the ref and loading
1680
- *
1681
- * @example
1682
- * const { ref, loading } = useInfiniteScroll(() => console.log('infinite scroll'));
1683
- *
1684
- * @overload
1685
- * @param {HookTarget} target The target element to detect infinite scroll for
1686
- * @param {(event: Event) => void} callback The callback to execute when a click outside the target is detected
1687
- * @param {number} [options.distance=10] The distance in pixels to trigger the callback
1688
- * @param {string} [options.direction='bottom'] The direction to trigger the callback
1689
- * @returns {boolean} A loading indicator of the infinite scroll
1690
- *
1691
- * @example
1692
- * const loading = useInfiniteScroll(ref, () => console.log('infinite scroll'));
1693
- */
1694
- declare const useInfiniteScroll: UseInfiniteScroll;
1695
-
1696
- /** The intersection observer options type */
1697
- interface UseIntersectionObserverOptions extends Omit<IntersectionObserverInit, 'root'> {
1698
- enabled?: boolean;
1699
- root?: HookTarget$1;
1700
- onChange?: (entry: IntersectionObserverEntry) => void;
1701
- }
1702
- /** The intersection observer return type */
1703
- interface UseIntersectionObserverReturn {
1704
- entry?: IntersectionObserverEntry;
1705
- inView: boolean;
1706
- }
1707
- interface UseIntersectionObserver {
1708
- <Target extends Element>(options?: UseIntersectionObserverOptions, target?: never): UseIntersectionObserverReturn & {
1709
- ref: StateRef<Target>;
1710
- };
1711
- (target: HookTarget$1, options?: UseIntersectionObserverOptions): UseIntersectionObserverReturn;
1712
- }
1713
- /**
1714
- * @name useIntersectionObserver
1715
- * @description - Hook that gives you intersection observer state
1716
- * @category Browser
1717
- *
1718
- * @overload
1719
- * @param {HookTarget} target The target element to detect intersection
1720
- * @param {boolean} [options.enabled=true] The IntersectionObserver options
1721
- * @param {((entries: IntersectionObserverEntry[], observer: IntersectionObserver) => void) | undefined} [options.onChange] The callback to execute when intersection is detected
1722
- * @param {HookTarget} [options.root] The root element to observe
1723
- * @returns {UseIntersectionObserverReturn} An object containing the state and the supported status
1724
- *
1725
- * @example
1726
- * const { ref, entry, inView } = useIntersectionObserver();
1727
- *
1728
- * @overload
1729
- * @template Target The target element
1730
- * @param {boolean} [options.enabled=true] The IntersectionObserver options
1731
- * @param {((entries: IntersectionObserverEntry[], observer: IntersectionObserver) => void) | undefined} [options.onChange] The callback to execute when intersection is detected
1732
- * @param {HookTarget} [options.root] The root element to observe
1733
- * @returns {UseIntersectionObserverReturn & { ref: StateRef<Target> }} A React ref to attach to the target element
1734
- *
1735
- * @example
1736
- * const { entry, inView } = useIntersectionObserver(ref);
1737
- */
1738
- declare const useIntersectionObserver: UseIntersectionObserver;
1739
-
1740
- /** The use interval options */
1741
- interface UseIntervalOptions {
1742
- /** Start the interval immediately */
1743
- immediately?: boolean;
1744
- }
1745
- /** The use interval return type */
1746
- interface UseIntervalReturn {
1747
- /** Is the interval active */
1748
- active: boolean;
1749
- /** Pause the interval */
1750
- pause: () => void;
1751
- /** Resume the interval */
1752
- resume: () => void;
1753
- /** Toggle the interval */
1754
- toggle: () => void;
1755
- }
1756
- interface UseInterval {
1757
- (callback: () => void, interval?: number, options?: UseIntervalOptions): UseIntervalReturn;
1758
- (callback: () => void, options?: UseIntervalOptions & {
1759
- interval?: number;
1760
- }): UseIntervalReturn;
1761
- }
1762
- /**
1763
- * @name useInterval
1764
- * @description - Hook that makes and interval and returns controlling functions
1765
- * @category Time
1766
- *
1767
- * @overload
1768
- * @param {() => void} callback Any callback function
1769
- * @param {number} [interval=1000] Time in milliseconds
1770
- * @param {boolean} [options.immediately=true] Start the interval immediately
1771
- * @returns {UseIntervalReturn}
1772
- *
1773
- * @example
1774
- * const { active, pause, resume, toggle } = useInterval(() => console.log('inside interval'), 2500);
1775
- *
1776
- * @overload
1777
- * @param {() => void} callback Any callback function
1778
- * @param {number} [options.interval=1000] Time in milliseconds
1779
- * @param {boolean} [options.immediately=true] Start the interval immediately
1780
- *
1781
- * @example
1782
- * const { active, pause, resume, toggle } = useInterval(() => console.log('inside interval'), { interval: 2500 });
1783
- */
1784
- declare const useInterval: UseInterval;
1785
-
1786
- /**
1787
- * @name useIsFirstRender
1788
- * @description - Hook that returns true if the component is first render
1789
- * @category Lifecycle
1790
- *
1791
- * @returns {boolean} True if the component is first render
1792
- *
1793
- * @example
1794
- * const isFirstRender = useIsFirstRender();
1795
- */
1796
- declare const useIsFirstRender: () => boolean;
1797
-
1798
- /**
1799
- * @name useIsomorphicLayoutEffect
1800
- * @description - Hook conditionally selects either `useLayoutEffect` or `useEffect` based on the environment
1801
- * @category Lifecycle
1802
- *
1803
- * @example
1804
- * useIsomorphicLayoutEffect(() => console.log('effect'), [])
1805
- */
1806
- declare const useIsomorphicLayoutEffect: typeof useEffect;
1807
-
1808
- /** The keyboard event handler type */
1809
- type KeyboardEventHandler = (event: KeyboardEvent) => void;
1810
- /** The use keyboard options type */
1811
- interface UseKeyboardOptions {
1812
- /** The callback function to be invoked on key down */
1813
- onKeyDown?: KeyboardEventHandler;
1814
- /** The callback function to be invoked on key up */
1815
- onKeyUp?: KeyboardEventHandler;
1816
- }
1817
- interface UseKeyboard {
1818
- (target: HookTarget$1 | Window, options: UseKeyboardOptions): void;
1819
- <Target extends Element>(options: UseKeyboardOptions, target?: never): {
1820
- ref: StateRef<Target>;
1821
- };
1822
- }
1823
- /**
1824
- * @name useKeyboard
1825
- * @description - Hook that helps to listen for keyboard events
1826
- * @category Sensors
1827
- *
1828
- * @overload
1829
- * @param {HookTarget | Window} target The target to attach the event listeners to
1830
- * @param {UseKeyboardOptions} [options] The keyboard event options
1831
- * @returns {void}
1832
- *
1833
- * @example
1834
- * useKeyboard(ref, { onKeyDown: (event) => console.log('key down'), onKeyUp: (event) => console.log('key up') });
1835
- *
1836
- * @overload
1837
- * @template Target The target element type
1838
- * @param {UseKeyboardOptions} [options] The keyboard event options
1839
- * @returns {{ ref: StateRef<Target> }} An object containing the ref
1840
- *
1841
- * @example
1842
- * const ref = useKeyboard({ onKeyDown: (event) => console.log('key down'), onKeyUp: (event) => console.log('key up') });
1843
- */
1844
- declare const useKeyboard: UseKeyboard;
1845
-
1846
- /** The key or keys to listen for */
1847
- type UseKeyPressKey = string | string[];
1848
- /** The callback function to be invoked when key is pressed */
1849
- type UseKeyPressCallback = (pressed: boolean, event: KeyboardEvent) => void;
1850
- interface UseKeyPress {
1851
- (target: HookTarget$1 | Window, key: UseKeyPressKey, callback?: UseKeyPressCallback): boolean;
1852
- <Target extends Element>(key: UseKeyPressKey, callback?: UseKeyPressCallback, target?: never): {
1853
- pressed: boolean;
1854
- ref: StateRef<Target>;
1855
- };
1856
- }
1857
- /**
1858
- * @name useKeyPress
1859
- * @description - Hook that listens for key press events
1860
- * @category Sensors
1861
- *
1862
- * @overload
1863
- * @param {HookTarget} [target=window] The target to attach the event listeners to
1864
- * @param {UseKeyPressKey} key The key or keys to listen for
1865
- * @param {(pressed: boolean, event: KeyboardEvent) => void} [callback] Callback function invoked when key is pressed
1866
- * @returns {boolean} The pressed state of the key
1867
- *
1868
- * @example
1869
- * const isKeyPressed = useKeyPress('a', window);
1870
- *
1871
- * @overload
1872
- * @template Target The target element type
1873
- * @param {UseKeyPressKey} key The key or keys to listen for
1874
- * @param {(pressed: boolean, event: KeyboardEvent) => void} [callback] Callback function invoked when key is pressed
1875
- * @returns {{ pressed: boolean; ref: StateRef<Target> }} An object containing the pressed state and ref
1876
- *
1877
- * @example
1878
- * const { pressed, ref } = useKeyPress('a');
1879
- */
1880
- declare const useKeyPress: UseKeyPress;
1881
-
1882
- /** The key or keys to listen for */
1883
- type UseKeyPressEventKey = string | string[];
1884
- /** The use key press event options type */
1885
- interface UseKeyPressEventOptions {
1886
- /** Whether the event should be captured */
1887
- capture?: boolean;
1888
- /** Whether the event listener should only be triggered once */
1889
- once?: boolean;
1890
- /** Whether the event listener should be passive */
1891
- passive?: boolean;
1892
- }
1893
- interface UseKeyPressEvent {
1894
- (target: HookTarget$1 | Window, key: UseKeyPressEventKey, listener: (event: KeyboardEvent) => void, options?: UseKeyPressEventOptions): void;
1895
- <Target extends Element>(key: UseKeyPressEventKey, listener: (event: KeyboardEvent) => void, options?: UseKeyPressEventOptions, target?: never): {
1896
- ref: StateRef<Target>;
1897
- };
1898
- }
1899
- /**
1900
- * @name useKeyPressEvent
1901
- * @description - Hook that listens for key press events on specified targets
1902
- * @category Sensors
1903
- *
1904
- * @overload
1905
- * @param {UseKeyPressEventKey} key The key or array of keys to listen for.
1906
- * @param {HookTarget | Window} target The target to attach the event listener to.
1907
- * @param {(event: KeyboardEvent) => void} listener The callback function to be executed when the specified key or keys are pressed.
1908
- * @param {UseKeyPressEventOptions} [options] The options for the event listener.
1909
- * @returns {void}
1910
- *
1911
- * @example
1912
- * useKeyPressEvent(ref, 'Enter', () => console.log('pressed'));
1913
- *
1914
- * @overload
1915
- * @template Target extends Element
1916
- * @param {UseKeyPressEventKey} key The key or array of keys to listen for.
1917
- * @param {(event: KeyboardEvent) => void} listener The callback function to be executed when the specified key or keys are pressed.
1918
- * @param {UseKeyPressEventOptions} [options] The options for the event listener.
1919
- * @returns {{ ref: StateRef<Target> }} An object containing the ref
1920
- *
1921
- * @example
1922
- * const ref = useKeyPressEvent('Enter', (event) => console.log('pressed'));
1923
- */
1924
- declare const useKeyPressEvent: UseKeyPressEvent;
1925
-
1926
- /** The use keys pressed options type */
1927
- interface UseKeysPressedOptions {
1928
- /** Enable or disable the event listeners */
1929
- enabled?: boolean;
1930
- }
1931
- interface UseKeysPressed {
1932
- (target: HookTarget$1 | Window, options?: UseKeysPressedOptions): Array<{
1933
- key: string;
1934
- code: string;
1935
- }>;
1936
- <Target extends Element>(options?: UseKeysPressedOptions): {
1937
- value: Array<{
1938
- key: string;
1939
- code: string;
1940
- }>;
1941
- ref: StateRef<Target>;
1942
- };
1943
- }
1944
- /**
1945
- * Hook that tracks which keyboard keys are currently pressed
1946
- *
1947
- * @name useKeysPressed
1948
- * @description Tracks all currently pressed keyboard keys and their codes
1949
- * @category Sensors
1950
- *
1951
- * @overload
1952
- * @param {HookTarget | Window} target DOM element or ref to attach keyboard listeners to
1953
- * @param {UseKeysPressedOptions} [options.enabled=true] Enable or disable the event listeners
1954
- * @returns {Array<{ key: string; code: string }>} Array of currently pressed keys with their key and code values
1955
- *
1956
- * @example
1957
- * const pressedKeys = useKeysPressed(ref);
1958
- *
1959
- * @overload
1960
- * @template Target - Type of the target DOM element
1961
- * @param {UseKeysPressedOptions} [options] - Optional configuration options
1962
- * @returns {{ keys: Array<{ key: string; code: string }>; ref: StateRef<Target> }} Object containing pressed keys array and ref to attach to a DOM element
1963
- *
1964
- * @example
1965
- * const { value, ref } = useKeysPressed();
1966
- */
1967
- declare const useKeysPressed: UseKeysPressed;
1968
-
1969
- /** The use last changed options type */
1970
- interface UseLastChangedOptions {
1971
- initialValue?: number;
1972
- }
1973
- /**
1974
- * @name useLastChanged
1975
- * @description - Hook for records the timestamp of the last change
1976
- * @category Time
1977
- *
1978
- * @param {any} source The source of the last change
1979
- * @param {number | null} [options.initialValue=null] The initial value
1980
- * @returns {number | null} Return timestamp of the last change
1981
- *
1982
- * @example
1983
- * const lastChanged = useLastChanged(source);
1984
- */
1985
- declare const useLastChanged: (source: any, options?: UseLastChangedOptions) => number | null;
1986
-
1987
- /**
1988
- * @name useLatest
1989
- * @description - Hook that returns the stable reference of the value
1990
- * @category Utilities
1991
- *
1992
- * @template Value The type of the value
1993
- * @param {Value} value The value to get the previous value
1994
- * @returns {Value} The previous value
1995
- *
1996
- * @example
1997
- * const latestValue = useLatest(value);
1998
- */
1999
- declare const useLatest: <Value>(value: Value) => Value;
2000
-
2001
- /**
2002
- * @name useLess
2003
- * @description - Hook that can be so useless
2004
- * @category Humor
2005
- *
2006
- * @warning - This hook is a joke. Please do not use it in production code!
2007
- *
2008
- * @template Value The type of the value
2009
- * @param {Value} [value] The value to be returned
2010
- * @returns {Value} The value passed to the hook
2011
- *
2012
- * @example
2013
- * const value = useLess(state);
2014
- */
2015
- declare const useLess: <Value>(value?: Value) => Value | undefined;
2016
-
2017
- /** The use list return type */
2018
- interface UseListReturn<Item> {
2019
- /** The current list of items */
2020
- value: Item[];
2021
- /** Clears the list */
2022
- clear: () => void;
2023
- /** Inserts an item at the specified index */
2024
- insertAt: (insertAtIndex: number, item: Item) => void;
2025
- /** Adds an item to the list */
2026
- push: (item: Item) => void;
2027
- /** Removes an item from the list */
2028
- removeAt: (removeAtIndex: number) => void;
2029
- /** Sets the list of items */
2030
- set: (list: Item[]) => void;
2031
- /** Updates an item at the specified index */
2032
- updateAt: (updateAtIndex: number, item: Item) => void;
2033
- }
2034
- /**
2035
- * @name useList
2036
- * @description - Hook that provides state and helper methods to manage a list of items
2037
- * @category Utilities
2038
- *
2039
- * @template Item The type of the item
2040
- * @param {Item[] | (() => Item[])} initialList The initial list of items
2041
- * @returns {UseListReturn} An object containing the current list and functions to interact with the list
2042
- *
2043
- * @example
2044
- * const { value, set, push, removeAt, insertAt, updateAt, clear } = useList();
2045
- */
2046
- declare const useList: <Item>(initialList?: Item[]) => {
2047
- value: Item[];
2048
- set: react.Dispatch<react.SetStateAction<Item[]>>;
2049
- push: (item: Item) => void;
2050
- removeAt: (removeAtIndex: number) => void;
2051
- insertAt: (insertAtIndex: number, item: Item) => void;
2052
- updateAt: (updateAtIndex: number, item: Item) => void;
2053
- clear: () => void;
2054
- reset: () => void;
2055
- };
2056
-
2057
- type UseStorageInitialValue<Value> = (() => Value) | Value;
2058
- interface UseStorageOptions<Value> {
2059
- initialValue?: UseStorageInitialValue<Value>;
2060
- storage?: Storage;
2061
- deserializer?: (value: string) => Value;
2062
- serializer?: (value: Value) => string;
2063
- }
2064
- interface UseStorageReturn<Value> {
2065
- value: Value;
2066
- remove: () => void;
2067
- set: (value: Value) => void;
2068
- }
2069
- declare const STORAGE_EVENT = "reactuse-storage";
2070
- declare const dispatchStorageEvent: (params: Partial<StorageEvent>) => boolean;
2071
- /**
2072
- * @name useStorage
2073
- * @description - Hook that manages storage value
2074
- * @category Browser
2075
- *
2076
- * @overload
2077
- * @param {string} key The key of the storage
2078
- * @param {UseStorageInitialValue<Value>} [initialValue] The initial value of the storage
2079
- * @returns {UseStorageReturn<Value>} The value and the set function
2080
- *
2081
- * @overload
2082
- * @param {string} key The key of the storage
2083
- * @param {(value: Value) => string} [params.serializer] The serializer function
2084
- * @param {(value: string) => Value} [params.deserializer] The deserializer function
2085
- * @param {Storage} [params.storage] The storage
2086
- * @param {UseStorageInitialValue<Value>} [params.initialValue] The initial value of the storage
2087
- * @returns {UseStorageReturn<Value>} The value and the set function
2088
- *
2089
- * @example
2090
- * const { value, set, remove } = useStorage('key', 'value');
2091
- */
2092
- declare const useStorage: <Value>(key: string, params?: UseStorageInitialValue<Value> | UseStorageOptions<Value>) => {
2093
- value: Value | undefined;
2094
- set: (value: Value) => void;
2095
- remove: () => void;
2096
- };
2097
-
2098
- /**
2099
- * @name useLocalStorage
2100
- * @description - Hook that manages local storage value
2101
- * @category Browser
2102
- *
2103
- * @browserapi localStorage https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage
2104
- *
2105
- * @template Value The type of the value
2106
- * @param {string} key The key of the storage
2107
- * @param {UseStorageInitialValue<Value>} [initialValue] The initial value of the storage
2108
- * @param {UseStorageOptions<Value>} [options] The options of the storage
2109
- *
2110
- * @example
2111
- * const { value, set, remove } = useLocalStorage('key', 'value');
2112
- */
2113
- declare const useLocalStorage: <Value>(key: string, initialValue?: UseStorageInitialValue<Value>, options?: Omit<UseStorageOptions<Value>, "initialValue" | "storage">) => {
2114
- value: Value | undefined;
2115
- set: (value: Value) => void;
2116
- remove: () => void;
2117
- };
2118
-
2119
- /**
2120
- * @name useLockCallback
2121
- * @description - Hook that prevents a callback from being executed multiple times simultaneously
2122
- * @category Utilities
2123
- *
2124
- * @param {Function} callback The callback to be locked
2125
- * @returns {Function} The locked callback
2126
- *
2127
- * @example
2128
- * const lockedCallback = useLockCallback(() => promise());
2129
- */
2130
- declare const useLockCallback: <Callback extends (...args: any[]) => any>(callback: Callback) => (...args: Parameters<Callback>) => Promise<any>;
2131
-
2132
- /**
2133
- * @name useLogger
2134
- * @description - Hook for debugging lifecycle
2135
- * @category Lifecycle
2136
- *
2137
- * @param {string} name The name or identifier for the logger
2138
- * @param {unknown[]} params Additional arguments to be logged
2139
- *
2140
- * @example
2141
- * useLogger('Component', [1, 2, 3]);
2142
- */
2143
- declare const useLogger: (name: string, params: unknown[]) => void;
2144
-
2145
- type UseLongPressTarget = (() => Element) | Element | RefObject<Element | null | undefined>;
2146
- type LongPressReactEvents<Target extends Element = Element> = MouseEventHandler<Target> | TouchEventHandler<Target>;
2147
- interface UseLongPressOptions {
2148
- threshold?: number;
2149
- onCancel?: (event: LongPressReactEvents) => void;
2150
- onFinish?: (event: LongPressReactEvents) => void;
2151
- onStart?: (event: LongPressReactEvents) => void;
2152
- }
2153
- interface UseLongPressBind {
2154
- /** The callback function to be invoked on mouse down */
2155
- onMouseDown: MouseEventHandler<Element>;
2156
- /** The callback function to be invoked on mouse up */
2157
- onMouseUp: MouseEventHandler<Element>;
2158
- /** The callback function to be invoked on touch end */
2159
- onTouchEnd: TouchEventHandler<Element>;
2160
- /** The callback function to be invoked on touch start */
2161
- onTouchStart: TouchEventHandler<Element>;
2162
- }
2163
- type UseLongPressReturn = [UseLongPressBind, boolean];
2164
- /**
2165
- * @name useLongPress
2166
- * @description - Hook that defines the logic when long pressing an element
2167
- * @category Sensors
2168
- *
2169
- * @template Target The target element
2170
- * @param {Target} target The target element to be long pressed
2171
- * @param {(event: Event) => void} callback The callback function to be invoked on long press
2172
- * @param {number} [options.threshold=400] The threshold time in milliseconds
2173
- * @param {(event: Event) => void} [options.onStart] The callback function to be invoked on long press start
2174
- * @param {(event: Event) => void} [options.onFinish] The callback function to be invoked on long press finish
2175
- * @param {(event: Event) => void} [options.onCancel] The callback function to be invoked on long press cancel
2176
- * @returns {UseLongPressReturn<Target>} The ref of the target element
2177
- *
2178
- * @example
2179
- * const [bind, longPressing] = useLongPress(() => console.log('callback'));
2180
- */
2181
- declare const useLongPress: (callback: (event: LongPressReactEvents) => void, options?: UseLongPressOptions) => UseLongPressReturn;
2182
-
2183
- /** The use map return type */
2184
- interface UseMapReturn<Key, Value> {
2185
- /** The size of the map */
2186
- size: number;
2187
- /** The current map */
2188
- value: Map<Key, Value>;
2189
- /** Function to clear the map */
2190
- clear: () => void;
2191
- /** Function to check if a value exists in the map */
2192
- has: (key: Key) => boolean;
2193
- /** Function to remove a value from the map */
2194
- remove: (key: Key) => void;
2195
- /** Function to toggle a value in the map */
2196
- reset: () => void;
2197
- /** Function to add a value to the map */
2198
- set: (key: Key, value: Value) => void;
2199
- }
2200
- /**
2201
- * @name useMap
2202
- * @description - Hook that manages a map structure
2203
- * @category Utilities
2204
- *
2205
- * @template Value The type of the value
2206
- * @param {Value[]} [values] The initial array of the map
2207
- * @returns {UseMapReturn<Key, Value>} An object containing the current map and functions to interact with the map
2208
- *
2209
- * @example
2210
- * const { value, set, remove, clear, reset, size, has } = useMap([1, 'one'], [2, 'two']);
2211
- */
2212
- declare const useMap: <Key, Value>(values?: [Key, Value][]) => UseMapReturn<Key, Value>;
2213
-
2214
- /** The use measure return type */
2215
- type UseMeasureReturn = Pick<DOMRectReadOnly, 'bottom' | 'height' | 'left' | 'right' | 'top' | 'width' | 'x' | 'y'>;
2216
- interface UseMeasure {
2217
- (target: HookTarget$1): UseMeasureReturn;
2218
- <Target extends Element>(target?: never): UseMeasureReturn & {
2219
- ref: StateRef<Target>;
2220
- };
2221
- }
2222
- /**
2223
- * @name useMeasure
2224
- * @description - Hook to measure the size and position of an element
2225
- * @category Browser
2226
- *
2227
- * @overload
2228
- * @param {HookTarget} target The element to measure
2229
- * @returns {UseMeasureReturn} The element's size and position
2230
- *
2231
- * @example
2232
- * const { x, y, width, height, top, left, bottom, right } = useMeasure(ref);
2233
- *
2234
- * @overload
2235
- * @template Target The element to measure
2236
- * @returns {UseMeasureReturn & { ref: StateRef<Target> }} The element's size and position
2237
- *
2238
- * @example
2239
- * const { ref, x, y, width, height, top, left, bottom, right } = useMeasure();
2240
- */
2241
- declare const useMeasure: UseMeasure;
2242
-
2243
- /**
2244
- * @name useMediaQuery
2245
- * @description - Hook that manages a media query
2246
- * @category Browser
2247
- *
2248
- * @browserapi window.matchMedia https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia
2249
- *
2250
- * @param {string} query The media query string
2251
- * @returns {boolean} A boolean indicating if the media query matches
2252
- *
2253
- * @example
2254
- * const matches = useMediaQuery('(max-width: 768px)');
2255
- */
2256
- declare const useMediaQuery: (query: string) => boolean;
2257
-
2258
- declare global {
2259
- interface Performance {
2260
- memory: {
2261
- readonly jsHeapSizeLimit: number;
2262
- readonly totalJSHeapSize: number;
2263
- readonly usedJSHeapSize: number;
2264
- };
2265
- }
2266
- }
2267
- /** The use memory return type */
2268
- interface UseMemoryReturn {
2269
- /** The memory supported status */
2270
- supported: boolean;
2271
- /** The current memory usage */
2272
- value: Performance['memory'];
2273
- }
2274
- /**
2275
- * @name useMemory
2276
- * @description - Hook that gives you current memory usage
2277
- * @category Browser
2278
- *
2279
- * @browserapi performance.memory https://developer.mozilla.org/en-US/docs/Web/API/Performance/memory
2280
- *
2281
- * @returns {UseMemoryReturn} An object containing the current memory usage
2282
- *
2283
- * @example
2284
- * const { supported, value } = useMemory();
2285
- */
2286
- declare const useMemory: () => UseMemoryReturn;
2287
-
2288
- /**
2289
- * @name useMount
2290
- * @description - Hook that executes a callback when the component mounts
2291
- * @category Lifecycle
2292
- *
2293
- * @param {EffectCallback} effect The callback to execute
2294
- *
2295
- * @example
2296
- * useMount(() => console.log('This effect runs on the initial render'));
2297
- */
2298
- declare const useMount: (effect: EffectCallback) => void;
2299
-
2300
- /** The use mouse return type */
2301
- interface UseMouseReturn {
2302
- /** The current element */
2303
- element?: Element;
2304
- /** The current element position x */
2305
- elementPositionX: number;
2306
- /** The current element position y */
2307
- elementPositionY: number;
2308
- /** The current element x position */
2309
- elementX: number;
2310
- /** The current element y position */
2311
- elementY: number;
2312
- /** The current mouse x position */
2313
- x: number;
2314
- /** The current mouse y position */
2315
- y: number;
2316
- }
2317
- interface UseMouse {
2318
- (target: HookTarget$1): UseMouseReturn;
2319
- <Target extends Element>(target?: never): UseMouseReturn & {
2320
- ref: StateRef<Target>;
2321
- };
2322
- }
2323
- /**
2324
- * @name useMouse
2325
- * @description - Hook that manages a mouse position
2326
- * @category Sensors
2327
- *
2328
- * @overload
2329
- * @param {HookTarget} target The target element to manage the mouse position for
2330
- * @returns {UseMouseReturn} An object with the current mouse position
2331
- *
2332
- * @example
2333
- * const { x, y, elementX, elementY, elementPositionX, elementPositionY } = useMouse(ref);
2334
- *
2335
- * @overload
2336
- * @template Target The target element
2337
- * @returns {UseMouseReturn & { ref: StateRef<Target> }} An object with the current mouse position and a ref
2338
- *
2339
- * @example
2340
- * const { ref, x, y, elementX, elementY, elementPositionX, elementPositionY } = useMouse();
2341
- */
2342
- declare const useMouse: UseMouse;
2343
-
2344
- interface UseMutationOptions<Data> {
2345
- retry?: ((failureCount: number, error: Error) => boolean) | boolean | number;
2346
- retryDelay?: ((retry: number, error: Error) => number) | number;
2347
- onError?: (error: Error) => void;
2348
- onSuccess?: (data: Data) => void;
2349
- }
2350
- interface UseMutationReturn<Body, Data> {
2351
- data: Data | null;
2352
- error: Error | null;
2353
- isError: boolean;
2354
- isLoading: boolean;
2355
- isSuccess: boolean;
2356
- mutate: (body?: Body, options?: UseMutationOptions<Data>) => void;
2357
- mutateAsync: (body?: Body, options?: UseMutationOptions<Data>) => Promise<Data>;
2358
- }
2359
- interface RequestOptions<Data> extends UseMutationOptions<Data> {
2360
- attempt?: number;
2361
- }
2362
- /**
2363
- * @name useMutation
2364
- * @description - Hook that defines the logic when mutate data
2365
- * @category Utilities
2366
- *
2367
- * @template Body The type of the body
2368
- * @template Data The type of the data
2369
- * @param {(body: Body) => Promise<Data>} callback The callback function to be invoked
2370
- * @param {boolean | number} [options.retry] The retry count of requests
2371
- * @param {(data: Data) => void} [options.onSuccess] The callback function to be invoked on success
2372
- * @param {(error: Error) => void} [options.onError] The callback function to be invoked on error
2373
- * @returns {UseMutationReturn<Data>} An object with the state of the mutation
2374
- *
2375
- * @example
2376
- * const { mutate, mutateAsync, isLoading, isError, isSuccess, error, data } = useMutation((name) => Promise.resolve(name));
2377
- */
2378
- declare const useMutation: <Body, Data>(callback: (body: Body) => Promise<Data>, options?: UseMutationOptions<Data>) => UseMutationReturn<Body, Data>;
2379
-
2380
- /** The mutation observer target element type */
2381
- type UseMutationObserverTarget = HookTarget$1;
2382
- /** The mutation observer return type */
2383
- interface UseMutationObserverReturn {
2384
- /** The mutation observer instance */
2385
- observer: MutationObserver;
2386
- /** The mutation observer entries */
2387
- stop: () => void;
2388
- }
2389
- /** The mutation observer options type */
2390
- interface UseMutationObserverOptions extends MutationObserverInit {
2391
- /** The enabled state of the mutation observer */
2392
- enabled?: boolean;
2393
- }
2394
- interface UseMutationObserver {
2395
- (target: HookTarget$1, callback: MutationCallback, options?: UseMutationObserverOptions): UseMutationObserverReturn;
2396
- <Target extends Element>(callback: MutationCallback, options?: UseMutationObserverOptions, target?: never): UseMutationObserverReturn & {
2397
- ref: StateRef<Target>;
2398
- };
2399
- }
2400
- /**
2401
- * @name useMutationObserver
2402
- * @description - Hook that gives you mutation observer state
2403
- * @category Browser
2404
- *
2405
- * @overload
2406
- * @template Target The target element
2407
- * @param {MutationCallback} callback The callback to execute when mutation is detected
2408
- * @param {boolean} [options.enabled=true] The enabled state of the mutation observer
2409
- * @param {boolean} [options.attributes] Set to true if mutations to target's attributes are to be observed
2410
- * @param {boolean} [options.characterData] Set to true if mutations to target's data are to be observed
2411
- * @param {boolean} [options.childList] Set to true if mutations to target's children are to be observed
2412
- * @param {boolean} [options.subtree] Set to true if mutations to not just target, but also target's descendants are to be observed
2413
- * @param {boolean} [options.characterDataOldValue] Set to true if characterData is set to true or omitted and target's data before the mutation needs to be recorded
2414
- * @param {boolean} [options.attributeOldValue] Set to a list of attribute local names (without namespace) if not all attribute mutations need to be observed and attributes is true or omitted
2415
- * @param {string[]} [options.attributeFilter] Set to a list of attribute local names (without namespace) if not all attribute mutations need to be observed and attributes is true or omitted
2416
- * @returns {UseMutationObserverReturn & { ref: StateRef<Target> }} An object containing the mutation observer state
2417
- *
2418
- * @example
2419
- * const { ref, observer, stop } = useMutationObserver(() => console.log('callback'))
2420
- *
2421
- * @overload
2422
- * @param {HookTarget} target The target element to observe
2423
- * @param {MutationCallback} callback The callback to execute when mutation is detected
2424
- * @param {boolean} [options.enabled=true] The enabled state of the mutation observer
2425
- * @param {boolean} [options.attributes] Set to true if mutations to target's attributes are to be observed
2426
- * @param {boolean} [options.characterData] Set to true if mutations to target's data are to be observed
2427
- * @param {boolean} [options.childList] Set to true if mutations to target's children are to be observed
2428
- * @param {boolean} [options.subtree] Set to true if mutations to not just target, but also target's descendants are to be observed
2429
- * @param {boolean} [options.characterDataOldValue] Set to true if characterData is set to true or omitted and target's data before the mutation needs to be recorded
2430
- * @param {boolean} [options.attributeOldValue] Set to a list of attribute local names (without namespace) if not all attribute mutations need to be observed and attributes is true or omitted
2431
- * @param {string[]} [options.attributeFilter] Set to a list of attribute local names (without namespace) if not all attribute mutations need to be observed and attributes is true or omitted
2432
- * @returns {UseMutationObserverReturn} An object containing the mutation observer state
2433
- *
2434
- * @example
2435
- * const { observer, stop } = useMutationObserver(ref, () => console.log('callback'))
2436
- */
2437
- declare const useMutationObserver: UseMutationObserver;
2438
-
2439
- interface Connection extends EventTarget {
2440
- readonly downlink: number;
2441
- readonly downlinkMax: number;
2442
- readonly effectiveType: '2g' | '3g' | '4g' | 'slow-2g';
2443
- readonly rtt: number;
2444
- readonly saveData: boolean;
2445
- onChange: (event: Event) => void;
2446
- readonly type: 'bluetooth' | 'cellular' | 'ethernet' | 'mixed' | 'none' | 'other' | 'unknown' | 'wifi' | 'wimax';
2447
- }
2448
- declare global {
2449
- interface Navigator {
2450
- readonly connection: Connection;
2451
- readonly mozConnection: Connection;
2452
- readonly webkitConnection: Connection;
2453
- }
2454
- }
2455
- /** The type of network connection */
2456
- type ConnectionType = Connection['type'];
2457
- /** The effective type of connection */
2458
- type ConnectionEffectiveType = Connection['effectiveType'];
2459
- /** The use network return type */
2460
- interface UseNetworkReturn {
2461
- /** The estimated downlink speed in megabits per seconds */
2462
- downlink?: Connection['downlink'];
2463
- /** The maximum downlink speed, if available */
2464
- downlinkMax?: Connection['downlinkMax'];
2465
- /** The effective type of connection (e.g., '2g', '3g', '4g') */
2466
- effectiveType?: Connection['effectiveType'];
2467
- /** Indicates if the device is currently online */
2468
- online: boolean;
2469
- /** The estimated round-trip time in milliseconds */
2470
- rtt?: Connection['rtt'];
2471
- /** Indicates if the user has enabled data saving mode */
2472
- saveData?: Connection['saveData'];
2473
- /** The type of network connection (e.g., 'wifi', 'cellular') */
2474
- type?: Connection['type'];
2475
- }
2476
- declare const getConnection: () => Connection;
2477
- /**
2478
- * @name useNetwork
2479
- * @description - Hook to track network status
2480
- * @category Sensors
2481
- *
2482
- * @browserapi navigator.connection https://developer.mozilla.org/en-US/docs/Web/API/Navigator/connection
2483
- *
2484
- * @returns {UseNetworkReturn} An object containing the network status
2485
- *
2486
- * @example
2487
- * const { online, downlink, downlinkMax, effectiveType, rtt, saveData, type } = useNetwork();
2488
- */
2489
- declare const useNetwork: () => UseNetworkReturn;
2490
-
2491
- /** The use offset pagination return type */
2492
- interface UseOffsetPaginationOptions {
2493
- /** The initial page number */
2494
- initialPage?: number;
2495
- /** The number of items per page */
2496
- pageSize?: number;
2497
- /** The total number of items */
2498
- total?: number;
2499
- /** The callback function to be invoked when page changes */
2500
- onPageChange?: ({ page, pageSize }: {
2501
- page: number;
2502
- pageSize: number;
2503
- }) => void;
2504
- /** The callback function to be invoked when page count changes */
2505
- onPageCountChange?: ({ page, pageSize }: {
2506
- page: number;
2507
- pageSize: number;
2508
- }) => void;
2509
- /** The callback function to be invoked when page size changes */
2510
- onPageSizeChange?: ({ page, pageSize }: {
2511
- page: number;
2512
- pageSize: number;
2513
- }) => void;
2514
- }
2515
- /** The use offset pagination return type */
2516
- interface UseOffsetPaginationReturn {
2517
- /** The number of items per page */
2518
- currentPageSize: number;
2519
- /** Whether the current page is the first page */
2520
- isFirstPage: boolean;
2521
- /** Whether the current page is the last page */
2522
- isLastPage: boolean;
2523
- /** The current page number */
2524
- page: number;
2525
- /** The total number of pages */
2526
- pageCount: number;
2527
- /** The callback function to go to the next page */
2528
- next: () => void;
2529
- /** The callback function to go to the previous page */
2530
- prev: () => void;
2531
- /** The callback function to set the current page */
2532
- set: (page: number) => void;
2533
- }
2534
- /**
2535
- * @name useOffsetPagination
2536
- * @description - Hook that defines the logic when pagination
2537
- * @category Utilities
2538
- *
2539
- * @param {UseOffsetPaginationOptions} options - The options for the hook
2540
- * @param {number} [options.total] - The total number of items
2541
- * @param {number} [options.pageSize] - The number of items per page
2542
- * @param {number} [options.initialPage] - The current page
2543
- * @param {({ page, pageSize }: { page: number; pageSize: number }) => void} [options.onPageChange] - The callback function to be invoked when page changes
2544
- * @param {({ page, pageSize }: { page: number; pageSize: number }) => void} [options.onPageCountChange] - The callback function to be invoked when page count changes
2545
- * @param {({ page, pageSize }: { page: number; pageSize: number }) => void} [options.onPageSizeChange] - The callback function to be invoked when page size changes
2546
- * @returns {UseOffsetPaginationReturn} - The state of the hook
2547
- *
2548
- * @example
2549
- * const { currentPage, currentPageSize, pageCount, isFirstPage, isLastPage, prev, next } = useOffsetPagination({
2550
- * total: 100,
2551
- * pageSize: 10,
2552
- * page: 1,
2553
- * onPageChange: (page) => {},
2554
- * onPageCountChange: (pageCount) => {},
2555
- * onPageSizeChange: (pageSize) => {}
2556
- * });
2557
- */
2558
- declare const useOffsetPagination: ({ total, pageSize, initialPage, onPageChange, onPageCountChange, onPageSizeChange }?: UseOffsetPaginationOptions) => UseOffsetPaginationReturn;
2559
-
2560
- /**
2561
- * @name useOnline
2562
- * @description - Hook that manages if the user is online
2563
- * @category Sensors
2564
- *
2565
- * @browserapi navigator.onLine https://developer.mozilla.org/en-US/docs/Web/API/Navigator/onLine
2566
- *
2567
- * @returns {boolean} A boolean indicating if the user is online
2568
- *
2569
- * @example
2570
- * const online = useOnline();
2571
- */
2572
- declare const useOnline: () => boolean;
2573
-
2574
- /** The operating system type */
2575
- type OperatingSystem = 'android' | 'ios' | 'linux' | 'macos' | 'undetermined' | 'windows';
2576
- declare const getOperatingSystem: () => OperatingSystem;
2577
- /**
2578
- * @name useOperatingSystem
2579
- * @description - Hook that returns the operating system of the current browser
2580
- * @category Browser
2581
- *
2582
- * @returns {OperatingSystem} The operating system
2583
- *
2584
- * @example
2585
- * const operatingSystem = useOperatingSystem();
2586
- */
2587
- declare const useOperatingSystem: () => OperatingSystem;
2588
-
2589
- type UseOptimisticReturn<State> = [
2590
- State,
2591
- (optimisticValue: State, promise: Promise<any>) => void
2592
- ];
2593
- /**
2594
- * @name useOptimistic
2595
- * @description - Hook that allows get optimistic value before its update
2596
- * @category Utilities
2597
- *
2598
- * @template State The type of the state
2599
- * @param {State} state The value to be returned initially and whenever no action is pending
2600
- * @param {(currentState: State, optimisticValue: State) => State} update A pure function that takes the current state and the optimistic value passed to updateOptimistic and returns the resulting optimistic state
2601
- * @returns {UseOptimisticReturn<State>} The resulting optimistic state, and the function to update it
2602
- *
2603
- * @example
2604
- * const [optimisticValue, updateOptimistic] = useOptimistic<number>(count, (currentState, optimisticValue) => currentState + optimisticValue);
2605
- */
2606
- declare const useOptimistic: <State, OptimisticState = State>(externalState: State, update: (currentState: State, optimisticState: OptimisticState) => State) => readonly [State, (optimisticValue: OptimisticState, promise: Promise<any>) => Promise<any>];
2607
-
2608
- /** The use orientation return type */
2609
- interface UseOrientationReturn {
2610
- /** The current screen orientation angle */
2611
- angle: number;
2612
- /** The screen orientation type */
2613
- type: OrientationType;
2614
- }
2615
- /**
2616
- * @name useOrientation
2617
- * @description - Hook that returns the current screen orientation
2618
- * @category Browser
2619
- *
2620
- * @browserapi window.screen.orientation https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation
2621
- *
2622
- * @returns {UseOrientationReturn} An object containing the current screen orientation
2623
- *
2624
- * @example
2625
- * const { angle, type } = useOrientation();
2626
- */
2627
- declare const useOrientation: () => UseOrientationReturn;
2628
-
2629
- declare global {
2630
- interface OTPOptions {
2631
- readonly transport: string[];
2632
- }
2633
- interface CredentialRequestOptions {
2634
- readonly otp: OTPOptions;
2635
- }
2636
- interface Credential {
2637
- readonly code: string;
2638
- }
2639
- }
2640
- type UseOtpCredentialCallback = (otp: Credential | null) => void;
2641
- interface UseOtpCredentialParams {
2642
- onError: (error: any) => void;
2643
- onSuccess: (credential: Credential | null) => void;
2644
- }
2645
- interface UseOtpCredentialReturn {
2646
- abort: AbortController['abort'];
2647
- aborted: boolean;
2648
- supported: boolean;
2649
- get: () => Promise<Credential | null>;
2650
- }
2651
- interface UseOtpCredential {
2652
- (callback?: UseOtpCredentialCallback): UseOtpCredentialReturn;
2653
- (params?: UseOtpCredentialParams): UseOtpCredentialReturn;
2654
- }
2655
- /**
2656
- * @name useOtpCredential
2657
- * @description - Hook that creates an otp credential
2658
- * @category Browser
2659
- *
2660
- * @browserapi navigator.credentials https://developer.mozilla.org/en-US/docs/Web/API/Navigator/credentials
2661
- *
2662
- * @overload
2663
- * @param {UseOtpCredentialCallback} callback The callback function to be invoked
2664
- * @returns {UseOtpCredentialReturn}
2665
- *
2666
- * @example
2667
- * useOtpCredential((credential) => console.log(credential));
2668
- *
2669
- * @overload
2670
- * @param {UseOtpCredentialCallback} params.onSuccess The callback function to be invoked on success
2671
- * @param {UseOtpCredentialCallback} params.onError The callback function to be invoked on error
2672
- * @returns {UseOtpCredentialReturn}
2673
- *
2674
- * @example
2675
- * useOtpCredential({ onSuccess: (credential) => console.log(credential), onError: (error) => console.log(error) });
2676
- */
2677
- declare const useOtpCredential: UseOtpCredential;
2678
-
2679
- /**
2680
- * @name usePageLeave
2681
- * @description - Hook what calls given function when mouse leaves the page
2682
- * @category Sensors
2683
- *
2684
- * @param {() => void} [callback] The callback function what calls then mouse leaves the page
2685
- * @returns {boolean} A boolean which determines if the mouse left the page
2686
- *
2687
- * @example
2688
- * const isLeft = usePageLeave(() => console.log('on leave'))
2689
- */
2690
- declare const usePageLeave: (callback?: () => void) => boolean;
2691
-
2692
- interface Point {
2693
- x: number;
2694
- y: number;
2695
- }
2696
- declare class Pointer implements Point {
2697
- x: number;
2698
- y: number;
2699
- constructor(x: number, y: number);
2700
- update(point: Point): void;
2701
- getDifferenceTo(point: Point): Pointer;
2702
- getDistanceTo(point: Point): number;
2703
- getAngleTo(point: Point): number;
2704
- equalsTo(point: Point): boolean;
2705
- moveByAngle(angle: number, distance: number): this;
2706
- }
2707
- declare class Paint {
2708
- pointer: Pointer;
2709
- brush: Pointer;
2710
- radius: number;
2711
- smooth: boolean;
2712
- points: Point[];
2713
- lines: {
2714
- points: Point[];
2715
- color: string;
2716
- radius: number;
2717
- opacity: number;
2718
- }[];
2719
- constructor({ x, y, radius, smooth }: {
2720
- x: number;
2721
- y: number;
2722
- radius: number;
2723
- smooth: boolean;
2724
- });
2725
- getBrushCoordinates(): {
2726
- x: number;
2727
- y: number;
2728
- };
2729
- getPointerCoordinates(): {
2730
- x: number;
2731
- y: number;
2732
- };
2733
- update(point: Point): boolean;
2734
- }
2735
- interface UsePaintOptions {
2736
- /** Brush color */
2737
- color?: string;
2738
- /** Initial lines */
2739
- initialLines?: Paint['lines'];
2740
- /** Brush opacity */
2741
- opacity?: number;
2742
- /** Brush radius */
2743
- radius?: number;
2744
- /** Smooth brush movement */
2745
- smooth?: boolean;
2746
- /** Callback when the mouse is down */
2747
- onMouseDown?: (event: MouseEvent, paint: Paint) => void;
2748
- /** Callback when the mouse is moved */
2749
- onMouseMove?: (event: MouseEvent, paint: Paint) => void;
2750
- /** Callback when the mouse is up */
2751
- onMouseUp?: (event: MouseEvent, paint: Paint) => void;
2752
- }
2753
- interface UsePaintReturn {
2754
- drawing: boolean;
2755
- lines: Paint['lines'];
2756
- clear: () => void;
2757
- draw: (points: Point[], color: string, opacity: number, radius: number) => void;
2758
- undo: () => void;
2759
- }
2760
- interface UsePaint {
2761
- (target: HookTarget$1, options?: UsePaintOptions): UsePaintReturn;
2762
- <Target extends HTMLCanvasElement>(options?: UsePaintOptions, target?: never): UsePaintReturn & {
2763
- ref: StateRef<Target>;
2764
- };
2765
- }
2766
- /**
2767
- * @name usePaint
2768
- * @description - Hook that allows you to draw in a specific area
2769
- * @category Browser
2770
- *
2771
- * @overload
2772
- * @param {HookTarget} target The target element to be painted
2773
- * @param {UsePaintOptions} [options] The options to be used
2774
- * @returns {UsePaintReturn} An object containing the current pencil options and functions to interact with the paint
2775
- *
2776
- * @example
2777
- * const drawing = usePaint(canvasRef);
2778
- *
2779
- * @overload
2780
- * @param {UsePaintOptions} [options] The options to be used
2781
- * @returns {UsePaintReturn & { ref: StateRef<HTMLCanvasElement> }} An object containing the current pencil options and functions to interact with the paint
2782
- *
2783
- * @example
2784
- * const { ref, drawing } = usePaint();
2785
- */
2786
- declare const usePaint: UsePaint;
2787
-
2788
- /** The use parallax value type */
2789
- interface UseParallaxValue {
2790
- /** Roll value. Scaled to `-0.5 ~ 0.5` */
2791
- roll: number;
2792
- /** Sensor source, can be `mouse` or `deviceOrientation` */
2793
- source: 'deviceOrientation' | 'mouse';
2794
- /** Tilt value. Scaled to `-0.5 ~ 0.5` */
2795
- tilt: number;
2796
- }
2797
- /** The use parallax options type */
2798
- interface UseParallaxOptions {
2799
- /** Device orientation roll adjust function */
2800
- deviceOrientationRollAdjust?: (value: number) => number;
2801
- /** Device orientation tilt adjust function */
2802
- deviceOrientationTiltAdjust?: (value: number) => number;
2803
- /** Mouse roll adjust function */
2804
- mouseRollAdjust?: (value: number) => number;
2805
- /** Mouse tilt adjust function */
2806
- mouseTiltAdjust?: (value: number) => number;
2807
- }
2808
- interface UseParallaxReturn {
2809
- value: UseParallaxValue;
2810
- }
2811
- interface UseParallax {
2812
- (target: HookTarget$1, options?: UseParallaxOptions): UseParallaxReturn;
2813
- <Target extends Element>(options?: UseParallaxOptions, target?: never): UseParallaxReturn & {
2814
- ref: StateRef<Target>;
2815
- };
2816
- }
2817
- /**
2818
- * @name useParallax
2819
- * @description - Hook to help create parallax effect
2820
- * @category Sensors
2821
- *
2822
- * @overload
2823
- * @param {HookTarget} target The target element for the parallax effect
2824
- * @param {UseParallaxOptions} options The options for the parallax effect
2825
- * @returns {UseParallaxReturn} An object of parallax values
2826
- *
2827
- * @example
2828
- * const { value } = useParallax(ref);
2829
- *
2830
- * @overload
2831
- * @template Target The target element for the parallax effect
2832
- * @param {UseParallaxOptions} options The options for the parallax effect
2833
- * @returns {UseParallaxReturn & { ref: StateRef<Target> }} An object of parallax values
2834
- *
2835
- * @example
2836
- * const { ref, value } = useParallax();
2837
- */
2838
- declare const useParallax: UseParallax;
2839
-
2840
- /** The use performance observer options type */
2841
- type UsePerformanceObserverOptions = PerformanceObserverInit & {
2842
- /** Whether to start the observer immediately */
2843
- immediate?: boolean;
2844
- };
2845
- /**
2846
- * @name usePerformanceObserver
2847
- * @description - Hook that allows you to observe performance entries
2848
- * @category Sensors
2849
- *
2850
- * @browserapi PerformanceObserver https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver
2851
- *
2852
- * @param {UsePerformanceObserverOptions} options The options for the performance observer
2853
- * @param {PerformanceObserverCallback} callback The function to handle performance entries
2854
- * @returns {object} An object containing the observer's support status and methods to start and stop the observer
2855
- *
2856
- * @example
2857
- * const { supported, entries, start, stop } = usePerformanceObserver();
2858
- */
2859
- declare const usePerformanceObserver: (options: UsePerformanceObserverOptions, callback?: PerformanceObserverCallback) => {
2860
- supported: boolean;
2861
- entries: PerformanceEntry[];
2862
- start: () => void;
2863
- stop: () => void;
2864
- };
2865
-
2866
- /** The permission name */
2867
- type UsePermissionName = 'accelerometer' | 'accessibility-events' | 'ambient-light-sensor' | 'background-sync' | 'camera' | 'clipboard-read' | 'clipboard-write' | 'gyroscope' | 'magnetometer' | 'microphone' | 'notifications' | 'payment-handler' | 'persistent-storage' | 'push' | 'speaker' | PermissionName;
2868
- /** The use permission options type */
2869
- interface UsePermissionOptions {
2870
- /** Whether the permission is enabled */
2871
- enabled: boolean;
2872
- }
2873
- /** The use permission return type */
2874
- interface UsePermissionReturn {
2875
- /** The permission state */
2876
- state: PermissionState;
2877
- /** The permission supported status */
2878
- supported: boolean;
2879
- /** The permission query function */
2880
- query: () => Promise<PermissionState>;
2881
- }
2882
- /**
2883
- * @name usePermission
2884
- * @description - Hook that gives you the state of permission
2885
- * @category Browser
2886
- *
2887
- * @browserapi navigator.permissions https://developer.mozilla.org/en-US/docs/Web/API/Navigator/permissions
2888
- *
2889
- * @param {UsePermissionName} permissionDescriptorName - The permission name
2890
- * @param {boolean} [options.enabled=true] - Whether the permission is enabled
2891
- * @returns {UsePermissionReturn} An object containing the state and the supported status
2892
- *
2893
- * @example
2894
- * const { state, supported, query } = usePermission('microphone');
2895
- */
2896
- declare const usePermission: (permissionDescriptorName: UsePermissionName, options?: UsePermissionOptions) => {
2897
- state: PermissionState;
2898
- supported: boolean;
2899
- query: () => Promise<PermissionState>;
2900
- };
2901
-
2902
- /** The use pointer lock return type */
2903
- interface UsePointerLockReturn {
2904
- /** The pointer lock element */
2905
- element?: Element;
2906
- /** Whether the pointer lock is supported */
2907
- supported: boolean;
2908
- /** Lock the pointer lock */
2909
- lock: (event: MouseEvent$1) => void;
2910
- /** Unlock the pointer lock */
2911
- unlock: () => boolean;
2912
- }
2913
- /**
2914
- * @name usePointerLock
2915
- * @description - Hook that provides reactive pointer lock
2916
- * @category Sensors
2917
- *
2918
- * @browserapi pointerLockElement https://developer.mozilla.org/en-US/docs/Web/API/Document/pointerLockElement
2919
- *
2920
- * @returns {UsePointerLockReturn} An object containing the pointer lock element and functions to interact with the pointer lock
2921
- *
2922
- * @example
2923
- * const { supported, lock, unlock, element } = usePointerLock();
2924
- */
2925
- declare const usePointerLock: () => UsePointerLockReturn;
2926
-
2927
- type UsePostMessageReturn<Message> = (message: Message) => void;
2928
- /**
2929
- * @name usePostMessage
2930
- * @description - Hook that allows you to receive messages from other origins
2931
- * @category Browser
2932
- *
2933
- * @overload
2934
- * @template Message The message data type
2935
- * @param {string | string[]} origin The origin of the message
2936
- * @param {(message: Message) => Message} callback callback to get received message
2937
- * @returns {(message: Message) => void} An object containing the current message
2938
- *
2939
- * @example
2940
- * const postMessage = usePostMessage();
2941
- */
2942
- declare const usePostMessage: <Message>(origin: string | "*" | string[], callback: (message: Message, event: MessageEvent<Message>) => void) => UsePostMessageReturn<Message>;
2943
-
2944
- /** The use preferred color scheme return type */
2945
- type UsePreferredColorSchemeReturn = 'dark' | 'light' | 'no-preference';
2946
- /**
2947
- * @name usePreferredColorScheme
2948
- * @description - Hook that returns user preferred color scheme
2949
- * @category Browser
2950
- *
2951
- * @returns {UsePreferredColorSchemeReturn} String of preferred color scheme
2952
- *
2953
- * @example
2954
- * const colorScheme = usePreferredColorScheme();
2955
- */
2956
- declare const usePreferredColorScheme: () => UsePreferredColorSchemeReturn;
2957
-
2958
- /** The use preferred contrast return type */
2959
- type UsePreferredContrastReturn = 'custom' | 'less' | 'more' | 'no-preference';
2960
- /**
2961
- * @name usePreferredContrast
2962
- * @description - Hook that returns the contrast preference
2963
- * @category Browser
2964
- *
2965
- * @returns {UsePreferredContrastReturn} The contrast preference
2966
- *
2967
- * @example
2968
- * const contrast = usePreferredContrast();
2969
- */
2970
- declare const usePreferredContrast: () => UsePreferredContrastReturn;
2971
-
2972
- /**
2973
- * @name usePreferredDark
2974
- * @description - Hook that returns if the user prefers dark mode
2975
- * @category Browser
2976
- *
2977
- * @example
2978
- * const isDark = usePreferredDark();
2979
- */
2980
- declare const usePreferredDark: () => boolean;
2981
-
2982
- /**
2983
- * @name usePreferredLanguages
2984
- * @description Hook that returns a browser preferred languages from navigator
2985
- * @category Browser
2986
- *
2987
- * @browserapi navigator.languages https://developer.mozilla.org/en-US/docs/Web/API/Navigator/languages
2988
- *
2989
- * @returns {readonly string[]} An array of strings representing the user's preferred languages
2990
- *
2991
- * @example
2992
- * const languages = usePreferredLanguages();
2993
- */
2994
- declare const usePreferredLanguages: () => readonly string[];
2995
-
2996
- /** The use preferred reduced motion return type */
2997
- type UsePreferredReducedMotionReturn = 'no-preference' | 'reduce';
2998
- /**
2999
- * @name usePreferredReducedMotion
3000
- * @description - Hook that returns the reduced motion preference
3001
- * @category Browser
3002
- *
3003
- * @returns {UsePreferredReducedMotionReturn} The reduced motion preference
3004
- *
3005
- * @example
3006
- * const reduced = usePreferredReducedMotion();
3007
- */
3008
- declare const usePreferredReducedMotion: () => UsePreferredReducedMotionReturn;
3009
-
3010
- interface UsePreviousOptions<Value> {
3011
- equality: (a: Value, b: Value) => boolean;
3012
- }
3013
- /**
3014
- * @name usePrevious
3015
- * @description - Hook that returns the previous value
3016
- * @category Utilities
3017
- *
3018
- * @template Value The type of the value
3019
- * @param {Value} value The value to get the previous value
3020
- * @param {(a: Value, b: Value) => boolean} [options.equality] The custom equality function to determine if the value has changed
3021
- * @returns {Value} The previous value
3022
- *
3023
- * @example
3024
- * const prevValue = usePrevious(value);
3025
- */
3026
- declare const usePrevious: <Value>(value: Value, options?: UsePreviousOptions<Value>) => Value | undefined;
3027
-
3028
- /** The use queue return type */
3029
- interface UseQueueReturn<Value> {
3030
- /** Get the first element of the queue */
3031
- first: Value;
3032
- /** Get the last element of the queue */
3033
- last: Value;
3034
- /** The current queue */
3035
- queue: Value[];
3036
- /** Get the size of the queue */
3037
- size: number;
3038
- /** Add an element to the queue */
3039
- add: (element: Value) => void;
3040
- /** Clear the queue */
3041
- clear: () => void;
3042
- /** Remove an element from the queue */
3043
- remove: () => Value;
3044
- }
3045
- /**
3046
- * @name useQueue
3047
- * @description - Hook that manages a queue
3048
- * @category Utilities
3049
- *
3050
- * @template Value The type of the value
3051
- * @param {Value[]} [initialValue=[]] The initial value of the queue
3052
- * @returns {UseQueueReturn} An object containing the current queue and functions to interact with the queue
3053
- *
3054
- * @example
3055
- * const { queue, add, remove, clear, first, last, size } = useQueue([1, 2, 3]);
3056
- */
3057
- declare const useQueue: <Value>(initialValue?: Value[]) => UseQueueReturn<Value>;
3058
-
3059
- interface UseRafParams {
3060
- /** The delta between each frame in milliseconds */
3061
- delta: number;
3062
- /** The timestamp of the current frame in milliseconds */
3063
- timestamp: DOMHighResTimeStamp;
3064
- }
3065
- type UseRafCallback = (params: UseRafParams) => void;
3066
- interface UseRafOptions {
3067
- /** The delay between each frame in milliseconds */
3068
- delay?: number;
3069
- /** Whether the callback should be enabled */
3070
- enabled?: boolean;
3071
- }
3072
- interface UseRafReturn {
3073
- /** Whether the callback is active */
3074
- active: boolean;
3075
- /** Function to pause the callback */
3076
- pause: () => void;
3077
- /** Function to resume the callback */
3078
- resume: () => void;
3079
- }
3080
- /**
3081
- * @name useRaf
3082
- * @description - Hook that defines the logic for raf callback
3083
- * @category Utilities
3084
- *
3085
- * @browserapi requestAnimationFrame https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
3086
- *
3087
- * @param {UseRafCallback} callback The callback to execute
3088
- * @param {number} [options.delay] The delay between each frame in milliseconds
3089
- * @param {boolean} [options.enabled=true] Whether the callback should be enabled
3090
- * @returns {UseRafCallbackReturn} An object of raf callback functions
3091
- *
3092
- * @example
3093
- * useRaf(() => console.log('callback'));
3094
- */
3095
- declare const useRaf: (callback: UseRafCallback, options?: UseRafOptions) => UseRafReturn;
3096
-
3097
- type UseRafValueReturn<Value> = [Value, (value: Value) => void];
3098
- /**
3099
- * @name useRafValue
3100
- * @description - Hook that returns the value and a function to set the value
3101
- * @category Utilities
3102
- *
3103
- * @template Value The type of the value
3104
- * @param {Value} initialValue The initial value
3105
- * @returns {UseRafValueReturn<Value>} An array containing the value and a function to set the value
3106
- *
3107
- * @example
3108
- * const [value, setValue] = useRafValue(initialValue);
3109
- */
3110
- declare const useRafValue: <Value>(initialValue: (() => Value) | Value) => readonly [Value, (value: Value) => void];
3111
-
3112
- /**
3113
- * @name useRenderCount
3114
- * @description - Hook returns count component render times
3115
- * @category Lifecycle
3116
- *
3117
- * @returns {number} A number which determines how many times component renders
3118
- *
3119
- * @example
3120
- * const renderCount = useRenderCount();
3121
- */
3122
- declare const useRenderCount: () => number;
3123
-
3124
- interface UseRenderInfoReturn {
3125
- component: string;
3126
- renders: number;
3127
- sinceLast: number;
3128
- timestamp: number | null;
3129
- }
3130
- /**
3131
- * @name useRenderInfo
3132
- * @description - Hook for getting information about component rerender
3133
- * @category Lifecycle
3134
- *
3135
- * @param {string} [name='Unknown'] Component name
3136
- * @param {boolean} [log=true] Toggle logging
3137
- * @returns {UseRenderInfoReturn} An object containing rerender information
3138
- *
3139
- * @example
3140
- * const rerenderInfo = useRenderInfo('Component');
3141
- */
3142
- declare const useRenderInfo: (name?: string, log?: boolean) => UseRenderInfoReturn;
3143
-
3144
- /** The use rerender return type */
3145
- type UseRerenderReturn = () => void;
3146
- /**
3147
- * @name useRerender
3148
- * @description - Hook that defines the logic to force rerender a component
3149
- * @category Lifecycle
3150
- *
3151
- * @returns {UseRerenderReturn} The rerender function
3152
- *
3153
- * @example
3154
- * const rerender = useRerender();
3155
- */
3156
- declare const useRerender: () => UseRerenderReturn;
3157
-
3158
- /** The resize observer options type */
3159
- interface UseResizeObserverOptions extends ResizeObserverOptions {
3160
- /** The enabled state */
3161
- enabled?: boolean;
3162
- /** The resize observer callback */
3163
- onChange?: (entries: ResizeObserverEntry[], observer: ResizeObserver) => void;
3164
- }
3165
- /** The resize observer return type */
3166
- interface UseResizeObserverReturn {
3167
- /** The resize observer entries */
3168
- entries: ResizeObserverEntry[];
3169
- }
3170
- interface UseResizeObserver {
3171
- (target: HookTarget$1, options?: UseResizeObserverOptions): UseResizeObserverReturn;
3172
- <Target extends Element>(options?: UseResizeObserverOptions, target?: never): UseResizeObserverReturn & {
3173
- ref: StateRef<Target>;
3174
- };
3175
- }
3176
- /**
3177
- * @name useResizeObserver
3178
- * @description - Hook that gives you resize observer state
3179
- * @category Browser
3180
- *
3181
- * @browserapi ResizeObserver https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver
3182
- *
3183
- * @overload
3184
- * @template Target The target element
3185
- * @param {boolean} [options.enabled=true] The IntersectionObserver options
3186
- * @param {boolean} [options.box] The IntersectionObserver options
3187
- * @param {(entries: ResizeObserverEntry[], observer: ResizeObserver) => void} [options.onChange] The callback to execute when resize is detected
3188
- * @returns {UseResizeObserverReturn & { ref: StateRef<Target> }} An object containing the resize observer state
3189
- *
3190
- * @example
3191
- * const { ref, entries } = useResizeObserver();
3192
- *
3193
- * @overload
3194
- * @template Target The target element
3195
- * @param {HookTarget} target The target element to observe
3196
- * @param {boolean} [options.enabled=true] The IntersectionObserver options
3197
- * @param {boolean} [options.box] The IntersectionObserver options
3198
- * @param {(entries: ResizeObserverEntry[], observer: ResizeObserver) => void} [options.onChange] The callback to execute when resize is detected
3199
- * @returns {UseResizeObserverReturn} An object containing the resize observer state
3200
- *
3201
- * @example
3202
- * const { entries } = useResizeObserver(ref);
3203
- */
3204
- declare const useResizeObserver: UseResizeObserver;
3205
-
3206
- declare global {
3207
- interface ScreenOrientation {
3208
- lock: (orientation: OrientationLockType) => Promise<void>;
3209
- }
3210
- }
3211
- interface UseScreenOrientationValue {
3212
- /** The current angle */
3213
- angle: number;
3214
- /** The current orientation type */
3215
- orientationType: OrientationType;
3216
- }
3217
- type OrientationLockType = 'any' | 'landscape-primary' | 'landscape-secondary' | 'landscape' | 'natural' | 'portrait-primary' | 'portrait-secondary' | 'portrait';
3218
- interface useScreenOrientationReturn {
3219
- /** Whether the screen orientation is supported */
3220
- supported: boolean;
3221
- /** The current screen orientation value */
3222
- value: UseScreenOrientationValue;
3223
- /** Lock the screen orientation */
3224
- lock: (orientation: OrientationLockType) => void;
3225
- /** Unlock the screen orientation */
3226
- unlock: () => void;
3227
- }
3228
- /**
3229
- * @name useScreenOrientation
3230
- * @description - Hook that provides the current screen orientation
3231
- * @category Sensors
3232
- *
3233
- * @browserapi screen.orientation https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation
3234
- *
3235
- * @returns {useScreenOrientationReturn} The current screen orientation
3236
- *
3237
- * @example
3238
- * const { supported, value, lock, unlock } = useScreenOrientation();
3239
- */
3240
- declare const useScreenOrientation: () => useScreenOrientationReturn;
3241
-
3242
- /** The use script status */
3243
- type UseScriptStatus = 'error' | 'loading' | 'ready' | 'unknown';
3244
- declare const SCRIPT_STATUS_ATTRIBUTE_NAME = "script-status";
3245
- /** The use script options extends from attributes script tag */
3246
- interface UseScriptOptions extends ComponentProps<'script'> {
3247
- /** Whether to remove the script on unmount */
3248
- removeOnUnmount?: boolean;
3249
- }
3250
- /**
3251
- * @name useScript
3252
- * @description - Hook that manages a script with onLoad, onError, and removeOnUnmount functionalities
3253
- * @category Browser
3254
- *
3255
- * @param {string} src The source of the script
3256
- * @param {UseScriptOptions} [options] The options of the script extends from attributes script tag
3257
- * @param {boolean} [options.removeOnUnmount=true] Whether to remove the script on unmount
3258
- * @param {boolean} [options.async=true] Whether to load the script asynchronously
3259
- * @returns {UseScriptStatus} The status of the script
3260
- *
3261
- * @example
3262
- * const status = useScript('https://example.com/script.js');
3263
- */
3264
- declare const useScript: (src: string, options?: UseScriptOptions) => UseScriptStatus;
3265
-
3266
- interface UseScrollOptions {
3267
- /** The on scroll callback */
3268
- onScroll?: (params: UseScrollCallbackParams, event: Event) => void;
3269
- /** The on end scroll callback */
3270
- onStop?: (event: Event) => void;
3271
- /** Offset arrived states by x pixels. */
3272
- offset?: {
3273
- left?: number;
3274
- right?: number;
3275
- top?: number;
3276
- bottom?: number;
3277
- };
3278
- }
3279
- interface UseScrollCallbackParams {
3280
- /** The element x position */
3281
- x: number;
3282
- /** The element y position */
3283
- y: number;
3284
- /** State of scroll arrived */
3285
- arrived: {
3286
- left: boolean;
3287
- right: boolean;
3288
- top: boolean;
3289
- bottom: boolean;
3290
- };
3291
- /** State of scroll direction */
3292
- directions: {
3293
- left: boolean;
3294
- right: boolean;
3295
- top: boolean;
3296
- bottom: boolean;
3297
- };
3298
- }
3299
- interface UseScroll {
3300
- (target: HookTarget$1, callback?: (params: UseScrollCallbackParams, event: Event) => void): boolean;
3301
- (target: HookTarget$1, options?: UseScrollOptions): boolean;
3302
- <Target extends Element>(callback?: (params: UseScrollCallbackParams, event: Event) => void, target?: never): {
3303
- ref: StateRef<Target>;
3304
- scrolling: boolean;
3305
- };
3306
- <Target extends Element>(options?: UseScrollOptions, target?: never): {
3307
- ref: StateRef<Target>;
3308
- scrolling: boolean;
3309
- };
3310
- }
3311
- /**
3312
- * @name useScroll
3313
- * @description - Hook that allows you to control scroll a element
3314
- * @category Sensors
3315
- *
3316
- * @overload
3317
- * @template Target The target element
3318
- * @param {ScrollBehavior} [options.behavior=auto] The behavior of scrolling
3319
- * @param {number} [options.offset.left=0] The left offset for arrived states
3320
- * @param {number} [options.offset.right=0] The right offset for arrived states
3321
- * @param {number} [options.offset.top=0] The top offset for arrived states
3322
- * @param {number} [options.offset.bottom=0] The bottom offset for arrived states
3323
- * @param {(params: UseScrollCallbackParams, event: Event) => void} [options.onScroll] The callback function to be invoked on scroll
3324
- * @param {(event: Event) => void} [options.onStop] The callback function to be invoked on scroll end
3325
- * @returns {boolean} The state of scrolling
3326
- *
3327
- * @example
3328
- * const scrolling = useScroll(ref, options);
3329
- *
3330
- * @overload
3331
- * @template Target The target element
3332
- * @param {(params: UseScrollCallbackParams, event: Event) => void} [callback] The callback function to be invoked on scroll
3333
- * @returns {boolean} The state of scrolling
3334
- *
3335
- * @example
3336
- * const scrolling = useScroll(ref, () => console.log('callback'));
3337
- *
3338
- * @overload
3339
- * @template Target The target element
3340
- * @param {Target} target The target element to scroll
3341
- * @param {ScrollBehavior} [options.behavior=auto] The behavior of scrolling
3342
- * @param {number} [options.offset.left=0] The left offset for arrived states
3343
- * @param {number} [options.offset.right=0] The right offset for arrived states
3344
- * @param {number} [options.offset.top=0] The top offset for arrived states
3345
- * @param {number} [options.offset.bottom=0] The bottom offset for arrived states
3346
- * @param {(params: UseScrollCallbackParams, event: Event) => void} [options.onScroll] The callback function to be invoked on scroll
3347
- * @param {(event: Event) => void} [options.onStop] The callback function to be invoked on scroll end
3348
- * @returns {[StateRef<Target>, boolean]} The state of scrolling
3349
- *
3350
- * @example
3351
- * const { ref, scrolling } = useScroll(options);
3352
- *
3353
- * @overload
3354
- * @template Target The target element
3355
- * @param {Target} target The target element to scroll
3356
- * @param {(params: UseScrollCallbackParams, event: Event) => void} [callback] The callback function to be invoked on scroll
3357
- * @returns {[StateRef<Target>, boolean]} The state of scrolling
3358
- *
3359
- * @example
3360
- * const { ref, scrolling } = useScroll(() => console.log('callback'));
3361
- */
3362
- declare const useScroll: UseScroll;
3363
-
3364
- /** The scroll into view options type */
3365
- interface UseScrollIntoViewOptions extends ScrollIntoViewOptions {
3366
- /** Whether to enable the scroll into view */
3367
- enabled?: boolean;
3368
- }
3369
- /** The scroll into view return type */
3370
- interface UseScrollIntoViewReturn {
3371
- /** Function to scroll element into view */
3372
- trigger: (params?: {
3373
- behavior?: ScrollBehavior;
3374
- block?: ScrollLogicalPosition;
3375
- inline?: ScrollLogicalPosition;
3376
- }) => void;
3377
- }
3378
- interface UseScrollIntoView {
3379
- <Target extends Element>(options?: UseScrollIntoViewOptions, target?: never): UseScrollIntoViewReturn & {
3380
- ref: StateRef<Target>;
3381
- };
3382
- (target: HookTarget$1, options?: UseScrollIntoViewOptions): UseScrollIntoViewReturn;
3383
- }
3384
- /**
3385
- * @name useScrollIntoView
3386
- * @description - Hook that provides functionality to scroll an element into view
3387
- * @category Sensors
3388
- *
3389
- * @overload
3390
- * @param {HookTarget} target The target element to scroll into view
3391
- * @param {ScrollBehavior} [options.behavior='smooth'] The scrolling behavior
3392
- * @param {ScrollLogicalPosition} [options.block='start'] The vertical alignment
3393
- * @param {ScrollLogicalPosition} [options.inline='nearest'] The horizontal alignment
3394
- * @returns {UseScrollIntoViewReturn} Object containing scroll function
3395
- *
3396
- * @example
3397
- * const { trigger } = useScrollIntoView(ref);
3398
- *
3399
- * @overload
3400
- * @template Target The target element
3401
- * @param {ScrollBehavior} [options.behavior='smooth'] The scrolling behavior
3402
- * @param {ScrollLogicalPosition} [options.block='start'] The vertical alignment
3403
- * @param {ScrollLogicalPosition} [options.inline='nearest'] The horizontal alignment
3404
- * @returns {UseScrollIntoViewReturn & { ref: StateRef<Target> }} Object containing scroll function and ref
3405
- *
3406
- * @example
3407
- * const { ref, trigger } = useScrollIntoView<HTMLDivElement>();
3408
- */
3409
- declare const useScrollIntoView: UseScrollIntoView;
3410
-
3411
- /** The use scroll to options type */
3412
- interface UseScrollToOptions {
3413
- /** The scrolling behavior */
3414
- behavior?: ScrollBehavior;
3415
- /** Whether to enable the scroll to */
3416
- enabled?: boolean;
3417
- /** The horizontal position to scroll to */
3418
- x: number;
3419
- /** The vertical position to scroll to */
3420
- y: number;
3421
- }
3422
- /** The use scroll to return type */
3423
- interface UseScrollToReturn {
3424
- /** The state of scrolling */
3425
- trigger: (params?: {
3426
- x: number;
3427
- y: number;
3428
- behavior?: ScrollBehavior;
3429
- }) => void;
3430
- }
3431
- interface UseScrollTo {
3432
- <Target extends Element>(options?: UseScrollToOptions, target?: never): UseScrollToReturn & {
3433
- ref: StateRef<Target>;
3434
- };
3435
- (target: HookTarget$1, options?: UseScrollToOptions): UseScrollToReturn;
3436
- }
3437
- /**
3438
- * @name useScrollTo
3439
- * @description - Hook for scrolling to a specific element
3440
- * @category Sensors
3441
- *
3442
- * @overload
3443
- * @param {HookTarget} target The target element for scrolling to
3444
- * @param {UseScrollToOptions} [options] The scroll options
3445
- * @returns {UseScrollToReturn} The scroll trigger function
3446
- *
3447
- * @example
3448
- * const trigger = useScrollTo(ref, options);
3449
- *
3450
- * @overload
3451
- * @template Target The target element
3452
- * @param {UseScrollToOptions} [options] The scroll options
3453
- * @returns {UseScrollToReturn & { ref: StateRef<Target> }} The scroll trigger function and ref
3454
- *
3455
- * @example
3456
- * const { ref, trigger } = useScrollTo(options);
3457
- */
3458
- declare const useScrollTo: UseScrollTo;
3459
-
3460
- /**
3461
- * @name useSessionStorage
3462
- * @description - Hook that manages session storage value
3463
- * @category Browser
3464
- *
3465
- * @browserapi sessionStorage https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage
3466
- *
3467
- * @template Value The type of the value
3468
- * @param {string} key The key of the storage
3469
- * @param {UseStorageInitialValue<Value>} [initialValue] The initial value of the storage
3470
- * @param {UseStorageOptions<Value>} [options] The options of the storage
3471
- *
3472
- * @example
3473
- * const { value, set, remove } = useSessionStorage('key', 'value');
3474
- */
3475
- declare const useSessionStorage: <Value>(key: string, initialValue?: UseStorageInitialValue<Value>, options?: Omit<UseStorageOptions<Value>, "initialValue" | "storage">) => {
3476
- value: Value | undefined;
3477
- set: (value: Value) => void;
3478
- remove: () => void;
3479
- };
3480
-
3481
- /** The use set return type */
3482
- interface UseSetReturn<Value> {
3483
- /** The size of the set */
3484
- size: number;
3485
- /** The current set */
3486
- value: Set<Value>;
3487
- /** Function to add a value to the set */
3488
- add: (value: Value) => void;
3489
- /** Function to clear the set */
3490
- clear: () => void;
3491
- /** Function to get the symmetric difference of two sets */
3492
- difference: (other: Set<Value>) => void;
3493
- /** Function to check if a value exists in the set */
3494
- has: (value: Value) => boolean;
3495
- /** Function to get the difference of two sets */
3496
- intersection: (other: Set<Value>) => void;
3497
- /** Function to remove a value from the set */
3498
- remove: (value: Value) => void;
3499
- /** Function to toggle a value in the set */
3500
- reset: () => void;
3501
- /** Function to get the symmetric difference of two sets */
3502
- symmetricDifference: (other: Set<Value>) => void;
3503
- /** Function to toggle a value in the set */
3504
- toggle: (value: Value) => void;
3505
- /** Function to get the union of two sets */
3506
- union: (other: Set<Value>) => void;
3507
- }
3508
- /**
3509
- * @name useSet
3510
- * @description - Hook that manages a set structure
3511
- * @category Utilities
3512
- *
3513
- * @template Value The type of the value
3514
- * @param {Value[]} [values] The initial array of the set
3515
- * @returns {UseSetReturn<Value>} An object containing the current set and functions to interact with the set
3516
- *
3517
- * @example
3518
- * const { value, add, remove, clear, reset, toggle, union, intersection, difference, symmetricDifference, size, has } = useSet([1, 2, 3]);
3519
- */
3520
- declare const useSet: <Value>(values?: Value[]) => UseSetReturn<Value>;
3521
-
3522
- /** The use share options type */
3523
- interface UseShareParams {
3524
- /** Array of files to be shared */
3525
- files?: File[];
3526
- /** Text content to be shared */
3527
- text?: string;
3528
- /** Title of the content being shared */
3529
- title?: string;
3530
- /** URL link to be shared */
3531
- url?: string;
3532
- }
3533
- /** The use share return type */
3534
- interface UseShareReturn {
3535
- /** Whether the Web Share API is supported in the current environment */
3536
- supported: boolean;
3537
- /** Function to trigger the native share dialog */
3538
- share: (shareParams: ShareData) => Promise<void>;
3539
- }
3540
- /**
3541
- * @name useShare
3542
- * @description - Hook that utilizes the share api
3543
- * @category Browser
3544
- *
3545
- * @param {UseShareParams} [params] The use share options
3546
- * @returns {UseShareReturn}
3547
- *
3548
- * @example
3549
- * const { share, supported } = useShare();
3550
- */
3551
- declare const useShare: (params?: UseShareParams) => {
3552
- share: (shareParams: ShareData) => Promise<void>;
3553
- supported: boolean;
3554
- };
3555
-
3556
- /** The use state history hook return type */
3557
- interface UseStateHistoryReturn<Value> {
3558
- /** All history values */
3559
- history: Value[];
3560
- /** Current index in history */
3561
- index: number;
3562
- /** Current value */
3563
- value: Value;
3564
- /** Go back specified number of steps in history (default: 1) */
3565
- back: (steps?: number) => void;
3566
- /** Go forward specified number of steps in history (default: 1) */
3567
- forward: (steps?: number) => void;
3568
- /** Reset history to initial state */
3569
- reset: () => void;
3570
- /** Set a new value */
3571
- set: (value: Value) => void;
3572
- /** Undo the last change */
3573
- undo: () => void;
3574
- }
3575
- /**
3576
- * @name useStateHistory
3577
- * @description - Hook that manages state with history functionality
3578
- * @category Utilities
3579
- *
3580
- * @param {Value} initialValue - The initial value to start the history with
3581
- * @param {number} [maxSize=10] - Maximum number of history entries to keep
3582
- * @returns {UseStateHistoryReturn<Value>} Object containing current value, history array and control methods
3583
- *
3584
- * @example
3585
- * const { value, history, index, set, back, forward, reset, undo } = useStateHistory(0);
3586
- */
3587
- declare const useStateHistory: <Value>(initialValue: Value, maxSize?: number) => UseStateHistoryReturn<Value>;
3588
-
3589
- /** The use step params type */
3590
- interface UseStepParams {
3591
- /** Initial value for step */
3592
- initial: number;
3593
- /** Maximum value for step */
3594
- max: number;
3595
- }
3596
- /** The use step return type */
3597
- interface UseStepReturn {
3598
- /** Counts of steps */
3599
- counts: number;
3600
- /** Current value of step */
3601
- currentStep: number;
3602
- /** Boolean value if current step is first */
3603
- isFirst: boolean;
3604
- /** Boolean value if current step is last */
3605
- isLast: boolean;
3606
- /** Go to back step */
3607
- back: () => void;
3608
- /** Go to next step */
3609
- next: () => void;
3610
- /** Reset current step to initial value */
3611
- reset: () => void;
3612
- /** Go to custom step */
3613
- set: (value: number | 'first' | 'last') => void;
3614
- }
3615
- /**
3616
- * @name useStep
3617
- * @description - Hook that create stepper
3618
- * @category Utilities
3619
- *
3620
- * @overload
3621
- * @param {number} max Maximum number of steps
3622
- * @returns {UseStepReturn} An object contains variables and functions to change the step
3623
- *
3624
- * @example
3625
- * const stepper = useStep(5);
3626
- *
3627
- * @overload
3628
- * @param {number} params.max Maximum number of steps
3629
- * @param {number} params.initial Initial value for step
3630
- * @returns {UseStepReturn} An object contains variables and functions to change the step
3631
- *
3632
- * @example
3633
- * const stepper = useStep({ initial: 2, max: 5 });
3634
- */
3635
- declare const useStep: (params: number | UseStepParams) => UseStepReturn;
3636
-
3637
- /** The use sticky return type */
3638
- interface UseStickyReturn {
3639
- stuck: boolean;
3640
- }
3641
- /** The use sticky axis type */
3642
- type UseStickyAxis = 'horizontal' | 'vertical';
3643
- /** The use sticky options type */
3644
- interface UseStickyOptions {
3645
- axis?: UseStickyAxis;
3646
- root?: HookTarget$1;
3647
- }
3648
- interface UseSticky {
3649
- (target: HookTarget$1, options?: UseStickyOptions): boolean;
3650
- <Target extends Element>(options?: UseStickyOptions, target?: never): {
3651
- ref: StateRef<Target>;
3652
- } & UseStickyReturn;
3653
- }
3654
- /**
3655
- * @name UseSticky
3656
- * @description - Hook that allows you to detect that your sticky component is stuck
3657
- * @category Browser
3658
- *
3659
- * @overload
3660
- * @param {HookTarget} target The target sticky element
3661
- * @param {UseStickyAxis} [options.axis='vertical'] The axis of motion of the sticky component
3662
- * @param {UseStickyRoot} [options.root=document] The element that contains your sticky component
3663
- * @returns {UseStickyReturn} The state of the sticky
3664
- *
3665
- * @example
3666
- * const stuck = useSticky(ref);
3667
- *
3668
- * @overload
3669
- * @param {UseStickyAxis} [options.axis='vertical'] The axis of motion of the sticky component
3670
- * @param {UseStickyRoot} [options.root=document] The element that contains your sticky component
3671
- * @returns {{ stickyRef: StateRef<Target> } & UseStickyReturn} The state of the sticky
3672
- *
3673
- * @example
3674
- * const { stuck, ref } = useSticky();
3675
- */
3676
- declare const useSticky: UseSticky;
3677
-
3678
- /** The use stopwatch return type */
3679
- interface UseStopwatchReturn {
3680
- /** The total count of the stopwatch */
3681
- count: number;
3682
- /** The day count of the stopwatch */
3683
- days: number;
3684
- /** The hour count of the stopwatch */
3685
- hours: number;
3686
- /** The minute count of the stopwatch */
3687
- minutes: number;
3688
- /** The over state of the stopwatch */
3689
- over: boolean;
3690
- /** The paused state of the stopwatch */
3691
- paused: boolean;
3692
- /** The second count of the stopwatch */
3693
- seconds: number;
3694
- /** The function to pause the stopwatch */
3695
- pause: () => void;
3696
- /** The function to reset the stopwatch */
3697
- reset: () => void;
3698
- /** The function to start the stopwatch */
3699
- start: () => void;
3700
- /** The function to toggle the stopwatch */
3701
- toggle: () => void;
3702
- }
3703
- /** The use stopwatch options */
3704
- interface UseStopwatchOptions {
3705
- /** The enabled state of the timer */
3706
- enabled?: boolean;
3707
- }
3708
- interface UseStopwatch {
3709
- (initialTime?: number, options?: UseStopwatchOptions): UseStopwatchReturn;
3710
- (options?: UseStopwatchOptions & {
3711
- initialTime?: number;
3712
- }): UseStopwatchReturn;
3713
- }
3714
- /**
3715
- * @name useStopwatch
3716
- * @description - Hook that creates a stopwatch functionality
3717
- * @category Time
3718
- *
3719
- * @overload
3720
- * @param {number} [initialTime=0] The initial time of the timer
3721
- * @param {boolean} [options.enabled=true] The enabled state of the timer
3722
- * @returns {UseStopwatchReturn} An object containing the current time and functions to interact with the timer
3723
- *
3724
- * @example
3725
- * const { seconds, minutes, start, pause, reset } = useStopwatch(1000, { enabled: false });
3726
- *
3727
- * @overload
3728
- * @param {number} [options.initialTime=0] -The initial time of the timer
3729
- * @param {boolean} [options.enabled=true] The enabled state of the timer
3730
- * @returns {UseStopwatchReturn} An object containing the current time and functions to interact with the timer
3731
- *
3732
- * @example
3733
- * const { seconds, minutes, start, pause, reset } = useStopwatch({ initialTime: 1000, enabled: false });
3734
- */
3735
- declare const useStopwatch: UseStopwatch;
3736
-
3737
- /** The use text direction value type */
3738
- type UseTextDirectionValue = 'auto' | 'ltr' | 'rtl';
3739
- /** The use text direction return type */
3740
- interface UseTextDirectionReturn {
3741
- /** The current direction */
3742
- value: UseTextDirectionValue;
3743
- /*** The function to remove the direction */
3744
- remove: () => void;
3745
- /*** The function to set the direction */
3746
- set: (value: UseTextDirectionValue | null) => void;
3747
- }
3748
- interface UseTextDirection {
3749
- (target: HookTarget$1, initialValue?: UseTextDirectionValue): UseTextDirectionReturn;
3750
- <Target extends Element>(initialValue?: UseTextDirectionValue, target?: never): UseTextDirectionReturn & {
3751
- ref: StateRef<Target>;
3752
- };
3753
- }
3754
- /**
3755
- * @name useTextDirection
3756
- * @description - Hook that can get and set the direction of the element
3757
- * @category Browser
3758
- *
3759
- * @overload
3760
- * @param {HookTarget} target The target element to observe
3761
- * @param {UseTextDirectionValue} [initialValue = 'ltr'] The initial direction of the element
3762
- * @returns {UseTextDirectionReturn} An object containing the current text direction of the element
3763
- *
3764
- * @example
3765
- * const { value, set, remove } = useTextDirection(ref);
3766
- *
3767
- * @overload
3768
- * @template Target The target element type
3769
- * @param {UseTextDirectionValue} [initialValue = 'ltr'] The initial direction of the element
3770
- * @returns { { ref: StateRef<Target> } & UseTextDirectionReturn } An object containing the current text direction of the element
3771
- *
3772
- * @example
3773
- * const { ref, value, set, remove } = useTextDirection();
3774
- */
3775
- declare const useTextDirection: UseTextDirection;
3776
-
3777
- declare const getRangesSelection: (selection: Selection) => Range[];
3778
- /** The use text selection return type */
3779
- interface UseTextSelectionReturn {
3780
- /** The current selection ranges */
3781
- ranges: Range[];
3782
- /** The current selection rects */
3783
- rects: DOMRect[];
3784
- /** The current selection */
3785
- selection: Selection | null;
3786
- /** The current selection text */
3787
- text: string;
3788
- }
3789
- /**
3790
- * @name useTextSelection
3791
- * @description - Hook that manages the text selection
3792
- * @category Sensors
3793
- *
3794
- * @browserapi document.getSelection https://developer.mozilla.org/en-US/docs/Web/API/Document/getSelection
3795
- *
3796
- * @returns {UseTextSelectionReturn} An object containing the current text selection
3797
- *
3798
- * @example
3799
- * const selection = useTextSelection();
3800
- */
3801
- declare const useTextSelection: () => UseTextSelectionReturn;
3802
-
3803
- /**
3804
- * @name useThrottleCallback
3805
- * @description - Hook that creates a throttled callback
3806
- * @category Utilities
3807
- *
3808
- * @template Params The type of the params
3809
- * @template Return The type of the return
3810
- * @param {(...args: Params) => Return} callback The callback function
3811
- * @param {number} delay The delay in milliseconds
3812
- * @returns {(...args: Params) => Return} The callback with throttle
3813
- *
3814
- * @example
3815
- * const throttled = useThrottleCallback(() => console.log('callback'), 500);
3816
- */
3817
- declare const useThrottleCallback: <Params extends unknown[], Return>(callback: (...args: Params) => Return, delay: number) => (...args: Params) => void;
3818
-
3819
- /**
3820
- * @name useThrottleValue
3821
- * @description - Hook that creates a throttled value
3822
- * @category Utilities
3823
- *
3824
- * @template Value The type of the value
3825
- * @param {Value} value The value to be throttled
3826
- * @param {number} delay The delay in milliseconds
3827
- * @returns {Value} The throttled value
3828
- *
3829
- * @example
3830
- * const throttledValue = useThrottleValue(value, 500);
3831
- */
3832
- declare const useThrottleValue: <Value>(value: Value, delay: number) => Value;
3833
-
3834
- interface UseTimeReturn {
3835
- day: number;
3836
- hours: number;
3837
- meridiemHours: {
3838
- value: number;
3839
- type: string;
3840
- };
3841
- minutes: number;
3842
- month: number;
3843
- seconds: number;
3844
- timestamp: number;
3845
- year: number;
3846
- }
3847
- /**
3848
- * @name useTime
3849
- * @description - Hook that gives you current time in different values
3850
- * @category Time
3851
- *
3852
- * @returns {UseTimeReturn} An object containing the current time
3853
- *
3854
- * @example
3855
- * const { seconds, minutes, hours, meridiemHours, day, month, year, timestamp } = useTime();
3856
- */
3857
- declare const useTime: () => UseTimeReturn;
3858
-
3859
- /** The use timeout return type */
3860
- interface UseTimeoutReturn {
3861
- /** Timeout is ready state value */
3862
- ready: boolean;
3863
- /** Function to clear timeout */
3864
- clear: () => void;
3865
- }
3866
- /**
3867
- * @name useTimeout
3868
- * @description - Hook that executes a callback function after a specified delay
3869
- * @category Time
3870
- *
3871
- * @param {() => void} callback The function to be executed after the timeout
3872
- * @param {number} delay The delay in milliseconds before the timeout executes the callback function
3873
- * @returns {UseTimeoutReturn} An object with a `ready` boolean state value and a `clear` function to clear timeout
3874
- *
3875
- * @example
3876
- * const { clear, ready } = useTimeout(() => {}, 5000);
3877
- */
3878
- declare function useTimeout(callback: () => void, delay: number): UseTimeoutReturn;
3879
-
3880
- type PositiveInteger<Value extends number> = `${Value}` extends `-${any}` | `${any}.${any}` ? never : Value;
3881
- declare const getTimeFromSeconds: (timestamp: number) => {
3882
- seconds: number;
3883
- minutes: number;
3884
- hours: number;
3885
- days: number;
3886
- };
3887
- /** The use timer options type */
3888
- interface UseTimerOptions {
3889
- /** Whether the timer should start automatically */
3890
- immediately?: boolean;
3891
- /** The function to be executed when the timer is expired */
3892
- onExpire?: () => void;
3893
- /** The function to be executed when the timer is started */
3894
- onStart?: () => void;
3895
- /** Callback function to be executed on each tick of the timer */
3896
- onTick?: (seconds: number) => void;
3897
- }
3898
- /** The use timer return type */
3899
- interface UseTimerReturn {
3900
- /** flag to indicate if timer is active or not */
3901
- active: boolean;
3902
- /** The total count of the timer */
3903
- count: number;
3904
- /** The day count of the timer */
3905
- days: number;
3906
- /** The hour count of the timer */
3907
- hours: number;
3908
- /** The minute count of the timer */
3909
- minutes: number;
3910
- /** The second count of the timer */
3911
- seconds: number;
3912
- /** The function to clear the timer */
3913
- clear: () => void;
3914
- /** The function to decrease the timer */
3915
- decrease: (seconds: PositiveInteger<number>) => void;
3916
- /** The function to increase the timer */
3917
- increase: (seconds: PositiveInteger<number>) => void;
3918
- /** The function to pause the timer */
3919
- pause: () => void;
3920
- /** The function to restart the timer */
3921
- restart: (time: PositiveInteger<number>, immediately?: boolean) => void;
3922
- /** The function to resume the timer */
3923
- resume: () => void;
3924
- /** The function to start the timer */
3925
- start: () => void;
3926
- /** The function to toggle the timer */
3927
- toggle: () => void;
3928
- }
3929
- interface UseTimer {
3930
- (): UseTimerReturn;
3931
- (seconds: PositiveInteger<number>, callback: () => void): UseTimerReturn;
3932
- (seconds: PositiveInteger<number>, options?: UseTimerOptions): UseTimerReturn;
3933
- }
3934
- /**
3935
- * @name useTimer
3936
- * @description - Hook that creates a timer functionality
3937
- * @category Time
3938
- *
3939
- * @overload
3940
- * @returns {UseTimerReturn} An object containing the timer properties and functions
3941
- *
3942
- * @example
3943
- * const { days, hours, minutes, seconds, toggle, pause, start, restart, resume, active, decrease, increase } = useTimer();
3944
- *
3945
- * @overload
3946
- * @param {number} seconds The seconds value that define for how long the timer will be running
3947
- * @param {() => void} callback The function to be executed once countdown timer is expired
3948
- * @returns {UseTimerReturn} An object containing the timer properties and functions
3949
- *
3950
- * @example
3951
- * const { days, hours, minutes, seconds, toggle, pause, start, restart, resume, active, decrease, increase } = useTimer(1000, () => console.log('ready'));
3952
- *
3953
- * @overload
3954
- * @param {number} seconds The seconds value that define for how long the timer will be running
3955
- * @param {boolean} [options.immediately=true] The flag to decide if timer should start automatically
3956
- * @param {() => void} [options.onExpire] The function to be executed when the timer is expired
3957
- * @param {(timestamp: number) => void} [options.onTick] The function to be executed on each tick of the timer
3958
- * @returns {UseTimerReturn} An object containing the timer properties and functions
3959
- *
3960
- * @example
3961
- * const { days, hours, minutes, seconds, toggle, pause, start, restart, resume, active, decrease, increase } = useTimer(1000);
3962
- */
3963
- declare const useTimer: UseTimer;
3964
-
3965
- /** The use toggle return type */
3966
- type UseToggleReturn<Value> = readonly [Value, (value?: Value) => void];
3967
- /**
3968
- * @name useToggle
3969
- * @description - Hook that create toggle
3970
- * @category Utilities
3971
- *
3972
- * @template Value The type of the value
3973
- * @param {Value[]} [values=[false, true]] The values to toggle
3974
- *
3975
- * @example
3976
- * const [on, toggle] = useToggle();
3977
- *
3978
- * @example
3979
- * const [value, toggle] = useToggle(['light', 'dark'] as const);
3980
- */
3981
- declare const useToggle: <Value = boolean>(values?: readonly Value[]) => readonly [Value, (value?: SetStateAction<Value>) => void];
3982
-
3983
- /**
3984
- * @name useUnmount
3985
- * @description - Hook that defines the logic when unmounting a component
3986
- * @category Lifecycle
3987
- *
3988
- * @param {() => void} callback The callback function to be invoked on component unmount
3989
- * @returns {void}
3990
- *
3991
- * @example
3992
- * useUnmount(() => console.log('This effect runs on component unmount'));
3993
- */
3994
- declare const useUnmount: (callback: () => void) => void;
3995
-
3996
- /** The use vibrate pattern type */
3997
- type UseVibratePattern = number | number[];
3998
- /** The use vibrate return type */
3999
- interface UseVibrateReturn {
4000
- /** The support indicator */
4001
- supported: boolean;
4002
- /** The vibrating indicator */
4003
- vibrating: boolean;
4004
- /** The pause function */
4005
- pause: () => void;
4006
- /** The resume function */
4007
- resume: () => void;
4008
- /** The start function */
4009
- start: (interval: number) => void;
4010
- /** The vibrate function */
4011
- trigger: (pattern?: UseVibratePattern) => void;
4012
- }
4013
- /**
4014
- * @name useVibrate
4015
- * @description - Hook that provides vibrate api
4016
- * @category Browser
4017
- *
4018
- * @browserapi navigator.vibrate https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vibrate
4019
- *
4020
- * @overload
4021
- * @param {UseVibratePattern} options.pattern The pattern for vibration
4022
- * @param {number} [options.interval=0] Time in milliseconds between vibrations
4023
- * @returns {UseVibrateReturn} An object containing support indicator, start vibration and stop vibration functions
4024
- *
4025
- * @example
4026
- * const { supported, active, vibrate, stop, pause, resume } = useVibrate(1000);
4027
- */
4028
- declare const useVibrate: (pattern: UseVibratePattern, interval?: number) => {
4029
- supported: boolean;
4030
- trigger: (internalPattern?: UseVibratePattern) => void;
4031
- stop: () => void;
4032
- active: boolean;
4033
- pause: () => void;
4034
- resume: (intervalInterval?: number) => void;
4035
- };
4036
-
4037
- type UseWebSocketUrl = (() => string) | string;
4038
- interface UseWebSocketOptions {
4039
- protocols?: Array<'soap' | 'wasm'>;
4040
- retry?: boolean | number;
4041
- onConnected?: (webSocket: WebSocket) => void;
4042
- onDisconnected?: (event: CloseEvent, webSocket: WebSocket) => void;
4043
- onError?: (event: Event, webSocket: WebSocket) => void;
4044
- onMessage?: (event: MessageEvent, webSocket: WebSocket) => void;
4045
- }
4046
- type UseWebSocketStatus = 'connected' | 'connecting' | 'disconnected' | 'failed';
4047
- interface UseWebSocketReturn {
4048
- client?: WebSocket;
4049
- close: WebSocket['close'];
4050
- send: WebSocket['send'];
4051
- status: UseWebSocketStatus;
4052
- open: () => void;
4053
- }
4054
- /**
4055
- * @name useWebSocket
4056
- * @description - Hook that connects to a WebSocket server and handles incoming and outgoing messages
4057
- * @category Browser
4058
- *
4059
- * @param {UseWebSocketUrl} url The URL of the WebSocket server
4060
- * @param {(webSocket: WebSocket) => void} [options.onConnected] The callback function that is called when the WebSocket connection is established
4061
- * @param {(event: CloseEvent, webSocket: WebSocket) => void} [options.onDisconnected] The callback function that is called when the WebSocket connection is closed
4062
- * @param {(event: Event, webSocket: WebSocket) => void} [options.onError] The callback function that is called when an error occurs
4063
- * @param {(event: MessageEvent, webSocket: WebSocket) => void} [options.onMessage] The callback function that is called when a message is received
4064
- * @param {boolean | number} [options.retry] The number of times to retry the connection
4065
- * @param {Array<'soap' | 'wasm'>} [options.protocols] The list of protocols to use
4066
- * @returns {UseWebSocketReturn} An object with the status, close, send, open, and ws properties
4067
- *
4068
- * @example
4069
- * const { status, close, send, open, client } = useWebSocket('url');
4070
- */
4071
- declare const useWebSocket: (url: UseWebSocketUrl, options?: UseWebSocketOptions) => UseWebSocketReturn;
4072
-
4073
- /**
4074
- * @name useWindowEvent
4075
- * @description - Hook attaches an event listener to the window object for the specified event
4076
- * @category Browser
4077
- *
4078
- * @template Event Key of window event map.
4079
- * @param {Event} event The event to listen for.
4080
- * @param {(event: WindowEventMap[Event]) => void} listener The callback function to be executed when the event is triggered
4081
- * @param {UseEventListenerOptions} [options] The options for the event listener
4082
- * @returns {void}
4083
- *
4084
- * @example
4085
- * useWindowEvent('click', () => console.log('clicked'));
4086
- */
4087
- declare const useWindowEvent: <Event extends keyof WindowEventMap>(event: Event, listener: (this: Window, event: WindowEventMap[Event]) => any, options?: UseEventListenerOptions) => void;
4088
-
4089
- /**
4090
- * @name useWindowFocus
4091
- * @description - Hook that provides the current focus state of the window
4092
- * @category Elements
4093
- *
4094
- * @returns {boolean} The current focus state of the window
4095
- *
4096
- * @example
4097
- * const focused = useWindowFocus();
4098
- */
4099
- declare const useWindowFocus: () => boolean;
4100
-
4101
- interface ScrollPosition {
4102
- x: number;
4103
- y: number;
4104
- }
4105
- declare const scrollTo: ({ x, y, behavior }: Partial<ScrollPosition & ScrollOptions>) => void;
4106
- /**
4107
- * @name useWindowScroll
4108
- * @description - Hook that manages the window scroll position
4109
- * @category Browser
4110
- *
4111
- * @returns {UseWindowScrollReturn} An object containing the current window scroll position
4112
- *
4113
- * @example
4114
- * const { value, scrollTo } = useWindowScroll();
4115
- */
4116
- declare const useWindowScroll: () => {
4117
- value: ScrollPosition;
4118
- scrollTo: ({ x, y, behavior }: Partial<ScrollPosition & ScrollOptions>) => void;
4119
- };
4120
-
4121
- /** The use window size return type */
4122
- interface UseWindowSizeParams {
4123
- /** Whether to include the scrollbar in the window size calculation */
4124
- includeScrollbar?: boolean;
4125
- }
4126
- /** The use window size return type */
4127
- interface UseWindowSizeReturn {
4128
- /** The current window height */
4129
- height: number;
4130
- /** The current window width */
4131
- width: number;
4132
- }
4133
- /**
4134
- * @name useWindowSize
4135
- * @description - Hook that manages a window size
4136
- * @category Elements
4137
- *
4138
- * @param {number} [params.initialWidth=Number.POSITIVE_INFINITY] The initial window width
4139
- * @param {number} [params.initialHeight=Number.POSITIVE_INFINITY] The initial window height
4140
- * @returns {UseWindowSizeReturn} An object containing the current window width and height
4141
- *
4142
- * @example
4143
- * const { width, height } = useWindowSize();
4144
- */
4145
- declare const useWindowSize: (params?: UseWindowSizeParams) => {
4146
- width: number;
4147
- height: number;
4148
- };
4149
-
4150
- interface WizardItem<WizardStepId> {
4151
- id: WizardStepId;
4152
- nodes?: WizardStepId[];
4153
- }
4154
- /**
4155
- * @name useWizard
4156
- * @description - Hook that manages a wizard
4157
- * @category Utilities
4158
- *
4159
- * @param {WizardItem<WizardStepId>[]} map The map of the wizard
4160
- * @param {WizardStepId} [initialStepId] The initial step id
4161
- * @returns {UseWizardReturn<WizardStepId>} An object containing the current step id and functions to interact with the wizard
4162
- *
4163
- * @example
4164
- * const { currentStepId, set, reset, back, history } = useWizard([
4165
- * { id: 'step1', nodes: ['step2', 'step3'] },
4166
- * { id: 'step2', nodes: ['step3'] },
4167
- * { id: 'step3', nodes: [] },
4168
- * ])
4169
- */
4170
- declare const useWizard: <WizardStepId extends string>(map: WizardItem<WizardStepId>[], initialStepId?: WizardStepId) => {
4171
- currentStepId: WizardStepId;
4172
- set: (id: WizardStepId) => void;
4173
- reset: () => void;
4174
- back: () => void;
4175
- history: WizardStepId[];
4176
- };
4177
-
4178
- declare const legacyCopyToClipboard: (value: string) => void;
4179
- declare const copy: (value: string) => Promise<void>;
4180
-
4181
- declare function debounce<Params extends unknown[]>(callback: (...args: Params) => void, delay: number): (...args: Params) => void;
4182
-
4183
- declare const getDate: (now?: Date) => {
4184
- seconds: number;
4185
- minutes: number;
4186
- hours: number;
4187
- meridiemHours: {
4188
- value: number;
4189
- type: string;
4190
- };
4191
- day: number;
4192
- month: number;
4193
- year: number;
4194
- timestamp: number;
4195
- };
4196
-
4197
- type Target = (() => Element) | string | Document | Element | Window;
4198
- type HookTarget = RefObject<Element | null | undefined> | {
4199
- value: Target;
4200
- type: symbol;
4201
- };
4202
- declare const targetSymbol: unique symbol;
4203
- declare const target: (target: Target) => {
4204
- value: Target;
4205
- type: symbol;
4206
- };
4207
- declare const getElement: (target: HookTarget) => Element | Window | Document | null | undefined;
4208
-
4209
- declare const getRetry: (retry: boolean | number) => number;
4210
-
4211
- declare const isTarget: (target: HookTarget) => boolean;
4212
-
4213
- declare const throttle: <Params extends any[]>(callback: (...args: Params) => void, delay: number) => ((...args: Params) => void);
4214
-
4215
- export { BREAKPOINTS_ANT_DESIGN, BREAKPOINTS_BOOTSTRAP_V5, BREAKPOINTS_MANTINE, BREAKPOINTS_MASTER_CSS, BREAKPOINTS_MATERIAL_UI, BREAKPOINTS_PRIME_FLEX, BREAKPOINTS_QUASAR_V2, BREAKPOINTS_SEMANTIC, BREAKPOINTS_TAILWIND, type BatteryManager, type Breakpoints, COOKIE_EVENT, type ColorSelectionOptions, type ColorSelectionResult, type Connection, type ConnectionEffectiveType, type ConnectionType, type EyeDropper, type EyeDropperConstructor, type HookTarget, type KeyboardEventHandler, type LongPressReactEvents, type OperatingSystem, type OrientationLockType, Paint, type Point, Pointer, type PositiveInteger, type RemoveCookieParams, type RequestOptions, SCRIPT_STATUS_ATTRIBUTE_NAME, STORAGE_EVENT, type ScrollPosition, type SetCookieParams, type StateRef, type Target, type UseAsyncReturn, type UseBatteryStateReturn, type UseBatteryValue, type UseBluetoothOptions, type UseBluetoothReturn, type UseBooleanReturn, type UseBreakpointsReturn, type UseBreakpointsStrategy, type UseClickOutside, type UseCookieInitialValue, type UseCookieOptions, type UseCookieReturn, type UseCopyParams, type UseCopyReturn, type UseCopyToClipboardParams, type UseCopyToClipboardReturn, type UseCounter, type UseCounterOptions, type UseCounterReturn, type UseCssVar, type UseCssVarReturn, type UseDeviceMotionParams, type UseDeviceMotionReturn, type UseDeviceOrientationReturn, type UseDeviceOrientationValue, type UseDevicePixelRatioReturn, type UseDisclosureOptions, type UseDisclosureReturn, type UseDisplayMedia, type UseDisplayMediaOptions, type UseDisplayMediaReturn, type UseDocumentTitleOptions, type UseDocumentTitleReturn, type UseElementSize, type UseElementSizeReturn, type UseElementSizeValue, type UseEventListener, type UseEventListenerOptions, type UseEventListenerReturn, type UseEyeDropperReturn, type UseFaviconReturn, type UseFieldParams, type UseFieldRegisterParams, type UseFieldReturn, type UseFileDialog, type UseFileDialogOptions, type UseFileDialogReturn, type UseFocus, type UseFocusOptions, type UseFocusReturn, type UseFullScreen, type UseFullScreenOptions, type UseFullScreenReturn, type UseGamepadStateReturn, type UseGeolocationParams, type UseGeolocationReturn, type UseHotkeys, type UseHotkeysHotkeys, type UseHotkeysKey, type UseHotkeysOptions, type UseHotkeysTarget, type UseHover, type UseHoverOptions, type UseIdleOptions, type UseIdleReturn, type UseImageOptions, type UseImageReturn, type UseInfiniteScroll, type UseInfiniteScrollOptions, type UseIntersectionObserver, type UseIntersectionObserverOptions, type UseIntersectionObserverReturn, type UseIntervalOptions, type UseIntervalReturn, type UseKeyPress, type UseKeyPressCallback, type UseKeyPressEvent, type UseKeyPressEventKey, type UseKeyPressEventOptions, type UseKeyPressKey, type UseKeyboard, type UseKeyboardOptions, type UseKeysPressed, type UseKeysPressedOptions, type UseLastChangedOptions, type UseListReturn, type UseLongPressBind, type UseLongPressOptions, type UseLongPressReturn, type UseLongPressTarget, type UseMapReturn, type UseMeasure, type UseMeasureReturn, type UseMemoryReturn, type UseMouse, type UseMouseReturn, type UseMutationObserver, type UseMutationObserverOptions, type UseMutationObserverReturn, type UseMutationObserverTarget, type UseNetworkReturn, type UseOffsetPaginationOptions, type UseOffsetPaginationReturn, type UseOptimisticReturn, type UseOrientationReturn, type UseOtpCredential, type UseOtpCredentialCallback, type UseOtpCredentialParams, type UseOtpCredentialReturn, type UsePaint, type UsePaintOptions, type UsePaintReturn, type UseParallax, type UseParallaxOptions, type UseParallaxValue, type UsePerformanceObserverOptions, type UsePermissionName, type UsePermissionOptions, type UsePermissionReturn, type UsePostMessageReturn, type UsePreferredColorSchemeReturn, type UsePreferredContrastReturn, type UsePreferredReducedMotionReturn, type UsePreviousOptions, type UseQueryOptions, type UseQueryReturn, type UseQueueReturn, type UseRafCallback, type UseRafOptions, type UseRafParams, type UseRafReturn, type UseRafValueReturn, type UseRenderInfoReturn, type UseResizeObserver, type UseResizeObserverOptions, type UseResizeObserverReturn, type UseScreenOrientationValue, type UseScriptOptions, type UseScriptStatus, type UseScroll, type UseScrollCallbackParams, type UseScrollIntoView, type UseScrollIntoViewOptions, type UseScrollIntoViewReturn, type UseScrollOptions, type UseScrollTo, type UseScrollToOptions, type UseScrollToReturn, type UseShareParams, type UseShareReturn, type UseSticky, type UseStickyAxis, type UseStickyOptions, type UseStickyReturn, type UseStopwatchOptions, type UseStopwatchReturn, type UseStorageInitialValue, type UseStorageOptions, type UseStorageReturn, type UseTextDirection, type UseTextDirectionReturn, type UseTextDirectionValue, type UseTextSelectionReturn, type UseTimeReturn, type UseTimer, type UseTimerOptions, type UseTimerReturn, type UseToggleReturn, type UseVibratePattern, type UseVibrateReturn, type UseWebSocketOptions, type UseWebSocketReturn, type UseWebSocketStatus, type UseWebSocketUrl, type UseWindowSizeReturn, type WizardItem, clearCookies, copy, debounce, dispatchCookieEvent, dispatchStorageEvent, getConnection, getCookie, getCookies, getDate, getElement, getOperatingSystem, getParsedCookies, getRangesSelection, getRetry, getTimeFromSeconds, isHotkeyMatch, isTarget, legacyCopyToClipboard, mapGamepadToXbox360Controller, removeCookie, removeCookieItem, scrollTo, setCookie, setCookieItem, target, targetSymbol, throttle, useActiveElement, useAsync, useBattery, useBluetooth, useBoolean, useBreakpoints, useBrowserLanguage, useClickOutside, useClipboard, useConst, useCookie, useCookies, useCopy, useCounter, useCssVar, useDebounceCallback, useDebounceValue, useDefault, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDidUpdate, useDisclosure, useDisplayMedia, useDocumentEvent, useDocumentTitle, useDocumentVisibility, useElementSize, useEvent, useEventListener, useEyeDropper, useFavicon, useField, useFileDialog, useFocus, useFps, useFullscreen, useGamepad, useGeolocation, useHash, useHotkeys, useHover, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useInterval, useIsFirstRender, useIsomorphicLayoutEffect, useKeyPress, useKeyPressEvent, useKeyboard, useKeysPressed, useLastChanged, useLatest, useLess, useList, useLocalStorage, useLockCallback, useLogger, useLongPress, useMap, useMeasure, useMediaQuery, useMemory, useMount, useMouse, useMutation, useMutationObserver, useNetwork, useOffsetPagination, useOnline, useOperatingSystem, useOptimistic, useOrientation, useOtpCredential, usePageLeave, usePaint, useParallax, usePerformanceObserver, usePermission, usePointerLock, usePostMessage, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useQuery, useQueue, useRaf, useRafValue, useRefState, useRenderCount, useRenderInfo, useRerender, useResizeObserver, useScreenOrientation, type useScreenOrientationReturn, useScript, useScroll, useScrollIntoView, useScrollTo, useSessionStorage, useSet, useShare, useStateHistory, useStep, useSticky, useStopwatch, useStorage, useTextDirection, useTextSelection, useThrottleCallback, useThrottleValue, useTime, useTimeout, useTimer, useToggle, useUnmount, useVibrate, useWebSocket, useWindowEvent, useWindowFocus, useWindowScroll, useWindowSize, useWizard };
1
+ export * from './hooks';
2
+ export * from './utils/helpers';