@siberiacancode/reactuse 0.0.93 → 0.0.94

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 (311) hide show
  1. package/dist/cjs/{_rollupPluginBabelHelpers-CuUcoGqg.js → _rollupPluginBabelHelpers-EWRwz6fS.js} +3 -3
  2. package/dist/cjs/_rollupPluginBabelHelpers-EWRwz6fS.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/{constants → helpers}/breakpoints.js +1 -1
  10. package/dist/cjs/hooks/useBreakpoints/helpers/breakpoints.js.map +1 -0
  11. package/dist/cjs/hooks/useBreakpoints/helpers/index.js +3 -0
  12. package/dist/cjs/hooks/useBreakpoints/helpers/index.js.map +1 -0
  13. package/dist/cjs/hooks/useBreakpoints/useBreakpoints.js +2 -2
  14. package/dist/cjs/hooks/useBreakpoints/useBreakpoints.js.map +1 -1
  15. package/dist/cjs/hooks/useBrowserLanguage/useBrowserLanguage.js +1 -1
  16. package/dist/cjs/hooks/useClickOutside/useClickOutside.js +2 -2
  17. package/dist/cjs/hooks/useClipboard/useClipboard.js +2 -2
  18. package/dist/cjs/hooks/useConst/useConst.js +1 -1
  19. package/dist/cjs/hooks/useCounter/useCounter.js +2 -2
  20. package/dist/cjs/hooks/useCssVar/useCssVar.js +2 -2
  21. package/dist/cjs/hooks/useDebounceCallback/useDebounceCallback.js +1 -1
  22. package/dist/cjs/hooks/useDebounceValue/useDebounceValue.js +2 -2
  23. package/dist/cjs/hooks/useDefault/useDefault.js +2 -2
  24. package/dist/cjs/hooks/useDeviceMotion/useDeviceMotion.js +2 -2
  25. package/dist/cjs/hooks/useDeviceOrientation/useDeviceOrientation.js +2 -2
  26. package/dist/cjs/hooks/useDevicePixelRatio/useDevicePixelRatio.js +2 -2
  27. package/dist/cjs/hooks/useDidUpdate/useDidUpdate.js +1 -1
  28. package/dist/cjs/hooks/useDisclosure/useDisclosure.js +2 -2
  29. package/dist/cjs/hooks/useDisplayMedia/useDisplayMedia.js +2 -2
  30. package/dist/cjs/hooks/useDocumentEvent/useDocumentEvent.js +2 -2
  31. package/dist/cjs/hooks/useDocumentTitle/useDocumentTitle.js +2 -2
  32. package/dist/cjs/hooks/useDocumentVisibility/useDocumentVisibility.js +1 -1
  33. package/dist/cjs/hooks/useElementSize/useElementSize.js +2 -2
  34. package/dist/cjs/hooks/useEvent/useEvent.js +1 -1
  35. package/dist/cjs/hooks/useEventListener/useEventListener.js +2 -2
  36. package/dist/cjs/hooks/useEyeDropper/useEyeDropper.js +2 -2
  37. package/dist/cjs/hooks/useFavicon/useFavicon.js +2 -2
  38. package/dist/cjs/hooks/useField/useField.js +2 -2
  39. package/dist/cjs/hooks/useFileDialog/useFileDialog.js +2 -2
  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 +3 -0
  44. package/dist/cjs/hooks/useGamepad/helpers/index.js.map +1 -0
  45. package/dist/cjs/hooks/useGamepad/helpers/mapGamepadToXbox360Controller.js +1 -1
  46. package/dist/cjs/hooks/useGamepad/useGamepad.js +2 -2
  47. package/dist/cjs/hooks/useGamepad/useGamepad.js.map +1 -1
  48. package/dist/cjs/hooks/useGeolocation/useGeolocation.js +2 -2
  49. package/dist/cjs/hooks/useHash/useHash.js +2 -2
  50. package/dist/cjs/hooks/useHotkeys/useHotkeys.js +2 -2
  51. package/dist/cjs/hooks/useHover/useHover.js +2 -2
  52. package/dist/cjs/hooks/useIdle/useIdle.js +2 -2
  53. package/dist/cjs/hooks/useImage/useImage.js +2 -2
  54. package/dist/cjs/hooks/useInfiniteScroll/useInfiniteScroll.js +2 -2
  55. package/dist/cjs/hooks/useIntersectionObserver/useIntersectionObserver.js +2 -2
  56. package/dist/cjs/hooks/useInterval/useInterval.js +2 -2
  57. package/dist/cjs/hooks/useInterval/useInterval.js.map +1 -1
  58. package/dist/cjs/hooks/useIsFirstRender/useIsFirstRender.js +1 -1
  59. package/dist/cjs/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +1 -1
  60. package/dist/cjs/hooks/useKeyPress/useKeyPress.js +2 -2
  61. package/dist/cjs/hooks/useKeyPressEvent/useKeyPressEvent.js +2 -2
  62. package/dist/cjs/hooks/useKeyboard/useKeyboard.js +2 -2
  63. package/dist/cjs/hooks/useKeysPressed/useKeysPressed.js +2 -2
  64. package/dist/cjs/hooks/useLastChanged/useLastChanged.js +2 -2
  65. package/dist/cjs/hooks/useLatest/useLatest.js +1 -1
  66. package/dist/cjs/hooks/useList/useList.js +2 -2
  67. package/dist/cjs/hooks/useLocalStorage/useLocalStorage.js +2 -2
  68. package/dist/cjs/hooks/useLocalStorage/useLocalStorage.js.map +1 -1
  69. package/dist/cjs/hooks/useLogger/useLogger.js +2 -2
  70. package/dist/cjs/hooks/useLongPress/useLongPress.js +2 -2
  71. package/dist/cjs/hooks/useMap/useMap.js +2 -2
  72. package/dist/cjs/hooks/useMeasure/useMeasure.js +2 -2
  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/useMemory/useMemory.js.map +1 -1
  76. package/dist/cjs/hooks/useMount/useMount.js +1 -1
  77. package/dist/cjs/hooks/useMouse/useMouse.js +2 -2
  78. package/dist/cjs/hooks/useMutation/useMutation.js +2 -2
  79. package/dist/cjs/hooks/useMutationObserver/useMutationObserver.js +2 -2
  80. package/dist/cjs/hooks/useNetwork/useNetwork.js +2 -2
  81. package/dist/cjs/hooks/useOffsetPagination/useOffsetPagination.js +2 -2
  82. package/dist/cjs/hooks/useOnline/useOnline.js +1 -1
  83. package/dist/cjs/hooks/useOperatingSystem/useOperatingSystem.js +1 -1
  84. package/dist/cjs/hooks/useOptimistic/useOptimistic.js +2 -2
  85. package/dist/cjs/hooks/useOrientation/useOrientation.js +2 -2
  86. package/dist/cjs/hooks/useOtpCredential/useOtpCredential.js +2 -2
  87. package/dist/cjs/hooks/usePageLeave/usePageLeave.js +2 -2
  88. package/dist/cjs/hooks/usePaint/helpers/Paint.js +2 -2
  89. package/dist/cjs/hooks/usePaint/helpers/Pointer.js +2 -2
  90. package/dist/cjs/hooks/usePaint/usePaint.js +2 -2
  91. package/dist/cjs/hooks/useParallax/useParallax.js +2 -2
  92. package/dist/cjs/hooks/usePermission/usePermission.js +2 -2
  93. package/dist/cjs/hooks/usePointerLock/usePointerLock.js +2 -2
  94. package/dist/cjs/hooks/usePostMessage/usePostMessage.js +1 -1
  95. package/dist/cjs/hooks/usePreferredColorScheme/usePreferredColorScheme.js +1 -1
  96. package/dist/cjs/hooks/usePreferredContrast/usePreferredContrast.js +1 -1
  97. package/dist/cjs/hooks/usePreferredDark/usePreferredDark.js +1 -1
  98. package/dist/cjs/hooks/usePreferredLanguages/usePreferredLanguages.js +1 -1
  99. package/dist/cjs/hooks/usePreferredReducedMotion/usePreferredReducedMotion.js +1 -1
  100. package/dist/cjs/hooks/usePrevious/usePrevious.js +1 -1
  101. package/dist/cjs/hooks/useQuery/useQuery.js +2 -2
  102. package/dist/cjs/hooks/useQueue/useQueue.js +2 -2
  103. package/dist/cjs/hooks/useRaf/useRaf.js +2 -2
  104. package/dist/cjs/hooks/useRafValue/useRafValue.js +2 -2
  105. package/dist/cjs/hooks/useRefState/useRefState.js +2 -2
  106. package/dist/cjs/hooks/useRenderCount/useRenderCount.js +1 -1
  107. package/dist/cjs/hooks/useRenderInfo/useRenderInfo.js +1 -1
  108. package/dist/cjs/hooks/useRerender/useRerender.js +1 -1
  109. package/dist/cjs/hooks/useResizeObserver/useResizeObserver.js +2 -2
  110. package/dist/cjs/hooks/useScreenOrientation/useScreenOrientation.js +2 -2
  111. package/dist/cjs/hooks/useScript/useScript.js +2 -2
  112. package/dist/cjs/hooks/useScroll/useScroll.js +2 -2
  113. package/dist/cjs/hooks/useScrollIntoView/useScrollIntoView.js +2 -2
  114. package/dist/cjs/hooks/useScrollTo/useScrollTo.js +2 -2
  115. package/dist/cjs/hooks/useSessionStorage/useSessionStorage.js +2 -2
  116. package/dist/cjs/hooks/useSessionStorage/useSessionStorage.js.map +1 -1
  117. package/dist/cjs/hooks/useSet/useSet.js +2 -2
  118. package/dist/cjs/hooks/useShare/useShare.js +2 -2
  119. package/dist/cjs/hooks/useStateHistory/useStateHistory.js +2 -2
  120. package/dist/cjs/hooks/useStep/useStep.js +2 -2
  121. package/dist/cjs/hooks/useStopwatch/useStopwatch.js +2 -2
  122. package/dist/cjs/hooks/useStorage/useStorage.js +2 -2
  123. package/dist/cjs/hooks/useStorage/useStorage.js.map +1 -1
  124. package/dist/cjs/hooks/useTextDirection/useTextDirection.js +2 -2
  125. package/dist/cjs/hooks/useTextSelection/useTextSelection.js +2 -2
  126. package/dist/cjs/hooks/useThrottleCallback/useThrottleCallback.js +1 -1
  127. package/dist/cjs/hooks/useThrottleValue/useThrottleValue.js +2 -2
  128. package/dist/cjs/hooks/useTime/useTime.js +2 -2
  129. package/dist/cjs/hooks/useTime/useTime.js.map +1 -1
  130. package/dist/cjs/hooks/useTimeout/useTimeout.js +2 -2
  131. package/dist/cjs/hooks/useTimer/useTimer.js +2 -2
  132. package/dist/cjs/hooks/useTimer/useTimer.js.map +1 -1
  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/useVibrate/useVibrate.js.map +1 -1
  137. package/dist/cjs/hooks/useWebSocket/useWebSocket.js +2 -2
  138. package/dist/cjs/hooks/useWindowEvent/useWindowEvent.js +2 -2
  139. package/dist/cjs/hooks/useWindowFocus/useWindowFocus.js +2 -2
  140. package/dist/cjs/hooks/useWindowScroll/useWindowScroll.js +2 -2
  141. package/dist/cjs/hooks/useWindowSize/useWindowSize.js +2 -2
  142. package/dist/cjs/hooks/useWizard/useWizard.js +2 -2
  143. package/dist/cjs/index.js +2 -2
  144. package/dist/cjs/utils/helpers/debounce.js +1 -1
  145. package/dist/cjs/utils/helpers/{time/getDate.js → getDate.js} +1 -1
  146. package/dist/cjs/utils/helpers/getDate.js.map +1 -0
  147. package/dist/cjs/utils/helpers/getElement.js +1 -1
  148. package/dist/cjs/utils/helpers/getRetry.js +1 -1
  149. package/dist/cjs/utils/helpers/index.js +2 -2
  150. package/dist/cjs/utils/helpers/isTarget.js +2 -2
  151. package/dist/cjs/utils/helpers/throttle.js +1 -1
  152. package/dist/esm/_rollupPluginBabelHelpers-Dp_7XWBJ.js +3 -0
  153. package/dist/esm/_rollupPluginBabelHelpers-Dp_7XWBJ.js.map +1 -0
  154. package/dist/esm/hooks/index.js +2 -2
  155. package/dist/esm/hooks/useActiveElement/useActiveElement.js +2 -2
  156. package/dist/esm/hooks/useAsync/useAsync.js +2 -2
  157. package/dist/esm/hooks/useBattery/useBattery.js +2 -2
  158. package/dist/esm/hooks/useBluetooth/useBluetooth.js +2 -2
  159. package/dist/esm/hooks/useBoolean/useBoolean.js +2 -2
  160. package/dist/esm/hooks/useBreakpoints/{constants → helpers}/breakpoints.js +1 -1
  161. package/dist/esm/hooks/useBreakpoints/helpers/breakpoints.js.map +1 -0
  162. package/dist/esm/hooks/useBreakpoints/helpers/index.js +3 -0
  163. package/dist/esm/hooks/useBreakpoints/helpers/index.js.map +1 -0
  164. package/dist/esm/hooks/useBreakpoints/useBreakpoints.js +2 -2
  165. package/dist/esm/hooks/useBreakpoints/useBreakpoints.js.map +1 -1
  166. package/dist/esm/hooks/useBrowserLanguage/useBrowserLanguage.js +1 -1
  167. package/dist/esm/hooks/useClickOutside/useClickOutside.js +2 -2
  168. package/dist/esm/hooks/useClipboard/useClipboard.js +2 -2
  169. package/dist/esm/hooks/useConst/useConst.js +1 -1
  170. package/dist/esm/hooks/useCounter/useCounter.js +2 -2
  171. package/dist/esm/hooks/useCssVar/useCssVar.js +2 -2
  172. package/dist/esm/hooks/useDebounceCallback/useDebounceCallback.js +1 -1
  173. package/dist/esm/hooks/useDebounceValue/useDebounceValue.js +2 -2
  174. package/dist/esm/hooks/useDefault/useDefault.js +2 -2
  175. package/dist/esm/hooks/useDeviceMotion/useDeviceMotion.js +2 -2
  176. package/dist/esm/hooks/useDeviceOrientation/useDeviceOrientation.js +2 -2
  177. package/dist/esm/hooks/useDevicePixelRatio/useDevicePixelRatio.js +2 -2
  178. package/dist/esm/hooks/useDidUpdate/useDidUpdate.js +1 -1
  179. package/dist/esm/hooks/useDisclosure/useDisclosure.js +2 -2
  180. package/dist/esm/hooks/useDisplayMedia/useDisplayMedia.js +2 -2
  181. package/dist/esm/hooks/useDocumentEvent/useDocumentEvent.js +2 -2
  182. package/dist/esm/hooks/useDocumentTitle/useDocumentTitle.js +2 -2
  183. package/dist/esm/hooks/useDocumentVisibility/useDocumentVisibility.js +1 -1
  184. package/dist/esm/hooks/useElementSize/useElementSize.js +2 -2
  185. package/dist/esm/hooks/useEvent/useEvent.js +1 -1
  186. package/dist/esm/hooks/useEventListener/useEventListener.js +2 -2
  187. package/dist/esm/hooks/useEyeDropper/useEyeDropper.js +2 -2
  188. package/dist/esm/hooks/useFavicon/useFavicon.js +2 -2
  189. package/dist/esm/hooks/useField/useField.js +2 -2
  190. package/dist/esm/hooks/useFileDialog/useFileDialog.js +2 -2
  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 +3 -0
  195. package/dist/esm/hooks/useGamepad/helpers/index.js.map +1 -0
  196. package/dist/esm/hooks/useGamepad/helpers/mapGamepadToXbox360Controller.js +1 -1
  197. package/dist/esm/hooks/useGamepad/useGamepad.js +2 -2
  198. package/dist/esm/hooks/useGamepad/useGamepad.js.map +1 -1
  199. package/dist/esm/hooks/useGeolocation/useGeolocation.js +2 -2
  200. package/dist/esm/hooks/useHash/useHash.js +2 -2
  201. package/dist/esm/hooks/useHotkeys/useHotkeys.js +2 -2
  202. package/dist/esm/hooks/useHover/useHover.js +2 -2
  203. package/dist/esm/hooks/useIdle/useIdle.js +2 -2
  204. package/dist/esm/hooks/useImage/useImage.js +2 -2
  205. package/dist/esm/hooks/useInfiniteScroll/useInfiniteScroll.js +2 -2
  206. package/dist/esm/hooks/useIntersectionObserver/useIntersectionObserver.js +2 -2
  207. package/dist/esm/hooks/useInterval/useInterval.js +2 -2
  208. package/dist/esm/hooks/useInterval/useInterval.js.map +1 -1
  209. package/dist/esm/hooks/useIsFirstRender/useIsFirstRender.js +1 -1
  210. package/dist/esm/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +1 -1
  211. package/dist/esm/hooks/useKeyPress/useKeyPress.js +2 -2
  212. package/dist/esm/hooks/useKeyPressEvent/useKeyPressEvent.js +2 -2
  213. package/dist/esm/hooks/useKeyboard/useKeyboard.js +2 -2
  214. package/dist/esm/hooks/useKeysPressed/useKeysPressed.js +2 -2
  215. package/dist/esm/hooks/useLastChanged/useLastChanged.js +2 -2
  216. package/dist/esm/hooks/useLatest/useLatest.js +1 -1
  217. package/dist/esm/hooks/useList/useList.js +2 -2
  218. package/dist/esm/hooks/useLocalStorage/useLocalStorage.js +2 -2
  219. package/dist/esm/hooks/useLocalStorage/useLocalStorage.js.map +1 -1
  220. package/dist/esm/hooks/useLogger/useLogger.js +2 -2
  221. package/dist/esm/hooks/useLongPress/useLongPress.js +2 -2
  222. package/dist/esm/hooks/useMap/useMap.js +2 -2
  223. package/dist/esm/hooks/useMeasure/useMeasure.js +2 -2
  224. package/dist/esm/hooks/useMediaQuery/useMediaQuery.js +1 -1
  225. package/dist/esm/hooks/useMemory/useMemory.js +2 -2
  226. package/dist/esm/hooks/useMemory/useMemory.js.map +1 -1
  227. package/dist/esm/hooks/useMount/useMount.js +1 -1
  228. package/dist/esm/hooks/useMouse/useMouse.js +2 -2
  229. package/dist/esm/hooks/useMutation/useMutation.js +2 -2
  230. package/dist/esm/hooks/useMutationObserver/useMutationObserver.js +2 -2
  231. package/dist/esm/hooks/useNetwork/useNetwork.js +2 -2
  232. package/dist/esm/hooks/useOffsetPagination/useOffsetPagination.js +2 -2
  233. package/dist/esm/hooks/useOnline/useOnline.js +1 -1
  234. package/dist/esm/hooks/useOperatingSystem/useOperatingSystem.js +1 -1
  235. package/dist/esm/hooks/useOptimistic/useOptimistic.js +2 -2
  236. package/dist/esm/hooks/useOrientation/useOrientation.js +2 -2
  237. package/dist/esm/hooks/useOtpCredential/useOtpCredential.js +2 -2
  238. package/dist/esm/hooks/usePageLeave/usePageLeave.js +2 -2
  239. package/dist/esm/hooks/usePaint/helpers/Paint.js +2 -2
  240. package/dist/esm/hooks/usePaint/helpers/Pointer.js +2 -2
  241. package/dist/esm/hooks/usePaint/usePaint.js +2 -2
  242. package/dist/esm/hooks/useParallax/useParallax.js +2 -2
  243. package/dist/esm/hooks/usePermission/usePermission.js +2 -2
  244. package/dist/esm/hooks/usePointerLock/usePointerLock.js +2 -2
  245. package/dist/esm/hooks/usePostMessage/usePostMessage.js +1 -1
  246. package/dist/esm/hooks/usePreferredColorScheme/usePreferredColorScheme.js +1 -1
  247. package/dist/esm/hooks/usePreferredContrast/usePreferredContrast.js +1 -1
  248. package/dist/esm/hooks/usePreferredDark/usePreferredDark.js +1 -1
  249. package/dist/esm/hooks/usePreferredLanguages/usePreferredLanguages.js +1 -1
  250. package/dist/esm/hooks/usePreferredReducedMotion/usePreferredReducedMotion.js +1 -1
  251. package/dist/esm/hooks/usePrevious/usePrevious.js +1 -1
  252. package/dist/esm/hooks/useQuery/useQuery.js +2 -2
  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/useRafValue/useRafValue.js +2 -2
  256. package/dist/esm/hooks/useRefState/useRefState.js +2 -2
  257. package/dist/esm/hooks/useRenderCount/useRenderCount.js +1 -1
  258. package/dist/esm/hooks/useRenderInfo/useRenderInfo.js +1 -1
  259. package/dist/esm/hooks/useRerender/useRerender.js +1 -1
  260. package/dist/esm/hooks/useResizeObserver/useResizeObserver.js +2 -2
  261. package/dist/esm/hooks/useScreenOrientation/useScreenOrientation.js +2 -2
  262. package/dist/esm/hooks/useScript/useScript.js +2 -2
  263. package/dist/esm/hooks/useScroll/useScroll.js +2 -2
  264. package/dist/esm/hooks/useScrollIntoView/useScrollIntoView.js +2 -2
  265. package/dist/esm/hooks/useScrollTo/useScrollTo.js +2 -2
  266. package/dist/esm/hooks/useSessionStorage/useSessionStorage.js +2 -2
  267. package/dist/esm/hooks/useSessionStorage/useSessionStorage.js.map +1 -1
  268. package/dist/esm/hooks/useSet/useSet.js +2 -2
  269. package/dist/esm/hooks/useShare/useShare.js +2 -2
  270. package/dist/esm/hooks/useStateHistory/useStateHistory.js +2 -2
  271. package/dist/esm/hooks/useStep/useStep.js +2 -2
  272. package/dist/esm/hooks/useStopwatch/useStopwatch.js +2 -2
  273. package/dist/esm/hooks/useStorage/useStorage.js +2 -2
  274. package/dist/esm/hooks/useStorage/useStorage.js.map +1 -1
  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 +1 -1
  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/useTime/useTime.js.map +1 -1
  281. package/dist/esm/hooks/useTimeout/useTimeout.js +2 -2
  282. package/dist/esm/hooks/useTimer/useTimer.js +2 -2
  283. package/dist/esm/hooks/useTimer/useTimer.js.map +1 -1
  284. package/dist/esm/hooks/useToggle/useToggle.js +2 -2
  285. package/dist/esm/hooks/useUnmount/useUnmount.js +1 -1
  286. package/dist/esm/hooks/useVibrate/useVibrate.js +2 -2
  287. package/dist/esm/hooks/useVibrate/useVibrate.js.map +1 -1
  288. package/dist/esm/hooks/useWebSocket/useWebSocket.js +2 -2
  289. package/dist/esm/hooks/useWindowEvent/useWindowEvent.js +2 -2
  290. package/dist/esm/hooks/useWindowFocus/useWindowFocus.js +2 -2
  291. package/dist/esm/hooks/useWindowScroll/useWindowScroll.js +2 -2
  292. package/dist/esm/hooks/useWindowSize/useWindowSize.js +2 -2
  293. package/dist/esm/hooks/useWizard/useWizard.js +2 -2
  294. package/dist/esm/index.js +2 -2
  295. package/dist/esm/utils/helpers/debounce.js +1 -1
  296. package/dist/esm/utils/helpers/{time/getDate.js → getDate.js} +1 -1
  297. package/dist/esm/utils/helpers/getDate.js.map +1 -0
  298. package/dist/esm/utils/helpers/getElement.js +1 -1
  299. package/dist/esm/utils/helpers/getRetry.js +1 -1
  300. package/dist/esm/utils/helpers/index.js +2 -2
  301. package/dist/esm/utils/helpers/isTarget.js +2 -2
  302. package/dist/esm/utils/helpers/throttle.js +1 -1
  303. package/dist/types/index.d.ts +10 -10
  304. package/package.json +9 -7
  305. package/dist/cjs/_rollupPluginBabelHelpers-CuUcoGqg.js.map +0 -1
  306. package/dist/cjs/hooks/useBreakpoints/constants/breakpoints.js.map +0 -1
  307. package/dist/cjs/utils/helpers/time/getDate.js.map +0 -1
  308. package/dist/esm/_rollupPluginBabelHelpers-BQehtgCo.js +0 -3
  309. package/dist/esm/_rollupPluginBabelHelpers-BQehtgCo.js.map +0 -1
  310. package/dist/esm/hooks/useBreakpoints/constants/breakpoints.js.map +0 -1
  311. package/dist/esm/utils/helpers/time/getDate.js.map +0 -1
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as r,d as l,c as n,e as o}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useState as u}from"react";var e=function(e,t){var i=u(!1),v=r(i,2),a=v[0],d=v[1],c=u(!1),s=r(c,2),y=s[0],f=s[1],p=u(!1),m=r(p,2),D=m[0],E=m[1],S=u(null),h=r(S,2),b=h[0],g=h[1],w=u(null),x=r(w,2),_=x[0],j=x[1],k=function(r,l){var o;d(!0);var u=null!==(o=null==l?void 0:l.attempt)&&void 0!==o?o:0;return e(r).then((function(r){var n;return null==l||null===(n=l.onSuccess)||void 0===n||n.call(l,r),j(r),E(!0),d(!1),g(null),f(!1),r})).catch((function(o){var e,t="function"==typeof(null==l?void 0:l.retry)?null==l?void 0:l.retry(u,o):null==l?void 0:l.retry,i="function"==typeof(null==l?void 0:l.retryDelay)?null==l?void 0:l.retryDelay(u,o):null==l?void 0:l.retryDelay;return"boolean"==typeof t&&t||t&&t>u?i?void setTimeout((function(){return k(r,n(n({},l),{},{attempt:u+1}))}),i):k(r,n(n({},l),{},{attempt:u+1})):(null==l||null===(e=l.onError)||void 0===e||e.call(l,o),j(null),E(!1),d(!1),g(o),void f(!0))}))},A=function(){var r=l(o().mark((function r(l,n){var u,e,i,v,a;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a={retry:null!==(u=null==n?void 0:n.retry)&&void 0!==u?u:null==t?void 0:t.retry,retryDelay:null!==(e=null==n?void 0:n.retryDelay)&&void 0!==e?e:null==t?void 0:t.retryDelay,onSuccess:null!==(i=null==n?void 0:n.onSuccess)&&void 0!==i?i:null==t?void 0:t.onSuccess,onError:null!==(v=null==n?void 0:n.onError)&&void 0!==v?v:null==t?void 0:t.onError},r.abrupt("return",k(l,a));case 2:case"end":return r.stop()}}),r)})));return function(l,n){return r.apply(this,arguments)}}();return{data:_,error:b,mutate:function(r,l){var n,o,u,e,i={retry:null!==(n=null==l?void 0:l.retry)&&void 0!==n?n:null==t?void 0:t.retry,retryDelay:null!==(o=null==l?void 0:l.retryDelay)&&void 0!==o?o:null==t?void 0:t.retryDelay,onSuccess:null!==(u=null==l?void 0:l.onSuccess)&&void 0!==u?u:null==t?void 0:t.onSuccess,onError:null!==(e=null==l?void 0:l.onError)&&void 0!==e?e:null==t?void 0:t.onError};k(r,i)},mutateAsync:A,isLoading:a,isError:y,isSuccess:D}};export{e as useMutation};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as r,d as l,c as n,e as o}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useState as u}from"react";var e=function(e,t){var i=u(!1),v=r(i,2),a=v[0],d=v[1],c=u(!1),s=r(c,2),y=s[0],f=s[1],p=u(!1),m=r(p,2),D=m[0],E=m[1],S=u(null),h=r(S,2),b=h[0],g=h[1],w=u(null),x=r(w,2),_=x[0],j=x[1],k=function(r,l){var o;d(!0);var u=null!==(o=null==l?void 0:l.attempt)&&void 0!==o?o:0;return e(r).then((function(r){var n;return null==l||null===(n=l.onSuccess)||void 0===n||n.call(l,r),j(r),E(!0),d(!1),g(null),f(!1),r})).catch((function(o){var e,t="function"==typeof(null==l?void 0:l.retry)?null==l?void 0:l.retry(u,o):null==l?void 0:l.retry,i="function"==typeof(null==l?void 0:l.retryDelay)?null==l?void 0:l.retryDelay(u,o):null==l?void 0:l.retryDelay;return"boolean"==typeof t&&t||t&&t>u?i?void setTimeout((function(){return k(r,n(n({},l),{},{attempt:u+1}))}),i):k(r,n(n({},l),{},{attempt:u+1})):(null==l||null===(e=l.onError)||void 0===e||e.call(l,o),j(null),E(!1),d(!1),g(o),void f(!0))}))},A=function(){var r=l(o().mark((function r(l,n){var u,e,i,v,a;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a={retry:null!==(u=null==n?void 0:n.retry)&&void 0!==u?u:null==t?void 0:t.retry,retryDelay:null!==(e=null==n?void 0:n.retryDelay)&&void 0!==e?e:null==t?void 0:t.retryDelay,onSuccess:null!==(i=null==n?void 0:n.onSuccess)&&void 0!==i?i:null==t?void 0:t.onSuccess,onError:null!==(v=null==n?void 0:n.onError)&&void 0!==v?v:null==t?void 0:t.onError},r.abrupt("return",k(l,a));case 2:case"end":return r.stop()}}),r)})));return function(l,n){return r.apply(this,arguments)}}();return{data:_,error:b,mutate:function(r,l){var n,o,u,e,i={retry:null!==(n=null==l?void 0:l.retry)&&void 0!==n?n:null==t?void 0:t.retry,retryDelay:null!==(o=null==l?void 0:l.retryDelay)&&void 0!==o?o:null==t?void 0:t.retryDelay,onSuccess:null!==(u=null==l?void 0:l.onSuccess)&&void 0!==u?u:null==t?void 0:t.onSuccess,onError:null!==(e=null==l?void 0:l.onError)&&void 0!==e?e:null==t?void 0:t.onError};k(r,i)},mutateAsync:A,isLoading:a,isError:y,isSuccess:D}};export{e as useMutation};
3
3
  //# sourceMappingURL=useMutation.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as e}from"../../_rollupPluginBabelHelpers-BQehtgCo.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 i}from"../../utils/helpers/isTarget.js";import{useRefState as l}from"../useRefState/useRefState.js";var u=function(){var u,s=i(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,v=s?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0],a=s?arguments.length<=2?void 0:arguments[2]:arguments.length<=1?void 0:arguments[1],c=r(),d=e(c,2),f=d[0],m=d[1],p=null===(u=null==a?void 0:a.enabled)||void 0===u||u,g=l(window.document.documentElement),h=t(v);h.current=v;var b=t(a);b.current=a,n((function(){if(p||s||g.state){var e=s?o(s):g.current;if(e){var r=new MutationObserver(h.current);return m(r),r.observe(e,b.current),function(){r.disconnect()}}}}),[s,g.state]);var j=function(){return null==f?void 0:f.disconnect()};return s?{stop:j,observer:f}:{ref:g,stop:j,observer:f}};export{u as useMutationObserver};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as e}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.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 i}from"../../utils/helpers/isTarget.js";import{useRefState as l}from"../useRefState/useRefState.js";var u=function(){var u,s=i(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,v=s?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0],a=s?arguments.length<=2?void 0:arguments[2]:arguments.length<=1?void 0:arguments[1],c=r(),d=e(c,2),f=d[0],m=d[1],p=null===(u=null==a?void 0:a.enabled)||void 0===u||u,g=l(window.document.documentElement),h=t(v);h.current=v;var b=t(a);b.current=a,n((function(){if(p||s||g.state){var e=s?o(s):g.current;if(e){var r=new MutationObserver(h.current);return m(r),r.observe(e,b.current),function(){r.disconnect()}}}}),[s,g.state]);var j=function(){return null==f?void 0:f.disconnect()};return s?{stop:j,observer:f}:{ref:g,stop:j,observer:f}};export{u as useMutationObserver};
