@unicom-cloud/ui-common 0.1.19 → 0.1.21

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 (280) hide show
  1. package/.virtual/_rolldown/runtime.js +1 -1
  2. package/.vite/manifest.json +125 -74
  3. package/development/index.js +1 -1
  4. package/development/interface.d.ts +1 -1
  5. package/empty/index.js +1 -1
  6. package/empty/interface.d.ts +1 -1
  7. package/flex/index.js +1 -1
  8. package/flex/utils.js +1 -1
  9. package/higher-order/index.js +1 -1
  10. package/higher-order/with-speech-synthesis/index.js +1 -1
  11. package/hooks/create-deep-compare-effect/index.js +8 -7
  12. package/hooks/create-update-effect/index.d.ts +1 -1
  13. package/hooks/create-update-effect/index.js +9 -10
  14. package/hooks/create-use-storage-state/index.js +1 -1
  15. package/hooks/index.d.ts +1 -0
  16. package/hooks/index.js +82 -81
  17. package/hooks/use-async-effect/index.js +1 -1
  18. package/hooks/use-boolean/index.js +1 -1
  19. package/hooks/use-click-away/index.d.ts +2 -2
  20. package/hooks/use-click-away/index.js +7 -3
  21. package/hooks/use-computed-state/index.js +1 -1
  22. package/hooks/use-controllable-value/index.js +1 -1
  23. package/hooks/use-cookie-state/index.d.ts +34 -1
  24. package/hooks/use-cookie-state/index.js +16 -16
  25. package/hooks/use-count-down/index.js +1 -1
  26. package/hooks/use-counter/index.js +1 -1
  27. package/hooks/use-create/index.d.ts +4 -1
  28. package/hooks/use-create/index.js +1 -1
  29. package/hooks/use-creation/index.js +1 -1
  30. package/hooks/use-debounce/index.js +1 -1
  31. package/hooks/use-debounce-effect/index.js +1 -1
  32. package/hooks/use-debounce-fn/index.js +1 -1
  33. package/hooks/use-deep-compare-effect/index.js +1 -1
  34. package/hooks/use-deep-compare-layout-effect/index.js +1 -1
  35. package/hooks/use-document-visibility/index.js +1 -1
  36. package/hooks/use-drag/index.js +1 -1
  37. package/hooks/use-drop/index.js +3 -3
  38. package/hooks/use-effect-event/index.js +13 -12
  39. package/hooks/use-event/index.js +1 -1
  40. package/hooks/use-event-emitter/demo/demo1.d.ts +10 -0
  41. package/hooks/use-event-emitter/index.d.ts +8 -0
  42. package/hooks/use-event-emitter/index.js +26 -0
  43. package/hooks/use-event-listener/index.js +1 -1
  44. package/hooks/use-event-target/index.js +1 -1
  45. package/hooks/use-external/index.js +25 -24
  46. package/hooks/use-favicon/index.js +1 -1
  47. package/hooks/use-focus-within/index.js +1 -1
  48. package/hooks/use-force-update/index.js +1 -1
  49. package/hooks/use-fullscreen/index.js +1 -1
  50. package/hooks/use-get-state/index.js +1 -1
  51. package/hooks/use-history-travel/index.js +1 -1
  52. package/hooks/use-hover/index.js +1 -1
  53. package/hooks/use-id/index.js +1 -1
  54. package/hooks/use-in-view/index.js +1 -1
  55. package/hooks/use-in-viewport/index.js +1 -1
  56. package/hooks/use-infinite-scroll/index.js +54 -53
  57. package/hooks/use-intersection-observer/index.js +1 -1
  58. package/hooks/use-intersection-observers/index.js +1 -1
  59. package/hooks/use-interval/index.js +1 -1
  60. package/hooks/use-is-first-render/index.js +1 -1
  61. package/hooks/use-isomorphic-layout-effect/index.js +1 -1
  62. package/hooks/use-key-press/index.js +1 -1
  63. package/hooks/use-keyboard-event/index.js +3 -3
  64. package/hooks/use-latest/index.js +1 -1
  65. package/hooks/use-listen-window-resize/index.d.ts +1 -1
  66. package/hooks/use-listen-window-resize/index.js +3 -3
  67. package/hooks/use-local-storage-state/index.js +1 -1
  68. package/hooks/use-lock-fn/index.js +1 -1
  69. package/hooks/use-long-press/index.js +1 -1
  70. package/hooks/use-map/index.js +1 -1
  71. package/hooks/use-media/index.js +12 -11
  72. package/hooks/use-memo/index.js +1 -1
  73. package/hooks/use-memoized-fn/index.d.ts +1 -1
  74. package/hooks/use-memoized-fn/index.js +3 -3
  75. package/hooks/use-merge-props/index.js +1 -1
  76. package/hooks/use-merge-value/index.js +1 -1
  77. package/hooks/use-mobile/index.js +1 -1
  78. package/hooks/use-mount/index.js +1 -1
  79. package/hooks/use-mouse/index.js +1 -1
  80. package/hooks/use-move/index.js +1 -1
  81. package/hooks/use-mutation-observer/index.js +1 -1
  82. package/hooks/use-mutation-observers/index.js +1 -1
  83. package/hooks/use-network/index.js +1 -1
  84. package/hooks/use-online-status/index.js +1 -1
  85. package/hooks/use-overflow-hidden/index.js +2 -2
  86. package/hooks/use-override-ref/index.js +1 -1
  87. package/hooks/use-pagination/index.js +1 -1
  88. package/hooks/use-paste-image/index.js +1 -1
  89. package/hooks/use-persist-callback/index.js +1 -1
  90. package/hooks/use-prefers-color-scheme-dark/index.js +1 -1
  91. package/hooks/use-previous/index.js +1 -1
  92. package/hooks/use-raf-interval/index.js +1 -1
  93. package/hooks/use-raf-state/index.js +1 -1
  94. package/hooks/use-raf-timeout/index.js +1 -1
  95. package/hooks/use-reactive/index.js +1 -1
  96. package/hooks/use-ref-latest/index.js +1 -1
  97. package/hooks/use-refs/index.js +11 -10
  98. package/hooks/use-request/index.js +1 -1
  99. package/hooks/use-request/src/Fetch.js +1 -1
  100. package/hooks/use-request/src/plugins/useAutoRunPlugin.js +1 -1
  101. package/hooks/use-request/src/plugins/useCachePlugin.js +1 -1
  102. package/hooks/use-request/src/plugins/useDebouncePlugin.js +20 -19
  103. package/hooks/use-request/src/plugins/useLoadingDelayPlugin.js +1 -1
  104. package/hooks/use-request/src/plugins/usePollingPlugin.js +1 -1
  105. package/hooks/use-request/src/plugins/useRefreshOnWindowFocusPlugin.js +1 -1
  106. package/hooks/use-request/src/plugins/useRetryPlugin.js +1 -1
  107. package/hooks/use-request/src/plugins/useThrottlePlugin.js +18 -17
  108. package/hooks/use-request/src/useRequest.js +1 -1
  109. package/hooks/use-request/src/useRequestImplement.js +1 -1
  110. package/hooks/use-request/src/utils/cache.js +1 -1
  111. package/hooks/use-request/src/utils/cachePromise.js +1 -1
  112. package/hooks/use-request/src/utils/cacheSubscribe.js +1 -1
  113. package/hooks/use-request/src/utils/isDocumentVisible.js +1 -1
  114. package/hooks/use-request/src/utils/isOnline.js +1 -1
  115. package/hooks/use-request/src/utils/limit.js +1 -1
  116. package/hooks/use-request/src/utils/subscribeFocus.js +1 -1
  117. package/hooks/use-request/src/utils/subscribeReVisible.js +1 -1
  118. package/hooks/use-reset-state/index.js +1 -1
  119. package/hooks/use-resize-observer/index.js +1 -1
  120. package/hooks/use-resize-observers/index.js +1 -1
  121. package/hooks/use-responsive/index.js +1 -1
  122. package/hooks/use-safe-state/index.js +1 -1
  123. package/hooks/use-scroll/index.js +1 -1
  124. package/hooks/use-selections/index.js +1 -1
  125. package/hooks/use-session-storage-state/index.js +1 -1
  126. package/hooks/use-set/index.js +1 -1
  127. package/hooks/use-set-state/index.js +1 -1
  128. package/hooks/use-size/index.js +1 -1
  129. package/hooks/use-state-callback/index.js +11 -9
  130. package/hooks/use-state-with-promise/index.d.ts +11 -1
  131. package/hooks/use-state-with-promise/index.js +21 -20
  132. package/hooks/use-sync-state/index.js +1 -1
  133. package/hooks/use-text-selection/index.js +1 -1
  134. package/hooks/use-theme/index.js +1 -1
  135. package/hooks/use-throttle/index.js +1 -1
  136. package/hooks/use-throttle-effect/index.js +1 -1
  137. package/hooks/use-throttle-fn/index.js +1 -1
  138. package/hooks/use-timeout/index.js +1 -1
  139. package/hooks/use-title/index.js +1 -1
  140. package/hooks/use-toggle/index.js +12 -11
  141. package/hooks/use-tracked-effect/index.js +1 -1
  142. package/hooks/use-unmount/index.js +1 -1
  143. package/hooks/use-unmounted-ref/index.js +1 -1
  144. package/hooks/use-update/index.d.ts +3 -1
  145. package/hooks/use-update/index.js +5 -5
  146. package/hooks/use-update-effect/index.js +1 -1
  147. package/hooks/use-update-layout-effect/index.js +1 -1
  148. package/hooks/use-url-state/index.js +1 -1
  149. package/hooks/use-virtual-list/index.js +1 -1
  150. package/hooks/use-watch/index.js +1 -1
  151. package/hooks/use-web-socket/index.js +1 -1
  152. package/hooks/use-why-did-you-update/index.js +1 -1
  153. package/hooks/use-window-size/index.d.ts +1 -1
  154. package/hooks/use-window-size/index.js +1 -1
  155. package/hooks/utils/createEffectWithTarget.js +1 -1
  156. package/hooks/utils/depsAreSame.js +1 -1
  157. package/hooks/utils/depsEqual.js +1 -1
  158. package/hooks/utils/domTarget.js +1 -1
  159. package/hooks/utils/getDocumentOrShadow.js +1 -1
  160. package/hooks/utils/index.js +1 -1
  161. package/hooks/utils/isAppleDevice.js +1 -1
  162. package/hooks/utils/isBrowser.js +1 -1
  163. package/hooks/utils/isDev.js +1 -1
  164. package/hooks/utils/rect.js +1 -1
  165. package/hooks/utils/useDeepCompareWithTarget.js +1 -1
  166. package/hooks/utils/useEffectWithTarget.js +1 -1
  167. package/hooks/utils/useIsomorphicLayoutEffectWithTarget.js +1 -1
  168. package/hooks/utils/useLayoutEffectWithTarget.js +1 -1
  169. package/icons/file/index.js +1 -1
  170. package/icons/file/interface.d.ts +1 -1
  171. package/index.d.ts +1 -1
  172. package/index.js +586 -549
  173. package/interface.d.ts +3 -0
  174. package/package.json +1 -1
  175. package/progress/index.js +43 -43
  176. package/resize-observer/Collection.d.ts +2 -2
  177. package/resize-observer/Collection.js +1 -1
  178. package/resize-observer/SingleObserver.js +1 -1
  179. package/resize-observer/index.js +1 -1
  180. package/resize-observer/observerUtil.js +1 -1
  181. package/space/index.js +49 -48
  182. package/space/interface.d.ts +1 -1
  183. package/style/animation.less +13 -1
  184. package/style.css +1 -1
  185. package/suspense-fallback-test/index.js +1 -1
  186. package/test.js +1 -1
  187. package/timer/index.js +25 -23
  188. package/timer/interface.d.ts +1 -1
  189. package/transition/Transition.d.ts +11 -0
  190. package/transition/Transition.js +102 -0
  191. package/transition/TransitionCSS.d.ts +11 -0
  192. package/transition/TransitionCSS.js +42 -0
  193. package/transition/TransitionGroup.d.ts +11 -0
  194. package/transition/TransitionGroup.js +57 -0
  195. package/transition/TransitionStyle.d.ts +11 -0
  196. package/transition/TransitionStyle.js +37 -0
  197. package/transition/constants.d.ts +49 -0
  198. package/transition/constants.js +48 -0
  199. package/transition/index.d.ts +10 -0
  200. package/transition/index.js +12 -0
  201. package/transition/interface.d.ts +197 -0
  202. package/transition/utils.d.ts +20 -0
  203. package/transition/utils.js +99 -0
  204. package/utils/callOrReturn.js +1 -1
  205. package/utils/callbackOriginRef.js +1 -1
  206. package/utils/caseName.js +1 -1
  207. package/utils/className.js +1 -1
  208. package/utils/constant.d.ts +2 -0
  209. package/utils/constant.js +3 -3
  210. package/utils/copy.js +1 -1
  211. package/utils/date.js +1 -1
  212. package/utils/dayjs.js +1 -1
  213. package/utils/dom.js +1 -1
  214. package/utils/emitter.js +1 -1
  215. package/utils/fileRead.js +1 -1
  216. package/utils/fileToDataURL.js +1 -1
  217. package/utils/fillNBSP.js +1 -1
  218. package/utils/findRootElement.d.ts +3 -3
  219. package/utils/findRootElement.js +2 -2
  220. package/utils/findScrollParent.js +1 -1
  221. package/utils/getHighlightText.js +2 -2
  222. package/utils/getHotkeyHandler.js +1 -1
  223. package/utils/getScrollBarHeight.js +1 -1
  224. package/utils/getScrollBarSize.js +16 -6
  225. package/utils/getScrollBarWidth.js +1 -1
  226. package/utils/getStringLength.js +1 -1
  227. package/utils/include.js +1 -1
  228. package/utils/index.js +289 -281
  229. package/utils/intersectionObserver.js +1 -1
  230. package/utils/is.d.ts +8 -7
  231. package/utils/is.js +22 -19
  232. package/utils/keyboardCode.js +1 -1
  233. package/utils/lodash.js +1 -1
  234. package/utils/math.js +1 -1
  235. package/utils/mergeProps.js +8 -7
  236. package/utils/mergedToString.js +1 -1
  237. package/utils/mutationObserver.js +1 -1
  238. package/utils/omit.js +1 -1
  239. package/utils/pad.js +1 -1
  240. package/utils/pick.js +1 -1
  241. package/utils/pinyin.js +1 -1
  242. package/utils/react19Adapter.js +1 -1
  243. package/utils/ref.js +2 -2
  244. package/utils/resizeObserver.js +1 -1
  245. package/utils/saveAs.js +1 -1
  246. package/utils/screenfull.js +1 -1
  247. package/utils/scrollIntoViewIfNeeded.js +1 -1
  248. package/utils/setCreateRoot.js +1 -1
  249. package/utils/setDarkTheme.js +1 -1
  250. package/utils/setDir.js +1 -1
  251. package/utils/setPrimaryColor.js +1 -1
  252. package/utils/setTheme.js +1 -1
  253. package/utils/string.js +1 -1
  254. package/utils/style.js +1 -1
  255. package/utils/throttleByRaf.js +1 -1
  256. package/utils/throttleByRaf2.js +1 -1
  257. package/utils/tinycolor.js +1 -1
  258. package/utils/toArray.js +1 -1
  259. package/utils/tree.js +1 -1
  260. package/utils/tween.js +1 -1
  261. package/utils/uuid.js +1 -1
  262. package/utils/validate.js +1 -1
  263. package/utils/warning.js +1 -1
  264. package/version/index.js +9 -9
  265. package/transition-group/ChildMapping.d.ts +0 -27
  266. package/transition-group/ChildMapping.js +0 -61
  267. package/transition-group/Transition.d.ts +0 -126
  268. package/transition-group/Transition.js +0 -133
  269. package/transition-group/TransitionCSS.d.ts +0 -97
  270. package/transition-group/TransitionCSS.js +0 -73
  271. package/transition-group/TransitionGroup.d.ts +0 -31
  272. package/transition-group/TransitionGroup.js +0 -54
  273. package/transition-group/TransitionReplace.d.ts +0 -23
  274. package/transition-group/TransitionReplace.js +0 -38
  275. package/transition-group/TransitionSwitch.d.ts +0 -88
  276. package/transition-group/TransitionSwitch.js +0 -84
  277. package/transition-group/context.d.ts +0 -2
  278. package/transition-group/context.js +0 -7
  279. package/transition-group/index.d.ts +0 -9
  280. package/transition-group/index.js +0 -11
