@unicom-cloud/ui-common 0.1.20 → 0.1.22

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 (314) hide show
  1. package/.virtual/_rolldown/runtime.js +1 -1
  2. package/.vite/manifest.json +229 -75
  3. package/development/Development.d.ts +8 -0
  4. package/development/Development.js +36 -0
  5. package/development/index.d.ts +2 -7
  6. package/development/index.js +5 -32
  7. package/development/interface.d.ts +1 -1
  8. package/empty/Empty.d.ts +5 -0
  9. package/empty/Empty.js +40 -0
  10. package/empty/index.d.ts +2 -4
  11. package/empty/index.js +5 -36
  12. package/empty/interface.d.ts +1 -1
  13. package/flex/Flex.d.ts +6 -0
  14. package/flex/Flex.js +52 -0
  15. package/flex/index.d.ts +4 -5
  16. package/flex/index.js +6 -50
  17. package/flex/utils.d.ts +2 -12
  18. package/flex/utils.js +1 -1
  19. package/higher-order/index.js +1 -1
  20. package/higher-order/with-speech-synthesis/index.d.ts +3 -6
  21. package/higher-order/with-speech-synthesis/index.js +5 -73
  22. package/higher-order/with-speech-synthesis/withSpeechSynthesis.d.ts +7 -0
  23. package/higher-order/with-speech-synthesis/withSpeechSynthesis.js +75 -0
  24. package/hooks/create-deep-compare-effect/index.js +1 -1
  25. package/hooks/create-update-effect/index.js +3 -3
  26. package/hooks/create-use-storage-state/index.d.ts +1 -1
  27. package/hooks/create-use-storage-state/index.js +2 -2
  28. package/hooks/index.d.ts +1 -2
  29. package/hooks/index.js +90 -91
  30. package/hooks/use-async-effect/index.js +1 -1
  31. package/hooks/use-boolean/index.js +1 -1
  32. package/hooks/use-click-away/index.js +1 -1
  33. package/hooks/use-computed-state/index.js +1 -1
  34. package/hooks/use-controllable-value/index.d.ts +5 -5
  35. package/hooks/use-controllable-value/index.js +29 -14
  36. package/hooks/use-cookie-state/index.js +1 -1
  37. package/hooks/use-count-down/index.js +1 -1
  38. package/hooks/use-counter/index.js +1 -1
  39. package/hooks/use-create/index.js +1 -1
  40. package/hooks/use-creation/index.js +1 -1
  41. package/hooks/use-debounce/index.js +1 -1
  42. package/hooks/use-debounce-effect/index.js +1 -1
  43. package/hooks/use-debounce-fn/index.js +1 -1
  44. package/hooks/use-deep-compare-effect/index.js +1 -1
  45. package/hooks/use-deep-compare-layout-effect/index.js +1 -1
  46. package/hooks/use-document-visibility/index.js +1 -1
  47. package/hooks/use-drag/index.js +2 -2
  48. package/hooks/use-drop/index.js +3 -3
  49. package/hooks/use-effect-event/index.d.ts +2 -2
  50. package/hooks/use-effect-event/index.js +5 -14
  51. package/hooks/use-event/index.js +1 -1
  52. package/hooks/use-event-emitter/index.d.ts +2 -2
  53. package/hooks/use-event-emitter/index.js +1 -1
  54. package/hooks/use-event-listener/index.js +1 -1
  55. package/hooks/use-event-target/index.js +1 -1
  56. package/hooks/use-external/index.js +1 -1
  57. package/hooks/use-favicon/index.js +1 -1
  58. package/hooks/use-focus-within/index.js +1 -1
  59. package/hooks/use-force-update/index.js +1 -1
  60. package/hooks/use-fullscreen/index.js +1 -1
  61. package/hooks/use-get-state/index.d.ts +1 -1
  62. package/hooks/use-get-state/index.js +1 -1
  63. package/hooks/use-history-travel/index.js +1 -1
  64. package/hooks/use-hover/index.js +1 -1
  65. package/hooks/use-id/index.js +1 -1
  66. package/hooks/use-in-viewport/index.d.ts +3 -1
  67. package/hooks/use-in-viewport/index.js +16 -15
  68. package/hooks/use-infinite-scroll/index.js +54 -53
  69. package/hooks/use-intersection-observer/index.d.ts +1 -1
  70. package/hooks/use-intersection-observer/index.js +2 -2
  71. package/hooks/use-intersection-observers/index.js +1 -1
  72. package/hooks/use-interval/index.js +1 -1
  73. package/hooks/use-is-first-render/index.js +1 -1
  74. package/hooks/use-isomorphic-layout-effect/index.js +1 -1
  75. package/hooks/use-key-press/index.js +1 -1
  76. package/hooks/use-keyboard-event/index.js +1 -1
  77. package/hooks/use-latest/index.js +1 -1
  78. package/hooks/use-listen-window-resize/index.js +1 -1
  79. package/hooks/use-local-storage-state/index.js +1 -1
  80. package/hooks/use-lock-fn/index.js +1 -1
  81. package/hooks/use-long-press/index.js +1 -1
  82. package/hooks/use-map/index.js +1 -1
  83. package/hooks/use-media/index.js +12 -11
  84. package/hooks/use-memo/index.js +3 -3
  85. package/hooks/use-memoized-fn/index.js +1 -1
  86. package/hooks/use-merge-props/index.d.ts +1 -1
  87. package/hooks/use-merge-props/index.js +5 -9
  88. package/hooks/use-merge-value/index.js +5 -5
  89. package/hooks/use-mobile/index.js +3 -3
  90. package/hooks/use-mount/index.d.ts +2 -1
  91. package/hooks/use-mount/index.js +10 -7
  92. package/hooks/use-mouse/index.js +1 -1
  93. package/hooks/use-move/index.js +1 -1
  94. package/hooks/use-mutation-observer/index.js +1 -1
  95. package/hooks/use-mutation-observers/index.js +1 -1
  96. package/hooks/use-network/index.js +1 -1
  97. package/hooks/use-online-status/index.js +1 -1
  98. package/hooks/use-overflow-hidden/index.js +2 -2
  99. package/hooks/use-override-ref/index.js +6 -6
  100. package/hooks/use-pagination/index.js +1 -1
  101. package/hooks/use-paste-image/index.js +1 -1
  102. package/hooks/use-persist-callback/index.d.ts +2 -1
  103. package/hooks/use-persist-callback/index.js +4 -7
  104. package/hooks/use-prefers-color-scheme-dark/index.js +1 -1
  105. package/hooks/use-previous/index.d.ts +1 -1
  106. package/hooks/use-previous/index.js +4 -4
  107. package/hooks/use-raf-interval/index.js +1 -1
  108. package/hooks/use-raf-state/index.js +1 -1
  109. package/hooks/use-raf-timeout/index.js +1 -1
  110. package/hooks/use-reactive/index.js +1 -1
  111. package/hooks/use-ref-latest/index.js +1 -1
  112. package/hooks/use-refs/index.js +13 -13
  113. package/hooks/use-request/index.js +1 -1
  114. package/hooks/use-request/src/Fetch.js +1 -1
  115. package/hooks/use-request/src/plugins/useAutoRunPlugin.js +1 -1
  116. package/hooks/use-request/src/plugins/useCachePlugin.js +1 -1
  117. package/hooks/use-request/src/plugins/useDebouncePlugin.js +20 -19
  118. package/hooks/use-request/src/plugins/useLoadingDelayPlugin.js +1 -1
  119. package/hooks/use-request/src/plugins/usePollingPlugin.js +1 -1
  120. package/hooks/use-request/src/plugins/useRefreshOnWindowFocusPlugin.js +1 -1
  121. package/hooks/use-request/src/plugins/useRetryPlugin.js +1 -1
  122. package/hooks/use-request/src/plugins/useThrottlePlugin.js +18 -17
  123. package/hooks/use-request/src/useRequest.js +1 -1
  124. package/hooks/use-request/src/useRequestImplement.js +1 -1
  125. package/hooks/use-request/src/utils/cache.js +17 -10
  126. package/hooks/use-request/src/utils/cachePromise.js +1 -1
  127. package/hooks/use-request/src/utils/cacheSubscribe.js +1 -1
  128. package/hooks/use-request/src/utils/isDocumentVisible.js +1 -1
  129. package/hooks/use-request/src/utils/isOnline.js +1 -1
  130. package/hooks/use-request/src/utils/limit.js +1 -1
  131. package/hooks/use-request/src/utils/subscribeFocus.js +1 -1
  132. package/hooks/use-request/src/utils/subscribeReVisible.js +1 -1
  133. package/hooks/use-reset-state/index.js +1 -1
  134. package/hooks/use-resize-observer/index.js +1 -1
  135. package/hooks/use-resize-observers/index.js +1 -1
  136. package/hooks/use-responsive/index.js +1 -1
  137. package/hooks/use-safe-state/index.js +1 -1
  138. package/hooks/use-scroll/index.d.ts +1 -1
  139. package/hooks/use-scroll/index.js +1 -1
  140. package/hooks/use-selections/index.js +1 -1
  141. package/hooks/use-session-storage-state/index.js +1 -1
  142. package/hooks/use-set/index.js +1 -1
  143. package/hooks/use-set-state/index.d.ts +4 -2
  144. package/hooks/use-set-state/index.js +19 -14
  145. package/hooks/use-size/index.js +1 -1
  146. package/hooks/use-state-callback/index.d.ts +8 -3
  147. package/hooks/use-state-callback/index.js +16 -9
  148. package/hooks/use-state-with-promise/index.js +14 -13
  149. package/hooks/use-sync-state/index.js +3 -3
  150. package/hooks/use-text-selection/index.js +1 -1
  151. package/hooks/use-theme/index.js +1 -1
  152. package/hooks/use-throttle/index.js +1 -1
  153. package/hooks/use-throttle-effect/index.js +1 -1
  154. package/hooks/use-throttle-fn/index.js +1 -1
  155. package/hooks/use-timeout/index.js +1 -1
  156. package/hooks/use-title/index.js +1 -1
  157. package/hooks/use-toggle/index.js +1 -1
  158. package/hooks/use-tracked-effect/index.js +1 -1
  159. package/hooks/use-unmount/index.js +1 -1
  160. package/hooks/use-unmounted-ref/index.js +1 -1
  161. package/hooks/use-update/index.js +5 -2
  162. package/hooks/use-update-effect/index.js +1 -1
  163. package/hooks/use-update-layout-effect/index.js +1 -1
  164. package/hooks/use-url-state/index.js +1 -1
  165. package/hooks/use-virtual-list/index.js +1 -1
  166. package/hooks/use-watch/index.js +1 -1
  167. package/hooks/use-web-socket/index.js +1 -1
  168. package/hooks/use-why-did-you-update/index.js +1 -1
  169. package/hooks/use-window-size/index.js +1 -1
  170. package/hooks/utils/createEffectWithTarget.js +1 -1
  171. package/hooks/utils/depsAreSame.js +1 -1
  172. package/hooks/utils/depsEqual.js +1 -1
  173. package/hooks/utils/domTarget.js +1 -1
  174. package/hooks/utils/getDocumentOrShadow.js +1 -1
  175. package/hooks/utils/index.js +1 -1
  176. package/hooks/utils/isAppleDevice.js +1 -1
  177. package/hooks/utils/isBrowser.js +1 -1
  178. package/hooks/utils/isDev.js +1 -1
  179. package/hooks/utils/rect.js +1 -1
  180. package/hooks/utils/useDeepCompareWithTarget.js +1 -1
  181. package/hooks/utils/useEffectWithTarget.js +1 -1
  182. package/hooks/utils/useIsomorphicLayoutEffectWithTarget.js +1 -1
  183. package/hooks/utils/useLayoutEffectWithTarget.js +1 -1
  184. package/icons/file/IconFile.d.ts +4 -0
  185. package/icons/file/IconFile.js +55 -0
  186. package/icons/file/index.d.ts +2 -3
  187. package/icons/file/index.js +5 -53
  188. package/icons/file/interface.d.ts +1 -1
  189. package/index.js +652 -616
  190. package/interface.d.ts +3 -0
  191. package/package.json +1 -1
  192. package/progress/Progress.d.ts +409 -0
  193. package/progress/Progress.js +90 -0
  194. package/progress/index.d.ts +22 -407
  195. package/progress/index.js +4 -87
  196. package/resize-observer/Collection.d.ts +1 -2
  197. package/resize-observer/Collection.js +16 -16
  198. package/resize-observer/ResizeObserver.d.ts +6 -0
  199. package/resize-observer/ResizeObserver.js +23 -0
  200. package/resize-observer/SingleObserver.d.ts +3 -3
  201. package/resize-observer/SingleObserver.js +20 -20
  202. package/resize-observer/index.d.ts +4 -4
  203. package/resize-observer/index.js +6 -21
  204. package/resize-observer/observerUtil.js +1 -1
  205. package/space/Space.d.ts +5 -0
  206. package/space/Space.js +76 -0
  207. package/space/index.d.ts +4 -4
  208. package/space/index.js +5 -71
  209. package/space/interface.d.ts +1 -1
  210. package/style/animation.less +1 -4
  211. package/style.css +1 -1
  212. package/suspense-fallback-test/SuspenseFallbackTest.d.ts +6 -0
  213. package/suspense-fallback-test/SuspenseFallbackTest.js +13 -0
  214. package/suspense-fallback-test/index.d.ts +2 -6
  215. package/suspense-fallback-test/index.js +5 -6
  216. package/test.js +1 -1
  217. package/timer/Timer.d.ts +3 -0
  218. package/timer/Timer.js +40 -0
  219. package/timer/index.d.ts +2 -2
  220. package/timer/index.js +5 -35
  221. package/timer/interface.d.ts +1 -1
  222. package/transition/Transition.d.ts +1 -8
  223. package/transition/Transition.js +76 -68
  224. package/transition/TransitionCSS.d.ts +1 -2
  225. package/transition/TransitionCSS.js +36 -23
  226. package/transition/TransitionGroup.d.ts +6 -6
  227. package/transition/TransitionGroup.js +51 -50
  228. package/transition/TransitionStyle.d.ts +1 -2
  229. package/transition/TransitionStyle.js +33 -38
  230. package/transition/constants.d.ts +8 -2
  231. package/transition/constants.js +38 -30
  232. package/transition/context.d.ts +15 -0
  233. package/transition/context.js +8 -0
  234. package/transition/index.d.ts +14 -7
  235. package/transition/index.js +10 -9
  236. package/transition/interface.d.ts +29 -22
  237. package/transition/utils.d.ts +3 -2
  238. package/transition/utils.js +69 -67
  239. package/utils/callOrReturn.js +1 -1
  240. package/utils/callbackOriginRef.js +1 -1
  241. package/utils/caseName.js +1 -1
  242. package/utils/className.js +1 -1
  243. package/utils/constant.d.ts +2 -0
  244. package/utils/constant.js +3 -3
  245. package/utils/copy.js +1 -1
  246. package/utils/date.js +1 -1
  247. package/utils/dayjs.js +1 -1
  248. package/utils/dom.js +1 -1
  249. package/utils/emitter.js +1 -1
  250. package/utils/fileRead.js +1 -1
  251. package/utils/fileToDataURL.js +1 -1
  252. package/utils/fillNBSP.d.ts +1 -1
  253. package/utils/fillNBSP.js +1 -1
  254. package/utils/findRootElement.d.ts +1 -1
  255. package/utils/findRootElement.js +1 -1
  256. package/utils/findScrollParent.d.ts +1 -1
  257. package/utils/findScrollParent.js +1 -1
  258. package/utils/getHighlightText.js +2 -2
  259. package/utils/getHotkeyHandler.js +1 -1
  260. package/utils/getScrollBarHeight.js +1 -1
  261. package/utils/getScrollBarSize.js +16 -6
  262. package/utils/getScrollBarWidth.js +1 -1
  263. package/utils/getStringLength.js +1 -1
  264. package/utils/include.js +1 -1
  265. package/utils/index.d.ts +1 -0
  266. package/utils/index.js +331 -317
  267. package/utils/intersectionObserver.d.ts +1 -1
  268. package/utils/intersectionObserver.js +1 -1
  269. package/utils/is.d.ts +2 -2
  270. package/utils/is.js +15 -15
  271. package/utils/keyboardCode.js +1 -1
  272. package/utils/lodash.d.ts +5 -1
  273. package/utils/lodash.js +31 -27
  274. package/utils/math.js +1 -1
  275. package/utils/mergeProps.d.ts +1 -1
  276. package/utils/mergeProps.js +7 -7
  277. package/utils/mergedToString.js +1 -1
  278. package/utils/mutationObserver.d.ts +1 -1
  279. package/utils/mutationObserver.js +1 -1
  280. package/utils/object.d.ts +1 -0
  281. package/utils/object.js +10 -0
  282. package/utils/omit.d.ts +1 -5
  283. package/utils/omit.js +3 -3
  284. package/utils/pad.js +1 -1
  285. package/utils/pick.d.ts +2 -7
  286. package/utils/pick.js +6 -6
  287. package/utils/pinyin.js +1 -1
  288. package/utils/react19Adapter.js +1 -1
  289. package/utils/ref.js +1 -1
  290. package/utils/resizeObserver.d.ts +1 -1
  291. package/utils/resizeObserver.js +1 -1
  292. package/utils/saveAs.js +1 -1
  293. package/utils/screenfull.js +1 -1
  294. package/utils/scrollIntoViewIfNeeded.js +1 -1
  295. package/utils/setCreateRoot.js +1 -1
  296. package/utils/setDarkTheme.js +1 -1
  297. package/utils/setDir.js +1 -1
  298. package/utils/setPrimaryColor.js +1 -1
  299. package/utils/setTheme.js +1 -1
  300. package/utils/string.js +1 -1
  301. package/utils/style.js +1 -1
  302. package/utils/throttleByRaf.js +1 -1
  303. package/utils/throttleByRaf2.d.ts +1 -1
  304. package/utils/throttleByRaf2.js +1 -1
  305. package/utils/tinycolor.js +1 -1
  306. package/utils/toArray.js +1 -1
  307. package/utils/tree.js +1 -1
  308. package/utils/tween.js +1 -1
  309. package/utils/uuid.js +1 -1
  310. package/utils/validate.js +1 -1
  311. package/utils/warning.js +1 -1
  312. package/version/index.js +11 -11
  313. package/hooks/use-in-view/index.d.ts +0 -11
  314. package/hooks/use-in-view/index.js +0 -21
