@unicom-cloud/ui-common 0.1.57 → 0.1.59

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 (435) 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 +13 -12
  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.js +1 -1
  191. package/hooks/use-request/src/plugins/useAutoRunPlugin.js +1 -1
  192. package/hooks/use-request/src/plugins/useCachePlugin.js +5 -5
  193. package/hooks/use-request/src/plugins/useDebouncePlugin.js +2 -2
  194. package/hooks/use-request/src/plugins/useLoadingDelayPlugin.js +13 -12
  195. package/hooks/use-request/src/plugins/usePollingPlugin.js +3 -3
  196. package/hooks/use-request/src/plugins/useRefreshOnWindowFocusPlugin.js +1 -1
  197. package/hooks/use-request/src/plugins/useRetryPlugin.js +1 -1
  198. package/hooks/use-request/src/plugins/useThrottlePlugin.js +1 -1
  199. package/hooks/use-request/src/useRequest.d.ts +11 -4
  200. package/hooks/use-request/src/useRequest.js +1 -1
  201. package/hooks/use-request/src/useRequestImplement.js +18 -18
  202. package/hooks/use-request/src/utils/cache.js +1 -1
  203. package/hooks/use-request/src/utils/cachePromise.js +1 -1
  204. package/hooks/use-request/src/utils/cacheSubscribe.js +1 -1
  205. package/hooks/use-request/src/utils/isDocumentVisible.js +1 -1
  206. package/hooks/use-request/src/utils/isOnline.js +3 -3
  207. package/hooks/use-request/src/utils/limit.js +1 -1
  208. package/hooks/use-request/src/utils/subscribeFocus.js +1 -1
  209. package/hooks/use-request/src/utils/subscribeReVisible.js +1 -1
  210. package/hooks/use-reset-state/index.js +6 -6
  211. package/hooks/use-resize-observer/index.d.ts +6 -1
  212. package/hooks/use-resize-observer/index.js +30 -4
  213. package/hooks/use-resize-observers/index.d.ts +1 -0
  214. package/hooks/use-resize-observers/index.js +23 -24
  215. package/hooks/use-responsive/index.js +2 -2
  216. package/hooks/use-safe-state/index.js +1 -1
  217. package/hooks/use-scroll/index.js +20 -20
  218. package/hooks/use-selections/index.d.ts +1 -1
  219. package/hooks/use-selections/index.js +45 -39
  220. package/hooks/use-session-storage-state/index.js +4 -4
  221. package/hooks/use-set/index.js +1 -1
  222. package/hooks/use-set-state/index.js +1 -1
  223. package/hooks/use-size/index.d.ts +1 -6
  224. package/hooks/use-size/index.js +4 -33
  225. package/hooks/use-state-callback/index.d.ts +1 -5
  226. package/hooks/use-state-callback/index.js +7 -7
  227. package/hooks/use-state-with-promise/index.d.ts +1 -4
  228. package/hooks/use-state-with-promise/index.js +1 -1
  229. package/hooks/use-sync-state/index.js +5 -5
  230. package/hooks/use-text-selection/index.js +1 -1
  231. package/hooks/use-theme/index.js +14 -14
  232. package/hooks/use-throttle/index.js +1 -1
  233. package/hooks/use-throttle/interface.d.ts +13 -0
  234. package/hooks/use-throttle/throttleOptions.d.ts +1 -5
  235. package/hooks/use-throttle-effect/index.js +5 -5
  236. package/hooks/use-throttle-fn/index.js +5 -5
  237. package/hooks/use-throttle-fn-with-raf/index.js +6 -6
  238. package/hooks/use-timeout/index.js +1 -1
  239. package/hooks/use-title/index.js +5 -5
  240. package/hooks/use-toggle/index.d.ts +6 -3
  241. package/hooks/use-toggle/index.js +1 -1
  242. package/hooks/use-tracked-effect/index.js +1 -1
  243. package/hooks/use-unmount/index.js +1 -1
  244. package/hooks/use-unmounted-ref/index.js +1 -1
  245. package/hooks/use-update/index.js +1 -1
  246. package/hooks/use-update-effect/index.js +1 -1
  247. package/hooks/use-update-layout-effect/index.js +1 -1
  248. package/hooks/use-url-state/index.d.ts +1 -1
  249. package/hooks/use-url-state/index.js +1 -1
  250. package/hooks/use-virtual-list/index.js +13 -13
  251. package/hooks/use-watch/index.js +1 -1
  252. package/hooks/use-web-socket/index.js +7 -7
  253. package/hooks/use-why-did-you-update/index.js +1 -1
  254. package/hooks/use-window-size/index.js +7 -7
  255. package/hooks/utils/createEffectWithTarget.js +7 -7
  256. package/hooks/utils/depsAreSame.js +1 -1
  257. package/hooks/utils/depsEqual.js +1 -1
  258. package/hooks/utils/domTarget.js +1 -1
  259. package/hooks/utils/getDocumentOrShadow.js +1 -1
  260. package/hooks/utils/index.js +1 -1
  261. package/hooks/utils/isAppleDevice.js +1 -1
  262. package/hooks/utils/isBrowser.js +1 -1
  263. package/hooks/utils/isDev.js +1 -1
  264. package/hooks/utils/rect.js +1 -1
  265. package/hooks/utils/useDeepCompareWithTarget.js +4 -4
  266. package/hooks/utils/useEffectWithTarget.js +1 -1
  267. package/hooks/utils/useIsomorphicLayoutEffectWithTarget.js +1 -1
  268. package/hooks/utils/useLayoutEffectWithTarget.js +1 -1
  269. package/icons/file/File.js +5 -4
  270. package/icons/file/constants.d.ts +2 -0
  271. package/icons/file/constants.js +7 -0
  272. package/icons/file/context.d.ts +0 -1
  273. package/icons/file/context.js +3 -3
  274. package/icons/file/index.js +2 -2
  275. package/icons/file/style/index.js +1 -1
  276. package/index.d.ts +2 -2
  277. package/index.js +542 -537
  278. package/morphicons/core/interpolate.js +1 -1
  279. package/morphicons/core/normalize.js +72 -71
  280. package/morphicons/core/parse.d.ts +1 -9
  281. package/morphicons/core/resample.js +1 -1
  282. package/morphicons/core/serialize.js +1 -1
  283. package/morphicons/core/spring.js +1 -1
  284. package/morphicons/dom/controller.d.ts +3 -3
  285. package/morphicons/dom/index.js +68 -67
  286. package/morphicons/element/index.d.ts +1 -1
  287. package/morphicons/index.d.ts +1 -1
  288. package/morphicons/index.js +6 -6
  289. package/morphicons/react/index.d.ts +1 -1
  290. package/morphicons/react/index.js +65 -64
  291. package/package.json +1 -1
  292. package/progress/Progress.js +20 -20
  293. package/progress/constants.js +1 -1
  294. package/progress/context.js +1 -1
  295. package/progress/index.js +1 -1
  296. package/progress/style/index.js +1 -1
  297. package/progress/utils.js +1 -1
  298. package/resize-observer/Collection.js +1 -1
  299. package/resize-observer/ResizeObserver.js +13 -12
  300. package/resize-observer/SingleObserver.d.ts +1 -5
  301. package/resize-observer/SingleObserver.js +4 -4
  302. package/resize-observer/constants.d.ts +2 -0
  303. package/resize-observer/constants.js +4 -1
  304. package/resize-observer/context.d.ts +0 -1
  305. package/resize-observer/context.js +3 -3
  306. package/resize-observer/index.d.ts +1 -7
  307. package/resize-observer/index.js +7 -9
  308. package/resize-observer/interface.d.ts +18 -0
  309. package/resize-observer/observerUtil.d.ts +1 -1
  310. package/resize-observer/observerUtil.js +1 -1
  311. package/resize-observer/style/index.js +1 -1
  312. package/resize-observer/utils.js +1 -1
  313. package/space/Space.d.ts +2 -1
  314. package/space/Space.js +12 -11
  315. package/space/SpaceVertical.js +1 -1
  316. package/space/constants.d.ts +2 -0
  317. package/space/constants.js +9 -1
  318. package/space/context.d.ts +0 -1
  319. package/space/context.js +3 -8
  320. package/space/index.d.ts +0 -6
  321. package/space/index.js +8 -10
  322. package/space/interface.d.ts +1 -0
  323. package/space/style/index.js +1 -1
  324. package/space/utils.js +1 -1
  325. package/style/animation.less +2 -8
  326. package/style/normalize.less +0 -13
  327. package/style.css +1 -1
  328. package/suspense-fallback-test/NeverLoadLazy.d.ts +3 -0
  329. package/suspense-fallback-test/NeverLoadLazy.js +8 -0
  330. package/suspense-fallback-test/SuspenseFallbackTest.js +14 -14
  331. package/suspense-fallback-test/constants.d.ts +2 -0
  332. package/suspense-fallback-test/constants.js +4 -1
  333. package/suspense-fallback-test/context.d.ts +0 -2
  334. package/suspense-fallback-test/context.js +3 -3
  335. package/suspense-fallback-test/index.d.ts +0 -6
  336. package/suspense-fallback-test/index.js +5 -9
  337. package/suspense-fallback-test/style/index.js +1 -1
  338. package/suspense-fallback-test/utils.js +1 -1
  339. package/test.js +1 -1
  340. package/timer/Timer.js +6 -5
  341. package/timer/constants.d.ts +2 -0
  342. package/timer/constants.js +4 -1
  343. package/timer/context.d.ts +0 -1
  344. package/timer/context.js +3 -3
  345. package/timer/index.d.ts +0 -6
  346. package/timer/index.js +5 -9
  347. package/timer/style/index.js +1 -1
  348. package/timer/utils.js +1 -1
  349. package/transition/Transition.d.ts +0 -1
  350. package/transition/Transition.js +55 -58
  351. package/transition/TransitionCSS.js +15 -15
  352. package/transition/TransitionGroup.js +13 -13
  353. package/transition/TransitionStyle.js +12 -12
  354. package/transition/constants.d.ts +4 -27
  355. package/transition/constants.js +37 -41
  356. package/transition/context.d.ts +2 -3
  357. package/transition/context.js +4 -5
  358. package/transition/index.d.ts +0 -7
  359. package/transition/index.js +15 -16
  360. package/transition/interface.d.ts +26 -1
  361. package/transition/interface.js +11 -0
  362. package/transition/style/index.js +1 -1
  363. package/transition/utils.d.ts +1 -1
  364. package/transition/utils.js +1 -1
  365. package/utils/callbackOriginRef.js +1 -1
  366. package/utils/confetti.js +1 -1
  367. package/utils/constants.d.ts +3 -2
  368. package/utils/constants.js +6 -5
  369. package/utils/copy.js +1 -1
  370. package/utils/createRoot.d.ts +1 -6
  371. package/utils/createRoot.js +11 -11
  372. package/utils/css.js +1 -1
  373. package/utils/date.d.ts +1 -1
  374. package/utils/date.js +1 -1
  375. package/utils/dayjs.js +1 -1
  376. package/utils/document.js +1 -1
  377. package/utils/dom.d.ts +1 -1
  378. package/utils/dom.js +9 -9
  379. package/utils/file.js +1 -1
  380. package/utils/fillNBSP.js +1 -1
  381. package/utils/getCompatProp.js +1 -1
  382. package/utils/getElement.js +1 -1
  383. package/utils/getHighlightText.js +1 -1
  384. package/utils/getHotkeyHandler.d.ts +1 -12
  385. package/utils/getHotkeyHandler.js +17 -17
  386. package/utils/getPrefixCls.js +1 -1
  387. package/utils/getScrollBarHeight.js +1 -1
  388. package/utils/getScrollBarSize.js +1 -1
  389. package/utils/getScrollBarWidth.js +1 -1
  390. package/utils/getScrollParent.js +1 -1
  391. package/utils/getStringLength.js +1 -1
  392. package/utils/getUrlSearchParam.js +1 -1
  393. package/utils/index.js +274 -273
  394. package/utils/initAllLineClamp.js +1 -1
  395. package/utils/injectLineClamp.js +1 -1
  396. package/utils/interface.d.ts +103 -0
  397. package/utils/interface.js +4 -0
  398. package/utils/intersectionObserver.js +1 -1
  399. package/utils/is.js +1 -1
  400. package/utils/keyboardCode.js +1 -1
  401. package/utils/lodash.d.ts +2 -1
  402. package/utils/lodash.js +19 -18
  403. package/utils/math.d.ts +1 -1
  404. package/utils/mergeProps.d.ts +1 -2
  405. package/utils/mergeProps.js +1 -1
  406. package/utils/mergedToString.js +1 -1
  407. package/utils/migrateLegacyProps.d.ts +1 -8
  408. package/utils/migrateLegacyProps.js +1 -1
  409. package/utils/mutationObserver.js +1 -1
  410. package/utils/names.d.ts +1 -8
  411. package/utils/names.js +1 -1
  412. package/utils/object.js +1 -1
  413. package/utils/omit.js +1 -1
  414. package/utils/pad.js +1 -1
  415. package/utils/pick.js +1 -1
  416. package/utils/react19Adapter.js +1 -1
  417. package/utils/reactNode.js +1 -1
  418. package/utils/ref.d.ts +2 -1
  419. package/utils/ref.js +13 -13
  420. package/utils/resizeObserver.js +1 -1
  421. package/utils/scrollIntoViewIfNeeded.js +1 -1
  422. package/utils/scrollTo.js +1 -1
  423. package/utils/setDarkTheme.js +1 -1
  424. package/utils/setDir.js +1 -1
  425. package/utils/setPrimaryColor.js +1 -1
  426. package/utils/setTheme.js +1 -1
  427. package/utils/string.js +1 -1
  428. package/utils/style.js +1 -1
  429. package/utils/tinycolor.js +1 -1
  430. package/utils/toArray.js +1 -1
  431. package/utils/tunnel.d.ts +2 -12
  432. package/utils/tunnel.js +1 -1
  433. package/utils/warning.js +1 -1
  434. package/version/index.js +10 -9
  435. /package/{base → resize-observer}/style/index.css +0 -0
