@siberiacancode/reactuse 0.0.96 → 0.0.97

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 (337) hide show
  1. package/dist/cjs/{_rollupPluginBabelHelpers-zZt1zBDH.js → _rollupPluginBabelHelpers-B6-9bMtn.js} +3 -3
  2. package/dist/cjs/_rollupPluginBabelHelpers-B6-9bMtn.js.map +1 -0
  3. package/dist/cjs/hooks/index.js +2 -2
  4. package/dist/cjs/hooks/useActiveElement/useActiveElement.js +2 -2
  5. package/dist/cjs/hooks/useAsync/useAsync.js +2 -2
  6. package/dist/cjs/hooks/useBattery/useBattery.js +2 -2
  7. package/dist/cjs/hooks/useBluetooth/useBluetooth.js +2 -2
  8. package/dist/cjs/hooks/useBoolean/useBoolean.js +2 -2
  9. package/dist/cjs/hooks/useBreakpoints/useBreakpoints.js +2 -2
  10. package/dist/cjs/hooks/useBreakpoints/useBreakpoints.js.map +1 -1
  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/useClipboard/useClipboard.js +2 -2
  14. package/dist/cjs/hooks/useConst/useConst.js +1 -1
  15. package/dist/cjs/hooks/useCookie/useCookie.js +2 -2
  16. package/dist/cjs/hooks/useCookie/useCookie.js.map +1 -1
  17. package/dist/cjs/hooks/useCounter/useCounter.js +2 -2
  18. package/dist/cjs/hooks/useCssVar/useCssVar.js +2 -2
  19. package/dist/cjs/hooks/useDebounceCallback/useDebounceCallback.js +2 -2
  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/useDeviceMotion/useDeviceMotion.js +2 -2
  23. package/dist/cjs/hooks/useDeviceMotion/useDeviceMotion.js.map +1 -1
  24. package/dist/cjs/hooks/useDeviceOrientation/useDeviceOrientation.js +2 -2
  25. package/dist/cjs/hooks/useDevicePixelRatio/useDevicePixelRatio.js +2 -2
  26. package/dist/cjs/hooks/useDidUpdate/useDidUpdate.js +1 -1
  27. package/dist/cjs/hooks/useDisclosure/useDisclosure.js +2 -2
  28. package/dist/cjs/hooks/useDisplayMedia/useDisplayMedia.js +2 -2
  29. package/dist/cjs/hooks/useDocumentEvent/useDocumentEvent.js +2 -2
  30. package/dist/cjs/hooks/useDocumentTitle/useDocumentTitle.js +2 -2
  31. package/dist/cjs/hooks/useDocumentVisibility/useDocumentVisibility.js +1 -1
  32. package/dist/cjs/hooks/useElementSize/useElementSize.js +2 -2
  33. package/dist/cjs/hooks/useEvent/useEvent.js +1 -1
  34. package/dist/cjs/hooks/useEventListener/useEventListener.js +2 -2
  35. package/dist/cjs/hooks/useEyeDropper/useEyeDropper.js +2 -2
  36. package/dist/cjs/hooks/useFavicon/useFavicon.js +2 -2
  37. package/dist/cjs/hooks/useField/useField.js +2 -2
  38. package/dist/cjs/hooks/useFileDialog/useFileDialog.js +2 -2
  39. package/dist/cjs/hooks/useFileDialog/useFileDialog.js.map +1 -1
  40. package/dist/cjs/hooks/useFocus/useFocus.js +2 -2
  41. package/dist/cjs/hooks/useFps/useFps.js +2 -2
  42. package/dist/cjs/hooks/useFullscreen/useFullscreen.js +2 -2
  43. package/dist/cjs/hooks/useGamepad/helpers/index.js +1 -1
  44. package/dist/cjs/hooks/useGamepad/helpers/mapGamepadToXbox360Controller.js +1 -1
  45. package/dist/cjs/hooks/useGamepad/useGamepad.js +2 -2
  46. package/dist/cjs/hooks/useGamepad/useGamepad.js.map +1 -1
  47. package/dist/cjs/hooks/useGeolocation/useGeolocation.js +2 -2
  48. package/dist/cjs/hooks/useHash/useHash.js +2 -2
  49. package/dist/cjs/hooks/useHotkeys/useHotkeys.js +2 -2
  50. package/dist/cjs/hooks/useHover/useHover.js +2 -2
  51. package/dist/cjs/hooks/useIdle/useIdle.js +2 -2
  52. package/dist/cjs/hooks/useImage/useImage.js +2 -2
  53. package/dist/cjs/hooks/useInfiniteScroll/useInfiniteScroll.js +2 -2
  54. package/dist/cjs/hooks/useIntersectionObserver/useIntersectionObserver.js +2 -2
  55. package/dist/cjs/hooks/useInterval/useInterval.js +2 -2
  56. package/dist/cjs/hooks/useIsFirstRender/useIsFirstRender.js +1 -1
  57. package/dist/cjs/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +1 -1
  58. package/dist/cjs/hooks/useKeyPress/useKeyPress.js +2 -2
  59. package/dist/cjs/hooks/useKeyPressEvent/useKeyPressEvent.js +2 -2
  60. package/dist/cjs/hooks/useKeyPressEvent/useKeyPressEvent.js.map +1 -1
  61. package/dist/cjs/hooks/useKeyboard/useKeyboard.js +2 -2
  62. package/dist/cjs/hooks/useKeysPressed/useKeysPressed.js +2 -2
  63. package/dist/cjs/hooks/useLastChanged/useLastChanged.js +2 -2
  64. package/dist/cjs/hooks/useLatest/useLatest.js +1 -1
  65. package/dist/cjs/hooks/useList/useList.js +2 -2
  66. package/dist/cjs/hooks/useLocalStorage/useLocalStorage.js +2 -2
  67. package/dist/cjs/hooks/useLogger/useLogger.js +2 -2
  68. package/dist/cjs/hooks/useLongPress/useLongPress.js +2 -2
  69. package/dist/cjs/hooks/useLongPress/useLongPress.js.map +1 -1
  70. package/dist/cjs/hooks/useMap/useMap.js +2 -2
  71. package/dist/cjs/hooks/useMeasure/useMeasure.js +2 -2
  72. package/dist/cjs/hooks/useMeasure/useMeasure.js.map +1 -1
  73. package/dist/cjs/hooks/useMediaQuery/useMediaQuery.js +1 -1
  74. package/dist/cjs/hooks/useMemory/useMemory.js +2 -2
  75. package/dist/cjs/hooks/useMount/useMount.js +1 -1
  76. package/dist/cjs/hooks/useMouse/useMouse.js +2 -2
  77. package/dist/cjs/hooks/useMutation/useMutation.js +2 -2
  78. package/dist/cjs/hooks/useMutationObserver/useMutationObserver.js +2 -2
  79. package/dist/cjs/hooks/useNetwork/useNetwork.js +2 -2
  80. package/dist/cjs/hooks/useOffsetPagination/useOffsetPagination.js +2 -2
  81. package/dist/cjs/hooks/useOnline/useOnline.js +1 -1
  82. package/dist/cjs/hooks/useOperatingSystem/useOperatingSystem.js +1 -1
  83. package/dist/cjs/hooks/useOptimistic/useOptimistic.js +2 -2
  84. package/dist/cjs/hooks/useOrientation/useOrientation.js +2 -2
  85. package/dist/cjs/hooks/useOtpCredential/useOtpCredential.js +2 -2
  86. package/dist/cjs/hooks/usePageLeave/usePageLeave.js +2 -2
  87. package/dist/cjs/hooks/usePaint/helpers/Paint.js +2 -2
  88. package/dist/cjs/hooks/usePaint/helpers/Paint.js.map +1 -1
  89. package/dist/cjs/hooks/usePaint/helpers/index.js +3 -0
  90. package/dist/cjs/hooks/usePaint/usePaint.js +2 -2
  91. package/dist/cjs/hooks/usePaint/usePaint.js.map +1 -1
  92. package/dist/cjs/hooks/useParallax/useParallax.js +2 -2
  93. package/dist/cjs/hooks/usePermission/usePermission.js +2 -2
  94. package/dist/cjs/hooks/usePointerLock/usePointerLock.js +2 -2
  95. package/dist/cjs/hooks/usePostMessage/usePostMessage.js +1 -1
  96. package/dist/cjs/hooks/usePreferredColorScheme/usePreferredColorScheme.js +1 -1
  97. package/dist/cjs/hooks/usePreferredContrast/usePreferredContrast.js +1 -1
  98. package/dist/cjs/hooks/usePreferredDark/usePreferredDark.js +1 -1
  99. package/dist/cjs/hooks/usePreferredLanguages/usePreferredLanguages.js +1 -1
  100. package/dist/cjs/hooks/usePreferredReducedMotion/usePreferredReducedMotion.js +1 -1
  101. package/dist/cjs/hooks/usePrevious/usePrevious.js +1 -1
  102. package/dist/cjs/hooks/useQuery/useQuery.js +2 -2
  103. package/dist/cjs/hooks/useQuery/useQuery.js.map +1 -1
  104. package/dist/cjs/hooks/useQueue/useQueue.js +2 -2
  105. package/dist/cjs/hooks/useRaf/useRaf.js +2 -2
  106. package/dist/cjs/hooks/useRaf/useRaf.js.map +1 -1
  107. package/dist/cjs/hooks/useRafValue/useRafValue.js +2 -2
  108. package/dist/cjs/hooks/useRefState/useRefState.js +2 -2
  109. package/dist/cjs/hooks/useRenderCount/useRenderCount.js +1 -1
  110. package/dist/cjs/hooks/useRenderInfo/useRenderInfo.js +1 -1
  111. package/dist/cjs/hooks/useRerender/useRerender.js +1 -1
  112. package/dist/cjs/hooks/useResizeObserver/useResizeObserver.js +2 -2
  113. package/dist/cjs/hooks/useScreenOrientation/useScreenOrientation.js +2 -2
  114. package/dist/cjs/hooks/useScript/useScript.js +2 -2
  115. package/dist/cjs/hooks/useScroll/useScroll.js +2 -2
  116. package/dist/cjs/hooks/useScroll/useScroll.js.map +1 -1
  117. package/dist/cjs/hooks/useScrollIntoView/useScrollIntoView.js +2 -2
  118. package/dist/cjs/hooks/useScrollTo/useScrollTo.js +2 -2
  119. package/dist/cjs/hooks/useSessionStorage/useSessionStorage.js +2 -2
  120. package/dist/cjs/hooks/useSet/useSet.js +2 -2
  121. package/dist/cjs/hooks/useShare/useShare.js +2 -2
  122. package/dist/cjs/hooks/useStateHistory/useStateHistory.js +2 -2
  123. package/dist/cjs/hooks/useStep/useStep.js +2 -2
  124. package/dist/cjs/hooks/useStopwatch/useStopwatch.js +2 -2
  125. package/dist/cjs/hooks/useStorage/useStorage.js +2 -2
  126. package/dist/cjs/hooks/useTextDirection/useTextDirection.js +2 -2
  127. package/dist/cjs/hooks/useTextSelection/useTextSelection.js +2 -2
  128. package/dist/cjs/hooks/useThrottleCallback/useThrottleCallback.js +2 -2
  129. package/dist/cjs/hooks/useThrottleValue/useThrottleValue.js +2 -2
  130. package/dist/cjs/hooks/useTime/useTime.js +2 -2
  131. package/dist/cjs/hooks/useTimeout/useTimeout.js +2 -2
  132. package/dist/cjs/hooks/useTimer/useTimer.js +2 -2
  133. package/dist/cjs/hooks/useToggle/useToggle.js +2 -2
  134. package/dist/cjs/hooks/useUnmount/useUnmount.js +1 -1
  135. package/dist/cjs/hooks/useVibrate/useVibrate.js +2 -2
  136. package/dist/cjs/hooks/useWebSocket/useWebSocket.js +2 -2
  137. package/dist/cjs/hooks/useWindowEvent/useWindowEvent.js +2 -2
  138. package/dist/cjs/hooks/useWindowFocus/useWindowFocus.js +2 -2
  139. package/dist/cjs/hooks/useWindowScroll/useWindowScroll.js +2 -2
  140. package/dist/cjs/hooks/useWindowSize/useWindowSize.js +2 -2
  141. package/dist/cjs/hooks/useWizard/useWizard.js +2 -2
  142. package/dist/cjs/hooks/useWizard/useWizard.js.map +1 -1
  143. package/dist/cjs/index.js +2 -2
  144. package/dist/cjs/utils/helpers/cookie.js +3 -0
  145. package/dist/cjs/utils/helpers/cookie.js.map +1 -0
  146. package/dist/cjs/utils/helpers/debounce.js +1 -1
  147. package/dist/cjs/utils/helpers/getDate.js +1 -1
  148. package/dist/cjs/utils/helpers/getElement.js +1 -1
  149. package/dist/cjs/utils/helpers/getRetry.js +1 -1
  150. package/dist/cjs/utils/helpers/index.js +2 -2
  151. package/dist/cjs/utils/helpers/isTarget.js +2 -2
  152. package/dist/cjs/utils/helpers/throttle.js +1 -1
  153. package/dist/esm/{_rollupPluginBabelHelpers-B03Kl8w9.js → _rollupPluginBabelHelpers-WrSliisk.js} +3 -3
  154. package/dist/esm/_rollupPluginBabelHelpers-WrSliisk.js.map +1 -0
  155. package/dist/esm/hooks/index.js +2 -2
  156. package/dist/esm/hooks/useActiveElement/useActiveElement.js +2 -2
  157. package/dist/esm/hooks/useAsync/useAsync.js +2 -2
  158. package/dist/esm/hooks/useBattery/useBattery.js +2 -2
  159. package/dist/esm/hooks/useBluetooth/useBluetooth.js +2 -2
  160. package/dist/esm/hooks/useBoolean/useBoolean.js +2 -2
  161. package/dist/esm/hooks/useBreakpoints/useBreakpoints.js +2 -2
  162. package/dist/esm/hooks/useBreakpoints/useBreakpoints.js.map +1 -1
  163. package/dist/esm/hooks/useBrowserLanguage/useBrowserLanguage.js +1 -1
  164. package/dist/esm/hooks/useClickOutside/useClickOutside.js +2 -2
  165. package/dist/esm/hooks/useClipboard/useClipboard.js +2 -2
  166. package/dist/esm/hooks/useConst/useConst.js +1 -1
  167. package/dist/esm/hooks/useCookie/useCookie.js +2 -2
  168. package/dist/esm/hooks/useCookie/useCookie.js.map +1 -1
  169. package/dist/esm/hooks/useCounter/useCounter.js +2 -2
  170. package/dist/esm/hooks/useCssVar/useCssVar.js +2 -2
  171. package/dist/esm/hooks/useDebounceCallback/useDebounceCallback.js +2 -2
  172. package/dist/esm/hooks/useDebounceValue/useDebounceValue.js +2 -2
  173. package/dist/esm/hooks/useDefault/useDefault.js +2 -2
  174. package/dist/esm/hooks/useDeviceMotion/useDeviceMotion.js +2 -2
  175. package/dist/esm/hooks/useDeviceOrientation/useDeviceOrientation.js +2 -2
  176. package/dist/esm/hooks/useDevicePixelRatio/useDevicePixelRatio.js +2 -2
  177. package/dist/esm/hooks/useDidUpdate/useDidUpdate.js +1 -1
  178. package/dist/esm/hooks/useDisclosure/useDisclosure.js +2 -2
  179. package/dist/esm/hooks/useDisplayMedia/useDisplayMedia.js +2 -2
  180. package/dist/esm/hooks/useDocumentEvent/useDocumentEvent.js +2 -2
  181. package/dist/esm/hooks/useDocumentTitle/useDocumentTitle.js +2 -2
  182. package/dist/esm/hooks/useDocumentVisibility/useDocumentVisibility.js +1 -1
  183. package/dist/esm/hooks/useElementSize/useElementSize.js +2 -2
  184. package/dist/esm/hooks/useEvent/useEvent.js +1 -1
  185. package/dist/esm/hooks/useEventListener/useEventListener.js +2 -2
  186. package/dist/esm/hooks/useEyeDropper/useEyeDropper.js +2 -2
  187. package/dist/esm/hooks/useFavicon/useFavicon.js +2 -2
  188. package/dist/esm/hooks/useField/useField.js +2 -2
  189. package/dist/esm/hooks/useFileDialog/useFileDialog.js +2 -2
  190. package/dist/esm/hooks/useFileDialog/useFileDialog.js.map +1 -1
  191. package/dist/esm/hooks/useFocus/useFocus.js +2 -2
  192. package/dist/esm/hooks/useFps/useFps.js +2 -2
  193. package/dist/esm/hooks/useFullscreen/useFullscreen.js +2 -2
  194. package/dist/esm/hooks/useGamepad/helpers/index.js +1 -1
  195. package/dist/esm/hooks/useGamepad/helpers/mapGamepadToXbox360Controller.js +1 -1
  196. package/dist/esm/hooks/useGamepad/useGamepad.js +2 -2
  197. package/dist/esm/hooks/useGamepad/useGamepad.js.map +1 -1
  198. package/dist/esm/hooks/useGeolocation/useGeolocation.js +2 -2
  199. package/dist/esm/hooks/useHash/useHash.js +2 -2
  200. package/dist/esm/hooks/useHotkeys/useHotkeys.js +2 -2
  201. package/dist/esm/hooks/useHover/useHover.js +2 -2
  202. package/dist/esm/hooks/useIdle/useIdle.js +2 -2
  203. package/dist/esm/hooks/useImage/useImage.js +2 -2
  204. package/dist/esm/hooks/useInfiniteScroll/useInfiniteScroll.js +2 -2
  205. package/dist/esm/hooks/useIntersectionObserver/useIntersectionObserver.js +2 -2
  206. package/dist/esm/hooks/useInterval/useInterval.js +2 -2
  207. package/dist/esm/hooks/useIsFirstRender/useIsFirstRender.js +1 -1
  208. package/dist/esm/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +1 -1
  209. package/dist/esm/hooks/useKeyPress/useKeyPress.js +2 -2
  210. package/dist/esm/hooks/useKeyPressEvent/useKeyPressEvent.js +2 -2
  211. package/dist/esm/hooks/useKeyboard/useKeyboard.js +2 -2
  212. package/dist/esm/hooks/useKeysPressed/useKeysPressed.js +2 -2
  213. package/dist/esm/hooks/useLastChanged/useLastChanged.js +2 -2
  214. package/dist/esm/hooks/useLatest/useLatest.js +1 -1
  215. package/dist/esm/hooks/useList/useList.js +2 -2
  216. package/dist/esm/hooks/useLocalStorage/useLocalStorage.js +2 -2
  217. package/dist/esm/hooks/useLogger/useLogger.js +2 -2
  218. package/dist/esm/hooks/useLongPress/useLongPress.js +2 -2
  219. package/dist/esm/hooks/useLongPress/useLongPress.js.map +1 -1
  220. package/dist/esm/hooks/useMap/useMap.js +2 -2
  221. package/dist/esm/hooks/useMeasure/useMeasure.js +2 -2
  222. package/dist/esm/hooks/useMediaQuery/useMediaQuery.js +1 -1
  223. package/dist/esm/hooks/useMemory/useMemory.js +2 -2
  224. package/dist/esm/hooks/useMount/useMount.js +1 -1
  225. package/dist/esm/hooks/useMouse/useMouse.js +2 -2
  226. package/dist/esm/hooks/useMutation/useMutation.js +2 -2
  227. package/dist/esm/hooks/useMutationObserver/useMutationObserver.js +2 -2
  228. package/dist/esm/hooks/useNetwork/useNetwork.js +2 -2
  229. package/dist/esm/hooks/useOffsetPagination/useOffsetPagination.js +2 -2
  230. package/dist/esm/hooks/useOnline/useOnline.js +1 -1
  231. package/dist/esm/hooks/useOperatingSystem/useOperatingSystem.js +1 -1
  232. package/dist/esm/hooks/useOptimistic/useOptimistic.js +2 -2
  233. package/dist/esm/hooks/useOrientation/useOrientation.js +2 -2
  234. package/dist/esm/hooks/useOtpCredential/useOtpCredential.js +2 -2
  235. package/dist/esm/hooks/usePageLeave/usePageLeave.js +2 -2
  236. package/dist/esm/hooks/usePaint/helpers/Paint.js +2 -2
  237. package/dist/esm/hooks/usePaint/helpers/Paint.js.map +1 -1
  238. package/dist/esm/hooks/usePaint/helpers/index.js +3 -0
  239. package/dist/esm/hooks/usePaint/usePaint.js +2 -2
  240. package/dist/esm/hooks/usePaint/usePaint.js.map +1 -1
  241. package/dist/esm/hooks/useParallax/useParallax.js +2 -2
  242. package/dist/esm/hooks/usePermission/usePermission.js +2 -2
  243. package/dist/esm/hooks/usePointerLock/usePointerLock.js +2 -2
  244. package/dist/esm/hooks/usePostMessage/usePostMessage.js +1 -1
  245. package/dist/esm/hooks/usePreferredColorScheme/usePreferredColorScheme.js +1 -1
  246. package/dist/esm/hooks/usePreferredContrast/usePreferredContrast.js +1 -1
  247. package/dist/esm/hooks/usePreferredDark/usePreferredDark.js +1 -1
  248. package/dist/esm/hooks/usePreferredLanguages/usePreferredLanguages.js +1 -1
  249. package/dist/esm/hooks/usePreferredReducedMotion/usePreferredReducedMotion.js +1 -1
  250. package/dist/esm/hooks/usePrevious/usePrevious.js +1 -1
  251. package/dist/esm/hooks/useQuery/useQuery.js +2 -2
  252. package/dist/esm/hooks/useQuery/useQuery.js.map +1 -1
  253. package/dist/esm/hooks/useQueue/useQueue.js +2 -2
  254. package/dist/esm/hooks/useRaf/useRaf.js +2 -2
  255. package/dist/esm/hooks/useRaf/useRaf.js.map +1 -1
  256. package/dist/esm/hooks/useRafValue/useRafValue.js +2 -2
  257. package/dist/esm/hooks/useRefState/useRefState.js +2 -2
  258. package/dist/esm/hooks/useRenderCount/useRenderCount.js +1 -1
  259. package/dist/esm/hooks/useRenderInfo/useRenderInfo.js +1 -1
  260. package/dist/esm/hooks/useRerender/useRerender.js +1 -1
  261. package/dist/esm/hooks/useResizeObserver/useResizeObserver.js +2 -2
  262. package/dist/esm/hooks/useScreenOrientation/useScreenOrientation.js +2 -2
  263. package/dist/esm/hooks/useScript/useScript.js +2 -2
  264. package/dist/esm/hooks/useScroll/useScroll.js +2 -2
  265. package/dist/esm/hooks/useScroll/useScroll.js.map +1 -1
  266. package/dist/esm/hooks/useScrollIntoView/useScrollIntoView.js +2 -2
  267. package/dist/esm/hooks/useScrollTo/useScrollTo.js +2 -2
  268. package/dist/esm/hooks/useSessionStorage/useSessionStorage.js +2 -2
  269. package/dist/esm/hooks/useSet/useSet.js +2 -2
  270. package/dist/esm/hooks/useShare/useShare.js +2 -2
  271. package/dist/esm/hooks/useStateHistory/useStateHistory.js +2 -2
  272. package/dist/esm/hooks/useStep/useStep.js +2 -2
  273. package/dist/esm/hooks/useStopwatch/useStopwatch.js +2 -2
  274. package/dist/esm/hooks/useStorage/useStorage.js +2 -2
  275. package/dist/esm/hooks/useTextDirection/useTextDirection.js +2 -2
  276. package/dist/esm/hooks/useTextSelection/useTextSelection.js +2 -2
  277. package/dist/esm/hooks/useThrottleCallback/useThrottleCallback.js +2 -2
  278. package/dist/esm/hooks/useThrottleValue/useThrottleValue.js +2 -2
  279. package/dist/esm/hooks/useTime/useTime.js +2 -2
  280. package/dist/esm/hooks/useTimeout/useTimeout.js +2 -2
  281. package/dist/esm/hooks/useTimer/useTimer.js +2 -2
  282. package/dist/esm/hooks/useToggle/useToggle.js +2 -2
  283. package/dist/esm/hooks/useUnmount/useUnmount.js +1 -1
  284. package/dist/esm/hooks/useVibrate/useVibrate.js +2 -2
  285. package/dist/esm/hooks/useWebSocket/useWebSocket.js +2 -2
  286. package/dist/esm/hooks/useWindowEvent/useWindowEvent.js +2 -2
  287. package/dist/esm/hooks/useWindowFocus/useWindowFocus.js +2 -2
  288. package/dist/esm/hooks/useWindowScroll/useWindowScroll.js +2 -2
  289. package/dist/esm/hooks/useWindowSize/useWindowSize.js +2 -2
  290. package/dist/esm/hooks/useWizard/useWizard.js +2 -2
  291. package/dist/esm/hooks/useWizard/useWizard.js.map +1 -1
  292. package/dist/esm/index.js +2 -2
  293. package/dist/esm/utils/helpers/cookie.js +3 -0
  294. package/dist/esm/utils/helpers/cookie.js.map +1 -0
  295. package/dist/esm/utils/helpers/debounce.js +1 -1
  296. package/dist/esm/utils/helpers/getDate.js +1 -1
  297. package/dist/esm/utils/helpers/getElement.js +1 -1
  298. package/dist/esm/utils/helpers/getRetry.js +1 -1
  299. package/dist/esm/utils/helpers/index.js +2 -2
  300. package/dist/esm/utils/helpers/isTarget.js +2 -2
  301. package/dist/esm/utils/helpers/throttle.js +1 -1
  302. package/dist/types/index.d.ts +74 -79
  303. package/package.json +91 -91
  304. package/dist/cjs/_rollupPluginBabelHelpers-zZt1zBDH.js.map +0 -1
  305. package/dist/cjs/hooks/useBreakpoints/helpers/breakpoints.js +0 -3
  306. package/dist/cjs/hooks/useBreakpoints/helpers/breakpoints.js.map +0 -1
  307. package/dist/cjs/hooks/useBreakpoints/helpers/index.js +0 -3
  308. package/dist/cjs/hooks/useCookie/helpers/clearCookies.js +0 -3
  309. package/dist/cjs/hooks/useCookie/helpers/clearCookies.js.map +0 -1
  310. package/dist/cjs/hooks/useCookie/helpers/getCookies.js +0 -3
  311. package/dist/cjs/hooks/useCookie/helpers/getCookies.js.map +0 -1
  312. package/dist/cjs/hooks/useCookie/helpers/index.js +0 -3
  313. package/dist/cjs/hooks/useCookie/helpers/removeCookie.js +0 -3
  314. package/dist/cjs/hooks/useCookie/helpers/removeCookie.js.map +0 -1
  315. package/dist/cjs/hooks/useCookie/helpers/setCookie.js +0 -3
  316. package/dist/cjs/hooks/useCookie/helpers/setCookie.js.map +0 -1
  317. package/dist/cjs/hooks/usePaint/helpers/Pointer.js +0 -3
  318. package/dist/cjs/hooks/usePaint/helpers/Pointer.js.map +0 -1
  319. package/dist/esm/_rollupPluginBabelHelpers-B03Kl8w9.js.map +0 -1
  320. package/dist/esm/hooks/useBreakpoints/helpers/breakpoints.js +0 -3
  321. package/dist/esm/hooks/useBreakpoints/helpers/breakpoints.js.map +0 -1
  322. package/dist/esm/hooks/useBreakpoints/helpers/index.js +0 -3
  323. package/dist/esm/hooks/useBreakpoints/helpers/index.js.map +0 -1
  324. package/dist/esm/hooks/useCookie/helpers/clearCookies.js +0 -3
  325. package/dist/esm/hooks/useCookie/helpers/clearCookies.js.map +0 -1
  326. package/dist/esm/hooks/useCookie/helpers/getCookies.js +0 -3
  327. package/dist/esm/hooks/useCookie/helpers/getCookies.js.map +0 -1
  328. package/dist/esm/hooks/useCookie/helpers/index.js +0 -3
  329. package/dist/esm/hooks/useCookie/helpers/index.js.map +0 -1
  330. package/dist/esm/hooks/useCookie/helpers/removeCookie.js +0 -3
  331. package/dist/esm/hooks/useCookie/helpers/removeCookie.js.map +0 -1
  332. package/dist/esm/hooks/useCookie/helpers/setCookie.js +0 -3
  333. package/dist/esm/hooks/useCookie/helpers/setCookie.js.map +0 -1
  334. package/dist/esm/hooks/usePaint/helpers/Pointer.js +0 -3
  335. package/dist/esm/hooks/usePaint/helpers/Pointer.js.map +0 -1
  336. /package/dist/cjs/hooks/{useBreakpoints → usePaint}/helpers/index.js.map +0 -0
  337. /package/dist/{cjs/hooks/useCookie → esm/hooks/usePaint}/helpers/index.js.map +0 -0
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- export{useActiveElement}from"./useActiveElement/useActiveElement.js";export{useAsync}from"./useAsync/useAsync.js";export{useBattery}from"./useBattery/useBattery.js";export{useBluetooth}from"./useBluetooth/useBluetooth.js";export{useBoolean}from"./useBoolean/useBoolean.js";export{useBreakpoints}from"./useBreakpoints/useBreakpoints.js";export{useBrowserLanguage}from"./useBrowserLanguage/useBrowserLanguage.js";export{useClickOutside}from"./useClickOutside/useClickOutside.js";export{isPermissionAllowed,legacyCopyToClipboard,useClipboard}from"./useClipboard/useClipboard.js";export{useConst}from"./useConst/useConst.js";export{COOKIE_EVENT,dispatchCookieEvent,useCookie}from"./useCookie/useCookie.js";export{useCounter}from"./useCounter/useCounter.js";export{useCssVar}from"./useCssVar/useCssVar.js";export{useDebounceCallback}from"./useDebounceCallback/useDebounceCallback.js";export{useDebounceValue}from"./useDebounceValue/useDebounceValue.js";export{useDefault}from"./useDefault/useDefault.js";export{useDeviceMotion}from"./useDeviceMotion/useDeviceMotion.js";export{useDeviceOrientation}from"./useDeviceOrientation/useDeviceOrientation.js";export{useDevicePixelRatio}from"./useDevicePixelRatio/useDevicePixelRatio.js";export{useDidUpdate}from"./useDidUpdate/useDidUpdate.js";export{useDisclosure}from"./useDisclosure/useDisclosure.js";export{useDisplayMedia}from"./useDisplayMedia/useDisplayMedia.js";export{useDocumentEvent}from"./useDocumentEvent/useDocumentEvent.js";export{useDocumentTitle}from"./useDocumentTitle/useDocumentTitle.js";export{useDocumentVisibility}from"./useDocumentVisibility/useDocumentVisibility.js";export{useElementSize}from"./useElementSize/useElementSize.js";export{useEvent}from"./useEvent/useEvent.js";export{useEventListener}from"./useEventListener/useEventListener.js";export{useEyeDropper}from"./useEyeDropper/useEyeDropper.js";export{useFavicon}from"./useFavicon/useFavicon.js";export{useField}from"./useField/useField.js";export{useFileDialog}from"./useFileDialog/useFileDialog.js";export{useFocus}from"./useFocus/useFocus.js";export{useFps}from"./useFps/useFps.js";export{useFullscreen}from"./useFullscreen/useFullscreen.js";export{useGamepad}from"./useGamepad/useGamepad.js";export{useGeolocation}from"./useGeolocation/useGeolocation.js";export{useHash}from"./useHash/useHash.js";export{isHotkeyMatch,useHotkeys}from"./useHotkeys/useHotkeys.js";export{useHover}from"./useHover/useHover.js";export{useIdle}from"./useIdle/useIdle.js";export{useImage}from"./useImage/useImage.js";export{useInfiniteScroll}from"./useInfiniteScroll/useInfiniteScroll.js";export{useIntersectionObserver}from"./useIntersectionObserver/useIntersectionObserver.js";export{useInterval}from"./useInterval/useInterval.js";export{useIsFirstRender}from"./useIsFirstRender/useIsFirstRender.js";export{useIsomorphicLayoutEffect}from"./useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";export{useKeyboard}from"./useKeyboard/useKeyboard.js";export{useKeyPress}from"./useKeyPress/useKeyPress.js";export{useKeyPressEvent}from"./useKeyPressEvent/useKeyPressEvent.js";export{useKeysPressed}from"./useKeysPressed/useKeysPressed.js";export{useLastChanged}from"./useLastChanged/useLastChanged.js";export{useLatest}from"./useLatest/useLatest.js";export{useList}from"./useList/useList.js";export{useLocalStorage}from"./useLocalStorage/useLocalStorage.js";export{useLogger}from"./useLogger/useLogger.js";export{useLongPress}from"./useLongPress/useLongPress.js";export{useMap}from"./useMap/useMap.js";export{useMeasure}from"./useMeasure/useMeasure.js";export{useMediaQuery}from"./useMediaQuery/useMediaQuery.js";export{useMemory}from"./useMemory/useMemory.js";export{useMount}from"./useMount/useMount.js";export{useMouse}from"./useMouse/useMouse.js";export{useMutation}from"./useMutation/useMutation.js";export{useMutationObserver}from"./useMutationObserver/useMutationObserver.js";export{getConnection,useNetwork}from"./useNetwork/useNetwork.js";export{useOffsetPagination}from"./useOffsetPagination/useOffsetPagination.js";export{useOnline}from"./useOnline/useOnline.js";export{getOperatingSystem,useOperatingSystem}from"./useOperatingSystem/useOperatingSystem.js";export{useOptimistic}from"./useOptimistic/useOptimistic.js";export{useOrientation}from"./useOrientation/useOrientation.js";export{useOtpCredential}from"./useOtpCredential/useOtpCredential.js";export{usePageLeave}from"./usePageLeave/usePageLeave.js";export{usePaint}from"./usePaint/usePaint.js";export{useParallax}from"./useParallax/useParallax.js";export{usePermission}from"./usePermission/usePermission.js";export{usePointerLock}from"./usePointerLock/usePointerLock.js";export{usePostMessage}from"./usePostMessage/usePostMessage.js";export{usePreferredColorScheme}from"./usePreferredColorScheme/usePreferredColorScheme.js";export{usePreferredContrast}from"./usePreferredContrast/usePreferredContrast.js";export{usePreferredDark}from"./usePreferredDark/usePreferredDark.js";export{usePreferredLanguages}from"./usePreferredLanguages/usePreferredLanguages.js";export{usePreferredReducedMotion}from"./usePreferredReducedMotion/usePreferredReducedMotion.js";export{usePrevious}from"./usePrevious/usePrevious.js";export{useQuery}from"./useQuery/useQuery.js";export{useQueue}from"./useQueue/useQueue.js";export{useRaf}from"./useRaf/useRaf.js";export{useRafValue}from"./useRafValue/useRafValue.js";export{useRefState}from"./useRefState/useRefState.js";export{useRenderCount}from"./useRenderCount/useRenderCount.js";export{useRenderInfo}from"./useRenderInfo/useRenderInfo.js";export{useRerender}from"./useRerender/useRerender.js";export{useResizeObserver}from"./useResizeObserver/useResizeObserver.js";export{useScreenOrientation}from"./useScreenOrientation/useScreenOrientation.js";export{SCRIPT_STATUS_ATTRIBUTE_NAME,useScript}from"./useScript/useScript.js";export{useScroll}from"./useScroll/useScroll.js";export{useScrollIntoView}from"./useScrollIntoView/useScrollIntoView.js";export{useScrollTo}from"./useScrollTo/useScrollTo.js";export{useSessionStorage}from"./useSessionStorage/useSessionStorage.js";export{useSet}from"./useSet/useSet.js";export{useShare}from"./useShare/useShare.js";export{useStateHistory}from"./useStateHistory/useStateHistory.js";export{useStep}from"./useStep/useStep.js";export{useStopwatch}from"./useStopwatch/useStopwatch.js";export{STORAGE_EVENT,dispatchStorageEvent,useStorage}from"./useStorage/useStorage.js";export{useTextDirection}from"./useTextDirection/useTextDirection.js";export{getRangesSelection,useTextSelection}from"./useTextSelection/useTextSelection.js";export{useThrottleCallback}from"./useThrottleCallback/useThrottleCallback.js";export{useThrottleValue}from"./useThrottleValue/useThrottleValue.js";export{useTime}from"./useTime/useTime.js";export{useTimeout}from"./useTimeout/useTimeout.js";export{getTimeFromSeconds,useTimer}from"./useTimer/useTimer.js";export{useToggle}from"./useToggle/useToggle.js";export{useUnmount}from"./useUnmount/useUnmount.js";export{useVibrate}from"./useVibrate/useVibrate.js";export{useWebSocket}from"./useWebSocket/useWebSocket.js";export{useWindowEvent}from"./useWindowEvent/useWindowEvent.js";export{useWindowFocus}from"./useWindowFocus/useWindowFocus.js";export{scrollTo,useWindowScroll}from"./useWindowScroll/useWindowScroll.js";export{useWindowSize}from"./useWindowSize/useWindowSize.js";export{useWizard}from"./useWizard/useWizard.js";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}from"./useBreakpoints/helpers/breakpoints.js";export{clearCookies}from"./useCookie/helpers/clearCookies.js";export{getCookies}from"./useCookie/helpers/getCookies.js";export{removeCookie}from"./useCookie/helpers/removeCookie.js";export{setCookie}from"./useCookie/helpers/setCookie.js";export{mapGamepadToXbox360Controller}from"./useGamepad/helpers/mapGamepadToXbox360Controller.js";import"../_rollupPluginBabelHelpers-B03Kl8w9.js";import"react";import"../utils/helpers/getElement.js";import"../utils/helpers/isTarget.js";import"../utils/helpers/debounce.js";import"../utils/helpers/throttle.js";import"./usePaint/helpers/Paint.js";import"./usePaint/helpers/Pointer.js";import"../utils/helpers/getRetry.js";import"react-dom";import"../utils/helpers/getDate.js";
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ export{useActiveElement}from"./useActiveElement/useActiveElement.js";export{useAsync}from"./useAsync/useAsync.js";export{useBattery}from"./useBattery/useBattery.js";export{useBluetooth}from"./useBluetooth/useBluetooth.js";export{useBoolean}from"./useBoolean/useBoolean.js";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,useBreakpoints}from"./useBreakpoints/useBreakpoints.js";export{useBrowserLanguage}from"./useBrowserLanguage/useBrowserLanguage.js";export{useClickOutside}from"./useClickOutside/useClickOutside.js";export{isPermissionAllowed,legacyCopyToClipboard,useClipboard}from"./useClipboard/useClipboard.js";export{useConst}from"./useConst/useConst.js";export{COOKIE_EVENT,dispatchCookieEvent,useCookie}from"./useCookie/useCookie.js";export{useCounter}from"./useCounter/useCounter.js";export{useCssVar}from"./useCssVar/useCssVar.js";export{useDebounceCallback}from"./useDebounceCallback/useDebounceCallback.js";export{useDebounceValue}from"./useDebounceValue/useDebounceValue.js";export{useDefault}from"./useDefault/useDefault.js";export{useDeviceMotion}from"./useDeviceMotion/useDeviceMotion.js";export{useDeviceOrientation}from"./useDeviceOrientation/useDeviceOrientation.js";export{useDevicePixelRatio}from"./useDevicePixelRatio/useDevicePixelRatio.js";export{useDidUpdate}from"./useDidUpdate/useDidUpdate.js";export{useDisclosure}from"./useDisclosure/useDisclosure.js";export{useDisplayMedia}from"./useDisplayMedia/useDisplayMedia.js";export{useDocumentEvent}from"./useDocumentEvent/useDocumentEvent.js";export{useDocumentTitle}from"./useDocumentTitle/useDocumentTitle.js";export{useDocumentVisibility}from"./useDocumentVisibility/useDocumentVisibility.js";export{useElementSize}from"./useElementSize/useElementSize.js";export{useEvent}from"./useEvent/useEvent.js";export{useEventListener}from"./useEventListener/useEventListener.js";export{useEyeDropper}from"./useEyeDropper/useEyeDropper.js";export{useFavicon}from"./useFavicon/useFavicon.js";export{useField}from"./useField/useField.js";export{useFileDialog}from"./useFileDialog/useFileDialog.js";export{useFocus}from"./useFocus/useFocus.js";export{useFps}from"./useFps/useFps.js";export{useFullscreen}from"./useFullscreen/useFullscreen.js";export{useGamepad}from"./useGamepad/useGamepad.js";export{useGeolocation}from"./useGeolocation/useGeolocation.js";export{useHash}from"./useHash/useHash.js";export{isHotkeyMatch,useHotkeys}from"./useHotkeys/useHotkeys.js";export{useHover}from"./useHover/useHover.js";export{useIdle}from"./useIdle/useIdle.js";export{useImage}from"./useImage/useImage.js";export{useInfiniteScroll}from"./useInfiniteScroll/useInfiniteScroll.js";export{useIntersectionObserver}from"./useIntersectionObserver/useIntersectionObserver.js";export{useInterval}from"./useInterval/useInterval.js";export{useIsFirstRender}from"./useIsFirstRender/useIsFirstRender.js";export{useIsomorphicLayoutEffect}from"./useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";export{useKeyboard}from"./useKeyboard/useKeyboard.js";export{useKeyPress}from"./useKeyPress/useKeyPress.js";export{useKeyPressEvent}from"./useKeyPressEvent/useKeyPressEvent.js";export{useKeysPressed}from"./useKeysPressed/useKeysPressed.js";export{useLastChanged}from"./useLastChanged/useLastChanged.js";export{useLatest}from"./useLatest/useLatest.js";export{useList}from"./useList/useList.js";export{useLocalStorage}from"./useLocalStorage/useLocalStorage.js";export{useLogger}from"./useLogger/useLogger.js";export{useLongPress}from"./useLongPress/useLongPress.js";export{useMap}from"./useMap/useMap.js";export{useMeasure}from"./useMeasure/useMeasure.js";export{useMediaQuery}from"./useMediaQuery/useMediaQuery.js";export{useMemory}from"./useMemory/useMemory.js";export{useMount}from"./useMount/useMount.js";export{useMouse}from"./useMouse/useMouse.js";export{useMutation}from"./useMutation/useMutation.js";export{useMutationObserver}from"./useMutationObserver/useMutationObserver.js";export{getConnection,useNetwork}from"./useNetwork/useNetwork.js";export{useOffsetPagination}from"./useOffsetPagination/useOffsetPagination.js";export{useOnline}from"./useOnline/useOnline.js";export{getOperatingSystem,useOperatingSystem}from"./useOperatingSystem/useOperatingSystem.js";export{useOptimistic}from"./useOptimistic/useOptimistic.js";export{useOrientation}from"./useOrientation/useOrientation.js";export{useOtpCredential}from"./useOtpCredential/useOtpCredential.js";export{usePageLeave}from"./usePageLeave/usePageLeave.js";export{usePaint}from"./usePaint/usePaint.js";export{useParallax}from"./useParallax/useParallax.js";export{usePermission}from"./usePermission/usePermission.js";export{usePointerLock}from"./usePointerLock/usePointerLock.js";export{usePostMessage}from"./usePostMessage/usePostMessage.js";export{usePreferredColorScheme}from"./usePreferredColorScheme/usePreferredColorScheme.js";export{usePreferredContrast}from"./usePreferredContrast/usePreferredContrast.js";export{usePreferredDark}from"./usePreferredDark/usePreferredDark.js";export{usePreferredLanguages}from"./usePreferredLanguages/usePreferredLanguages.js";export{usePreferredReducedMotion}from"./usePreferredReducedMotion/usePreferredReducedMotion.js";export{usePrevious}from"./usePrevious/usePrevious.js";export{useQuery}from"./useQuery/useQuery.js";export{useQueue}from"./useQueue/useQueue.js";export{useRaf}from"./useRaf/useRaf.js";export{useRafValue}from"./useRafValue/useRafValue.js";export{useRefState}from"./useRefState/useRefState.js";export{useRenderCount}from"./useRenderCount/useRenderCount.js";export{useRenderInfo}from"./useRenderInfo/useRenderInfo.js";export{useRerender}from"./useRerender/useRerender.js";export{useResizeObserver}from"./useResizeObserver/useResizeObserver.js";export{useScreenOrientation}from"./useScreenOrientation/useScreenOrientation.js";export{SCRIPT_STATUS_ATTRIBUTE_NAME,useScript}from"./useScript/useScript.js";export{useScroll}from"./useScroll/useScroll.js";export{useScrollIntoView}from"./useScrollIntoView/useScrollIntoView.js";export{useScrollTo}from"./useScrollTo/useScrollTo.js";export{useSessionStorage}from"./useSessionStorage/useSessionStorage.js";export{useSet}from"./useSet/useSet.js";export{useShare}from"./useShare/useShare.js";export{useStateHistory}from"./useStateHistory/useStateHistory.js";export{useStep}from"./useStep/useStep.js";export{useStopwatch}from"./useStopwatch/useStopwatch.js";export{STORAGE_EVENT,dispatchStorageEvent,useStorage}from"./useStorage/useStorage.js";export{useTextDirection}from"./useTextDirection/useTextDirection.js";export{getRangesSelection,useTextSelection}from"./useTextSelection/useTextSelection.js";export{useThrottleCallback}from"./useThrottleCallback/useThrottleCallback.js";export{useThrottleValue}from"./useThrottleValue/useThrottleValue.js";export{useTime}from"./useTime/useTime.js";export{useTimeout}from"./useTimeout/useTimeout.js";export{getTimeFromSeconds,useTimer}from"./useTimer/useTimer.js";export{useToggle}from"./useToggle/useToggle.js";export{useUnmount}from"./useUnmount/useUnmount.js";export{useVibrate}from"./useVibrate/useVibrate.js";export{useWebSocket}from"./useWebSocket/useWebSocket.js";export{useWindowEvent}from"./useWindowEvent/useWindowEvent.js";export{useWindowFocus}from"./useWindowFocus/useWindowFocus.js";export{scrollTo,useWindowScroll}from"./useWindowScroll/useWindowScroll.js";export{useWindowSize}from"./useWindowSize/useWindowSize.js";export{useWizard}from"./useWizard/useWizard.js";export{mapGamepadToXbox360Controller}from"./useGamepad/helpers/mapGamepadToXbox360Controller.js";import"../_rollupPluginBabelHelpers-WrSliisk.js";import"react";import"../utils/helpers/isTarget.js";import"../utils/helpers/getElement.js";import"../utils/helpers/cookie.js";import"../utils/helpers/debounce.js";import"../utils/helpers/throttle.js";import"./usePaint/helpers/Paint.js";import"../utils/helpers/getRetry.js";import"react-dom";import"../utils/helpers/getDate.js";
3
3
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{_ as n}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useState as e,useEffect as r}from"react";var t=function(){var t=e(null),o=n(t,2),i=o[0],u=o[1];return r((function(){var n=function(){var n;return u(null===(n=document)||void 0===n?void 0:n.activeElement)};return window.addEventListener("focus",n,!0),window.addEventListener("blur",n,!0),function(){window.removeEventListener("focus",n,!0),window.removeEventListener("blur",n,!0)}})),r((function(){var n=new MutationObserver((function(n){n.filter((function(n){return n.removedNodes.length})).map((function(n){return Array.from(n.removedNodes)})).flat().forEach((function(n){u((function(e){return n===e?document.activeElement:e}))}))}));return n.observe(document,{childList:!0,subtree:!0}),function(){n.disconnect()}}),[]),i};export{t as useActiveElement};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{_ as n}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as e,useEffect as r}from"react";var t=function(){var t=e(null),o=n(t,2),i=o[0],u=o[1];return r((function(){var n=function(){var n;return u(null===(n=document)||void 0===n?void 0:n.activeElement)};return window.addEventListener("focus",n,!0),window.addEventListener("blur",n,!0),function(){window.removeEventListener("focus",n,!0),window.removeEventListener("blur",n,!0)}})),r((function(){var n=new MutationObserver((function(n){n.filter((function(n){return n.removedNodes.length})).map((function(n){return Array.from(n.removedNodes)})).flat().forEach((function(n){u((function(e){return n===e?document.activeElement:e}))}))}));return n.observe(document,{childList:!0,subtree:!0}),function(){n.disconnect()}}),[]),i};export{t as useActiveElement};
3
3
  //# sourceMappingURL=useActiveElement.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{_ as r}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useState as o,useEffect as i}from"react";var n=function(n,t){var a=o(!0),c=r(a,2),e=c[0],f=c[1],u=o(!1),l=r(u,2),d=l[0],p=l[1],s=o(void 0),v=r(s,2),m=v[0],g=v[1],h=o(void 0),_=r(h,2),b=_[0],j=_[1];return i((function(){f(!0),n().then((function(r){j(r),g(void 0),p(!1)})).catch((function(r){g(r),p(!0)})).finally((function(){f(!1)}))}),t),{data:b,isLoading:e,isError:d,error:m}};export{n as useAsync};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{_ as r}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as o,useEffect as i}from"react";var n=function(n,t){var a=o(!0),c=r(a,2),e=c[0],f=c[1],u=o(!1),l=r(u,2),d=l[0],p=l[1],s=o(void 0),v=r(s,2),m=v[0],g=v[1],h=o(void 0),_=r(h,2),b=_[0],j=_[1];return i((function(){f(!0),n().then((function(r){j(r),g(void 0),p(!1)})).catch((function(r){g(r),p(!0)})).finally((function(){f(!1)}))}),t),{data:b,isLoading:e,isError:d,error:m}};export{n as useAsync};