@@ -1,92 +1,100 @@
1
- /* 潘启宝 2026-04-14 16:51:31 星期二 */
1
+ /* 潘启宝 2026-05-08 09:02:53 星期五 */
2
2
  import { isFunction as e, isNull as t, isUndefined as n } from "../utils/is.js";
3
3
  import r from "../hooks/use-latest/index.js";
4
4
  import i from "../hooks/use-create/index.js";
5
5
  import a from "../hooks/use-update-effect/index.js";
6
6
  import { forceReflow as ee } from "../utils/dom.js";
7
- import o from "../utils/findRootElement.js";
7
+ import te from "../utils/findRootElement.js";
8
+ import o from "../hooks/use-set-state/index.js";
8
9
  import s from "../hooks/use-update-layout-effect/index.js";
9
- import { defaults as c } from "../utils/lodash.js";
10
- import l from "../hooks/use-is-first-render/index.js";
10
+ import { defaults as ne } from "../utils/lodash.js";
11
+ import re from "../hooks/use-is-first-render/index.js";
11
12
  import "../hooks/index.js";
12
- import { TRANSITION_DEFAULT_PROPS as u, TRANSITION_EVENT_MAP as d, TRANSITION_EVENT_NAME_KEY as f, TRANSITION_MOUNT_ON_ENTER_KEY as p, TRANSITION_NEXT_PHASE_KEY as te, TRANSITION_UNMOUNT_ON_EXIT_KEY as ne, TransitionPhase as m, TransitionPhaseEvent as h } from "./constants.js";
13
- import { getDurations as re, isActivePhaseHandler as g, isAppearPhaseHandler as _, isEnterPhaseHandler as v, isExitDonePhaseHandler as y, isExitPhaseHandler as b } from "./utils.js";
14
- import x, { useDeferredValue as S, useEffect as C, useLayoutEffect as ie, useRef as ae, useState as oe, useTransition as se } from "react";
13
+ import { TRANSITION_ADD_END_LISTENER_KEY as c, TRANSITION_ALWAYS_MOUNTED_KEY as l, TRANSITION_DEFAULT_PROPS as u, TRANSITION_DURATION_KEY as ie, TRANSITION_EVENT_MAP as d, TRANSITION_EVENT_NAME_KEY as f, TRANSITION_MOUNT_ON_ENTER_KEY as ae, TRANSITION_NEXT_PHASE_KEY as oe, TRANSITION_PHASE_APPEAR as p, TRANSITION_PHASE_APPEAR_DONE as se, TRANSITION_PHASE_ENTER as m, TRANSITION_PHASE_ENTER_DONE as ce, TRANSITION_PHASE_EXIT as h, TRANSITION_PHASE_EXIT_DONE as g, TRANSITION_UNMOUNT_ON_EXIT_KEY as le } from "./constants.js";
14
+ import { TransitionContext as _, TransitionGroupContext as v } from "./context.js";
15
+ import { isActivePhaseHandler as ue, isAppearPhaseHandler as de, isEnterPhaseHandler as fe, isExitDonePhaseHandler as pe, isExitPhaseHandler as y, transitionNormalizeDurations as me } from "./utils.js";
16
+ import { forwardRef as b, memo as x, useContext as he, useDeferredValue as ge, useEffect as S, useImperativeHandle as _e, useLayoutEffect as C, useRef as w, useTransition as T } from "react";
17
+ import { jsx as E } from "react/jsx-runtime";
15
18
  //#region components/common/transition/Transition.tsx
