react-simplikit 0.1.0 → 0.3.0

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 (161) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +6 -73
  3. package/dist/hooks/useAsyncEffect/useAsyncEffect.cjs +2 -2
  4. package/dist/hooks/useAsyncEffect/useAsyncEffect.d.cts +2 -2
  5. package/dist/hooks/useAsyncEffect/useAsyncEffect.d.mts +2 -2
  6. package/dist/hooks/useAsyncEffect/useAsyncEffect.mjs +2 -2
  7. package/dist/{mobile/hooks → hooks}/useAvoidKeyboard/useAvoidKeyboard.cjs +1 -1
  8. package/dist/{mobile/hooks → hooks}/useAvoidKeyboard/useAvoidKeyboard.d.cts +1 -1
  9. package/dist/{mobile/hooks → hooks}/useAvoidKeyboard/useAvoidKeyboard.d.mts +1 -1
  10. package/dist/{mobile/hooks → hooks}/useAvoidKeyboard/useAvoidKeyboard.mjs +1 -1
  11. package/dist/{mobile/hooks → hooks}/useBodyScrollLock/useBodyScrollLock.cjs +1 -1
  12. package/dist/{mobile/hooks → hooks}/useBodyScrollLock/useBodyScrollLock.d.cts +1 -1
  13. package/dist/{mobile/hooks → hooks}/useBodyScrollLock/useBodyScrollLock.d.mts +1 -1
  14. package/dist/{mobile/hooks → hooks}/useBodyScrollLock/useBodyScrollLock.mjs +1 -1
  15. package/dist/hooks/useBooleanState/useBooleanState.cjs +3 -3
  16. package/dist/hooks/useBooleanState/useBooleanState.d.cts +3 -2
  17. package/dist/hooks/useBooleanState/useBooleanState.d.mts +3 -2
  18. package/dist/hooks/useBooleanState/useBooleanState.mjs +3 -3
  19. package/dist/hooks/useDebounce/debounce.cjs +1 -0
  20. package/dist/hooks/useDebounce/debounce.mjs +1 -0
  21. package/dist/hooks/useDebounce/useDebounce.cjs +1 -1
  22. package/dist/hooks/useDebounce/useDebounce.mjs +1 -1
  23. package/dist/hooks/useDebouncedCallback/useDebouncedCallback.cjs +31 -36
  24. package/dist/hooks/useDebouncedCallback/useDebouncedCallback.d.cts +17 -7
  25. package/dist/hooks/useDebouncedCallback/useDebouncedCallback.d.mts +17 -7
  26. package/dist/hooks/useDebouncedCallback/useDebouncedCallback.mjs +32 -37
  27. package/dist/hooks/useDebouncedValue/useDebouncedValue.cjs +64 -0
  28. package/dist/hooks/useDebouncedValue/useDebouncedValue.d.cts +49 -0
  29. package/dist/hooks/useDebouncedValue/useDebouncedValue.d.mts +49 -0
  30. package/dist/hooks/useDebouncedValue/useDebouncedValue.mjs +64 -0
  31. package/dist/hooks/useDoubleClick/useDoubleClick.cjs +0 -4
  32. package/dist/hooks/useDoubleClick/useDoubleClick.d.cts +0 -4
  33. package/dist/hooks/useDoubleClick/useDoubleClick.d.mts +0 -4
  34. package/dist/hooks/useDoubleClick/useDoubleClick.mjs +0 -4
  35. package/dist/hooks/useGeolocation/useGeolocation.cjs +0 -4
  36. package/dist/hooks/useGeolocation/useGeolocation.d.cts +0 -4
  37. package/dist/hooks/useGeolocation/useGeolocation.d.mts +0 -4
  38. package/dist/hooks/useGeolocation/useGeolocation.mjs +0 -4
  39. package/dist/hooks/useImpressionRef/useImpressionRef.cjs +25 -7
  40. package/dist/hooks/useImpressionRef/useImpressionRef.d.cts +0 -4
  41. package/dist/hooks/useImpressionRef/useImpressionRef.d.mts +0 -4
  42. package/dist/hooks/useImpressionRef/useImpressionRef.mjs +26 -8
  43. package/dist/hooks/useInputState/useInputState.cjs +1 -1
  44. package/dist/hooks/useInputState/useInputState.d.cts +3 -2
  45. package/dist/hooks/useInputState/useInputState.d.mts +3 -2
  46. package/dist/hooks/useInputState/useInputState.mjs +1 -1
  47. package/dist/hooks/useIntersectionObserver/useIntersectionObserver.cjs +9 -8
  48. package/dist/hooks/useIntersectionObserver/useIntersectionObserver.d.cts +1 -5
  49. package/dist/hooks/useIntersectionObserver/useIntersectionObserver.d.mts +1 -5
  50. package/dist/hooks/useIntersectionObserver/useIntersectionObserver.mjs +9 -8
  51. package/dist/{mobile/hooks → hooks}/useKeyboardHeight/useKeyboardHeight.cjs +1 -1
  52. package/dist/{mobile/hooks → hooks}/useKeyboardHeight/useKeyboardHeight.d.cts +1 -1
  53. package/dist/{mobile/hooks → hooks}/useKeyboardHeight/useKeyboardHeight.d.mts +1 -1
  54. package/dist/{mobile/hooks → hooks}/useKeyboardHeight/useKeyboardHeight.mjs +1 -1
  55. package/dist/hooks/useList/useList.cjs +11 -8
  56. package/dist/hooks/useList/useList.d.cts +12 -9
  57. package/dist/hooks/useList/useList.d.mts +12 -9
  58. package/dist/hooks/useList/useList.mjs +11 -8
  59. package/dist/hooks/useLongPress/useLongPress.cjs +3 -4
  60. package/dist/hooks/useLongPress/useLongPress.d.cts +0 -4
  61. package/dist/hooks/useLongPress/useLongPress.d.mts +0 -4
  62. package/dist/hooks/useLongPress/useLongPress.mjs +4 -5
  63. package/dist/{mobile/hooks → hooks}/useNetworkStatus/useNetworkStatus.cjs +1 -1
  64. package/dist/{mobile/hooks → hooks}/useNetworkStatus/useNetworkStatus.d.cts +1 -1
  65. package/dist/{mobile/hooks → hooks}/useNetworkStatus/useNetworkStatus.d.mts +1 -1
  66. package/dist/{mobile/hooks → hooks}/useNetworkStatus/useNetworkStatus.mjs +1 -1
  67. package/dist/hooks/useOutsideClickEffect/useOutsideClickEffect.cjs +0 -4
  68. package/dist/hooks/useOutsideClickEffect/useOutsideClickEffect.d.cts +0 -4
  69. package/dist/hooks/useOutsideClickEffect/useOutsideClickEffect.d.mts +0 -4
  70. package/dist/hooks/useOutsideClickEffect/useOutsideClickEffect.mjs +0 -4
  71. package/dist/{mobile/hooks → hooks}/usePageVisibility/usePageVisibility.cjs +3 -1
  72. package/dist/{mobile/hooks → hooks}/usePageVisibility/usePageVisibility.d.cts +3 -1
  73. package/dist/{mobile/hooks → hooks}/usePageVisibility/usePageVisibility.d.mts +3 -1
  74. package/dist/{mobile/hooks → hooks}/usePageVisibility/usePageVisibility.mjs +3 -1
  75. package/dist/hooks/useRefEffect/useRefEffect.cjs +6 -4
  76. package/dist/hooks/useRefEffect/useRefEffect.mjs +7 -5
  77. package/dist/{mobile/hooks → hooks}/useSafeAreaInset/useSafeAreaInset.cjs +1 -1
  78. package/dist/{mobile/hooks → hooks}/useSafeAreaInset/useSafeAreaInset.d.cts +1 -1
  79. package/dist/{mobile/hooks → hooks}/useSafeAreaInset/useSafeAreaInset.d.mts +1 -1
  80. package/dist/{mobile/hooks → hooks}/useSafeAreaInset/useSafeAreaInset.mjs +1 -1
  81. package/dist/{mobile/hooks → hooks}/useScrollDirection/useScrollDirection.cjs +1 -1
  82. package/dist/{mobile/hooks → hooks}/useScrollDirection/useScrollDirection.d.cts +1 -1
  83. package/dist/{mobile/hooks → hooks}/useScrollDirection/useScrollDirection.d.mts +1 -1
  84. package/dist/{mobile/hooks → hooks}/useScrollDirection/useScrollDirection.mjs +1 -1
  85. package/dist/hooks/useSet/useSet.cjs +11 -2
  86. package/dist/hooks/useSet/useSet.d.cts +11 -2
  87. package/dist/hooks/useSet/useSet.d.mts +11 -2
  88. package/dist/hooks/useSet/useSet.mjs +11 -2
  89. package/dist/hooks/useStorageState/useStorageState.cjs +1 -1
  90. package/dist/hooks/useStorageState/useStorageState.d.cts +0 -4
  91. package/dist/hooks/useStorageState/useStorageState.d.mts +0 -4
  92. package/dist/hooks/useStorageState/useStorageState.mjs +1 -1
  93. package/dist/hooks/useThrottle/throttle.cjs +22 -5
  94. package/dist/hooks/useThrottle/throttle.mjs +22 -5
  95. package/dist/hooks/useThrottledCallback/useThrottledCallback.cjs +22 -37
  96. package/dist/hooks/useThrottledCallback/useThrottledCallback.d.cts +18 -11
  97. package/dist/hooks/useThrottledCallback/useThrottledCallback.d.mts +18 -11
  98. package/dist/hooks/useThrottledCallback/useThrottledCallback.mjs +23 -38
  99. package/dist/hooks/useThrottledValue/useThrottledValue.cjs +66 -0
  100. package/dist/hooks/useThrottledValue/useThrottledValue.d.cts +48 -0
  101. package/dist/hooks/useThrottledValue/useThrottledValue.d.mts +48 -0
  102. package/dist/hooks/useThrottledValue/useThrottledValue.mjs +66 -0
  103. package/dist/hooks/useVisibilityEvent/useVisibilityEvent.cjs +2 -4
  104. package/dist/hooks/useVisibilityEvent/useVisibilityEvent.d.cts +2 -4
  105. package/dist/hooks/useVisibilityEvent/useVisibilityEvent.d.mts +2 -4
  106. package/dist/hooks/useVisibilityEvent/useVisibilityEvent.mjs +2 -4
  107. package/dist/{mobile/hooks → hooks}/useVisualViewport/useVisualViewport.cjs +1 -1
  108. package/dist/{mobile/hooks → hooks}/useVisualViewport/useVisualViewport.d.cts +1 -1
  109. package/dist/{mobile/hooks → hooks}/useVisualViewport/useVisualViewport.d.mts +1 -1
  110. package/dist/{mobile/hooks → hooks}/useVisualViewport/useVisualViewport.mjs +1 -1
  111. package/dist/index.cjs +23 -19
  112. package/dist/index.d.cts +21 -19
  113. package/dist/index.d.mts +21 -19
  114. package/dist/index.mjs +22 -20
  115. package/dist/{mobile/utils → utils}/disableBodyScrollLock/disableBodyScrollLock.cjs +1 -1
  116. package/dist/{mobile/utils → utils}/disableBodyScrollLock/disableBodyScrollLock.d.cts +1 -1
  117. package/dist/{mobile/utils → utils}/disableBodyScrollLock/disableBodyScrollLock.d.mts +1 -1
  118. package/dist/{mobile/utils → utils}/disableBodyScrollLock/disableBodyScrollLock.mjs +1 -1
  119. package/dist/{mobile/utils → utils}/enableBodyScrollLock/enableBodyScrollLock.cjs +1 -1
  120. package/dist/{mobile/utils → utils}/enableBodyScrollLock/enableBodyScrollLock.d.cts +1 -1
  121. package/dist/{mobile/utils → utils}/enableBodyScrollLock/enableBodyScrollLock.d.mts +1 -1
  122. package/dist/{mobile/utils → utils}/enableBodyScrollLock/enableBodyScrollLock.mjs +1 -1
  123. package/dist/{mobile/utils → utils}/getKeyboardHeight/getKeyboardHeight.cjs +1 -1
  124. package/dist/{mobile/utils → utils}/getKeyboardHeight/getKeyboardHeight.d.cts +1 -1
  125. package/dist/{mobile/utils → utils}/getKeyboardHeight/getKeyboardHeight.d.mts +1 -1
  126. package/dist/{mobile/utils → utils}/getKeyboardHeight/getKeyboardHeight.mjs +1 -1
  127. package/dist/{mobile/utils → utils}/getSafeAreaInset/getSafeAreaInset.cjs +1 -1
  128. package/dist/{mobile/utils → utils}/getSafeAreaInset/getSafeAreaInset.d.cts +1 -1
  129. package/dist/{mobile/utils → utils}/getSafeAreaInset/getSafeAreaInset.d.mts +1 -1
  130. package/dist/{mobile/utils → utils}/getSafeAreaInset/getSafeAreaInset.mjs +1 -1
  131. package/dist/{mobile/utils → utils}/isAndroid/isAndroid.cjs +1 -1
  132. package/dist/{mobile/utils → utils}/isAndroid/isAndroid.d.cts +1 -1
  133. package/dist/{mobile/utils → utils}/isAndroid/isAndroid.d.mts +1 -1
  134. package/dist/{mobile/utils → utils}/isAndroid/isAndroid.mjs +1 -1
  135. package/dist/{mobile/utils → utils}/isIOS/isIOS.cjs +1 -1
  136. package/dist/{mobile/utils → utils}/isIOS/isIOS.d.cts +1 -1
  137. package/dist/{mobile/utils → utils}/isIOS/isIOS.d.mts +1 -1
  138. package/dist/{mobile/utils → utils}/isIOS/isIOS.mjs +1 -1
  139. package/dist/{mobile/utils → utils}/isKeyboardVisible/isKeyboardVisible.cjs +1 -1
  140. package/dist/{mobile/utils → utils}/isKeyboardVisible/isKeyboardVisible.d.cts +1 -1
  141. package/dist/{mobile/utils → utils}/isKeyboardVisible/isKeyboardVisible.d.mts +1 -1
  142. package/dist/{mobile/utils → utils}/isKeyboardVisible/isKeyboardVisible.mjs +1 -1
  143. package/dist/{mobile/utils → utils}/isServer/isServer.cjs +1 -1
  144. package/dist/{mobile/utils → utils}/isServer/isServer.d.cts +1 -1
  145. package/dist/{mobile/utils → utils}/isServer/isServer.d.mts +1 -1
  146. package/dist/{mobile/utils → utils}/isServer/isServer.mjs +1 -1
  147. package/dist/utils/mergeProps/mergeProps.cjs +1 -1
  148. package/dist/utils/mergeProps/mergeProps.d.cts +1 -1
  149. package/dist/utils/mergeProps/mergeProps.d.mts +1 -1
  150. package/dist/utils/mergeProps/mergeProps.mjs +1 -1
  151. package/dist/utils/mergeRefs/mergeRefs.cjs +1 -1
  152. package/dist/utils/mergeRefs/mergeRefs.d.cts +1 -1
  153. package/dist/utils/mergeRefs/mergeRefs.d.mts +1 -1
  154. package/dist/utils/mergeRefs/mergeRefs.mjs +1 -1
  155. package/dist/{mobile/utils → utils}/subscribeKeyboardHeight/subscribeKeyboardHeight.cjs +1 -1
  156. package/dist/{mobile/utils → utils}/subscribeKeyboardHeight/subscribeKeyboardHeight.d.cts +1 -1
  157. package/dist/{mobile/utils → utils}/subscribeKeyboardHeight/subscribeKeyboardHeight.d.mts +1 -1
  158. package/dist/{mobile/utils → utils}/subscribeKeyboardHeight/subscribeKeyboardHeight.mjs +1 -1
  159. package/package.json +2 -4
  160. /package/dist/{mobile/hooks → hooks}/useAvoidKeyboard/index.d.cts +0 -0
  161. /package/dist/{mobile/hooks → hooks}/useAvoidKeyboard/index.d.mts +0 -0