3
3
  //# sourceMappingURL=useAsync.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{_ as e,c as n}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useState as i,useEffect as r}from"react";var t=function(){var t="undefined"!=typeof navigator&&"getBattery"in navigator&&"function"==typeof navigator.getBattery,a=i({loading:!0,level:0,charging:!1,chargingTime:0,dischargingTime:0}),g=e(a,2),o=g[0],v=g[1];return r((function(){if(!t)return v(n(n({},o),{},{loading:!1}));var e,i=function(){var n,i,r,t,a,g,o,l;return v({loading:!1,level:null!==(n=null===(i=e)||void 0===i?void 0:i.level)&&void 0!==n?n:0,charging:null!==(r=null===(t=e)||void 0===t?void 0:t.charging)&&void 0!==r&&r,dischargingTime:null!==(a=null===(g=e)||void 0===g?void 0:g.dischargingTime)&&void 0!==a?a:0,chargingTime:null!==(o=null===(l=e)||void 0===l?void 0:l.chargingTime)&&void 0!==o?o:0})};return navigator.getBattery().then((function(n){e=n,i(),e.addEventListener("levelchange",i),e.addEventListener("chargingchange",i),e.addEventListener("chargingtimechange",i),e.addEventListener("dischargingtimechange",i)})),function(){e&&(e.removeEventListener("levelchange",i),e.removeEventListener("chargingchange",i),e.removeEventListener("chargingtimechange",i),e.removeEventListener("dischargingtimechange",i))}}),[]),{supported:t,value:o}};export{t as useBattery};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{_ as e,c as n}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as i,useEffect as r}from"react";var t=function(){var t="undefined"!=typeof navigator&&"getBattery"in navigator&&"function"==typeof navigator.getBattery,a=i({loading:!0,level:0,charging:!1,chargingTime:0,dischargingTime:0}),g=e(a,2),o=g[0],v=g[1];return r((function(){if(!t)return v(n(n({},o),{},{loading:!1}));var e,i=function(){var n,i,r,t,a,g,o,l;return v({loading:!1,level:null!==(n=null===(i=e)||void 0===i?void 0:i.level)&&void 0!==n?n:0,charging:null!==(r=null===(t=e)||void 0===t?void 0:t.charging)&&void 0!==r&&r,dischargingTime:null!==(a=null===(g=e)||void 0===g?void 0:g.dischargingTime)&&void 0!==a?a:0,chargingTime:null!==(o=null===(l=e)||void 0===l?void 0:l.chargingTime)&&void 0!==o?o:0})};return navigator.getBattery().then((function(n){e=n,i(),e.addEventListener("levelchange",i),e.addEventListener("chargingchange",i),e.addEventListener("chargingtimechange",i),e.addEventListener("dischargingtimechange",i)})),function(){e&&(e.removeEventListener("levelchange",i),e.removeEventListener("chargingchange",i),e.removeEventListener("chargingtimechange",i),e.removeEventListener("dischargingtimechange",i))}}),[]),{supported:t,value:o}};export{t as useBattery};
