@unicom-cloud/ui-common 0.1.5 → 0.1.7
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/Development.js +1 -1
- package/Empty.js +1 -1
- package/Flex.js +1 -1
- package/Motion.js +9 -0
- package/Progress.js +1 -1
- package/ResizeObserver.js +10 -0
- package/Space.js +1 -1
- package/SuspenseFallbackTest.js +1 -1
- package/TransitionGroup.js +30 -29
- package/development/index.js +38 -27
- package/empty/index.js +36 -32
- package/flex/index.js +56 -50
- package/flex/interface.js +1 -1
- package/higher-order/index.js +1 -1
- package/higher-order/with-speech-synthesis/index.js +33 -37
- package/higher-order/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.js +1 -1
- package/hooks/createDeepCompareEffect.js +1 -1
- package/hooks/createUpdateEffect.js +1 -1
- package/hooks/createUseStorageState.js +1 -1
- package/hooks/index.js +177 -171
- package/hooks/use-async-effect/index.js +1 -1
- package/hooks/use-boolean/index.js +1 -1
- package/hooks/use-click-away/index.js +19 -20
- package/hooks/use-computed-state/index.js +1 -1
- package/hooks/use-controllable-value/index.js +5 -5
- package/hooks/use-cookie-state/index.js +1 -1
- package/hooks/use-count-down/index.js +3 -3
- 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 +10 -10
- package/hooks/use-drop/index.js +1 -1
- package/hooks/use-event/index.js +10 -0
- package/hooks/use-event-listener/index.js +15 -16
- package/hooks/use-event-target/index.js +3 -3
- package/hooks/use-external/index.js +1 -1
- package/hooks/use-favicon/index.js +1 -1
- package/hooks/use-focus-within/index.js +1 -1
- package/hooks/use-force-update/index.js +1 -1
- package/hooks/use-fullscreen/index.js +13 -13
- package/hooks/use-get-state/index.js +6 -6
- package/hooks/use-history-travel/index.js +18 -18
- package/hooks/use-hover/index.js +1 -1
- package/hooks/use-id/index.js +1 -1
- package/hooks/use-in-view/index.js +1 -1
- package/hooks/use-in-viewport/index.js +17 -18
- package/hooks/use-infinite-scroll/index.js +1 -1
- package/hooks/use-intersection-observer/index.js +7 -6
- package/hooks/use-intersection-observers/index.js +34 -26
- package/hooks/use-interval/index.js +7 -7
- 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 +21 -21
- 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 +4 -4
- 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 +24 -24
- package/hooks/use-map/index.js +1 -1
- package/hooks/use-media/index.js +1 -1
- package/hooks/use-memo/index.js +9 -0
- package/hooks/use-memoized-fn/index.js +1 -1
- package/hooks/use-merge-props/index.js +1 -1
- package/hooks/use-merge-value/index.js +1 -1
- package/hooks/use-mount/index.js +1 -1
- package/hooks/use-mouse/index.js +1 -1
- package/hooks/use-mutation-observer/index.js +9 -9
- package/hooks/use-mutation-observers/index.js +33 -25
- 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 +3 -3
- package/hooks/use-pagination/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 +15 -15
- package/hooks/use-raf-state/index.js +1 -1
- package/hooks/use-raf-timeout/index.js +3 -3
- package/hooks/use-reactive/index.js +7 -7
- package/hooks/use-ref-latest/index.js +1 -1
- package/hooks/use-refs/index.js +4 -4
- 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 +3 -3
- package/hooks/use-request/src/plugins/useDebouncePlugin.js +1 -1
- package/hooks/use-request/src/plugins/useLoadingDelayPlugin.js +8 -8
- package/hooks/use-request/src/plugins/usePollingPlugin.js +13 -13
- package/hooks/use-request/src/plugins/useRefreshOnWindowFocusPlugin.js +3 -3
- package/hooks/use-request/src/plugins/useRetryPlugin.js +5 -5
- package/hooks/use-request/src/plugins/useThrottlePlugin.js +3 -3
- package/hooks/use-request/src/useRequest.js +1 -1
- package/hooks/use-request/src/useRequestImplement.js +7 -7
- 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 +7 -7
- package/hooks/use-resize-observer/index.js +1 -1
- package/hooks/use-resize-observers/index.js +34 -26
- package/hooks/use-responsive/index.js +1 -1
- package/hooks/use-safe-state/index.js +4 -4
- package/hooks/use-scroll/index.js +1 -1
- package/hooks/use-selections/index.js +1 -1
- package/hooks/use-session-storage-state/index.js +1 -1
- package/hooks/use-set/index.js +1 -1
- package/hooks/use-set-state/index.js +1 -1
- package/hooks/use-size/index.js +20 -23
- package/hooks/use-state-callback/index.js +6 -6
- package/hooks/use-state-with-promise/index.js +1 -1
- package/hooks/use-sync-state/index.js +15 -0
- package/hooks/use-text-selection/index.js +13 -13
- 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 +6 -6
- package/hooks/use-timeout/index.js +3 -3
- 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 +4 -4
- package/hooks/use-update/index.js +1 -1
- package/hooks/use-update-effect/index.js +1 -1
- package/hooks/use-update-layout-effect/index.js +1 -1
- package/hooks/use-url-state/index.js +3 -3
- package/hooks/use-virtual-list/index.js +10 -10
- package/hooks/use-watch/index.js +1 -1
- package/hooks/use-web-socket/index.js +30 -30
- package/hooks/use-why-did-you-update/index.js +1 -1
- package/hooks/use-window-size/index.js +28 -25
- package/hooks/useAsyncEffect.js +1 -1
- package/hooks/useBoolean.js +1 -1
- package/hooks/useClickAway.js +4 -5
- package/hooks/useComputedState.js +1 -1
- package/hooks/useControllableValue.js +1 -1
- package/hooks/useCookieState.js +1 -1
- package/hooks/useCountDown.js +1 -1
- package/hooks/useCounter.js +1 -1
- package/hooks/useCreate.js +1 -1
- package/hooks/useCreation.js +1 -1
- package/hooks/useDebounce.js +1 -1
- package/hooks/useDebounceEffect.js +1 -1
- package/hooks/useDebounceFn.js +1 -1
- package/hooks/useDeepCompareEffect.js +1 -1
- package/hooks/useDeepCompareLayoutEffect.js +1 -1
- package/hooks/useDocumentVisibility.js +1 -1
- package/hooks/useDrag.js +1 -1
- package/hooks/useDrop.js +1 -1
- package/hooks/useEvent.js +7 -0
- package/hooks/useEventListener.js +4 -5
- package/hooks/useEventTarget.js +1 -1
- package/hooks/useExternal.js +1 -1
- package/hooks/useFavicon.js +1 -1
- package/hooks/useFocusWithin.js +1 -1
- package/hooks/useForceUpdate.js +1 -1
- package/hooks/useFullscreen.js +1 -1
- package/hooks/useGetState.js +1 -1
- package/hooks/useHistoryTravel.js +1 -1
- package/hooks/useHover.js +1 -1
- package/hooks/useId.js +1 -1
- package/hooks/useInView.js +1 -1
- package/hooks/useInViewport.js +4 -5
- package/hooks/useInfiniteScroll.js +1 -1
- package/hooks/useIntersectionObserver.js +5 -4
- package/hooks/useIntersectionObservers.js +11 -7
- package/hooks/useInterval.js +1 -1
- package/hooks/useIsFirstRender.js +1 -1
- package/hooks/useIsomorphicLayoutEffect.js +1 -1
- package/hooks/useKeyPress.js +1 -1
- package/hooks/useKeyboardEvent.js +1 -1
- package/hooks/useLatest.js +1 -1
- package/hooks/useListenWindowResize.js +1 -1
- package/hooks/useLocalStorageState.js +1 -1
- package/hooks/useLockFn.js +1 -1
- package/hooks/useLongPress.js +1 -1
- package/hooks/useMap.js +1 -1
- package/hooks/useMedia.js +1 -1
- package/hooks/useMemo.js +6 -0
- package/hooks/useMemoizedFn.js +1 -1
- package/hooks/useMergeProps.js +1 -1
- package/hooks/useMergeValue.js +1 -1
- package/hooks/useMount.js +1 -1
- package/hooks/useMouse.js +1 -1
- package/hooks/useMutationObserver.js +1 -1
- package/hooks/useMutationObservers.js +11 -7
- package/hooks/useNetwork.js +1 -1
- package/hooks/useOnlineStatus.js +1 -1
- package/hooks/useOverflowHidden.js +1 -1
- package/hooks/useOverrideRef.js +3 -3
- package/hooks/usePagination.js +1 -1
- package/hooks/usePersistCallback.js +1 -1
- package/hooks/usePrefersColorSchemeDark.js +1 -1
- package/hooks/usePrevious.js +1 -1
- package/hooks/useRafInterval.js +1 -1
- package/hooks/useRafState.js +1 -1
- package/hooks/useRafTimeout.js +1 -1
- package/hooks/useReactive.js +1 -1
- package/hooks/useRefLatest.js +1 -1
- package/hooks/useRefs.js +1 -1
- package/hooks/useRequest.js +1 -1
- package/hooks/useResetState.js +1 -1
- package/hooks/useResizeObserver.js +1 -1
- package/hooks/useResizeObservers.js +11 -7
- package/hooks/useResponsive.js +1 -1
- package/hooks/useSafeState.js +1 -1
- package/hooks/useScroll.js +1 -1
- package/hooks/useSelections.js +1 -1
- package/hooks/useSessionStorageState.js +1 -1
- package/hooks/useSet.js +1 -1
- package/hooks/useSetState.js +1 -1
- package/hooks/useSize.js +4 -3
- package/hooks/useStateCallback.js +1 -1
- package/hooks/useStateWithPromise.js +1 -1
- package/hooks/useSyncState.js +10 -0
- package/hooks/useTextSelection.js +1 -1
- package/hooks/useTheme.js +1 -1
- package/hooks/useThrottle.js +1 -1
- package/hooks/useThrottleEffect.js +1 -1
- package/hooks/useThrottleFn.js +1 -1
- package/hooks/useTimeout.js +1 -1
- package/hooks/useTitle.js +1 -1
- package/hooks/useToggle.js +1 -1
- package/hooks/useTrackedEffect.js +1 -1
- package/hooks/useUnmount.js +1 -1
- package/hooks/useUnmountedRef.js +1 -1
- package/hooks/useUpdate.js +1 -1
- package/hooks/useUpdateEffect.js +1 -1
- package/hooks/useUpdateLayoutEffect.js +1 -1
- package/hooks/useUrlState.js +1 -1
- package/hooks/useVirtualList.js +1 -1
- package/hooks/useWatch.js +1 -1
- package/hooks/useWebSocket.js +1 -1
- package/hooks/useWhyDidYouUpdate.js +1 -1
- package/hooks/useWindowSize.js +4 -3
- package/hooks/utils/createEffectWithTarget.js +11 -12
- 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 +5 -6
- 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 +4 -4
- package/hooks/utils/useEffectWithTarget.js +1 -1
- package/hooks/utils/useIsomorphicLayoutEffectWithTarget.js +1 -1
- package/hooks/utils/useLayoutEffectWithTarget.js +1 -1
- package/hooks/utils.js +1 -1
- package/icons/file/index.js +31 -24
- package/icons/file.js +1 -1
- package/index.js +47 -46
- package/motion/CSSMotion.js +102 -0
- package/motion/CSSMotionList.js +100 -0
- package/motion/context.js +14 -0
- package/motion/hooks/useDomMotionEvents.js +21 -0
- package/motion/hooks/useNextFrame.js +24 -0
- package/motion/hooks/useStatus.js +121 -0
- package/motion/hooks/useStepQueue.js +44 -0
- package/motion/index.js +9 -0
- package/motion/interface.js +14 -0
- package/motion/util/diff.js +56 -0
- package/motion/util/motion.js +56 -0
- package/package.json +1 -1
- package/progress/index.js +1 -1
- package/resize-observer/Collection.js +25 -0
- package/resize-observer/SingleObserver.js +48 -0
- package/resize-observer/index.js +27 -0
- package/resize-observer/observerUtil.js +22 -0
- package/space/index.js +65 -52
- package/suspense-fallback-test/index.js +1 -1
- package/transition-group/CSSTransition.js +59 -54
- package/transition-group/ChildMapping.js +68 -0
- package/transition-group/PqbCSSTransition.js +22 -18
- package/transition-group/ReplaceTransition.js +7 -7
- package/transition-group/SwitchTransition.js +1 -1
- package/transition-group/Transition.js +56 -52
- package/transition-group/TransitionGroup.js +2 -3
- package/transition-group/TransitionGroupContext.js +1 -1
- package/transition-group/index.js +30 -29
- package/types/hooks/index.d.ts +3 -0
- package/types/hooks/use-event/index.d.ts +2 -0
- package/types/hooks/use-intersection-observers/index.d.ts +3 -1
- package/types/hooks/use-listen-window-resize/index.d.ts +4 -4
- package/types/hooks/use-memo/index.d.ts +2 -0
- package/types/hooks/use-mutation-observers/index.d.ts +3 -1
- package/types/hooks/use-resize-observers/index.d.ts +3 -1
- package/types/hooks/use-size/index.d.ts +1 -1
- package/types/hooks/use-sync-state/index.d.ts +10 -0
- package/types/hooks/use-window-size/index.d.ts +2 -3
- package/types/motion/CSSMotion.d.ts +77 -0
- package/types/motion/CSSMotionList.d.ts +34 -0
- package/types/motion/context.d.ts +9 -0
- package/types/motion/hooks/useDomMotionEvents.d.ts +3 -0
- package/types/motion/hooks/useNextFrame.d.ts +7 -0
- package/types/motion/hooks/useStatus.d.ts +5 -0
- package/types/motion/hooks/useStepQueue.d.ts +8 -0
- package/types/motion/index.d.ts +9 -0
- package/types/motion/interface.d.ts +22 -0
- package/types/motion/util/diff.d.ts +20 -0
- package/types/motion/util/motion.d.ts +10 -0
- package/types/resize-observer/Collection.d.ts +9 -0
- package/types/resize-observer/SingleObserver.d.ts +7 -0
- package/types/resize-observer/index.d.ts +7 -0
- package/types/resize-observer/interface.d.ts +25 -0
- package/types/resize-observer/observerUtil.d.ts +3 -0
- package/types/space/interface.d.ts +1 -1
- package/types/transition-group/CSSTransition.d.ts +0 -1
- package/types/transition-group/{utils/ChildMapping.d.ts → ChildMapping.d.ts} +4 -4
- package/types/transition-group/SwitchTransition.d.ts +3 -3
- package/types/transition-group/Transition.d.ts +1 -1
- package/types/transition-group/TransitionGroup.d.ts +1 -1
- package/types/transition-group/index.d.ts +1 -1
- package/types/utils/callbackOriginRef.d.ts +4 -0
- package/types/utils/dom.d.ts +2 -1
- package/types/utils/findRootElement.d.ts +23 -0
- package/types/utils/index.d.ts +4 -2
- package/types/utils/is.d.ts +5 -4
- package/types/utils/lodash.d.ts +2 -1
- package/types/utils/ref.d.ts +27 -0
- package/types/utils/setCreateRoot.d.ts +13 -0
- package/types/utils/toArray.d.ts +3 -3
- package/utils/callbackOriginRef.js +11 -0
- package/utils/caseName.js +1 -1
- package/utils/className.js +1 -1
- package/utils/compute.js +1 -1
- package/utils/constant.js +1 -1
- package/utils/copy.js +1 -1
- package/utils/date.js +1 -1
- package/utils/dayjs.js +1 -1
- package/utils/dom.js +12 -10
- package/utils/emitter.js +1 -1
- package/utils/fileToURL.js +1 -1
- package/utils/fillNBSP.js +1 -1
- package/utils/findRootElement.js +28 -0
- package/utils/findScrollParent.js +1 -1
- package/utils/getHighlightText.js +1 -1
- package/utils/getHotkeyHandler.js +1 -1
- package/utils/getStringLength.js +1 -1
- package/utils/include.js +1 -1
- package/utils/index.js +341 -329
- package/utils/intersectionObserver.js +1 -1
- package/utils/is.js +72 -81
- package/utils/keyboardCode.js +1 -1
- package/utils/lodash.js +45 -43
- package/utils/math.js +1 -1
- package/utils/mergeProps.js +1 -1
- package/utils/mergedToString.js +1 -1
- package/utils/mutationObserver.js +1 -1
- package/utils/omit.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 +2 -2
- package/utils/ref.js +41 -0
- 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 +53 -0
- package/utils/setDarkTheme.js +1 -1
- package/utils/setDir.js +1 -1
- package/utils/setPrimaryColor.js +1 -1
- package/utils/setTheme.js +1 -1
- package/utils/string.js +1 -1
- package/utils/style.js +1 -1
- package/utils/throttleByRaf.js +1 -1
- package/utils/throttleByRaf2.js +1 -1
- package/utils/tinycolor.js +1 -1
- package/utils/toArray.js +9 -9
- package/utils/tree.js +1 -1
- package/utils/tween.js +1 -1
- package/utils/uuid.js +1 -1
- package/utils/validate.js +1 -1
- package/utils/warning.js +1 -1
- package/transition-group/utils/ChildMapping.js +0 -66
- package/types/utils/reactDOM.d.ts +0 -34
- package/types/utils/supportRef.d.ts +0 -3
- package/utils/reactDOM.js +0 -87
- package/utils/supportRef.js +0 -10
package/utils/is.js
CHANGED
|
@@ -1,98 +1,89 @@
|
|
|
1
|
-
/* 2025-11-
|
|
2
|
-
import { isBrowser as
|
|
3
|
-
import { isNullOrUndefined as
|
|
4
|
-
import { is32Bit as
|
|
5
|
-
import { isDayjs as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
const
|
|
10
|
-
const r = (
|
|
1
|
+
/* 2025-11-27 12:10:58 */
|
|
2
|
+
import { isBrowser as e } from "@unicom-cloud/utils/constant/platform";
|
|
3
|
+
import { isNullOrUndefined as n, isString as o, isEmptyArray as a, isFunction as c } from "@unicom-cloud/utils/is";
|
|
4
|
+
import { is32Bit as C, isArguments as k, isArray as x, isArrayBuffer as M, isArrayLike as V, isArrayLikeObject as W, isBlob as L, isBoolean as D, isBuffer as I, isColorValue as U, isDate as q, isElement as w, isEmpty as P, isEmptyArray as T, isEmptyObject as J, isEmptyValue as z, isEqual as G, isEqualWith as H, isError as K, isEventTarget as Q, isExist as X, isFile as Y, isFinite as Z, isFunction as _, isInteger as $, isJSON as ii, isLength as si, isMap as ti, isMatch as ri, isMatchWith as ei, isNaN as ni, isNative as oi, isNil as ai, isNull as ci, isNullOrUndefined as ui, isNumber as mi, isObject as pi, isObjectLike as fi, isPlainObject as yi, isPromise as li, isReadableStream as Ei, isRegExp as di, isSafeInteger as gi, isSet as Ri, isString as Ni, isSymbol as Si, isTypedArray as bi, isUndefined as Ai, isWeakMap as Oi, isWeakSet as Bi, isWindow as Fi } from "@unicom-cloud/utils/is";
|
|
5
|
+
import { isDayjs as ji } from "dayjs";
|
|
6
|
+
import u, { isValidElement as t } from "react";
|
|
7
|
+
import m from "react-dom";
|
|
8
|
+
import { isFragment as p } from "react-is";
|
|
9
|
+
const S = !e, [b, A] = [18, 19].map((i, s, y) => {
|
|
10
|
+
const r = (u.version || m.version || "").match(/\d+/).toString();
|
|
11
11
|
return i <= parseFloat(r);
|
|
12
12
|
});
|
|
13
|
-
function
|
|
14
|
-
return !!(
|
|
13
|
+
function O(i, s) {
|
|
14
|
+
return !!(n(i) || i === !1 || o(i) && (s ? i.trim() === "" : i === "") || a(i));
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
return
|
|
16
|
+
function B(i) {
|
|
17
|
+
return t(i) && !p(i);
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
return
|
|
19
|
+
function f(i) {
|
|
20
|
+
return t(i) && c(i.type);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
return
|
|
22
|
+
function F(i) {
|
|
23
|
+
return f(i) && !!i.type.prototype?.isReactComponent;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
|
|
27
|
-
const e = Symbol.for("react.element"), s = Symbol.for("react.transitional.element"), t = Symbol.for("react.forward_ref");
|
|
28
|
-
if (y(i)) {
|
|
29
|
-
const r = i.$$typeof;
|
|
30
|
-
if (r === e || r === s) {
|
|
31
|
-
const o = i.type;
|
|
32
|
-
return (o && o.$$typeof) === t;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return !1;
|
|
25
|
+
function h(i) {
|
|
26
|
+
return i instanceof Element;
|
|
36
27
|
}
|
|
37
28
|
export {
|
|
38
|
-
|
|
29
|
+
C as is32Bit,
|
|
39
30
|
k as isArguments,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
I as isEmptyArray,
|
|
31
|
+
x as isArray,
|
|
32
|
+
M as isArrayBuffer,
|
|
33
|
+
V as isArrayLike,
|
|
34
|
+
W as isArrayLikeObject,
|
|
35
|
+
L as isBlob,
|
|
36
|
+
D as isBoolean,
|
|
37
|
+
I as isBuffer,
|
|
38
|
+
U as isColorValue,
|
|
39
|
+
q as isDate,
|
|
40
|
+
ji as isDayjs,
|
|
41
|
+
w as isElement,
|
|
42
|
+
h as isElementByInstanceof,
|
|
43
|
+
P as isEmpty,
|
|
44
|
+
T as isEmptyArray,
|
|
55
45
|
J as isEmptyObject,
|
|
56
|
-
|
|
46
|
+
O as isEmptyReactNode,
|
|
57
47
|
z as isEmptyValue,
|
|
58
48
|
G as isEqual,
|
|
59
49
|
H as isEqualWith,
|
|
60
50
|
K as isError,
|
|
61
51
|
Q as isEventTarget,
|
|
62
52
|
X as isExist,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
si as
|
|
69
|
-
ti as
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
ui as
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
53
|
+
Y as isFile,
|
|
54
|
+
Z as isFinite,
|
|
55
|
+
_ as isFunction,
|
|
56
|
+
$ as isInteger,
|
|
57
|
+
ii as isJSON,
|
|
58
|
+
si as isLength,
|
|
59
|
+
ti as isMap,
|
|
60
|
+
ri as isMatch,
|
|
61
|
+
ei as isMatchWith,
|
|
62
|
+
ni as isNaN,
|
|
63
|
+
oi as isNative,
|
|
64
|
+
ai as isNil,
|
|
65
|
+
ci as isNull,
|
|
66
|
+
ui as isNullOrUndefined,
|
|
67
|
+
mi as isNumber,
|
|
68
|
+
pi as isObject,
|
|
69
|
+
fi as isObjectLike,
|
|
70
|
+
yi as isPlainObject,
|
|
71
|
+
li as isPromise,
|
|
72
|
+
b as isReact18,
|
|
73
|
+
A as isReact19,
|
|
74
|
+
F as isReactClassComponent,
|
|
75
|
+
f as isReactComponent,
|
|
76
|
+
B as isReactComponentAndNotFragment,
|
|
77
|
+
Ei as isReadableStream,
|
|
78
|
+
di as isRegExp,
|
|
79
|
+
gi as isSafeInteger,
|
|
80
|
+
S as isServerRendering,
|
|
81
|
+
Ri as isSet,
|
|
82
|
+
Ni as isString,
|
|
83
|
+
Si as isSymbol,
|
|
84
|
+
bi as isTypedArray,
|
|
85
|
+
Ai as isUndefined,
|
|
86
|
+
Oi as isWeakMap,
|
|
87
|
+
Bi as isWeakSet,
|
|
88
|
+
Fi as isWindow
|
|
98
89
|
};
|
package/utils/keyboardCode.js
CHANGED
package/utils/lodash.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 2025-11-
|
|
1
|
+
/* 2025-11-27 12:10:58 */
|
|
2
2
|
import { default as a } from "lodash/assign";
|
|
3
3
|
import { default as o } from "lodash/assignIn";
|
|
4
4
|
import { default as s } from "lodash/at";
|
|
@@ -7,10 +7,10 @@ import { default as d } from "lodash/capitalize";
|
|
|
7
7
|
import { default as x } from "lodash/castArray";
|
|
8
8
|
import { default as n } from "lodash/chain";
|
|
9
9
|
import { default as h } from "lodash/chunk";
|
|
10
|
-
import { default as
|
|
10
|
+
import { default as g } from "lodash/clone";
|
|
11
11
|
import { default as W } from "lodash/cloneDeep";
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
12
|
+
import { default as B } from "lodash/cloneDeepWith";
|
|
13
|
+
import { default as b } from "lodash/cloneWith";
|
|
14
14
|
import { default as q } from "lodash/compact";
|
|
15
15
|
import { default as w } from "lodash/curry";
|
|
16
16
|
import { default as I } from "lodash/debounce";
|
|
@@ -34,30 +34,31 @@ import { default as de } from "lodash/memoize";
|
|
|
34
34
|
import { default as xe } from "lodash/merge";
|
|
35
35
|
import { default as ne } from "lodash/mergeWith";
|
|
36
36
|
import { default as he } from "lodash/orderBy";
|
|
37
|
-
import { default as
|
|
37
|
+
import { default as ge } from "lodash/partition";
|
|
38
38
|
import { default as We } from "lodash/pullAll";
|
|
39
|
-
import { default as
|
|
40
|
-
import { default as
|
|
39
|
+
import { default as Be } from "lodash/result";
|
|
40
|
+
import { default as be } from "lodash/sample";
|
|
41
41
|
import { default as qe } from "lodash/sampleSize";
|
|
42
42
|
import { default as we } from "lodash/set";
|
|
43
43
|
import { default as Ie } from "lodash/setWith";
|
|
44
44
|
import { default as Ke } from "lodash/shuffle";
|
|
45
45
|
import { default as Se } from "lodash/snakeCase";
|
|
46
|
-
import { default as je } from "lodash/
|
|
47
|
-
import { default as Ge } from "lodash/
|
|
48
|
-
import { default as Je } from "lodash/
|
|
49
|
-
import { default as Me } from "lodash/
|
|
50
|
-
import { default as Oe } from "lodash/
|
|
51
|
-
import { default as Re } from "lodash/
|
|
52
|
-
import { default as Ve } from "lodash/
|
|
53
|
-
import { default as Ye } from "lodash/
|
|
54
|
-
import { default as _e } from "lodash/
|
|
55
|
-
import { default as et } from "lodash/
|
|
56
|
-
import { default as at } from "lodash/
|
|
57
|
-
import { default as ot } from "lodash/
|
|
58
|
-
import { default as st } from "lodash/
|
|
59
|
-
import { default as lt } from "lodash/
|
|
60
|
-
import { default as dt } from "lodash/
|
|
46
|
+
import { default as je } from "lodash/sortBy";
|
|
47
|
+
import { default as Ge } from "lodash/startCase";
|
|
48
|
+
import { default as Je } from "lodash/throttle";
|
|
49
|
+
import { default as Me } from "lodash/toPath";
|
|
50
|
+
import { default as Oe } from "lodash/truncate";
|
|
51
|
+
import { default as Re } from "lodash/union";
|
|
52
|
+
import { default as Ve } from "lodash/uniq";
|
|
53
|
+
import { default as Ye } from "lodash/uniqueId";
|
|
54
|
+
import { default as _e } from "lodash/unset";
|
|
55
|
+
import { default as et } from "lodash/update";
|
|
56
|
+
import { default as at } from "lodash/updateWith";
|
|
57
|
+
import { default as ot } from "lodash/upperCase";
|
|
58
|
+
import { default as st } from "lodash/upperFirst";
|
|
59
|
+
import { default as lt } from "lodash/without";
|
|
60
|
+
import { default as dt } from "lodash/xor";
|
|
61
|
+
import { default as xt } from "lodash/zip";
|
|
61
62
|
export {
|
|
62
63
|
a as assign,
|
|
63
64
|
o as assignIn,
|
|
@@ -67,10 +68,10 @@ export {
|
|
|
67
68
|
x as castArray,
|
|
68
69
|
n as chain,
|
|
69
70
|
h as chunk,
|
|
70
|
-
|
|
71
|
+
g as clone,
|
|
71
72
|
W as cloneDeep,
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
B as cloneDeepWith,
|
|
74
|
+
b as cloneWith,
|
|
74
75
|
q as compact,
|
|
75
76
|
w as curry,
|
|
76
77
|
I as debounce,
|
|
@@ -94,28 +95,29 @@ export {
|
|
|
94
95
|
xe as merge,
|
|
95
96
|
ne as mergeWith,
|
|
96
97
|
he as orderBy,
|
|
97
|
-
|
|
98
|
+
ge as partition,
|
|
98
99
|
We as pullAll,
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
Be as result,
|
|
101
|
+
be as sample,
|
|
101
102
|
qe as sampleSize,
|
|
102
103
|
we as set,
|
|
103
104
|
Ie as setWith,
|
|
104
105
|
Ke as shuffle,
|
|
105
106
|
Se as snakeCase,
|
|
106
|
-
je as
|
|
107
|
-
Ge as
|
|
108
|
-
Je as
|
|
109
|
-
Me as
|
|
110
|
-
Oe as
|
|
111
|
-
Re as
|
|
112
|
-
Ve as
|
|
113
|
-
Ye as
|
|
114
|
-
_e as
|
|
115
|
-
et as
|
|
116
|
-
at as
|
|
117
|
-
ot as
|
|
118
|
-
st as
|
|
119
|
-
lt as
|
|
120
|
-
dt as
|
|
107
|
+
je as sortBy,
|
|
108
|
+
Ge as startCase,
|
|
109
|
+
Je as throttle,
|
|
110
|
+
Me as toPath,
|
|
111
|
+
Oe as truncate,
|
|
112
|
+
Re as union,
|
|
113
|
+
Ve as uniq,
|
|
114
|
+
Ye as uniqueId,
|
|
115
|
+
_e as unset,
|
|
116
|
+
et as update,
|
|
117
|
+
at as updateWith,
|
|
118
|
+
ot as upperCase,
|
|
119
|
+
st as upperFirst,
|
|
120
|
+
lt as without,
|
|
121
|
+
dt as xor,
|
|
122
|
+
xt as zip
|
|
121
123
|
};
|
package/utils/math.js
CHANGED
package/utils/mergeProps.js
CHANGED
package/utils/mergedToString.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/ref.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* 2025-11-27 12:10:58 */
|
|
2
|
+
import { isValidElement as n } from "react";
|
|
3
|
+
import { isMemo as p, ForwardRef as u } from "react-is";
|
|
4
|
+
import l from "../hooks/use-memo/index.js";
|
|
5
|
+
import { isReact19 as s, isReactComponentAndNotFragment as o } from "./is.js";
|
|
6
|
+
import { isFunction as i, isObjectLike as a } from "@unicom-cloud/utils/is";
|
|
7
|
+
const R = (t, e) => {
|
|
8
|
+
i(t) ? t(e) : a(t) && "current" in t && (t.current = e);
|
|
9
|
+
}, m = (...t) => {
|
|
10
|
+
const e = t.filter(Boolean);
|
|
11
|
+
return e.length <= 1 ? e[0] : (r) => {
|
|
12
|
+
t.forEach((f) => {
|
|
13
|
+
R(f, r);
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
}, L = (...t) => l(
|
|
17
|
+
() => m(...t),
|
|
18
|
+
t,
|
|
19
|
+
(e, r) => e.length !== r.length || e.every((f, c) => f !== r[c])
|
|
20
|
+
);
|
|
21
|
+
function y(t) {
|
|
22
|
+
if (!t) return !1;
|
|
23
|
+
if (o(t) && s)
|
|
24
|
+
return !0;
|
|
25
|
+
const e = p(t) ? t.type.type : t.type;
|
|
26
|
+
return !(i(e) && !e.prototype?.render && e.$$typeof !== u || i(t) && !t.prototype?.render && t.$$typeof !== u);
|
|
27
|
+
}
|
|
28
|
+
const M = (t) => o(t) && y(t);
|
|
29
|
+
function g(t) {
|
|
30
|
+
return n(t) ? s ? t.props?.ref : t.ref : null;
|
|
31
|
+
}
|
|
32
|
+
const b = g;
|
|
33
|
+
export {
|
|
34
|
+
m as composeRef,
|
|
35
|
+
R as fillRef,
|
|
36
|
+
b as getNodeRef,
|
|
37
|
+
g as getReactElementRef,
|
|
38
|
+
M as supportNodeRef,
|
|
39
|
+
y as supportRef,
|
|
40
|
+
L as useComposeRef
|
|
41
|
+
};
|
package/utils/resizeObserver.js
CHANGED
package/utils/saveAs.js
CHANGED
package/utils/screenfull.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 2025-11-
|
|
1
|
+
/* 2025-11-27 12:10:58 */
|
|
2
2
|
import { getScrollMargins as d, compute as c } from "./compute.js";
|
|
3
3
|
import { alignNearest as x, canOverflow as C, getFrameElement as F, getParentElement as H, isHiddenByFrame as j, isScrollable as E } from "./compute.js";
|
|
4
4
|
import "./is.js";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* 2025-11-27 12:10:58 */
|
|
2
|
+
import i from "react-dom";
|
|
3
|
+
import m from "react-dom/client";
|
|
4
|
+
import { isReact18 as R } from "./is.js";
|
|
5
|
+
import { isFunction as _, isObject as E } from "@unicom-cloud/utils/is";
|
|
6
|
+
const c = "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED";
|
|
7
|
+
function s(e) {
|
|
8
|
+
E(i[c]) && (i[c].usingClientEntryPoint = e);
|
|
9
|
+
}
|
|
10
|
+
let u;
|
|
11
|
+
try {
|
|
12
|
+
u = i.createRoot || m.createRoot;
|
|
13
|
+
} catch (e) {
|
|
14
|
+
console.error(e);
|
|
15
|
+
}
|
|
16
|
+
let f;
|
|
17
|
+
function a(e) {
|
|
18
|
+
e && (u = e), R && u ? f = (n, o) => {
|
|
19
|
+
s(!0);
|
|
20
|
+
const t = u(o);
|
|
21
|
+
return s(!1), t.render(n), {
|
|
22
|
+
...t,
|
|
23
|
+
render(r) {
|
|
24
|
+
t.render(r);
|
|
25
|
+
},
|
|
26
|
+
_unmount() {
|
|
27
|
+
return setTimeout(() => {
|
|
28
|
+
t?.unmount?.();
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
} : f = (n, o) => {
|
|
33
|
+
const t = i.render;
|
|
34
|
+
return _(t) && t(n, o), {
|
|
35
|
+
render(r) {
|
|
36
|
+
_(t) && t(r, o);
|
|
37
|
+
},
|
|
38
|
+
_unmount() {
|
|
39
|
+
const r = i.unmountComponentAtNode;
|
|
40
|
+
_(r) && r(o);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
a();
|
|
46
|
+
function O(e, n) {
|
|
47
|
+
return f(e, n);
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
a as default,
|
|
51
|
+
O as render,
|
|
52
|
+
a as setCreateRoot
|
|
53
|
+
};
|
package/utils/setDarkTheme.js
CHANGED
package/utils/setDir.js
CHANGED
package/utils/setPrimaryColor.js
CHANGED
package/utils/setTheme.js
CHANGED
package/utils/string.js
CHANGED
package/utils/style.js
CHANGED
package/utils/throttleByRaf.js
CHANGED
package/utils/throttleByRaf2.js
CHANGED
package/utils/tinycolor.js
CHANGED
package/utils/toArray.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/* 2025-11-
|
|
2
|
-
import
|
|
3
|
-
import { isFragment as
|
|
1
|
+
/* 2025-11-27 12:10:58 */
|
|
2
|
+
import f from "react";
|
|
3
|
+
import { isFragment as o } from "react-is";
|
|
4
4
|
import "./is.js";
|
|
5
|
-
import {
|
|
6
|
-
function
|
|
5
|
+
import { isNullOrUndefined as m, isArray as n } from "@unicom-cloud/utils/is";
|
|
6
|
+
function p(s, t = {}) {
|
|
7
7
|
const e = [];
|
|
8
|
-
return
|
|
9
|
-
r
|
|
8
|
+
return f.Children.forEach(s, (r) => {
|
|
9
|
+
m(r) && !t.keepEmpty || (n(r) ? e.push(...p(r, t)) : o(r) && r.props ? e.push(...p(r.props.children, t)) : e.push(r));
|
|
10
10
|
}), e;
|
|
11
11
|
}
|
|
12
12
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
p as default,
|
|
14
|
+
p as toArray
|
|
15
15
|
};
|
package/utils/tree.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 2025-11-
|
|
1
|
+
/* 2025-11-27 12:10:58 */
|
|
2
2
|
import { default as a, findNodeBy as r, getChildWithParentBy as y, getItemBy as B, getItemBy2 as g, getItemBy3 as m, getItemByID as d, getLabelFromDictionaryByValue as i, searchTree as l, default as o } from "@unicom-cloud/utils/tree";
|
|
3
3
|
export {
|
|
4
4
|
a as default,
|
package/utils/tween.js
CHANGED
package/utils/uuid.js
CHANGED
package/utils/validate.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 2025-11-
|
|
1
|
+
/* 2025-11-27 12:10:58 */
|
|
2
2
|
import { ArrayValidator as l, BooleanValidator as t, CustomValidator as o, DefaultValidateMessage as d, NumberValidator as r, ObjectValidator as i, Schema as V, StringValidator as m, TypeValidator as c, defaultValidateLocale as u, enUSValidateLocale as f, mergeTemplate as s, default as g, zhCNValidateLocale as n } from "@unicom-cloud/utils/validate";
|
|
3
3
|
export {
|
|
4
4
|
l as ArrayValidator,
|
package/utils/warning.js
CHANGED