@glodon-aiot/agent-cli-ui 3.1.0-beta.15 → 3.2.1
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/dist/es/AgentClientUI.mjs +40 -39
- package/dist/es/Dialog/AgentChat/index.mjs +283 -264
- package/dist/es/Dialog/AgentChat/style.less.mjs +4 -0
- package/dist/es/Dialog/ConnectToNetwork/index.mjs +19 -18
- package/dist/es/Dialog/ConnectToNetwork/style.less.mjs +4 -0
- package/dist/es/Dialog/FileCard/index.mjs +22 -21
- package/dist/es/Dialog/FileCard/style.less.mjs +4 -0
- package/dist/es/Dialog/FilePreview/index.mjs +14 -13
- package/dist/es/Dialog/FilePreview/style.less.mjs +4 -0
- package/dist/es/Dialog/Greeting/index.mjs +5 -4
- package/dist/es/Dialog/Greeting/style.less.mjs +4 -0
- package/dist/es/Dialog/HistoryContent/index.mjs +6 -5
- package/dist/es/Dialog/HistoryContent/style.less.mjs +4 -0
- package/dist/es/Dialog/HistoryItem/index.mjs +127 -125
- package/dist/es/Dialog/HistoryItem/style.less.mjs +4 -0
- package/dist/es/Dialog/KnowledgeDoc/index.mjs +23 -22
- package/dist/es/Dialog/KnowledgeDoc/style.less.mjs +4 -0
- package/dist/es/Dialog/KnowledgeList/KnowledgeSelect/index.mjs +14 -13
- package/dist/es/Dialog/KnowledgeList/KnowledgeSelect/style.less.mjs +4 -0
- package/dist/es/Dialog/KnowledgeList/index.mjs +29 -28
- package/dist/es/Dialog/KnowledgeList/style.less.mjs +4 -0
- package/dist/es/Dialog/PromptManager/PromptList/PromptListItem.mjs +19 -19
- package/dist/es/Dialog/PromptManager/PromptList/PublicPromptList.mjs +17 -16
- package/dist/es/Dialog/PromptManager/PromptList/style.less.mjs +4 -0
- package/dist/es/Dialog/PromptManager/index.mjs +17 -16
- package/dist/es/Dialog/PromptManager/style.less.mjs +4 -0
- package/dist/es/Dialog/PromptSetting/index.mjs +32 -32
- package/dist/es/Dialog/PromptSetting/style.less.mjs +4 -0
- package/dist/es/Dialog/Recommend/RecommendItem.mjs +12 -11
- package/dist/es/Dialog/Recommend/index.mjs +23 -23
- package/dist/es/Dialog/Recommend/style.less.mjs +4 -0
- package/dist/es/Dialog/ReferCollapse/index.mjs +29 -28
- package/dist/es/Dialog/ReferCollapse/style.less.mjs +4 -0
- package/dist/es/Dialog/SearchReference/index.mjs +13 -12
- package/dist/es/Dialog/SearchReference/style.less.mjs +4 -0
- package/dist/es/Dialog/SessionAction/index.mjs +30 -29
- package/dist/es/Dialog/SessionAction/style.less.mjs +4 -0
- package/dist/es/Dialog/SessionList/index.mjs +51 -51
- package/dist/es/Dialog/SessionList/style.less.mjs +4 -0
- package/dist/es/Dialog/SessionListDrawer/HistorySessionList/NameEditPanel.mjs +11 -10
- package/dist/es/Dialog/SessionListDrawer/HistorySessionList/SessionItem.mjs +15 -14
- package/dist/es/Dialog/SessionListDrawer/HistorySessionList/index.mjs +48 -47
- package/dist/es/Dialog/SessionListDrawer/HistorySessionList/style.less.mjs +4 -0
- package/dist/es/Dialog/SessionListDrawer/index.mjs +9 -8
- package/dist/es/Dialog/SessionListDrawer/style.less.mjs +4 -0
- package/dist/es/Dialog/SessionRefer/ReferItem/index.mjs +26 -25
- package/dist/es/Dialog/SessionRefer/ReferItem/style.less.mjs +4 -0
- package/dist/es/Dialog/SessionRefer/index.mjs +21 -20
- package/dist/es/Dialog/SessionRefer/style.less.mjs +4 -0
- package/dist/es/Dialog/SessionRelated/index.mjs +18 -17
- package/dist/es/Dialog/SessionRelated/style.less.mjs +4 -0
- package/dist/es/Dialog/UploadKnowledgeFiles/ClearModal/index.mjs +9 -8
- package/dist/es/Dialog/UploadKnowledgeFiles/ClearModal/style.less.mjs +4 -0
- package/dist/es/Dialog/UploadKnowledgeFiles/index.mjs +117 -117
- package/dist/es/Dialog/UploadKnowledgeFiles/style.less.mjs +4 -0
- package/dist/es/Dialog/UploadingPrompt/index.mjs +6 -5
- package/dist/es/Dialog/UploadingPrompt/style.less.mjs +4 -0
- package/dist/es/Dialog/index.mjs +58 -57
- package/dist/es/Dialog/style.less.mjs +4 -0
- package/dist/es/FileItem/index.mjs +23 -22
- package/dist/es/FileItem/style.less.mjs +4 -0
- package/dist/es/Footer/FooterWarning.mjs +14 -13
- package/dist/es/Footer/index.mjs +7 -6
- package/dist/es/Footer/style.less.mjs +4 -0
- package/dist/es/InputProgress/index.mjs +10 -9
- package/dist/es/InputProgress/style.less.mjs +4 -0
- package/dist/es/QuillEditor/index.mjs +34 -34
- package/dist/es/QuillEditor/style.less.mjs +4 -0
- package/dist/es/_virtual/_cloneBuffer.mjs +4 -0
- package/dist/es/_virtual/_commonjsHelpers.mjs +8 -0
- package/dist/es/_virtual/_nodeUtil.mjs +4 -0
- package/dist/es/_virtual/index.mjs +4 -0
- package/dist/es/_virtual/isBuffer.mjs +4 -0
- package/dist/es/_virtual/jsx-runtime.mjs +7 -0
- package/dist/es/_virtual/jsx-runtime2.mjs +4 -0
- package/dist/es/_virtual/lib.mjs +4 -0
- package/dist/es/_virtual/react-jsx-runtime.production.min.mjs +4 -0
- package/dist/es/_virtual/ua-parser.min.mjs +4 -0
- package/dist/es/components/Copy/index.mjs +21 -20
- package/dist/es/components/Copy/style.less.mjs +4 -0
- package/dist/es/components/JsonDisplay/index.mjs +5 -4
- package/dist/es/components/JsonDisplay/style.less.mjs +4 -0
- package/dist/es/components/Markdown/ATag/index.mjs +7 -7
- package/dist/es/components/Markdown/Code/index.mjs +33 -33
- package/dist/es/components/Markdown/Image/index.mjs +17 -16
- package/dist/es/components/Markdown/Video/index.mjs +13 -13
- package/dist/es/components/Markdown/index.mjs +36 -35
- package/dist/es/components/Markdown/style.less.mjs +4 -0
- package/dist/es/components/WebLink/index.mjs +9 -9
- package/dist/es/favicon.ico +0 -0
- package/dist/es/favicon2.ico +0 -0
- package/dist/es/font/font_4108228_4w5nlhafpte.js +1 -0
- package/dist/es/font/font_4439177_0sppkcnqiqgs.js +1 -0
- package/dist/es/font/gos-font.js +64 -0
- package/dist/es/images/empty.svg +40 -0
- package/dist/es/images/loading.gif +0 -0
- package/dist/es/images/logo.png +0 -0
- package/dist/es/images/map-example.png +0 -0
- package/dist/es/images/sketch.png +0 -0
- package/dist/es/index.html +43 -0
- package/dist/es/index.mjs +32 -26
- package/dist/es/logo192.png +0 -0
- package/dist/es/logo512.png +0 -0
- package/dist/es/manifest.json +25 -0
- package/dist/es/node_modules/@babel/runtime/helpers/esm/extends.mjs +13 -0
- package/dist/es/node_modules/@react-spring/animated/dist/react-spring-animated.esm.mjs +201 -0
- package/dist/es/node_modules/@react-spring/core/dist/react-spring-core.esm.mjs +1087 -0
- package/dist/es/node_modules/@react-spring/rafz/dist/react-spring-rafz.esm.mjs +104 -0
- package/dist/es/node_modules/@react-spring/shared/dist/react-spring-shared.esm.mjs +568 -0
- package/dist/es/node_modules/@react-spring/web/dist/react-spring-web.esm.mjs +158 -0
- package/dist/es/node_modules/@use-gesture/core/dist/actions-fe213e88.esm.mjs +847 -0
- package/dist/es/node_modules/@use-gesture/core/dist/maths-0ab39ae9.esm.mjs +35 -0
- package/dist/es/node_modules/@use-gesture/core/dist/use-gesture-core.esm.mjs +226 -0
- package/dist/es/node_modules/@use-gesture/react/dist/use-gesture-react.esm.mjs +33 -0
- package/dist/es/node_modules/ahooks/es/useKeyPress/index.mjs +221 -0
- package/dist/es/node_modules/ahooks/es/useLatest/index.mjs +8 -0
- package/dist/es/node_modules/ahooks/es/useMemoizedFn/index.mjs +19 -0
- package/dist/es/node_modules/ahooks/es/useRafState/index.mjs +16 -0
- package/dist/es/node_modules/ahooks/es/useSize/index.mjs +34 -0
- package/dist/es/node_modules/ahooks/es/useUnmount/index.mjs +17 -0
- package/dist/es/node_modules/ahooks/es/useUnmountedRef/index.mjs +13 -0
- package/dist/es/node_modules/ahooks/es/utils/createEffectWithTarget.mjs +27 -0
- package/dist/es/node_modules/ahooks/es/utils/depsAreSame.mjs +11 -0
- package/dist/es/node_modules/ahooks/es/utils/depsEqual.mjs +7 -0
- package/dist/es/node_modules/ahooks/es/utils/domTarget.mjs +13 -0
- package/dist/es/node_modules/ahooks/es/utils/index.mjs +12 -0
- package/dist/es/node_modules/ahooks/es/utils/isAppleDevice.mjs +5 -0
- package/dist/es/node_modules/ahooks/es/utils/isBrowser.mjs +5 -0
- package/dist/es/node_modules/ahooks/es/utils/isDev.mjs +5 -0
- package/dist/es/node_modules/ahooks/es/utils/useDeepCompareWithTarget.mjs +11 -0
- package/dist/es/node_modules/ahooks/es/utils/useEffectWithTarget.mjs +7 -0
- package/dist/es/node_modules/ahooks/es/utils/useIsomorphicLayoutEffectWithTarget.mjs +8 -0
- package/dist/es/node_modules/ahooks/es/utils/useLayoutEffectWithTarget.mjs +7 -0
- package/dist/es/node_modules/antd/es/calendar/locale/zh_CN.mjs +4 -0
- package/dist/es/node_modules/antd/es/date-picker/locale/zh_CN.mjs +23 -0
- package/dist/es/node_modules/antd/es/locale/zh_CN.mjs +132 -0
- package/dist/es/node_modules/antd/es/time-picker/locale/zh_CN.mjs +8 -0
- package/dist/es/node_modules/antd-mobile/es/components/config-provider/config-provider.mjs +20 -0
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/image-viewer.css.mjs +4 -0
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/image-viewer.mjs +76 -0
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/index.mjs +14 -0
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/methods.mjs +34 -0
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/slide.mjs +172 -0
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/slides.mjs +81 -0
- package/dist/es/node_modules/antd-mobile/es/components/mask/index.mjs +5 -0
- package/dist/es/node_modules/antd-mobile/es/components/mask/mask.css.mjs +4 -0
- package/dist/es/node_modules/antd-mobile/es/components/mask/mask.mjs +84 -0
- package/dist/es/node_modules/antd-mobile/es/components/safe-area/index.mjs +5 -0
- package/dist/es/node_modules/antd-mobile/es/components/safe-area/safe-area.css.mjs +4 -0
- package/dist/es/node_modules/antd-mobile/es/components/safe-area/safe-area.mjs +9 -0
- package/dist/es/node_modules/antd-mobile/es/global/global.css.mjs +4 -0
- package/dist/es/node_modules/antd-mobile/es/global/index.mjs +4 -0
- package/dist/es/node_modules/antd-mobile/es/locales/zh-CN.mjs +141 -0
- package/dist/es/node_modules/antd-mobile/es/utils/attach-properties-to-component.mjs +9 -0
- package/dist/es/node_modules/antd-mobile/es/utils/bound.mjs +7 -0
- package/dist/es/node_modules/antd-mobile/es/utils/can-use-dom.mjs +4 -0
- package/dist/es/node_modules/antd-mobile/es/utils/convert-px.mjs +9 -0
- package/dist/es/node_modules/antd-mobile/es/utils/get-container.mjs +6 -0
- package/dist/es/node_modules/antd-mobile/es/utils/get-scroll-parent.mjs +22 -0
- package/dist/es/node_modules/antd-mobile/es/utils/matrix.mjs +11 -0
- package/dist/es/node_modules/antd-mobile/es/utils/native-props.mjs +12 -0
- package/dist/es/node_modules/antd-mobile/es/utils/render-imperatively.mjs +46 -0
- package/dist/es/node_modules/antd-mobile/es/utils/render-to-body.mjs +12 -0
- package/dist/es/node_modules/antd-mobile/es/utils/render-to-container.mjs +13 -0
- package/dist/es/node_modules/antd-mobile/es/utils/render.mjs +52 -0
- package/dist/es/node_modules/antd-mobile/es/utils/rubberband.mjs +11 -0
- package/dist/es/node_modules/antd-mobile/es/utils/should-render.mjs +10 -0
- package/dist/es/node_modules/antd-mobile/es/utils/supports-passive.mjs +15 -0
- package/dist/es/node_modules/antd-mobile/es/utils/use-drag-and-pinch.mjs +6 -0
- package/dist/es/node_modules/antd-mobile/es/utils/use-initialized.mjs +8 -0
- package/dist/es/node_modules/antd-mobile/es/utils/use-lock-scroll.mjs +54 -0
- package/dist/es/node_modules/antd-mobile/es/utils/use-touch.mjs +32 -0
- package/dist/es/node_modules/antd-mobile/es/utils/with-default-props.mjs +11 -0
- package/dist/es/node_modules/antd-mobile/es/utils/with-stop-propagation.mjs +19 -0
- package/dist/es/node_modules/classnames/index.mjs +42 -0
- package/dist/es/node_modules/comma-separated-tokens/index.mjs +13 -0
- package/dist/es/node_modules/copy-to-clipboard/index.mjs +46 -0
- package/dist/es/node_modules/devlop/lib/default.mjs +5 -0
- package/dist/es/node_modules/hast-util-from-dom/lib/index.mjs +93 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/hastscript/lib/create-h.mjs +126 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/hastscript/lib/index.mjs +8 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/hastscript/lib/svg-case-sensitive-tag-names.mjs +4 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/index.mjs +12 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/aria.mjs +61 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/find.mjs +33 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/html.mjs +368 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/normalize.mjs +6 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/svg.mjs +566 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/case-insensitive-transform.mjs +7 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/case-sensitive-transform.mjs +6 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/create.mjs +14 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/defined-info.mjs +36 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/info.mjs +28 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/merge.mjs +10 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/schema.mjs +21 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/types.mjs +15 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/xlink.mjs +19 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/xml.mjs +15 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/xmlns.mjs +16 -0
- package/dist/es/node_modules/hast-util-from-html-isomorphic/lib/browser.mjs +16 -0
- package/dist/es/node_modules/hast-util-is-element/lib/index.mjs +61 -0
- package/dist/es/node_modules/hast-util-parse-selector/lib/index.mjs +20 -0
- package/dist/es/node_modules/hast-util-to-text/lib/index.mjs +223 -0
- package/dist/es/node_modules/katex/dist/katex.min.css.mjs +4 -0
- package/dist/es/node_modules/katex/dist/katex.mjs +11700 -0
- package/dist/es/node_modules/lodash/_Hash.mjs +22 -0
- package/dist/es/node_modules/lodash/_ListCache.mjs +22 -0
- package/dist/es/node_modules/lodash/_Map.mjs +6 -0
- package/dist/es/node_modules/lodash/_MapCache.mjs +22 -0
- package/dist/es/node_modules/lodash/_Stack.mjs +20 -0
- package/dist/es/node_modules/lodash/_Symbol.mjs +5 -0
- package/dist/es/node_modules/lodash/_Uint8Array.mjs +5 -0
- package/dist/es/node_modules/lodash/_apply.mjs +17 -0
- package/dist/es/node_modules/lodash/_arrayLikeKeys.mjs +21 -0
- package/dist/es/node_modules/lodash/_assignMergeValue.mjs +10 -0
- package/dist/es/node_modules/lodash/_assignValue.mjs +11 -0
- package/dist/es/node_modules/lodash/_assocIndexOf.mjs +12 -0
- package/dist/es/node_modules/lodash/_baseAssignValue.mjs +14 -0
- package/dist/es/node_modules/lodash/_baseCreate.mjs +17 -0
- package/dist/es/node_modules/lodash/_baseFor.mjs +5 -0
- package/dist/es/node_modules/lodash/_baseGetTag.mjs +11 -0
- package/dist/es/node_modules/lodash/_baseIsArguments.mjs +10 -0
- package/dist/es/node_modules/lodash/_baseIsNative.mjs +15 -0
- package/dist/es/node_modules/lodash/_baseIsTypedArray.mjs +13 -0
- package/dist/es/node_modules/lodash/_baseKeysIn.mjs +16 -0
- package/dist/es/node_modules/lodash/_baseMerge.mjs +22 -0
- package/dist/es/node_modules/lodash/_baseMergeDeep.mjs +33 -0
- package/dist/es/node_modules/lodash/_baseRest.mjs +11 -0
- package/dist/es/node_modules/lodash/_baseSetToString.mjs +14 -0
- package/dist/es/node_modules/lodash/_baseTimes.mjs +9 -0
- package/dist/es/node_modules/lodash/_baseTrim.mjs +9 -0
- package/dist/es/node_modules/lodash/_baseUnary.mjs +9 -0
- package/dist/es/node_modules/lodash/_cloneArrayBuffer.mjs +10 -0
- package/dist/es/node_modules/lodash/_cloneBuffer.mjs +17 -0
- package/dist/es/node_modules/lodash/_cloneTypedArray.mjs +10 -0
- package/dist/es/node_modules/lodash/_copyArray.mjs +10 -0
- package/dist/es/node_modules/lodash/_copyObject.mjs +16 -0
- package/dist/es/node_modules/lodash/_coreJsData.mjs +5 -0
- package/dist/es/node_modules/lodash/_createAssigner.mjs +17 -0
- package/dist/es/node_modules/lodash/_createBaseFor.mjs +14 -0
- package/dist/es/node_modules/lodash/_defineProperty.mjs +11 -0
- package/dist/es/node_modules/lodash/_freeGlobal.mjs +5 -0
- package/dist/es/node_modules/lodash/_getMapData.mjs +10 -0
- package/dist/es/node_modules/lodash/_getNative.mjs +11 -0
- package/dist/es/node_modules/lodash/_getPrototype.mjs +5 -0
- package/dist/es/node_modules/lodash/_getRawTag.mjs +16 -0
- package/dist/es/node_modules/lodash/_getValue.mjs +7 -0
- package/dist/es/node_modules/lodash/_hashClear.mjs +9 -0
- package/dist/es/node_modules/lodash/_hashDelete.mjs +8 -0
- package/dist/es/node_modules/lodash/_hashGet.mjs +14 -0
- package/dist/es/node_modules/lodash/_hashHas.mjs +10 -0
- package/dist/es/node_modules/lodash/_hashSet.mjs +10 -0
- package/dist/es/node_modules/lodash/_initCloneObject.mjs +11 -0
- package/dist/es/node_modules/lodash/_isIndex.mjs +9 -0
- package/dist/es/node_modules/lodash/_isIterateeCall.mjs +15 -0
- package/dist/es/node_modules/lodash/_isKeyable.mjs +8 -0
- package/dist/es/node_modules/lodash/_isMasked.mjs +12 -0
- package/dist/es/node_modules/lodash/_isPrototype.mjs +9 -0
- package/dist/es/node_modules/lodash/_listCacheClear.mjs +7 -0
- package/dist/es/node_modules/lodash/_listCacheDelete.mjs +13 -0
- package/dist/es/node_modules/lodash/_listCacheGet.mjs +10 -0
- package/dist/es/node_modules/lodash/_listCacheHas.mjs +9 -0
- package/dist/es/node_modules/lodash/_listCacheSet.mjs +10 -0
- package/dist/es/node_modules/lodash/_mapCacheClear.mjs +15 -0
- package/dist/es/node_modules/lodash/_mapCacheDelete.mjs +10 -0
- package/dist/es/node_modules/lodash/_mapCacheGet.mjs +9 -0
- package/dist/es/node_modules/lodash/_mapCacheHas.mjs +9 -0
- package/dist/es/node_modules/lodash/_mapCacheSet.mjs +10 -0
- package/dist/es/node_modules/lodash/_nativeCreate.mjs +5 -0
- package/dist/es/node_modules/lodash/_nativeKeysIn.mjs +11 -0
- package/dist/es/node_modules/lodash/_nodeUtil.mjs +17 -0
- package/dist/es/node_modules/lodash/_objectToString.mjs +8 -0
- package/dist/es/node_modules/lodash/_overArg.mjs +9 -0
- package/dist/es/node_modules/lodash/_overRest.mjs +16 -0
- package/dist/es/node_modules/lodash/_root.mjs +5 -0
- package/dist/es/node_modules/lodash/_safeGet.mjs +8 -0
- package/dist/es/node_modules/lodash/_setToString.mjs +6 -0
- package/dist/es/node_modules/lodash/_shortOut.mjs +17 -0
- package/dist/es/node_modules/lodash/_stackClear.mjs +9 -0
- package/dist/es/node_modules/lodash/_stackDelete.mjs +8 -0
- package/dist/es/node_modules/lodash/_stackGet.mjs +7 -0
- package/dist/es/node_modules/lodash/_stackHas.mjs +7 -0
- package/dist/es/node_modules/lodash/_stackSet.mjs +18 -0
- package/dist/es/node_modules/lodash/_toSource.mjs +18 -0
- package/dist/es/node_modules/lodash/_trimmedEndIndex.mjs +10 -0
- package/dist/es/node_modules/lodash/constant.mjs +9 -0
- package/dist/es/node_modules/lodash/debounce.mjs +57 -0
- package/dist/es/node_modules/lodash/eq.mjs +7 -0
- package/dist/es/node_modules/lodash/identity.mjs +7 -0
- package/dist/es/node_modules/lodash/isArguments.mjs +10 -0
- package/dist/es/node_modules/lodash/isArray.mjs +4 -0
- package/dist/es/node_modules/lodash/isArrayLike.mjs +10 -0
- package/dist/es/node_modules/lodash/isArrayLikeObject.mjs +10 -0
- package/dist/es/node_modules/lodash/isBuffer.mjs +12 -0
- package/dist/es/node_modules/lodash/isFunction.mjs +13 -0
- package/dist/es/node_modules/lodash/isLength.mjs +8 -0
- package/dist/es/node_modules/lodash/isObject.mjs +8 -0
- package/dist/es/node_modules/lodash/isObjectLike.mjs +7 -0
- package/dist/es/node_modules/lodash/isPlainObject.mjs +17 -0
- package/dist/es/node_modules/lodash/isSymbol.mjs +10 -0
- package/dist/es/node_modules/lodash/isTypedArray.mjs +7 -0
- package/dist/es/node_modules/lodash/keysIn.mjs +11 -0
- package/dist/es/node_modules/lodash/merge.mjs +10 -0
- package/dist/es/node_modules/lodash/now.mjs +7 -0
- package/dist/es/node_modules/lodash/stubFalse.mjs +7 -0
- package/dist/es/node_modules/lodash/toNumber.mjs +23 -0
- package/dist/es/node_modules/lodash/toPlainObject.mjs +10 -0
- package/dist/es/node_modules/longest-streak/index.mjs +12 -0
- package/dist/es/node_modules/mdast-util-math/lib/index.mjs +170 -0
- package/dist/es/node_modules/micromark-extension-math/lib/math-flow.mjs +76 -0
- package/dist/es/node_modules/micromark-extension-math/lib/math-text.mjs +48 -0
- package/dist/es/node_modules/micromark-extension-math/lib/syntax.mjs +15 -0
- package/dist/es/node_modules/micromark-factory-space/index.mjs +15 -0
- package/dist/es/node_modules/micromark-util-character/index.mjs +10 -0
- package/dist/es/node_modules/object-assign/index.mjs +34 -0
- package/dist/es/node_modules/rc-pagination/es/locale/zh_CN.mjs +18 -0
- package/dist/es/node_modules/rc-picker/es/locale/zh_CN.mjs +31 -0
- package/dist/es/node_modules/react/cjs/react-jsx-runtime.production.min.mjs +45 -0
- package/dist/es/node_modules/react/jsx-runtime.mjs +8 -0
- package/dist/es/node_modules/react-device-detect/dist/lib.mjs +723 -0
- package/dist/es/node_modules/react-fast-compare/index.mjs +78 -0
- package/dist/es/node_modules/react-infinite-scroll-component/dist/index.es.mjs +188 -0
- package/dist/es/node_modules/react-quill/dist/quill.snow.css.mjs +4 -0
- package/dist/es/node_modules/rehype-katex/lib/index.mjs +83 -0
- package/dist/es/node_modules/remark-math/lib/index.mjs +13 -0
- package/dist/es/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.mjs +294 -0
- package/dist/es/node_modules/space-separated-tokens/index.mjs +7 -0
- package/dist/es/node_modules/toggle-selection/index.mjs +25 -0
- package/dist/es/node_modules/tslib/tslib.es6.mjs +64 -0
- package/dist/es/node_modules/ua-parser-js/dist/ua-parser.min.mjs +120 -0
- package/dist/es/node_modules/unist-util-find-after/lib/index.mjs +32 -0
- package/dist/es/node_modules/unist-util-is/lib/index.mjs +81 -0
- package/dist/es/node_modules/unist-util-visit-parents/lib/color.mjs +6 -0
- package/dist/es/node_modules/unist-util-visit-parents/lib/index.mjs +56 -0
- package/dist/es/node_modules/web-namespaces/index.mjs +11 -0
- package/dist/es/packages/agent-cli-ui/node_modules/uuid/dist/esm-browser/native.mjs +4 -0
- package/dist/es/packages/agent-cli-ui/node_modules/uuid/dist/esm-browser/rng.mjs +13 -0
- package/dist/es/packages/agent-cli-ui/node_modules/uuid/dist/esm-browser/stringify.mjs +9 -0
- package/dist/es/packages/agent-cli-ui/node_modules/uuid/dist/esm-browser/v4.mjs +23 -0
- package/dist/es/robots.txt +3 -0
- package/dist/es/style.less.mjs +4 -0
- package/dist/lib/favicon.ico +0 -0
- package/dist/lib/favicon2.ico +0 -0
- package/dist/lib/font/font_4108228_4w5nlhafpte.js +1 -0
- package/dist/lib/font/font_4439177_0sppkcnqiqgs.js +1 -0
- package/dist/lib/font/gos-font.js +64 -0
- package/dist/lib/images/empty.svg +40 -0
- package/dist/lib/images/loading.gif +0 -0
- package/dist/lib/images/logo.png +0 -0
- package/dist/lib/images/map-example.png +0 -0
- package/dist/lib/images/sketch.png +0 -0
- package/dist/lib/index.html +43 -0
- package/dist/lib/index.js +311 -5
- package/dist/lib/logo192.png +0 -0
- package/dist/lib/logo512.png +0 -0
- package/dist/lib/manifest.json +25 -0
- package/dist/lib/robots.txt +3 -0
- package/dist/src/Dialog/HistoryItem/index.d.ts +1 -0
- package/dist/src/types.d.ts +1 -1
- package/package.json +6 -24
- package/dist/es/src/style.css +0 -1
- package/dist/es/src/style10.css +0 -1
- package/dist/es/src/style11.css +0 -1
- package/dist/es/src/style12.css +0 -1
- package/dist/es/src/style13.css +0 -1
- package/dist/es/src/style14.css +0 -1
- package/dist/es/src/style15.css +0 -1
- package/dist/es/src/style16.css +0 -1
- package/dist/es/src/style17.css +0 -1
- package/dist/es/src/style18.css +0 -1
- package/dist/es/src/style19.css +0 -1
- package/dist/es/src/style2.css +0 -1
- package/dist/es/src/style20.css +0 -1
- package/dist/es/src/style21.css +0 -0
- package/dist/es/src/style22.css +0 -1
- package/dist/es/src/style23.css +0 -1
- package/dist/es/src/style24.css +0 -1
- package/dist/es/src/style25.css +0 -1
- package/dist/es/src/style26.css +0 -1
- package/dist/es/src/style27.css +0 -1
- package/dist/es/src/style28.css +0 -1
- package/dist/es/src/style29.css +0 -1
- package/dist/es/src/style3.css +0 -1
- package/dist/es/src/style30.css +0 -1
- package/dist/es/src/style31.css +0 -1
- package/dist/es/src/style32.css +0 -1
- package/dist/es/src/style33.css +0 -1
- package/dist/es/src/style4.css +0 -1
- package/dist/es/src/style5.css +0 -1
- package/dist/es/src/style6.css +0 -1
- package/dist/es/src/style7.css +0 -1
- package/dist/es/src/style8.css +0 -1
- package/dist/es/src/style9.css +0 -1
- package/dist/lib/index.css +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useRef as f } from "react";
|
|
2
|
+
import u from "./useEffectWithTarget.mjs";
|
|
3
|
+
import { depsEqual as c } from "./depsEqual.mjs";
|
|
4
|
+
var i = function(a, e, o) {
|
|
5
|
+
var r = f(), t = f(0);
|
|
6
|
+
c(e, r.current) || (r.current = e, t.current += 1), u(a, [t.current], o);
|
|
7
|
+
};
|
|
8
|
+
const s = i;
|
|
9
|
+
export {
|
|
10
|
+
s as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import e from "../../../../@babel/runtime/helpers/esm/extends.mjs";
|
|
2
|
+
import a from "../../../../rc-picker/es/locale/zh_CN.mjs";
|
|
3
|
+
import l from "../../time-picker/locale/zh_CN.mjs";
|
|
4
|
+
var r = {
|
|
5
|
+
lang: e({
|
|
6
|
+
placeholder: "请选择日期",
|
|
7
|
+
yearPlaceholder: "请选择年份",
|
|
8
|
+
quarterPlaceholder: "请选择季度",
|
|
9
|
+
monthPlaceholder: "请选择月份",
|
|
10
|
+
weekPlaceholder: "请选择周",
|
|
11
|
+
rangePlaceholder: ["开始日期", "结束日期"],
|
|
12
|
+
rangeYearPlaceholder: ["开始年份", "结束年份"],
|
|
13
|
+
rangeMonthPlaceholder: ["开始月份", "结束月份"],
|
|
14
|
+
rangeQuarterPlaceholder: ["开始季度", "结束季度"],
|
|
15
|
+
rangeWeekPlaceholder: ["开始周", "结束周"]
|
|
16
|
+
}, a),
|
|
17
|
+
timePickerLocale: e({}, l)
|
|
18
|
+
};
|
|
19
|
+
r.lang.ok = "确定";
|
|
20
|
+
const d = r;
|
|
21
|
+
export {
|
|
22
|
+
d as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import a from "../../../rc-pagination/es/locale/zh_CN.mjs";
|
|
2
|
+
import l from "../date-picker/locale/zh_CN.mjs";
|
|
3
|
+
import t from "../time-picker/locale/zh_CN.mjs";
|
|
4
|
+
var e = "${label}不是一个有效的${type}", r = {
|
|
5
|
+
locale: "zh-cn",
|
|
6
|
+
Pagination: a,
|
|
7
|
+
DatePicker: l,
|
|
8
|
+
TimePicker: t,
|
|
9
|
+
Calendar: l,
|
|
10
|
+
// locales for all components
|
|
11
|
+
global: {
|
|
12
|
+
placeholder: "请选择"
|
|
13
|
+
},
|
|
14
|
+
Table: {
|
|
15
|
+
filterTitle: "筛选",
|
|
16
|
+
filterConfirm: "确定",
|
|
17
|
+
filterReset: "重置",
|
|
18
|
+
filterEmptyText: "无筛选项",
|
|
19
|
+
filterCheckall: "全选",
|
|
20
|
+
filterSearchPlaceholder: "在筛选项中搜索",
|
|
21
|
+
selectAll: "全选当页",
|
|
22
|
+
selectInvert: "反选当页",
|
|
23
|
+
selectNone: "清空所有",
|
|
24
|
+
selectionAll: "全选所有",
|
|
25
|
+
sortTitle: "排序",
|
|
26
|
+
expand: "展开行",
|
|
27
|
+
collapse: "关闭行",
|
|
28
|
+
triggerDesc: "点击降序",
|
|
29
|
+
triggerAsc: "点击升序",
|
|
30
|
+
cancelSort: "取消排序"
|
|
31
|
+
},
|
|
32
|
+
Modal: {
|
|
33
|
+
okText: "确定",
|
|
34
|
+
cancelText: "取消",
|
|
35
|
+
justOkText: "知道了"
|
|
36
|
+
},
|
|
37
|
+
Popconfirm: {
|
|
38
|
+
cancelText: "取消",
|
|
39
|
+
okText: "确定"
|
|
40
|
+
},
|
|
41
|
+
Transfer: {
|
|
42
|
+
titles: ["", ""],
|
|
43
|
+
searchPlaceholder: "请输入搜索内容",
|
|
44
|
+
itemUnit: "项",
|
|
45
|
+
itemsUnit: "项",
|
|
46
|
+
remove: "删除",
|
|
47
|
+
selectCurrent: "全选当页",
|
|
48
|
+
removeCurrent: "删除当页",
|
|
49
|
+
selectAll: "全选所有",
|
|
50
|
+
removeAll: "删除全部",
|
|
51
|
+
selectInvert: "反选当页"
|
|
52
|
+
},
|
|
53
|
+
Upload: {
|
|
54
|
+
uploading: "文件上传中",
|
|
55
|
+
removeFile: "删除文件",
|
|
56
|
+
uploadError: "上传错误",
|
|
57
|
+
previewFile: "预览文件",
|
|
58
|
+
downloadFile: "下载文件"
|
|
59
|
+
},
|
|
60
|
+
Empty: {
|
|
61
|
+
description: "暂无数据"
|
|
62
|
+
},
|
|
63
|
+
Icon: {
|
|
64
|
+
icon: "图标"
|
|
65
|
+
},
|
|
66
|
+
Text: {
|
|
67
|
+
edit: "编辑",
|
|
68
|
+
copy: "复制",
|
|
69
|
+
copied: "复制成功",
|
|
70
|
+
expand: "展开"
|
|
71
|
+
},
|
|
72
|
+
PageHeader: {
|
|
73
|
+
back: "返回"
|
|
74
|
+
},
|
|
75
|
+
Form: {
|
|
76
|
+
optional: "(可选)",
|
|
77
|
+
defaultValidateMessages: {
|
|
78
|
+
default: "字段验证错误${label}",
|
|
79
|
+
required: "请输入${label}",
|
|
80
|
+
enum: "${label}必须是其中一个[${enum}]",
|
|
81
|
+
whitespace: "${label}不能为空字符",
|
|
82
|
+
date: {
|
|
83
|
+
format: "${label}日期格式无效",
|
|
84
|
+
parse: "${label}不能转换为日期",
|
|
85
|
+
invalid: "${label}是一个无效日期"
|
|
86
|
+
},
|
|
87
|
+
types: {
|
|
88
|
+
string: e,
|
|
89
|
+
method: e,
|
|
90
|
+
array: e,
|
|
91
|
+
object: e,
|
|
92
|
+
number: e,
|
|
93
|
+
date: e,
|
|
94
|
+
boolean: e,
|
|
95
|
+
integer: e,
|
|
96
|
+
float: e,
|
|
97
|
+
regexp: e,
|
|
98
|
+
email: e,
|
|
99
|
+
url: e,
|
|
100
|
+
hex: e
|
|
101
|
+
},
|
|
102
|
+
string: {
|
|
103
|
+
len: "${label}须为${len}个字符",
|
|
104
|
+
min: "${label}最少${min}个字符",
|
|
105
|
+
max: "${label}最多${max}个字符",
|
|
106
|
+
range: "${label}须在${min}-${max}字符之间"
|
|
107
|
+
},
|
|
108
|
+
number: {
|
|
109
|
+
len: "${label}必须等于${len}",
|
|
110
|
+
min: "${label}最小值为${min}",
|
|
111
|
+
max: "${label}最大值为${max}",
|
|
112
|
+
range: "${label}须在${min}-${max}之间"
|
|
113
|
+
},
|
|
114
|
+
array: {
|
|
115
|
+
len: "须为${len}个${label}",
|
|
116
|
+
min: "最少${min}个${label}",
|
|
117
|
+
max: "最多${max}个${label}",
|
|
118
|
+
range: "${label}数量须在${min}-${max}之间"
|
|
119
|
+
},
|
|
120
|
+
pattern: {
|
|
121
|
+
mismatch: "${label}与模式不匹配${pattern}"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
Image: {
|
|
126
|
+
preview: "预览"
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
const m = r;
|
|
130
|
+
export {
|
|
131
|
+
m as default
|
|
132
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import e, { useContext as n } from "react";
|
|
2
|
+
import o from "../../locales/zh-CN.mjs";
|
|
3
|
+
const r = {
|
|
4
|
+
current: {
|
|
5
|
+
locale: o
|
|
6
|
+
}
|
|
7
|
+
};
|
|
8
|
+
function u() {
|
|
9
|
+
return r.current;
|
|
10
|
+
}
|
|
11
|
+
const f = e.createContext(null);
|
|
12
|
+
function l() {
|
|
13
|
+
var t;
|
|
14
|
+
return (t = n(f)) !== null && t !== void 0 ? t : u();
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
r as defaultConfigRef,
|
|
18
|
+
u as getDefaultConfig,
|
|
19
|
+
l as useConfig
|
|
20
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import a, { forwardRef as _, useState as y, useRef as I, useImperativeHandle as S, useCallback as h } from "react";
|
|
2
|
+
import { mergeProps as f } from "../../utils/with-default-props.mjs";
|
|
3
|
+
import { renderToContainer as p } from "../../utils/render-to-container.mjs";
|
|
4
|
+
import "../mask/mask.css.mjs";
|
|
5
|
+
import { Mask as g } from "../mask/mask.mjs";
|
|
6
|
+
import "../safe-area/safe-area.css.mjs";
|
|
7
|
+
import { SafeArea as C } from "../safe-area/safe-area.mjs";
|
|
8
|
+
import { Slide as k } from "./slide.mjs";
|
|
9
|
+
import { Slides as T } from "./slides.mjs";
|
|
10
|
+
import b from "../../../../classnames/index.mjs";
|
|
11
|
+
const m = "adm-image-viewer", x = {
|
|
12
|
+
maxZoom: 3,
|
|
13
|
+
getContainer: null,
|
|
14
|
+
visible: !1
|
|
15
|
+
}, A = (d) => {
|
|
16
|
+
var i, t, l;
|
|
17
|
+
const o = f(x, d), e = a.createElement(g, {
|
|
18
|
+
visible: o.visible,
|
|
19
|
+
disableBodyScroll: !1,
|
|
20
|
+
opacity: "thick",
|
|
21
|
+
afterClose: o.afterClose,
|
|
22
|
+
destroyOnClose: !0,
|
|
23
|
+
className: (i = o == null ? void 0 : o.classNames) === null || i === void 0 ? void 0 : i.mask
|
|
24
|
+
}, a.createElement("div", {
|
|
25
|
+
className: b(`${m}-content`, (t = o == null ? void 0 : o.classNames) === null || t === void 0 ? void 0 : t.body)
|
|
26
|
+
}, o.image && a.createElement(k, {
|
|
27
|
+
image: o.image,
|
|
28
|
+
onTap: o.onClose,
|
|
29
|
+
maxZoom: o.maxZoom
|
|
30
|
+
})), o.image && a.createElement("div", {
|
|
31
|
+
className: `${m}-footer`
|
|
32
|
+
}, (l = o.renderFooter) === null || l === void 0 ? void 0 : l.call(o, o.image), a.createElement(C, {
|
|
33
|
+
position: "bottom"
|
|
34
|
+
})));
|
|
35
|
+
return p(o.getContainer, e);
|
|
36
|
+
}, Z = Object.assign(Object.assign({}, x), {
|
|
37
|
+
defaultIndex: 0
|
|
38
|
+
}), D = _((d, i) => {
|
|
39
|
+
var t, l, o;
|
|
40
|
+
const e = f(Z, d), [r, v] = y(e.defaultIndex), u = I(null);
|
|
41
|
+
S(i, () => ({
|
|
42
|
+
swipeTo: (s, n) => {
|
|
43
|
+
var c;
|
|
44
|
+
v(s), (c = u.current) === null || c === void 0 || c.swipeTo(s, n);
|
|
45
|
+
}
|
|
46
|
+
}));
|
|
47
|
+
const N = h((s) => {
|
|
48
|
+
var n;
|
|
49
|
+
s !== r && (v(s), (n = e.onIndexChange) === null || n === void 0 || n.call(e, s));
|
|
50
|
+
}, [e.onIndexChange, r]), E = a.createElement(g, {
|
|
51
|
+
visible: e.visible,
|
|
52
|
+
disableBodyScroll: !1,
|
|
53
|
+
opacity: "thick",
|
|
54
|
+
afterClose: e.afterClose,
|
|
55
|
+
destroyOnClose: !0,
|
|
56
|
+
className: (t = e == null ? void 0 : e.classNames) === null || t === void 0 ? void 0 : t.mask
|
|
57
|
+
}, a.createElement("div", {
|
|
58
|
+
className: b(`${m}-content`, (l = e == null ? void 0 : e.classNames) === null || l === void 0 ? void 0 : l.body)
|
|
59
|
+
}, e.images && a.createElement(T, {
|
|
60
|
+
ref: u,
|
|
61
|
+
defaultIndex: r,
|
|
62
|
+
onIndexChange: N,
|
|
63
|
+
images: e.images,
|
|
64
|
+
onTap: e.onClose,
|
|
65
|
+
maxZoom: e.maxZoom
|
|
66
|
+
})), e.images && a.createElement("div", {
|
|
67
|
+
className: `${m}-footer`
|
|
68
|
+
}, (o = e.renderFooter) === null || o === void 0 ? void 0 : o.call(e, e.images[r], r), a.createElement(C, {
|
|
69
|
+
position: "bottom"
|
|
70
|
+
})));
|
|
71
|
+
return p(e.getContainer, E);
|
|
72
|
+
});
|
|
73
|
+
export {
|
|
74
|
+
A as ImageViewer,
|
|
75
|
+
D as MultiImageViewer
|
|
76
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "./image-viewer.css.mjs";
|
|
2
|
+
import { attachPropertiesToComponent as e } from "../../utils/attach-properties-to-component.mjs";
|
|
3
|
+
import { ImageViewer as r, MultiImageViewer as o } from "./image-viewer.mjs";
|
|
4
|
+
import { showImageViewer as i, clearImageViewer as m, showMultiImageViewer as t } from "./methods.mjs";
|
|
5
|
+
const a = e(o, {
|
|
6
|
+
show: t
|
|
7
|
+
}), I = e(r, {
|
|
8
|
+
Multi: a,
|
|
9
|
+
show: i,
|
|
10
|
+
clear: m
|
|
11
|
+
});
|
|
12
|
+
export {
|
|
13
|
+
I as default
|
|
14
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import l from "react";
|
|
2
|
+
import { ImageViewer as i, MultiImageViewer as c } from "./image-viewer.mjs";
|
|
3
|
+
import { renderImperatively as n } from "../../utils/render-imperatively.mjs";
|
|
4
|
+
const r = /* @__PURE__ */ new Set();
|
|
5
|
+
function s(e) {
|
|
6
|
+
o();
|
|
7
|
+
const t = n(l.createElement(i, Object.assign({}, e, {
|
|
8
|
+
afterClose: () => {
|
|
9
|
+
var a;
|
|
10
|
+
r.delete(t), (a = e.afterClose) === null || a === void 0 || a.call(e);
|
|
11
|
+
}
|
|
12
|
+
})));
|
|
13
|
+
return r.add(t), t;
|
|
14
|
+
}
|
|
15
|
+
function u(e) {
|
|
16
|
+
o();
|
|
17
|
+
const t = n(l.createElement(c, Object.assign({}, e, {
|
|
18
|
+
afterClose: () => {
|
|
19
|
+
var a;
|
|
20
|
+
r.delete(t), (a = e.afterClose) === null || a === void 0 || a.call(e);
|
|
21
|
+
}
|
|
22
|
+
})));
|
|
23
|
+
return r.add(t), t;
|
|
24
|
+
}
|
|
25
|
+
function o() {
|
|
26
|
+
r.forEach((e) => {
|
|
27
|
+
e.close();
|
|
28
|
+
}), r.clear();
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
o as clearImageViewer,
|
|
32
|
+
s as showImageViewer,
|
|
33
|
+
u as showMultiImageViewer
|
|
34
|
+
};
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import y, { useRef as R } from "react";
|
|
2
|
+
import { a as A } from "../../../../@react-spring/web/dist/react-spring-web.esm.mjs";
|
|
3
|
+
import N from "../../../../ahooks/es/useSize/index.mjs";
|
|
4
|
+
import { rubberbandIfOutOfBounds as P } from "../../utils/rubberband.mjs";
|
|
5
|
+
import { useDragAndPinch as B } from "../../utils/use-drag-and-pinch.mjs";
|
|
6
|
+
import { bound as w } from "../../utils/bound.mjs";
|
|
7
|
+
import { getScaleX as Y, create as T, getTranslateX as $, getTranslateY as k, translate as b, scale as D, apply as H } from "../../utils/matrix.mjs";
|
|
8
|
+
import { useSpring as W } from "../../../../@react-spring/core/dist/react-spring-core.esm.mjs";
|
|
9
|
+
const z = "adm-image-viewer", U = (u) => {
|
|
10
|
+
const {
|
|
11
|
+
dragLockRef: d,
|
|
12
|
+
maxZoom: I
|
|
13
|
+
} = u, E = R([]), S = R(null), L = R(null), [{
|
|
14
|
+
matrix: g
|
|
15
|
+
}, p] = W(() => ({
|
|
16
|
+
matrix: T(),
|
|
17
|
+
config: {
|
|
18
|
+
tension: 200
|
|
19
|
+
}
|
|
20
|
+
})), o = N(S), m = N(L), M = R(!1), Z = (t) => {
|
|
21
|
+
if (!o || !m)
|
|
22
|
+
return {
|
|
23
|
+
x: {
|
|
24
|
+
position: 0,
|
|
25
|
+
minX: 0,
|
|
26
|
+
maxX: 0
|
|
27
|
+
},
|
|
28
|
+
y: {
|
|
29
|
+
position: 0,
|
|
30
|
+
minY: 0,
|
|
31
|
+
maxY: 0
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const r = -o.width / 2, c = -o.height / 2, e = -m.width / 2, n = -m.height / 2, a = Y(t), s = a * m.width, l = a * m.height, f = r - (s - o.width), i = r, X = c - (l - o.height), v = c, [h, x] = H(t, [e, n]);
|
|
35
|
+
return {
|
|
36
|
+
x: {
|
|
37
|
+
position: h,
|
|
38
|
+
minX: f,
|
|
39
|
+
maxX: i
|
|
40
|
+
},
|
|
41
|
+
y: {
|
|
42
|
+
position: x,
|
|
43
|
+
minY: X,
|
|
44
|
+
maxY: v
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}, O = (t, r, c, e = 0) => [t <= r - e, t >= c + e], _ = (t, r, c = !1) => {
|
|
48
|
+
if (!o || !m)
|
|
49
|
+
return t;
|
|
50
|
+
const e = Y(t), n = e * m.width, a = e * m.height, {
|
|
51
|
+
x: {
|
|
52
|
+
position: s,
|
|
53
|
+
minX: l,
|
|
54
|
+
maxX: f
|
|
55
|
+
},
|
|
56
|
+
y: {
|
|
57
|
+
position: i,
|
|
58
|
+
minY: X,
|
|
59
|
+
maxY: v
|
|
60
|
+
}
|
|
61
|
+
} = Z(t);
|
|
62
|
+
if (r === "translate") {
|
|
63
|
+
let h = s, x = i;
|
|
64
|
+
return n > o.width ? h = c ? w(s, l, f) : P(s, l, f, e * 50) : h = -n / 2, a > o.height ? x = c ? w(i, X, v) : P(i, X, v, e * 50) : x = -a / 2, b(t, h - s, x - i);
|
|
65
|
+
}
|
|
66
|
+
if (r === "scale" && c) {
|
|
67
|
+
const [h, x] = [n > o.width ? w(s, l, f) : -n / 2, a > o.height ? w(i, X, v) : -a / 2];
|
|
68
|
+
return b(t, h - s, x - i);
|
|
69
|
+
}
|
|
70
|
+
return t;
|
|
71
|
+
};
|
|
72
|
+
return B({
|
|
73
|
+
onDrag: (t) => {
|
|
74
|
+
var r;
|
|
75
|
+
if (t.first) {
|
|
76
|
+
const {
|
|
77
|
+
x: {
|
|
78
|
+
position: e,
|
|
79
|
+
minX: n,
|
|
80
|
+
maxX: a
|
|
81
|
+
}
|
|
82
|
+
} = Z(g.get());
|
|
83
|
+
E.current = O(e, n, a);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (t.pinching)
|
|
87
|
+
return t.cancel();
|
|
88
|
+
if (t.tap && t.elapsedTime > 0 && t.elapsedTime < 1e3) {
|
|
89
|
+
(r = u.onTap) === null || r === void 0 || r.call(u);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const c = Y(g.get());
|
|
93
|
+
if (d && (d.current = c !== 1), !M.current && c <= 1)
|
|
94
|
+
p.start({
|
|
95
|
+
matrix: T()
|
|
96
|
+
});
|
|
97
|
+
else {
|
|
98
|
+
const e = g.get(), n = [t.offset[0] - $(e), t.offset[1] - k(e)], a = b(e, ...t.last ? [n[0] + t.velocity[0] * t.direction[0] * 200, n[1] + t.velocity[1] * t.direction[1] * 200] : n);
|
|
99
|
+
p.start({
|
|
100
|
+
matrix: _(a, "translate", t.last),
|
|
101
|
+
immediate: !t.last
|
|
102
|
+
});
|
|
103
|
+
const {
|
|
104
|
+
x: {
|
|
105
|
+
position: s,
|
|
106
|
+
minX: l,
|
|
107
|
+
maxX: f
|
|
108
|
+
}
|
|
109
|
+
} = Z(a);
|
|
110
|
+
t.last && E.current.some((i) => i) && O(s, l, f).some((i) => i) && (d && (d.current = !1), p.start({
|
|
111
|
+
matrix: T()
|
|
112
|
+
}));
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
onPinch: (t) => {
|
|
116
|
+
var r;
|
|
117
|
+
M.current = !t.last;
|
|
118
|
+
const [c] = t.offset;
|
|
119
|
+
if (c < 0)
|
|
120
|
+
return;
|
|
121
|
+
let e;
|
|
122
|
+
I === "auto" ? e = o && m ? Math.max(o.height / m.height, o.width / m.width) : 1 : e = I;
|
|
123
|
+
const n = t.last ? w(c, 1, e) : c;
|
|
124
|
+
if ((r = u.onZoomChange) === null || r === void 0 || r.call(u, n), t.last && n <= 1)
|
|
125
|
+
p.start({
|
|
126
|
+
matrix: T()
|
|
127
|
+
}), d && (d.current = !1);
|
|
128
|
+
else {
|
|
129
|
+
if (!o)
|
|
130
|
+
return;
|
|
131
|
+
const a = g.get(), s = Y(a), l = t.origin[0] - o.width / 2, f = t.origin[1] - o.height / 2;
|
|
132
|
+
let i = b(a, -l, -f);
|
|
133
|
+
i = D(i, n / s), i = b(i, l, f), p.start({
|
|
134
|
+
matrix: _(i, "scale", t.last),
|
|
135
|
+
immediate: !t.last
|
|
136
|
+
}), d && (d.current = !0);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}, {
|
|
140
|
+
target: S,
|
|
141
|
+
drag: {
|
|
142
|
+
from: () => [$(g.get()), k(g.get())],
|
|
143
|
+
pointer: {
|
|
144
|
+
touch: !0
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
pinch: {
|
|
148
|
+
from: () => [Y(g.get()), 0],
|
|
149
|
+
pointer: {
|
|
150
|
+
touch: !0
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}), y.createElement("div", {
|
|
154
|
+
className: `${z}-slide`
|
|
155
|
+
}, y.createElement("div", {
|
|
156
|
+
className: `${z}-control`,
|
|
157
|
+
ref: S
|
|
158
|
+
}, y.createElement(A.div, {
|
|
159
|
+
className: `${z}-image-wrapper`,
|
|
160
|
+
style: {
|
|
161
|
+
matrix: g
|
|
162
|
+
}
|
|
163
|
+
}, y.createElement("img", {
|
|
164
|
+
ref: L,
|
|
165
|
+
src: u.image,
|
|
166
|
+
draggable: !1,
|
|
167
|
+
alt: u.image
|
|
168
|
+
}))));
|
|
169
|
+
};
|
|
170
|
+
export {
|
|
171
|
+
U as Slide
|
|
172
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import m, { forwardRef as b, useImperativeHandle as p, useRef as w } from "react";
|
|
2
|
+
import { useDrag as I } from "../../../../@use-gesture/react/dist/use-gesture-react.esm.mjs";
|
|
3
|
+
import { a as x } from "../../../../@react-spring/web/dist/react-spring-web.esm.mjs";
|
|
4
|
+
import { Slide as M } from "./slide.mjs";
|
|
5
|
+
import { convertPx as R } from "../../utils/convert-px.mjs";
|
|
6
|
+
import { bound as d } from "../../utils/bound.mjs";
|
|
7
|
+
import { useSpring as $ } from "../../../../@react-spring/core/dist/react-spring-core.esm.mjs";
|
|
8
|
+
const f = "adm-image-viewer", _ = b((i, g) => {
|
|
9
|
+
const n = window.innerWidth + R(16), [{
|
|
10
|
+
x: r
|
|
11
|
+
}, c] = $(() => ({
|
|
12
|
+
x: i.defaultIndex * n,
|
|
13
|
+
config: {
|
|
14
|
+
tension: 250,
|
|
15
|
+
clamp: !0
|
|
16
|
+
}
|
|
17
|
+
})), s = i.images.length;
|
|
18
|
+
function l(e, t = !1) {
|
|
19
|
+
var o;
|
|
20
|
+
const a = d(e, 0, s - 1);
|
|
21
|
+
(o = i.onIndexChange) === null || o === void 0 || o.call(i, a), c.start({
|
|
22
|
+
x: a * n,
|
|
23
|
+
immediate: t
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
p(g, () => ({
|
|
27
|
+
swipeTo: l
|
|
28
|
+
}));
|
|
29
|
+
const u = w(!1), h = I((e) => {
|
|
30
|
+
if (u.current)
|
|
31
|
+
return;
|
|
32
|
+
const [t] = e.offset;
|
|
33
|
+
if (e.last) {
|
|
34
|
+
const o = Math.floor(t / n), a = o + 1, v = Math.min(e.velocity[0] * 2e3, n) * e.direction[0];
|
|
35
|
+
l(d(Math.round((t + v) / n), o, a));
|
|
36
|
+
} else
|
|
37
|
+
c.start({
|
|
38
|
+
x: t,
|
|
39
|
+
immediate: !0
|
|
40
|
+
});
|
|
41
|
+
}, {
|
|
42
|
+
transform: ([e, t]) => [-e, t],
|
|
43
|
+
from: () => [r.get(), 0],
|
|
44
|
+
bounds: () => ({
|
|
45
|
+
left: 0,
|
|
46
|
+
right: (s - 1) * n
|
|
47
|
+
}),
|
|
48
|
+
rubberband: !0,
|
|
49
|
+
axis: "x",
|
|
50
|
+
pointer: {
|
|
51
|
+
touch: !0
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
return m.createElement("div", Object.assign({
|
|
55
|
+
className: `${f}-slides`
|
|
56
|
+
}, h()), m.createElement(x.div, {
|
|
57
|
+
className: `${f}-indicator`
|
|
58
|
+
}, r.to((e) => `${d(Math.round(e / n), 0, s - 1) + 1} / ${s}`)), m.createElement(x.div, {
|
|
59
|
+
className: `${f}-slides-inner`,
|
|
60
|
+
style: {
|
|
61
|
+
x: r.to((e) => -e)
|
|
62
|
+
}
|
|
63
|
+
}, i.images.map((e, t) => m.createElement(M, {
|
|
64
|
+
key: t,
|
|
65
|
+
image: e,
|
|
66
|
+
onTap: i.onTap,
|
|
67
|
+
maxZoom: i.maxZoom,
|
|
68
|
+
onZoomChange: (o) => {
|
|
69
|
+
if (o !== 1) {
|
|
70
|
+
const a = Math.round(r.get() / n);
|
|
71
|
+
c.start({
|
|
72
|
+
x: a * n
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
dragLockRef: u
|
|
77
|
+
}))));
|
|
78
|
+
});
|
|
79
|
+
export {
|
|
80
|
+
_ as Slides
|
|
81
|
+
};
|