@@ -1,103 +1,104 @@
1
- /* 潘启宝 2026-11-03 10:36:21 星期二 山东省济南市 */
1
+ /* 潘启宝 2026-11-19 14:01:53 星期四 山东省济南市 */
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 { jsx as m, jsxs as h } 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";
10
11
  // components/common/morphicons/react/index.tsx
11
- var g = typeof document > "u" ? l : d;
12
- function _(o, s, c) {
12
+ var y = h("document") ? l : d;
13
+ function b(o, s, c) {
13
14
  if (c <= 0) return a(o);
14
15
  if (c >= 1) return a(s);
15
- let l = r(i(o), i(s)), u = e(l);
16
- 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));
17
18
  }
18
- var v = s(function(e, t) {
19
- let { icon: n, from: r, to: i, progress: s, spring: d, reducedMotion: v, 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 ? _(r, i, s ?? 0) : E === void 0 ? "" : a(E)), O = f(null), k = f(null), A = f(d);
20
- A.current = d;
21
- let j = f(v);
22
- j.current = v;
23
- let M = f(n), N = f(T), P = f(!1), F = f(!1), I = f(null), L = c((e) => {
24
- if (k.current) return k.current;
25
- let t = O.current;
26
- 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);
27
28
  }, []);
28
- g(() => {
29
- P.current = !1;
30
- let e = O.current;
31
- if (e && E !== void 0) {
32
- let t = o(e, T ? r : E, { reducedMotion: j.current });
33
- if (k.current = t, T) {
34
- 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];
35
36
  let e = s ?? 0;
36
- 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);
37
38
  }
38
39
  }
39
40
  return () => {
40
- 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;
41
42
  };
42
43
  }, []), l(() => {
43
- let e = k.current;
44
- e && (e.reducedMotion = v ?? "never");
45
- }, [v]), l(() => {
46
- let e = N.current && !T;
47
- N.current = T;
48
- let t = n !== M.current;
49
- if (M.current = n, T || n === void 0 || !t && !e) return;
50
- I.current = null, F.current = !1;
51
- let r = k.current;
52
- 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);
53
54
  }, [
54
55
  n,
55
- T,
56
- L
56
+ D,
57
+ z
57
58
  ]), l(() => {
58
- if (!T) return;
59
- let e = k.current ?? L(r);
59
+ if (!D) return;
60
+ let e = j.current ?? z(r);
60
61
  if (!e) return;
61
62
  let t = s ?? 0;
62
- 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));
63
64
  }, [
64
- T,
65
+ D,
65
66
  r,
66
67
  i,
67
68
  s,
68
- L
69
+ z
69
70
  ]), u(t, () => ({
70
71
  morphTo: (e, t) => {
71
- I.current = null, F.current = !1;
72
- let n = k.current;
73
- 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);
74
75
  },
75
76
  set: (e) => {
76
- I.current = null, F.current = !1;
77
- let t = k.current;
78
- 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);
79
80
  }
80
- }), [L]);
81
- let R = S ? Number(x) * 24 / Number(y) : x;
82
- return /* @__PURE__ */ h("svg", {
81
+ }), [z]);
82
+ let B = w ? Number(C) * 24 / Number(x) : C;
83
+ return /* @__PURE__ */ v("svg", {
83
84
  xmlns: "http://www.w3.org/2000/svg",
84
- width: y,
85
- height: y,
85
+ width: x,
86
+ height: x,
86
87
  viewBox: "0 0 24 24",
87
88
  fill: "none",
88
- stroke: b,
89
- strokeWidth: R,
89
+ stroke: S,
90
+ strokeWidth: B,
90
91
  strokeLinecap: "round",
91
92
  strokeLinejoin: "round",
92
- role: C ? "img" : void 0,
93
- "aria-hidden": !C || void 0,
94
- ...w,
95
- children: [C ? /* @__PURE__ */ m("title", { children: C }) : null, /* @__PURE__ */ m("path", {
96
- ref: O,
97
- 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
98
99
  })]
99
100
  });