3
3
  //# sourceMappingURL=useBattery.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{_ as e,d as t,e as r,c as n}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useState as a,useEffect as c}from"react";var i=function(i){var o="undefined"!=typeof navigator&&"bluetooth"in navigator,s=null!=i?i:{},u=s.acceptAllDevices,v=void 0!==u&&u,p=s.filters,f=s.optionalServices,l=a(!1),d=e(l,2),g=d[0],b=d[1],m=a(void 0),x=e(m,2),h=x[0],D=x[1],k=a(void 0),w=e(k,2),y=w[0],A=w[1],q=function(){var e=t(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,navigator.bluetooth.requestDevice(n({acceptAllDevices:v,optionalServices:f},p&&{filters:p,acceptAllDevices:!1}));case 4:t=e.sent,D(t);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return c((function(){if(h&&h.gatt){var e=function(){var e=t(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(h.gatt){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,h.gatt.connect();case 4:t=e.sent,A(t),b(t.connected);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),n=function(){A(void 0),D(void 0),b(!1)};return h.addEventListener("gattserverdisconnected",n),e(),function(){var e;h.removeEventListener("gattserverdisconnected",n),null===(e=h.gatt)||void 0===e||e.disconnect()}}}),[h]),{supported:o,connected:g,device:h,requestDevice:q,server:y}};export{i as useBluetooth};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{_ as e,d as t,e as r,c as n}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as a,useEffect as c}from"react";var i=function(i){var o="undefined"!=typeof navigator&&"bluetooth"in navigator,s=null!=i?i:{},u=s.acceptAllDevices,v=void 0!==u&&u,p=s.filters,f=s.optionalServices,l=a(!1),d=e(l,2),g=d[0],b=d[1],m=a(void 0),x=e(m,2),h=x[0],D=x[1],k=a(void 0),w=e(k,2),y=w[0],A=w[1],q=function(){var e=t(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,navigator.bluetooth.requestDevice(n({acceptAllDevices:v,optionalServices:f},p&&{filters:p,acceptAllDevices:!1}));case 4:t=e.sent,D(t);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return c((function(){if(h&&h.gatt){var e=function(){var e=t(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(h.gatt){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,h.gatt.connect();case 4:t=e.sent,A(t),b(t.connected);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),n=function(){A(void 0),D(void 0),b(!1)};return h.addEventListener("gattserverdisconnected",n),e(),function(){var e;h.removeEventListener("gattserverdisconnected",n),null===(e=h.gatt)||void 0===e||e.disconnect()}}}),[h]),{supported:o,connected:g,device:h,requestDevice:q,server:y}};export{i as useBluetooth};
3
3
  //# sourceMappingURL=useBluetooth.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{_ as r}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useState as n}from"react";var t=function(){var t=n(arguments.length>0&&void 0!==arguments[0]&&arguments[0]),o=r(t,2),e=o[0],u=o[1];return[e,function(r){return u((function(n){return null!=r?r:!n}))}]};export{t as useBoolean};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{_ as r}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as n}from"react";var t=function(){var t=n(arguments.length>0&&void 0!==arguments[0]&&arguments[0]),o=r(t,2),e=o[0],u=o[1];return[e,function(r){return u((function(n){return null!=r?r:!n}))}]};export{t as useBoolean};
3
3
  //# sourceMappingURL=useBoolean.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{c as r,_ as e}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useEffect as n}from"react";import{useRerender as t}from"../useRerender/useRerender.js";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}from"./helpers/breakpoints.js";var i=function(r){return window.matchMedia(r).matches},u=function(u){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mobile-first",a=t(),c=function(r,e){return"".concat(e?Number(u[r])+e:u[r],"px")};n((function(){var r=function(){return a()};return window.addEventListener("resize",r),function(){window.removeEventListener("resize",r)}}),[]);var s=function(r){return i("(min-width: ".concat(c(r),")"))},m=function(r){return i("(max-width: ".concat(c(r),")"))},f=function(){return Object.keys(u).map((function(r){return[r,s(r)]})).filter((function(r){return e(r,2)[1]})).map((function(r){return e(r,1)[0]}))},l=function(r){return i("(min-width: ".concat(c(r,.1),")"))},E=function(r){return i("(max-width: ".concat(c(r,-.1),")"))},A=function(r,e){return i("(min-width: ".concat(c(r),") and (max-width: ").concat(c(e,-.1),")"))},d=Object.keys(u).reduce((function(r,e){var n="mobile-first"===o?s(e):m(e);return r[e]=n,r}),{});return r({current:f,greaterOrEqual:s,smallerOrEqual:m,active:function(){var r=f();return r.length?r.at(-1):void 0},greater:l,smaller:E,between:A,isGreater:l,isGreaterOrEqual:s,isSmaller:E,isSmallerOrEqual:m,isInBetween:A},d)};export{u as useBreakpoints};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{c as e,_ as r}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useEffect as t}from"react";import{useRerender as n}from"../useRerender/useRerender.js";var i=function(e){return window.matchMedia(e).matches},l=function(l){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mobile-first",a=n(),u=function(e,r){return"".concat(r?Number(l[e])+r:l[e],"px")};t((function(){var e=function(){return a()};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]);var m=function(e){return i("(min-width: ".concat(u(e),")"))},c=function(e){return i("(max-width: ".concat(u(e),")"))},s=function(){return Object.keys(l).map((function(e){return[e,m(e)]})).filter((function(e){return r(e,2)[1]})).map((function(e){return r(e,1)[0]}))},x=function(e){return i("(min-width: ".concat(u(e,.1),")"))},d=function(e){return i("(max-width: ".concat(u(e,-.1),")"))},f=function(e,r){return i("(min-width: ".concat(u(e),") and (max-width: ").concat(u(r,-.1),")"))},p=Object.keys(l).reduce((function(e,r){var t="mobile-first"===o?m(r):c(r);return e[r]=t,e}),{});return e({current:s,greaterOrEqual:m,smallerOrEqual:c,active:function(){var e=s();return e.length?e.at(-1):void 0},greater:x,smaller:d,between:f,isGreater:x,isGreaterOrEqual:m,isSmaller:d,isSmallerOrEqual:c,isInBetween:f},p)},o={xs:0,sm:600,md:900,lg:1200,xl:1536},a={xs:576,sm:768,md:992,lg:1200,xl:1408},u={sm:640,md:768,lg:1024,xl:1280,"2xl":1536},m={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},c={xs:480,sm:576,md:768,lg:992,xl:1200,xxl:1600},s={xs:0,sm:600,md:1024,lg:1440,xl:1920},x={mobileS:320,mobileM:375,mobileL:425,tablet:768,laptop:1024,laptopL:1440,desktop4K:2560},d={"3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560},f={sm:576,md:768,lg:992,xl:1200};export{c as BREAKPOINTS_ANT_DESIGN,m as BREAKPOINTS_BOOTSTRAP_V5,a as BREAKPOINTS_MANTINE,d as BREAKPOINTS_MASTER_CSS,o as BREAKPOINTS_MATERIAL_UI,f as BREAKPOINTS_PRIME_FLEX,s as BREAKPOINTS_QUASAR_V2,x as BREAKPOINTS_SEMANTIC,u as BREAKPOINTS_TAILWIND,l as useBreakpoints};