3
3
  //# sourceMappingURL=useMutationObserver.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as n}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useState as e,useEffect as i}from"react";var o=function(){var n,e,i;return(null===(n=navigator)||void 0===n?void 0:n.connection)||(null===(e=navigator)||void 0===e?void 0:e.mozConnection)||(null===(i=navigator)||void 0===i?void 0:i.webkitConnection)},t=function(){var t=e((function(){if("undefined"==typeof navigator)return{online:!1,type:void 0,effectiveType:void 0,saveData:!1,downlink:0,downlinkMax:0,rtt:0};var n=navigator.onLine,e=o();return{online:n,downlink:null==e?void 0:e.downlink,downlinkMax:null==e?void 0:e.downlinkMax,effectiveType:null==e?void 0:e.effectiveType,rtt:null==e?void 0:e.rtt,saveData:null==e?void 0:e.saveData,type:null==e?void 0:e.type}})),v=n(t,2),l=v[0],a=v[1];return i((function(){var n=function(){var n=navigator.onLine,e=o();a({online:n,downlink:null==e?void 0:e.downlink,downlinkMax:null==e?void 0:e.downlinkMax,effectiveType:null==e?void 0:e.effectiveType,rtt:null==e?void 0:e.rtt,saveData:null==e?void 0:e.saveData,type:null==e?void 0:e.type})};window.addEventListener("online",n,{passive:!0}),window.addEventListener("offline",n,{passive:!0});var e=o();return e&&e.addEventListener("change",n,{passive:!0}),function(){window.removeEventListener("online",n),window.removeEventListener("offline",n),e&&e.removeEventListener("change",n)}})),l};export{o as getConnection,t as useNetwork};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as n}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useState as e,useEffect as i}from"react";var o=function(){var n,e,i;return(null===(n=navigator)||void 0===n?void 0:n.connection)||(null===(e=navigator)||void 0===e?void 0:e.mozConnection)||(null===(i=navigator)||void 0===i?void 0:i.webkitConnection)},t=function(){var t=e((function(){if("undefined"==typeof navigator)return{online:!1,type:void 0,effectiveType:void 0,saveData:!1,downlink:0,downlinkMax:0,rtt:0};var n=navigator.onLine,e=o();return{online:n,downlink:null==e?void 0:e.downlink,downlinkMax:null==e?void 0:e.downlinkMax,effectiveType:null==e?void 0:e.effectiveType,rtt:null==e?void 0:e.rtt,saveData:null==e?void 0:e.saveData,type:null==e?void 0:e.type}})),v=n(t,2),l=v[0],a=v[1];return i((function(){var n=function(){var n=navigator.onLine,e=o();a({online:n,downlink:null==e?void 0:e.downlink,downlinkMax:null==e?void 0:e.downlinkMax,effectiveType:null==e?void 0:e.effectiveType,rtt:null==e?void 0:e.rtt,saveData:null==e?void 0:e.saveData,type:null==e?void 0:e.type})};window.addEventListener("online",n,{passive:!0}),window.addEventListener("offline",n,{passive:!0});var e=o();return e&&e.addEventListener("change",n,{passive:!0}),function(){window.removeEventListener("online",n),window.removeEventListener("offline",n),e&&e.removeEventListener("change",n)}})),l};export{o as getConnection,t as useNetwork};
