@siberiacancode/reactuse 0.0.112 → 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 -4229
  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-Blbnc4c2.js +0 -3
  686. package/dist/cjs/_rollupPluginBabelHelpers-Blbnc4c2.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-BKlpIEEg.js +0 -3
  966. package/dist/esm/_rollupPluginBabelHelpers-BKlpIEEg.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,4229 +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 useEffectOnce
2562
- * @description - Hook that runs an effect only once. Please do not use it in production code!
2563
- * @category Humor
2564
- *
2565
- * @warning - This hook run only once, but it will not run twice in strict mode. Please do not use it in production code!
2566
- *
2567
- * @param {EffectCallback} effect The effect to run
2568
- *
2569
- * @example
2570
- * useOnce(() => console.log('effect once'));
2571
- */
2572
- declare function useOnce(effect: EffectCallback): void;
2573
-
2574
- /**
2575
- * @name useOnline
2576
- * @description - Hook that manages if the user is online
2577
- * @category Sensors
2578
- *
2579
- * @browserapi navigator.onLine https://developer.mozilla.org/en-US/docs/Web/API/Navigator/onLine
2580
- *
2581
- * @returns {boolean} A boolean indicating if the user is online
2582
- *
2583
- * @example
2584
- * const online = useOnline();
2585
- */
2586
- declare const useOnline: () => boolean;
2587
-
2588
- /** The operating system type */
2589
- type OperatingSystem = 'android' | 'ios' | 'linux' | 'macos' | 'undetermined' | 'windows';
2590
- declare const getOperatingSystem: () => OperatingSystem;
2591
- /**
2592
- * @name useOperatingSystem
2593
- * @description - Hook that returns the operating system of the current browser
2594
- * @category Browser
2595
- *
2596
- * @returns {OperatingSystem} The operating system
2597
- *
2598
- * @example
2599
- * const operatingSystem = useOperatingSystem();
2600
- */
2601
- declare const useOperatingSystem: () => OperatingSystem;
2602
-
2603
- type UseOptimisticReturn<State> = [
2604
- State,
2605
- (optimisticValue: State, promise: Promise<any>) => void
2606
- ];
2607
- /**
2608
- * @name useOptimistic
2609
- * @description - Hook that allows get optimistic value before its update
2610
- * @category Utilities
2611
- *
2612
- * @template State The type of the state
2613
- * @param {State} state The value to be returned initially and whenever no action is pending
2614
- * @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
2615
- * @returns {UseOptimisticReturn<State>} The resulting optimistic state, and the function to update it
2616
- *
2617
- * @example
2618
- * const [optimisticValue, updateOptimistic] = useOptimistic<number>(count, (currentState, optimisticValue) => currentState + optimisticValue);
2619
- */
2620
- declare const useOptimistic: <State, OptimisticState = State>(externalState: State, update: (currentState: State, optimisticState: OptimisticState) => State) => readonly [State, (optimisticValue: OptimisticState, promise: Promise<any>) => Promise<any>];
2621
-
2622
- /** The use orientation return type */
2623
- interface UseOrientationReturn {
2624
- /** The current screen orientation angle */
2625
- angle: number;
2626
- /** The screen orientation type */
2627
- type: OrientationType;
2628
- }
2629
- /**
2630
- * @name useOrientation
2631
- * @description - Hook that returns the current screen orientation
2632
- * @category Browser
2633
- *
2634
- * @browserapi window.screen.orientation https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation
2635
- *
2636
- * @returns {UseOrientationReturn} An object containing the current screen orientation
2637
- *
2638
- * @example
2639
- * const { angle, type } = useOrientation();
2640
- */
2641
- declare const useOrientation: () => UseOrientationReturn;
2642
-
2643
- declare global {
2644
- interface OTPOptions {
2645
- readonly transport: string[];
2646
- }
2647
- interface CredentialRequestOptions {
2648
- readonly otp: OTPOptions;
2649
- }
2650
- interface Credential {
2651
- readonly code: string;
2652
- }
2653
- }
2654
- type UseOtpCredentialCallback = (otp: Credential | null) => void;
2655
- interface UseOtpCredentialParams {
2656
- onError: (error: any) => void;
2657
- onSuccess: (credential: Credential | null) => void;
2658
- }
2659
- interface UseOtpCredentialReturn {
2660
- abort: AbortController['abort'];
2661
- aborted: boolean;
2662
- supported: boolean;
2663
- get: () => Promise<Credential | null>;
2664
- }
2665
- interface UseOtpCredential {
2666
- (callback?: UseOtpCredentialCallback): UseOtpCredentialReturn;
2667
- (params?: UseOtpCredentialParams): UseOtpCredentialReturn;
2668
- }
2669
- /**
2670
- * @name useOtpCredential
2671
- * @description - Hook that creates an otp credential
2672
- * @category Browser
2673
- *
2674
- * @browserapi navigator.credentials https://developer.mozilla.org/en-US/docs/Web/API/Navigator/credentials
2675
- *
2676
- * @overload
2677
- * @param {UseOtpCredentialCallback} callback The callback function to be invoked
2678
- * @returns {UseOtpCredentialReturn}
2679
- *
2680
- * @example
2681
- * useOtpCredential((credential) => console.log(credential));
2682
- *
2683
- * @overload
2684
- * @param {UseOtpCredentialCallback} params.onSuccess The callback function to be invoked on success
2685
- * @param {UseOtpCredentialCallback} params.onError The callback function to be invoked on error
2686
- * @returns {UseOtpCredentialReturn}
2687
- *
2688
- * @example
2689
- * useOtpCredential({ onSuccess: (credential) => console.log(credential), onError: (error) => console.log(error) });
2690
- */
2691
- declare const useOtpCredential: UseOtpCredential;
2692
-
2693
- /**
2694
- * @name usePageLeave
2695
- * @description - Hook what calls given function when mouse leaves the page
2696
- * @category Sensors
2697
- *
2698
- * @param {() => void} [callback] The callback function what calls then mouse leaves the page
2699
- * @returns {boolean} A boolean which determines if the mouse left the page
2700
- *
2701
- * @example
2702
- * const isLeft = usePageLeave(() => console.log('on leave'))
2703
- */
2704
- declare const usePageLeave: (callback?: () => void) => boolean;
2705
-
2706
- interface Point {
2707
- x: number;
2708
- y: number;
2709
- }
2710
- declare class Pointer implements Point {
2711
- x: number;
2712
- y: number;
2713
- constructor(x: number, y: number);
2714
- update(point: Point): void;
2715
- getDifferenceTo(point: Point): Pointer;
2716
- getDistanceTo(point: Point): number;
2717
- getAngleTo(point: Point): number;
2718
- equalsTo(point: Point): boolean;
2719
- moveByAngle(angle: number, distance: number): this;
2720
- }
2721
- declare class Paint {
2722
- pointer: Pointer;
2723
- brush: Pointer;
2724
- radius: number;
2725
- smooth: boolean;
2726
- points: Point[];
2727
- lines: {
2728
- points: Point[];
2729
- color: string;
2730
- radius: number;
2731
- opacity: number;
2732
- }[];
2733
- constructor({ x, y, radius, smooth }: {
2734
- x: number;
2735
- y: number;
2736
- radius: number;
2737
- smooth: boolean;
2738
- });
2739
- getBrushCoordinates(): {
2740
- x: number;
2741
- y: number;
2742
- };
2743
- getPointerCoordinates(): {
2744
- x: number;
2745
- y: number;
2746
- };
2747
- update(point: Point): boolean;
2748
- }
2749
- interface UsePaintOptions {
2750
- /** Brush color */
2751
- color?: string;
2752
- /** Initial lines */
2753
- initialLines?: Paint['lines'];
2754
- /** Brush opacity */
2755
- opacity?: number;
2756
- /** Brush radius */
2757
- radius?: number;
2758
- /** Smooth brush movement */
2759
- smooth?: boolean;
2760
- /** Callback when the mouse is down */
2761
- onMouseDown?: (event: MouseEvent, paint: Paint) => void;
2762
- /** Callback when the mouse is moved */
2763
- onMouseMove?: (event: MouseEvent, paint: Paint) => void;
2764
- /** Callback when the mouse is up */
2765
- onMouseUp?: (event: MouseEvent, paint: Paint) => void;
2766
- }
2767
- interface UsePaintReturn {
2768
- drawing: boolean;
2769
- lines: Paint['lines'];
2770
- clear: () => void;
2771
- draw: (points: Point[], color: string, opacity: number, radius: number) => void;
2772
- undo: () => void;
2773
- }
2774
- interface UsePaint {
2775
- (target: HookTarget$1, options?: UsePaintOptions): UsePaintReturn;
2776
- <Target extends HTMLCanvasElement>(options?: UsePaintOptions, target?: never): UsePaintReturn & {
2777
- ref: StateRef<Target>;
2778
- };
2779
- }
2780
- /**
2781
- * @name usePaint
2782
- * @description - Hook that allows you to draw in a specific area
2783
- * @category Browser
2784
- *
2785
- * @overload
2786
- * @param {HookTarget} target The target element to be painted
2787
- * @param {UsePaintOptions} [options] The options to be used
2788
- * @returns {UsePaintReturn} An object containing the current pencil options and functions to interact with the paint
2789
- *
2790
- * @example
2791
- * const drawing = usePaint(canvasRef);
2792
- *
2793
- * @overload
2794
- * @param {UsePaintOptions} [options] The options to be used
2795
- * @returns {UsePaintReturn & { ref: StateRef<HTMLCanvasElement> }} An object containing the current pencil options and functions to interact with the paint
2796
- *
2797
- * @example
2798
- * const { ref, drawing } = usePaint();
2799
- */
2800
- declare const usePaint: UsePaint;
2801
-
2802
- /** The use parallax value type */
2803
- interface UseParallaxValue {
2804
- /** Roll value. Scaled to `-0.5 ~ 0.5` */
2805
- roll: number;
2806
- /** Sensor source, can be `mouse` or `deviceOrientation` */
2807
- source: 'deviceOrientation' | 'mouse';
2808
- /** Tilt value. Scaled to `-0.5 ~ 0.5` */
2809
- tilt: number;
2810
- }
2811
- /** The use parallax options type */
2812
- interface UseParallaxOptions {
2813
- /** Device orientation roll adjust function */
2814
- deviceOrientationRollAdjust?: (value: number) => number;
2815
- /** Device orientation tilt adjust function */
2816
- deviceOrientationTiltAdjust?: (value: number) => number;
2817
- /** Mouse roll adjust function */
2818
- mouseRollAdjust?: (value: number) => number;
2819
- /** Mouse tilt adjust function */
2820
- mouseTiltAdjust?: (value: number) => number;
2821
- }
2822
- interface UseParallaxReturn {
2823
- value: UseParallaxValue;
2824
- }
2825
- interface UseParallax {
2826
- (target: HookTarget$1, options?: UseParallaxOptions): UseParallaxReturn;
2827
- <Target extends Element>(options?: UseParallaxOptions, target?: never): UseParallaxReturn & {
2828
- ref: StateRef<Target>;
2829
- };
2830
- }
2831
- /**
2832
- * @name useParallax
2833
- * @description - Hook to help create parallax effect
2834
- * @category Sensors
2835
- *
2836
- * @overload
2837
- * @param {HookTarget} target The target element for the parallax effect
2838
- * @param {UseParallaxOptions} options The options for the parallax effect
2839
- * @returns {UseParallaxReturn} An object of parallax values
2840
- *
2841
- * @example
2842
- * const { value } = useParallax(ref);
2843
- *
2844
- * @overload
2845
- * @template Target The target element for the parallax effect
2846
- * @param {UseParallaxOptions} options The options for the parallax effect
2847
- * @returns {UseParallaxReturn & { ref: StateRef<Target> }} An object of parallax values
2848
- *
2849
- * @example
2850
- * const { ref, value } = useParallax();
2851
- */
2852
- declare const useParallax: UseParallax;
2853
-
2854
- /** The use performance observer options type */
2855
- type UsePerformanceObserverOptions = PerformanceObserverInit & {
2856
- /** Whether to start the observer immediately */
2857
- immediate?: boolean;
2858
- };
2859
- /**
2860
- * @name usePerformanceObserver
2861
- * @description - Hook that allows you to observe performance entries
2862
- * @category Sensors
2863
- *
2864
- * @browserapi PerformanceObserver https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver
2865
- *
2866
- * @param {UsePerformanceObserverOptions} options The options for the performance observer
2867
- * @param {PerformanceObserverCallback} callback The function to handle performance entries
2868
- * @returns {object} An object containing the observer's support status and methods to start and stop the observer
2869
- *
2870
- * @example
2871
- * const { supported, entries, start, stop } = usePerformanceObserver();
2872
- */
2873
- declare const usePerformanceObserver: (options: UsePerformanceObserverOptions, callback?: PerformanceObserverCallback) => {
2874
- supported: boolean;
2875
- entries: PerformanceEntry[];
2876
- start: () => void;
2877
- stop: () => void;
2878
- };
2879
-
2880
- /** The permission name */
2881
- 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;
2882
- /** The use permission options type */
2883
- interface UsePermissionOptions {
2884
- /** Whether the permission is enabled */
2885
- enabled: boolean;
2886
- }
2887
- /** The use permission return type */
2888
- interface UsePermissionReturn {
2889
- /** The permission state */
2890
- state: PermissionState;
2891
- /** The permission supported status */
2892
- supported: boolean;
2893
- /** The permission query function */
2894
- query: () => Promise<PermissionState>;
2895
- }
2896
- /**
2897
- * @name usePermission
2898
- * @description - Hook that gives you the state of permission
2899
- * @category Browser
2900
- *
2901
- * @browserapi navigator.permissions https://developer.mozilla.org/en-US/docs/Web/API/Navigator/permissions
2902
- *
2903
- * @param {UsePermissionName} permissionDescriptorName - The permission name
2904
- * @param {boolean} [options.enabled=true] - Whether the permission is enabled
2905
- * @returns {UsePermissionReturn} An object containing the state and the supported status
2906
- *
2907
- * @example
2908
- * const { state, supported, query } = usePermission('microphone');
2909
- */
2910
- declare const usePermission: (permissionDescriptorName: UsePermissionName, options?: UsePermissionOptions) => {
2911
- state: PermissionState;
2912
- supported: boolean;
2913
- query: () => Promise<PermissionState>;
2914
- };
2915
-
2916
- /** The use pointer lock return type */
2917
- interface UsePointerLockReturn {
2918
- /** The pointer lock element */
2919
- element?: Element;
2920
- /** Whether the pointer lock is supported */
2921
- supported: boolean;
2922
- /** Lock the pointer lock */
2923
- lock: (event: MouseEvent$1) => void;
2924
- /** Unlock the pointer lock */
2925
- unlock: () => boolean;
2926
- }
2927
- /**
2928
- * @name usePointerLock
2929
- * @description - Hook that provides reactive pointer lock
2930
- * @category Sensors
2931
- *
2932
- * @browserapi pointerLockElement https://developer.mozilla.org/en-US/docs/Web/API/Document/pointerLockElement
2933
- *
2934
- * @returns {UsePointerLockReturn} An object containing the pointer lock element and functions to interact with the pointer lock
2935
- *
2936
- * @example
2937
- * const { supported, lock, unlock, element } = usePointerLock();
2938
- */
2939
- declare const usePointerLock: () => UsePointerLockReturn;
2940
-
2941
- type UsePostMessageReturn<Message> = (message: Message) => void;
2942
- /**
2943
- * @name usePostMessage
2944
- * @description - Hook that allows you to receive messages from other origins
2945
- * @category Browser
2946
- *
2947
- * @overload
2948
- * @template Message The message data type
2949
- * @param {string | string[]} origin The origin of the message
2950
- * @param {(message: Message) => Message} callback callback to get received message
2951
- * @returns {(message: Message) => void} An object containing the current message
2952
- *
2953
- * @example
2954
- * const postMessage = usePostMessage();
2955
- */
2956
- declare const usePostMessage: <Message>(origin: string | "*" | string[], callback: (message: Message, event: MessageEvent<Message>) => void) => UsePostMessageReturn<Message>;
2957
-
2958
- /** The use preferred color scheme return type */
2959
- type UsePreferredColorSchemeReturn = 'dark' | 'light' | 'no-preference';
2960
- /**
2961
- * @name usePreferredColorScheme
2962
- * @description - Hook that returns user preferred color scheme
2963
- * @category Browser
2964
- *
2965
- * @returns {UsePreferredColorSchemeReturn} String of preferred color scheme
2966
- *
2967
- * @example
2968
- * const colorScheme = usePreferredColorScheme();
2969
- */
2970
- declare const usePreferredColorScheme: () => UsePreferredColorSchemeReturn;
2971
-
2972
- /** The use preferred contrast return type */
2973
- type UsePreferredContrastReturn = 'custom' | 'less' | 'more' | 'no-preference';
2974
- /**
2975
- * @name usePreferredContrast
2976
- * @description - Hook that returns the contrast preference
2977
- * @category Browser
2978
- *
2979
- * @returns {UsePreferredContrastReturn} The contrast preference
2980
- *
2981
- * @example
2982
- * const contrast = usePreferredContrast();
2983
- */
2984
- declare const usePreferredContrast: () => UsePreferredContrastReturn;
2985
-
2986
- /**
2987
- * @name usePreferredDark
2988
- * @description - Hook that returns if the user prefers dark mode
2989
- * @category Browser
2990
- *
2991
- * @example
2992
- * const isDark = usePreferredDark();
2993
- */
2994
- declare const usePreferredDark: () => boolean;
2995
-
2996
- /**
2997
- * @name usePreferredLanguages
2998
- * @description Hook that returns a browser preferred languages from navigator
2999
- * @category Browser
3000
- *
3001
- * @browserapi navigator.languages https://developer.mozilla.org/en-US/docs/Web/API/Navigator/languages
3002
- *
3003
- * @returns {readonly string[]} An array of strings representing the user's preferred languages
3004
- *
3005
- * @example
3006
- * const languages = usePreferredLanguages();
3007
- */
3008
- declare const usePreferredLanguages: () => readonly string[];
3009
-
3010
- /** The use preferred reduced motion return type */
3011
- type UsePreferredReducedMotionReturn = 'no-preference' | 'reduce';
3012
- /**
3013
- * @name usePreferredReducedMotion
3014
- * @description - Hook that returns the reduced motion preference
3015
- * @category Browser
3016
- *
3017
- * @returns {UsePreferredReducedMotionReturn} The reduced motion preference
3018
- *
3019
- * @example
3020
- * const reduced = usePreferredReducedMotion();
3021
- */
3022
- declare const usePreferredReducedMotion: () => UsePreferredReducedMotionReturn;
3023
-
3024
- interface UsePreviousOptions<Value> {
3025
- equality: (a: Value, b: Value) => boolean;
3026
- }
3027
- /**
3028
- * @name usePrevious
3029
- * @description - Hook that returns the previous value
3030
- * @category Utilities
3031
- *
3032
- * @template Value The type of the value
3033
- * @param {Value} value The value to get the previous value
3034
- * @param {(a: Value, b: Value) => boolean} [options.equality] The custom equality function to determine if the value has changed
3035
- * @returns {Value} The previous value
3036
- *
3037
- * @example
3038
- * const prevValue = usePrevious(value);
3039
- */
3040
- declare const usePrevious: <Value>(value: Value, options?: UsePreviousOptions<Value>) => Value | undefined;
3041
-
3042
- /** The use queue return type */
3043
- interface UseQueueReturn<Value> {
3044
- /** Get the first element of the queue */
3045
- first: Value;
3046
- /** Get the last element of the queue */
3047
- last: Value;
3048
- /** The current queue */
3049
- queue: Value[];
3050
- /** Get the size of the queue */
3051
- size: number;
3052
- /** Add an element to the queue */
3053
- add: (element: Value) => void;
3054
- /** Clear the queue */
3055
- clear: () => void;
3056
- /** Remove an element from the queue */
3057
- remove: () => Value;
3058
- }
3059
- /**
3060
- * @name useQueue
3061
- * @description - Hook that manages a queue
3062
- * @category Utilities
3063
- *
3064
- * @template Value The type of the value
3065
- * @param {Value[]} [initialValue=[]] The initial value of the queue
3066
- * @returns {UseQueueReturn} An object containing the current queue and functions to interact with the queue
3067
- *
3068
- * @example
3069
- * const { queue, add, remove, clear, first, last, size } = useQueue([1, 2, 3]);
3070
- */
3071
- declare const useQueue: <Value>(initialValue?: Value[]) => UseQueueReturn<Value>;
3072
-
3073
- interface UseRafParams {
3074
- /** The delta between each frame in milliseconds */
3075
- delta: number;
3076
- /** The timestamp of the current frame in milliseconds */
3077
- timestamp: DOMHighResTimeStamp;
3078
- }
3079
- type UseRafCallback = (params: UseRafParams) => void;
3080
- interface UseRafOptions {
3081
- /** The delay between each frame in milliseconds */
3082
- delay?: number;
3083
- /** Whether the callback should be enabled */
3084
- enabled?: boolean;
3085
- }
3086
- interface UseRafReturn {
3087
- /** Whether the callback is active */
3088
- active: boolean;
3089
- /** Function to pause the callback */
3090
- pause: () => void;
3091
- /** Function to resume the callback */
3092
- resume: () => void;
3093
- }
3094
- /**
3095
- * @name useRaf
3096
- * @description - Hook that defines the logic for raf callback
3097
- * @category Utilities
3098
- *
3099
- * @browserapi requestAnimationFrame https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
3100
- *
3101
- * @param {UseRafCallback} callback The callback to execute
3102
- * @param {number} [options.delay] The delay between each frame in milliseconds
3103
- * @param {boolean} [options.enabled=true] Whether the callback should be enabled
3104
- * @returns {UseRafCallbackReturn} An object of raf callback functions
3105
- *
3106
- * @example
3107
- * useRaf(() => console.log('callback'));
3108
- */
3109
- declare const useRaf: (callback: UseRafCallback, options?: UseRafOptions) => UseRafReturn;
3110
-
3111
- type UseRafValueReturn<Value> = [Value, (value: Value) => void];
3112
- /**
3113
- * @name useRafValue
3114
- * @description - Hook that returns the value and a function to set the value
3115
- * @category Utilities
3116
- *
3117
- * @template Value The type of the value
3118
- * @param {Value} initialValue The initial value
3119
- * @returns {UseRafValueReturn<Value>} An array containing the value and a function to set the value
3120
- *
3121
- * @example
3122
- * const [value, setValue] = useRafValue(initialValue);
3123
- */
3124
- declare const useRafValue: <Value>(initialValue: (() => Value) | Value) => readonly [Value, (value: Value) => void];
3125
-
3126
- /**
3127
- * @name useRenderCount
3128
- * @description - Hook returns count component render times
3129
- * @category Lifecycle
3130
- *
3131
- * @returns {number} A number which determines how many times component renders
3132
- *
3133
- * @example
3134
- * const renderCount = useRenderCount();
3135
- */
3136
- declare const useRenderCount: () => number;
3137
-
3138
- interface UseRenderInfoReturn {
3139
- component: string;
3140
- renders: number;
3141
- sinceLast: number;
3142
- timestamp: number | null;
3143
- }
3144
- /**
3145
- * @name useRenderInfo
3146
- * @description - Hook for getting information about component rerender
3147
- * @category Lifecycle
3148
- *
3149
- * @param {string} [name='Unknown'] Component name
3150
- * @param {boolean} [log=true] Toggle logging
3151
- * @returns {UseRenderInfoReturn} An object containing rerender information
3152
- *
3153
- * @example
3154
- * const rerenderInfo = useRenderInfo('Component');
3155
- */
3156
- declare const useRenderInfo: (name?: string, log?: boolean) => UseRenderInfoReturn;
3157
-
3158
- /** The use rerender return type */
3159
- type UseRerenderReturn = () => void;
3160
- /**
3161
- * @name useRerender
3162
- * @description - Hook that defines the logic to force rerender a component
3163
- * @category Lifecycle
3164
- *
3165
- * @returns {UseRerenderReturn} The rerender function
3166
- *
3167
- * @example
3168
- * const rerender = useRerender();
3169
- */
3170
- declare const useRerender: () => UseRerenderReturn;
3171
-
3172
- /** The resize observer options type */
3173
- interface UseResizeObserverOptions extends ResizeObserverOptions {
3174
- /** The enabled state */
3175
- enabled?: boolean;
3176
- /** The resize observer callback */
3177
- onChange?: (entries: ResizeObserverEntry[], observer: ResizeObserver) => void;
3178
- }
3179
- /** The resize observer return type */
3180
- interface UseResizeObserverReturn {
3181
- /** The resize observer entries */
3182
- entries: ResizeObserverEntry[];
3183
- }
3184
- interface UseResizeObserver {
3185
- (target: HookTarget$1, options?: UseResizeObserverOptions): UseResizeObserverReturn;
3186
- <Target extends Element>(options?: UseResizeObserverOptions, target?: never): UseResizeObserverReturn & {
3187
- ref: StateRef<Target>;
3188
- };
3189
- }
3190
- /**
3191
- * @name useResizeObserver
3192
- * @description - Hook that gives you resize observer state
3193
- * @category Browser
3194
- *
3195
- * @browserapi ResizeObserver https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver
3196
- *
3197
- * @overload
3198
- * @template Target The target element
3199
- * @param {boolean} [options.enabled=true] The IntersectionObserver options
3200
- * @param {boolean} [options.box] The IntersectionObserver options
3201
- * @param {(entries: ResizeObserverEntry[], observer: ResizeObserver) => void} [options.onChange] The callback to execute when resize is detected
3202
- * @returns {UseResizeObserverReturn & { ref: StateRef<Target> }} An object containing the resize observer state
3203
- *
3204
- * @example
3205
- * const { ref, entries } = useResizeObserver();
3206
- *
3207
- * @overload
3208
- * @template Target The target element
3209
- * @param {HookTarget} target The target element to observe
3210
- * @param {boolean} [options.enabled=true] The IntersectionObserver options
3211
- * @param {boolean} [options.box] The IntersectionObserver options
3212
- * @param {(entries: ResizeObserverEntry[], observer: ResizeObserver) => void} [options.onChange] The callback to execute when resize is detected
3213
- * @returns {UseResizeObserverReturn} An object containing the resize observer state
3214
- *
3215
- * @example
3216
- * const { entries } = useResizeObserver(ref);
3217
- */
3218
- declare const useResizeObserver: UseResizeObserver;
3219
-
3220
- declare global {
3221
- interface ScreenOrientation {
3222
- lock: (orientation: OrientationLockType) => Promise<void>;
3223
- }
3224
- }
3225
- interface UseScreenOrientationValue {
3226
- /** The current angle */
3227
- angle: number;
3228
- /** The current orientation type */
3229
- orientationType: OrientationType;
3230
- }
3231
- type OrientationLockType = 'any' | 'landscape-primary' | 'landscape-secondary' | 'landscape' | 'natural' | 'portrait-primary' | 'portrait-secondary' | 'portrait';
3232
- interface useScreenOrientationReturn {
3233
- /** Whether the screen orientation is supported */
3234
- supported: boolean;
3235
- /** The current screen orientation value */
3236
- value: UseScreenOrientationValue;
3237
- /** Lock the screen orientation */
3238
- lock: (orientation: OrientationLockType) => void;
3239
- /** Unlock the screen orientation */
3240
- unlock: () => void;
3241
- }
3242
- /**
3243
- * @name useScreenOrientation
3244
- * @description - Hook that provides the current screen orientation
3245
- * @category Sensors
3246
- *
3247
- * @browserapi screen.orientation https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation
3248
- *
3249
- * @returns {useScreenOrientationReturn} The current screen orientation
3250
- *
3251
- * @example
3252
- * const { supported, value, lock, unlock } = useScreenOrientation();
3253
- */
3254
- declare const useScreenOrientation: () => useScreenOrientationReturn;
3255
-
3256
- /** The use script status */
3257
- type UseScriptStatus = 'error' | 'loading' | 'ready' | 'unknown';
3258
- declare const SCRIPT_STATUS_ATTRIBUTE_NAME = "script-status";
3259
- /** The use script options extends from attributes script tag */
3260
- interface UseScriptOptions extends ComponentProps<'script'> {
3261
- /** Whether to remove the script on unmount */
3262
- removeOnUnmount?: boolean;
3263
- }
3264
- /**
3265
- * @name useScript
3266
- * @description - Hook that manages a script with onLoad, onError, and removeOnUnmount functionalities
3267
- * @category Browser
3268
- *
3269
- * @param {string} src The source of the script
3270
- * @param {UseScriptOptions} [options] The options of the script extends from attributes script tag
3271
- * @param {boolean} [options.removeOnUnmount=true] Whether to remove the script on unmount
3272
- * @param {boolean} [options.async=true] Whether to load the script asynchronously
3273
- * @returns {UseScriptStatus} The status of the script
3274
- *
3275
- * @example
3276
- * const status = useScript('https://example.com/script.js');
3277
- */
3278
- declare const useScript: (src: string, options?: UseScriptOptions) => UseScriptStatus;
3279
-
3280
- interface UseScrollOptions {
3281
- /** The on scroll callback */
3282
- onScroll?: (params: UseScrollCallbackParams, event: Event) => void;
3283
- /** The on end scroll callback */
3284
- onStop?: (event: Event) => void;
3285
- /** Offset arrived states by x pixels. */
3286
- offset?: {
3287
- left?: number;
3288
- right?: number;
3289
- top?: number;
3290
- bottom?: number;
3291
- };
3292
- }
3293
- interface UseScrollCallbackParams {
3294
- /** The element x position */
3295
- x: number;
3296
- /** The element y position */
3297
- y: number;
3298
- /** State of scroll arrived */
3299
- arrived: {
3300
- left: boolean;
3301
- right: boolean;
3302
- top: boolean;
3303
- bottom: boolean;
3304
- };
3305
- /** State of scroll direction */
3306
- directions: {
3307
- left: boolean;
3308
- right: boolean;
3309
- top: boolean;
3310
- bottom: boolean;
3311
- };
3312
- }
3313
- interface UseScroll {
3314
- (target: HookTarget$1, callback?: (params: UseScrollCallbackParams, event: Event) => void): boolean;
3315
- (target: HookTarget$1, options?: UseScrollOptions): boolean;
3316
- <Target extends Element>(callback?: (params: UseScrollCallbackParams, event: Event) => void, target?: never): {
3317
- ref: StateRef<Target>;
3318
- scrolling: boolean;
3319
- };
3320
- <Target extends Element>(options?: UseScrollOptions, target?: never): {
3321
- ref: StateRef<Target>;
3322
- scrolling: boolean;
3323
- };
3324
- }
3325
- /**
3326
- * @name useScroll
3327
- * @description - Hook that allows you to control scroll a element
3328
- * @category Sensors
3329
- *
3330
- * @overload
3331
- * @template Target The target element
3332
- * @param {ScrollBehavior} [options.behavior=auto] The behavior of scrolling
3333
- * @param {number} [options.offset.left=0] The left offset for arrived states
3334
- * @param {number} [options.offset.right=0] The right offset for arrived states
3335
- * @param {number} [options.offset.top=0] The top offset for arrived states
3336
- * @param {number} [options.offset.bottom=0] The bottom offset for arrived states
3337
- * @param {(params: UseScrollCallbackParams, event: Event) => void} [options.onScroll] The callback function to be invoked on scroll
3338
- * @param {(event: Event) => void} [options.onStop] The callback function to be invoked on scroll end
3339
- * @returns {boolean} The state of scrolling
3340
- *
3341
- * @example
3342
- * const scrolling = useScroll(ref, options);
3343
- *
3344
- * @overload
3345
- * @template Target The target element
3346
- * @param {(params: UseScrollCallbackParams, event: Event) => void} [callback] The callback function to be invoked on scroll
3347
- * @returns {boolean} The state of scrolling
3348
- *
3349
- * @example
3350
- * const scrolling = useScroll(ref, () => console.log('callback'));
3351
- *
3352
- * @overload
3353
- * @template Target The target element
3354
- * @param {Target} target The target element to scroll
3355
- * @param {ScrollBehavior} [options.behavior=auto] The behavior of scrolling
3356
- * @param {number} [options.offset.left=0] The left offset for arrived states
3357
- * @param {number} [options.offset.right=0] The right offset for arrived states
3358
- * @param {number} [options.offset.top=0] The top offset for arrived states
3359
- * @param {number} [options.offset.bottom=0] The bottom offset for arrived states
3360
- * @param {(params: UseScrollCallbackParams, event: Event) => void} [options.onScroll] The callback function to be invoked on scroll
3361
- * @param {(event: Event) => void} [options.onStop] The callback function to be invoked on scroll end
3362
- * @returns {[StateRef<Target>, boolean]} The state of scrolling
3363
- *
3364
- * @example
3365
- * const { ref, scrolling } = useScroll(options);
3366
- *
3367
- * @overload
3368
- * @template Target The target element
3369
- * @param {Target} target The target element to scroll
3370
- * @param {(params: UseScrollCallbackParams, event: Event) => void} [callback] The callback function to be invoked on scroll
3371
- * @returns {[StateRef<Target>, boolean]} The state of scrolling
3372
- *
3373
- * @example
3374
- * const { ref, scrolling } = useScroll(() => console.log('callback'));
3375
- */
3376
- declare const useScroll: UseScroll;
3377
-
3378
- /** The scroll into view options type */
3379
- interface UseScrollIntoViewOptions extends ScrollIntoViewOptions {
3380
- /** Whether to enable the scroll into view */
3381
- enabled?: boolean;
3382
- }
3383
- /** The scroll into view return type */
3384
- interface UseScrollIntoViewReturn {
3385
- /** Function to scroll element into view */
3386
- trigger: (params?: {
3387
- behavior?: ScrollBehavior;
3388
- block?: ScrollLogicalPosition;
3389
- inline?: ScrollLogicalPosition;
3390
- }) => void;
3391
- }
3392
- interface UseScrollIntoView {
3393
- <Target extends Element>(options?: UseScrollIntoViewOptions, target?: never): UseScrollIntoViewReturn & {
3394
- ref: StateRef<Target>;
3395
- };
3396
- (target: HookTarget$1, options?: UseScrollIntoViewOptions): UseScrollIntoViewReturn;
3397
- }
3398
- /**
3399
- * @name useScrollIntoView
3400
- * @description - Hook that provides functionality to scroll an element into view
3401
- * @category Sensors
3402
- *
3403
- * @overload
3404
- * @param {HookTarget} target The target element to scroll into view
3405
- * @param {ScrollBehavior} [options.behavior='smooth'] The scrolling behavior
3406
- * @param {ScrollLogicalPosition} [options.block='start'] The vertical alignment
3407
- * @param {ScrollLogicalPosition} [options.inline='nearest'] The horizontal alignment
3408
- * @returns {UseScrollIntoViewReturn} Object containing scroll function
3409
- *
3410
- * @example
3411
- * const { trigger } = useScrollIntoView(ref);
3412
- *
3413
- * @overload
3414
- * @template Target The target element
3415
- * @param {ScrollBehavior} [options.behavior='smooth'] The scrolling behavior
3416
- * @param {ScrollLogicalPosition} [options.block='start'] The vertical alignment
3417
- * @param {ScrollLogicalPosition} [options.inline='nearest'] The horizontal alignment
3418
- * @returns {UseScrollIntoViewReturn & { ref: StateRef<Target> }} Object containing scroll function and ref
3419
- *
3420
- * @example
3421
- * const { ref, trigger } = useScrollIntoView<HTMLDivElement>();
3422
- */
3423
- declare const useScrollIntoView: UseScrollIntoView;
3424
-
3425
- /** The use scroll to options type */
3426
- interface UseScrollToOptions {
3427
- /** The scrolling behavior */
3428
- behavior?: ScrollBehavior;
3429
- /** Whether to enable the scroll to */
3430
- enabled?: boolean;
3431
- /** The horizontal position to scroll to */
3432
- x: number;
3433
- /** The vertical position to scroll to */
3434
- y: number;
3435
- }
3436
- /** The use scroll to return type */
3437
- interface UseScrollToReturn {
3438
- /** The state of scrolling */
3439
- trigger: (params?: {
3440
- x: number;
3441
- y: number;
3442
- behavior?: ScrollBehavior;
3443
- }) => void;
3444
- }
3445
- interface UseScrollTo {
3446
- <Target extends Element>(options?: UseScrollToOptions, target?: never): UseScrollToReturn & {
3447
- ref: StateRef<Target>;
3448
- };
3449
- (target: HookTarget$1, options?: UseScrollToOptions): UseScrollToReturn;
3450
- }
3451
- /**
3452
- * @name useScrollTo
3453
- * @description - Hook for scrolling to a specific element
3454
- * @category Sensors
3455
- *
3456
- * @overload
3457
- * @param {HookTarget} target The target element for scrolling to
3458
- * @param {UseScrollToOptions} [options] The scroll options
3459
- * @returns {UseScrollToReturn} The scroll trigger function
3460
- *
3461
- * @example
3462
- * const trigger = useScrollTo(ref, options);
3463
- *
3464
- * @overload
3465
- * @template Target The target element
3466
- * @param {UseScrollToOptions} [options] The scroll options
3467
- * @returns {UseScrollToReturn & { ref: StateRef<Target> }} The scroll trigger function and ref
3468
- *
3469
- * @example
3470
- * const { ref, trigger } = useScrollTo(options);
3471
- */
3472
- declare const useScrollTo: UseScrollTo;
3473
-
3474
- /**
3475
- * @name useSessionStorage
3476
- * @description - Hook that manages session storage value
3477
- * @category Browser
3478
- *
3479
- * @browserapi sessionStorage https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage
3480
- *
3481
- * @template Value The type of the value
3482
- * @param {string} key The key of the storage
3483
- * @param {UseStorageInitialValue<Value>} [initialValue] The initial value of the storage
3484
- * @param {UseStorageOptions<Value>} [options] The options of the storage
3485
- *
3486
- * @example
3487
- * const { value, set, remove } = useSessionStorage('key', 'value');
3488
- */
3489
- declare const useSessionStorage: <Value>(key: string, initialValue?: UseStorageInitialValue<Value>, options?: Omit<UseStorageOptions<Value>, "initialValue" | "storage">) => {
3490
- value: Value | undefined;
3491
- set: (value: Value) => void;
3492
- remove: () => void;
3493
- };
3494
-
3495
- /** The use set return type */
3496
- interface UseSetReturn<Value> {
3497
- /** The size of the set */
3498
- size: number;
3499
- /** The current set */
3500
- value: Set<Value>;
3501
- /** Function to add a value to the set */
3502
- add: (value: Value) => void;
3503
- /** Function to clear the set */
3504
- clear: () => void;
3505
- /** Function to get the symmetric difference of two sets */
3506
- difference: (other: Set<Value>) => void;
3507
- /** Function to check if a value exists in the set */
3508
- has: (value: Value) => boolean;
3509
- /** Function to get the difference of two sets */
3510
- intersection: (other: Set<Value>) => void;
3511
- /** Function to remove a value from the set */
3512
- remove: (value: Value) => void;
3513
- /** Function to toggle a value in the set */
3514
- reset: () => void;
3515
- /** Function to get the symmetric difference of two sets */
3516
- symmetricDifference: (other: Set<Value>) => void;
3517
- /** Function to toggle a value in the set */
3518
- toggle: (value: Value) => void;
3519
- /** Function to get the union of two sets */
3520
- union: (other: Set<Value>) => void;
3521
- }
3522
- /**
3523
- * @name useSet
3524
- * @description - Hook that manages a set structure
3525
- * @category Utilities
3526
- *
3527
- * @template Value The type of the value
3528
- * @param {Value[]} [values] The initial array of the set
3529
- * @returns {UseSetReturn<Value>} An object containing the current set and functions to interact with the set
3530
- *
3531
- * @example
3532
- * const { value, add, remove, clear, reset, toggle, union, intersection, difference, symmetricDifference, size, has } = useSet([1, 2, 3]);
3533
- */
3534
- declare const useSet: <Value>(values?: Value[]) => UseSetReturn<Value>;
3535
-
3536
- /** The use share options type */
3537
- interface UseShareParams {
3538
- /** Array of files to be shared */
3539
- files?: File[];
3540
- /** Text content to be shared */
3541
- text?: string;
3542
- /** Title of the content being shared */
3543
- title?: string;
3544
- /** URL link to be shared */
3545
- url?: string;
3546
- }
3547
- /** The use share return type */
3548
- interface UseShareReturn {
3549
- /** Whether the Web Share API is supported in the current environment */
3550
- supported: boolean;
3551
- /** Function to trigger the native share dialog */
3552
- share: (shareParams: ShareData) => Promise<void>;
3553
- }
3554
- /**
3555
- * @name useShare
3556
- * @description - Hook that utilizes the share api
3557
- * @category Browser
3558
- *
3559
- * @param {UseShareParams} [params] The use share options
3560
- * @returns {UseShareReturn}
3561
- *
3562
- * @example
3563
- * const { share, supported } = useShare();
3564
- */
3565
- declare const useShare: (params?: UseShareParams) => {
3566
- share: (shareParams: ShareData) => Promise<void>;
3567
- supported: boolean;
3568
- };
3569
-
3570
- /** The use state history hook return type */
3571
- interface UseStateHistoryReturn<Value> {
3572
- /** All history values */
3573
- history: Value[];
3574
- /** Current index in history */
3575
- index: number;
3576
- /** Current value */
3577
- value: Value;
3578
- /** Go back specified number of steps in history (default: 1) */
3579
- back: (steps?: number) => void;
3580
- /** Go forward specified number of steps in history (default: 1) */
3581
- forward: (steps?: number) => void;
3582
- /** Reset history to initial state */
3583
- reset: () => void;
3584
- /** Set a new value */
3585
- set: (value: Value) => void;
3586
- /** Undo the last change */
3587
- undo: () => void;
3588
- }
3589
- /**
3590
- * @name useStateHistory
3591
- * @description - Hook that manages state with history functionality
3592
- * @category Utilities
3593
- *
3594
- * @param {Value} initialValue - The initial value to start the history with
3595
- * @param {number} [maxSize=10] - Maximum number of history entries to keep
3596
- * @returns {UseStateHistoryReturn<Value>} Object containing current value, history array and control methods
3597
- *
3598
- * @example
3599
- * const { value, history, index, set, back, forward, reset, undo } = useStateHistory(0);
3600
- */
3601
- declare const useStateHistory: <Value>(initialValue: Value, maxSize?: number) => UseStateHistoryReturn<Value>;
3602
-
3603
- /** The use step params type */
3604
- interface UseStepParams {
3605
- /** Initial value for step */
3606
- initial: number;
3607
- /** Maximum value for step */
3608
- max: number;
3609
- }
3610
- /** The use step return type */
3611
- interface UseStepReturn {
3612
- /** Counts of steps */
3613
- counts: number;
3614
- /** Current value of step */
3615
- currentStep: number;
3616
- /** Boolean value if current step is first */
3617
- isFirst: boolean;
3618
- /** Boolean value if current step is last */
3619
- isLast: boolean;
3620
- /** Go to back step */
3621
- back: () => void;
3622
- /** Go to next step */
3623
- next: () => void;
3624
- /** Reset current step to initial value */
3625
- reset: () => void;
3626
- /** Go to custom step */
3627
- set: (value: number | 'first' | 'last') => void;
3628
- }
3629
- /**
3630
- * @name useStep
3631
- * @description - Hook that create stepper
3632
- * @category Utilities
3633
- *
3634
- * @overload
3635
- * @param {number} max Maximum number of steps
3636
- * @returns {UseStepReturn} An object contains variables and functions to change the step
3637
- *
3638
- * @example
3639
- * const stepper = useStep(5);
3640
- *
3641
- * @overload
3642
- * @param {number} params.max Maximum number of steps
3643
- * @param {number} params.initial Initial value for step
3644
- * @returns {UseStepReturn} An object contains variables and functions to change the step
3645
- *
3646
- * @example
3647
- * const stepper = useStep({ initial: 2, max: 5 });
3648
- */
3649
- declare const useStep: (params: number | UseStepParams) => UseStepReturn;
3650
-
3651
- /** The use sticky return type */
3652
- interface UseStickyReturn {
3653
- stuck: boolean;
3654
- }
3655
- /** The use sticky axis type */
3656
- type UseStickyAxis = 'horizontal' | 'vertical';
3657
- /** The use sticky options type */
3658
- interface UseStickyOptions {
3659
- axis?: UseStickyAxis;
3660
- root?: HookTarget$1;
3661
- }
3662
- interface UseSticky {
3663
- (target: HookTarget$1, options?: UseStickyOptions): boolean;
3664
- <Target extends Element>(options?: UseStickyOptions, target?: never): {
3665
- ref: StateRef<Target>;
3666
- } & UseStickyReturn;
3667
- }
3668
- /**
3669
- * @name UseSticky
3670
- * @description - Hook that allows you to detect that your sticky component is stuck
3671
- * @category Browser
3672
- *
3673
- * @overload
3674
- * @param {HookTarget} target The target sticky element
3675
- * @param {UseStickyAxis} [options.axis='vertical'] The axis of motion of the sticky component
3676
- * @param {UseStickyRoot} [options.root=document] The element that contains your sticky component
3677
- * @returns {UseStickyReturn} The state of the sticky
3678
- *
3679
- * @example
3680
- * const stuck = useSticky(ref);
3681
- *
3682
- * @overload
3683
- * @param {UseStickyAxis} [options.axis='vertical'] The axis of motion of the sticky component
3684
- * @param {UseStickyRoot} [options.root=document] The element that contains your sticky component
3685
- * @returns {{ stickyRef: StateRef<Target> } & UseStickyReturn} The state of the sticky
3686
- *
3687
- * @example
3688
- * const { stuck, ref } = useSticky();
3689
- */
3690
- declare const useSticky: UseSticky;
3691
-
3692
- /** The use stopwatch return type */
3693
- interface UseStopwatchReturn {
3694
- /** The total count of the stopwatch */
3695
- count: number;
3696
- /** The day count of the stopwatch */
3697
- days: number;
3698
- /** The hour count of the stopwatch */
3699
- hours: number;
3700
- /** The minute count of the stopwatch */
3701
- minutes: number;
3702
- /** The over state of the stopwatch */
3703
- over: boolean;
3704
- /** The paused state of the stopwatch */
3705
- paused: boolean;
3706
- /** The second count of the stopwatch */
3707
- seconds: number;
3708
- /** The function to pause the stopwatch */
3709
- pause: () => void;
3710
- /** The function to reset the stopwatch */
3711
- reset: () => void;
3712
- /** The function to start the stopwatch */
3713
- start: () => void;
3714
- /** The function to toggle the stopwatch */
3715
- toggle: () => void;
3716
- }
3717
- /** The use stopwatch options */
3718
- interface UseStopwatchOptions {
3719
- /** The enabled state of the timer */
3720
- enabled?: boolean;
3721
- }
3722
- interface UseStopwatch {
3723
- (initialTime?: number, options?: UseStopwatchOptions): UseStopwatchReturn;
3724
- (options?: UseStopwatchOptions & {
3725
- initialTime?: number;
3726
- }): UseStopwatchReturn;
3727
- }
3728
- /**
3729
- * @name useStopwatch
3730
- * @description - Hook that creates a stopwatch functionality
3731
- * @category Time
3732
- *
3733
- * @overload
3734
- * @param {number} [initialTime=0] The initial time of the timer
3735
- * @param {boolean} [options.enabled=true] The enabled state of the timer
3736
- * @returns {UseStopwatchReturn} An object containing the current time and functions to interact with the timer
3737
- *
3738
- * @example
3739
- * const { seconds, minutes, start, pause, reset } = useStopwatch(1000, { enabled: false });
3740
- *
3741
- * @overload
3742
- * @param {number} [options.initialTime=0] -The initial time of the timer
3743
- * @param {boolean} [options.enabled=true] The enabled state of the timer
3744
- * @returns {UseStopwatchReturn} An object containing the current time and functions to interact with the timer
3745
- *
3746
- * @example
3747
- * const { seconds, minutes, start, pause, reset } = useStopwatch({ initialTime: 1000, enabled: false });
3748
- */
3749
- declare const useStopwatch: UseStopwatch;
3750
-
3751
- /** The use text direction value type */
3752
- type UseTextDirectionValue = 'auto' | 'ltr' | 'rtl';
3753
- /** The use text direction return type */
3754
- interface UseTextDirectionReturn {
3755
- /** The current direction */
3756
- value: UseTextDirectionValue;
3757
- /*** The function to remove the direction */
3758
- remove: () => void;
3759
- /*** The function to set the direction */
3760
- set: (value: UseTextDirectionValue | null) => void;
3761
- }
3762
- interface UseTextDirection {
3763
- (target: HookTarget$1, initialValue?: UseTextDirectionValue): UseTextDirectionReturn;
3764
- <Target extends Element>(initialValue?: UseTextDirectionValue, target?: never): UseTextDirectionReturn & {
3765
- ref: StateRef<Target>;
3766
- };
3767
- }
3768
- /**
3769
- * @name useTextDirection
3770
- * @description - Hook that can get and set the direction of the element
3771
- * @category Browser
3772
- *
3773
- * @overload
3774
- * @param {HookTarget} target The target element to observe
3775
- * @param {UseTextDirectionValue} [initialValue = 'ltr'] The initial direction of the element
3776
- * @returns {UseTextDirectionReturn} An object containing the current text direction of the element
3777
- *
3778
- * @example
3779
- * const { value, set, remove } = useTextDirection(ref);
3780
- *
3781
- * @overload
3782
- * @template Target The target element type
3783
- * @param {UseTextDirectionValue} [initialValue = 'ltr'] The initial direction of the element
3784
- * @returns { { ref: StateRef<Target> } & UseTextDirectionReturn } An object containing the current text direction of the element
3785
- *
3786
- * @example
3787
- * const { ref, value, set, remove } = useTextDirection();
3788
- */
3789
- declare const useTextDirection: UseTextDirection;
3790
-
3791
- declare const getRangesSelection: (selection: Selection) => Range[];
3792
- /** The use text selection return type */
3793
- interface UseTextSelectionReturn {
3794
- /** The current selection ranges */
3795
- ranges: Range[];
3796
- /** The current selection rects */
3797
- rects: DOMRect[];
3798
- /** The current selection */
3799
- selection: Selection | null;
3800
- /** The current selection text */
3801
- text: string;
3802
- }
3803
- /**
3804
- * @name useTextSelection
3805
- * @description - Hook that manages the text selection
3806
- * @category Sensors
3807
- *
3808
- * @browserapi document.getSelection https://developer.mozilla.org/en-US/docs/Web/API/Document/getSelection
3809
- *
3810
- * @returns {UseTextSelectionReturn} An object containing the current text selection
3811
- *
3812
- * @example
3813
- * const selection = useTextSelection();
3814
- */
3815
- declare const useTextSelection: () => UseTextSelectionReturn;
3816
-
3817
- /**
3818
- * @name useThrottleCallback
3819
- * @description - Hook that creates a throttled callback
3820
- * @category Utilities
3821
- *
3822
- * @template Params The type of the params
3823
- * @template Return The type of the return
3824
- * @param {(...args: Params) => Return} callback The callback function
3825
- * @param {number} delay The delay in milliseconds
3826
- * @returns {(...args: Params) => Return} The callback with throttle
3827
- *
3828
- * @example
3829
- * const throttled = useThrottleCallback(() => console.log('callback'), 500);
3830
- */
3831
- declare const useThrottleCallback: <Params extends unknown[], Return>(callback: (...args: Params) => Return, delay: number) => (...args: Params) => void;
3832
-
3833
- /**
3834
- * @name useThrottleValue
3835
- * @description - Hook that creates a throttled value
3836
- * @category Utilities
3837
- *
3838
- * @template Value The type of the value
3839
- * @param {Value} value The value to be throttled
3840
- * @param {number} delay The delay in milliseconds
3841
- * @returns {Value} The throttled value
3842
- *
3843
- * @example
3844
- * const throttledValue = useThrottleValue(value, 500);
3845
- */
3846
- declare const useThrottleValue: <Value>(value: Value, delay: number) => Value;
3847
-
3848
- interface UseTimeReturn {
3849
- day: number;
3850
- hours: number;
3851
- meridiemHours: {
3852
- value: number;
3853
- type: string;
3854
- };
3855
- minutes: number;
3856
- month: number;
3857
- seconds: number;
3858
- timestamp: number;
3859
- year: number;
3860
- }
3861
- /**
3862
- * @name useTime
3863
- * @description - Hook that gives you current time in different values
3864
- * @category Time
3865
- *
3866
- * @returns {UseTimeReturn} An object containing the current time
3867
- *
3868
- * @example
3869
- * const { seconds, minutes, hours, meridiemHours, day, month, year, timestamp } = useTime();
3870
- */
3871
- declare const useTime: () => UseTimeReturn;
3872
-
3873
- /** The use timeout return type */
3874
- interface UseTimeoutReturn {
3875
- /** Timeout is ready state value */
3876
- ready: boolean;
3877
- /** Function to clear timeout */
3878
- clear: () => void;
3879
- }
3880
- /**
3881
- * @name useTimeout
3882
- * @description - Hook that executes a callback function after a specified delay
3883
- * @category Time
3884
- *
3885
- * @param {() => void} callback The function to be executed after the timeout
3886
- * @param {number} delay The delay in milliseconds before the timeout executes the callback function
3887
- * @returns {UseTimeoutReturn} An object with a `ready` boolean state value and a `clear` function to clear timeout
3888
- *
3889
- * @example
3890
- * const { clear, ready } = useTimeout(() => {}, 5000);
3891
- */
3892
- declare function useTimeout(callback: () => void, delay: number): UseTimeoutReturn;
3893
-
3894
- type PositiveInteger<Value extends number> = `${Value}` extends `-${any}` | `${any}.${any}` ? never : Value;
3895
- declare const getTimeFromSeconds: (timestamp: number) => {
3896
- seconds: number;
3897
- minutes: number;
3898
- hours: number;
3899
- days: number;
3900
- };
3901
- /** The use timer options type */
3902
- interface UseTimerOptions {
3903
- /** Whether the timer should start automatically */
3904
- immediately?: boolean;
3905
- /** The function to be executed when the timer is expired */
3906
- onExpire?: () => void;
3907
- /** The function to be executed when the timer is started */
3908
- onStart?: () => void;
3909
- /** Callback function to be executed on each tick of the timer */
3910
- onTick?: (seconds: number) => void;
3911
- }
3912
- /** The use timer return type */
3913
- interface UseTimerReturn {
3914
- /** flag to indicate if timer is active or not */
3915
- active: boolean;
3916
- /** The total count of the timer */
3917
- count: number;
3918
- /** The day count of the timer */
3919
- days: number;
3920
- /** The hour count of the timer */
3921
- hours: number;
3922
- /** The minute count of the timer */
3923
- minutes: number;
3924
- /** The second count of the timer */
3925
- seconds: number;
3926
- /** The function to clear the timer */
3927
- clear: () => void;
3928
- /** The function to decrease the timer */
3929
- decrease: (seconds: PositiveInteger<number>) => void;
3930
- /** The function to increase the timer */
3931
- increase: (seconds: PositiveInteger<number>) => void;
3932
- /** The function to pause the timer */
3933
- pause: () => void;
3934
- /** The function to restart the timer */
3935
- restart: (time: PositiveInteger<number>, immediately?: boolean) => void;
3936
- /** The function to resume the timer */
3937
- resume: () => void;
3938
- /** The function to start the timer */
3939
- start: () => void;
3940
- /** The function to toggle the timer */
3941
- toggle: () => void;
3942
- }
3943
- interface UseTimer {
3944
- (): UseTimerReturn;
3945
- (seconds: PositiveInteger<number>, callback: () => void): UseTimerReturn;
3946
- (seconds: PositiveInteger<number>, options?: UseTimerOptions): UseTimerReturn;
3947
- }
3948
- /**
3949
- * @name useTimer
3950
- * @description - Hook that creates a timer functionality
3951
- * @category Time
3952
- *
3953
- * @overload
3954
- * @returns {UseTimerReturn} An object containing the timer properties and functions
3955
- *
3956
- * @example
3957
- * const { days, hours, minutes, seconds, toggle, pause, start, restart, resume, active, decrease, increase } = useTimer();
3958
- *
3959
- * @overload
3960
- * @param {number} seconds The seconds value that define for how long the timer will be running
3961
- * @param {() => void} callback The function to be executed once countdown timer is expired
3962
- * @returns {UseTimerReturn} An object containing the timer properties and functions
3963
- *
3964
- * @example
3965
- * const { days, hours, minutes, seconds, toggle, pause, start, restart, resume, active, decrease, increase } = useTimer(1000, () => console.log('ready'));
3966
- *
3967
- * @overload
3968
- * @param {number} seconds The seconds value that define for how long the timer will be running
3969
- * @param {boolean} [options.immediately=true] The flag to decide if timer should start automatically
3970
- * @param {() => void} [options.onExpire] The function to be executed when the timer is expired
3971
- * @param {(timestamp: number) => void} [options.onTick] The function to be executed on each tick of the timer
3972
- * @returns {UseTimerReturn} An object containing the timer properties and functions
3973
- *
3974
- * @example
3975
- * const { days, hours, minutes, seconds, toggle, pause, start, restart, resume, active, decrease, increase } = useTimer(1000);
3976
- */
3977
- declare const useTimer: UseTimer;
3978
-
3979
- /** The use toggle return type */
3980
- type UseToggleReturn<Value> = readonly [Value, (value?: Value) => void];
3981
- /**
3982
- * @name useToggle
3983
- * @description - Hook that create toggle
3984
- * @category Utilities
3985
- *
3986
- * @template Value The type of the value
3987
- * @param {Value[]} [values=[false, true]] The values to toggle
3988
- *
3989
- * @example
3990
- * const [on, toggle] = useToggle();
3991
- *
3992
- * @example
3993
- * const [value, toggle] = useToggle(['light', 'dark'] as const);
3994
- */
3995
- declare const useToggle: <Value = boolean>(values?: readonly Value[]) => readonly [Value, (value?: SetStateAction<Value>) => void];
3996
-
3997
- /**
3998
- * @name useUnmount
3999
- * @description - Hook that defines the logic when unmounting a component
4000
- * @category Lifecycle
4001
- *
4002
- * @param {() => void} callback The callback function to be invoked on component unmount
4003
- * @returns {void}
4004
- *
4005
- * @example
4006
- * useUnmount(() => console.log('This effect runs on component unmount'));
4007
- */
4008
- declare const useUnmount: (callback: () => void) => void;
4009
-
4010
- /** The use vibrate pattern type */
4011
- type UseVibratePattern = number | number[];
4012
- /** The use vibrate return type */
4013
- interface UseVibrateReturn {
4014
- /** The support indicator */
4015
- supported: boolean;
4016
- /** The vibrating indicator */
4017
- vibrating: boolean;
4018
- /** The pause function */
4019
- pause: () => void;
4020
- /** The resume function */
4021
- resume: () => void;
4022
- /** The start function */
4023
- start: (interval: number) => void;
4024
- /** The vibrate function */
4025
- trigger: (pattern?: UseVibratePattern) => void;
4026
- }
4027
- /**
4028
- * @name useVibrate
4029
- * @description - Hook that provides vibrate api
4030
- * @category Browser
4031
- *
4032
- * @browserapi navigator.vibrate https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vibrate
4033
- *
4034
- * @overload
4035
- * @param {UseVibratePattern} options.pattern The pattern for vibration
4036
- * @param {number} [options.interval=0] Time in milliseconds between vibrations
4037
- * @returns {UseVibrateReturn} An object containing support indicator, start vibration and stop vibration functions
4038
- *
4039
- * @example
4040
- * const { supported, active, vibrate, stop, pause, resume } = useVibrate(1000);
4041
- */
4042
- declare const useVibrate: (pattern: UseVibratePattern, interval?: number) => {
4043
- supported: boolean;
4044
- trigger: (internalPattern?: UseVibratePattern) => void;
4045
- stop: () => void;
4046
- active: boolean;
4047
- pause: () => void;
4048
- resume: (intervalInterval?: number) => void;
4049
- };
4050
-
4051
- type UseWebSocketUrl = (() => string) | string;
4052
- interface UseWebSocketOptions {
4053
- protocols?: Array<'soap' | 'wasm'>;
4054
- retry?: boolean | number;
4055
- onConnected?: (webSocket: WebSocket) => void;
4056
- onDisconnected?: (event: CloseEvent, webSocket: WebSocket) => void;
4057
- onError?: (event: Event, webSocket: WebSocket) => void;
4058
- onMessage?: (event: MessageEvent, webSocket: WebSocket) => void;
4059
- }
4060
- type UseWebSocketStatus = 'connected' | 'connecting' | 'disconnected' | 'failed';
4061
- interface UseWebSocketReturn {
4062
- client?: WebSocket;
4063
- close: WebSocket['close'];
4064
- send: WebSocket['send'];
4065
- status: UseWebSocketStatus;
4066
- open: () => void;
4067
- }
4068
- /**
4069
- * @name useWebSocket
4070
- * @description - Hook that connects to a WebSocket server and handles incoming and outgoing messages
4071
- * @category Browser
4072
- *
4073
- * @param {UseWebSocketUrl} url The URL of the WebSocket server
4074
- * @param {(webSocket: WebSocket) => void} [options.onConnected] The callback function that is called when the WebSocket connection is established
4075
- * @param {(event: CloseEvent, webSocket: WebSocket) => void} [options.onDisconnected] The callback function that is called when the WebSocket connection is closed
4076
- * @param {(event: Event, webSocket: WebSocket) => void} [options.onError] The callback function that is called when an error occurs
4077
- * @param {(event: MessageEvent, webSocket: WebSocket) => void} [options.onMessage] The callback function that is called when a message is received
4078
- * @param {boolean | number} [options.retry] The number of times to retry the connection
4079
- * @param {Array<'soap' | 'wasm'>} [options.protocols] The list of protocols to use
4080
- * @returns {UseWebSocketReturn} An object with the status, close, send, open, and ws properties
4081
- *
4082
- * @example
4083
- * const { status, close, send, open, client } = useWebSocket('url');
4084
- */
4085
- declare const useWebSocket: (url: UseWebSocketUrl, options?: UseWebSocketOptions) => UseWebSocketReturn;
4086
-
4087
- /**
4088
- * @name useWindowEvent
4089
- * @description - Hook attaches an event listener to the window object for the specified event
4090
- * @category Browser
4091
- *
4092
- * @template Event Key of window event map.
4093
- * @param {Event} event The event to listen for.
4094
- * @param {(event: WindowEventMap[Event]) => void} listener The callback function to be executed when the event is triggered
4095
- * @param {UseEventListenerOptions} [options] The options for the event listener
4096
- * @returns {void}
4097
- *
4098
- * @example
4099
- * useWindowEvent('click', () => console.log('clicked'));
4100
- */
4101
- declare const useWindowEvent: <Event extends keyof WindowEventMap>(event: Event, listener: (this: Window, event: WindowEventMap[Event]) => any, options?: UseEventListenerOptions) => void;
4102
-
4103
- /**
4104
- * @name useWindowFocus
4105
- * @description - Hook that provides the current focus state of the window
4106
- * @category Elements
4107
- *
4108
- * @returns {boolean} The current focus state of the window
4109
- *
4110
- * @example
4111
- * const focused = useWindowFocus();
4112
- */
4113
- declare const useWindowFocus: () => boolean;
4114
-
4115
- interface ScrollPosition {
4116
- x: number;
4117
- y: number;
4118
- }
4119
- declare const scrollTo: ({ x, y, behavior }: Partial<ScrollPosition & ScrollOptions>) => void;
4120
- /**
4121
- * @name useWindowScroll
4122
- * @description - Hook that manages the window scroll position
4123
- * @category Browser
4124
- *
4125
- * @returns {UseWindowScrollReturn} An object containing the current window scroll position
4126
- *
4127
- * @example
4128
- * const { value, scrollTo } = useWindowScroll();
4129
- */
4130
- declare const useWindowScroll: () => {
4131
- value: ScrollPosition;
4132
- scrollTo: ({ x, y, behavior }: Partial<ScrollPosition & ScrollOptions>) => void;
4133
- };
4134
-
4135
- /** The use window size return type */
4136
- interface UseWindowSizeParams {
4137
- /** Whether to include the scrollbar in the window size calculation */
4138
- includeScrollbar?: boolean;
4139
- }
4140
- /** The use window size return type */
4141
- interface UseWindowSizeReturn {
4142
- /** The current window height */
4143
- height: number;
4144
- /** The current window width */
4145
- width: number;
4146
- }
4147
- /**
4148
- * @name useWindowSize
4149
- * @description - Hook that manages a window size
4150
- * @category Elements
4151
- *
4152
- * @param {number} [params.initialWidth=Number.POSITIVE_INFINITY] The initial window width
4153
- * @param {number} [params.initialHeight=Number.POSITIVE_INFINITY] The initial window height
4154
- * @returns {UseWindowSizeReturn} An object containing the current window width and height
4155
- *
4156
- * @example
4157
- * const { width, height } = useWindowSize();
4158
- */
4159
- declare const useWindowSize: (params?: UseWindowSizeParams) => {
4160
- width: number;
4161
- height: number;
4162
- };
4163
-
4164
- interface WizardItem<WizardStepId> {
4165
- id: WizardStepId;
4166
- nodes?: WizardStepId[];
4167
- }
4168
- /**
4169
- * @name useWizard
4170
- * @description - Hook that manages a wizard
4171
- * @category Utilities
4172
- *
4173
- * @param {WizardItem<WizardStepId>[]} map The map of the wizard
4174
- * @param {WizardStepId} [initialStepId] The initial step id
4175
- * @returns {UseWizardReturn<WizardStepId>} An object containing the current step id and functions to interact with the wizard
4176
- *
4177
- * @example
4178
- * const { currentStepId, set, reset, back, history } = useWizard([
4179
- * { id: 'step1', nodes: ['step2', 'step3'] },
4180
- * { id: 'step2', nodes: ['step3'] },
4181
- * { id: 'step3', nodes: [] },
4182
- * ])
4183
- */
4184
- declare const useWizard: <WizardStepId extends string>(map: WizardItem<WizardStepId>[], initialStepId?: WizardStepId) => {
4185
- currentStepId: WizardStepId;
4186
- set: (id: WizardStepId) => void;
4187
- reset: () => void;
4188
- back: () => void;
4189
- history: WizardStepId[];
4190
- };
4191
-
4192
- declare const legacyCopyToClipboard: (value: string) => void;
4193
- declare const copy: (value: string) => Promise<void>;
4194
-
4195
- declare function debounce<Params extends unknown[]>(callback: (...args: Params) => void, delay: number): (...args: Params) => void;
4196
-
4197
- declare const getDate: (now?: Date) => {
4198
- seconds: number;
4199
- minutes: number;
4200
- hours: number;
4201
- meridiemHours: {
4202
- value: number;
4203
- type: string;
4204
- };
4205
- day: number;
4206
- month: number;
4207
- year: number;
4208
- timestamp: number;
4209
- };
4210
-
4211
- type Target = (() => Element) | string | Document | Element | Window;
4212
- type HookTarget = RefObject<Element | null | undefined> | {
4213
- value: Target;
4214
- type: symbol;
4215
- };
4216
- declare const targetSymbol: unique symbol;
4217
- declare const target: (target: Target) => {
4218
- value: Target;
4219
- type: symbol;
4220
- };
4221
- declare const getElement: (target: HookTarget) => Element | Window | Document | null | undefined;
4222
-
4223
- declare const getRetry: (retry: boolean | number) => number;
4224
-
4225
- declare const isTarget: (target: HookTarget) => boolean;
4226
-
4227
- declare const throttle: <Params extends any[]>(callback: (...args: Params) => void, delay: number) => ((...args: Params) => void);
4228
-
4229
- 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, useOnce, 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';