3
3
  //# sourceMappingURL=useBreakpoints.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useBreakpoints.js","sources":["../../../../src/hooks/useBreakpoints/useBreakpoints.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nimport { useRerender } from '../useRerender/useRerender';\n\n/** The breakpoints type */\nexport type Breakpoints<Breakpoint extends string = string> = Record<Breakpoint, number>;\n\n/** The use breakpoints strategy */\nexport type UseBreakpointsStrategy = 'desktop-first' | 'mobile-first';\n\nconst match = (query: string) => window.matchMedia(query).matches;\n\n/** The use breakpoints return type */\nexport type UseBreakpointsReturn<Breakpoint extends string = string> = {\n /** The function that checks if the current breakpoint is greater than to the given breakpoint */\n greater: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is greater than or equal to the given breakpoint */\n greaterOrEqual: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is smaller than to the given breakpoint */\n smaller: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is smaller than or equal to the given breakpoint */\n smallerOrEqual: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is between to the given breakpoints */\n between: (a: Breakpoint, b: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is greater than to the given breakpoint */\n isGreater: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is greater than or equal to the given breakpoint */\n isGreaterOrEqual: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is smaller than to the given breakpoint */\n isSmaller: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is smaller than or equal to the given breakpoint */\n isSmallerOrEqual: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is between to the given breakpoints */\n isInBetween: (a: Breakpoint, b: Breakpoint) => boolean;\n /** The function that returns the current breakpoints */\n current: () => Breakpoint[];\n /** The function that returns the current active breakpoint */\n active: () => Breakpoint;\n} & Record<Breakpoint, boolean>;\n\n/**\n * @name useBreakpoints\n * @description - Hook that manages breakpoints\n * @category Browser\n *\n * @template {string} Breakpoint The name of the breakpoint\n * @param {Breakpoints<Breakpoint>} breakpoints The breakpoints to use\n * @param {UseBreakpointsStrategy} [strategy=min-width] The strategy to use for matching\n * @returns {UseBreakpointsReturn<Breakpoint>} An object containing the current breakpoint\n *\n * @example\n * const { greaterOrEqual, smallerOrEqual, current } = useBreakpoints({ mobile: 0, tablet: 640, laptop: 1024, desktop: 1280 });\n */\nexport const useBreakpoints = <Breakpoint extends string>(\n breakpoints: Breakpoints<Breakpoint>,\n strategy: UseBreakpointsStrategy = 'mobile-first'\n): UseBreakpointsReturn<Breakpoint> => {\n const rerender = useRerender();\n\n const getValue = (breakpoint: Breakpoint, delta?: number) => {\n if (delta) return `${Number(breakpoints[breakpoint]) + delta}px`;\n return `${breakpoints[breakpoint]}px`;\n };\n\n useEffect(() => {\n const onResize = () => rerender();\n window.addEventListener('resize', onResize);\n return () => {\n window.removeEventListener('resize', onResize);\n };\n }, []);\n\n const greaterOrEqual = (breakpoint: Breakpoint) => match(`(min-width: ${getValue(breakpoint)})`);\n const smallerOrEqual = (breakpoint: Breakpoint) => match(`(max-width: ${getValue(breakpoint)})`);\n const current = () =>\n Object.keys(breakpoints)\n .map((breakpoint) => [breakpoint, greaterOrEqual(breakpoint as Breakpoint)])\n .filter(([, value]) => value)\n .map(([breakpoint]) => breakpoint) as Breakpoint[];\n const active = () => {\n const breakpoints = current();\n return (breakpoints.length ? breakpoints.at(-1) : undefined) as Breakpoint;\n };\n\n const greater = (breakpoint: Breakpoint) => match(`(min-width: ${getValue(breakpoint, 0.1)})`);\n const smaller = (breakpoint: Breakpoint) => match(`(max-width: ${getValue(breakpoint, -0.1)})`);\n const between = (a: Breakpoint, b: Breakpoint) =>\n match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n\n const breakpointsKeys = (Object.keys(breakpoints) as Breakpoint[]).reduce(\n (acc, breakpoint) => {\n const value =\n strategy === 'mobile-first' ? greaterOrEqual(breakpoint) : smallerOrEqual(breakpoint);\n acc[breakpoint] = value;\n return acc;\n },\n {} as Record<Breakpoint, boolean>\n );\n\n return {\n current,\n greaterOrEqual,\n smallerOrEqual,\n active,\n greater,\n smaller,\n between,\n isGreater: greater,\n isGreaterOrEqual: greaterOrEqual,\n isSmaller: smaller,\n isSmallerOrEqual: smallerOrEqual,\n isInBetween: between,\n ...breakpointsKeys\n };\n};\n\nexport * from './helpers';\n"],"names":["match","query","window","matchMedia","matches","useBreakpoints","breakpoints","strategy","arguments","length","undefined","rerender","useRerender","getValue","breakpoint","delta","concat","Number","useEffect","onResize","addEventListener","removeEventListener","greaterOrEqual","smallerOrEqual","current","Object","keys","map","filter","_ref","_slicedToArray","_ref3","greater","smaller","between","a","b","breakpointsKeys","reduce","acc","value","_objectSpread","active","at","isGreater","isGreaterOrEqual","isSmaller","isSmallerOrEqual","isInBetween"],"mappings":";qZAUA,IAAMA,EAAQ,SAACC,GAAa,OAAKC,OAAOC,WAAWF,GAAOG,OAAO,EA2CpDC,EAAiB,SAC5BC,GAEqC,IADrCC,EAAgCC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,eAE7BG,EAAWC,IAEXC,EAAW,SAACC,EAAwBC,GACxC,MAAWC,GAAAA,OAAPD,EAAiBE,OAAOX,EAAYQ,IAAeC,EAC7CT,EAAYQ,GADsC,KAE7D,EAEDI,GAAU,WACR,IAAMC,EAAW,WAAH,OAASR,GAAU,EAEjC,OADAT,OAAOkB,iBAAiB,SAAUD,GAC3B,WACLjB,OAAOmB,oBAAoB,SAAUF,EACtC,CACF,GAAE,IAEH,IAAMG,EAAiB,SAACR,GAAsB,OAAKd,iBAAKgB,OAAgBH,EAASC,GAAW,KAAI,EAC1FS,EAAiB,SAACT,GAAsB,OAAKd,iBAAKgB,OAAgBH,EAASC,GAAW,KAAI,EAC1FU,EAAU,WAAH,OACXC,OAAOC,KAAKpB,GACTqB,KAAI,SAACb,GAAU,MAAK,CAACA,EAAYQ,EAAeR,GAA0B,IAC1Ec,QAAO,SAAAC,GAAS,OAATC,EAAAD,EAAA,GAAS,EAAW,IAC3BF,KAAI,SAAAI,GAAY,OAAZD,EAAAC,EAAA,GAAY,KAAiC,EAMhDC,EAAU,SAAClB,GAAsB,OAAKd,EAAKgB,eAAAA,OAAgBH,EAASC,EAAY,IAAI,KAAI,EACxFmB,EAAU,SAACnB,GAAsB,OAAKd,EAAK,eAAAgB,OAAgBH,EAASC,GAAgB,IAAC,KAAI,EACzFoB,EAAU,SAACC,EAAeC,GAAa,OAC3CpC,EAAKgB,eAAAA,OAAgBH,EAASsB,GAAE,sBAAAnB,OAAqBH,EAASuB,GAAG,SAAS,EAEtEC,EAAmBZ,OAAOC,KAAKpB,GAA8BgC,QACjE,SAACC,EAAKzB,GACJ,IAAM0B,EACS,iBAAbjC,EAA8Be,EAAeR,GAAcS,EAAeT,GAE5E,OADAyB,EAAIzB,GAAc0B,EACXD,CACR,GACD,IAGF,OAAAE,EAAA,CACEjB,QAAAA,EACAF,eAAAA,EACAC,eAAAA,EACAmB,OAxBa,WACb,IAAMpC,EAAckB,IACpB,OAAQlB,EAAYG,OAASH,EAAYqC,IAAG,QAAMjC,CACnD,EAsBCsB,QAAAA,EACAC,QAAAA,EACAC,QAAAA,EACAU,UAAWZ,EACXa,iBAAkBvB,EAClBwB,UAAWb,EACXc,iBAAkBxB,EAClByB,YAAad,GACVG,EAEP"}
1
+ {"version":3,"file":"useBreakpoints.js","sources":["../../../../src/hooks/useBreakpoints/useBreakpoints.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nimport { useRerender } from '../useRerender/useRerender';\n\n/** The breakpoints type */\nexport type Breakpoints<Breakpoint extends string = string> = Record<Breakpoint, number>;\n\n/** The use breakpoints strategy */\nexport type UseBreakpointsStrategy = 'desktop-first' | 'mobile-first';\n\nconst match = (query: string) => window.matchMedia(query).matches;\n\n/** The use breakpoints return type */\nexport type UseBreakpointsReturn<Breakpoint extends string = string> = {\n /** The function that checks if the current breakpoint is greater than to the given breakpoint */\n greater: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is greater than or equal to the given breakpoint */\n greaterOrEqual: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is smaller than to the given breakpoint */\n smaller: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is smaller than or equal to the given breakpoint */\n smallerOrEqual: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is between to the given breakpoints */\n between: (a: Breakpoint, b: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is greater than to the given breakpoint */\n isGreater: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is greater than or equal to the given breakpoint */\n isGreaterOrEqual: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is smaller than to the given breakpoint */\n isSmaller: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is smaller than or equal to the given breakpoint */\n isSmallerOrEqual: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is between to the given breakpoints */\n isInBetween: (a: Breakpoint, b: Breakpoint) => boolean;\n /** The function that returns the current breakpoints */\n current: () => Breakpoint[];\n /** The function that returns the current active breakpoint */\n active: () => Breakpoint;\n} & Record<Breakpoint, boolean>;\n\n/**\n * @name useBreakpoints\n * @description - Hook that manages breakpoints\n * @category Browser\n *\n * @template {string} Breakpoint The name of the breakpoint\n * @param {Breakpoints<Breakpoint>} breakpoints The breakpoints to use\n * @param {UseBreakpointsStrategy} [strategy=min-width] The strategy to use for matching\n * @returns {UseBreakpointsReturn<Breakpoint>} An object containing the current breakpoint\n *\n * @example\n * const { greaterOrEqual, smallerOrEqual, current } = useBreakpoints({ mobile: 0, tablet: 640, laptop: 1024, desktop: 1280 });\n */\nexport const useBreakpoints = <Breakpoint extends string>(\n breakpoints: Breakpoints<Breakpoint>,\n strategy: UseBreakpointsStrategy = 'mobile-first'\n): UseBreakpointsReturn<Breakpoint> => {\n const rerender = useRerender();\n\n const getValue = (breakpoint: Breakpoint, delta?: number) => {\n if (delta) return `${Number(breakpoints[breakpoint]) + delta}px`;\n return `${breakpoints[breakpoint]}px`;\n };\n\n useEffect(() => {\n const onResize = () => rerender();\n window.addEventListener('resize', onResize);\n return () => {\n window.removeEventListener('resize', onResize);\n };\n }, []);\n\n const greaterOrEqual = (breakpoint: Breakpoint) => match(`(min-width: ${getValue(breakpoint)})`);\n const smallerOrEqual = (breakpoint: Breakpoint) => match(`(max-width: ${getValue(breakpoint)})`);\n const current = () =>\n Object.keys(breakpoints)\n .map((breakpoint) => [breakpoint, greaterOrEqual(breakpoint as Breakpoint)])\n .filter(([, value]) => value)\n .map(([breakpoint]) => breakpoint) as Breakpoint[];\n const active = () => {\n const breakpoints = current();\n return (breakpoints.length ? breakpoints.at(-1) : undefined) as Breakpoint;\n };\n\n const greater = (breakpoint: Breakpoint) => match(`(min-width: ${getValue(breakpoint, 0.1)})`);\n const smaller = (breakpoint: Breakpoint) => match(`(max-width: ${getValue(breakpoint, -0.1)})`);\n const between = (a: Breakpoint, b: Breakpoint) =>\n match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n\n const breakpointsKeys = (Object.keys(breakpoints) as Breakpoint[]).reduce(\n (acc, breakpoint) => {\n const value =\n strategy === 'mobile-first' ? greaterOrEqual(breakpoint) : smallerOrEqual(breakpoint);\n acc[breakpoint] = value;\n return acc;\n },\n {} as Record<Breakpoint, boolean>\n );\n\n return {\n current,\n greaterOrEqual,\n smallerOrEqual,\n active,\n greater,\n smaller,\n between,\n isGreater: greater,\n isGreaterOrEqual: greaterOrEqual,\n isSmaller: smaller,\n isSmallerOrEqual: smallerOrEqual,\n isInBetween: between,\n ...breakpointsKeys\n };\n};\n\n/** Breakpoints from Material UI */\nexport const BREAKPOINTS_MATERIAL_UI = {\n xs: 0,\n sm: 600,\n md: 900,\n lg: 1200,\n xl: 1536\n};\n\n/** Breakpoints from Mantine */\nexport const BREAKPOINTS_MANTINE = {\n xs: 576,\n sm: 768,\n md: 992,\n lg: 1200,\n xl: 1408\n};\n\n/** Breakpoints from Tailwind */\nexport const BREAKPOINTS_TAILWIND = {\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n '2xl': 1536\n};\n\n/** Breakpoints from Bootstrap V5 */\nexport const BREAKPOINTS_BOOTSTRAP_V5 = {\n xs: 0,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1400\n};\n\n/** Breakpoints from Ant Design */\nexport const BREAKPOINTS_ANT_DESIGN = {\n xs: 480,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1600\n};\n\n/** Breakpoints from Quasar V2 */\nexport const BREAKPOINTS_QUASAR_V2 = {\n xs: 0,\n sm: 600,\n md: 1024,\n lg: 1440,\n xl: 1920\n};\n\n/** Sematic Breakpoints */\nexport const BREAKPOINTS_SEMANTIC = {\n mobileS: 320,\n mobileM: 375,\n mobileL: 425,\n tablet: 768,\n laptop: 1024,\n laptopL: 1440,\n desktop4K: 2560\n};\n\n/** Breakpoints from Master CSS */\nexport const BREAKPOINTS_MASTER_CSS = {\n '3xs': 360,\n '2xs': 480,\n xs: 600,\n sm: 768,\n md: 1024,\n lg: 1280,\n xl: 1440,\n '2xl': 1600,\n '3xl': 1920,\n '4xl': 2560\n};\n\n/** Breakpoints from PrimeFlex */\nexport const BREAKPOINTS_PRIME_FLEX = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200\n};\n"],"names":["match","query","window","matchMedia","matches","useBreakpoints","breakpoints","strategy","arguments","length","undefined","rerender","useRerender","getValue","breakpoint","delta","concat","Number","useEffect","onResize","addEventListener","removeEventListener","greaterOrEqual","smallerOrEqual","current","Object","keys","map","filter","_ref","_slicedToArray","_ref3","greater","smaller","between","a","b","breakpointsKeys","reduce","acc","value","_objectSpread","active","at","isGreater","isGreaterOrEqual","isSmaller","isSmallerOrEqual","isInBetween","BREAKPOINTS_MATERIAL_UI","xs","sm","md","lg","xl","BREAKPOINTS_MANTINE","BREAKPOINTS_TAILWIND","BREAKPOINTS_BOOTSTRAP_V5","xxl","BREAKPOINTS_ANT_DESIGN","BREAKPOINTS_QUASAR_V2","BREAKPOINTS_SEMANTIC","mobileS","mobileM","mobileL","tablet","laptop","laptopL","desktop4K","BREAKPOINTS_MASTER_CSS","BREAKPOINTS_PRIME_FLEX"],"mappings":";qKAUA,IAAMA,EAAQ,SAACC,GAAa,OAAKC,OAAOC,WAAWF,GAAOG,OAAO,EA2CpDC,EAAiB,SAC5BC,GAEqC,IADrCC,EAAgCC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,eAE7BG,EAAWC,IAEXC,EAAW,SAACC,EAAwBC,GACxC,MAAWC,GAAAA,OAAPD,EAAiBE,OAAOX,EAAYQ,IAAeC,EAC7CT,EAAYQ,GADsC,KAE7D,EAEDI,GAAU,WACR,IAAMC,EAAW,WAAH,OAASR,GAAU,EAEjC,OADAT,OAAOkB,iBAAiB,SAAUD,GAC3B,WACLjB,OAAOmB,oBAAoB,SAAUF,EACtC,CACF,GAAE,IAEH,IAAMG,EAAiB,SAACR,GAAsB,OAAKd,iBAAKgB,OAAgBH,EAASC,GAAW,KAAI,EAC1FS,EAAiB,SAACT,GAAsB,OAAKd,iBAAKgB,OAAgBH,EAASC,GAAW,KAAI,EAC1FU,EAAU,WAAH,OACXC,OAAOC,KAAKpB,GACTqB,KAAI,SAACb,GAAU,MAAK,CAACA,EAAYQ,EAAeR,GAA0B,IAC1Ec,QAAO,SAAAC,GAAS,OAATC,EAAAD,EAAA,GAAS,EAAW,IAC3BF,KAAI,SAAAI,GAAY,OAAZD,EAAAC,EAAA,GAAY,KAAiC,EAMhDC,EAAU,SAAClB,GAAsB,OAAKd,EAAKgB,eAAAA,OAAgBH,EAASC,EAAY,IAAI,KAAI,EACxFmB,EAAU,SAACnB,GAAsB,OAAKd,EAAK,eAAAgB,OAAgBH,EAASC,GAAa,IAAI,KAAI,EACzFoB,EAAU,SAACC,EAAeC,GAAa,OAC3CpC,EAAKgB,eAAAA,OAAgBH,EAASsB,GAAE,sBAAAnB,OAAqBH,EAASuB,GAAI,SAAQ,EAEtEC,EAAmBZ,OAAOC,KAAKpB,GAA8BgC,QACjE,SAACC,EAAKzB,GACJ,IAAM0B,EACS,iBAAbjC,EAA8Be,EAAeR,GAAcS,EAAeT,GAE5E,OADAyB,EAAIzB,GAAc0B,EACXD,CACR,GACD,IAGF,OAAAE,EAAA,CACEjB,QAAAA,EACAF,eAAAA,EACAC,eAAAA,EACAmB,OAxBa,WACb,IAAMpC,EAAckB,IACpB,OAAQlB,EAAYG,OAASH,EAAYqC,IAAI,QAAKjC,CACnD,EAsBCsB,QAAAA,EACAC,QAAAA,EACAC,QAAAA,EACAU,UAAWZ,EACXa,iBAAkBvB,EAClBwB,UAAWb,EACXc,iBAAkBxB,EAClByB,YAAad,GACVG,EAEP,EAGaY,EAA0B,CACrCC,GAAI,EACJC,GAAI,IACJC,GAAI,IACJC,GAAI,KACJC,GAAI,MAIOC,EAAsB,CACjCL,GAAI,IACJC,GAAI,IACJC,GAAI,IACJC,GAAI,KACJC,GAAI,MAIOE,EAAuB,CAClCL,GAAI,IACJC,GAAI,IACJC,GAAI,KACJC,GAAI,KACJ,MAAO,MAIIG,EAA2B,CACtCP,GAAI,EACJC,GAAI,IACJC,GAAI,IACJC,GAAI,IACJC,GAAI,KACJI,IAAK,MAIMC,EAAyB,CACpCT,GAAI,IACJC,GAAI,IACJC,GAAI,IACJC,GAAI,IACJC,GAAI,KACJI,IAAK,MAIME,EAAwB,CACnCV,GAAI,EACJC,GAAI,IACJC,GAAI,KACJC,GAAI,KACJC,GAAI,MAIOO,EAAuB,CAClCC,QAAS,IACTC,QAAS,IACTC,QAAS,IACTC,OAAQ,IACRC,OAAQ,KACRC,QAAS,KACTC,UAAW,MAIAC,EAAyB,CACpC,MAAO,IACP,MAAO,IACPnB,GAAI,IACJC,GAAI,IACJC,GAAI,KACJC,GAAI,KACJC,GAAI,KACJ,MAAO,KACP,MAAO,KACP,MAAO,MAIIgB,EAAyB,CACpCnB,GAAI,IACJC,GAAI,IACJC,GAAI,IACJC,GAAI"}
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
2
  import{useSyncExternalStore as n}from"react";var e=function(){return navigator.language},r=function(){return"undetermined"},t=function(n){return window.addEventListener("languagechange",n),function(){return window.removeEventListener("languagechange",n)}},u=function(){return n(t,e,r)};export{u as useBrowserLanguage};
