@unicom-cloud/ui-common 0.1.58 → 0.1.60

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 (437) hide show
  1. package/.virtual/_rolldown/runtime.js +1 -1
  2. package/animation/Animation.js +41 -42
  3. package/animation/constants.d.ts +2 -0
  4. package/animation/constants.js +4 -4
  5. package/animation/context.d.ts +0 -1
  6. package/animation/context.js +3 -3
  7. package/animation/index.d.ts +0 -6
  8. package/animation/index.js +6 -10
  9. package/animation/interface.d.ts +1 -1
  10. package/animation/style/index.js +1 -1
  11. package/animation/utils.js +1 -1
  12. package/base/Base.js +1 -1
  13. package/base/constants.d.ts +2 -0
  14. package/base/constants.js +4 -1
  15. package/base/context.d.ts +0 -1
  16. package/base/context.js +3 -3
  17. package/base/index.js +1 -1
  18. package/base/style/index.js +1 -1
  19. package/base/utils.js +1 -1
  20. package/border-beam/BorderBeam.js +14 -14
  21. package/border-beam/Effect.d.ts +1 -6
  22. package/border-beam/Effect.js +3 -3
  23. package/border-beam/constants.d.ts +2 -1
  24. package/border-beam/constants.js +8 -3
  25. package/border-beam/context.d.ts +0 -1
  26. package/border-beam/context.js +4 -10
  27. package/border-beam/hooks/useBorderSize.d.ts +1 -5
  28. package/border-beam/hooks/useBorderSize.js +1 -1
  29. package/border-beam/hooks/useChildDom.d.ts +1 -1
  30. package/border-beam/hooks/useChildDom.js +1 -1
  31. package/border-beam/index.d.ts +0 -6
  32. package/border-beam/index.js +5 -9
  33. package/border-beam/interface.d.ts +27 -4
  34. package/border-beam/style/index.js +1 -1
  35. package/border-beam/utils.d.ts +1 -9
  36. package/border-beam/utils.js +9 -9
  37. package/development/Development.js +6 -5
  38. package/development/constants.d.ts +2 -0
  39. package/development/constants.js +4 -1
  40. package/development/context.d.ts +0 -1
  41. package/development/context.js +3 -3
  42. package/development/index.d.ts +0 -6
  43. package/development/index.js +5 -9
  44. package/development/style/index.js +1 -1
  45. package/development/utils.js +1 -1
  46. package/empty/Empty.d.ts +1 -1
  47. package/empty/Empty.js +28 -27
  48. package/empty/constants.d.ts +2 -0
  49. package/empty/constants.js +4 -1
  50. package/empty/context.d.ts +0 -1
  51. package/empty/context.js +3 -3
  52. package/empty/index.d.ts +1 -7
  53. package/empty/index.js +5 -9
  54. package/empty/style/index.js +1 -1
  55. package/empty/utils.js +1 -1
  56. package/flex/Flex.js +5 -4
  57. package/flex/FlexVertical.js +1 -1
  58. package/flex/constants.d.ts +2 -0
  59. package/flex/constants.js +7 -1
  60. package/flex/context.d.ts +0 -1
  61. package/flex/context.js +3 -6
  62. package/flex/index.d.ts +1 -7
  63. package/flex/index.js +9 -11
  64. package/flex/interface.d.ts +1 -1
  65. package/flex/style/index.js +1 -1
  66. package/flex/utils.d.ts +1 -1
  67. package/flex/utils.js +10 -12
  68. package/grid/Grid.js +16 -15
  69. package/grid/Item.js +10 -9
  70. package/grid/constants.d.ts +3 -0
  71. package/grid/constants.js +8 -1
  72. package/grid/context.d.ts +0 -2
  73. package/grid/context.js +4 -8
  74. package/grid/index.d.ts +0 -6
  75. package/grid/index.js +9 -11
  76. package/grid/style/index.js +1 -1
  77. package/grid/utils.js +1 -1
  78. package/higher-order/with-speech-synthesis/constants.d.ts +2 -0
  79. package/higher-order/with-speech-synthesis/constants.js +7 -0
  80. package/higher-order/with-speech-synthesis/context.d.ts +0 -1
  81. package/higher-order/with-speech-synthesis/context.js +3 -3
  82. package/higher-order/with-speech-synthesis/index.d.ts +0 -6
  83. package/higher-order/with-speech-synthesis/index.js +5 -9
  84. package/higher-order/with-speech-synthesis/style/index.js +1 -1
  85. package/higher-order/with-speech-synthesis/withSpeechSynthesis.d.ts +8 -1
  86. package/higher-order/with-speech-synthesis/withSpeechSynthesis.js +28 -27
  87. package/hoc/withContext.js +1 -1
  88. package/hooks/create-deep-compare-effect/index.js +1 -1
  89. package/hooks/create-update-effect/index.js +1 -1
  90. package/hooks/create-use-storage-state/index.js +9 -9
  91. package/hooks/index.d.ts +1 -0
  92. package/hooks/index.js +93 -92
  93. package/hooks/use-async-effect/index.js +1 -1
  94. package/hooks/use-boolean/index.js +1 -1
  95. package/hooks/use-click-away/index.d.ts +7 -1
  96. package/hooks/use-click-away/index.js +20 -12
  97. package/hooks/use-computed-state/index.js +1 -1
  98. package/hooks/use-controllable-value/index.js +1 -1
  99. package/hooks/use-cookie-state/index.js +2 -2
  100. package/hooks/use-count-down/index.js +1 -1
  101. package/hooks/use-counter/index.js +1 -1
  102. package/hooks/use-create/index.js +6 -5
  103. package/hooks/use-creation/index.js +7 -6
  104. package/hooks/use-debounce/debounceOptions.d.ts +1 -6
  105. package/hooks/use-debounce/index.js +1 -1
  106. package/hooks/use-debounce/interface.d.ts +14 -0
  107. package/hooks/use-debounce-effect/index.js +1 -1
  108. package/hooks/use-debounce-fn/index.js +5 -5
  109. package/hooks/use-deep-compare-effect/index.js +1 -1
  110. package/hooks/use-deep-compare-layout-effect/index.js +1 -1
  111. package/hooks/use-document-visibility/index.js +7 -7
  112. package/hooks/use-drag/index.d.ts +1 -1
  113. package/hooks/use-drag/index.js +10 -10
  114. package/hooks/use-drag-move/index.js +1 -1
  115. package/hooks/use-drop/index.d.ts +1 -1
  116. package/hooks/use-drop/index.js +1 -1
  117. package/hooks/use-dynamic-list/index.d.ts +18 -0
  118. package/hooks/use-dynamic-list/index.js +105 -0
  119. package/hooks/use-effect-event/index.js +1 -1
  120. package/hooks/use-event/index.js +1 -1
  121. package/hooks/use-event-emitter/index.d.ts +13 -1
  122. package/hooks/use-event-emitter/index.js +15 -12
  123. package/hooks/use-event-listener/index.d.ts +2 -7
  124. package/hooks/use-event-listener/index.js +1 -1
  125. package/hooks/use-event-target/index.js +1 -1
  126. package/hooks/use-external/index.js +2 -2
  127. package/hooks/use-favicon/index.js +2 -2
  128. package/hooks/use-focus-within/index.d.ts +1 -5
  129. package/hooks/use-focus-within/index.js +1 -1
  130. package/hooks/use-focus-within/interface.d.ts +13 -0
  131. package/hooks/use-force-update/index.js +1 -1
  132. package/hooks/use-fullscreen/index.js +14 -14
  133. package/hooks/use-get-state/index.d.ts +1 -7
  134. package/hooks/use-get-state/index.js +1 -1
  135. package/hooks/use-history-travel/index.d.ts +1 -1
  136. package/hooks/use-history-travel/index.js +32 -26
  137. package/hooks/use-hover/index.js +1 -1
  138. package/hooks/use-id/index.js +1 -1
  139. package/hooks/use-in-viewport/index.js +10 -10
  140. package/hooks/use-infinite-scroll/index.js +33 -31
  141. package/hooks/use-intersection-observer/index.js +3 -3
  142. package/hooks/use-intersection-observers/index.js +10 -10
  143. package/hooks/use-interval/index.js +1 -1
  144. package/hooks/use-is-first-render/index.js +1 -1
  145. package/hooks/use-isomorphic-layout-effect/index.js +1 -1
  146. package/hooks/use-key-press/index.js +1 -1
  147. package/hooks/use-keyboard-event/index.d.ts +1 -0
  148. package/hooks/use-keyboard-event/index.js +1 -1
  149. package/hooks/use-latest/index.js +1 -1
  150. package/hooks/use-listen-window-resize/index.js +1 -1
  151. package/hooks/use-local-storage-state/index.js +4 -4
  152. package/hooks/use-lock-fn/index.js +1 -1
  153. package/hooks/use-long-press/index.js +1 -1
  154. package/hooks/use-map/index.js +1 -1
  155. package/hooks/use-media/index.js +1 -1
  156. package/hooks/use-memo/index.js +1 -1
  157. package/hooks/use-memoized-fn/index.js +1 -1
  158. package/hooks/use-merge-component-props/index.d.ts +2 -2
  159. package/hooks/use-merge-component-props/index.js +2 -1
  160. package/hooks/use-merge-value/index.d.ts +1 -1
  161. package/hooks/use-merge-value/index.js +1 -1
  162. package/hooks/use-mobile/index.js +1 -1
  163. package/hooks/use-mount/index.js +1 -1
  164. package/hooks/use-mouse/index.d.ts +1 -1
  165. package/hooks/use-mouse/index.js +9 -9
  166. package/hooks/use-mutation-observer/index.js +2 -2
  167. package/hooks/use-mutation-observers/index.js +10 -10
  168. package/hooks/use-network/index.js +1 -1
  169. package/hooks/use-online-status/index.js +1 -1
  170. package/hooks/use-overflow-hidden/index.js +1 -1
  171. package/hooks/use-override-ref/index.d.ts +3 -5
  172. package/hooks/use-override-ref/index.js +5 -5
  173. package/hooks/use-pagination/index.js +1 -1
  174. package/hooks/use-pagination/types.d.ts +5 -8
  175. package/hooks/use-paste-file/index.js +9 -9
  176. package/hooks/use-paste-image/index.js +1 -1
  177. package/hooks/use-persist-callback/index.js +1 -1
  178. package/hooks/use-prefers-color-scheme-dark/index.js +1 -1
  179. package/hooks/use-previous/index.js +1 -1
  180. package/hooks/use-raf-interval/index.js +17 -17
  181. package/hooks/use-raf-state/index.d.ts +1 -6
  182. package/hooks/use-raf-state/index.js +1 -1
  183. package/hooks/use-raf-timeout/index.js +17 -17
  184. package/hooks/use-reactive/index.js +5 -5
  185. package/hooks/use-ref-latest/index.js +1 -1
  186. package/hooks/use-ref-map/index.d.ts +2 -1
  187. package/hooks/use-ref-map/index.js +1 -1
  188. package/hooks/use-refs/index.js +1 -1
  189. package/hooks/use-request/index.js +5 -5
  190. package/hooks/use-request/src/Fetch.d.ts +2 -0
  191. package/hooks/use-request/src/Fetch.js +32 -28
  192. package/hooks/use-request/src/plugins/useAutoRunPlugin.js +1 -1
  193. package/hooks/use-request/src/plugins/useCachePlugin.js +5 -5
  194. package/hooks/use-request/src/plugins/useDebouncePlugin.js +2 -2
  195. package/hooks/use-request/src/plugins/useLoadingDelayPlugin.js +13 -12
  196. package/hooks/use-request/src/plugins/usePollingPlugin.js +3 -3
  197. package/hooks/use-request/src/plugins/useRefreshOnWindowFocusPlugin.js +1 -1
  198. package/hooks/use-request/src/plugins/useRetryPlugin.js +1 -1
  199. package/hooks/use-request/src/plugins/useThrottlePlugin.js +1 -1
  200. package/hooks/use-request/src/types.d.ts +2 -1
  201. package/hooks/use-request/src/useRequest.d.ts +11 -4
  202. package/hooks/use-request/src/useRequest.js +1 -1
  203. package/hooks/use-request/src/useRequestImplement.js +18 -18
  204. package/hooks/use-request/src/utils/cache.js +1 -1
  205. package/hooks/use-request/src/utils/cachePromise.js +1 -1
  206. package/hooks/use-request/src/utils/cacheSubscribe.js +1 -1
  207. package/hooks/use-request/src/utils/isDocumentVisible.js +1 -1
  208. package/hooks/use-request/src/utils/isOnline.js +3 -3
  209. package/hooks/use-request/src/utils/limit.js +1 -1
  210. package/hooks/use-request/src/utils/subscribeFocus.js +1 -1
  211. package/hooks/use-request/src/utils/subscribeReVisible.js +1 -1
  212. package/hooks/use-reset-state/index.js +6 -6
  213. package/hooks/use-resize-observer/index.d.ts +6 -1
  214. package/hooks/use-resize-observer/index.js +30 -4
  215. package/hooks/use-resize-observers/index.d.ts +1 -0
  216. package/hooks/use-resize-observers/index.js +23 -24
  217. package/hooks/use-responsive/index.js +2 -2
  218. package/hooks/use-safe-state/index.js +1 -1
  219. package/hooks/use-scroll/index.js +20 -20
  220. package/hooks/use-selections/index.d.ts +1 -1
  221. package/hooks/use-selections/index.js +45 -39
  222. package/hooks/use-session-storage-state/index.js +4 -4
  223. package/hooks/use-set/index.js +1 -1
  224. package/hooks/use-set-state/index.js +1 -1
  225. package/hooks/use-size/index.d.ts +1 -6
  226. package/hooks/use-size/index.js +4 -33
  227. package/hooks/use-state-callback/index.d.ts +1 -5
  228. package/hooks/use-state-callback/index.js +7 -7
  229. package/hooks/use-state-with-promise/index.d.ts +1 -4
  230. package/hooks/use-state-with-promise/index.js +1 -1
  231. package/hooks/use-sync-state/index.js +5 -5
  232. package/hooks/use-text-selection/index.js +1 -1
  233. package/hooks/use-theme/index.js +14 -14
  234. package/hooks/use-throttle/index.js +1 -1
  235. package/hooks/use-throttle/interface.d.ts +13 -0
  236. package/hooks/use-throttle/throttleOptions.d.ts +1 -5
  237. package/hooks/use-throttle-effect/index.js +5 -5
  238. package/hooks/use-throttle-fn/index.js +5 -5
  239. package/hooks/use-throttle-fn-with-raf/index.js +6 -6
  240. package/hooks/use-timeout/index.js +1 -1
  241. package/hooks/use-title/index.js +5 -5
  242. package/hooks/use-toggle/index.d.ts +6 -3
  243. package/hooks/use-toggle/index.js +1 -1
  244. package/hooks/use-tracked-effect/index.js +1 -1
  245. package/hooks/use-unmount/index.js +1 -1
  246. package/hooks/use-unmounted-ref/index.js +1 -1
  247. package/hooks/use-update/index.js +1 -1
  248. package/hooks/use-update-effect/index.js +1 -1
  249. package/hooks/use-update-layout-effect/index.js +1 -1
  250. package/hooks/use-url-state/index.d.ts +1 -1
  251. package/hooks/use-url-state/index.js +1 -1
  252. package/hooks/use-virtual-list/index.js +13 -13
  253. package/hooks/use-watch/index.js +1 -1
  254. package/hooks/use-web-socket/index.js +7 -7
  255. package/hooks/use-why-did-you-update/index.js +1 -1
  256. package/hooks/use-window-size/index.js +7 -7
  257. package/hooks/utils/createEffectWithTarget.js +7 -7
  258. package/hooks/utils/depsAreSame.js +1 -1
  259. package/hooks/utils/depsEqual.js +1 -1
  260. package/hooks/utils/domTarget.js +1 -1
  261. package/hooks/utils/getDocumentOrShadow.js +1 -1
  262. package/hooks/utils/index.js +1 -1
  263. package/hooks/utils/isAppleDevice.js +1 -1
  264. package/hooks/utils/isBrowser.js +1 -1
  265. package/hooks/utils/isDev.js +1 -1
  266. package/hooks/utils/rect.js +1 -1
  267. package/hooks/utils/useDeepCompareWithTarget.js +4 -4
  268. package/hooks/utils/useEffectWithTarget.js +1 -1
  269. package/hooks/utils/useIsomorphicLayoutEffectWithTarget.js +1 -1
  270. package/hooks/utils/useLayoutEffectWithTarget.js +1 -1
  271. package/icons/file/File.js +5 -4
  272. package/icons/file/constants.d.ts +2 -0
  273. package/icons/file/constants.js +7 -0
  274. package/icons/file/context.d.ts +0 -1
  275. package/icons/file/context.js +3 -3
  276. package/icons/file/index.js +2 -2
  277. package/icons/file/style/index.js +1 -1
  278. package/index.d.ts +2 -2
  279. package/index.js +542 -537
  280. package/morphicons/core/interpolate.js +1 -1
  281. package/morphicons/core/normalize.js +57 -57
  282. package/morphicons/core/parse.d.ts +1 -9
  283. package/morphicons/core/resample.js +1 -1
  284. package/morphicons/core/serialize.js +1 -1
  285. package/morphicons/core/spring.js +1 -1
  286. package/morphicons/dom/controller.d.ts +3 -3
  287. package/morphicons/dom/index.js +23 -23
  288. package/morphicons/element/index.d.ts +1 -1
  289. package/morphicons/index.d.ts +1 -1
  290. package/morphicons/index.js +6 -6
  291. package/morphicons/react/index.d.ts +1 -1
  292. package/morphicons/react/index.js +65 -65
  293. package/package.json +1 -1
  294. package/progress/Progress.js +20 -20
  295. package/progress/constants.js +1 -1
  296. package/progress/context.js +1 -1
  297. package/progress/index.js +1 -1
  298. package/progress/style/index.js +1 -1
  299. package/progress/utils.js +1 -1
  300. package/resize-observer/Collection.js +1 -1
  301. package/resize-observer/ResizeObserver.js +13 -12
  302. package/resize-observer/SingleObserver.d.ts +1 -5
  303. package/resize-observer/SingleObserver.js +4 -4
  304. package/resize-observer/constants.d.ts +2 -0
  305. package/resize-observer/constants.js +4 -1
  306. package/resize-observer/context.d.ts +0 -1
  307. package/resize-observer/context.js +3 -3
  308. package/resize-observer/index.d.ts +1 -7
  309. package/resize-observer/index.js +7 -9
  310. package/resize-observer/interface.d.ts +18 -0
  311. package/resize-observer/observerUtil.d.ts +1 -1
  312. package/resize-observer/observerUtil.js +1 -1
  313. package/resize-observer/style/index.js +1 -1
  314. package/resize-observer/utils.js +1 -1
  315. package/space/Space.d.ts +2 -1
  316. package/space/Space.js +12 -11
  317. package/space/SpaceVertical.js +1 -1
  318. package/space/constants.d.ts +2 -0
  319. package/space/constants.js +9 -1
  320. package/space/context.d.ts +0 -1
  321. package/space/context.js +3 -8
  322. package/space/index.d.ts +0 -6
  323. package/space/index.js +8 -10
  324. package/space/interface.d.ts +1 -0
  325. package/space/style/index.js +1 -1
  326. package/space/utils.js +1 -1
  327. package/style/animation.less +2 -8
  328. package/style/normalize.less +0 -13
  329. package/style.css +1 -1
  330. package/suspense-fallback-test/NeverLoadLazy.d.ts +3 -0
  331. package/suspense-fallback-test/NeverLoadLazy.js +8 -0
  332. package/suspense-fallback-test/SuspenseFallbackTest.js +14 -14
  333. package/suspense-fallback-test/constants.d.ts +2 -0
  334. package/suspense-fallback-test/constants.js +4 -1
  335. package/suspense-fallback-test/context.d.ts +0 -2
  336. package/suspense-fallback-test/context.js +3 -3
  337. package/suspense-fallback-test/index.d.ts +0 -6
  338. package/suspense-fallback-test/index.js +5 -9
  339. package/suspense-fallback-test/style/index.js +1 -1
  340. package/suspense-fallback-test/utils.js +1 -1
  341. package/test.js +1 -1
  342. package/timer/Timer.js +6 -5
  343. package/timer/constants.d.ts +2 -0
  344. package/timer/constants.js +4 -1
  345. package/timer/context.d.ts +0 -1
  346. package/timer/context.js +3 -3
  347. package/timer/index.d.ts +0 -6
  348. package/timer/index.js +5 -9
  349. package/timer/style/index.js +1 -1
  350. package/timer/utils.js +1 -1
  351. package/transition/Transition.d.ts +0 -1
  352. package/transition/Transition.js +55 -58
  353. package/transition/TransitionCSS.js +15 -15
  354. package/transition/TransitionGroup.js +13 -13
  355. package/transition/TransitionStyle.js +12 -12
  356. package/transition/constants.d.ts +4 -27
  357. package/transition/constants.js +37 -41
  358. package/transition/context.d.ts +2 -3
  359. package/transition/context.js +4 -5
  360. package/transition/index.d.ts +0 -7
  361. package/transition/index.js +15 -16
  362. package/transition/interface.d.ts +26 -1
  363. package/transition/interface.js +11 -0
  364. package/transition/style/index.js +1 -1
  365. package/transition/utils.d.ts +1 -1
  366. package/transition/utils.js +1 -1
  367. package/utils/callbackOriginRef.js +1 -1
  368. package/utils/confetti.js +1 -1
  369. package/utils/constants.d.ts +3 -2
  370. package/utils/constants.js +6 -5
  371. package/utils/copy.js +1 -1
  372. package/utils/createRoot.d.ts +1 -6
  373. package/utils/createRoot.js +11 -11
  374. package/utils/css.js +1 -1
  375. package/utils/date.d.ts +1 -1
  376. package/utils/date.js +1 -1
  377. package/utils/dayjs.js +1 -1
  378. package/utils/document.js +1 -1
  379. package/utils/dom.d.ts +1 -1
  380. package/utils/dom.js +9 -9
  381. package/utils/file.js +1 -1
  382. package/utils/fillNBSP.js +1 -1
  383. package/utils/getCompatProp.js +1 -1
  384. package/utils/getElement.js +1 -1
  385. package/utils/getHighlightText.js +1 -1
  386. package/utils/getHotkeyHandler.d.ts +1 -12
  387. package/utils/getHotkeyHandler.js +17 -17
  388. package/utils/getPrefixCls.js +1 -1
  389. package/utils/getScrollBarHeight.js +1 -1
  390. package/utils/getScrollBarSize.js +1 -1
  391. package/utils/getScrollBarWidth.js +1 -1
  392. package/utils/getScrollParent.js +1 -1
  393. package/utils/getStringLength.js +1 -1
  394. package/utils/getUrlSearchParam.js +1 -1
  395. package/utils/index.js +274 -273
  396. package/utils/initAllLineClamp.js +1 -1
  397. package/utils/injectLineClamp.js +1 -1
  398. package/utils/interface.d.ts +103 -0
  399. package/utils/interface.js +4 -0
  400. package/utils/intersectionObserver.js +1 -1
  401. package/utils/is.js +1 -1
  402. package/utils/keyboardCode.js +1 -1
  403. package/utils/lodash.d.ts +2 -1
  404. package/utils/lodash.js +19 -18
  405. package/utils/math.d.ts +1 -1
  406. package/utils/mergeProps.d.ts +1 -2
  407. package/utils/mergeProps.js +1 -1
  408. package/utils/mergedToString.js +1 -1
  409. package/utils/migrateLegacyProps.d.ts +1 -8
  410. package/utils/migrateLegacyProps.js +1 -1
  411. package/utils/mutationObserver.js +1 -1
  412. package/utils/names.d.ts +1 -8
  413. package/utils/names.js +1 -1
  414. package/utils/object.js +1 -1
  415. package/utils/omit.js +1 -1
  416. package/utils/pad.js +1 -1
  417. package/utils/pick.js +1 -1
  418. package/utils/react19Adapter.js +1 -1
  419. package/utils/reactNode.js +1 -1
  420. package/utils/ref.d.ts +2 -1
  421. package/utils/ref.js +13 -13
  422. package/utils/resizeObserver.js +1 -1
  423. package/utils/scrollIntoViewIfNeeded.js +1 -1
  424. package/utils/scrollTo.js +1 -1
  425. package/utils/setDarkTheme.js +1 -1
  426. package/utils/setDir.js +1 -1
  427. package/utils/setPrimaryColor.js +1 -1
  428. package/utils/setTheme.js +1 -1
  429. package/utils/string.js +1 -1
  430. package/utils/style.js +1 -1
  431. package/utils/tinycolor.js +1 -1
  432. package/utils/toArray.js +1 -1
  433. package/utils/tunnel.d.ts +2 -12
  434. package/utils/tunnel.js +1 -1
  435. package/utils/warning.js +1 -1
  436. package/version/index.js +9 -9
  437. /package/{suspense-fallback-test → base}/style/index.css +0 -0
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-11-04 17:31:58 星期三 山东省济南市 */
1
+ /* 潘启宝 2026-11-20 17:53:57 星期五 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
3
  // components/common/morphicons/core/interpolate.ts
4
4
  function e(e) {
@@ -1,19 +1,19 @@
1
- /* 潘启宝 2026-11-04 17:31:58 星期三 山东省济南市 */
1
+ /* 潘启宝 2026-11-20 17:53:57 星期五 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
3
  import { parsePath as e } from "./parse.js";
4
4
  import { cubicsToPathD as t } from "./serialize.js";
5
- import { isNumber as n, isString as r, isUndefined as i } from "@unicom-cloud/utils/is";
5
+ import { isNaN as n, isNumber as r, isString as i, isUndefined as a } from "@unicom-cloud/utils/is";
6
6
  // components/common/morphicons/core/normalize.ts
7
- var a = 4 / 3 * Math.tan(Math.PI / 8), o = 2 * Math.PI;
8
- function s(e, t) {
7
+ var o = 4 / 3 * Math.tan(Math.PI / 8), s = 2 * Math.PI;
8
+ function c(e, t) {
9
9
  let n = [e, t], r = e, i = t, a = (e, t, a, o, s, c) => {
10
10
  n.push(e, t, a, o, s, c), r = s, i = c;
11
- }, s = (e, t) => {
11
+ }, o = (e, t) => {
12
12
  Math.abs(e - r) < 1e-12 && Math.abs(t - i) < 1e-12 || a(r + (e - r) / 3, i + (t - i) / 3, r + 2 * (e - r) / 3, i + 2 * (t - i) / 3, e, t);
13
13
  };
14
14
  return [
15
15
  a,
16
- s,
16
+ o,
17
17
  (e, t, n, o) => {
18
18
  a(r + 2 / 3 * (e - r), i + 2 / 3 * (t - i), n + 2 / 3 * (e - n), o + 2 / 3 * (t - o), n, o);
19
19
  },
@@ -22,7 +22,7 @@ function s(e, t) {
22
22
  if (Math.abs(u - f) < 1e-12 && Math.abs(d - p) < 1e-12) return;
23
23
  let m = Math.abs(e), h = Math.abs(t);
24
24
  if (m < 1e-12 || h < 1e-12) {
25
- s(u, d);
25
+ o(u, d);
26
26
  return;
27
27
  }
28
28
  let g = n * Math.PI / 180, _ = Math.cos(g), v = Math.sin(g), y = (f - u) / 2, b = (p - d) / 2, x = _ * y + v * b, S = -v * y + _ * b, C = x * x / (m * m) + S * S / (h * h);
@@ -33,21 +33,21 @@ function s(e, t) {
33
33
  let w = m * m, T = h * h, E = x * x, D = S * S, O = (w * T - w * D - T * E) / (w * D + T * E);
34
34
  O < 0 && (O = 0);
35
35
  let k = (c === l ? -1 : 1) * Math.sqrt(O), A = k * m * S / h, j = -k * h * x / m, M = _ * A - v * j + (f + u) / 2, N = v * A + _ * j + (p + d) / 2, P = Math.atan2((S - j) / h, (x - A) / m), F = Math.atan2((-S - j) / h, (-x - A) / m) - P;
36
- l === 0 && F > 0 ? F -= o : l === 1 && F < 0 && (F += o);
36
+ l === 0 && F > 0 ? F -= s : l === 1 && F < 0 && (F += s);
37
37
  let I = Math.max(1, Math.ceil(Math.abs(F) / (Math.PI / 2) - 1e-9)), L = F / I, R = 4 / 3 * Math.tan(L / 4), z = (e) => M + m * Math.cos(e) * _ - h * Math.sin(e) * v, B = (e) => N + m * Math.cos(e) * v + h * Math.sin(e) * _, V = (e) => -m * Math.sin(e) * _ - h * Math.cos(e) * v, H = (e) => -m * Math.sin(e) * v + h * Math.cos(e) * _, U = P, W = f, G = p;
38
38
  for (let e = 1; e <= I; e++) {
39
39
  let t = P + L * e, n = e === I ? u : z(t), r = e === I ? d : B(t);
40
40
  a(W + R * V(U), G + R * H(U), n - R * V(t), r - R * H(t), n, r), U = t, W = n, G = r;
41
41
  }
42
42
  },
43
- (e) => (e && s(n[0], n[1]), n.length < 8 ? null : {
43
+ (e) => (e && o(n[0], n[1]), n.length < 8 ? null : {
44
44
  pts: Float64Array.from(n),
45
45
  closed: e
46
46
  })
47
47
  ];
48
48
  }
49
- function c(e) {
50
- let [t, n, r, i, a] = s(e.x0, e.y0);
49
+ function l(e) {
50
+ let [t, n, r, i, a] = c(e.x0, e.y0);
51
51
  for (let a of e.segs) switch (a[0]) {
52
52
  case "L":
53
53
  n(a[1], a[2]);
@@ -62,105 +62,105 @@ function c(e) {
62
62
  }
63
63
  return a(e.closed);
64
64
  }
65
- function l(e, t, r = 0) {
66
- let a = e[t];
67
- if (i(a)) return r;
68
- let o = n(a) ? a : Number(a);
69
- return Number.isFinite(o) ? o : r;
65
+ function u(e, t, n = 0) {
66
+ let i = e[t];
67
+ if (a(i)) return n;
68
+ let o = r(i) ? i : Number(i);
69
+ return Number.isFinite(o) ? o : n;
70
70
  }
71
- function u(e) {
71
+ function d(e) {
72
72
  let t = String(e ?? "").trim();
73
73
  if (!t) return [];
74
74
  let n = t.split(/[\s,]+/).map(Number);
75
75
  if (n.some((e) => !Number.isFinite(e))) throw Error(`morphicons: invalid points: "${t}"`);
76
76
  return n;
77
77
  }
78
- function d(e, t) {
78
+ function f(e, t) {
79
79
  if (e.length < 4) return null;
80
- let [, n, , , r] = s(e[0], e[1]);
80
+ let [, n, , , r] = c(e[0], e[1]);
81
81
  for (let t = 2; t + 1 < e.length; t += 2) n(e[t], e[t + 1]);
82
82
  return r(t);
83
83
  }
84
- function f(e, t, n, r) {
84
+ function p(e, t, n, r) {
85
85
  if (n < 1e-12 || r < 1e-12) return null;
86
- let i = a * n, o = a * r, c = e + n, l = e - n, u = t + r, d = t - r, [f, , , , p] = s(c, t);
87
- return f(c, t + o, e + i, u, e, u), f(e - i, u, l, t + o, l, t), f(l, t - o, e - i, d, e, d), f(e + i, d, c, t - o, c, t), p(!0);
86
+ let i = o * n, a = o * r, s = e + n, l = e - n, u = t + r, d = t - r, [f, , , , p] = c(s, t);
87
+ return f(s, t + a, e + i, u, e, u), f(e - i, u, l, t + a, l, t), f(l, t - a, e - i, d, e, d), f(e + i, d, s, t - a, s, t), p(!0);
88
88
  }
89
- function p(e) {
90
- let t = l(e, "x"), n = l(e, "y"), r = l(e, "width"), i = l(e, "height");
91
- if (r < 1e-12 || i < 1e-12) return null;
92
- let o = l(e, "rx", NaN), c = l(e, "ry", NaN);
93
- if (Number.isNaN(o) && (o = Number.isNaN(c) ? 0 : c), Number.isNaN(c) && (c = o), o = Math.min(Math.max(o, 0), r / 2), c = Math.min(Math.max(c, 0), i / 2), o < 1e-12 || c < 1e-12) return d([
89
+ function m(e) {
90
+ let t = u(e, "x"), r = u(e, "y"), i = u(e, "width"), a = u(e, "height");
91
+ if (i < 1e-12 || a < 1e-12) return null;
92
+ let s = u(e, "rx", NaN), l = u(e, "ry", NaN);
93
+ if (n(s) && (s = n(l) ? 0 : l), n(l) && (l = s), s = Math.min(Math.max(s, 0), i / 2), l = Math.min(Math.max(l, 0), a / 2), s < 1e-12 || l < 1e-12) return f([
94
94
  t,
95
- n,
96
- t + r,
97
- n,
98
- t + r,
99
- n + i,
95
+ r,
96
+ t + i,
97
+ r,
98
+ t + i,
99
+ r + a,
100
100
  t,
101
- n + i
101
+ r + a
102
102
  ], !0);
103
- let u = t + o, f = t + r - o, p = t + r, m = n + c, h = n + i - c, g = n + i, _ = a * o, v = a * c, [y, b, , , x] = s(u, n);
104
- return b(f, n), y(f + _, n, p, m - v, p, m), b(p, h), y(p, h + v, f + _, g, f, g), b(u, g), y(u - _, g, t, h + v, t, h), b(t, m), y(t, m - v, u - _, n, u, n), x(!0);
103
+ let d = t + s, p = t + i - s, m = t + i, h = r + l, g = r + a - l, _ = r + a, v = o * s, y = o * l, [b, x, , , S] = c(d, r);
104
+ return x(p, r), b(p + v, r, m, h - y, m, h), x(m, g), b(m, g + y, p + v, _, p, _), x(d, _), b(d - v, _, t, g + y, t, g), x(t, h), b(t, h - y, d - v, r, d, r), S(!0);
105
105
  }
106
- function m(t) {
107
- let n = [], i = (e) => {
106
+ function h(t) {
107
+ let n = [], r = (e) => {
108
108
  e && n.push(e);
109
109
  };
110
- if (r(t)) {
111
- for (let n of e(t)) i(c(n));
110
+ if (i(t)) {
111
+ for (let n of e(t)) r(l(n));
112
112
  return n;
113
113
  }
114
- for (let [n, r] of t) switch (n) {
114
+ for (let [n, i] of t) switch (n) {
115
115
  case "path":
116
- for (let t of e(String(r.d ?? ""))) i(c(t));
116
+ for (let t of e(String(i.d ?? ""))) r(l(t));
117
117
  break;
118
118
  case "line": {
119
- let [, e, , , t] = s(l(r, "x1"), l(r, "y1"));
120
- e(l(r, "x2"), l(r, "y2")), i(t(!1));
119
+ let [, e, , , t] = c(u(i, "x1"), u(i, "y1"));
120
+ e(u(i, "x2"), u(i, "y2")), r(t(!1));
121
121
  break;
122
122
  }
123
123
  case "circle": {
124
- let e = l(r, "r");
125
- i(f(l(r, "cx"), l(r, "cy"), e, e));
124
+ let e = u(i, "r");
125
+ r(p(u(i, "cx"), u(i, "cy"), e, e));
126
126
  break;
127
127
  }
128
128
  case "ellipse":
129
- i(f(l(r, "cx"), l(r, "cy"), l(r, "rx"), l(r, "ry")));
129
+ r(p(u(i, "cx"), u(i, "cy"), u(i, "rx"), u(i, "ry")));
130
130
  break;
131
131
  case "rect":
132
- i(p(r));
132
+ r(m(i));
133
133
  break;
134
134
  case "polyline":
135
- i(d(u(r.points), !1));
135
+ r(f(d(i.points), !1));
136
136
  break;
137
137
  case "polygon":
138
- i(d(u(r.points), !0));
138
+ r(f(d(i.points), !0));
139
139
  break;
140
140
  default: throw Error(`morphicons: unsupported tag <${n}>`);
141
141
  }
142
142
  return n;
143
143
  }
144
- function h(e) {
145
- let t = n(e) ? [
144
+ function g(e) {
145
+ let t = r(e) ? [
146
146
  0,
147
147
  0,
148
148
  e,
149
149
  e
150
- ] : r(e) ? e.trim().split(/[\s,]+/).map(Number) : e, [i, a, o, s] = t;
151
- if (t.length !== 4 || !(o > 0) || !(s > 0) || !Number.isFinite(i) || !Number.isFinite(a)) throw Error(`morphicons: invalid viewBox "${String(e)}"`);
150
+ ] : i(e) ? e.trim().split(/[\s,]+/).map(Number) : e, [n, a, o, s] = t;
151
+ if (t.length !== 4 || !(o > 0) || !(s > 0) || !Number.isFinite(n) || !Number.isFinite(a)) throw Error(`morphicons: invalid viewBox "${String(e)}"`);
152
152
  return [
153
- i,
153
+ n,
154
154
  a,
155
155
  o,
156
156
  s
157
157
  ];
158
158
  }
159
- function g(e, n, r = 24) {
160
- let [i, a, o, s] = h(n), c = Math.min(r / o, r / s), l = (r - o * c) / 2 - i * c, u = (r - s * c) / 2 - a * c, d = m(e);
159
+ function _(e, n, r = 24) {
160
+ let [i, a, o, s] = g(n), c = Math.min(r / o, r / s), l = (r - o * c) / 2 - i * c, u = (r - s * c) / 2 - a * c, d = h(e);
161
161
  for (let { pts: e } of d) for (let t = 0; t < e.length; t += 2) e[t] = e[t] * c + l, e[t + 1] = e[t + 1] * c + u;
162
162
  return t(d);
163
163
  }
164
- export { a as KAPPA, g as fitIcon, m as iconToCubics };
164
+ export { o as KAPPA, _ as fitIcon, h as iconToCubics };
165
165
  /* 欲穷千里目,更上一层楼 */
