@unicom-cloud/ui-common 0.1.58 → 0.1.60
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/animation/Animation.js +41 -42
- package/animation/constants.d.ts +2 -0
- package/animation/constants.js +4 -4
- package/animation/context.d.ts +0 -1
- package/animation/context.js +3 -3
- package/animation/index.d.ts +0 -6
- package/animation/index.js +6 -10
- package/animation/interface.d.ts +1 -1
- package/animation/style/index.js +1 -1
- package/animation/utils.js +1 -1
- package/base/Base.js +1 -1
- package/base/constants.d.ts +2 -0
- package/base/constants.js +4 -1
- package/base/context.d.ts +0 -1
- package/base/context.js +3 -3
- package/base/index.js +1 -1
- package/base/style/index.js +1 -1
- package/base/utils.js +1 -1
- package/border-beam/BorderBeam.js +14 -14
- package/border-beam/Effect.d.ts +1 -6
- package/border-beam/Effect.js +3 -3
- package/border-beam/constants.d.ts +2 -1
- package/border-beam/constants.js +8 -3
- package/border-beam/context.d.ts +0 -1
- package/border-beam/context.js +4 -10
- package/border-beam/hooks/useBorderSize.d.ts +1 -5
- package/border-beam/hooks/useBorderSize.js +1 -1
- package/border-beam/hooks/useChildDom.d.ts +1 -1
- package/border-beam/hooks/useChildDom.js +1 -1
- package/border-beam/index.d.ts +0 -6
- package/border-beam/index.js +5 -9
- package/border-beam/interface.d.ts +27 -4
- package/border-beam/style/index.js +1 -1
- package/border-beam/utils.d.ts +1 -9
- package/border-beam/utils.js +9 -9
- package/development/Development.js +6 -5
- package/development/constants.d.ts +2 -0
- package/development/constants.js +4 -1
- package/development/context.d.ts +0 -1
- package/development/context.js +3 -3
- package/development/index.d.ts +0 -6
- package/development/index.js +5 -9
- package/development/style/index.js +1 -1
- package/development/utils.js +1 -1
- package/empty/Empty.d.ts +1 -1
- package/empty/Empty.js +28 -27
- package/empty/constants.d.ts +2 -0
- package/empty/constants.js +4 -1
- package/empty/context.d.ts +0 -1
- package/empty/context.js +3 -3
- package/empty/index.d.ts +1 -7
- package/empty/index.js +5 -9
- package/empty/style/index.js +1 -1
- package/empty/utils.js +1 -1
- package/flex/Flex.js +5 -4
- package/flex/FlexVertical.js +1 -1
- package/flex/constants.d.ts +2 -0
- package/flex/constants.js +7 -1
- package/flex/context.d.ts +0 -1
- package/flex/context.js +3 -6
- package/flex/index.d.ts +1 -7
- package/flex/index.js +9 -11
- package/flex/interface.d.ts +1 -1
- package/flex/style/index.js +1 -1
- package/flex/utils.d.ts +1 -1
- package/flex/utils.js +10 -12
- package/grid/Grid.js +16 -15
- package/grid/Item.js +10 -9
- package/grid/constants.d.ts +3 -0
- package/grid/constants.js +8 -1
- package/grid/context.d.ts +0 -2
- package/grid/context.js +4 -8
- package/grid/index.d.ts +0 -6
- package/grid/index.js +9 -11
- package/grid/style/index.js +1 -1
- package/grid/utils.js +1 -1
- package/higher-order/with-speech-synthesis/constants.d.ts +2 -0
- package/higher-order/with-speech-synthesis/constants.js +7 -0
- package/higher-order/with-speech-synthesis/context.d.ts +0 -1
- package/higher-order/with-speech-synthesis/context.js +3 -3
- package/higher-order/with-speech-synthesis/index.d.ts +0 -6
- package/higher-order/with-speech-synthesis/index.js +5 -9
- package/higher-order/with-speech-synthesis/style/index.js +1 -1
- package/higher-order/with-speech-synthesis/withSpeechSynthesis.d.ts +8 -1
- package/higher-order/with-speech-synthesis/withSpeechSynthesis.js +28 -27
- package/hoc/withContext.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 +9 -9
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +93 -92
- package/hooks/use-async-effect/index.js +1 -1
- package/hooks/use-boolean/index.js +1 -1
- package/hooks/use-click-away/index.d.ts +7 -1
- package/hooks/use-click-away/index.js +20 -12
- 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 +2 -2
- package/hooks/use-count-down/index.js +1 -1
- package/hooks/use-counter/index.js +1 -1
- package/hooks/use-create/index.js +6 -5
- package/hooks/use-creation/index.js +7 -6
- package/hooks/use-debounce/debounceOptions.d.ts +1 -6
- package/hooks/use-debounce/index.js +1 -1
- package/hooks/use-debounce/interface.d.ts +14 -0
- package/hooks/use-debounce-effect/index.js +1 -1
- package/hooks/use-debounce-fn/index.js +5 -5
- 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 +7 -7
- package/hooks/use-drag/index.d.ts +1 -1
- package/hooks/use-drag/index.js +10 -10
- package/hooks/use-drag-move/index.js +1 -1
- package/hooks/use-drop/index.d.ts +1 -1
- package/hooks/use-drop/index.js +1 -1
- package/hooks/use-dynamic-list/index.d.ts +18 -0
- package/hooks/use-dynamic-list/index.js +105 -0
- package/hooks/use-effect-event/index.js +1 -1
- package/hooks/use-event/index.js +1 -1
- package/hooks/use-event-emitter/index.d.ts +13 -1
- package/hooks/use-event-emitter/index.js +15 -12
- package/hooks/use-event-listener/index.d.ts +2 -7
- package/hooks/use-event-listener/index.js +1 -1
- package/hooks/use-event-target/index.js +1 -1
- package/hooks/use-external/index.js +2 -2
- package/hooks/use-favicon/index.js +2 -2
- package/hooks/use-focus-within/index.d.ts +1 -5
- package/hooks/use-focus-within/index.js +1 -1
- package/hooks/use-focus-within/interface.d.ts +13 -0
- package/hooks/use-force-update/index.js +1 -1
- package/hooks/use-fullscreen/index.js +14 -14
- package/hooks/use-get-state/index.d.ts +1 -7
- package/hooks/use-get-state/index.js +1 -1
- package/hooks/use-history-travel/index.d.ts +1 -1
- package/hooks/use-history-travel/index.js +32 -26
- package/hooks/use-hover/index.js +1 -1
- package/hooks/use-id/index.js +1 -1
- package/hooks/use-in-viewport/index.js +10 -10
- package/hooks/use-infinite-scroll/index.js +33 -31
- package/hooks/use-intersection-observer/index.js +3 -3
- package/hooks/use-intersection-observers/index.js +10 -10
- 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.d.ts +1 -0
- 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 +4 -4
- 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-component-props/index.d.ts +2 -2
- package/hooks/use-merge-component-props/index.js +2 -1
- package/hooks/use-merge-value/index.d.ts +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.d.ts +1 -1
- package/hooks/use-mouse/index.js +9 -9
- package/hooks/use-mutation-observer/index.js +2 -2
- package/hooks/use-mutation-observers/index.js +10 -10
- 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.d.ts +3 -5
- package/hooks/use-override-ref/index.js +5 -5
- package/hooks/use-pagination/index.js +1 -1
- package/hooks/use-pagination/types.d.ts +5 -8
- package/hooks/use-paste-file/index.js +9 -9
- 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 +17 -17
- package/hooks/use-raf-state/index.d.ts +1 -6
- package/hooks/use-raf-state/index.js +1 -1
- package/hooks/use-raf-timeout/index.js +17 -17
- package/hooks/use-reactive/index.js +5 -5
- package/hooks/use-ref-latest/index.js +1 -1
- package/hooks/use-ref-map/index.d.ts +2 -1
- package/hooks/use-ref-map/index.js +1 -1
- package/hooks/use-refs/index.js +1 -1
- package/hooks/use-request/index.js +5 -5
- package/hooks/use-request/src/Fetch.d.ts +2 -0
- package/hooks/use-request/src/Fetch.js +32 -28
- package/hooks/use-request/src/plugins/useAutoRunPlugin.js +1 -1
- package/hooks/use-request/src/plugins/useCachePlugin.js +5 -5
- package/hooks/use-request/src/plugins/useDebouncePlugin.js +2 -2
- package/hooks/use-request/src/plugins/useLoadingDelayPlugin.js +13 -12
- package/hooks/use-request/src/plugins/usePollingPlugin.js +3 -3
- 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/types.d.ts +2 -1
- package/hooks/use-request/src/useRequest.d.ts +11 -4
- package/hooks/use-request/src/useRequest.js +1 -1
- package/hooks/use-request/src/useRequestImplement.js +18 -18
- 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 +3 -3
- 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 +6 -6
- package/hooks/use-resize-observer/index.d.ts +6 -1
- package/hooks/use-resize-observer/index.js +30 -4
- package/hooks/use-resize-observers/index.d.ts +1 -0
- package/hooks/use-resize-observers/index.js +23 -24
- package/hooks/use-responsive/index.js +2 -2
- package/hooks/use-safe-state/index.js +1 -1
- package/hooks/use-scroll/index.js +20 -20
- package/hooks/use-selections/index.d.ts +1 -1
- package/hooks/use-selections/index.js +45 -39
- package/hooks/use-session-storage-state/index.js +4 -4
- package/hooks/use-set/index.js +1 -1
- package/hooks/use-set-state/index.js +1 -1
- package/hooks/use-size/index.d.ts +1 -6
- package/hooks/use-size/index.js +4 -33
- package/hooks/use-state-callback/index.d.ts +1 -5
- package/hooks/use-state-callback/index.js +7 -7
- package/hooks/use-state-with-promise/index.d.ts +1 -4
- package/hooks/use-state-with-promise/index.js +1 -1
- package/hooks/use-sync-state/index.js +5 -5
- package/hooks/use-text-selection/index.js +1 -1
- package/hooks/use-theme/index.js +14 -14
- package/hooks/use-throttle/index.js +1 -1
- package/hooks/use-throttle/interface.d.ts +13 -0
- package/hooks/use-throttle/throttleOptions.d.ts +1 -5
- package/hooks/use-throttle-effect/index.js +5 -5
- package/hooks/use-throttle-fn/index.js +5 -5
- package/hooks/use-throttle-fn-with-raf/index.js +6 -6
- package/hooks/use-timeout/index.js +1 -1
- package/hooks/use-title/index.js +5 -5
- package/hooks/use-toggle/index.d.ts +6 -3
- 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 +1 -1
- package/hooks/use-url-state/index.js +1 -1
- package/hooks/use-virtual-list/index.js +13 -13
- package/hooks/use-watch/index.js +1 -1
- package/hooks/use-web-socket/index.js +7 -7
- package/hooks/use-why-did-you-update/index.js +1 -1
- package/hooks/use-window-size/index.js +7 -7
- package/hooks/utils/createEffectWithTarget.js +7 -7
- 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 +4 -4
- package/hooks/utils/useEffectWithTarget.js +1 -1
- package/hooks/utils/useIsomorphicLayoutEffectWithTarget.js +1 -1
- package/hooks/utils/useLayoutEffectWithTarget.js +1 -1
- package/icons/file/File.js +5 -4
- package/icons/file/constants.d.ts +2 -0
- package/icons/file/constants.js +7 -0
- package/icons/file/context.d.ts +0 -1
- package/icons/file/context.js +3 -3
- package/icons/file/index.js +2 -2
- package/icons/file/style/index.js +1 -1
- package/index.d.ts +2 -2
- package/index.js +542 -537
- package/morphicons/core/interpolate.js +1 -1
- package/morphicons/core/normalize.js +57 -57
- package/morphicons/core/parse.d.ts +1 -9
- package/morphicons/core/resample.js +1 -1
- package/morphicons/core/serialize.js +1 -1
- package/morphicons/core/spring.js +1 -1
- package/morphicons/dom/controller.d.ts +3 -3
- package/morphicons/dom/index.js +23 -23
- package/morphicons/element/index.d.ts +1 -1
- package/morphicons/index.d.ts +1 -1
- package/morphicons/index.js +6 -6
- package/morphicons/react/index.d.ts +1 -1
- package/morphicons/react/index.js +65 -65
- package/package.json +1 -1
- package/progress/Progress.js +20 -20
- package/progress/constants.js +1 -1
- package/progress/context.js +1 -1
- package/progress/index.js +1 -1
- package/progress/style/index.js +1 -1
- package/progress/utils.js +1 -1
- package/resize-observer/Collection.js +1 -1
- package/resize-observer/ResizeObserver.js +13 -12
- package/resize-observer/SingleObserver.d.ts +1 -5
- package/resize-observer/SingleObserver.js +4 -4
- package/resize-observer/constants.d.ts +2 -0
- package/resize-observer/constants.js +4 -1
- package/resize-observer/context.d.ts +0 -1
- package/resize-observer/context.js +3 -3
- package/resize-observer/index.d.ts +1 -7
- package/resize-observer/index.js +7 -9
- package/resize-observer/interface.d.ts +18 -0
- package/resize-observer/observerUtil.d.ts +1 -1
- package/resize-observer/observerUtil.js +1 -1
- package/resize-observer/style/index.js +1 -1
- package/resize-observer/utils.js +1 -1
- package/space/Space.d.ts +2 -1
- package/space/Space.js +12 -11
- package/space/SpaceVertical.js +1 -1
- package/space/constants.d.ts +2 -0
- package/space/constants.js +9 -1
- package/space/context.d.ts +0 -1
- package/space/context.js +3 -8
- package/space/index.d.ts +0 -6
- package/space/index.js +8 -10
- package/space/interface.d.ts +1 -0
- package/space/style/index.js +1 -1
- package/space/utils.js +1 -1
- package/style/animation.less +2 -8
- package/style/normalize.less +0 -13
- package/style.css +1 -1
- package/suspense-fallback-test/NeverLoadLazy.d.ts +3 -0
- package/suspense-fallback-test/NeverLoadLazy.js +8 -0
- package/suspense-fallback-test/SuspenseFallbackTest.js +14 -14
- package/suspense-fallback-test/constants.d.ts +2 -0
- package/suspense-fallback-test/constants.js +4 -1
- package/suspense-fallback-test/context.d.ts +0 -2
- package/suspense-fallback-test/context.js +3 -3
- package/suspense-fallback-test/index.d.ts +0 -6
- package/suspense-fallback-test/index.js +5 -9
- package/suspense-fallback-test/style/index.js +1 -1
- package/suspense-fallback-test/utils.js +1 -1
- package/test.js +1 -1
- package/timer/Timer.js +6 -5
- package/timer/constants.d.ts +2 -0
- package/timer/constants.js +4 -1
- package/timer/context.d.ts +0 -1
- package/timer/context.js +3 -3
- package/timer/index.d.ts +0 -6
- package/timer/index.js +5 -9
- package/timer/style/index.js +1 -1
- package/timer/utils.js +1 -1
- package/transition/Transition.d.ts +0 -1
- package/transition/Transition.js +55 -58
- package/transition/TransitionCSS.js +15 -15
- package/transition/TransitionGroup.js +13 -13
- package/transition/TransitionStyle.js +12 -12
- package/transition/constants.d.ts +4 -27
- package/transition/constants.js +37 -41
- package/transition/context.d.ts +2 -3
- package/transition/context.js +4 -5
- package/transition/index.d.ts +0 -7
- package/transition/index.js +15 -16
- package/transition/interface.d.ts +26 -1
- package/transition/interface.js +11 -0
- package/transition/style/index.js +1 -1
- package/transition/utils.d.ts +1 -1
- package/transition/utils.js +1 -1
- package/utils/callbackOriginRef.js +1 -1
- package/utils/confetti.js +1 -1
- package/utils/constants.d.ts +3 -2
- package/utils/constants.js +6 -5
- package/utils/copy.js +1 -1
- package/utils/createRoot.d.ts +1 -6
- package/utils/createRoot.js +11 -11
- package/utils/css.js +1 -1
- package/utils/date.d.ts +1 -1
- package/utils/date.js +1 -1
- package/utils/dayjs.js +1 -1
- package/utils/document.js +1 -1
- package/utils/dom.d.ts +1 -1
- package/utils/dom.js +9 -9
- package/utils/file.js +1 -1
- package/utils/fillNBSP.js +1 -1
- package/utils/getCompatProp.js +1 -1
- package/utils/getElement.js +1 -1
- package/utils/getHighlightText.js +1 -1
- package/utils/getHotkeyHandler.d.ts +1 -12
- package/utils/getHotkeyHandler.js +17 -17
- package/utils/getPrefixCls.js +1 -1
- package/utils/getScrollBarHeight.js +1 -1
- package/utils/getScrollBarSize.js +1 -1
- package/utils/getScrollBarWidth.js +1 -1
- package/utils/getScrollParent.js +1 -1
- package/utils/getStringLength.js +1 -1
- package/utils/getUrlSearchParam.js +1 -1
- package/utils/index.js +274 -273
- package/utils/initAllLineClamp.js +1 -1
- package/utils/injectLineClamp.js +1 -1
- package/utils/interface.d.ts +103 -0
- package/utils/interface.js +4 -0
- package/utils/intersectionObserver.js +1 -1
- package/utils/is.js +1 -1
- package/utils/keyboardCode.js +1 -1
- package/utils/lodash.d.ts +2 -1
- package/utils/lodash.js +19 -18
- package/utils/math.d.ts +1 -1
- package/utils/mergeProps.d.ts +1 -2
- package/utils/mergeProps.js +1 -1
- package/utils/mergedToString.js +1 -1
- package/utils/migrateLegacyProps.d.ts +1 -8
- package/utils/migrateLegacyProps.js +1 -1
- package/utils/mutationObserver.js +1 -1
- package/utils/names.d.ts +1 -8
- package/utils/names.js +1 -1
- 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/react19Adapter.js +1 -1
- package/utils/reactNode.js +1 -1
- package/utils/ref.d.ts +2 -1
- package/utils/ref.js +13 -13
- package/utils/resizeObserver.js +1 -1
- package/utils/scrollIntoViewIfNeeded.js +1 -1
- package/utils/scrollTo.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/tinycolor.js +1 -1
- package/utils/toArray.js +1 -1
- package/utils/tunnel.d.ts +2 -12
- package/utils/tunnel.js +1 -1
- package/utils/warning.js +1 -1
- package/version/index.js +9 -9
- /package/{suspense-fallback-test → base}/style/index.css +0 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { Root } from 'react-dom/client';
|
|
3
|
+
/**
|
|
4
|
+
* getHotkeyHandler 相关类型
|
|
5
|
+
* @en getHotkeyHandler types
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* 快捷键按键描述
|
|
9
|
+
* @en Hotkey key description
|
|
10
|
+
*/
|
|
11
|
+
export interface Key {
|
|
12
|
+
/** Keyboard key code */
|
|
13
|
+
code: number | string;
|
|
14
|
+
/** Ctrl / ⌃ */
|
|
15
|
+
ctrl?: boolean;
|
|
16
|
+
/** Shift key */
|
|
17
|
+
shift?: boolean;
|
|
18
|
+
/** Alt / ⌥ */
|
|
19
|
+
alt?: boolean;
|
|
20
|
+
/** meta ⌘ / ⊞ */
|
|
21
|
+
meta?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* createRoot 相关类型
|
|
25
|
+
* @en createRoot types
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* createRoot 函数类型
|
|
29
|
+
* @en createRoot function type
|
|
30
|
+
*/
|
|
31
|
+
export type CreateRootFnType = (container: Element | DocumentFragment) => Root;
|
|
32
|
+
/**
|
|
33
|
+
* 渲染结果类型
|
|
34
|
+
* @en Render result type
|
|
35
|
+
*/
|
|
36
|
+
export type RenderResult = {
|
|
37
|
+
render: (app: React.ReactElement) => void;
|
|
38
|
+
_unmount: () => void;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* names 相关类型
|
|
42
|
+
* @en names types
|
|
43
|
+
*/
|
|
44
|
+
/**
|
|
45
|
+
* 组件元信息类型
|
|
46
|
+
* @en Component info type
|
|
47
|
+
*/
|
|
48
|
+
export type COMPONENT_INFO_TYPE = {
|
|
49
|
+
zh: string;
|
|
50
|
+
en: string;
|
|
51
|
+
displayName: string;
|
|
52
|
+
id: string;
|
|
53
|
+
legacy?: string;
|
|
54
|
+
descriptions?: string;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* tunnel 相关类型
|
|
58
|
+
* @en tunnel types
|
|
59
|
+
*/
|
|
60
|
+
/**
|
|
61
|
+
* Tunnel 状态类型
|
|
62
|
+
* @en Tunnel state type
|
|
63
|
+
*/
|
|
64
|
+
export type TunnelState = {
|
|
65
|
+
children: Array<{
|
|
66
|
+
child: React.ReactNode;
|
|
67
|
+
id: string;
|
|
68
|
+
}>;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Tunnel.In 组件 props
|
|
72
|
+
* @en Tunnel.In props
|
|
73
|
+
*/
|
|
74
|
+
export interface InProps extends React.PropsWithChildren {
|
|
75
|
+
content?: React.ReactNode;
|
|
76
|
+
id?: string;
|
|
77
|
+
insertAtStart?: boolean;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* migrateLegacyProps 相关类型
|
|
81
|
+
* @en migrateLegacyProps types
|
|
82
|
+
*/
|
|
83
|
+
/**
|
|
84
|
+
* 遗留字段映射类型
|
|
85
|
+
* @en Legacy props mapping type
|
|
86
|
+
*/
|
|
87
|
+
export type LegacyPropsType<T> = Partial<{
|
|
88
|
+
[key in keyof T]: string | string[];
|
|
89
|
+
}>;
|
|
90
|
+
/**
|
|
91
|
+
* mergeProps 相关类型
|
|
92
|
+
* @en mergeProps types
|
|
93
|
+
*/
|
|
94
|
+
/**
|
|
95
|
+
* 单个合并参数类型
|
|
96
|
+
* @en Single merge arg type
|
|
97
|
+
*/
|
|
98
|
+
export type MergePropsArgType<T> = Partial<T> | (Partial<T> | undefined)[] | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* 合并参数类型数组
|
|
101
|
+
* @en Merge args array type
|
|
102
|
+
*/
|
|
103
|
+
export type MergePropsArgsType<T> = Array<MergePropsArgType<T> | undefined | boolean>;
|
package/utils/is.js
CHANGED
package/utils/keyboardCode.js
CHANGED
package/utils/lodash.d.ts
CHANGED
|
@@ -60,6 +60,7 @@ import shuffle from 'lodash/shuffle';
|
|
|
60
60
|
import snakeCase from 'lodash/snakeCase';
|
|
61
61
|
import sortBy from 'lodash/sortBy';
|
|
62
62
|
import startCase from 'lodash/startCase';
|
|
63
|
+
import sumBy from 'lodash/sumBy';
|
|
63
64
|
import throttle from 'lodash/throttle';
|
|
64
65
|
import toPath from 'lodash/toPath';
|
|
65
66
|
import trim from 'lodash/trim';
|
|
@@ -76,4 +77,4 @@ import upperFirst from 'lodash/upperFirst';
|
|
|
76
77
|
import without from 'lodash/without';
|
|
77
78
|
import xor from 'lodash/xor';
|
|
78
79
|
import zip from 'lodash/zip';
|
|
79
|
-
export { assign, assignIn, at, camelCase, capitalize, castArray, chain, chunk, clamp, clone, cloneDeep, cloneDeepWith, cloneWith, compact, curry, debounce, defaults, defaultsDeep, defaultTo, difference, escape, extend, findKey, first, flatten, flattenDeep, flow, get, groupBy, has, hasIn, intersection, invert, invertBy, invoke, kebabCase, last, mapKeys, mapValues, mean, memoize, merge, mergeWith, move, noop, omit, omitBy, orderBy, partition, pick, pickBy, pullAll, result, sample, sampleSize, set, setWith, shuffle, snakeCase, sortBy, startCase, swap, throttle, toPath, toSwapped, trim, truncate, union, uniq, uniqBy, uniqueId, unset, update, updateWith, upperCase, upperFirst, without, xor, zip, };
|
|
80
|
+
export { assign, assignIn, at, camelCase, capitalize, castArray, chain, chunk, clamp, clone, cloneDeep, cloneDeepWith, cloneWith, compact, curry, debounce, defaults, defaultsDeep, defaultTo, difference, escape, extend, findKey, first, flatten, flattenDeep, flow, get, groupBy, has, hasIn, intersection, invert, invertBy, invoke, kebabCase, last, mapKeys, mapValues, mean, memoize, merge, mergeWith, move, noop, omit, omitBy, orderBy, partition, pick, pickBy, pullAll, result, sample, sampleSize, set, setWith, shuffle, snakeCase, sortBy, startCase, sumBy, swap, throttle, toPath, toSwapped, trim, truncate, union, uniq, uniqBy, uniqueId, unset, update, updateWith, upperCase, upperFirst, without, xor, zip, };
|
package/utils/lodash.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-11-
|
|
1
|
+
/* 潘启宝 2026-11-20 17:53:57 星期五 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
import e from "lodash/castArray";
|
|
4
4
|
import t from "lodash/debounce";
|
|
@@ -62,22 +62,23 @@ import ae from "lodash/shuffle";
|
|
|
62
62
|
import oe from "lodash/snakeCase";
|
|
63
63
|
import se from "lodash/sortBy";
|
|
64
64
|
import ce from "lodash/startCase";
|
|
65
|
-
import le from "lodash/
|
|
66
|
-
import ue from "lodash/
|
|
67
|
-
import de from "lodash/
|
|
68
|
-
import fe from "lodash/
|
|
69
|
-
import pe from "lodash/
|
|
70
|
-
import me from "lodash/
|
|
71
|
-
import he from "lodash/
|
|
72
|
-
import ge from "lodash/
|
|
73
|
-
import _e from "lodash/
|
|
74
|
-
import ve from "lodash/
|
|
75
|
-
import ye from "lodash/
|
|
76
|
-
import be from "lodash/
|
|
77
|
-
import xe from "lodash/
|
|
78
|
-
import Se from "lodash/
|
|
79
|
-
import Ce from "lodash/
|
|
80
|
-
import we from "lodash/
|
|
81
|
-
|
|
65
|
+
import le from "lodash/sumBy";
|
|
66
|
+
import ue from "lodash/throttle";
|
|
67
|
+
import de from "lodash/toPath";
|
|
68
|
+
import fe from "lodash/trim";
|
|
69
|
+
import pe from "lodash/truncate";
|
|
70
|
+
import me from "lodash/union";
|
|
71
|
+
import he from "lodash/uniq";
|
|
72
|
+
import ge from "lodash/uniqBy";
|
|
73
|
+
import _e from "lodash/uniqueId";
|
|
74
|
+
import ve from "lodash/unset";
|
|
75
|
+
import ye from "lodash/update";
|
|
76
|
+
import be from "lodash/updateWith";
|
|
77
|
+
import xe from "lodash/upperCase";
|
|
78
|
+
import Se from "lodash/upperFirst";
|
|
79
|
+
import Ce from "lodash/without";
|
|
80
|
+
import we from "lodash/xor";
|
|
81
|
+
import Te from "lodash/zip";
|
|
82
|
+
export { a as assign, o as assignIn, s as at, c as camelCase, l as capitalize, e as castArray, u as chain, d as chunk, f as clamp, p as clone, m as cloneDeep, h as cloneDeepWith, g as cloneWith, _ as compact, v as curry, t as debounce, x as defaultTo, y as defaults, b as defaultsDeep, S as difference, C as escape, w as extend, T as findKey, E as first, D as flatten, O as flattenDeep, k as flow, A as get, j as groupBy, M as has, N as hasIn, P as intersection, F as invert, I as invertBy, L as invoke, R as kebabCase, z as last, B as mapKeys, V as mapValues, H as mean, U as memoize, W as merge, G as mergeWith, n as move, K as noop, q as omit, J as omitBy, Y as orderBy, X as partition, Z as pick, Q as pickBy, $ as pullAll, ee as result, te as sample, ne as sampleSize, re as set, ie as setWith, ae as shuffle, oe as snakeCase, se as sortBy, ce as startCase, le as sumBy, r as swap, ue as throttle, de as toPath, i as toSwapped, fe as trim, pe as truncate, me as union, he as uniq, ge as uniqBy, _e as uniqueId, ve as unset, ye as update, be as updateWith, xe as upperCase, Se as upperFirst, Ce as without, we as xor, Te as zip };
|
|
82
83
|
/* 欲穷千里目,更上一层楼 */
|
|
83
84
|
/* 独立思考,明辨是非 */
|
package/utils/math.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default, div, default as math, minus, plus, times
|
|
1
|
+
export { default, div, default as math, minus, plus, times } from '@unicom-cloud/utils/math';
|
package/utils/mergeProps.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export type MergePropsArgsType<T> = Array<MergePropsArgType<T> | undefined | boolean>;
|
|
1
|
+
import type { MergePropsArgsType } from './interface';
|
|
3
2
|
declare function mergeProps<T extends object>(...args: MergePropsArgsType<T>): T;
|
|
4
3
|
export { mergeProps };
|
|
5
4
|
export default mergeProps;
|
package/utils/mergeProps.js
CHANGED
package/utils/mergedToString.js
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* 迁移对象历史遗留字段,实现数据兼容
|
|
3
|
-
* 可用于组件属性、普通业务对象、配置对象等任意实体
|
|
4
|
-
* value:旧字段名,支持多个旧key:'oldKey' | 'oldKey2'[]
|
|
5
|
-
*/
|
|
6
|
-
export type LegacyPropsType<T> = Partial<{
|
|
7
|
-
[key in keyof T]: string | string[];
|
|
8
|
-
}>;
|
|
1
|
+
import type { LegacyPropsType } from './interface';
|
|
9
2
|
/**
|
|
10
3
|
* @param target 待处理对象(会返回新对象,不原地修改入参)
|
|
11
4
|
* @param legacyProps 新旧key字典表 {新key:旧key | [旧key1,旧key2]}
|
package/utils/names.d.ts
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
zh: string;
|
|
3
|
-
en: string;
|
|
4
|
-
displayName: string;
|
|
5
|
-
id: string;
|
|
6
|
-
legacy?: string;
|
|
7
|
-
descriptions?: string;
|
|
8
|
-
};
|
|
1
|
+
import type { COMPONENT_INFO_TYPE } from './interface';
|
|
9
2
|
export declare const COMPONENT_INFO_BORDER_BEAM: COMPONENT_INFO_TYPE;
|
|
10
3
|
export declare const COMPONENT_INFO_DEVELOPMENT: COMPONENT_INFO_TYPE;
|
|
11
4
|
export declare const COMPONENT_INFO_EMPTY: COMPONENT_INFO_TYPE;
|
package/utils/names.js
CHANGED
package/utils/object.js
CHANGED
package/utils/omit.js
CHANGED
package/utils/pad.js
CHANGED
package/utils/pick.js
CHANGED
package/utils/react19Adapter.js
CHANGED
package/utils/reactNode.js
CHANGED
package/utils/ref.d.ts
CHANGED
package/utils/ref.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* 潘启宝 2026-11-
|
|
1
|
+
/* 潘启宝 2026-11-20 17:53:57 星期五 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
|
-
import
|
|
4
|
-
import t from "
|
|
5
|
-
import {
|
|
3
|
+
import e from "../hooks/use-memo/index.js";
|
|
4
|
+
import { isReact19 as t, isReactComponentAndNotFragment as n } from "./is.js";
|
|
5
|
+
import { get as r } from "./lodash.js";
|
|
6
6
|
import { isValidElement as i } from "react";
|
|
7
7
|
import { isExist as a, isFunction as o, isObjectLike as s } from "@unicom-cloud/utils/is";
|
|
8
8
|
import { ForwardRef as c, isMemo as l } from "react-is";
|
|
@@ -16,16 +16,16 @@ var u = (e, t) => {
|
|
|
16
16
|
u(e, t);
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
|
-
}, f = (...
|
|
20
|
-
function p(
|
|
21
|
-
if (!
|
|
22
|
-
if (
|
|
23
|
-
let i = l(
|
|
24
|
-
return !(o(i) && !
|
|
19
|
+
}, f = (...t) => e(() => d(...t), t, (e, t) => e.length !== t.length || e.every((e, n) => e !== t[n]));
|
|
20
|
+
function p(e) {
|
|
21
|
+
if (!e) return !1;
|
|
22
|
+
if (n(e) && t) return !0;
|
|
23
|
+
let i = l(e) ? r(e, ["type", "type"]) : e.type;
|
|
24
|
+
return !(o(i) && !r(i, ["prototype", "render"]) && r(i, ["$$typeof"]) !== c || o(e) && !e.prototype?.render && r(e, ["$$typeof"]) !== c);
|
|
25
25
|
}
|
|
26
|
-
var m = (e) =>
|
|
27
|
-
function h(
|
|
28
|
-
return i(
|
|
26
|
+
var m = (e) => n(e) && p(e);
|
|
27
|
+
function h(e) {
|
|
28
|
+
return i(e) ? t ? r(e, ["props", "ref"]) : r(e, ["ref"]) : null;
|
|
29
29
|
}
|
|
30
30
|
var g = h;
|
|
31
31
|
export { d as composeRef, u as fillRef, g as getNodeRef, h as getReactElementRef, m as supportNodeRef, p as supportRef, f as useComposeRef };
|
package/utils/resizeObserver.js
CHANGED
package/utils/scrollTo.js
CHANGED
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/tinycolor.js
CHANGED
package/utils/toArray.js
CHANGED
package/utils/tunnel.d.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
3
|
-
children: Array<{
|
|
4
|
-
child: ReactNode;
|
|
5
|
-
id: string;
|
|
6
|
-
}>;
|
|
7
|
-
};
|
|
8
|
-
export interface InProps extends PropsWithChildren {
|
|
9
|
-
content?: ReactNode;
|
|
10
|
-
id?: string;
|
|
11
|
-
insertAtStart?: boolean;
|
|
12
|
-
}
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { InProps } from './interface';
|
|
13
3
|
declare function tunnel(params?: unknown): {
|
|
14
4
|
In: (props: InProps) => null;
|
|
15
5
|
Out: (props: unknown) => ReactNode;
|
package/utils/tunnel.js
CHANGED
package/utils/warning.js
CHANGED
package/version/index.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
/* 潘启宝 2026-11-
|
|
1
|
+
/* 潘启宝 2026-11-20 17:53:57 星期五 山东省济南市 */
|
|
2
2
|
/* 世界因你而美丽 */
|
|
3
3
|
// components/common/version/index.ts
|
|
4
4
|
var e = {
|
|
5
5
|
name: "潘启宝",
|
|
6
|
-
date: "2026-11-
|
|
6
|
+
date: "2026-11-20 17:53:40",
|
|
7
7
|
platform: "darwin",
|
|
8
8
|
arch: "arm64",
|
|
9
9
|
hostname: "Mac-mini-2.local",
|
|
10
10
|
username: "panqibao",
|
|
11
11
|
cpu: "Apple M4",
|
|
12
12
|
endianness: "LE",
|
|
13
|
-
release: "Darwin27.
|
|
14
|
-
uptime:
|
|
15
|
-
UUID: "
|
|
13
|
+
release: "Darwin27.2.0",
|
|
14
|
+
uptime: 290739,
|
|
15
|
+
UUID: "cb831b89-e9ae-4dfe-945d-0ab27048db20",
|
|
16
16
|
mac: "02:00:00:00:00:00",
|
|
17
17
|
version: {
|
|
18
18
|
node: "24.21.0",
|
|
19
19
|
npm: "11.19.0",
|
|
20
|
-
vite: "8.3.
|
|
21
|
-
rolldown: "1.2.
|
|
20
|
+
vite: "8.3.8",
|
|
21
|
+
rolldown: "1.2.18",
|
|
22
22
|
self: "0.0.0",
|
|
23
23
|
react: "19.3.1",
|
|
24
|
-
reactRouter: "8.5.
|
|
24
|
+
reactRouter: "8.5.2"
|
|
25
25
|
}
|
|
26
|
-
}, t = "2026-11-
|
|
26
|
+
}, t = "2026-11-20 17:53:40", n = "1795168420218", r = "0.1.0";
|
|
27
27
|
export { r as VERSION, r as default, t as VERSION_BUILD_DATE, e as VERSION_BUILD_INFO, n as VERSION_BUILD_TIME };
|
|
28
28
|
/* 欲穷千里目,更上一层楼 */
|
|
29
29
|
/* 独立思考,明辨是非 */
|
|
File without changes
|