@siberiacancode/reactuse 0.0.60 → 0.0.62

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 (266) hide show
  1. package/dist/cjs/{_rollupPluginBabelHelpers-DaULt_UR.js → _rollupPluginBabelHelpers-CfqOPZw3.js} +2 -2
  2. package/dist/cjs/_rollupPluginBabelHelpers-CfqOPZw3.js.map +1 -0
  3. package/dist/cjs/hooks/index.js +2 -2
  4. package/dist/cjs/hooks/useAsync/useAsync.js +2 -2
  5. package/dist/cjs/hooks/useBattery/useBattery.js +2 -2
  6. package/dist/cjs/hooks/useBattery/useBattery.js.map +1 -1
  7. package/dist/cjs/hooks/useBoolean/useBoolean.js +2 -2
  8. package/dist/cjs/hooks/useBoolean/useBoolean.js.map +1 -1
  9. package/dist/cjs/hooks/useBreakpoints/constants/breakpoints.js +1 -1
  10. package/dist/cjs/hooks/useBreakpoints/useBreakpoints.js +2 -2
  11. package/dist/cjs/hooks/useBrowserLanguage/useBrowserLanguage.js +1 -1
  12. package/dist/cjs/hooks/useClickOutside/useClickOutside.js +2 -2
  13. package/dist/cjs/hooks/useClickOutside/useClickOutside.js.map +1 -1
  14. package/dist/cjs/hooks/useClipboard/useClipboard.js +2 -2
  15. package/dist/cjs/hooks/useClipboard/useClipboard.js.map +1 -1
  16. package/dist/cjs/hooks/useCounter/useCounter.js +2 -2
  17. package/dist/cjs/hooks/useCssVar/useCssVar.js +3 -0
  18. package/dist/cjs/hooks/useCssVar/useCssVar.js.map +1 -0
  19. package/dist/cjs/hooks/useDebounceCallback/useDebounceCallback.js +1 -1
  20. package/dist/cjs/hooks/useDebounceValue/useDebounceValue.js +2 -2
  21. package/dist/cjs/hooks/useDefault/useDefault.js +2 -2
  22. package/dist/cjs/hooks/useDidUpdate/useDidUpdate.js +1 -1
  23. package/dist/cjs/hooks/useDisclosure/useDisclosure.js +2 -2
  24. package/dist/cjs/hooks/useDocumentEvent/useDocumentEvent.js +2 -2
  25. package/dist/cjs/hooks/useDocumentTitle/useDocumentTitle.js +2 -2
  26. package/dist/cjs/hooks/useDocumentTitle/useDocumentTitle.js.map +1 -1
  27. package/dist/cjs/hooks/useDocumentVisibility/useDocumentVisibility.js +1 -1
  28. package/dist/cjs/hooks/useEvent/useEvent.js +1 -1
  29. package/dist/cjs/hooks/useEventListener/useEventListener.js +2 -2
  30. package/dist/cjs/hooks/useEyeDropper/useEyeDropper.js +2 -2
  31. package/dist/cjs/hooks/useEyeDropper/useEyeDropper.js.map +1 -1
  32. package/dist/cjs/hooks/useFavicon/useFavicon.js +2 -2
  33. package/dist/cjs/hooks/useField/useField.js +2 -2
  34. package/dist/cjs/hooks/useFileDialog/useFileDialog.js +2 -2
  35. package/dist/cjs/hooks/useFps/useFps.js +2 -2
  36. package/dist/cjs/hooks/useFullscreen/useFullscreen.js +2 -2
  37. package/dist/cjs/hooks/useFullscreen/useFullscreen.js.map +1 -1
  38. package/dist/cjs/hooks/useGamepad/helpers/mapGamepadToXbox360Controller.js +1 -1
  39. package/dist/cjs/hooks/useGamepad/useGamepad.js +2 -2
  40. package/dist/cjs/hooks/useGeolocation/useGeolocation.js +2 -2
  41. package/dist/cjs/hooks/useHash/useHash.js +2 -2
  42. package/dist/cjs/hooks/useHotkeys/useHotkeys.js +2 -2
  43. package/dist/cjs/hooks/useHotkeys/useHotkeys.js.map +1 -1
  44. package/dist/cjs/hooks/useHover/useHover.js +2 -2
  45. package/dist/cjs/hooks/useIdle/useIdle.js +2 -2
  46. package/dist/cjs/hooks/useImage/useImage.js +2 -2
  47. package/dist/cjs/hooks/useInfiniteScroll/useInfiniteScroll.js +2 -2
  48. package/dist/cjs/hooks/useInfiniteScroll/useInfiniteScroll.js.map +1 -1
  49. package/dist/cjs/hooks/useIntersectionObserver/useIntersectionObserver.js +2 -2
  50. package/dist/cjs/hooks/useInterval/useInterval.js +2 -2
  51. package/dist/cjs/hooks/useIsFirstRender/useIsFirstRender.js +1 -1
  52. package/dist/cjs/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +1 -1
  53. package/dist/cjs/hooks/useKeyPress/useKeyPress.js +2 -2
  54. package/dist/cjs/hooks/useKeyPressEvent/useKeyPressEvent.js +2 -2
  55. package/dist/cjs/hooks/useKeyboard/useKeyboard.js +2 -2
  56. package/dist/cjs/hooks/useKeysPressed/useKeysPressed.js +2 -2
  57. package/dist/cjs/hooks/useList/useList.js +2 -2
  58. package/dist/cjs/hooks/useLocalStorage/useLocalStorage.js +2 -2
  59. package/dist/cjs/hooks/useLogger/useLogger.js +2 -2
  60. package/dist/cjs/hooks/useLongPress/useLongPress.js +2 -2
  61. package/dist/cjs/hooks/useMap/useMap.js +2 -2
  62. package/dist/cjs/hooks/useMeasure/useMeasure.js +2 -2
  63. package/dist/cjs/hooks/useMeasure/useMeasure.js.map +1 -1
  64. package/dist/cjs/hooks/useMediaQuery/useMediaQuery.js +1 -1
  65. package/dist/cjs/hooks/useMemory/useMemory.js +2 -2
  66. package/dist/cjs/hooks/useMount/useMount.js +1 -1
  67. package/dist/cjs/hooks/useMouse/useMouse.js +2 -2
  68. package/dist/cjs/hooks/useMouse/useMouse.js.map +1 -1
  69. package/dist/cjs/hooks/useMutation/useMutation.js +2 -2
  70. package/dist/cjs/hooks/useMutationObserver/useMutationObserver.js +3 -0
  71. package/dist/cjs/hooks/useMutationObserver/useMutationObserver.js.map +1 -0
  72. package/dist/cjs/hooks/useNetwork/useNetwork.js +2 -2
  73. package/dist/cjs/hooks/useNetwork/useNetwork.js.map +1 -1
  74. package/dist/cjs/hooks/useOffsetPagination/useOffsetPagination.js +2 -2
  75. package/dist/cjs/hooks/useOnline/useOnline.js +1 -1
  76. package/dist/cjs/hooks/useOperatingSystem/useOperatingSystem.js +1 -1
  77. package/dist/cjs/hooks/useOrientation/useOrientation.js +2 -2
  78. package/dist/cjs/hooks/usePageLeave/usePageLeave.js +2 -2
  79. package/dist/cjs/hooks/usePaint/helpers/Paint.js +2 -2
  80. package/dist/cjs/hooks/usePaint/helpers/Pointer.js +2 -2
  81. package/dist/cjs/hooks/usePaint/usePaint.js +2 -2
  82. package/dist/cjs/hooks/usePaint/usePaint.js.map +1 -1
  83. package/dist/cjs/hooks/usePermission/usePermission.js +2 -2
  84. package/dist/cjs/hooks/usePreferredColorScheme/usePreferredColorScheme.js +1 -1
  85. package/dist/cjs/hooks/usePreferredContrast/usePreferredContrast.js +1 -1
  86. package/dist/cjs/hooks/usePreferredDark/usePreferredDark.js +1 -1
  87. package/dist/cjs/hooks/usePreferredLanguages/usePreferredLanguages.js +1 -1
  88. package/dist/cjs/hooks/usePreferredReducedMotion/usePreferredReducedMotion.js +1 -1
  89. package/dist/cjs/hooks/usePrevious/usePrevious.js +1 -1
  90. package/dist/cjs/hooks/useQuery/useQuery.js +2 -2
  91. package/dist/cjs/hooks/useQueue/useQueue.js +2 -2
  92. package/dist/cjs/hooks/useRaf/useRaf.js +2 -2
  93. package/dist/cjs/hooks/useRafValue/useRafValue.js +2 -2
  94. package/dist/cjs/hooks/useRenderCount/useRenderCount.js +1 -1
  95. package/dist/cjs/hooks/useRenderInfo/useRenderInfo.js +1 -1
  96. package/dist/cjs/hooks/useRerender/useRerender.js +2 -2
  97. package/dist/cjs/hooks/useResizeObserver/useResizeObserver.js +2 -2
  98. package/dist/cjs/hooks/useResizeObserver/useResizeObserver.js.map +1 -1
  99. package/dist/cjs/hooks/useScript/useScript.js +2 -2
  100. package/dist/cjs/hooks/useSessionStorage/useSessionStorage.js +2 -2
  101. package/dist/cjs/hooks/useSet/useSet.js +2 -2
  102. package/dist/cjs/hooks/useShare/useShare.js +2 -2
  103. package/dist/cjs/hooks/useStep/useStep.js +2 -2
  104. package/dist/cjs/hooks/useStopwatch/useStopwatch.js +2 -2
  105. package/dist/cjs/hooks/useStorage/useStorage.js +2 -2
  106. package/dist/cjs/hooks/useTextSelection/useTextSelection.js +2 -2
  107. package/dist/cjs/hooks/useTime/useTime.js +2 -2
  108. package/dist/cjs/hooks/useTimeout/useTimeout.js +2 -2
  109. package/dist/cjs/hooks/useToggle/useToggle.js +2 -2
  110. package/dist/cjs/hooks/useUnmount/useUnmount.js +1 -1
  111. package/dist/cjs/hooks/useWebSocket/useWebSocket.js +2 -2
  112. package/dist/cjs/hooks/useWindowEvent/useWindowEvent.js +2 -2
  113. package/dist/cjs/hooks/useWindowScroll/useWindowScroll.js +2 -2
  114. package/dist/cjs/hooks/useWindowSize/useWindowSize.js +2 -2
  115. package/dist/cjs/hooks/useWizard/useWizard.js +2 -2
  116. package/dist/cjs/{index-BNXI2awt.js → index-DcGHqxfo.js} +2 -2
  117. package/dist/cjs/{index-BNXI2awt.js.map → index-DcGHqxfo.js.map} +1 -1
  118. package/dist/cjs/index.js +2 -2
  119. package/dist/cjs/utils/helpers/debounce.js +1 -1
  120. package/dist/cjs/utils/helpers/getElement.js +1 -1
  121. package/dist/cjs/utils/helpers/getRetry.js +1 -1
  122. package/dist/cjs/utils/helpers/index.js +2 -2
  123. package/dist/cjs/utils/helpers/isClient.js +1 -1
  124. package/dist/cjs/utils/helpers/throttle.js +1 -1
  125. package/dist/cjs/utils/helpers/time/getDate.js +1 -1
  126. package/dist/esm/{_rollupPluginBabelHelpers-BdfjLHhW.js → _rollupPluginBabelHelpers-BWkML700.js} +2 -2
  127. package/dist/esm/_rollupPluginBabelHelpers-BWkML700.js.map +1 -0
  128. package/dist/esm/hooks/index.js +2 -2
  129. package/dist/esm/hooks/useAsync/useAsync.js +2 -2
  130. package/dist/esm/hooks/useBattery/useBattery.js +2 -2
  131. package/dist/esm/hooks/useBattery/useBattery.js.map +1 -1
  132. package/dist/esm/hooks/useBoolean/useBoolean.js +2 -2
  133. package/dist/esm/hooks/useBoolean/useBoolean.js.map +1 -1
  134. package/dist/esm/hooks/useBreakpoints/constants/breakpoints.js +1 -1
  135. package/dist/esm/hooks/useBreakpoints/useBreakpoints.js +2 -2
  136. package/dist/esm/hooks/useBrowserLanguage/useBrowserLanguage.js +1 -1
  137. package/dist/esm/hooks/useClickOutside/useClickOutside.js +2 -2
  138. package/dist/esm/hooks/useClickOutside/useClickOutside.js.map +1 -1
  139. package/dist/esm/hooks/useClipboard/useClipboard.js +2 -2
  140. package/dist/esm/hooks/useClipboard/useClipboard.js.map +1 -1
  141. package/dist/esm/hooks/useCounter/useCounter.js +2 -2
  142. package/dist/esm/hooks/useCssVar/useCssVar.js +3 -0
  143. package/dist/esm/hooks/useCssVar/useCssVar.js.map +1 -0
  144. package/dist/esm/hooks/useDebounceCallback/useDebounceCallback.js +1 -1
  145. package/dist/esm/hooks/useDebounceValue/useDebounceValue.js +2 -2
  146. package/dist/esm/hooks/useDefault/useDefault.js +2 -2
  147. package/dist/esm/hooks/useDidUpdate/useDidUpdate.js +1 -1
  148. package/dist/esm/hooks/useDisclosure/useDisclosure.js +2 -2
  149. package/dist/esm/hooks/useDocumentEvent/useDocumentEvent.js +2 -2
  150. package/dist/esm/hooks/useDocumentTitle/useDocumentTitle.js +2 -2
  151. package/dist/esm/hooks/useDocumentTitle/useDocumentTitle.js.map +1 -1
  152. package/dist/esm/hooks/useDocumentVisibility/useDocumentVisibility.js +1 -1
  153. package/dist/esm/hooks/useEvent/useEvent.js +1 -1
  154. package/dist/esm/hooks/useEventListener/useEventListener.js +2 -2
  155. package/dist/esm/hooks/useEyeDropper/useEyeDropper.js +2 -2
  156. package/dist/esm/hooks/useEyeDropper/useEyeDropper.js.map +1 -1
  157. package/dist/esm/hooks/useFavicon/useFavicon.js +2 -2
  158. package/dist/esm/hooks/useField/useField.js +2 -2
  159. package/dist/esm/hooks/useFileDialog/useFileDialog.js +2 -2
  160. package/dist/esm/hooks/useFps/useFps.js +2 -2
  161. package/dist/esm/hooks/useFullscreen/useFullscreen.js +2 -2
  162. package/dist/esm/hooks/useFullscreen/useFullscreen.js.map +1 -1
  163. package/dist/esm/hooks/useGamepad/helpers/mapGamepadToXbox360Controller.js +1 -1
  164. package/dist/esm/hooks/useGamepad/useGamepad.js +2 -2
  165. package/dist/esm/hooks/useGeolocation/useGeolocation.js +2 -2
  166. package/dist/esm/hooks/useHash/useHash.js +2 -2
  167. package/dist/esm/hooks/useHotkeys/useHotkeys.js +2 -2
  168. package/dist/esm/hooks/useHotkeys/useHotkeys.js.map +1 -1
  169. package/dist/esm/hooks/useHover/useHover.js +2 -2
  170. package/dist/esm/hooks/useIdle/useIdle.js +2 -2
  171. package/dist/esm/hooks/useImage/useImage.js +2 -2
  172. package/dist/esm/hooks/useInfiniteScroll/useInfiniteScroll.js +2 -2
  173. package/dist/esm/hooks/useInfiniteScroll/useInfiniteScroll.js.map +1 -1
  174. package/dist/esm/hooks/useIntersectionObserver/useIntersectionObserver.js +2 -2
  175. package/dist/esm/hooks/useInterval/useInterval.js +2 -2
  176. package/dist/esm/hooks/useIsFirstRender/useIsFirstRender.js +1 -1
  177. package/dist/esm/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +1 -1
  178. package/dist/esm/hooks/useKeyPress/useKeyPress.js +2 -2
  179. package/dist/esm/hooks/useKeyPressEvent/useKeyPressEvent.js +2 -2
  180. package/dist/esm/hooks/useKeyboard/useKeyboard.js +2 -2
  181. package/dist/esm/hooks/useKeysPressed/useKeysPressed.js +2 -2
  182. package/dist/esm/hooks/useList/useList.js +2 -2
  183. package/dist/esm/hooks/useLocalStorage/useLocalStorage.js +2 -2
  184. package/dist/esm/hooks/useLogger/useLogger.js +2 -2
  185. package/dist/esm/hooks/useLongPress/useLongPress.js +2 -2
  186. package/dist/esm/hooks/useMap/useMap.js +2 -2
  187. package/dist/esm/hooks/useMeasure/useMeasure.js +2 -2
  188. package/dist/esm/hooks/useMeasure/useMeasure.js.map +1 -1
  189. package/dist/esm/hooks/useMediaQuery/useMediaQuery.js +1 -1
  190. package/dist/esm/hooks/useMemory/useMemory.js +2 -2
  191. package/dist/esm/hooks/useMount/useMount.js +1 -1
  192. package/dist/esm/hooks/useMouse/useMouse.js +2 -2
  193. package/dist/esm/hooks/useMouse/useMouse.js.map +1 -1
  194. package/dist/esm/hooks/useMutation/useMutation.js +2 -2
  195. package/dist/esm/hooks/useMutationObserver/useMutationObserver.js +3 -0
  196. package/dist/esm/hooks/useMutationObserver/useMutationObserver.js.map +1 -0
  197. package/dist/esm/hooks/useNetwork/useNetwork.js +2 -2
  198. package/dist/esm/hooks/useNetwork/useNetwork.js.map +1 -1
  199. package/dist/esm/hooks/useOffsetPagination/useOffsetPagination.js +2 -2
  200. package/dist/esm/hooks/useOnline/useOnline.js +1 -1
  201. package/dist/esm/hooks/useOperatingSystem/useOperatingSystem.js +1 -1
  202. package/dist/esm/hooks/useOrientation/useOrientation.js +2 -2
  203. package/dist/esm/hooks/usePageLeave/usePageLeave.js +2 -2
  204. package/dist/esm/hooks/usePaint/helpers/Paint.js +2 -2
  205. package/dist/esm/hooks/usePaint/helpers/Pointer.js +2 -2
  206. package/dist/esm/hooks/usePaint/usePaint.js +2 -2
  207. package/dist/esm/hooks/usePaint/usePaint.js.map +1 -1
  208. package/dist/esm/hooks/usePermission/usePermission.js +2 -2
  209. package/dist/esm/hooks/usePreferredColorScheme/usePreferredColorScheme.js +1 -1
  210. package/dist/esm/hooks/usePreferredContrast/usePreferredContrast.js +1 -1
  211. package/dist/esm/hooks/usePreferredDark/usePreferredDark.js +1 -1
  212. package/dist/esm/hooks/usePreferredLanguages/usePreferredLanguages.js +1 -1
  213. package/dist/esm/hooks/usePreferredReducedMotion/usePreferredReducedMotion.js +1 -1
  214. package/dist/esm/hooks/usePrevious/usePrevious.js +1 -1
  215. package/dist/esm/hooks/useQuery/useQuery.js +2 -2
  216. package/dist/esm/hooks/useQueue/useQueue.js +2 -2
  217. package/dist/esm/hooks/useRaf/useRaf.js +2 -2
  218. package/dist/esm/hooks/useRafValue/useRafValue.js +2 -2
  219. package/dist/esm/hooks/useRenderCount/useRenderCount.js +1 -1
  220. package/dist/esm/hooks/useRenderInfo/useRenderInfo.js +1 -1
  221. package/dist/esm/hooks/useRerender/useRerender.js +2 -2
  222. package/dist/esm/hooks/useResizeObserver/useResizeObserver.js +2 -2
  223. package/dist/esm/hooks/useResizeObserver/useResizeObserver.js.map +1 -1
  224. package/dist/esm/hooks/useScript/useScript.js +2 -2
  225. package/dist/esm/hooks/useSessionStorage/useSessionStorage.js +2 -2
  226. package/dist/esm/hooks/useSet/useSet.js +2 -2
  227. package/dist/esm/hooks/useShare/useShare.js +2 -2
  228. package/dist/esm/hooks/useStep/useStep.js +2 -2
  229. package/dist/esm/hooks/useStopwatch/useStopwatch.js +2 -2
  230. package/dist/esm/hooks/useStorage/useStorage.js +2 -2
  231. package/dist/esm/hooks/useTextSelection/useTextSelection.js +2 -2
  232. package/dist/esm/hooks/useTime/useTime.js +2 -2
  233. package/dist/esm/hooks/useTimeout/useTimeout.js +2 -2
  234. package/dist/esm/hooks/useToggle/useToggle.js +2 -2
  235. package/dist/esm/hooks/useUnmount/useUnmount.js +1 -1
  236. package/dist/esm/hooks/useWebSocket/useWebSocket.js +2 -2
  237. package/dist/esm/hooks/useWindowEvent/useWindowEvent.js +2 -2
  238. package/dist/esm/hooks/useWindowScroll/useWindowScroll.js +2 -2
  239. package/dist/esm/hooks/useWindowSize/useWindowSize.js +2 -2
  240. package/dist/esm/hooks/useWizard/useWizard.js +2 -2
  241. package/dist/esm/{index-Iv79yzFW.js → index-BMDqbrm3.js} +2 -2
  242. package/dist/esm/{index-Iv79yzFW.js.map → index-BMDqbrm3.js.map} +1 -1
  243. package/dist/esm/index.js +2 -2
  244. package/dist/esm/utils/helpers/debounce.js +1 -1
  245. package/dist/esm/utils/helpers/getElement.js +1 -1
  246. package/dist/esm/utils/helpers/getRetry.js +1 -1
  247. package/dist/esm/utils/helpers/index.js +2 -2
  248. package/dist/esm/utils/helpers/isClient.js +1 -1
  249. package/dist/esm/utils/helpers/throttle.js +1 -1
  250. package/dist/esm/utils/helpers/time/getDate.js +1 -1
  251. package/dist/index.d.ts +308 -36
  252. package/package.json +1 -1
  253. package/dist/cjs/_rollupPluginBabelHelpers-DaULt_UR.js.map +0 -1
  254. package/dist/cjs/hooks/useMutationObserver.js +0 -3
  255. package/dist/cjs/hooks/useMutationObserver.js.map +0 -1
  256. package/dist/cjs/utils/helpers/isPermissionAllowed.js +0 -3
  257. package/dist/cjs/utils/helpers/isPermissionAllowed.js.map +0 -1
  258. package/dist/cjs/utils/types/index.js +0 -3
  259. package/dist/cjs/utils/types/index.js.map +0 -1
  260. package/dist/esm/_rollupPluginBabelHelpers-BdfjLHhW.js.map +0 -1
  261. package/dist/esm/hooks/useMutationObserver.js +0 -3
  262. package/dist/esm/hooks/useMutationObserver.js.map +0 -1
  263. package/dist/esm/utils/helpers/isPermissionAllowed.js +0 -3
  264. package/dist/esm/utils/helpers/isPermissionAllowed.js.map +0 -1
  265. package/dist/esm/utils/types/index.js +0 -2
  266. package/dist/esm/utils/types/index.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import * as react from 'react';