@@ -1,13 +1,10 @@
1
1
  "use client";
2
2
  const require_usePreservedCallback = require("../usePreservedCallback/usePreservedCallback.cjs");
3
+ const require_usePreservedReference = require("../usePreservedReference/usePreservedReference.cjs");
3
4
  const require_useRefEffect = require("../useRefEffect/useRefEffect.cjs");
4
5
  let react = require("react");
5
6
  //#region src/hooks/useIntersectionObserver/useIntersectionObserver.ts
6
7
  /**
7
- * @deprecated This hook is deprecated as it depends on browser-specific APIs (IntersectionObserver).
8
- * react-simplikit is now focused on platform-independent, pure state/logic hooks.
9
- * This hook will be removed in a future major version.
10
- *
11
8
  * @description
12
9
  * `useIntersectionObserver` is a React hook that detects whether a specific DOM element is visible on the screen.
13
10
  * It uses the `IntersectionObserver` API to execute a callback when the element enters or exits the viewport.
@@ -15,7 +12,7 @@ let react = require("react");
15
12
  * @param {(entry: IntersectionObserverEntry) => void} callback - A callback function that is executed when the visibility of the element changes.
16
13
  * You can check `entry.isIntersecting` to determine if the element is in view.
17
14
  * @param {IntersectionObserverInit} options - Options for the `IntersectionObserver`.
18
- * @param {boolean} [options.root] - The element that is used as the viewport for checking visibility of the target.
15
+ * @param {Element | Document | null} [options.root] - The element that is used as the viewport for checking visibility of the target.
19
16
  * @param {string} [options.rootMargin] - Margin around the root.
20
17
  * @param {number | number[]} [options.threshold] - Either a single number or an array of numbers which indicate at what percentage of the target's visibility the observer's callback should be executed.
21
18
  *
@@ -41,18 +38,22 @@ let react = require("react");
41
38
  */
