@unicom-cloud/ui 0.8.54 → 0.8.56
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/Affix.js +36 -36
- package/Alert.js +41 -45
- package/Anchor.js +1 -1
- package/AutoComplete.js +40 -40
- package/Avatar.js +36 -36
- package/BackTop.js +26 -26
- package/Badge.js +43 -43
- package/Breadcrumb.js +17 -17
- package/Button.js +42 -42
- package/Calendar.js +54 -56
- package/Card.js +28 -28
- package/Carousel.js +42 -43
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +11 -580
- package/Comment.js +14 -14
- package/ConfigProvider.js +2 -2
- package/Copy.js +26 -26
- package/DatePicker.js +661 -670
- package/Descriptions.js +53 -53
- package/Divider.js +15 -15
- package/Draggable.js +16 -16
- package/Drawer.js +1 -1
- package/Dropdown.js +10 -10
- package/Empty.js +3 -3
- package/Form.js +10 -1410
- package/Grid.js +49 -49
- package/Icon.js +10 -10
- package/IconHover.js +2 -2
- package/Image.js +1 -1
- package/Input.js +1 -1
- package/InputNumber.js +7 -7
- package/InputTag.js +1 -1
- package/Layout.js +34 -34
- package/Link.js +26 -26
- package/List.js +39 -39
- package/Mentions.js +17 -17
- package/Menu.js +1 -1
- package/Message.js +3 -3
- package/Modal.js +1 -1
- package/Notice.js +4 -10
- package/Notification.js +3 -3
- package/OverflowEllipsis.js +18 -18
- package/PageHeader.js +26 -27
- package/Pagination.js +1 -1
- package/Picker.js +1 -1
- package/Popconfirm.js +15 -15
- package/Popover.js +22 -22
- package/Progress.js +18 -18
- package/Radio.js +2 -2
- package/Rate.js +40 -43
- package/ResizeBox.js +191 -192
- package/Result.js +17 -17
- package/Select.js +1 -1
- package/SelectView.js +56 -56
- package/Skeleton.js +35 -35
- package/Slider.js +81 -81
- package/Space.js +27 -27
- package/SpeechSynthesis.js +29 -32
- package/Spin.js +15 -15
- package/Statistic.js +54 -54
- package/Steps.js +44 -44
- package/Switch.js +39 -38
- package/Table.js +488 -488
- package/Tabs.js +1 -1
- package/Tag.js +13 -14
- package/TimePicker.js +68 -68
- package/Timeline.js +1 -1
- package/Tooltip.js +27 -28
- package/Transfer.js +29 -30
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +53 -52
- package/Typography.js +2 -737
- package/Upload.js +1 -1
- package/VerificationCode.js +1 -1
- package/Version.js +1 -1
- package/Watermark.js +1 -1
- package/chunk/1mEO29GP.js +23 -0
- package/chunk/5pZ3ayqs.js +29 -0
- package/chunk/9Gh1afjL.js +23 -0
- package/chunk/B1S1OEw6.js +29 -0
- package/chunk/{RRWbBHK-.js → B2Bp3i5u.js} +221 -221
- package/chunk/B45v5S9k.js +209 -0
- package/chunk/B6fn5y_s.js +23 -0
- package/chunk/B9PsJar0.js +118 -0
- package/chunk/BA02BFUV.js +41 -0
- package/chunk/BCk8e9fj.js +29 -0
- package/chunk/BHK9zpXn.js +207 -0
- package/chunk/BHLTzWzi.js +29 -0
- package/chunk/BK1FKNAX.js +41 -0
- package/chunk/BM6dpkeM.js +32 -0
- package/chunk/{DQ3uFRJD.js → BP7xX86Q.js} +223 -202
- package/chunk/BWx1cVT_.js +66 -0
- package/chunk/BbI3gqVr.js +23 -0
- package/chunk/{CIc4yo9k.js → BbYzi8M0.js} +46 -46
- package/chunk/Be7oeWU8.js +34 -0
- package/chunk/BeM2hfks.js +88 -0
- package/chunk/BkHxm4sv.js +41 -0
- package/chunk/{BUQBof6z.js → Bl-ODC57.js} +206 -207
- package/chunk/BlKc_pDZ.js +678 -0
- package/chunk/{BzqZZHGK.js → Bny52uiG.js} +48 -48
- package/chunk/{PuuHmqnW.js → BpwDupra.js} +238 -238
- package/chunk/BqxwlITu.js +52 -0
- package/chunk/BuEC_zcc.js +278 -0
- package/chunk/{CqcZfQQ4.js → Bv8ZRDFt.js} +80 -80
- package/chunk/{DZGcv_9A.js → C-w9pFY-.js} +32 -32
- package/chunk/C2fspJbE.js +23 -0
- package/chunk/C7Okdv4u.js +34 -0
- package/chunk/C95ipQ6b.js +41 -0
- package/chunk/{BzMYgxgO.js → CF3Telny.js} +26 -26
- package/chunk/CPl52AZh.js +206 -0
- package/chunk/CXNW5Y2a.js +23 -0
- package/chunk/Cb_oWoGj.js +40 -0
- package/chunk/CcX2pBUh.js +46 -0
- package/chunk/{BdJcAQ0Q.js → CggcswbO.js} +18 -18
- package/chunk/CilQ012k.js +1796 -0
- package/chunk/CkAOsst1.js +73 -0
- package/chunk/CnY8SvgY.js +126 -0
- package/chunk/{CTSIr-Pr.js → CwXmtKib.js} +89 -101
- package/chunk/{C3I_L73_.js → CwjaGytU.js} +39 -40
- package/chunk/{DTgc2wl4.js → D6RTBH4C.js} +36 -36
- package/chunk/D6mVoX-C.js +116 -0
- package/chunk/D9TqtOhq.js +40 -0
- package/chunk/{qSJXQ1qu.js → DBJ8d0o0.js} +183 -189
- package/chunk/{RL1SNlng.js → DDda6s72.js} +16 -16
- package/chunk/{BH5fVprw.js → DJmWXheU.js} +9 -9
- package/chunk/DPvnQJ-H.js +52 -0
- package/chunk/DQXq1QT0.js +58 -0
- package/chunk/DRJO1GfY.js +855 -0
- package/chunk/DUxWiN2U.js +1465 -0
- package/chunk/DYZzQ2uT.js +29 -0
- package/chunk/{CK0H_Yi4.js → DafaH1Qt.js} +140 -138
- package/chunk/{ShWkfsJd.js → DalIRWr7.js} +21 -21
- package/chunk/{CzTYWtfa.js → Dg2DmtzA.js} +31 -30
- package/chunk/DhLbnw3R.js +29 -0
- package/chunk/{BmtF7P8U.js → DkIjpuBZ.js} +170 -170
- package/chunk/Do1aMgY3.js +12 -0
- package/chunk/Dtnux4qL.js +38 -0
- package/chunk/{Niaq_og8.js → Dw4SJ4o1.js} +219 -225
- package/chunk/{DbtCtriE.js → DxNRWF67.js} +30 -31
- package/chunk/JnyGFb5j.js +284 -0
- package/chunk/Lk60-jkf.js +1098 -0
- package/chunk/V_IcWDFx.js +49 -0
- package/chunk/{DG7VgAhL.js → WkB0MERB.js} +107 -108
- package/chunk/bsawGxt8.js +32 -0
- package/chunk/cUuQh7L_.js +46 -0
- package/chunk/fqgc8r6C.js +29 -0
- package/chunk/m_kOQCiU.js +29 -0
- package/chunk/sl8s35SK.js +29 -0
- package/chunk/{Dki1RB5p.js → t51ig1FZ.js} +154 -155
- package/chunk/{BC0PujUD.js → yvbAFxtk.js} +119 -121
- package/hooks/index.js +52 -246
- package/hooks/useForceUpdate.js +6 -6
- package/hooks/useIntersectionObserver.js +12 -10
- package/hooks/useKeyboardEvent.js +7 -7
- package/hooks/useMedia.js +9 -12
- package/hooks/useMergeValue.js +10 -8
- package/hooks/useResizeObserver.js +16 -0
- package/hooks/useUpdateEffect.js +7 -9
- package/hooks/useWindowSize.js +16 -20
- package/icons.js +6003 -0
- package/index.js +377 -472
- package/locale/en-US.js +20 -6
- package/locale/ja-JP.js +4 -2
- package/locale/ko-KR.js +2 -2
- package/locale/pt-BR.js +3 -3
- package/locale/pt-PT.js +3 -3
- package/locale/tr-TR.js +11 -3
- package/locale/zh-CN.js +6 -0
- package/locale/zh-HK.js +2 -0
- package/locale/zh-TW.js +2 -0
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/anchor/util.d.ts +1 -0
- package/types/button/index.d.ts +2 -2
- package/types/color-picker/colors.d.ts +1 -1
- package/types/date-picker/util.d.ts +1 -1
- package/types/hooks/index.d.ts +3 -101
- package/types/hooks/useForceUpdate.d.ts +1 -2
- package/types/hooks/useIntersectionObserver.d.ts +1 -1
- package/types/hooks/useKeyboardEvent.d.ts +2 -2
- package/types/hooks/useMergeProps.d.ts +1 -1
- package/types/hooks/useResizeObserver.d.ts +5 -0
- package/types/hooks/useUpdateEffect.d.ts +2 -3
- package/types/hooks/useWindowSize.d.ts +1 -1
- package/types/icons.d.ts +4 -0
- package/types/index.d.ts +12 -2
- package/types/locale/en-US.d.ts +4 -0
- package/types/locale/interface.d.ts +2 -0
- package/types/locale/ja-JP.d.ts +4 -0
- package/types/locale/zh-CN.d.ts +4 -0
- package/types/locale/zh-HK.d.ts +4 -0
- package/types/locale/zh-TW.d.ts +4 -0
- package/types/modal/config.d.ts +1 -1
- package/types/version/index.d.ts +1 -1
- package/utils/CSSTransition.js +1 -1
- package/utils/className.js +2 -3
- package/utils/contextHolder.js +2 -2
- package/utils/copy.js +2 -3
- package/utils/is.js +127 -90
- package/utils/reactDOM.js +17 -15
- package/utils/responsiveObserve.js +16 -16
- package/utils/saveAs.js +2 -3
- package/utils/scrollIntoView.js +1 -1
- package/chunk/BdYAMaw9.js +0 -6
- package/chunk/CiZVOdJ3.js +0 -122
- package/chunk/DdtfPvgk.js +0 -272
- package/chunk/I4RV9SKZ.js +0 -135
- package/chunk/TXCrI0jN.js +0 -20
- package/chunk/i1A7W8Qt.js +0 -277
- package/chunk/xPzFRQJn.js +0 -740
- package/hooks/useAsync.js +0 -13
- package/hooks/useAsyncFn.js +0 -15
- package/hooks/useAsyncRetry.js +0 -17
- package/hooks/useAudio.js +0 -5
- package/hooks/useBeforeUnload.js +0 -18
- package/hooks/useBoolean.js +0 -4
- package/hooks/useClickAway.js +0 -22
- package/hooks/useCopyToClipboard.js +0 -51
- package/hooks/useCounter.js +0 -45
- package/hooks/useCreation.js +0 -17
- package/hooks/useCustomCompareEffect.js +0 -15
- package/hooks/useDebounce.js +0 -9
- package/hooks/useDefault.js +0 -10
- package/hooks/useDrop.js +0 -44
- package/hooks/useDropArea.js +0 -45
- package/hooks/useEffectOnce.js +0 -7
- package/hooks/useEffectState.js +0 -9
- package/hooks/useEnsuredForwardedRef.js +0 -17
- package/hooks/useError.js +0 -13
- package/hooks/useEvent.js +0 -13
- package/hooks/useEventListener.js +0 -39
- package/hooks/useFavicon.js +0 -16
- package/hooks/useFirstMountState.js +0 -8
- package/hooks/useFullscreen.js +0 -39
- package/hooks/useGeolocation.js +0 -38
- package/hooks/useGetSet.js +0 -18
- package/hooks/useGetSetState.js +0 -12
- package/hooks/useHash.js +0 -26
- package/hooks/useHover.js +0 -16
- package/hooks/useHoverDirty.js +0 -17
- package/hooks/useIdle.js +0 -34
- package/hooks/useIntersection.js +0 -19
- package/hooks/useIsomorphicLayoutEffect2.js +0 -6
- package/hooks/useKey.js +0 -16
- package/hooks/useKeyPress.js +0 -13
- package/hooks/useKeyPressEvent.js +0 -11
- package/hooks/useLatest.js +0 -8
- package/hooks/useLifecycles.js +0 -9
- package/hooks/useList.js +0 -67
- package/hooks/useLocalStorage.js +0 -42
- package/hooks/useLocation.js +0 -51
- package/hooks/useLockBodyScroll.js +0 -55
- package/hooks/useLogger.js +0 -10
- package/hooks/useLongPress.js +0 -24
- package/hooks/useMap.js +0 -31
- package/hooks/useMeasure.js +0 -34
- package/hooks/useMeasureDirty.js +0 -24
- package/hooks/useMediaDevices.js +0 -26
- package/hooks/useMediatedState.js +0 -14
- package/hooks/useMethods.js +0 -14
- package/hooks/useMotion.js +0 -56
- package/hooks/useMount.js +0 -9
- package/hooks/useMountedState.js +0 -10
- package/hooks/useMouse.js +0 -44
- package/hooks/useMouseHovered.js +0 -9
- package/hooks/useMouseWheel.js +0 -14
- package/hooks/useMultiStateValidator.js +0 -19
- package/hooks/useNetworkState.js +0 -31
- package/hooks/useNumber.js +0 -4
- package/hooks/useObservable.js +0 -12
- package/hooks/useOrientation.js +0 -30
- package/hooks/usePageLeave.js +0 -19
- package/hooks/usePermission.js +0 -19
- package/hooks/usePinchZoom.js +0 -40
- package/hooks/usePreviousDistinct.js +0 -10
- package/hooks/usePromise.js +0 -19
- package/hooks/useQueue.js +0 -25
- package/hooks/useRaf.js +0 -24
- package/hooks/useRafLoop.js +0 -24
- package/hooks/useRafState.js +0 -15
- package/hooks/useReactive.js +0 -21
- package/hooks/useRendersCount.js +0 -7
- package/hooks/useScroll.js +0 -27
- package/hooks/useScrolling.js +0 -23
- package/hooks/useSearchParam.js +0 -18
- package/hooks/useSessionStorage.js +0 -29
- package/hooks/useSet.js +0 -15
- package/hooks/useSetState.js +0 -16
- package/hooks/useSize.js +0 -58
- package/hooks/useSlider.js +0 -48
- package/hooks/useSpeech.js +0 -45
- package/hooks/useStartTyping.js +0 -30
- package/hooks/useStateList.js +0 -37
- package/hooks/useStateValidator.js +0 -17
- package/hooks/useStateWithHistory.js +0 -46
- package/hooks/useSyncState.js +0 -14
- package/hooks/useThrottle.js +0 -21
- package/hooks/useThrottleFn.js +0 -21
- package/hooks/useTimeout.js +0 -17
- package/hooks/useTimeoutFn.js +0 -16
- package/hooks/useTitle.js +0 -18
- package/hooks/useToggle.js +0 -5
- package/hooks/useTween.js +0 -11
- package/hooks/useUnmount.js +0 -9
- package/hooks/useUnmountPromise.js +0 -20
- package/hooks/useUpdate.js +0 -10
- package/hooks/useUpdateTimeout.js +0 -9
- package/hooks/useUpsert.js +0 -16
- package/hooks/useVibrate.js +0 -21
- package/hooks/useVideo.js +0 -5
- package/hooks/useWindowScroll.js +0 -29
- package/types/hooks/component/UseKey.d.ts +0 -2
- package/types/hooks/factory/createBreakpoint.d.ts +0 -4
- package/types/hooks/factory/createGlobalState.d.ts +0 -7
- package/types/hooks/factory/createHTMLMediaHook.d.ts +0 -33
- package/types/hooks/factory/createMemo.d.ts +0 -2
- package/types/hooks/factory/createReducer.d.ts +0 -8
- package/types/hooks/factory/createReducerContext.d.ts +0 -5
- package/types/hooks/factory/createRenderProp.d.ts +0 -1
- package/types/hooks/factory/createRouter.d.ts +0 -7
- package/types/hooks/factory/createStateContext.d.ts +0 -5
- package/types/hooks/misc/hookState.d.ts +0 -8
- package/types/hooks/misc/parseTimeRanges.d.ts +0 -4
- package/types/hooks/misc/types.d.ts +0 -2
- package/types/hooks/misc/util.d.ts +0 -5
- package/types/hooks/useAsync.d.ts +0 -20
- package/types/hooks/useAsyncFn.d.ts +0 -23
- package/types/hooks/useAsyncRetry.d.ts +0 -27
- package/types/hooks/useAudio.d.ts +0 -11
- package/types/hooks/useBeforeUnload.d.ts +0 -2
- package/types/hooks/useBoolean.d.ts +0 -2
- package/types/hooks/useClickAway.d.ts +0 -3
- package/types/hooks/useCopyToClipboard.d.ts +0 -7
- package/types/hooks/useCounter.d.ts +0 -9
- package/types/hooks/useCreation.d.ts +0 -2
- package/types/hooks/useCustomCompareEffect.d.ts +0 -4
- package/types/hooks/useDebounce.d.ts +0 -3
- package/types/hooks/useDefault.d.ts +0 -2
- package/types/hooks/useDrop.d.ts +0 -17
- package/types/hooks/useDropArea.d.ts +0 -18
- package/types/hooks/useEffectOnce.d.ts +0 -3
- package/types/hooks/useEffectState.d.ts +0 -2
- package/types/hooks/useEnsuredForwardedRef.d.ts +0 -3
- package/types/hooks/useError.d.ts +0 -2
- package/types/hooks/useEvent.d.ts +0 -13
- package/types/hooks/useEventListener.d.ts +0 -2
- package/types/hooks/useFavicon.d.ts +0 -2
- package/types/hooks/useFirstMountState.d.ts +0 -1
- package/types/hooks/useFullscreen.d.ts +0 -10
- package/types/hooks/useGeolocation.d.ts +0 -21
- package/types/hooks/useGetSet.d.ts +0 -3
- package/types/hooks/useGetSetState.d.ts +0 -2
- package/types/hooks/useHash.d.ts +0 -2
- package/types/hooks/useHover.d.ts +0 -4
- package/types/hooks/useHoverDirty.d.ts +0 -3
- package/types/hooks/useIdle.d.ts +0 -2
- package/types/hooks/useIntersection.d.ts +0 -3
- package/types/hooks/useIsomorphicLayoutEffect2.d.ts +0 -3
- package/types/hooks/useKey.d.ts +0 -12
- package/types/hooks/useKeyPress.d.ts +0 -3
- package/types/hooks/useKeyPressEvent.d.ts +0 -3
- package/types/hooks/useLatest.d.ts +0 -4
- package/types/hooks/useLifecycles.d.ts +0 -2
- package/types/hooks/useList.d.ts +0 -18
- package/types/hooks/useLocalStorage.d.ts +0 -10
- package/types/hooks/useLocation.d.ts +0 -16
- package/types/hooks/useLockBodyScroll.d.ts +0 -8
- package/types/hooks/useLogger.d.ts +0 -2
- package/types/hooks/useLongPress.d.ts +0 -12
- package/types/hooks/useMap.d.ts +0 -11
- package/types/hooks/useMeasure.d.ts +0 -9
- package/types/hooks/useMeasureDirty.d.ts +0 -11
- package/types/hooks/useMediaDevices.d.ts +0 -2
- package/types/hooks/useMediatedState.d.ts +0 -9
- package/types/hooks/useMethods.d.ts +0 -8
- package/types/hooks/useMotion.d.ts +0 -20
- package/types/hooks/useMount.d.ts +0 -2
- package/types/hooks/useMountedState.d.ts +0 -1
- package/types/hooks/useMouse.d.ts +0 -13
- package/types/hooks/useMouseHovered.d.ts +0 -8
- package/types/hooks/useMouseWheel.d.ts +0 -2
- package/types/hooks/useMultiStateValidator.d.ts +0 -9
- package/types/hooks/useNetworkState.d.ts +0 -22
- package/types/hooks/useNumber.d.ts +0 -2
- package/types/hooks/useObservable.d.ts +0 -8
- package/types/hooks/useOrientation.d.ts +0 -6
- package/types/hooks/usePageLeave.d.ts +0 -2
- package/types/hooks/usePermission.d.ts +0 -16
- package/types/hooks/usePinchZoom.d.ts +0 -18
- package/types/hooks/usePreviousDistinct.d.ts +0 -2
- package/types/hooks/usePromise.d.ts +0 -3
- package/types/hooks/useQueue.d.ts +0 -9
- package/types/hooks/useRaf.d.ts +0 -2
- package/types/hooks/useRafLoop.d.ts +0 -2
- package/types/hooks/useRafState.d.ts +0 -3
- package/types/hooks/useReactive.d.ts +0 -2
- package/types/hooks/useRendersCount.d.ts +0 -1
- package/types/hooks/useScroll.d.ts +0 -7
- package/types/hooks/useScrolling.d.ts +0 -3
- package/types/hooks/useSearchParam.d.ts +0 -3
- package/types/hooks/useSessionStorage.d.ts +0 -2
- package/types/hooks/useSet.d.ts +0 -11
- package/types/hooks/useSetState.d.ts +0 -2
- package/types/hooks/useSize.d.ts +0 -8
- package/types/hooks/useSlider.d.ts +0 -15
- package/types/hooks/useSpeech.d.ts +0 -16
- package/types/hooks/useStartTyping.d.ts +0 -2
- package/types/hooks/useStateList.d.ts +0 -9
- package/types/hooks/useStateValidator.d.ts +0 -8
- package/types/hooks/useStateWithHistory.d.ts +0 -18
- package/types/hooks/useSyncState.d.ts +0 -3
- package/types/hooks/useThrottle.d.ts +0 -2
- package/types/hooks/useThrottleFn.d.ts +0 -2
- package/types/hooks/useTimeout.d.ts +0 -2
- package/types/hooks/useTimeoutFn.d.ts +0 -2
- package/types/hooks/useTitle.d.ts +0 -6
- package/types/hooks/useToggle.d.ts +0 -2
- package/types/hooks/useTween.d.ts +0 -3
- package/types/hooks/useUnmount.d.ts +0 -2
- package/types/hooks/useUnmountPromise.d.ts +0 -3
- package/types/hooks/useUpdate.d.ts +0 -2
- package/types/hooks/useUpdateTimeout.d.ts +0 -2
- package/types/hooks/useUpsert.d.ts +0 -6
- package/types/hooks/useVibrate.d.ts +0 -4
- package/types/hooks/useVideo.d.ts +0 -11
- package/types/hooks/useWindowScroll.d.ts +0 -6
package/utils/reactDOM.js
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { Component as a } from "react";
|
|
2
|
-
import
|
|
2
|
+
import i from "react-dom";
|
|
3
3
|
import { isReact18 as _ } from "./is.js";
|
|
4
4
|
import R from "./warning.js";
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import "../chunk/BeM2hfks.js";
|
|
6
|
+
import O from "lodash/isFunction";
|
|
7
|
+
import p from "lodash/isPlainObject";
|
|
8
|
+
const d = "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED", f = i;
|
|
9
|
+
let e;
|
|
8
10
|
const s = (t) => {
|
|
9
|
-
|
|
11
|
+
p(f[d]) && (f[d].usingClientEntryPoint = t);
|
|
10
12
|
};
|
|
11
13
|
let u;
|
|
12
14
|
try {
|
|
13
15
|
u = f.createRoot;
|
|
14
16
|
} catch {
|
|
15
17
|
}
|
|
16
|
-
_ && u ?
|
|
18
|
+
_ && u ? e = (t, o) => {
|
|
17
19
|
s(!0);
|
|
18
20
|
const r = u(o);
|
|
19
21
|
return s(!1), r.render(t), r._unmount = function() {
|
|
@@ -22,7 +24,7 @@ _ && u ? i = (t, o) => {
|
|
|
22
24
|
(c = r == null ? void 0 : r.unmount) == null || c.call(r);
|
|
23
25
|
});
|
|
24
26
|
}, r;
|
|
25
|
-
} :
|
|
27
|
+
} : e = function(t, o) {
|
|
26
28
|
return f.render(t, o), {
|
|
27
29
|
render: (r) => {
|
|
28
30
|
f.render(r, o);
|
|
@@ -33,22 +35,22 @@ _ && u ? i = (t, o) => {
|
|
|
33
35
|
};
|
|
34
36
|
};
|
|
35
37
|
let n;
|
|
36
|
-
function
|
|
38
|
+
function N(t) {
|
|
37
39
|
const o = t.constructor;
|
|
38
40
|
if (typeof o != "function") return !1;
|
|
39
41
|
!n && typeof WeakSet == "function" && (n = /* @__PURE__ */ new WeakSet());
|
|
40
42
|
const r = !!(n != null && n.has(o));
|
|
41
43
|
return n == null || n.add(o), r;
|
|
42
44
|
}
|
|
43
|
-
const
|
|
44
|
-
_ && !
|
|
45
|
+
const T = (t, o) => t && t instanceof Element ? t : t && t.current && t.current instanceof Element ? t.current : t && O(t.getRootDOMNode) ? t.getRootDOMNode() : t instanceof a && i.findDOMNode ? i.findDOMNode(t) : o && (R(
|
|
46
|
+
_ && !N(o),
|
|
45
47
|
"Element does not define the `getRootDOMNode` method causing a call to React.findDOMNode. but findDOMNode is deprecated in StrictMode. Please check the code logic",
|
|
46
48
|
{ element: t, instance: o }
|
|
47
|
-
),
|
|
49
|
+
), i.findDOMNode) ? i.findDOMNode(o) : null, S = (t, o) => {
|
|
48
50
|
t && t.ref && (O(t.ref) && (t == null || t.ref(o)), "current" in t.ref && (t.ref.current = o));
|
|
49
|
-
},
|
|
51
|
+
}, L = e;
|
|
50
52
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
S as callbackOriginRef,
|
|
54
|
+
T as findDOMNode,
|
|
55
|
+
L as render
|
|
54
56
|
};
|
|
@@ -6,7 +6,7 @@ const c = [
|
|
|
6
6
|
"md",
|
|
7
7
|
"sm",
|
|
8
8
|
"xs"
|
|
9
|
-
],
|
|
9
|
+
], n = {
|
|
10
10
|
xs: "(max-width: 575px)",
|
|
11
11
|
sm: "(min-width: 576px)",
|
|
12
12
|
md: "(min-width: 768px)",
|
|
@@ -15,12 +15,12 @@ const c = [
|
|
|
15
15
|
xxl: "(min-width: 1600px)",
|
|
16
16
|
xxxl: "(min-width: 2000px)"
|
|
17
17
|
};
|
|
18
|
-
let i = [], a = -1,
|
|
18
|
+
let i = [], a = -1, r = {};
|
|
19
19
|
const d = {
|
|
20
20
|
matchHandlers: {},
|
|
21
21
|
dispatch(e, t) {
|
|
22
|
-
return
|
|
23
|
-
s.func(
|
|
22
|
+
return r = e, i.length < 1 ? !1 : (i.forEach((s) => {
|
|
23
|
+
s.func(r, t);
|
|
24
24
|
}), !0);
|
|
25
25
|
},
|
|
26
26
|
subscribe(e) {
|
|
@@ -29,37 +29,37 @@ const d = {
|
|
|
29
29
|
return i.push({
|
|
30
30
|
token: t,
|
|
31
31
|
func: e
|
|
32
|
-
}), e(
|
|
32
|
+
}), e(r, null), t;
|
|
33
33
|
},
|
|
34
34
|
unsubscribe(e) {
|
|
35
35
|
i = i.filter((t) => t.token !== e), i.length === 0 && this.unregister();
|
|
36
36
|
},
|
|
37
37
|
unregister() {
|
|
38
|
-
Object.keys(
|
|
39
|
-
const t =
|
|
38
|
+
Object.keys(n).forEach((e) => {
|
|
39
|
+
const t = n[e], s = this.matchHandlers[t];
|
|
40
40
|
s && s.mql && s.listener && s.mql.removeListener(s.listener);
|
|
41
41
|
});
|
|
42
42
|
},
|
|
43
43
|
register() {
|
|
44
|
-
Object.keys(
|
|
45
|
-
const t =
|
|
44
|
+
Object.keys(n).forEach((e) => {
|
|
45
|
+
const t = n[e], s = ({ matches: l }) => {
|
|
46
46
|
this.dispatch(
|
|
47
47
|
{
|
|
48
|
-
...
|
|
49
|
-
[e]:
|
|
48
|
+
...r,
|
|
49
|
+
[e]: l
|
|
50
50
|
},
|
|
51
51
|
e
|
|
52
52
|
);
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
mql:
|
|
53
|
+
}, h = window.matchMedia(t);
|
|
54
|
+
h.addEventListener("change", s), this.matchHandlers[t] = {
|
|
55
|
+
mql: h,
|
|
56
56
|
listener: s
|
|
57
|
-
}, s(
|
|
57
|
+
}, s(h);
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
export {
|
|
62
62
|
d as default,
|
|
63
63
|
c as responsiveArray,
|
|
64
|
-
|
|
64
|
+
n as responsiveMap
|
|
65
65
|
};
|
package/utils/saveAs.js
CHANGED
package/utils/scrollIntoView.js
CHANGED
package/chunk/BdYAMaw9.js
DELETED
package/chunk/CiZVOdJ3.js
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
let Q = (e) => typeof e == "object" && e != null && e.nodeType === 1, U = (e, t) => t && e === "hidden" ? !1 : e !== "visible" && e !== "clip", _ = (e) => {
|
|
2
|
-
if (!e.ownerDocument || !e.ownerDocument.defaultView)
|
|
3
|
-
return null;
|
|
4
|
-
try {
|
|
5
|
-
return e.ownerDocument.defaultView.frameElement;
|
|
6
|
-
} catch {
|
|
7
|
-
return null;
|
|
8
|
-
}
|
|
9
|
-
}, $ = (e) => {
|
|
10
|
-
let t = _(e);
|
|
11
|
-
return t ? t.clientHeight < e.scrollHeight || t.clientWidth < e.scrollWidth : !1;
|
|
12
|
-
}, F = (e, t) => {
|
|
13
|
-
if (e.clientHeight < e.scrollHeight || e.clientWidth < e.scrollWidth) {
|
|
14
|
-
let d = getComputedStyle(e, null);
|
|
15
|
-
return U(d.overflowY, t) || U(d.overflowX, t) || $(e);
|
|
16
|
-
}
|
|
17
|
-
return !1;
|
|
18
|
-
}, X = (e, t, d, u, m, l, o, c) => l < e && o > t || l > e && o < t ? 0 : l <= e && c <= d || o >= t && c >= d ? l - e - u : o > t && c < d || l < e && c > d ? o - t + m : 0, ee = (e) => e.parentElement ?? (e.getRootNode().host || null);
|
|
19
|
-
const Z = (e, t) => {
|
|
20
|
-
var d, u;
|
|
21
|
-
if (typeof document > "u")
|
|
22
|
-
return [];
|
|
23
|
-
let { scrollMode: m, block: l, inline: o, boundary: c, skipOverflowHiddenElements: Y } = t, p = typeof c == "function" ? c : (E) => E !== c;
|
|
24
|
-
if (!Q(e))
|
|
25
|
-
throw new TypeError("Invalid target");
|
|
26
|
-
let g = document.scrollingElement || document.documentElement, a = [], h = e;
|
|
27
|
-
for (; Q(h) && p(h); ) {
|
|
28
|
-
if (h = ee(h), h === g) {
|
|
29
|
-
a.push(h);
|
|
30
|
-
break;
|
|
31
|
-
}
|
|
32
|
-
h != null && h === document.body && F(h) && !F(document.documentElement) || h != null && F(h, Y) && a.push(h);
|
|
33
|
-
}
|
|
34
|
-
let w = ((d = window.visualViewport) == null ? void 0 : d.width) ?? innerWidth, b = ((u = window.visualViewport) == null ? void 0 : u.height) ?? innerHeight, v = window.scrollX ?? window.pageXOffset, y = window.scrollY ?? window.pageYOffset, {
|
|
35
|
-
height: W,
|
|
36
|
-
width: H,
|
|
37
|
-
top: M,
|
|
38
|
-
right: S,
|
|
39
|
-
bottom: N,
|
|
40
|
-
left: k
|
|
41
|
-
} = e.getBoundingClientRect(), s = l === "start" || l === "nearest" ? M : l === "end" ? N : M + W / 2, f = o === "center" ? k + H / 2 : o === "end" ? S : k, q = [];
|
|
42
|
-
for (let E = 0; E < a.length; E++) {
|
|
43
|
-
let n = a[E], { height: x, width: C, top: I, right: z, bottom: A, left: O } = n.getBoundingClientRect();
|
|
44
|
-
if (m === "if-needed" && M >= 0 && k >= 0 && N <= b && S <= w && M >= I && N <= A && k >= O && S <= z)
|
|
45
|
-
return q;
|
|
46
|
-
let T = getComputedStyle(n), j = parseInt(T.borderLeftWidth, 10), B = parseInt(T.borderTopWidth, 10), D = parseInt(T.borderRightWidth, 10), R = parseInt(T.borderBottomWidth, 10), i = 0, r = 0, V = "offsetWidth" in n ? n.offsetWidth - n.clientWidth - j - D : 0, L = "offsetHeight" in n ? n.offsetHeight - n.clientHeight - B - R : 0, G = "offsetWidth" in n ? n.offsetWidth === 0 ? 0 : C / n.offsetWidth : 0, J = "offsetHeight" in n ? n.offsetHeight === 0 ? 0 : x / n.offsetHeight : 0;
|
|
47
|
-
if (g === n)
|
|
48
|
-
l === "start" ? i = s : l === "end" ? i = s - b : l === "nearest" ? i = X(
|
|
49
|
-
y,
|
|
50
|
-
y + b,
|
|
51
|
-
b,
|
|
52
|
-
B,
|
|
53
|
-
R,
|
|
54
|
-
y + s,
|
|
55
|
-
y + s + W,
|
|
56
|
-
W
|
|
57
|
-
) : i = s - b / 2, o === "start" ? r = f : o === "center" ? r = f - w / 2 : o === "end" ? r = f - w : r = X(
|
|
58
|
-
v,
|
|
59
|
-
v + w,
|
|
60
|
-
w,
|
|
61
|
-
j,
|
|
62
|
-
D,
|
|
63
|
-
v + f,
|
|
64
|
-
v + f + H,
|
|
65
|
-
H
|
|
66
|
-
), i = Math.max(0, i + y), r = Math.max(0, r + v);
|
|
67
|
-
else {
|
|
68
|
-
l === "start" ? i = s - I - B : l === "end" ? i = s - A + R + L : l === "nearest" ? i = X(
|
|
69
|
-
I,
|
|
70
|
-
A,
|
|
71
|
-
x,
|
|
72
|
-
B,
|
|
73
|
-
R + L,
|
|
74
|
-
s,
|
|
75
|
-
s + W,
|
|
76
|
-
W
|
|
77
|
-
) : i = s - (I + x / 2) + L / 2, o === "start" ? r = f - O - j : o === "center" ? r = f - (O + C / 2) + V / 2 : o === "end" ? r = f - z + D + V : r = X(
|
|
78
|
-
O,
|
|
79
|
-
z,
|
|
80
|
-
C,
|
|
81
|
-
j,
|
|
82
|
-
D + V,
|
|
83
|
-
f,
|
|
84
|
-
f + H,
|
|
85
|
-
H
|
|
86
|
-
);
|
|
87
|
-
let { scrollLeft: K, scrollTop: P } = n;
|
|
88
|
-
i = Math.max(
|
|
89
|
-
0,
|
|
90
|
-
Math.min(
|
|
91
|
-
P + i / J,
|
|
92
|
-
n.scrollHeight - x / J + L
|
|
93
|
-
)
|
|
94
|
-
), r = Math.max(
|
|
95
|
-
0,
|
|
96
|
-
Math.min(
|
|
97
|
-
K + r / G,
|
|
98
|
-
n.scrollWidth - C / G + V
|
|
99
|
-
)
|
|
100
|
-
), s += P - i, f += K - r;
|
|
101
|
-
}
|
|
102
|
-
q.push({ el: n, top: i, left: r });
|
|
103
|
-
}
|
|
104
|
-
return q;
|
|
105
|
-
};
|
|
106
|
-
let te = (e) => e === Object(e) && Object.keys(e).length !== 0, ne = (e) => typeof e == "object" ? typeof e.behavior == "function" : !1, le = (e) => e === !1 ? { block: "end", inline: "nearest" } : te(e) ? e : { block: "start", inline: "nearest" };
|
|
107
|
-
function oe(e, t) {
|
|
108
|
-
var d, u, m;
|
|
109
|
-
let l = (e == null ? void 0 : e.isConnected) || ((m = (u = (d = e == null ? void 0 : e.ownerDocument) == null ? void 0 : d.documentElement) == null ? void 0 : u.contains) == null ? void 0 : m.call(u, e));
|
|
110
|
-
if (ne(t))
|
|
111
|
-
return t.behavior(l ? Z(e, t) : []);
|
|
112
|
-
if (!l)
|
|
113
|
-
return;
|
|
114
|
-
let o = le(t), c = Z(e, o), Y = "scrollBehavior" in document.body.style;
|
|
115
|
-
c.forEach(({ el: p, top: g, left: a }) => {
|
|
116
|
-
p.scroll && Y ? p.scroll({ top: g, left: a, behavior: o.behavior }) : (p.scrollTop = g, p.scrollLeft = a);
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
export {
|
|
120
|
-
Z as t,
|
|
121
|
-
oe as y
|
|
122
|
-
};
|
package/chunk/DdtfPvgk.js
DELETED
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
import { jsxs as it, jsx as O } from "react/jsx-runtime";
|
|
2
|
-
import { y as $t, t as At } from "./CiZVOdJ3.js";
|
|
3
|
-
import rt from "lodash/isFunction";
|
|
4
|
-
import Y from "lodash/isNumber";
|
|
5
|
-
import Tt from "lodash/throttle";
|
|
6
|
-
import Rt, { createContext as St, forwardRef as st, useContext as _, useRef as w, useImperativeHandle as ct, useEffect as b, isValidElement as vt, useState as Pt, useCallback as j } from "react";
|
|
7
|
-
import Et from "../Affix.js";
|
|
8
|
-
import { a as lt } from "./xPzFRQJn.js";
|
|
9
|
-
import Mt from "../hooks/useIsFirstRender.js";
|
|
10
|
-
import at from "../hooks/useMergeProps.js";
|
|
11
|
-
import Ot from "../hooks/useStateWithPromise.js";
|
|
12
|
-
import ft from "@unicom-cloud/utils/class-name";
|
|
13
|
-
import { on as bt, off as Ft } from "../utils/dom.js";
|
|
14
|
-
import { isWindow as ut } from "../utils/is.js";
|
|
15
|
-
import It from "lodash/isNull";
|
|
16
|
-
import Ut from "lodash/isPlainObject";
|
|
17
|
-
import G from "lodash/isString";
|
|
18
|
-
import jt from "lodash/isUndefined";
|
|
19
|
-
import { Tween as zt, quartOut as Ht } from "@unicom-cloud/utils/tween";
|
|
20
|
-
const mt = St({
|
|
21
|
-
direction: "vertical",
|
|
22
|
-
currentLink: "",
|
|
23
|
-
onLinkClick: () => {
|
|
24
|
-
},
|
|
25
|
-
addLink: () => {
|
|
26
|
-
},
|
|
27
|
-
removeLink: () => {
|
|
28
|
-
}
|
|
29
|
-
}), dt = "AnchorLink", Vt = {
|
|
30
|
-
href: "#"
|
|
31
|
-
};
|
|
32
|
-
function Bt(n) {
|
|
33
|
-
return Ut(n) && Object.prototype.hasOwnProperty.call(n, "displayName");
|
|
34
|
-
}
|
|
35
|
-
function Dt(n, i) {
|
|
36
|
-
const { getPrefixCls: c, componentConfig: s } = _(lt), { className: g, style: H, href: l, title: m, children: f, ...V } = at(
|
|
37
|
-
n,
|
|
38
|
-
Vt,
|
|
39
|
-
s == null ? void 0 : s["Anchor.Link"]
|
|
40
|
-
), C = _(mt), { currentLink: B, addLink: L, removeLink: $, onLinkClick: A, direction: F } = C, r = c("anchor-link"), T = ft(
|
|
41
|
-
r,
|
|
42
|
-
{
|
|
43
|
-
[`${r}-active`]: B === l
|
|
44
|
-
},
|
|
45
|
-
g
|
|
46
|
-
), R = w(null);
|
|
47
|
-
return ct(i, () => R.current, []), b(() => (L == null || L(l, R.current), () => {
|
|
48
|
-
$ == null || $(l);
|
|
49
|
-
}), [l]), /* @__PURE__ */ it("div", { className: T, style: H, ref: R, ...V, children: [
|
|
50
|
-
!jt(m) && !It(m) && /* @__PURE__ */ O(
|
|
51
|
-
"a",
|
|
52
|
-
{
|
|
53
|
-
className: `${r}-title`,
|
|
54
|
-
title: G(m) ? m : "",
|
|
55
|
-
href: l,
|
|
56
|
-
"data-href": l,
|
|
57
|
-
onClick: (o) => {
|
|
58
|
-
A == null || A(o, l);
|
|
59
|
-
},
|
|
60
|
-
children: m
|
|
61
|
-
}
|
|
62
|
-
),
|
|
63
|
-
f && F !== "horizontal" && Rt.Children.map(f, (o) => vt(o) && Bt(o.type) && o.type.displayName === dt && o)
|
|
64
|
-
] });
|
|
65
|
-
}
|
|
66
|
-
const pt = st(Dt);
|
|
67
|
-
pt.displayName = dt;
|
|
68
|
-
function z(n, i) {
|
|
69
|
-
const c = G(i) && i[0] === "#" ? `[id='${i.replace("#", "")}']` : i;
|
|
70
|
-
try {
|
|
71
|
-
return n.querySelector(c);
|
|
72
|
-
} catch (s) {
|
|
73
|
-
return console.error(s), null;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
function Wt(n, i, c) {
|
|
77
|
-
new zt({
|
|
78
|
-
from: {
|
|
79
|
-
scrollTop: n.scrollTop
|
|
80
|
-
},
|
|
81
|
-
to: {
|
|
82
|
-
scrollTop: i
|
|
83
|
-
},
|
|
84
|
-
easing: Ht,
|
|
85
|
-
duration: 300,
|
|
86
|
-
onUpdate: (g) => {
|
|
87
|
-
n.scrollTop = g.scrollTop;
|
|
88
|
-
},
|
|
89
|
-
onFinish: () => {
|
|
90
|
-
c == null || c();
|
|
91
|
-
}
|
|
92
|
-
}).start();
|
|
93
|
-
}
|
|
94
|
-
function ot(n) {
|
|
95
|
-
return G(n) ? z(document, n) : n || window;
|
|
96
|
-
}
|
|
97
|
-
function qt(n) {
|
|
98
|
-
return ut(n) ? document.documentElement || document.body : n;
|
|
99
|
-
}
|
|
100
|
-
const Yt = {
|
|
101
|
-
animation: !0,
|
|
102
|
-
affix: !0,
|
|
103
|
-
hash: !0,
|
|
104
|
-
boundary: "start"
|
|
105
|
-
};
|
|
106
|
-
function _t(n, i) {
|
|
107
|
-
const { getPrefixCls: c, componentConfig: s, rtl: g } = _(lt), H = at(
|
|
108
|
-
n,
|
|
109
|
-
Yt,
|
|
110
|
-
s == null ? void 0 : s.Anchor
|
|
111
|
-
), {
|
|
112
|
-
className: l,
|
|
113
|
-
style: m,
|
|
114
|
-
scrollContainer: f,
|
|
115
|
-
animation: V = !0,
|
|
116
|
-
lineless: C,
|
|
117
|
-
affix: B = !0,
|
|
118
|
-
affixStyle: L,
|
|
119
|
-
offsetBottom: $,
|
|
120
|
-
offsetTop: A,
|
|
121
|
-
hash: F = !0,
|
|
122
|
-
boundary: r = "start",
|
|
123
|
-
targetOffset: T,
|
|
124
|
-
children: R,
|
|
125
|
-
direction: o = "vertical",
|
|
126
|
-
onSelect: J,
|
|
127
|
-
onChange: D,
|
|
128
|
-
...gt
|
|
129
|
-
} = H, k = c("anchor"), Ct = ft(k, l, {
|
|
130
|
-
[`${k}-lineless`]: C,
|
|
131
|
-
[`${k}-rtl`]: g,
|
|
132
|
-
[`${k}-horizontal`]: o === "horizontal"
|
|
133
|
-
}), y = w(null), S = w(null), N = w(/* @__PURE__ */ new Map()), W = w(!1), v = w(null), [kt, K] = Pt(0), [u, yt] = Ot(""), Nt = Mt();
|
|
134
|
-
b(() => {
|
|
135
|
-
const t = ot(f);
|
|
136
|
-
v.current = t;
|
|
137
|
-
}, [f]);
|
|
138
|
-
const xt = j(() => ot(f), [f]);
|
|
139
|
-
ct(
|
|
140
|
-
i,
|
|
141
|
-
() => ({
|
|
142
|
-
dom: y.current,
|
|
143
|
-
getRootDOMNode: () => y.current
|
|
144
|
-
}),
|
|
145
|
-
[]
|
|
146
|
-
);
|
|
147
|
-
function Q(t, e) {
|
|
148
|
-
t && (N.current.set(t, e), K(Math.random()));
|
|
149
|
-
}
|
|
150
|
-
function wt(t) {
|
|
151
|
-
N.current.delete(t), K(Math.random());
|
|
152
|
-
}
|
|
153
|
-
const I = j(
|
|
154
|
-
(t) => {
|
|
155
|
-
if (!t || !y.current) return;
|
|
156
|
-
if (!N.current.has(t)) {
|
|
157
|
-
const d = z(y.current, `a[data-href='${t}']`);
|
|
158
|
-
d && Q(t, d);
|
|
159
|
-
}
|
|
160
|
-
const e = N.current.get(t);
|
|
161
|
-
e && t !== u && ($t(e, {
|
|
162
|
-
behavior: "instant",
|
|
163
|
-
block: "nearest",
|
|
164
|
-
scrollMode: "if-needed",
|
|
165
|
-
boundary: y.current
|
|
166
|
-
}), yt(t).then(() => {
|
|
167
|
-
rt(D) && D(t, u);
|
|
168
|
-
}));
|
|
169
|
-
},
|
|
170
|
-
[u, D]
|
|
171
|
-
), X = j(() => {
|
|
172
|
-
let t;
|
|
173
|
-
const e = Y(r) ? r : 0, d = v.current, E = qt(d).getBoundingClientRect(), U = document.documentElement.clientHeight;
|
|
174
|
-
return [...N.current.keys()].some((q) => {
|
|
175
|
-
const p = z(document, q);
|
|
176
|
-
let x = !1;
|
|
177
|
-
if (p) {
|
|
178
|
-
const { top: a, height: M } = p.getBoundingClientRect();
|
|
179
|
-
if (ut(d)) {
|
|
180
|
-
const h = T ?? U / 2;
|
|
181
|
-
x = a >= e && a <= h || a <= e && a + M >= h;
|
|
182
|
-
} else {
|
|
183
|
-
const h = a - E.top - e, nt = T ?? E.height / 2;
|
|
184
|
-
x = h >= 0 && h <= nt || h <= 0 && h + M >= nt;
|
|
185
|
-
}
|
|
186
|
-
x && (t = p);
|
|
187
|
-
}
|
|
188
|
-
return x;
|
|
189
|
-
}), t;
|
|
190
|
-
}, [r, T]), P = j(
|
|
191
|
-
Tt(
|
|
192
|
-
() => {
|
|
193
|
-
if (W.current) return;
|
|
194
|
-
const t = X();
|
|
195
|
-
if (t && t.id) {
|
|
196
|
-
const e = `#${t.id}`;
|
|
197
|
-
I(e);
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
|
-
30,
|
|
201
|
-
{ trailing: !0 }
|
|
202
|
-
),
|
|
203
|
-
[X, I]
|
|
204
|
-
);
|
|
205
|
-
function Z(t) {
|
|
206
|
-
if (t)
|
|
207
|
-
try {
|
|
208
|
-
const e = z(document, t);
|
|
209
|
-
if (!e) return;
|
|
210
|
-
const d = Y(r) ? "start" : r, et = Y(r) ? r : 0, E = At(e, { block: d });
|
|
211
|
-
if (!E.length) return;
|
|
212
|
-
let U = !1;
|
|
213
|
-
const q = E.map(({ el: p, top: x }) => new Promise((a) => {
|
|
214
|
-
if (!U) {
|
|
215
|
-
p === v.current && (U = !0);
|
|
216
|
-
const M = x - et;
|
|
217
|
-
return V ? Wt(p, M, a) : (F || (p.scrollTop = M), a(null));
|
|
218
|
-
}
|
|
219
|
-
a(null);
|
|
220
|
-
}));
|
|
221
|
-
W.current = !0, Promise.all(q).then(() => {
|
|
222
|
-
W.current = !1;
|
|
223
|
-
});
|
|
224
|
-
} catch (e) {
|
|
225
|
-
console.error(e);
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
function Lt(t, e) {
|
|
229
|
-
F || t.preventDefault(), I(e), Z(e), rt(J) && J(e, u);
|
|
230
|
-
}
|
|
231
|
-
b(() => {
|
|
232
|
-
const t = decodeURIComponent(location.hash);
|
|
233
|
-
t ? (I(t), Z(t)) : P();
|
|
234
|
-
}, []), b(() => (Nt || P(), bt(v.current, "scroll", P), () => {
|
|
235
|
-
Ft(v.current, "scroll", P);
|
|
236
|
-
}), [f, P]), b(() => {
|
|
237
|
-
const t = N.current.get(u);
|
|
238
|
-
t && !C && S.current && (o === "horizontal" ? (S.current.style.left = `${t.offsetLeft}px`, S.current.style.width = `${t.clientWidth}px`) : S.current.style.top = `${t.offsetTop}px`);
|
|
239
|
-
}, [u, C, o, g, kt]);
|
|
240
|
-
const tt = /* @__PURE__ */ it("div", { className: Ct, style: m, ref: y, ...gt, children: [
|
|
241
|
-
!C && u && /* @__PURE__ */ O("div", { className: `${k}-line-slider`, ref: S }),
|
|
242
|
-
/* @__PURE__ */ O(
|
|
243
|
-
mt.Provider,
|
|
244
|
-
{
|
|
245
|
-
value: {
|
|
246
|
-
direction: o,
|
|
247
|
-
currentLink: u,
|
|
248
|
-
addLink: Q,
|
|
249
|
-
removeLink: wt,
|
|
250
|
-
onLinkClick: Lt
|
|
251
|
-
},
|
|
252
|
-
children: /* @__PURE__ */ O("div", { className: `${k}-list`, children: R })
|
|
253
|
-
}
|
|
254
|
-
)
|
|
255
|
-
] });
|
|
256
|
-
return B ? /* @__PURE__ */ O(
|
|
257
|
-
Et,
|
|
258
|
-
{
|
|
259
|
-
offsetTop: A,
|
|
260
|
-
offsetBottom: $,
|
|
261
|
-
style: L,
|
|
262
|
-
target: xt,
|
|
263
|
-
children: tt
|
|
264
|
-
}
|
|
265
|
-
) : tt;
|
|
266
|
-
}
|
|
267
|
-
const Gt = st(_t), ht = Gt;
|
|
268
|
-
ht.displayName = "Anchor";
|
|
269
|
-
ht.Link = pt;
|
|
270
|
-
export {
|
|
271
|
-
ht as A
|
|
272
|
-
};
|
package/chunk/I4RV9SKZ.js
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import m, { useRef as D, useEffect as M } from "react";
|
|
2
|
-
import U from "../hooks/useSetState.js";
|
|
3
|
-
function v(a) {
|
|
4
|
-
const i = [];
|
|
5
|
-
for (let u = 0; u < a.length; u++)
|
|
6
|
-
i.push({
|
|
7
|
-
start: a.start(u),
|
|
8
|
-
end: a.end(u)
|
|
9
|
-
});
|
|
10
|
-
return i;
|
|
11
|
-
}
|
|
12
|
-
function w(a) {
|
|
13
|
-
return (i) => {
|
|
14
|
-
let u, n;
|
|
15
|
-
m.isValidElement(i) ? (u = i, n = u.props) : n = i;
|
|
16
|
-
const [f, s] = U({
|
|
17
|
-
buffered: [],
|
|
18
|
-
time: 0,
|
|
19
|
-
duration: 0,
|
|
20
|
-
paused: !0,
|
|
21
|
-
muted: !1,
|
|
22
|
-
volume: 1,
|
|
23
|
-
playing: !1
|
|
24
|
-
}), r = D(null), t = (e, o) => (l) => {
|
|
25
|
-
try {
|
|
26
|
-
o == null || o(l);
|
|
27
|
-
} finally {
|
|
28
|
-
e == null || e(l);
|
|
29
|
-
}
|
|
30
|
-
}, d = () => s({ paused: !1 }), p = () => s({ playing: !0 }), g = () => s({ playing: !1 }), h = () => s({ paused: !0, playing: !1 }), y = () => {
|
|
31
|
-
const e = r.current;
|
|
32
|
-
e && s({
|
|
33
|
-
muted: e.muted,
|
|
34
|
-
volume: e.volume
|
|
35
|
-
});
|
|
36
|
-
}, P = () => {
|
|
37
|
-
const e = r.current;
|
|
38
|
-
if (!e)
|
|
39
|
-
return;
|
|
40
|
-
const { duration: o, buffered: l } = e;
|
|
41
|
-
s({
|
|
42
|
-
duration: o,
|
|
43
|
-
buffered: v(l)
|
|
44
|
-
});
|
|
45
|
-
}, C = () => {
|
|
46
|
-
const e = r.current;
|
|
47
|
-
e && s({ time: e.currentTime });
|
|
48
|
-
}, T = () => {
|
|
49
|
-
const e = r.current;
|
|
50
|
-
e && s({ buffered: v(e.buffered) });
|
|
51
|
-
};
|
|
52
|
-
u ? u = m.cloneElement(u, {
|
|
53
|
-
controls: !1,
|
|
54
|
-
...n,
|
|
55
|
-
ref: r,
|
|
56
|
-
onPlay: t(n.onPlay, d),
|
|
57
|
-
onPlaying: t(n.onPlaying, p),
|
|
58
|
-
onWaiting: t(n.onWaiting, g),
|
|
59
|
-
onPause: t(n.onPause, h),
|
|
60
|
-
onVolumeChange: t(n.onVolumeChange, y),
|
|
61
|
-
onDurationChange: t(n.onDurationChange, P),
|
|
62
|
-
onTimeUpdate: t(n.onTimeUpdate, C),
|
|
63
|
-
onProgress: t(n.onProgress, T)
|
|
64
|
-
}) : u = m.createElement(a, {
|
|
65
|
-
controls: !1,
|
|
66
|
-
...n,
|
|
67
|
-
ref: r,
|
|
68
|
-
onPlay: t(n.onPlay, d),
|
|
69
|
-
onPlaying: t(n.onPlaying, p),
|
|
70
|
-
onWaiting: t(n.onWaiting, g),
|
|
71
|
-
onPause: t(n.onPause, h),
|
|
72
|
-
onVolumeChange: t(n.onVolumeChange, y),
|
|
73
|
-
onDurationChange: t(n.onDurationChange, P),
|
|
74
|
-
onTimeUpdate: t(n.onTimeUpdate, C),
|
|
75
|
-
onProgress: t(n.onProgress, T)
|
|
76
|
-
});
|
|
77
|
-
let c = !1;
|
|
78
|
-
const V = {
|
|
79
|
-
play: () => {
|
|
80
|
-
const e = r.current;
|
|
81
|
-
if (e && !c) {
|
|
82
|
-
const o = e.play();
|
|
83
|
-
if (typeof o == "object") {
|
|
84
|
-
c = !0;
|
|
85
|
-
const b = () => {
|
|
86
|
-
c = !1;
|
|
87
|
-
};
|
|
88
|
-
o.then(b, b);
|
|
89
|
-
}
|
|
90
|
-
return o;
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
pause: () => {
|
|
94
|
-
const e = r.current;
|
|
95
|
-
if (e && !c)
|
|
96
|
-
return e.pause();
|
|
97
|
-
},
|
|
98
|
-
seek: (e) => {
|
|
99
|
-
const o = r.current;
|
|
100
|
-
!o || f.duration === void 0 || (e = Math.min(f.duration, Math.max(0, e)), o.currentTime = e);
|
|
101
|
-
},
|
|
102
|
-
volume: (e) => {
|
|
103
|
-
const o = r.current;
|
|
104
|
-
o && (e = Math.min(1, Math.max(0, e)), o.volume = e, s({ volume: e }));
|
|
105
|
-
},
|
|
106
|
-
mute: () => {
|
|
107
|
-
const e = r.current;
|
|
108
|
-
e && (e.muted = !0);
|
|
109
|
-
},
|
|
110
|
-
unmute: () => {
|
|
111
|
-
const e = r.current;
|
|
112
|
-
e && (e.muted = !1);
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
return M(() => {
|
|
116
|
-
const e = r.current;
|
|
117
|
-
if (!e) {
|
|
118
|
-
process.env.NODE_ENV !== "production" && (a === "audio" ? console.error(
|
|
119
|
-
"useAudio() ref to <audio> element is empty at mount. It seem you have not rendered the audio element, which it returns as the first argument const [audio] = useAudio(...)."
|
|
120
|
-
) : a === "video" && console.error(
|
|
121
|
-
"useVideo() ref to <video> element is empty at mount. It seem you have not rendered the video element, which it returns as the first argument const [video] = useVideo(...)."
|
|
122
|
-
));
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
s({
|
|
126
|
-
volume: e.volume,
|
|
127
|
-
muted: e.muted,
|
|
128
|
-
paused: e.paused
|
|
129
|
-
}), n.autoPlay && e.paused && V.play();
|
|
130
|
-
}, [n.src]), [u, f, V, r];
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
export {
|
|
134
|
-
w as c
|
|
135
|
-
};
|