@fringeworks/react-utils 0.8.0 → 0.9.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 (170) hide show
  1. package/README.ja.md +307 -0
  2. package/README.md +307 -3
  3. package/_helpers/_traverseChildren.cjs +32 -0
  4. package/_helpers/_traverseChildren.d.cts +24 -0
  5. package/_helpers/_traverseChildren.d.mts +24 -0
  6. package/_helpers/_traverseChildren.mjs +30 -0
  7. package/hooks/index.cjs +21 -40
  8. package/hooks/index.d.cts +5 -7
  9. package/hooks/index.d.mts +5 -7
  10. package/hooks/index.mjs +1 -14
  11. package/hooks/useCombinedRefs/index.cjs +4 -2
  12. package/hooks/useCombinedRefs/index.d.cts +1 -1
  13. package/hooks/useCombinedRefs/index.d.mts +1 -1
  14. package/hooks/useCombinedRefs/index.mjs +1 -1
  15. package/hooks/useCombinedRefs/useCombinedRefs.cjs +7 -6
  16. package/hooks/useCombinedRefs/useCombinedRefs.d.cts +0 -1
  17. package/hooks/useCombinedRefs/useCombinedRefs.d.mts +2 -4
  18. package/hooks/useConstant/index.cjs +4 -2
  19. package/hooks/useConstant/index.d.cts +1 -1
  20. package/hooks/useConstant/index.d.mts +1 -1
  21. package/hooks/useConstant/index.mjs +1 -1
  22. package/hooks/useConstant/useConstant.cjs +2 -1
  23. package/hooks/useConstant/useConstant.d.mts +2 -3
  24. package/hooks/useExecutionAt/index.cjs +4 -2
  25. package/hooks/useExecutionAt/index.d.cts +1 -1
  26. package/hooks/useExecutionAt/index.d.mts +1 -1
  27. package/hooks/useExecutionAt/index.mjs +1 -1
  28. package/hooks/useExecutionAt/types.cjs +1 -0
  29. package/hooks/useExecutionAt/types.d.cts +7 -8
  30. package/hooks/useExecutionAt/types.d.mts +7 -8
  31. package/hooks/useExecutionAt/useExecutionAt.cjs +4 -3
  32. package/hooks/useExecutionAt/useExecutionAt.d.cts +0 -1
  33. package/hooks/useExecutionAt/useExecutionAt.d.mts +2 -4
  34. package/hooks/useIsMounted/index.cjs +4 -2
  35. package/hooks/useIsMounted/index.d.cts +1 -1
  36. package/hooks/useIsMounted/index.d.mts +1 -1
  37. package/hooks/useIsMounted/index.mjs +1 -1
  38. package/hooks/useIsMounted/useIsMounted.cjs +8 -3
  39. package/hooks/useIsMounted/useIsMounted.d.cts +5 -1
  40. package/hooks/useIsMounted/useIsMounted.d.mts +7 -4
  41. package/hooks/useIsMounted/useIsMounted.mjs +7 -3
  42. package/hooks/useLatestRef/index.cjs +4 -2
  43. package/hooks/useLatestRef/index.d.cts +1 -1
  44. package/hooks/useLatestRef/index.d.mts +1 -1
  45. package/hooks/useLatestRef/index.mjs +1 -1
  46. package/hooks/useLatestRef/types.cjs +1 -0
  47. package/hooks/useLatestRef/types.d.cts +2 -3
  48. package/hooks/useLatestRef/types.d.mts +2 -3
  49. package/hooks/useLatestRef/useLatestRef.cjs +2 -1
  50. package/hooks/useLatestRef/useLatestRef.d.cts +0 -1
  51. package/hooks/useLatestRef/useLatestRef.d.mts +2 -4
  52. package/hooks/usePreviousValue/index.cjs +4 -2
  53. package/hooks/usePreviousValue/index.d.cts +1 -1
  54. package/hooks/usePreviousValue/index.d.mts +1 -1
  55. package/hooks/usePreviousValue/index.mjs +1 -1
  56. package/hooks/usePreviousValue/types.cjs +1 -0
  57. package/hooks/usePreviousValue/types.d.cts +8 -9
  58. package/hooks/usePreviousValue/types.d.mts +8 -9
  59. package/hooks/usePreviousValue/usePreviousValue.cjs +10 -5
  60. package/hooks/usePreviousValue/usePreviousValue.d.cts +6 -2
  61. package/hooks/usePreviousValue/usePreviousValue.d.mts +8 -5
  62. package/hooks/usePreviousValue/usePreviousValue.mjs +8 -4
  63. package/hooks/useStableLength/index.cjs +4 -2
  64. package/hooks/useStableLength/index.d.cts +1 -1
  65. package/hooks/useStableLength/index.d.mts +1 -1
  66. package/hooks/useStableLength/index.mjs +1 -1
  67. package/hooks/useStableLength/useStableLength.cjs +2 -1
  68. package/hooks/useStableLength/useStableLength.d.cts +1 -1
  69. package/hooks/useStableLength/useStableLength.d.mts +2 -3
  70. package/index.cjs +34 -14
  71. package/index.d.cts +25 -3
  72. package/index.d.mts +25 -3
  73. package/index.mjs +19 -3
  74. package/package.json +162 -38
  75. package/types.cjs +1 -0
  76. package/types.d.cts +2 -4
  77. package/types.d.mts +2 -4
  78. package/utils/applyDefaultProps/applyDefaultProps.cjs +6 -2
  79. package/utils/applyDefaultProps/applyDefaultProps.d.cts +6 -3
  80. package/utils/applyDefaultProps/applyDefaultProps.d.mts +8 -5
  81. package/utils/applyDefaultProps/applyDefaultProps.mjs +4 -0
  82. package/utils/applyDefaultProps/index.cjs +4 -2
  83. package/utils/applyDefaultProps/index.d.cts +1 -1
  84. package/utils/applyDefaultProps/index.d.mts +1 -1
  85. package/utils/applyDefaultProps/index.mjs +1 -1
  86. package/utils/applyDefaultProps/types.cjs +1 -0
  87. package/utils/applyDefaultProps/types.d.cts +6 -6
  88. package/utils/applyDefaultProps/types.d.mts +6 -6
  89. package/utils/ensureComponent/ensureComponent.cjs +2 -1
  90. package/utils/ensureComponent/ensureComponent.d.cts +0 -1
  91. package/utils/ensureComponent/ensureComponent.d.mts +2 -4
  92. package/utils/ensureComponent/index.cjs +4 -2
  93. package/utils/ensureComponent/index.d.cts +1 -1
  94. package/utils/ensureComponent/index.d.mts +1 -1
  95. package/utils/ensureComponent/index.mjs +1 -1
  96. package/utils/extendElement/extendElement.cjs +21 -17
  97. package/utils/extendElement/extendElement.d.cts +11 -6
  98. package/utils/extendElement/extendElement.d.mts +12 -8
  99. package/utils/extendElement/extendElement.mjs +19 -16
  100. package/utils/extendElement/index.cjs +4 -2
  101. package/utils/extendElement/index.d.cts +2 -1
  102. package/utils/extendElement/index.d.mts +2 -1
  103. package/utils/extendElement/index.mjs +1 -1
  104. package/utils/extendElement/types.cjs +1 -0
  105. package/utils/extendElement/types.d.cts +16 -0
  106. package/utils/extendElement/types.d.mts +16 -0
  107. package/utils/extendElement/types.mjs +1 -0
  108. package/utils/forEachContent/forEachContent.cjs +5 -4
  109. package/utils/forEachContent/forEachContent.d.cts +1 -2
  110. package/utils/forEachContent/forEachContent.d.mts +3 -5
  111. package/utils/forEachContent/forEachContent.mjs +3 -3
  112. package/utils/forEachContent/index.cjs +4 -2
  113. package/utils/forEachContent/index.d.cts +1 -1
  114. package/utils/forEachContent/index.d.mts +1 -1
  115. package/utils/forEachContent/index.mjs +1 -1
  116. package/utils/forEachElement/forEachElement.cjs +6 -4
  117. package/utils/forEachElement/forEachElement.d.cts +1 -2
  118. package/utils/forEachElement/forEachElement.d.mts +3 -5
  119. package/utils/forEachElement/forEachElement.mjs +4 -3
  120. package/utils/forEachElement/index.cjs +4 -2
  121. package/utils/forEachElement/index.d.cts +1 -1
  122. package/utils/forEachElement/index.d.mts +1 -1
  123. package/utils/forEachElement/index.mjs +1 -1
  124. package/utils/index.cjs +24 -45
  125. package/utils/index.d.cts +11 -5
  126. package/utils/index.d.mts +11 -5
  127. package/utils/index.mjs +1 -16
  128. package/utils/markAt/index.cjs +4 -2
  129. package/utils/markAt/index.d.cts +1 -1
  130. package/utils/markAt/index.d.mts +1 -1
  131. package/utils/markAt/index.mjs +1 -1
  132. package/utils/markAt/markAt.cjs +2 -2
  133. package/utils/markAt/markAt.d.cts +0 -1
  134. package/utils/markAt/markAt.d.mts +2 -4
  135. package/utils/markAt/types.cjs +1 -0
  136. package/utils/markAt/types.d.cts +2 -3
  137. package/utils/markAt/types.d.mts +2 -3
  138. package/utils/setRefCurrent/index.cjs +4 -2
  139. package/utils/setRefCurrent/index.d.cts +1 -1
  140. package/utils/setRefCurrent/index.d.mts +1 -1
  141. package/utils/setRefCurrent/index.mjs +1 -1
  142. package/utils/setRefCurrent/setRefCurrent.cjs +2 -2
  143. package/utils/setRefCurrent/setRefCurrent.d.cts +1 -2
  144. package/utils/setRefCurrent/setRefCurrent.d.mts +2 -4
  145. package/utils/transformContent/index.cjs +4 -2
  146. package/utils/transformContent/index.d.cts +1 -1
  147. package/utils/transformContent/index.d.mts +1 -1
  148. package/utils/transformContent/index.mjs +1 -1
  149. package/utils/transformContent/transformContent.cjs +11 -4
  150. package/utils/transformContent/transformContent.d.cts +7 -2
  151. package/utils/transformContent/transformContent.d.mts +9 -5
  152. package/utils/transformContent/transformContent.mjs +9 -3
  153. package/utils/transformElement/index.cjs +4 -2
  154. package/utils/transformElement/index.d.cts +1 -1
  155. package/utils/transformElement/index.d.mts +1 -1
  156. package/utils/transformElement/index.mjs +1 -1
  157. package/utils/transformElement/transformElement.cjs +12 -4
  158. package/utils/transformElement/transformElement.d.cts +7 -2
  159. package/utils/transformElement/transformElement.d.mts +9 -5
  160. package/utils/transformElement/transformElement.mjs +10 -3
  161. package/_helpers/_traverseContent.cjs +0 -24
  162. package/_helpers/_traverseContent.d.cts +0 -15
  163. package/_helpers/_traverseContent.d.mts +0 -16
  164. package/_helpers/_traverseContent.mjs +0 -22
  165. package/_helpers/_traverseElement.cjs +0 -23
  166. package/_helpers/_traverseElement.d.cts +0 -15
  167. package/_helpers/_traverseElement.d.mts +0 -16
  168. package/_helpers/_traverseElement.mjs +0 -21
  169. package/_virtual/_rolldown/runtime.cjs +0 -43
  170. package/_virtual/_rolldown/runtime.mjs +0 -18
