@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,62 @@
|
|
|
1
|
+
import type { MenuProps } from 'antd';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { Conversation, Groupable } from './interface';
|
|
4
|
+
/**
|
|
5
|
+
* @desc 会话列表组件参数
|
|
6
|
+
* @descEN Props for the conversation list component
|
|
7
|
+
*/
|
|
8
|
+
export interface ConversationsProps extends React.HTMLAttributes<HTMLUListElement> {
|
|
9
|
+
/**
|
|
10
|
+
* @desc 会话列表数据源
|
|
11
|
+
* @descEN Data source for the conversation list
|
|
12
|
+
*/
|
|
13
|
+
items?: Conversation[];
|
|
14
|
+
/**
|
|
15
|
+
* @desc 当前选中的值
|
|
16
|
+
* @descEN Currently selected value
|
|
17
|
+
*/
|
|
18
|
+
activeKey?: Conversation['key'];
|
|
19
|
+
/**
|
|
20
|
+
* @desc 默认选中值
|
|
21
|
+
* @descEN Default selected value
|
|
22
|
+
*/
|
|
23
|
+
defaultActiveKey?: Conversation['key'];
|
|
24
|
+
/**
|
|
25
|
+
* @desc 选中变更回调
|
|
26
|
+
* @descEN Callback for selection change
|
|
27
|
+
*/
|
|
28
|
+
onActiveChange?: (value: string) => void;
|
|
29
|
+
/**
|
|
30
|
+
* @desc 会话操作菜单
|
|
31
|
+
* @descEN Operation menu for conversations
|
|
32
|
+
*/
|
|
33
|
+
menu?: MenuProps | ((value: Conversation) => MenuProps);
|
|
34
|
+
/**
|
|
35
|
+
* @desc 是否支持分组, 开启后默认按 {@link Conversation.group} 字段分组
|
|
36
|
+
* @descEN If grouping is supported, it defaults to the {@link Conversation.group} field
|
|
37
|
+
*/
|
|
38
|
+
groupable?: boolean | Groupable;
|
|
39
|
+
/**
|
|
40
|
+
* @desc 语义化结构 style
|
|
41
|
+
* @descEN Semantic structure styles
|
|
42
|
+
*/
|
|
43
|
+
styles?: Partial<Record<'item', React.CSSProperties>>;
|
|
44
|
+
/**
|
|
45
|
+
* @desc 语义化结构 className
|
|
46
|
+
* @descEN Semantic structure class names
|
|
47
|
+
*/
|
|
48
|
+
classNames?: Partial<Record<'item', string>>;
|
|
49
|
+
/**
|
|
50
|
+
* @desc 自定义前缀
|
|
51
|
+
* @descEN Prefix
|
|
52
|
+
*/
|
|
53
|
+
prefixCls?: string;
|
|
54
|
+
/**
|
|
55
|
+
* @desc 自定义根类名
|
|
56
|
+
* @descEN Custom class name
|
|
57
|
+
*/
|
|
58
|
+
rootClassName?: string;
|
|
59
|
+
}
|
|
60
|
+
declare const Conversations: React.FC<ConversationsProps>;
|
|
61
|
+
export type { Conversation };
|
|
62
|
+
export default Conversations;
|
|
@@ -0,0 +1,124 @@
|
|
|
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
|
+
var _excluded = ["prefixCls", "rootClassName", "items", "activeKey", "defaultActiveKey", "onActiveChange", "menu", "styles", "classNames", "groupable", "className", "style"];
|
|
3
|
+
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); }
|
|
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
|
+
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; }
|
|
14
|
+
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; }
|
|
15
|
+
import classnames from 'classnames';
|
|
16
|
+
import React from 'react';
|
|
17
|
+
import GroupTitle, { GroupTitleContext } from "./GroupTitle";
|
|
18
|
+
import ConversationsItem from "./Item";
|
|
19
|
+
import useMergedState from 'rc-util/lib/hooks/useMergedState';
|
|
20
|
+
import { useProviderContext } from "./..";
|
|
21
|
+
import useGroupable from "./hooks/useGroupable";
|
|
22
|
+
import useStyle from "./style";
|
|
23
|
+
import pickAttrs from 'rc-util/lib/pickAttrs';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @desc 会话列表组件参数
|
|
27
|
+
* @descEN Props for the conversation list component
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
var Conversations = function Conversations(props) {
|
|
31
|
+
var customizePrefixCls = props.prefixCls,
|
|
32
|
+
rootClassName = props.rootClassName,
|
|
33
|
+
items = props.items,
|
|
34
|
+
activeKey = props.activeKey,
|
|
35
|
+
defaultActiveKey = props.defaultActiveKey,
|
|
36
|
+
onActiveChange = props.onActiveChange,
|
|
37
|
+
menu = props.menu,
|
|
38
|
+
_props$styles = props.styles,
|
|
39
|
+
styles = _props$styles === void 0 ? {} : _props$styles,
|
|
40
|
+
_props$classNames = props.classNames,
|
|
41
|
+
classNames = _props$classNames === void 0 ? {} : _props$classNames,
|
|
42
|
+
groupable = props.groupable,
|
|
43
|
+
className = props.className,
|
|
44
|
+
style = props.style,
|
|
45
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
46
|
+
var domProps = pickAttrs(restProps, {
|
|
47
|
+
attr: true,
|
|
48
|
+
aria: true,
|
|
49
|
+
data: true
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// ============================ ActiveKey ============================
|
|
53
|
+
var _useMergedState = useMergedState(defaultActiveKey, {
|
|
54
|
+
value: activeKey
|
|
55
|
+
}),
|
|
56
|
+
_useMergedState2 = _slicedToArray(_useMergedState, 2),
|
|
57
|
+
mergedActiveKey = _useMergedState2[0],
|
|
58
|
+
setMergedActiveKey = _useMergedState2[1];
|
|
59
|
+
var _useGroupable = useGroupable(groupable, items),
|
|
60
|
+
_useGroupable2 = _slicedToArray(_useGroupable, 2),
|
|
61
|
+
groupList = _useGroupable2[0],
|
|
62
|
+
enableGroup = _useGroupable2[1];
|
|
63
|
+
var _useProviderContext = useProviderContext(),
|
|
64
|
+
getPrefixCls = _useProviderContext.getPrefixCls,
|
|
65
|
+
direction = _useProviderContext.direction;
|
|
66
|
+
var prefixCls = getPrefixCls('conversations', customizePrefixCls);
|
|
67
|
+
var _useStyle = useStyle(prefixCls),
|
|
68
|
+
_useStyle2 = _slicedToArray(_useStyle, 3),
|
|
69
|
+
wrapCSSVar = _useStyle2[0],
|
|
70
|
+
hashId = _useStyle2[1],
|
|
71
|
+
cssVarCls = _useStyle2[2];
|
|
72
|
+
var mergedCls = classnames(prefixCls, className, rootClassName, hashId, cssVarCls, _defineProperty({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'));
|
|
73
|
+
var onConversationItemClick = function onConversationItemClick(info) {
|
|
74
|
+
setMergedActiveKey(info.key);
|
|
75
|
+
if (onActiveChange) {
|
|
76
|
+
onActiveChange(info.key);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
// ============================ Render ============================
|
|
81
|
+
return wrapCSSVar( /*#__PURE__*/React.createElement("ul", _extends({}, domProps, {
|
|
82
|
+
style: style,
|
|
83
|
+
className: mergedCls
|
|
84
|
+
}), groupList.map(function (groupInfo, groupIndex) {
|
|
85
|
+
var convItems = groupInfo.data.map(function (convInfo, convIndex) {
|
|
86
|
+
return /*#__PURE__*/React.createElement(ConversationsItem, {
|
|
87
|
+
key: convInfo.key || "key-".concat(convIndex),
|
|
88
|
+
info: convInfo,
|
|
89
|
+
prefixCls: prefixCls,
|
|
90
|
+
direction: direction,
|
|
91
|
+
className: classnames(classNames.item),
|
|
92
|
+
style: styles.item,
|
|
93
|
+
menu: typeof menu === 'function' ? menu(convInfo) : menu,
|
|
94
|
+
active: mergedActiveKey === convInfo.key,
|
|
95
|
+
onClick: onConversationItemClick
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
// With group to show the title
|
|
100
|
+
if (enableGroup) {
|
|
101
|
+
var _groupInfo$title;
|
|
102
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
103
|
+
key: groupInfo.name || "key-".concat(groupIndex)
|
|
104
|
+
}, /*#__PURE__*/React.createElement(GroupTitleContext.Provider, {
|
|
105
|
+
value: {
|
|
106
|
+
prefixCls: prefixCls
|
|
107
|
+
}
|
|
108
|
+
}, ((_groupInfo$title = groupInfo.title) === null || _groupInfo$title === void 0 ? void 0 : _groupInfo$title.call(groupInfo, groupInfo.name, {
|
|
109
|
+
components: {
|
|
110
|
+
GroupTitle: GroupTitle
|
|
111
|
+
}
|
|
112
|
+
})) || /*#__PURE__*/React.createElement(GroupTitle, {
|
|
113
|
+
key: groupInfo.name
|
|
114
|
+
}, groupInfo.name)), /*#__PURE__*/React.createElement("ul", {
|
|
115
|
+
className: "".concat(prefixCls, "-list")
|
|
116
|
+
}, convItems));
|
|
117
|
+
}
|
|
118
|
+
return convItems;
|
|
119
|
+
})));
|
|
120
|
+
};
|
|
121
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
122
|
+
Conversations.displayName = 'Conversations';
|
|
123
|
+
}
|
|
124
|
+
export default Conversations;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { AnyObject } from '../_util/type';
|
|
3
|
+
import type { GroupTitleProps } from './GroupTitle';
|
|
4
|
+
type GroupType = string;
|
|
5
|
+
/**
|
|
6
|
+
* @desc 会话数据
|
|
7
|
+
* @descEN Conversation data
|
|
8
|
+
*/
|
|
9
|
+
export interface Conversation extends AnyObject {
|
|
10
|
+
/**
|
|
11
|
+
* @desc 唯一标识
|
|
12
|
+
* @descEN Unique identifier
|
|
13
|
+
*/
|
|
14
|
+
key: string;
|
|
15
|
+
/**
|
|
16
|
+
* @desc 会话名称
|
|
17
|
+
* @descEN Conversation name
|
|
18
|
+
*/
|
|
19
|
+
label?: React.ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* @desc 会话时间戳
|
|
22
|
+
* @descEN Conversation timestamp
|
|
23
|
+
*/
|
|
24
|
+
timestamp?: number;
|
|
25
|
+
/**
|
|
26
|
+
* @desc 会话分组类型,与 {@link ConversationsProps.groupable} 联动
|
|
27
|
+
* @descEN Conversation type
|
|
28
|
+
*/
|
|
29
|
+
group?: GroupType;
|
|
30
|
+
/**
|
|
31
|
+
* @desc 会话图标
|
|
32
|
+
* @descEN conversation icon
|
|
33
|
+
*/
|
|
34
|
+
icon?: React.ReactNode;
|
|
35
|
+
/**
|
|
36
|
+
* @desc 是否禁用
|
|
37
|
+
* @descEN Whether to disable
|
|
38
|
+
*/
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export type GroupSorter = Parameters<GroupType[]['sort']>[0];
|
|
42
|
+
export type GroupTitleRenderComponents = {
|
|
43
|
+
components: {
|
|
44
|
+
GroupTitle: React.ComponentType<GroupTitleProps>;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export type GroupTitleRender = ((group: GroupType, info: GroupTitleRenderComponents) => React.ReactNode) | undefined;
|
|
48
|
+
export interface Groupable {
|
|
49
|
+
/**
|
|
50
|
+
* @desc 分组排序函数
|
|
51
|
+
* @descEN Group sorter
|
|
52
|
+
*/
|
|
53
|
+
sort?: GroupSorter;
|
|
54
|
+
/**
|
|
55
|
+
* @desc 自定义分组标签渲染
|
|
56
|
+
* @descEN Semantic custom rendering
|
|
57
|
+
*/
|
|
58
|
+
title?: GroupTitleRender;
|
|
59
|
+
}
|
|
60
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { FullToken, GetDefaultToken } from '../../theme/cssinjs-utils';
|
|
3
|
+
export interface ComponentToken {
|
|
4
|
+
}
|
|
5
|
+
export interface ConversationsToken extends FullToken<'Conversations'> {
|
|
6
|
+
}
|
|
7
|
+
export declare const prepareComponentToken: GetDefaultToken<'Conversations'>;
|
|
8
|
+
declare const _default: (prefixCls: string, rootCls?: string) => readonly [(node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>, string, string];
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,80 @@
|
|
|
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 { unit } from '@ant-design/cssinjs';
|
|
6
|
+
import { mergeToken } from '@ant-design/cssinjs-utils';
|
|
7
|
+
import { genStyleHooks } from "../../theme/genStyleUtils";
|
|
8
|
+
|
|
9
|
+
// biome-ignore lint/suspicious/noEmptyInterface: ComponentToken need to be empty by default
|
|
10
|
+
|
|
11
|
+
var genConversationsStyle = function genConversationsStyle(token) {
|
|
12
|
+
var componentCls = token.componentCls;
|
|
13
|
+
return _defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
14
|
+
display: 'flex',
|
|
15
|
+
flexDirection: 'column',
|
|
16
|
+
gap: 8,
|
|
17
|
+
overflowY: 'auto',
|
|
18
|
+
padding: 0,
|
|
19
|
+
margin: 0
|
|
20
|
+
}, "&".concat(componentCls, "-rtl"), {
|
|
21
|
+
direction: 'rtl'
|
|
22
|
+
}), "& ".concat(componentCls, "-list"), _defineProperty(_defineProperty({
|
|
23
|
+
display: 'flex',
|
|
24
|
+
gap: token.paddingXXS,
|
|
25
|
+
flexDirection: 'column'
|
|
26
|
+
}, "& ".concat(componentCls, "-item"), {
|
|
27
|
+
paddingInlineStart: token.paddingXL
|
|
28
|
+
}), "& ".concat(componentCls, "-label"), {
|
|
29
|
+
color: token.colorTextDescription
|
|
30
|
+
})), "& ".concat(componentCls, "-item"), {
|
|
31
|
+
display: 'flex',
|
|
32
|
+
height: token.controlHeightLG,
|
|
33
|
+
minHeight: token.controlHeightLG,
|
|
34
|
+
gap: token.paddingXS,
|
|
35
|
+
padding: "0 ".concat(unit(token.paddingXS)),
|
|
36
|
+
alignItems: 'center',
|
|
37
|
+
borderRadius: token.borderRadiusLG,
|
|
38
|
+
cursor: 'pointer',
|
|
39
|
+
transition: "all ".concat(token.motionDurationMid, " ").concat(token.motionEaseInOut),
|
|
40
|
+
// 悬浮样式
|
|
41
|
+
'&:hover': {
|
|
42
|
+
backgroundColor: token.colorBgTextHover
|
|
43
|
+
},
|
|
44
|
+
// 选中样式
|
|
45
|
+
'&-active': _defineProperty({
|
|
46
|
+
backgroundColor: token.colorBgTextHover
|
|
47
|
+
}, "& ".concat(componentCls, "-label, ").concat(componentCls, "-menu-icon"), {
|
|
48
|
+
color: token.colorText
|
|
49
|
+
}),
|
|
50
|
+
// 禁用样式
|
|
51
|
+
'&-disabled': _defineProperty({
|
|
52
|
+
cursor: 'not-allowed'
|
|
53
|
+
}, "& ".concat(componentCls, "-label"), {
|
|
54
|
+
color: token.colorTextDisabled
|
|
55
|
+
}),
|
|
56
|
+
// 悬浮、选中时激活操作菜单
|
|
57
|
+
'&:hover, &-active': _defineProperty({}, "& ".concat(componentCls, "-menu-icon"), {
|
|
58
|
+
opacity: 1
|
|
59
|
+
})
|
|
60
|
+
}), "& ".concat(componentCls, "-label"), {
|
|
61
|
+
flex: 1,
|
|
62
|
+
color: token.colorText
|
|
63
|
+
}), "& ".concat(componentCls, "-menu-icon"), {
|
|
64
|
+
opacity: 0,
|
|
65
|
+
fontSize: token.fontSizeXL
|
|
66
|
+
}), "& ".concat(componentCls, "-group-title"), {
|
|
67
|
+
display: 'flex',
|
|
68
|
+
alignItems: 'center',
|
|
69
|
+
height: token.controlHeightLG,
|
|
70
|
+
minHeight: token.controlHeightLG,
|
|
71
|
+
padding: "0 ".concat(unit(token.paddingXS))
|
|
72
|
+
}));
|
|
73
|
+
};
|
|
74
|
+
export var prepareComponentToken = function prepareComponentToken() {
|
|
75
|
+
return {};
|
|
76
|
+
};
|
|
77
|
+
export default genStyleHooks('Conversations', function (token) {
|
|
78
|
+
var compToken = mergeToken(token, {});
|
|
79
|
+
return genConversationsStyle(compToken);
|
|
80
|
+
}, prepareComponentToken);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useProviderContext } from "../..";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import "./index.less";
|
|
4
|
+
export default function (props) {
|
|
5
|
+
var _useProviderContext = useProviderContext(),
|
|
6
|
+
getPrefixCls = _useProviderContext.getPrefixCls;
|
|
7
|
+
var prefixCls = getPrefixCls('bubble-count');
|
|
8
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
9
|
+
className: prefixCls
|
|
10
|
+
}, props.data.map(function (item) {
|
|
11
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
12
|
+
className: "".concat(prefixCls, "-item"),
|
|
13
|
+
key: item[0]
|
|
14
|
+
}, item[0], "\uFF1A", item[1]);
|
|
15
|
+
}));
|
|
16
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@import '../../index.less';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
.@{ant-prefix}-bubble-count {
|
|
5
|
+
display: flex;
|
|
6
|
+
font-size: 12px;
|
|
7
|
+
line-height: 1;
|
|
8
|
+
padding: 4px 0;
|
|
9
|
+
color: e('var(--@{ant-prefix}-color-text-quaternary)');
|
|
10
|
+
|
|
11
|
+
.@{ant-prefix}-bubble-count-item + .@{ant-prefix}-bubble-count-item {
|
|
12
|
+
border-left: 1px solid e('var(--@{ant-prefix}-color-text-quaternary)');
|
|
13
|
+
padding: 0 6px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.@{ant-prefix}-bubble-count-item {
|
|
17
|
+
padding-right: 6px;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import "./index.less";
|
|
3
|
+
import { DeepThink } from "../..";
|
|
4
|
+
export default function (props) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(DeepThink, {
|
|
6
|
+
defaultOpen: true,
|
|
7
|
+
title: props.data.title,
|
|
8
|
+
loading: props.data.loading,
|
|
9
|
+
content: props.data.content
|
|
10
|
+
});
|
|
11
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Space } from 'antd';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Attachments } from "../..";
|
|
4
|
+
export default function Files(props) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(Space, null, props.data.map(function (file, index) {
|
|
6
|
+
return (
|
|
7
|
+
/*#__PURE__*/
|
|
8
|
+
// @ts-ignore
|
|
9
|
+
React.createElement(Attachments.FileCard, {
|
|
10
|
+
key: index,
|
|
11
|
+
item: {
|
|
12
|
+
name: file.filename,
|
|
13
|
+
size: file.bytes
|
|
14
|
+
}
|
|
15
|
+
})
|
|
16
|
+
);
|
|
17
|
+
}));
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export default function Footer(props: {
|
|
4
|
+
data: {
|
|
5
|
+
left?: React.ReactElement;
|
|
6
|
+
right?: React.ReactElement;
|
|
7
|
+
};
|
|
8
|
+
id: string;
|
|
9
|
+
}): React.JSX.Element;
|
|
10
|
+
export declare function FooterActions(props: {
|
|
11
|
+
data: {
|
|
12
|
+
icon: string | ReactElement;
|
|
13
|
+
label?: string;
|
|
14
|
+
onClick: () => void;
|
|
15
|
+
}[];
|
|
16
|
+
}): React.JSX.Element;
|
|
17
|
+
export declare function FooterCount(props: {
|
|
18
|
+
data: [string | number, string | number][];
|
|
19
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { useProviderContext } from "../..";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import "./index.less";
|
|
4
|
+
import { Button } from 'antd';
|
|
5
|
+
export default function Footer(props) {
|
|
6
|
+
var _useProviderContext = useProviderContext(),
|
|
7
|
+
getPrefixCls = _useProviderContext.getPrefixCls;
|
|
8
|
+
var prefixCls = getPrefixCls('bubble-footer');
|
|
9
|
+
var _props$data = props.data,
|
|
10
|
+
left = _props$data.left,
|
|
11
|
+
right = _props$data.right;
|
|
12
|
+
if (left && !left.type || right && !right.type) return null;
|
|
13
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
14
|
+
className: prefixCls
|
|
15
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
className: "".concat(prefixCls, "-left")
|
|
17
|
+
}, props.data.left), /*#__PURE__*/React.createElement("div", {
|
|
18
|
+
className: "".concat(prefixCls, "-right")
|
|
19
|
+
}, props.data.right));
|
|
20
|
+
}
|
|
21
|
+
export function FooterActions(props) {
|
|
22
|
+
var _useProviderContext2 = useProviderContext(),
|
|
23
|
+
getPrefixCls = _useProviderContext2.getPrefixCls;
|
|
24
|
+
var prefixCls = getPrefixCls('bubble-footer-actions');
|
|
25
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
className: prefixCls
|
|
27
|
+
}, props.data.map(function (item, index) {
|
|
28
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
29
|
+
key: index,
|
|
30
|
+
size: "small",
|
|
31
|
+
type: "text",
|
|
32
|
+
icon: item.icon,
|
|
33
|
+
onClick: item.onClick
|
|
34
|
+
});
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
;
|
|
38
|
+
export function FooterCount(props) {
|
|
39
|
+
var _useProviderContext3 = useProviderContext(),
|
|
40
|
+
getPrefixCls = _useProviderContext3.getPrefixCls;
|
|
41
|
+
var prefixCls = getPrefixCls('bubble-footer-count');
|
|
42
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
43
|
+
className: prefixCls
|
|
44
|
+
}, props.data.map(function (item) {
|
|
45
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
className: "".concat(prefixCls, "-item"),
|
|
47
|
+
key: item[0]
|
|
48
|
+
}, item[0], "\uFF1A", item[1]);
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@import '../../index.less';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
.@{ant-prefix}-bubble-footer {
|
|
5
|
+
margin-top: 8px;
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: space-between;
|
|
8
|
+
align-items: center;
|
|
9
|
+
font-size: 12px;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.@{ant-prefix}-bubble-footer-actions {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
gap: 8px;
|
|
17
|
+
|
|
18
|
+
&-item {
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
color: e('var(--@{ant-prefix}-color-text)');
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.@{ant-prefix}-bubble-footer-count {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
|
|
28
|
+
&-item {
|
|
29
|
+
color: e('var(--@{ant-prefix}-color-text-tertiary)');
|
|
30
|
+
line-height: 1;
|
|
31
|
+
padding-right: 13px;
|
|
32
|
+
margin-left: 13px;
|
|
33
|
+
border-right: 1px solid e('var(--@{ant-prefix}-color-border)');
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
|
|
36
|
+
&:last-of-type {
|
|
37
|
+
padding-right: 0;
|
|
38
|
+
border-right: 0;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useProviderContext } from "../..";
|
|
2
|
+
import { Space, Image as AntdImage, ConfigProvider } from 'antd';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import "./index.less";
|
|
5
|
+
function Image(image) {
|
|
6
|
+
var _useProviderContext = useProviderContext(),
|
|
7
|
+
getPrefixCls = _useProviderContext.getPrefixCls;
|
|
8
|
+
var prefixCls = getPrefixCls('bubble-image');
|
|
9
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
10
|
+
className: "".concat(prefixCls)
|
|
11
|
+
}, /*#__PURE__*/React.createElement(AntdImage, {
|
|
12
|
+
src: image.url,
|
|
13
|
+
width: 56,
|
|
14
|
+
height: 56,
|
|
15
|
+
preview: {
|
|
16
|
+
transitionName: ''
|
|
17
|
+
}
|
|
18
|
+
}));
|
|
19
|
+
}
|
|
20
|
+
export default function Files(props) {
|
|
21
|
+
return /*#__PURE__*/React.createElement(ConfigProvider, {
|
|
22
|
+
locale: {
|
|
23
|
+
Image: {
|
|
24
|
+
preview: ''
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}, /*#__PURE__*/React.createElement(Space, null, props.data.map(function (image, index) {
|
|
28
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
29
|
+
key: index,
|
|
30
|
+
url: image.url
|
|
31
|
+
});
|
|
32
|
+
})));
|
|
33
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
@import '../../index.less';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
.@{ant-prefix}-bubble-image {
|
|
5
|
+
border-radius: 8px;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
|
|
8
|
+
.@{ant-prefix}-image-img {
|
|
9
|
+
object-fit: cover;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.@{ant-prefix}-image-mask-info {
|
|
13
|
+
span {
|
|
14
|
+
margin-inline-end: 0 !important;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useProviderContext } from "../..";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import "./index.less";
|
|
4
|
+
import { CloseCircleFilled } from '@ant-design/icons';
|
|
5
|
+
function InterruptedIcon() {
|
|
6
|
+
var _useProviderContext = useProviderContext(),
|
|
7
|
+
getPrefixCls = _useProviderContext.getPrefixCls;
|
|
8
|
+
var prefixCls = getPrefixCls('interrupted');
|
|
9
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
10
|
+
className: "".concat(prefixCls, "-header-interrupted")
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function ErrorIcon() {
|
|
14
|
+
var _useProviderContext2 = useProviderContext(),
|
|
15
|
+
getPrefixCls = _useProviderContext2.getPrefixCls;
|
|
16
|
+
var prefixCls = getPrefixCls('interrupted');
|
|
17
|
+
return /*#__PURE__*/React.createElement(CloseCircleFilled, {
|
|
18
|
+
className: "".concat(prefixCls, "-header-error")
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
export default function Files(props) {
|
|
22
|
+
var _props$data = props.data,
|
|
23
|
+
_props$data$title = _props$data.title,
|
|
24
|
+
title = _props$data$title === void 0 ? 'Answers have stopped' : _props$data$title,
|
|
25
|
+
_props$data$type = _props$data.type,
|
|
26
|
+
type = _props$data$type === void 0 ? 'interrupted' : _props$data$type,
|
|
27
|
+
desc = _props$data.desc;
|
|
28
|
+
var _useProviderContext3 = useProviderContext(),
|
|
29
|
+
getPrefixCls = _useProviderContext3.getPrefixCls;
|
|
30
|
+
var prefixCls = getPrefixCls('interrupted');
|
|
31
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
32
|
+
className: "".concat(prefixCls)
|
|
33
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
34
|
+
className: "".concat(prefixCls, "-header")
|
|
35
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
36
|
+
className: "".concat(prefixCls, "-icon-wrapper")
|
|
37
|
+
}, type === 'interrupted' ? /*#__PURE__*/React.createElement(InterruptedIcon, null) : /*#__PURE__*/React.createElement(ErrorIcon, null)), /*#__PURE__*/React.createElement("span", null, title)), desc && /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
className: "".concat(prefixCls, "-desc")
|
|
39
|
+
}, desc));
|
|
40
|
+
}
|