@unicom-cloud/ui-common 0.1.18 → 0.1.19
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.
- package/.virtual/_rolldown/runtime.js +1 -1
- package/.vite/manifest.json +86 -171
- package/development/index.js +1 -1
- package/empty/index.js +1 -1
- package/flex/index.js +1 -1
- package/flex/utils.js +1 -1
- package/higher-order/index.js +1 -1
- package/higher-order/with-speech-synthesis/index.js +1 -1
- package/hooks/create-deep-compare-effect/index.js +1 -1
- package/hooks/create-update-effect/index.js +1 -1
- package/hooks/create-use-storage-state/index.d.ts +2 -1
- package/hooks/create-use-storage-state/index.js +44 -35
- package/hooks/index.js +1 -1
- package/hooks/use-async-effect/index.js +1 -1
- package/hooks/use-boolean/index.js +1 -1
- package/hooks/use-click-away/index.js +1 -1
- package/hooks/use-computed-state/index.js +1 -1
- package/hooks/use-controllable-value/index.js +1 -1
- package/hooks/use-cookie-state/index.js +1 -1
- package/hooks/use-count-down/index.js +1 -1
- package/hooks/use-counter/index.js +1 -1
- package/hooks/use-create/index.js +1 -1
- package/hooks/use-creation/index.js +1 -1
- package/hooks/use-debounce/index.js +1 -1
- package/hooks/use-debounce-effect/index.js +1 -1
- package/hooks/use-debounce-fn/index.js +1 -1
- package/hooks/use-deep-compare-effect/index.js +1 -1
- package/hooks/use-deep-compare-layout-effect/index.js +1 -1
- package/hooks/use-document-visibility/index.js +1 -1
- package/hooks/use-drag/index.js +1 -1
- package/hooks/use-drop/index.js +1 -1
- package/hooks/use-effect-event/index.js +1 -1
- package/hooks/use-event/index.js +1 -1
- package/hooks/use-event-listener/index.d.ts +3 -2
- package/hooks/use-event-listener/index.js +1 -1
- package/hooks/use-event-target/index.js +1 -1
- package/hooks/use-external/index.js +1 -1
- package/hooks/use-favicon/index.js +1 -1
- package/hooks/use-focus-within/index.js +1 -1
- package/hooks/use-force-update/index.js +1 -1
- package/hooks/use-fullscreen/index.js +1 -1
- package/hooks/use-get-state/index.js +1 -1
- package/hooks/use-history-travel/index.js +1 -1
- package/hooks/use-hover/index.js +1 -1
- package/hooks/use-id/index.js +1 -1
- package/hooks/use-in-view/index.js +1 -1
- package/hooks/use-in-viewport/index.js +1 -1
- package/hooks/use-infinite-scroll/index.js +1 -1
- package/hooks/use-intersection-observer/index.js +1 -1
- package/hooks/use-intersection-observers/index.js +25 -25
- package/hooks/use-interval/index.js +1 -1
- package/hooks/use-is-first-render/index.js +1 -1
- package/hooks/use-isomorphic-layout-effect/index.js +1 -1
- package/hooks/use-key-press/index.js +1 -1
- package/hooks/use-keyboard-event/index.js +1 -1
- package/hooks/use-latest/index.js +1 -1
- package/hooks/use-listen-window-resize/index.js +1 -1
- package/hooks/use-local-storage-state/index.js +1 -1
- package/hooks/use-lock-fn/index.js +1 -1
- package/hooks/use-long-press/index.js +1 -1
- package/hooks/use-map/index.js +1 -1
- package/hooks/use-media/index.js +1 -1
- package/hooks/use-memo/index.js +1 -1
- package/hooks/use-memoized-fn/index.js +1 -1
- package/hooks/use-merge-props/index.js +1 -1
- package/hooks/use-merge-value/index.js +1 -1
- package/hooks/use-mobile/index.js +1 -1
- package/hooks/use-mount/index.js +1 -1
- package/hooks/use-mouse/index.js +1 -1
- package/hooks/use-move/index.js +1 -1
- package/hooks/use-mutation-observer/index.js +1 -1
- package/hooks/use-mutation-observers/index.js +24 -24
- package/hooks/use-network/index.js +1 -1
- package/hooks/use-online-status/index.js +1 -1
- package/hooks/use-overflow-hidden/index.js +17 -16
- package/hooks/use-override-ref/index.js +1 -1
- package/hooks/use-pagination/index.js +1 -1
- package/hooks/use-paste-image/index.js +1 -1
- package/hooks/use-persist-callback/index.js +1 -1
- package/hooks/use-prefers-color-scheme-dark/index.js +1 -1
- package/hooks/use-previous/index.js +1 -1
- package/hooks/use-raf-interval/index.js +1 -1
- package/hooks/use-raf-state/index.js +1 -1
- package/hooks/use-raf-timeout/index.js +1 -1
- package/hooks/use-reactive/index.js +1 -1
- package/hooks/use-ref-latest/index.js +1 -1
- package/hooks/use-refs/index.js +1 -1
- package/hooks/use-request/index.js +1 -1
- package/hooks/use-request/src/Fetch.js +1 -1
- package/hooks/use-request/src/plugins/useAutoRunPlugin.js +1 -1
- package/hooks/use-request/src/plugins/useCachePlugin.js +1 -1
- package/hooks/use-request/src/plugins/useDebouncePlugin.js +1 -1
- package/hooks/use-request/src/plugins/useLoadingDelayPlugin.js +1 -1
- package/hooks/use-request/src/plugins/usePollingPlugin.js +1 -1
- package/hooks/use-request/src/plugins/useRefreshOnWindowFocusPlugin.js +1 -1
- package/hooks/use-request/src/plugins/useRetryPlugin.js +1 -1
- package/hooks/use-request/src/plugins/useThrottlePlugin.js +1 -1
- package/hooks/use-request/src/useRequest.d.ts +6 -2
- package/hooks/use-request/src/useRequest.js +1 -1
- package/hooks/use-request/src/useRequestImplement.js +1 -1
- package/hooks/use-request/src/utils/cache.js +1 -1
- package/hooks/use-request/src/utils/cachePromise.js +1 -1
- package/hooks/use-request/src/utils/cacheSubscribe.js +1 -1
- package/hooks/use-request/src/utils/isDocumentVisible.js +1 -1
- package/hooks/use-request/src/utils/isOnline.js +1 -1
- package/hooks/use-request/src/utils/limit.js +1 -1
- package/hooks/use-request/src/utils/subscribeFocus.js +1 -1
- package/hooks/use-request/src/utils/subscribeReVisible.js +1 -1
- package/hooks/use-reset-state/index.js +1 -1
- package/hooks/use-resize-observer/index.js +1 -1
- package/hooks/use-resize-observers/index.js +25 -25
- package/hooks/use-responsive/index.js +1 -1
- package/hooks/use-safe-state/index.js +1 -1
- package/hooks/use-scroll/index.js +1 -1
- package/hooks/use-selections/index.js +1 -1
- package/hooks/use-session-storage-state/index.js +1 -1
- package/hooks/use-set/index.js +1 -1
- package/hooks/use-set-state/index.js +1 -1
- package/hooks/use-size/index.js +1 -1
- package/hooks/use-state-callback/index.js +1 -1
- package/hooks/use-state-with-promise/index.js +1 -1
- package/hooks/use-sync-state/index.js +1 -1
- package/hooks/use-text-selection/index.js +1 -1
- package/hooks/use-theme/index.js +1 -1
- package/hooks/use-throttle/index.js +1 -1
- package/hooks/use-throttle-effect/index.js +1 -1
- package/hooks/use-throttle-fn/index.js +1 -1
- package/hooks/use-timeout/index.js +1 -1
- package/hooks/use-title/index.js +1 -1
- package/hooks/use-toggle/index.js +1 -1
- package/hooks/use-tracked-effect/index.js +1 -1
- package/hooks/use-unmount/index.js +1 -1
- package/hooks/use-unmounted-ref/index.js +1 -1
- package/hooks/use-update/index.js +1 -1
- package/hooks/use-update-effect/index.js +1 -1
- package/hooks/use-update-layout-effect/index.js +1 -1
- package/hooks/use-url-state/index.js +1 -1
- package/hooks/use-virtual-list/index.js +1 -1
- package/hooks/use-watch/index.js +1 -1
- package/hooks/use-web-socket/index.js +1 -1
- package/hooks/use-why-did-you-update/index.js +1 -1
- package/hooks/use-window-size/index.js +1 -1
- package/hooks/utils/createEffectWithTarget.js +1 -1
- package/hooks/utils/depsAreSame.js +1 -1
- package/hooks/utils/depsEqual.js +1 -1
- package/hooks/utils/domTarget.js +1 -1
- package/hooks/utils/getDocumentOrShadow.js +1 -1
- package/hooks/utils/index.js +1 -1
- package/hooks/utils/isAppleDevice.js +1 -1
- package/hooks/utils/isBrowser.js +1 -1
- package/hooks/utils/isDev.js +1 -1
- package/hooks/utils/rect.js +1 -1
- package/hooks/utils/useDeepCompareWithTarget.js +1 -1
- package/hooks/utils/useEffectWithTarget.js +1 -1
- package/hooks/utils/useIsomorphicLayoutEffectWithTarget.js +1 -1
- package/hooks/utils/useLayoutEffectWithTarget.js +1 -1
- package/icons/file/index.js +1 -1
- package/index.js +487 -480
- package/package.json +1 -1
- package/progress/index.js +1 -1
- package/resize-observer/Collection.js +1 -1
- package/resize-observer/SingleObserver.js +1 -1
- package/resize-observer/index.js +2 -2
- package/resize-observer/observerUtil.js +1 -1
- package/space/index.js +1 -1
- package/style/animation.less +4 -4
- package/style.css +1 -1
- package/suspense-fallback-test/index.js +1 -1
- package/test.d.ts +0 -0
- package/test.js +5 -0
- package/timer/index.js +1 -1
- package/transition-group/ChildMapping.js +1 -1
- package/transition-group/Transition.d.ts +37 -41
- package/transition-group/Transition.js +96 -102
- package/transition-group/{CSSTransition.d.ts → TransitionCSS.d.ts} +9 -9
- package/transition-group/TransitionCSS.js +73 -0
- package/transition-group/TransitionGroup.d.ts +1 -1
- package/transition-group/TransitionGroup.js +2 -2
- package/transition-group/{ReplaceTransition.d.ts → TransitionReplace.d.ts} +5 -5
- package/transition-group/{ReplaceTransition.js → TransitionReplace.js} +2 -2
- package/transition-group/{SwitchTransition.d.ts → TransitionSwitch.d.ts} +10 -10
- package/transition-group/{SwitchTransition.js → TransitionSwitch.js} +3 -3
- package/transition-group/context.d.ts +2 -0
- package/transition-group/context.js +7 -0
- package/transition-group/index.d.ts +5 -5
- package/transition-group/index.js +6 -6
- package/utils/callOrReturn.js +1 -1
- package/utils/callbackOriginRef.js +1 -1
- package/utils/caseName.js +1 -1
- package/utils/className.js +1 -1
- package/utils/constant.js +1 -1
- package/utils/copy.js +1 -1
- package/utils/date.js +1 -1
- package/utils/dayjs.d.ts +1 -1
- package/utils/dayjs.js +19 -13
- package/utils/dom.js +15 -15
- package/utils/emitter.js +1 -1
- package/utils/fileRead.js +1 -1
- package/utils/fileToDataURL.js +1 -1
- package/utils/fillNBSP.js +1 -1
- package/utils/findRootElement.d.ts +4 -2
- package/utils/findRootElement.js +1 -1
- package/utils/findScrollParent.js +1 -1
- package/utils/getHighlightText.js +1 -1
- package/utils/getHotkeyHandler.js +1 -1
- package/utils/getScrollBarHeight.d.ts +3 -0
- package/utils/getScrollBarHeight.js +7 -0
- package/utils/getScrollBarSize.d.ts +3 -0
- package/utils/getScrollBarSize.js +10 -0
- package/utils/getScrollBarWidth.d.ts +3 -0
- package/utils/getScrollBarWidth.js +7 -0
- package/utils/getStringLength.js +1 -1
- package/utils/include.js +1 -1
- package/utils/index.d.ts +3 -0
- package/utils/index.js +221 -214
- package/utils/intersectionObserver.js +1 -1
- package/utils/is.d.ts +6 -6
- package/utils/is.js +15 -15
- package/utils/keyboardCode.js +1 -1
- package/utils/lodash.js +1 -1
- package/utils/math.js +1 -1
- package/utils/mergeProps.js +1 -1
- package/utils/mergedToString.js +1 -1
- package/utils/mutationObserver.js +1 -1
- package/utils/omit.d.ts +5 -1
- package/utils/omit.js +4 -8
- package/utils/pad.js +1 -1
- package/utils/pick.d.ts +4 -1
- package/utils/pick.js +5 -10
- package/utils/pinyin.js +1 -1
- package/utils/react19Adapter.js +1 -1
- package/utils/ref.js +1 -1
- package/utils/resizeObserver.js +21 -21
- package/utils/saveAs.js +1 -1
- package/utils/screenfull.js +1 -1
- package/utils/scrollIntoViewIfNeeded.js +1 -1
- package/utils/setCreateRoot.js +1 -1
- package/utils/setDarkTheme.js +1 -1
- package/utils/setDir.js +1 -1
- package/utils/setPrimaryColor.js +1 -1
- package/utils/setTheme.js +1 -1
- package/utils/string.js +1 -1
- package/utils/style.js +1 -1
- package/utils/throttleByRaf.js +1 -1
- package/utils/throttleByRaf2.js +1 -1
- package/utils/tinycolor.js +1 -1
- package/utils/toArray.js +1 -1
- package/utils/tree.js +1 -1
- package/utils/tween.js +1 -1
- package/utils/uuid.js +1 -1
- package/utils/validate.js +1 -1
- package/utils/warning.js +1 -1
- package/version/index.js +11 -14
- package/motion/CSSMotion.d.ts +0 -77
- package/motion/CSSMotion.js +0 -76
- package/motion/CSSMotionList.d.ts +0 -34
- package/motion/CSSMotionList.js +0 -82
- package/motion/context.d.ts +0 -9
- package/motion/context.js +0 -14
- package/motion/hooks/useDomMotionEvents.d.ts +0 -3
- package/motion/hooks/useDomMotionEvents.js +0 -19
- package/motion/hooks/useNextFrame.d.ts +0 -7
- package/motion/hooks/useNextFrame.js +0 -22
- package/motion/hooks/useStatus.d.ts +0 -5
- package/motion/hooks/useStatus.js +0 -92
- package/motion/hooks/useStepQueue.d.ts +0 -8
- package/motion/hooks/useStepQueue.js +0 -39
- package/motion/index.d.ts +0 -9
- package/motion/index.js +0 -9
- package/motion/interface.d.ts +0 -22
- package/motion/interface.js +0 -6
- package/motion/util/diff.d.ts +0 -20
- package/motion/util/diff.js +0 -50
- package/motion/util/motion.d.ts +0 -10
- package/motion/util/motion.js +0 -37
- package/transition-group/CSSTransition.js +0 -73
- package/transition-group/PqbCSSTransition.d.ts +0 -4
- package/transition-group/PqbCSSTransition.js +0 -34
- package/transition-group/TransitionGroupContext.d.ts +0 -3
- package/transition-group/TransitionGroupContext.js +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-03
|
|
1
|
+
/* 潘启宝 2026-04-03 14:07:44 星期五 */
|
|
2
2
|
//#region \0rolldown/runtime.js
|
|
3
3
|
var e = Object.defineProperty, t = Object.getOwnPropertyDescriptor, n = Object.getOwnPropertyNames, r = Object.prototype.hasOwnProperty, i = (t, n) => {
|
|
4
4
|
let r = {};
|
package/.vite/manifest.json
CHANGED
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
"imports": [
|
|
76
76
|
"components/common/hooks/use-event-listener/index.ts",
|
|
77
77
|
"components/common/hooks/use-memoized-fn/index.ts",
|
|
78
|
+
"components/common/hooks/use-mount/index.ts",
|
|
78
79
|
"components/common/hooks/use-update-effect/index.ts",
|
|
79
80
|
"components/common/utils/is.ts"
|
|
80
81
|
]
|
|
@@ -759,7 +760,10 @@
|
|
|
759
760
|
"file": "hooks/use-overflow-hidden/index.js",
|
|
760
761
|
"name": "hooks/use-overflow-hidden/index",
|
|
761
762
|
"src": "components/common/hooks/use-overflow-hidden/index.ts",
|
|
762
|
-
"isEntry": true
|
|
763
|
+
"isEntry": true,
|
|
764
|
+
"imports": [
|
|
765
|
+
"components/common/utils/getScrollBarWidth.ts"
|
|
766
|
+
]
|
|
763
767
|
},
|
|
764
768
|
"components/common/hooks/use-override-ref/index.ts": {
|
|
765
769
|
"file": "hooks/use-override-ref/index.js",
|
|
@@ -1629,13 +1633,13 @@
|
|
|
1629
1633
|
"components/common/space/index.tsx",
|
|
1630
1634
|
"components/common/suspense-fallback-test/index.tsx",
|
|
1631
1635
|
"components/common/timer/index.tsx",
|
|
1632
|
-
"components/common/transition-group/CSSTransition.tsx",
|
|
1633
1636
|
"components/common/transition-group/ChildMapping.ts",
|
|
1634
|
-
"components/common/transition-group/ReplaceTransition.tsx",
|
|
1635
|
-
"components/common/transition-group/SwitchTransition.tsx",
|
|
1636
1637
|
"components/common/transition-group/Transition.tsx",
|
|
1638
|
+
"components/common/transition-group/TransitionCSS.tsx",
|
|
1637
1639
|
"components/common/transition-group/TransitionGroup.tsx",
|
|
1638
|
-
"components/common/transition-group/
|
|
1640
|
+
"components/common/transition-group/TransitionReplace.tsx",
|
|
1641
|
+
"components/common/transition-group/TransitionSwitch.tsx",
|
|
1642
|
+
"components/common/transition-group/context.ts",
|
|
1639
1643
|
"components/common/transition-group/index.ts",
|
|
1640
1644
|
"components/common/utils/callOrReturn.ts",
|
|
1641
1645
|
"components/common/utils/callbackOriginRef.ts",
|
|
@@ -1653,6 +1657,9 @@
|
|
|
1653
1657
|
"components/common/utils/findRootElement.ts",
|
|
1654
1658
|
"components/common/utils/getHighlightText.ts",
|
|
1655
1659
|
"components/common/utils/getHotkeyHandler.ts",
|
|
1660
|
+
"components/common/utils/getScrollBarHeight.ts",
|
|
1661
|
+
"components/common/utils/getScrollBarSize.ts",
|
|
1662
|
+
"components/common/utils/getScrollBarWidth.ts",
|
|
1656
1663
|
"components/common/utils/getStringLength.ts",
|
|
1657
1664
|
"components/common/utils/include.ts",
|
|
1658
1665
|
"components/common/utils/index.ts",
|
|
@@ -1691,118 +1698,6 @@
|
|
|
1691
1698
|
"components/common/version/index.ts"
|
|
1692
1699
|
]
|
|
1693
1700
|
},
|
|
1694
|
-
"components/common/motion/CSSMotion.tsx": {
|
|
1695
|
-
"file": "motion/CSSMotion.js",
|
|
1696
|
-
"name": "motion/CSSMotion",
|
|
1697
|
-
"src": "components/common/motion/CSSMotion.tsx",
|
|
1698
|
-
"isEntry": true,
|
|
1699
|
-
"imports": [
|
|
1700
|
-
"components/common/motion/context.tsx",
|
|
1701
|
-
"components/common/motion/hooks/useStatus.ts",
|
|
1702
|
-
"components/common/motion/hooks/useStepQueue.ts",
|
|
1703
|
-
"components/common/motion/interface.ts",
|
|
1704
|
-
"components/common/motion/util/motion.ts",
|
|
1705
|
-
"components/common/utils/className.ts",
|
|
1706
|
-
"components/common/utils/findRootElement.ts",
|
|
1707
|
-
"components/common/utils/is.ts",
|
|
1708
|
-
"components/common/utils/ref.ts"
|
|
1709
|
-
]
|
|
1710
|
-
},
|
|
1711
|
-
"components/common/motion/CSSMotionList.tsx": {
|
|
1712
|
-
"file": "motion/CSSMotionList.js",
|
|
1713
|
-
"name": "motion/CSSMotionList",
|
|
1714
|
-
"src": "components/common/motion/CSSMotionList.tsx",
|
|
1715
|
-
"isEntry": true,
|
|
1716
|
-
"imports": [
|
|
1717
|
-
"components/common/motion/CSSMotion.tsx",
|
|
1718
|
-
"components/common/motion/util/diff.ts",
|
|
1719
|
-
"components/common/motion/util/motion.ts"
|
|
1720
|
-
]
|
|
1721
|
-
},
|
|
1722
|
-
"components/common/motion/context.tsx": {
|
|
1723
|
-
"file": "motion/context.js",
|
|
1724
|
-
"name": "motion/context",
|
|
1725
|
-
"src": "components/common/motion/context.tsx",
|
|
1726
|
-
"isEntry": true
|
|
1727
|
-
},
|
|
1728
|
-
"components/common/motion/hooks/useDomMotionEvents.ts": {
|
|
1729
|
-
"file": "motion/hooks/useDomMotionEvents.js",
|
|
1730
|
-
"name": "motion/hooks/useDomMotionEvents",
|
|
1731
|
-
"src": "components/common/motion/hooks/useDomMotionEvents.ts",
|
|
1732
|
-
"isDynamicEntry": true,
|
|
1733
|
-
"imports": [
|
|
1734
|
-
"components/common/motion/util/motion.ts"
|
|
1735
|
-
]
|
|
1736
|
-
},
|
|
1737
|
-
"components/common/motion/hooks/useNextFrame.ts": {
|
|
1738
|
-
"file": "motion/hooks/useNextFrame.js",
|
|
1739
|
-
"name": "motion/hooks/useNextFrame",
|
|
1740
|
-
"src": "components/common/motion/hooks/useNextFrame.ts",
|
|
1741
|
-
"isDynamicEntry": true
|
|
1742
|
-
},
|
|
1743
|
-
"components/common/motion/hooks/useStatus.ts": {
|
|
1744
|
-
"file": "motion/hooks/useStatus.js",
|
|
1745
|
-
"name": "motion/hooks/useStatus",
|
|
1746
|
-
"src": "components/common/motion/hooks/useStatus.ts",
|
|
1747
|
-
"isDynamicEntry": true,
|
|
1748
|
-
"imports": [
|
|
1749
|
-
"components/common/hooks/use-event/index.ts",
|
|
1750
|
-
"components/common/hooks/use-isomorphic-layout-effect/index.ts",
|
|
1751
|
-
"components/common/hooks/use-safe-state/index.ts",
|
|
1752
|
-
"components/common/hooks/use-sync-state/index.ts",
|
|
1753
|
-
"components/common/motion/hooks/useDomMotionEvents.ts",
|
|
1754
|
-
"components/common/motion/hooks/useStepQueue.ts",
|
|
1755
|
-
"components/common/motion/interface.ts"
|
|
1756
|
-
]
|
|
1757
|
-
},
|
|
1758
|
-
"components/common/motion/hooks/useStepQueue.ts": {
|
|
1759
|
-
"file": "motion/hooks/useStepQueue.js",
|
|
1760
|
-
"name": "motion/hooks/useStepQueue",
|
|
1761
|
-
"src": "components/common/motion/hooks/useStepQueue.ts",
|
|
1762
|
-
"isDynamicEntry": true,
|
|
1763
|
-
"imports": [
|
|
1764
|
-
"components/common/hooks/use-isomorphic-layout-effect/index.ts",
|
|
1765
|
-
"components/common/hooks/use-safe-state/index.ts",
|
|
1766
|
-
"components/common/motion/hooks/useNextFrame.ts",
|
|
1767
|
-
"components/common/motion/interface.ts"
|
|
1768
|
-
]
|
|
1769
|
-
},
|
|
1770
|
-
"components/common/motion/index.tsx": {
|
|
1771
|
-
"file": "motion/index.js",
|
|
1772
|
-
"name": "motion/index",
|
|
1773
|
-
"src": "components/common/motion/index.tsx",
|
|
1774
|
-
"isEntry": true,
|
|
1775
|
-
"imports": [
|
|
1776
|
-
"components/common/motion/CSSMotion.tsx",
|
|
1777
|
-
"components/common/motion/CSSMotionList.tsx",
|
|
1778
|
-
"components/common/motion/context.tsx"
|
|
1779
|
-
]
|
|
1780
|
-
},
|
|
1781
|
-
"components/common/motion/interface.ts": {
|
|
1782
|
-
"file": "motion/interface.js",
|
|
1783
|
-
"name": "motion/interface",
|
|
1784
|
-
"src": "components/common/motion/interface.ts",
|
|
1785
|
-
"isDynamicEntry": true
|
|
1786
|
-
},
|
|
1787
|
-
"components/common/motion/util/diff.ts": {
|
|
1788
|
-
"file": "motion/util/diff.js",
|
|
1789
|
-
"name": "motion/util/diff",
|
|
1790
|
-
"src": "components/common/motion/util/diff.ts",
|
|
1791
|
-
"isDynamicEntry": true,
|
|
1792
|
-
"imports": [
|
|
1793
|
-
"components/common/utils/is.ts"
|
|
1794
|
-
]
|
|
1795
|
-
},
|
|
1796
|
-
"components/common/motion/util/motion.ts": {
|
|
1797
|
-
"file": "motion/util/motion.js",
|
|
1798
|
-
"name": "motion/util/motion",
|
|
1799
|
-
"src": "components/common/motion/util/motion.ts",
|
|
1800
|
-
"isDynamicEntry": true,
|
|
1801
|
-
"imports": [
|
|
1802
|
-
"components/common/utils/dom.ts",
|
|
1803
|
-
"components/common/utils/is.ts"
|
|
1804
|
-
]
|
|
1805
|
-
},
|
|
1806
1701
|
"components/common/progress/index.js": {
|
|
1807
1702
|
"file": "progress/index.js",
|
|
1808
1703
|
"name": "progress/index",
|
|
@@ -1867,6 +1762,12 @@
|
|
|
1867
1762
|
"src": "components/common/suspense-fallback-test/index.tsx",
|
|
1868
1763
|
"isEntry": true
|
|
1869
1764
|
},
|
|
1765
|
+
"components/common/test.js": {
|
|
1766
|
+
"file": "test.js",
|
|
1767
|
+
"name": "test",
|
|
1768
|
+
"src": "components/common/test.js",
|
|
1769
|
+
"isEntry": true
|
|
1770
|
+
},
|
|
1870
1771
|
"components/common/timer/index.tsx": {
|
|
1871
1772
|
"file": "timer/index.js",
|
|
1872
1773
|
"name": "timer/index",
|
|
@@ -1877,65 +1778,32 @@
|
|
|
1877
1778
|
"components/common/utils/is.ts"
|
|
1878
1779
|
]
|
|
1879
1780
|
},
|
|
1880
|
-
"components/common/transition-group/CSSTransition.tsx": {
|
|
1881
|
-
"file": "transition-group/CSSTransition.js",
|
|
1882
|
-
"name": "transition-group/CSSTransition",
|
|
1883
|
-
"src": "components/common/transition-group/CSSTransition.tsx",
|
|
1884
|
-
"isEntry": true,
|
|
1885
|
-
"imports": [
|
|
1886
|
-
"components/common/transition-group/Transition.tsx",
|
|
1887
|
-
"components/common/utils/dom.ts",
|
|
1888
|
-
"components/common/utils/findRootElement.ts",
|
|
1889
|
-
"components/common/utils/is.ts"
|
|
1890
|
-
]
|
|
1891
|
-
},
|
|
1892
1781
|
"components/common/transition-group/ChildMapping.ts": {
|
|
1893
1782
|
"file": "transition-group/ChildMapping.js",
|
|
1894
1783
|
"name": "transition-group/ChildMapping",
|
|
1895
1784
|
"src": "components/common/transition-group/ChildMapping.ts",
|
|
1896
1785
|
"isEntry": true
|
|
1897
1786
|
},
|
|
1898
|
-
"components/common/transition-group/
|
|
1899
|
-
"file": "transition-group/
|
|
1900
|
-
"name": "transition-group/
|
|
1901
|
-
"src": "components/common/transition-group/
|
|
1787
|
+
"components/common/transition-group/Transition.tsx": {
|
|
1788
|
+
"file": "transition-group/Transition.js",
|
|
1789
|
+
"name": "transition-group/Transition",
|
|
1790
|
+
"src": "components/common/transition-group/Transition.tsx",
|
|
1902
1791
|
"isEntry": true,
|
|
1903
1792
|
"imports": [
|
|
1904
|
-
"components/common/transition-group/
|
|
1905
|
-
"components/common/utils/
|
|
1793
|
+
"components/common/transition-group/context.ts",
|
|
1794
|
+
"components/common/utils/constant.ts",
|
|
1795
|
+
"components/common/utils/dom.ts",
|
|
1906
1796
|
"components/common/utils/findRootElement.ts",
|
|
1907
|
-
"components/common/utils/is.ts"
|
|
1908
|
-
"components/common/utils/ref.ts"
|
|
1909
|
-
]
|
|
1910
|
-
},
|
|
1911
|
-
"components/common/transition-group/ReplaceTransition.tsx": {
|
|
1912
|
-
"file": "transition-group/ReplaceTransition.js",
|
|
1913
|
-
"name": "transition-group/ReplaceTransition",
|
|
1914
|
-
"src": "components/common/transition-group/ReplaceTransition.tsx",
|
|
1915
|
-
"isEntry": true,
|
|
1916
|
-
"imports": [
|
|
1917
|
-
"components/common/transition-group/TransitionGroup.tsx",
|
|
1918
|
-
"components/common/utils/findRootElement.ts"
|
|
1797
|
+
"components/common/utils/is.ts"
|
|
1919
1798
|
]
|
|
1920
1799
|
},
|
|
1921
|
-
"components/common/transition-group/
|
|
1922
|
-
"file": "transition-group/
|
|
1923
|
-
"name": "transition-group/
|
|
1924
|
-
"src": "components/common/transition-group/
|
|
1800
|
+
"components/common/transition-group/TransitionCSS.tsx": {
|
|
1801
|
+
"file": "transition-group/TransitionCSS.js",
|
|
1802
|
+
"name": "transition-group/TransitionCSS",
|
|
1803
|
+
"src": "components/common/transition-group/TransitionCSS.tsx",
|
|
1925
1804
|
"isEntry": true,
|
|
1926
1805
|
"imports": [
|
|
1927
1806
|
"components/common/transition-group/Transition.tsx",
|
|
1928
|
-
"components/common/transition-group/TransitionGroupContext.ts"
|
|
1929
|
-
]
|
|
1930
|
-
},
|
|
1931
|
-
"components/common/transition-group/Transition.tsx": {
|
|
1932
|
-
"file": "transition-group/Transition.js",
|
|
1933
|
-
"name": "transition-group/Transition",
|
|
1934
|
-
"src": "components/common/transition-group/Transition.tsx",
|
|
1935
|
-
"isEntry": true,
|
|
1936
|
-
"imports": [
|
|
1937
|
-
"components/common/transition-group/TransitionGroupContext.ts",
|
|
1938
|
-
"components/common/utils/constant.ts",
|
|
1939
1807
|
"components/common/utils/dom.ts",
|
|
1940
1808
|
"components/common/utils/findRootElement.ts",
|
|
1941
1809
|
"components/common/utils/is.ts"
|
|
@@ -1948,13 +1816,33 @@
|
|
|
1948
1816
|
"isEntry": true,
|
|
1949
1817
|
"imports": [
|
|
1950
1818
|
"components/common/transition-group/ChildMapping.ts",
|
|
1951
|
-
"components/common/transition-group/
|
|
1819
|
+
"components/common/transition-group/context.ts"
|
|
1820
|
+
]
|
|
1821
|
+
},
|
|
1822
|
+
"components/common/transition-group/TransitionReplace.tsx": {
|
|
1823
|
+
"file": "transition-group/TransitionReplace.js",
|
|
1824
|
+
"name": "transition-group/TransitionReplace",
|
|
1825
|
+
"src": "components/common/transition-group/TransitionReplace.tsx",
|
|
1826
|
+
"isEntry": true,
|
|
1827
|
+
"imports": [
|
|
1828
|
+
"components/common/transition-group/TransitionGroup.tsx",
|
|
1829
|
+
"components/common/utils/findRootElement.ts"
|
|
1830
|
+
]
|
|
1831
|
+
},
|
|
1832
|
+
"components/common/transition-group/TransitionSwitch.tsx": {
|
|
1833
|
+
"file": "transition-group/TransitionSwitch.js",
|
|
1834
|
+
"name": "transition-group/TransitionSwitch",
|
|
1835
|
+
"src": "components/common/transition-group/TransitionSwitch.tsx",
|
|
1836
|
+
"isEntry": true,
|
|
1837
|
+
"imports": [
|
|
1838
|
+
"components/common/transition-group/Transition.tsx",
|
|
1839
|
+
"components/common/transition-group/context.ts"
|
|
1952
1840
|
]
|
|
1953
1841
|
},
|
|
1954
|
-
"components/common/transition-group/
|
|
1955
|
-
"file": "transition-group/
|
|
1956
|
-
"name": "transition-group/
|
|
1957
|
-
"src": "components/common/transition-group/
|
|
1842
|
+
"components/common/transition-group/context.ts": {
|
|
1843
|
+
"file": "transition-group/context.js",
|
|
1844
|
+
"name": "transition-group/context",
|
|
1845
|
+
"src": "components/common/transition-group/context.ts",
|
|
1958
1846
|
"isEntry": true
|
|
1959
1847
|
},
|
|
1960
1848
|
"components/common/transition-group/index.ts": {
|
|
@@ -1963,13 +1851,13 @@
|
|
|
1963
1851
|
"src": "components/common/transition-group/index.ts",
|
|
1964
1852
|
"isEntry": true,
|
|
1965
1853
|
"imports": [
|
|
1966
|
-
"components/common/transition-group/CSSTransition.tsx",
|
|
1967
1854
|
"components/common/transition-group/ChildMapping.ts",
|
|
1968
|
-
"components/common/transition-group/ReplaceTransition.tsx",
|
|
1969
|
-
"components/common/transition-group/SwitchTransition.tsx",
|
|
1970
1855
|
"components/common/transition-group/Transition.tsx",
|
|
1856
|
+
"components/common/transition-group/TransitionCSS.tsx",
|
|
1971
1857
|
"components/common/transition-group/TransitionGroup.tsx",
|
|
1972
|
-
"components/common/transition-group/
|
|
1858
|
+
"components/common/transition-group/TransitionReplace.tsx",
|
|
1859
|
+
"components/common/transition-group/TransitionSwitch.tsx",
|
|
1860
|
+
"components/common/transition-group/context.ts",
|
|
1973
1861
|
"components/common/utils/dom.ts"
|
|
1974
1862
|
]
|
|
1975
1863
|
},
|
|
@@ -2094,6 +1982,30 @@
|
|
|
2094
1982
|
"components/common/utils/is.ts"
|
|
2095
1983
|
]
|
|
2096
1984
|
},
|
|
1985
|
+
"components/common/utils/getScrollBarHeight.ts": {
|
|
1986
|
+
"file": "utils/getScrollBarHeight.js",
|
|
1987
|
+
"name": "utils/getScrollBarHeight",
|
|
1988
|
+
"src": "components/common/utils/getScrollBarHeight.ts",
|
|
1989
|
+
"isEntry": true,
|
|
1990
|
+
"imports": [
|
|
1991
|
+
"components/common/utils/getScrollBarSize.ts"
|
|
1992
|
+
]
|
|
1993
|
+
},
|
|
1994
|
+
"components/common/utils/getScrollBarSize.ts": {
|
|
1995
|
+
"file": "utils/getScrollBarSize.js",
|
|
1996
|
+
"name": "utils/getScrollBarSize",
|
|
1997
|
+
"src": "components/common/utils/getScrollBarSize.ts",
|
|
1998
|
+
"isEntry": true
|
|
1999
|
+
},
|
|
2000
|
+
"components/common/utils/getScrollBarWidth.ts": {
|
|
2001
|
+
"file": "utils/getScrollBarWidth.js",
|
|
2002
|
+
"name": "utils/getScrollBarWidth",
|
|
2003
|
+
"src": "components/common/utils/getScrollBarWidth.ts",
|
|
2004
|
+
"isEntry": true,
|
|
2005
|
+
"imports": [
|
|
2006
|
+
"components/common/utils/getScrollBarSize.ts"
|
|
2007
|
+
]
|
|
2008
|
+
},
|
|
2097
2009
|
"components/common/utils/getStringLength.ts": {
|
|
2098
2010
|
"file": "utils/getStringLength.js",
|
|
2099
2011
|
"name": "utils/getStringLength",
|
|
@@ -2129,6 +2041,9 @@
|
|
|
2129
2041
|
"components/common/utils/findRootElement.ts",
|
|
2130
2042
|
"components/common/utils/getHighlightText.ts",
|
|
2131
2043
|
"components/common/utils/getHotkeyHandler.ts",
|
|
2044
|
+
"components/common/utils/getScrollBarHeight.ts",
|
|
2045
|
+
"components/common/utils/getScrollBarSize.ts",
|
|
2046
|
+
"components/common/utils/getScrollBarWidth.ts",
|
|
2132
2047
|
"components/common/utils/getStringLength.ts",
|
|
2133
2048
|
"components/common/utils/include.ts",
|
|
2134
2049
|
"components/common/utils/intersectionObserver.ts",
|
package/development/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-03
|
|
1
|
+
/* 潘启宝 2026-04-03 14:07:44 星期五 */
|
|
2
2
|
import { forwardRef as e, useImperativeHandle as t, useMemo as n, useRef as r } from "react";
|
|
3
3
|
import { UI_COMMON_PREFIX as i } from "@unicom-cloud/utils/constant/ui";
|
|
4
4
|
import a from "@unicom-cloud/utils/class-name";
|
package/empty/index.js
CHANGED
package/flex/index.js
CHANGED
package/flex/utils.js
CHANGED
package/higher-order/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-03
|
|
1
|
+
/* 潘启宝 2026-04-03 14:07:44 星期五 */
|
|
2
2
|
import { forwardRef as e, memo as t, useCallback as n, useEffect as r, useImperativeHandle as i, useMemo as a, useState as o } from "react";
|
|
3
3
|
import { jsx as s } from "react/jsx-runtime";
|
|
4
4
|
import c from "@unicom-cloud/icons/IconUiMute";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export declare const SYNC_STORAGE_EVENT_NAME = "
|
|
1
|
+
export declare const SYNC_STORAGE_EVENT_NAME = "AHOOKS_SYNC_STORAGE_EVENT_NAME";
|
|
2
2
|
export type SetState<S> = S | ((prevState?: S) => S);
|
|
3
3
|
export interface Options<T> {
|
|
4
4
|
defaultValue?: T | (() => T);
|
|
5
|
+
getInitialValueInEffect?: boolean;
|
|
5
6
|
listenStorageChange?: boolean;
|
|
6
7
|
serializer?: (value: T) => string;
|
|
7
8
|
deserializer?: (value: string) => T;
|
|
@@ -1,59 +1,68 @@
|
|
|
1
|
-
/* 潘启宝 2026-03
|
|
1
|
+
/* 潘启宝 2026-04-03 14:07:44 星期五 */
|
|
2
2
|
import { isFunction as e, isUndefined as t } from "../../utils/is.js";
|
|
3
3
|
import n from "../use-memoized-fn/index.js";
|
|
4
4
|
import r from "../use-update-effect/index.js";
|
|
5
5
|
import i from "../use-event-listener/index.js";
|
|
6
|
-
import
|
|
6
|
+
import a from "../use-mount/index.js";
|
|
7
|
+
import { useRef as o, useState as s } from "react";
|
|
7
8
|
//#region components/common/hooks/create-use-storage-state/index.ts
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
function
|
|
11
|
-
let
|
|
9
|
+
var c = "AHOOKS_SYNC_STORAGE_EVENT_NAME";
|
|
10
|
+
function l(l) {
|
|
11
|
+
function u(u, d = {}) {
|
|
12
|
+
let f, { listenStorageChange: p = !1, getInitialValueInEffect: m = !1 } = d, h = e(d.serializer) ? d.serializer : JSON.stringify, g = e(d.deserializer) ? d.deserializer : JSON.parse, _ = e(d.onError) ? d.onError : console.error;
|
|
12
13
|
try {
|
|
13
|
-
|
|
14
|
+
f = l();
|
|
14
15
|
} catch (e) {
|
|
15
|
-
|
|
16
|
+
_(e);
|
|
16
17
|
}
|
|
17
|
-
let
|
|
18
|
+
let v = () => {
|
|
18
19
|
try {
|
|
19
|
-
let e =
|
|
20
|
-
if (e) return
|
|
20
|
+
let e = f?.getItem?.(u);
|
|
21
|
+
if (e) return g(e);
|
|
21
22
|
} catch (e) {
|
|
22
|
-
|
|
23
|
+
_(e);
|
|
23
24
|
}
|
|
24
|
-
return
|
|
25
|
-
}
|
|
26
|
-
y
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
return y();
|
|
26
|
+
};
|
|
27
|
+
function y() {
|
|
28
|
+
return e(d.defaultValue) ? d.defaultValue() : d.defaultValue;
|
|
29
|
+
}
|
|
30
|
+
let [b, x] = s(() => m ? y() : v());
|
|
31
|
+
a(() => {
|
|
32
|
+
m && x(v());
|
|
33
|
+
});
|
|
34
|
+
let S = o(b);
|
|
35
|
+
S.current = b, r(() => {
|
|
36
|
+
let e = v();
|
|
37
|
+
Object.is(e, S.current) || (S.current = e, x(e));
|
|
38
|
+
}, [u]);
|
|
39
|
+
let C = (n) => {
|
|
40
|
+
let r = S.current, i = e(n) ? n(r) : n;
|
|
32
41
|
if (!Object.is(i, r)) {
|
|
33
|
-
|
|
42
|
+
p || (S.current = i, x(i));
|
|
34
43
|
try {
|
|
35
|
-
let e, n =
|
|
36
|
-
t(i) ? (e = null,
|
|
37
|
-
key:
|
|
44
|
+
let e, n = f?.getItem?.(u);
|
|
45
|
+
t(i) ? (e = null, f?.removeItem?.(u)) : (e = h(i), f?.setItem?.(u, e)), dispatchEvent(new CustomEvent(c, { detail: {
|
|
46
|
+
key: u,
|
|
38
47
|
newValue: e,
|
|
39
48
|
oldValue: n,
|
|
40
|
-
storageArea:
|
|
49
|
+
storageArea: f
|
|
41
50
|
} }));
|
|
42
51
|
} catch (e) {
|
|
43
|
-
|
|
52
|
+
_(e);
|
|
44
53
|
}
|
|
45
54
|
}
|
|
46
|
-
},
|
|
47
|
-
if (e.key !==
|
|
48
|
-
let t =
|
|
49
|
-
Object.is(t,
|
|
55
|
+
}, w = (e) => {
|
|
56
|
+
if (e.key !== u || e.storageArea !== f) return;
|
|
57
|
+
let t = v();
|
|
58
|
+
Object.is(t, S.current) || (S.current = t, x(t));
|
|
50
59
|
};
|
|
51
|
-
return i("storage",
|
|
52
|
-
|
|
53
|
-
}, { enable:
|
|
60
|
+
return i("storage", w, { enable: p }), i(c, (e) => {
|
|
61
|
+
w(e.detail);
|
|
62
|
+
}, { enable: p }), [b, n(C)];
|
|
54
63
|
}
|
|
55
|
-
return
|
|
64
|
+
return u;
|
|
56
65
|
}
|
|
57
66
|
//#endregion
|
|
58
|
-
export {
|
|
67
|
+
export { c as SYNC_STORAGE_EVENT_NAME, l as default };
|
|
59
68
|
/* 独立思考,明辨是非 */
|
package/hooks/index.js
CHANGED