3
3
  //# sourceMappingURL=useNetwork.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as e}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useState as n,useRef as a,useEffect as i}from"react";var r=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=r.total,o=void 0===t?Number.POSITIVE_INFINITY:t,g=r.pageSize,u=void 0===g?10:g,p=r.initialPage,c=void 0===p?1:p,f=r.onPageChange,v=void 0===f?function(){}:f,S=r.onPageCountChange,z=void 0===S?function(){}:S,l=r.onPageSizeChange,P=void 0===l?function(){}:l,s=n(c),d=e(s,2),h=d[0],m=d[1],C=a(v),I=a(z),x=a(P);C.current=v,I.current=z,x.current=P;var N=Math.max(1,Math.ceil(o/u)),_=1===h,b=h===N;return i((function(){I.current({page:h,pageSize:u})}),[N]),i((function(){x.current({page:h,pageSize:u})}),[u]),{page:h,set:function(e){m(e),v({page:e,pageSize:u})},currentPageSize:u,isFirstPage:_,isLastPage:b,pageCount:N,next:function(){if(b)return v({page:N,pageSize:u});m((function(e){var n=e+1;return v({page:n,pageSize:u}),n}))},prev:function(){if(_)return v({page:1,pageSize:u});m((function(e){var n=e-1;return v({page:n,pageSize:u}),n}))}}};export{r as useOffsetPagination};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as e}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useState as n,useRef as a,useEffect as i}from"react";var r=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=r.total,o=void 0===t?Number.POSITIVE_INFINITY:t,g=r.pageSize,u=void 0===g?10:g,p=r.initialPage,c=void 0===p?1:p,f=r.onPageChange,v=void 0===f?function(){}:f,S=r.onPageCountChange,z=void 0===S?function(){}:S,l=r.onPageSizeChange,P=void 0===l?function(){}:l,s=n(c),d=e(s,2),h=d[0],m=d[1],C=a(v),I=a(z),x=a(P);C.current=v,I.current=z,x.current=P;var N=Math.max(1,Math.ceil(o/u)),_=1===h,b=h===N;return i((function(){I.current({page:h,pageSize:u})}),[N]),i((function(){x.current({page:h,pageSize:u})}),[u]),{page:h,set:function(e){m(e),v({page:e,pageSize:u})},currentPageSize:u,isFirstPage:_,isLastPage:b,pageCount:N,next:function(){if(b)return v({page:N,pageSize:u});m((function(e){var n=e+1;return v({page:n,pageSize:u}),n}))},prev:function(){if(_)return v({page:1,pageSize:u});m((function(e){var n=e-1;return v({page:n,pageSize:u}),n}))}}};export{r as useOffsetPagination};
3
3
  //# sourceMappingURL=useOffsetPagination.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
2
  import{useSyncExternalStore as n}from"react";var e=function(){return navigator.onLine},t=function(){return!1},i=function(n){return window.addEventListener("online",n),window.addEventListener("offline",n),function(){window.removeEventListener("online",n),window.removeEventListener("offline",n)}},o=function(){return n(i,e,t)};export{o as useOnline};
3
3
  //# sourceMappingURL=useOnline.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
2
  import{useRef as n}from"react";var i=function(){if("undefined"==typeof window)return"undetermined";var n=window.navigator.userAgent;return/Macintosh|MacIntel|MacPPC|Mac68K/i.test(n)?"macos":/iPhone|iPad|iPod/i.test(n)?"ios":/Win32|Win64|Windows|WinCE/i.test(n)?"windows":/Android/i.test(n)?"android":/Linux/i.test(n)?"linux":"undetermined"},t=function(){return n(i()).current};export{i as getOperatingSystem,t as useOperatingSystem};
3
3
  //# sourceMappingURL=useOperatingSystem.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as r}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useState as t,useRef as o}from"react";import{useDidUpdate as e}from"../useDidUpdate/useDidUpdate.js";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";var u=function(u,n){var i=t(u),f=r(i,2),c=f[0],a=f[1],p=o(n);p.current=n;var s=t(!1),m=r(s,2),l=m[0],d=m[1];e((function(){l&&(a(u),d(!1))}),[l]);return[c,function(r,t){return a((function(t){return p.current(t,r)})),t.finally((function(){return d(!0)}))}]};export{u as useOptimistic};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as r}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useState as t,useRef as o}from"react";import{useDidUpdate as e}from"../useDidUpdate/useDidUpdate.js";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";var u=function(u,n){var i=t(u),f=r(i,2),c=f[0],a=f[1],p=o(n);p.current=n;var s=t(!1),m=r(s,2),l=m[0],d=m[1];e((function(){l&&(a(u),d(!1))}),[l]);return[c,function(r,t){return a((function(t){return p.current(t,r)})),t.finally((function(){return d(!0)}))}]};export{u as useOptimistic};
3
3
  //# sourceMappingURL=useOptimistic.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as e}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useState as n,useEffect as r}from"react";var t=function(){var t=n({angle:0,type:"landscape-primary"}),o=e(t,2),a=o[0],i=o[1];return r((function(){var e=function(){var e=window.screen.orientation,n=e.angle,r=e.type;i({angle:n,type:r})};return window.screen.orientation.addEventListener("change",e),function(){return window.screen.orientation.removeEventListener("change",e)}}),[]),a};export{t as useOrientation};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as e}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useState as n,useEffect as r}from"react";var t=function(){var t=n({angle:0,type:"landscape-primary"}),o=e(t,2),a=o[0],i=o[1];return r((function(){var e=function(){var e=window.screen.orientation,n=e.angle,r=e.type;i({angle:n,type:r})};return window.screen.orientation.addEventListener("change",e),function(){return window.screen.orientation.removeEventListener("change",e)}}),[]),a};export{t as useOrientation};
3
3
  //# sourceMappingURL=useOrientation.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as r,d as n,e as t}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useState as e,useRef as o}from"react";var a=function(){for(var a,u,i=arguments.length,c=new Array(i),l=0;l<i;l++)c[l]=arguments[l];var s=c[0]instanceof Function?c[0]:null===(a=c[0])||void 0===a?void 0:a.onSuccess,p=c[0]instanceof Function?null===(u=c[0])||void 0===u?void 0:u.onError:void 0,f="undefined"!=typeof navigator&&"OTPCredential"in window,v=e(!1),d=r(v,2),b=d[0],g=d[1],w=o(new AbortController),m=function(){var r=n(t().mark((function r(){var n;return t().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(f){r.next=2;break}return r.abrupt("return");case 2:return w.current=new AbortController,r.prev=3,r.next=6,navigator.credentials.get({otp:{transport:["sms"]},signal:w.current.signal});case 6:return n=r.sent,null==s||s(n),g(!1),r.abrupt("return",n);case 12:r.prev=12,r.t0=r.catch(3),null==p||p(r.t0);case 15:case"end":return r.stop()}}),r,null,[[3,12]])})));return function(){return r.apply(this,arguments)}}();return{supported:f,abort:function(){w.current.abort(),w.current=new AbortController,w.current.signal.onabort=function(){return g(!0)}},aborted:b,get:m}};export{a as useOtpCredential};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as r,d as n,e as t}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useState as e,useRef as o}from"react";var a=function(){for(var a,u,i=arguments.length,c=new Array(i),l=0;l<i;l++)c[l]=arguments[l];var s=c[0]instanceof Function?c[0]:null===(a=c[0])||void 0===a?void 0:a.onSuccess,p=c[0]instanceof Function?null===(u=c[0])||void 0===u?void 0:u.onError:void 0,f="undefined"!=typeof navigator&&"OTPCredential"in window,v=e(!1),d=r(v,2),b=d[0],g=d[1],w=o(new AbortController),m=function(){var r=n(t().mark((function r(){var n;return t().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(f){r.next=2;break}return r.abrupt("return");case 2:return w.current=new AbortController,r.prev=3,r.next=6,navigator.credentials.get({otp:{transport:["sms"]},signal:w.current.signal});case 6:return n=r.sent,null==s||s(n),g(!1),r.abrupt("return",n);case 12:r.prev=12,r.t0=r.catch(3),null==p||p(r.t0);case 15:case"end":return r.stop()}}),r,null,[[3,12]])})));return function(){return r.apply(this,arguments)}}();return{supported:f,abort:function(){w.current.abort(),w.current=new AbortController,w.current.signal.onabort=function(){return g(!0)}},aborted:b,get:m}};export{a as useOtpCredential};
3
3
  //# sourceMappingURL=useOtpCredential.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as e}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useState as n,useEffect as t}from"react";import{useEvent as r}from"../useEvent/useEvent.js";var o=function(o){var u=n(!1),s=e(u,2),m=s[0],i=s[1],v=r((function(){if(m)return i(!1);null==o||o(),i(!0)}));return t((function(){return document.addEventListener("mouseleave",v,{passive:!0}),document.addEventListener("mouseenter",v,{passive:!0}),function(){document.removeEventListener("mouseenter",v),document.removeEventListener("mouseleave",v)}}),[]),m};export{o as usePageLeave};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as e}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useState as n,useEffect as t}from"react";import{useEvent as r}from"../useEvent/useEvent.js";var o=function(o){var u=n(!1),s=e(u,2),m=s[0],i=s[1],v=r((function(){if(m)return i(!1);null==o||o(),i(!0)}));return t((function(){return document.addEventListener("mouseleave",v,{passive:!0}),document.addEventListener("mouseenter",v,{passive:!0}),function(){document.removeEventListener("mouseenter",v),document.removeEventListener("mouseleave",v)}}),[]),m};export{o as usePageLeave};
3
3
  //# sourceMappingURL=usePageLeave.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{h as t,i as s,f as i}from"../../../_rollupPluginBabelHelpers-BQehtgCo.js";import{Pointer as r}from"./Pointer.js";var h=function(){return t((function t(h){var e=h.x,o=h.y,n=h.radius,u=h.smooth;s(this,t),i(this,"smooth",!1),i(this,"points",[]),i(this,"lines",[]),this.smooth=u,this.pointer=new r(e,o),this.brush=new r(e,o),this.radius=n,this.points=[],this.lines=[]}),[{key:"getBrushCoordinates",value:function(){return{x:this.brush.x,y:this.brush.y}}},{key:"getPointerCoordinates",value:function(){return{x:this.pointer.x,y:this.pointer.y}}},{key:"update",value:function(t){if(this.pointer.equalsTo(t))return!1;if(this.pointer.update(t),!this.smooth)return this.brush.update(t),this.points.push(this.getBrushCoordinates()),!0;var s=this.pointer.getDistanceTo(this.brush),i=this.pointer.getAngleTo(this.brush);if(Math.round(10*(s-this.radius))/10>0){var r=i+Math.PI/2;return this.brush.update({x:this.brush.x+Math.sin(r)*(s-this.radius),y:this.brush.y-Math.cos(r)*(s-this.radius)}),this.points.push(this.getBrushCoordinates()),!0}return!1}}])}();export{h as Paint};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{i as t,j as s,f as i}from"../../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{Pointer as r}from"./Pointer.js";var h=function(){return t((function t(h){var e=h.x,o=h.y,n=h.radius,u=h.smooth;s(this,t),i(this,"smooth",!1),i(this,"points",[]),i(this,"lines",[]),this.smooth=u,this.pointer=new r(e,o),this.brush=new r(e,o),this.radius=n,this.points=[],this.lines=[]}),[{key:"getBrushCoordinates",value:function(){return{x:this.brush.x,y:this.brush.y}}},{key:"getPointerCoordinates",value:function(){return{x:this.pointer.x,y:this.pointer.y}}},{key:"update",value:function(t){if(this.pointer.equalsTo(t))return!1;if(this.pointer.update(t),!this.smooth)return this.brush.update(t),this.points.push(this.getBrushCoordinates()),!0;var s=this.pointer.getDistanceTo(this.brush),i=this.pointer.getAngleTo(this.brush);if(Math.round(10*(s-this.radius))/10>0){var r=i+Math.PI/2;return this.brush.update({x:this.brush.x+Math.sin(r)*(s-this.radius),y:this.brush.y-Math.cos(r)*(s-this.radius)}),this.points.push(this.getBrushCoordinates()),!0}return!1}}])}();export{h as Paint};
3
3
  //# sourceMappingURL=Paint.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{h as t,i as e}from"../../../_rollupPluginBabelHelpers-BQehtgCo.js";var n=function(){function n(t,i){e(this,n),this.x=t,this.y=i}return t(n,[{key:"update",value:function(t){this.x=t.x,this.y=t.y}},{key:"getDifferenceTo",value:function(t){return new n(this.x-t.x,this.y-t.y)}},{key:"getDistanceTo",value:function(t){var e=this.getDifferenceTo(t);return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}},{key:"getAngleTo",value:function(t){var e=this.getDifferenceTo(t);return Math.atan2(e.y,e.x)}},{key:"equalsTo",value:function(t){return this.x===t.x&&this.y===t.y}},{key:"moveByAngle",value:function(t,e){var n=t+Math.PI/2;return this.x+=Math.sin(n)*e,this.y-=Math.cos(n)*e,this}}])}();export{n as Pointer};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{i as t,j as e}from"../../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";var n=function(){function n(t,i){e(this,n),this.x=t,this.y=i}return t(n,[{key:"update",value:function(t){this.x=t.x,this.y=t.y}},{key:"getDifferenceTo",value:function(t){return new n(this.x-t.x,this.y-t.y)}},{key:"getDistanceTo",value:function(t){var e=this.getDifferenceTo(t);return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}},{key:"getAngleTo",value:function(t){var e=this.getDifferenceTo(t);return Math.atan2(e.y,e.x)}},{key:"equalsTo",value:function(t){return this.x===t.x&&this.y===t.y}},{key:"moveByAngle",value:function(t,e){var n=t+Math.PI/2;return this.x+=Math.sin(n)*e,this.y-=Math.cos(n)*e,this}}])}();export{n as Pointer};
