@unicom-cloud/ui-common 0.1.8 → 0.1.10
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 +7 -5
- package/Motion.js +1 -1
- package/Progress.js +1 -1
- package/ResizeObserver.js +1 -1
- package/Space.js +5 -7
- package/SuspenseFallbackTest.js +1 -1
- package/TransitionGroup.js +27 -26
- package/development/index.js +27 -25
- package/empty/index.js +1 -1
- package/flex/index.js +63 -67
- package/flex/utils.js +35 -0
- package/higher-order/index.js +1 -1
- package/higher-order/with-speech-synthesis/index.js +1 -1
- 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 +54 -52
- package/hooks/use-async-effect/index.js +1 -1
- package/hooks/use-boolean/index.js +1 -1
- package/hooks/use-click-away/index.js +1 -1
- package/hooks/use-computed-state/index.js +1 -1
- package/hooks/use-controllable-value/index.js +1 -1
- package/hooks/use-cookie-state/index.js +1 -1
- package/hooks/use-count-down/index.js +1 -1
- package/hooks/use-counter/index.js +1 -1
- package/hooks/use-create/index.js +1 -1
- package/hooks/use-creation/index.js +1 -1
- package/hooks/use-debounce/index.js +1 -1
- package/hooks/use-debounce-effect/index.js +1 -1
- package/hooks/use-debounce-fn/index.js +1 -1
- package/hooks/use-deep-compare-effect/index.js +1 -1
- package/hooks/use-deep-compare-layout-effect/index.js +1 -1
- package/hooks/use-document-visibility/index.js +1 -1
- package/hooks/use-drag/index.js +1 -1
- package/hooks/use-drop/index.js +1 -1
- package/hooks/use-event/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.js +1 -1
- package/hooks/use-get-state/index.js +1 -1
- package/hooks/use-history-travel/index.js +1 -1
- package/hooks/use-hover/index.js +1 -1
- package/hooks/use-id/index.js +1 -1
- package/hooks/use-in-view/index.js +1 -1
- package/hooks/use-in-viewport/index.js +1 -1
- package/hooks/use-infinite-scroll/index.js +34 -29
- package/hooks/use-intersection-observer/index.js +10 -12
- package/hooks/use-intersection-observers/index.js +5 -32
- package/hooks/use-interval/index.js +1 -1
- package/hooks/use-is-first-render/index.js +1 -1
- package/hooks/use-isomorphic-layout-effect/index.js +1 -1
- package/hooks/use-key-press/index.js +1 -1
- package/hooks/use-keyboard-event/index.js +1 -1
- package/hooks/use-latest/index.js +1 -1
- package/hooks/use-listen-window-resize/index.js +1 -1
- package/hooks/use-local-storage-state/index.js +1 -1
- package/hooks/use-lock-fn/index.js +1 -1
- package/hooks/use-long-press/index.js +1 -1
- package/hooks/use-map/index.js +1 -1
- package/hooks/use-media/index.js +1 -1
- package/hooks/use-memo/index.js +1 -1
- package/hooks/use-memoized-fn/index.js +1 -1
- package/hooks/use-merge-props/index.js +1 -1
- package/hooks/use-merge-value/index.js +9 -12
- package/hooks/use-mount/index.js +1 -1
- package/hooks/use-mouse/index.js +1 -1
- package/hooks/use-move/index.js +59 -49
- package/hooks/use-mutation-observer/index.js +1 -1
- package/hooks/use-mutation-observers/index.js +8 -5
- 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 +20 -0
- 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 +8 -5
- package/hooks/use-responsive/index.js +1 -1
- package/hooks/use-safe-state/index.js +1 -1
- package/hooks/use-scroll/index.js +1 -1
- package/hooks/use-selections/index.js +1 -1
- package/hooks/use-session-storage-state/index.js +1 -1
- package/hooks/use-set/index.js +1 -1
- package/hooks/use-set-state/index.js +1 -1
- package/hooks/use-size/index.js +1 -1
- package/hooks/use-state-callback/index.js +1 -1
- package/hooks/use-state-with-promise/index.js +1 -1
- package/hooks/use-sync-state/index.js +1 -1
- package/hooks/use-text-selection/index.js +1 -1
- package/hooks/use-theme/index.js +1 -1
- package/hooks/use-throttle/index.js +1 -1
- package/hooks/use-throttle-effect/index.js +1 -1
- package/hooks/use-throttle-fn/index.js +1 -1
- package/hooks/use-timeout/index.js +1 -1
- package/hooks/use-title/index.js +1 -1
- package/hooks/use-toggle/index.js +1 -1
- package/hooks/use-tracked-effect/index.js +1 -1
- package/hooks/use-unmount/index.js +1 -1
- package/hooks/use-unmounted-ref/index.js +1 -1
- package/hooks/use-update/index.js +1 -1
- package/hooks/use-update-effect/index.js +1 -1
- package/hooks/use-update-layout-effect/index.js +1 -1
- package/hooks/use-url-state/index.js +1 -1
- package/hooks/use-virtual-list/index.js +1 -1
- package/hooks/use-watch/index.js +1 -1
- package/hooks/use-web-socket/index.js +1 -1
- package/hooks/use-why-did-you-update/index.js +1 -1
- package/hooks/use-window-size/index.js +1 -1
- package/hooks/useAsyncEffect.js +1 -1
- package/hooks/useBoolean.js +1 -1
- package/hooks/useClickAway.js +1 -1
- 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 +1 -1
- package/hooks/useEventListener.js +1 -1
- 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 +1 -1
- package/hooks/useInfiniteScroll.js +1 -1
- package/hooks/useIntersectionObserver.js +4 -6
- package/hooks/useIntersectionObservers.js +5 -32
- 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 +1 -1
- package/hooks/useMemoizedFn.js +1 -1
- package/hooks/useMergeProps.js +1 -1
- package/hooks/useMergeValue.js +4 -3
- package/hooks/useMount.js +1 -1
- package/hooks/useMouse.js +1 -1
- package/hooks/useMove.js +4 -3
- package/hooks/useMutationObserver.js +1 -1
- package/hooks/useMutationObservers.js +8 -5
- package/hooks/useNetwork.js +1 -1
- package/hooks/useOnlineStatus.js +1 -1
- package/hooks/useOverflowHidden.js +1 -1
- package/hooks/useOverrideRef.js +1 -1
- package/hooks/usePagination.js +1 -1
- package/hooks/usePasteImage.js +9 -0
- 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 +8 -5
- 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 +1 -1
- package/hooks/useStateCallback.js +1 -1
- package/hooks/useStateWithPromise.js +1 -1
- package/hooks/useSyncState.js +1 -1
- 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 +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/hooks/utils.js +1 -1
- package/icons/file/index.js +1 -1
- package/icons/file.js +1 -1
- package/index.js +641 -48
- package/motion/CSSMotion.js +1 -1
- package/motion/CSSMotionList.js +1 -1
- package/motion/context.js +1 -1
- package/motion/hooks/useDomMotionEvents.js +1 -1
- package/motion/hooks/useNextFrame.js +1 -1
- package/motion/hooks/useStatus.js +1 -1
- package/motion/hooks/useStepQueue.js +1 -1
- package/motion/index.js +1 -1
- package/motion/interface.js +1 -1
- package/motion/util/diff.js +1 -1
- package/motion/util/motion.js +11 -10
- package/package.json +1 -1
- package/progress/index.js +40 -53
- package/resize-observer/Collection.js +1 -1
- package/resize-observer/SingleObserver.js +1 -1
- package/resize-observer/index.js +1 -1
- package/resize-observer/observerUtil.js +1 -1
- package/space/index.js +79 -88
- package/style.css +1 -1
- package/suspense-fallback-test/index.js +1 -1
- package/transition-group/CSSTransition.js +36 -35
- package/transition-group/ChildMapping.js +1 -1
- package/transition-group/PqbCSSTransition.js +1 -1
- package/transition-group/ReplaceTransition.js +1 -1
- package/transition-group/SwitchTransition.js +1 -1
- package/transition-group/Transition.js +2 -1
- package/transition-group/TransitionGroup.js +1 -1
- package/transition-group/TransitionGroupContext.js +1 -1
- package/transition-group/index.js +27 -26
- package/types/development/interface.d.ts +3 -2
- package/types/flex/index.d.ts +6 -5
- package/types/flex/interface.d.ts +13 -12
- package/types/flex/utils.d.ts +19 -0
- package/types/hooks/index.d.ts +1 -0
- package/types/hooks/use-paste-image/index.d.ts +3 -0
- package/types/hooks/use-theme/index.d.ts +2 -2
- package/types/index.d.ts +3 -1
- package/types/motion/hooks/useStepQueue.d.ts +1 -1
- package/types/progress/index.d.ts +0 -28
- package/types/space/index.d.ts +4 -4
- package/types/space/interface.d.ts +17 -10
- package/types/transition-group/index.d.ts +10 -10
- package/types/utils/callOrReturn.d.ts +1 -0
- package/types/utils/date.d.ts +1 -1
- package/types/utils/dom.d.ts +8 -9
- package/types/utils/fileRead.d.ts +1 -0
- package/types/utils/fileToDataURL.d.ts +1 -0
- package/types/utils/index.d.ts +3 -1
- package/types/utils/is.d.ts +3 -2
- package/types/utils/ref.d.ts +11 -11
- package/types/utils/scrollIntoViewIfNeeded.d.ts +1 -1
- package/types/utils/tree.d.ts +1 -1
- package/types/utils/uuid.d.ts +1 -1
- package/types/utils/validate.d.ts +2 -1
- package/utils/callOrReturn.js +6 -0
- package/utils/callbackOriginRef.js +1 -1
- 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 +8 -2
- package/utils/dayjs.js +1 -1
- package/utils/dom.js +19 -25
- package/utils/emitter.js +1 -1
- package/utils/fileRead.js +6 -0
- package/utils/fileToDataURL.js +6 -0
- package/utils/fillNBSP.js +1 -1
- package/utils/findRootElement.js +15 -15
- 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 +6 -6
- package/utils/index.js +378 -340
- package/utils/intersectionObserver.js +1 -1
- package/utils/is.js +118 -79
- package/utils/keyboardCode.js +1 -1
- package/utils/lodash.js +1 -1
- package/utils/math.js +1 -1
- package/utils/mergeProps.js +1 -1
- package/utils/mergedToString.js +1 -1
- package/utils/mutationObserver.js +1 -1
- package/utils/omit.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/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 +1 -1
- package/utils/setPrimaryColor.js +1 -1
- package/utils/setTheme.js +1 -1
- package/utils/string.js +1 -1
- package/utils/style.js +1 -1
- package/utils/throttleByRaf.js +1 -1
- package/utils/throttleByRaf2.js +1 -1
- package/utils/tinycolor.js +1 -1
- package/utils/toArray.js +1 -1
- package/utils/tree.js +7 -9
- package/utils/tween.js +1 -1
- package/utils/uuid.js +5 -4
- package/utils/validate.js +14 -16
- package/utils/warning.js +1 -1
- package/flex/interface.js +0 -10
- package/types/utils/fileToURL.d.ts +0 -1
- package/utils/fileToURL.js +0 -6
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
/* 2025-
|
|
1
|
+
/* 2025-12-22 09:21:00 */
|
|
2
2
|
import { jsx as S } from "react/jsx-runtime";
|
|
3
3
|
import h from "react";
|
|
4
4
|
import "@unicom-cloud/utils/dom-helpers/canUseDOM";
|
|
5
|
+
import "@unicom-cloud/utils/dom-helpers/getElementCoordinates";
|
|
5
6
|
import T from "@unicom-cloud/utils/dom-helpers/reflow";
|
|
6
7
|
import "../utils/is.js";
|
|
7
8
|
import { findRootElement as x } from "../utils/findRootElement.js";
|
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
/* 2025-
|
|
1
|
+
/* 2025-12-22 09:21:00 */
|
|
2
2
|
import "@unicom-cloud/utils/dom-helpers/canUseDOM";
|
|
3
|
-
import
|
|
3
|
+
import "@unicom-cloud/utils/dom-helpers/getElementCoordinates";
|
|
4
|
+
import { default as n } from "@unicom-cloud/utils/dom-helpers/reflow";
|
|
4
5
|
import "../utils/is.js";
|
|
5
|
-
import { getChildMapping as
|
|
6
|
-
import { default as
|
|
7
|
-
import { PqbCSSTransition as
|
|
8
|
-
import { default as
|
|
6
|
+
import { getChildMapping as p, getInitialChildMapping as s, getNextChildMapping as T, mergeChildMappings as N } from "./ChildMapping.js";
|
|
7
|
+
import { default as I } from "./CSSTransition.js";
|
|
8
|
+
import { PqbCSSTransition as f } from "./PqbCSSTransition.js";
|
|
9
|
+
import { default as u } from "./ReplaceTransition.js";
|
|
9
10
|
import { default as G, modes as g } from "./SwitchTransition.js";
|
|
10
|
-
import { ENTERED as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
11
|
+
import { ENTERED as M, ENTERING as C, EXITED as R, EXITING as S, UNMOUNTED as h, default as O } from "./Transition.js";
|
|
12
|
+
import { default as A, default as _ } from "./TransitionGroup.js";
|
|
13
|
+
import { default as U } from "./TransitionGroupContext.js";
|
|
13
14
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
I as CSSTransition,
|
|
16
|
+
f as PqbCSSTransition,
|
|
17
|
+
u as ReplaceTransition,
|
|
17
18
|
G as SwitchTransition,
|
|
18
19
|
g as SwitchTransitionModes,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
20
|
+
M as TRANSITION_ENTERED,
|
|
21
|
+
C as TRANSITION_ENTERING,
|
|
22
|
+
R as TRANSITION_EXITED,
|
|
23
|
+
S as TRANSITION_EXITING,
|
|
24
|
+
h as TRANSITION_UNMOUNTED,
|
|
25
|
+
O as Transition,
|
|
26
|
+
A as TransitionGroup,
|
|
27
|
+
U as TransitionGroupContext,
|
|
28
|
+
n as TransitionGroupForceReflow,
|
|
29
|
+
p as TransitionGroupGetChildMapping,
|
|
30
|
+
s as TransitionGroupGetInitialChildMapping,
|
|
31
|
+
T as TransitionGroupGetNextChildMapping,
|
|
32
|
+
N as TransitionGroupMergeChildMappings,
|
|
33
|
+
_ as default
|
|
33
34
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* Development 组件的属性类型定义
|
|
4
4
|
* @property {string} [url] - 图片 URL,如果有则显示图片而不是图标
|
|
@@ -11,11 +11,12 @@ import type { ReactNode } from 'react';
|
|
|
11
11
|
* @property {string} [labelClassName] - 文字标签类名
|
|
12
12
|
*/
|
|
13
13
|
export interface DevelopmentProps {
|
|
14
|
+
style?: CSSProperties;
|
|
15
|
+
className?: string | string[];
|
|
14
16
|
url?: string;
|
|
15
17
|
icon?: ReactNode;
|
|
16
18
|
label?: string;
|
|
17
19
|
tip?: string;
|
|
18
|
-
className?: string;
|
|
19
20
|
imgClassName?: string;
|
|
20
21
|
iconClassName?: string;
|
|
21
22
|
labelClassName?: string;
|
package/types/flex/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type
|
|
3
|
-
|
|
4
|
-
declare const Flex:
|
|
5
|
-
Vertical:
|
|
2
|
+
import { type FlexVerticalProps } from './interface';
|
|
3
|
+
import { GAP_SIZE_MAP, processGap } from './utils';
|
|
4
|
+
declare const Flex: typeof Flex & {
|
|
5
|
+
Vertical: typeof FlexVertical;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
declare const FlexVertical: React.ForwardRefExoticComponent<FlexVerticalProps & React.RefAttributes<HTMLElement>>;
|
|
8
|
+
export { GAP_SIZE_MAP as FLEX_GAP_SIZE_MAP, processGap as flexProcessGap, FlexVertical, };
|
|
8
9
|
export default Flex;
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export type GapProperty = 'gap' | 'rowGap' | 'columnGap';
|
|
3
|
-
export
|
|
4
|
-
mini: number;
|
|
5
|
-
small: number;
|
|
6
|
-
medium: number;
|
|
7
|
-
large: number;
|
|
8
|
-
};
|
|
9
|
-
export type SizeType = keyof typeof GAP_SIZE_MAP;
|
|
3
|
+
export type SizeType = 'mini' | 'small' | 'medium' | 'large' | '1x' | '2x' | '3x' | '4x' | '5x' | '6x' | '7x' | '8x' | '9x' | 'x1' | 'x2' | 'x3' | 'x4' | 'x5' | 'x6' | 'x7' | 'x8' | 'x9';
|
|
10
4
|
export type GapType = SizeType | React.CSSProperties['gap'];
|
|
11
5
|
/**
|
|
12
6
|
* @title Flex
|
|
@@ -29,25 +23,32 @@ export interface FlexProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
29
23
|
/**
|
|
30
24
|
* @zh 主轴对齐方式
|
|
31
25
|
* @en Justify content alignment
|
|
26
|
+
* @deprecated 请用 justifyContent 属性替代
|
|
32
27
|
*/
|
|
33
28
|
justify?: React.CSSProperties['justifyContent'];
|
|
29
|
+
/**
|
|
30
|
+
* @zh 主轴对齐方式
|
|
31
|
+
* @en Justify content alignment
|
|
32
|
+
*/
|
|
33
|
+
justifyContent?: React.CSSProperties['justifyContent'];
|
|
34
34
|
/**
|
|
35
35
|
* @zh 交叉轴对齐方式
|
|
36
36
|
* @en Align items alignment
|
|
37
|
+
* @deprecated 请用 alignItems 属性替代
|
|
37
38
|
*/
|
|
38
39
|
align?: React.CSSProperties['alignItems'];
|
|
39
40
|
/**
|
|
40
|
-
* @zh
|
|
41
|
-
* @en
|
|
41
|
+
* @zh 交叉轴对齐方式
|
|
42
|
+
* @en Align items alignment
|
|
42
43
|
*/
|
|
43
|
-
|
|
44
|
+
alignItems?: React.CSSProperties['alignItems'];
|
|
44
45
|
/**
|
|
45
46
|
* @zh 间距大小
|
|
46
47
|
* @en Gap size
|
|
47
48
|
* @default small
|
|
48
|
-
* @values 'mini', 'small', 'medium', 'large'
|
|
49
|
+
* @values 'mini', 'small', 'medium', 'large'
|
|
49
50
|
*/
|
|
50
|
-
gap?: GapType;
|
|
51
|
+
gap?: GapType | GapType[];
|
|
51
52
|
/**
|
|
52
53
|
* @zh 自定义渲染元素
|
|
53
54
|
* @en Custom component type
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type FlexProps } from './interface';
|
|
3
|
+
declare const GAP_SIZE_MAP: {
|
|
4
|
+
'1x': number;
|
|
5
|
+
'2x': number;
|
|
6
|
+
'3x': number;
|
|
7
|
+
'4x': number;
|
|
8
|
+
'5x': number;
|
|
9
|
+
'6x': number;
|
|
10
|
+
'7x': number;
|
|
11
|
+
'8x': number;
|
|
12
|
+
'9x': number;
|
|
13
|
+
};
|
|
14
|
+
declare function getGapFromSizeString(value: any): any;
|
|
15
|
+
/**
|
|
16
|
+
* 处理间距属性
|
|
17
|
+
*/
|
|
18
|
+
declare function processGap(value: FlexProps['gap'], rowGap?: React.CSSProperties['rowGap'], columnGap?: React.CSSProperties['columnGap']): React.CSSProperties;
|
|
19
|
+
export { GAP_SIZE_MAP, getGapFromSizeString, processGap };
|
package/types/hooks/index.d.ts
CHANGED
|
@@ -93,6 +93,7 @@ export { default as useMutationObservers } from './use-mutation-observers';
|
|
|
93
93
|
export { default as useOnlineStatus } from './use-online-status';
|
|
94
94
|
export { default as useOverflowHidden } from './use-overflow-hidden';
|
|
95
95
|
export { default as useOverrideRef } from './use-override-ref';
|
|
96
|
+
export { default as usePasteImage } from './use-paste-image';
|
|
96
97
|
export { default as usePersistCallback } from './use-persist-callback';
|
|
97
98
|
export { default as usePrefersColorSchemeDark } from './use-prefers-color-scheme-dark';
|
|
98
99
|
export { default as useRefs } from './use-refs';
|
|
@@ -10,7 +10,7 @@ type Options = {
|
|
|
10
10
|
};
|
|
11
11
|
export default function useTheme(options?: Options): {
|
|
12
12
|
theme: ThemeType;
|
|
13
|
-
themeMode: "
|
|
14
|
-
setThemeMode: (this: unknown, mode: "
|
|
13
|
+
themeMode: "light" | "dark" | "system";
|
|
14
|
+
setThemeMode: (this: unknown, mode: "light" | "dark" | "system") => void;
|
|
15
15
|
};
|
|
16
16
|
export {};
|
package/types/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
export * from './hooks';
|
|
1
2
|
export * from './transition-group';
|
|
3
|
+
export * from './utils';
|
|
2
4
|
export { default as Development } from './development';
|
|
3
5
|
export type { DevelopmentProps } from './development/interface';
|
|
4
6
|
export { default as Empty } from './empty';
|
|
5
7
|
export type { EmptyProps } from './empty/interface';
|
|
6
|
-
export { default as Flex, FlexVertical } from './flex';
|
|
8
|
+
export { default as Flex, FLEX_GAP_SIZE_MAP, flexProcessGap, FlexVertical, } from './flex';
|
|
7
9
|
export type { FlexProps, FlexVerticalProps } from './flex/interface';
|
|
8
10
|
export { default as withSpeechSynthesis } from './higher-order/with-speech-synthesis';
|
|
9
11
|
export type { SpeechSynthesisHandles, SpeechSynthesisProps, } from './higher-order/with-speech-synthesis/interface';
|
|
@@ -3,6 +3,6 @@ import type { MotionStatus, StepStatus } from '../interface';
|
|
|
3
3
|
export declare const SkipStep: false;
|
|
4
4
|
/** Current step should be update in */
|
|
5
5
|
export declare const DoStep: true;
|
|
6
|
-
export declare function isActive(step: StepStatus): step is "
|
|
6
|
+
export declare function isActive(step: StepStatus): step is "end" | "active";
|
|
7
7
|
declare function useStepQueue(status: MotionStatus, prepareOnly: boolean, callback: (step: StepStatus) => Promise<void> | void | typeof SkipStep | typeof DoStep): [() => void, StepStatus];
|
|
8
8
|
export default useStepQueue;
|
|
@@ -75,10 +75,6 @@ declare namespace Progress {
|
|
|
75
75
|
* Removes the element. Opposite of render().
|
|
76
76
|
*/
|
|
77
77
|
remove(): void;
|
|
78
|
-
/**
|
|
79
|
-
* Determine which positioning CSS rule to use.
|
|
80
|
-
*/
|
|
81
|
-
getPositioningCSS(): "translate3d" | "translate" | "margin";
|
|
82
78
|
};
|
|
83
79
|
/**
|
|
84
80
|
* Sets the progress bar status, where `n` is a number from `0.0` to `1.0`.
|
|
@@ -143,10 +139,6 @@ declare namespace Progress {
|
|
|
143
139
|
* Removes the element. Opposite of render().
|
|
144
140
|
*/
|
|
145
141
|
remove(): void;
|
|
146
|
-
/**
|
|
147
|
-
* Determine which positioning CSS rule to use.
|
|
148
|
-
*/
|
|
149
|
-
getPositioningCSS(): "translate3d" | "translate" | "margin";
|
|
150
142
|
};
|
|
151
143
|
function isStarted(): boolean;
|
|
152
144
|
/**
|
|
@@ -212,10 +204,6 @@ declare namespace Progress {
|
|
|
212
204
|
* Removes the element. Opposite of render().
|
|
213
205
|
*/
|
|
214
206
|
remove(): void;
|
|
215
|
-
/**
|
|
216
|
-
* Determine which positioning CSS rule to use.
|
|
217
|
-
*/
|
|
218
|
-
getPositioningCSS(): "translate3d" | "translate" | "margin";
|
|
219
207
|
};
|
|
220
208
|
/**
|
|
221
209
|
* Hides the progress bar.
|
|
@@ -280,10 +268,6 @@ declare namespace Progress {
|
|
|
280
268
|
* Removes the element. Opposite of render().
|
|
281
269
|
*/
|
|
282
270
|
remove(): void;
|
|
283
|
-
/**
|
|
284
|
-
* Determine which positioning CSS rule to use.
|
|
285
|
-
*/
|
|
286
|
-
getPositioningCSS(): "translate3d" | "translate" | "margin";
|
|
287
271
|
};
|
|
288
272
|
/**
|
|
289
273
|
* Increments by a random amount.
|
|
@@ -348,10 +332,6 @@ declare namespace Progress {
|
|
|
348
332
|
* Removes the element. Opposite of render().
|
|
349
333
|
*/
|
|
350
334
|
remove(): void;
|
|
351
|
-
/**
|
|
352
|
-
* Determine which positioning CSS rule to use.
|
|
353
|
-
*/
|
|
354
|
-
getPositioningCSS(): "translate3d" | "translate" | "margin";
|
|
355
335
|
} | undefined;
|
|
356
336
|
function trickle(): {
|
|
357
337
|
status: null;
|
|
@@ -416,10 +396,6 @@ declare namespace Progress {
|
|
|
416
396
|
* Removes the element. Opposite of render().
|
|
417
397
|
*/
|
|
418
398
|
remove(): void;
|
|
419
|
-
/**
|
|
420
|
-
* Determine which positioning CSS rule to use.
|
|
421
|
-
*/
|
|
422
|
-
getPositioningCSS(): "translate3d" | "translate" | "margin";
|
|
423
399
|
} | undefined;
|
|
424
400
|
/**
|
|
425
401
|
* (Internal) renders the progress bar markup based on the `template`
|
|
@@ -430,8 +406,4 @@ declare namespace Progress {
|
|
|
430
406
|
* Removes the element. Opposite of render().
|
|
431
407
|
*/
|
|
432
408
|
function remove(): void;
|
|
433
|
-
/**
|
|
434
|
-
* Determine which positioning CSS rule to use.
|
|
435
|
-
*/
|
|
436
|
-
function getPositioningCSS(): "translate3d" | "translate" | "margin";
|
|
437
409
|
}
|
package/types/space/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const
|
|
3
|
-
|
|
4
|
-
Vertical: import("react").ForwardRefExoticComponent<SpaceVerticalProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
1
|
+
import { type SpaceVerticalProps } from './interface';
|
|
2
|
+
declare const Space: typeof Space & {
|
|
3
|
+
Vertical: typeof SpaceVertical;
|
|
5
4
|
};
|
|
5
|
+
declare const SpaceVertical: import("react").ForwardRefExoticComponent<SpaceVerticalProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
6
|
export { SpaceVertical };
|
|
7
7
|
export default Space;
|
|
@@ -1,41 +1,44 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
import { GapType } from '../flex/interface';
|
|
3
3
|
export type AlignItems = 'start' | 'end' | 'center' | 'baseline';
|
|
4
|
-
export type JustifyContent = 'start' | 'end' | 'center' | '
|
|
4
|
+
export type JustifyContent = 'start' | 'end' | 'center' | 'space-between';
|
|
5
5
|
export type Direction = 'vertical' | 'horizontal';
|
|
6
6
|
export interface SpaceProps {
|
|
7
7
|
style?: CSSProperties;
|
|
8
8
|
className?: string | string[];
|
|
9
9
|
/**
|
|
10
10
|
* @zh 交叉轴方向对齐方式
|
|
11
|
+
* @deprecated 请用 alignItems 属性替代
|
|
11
12
|
*/
|
|
12
|
-
align?: AlignItems;
|
|
13
|
+
align?: AlignItems | React.CSSProperties['alignItems'];
|
|
13
14
|
/**
|
|
14
15
|
* @zh 属性 align 的别名
|
|
15
16
|
*/
|
|
16
|
-
alignItems?: AlignItems;
|
|
17
|
+
alignItems?: AlignItems | React.CSSProperties['alignItems'];
|
|
17
18
|
/**
|
|
18
19
|
* @zh 主轴方向上对齐方式
|
|
19
20
|
*/
|
|
20
|
-
justifyContent?: JustifyContent;
|
|
21
|
+
justifyContent?: JustifyContent | React.CSSProperties['justifyContent'];
|
|
21
22
|
/**
|
|
22
23
|
* @zh 方向
|
|
23
24
|
* @defaultValue horizontal
|
|
24
25
|
*/
|
|
25
|
-
direction?: Direction;
|
|
26
|
+
direction?: Direction | React.CSSProperties['flexDirection'];
|
|
26
27
|
/**
|
|
27
28
|
* @zh 尺寸
|
|
28
29
|
* @defaultValue small
|
|
30
|
+
* @deprecated 请用 gap 属性替代
|
|
29
31
|
*/
|
|
30
|
-
size?:
|
|
32
|
+
size?: GapType | GapType[];
|
|
31
33
|
/**
|
|
32
|
-
* @zh
|
|
34
|
+
* @zh 间距
|
|
35
|
+
* @defaultValue small
|
|
33
36
|
*/
|
|
34
|
-
gap?:
|
|
37
|
+
gap?: GapType | GapType[];
|
|
35
38
|
/**
|
|
36
39
|
* @zh 是否自动折行
|
|
37
40
|
*/
|
|
38
|
-
wrap?: boolean;
|
|
41
|
+
wrap?: boolean | React.CSSProperties['flexWrap'];
|
|
39
42
|
/**
|
|
40
43
|
* @zh 设置分隔符
|
|
41
44
|
*/
|
|
@@ -48,6 +51,10 @@ export interface SpaceProps {
|
|
|
48
51
|
* @zh 是否启用RTL模式
|
|
49
52
|
*/
|
|
50
53
|
rtl?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* @zh 兼容历史功能
|
|
56
|
+
*/
|
|
57
|
+
legacy?: boolean;
|
|
51
58
|
}
|
|
52
59
|
export interface SpaceVerticalProps extends Omit<SpaceProps, 'direction'> {
|
|
53
60
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export { default
|
|
1
|
+
import { forceReflow as TransitionGroupForceReflow } from '../utils/dom';
|
|
2
|
+
import { getChildMapping as TransitionGroupGetChildMapping, getInitialChildMapping as TransitionGroupGetInitialChildMapping, getNextChildMapping as TransitionGroupGetNextChildMapping, mergeChildMappings as TransitionGroupMergeChildMappings } from './ChildMapping';
|
|
3
|
+
import { default as CSSTransition } from './CSSTransition';
|
|
4
|
+
import { default as PqbCSSTransition } from './PqbCSSTransition';
|
|
5
|
+
import { default as ReplaceTransition } from './ReplaceTransition';
|
|
6
|
+
import { default as SwitchTransition, modes as SwitchTransitionModes } from './SwitchTransition';
|
|
7
|
+
import { default as Transition, ENTERED as TRANSITION_ENTERED, ENTERING as TRANSITION_ENTERING, EXITED as TRANSITION_EXITED, EXITING as TRANSITION_EXITING, UNMOUNTED as TRANSITION_UNMOUNTED } from './Transition';
|
|
8
|
+
import { default as TransitionGroup } from './TransitionGroup';
|
|
9
|
+
import { default as TransitionGroupContext } from './TransitionGroupContext';
|
|
10
|
+
export { CSSTransition, TransitionGroup as default, PqbCSSTransition, ReplaceTransition, SwitchTransition, SwitchTransitionModes, Transition, TRANSITION_ENTERED, TRANSITION_ENTERING, TRANSITION_EXITED, TRANSITION_EXITING, TRANSITION_UNMOUNTED, TransitionGroup, TransitionGroupContext, TransitionGroupForceReflow, TransitionGroupGetChildMapping, TransitionGroupGetInitialChildMapping, TransitionGroupGetNextChildMapping, TransitionGroupMergeChildMappings, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { callOrReturn, callOrReturn as default, } from '@unicom-cloud/utils/function';
|
package/types/utils/date.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { convertTime, convertToDurationBasedOnTimeUnits, dateFormat, dayjsFormat, } from '@unicom-cloud/utils/date';
|
package/types/utils/dom.d.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import canUseDOM from '@unicom-cloud/utils/dom-helpers/canUseDOM';
|
|
2
|
+
import getElementCoordinates from '@unicom-cloud/utils/dom-helpers/getElementCoordinates';
|
|
2
3
|
import forceReflow from '@unicom-cloud/utils/dom-helpers/reflow';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare function contains(node: Node, other: Node): boolean;
|
|
7
|
-
export declare function isScrollElement(element: HTMLElement): boolean;
|
|
4
|
+
declare function on(eventTarget: EventTarget, type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
|
|
5
|
+
declare function off(eventTarget: EventTarget, type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
|
|
6
|
+
declare function contains(node: Node, other: Node): boolean;
|
|
8
7
|
/**
|
|
9
8
|
* 从当前节点向上查找所有的滚动元素
|
|
10
9
|
* @param container 当前节点
|
|
11
10
|
* @param top 查找到 top 节点就终止,不再继续查找
|
|
12
11
|
* @returns
|
|
13
12
|
*/
|
|
14
|
-
|
|
13
|
+
declare function getScrollElements(container: HTMLElement, top?: HTMLElement): HTMLElement[];
|
|
15
14
|
/**
|
|
16
15
|
* 判断父节点是否包含子节点
|
|
17
16
|
* @desc {en} confirm parentNode contains children nodes
|
|
@@ -23,6 +22,6 @@ export declare function getScrollElements(container: HTMLElement, top?: HTMLElem
|
|
|
23
22
|
* @returns {boolean} {en} Whether the parent contains the child
|
|
24
23
|
* @example
|
|
25
24
|
*/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export { canUseDOM, forceReflow,
|
|
25
|
+
declare function parentContainsChildren(parentElement: HTMLElement | null, childrenElement: HTMLElement | null): boolean;
|
|
26
|
+
declare function getBodyContainer(): HTMLElement;
|
|
27
|
+
export { canUseDOM, contains, forceReflow, getBodyContainer, getElementCoordinates, getScrollElements, off, on, parentContainsChildren, forceReflow as reflow, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, fileRead } from '@unicom-cloud/utils/file/fileRead';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, fileToDataURL } from '@unicom-cloud/utils/file/fileToDataURL';
|
package/types/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './callbackOriginRef';
|
|
2
|
+
export * from './callOrReturn';
|
|
2
3
|
export * from './caseName';
|
|
3
4
|
export * from './className';
|
|
4
5
|
export * from './constant';
|
|
@@ -7,7 +8,8 @@ export * from './date';
|
|
|
7
8
|
export * from './dayjs';
|
|
8
9
|
export * from './dom';
|
|
9
10
|
export * from './emitter';
|
|
10
|
-
export * from './
|
|
11
|
+
export * from './fileRead';
|
|
12
|
+
export * from './fileToDataURL';
|
|
11
13
|
export * from './fillNBSP';
|
|
12
14
|
export * from './findRootElement';
|
|
13
15
|
export * from './findScrollParent';
|
package/types/utils/is.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { is32Bit, isArguments, isArray, isArrayBuffer, isArrayLike, isArrayLikeObject, isBlob, isBoolean, isBuffer, isColorValue, isDate, isElement, isEmpty, isEmptyArray, isEmptyObject, isEmptyValue, isEqual, isEqualWith, isError, isEventTarget, isExist, isFile, isFinite, isFunction, isInteger, isJSON, isLength, isMap, isMatch, isMatchWith, isNaN, isNative, isNil, isNull, isNullOrUndefined, isNumber, isObject, isObjectLike, isPlainObject, isPromise, isReadableStream, isRegExp, isSafeInteger, isSet, isString, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, isWindow } from '@unicom-cloud/utils/is';
|
|
1
|
+
import { is32Bit, isAllChinese, isArguments, isArray, isArrayBuffer, isArrayLike, isArrayLikeObject, isAscii, isAsyncFunction, isBase64, isBigInt, isBlob, isBoolean, isBuffer, isChinese, isColorValue, isDataURI, isDate, isElement, isEmail, isEmpty, isEmptyArray, isEmptyObject, isEmptyValue, isEqual, isEqualWith, isError, isEventTarget, isExist, isFile, isFinite, isFullWidth, isFunction, isHalfWidth, isHash, isHexColor, isHSL, isIdentityCard, isIMEI, isInteger, isIP, isIPRange, isJSON, isJSON_String, isJWT, isLength, isMACAddress, isMap, isMatch, isMatchWith, isMD5, isMimeType, isMobilePhone, isMobilePhoneLocales, isNaN, isNative, isNil, isNull, isNullOrUndefined, isNumber, isObject, isObjectLike, isPlainObject, isPort, isPromise, isReadableStream, isRegExp, isRgbColor, isSafeInteger, isSemVer, isSet, isSlug, isString, isStrongPassword, isSymbol, isTypedArray, isUndefined, isURL, isUUID, isVariableWidth, isWeakMap, isWeakSet, isWindow } from '@unicom-cloud/utils/is';
|
|
2
2
|
import { isDayjs } from 'dayjs';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
declare const isServerRendering: boolean;
|
|
@@ -8,4 +8,5 @@ export declare function isReactComponentAndNotFragment(element: React.ReactEleme
|
|
|
8
8
|
export declare function isReactComponent(element: any): boolean;
|
|
9
9
|
export declare function isReactClassComponent(element: any): boolean;
|
|
10
10
|
export declare function isElementByInstanceof(element: Element): boolean;
|
|
11
|
-
export
|
|
11
|
+
export declare function isScrollElement(element: HTMLElement): boolean;
|
|
12
|
+
export { is32Bit, isAllChinese, isArguments, isArray, isArrayBuffer, isArrayLike, isArrayLikeObject, isAscii, isAsyncFunction, isBase64, isBigInt, isBlob, isBoolean, isBuffer, isChinese, isColorValue, isDataURI, isDate, isDayjs, isElement, isEmail, isEmpty, isEmptyArray, isEmptyObject, isEmptyValue, isEqual, isEqualWith, isError, isEventTarget, isExist, isFile, isFinite, isFullWidth, isFunction, isHalfWidth, isHash, isHexColor, isHSL, isIdentityCard, isIMEI, isInteger, isIP, isIPRange, isJSON, isJSON_String, isJWT, isLength, isMACAddress, isMap, isMatch, isMatchWith, isMD5, isMimeType, isMobilePhone, isMobilePhoneLocales, isNaN, isNative, isNil, isNull, isNullOrUndefined, isNumber, isObject, isObjectLike, isPlainObject, isPort, isPromise, isReact18, isReact19, isReadableStream, isRegExp, isRgbColor, isSafeInteger, isSemVer, isServerRendering, isSet, isSlug, isString, isStrongPassword, isSymbol, isTypedArray, isUndefined, isURL, isUUID, isVariableWidth, isWeakMap, isWeakSet, isWindow, };
|
package/types/utils/ref.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React, { RefObject } from 'react';
|
|
2
|
-
export declare const fillRef: <T>(ref: RefObject<T>, node: T) => void;
|
|
3
|
-
/**
|
|
4
|
-
* Merge refs into one ref function to support ref passing.
|
|
5
|
-
*/
|
|
6
|
-
export declare const composeRef: <T>(...refs: React.Ref<T>[]) => React.Ref<T>;
|
|
7
|
-
export declare const useComposeRef: <T>(...refs: React.Ref<T>[]) => React.Ref<T>;
|
|
8
|
-
export declare function supportRef(nodeOrComponent: React.ReactElement): boolean;
|
|
9
2
|
interface RefAttributes<T> extends React.Attributes {
|
|
10
3
|
ref: React.Ref<T>;
|
|
11
4
|
}
|
|
12
|
-
|
|
5
|
+
declare const fillRef: <T>(ref: RefObject<T>, node: T) => void;
|
|
6
|
+
/**
|
|
7
|
+
* Merge refs into one ref function to support ref passing.
|
|
8
|
+
*/
|
|
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: React.ReactElement): boolean;
|
|
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.
|
|
15
15
|
* It will throw runtime error if the element is not a valid React element.
|
|
@@ -17,11 +17,11 @@ export declare const supportNodeRef: <T = unknown>(node: React.ReactNode) => nod
|
|
|
17
17
|
* @param element React.ReactElement
|
|
18
18
|
* @returns React.Ref<any> | null
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
declare function getReactElementRef(element: React.ReactElement): 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`.
|
|
24
24
|
* To check if `props.ref` exist or fallback to `ref`.
|
|
25
25
|
*/
|
|
26
|
-
|
|
27
|
-
export {};
|
|
26
|
+
declare const getNodeRef: typeof getReactElementRef;
|
|
27
|
+
export { composeRef, fillRef, getNodeRef, getReactElementRef, supportNodeRef, supportRef, useComposeRef, };
|
|
@@ -9,4 +9,4 @@ declare function scrollIntoViewNative(target: Element, options?: boolean | Scrol
|
|
|
9
9
|
declare function scrollIntoViewIfNeeded(node: HTMLElement, options?: Options): void;
|
|
10
10
|
export { alignNearest, canOverflow, compute, getFrameElement, getOptions, getParentElement, getScrollMargins, isCustomScrollBehavior, isHiddenByFrame, isInDocument, isScrollable, isStandardScrollBehavior, scrollIntoView, scrollIntoViewIfNeeded, scrollIntoViewNative, };
|
|
11
11
|
export default scrollIntoViewIfNeeded;
|
|
12
|
-
export type
|
|
12
|
+
export type { BaseOptions, CustomBehaviorOptions, CustomScrollAction, CustomScrollBehaviorCallback, CustomScrollBoundary, CustomScrollBoundaryCallback, Options, ScrollAction, ScrollBehavior, ScrollLogicalPosition, ScrollMode, SkipOverflowHiddenElements, SmoothBehaviorOptions, SmoothScrollExtensions, StandardBehaviorOptions, } from './compute';
|
package/types/utils/tree.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default, findNodeBy, getChildWithParentBy, getItemBy,
|
|
1
|
+
export { default, findNodeBy, getChildWithParentBy, getItemBy, getItemByID, getLabelFromDictionaryByValue, searchTree, default as tree, } from '@unicom-cloud/utils/tree';
|
package/types/utils/uuid.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { v4 as uuid, v4 as uuidv4 } from 'uuid';
|
|
1
|
+
export { v4 as default, v4 as uuid, v4 as uuidv4 } from 'uuid';
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { PqbValidator, Validator, ValidatorArray, ValidatorBase, ValidatorBoolean, ValidatorCustom, validatorLocale, ValidatorNumber, ValidatorObject, ValidatorSchema, ValidatorString, ValidatorType, } from '@unicom-cloud/utils/validate';
|
|
2
|
+
export type { CustomValidatorType, GlobalConfig, InnerValidateOptions, RuleType, SchemaRuleType, SchemaType, ValidateMessagesTemplateType, ValidateMessagesType, ValidateOptions, ValidatorError, } from '@unicom-cloud/utils/types/validate';
|
package/utils/caseName.js
CHANGED