3
3
  //# sourceMappingURL=useBrowserLanguage.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{useRef as t,useEffect as e}from"react";import{getElement as r}from"../../utils/helpers/getElement.js";import{isTarget as n}from"../../utils/helpers/isTarget.js";import{useRefState as i}from"../useRefState/useRefState.js";import"../../_rollupPluginBabelHelpers-B03Kl8w9.js";var o=function(){var o=n(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,l=(arguments.length<=1?void 0:arguments[1])?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0],s=i(),u=t(l);if(u.current=l,e((function(){if(o||s.state){var t=function(t){var e=o?r(o):s.current;e&&!e.contains(t.target)&&u.current(t)};return document.addEventListener("click",t),function(){document.removeEventListener("click",t)}}}),[o,s.state]),!o)return s};export{o as useClickOutside};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{useRef as t,useEffect as e}from"react";import{useRefState as r}from"../useRefState/useRefState.js";import{isTarget as n}from"../../utils/helpers/isTarget.js";import{getElement as i}from"../../utils/helpers/getElement.js";import"../../_rollupPluginBabelHelpers-WrSliisk.js";var o=function(){var o=n(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,l=(arguments.length<=1?void 0:arguments[1])?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0],s=r(),u=t(l);if(u.current=l,e((function(){if(o||s.state){var t=function(t){var e=o?i(o):s.current;e&&!e.contains(t.target)&&u.current(t)};return document.addEventListener("click",t),function(){document.removeEventListener("click",t)}}}),[o,s.state]),!o)return s};export{o as useClickOutside};
3
3
  //# sourceMappingURL=useClickOutside.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{_ as e,d as n,e as t}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useState as r,useEffect as o,useCallback as a}from"react";import{usePermission as i}from"../usePermission/usePermission.js";import"../useEvent/useEvent.js";var c=function(e){return"granted"===e||"prompt"===e},u=function(e){var n=document.createElement("textarea");n.value=e,n.readOnly=!0,n.style.fontSize="16px",document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)},l=function(l){var d,s="undefined"!=typeof navigator&&"clipboard"in navigator,v=r(null),p=e(v,2),m=p[0],f=p[1],x=i("clipboard-read"),b=i("clipboard-write"),y=null!==(d=null==l?void 0:l.enabled)&&void 0!==d&&d,g=function(){var e=n(t().mark((function e(){var n,r,o,a,i,u,l;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!s||!c(x.state)){e.next=8;break}return e.next=4,navigator.clipboard.readText();case 4:a=e.sent,f(a),e.next=9;break;case 8:f(null!==(n=null===(r=document)||void 0===r||null===(o=r.getSelection)||void 0===o||null===(o=o.call(r))||void 0===o?void 0:o.toString())&&void 0!==n?n:"");case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),f(null!==(i=null===(u=document)||void 0===u||null===(l=u.getSelection)||void 0===l||null===(l=l.call(u))||void 0===l?void 0:l.toString())&&void 0!==i?i:"");case 14:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(){return e.apply(this,arguments)}}();o((function(){if(y)return document.addEventListener("copy",g),document.addEventListener("cut",g),function(){document.removeEventListener("copy",g),document.removeEventListener("cut",g)}}),[y]);var h=a(function(){var e=n(t().mark((function e(n){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!s&&!c(b.state)){e.next=6;break}return e.next=4,navigator.clipboard.writeText(n);case 4:e.next=7;break;case 6:u(n);case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),u(n);case 12:f(n);case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(n){return e.apply(this,arguments)}}(),[]);return{supported:s,value:m,copy:h}};export{c as isPermissionAllowed,u as legacyCopyToClipboard,l as useClipboard};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{_ as e,d as n,e as t}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as r,useEffect as o,useCallback as a}from"react";import{usePermission as i}from"../usePermission/usePermission.js";import"../useEvent/useEvent.js";var c=function(e){return"granted"===e||"prompt"===e},u=function(e){var n=document.createElement("textarea");n.value=e,n.readOnly=!0,n.style.fontSize="16px",document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)},l=function(l){var d,s="undefined"!=typeof navigator&&"clipboard"in navigator,v=r(null),p=e(v,2),m=p[0],f=p[1],x=i("clipboard-read"),b=i("clipboard-write"),y=null!==(d=null==l?void 0:l.enabled)&&void 0!==d&&d,g=function(){var e=n(t().mark((function e(){var n,r,o,a,i,u,l;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!s||!c(x.state)){e.next=8;break}return e.next=4,navigator.clipboard.readText();case 4:a=e.sent,f(a),e.next=9;break;case 8:f(null!==(n=null===(r=document)||void 0===r||null===(o=r.getSelection)||void 0===o||null===(o=o.call(r))||void 0===o?void 0:o.toString())&&void 0!==n?n:"");case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),f(null!==(i=null===(u=document)||void 0===u||null===(l=u.getSelection)||void 0===l||null===(l=l.call(u))||void 0===l?void 0:l.toString())&&void 0!==i?i:"");case 14:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(){return e.apply(this,arguments)}}();o((function(){if(y)return document.addEventListener("copy",g),document.addEventListener("cut",g),function(){document.removeEventListener("copy",g),document.removeEventListener("cut",g)}}),[y]);var h=a(function(){var e=n(t().mark((function e(n){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!s&&!c(b.state)){e.next=6;break}return e.next=4,navigator.clipboard.writeText(n);case 4:e.next=7;break;case 6:u(n);case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),u(n);case 12:f(n);case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(n){return e.apply(this,arguments)}}(),[]);return{supported:s,value:m,copy:h}};export{c as isPermissionAllowed,u as legacyCopyToClipboard,l as useClipboard};
3
3
  //# sourceMappingURL=useClipboard.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
2
  import{useRef as r}from"react";var n=function(n){return r(n instanceof Function?n():n).current};export{n as useConst};
3
3
  //# sourceMappingURL=useConst.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{b as e,_ as r}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useState as i,useEffect as n}from"react";export{clearCookies}from"./helpers/clearCookies.js";import{getCookies as o}from"./helpers/getCookies.js";import{removeCookie as t}from"./helpers/removeCookie.js";import{setCookie as u}from"./helpers/setCookie.js";var s="reactuse-cookie",a=function(){return window.dispatchEvent(new Event(s))},l=function(e,r,i){u(e,r,i),a()},f=function(e){return o()[e]},c=function(o,u){var c="object"===e(u)&&u&&("serializer"in u||"deserializer"in u||"initialValue"in u)?u:void 0,v=c?null==c?void 0:c.initialValue:u,d=function(e){return null!=c&&c.serializer?c.serializer(e):JSON.stringify(e)},p=function(e){if(null!=c&&c.deserializer)return c.deserializer(e);if("undefined"!==e)try{return JSON.parse(e)}catch(r){return e}},m=i((function(){var e=f(o);if(void 0===e&&void 0!==v){var r=v instanceof Function?v():v;return l(o,d(r)),r}return e?p(e):void 0})),w=r(m,2),h=w[0],j=w[1];n((function(){var e=function(){var e=f(o);j(e?p(e):void 0)};return window.addEventListener(s,e),function(){return window.removeEventListener(s,e)}}),[o]);return{value:h,set:function(e,r){return l(o,d(e),r)},remove:function(e){return function(e,r){t(e,r),a()}(o,e)}}};export{s as COOKIE_EVENT,a as dispatchCookieEvent,o as getCookies,t as removeCookie,u as setCookie,c as useCookie};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{b as n,_ as e}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as r,useEffect as i}from"react";import{setCookie as t,getCookies as o,removeCookie as u}from"../../utils/helpers/cookie.js";var a="reactuse-cookie",c=function(){return window.dispatchEvent(new Event(a))},f=function(n,e,r){t(n,e,r),c()},l=function(n){return o()[n]},s=function(t,o){var s="object"===n(o)&&o&&("serializer"in o||"deserializer"in o||"initialValue"in o)?o:void 0,v=s?null==s?void 0:s.initialValue:o;if("undefined"==typeof document)return{value:v instanceof Function?v():v};var d=function(n){return null!=s&&s.serializer?s.serializer(n):JSON.stringify(n)},p=function(n){if(null!=s&&s.deserializer)return s.deserializer(n);if("undefined"!==n)try{return JSON.parse(n)}catch(e){return n}},m=r((function(){var n=l(t);if(void 0===n&&void 0!==v){var e=v instanceof Function?v():v;return f(t,d(e)),e}return n?p(n):void 0})),w=e(m,2),z=w[0],E=w[1];i((function(){var n=function(){var n=l(t);E(n?p(n):void 0)};return window.addEventListener(a,n),function(){return window.removeEventListener(a,n)}}),[t]);return{value:z,set:function(n,e){return f(t,d(n),e)},remove:function(n){return function(n,e){u(n,e),c()}(t,n)}}};export{a as COOKIE_EVENT,c as dispatchCookieEvent,s as useCookie};
3
3
  //# sourceMappingURL=useCookie.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useCookie.js","sources":["../../../../src/hooks/useCookie/useCookie.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport type { RemoveCookieParams, SetCookieParams } from './helpers';\n\nimport { getCookies, removeCookie, setCookie } from './helpers';\n\n/* The use storage initial value type */\nexport type UseCookieInitialValue<Value> = (() => Value) | Value;\n\n/* The use storage options type */\nexport interface UseCookieOptions<Value> {\n /* The initial value of the storage */\n initialValue?: UseCookieInitialValue<Value>;\n /* The deserializer function to be invoked */\n deserializer?: (value: string) => Value;\n /* The serializer function to be invoked */\n serializer?: (value: Value) => string;\n}\n\n/* The use cookie return type */\nexport interface UseCookieReturn<Value> {\n /* The value of the cookie */\n value: Value;\n /* The remove function */\n remove: (options?: RemoveCookieParams) => void;\n /* The set function */\n set: (value: Value, options?: SetCookieParams) => void;\n}\n\nexport const COOKIE_EVENT = 'reactuse-cookie';\n\nexport const dispatchCookieEvent = () => window.dispatchEvent(new Event(COOKIE_EVENT));\n\nconst setCookieItem = (key: string, value: string, options?: SetCookieParams) => {\n setCookie(key, value, options);\n dispatchCookieEvent();\n};\n\nconst removeCookieItem = (key: string, options?: RemoveCookieParams) => {\n removeCookie(key, options);\n dispatchCookieEvent();\n};\n\nconst getCookieItem = (key: string): string | undefined => {\n const cookies = getCookies();\n return cookies[key];\n};\n\n/**\n * @name useCookie\n * @description - Hook that manages cookie value\n * @category Browser\n *\n * @overload\n * @template Value The type of the cookie value\n * @param {string} key The key of the cookie\n * @param {UseCookieInitialValue<Value>} [initialValue] The initial value of the cookie\n * @returns {UseCookieReturn<Value>} The value and the set function\n *\n * @example\n * const { value, set, remove } = useCookie('key', 'value');\n */\nexport const useCookie = <Value>(\n key: string,\n params?: UseCookieInitialValue<Value> | UseCookieOptions<Value>\n) => {\n const options = (\n typeof params === 'object' &&\n params &&\n ('serializer' in params || 'deserializer' in params || 'initialValue' in params)\n ? params\n : undefined\n ) as UseCookieOptions<Value>;\n const initialValue = (options ? options?.initialValue : params) as UseCookieInitialValue<Value>;\n\n const serializer = (value: Value) => {\n if (options?.serializer) return options.serializer(value);\n return JSON.stringify(value);\n };\n\n const deserializer = (value: string) => {\n if (options?.deserializer) return options.deserializer(value);\n if (value === 'undefined') return undefined as unknown as Value;\n\n try {\n return JSON.parse(value) as Value;\n } catch {\n return value as Value;\n }\n };\n\n const [value, setValue] = useState<Value | undefined>(() => {\n const cookieValue = getCookieItem(key);\n if (cookieValue === undefined && initialValue !== undefined) {\n const value = initialValue instanceof Function ? initialValue() : initialValue;\n setCookieItem(key, serializer(value));\n return value;\n }\n return cookieValue ? deserializer(cookieValue) : undefined;\n });\n\n useEffect(() => {\n const onChange = () => {\n const cookieValue = getCookieItem(key);\n setValue(cookieValue ? deserializer(cookieValue) : undefined);\n };\n window.addEventListener(COOKIE_EVENT, onChange);\n return () => window.removeEventListener(COOKIE_EVENT, onChange);\n }, [key]);\n\n const set = (value: Value, options?: SetCookieParams) =>\n setCookieItem(key, serializer(value), options);\n const remove = (options?: RemoveCookieParams) => removeCookieItem(key, options);\n\n return { value, set, remove };\n};\n\nexport * from './helpers';\n"],"names":["COOKIE_EVENT","dispatchCookieEvent","window","dispatchEvent","Event","setCookieItem","key","value","options","setCookie","getCookieItem","getCookies","useCookie","params","_typeof","undefined","initialValue","serializer","JSON","stringify","deserializer","parse","_unused","_useState","useState","cookieValue","Function","_useState2","_slicedToArray","setValue","useEffect","onChange","addEventListener","removeEventListener","set","remove","removeCookie","removeCookieItem"],"mappings":";4UA6BO,IAAMA,EAAe,kBAEfC,EAAsB,WAAH,OAASC,OAAOC,cAAc,IAAIC,MAAMJ,GAAc,EAEhFK,EAAgB,SAACC,EAAaC,EAAeC,GACjDC,EAAUH,EAAKC,EAAOC,GACtBP,GACF,EAOMS,EAAgB,SAACJ,GAErB,OADgBK,IACDL,EACjB,EAgBaM,EAAY,SACvBN,EACAO,GAEA,IAAML,EACc,WAAlBM,EAAOD,IACPA,IACC,eAAgBA,GAAU,iBAAkBA,GAAU,iBAAkBA,GACrEA,OACAE,EAEAC,EAAgBR,EAAUA,aAAO,EAAPA,EAASQ,aAAeH,EAElDI,EAAa,SAACV,GAClB,OAAIC,SAAAA,EAASS,WAAmBT,EAAQS,WAAWV,GAC5CW,KAAKC,UAAUZ,EACvB,EAEKa,EAAe,SAACb,GACpB,GAAIC,SAAAA,EAASY,aAAc,OAAOZ,EAAQY,aAAab,GACvD,GAAc,cAAVA,EAEJ,IACE,OAAOW,KAAKG,MAAMd,EACnB,CAAC,MAAAe,GACA,OAAOf,CACT,CACD,EAEDgB,EAA0BC,GAA4B,WACpD,IAAMC,EAAcf,EAAcJ,GAClC,QAAoBS,IAAhBU,QAA8CV,IAAjBC,EAA4B,CAC3D,IAAMT,EAAQS,aAAwBU,SAAWV,IAAiBA,EAElE,OADAX,EAAcC,EAAKW,EAAWV,IACvBA,CACT,CACA,OAAOkB,EAAcL,EAAaK,QAAeV,CACnD,IAAEY,EAAAC,EAAAL,EAAA,GARKhB,EAAKoB,EAAA,GAAEE,EAAQF,EAAA,GAUtBG,GAAU,WACR,IAAMC,EAAW,WACf,IAAMN,EAAcf,EAAcJ,GAClCuB,EAASJ,EAAcL,EAAaK,QAAeV,EACpD,EAED,OADAb,OAAO8B,iBAAiBhC,EAAc+B,GAC/B,WAAA,OAAM7B,OAAO+B,oBAAoBjC,EAAc+B,EAAS,CACjE,GAAG,CAACzB,IAMJ,MAAO,CAAEC,MAAAA,EAAO2B,IAJJ,SAAC3B,EAAcC,GAAyB,OAClDH,EAAcC,EAAKW,EAAWV,GAAQC,EAAQ,EAG3B2B,OAFN,SAAC3B,GAA4B,OA1ErB,SAACF,EAAaE,GACrC4B,EAAa9B,EAAKE,GAClBP,GACF,CAuEmDoC,CAAiB/B,EAAKE,EAAQ,EAGjF"}