3
3
  //# sourceMappingURL=Pointer.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{b as r,_ as n}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useRef as e,useState as t,useEffect as o}from"react";import{getElement as u}from"../../utils/helpers/getElement.js";import{useEvent as i}from"../useEvent/useEvent.js";import{Paint as l}from"./helpers/Paint.js";import"./helpers/Pointer.js";var c=function(){var c,s,a,v,d,p="object"!==r(arguments.length<=0?void 0:arguments[0])||"current"in(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,f=p?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0],h=null!==(c=null==f?void 0:f.color)&&void 0!==c?c:"black",m=null!==(s=null==f?void 0:f.opacity)&&void 0!==s?s:1,g=null!==(a=null==f?void 0:f.radius)&&void 0!==a?a:10,y=e(new l({x:0,y:0,radius:null!==(v=null==f?void 0:f.radius)&&void 0!==v?v:10,smooth:null!==(d=null==f?void 0:f.smooth)&&void 0!==d&&d})),x=t(!1),E=n(x,2),w=E[0],L=E[1],b=e(null),j=e(null),M=function(r,n,e,t){if(j.current){j.current.globalAlpha=e,j.current.strokeStyle=n,j.current.lineWidth=2*t,j.current.lineCap="round",j.current.lineJoin="round";var o=r[0],u=r[1];j.current.beginPath();for(var i=1;i<r.length;i+=1){var l={x:o.x+(u.x-o.x)/2,y:o.y+(u.y-o.y)/2};j.current.quadraticCurveTo(o.x,o.y,l.x,l.y),o=r[i],u=r[i+1]}j.current.lineTo(o.x,o.y),j.current.stroke()}},P=function(){j.current&&j.current.clearRect(0,0,j.current.canvas.width,j.current.canvas.height)},k=i((function(r){var n;if(w){null==f||null===(n=f.onMouseMove)||void 0===n||n.call(f,r,y.current);var e={x:r.offsetX,y:r.offsetY};y.current.update(e)&&j.current&&(P(),j.current.clearRect(0,0,j.current.canvas.width,j.current.canvas.height),y.current.lines.forEach((function(r){var n=r.points,e=r.color,t=r.opacity,o=r.radius;return M(n,e,t,o)})),M(y.current.points,h,m,g))}})),C=i((function(r){var n;if(j.current){var e={x:r.offsetX,y:r.offsetY};y.current.brush.update(e),y.current.points.push(e),M(y.current.points,h,m,g),null==f||null===(n=f.onMouseDown)||void 0===n||n.call(f,r,y.current),L(!0)}})),R=i((function(r){var n;j.current&&(y.current.points.length&&(y.current.lines.push({points:y.current.points,color:h,opacity:m,radius:g}),y.current.points=[]),null==f||null===(n=f.onMouseUp)||void 0===n||n.call(f,r,y.current),L(!1))})),T=function(){j.current&&(P(),y.current.lines=[],y.current.points=[])},X=function(){j.current&&(P(),y.current.lines.pop(),y.current.lines.forEach((function(r){var n=r.points,e=r.color,t=r.opacity,o=r.radius;return M(n,e,t,o)})))};return o((function(){var r=p?u(p):b.current;if(r)return j.current=r.getContext("2d"),null!=f&&f.initialLines&&(y.current.lines=f.initialLines,f.initialLines.forEach((function(r){var n=r.points,e=r.color,t=r.opacity,o=r.radius;return M(n,e,t,o)}))),r.addEventListener("mousedown",C),r.addEventListener("mousemove",k),r.addEventListener("mouseup",R),function(){r&&(r.removeEventListener("mousedown",C),r.removeEventListener("mousemove",k),r.removeEventListener("mouseup",R))}}),[]),p?{drawing:w,clear:T,undo:X,draw:M,lines:y.current.lines}:{ref:b,drawing:w,clear:T,undo:X,draw:M,lines:y.current.lines}};export{c as usePaint};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{b as r,_ as n}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useRef as e,useState as t,useEffect as o}from"react";import{getElement as u}from"../../utils/helpers/getElement.js";import{useEvent as i}from"../useEvent/useEvent.js";import{Paint as l}from"./helpers/Paint.js";import"./helpers/Pointer.js";var c=function(){var c,s,a,v,d,p="object"!==r(arguments.length<=0?void 0:arguments[0])||"current"in(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,f=p?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0],h=null!==(c=null==f?void 0:f.color)&&void 0!==c?c:"black",m=null!==(s=null==f?void 0:f.opacity)&&void 0!==s?s:1,g=null!==(a=null==f?void 0:f.radius)&&void 0!==a?a:10,y=e(new l({x:0,y:0,radius:null!==(v=null==f?void 0:f.radius)&&void 0!==v?v:10,smooth:null!==(d=null==f?void 0:f.smooth)&&void 0!==d&&d})),x=t(!1),E=n(x,2),w=E[0],L=E[1],b=e(null),j=e(null),M=function(r,n,e,t){if(j.current){j.current.globalAlpha=e,j.current.strokeStyle=n,j.current.lineWidth=2*t,j.current.lineCap="round",j.current.lineJoin="round";var o=r[0],u=r[1];j.current.beginPath();for(var i=1;i<r.length;i+=1){var l={x:o.x+(u.x-o.x)/2,y:o.y+(u.y-o.y)/2};j.current.quadraticCurveTo(o.x,o.y,l.x,l.y),o=r[i],u=r[i+1]}j.current.lineTo(o.x,o.y),j.current.stroke()}},P=function(){j.current&&j.current.clearRect(0,0,j.current.canvas.width,j.current.canvas.height)},k=i((function(r){var n;if(w){null==f||null===(n=f.onMouseMove)||void 0===n||n.call(f,r,y.current);var e={x:r.offsetX,y:r.offsetY};y.current.update(e)&&j.current&&(P(),j.current.clearRect(0,0,j.current.canvas.width,j.current.canvas.height),y.current.lines.forEach((function(r){var n=r.points,e=r.color,t=r.opacity,o=r.radius;return M(n,e,t,o)})),M(y.current.points,h,m,g))}})),C=i((function(r){var n;if(j.current){var e={x:r.offsetX,y:r.offsetY};y.current.brush.update(e),y.current.points.push(e),M(y.current.points,h,m,g),null==f||null===(n=f.onMouseDown)||void 0===n||n.call(f,r,y.current),L(!0)}})),R=i((function(r){var n;j.current&&(y.current.points.length&&(y.current.lines.push({points:y.current.points,color:h,opacity:m,radius:g}),y.current.points=[]),null==f||null===(n=f.onMouseUp)||void 0===n||n.call(f,r,y.current),L(!1))})),T=function(){j.current&&(P(),y.current.lines=[],y.current.points=[])},X=function(){j.current&&(P(),y.current.lines.pop(),y.current.lines.forEach((function(r){var n=r.points,e=r.color,t=r.opacity,o=r.radius;return M(n,e,t,o)})))};return o((function(){var r=p?u(p):b.current;if(r)return j.current=r.getContext("2d"),null!=f&&f.initialLines&&(y.current.lines=f.initialLines,f.initialLines.forEach((function(r){var n=r.points,e=r.color,t=r.opacity,o=r.radius;return M(n,e,t,o)}))),r.addEventListener("mousedown",C),r.addEventListener("mousemove",k),r.addEventListener("mouseup",R),function(){r&&(r.removeEventListener("mousedown",C),r.removeEventListener("mousemove",k),r.removeEventListener("mouseup",R))}}),[]),p?{drawing:w,clear:T,undo:X,draw:M,lines:y.current.lines}:{ref:b,drawing:w,clear:T,undo:X,draw:M,lines:y.current.lines}};export{c as usePaint};
3
3
  //# sourceMappingURL=usePaint.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as e}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useState as t,useEffect as a}from"react";import{useDeviceOrientation as n}from"../useDeviceOrientation/useDeviceOrientation.js";import{useMouse as r}from"../useMouse/useMouse.js";import{useRefState as i}from"../useRefState/useRefState.js";import{useScreenOrientation as o}from"../useScreenOrientation/useScreenOrientation.js";import"../../utils/helpers/getElement.js";var u=function(){var u,l=(arguments.length<=0?void 0:arguments[0])instanceof Function||(arguments.length<=0?void 0:arguments[0])&&"current"in(arguments.length<=0?void 0:arguments[0])||(arguments.length<=0?void 0:arguments[0])instanceof Element?arguments.length<=0?void 0:arguments[0]:void 0,s=i(),v=r(null!=l?l:s.current),c=o(),m=n(),d=null!==(u=l?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0])&&void 0!==u?u:{},p=d.deviceOrientationRollAdjust,f=void 0===p?function(e){return e}:p,g=d.deviceOrientationTiltAdjust,h=void 0===g?function(e){return e}:g,b=d.mouseRollAdjust,y=void 0===b?function(e){return e}:b,j=d.mouseTiltAdjust,O=void 0===j?function(e){return e}:j,k=t({roll:0,tilt:0,source:"mouse"}),R=e(k,2),T=R[0],A=R[1],S=function(){return m.supported&&(m.value.alpha||m.value.gamma)?"deviceOrientation":"mouse"};return a((function(){if(v.element){var e=S(),t=function(){if("deviceOrientation"===S()){var e;switch(c.value.orientationType){case"landscape-primary":e=m.value.gamma/90;break;case"landscape-secondary":e=-m.value.gamma/90;break;case"portrait-primary":default:e=-m.value.beta/90;break;case"portrait-secondary":e=m.value.beta/90}return f(e)}if(!v.element)return 0;var t=v.y-v.elementPositionY,a=v.element.getBoundingClientRect().height;return y(-(t-a/2)/a)}(),a=function(){if("deviceOrientation"===S()){var e;switch(c.value.orientationType){case"landscape-primary":e=m.value.beta/90;break;case"landscape-secondary":e=-m.value.beta/90;break;case"portrait-primary":default:e=m.value.gamma/90;break;case"portrait-secondary":e=-m.value.gamma/90}return h(e)}if(!v.element)return 0;var t=v.x-v.elementPositionX,a=v.element.getBoundingClientRect().width;return O((t-a/2)/a)}();A({roll:t,source:e,tilt:a})}}),[c.value.angle,c.value.orientationType,m.value.gamma,m.value.beta,m.value.alpha,m.value.absolute,v.x,v.y,v.element]),l?{value:T}:{ref:s,value:T}};export{u as useParallax};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as e}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useState as t,useEffect as a}from"react";import{useDeviceOrientation as n}from"../useDeviceOrientation/useDeviceOrientation.js";import{useMouse as r}from"../useMouse/useMouse.js";import{useRefState as i}from"../useRefState/useRefState.js";import{useScreenOrientation as o}from"../useScreenOrientation/useScreenOrientation.js";import"../../utils/helpers/getElement.js";var u=function(){var u,l=(arguments.length<=0?void 0:arguments[0])instanceof Function||(arguments.length<=0?void 0:arguments[0])&&"current"in(arguments.length<=0?void 0:arguments[0])||(arguments.length<=0?void 0:arguments[0])instanceof Element?arguments.length<=0?void 0:arguments[0]:void 0,s=i(),v=r(null!=l?l:s.current),c=o(),m=n(),d=null!==(u=l?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0])&&void 0!==u?u:{},p=d.deviceOrientationRollAdjust,f=void 0===p?function(e){return e}:p,g=d.deviceOrientationTiltAdjust,h=void 0===g?function(e){return e}:g,b=d.mouseRollAdjust,y=void 0===b?function(e){return e}:b,j=d.mouseTiltAdjust,O=void 0===j?function(e){return e}:j,k=t({roll:0,tilt:0,source:"mouse"}),R=e(k,2),T=R[0],A=R[1],S=function(){return m.supported&&(m.value.alpha||m.value.gamma)?"deviceOrientation":"mouse"};return a((function(){if(v.element){var e=S(),t=function(){if("deviceOrientation"===S()){var e;switch(c.value.orientationType){case"landscape-primary":e=m.value.gamma/90;break;case"landscape-secondary":e=-m.value.gamma/90;break;case"portrait-primary":default:e=-m.value.beta/90;break;case"portrait-secondary":e=m.value.beta/90}return f(e)}if(!v.element)return 0;var t=v.y-v.elementPositionY,a=v.element.getBoundingClientRect().height;return y(-(t-a/2)/a)}(),a=function(){if("deviceOrientation"===S()){var e;switch(c.value.orientationType){case"landscape-primary":e=m.value.beta/90;break;case"landscape-secondary":e=-m.value.beta/90;break;case"portrait-primary":default:e=m.value.gamma/90;break;case"portrait-secondary":e=-m.value.gamma/90}return h(e)}if(!v.element)return 0;var t=v.x-v.elementPositionX,a=v.element.getBoundingClientRect().width;return O((t-a/2)/a)}();A({roll:t,source:e,tilt:a})}}),[c.value.angle,c.value.orientationType,m.value.gamma,m.value.beta,m.value.alpha,m.value.absolute,v.x,v.y,v.element]),l?{value:T}:{ref:s,value:T}};export{u as useParallax};
3
3
  //# sourceMappingURL=useParallax.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as e,d as r,e as t}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useState as n,useEffect as a}from"react";import{useEvent as o}from"../useEvent/useEvent.js";var s=function(s,u){var i,p=n("prompt"),c=e(p,2),v=c[0],m=c[1],d="undefined"!=typeof navigator&&"permissions"in navigator,f=null===(i=null==u?void 0:u.enabled)||void 0===i||i,l={name:s},g=o(r(t().mark((function e(){var r;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,navigator.permissions.query(l);case 3:return r=e.sent,m(r.state),e.abrupt("return",r.state);case 8:return e.prev=8,e.t0=e.catch(0),m("prompt"),e.abrupt("return","prompt");case 12:case"end":return e.stop()}}),e,null,[[0,8]])}))));return a((function(){if(d&&f)return g(),window.addEventListener("change",g),function(){window.removeEventListener("change",g)}}),[s,f]),{state:v,supported:d,query:g}};export{s as usePermission};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as e,d as r,e as t}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useState as n,useEffect as a}from"react";import{useEvent as o}from"../useEvent/useEvent.js";var s=function(s,u){var i,p=n("prompt"),c=e(p,2),v=c[0],m=c[1],d="undefined"!=typeof navigator&&"permissions"in navigator,f=null===(i=null==u?void 0:u.enabled)||void 0===i||i,l={name:s},g=o(r(t().mark((function e(){var r;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,navigator.permissions.query(l);case 3:return r=e.sent,m(r.state),e.abrupt("return",r.state);case 8:return e.prev=8,e.t0=e.catch(0),m("prompt"),e.abrupt("return","prompt");case 12:case"end":return e.stop()}}),e,null,[[0,8]])}))));return a((function(){if(d&&f)return g(),window.addEventListener("change",g),function(){window.removeEventListener("change",g)}}),[s,f]),{state:v,supported:d,query:g}};export{s as usePermission};
3
3
  //# sourceMappingURL=usePermission.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as e}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useState as n,useEffect as t}from"react";var o=function(){var o="undefined"!=typeof document&&"pointerLockElement"in document,r=n(),c=e(r,2),i=c[0],u=c[1];t((function(){if(o){var e=function(){var e;if(o){var n=null!==(e=document.pointerLockElement)&&void 0!==e?e:i;n&&n===i&&u(document.pointerLockElement)}},n=function(){var e;if(o){var n=null!==(e=document.pointerLockElement)&&void 0!==e?e:i;if(n&&n===i){var t=document.pointerLockElement?"release":"acquire";throw new Error("Failed to ".concat(t," pointer lock."))}}};return document.addEventListener("pointerlockchange",e),document.addEventListener("pointerlockerror",n),function(){document.removeEventListener("pointerlockchange",e),document.removeEventListener("pointerlockerror",n)}}}),[]);return{supported:o,element:i,lock:function(e){return!!o&&(!(e instanceof Event)&&(e.currentTarget.requestPointerLock(),u(e.currentTarget),!0))},unlock:function(){return!!o&&(!!i&&(document.exitPointerLock(),u(void 0),!0))}}};export{o as usePointerLock};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as e}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useState as n,useEffect as t}from"react";var o=function(){var o="undefined"!=typeof document&&"pointerLockElement"in document,r=n(),c=e(r,2),i=c[0],u=c[1];t((function(){if(o){var e=function(){var e;if(o){var n=null!==(e=document.pointerLockElement)&&void 0!==e?e:i;n&&n===i&&u(document.pointerLockElement)}},n=function(){var e;if(o){var n=null!==(e=document.pointerLockElement)&&void 0!==e?e:i;if(n&&n===i){var t=document.pointerLockElement?"release":"acquire";throw new Error("Failed to ".concat(t," pointer lock."))}}};return document.addEventListener("pointerlockchange",e),document.addEventListener("pointerlockerror",n),function(){document.removeEventListener("pointerlockchange",e),document.removeEventListener("pointerlockerror",n)}}}),[]);return{supported:o,element:i,lock:function(e){return!!o&&(!(e instanceof Event)&&(e.currentTarget.requestPointerLock(),u(e.currentTarget),!0))},unlock:function(){return!!o&&(!!i&&(document.exitPointerLock(),u(void 0),!0))}}};export{o as usePointerLock};
3
3
  //# sourceMappingURL=usePointerLock.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
2
  import{useRef as r,useEffect as n}from"react";var e=function(e,t){var i=r(t);i.current=t,n((function(){var r=function(r){!(!Array.isArray(e)||e.includes(r.origin)&&e.includes("*"))||r.origin!==e&&"*"!==e||i.current(r.data,r)};return window.addEventListener("message",r),function(){return window.removeEventListener("message",r)}}),[]);return function(r){Array.isArray(e)?e.forEach((function(n){return window.postMessage(r,n)})):window.postMessage(r,e)}};export{e as usePostMessage};
