@agentscope-ai/chat 1.1.4
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/README.md +88 -0
- package/dist/_util/hooks/use-proxy-imperative-handle.d.ts +4 -0
- package/dist/_util/hooks/use-proxy-imperative-handle.js +18 -0
- package/dist/_util/type.d.ts +1 -0
- package/dist/_util/type.js +1 -0
- package/dist/_util/warning.d.ts +30 -0
- package/dist/_util/warning.js +63 -0
- package/dist/accordion/Accordion.d.ts +22 -0
- package/dist/accordion/Accordion.js +93 -0
- package/dist/accordion/BodyContent.d.ts +8 -0
- package/dist/accordion/BodyContent.js +18 -0
- package/dist/accordion/DeepThink.d.ts +7 -0
- package/dist/accordion/DeepThink.js +35 -0
- package/dist/accordion/index.d.ts +2 -0
- package/dist/accordion/index.js +1 -0
- package/dist/accordion/index.less +170 -0
- package/dist/attachments/DropArea.d.ts +8 -0
- package/dist/attachments/DropArea.js +87 -0
- package/dist/attachments/FileList/AudioIcon.d.ts +2 -0
- package/dist/attachments/FileList/AudioIcon.js +19 -0
- package/dist/attachments/FileList/FileListCard.d.ts +12 -0
- package/dist/attachments/FileList/FileListCard.js +229 -0
- package/dist/attachments/FileList/Progress.d.ts +6 -0
- package/dist/attachments/FileList/Progress.js +21 -0
- package/dist/attachments/FileList/VideoIcon.d.ts +2 -0
- package/dist/attachments/FileList/VideoIcon.js +19 -0
- package/dist/attachments/FileList/index.d.ts +16 -0
- package/dist/attachments/FileList/index.js +132 -0
- package/dist/attachments/PlaceholderUploader.d.ts +17 -0
- package/dist/attachments/PlaceholderUploader.js +79 -0
- package/dist/attachments/SilentUploader.d.ts +9 -0
- package/dist/attachments/SilentUploader.js +23 -0
- package/dist/attachments/context.d.ts +5 -0
- package/dist/attachments/context.js +2 -0
- package/dist/attachments/index.d.ts +33 -0
- package/dist/attachments/index.js +166 -0
- package/dist/attachments/style/fileCard.d.ts +4 -0
- package/dist/attachments/style/fileCard.js +124 -0
- package/dist/attachments/style/index.d.ts +10 -0
- package/dist/attachments/style/index.js +211 -0
- package/dist/attachments/util.d.ts +2 -0
- package/dist/attachments/util.js +53 -0
- package/dist/bubble/Avatar.d.ts +10 -0
- package/dist/bubble/Avatar.js +22 -0
- package/dist/bubble/Bubble.d.ts +11 -0
- package/dist/bubble/Bubble.js +102 -0
- package/dist/bubble/BubbleList.d.ts +15 -0
- package/dist/bubble/BubbleList.js +44 -0
- package/dist/bubble/Cards.d.ts +21 -0
- package/dist/bubble/Cards.js +47 -0
- package/dist/bubble/ScrollToBottom.d.ts +7 -0
- package/dist/bubble/ScrollToBottom.js +45 -0
- package/dist/bubble/Spin.d.ts +2 -0
- package/dist/bubble/Spin.js +18 -0
- package/dist/bubble/hooks/useDisplayData.d.ts +0 -0
- package/dist/bubble/hooks/useDisplayData.js +0 -0
- package/dist/bubble/hooks/useListData.d.ts +0 -0
- package/dist/bubble/hooks/useListData.js +0 -0
- package/dist/bubble/index.d.ts +8 -0
- package/dist/bubble/index.js +4 -0
- package/dist/bubble/interface.d.ts +26 -0
- package/dist/bubble/interface.js +1 -0
- package/dist/bubble/loading.d.ts +6 -0
- package/dist/bubble/loading.js +17 -0
- package/dist/bubble/style/avatar.less +40 -0
- package/dist/bubble/style/content.d.ts +4 -0
- package/dist/bubble/style/content.js +43 -0
- package/dist/bubble/style/index.d.ts +9 -0
- package/dist/bubble/style/index.js +53 -0
- package/dist/bubble/style/list.less +15 -0
- package/dist/bubble/style/scrollToBottom.less +174 -0
- package/dist/chat-anywhere/Chat/Ref.d.ts +3 -0
- package/dist/chat-anywhere/Chat/Ref.js +19 -0
- package/dist/chat-anywhere/Chat/index.d.ts +4 -0
- package/dist/chat-anywhere/Chat/index.js +65 -0
- package/dist/chat-anywhere/Chat/index.less +54 -0
- package/dist/chat-anywhere/Header/index.d.ts +3 -0
- package/dist/chat-anywhere/Header/index.js +32 -0
- package/dist/chat-anywhere/Header/index.less +24 -0
- package/dist/chat-anywhere/Input/index.d.ts +3 -0
- package/dist/chat-anywhere/Input/index.js +170 -0
- package/dist/chat-anywhere/Input/index.less +12 -0
- package/dist/chat-anywhere/Layout/index.d.ts +10 -0
- package/dist/chat-anywhere/Layout/index.js +73 -0
- package/dist/chat-anywhere/Layout/index.less +61 -0
- package/dist/chat-anywhere/SessionList/index.d.ts +5 -0
- package/dist/chat-anywhere/SessionList/index.js +115 -0
- package/dist/chat-anywhere/SessionList/index.less +52 -0
- package/dist/chat-anywhere/hooks/ChatAnywhereProvider.d.ts +43 -0
- package/dist/chat-anywhere/hooks/ChatAnywhereProvider.js +90 -0
- package/dist/chat-anywhere/hooks/types.d.ts +57 -0
- package/dist/chat-anywhere/hooks/types.js +1 -0
- package/dist/chat-anywhere/hooks/useInput.d.ts +7 -0
- package/dist/chat-anywhere/hooks/useInput.js +21 -0
- package/dist/chat-anywhere/hooks/useMessages.d.ts +11 -0
- package/dist/chat-anywhere/hooks/useMessages.js +56 -0
- package/dist/chat-anywhere/hooks/useSessionList.d.ts +24 -0
- package/dist/chat-anywhere/hooks/useSessionList.js +120 -0
- package/dist/chat-anywhere/index.d.ts +9 -0
- package/dist/chat-anywhere/index.js +58 -0
- package/dist/conversations/GroupTitle.d.ts +10 -0
- package/dist/conversations/GroupTitle.js +15 -0
- package/dist/conversations/Item.d.ts +14 -0
- package/dist/conversations/Item.js +96 -0
- package/dist/conversations/hooks/useGroupable.d.ts +9 -0
- package/dist/conversations/hooks/useGroupable.js +72 -0
- package/dist/conversations/index.d.ts +62 -0
- package/dist/conversations/index.js +124 -0
- package/dist/conversations/interface.d.ts +60 -0
- package/dist/conversations/interface.js +1 -0
- package/dist/conversations/style/index.d.ts +9 -0
- package/dist/conversations/style/index.js +80 -0
- package/dist/default-cards/Count/index.d.ts +3 -0
- package/dist/default-cards/Count/index.js +16 -0
- package/dist/default-cards/Count/index.less +19 -0
- package/dist/default-cards/DeepThink/index.d.ts +11 -0
- package/dist/default-cards/DeepThink/index.js +11 -0
- package/dist/default-cards/DeepThink/index.less +0 -0
- package/dist/default-cards/Files/index.d.ts +2 -0
- package/dist/default-cards/Files/index.js +18 -0
- package/dist/default-cards/Footer/index.d.ts +19 -0
- package/dist/default-cards/Footer/index.js +50 -0
- package/dist/default-cards/Footer/index.less +41 -0
- package/dist/default-cards/Images/index.d.ts +3 -0
- package/dist/default-cards/Images/index.js +33 -0
- package/dist/default-cards/Images/index.less +17 -0
- package/dist/default-cards/Interrupted/index.d.ts +11 -0
- package/dist/default-cards/Interrupted/index.js +40 -0
- package/dist/default-cards/Interrupted/index.less +57 -0
- package/dist/default-cards/Text/index.d.ts +2 -0
- package/dist/default-cards/Text/index.js +12 -0
- package/dist/default-cards/index.d.ts +6 -0
- package/dist/default-cards/index.js +6 -0
- package/dist/disclaimer/index.d.ts +11 -0
- package/dist/disclaimer/index.js +26 -0
- package/dist/docs/1896.async.js +457 -0
- package/dist/docs/2710.async.js +62 -0
- package/dist/docs/2863.async.js +400 -0
- package/dist/docs/3057.async.js +46 -0
- package/dist/docs/3364.async.js +25 -0
- package/dist/docs/404.html +15 -0
- package/dist/docs/4820.async.js +1381 -0
- package/dist/docs/5623.async.js +60 -0
- package/dist/docs/5757.async.js +1 -0
- package/dist/docs/5804.async.js +271 -0
- package/dist/docs/6198.async.js +18 -0
- package/dist/docs/6671.async.js +137 -0
- package/dist/docs/7195.async.js +1 -0
- package/dist/docs/7485.async.js +29 -0
- package/dist/docs/7931.async.js +19 -0
- package/dist/docs/7997.async.js +5 -0
- package/dist/docs/8156.async.js +110 -0
- package/dist/docs/8368.async.js +2 -0
- package/dist/docs/8480.async.js +1449 -0
- package/dist/docs/8618.async.js +246 -0
- package/dist/docs/9016.async.js +32 -0
- package/dist/docs/9016.chunk.css +1 -0
- package/dist/docs/9335.async.js +11 -0
- package/dist/docs/accordion__demos.async.js +9 -0
- package/dist/docs/attachments__demos.async.js +1 -0
- package/dist/docs/bubble__demos.async.js +50 -0
- package/dist/docs/components/accordion/index.html +15 -0
- package/dist/docs/components/accordion-cn/index.html +15 -0
- package/dist/docs/components/attachments/index.html +15 -0
- package/dist/docs/components/attachments-cn/index.html +15 -0
- package/dist/docs/components/bubble/index.html +15 -0
- package/dist/docs/components/bubble-cn/index.html +15 -0
- package/dist/docs/components/bubble-list/index.html +15 -0
- package/dist/docs/components/bubble-list-cn/index.html +15 -0
- package/dist/docs/components/conversations/index.html +15 -0
- package/dist/docs/components/conversations-cn/index.html +15 -0
- package/dist/docs/components/disclaimer/index.html +15 -0
- package/dist/docs/components/disclaimer-cn/index.html +15 -0
- package/dist/docs/components/footer/index.html +15 -0
- package/dist/docs/components/footer-cn/index.html +15 -0
- package/dist/docs/components/markdown/index.html +15 -0
- package/dist/docs/components/markdown-cn/index.html +15 -0
- package/dist/docs/components/sender/index.html +15 -0
- package/dist/docs/components/sender-cn/index.html +15 -0
- package/dist/docs/components/status/index.html +15 -0
- package/dist/docs/components/status-cn/index.html +15 -0
- package/dist/docs/components/welcome/index.html +15 -0
- package/dist/docs/components/welcome-cn/index.html +15 -0
- package/dist/docs/components__accordion__index.en-US.md.async.js +6 -0
- package/dist/docs/components__accordion__index.en-US.md.chunk.css +1 -0
- package/dist/docs/components__accordion__index.zh-CN.md.async.js +6 -0
- package/dist/docs/components__accordion__index.zh-CN.md.chunk.css +1 -0
- package/dist/docs/components__attachments__index.en-US.md.async.js +1 -0
- package/dist/docs/components__attachments__index.en-US.md.chunk.css +1 -0
- package/dist/docs/components__attachments__index.zh-CN.md.async.js +1 -0
- package/dist/docs/components__attachments__index.zh-CN.md.chunk.css +1 -0
- package/dist/docs/components__bubble-list__index.en-US.md.async.js +2 -0
- package/dist/docs/components__bubble-list__index.en-US.md.chunk.css +1 -0
- package/dist/docs/components__bubble-list__index.zh-CN.md.async.js +2 -0
- package/dist/docs/components__bubble-list__index.zh-CN.md.chunk.css +1 -0
- package/dist/docs/components__bubble__index.en-US.md.async.js +1 -0
- package/dist/docs/components__bubble__index.en-US.md.chunk.css +1 -0
- package/dist/docs/components__bubble__index.zh-CN.md.async.js +1 -0
- package/dist/docs/components__bubble__index.zh-CN.md.chunk.css +1 -0
- package/dist/docs/components__conversations__index.en-US.md.async.js +2 -0
- package/dist/docs/components__conversations__index.en-US.md.chunk.css +1 -0
- package/dist/docs/components__conversations__index.zh-CN.md.async.js +1 -0
- package/dist/docs/components__conversations__index.zh-CN.md.chunk.css +1 -0
- package/dist/docs/components__disclaimer__index.en-US.md.async.js +1 -0
- package/dist/docs/components__disclaimer__index.en-US.md.chunk.css +1 -0
- package/dist/docs/components__disclaimer__index.zh-CN.md.async.js +1 -0
- package/dist/docs/components__disclaimer__index.zh-CN.md.chunk.css +1 -0
- package/dist/docs/components__footer__index.en-US.md.async.js +1 -0
- package/dist/docs/components__footer__index.en-US.md.chunk.css +1 -0
- package/dist/docs/components__footer__index.zh-CN.md.async.js +2 -0
- package/dist/docs/components__footer__index.zh-CN.md.chunk.css +1 -0
- package/dist/docs/components__markdown__index.en-US.md.async.js +1 -0
- package/dist/docs/components__markdown__index.en-US.md.chunk.css +1 -0
- package/dist/docs/components__markdown__index.zh-CN.md.async.js +1 -0
- package/dist/docs/components__markdown__index.zh-CN.md.chunk.css +1 -0
- package/dist/docs/components__sender__index.en-US.md.async.js +1 -0
- package/dist/docs/components__sender__index.en-US.md.chunk.css +1 -0
- package/dist/docs/components__sender__index.zh-CN.md.async.js +1 -0
- package/dist/docs/components__sender__index.zh-CN.md.chunk.css +1 -0
- package/dist/docs/components__status__index.en-US.md.async.js +1 -0
- package/dist/docs/components__status__index.en-US.md.chunk.css +1 -0
- package/dist/docs/components__status__index.zh-CN.md.async.js +2 -0
- package/dist/docs/components__status__index.zh-CN.md.chunk.css +1 -0
- package/dist/docs/components__welcome__index.en-US.md.async.js +2 -0
- package/dist/docs/components__welcome__index.en-US.md.chunk.css +1 -0
- package/dist/docs/components__welcome__index.zh-CN.md.async.js +2 -0
- package/dist/docs/components__welcome__index.zh-CN.md.chunk.css +1 -0
- package/dist/docs/conversations__demos.async.js +1 -0
- package/dist/docs/demos.async.js +47 -0
- package/dist/docs/demos.chunk.css +1 -0
- package/dist/docs/disclaimer__demos.async.js +1 -0
- package/dist/docs/docs/development/ag-ui/index.html +15 -0
- package/dist/docs/docs/development/ag-ui-cn/index.html +15 -0
- package/dist/docs/docs/development/backend/index.html +15 -0
- package/dist/docs/docs/development/backend-cn/index.html +15 -0
- package/dist/docs/docs/development/cards/index.html +15 -0
- package/dist/docs/docs/development/cards-cn/index.html +15 -0
- package/dist/docs/docs/development/chatanywhere/index.html +15 -0
- package/dist/docs/docs/development/chatanywhere-api/index.html +15 -0
- package/dist/docs/docs/development/chatanywhere-api-cn/index.html +15 -0
- package/dist/docs/docs/development/chatanywhere-cn/index.html +15 -0
- package/dist/docs/docs/development/custom/index.html +15 -0
- package/dist/docs/docs/development/custom-cn/index.html +15 -0
- package/dist/docs/docs/development/overview/index.html +15 -0
- package/dist/docs/docs/development/overview-cn/index.html +15 -0
- package/dist/docs/docs/development/qwen/index.html +15 -0
- package/dist/docs/docs/development/qwen-cn/index.html +15 -0
- package/dist/docs/docs/templates/copilot/index.html +15 -0
- package/dist/docs/docs/templates/copilot-cn/index.html +15 -0
- package/dist/docs/docs/templates/native/index.html +15 -0
- package/dist/docs/docs/templates/native-cn/index.html +15 -0
- package/dist/docs/docs/templates/voice/index.html +15 -0
- package/dist/docs/docs/templates/voice-cn/index.html +15 -0
- package/dist/docs/docs__development__ag-ui.en-US.md.async.js +210 -0
- package/dist/docs/docs__development__ag-ui.en-US.md.chunk.css +1 -0
- package/dist/docs/docs__development__ag-ui.zh-CN.md.async.js +210 -0
- package/dist/docs/docs__development__ag-ui.zh-CN.md.chunk.css +1 -0
- package/dist/docs/docs__development__backend.en-US.md.async.js +12 -0
- package/dist/docs/docs__development__backend.en-US.md.chunk.css +1 -0
- package/dist/docs/docs__development__backend.zh-CN.md.async.js +12 -0
- package/dist/docs/docs__development__backend.zh-CN.md.chunk.css +1 -0
- package/dist/docs/docs__development__cards.en-US.md.async.js +27 -0
- package/dist/docs/docs__development__cards.en-US.md.chunk.css +1 -0
- package/dist/docs/docs__development__cards.zh-CN.md.async.js +27 -0
- package/dist/docs/docs__development__cards.zh-CN.md.chunk.css +1 -0
- package/dist/docs/docs__development__chatanywhere-api.en-US.md.async.js +69 -0
- package/dist/docs/docs__development__chatanywhere-api.en-US.md.chunk.css +1 -0
- package/dist/docs/docs__development__chatanywhere-api.zh-CN.md.async.js +69 -0
- package/dist/docs/docs__development__chatanywhere-api.zh-CN.md.chunk.css +1 -0
- package/dist/docs/docs__development__chatanywhere.en-US.md.async.js +77 -0
- package/dist/docs/docs__development__chatanywhere.en-US.md.chunk.css +1 -0
- package/dist/docs/docs__development__chatanywhere.zh-CN.md.async.js +77 -0
- package/dist/docs/docs__development__chatanywhere.zh-CN.md.chunk.css +1 -0
- package/dist/docs/docs__development__custom.en-US.md.async.js +22 -0
- package/dist/docs/docs__development__custom.en-US.md.chunk.css +1 -0
- package/dist/docs/docs__development__custom.zh-CN.md.async.js +22 -0
- package/dist/docs/docs__development__custom.zh-CN.md.chunk.css +1 -0
- package/dist/docs/docs__development__overview.en-US.md.async.js +21 -0
- package/dist/docs/docs__development__overview.en-US.md.chunk.css +1 -0
- package/dist/docs/docs__development__overview.zh-CN.md.async.js +21 -0
- package/dist/docs/docs__development__overview.zh-CN.md.chunk.css +1 -0
- package/dist/docs/docs__development__qwen.en-US.md.async.js +25 -0
- package/dist/docs/docs__development__qwen.en-US.md.chunk.css +1 -0
- package/dist/docs/docs__development__qwen.zh-CN.md.async.js +25 -0
- package/dist/docs/docs__development__qwen.zh-CN.md.chunk.css +1 -0
- package/dist/docs/docs__templates__copilot.en-US.md.async.js +1 -0
- package/dist/docs/docs__templates__copilot.en-US.md.chunk.css +1 -0
- package/dist/docs/docs__templates__copilot.zh-CN.md.async.js +1 -0
- package/dist/docs/docs__templates__copilot.zh-CN.md.chunk.css +1 -0
- package/dist/docs/docs__templates__native.en-US.md.async.js +1 -0
- package/dist/docs/docs__templates__native.en-US.md.chunk.css +1 -0
- package/dist/docs/docs__templates__native.zh-CN.md.async.js +1 -0
- package/dist/docs/docs__templates__native.zh-CN.md.chunk.css +1 -0
- package/dist/docs/docs__templates__voice.en-US.md.async.js +20 -0
- package/dist/docs/docs__templates__voice.en-US.md.chunk.css +1 -0
- package/dist/docs/docs__templates__voice.zh-CN.md.async.js +1 -0
- package/dist/docs/docs__templates__voice.zh-CN.md.chunk.css +1 -0
- package/dist/docs/dumi__pages__index__index.en-US.async.js +1 -0
- package/dist/docs/dumi__pages__index__index.en-US.chunk.css +1 -0
- package/dist/docs/dumi__pages__index__index.zh-CN.async.js +1 -0
- package/dist/docs/dumi__pages__index__index.zh-CN.chunk.css +1 -0
- package/dist/docs/dumi__theme__layouts__DocLayout__index.async.js +1 -0
- package/dist/docs/dumi__theme__layouts__DocLayout__index.chunk.css +1 -0
- package/dist/docs/dumi__theme__layouts__GlobalLayout__index.async.js +18 -0
- package/dist/docs/dumi__theme__layouts__GlobalLayout__index.chunk.css +1 -0
- package/dist/docs/dumi__tmp-production__dumi__theme__ContextWrapper.async.js +1 -0
- package/dist/docs/index/index.html +15 -0
- package/dist/docs/index-cn/index.html +15 -0
- package/dist/docs/markdown__demos.async.js +164 -0
- package/dist/docs/meta__components__en-US.async.js +9 -0
- package/dist/docs/meta__components__zh-CN.async.js +10 -0
- package/dist/docs/meta__docs__en-US.async.js +475 -0
- package/dist/docs/meta__docs__en-US.chunk.css +1 -0
- package/dist/docs/meta__docs__zh-CN.async.js +456 -0
- package/dist/docs/meta__docs__zh-CN.chunk.css +1 -0
- package/dist/docs/nm__dumi__dist__client__pages__404.async.js +1 -0
- package/dist/docs/nm__dumi__dist__client__pages__Demo__index.async.js +1 -0
- package/dist/docs/nm__dumi__dist__client__pages__Demo__index.chunk.css +1 -0
- package/dist/docs/preload_helper.js +1 -0
- package/dist/docs/sender__demos.async.js +1 -0
- package/dist/docs/umi.css +1 -0
- package/dist/docs/umi.js +107 -0
- package/dist/docs/welcome__demos.async.js +1 -0
- package/dist/docs/~demos/:id/index.html +15 -0
- package/dist/docs/~demos/accordion-demo-inline/index.html +15 -0
- package/dist/docs/~demos/accordion-demo-mutisteps/index.html +15 -0
- package/dist/docs/~demos/accordion-demo-thinking/index.html +15 -0
- package/dist/docs/~demos/attachments-demo-files/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-basic/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-havestopped/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-userwithfile/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-userwithimage/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-userwithnormal/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-withavatar/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-withcode/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-witherror/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-witherrordetail/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-withimage/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-withusage/index.html +15 -0
- package/dist/docs/~demos/bubble-demo-withwaitingmessage/index.html +15 -0
- package/dist/docs/~demos/components-bubble-list-demo-basic/index.html +15 -0
- package/dist/docs/~demos/components-footer-demo-basic/index.html +15 -0
- package/dist/docs/~demos/components-footer-demo-withusage/index.html +15 -0
- package/dist/docs/~demos/components-status-demo-basic/index.html +15 -0
- package/dist/docs/~demos/conversations-demo-basic/index.html +15 -0
- package/dist/docs/~demos/disclaimer-demo-demo/index.html +15 -0
- package/dist/docs/~demos/disclaimer-demo-withlink/index.html +15 -0
- package/dist/docs/~demos/docs-development-ag-ui-demo-with-copilotkit/index.html +15 -0
- package/dist/docs/~demos/docs-development-cards-demo-file/index.html +15 -0
- package/dist/docs/~demos/docs-development-cards-demo-footer/index.html +15 -0
- package/dist/docs/~demos/docs-development-cards-demo-image/index.html +15 -0
- package/dist/docs/~demos/docs-development-cards-demo-text/index.html +15 -0
- package/dist/docs/~demos/docs-development-custom-demo-custom/index.html +15 -0
- package/dist/docs/~demos/docs-templates-copilot-demo-copilot/index.html +15 -0
- package/dist/docs/~demos/docs-templates-native-demo-basic/index.html +15 -0
- package/dist/docs/~demos/docs-templates-voice-demo-demo/index.html +15 -0
- package/dist/docs/~demos/markdown-demo-citations/index.html +15 -0
- package/dist/docs/~demos/markdown-demo-cursor/index.html +15 -0
- package/dist/docs/~demos/markdown-demo-mathjax/index.html +15 -0
- package/dist/docs/~demos/markdown-demo-md/index.html +15 -0
- package/dist/docs/~demos/sender-demo-basic/index.html +15 -0
- package/dist/docs/~demos/sender-demo-disabled/index.html +15 -0
- package/dist/docs/~demos/sender-demo-loading/index.html +15 -0
- package/dist/docs/~demos/sender-demo-moreprefixaction/index.html +15 -0
- package/dist/docs/~demos/sender-demo-withfile/index.html +15 -0
- package/dist/docs/~demos/welcome-demo-demo0/index.html +15 -0
- package/dist/docs/~demos/welcome-demo-demo1/index.html +15 -0
- package/dist/docs/~demos/welcome-demo-demo2/index.html +15 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +20 -0
- package/dist/index.less +1 -0
- package/dist/markdown/Citation.d.ts +16 -0
- package/dist/markdown/Citation.js +55 -0
- package/dist/markdown/CodeBlock.d.ts +6 -0
- package/dist/markdown/CodeBlock.js +88 -0
- package/dist/markdown/ImageOrVideo.d.ts +2 -0
- package/dist/markdown/ImageOrVideo.js +81 -0
- package/dist/markdown/Link.d.ts +3 -0
- package/dist/markdown/Link.js +28 -0
- package/dist/markdown/Markdown.d.ts +4 -0
- package/dist/markdown/Markdown.js +121 -0
- package/dist/markdown/cursor/Blur.d.ts +3 -0
- package/dist/markdown/cursor/Blur.js +7 -0
- package/dist/markdown/cursor/Dot.d.ts +3 -0
- package/dist/markdown/cursor/Dot.js +16 -0
- package/dist/markdown/cursor/Underline.d.ts +3 -0
- package/dist/markdown/cursor/Underline.js +7 -0
- package/dist/markdown/cursor/index.less +124 -0
- package/dist/markdown/hooks/index.d.ts +1 -0
- package/dist/markdown/hooks/index.js +49 -0
- package/dist/markdown/hooks/useTypedEffect.d.ts +6 -0
- package/dist/markdown/hooks/useTypedEffect.js +56 -0
- package/dist/markdown/index.d.ts +16 -0
- package/dist/markdown/index.js +37 -0
- package/dist/markdown/index.less +204 -0
- package/dist/markdown/plugins/footnote.d.ts +2 -0
- package/dist/markdown/plugins/footnote.js +89 -0
- package/dist/markdown/plugins/katexDir.d.ts +1 -0
- package/dist/markdown/plugins/katexDir.js +15 -0
- package/dist/markdown/rehype/fadeIn.d.ts +2 -0
- package/dist/markdown/rehype/fadeIn.js +43 -0
- package/dist/markdown/type.d.ts +46 -0
- package/dist/markdown/type.js +1 -0
- package/dist/markdown/utils.d.ts +22 -0
- package/dist/markdown/utils.js +125 -0
- package/dist/provider/CustomCardsProvider.d.ts +15 -0
- package/dist/provider/CustomCardsProvider.js +18 -0
- package/dist/provider/GlobalProvider.d.ts +5 -0
- package/dist/provider/GlobalProvider.js +11 -0
- package/dist/provider/index.d.ts +8 -0
- package/dist/provider/index.js +20 -0
- package/dist/provider/types.d.ts +8 -0
- package/dist/provider/types.js +1 -0
- package/dist/sender/SenderHeader.d.ts +19 -0
- package/dist/sender/SenderHeader.js +79 -0
- package/dist/sender/StopLoading.d.ts +5 -0
- package/dist/sender/StopLoading.js +20 -0
- package/dist/sender/components/ActionButton.d.ts +22 -0
- package/dist/sender/components/ActionButton.js +39 -0
- package/dist/sender/components/ClearButton.d.ts +4 -0
- package/dist/sender/components/ClearButton.js +13 -0
- package/dist/sender/components/LoadingButton.d.ts +4 -0
- package/dist/sender/components/LoadingButton.js +22 -0
- package/dist/sender/components/SendButton.d.ts +4 -0
- package/dist/sender/components/SendButton.js +14 -0
- package/dist/sender/components/SpeechButton/RecordingIcon.d.ts +5 -0
- package/dist/sender/components/SpeechButton/RecordingIcon.js +49 -0
- package/dist/sender/components/SpeechButton/index.d.ts +4 -0
- package/dist/sender/components/SpeechButton/index.js +30 -0
- package/dist/sender/index.d.ts +61 -0
- package/dist/sender/index.js +307 -0
- package/dist/sender/style/header.d.ts +4 -0
- package/dist/sender/style/header.js +46 -0
- package/dist/sender/style/index.d.ts +10 -0
- package/dist/sender/style/index.js +123 -0
- package/dist/sender/useSpeech.d.ts +6 -0
- package/dist/sender/useSpeech.js +114 -0
- package/dist/stream/index.d.ts +34 -0
- package/dist/stream/index.en-US.md.bk +50 -0
- package/dist/stream/index.js +197 -0
- package/dist/stream/index.zh-CN.md.bk +51 -0
- package/dist/theme/components.d.ts +10 -0
- package/dist/theme/components.js +1 -0
- package/dist/theme/cssinjs-utils.d.ts +14 -0
- package/dist/theme/cssinjs-utils.js +1 -0
- package/dist/theme/genStyleUtils.d.ts +28 -0
- package/dist/theme/genStyleUtils.js +49 -0
- package/dist/theme/useToken.d.ts +18 -0
- package/dist/theme/useToken.js +110 -0
- package/dist/version/index.d.ts +2 -0
- package/dist/version/index.js +2 -0
- package/dist/voice-chat/Recorder/index.d.ts +26 -0
- package/dist/voice-chat/Recorder/index.js +168 -0
- package/dist/voice-chat/VoiceChatProvider/context.d.ts +22 -0
- package/dist/voice-chat/VoiceChatProvider/context.js +3 -0
- package/dist/voice-chat/VoiceChatProvider/hooks/useChatState.d.ts +1 -0
- package/dist/voice-chat/VoiceChatProvider/hooks/useChatState.js +5 -0
- package/dist/voice-chat/VoiceChatProvider/hooks/useMessages.d.ts +8 -0
- package/dist/voice-chat/VoiceChatProvider/hooks/useMessages.js +31 -0
- package/dist/voice-chat/VoiceChatProvider/hooks/useRecorder.d.ts +5 -0
- package/dist/voice-chat/VoiceChatProvider/hooks/useRecorder.js +48 -0
- package/dist/voice-chat/VoiceChatProvider/hooks/useVoiceChat.d.ts +4 -0
- package/dist/voice-chat/VoiceChatProvider/hooks/useVoiceChat.js +10 -0
- package/dist/voice-chat/VoiceChatProvider/index.d.ts +9 -0
- package/dist/voice-chat/VoiceChatProvider/index.js +55 -0
- package/dist/voice-chat/VoiceChatService/index.d.ts +34 -0
- package/dist/voice-chat/VoiceChatService/index.js +209 -0
- package/dist/voice-chat/index.d.ts +2 -0
- package/dist/voice-chat/index.js +2 -0
- package/dist/voice-chat/types/index.d.ts +12 -0
- package/dist/voice-chat/types/index.js +4 -0
- package/dist/welcome/icon.d.ts +2 -0
- package/dist/welcome/icon.js +38 -0
- package/dist/welcome/index.d.ts +9 -0
- package/dist/welcome/index.js +57 -0
- package/package.json +117 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import { mergeToken } from '@ant-design/cssinjs-utils';
|
|
8
|
+
import { FastColor } from '@ant-design/fast-color';
|
|
9
|
+
import { genStyleHooks } from "../../theme/genStyleUtils";
|
|
10
|
+
import genFileCardStyle from "./fileCard";
|
|
11
|
+
|
|
12
|
+
// biome-ignore lint/suspicious/noEmptyInterface: ComponentToken need to be empty by default
|
|
13
|
+
|
|
14
|
+
var anyBoxSizing = {
|
|
15
|
+
'&, *': {
|
|
16
|
+
boxSizing: 'border-box'
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
var genAttachmentsStyle = function genAttachmentsStyle(token) {
|
|
20
|
+
var componentCls = token.componentCls,
|
|
21
|
+
calc = token.calc,
|
|
22
|
+
antCls = token.antCls;
|
|
23
|
+
var dropAreaCls = "".concat(componentCls, "-drop-area");
|
|
24
|
+
var placeholderCls = "".concat(componentCls, "-placeholder");
|
|
25
|
+
return _defineProperty(_defineProperty({}, dropAreaCls, _objectSpread(_objectSpread({
|
|
26
|
+
position: 'absolute',
|
|
27
|
+
inset: 0,
|
|
28
|
+
zIndex: token.zIndexPopupBase
|
|
29
|
+
}, anyBoxSizing), {}, _defineProperty({
|
|
30
|
+
'&-on-body': {
|
|
31
|
+
position: 'fixed',
|
|
32
|
+
inset: 0
|
|
33
|
+
},
|
|
34
|
+
'&-hide-placement': _defineProperty({}, "".concat(placeholderCls, "-inner"), {
|
|
35
|
+
display: 'none'
|
|
36
|
+
})
|
|
37
|
+
}, placeholderCls, {
|
|
38
|
+
padding: 0
|
|
39
|
+
}))), '&', _defineProperty({}, placeholderCls, _objectSpread(_objectSpread({
|
|
40
|
+
height: '100%',
|
|
41
|
+
borderRadius: token.borderRadius,
|
|
42
|
+
borderWidth: token.lineWidthBold,
|
|
43
|
+
borderStyle: 'dashed',
|
|
44
|
+
borderColor: 'transparent',
|
|
45
|
+
padding: token.padding,
|
|
46
|
+
position: 'relative',
|
|
47
|
+
backdropFilter: 'blur(10px)',
|
|
48
|
+
background: token.colorBgPlaceholderHover
|
|
49
|
+
}, anyBoxSizing), {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(antCls, "-upload-wrapper ").concat(antCls, "-upload").concat(antCls, "-upload-btn"), {
|
|
50
|
+
padding: 0
|
|
51
|
+
}), "&".concat(placeholderCls, "-drag-in"), {
|
|
52
|
+
borderColor: token.colorPrimaryHover
|
|
53
|
+
}), "&".concat(placeholderCls, "-disabled"), {
|
|
54
|
+
opacity: 0.25,
|
|
55
|
+
pointerEvents: 'none'
|
|
56
|
+
}), "".concat(placeholderCls, "-inner"), {
|
|
57
|
+
gap: calc(token.paddingXXS).div(2).equal()
|
|
58
|
+
}), "".concat(placeholderCls, "-icon"), {
|
|
59
|
+
fontSize: token.fontSizeHeading2,
|
|
60
|
+
lineHeight: 1
|
|
61
|
+
}), "".concat(placeholderCls, "-title").concat(placeholderCls, "-title"), {
|
|
62
|
+
margin: 0,
|
|
63
|
+
fontSize: token.fontSize,
|
|
64
|
+
lineHeight: token.lineHeight
|
|
65
|
+
}), "".concat(placeholderCls, "-description"), {}))));
|
|
66
|
+
};
|
|
67
|
+
var genFileListStyle = function genFileListStyle(token) {
|
|
68
|
+
var componentCls = token.componentCls,
|
|
69
|
+
calc = token.calc;
|
|
70
|
+
var fileListCls = "".concat(componentCls, "-list");
|
|
71
|
+
var cardHeight = calc(token.fontSize).mul(token.lineHeight).mul(2).add(token.paddingSM).add(token.paddingSM).equal();
|
|
72
|
+
return _defineProperty({}, componentCls, _objectSpread(_objectSpread({
|
|
73
|
+
position: 'relative',
|
|
74
|
+
width: '100%'
|
|
75
|
+
}, anyBoxSizing), {}, _defineProperty({}, fileListCls, {
|
|
76
|
+
display: 'flex',
|
|
77
|
+
gap: token.paddingSM,
|
|
78
|
+
fontSize: token.fontSize,
|
|
79
|
+
lineHeight: token.lineHeight,
|
|
80
|
+
color: token.colorText,
|
|
81
|
+
// flexWrap: 'wrap',
|
|
82
|
+
// paddingBlock: token.paddingSM,
|
|
83
|
+
// paddingInline: token.padding,
|
|
84
|
+
// background: token.colorBgContainer,
|
|
85
|
+
width: '100%',
|
|
86
|
+
overflow: 'auto',
|
|
87
|
+
padding: token.padding,
|
|
88
|
+
paddingBottom: 0,
|
|
89
|
+
// Hide scrollbar
|
|
90
|
+
scrollbarWidth: 'none',
|
|
91
|
+
'-ms-overflow-style': 'none',
|
|
92
|
+
'&::-webkit-scrollbar': {
|
|
93
|
+
display: 'none'
|
|
94
|
+
},
|
|
95
|
+
// Scroll
|
|
96
|
+
'&-overflow-scrollX, &-overflow-scrollY': {
|
|
97
|
+
'&:before, &:after': {
|
|
98
|
+
content: '""',
|
|
99
|
+
position: 'absolute',
|
|
100
|
+
opacity: 0,
|
|
101
|
+
transition: "opacity ".concat(token.motionDurationSlow),
|
|
102
|
+
zIndex: 1
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
'&-overflow-ping-start:before': {
|
|
106
|
+
opacity: 1
|
|
107
|
+
},
|
|
108
|
+
'&-overflow-ping-end:after': {
|
|
109
|
+
opacity: 1
|
|
110
|
+
},
|
|
111
|
+
'&-overflow-scrollX': {
|
|
112
|
+
overflowX: 'auto',
|
|
113
|
+
overflowY: 'hidden',
|
|
114
|
+
flexWrap: 'nowrap',
|
|
115
|
+
'&:before, &:after': {
|
|
116
|
+
insetBlock: 0,
|
|
117
|
+
width: 8
|
|
118
|
+
},
|
|
119
|
+
'&:before': {
|
|
120
|
+
insetInlineStart: 0,
|
|
121
|
+
background: "linear-gradient(to right, rgba(0,0,0,0.06), rgba(0,0,0,0));"
|
|
122
|
+
},
|
|
123
|
+
'&:after': {
|
|
124
|
+
insetInlineEnd: 0,
|
|
125
|
+
background: "linear-gradient(to left, rgba(0,0,0,0.06), rgba(0,0,0,0));"
|
|
126
|
+
},
|
|
127
|
+
'&:dir(rtl)': {
|
|
128
|
+
'&:before': {
|
|
129
|
+
background: "linear-gradient(to left, rgba(0,0,0,0.06), rgba(0,0,0,0));"
|
|
130
|
+
},
|
|
131
|
+
'&:after': {
|
|
132
|
+
background: "linear-gradient(to right, rgba(0,0,0,0.06), rgba(0,0,0,0));"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
'&-overflow-scrollY': {
|
|
137
|
+
overflowX: 'hidden',
|
|
138
|
+
overflowY: 'auto',
|
|
139
|
+
maxHeight: calc(cardHeight).mul(3).equal(),
|
|
140
|
+
'&:before, &:after': {
|
|
141
|
+
insetInline: 0,
|
|
142
|
+
height: 8
|
|
143
|
+
},
|
|
144
|
+
'&:before': {
|
|
145
|
+
insetBlockStart: 0,
|
|
146
|
+
background: "linear-gradient(to bottom, rgba(0,0,0,0.06), rgba(0,0,0,0));"
|
|
147
|
+
},
|
|
148
|
+
'&:after': {
|
|
149
|
+
insetBlockEnd: 0,
|
|
150
|
+
background: "linear-gradient(to top, rgba(0,0,0,0.06), rgba(0,0,0,0));"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
// ======================================================================
|
|
154
|
+
// == Upload ==
|
|
155
|
+
// ======================================================================
|
|
156
|
+
'&-upload-btn': {
|
|
157
|
+
width: cardHeight,
|
|
158
|
+
height: cardHeight,
|
|
159
|
+
fontSize: token.fontSizeHeading2,
|
|
160
|
+
color: '#999'
|
|
161
|
+
},
|
|
162
|
+
// ======================================================================
|
|
163
|
+
// == PrevNext ==
|
|
164
|
+
// ======================================================================
|
|
165
|
+
'&-prev-btn, &-next-btn': {
|
|
166
|
+
position: 'absolute',
|
|
167
|
+
top: '50%',
|
|
168
|
+
transform: 'translateY(-50%)',
|
|
169
|
+
boxShadow: token.boxShadowTertiary,
|
|
170
|
+
opacity: 0,
|
|
171
|
+
pointerEvents: 'none'
|
|
172
|
+
},
|
|
173
|
+
'&-prev-btn': {
|
|
174
|
+
left: {
|
|
175
|
+
_skip_check_: true,
|
|
176
|
+
value: token.padding
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
'&-next-btn': {
|
|
180
|
+
right: {
|
|
181
|
+
_skip_check_: true,
|
|
182
|
+
value: token.padding
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
'&:dir(ltr)': _defineProperty(_defineProperty({}, "&".concat(fileListCls, "-overflow-ping-start ").concat(fileListCls, "-prev-btn"), {
|
|
186
|
+
opacity: 1,
|
|
187
|
+
pointerEvents: 'auto'
|
|
188
|
+
}), "&".concat(fileListCls, "-overflow-ping-end ").concat(fileListCls, "-next-btn"), {
|
|
189
|
+
opacity: 1,
|
|
190
|
+
pointerEvents: 'auto'
|
|
191
|
+
}),
|
|
192
|
+
'&:dir(rtl)': _defineProperty(_defineProperty({}, "&".concat(fileListCls, "-overflow-ping-end ").concat(fileListCls, "-prev-btn"), {
|
|
193
|
+
opacity: 1,
|
|
194
|
+
pointerEvents: 'auto'
|
|
195
|
+
}), "&".concat(fileListCls, "-overflow-ping-start ").concat(fileListCls, "-next-btn"), {
|
|
196
|
+
opacity: 1,
|
|
197
|
+
pointerEvents: 'auto'
|
|
198
|
+
})
|
|
199
|
+
})));
|
|
200
|
+
};
|
|
201
|
+
export var prepareComponentToken = function prepareComponentToken(token) {
|
|
202
|
+
var colorBgContainer = token.colorBgContainer;
|
|
203
|
+
var colorBgPlaceholderHover = new FastColor(colorBgContainer).setA(0.85);
|
|
204
|
+
return {
|
|
205
|
+
colorBgPlaceholderHover: colorBgPlaceholderHover.toRgbString()
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
export default genStyleHooks('Attachments', function (token) {
|
|
209
|
+
var compToken = mergeToken(token, {});
|
|
210
|
+
return [genAttachmentsStyle(compToken), genFileListStyle(compToken), genFileCardStyle(compToken)];
|
|
211
|
+
}, prepareComponentToken);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Follow code is copy from `antd/components/upload/utils.ts`:
|
|
2
|
+
|
|
3
|
+
export var isImageFileType = function isImageFileType(type) {
|
|
4
|
+
return type.indexOf('image/') === 0;
|
|
5
|
+
};
|
|
6
|
+
var MEASURE_SIZE = 200;
|
|
7
|
+
export function previewImage(file) {
|
|
8
|
+
return new Promise(function (resolve) {
|
|
9
|
+
if (!file || !file.type || !isImageFileType(file.type)) {
|
|
10
|
+
resolve('');
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
var img = new Image();
|
|
14
|
+
img.onload = function () {
|
|
15
|
+
var width = img.width,
|
|
16
|
+
height = img.height;
|
|
17
|
+
var ratio = width / height;
|
|
18
|
+
var MEASURE_SIZE_WIDTH = ratio > 1 ? MEASURE_SIZE : MEASURE_SIZE * ratio;
|
|
19
|
+
var MEASURE_SIZE_HEIGHT = ratio > 1 ? MEASURE_SIZE / ratio : MEASURE_SIZE;
|
|
20
|
+
var canvas = document.createElement('canvas');
|
|
21
|
+
canvas.width = MEASURE_SIZE_WIDTH;
|
|
22
|
+
canvas.height = MEASURE_SIZE_HEIGHT;
|
|
23
|
+
canvas.style.cssText = "position: fixed; left: 0; top: 0; width: ".concat(MEASURE_SIZE_WIDTH, "px; height: ").concat(MEASURE_SIZE_HEIGHT, "px; z-index: 9999; display: none;");
|
|
24
|
+
document.body.appendChild(canvas);
|
|
25
|
+
var ctx = canvas.getContext('2d');
|
|
26
|
+
ctx.drawImage(img, 0, 0, MEASURE_SIZE_WIDTH, MEASURE_SIZE_HEIGHT);
|
|
27
|
+
var dataURL = canvas.toDataURL();
|
|
28
|
+
document.body.removeChild(canvas);
|
|
29
|
+
window.URL.revokeObjectURL(img.src);
|
|
30
|
+
resolve(dataURL);
|
|
31
|
+
};
|
|
32
|
+
img.crossOrigin = 'anonymous';
|
|
33
|
+
if (file.type.startsWith('image/svg+xml')) {
|
|
34
|
+
var reader = new FileReader();
|
|
35
|
+
reader.onload = function () {
|
|
36
|
+
if (reader.result && typeof reader.result === 'string') {
|
|
37
|
+
img.src = reader.result;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
reader.readAsDataURL(file);
|
|
41
|
+
} else if (file.type.startsWith('image/gif')) {
|
|
42
|
+
var _reader = new FileReader();
|
|
43
|
+
_reader.onload = function () {
|
|
44
|
+
if (_reader.result) {
|
|
45
|
+
resolve(_reader.result);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
_reader.readAsDataURL(file);
|
|
49
|
+
} else {
|
|
50
|
+
img.src = window.URL.createObjectURL(file);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BubbleProps } from './interface';
|
|
3
|
+
import './style/avatar.less';
|
|
4
|
+
interface AvatarProps extends Pick<BubbleProps, 'avatar' | 'msgStatus' | 'prefixCls'> {
|
|
5
|
+
isAssistant?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
declare const Avatar: React.FC<AvatarProps>;
|
|
10
|
+
export default Avatar;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
|
+
import { Avatar as AAvatar } from 'antd';
|
|
6
|
+
import classnames from 'classnames';
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import "./style/avatar.less";
|
|
9
|
+
var Avatar = function Avatar(props) {
|
|
10
|
+
var avatar = props.avatar,
|
|
11
|
+
msgStatus = props.msgStatus,
|
|
12
|
+
isAssistant = props.isAssistant,
|
|
13
|
+
prefixCls = props.prefixCls,
|
|
14
|
+
className = props.className,
|
|
15
|
+
style = props.style;
|
|
16
|
+
var avatarNode = /*#__PURE__*/React.isValidElement(avatar) ? avatar : /*#__PURE__*/React.createElement(AAvatar, avatar);
|
|
17
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
18
|
+
className: classnames("".concat(prefixCls, "-avatar"), _defineProperty({}, "".concat(prefixCls, "-avatar-loading"), isAssistant && msgStatus === 'generating'), className),
|
|
19
|
+
style: style
|
|
20
|
+
}, avatarNode);
|
|
21
|
+
};
|
|
22
|
+
export default Avatar;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { BubbleProps } from './interface';
|
|
3
|
+
export interface BubbleRef {
|
|
4
|
+
nativeElement: HTMLElement;
|
|
5
|
+
}
|
|
6
|
+
export interface BubbleContextProps {
|
|
7
|
+
onUpdate?: VoidFunction;
|
|
8
|
+
}
|
|
9
|
+
export declare const BubbleContext: React.Context<BubbleContextProps>;
|
|
10
|
+
declare const _default: React.NamedExoticComponent<BubbleProps<string>>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
+
import classnames from 'classnames';
|
|
14
|
+
import React from 'react';
|
|
15
|
+
import { Space } from 'antd';
|
|
16
|
+
import useStyle from "./style";
|
|
17
|
+
import { Markdown, useProviderContext } from "./..";
|
|
18
|
+
import Cards from "./Cards";
|
|
19
|
+
import Spin from "./Spin";
|
|
20
|
+
import Avatar from "./Avatar";
|
|
21
|
+
export var BubbleContext = /*#__PURE__*/React.createContext({});
|
|
22
|
+
var Bubble = function Bubble(props) {
|
|
23
|
+
var customizePrefixCls = props.prefixCls,
|
|
24
|
+
className = props.className,
|
|
25
|
+
rootClassName = props.rootClassName,
|
|
26
|
+
style = props.style,
|
|
27
|
+
_props$classNames = props.classNames,
|
|
28
|
+
classNames = _props$classNames === void 0 ? {} : _props$classNames,
|
|
29
|
+
_props$styles = props.styles,
|
|
30
|
+
styles = _props$styles === void 0 ? {} : _props$styles,
|
|
31
|
+
avatar = props.avatar,
|
|
32
|
+
_props$content = props.content,
|
|
33
|
+
content = _props$content === void 0 ? '' : _props$content,
|
|
34
|
+
cards = props.cards,
|
|
35
|
+
variant = props.variant,
|
|
36
|
+
shape = props.shape,
|
|
37
|
+
msgStatus = props.msgStatus,
|
|
38
|
+
id = props.id,
|
|
39
|
+
role = props.role;
|
|
40
|
+
var placement = {
|
|
41
|
+
'assistant': 'start',
|
|
42
|
+
'user': 'end'
|
|
43
|
+
}[role] || 'start';
|
|
44
|
+
var _useProviderContext = useProviderContext(),
|
|
45
|
+
getPrefixCls = _useProviderContext.getPrefixCls;
|
|
46
|
+
var prefixCls = getPrefixCls('bubble', customizePrefixCls);
|
|
47
|
+
var _useStyle = useStyle(prefixCls),
|
|
48
|
+
_useStyle2 = _slicedToArray(_useStyle, 3),
|
|
49
|
+
wrapCSSVar = _useStyle2[0],
|
|
50
|
+
hashId = _useStyle2[1],
|
|
51
|
+
cssVarCls = _useStyle2[2];
|
|
52
|
+
var mergedCls = classnames(prefixCls, rootClassName, className, hashId, cssVarCls, "".concat(prefixCls, "-").concat(placement));
|
|
53
|
+
var contentNode;
|
|
54
|
+
// @ts-ignore
|
|
55
|
+
var isEmpty = !(content !== null && content !== void 0 && content.length) && !(cards !== null && cards !== void 0 && cards.length);
|
|
56
|
+
if (props.msgStatus === 'generating' && isEmpty) {
|
|
57
|
+
contentNode = /*#__PURE__*/React.createElement(Spin, null);
|
|
58
|
+
} else {
|
|
59
|
+
contentNode = content ? /*#__PURE__*/React.createElement(Markdown, {
|
|
60
|
+
typing: true,
|
|
61
|
+
content: content,
|
|
62
|
+
cursor: props.msgStatus === 'generating'
|
|
63
|
+
}) : null;
|
|
64
|
+
}
|
|
65
|
+
var isAssistant = placement === 'assistant' || placement === 'start';
|
|
66
|
+
var variantClassname = "".concat(prefixCls, "-content-").concat(variant || (isAssistant ? 'borderless' : 'filled'));
|
|
67
|
+
var fullContent = /*#__PURE__*/React.createElement(Space, {
|
|
68
|
+
direction: "vertical",
|
|
69
|
+
style: !isAssistant && contentNode ? {
|
|
70
|
+
flexDirection: 'column-reverse'
|
|
71
|
+
} : {},
|
|
72
|
+
className: "".concat(prefixCls, "-content-wrapper"),
|
|
73
|
+
classNames: {
|
|
74
|
+
item: "".concat(prefixCls, "-content-wrapper-card")
|
|
75
|
+
}
|
|
76
|
+
}, Cards({
|
|
77
|
+
cards: cards,
|
|
78
|
+
id: id,
|
|
79
|
+
className: classnames("".concat(prefixCls, "-content"), variantClassname, shape && "".concat(prefixCls, "-content-").concat(shape), classNames.content)
|
|
80
|
+
}), contentNode && /*#__PURE__*/React.createElement("div", {
|
|
81
|
+
style: _objectSpread({}, styles.content),
|
|
82
|
+
className: classnames("".concat(prefixCls, "-content"), variantClassname, shape && "".concat(prefixCls, "-content-").concat(shape), classNames.content)
|
|
83
|
+
}, contentNode));
|
|
84
|
+
var node = wrapCSSVar( /*#__PURE__*/React.createElement("div", {
|
|
85
|
+
style: style,
|
|
86
|
+
className: mergedCls,
|
|
87
|
+
id: id,
|
|
88
|
+
"data-role": role
|
|
89
|
+
}, avatar && /*#__PURE__*/React.createElement(Avatar, {
|
|
90
|
+
avatar: avatar,
|
|
91
|
+
msgStatus: msgStatus,
|
|
92
|
+
isAssistant: isAssistant,
|
|
93
|
+
prefixCls: prefixCls,
|
|
94
|
+
className: classNames.avatar,
|
|
95
|
+
style: styles.avatar
|
|
96
|
+
}), fullContent));
|
|
97
|
+
return node;
|
|
98
|
+
};
|
|
99
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
100
|
+
Bubble.displayName = 'Bubble';
|
|
101
|
+
}
|
|
102
|
+
export default /*#__PURE__*/React.memo(Bubble);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { BubbleProps } from './interface';
|
|
3
|
+
import './style/list.less';
|
|
4
|
+
export interface BubbleListRef {
|
|
5
|
+
scrollToBottom(): void;
|
|
6
|
+
}
|
|
7
|
+
export type BubbleDataType = BubbleProps & {
|
|
8
|
+
key?: string | number;
|
|
9
|
+
role?: string;
|
|
10
|
+
};
|
|
11
|
+
export interface BubbleListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
12
|
+
items?: BubbleDataType[];
|
|
13
|
+
}
|
|
14
|
+
declare const ForwardBubbleList: React.ForwardRefExoticComponent<BubbleListProps & React.RefAttributes<BubbleListRef>>;
|
|
15
|
+
export default ForwardBubbleList;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var _excluded = ["key"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { useProviderContext } from "./..";
|
|
7
|
+
import Bubble from "./Bubble";
|
|
8
|
+
import ScrollToBottom from "./ScrollToBottom";
|
|
9
|
+
import { StickToBottom } from 'use-stick-to-bottom';
|
|
10
|
+
import "./style/list.less";
|
|
11
|
+
var BubbleList = function BubbleList(props, ref) {
|
|
12
|
+
var _props$items = props.items,
|
|
13
|
+
items = _props$items === void 0 ? [] : _props$items;
|
|
14
|
+
var scrollToBottomRef = React.useRef();
|
|
15
|
+
var _useProviderContext = useProviderContext(),
|
|
16
|
+
getPrefixCls = _useProviderContext.getPrefixCls;
|
|
17
|
+
var prefixCls = getPrefixCls('bubble-list');
|
|
18
|
+
React.useImperativeHandle(ref, function () {
|
|
19
|
+
return {
|
|
20
|
+
scrollToBottom: function scrollToBottom() {
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
scrollToBottomRef.current.scrollToBottom();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
return /*#__PURE__*/React.createElement(StickToBottom, {
|
|
27
|
+
className: "".concat(prefixCls, "-wrapper"),
|
|
28
|
+
resize: "smooth",
|
|
29
|
+
initial: "smooth",
|
|
30
|
+
style: props.style
|
|
31
|
+
}, /*#__PURE__*/React.createElement(StickToBottom.Content, {
|
|
32
|
+
className: "".concat(prefixCls)
|
|
33
|
+
}, items.map(function (_ref) {
|
|
34
|
+
var key = _ref.key,
|
|
35
|
+
bubble = _objectWithoutProperties(_ref, _excluded);
|
|
36
|
+
return /*#__PURE__*/React.createElement(Bubble, _extends({}, bubble, {
|
|
37
|
+
key: bubble.id || key
|
|
38
|
+
}));
|
|
39
|
+
})), /*#__PURE__*/React.createElement(ScrollToBottom, {
|
|
40
|
+
ref: scrollToBottomRef
|
|
41
|
+
}));
|
|
42
|
+
};
|
|
43
|
+
var ForwardBubbleList = /*#__PURE__*/React.forwardRef(BubbleList);
|
|
44
|
+
export default ForwardBubbleList;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function Card(props: {
|
|
3
|
+
code: string;
|
|
4
|
+
component?: React.FC;
|
|
5
|
+
data?: string | any;
|
|
6
|
+
index: number;
|
|
7
|
+
id: string;
|
|
8
|
+
}): any;
|
|
9
|
+
export default function Cards(props: {
|
|
10
|
+
cards: {
|
|
11
|
+
code: string;
|
|
12
|
+
component?: React.FC;
|
|
13
|
+
data?: string | any;
|
|
14
|
+
}[];
|
|
15
|
+
id: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
}): React.JSX.Element[];
|
|
18
|
+
export declare function createCard(code: string, data: any): {
|
|
19
|
+
code: string;
|
|
20
|
+
data: any;
|
|
21
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { useCustomCardsContext } from "./..";
|
|
3
|
+
export function Card(props) {
|
|
4
|
+
var cardConfig = useCustomCardsContext();
|
|
5
|
+
var Component = useMemo(function () {
|
|
6
|
+
if (props.component) return props.component;
|
|
7
|
+
var cardConfigMap = cardConfig;
|
|
8
|
+
return (cardConfigMap === null || cardConfigMap === void 0 ? void 0 : cardConfigMap[props.code]) || function () {
|
|
9
|
+
return "".concat(props.code, " not found");
|
|
10
|
+
};
|
|
11
|
+
}, []);
|
|
12
|
+
if (typeof Component === 'function') {
|
|
13
|
+
return /*#__PURE__*/React.createElement(Component, {
|
|
14
|
+
code: props.code,
|
|
15
|
+
data: props.data,
|
|
16
|
+
index: props.index,
|
|
17
|
+
id: props.id
|
|
18
|
+
});
|
|
19
|
+
} else {
|
|
20
|
+
return Component;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export default function Cards(props) {
|
|
24
|
+
var cards = props.cards;
|
|
25
|
+
if (!(cards !== null && cards !== void 0 && cards.length)) return null;
|
|
26
|
+
return cards.map(function (card, index) {
|
|
27
|
+
var cardComp = /*#__PURE__*/React.createElement(Card, {
|
|
28
|
+
key: index,
|
|
29
|
+
code: card.code,
|
|
30
|
+
component: card.component,
|
|
31
|
+
data: card.data,
|
|
32
|
+
index: index,
|
|
33
|
+
id: props.id
|
|
34
|
+
});
|
|
35
|
+
if (card.code === 'Text') return /*#__PURE__*/React.createElement("div", {
|
|
36
|
+
className: props.className,
|
|
37
|
+
key: index
|
|
38
|
+
}, cardComp);
|
|
39
|
+
return cardComp;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
export function createCard(code, data) {
|
|
43
|
+
return {
|
|
44
|
+
code: code,
|
|
45
|
+
data: data
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style/scrollToBottom.less';
|
|
3
|
+
import { ScrollToBottomOptions } from 'use-stick-to-bottom';
|
|
4
|
+
declare const _default: React.ForwardRefExoticComponent<React.RefAttributes<{
|
|
5
|
+
scrollToBottom(options?: ScrollToBottomOptions): void;
|
|
6
|
+
}>>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useProviderContext } from "./..";
|
|
3
|
+
import "./style/scrollToBottom.less";
|
|
4
|
+
import { Button } from 'antd';
|
|
5
|
+
import { ArrowDownOutlined } from '@ant-design/icons';
|
|
6
|
+
import cls from 'classnames';
|
|
7
|
+
import { useStickToBottomContext } from 'use-stick-to-bottom';
|
|
8
|
+
var ScrollToBottomButton = function ScrollToBottomButton(_, ref) {
|
|
9
|
+
var _useProviderContext = useProviderContext(),
|
|
10
|
+
getPrefixCls = _useProviderContext.getPrefixCls;
|
|
11
|
+
var _useStickToBottomCont = useStickToBottomContext(),
|
|
12
|
+
isAtBottom = _useStickToBottomCont.isAtBottom,
|
|
13
|
+
scrollToBottom = _useStickToBottomCont.scrollToBottom;
|
|
14
|
+
React.useImperativeHandle(ref, function () {
|
|
15
|
+
return {
|
|
16
|
+
scrollToBottom: function (_scrollToBottom) {
|
|
17
|
+
function scrollToBottom(_x) {
|
|
18
|
+
return _scrollToBottom.apply(this, arguments);
|
|
19
|
+
}
|
|
20
|
+
scrollToBottom.toString = function () {
|
|
21
|
+
return _scrollToBottom.toString();
|
|
22
|
+
};
|
|
23
|
+
return scrollToBottom;
|
|
24
|
+
}(function (options) {
|
|
25
|
+
options = options || {
|
|
26
|
+
animation: 'instant'
|
|
27
|
+
};
|
|
28
|
+
scrollToBottom(options);
|
|
29
|
+
})
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
var prefixCls = getPrefixCls('bubble-list-scroll-to-bottom');
|
|
33
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
34
|
+
className: cls(prefixCls, "".concat(prefixCls, "-").concat(!isAtBottom ? 'show' : 'hide'))
|
|
35
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
36
|
+
onClick: function onClick() {
|
|
37
|
+
return scrollToBottom({
|
|
38
|
+
animation: 'instant'
|
|
39
|
+
});
|
|
40
|
+
},
|
|
41
|
+
icon: /*#__PURE__*/React.createElement(ArrowDownOutlined, null),
|
|
42
|
+
shape: "circle"
|
|
43
|
+
}));
|
|
44
|
+
};
|
|
45
|
+
export default /*#__PURE__*/React.forwardRef(ScrollToBottomButton);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { useProviderContext } from "./..";
|
|
3
|
+
export default function () {
|
|
4
|
+
var _useProviderContext = useProviderContext(),
|
|
5
|
+
getPrefixCls = _useProviderContext.getPrefixCls;
|
|
6
|
+
var prefixCls = getPrefixCls('bubble-loading');
|
|
7
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
8
|
+
className: prefixCls
|
|
9
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
10
|
+
className: "".concat(prefixCls, "-dot1")
|
|
11
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
12
|
+
className: "".concat(prefixCls, "-dot2")
|
|
13
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
14
|
+
className: "".concat(prefixCls, "-dot3")
|
|
15
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
className: "".concat(prefixCls, "-text")
|
|
17
|
+
}, "-"));
|
|
18
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|