42
39
  function useIntersectionObserver(callback, options) {
43
40
  const preservedCallback = require_usePreservedCallback.usePreservedCallback(callback);
41
+ const preservedOptions = require_usePreservedReference.usePreservedReference(options, areIntersectionOptionsEqual);
44
42
  const observer = (0, react.useMemo)(() => {
45
43
  if (typeof IntersectionObserver === "undefined") return;
46
44
  return new IntersectionObserver(([entry]) => {
47
45
  preservedCallback(entry);
48
- }, options);
49
- }, [preservedCallback, options]);
46
+ }, preservedOptions);
47
+ }, [preservedCallback, preservedOptions]);
50
48
  return require_useRefEffect.useRefEffect((element) => {
51
49
  observer?.observe(element);
52
50
  return () => {
53
51
  observer?.unobserve(element);
54
52
  };
55
- }, [preservedCallback, options]);
53
+ }, [preservedCallback, preservedOptions]);
54
+ }
55
+ function areIntersectionOptionsEqual(a, b) {
56
+ return a.root === b.root && a.rootMargin === b.rootMargin && JSON.stringify(a.threshold) === JSON.stringify(b.threshold);
56
57
  }
57
58
  //#endregion
58
59
  exports.useIntersectionObserver = useIntersectionObserver;