3
3
  //# sourceMappingURL=usePostMessage.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
2
  import{useMediaQuery as e}from"../useMediaQuery/useMediaQuery.js";import"react";var r=function(){var r=e("(prefers-color-scheme: light)"),o=e("(prefers-color-scheme: dark)");return r?"light":o?"dark":"no-preference"};export{r as usePreferredColorScheme};
3
3
  //# sourceMappingURL=usePreferredColorScheme.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
2
  import{useMediaQuery as r}from"../useMediaQuery/useMediaQuery.js";import"react";var e=function(){var e=r("(prefers-contrast: more)"),s=r("(prefers-contrast: less)"),t=r("(prefers-contrast: custom)");return e?"more":s?"less":t?"custom":"no-preference"};export{e as usePreferredContrast};
3
3
  //# sourceMappingURL=usePreferredContrast.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
2
  import{useMediaQuery as r}from"../useMediaQuery/useMediaQuery.js";import"react";var e=function(){return r("(prefers-color-scheme: dark)")};export{e as usePreferredDark};
3
3
  //# sourceMappingURL=usePreferredDark.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
2
  import{useSyncExternalStore as n}from"react";var e=function(){return window.navigator.languages},r=function(){return[]},t=function(n){return window.addEventListener("languagechange",n),function(){window.removeEventListener("languagechange",n)}},a=function(){return n(t,e,r)};export{a as usePreferredLanguages};
3
3
  //# sourceMappingURL=usePreferredLanguages.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
2
  import{useMediaQuery as e}from"../useMediaQuery/useMediaQuery.js";import"react";var r=function(){return e("(prefers-reduced-motion: reduce)")?"reduce":"no-preference"};export{r as usePreferredReducedMotion};
3
3
  //# sourceMappingURL=usePreferredReducedMotion.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
2
  import{useRef as r}from"react";var t=function(t,e){var n,u=r(t),c=r();return(null!==(n=null==e?void 0:e.equality)&&void 0!==n?n:Object.is)(t,u.current)||(c.current=u.current,u.current=t),c.current};export{t as usePrevious};
3
3
  //# sourceMappingURL=usePrevious.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as r,a as t}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useRef as n,useState as e,useEffect as l}from"react";import{getRetry as i}from"../../utils/helpers/getRetry.js";import{useDidUpdate as o}from"../useDidUpdate/useDidUpdate.js";import{useMount as u}from"../useMount/useMount.js";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";var c=function(c,a){var f,s,v=null===(f=null==a?void 0:a.enabled)||void 0===f||f,d=n(null!=a&&a.retry?i(a.retry):0),h=n(!1),p=e(!1),y=r(p,2),m=y[0],D=y[1],I=e(!1),g=r(I,2),b=g[0],j=g[1],E=e(!1),L=r(E,2),k=L[0],w=L[1],A=e(!1),C=r(A,2),F=C[0],M=C[1],R=e(!(null==a||!a.initialData)),S=r(R,2),U=S[0],_=S[1],x=e(void 0),B=r(x,2),H=B[0],P=B[1],T=e(null==a?void 0:a.initialData),q=r(T,2),z=q[0],G=q[1],J=n(new AbortController),K=n(),N=null!==(s=null==a?void 0:a.keys)&&void 0!==s?s:[],O=function(){J.current.abort(),J.current=new AbortController},Q=function(r){O(),D(!0),"init"===r&&(h.current=!0,j(!0)),"refetch"===r&&M(!0),c({signal:J.current.signal,keys:N}).then((function(t){var n,e=null!=a&&a.select?null==a?void 0:a.select(t):t;null==a||null===(n=a.onSuccess)||void 0===n||n.call(a,e),G(e),_(!0),P(void 0),w(!1),D(!1),"init"===r&&j(!1),"refetch"===r&&M(!1)})).catch((function(t){var n;if(d.current>0){d.current-=1;var e="function"==typeof(null==a?void 0:a.retryDelay)?null==a?void 0:a.retryDelay(d.current,t):null==a?void 0:a.retryDelay;return e?void setTimeout((function(){return Q(r)}),e):Q(r)}null==a||null===(n=a.onError)||void 0===n||n.call(a,t),G(void 0),_(!1),P(t),w(!0),D(!1),"init"===r&&j(!1),"refetch"===r&&M(!1),d.current=null!=a&&a.retry?i(a.retry):0})).finally((function(){if(null!=a&&a.refetchInterval){var r=setInterval((function(){clearInterval(r),Q("refetch")}),null==a?void 0:a.refetchInterval);K.current=r}}))};u((function(){v&&Q("init")})),o((function(){v&&Q(h.current?"refetch":"init")}),[v].concat(t(N))),l((function(){return function(){clearInterval(K.current)}}),[v,null==a?void 0:a.refetchInterval,null==a?void 0:a.retry].concat(t(N)));var V=(null==a?void 0:a.placeholderData)instanceof Function?null==a?void 0:a.placeholderData():null==a?void 0:a.placeholderData;return{abort:O,data:null!=z?z:V,error:H,refetch:function(){return Q("refetch")},isFetching:m,isLoading:b,isError:k,isSuccess:U,isRefetching:F}};export{c as useQuery};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as r,a as t}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useRef as n,useState as e,useEffect as l}from"react";import{getRetry as i}from"../../utils/helpers/getRetry.js";import{useDidUpdate as o}from"../useDidUpdate/useDidUpdate.js";import{useMount as u}from"../useMount/useMount.js";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";var c=function(c,a){var f,s,v=null===(f=null==a?void 0:a.enabled)||void 0===f||f,d=n(null!=a&&a.retry?i(a.retry):0),h=n(!1),p=e(!1),y=r(p,2),m=y[0],D=y[1],I=e(!1),g=r(I,2),b=g[0],j=g[1],E=e(!1),L=r(E,2),k=L[0],w=L[1],A=e(!1),C=r(A,2),F=C[0],M=C[1],R=e(!(null==a||!a.initialData)),S=r(R,2),U=S[0],_=S[1],x=e(void 0),B=r(x,2),H=B[0],P=B[1],T=e(null==a?void 0:a.initialData),q=r(T,2),z=q[0],G=q[1],J=n(new AbortController),K=n(),N=null!==(s=null==a?void 0:a.keys)&&void 0!==s?s:[],O=function(){J.current.abort(),J.current=new AbortController},Q=function(r){O(),D(!0),"init"===r&&(h.current=!0,j(!0)),"refetch"===r&&M(!0),c({signal:J.current.signal,keys:N}).then((function(t){var n,e=null!=a&&a.select?null==a?void 0:a.select(t):t;null==a||null===(n=a.onSuccess)||void 0===n||n.call(a,e),G(e),_(!0),P(void 0),w(!1),D(!1),"init"===r&&j(!1),"refetch"===r&&M(!1)})).catch((function(t){var n;if(d.current>0){d.current-=1;var e="function"==typeof(null==a?void 0:a.retryDelay)?null==a?void 0:a.retryDelay(d.current,t):null==a?void 0:a.retryDelay;return e?void setTimeout((function(){return Q(r)}),e):Q(r)}null==a||null===(n=a.onError)||void 0===n||n.call(a,t),G(void 0),_(!1),P(t),w(!0),D(!1),"init"===r&&j(!1),"refetch"===r&&M(!1),d.current=null!=a&&a.retry?i(a.retry):0})).finally((function(){if(null!=a&&a.refetchInterval){var r=setInterval((function(){clearInterval(r),Q("refetch")}),null==a?void 0:a.refetchInterval);K.current=r}}))};u((function(){v&&Q("init")})),o((function(){v&&Q(h.current?"refetch":"init")}),[v].concat(t(N))),l((function(){return function(){clearInterval(K.current)}}),[v,null==a?void 0:a.refetchInterval,null==a?void 0:a.retry].concat(t(N)));var V=(null==a?void 0:a.placeholderData)instanceof Function?null==a?void 0:a.placeholderData():null==a?void 0:a.placeholderData;return{abort:O,data:null!=z?z:V,error:H,refetch:function(){return Q("refetch")},isFetching:m,isLoading:b,isError:k,isSuccess:U,isRefetching:F}};export{c as useQuery};
3
3
  //# sourceMappingURL=useQuery.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as r,g as n,a as t}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useState as e}from"react";import{flushSync as o}from"react-dom";var u=function(){var u=e(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]),a=r(u,2),i=a[0],c=a[1];return{add:function(r){return c((function(n){return[].concat(t(n),[r])}))},remove:function(){var r;return o((function(){c((function(t){var e=n(t),o=e[0],u=e.slice(1);return r=o,u}))})),r},clear:function(){return c([])},first:i[0],last:i[i.length-1],size:i.length,queue:i}};export{u as useQueue};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as r,h as n,a as t}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useState as e}from"react";import{flushSync as o}from"react-dom";var u=function(){var u=e(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]),a=r(u,2),i=a[0],c=a[1];return{add:function(r){return c((function(n){return[].concat(t(n),[r])}))},remove:function(){var r;return o((function(){c((function(t){var e=n(t),o=e[0],u=e.slice(1);return r=o,u}))})),r},clear:function(){return c([])},first:i[0],last:i[i.length-1],size:i.length,queue:i}};export{u as useQueue};
3
3
  //# sourceMappingURL=useQueue.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as r}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useRef as n,useState as e,useEffect as t}from"react";var u=function(u,l){var i,a=n(null),o=n(0),c=e(!1),m=r(c,2),d=m[0],v=m[1],f=null===(i=null==l?void 0:l.enabled)||void 0===i||i,s=n(u);s.current=u;var p=function(r){var n=r-o.current;null!=l&&l.delay&&n<(null==l?void 0:l.delay)||(o.current=r,s.current({delta:n,timestamp:r})),a.current=window.requestAnimationFrame(p)},w=function(){d||(v(!0),o.current=0,a.current=window.requestAnimationFrame(p))};function y(){a.current&&(v(!1),window.cancelAnimationFrame(a.current),a.current=null)}return t((function(){if(f)return w(),y}),[f,null==l?void 0:l.delay]),{active:d,pause:y,resume:w}};export{u as useRaf};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as r}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useRef as n,useState as e,useEffect as t}from"react";var u=function(u,l){var i,a=n(null),o=n(0),c=e(!1),m=r(c,2),d=m[0],v=m[1],f=null===(i=null==l?void 0:l.enabled)||void 0===i||i,s=n(u);s.current=u;var p=function(r){var n=r-o.current;null!=l&&l.delay&&n<(null==l?void 0:l.delay)||(o.current=r,s.current({delta:n,timestamp:r})),a.current=window.requestAnimationFrame(p)},w=function(){d||(v(!0),o.current=0,a.current=window.requestAnimationFrame(p))};function y(){a.current&&(v(!1),window.cancelAnimationFrame(a.current),a.current=null)}return t((function(){if(f)return w(),y}),[f,null==l?void 0:l.delay]),{active:d,pause:y,resume:w}};export{u as useRaf};
3
3
  //# sourceMappingURL=useRaf.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as r}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useRef as n,useState as t}from"react";import{useUnmount as e}from"../useUnmount/useUnmount.js";var o=function(o){var u=n(0),i=t(o),m=r(i,2),a=m[0],c=m[1];return e((function(){return cancelAnimationFrame(u.current)})),[a,function(r){cancelAnimationFrame(u.current),u.current=requestAnimationFrame((function(){return c(r)}))}]};export{o as useRafValue};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as r}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useRef as n,useState as t}from"react";import{useUnmount as e}from"../useUnmount/useUnmount.js";var o=function(o){var u=n(0),i=t(o),m=r(i,2),a=m[0],c=m[1];return e((function(){return cancelAnimationFrame(u.current)})),[a,function(r){cancelAnimationFrame(u.current),u.current=requestAnimationFrame((function(){return c(r)}))}]};export{o as useRafValue};
3
3
  //# sourceMappingURL=useRafValue.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as r}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useState as e}from"react";var n=function(n){var t=e(n),u=r(t,2),o=u[0],i=u[1],c=e((function(){return function(r,e){var n=r;function t(r){n!==r&&e(n=r)}return Object.defineProperty(t,"current",{get:function(){return n},set:function(r){n!==r&&e(n=r)},configurable:!0,enumerable:!0}),t}(n,i)})),f=r(c,1)[0];return f.state=o,f};export{n as useRefState};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as r}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useState as e}from"react";var n=function(n){var t=e(n),u=r(t,2),o=u[0],i=u[1],c=e((function(){return function(r,e){var n=r;function t(r){n!==r&&e(n=r)}return Object.defineProperty(t,"current",{get:function(){return n},set:function(r){n!==r&&e(n=r)},configurable:!0,enumerable:!0}),t}(n,i)})),f=r(c,1)[0];return f.state=o,f};export{n as useRefState};
3
3
  //# sourceMappingURL=useRefState.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
2
  import{useRef as r,useEffect as t}from"react";var n=function(){var n=r(0);return t((function(){n.current+=1})),n.current};export{n as useRenderCount};
3
3
  //# sourceMappingURL=useRenderCount.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
2
  import{useRef as e}from"react";var n=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Unknown",r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=e({component:n,renders:0,timestamp:Date.now(),sinceLast:0}),c=Date.now();return t.current.renders+=1,t.current.sinceLast=t.current.timestamp?c-t.current.timestamp:0,t.current.timestamp=c,r&&(console.group("".concat(n," info, render number: ").concat(t.current.renders)),console.log("Timestamp: ".concat(t.current.timestamp)),console.log("Since last render: ".concat(t.current.sinceLast)),console.log("Renders: ".concat(t.current.renders)),console.dir(t.current),console.groupEnd()),t.current};export{n as useRenderInfo};
3
3
  //# sourceMappingURL=useRenderInfo.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
2
  import{useReducer as r}from"react";var t=function(){return r((function(){return{}}),{})[1]};export{t as useRerender};
3
3
  //# sourceMappingURL=useRerender.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{b as e,_ as r}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useState as t,useRef as n,useEffect as o}from"react";import{getElement as i}from"../../utils/helpers/getElement.js";import{useRefState as l}from"../useRefState/useRefState.js";var u=function(){var u,s="object"!==e(arguments.length<=0?void 0:arguments[0])||"current"in(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,v=s?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0],a=null===(u=null==v?void 0:v.enabled)||void 0===u||u,c=t([]),d=r(c,2),f=d[0],m=d[1],g=l(),p=n();return p.current=null==v?void 0:v.onChange,o((function(){if(a||s||g.state){var e=s?i(s):g.current;if(e){var r=new ResizeObserver((function(e){var t;m(e),null===(t=p.current)||void 0===t||t.call(p,e,r)}));return r.observe(e,v),function(){r.disconnect()}}}}),[s,g.state,null==v?void 0:v.box,a]),s?{entries:f}:{ref:g,entries:f}};export{u as useResizeObserver};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{b as e,_ as r}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useState as t,useRef as n,useEffect as o}from"react";import{getElement as i}from"../../utils/helpers/getElement.js";import{useRefState as l}from"../useRefState/useRefState.js";var u=function(){var u,s="object"!==e(arguments.length<=0?void 0:arguments[0])||"current"in(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,v=s?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0],a=null===(u=null==v?void 0:v.enabled)||void 0===u||u,c=t([]),d=r(c,2),f=d[0],m=d[1],g=l(),p=n();return p.current=null==v?void 0:v.onChange,o((function(){if(a||s||g.state){var e=s?i(s):g.current;if(e){var r=new ResizeObserver((function(e){var t;m(e),null===(t=p.current)||void 0===t||t.call(p,e,r)}));return r.observe(e,v),function(){r.disconnect()}}}}),[s,g.state,null==v?void 0:v.box,a]),s?{entries:f}:{ref:g,entries:f}};export{u as useResizeObserver};
3
3
  //# sourceMappingURL=useResizeObserver.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as n}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useState as e,useEffect as o}from"react";var i=function(){var i="undefined"!=typeof window&&"screen"in window&&"orientation"in window.screen,t=i?window.screen.orientation:{},r=e((function(){var n;return{angle:null!==(n=null==t?void 0:t.angle)&&void 0!==n?n:0,orientationType:null==t?void 0:t.type}})),u=n(r,2),l=u[0],a=u[1];o((function(){if(i){var n=function(){return a({angle:t.angle,orientationType:t.type})};return window.addEventListener("orientationchange",n),function(){window.removeEventListener("orientationchange",n)}}}));return{supported:i,value:l,lock:function(n){if(i&&"function"==typeof t.lock)return t.lock(n)},unlock:function(){i&&"function"==typeof t.unlock&&t.unlock()}}};export{i as useScreenOrientation};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as n}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useState as e,useEffect as o}from"react";var i=function(){var i="undefined"!=typeof window&&"screen"in window&&"orientation"in window.screen,t=i?window.screen.orientation:{},r=e((function(){var n;return{angle:null!==(n=null==t?void 0:t.angle)&&void 0!==n?n:0,orientationType:null==t?void 0:t.type}})),u=n(r,2),l=u[0],a=u[1];o((function(){if(i){var n=function(){return a({angle:t.angle,orientationType:t.type})};return window.addEventListener("orientationchange",n),function(){window.removeEventListener("orientationchange",n)}}}));return{supported:i,value:l,lock:function(n){if(i&&"function"==typeof t.lock)return t.lock(n)},unlock:function(){i&&"function"==typeof t.unlock&&t.unlock()}}};export{i as useScreenOrientation};
