@unicom-cloud/ui-common 0.1.54 → 0.1.55
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 +2 -3
- package/animation/Animation.js +2 -3
- package/animation/constants.js +2 -3
- package/animation/context.js +2 -3
- package/animation/index.js +2 -3
- package/animation/style/index.js +1 -1
- package/animation/utils.js +1 -1
- package/base/Base.js +2 -3
- package/base/constants.js +1 -1
- package/base/context.js +2 -3
- package/base/index.js +2 -3
- package/base/style/index.js +1 -1
- package/base/utils.js +1 -1
- package/border-beam/BorderBeam.js +2 -3
- package/border-beam/Effect.js +2 -3
- package/border-beam/constants.js +2 -3
- package/border-beam/context.js +2 -3
- package/border-beam/hooks/useBorderSize.js +2 -3
- package/border-beam/hooks/useChildDom.js +2 -3
- package/border-beam/index.js +2 -3
- package/border-beam/style/index.js +1 -1
- package/border-beam/utils.js +2 -3
- package/development/Development.js +2 -3
- package/development/constants.js +1 -1
- package/development/context.js +2 -3
- package/development/index.js +2 -3
- package/development/style/index.js +1 -1
- package/development/utils.js +1 -1
- package/empty/Empty.js +2 -3
- package/empty/constants.js +1 -1
- package/empty/context.js +2 -3
- package/empty/index.js +2 -3
- package/empty/style/index.js +1 -1
- package/empty/utils.js +1 -1
- package/flex/Flex.js +2 -3
- package/flex/FlexVertical.js +2 -3
- package/flex/constants.js +1 -1
- package/flex/context.js +2 -3
- package/flex/index.js +2 -3
- package/flex/style/index.js +1 -1
- package/flex/utils.js +2 -3
- package/grid/Grid.js +2 -3
- package/grid/Item.js +2 -3
- package/grid/constants.js +1 -1
- package/grid/context.js +2 -3
- package/grid/index.js +2 -3
- package/grid/style/index.js +1 -1
- package/grid/utils.js +2 -3
- package/higher-order/with-speech-synthesis/context.js +2 -3
- package/higher-order/with-speech-synthesis/index.js +2 -3
- package/higher-order/with-speech-synthesis/style/index.js +1 -1
- package/higher-order/with-speech-synthesis/withSpeechSynthesis.js +2 -3
- package/hoc/withContext.js +2 -3
- package/hooks/create-deep-compare-effect/index.js +2 -3
- package/hooks/create-update-effect/index.js +2 -3
- package/hooks/create-use-storage-state/index.js +2 -3
- package/hooks/index.js +1 -1
- package/hooks/use-async-effect/index.js +2 -3
- package/hooks/use-boolean/index.js +2 -3
- package/hooks/use-click-away/index.js +2 -3
- package/hooks/use-computed-state/index.js +2 -3
- package/hooks/use-controllable-value/index.js +2 -3
- package/hooks/use-cookie-state/index.js +2 -3
- package/hooks/use-count-down/index.js +2 -3
- package/hooks/use-counter/index.js +2 -3
- package/hooks/use-create/index.js +2 -3
- package/hooks/use-creation/index.js +3 -4
- package/hooks/use-debounce/index.js +2 -3
- package/hooks/use-debounce-effect/index.js +2 -3
- package/hooks/use-debounce-fn/index.js +2 -3
- package/hooks/use-deep-compare-effect/index.js +2 -3
- package/hooks/use-deep-compare-layout-effect/index.js +2 -3
- package/hooks/use-document-visibility/index.js +2 -3
- package/hooks/use-drag/index.js +2 -3
- package/hooks/use-drag-move/index.js +2 -3
- package/hooks/use-drop/index.js +2 -3
- package/hooks/use-effect-event/index.js +2 -3
- package/hooks/use-event/index.js +2 -3
- package/hooks/use-event-emitter/index.js +2 -3
- package/hooks/use-event-listener/index.js +2 -3
- package/hooks/use-event-target/index.js +2 -3
- package/hooks/use-external/index.js +2 -3
- package/hooks/use-favicon/index.js +2 -3
- package/hooks/use-focus-within/index.js +2 -3
- package/hooks/use-force-update/index.js +2 -3
- package/hooks/use-fullscreen/index.js +2 -3
- package/hooks/use-get-state/index.js +2 -3
- package/hooks/use-history-travel/index.js +2 -3
- package/hooks/use-hover/index.js +2 -3
- package/hooks/use-id/index.js +2 -3
- package/hooks/use-in-viewport/index.js +17 -18
- package/hooks/use-infinite-scroll/index.js +2 -3
- package/hooks/use-intersection-observer/index.js +2 -3
- package/hooks/use-intersection-observers/index.js +19 -20
- package/hooks/use-interval/index.js +2 -3
- package/hooks/use-is-first-render/index.js +2 -3
- package/hooks/use-isomorphic-layout-effect/index.js +2 -3
- package/hooks/use-key-press/index.js +2 -3
- package/hooks/use-keyboard-event/index.js +2 -3
- package/hooks/use-latest/index.js +2 -3
- package/hooks/use-listen-window-resize/index.js +2 -3
- package/hooks/use-local-storage-state/index.js +2 -3
- package/hooks/use-lock-fn/index.js +2 -3
- package/hooks/use-long-press/index.js +2 -3
- package/hooks/use-map/index.js +2 -3
- package/hooks/use-media/index.js +2 -3
- package/hooks/use-memo/index.js +2 -3
- package/hooks/use-memoized-fn/index.js +2 -3
- package/hooks/use-merge-component-props/index.js +2 -3
- package/hooks/use-merge-value/index.js +2 -3
- package/hooks/use-mobile/index.js +2 -3
- package/hooks/use-mount/index.js +2 -3
- package/hooks/use-mouse/index.js +2 -3
- package/hooks/use-mutation-observer/index.js +2 -3
- package/hooks/use-mutation-observers/index.js +19 -20
- package/hooks/use-network/index.js +2 -3
- package/hooks/use-online-status/index.js +2 -3
- package/hooks/use-overflow-hidden/index.js +2 -3
- package/hooks/use-override-ref/index.js +2 -3
- package/hooks/use-pagination/index.js +2 -3
- package/hooks/use-paste-file/index.js +2 -3
- package/hooks/use-paste-image/index.js +2 -3
- package/hooks/use-persist-callback/index.js +2 -3
- package/hooks/use-prefers-color-scheme-dark/index.js +2 -3
- package/hooks/use-previous/index.js +2 -3
- package/hooks/use-raf-interval/index.js +2 -3
- package/hooks/use-raf-state/index.js +2 -3
- package/hooks/use-raf-timeout/index.js +2 -3
- package/hooks/use-reactive/index.js +2 -3
- package/hooks/use-ref-latest/index.js +2 -3
- package/hooks/use-ref-map/index.js +2 -3
- package/hooks/use-refs/index.js +2 -3
- package/hooks/use-request/index.js +2 -3
- package/hooks/use-request/src/Fetch.js +2 -3
- package/hooks/use-request/src/plugins/useAutoRunPlugin.js +2 -3
- package/hooks/use-request/src/plugins/useCachePlugin.js +2 -3
- package/hooks/use-request/src/plugins/useDebouncePlugin.js +2 -3
- package/hooks/use-request/src/plugins/useLoadingDelayPlugin.js +2 -3
- package/hooks/use-request/src/plugins/usePollingPlugin.js +2 -3
- package/hooks/use-request/src/plugins/useRefreshOnWindowFocusPlugin.js +2 -3
- package/hooks/use-request/src/plugins/useRetryPlugin.js +2 -3
- package/hooks/use-request/src/plugins/useThrottlePlugin.js +2 -3
- package/hooks/use-request/src/useRequest.js +2 -3
- package/hooks/use-request/src/useRequestImplement.js +2 -3
- package/hooks/use-request/src/utils/cache.js +2 -3
- package/hooks/use-request/src/utils/cachePromise.js +2 -3
- package/hooks/use-request/src/utils/cacheSubscribe.js +2 -3
- package/hooks/use-request/src/utils/isDocumentVisible.js +2 -3
- package/hooks/use-request/src/utils/isOnline.js +2 -3
- package/hooks/use-request/src/utils/limit.js +2 -3
- package/hooks/use-request/src/utils/subscribeFocus.js +2 -3
- package/hooks/use-request/src/utils/subscribeReVisible.js +2 -3
- package/hooks/use-reset-state/index.js +2 -3
- package/hooks/use-resize-observer/index.js +2 -3
- package/hooks/use-resize-observers/index.js +19 -20
- package/hooks/use-responsive/index.js +2 -3
- package/hooks/use-safe-state/index.js +2 -3
- package/hooks/use-scroll/index.js +2 -3
- package/hooks/use-selections/index.js +2 -3
- package/hooks/use-session-storage-state/index.js +2 -3
- package/hooks/use-set/index.js +2 -3
- package/hooks/use-set-state/index.js +2 -3
- package/hooks/use-size/index.js +2 -3
- package/hooks/use-state-callback/index.js +3 -4
- package/hooks/use-state-with-promise/index.js +2 -3
- package/hooks/use-sync-state/index.js +2 -3
- package/hooks/use-text-selection/index.js +2 -3
- package/hooks/use-theme/index.js +2 -3
- package/hooks/use-throttle/index.js +2 -3
- package/hooks/use-throttle-effect/index.js +2 -3
- package/hooks/use-throttle-fn/index.js +2 -3
- package/hooks/use-throttle-fn-with-raf/index.js +2 -3
- package/hooks/use-timeout/index.js +2 -3
- package/hooks/use-title/index.js +2 -3
- package/hooks/use-toggle/index.js +2 -3
- package/hooks/use-tracked-effect/index.js +2 -3
- package/hooks/use-unmount/index.js +2 -3
- package/hooks/use-unmounted-ref/index.js +2 -3
- package/hooks/use-update/index.js +2 -3
- package/hooks/use-update-effect/index.js +2 -3
- package/hooks/use-update-layout-effect/index.js +2 -3
- package/hooks/use-url-state/index.js +2 -3
- package/hooks/use-virtual-list/index.js +2 -3
- package/hooks/use-watch/index.js +2 -3
- package/hooks/use-web-socket/index.js +3 -4
- package/hooks/use-why-did-you-update/index.js +2 -3
- package/hooks/use-window-size/index.js +2 -3
- package/hooks/utils/createEffectWithTarget.js +3 -4
- package/hooks/utils/depsAreSame.js +2 -3
- package/hooks/utils/depsEqual.js +2 -3
- package/hooks/utils/domTarget.js +2 -3
- package/hooks/utils/getDocumentOrShadow.js +2 -3
- package/hooks/utils/index.js +2 -3
- package/hooks/utils/isAppleDevice.js +2 -3
- package/hooks/utils/isBrowser.js +2 -3
- package/hooks/utils/isDev.js +2 -3
- package/hooks/utils/rect.js +2 -3
- package/hooks/utils/useDeepCompareWithTarget.js +2 -3
- package/hooks/utils/useEffectWithTarget.js +2 -3
- package/hooks/utils/useIsomorphicLayoutEffectWithTarget.js +2 -3
- package/hooks/utils/useLayoutEffectWithTarget.js +2 -3
- package/icons/file/File.js +2 -3
- package/icons/file/context.js +2 -3
- package/icons/file/index.js +2 -3
- package/icons/file/style/index.js +1 -1
- package/index.js +554 -554
- package/morphicons/core/interpolate.js +2 -3
- package/morphicons/core/normalize.js +2 -3
- package/morphicons/core/parse.js +0 -1
- package/morphicons/core/plan.js +0 -1
- package/morphicons/core/resample.js +2 -3
- package/morphicons/core/serialize.js +2 -3
- package/morphicons/core/spring.js +2 -3
- package/morphicons/dom/index.js +2 -3
- package/morphicons/index.js +1 -1
- package/morphicons/react/index.js +3 -4
- package/package.json +1 -1
- package/progress/Progress.js +40 -41
- package/progress/constants.js +1 -1
- package/progress/context.js +1 -1
- package/progress/index.js +2 -3
- package/progress/style/index.js +1 -1
- package/progress/utils.js +1 -1
- package/resize-observer/Collection.js +2 -3
- package/resize-observer/ResizeObserver.js +2 -3
- package/resize-observer/SingleObserver.js +2 -3
- package/resize-observer/constants.js +1 -1
- package/resize-observer/context.js +2 -3
- package/resize-observer/index.js +2 -3
- package/resize-observer/observerUtil.js +2 -3
- package/resize-observer/style/index.js +1 -1
- package/resize-observer/utils.js +1 -1
- package/space/Space.js +2 -3
- package/space/SpaceVertical.js +2 -3
- package/space/constants.js +1 -1
- package/space/context.js +2 -3
- package/space/index.js +2 -3
- package/space/style/index.js +1 -1
- package/space/utils.js +1 -1
- package/suspense-fallback-test/SuspenseFallbackTest.js +2 -3
- package/suspense-fallback-test/constants.js +1 -1
- package/suspense-fallback-test/context.js +2 -3
- package/suspense-fallback-test/index.js +2 -3
- package/suspense-fallback-test/style/index.js +1 -1
- package/suspense-fallback-test/utils.js +1 -1
- package/test.js +2 -3
- package/timer/Timer.js +2 -3
- package/timer/constants.js +1 -1
- package/timer/context.js +2 -3
- package/timer/index.js +2 -3
- package/timer/style/index.js +1 -1
- package/timer/utils.js +1 -1
- package/transition/Transition.js +2 -3
- package/transition/TransitionCSS.js +2 -3
- package/transition/TransitionGroup.js +2 -3
- package/transition/TransitionStyle.js +2 -3
- package/transition/constants.js +2 -3
- package/transition/context.js +2 -3
- package/transition/index.js +2 -3
- package/transition/style/index.js +1 -1
- package/transition/utils.js +2 -3
- package/utils/call.d.ts +1 -0
- package/utils/call.js +3 -0
- package/utils/callbackOriginRef.js +2 -3
- package/utils/confetti.js +2 -3
- package/utils/constants.js +2 -3
- package/utils/copy.js +2 -3
- package/utils/createRoot.js +3 -4
- package/utils/css.js +1 -1
- package/utils/dayjs.js +1 -2
- package/utils/document.js +2 -3
- package/utils/dom.js +2 -3
- package/utils/file.js +1 -1
- package/utils/fillNBSP.js +2 -3
- package/utils/getCompatProp.js +2 -3
- package/utils/getElement.js +2 -3
- package/utils/getHighlightText.js +2 -3
- package/utils/getHotkeyHandler.js +2 -3
- package/utils/getPrefixCls.js +2 -3
- package/utils/getScrollBarHeight.js +2 -3
- package/utils/getScrollBarSize.js +2 -3
- package/utils/getScrollBarWidth.js +2 -3
- package/utils/getScrollParent.js +2 -3
- package/utils/getStringLength.js +2 -3
- package/utils/getUrlSearchParam.js +2 -3
- package/utils/index.d.ts +1 -1
- package/utils/index.js +268 -268
- package/utils/initAllLineClamp.js +2 -3
- package/utils/injectLineClamp.js +2 -3
- package/utils/intersectionObserver.js +2 -3
- package/utils/is.js +2 -3
- package/utils/keyboardCode.js +2 -3
- package/utils/lodash.js +1 -1
- package/utils/mergeProps.js +2 -3
- package/utils/mergedToString.js +2 -3
- package/utils/migrateLegacyProps.js +2 -3
- package/utils/mutationObserver.js +2 -3
- package/utils/names.js +2 -3
- package/utils/object.js +2 -3
- package/utils/omit.js +2 -3
- package/utils/pad.js +2 -3
- package/utils/pick.js +2 -3
- package/utils/react19Adapter.js +2 -3
- package/utils/reactNode.js +2 -3
- package/utils/ref.js +2 -3
- package/utils/resizeObserver.js +2 -3
- package/utils/scrollIntoViewIfNeeded.js +2 -3
- package/utils/scrollTo.js +2 -3
- package/utils/setDarkTheme.js +2 -3
- package/utils/setDir.js +2 -3
- package/utils/setPrimaryColor.js +2 -3
- package/utils/setTheme.js +2 -3
- package/utils/string.js +2 -3
- package/utils/style.js +2 -3
- package/utils/tinycolor.js +1 -1
- package/utils/toArray.js +2 -3
- package/utils/tunnel.js +2 -3
- package/utils/warning.js +2 -3
- package/version/index.js +8 -9
- package/utils/callOrReturn.d.ts +0 -1
- package/utils/callOrReturn.js +0 -3
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../use-force-update/index.js";
|
|
4
4
|
import t from "../use-event/index.js";
|
|
5
5
|
import { useRef as n } from "react";
|
|
6
6
|
import { isFunction as r } from "@unicom-cloud/utils/is";
|
|
7
|
-
|
|
7
|
+
// components/common/hooks/use-sync-state/index.ts
|
|
8
8
|
function i(i) {
|
|
9
9
|
let a = e(), o = n(i);
|
|
10
10
|
return [t(() => o.current), t((e) => {
|
|
11
11
|
o.current = r(e) ? e(o.current) : e, a();
|
|
12
12
|
})];
|
|
13
13
|
}
|
|
14
|
-
//#endregion
|
|
15
14
|
export { i as default };
|
|
16
15
|
/* 欲穷千里目,更上一层楼 */
|
|
17
16
|
/* 独立思考,明辨是非 */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../utils/domTarget.js";
|
|
4
4
|
import t from "../utils/useEffectWithTarget.js";
|
|
5
5
|
import { useRef as n, useState as r } from "react";
|
|
6
|
-
|
|
6
|
+
// components/common/hooks/use-text-selection/index.ts
|
|
7
7
|
var i = {
|
|
8
8
|
top: NaN,
|
|
9
9
|
left: NaN,
|
|
@@ -54,7 +54,6 @@ function s(i) {
|
|
|
54
54
|
};
|
|
55
55
|
}, [], i), s;
|
|
56
56
|
}
|
|
57
|
-
//#endregion
|
|
58
57
|
export { s as default };
|
|
59
58
|
/* 欲穷千里目,更上一层楼 */
|
|
60
59
|
/* 独立思考,明辨是非 */
|
package/hooks/use-theme/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../utils/isBrowser.js";
|
|
4
4
|
import t from "../use-memoized-fn/index.js";
|
|
5
5
|
import { useEffect as n, useState as r } from "react";
|
|
6
6
|
import { MATCH_MEDIA_PREFERS_COLOR_SCHEME_DARK as i } from "@unicom-cloud/utils/constants/matchMedia";
|
|
7
|
-
|
|
7
|
+
// components/common/hooks/use-theme/index.ts
|
|
8
8
|
var a = /* @__PURE__ */ function(e) {
|
|
9
9
|
return e.LIGHT = "light", e.DARK = "dark", e.SYSTEM = "system", e;
|
|
10
10
|
}({}), o = () => {
|
|
@@ -28,7 +28,6 @@ function s(e = {}) {
|
|
|
28
28
|
setThemeMode: t(s)
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
//#endregion
|
|
32
31
|
export { a as ThemeMode, s as default };
|
|
33
32
|
/* 欲穷千里目,更上一层楼 */
|
|
34
33
|
/* 独立思考,明辨是非 */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../use-throttle-fn/index.js";
|
|
4
4
|
import { useEffect as t, useState as n } from "react";
|
|
5
|
-
|
|
5
|
+
// components/common/hooks/use-throttle/index.ts
|
|
6
6
|
function r(r, i) {
|
|
7
7
|
let [a, o] = n(r), { run: s } = e(() => {
|
|
8
8
|
o(r);
|
|
@@ -11,7 +11,6 @@ function r(r, i) {
|
|
|
11
11
|
s();
|
|
12
12
|
}, [r]), a;
|
|
13
13
|
}
|
|
14
|
-
//#endregion
|
|
15
14
|
export { r as default };
|
|
16
15
|
/* 欲穷千里目,更上一层楼 */
|
|
17
16
|
/* 独立思考,明辨是非 */
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../use-update-effect/index.js";
|
|
4
4
|
import t from "../use-throttle-fn/index.js";
|
|
5
5
|
import { useEffect as n, useState as r } from "react";
|
|
6
|
-
|
|
6
|
+
// components/common/hooks/use-throttle-effect/index.ts
|
|
7
7
|
function i(i, a, o) {
|
|
8
8
|
let [s, c] = r({}), { run: l } = t(() => {
|
|
9
9
|
c({});
|
|
10
10
|
}, o);
|
|
11
11
|
n(() => l(), a), e(i, [s]);
|
|
12
12
|
}
|
|
13
|
-
//#endregion
|
|
14
13
|
export { i as default };
|
|
15
14
|
/* 欲穷千里目,更上一层楼 */
|
|
16
15
|
/* 独立思考,明辨是非 */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../use-latest/index.js";
|
|
4
4
|
import t from "../utils/isDev.js";
|
|
@@ -6,7 +6,7 @@ import n from "../use-unmount/index.js";
|
|
|
6
6
|
import { useMemo as r } from "react";
|
|
7
7
|
import { isFunction as i } from "@unicom-cloud/utils/is";
|
|
8
8
|
import a from "lodash/throttle";
|
|
9
|
-
|
|
9
|
+
// components/common/hooks/use-throttle-fn/index.ts
|
|
10
10
|
function o(o, s) {
|
|
11
11
|
t && (i(o) || console.error(`useThrottleFn expected parameter is a function, got ${typeof o}`));
|
|
12
12
|
let c = e(o), l = s?.wait ?? 1e3, u = r(() => a((...e) => c.current(...e), l, s), []);
|
|
@@ -18,7 +18,6 @@ function o(o, s) {
|
|
|
18
18
|
flush: u.flush
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
//#endregion
|
|
22
21
|
export { o as default };
|
|
23
22
|
/* 欲穷千里目,更上一层楼 */
|
|
24
23
|
/* 独立思考,明辨是非 */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../use-latest/index.js";
|
|
4
4
|
import t from "../use-unmount/index.js";
|
|
5
5
|
import n from "../use-memoized-fn/index.js";
|
|
6
6
|
import { useRef as r } from "react";
|
|
7
7
|
import { isFunction as i, isNull as a, isNumber as o } from "@unicom-cloud/utils/is";
|
|
8
|
-
|
|
8
|
+
// components/common/hooks/use-throttle-fn-with-raf/index.ts
|
|
9
9
|
var { requestAnimationFrame: s, cancelAnimationFrame: c, setTimeout: l, clearTimeout: u } = window;
|
|
10
10
|
function d(l) {
|
|
11
11
|
let u = e(l), d = r(null), f = n(() => {
|
|
@@ -21,7 +21,6 @@ function d(l) {
|
|
|
21
21
|
cancel: f
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
//#endregion
|
|
25
24
|
export { d as default, d as useThrottleFnWithRAF };
|
|
26
25
|
/* 欲穷千里目,更上一层楼 */
|
|
27
26
|
/* 独立思考,明辨是非 */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../use-memoized-fn/index.js";
|
|
4
4
|
import { useCallback as t, useEffect as n, useRef as r } from "react";
|
|
5
5
|
import { isNumber as i } from "@unicom-cloud/utils/is";
|
|
6
|
-
|
|
6
|
+
// components/common/hooks/use-timeout/index.ts
|
|
7
7
|
var a = (a, o) => {
|
|
8
8
|
let s = e(a), c = r(null), l = t(() => {
|
|
9
9
|
c.current && clearTimeout(c.current);
|
|
@@ -12,7 +12,6 @@ var a = (a, o) => {
|
|
|
12
12
|
if (i(o) && !(o < 0)) return c.current = setTimeout(s, o), l;
|
|
13
13
|
}, [o]), l;
|
|
14
14
|
};
|
|
15
|
-
//#endregion
|
|
16
15
|
export { a as default };
|
|
17
16
|
/* 欲穷千里目,更上一层楼 */
|
|
18
17
|
/* 独立思考,明辨是非 */
|
package/hooks/use-title/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../utils/isBrowser.js";
|
|
4
4
|
import t from "../use-unmount/index.js";
|
|
5
5
|
import { useEffect as n, useRef as r } from "react";
|
|
6
|
-
|
|
6
|
+
// components/common/hooks/use-title/index.ts
|
|
7
7
|
var i = { restoreOnUnmount: !1 };
|
|
8
8
|
function a(a, o = i) {
|
|
9
9
|
let s = r(e ? document.title : "");
|
|
@@ -13,7 +13,6 @@ function a(a, o = i) {
|
|
|
13
13
|
o.restoreOnUnmount && (document.title = s.current);
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
|
-
//#endregion
|
|
17
16
|
export { a as default };
|
|
18
17
|
/* 欲穷千里目,更上一层楼 */
|
|
19
18
|
/* 独立思考,明辨是非 */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import { useMemo as e, useState as t } from "react";
|
|
4
4
|
import { isUndefined as n } from "@unicom-cloud/utils/is";
|
|
5
|
-
|
|
5
|
+
// components/common/hooks/use-toggle/index.ts
|
|
6
6
|
function r(r = !1, i) {
|
|
7
7
|
let [a, o] = t(r);
|
|
8
8
|
return [a, e(() => {
|
|
@@ -15,7 +15,6 @@ function r(r = !1, i) {
|
|
|
15
15
|
};
|
|
16
16
|
}, [])];
|
|
17
17
|
}
|
|
18
|
-
//#endregion
|
|
19
18
|
export { r as default };
|
|
20
19
|
/* 欲穷千里目,更上一层楼 */
|
|
21
20
|
/* 独立思考,明辨是非 */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import { useEffect as e, useRef as t } from "react";
|
|
4
|
-
|
|
4
|
+
// components/common/hooks/use-tracked-effect/index.ts
|
|
5
5
|
var n = (e, t) => e ? e.map((n, r) => Object.is(e[r], t?.[r]) ? -1 : r).filter((e) => e >= 0) : t ? t.map((e, t) => t) : [], r = (r, i) => {
|
|
6
6
|
let a = t(void 0);
|
|
7
7
|
e(() => {
|
|
@@ -9,7 +9,6 @@ var n = (e, t) => e ? e.map((n, r) => Object.is(e[r], t?.[r]) ? -1 : r).filter((
|
|
|
9
9
|
return a.current = i, r(e, t, i);
|
|
10
10
|
}, i);
|
|
11
11
|
};
|
|
12
|
-
//#endregion
|
|
13
12
|
export { r as default };
|
|
14
13
|
/* 欲穷千里目,更上一层楼 */
|
|
15
14
|
/* 独立思考,明辨是非 */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../use-latest/index.js";
|
|
4
4
|
import t from "../utils/isDev.js";
|
|
5
5
|
import { useEffect as n } from "react";
|
|
6
6
|
import { isFunction as r } from "@unicom-cloud/utils/is";
|
|
7
|
-
|
|
7
|
+
// components/common/hooks/use-unmount/index.ts
|
|
8
8
|
var i = (i) => {
|
|
9
9
|
t && (r(i) || console.error(`useUnmount expected parameter is a function, got ${typeof i}`));
|
|
10
10
|
let a = e(i);
|
|
@@ -12,7 +12,6 @@ var i = (i) => {
|
|
|
12
12
|
a.current();
|
|
13
13
|
}, []);
|
|
14
14
|
};
|
|
15
|
-
//#endregion
|
|
16
15
|
export { i as default };
|
|
17
16
|
/* 欲穷千里目,更上一层楼 */
|
|
18
17
|
/* 独立思考,明辨是非 */
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import { useEffect as e, useRef as t } from "react";
|
|
4
|
-
|
|
4
|
+
// components/common/hooks/use-unmounted-ref/index.tsx
|
|
5
5
|
var n = () => {
|
|
6
6
|
let n = t(!1);
|
|
7
7
|
return e(() => (n.current = !1, () => {
|
|
8
8
|
n.current = !0;
|
|
9
9
|
}), []), n;
|
|
10
10
|
};
|
|
11
|
-
//#endregion
|
|
12
11
|
export { n as default };
|
|
13
12
|
/* 欲穷千里目,更上一层楼 */
|
|
14
13
|
/* 独立思考,明辨是非 */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../use-memoized-fn/index.js";
|
|
4
4
|
import t from "../use-state-callback/index.js";
|
|
5
5
|
import { useEffect as n } from "react";
|
|
6
6
|
import { isFunction as r } from "@unicom-cloud/utils/is";
|
|
7
|
-
|
|
7
|
+
// components/common/hooks/use-update/index.ts
|
|
8
8
|
function i(i) {
|
|
9
9
|
let [a, o, s] = t({}), c = e((e) => {
|
|
10
10
|
let t = {};
|
|
@@ -14,7 +14,6 @@ function i(i) {
|
|
|
14
14
|
});
|
|
15
15
|
return n(() => () => {}, [a]), c;
|
|
16
16
|
}
|
|
17
|
-
//#endregion
|
|
18
17
|
export { i as default };
|
|
19
18
|
/* 欲穷千里目,更上一层楼 */
|
|
20
19
|
/* 独立思考,明辨是非 */
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../create-update-effect/index.js";
|
|
4
4
|
import { useEffect as t } from "react";
|
|
5
|
-
|
|
5
|
+
// components/common/hooks/use-update-effect/index.ts
|
|
6
6
|
var n = e(t);
|
|
7
|
-
//#endregion
|
|
8
7
|
export { n as default };
|
|
9
8
|
/* 欲穷千里目,更上一层楼 */
|
|
10
9
|
/* 独立思考,明辨是非 */
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../create-update-effect/index.js";
|
|
4
4
|
import { useLayoutEffect as t } from "react";
|
|
5
|
-
|
|
5
|
+
// components/common/hooks/use-update-layout-effect/index.ts
|
|
6
6
|
var n = e(t);
|
|
7
|
-
//#endregion
|
|
8
7
|
export { n as default };
|
|
9
8
|
/* 欲穷千里目,更上一层楼 */
|
|
10
9
|
/* 独立思考,明辨是非 */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../use-memoized-fn/index.js";
|
|
4
4
|
import t from "../use-update/index.js";
|
|
@@ -6,7 +6,7 @@ import { useMemo as n, useRef as r } from "react";
|
|
|
6
6
|
import { isFunction as i } from "@unicom-cloud/utils/is";
|
|
7
7
|
import { parse as a, stringify as o } from "@unicom-cloud/utils/query-string";
|
|
8
8
|
import { useLocation as s, useNavigate as c } from "react-router";
|
|
9
|
-
|
|
9
|
+
// components/common/hooks/use-url-state/index.ts
|
|
10
10
|
var l = {
|
|
11
11
|
parseNumbers: !1,
|
|
12
12
|
parseBooleans: !1
|
|
@@ -38,7 +38,6 @@ var l = {
|
|
|
38
38
|
});
|
|
39
39
|
})];
|
|
40
40
|
};
|
|
41
|
-
//#endregion
|
|
42
41
|
export { d as default };
|
|
43
42
|
/* 欲穷千里目,更上一层楼 */
|
|
44
43
|
/* 独立思考,明辨是非 */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../use-latest/index.js";
|
|
4
4
|
import t from "../utils/domTarget.js";
|
|
@@ -9,7 +9,7 @@ import a from "../use-size/index.js";
|
|
|
9
9
|
import { useEffect as o, useMemo as s, useRef as c, useState as l } from "react";
|
|
10
10
|
import { isNumber as u } from "@unicom-cloud/utils/is";
|
|
11
11
|
import { cssUnit as d } from "@unicom-cloud/utils/css";
|
|
12
|
-
|
|
12
|
+
// components/common/hooks/use-virtual-list/index.ts
|
|
13
13
|
var f = (f, p) => {
|
|
14
14
|
let { containerTarget: m, wrapperTarget: h, itemHeight: g, overscan: _ = 5 } = p, v = e(g), y = a(m), b = c(!1), [x, S] = l([]), [C, w] = l({}), T = (e, t) => {
|
|
15
15
|
if (u(v.current)) return Math.ceil(e / v.current);
|
|
@@ -59,7 +59,6 @@ var f = (f, p) => {
|
|
|
59
59
|
n && (b.current = !0, n.scrollTop = D(e), k());
|
|
60
60
|
})];
|
|
61
61
|
};
|
|
62
|
-
//#endregion
|
|
63
62
|
export { f as default };
|
|
64
63
|
/* 欲穷千里目,更上一层楼 */
|
|
65
64
|
/* 独立思考,明辨是非 */
|
package/hooks/use-watch/index.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../use-previous/index.js";
|
|
4
4
|
import { useEffect as t } from "react";
|
|
5
5
|
import { isFunction as n } from "@unicom-cloud/utils/is";
|
|
6
|
-
|
|
6
|
+
// components/common/hooks/use-watch/index.ts
|
|
7
7
|
function r(r, i) {
|
|
8
8
|
let a = e(r);
|
|
9
9
|
return t(() => {
|
|
10
10
|
r !== a && n(i) && i(r, a);
|
|
11
11
|
}, [r]), [r, a];
|
|
12
12
|
}
|
|
13
|
-
//#endregion
|
|
14
13
|
export { r as default };
|
|
15
14
|
/* 欲穷千里目,更上一层楼 */
|
|
16
15
|
/* 独立思考,明辨是非 */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../use-latest/index.js";
|
|
4
4
|
import t from "../use-unmount/index.js";
|
|
5
5
|
import n from "../use-memoized-fn/index.js";
|
|
6
6
|
import { useEffect as r, useRef as i, useState as a } from "react";
|
|
7
|
-
|
|
7
|
+
// components/common/hooks/use-web-socket/index.ts
|
|
8
8
|
var o = /* @__PURE__ */ function(e) {
|
|
9
9
|
return e[e.Connecting = 0] = "Connecting", e[e.Open = 1] = "Open", e[e.Closing = 2] = "Closing", e[e.Closed = 3] = "Closed", e;
|
|
10
10
|
}({});
|
|
@@ -23,7 +23,7 @@ function s(o, s = {}) {
|
|
|
23
23
|
}, e.onmessage = (t) => {
|
|
24
24
|
D.current === e && (S.current?.(t, e), _(t));
|
|
25
25
|
}, e.onclose = (t) => {
|
|
26
|
-
x.current?.(t, e), D.current === e && O(),
|
|
26
|
+
x.current?.(t, e), D.current === e && O(), D.current && D.current !== e || y(e.readyState || 3);
|
|
27
27
|
}, D.current = e;
|
|
28
28
|
}, A = (e) => {
|
|
29
29
|
if (w.current === 1) D.current?.send?.(e);
|
|
@@ -46,7 +46,6 @@ function s(o, s = {}) {
|
|
|
46
46
|
webSocketIns: D.current
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
//#endregion
|
|
50
49
|
export { o as ReadyState, s as default };
|
|
51
50
|
/* 欲穷千里目,更上一层楼 */
|
|
52
51
|
/* 独立思考,明辨是非 */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import { useEffect as e, useRef as t } from "react";
|
|
4
|
-
|
|
4
|
+
// components/common/hooks/use-why-did-you-update/index.ts
|
|
5
5
|
function n(n, r) {
|
|
6
6
|
let i = t({});
|
|
7
7
|
e(() => {
|
|
@@ -20,7 +20,6 @@ function n(n, r) {
|
|
|
20
20
|
i.current = r;
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
//#endregion
|
|
24
23
|
export { n as default };
|
|
25
24
|
/* 欲穷千里目,更上一层楼 */
|
|
26
25
|
/* 独立思考,明辨是非 */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../use-latest/index.js";
|
|
4
4
|
import { getDocumentElement as t } from "../../utils/dom.js";
|
|
@@ -6,7 +6,7 @@ import n from "../use-listen-window-resize/index.js";
|
|
|
6
6
|
import { useDeferredValue as r, useEffect as i, useMemo as a, useState as o } from "react";
|
|
7
7
|
import { isFunction as s } from "@unicom-cloud/utils/is";
|
|
8
8
|
import c from "lodash/debounce";
|
|
9
|
-
|
|
9
|
+
// components/common/hooks/use-window-size/index.ts
|
|
10
10
|
function l(l) {
|
|
11
11
|
let [u, d] = o({ ...m() }), f = e(l), p = r(u);
|
|
12
12
|
function m(e) {
|
|
@@ -28,7 +28,6 @@ function l(l) {
|
|
|
28
28
|
h.cancel();
|
|
29
29
|
}), []), p;
|
|
30
30
|
}
|
|
31
|
-
//#endregion
|
|
32
31
|
export { l as default };
|
|
33
32
|
/* 欲穷千里目,更上一层楼 */
|
|
34
33
|
/* 独立思考,明辨是非 */
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "./domTarget.js";
|
|
4
4
|
import t from "../use-unmount/index.js";
|
|
5
5
|
import n from "./depsAreSame.js";
|
|
6
6
|
import { useRef as r } from "react";
|
|
7
7
|
import i from "lodash/castArray";
|
|
8
|
-
|
|
8
|
+
// components/common/hooks/utils/createEffectWithTarget.ts
|
|
9
9
|
var a = (a) => (o, s, c) => {
|
|
10
10
|
let l = r(!1), u = r([]), d = r([]), f = r(void 0);
|
|
11
11
|
a(() => {
|
|
12
12
|
let t = i(c).map((t) => e(t));
|
|
13
|
-
l.current ?
|
|
13
|
+
l.current ? t.length === u.current.length && n(u.current, t) && n(d.current, s) || (f.current?.(), u.current = t, d.current = s, f.current = o()) : (l.current = !0, u.current = t, d.current = s, f.current = o());
|
|
14
14
|
}), t(() => {
|
|
15
15
|
f.current?.(), l.current = !1;
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
|
-
//#endregion
|
|
19
18
|
export { a as default };
|
|
20
19
|
/* 欲穷千里目,更上一层楼 */
|
|
21
20
|
/* 独立思考,明辨是非 */
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
|
-
|
|
3
|
+
// components/common/hooks/utils/depsAreSame.ts
|
|
4
4
|
function e(e, t) {
|
|
5
5
|
if (e === t) return !0;
|
|
6
6
|
for (let n = 0; n < e.length; n++) if (!Object.is(e[n], t[n])) return !1;
|
|
7
7
|
return !0;
|
|
8
8
|
}
|
|
9
|
-
//#endregion
|
|
10
9
|
export { e as default };
|
|
11
10
|
/* 欲穷千里目,更上一层楼 */
|
|
12
11
|
/* 独立思考,明辨是非 */
|
package/hooks/utils/depsEqual.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import { isEqual as e } from "@unicom-cloud/utils/is";
|
|
4
|
-
|
|
4
|
+
// components/common/hooks/utils/depsEqual.ts
|
|
5
5
|
var t = (t = [], n = []) => e(t, n);
|
|
6
|
-
//#endregion
|
|
7
6
|
export { t as depsEqual };
|
|
8
7
|
/* 欲穷千里目,更上一层楼 */
|
|
9
8
|
/* 独立思考,明辨是非 */
|
package/hooks/utils/domTarget.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "./isBrowser.js";
|
|
4
4
|
import { isFunction as t } from "@unicom-cloud/utils/is";
|
|
5
|
-
|
|
5
|
+
// components/common/hooks/utils/domTarget.ts
|
|
6
6
|
function n(n, r) {
|
|
7
7
|
if (!e) return;
|
|
8
8
|
if (!n) return r;
|
|
9
9
|
let i;
|
|
10
10
|
return i = t(n) ? n() : "current" in n ? n.current : n, i;
|
|
11
11
|
}
|
|
12
|
-
//#endregion
|
|
13
12
|
export { n as default, n as getTargetElement };
|
|
14
13
|
/* 欲穷千里目,更上一层楼 */
|
|
15
14
|
/* 独立思考,明辨是非 */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "./domTarget.js";
|
|
4
4
|
import t from "lodash/castArray";
|
|
5
|
-
|
|
5
|
+
// components/common/hooks/utils/getDocumentOrShadow.ts
|
|
6
6
|
var n = (t) => t.every((t) => {
|
|
7
7
|
let n = e(t);
|
|
8
8
|
return n ? n.getRootNode() instanceof ShadowRoot : !1;
|
|
@@ -11,7 +11,6 @@ var n = (t) => t.every((t) => {
|
|
|
11
11
|
let a = t(i);
|
|
12
12
|
return n(a) ? r(e(a[0])) : document;
|
|
13
13
|
};
|
|
14
|
-
//#endregion
|
|
15
14
|
export { i as default };
|
|
16
15
|
/* 欲穷千里目,更上一层楼 */
|
|
17
16
|
/* 独立思考,明辨是非 */
|
package/hooks/utils/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
|
-
|
|
3
|
+
// components/common/hooks/utils/index.ts
|
|
4
4
|
var e = {};
|
|
5
|
-
//#endregion
|
|
6
5
|
export { e as default };
|
|
7
6
|
/* 欲穷千里目,更上一层楼 */
|
|
8
7
|
/* 独立思考,明辨是非 */
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import { isAppleDevice as e } from "@unicom-cloud/utils/constants/platform";
|
|
4
|
-
|
|
4
|
+
// components/common/hooks/utils/isAppleDevice.ts
|
|
5
5
|
var t = e;
|
|
6
|
-
//#endregion
|
|
7
6
|
export { t as default };
|
|
8
7
|
/* 欲穷千里目,更上一层楼 */
|
|
9
8
|
/* 独立思考,明辨是非 */
|
package/hooks/utils/isBrowser.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import { isBrowser as e } from "@unicom-cloud/utils/constants/platform";
|
|
4
|
-
|
|
4
|
+
// components/common/hooks/utils/isBrowser.ts
|
|
5
5
|
var t = e;
|
|
6
|
-
//#endregion
|
|
7
6
|
export { t as default };
|
|
8
7
|
/* 欲穷千里目,更上一层楼 */
|
|
9
8
|
/* 独立思考,明辨是非 */
|
package/hooks/utils/isDev.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
|
-
|
|
3
|
+
// components/common/hooks/utils/isDev.ts
|
|
4
4
|
var e = process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test";
|
|
5
|
-
//#endregion
|
|
6
5
|
export { e as default };
|
|
7
6
|
/* 欲穷千里目,更上一层楼 */
|
|
8
7
|
/* 独立思考,明辨是非 */
|
package/hooks/utils/rect.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import { getBody as e, getDocumentElement as t } from "../../utils/dom.js";
|
|
4
|
-
|
|
4
|
+
// components/common/hooks/utils/rect.ts
|
|
5
5
|
function n(n) {
|
|
6
6
|
return n === document || n === t() || n === e() ? Math.max(window.pageYOffset, t().scrollTop, e().scrollTop) : n.scrollTop;
|
|
7
7
|
}
|
|
@@ -11,7 +11,6 @@ function r(n) {
|
|
|
11
11
|
function i(n) {
|
|
12
12
|
return n.clientHeight || Math.max(t().clientHeight, e().clientHeight);
|
|
13
13
|
}
|
|
14
|
-
//#endregion
|
|
15
14
|
export { i as getClientHeight, r as getScrollHeight, n as getScrollTop };
|
|
16
15
|
/* 欲穷千里目,更上一层楼 */
|
|
17
16
|
/* 独立思考,明辨是非 */
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "./useEffectWithTarget.js";
|
|
4
4
|
import { depsEqual as t } from "./depsEqual.js";
|
|
5
5
|
import { useRef as n } from "react";
|
|
6
|
-
|
|
6
|
+
// components/common/hooks/utils/useDeepCompareWithTarget.ts
|
|
7
7
|
var r = (r, i, a) => {
|
|
8
8
|
let o = n(void 0), s = n(0);
|
|
9
9
|
t(i, o.current) || (s.current += 1), o.current = i, e(r, [s.current], a);
|
|
10
10
|
};
|
|
11
|
-
//#endregion
|
|
12
11
|
export { r as default };
|
|
13
12
|
/* 欲穷千里目,更上一层楼 */
|
|
14
13
|
/* 独立思考,明辨是非 */
|