@@ -1,10 +1,6 @@
1
1
 
2
2
  //#region src/hooks/useIntersectionObserver/useIntersectionObserver.d.ts
3
3
  /**
4
- * @deprecated This hook is deprecated as it depends on browser-specific APIs (IntersectionObserver).
5
- * react-simplikit is now focused on platform-independent, pure state/logic hooks.
6
- * This hook will be removed in a future major version.
7
- *
8
4
  * @description
9
5
  * `useIntersectionObserver` is a React hook that detects whether a specific DOM element is visible on the screen.
10
6
  * It uses the `IntersectionObserver` API to execute a callback when the element enters or exits the viewport.
@@ -12,7 +8,7 @@
12
8
  * @param {(entry: IntersectionObserverEntry) => void} callback - A callback function that is executed when the visibility of the element changes.
13
9
  * You can check `entry.isIntersecting` to determine if the element is in view.
14
10
  * @param {IntersectionObserverInit} options - Options for the `IntersectionObserver`.
15
- * @param {boolean} [options.root] - The element that is used as the viewport for checking visibility of the target.
11
+ * @param {Element | Document | null} [options.root] - The element that is used as the viewport for checking visibility of the target.
16
12
  * @param {string} [options.rootMargin] - Margin around the root.
17
13
  * @param {number | number[]} [options.threshold] - Either a single number or an array of numbers which indicate at what percentage of the target's visibility the observer's callback should be executed.
18
14
  *
@@ -1,10 +1,6 @@
1
1
 
2
2
  //#region src/hooks/useIntersectionObserver/useIntersectionObserver.d.ts
3
3
  /**
4
- * @deprecated This hook is deprecated as it depends on browser-specific APIs (IntersectionObserver).
5
- * react-simplikit is now focused on platform-independent, pure state/logic hooks.
6
- * This hook will be removed in a future major version.
7
- *
8
4
  * @description
9
5
  * `useIntersectionObserver` is a React hook that detects whether a specific DOM element is visible on the screen.
10
6
  * It uses the `IntersectionObserver` API to execute a callback when the element enters or exits the viewport.
@@ -12,7 +8,7 @@
12
8
  * @param {(entry: IntersectionObserverEntry) => void} callback - A callback function that is executed when the visibility of the element changes.
13
9
  * You can check `entry.isIntersecting` to determine if the element is in view.
14
10
  * @param {IntersectionObserverInit} options - Options for the `IntersectionObserver`.
15
- * @param {boolean} [options.root] - The element that is used as the viewport for checking visibility of the target.
11
+ * @param {Element | Document | null} [options.root] - The element that is used as the viewport for checking visibility of the target.
16
12
  * @param {string} [options.rootMargin] - Margin around the root.
17
13
  * @param {number | number[]} [options.threshold] - Either a single number or an array of numbers which indicate at what percentage of the target's visibility the observer's callback should be executed.
18
14
  *
@@ -1,13 +1,10 @@
1
1
  "use client";
2
2
  import { usePreservedCallback } from "../usePreservedCallback/usePreservedCallback.mjs";
3
+ import { usePreservedReference } from "../usePreservedReference/usePreservedReference.mjs";
3
4
  import { useRefEffect } from "../useRefEffect/useRefEffect.mjs";
4
5
  import { useMemo } from "react";
5
6
  //#region src/hooks/useIntersectionObserver/useIntersectionObserver.ts
6
7
  /**
7
- * @deprecated This hook is deprecated as it depends on browser-specific APIs (IntersectionObserver).
8
- * react-simplikit is now focused on platform-independent, pure state/logic hooks.
9
- * This hook will be removed in a future major version.
10
- *
11
8
  * @description
12
9
  * `useIntersectionObserver` is a React hook that detects whether a specific DOM element is visible on the screen.
13
10
  * It uses the `IntersectionObserver` API to execute a callback when the element enters or exits the viewport.
@@ -15,7 +12,7 @@ import { useMemo } from "react";
15
12
  * @param {(entry: IntersectionObserverEntry) => void} callback - A callback function that is executed when the visibility of the element changes.
16
13
  * You can check `entry.isIntersecting` to determine if the element is in view.
17
14
  * @param {IntersectionObserverInit} options - Options for the `IntersectionObserver`.
18
- * @param {boolean} [options.root] - The element that is used as the viewport for checking visibility of the target.
15
+ * @param {Element | Document | null} [options.root] - The element that is used as the viewport for checking visibility of the target.
19
16
  * @param {string} [options.rootMargin] - Margin around the root.
20
17
  * @param {number | number[]} [options.threshold] - Either a single number or an array of numbers which indicate at what percentage of the target's visibility the observer's callback should be executed.
21
18
  *
@@ -41,18 +38,22 @@ import { useMemo } from "react";
41
38
  */
42
39
  function useIntersectionObserver(callback, options) {
43
40
  const preservedCallback = usePreservedCallback(callback);
41
+ const preservedOptions = usePreservedReference(options, areIntersectionOptionsEqual);
44
42
  const observer = useMemo(() => {
45
43
  if (typeof IntersectionObserver === "undefined") return;
46
44
  return new IntersectionObserver(([entry]) => {
47
45
  preservedCallback(entry);
48
- }, options);
49
- }, [preservedCallback, options]);
46
+ }, preservedOptions);
47
+ }, [preservedCallback, preservedOptions]);
50
48
  return useRefEffect((element) => {
51
49
  observer?.observe(element);
52
50
  return () => {
53
51
  observer?.unobserve(element);
54
52
  };
55
- }, [preservedCallback, options]);
53
+ }, [preservedCallback, preservedOptions]);
54
+ }
55
+ function areIntersectionOptionsEqual(a, b) {
56
+ return a.root === b.root && a.rootMargin === b.rootMargin && JSON.stringify(a.threshold) === JSON.stringify(b.threshold);
56
57
  }
57
58
  //#endregion