2
2
  import { DependencyList, RefObject, Dispatch, SetStateAction, EffectCallback, ComponentProps, useEffect, MouseEventHandler, TouchEventHandler } from 'react';
3
- import { BatteryManager, EyeDropperConstructor, ColorSelectionOptions, ColorSelectionResult, Connection } from '@/utils/types';
4
3
 
5
4
  interface UseAsyncReturn<Data> {
6
5
  data?: Data;
@@ -22,6 +21,12 @@ interface UseAsyncReturn<Data> {
22
21
  */
23
22
  declare const useAsync: <Data>(callback: () => Promise<Data>, deps?: DependencyList) => UseAsyncReturn<Data>;
24
23
 
24
+ interface BatteryManager extends EventTarget {
25
+ charging: boolean;
26
+ chargingTime: number;
27
+ dischargingTime: number;
28
+ level: number;
29
+ }
25
30
  declare global {
26
31
  interface Navigator {
27
32
  readonly getBattery: () => Promise<BatteryManager>;
@@ -74,6 +79,87 @@ type UseBooleanReturn = [
74
79
  */
75
80
  declare const useBoolean: (initialValue?: boolean) => UseBooleanReturn;
76
81
 
82
+ /** Breakpoints from Material UI */
83
+ declare const BREAKPOINTS_MATERIAL_UI: {
84
+ xs: number;
85
+ sm: number;
86
+ md: number;
87
+ lg: number;
88
+ xl: number;
89
+ };
90
+ /** Breakpoints from Mantine */
91
+ declare const BREAKPOINTS_MANTINE: {
92
+ xs: number;
93
+ sm: number;
94
+ md: number;
95
+ lg: number;
96
+ xl: number;
97
+ };
98
+ /** Breakpoints from Tailwind */
99
+ declare const BREAKPOINTS_TAILWIND: {
100
+ sm: number;
101
+ md: number;
102
+ lg: number;
103
+ xl: number;
104
+ '2xl': number;
105
+ };
106
+ /** Breakpoints from Bootstrap V5 */
107
+ declare const BREAKPOINTS_BOOTSTRAP_V5: {
108
+ xs: number;
109
+ sm: number;
110
+ md: number;
111
+ lg: number;
112
+ xl: number;
113
+ xxl: number;
114
+ };
115
+ /** Breakpoints from Ant Design */
116
+ declare const BREAKPOINTS_ANT_DESIGN: {
117
+ xs: number;
118
+ sm: number;
119
+ md: number;
120
+ lg: number;
121
+ xl: number;
122
+ xxl: number;
123
+ };
124
+ /** Breakpoints from Quasar V2 */
125
+ declare const BREAKPOINTS_QUASAR_V2: {
126
+ xs: number;
127
+ sm: number;
128
+ md: number;
129
+ lg: number;
130
+ xl: number;
131
+ };
132
+ /** Sematic Breakpoints */
133
+ declare const BREAKPOINTS_SEMANTIC: {
134
+ mobileS: number;
135
+ mobileM: number;
136
+ mobileL: number;
137
+ tablet: number;
138
+ laptop: number;
139
+ laptopL: number;
140
+ desktop4K: number;
141
+ };
142
+ /** Breakpoints from Master CSS */
143
+ declare const BREAKPOINTS_MASTER_CSS: {
144
+ '3xs': number;
145
+ '2xs': number;
146
+ xs: number;
147
+ sm: number;
148
+ md: number;
149
+ lg: number;
150
+ xl: number;
151
+ '2xl': number;
152
+ '3xl': number;
153
+ '4xl': number;
154
+ };
155
+ /** Breakpoints from PrimeFlex */
156
+ declare const BREAKPOINTS_PRIME_FLEX: {
157
+ sm: number;
158
+ md: number;
159
+ lg: number;
160
+ xl: number;
161
+ };
162
+
77
163
  /** The breakpoints type */
78
164
  type Breakpoints<Breakpoint extends string = string> = Record<Breakpoint, number>;
79
165
  /** The use breakpoints strategy */
@@ -162,6 +248,8 @@ type UseClickOutside = {
162
248
  */
163
249
  declare const useClickOutside: UseClickOutside;
164
250
 
251
+ declare const isPermissionAllowed: (status: PermissionState) => boolean;
252
+ declare const legacyCopyToClipboard: (value: string) => void;
165
253
  /** The use copy to clipboard return type */
166
254
  interface UseCopyToClipboardReturn {
167
255
  /** The copied value */
@@ -240,6 +328,44 @@ type UseCounter = {
240
328
  */
241
329
  declare const useCounter: UseCounter;
242
330
 
331
+ /** The css variable target element type */
332
+ type UseCssVarTarget = RefObject<Element | null | undefined> | (() => Element) | Element;
333
+ /** The css variable return type */
334
+ interface UseCssVarReturn {
335
+ /** The value of the CSS variable */
336
+ value: string;
337
+ /** Set the value of the CSS variable */
338
+ set: (value: string) => void;
339
+ }
340
+ interface UseCssVar {
341
+ <Target extends UseCssVarTarget>(target: Target, key: string, initialValue?: string): UseCssVarReturn;
342
+ (key: string, initialValue?: string): UseCssVarReturn;
343
+ }
344
+ /**
345
+ * @name useCssVar
346
+ * @description - Hook that returns the value of a CSS variable
347
+ * @category Utilities
348
+ *
349
+ * @overload
350
+ * @param {string} key The CSS variable key
351
+ * @param {string} initialValue The initial value of the CSS variable
352
+ * @returns {UseCssVarReturn} The object containing the value of the CSS variable
353
+ *
354
+ * @example
355
+ * const { value, set } = useCssVar('color', 'red');
356
+ *
357
+ * @overload
358
+ * @template Target The target element
359
+ * @param {Target} target The target element
360
+ * @param {string} key The CSS variable key
361
+ * @param {string} initialValue The initial value of the CSS variable
362
+ * @returns {UseCssVarReturn} The object containing the value of the CSS variable
363
+ *
364
+ * @example
365
+ * const { value, set } = useCssVar(ref, 'color', 'red');
366
+ */
367
+ declare const useCssVar: UseCssVar;
368
+
243
369
  /**
244
370
  * @name useDebounceCallback
245
371
  * @description - Hook that creates a debounced callback and returns a stable reference of it
@@ -413,6 +539,18 @@ declare const useDocumentVisibility: () => DocumentVisibilityState;
413
539
  */
414
540
  declare const useEvent: <Params extends unknown[], Return>(callback: (...args: Params) => Return) => ((...args: Params) => Return);
415
541
 
542
+ interface ColorSelectionOptions {
543
+ signal?: AbortSignal;
544
+ }
545
+ interface ColorSelectionResult {
546
+ sRGBHex: string;
547
+ }
548
+ interface EyeDropper {
549
+ open: (options?: ColorSelectionOptions) => Promise<ColorSelectionResult>;
550
+ }
551
+ interface EyeDropperConstructor {
552
+ new (): EyeDropper;
553
+ }
416
554
  declare global {
417
555
  interface Window {
418
556
  readonly EyeDropper?: EyeDropperConstructor | undefined;
@@ -440,6 +578,8 @@ interface UseEyeDropperReturn {
440
578
  */
441
579
  declare const useEyeDropper: (initialValue?: string | undefined) => UseEyeDropperReturn;
442
580
 
581
+ /** The use favicon return type */
582
+ type UseFaviconReturn = [string, Dispatch<SetStateAction<string>>];
443
583
  /**
444
584
  * @name useFavicon
445
585
  * @description - Hook that manages the favicon
@@ -631,7 +771,7 @@ interface UseFullScreenReturn {
631
771
  type UseFullScreen = {
632
772
  <Target extends UseFullScreenTarget>(target: Target, options?: UseFullScreenOptions): UseFullScreenReturn;
633
773
  <Target extends UseFullScreenTarget>(options?: UseFullScreenOptions, target?: never): UseFullScreenReturn & {
634
- ref: RefObject<Target>;
774
+ ref: (node: Target) => void;
635
775
  };
636
776
  };
637
777
  /**
@@ -662,11 +802,57 @@ type UseFullScreen = {
662
802
  */
663
803
  declare const useFullscreen: UseFullScreen;
664
804
 
805
+ declare const mapGamepadToXbox360Controller: (gamepad: Gamepad) => {
806
+ buttons: {
807
+ a: GamepadButton;
808
+ b: GamepadButton;
809
+ x: GamepadButton;
810
+ y: GamepadButton;
811
+ };
812
+ bumper: {
813
+ left: GamepadButton;
814
+ right: GamepadButton;
815
+ };
816
+ triggers: {
817
+ left: GamepadButton;
818
+ right: GamepadButton;
819
+ };
820
+ stick: {
821
+ left: {
822
+ horizontal: number;
823
+ vertical: number;
824
+ button: GamepadButton;
825
+ };
826
+ right: {
827
+ horizontal: number;
828
+ vertical: number;
829
+ button: GamepadButton;
830
+ };
831
+ };
832
+ dpad: {
833
+ up: GamepadButton;
834
+ down: GamepadButton;
835
+ left: GamepadButton;
836
+ right: GamepadButton;
837
+ };
838
+ back: GamepadButton;
839
+ start: GamepadButton;
840
+ };
841
+
665
842
  declare global {
666
843
  interface Gamepad {
667
844
  hapticActuators?: GamepadHapticActuator[];
668
845
  }
669
846
  }
847
+ /** The use gamepad return type */
848
+ interface UseGamepadStateReturn {
849
+ /** The gamepad supported status */
850
+ supported: boolean;
851
+ /** The gamepad state */
852
+ gamepads: Gamepad[];
853
+ /** The gamepad active status */
854
+ active: boolean;
855
+ }
670
856
  /**
671
857
  * @name useGamepad
672
858
  * @description - Hook for getting information about gamepad
@@ -748,7 +934,13 @@ interface UseHotkeysOptions {
748
934
  /** Alias map for hotkeys */
749
935
  aliasMap?: Record<string, string>;
750
936
  }
937
+ declare const isHotkeyMatch: (hotkey: string, keys: UseHotkeysKey[]) => boolean;
751
938
  type UseHotkeysHotkeys = string[] | string;
939
+ type UseHotkeysKey = {
940
+ key: string;
941
+ code: string;
942
+ alias: string;
943
+ };
752
944
  /**
753
945
  * @name useHotkeys
754
946
  * @description - Hook that listens for hotkeys
@@ -757,7 +949,7 @@ type UseHotkeysHotkeys = string[] | string;
757
949
  * @param {UseHotkeysHotkeys} hotkeys The key or keys to listen for
758
950
  * @param {(event: KeyboardEvent) => void} callback The callback function to be called when the hotkey is pressed
759
951
  * @param {UseEventListenerTarget} [options.target=window] The target to attach the event listeners to
760
- * @param {boolean} [options.enabled=true] Enable or disable the event listeners
952
+ * @param {boolean} [options.enabled=true] The enable or disable the event listeners
761
953
  * @param {boolean} [options.preventDefault=true] Whether to prevent the default behavior of the event
762
954
  * @param {Record<string, string>} [options.aliasMap] Alias map for hotkeys
763
955
  * @returns {useKeysPressedReturns} Array of strings with keys that were press
@@ -918,6 +1110,8 @@ interface UseImageOptions {
918
1110
  /** The referrer policy of the image */
919
1111
  referrerPolicy?: HTMLImageElement['referrerPolicy'];
920
1112
  }
1113
+ /** The use image return type */
1114
+ type UseImageReturn = UseQueryReturn<HTMLImageElement>;
921
1115
  /**
922
1116
  * @name useImage
923
1117
  * @description - Hook that load an image in the browser
@@ -1177,6 +1371,23 @@ declare const useKeysPressed: (params?: UseKeysPressedParams) => {
1177
1371
  code: string;
1178
1372
  }[];
1179
1373
 
1374
+ /** The use list return type */
1375
+ interface UseListReturn<Item> {
1376
+ /** The current list of items */
1377
+ value: Item[];
1378
+ /** Sets the list of items */
1379
+ set: (list: Item[]) => void;
1380
+ /** Adds an item to the list */
1381
+ push: (item: Item) => void;
1382
+ /** Removes an item from the list */
1383
+ removeAt: (removeAtIndex: number) => void;
1384
+ /** Inserts an item at the specified index */
1385
+ insertAt: (insertAtIndex: number, item: Item) => void;
1386
+ /** Updates an item at the specified index */
1387
+ updateAt: (updateAtIndex: number, item: Item) => void;
1388
+ /** Clears the list */
1389
+ clear: () => void;
1390
+ }
1180
1391
  /**
1181
1392
  * @name useList
1182
1393
  * @description - Hook that defines the logic when unmounting a component
@@ -1207,6 +1418,12 @@ interface UseStorageOptions<Value> {
1207
1418
  storage?: Storage;
1208
1419
  initialValue?: UseStorageInitialValue<Value>;
1209
1420
  }
1421
+ type UseStorageReturn<Value> = {
1422
+ value: Value;
1423
+ set: (value: Value) => void;
1424
+ remove: () => void;
1425
+ };
1426
+ declare const dispatchStorageEvent: (params: Partial<StorageEvent>) => boolean;
1210
1427
  /**
1211
1428
  * @name useStorage
1212
1429
  * @description - Hook that manages storage value
@@ -1260,6 +1477,7 @@ declare const useLocalStorage: <Value>(key: string, initialValue?: UseStorageIni
1260
1477
  */
1261
1478
  declare const useLogger: (name: string, params: unknown[]) => void;
1262
1479
 
1480
+ type UseLongPressTarget = RefObject<Element | null | undefined> | (() => Element) | Element;
1263
1481
  type LongPressReactEvents<Target extends Element = Element> = MouseEventHandler<Target> | TouchEventHandler<Target>;
1264
1482
  interface UseLongPressOptions {
1265
1483
  threshold?: number;
@@ -1473,6 +1691,9 @@ interface UseMutationReturn<Body, Data> {
1473
1691
  isError: boolean;
1474
1692
  isSuccess: boolean;
1475
1693
  }
1694
+ interface RequestOptions<Data> extends UseMutationOptions<Data> {
1695
+ attempt?: number;
1696
+ }
1476
1697
  /**
1477
1698
  * @name useMutation
1478
1699
  * @description - Hook that defines the logic when mutate data
@@ -1491,41 +1712,65 @@ interface UseMutationReturn<Body, Data> {
1491
1712
  */
1492
1713
  declare const useMutation: <Body, Data>(callback: (body: Body) => Promise<Data>, options?: UseMutationOptions<Data>) => UseMutationReturn<Body, Data>;
1493
1714
 
1494
- declare global {
1495
- interface Navigator {
1496
- readonly connection: Connection;
1497
- readonly mozConnection: Connection;
1498
- readonly webkitConnection: Connection;
1499
- }
1715
+ /** The mutation observer target element type */
1716
+ type UseMutationObserverTarget = RefObject<Element | null | undefined> | (() => Element) | Element | Window | Document;
1717
+ /** The mutation observer return type */
1718
+ interface UseMutationObserverReturn {
1719
+ /** The mutation observer entries */
1720
+ stop: () => void;
1721
+ /** The mutation observer instance */
1722
+ observer: MutationObserver;
1723
+ }
1724
+ /** The mutation observer options type */
1725
+ interface UseMutationObserverOptions extends MutationObserverInit {
1726
+ /** The enabled state of the mutation observer */
1727
+ enabled?: boolean;
1500
1728
  }
1501
- /** The use network return type */
1502
- interface UseNetworkReturn {
1503
- /** Indicates if the device is currently online */
1504
- online: boolean;
1505
- /** The estimated downlink speed in megabits per seconds */
1506
- downlink?: Connection['downlink'];
1507
- /** The maximum downlink speed, if available */
1508
- downlinkMax?: Connection['downlinkMax'];
1509
- /** The effective type of connection (e.g., '2g', '3g', '4g') */
1510
- effectiveType?: Connection['effectiveType'];
1511
- /** The estimated round-trip time in milliseconds */
1512
- rtt?: Connection['rtt'];
1513
- /** Indicates if the user has enabled data saving mode */
1514
- saveData?: Connection['saveData'];
1515
- /** The type of network connection (e.g., 'wifi', 'cellular') */
1516
- type?: Connection['type'];
1517
- }
1518
- /**
1519
- * @name useNetwork
1520
- * @description - Hook to track network status
1521
- * @category Sensors
1729
+ type UseMutationObserver = {
1730
+ <Target extends UseMutationObserverTarget | UseMutationObserverTarget[]>(target: Target, callback: MutationCallback, options?: UseMutationObserverOptions): UseMutationObserverReturn;
1731
+ <Target extends UseMutationObserverTarget | UseMutationObserverTarget[]>(callback: MutationCallback, options?: UseMutationObserverOptions, target?: never): UseMutationObserverReturn & {
1732
+ ref: (node: Target) => void;
1733
+ };
1734
+ };
1735
+ /**
1736
+ * @name useMutationObserver
1737
+ * @description - Hook that gives you mutation observer state
1738
+ * @category Browser
1739
+ *
1740
+ * @overload
1741
+ * @template Target The target element
1742
+ * @param {MutationCallback} callback The callback to execute when mutation is detected
1743
+ * @param {boolean} [options.enabled=true] The enabled state of the mutation observer
1744
+ * @param {boolean} [options.attributes] Set to true if mutations to target's attributes are to be observed
1745
+ * @param {boolean} [options.characterData] Set to true if mutations to target's data are to be observed
1746
+ * @param {boolean} [options.childList] Set to true if mutations to target's children are to be observed
1747
+ * @param {boolean} [options.subtree] Set to true if mutations to not just target, but also target's descendants are to be observed
1748
+ * @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
1749
+ * @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
1750
+ * @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
1751
+ * @returns {UseMutationObserverReturn & { ref: (node: Target) => void }} An object containing the mutation observer state
1522
1752
  *
1523
- * @returns {UseNetworkReturn} An object containing the network status
1753
+ * @example
1754
+ * const { ref, observer, stop } = useMutationObserver(() => console.log('callback'))
1755
+ *
1756
+ * @overload
1757
+ * @template Target The target element
1758
+ * @param {Target} target The target element to observe
1759
+ * @param {MutationCallback} callback The callback to execute when mutation is detected
1760
+ * @param {boolean} [options.enabled=true] The enabled state of the mutation observer
1761
+ * @param {boolean} [options.attributes] Set to true if mutations to target's attributes are to be observed
1762
+ * @param {boolean} [options.characterData] Set to true if mutations to target's data are to be observed
1763
+ * @param {boolean} [options.childList] Set to true if mutations to target's children are to be observed
1764
+ * @param {boolean} [options.subtree] Set to true if mutations to not just target, but also target's descendants are to be observed
1765
+ * @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
1766
+ * @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
1767
+ * @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
1768
+ * @returns {UseMutationObserverReturn} An object containing the mutation observer state
1524
1769
  *
1525
1770
  * @example
1526
- * const { online, downlink, downlinkMax, effectiveType, rtt, saveData, type } = useNetwork();
1771
+ * const { observer, stop } = useMutationObserver(ref, () => console.log('callback'))
1527
1772
  */
1528
- declare const useNetwork: () => UseNetworkReturn;
1773
+ declare const useMutationObserver: UseMutationObserver;
1529
1774
 
1530
1775
  /** The use offset pagination return type */
1531
1776
  interface UseOffsetPaginationOptions {
@@ -1610,6 +1855,7 @@ declare const useOnline: () => boolean;
1610
1855
 
1611
1856
  /** The operating system type */
1612
1857
  type OperatingSystem = 'undetermined' | 'macos' | 'ios' | 'windows' | 'android' | 'linux';
1858
+ declare const getOperatingSystem: () => OperatingSystem;
1613
1859
  /**
1614
1860
  * @name useOperatingSystem
1615
1861
  * @description - Hook that returns the operating system of the current browser
@@ -1757,6 +2003,15 @@ declare const usePaint: UsePaint;
1757
2003
 
1758
2004
  /** The permission name */
1759
2005
  type UsePermissionName = PermissionName | 'accelerometer' | 'accessibility-events' | 'ambient-light-sensor' | 'background-sync' | 'camera' | 'clipboard-read' | 'clipboard-write' | 'gyroscope' | 'magnetometer' | 'microphone' | 'notifications' | 'payment-handler' | 'persistent-storage' | 'push' | 'speaker';
2006
+ /** The use permission return type */
2007
+ interface UsePermissionReturn {
2008
+ /** The permission state */
2009
+ state: PermissionState;
2010
+ /** The permission supported status */
2011
+ supported: boolean;
2012
+ /** The permission query function */
2013
+ query: () => Promise<PermissionState>;
2014
+ }
1760
2015
  /**
1761
2016
  * @name usePermission
1762
2017
  * @description - Hook that gives you the state of permission
@@ -1918,6 +2173,7 @@ interface UseRafReturn {
1918
2173
  */
1919
2174
  declare const useRaf: (callback: UseRafCallback, options?: UseRafOptions) => UseRafReturn;
1920
2175
 
2176
+ type UseRafValueReturn<Value> = [Value, (value: Value) => void];
1921
2177
  /**
1922
2178
  * @name useRafValue
1923
2179
  * @description - Hook that returns the value and a function to set the value
@@ -2030,6 +2286,7 @@ declare const useResizeObserver: UseResizeObserver;
2030
2286
 
2031
2287
  /** The use script status */
2032
2288
  type UseScriptStatus = 'loading' | 'ready' | 'error' | 'unknown';
2289
+ declare const SCRIPT_STATUS_ATTRIBUTE_NAME = "script-status";
2033
2290
  /** The use script options extends from attributes script tag */
2034
2291
  interface UseScriptOptions extends ComponentProps<'script'> {
2035
2292
  /** Whether to remove the script on unmount */
@@ -2133,6 +2390,13 @@ interface UseShareParams {
2133
2390
  /** The url of the share */
2134
2391
  url?: string;
2135
2392
  }
2393
+ /** The use share return type */
2394
+ interface UseShareReturn {
2395
+ /** The share function */
2396
+ share: (shareParams: ShareData) => Promise<void>;
2397
+ /** The share supported status */
2398
+ supported: boolean;
2399
+ }
2136
2400
  /**
2137
2401
  * @name useShare
2138
2402
  * @description - Hook that utilizes the share api
@@ -2256,6 +2520,7 @@ type UseStopwatch = {
2256
2520
  */
2257
2521
  declare const useStopwatch: UseStopwatch;
2258
2522
 
2523
+ declare const getRangesSelection: (selection: Selection) => Range[];
2259
2524
  /** The use text selection return type */
2260
2525
  interface UseTextSelectionReturn {
2261
2526
  /** The current selection text */
@@ -2325,6 +2590,8 @@ interface UseTimeoutReturn {
2325
2590
  */
2326
2591
  declare function useTimeout(callback: () => void, delay: number): UseTimeoutReturn;
2327
2592
 
2593
+ /** The use toggle return type */
2594
+ type UseToggleReturn<Value> = readonly [Value, (value?: Value) => void];
2328
2595
  /**
2329
2596
  * @name useToggle
2330
2597
  * @description - Hook that create toggle
@@ -2411,6 +2678,13 @@ interface UseWindowSizeParams {
2411
2678
  /** Whether to include the scrollbar in the window size calculation */
2412
2679
  includeScrollbar?: boolean;
2413
2680
  }
2681
+ /** The use window size return type */
2682
+ interface UseWindowSizeReturn {
2683
+ /** The current window width */
2684
+ width: number;
2685
+ /** The current window height */
2686
+ height: number;
2687
+ }
2414
2688
  /**
2415
2689
  * @name useWindowSize
2416
2690
  * @description - Hook that manages a window size
@@ -2465,8 +2739,6 @@ declare const getRetry: (retry: number | boolean) => number;
2465
2739
 
2466
2740
  declare const isClient: boolean;
2467
2741
 
2468
- declare const isPermissionAllowed: (status: PermissionState) => boolean;
2469
-
2470
2742
  declare const throttle: <Params extends any[]>(callback: (...args: Params) => void, delay: number) => ((...args: Params) => void);
2471
2743
 
2472
2744
  declare const getDate: (now?: Date) => {
@@ -2483,4 +2755,4 @@ declare const getDate: (now?: Date) => {
2483
2755
  timestamp: number;
2484
2756
  };
2485
2757
 
2486
- export { type GetElementTarget, debounce, getDate, getElement, getRetry, isClient, isPermissionAllowed, throttle, useAsync, useBattery, useBoolean, useBreakpoints, useBrowserLanguage, useClickOutside, useClipboard, useCounter, useDebounceCallback, useDebounceValue, useDefault, useDidUpdate, useDisclosure, useDocumentEvent, useDocumentTitle, useDocumentVisibility, useEvent, useEventListener, useEyeDropper, useFavicon, useField, useFileDialog, useFps, useFullscreen, useGamepad, useGeolocation, useHash, useHotkeys, useHover, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useInterval, useIsFirstRender, useIsomorphicLayoutEffect, useKeyPress, useKeyPressEvent, useKeyboard, useKeysPressed, useList, useLocalStorage, useLogger, useLongPress, useMap, useMeasure, useMediaQuery, useMemory, useMount, useMouse, useMutation, useNetwork, useOffsetPagination, useOnline, useOperatingSystem, useOrientation, usePageLeave, usePaint, usePermission, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useQuery, useQueue, useRaf, useRafValue, useRenderCount, useRenderInfo, useRerender, useResizeObserver, useScript, useSessionStorage, useSet, useShare, useStep, useStopwatch, useStorage, useTextSelection, useTime, useTimeout, useToggle, useUnmount, useWebSocket, useWindowEvent, useWindowSize, useWizard };
2758
+ 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, type ColorSelectionOptions, type ColorSelectionResult, type EyeDropper, type EyeDropperConstructor, type GetElementTarget, type LongPressReactEvents, type OperatingSystem, type RequestOptions, SCRIPT_STATUS_ATTRIBUTE_NAME, type UseAsyncReturn, type UseBatteryStateReturn, type UseBooleanReturn, type UseBreakpointsReturn, type UseBreakpointsStrategy, type UseClickOutside, type UseCopyToClipboardParams, type UseCopyToClipboardReturn, type UseCounter, type UseCounterOptions, type UseCounterReturn, type UseCssVar, type UseCssVarReturn, type UseCssVarTarget, type UseDisclosureOptions, type UseDisclosureReturn, type UseDocumentTitleOptions, type UseDocumentTitleReturn, type UseEventListener, type UseEventListenerOptions, type UseEventListenerReturn, type UseEventListenerTarget, type UseEyeDropperReturn, type UseFaviconReturn, type UseFieldParams, type UseFieldRegisterParams, type UseFieldReturn, type UseFileDialog, type UseFileDialogOptions, type UseFileDialogReturn, type UseFullScreen, type UseFullScreenOptions, type UseFullScreenReturn, type UseFullScreenTarget, type UseGamepadStateReturn, type UseGeolocationParams, type UseGeolocationReturn, type UseHotkeysHotkeys, type UseHotkeysKey, type UseHotkeysOptions, type UseHover, type UseHoverOptions, type UseHoverTarget, type UseIdleOptions, type UseIdleReturn, type UseImageOptions, type UseImageReturn, type UseInfiniteScroll, type UseInfiniteScrollOptions, type UseInfiniteScrollTarget, type UseIntersectionObserver, type UseIntersectionObserverOptions, type UseIntersectionObserverReturn, type UseIntersectionObserverTarget, type UseIntervalOptions, type UseIntervalReturn, type UseKeyPressEvent, type UseKeyPressEventKey, type UseKeyPressKey, type UseKeyPressOptions, type UseKeyboardParams, type UseKeysPressedParams, type UseListReturn, type UseLongPressBind, type UseLongPressOptions, type UseLongPressReturn, type UseLongPressTarget, type UseMapReturn, type UseMeasureReturn, type UseMeasureScreen, type UseMeasureTarget, type UseMemoryReturn, type UseMouse, type UseMouseReturn, type UseMutationObserver, type UseMutationObserverOptions, type UseMutationObserverReturn, type UseMutationObserverTarget, type UseOffsetPaginationOptions, type UseOffsetPaginationReturn, type UseOrientationReturn, type UsePaint, type UsePaintOptions, type UsePaintReturn, type UsePaintTarget, type UsePermissionName, type UsePermissionReturn, type UsePreferredColorSchemeReturn, type UsePreferredContrastReturn, type UsePreferredReducedMotionReturn, 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 UseResizeObserverTarget, type UseScriptOptions, type UseScriptStatus, type UseShareParams, type UseShareReturn, type UseStopwatchOptions, type UseStopwatchReturn, type UseStorageInitialValue, type UseStorageOptions, type UseStorageReturn, type UseTextSelectionReturn, type UseTimeReturn, type UseToggleReturn, type UseWebSocketOptions, type UseWebSocketReturn, type UseWebSocketStatus, type UseWebSocketUrl, type UseWindowSizeReturn, type WizardItem, debounce, dispatchStorageEvent, getDate, getElement, getOperatingSystem, getRangesSelection, getRetry, isClient, isHotkeyMatch, isPermissionAllowed, legacyCopyToClipboard, mapGamepadToXbox360Controller, throttle, useAsync, useBattery, useBoolean, useBreakpoints, useBrowserLanguage, useClickOutside, useClipboard, useCounter, useCssVar, useDebounceCallback, useDebounceValue, useDefault, useDidUpdate, useDisclosure, useDocumentEvent, useDocumentTitle, useDocumentVisibility, useEvent, useEventListener, useEyeDropper, useFavicon, useField, useFileDialog, useFps, useFullscreen, useGamepad, useGeolocation, useHash, useHotkeys, useHover, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useInterval, useIsFirstRender, useIsomorphicLayoutEffect, useKeyPress, useKeyPressEvent, useKeyboard, useKeysPressed, useList, useLocalStorage, useLogger, useLongPress, useMap, useMeasure, useMediaQuery, useMemory, useMount, useMouse, useMutation, useMutationObserver, useOffsetPagination, useOnline, useOperatingSystem, useOrientation, usePageLeave, usePaint, usePermission, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useQuery, useQueue, useRaf, useRafValue, useRenderCount, useRenderInfo, useRerender, useResizeObserver, useScript, useSessionStorage, useSet, useShare, useStep, useStopwatch, useStorage, useTextSelection, useTime, useTimeout, useToggle, useUnmount, useWebSocket, useWindowEvent, useWindowSize, useWizard };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@siberiacancode/reactuse",
3
- "version": "0.0.60",
3
+ "version": "0.0.62",
4
4
  "description": "Ultimate tool",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"_rollupPluginBabelHelpers-DaULt_UR.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,3 +0,0 @@
1
- /* @license @siberiacancode/reactuse v0.0.60 */
2
- "use strict";var e=require("react");exports.useMutationObserver=function(r,n,t){var u=e.useRef(),c=e.useRef(null);return e.useEffect((function(){var e="function"==typeof t?t():t;return(e||c.current)&&(u.current=new MutationObserver(r),u.current.observe(e||c.current,n)),function(){var e;null===(e=u.current)||void 0===e||e.disconnect()}}),[r,n]),c};
3
- //# sourceMappingURL=useMutationObserver.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useMutationObserver.js","sources":["../../../src/hooks/useMutationObserver.ts"],"sourcesContent":["import type { RefObject } from 'react';\nimport { useEffect, useRef } from 'react';\n\nexport function useMutationObserver<Element extends HTMLElement>(\n callback: MutationCallback,\n options: MutationObserverInit,\n target?: HTMLElement | (() => HTMLElement) | null\n) {\n const observer = useRef<MutationObserver>();\n const ref: RefObject<Element> = useRef(null);\n\n useEffect(() => {\n const targetElement = typeof target === 'function' ? target() : target;\n\n if (targetElement || ref.current) {\n observer.current = new MutationObserver(callback);\n observer.current.observe(targetElement || ref.current!, options);\n }\n\n return () => {\n observer.current?.disconnect();\n };\n }, [callback, options]);\n\n return ref;\n}\n"],"names":["callback","options","target","observer","useRef","ref","useEffect","targetElement","current","MutationObserver","observe","_observer$current","disconnect"],"mappings":";gEAGO,SACLA,EACAC,EACAC,GAEA,IAAMC,EAAWC,EAAAA,SACXC,EAA0BD,SAAO,MAevC,OAbAE,EAAAA,WAAU,WACR,IAAMC,EAAkC,mBAAXL,EAAwBA,IAAWA,EAOhE,OALIK,GAAiBF,EAAIG,WACvBL,EAASK,QAAU,IAAIC,iBAAiBT,GACxCG,EAASK,QAAQE,QAAQH,GAAiBF,EAAIG,QAAUP,IAGnD,WAAM,IAAAU,EACK,QAAhBA,EAAAR,EAASK,eAAO,IAAAG,GAAhBA,EAAkBC,aAEtB,GAAG,CAACZ,EAAUC,IAEPI,CACT"}
@@ -1,3 +0,0 @@
1
- /* @license @siberiacancode/reactuse v0.0.60 */
2
- "use strict";exports.isPermissionAllowed=function(r){return"granted"===r||"prompt"===r};
3
- //# sourceMappingURL=isPermissionAllowed.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isPermissionAllowed.js","sources":["../../../../src/utils/helpers/isPermissionAllowed.ts"],"sourcesContent":["export const isPermissionAllowed = (status: PermissionState) =>\n status === 'granted' || status === 'prompt';\n"],"names":["status"],"mappings":";yCAAmC,SAACA,GAAuB,MAC9C,YAAXA,GAAmC,WAAXA,CAAmB"}
@@ -1,3 +0,0 @@
1
- /* @license @siberiacancode/reactuse v0.0.60 */
2
- "use strict";
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_rollupPluginBabelHelpers-BdfjLHhW.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,3 +0,0 @@
1
- /* @license @siberiacancode/reactuse v0.0.60 */
2
- import{useRef as r,useEffect as n}from"react";function t(t,e,u){var c=r(),o=r(null);return n((function(){var r="function"==typeof u?u():u;return(r||o.current)&&(c.current=new MutationObserver(t),c.current.observe(r||o.current,e)),function(){var r;null===(r=c.current)||void 0===r||r.disconnect()}}),[t,e]),o}export{t as useMutationObserver};
3
- //# sourceMappingURL=useMutationObserver.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useMutationObserver.js","sources":["../../../src/hooks/useMutationObserver.ts"],"sourcesContent":["import type { RefObject } from 'react';\nimport { useEffect, useRef } from 'react';\n\nexport function useMutationObserver<Element extends HTMLElement>(\n callback: MutationCallback,\n options: MutationObserverInit,\n target?: HTMLElement | (() => HTMLElement) | null\n) {\n const observer = useRef<MutationObserver>();\n const ref: RefObject<Element> = useRef(null);\n\n useEffect(() => {\n const targetElement = typeof target === 'function' ? target() : target;\n\n if (targetElement || ref.current) {\n observer.current = new MutationObserver(callback);\n observer.current.observe(targetElement || ref.current!, options);\n }\n\n return () => {\n observer.current?.disconnect();\n };\n }, [callback, options]);\n\n return ref;\n}\n"],"names":["useMutationObserver","callback","options","target","observer","useRef","ref","useEffect","targetElement","current","MutationObserver","observe","_observer$current","disconnect"],"mappings":";8CAGO,SAASA,EACdC,EACAC,EACAC,GAEA,IAAMC,EAAWC,IACXC,EAA0BD,EAAO,MAevC,OAbAE,GAAU,WACR,IAAMC,EAAkC,mBAAXL,EAAwBA,IAAWA,EAOhE,OALIK,GAAiBF,EAAIG,WACvBL,EAASK,QAAU,IAAIC,iBAAiBT,GACxCG,EAASK,QAAQE,QAAQH,GAAiBF,EAAIG,QAAUP,IAGnD,WAAM,IAAAU,EACK,QAAhBA,EAAAR,EAASK,eAAO,IAAAG,GAAhBA,EAAkBC,aAEtB,GAAG,CAACZ,EAAUC,IAEPI,CACT"}
@@ -1,3 +0,0 @@
1
- /* @license @siberiacancode/reactuse v0.0.60 */
2
- var r=function(r){return"granted"===r||"prompt"===r};export{r as isPermissionAllowed};
3
- //# sourceMappingURL=isPermissionAllowed.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isPermissionAllowed.js","sources":["../../../../src/utils/helpers/isPermissionAllowed.ts"],"sourcesContent":["export const isPermissionAllowed = (status: PermissionState) =>\n status === 'granted' || status === 'prompt';\n"],"names":["isPermissionAllowed","status"],"mappings":";IAAaA,EAAsB,SAACC,GAAuB,MAC9C,YAAXA,GAAmC,WAAXA,CAAmB"}
@@ -1,2 +0,0 @@
1
- /* @license @siberiacancode/reactuse v0.0.60 */
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}