100
101
  });
101
- export { v as MorphIcon };
102
+ export { x as MorphIcon };
102
103
  /* 欲穷千里目,更上一层楼 */
103
104
  /* 独立思考,明辨是非 */
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@unicom-cloud/ui-common","version":"0.1.57","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.59","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,14 +1,14 @@
1
- /* 潘启宝 2026-11-03 10:36:21 星期二 山东省济南市 */
1
+ /* 潘启宝 2026-11-19 14:01:53 星期四 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
- import { clamp as e } from "../utils/lodash.js";
4
- import { getBody as t } from "../utils/dom.js";
5
- import n from "../utils/getPrefixCls.js";
3
+ import { getBody as e } from "../utils/dom.js";
4
+ import t from "../utils/getPrefixCls.js";
5
+ import { clamp as n } from "../utils/lodash.js";
6
6
  import { isArrayAndNotEmpty as r, isNumber as i, isUndefined as a } from "@unicom-cloud/utils/is";
7
7
  // components/common/progress/Progress.ts
8
8
  var o = {
9
9
  status: null,
10
10
  settings: {
11
- parent: t(),
11
+ parent: e(),
12
12
  progress: document.createElement("div"),
13
13
  bar: document.createElement("div"),
14
14
  minimum: .07,
@@ -21,14 +21,14 @@ var o = {
21
21
  configure(e) {
22
22
  return Object.assign(o.settings, e), o;
23
23
  },
24
- set(t) {
25
- let n = o.isStarted();
26
- t = e(t, o.settings.minimum, 1), o.status = t === 1 ? null : t;
27
- let r = o.render(!n), i = o.settings.speed;
28
- return r.offsetWidth, f(function(e) {
29
- p(o.settings.bar, c(t, i)), t === 1 ? (r.offsetWidth, setTimeout(function() {
30
- o.remove(), e();
31
- }, i)) : setTimeout(e, i);
24
+ set(e) {
25
+ let t = o.isStarted();
26
+ e = n(e, o.settings.minimum, 1), o.status = e === 1 ? null : e;
27
+ let r = o.render(!t), i = o.settings.speed;
28
+ return r.offsetWidth, f(function(t) {
29
+ p(o.settings.bar, c(e, i)), e === 1 ? (r.offsetWidth, setTimeout(function() {
30
+ o.remove(), t();
31
+ }, i)) : setTimeout(t, i);
32
32
  }), o;
33
33
  },
34
34
  isStarted() {
@@ -40,19 +40,19 @@ var o = {
40
40
  done(e) {
41
41
  return e || o.status ? o.inc(.3 + .5 * Math.random()).set(1) : o;
42
42
  },
43
- inc(t) {
44
- let n = o.status;
45
- if (!n) return o.start();
46
- if (!(n > 1)) return i(t) || (n >= 0 && n < .2 && (t = .1), n >= .2 && n < .5 && (t = .04), n >= .5 && n < .8 && (t = .02), n >= .8 && n < .99 && (t = .005)), t ??= 7e-4, n = e(n + t, 0, .994), o.set(n);
43
+ inc(e) {
44
+ let t = o.status;
45
+ if (!t) return o.start();
46
+ if (!(t > 1)) return i(e) || (t >= 0 && t < .2 && (e = .1), t >= .2 && t < .5 && (e = .04), t >= .5 && t < .8 && (e = .02), t >= .8 && t < .99 && (e = .005)), e ??= 7e-4, t = n(t + e, 0, .994), o.set(t);
47
47
  },
48
48
  trickle() {
49
49
  return o.inc();
50
50
  },
51
51
  render(e) {
52
52
  if (o.settings.parent.contains(o.settings.progress)) return o.settings.progress;
53
- o.settings.progress.hasAttribute("class"), o.settings.bar.hasAttribute("class"), o.settings.progress.setAttribute("class", n("progress")), o.settings.bar.setAttribute("class", n("progress-bar")), o.settings.progress.contains(o.settings.bar) || o.settings.progress.append(o.settings.bar);
54
- let t = e ? "-100" : s(o.status || 0);
55
- return p(o.settings.bar, c(0, t)), o.settings.parent.append(o.settings.progress), o.settings.progress;
53
+ o.settings.progress.hasAttribute("class"), o.settings.bar.hasAttribute("class"), o.settings.progress.setAttribute("class", t("progress")), o.settings.bar.setAttribute("class", t("progress-bar")), o.settings.progress.contains(o.settings.bar) || o.settings.progress.append(o.settings.bar);
54
+ let n = e ? "-100" : s(o.status || 0);
55
+ return p(o.settings.bar, c(0, n)), o.settings.parent.append(o.settings.progress), o.settings.progress;
56
56
  },
57
57
  remove() {
58
58
  o.settings.progress.remove();
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-11-03 10:36:21 星期二 山东省济南市 */
1
+ /* 潘启宝 2026-11-19 14:01:53 星期四 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
3
  /* 欲穷千里目,更上一层楼 */