58
59
  export { useIntersectionObserver };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  const require_subscribeKeyboardHeight = require("../../utils/subscribeKeyboardHeight/subscribeKeyboardHeight.cjs");
3
3
  let react = require("react");
4
- //#region src/mobile/hooks/useKeyboardHeight/useKeyboardHeight.ts
4
+ //#region src/hooks/useKeyboardHeight/useKeyboardHeight.ts
5
5
  /**
6
6
  * @description
7
7
  * `useKeyboardHeight` is a React hook that tracks the on-screen keyboard height.
@@ -1,5 +1,5 @@
1
1
 
2
- //#region src/mobile/hooks/useKeyboardHeight/useKeyboardHeight.d.ts
2
+ //#region src/hooks/useKeyboardHeight/useKeyboardHeight.d.ts
3
3
  type UseKeyboardHeightOptions = {
4
4
  /**
5
5
  * If true, the hook will get the initial keyboard height on mount.
@@ -1,5 +1,5 @@
1
1
 
2
- //#region src/mobile/hooks/useKeyboardHeight/useKeyboardHeight.d.ts
2
+ //#region src/hooks/useKeyboardHeight/useKeyboardHeight.d.ts
3
3
  type UseKeyboardHeightOptions = {
4
4
  /**
5
5
  * If true, the hook will get the initial keyboard height on mount.
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { subscribeKeyboardHeight } from "../../utils/subscribeKeyboardHeight/subscribeKeyboardHeight.mjs";
3
3
  import { useEffect, useState } from "react";
4
- //#region src/mobile/hooks/useKeyboardHeight/useKeyboardHeight.ts
4
+ //#region src/hooks/useKeyboardHeight/useKeyboardHeight.ts
5
5
  /**
6
6
  * @description
7
7
  * `useKeyboardHeight` is a React hook that tracks the on-screen keyboard height.
@@ -8,15 +8,18 @@ let react = require("react");
8
8
  * A React hook that manages an array as state.
9
9
  * Provides efficient state management and stable action functions.
10
10
  *
11
- * @param {T[]} initialState - Initial array state
11
+ * @template T - The type of the values held in the list.
12
12
  *
13
- * @returns {UseListReturn<T>} A tuple containing the array state and actions to manipulate it
14
- * - `push` - Appends a value to the end of the list
15
- * - `insertAt` - Inserts a value at the specified index
16
- * - `updateAt` - Updates the value at the specified index
17
- * - `removeAt` - Removes the value at the specified index
18
- * - `setAll` - Replaces the entire list with a new array
19
- * - `reset` - Resets the list to its initial state
13
+ * @param {T[]} [initialState=[]] - Initial array state.
14
+ *
15
+ * @returns {UseListReturn<T>} A tuple containing the array state and actions to manipulate it.
16
+ * - list `ReadonlyArray<T>` - The current array state;
17
+ * - actions.push `(value: T) => void` - Appends a value to the end of the list;
18
+ * - actions.insertAt `(index: number, value: T) => void` - Inserts a value at the specified index;
19
+ * - actions.updateAt `(index: number, value: T) => void` - Updates the value at the specified index;
20
+ * - actions.removeAt `(index: number) => void` - Removes the value at the specified index;
21
+ * - actions.setAll `(values: T[]) => void` - Replaces the entire list with a new array;
22
+ * - actions.reset `() => void` - Resets the list to its initial state;
20
23
  *
21
24
  * @example
22
25
  * ```tsx
@@ -14,15 +14,18 @@ type UseListReturn<T> = [ReadonlyArray<T>, ListActions<T>];
14
14
  * A React hook that manages an array as state.
15
15
  * Provides efficient state management and stable action functions.
16
16
  *
17
- * @param {T[]} initialState - Initial array state
18
- *
19
- * @returns {UseListReturn<T>} A tuple containing the array state and actions to manipulate it
20
- * - `push` - Appends a value to the end of the list
21
- * - `insertAt` - Inserts a value at the specified index
22
- * - `updateAt` - Updates the value at the specified index
23
- * - `removeAt` - Removes the value at the specified index
24
- * - `setAll` - Replaces the entire list with a new array
25
- * - `reset` - Resets the list to its initial state
17
+ * @template T - The type of the values held in the list.
18
+ *
19
+ * @param {T[]} [initialState=[]] - Initial array state.
20
+ *
21
+ * @returns {UseListReturn<T>} A tuple containing the array state and actions to manipulate it.
22
+ * - list `ReadonlyArray<T>` - The current array state;
23
+ * - actions.push `(value: T) => void` - Appends a value to the end of the list;
24
+ * - actions.insertAt `(index: number, value: T) => void` - Inserts a value at the specified index;
25
+ * - actions.updateAt `(index: number, value: T) => void` - Updates the value at the specified index;
26
+ * - actions.removeAt `(index: number) => void` - Removes the value at the specified index;
27
+ * - actions.setAll `(values: T[]) => void` - Replaces the entire list with a new array;
28
+ * - actions.reset `() => void` - Resets the list to its initial state;
26
29
  *
27
30
  * @example
28
31
  * ```tsx
@@ -14,15 +14,18 @@ type UseListReturn<T> = [ReadonlyArray<T>, ListActions<T>];
14
14
  * A React hook that manages an array as state.
15
15
  * Provides efficient state management and stable action functions.
16
16
  *
17
- * @param {T[]} initialState - Initial array state
18
- *
19
- * @returns {UseListReturn<T>} A tuple containing the array state and actions to manipulate it
20
- * - `push` - Appends a value to the end of the list
21
- * - `insertAt` - Inserts a value at the specified index
22
- * - `updateAt` - Updates the value at the specified index
23
- * - `removeAt` - Removes the value at the specified index
24
- * - `setAll` - Replaces the entire list with a new array
25
- * - `reset` - Resets the list to its initial state
17
+ * @template T - The type of the values held in the list.
18
+ *
19
+ * @param {T[]} [initialState=[]] - Initial array state.
20
+ *
21
+ * @returns {UseListReturn<T>} A tuple containing the array state and actions to manipulate it.
22
+ * - list `ReadonlyArray<T>` - The current array state;
23
+ * - actions.push `(value: T) => void` - Appends a value to the end of the list;
24
+ * - actions.insertAt `(index: number, value: T) => void` - Inserts a value at the specified index;
25
+ * - actions.updateAt `(index: number, value: T) => void` - Updates the value at the specified index;
26
+ * - actions.removeAt `(index: number) => void` - Removes the value at the specified index;
27
+ * - actions.setAll `(values: T[]) => void` - Replaces the entire list with a new array;
28
+ * - actions.reset `() => void` - Resets the list to its initial state;
26
29
  *
27
30
  * @example
28
31
  * ```tsx
@@ -8,15 +8,18 @@ import { useMemo, useState } from "react";
8
8
  * A React hook that manages an array as state.
9
9
  * Provides efficient state management and stable action functions.
10
10
  *
11
- * @param {T[]} initialState - Initial array state
11
+ * @template T - The type of the values held in the list.
12
12
  *
13
- * @returns {UseListReturn<T>} A tuple containing the array state and actions to manipulate it
14
- * - `push` - Appends a value to the end of the list
15
- * - `insertAt` - Inserts a value at the specified index
16
- * - `updateAt` - Updates the value at the specified index
17
- * - `removeAt` - Removes the value at the specified index
18
- * - `setAll` - Replaces the entire list with a new array
19
- * - `reset` - Resets the list to its initial state
13
+ * @param {T[]} [initialState=[]] - Initial array state.
14
+ *
15
+ * @returns {UseListReturn<T>} A tuple containing the array state and actions to manipulate it.
16
+ * - list `ReadonlyArray<T>` - The current array state;
17
+ * - actions.push `(value: T) => void` - Appends a value to the end of the list;
18
+ * - actions.insertAt `(index: number, value: T) => void` - Inserts a value at the specified index;
19
+ * - actions.updateAt `(index: number, value: T) => void` - Updates the value at the specified index;
20
+ * - actions.removeAt `(index: number) => void` - Removes the value at the specified index;
21
+ * - actions.setAll `(values: T[]) => void` - Replaces the entire list with a new array;
22
+ * - actions.reset `() => void` - Resets the list to its initial state;
20
23
  *
21
24
  * @example
22
25
  * ```tsx
@@ -3,10 +3,6 @@ const require_usePreservedCallback = require("../usePreservedCallback/usePreserv
3
3
  let react = require("react");
4
4
  //#region src/hooks/useLongPress/useLongPress.ts
5
5
  /**
6
- * @deprecated This hook is deprecated as it depends on browser-specific APIs (DOM events, window.setTimeout).
7
- * react-simplikit is now focused on platform-independent, pure state/logic hooks.
8
- * This hook will be removed in a future major version.
9
- *
10
6
  * @description
11
7
  * `useLongPress` is a React hook that detects when an element is pressed and held for a specified duration.
12
8
  * It handles both mouse and touch events, making it work consistently across desktop and mobile devices.
@@ -89,6 +85,9 @@ function useLongPress(onLongPress, { delay = 500, moveThreshold, onClick, onLong
89
85
  timeoutRef.current = null;
90
86
  }
91
87
  }, []);
88
+ (0, react.useEffect)(function cleanupLongPressOnUnmount() {
89
+ return cancelLongPress;
90
+ }, [cancelLongPress]);
92
91
  const handlePressStart = (0, react.useCallback)((event) => {
93
92
  cancelLongPress();
94
93
  const position = getClientPosition(event);
@@ -12,10 +12,6 @@ type UseLongPressOptions<E extends HTMLElement> = {
12
12
  onLongPressEnd?: Handler<E>;
13
13
  };
14
14
  /**
15
- * @deprecated This hook is deprecated as it depends on browser-specific APIs (DOM events, window.setTimeout).
16
- * react-simplikit is now focused on platform-independent, pure state/logic hooks.
17
- * This hook will be removed in a future major version.
18
- *
19
15
  * @description
20
16
  * `useLongPress` is a React hook that detects when an element is pressed and held for a specified duration.
21
17
  * It handles both mouse and touch events, making it work consistently across desktop and mobile devices.
@@ -12,10 +12,6 @@ type UseLongPressOptions<E extends HTMLElement> = {
12
12
  onLongPressEnd?: Handler<E>;
13
13
  };
14
14
  /**
15
- * @deprecated This hook is deprecated as it depends on browser-specific APIs (DOM events, window.setTimeout).
16
- * react-simplikit is now focused on platform-independent, pure state/logic hooks.
17
- * This hook will be removed in a future major version.
18
- *
19
15
  * @description
20
16
  * `useLongPress` is a React hook that detects when an element is pressed and held for a specified duration.
21
17
  * It handles both mouse and touch events, making it work consistently across desktop and mobile devices.
@@ -1,12 +1,8 @@
1
1
  "use client";
2
2
  import { usePreservedCallback } from "../usePreservedCallback/usePreservedCallback.mjs";
3
- import { useCallback, useRef } from "react";
3
+ import { useCallback, useEffect, useRef } from "react";
4
4
  //#region src/hooks/useLongPress/useLongPress.ts
5
5
  /**
6
- * @deprecated This hook is deprecated as it depends on browser-specific APIs (DOM events, window.setTimeout).
7
- * react-simplikit is now focused on platform-independent, pure state/logic hooks.
8
- * This hook will be removed in a future major version.
9
- *
10
6
  * @description
11
7
  * `useLongPress` is a React hook that detects when an element is pressed and held for a specified duration.
12
8
  * It handles both mouse and touch events, making it work consistently across desktop and mobile devices.
@@ -89,6 +85,9 @@ function useLongPress(onLongPress, { delay = 500, moveThreshold, onClick, onLong
89
85
  timeoutRef.current = null;
90
86
  }
91
87
  }, []);
88
+ useEffect(function cleanupLongPressOnUnmount() {
89
+ return cancelLongPress;
90
+ }, [cancelLongPress]);
92
91
  const handlePressStart = useCallback((event) => {
93
92
  cancelLongPress();
94
93
  const position = getClientPosition(event);
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  const require_isServer = require("../../utils/isServer/isServer.cjs");
3
3
  let react = require("react");
4
- //#region src/mobile/hooks/useNetworkStatus/useNetworkStatus.ts
4
+ //#region src/hooks/useNetworkStatus/useNetworkStatus.ts
5
5
  /**
6
6
  * @description
7
7
  * `useNetworkStatus` is a React hook that provides access to the Network Information API.
@@ -1,5 +1,5 @@
1
1
 
2
- //#region src/mobile/hooks/useNetworkStatus/useNetworkStatus.d.ts
2
+ //#region src/hooks/useNetworkStatus/useNetworkStatus.d.ts
3
3
  /**
4
4
  * Effective connection type based on Network Information API
5
5
  * @see https://wicg.github.io/netinfo/#effective-connection-types
@@ -1,5 +1,5 @@
1
1
 
2
- //#region src/mobile/hooks/useNetworkStatus/useNetworkStatus.d.ts
2
+ //#region src/hooks/useNetworkStatus/useNetworkStatus.d.ts
3
3
  /**
4
4
  * Effective connection type based on Network Information API
5
5
  * @see https://wicg.github.io/netinfo/#effective-connection-types
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { isServer } from "../../utils/isServer/isServer.mjs";
3
3
  import { useEffect, useState } from "react";
4
- //#region src/mobile/hooks/useNetworkStatus/useNetworkStatus.ts
4
+ //#region src/hooks/useNetworkStatus/useNetworkStatus.ts
5
5
  /**
6
6
  * @description
7
7
  * `useNetworkStatus` is a React hook that provides access to the Network Information API.
@@ -3,10 +3,6 @@ const require_usePreservedCallback = require("../usePreservedCallback/usePreserv
3
3
  let react = require("react");
4
4
  //#region src/hooks/useOutsideClickEffect/useOutsideClickEffect.ts
5
5
  /**
6
- * @deprecated This hook is deprecated as it depends on browser-specific APIs (DOM events, document).
7
- * react-simplikit is now focused on platform-independent, pure state/logic hooks.
8
- * This hook will be removed in a future major version.
9
- *
10
6
  * @description
11
7
  * `useOutsideClickEffect` is a React hook that triggers a callback when a click event occurs outside the specified container(s).
12
8
  * It is useful for closing modals, dropdowns, tooltips, and other UI components when clicking outside.
@@ -2,10 +2,6 @@
2
2
  //#region src/hooks/useOutsideClickEffect/useOutsideClickEffect.d.ts
3
3
  type OneOrMore<T> = T | T[];
4
4
  /**
5
- * @deprecated This hook is deprecated as it depends on browser-specific APIs (DOM events, document).
6
- * react-simplikit is now focused on platform-independent, pure state/logic hooks.
7
- * This hook will be removed in a future major version.
8
- *
9
5
  * @description
10
6
  * `useOutsideClickEffect` is a React hook that triggers a callback when a click event occurs outside the specified container(s).
11
7
  * It is useful for closing modals, dropdowns, tooltips, and other UI components when clicking outside.
@@ -2,10 +2,6 @@
2
2
  //#region src/hooks/useOutsideClickEffect/useOutsideClickEffect.d.ts
3
3
  type OneOrMore<T> = T | T[];
4
4
  /**
5
- * @deprecated This hook is deprecated as it depends on browser-specific APIs (DOM events, document).
6
- * react-simplikit is now focused on platform-independent, pure state/logic hooks.
7
- * This hook will be removed in a future major version.
8
- *
9
5
  * @description
10
6
  * `useOutsideClickEffect` is a React hook that triggers a callback when a click event occurs outside the specified container(s).
11
7
  * It is useful for closing modals, dropdowns, tooltips, and other UI components when clicking outside.
@@ -3,10 +3,6 @@ import { usePreservedCallback } from "../usePreservedCallback/usePreservedCallba
3
3
  import { useEffect, useRef } from "react";
4
4
  //#region src/hooks/useOutsideClickEffect/useOutsideClickEffect.ts
5
5
  /**
6
- * @deprecated This hook is deprecated as it depends on browser-specific APIs (DOM events, document).
7
- * react-simplikit is now focused on platform-independent, pure state/logic hooks.
8
- * This hook will be removed in a future major version.
9
- *
10
6
  * @description
11
7
  * `useOutsideClickEffect` is a React hook that triggers a callback when a click event occurs outside the specified container(s).
12
8
  * It is useful for closing modals, dropdowns, tooltips, and other UI components when clicking outside.
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  const require_isServer = require("../../utils/isServer/isServer.cjs");
3
3
  let react = require("react");
4
- //#region src/mobile/hooks/usePageVisibility/usePageVisibility.ts
4
+ //#region src/hooks/usePageVisibility/usePageVisibility.ts
5
5
  /**
6
6
  * @description
7
7
  * `usePageVisibility` is a React hook that detects page visibility changes.
@@ -10,6 +10,8 @@ let react = require("react");
10
10
  *
11
11
  * **SSR Behavior**: Returns `{ isVisible: true, visibilityState: 'visible' }` during server-side rendering.
12
12
  *
13
+ * @see `useVisibilityEvent` runs a callback on each change instead of returning state.
14
+ *
13
15
  * @returns {PageVisibility} Page visibility information
14
16
  * - `isVisible` - True if page is currently visible to the user
15
17
  * - `visibilityState` - Current visibility state: 'visible' | 'hidden'
@@ -1,5 +1,5 @@
1
1
 
2
- //#region src/mobile/hooks/usePageVisibility/usePageVisibility.d.ts
2
+ //#region src/hooks/usePageVisibility/usePageVisibility.d.ts
3
3
  /**
4
4
  * Page visibility state derived from browser's DocumentVisibilityState.
5
5
  * Excludes 'prerender' as it is deprecated and not used in modern browsers.
@@ -22,6 +22,8 @@ type PageVisibility = {
22
22
  *
23
23
  * **SSR Behavior**: Returns `{ isVisible: true, visibilityState: 'visible' }` during server-side rendering.
24
24
  *
25
+ * @see `useVisibilityEvent` runs a callback on each change instead of returning state.
26
+ *
25
27
  * @returns {PageVisibility} Page visibility information
26
28
  * - `isVisible` - True if page is currently visible to the user
27
29
  * - `visibilityState` - Current visibility state: 'visible' | 'hidden'
@@ -1,5 +1,5 @@
1
1
 
2
- //#region src/mobile/hooks/usePageVisibility/usePageVisibility.d.ts
2
+ //#region src/hooks/usePageVisibility/usePageVisibility.d.ts
3
3
  /**
4
4
  * Page visibility state derived from browser's DocumentVisibilityState.
5
5
  * Excludes 'prerender' as it is deprecated and not used in modern browsers.
@@ -22,6 +22,8 @@ type PageVisibility = {
22
22
  *
23
23
  * **SSR Behavior**: Returns `{ isVisible: true, visibilityState: 'visible' }` during server-side rendering.
24
24
  *
25
+ * @see `useVisibilityEvent` runs a callback on each change instead of returning state.
26
+ *
25
27
  * @returns {PageVisibility} Page visibility information
26
28
  * - `isVisible` - True if page is currently visible to the user
27
29
  * - `visibilityState` - Current visibility state: 'visible' | 'hidden'
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { isServer } from "../../utils/isServer/isServer.mjs";
3
3
  import { useEffect, useState } from "react";
4
- //#region src/mobile/hooks/usePageVisibility/usePageVisibility.ts
4
+ //#region src/hooks/usePageVisibility/usePageVisibility.ts
5
5
  /**
6
6
  * @description
7
7
  * `usePageVisibility` is a React hook that detects page visibility changes.
@@ -10,6 +10,8 @@ import { useEffect, useState } from "react";
10
10
  *
11
11
  * **SSR Behavior**: Returns `{ isVisible: true, visibilityState: 'visible' }` during server-side rendering.
12
12
  *
13
+ * @see `useVisibilityEvent` runs a callback on each change instead of returning state.
14
+ *
13
15
  * @returns {PageVisibility} Page visibility information
14
16
  * - `isVisible` - True if page is currently visible to the user
15
17
  * - `visibilityState` - Current visibility state: 'visible' | 'hidden'
@@ -1,5 +1,4 @@
1
1
  "use client";
2
- const require_usePreservedCallback = require("../usePreservedCallback/usePreservedCallback.cjs");
3
2
  let react = require("react");
4
3
  //#region src/hooks/useRefEffect/useRefEffect.ts
5
4
  /**
@@ -29,15 +28,18 @@ let react = require("react");
29
28
  */