3
3
  //# sourceMappingURL=useScreenOrientation.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as r}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useState as t,useEffect as e}from"react";var n="script-status",o=function(o){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=t((function(){var r=document.querySelector('script[src="'.concat(o,'"]')),t=null==r?void 0:r.getAttribute(n);return t||(r?"unknown":"loading")})),c=r(u,2),a=c[0],s=c[1],d=i.removeOnUnmount,v=void 0===d||d,l=i.async,m=void 0===l||l;return e((function(){var t=document.querySelector('script[src="'.concat(o,'"]')),e=null==t?void 0:t.getAttribute(n);if(e)return s(e);if(t)return s("unknown");var u=document.createElement("script");u.src=o,u.async=m;for(var c=0,a=Object.entries(i);c<a.length;c++){var d=r(a[c],2),l=d[0],f=d[1];u.setAttribute(l,String(f))}u.setAttribute(n,"loading"),document.body.appendChild(u);var p=function(){u.setAttribute(n,"ready"),s("ready")},b=function(){u.setAttribute(n,"error"),s("error")};return u.addEventListener("load",p),u.addEventListener("error",b),function(){v&&u.remove(),u.removeEventListener("load",p),u.removeEventListener("error",b)}}),[o,v]),a};export{n as SCRIPT_STATUS_ATTRIBUTE_NAME,o as useScript};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as r}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useState as t,useEffect as e}from"react";var n="script-status",o=function(o){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=t((function(){var r=document.querySelector('script[src="'.concat(o,'"]')),t=null==r?void 0:r.getAttribute(n);return t||(r?"unknown":"loading")})),c=r(u,2),a=c[0],s=c[1],d=i.removeOnUnmount,v=void 0===d||d,l=i.async,m=void 0===l||l;return e((function(){var t=document.querySelector('script[src="'.concat(o,'"]')),e=null==t?void 0:t.getAttribute(n);if(e)return s(e);if(t)return s("unknown");var u=document.createElement("script");u.src=o,u.async=m;for(var c=0,a=Object.entries(i);c<a.length;c++){var d=r(a[c],2),l=d[0],f=d[1];u.setAttribute(l,String(f))}u.setAttribute(n,"loading"),document.body.appendChild(u);var p=function(){u.setAttribute(n,"ready"),s("ready")},b=function(){u.setAttribute(n,"error"),s("error")};return u.addEventListener("load",p),u.addEventListener("error",b),function(){v&&u.remove(),u.removeEventListener("load",p),u.removeEventListener("error",b)}}),[o,v]),a};export{n as SCRIPT_STATUS_ATTRIBUTE_NAME,o as useScript};
3
3
  //# sourceMappingURL=useScript.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{b as t,_ as e}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useRef as l,useState as o,useEffect as r}from"react";import{getElement as n}from"../../utils/helpers/getElement.js";import{isTarget as i}from"../../utils/helpers/isTarget.js";import{useRefState as c}from"../useRefState/useRefState.js";var u=function(){var u=i(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,v=u?"object"===t(arguments.length<=1?void 0:arguments[1])?arguments.length<=1?void 0:arguments[1]:{onScroll:arguments.length<=1?void 0:arguments[1]}:"object"===t(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:{onScroll:arguments.length<=0?void 0:arguments[0]},d=c(),s=l(v);s.current=v;var a=o(!1),f=e(a,2),m=f[0],g=f[1],h=l({x:0,y:0});return r((function(){if(u||d.state){var t=u?n(u):d.current;if(t){var e=function(t){var e;g(!1),null==v||null===(e=v.onStop)||void 0===e||e.call(v,t)},l=function(t){var e,l,o,r,n,i,c;g(!0);var u=t.target===document?t.target.documentElement:t.target,v=u.style,d=v.display,a=v.flexDirection,f="rtl"===v.direction?-1:1,m=u.scrollLeft,p=u.scrollTop;u instanceof Document&&!p&&(p=window.document.body.scrollTop);var x=null===(e=s.current)||void 0===e?void 0:e.offset,b=m*f<=(null!==(l=null==x?void 0:x.left)&&void 0!==l?l:0),y=m*f+u.clientWidth>=u.scrollWidth-(null!==(o=null==x?void 0:x.right)&&void 0!==o?o:0)-1,j=p<=(null!==(r=null==x?void 0:x.top)&&void 0!==r?r:0),E=p+u.clientHeight>=u.scrollHeight-(null!==(n=null==x?void 0:x.bottom)&&void 0!==n?n:0)-1,S="flex"===d&&"column-reverse"===a,L="flex"===d&&"column-reverse"===a,H={x:m,y:p,directions:{left:m<h.current.x,right:m>h.current.x,top:p<h.current.y,bottom:p>h.current.y},arrived:{left:L?y:b,right:L?b:y,top:S?E:j,bottom:S?j:E}};h.current={x:m,y:p},null===(i=s.current)||void 0===i||null===(c=i.onScroll)||void 0===c||c.call(i,H,t)};return t.addEventListener("scroll",l),t.addEventListener("scrollend",e),function(){t.removeEventListener("scroll",l),t.removeEventListener("scrollend",e)}}}}),[u,d.state]),u?m:[d,m]};export{u as useScroll};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{b as t,_ as e}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useRef as l,useState as o,useEffect as r}from"react";import{getElement as n}from"../../utils/helpers/getElement.js";import{isTarget as i}from"../../utils/helpers/isTarget.js";import{useRefState as c}from"../useRefState/useRefState.js";var u=function(){var u=i(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,v=u?"object"===t(arguments.length<=1?void 0:arguments[1])?arguments.length<=1?void 0:arguments[1]:{onScroll:arguments.length<=1?void 0:arguments[1]}:"object"===t(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:{onScroll:arguments.length<=0?void 0:arguments[0]},d=c(),s=l(v);s.current=v;var a=o(!1),f=e(a,2),m=f[0],g=f[1],h=l({x:0,y:0});return r((function(){if(u||d.state){var t=u?n(u):d.current;if(t){var e=function(t){var e;g(!1),null==v||null===(e=v.onStop)||void 0===e||e.call(v,t)},l=function(t){var e,l,o,r,n,i,c;g(!0);var u=t.target===document?t.target.documentElement:t.target,v=u.style,d=v.display,a=v.flexDirection,f="rtl"===v.direction?-1:1,m=u.scrollLeft,p=u.scrollTop;u instanceof Document&&!p&&(p=window.document.body.scrollTop);var x=null===(e=s.current)||void 0===e?void 0:e.offset,b=m*f<=(null!==(l=null==x?void 0:x.left)&&void 0!==l?l:0),y=m*f+u.clientWidth>=u.scrollWidth-(null!==(o=null==x?void 0:x.right)&&void 0!==o?o:0)-1,j=p<=(null!==(r=null==x?void 0:x.top)&&void 0!==r?r:0),E=p+u.clientHeight>=u.scrollHeight-(null!==(n=null==x?void 0:x.bottom)&&void 0!==n?n:0)-1,S="flex"===d&&"column-reverse"===a,L="flex"===d&&"column-reverse"===a,H={x:m,y:p,directions:{left:m<h.current.x,right:m>h.current.x,top:p<h.current.y,bottom:p>h.current.y},arrived:{left:L?y:b,right:L?b:y,top:S?E:j,bottom:S?j:E}};h.current={x:m,y:p},null===(i=s.current)||void 0===i||null===(c=i.onScroll)||void 0===c||c.call(i,H,t)};return t.addEventListener("scroll",l),t.addEventListener("scrollend",e),function(){t.removeEventListener("scroll",l),t.removeEventListener("scrollend",e)}}}}),[u,d.state]),u?m:[d,m]};export{u as useScroll};
3
3
  //# sourceMappingURL=useScroll.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{b as e}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useEffect as t}from"react";import{getElement as i}from"../../utils/helpers/getElement.js";import{useRefState as o}from"../useRefState/useRefState.js";var r=function(){var r="object"!==e(arguments.length<=0?void 0:arguments[0])||"current"in(arguments.length<=0?void 0:arguments[0])||(arguments.length<=0?void 0:arguments[0])instanceof Element?arguments.length<=0?void 0:arguments[0]:void 0,n=r?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0],l=o(),a=null!=n?n:{},v=a.behavior,s=void 0===v?"smooth":v,c=a.block,u=void 0===c?"start":c,f=a.inline,b=void 0===f?"nearest":f,d=a.enabled,g=void 0===d||d;t((function(){if(g&&(r||l.state)){var e=r?i(r):l.current;e&&e.scrollIntoView({behavior:s,block:u,inline:b})}}),[r,l.state,g]);var h=function(e){var t=r?i(r):l.current;if(t){var o=null!=e?e:{},n=o.behavior,a=o.block,v=o.inline;t.scrollIntoView({behavior:n,block:a,inline:v})}};return r?{trigger:h}:{ref:l,trigger:h}};export{r as useScrollIntoView};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{b as e}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useEffect as t}from"react";import{getElement as i}from"../../utils/helpers/getElement.js";import{useRefState as o}from"../useRefState/useRefState.js";var r=function(){var r="object"!==e(arguments.length<=0?void 0:arguments[0])||"current"in(arguments.length<=0?void 0:arguments[0])||(arguments.length<=0?void 0:arguments[0])instanceof Element?arguments.length<=0?void 0:arguments[0]:void 0,n=r?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0],l=o(),a=null!=n?n:{},v=a.behavior,s=void 0===v?"smooth":v,c=a.block,u=void 0===c?"start":c,f=a.inline,b=void 0===f?"nearest":f,d=a.enabled,g=void 0===d||d;t((function(){if(g&&(r||l.state)){var e=r?i(r):l.current;e&&e.scrollIntoView({behavior:s,block:u,inline:b})}}),[r,l.state,g]);var h=function(e){var t=r?i(r):l.current;if(t){var o=null!=e?e:{},n=o.behavior,a=o.block,v=o.inline;t.scrollIntoView({behavior:n,block:a,inline:v})}};return r?{trigger:h}:{ref:l,trigger:h}};export{r as useScrollIntoView};
3
3
  //# sourceMappingURL=useScrollIntoView.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{useLayoutEffect as e}from"react";import{getElement as r}from"../../utils/helpers/getElement.js";import{isTarget as t}from"../../utils/helpers/isTarget.js";import{useRefState as o}from"../useRefState/useRefState.js";import"../../_rollupPluginBabelHelpers-BQehtgCo.js";var i=function(){var i,l=t(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,a=null!==(i=l?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0])&&void 0!==i?i:{},n=a.x,v=a.y,s=a.behavior,u=void 0===s?"auto":s,f=a.enabled,p=void 0===f||f,h=o();e((function(){if(p&&(l||h.state)){var e=l?r(l):h.current;e&&e.scrollTo({top:v,left:n,behavior:u})}}),[l,h.state]);var m=function(e){var t=l?r(l):h.current;if(t){var o=null!=e?e:{},i=o.x,a=o.y,n=o.behavior;t.scrollTo({left:i,top:a,behavior:n})}};return l?m:{ref:h,trigger:m}};export{i as useScrollTo};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{useLayoutEffect as e}from"react";import{getElement as r}from"../../utils/helpers/getElement.js";import{isTarget as t}from"../../utils/helpers/isTarget.js";import{useRefState as o}from"../useRefState/useRefState.js";import"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";var i=function(){var i,l=t(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,a=null!==(i=l?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0])&&void 0!==i?i:{},n=a.x,v=a.y,s=a.behavior,u=void 0===s?"auto":s,f=a.enabled,p=void 0===f||f,h=o();e((function(){if(p&&(l||h.state)){var e=l?r(l):h.current;e&&e.scrollTo({top:v,left:n,behavior:u})}}),[l,h.state]);var m=function(e){var t=l?r(l):h.current;if(t){var o=null!=e?e:{},i=o.x,a=o.y,n=o.behavior;t.scrollTo({left:i,top:a,behavior:n})}};return l?m:{ref:h,trigger:m}};export{i as useScrollTo};
3
3
  //# sourceMappingURL=useScrollTo.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{c as o}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useStorage as r}from"../useStorage/useStorage.js";import"react";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";var e=function(e,t,s){return r(e,o({initialValue:t,storage:window.sessionStorage},s))};export{e as useSessionStorage};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{c as o}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useStorage as e}from"../useStorage/useStorage.js";import"react";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";var r=function(r,t,i){return e(r,o(o({},i),{},{initialValue:t,storage:"undefined"!=typeof window?window.localStorage:void 0}))};export{r as useSessionStorage};
3
3
  //# sourceMappingURL=useSessionStorage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSessionStorage.js","sources":["../../../../src/hooks/useSessionStorage/useSessionStorage.ts"],"sourcesContent":["import type { UseStorageInitialValue, UseStorageOptions } from '../useStorage/useStorage';\n\nimport { useStorage } from '../useStorage/useStorage';\n\n/**\n * @name useSessionStorage\n * @description - Hook that manages session storage value\n * @category Browser\n *\n * @template Value The type of the value\n * @param {string} key The key of the storage\n * @param {UseStorageInitialValue<Value>} [initialValue] The initial value of the storage\n * @param {UseStorageOptions<Value>} [options] The options of the storage\n *\n * @example\n * const { value, set, remove } = useSessionStorage('key', 'value');\n */\nexport const useSessionStorage = <Value>(\n key: string,\n initialValue?: UseStorageInitialValue<Value>,\n options?: UseStorageOptions<Value>\n) => useStorage(key, { initialValue, storage: window.sessionStorage, ...options });\n"],"names":["useSessionStorage","key","initialValue","options","useStorage","_objectSpread","storage","window","sessionStorage"],"mappings":";yMAiBO,IAAMA,EAAoB,SAC/BC,EACAC,EACAC,GAAkC,OAC/BC,EAAWH,EAAGI,EAAA,CAAIH,aAAAA,EAAcI,QAASC,OAAOC,gBAAmBL,GAAU"}
1
+ {"version":3,"file":"useSessionStorage.js","sources":["../../../../src/hooks/useSessionStorage/useSessionStorage.ts"],"sourcesContent":["import type { UseStorageInitialValue, UseStorageOptions } from '../useStorage/useStorage';\n\nimport { useStorage } from '../useStorage/useStorage';\n\n/**\n * @name useSessionStorage\n * @description - Hook that manages session storage value\n * @category Browser\n *\n * @template Value The type of the value\n * @param {string} key The key of the storage\n * @param {UseStorageInitialValue<Value>} [initialValue] The initial value of the storage\n * @param {UseStorageOptions<Value>} [options] The options of the storage\n *\n * @example\n * const { value, set, remove } = useSessionStorage('key', 'value');\n */\nexport const useSessionStorage = <Value>(\n key: string,\n initialValue?: UseStorageInitialValue<Value>,\n options?: UseStorageOptions<Value>\n) =>\n useStorage(key, {\n ...options,\n initialValue,\n storage: typeof window !== 'undefined' ? window.localStorage : undefined\n });\n"],"names":["useSessionStorage","key","initialValue","options","useStorage","_objectSpread","storage","window","localStorage","undefined"],"mappings":";yMAiBO,IAAMA,EAAoB,SAC/BC,EACAC,EACAC,GAAkC,OAElCC,EAAWH,EAAGI,EAAAA,KACTF,GAAO,GAAA,CACVD,aAAAA,EACAI,QAA2B,oBAAXC,OAAyBA,OAAOC,kBAAeC,IAC/D"}
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as e}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useState as n}from"react";var r=function(r){var t=n(new Set(r)),u=e(t,2),i=u[0],f=u[1];return{value:i,size:i.size,has:function(e){return i.has(e)},add:function(e){return f((function(n){return new Set(n).add(e)}))},remove:function(e){return f((function(n){if(!n.has(e))return n;var r=new Set(n);return r.delete(e),r}))},clear:function(){return f(new Set)},reset:function(){return f(new Set(r))},toggle:function(e){return f((function(n){if(!n.has(e))return new Set(n).add(e);var r=new Set(n);return r.delete(e),r}))},union:function(e){return f(i.union(e))},difference:function(e){return f(i.difference(e))},symmetricDifference:function(e){return f(i.symmetricDifference(e))},intersection:function(e){return f(i.intersection(e))}}};export{r as useSet};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as e}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useState as n}from"react";var r=function(r){var t=n(new Set(r)),u=e(t,2),i=u[0],f=u[1];return{value:i,size:i.size,has:function(e){return i.has(e)},add:function(e){return f((function(n){return new Set(n).add(e)}))},remove:function(e){return f((function(n){if(!n.has(e))return n;var r=new Set(n);return r.delete(e),r}))},clear:function(){return f(new Set)},reset:function(){return f(new Set(r))},toggle:function(e){return f((function(n){if(!n.has(e))return new Set(n).add(e);var r=new Set(n);return r.delete(e),r}))},union:function(e){return f(i.union(e))},difference:function(e){return f(i.difference(e))},symmetricDifference:function(e){return f(i.symmetricDifference(e))},intersection:function(e){return f(i.intersection(e))}}};export{r as useSet};
3
3
  //# sourceMappingURL=useSet.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{d as r,e,c as a}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";var n=function(n){var t="undefined"!=typeof navigator&&"share"in navigator,i=function(){var i=r(e().mark((function r(i){var s;return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t){r.next=2;break}return r.abrupt("return");case 2:return(s=a(a({},n),i)).files&&navigator.canShare({files:s.files})&&navigator.share(s),r.abrupt("return",navigator.share(s));case 5:case"end":return r.stop()}}),r)})));return function(r){return i.apply(this,arguments)}}();return{share:i,supported:t}};export{n as useShare};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{d as r,e,c as a}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";var n=function(n){var t="undefined"!=typeof navigator&&"share"in navigator,i=function(){var i=r(e().mark((function r(i){var s;return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t){r.next=2;break}return r.abrupt("return");case 2:return(s=a(a({},n),i)).files&&navigator.canShare({files:s.files})&&navigator.share(s),r.abrupt("return",navigator.share(s));case 5:case"end":return r.stop()}}),r)})));return function(r){return i.apply(this,arguments)}}();return{share:i,supported:t}};export{n as useShare};