4
4
  /* 独立思考,明辨是非 */
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-11-03 10:36:21 星期二 山东省济南市 */
1
+ /* 潘启宝 2026-11-19 14:01:53 星期四 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
3
  /* 欲穷千里目,更上一层楼 */
4
4
  /* 独立思考,明辨是非 */
package/progress/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-11-03 10:36:21 星期二 山东省济南市 */
1
+ /* 潘启宝 2026-11-19 14:01:53 星期四 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
3
  import "./style/index.js";
4
4
  import e from "./Progress.js";
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-11-03 10:36:21 星期二 山东省济南市 */
1
+ /* 潘启宝 2026-11-19 14:01:53 星期四 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
3
  /* empty css */
4
4
  /* 欲穷千里目,更上一层楼 */
package/progress/utils.js CHANGED
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-11-03 10:36:21 星期二 山东省济南市 */
1
+ /* 潘启宝 2026-11-19 14:01:53 星期四 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
3
  /* 欲穷千里目,更上一层楼 */
4
4
  /* 独立思考,明辨是非 */
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-11-03 10:36:21 星期二 山东省济南市 */
1
+ /* 潘启宝 2026-11-19 14:01:53 星期四 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
3
  import { CollectionContext as e } from "./context.js";
4
4
  import { useCallback as t, useContext as n, useRef as r } from "react";
@@ -1,32 +1,33 @@
1
- /* 潘启宝 2026-11-03 10:36:21 星期二 山东省济南市 */
1
+ /* 潘启宝 2026-11-19 14:01:53 星期四 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
3
  import e from "../hooks/use-merge-component-props/index.js";
4
- import t from "../utils/toArray.js";
4
+ import { COMPONENT_INFO_RESIZE_OBSERVER as t } from "../utils/names.js";
5
+ import n from "../utils/toArray.js";
5
6
  import "../utils/warning.js";
6
- import { COMPONENT_INFO_RESIZE_OBSERVER as n } from "../utils/names.js";
7
- import { PropsContext as r, defaultProps as i } from "./context.js";
8
- import { Collection as a } from "./Collection.js";
7
+ import { Collection as r } from "./Collection.js";
8
+ import { defaultProps as i } from "./constants.js";
9
+ import { PropsContext as a } from "./context.js";
9
10
  import o from "./SingleObserver.js";
10
11
  import { createElement as s, forwardRef as c, useContext as l } from "react";
11
12
  import { isFunction as u } from "@unicom-cloud/utils/is";
12
13
  // components/common/resize-observer/ResizeObserver.tsx
13
- function d(n, a) {
14
- let c = l(r), d = e({
15
- internalProps: n,
14
+ function d(t, r) {
15
+ let c = l(a), d = e({
16
+ internalProps: t,
16
17
  contextProps: c,
17
18
  globalProps: {},
18
19
  defaultProps: i
19
20
  }), { children: f } = d;
20
- return (u(f) ? [f] : t(f)).map((e, t) => {
21
+ return (u(f) ? [f] : n(f)).map((e, t) => {
21
22
  let n = e?.key || `observer-key-${t}`;
22
23
  return /* @__PURE__ */ s(o, {
23
24
  ...d,
24
25
  key: n,
25
- ref: t === 0 ? a : void 0
26
+ ref: t === 0 ? r : void 0
26
27
  }, e);