16
- var { APPEAR: w, APPEAR_ACTIVE: T, APPEAR_DONE: E, ENTER: D, ENTER_ACTIVE: O, ENTER_DONE: k, EXIT: A, EXIT_ACTIVE: j, EXIT_DONE: M } = m, { ON_ENTER: N, ON_ENTERING: P, ON_ENTERED: F, ON_EXIT: I, ON_EXITING: L, ON_EXITED: R } = h, { setTimeout: ce, clearTimeout: z, requestAnimationFrame: B, cancelAnimationFrame: V } = window, H = u;
17
- function U(u) {
18
- let m = c({}, u, H), { children: h, in: x, [w]: T, [D]: O, [A]: j, duration: N = 500, alwaysMounted: P, addEndListener: F, refElement: I, [p]: L, [ne]: R } = m;
19
- i(() => {});
20
- let U = l(), W = ae({ hasShown: x }), G = P;
21
- "unmountOnExit" in m && (G = !R), "mountOnEnter" in m && (U || !W.current.hasShown) && (G = !L);
22
- let [le, ue] = oe(() => {
23
- let e = pe();
24
- return {
25
- phase: e,
26
- destroy: X(e)
27
- };
28
- }), { phase: K, destroy: q } = le, J = S(q), [de, fe] = se();
19
+ var { setTimeout: D, clearTimeout: O, requestAnimationFrame: k, cancelAnimationFrame: A } = window, j = { ...u };
20
+ function M(u, b) {
21
+ he(v);
22
+ let x = ne({}, u, j), M = "hasShown", N = "refElement", { children: P, in: F, [p]: I, [m]: L, [h]: R, [ie]: ve = 500, [l]: ye, [c]: be, [ae]: z, [le]: B, [N]: xe } = x;
23
+ i(() => {}), re();
24
+ let V = w({ [M]: F }), H = V.current[M], U = ye;
25
+ "unmountOnExit" in x && !n(B) && (U = !B);
26
+ let W = "mountOnEnter" in x && !n(z);
27
+ W && (H || (U = !z));
28
+ let [G, Se, Ce] = o(() => X(Y())), { phase: K, destroy: q } = G, J = ge(q, q);
29
29
  r(K);
30
- function pe() {
31
- let e = M;
32
- return x && (e = T ? w : E), e;
33
- }
30
+ let [we, Te] = T();
34
31
  function Y() {
35
- return o(I);
32
+ let e = g;
33
+ return F && (e = I ? p : se), e;
36
34
  }
37
35
  function X(e) {
38
- return G ? void 0 : y(e);
39
- }
40
- function Z(e) {
41
- e && (ee(Y()), x || Q(e), ue((t) => ({
42
- ...t,
36
+ return {
43
37
  phase: e,
44
- destroy: X(e)
45
- })));
38
+ destroy: Ee(e)
39
+ };
40
+ }
41
+ function Z() {
42
+ let { [N]: e } = x;
43
+ return te(e);
44
+ }
45
+ function Ee(e) {
46
+ return U ? void 0 : pe(e);
46
47
  }
47
48
  function Q(t) {
48
- let n = d[t]?.[f], { [n]: r } = m;
49
- return e(r) && r(Y()), t;
49
+ if (t) {
50
+ {
51
+ let n = Z(), { onBeforePhaseChange: r } = x;
52
+ e(r) && r(t, n), ee(n);
53
+ }
54
+ Se(X(t));
55
+ }
50
56
  }
51
- ie(() => {
52
- let { onPhaseChange: t } = m;
53
- return e(t) && t(K, Y()), () => {};
54
- }, [K]), C(() => (x && Q(K), () => {}), [K, L]), s(() => {
55
- let e, t = b(K);
56
- return x ? (W.current.hasShown = !0, t && (e = O ? D : k)) : t || (e = j ? A : M), Z(e || K), () => {};
57
- }, [x]), C(() => {
58
- let n = null, r = null, i = d[K]?.[te];
59
- if (i && K !== i) if (g(K)) if (e(F)) F(K, (e) => {
60
- Z(i);
61
- });
57
+ C(() => {
58
+ if (!(W && !z && !H)) {
59
+ let t = d[K]?.[f], { [t]: n } = x;
60
+ e(n) && n(Z());
61
+ }
62
+ return () => {};
63
+ }, [K]), a(() => {
64
+ let { onAfterPhaseChange: t } = x;
65
+ return e(t) && t(K, Z()), () => {};
66
+ }, [K]), s(() => {
67
+ let e, t = y(K);
68
+ return F ? (V.current[M] = !0, t && (e = L ? m : ce)) : t || (e = R ? h : g), Q(e || K), () => {};
69
+ }, [F]), S(() => {
70
+ let { [c]: n } = x, r = null, i = null, a = d[K]?.[oe];
71
+ if (a && K !== a) if (ue(K)) if (e(n)) n(K, (e = a) => {
72
+ Q(e || a);
73
+ }, Z());
62
74
  else {
63
- let e = re(N), t = e[D];
64
- _(K) ? t = e[w] : v(K) ? t = e[D] : b(K) && (t = e[A]), n = ce((e) => {
65
- Z(e || i);
66
- }, t, i);
75
+ let e = me(ve), t = e[m];
76
+ t = de(K) ? e[p] : fe(K) ? e[m] : y(K) ? e[h] : e[m], r = D((e = a) => {
77
+ Q(e || a);
78
+ }, t, a);
67
79
  }
68
- else r = B(() => {
69
- Z(i);
80
+ else i = k(() => {
81
+ Q(a);
70
82
  });
71
83
  return () => {
72
- t(n) || z(n), t(r) || V(r);
84
+ t(r) || O(r), t(i) || A(i);
73
85
  };
74
- }, [K]), a(() => () => {}, []), C(() => () => {}, []);
75
- {
76
- let e = !0;
77
- if (n(q) || (j ? x ? q && (e = !1) : J && (e = !1) : x || J && (e = !1)), !e) return null;
78
- }
79
- let $ = h;
80
- if (e($)) {
81
- let e = Object.keys(d).reduce((e, t, n, r) => ({
82
- ...e,
83
- [t]: K === t
84
- }), {});
85
- $ = $(e, K);
86
- }
87
- return $;
86
+ }, [K]), s(() => () => {}, []), C(() => () => {}, []), a(() => () => {}, []), S(() => () => {}, []), _e(b, () => ({
87
+ getState: Ce,
88
+ getInitPhase: Y,
89
+ getRootElement: Z
90
+ }));
91
+ let $ = P;
92
+ return n(q) || (R ? F ? q && ($ = null) : J && ($ = null) : F || J && ($ = null)), e($) && ($ = $(x, G, K)), $ = /* @__PURE__ */ E(_.Provider, {
93
+ value: { phase: K },
94
+ children: $
95
+ }), $;
88
96
  }
89
- var W = x.memo(U);
97
+ var N = x(b(M));
90
98
  //#endregion
91
- export { W as Transition, W as default };
99
+ export { N as Transition, N as default };
92
100
  /* 独立思考,明辨是非 */
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { TransitionCSS_Props } from './interface';
3
2
  /**
4
3
  * `TransitionCSS` 组件根据过渡生命周期的阶段应用 CSS 过渡效果。
@@ -6,6 +5,6 @@ import type { TransitionCSS_Props } from './interface';
6
5
  * 并将它们应用到 `children` 元素上。
7
6
  */
8
7
  declare function Component(props: TransitionCSS_Props): import("react/jsx-runtime").JSX.Element;
9
- declare const TransitionCSS: React.MemoExoticComponent<typeof Component>;
8
+ declare const TransitionCSS: import("react").MemoExoticComponent<typeof Component>;
10
9
  export { TransitionCSS };
11
10
  export default TransitionCSS;
@@ -1,33 +1,46 @@
1
- /* 潘启宝 2026-04-14 16:51:31 星期二 */
2
- import { isObjectLike as e, isString as t } from "../utils/is.js";
3
- import n from "../utils/className.js";
4
- import { TRANSITION_CSS_CLASS_NAMES_SUFFIX as r, TransitionPhase as i, TransitionPhaseEvent as a } from "./constants.js";
5
- import { Transition as o } from "./Transition.js";
6
- import s, { cloneElement as c, isValidElement as l } from "react";
7
- import { jsx as u } from "react/jsx-runtime";
1
+ /* 潘启宝 2026-05-08 09:02:53 星期五 */
2
+ import { isPlainObject as e, isString as t, isStringAndExist as n } from "../utils/is.js";
3
+ import r from "../utils/className.js";
4
+ import { TRANSITION_CSS_CLASS_NAMES_SUFFIX as i, TRANSITION_PHASE_APPEAR as a } from "./constants.js";
5
+ import { TransitionCSS_Context as o } from "./context.js";
6
+ import { isAppearPhaseHandler as s, transitionFallbackAppearToEnter as c } from "./utils.js";
7
+ import { Transition as l } from "./Transition.js";
8
+ import { cloneElement as u, isValidElement as d, memo as f } from "react";
9
+ import { jsx as p } from "react/jsx-runtime";
8
10
  //#region components/common/transition/TransitionCSS.tsx
9
- var { APPEAR: d, APPEAR_ACTIVE: f, APPEAR_DONE: p, ENTER: m, ENTER_ACTIVE: h, ENTER_DONE: g, EXIT: _, EXIT_ACTIVE: v, EXIT_DONE: y } = i, { ON_ENTER: b, ON_ENTERING: x, ON_ENTERED: S, ON_EXIT: C, ON_EXITING: w, ON_EXITED: T } = a;
10
- function E(i) {
11
- let { children: a, classNames: o, phase: s } = i;
12
- if (!l(a)) return null;
13
- if (!o) return a;
14
- let u;
15
- if (t(o) ? u = `${o}-${r[s]}` : e(o) && (u = o[s]), !u) return a;
16
- let { className: d } = a.props;
17
- return c(a, { className: n(d, u) });
11
+ function m(l) {
12
+ let { children: f, classNames: m = "", phase: h, [a]: g } = l;
13
+ if (!d(f)) return null;
14
+ if (!m) return f;
15
+ let _ = "";
16
+ if (t(m)) {
17
+ let e = i[h];
18
+ n(e) && (_ = `${m}-${e}`);
19
+ } else if (e(m)) {
20
+ let e = { ...m };
21
+ g && s(h) && Object.assign(e, c(e)), _ = e[h] ?? "";
22
+ }
23
+ if (!n(_)) return f;
24
+ let { className: v } = f.props, y = r(v, _), b = f;
25
+ return b = /* @__PURE__ */ p(o.Provider, {
26
+ value: { className: _ },
27
+ children: u(b, { className: y })
28
+ }), b;
18
29
  }
19
- function D(e) {
20
- let { children: t, classNames: n, ...r } = e;
21
- return /* @__PURE__ */ u(o, {
30
+ function h(e) {
31
+ let { children: t, classNames: n = "", ...r } = e;
32
+ return /* @__PURE__ */ p(l, {
22
33
  ...r,
23
- children: (e, r) => /* @__PURE__ */ u(E, {
34
+ children: (e, r, i) => /* @__PURE__ */ p(m, {
35
+ ...e,
24
36
  classNames: n,
25
- phase: r,
37
+ phase: i,
26
38
  children: t
27
39
  })
28
40
  });
29
41
  }
30
- var O = s.memo(D);
42
+ var g = f(h);
43
+ g.displayName = "TransitionCSS";
31
44
  //#endregion
32
- export { O as TransitionCSS, O as default };
45
+ export { g as TransitionCSS, g as default };
33
46
  /* 独立思考,明辨是非 */
@@ -1,11 +1,11 @@
1
- import React from 'react';
1
+ import { ReactElement } from 'react';
2
2
  import type { TransitionGroupProps } from './interface';
3
3
  /**
4
- * `TransitionGroup` 组件处理一组 `Transition` 子元素
5
- * 并在元素进入和退出 DOM 时应用过渡动画。
6
- * 它可用于为多个元素设置动画,控制它们在容器中的出现和移除。
4
+ * TransitionGroup 组件用于管理一组 Transition 子元素
5
+ * 并在元素进入和退出 DOM 时自动应用过渡动画。
6
+ * 该组件可用于为多个元素设置动画,控制它们在容器中的显示和移除。
7
7
  */
8
- declare function Component(baseProps: TransitionGroupProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>[];
9
- declare const TransitionGroup: React.MemoExoticComponent<typeof Component>;
8
+ declare function Component(baseProps: TransitionGroupProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>[];
9
+ declare const TransitionGroup: import("react").MemoExoticComponent<typeof Component>;
10
10
  export { TransitionGroup };
11
11
  export default TransitionGroup;
@@ -1,62 +1,63 @@
1
- /* 潘启宝 2026-04-14 16:51:31 星期二 */
2
- import e from "../hooks/use-isomorphic-layout-effect/index.js";
3
- import { defaults as t } from "../utils/lodash.js";
4
- import { TRANSITION_DEFAULT_PROPS as n, TransitionPhase as r, TransitionPhaseEvent as i } from "./constants.js";
5
- import { getDurations as a } from "./utils.js";
6
- import o, { Children as s, cloneElement as c, isValidElement as l, useRef as u } from "react";
1
+ /* 潘启宝 2026-05-08 09:02:53 星期五 */
2
+ import { isNumber as e } from "../utils/is.js";
3
+ import { getReactElementRef as t } from "../utils/ref.js";
4
+ import { defaults as n } from "../utils/lodash.js";
5
+ import r from "../hooks/use-is-first-render/index.js";
6
+ import "../utils/index.js";
7
+ import "../hooks/index.js";
8
+ import { TRANSITION_ALWAYS_MOUNTED_KEY as i, TRANSITION_DEFAULT_PROPS as a, TRANSITION_DURATION_KEY as o, TRANSITION_PHASE_APPEAR as s, TRANSITION_PHASE_ENTER as c, TRANSITION_PHASE_EXIT as l } from "./constants.js";
9
+ import { transitionNormalizeDurations as u } from "./utils.js";
10
+ import { Children as d, isValidElement as f, memo as p, useEffect as m, useRef as h } from "react";
11
+ import { jsx as g } from "react/jsx-runtime";
7
12
  //#region components/common/transition/TransitionGroup.tsx
8
- var { APPEAR: d, APPEAR_ACTIVE: f, APPEAR_DONE: p, ENTER: m, ENTER_ACTIVE: h, ENTER_DONE: g, EXIT: _, EXIT_ACTIVE: v, EXIT_DONE: y } = r, { ON_ENTER: b, ON_ENTERING: x, ON_ENTERED: S, ON_EXIT: C, ON_EXITING: w, ON_EXITED: T } = i, { setTimeout: E, clearTimeout: D, requestAnimationFrame: O, cancelAnimationFrame: k } = window, A = {
9
- [d]: n[d],
10
- [m]: n[m],
11
- [_]: n[_],
12
- duration: n.duration,
13
- alwaysMounted: n.alwaysMounted
14
- };
15
- function j(n) {
16
- let { children: r, [d]: i = !0, [m]: o = !0, [_]: f = !0, duration: p = 500, alwaysMounted: h = !1 } = t({}, n, A), g = u(!1), v = u([]), y = [], b = [], x = {}, S = [];
17
- s.toArray(r).forEach((e, t, n) => {
18
- l(e) && (x[e.key] = S.length, S.push(e));
19
- });
20
- function C(e, t) {
21
- let { alwaysMounted: n = h, duration: r = p, [d]: a = i, [m]: s = o, [_]: l = f } = e.props ?? {}, u = c(e, {
22
- in: !t,
23
- alwaysMounted: n,
24
- duration: r,
25
- [_]: l,
26
- [m]: s,
27
- [d]: g.current ? s : a
13
+ var { setTimeout: _, clearTimeout: v, requestAnimationFrame: y, cancelAnimationFrame: b } = window, x = { ...a };
14
+ function S(a) {
15
+ let { children: p, [s]: y = !0, [c]: b = !0, [l]: S = !0, [o]: C = 500, [i]: w = !1 } = n({}, a, x), T = r(), E = h([]), D = [], O = [], k = d.toArray(p).filter((e, t, n) => f(e));
16
+ function A(n, r) {
17
+ let a = n.props ?? {}, { [i]: u = w, [o]: d = C, [s]: f = y, [c]: p = b, [l]: m = S } = a;
18
+ D.push({
19
+ element: n,
20
+ removeTimeout: r
28
21
  });
29
- y.push({
30
- element: e,
31
- removeTimeout: t
32
- }), b.push(u);
22
+ let h = {
23
+ ...a,
24
+ in: !e(r),
25
+ [i]: u,
26
+ [o]: d,
27
+ [l]: m,
28
+ [c]: p,
29
+ [s]: T ? f : p
30
+ }, _ = /* @__PURE__ */ g(n.type, {
31
+ ref: t(n),
32
+ ...h
33
+ }, n.key);
34
+ O.push(_);
33
35
  }
34
- function w(e) {
35
- let { alwaysMounted: t = h, duration: n = p, [d]: r = i, [m]: s = o, [_]: c = f } = e.props ?? {};
36
- return E(() => {
37
- let { current: t } = v, n = t.findIndex((t, n, r) => {
36
+ function j(e) {
37
+ let { [i]: t = w, [o]: n = C, [s]: r = y, [c]: a = b, [l]: d = S } = e.props ?? {}, f = u(n)[l];
38
+ return _(() => {
39
+ let t = E.current.findIndex((t, n, r) => {
38
40
  let { element: i } = t ?? {};
39
- return i.key === e.key;
41
+ return i === e || i.key === e.key;
40
42
  });
41
- n === -1 || t.splice(n, 1);
42
- }, a(n).exit);
43
+ t === -1 || E.current.splice(t, 1);
44
+ }, f);
43
45
  }
44
- let T = 0;
45
- v.current.forEach((e, t, n) => {
46
- let { element: r, removeTimeout: a } = e ?? {}, { alwaysMounted: s = h, duration: c = p, [d]: l = i, [m]: u = o, [_]: g = f } = r.props ?? {}, v = x[r.key] ?? -1;
47
- if (v < 0) a ? C(r, a) : g && C(r, w(r));
46
+ let M = 0;
47
+ E.current.forEach((t, n, r) => {
48
+ let { element: a, removeTimeout: u } = t ?? {}, d = e(u), { [i]: f = w, [o]: p = C, [s]: m = y, [c]: h = b, [l]: g = S } = a.props ?? {}, _ = k.findIndex((e, t, n) => e === a || e.key === a.key);
49
+ if (_ === -1) d ? A(a, u) : g && A(a, j(a));
48
50
  else {
49
- a && D(a);
50
- for (let e = T; e <= v; e += 1) C(S[e]);
51
+ d && v(u);
52
+ for (let e = M; e <= _; e += 1) A(k[e]);
51
53
  }
52
- T = Math.max(T, v + 1);
54
+ M = Math.max(M, _ + 1);
53
55
  });
54
- for (let e = T; e < S.length; e += 1) C(S[e]);
55
- return e(() => {
56
- g.current = !0;
57
- }, []), v.current = y, b;
56
+ for (let e = M; e < k.length; e += 1) A(k[e]);
57
+ return E.current = D, m(() => () => {}, []), O;
58
58
  }
59
- var M = o.memo(j);
59
+ var C = p(S);
60
+ C.displayName = "TransitionGroup";
60
61
  //#endregion
61
- export { M as TransitionGroup, M as default };
62
+ export { C as TransitionGroup, C as default };
62
63
  /* 独立思考,明辨是非 */
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { TransitionStyleProps } from './interface';
3
2
  /**
4
3
  * `TransitionStyle` 组件允许你在不同的过渡阶段为组件设置动画样式。
@@ -6,6 +5,6 @@ import type { TransitionStyleProps } from './interface';
6
5
  * 并将它们应用到 `children` 元素上。
7
6
  */
8
7
  declare function Component(props: TransitionStyleProps): import("react/jsx-runtime").JSX.Element;
9
- declare const TransitionStyle: React.MemoExoticComponent<typeof Component>;
8
+ declare const TransitionStyle: import("react").MemoExoticComponent<typeof Component>;
10
9
  export { TransitionStyle };
11
10
  export default TransitionStyle;
@@ -1,46 +1,41 @@
1
- /* 潘启宝 2026-04-14 16:51:31 星期二 */
2
- import { TransitionPhase as e, TransitionPhaseEvent as t } from "./constants.js";
3
- import { Transition as n } from "./Transition.js";
4
- import r, { cloneElement as i, isValidElement as a } from "react";
5
- import { jsx as o } from "react/jsx-runtime";
1
+ /* 潘启宝 2026-05-08 09:02:53 星期五 */
2
+ import { isEmpty as e } from "../utils/is.js";
3
+ import { TRANSITION_PHASE_APPEAR as t } from "./constants.js";
4
+ import { TransitionStyleContext as n } from "./context.js";
5
+ import { isAppearPhaseHandler as r, transitionFallbackAppearToEnter as i } from "./utils.js";
6
+ import { Transition as a } from "./Transition.js";
7
+ import { cloneElement as o, isValidElement as s, memo as c } from "react";
8
+ import { jsx as l } from "react/jsx-runtime";
6
9
  //#region components/common/transition/TransitionStyle.tsx
7
- var { APPEAR: s, APPEAR_ACTIVE: c, APPEAR_DONE: l, ENTER: u, ENTER_ACTIVE: d, ENTER_DONE: f, EXIT: p, EXIT_ACTIVE: m, EXIT_DONE: h } = e, { ON_ENTER: g, ON_ENTERING: _, ON_ENTERED: v, ON_EXIT: y, ON_EXITING: b, ON_EXITED: x } = t;
8
- function S(e, t) {
9
- let n = t[e];
10
- switch (e) {
11
- case c: return {
12
- ...t[s],
13
- ...n
14
- };
15
- case d: return {
16
- ...t[u],
17
- ...n
18
- };
19
- case m: return {
20
- ...t[p],
21
- ...n
22
- };
23
- default: return n;
24
- }
10
+ function u(a) {
11
+ let { children: c, styles: u = {}, phase: d, [t]: f } = a, p = { ...u };
12
+ if (!s(c)) return null;
13
+ f && r(d) && Object.assign(p, i(p));
14
+ let m = p[d];
15
+ if (e(m)) return c;
16
+ let { style: h } = c.props, g = {
17
+ ...h,
18
+ ...m
19
+ }, _ = c;
20
+ return _ = /* @__PURE__ */ l(n.Provider, {
21
+ value: { style: m },
22
+ children: o(c, { style: g })
23
+ }), _;
25
24
  }
26
- function C(e) {
27
- let { children: t, styles: n, phase: r } = e;
28
- if (!a(t)) return null;
29
- let { style: o } = t.props;
30
- return i(t, { style: Object.assign({}, o, S(r, n)) });
31
- }
32
- function w(e) {
33
- let { children: t, styles: r, ...i } = e;
34
- return /* @__PURE__ */ o(n, {
35
- ...i,
36
- children: (e, n) => /* @__PURE__ */ o(C, {
37
- styles: r,
38
- phase: n,
25
+ function d(e) {
26
+ let { children: t, styles: n = {}, ...r } = e;
27
+ return /* @__PURE__ */ l(a, {
28
+ ...r,
29
+ children: (e, r, i) => /* @__PURE__ */ l(u, {
30
+ ...e,
31
+ styles: n,
32
+ phase: i,
39
33
  children: t
40
34
  })
41
35
  });
42
36
  }
43
- var T = r.memo(w);
37
+ var f = c(d);
38
+ f.displayName = "TransitionStyle";
44
39
  //#endregion
45
- export { T as TransitionStyle, T as default };
40
+ export { f as TransitionStyle, f as default };
46
41
  /* 独立思考,明辨是非 */
@@ -1,4 +1,9 @@
1
1
  import type { TransitionProps } from './interface';
2
+ export declare const TRANSITION_MOUNT_ON_ENTER_KEY = "mountOnEnter";
3
+ export declare const TRANSITION_UNMOUNT_ON_EXIT_KEY = "unmountOnExit";
4
+ export declare const TRANSITION_ALWAYS_MOUNTED_KEY = "alwaysMounted";
5
+ export declare const TRANSITION_ADD_END_LISTENER_KEY = "addEndListener";
6
+ export declare const TRANSITION_DURATION_KEY = "duration";
2
7
  export declare const TRANSITION_DURATION_DEFAULT = 500;
3
8
  /**
4
9
  * 枚举表示过渡的不同阶段。
@@ -15,6 +20,7 @@ export declare enum TransitionPhase {
15
20
  EXIT_ACTIVE = "exitActive",
16
21
  EXIT_DONE = "exitDone"
17
22
  }
23
+ declare const TRANSITION_PHASE_APPEAR: TransitionPhase, TRANSITION_PHASE_APPEAR_ACTIVE: TransitionPhase, TRANSITION_PHASE_APPEAR_DONE: TransitionPhase, TRANSITION_PHASE_ENTER: TransitionPhase, TRANSITION_PHASE_ENTER_ACTIVE: TransitionPhase, TRANSITION_PHASE_ENTER_DONE: TransitionPhase, TRANSITION_PHASE_EXIT: TransitionPhase, TRANSITION_PHASE_EXIT_ACTIVE: TransitionPhase, TRANSITION_PHASE_EXIT_DONE: TransitionPhase;
18
24
  /**
19
25
  * 枚举表示各种过渡阶段的事件回调。
20
26
  */
@@ -26,6 +32,7 @@ export declare enum TransitionPhaseEvent {
26
32
  ON_EXITING = "onExiting",
27
33
  ON_EXITED = "onExited"
28
34
  }
35
+ declare const TRANSITION_PHASE_EVENT_ON_ENTER: TransitionPhaseEvent, TRANSITION_PHASE_EVENT_ON_ENTERING: TransitionPhaseEvent, TRANSITION_PHASE_EVENT_ON_ENTERED: TransitionPhaseEvent, TRANSITION_PHASE_EVENT_ON_EXIT: TransitionPhaseEvent, TRANSITION_PHASE_EVENT_ON_EXITING: TransitionPhaseEvent, TRANSITION_PHASE_EVENT_ON_EXITED: TransitionPhaseEvent;
29
36
  export declare const TRANSITION_CSS_CLASS_NAMES_SUFFIX: {
30
37
  [key in TransitionPhase]: string;
31
38
  };
@@ -33,11 +40,10 @@ export declare const TRANSITION_CSS_CLASS_NAMES_SUFFIX: {
33
40
  * 默认属性
34
41
  */
35
42
  export declare const TRANSITION_DEFAULT_PROPS: Omit<TransitionProps, 'children'>;
36
- export declare const TRANSITION_MOUNT_ON_ENTER_KEY = "mountOnEnter";
37
- export declare const TRANSITION_UNMOUNT_ON_EXIT_KEY = "unmountOnExit";
38
43
  export declare const TRANSITION_EVENT_NAME_KEY = "eventName";
39
44
  export declare const TRANSITION_NEXT_PHASE_KEY = "nextPhase";
40
45
  export declare const TRANSITION_EVENT_MAP: Record<TransitionPhase, {
41
46
  [TRANSITION_EVENT_NAME_KEY]: TransitionPhaseEvent;
42
47
  [TRANSITION_NEXT_PHASE_KEY]?: TransitionPhase;
43
48
  }>;
49
+ export { TRANSITION_PHASE_APPEAR, TRANSITION_PHASE_APPEAR_ACTIVE, TRANSITION_PHASE_APPEAR_DONE, TRANSITION_PHASE_ENTER, TRANSITION_PHASE_ENTER_ACTIVE, TRANSITION_PHASE_ENTER_DONE, TRANSITION_PHASE_EVENT_ON_ENTER, TRANSITION_PHASE_EVENT_ON_ENTERED, TRANSITION_PHASE_EVENT_ON_ENTERING, TRANSITION_PHASE_EVENT_ON_EXIT, TRANSITION_PHASE_EVENT_ON_EXITED, TRANSITION_PHASE_EVENT_ON_EXITING, TRANSITION_PHASE_EXIT, TRANSITION_PHASE_EXIT_ACTIVE, TRANSITION_PHASE_EXIT_DONE, };
@@ -1,46 +1,54 @@
1
- /* 潘启宝 2026-04-14 16:51:31 星期二 */
1
+ /* 潘启宝 2026-05-08 09:02:53 星期五 */
2
2
  import { kebabCase as e } from "../utils/lodash.js";
3
3
  //#region components/common/transition/constants.ts
4
- var t = 500, n = /* @__PURE__ */ function(e) {
4
+ var t = "mountOnEnter", n = "unmountOnExit", r = "alwaysMounted", i = "addEndListener", a = "duration", o = 500, s = /* @__PURE__ */ function(e) {
5
5
  return e.APPEAR = "appear", e.APPEAR_ACTIVE = "appearActive", e.APPEAR_DONE = "appearDone", e.ENTER = "enter", e.ENTER_ACTIVE = "enterActive", e.ENTER_DONE = "enterDone", e.EXIT = "exit", e.EXIT_ACTIVE = "exitActive", e.EXIT_DONE = "exitDone", e;
6
- }({}), r = /* @__PURE__ */ function(e) {
6
+ }({});
7
+ Object.freeze(s);
8
+ var { APPEAR: c, APPEAR_ACTIVE: l, APPEAR_DONE: u, ENTER: d, ENTER_ACTIVE: f, ENTER_DONE: p, EXIT: m, EXIT_ACTIVE: h, EXIT_DONE: g } = s, _ = /* @__PURE__ */ function(e) {
7
9
  return e.ON_ENTER = "onEnter", e.ON_ENTERING = "onEntering", e.ON_ENTERED = "onEntered", e.ON_EXIT = "onExit", e.ON_EXITING = "onExiting", e.ON_EXITED = "onExited", e;
8
- }({}), i = Object.fromEntries(Object.entries(n).map(([t, n], r, i) => [n, e(n)])), { APPEAR: a, APPEAR_ACTIVE: o, APPEAR_DONE: s, ENTER: c, ENTER_ACTIVE: l, ENTER_DONE: u, EXIT: d, EXIT_ACTIVE: f, EXIT_DONE: p } = n, { ON_ENTER: m, ON_ENTERING: h, ON_ENTERED: g, ON_EXIT: _, ON_EXITING: v, ON_EXITED: y } = r, b = {
9
- in: !1,
10
- [a]: !1,
11
- [c]: !0,
10
+ }({});
11
+ Object.freeze(_);
12
+ var { ON_ENTER: v, ON_ENTERING: y, ON_ENTERED: b, ON_EXIT: x, ON_EXITING: S, ON_EXITED: C } = _, w = Object.fromEntries(Object.entries(s).map(([t, n], r, i) => [n, e(n)]));
13
+ Object.freeze(w);
14
+ var T = {
15
+ [c]: !1,
12
16
  [d]: !0,
13
- duration: 500,
14
- alwaysMounted: !1
15
- }, x = "mountOnEnter", S = "unmountOnExit", C = "eventName", w = "nextPhase", T = {
16
- [a]: {
17
- [C]: m,
18
- [w]: o
19
- },
20
- [o]: {
21
- [C]: h,
22
- [w]: s
23
- },
24
- [s]: { [C]: g },
17
+ [m]: !0,
18
+ [r]: !1,
19
+ [a]: 500
20
+ };
21
+ Object.freeze(T);
22
+ var E = "eventName", D = "nextPhase", O = {
25
23
  [c]: {
26
- [C]: m,
27
- [w]: l
24
+ [E]: v,
25
+ [D]: l
28
26
  },
29
27
  [l]: {
30
- [C]: h,
31
- [w]: u
28
+ [E]: y,
29
+ [D]: u
32
30
  },
33
- [u]: { [C]: g },
31
+ [u]: { [E]: b },
34
32
  [d]: {
35
- [C]: _,
36
- [w]: f
33
+ [E]: v,
34
+ [D]: f
37
35
  },
38
36
  [f]: {
39
- [C]: v,
40
- [w]: p
37
+ [E]: y,
38
+ [D]: p
39
+ },
40
+ [p]: { [E]: b },
41
+ [m]: {
42
+ [E]: x,
43
+ [D]: h
44
+ },
45
+ [h]: {
46
+ [E]: S,
47
+ [D]: g
41
48
  },
42
- [p]: { [C]: y }
49
+ [g]: { [E]: C }
43
50
  };
51
+ Object.freeze(O);
44
52
  //#endregion
45
- export { i as TRANSITION_CSS_CLASS_NAMES_SUFFIX, b as TRANSITION_DEFAULT_PROPS, t as TRANSITION_DURATION_DEFAULT, T as TRANSITION_EVENT_MAP, C as TRANSITION_EVENT_NAME_KEY, x as TRANSITION_MOUNT_ON_ENTER_KEY, w as TRANSITION_NEXT_PHASE_KEY, S as TRANSITION_UNMOUNT_ON_EXIT_KEY, n as TransitionPhase, r as TransitionPhaseEvent };
53
+ export { i as TRANSITION_ADD_END_LISTENER_KEY, r as TRANSITION_ALWAYS_MOUNTED_KEY, w as TRANSITION_CSS_CLASS_NAMES_SUFFIX, T as TRANSITION_DEFAULT_PROPS, o as TRANSITION_DURATION_DEFAULT, a as TRANSITION_DURATION_KEY, O as TRANSITION_EVENT_MAP, E as TRANSITION_EVENT_NAME_KEY, t as TRANSITION_MOUNT_ON_ENTER_KEY, D as TRANSITION_NEXT_PHASE_KEY, c as TRANSITION_PHASE_APPEAR, l as TRANSITION_PHASE_APPEAR_ACTIVE, u as TRANSITION_PHASE_APPEAR_DONE, d as TRANSITION_PHASE_ENTER, f as TRANSITION_PHASE_ENTER_ACTIVE, p as TRANSITION_PHASE_ENTER_DONE, v as TRANSITION_PHASE_EVENT_ON_ENTER, b as TRANSITION_PHASE_EVENT_ON_ENTERED, y as TRANSITION_PHASE_EVENT_ON_ENTERING, x as TRANSITION_PHASE_EVENT_ON_EXIT, C as TRANSITION_PHASE_EVENT_ON_EXITED, S as TRANSITION_PHASE_EVENT_ON_EXITING, m as TRANSITION_PHASE_EXIT, h as TRANSITION_PHASE_EXIT_ACTIVE, g as TRANSITION_PHASE_EXIT_DONE, n as TRANSITION_UNMOUNT_ON_EXIT_KEY, s as TransitionPhase, _ as TransitionPhaseEvent };
46
54
  /* 独立思考,明辨是非 */
@@ -0,0 +1,15 @@
1
+ import { CSSProperties } from 'react';
2
+ import { TransitionPhase } from './constants.ts';
3
+ import type { TransitionProps } from './interface.ts';
4
+ declare const TransitionContext: import("react").Context<{
5
+ phase?: TransitionPhase;
6
+ }>;
7
+ declare const TransitionCSS_Context: import("react").Context<{
8
+ className?: string;
9
+ }>;
10
+ declare const TransitionGroupContext: import("react").Context<Partial<TransitionProps>>;
11
+ declare const TransitionStyleContext: import("react").Context<{
12
+ style?: CSSProperties;
13
+ }>;
14
+ export { TransitionContext, TransitionCSS_Context, TransitionGroupContext, TransitionStyleContext, };
15
+ export default TransitionContext;