3
3
  //# sourceMappingURL=useShare.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as r}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useState as n,useRef as t}from"react";var e=function(e,u){var c=n(e),o=r(c,2),i=o[0],l=o[1],f=n([e]),a=r(f,2),s=a[0],h=a[1],v=t(0);return{history:s,value:i,set:function(r){h((function(n){var t=n.slice(0,v.current+1);return t.push(r),u&&t.length>u&&t.shift(),v.current=t.length-1,t})),l(r)},index:v.current,back:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;v.current-r<0||(v.current-=r,l(s[v.current]))},forward:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;v.current+r>=s.length||(v.current+=r,l(s[v.current]))},reset:function(){l(e),h([e]),v.current=0},undo:function(){0!==v.current&&(v.current--,l(s[v.current]),h((function(r){return r.slice(0,v.current+1)})))}}};export{e as useStateHistory};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as r}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useState as n,useRef as t}from"react";var e=function(e,u){var c=n(e),o=r(c,2),i=o[0],l=o[1],f=n([e]),a=r(f,2),s=a[0],h=a[1],v=t(0);return{history:s,value:i,set:function(r){h((function(n){var t=n.slice(0,v.current+1);return t.push(r),u&&t.length>u&&t.shift(),v.current=t.length-1,t})),l(r)},index:v.current,back:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;v.current-r<0||(v.current-=r,l(s[v.current]))},forward:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;v.current+r>=s.length||(v.current+=r,l(s[v.current]))},reset:function(){l(e),h([e]),v.current=0},undo:function(){0!==v.current&&(v.current--,l(s[v.current]),h((function(r){return r.slice(0,v.current+1)})))}}};export{e as useStateHistory};
3
3
  //# sourceMappingURL=useStateHistory.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{b as t,_ as r}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useRef as n,useState as e}from"react";var i=function(i){var u="object"===t(i)?i.max:i,o="object"===t(i)?i.initial:1,c=n(o>u||o<1?1:o),s=e(o),a=r(s,2),f=a[0],l=a[1],p=1===f,b=f===u;return{counts:u,currentStep:f,isFirst:p,isLast:b,next:function(){b||l((function(t){return t+1}))},back:function(){p||l((function(t){return t-1}))},reset:function(){return l(c.current)},set:function(t){return"first"===t?l(c.current):"last"===t||t>=u?l(u):t<=1?l(1):void l(t)}}};export{i as useStep};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{b as t,_ as r}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useRef as n,useState as e}from"react";var i=function(i){var u="object"===t(i)?i.max:i,o="object"===t(i)?i.initial:1,c=n(o>u||o<1?1:o),s=e(o),a=r(s,2),f=a[0],l=a[1],p=1===f,b=f===u;return{counts:u,currentStep:f,isFirst:p,isLast:b,next:function(){b||l((function(t){return t+1}))},back:function(){p||l((function(t){return t-1}))},reset:function(){return l(c.current)},set:function(t){return"first"===t?l(c.current):"last"===t||t>=u?l(u):t<=1?l(1):void l(t)}}};export{i as useStep};
3
3
  //# sourceMappingURL=useStep.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as n,c as t}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useState as r,useEffect as o}from"react";var u=function(n){return n?{days:Math.floor(n/86400),hours:Math.floor(n%86400/3600),minutes:Math.floor(n%3600/60),seconds:Math.floor(n%60),count:n}:{days:0,hours:0,minutes:0,seconds:0,count:0}},e=function(){for(var e,s,c=arguments.length,i=new Array(c),a=0;a<c;a++)i[a]=arguments[a];var l=null!==(e="number"==typeof i[0]?i[0]:null===(s=i[0])||void 0===s?void 0:s.initialTime)&&void 0!==e?e:0,f="number"==typeof i[0]?i[1]:i[0],d=r(u(l)),m=n(d,2),h=m[0],v=m[1],p=r(!(null!=f&&f.enabled)),y=n(p,2),b=y[0],g=y[1];return o((function(){if(!b){var n=setInterval((function(){v((function(n){var r=n.count+1;return t(t({},n),{},r%60==0?{minutes:n.minutes+1,seconds:0,count:r}:r%3600==0?{hours:n.hours+1,minutes:0,seconds:0,count:r}:r%86400==0?{days:n.days+1,hours:0,minutes:0,seconds:0,count:r}:{seconds:n.seconds+1,count:r})}))}),1e3);return function(){return clearInterval(n)}}}),[b]),t(t({},h),{},{paused:b,pause:function(){return g(!0)},start:function(){return g(!1)},reset:function(){return v(u(l))},toggle:function(){return g((function(n){return!n}))}})};export{e as useStopwatch};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as n,c as t}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useState as r,useEffect as o}from"react";var u=function(n){return n?{days:Math.floor(n/86400),hours:Math.floor(n%86400/3600),minutes:Math.floor(n%3600/60),seconds:Math.floor(n%60),count:n}:{days:0,hours:0,minutes:0,seconds:0,count:0}},e=function(){for(var e,s,c=arguments.length,i=new Array(c),a=0;a<c;a++)i[a]=arguments[a];var l=null!==(e="number"==typeof i[0]?i[0]:null===(s=i[0])||void 0===s?void 0:s.initialTime)&&void 0!==e?e:0,f="number"==typeof i[0]?i[1]:i[0],d=r(u(l)),m=n(d,2),h=m[0],v=m[1],p=r(!(null!=f&&f.enabled)),y=n(p,2),b=y[0],g=y[1];return o((function(){if(!b){var n=setInterval((function(){v((function(n){var r=n.count+1;return t(t({},n),{},r%60==0?{minutes:n.minutes+1,seconds:0,count:r}:r%3600==0?{hours:n.hours+1,minutes:0,seconds:0,count:r}:r%86400==0?{days:n.days+1,hours:0,minutes:0,seconds:0,count:r}:{seconds:n.seconds+1,count:r})}))}),1e3);return function(){return clearInterval(n)}}}),[b]),t(t({},h),{},{paused:b,pause:function(){return g(!0)},start:function(){return g(!1)},reset:function(){return v(u(l))},toggle:function(){return g((function(n){return!n}))}})};export{e as useStopwatch};
3
3
  //# sourceMappingURL=useStopwatch.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{b as e}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useSyncExternalStore as n}from"react";import{useIsomorphicLayoutEffect as t}from"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";var r=function(e){return window.dispatchEvent(new StorageEvent("storage",e))},o=function(e,n,t){var o=e.getItem(n);e.setItem(n,t),r({key:n,oldValue:o,newValue:t,storageArea:e})},i=function(e,n){var t=e.getItem(n);e.removeItem(n),r({key:n,oldValue:t,newValue:null,storageArea:e})},u=function(e,n){var t=e.getItem(n);if(t)return t},a=function(e){return window.addEventListener("storage",e),function(){return window.removeEventListener("storage",e)}},l=function(){},f=function(r,f){var c,s,d="object"===e(f)?f:void 0,v=d?null==d?void 0:d.initialValue:f,m=function(e){return null!=d&&d.serializer?d.serializer(e):JSON.stringify(e)},g=null!==(c=null==d?void 0:d.storage)&&void 0!==c?c:null===(s=window)||void 0===s?void 0:s.localStorage,w=function(e){if(null===e)return i(g,r);o(g,r,m(e))},p=function(){return i(g,r)},y=n(a,(function(){return u(g,r)}),l);return t((function(){void 0===u(g,r)&&void 0!==v&&o(g,r,m(v instanceof Function?v():v))}),[r]),"undefined"==typeof window?{value:v instanceof Function?v():v,set:w,remove:p}:{value:y?function(e){if(null!=d&&d.deserializer)return d.deserializer(e);if("undefined"!==e)try{return JSON.parse(e)}catch(n){return e}}(y):void 0,set:w,remove:p}};export{r as dispatchStorageEvent,f as useStorage};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{b as e}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useSyncExternalStore as n}from"react";import{useIsomorphicLayoutEffect as t}from"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";var r=function(e){return window.dispatchEvent(new StorageEvent("storage",e))},o=function(e,n,t){var o=e.getItem(n);e.setItem(n,t),r({key:n,oldValue:o,newValue:t,storageArea:e})},i=function(e,n){var t=e.getItem(n);e.removeItem(n),r({key:n,oldValue:t,newValue:null,storageArea:e})},u=function(e,n){var t=e.getItem(n);if(t)return t},a=function(e){return window.addEventListener("storage",e),function(){return window.removeEventListener("storage",e)}},l=function(){},f=function(r,f){var c,s,d="object"===e(f)?f:void 0,v=d?null==d?void 0:d.initialValue:f;if("undefined"==typeof window)return{value:v instanceof Function?v():v};var m=function(e){return null!=d&&d.serializer?d.serializer(e):JSON.stringify(e)},g=null!==(c=null==d?void 0:d.storage)&&void 0!==c?c:null===(s=window)||void 0===s?void 0:s.localStorage,w=n(a,(function(){return u(g,r)}),l);return t((function(){void 0===u(g,r)&&void 0!==v&&o(g,r,m(v instanceof Function?v():v))}),[r]),{value:w?function(e){if(null!=d&&d.deserializer)return d.deserializer(e);if("undefined"!==e)try{return JSON.parse(e)}catch(n){return e}}(w):void 0,set:function(e){if(null===e)return i(g,r);o(g,r,m(e))},remove:function(){return i(g,r)}}};export{r as dispatchStorageEvent,f as useStorage};
3
3
  //# sourceMappingURL=useStorage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useStorage.js","sources":["../../../../src/hooks/useStorage/useStorage.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react';\n\nimport { useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect';\n\n/* The use storage initial value type */\nexport type UseStorageInitialValue<Value> = (() => Value) | Value;\n\n/* The use storage options type */\nexport interface UseStorageOptions<Value> {\n /* The initial value of the storage */\n initialValue?: UseStorageInitialValue<Value>;\n /* The storage to be used */\n storage?: Storage;\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 storage return type */\nexport interface UseStorageReturn<Value> {\n /* The value of the storage */\n value: Value;\n /* The error state of the storage */\n remove: () => void;\n /* The loading state of the storage */\n set: (value: Value) => void;\n}\n\nexport const dispatchStorageEvent = (params: Partial<StorageEvent>) =>\n window.dispatchEvent(new StorageEvent('storage', params));\n\nconst setStorageItem = (storage: Storage, key: string, value: string) => {\n const oldValue = storage.getItem(key);\n\n storage.setItem(key, value);\n dispatchStorageEvent({ key, oldValue, newValue: value, storageArea: storage });\n};\n\nconst removeStorageItem = (storage: Storage, key: string) => {\n const oldValue = storage.getItem(key);\n\n storage.removeItem(key);\n dispatchStorageEvent({ key, oldValue, newValue: null, storageArea: storage });\n};\n\nconst getStorageItem = (storage: Storage, key: string) => {\n const value = storage.getItem(key);\n if (!value) return undefined;\n return value;\n};\n\nconst storageSubscribe = (callback: () => void) => {\n window.addEventListener('storage', callback);\n return () => window.removeEventListener('storage', callback);\n};\n\nconst getServerSnapshot = () => undefined;\n\n/**\n * @name useStorage\n * @description - Hook that manages storage value\n * @category Utilities\n *\n * @param {string} key The key of the storage\n * @param {(value: Value) => string} [params.serializer] The serializer function\n * @param {(value: string) => Value} [params.deserializer] The deserializer function\n * @param {Storage} [params.storage] The storage\n * @param {UseStorageInitialValue<Value>} [params.initialValue] The initial value of the storage\n * @returns {UseStorageReturn<Value>} The value and the set function\n *\n * @example\n * const { value, set, remove } = useStorage('key', 'value');\n */\nexport const useStorage = <Value>(\n key: string,\n params?: UseStorageInitialValue<Value> | UseStorageOptions<Value>\n) => {\n const options = (typeof params === 'object' ? params : undefined) as UseStorageOptions<Value>;\n const initialValue = (options ? options?.initialValue : params) as UseStorageInitialValue<Value>;\n\n const serializer = (value: Value) => {\n if (options?.serializer) return options.serializer(value);\n return JSON.stringify(value);\n };\n\n const storage = options?.storage ?? window?.localStorage;\n\n const set = (value: Value) => {\n if (value === null) return removeStorageItem(storage, key);\n setStorageItem(storage, key, serializer(value));\n };\n const remove = () => removeStorageItem(storage, key);\n\n const deserializer = (value: string) => {\n if (options?.deserializer) return options.deserializer(value);\n\n if (value === 'undefined') {\n return undefined as unknown as Value;\n }\n\n try {\n return JSON.parse(value) as Value;\n } catch {\n return value as Value;\n }\n };\n\n const getSnapshot = () => getStorageItem(storage, key);\n const store = useSyncExternalStore(storageSubscribe, getSnapshot, getServerSnapshot);\n\n useIsomorphicLayoutEffect(() => {\n const value = getStorageItem(storage, key);\n if (value === undefined && initialValue !== undefined) {\n setStorageItem(\n storage,\n key,\n serializer(initialValue instanceof Function ? initialValue() : initialValue)\n );\n }\n }, [key]);\n\n if (typeof window === 'undefined')\n return {\n value: initialValue instanceof Function ? initialValue() : initialValue,\n set,\n remove\n };\n\n return {\n value: store ? deserializer(store) : undefined,\n set,\n remove\n };\n};\n"],"names":["dispatchStorageEvent","params","window","dispatchEvent","StorageEvent","setStorageItem","storage","key","value","oldValue","getItem","setItem","newValue","storageArea","removeStorageItem","removeItem","getStorageItem","storageSubscribe","callback","addEventListener","removeEventListener","getServerSnapshot","useStorage","_options$storage","_window","options","_typeof","undefined","initialValue","serializer","JSON","stringify","localStorage","set","remove","store","useSyncExternalStore","useIsomorphicLayoutEffect","Function","deserializer","parse","_unused"],"mappings":";uNA6BaA,EAAuB,SAACC,GAA6B,OAChEC,OAAOC,cAAc,IAAIC,aAAa,UAAWH,GAAQ,EAErDI,EAAiB,SAACC,EAAkBC,EAAaC,GACrD,IAAMC,EAAWH,EAAQI,QAAQH,GAEjCD,EAAQK,QAAQJ,EAAKC,GACrBR,EAAqB,CAAEO,IAAAA,EAAKE,SAAAA,EAAUG,SAAUJ,EAAOK,YAAaP,GACtE,EAEMQ,EAAoB,SAACR,EAAkBC,GAC3C,IAAME,EAAWH,EAAQI,QAAQH,GAEjCD,EAAQS,WAAWR,GACnBP,EAAqB,CAAEO,IAAAA,EAAKE,SAAAA,EAAUG,SAAU,KAAMC,YAAaP,GACrE,EAEMU,EAAiB,SAACV,EAAkBC,GACxC,IAAMC,EAAQF,EAAQI,QAAQH,GAC9B,GAAKC,EACL,OAAOA,CACT,EAEMS,EAAmB,SAACC,GAExB,OADAhB,OAAOiB,iBAAiB,UAAWD,GAC5B,WAAA,OAAMhB,OAAOkB,oBAAoB,UAAWF,EAAS,CAC9D,EAEMG,EAAoB,WAAe,EAiB5BC,EAAa,SACxBf,EACAN,GACG,IAAAsB,EAAAC,EACGC,EAA6B,WAAlBC,EAAOzB,GAAsBA,OAAS0B,EACjDC,EAAgBH,EAAUA,aAAO,EAAPA,EAASG,aAAe3B,EAElD4B,EAAa,SAACrB,GAClB,OAAIiB,SAAAA,EAASI,WAAmBJ,EAAQI,WAAWrB,GAC5CsB,KAAKC,UAAUvB,EACvB,EAEKF,EAA0B,QAAnBiB,EAAGE,aAAO,EAAPA,EAASnB,eAAOiB,IAAAA,EAAAA,UAAAC,EAAItB,cAAM,IAAAsB,OAAA,EAANA,EAAQQ,aAEtCC,EAAM,SAACzB,GACX,GAAc,OAAVA,EAAgB,OAAOM,EAAkBR,EAASC,GACtDF,EAAeC,EAASC,EAAKsB,EAAWrB,GACzC,EACK0B,EAAS,WAAH,OAASpB,EAAkBR,EAASC,EAAI,EAiB9C4B,EAAQC,EAAqBnB,GADf,WAAH,OAASD,EAAeV,EAASC,EAAI,GACYc,GAalE,OAXAgB,GAA0B,gBAEVV,IADAX,EAAeV,EAASC,SACMoB,IAAjBC,GACzBvB,EACEC,EACAC,EACAsB,EAAWD,aAAwBU,SAAWV,IAAiBA,GAGrE,GAAG,CAACrB,IAEkB,oBAAXL,OACF,CACLM,MAAOoB,aAAwBU,SAAWV,IAAiBA,EAC3DK,IAAAA,EACAC,OAAAA,GAGG,CACL1B,MAAO2B,EApCY,SAAC3B,GACpB,GAAIiB,SAAAA,EAASc,aAAc,OAAOd,EAAQc,aAAa/B,GAEvD,GAAc,cAAVA,EAIJ,IACE,OAAOsB,KAAKU,MAAMhC,EACnB,CAAC,MAAAiC,GACA,OAAOjC,CACT,CACD,CAwBgB+B,CAAaJ,QAASR,EACrCM,IAAAA,EACAC,OAAAA,EAEJ"}