30
29
  function useRefEffect(callback, deps) {
31
30
  "use no memo";
32
- const preservedCallback = require_usePreservedCallback.usePreservedCallback(callback);
31
+ const callbackRef = (0, react.useMemo)(() => ({ current: callback }), deps);
32
+ (0, react.useEffect)(function syncCallbackRef() {
33
+ callbackRef.current = callback;
34
+ }, [callback, callbackRef]);
33
35
  const cleanupCallbackRef = (0, react.useRef)(() => {});
34
36
  return (0, react.useCallback)((element) => {
35
37
  cleanupCallbackRef.current();
36
38
  cleanupCallbackRef.current = () => {};
37
39
  if (element == null) return;
38
- const cleanup = preservedCallback(element);
40
+ const cleanup = callbackRef.current(element);
39
41
  if (typeof cleanup === "function") cleanupCallbackRef.current = cleanup;
40
- }, [preservedCallback, ...deps]);
42
+ }, [callbackRef]);
41
43
  }
42
44
  //#endregion
43
45
  exports.useRefEffect = useRefEffect;
@@ -1,6 +1,5 @@
1
1
  "use client";
2
- import { usePreservedCallback } from "../usePreservedCallback/usePreservedCallback.mjs";
3
- import { useCallback, useRef } from "react";
2
+ import { useCallback, useEffect, useMemo, useRef } from "react";
4
3
  //#region src/hooks/useRefEffect/useRefEffect.ts
