@unicom-cloud/ui-common 0.1.42 → 0.1.44
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 +38 -38
- package/animation/constants.js +1 -1
- package/animation/context.js +1 -1
- package/animation/hooks/index.d.ts +0 -0
- package/animation/index.js +1 -1
- package/animation/style/index.js +1 -1
- package/animation/utils.js +1 -1
- package/base/Base.d.ts +3 -0
- package/base/Base.js +6 -0
- package/base/constants.d.ts +0 -0
- package/base/constants.js +2 -0
- package/base/context.d.ts +3 -0
- package/base/context.js +7 -0
- package/base/hooks/index.d.ts +0 -0
- package/base/index.d.ts +9 -0
- package/base/index.js +9 -0
- package/base/interface.d.ts +5 -0
- package/base/style/index.d.ts +1 -0
- package/base/style/index.js +3 -0
- package/base/utils.d.ts +0 -0
- package/base/utils.js +2 -0
- package/border-beam/BorderBeam.js +21 -21
- package/border-beam/Effect.js +1 -1
- package/border-beam/constants.js +1 -1
- package/border-beam/context.js +1 -1
- package/border-beam/hooks/useBorderSize.js +1 -1
- package/border-beam/hooks/useChildDom.js +1 -1
- package/border-beam/index.js +1 -1
- package/border-beam/style/index.js +1 -1
- package/border-beam/utils.js +1 -1
- package/development/Development.js +18 -18
- package/development/constants.js +1 -1
- package/development/context.js +1 -1
- package/development/hooks/index.d.ts +0 -0
- package/development/index.js +1 -1
- package/development/style/index.js +1 -1
- package/development/utils.js +1 -1
- package/empty/Empty.js +17 -17
- package/empty/constants.js +1 -1
- package/empty/context.js +1 -1
- package/empty/hooks/index.d.ts +0 -0
- package/empty/index.js +1 -1
- package/empty/style/index.js +1 -1
- package/empty/utils.js +1 -1
- package/flex/Flex.js +19 -19
- package/flex/constants.js +1 -1
- package/flex/context.js +1 -1
- package/flex/hooks/index.d.ts +0 -0
- package/flex/index.js +1 -1
- package/flex/style/index.js +1 -1
- package/flex/utils.d.ts +1 -1
- package/flex/utils.js +26 -26
- package/higher-order/index.js +1 -1
- package/higher-order/with-speech-synthesis/context.js +1 -1
- package/higher-order/with-speech-synthesis/hooks/index.d.ts +0 -0
- package/higher-order/with-speech-synthesis/index.js +1 -1
- package/higher-order/with-speech-synthesis/style/index.js +1 -1
- package/higher-order/with-speech-synthesis/withSpeechSynthesis.js +1 -1
- package/hoc/withContext.d.ts +10 -0
- package/hoc/withContext.js +18 -0
- 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/index.d.ts +1 -0
- package/hooks/index.js +41 -40
- 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 +16 -16
- 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-drag-move/index.d.ts +2 -0
- package/hooks/use-drag-move/index.js +67 -0
- package/hooks/use-drag-move/interface.d.ts +8 -0
- package/hooks/use-drop/index.js +1 -1
- package/hooks/use-effect-event/index.js +1 -1
- package/hooks/use-event/index.js +1 -1
- package/hooks/use-event-emitter/index.js +1 -1
- package/hooks/use-event-listener/index.js +1 -1
- package/hooks/use-event-target/index.js +1 -1
- package/hooks/use-external/index.js +27 -27
- 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-viewport/index.js +1 -1
- package/hooks/use-infinite-scroll/index.js +1 -1
- package/hooks/use-intersection-observer/index.js +1 -1
- package/hooks/use-intersection-observers/index.d.ts +1 -0
- package/hooks/use-intersection-observers/index.js +23 -22
- 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 +2 -2
- 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.d.ts +2 -2
- package/hooks/use-merge-props/index.js +2 -2
- package/hooks/use-merge-value/index.js +1 -1
- package/hooks/use-mobile/index.js +1 -1
- package/hooks/use-mount/index.js +1 -1
- package/hooks/use-mouse/index.js +1 -1
- package/hooks/use-move/index.d.ts +2 -4
- package/hooks/use-move/index.js +3 -67
- package/hooks/use-move/interface.d.ts +1 -0
- package/hooks/use-mutation-observer/index.js +1 -1
- package/hooks/use-mutation-observers/index.d.ts +1 -0
- package/hooks/use-mutation-observers/index.js +23 -22
- 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 +4 -1
- package/hooks/use-override-ref/index.js +1 -1
- package/hooks/use-pagination/index.js +1 -1
- package/hooks/use-paste-image/index.js +1 -1
- package/hooks/use-persist-callback/index.js +1 -1
- package/hooks/use-prefers-color-scheme-dark/index.js +1 -1
- package/hooks/use-previous/index.js +1 -1
- package/hooks/use-raf-interval/index.js +1 -1
- package/hooks/use-raf-state/index.js +1 -1
- package/hooks/use-raf-timeout/index.js +1 -1
- package/hooks/use-reactive/index.js +1 -1
- package/hooks/use-ref-latest/index.js +1 -1
- package/hooks/use-refs/index.js +1 -1
- package/hooks/use-request/index.js +1 -1
- package/hooks/use-request/src/Fetch.js +1 -1
- package/hooks/use-request/src/plugins/useAutoRunPlugin.js +1 -1
- package/hooks/use-request/src/plugins/useCachePlugin.js +2 -2
- 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.d.ts +1 -0
- package/hooks/use-resize-observers/index.js +23 -22
- 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 +5 -5
- 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-throttle-fn-with-raf/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 +2 -2
- package/hooks/use-why-did-you-update/index.js +1 -1
- package/hooks/use-window-size/index.js +1 -1
- package/hooks/utils/createEffectWithTarget.js +1 -1
- package/hooks/utils/depsAreSame.js +1 -1
- package/hooks/utils/depsEqual.js +1 -1
- package/hooks/utils/domTarget.js +1 -1
- package/hooks/utils/getDocumentOrShadow.js +1 -1
- package/hooks/utils/index.js +1 -1
- package/hooks/utils/isAppleDevice.js +1 -1
- package/hooks/utils/isBrowser.js +1 -1
- package/hooks/utils/isDev.js +1 -1
- package/hooks/utils/noop.d.ts +2 -2
- package/hooks/utils/rect.js +1 -1
- package/hooks/utils/useDeepCompareWithTarget.js +1 -1
- package/hooks/utils/useEffectWithTarget.js +1 -1
- package/hooks/utils/useIsomorphicLayoutEffectWithTarget.js +1 -1
- package/hooks/utils/useLayoutEffectWithTarget.js +1 -1
- package/icons/file/File.js +1 -1
- package/icons/file/context.js +1 -1
- package/icons/file/hooks/index.d.ts +0 -0
- package/icons/file/index.js +1 -1
- package/icons/file/style/index.js +1 -1
- package/index.d.ts +2 -0
- package/index.js +632 -620
- package/package.json +1 -1
- package/progress/Progress.js +31 -33
- package/progress/constants.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 +4 -4
- package/resize-observer/SingleObserver.js +11 -11
- package/resize-observer/constants.js +1 -1
- package/resize-observer/context.js +1 -1
- package/resize-observer/hooks/index.d.ts +0 -0
- package/resize-observer/index.js +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.js +51 -50
- package/space/constants.js +1 -1
- package/space/context.js +3 -2
- package/space/hooks/index.d.ts +0 -0
- package/space/index.js +1 -1
- package/space/interface.d.ts +2 -1
- package/space/style/index.js +1 -1
- package/space/utils.js +1 -1
- package/suspense-fallback-test/SuspenseFallbackTest.js +5 -4
- package/suspense-fallback-test/constants.js +1 -1
- package/suspense-fallback-test/context.js +1 -1
- package/suspense-fallback-test/hooks/index.d.ts +0 -0
- package/suspense-fallback-test/index.js +1 -1
- 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 +16 -16
- package/timer/constants.js +1 -1
- package/timer/context.js +1 -1
- package/timer/hooks/index.d.ts +0 -0
- package/timer/index.js +1 -1
- package/timer/style/index.js +1 -1
- package/timer/utils.js +1 -1
- package/transition/Transition.js +35 -36
- package/transition/TransitionCSS.js +1 -1
- package/transition/TransitionGroup.js +10 -10
- package/transition/TransitionStyle.js +1 -1
- package/transition/constants.js +1 -1
- package/transition/context.js +1 -1
- package/transition/hooks/index.d.ts +0 -0
- package/transition/index.js +1 -1
- package/transition/interface.d.ts +1 -2
- package/transition/style/index.js +1 -1
- package/transition/utils.js +1 -1
- package/typewriter/Typewriter.js +28 -28
- package/typewriter/constants.js +1 -1
- package/typewriter/context.js +1 -1
- package/typewriter/hooks/index.d.ts +0 -0
- package/typewriter/index.js +1 -1
- package/typewriter/style/index.js +1 -1
- package/typewriter/utils.js +1 -1
- package/utils/callOrReturn.js +1 -1
- package/utils/callbackOriginRef.d.ts +2 -2
- package/utils/callbackOriginRef.js +1 -1
- package/utils/caseName.js +1 -1
- package/utils/className.js +1 -1
- package/utils/constants.d.ts +1 -3
- package/utils/constants.js +3 -4
- package/utils/copy.js +1 -1
- package/utils/css.js +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 +4 -3
- package/utils/dom.js +13 -12
- package/utils/emitter.js +1 -1
- package/utils/file.js +1 -1
- package/utils/fileRead.js +1 -1
- package/utils/fileToDataURL.js +1 -1
- package/utils/fillNBSP.js +1 -1
- package/utils/getElement.d.ts +8 -0
- package/utils/getElement.js +27 -0
- package/utils/getHighlightText.js +1 -1
- package/utils/getHotkeyHandler.js +1 -1
- package/utils/getScrollBarHeight.js +1 -1
- package/utils/getScrollBarSize.js +1 -1
- package/utils/getScrollBarWidth.js +1 -1
- package/utils/getScrollParent.js +1 -1
- package/utils/getStringLength.js +1 -1
- package/utils/include.js +1 -1
- package/utils/index.d.ts +1 -1
- package/utils/index.js +333 -324
- package/utils/initAllLineClamp.js +13 -12
- package/utils/intersectionObserver.js +1 -1
- package/utils/is.d.ts +3 -0
- package/utils/is.js +82 -70
- package/utils/keyboardCode.js +1 -1
- package/utils/lodash.d.ts +7 -1
- package/utils/lodash.js +67 -61
- package/utils/math.js +1 -1
- package/utils/mergeProps.d.ts +1 -1
- package/utils/mergeProps.js +9 -9
- package/utils/mergedToString.js +1 -1
- package/utils/mutationObserver.js +1 -1
- 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/pinyin.js +1 -1
- package/utils/react19Adapter.js +1 -1
- package/utils/reactNode.js +1 -1
- package/utils/ref.js +1 -1
- package/utils/resizeObserver.js +5 -5
- package/utils/saveAs.js +1 -1
- package/utils/screenfull.js +1 -1
- package/utils/scrollIntoViewIfNeeded.js +1 -1
- package/utils/scrollTo.js +1 -1
- package/utils/setCreateRoot.js +1 -1
- package/utils/setDarkTheme.js +4 -4
- 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/tree.js +1 -1
- package/utils/tunnel.d.ts +2 -0
- package/utils/tunnel.js +43 -40
- package/utils/tween.js +1 -1
- package/utils/uuid.js +1 -1
- package/utils/validate.js +1 -1
- package/utils/warning.js +1 -1
- package/version/index.js +7 -7
- package/interface.d.ts +0 -3
- package/utils/getRootElement.d.ts +0 -25
- package/utils/getRootElement.js +0 -19
package/transition/Transition.js
CHANGED
|
@@ -1,85 +1,84 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-08-06 15:14:52 星期四 山东省济南市 */
|
|
2
2
|
import { isExist as e, isFunction as t, isNull as n, isUndefined as r } from "../utils/is.js";
|
|
3
3
|
import i from "../hooks/use-latest/index.js";
|
|
4
4
|
import a from "../hooks/use-memoized-fn/index.js";
|
|
5
5
|
import ee from "../hooks/use-create/index.js";
|
|
6
6
|
import o from "../hooks/use-update-effect/index.js";
|
|
7
|
-
import te from "../utils/
|
|
8
|
-
import { forceReflow as ne } from "../utils/dom.js";
|
|
7
|
+
import { forceReflow as te, getDOM as ne } from "../utils/dom.js";
|
|
9
8
|
import re from "../hooks/use-set-state/index.js";
|
|
10
9
|
import s from "../hooks/use-update-layout-effect/index.js";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { TRANSITION_COMPONENT_INFO as
|
|
14
|
-
import { TRANSITION_ADD_END_LISTENER_KEY as
|
|
10
|
+
import c from "../hooks/use-is-first-render/index.js";
|
|
11
|
+
import ie from "../hooks/use-merge-props/index.js";
|
|
12
|
+
import { TRANSITION_COMPONENT_INFO as l } from "../utils/names.js";
|
|
13
|
+
import { TRANSITION_ADD_END_LISTENER_KEY as u, TRANSITION_ALWAYS_MOUNTED_KEY as d, TRANSITION_DURATION_KEY as ae, TRANSITION_EVENT_MAP as f, TRANSITION_EVENT_NAME_KEY as oe, TRANSITION_MOUNT_ON_ENTER_KEY as se, TRANSITION_NEXT_PHASE_KEY as ce, TRANSITION_PHASE_APPEAR_DONE as le, TRANSITION_PHASE_APPEAR_KEY as p, TRANSITION_PHASE_APPEAR_START as ue, TRANSITION_PHASE_ENTER_DONE as m, TRANSITION_PHASE_ENTER_KEY as h, TRANSITION_PHASE_ENTER_START as de, TRANSITION_PHASE_EXIT_DONE as g, TRANSITION_PHASE_EXIT_KEY as _, TRANSITION_PHASE_EXIT_START as fe, TRANSITION_UNMOUNT_ON_EXIT_KEY as pe } from "./constants.js";
|
|
15
14
|
import { PropsContext as v, TransitionContext as me, TransitionGroupContext as he, defaultProps as ge } from "./context.js";
|
|
16
15
|
import { isActivePhaseHandler as _e, isAppearPhaseHandler as ve, isEnterPhaseHandler as ye, isExitDonePhaseHandler as be, isExitPhaseHandler as y, transitionNormalizeDurations as xe } from "./utils.js";
|
|
17
16
|
import { forwardRef as b, useContext as x, useDeferredValue as S, useEffect as C, useImperativeHandle as w, useLayoutEffect as T, useRef as E, useTransition as D } from "react";
|
|
18
17
|
import { jsx as O } from "react/jsx-runtime";
|
|
19
18
|
//#region components/common/transition/Transition.tsx
|
|
20
19
|
var { setTimeout: k, clearTimeout: A, requestAnimationFrame: j, cancelAnimationFrame: M } = window;
|
|
21
|
-
function N(
|
|
20
|
+
function N(l, b) {
|
|
22
21
|
x(he);
|
|
23
|
-
let N =
|
|
24
|
-
ee(() => {}),
|
|
22
|
+
let N = x(v), P = ie(l, { ...N }, ge), F = "hasShown", I = "refElement", { children: Se, in: L, [p]: Ce, [h]: we, [_]: R, [ae]: Te = 500, [d]: Ee, [u]: De, [se]: z, [pe]: B, [I]: Oe } = P;
|
|
23
|
+
ee(() => {}), c();
|
|
25
24
|
let V = E({
|
|
26
|
-
[
|
|
25
|
+
[F]: L,
|
|
27
26
|
destroyed: !1
|
|
28
|
-
}), H = V.current[
|
|
29
|
-
"unmountOnExit" in
|
|
30
|
-
let W = "mountOnEnter" in
|
|
27
|
+
}), H = V.current[F], U = Ee;
|
|
28
|
+
"unmountOnExit" in P && !r(B) && (U = !B);
|
|
29
|
+
let W = "mountOnEnter" in P && !r(z);
|
|
31
30
|
W && (H || (U = !z));
|
|
32
|
-
let [G,
|
|
31
|
+
let [G, ke, Ae] = re(() => X(Y())), { phase: K, destroy: q } = G, J = S(q, q);
|
|
33
32
|
i(K);
|
|
34
|
-
let [
|
|
33
|
+
let [je, Me] = D();
|
|
35
34
|
function Y() {
|
|
36
35
|
let e = g;
|
|
37
|
-
return L && (e =
|
|
36
|
+
return L && (e = Ce ? ue : le), e;
|
|
38
37
|
}
|
|
39
38
|
function X(e) {
|
|
40
39
|
return {
|
|
41
40
|
phase: e,
|
|
42
|
-
destroy:
|
|
41
|
+
destroy: Ne(e)
|
|
43
42
|
};
|
|
44
43
|
}
|
|
45
44
|
function Z() {
|
|
46
|
-
let { [
|
|
47
|
-
return
|
|
45
|
+
let { [I]: e } = P;
|
|
46
|
+
return ne(e);
|
|
48
47
|
}
|
|
49
|
-
function
|
|
48
|
+
function Ne(e) {
|
|
50
49
|
return U ? void 0 : be(e);
|
|
51
50
|
}
|
|
52
51
|
function Q(e) {
|
|
53
52
|
if (!V.current.destroyed && e) {
|
|
54
53
|
{
|
|
55
|
-
let n = Z(), { onBeforePhaseChange: r } =
|
|
56
|
-
t(r) && r(e, n),
|
|
54
|
+
let n = Z(), { onBeforePhaseChange: r } = P;
|
|
55
|
+
t(r) && r(e, n), te(n);
|
|
57
56
|
}
|
|
58
|
-
|
|
57
|
+
ke(X(e));
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
|
-
let
|
|
60
|
+
let Pe = a((e = !!L) => {
|
|
62
61
|
let t, n = y(K);
|
|
63
|
-
e ? (V.current[
|
|
62
|
+
e ? (V.current[F] = !0, n && (t = we ? de : m)) : n || (t = R ? fe : g), Q(t || K);
|
|
64
63
|
});
|
|
65
64
|
T(() => {
|
|
66
65
|
if (!(W && !z && !H)) {
|
|
67
|
-
let e =
|
|
66
|
+
let e = f[K]?.[oe], { [e]: n } = P;
|
|
68
67
|
t(n) && n(Z());
|
|
69
68
|
}
|
|
70
69
|
return () => {};
|
|
71
70
|
}, [K]), o(() => {
|
|
72
|
-
let { onAfterPhaseChange: e } =
|
|
71
|
+
let { onAfterPhaseChange: e } = P;
|
|
73
72
|
return t(e) && e(K, Z()), () => {};
|
|
74
|
-
}, [K]), s(() => (
|
|
73
|
+
}, [K]), s(() => (Pe(L), () => {}), [L]), C(() => {
|
|
75
74
|
V.current.destroyed = !1;
|
|
76
|
-
let { [
|
|
75
|
+
let { [u]: e } = P, r = null, i = null, a = f[K]?.[ce];
|
|
77
76
|
if (a && K !== a) if (_e(K)) if (t(e)) e(K, (e = a) => {
|
|
78
77
|
Q(e || a);
|
|
79
78
|
}, Z());
|
|
80
79
|
else {
|
|
81
|
-
let e = xe(
|
|
82
|
-
t = ve(K) ? e[p] : ye(K) ? e[
|
|
80
|
+
let e = xe(Te), t = e[h];
|
|
81
|
+
t = ve(K) ? e[p] : ye(K) ? e[h] : y(K) ? e[_] : e[h], r = k((e = a) => {
|
|
83
82
|
Q(e || a);
|
|
84
83
|
}, t, a);
|
|
85
84
|
}
|
|
@@ -90,18 +89,18 @@ function N(c, b) {
|
|
|
90
89
|
V.current.destroyed = !0, n(r) || A(r), n(i) || M(i);
|
|
91
90
|
};
|
|
92
91
|
}, [K]), s(() => () => {}, []), T(() => () => {}, []), o(() => () => {}, []), C(() => () => {}, []), w(b, () => ({
|
|
93
|
-
getState:
|
|
92
|
+
getState: Ae,
|
|
94
93
|
getInitPhase: Y,
|
|
95
94
|
getRootElement: Z
|
|
96
95
|
}));
|
|
97
|
-
let $ =
|
|
98
|
-
return r(q) || (R ? L ? q && ($ = null) : J && ($ = null) : L || J && ($ = null)), t($) && ($ = $(
|
|
96
|
+
let $ = Se;
|
|
97
|
+
return r(q) || (R ? L ? q && ($ = null) : J && ($ = null) : L || J && ($ = null)), t($) && ($ = $(P, G, K)), e($) && ($ = /* @__PURE__ */ O(me.Provider, {
|
|
99
98
|
value: { phase: K },
|
|
100
99
|
children: $
|
|
101
100
|
})), $;
|
|
102
101
|
}
|
|
103
102
|
var P = Object.assign(b(N), {
|
|
104
|
-
...
|
|
103
|
+
...l,
|
|
105
104
|
PropsContext: v
|
|
106
105
|
});
|
|
107
106
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-08-06 15:14:52 星期四 山东省济南市 */
|
|
2
2
|
import { isArray as e, isFunction as t, isPlainObject as n, isString as r, isStringAndExist as i } from "../utils/is.js";
|
|
3
3
|
import { castArray as a } from "../utils/lodash.js";
|
|
4
4
|
import o from "../utils/className.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-08-06 15:14:52 星期四 山东省济南市 */
|
|
2
2
|
import { isNumber as e } from "../utils/is.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { defaults as t } from "../utils/lodash.js";
|
|
4
|
+
import { getReactElementRef as n } from "../utils/ref.js";
|
|
5
5
|
import r from "../hooks/use-is-first-render/index.js";
|
|
6
6
|
import { TRANSITION_GROUP_COMPONENT_INFO as i } from "../utils/names.js";
|
|
7
7
|
import "../utils/index.js";
|
|
@@ -13,11 +13,11 @@ import { jsx as _ } from "react/jsx-runtime";
|
|
|
13
13
|
//#region components/common/transition/TransitionGroup.tsx
|
|
14
14
|
var { setTimeout: v, clearTimeout: y, requestAnimationFrame: b, cancelAnimationFrame: x } = window, S = { ...o };
|
|
15
15
|
function C(i) {
|
|
16
|
-
let { children: o, [c]: m = !0, [l]: b = !0, [u]: x = !0, [s]: C = 500, [a]: w = !1 } =
|
|
17
|
-
function A(
|
|
18
|
-
let i =
|
|
16
|
+
let { children: o, [c]: m = !0, [l]: b = !0, [u]: x = !0, [s]: C = 500, [a]: w = !1 } = t({}, i, S), T = r(), E = g([]), D = [], O = [], k = f.toArray(o).filter((e, t, n) => p(e));
|
|
17
|
+
function A(t, r) {
|
|
18
|
+
let i = t.props ?? {}, { [a]: o = w, [s]: d = C, [c]: f = m, [l]: p = b, [u]: h = x } = i;
|
|
19
19
|
D.push({
|
|
20
|
-
element:
|
|
20
|
+
element: t,
|
|
21
21
|
removeTimeout: r
|
|
22
22
|
});
|
|
23
23
|
let g = {
|
|
@@ -28,10 +28,10 @@ function C(i) {
|
|
|
28
28
|
[u]: h,
|
|
29
29
|
[l]: p,
|
|
30
30
|
[c]: T ? f : p
|
|
31
|
-
}, v = /* @__PURE__ */ _(
|
|
32
|
-
ref: t
|
|
31
|
+
}, v = /* @__PURE__ */ _(t.type, {
|
|
32
|
+
ref: n(t),
|
|
33
33
|
...g
|
|
34
|
-
},
|
|
34
|
+
}, t.key);
|
|
35
35
|
O.push(v);
|
|
36
36
|
}
|
|
37
37
|
function j(e) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-08-06 15:14:52 星期四 山东省济南市 */
|
|
2
2
|
import { isEmpty as e, isFunction as t } from "../utils/is.js";
|
|
3
3
|
import { TRANSITION_STYLE_COMPONENT_INFO as n } from "../utils/names.js";
|
|
4
4
|
import { TRANSITION_PHASE_APPEAR_KEY as r } from "./constants.js";
|
package/transition/constants.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-08-06 15:14:52 星期四 山东省济南市 */
|
|
2
2
|
//#region components/common/transition/constants.ts
|
|
3
3
|
var e = "mountOnEnter", t = "unmountOnExit", n = "alwaysMounted", r = "addEndListener", i = "duration", a = 500, o = "appear", s = "enter", c = "exit", l = /* @__PURE__ */ function(e) {
|
|
4
4
|
return e.APPEAR_START = `${o}Start`, e.APPEAR_ACTIVE = `${o}Active`, e.APPEAR_DONE = `${o}Done`, e.ENTER_START = `${s}Start`, e.ENTER_ACTIVE = `${s}Active`, e.ENTER_DONE = `${s}Done`, e.EXIT_START = `${c}Start`, e.EXIT_ACTIVE = `${c}Active`, e.EXIT_DONE = `${c}Done`, e;
|
package/transition/context.js
CHANGED
|
File without changes
|
package/transition/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-08-06 15:14:52 星期四 山东省济南市 */
|
|
2
2
|
import { TRANSITION_COMPONENT_INFO as e } from "../utils/names.js";
|
|
3
3
|
import "./style/index.js";
|
|
4
4
|
import { TRANSITION_ADD_END_LISTENER_KEY as t, TRANSITION_ALWAYS_MOUNTED_KEY as n, TRANSITION_CSS_CLASS_NAMES_SUFFIX as ee, TRANSITION_DEFAULT_PROPS as r, TRANSITION_DURATION_DEFAULT as i, TRANSITION_DURATION_KEY as a, TRANSITION_EVENT_MAP as o, TRANSITION_EVENT_NAME_KEY as s, TRANSITION_MOUNT_ON_ENTER_KEY as c, TRANSITION_NEXT_PHASE_KEY as l, TRANSITION_PHASE_APPEAR_ACTIVE as u, TRANSITION_PHASE_APPEAR_DONE as d, TRANSITION_PHASE_APPEAR_KEY as f, TRANSITION_PHASE_APPEAR_START as p, TRANSITION_PHASE_ENTER_ACTIVE as m, TRANSITION_PHASE_ENTER_DONE as h, TRANSITION_PHASE_ENTER_KEY as te, TRANSITION_PHASE_ENTER_START as ne, TRANSITION_PHASE_EVENT_ON_ENTER_ACTIVE as re, TRANSITION_PHASE_EVENT_ON_ENTER_DONE as ie, TRANSITION_PHASE_EVENT_ON_ENTER_START as g, TRANSITION_PHASE_EVENT_ON_EXIT_ACTIVE as _, TRANSITION_PHASE_EVENT_ON_EXIT_DONE as v, TRANSITION_PHASE_EVENT_ON_EXIT_START as y, TRANSITION_PHASE_EXIT_ACTIVE as b, TRANSITION_PHASE_EXIT_DONE as x, TRANSITION_PHASE_EXIT_KEY as S, TRANSITION_PHASE_EXIT_START as C, TRANSITION_UNMOUNT_ON_EXIT_KEY as w, TransitionPhase as T, TransitionPhaseEvent as E } from "./constants.js";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { CSSProperties, HTMLAttributes, ReactElement, ReactNode, RefObject } from 'react';
|
|
2
|
-
import type { ElementLike } from '../utils/getRootElement';
|
|
3
2
|
import type { TransitionPhase } from './constants';
|
|
4
3
|
/**
|
|
5
4
|
* 类型表示每个过渡阶段的状态。
|
|
@@ -73,7 +72,7 @@ export type TransitionProps = {
|
|
|
73
72
|
* 要被执行动画的元素。
|
|
74
73
|
* @deprecated
|
|
75
74
|
*/
|
|
76
|
-
refElement?:
|
|
75
|
+
refElement?: RefObject<HTMLElement | null>;
|
|
77
76
|
mountOnEnter?: boolean;
|
|
78
77
|
unmountOnExit?: boolean;
|
|
79
78
|
/**
|
package/transition/utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-08-06 15:14:52 星期四 山东省济南市 */
|
|
2
2
|
import { isNullOrUndefined as e, isNumber as t, isPlainObject as n } from "../utils/is.js";
|
|
3
3
|
import { TRANSITION_PHASE_APPEAR_ACTIVE as r, TRANSITION_PHASE_APPEAR_DONE as i, TRANSITION_PHASE_APPEAR_KEY as a, TRANSITION_PHASE_APPEAR_START as o, TRANSITION_PHASE_ENTER_ACTIVE as s, TRANSITION_PHASE_ENTER_DONE as c, TRANSITION_PHASE_ENTER_KEY as l, TRANSITION_PHASE_ENTER_START as u, TRANSITION_PHASE_EXIT_ACTIVE as d, TRANSITION_PHASE_EXIT_DONE as f, TRANSITION_PHASE_EXIT_KEY as p, TRANSITION_PHASE_EXIT_START as m } from "./constants.js";
|
|
4
4
|
//#region components/common/transition/utils.ts
|
package/typewriter/Typewriter.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-08-06 15:14:52 星期四 山东省济南市 */
|
|
2
2
|
import { isFunction as e } from "../utils/is.js";
|
|
3
3
|
import t from "../hooks/use-memoized-fn/index.js";
|
|
4
4
|
import n from "../hooks/use-set-state/index.js";
|
|
@@ -13,54 +13,54 @@ import { jsx as g } from "react/jsx-runtime";
|
|
|
13
13
|
//#region components/common/typewriter/Typewriter.tsx
|
|
14
14
|
var { requestAnimationFrame: _, cancelAnimationFrame: v, setTimeout: y, clearTimeout: b, setInterval: x, clearInterval: S } = window;
|
|
15
15
|
function C(o, l) {
|
|
16
|
-
let { style:
|
|
16
|
+
let _ = u(s), { style: v, className: y, children: b = "", text: C = b, timeout: w = c.timeout, appendTextLength: T = c.appendTextLength, onEnd: E } = r(o, { ..._ }, c), [D, O] = n({
|
|
17
17
|
text: "",
|
|
18
18
|
className: "",
|
|
19
19
|
restart: a()
|
|
20
|
-
}), { text:
|
|
21
|
-
let { text: t = "" } =
|
|
20
|
+
}), { text: k = "", restart: A = "", className: j = "" } = D, M = m(-1), N = `${h}-typewriter`, P = t((e = "") => {
|
|
21
|
+
let { text: t = "" } = D;
|
|
22
22
|
return t === e || t.length >= e.length;
|
|
23
|
-
}), P = t(() => {
|
|
24
|
-
S(j.current);
|
|
25
23
|
}), F = t(() => {
|
|
26
|
-
|
|
24
|
+
S(M.current);
|
|
25
|
+
}), I = t(() => {
|
|
26
|
+
O({
|
|
27
27
|
text: "",
|
|
28
28
|
className: ""
|
|
29
29
|
}, () => {
|
|
30
|
-
|
|
30
|
+
F(), M.current = x(R, w);
|
|
31
31
|
});
|
|
32
|
-
}), I = t(() => {
|
|
33
|
-
D({ restart: a() });
|
|
34
32
|
}), L = t(() => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
O({ restart: a() });
|
|
34
|
+
}), R = t(() => {
|
|
35
|
+
if (P(C)) {
|
|
36
|
+
if (F(), e(E)) {
|
|
37
|
+
let { className: e } = E(C) ?? {};
|
|
38
|
+
O({ className: e });
|
|
39
39
|
}
|
|
40
40
|
} else {
|
|
41
|
-
let t =
|
|
42
|
-
e(t) && (t = t(
|
|
41
|
+
let t = T;
|
|
42
|
+
e(t) && (t = t(C) ?? c.appendTextLength), O({ text: C.substring(0, k.length + t) });
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
|
-
p(() => (
|
|
46
|
-
|
|
45
|
+
p(() => (R(), () => {}), []), d(() => (I(), () => {
|
|
46
|
+
F();
|
|
47
47
|
}), [
|
|
48
|
-
b,
|
|
49
48
|
C,
|
|
50
|
-
|
|
49
|
+
w,
|
|
50
|
+
A
|
|
51
51
|
]);
|
|
52
|
-
let
|
|
52
|
+
let z = m(null);
|
|
53
53
|
return f(l, () => ({
|
|
54
|
-
restart:
|
|
55
|
-
clear:
|
|
54
|
+
restart: L,
|
|
55
|
+
clear: F,
|
|
56
56
|
getRootElement() {
|
|
57
|
-
return
|
|
57
|
+
return z.current;
|
|
58
58
|
}
|
|
59
59
|
})), /* @__PURE__ */ g("span", {
|
|
60
|
-
ref:
|
|
61
|
-
style:
|
|
62
|
-
className: i(
|
|
63
|
-
children:
|
|
60
|
+
ref: z,
|
|
61
|
+
style: v,
|
|
62
|
+
className: i(N, !P(C) && `${N}-blink`, y, j),
|
|
63
|
+
children: k
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
var w = l(C);
|
package/typewriter/constants.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-08-06 15:14:52 星期四 山东省济南市 */
|
|
2
2
|
/* 独立思考,明辨是非 */
|
package/typewriter/context.js
CHANGED
|
File without changes
|
package/typewriter/index.js
CHANGED
package/typewriter/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-08-06 15:14:52 星期四 山东省济南市 */
|
|
2
2
|
/* 独立思考,明辨是非 */
|
package/utils/callOrReturn.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare function callbackOriginRef(children
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
declare function callbackOriginRef(children?: ReactElement, node?: Element | null): void;
|
|
3
3
|
export { callbackOriginRef };
|
|
4
4
|
export default callbackOriginRef;
|
package/utils/caseName.js
CHANGED
package/utils/className.js
CHANGED
package/utils/constants.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export declare const CSS_VARIABLE_ELEMENT: HTMLElement;
|
|
2
|
-
export declare const NOOP: (...args: any[]) => void;
|
|
3
2
|
export { UI_PC_KEY, UI_PC_THEME_DARK_CLASS_NAME, } from '@unicom-cloud/utils/constants/ui';
|
|
4
3
|
export declare const DAYJS_DEFAULT_FORMAT = "YYYY-MM-DD";
|
|
5
4
|
export declare const DAYJS_DEFAULT_FORMAT_WITH_TIME = "YYYY-MM-DD HH:mm:ss";
|
|
6
|
-
declare const PREFIX_CLASS: "pqbc";
|
|
7
|
-
export { PREFIX_CLASS };
|
|
5
|
+
export declare const PREFIX_CLASS: "pqbc";
|
package/utils/constants.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-08-06 15:14:52 星期四 山东省济南市 */
|
|
2
2
|
import { getDocumentElement as e } from "./dom.js";
|
|
3
3
|
import { UI_COMMON_PREFIX as t, UI_PC_KEY as n, UI_PC_THEME_DARK_CLASS_NAME as r } from "@unicom-cloud/utils/constants/ui";
|
|
4
|
-
import i from "lodash/noop";
|
|
5
4
|
//#region components/common/utils/constants.ts
|
|
6
|
-
var
|
|
5
|
+
var i = e(), a = "YYYY-MM-DD", o = `${a} HH:mm:ss`, s = t;
|
|
7
6
|
//#endregion
|
|
8
|
-
export {
|
|
7
|
+
export { i as CSS_VARIABLE_ELEMENT, a as DAYJS_DEFAULT_FORMAT, o as DAYJS_DEFAULT_FORMAT_WITH_TIME, s as PREFIX_CLASS, n as UI_PC_KEY, r as UI_PC_THEME_DARK_CLASS_NAME };
|
|
9
8
|
/* 独立思考,明辨是非 */
|
package/utils/copy.js
CHANGED
package/utils/css.js
CHANGED
package/utils/date.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-08-06 15:14:52 星期四 山东省济南市 */
|
|
2
2
|
import { convertTime as e, convertToDurationBasedOnTimeUnits as t, dateFormat as n, dayjsFormat as r } from "@unicom-cloud/utils/date";
|
|
3
3
|
export { e as convertTime, t as convertToDurationBasedOnTimeUnits, n as dateFormat, r as dayjsFormat };
|
|
4
4
|
/* 独立思考,明辨是非 */
|
package/utils/dayjs.js
CHANGED
package/utils/document.js
CHANGED
package/utils/dom.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import canUseDOM from '@unicom-cloud/utils/dom-helpers/canUseDOM';
|
|
2
2
|
import getElementCoordinates from '@unicom-cloud/utils/dom-helpers/getElementCoordinates';
|
|
3
3
|
import forceReflow from '@unicom-cloud/utils/dom-helpers/reflow';
|
|
4
|
-
import
|
|
4
|
+
import getElement from './getElement';
|
|
5
5
|
export declare function on<K extends keyof HTMLElementEventMap>(eventTarget: EventTarget, type: K, callback: (evt: HTMLElementEventMap[K]) => void, options?: AddEventListenerOptions | boolean): void;
|
|
6
6
|
export declare function off<K extends keyof HTMLElementEventMap>(eventTarget: EventTarget, type: K, callback: (evt: HTMLElementEventMap[K]) => void, options?: EventListenerOptions | boolean): void;
|
|
7
7
|
export declare function contains(parentNode: Node | HTMLElement, child: Node | HTMLElement): boolean;
|
|
@@ -24,6 +24,7 @@ export declare function getScrollElements(container: HTMLElement, top?: HTMLElem
|
|
|
24
24
|
* @example
|
|
25
25
|
*/
|
|
26
26
|
export declare function parentContainsChildren(parentElement: HTMLElement | null, childrenElement: HTMLElement | null): boolean;
|
|
27
|
+
export declare function getHead(): HTMLHeadElement;
|
|
27
28
|
export declare function getBody(): HTMLElement;
|
|
28
29
|
export declare function getBodyContainer(): HTMLElement;
|
|
29
30
|
/**
|
|
@@ -38,5 +39,5 @@ export declare function focusAtEnd(element: HTMLElement): void;
|
|
|
38
39
|
/**
|
|
39
40
|
* Retrieves a DOM node via a ref, and does not invoke `findDOMNode`.
|
|
40
41
|
*/
|
|
41
|
-
export declare
|
|
42
|
-
export { canUseDOM, forceReflow, getElementCoordinates, forceReflow as reflow };
|
|
42
|
+
export declare const getDOM: typeof getElement;
|
|
43
|
+
export { canUseDOM, forceReflow, getElement, getElementCoordinates, forceReflow as reflow, };
|
package/utils/dom.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* 潘启宝 2026-
|
|
1
|
+
/* 潘启宝 2026-08-06 15:14:52 星期四 山东省济南市 */
|
|
2
2
|
import { isEventTarget as e, isFunction as t, isServerRendering as n, isString as r, is_exports as i } from "./is.js";
|
|
3
|
-
import a from "./
|
|
3
|
+
import a from "./getElement.js";
|
|
4
4
|
import o from "./screenfull.js";
|
|
5
5
|
import s from "@unicom-cloud/utils/dom-helpers/canUseDOM";
|
|
6
6
|
import c from "@unicom-cloud/utils/dom-helpers/getElementCoordinates";
|
|
@@ -22,7 +22,7 @@ function f(e, t) {
|
|
|
22
22
|
}
|
|
23
23
|
return !1;
|
|
24
24
|
}
|
|
25
|
-
function p(e, t =
|
|
25
|
+
function p(e, t = y()) {
|
|
26
26
|
let n = [], r = e;
|
|
27
27
|
for (; r && r !== t;) (0, i.isScrollElement)(r) && n.push(r), r = r.parentElement;
|
|
28
28
|
return n;
|
|
@@ -38,21 +38,24 @@ function m(e, t) {
|
|
|
38
38
|
return !1;
|
|
39
39
|
}
|
|
40
40
|
function h() {
|
|
41
|
-
return
|
|
41
|
+
return b().head;
|
|
42
42
|
}
|
|
43
43
|
function g() {
|
|
44
|
-
return
|
|
44
|
+
return b().body;
|
|
45
45
|
}
|
|
46
46
|
function _() {
|
|
47
|
-
return
|
|
47
|
+
return g();
|
|
48
48
|
}
|
|
49
49
|
function v() {
|
|
50
|
-
return
|
|
50
|
+
return o.element || _();
|
|
51
51
|
}
|
|
52
52
|
function y() {
|
|
53
|
+
return b().documentElement;
|
|
54
|
+
}
|
|
55
|
+
function b() {
|
|
53
56
|
return window.document;
|
|
54
57
|
}
|
|
55
|
-
function
|
|
58
|
+
function x(e) {
|
|
56
59
|
if (e.focus(), e.tagName === "INPUT" || e.tagName === "TEXTAREA") {
|
|
57
60
|
let t = e;
|
|
58
61
|
t.selectionStart = t.selectionEnd = t.value.length;
|
|
@@ -61,9 +64,7 @@ function b(e) {
|
|
|
61
64
|
let t = document.createRange(), n = window.getSelection();
|
|
62
65
|
t.selectNodeContents(e), t.collapse(!1), n && (n.removeAllRanges(), n.addRange(t));
|
|
63
66
|
}
|
|
64
|
-
|
|
65
|
-
return a(e);
|
|
66
|
-
}
|
|
67
|
+
var S = a;
|
|
67
68
|
//#endregion
|
|
68
|
-
export { s as canUseDOM, f as contains,
|
|
69
|
+
export { s as canUseDOM, f as contains, x as focusAtEnd, l as forceReflow, l as reflow, g as getBody, _ as getBodyContainer, S as getDOM, b as getDocument, y as getDocumentElement, a as getElement, c as getElementCoordinates, h as getHead, p as getScrollElements, v as getTopLevelOverlayContainer, d as off, u as on, m as parentContainsChildren };
|
|
69
70
|
/* 独立思考,明辨是非 */
|
package/utils/emitter.js
CHANGED
package/utils/file.js
CHANGED
package/utils/fileRead.js
CHANGED
package/utils/fileToDataURL.js
CHANGED
package/utils/fillNBSP.js
CHANGED