@unicom-cloud/ui-common 0.1.7 → 0.1.9

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 (378) hide show
  1. package/Development.js +1 -1
  2. package/Empty.js +1 -1
  3. package/Flex.js +7 -5
  4. package/Motion.js +1 -1
  5. package/Progress.js +1 -1
  6. package/ResizeObserver.js +1 -1
  7. package/Space.js +5 -7
  8. package/SuspenseFallbackTest.js +1 -1
  9. package/TransitionGroup.js +27 -26
  10. package/development/index.js +27 -25
  11. package/empty/index.js +1 -1
  12. package/flex/index.js +63 -67
  13. package/flex/utils.js +31 -0
  14. package/higher-order/index.js +1 -1
  15. package/higher-order/with-speech-synthesis/index.js +1 -1
  16. package/higher-order/withSpeechSynthesis.js +1 -1
  17. package/hooks/create-deep-compare-effect/index.js +1 -1
  18. package/hooks/create-update-effect/index.js +1 -1
  19. package/hooks/create-use-storage-state/index.js +1 -1
  20. package/hooks/createDeepCompareEffect.js +1 -1
  21. package/hooks/createUpdateEffect.js +1 -1
  22. package/hooks/createUseStorageState.js +1 -1
  23. package/hooks/index.js +146 -142
  24. package/hooks/use-async-effect/index.js +1 -1
  25. package/hooks/use-boolean/index.js +1 -1
  26. package/hooks/use-click-away/index.js +1 -1
  27. package/hooks/use-computed-state/index.js +1 -1
  28. package/hooks/use-controllable-value/index.js +1 -1
  29. package/hooks/use-cookie-state/index.js +1 -1
  30. package/hooks/use-count-down/index.js +1 -1
  31. package/hooks/use-counter/index.js +1 -1
  32. package/hooks/use-create/index.js +1 -1
  33. package/hooks/use-creation/index.js +1 -1
  34. package/hooks/use-debounce/index.js +1 -1
  35. package/hooks/use-debounce-effect/index.js +1 -1
  36. package/hooks/use-debounce-fn/index.js +1 -1
  37. package/hooks/use-deep-compare-effect/index.js +1 -1
  38. package/hooks/use-deep-compare-layout-effect/index.js +1 -1
  39. package/hooks/use-document-visibility/index.js +1 -1
  40. package/hooks/use-drag/index.js +1 -1
  41. package/hooks/use-drop/index.js +1 -1
  42. package/hooks/use-event/index.js +1 -1
  43. package/hooks/use-event-listener/index.js +1 -1
  44. package/hooks/use-event-target/index.js +1 -1
  45. package/hooks/use-external/index.js +1 -1
  46. package/hooks/use-favicon/index.js +1 -1
  47. package/hooks/use-focus-within/index.js +1 -1
  48. package/hooks/use-force-update/index.js +1 -1
  49. package/hooks/use-fullscreen/index.js +1 -1
  50. package/hooks/use-get-state/index.js +1 -1
  51. package/hooks/use-history-travel/index.js +1 -1
  52. package/hooks/use-hover/index.js +1 -1
  53. package/hooks/use-id/index.js +1 -1
  54. package/hooks/use-in-view/index.js +1 -1
  55. package/hooks/use-in-viewport/index.js +1 -1
  56. package/hooks/use-infinite-scroll/index.js +34 -29
  57. package/hooks/use-intersection-observer/index.js +10 -12
  58. package/hooks/use-intersection-observers/index.js +5 -32
  59. package/hooks/use-interval/index.js +1 -1
  60. package/hooks/use-is-first-render/index.js +1 -1
  61. package/hooks/use-isomorphic-layout-effect/index.js +1 -1
  62. package/hooks/use-key-press/index.js +1 -1
  63. package/hooks/use-keyboard-event/index.js +1 -1
  64. package/hooks/use-latest/index.js +1 -1
  65. package/hooks/use-listen-window-resize/index.js +1 -1
  66. package/hooks/use-local-storage-state/index.js +1 -1
  67. package/hooks/use-lock-fn/index.js +1 -1
  68. package/hooks/use-long-press/index.js +1 -1
  69. package/hooks/use-map/index.js +1 -1
  70. package/hooks/use-media/index.js +1 -1
  71. package/hooks/use-memo/index.js +1 -1
  72. package/hooks/use-memoized-fn/index.js +1 -1
  73. package/hooks/use-merge-props/index.js +1 -1
  74. package/hooks/use-merge-value/index.js +9 -12
  75. package/hooks/use-mount/index.js +1 -1
  76. package/hooks/use-mouse/index.js +1 -1
  77. package/hooks/use-move/index.js +79 -0
  78. package/hooks/use-mutation-observer/index.js +1 -1
  79. package/hooks/use-mutation-observers/index.js +5 -4
  80. package/hooks/use-network/index.js +1 -1
  81. package/hooks/use-online-status/index.js +1 -1
  82. package/hooks/use-overflow-hidden/index.js +1 -1
  83. package/hooks/use-override-ref/index.js +1 -1
  84. package/hooks/use-pagination/index.js +1 -1
  85. package/hooks/use-paste-image/index.js +20 -0
  86. package/hooks/use-persist-callback/index.js +1 -1
  87. package/hooks/use-prefers-color-scheme-dark/index.js +1 -1
  88. package/hooks/use-previous/index.js +1 -1
  89. package/hooks/use-raf-interval/index.js +1 -1
  90. package/hooks/use-raf-state/index.js +1 -1
  91. package/hooks/use-raf-timeout/index.js +1 -1
  92. package/hooks/use-reactive/index.js +1 -1
  93. package/hooks/use-ref-latest/index.js +1 -1
  94. package/hooks/use-refs/index.js +1 -1
  95. package/hooks/use-request/index.js +1 -1
  96. package/hooks/use-request/src/Fetch.js +1 -1
  97. package/hooks/use-request/src/plugins/useAutoRunPlugin.js +1 -1
  98. package/hooks/use-request/src/plugins/useCachePlugin.js +1 -1
  99. package/hooks/use-request/src/plugins/useDebouncePlugin.js +1 -1
  100. package/hooks/use-request/src/plugins/useLoadingDelayPlugin.js +1 -1
  101. package/hooks/use-request/src/plugins/usePollingPlugin.js +1 -1
  102. package/hooks/use-request/src/plugins/useRefreshOnWindowFocusPlugin.js +1 -1
  103. package/hooks/use-request/src/plugins/useRetryPlugin.js +1 -1
  104. package/hooks/use-request/src/plugins/useThrottlePlugin.js +1 -1
  105. package/hooks/use-request/src/useRequest.js +1 -1
  106. package/hooks/use-request/src/useRequestImplement.js +1 -1
  107. package/hooks/use-request/src/utils/cache.js +1 -1
  108. package/hooks/use-request/src/utils/cachePromise.js +1 -1
  109. package/hooks/use-request/src/utils/cacheSubscribe.js +1 -1
  110. package/hooks/use-request/src/utils/isDocumentVisible.js +1 -1
  111. package/hooks/use-request/src/utils/isOnline.js +1 -1
  112. package/hooks/use-request/src/utils/limit.js +1 -1
  113. package/hooks/use-request/src/utils/subscribeFocus.js +1 -1
  114. package/hooks/use-request/src/utils/subscribeReVisible.js +1 -1
  115. package/hooks/use-reset-state/index.js +1 -1
  116. package/hooks/use-resize-observer/index.js +1 -1
  117. package/hooks/use-resize-observers/index.js +5 -4
  118. package/hooks/use-responsive/index.js +1 -1
  119. package/hooks/use-safe-state/index.js +1 -1
  120. package/hooks/use-scroll/index.js +1 -1
  121. package/hooks/use-selections/index.js +1 -1
  122. package/hooks/use-session-storage-state/index.js +1 -1
  123. package/hooks/use-set/index.js +1 -1
  124. package/hooks/use-set-state/index.js +1 -1
  125. package/hooks/use-size/index.js +1 -1
  126. package/hooks/use-state-callback/index.js +1 -1
  127. package/hooks/use-state-with-promise/index.js +1 -1
  128. package/hooks/use-sync-state/index.js +1 -1
  129. package/hooks/use-text-selection/index.js +1 -1
  130. package/hooks/use-theme/index.js +1 -1
  131. package/hooks/use-throttle/index.js +1 -1
  132. package/hooks/use-throttle-effect/index.js +1 -1
  133. package/hooks/use-throttle-fn/index.js +1 -1
  134. package/hooks/use-timeout/index.js +1 -1
  135. package/hooks/use-title/index.js +1 -1
  136. package/hooks/use-toggle/index.js +1 -1
  137. package/hooks/use-tracked-effect/index.js +1 -1
  138. package/hooks/use-unmount/index.js +1 -1
  139. package/hooks/use-unmounted-ref/index.js +1 -1
  140. package/hooks/use-update/index.js +1 -1
  141. package/hooks/use-update-effect/index.js +1 -1
  142. package/hooks/use-update-layout-effect/index.js +1 -1
  143. package/hooks/use-url-state/index.js +1 -1
  144. package/hooks/use-virtual-list/index.js +1 -1
  145. package/hooks/use-watch/index.js +1 -1
  146. package/hooks/use-web-socket/index.js +1 -1
  147. package/hooks/use-why-did-you-update/index.js +1 -1
  148. package/hooks/use-window-size/index.js +1 -1
  149. package/hooks/useAsyncEffect.js +1 -1
  150. package/hooks/useBoolean.js +1 -1
  151. package/hooks/useClickAway.js +1 -1
  152. package/hooks/useComputedState.js +1 -1
  153. package/hooks/useControllableValue.js +1 -1
  154. package/hooks/useCookieState.js +1 -1
  155. package/hooks/useCountDown.js +1 -1
  156. package/hooks/useCounter.js +1 -1
  157. package/hooks/useCreate.js +1 -1
  158. package/hooks/useCreation.js +1 -1
  159. package/hooks/useDebounce.js +1 -1
  160. package/hooks/useDebounceEffect.js +1 -1
  161. package/hooks/useDebounceFn.js +1 -1
  162. package/hooks/useDeepCompareEffect.js +1 -1
  163. package/hooks/useDeepCompareLayoutEffect.js +1 -1
  164. package/hooks/useDocumentVisibility.js +1 -1
  165. package/hooks/useDrag.js +1 -1
  166. package/hooks/useDrop.js +1 -1
  167. package/hooks/useEvent.js +1 -1
  168. package/hooks/useEventListener.js +1 -1
  169. package/hooks/useEventTarget.js +1 -1
  170. package/hooks/useExternal.js +1 -1
  171. package/hooks/useFavicon.js +1 -1
  172. package/hooks/useFocusWithin.js +1 -1
  173. package/hooks/useForceUpdate.js +1 -1
  174. package/hooks/useFullscreen.js +1 -1
  175. package/hooks/useGetState.js +1 -1
  176. package/hooks/useHistoryTravel.js +1 -1
  177. package/hooks/useHover.js +1 -1
  178. package/hooks/useId.js +1 -1
  179. package/hooks/useInView.js +1 -1
  180. package/hooks/useInViewport.js +1 -1
  181. package/hooks/useInfiniteScroll.js +1 -1
  182. package/hooks/useIntersectionObserver.js +4 -6
  183. package/hooks/useIntersectionObservers.js +5 -32
  184. package/hooks/useInterval.js +1 -1
  185. package/hooks/useIsFirstRender.js +1 -1
  186. package/hooks/useIsomorphicLayoutEffect.js +1 -1
  187. package/hooks/useKeyPress.js +1 -1
  188. package/hooks/useKeyboardEvent.js +1 -1
  189. package/hooks/useLatest.js +1 -1
  190. package/hooks/useListenWindowResize.js +1 -1
  191. package/hooks/useLocalStorageState.js +1 -1
  192. package/hooks/useLockFn.js +1 -1
  193. package/hooks/useLongPress.js +1 -1
  194. package/hooks/useMap.js +1 -1
  195. package/hooks/useMedia.js +1 -1
  196. package/hooks/useMemo.js +1 -1
  197. package/hooks/useMemoizedFn.js +1 -1
  198. package/hooks/useMergeProps.js +1 -1
  199. package/hooks/useMergeValue.js +4 -3
  200. package/hooks/useMount.js +1 -1
  201. package/hooks/useMouse.js +1 -1
  202. package/hooks/useMove.js +11 -0
  203. package/hooks/useMutationObserver.js +1 -1
  204. package/hooks/useMutationObservers.js +5 -4
  205. package/hooks/useNetwork.js +1 -1
  206. package/hooks/useOnlineStatus.js +1 -1
  207. package/hooks/useOverflowHidden.js +1 -1
  208. package/hooks/useOverrideRef.js +1 -1
  209. package/hooks/usePagination.js +1 -1
  210. package/hooks/usePasteImage.js +9 -0
  211. package/hooks/usePersistCallback.js +1 -1
  212. package/hooks/usePrefersColorSchemeDark.js +1 -1
  213. package/hooks/usePrevious.js +1 -1
  214. package/hooks/useRafInterval.js +1 -1
  215. package/hooks/useRafState.js +1 -1
  216. package/hooks/useRafTimeout.js +1 -1
  217. package/hooks/useReactive.js +1 -1
  218. package/hooks/useRefLatest.js +1 -1
  219. package/hooks/useRefs.js +1 -1
  220. package/hooks/useRequest.js +1 -1
  221. package/hooks/useResetState.js +1 -1
  222. package/hooks/useResizeObserver.js +1 -1
  223. package/hooks/useResizeObservers.js +5 -4
  224. package/hooks/useResponsive.js +1 -1
  225. package/hooks/useSafeState.js +1 -1
  226. package/hooks/useScroll.js +1 -1
  227. package/hooks/useSelections.js +1 -1
  228. package/hooks/useSessionStorageState.js +1 -1
  229. package/hooks/useSet.js +1 -1
  230. package/hooks/useSetState.js +1 -1
  231. package/hooks/useSize.js +1 -1
  232. package/hooks/useStateCallback.js +1 -1
  233. package/hooks/useStateWithPromise.js +1 -1
  234. package/hooks/useSyncState.js +1 -1
  235. package/hooks/useTextSelection.js +1 -1
  236. package/hooks/useTheme.js +1 -1
  237. package/hooks/useThrottle.js +1 -1
  238. package/hooks/useThrottleEffect.js +1 -1
  239. package/hooks/useThrottleFn.js +1 -1
  240. package/hooks/useTimeout.js +1 -1
  241. package/hooks/useTitle.js +1 -1
  242. package/hooks/useToggle.js +1 -1
  243. package/hooks/useTrackedEffect.js +1 -1
  244. package/hooks/useUnmount.js +1 -1
  245. package/hooks/useUnmountedRef.js +1 -1
  246. package/hooks/useUpdate.js +1 -1
  247. package/hooks/useUpdateEffect.js +1 -1
  248. package/hooks/useUpdateLayoutEffect.js +1 -1
  249. package/hooks/useUrlState.js +1 -1
  250. package/hooks/useVirtualList.js +1 -1
  251. package/hooks/useWatch.js +1 -1
  252. package/hooks/useWebSocket.js +1 -1
  253. package/hooks/useWhyDidYouUpdate.js +1 -1
  254. package/hooks/useWindowSize.js +1 -1
  255. package/hooks/utils/createEffectWithTarget.js +1 -1
  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 +1 -1
  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/hooks/utils.js +1 -1
  270. package/icons/file/index.js +1 -1
  271. package/icons/file.js +1 -1
  272. package/index.js +635 -48
  273. package/motion/CSSMotion.js +1 -1
  274. package/motion/CSSMotionList.js +1 -1
  275. package/motion/context.js +1 -1
  276. package/motion/hooks/useDomMotionEvents.js +1 -1
  277. package/motion/hooks/useNextFrame.js +1 -1
  278. package/motion/hooks/useStatus.js +1 -1
  279. package/motion/hooks/useStepQueue.js +1 -1
  280. package/motion/index.js +1 -1
  281. package/motion/interface.js +1 -1
  282. package/motion/util/diff.js +1 -1
  283. package/motion/util/motion.js +11 -10
  284. package/package.json +1 -1
  285. package/progress/index.js +40 -53
  286. package/resize-observer/Collection.js +1 -1
  287. package/resize-observer/SingleObserver.js +1 -1
  288. package/resize-observer/index.js +1 -1
  289. package/resize-observer/observerUtil.js +1 -1
  290. package/space/index.js +79 -88
  291. package/style.css +1 -1
  292. package/suspense-fallback-test/index.js +1 -1
  293. package/transition-group/CSSTransition.js +36 -35
  294. package/transition-group/ChildMapping.js +1 -1
  295. package/transition-group/PqbCSSTransition.js +1 -1
  296. package/transition-group/ReplaceTransition.js +1 -1
  297. package/transition-group/SwitchTransition.js +1 -1
  298. package/transition-group/Transition.js +2 -1
  299. package/transition-group/TransitionGroup.js +1 -1
  300. package/transition-group/TransitionGroupContext.js +1 -1
  301. package/transition-group/index.js +27 -26
  302. package/types/development/interface.d.ts +3 -2
  303. package/types/flex/index.d.ts +6 -5
  304. package/types/flex/interface.d.ts +13 -12
  305. package/types/flex/utils.d.ts +19 -0
  306. package/types/hooks/index.d.ts +2 -0
  307. package/types/hooks/use-move/index.d.ts +4 -0
  308. package/types/hooks/use-paste-image/index.d.ts +3 -0
  309. package/types/hooks/use-theme/index.d.ts +2 -2
  310. package/types/index.d.ts +3 -1
  311. package/types/motion/hooks/useStepQueue.d.ts +1 -1
  312. package/types/progress/index.d.ts +0 -28
  313. package/types/space/index.d.ts +4 -4
  314. package/types/space/interface.d.ts +17 -10
  315. package/types/transition-group/index.d.ts +10 -10
  316. package/types/utils/date.d.ts +1 -1
  317. package/types/utils/dom.d.ts +8 -9
  318. package/types/utils/findRootElement.d.ts +2 -2
  319. package/types/utils/is.d.ts +3 -2
  320. package/types/utils/ref.d.ts +11 -11
  321. package/types/utils/scrollIntoViewIfNeeded.d.ts +1 -1
  322. package/types/utils/tree.d.ts +1 -1
  323. package/types/utils/uuid.d.ts +1 -1
  324. package/types/utils/validate.d.ts +2 -1
  325. package/utils/callbackOriginRef.js +1 -1
  326. package/utils/caseName.js +1 -1
  327. package/utils/className.js +1 -1
  328. package/utils/compute.js +1 -1
  329. package/utils/constant.js +1 -1
  330. package/utils/copy.js +1 -1
  331. package/utils/date.js +8 -2
  332. package/utils/dayjs.js +1 -1
  333. package/utils/dom.js +19 -25
  334. package/utils/emitter.js +1 -1
  335. package/utils/fileToURL.js +1 -1
  336. package/utils/fillNBSP.js +1 -1
  337. package/utils/findRootElement.js +15 -15
  338. package/utils/findScrollParent.js +1 -1
  339. package/utils/getHighlightText.js +1 -1
  340. package/utils/getHotkeyHandler.js +1 -1
  341. package/utils/getStringLength.js +1 -1
  342. package/utils/include.js +6 -6
  343. package/utils/index.js +355 -323
  344. package/utils/intersectionObserver.js +1 -1
  345. package/utils/is.js +113 -76
  346. package/utils/keyboardCode.js +1 -1
  347. package/utils/lodash.js +1 -1
  348. package/utils/math.js +1 -1
  349. package/utils/mergeProps.js +1 -1
  350. package/utils/mergedToString.js +1 -1
  351. package/utils/mutationObserver.js +1 -1
  352. package/utils/omit.js +1 -1
  353. package/utils/pad.js +1 -1
  354. package/utils/pick.js +1 -1
  355. package/utils/pinyin.js +1 -1
  356. package/utils/react19Adapter.js +1 -1
  357. package/utils/ref.js +1 -1
  358. package/utils/resizeObserver.js +1 -1
  359. package/utils/saveAs.js +1 -1
  360. package/utils/screenfull.js +1 -1
  361. package/utils/scrollIntoViewIfNeeded.js +1 -1
  362. package/utils/setCreateRoot.js +1 -1
  363. package/utils/setDarkTheme.js +1 -1
  364. package/utils/setDir.js +1 -1
  365. package/utils/setPrimaryColor.js +1 -1
  366. package/utils/setTheme.js +1 -1
  367. package/utils/string.js +1 -1
  368. package/utils/style.js +1 -1
  369. package/utils/throttleByRaf.js +1 -1
  370. package/utils/throttleByRaf2.js +1 -1
  371. package/utils/tinycolor.js +1 -1
  372. package/utils/toArray.js +1 -1
  373. package/utils/tree.js +7 -9
  374. package/utils/tween.js +1 -1
  375. package/utils/uuid.js +5 -4
  376. package/utils/validate.js +14 -16
  377. package/utils/warning.js +1 -1
  378. package/flex/interface.js +0 -10
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useState as S, useRef as T, useMemo as _ } from "react";
3
3
  import k from "../use-event-listener/index.js";