5
4
  /**
6
5
  * @description
@@ -29,15 +28,18 @@ import { useCallback, useRef } from "react";
29
28
  */
30
29
  function useRefEffect(callback, deps) {
31
30
  "use no memo";
32
- const preservedCallback = usePreservedCallback(callback);
31
+ const callbackRef = useMemo(() => ({ current: callback }), deps);
32
+ useEffect(function syncCallbackRef() {
33
+ callbackRef.current = callback;
34
+ }, [callback, callbackRef]);
33
35
  const cleanupCallbackRef = useRef(() => {});
34
36
  return useCallback((element) => {
35
37
  cleanupCallbackRef.current();
36
38
  cleanupCallbackRef.current = () => {};
37
39
  if (element == null) return;
38
- const cleanup = preservedCallback(element);
40
+ const cleanup = callbackRef.current(element);
39
41
  if (typeof cleanup === "function") cleanupCallbackRef.current = cleanup;
40
- }, [preservedCallback, ...deps]);
42
+ }, [callbackRef]);
41
43
  }
42
44
  //#endregion
43
45
  export { useRefEffect };
@@ -2,7 +2,7 @@
2
2
  const require_isServer = require("../../utils/isServer/isServer.cjs");
3
3
  const require_getSafeAreaInset = require("../../utils/getSafeAreaInset/getSafeAreaInset.cjs");