1
+ {"version":3,"file":"useCookie.js","sources":["../../../../src/hooks/useCookie/useCookie.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport type { RemoveCookieParams, SetCookieParams } from '@/utils/helpers';\n\nimport { getCookies, removeCookie, setCookie } from '@/utils/helpers';\n\n/* The use storage initial value type */\nexport type UseCookieInitialValue<Value> = (() => Value) | Value;\n\n/* The use storage options type */\nexport interface UseCookieOptions<Value> {\n /* The initial value of the storage */\n initialValue?: UseCookieInitialValue<Value>;\n /* The deserializer function to be invoked */\n deserializer?: (value: string) => Value;\n /* The serializer function to be invoked */\n serializer?: (value: Value) => string;\n}\n\n/* The use cookie return type */\nexport interface UseCookieReturn<Value> {\n /* The value of the cookie */\n value: Value;\n /* The remove function */\n remove: (options?: RemoveCookieParams) => void;\n /* The set function */\n set: (value: Value, options?: SetCookieParams) => void;\n}\n\nexport const COOKIE_EVENT = 'reactuse-cookie';\n\nexport const dispatchCookieEvent = () => window.dispatchEvent(new Event(COOKIE_EVENT));\n\nconst setCookieItem = (key: string, value: string, options?: SetCookieParams) => {\n setCookie(key, value, options);\n dispatchCookieEvent();\n};\n\nconst removeCookieItem = (key: string, options?: RemoveCookieParams) => {\n removeCookie(key, options);\n dispatchCookieEvent();\n};\n\nconst getCookieItem = (key: string): string | undefined => {\n const cookies = getCookies();\n return cookies[key];\n};\n\n/**\n * @name useCookie\n * @description - Hook that manages cookie value\n * @category Browser\n *\n * @overload\n * @template Value The type of the cookie value\n * @param {string} key The key of the cookie\n * @param {UseCookieInitialValue<Value>} [initialValue] The initial value of the cookie\n * @returns {UseCookieReturn<Value>} The value and the set function\n *\n * @example\n * const { value, set, remove } = useCookie('key', 'value');\n */\nexport const useCookie = <Value>(\n key: string,\n params?: UseCookieInitialValue<Value> | UseCookieOptions<Value>\n) => {\n const options = (\n typeof params === 'object' &&\n params &&\n ('serializer' in params || 'deserializer' in params || 'initialValue' in params)\n ? params\n : undefined\n ) as UseCookieOptions<Value>;\n const initialValue = (options ? options?.initialValue : params) as UseCookieInitialValue<Value>;\n\n if (typeof document === 'undefined')\n return {\n value: initialValue instanceof Function ? initialValue() : initialValue\n } as UseCookieReturn<Value>;\n\n const serializer = (value: Value) => {\n if (options?.serializer) return options.serializer(value);\n return JSON.stringify(value);\n };\n\n const deserializer = (value: string) => {\n if (options?.deserializer) return options.deserializer(value);\n if (value === 'undefined') return undefined as unknown as Value;\n\n try {\n return JSON.parse(value) as Value;\n } catch {\n return value as Value;\n }\n };\n\n const [value, setValue] = useState<Value | undefined>(() => {\n const cookieValue = getCookieItem(key);\n if (cookieValue === undefined && initialValue !== undefined) {\n const value = initialValue instanceof Function ? initialValue() : initialValue;\n setCookieItem(key, serializer(value));\n return value;\n }\n return cookieValue ? deserializer(cookieValue) : undefined;\n });\n\n useEffect(() => {\n const onChange = () => {\n const cookieValue = getCookieItem(key);\n setValue(cookieValue ? deserializer(cookieValue) : undefined);\n };\n window.addEventListener(COOKIE_EVENT, onChange);\n return () => window.removeEventListener(COOKIE_EVENT, onChange);\n }, [key]);\n\n const set = (value: Value, options?: SetCookieParams) =>\n setCookieItem(key, serializer(value), options);\n const remove = (options?: RemoveCookieParams) => removeCookieItem(key, options);\n\n return { value, set, remove };\n};\n"],"names":["COOKIE_EVENT","dispatchCookieEvent","window","dispatchEvent","Event","setCookieItem","key","value","options","setCookie","getCookieItem","getCookies","useCookie","params","_typeof","undefined","initialValue","document","Function","serializer","JSON","stringify","deserializer","parse","_unused","_useState","useState","cookieValue","_useState2","_slicedToArray","setValue","useEffect","onChange","addEventListener","removeEventListener","set","remove","removeCookie","removeCookieItem"],"mappings":";mNA6BO,IAAMA,EAAe,kBAEfC,EAAsB,WAAH,OAASC,OAAOC,cAAc,IAAIC,MAAMJ,GAAc,EAEhFK,EAAgB,SAACC,EAAaC,EAAeC,GACjDC,EAAUH,EAAKC,EAAOC,GACtBP,GACF,EAOMS,EAAgB,SAACJ,GAErB,OADgBK,IACDL,EACjB,EAgBaM,EAAY,SACvBN,EACAO,GAEA,IAAML,EACc,WAAlBM,EAAOD,IACPA,IACC,eAAgBA,GAAU,iBAAkBA,GAAU,iBAAkBA,GACrEA,OACAE,EAEAC,EAAgBR,EAAUA,aAAO,EAAPA,EAASQ,aAAeH,EAExD,GAAwB,oBAAbI,SACT,MAAO,CACLV,MAAOS,aAAwBE,SAAWF,IAAiBA,GAG/D,IAAMG,EAAa,SAACZ,GAClB,OAAIC,SAAAA,EAASW,WAAmBX,EAAQW,WAAWZ,GAC5Ca,KAAKC,UAAUd,EACvB,EAEKe,EAAe,SAACf,GACpB,GAAIC,SAAAA,EAASc,aAAc,OAAOd,EAAQc,aAAaf,GACvD,GAAc,cAAVA,EAEJ,IACE,OAAOa,KAAKG,MAAMhB,EACnB,CAAC,MAAAiB,GACA,OAAOjB,CACT,CACD,EAEDkB,EAA0BC,GAA4B,WACpD,IAAMC,EAAcjB,EAAcJ,GAClC,QAAoBS,IAAhBY,QAA8CZ,IAAjBC,EAA4B,CAC3D,IAAMT,EAAQS,aAAwBE,SAAWF,IAAiBA,EAElE,OADAX,EAAcC,EAAKa,EAAWZ,IACvBA,CACT,CACA,OAAOoB,EAAcL,EAAaK,QAAeZ,CACnD,IAAEa,EAAAC,EAAAJ,EAAA,GARKlB,EAAKqB,EAAA,GAAEE,EAAQF,EAAA,GAUtBG,GAAU,WACR,IAAMC,EAAW,WACf,IAAML,EAAcjB,EAAcJ,GAClCwB,EAASH,EAAcL,EAAaK,QAAeZ,EACpD,EAED,OADAb,OAAO+B,iBAAiBjC,EAAcgC,GAC/B,WAAA,OAAM9B,OAAOgC,oBAAoBlC,EAAcgC,EAAS,CACjE,GAAG,CAAC1B,IAMJ,MAAO,CAAEC,MAAAA,EAAO4B,IAJJ,SAAC5B,EAAcC,GAAyB,OAClDH,EAAcC,EAAKa,EAAWZ,GAAQC,EAAQ,EAG3B4B,OAFN,SAAC5B,GAA4B,OA/ErB,SAACF,EAAaE,GACrC6B,EAAa/B,EAAKE,GAClBP,GACF,CA4EmDqC,CAAiBhC,EAAKE,EAAQ,EAGjF"}
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{_ as n}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useState as r}from"react";var e=function(){for(var e,t,o,u=arguments.length,i=new Array(u),a=0;a<u;a++)i[a]=arguments[a];var l="number"==typeof i[0]?i[0]:null===(e=i[0])||void 0===e?void 0:e.initialValue,m="number"==typeof i[0]?null!==(t=i[1])&&void 0!==t?t:{}:null!==(o=i[0])&&void 0!==o?o:{},f=m.max,v=void 0===f?Number.POSITIVE_INFINITY:f,p=m.min,c=void 0===p?Number.NEGATIVE_INFINITY:p,b=r(null!=l?l:0),d=n(b,2),h=d[0],I=d[1];return{value:h,set:function(n){I((function(r){return Math.max(c,Math.min(v,"number"==typeof n?n:n(r)))}))},inc:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;I((function(r){return"number"==typeof v&&r===v?r:Math.max(Math.min(v,r+n),c)}))},dec:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;I((function(r){return"number"==typeof c&&r===c?r:Math.min(Math.max(c,r-n),v)}))},reset:function(){var n=null!=l?l:0;return"number"==typeof v&&n>v?I(v):"number"==typeof c&&n<c?I(c):void I(n)}}};export{e as useCounter};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{_ as n}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as r}from"react";var e=function(){for(var e,t,o,u=arguments.length,i=new Array(u),a=0;a<u;a++)i[a]=arguments[a];var l="number"==typeof i[0]?i[0]:null===(e=i[0])||void 0===e?void 0:e.initialValue,m="number"==typeof i[0]?null!==(t=i[1])&&void 0!==t?t:{}:null!==(o=i[0])&&void 0!==o?o:{},f=m.max,v=void 0===f?Number.POSITIVE_INFINITY:f,p=m.min,c=void 0===p?Number.NEGATIVE_INFINITY:p,b=r(null!=l?l:0),d=n(b,2),h=d[0],I=d[1];return{value:h,set:function(n){I((function(r){return Math.max(c,Math.min(v,"number"==typeof n?n:n(r)))}))},inc:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;I((function(r){return"number"==typeof v&&r===v?r:Math.max(Math.min(v,r+n),c)}))},dec:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;I((function(r){return"number"==typeof c&&r===c?r:Math.min(Math.max(c,r-n),v)}))},reset:function(){var n=null!=l?l:0;return"number"==typeof v&&n>v?I(v):"number"==typeof c&&n<c?I(c):void I(n)}}};export{e as useCounter};
3
3
  //# sourceMappingURL=useCounter.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{b as e,_ as t}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useState as r,useEffect as o}from"react";import{getElement as n}from"../../utils/helpers/getElement.js";import{useRefState as i}from"../useRefState/useRefState.js";var l=function(){var l="object"===e(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,u=l?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0],s=l?arguments.length<=2?void 0:arguments[2]:arguments.length<=1?void 0:arguments[1],v=r(null!=s?s:""),a=t(v,2),d=a[0],f=a[1],c=i(window.document.documentElement),m=function(e){var t=l?n(l):c.current;if(t&&t.style){if(!e)return t.style.removeProperty(u),void f(e);t.style.setProperty(u,e),f(e)}};return o((function(){s&&m(s)}),[]),o((function(){if(l||c.state){var e=l?n(l):c.current;if(e){var t=new MutationObserver((function(){var t,r=null===(t=window.getComputedStyle(e).getPropertyValue(u))||void 0===t?void 0:t.trim();f(null!=r?r:s)}));return t.observe(e,{attributeFilter:["style","class"]}),function(){t.disconnect()}}}}),[l,c.state]),{value:d,set:m}};export{l as useCssVar};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{b as e,_ as t}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as r,useEffect as o}from"react";import{useRefState as n}from"../useRefState/useRefState.js";import{getElement as i}from"../../utils/helpers/getElement.js";var l=function(){var l="object"===e(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,u=l?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0],s=l?arguments.length<=2?void 0:arguments[2]:arguments.length<=1?void 0:arguments[1],v=r(null!=s?s:""),a=t(v,2),d=a[0],f=a[1],c=n(window.document.documentElement),m=function(e){var t=l?i(l):c.current;if(t&&t.style){if(!e)return t.style.removeProperty(u),void f(e);t.style.setProperty(u,e),f(e)}};return o((function(){s&&m(s)}),[]),o((function(){if(l||c.state){var e=l?i(l):c.current;if(e){var t=new MutationObserver((function(){var t,r=null===(t=window.getComputedStyle(e).getPropertyValue(u))||void 0===t?void 0:t.trim();f(null!=r?r:s)}));return t.observe(e,{attributeFilter:["style","class"]}),function(){t.disconnect()}}}}),[l,c.state]),{value:d,set:m}};export{l as useCssVar};
3
3
  //# sourceMappingURL=useCssVar.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{useMemo as r}from"react";import{debounce as e}from"../../utils/helpers/debounce.js";import{useEvent as t}from"../useEvent/useEvent.js";var o=function(o,n){var u=t(o);return r((function(){return e(u,n)}),[n])};export{o as useDebounceCallback};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{useMemo as r}from"react";import{useEvent as e}from"../useEvent/useEvent.js";import{debounce as t}from"../../utils/helpers/debounce.js";var o=function(o,n){var u=e(o);return r((function(){return t(u,n)}),[n])};export{o as useDebounceCallback};
3
3
  //# sourceMappingURL=useDebounceCallback.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{_ as e}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useRef as r,useState as o,useEffect as t}from"react";import{useDebounceCallback as u}from"../useDebounceCallback/useDebounceCallback.js";import"../../utils/helpers/debounce.js";import"../useEvent/useEvent.js";var n=function(n,s){var l=r(n),c=o(n),a=e(c,2),i=a[0],p=a[1],m=u(p,s);return t((function(){l.current!==n&&(m(n),l.current=n)}),[n]),i};export{n as useDebounceValue};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{_ as e}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useRef as r,useState as o,useEffect as t}from"react";import{useDebounceCallback as u}from"../useDebounceCallback/useDebounceCallback.js";import"../useEvent/useEvent.js";import"../../utils/helpers/debounce.js";var n=function(n,s){var l=r(n),c=o(n),a=e(c,2),i=a[0],p=a[1],m=u(p,s);return t((function(){l.current!==n&&(m(n),l.current=n)}),[n]),i};export{n as useDebounceValue};
3
3
  //# sourceMappingURL=useDebounceValue.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{_ as r}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useState as l}from"react";var o=function(o,e){var t=l(o),a=r(t,2),n=a[0];return[null==n?e:n,a[1]]};export{o as useDefault};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{_ as r}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as l}from"react";var o=function(o,e){var t=l(o),a=r(t,2),n=a[0];return[null==n?e:n,a[1]]};export{o as useDefault};
3
3
  //# sourceMappingURL=useDefault.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{_ as l,c as n}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useState as a,useRef as e,useEffect as t}from"react";import{throttle as i}from"../../utils/helpers/throttle.js";var r=function(r){var o,c,u=null===(o=null==r?void 0:r.enabled)||void 0===o||o,v=null!==(c=null==r?void 0:r.delay)&&void 0!==c?c:1e3,d=a({interval:0,rotationRate:{alpha:null,beta:null,gamma:null},acceleration:{x:null,y:null,z:null},accelerationIncludingGravity:{x:null,y:null,z:null}}),m=l(d,2),s=m[0],f=m[1],p=e(null==r?void 0:r.callback);return p.current=null==r?void 0:r.callback,t((function(){if(u){var l=i((function(l){var a;null===(a=p.current)||void 0===a||a.call(p,l),f({interval:l.interval,rotationRate:n(n({},s.rotationRate),l.rotationRate),acceleration:n(n({},s.acceleration),l.acceleration),accelerationIncludingGravity:n(n({},s.accelerationIncludingGravity),l.accelerationIncludingGravity)})}),v);return window.addEventListener("devicemotion",l),function(){window.removeEventListener("devicemotion",l)}}}),[v,u]),s};export{r as useDeviceMotion};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{_ as l,c as n}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as a,useRef as e,useEffect as t}from"react";import{throttle as i}from"../../utils/helpers/throttle.js";var r=function(r){var o,c,u=null===(o=null==r?void 0:r.enabled)||void 0===o||o,v=null!==(c=null==r?void 0:r.delay)&&void 0!==c?c:1e3,d=a({interval:0,rotationRate:{alpha:null,beta:null,gamma:null},acceleration:{x:null,y:null,z:null},accelerationIncludingGravity:{x:null,y:null,z:null}}),m=l(d,2),s=m[0],f=m[1],p=e(null==r?void 0:r.callback);return p.current=null==r?void 0:r.callback,t((function(){if(u){var l=i((function(l){var a;null===(a=p.current)||void 0===a||a.call(p,l),f({interval:l.interval,rotationRate:n(n({},s.rotationRate),l.rotationRate),acceleration:n(n({},s.acceleration),l.acceleration),accelerationIncludingGravity:n(n({},s.accelerationIncludingGravity),l.accelerationIncludingGravity)})}),v);return window.addEventListener("devicemotion",l),function(){window.removeEventListener("devicemotion",l)}}}),[v,u]),s};export{r as useDeviceMotion};
3
3
  //# sourceMappingURL=useDeviceMotion.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{_ as e}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useState as n,useEffect as t}from"react";var a=function(){var a="undefined"!=typeof window&&"DeviceOrientationEvent"in window,i=n({alpha:null,beta:null,gamma:null,absolute:!1}),o=e(i,2),r=o[0],l=o[1];return t((function(){if(a){var e=function(e){return l({alpha:e.alpha,beta:e.beta,gamma:e.gamma,absolute:e.absolute})};return window.addEventListener("deviceorientation",e),function(){window.removeEventListener("deviceorientation",e)}}}),[]),{supported:a,value:r}};export{a as useDeviceOrientation};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{_ as e}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as n,useEffect as t}from"react";var a=function(){var a="undefined"!=typeof window&&"DeviceOrientationEvent"in window,i=n({alpha:null,beta:null,gamma:null,absolute:!1}),o=e(i,2),r=o[0],l=o[1];return t((function(){if(a){var e=function(e){return l({alpha:e.alpha,beta:e.beta,gamma:e.gamma,absolute:e.absolute})};return window.addEventListener("deviceorientation",e),function(){window.removeEventListener("deviceorientation",e)}}}),[]),{supported:a,value:r}};export{a as useDeviceOrientation};
3
3
  //# sourceMappingURL=useDeviceOrientation.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{_ as e}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useState as i,useEffect as n}from"react";var o=function(){var o,t="undefined"!=typeof window&&"function"==typeof window.matchMedia&&"number"==typeof window.devicePixelRatio,r=i(null!==(o=window.devicePixelRatio)&&void 0!==o?o:1),d=e(r,2),a=d[0],c=d[1];return n((function(){if(t){var e=function(){return c(window.devicePixelRatio)},i=window.matchMedia("(resolution: ".concat(window.devicePixelRatio,"dppx)"));return i.addEventListener("change",e),function(){i.removeEventListener("change",e)}}}),[a]),{supported:t,ratio:a}};export{o as useDevicePixelRatio};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{_ as e}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as i,useEffect as n}from"react";var o=function(){var o,t="undefined"!=typeof window&&"function"==typeof window.matchMedia&&"number"==typeof window.devicePixelRatio,r=i(null!==(o=window.devicePixelRatio)&&void 0!==o?o:1),d=e(r,2),a=d[0],c=d[1];return n((function(){if(t){var e=function(){return c(window.devicePixelRatio)},i=window.matchMedia("(resolution: ".concat(window.devicePixelRatio,"dppx)"));return i.addEventListener("change",e),function(){i.removeEventListener("change",e)}}}),[a]),{supported:t,ratio:a}};export{o as useDevicePixelRatio};
3
3
  //# sourceMappingURL=useDevicePixelRatio.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
2
  import{useRef as r}from"react";import{useIsomorphicLayoutEffect as o}from"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";var t=function(t,f){var c=r(!0);o((function(){if(!c.current){var r=t();return r&&"function"==typeof r?r:void 0}c.current=!1}),f)};export{t as useDidUpdate};
3
3
  //# sourceMappingURL=useDidUpdate.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{_ as n}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useState as r}from"react";var o=function(){var o=arguments.length>1?arguments[1]:void 0,l=r(arguments.length>0&&void 0!==arguments[0]&&arguments[0]),e=n(l,2),t=e[0],u=e[1],i=function(){return u((function(n){var r;return n||(null==o||null===(r=o.onOpen)||void 0===r||r.call(o),!0)}))},c=function(){return u((function(n){var r;return n?(null==o||null===(r=o.onClose)||void 0===r||r.call(o),!1):n}))};return{opened:t,open:i,close:c,toggle:function(){return t?c():i()}}};export{o as useDisclosure};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{_ as n}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as r}from"react";var o=function(){var o=arguments.length>1?arguments[1]:void 0,l=r(arguments.length>0&&void 0!==arguments[0]&&arguments[0]),e=n(l,2),t=e[0],u=e[1],i=function(){return u((function(n){var r;return n||(null==o||null===(r=o.onOpen)||void 0===r||r.call(o),!0)}))},c=function(){return u((function(n){var r;return n?(null==o||null===(r=o.onClose)||void 0===r||r.call(o),!1):n}))};return{opened:t,open:i,close:c,toggle:function(){return t?c():i()}}};export{o as useDisclosure};
3
3
  //# sourceMappingURL=useDisclosure.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{_ as e,d as r,e as t}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useState as n,useRef as i,useEffect as a}from"react";import{getElement as u}from"../../utils/helpers/getElement.js";import{isTarget as o}from"../../utils/helpers/isTarget.js";import{useRefState as s}from"../useRefState/useRefState.js";var c=function(){var c,l="undefined"!=typeof navigator&&"mediaDevices"in navigator&&!!navigator.mediaDevices&&"getDisplayMedia"in navigator.mediaDevices,d=o(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,p=(arguments.length<=1?void 0:arguments[1])?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0],f=null!==(c=null==p?void 0:p.enabled)&&void 0!==c&&c,v=n(!1),g=e(v,2),m=g[0],h=g[1],b=i(null),j=s(),D=function(){if(b.current&&l){var e=d?u(d):j.current;e&&(h(!1),e.srcObject=null,b.current.getTracks().forEach((function(e){return e.stop()})),b.current=null)}},k=function(){var e=r(t().mark((function e(){var r,n;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l){e.next=2;break}return e.abrupt("return");case 2:if(r=d?u(d):j.current){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,navigator.mediaDevices.getDisplayMedia({video:null==p?void 0:p.video,audio:null==p?void 0:p.audio});case 7:return n=e.sent,h(!0),b.current=n,r.srcObject=n,n.getTracks().forEach((function(e){return e.onended=D})),e.abrupt("return",n);case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a((function(){if(l&&f&&((d||j.state)&&(d?u(d):j.current)))return k(),function(){D()}}),[d,j.state]),d?{stream:b.current,sharing:m,supported:l,start:k,stop:D}:{stream:b.current,sharing:m,supported:l,start:k,stop:D,ref:j}};export{c as useDisplayMedia};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{_ as e,d as r,e as t}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as n,useRef as i,useEffect as a}from"react";import{useRefState as u}from"../useRefState/useRefState.js";import{isTarget as o}from"../../utils/helpers/isTarget.js";import{getElement as s}from"../../utils/helpers/getElement.js";var c=function(){var c,l="undefined"!=typeof navigator&&"mediaDevices"in navigator&&!!navigator.mediaDevices&&"getDisplayMedia"in navigator.mediaDevices,d=o(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,p=(arguments.length<=1?void 0:arguments[1])?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0],f=null!==(c=null==p?void 0:p.enabled)&&void 0!==c&&c,v=n(!1),g=e(v,2),m=g[0],h=g[1],b=i(null),j=u(),D=function(){if(b.current&&l){var e=d?s(d):j.current;e&&(h(!1),e.srcObject=null,b.current.getTracks().forEach((function(e){return e.stop()})),b.current=null)}},k=function(){var e=r(t().mark((function e(){var r,n;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l){e.next=2;break}return e.abrupt("return");case 2:if(r=d?s(d):j.current){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,navigator.mediaDevices.getDisplayMedia({video:null==p?void 0:p.video,audio:null==p?void 0:p.audio});case 7:return n=e.sent,h(!0),b.current=n,r.srcObject=n,n.getTracks().forEach((function(e){return e.onended=D})),e.abrupt("return",n);case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a((function(){if(l&&f&&((d||j.state)&&(d?s(d):j.current)))return k(),function(){D()}}),[d,j.state]),d?{stream:b.current,sharing:m,supported:l,start:k,stop:D}:{stream:b.current,sharing:m,supported:l,start:k,stop:D,ref:j}};export{c as useDisplayMedia};