1
+ {"version":3,"file":"useStorage.js","sources":["../../../../src/hooks/useStorage/useStorage.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react';\n\nimport { useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect';\n\n/* The use storage initial value type */\nexport type UseStorageInitialValue<Value> = (() => Value) | Value;\n\n/* The use storage options type */\nexport interface UseStorageOptions<Value> {\n /* The initial value of the storage */\n initialValue?: UseStorageInitialValue<Value>;\n /* The storage to be used */\n storage?: Storage;\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 storage return type */\nexport interface UseStorageReturn<Value> {\n /* The value of the storage */\n value: Value;\n /* The error state of the storage */\n remove: () => void;\n /* The loading state of the storage */\n set: (value: Value) => void;\n}\n\nexport const dispatchStorageEvent = (params: Partial<StorageEvent>) =>\n window.dispatchEvent(new StorageEvent('storage', params));\n\nconst setStorageItem = (storage: Storage, key: string, value: string) => {\n const oldValue = storage.getItem(key);\n\n storage.setItem(key, value);\n dispatchStorageEvent({ key, oldValue, newValue: value, storageArea: storage });\n};\n\nconst removeStorageItem = (storage: Storage, key: string) => {\n const oldValue = storage.getItem(key);\n\n storage.removeItem(key);\n dispatchStorageEvent({ key, oldValue, newValue: null, storageArea: storage });\n};\n\nconst getStorageItem = (storage: Storage, key: string) => {\n const value = storage.getItem(key);\n if (!value) return undefined;\n return value;\n};\n\nconst storageSubscribe = (callback: () => void) => {\n window.addEventListener('storage', callback);\n return () => window.removeEventListener('storage', callback);\n};\n\nconst getServerSnapshot = () => undefined;\n\n/**\n * @name useStorage\n * @description - Hook that manages storage value\n * @category Utilities\n *\n * @param {string} key The key of the storage\n * @param {(value: Value) => string} [params.serializer] The serializer function\n * @param {(value: string) => Value} [params.deserializer] The deserializer function\n * @param {Storage} [params.storage] The storage\n * @param {UseStorageInitialValue<Value>} [params.initialValue] The initial value of the storage\n * @returns {UseStorageReturn<Value>} The value and the set function\n *\n * @example\n * const { value, set, remove } = useStorage('key', 'value');\n */\nexport const useStorage = <Value>(\n key: string,\n params?: UseStorageInitialValue<Value> | UseStorageOptions<Value>\n) => {\n const options = (typeof params === 'object' ? params : undefined) as UseStorageOptions<Value>;\n const initialValue = (options ? options?.initialValue : params) as UseStorageInitialValue<Value>;\n\n if (typeof window === 'undefined')\n return {\n value: initialValue instanceof Function ? initialValue() : initialValue\n } as UseStorageReturn<Value>;\n\n const serializer = (value: Value) => {\n if (options?.serializer) return options.serializer(value);\n return JSON.stringify(value);\n };\n\n const storage = options?.storage ?? window?.localStorage;\n\n const set = (value: Value) => {\n if (value === null) return removeStorageItem(storage, key);\n setStorageItem(storage, key, serializer(value));\n };\n const remove = () => removeStorageItem(storage, key);\n\n const deserializer = (value: string) => {\n if (options?.deserializer) return options.deserializer(value);\n\n if (value === 'undefined') {\n return undefined as unknown as Value;\n }\n\n try {\n return JSON.parse(value) as Value;\n } catch {\n return value as Value;\n }\n };\n\n const getSnapshot = () => getStorageItem(storage, key);\n const store = useSyncExternalStore(storageSubscribe, getSnapshot, getServerSnapshot);\n\n useIsomorphicLayoutEffect(() => {\n const value = getStorageItem(storage, key);\n if (value === undefined && initialValue !== undefined) {\n setStorageItem(\n storage,\n key,\n serializer(initialValue instanceof Function ? initialValue() : initialValue)\n );\n }\n }, [key]);\n\n return {\n value: store ? deserializer(store) : undefined,\n set,\n remove\n };\n};\n"],"names":["dispatchStorageEvent","params","window","dispatchEvent","StorageEvent","setStorageItem","storage","key","value","oldValue","getItem","setItem","newValue","storageArea","removeStorageItem","removeItem","getStorageItem","storageSubscribe","callback","addEventListener","removeEventListener","getServerSnapshot","useStorage","_options$storage","_window","options","_typeof","undefined","initialValue","Function","serializer","JSON","stringify","localStorage","store","useSyncExternalStore","useIsomorphicLayoutEffect","deserializer","parse","_unused","set","remove"],"mappings":";uNA6BaA,EAAuB,SAACC,GAA6B,OAChEC,OAAOC,cAAc,IAAIC,aAAa,UAAWH,GAAQ,EAErDI,EAAiB,SAACC,EAAkBC,EAAaC,GACrD,IAAMC,EAAWH,EAAQI,QAAQH,GAEjCD,EAAQK,QAAQJ,EAAKC,GACrBR,EAAqB,CAAEO,IAAAA,EAAKE,SAAAA,EAAUG,SAAUJ,EAAOK,YAAaP,GACtE,EAEMQ,EAAoB,SAACR,EAAkBC,GAC3C,IAAME,EAAWH,EAAQI,QAAQH,GAEjCD,EAAQS,WAAWR,GACnBP,EAAqB,CAAEO,IAAAA,EAAKE,SAAAA,EAAUG,SAAU,KAAMC,YAAaP,GACrE,EAEMU,EAAiB,SAACV,EAAkBC,GACxC,IAAMC,EAAQF,EAAQI,QAAQH,GAC9B,GAAKC,EACL,OAAOA,CACT,EAEMS,EAAmB,SAACC,GAExB,OADAhB,OAAOiB,iBAAiB,UAAWD,GAC5B,WAAA,OAAMhB,OAAOkB,oBAAoB,UAAWF,EAAS,CAC9D,EAEMG,EAAoB,WAAe,EAiB5BC,EAAa,SACxBf,EACAN,GACG,IAAAsB,EAAAC,EACGC,EAA6B,WAAlBC,EAAOzB,GAAsBA,OAAS0B,EACjDC,EAAgBH,EAAUA,aAAO,EAAPA,EAASG,aAAe3B,EAExD,GAAsB,oBAAXC,OACT,MAAO,CACLM,MAAOoB,aAAwBC,SAAWD,IAAiBA,GAG/D,IAAME,EAAa,SAACtB,GAClB,OAAIiB,SAAAA,EAASK,WAAmBL,EAAQK,WAAWtB,GAC5CuB,KAAKC,UAAUxB,EACvB,EAEKF,EAA0B,QAAnBiB,EAAGE,aAAO,EAAPA,EAASnB,eAAOiB,IAAAA,EAAAA,UAAAC,EAAItB,cAAM,IAAAsB,OAAA,EAANA,EAAQS,aAuBtCC,EAAQC,EAAqBlB,GADf,WAAH,OAASD,EAAeV,EAASC,EAAI,GACYc,GAalE,OAXAe,GAA0B,gBAEVT,IADAX,EAAeV,EAASC,SACMoB,IAAjBC,GACzBvB,EACEC,EACAC,EACAuB,EAAWF,aAAwBC,SAAWD,IAAiBA,GAGrE,GAAG,CAACrB,IAEG,CACLC,MAAO0B,EA7BY,SAAC1B,GACpB,GAAIiB,SAAAA,EAASY,aAAc,OAAOZ,EAAQY,aAAa7B,GAEvD,GAAc,cAAVA,EAIJ,IACE,OAAOuB,KAAKO,MAAM9B,EACnB,CAAC,MAAA+B,GACA,OAAO/B,CACT,CACD,CAiBgB6B,CAAaH,QAASP,EACrCa,IApCU,SAAChC,GACX,GAAc,OAAVA,EAAgB,OAAOM,EAAkBR,EAASC,GACtDF,EAAeC,EAASC,EAAKuB,EAAWtB,GACzC,EAkCCiC,OAjCa,WAAH,OAAS3B,EAAkBR,EAASC,EAAI,EAmCtD"}
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as t}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useState as r}from"react";import{getElement as e}from"../../utils/helpers/getElement.js";import{useIsomorphicLayoutEffect as o}from"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";import{useRefState as i}from"../useRefState/useRefState.js";var n=function(){var n,u="string"==typeof(arguments.length<=0?void 0:arguments[0])&&["auto","ltr","rtl"].includes(arguments.length<=0?void 0:arguments[0])||arguments.length<=0?void 0:arguments[0],l=null!==(n=u?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0])&&void 0!==n?n:"ltr",s=i(),v=function(){var t,r=u?e(u):s.current;return null!==(t=null==r?void 0:r.getAttribute("dir"))&&void 0!==t?t:l},f=r(v()),a=t(f,2),c=a[0],m=a[1],d=function(){var t=u?e(u):s.current;t&&(null==t||t.removeAttribute("dir"))},p=function(t){var r=u?e(u):s.current;r&&(m(t),r.setAttribute("dir",t))};return o((function(){if(u||s){var t=u?e(u):s.current;if(t){var r=v();t.setAttribute("dir",r),m(r);var o=new MutationObserver(v);return o.observe(t,{attributes:!0}),function(){o.disconnect()}}}}),[s.current,u]),u?{value:c,set:p,remove:d}:{ref:s,value:c,set:p,remove:d}};export{n as useTextDirection};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as t}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useState as r}from"react";import{getElement as e}from"../../utils/helpers/getElement.js";import{useIsomorphicLayoutEffect as o}from"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";import{useRefState as i}from"../useRefState/useRefState.js";var n=function(){var n,u="string"==typeof(arguments.length<=0?void 0:arguments[0])&&["auto","ltr","rtl"].includes(arguments.length<=0?void 0:arguments[0])||arguments.length<=0?void 0:arguments[0],l=null!==(n=u?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0])&&void 0!==n?n:"ltr",s=i(),v=function(){var t,r=u?e(u):s.current;return null!==(t=null==r?void 0:r.getAttribute("dir"))&&void 0!==t?t:l},f=r(v()),a=t(f,2),c=a[0],m=a[1],d=function(){var t=u?e(u):s.current;t&&(null==t||t.removeAttribute("dir"))},p=function(t){var r=u?e(u):s.current;r&&(m(t),r.setAttribute("dir",t))};return o((function(){if(u||s){var t=u?e(u):s.current;if(t){var r=v();t.setAttribute("dir",r),m(r);var o=new MutationObserver(v);return o.observe(t,{attributes:!0}),function(){o.disconnect()}}}}),[s.current,u]),u?{value:c,set:p,remove:d}:{ref:s,value:c,set:p,remove:d}};export{n as useTextDirection};
3
3
  //# sourceMappingURL=useTextDirection.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as e}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useState as n,useEffect as t}from"react";import{useRerender as r}from"../useRerender/useRerender.js";var o=function(e){var n,t=null!==(n=e.rangeCount)&&void 0!==n?n:0;return Array.from({length:t},(function(n,t){return e.getRangeAt(t)}))},u=function(){var u,i=r(),c=n("undefined"!=typeof document?document.getSelection():null),l=e(c,2),a=l[0],d=l[1];t((function(){var e=function(){d(document.getSelection()),i()};return document.addEventListener("selectionchange",e),function(){return document.removeEventListener("selectionchange",e)}}),[]);var m=null!==(u=null==a?void 0:a.toString())&&void 0!==u?u:"",f=a?o(a):[],g=f.map((function(e){return e.getBoundingClientRect()}));return{text:m,ranges:f,rects:g,selection:a}};export{o as getRangesSelection,u as useTextSelection};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as e}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useState as n,useEffect as t}from"react";import{useRerender as r}from"../useRerender/useRerender.js";var o=function(e){var n,t=null!==(n=e.rangeCount)&&void 0!==n?n:0;return Array.from({length:t},(function(n,t){return e.getRangeAt(t)}))},u=function(){var u,i=r(),c=n("undefined"!=typeof document?document.getSelection():null),l=e(c,2),a=l[0],d=l[1];t((function(){var e=function(){d(document.getSelection()),i()};return document.addEventListener("selectionchange",e),function(){return document.removeEventListener("selectionchange",e)}}),[]);var m=null!==(u=null==a?void 0:a.toString())&&void 0!==u?u:"",f=a?o(a):[],g=f.map((function(e){return e.getBoundingClientRect()}));return{text:m,ranges:f,rects:g,selection:a}};export{o as getRangesSelection,u as useTextSelection};
3
3
  //# sourceMappingURL=useTextSelection.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
2
  import{useMemo as r}from"react";import{throttle as t}from"../../utils/helpers/throttle.js";import{useEvent as e}from"../useEvent/useEvent.js";var o=function(o,n){var u=e(o);return r((function(){return t(u,n)}),[n])};export{o as useThrottleCallback};
3
3
  //# sourceMappingURL=useThrottleCallback.js.map
@@ -1,3 +1,3 @@
1
- /* @license @siberiacancode/reactuse v0.0.93 */
2
- import{_ as r}from"../../_rollupPluginBabelHelpers-BQehtgCo.js";import{useRef as t,useState as e,useEffect as o}from"react";import{useThrottleCallback as l}from"../useThrottleCallback/useThrottleCallback.js";import"../../utils/helpers/throttle.js";import"../useEvent/useEvent.js";var s=function(s,u){var n=t(s),a=e(s),i=r(a,2),p=i[0],m=i[1],c=l(m,u);return o((function(){n.current!==s&&(c(s),n.current=s)}),[s]),p};export{s as useThrottleValue};
1
+ /* @license @siberiacancode/reactuse v0.0.94 */
2
+ import{_ as r}from"../../_rollupPluginBabelHelpers-Dp_7XWBJ.js";import{useRef as t,useState as e,useEffect as o}from"react";import{useThrottleCallback as l}from"../useThrottleCallback/useThrottleCallback.js";import"../../utils/helpers/throttle.js";import"../useEvent/useEvent.js";var s=function(s,u){var n=t(s),a=e(s),i=r(a,2),p=i[0],m=i[1],c=l(m,u);return o((function(){n.current!==s&&(c(s),n.current=s)}),[s]),p};export{s as useThrottleValue};
3
3
  //# sourceMappingURL=useThrottleValue.js.map