27
28
  });
28
29
  }
29
- var f = Object.assign(c(d), { ...n });
30
- export { a as Collection, f as default };
30
+ var f = Object.assign(c(d), { ...t });
31
+ export { r as Collection, f as default };
31
32
  /* 欲穷千里目,更上一层楼 */
32
33
  /* 独立思考,明辨是非 */
@@ -1,7 +1,3 @@
1
- import { type ReactElement, type RefObject } from 'react';
2
- import type { ResizeObserverProps } from './interface';
3
- export interface SingleObserverProps extends ResizeObserverProps {
4
- children: ReactElement | ((ref: RefObject<Element>) => ReactElement);
5
- }
1
+ import type { SingleObserverProps } from './interface';
6
2
  declare const RefSingleObserver: import("react").ForwardRefExoticComponent<SingleObserverProps & import("react").RefAttributes<HTMLElement>>;
7
3
  export default RefSingleObserver;
@@ -1,7 +1,7 @@
1
- /* 潘启宝 2026-11-03 10:36:21 星期二 山东省济南市 */
1
+ /* 潘启宝 2026-11-19 14:01:53 星期四 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
- import { getReactElementRef as e, supportRef as t, useComposeRef as n } from "../utils/ref.js";
4
- import { getDOM as r } from "../utils/dom.js";
3
+ import { getDOM as e } from "../utils/dom.js";
4
+ import { getReactElementRef as t, supportRef as n, useComposeRef as r } from "../utils/ref.js";
5
5
  import { CollectionContext as i } from "./context.js";
6
6
  import { observe as a, unobserve as o } from "./observerUtil.js";
7
7
  import { cloneElement as s, forwardRef as c, isValidElement as l, useCallback as u, useContext as d, useEffect as f, useImperativeHandle as p, useRef as m } from "react";
@@ -13,7 +13,7 @@ function g(c, g) {
13
13
  height: -1,
14
14
  offsetWidth: -1,
15
15
  offsetHeight: -1
16
- }), w = !x && l(S) && t(S), T = w ? e(S) : null, E = n(T, y), D = () => r(y);
16
+ }), w = !x && l(S) && n(S), T = w ? t(S) : null, E = r(T, y), D = () => e(y);
17
17
  p(g, () => D());
18
18
  let O = m(c);
19
19
  O.current = c;
@@ -0,0 +1,2 @@
1
+ import type { ResizeObserverProps } from './interface';
2
+ export declare const defaultProps: Partial<ResizeObserverProps>;
@@ -1,4 +1,7 @@
1
- /* 潘启宝 2026-11-03 10:36:21 星期二 山东省济南市 */
1
+ /* 潘启宝 2026-11-19 14:01:53 星期四 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
+ // components/common/resize-observer/constants.ts
4
+ var e = {};
5
+ export { e as defaultProps };
3
6
  /* 欲穷千里目,更上一层楼 */
