@unicom-cloud/ui-common 0.1.25 → 0.1.27
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 +33 -18
- package/border-beam/BorderBeam.js +2 -2
- package/border-beam/Effect.d.ts +1 -1
- package/border-beam/Effect.js +19 -17
- package/border-beam/constants.js +1 -1
- package/border-beam/hooks/useBorderSize.js +1 -1
- package/border-beam/hooks/useChildDom.js +3 -3
- package/border-beam/index.d.ts +3 -0
- package/border-beam/index.js +2 -2
- package/border-beam/utils.js +1 -1
- package/development/Development.js +1 -1
- package/development/index.d.ts +3 -0
- package/development/index.js +2 -2
- package/empty/Empty.js +1 -1
- package/empty/index.d.ts +3 -0
- package/empty/index.js +2 -2
- package/flex/Flex.js +1 -1
- package/flex/index.d.ts +4 -1
- package/flex/index.js +2 -2
- package/flex/utils.js +1 -1
- package/higher-order/index.js +1 -1
- package/higher-order/with-speech-synthesis/index.d.ts +3 -0
- package/higher-order/with-speech-synthesis/index.js +2 -2
- package/higher-order/with-speech-synthesis/withSpeechSynthesis.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 +1 -1
- package/hooks/create-use-storage-state/index.js +1 -1
- 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.d.ts +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.d.ts +4 -4
- 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-emitter/index.js +1 -1
- 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.d.ts +3 -3
- package/hooks/use-fullscreen/index.js +1 -1
- package/hooks/use-get-state/index.js +1 -1
- package/hooks/use-history-travel/index.d.ts +5 -5
- 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-viewport/index.js +1 -1
- package/hooks/use-infinite-scroll/index.d.ts +4 -4
- 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 +1 -1
- 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.d.ts +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.d.ts +5 -5
- 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.d.ts +6 -3
- package/hooks/use-memoized-fn/index.js +2 -2
- 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 +1 -1
- package/hooks/use-network/index.js +1 -1
- package/hooks/use-online-status/index.js +1 -1
- package/hooks/use-overflow-hidden/index.js +1 -1
- 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.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 +1 -1
- 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.d.ts +7 -7
- package/hooks/use-selections/index.js +1 -1
- package/hooks/use-session-storage-state/index.d.ts +1 -1
- package/hooks/use-session-storage-state/index.js +1 -1
- package/hooks/use-set/index.d.ts +3 -3
- package/hooks/use-set/index.js +1 -1
- package/hooks/use-set-state/index.d.ts +2 -2
- 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.d.ts +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.d.ts +3 -2
- package/hooks/use-url-state/index.js +25 -31
- package/hooks/use-virtual-list/index.d.ts +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/IconFile.js +1 -1
- package/icons/file/index.d.ts +3 -0
- package/icons/file/index.js +2 -2
- package/index.js +604 -593
- package/package.json +1 -1
- package/progress/Progress.js +1 -1
- package/progress/index.d.ts +3 -0
- package/progress/index.js +2 -2
- package/resize-observer/Collection.d.ts +1 -1
- package/resize-observer/Collection.js +1 -1
- package/resize-observer/ResizeObserver.js +1 -1
- package/resize-observer/SingleObserver.js +1 -1
- package/resize-observer/index.d.ts +4 -1
- package/resize-observer/index.js +2 -2
- package/resize-observer/observerUtil.js +1 -1
- package/space/Space.js +1 -1
- package/space/index.d.ts +4 -1
- package/space/index.js +2 -2
- package/style/animation.less +0 -24
- package/style/global.less +39 -9
- package/style/index.less +6 -1
- package/style/normalize.less +13 -0
- package/style/transition.less +63 -0
- package/style/variables.less +1 -0
- package/style.css +1 -1
- package/suspense-fallback-test/SuspenseFallbackTest.js +1 -1
- package/suspense-fallback-test/index.d.ts +3 -0
- package/suspense-fallback-test/index.js +2 -2
- package/test.js +1 -1
- package/timer/Timer.js +1 -1
- package/timer/index.d.ts +3 -0
- package/timer/index.js +2 -2
- package/transition/Transition.d.ts +6 -1
- package/transition/Transition.js +63 -63
- package/transition/TransitionCSS.d.ts +14 -2
- package/transition/TransitionCSS.js +33 -33
- package/transition/TransitionGroup.d.ts +8 -1
- package/transition/TransitionGroup.js +3 -4
- package/transition/TransitionStyle.d.ts +14 -2
- package/transition/TransitionStyle.js +3 -4
- package/transition/constants.d.ts +18 -15
- package/transition/constants.js +49 -40
- package/transition/context.js +1 -1
- package/transition/index.d.ts +46 -4
- package/transition/index.js +11 -6
- package/transition/interface.d.ts +20 -21
- package/transition/utils.d.ts +2 -1
- package/transition/utils.js +64 -61
- 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.d.ts +2 -0
- package/utils/constant.js +5 -5
- package/utils/copy.js +1 -1
- package/utils/css.d.ts +1 -0
- package/utils/css.js +4 -0
- package/utils/date.js +1 -1
- package/utils/dayjs.js +1 -1
- package/utils/dom.d.ts +2 -1
- package/utils/dom.js +21 -21
- package/utils/emitter.js +1 -1
- package/utils/file.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 +1 -1
- package/utils/findRootElement.js +13 -13
- package/utils/findScrollParent.js +1 -1
- package/utils/getHighlightText.js +1 -1
- package/utils/getHotkeyHandler.js +1 -1
- package/utils/getScrollBarHeight.js +1 -1
- package/utils/getScrollBarSize.js +1 -1
- package/utils/getScrollBarWidth.js +1 -1
- package/utils/getStringLength.js +1 -1
- package/utils/include.js +1 -1
- package/utils/index.d.ts +4 -2
- package/utils/index.js +312 -304
- package/utils/intersectionObserver.js +1 -1
- package/utils/is.d.ts +2 -2
- package/utils/is.js +16 -16
- 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/names.js +3 -3
- package/utils/object.js +1 -1
- package/utils/omit.js +1 -1
- package/utils/pad.js +1 -1
- package/utils/pick.js +1 -1
- package/utils/pinyin.js +1 -1
- package/utils/react19Adapter.js +1 -1
- package/utils/reactNode.js +1 -1
- package/utils/ref.d.ts +3 -3
- package/utils/ref.js +1 -1
- package/utils/resizeObserver.js +1 -1
- 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 +2 -2
- package/utils/setPrimaryColor.js +1 -1
- package/utils/setTheme.js +2 -2
- package/utils/string.js +1 -1
- package/utils/style.js +1 -1
- package/utils/throttleByRequestAnimationFrame.d.ts +6 -0
- package/utils/throttleByRequestAnimationFrame.js +18 -0
- package/utils/tinycolor.js +1 -1
- package/utils/toArray.js +1 -1
- package/utils/tree.js +1 -1
- package/utils/tunnel.d.ts +17 -0
- package/utils/tunnel.js +55 -0
- 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 +9 -9
- package/hooks/use-event-emitter/demo/demo1.d.ts +0 -10
- package/utils/throttleByRaf.d.ts +0 -6
- package/utils/throttleByRaf.js +0 -16
- package/utils/throttleByRaf2.d.ts +0 -6
- package/utils/throttleByRaf2.js +0 -9
package/utils/is.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { is32Bit, isAllChinese, isArguments, isArray, isArrayAndNotEmpty, isArrayBuffer, isArrayEmpty, isArrayLike, isArrayLikeObject, isAscii, isAsyncFunction, isBase64, isBigInt, isBlob, isBoolean, isBuffer, isChinese, isColorValue, isColorValue_, isDataURI, isDate, isElement, isEmail, isEmpty, isEmptyArray, isEmptyObject, isEmptyValue, isEqual, isEqualWith, isError, isEventTarget, isExist, isFalse, isFile, isFinite, isFullWidth, isFunction, isHSL, isHalfWidth, isHash, isHexColor, isIMEI, isIP, isIPRange, isIdentityCard, isInteger, isJSON, isJSON_String, isJWT, isLength, isMACAddress, isMD5, isMap, isMatch, isMatchWith, isMimeType, isMobilePhone, isMobilePhoneLocales, isNaN, isNative, isNil, isNonNullable, isNull, isNullOrUndefined, isNumber, isNumberOrString, isObject, isObjectLike, isPlainObject, isPort, isPresent, isPrimitive, isPromise, isReadableStream, isRegExp, isRgbColor, isSafeInteger, isSemVer, isSet, isSlug, isSparseArray, isString, isStringAndExist, isStringOrNumber, isStrongPassword, isSymbol, isThenable, isTrue, isTypedArray, isURL, isUUID, isUndefined, isUndefinedOrNull, isVariableWidth, isWeakMap, isWeakSet, isWindow } from '@unicom-cloud/utils/is';
|
|
1
|
+
import { is32Bit, isAllChinese, isArguments, isArray, isArrayAndNotEmpty, isArrayBuffer, isArrayEmpty, isArrayLike, isArrayLikeObject, isAscii, isAsyncFunction, isBase64, isBigInt, isBlob, isBoolean, isBuffer, isChinese, isColorValue, isColorValue_, isDataURI, isDate, isElement, isEmail, isEmpty, isEmptyArray, isEmptyObject, isEmptyString, isEmptyValue, isEqual, isEqualWith, isError, isEventTarget, isExist, isFalse, isFile, isFinite, isFullWidth, isFunction, isHSL, isHalfWidth, isHash, isHexColor, isIMEI, isIP, isIPRange, isIdentityCard, isInteger, isJSON, isJSON_String, isJWT, isLength, isMACAddress, isMD5, isMap, isMatch, isMatchWith, isMimeType, isMobilePhone, isMobilePhoneLocales, isNaN, isNative, isNil, isNonNullable, isNotFound, isNull, isNullOrUndefined, isNumber, isNumberOrString, isObject, isObjectLike, isPlainObject, isPort, isPresent, isPrimitive, isPromise, isReadableStream, isRegExp, isRgbColor, isSafeInteger, isSemVer, isSet, isSlug, isSparseArray, isString, isStringAndExist, isStringOrNumber, isStrongPassword, isSymbol, isThenable, isTrue, isTypedArray, isURL, isUUID, isUndefined, isUndefinedOrNull, isVariableWidth, isWeakMap, isWeakSet, isWindow, isZero } from '@unicom-cloud/utils/is';
|
|
2
2
|
import { isDayjs } from 'dayjs';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
declare const isServerRendering: boolean;
|
|
@@ -13,4 +13,4 @@ export declare function isSVGElement(element?: unknown): element is SVGElement;
|
|
|
13
13
|
export declare function isDOM(node: unknown): node is HTMLElement | SVGElement;
|
|
14
14
|
export declare function isScrollElement(element?: unknown): element is HTMLElement;
|
|
15
15
|
export * from '@unicom-cloud/utils/is';
|
|
16
|
-
export { is32Bit, isAllChinese, isArguments, isArray, isArrayAndNotEmpty, isArrayBuffer, isArrayEmpty, isArrayLike, isArrayLikeObject, isAscii, isAsyncFunction, isBase64, isBigInt, isBlob, isBoolean, isBuffer, isChinese, isColorValue, isColorValue_, isDataURI, isDate, isDayjs, isElement, isEmail, isEmpty, isEmptyArray, isEmptyObject, isEmptyValue, isEqual, isEqualWith, isError, isEventTarget, isExist, isFalse, isFile, isFinite, isFullWidth, isFunction, isHSL, isHalfWidth, isHash, isHexColor, isIMEI, isIP, isIPRange, isIdentityCard, isInteger, isJSON, isJSON_String, isJWT, isLength, isMACAddress, isMD5, isMap, isMatch, isMatchWith, isMimeType, isMobilePhone, isMobilePhoneLocales, isNaN, isNative, isNil, isNonNullable, isNull, isNullOrUndefined, isNumber, isNumberOrString, isObject, isObjectLike, isPlainObject, isPort, isPresent, isPrimitive, isPromise, isReact18, isReact19, isReadableStream, isRegExp, isRgbColor, isSafeInteger, isSemVer, isServerRendering, isSet, isSlug, isSparseArray, isString, isStringAndExist, isStringOrNumber, isStrongPassword, isSymbol, isThenable, isTrue, isTypedArray, isURL, isUUID, isUndefined, isUndefinedOrNull, isVariableWidth, isWeakMap, isWeakSet, isWindow, };
|
|
16
|
+
export { is32Bit, isAllChinese, isArguments, isArray, isArrayAndNotEmpty, isArrayBuffer, isArrayEmpty, isArrayLike, isArrayLikeObject, isAscii, isAsyncFunction, isBase64, isBigInt, isBlob, isBoolean, isBuffer, isChinese, isColorValue, isColorValue_, isDataURI, isDate, isDayjs, isElement, isEmail, isEmpty, isEmptyArray, isEmptyObject, isEmptyString, isEmptyValue, isEqual, isEqualWith, isError, isEventTarget, isExist, isFalse, isFile, isFinite, isFullWidth, isFunction, isHSL, isHalfWidth, isHash, isHexColor, isIMEI, isIP, isIPRange, isIdentityCard, isInteger, isJSON, isJSON_String, isJWT, isLength, isMACAddress, isMD5, isMap, isMatch, isMatchWith, isMimeType, isMobilePhone, isMobilePhoneLocales, isNaN, isNative, isNil, isNonNullable, isNotFound, isNull, isNullOrUndefined, isNumber, isNumberOrString, isObject, isObjectLike, isPlainObject, isPort, isPresent, isPrimitive, isPromise, isReact18, isReact19, isReadableStream, isRegExp, isRgbColor, isSafeInteger, isSemVer, isServerRendering, isSet, isSlug, isSparseArray, isString, isStringAndExist, isStringOrNumber, isStrongPassword, isSymbol, isThenable, isTrue, isTypedArray, isURL, isUUID, isUndefined, isUndefinedOrNull, isVariableWidth, isWeakMap, isWeakSet, isWindow, isZero, };
|
package/utils/is.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-06-02 15:43:18 星期二 山东省济南市 */
|
|
2
2
|
import "../.virtual/_rolldown/runtime.js";
|
|
3
3
|
import e, { isValidElement as t } from "react";
|
|
4
4
|
import { isBrowser as n } from "@unicom-cloud/utils/constant/platform";
|
|
5
|
-
import { is32Bit as r, isAllChinese as i, isArguments as a, isArray as o, isArrayAndNotEmpty as ee, isArrayBuffer as te, isArrayEmpty as ne, isArrayLike as re, isArrayLikeObject as ie, isAscii as ae, isAsyncFunction as oe, isBase64 as s, isBigInt as c, isBlob as l, isBoolean as u, isBuffer as d, isChinese as f, isColorValue as p, isColorValue_ as m, isDataURI as h, isDate as g, isElement as _, isEmail as v, isEmpty as y, isEmptyArray as b, isEmptyObject as x,
|
|
6
|
-
import { isDayjs as
|
|
7
|
-
import
|
|
8
|
-
import { isFragment as
|
|
5
|
+
import { is32Bit as r, isAllChinese as i, isArguments as a, isArray as o, isArrayAndNotEmpty as ee, isArrayBuffer as te, isArrayEmpty as ne, isArrayLike as re, isArrayLikeObject as ie, isAscii as ae, isAsyncFunction as oe, isBase64 as s, isBigInt as c, isBlob as l, isBoolean as u, isBuffer as d, isChinese as f, isColorValue as p, isColorValue_ as m, isDataURI as h, isDate as g, isElement as _, isEmail as v, isEmpty as y, isEmptyArray as b, isEmptyObject as x, isEmptyString as S, isEmptyValue as C, isEqual as w, isEqualWith as T, isError as E, isEventTarget as D, isExist as O, isFalse as k, isFile as A, isFinite as j, isFullWidth as M, isFunction as N, isHSL as P, isHalfWidth as F, isHash as I, isHexColor as L, isIMEI as R, isIP as z, isIPRange as B, isIdentityCard as V, isInteger as H, isJSON as U, isJSON_String as W, isJWT as G, isLength as K, isMACAddress as q, isMD5 as se, isMap as ce, isMatch as le, isMatchWith as ue, isMimeType as de, isMobilePhone as fe, isMobilePhoneLocales as pe, isNaN as me, isNative as he, isNil as ge, isNonNullable as _e, isNotFound as ve, isNull as ye, isNullOrUndefined as J, isNumber as be, isNumberOrString as xe, isObject as Se, isObjectLike as Ce, isPlainObject as we, isPort as Te, isPresent as Ee, isPrimitive as De, isPromise as Oe, isReadableStream as ke, isRegExp as Ae, isRgbColor as je, isSafeInteger as Me, isSemVer as Ne, isSet as Pe, isSlug as Fe, isSparseArray as Ie, isString as Y, isStringAndExist as Le, isStringOrNumber as Re, isStrongPassword as ze, isSymbol as Be, isThenable as Ve, isTrue as He, isTypedArray as Ue, isURL as We, isUUID as Ge, isUndefined as Ke, isUndefinedOrNull as qe, isVariableWidth as Je, isWeakMap as Ye, isWeakSet as Xe, isWindow as Ze, isZero as X } from "@unicom-cloud/utils/is";
|
|
6
|
+
import { isDayjs as Qe } from "dayjs";
|
|
7
|
+
import $e from "react-dom";
|
|
8
|
+
import { isFragment as et } from "react-is";
|
|
9
9
|
export * from "@unicom-cloud/utils/is";
|
|
10
10
|
//#region components/common/utils/is.ts
|
|
11
|
-
var
|
|
12
|
-
let i = e.version ||
|
|
11
|
+
var tt = !n, [nt, rt] = [18, 19].map((t, n, r) => {
|
|
12
|
+
let i = e.version || $e.version || "", a = /\d+/.exec(i)?.[0] ?? "";
|
|
13
13
|
return t <= parseFloat(a);
|
|
14
14
|
});
|
|
15
|
-
function
|
|
15
|
+
function it(e, t) {
|
|
16
16
|
return !!(J(e) || e === !1 || Y(e) && (t ? e.trim() === "" : e === "") || b(e));
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return t(e) && !
|
|
18
|
+
function at(e) {
|
|
19
|
+
return t(e) && !et(e);
|
|
20
20
|
}
|
|
21
21
|
function Z(e) {
|
|
22
|
-
return t(e) &&
|
|
22
|
+
return t(e) && N(e.type);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function ot(e) {
|
|
25
25
|
return Z(e) && !!e.type?.prototype?.isReactComponent;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function st(e) {
|
|
28
28
|
return e instanceof Element;
|
|
29
29
|
}
|
|
30
30
|
function Q(e) {
|
|
@@ -33,10 +33,10 @@ function Q(e) {
|
|
|
33
33
|
function $(e) {
|
|
34
34
|
return e instanceof SVGElement;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function ct(e) {
|
|
37
37
|
return Q(e) || $(e);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function lt(e) {
|
|
40
40
|
if (!Q(e) || [document.documentElement].includes(e)) return !1;
|
|
41
41
|
let t = window.getComputedStyle(e), n = [
|
|
42
42
|
"auto",
|
|
@@ -46,5 +46,5 @@ function ot(e) {
|
|
|
46
46
|
return e.scrollHeight > e.offsetHeight && n.includes(t.overflowY) || e.scrollWidth > e.offsetWidth && n.includes(t.overflowX);
|
|
47
47
|
}
|
|
48
48
|
//#endregion
|
|
49
|
-
export { r as is32Bit, i as isAllChinese, a as isArguments, o as isArray, ee as isArrayAndNotEmpty, te as isArrayBuffer, ne as isArrayEmpty, re as isArrayLike, ie as isArrayLikeObject, ae as isAscii, oe as isAsyncFunction, s as isBase64, c as isBigInt, l as isBlob, u as isBoolean, d as isBuffer, f as isChinese, p as isColorValue, m as isColorValue_,
|
|
49
|
+
export { r as is32Bit, i as isAllChinese, a as isArguments, o as isArray, ee as isArrayAndNotEmpty, te as isArrayBuffer, ne as isArrayEmpty, re as isArrayLike, ie as isArrayLikeObject, ae as isAscii, oe as isAsyncFunction, s as isBase64, c as isBigInt, l as isBlob, u as isBoolean, d as isBuffer, f as isChinese, p as isColorValue, m as isColorValue_, ct as isDOM, h as isDataURI, g as isDate, Qe as isDayjs, _ as isElement, st as isElementByInstanceof, v as isEmail, y as isEmpty, b as isEmptyArray, x as isEmptyObject, it as isEmptyReactNode, S as isEmptyString, C as isEmptyValue, w as isEqual, T as isEqualWith, E as isError, D as isEventTarget, O as isExist, k as isFalse, A as isFile, j as isFinite, M as isFullWidth, N as isFunction, P as isHSL, Q as isHTMLElement, F as isHalfWidth, I as isHash, L as isHexColor, R as isIMEI, z as isIP, B as isIPRange, V as isIdentityCard, H as isInteger, U as isJSON, W as isJSON_String, G as isJWT, K as isLength, q as isMACAddress, se as isMD5, ce as isMap, le as isMatch, ue as isMatchWith, de as isMimeType, fe as isMobilePhone, pe as isMobilePhoneLocales, me as isNaN, he as isNative, ge as isNil, _e as isNonNullable, ve as isNotFound, ye as isNull, J as isNullOrUndefined, be as isNumber, xe as isNumberOrString, Se as isObject, Ce as isObjectLike, we as isPlainObject, Te as isPort, Ee as isPresent, De as isPrimitive, Oe as isPromise, nt as isReact18, rt as isReact19, ot as isReactClassComponent, Z as isReactComponent, at as isReactComponentAndNotFragment, ke as isReadableStream, Ae as isRegExp, je as isRgbColor, $ as isSVGElement, Me as isSafeInteger, lt as isScrollElement, Ne as isSemVer, tt as isServerRendering, Pe as isSet, Fe as isSlug, Ie as isSparseArray, Y as isString, Le as isStringAndExist, Re as isStringOrNumber, ze as isStrongPassword, Be as isSymbol, Ve as isThenable, He as isTrue, Ue as isTypedArray, We as isURL, Ge as isUUID, Ke as isUndefined, qe as isUndefinedOrNull, Je as isVariableWidth, Ye as isWeakMap, Xe as isWeakSet, Ze as isWindow, X as isZero };
|
|
50
50
|
/* 独立思考,明辨是非 */
|
package/utils/keyboardCode.js
CHANGED
package/utils/lodash.js
CHANGED
package/utils/math.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-06-02 15:43:18 星期二 山东省济南市 */
|
|
2
2
|
import e, { div as t, minus as n, plus as r, times as i, default as a } from "@unicom-cloud/utils/math";
|
|
3
3
|
export { a as default, t as div, e as math, n as minus, r as plus, i as times };
|
|
4
4
|
/* 独立思考,明辨是非 */
|
package/utils/mergeProps.js
CHANGED
package/utils/mergedToString.js
CHANGED
package/utils/names.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-06-02 15:43:18 星期二 山东省济南市 */
|
|
2
2
|
//#region components/common/utils/names.ts
|
|
3
3
|
var e = {
|
|
4
4
|
zh: "边框流光",
|
|
@@ -71,12 +71,12 @@ var e = {
|
|
|
71
71
|
displayName: "Transition",
|
|
72
72
|
id: "20512ad9-c54f-4352-8bdb-1d3d753fe993"
|
|
73
73
|
}, m = {
|
|
74
|
-
zh: "动画过渡CSS",
|
|
74
|
+
zh: "动画过渡 CSS",
|
|
75
75
|
en: "Transition.CSS",
|
|
76
76
|
displayName: "TransitionCSS",
|
|
77
77
|
id: "7e73317b-fe40-4a36-9070-27607e0b6de7"
|
|
78
78
|
}, h = {
|
|
79
|
-
zh: "动画过渡
|
|
79
|
+
zh: "动画过渡 Style",
|
|
80
80
|
en: "Transition.Style",
|
|
81
81
|
displayName: "TransitionStyle",
|
|
82
82
|
id: "522e3883-c266-4ba0-9ad1-34c1d58e9098"
|
package/utils/object.js
CHANGED
package/utils/omit.js
CHANGED
package/utils/pad.js
CHANGED
package/utils/pick.js
CHANGED
package/utils/pinyin.js
CHANGED
package/utils/react19Adapter.js
CHANGED
package/utils/reactNode.js
CHANGED
package/utils/ref.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ declare const fillRef: <T>(ref: RefObject<T>, node: T) => void;
|
|
|
7
7
|
* Merge refs into one ref function to support ref passing.
|
|
8
8
|
*/
|
|
9
9
|
declare const composeRef: <T>(...refs: React.Ref<T>[]) => React.Ref<T>;
|
|
10
|
-
declare const useComposeRef: <T>(...refs: React.Ref<T>[]) => React.Ref<T
|
|
11
|
-
declare function supportRef(nodeOrComponent
|
|
10
|
+
declare const useComposeRef: <T>(...refs: React.Ref<T>[]) => React.Ref<T> | undefined;
|
|
11
|
+
declare function supportRef(nodeOrComponent?: React.ReactElement | null): boolean;
|
|
12
12
|
declare const supportNodeRef: <T = unknown>(node: React.ReactNode) => node is React.ReactElement & RefAttributes<T>;
|
|
13
13
|
/**
|
|
14
14
|
* Returns the ref of a React element handling differences between React 19 and older versions.
|
|
@@ -17,7 +17,7 @@ declare const supportNodeRef: <T = unknown>(node: React.ReactNode) => node is Re
|
|
|
17
17
|
* @param element React.ReactElement
|
|
18
18
|
* @returns React.Ref<any> | null
|
|
19
19
|
*/
|
|
20
|
-
declare function getReactElementRef(element
|
|
20
|
+
declare function getReactElementRef(element?: React.ReactElement | null): React.Ref<unknown> | null;
|
|
21
21
|
/**
|
|
22
22
|
* In React 19. `ref` is not a property from node.
|
|
23
23
|
* But a property from `props.ref`.
|
package/utils/ref.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-06-02 15:43:18 星期二 山东省济南市 */
|
|
2
2
|
import { isFunction as e, isObjectLike as t, isReact19 as n, isReactComponentAndNotFragment as r } from "./is.js";
|
|
3
3
|
import i from "../hooks/use-memo/index.js";
|
|
4
4
|
import { isValidElement as a } from "react";
|
package/utils/resizeObserver.js
CHANGED
package/utils/saveAs.js
CHANGED
package/utils/screenfull.js
CHANGED
package/utils/setCreateRoot.js
CHANGED
package/utils/setDarkTheme.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-06-02 15:43:18 星期二 山东省济南市 */
|
|
2
2
|
import { isElementByInstanceof as e } from "./is.js";
|
|
3
3
|
import { CSS_VARIABLE_ELEMENT as t } from "./constant.js";
|
|
4
4
|
import { UI_PC_THEME_DARK_CLASS_NAME as n } from "@unicom-cloud/utils/constant/ui";
|
package/utils/setDir.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-06-02 15:43:18 星期二 山东省济南市 */
|
|
2
2
|
import { isPlainObject as e } from "./is.js";
|
|
3
3
|
import { CSS_VARIABLE_ELEMENT as t } from "./constant.js";
|
|
4
|
-
import { UI_PC_PREFIX as n } from "@unicom-cloud/utils/constant/ui
|
|
4
|
+
import { UI_PC_PREFIX as n } from "@unicom-cloud/utils/constant/ui";
|
|
5
5
|
//#region components/common/utils/setDir.ts
|
|
6
6
|
function r(r) {
|
|
7
7
|
if (!e(r)) return;
|
package/utils/setPrimaryColor.js
CHANGED
package/utils/setTheme.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-06-02 15:43:18 星期二 山东省济南市 */
|
|
2
2
|
import { isPlainObject as e } from "./is.js";
|
|
3
3
|
import { CSS_VARIABLE_ELEMENT as t } from "./constant.js";
|
|
4
|
-
import { UI_PC_PREFIX as n } from "@unicom-cloud/utils/constant/ui
|
|
4
|
+
import { UI_PC_PREFIX as n } from "@unicom-cloud/utils/constant/ui";
|
|
5
5
|
import r from "@unicom-cloud/utils/tinycolor";
|
|
6
6
|
//#region components/common/utils/setTheme.ts
|
|
7
7
|
function i(i) {
|
package/utils/string.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-06-02 15:43:18 星期二 山东省济南市 */
|
|
2
2
|
import { isEmptyReactNode as e } from "./is.js";
|
|
3
3
|
import { HYPHEN as t } from "@unicom-cloud/utils/constant/string";
|
|
4
4
|
import { replaceEmptyWithHyphen as n } from "@unicom-cloud/utils/string";
|
package/utils/style.js
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* 潘启宝 2026-06-02 15:43:18 星期二 山东省济南市 */
|
|
2
|
+
import { isNumber as e } from "./is.js";
|
|
3
|
+
//#region components/common/utils/throttleByRequestAnimationFrame.ts
|
|
4
|
+
var { requestAnimationFrame: t, cancelAnimationFrame: n, setTimeout: r, clearTimeout: i } = window;
|
|
5
|
+
function a(r) {
|
|
6
|
+
let i = null;
|
|
7
|
+
function a(...e) {
|
|
8
|
+
return i && n(i), i = t(() => {
|
|
9
|
+
r(...e), i = null;
|
|
10
|
+
}), i;
|
|
11
|
+
}
|
|
12
|
+
return a.cancel = () => {
|
|
13
|
+
e(i) && n(i), i = null;
|
|
14
|
+
}, a;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { a as default, a as throttleByRequestAnimationFrame };
|
|
18
|
+
/* 独立思考,明辨是非 */
|
package/utils/tinycolor.js
CHANGED
package/utils/toArray.js
CHANGED
package/utils/tree.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-06-02 15:43:18 星期二 山东省济南市 */
|
|
2
2
|
import e, { findNodeBy as t, getChildWithParentBy as n, getItemBy as r, getItemByID as i, getLabelFromDictionaryByValue as a, searchTree as o, default as s } from "@unicom-cloud/utils/tree";
|
|
3
3
|
export { s as default, t as findNodeBy, n as getChildWithParentBy, r as getItemBy, i as getItemByID, a as getLabelFromDictionaryByValue, o as searchTree, e as tree };
|
|
4
4
|
/* 独立思考,明辨是非 */
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
export type TunnelState = {
|
|
3
|
+
children: Array<{
|
|
4
|
+
child: ReactNode;
|
|
5
|
+
id: string;
|
|
6
|
+
}>;
|
|
7
|
+
};
|
|
8
|
+
declare function tunnel(params?: unknown): {
|
|
9
|
+
In: (props: PropsWithChildren<{
|
|
10
|
+
content?: ReactNode;
|
|
11
|
+
}>) => null;
|
|
12
|
+
Out: (props: unknown) => ReactNode;
|
|
13
|
+
notify: () => void;
|
|
14
|
+
destroy: () => void;
|
|
15
|
+
};
|
|
16
|
+
export { tunnel };
|
|
17
|
+
export default tunnel;
|
package/utils/tunnel.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* 潘启宝 2026-06-02 15:43:18 星期二 山东省济南市 */
|
|
2
|
+
import e from "../hooks/use-isomorphic-layout-effect/index.js";
|
|
3
|
+
import t from "../hooks/use-force-update/index.js";
|
|
4
|
+
import n from "./uuid.js";
|
|
5
|
+
import { useEffect as r, useRef as i } from "react";
|
|
6
|
+
//#region components/common/utils/tunnel.ts
|
|
7
|
+
function a(a) {
|
|
8
|
+
let o = { children: [] }, s = /* @__PURE__ */ new Set();
|
|
9
|
+
function c() {
|
|
10
|
+
s.forEach((e) => {
|
|
11
|
+
e();
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function l(e, t) {
|
|
15
|
+
f([...d(), {
|
|
16
|
+
child: e,
|
|
17
|
+
id: t
|
|
18
|
+
}]);
|
|
19
|
+
}
|
|
20
|
+
function u(e) {
|
|
21
|
+
f(d().filter((t, n, r) => t.id !== e));
|
|
22
|
+
}
|
|
23
|
+
function d() {
|
|
24
|
+
return o.children;
|
|
25
|
+
}
|
|
26
|
+
function f(e) {
|
|
27
|
+
o.children = e, c();
|
|
28
|
+
}
|
|
29
|
+
function p() {
|
|
30
|
+
f([]), s.clear();
|
|
31
|
+
}
|
|
32
|
+
function m(t) {
|
|
33
|
+
let { children: r, content: a = r } = t, o = i(n());
|
|
34
|
+
return e(() => (l(a, o.current), () => {
|
|
35
|
+
u(o.current);
|
|
36
|
+
}), [a]), null;
|
|
37
|
+
}
|
|
38
|
+
function h(e) {
|
|
39
|
+
let n = t();
|
|
40
|
+
r(() => (s.add(n), () => {
|
|
41
|
+
s.delete(n);
|
|
42
|
+
}), []);
|
|
43
|
+
let i = d().map((e, t, n) => e.child);
|
|
44
|
+
return i.length > 1 ? i : i[0];
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
In: m,
|
|
48
|
+
Out: h,
|
|
49
|
+
notify: c,
|
|
50
|
+
destroy: p
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
export { a as default, a as tunnel };
|
|
55
|
+
/* 独立思考,明辨是非 */
|
package/utils/tween.js
CHANGED
package/utils/uuid.js
CHANGED
package/utils/validate.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-06-02 15:43:18 星期二 山东省济南市 */
|
|
2
2
|
import { PqbValidator as e, Validator as t, ValidatorArray as n, ValidatorBase as r, ValidatorBoolean as i, ValidatorCustom as a, ValidatorNumber as o, ValidatorObject as s, ValidatorSchema as c, ValidatorString as l, ValidatorType as u, validatorLocale as d } from "@unicom-cloud/utils/validate";
|
|
3
3
|
export { e as PqbValidator, t as Validator, n as ValidatorArray, r as ValidatorBase, i as ValidatorBoolean, a as ValidatorCustom, o as ValidatorNumber, s as ValidatorObject, c as ValidatorSchema, l as ValidatorString, u as ValidatorType, d as validatorLocale };
|
|
4
4
|
/* 独立思考,明辨是非 */
|
package/utils/warning.js
CHANGED
package/version/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-06-02 15:43:18 星期二 山东省济南市 */
|
|
2
2
|
//#region components/common/version/index.ts
|
|
3
3
|
var e = {
|
|
4
4
|
name: "潘启宝",
|
|
5
|
-
date: "2026-
|
|
5
|
+
date: "2026-06-02 15:43:17",
|
|
6
6
|
platform: "darwin",
|
|
7
7
|
arch: "arm64",
|
|
8
8
|
hostname: "Mac-mini-2.local",
|
|
@@ -10,18 +10,18 @@ var e = {
|
|
|
10
10
|
cpu: "Apple M4",
|
|
11
11
|
endianness: "LE",
|
|
12
12
|
release: "Darwin25.5.0",
|
|
13
|
-
uptime:
|
|
14
|
-
UUID: "
|
|
15
|
-
mac: "
|
|
13
|
+
uptime: 110897,
|
|
14
|
+
UUID: "e5dd118a-a828-434e-8850-24518dbd820c",
|
|
15
|
+
mac: "5e:f5:ec:e2:1e:7e",
|
|
16
16
|
version: {
|
|
17
17
|
node: "24.15.0",
|
|
18
18
|
npm: "11.12.1",
|
|
19
|
-
vite: "8.0.
|
|
20
|
-
rolldown: "1.0.
|
|
19
|
+
vite: "8.0.16",
|
|
20
|
+
rolldown: "1.0.3",
|
|
21
21
|
self: "0.0.0",
|
|
22
|
-
react: "19.2.
|
|
22
|
+
react: "19.2.7"
|
|
23
23
|
}
|
|
24
|
-
}, t = "2026-
|
|
24
|
+
}, t = "2026-06-02 15:43:17", n = "1780386197027", r = "0.1.0";
|
|
25
25
|
//#endregion
|
|
26
26
|
export { r as VERSION, r as default, t as VERSION_BUILD_DATE, e as VERSION_BUILD_INFO, n as VERSION_BUILD_TIME };
|
|
27
27
|
/* 独立思考,明辨是非 */
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* title: Parent component shares a event
|
|
3
|
-
* desc: The parent component creates a `focus$` event emitter, and passes it to its children. When calling `focus$.emit` in MessageBox, InputBox will get notified.
|
|
4
|
-
*
|
|
5
|
-
* title.zh-CN: 父组件向子组件共享事件
|
|
6
|
-
* desc.zh-CN: 父组件创建了一个 `focus$` 事件,并且将它传递给了两个子组件。在 MessageBox 中调用 `focus$.emit` ,InputBox 组件就可以收到通知。
|
|
7
|
-
*/
|
|
8
|
-
import React from 'react';
|
|
9
|
-
declare const Demo: React.FC;
|
|
10
|
-
export default Demo;
|
package/utils/throttleByRaf.d.ts
DELETED
package/utils/throttleByRaf.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/* 潘启宝 2026-05-21 17:02:03 星期四 山东省济南市 */
|
|
2
|
-
//#region components/common/utils/throttleByRaf.ts
|
|
3
|
-
function e(e, t = 1) {
|
|
4
|
-
let n = null;
|
|
5
|
-
function r(...r) {
|
|
6
|
-
return n ? cancelAnimationFrame(n) : t == 2 && (e(...r), n = requestAnimationFrame(() => {})), n = requestAnimationFrame(() => {
|
|
7
|
-
e(...r), n = null;
|
|
8
|
-
}), n;
|
|
9
|
-
}
|
|
10
|
-
return r.cancel = () => {
|
|
11
|
-
cancelAnimationFrame(n), n = null;
|
|
12
|
-
}, r;
|
|
13
|
-
}
|
|
14
|
-
//#endregion
|
|
15
|
-
export { e as default, e as throttleByRaf };
|
|
16
|
-
/* 独立思考,明辨是非 */
|
package/utils/throttleByRaf2.js
DELETED