3
3
  //# sourceMappingURL=useDisplayMedia.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{useEventListener as e}from"../useEventListener/useEventListener.js";import"react";import"../../utils/helpers/getElement.js";import"../useEvent/useEvent.js";import"../useRefState/useRefState.js";import"../../_rollupPluginBabelHelpers-B03Kl8w9.js";var t=function(t,r,s){return e(document,t,r,s)};export{t as useDocumentEvent};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{useEventListener as e}from"../useEventListener/useEventListener.js";import"react";import"../useEvent/useEvent.js";import"../useRefState/useRefState.js";import"../../_rollupPluginBabelHelpers-WrSliisk.js";import"../../utils/helpers/getElement.js";var t=function(t,r,s){return e(document,t,r,s)};export{t as useDocumentEvent};
3
3
  //# sourceMappingURL=useDocumentEvent.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{_ as t}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useRef as n,useState as e,useEffect as o}from"react";function r(r,u){var i=n(document.title),c=e(null!=r?r:document.title),l=t(c,2),m=l[0],f=l[1],d=function(t){var n=t.trim();n.length>0&&(document.title=n)};return o((function(){"string"==typeof m&&d(m)}),[m]),o((function(){var t=new MutationObserver((function(){f((function(t){return document&&document.title!==t?document.title:t}))}));return t.observe(document.head.querySelector("title"),{childList:!0}),function(){t.disconnect()}}),[]),o((function(){if(null!=u&&u.restoreOnUnmount)return function(){document.title=i.current}}),[]),{value:m,set:d}}export{r as useDocumentTitle};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{_ as t}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useRef as n,useState as e,useEffect as o}from"react";function r(r,u){var i=n(document.title),c=e(null!=r?r:document.title),l=t(c,2),m=l[0],f=l[1],d=function(t){var n=t.trim();n.length>0&&(document.title=n)};return o((function(){"string"==typeof m&&d(m)}),[m]),o((function(){var t=new MutationObserver((function(){f((function(t){return document&&document.title!==t?document.title:t}))}));return t.observe(document.head.querySelector("title"),{childList:!0}),function(){t.disconnect()}}),[]),o((function(){if(null!=u&&u.restoreOnUnmount)return function(){document.title=i.current}}),[]),{value:m,set:d}}export{r as useDocumentTitle};
3
3
  //# sourceMappingURL=useDocumentTitle.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
2
  import{useSyncExternalStore as n}from"react";var t=function(){return document.visibilityState},e=function(){return"hidden"},i=function(n){return document.addEventListener("visibilitychange",n),function(){document.removeEventListener("visibilitychange",n)}},r=function(){return n(i,t,e)};export{r as useDocumentVisibility};
3
3
  //# sourceMappingURL=useDocumentVisibility.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{_ as e}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useState as t}from"react";import{getElement as r}from"../../utils/helpers/getElement.js";import{isTarget as i}from"../../utils/helpers/isTarget.js";import{useIsomorphicLayoutEffect as o}from"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";import{useRefState as n}from"../useRefState/useRefState.js";var s=function(){var s=i(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,u=t({width:0,height:0}),h=e(u,2),f=h[0],a=h[1],l=n();return o((function(){var e=s?r(s):l.current;if(e){var t=e.getBoundingClientRect(),i=t.width,o=t.height;a({width:i,height:o});var n=new ResizeObserver((function(){var t=e.getBoundingClientRect(),r=t.width,i=t.height;a({width:r,height:i})}));return n.observe(e),function(){n.disconnect()}}}),[l.current,s]),s?{value:f}:{ref:l,value:f}};export{s as useElementSize};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{_ as e}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as t}from"react";import{useIsomorphicLayoutEffect as r}from"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";import{useRefState as i}from"../useRefState/useRefState.js";import{isTarget as o}from"../../utils/helpers/isTarget.js";import{getElement as n}from"../../utils/helpers/getElement.js";var s=function(){var s=o(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,u=t({width:0,height:0}),h=e(u,2),f=h[0],a=h[1],l=i();return r((function(){var e=s?n(s):l.current;if(e){var t=e.getBoundingClientRect(),r=t.width,i=t.height;a({width:r,height:i});var o=new ResizeObserver((function(){var t=e.getBoundingClientRect(),r=t.width,i=t.height;a({width:r,height:i})}));return o.observe(e),function(){o.disconnect()}}}),[l.current,s]),s?{value:f}:{ref:l,value:f}};export{s as useElementSize};
3
3
  //# sourceMappingURL=useElementSize.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
2
  import{useRef as r,useCallback as t}from"react";var n=function(n){var e=r(n);return e.current=n,t((function(){return e.current.apply(void 0,arguments)}),[])};export{n as useEvent};
3
3
  //# sourceMappingURL=useEvent.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{useEffect as e}from"react";import{getElement as t}from"../../utils/helpers/getElement.js";import{useEvent as n}from"../useEvent/useEvent.js";import{useRefState as r}from"../useRefState/useRefState.js";import"../../_rollupPluginBabelHelpers-B03Kl8w9.js";var o=function(){var o=(arguments.length<=1?void 0:arguments[1])instanceof Function||arguments.length<=0?void 0:arguments[0],i=o?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0],u=Array.isArray(i)?i:[i],f=o?arguments.length<=2?void 0:arguments[2]:arguments.length<=1?void 0:arguments[1],v=o?arguments.length<=3?void 0:arguments[3]:arguments.length<=2?void 0:arguments[2],l=r(window),s=n(f);if(e((function(){var e=o?t(o):l.current;if(e){var n=function(e){return s(e)};return u.forEach((function(t){return e.addEventListener(t,n,v)})),function(){u.forEach((function(t){return e.removeEventListener(t,n,v)}))}}}),[o,l.state,i,v]),!o)return l};export{o as useEventListener};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{useEffect as e}from"react";import{useEvent as t}from"../useEvent/useEvent.js";import{useRefState as n}from"../useRefState/useRefState.js";import{getElement as r}from"../../utils/helpers/getElement.js";import"../../_rollupPluginBabelHelpers-WrSliisk.js";var o=function(){var o=(arguments.length<=1?void 0:arguments[1])instanceof Function||arguments.length<=0?void 0:arguments[0],i=o?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0],u=Array.isArray(i)?i:[i],f=o?arguments.length<=2?void 0:arguments[2]:arguments.length<=1?void 0:arguments[1],v=o?arguments.length<=3?void 0:arguments[3]:arguments.length<=2?void 0:arguments[2],l=n(window),s=t(f);if(e((function(){var e=o?r(o):l.current;if(e){var t=function(e){return s(e)};return u.forEach((function(n){return e.addEventListener(n,t,v)})),function(){u.forEach((function(n){return e.removeEventListener(n,t,v)}))}}}),[o,l.state,i,v]),!o)return l};export{o as useEventListener};
3
3
  //# sourceMappingURL=useEventListener.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{_ as r,d as e,e as n}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useState as o}from"react";var t=function(){var t="undefined"!=typeof window&&"EyeDropper"in window,p=o(arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0),a=r(p,2),i=a[0],u=a[1],s=function(){var r=e(n().mark((function r(e){var o,t;return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(window.EyeDropper){r.next=2;break}throw new Error("EyeDropper is not supported");case 2:return o=new window.EyeDropper,r.next=5,o.open(e);case 5:return t=r.sent,u(t.sRGBHex),r.abrupt("return",t);case 8:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}();return{supported:t,value:i,open:s}};export{t as useEyeDropper};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{_ as r,d as e,e as n}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as o}from"react";var t=function(){var t="undefined"!=typeof window&&"EyeDropper"in window,p=o(arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0),a=r(p,2),i=a[0],u=a[1],s=function(){var r=e(n().mark((function r(e){var o,t;return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(window.EyeDropper){r.next=2;break}throw new Error("EyeDropper is not supported");case 2:return o=new window.EyeDropper,r.next=5,o.open(e);case 5:return t=r.sent,u(t.sRGBHex),r.abrupt("return",t);case 8:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}();return{supported:t,value:i,open:s}};export{t as useEyeDropper};
3
3
  //# sourceMappingURL=useEyeDropper.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{_ as e}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useState as o}from"react";import{useDidUpdate as t}from"../useDidUpdate/useDidUpdate.js";import{useMount as r}from"../useMount/useMount.js";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";var n=function(n){var u,i=o(null!=n?n:null===(u=document.querySelector('link[rel*="icon"]'))||void 0===u?void 0:u.href),c=e(i,2),l=c[0],p=c[1],m=function(e){var o=document.querySelector('link[rel*="icon"]')||document.createElement("link");o.rel="icon",o.href=e,o.type="image/".concat(e.split(".").pop()),document.head.append(o)};return r((function(){n&&m(n)})),t((function(){n&&(p(n),m(n))}),[n]),{href:l,set:function(e){p(e),m(e)}}};export{n as useFavicon};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{_ as e}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as o}from"react";import{useDidUpdate as t}from"../useDidUpdate/useDidUpdate.js";import{useMount as r}from"../useMount/useMount.js";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";var n=function(n){var u,i=o(null!=n?n:null===(u=document.querySelector('link[rel*="icon"]'))||void 0===u?void 0:u.href),c=e(i,2),l=c[0],p=c[1],m=function(e){var o=document.querySelector('link[rel*="icon"]')||document.createElement("link");o.rel="icon",o.href=e,o.type="image/".concat(e.split(".").pop()),document.head.append(o)};return r((function(){n&&m(n)})),t((function(){n&&(p(n),m(n))}),[n]),{href:l,set:function(e){p(e),m(e)}}};export{n as useFavicon};
3
3
  //# sourceMappingURL=useFavicon.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{_ as e,d as r,e as n}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useRef as t,useState as u}from"react";import{useRerender as i}from"../useRerender/useRerender.js";var a=function(a){var l,c,o=null!==(l=null==a?void 0:a.initialValue)&&void 0!==l?l:"",v=t(),d=t(!1),f=i(),s=u(!1),m=e(s,2),p=m[0],h=m[1],g=u(null!==(c=null==a?void 0:a.initialTouched)&&void 0!==c&&c),x=e(g,2),k=x[0],b=x[1],y=u(void 0),L=e(y,2),V=L[0],w=L[1],B=function(){var e,r,n,t;return"radio"===(null===(e=v.current)||void 0===e?void 0:e.type)||"checkbox"===(null===(r=v.current)||void 0===r?void 0:r.type)?v.current.checked:null!==(n=null===(t=v.current)||void 0===t?void 0:t.value)&&void 0!==n?n:o},C=function(e){var r,n;return"radio"===(null===(r=v.current)||void 0===r?void 0:r.type)||"checkbox"===(null===(n=v.current)||void 0===n?void 0:n.type)?(v.current.checked=e,d.current?f():void 0):(v.current.value=e,d.current?f():void 0)},O=function(e){if(e.required&&!v.current.value)return w(e.required);if(e.minLength&&v.current.value.length<e.minLength.value)return w(e.minLength.message);if(e.maxLength&&v.current.value.length>e.maxLength.value)return w(e.maxLength.message);if(e.min&&Number(v.current.value)<e.min.value)return w(e.min.message);if(e.max&&Number(v.current.value)>e.max.value)return w(e.max.message);if(e.pattern&&!e.pattern.value.test(v.current.value))return w(e.pattern.message);if(e.validate){var r=e.validate(v.current.value);if("string"==typeof r)return w(r)}w(void 0)};return{register:function(e){return{ref:function(r){if(!v.current&&r){if(null!=a&&a.autoFocus&&r.focus(),v.current=r,"radio"===v.current.type)return void(v.current.defaultChecked=(null==a?void 0:a.initialValue)===r.value);if("checkbox"===v.current.type)return void(v.current.defaultChecked=!(null==a||!a.initialValue));v.current.defaultValue=String(o),e&&null!=a&&a.validateOnMount&&O(e)}},onChange:(u=r(n().mark((function r(){return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!d.current){r.next=2;break}return r.abrupt("return",f());case 2:if(v.current.value!==o&&h(!0),p&&v.current.value===o&&h(!1),!e||null==a||!a.validateOnChange){r.next=7;break}return r.next=7,O(e);case 7:e&&null!=a&&a.validateOnBlur&&w(void 0);case 8:case"end":return r.stop()}}),r)}))),function(){return u.apply(this,arguments)}),onBlur:(t=r(n().mark((function r(){return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!e||null==a||!a.validateOnBlur){r.next=3;break}return r.next=3,O(e);case 3:b(!0);case 4:case"end":return r.stop()}}),r)}))),function(){return t.apply(this,arguments)})};var t,u},dirty:p,touched:k,error:V,setError:w,clearError:function(){return w(void 0)},getValue:B,setValue:C,reset:function(){C(o),h(!1),b(!1),w(void 0)},watch:function(){return d.current=!0,B()},focus:function(){v.current.focus()}}};export{a as useField};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{_ as e,d as r,e as n}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useRef as t,useState as u}from"react";import{useRerender as i}from"../useRerender/useRerender.js";var a=function(a){var l,c,o=null!==(l=null==a?void 0:a.initialValue)&&void 0!==l?l:"",v=t(),d=t(!1),f=i(),s=u(!1),m=e(s,2),p=m[0],h=m[1],g=u(null!==(c=null==a?void 0:a.initialTouched)&&void 0!==c&&c),x=e(g,2),k=x[0],b=x[1],y=u(void 0),L=e(y,2),V=L[0],w=L[1],B=function(){var e,r,n,t;return"radio"===(null===(e=v.current)||void 0===e?void 0:e.type)||"checkbox"===(null===(r=v.current)||void 0===r?void 0:r.type)?v.current.checked:null!==(n=null===(t=v.current)||void 0===t?void 0:t.value)&&void 0!==n?n:o},C=function(e){var r,n;return"radio"===(null===(r=v.current)||void 0===r?void 0:r.type)||"checkbox"===(null===(n=v.current)||void 0===n?void 0:n.type)?(v.current.checked=e,d.current?f():void 0):(v.current.value=e,d.current?f():void 0)},O=function(e){if(e.required&&!v.current.value)return w(e.required);if(e.minLength&&v.current.value.length<e.minLength.value)return w(e.minLength.message);if(e.maxLength&&v.current.value.length>e.maxLength.value)return w(e.maxLength.message);if(e.min&&Number(v.current.value)<e.min.value)return w(e.min.message);if(e.max&&Number(v.current.value)>e.max.value)return w(e.max.message);if(e.pattern&&!e.pattern.value.test(v.current.value))return w(e.pattern.message);if(e.validate){var r=e.validate(v.current.value);if("string"==typeof r)return w(r)}w(void 0)};return{register:function(e){return{ref:function(r){if(!v.current&&r){if(null!=a&&a.autoFocus&&r.focus(),v.current=r,"radio"===v.current.type)return void(v.current.defaultChecked=(null==a?void 0:a.initialValue)===r.value);if("checkbox"===v.current.type)return void(v.current.defaultChecked=!(null==a||!a.initialValue));v.current.defaultValue=String(o),e&&null!=a&&a.validateOnMount&&O(e)}},onChange:(u=r(n().mark((function r(){return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!d.current){r.next=2;break}return r.abrupt("return",f());case 2:if(v.current.value!==o&&h(!0),p&&v.current.value===o&&h(!1),!e||null==a||!a.validateOnChange){r.next=7;break}return r.next=7,O(e);case 7:e&&null!=a&&a.validateOnBlur&&w(void 0);case 8:case"end":return r.stop()}}),r)}))),function(){return u.apply(this,arguments)}),onBlur:(t=r(n().mark((function r(){return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!e||null==a||!a.validateOnBlur){r.next=3;break}return r.next=3,O(e);case 3:b(!0);case 4:case"end":return r.stop()}}),r)}))),function(){return t.apply(this,arguments)})};var t,u},dirty:p,touched:k,error:V,setError:w,clearError:function(){return w(void 0)},getValue:B,setValue:C,reset:function(){C(o),h(!1),b(!1),w(void 0)},watch:function(){return d.current=!0,B()},focus:function(){v.current.focus()}}};export{a as useField};
3
3
  //# sourceMappingURL=useField.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{_ as l}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useState as n,useRef as u,useEffect as e}from"react";var r=!0,t="*",i=!1,o=function(){var o="function"==typeof(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,c=o?arguments.length<=0?void 0:arguments[0]:arguments.length<=1?void 0:arguments[1],v=n(null),d=l(v,2),a=d[0],p=d[1],f=u(),m=u(o);m.current=o;var s=function(){var l;p(null),null===(l=m.current)||void 0===l||l.call(m,null),f.current&&(f.current.value="")};return e((function(){var l;return f.current=((l=document.createElement("input")).type="file",l.onchange=function(l){var n,u=l.target.files;p(u),null===(n=m.current)||void 0===n||n.call(m,u)},l),function(){var l;null===(l=f.current)||void 0===l||l.remove()}}),[null==c?void 0:c.multiple,null==c?void 0:c.accept,null==c?void 0:c.capture,null==c?void 0:c.reset]),{value:a,open:function(l){var n,u,e,o,v,d,a;if(f.current){f.current.multiple=null!==(n=null!==(u=null==l?void 0:l.multiple)&&void 0!==u?u:null==c?void 0:c.multiple)&&void 0!==n?n:r,f.current.accept=null!==(e=null!==(o=null==l?void 0:l.accept)&&void 0!==o?o:null==c?void 0:c.accept)&&void 0!==e?e:t;var p=null!==(v=null==l?void 0:l.capture)&&void 0!==v?v:null==c?void 0:c.capture;p&&(f.current.capture=p),(null!==(d=null!==(a=null==l?void 0:l.reset)&&void 0!==a?a:null==c?void 0:c.reset)&&void 0!==d?d:i)&&s(),f.current.click()}},reset:s}};export{o as useFileDialog};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{_ as l}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as n,useRef as u,useEffect as e}from"react";var r=!0,t="*",i=!1,o=function(){var o="function"==typeof(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,c=o?arguments.length<=0?void 0:arguments[0]:arguments.length<=1?void 0:arguments[1],v=n(null),d=l(v,2),a=d[0],p=d[1],f=u(),m=u(o);m.current=o;var s=function(){var l;p(null),null===(l=m.current)||void 0===l||l.call(m,null),f.current&&(f.current.value="")};return e((function(){var l;return f.current=((l=document.createElement("input")).type="file",l.onchange=function(l){var n,u=l.target.files;p(u),null===(n=m.current)||void 0===n||n.call(m,u)},l),function(){var l;null===(l=f.current)||void 0===l||l.remove()}}),[null==c?void 0:c.multiple,null==c?void 0:c.accept,null==c?void 0:c.capture,null==c?void 0:c.reset]),{value:a,open:function(l){var n,u,e,o,v,d,a;if(f.current){f.current.multiple=null!==(n=null!==(u=null==l?void 0:l.multiple)&&void 0!==u?u:null==c?void 0:c.multiple)&&void 0!==n?n:r,f.current.accept=null!==(e=null!==(o=null==l?void 0:l.accept)&&void 0!==o?o:null==c?void 0:c.accept)&&void 0!==e?e:t;var p=null!==(v=null==l?void 0:l.capture)&&void 0!==v?v:null==c?void 0:c.capture;p&&(f.current.capture=p),(null!==(d=null!==(a=null==l?void 0:l.reset)&&void 0!==a?a:null==c?void 0:c.reset)&&void 0!==d?d:i)&&s(),f.current.click()}},reset:s}};export{o as useFileDialog};