4
7
  /* 独立思考,明辨是非 */
@@ -1,4 +1,3 @@
1
1
  import type { OnCollectionResize, ResizeObserverProps } from './interface';
2
2
  export declare const CollectionContext: import("react").Context<OnCollectionResize>;
3
- export declare const defaultProps: Partial<ResizeObserverProps>;
4
3
  export declare const PropsContext: import("react").Context<Partial<ResizeObserverProps>>;
@@ -1,8 +1,8 @@
1
- /* 潘启宝 2026-11-03 10:36:21 星期二 山东省济南市 */
1
+ /* 潘启宝 2026-11-19 14:01:53 星期四 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
3
  import { createContext as e } from "react";
4
4
  // components/common/resize-observer/context.ts
5
- var t = e(null), n = {}, r = e({});
6
- export { t as CollectionContext, r as PropsContext, n as defaultProps };
5
+ var t = e(null), n = e({});
6
+ export { t as CollectionContext, n as PropsContext };
7
7
  /* 欲穷千里目,更上一层楼 */
8
8
  /* 独立思考,明辨是非 */
@@ -10,13 +10,7 @@ declare const ResizeObserver: import("react").ForwardRefExoticComponent<import("
10
10
  } & {
11
11
  PropsContext: import("react").Context<Partial<import("./interface").ResizeObserverProps>>;
12
12
  Collection: typeof Collection;
13
- SingleObserver: import("react").ForwardRefExoticComponent<import("./SingleObserver").SingleObserverProps & import("react").RefAttributes<HTMLElement>>;
14
- zh: string;
15
- en: string;
16
- displayName: string;
17
- id: string;
18
- legacy?: string;
19
- descriptions?: string;
13
+ SingleObserver: import("react").ForwardRefExoticComponent<import("./interface").SingleObserverProps & import("react").RefAttributes<HTMLElement>>;
20
14
  };