166
166
  /* 独立思考,明辨是非 */
@@ -1,14 +1,6 @@
1
1
  /** Raw absolute segment (shorthands already resolved), as a labeled tuple —
2
2
  * compact in the bundle (no object keys the minifier can't mangle). */
3
- export type RawSeg = readonly ['L', x: number, y: number] | readonly [
4
- 'C',
5
- x1: number,
6
- y1: number,
7
- x2: number,
8
- y2: number,
9
- x: number,
10
- y: number
11
- ] | readonly ['Q', x1: number, y1: number, x: number, y: number] | readonly [
3
+ export type RawSeg = readonly ['L', x: number, y: number] | readonly ['C', x1: number, y1: number, x2: number, y2: number, x: number, y: number] | readonly ['Q', x1: number, y1: number, x: number, y: number] | readonly [
12
4
  'A',
13
5
  rx: number,
14
6
  ry: number,
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-11-04 17:31:58 星期三 山东省济南市 */
1
+ /* 潘启宝 2026-11-20 17:53:57 星期五 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
3
  import { iconToCubics as e } from "./normalize.js";
4
4
  // components/common/morphicons/core/resample.ts
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-11-04 17:31:58 星期三 山东省济南市 */
1
+ /* 潘启宝 2026-11-20 17:53:57 星期五 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
3
  // components/common/morphicons/core/serialize.ts
4
4
  function e(e) {
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-11-04 17:31:58 星期三 山东省济南市 */
1
+ /* 潘启宝 2026-11-20 17:53:57 星期五 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
3
  // components/common/morphicons/core/spring.ts
4
4
  var e = class {
@@ -24,7 +24,7 @@ export interface MorphWatchProps extends MorphCtrlProps {
24
24
  * mount-time props (server and client produce the same string → hydration
25
25
  * without mismatch) and from then on only the driver mutates it outside the
26
26
  * template. */
27
- export declare function computeInitialD({ icon, from, to, progress, }: MorphModeProps): string;
27
+ export declare function computeInitialD({ icon, from, to, progress }: MorphModeProps): string;
28
28
  /** Per-instance driver state — the exact logic of the React/Vue bindings
29
29
  * (mount, mode watch, controlled seek with re-basing, imperative). Takes the
30
30
  * init-time props: they seed the watch baselines so a watcher that fires on
@@ -41,13 +41,13 @@ export declare function computeInitialD({ icon, from, to, progress, }: MorphMode
41
41
  * path back to `icon`.
42
42
  * - Every exit from controlled mode (imperative call or icon takeover)
43
43
  * invalidates the frozen pair, so returning to it re-bases on `from`. */
44
- export declare function createController({ icon, from, to, progress, reducedMotion, }: MorphCtrlProps): {
44
+ export declare function createController({ icon, from, to, progress, reducedMotion }: MorphCtrlProps): {
45
45
  mount(mountEl: PathEl, { icon, from, to, progress, reducedMotion }: MorphCtrlProps): void;
46
46
  destroy(): void;
47
47
  /** Prop watcher: ONE owner decides per run — the controlled pair while it
48
48
  * is fully present, `icon` otherwise (mount doesn't fire thanks to the
49
49
  * init-time baselines). */
50
- watch({ icon, from, to, progress, spring, reducedMotion, }: MorphWatchProps): void;
50
+ watch({ icon, from, to, progress, spring, reducedMotion }: MorphWatchProps): void;
51
51
  morphTo(icon: IconInput, spring?: SpringPreset | MorphOptions): void;
52
52
  set(icon: IconInput): void;
53
53
  };
@@ -1,12 +1,12 @@
1
- /* 潘启宝 2026-11-04 17:31:58 星期三 山东省济南市 */
1
+ /* 潘启宝 2026-11-20 17:53:57 星期五 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
3
  import { allocOutputs as e, interpPolar as t } from "../core/interpolate.js";
4
- import { cubicsToPathD as n, serialize as r } from "../core/serialize.js";
5
- import { iconToCubics as i } from "../core/normalize.js";
6
- import { buildPlan as a } from "../core/plan.js";
7
- import { resampleIcon as o } from "../core/resample.js";
4
+ import { iconToCubics as n } from "../core/normalize.js";
5
+ import { buildPlan as r } from "../core/plan.js";
6
+ import { resampleIcon as i } from "../core/resample.js";
7
+ import { cubicsToPathD as a, serialize as o } from "../core/serialize.js";
8
8
  import { SPRING_PRESETS as s, Spring as c } from "../core/spring.js";
9
- import { isString as l, isUndefined as u } from "@unicom-cloud/utils/is";
9
+ import { isGlobalUndefined as l, isString as u } from "@unicom-cloud/utils/is";
10
10
  // components/common/morphicons/dom/index.ts
11
11
  var d = /* @__PURE__ */ new Set(), f = 0, p = -1;
12
12
  function m(e) {
@@ -23,36 +23,36 @@ function g(e) {
23
23
  }
24
24
  var _ = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap();
25
25
  function b(e) {
26
- if (l(e)) return o(e);
26
+ if (u(e)) return i(e);
27
27
  let t = _.get(e);
28
- return t || (t = o(e), _.set(e, t)), t;
28
+ return t || (t = i(e), _.set(e, t)), t;
29
29
  }
30
30
  function x(e) {
31
- if (l(e)) return e;
31
+ if (u(e)) return e;
32
32
  let t = v.get(e);
33
- return t || (t = n(i(e)), v.set(e, t)), t;
33
+ return t || (t = a(n(e)), v.set(e, t)), t;
34
34
  }
35
35
  function S(e, t) {
36
- if (l(e) || l(t)) return a(b(e), b(t));
36
+ if (u(e) || u(t)) return r(b(e), b(t));
37
37
  let n = y.get(e);
38
38
  n || (n = /* @__PURE__ */ new WeakMap(), y.set(e, n));
39
- let r = n.get(t);
40
- return r || (r = a(b(e), b(t)), n.set(t, r)), r;
39
+ let i = n.get(t);
40
+ return i || (i = r(b(e), b(t)), n.set(t, i)), i;
41
41
  }
42
42
  function C(e) {
43
- if (l(e)) return s[e];
43
+ if (u(e)) return s[e];
44
44
  let t = s.snappy;
45
45
  return {
46
46
  k: e?.stiffness ?? t.k,
47
47
  c: e?.damping ?? t.c
48
48
  };
49
49
  }
50
- function w(n, i, o) {
51
- let s = new c(), l = o?.reducedMotion ?? "never", d = i, f = !0, p = null, m = null, _ = null, v = 1, y = !1, w = !1;
50
+ function w(n, i, a) {
51
+ let s = new c(), u = a?.reducedMotion ?? "never", d = i, f = !0, p = null, m = null, _ = null, v = 1, y = !1, w = !1;
52
52
  n.setAttribute("d", x(i));
53
53
  let T = (e) => {
54
- let i = p, a = m, o = _;
55
- i && a && o && (v = e, t(i, e, a), n.setAttribute("d", r(a, o)));
54
+ let r = p, i = m, a = _;
55
+ r && i && a && (v = e, t(r, e, i), n.setAttribute("d", o(i, a)));
56
56
  }, E = () => {
57
57
  y && (y = !1, g(D));
58
58
  }, D = (e) => {
@@ -67,11 +67,11 @@ function w(n, i, o) {
67
67
  closed: e.items[n].closed
68
68
  }));
69
69
  }, A = (t) => {
70
- p = f ? S(d, t) : a(k(), b(t)), m = e(p), _ = p.items.map((e) => e.closed), d = t, f = !1;
70
+ p = f ? S(d, t) : r(k(), b(t)), m = e(p), _ = p.items.map((e) => e.closed), d = t, f = !1;
71
71
  }, j = (e) => {
72
72
  E(), d = e, O();
73
- }, M = () => l === "always" ? !0 : l !== "user" || u(matchMedia) ? !1 : matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? !1, N = (e, t) => {
74
- if (w) return;
73
+ }, M = () => u === "always" ? !0 : u !== "user" || l("matchMedia") ? !1 : matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? !1, N = (e, t) => {
74
+ if (!w) return;
75
75
  let n = !f && p !== null && e === d;
76
76
  E(), s.v = 0, n || A(e), T(t);
77
77
  };
@@ -96,10 +96,10 @@ function w(n, i, o) {
96
96
  w || N(d, e);
97
97
  },
98
98
  get reducedMotion() {
99
- return l;
99
+ return u;
100
100
  },
101
101
  set reducedMotion(e) {
102
- l = e;
102
+ u = e;
103
103
  },
104
104
  destroy() {
105
105
  E(), w = !0, p = null, m = null, _ = null;
@@ -35,5 +35,5 @@ declare global {
35
35
  export type { IconInput, IconNode, Sampled } from '../core/types';
36
36
  export { computeInitialD } from '../dom/controller';
37
37
  export type { MorphHandle } from '../dom/controller';
38
- export type { Morph, MorphOptions, PathEl, ReducedMotionMode, } from '../dom/index';
38
+ export type { Morph, MorphOptions, PathEl, ReducedMotionMode } from '../dom/index';
39
39
  export type { SpringPreset };
@@ -4,5 +4,5 @@ export { buildPlan, type MorphPlan, type PlanItem } from './core/plan';
4
4
  export { resampleIcon, resamplePath } from './core/resample';
5
5
  export { cubicsToPathD, serialize } from './core/serialize';
6
6
  export { Spring, SPRING_PRESETS, type SpringPreset } from './core/spring';
7
- export type { CubicPath, IconInput, IconNode, IconNodeAttrs, Sampled, } from './core/types';
7
+ export type { CubicPath, IconInput, IconNode, IconNodeAttrs, Sampled } from './core/types';
8
8
  export { MorphIcon } from './react';
@@ -1,12 +1,12 @@
1
- /* 潘启宝 2026-11-04 17:31:58 星期三 山东省济南市 */
1
+ /* 潘启宝 2026-11-20 17:53:57 星期五 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
3
  import { allocOutputs as e, interpLinear as t, interpPolar as n } from "./core/interpolate.js";
4
- import { cubicsToPathD as r, serialize as i } from "./core/serialize.js";
5
- import { fitIcon as a, iconToCubics as o } from "./core/normalize.js";
6
- import { buildPlan as s } from "./core/plan.js";
7
- import { resampleIcon as c, resamplePath as l } from "./core/resample.js";
4
+ import { fitIcon as r, iconToCubics as i } from "./core/normalize.js";
5
+ import { buildPlan as a } from "./core/plan.js";
6
+ import { resampleIcon as o, resamplePath as s } from "./core/resample.js";
7
+ import { cubicsToPathD as c, serialize as l } from "./core/serialize.js";
8
8
  import { SPRING_PRESETS as u, Spring as d } from "./core/spring.js";
9
9
  import { MorphIcon as f } from "./react/index.js";
10
- export { f as MorphIcon, u as SPRING_PRESETS, d as Spring, e as allocOutputs, s as buildPlan, r as cubicsToPathD, a as fitIcon, o as iconToCubics, t as interpLinear, n as interpPolar, c as resampleIcon, l as resamplePath, i as serialize };
10
+ export { f as MorphIcon, u as SPRING_PRESETS, d as Spring, e as allocOutputs, a as buildPlan, c as cubicsToPathD, r as fitIcon, i as iconToCubics, t as interpLinear, n as interpPolar, o as resampleIcon, s as resamplePath, l as serialize };
11
11
  /* 欲穷千里目,更上一层楼 */
12
12
  /* 独立思考,明辨是非 */
@@ -32,5 +32,5 @@ export interface MorphIconProps extends Omit<SVGProps<SVGSVGElement>, 'from' | '
32
32
  }
33
33
  export declare const MorphIcon: import("react").ForwardRefExoticComponent<MorphIconProps & import("react").RefAttributes<MorphHandle>>;
34
34
  export type { IconInput, IconNode, Sampled } from '../core/types';
35
- export type { Morph, MorphOptions, PathEl, ReducedMotionMode, } from '../dom/index';
35
+ export type { Morph, MorphOptions, PathEl, ReducedMotionMode } from '../dom/index';
36
36
  export type { SpringPreset };
@@ -1,104 +1,104 @@
1
- /* 潘启宝 2026-11-04 17:31:58 星期三 山东省济南市 */
1
+ /* 潘启宝 2026-11-20 17:53:57 星期五 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
3
  import { allocOutputs as e, interpPolar as t } from "../core/interpolate.js";
4
- import { serialize as n } from "../core/serialize.js";
5
- import { buildPlan as r } from "../core/plan.js";
6
- import { resampleIcon as i } from "../core/resample.js";
4
+ import { buildPlan as n } from "../core/plan.js";
5
+ import { resampleIcon as r } from "../core/resample.js";
6
+ import { serialize as i } from "../core/serialize.js";
7
7
  import { canonicalD as a, createMorph as o } from "../dom/index.js";
8
8
  import { forwardRef as s, useCallback as c, useEffect as l, useImperativeHandle as u, useLayoutEffect as d, useRef as f, useState as p } from "react";
9
- import { isUndefined as m } from "@unicom-cloud/utils/is";
10
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
9
+ import { isDefined as m, isGlobalUndefined as h, isUndefined as g } from "@unicom-cloud/utils/is";
10
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
11
11
  // components/common/morphicons/react/index.tsx
12
- var _ = m(document) ? l : d;
13
- function v(o, s, c) {
12
+ var y = h("document") ? l : d;
13
+ function b(o, s, c) {
14
14
  if (c <= 0) return a(o);
15
15
  if (c >= 1) return a(s);
16
- let l = r(i(o), i(s)), u = e(l);
17
- return t(l, c, u), n(u, l.items.map((e) => e.closed));
16
+ let l = n(r(o), r(s)), u = e(l);
17
+ return t(l, c, u), i(u, l.items.map((e) => e.closed));
18
18
  }
19
- var y = s(function(e, t) {
20
- let { icon: n, from: r, to: i, progress: s, spring: d, reducedMotion: m, size: y = 24, color: b = "currentColor", strokeWidth: x = 2, absoluteStrokeWidth: S, label: C, ...w } = e, T = r !== void 0 && i !== void 0, E = n ?? r ?? i, [D] = p(() => T ? v(r, i, s ?? 0) : E === void 0 ? "" : a(E)), O = f(null), k = f(null), A = f(d);
21
- A.current = d;
22
- let j = f(m);
23
- j.current = m;
24
- let M = f(n), N = f(T), P = f(!1), F = f(!1), I = f(null), L = c((e) => {
25
- if (k.current) return k.current;
26
- let t = O.current;
27
- return P.current || !t ? null : (k.current = o(t, e, { reducedMotion: j.current }), k.current);
19
+ var x = s(function(e, t) {
20
+ let { icon: n, from: r, to: i, progress: s, spring: d, reducedMotion: h, size: x = 24, color: S = "currentColor", strokeWidth: C = 2, absoluteStrokeWidth: w, label: T, ...E } = e, D = m(r) && m(i), O = n ?? r ?? i, [k] = p(() => D ? b(r, i, s ?? 0) : g(O) ? "" : a(O)), A = f(null), j = f(null), M = f(d);
21
+ M.current = d;
22
+ let N = f(h);
23
+ N.current = h;
24
+ let P = f(n), F = f(D), I = f(!1), L = f(!1), R = f(null), z = c((e) => {
25
+ if (j.current) return j.current;
26
+ let t = A.current;
27
+ return I.current || !t ? null : (j.current = o(t, e, { reducedMotion: N.current }), j.current);
28
28
  }, []);
29
- _(() => {
30
- P.current = !1;
31
- let e = O.current;
32
- if (e && E !== void 0) {
33
- let t = o(e, T ? r : E, { reducedMotion: j.current });
34
- if (k.current = t, T) {
35
- I.current = [r, i];
29
+ y(() => {
30
+ I.current = !1;
31
+ let e = A.current;
32
+ if (e && m(O)) {
33
+ let t = o(e, D ? r : O, { reducedMotion: N.current });
34
+ if (j.current = t, D) {
35
+ R.current = [r, i];
36
36
  let e = s ?? 0;
37
- e <= 0 ? t.set(r) : e >= 1 ? t.set(i) : (t.seek(i, e), F.current = !0);
37
+ e <= 0 ? t.set(r) : e >= 1 ? t.set(i) : (t.seek(i, e), L.current = !0);
38
38
  }
39
39
  }
40
40
  return () => {
41
- P.current = !0, k.current?.destroy(), k.current = null, F.current = !1, I.current = null;
41
+ I.current = !0, j.current?.destroy(), j.current = null, L.current = !1, R.current = null;
42
42
  };
43
43
  }, []), l(() => {
44
- let e = k.current;
45
- e && (e.reducedMotion = m ?? "never");
46
- }, [m]), l(() => {
47
- let e = N.current && !T;
48
- N.current = T;
49
- let t = n !== M.current;
50
- if (M.current = n, T || n === void 0 || !t && !e) return;
51
- I.current = null, F.current = !1;
52
- let r = k.current;
53
- r ? r.morphTo(n, A.current) : L(n);
44
+ let e = j.current;
45
+ e && (e.reducedMotion = h ?? "never");
46
+ }, [h]), l(() => {
47
+ let e = F.current && !D;
48
+ F.current = D;
49
+ let t = n !== P.current;
50
+ if (P.current = n, D || g(n) || !t && !e) return;
51
+ R.current = null, L.current = !1;
52
+ let r = j.current;
53
+ r ? r.morphTo(n, M.current) : z(n);
54
54
  }, [
55
55
  n,
56
- T,
57
- L
56
+ D,
57
+ z
58
58
  ]), l(() => {
59
- if (!T) return;
60
- let e = k.current ?? L(r);
59
+ if (!D) return;
60
+ let e = j.current ?? z(r);
61
61
  if (!e) return;
62
62
  let t = s ?? 0;
63
- I.current && I.current[0] === r && I.current[1] === i || (I.current = [r, i], F.current = !1), t <= 0 ? (e.set(r), F.current = !1) : t >= 1 ? (e.set(i), F.current = !1) : (F.current ||= (e.set(r), !0), e.seek(i, t));
63
+ R.current && R.current[0] === r && R.current[1] === i || (R.current = [r, i], L.current = !1), t <= 0 ? (e.set(r), L.current = !1) : t >= 1 ? (e.set(i), L.current = !1) : (L.current ||= (e.set(r), !0), e.seek(i, t));
64
64
  }, [
65
- T,
65
+ D,
66
66
  r,
67
67
  i,
68
68
  s,
69
- L
69
+ z
70
70
  ]), u(t, () => ({
71
71
  morphTo: (e, t) => {
72
- I.current = null, F.current = !1;
73
- let n = k.current;
74
- n ? n.morphTo(e, t ?? A.current) : L(e);
72
+ R.current = null, L.current = !1;
73
+ let n = j.current;
74
+ n ? n.morphTo(e, t ?? M.current) : z(e);
75
75
  },
76
76
  set: (e) => {
77
- I.current = null, F.current = !1;
78
- let t = k.current;
79
- t ? t.set(e) : L(e);
77
+ R.current = null, L.current = !1;
78
+ let t = j.current;
79
+ t ? t.set(e) : z(e);
80
80
  }
81
- }), [L]);
82
- let R = S ? Number(x) * 24 / Number(y) : x;
83
- return /* @__PURE__ */ g("svg", {
81
+ }), [z]);
82
+ let B = w ? Number(C) * 24 / Number(x) : C;
83
+ return /* @__PURE__ */ v("svg", {
84
84
  xmlns: "http://www.w3.org/2000/svg",
85
- width: y,
86
- height: y,
85
+ width: x,
86
+ height: x,
87
87
  viewBox: "0 0 24 24",
88
88
  fill: "none",
89
- stroke: b,
90
- strokeWidth: R,
89
+ stroke: S,
90
+ strokeWidth: B,
91
91
  strokeLinecap: "round",
92
92
  strokeLinejoin: "round",
93
- role: C ? "img" : void 0,
94
- "aria-hidden": !C || void 0,
95
- ...w,
96
- children: [C ? /* @__PURE__ */ h("title", { children: C }) : null, /* @__PURE__ */ h("path", {
97
- ref: O,
98
- d: D
93
+ role: T ? "img" : void 0,
94
+ "aria-hidden": !T || void 0,
95
+ ...E,
96
+ children: [T ? /* @__PURE__ */ _("title", { children: T }) : null, /* @__PURE__ */ _("path", {
97
+ ref: A,
98
+ d: k
99
99
  })]
100
100
  });
101
101
  });
102
- export { y as MorphIcon };
102
+ export { x as MorphIcon };
103
103
  /* 欲穷千里目,更上一层楼 */
104
104
  /* 独立思考,明辨是非 */
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@unicom-cloud/ui-common","version":"0.1.58","dependencies":{"@unicom-cloud/utils":"^0.1.0","@unicom-cloud/icons":"^0.1.0","react-compiler-runtime":"^1.0.0"},"peerDependencies":{"dayjs":"^1.11.23","lodash":"^4.18.1","react":"^18.3.1","react-dom":"^18.3.1","react-is":"^18.3.1"},"type":"module","types":"./index.d.ts","main":"./index.js","bin":{"ui":"./test.js"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}
1
+ {"name":"@unicom-cloud/ui-common","version":"0.1.60","dependencies":{"@unicom-cloud/utils":"^0.1.0","@unicom-cloud/icons":"^0.1.0","react-compiler-runtime":"^1.0.0"},"peerDependencies":{"dayjs":"^1.11.23","lodash":"^4.18.1","react":"^18.3.1","react-dom":"^18.3.1","react-is":"^18.3.1"},"type":"module","types":"./index.d.ts","main":"./index.js","bin":{"ui":"./test.js"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}