4
4
  let react = require("react");
5
- //#region src/mobile/hooks/useSafeAreaInset/useSafeAreaInset.ts
5
+ //#region src/hooks/useSafeAreaInset/useSafeAreaInset.ts
6
6
  /**
7
7
  * @description
8
8
  * `useSafeAreaInset` is a React hook that tracks safe area inset changes.
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { SafeAreaInset } from "../../utils/getSafeAreaInset/getSafeAreaInset.cjs";
3
- //#region src/mobile/hooks/useSafeAreaInset/useSafeAreaInset.d.ts
3
+ //#region src/hooks/useSafeAreaInset/useSafeAreaInset.d.ts
4
4
  /**
5
5
  * @description
6
6
  * `useSafeAreaInset` is a React hook that tracks safe area inset changes.
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { SafeAreaInset } from "../../utils/getSafeAreaInset/getSafeAreaInset.mjs";
3
- //#region src/mobile/hooks/useSafeAreaInset/useSafeAreaInset.d.ts
3
+ //#region src/hooks/useSafeAreaInset/useSafeAreaInset.d.ts
4
4
  /**
5
5
  * @description
6
6
  * `useSafeAreaInset` is a React hook that tracks safe area inset changes.
@@ -2,7 +2,7 @@
2
2
  import { isServer } from "../../utils/isServer/isServer.mjs";
3
3
  import { getSafeAreaInset } from "../../utils/getSafeAreaInset/getSafeAreaInset.mjs";
4
4
  import { startTransition, useCallback, useEffect, useState } from "react";
5
- //#region src/mobile/hooks/useSafeAreaInset/useSafeAreaInset.ts
5
+ //#region src/hooks/useSafeAreaInset/useSafeAreaInset.ts
6
6
  /**
7
7
  * @description
8
8
  * `useSafeAreaInset` is a React hook that tracks safe area inset changes.