21
15
  export { Collection };
22
16
  export default ResizeObserver;
@@ -1,18 +1,16 @@
1
- /* 潘启宝 2026-11-03 10:36:21 星期二 山东省济南市 */
1
+ /* 潘启宝 2026-11-19 14:01:53 星期四 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
- import { COMPONENT_INFO_RESIZE_OBSERVER as e } from "../utils/names.js";
3
+ import "./style/index.js";
4
+ import { Collection as e } from "./Collection.js";
4
5
  import { PropsContext as t } from "./context.js";
5
- import { Collection as n } from "./Collection.js";
6
+ import n from "./ResizeObserver.js";
6
7
  import r from "./SingleObserver.js";
7
- import i from "./ResizeObserver.js";
8
- import "./style/index.js";
9
8
  // components/common/resize-observer/index.ts
10
- var a = Object.assign(i, {
11
- ...e,
9
+ var i = Object.assign(n, {
12
10
  PropsContext: t,
13
- Collection: n,
11
+ Collection: e,
14
12
  SingleObserver: r
15
13
  });
16
- export { n as Collection, a as default };
14
+ export { e as Collection, i as default };
17
15
  /* 欲穷千里目,更上一层楼 */
18
16
  /* 独立思考,明辨是非 */
@@ -1,3 +1,9 @@
1
+ import type React from 'react';
2
+ /**
3
+ * Resize 监听器函数类型
4
+ * @en Resize listener function type
5
+ */
6
+ export type ResizeListener = (element: Element) => void;
1
7
  export type OnCollectionResize = (size: SizeInfo, element: HTMLElement, data: unknown) => void;