3
3
  //# sourceMappingURL=useFileDialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFileDialog.js","sources":["../../../../src/hooks/useFileDialog/useFileDialog.ts"],"sourcesContent":["import type { ComponentProps } from 'react';\n\nimport { useEffect, useRef, useState } from 'react';\n\n/* The use file dialog options */\nexport interface UseFileDialogOptions extends Pick<ComponentProps<'input'>, 'accept' | 'multiple'> {\n /** The capture value */\n capture?: string;\n /** The reset value */\n reset?: boolean;\n}\n\nconst DEFAULT_OPTIONS = {\n multiple: true,\n accept: '*',\n reset: false\n} satisfies UseFileDialogOptions;\n\n/* The use file dialog return type */\nexport interface UseFileDialogReturn {\n /** The selected files */\n value: FileList | null;\n /** The open function */\n open: (openParams?: UseFileDialogOptions) => void;\n /** The reset function */\n reset: () => void;\n}\n\nexport interface UseFileDialog {\n (\n callback?: (value: FileList | null) => void,\n options?: UseFileDialogOptions\n ): UseFileDialogReturn;\n\n (options?: UseFileDialogOptions, callback?: never): UseFileDialogReturn;\n}\n\n/**\n * @name useFileDialog\n * @description - Hook to handle file input\n * @category Browser\n *\n * @overload\n * @param {(value: FileList | null) => void} callback The callback to execute when a file is selected\n * @param {boolean} [options.multiple=true] Whether multiple files can be selected\n * @param {string} [options.accept='*'] The accepted file types\n * @param {boolean} [options.reset=false] Whether the input should be reset when the callback is called\n * @param {string} [options.capture] The capture value\n * @returns {UseFileDialogReturn} An object containing the selected files\n *\n * @example\n * const { values, open, reset } = useFileDialog((value) => console.log(value));\n *\n * @overload\n * @param {boolean} [options.multiple=true] Whether multiple files can be selected\n * @param {string} [options.accept='*'] The accepted file types\n * @param {boolean} [options.reset=false] Whether the input should be reset when the callback is called\n * @param {string} [options.capture] The capture value\n * @returns {UseFileDialogReturn} An object containing the selected files\n *\n * @example\n * const { values, open, reset } = useFileDialog({ accept: 'image/*' });\n */\nexport const useFileDialog = ((...params: any[]) => {\n const callback = (typeof params[0] === 'function' ? params[0] : undefined) as\n | ((value: FileList | null) => void)\n | undefined;\n const options = (callback ? params[0] : params[1]) as UseFileDialogOptions | undefined;\n\n const [value, setValue] = useState<FileList | null>(null);\n const inputRef = useRef<HTMLInputElement>();\n const internalCallbackRef = useRef(callback);\n internalCallbackRef.current = callback;\n\n const reset = () => {\n setValue(null);\n internalCallbackRef.current?.(null);\n if (inputRef.current) inputRef.current.value = '';\n };\n\n const open = (openParams?: UseFileDialogOptions) => {\n if (!inputRef.current) return;\n\n inputRef.current.multiple =\n openParams?.multiple ?? options?.multiple ?? DEFAULT_OPTIONS.multiple;\n inputRef.current.accept = openParams?.accept ?? options?.accept ?? DEFAULT_OPTIONS.accept;\n\n const capture = openParams?.capture ?? options?.capture;\n if (capture) inputRef.current.capture = capture;\n\n if (openParams?.reset ?? options?.reset ?? DEFAULT_OPTIONS.reset) reset();\n\n inputRef.current.click();\n };\n\n useEffect(() => {\n const init = () => {\n const input = document.createElement('input');\n input.type = 'file';\n\n input.onchange = (event: Event) => {\n const { files } = event.target as HTMLInputElement;\n setValue(files);\n internalCallbackRef.current?.(files);\n };\n return input;\n };\n\n inputRef.current = init();\n return () => {\n inputRef.current?.remove();\n };\n }, [options?.multiple, options?.accept, options?.capture, options?.reset]);\n\n return { value, open, reset };\n}) as UseFileDialog;\n"],"names":["DEFAULT_OPTIONS","useFileDialog","callback","arguments","length","undefined","options","_useState","useState","_useState2","_slicedToArray","value","setValue","inputRef","useRef","internalCallbackRef","current","reset","_internalCallbackRef$","call","useEffect","input","document","createElement","type","onchange","event","_internalCallbackRef$2","files","target","_inputRef$current","remove","multiple","accept","capture","open","openParams","_ref","_openParams$multiple","_ref2","_openParams$accept","_openParams$capture","_ref3","_openParams$reset","click"],"mappings":";4HAYA,IAAMA,GACM,EADNA,EAEI,IAFJA,GAGG,EAgDIC,EAAiB,WAC5B,IAAMC,EAAiC,mBAArBC,UAAAC,QAAA,OAAAC,EAAAF,UAAA,IAA+BA,UAAAC,eAAAC,EAAAF,UAAA,QAAeE,EAG1DC,EAAWJ,EAAQC,UAAAC,QAAAC,OAAAA,EAAAF,UAAA,GAAAA,UAAAC,eAAAC,EAAAF,UAA6D,GAEtFI,EAA0BC,EAA0B,MAAKC,EAAAC,EAAAH,EAAA,GAAlDI,EAAKF,EAAA,GAAEG,EAAQH,EAAA,GAChBI,EAAWC,IACXC,EAAsBD,EAAOZ,GACnCa,EAAoBC,QAAUd,EAE9B,IAAMe,EAAQ,WAAM,IAAAC,EAClBN,EAAS,MACkBM,QAA3BA,EAAAH,EAAoBC,eAApBE,IAA2BA,GAA3BA,EAAAC,KAAAJ,EAA8B,MAC1BF,EAASG,UAASH,EAASG,QAAQL,MAAQ,GAChD,EAoCD,OAnBAS,GAAU,WACR,IACQC,EAYR,OADAR,EAASG,UAXDK,EAAQC,SAASC,cAAc,UAC/BC,KAAO,OAEbH,EAAMI,SAAW,SAACC,GAAiB,IAAAC,EACzBC,EAAUF,EAAMG,OAAhBD,MACRhB,EAASgB,GACkBD,QAA3BA,EAAAZ,EAAoBC,eAApBW,IAA2BA,GAA3BA,EAAAR,KAAAJ,EAA8Ba,EAC/B,EACMP,GAIF,WAAM,IAAAS,EACK,QAAhBA,EAAAjB,EAASG,eAAO,IAAAc,GAAhBA,EAAkBC,QACnB,CACF,GAAE,CAACzB,aAAAA,EAAAA,EAAS0B,SAAU1B,aAAO,EAAPA,EAAS2B,OAAQ3B,aAAAA,EAAAA,EAAS4B,QAAS5B,aAAAA,EAAAA,EAASW,QAE5D,CAAEN,MAAAA,EAAOwB,KAlCH,SAACC,GAAsC,IAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAClD,GAAK9B,EAASG,QAAd,CAEAH,EAASG,QAAQgB,SAC0B,QADlBK,EACH,QADGC,EACvBF,aAAAA,EAAAA,EAAYJ,gBAAQ,IAAAM,EAAAA,EAAIhC,eAAAA,EAAS0B,gBAAQK,IAAAA,EAAAA,EAAIrC,EAC/Ca,EAASG,QAAQiB,OAA8C,QAAxCM,EAAqB,QAArBC,EAAGJ,aAAAA,EAAAA,EAAYH,cAAM,IAAAO,EAAAA,EAAIlC,eAAAA,EAAS2B,cAAMM,IAAAA,EAAAA,EAAIvC,EAEnE,IAAMkC,UAAOO,EAAGL,aAAAA,EAAAA,EAAYF,eAAO,IAAAO,EAAAA,EAAInC,aAAO,EAAPA,EAAS4B,QAC5CA,IAASrB,EAASG,QAAQkB,QAAUA,YAExCQ,EAAqB,QAArBC,EAAIP,aAAAA,EAAAA,EAAYnB,aAAK,IAAA0B,EAAAA,EAAIrC,aAAAA,EAAAA,EAASW,aAAK,IAAAyB,EAAAA,EAAI1C,IAAuBiB,IAElEJ,EAASG,QAAQ4B,OAXM,CAYxB,EAqBqB3B,MAAAA,EACxB"}
1
+ {"version":3,"file":"useFileDialog.js","sources":["../../../../src/hooks/useFileDialog/useFileDialog.ts"],"sourcesContent":["import type { ComponentProps } from 'react';\n\nimport { useEffect, useRef, useState } from 'react';\n\n/* The use file dialog options */\nexport interface UseFileDialogOptions extends Pick<ComponentProps<'input'>, 'accept' | 'multiple'> {\n /** The capture value */\n capture?: string;\n /** The reset value */\n reset?: boolean;\n}\n\nconst DEFAULT_OPTIONS = {\n multiple: true,\n accept: '*',\n reset: false\n} satisfies UseFileDialogOptions;\n\n/* The use file dialog return type */\nexport interface UseFileDialogReturn {\n /** The selected files */\n value: FileList | null;\n /** The open function */\n open: (openParams?: UseFileDialogOptions) => void;\n /** The reset function */\n reset: () => void;\n}\n\nexport interface UseFileDialog {\n (\n callback?: (value: FileList | null) => void,\n options?: UseFileDialogOptions\n ): UseFileDialogReturn;\n\n (options?: UseFileDialogOptions, callback?: never): UseFileDialogReturn;\n}\n\n/**\n * @name useFileDialog\n * @description - Hook to handle file input\n * @category Browser\n *\n * @overload\n * @param {(value: FileList | null) => void} callback The callback to execute when a file is selected\n * @param {boolean} [options.multiple=true] Whether multiple files can be selected\n * @param {string} [options.accept='*'] The accepted file types\n * @param {boolean} [options.reset=false] Whether the input should be reset when the callback is called\n * @param {string} [options.capture] The capture value\n * @returns {UseFileDialogReturn} An object containing the selected files\n *\n * @example\n * const { values, open, reset } = useFileDialog((value) => console.log(value));\n *\n * @overload\n * @param {boolean} [options.multiple=true] Whether multiple files can be selected\n * @param {string} [options.accept='*'] The accepted file types\n * @param {boolean} [options.reset=false] Whether the input should be reset when the callback is called\n * @param {string} [options.capture] The capture value\n * @returns {UseFileDialogReturn} An object containing the selected files\n *\n * @example\n * const { values, open, reset } = useFileDialog({ accept: 'image/*' });\n */\nexport const useFileDialog = ((...params: any[]) => {\n const callback = (typeof params[0] === 'function' ? params[0] : undefined) as\n | ((value: FileList | null) => void)\n | undefined;\n const options = (callback ? params[0] : params[1]) as UseFileDialogOptions | undefined;\n\n const [value, setValue] = useState<FileList | null>(null);\n const inputRef = useRef<HTMLInputElement>();\n const internalCallbackRef = useRef(callback);\n internalCallbackRef.current = callback;\n\n const reset = () => {\n setValue(null);\n internalCallbackRef.current?.(null);\n if (inputRef.current) inputRef.current.value = '';\n };\n\n const open = (openParams?: UseFileDialogOptions) => {\n if (!inputRef.current) return;\n\n inputRef.current.multiple =\n openParams?.multiple ?? options?.multiple ?? DEFAULT_OPTIONS.multiple;\n inputRef.current.accept = openParams?.accept ?? options?.accept ?? DEFAULT_OPTIONS.accept;\n\n const capture = openParams?.capture ?? options?.capture;\n if (capture) inputRef.current.capture = capture;\n\n if (openParams?.reset ?? options?.reset ?? DEFAULT_OPTIONS.reset) reset();\n\n inputRef.current.click();\n };\n\n useEffect(() => {\n const init = () => {\n const input = document.createElement('input');\n input.type = 'file';\n\n input.onchange = (event: Event) => {\n const { files } = event.target as HTMLInputElement;\n setValue(files);\n internalCallbackRef.current?.(files);\n };\n return input;\n };\n\n inputRef.current = init();\n return () => {\n inputRef.current?.remove();\n };\n }, [options?.multiple, options?.accept, options?.capture, options?.reset]);\n\n return { value, open, reset };\n}) as UseFileDialog;\n"],"names":["DEFAULT_OPTIONS","useFileDialog","callback","arguments","length","undefined","options","_useState","useState","_useState2","_slicedToArray","value","setValue","inputRef","useRef","internalCallbackRef","current","reset","_internalCallbackRef$","call","useEffect","input","document","createElement","type","onchange","event","_internalCallbackRef$2","files","target","_inputRef$current","remove","multiple","accept","capture","open","openParams","_ref","_openParams$multiple","_ref2","_openParams$accept","_openParams$capture","_ref3","_openParams$reset","click"],"mappings":";4HAYA,IAAMA,GACM,EADNA,EAEI,IAFJA,GAGG,EAgDIC,EAAiB,WAC5B,IAAMC,EAAiC,mBAArBC,UAAAC,QAAA,OAAAC,EAAAF,UAAA,IAA+BA,UAAAC,eAAAC,EAAAF,UAAA,QAAeE,EAG1DC,EAAWJ,EAAQC,UAAAC,QAAAC,OAAAA,EAAAF,UAAA,GAAAA,UAAAC,eAAAC,EAAAF,UAA6D,GAEtFI,EAA0BC,EAA0B,MAAKC,EAAAC,EAAAH,EAAA,GAAlDI,EAAKF,EAAA,GAAEG,EAAQH,EAAA,GAChBI,EAAWC,IACXC,EAAsBD,EAAOZ,GACnCa,EAAoBC,QAAUd,EAE9B,IAAMe,EAAQ,WAAM,IAAAC,EAClBN,EAAS,MACkBM,QAA3BA,EAAAH,EAAoBC,eAApBE,IAA2BA,GAA3BA,EAAAC,KAAAJ,EAA8B,MAC1BF,EAASG,UAASH,EAASG,QAAQL,MAAQ,GAChD,EAoCD,OAnBAS,GAAU,WACR,IACQC,EAYR,OADAR,EAASG,UAXDK,EAAQC,SAASC,cAAc,UAC/BC,KAAO,OAEbH,EAAMI,SAAW,SAACC,GAAiB,IAAAC,EACzBC,EAAUF,EAAMG,OAAhBD,MACRhB,EAASgB,GACkBD,QAA3BA,EAAAZ,EAAoBC,eAApBW,IAA2BA,GAA3BA,EAAAR,KAAAJ,EAA8Ba,EAC/B,EACMP,GAIF,WAAM,IAAAS,EACK,QAAhBA,EAAAjB,EAASG,eAAO,IAAAc,GAAhBA,EAAkBC,QACnB,CACH,GAAG,CAACzB,aAAAA,EAAAA,EAAS0B,SAAU1B,aAAO,EAAPA,EAAS2B,OAAQ3B,aAAAA,EAAAA,EAAS4B,QAAS5B,aAAAA,EAAAA,EAASW,QAE5D,CAAEN,MAAAA,EAAOwB,KAlCH,SAACC,GAAsC,IAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAClD,GAAK9B,EAASG,QAAd,CAEAH,EAASG,QAAQgB,SAC0B,QADlBK,EACH,QADGC,EACvBF,aAAAA,EAAAA,EAAYJ,gBAAQ,IAAAM,EAAAA,EAAIhC,eAAAA,EAAS0B,gBAAQK,IAAAA,EAAAA,EAAIrC,EAC/Ca,EAASG,QAAQiB,OAA8C,QAAxCM,EAAqB,QAArBC,EAAGJ,aAAAA,EAAAA,EAAYH,cAAM,IAAAO,EAAAA,EAAIlC,eAAAA,EAAS2B,cAAMM,IAAAA,EAAAA,EAAIvC,EAEnE,IAAMkC,UAAOO,EAAGL,aAAAA,EAAAA,EAAYF,eAAO,IAAAO,EAAAA,EAAInC,aAAO,EAAPA,EAAS4B,QAC5CA,IAASrB,EAASG,QAAQkB,QAAUA,YAExCQ,EAAqB,QAArBC,EAAIP,aAAAA,EAAAA,EAAYnB,aAAK,IAAA0B,EAAAA,EAAIrC,aAAAA,EAAAA,EAASW,aAAK,IAAAyB,EAAAA,EAAI1C,IAAuBiB,IAElEJ,EAASG,QAAQ4B,OAXM,CAYxB,EAqBqB3B,MAAAA,EACxB"}
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{_ as e}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useState as r,useRef as t,useEffect as n}from"react";import{getElement as o}from"../../utils/helpers/getElement.js";import{isTarget as u}from"../../utils/helpers/isTarget.js";import{useRefState as i}from"../useRefState/useRefState.js";var l=function(){var l,s,f=u(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,v=null!==(s=(null!==(l=f?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0])&&void 0!==l?l:{}).initialValue)&&void 0!==s&&s,c=r(v),a=e(c,2),d=a[0],m=a[1],p=i(),g=t(),b=function(){var e;return null===(e=g.current)||void 0===e?void 0:e.focus()},h=function(){var e;return null===(e=g.current)||void 0===e?void 0:e.blur()};return n((function(){if(f||p.state){var e=f?o(f):p.current;if(e){g.current=e;var r=function(e){var r,t;(!b||null!==(r=(t=e.target).matches)&&void 0!==r&&r.call(t,":focus-visible"))&&m(!0)},t=function(){return m(!1)};return v&&e.focus(),e.addEventListener("focus",r),e.addEventListener("blur",t),function(){e.removeEventListener("focus",r),e.removeEventListener("blur",t)}}}}),[f,p.state]),f?{focus:b,blur:h,focused:d}:{ref:p,focus:b,blur:h,focused:d}};export{l as useFocus};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{_ as e}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as r,useRef as t,useEffect as n}from"react";import{useRefState as o}from"../useRefState/useRefState.js";import{isTarget as u}from"../../utils/helpers/isTarget.js";import{getElement as i}from"../../utils/helpers/getElement.js";var l=function(){var l,s,f=u(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,v=null!==(s=(null!==(l=f?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0])&&void 0!==l?l:{}).initialValue)&&void 0!==s&&s,c=r(v),a=e(c,2),d=a[0],m=a[1],p=o(),g=t(),b=function(){var e;return null===(e=g.current)||void 0===e?void 0:e.focus()},h=function(){var e;return null===(e=g.current)||void 0===e?void 0:e.blur()};return n((function(){if(f||p.state){var e=f?i(f):p.current;if(e){g.current=e;var r=function(e){var r,t;(!b||null!==(r=(t=e.target).matches)&&void 0!==r&&r.call(t,":focus-visible"))&&m(!0)},t=function(){return m(!1)};return v&&e.focus(),e.addEventListener("focus",r),e.addEventListener("blur",t),function(){e.removeEventListener("focus",r),e.removeEventListener("blur",t)}}}}),[f,p.state]),f?{focus:b,blur:h,focused:d}:{ref:p,focus:b,blur:h,focused:d}};export{l as useFocus};
3
3
  //# sourceMappingURL=useFocus.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.96 */
2
- import{_ as r}from"../../_rollupPluginBabelHelpers-B03Kl8w9.js";import{useState as n,useEffect as e}from"react";var a=function(){var a=n(0),o=r(a,2),t=o[0],i=o[1];return e((function(){var r,n=0,e=performance.now(),a=function(){n+=1;var o=performance.now(),t=o-e;if(t>=1e3){var m=Math.round(1e3*n/t);i(m),n=0,e=o}r=requestAnimationFrame(a)};return r=requestAnimationFrame(a),function(){cancelAnimationFrame(r)}}),[]),t};export{a as useFps};
1
+ /* @license @siberiacancode/reactuse v0.0.97 */
2
+ import{_ as r}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as n,useEffect as e}from"react";var a=function(){var a=n(0),o=r(a,2),t=o[0],i=o[1];return e((function(){var r,n=0,e=performance.now(),a=function(){n+=1;var o=performance.now(),t=o-e;if(t>=1e3){var m=Math.round(1e3*n/t);i(m),n=0,e=o}r=requestAnimationFrame(a)};return r=requestAnimationFrame(a),function(){cancelAnimationFrame(r)}}),[]),t};export{a as useFps};
3
3
  //# sourceMappingURL=useFps.js.map