4
4
  import s from "../use-memoized-fn/index.js";
@@ -13,39 +13,44 @@ const et = (H, v = {}) => {
13
13
  isNoMore: g,
14
14
  threshold: p = 100,
15
15
  direction: B = "bottom",
16
- reloadDeps: w = [],
17
- manual: C,
18
- onBefore: L,
19
- onSuccess: R,
20
- onError: b,
21
- onFinally: j
22
- } = v, [o, l] = S(), [a, n] = S(!1), i = B === "top", u = T(void 0), D = T(0), m = _(() => g ? g(o) : !1, [o]), { loading: y, error: q, run: f, runAsync: x, cancel: z } = G(
16
+ reloadDeps: q = [],
17
+ manual: w,
18
+ onBefore: C,
19
+ onSuccess: L,
20
+ onError: R,
21
+ onFinally: b
22
+ } = v, [o, a] = S(), [l, n] = S(!1), i = B === "top", u = T(void 0), D = T(0), m = _(() => g ? g(o) : !1, [o]), { loading: y, error: j, run: f, runAsync: x, cancel: z } = G(
23
23
  async (t) => ({ currentData: await H(t), lastData: t }),
24
24
  {
25
- manual: C,
25
+ manual: w,
26
26
  onFinally: (t, e, r) => {
27
- n(!1), j?.(e?.currentData, r);
27
+ n(!1), b?.(e?.currentData, r);
28
28
  },
29
- onBefore: () => L?.(),
29
+ onBefore: () => C?.(),
30
30
  onSuccess: (t) => {
31
- t.lastData ? l({
31
+ t.lastData ? a({
32
32
  ...t.currentData,
33
33
  list: i ? [...t.currentData.list, ...t.lastData.list ?? []] : [...t.lastData.list ?? [], ...t.currentData.list]
34
- }) : l({
34
+ }) : a({
35
35
  ...t.currentData,
36
36
  list: [...t.currentData.list ?? []]
37
37
  }), setTimeout(() => {
38
- if (i) {
39
- let e = A(c);
40
- if (e = e === document ? document.documentElement : e, e) {
41
- const r = F(e);
42
- e.scrollTo(0, r - D.current);
43
- }
44
- } else
45
- h();
46
- }), R?.(t.currentData);
38
+ requestAnimationFrame(() => {
39
+ if (i) {
40
+ let e = A(c);
41
+ if (e = e === document ? document.documentElement : e, e) {
42
+ const r = F(e);
43
+ e.scrollTo(
44
+ 0,
45
+ r - D.current
46
+ );
47
+ }
48
+ } else
49
+ h();
50
+ });
51
+ }), L?.(t.currentData);
47
52
  },
48
- onError: (t) => b?.(t)
53
+ onError: (t) => R?.(t)
49
54
  }
50
55
  ), d = s(() => {
51
56
  m || (n(!0), f(o));
@@ -59,22 +64,22 @@ const et = (H, v = {}) => {
59
64
  return k(
60
65
  "scroll",
61
66
  () => {
62
- y || a || h();
67
+ y || l || h();
63
68
  },
64
69
  { target: c }
65
70
  ), J(() => {
66
71
  f();
67
- }, [...w]), {
72
+ }, [...q]), {
68
73
  data: o,
69
- loading: !a && y,
70
- error: q,
71
- loadingMore: a,
74
+ loading: !l && y,
75
+ error: j,
76
+ loadingMore: l,
72
77
  noMore: m,
73
78
  loadMore: d,
74
79
  loadMoreAsync: I,
75
80
  reload: s(N),
76
81
  reloadAsync: s(P),
77
- mutate: l,
82
+ mutate: a,
78
83
  cancel: z
79
84
  };
80
85
  };
@@ -1,18 +1,16 @@
1
- /* 2025-11-27 12:10:58 */
2
- import { useRef as i } from "react";
3
- import "@unicom-cloud/utils/dom-helpers/canUseDOM";
4
- import "@unicom-cloud/utils/dom-helpers/reflow";
5
- import { isServerRendering as c } from "../../utils/is.js";
1
+ /* 2025-12-17 18:27:04 */
2
+ import { useRef as c } from "react";
3
+ import { isServerRendering as i } from "../../utils/is.js";
6
4
  import { isUndefined as u } from "@unicom-cloud/utils/is";
7
- const v = !c && !u(window?.IntersectionObserver);
8
- function O(n, o = {}) {
9
- const r = i(void 0), e = () => {
5
+ const v = !i && !u(window?.IntersectionObserver);
6
+ function O(t, o = {}) {
7
+ const r = c(void 0), e = () => {
10
8
  r.current && (r.current.disconnect(), r.current = null);
11
- }, s = (t) => {
12
- t && (e(), v && (r.current = new IntersectionObserver(
13
- n,
9
+ }, s = (n) => {
10
+ n && (e(), v && (r.current = new IntersectionObserver(
11
+ t,
14
12
  o
15
- ), r.current.observe(t)));
13
+ ), r.current.observe(n)));
16
14
  };
17
15
  return {
18
16
  observer: r.current,
@@ -1,20 +1,8 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import v from "lodash/throttle";
3
3
  import { useState as d, useDeferredValue as E, useEffect as O } from "react";
4
- import "react-is";
5
- import "../../utils/is.js";
6
- import "@unicom-cloud/utils/case-name";
7
- import "@unicom-cloud/utils/class-name";
8
4
  import { NOOP as s } from "../../utils/constant.js";
9
- import "@unicom-cloud/utils/clipboard-copy";
10
- import "@unicom-cloud/utils/date";
11
- import "../../utils/dayjs.js";
12
- import "@unicom-cloud/utils/dom-helpers/canUseDOM";
13
- import "@unicom-cloud/utils/dom-helpers/reflow";
14
- import "@unicom-cloud/utils/emitter";
15
- import "@unicom-cloud/utils/file/fileToURL";
16
- import "../../utils/findRootElement.js";
17
- import "lodash/escapeRegExp";
5
+ import "../../utils/is.js";
18
6
  import "lodash/assign";
19
7
  import "lodash/assignIn";
20
8
  import "lodash/at";
@@ -74,24 +62,9 @@ import "lodash/upperFirst";
74
62
  import "lodash/without";
75
63
  import "lodash/xor";
76
64
  import "lodash/zip";
77
- import "@unicom-cloud/utils/math";
78
- import "@unicom-cloud/utils/pinyin";
79
- import "@unicom-cloud/utils/file/saveAs";
80
- import "@unicom-cloud/utils/screenfull";
81
- import "../../utils/setCreateRoot.js";
82
- import "@unicom-cloud/utils/constant/ui";
83
- import "@unicom-cloud/utils/constant/ui.js";
84
- import "@unicom-cloud/utils/tinycolor";
85
- import "@unicom-cloud/utils/ui-color";
86
- import "@unicom-cloud/utils/string";
87
- import "@unicom-cloud/utils/tree";
88
- import "@unicom-cloud/utils/tween";
89
- import "uuid";
90
- import "@unicom-cloud/utils/validate";
91
- import "@unicom-cloud/utils/constant/keyboardCode";
92
65
  import k from "../use-latest/index.js";
93
66
  import { isFunction as C } from "@unicom-cloud/utils/is";
94
- function nr(c, i = [], f = {}) {
67
+ function jt(c, i = [], f = {}) {
95
68
  const { immediate: m, ...a } = f, [u, l] = d(), b = E(u), h = k(c);
96
69
  return O(() => {
97
70
  if (!(i.length || m)) return s;
@@ -116,6 +89,6 @@ function nr(c, i = [], f = {}) {
116
89
  }, i), b;
117
90
  }
118
91
  export {
119
- nr as default,
120
- nr as useIntersectionObservers
92
+ jt as default,
93
+ jt as useIntersectionObservers
121
94
  };
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useRef as u, useCallback as c, useEffect as f } from "react";
3
3
  import "../../utils/is.js";
4
4
  import o from "../use-memoized-fn/index.js";
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useRef as r, useEffect as t } from "react";
3
3
  function u() {
4
4
  const e = r(!0);
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useLayoutEffect as o, useEffect as t } from "react";
3
3
  import { isBrowser as e } from "@unicom-cloud/utils/constant/platform";
4
4
  const s = e ? o : t;
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import "../../utils/is.js";
3
3
  import l from "../use-latest/index.js";
4
4
  import { getTargetElement as k } from "../utils/domTarget.js";
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { Enter as t, ArrowDown as i, ArrowLeft as w, ArrowRight as f, ArrowUp as y } from "@unicom-cloud/utils/constant/keyboardCode";
3
3
  import { useCallback as A } from "react";
4
4
  function E(n) {
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useRef as r } from "react";
3
3
  function n(t) {
4
4
  const e = r(t);
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useEffect as i } from "react";
3
3
  function o(e, n = []) {
4
4
  i(() => (window.addEventListener("resize", e), window.addEventListener("orientationchange", e), () => {
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import o from "../create-use-storage-state/index.js";
3
3
  import { isBrowser as t } from "@unicom-cloud/utils/constant/platform";
4
4
  const a = o(
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useRef as n, useCallback as u } from "react";
3
3
  function o(e) {
4
4
  const r = n(!1);
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useRef as s } from "react";
3
3
  import v from "../use-latest/index.js";
4
4
  import { getTargetElement as D } from "../utils/domTarget.js";
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useState as f } from "react";
3
3
  import t from "../use-memoized-fn/index.js";
4
4
  function d(c) {
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useState as o, useEffect as i } from "react";
3
3
  const r = (t, e) => e !== void 0 ? e : window.matchMedia(t).matches, d = (t, e) => {
4
4
  const [c, a] = o(r(t, e));
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import n from "react";
3
3
  function o(t, r, u) {
4
4
  const e = n.useRef({});
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useRef as t, useMemo as n } from "react";
3
3
  import "../../utils/is.js";
4
4
  import u from "../utils/isDev.js";
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useMemo as m } from "react";
3
3
  import { omit as u } from "../../utils/omit.js";
4
4
  function c(r, e, i = {}) {
@@ -1,20 +1,17 @@
1
- /* 2025-11-27 12:10:58 */
2
- import { useRef as n, useState as c, useEffect as m } from "react";
1
+ /* 2025-12-17 18:27:04 */
2
+ import { useState as n, useEffect as m } from "react";
3
3
  import "../../utils/is.js";
4
- import d from "../use-previous/index.js";
4
+ import d from "../use-is-first-render/index.js";
5
+ import p from "../use-previous/index.js";
5
6
  import { isUndefined as r } from "@unicom-cloud/utils/is";
6
- function R(i, l) {
7
- const { defaultValue: u, value: e } = l || {}, s = n(!0), f = d(e), [o, a] = c(() => {
7
+ function R(f, a) {
8
+ const { defaultValue: s, value: e } = a || {}, l = d(), u = p(e), [o, i] = n(() => {
8
9
  let t = e;
9
- return r(e) ? r(u) ? t = i : t = u : t = e, t;
10
+ return r(e) ? r(s) ? t = f : t = s : t = e, t;
10
11
  });
11
12
  return m(() => {
12
- if (s.current) {
13
- s.current = !1;
14
- return;
15
- }
16
- e === void 0 && (f === e || a(e));
17
- }, [f, e]), [r(e) ? o : e, a, o];
13
+ l || e === void 0 && (u === e || i(e));
14
+ }, [u, e]), [r(e) ? o : e, i, o];
18
15
  }
19
16
  export {
20
17
  R as default
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useEffect as t } from "react";
3
3
  import "../../utils/is.js";
4
4
  import e from "../utils/isDev.js";
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import p from "../use-event-listener/index.js";
3
3
  import P from "../use-raf-state/index.js";
4
4
  import { getTargetElement as d } from "../utils/domTarget.js";
@@ -0,0 +1,79 @@
1
+ /* 2025-12-17 18:27:04 */
2
+ import { useState as k, useRef as F, useEffect as v } from "react";
3
+ import { on as m, off as g } from "../../utils/dom.js";
4
+ import { findRootElement as w } from "../../utils/findRootElement.js";
5
+ import { isElementByInstanceof as X } from "../../utils/is.js";
6
+ import I from "../use-update/index.js";
7
+ import { isPlainObject as L } from "@unicom-cloud/utils/is";
8
+ function Y() {
9
+ return {
10
+ screenX: 0,
11
+ screenY: 0,
12
+ translateX: 0,
13
+ translateY: 0,
14
+ boundingClientRect: null,
15
+ offsetParentBoundingClientRect: null
16
+ };
17
+ }
18
+ function K(o, i = !1) {
19
+ let {
20
+ trigger: n,
21
+ target: r,
22
+ draggable: l = !0
23
+ } = { trigger: null, target: null, draggable: !0 };
24
+ L(o) && ("trigger" in o || "target" in o) ? (n = w(o.trigger), r = w(o.target), l = o.draggable ?? l) : n = r = w(o), n ||= r, r ||= n;
25
+ const s = document.documentElement, [x, b] = k(i ? { translate: void 0 } : {}), B = I(), d = F(Y());
26
+ function E(t) {
27
+ if (!X(r)) return;
28
+ t.preventDefault();
29
+ const e = d.current, a = window.getComputedStyle(r).transform.split(",");
30
+ a.length > 1 && (e.translateX = parseFloat(a.at(-2)) || e.translateX, e.translateY = parseFloat(a.at(-1)) || e.translateY), e.screenX = t.screenX, e.screenY = t.screenY, e.boundingClientRect = r.getBoundingClientRect();
31
+ const u = r.parentElement;
32
+ e.offsetParentBoundingClientRect = u ? u.getBoundingClientRect() : new DOMRect(), y();
33
+ }
34
+ function D(t) {
35
+ if (!(t instanceof Event)) return;
36
+ t.preventDefault();
37
+ const e = d.current, { left: a, right: u, top: O, bottom: H } = e.boundingClientRect || new DOMRect(), {
38
+ left: P,
39
+ right: $,
40
+ top: R,
41
+ bottom: j,
42
+ width: S,
43
+ height: U
44
+ } = e.offsetParentBoundingClientRect || new DOMRect();
45
+ let c = Math.max(t.screenX - e.screenX, -(a - P));
46
+ c = Math.min(c, P + S - u);
47
+ let f = Math.max(t.screenY - e.screenY, -(O - R));
48
+ f = Math.min(f, R + U - H), c += e.translateX, f += e.translateY;
49
+ const C = `translate(${c}px, ${f}px)`;
50
+ i ? b({ translate: C }) : X(r) && (r.style.transform = C);
51
+ }
52
+ function h(t) {
53
+ t.preventDefault(), p();
54
+ }
55
+ function M(t) {
56
+ d.current = Y(), i ? b({}) : D(new MouseEvent("mousemove"));
57
+ }
58
+ function y() {
59
+ p(), m(s, "mousemove", D), m(s, "mouseup", h);
60
+ }
61
+ function p() {
62
+ g(s, "mousemove", D), g(s, "mouseup", h);
63
+ }
64
+ if (v(() => {
65
+ if (n && l)
66
+ return m(n, "mousedown", E), m(n, "dblclick", M), () => {
67
+ g(n, "mousedown", E), g(n, "dblclick", M);
68
+ };
69
+ }, [n, l]), v(() => () => {
70
+ M(), p();
71
+ }, []), v(() => (setTimeout(() => {
72
+ B();
73
+ }, 227), () => {
74
+ }), []), i)
75
+ return x;
76
+ }
77
+ export {
78
+ K as default
79
+ };
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import a from "../use-latest/index.js";
3
3
  import { getTargetElement as c } from "../utils/domTarget.js";
4
4
  import m from "../utils/useDeepCompareWithTarget.js";
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import h from "lodash/throttle";
3
3
  import { useState as v, useDeferredValue as O, useEffect as E } from "react";
4
4
  import "react-is";
@@ -10,6 +10,7 @@ import "@unicom-cloud/utils/clipboard-copy";
10
10
  import "@unicom-cloud/utils/date";
11
11
  import "../../utils/dayjs.js";
12
12
  import "@unicom-cloud/utils/dom-helpers/canUseDOM";
13
+ import "@unicom-cloud/utils/dom-helpers/getElementCoordinates";
13
14
  import "@unicom-cloud/utils/dom-helpers/reflow";
14
15
  import "@unicom-cloud/utils/emitter";
15
16
  import "@unicom-cloud/utils/file/fileToURL";
@@ -91,7 +92,7 @@ import "@unicom-cloud/utils/validate";
91
92
  import "@unicom-cloud/utils/constant/keyboardCode";
92
93
  import k from "../use-latest/index.js";
93
94
  import { isFunction as C } from "@unicom-cloud/utils/is";
94
- function nr(c, o = [], u = {}) {
95
+ function sr(c, o = [], u = {}) {
95
96
  const { immediate: i, ...a } = u, [f, l] = v(), b = O(f), d = k(c);
96
97
  return E(() => {
97
98
  if (!(o.length || i)) return s;
@@ -119,6 +120,6 @@ function nr(c, o = [], u = {}) {
119
120
  }, o), b;
120
121
  }
121
122
  export {
122
- nr as default,
123
- nr as useMutationObservers
123
+ sr as default,
124
+ sr as useMutationObservers
124
125
  };
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useState as f, useEffect as l } from "react";
3
3
  import "../../utils/is.js";
4
4
  import { isObject as v } from "@unicom-cloud/utils/is";
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useSyncExternalStore as n, useDebugValue as i } from "react";
3
3
  function t(e) {
4
4
  return window.addEventListener("online", e), window.addEventListener("offline", e), () => {
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useRef as d, useEffect as f } from "react";
3
3
  function a(o, { hidden: s }) {
4
4
  const c = d(!1), r = d({}), u = (t) => t === document.body || t.tagName?.toLowerCase?.() === "body" ? window.innerWidth - (document.body.clientWidth || document.documentElement.clientWidth) : t.offsetWidth - t.clientWidth, l = () => {
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import f, { useCallback as l, isValidElement as u, cloneElement as c } from "react";
3
3
  import { callbackOriginRef as a } from "../../utils/callbackOriginRef.js";
4
4
  import { supportRef as m } from "../../utils/ref.js";
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useMemo as M } from "react";
3
3
  import s from "../use-memoized-fn/index.js";
4
4
  import x from "../use-request/src/useRequest.js";
@@ -0,0 +1,20 @@
1
+ /* 2025-12-17 18:27:04 */
2
+ import { useState as l, useEffect as d } from "react";
3
+ import "../../utils/is.js";
4
+ import y from "../use-latest/index.js";
5
+ import { isArray as A, isEmptyArray as E, isFunction as b } from "@unicom-cloud/utils/is";
6
+ function F(a, i = []) {
7
+ const n = y(a), [o, m] = l([]);
8
+ return d(() => {
9
+ function r(c) {
10
+ const u = c.clipboardData.items, t = Array.from(u).filter((e, f, p) => e.kind === "file" && e.type.startsWith("image/")).map((e, f, p) => e.getAsFile()), s = n.current;
11
+ A(t) && !E(t) && b(s) && s(t), m(t);
12
+ }
13
+ return document.addEventListener("paste", r), () => {
14
+ document.removeEventListener("paste", r);
15
+ };
16
+ }, i), o;
17
+ }
18
+ export {
19
+ F as default
20
+ };
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useRef as u, useCallback as s } from "react";
3
3
  function c(r) {
4
4
  const e = u(r);
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { MATCH_MEDIA_PREFERS_COLOR_SCHEME_DARK as e } from "@unicom-cloud/utils/constant";
3
3
  import { useState as o, useEffect as s } from "react";
4
4
  function m() {
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useRef as t, useEffect as u } from "react";
3
3
  function n(r) {
4
4
  const e = t(void 0);
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useRef as s, useCallback as m, useEffect as u } from "react";
3
3
  import "../../utils/is.js";
4
4
  import f from "../use-latest/index.js";
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useRef as s, useState as u, useCallback as c } from "react";
3
3
  import m from "../use-unmount/index.js";
4
4
  function l(e) {
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useRef as u, useCallback as m, useEffect as s } from "react";
3
3
  import "../../utils/is.js";
4
4
  import c from "../use-latest/index.js";
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useRef as y } from "react";
3
3
  import "../../utils/is.js";
4
4
  import d from "../use-creation/index.js";
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import e from "../use-latest/index.js";
3
3
  export {
4
4
  e as default
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useRef as f } from "react";
3
3
  function c(s = []) {
4
4
  const r = f(s), u = (t, e) => {
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import r from "./src/useRequest.js";
3
3
  import { clearCache as a } from "./src/utils/cache.js";
4
4
  export {
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import "../../../utils/is.js";
3
3
  import { isFunction as u } from "@unicom-cloud/utils/is";
4
4
  class c {
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useRef as s } from "react";
3
3
  import o from "../../../use-update-effect/index.js";
4
4
  const l = (r, {
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useRef as l } from "react";
3
3
  import C from "../../../use-creation/index.js";
4
4
  import w from "../../../use-unmount/index.js";
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import l from "lodash/debounce";
3
3
  import { useRef as p, useMemo as v, useEffect as y } from "react";
4
4
  const P = (n, { debounceWait: o, debounceLeading: s, debounceTrailing: u, debounceMaxWait: i }) => {
@@ -1,4 +1,4 @@
1
- /* 2025-11-27 12:10:58 */
1
+ /* 2025-12-17 18:27:04 */
2
2
  import { useRef as u } from "react";
3
3
  const a = (n, { loadingDelay: t, ready: o }) => {
4
4
  const e = u(void 0);