@@ -0,0 +1,57 @@
1
+ /* 潘启宝 2026-04-23 09:23:27 星期四 */
2
+ import { isNumber as e } from "../utils/is.js";
3
+ import { defaults as t } from "../utils/lodash.js";
4
+ import n from "../hooks/use-is-first-render/index.js";
5
+ import "../hooks/index.js";
6
+ import { TRANSITION_ALWAYS_MOUNTED_KEY as r, TRANSITION_DEFAULT_PROPS as i, TRANSITION_DURATION_KEY as a, TRANSITION_PHASE_APPEAR as o, TRANSITION_PHASE_ENTER as s, TRANSITION_PHASE_EXIT as c } from "./constants.js";
7
+ import { getDurations as l } from "./utils.js";
8
+ import u, { Children as d, cloneElement as f, isValidElement as p, useEffect as m, useRef as h } from "react";
9
+ //#region components/common/transition/TransitionGroup.tsx
10
+ var { setTimeout: g, clearTimeout: _, requestAnimationFrame: v, cancelAnimationFrame: y } = window, b = { ...i };
11
+ function x(i) {
12
+ let { children: u, [o]: v = !0, [s]: y = !0, [c]: x = !0, [a]: S = 500, [r]: C = !1 } = t({}, i, b), w = n(), T = h([]), E = [], D = [], O = d.toArray(u).filter((e, t, n) => p(e));
13
+ function k(t, n) {
14
+ let i = t.props ?? {}, { [r]: l = C, [a]: u = S, [o]: d = v, [s]: p = y, [c]: m = x } = i;
15
+ E.push({
16
+ element: t,
17
+ removeTimeout: n
18
+ });
19
+ let h = {
20
+ ...i,
21
+ in: !e(n),
22
+ [r]: l,
23
+ [a]: u,
24
+ [c]: m,
25
+ [s]: p,
26
+ [o]: w ? d : p
27
+ };
28
+ D.push(f(t, h));
29
+ }
30
+ function A(e) {
31
+ let { [r]: t = C, [a]: n = S, [o]: i = v, [s]: u = y, [c]: d = x } = e.props ?? {}, f = l(n)[c];
32
+ return g(() => {
33
+ let t = T.current.findIndex((t, n, r) => {
34
+ let { element: i } = t ?? {};
35
+ return i === e || i.key === e.key;
36
+ });
37
+ t === -1 || T.current.splice(t, 1);
38
+ }, f);
39
+ }
40
+ let j = 0;
41
+ T.current.forEach((t, n, i) => {
42
+ let { element: l, removeTimeout: u } = t ?? {}, d = e(u), { [r]: f = C, [a]: p = S, [o]: m = v, [s]: h = y, [c]: g = x } = l.props ?? {}, b = O.findIndex((e, t, n) => e === l || e.key === l.key);
43
+ if (b === -1) d ? k(l, u) : g && k(l, A(l));
44
+ else {
45
+ d && _(u);
46
+ for (let e = j; e <= b; e += 1) k(O[e]);
47
+ }
48
+ j = Math.max(j, b + 1);
49
+ });
50
+ for (let e = j; e < O.length; e += 1) k(O[e]);
51
+ return T.current = E, m(() => () => {}, []), D;
52
+ }
53
+ var S = u.memo(x);
54
+ S.displayName = "TransitionGroup";
55
+ //#endregion
56
+ export { S as TransitionGroup, S as default };
57
+ /* 独立思考,明辨是非 */
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import type { TransitionStyleProps } from './interface';
3
+ /**
4
+ * `TransitionStyle` 组件允许你在不同的过渡阶段为组件设置动画样式。
5
+ * 它自动管理每个过渡阶段的样式(例如,"appear"、"enter"、"exit")
6
+ * 并将它们应用到 `children` 元素上。
7
+ */
8
+ declare function Component(props: TransitionStyleProps): import("react/jsx-runtime").JSX.Element;
9
+ declare const TransitionStyle: React.MemoExoticComponent<typeof Component>;
10
+ export { TransitionStyle };
11
+ export default TransitionStyle;
@@ -0,0 +1,37 @@
1
+ /* 潘启宝 2026-04-23 09:23:27 星期四 */
2
+ import { isEmpty as e } from "../utils/is.js";
3
+ import { TRANSITION_PHASE_APPEAR as t } from "./constants.js";
4
+ import { fallbackAppearToEnter as n, isAppearPhaseHandler as r } from "./utils.js";
5
+ import { Transition as i } from "./Transition.js";
6
+ import a, { cloneElement as o, isValidElement as s } from "react";
7
+ import { jsx as c } from "react/jsx-runtime";
8
+ //#region components/common/transition/TransitionStyle.tsx
9
+ function l(i) {
10
+ let { children: a, styles: c = {}, phase: l, [t]: u } = i, d = { ...c };
11
+ if (!s(a)) return null;
12
+ u && r(l) && Object.assign(d, n(d));
13
+ let f = d[l];
14
+ if (e(f)) return a;
15
+ let { style: p } = a.props;
16
+ return o(a, { style: {
17
+ ...p,
18
+ ...f
19
+ } });
20
+ }
21
+ function u(e) {
22
+ let { children: t, styles: n = {}, ...r } = e;
23
+ return /* @__PURE__ */ c(i, {
24
+ ...r,
25
+ children: (e, i) => /* @__PURE__ */ c(l, {
26
+ ...r,
27
+ styles: n,
28
+ phase: i,
29
+ children: t
30
+ })
31
+ });
32
+ }
33
+ var d = a.memo(u);
34
+ d.displayName = "TransitionStyle";
35
+ //#endregion
36
+ export { d as TransitionStyle, d as default };
37
+ /* 独立思考,明辨是非 */
@@ -0,0 +1,49 @@
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";
7
+ export declare const TRANSITION_DURATION_DEFAULT = 500;
8
+ /**
9
+ * 枚举表示过渡的不同阶段。
10
+ * 每个阶段对应过渡生命周期的特定阶段。
11
+ */
12
+ export declare enum TransitionPhase {
13
+ APPEAR = "appear",
14
+ APPEAR_ACTIVE = "appearActive",
15
+ APPEAR_DONE = "appearDone",
16
+ ENTER = "enter",
17
+ ENTER_ACTIVE = "enterActive",
18
+ ENTER_DONE = "enterDone",
19
+ EXIT = "exit",
20
+ EXIT_ACTIVE = "exitActive",
21
+ EXIT_DONE = "exitDone"
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;
24
+ /**
25
+ * 枚举表示各种过渡阶段的事件回调。
26
+ */
27
+ export declare enum TransitionPhaseEvent {
28
+ ON_ENTER = "onEnter",
29
+ ON_ENTERING = "onEntering",
30
+ ON_ENTERED = "onEntered",
31
+ ON_EXIT = "onExit",
32
+ ON_EXITING = "onExiting",
33
+ ON_EXITED = "onExited"
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;
36
+ export declare const TRANSITION_CSS_CLASS_NAMES_SUFFIX: {
37
+ [key in TransitionPhase]: string;
38
+ };
39
+ /**
40
+ * 默认属性
41
+ */
42
+ export declare const TRANSITION_DEFAULT_PROPS: Omit<TransitionProps, 'children'>;
43
+ export declare const TRANSITION_EVENT_NAME_KEY = "eventName";
44
+ export declare const TRANSITION_NEXT_PHASE_KEY = "nextPhase";
45
+ export declare const TRANSITION_EVENT_MAP: Record<TransitionPhase, {
46
+ [TRANSITION_EVENT_NAME_KEY]: TransitionPhaseEvent;
47
+ [TRANSITION_NEXT_PHASE_KEY]?: TransitionPhase;
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, };
@@ -0,0 +1,48 @@
1
+ /* 潘启宝 2026-04-23 09:23:27 星期四 */
2
+ import { kebabCase as e } from "../utils/lodash.js";
3
+ //#region components/common/transition/constants.ts
4
+ var t = "mountOnEnter", n = "unmountOnExit", r = "alwaysMounted", i = "addEndListener", a = "duration", o = 500, s = /* @__PURE__ */ function(e) {
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
+ }({}), { 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
+ 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
+ }({}), { 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)])), T = {
9
+ [c]: !1,
10
+ [d]: !0,
11
+ [m]: !0,
12
+ [r]: !1,
13
+ [a]: 500
14
+ };
15
+ Object.freeze(T);
16
+ var E = "eventName", D = "nextPhase", O = {
17
+ [c]: {
18
+ [E]: v,
19
+ [D]: l
20
+ },
21
+ [l]: {
22
+ [E]: y,
23
+ [D]: u
24
+ },
25
+ [u]: { [E]: b },
26
+ [d]: {
27
+ [E]: v,
28
+ [D]: f
29
+ },
30
+ [f]: {
31
+ [E]: y,
32
+ [D]: p
33
+ },
34
+ [p]: { [E]: b },
35
+ [m]: {
36
+ [E]: x,
37
+ [D]: h
38
+ },
39
+ [h]: {
40
+ [E]: S,
41
+ [D]: g
42
+ },
43
+ [g]: { [E]: C }
44
+ };
45
+ Object.freeze(O);
46
+ //#endregion
47
+ 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 };
48
+ /* 独立思考,明辨是非 */
@@ -0,0 +1,10 @@
1
+ import { TRANSITION_CSS_CLASS_NAMES_SUFFIX, TRANSITION_DEFAULT_PROPS, TRANSITION_EVENT_MAP, TRANSITION_EVENT_NAME_KEY, TRANSITION_MOUNT_ON_ENTER_KEY, TRANSITION_NEXT_PHASE_KEY, 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, TRANSITION_UNMOUNT_ON_EXIT_KEY, TransitionPhase, TransitionPhaseEvent } from './constants';
2
+ import type { TransitionCSS_ChildProps, TransitionCSS_ClassNames, TransitionCSS_Props, TransitionGroupProps, TransitionGroupVisibleElementProps, TransitionProps, TransitionState, TransitionStyleChildProps, TransitionStyleProps, TransitionStyleStyles } from './interface';
3
+ import Transition from './Transition';
4
+ import TransitionCSS from './TransitionCSS';
5
+ import TransitionGroup from './TransitionGroup';
6
+ import TransitionStyle from './TransitionStyle';
7
+ import { fallbackAppearToEnter, getDurations, isActivePhaseHandler, isAppearActivePhaseHandler, isAppearDonePhaseHandler, isAppearPhaseHandler, isAppearStartPhaseHandler, isDonePhaseHandler, isEnterActivePhaseHandler, isEnterDonePhaseHandler, isEnterPhaseHandler, isEnterStartPhaseHandler, isExitActivePhaseHandler, isExitDonePhaseHandler, isExitPhaseHandler, isExitStartPhaseHandler, isStartPhaseHandler } from './utils';
8
+ export { Transition, TRANSITION_CSS_CLASS_NAMES_SUFFIX, TRANSITION_DEFAULT_PROPS, TRANSITION_EVENT_MAP, TRANSITION_EVENT_NAME_KEY, TRANSITION_MOUNT_ON_ENTER_KEY, TRANSITION_NEXT_PHASE_KEY, 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, TRANSITION_UNMOUNT_ON_EXIT_KEY, TransitionCSS, fallbackAppearToEnter as transitionFallbackAppearToEnter, getDurations as transitionGetDurations, TransitionGroup, isActivePhaseHandler as transitionIsActivePhaseHandler, isAppearActivePhaseHandler as transitionIsAppearActivePhaseHandler, isAppearDonePhaseHandler as transitionIsAppearDonePhaseHandler, isAppearPhaseHandler as transitionIsAppearPhaseHandler, isAppearStartPhaseHandler as transitionIsAppearStartPhaseHandler, isDonePhaseHandler as transitionIsDonePhaseHandler, isEnterActivePhaseHandler as transitionIsEnterActivePhaseHandler, isEnterDonePhaseHandler as transitionIsEnterDonePhaseHandler, isEnterPhaseHandler as transitionIsEnterPhaseHandler, isEnterStartPhaseHandler as transitionIsEnterStartPhaseHandler, isExitActivePhaseHandler as transitionIsExitActivePhaseHandler, isExitDonePhaseHandler as transitionIsExitDonePhaseHandler, isExitPhaseHandler as transitionIsExitPhaseHandler, isExitStartPhaseHandler as transitionIsExitStartPhaseHandler, isStartPhaseHandler as transitionIsStartPhaseHandler, TransitionPhase, TransitionPhaseEvent, TransitionStyle, };
9
+ export default Transition;
10
+ export type { TransitionCSS_ChildProps, TransitionCSS_ClassNames, TransitionCSS_Props, TransitionGroupProps, TransitionGroupVisibleElementProps, TransitionProps, TransitionState, TransitionStyleChildProps, TransitionStyleProps, TransitionStyleStyles, };
@@ -0,0 +1,12 @@
1
+ /* 潘启宝 2026-04-23 09:23:27 星期四 */
2
+ import { TRANSITION_CSS_CLASS_NAMES_SUFFIX as e, TRANSITION_DEFAULT_PROPS as t, TRANSITION_EVENT_MAP as n, TRANSITION_EVENT_NAME_KEY as r, TRANSITION_MOUNT_ON_ENTER_KEY as i, TRANSITION_NEXT_PHASE_KEY as a, TRANSITION_PHASE_APPEAR as o, TRANSITION_PHASE_APPEAR_ACTIVE as s, TRANSITION_PHASE_APPEAR_DONE as c, TRANSITION_PHASE_ENTER as l, TRANSITION_PHASE_ENTER_ACTIVE as u, TRANSITION_PHASE_ENTER_DONE as d, TRANSITION_PHASE_EVENT_ON_ENTER as f, TRANSITION_PHASE_EVENT_ON_ENTERED as p, TRANSITION_PHASE_EVENT_ON_ENTERING as m, TRANSITION_PHASE_EVENT_ON_EXIT as h, TRANSITION_PHASE_EVENT_ON_EXITED as g, TRANSITION_PHASE_EVENT_ON_EXITING as _, TRANSITION_PHASE_EXIT as v, TRANSITION_PHASE_EXIT_ACTIVE as y, TRANSITION_PHASE_EXIT_DONE as b, TRANSITION_UNMOUNT_ON_EXIT_KEY as x, TransitionPhase as S, TransitionPhaseEvent as C } from "./constants.js";
3
+ import { fallbackAppearToEnter as w, getDurations as T, isActivePhaseHandler as E, isAppearActivePhaseHandler as D, isAppearDonePhaseHandler as O, isAppearPhaseHandler as k, isAppearStartPhaseHandler as A, isDonePhaseHandler as j, isEnterActivePhaseHandler as M, isEnterDonePhaseHandler as N, isEnterPhaseHandler as P, isEnterStartPhaseHandler as F, isExitActivePhaseHandler as I, isExitDonePhaseHandler as L, isExitPhaseHandler as R, isExitStartPhaseHandler as z, isStartPhaseHandler as B } from "./utils.js";
4
+ import { Transition as V } from "./Transition.js";
5
+ import { TransitionCSS as H } from "./TransitionCSS.js";
6
+ import { TransitionGroup as U } from "./TransitionGroup.js";
7
+ import { TransitionStyle as W } from "./TransitionStyle.js";
8
+ //#region components/common/transition/index.ts
9
+ var G = V;
10
+ //#endregion
11
+ export { e as TRANSITION_CSS_CLASS_NAMES_SUFFIX, t as TRANSITION_DEFAULT_PROPS, n as TRANSITION_EVENT_MAP, r as TRANSITION_EVENT_NAME_KEY, i as TRANSITION_MOUNT_ON_ENTER_KEY, a as TRANSITION_NEXT_PHASE_KEY, o as TRANSITION_PHASE_APPEAR, s as TRANSITION_PHASE_APPEAR_ACTIVE, c as TRANSITION_PHASE_APPEAR_DONE, l as TRANSITION_PHASE_ENTER, u as TRANSITION_PHASE_ENTER_ACTIVE, d as TRANSITION_PHASE_ENTER_DONE, f as TRANSITION_PHASE_EVENT_ON_ENTER, p as TRANSITION_PHASE_EVENT_ON_ENTERED, m as TRANSITION_PHASE_EVENT_ON_ENTERING, h as TRANSITION_PHASE_EVENT_ON_EXIT, g as TRANSITION_PHASE_EVENT_ON_EXITED, _ as TRANSITION_PHASE_EVENT_ON_EXITING, v as TRANSITION_PHASE_EXIT, y as TRANSITION_PHASE_EXIT_ACTIVE, b as TRANSITION_PHASE_EXIT_DONE, x as TRANSITION_UNMOUNT_ON_EXIT_KEY, V as Transition, H as TransitionCSS, U as TransitionGroup, S as TransitionPhase, C as TransitionPhaseEvent, W as TransitionStyle, G as default, w as transitionFallbackAppearToEnter, T as transitionGetDurations, E as transitionIsActivePhaseHandler, D as transitionIsAppearActivePhaseHandler, O as transitionIsAppearDonePhaseHandler, k as transitionIsAppearPhaseHandler, A as transitionIsAppearStartPhaseHandler, j as transitionIsDonePhaseHandler, M as transitionIsEnterActivePhaseHandler, N as transitionIsEnterDonePhaseHandler, P as transitionIsEnterPhaseHandler, F as transitionIsEnterStartPhaseHandler, I as transitionIsExitActivePhaseHandler, L as transitionIsExitDonePhaseHandler, R as transitionIsExitPhaseHandler, z as transitionIsExitStartPhaseHandler, B as transitionIsStartPhaseHandler };
12
+ /* 独立思考,明辨是非 */
@@ -0,0 +1,197 @@
1
+ import { RefObject } from 'react';
2
+ import type { ElementLike } from '../utils/findRootElement';
3
+ import { TransitionPhase } from './constants';
4
+ /**
5
+ * 类型表示每个过渡阶段的状态。
6
+ * 每个阶段都与一个布尔值相关联,指示该阶段是否处于活动状态。
7
+ */
8
+ export type TransitionState = {
9
+ [key in TransitionPhase]: boolean;
10
+ };
11
+ export type DurationObjectType = {
12
+ appear?: number;
13
+ enter?: number;
14
+ exit?: number;
15
+ };
16
+ export type DurationType = number | DurationObjectType;
17
+ export type TransitionProps = {
18
+ /**
19
+ * 如果为 true,组件将显示并通过 "appear"、"enter" 或 "exit" 阶段过渡到 "entered" 状态。
20
+ * 如果为 false,它将通过 "exit" 阶段过渡到 "exited" 状态。
21
+ *
22
+ * @default false
23
+ */
24
+ in?: boolean;
25
+ /**
26
+ * 如果为 true,当组件首次挂载时,过渡将运行 "appear" 阶段("appear"、"appearActive"、"appearDone")。
27
+ *
28
+ * @default false
29
+ */
30
+ appear?: boolean;
31
+ /**
32
+ * 如果为 true,当组件进入时启用 "enter" 阶段("enter"、"enterActive"、"enterDone")。
33
+ *
34
+ * @default true
35
+ */
36
+ enter?: boolean;
37
+ /**
38
+ * 如果为 true,当组件离开时启用 "exit" 阶段("exit"、"exitActive"、"exitDone")。
39
+ *
40
+ * @default true
41
+ */
42
+ exit?: boolean;
43
+ /**
44
+ * 过渡的持续时间(以毫秒为单位)。可用于覆盖各阶段的默认持续时间。
45
+ *
46
+ * @default 500
47
+ */
48
+ duration?: DurationType;
49
+ /**
50
+ * 如果为 true,即使组件过渡到 "exited" 状态,它也会保持挂载在 DOM 中。
51
+ *
52
+ * @default false
53
+ */
54
+ alwaysMounted?: boolean;
55
+ /**
56
+ * 一个函数,用于手动处理过渡阶段的结束。
57
+ *
58
+ * @param phase - 当前过渡阶段(例如,"appear"、"enter"、"exit")。
59
+ * @param done - 一个回调函数,用于信号通知阶段完成。
60
+ */
61
+ addEndListener?: (phase: TransitionPhase, done: (phase?: TransitionPhase) => void, element?: HTMLElement) => void;
62
+ /**
63
+ * 一个渲染函数,提供当前过渡状态和活动阶段。
64
+ *
65
+ * @param transitionState - 过渡的当前状态,指示哪个阶段处于活动状态。
66
+ * @param activePhase - 当前正在进行的阶段(例如,"appearActive"、"enterDone")。
67
+ * @returns 要渲染的 React 节点。
68
+ */
69
+ children: React.ReactNode | ((transitionState: TransitionState, activePhase: TransitionPhase) => React.ReactNode);
70
+ /**
71
+ * 要被执行动画的元素。
72
+ */
73
+ refElement?: ElementLike | RefObject<HTMLElement | null>;
74
+ mountOnEnter?: boolean;
75
+ unmountOnExit?: boolean;
76
+ /**
77
+ * 进入开始时触发
78
+ */
79
+ onEnter?: (e?: HTMLElement | null) => void;
80
+ /**
81
+ * 进入动画执行中触发
82
+ */
83
+ onEntering?: (e?: HTMLElement | null) => void;
84
+ /**
85
+ * 进入动画完成触发
86
+ */
87
+ onEntered?: (e?: HTMLElement | null) => void;
88
+ /**
89
+ * 退出开始时触发
90
+ */
91
+ onExit?: (e?: HTMLElement | null) => void;
92
+ /**
93
+ * 退出动画执行中触发
94
+ */
95
+ onExiting?: (e?: HTMLElement | null) => void;
96
+ /**
97
+ * 退出动画完成触发
98
+ */
99
+ onExited?: (e?: HTMLElement | null) => void;
100
+ /**
101
+ * 阶段发生变化前触发
102
+ */
103
+ onBeforePhaseChange?: (phase: TransitionPhase, e?: HTMLElement | null) => void;
104
+ /**
105
+ * 阶段发生变化后触发
106
+ */
107
+ onAfterPhaseChange?: (phase: TransitionPhase, e?: HTMLElement | null) => void;
108
+ };
109
+ export type TransitionCSS_ClassNamesObject = {
110
+ [key in TransitionPhase]?: string;
111
+ };
112
+ /**
113
+ * `TransitionCSS_ClassNames` 表示不同阶段中用于基于 CSS 的过渡的类名。
114
+ * 此类型可以是单个字符串,它将应用于所有过渡阶段,并根据当前阶段添加后缀,
115
+ * 或者是一个对象,其中每个键对应于特定的过渡阶段,值是该阶段的类名。
116
+ */
117
+ export type TransitionCSS_ClassNames = string | TransitionCSS_ClassNamesObject;
118
+ export type TransitionCSS_Props = Omit<TransitionProps, 'children'> & {
119
+ /**
120
+ * 要应用动画的子元素。
121
+ * 这应该是一个支持 `className` 属性的单个 React 元素。
122
+ * `className` 属性将根据当前过渡阶段与 `classNames` 属性中的类名组合。
123
+ */
124
+ children: React.ReactElement<{
125
+ className?: string;
126
+ }>;
127
+ /**
128
+ * 定义每个过渡阶段要应用的 CSS 类名。
129
+ */
130
+ classNames: TransitionCSS_ClassNames;
131
+ };
132
+ export type TransitionCSS_ChildProps = TransitionCSS_Props & {
133
+ phase: TransitionPhase;
134
+ };
135
+ /**
136
+ * 类型表示不同过渡阶段的样式。
137
+ * `TransitionPhase` 是表示不同阶段的键,值是 `React.CSSProperties` 对象。
138
+ */
139
+ export type TransitionStyleStyles = {
140
+ [key in TransitionPhase]?: React.CSSProperties;
141
+ };
142
+ export type TransitionStyleProps = Omit<TransitionProps, 'children'> & {
143
+ /**
144
+ * 要应用动画的子元素。
145
+ * 这应该是一个支持 `style` 属性的单个 React 元素。
146
+ * `style` 属性将与当前过渡阶段的 `styles` 属性中指定的样式组合。
147
+ */
148
+ children: React.ReactElement<{
149
+ style?: React.CSSProperties;
150
+ }>;
151
+ /**
152
+ * 包含不同动画阶段样式的对象。
153
+ * `TransitionPhase` 表示动画阶段,可应用特定样式。
154
+ * 每个阶段样式由 `React.CSSProperties` 对象表示。
155
+ */
156
+ styles: TransitionStyleStyles;
157
+ };
158
+ export type TransitionStyleChildProps = TransitionStyleProps & {
159
+ phase: TransitionPhase;
160
+ };
161
+ export type TransitionGroupProps = {
162
+ children: React.ReactNode;
163
+ /**
164
+ * 一个布尔值,指示子元素在组件首次挂载时是否应过渡通过 "appear" 阶段。
165
+ *
166
+ * @default false
167
+ */
168
+ appear?: TransitionProps['appear'];
169
+ /**
170
+ * 一个布尔值,指示子元素在添加到 DOM 时是否应过渡通过 "enter" 阶段。
171
+ *
172
+ * @default true
173
+ */
174
+ enter?: TransitionProps['enter'];
175
+ /**
176
+ * 一个布尔值,指示子元素从 DOM 中移除时是否应过渡通过 "exit" 阶段。
177
+ *
178
+ * @default false
179
+ */
180
+ exit?: TransitionProps['exit'];
181
+ /**
182
+ * 过渡的持续时间(以毫秒为单位)。此值可用于设置组中所有子元素的过渡持续时间。
183
+ *
184
+ * @default 500
185
+ */
186
+ duration?: TransitionProps['duration'];
187
+ /**
188
+ * 如果为 true,即使组件过渡到 "exited" 状态,它也会保持挂载在 DOM 中。
189
+ *
190
+ * @default false
191
+ */
192
+ alwaysMounted?: TransitionProps['alwaysMounted'];
193
+ };
194
+ export type TransitionGroupVisibleElementProps = {
195
+ element: React.ReactElement<unknown>;
196
+ removeTimeout?: number;
197
+ };
@@ -0,0 +1,20 @@
1
+ import { TransitionPhase } from './constants';
2
+ import type { DurationObjectType, DurationType, TransitionCSS_ClassNamesObject, TransitionStyleStyles } from './interface';
3
+ export declare function getDurations(duration: DurationType): DurationObjectType;
4
+ export declare function fallbackAppearToEnter(o: TransitionStyleStyles | TransitionCSS_ClassNamesObject): TransitionCSS_ClassNamesObject | TransitionStyleStyles;
5
+ export declare function inArrayHandler<T extends TransitionPhase>(array: T[], phase: TransitionPhase): phase is T;
6
+ export declare function isAppearPhaseHandler(phase: TransitionPhase): boolean;
7
+ export declare function isAppearStartPhaseHandler(phase: TransitionPhase): boolean;
8
+ export declare function isAppearActivePhaseHandler(phase: TransitionPhase): boolean;
9
+ export declare function isAppearDonePhaseHandler(phase: TransitionPhase): boolean;
10
+ export declare function isEnterPhaseHandler(phase: TransitionPhase, includeAppearPhase?: boolean): boolean;
11
+ export declare function isEnterStartPhaseHandler(phase: TransitionPhase, includeAppearPhase?: boolean): boolean;
12
+ export declare function isEnterActivePhaseHandler(phase: TransitionPhase, includeAppearPhase?: boolean): boolean;
13
+ export declare function isEnterDonePhaseHandler(phase: TransitionPhase, includeAppearPhase?: boolean): boolean;
14
+ export declare function isExitPhaseHandler(phase: TransitionPhase): boolean;
15
+ export declare function isExitStartPhaseHandler(phase: TransitionPhase): boolean;
16
+ export declare function isExitActivePhaseHandler(phase: TransitionPhase): boolean;
17
+ export declare function isExitDonePhaseHandler(phase: TransitionPhase): boolean;
18
+ export declare function isStartPhaseHandler(phase: TransitionPhase): boolean;
19
+ export declare function isActivePhaseHandler(phase: TransitionPhase): boolean;
20
+ export declare function isDonePhaseHandler(phase: TransitionPhase): boolean;
@@ -0,0 +1,99 @@
1
+ /* 潘启宝 2026-04-23 09:23:27 星期四 */
2
+ import { isNullOrUndefined as e, isNumber as t, isPlainObject as n } from "../utils/is.js";
3
+ import { TRANSITION_PHASE_APPEAR as r, TRANSITION_PHASE_APPEAR_ACTIVE as i, TRANSITION_PHASE_APPEAR_DONE as a, TRANSITION_PHASE_ENTER as o, TRANSITION_PHASE_ENTER_ACTIVE as s, TRANSITION_PHASE_ENTER_DONE as c, TRANSITION_PHASE_EXIT as l, TRANSITION_PHASE_EXIT_ACTIVE as u, TRANSITION_PHASE_EXIT_DONE as d } from "./constants.js";
4
+ //#region components/common/transition/utils.ts
5
+ function f(i) {
6
+ let a = {
7
+ [r]: void 0,
8
+ [o]: void 0,
9
+ [l]: void 0
10
+ };
11
+ return n(i) && (a = Object.assign(a, i)), Object.entries(a).forEach(([n, s], c, u) => {
12
+ if (e(s)) {
13
+ let e = t(i) ? i : a[r] ?? a[o] ?? a[l] ?? 500;
14
+ a[n] = Math.max(e, 0);
15
+ }
16
+ }), a;
17
+ }
18
+ function p(e) {
19
+ return e[r] ||= e[o], e[i] ||= e[s], e[a] ||= e[c], e;
20
+ }
21
+ function m(e, t) {
22
+ return e.includes(t);
23
+ }
24
+ function h(e) {
25
+ return m([
26
+ r,
27
+ i,
28
+ a
29
+ ], e);
30
+ }
31
+ function g(e) {
32
+ return m([r], e);
33
+ }
34
+ function _(e) {
35
+ return m([i], e);
36
+ }
37
+ function v(e) {
38
+ return m([a], e);
39
+ }
40
+ function y(e, t) {
41
+ let n = m([
42
+ o,
43
+ s,
44
+ c
45
+ ], e);
46
+ return t && (n ||= h(e)), n;
47
+ }
48
+ function b(e, t) {
49
+ let n = m([o], e);
50
+ return t && (n ||= g(e)), n;
51
+ }
52
+ function x(e, t) {
53
+ let n = m([s], e);
54
+ return t && (n ||= _(e)), n;
55
+ }
56
+ function S(e, t) {
57
+ let n = m([c], e);
58
+ return t && (n ||= v(e)), n;
59
+ }
60
+ function C(e) {
61
+ return m([
62
+ l,
63
+ u,
64
+ d
65
+ ], e);
66
+ }
67
+ function w(e) {
68
+ return m([l], e);
69
+ }
70
+ function T(e) {
71
+ return m([u], e);
72
+ }
73
+ function E(e) {
74
+ return m([d], e);
75
+ }
76
+ function D(e) {
77
+ return m([
78
+ r,
79
+ o,
80
+ l
81
+ ], e);
82
+ }
83
+ function O(e) {
84
+ return m([
85
+ i,
86
+ s,
87
+ u
88
+ ], e);
89
+ }
90
+ function k(e) {
91
+ return m([
92
+ a,
93
+ c,
94
+ d
95
+ ], e);
96
+ }
97
+ //#endregion
98
+ export { p as fallbackAppearToEnter, f as getDurations, m as inArrayHandler, O as isActivePhaseHandler, _ as isAppearActivePhaseHandler, v as isAppearDonePhaseHandler, h as isAppearPhaseHandler, g as isAppearStartPhaseHandler, k as isDonePhaseHandler, x as isEnterActivePhaseHandler, S as isEnterDonePhaseHandler, y as isEnterPhaseHandler, b as isEnterStartPhaseHandler, T as isExitActivePhaseHandler, E as isExitDonePhaseHandler, C as isExitPhaseHandler, w as isExitStartPhaseHandler, D as isStartPhaseHandler };
99
+ /* 独立思考,明辨是非 */
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-04-03 14:07:44 星期五 */
1
+ /* 潘启宝 2026-04-23 09:23:27 星期四 */
2
2
  import { callOrReturn as e, callOrReturn as t } from "@unicom-cloud/utils/function";
