@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,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../../../use-unmount/index.js";
|
|
4
4
|
import t from "../../../use-creation/index.js";
|
|
@@ -6,7 +6,7 @@ import { getCache as n, setCache as r } from "../utils/cache.js";
|
|
|
6
6
|
import { getCachePromise as i, setCachePromise as a } from "../utils/cachePromise.js";
|
|
7
7
|
import { subscribe as o, trigger as s } from "../utils/cacheSubscribe.js";
|
|
8
8
|
import { useRef as c } from "react";
|
|
9
|
-
|
|
9
|
+
// components/common/hooks/use-request/src/plugins/useCachePlugin.ts
|
|
10
10
|
var l = (l, { cacheKey: u, cacheTime: d = 3e5, staleTime: f = 0, setCache: p, getCache: m }) => {
|
|
11
11
|
let h = c(void 0), g = c(void 0), _ = (e, t) => {
|
|
12
12
|
p ? p(t) : r(e, d, t), s(e, t.data);
|
|
@@ -56,7 +56,6 @@ var l = (l, { cacheKey: u, cacheTime: d = 3e5, staleTime: f = 0, setCache: p, ge
|
|
|
56
56
|
}
|
|
57
57
|
} : {};
|
|
58
58
|
};
|
|
59
|
-
//#endregion
|
|
60
59
|
export { l as default };
|
|
61
60
|
/* 欲穷千里目,更上一层楼 */
|
|
62
61
|
/* 独立思考,明辨是非 */
|
|
@@ -1,10 +1,10 @@
|
|
|
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 { useEffect as t, useMemo as n, useRef as r } from "react";
|
|
5
5
|
import { isFalse as i, isUndefined as a } from "@unicom-cloud/utils/is";
|
|
6
6
|
import o from "lodash/debounce";
|
|
7
|
-
|
|
7
|
+
// components/common/hooks/use-request/src/plugins/useDebouncePlugin.ts
|
|
8
8
|
var s = (s, { debounceWait: c, debounceLeading: l, debounceTrailing: u, debounceMaxWait: d, ready: f }) => {
|
|
9
9
|
let p = r(void 0), m = n(() => {
|
|
10
10
|
let e = {};
|
|
@@ -37,7 +37,6 @@ var s = (s, { debounceWait: c, debounceLeading: l, debounceTrailing: u, debounce
|
|
|
37
37
|
p.current?.cancel?.();
|
|
38
38
|
} } : {};
|
|
39
39
|
};
|
|
40
|
-
//#endregion
|
|
41
40
|
export { s as default };
|
|
42
41
|
/* 欲穷千里目,更上一层楼 */
|
|
43
42
|
/* 独立思考,明辨是非 */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import { useRef as e } from "react";
|
|
4
|
-
|
|
4
|
+
// components/common/hooks/use-request/src/plugins/useLoadingDelayPlugin.ts
|
|
5
5
|
var t = (t, { loadingDelay: n, ready: r }) => {
|
|
6
6
|
let i = e(void 0);
|
|
7
7
|
if (!n) return {};
|
|
@@ -20,7 +20,6 @@ var t = (t, { loadingDelay: n, ready: r }) => {
|
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
|
-
//#endregion
|
|
24
23
|
export { t as default };
|
|
25
24
|
/* 欲穷千里目,更上一层楼 */
|
|
26
25
|
/* 独立思考,明辨是非 */
|
|
@@ -1,10 +1,10 @@
|
|
|
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 "../utils/isDocumentVisible.js";
|
|
5
5
|
import n from "../utils/subscribeReVisible.js";
|
|
6
6
|
import { useRef as r } from "react";
|
|
7
|
-
|
|
7
|
+
// components/common/hooks/use-request/src/plugins/usePollingPlugin.ts
|
|
8
8
|
var i = (i, { pollingInterval: a, pollingWhenHidden: o = !0, pollingErrorRetryCount: s = -1 }) => {
|
|
9
9
|
let c = r(void 0), l = r(void 0), u = r(0), d = () => {
|
|
10
10
|
c.current && clearTimeout(c.current), l.current?.();
|
|
@@ -33,7 +33,6 @@ var i = (i, { pollingInterval: a, pollingWhenHidden: o = !0, pollingErrorRetryCo
|
|
|
33
33
|
}
|
|
34
34
|
} : {};
|
|
35
35
|
};
|
|
36
|
-
//#endregion
|
|
37
36
|
export { i as default };
|
|
38
37
|
/* 欲穷千里目,更上一层楼 */
|
|
39
38
|
/* 独立思考,明辨是非 */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../../../use-unmount/index.js";
|
|
4
4
|
import t from "../utils/limit.js";
|
|
5
5
|
import n from "../utils/subscribeFocus.js";
|
|
6
6
|
import { useEffect as r, useRef as i } from "react";
|
|
7
|
-
|
|
7
|
+
// components/common/hooks/use-request/src/plugins/useRefreshOnWindowFocusPlugin.ts
|
|
8
8
|
var a = (a, { refreshOnWindowFocus: o, focusTimespan: s = 5e3 }) => {
|
|
9
9
|
let c = i(void 0), l = () => {
|
|
10
10
|
c.current?.();
|
|
@@ -23,7 +23,6 @@ var a = (a, { refreshOnWindowFocus: o, focusTimespan: s = 5e3 }) => {
|
|
|
23
23
|
l();
|
|
24
24
|
}), {};
|
|
25
25
|
};
|
|
26
|
-
//#endregion
|
|
27
26
|
export { a as default };
|
|
28
27
|
/* 欲穷千里目,更上一层楼 */
|
|
29
28
|
/* 独立思考,明辨是非 */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import { useRef as e } from "react";
|
|
4
|
-
|
|
4
|
+
// components/common/hooks/use-request/src/plugins/useRetryPlugin.ts
|
|
5
5
|
var t = (t, { retryInterval: n, retryCount: r }) => {
|
|
6
6
|
let i = e(void 0), a = e(0), o = e(!1);
|
|
7
7
|
return r ? {
|
|
@@ -24,7 +24,6 @@ var t = (t, { retryInterval: n, retryCount: r }) => {
|
|
|
24
24
|
}
|
|
25
25
|
} : {};
|
|
26
26
|
};
|
|
27
|
-
//#endregion
|
|
28
27
|
export { t as default };
|
|
29
28
|
/* 欲穷千里目,更上一层楼 */
|
|
30
29
|
/* 独立思考,明辨是非 */
|
|
@@ -1,9 +1,9 @@
|
|
|
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
|
import { isUndefined as n } from "@unicom-cloud/utils/is";
|
|
5
5
|
import r from "lodash/throttle";
|
|
6
|
-
|
|
6
|
+
// components/common/hooks/use-request/src/plugins/useThrottlePlugin.ts
|
|
7
7
|
var i = (i, { throttleWait: a, throttleLeading: o, throttleTrailing: s }) => {
|
|
8
8
|
let c = t(void 0), l = {};
|
|
9
9
|
return n(o) || (l.leading = o), n(s) || (l.trailing = s), e(() => {
|
|
@@ -27,7 +27,6 @@ var i = (i, { throttleWait: a, throttleLeading: o, throttleTrailing: s }) => {
|
|
|
27
27
|
c.current?.cancel?.();
|
|
28
28
|
} } : {};
|
|
29
29
|
};
|
|
30
|
-
//#endregion
|
|
31
30
|
export { i as default };
|
|
32
31
|
/* 欲穷千里目,更上一层楼 */
|
|
33
32
|
/* 独立思考,明辨是非 */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "./plugins/useAutoRunPlugin.js";
|
|
4
4
|
import t from "./plugins/useCachePlugin.js";
|
|
@@ -9,7 +9,7 @@ import a from "./plugins/useRefreshOnWindowFocusPlugin.js";
|
|
|
9
9
|
import o from "./plugins/useRetryPlugin.js";
|
|
10
10
|
import s from "./plugins/useThrottlePlugin.js";
|
|
11
11
|
import c from "./useRequestImplement.js";
|
|
12
|
-
|
|
12
|
+
// components/common/hooks/use-request/src/useRequest.ts
|
|
13
13
|
function l(l, u, d) {
|
|
14
14
|
return c(l, u, [
|
|
15
15
|
...d || [],
|
|
@@ -23,7 +23,6 @@ function l(l, u, d) {
|
|
|
23
23
|
o
|
|
24
24
|
]);
|
|
25
25
|
}
|
|
26
|
-
//#endregion
|
|
27
26
|
export { l as default };
|
|
28
27
|
/* 欲穷千里目,更上一层楼 */
|
|
29
28
|
/* 独立思考,明辨是非 */
|
|
@@ -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";
|
|
@@ -9,7 +9,7 @@ import a from "../../use-creation/index.js";
|
|
|
9
9
|
import o from "../../use-mount/index.js";
|
|
10
10
|
import s from "./Fetch.js";
|
|
11
11
|
import { isArray as c, isExist as l } from "@unicom-cloud/utils/is";
|
|
12
|
-
|
|
12
|
+
// components/common/hooks/use-request/src/useRequestImplement.ts
|
|
13
13
|
function u(u, d = {}, f = []) {
|
|
14
14
|
let { manual: p = !1, ready: m = !0, ...h } = d;
|
|
15
15
|
t && d.defaultParams && !c(d.defaultParams) && console.warn(`expected defaultParams is array, got ${typeof d.defaultParams}`);
|
|
@@ -41,7 +41,6 @@ function u(u, d = {}, f = []) {
|
|
|
41
41
|
mutate: r(y.mutate.bind(y))
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
//#endregion
|
|
45
44
|
export { u as default };
|
|
46
45
|
/* 欲穷千里目,更上一层楼 */
|
|
47
46
|
/* 独立思考,明辨是非 */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "lodash/castArray";
|
|
4
|
-
|
|
4
|
+
// components/common/hooks/use-request/src/utils/cache.ts
|
|
5
5
|
var t = /* @__PURE__ */ new Map(), n = (e) => {
|
|
6
6
|
e?.timer && clearTimeout(e.timer);
|
|
7
7
|
}, r = (e, r, i) => {
|
|
@@ -22,7 +22,6 @@ var t = /* @__PURE__ */ new Map(), n = (e) => {
|
|
|
22
22
|
t.clear();
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
//#endregion
|
|
26
25
|
export { a as clearCache, i as getCache, r as setCache };
|
|
27
26
|
/* 欲穷千里目,更上一层楼 */
|
|
28
27
|
/* 独立思考,明辨是非 */
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
|
-
|
|
3
|
+
// components/common/hooks/use-request/src/utils/cachePromise.ts
|
|
4
4
|
var e = /* @__PURE__ */ new Map(), t = (t) => e.get(t), n = (t, n) => {
|
|
5
5
|
e.set(t, n), n.then((n) => (e.delete(t), n)).catch(() => {
|
|
6
6
|
e.delete(t);
|
|
7
7
|
});
|
|
8
8
|
};
|
|
9
|
-
//#endregion
|
|
10
9
|
export { t as getCachePromise, n as setCachePromise };
|
|
11
10
|
/* 欲穷千里目,更上一层楼 */
|
|
12
11
|
/* 独立思考,明辨是非 */
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
|
-
|
|
3
|
+
// components/common/hooks/use-request/src/utils/cacheSubscribe.ts
|
|
4
4
|
var e = {}, t = (t, n) => {
|
|
5
5
|
e[t] && e[t].forEach((e) => e(n));
|
|
6
6
|
}, n = (t, n) => (e[t] || (e[t] = []), e[t].push(n), function() {
|
|
7
7
|
let r = e[t].indexOf(n);
|
|
8
8
|
e[t].splice(r, 1);
|
|
9
9
|
});
|
|
10
|
-
//#endregion
|
|
11
10
|
export { n as subscribe, t as trigger };
|
|
12
11
|
/* 欲穷千里目,更上一层楼 */
|
|
13
12
|
/* 独立思考,明辨是非 */
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../../../utils/isBrowser.js";
|
|
4
|
-
|
|
4
|
+
// components/common/hooks/use-request/src/utils/isDocumentVisible.ts
|
|
5
5
|
function t() {
|
|
6
6
|
return !e || document.visibilityState !== "hidden";
|
|
7
7
|
}
|
|
8
|
-
//#endregion
|
|
9
8
|
export { t as default };
|
|
10
9
|
/* 欲穷千里目,更上一层楼 */
|
|
11
10
|
/* 独立思考,明辨是非 */
|
|
@@ -1,10 +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 { isUndefined as t } from "@unicom-cloud/utils/is";
|
|
5
|
-
|
|
5
|
+
// components/common/hooks/use-request/src/utils/isOnline.ts
|
|
6
6
|
var n = () => e && !t(navigator.onLine) ? navigator.onLine : !0;
|
|
7
|
-
//#endregion
|
|
8
7
|
export { n as default };
|
|
9
8
|
/* 欲穷千里目,更上一层楼 */
|
|
10
9
|
/* 独立思考,明辨是非 */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
|
-
|
|
3
|
+
// components/common/hooks/use-request/src/utils/limit.ts
|
|
4
4
|
function e(e, t) {
|
|
5
5
|
let n = !1;
|
|
6
6
|
return (...r) => {
|
|
@@ -9,7 +9,6 @@ function e(e, t) {
|
|
|
9
9
|
}, t));
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
//#endregion
|
|
13
12
|
export { e as default };
|
|
14
13
|
/* 欲穷千里目,更上一层楼 */
|
|
15
14
|
/* 独立思考,明辨是非 */
|
|
@@ -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 "./isDocumentVisible.js";
|
|
5
5
|
import n from "./isOnline.js";
|
|
6
|
-
|
|
6
|
+
// components/common/hooks/use-request/src/utils/subscribeFocus.ts
|
|
7
7
|
var r = /* @__PURE__ */ new Set();
|
|
8
8
|
function i(e) {
|
|
9
9
|
return r.add(e), function() {
|
|
@@ -16,7 +16,6 @@ if (e) {
|
|
|
16
16
|
};
|
|
17
17
|
window.addEventListener("visibilitychange", e, !1), window.addEventListener("focus", e, !1);
|
|
18
18
|
}
|
|
19
|
-
//#endregion
|
|
20
19
|
export { i as default };
|
|
21
20
|
/* 欲穷千里目,更上一层楼 */
|
|
22
21
|
/* 独立思考,明辨是非 */
|
|
@@ -1,8 +1,8 @@
|
|
|
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 "./isDocumentVisible.js";
|
|
5
|
-
|
|
5
|
+
// components/common/hooks/use-request/src/utils/subscribeReVisible.ts
|
|
6
6
|
var n = /* @__PURE__ */ new Set();
|
|
7
7
|
function r(e) {
|
|
8
8
|
return n.add(e), function() {
|
|
@@ -12,7 +12,6 @@ function r(e) {
|
|
|
12
12
|
e && window.addEventListener("visibilitychange", () => {
|
|
13
13
|
t() && n.forEach((e) => e());
|
|
14
14
|
}, !1);
|
|
15
|
-
//#endregion
|
|
16
15
|
export { r as default };
|
|
17
16
|
/* 欲穷千里目,更上一层楼 */
|
|
18
17
|
/* 独立思考,明辨是非 */
|
|
@@ -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-creation/index.js";
|
|
5
5
|
import { useRef as n, useState as r } from "react";
|
|
6
6
|
import { isFunction as i } from "@unicom-cloud/utils/is";
|
|
7
|
-
|
|
7
|
+
// components/common/hooks/use-reset-state/index.ts
|
|
8
8
|
var a = (a) => {
|
|
9
9
|
let o = n(a), s = t(() => i(o.current) ? o.current() : o.current, []), [c, l] = r(s);
|
|
10
10
|
return [
|
|
@@ -15,7 +15,6 @@ var a = (a) => {
|
|
|
15
15
|
})
|
|
16
16
|
];
|
|
17
17
|
};
|
|
18
|
-
//#endregion
|
|
19
18
|
export { a as default };
|
|
20
19
|
/* 欲穷千里目,更上一层楼 */
|
|
21
20
|
/* 独立思考,明辨是非 */
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../use-size/index.js";
|
|
4
|
-
|
|
4
|
+
// components/common/hooks/use-resize-observer/index.ts
|
|
5
5
|
var t = e;
|
|
6
|
-
//#endregion
|
|
7
6
|
export { t as default };
|
|
8
7
|
/* 欲穷千里目,更上一层楼 */
|
|
9
8
|
/* 独立思考,明辨是非 */
|
|
@@ -1,39 +1,38 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../use-latest/index.js";
|
|
4
4
|
import { noop as t, uniq as n } from "../../utils/lodash.js";
|
|
5
5
|
import "../../utils/index.js";
|
|
6
6
|
import { startTransition as r, useDeferredValue as i, useEffect as a, useState as o } from "react";
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
function
|
|
11
|
-
let { immediate:
|
|
7
|
+
import { isArrayAndNotEmpty as s, isElement as c, isFunction as l } from "@unicom-cloud/utils/is";
|
|
8
|
+
import u from "lodash/throttle";
|
|
9
|
+
// components/common/hooks/use-resize-observers/index.ts
|
|
10
|
+
function d(d, f = [], p = {}) {
|
|
11
|
+
let { immediate: m, shouldReturn: h = !1, ...g } = p, [_, v] = o(), y = i(_), b = e(d);
|
|
12
12
|
if (a(() => {
|
|
13
|
-
let e =
|
|
14
|
-
let n =
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
let e = u((e, t) => {
|
|
14
|
+
let n = b.current;
|
|
15
|
+
l(n) && n(e, t), h && r(() => {
|
|
16
|
+
v(e);
|
|
17
17
|
});
|
|
18
18
|
}, 227);
|
|
19
|
-
|
|
20
|
-
let i = n([].concat(
|
|
21
|
-
if (!i
|
|
19
|
+
m && e();
|
|
20
|
+
let i = n([].concat(f).filter((e, t, n) => c(e, !0)));
|
|
21
|
+
if (!s(i)) return t;
|
|
22
22
|
let a = new ResizeObserver(e);
|
|
23
23
|
return i.forEach((e, t, n) => {
|
|
24
|
-
a.observe(e, { ...
|
|
24
|
+
a.observe(e, { ...g });
|
|
25
25
|
}), () => {
|
|
26
26
|
i.forEach((e, t, n) => {
|
|
27
27
|
a.unobserve(e);
|
|
28
28
|
}), a.disconnect(), e.cancel();
|
|
29
29
|
};
|
|
30
30
|
}, [
|
|
31
|
-
...
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
]),
|
|
31
|
+
...f,
|
|
32
|
+
m,
|
|
33
|
+
h
|
|
34
|
+
]), h) return y;
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
export { u as default, u as useResizeObservers };
|
|
36
|
+
export { d as default, d as useResizeObservers };
|
|
38
37
|
/* 欲穷千里目,更上一层楼 */
|
|
39
38
|
/* 独立思考,明辨是非 */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../utils/isBrowser.js";
|
|
4
4
|
import { useEffect as t, useState as n } from "react";
|
|
5
|
-
|
|
5
|
+
// components/common/hooks/use-responsive/index.ts
|
|
6
6
|
var r = /* @__PURE__ */ new Set(), i, a = {
|
|
7
7
|
xs: 0,
|
|
8
8
|
sm: 576,
|
|
@@ -39,7 +39,6 @@ function u() {
|
|
|
39
39
|
};
|
|
40
40
|
}, []), a;
|
|
41
41
|
}
|
|
42
|
-
//#endregion
|
|
43
42
|
export { l as configResponsive, u as default };
|
|
44
43
|
/* 欲穷千里目,更上一层楼 */
|
|
45
44
|
/* 独立思考,明辨是非 */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "../use-unmounted-ref/index.js";
|
|
4
4
|
import { useState as t } from "react";
|
|
5
|
-
|
|
5
|
+
// components/common/hooks/use-safe-state/index.ts
|
|
6
6
|
function n(n) {
|
|
7
7
|
let r = e(), [i, a] = t(n);
|
|
8
8
|
function o(e, t) {
|
|
@@ -10,7 +10,6 @@ function n(n) {
|
|
|
10
10
|
}
|
|
11
11
|
return [i, o];
|
|
12
12
|
}
|
|
13
|
-
//#endregion
|
|
14
13
|
export { n as default };
|
|
15
14
|
/* 欲穷千里目,更上一层楼 */
|
|
16
15
|
/* 独立思考,明辨是非 */
|
|
@@ -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 "../utils/domTarget.js";
|
|
5
5
|
import n from "../utils/useEffectWithTarget.js";
|
|
6
6
|
import { getBody as r, getDocumentElement as i } from "../../utils/dom.js";
|
|
7
7
|
import a from "../use-raf-state/index.js";
|
|
8
|
-
|
|
8
|
+
// components/common/hooks/use-scroll/index.ts
|
|
9
9
|
function o(o, s = () => !0) {
|
|
10
10
|
let [c, l] = a(), u = e(s);
|
|
11
11
|
return n(() => {
|
|
@@ -29,7 +29,6 @@ function o(o, s = () => !0) {
|
|
|
29
29
|
};
|
|
30
30
|
}, [], o), c;
|
|
31
31
|
}
|
|
32
|
-
//#endregion
|
|
33
32
|
export { o as default };
|
|
34
33
|
/* 欲穷千里目,更上一层楼 */
|
|
35
34
|
/* 独立思考,明辨是非 */
|
|
@@ -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 { useMemo as t, useState as n } from "react";
|
|
5
5
|
import { isArray as r, isFunction as i, isPlainObject as a, isString as o } from "@unicom-cloud/utils/is";
|
|
6
|
-
|
|
6
|
+
// components/common/hooks/use-selections/index.ts
|
|
7
7
|
function s(s, c) {
|
|
8
8
|
let l = [], u;
|
|
9
9
|
r(c) ? l = c : a(c) && (l = c?.defaultSelected ?? l, u = c?.itemKey ?? u);
|
|
@@ -49,7 +49,6 @@ function s(s, c) {
|
|
|
49
49
|
toggleAll: e(() => S ? b() : y())
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
-
//#endregion
|
|
53
52
|
export { s as default };
|
|
54
53
|
/* 欲穷千里目,更上一层楼 */
|
|
55
54
|
/* 独立思考,明辨是非 */
|
|
@@ -1,10 +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 "../create-use-storage-state/index.js";
|
|
5
|
-
|
|
5
|
+
// components/common/hooks/use-session-storage-state/index.ts
|
|
6
6
|
var n = t(() => e ? sessionStorage : void 0);
|
|
7
|
-
//#endregion
|
|
8
7
|
export { n as default };
|
|
9
8
|
/* 欲穷千里目,更上一层楼 */
|
|
10
9
|
/* 独立思考,明辨是非 */
|
package/hooks/use-set/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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 { useState as t } from "react";
|
|
5
|
-
|
|
5
|
+
// components/common/hooks/use-set/index.ts
|
|
6
6
|
function n(n) {
|
|
7
7
|
let r = () => new Set(n), [i, a] = t(r), o = (e) => {
|
|
8
8
|
a((t) => e(new Set(t)));
|
|
@@ -17,7 +17,6 @@ function n(n) {
|
|
|
17
17
|
reset: e(() => a(r()))
|
|
18
18
|
}];
|
|
19
19
|
}
|
|
20
|
-
//#endregion
|
|
21
20
|
export { n as default };
|
|
22
21
|
/* 欲穷千里目,更上一层楼 */
|
|
23
22
|
/* 独立思考,明辨是非 */
|
|
@@ -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 "react";
|
|
6
6
|
import { isFunction as n, isNil as r } from "@unicom-cloud/utils/is";
|
|
7
|
-
|
|
7
|
+
// components/common/hooks/use-set-state/index.ts
|
|
8
8
|
function i(i) {
|
|
9
9
|
let [a, o, s] = t(i ?? {});
|
|
10
10
|
return [
|
|
@@ -24,7 +24,6 @@ function i(i) {
|
|
|
24
24
|
})
|
|
25
25
|
];
|
|
26
26
|
}
|
|
27
|
-
//#endregion
|
|
28
27
|
export { i as default };
|
|
29
28
|
/* 欲穷千里目,更上一层楼 */
|
|
30
29
|
/* 独立思考,明辨是非 */
|
package/hooks/use-size/index.js
CHANGED
|
@@ -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";
|
|
@@ -6,7 +6,7 @@ import n from "../utils/useIsomorphicLayoutEffectWithTarget.js";
|
|
|
6
6
|
import r from "../use-raf-state/index.js";
|
|
7
7
|
import { useDeferredValue as i, useEffect as a } from "react";
|
|
8
8
|
import { isFunction as o } from "@unicom-cloud/utils/is";
|
|
9
|
-
|
|
9
|
+
// components/common/hooks/use-size/index.ts
|
|
10
10
|
function s(s, c) {
|
|
11
11
|
let [l, u] = r(() => p(s)), d = i(l), f = e(c);
|
|
12
12
|
function p(e) {
|
|
@@ -32,7 +32,6 @@ function s(s, c) {
|
|
|
32
32
|
return o(e) && e(l), () => {};
|
|
33
33
|
}, [d]), d;
|
|
34
34
|
}
|
|
35
|
-
//#endregion
|
|
36
35
|
export { s as default };
|
|
37
36
|
/* 欲穷千里目,更上一层楼 */
|
|
38
37
|
/* 独立思考,明辨是非 */
|
|
@@ -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
|
-
import t from "../../utils/
|
|
4
|
+
import t from "../../utils/call.js";
|
|
5
5
|
import n from "../use-get-state/index.js";
|
|
6
6
|
import { useEffect as r, useLayoutEffect as i, useRef as a } from "react";
|
|
7
|
-
|
|
7
|
+
// components/common/hooks/use-state-callback/index.ts
|
|
8
8
|
function o(o) {
|
|
9
9
|
let [s, c, l] = n(o), u = a(void 0), d = e((e, t) => {
|
|
10
10
|
u.current = t, c(e);
|
|
@@ -20,7 +20,6 @@ function o(o) {
|
|
|
20
20
|
l
|
|
21
21
|
];
|
|
22
22
|
}
|
|
23
|
-
//#endregion
|
|
24
23
|
export { o as default };
|
|
25
24
|
/* 欲穷千里目,更上一层楼 */
|
|
26
25
|
/* 独立思考,明辨是非 */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* 潘启宝 2026-10-
|
|
1
|
+
/* 潘启宝 2026-10-29 16:11:51 星期四 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import { useEffect as e, useState as t } from "react";
|
|
4
4
|
import { isFunction as n, isIndexNotFound as r, isNumber as i, isPlainObject as a } from "@unicom-cloud/utils/is";
|
|
5
|
-
|
|
5
|
+
// components/common/hooks/use-state-with-promise/index.ts
|
|
6
6
|
var { requestAnimationFrame: o, cancelAnimationFrame: s, setTimeout: c, clearTimeout: l } = window;
|
|
7
7
|
function u(u, d) {
|
|
8
8
|
a(d) || (i(d) ? d = { wait: d } : n(d) && (d = { callback: d }));
|
|
@@ -29,7 +29,6 @@ function u(u, d) {
|
|
|
29
29
|
});
|
|
30
30
|
}))];
|
|
31
31
|
}
|
|
32
|
-
//#endregion
|
|
33
32
|
export { u as default };
|
|
34
33
|
/* 欲穷千里目,更上一层楼 */
|
|
35
34
|
/* 独立思考,明辨是非 */
|