2
8
  export interface ResizeInfo {
3
9
  size: SizeInfo;
@@ -24,3 +30,15 @@ export interface ResizeObserverProps {
24
30
  /** Trigger if element resized. Will always trigger when first time render. */
25
31
  onResize?: OnResize;
26
32
  }
33
+ /**
34
+ * SingleObserver 子组件 props
35
+ * @en SingleObserver sub-component props
36
+ */
37
+ export interface SingleObserverProps {
38
+ /** Pass to ResizeObserver.Collection with additional data */
39
+ data?: unknown;
40
+ children: React.ReactElement | ((ref: React.RefObject<Element>) => React.ReactElement);
41
+ disabled?: boolean;
42
+ /** Trigger if element resized. Will always trigger when first time render. */
43
+ onResize?: OnResize;
44
+ }
@@ -1,3 +1,3 @@
1
- export type ResizeListener = (element: Element) => void;
1
+ import type { ResizeListener } from './interface';
2
2
  export declare function observe(element: Element, callback: ResizeListener): void;
3
3
  export declare function unobserve(element: Element, callback: ResizeListener): void;
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-11-03 10:36:21 星期二 山东省济南市 */
1
+ /* 潘启宝 2026-11-19 14:01:53 星期四 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
3
  // components/common/resize-observer/observerUtil.ts
4
4
  var e = /* @__PURE__ */ new Map();
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-11-03 10:36:21 星期二 山东省济南市 */
1
+ /* 潘启宝 2026-11-19 14:01:53 星期四 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
3
  /* empty css */
4
4
  /* 欲穷千里目,更上一层楼 */
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-11-03 10:36:21 星期二 山东省济南市 */
1
+ /* 潘启宝 2026-11-19 14:01:53 星期四 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
3
  /* 欲穷千里目,更上一层楼 */
4
4
  /* 独立思考,明辨是非 */
package/space/Space.d.ts CHANGED
@@ -1,5 +1,6 @@
1
+ import type React from 'react';
1
2
  import type { SpaceProps } from './interface';
2
- declare const Space: import("react").ForwardRefExoticComponent<SpaceProps & import("react").RefAttributes<unknown>> & {
3
+ declare const Space: React.ForwardRefExoticComponent<SpaceProps & React.RefAttributes<unknown>> & {
3
4
  zh: string;
4
5
  en: string;
5
6
  displayName: string;
package/space/Space.js CHANGED
@@ -1,20 +1,21 @@
1
- /* 潘启宝 2026-11-03 10:36:21 星期二 山东省济南市 */
1
+ /* 潘启宝 2026-11-19 14:01:53 星期四 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
- import { getDOM as e } from "../utils/dom.js";
3
+ import e from "../flex/index.js";
4
4
  import t from "../hooks/use-merge-component-props/index.js";
5
5
  import n from "../utils/className.js";
6
- import r from "../utils/getPrefixCls.js";
7
- import i from "../utils/toArray.js";
6
+ import { getDOM as r } from "../utils/dom.js";
7
+ import i from "../utils/getPrefixCls.js";
8
8
  import { COMPONENT_INFO_SPACE as a } from "../utils/names.js";
9
- import { PropsContext as o, defaultProps as s } from "./context.js";
10
- import c from "../flex/index.js";
9
+ import o from "../utils/toArray.js";
10
+ import { defaultProps as s } from "./constants.js";
11
+ import { PropsContext as c } from "./context.js";
11
12
  import { Fragment as l, forwardRef as u, useContext as d, useImperativeHandle as f, useRef as p } from "react";
12
13
  import { isPresent as m, isUndefined as h } from "@unicom-cloud/utils/is";
13
14
  import { HORIZONTAL as g, VERTICAL as _ } from "@unicom-cloud/utils/constants/string";
14
15
  import { jsx as v, jsxs as y } from "react/jsx-runtime";
15
16
  // components/common/space/Space.tsx
16
17
  function b(a, u) {
17
- let b = d(o), { className: x, style: S, children: C, direction: w, justifyContent: T, alignItems: E, wrap: D, separator: O, rtl: k, inline: A, ...j } = t({
18
+ let b = d(c), { className: x, style: S, children: C, direction: w, justifyContent: T, alignItems: E, wrap: D, separator: O, rtl: k, inline: A, ...j } = t({
18
19
  internalProps: a,
19
20
  contextProps: b,
20
21
  globalProps: {},
@@ -39,15 +40,15 @@ function b(a, u) {
39
40
  vertical: "column"
40
41
  }[w] ?? w;
41
42
  h(M) && (M = N ? "center" : void 0);
42
- let F = r("space"), I = n(F, {
43
+ let F = i("space"), I = n(F, {
43
44
  [`${F}-${w}`]: w,
44
45
  [`${F}-justify-content-${T}`]: T,
45
46
  [`${F}-align-items-${M}`]: M,
46
47
  [`${F}-rtl`]: k
47
- }, D ? `${F}-wrap` : `${F}-no-wrap`, x), L = i(C), R = p(null);
48
+ }, D ? `${F}-wrap` : `${F}-no-wrap`, x), L = o(C), R = p(null);
48
49
  return f(u, () => ({ getRootElement() {
49
- return e(R);
50
- } })), /* @__PURE__ */ v(c, {
50
+ return r(R);
51
+ } })), /* @__PURE__ */ v(e, {
51
52
  ref: R,
52
53
  style: S,
53
54
  className: I,
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-11-03 10:36:21 星期二 山东省济南市 */
1
+ /* 潘启宝 2026-11-19 14:01:53 星期四 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
3
  import { COMPONENT_INFO_SPACE_VERTICAL as e } from "../utils/names.js";
4
4
  import t from "./Space.js";
@@ -0,0 +1,2 @@
1
+ import type { SpaceProps } from './interface';
2
+ export declare const defaultProps: Partial<SpaceProps>;
@@ -1,4 +1,12 @@
1
- /* 潘启宝 2026-11-03 10:36:21 星期二 山东省济南市 */
1
+ /* 潘启宝 2026-11-19 14:01:53 星期四 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
+ import { HORIZONTAL as e } from "@unicom-cloud/utils/constants/string";
4
+ // components/common/space/constants.ts
5
+ var t = {
6
+ gap: "small",
7
+ direction: e,
8
+ inline: !0
9
+ };
10
+ export { t as defaultProps };
3
11
  /* 欲穷千里目,更上一层楼 */
4
12
  /* 独立思考,明辨是非 */
@@ -1,3 +1,2 @@
1
1
  import type { SpaceProps } from './interface';
2
- export declare const defaultProps: Partial<SpaceProps>;
3
2
  export declare const PropsContext: import("react").Context<Partial<SpaceProps>>;
package/space/context.js CHANGED
@@ -1,13 +1,8 @@
1
- /* 潘启宝 2026-11-03 10:36:21 星期二 山东省济南市 */
1
+ /* 潘启宝 2026-11-19 14:01:53 星期四 山东省济南市 */
2
2
  /* 世界因你而美丽 */
3
3
  import { createContext as e } from "react";
4
- import { HORIZONTAL as t } from "@unicom-cloud/utils/constants/string";
5
4
  // components/common/space/context.ts
6
- var n = {
7
- gap: "small",
8
- direction: t,
9
- inline: !0
10
- }, r = e({});
11
- export { r as PropsContext, n as defaultProps };
5
+ var t = e({});
6
+ export { t as PropsContext };
12
7
  /* 欲穷千里目,更上一层楼 */
13
8
  /* 独立思考,明辨是非 */
package/space/index.d.ts CHANGED
@@ -17,12 +17,6 @@ declare const Space: import("react").ForwardRefExoticComponent<import("./interfa
17
17
  legacy?: string;
18
18
  descriptions?: string;
19
19
  };
20
- zh: string;
21
- en: string;
22
- displayName: string;
23
- id: string;
24
- legacy?: string;
25
- descriptions?: string;
26
20
  };
27
21
  export { SpaceVertical };
28
22
  export default Space;