3
3
  export { e as callOrReturn, t as default };
4
4
  /* 独立思考,明辨是非 */
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-04-03 14:07:44 星期五 */
1
+ /* 潘启宝 2026-04-23 09:23:27 星期四 */
2
2
  import { fillRef as e, getReactElementRef as t } from "./ref.js";
3
3
  //#region components/common/utils/callbackOriginRef.ts
4
4
  function n(n, r) {
package/utils/caseName.js CHANGED
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-04-03 14:07:44 星期五 */
1
+ /* 潘启宝 2026-04-23 09:23:27 星期四 */
2
2
  import e, { default as t } from "@unicom-cloud/utils/case-name";
3
3
  export { e as caseName, t as default };
4
4
  /* 独立思考,明辨是非 */
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-04-03 14:07:44 星期五 */
1
+ /* 潘启宝 2026-04-23 09:23:27 星期四 */
2
2
  import e, { default as t, default as n } from "@unicom-cloud/utils/class-name";
3
3
  export { e as className, n as cs, t as default };
4
4
  /* 独立思考,明辨是非 */
@@ -1,3 +1,5 @@
1
1
  export declare const CSS_VARIABLE_ELEMENT: HTMLElement;
2
2
  export declare const NOOP: (...args: any[]) => void;
3
3
  export { UI_PC_KEY, UI_PC_THEME_DARK_CLASS_NAME, } from '@unicom-cloud/utils/constant/ui';
4
+ export declare const DAYJS_DEFAULT_FORMAT = "YYYY-MM-DD";
5
+ export declare const DAYJS_DEFAULT_FORMAT_WITH_TIME = "YYYY-MM-DD HH:mm:ss";
package/utils/constant.js CHANGED
@@ -1,8 +1,8 @@
1
- /* 潘启宝 2026-04-03 14:07:44 星期五 */
1
+ /* 潘启宝 2026-04-23 09:23:27 星期四 */
2
2
  import e from "lodash/noop";
3
3
  import { UI_PC_KEY as t, UI_PC_THEME_DARK_CLASS_NAME as n } from "@unicom-cloud/utils/constant/ui";
4
4
  //#region components/common/utils/constant.ts
5
- var r = window.document.documentElement, i = e;
5
+ var r = window.document.documentElement, i = e, a = "YYYY-MM-DD", o = `${a} HH:mm:ss`;
6
6
  //#endregion
7
- export { r as CSS_VARIABLE_ELEMENT, i as NOOP, t as UI_PC_KEY, n as UI_PC_THEME_DARK_CLASS_NAME };
7
+ export { r as CSS_VARIABLE_ELEMENT, a as DAYJS_DEFAULT_FORMAT, o as DAYJS_DEFAULT_FORMAT_WITH_TIME, i as NOOP, t as UI_PC_KEY, n as UI_PC_THEME_DARK_CLASS_NAME };
8
8
  /* 独立思考,明辨是非 */
package/utils/copy.js CHANGED
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-04-03 14:07:44 星期五 */
1
+ /* 潘启宝 2026-04-23 09:23:27 星期四 */
2
2
  import e from "@unicom-cloud/utils/clipboard-copy";
3
3
  //#region components/common/utils/copy.ts
4
4
  var t = e;
package/utils/date.js CHANGED
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-04-03 14:07:44 星期五 */
1
+ /* 潘启宝 2026-04-23 09:23:27 星期四 */
2
2
  import { convertTime as e, convertToDurationBasedOnTimeUnits as t, dateFormat as n, dayjsFormat as r } from "@unicom-cloud/utils/date";
3
3
  export { e as convertTime, t as convertToDurationBasedOnTimeUnits, n as dateFormat, r as dayjsFormat };
4
4
  /* 独立思考,明辨是非 */
package/utils/dayjs.js CHANGED
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-04-03 14:07:44 星期五 */
1
+ /* 潘启宝 2026-04-23 09:23:27 星期四 */
2
2
  import e from "dayjs";
3
3
  import "dayjs/locale/zh-cn.js";
4
4
  import t from "dayjs/plugin/advancedFormat.js";
package/utils/dom.js CHANGED
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-04-03 14:07:44 星期五 */
1
+ /* 潘启宝 2026-04-23 09:23:27 星期四 */
2
2
  import { isEventTarget as e, isFunction as t, isScrollElement as n, isServerRendering as r, isString as i } from "./is.js";
3
3
  import a from "@unicom-cloud/utils/dom-helpers/canUseDOM";
4
4
  import o from "@unicom-cloud/utils/dom-helpers/getElementCoordinates";
package/utils/emitter.js CHANGED
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-04-03 14:07:44 星期五 */
1
+ /* 潘启宝 2026-04-23 09:23:27 星期四 */
2
2
  import e, { default as t } from "@unicom-cloud/utils/emitter";
3
3
  export { e as Emitter, t as default };
4
4
  /* 独立思考,明辨是非 */
package/utils/fileRead.js CHANGED
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-04-03 14:07:44 星期五 */
1
+ /* 潘启宝 2026-04-23 09:23:27 星期四 */
2
2
  import e, { fileRead as t } from "@unicom-cloud/utils/file/fileRead";
3
3
  export { e as default, t as fileRead };
4
4
  /* 独立思考,明辨是非 */
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-04-03 14:07:44 星期五 */
1
+ /* 潘启宝 2026-04-23 09:23:27 星期四 */
2
2
  import e, { fileToDataURL as t } from "@unicom-cloud/utils/file/fileToDataURL";
3
3
  export { e as default, t as fileToDataURL };
4
4
  /* 独立思考,明辨是非 */