@@ -2,11 +2,10 @@
2
2
  /**
3
3
  * 最新の値を保持する参照
4
4
  */
5
- type LatestRef<T> = {
5
+ export type LatestRef<T> = {
6
6
  /**
7
7
  * 最後にコミットされたレンダリングでの値
8
8
  */
9
9
  readonly current: T;
10
10
  };
11
- //#endregion
12
- export { LatestRef };
11
+ //#endregion
@@ -1,3 +1,4 @@
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
1
2
  let react = require("react");
2
3
 
3
4
  //#region src/hooks/useLatestRef/useLatestRef.ts
@@ -20,4 +21,4 @@ function useLatestRef(value) {
20
21
  }
21
22
 
22
23
  //#endregion
23
- module.exports = useLatestRef;
24
+ exports.default = useLatestRef;
@@ -1,5 +1,4 @@
1
1
  import { LatestRef } from "./types.cjs";
2
-
3
2
  //#region src/hooks/useLatestRef/useLatestRef.d.ts
4
3
  /**
5
4
  * 最新の値を保持する参照を返すhook
@@ -1,5 +1,4 @@
1
1
  import { LatestRef } from "./types.mjs";
2
-
3
2
  //#region src/hooks/useLatestRef/useLatestRef.d.ts
4
3
  /**
5
4
  * 最新の値を保持する参照を返すhook
@@ -11,6 +10,5 @@ import { LatestRef } from "./types.mjs";
11
10
  * @param value 値
12
11
  * @returns 最新の値を保持する参照
13
12
  */
14
- declare function useLatestRef<T>(value: T): LatestRef<T>;
15
- //#endregion
16
- export { useLatestRef as default };
13
+ export default function useLatestRef<T>(value: T): LatestRef<T>;
14
+ //#endregion
@@ -1,3 +1,5 @@
1
- const require_hooks_usePreviousValue_usePreviousValue = require('./usePreviousValue.cjs');
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
+ const require_hooks_usePreviousValue_usePreviousValue = require("./usePreviousValue.cjs");
2
3
 
3
- module.exports = require_hooks_usePreviousValue_usePreviousValue;
4
+ exports.default = require_hooks_usePreviousValue_usePreviousValue.default;
5
+ exports.usePreviousValue = require_hooks_usePreviousValue_usePreviousValue.default;
@@ -1,3 +1,3 @@
1
1
  import { UsePreviousValueOptions } from "./types.cjs";
2
2
  import usePreviousValue from "./usePreviousValue.cjs";
3
- export { type UsePreviousValueOptions, usePreviousValue as default };
3
+ export { type UsePreviousValueOptions, usePreviousValue as default, usePreviousValue };
@@ -1,3 +1,3 @@
1
1
  import { UsePreviousValueOptions } from "./types.mjs";
2
2
  import usePreviousValue from "./usePreviousValue.mjs";
3
- export { type UsePreviousValueOptions, usePreviousValue as default };
3
+ export { type UsePreviousValueOptions, usePreviousValue as default, usePreviousValue };
@@ -1,3 +1,3 @@
1
1
  import usePreviousValue from "./usePreviousValue.mjs";
2
2
 
3
- export { usePreviousValue as default };
3
+ export { usePreviousValue as default, usePreviousValue };
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
@@ -1,18 +1,17 @@
1
1
  //#region src/hooks/usePreviousValue/types.d.ts
2
- type UsePreviousValueOptions<T = any> = {
2
+ export type UsePreviousValueOptions<T = unknown> = {
3
3
  /**
4
- * 初期値
4
+ * 値が一度も変わっていない間に返す値
5
5
  */
6
6
  initialValue?: T;
7
7
  /**
8
8
  * 値の比較関数
9
9
  * falseの場合に値を更新する
10
- * 未指定の場合は`===`で比較
11
- * @param oldValue
12
- * @param newValue
13
- * @returns
10
+ * 未指定の場合は`Object.is`で比較
11
+ * @param oldValue 最後に確定した値
12
+ * @param newValue 現在の値
13
+ * @returns 同じ値とみなす場合はtrue
14
14
  */
15
- isEqual?: (oldValue: T | undefined, newValue: T) => boolean;
15
+ isEqual?: (oldValue: T, newValue: T) => boolean;
16
16
  };
17
- //#endregion
18
- export { UsePreviousValueOptions };
17
+ //#endregion
@@ -1,18 +1,17 @@
1
1
  //#region src/hooks/usePreviousValue/types.d.ts
2
- type UsePreviousValueOptions<T = any> = {
2
+ export type UsePreviousValueOptions<T = unknown> = {
3
3
  /**
4
- * 初期値
4
+ * 値が一度も変わっていない間に返す値
5
5
  */
6
6
  initialValue?: T;
7
7
  /**
8
8
  * 値の比較関数
9
9
  * falseの場合に値を更新する
10
- * 未指定の場合は`===`で比較
11
- * @param oldValue
12
- * @param newValue
13
- * @returns
10
+ * 未指定の場合は`Object.is`で比較
11
+ * @param oldValue 最後に確定した値
12
+ * @param newValue 現在の値
13
+ * @returns 同じ値とみなす場合はtrue
14
14
  */
15
- isEqual?: (oldValue: T | undefined, newValue: T) => boolean;
15
+ isEqual?: (oldValue: T, newValue: T) => boolean;
16
16
  };
17
- //#endregion
18
- export { UsePreviousValueOptions };
17
+ //#endregion
@@ -1,16 +1,21 @@
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
1
2
  let react = require("react");
2
3
 
3
4
  //#region src/hooks/usePreviousValue/usePreviousValue.ts
4
- const defaultIsEqual = (oldValue, newValue) => oldValue === newValue;
5
5
  /**
6
6
  * 前回の値を返すhook
7
+ *
8
+ * 値が変わったときに、レンダリング中のステート更新で前回値を更新する。
9
+ * 比較が毎回falseになる値(レンダリング中に作るオブジェクトや配列など)を渡すと
10
+ * 再レンダリングが止まらなくなるため、参照が安定した値を渡すか、`isEqual`を指定すること。
11
+ *
7
12
  * @param value 現在の値
8
13
  * @param options オプション
9
- * @returns 前回の値
14
+ * @returns 前回の値。値が一度も変わっていない場合は`initialValue`
10
15
  */
11
16
  function usePreviousValue(value, options = {}) {
12
- const isEqual = options.isEqual ?? defaultIsEqual;
13
- const [currentValue, setCurrentValue] = (0, react.useState)(options.initialValue);
17
+ const isEqual = options.isEqual ?? Object.is;
18
+ const [currentValue, setCurrentValue] = (0, react.useState)(value);
14
19
  const [prevValue, setPrevValue] = (0, react.useState)(options.initialValue);
15
20
  if (!isEqual(currentValue, value)) {
16
21
  setPrevValue(currentValue);
@@ -20,4 +25,4 @@ function usePreviousValue(value, options = {}) {
20
25
  }
21
26
 
22
27
  //#endregion
23
- module.exports = usePreviousValue;
28
+ exports.default = usePreviousValue;
@@ -1,11 +1,15 @@
1
1
  import { UsePreviousValueOptions } from "./types.cjs";
2
-
3
2
  //#region src/hooks/usePreviousValue/usePreviousValue.d.ts
4
3
  /**
5
4
  * 前回の値を返すhook
5
+ *
6
+ * 値が変わったときに、レンダリング中のステート更新で前回値を更新する。
7
+ * 比較が毎回falseになる値(レンダリング中に作るオブジェクトや配列など)を渡すと
8
+ * 再レンダリングが止まらなくなるため、参照が安定した値を渡すか、`isEqual`を指定すること。
9
+ *
6
10
  * @param value 現在の値
7
11
  * @param options オプション
8
- * @returns 前回の値
12
+ * @returns 前回の値。値が一度も変わっていない場合は`initialValue`
9
13
  */
10
14
  declare function usePreviousValue<T = unknown>(value: T, options?: UsePreviousValueOptions<T>): T | undefined;
11
15
  export = usePreviousValue;
@@ -1,12 +1,15 @@
1
1
  import { UsePreviousValueOptions } from "./types.mjs";
2
-
3
2
  //#region src/hooks/usePreviousValue/usePreviousValue.d.ts
4
3
  /**
5
4
  * 前回の値を返すhook
5
+ *
6
+ * 値が変わったときに、レンダリング中のステート更新で前回値を更新する。
7
+ * 比較が毎回falseになる値(レンダリング中に作るオブジェクトや配列など)を渡すと
8
+ * 再レンダリングが止まらなくなるため、参照が安定した値を渡すか、`isEqual`を指定すること。
9
+ *
6
10
  * @param value 現在の値
7
11
  * @param options オプション
8
- * @returns 前回の値
12
+ * @returns 前回の値。値が一度も変わっていない場合は`initialValue`
9
13
  */
10
- declare function usePreviousValue<T = unknown>(value: T, options?: UsePreviousValueOptions<T>): T | undefined;
11
- //#endregion
12
- export { usePreviousValue as default };
14
+ export default function usePreviousValue<T = unknown>(value: T, options?: UsePreviousValueOptions<T>): T | undefined;
15
+ //#endregion
@@ -1,16 +1,20 @@
1
1
  import { useState } from "react";
2
2
 
3
3
  //#region src/hooks/usePreviousValue/usePreviousValue.ts
4
- const defaultIsEqual = (oldValue, newValue) => oldValue === newValue;
5
4
  /**
6
5
  * 前回の値を返すhook
6
+ *
7
+ * 値が変わったときに、レンダリング中のステート更新で前回値を更新する。
8
+ * 比較が毎回falseになる値(レンダリング中に作るオブジェクトや配列など)を渡すと
9
+ * 再レンダリングが止まらなくなるため、参照が安定した値を渡すか、`isEqual`を指定すること。
10
+ *
7
11
  * @param value 現在の値
8
12
  * @param options オプション
9
- * @returns 前回の値
13
+ * @returns 前回の値。値が一度も変わっていない場合は`initialValue`
10
14
  */
11
15
  function usePreviousValue(value, options = {}) {
12
- const isEqual = options.isEqual ?? defaultIsEqual;
13
- const [currentValue, setCurrentValue] = useState(options.initialValue);
16
+ const isEqual = options.isEqual ?? Object.is;
17
+ const [currentValue, setCurrentValue] = useState(value);
14
18
  const [prevValue, setPrevValue] = useState(options.initialValue);
15
19
  if (!isEqual(currentValue, value)) {
16
20
  setPrevValue(currentValue);
@@ -1,3 +1,5 @@
1
- const require_hooks_useStableLength_useStableLength = require('./useStableLength.cjs');
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
+ const require_hooks_useStableLength_useStableLength = require("./useStableLength.cjs");
2
3
 
3
- module.exports = require_hooks_useStableLength_useStableLength;
4
+ exports.default = require_hooks_useStableLength_useStableLength.default;
5
+ exports.useStableLength = require_hooks_useStableLength_useStableLength.default;
@@ -1,2 +1,2 @@
1
1
  import useStableLength from "./useStableLength.cjs";
2
- export = useStableLength;
2
+ export { useStableLength as default, useStableLength };
@@ -1,2 +1,2 @@
1
1
  import useStableLength from "./useStableLength.mjs";
2
- export { useStableLength as default };
2
+ export { useStableLength as default, useStableLength };
@@ -1,3 +1,3 @@
1
1
  import useStableLength from "./useStableLength.mjs";
2
2
 
3
- export { useStableLength as default };
3
+ export { useStableLength as default, useStableLength };
@@ -1,3 +1,4 @@
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
1
2
  let react = require("react");
2
3
 
3
4
  //#region src/hooks/useStableLength/useStableLength.ts
@@ -13,4 +14,4 @@ function useStableLength(arr) {
13
14
  }
14
15
 
15
16
  //#endregion
16
- module.exports = useStableLength;
17
+ exports.default = useStableLength;
@@ -5,5 +5,5 @@
5
5
  * @param arr 配列
6
6
  * @throws Error
7
7
  */
8
- declare function useStableLength(arr: unknown[]): void;
8
+ declare function useStableLength(arr: readonly unknown[]): void;
9
9
  export = useStableLength;
@@ -5,6 +5,5 @@
5
5
  * @param arr 配列
6
6
  * @throws Error
7
7
  */
8
- declare function useStableLength(arr: unknown[]): void;
9
- //#endregion
10
- export { useStableLength as default };
8
+ export default function useStableLength(arr: readonly unknown[]): void;
9
+ //#endregion
package/index.cjs CHANGED
@@ -1,16 +1,36 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_hooks_index = require('./hooks/index.cjs');
3
- const require_utils_index = require('./utils/index.cjs');
2
+ const require_utils_setRefCurrent_setRefCurrent = require("./utils/setRefCurrent/setRefCurrent.cjs");
3
+ const require_hooks_useStableLength_useStableLength = require("./hooks/useStableLength/useStableLength.cjs");
4
+ const require_hooks_useCombinedRefs_useCombinedRefs = require("./hooks/useCombinedRefs/useCombinedRefs.cjs");
5
+ const require_hooks_useConstant_useConstant = require("./hooks/useConstant/useConstant.cjs");
6
+ const require_utils_markAt_markAt = require("./utils/markAt/markAt.cjs");
7
+ const require_hooks_useExecutionAt_useExecutionAt = require("./hooks/useExecutionAt/useExecutionAt.cjs");
8
+ const require_hooks_useIsMounted_useIsMounted = require("./hooks/useIsMounted/useIsMounted.cjs");
9
+ const require_hooks_useLatestRef_useLatestRef = require("./hooks/useLatestRef/useLatestRef.cjs");
10
+ const require_hooks_usePreviousValue_usePreviousValue = require("./hooks/usePreviousValue/usePreviousValue.cjs");
11
+ require("./hooks/index.cjs");
12
+ const require_utils_applyDefaultProps_applyDefaultProps = require("./utils/applyDefaultProps/applyDefaultProps.cjs");
13
+ const require_utils_ensureComponent_ensureComponent = require("./utils/ensureComponent/ensureComponent.cjs");
14
+ const require_utils_extendElement_extendElement = require("./utils/extendElement/extendElement.cjs");
15
+ const require_utils_forEachContent_forEachContent = require("./utils/forEachContent/forEachContent.cjs");
16
+ const require_utils_forEachElement_forEachElement = require("./utils/forEachElement/forEachElement.cjs");
17
+ const require_utils_transformContent_transformContent = require("./utils/transformContent/transformContent.cjs");
18
+ const require_utils_transformElement_transformElement = require("./utils/transformElement/transformElement.cjs");
19
+ require("./utils/index.cjs");
4
20
 
5
- Object.defineProperty(exports, 'hooks', {
6
- enumerable: true,
7
- get: function () {
8
- return require_hooks_index.hooks_exports;
9
- }
10
- });
11
- Object.defineProperty(exports, 'utils', {
12
- enumerable: true,
13
- get: function () {
14
- return require_utils_index.utils_exports;
15
- }
16
- });
21
+ exports.applyDefaultProps = require_utils_applyDefaultProps_applyDefaultProps.default;
22
+ exports.ensureComponent = require_utils_ensureComponent_ensureComponent.default;
23
+ exports.extendElement = require_utils_extendElement_extendElement.default;
24
+ exports.forEachContent = require_utils_forEachContent_forEachContent.default;
25
+ exports.forEachElement = require_utils_forEachElement_forEachElement.default;
26
+ exports.markAt = require_utils_markAt_markAt.default;
27
+ exports.setRefCurrent = require_utils_setRefCurrent_setRefCurrent.default;
28
+ exports.transformContent = require_utils_transformContent_transformContent.default;
29
+ exports.transformElement = require_utils_transformElement_transformElement.default;
30
+ exports.useCombinedRefs = require_hooks_useCombinedRefs_useCombinedRefs.default;
31
+ exports.useConstant = require_hooks_useConstant_useConstant.default;
32
+ exports.useExecutionAt = require_hooks_useExecutionAt_useExecutionAt.default;
33
+ exports.useIsMounted = require_hooks_useIsMounted_useIsMounted.default;
34
+ exports.useLatestRef = require_hooks_useLatestRef_useLatestRef.default;
35
+ exports.usePreviousValue = require_hooks_usePreviousValue_usePreviousValue.default;
36
+ exports.useStableLength = require_hooks_useStableLength_useStableLength.default;
package/index.d.cts CHANGED
@@ -1,4 +1,26 @@
1
- import { index_d_exports } from "./hooks/index.cjs";
1
+ import useCombinedRefs from "./hooks/useCombinedRefs/useCombinedRefs.cjs";
2
+ import useConstant from "./hooks/useConstant/useConstant.cjs";
3
+ import { MarkAtResult } from "./utils/markAt/types.cjs";
4
+ import markAt from "./utils/markAt/markAt.cjs";
5
+ import { ExecutionFunction, ExecutionRequest, UseExecutionAtOptions, UseExecutionAtResult } from "./hooks/useExecutionAt/types.cjs";
6
+ import useExecutionAt from "./hooks/useExecutionAt/useExecutionAt.cjs";
7
+ import useIsMounted from "./hooks/useIsMounted/useIsMounted.cjs";
8
+ import { LatestRef } from "./hooks/useLatestRef/types.cjs";
9
+ import useLatestRef from "./hooks/useLatestRef/useLatestRef.cjs";
10
+ import { UsePreviousValueOptions } from "./hooks/usePreviousValue/types.cjs";
11
+ import usePreviousValue from "./hooks/usePreviousValue/usePreviousValue.cjs";
12
+ import useStableLength from "./hooks/useStableLength/useStableLength.cjs";
13
+ import "./hooks/index.cjs";
2
14
  import { CSSPropertiesWithVars } from "./types.cjs";
3
- import { index_d_exports as index_d_exports$1 } from "./utils/index.cjs";
4
- export { type CSSPropertiesWithVars, index_d_exports as hooks, index_d_exports$1 as utils };
15
+ import { AppliedProps, SkippedDefaults } from "./utils/applyDefaultProps/types.cjs";
16
+ import applyDefaultProps from "./utils/applyDefaultProps/applyDefaultProps.cjs";
17
+ import ensureComponent from "./utils/ensureComponent/ensureComponent.cjs";
18
+ import { ExtendableProps } from "./utils/extendElement/types.cjs";
19
+ import extendElement from "./utils/extendElement/extendElement.cjs";
20
+ import forEachContent from "./utils/forEachContent/forEachContent.cjs";
21
+ import forEachElement from "./utils/forEachElement/forEachElement.cjs";
22
+ import setRefCurrent from "./utils/setRefCurrent/setRefCurrent.cjs";
23
+ import transformContent from "./utils/transformContent/transformContent.cjs";
24
+ import transformElement from "./utils/transformElement/transformElement.cjs";
25
+ import "./utils/index.cjs";
26
+ export { type AppliedProps, type CSSPropertiesWithVars, type ExecutionFunction, type ExecutionRequest, type ExtendableProps, type LatestRef, type MarkAtResult, type SkippedDefaults, type UseExecutionAtOptions, type UseExecutionAtResult, type UsePreviousValueOptions, applyDefaultProps, ensureComponent, extendElement, forEachContent, forEachElement, markAt, setRefCurrent, transformContent, transformElement, useCombinedRefs, useConstant, useExecutionAt, useIsMounted, useLatestRef, usePreviousValue, useStableLength };
package/index.d.mts CHANGED
@@ -1,4 +1,26 @@
1
- import { index_d_exports } from "./hooks/index.mjs";
1
+ import useCombinedRefs from "./hooks/useCombinedRefs/useCombinedRefs.mjs";
2
+ import useConstant from "./hooks/useConstant/useConstant.mjs";
3
+ import { MarkAtResult } from "./utils/markAt/types.mjs";
4
+ import markAt from "./utils/markAt/markAt.mjs";
5
+ import { ExecutionFunction, ExecutionRequest, UseExecutionAtOptions, UseExecutionAtResult } from "./hooks/useExecutionAt/types.mjs";
6
+ import useExecutionAt from "./hooks/useExecutionAt/useExecutionAt.mjs";
7
+ import useIsMounted from "./hooks/useIsMounted/useIsMounted.mjs";
8
+ import { LatestRef } from "./hooks/useLatestRef/types.mjs";
9
+ import useLatestRef from "./hooks/useLatestRef/useLatestRef.mjs";
10
+ import { UsePreviousValueOptions } from "./hooks/usePreviousValue/types.mjs";
11
+ import usePreviousValue from "./hooks/usePreviousValue/usePreviousValue.mjs";
12
+ import useStableLength from "./hooks/useStableLength/useStableLength.mjs";
13
+ import "./hooks/index.mjs";
2
14
  import { CSSPropertiesWithVars } from "./types.mjs";
3
- import { index_d_exports as index_d_exports$1 } from "./utils/index.mjs";
4
- export { type CSSPropertiesWithVars, index_d_exports as hooks, index_d_exports$1 as utils };
15
+ import { AppliedProps, SkippedDefaults } from "./utils/applyDefaultProps/types.mjs";
16
+ import applyDefaultProps from "./utils/applyDefaultProps/applyDefaultProps.mjs";
17
+ import ensureComponent from "./utils/ensureComponent/ensureComponent.mjs";
18
+ import { ExtendableProps } from "./utils/extendElement/types.mjs";
19
+ import extendElement from "./utils/extendElement/extendElement.mjs";
20
+ import forEachContent from "./utils/forEachContent/forEachContent.mjs";
21
+ import forEachElement from "./utils/forEachElement/forEachElement.mjs";
22
+ import setRefCurrent from "./utils/setRefCurrent/setRefCurrent.mjs";
23
+ import transformContent from "./utils/transformContent/transformContent.mjs";
24
+ import transformElement from "./utils/transformElement/transformElement.mjs";
25
+ import "./utils/index.mjs";
26
+ export { type AppliedProps, type CSSPropertiesWithVars, type ExecutionFunction, type ExecutionRequest, type ExtendableProps, type LatestRef, type MarkAtResult, type SkippedDefaults, type UseExecutionAtOptions, type UseExecutionAtResult, type UsePreviousValueOptions, applyDefaultProps, ensureComponent, extendElement, forEachContent, forEachElement, markAt, setRefCurrent, transformContent, transformElement, useCombinedRefs, useConstant, useExecutionAt, useIsMounted, useLatestRef, usePreviousValue, useStableLength };
package/index.mjs CHANGED
@@ -1,4 +1,20 @@
1
- import { hooks_exports } from "./hooks/index.mjs";
2
- import { utils_exports } from "./utils/index.mjs";
1
+ import setRefCurrent from "./utils/setRefCurrent/setRefCurrent.mjs";
2
+ import useStableLength from "./hooks/useStableLength/useStableLength.mjs";
3
+ import useCombinedRefs from "./hooks/useCombinedRefs/useCombinedRefs.mjs";
4
+ import useConstant from "./hooks/useConstant/useConstant.mjs";
5
+ import markAt from "./utils/markAt/markAt.mjs";
6
+ import useExecutionAt from "./hooks/useExecutionAt/useExecutionAt.mjs";
7
+ import useIsMounted from "./hooks/useIsMounted/useIsMounted.mjs";
8
+ import useLatestRef from "./hooks/useLatestRef/useLatestRef.mjs";
9
+ import usePreviousValue from "./hooks/usePreviousValue/usePreviousValue.mjs";
10
+ import "./hooks/index.mjs";
11
+ import applyDefaultProps from "./utils/applyDefaultProps/applyDefaultProps.mjs";
12
+ import ensureComponent from "./utils/ensureComponent/ensureComponent.mjs";
13
+ import extendElement from "./utils/extendElement/extendElement.mjs";
14
+ import forEachContent from "./utils/forEachContent/forEachContent.mjs";
15
+ import forEachElement from "./utils/forEachElement/forEachElement.mjs";
16
+ import transformContent from "./utils/transformContent/transformContent.mjs";
17
+ import transformElement from "./utils/transformElement/transformElement.mjs";
18
+ import "./utils/index.mjs";
3
19
 
4
- export { hooks_exports as hooks, utils_exports as utils };
20
+ export { applyDefaultProps, ensureComponent, extendElement, forEachContent, forEachElement, markAt, setRefCurrent, transformContent, transformElement, useCombinedRefs, useConstant, useExecutionAt, useIsMounted, useLatestRef, usePreviousValue, useStableLength };