@agentscope-ai/chat 1.1.4 → 1.1.8
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/LICENSE +74 -0
- package/README.md +156 -56
- package/README.zh-CN.md +188 -0
- package/lib/AGUI/components/HelpModal/icons.d.ts +5 -0
- package/lib/AGUI/components/HelpModal/icons.js +84 -0
- package/lib/AGUI/components/HelpModal/index.d.ts +1 -0
- package/lib/AGUI/components/HelpModal/index.js +1 -0
- package/lib/AGUI/components/HelpModal/modal.d.ts +1 -0
- package/lib/AGUI/components/HelpModal/modal.js +104 -0
- package/lib/AGUI/components/chat/Button.d.ts +2 -0
- package/lib/AGUI/components/chat/Button.js +27 -0
- package/lib/AGUI/components/chat/Chat.d.ts +242 -0
- package/lib/AGUI/components/chat/Chat.js +634 -0
- package/lib/AGUI/components/chat/ChatContext.d.ts +142 -0
- package/lib/AGUI/components/chat/ChatContext.js +75 -0
- package/lib/AGUI/components/chat/CodeBlock.d.ts +12 -0
- package/lib/AGUI/components/chat/CodeBlock.js +398 -0
- package/lib/AGUI/components/chat/Header.d.ts +2 -0
- package/lib/AGUI/components/chat/Header.js +28 -0
- package/lib/AGUI/components/chat/Icons.d.ts +16 -0
- package/lib/AGUI/components/chat/Icons.js +247 -0
- package/lib/AGUI/components/chat/ImageUploadQueue.d.ts +11 -0
- package/lib/AGUI/components/chat/ImageUploadQueue.js +65 -0
- package/lib/AGUI/components/chat/Input.d.ts +2 -0
- package/lib/AGUI/components/chat/Input.js +30 -0
- package/lib/AGUI/components/chat/Markdown.d.ts +7 -0
- package/lib/AGUI/components/chat/Markdown.js +187 -0
- package/lib/AGUI/components/chat/Messages.d.ts +7 -0
- package/lib/AGUI/components/chat/Messages.js +242 -0
- package/lib/AGUI/components/chat/Modal.d.ts +43 -0
- package/lib/AGUI/components/chat/Modal.js +113 -0
- package/lib/AGUI/components/chat/Popup.d.ts +49 -0
- package/lib/AGUI/components/chat/Popup.js +64 -0
- package/lib/AGUI/components/chat/PoweredByTag.d.ts +3 -0
- package/lib/AGUI/components/chat/PoweredByTag.js +27 -0
- package/lib/AGUI/components/chat/Sidebar.d.ts +2 -0
- package/lib/AGUI/components/chat/Sidebar.js +85 -0
- package/lib/AGUI/components/chat/Suggestion.d.ts +16 -0
- package/{dist/voice-chat/VoiceChatService/index.js → lib/AGUI/components/chat/Suggestion.js} +138 -201
- package/lib/AGUI/components/chat/Suggestions.d.ts +2 -0
- package/lib/AGUI/components/chat/Suggestions.js +21 -0
- package/lib/AGUI/components/chat/Textarea.d.ts +11 -0
- package/lib/AGUI/components/chat/Textarea.js +60 -0
- package/lib/AGUI/components/chat/Window.d.ts +2 -0
- package/lib/AGUI/components/chat/Window.js +115 -0
- package/lib/AGUI/components/chat/index.d.ts +11 -0
- package/lib/AGUI/components/chat/index.js +11 -0
- package/lib/AGUI/components/chat/messages/AssistantMessage.d.ts +2 -0
- package/lib/AGUI/components/chat/messages/AssistantMessage.js +56 -0
- package/lib/AGUI/components/chat/messages/RenderActionExecutionMessage.d.ts +2 -0
- package/lib/AGUI/components/chat/messages/RenderActionExecutionMessage.js +114 -0
- package/lib/AGUI/components/chat/messages/RenderAgentStateMessage.d.ts +2 -0
- package/lib/AGUI/components/chat/messages/RenderAgentStateMessage.js +97 -0
- package/lib/AGUI/components/chat/messages/RenderImageMessage.d.ts +2 -0
- package/lib/AGUI/components/chat/messages/RenderImageMessage.js +61 -0
- package/lib/AGUI/components/chat/messages/RenderResultMessage.d.ts +2 -0
- package/lib/AGUI/components/chat/messages/RenderResultMessage.js +27 -0
- package/lib/AGUI/components/chat/messages/RenderTextMessage.d.ts +2 -0
- package/lib/AGUI/components/chat/messages/RenderTextMessage.js +47 -0
- package/lib/AGUI/components/chat/messages/UserMessage.d.ts +2 -0
- package/lib/AGUI/components/chat/messages/UserMessage.js +9 -0
- package/lib/AGUI/components/chat/props.d.ts +157 -0
- package/lib/AGUI/components/index.d.ts +1 -0
- package/lib/AGUI/components/index.js +1 -0
- package/lib/AGUI/context/index.d.ts +1 -0
- package/lib/AGUI/hooks/index.d.ts +1 -0
- package/lib/AGUI/hooks/index.js +1 -0
- package/lib/AGUI/hooks/use-copilot-chat-suggestions.d.ts +87 -0
- package/lib/AGUI/hooks/use-copilot-chat-suggestions.js +95 -0
- package/lib/AGUI/hooks/use-copy-to-clipboard.d.ts +7 -0
- package/{dist/theme/genStyleUtils.js → lib/AGUI/hooks/use-copy-to-clipboard.js} +27 -42
- package/lib/AGUI/hooks/use-dark-mode.d.ts +1 -0
- package/lib/AGUI/hooks/use-dark-mode.js +4 -0
- package/lib/AGUI/hooks/use-push-to-talk.d.ts +16 -0
- package/lib/AGUI/hooks/use-push-to-talk.js +260 -0
- package/lib/AGUI/index.d.ts +4 -0
- package/lib/AGUI/index.js +4 -0
- package/lib/AGUI/lib/utils.d.ts +2 -0
- package/lib/AGUI/lib/utils.js +52 -0
- package/lib/AGUI/types/index.d.ts +1 -0
- package/lib/AGUI/types/suggestions.d.ts +6 -0
- package/lib/Accordion/Accordion.d.ts +64 -0
- package/{dist/accordion → lib/Accordion}/Accordion.js +101 -40
- package/{dist/accordion → lib/Accordion}/BodyContent.d.ts +1 -1
- package/lib/Accordion/BodyContent.js +23 -0
- package/lib/Accordion/DeepThinking.d.ts +28 -0
- package/lib/Accordion/DeepThinking.js +35 -0
- package/lib/Accordion/SoftLightTitle.d.ts +3 -0
- package/lib/Accordion/SoftLightTitle.js +17 -0
- package/lib/Accordion/index.d.ts +2 -0
- package/lib/Accordion/style.d.ts +2 -0
- package/lib/Accordion/style.js +60 -0
- package/lib/Attachments/DropArea.d.ts +24 -0
- package/{dist/attachments → lib/Attachments}/DropArea.js +5 -11
- package/lib/Attachments/FileList/AudioIcon.d.ts +1 -0
- package/lib/Attachments/FileList/AudioIcon.js +24 -0
- package/lib/Attachments/FileList/FileListCard.d.ts +36 -0
- package/{dist/attachments → lib/Attachments}/FileList/FileListCard.js +109 -83
- package/lib/Attachments/FileList/Progress.d.ts +13 -0
- package/{dist/attachments → lib/Attachments}/FileList/Progress.js +7 -5
- package/lib/Attachments/FileList/VideoIcon.d.ts +1 -0
- package/lib/Attachments/FileList/VideoIcon.js +24 -0
- package/lib/Attachments/FileList/index.d.ts +56 -0
- package/{dist/attachments → lib/Attachments}/FileList/index.js +48 -48
- package/lib/Attachments/PlaceholderUploader.d.ts +49 -0
- package/{dist/attachments → lib/Attachments}/PlaceholderUploader.js +33 -28
- package/lib/Attachments/SilentUploader.d.ts +21 -0
- package/lib/Attachments/SilentUploader.js +30 -0
- package/lib/Attachments/context.d.ts +9 -0
- package/lib/Attachments/index.d.ts +97 -0
- package/lib/Attachments/index.en-US.md.bk +10 -0
- package/{dist/attachments → lib/Attachments}/index.js +51 -55
- package/lib/Attachments/index.zh-CN.md.bk +10 -0
- package/lib/Attachments/style/fileCard.d.ts +2 -0
- package/lib/Attachments/style/fileCard.js +68 -0
- package/lib/Attachments/style/index.d.ts +2 -0
- package/lib/Attachments/style/index.js +98 -0
- package/{dist/bubble → lib/Bubble}/Avatar.d.ts +0 -1
- package/{dist/bubble → lib/Bubble}/Avatar.js +8 -5
- package/lib/Bubble/Bubble.d.ts +19 -0
- package/{dist/bubble → lib/Bubble}/Bubble.js +39 -52
- package/lib/Bubble/BubbleList.d.ts +41 -0
- package/lib/Bubble/BubbleList.js +64 -0
- package/{dist/bubble → lib/Bubble}/Cards.d.ts +2 -8
- package/{dist/bubble → lib/Bubble}/Cards.js +9 -9
- package/{dist/bubble → lib/Bubble}/ScrollToBottom.d.ts +0 -1
- package/{dist/bubble → lib/Bubble}/ScrollToBottom.js +15 -14
- package/lib/Bubble/Spin.d.ts +1 -0
- package/lib/Bubble/Spin.js +21 -0
- package/lib/Bubble/hooks/useListData.d.ts +0 -0
- package/lib/Bubble/hooks/useListData.js +0 -0
- package/lib/Bubble/interface.d.ts +62 -0
- package/lib/Bubble/loading.js +17 -0
- package/lib/Bubble/style/avatar.d.ts +2 -0
- package/lib/Bubble/style/avatar.js +8 -0
- package/lib/Bubble/style/index.d.ts +2 -0
- package/lib/Bubble/style/index.js +46 -0
- package/lib/Bubble/style/list.d.ts +2 -0
- package/lib/Bubble/style/list.js +16 -0
- package/{dist/chat-anywhere → lib/ChatAnywhere}/Chat/index.d.ts +0 -1
- package/{dist/chat-anywhere → lib/ChatAnywhere}/Chat/index.js +39 -28
- package/lib/ChatAnywhere/Chat/style.d.ts +2 -0
- package/lib/ChatAnywhere/Chat/style.js +14 -0
- package/lib/ChatAnywhere/Header/index.d.ts +1 -0
- package/lib/ChatAnywhere/Header/index.js +39 -0
- package/lib/ChatAnywhere/Header/style.d.ts +2 -0
- package/lib/ChatAnywhere/Header/style.js +12 -0
- package/lib/ChatAnywhere/Input/index.d.ts +3 -0
- package/{dist/chat-anywhere → lib/ChatAnywhere}/Input/index.js +92 -70
- package/lib/ChatAnywhere/Input/style.d.ts +2 -0
- package/lib/ChatAnywhere/Input/style.js +6 -0
- package/{dist/chat-anywhere → lib/ChatAnywhere}/Layout/index.d.ts +1 -2
- package/lib/ChatAnywhere/Layout/index.js +91 -0
- package/lib/ChatAnywhere/Layout/style.d.ts +2 -0
- package/lib/ChatAnywhere/Layout/style.js +16 -0
- package/lib/ChatAnywhere/SessionList/index.d.ts +3 -0
- package/{dist/chat-anywhere → lib/ChatAnywhere}/SessionList/index.js +67 -55
- package/lib/ChatAnywhere/SessionList/style.d.ts +2 -0
- package/lib/ChatAnywhere/SessionList/style.js +14 -0
- package/lib/ChatAnywhere/hooks/ChatAnywhereProvider.d.ts +148 -0
- package/{dist/chat-anywhere → lib/ChatAnywhere}/hooks/ChatAnywhereProvider.js +11 -5
- package/lib/ChatAnywhere/hooks/types.d.ts +312 -0
- package/{dist/chat-anywhere → lib/ChatAnywhere}/hooks/useInput.d.ts +2 -0
- package/{dist/chat-anywhere → lib/ChatAnywhere}/hooks/useInput.js +8 -2
- package/{dist/chat-anywhere → lib/ChatAnywhere}/hooks/useMessages.d.ts +3 -1
- package/{dist/chat-anywhere → lib/ChatAnywhere}/hooks/useMessages.js +10 -2
- package/{dist/chat-anywhere → lib/ChatAnywhere}/index.d.ts +4 -1
- package/{dist/chat-anywhere → lib/ChatAnywhere}/index.js +28 -15
- package/{dist/conversations → lib/Conversations}/GroupTitle.d.ts +4 -0
- package/{dist/conversations → lib/Conversations}/GroupTitle.js +7 -5
- package/{dist/conversations → lib/Conversations}/Item.d.ts +1 -0
- package/lib/Conversations/Item.js +208 -0
- package/lib/Conversations/hooks/useGroupable.d.ts +8 -0
- package/lib/Conversations/index.d.ts +55 -0
- package/{dist/conversations → lib/Conversations}/index.js +50 -61
- package/lib/Conversations/interface.d.ts +56 -0
- package/lib/Conversations/style.d.ts +2 -0
- package/lib/Conversations/style.js +60 -0
- package/{dist/default-cards/DeepThink → lib/DefaultCards/DeepThinking}/index.d.ts +2 -3
- package/lib/DefaultCards/DeepThinking/index.js +12 -0
- package/lib/DefaultCards/Files/index.d.ts +1 -0
- package/lib/DefaultCards/Files/index.js +56 -0
- package/{dist/default-cards → lib/DefaultCards}/Footer/index.d.ts +3 -4
- package/lib/DefaultCards/Footer/index.js +74 -0
- package/lib/DefaultCards/Images/index.d.ts +1 -0
- package/lib/DefaultCards/Images/index.js +49 -0
- package/{dist/default-cards → lib/DefaultCards}/Interrupted/index.d.ts +1 -3
- package/lib/DefaultCards/Interrupted/index.js +54 -0
- package/lib/DefaultCards/Text/index.d.ts +1 -0
- package/{dist/default-cards → lib/DefaultCards}/Text/index.js +4 -2
- package/lib/DefaultCards/count/index.d.ts +1 -0
- package/lib/DefaultCards/count/index.js +36 -0
- package/{dist/default-cards → lib/DefaultCards}/index.d.ts +1 -1
- package/{dist/default-cards → lib/DefaultCards}/index.js +1 -1
- package/lib/Disclaimer/index.d.ts +22 -0
- package/lib/Disclaimer/index.js +26 -0
- package/lib/Disclaimer/style.d.ts +2 -0
- package/lib/Disclaimer/style.js +10 -0
- package/lib/ImageGenerator/index.d.ts +41 -0
- package/lib/ImageGenerator/index.js +75 -0
- package/lib/ImageGenerator/style.d.ts +2 -0
- package/lib/ImageGenerator/style.js +20 -0
- package/{dist/markdown → lib/Markdown}/Citation.js +19 -14
- package/{dist/markdown → lib/Markdown}/CodeBlock.d.ts +1 -0
- package/{dist/markdown → lib/Markdown}/CodeBlock.js +51 -30
- package/lib/Markdown/ImageOrMedia.d.ts +1 -0
- package/lib/Markdown/ImageOrMedia.js +113 -0
- package/lib/Markdown/Link.js +48 -0
- package/{dist/markdown → lib/Markdown}/Markdown.js +22 -11
- package/lib/Markdown/cursor/Dot.d.ts +1 -0
- package/lib/Markdown/cursor/Dot.js +36 -0
- package/lib/Markdown/cursor/Underline.d.ts +1 -0
- package/lib/Markdown/cursor/Underline.js +20 -0
- package/lib/Markdown/hooks/index.d.ts +0 -0
- package/lib/Markdown/hooks/index.js +0 -0
- package/{dist/markdown → lib/Markdown}/hooks/useTypedEffect.js +1 -1
- package/lib/Markdown/index.d.ts +63 -0
- package/lib/Markdown/index.js +40 -0
- package/lib/Markdown/style.d.ts +2 -0
- package/lib/Markdown/style.js +30 -0
- package/lib/Markdown/type.d.ts +186 -0
- package/{dist/markdown → lib/Markdown}/utils.js +1 -2
- package/lib/Mermaid/index.d.ts +18 -0
- package/{dist/voice-chat/Recorder → lib/Mermaid}/index.js +144 -160
- package/{dist/provider → lib/Provider}/CustomCardsProvider.d.ts +2 -1
- package/{dist/provider → lib/Provider}/CustomCardsProvider.js +5 -3
- package/{dist/provider → lib/Provider}/GlobalProvider.d.ts +1 -1
- package/{dist/provider → lib/Provider}/GlobalProvider.js +5 -3
- package/{dist/provider → lib/Provider}/index.d.ts +1 -2
- package/{dist/provider → lib/Provider}/index.js +9 -6
- package/lib/Provider/types.d.ts +24 -0
- package/lib/Provider/types.js +1 -0
- package/lib/ResponsesAPI/index.d.ts +0 -0
- package/lib/ResponsesAPI/index.js +0 -0
- package/lib/Sender/ModeSelect/index.d.ts +17 -0
- package/lib/Sender/ModeSelect/index.js +109 -0
- package/lib/Sender/ModeSelect/styles.d.ts +0 -0
- package/lib/Sender/ModeSelect/styles.js +0 -0
- package/lib/Sender/SenderHeader.d.ts +63 -0
- package/{dist/sender → lib/Sender}/SenderHeader.js +40 -32
- package/{dist/sender → lib/Sender}/StopLoading.d.ts +1 -1
- package/lib/Sender/StopLoading.js +25 -0
- package/lib/Sender/components/ActionButton.d.ts +72 -0
- package/{dist/sender → lib/Sender}/components/ActionButton.js +9 -5
- package/lib/Sender/components/ClearButton.js +19 -0
- package/lib/Sender/components/LoadingButton.js +28 -0
- package/lib/Sender/components/SendButton.js +20 -0
- package/lib/Sender/components/SpeechButton/RecordingIcon.d.ts +8 -0
- package/lib/Sender/components/SpeechButton/RecordingIcon.js +54 -0
- package/lib/Sender/components/SpeechButton/index.js +35 -0
- package/lib/Sender/index.d.ts +142 -0
- package/{dist/sender → lib/Sender}/index.js +128 -121
- package/lib/Sender/style/index.d.ts +2 -0
- package/lib/Sender/style/index.js +41 -0
- package/{dist/stream → lib/Stream}/index.d.ts +4 -2
- package/{dist/stream → lib/Stream}/index.js +1 -1
- package/lib/Util/createStyle.d.ts +5 -0
- package/lib/Util/createStyle.js +20 -0
- package/lib/Util/sleep.d.ts +1 -0
- package/lib/Util/sleep.js +5 -0
- package/lib/Util/type.js +1 -0
- package/{dist/_util → lib/Util}/warning.d.ts +2 -2
- package/lib/Voice/Recorder.d.ts +1 -0
- package/lib/Voice/Recorder.js +6 -0
- package/lib/Voice/index.d.ts +0 -0
- package/lib/Voice/index.js +0 -0
- package/lib/Welcome/index.d.ts +24 -0
- package/lib/Welcome/index.js +39 -0
- package/lib/index.d.ts +25 -0
- package/lib/index.js +24 -0
- package/package.json +28 -14
- package/dist/accordion/Accordion.d.ts +0 -22
- package/dist/accordion/BodyContent.js +0 -18
- package/dist/accordion/DeepThink.d.ts +0 -7
- package/dist/accordion/DeepThink.js +0 -35
- package/dist/accordion/index.d.ts +0 -2
- package/dist/accordion/index.less +0 -170
- package/dist/attachments/DropArea.d.ts +0 -8
- package/dist/attachments/FileList/AudioIcon.d.ts +0 -2
- package/dist/attachments/FileList/AudioIcon.js +0 -19
- package/dist/attachments/FileList/FileListCard.d.ts +0 -12
- package/dist/attachments/FileList/Progress.d.ts +0 -6
- package/dist/attachments/FileList/VideoIcon.d.ts +0 -2
- package/dist/attachments/FileList/VideoIcon.js +0 -19
- package/dist/attachments/FileList/index.d.ts +0 -16
- package/dist/attachments/PlaceholderUploader.d.ts +0 -17
- package/dist/attachments/SilentUploader.d.ts +0 -9
- package/dist/attachments/SilentUploader.js +0 -23
- package/dist/attachments/context.d.ts +0 -5
- package/dist/attachments/index.d.ts +0 -33
- package/dist/attachments/style/fileCard.d.ts +0 -4
- package/dist/attachments/style/fileCard.js +0 -124
- package/dist/attachments/style/index.d.ts +0 -10
- package/dist/attachments/style/index.js +0 -211
- package/dist/bubble/Bubble.d.ts +0 -11
- package/dist/bubble/BubbleList.d.ts +0 -15
- package/dist/bubble/BubbleList.js +0 -44
- package/dist/bubble/Spin.d.ts +0 -2
- package/dist/bubble/Spin.js +0 -18
- package/dist/bubble/interface.d.ts +0 -26
- package/dist/bubble/loading.js +0 -17
- package/dist/bubble/style/avatar.less +0 -40
- package/dist/bubble/style/content.d.ts +0 -4
- package/dist/bubble/style/content.js +0 -43
- package/dist/bubble/style/index.d.ts +0 -9
- package/dist/bubble/style/index.js +0 -53
- package/dist/bubble/style/list.less +0 -15
- package/dist/bubble/style/scrollToBottom.less +0 -174
- package/dist/chat-anywhere/Chat/index.less +0 -54
- package/dist/chat-anywhere/Header/index.d.ts +0 -3
- package/dist/chat-anywhere/Header/index.js +0 -32
- package/dist/chat-anywhere/Header/index.less +0 -24
- package/dist/chat-anywhere/Input/index.d.ts +0 -3
- package/dist/chat-anywhere/Input/index.less +0 -12
- package/dist/chat-anywhere/Layout/index.js +0 -73
- package/dist/chat-anywhere/Layout/index.less +0 -61
- package/dist/chat-anywhere/SessionList/index.d.ts +0 -5
- package/dist/chat-anywhere/SessionList/index.less +0 -52
- package/dist/chat-anywhere/hooks/ChatAnywhereProvider.d.ts +0 -43
- package/dist/chat-anywhere/hooks/types.d.ts +0 -57
- package/dist/conversations/Item.js +0 -96
- package/dist/conversations/hooks/useGroupable.d.ts +0 -9
- package/dist/conversations/index.d.ts +0 -62
- package/dist/conversations/interface.d.ts +0 -60
- package/dist/conversations/style/index.d.ts +0 -9
- package/dist/conversations/style/index.js +0 -80
- package/dist/default-cards/Count/index.d.ts +0 -3
- package/dist/default-cards/Count/index.js +0 -16
- package/dist/default-cards/Count/index.less +0 -19
- package/dist/default-cards/DeepThink/index.js +0 -11
- package/dist/default-cards/Files/index.d.ts +0 -2
- package/dist/default-cards/Files/index.js +0 -18
- package/dist/default-cards/Footer/index.js +0 -50
- package/dist/default-cards/Footer/index.less +0 -41
- package/dist/default-cards/Images/index.d.ts +0 -3
- package/dist/default-cards/Images/index.js +0 -33
- package/dist/default-cards/Images/index.less +0 -17
- package/dist/default-cards/Interrupted/index.js +0 -40
- package/dist/default-cards/Interrupted/index.less +0 -57
- package/dist/default-cards/Text/index.d.ts +0 -2
- package/dist/disclaimer/index.d.ts +0 -11
- package/dist/disclaimer/index.js +0 -26
- package/dist/docs/1896.async.js +0 -457
- package/dist/docs/2710.async.js +0 -62
- package/dist/docs/2863.async.js +0 -400
- package/dist/docs/3057.async.js +0 -46
- package/dist/docs/3364.async.js +0 -25
- package/dist/docs/404.html +0 -15
- package/dist/docs/4820.async.js +0 -1381
- package/dist/docs/5623.async.js +0 -60
- package/dist/docs/5757.async.js +0 -1
- package/dist/docs/5804.async.js +0 -271
- package/dist/docs/6198.async.js +0 -18
- package/dist/docs/6671.async.js +0 -137
- package/dist/docs/7195.async.js +0 -1
- package/dist/docs/7485.async.js +0 -29
- package/dist/docs/7931.async.js +0 -19
- package/dist/docs/7997.async.js +0 -5
- package/dist/docs/8156.async.js +0 -110
- package/dist/docs/8368.async.js +0 -2
- package/dist/docs/8480.async.js +0 -1449
- package/dist/docs/8618.async.js +0 -246
- package/dist/docs/9016.async.js +0 -32
- package/dist/docs/9016.chunk.css +0 -1
- package/dist/docs/9335.async.js +0 -11
- package/dist/docs/accordion__demos.async.js +0 -9
- package/dist/docs/attachments__demos.async.js +0 -1
- package/dist/docs/bubble__demos.async.js +0 -50
- package/dist/docs/components/accordion/index.html +0 -15
- package/dist/docs/components/accordion-cn/index.html +0 -15
- package/dist/docs/components/attachments/index.html +0 -15
- package/dist/docs/components/attachments-cn/index.html +0 -15
- package/dist/docs/components/bubble/index.html +0 -15
- package/dist/docs/components/bubble-cn/index.html +0 -15
- package/dist/docs/components/bubble-list/index.html +0 -15
- package/dist/docs/components/bubble-list-cn/index.html +0 -15
- package/dist/docs/components/conversations/index.html +0 -15
- package/dist/docs/components/conversations-cn/index.html +0 -15
- package/dist/docs/components/disclaimer/index.html +0 -15
- package/dist/docs/components/disclaimer-cn/index.html +0 -15
- package/dist/docs/components/footer/index.html +0 -15
- package/dist/docs/components/footer-cn/index.html +0 -15
- package/dist/docs/components/markdown/index.html +0 -15
- package/dist/docs/components/markdown-cn/index.html +0 -15
- package/dist/docs/components/sender/index.html +0 -15
- package/dist/docs/components/sender-cn/index.html +0 -15
- package/dist/docs/components/status/index.html +0 -15
- package/dist/docs/components/status-cn/index.html +0 -15
- package/dist/docs/components/welcome/index.html +0 -15
- package/dist/docs/components/welcome-cn/index.html +0 -15
- package/dist/docs/components__accordion__index.en-US.md.async.js +0 -6
- package/dist/docs/components__accordion__index.en-US.md.chunk.css +0 -1
- package/dist/docs/components__accordion__index.zh-CN.md.async.js +0 -6
- package/dist/docs/components__accordion__index.zh-CN.md.chunk.css +0 -1
- package/dist/docs/components__attachments__index.en-US.md.async.js +0 -1
- package/dist/docs/components__attachments__index.en-US.md.chunk.css +0 -1
- package/dist/docs/components__attachments__index.zh-CN.md.async.js +0 -1
- package/dist/docs/components__attachments__index.zh-CN.md.chunk.css +0 -1
- package/dist/docs/components__bubble-list__index.en-US.md.async.js +0 -2
- package/dist/docs/components__bubble-list__index.en-US.md.chunk.css +0 -1
- package/dist/docs/components__bubble-list__index.zh-CN.md.async.js +0 -2
- package/dist/docs/components__bubble-list__index.zh-CN.md.chunk.css +0 -1
- package/dist/docs/components__bubble__index.en-US.md.async.js +0 -1
- package/dist/docs/components__bubble__index.en-US.md.chunk.css +0 -1
- package/dist/docs/components__bubble__index.zh-CN.md.async.js +0 -1
- package/dist/docs/components__bubble__index.zh-CN.md.chunk.css +0 -1
- package/dist/docs/components__conversations__index.en-US.md.async.js +0 -2
- package/dist/docs/components__conversations__index.en-US.md.chunk.css +0 -1
- package/dist/docs/components__conversations__index.zh-CN.md.async.js +0 -1
- package/dist/docs/components__conversations__index.zh-CN.md.chunk.css +0 -1
- package/dist/docs/components__disclaimer__index.en-US.md.async.js +0 -1
- package/dist/docs/components__disclaimer__index.en-US.md.chunk.css +0 -1
- package/dist/docs/components__disclaimer__index.zh-CN.md.async.js +0 -1
- package/dist/docs/components__disclaimer__index.zh-CN.md.chunk.css +0 -1
- package/dist/docs/components__footer__index.en-US.md.async.js +0 -1
- package/dist/docs/components__footer__index.en-US.md.chunk.css +0 -1
- package/dist/docs/components__footer__index.zh-CN.md.async.js +0 -2
- package/dist/docs/components__footer__index.zh-CN.md.chunk.css +0 -1
- package/dist/docs/components__markdown__index.en-US.md.async.js +0 -1
- package/dist/docs/components__markdown__index.en-US.md.chunk.css +0 -1
- package/dist/docs/components__markdown__index.zh-CN.md.async.js +0 -1
- package/dist/docs/components__markdown__index.zh-CN.md.chunk.css +0 -1
- package/dist/docs/components__sender__index.en-US.md.async.js +0 -1
- package/dist/docs/components__sender__index.en-US.md.chunk.css +0 -1
- package/dist/docs/components__sender__index.zh-CN.md.async.js +0 -1
- package/dist/docs/components__sender__index.zh-CN.md.chunk.css +0 -1
- package/dist/docs/components__status__index.en-US.md.async.js +0 -1
- package/dist/docs/components__status__index.en-US.md.chunk.css +0 -1
- package/dist/docs/components__status__index.zh-CN.md.async.js +0 -2
- package/dist/docs/components__status__index.zh-CN.md.chunk.css +0 -1
- package/dist/docs/components__welcome__index.en-US.md.async.js +0 -2
- package/dist/docs/components__welcome__index.en-US.md.chunk.css +0 -1
- package/dist/docs/components__welcome__index.zh-CN.md.async.js +0 -2
- package/dist/docs/components__welcome__index.zh-CN.md.chunk.css +0 -1
- package/dist/docs/conversations__demos.async.js +0 -1
- package/dist/docs/demos.async.js +0 -47
- package/dist/docs/demos.chunk.css +0 -1
- package/dist/docs/disclaimer__demos.async.js +0 -1
- package/dist/docs/docs/development/ag-ui/index.html +0 -15
- package/dist/docs/docs/development/ag-ui-cn/index.html +0 -15
- package/dist/docs/docs/development/backend/index.html +0 -15
- package/dist/docs/docs/development/backend-cn/index.html +0 -15
- package/dist/docs/docs/development/cards/index.html +0 -15
- package/dist/docs/docs/development/cards-cn/index.html +0 -15
- package/dist/docs/docs/development/chatanywhere/index.html +0 -15
- package/dist/docs/docs/development/chatanywhere-api/index.html +0 -15
- package/dist/docs/docs/development/chatanywhere-api-cn/index.html +0 -15
- package/dist/docs/docs/development/chatanywhere-cn/index.html +0 -15
- package/dist/docs/docs/development/custom/index.html +0 -15
- package/dist/docs/docs/development/custom-cn/index.html +0 -15
- package/dist/docs/docs/development/overview/index.html +0 -15
- package/dist/docs/docs/development/overview-cn/index.html +0 -15
- package/dist/docs/docs/development/qwen/index.html +0 -15
- package/dist/docs/docs/development/qwen-cn/index.html +0 -15
- package/dist/docs/docs/templates/copilot/index.html +0 -15
- package/dist/docs/docs/templates/copilot-cn/index.html +0 -15
- package/dist/docs/docs/templates/native/index.html +0 -15
- package/dist/docs/docs/templates/native-cn/index.html +0 -15
- package/dist/docs/docs/templates/voice/index.html +0 -15
- package/dist/docs/docs/templates/voice-cn/index.html +0 -15
- package/dist/docs/docs__development__ag-ui.en-US.md.async.js +0 -210
- package/dist/docs/docs__development__ag-ui.en-US.md.chunk.css +0 -1
- package/dist/docs/docs__development__ag-ui.zh-CN.md.async.js +0 -210
- package/dist/docs/docs__development__ag-ui.zh-CN.md.chunk.css +0 -1
- package/dist/docs/docs__development__backend.en-US.md.async.js +0 -12
- package/dist/docs/docs__development__backend.en-US.md.chunk.css +0 -1
- package/dist/docs/docs__development__backend.zh-CN.md.async.js +0 -12
- package/dist/docs/docs__development__backend.zh-CN.md.chunk.css +0 -1
- package/dist/docs/docs__development__cards.en-US.md.async.js +0 -27
- package/dist/docs/docs__development__cards.en-US.md.chunk.css +0 -1
- package/dist/docs/docs__development__cards.zh-CN.md.async.js +0 -27
- package/dist/docs/docs__development__cards.zh-CN.md.chunk.css +0 -1
- package/dist/docs/docs__development__chatanywhere-api.en-US.md.async.js +0 -69
- package/dist/docs/docs__development__chatanywhere-api.en-US.md.chunk.css +0 -1
- package/dist/docs/docs__development__chatanywhere-api.zh-CN.md.async.js +0 -69
- package/dist/docs/docs__development__chatanywhere-api.zh-CN.md.chunk.css +0 -1
- package/dist/docs/docs__development__chatanywhere.en-US.md.async.js +0 -77
- package/dist/docs/docs__development__chatanywhere.en-US.md.chunk.css +0 -1
- package/dist/docs/docs__development__chatanywhere.zh-CN.md.async.js +0 -77
- package/dist/docs/docs__development__chatanywhere.zh-CN.md.chunk.css +0 -1
- package/dist/docs/docs__development__custom.en-US.md.async.js +0 -22
- package/dist/docs/docs__development__custom.en-US.md.chunk.css +0 -1
- package/dist/docs/docs__development__custom.zh-CN.md.async.js +0 -22
- package/dist/docs/docs__development__custom.zh-CN.md.chunk.css +0 -1
- package/dist/docs/docs__development__overview.en-US.md.async.js +0 -21
- package/dist/docs/docs__development__overview.en-US.md.chunk.css +0 -1
- package/dist/docs/docs__development__overview.zh-CN.md.async.js +0 -21
- package/dist/docs/docs__development__overview.zh-CN.md.chunk.css +0 -1
- package/dist/docs/docs__development__qwen.en-US.md.async.js +0 -25
- package/dist/docs/docs__development__qwen.en-US.md.chunk.css +0 -1
- package/dist/docs/docs__development__qwen.zh-CN.md.async.js +0 -25
- package/dist/docs/docs__development__qwen.zh-CN.md.chunk.css +0 -1
- package/dist/docs/docs__templates__copilot.en-US.md.async.js +0 -1
- package/dist/docs/docs__templates__copilot.en-US.md.chunk.css +0 -1
- package/dist/docs/docs__templates__copilot.zh-CN.md.async.js +0 -1
- package/dist/docs/docs__templates__copilot.zh-CN.md.chunk.css +0 -1
- package/dist/docs/docs__templates__native.en-US.md.async.js +0 -1
- package/dist/docs/docs__templates__native.en-US.md.chunk.css +0 -1
- package/dist/docs/docs__templates__native.zh-CN.md.async.js +0 -1
- package/dist/docs/docs__templates__native.zh-CN.md.chunk.css +0 -1
- package/dist/docs/docs__templates__voice.en-US.md.async.js +0 -20
- package/dist/docs/docs__templates__voice.en-US.md.chunk.css +0 -1
- package/dist/docs/docs__templates__voice.zh-CN.md.async.js +0 -1
- package/dist/docs/docs__templates__voice.zh-CN.md.chunk.css +0 -1
- package/dist/docs/dumi__pages__index__index.en-US.async.js +0 -1
- package/dist/docs/dumi__pages__index__index.en-US.chunk.css +0 -1
- package/dist/docs/dumi__pages__index__index.zh-CN.async.js +0 -1
- package/dist/docs/dumi__pages__index__index.zh-CN.chunk.css +0 -1
- package/dist/docs/dumi__theme__layouts__DocLayout__index.async.js +0 -1
- package/dist/docs/dumi__theme__layouts__DocLayout__index.chunk.css +0 -1
- package/dist/docs/dumi__theme__layouts__GlobalLayout__index.async.js +0 -18
- package/dist/docs/dumi__theme__layouts__GlobalLayout__index.chunk.css +0 -1
- package/dist/docs/dumi__tmp-production__dumi__theme__ContextWrapper.async.js +0 -1
- package/dist/docs/index/index.html +0 -15
- package/dist/docs/index-cn/index.html +0 -15
- package/dist/docs/markdown__demos.async.js +0 -164
- package/dist/docs/meta__components__en-US.async.js +0 -9
- package/dist/docs/meta__components__zh-CN.async.js +0 -10
- package/dist/docs/meta__docs__en-US.async.js +0 -475
- package/dist/docs/meta__docs__en-US.chunk.css +0 -1
- package/dist/docs/meta__docs__zh-CN.async.js +0 -456
- package/dist/docs/meta__docs__zh-CN.chunk.css +0 -1
- package/dist/docs/nm__dumi__dist__client__pages__404.async.js +0 -1
- package/dist/docs/nm__dumi__dist__client__pages__Demo__index.async.js +0 -1
- package/dist/docs/nm__dumi__dist__client__pages__Demo__index.chunk.css +0 -1
- package/dist/docs/preload_helper.js +0 -1
- package/dist/docs/sender__demos.async.js +0 -1
- package/dist/docs/umi.css +0 -1
- package/dist/docs/umi.js +0 -107
- package/dist/docs/welcome__demos.async.js +0 -1
- package/dist/docs/~demos/:id/index.html +0 -15
- package/dist/docs/~demos/accordion-demo-inline/index.html +0 -15
- package/dist/docs/~demos/accordion-demo-mutisteps/index.html +0 -15
- package/dist/docs/~demos/accordion-demo-thinking/index.html +0 -15
- package/dist/docs/~demos/attachments-demo-files/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-basic/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-havestopped/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-userwithfile/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-userwithimage/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-userwithnormal/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-withavatar/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-withcode/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-witherror/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-witherrordetail/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-withimage/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-withusage/index.html +0 -15
- package/dist/docs/~demos/bubble-demo-withwaitingmessage/index.html +0 -15
- package/dist/docs/~demos/components-bubble-list-demo-basic/index.html +0 -15
- package/dist/docs/~demos/components-footer-demo-basic/index.html +0 -15
- package/dist/docs/~demos/components-footer-demo-withusage/index.html +0 -15
- package/dist/docs/~demos/components-status-demo-basic/index.html +0 -15
- package/dist/docs/~demos/conversations-demo-basic/index.html +0 -15
- package/dist/docs/~demos/disclaimer-demo-demo/index.html +0 -15
- package/dist/docs/~demos/disclaimer-demo-withlink/index.html +0 -15
- package/dist/docs/~demos/docs-development-ag-ui-demo-with-copilotkit/index.html +0 -15
- package/dist/docs/~demos/docs-development-cards-demo-file/index.html +0 -15
- package/dist/docs/~demos/docs-development-cards-demo-footer/index.html +0 -15
- package/dist/docs/~demos/docs-development-cards-demo-image/index.html +0 -15
- package/dist/docs/~demos/docs-development-cards-demo-text/index.html +0 -15
- package/dist/docs/~demos/docs-development-custom-demo-custom/index.html +0 -15
- package/dist/docs/~demos/docs-templates-copilot-demo-copilot/index.html +0 -15
- package/dist/docs/~demos/docs-templates-native-demo-basic/index.html +0 -15
- package/dist/docs/~demos/docs-templates-voice-demo-demo/index.html +0 -15
- package/dist/docs/~demos/markdown-demo-citations/index.html +0 -15
- package/dist/docs/~demos/markdown-demo-cursor/index.html +0 -15
- package/dist/docs/~demos/markdown-demo-mathjax/index.html +0 -15
- package/dist/docs/~demos/markdown-demo-md/index.html +0 -15
- package/dist/docs/~demos/sender-demo-basic/index.html +0 -15
- package/dist/docs/~demos/sender-demo-disabled/index.html +0 -15
- package/dist/docs/~demos/sender-demo-loading/index.html +0 -15
- package/dist/docs/~demos/sender-demo-moreprefixaction/index.html +0 -15
- package/dist/docs/~demos/sender-demo-withfile/index.html +0 -15
- package/dist/docs/~demos/welcome-demo-demo0/index.html +0 -15
- package/dist/docs/~demos/welcome-demo-demo1/index.html +0 -15
- package/dist/docs/~demos/welcome-demo-demo2/index.html +0 -15
- package/dist/index.d.ts +0 -26
- package/dist/index.js +0 -20
- package/dist/index.less +0 -1
- package/dist/markdown/ImageOrVideo.d.ts +0 -2
- package/dist/markdown/ImageOrVideo.js +0 -81
- package/dist/markdown/Link.js +0 -28
- package/dist/markdown/cursor/Blur.d.ts +0 -3
- package/dist/markdown/cursor/Blur.js +0 -7
- package/dist/markdown/cursor/Dot.d.ts +0 -3
- package/dist/markdown/cursor/Dot.js +0 -16
- package/dist/markdown/cursor/Underline.d.ts +0 -3
- package/dist/markdown/cursor/Underline.js +0 -7
- package/dist/markdown/cursor/index.less +0 -124
- package/dist/markdown/hooks/index.d.ts +0 -1
- package/dist/markdown/hooks/index.js +0 -49
- package/dist/markdown/index.d.ts +0 -16
- package/dist/markdown/index.js +0 -37
- package/dist/markdown/index.less +0 -204
- package/dist/markdown/type.d.ts +0 -46
- package/dist/provider/types.d.ts +0 -8
- package/dist/sender/SenderHeader.d.ts +0 -19
- package/dist/sender/StopLoading.js +0 -20
- package/dist/sender/components/ActionButton.d.ts +0 -22
- package/dist/sender/components/ClearButton.js +0 -13
- package/dist/sender/components/LoadingButton.js +0 -22
- package/dist/sender/components/SendButton.js +0 -14
- package/dist/sender/components/SpeechButton/RecordingIcon.d.ts +0 -5
- package/dist/sender/components/SpeechButton/RecordingIcon.js +0 -49
- package/dist/sender/components/SpeechButton/index.js +0 -30
- package/dist/sender/index.d.ts +0 -61
- package/dist/sender/style/header.d.ts +0 -4
- package/dist/sender/style/header.js +0 -46
- package/dist/sender/style/index.d.ts +0 -10
- package/dist/sender/style/index.js +0 -123
- package/dist/stream/index.en-US.md.bk +0 -50
- package/dist/stream/index.zh-CN.md.bk +0 -51
- package/dist/theme/components.d.ts +0 -10
- package/dist/theme/cssinjs-utils.d.ts +0 -14
- package/dist/theme/genStyleUtils.d.ts +0 -28
- package/dist/theme/useToken.d.ts +0 -18
- package/dist/theme/useToken.js +0 -110
- package/dist/voice-chat/Recorder/index.d.ts +0 -26
- package/dist/voice-chat/VoiceChatProvider/context.d.ts +0 -22
- package/dist/voice-chat/VoiceChatProvider/context.js +0 -3
- package/dist/voice-chat/VoiceChatProvider/hooks/useChatState.d.ts +0 -1
- package/dist/voice-chat/VoiceChatProvider/hooks/useChatState.js +0 -5
- package/dist/voice-chat/VoiceChatProvider/hooks/useMessages.d.ts +0 -8
- package/dist/voice-chat/VoiceChatProvider/hooks/useMessages.js +0 -31
- package/dist/voice-chat/VoiceChatProvider/hooks/useRecorder.d.ts +0 -5
- package/dist/voice-chat/VoiceChatProvider/hooks/useRecorder.js +0 -48
- package/dist/voice-chat/VoiceChatProvider/hooks/useVoiceChat.d.ts +0 -4
- package/dist/voice-chat/VoiceChatProvider/hooks/useVoiceChat.js +0 -10
- package/dist/voice-chat/VoiceChatProvider/index.d.ts +0 -9
- package/dist/voice-chat/VoiceChatProvider/index.js +0 -55
- package/dist/voice-chat/VoiceChatService/index.d.ts +0 -34
- package/dist/voice-chat/index.d.ts +0 -2
- package/dist/voice-chat/index.js +0 -2
- package/dist/voice-chat/types/index.d.ts +0 -12
- package/dist/voice-chat/types/index.js +0 -4
- package/dist/welcome/icon.d.ts +0 -2
- package/dist/welcome/icon.js +0 -38
- package/dist/welcome/index.d.ts +0 -9
- package/dist/welcome/index.js +0 -57
- /package/{dist/_util/type.js → lib/AGUI/components/chat/props.js} +0 -0
- /package/{dist/bubble/interface.js → lib/AGUI/context/index.js} +0 -0
- /package/{dist/bubble/hooks/useDisplayData.d.ts → lib/AGUI/styles.css} +0 -0
- /package/{dist/bubble/hooks/useDisplayData.js → lib/AGUI/types/css.d.ts} +0 -0
- /package/{dist/bubble/hooks/useListData.d.ts → lib/AGUI/types/css.js} +0 -0
- /package/{dist/chat-anywhere/hooks/types.js → lib/AGUI/types/index.js} +0 -0
- /package/{dist/conversations/interface.js → lib/AGUI/types/suggestions.js} +0 -0
- /package/{dist/accordion → lib/Accordion}/index.js +0 -0
- /package/{dist/attachments → lib/Attachments}/context.js +0 -0
- /package/{dist/attachments → lib/Attachments}/util.d.ts +0 -0
- /package/{dist/attachments → lib/Attachments}/util.js +0 -0
- /package/{dist/bubble/hooks/useListData.js → lib/Bubble/hooks/useDisplayData.d.ts} +0 -0
- /package/{dist/default-cards/DeepThink/index.less → lib/Bubble/hooks/useDisplayData.js} +0 -0
- /package/{dist/bubble → lib/Bubble}/index.d.ts +0 -0
- /package/{dist/bubble → lib/Bubble}/index.js +0 -0
- /package/{dist/markdown/type.js → lib/Bubble/interface.js} +0 -0
- /package/{dist/bubble → lib/Bubble}/loading.d.ts +0 -0
- /package/{dist/chat-anywhere → lib/ChatAnywhere}/Chat/Ref.d.ts +0 -0
- /package/{dist/chat-anywhere → lib/ChatAnywhere}/Chat/Ref.js +0 -0
- /package/{dist/provider → lib/ChatAnywhere/hooks}/types.js +0 -0
- /package/{dist/chat-anywhere → lib/ChatAnywhere}/hooks/useSessionList.d.ts +0 -0
- /package/{dist/chat-anywhere → lib/ChatAnywhere}/hooks/useSessionList.js +0 -0
- /package/{dist/conversations → lib/Conversations}/hooks/useGroupable.js +0 -0
- /package/{dist/theme/components.js → lib/Conversations/interface.js} +0 -0
- /package/{dist/markdown → lib/Markdown}/Citation.d.ts +0 -0
- /package/{dist/markdown → lib/Markdown}/Link.d.ts +0 -0
- /package/{dist/markdown → lib/Markdown}/Markdown.d.ts +0 -0
- /package/{dist/markdown → lib/Markdown}/hooks/useTypedEffect.d.ts +0 -0
- /package/{dist/markdown → lib/Markdown}/plugins/footnote.d.ts +0 -0
- /package/{dist/markdown → lib/Markdown}/plugins/footnote.js +0 -0
- /package/{dist/markdown → lib/Markdown}/plugins/katexDir.d.ts +0 -0
- /package/{dist/markdown → lib/Markdown}/plugins/katexDir.js +0 -0
- /package/{dist/markdown → lib/Markdown}/rehype/fadeIn.d.ts +0 -0
- /package/{dist/markdown → lib/Markdown}/rehype/fadeIn.js +0 -0
- /package/{dist/theme/cssinjs-utils.js → lib/Markdown/type.js} +0 -0
- /package/{dist/markdown → lib/Markdown}/utils.d.ts +0 -0
- /package/{dist/sender → lib/Sender}/components/ClearButton.d.ts +0 -0
- /package/{dist/sender → lib/Sender}/components/LoadingButton.d.ts +0 -0
- /package/{dist/sender → lib/Sender}/components/SendButton.d.ts +0 -0
- /package/{dist/sender → lib/Sender}/components/SpeechButton/index.d.ts +0 -0
- /package/{dist/sender → lib/Sender}/useSpeech.d.ts +0 -0
- /package/{dist/sender → lib/Sender}/useSpeech.js +0 -0
- /package/{dist/_util → lib/Util}/hooks/use-proxy-imperative-handle.d.ts +0 -0
- /package/{dist/_util → lib/Util}/hooks/use-proxy-imperative-handle.js +0 -0
- /package/{dist/_util → lib/Util}/type.d.ts +0 -0
- /package/{dist/_util → lib/Util}/warning.js +0 -0
- /package/{dist/version → lib/Version}/index.d.ts +0 -0
- /package/{dist/version → lib/Version}/index.js +0 -0
|
@@ -1,123 +0,0 @@
|
|
|
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
|
-
import genSenderHeaderStyle from "./header";
|
|
9
|
-
var genSenderStyle = function genSenderStyle(token) {
|
|
10
|
-
var componentCls = token.componentCls,
|
|
11
|
-
padding = token.padding,
|
|
12
|
-
paddingSM = token.paddingSM,
|
|
13
|
-
paddingXS = token.paddingXS,
|
|
14
|
-
lineWidth = token.lineWidth,
|
|
15
|
-
lineWidthBold = token.lineWidthBold,
|
|
16
|
-
calc = token.calc;
|
|
17
|
-
return _defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
18
|
-
position: 'relative',
|
|
19
|
-
width: '100%',
|
|
20
|
-
boxSizing: 'border-box',
|
|
21
|
-
boxShadow: '0px 12px 24px -16px rgba(54, 54, 73, 0.04),0px 12px 40px 0px rgba(51, 51, 71, 0.08),0px 0px 1px 0px rgba(44, 44, 54, 0.02)',
|
|
22
|
-
transition: "background ".concat(token.motionDurationSlow),
|
|
23
|
-
backgroundColor: token.colorBgBase,
|
|
24
|
-
// Border
|
|
25
|
-
borderRadius: {
|
|
26
|
-
_skip_check_: true,
|
|
27
|
-
value: 8
|
|
28
|
-
},
|
|
29
|
-
borderColor: token.colorBorder,
|
|
30
|
-
borderWidth: 0,
|
|
31
|
-
borderStyle: 'solid',
|
|
32
|
-
// Border
|
|
33
|
-
'&:after': {
|
|
34
|
-
content: '""',
|
|
35
|
-
position: 'absolute',
|
|
36
|
-
inset: 0,
|
|
37
|
-
pointerEvents: 'none',
|
|
38
|
-
transition: "border-color ".concat(token.motionDurationSlow),
|
|
39
|
-
borderRadius: {
|
|
40
|
-
_skip_check_: true,
|
|
41
|
-
value: 'inherit'
|
|
42
|
-
},
|
|
43
|
-
borderStyle: 'inherit',
|
|
44
|
-
borderColor: 'inherit',
|
|
45
|
-
borderWidth: lineWidth
|
|
46
|
-
},
|
|
47
|
-
// Focus
|
|
48
|
-
'&:focus-within': {
|
|
49
|
-
boxShadow: "0px 12px 24px -16px rgba(54, 54, 73, 0.04),0px 12px 40px 0px rgba(51, 51, 71, 0.08),0px 0px 1px 0px rgba(44, 44, 54, 0.02)",
|
|
50
|
-
borderColor: token.colorPrimaryHover,
|
|
51
|
-
'&:after': {
|
|
52
|
-
borderWidth: lineWidth
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
'&-disabled': {
|
|
56
|
-
background: token.colorBgContainerDisabled
|
|
57
|
-
}
|
|
58
|
-
}, "&".concat(componentCls, "-rtl"), {
|
|
59
|
-
direction: 'rtl'
|
|
60
|
-
}), "".concat(componentCls, "-content"), {
|
|
61
|
-
width: '100%',
|
|
62
|
-
padding: 8,
|
|
63
|
-
boxSizing: 'border-box',
|
|
64
|
-
overflow: 'hidden',
|
|
65
|
-
borderRadius: 10
|
|
66
|
-
}), "".concat(componentCls, "-content-bottom"), {
|
|
67
|
-
display: 'flex',
|
|
68
|
-
marginTop: 8
|
|
69
|
-
}), "".concat(componentCls, "-prefix"), {
|
|
70
|
-
// flex: 'none',
|
|
71
|
-
flex: 1
|
|
72
|
-
}), "".concat(componentCls, "-input"), {
|
|
73
|
-
padding: '6px 8px',
|
|
74
|
-
borderRadius: 0,
|
|
75
|
-
alignSelf: 'center',
|
|
76
|
-
fontSize: 14,
|
|
77
|
-
lineHeight: 1.7
|
|
78
|
-
}), "".concat(componentCls, "-actions-list"), {
|
|
79
|
-
flex: 'none',
|
|
80
|
-
display: 'flex',
|
|
81
|
-
margin: '0 0 0 auto',
|
|
82
|
-
'&-presets': {
|
|
83
|
-
gap: token.paddingXS
|
|
84
|
-
},
|
|
85
|
-
'&-length': {
|
|
86
|
-
fontSize: 12,
|
|
87
|
-
lineHeight: 1,
|
|
88
|
-
display: 'flex',
|
|
89
|
-
alignItems: 'center',
|
|
90
|
-
padding: '0 12px',
|
|
91
|
-
color: token.colorTextTertiary
|
|
92
|
-
}
|
|
93
|
-
}), "".concat(componentCls, "-actions-btn"), {
|
|
94
|
-
'&-disabled': {
|
|
95
|
-
opacity: 0.45
|
|
96
|
-
},
|
|
97
|
-
'&-loading-button': {
|
|
98
|
-
padding: 0,
|
|
99
|
-
border: 0
|
|
100
|
-
},
|
|
101
|
-
'&-loading-icon': {
|
|
102
|
-
height: token.controlHeight,
|
|
103
|
-
width: token.controlHeight,
|
|
104
|
-
verticalAlign: 'top'
|
|
105
|
-
},
|
|
106
|
-
'&-recording-icon': {
|
|
107
|
-
height: '1.2em',
|
|
108
|
-
width: '1.2em',
|
|
109
|
-
verticalAlign: 'top'
|
|
110
|
-
}
|
|
111
|
-
}));
|
|
112
|
-
};
|
|
113
|
-
export var prepareComponentToken = function prepareComponentToken() {
|
|
114
|
-
return {};
|
|
115
|
-
};
|
|
116
|
-
export default genStyleHooks('Sender', function (token) {
|
|
117
|
-
var paddingXS = token.paddingXS,
|
|
118
|
-
calc = token.calc;
|
|
119
|
-
var SenderToken = mergeToken(token, {
|
|
120
|
-
SenderContentMaxWidth: "calc(100% - ".concat(unit(calc(paddingXS).add(32).equal()), ")")
|
|
121
|
-
});
|
|
122
|
-
return [genSenderStyle(SenderToken), genSenderHeaderStyle(SenderToken)];
|
|
123
|
-
}, prepareComponentToken);
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
|
|
3
|
-
group:
|
|
4
|
-
title: Tools
|
|
5
|
-
order: 5
|
|
6
|
-
title: Stream
|
|
7
|
-
order: 1
|
|
8
|
-
description: Transform binary stream
|
|
9
|
-
demo:
|
|
10
|
-
cols: 1
|
|
11
|
-
cover: https://mdn.alipayobjects.com/huamei_iwk9zp/afts/img/A*OD9kTJOmGdsAAAAAAAAAAAAADgCCAQ/original
|
|
12
|
-
coverDark: https://mdn.alipayobjects.com/huamei_iwk9zp/afts/img/A*PxJISo5t2YgAAAAAAAAAAAAADgCCAQ/original
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## When To Use
|
|
16
|
-
|
|
17
|
-
- Transform SSE protocol `ReadableStream` to `Record`
|
|
18
|
-
- Decode and read any protocol `ReadableStream`
|
|
19
|
-
|
|
20
|
-
## Use
|
|
21
|
-
|
|
22
|
-
Common `ReadableStream` instances, such as `await fetch(...).body`, usage example:
|
|
23
|
-
|
|
24
|
-
```js
|
|
25
|
-
import { Stream } from '@ali/spark-chat';
|
|
26
|
-
|
|
27
|
-
async function request() {
|
|
28
|
-
const response = await fetch();
|
|
29
|
-
// .....
|
|
30
|
-
|
|
31
|
-
for await (const chunk of Stream({
|
|
32
|
-
readableStream: response.body,
|
|
33
|
-
})) {
|
|
34
|
-
console.log(chunk);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Examples
|
|
40
|
-
|
|
41
|
-
<code src="./demo/default-protocol.tsx">Default Protocol - SSE</code> <code src="./demo/custom-protocol.tsx">Custom Protocol</code>
|
|
42
|
-
|
|
43
|
-
## API
|
|
44
|
-
|
|
45
|
-
### StreamOptions
|
|
46
|
-
|
|
47
|
-
| Property | Description | Type | Default | Version |
|
|
48
|
-
| --- | --- | --- | --- | --- |
|
|
49
|
-
| readableStream | Readable stream of binary data | ReadableStream<'Uint8Array'> | - | - |
|
|
50
|
-
| transformStream | Support customizable transformStream to transform streams | TransformStream<string, T> | sseTransformStream | - |
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
|
|
3
|
-
group:
|
|
4
|
-
title: 工具
|
|
5
|
-
order: 5
|
|
6
|
-
title: Stream
|
|
7
|
-
subtitle: 流
|
|
8
|
-
order: 1
|
|
9
|
-
description: 转换可读数据流
|
|
10
|
-
demo:
|
|
11
|
-
cols: 1
|
|
12
|
-
cover: https://mdn.alipayobjects.com/huamei_iwk9zp/afts/img/A*OD9kTJOmGdsAAAAAAAAAAAAADgCCAQ/original
|
|
13
|
-
coverDark: https://mdn.alipayobjects.com/huamei_iwk9zp/afts/img/A*PxJISo5t2YgAAAAAAAAAAAAADgCCAQ/original
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## 何时使用
|
|
17
|
-
|
|
18
|
-
- 将 SSE 协议的 `ReadableStream` 转换为 `Record`
|
|
19
|
-
- 将任何协议的 `ReadableStream` 解码并读取
|
|
20
|
-
|
|
21
|
-
## 使用说明
|
|
22
|
-
|
|
23
|
-
常见的 `ReadableStream` 实例,如 `await fetch(...).body` 使用示例:
|
|
24
|
-
|
|
25
|
-
```js
|
|
26
|
-
import { Stream } from '@ali/spark-chat';
|
|
27
|
-
|
|
28
|
-
async function request() {
|
|
29
|
-
const response = await fetch();
|
|
30
|
-
// .....
|
|
31
|
-
|
|
32
|
-
for await (const chunk of Stream({
|
|
33
|
-
readableStream: response.body,
|
|
34
|
-
})) {
|
|
35
|
-
console.log(chunk);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## 代码演示
|
|
41
|
-
|
|
42
|
-
<code src="./demo/default-protocol.tsx">默认协议 - SSE</code> <code src="./demo/custom-protocol.tsx">自定义协议</code>
|
|
43
|
-
|
|
44
|
-
## API
|
|
45
|
-
|
|
46
|
-
### StreamOptions
|
|
47
|
-
|
|
48
|
-
| 属性 | 说明 | 类型 | 默认值 | 版本 |
|
|
49
|
-
| --- | --- | --- | --- | --- |
|
|
50
|
-
| readableStream | ReadableStream 实例 | ReadableStream<'Uint8Array'> | - | - |
|
|
51
|
-
| transformStream | 自定义的 transformStream 用于转换流的处理 | TransformStream<string, T> | sseTransformStream | - |
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ComponentToken as AttachmentsToken } from '../attachments/style';
|
|
2
|
-
import type { ComponentToken as BubbleComponentToken } from '../bubble/style';
|
|
3
|
-
import type { ComponentToken as ConversationsComponentToken } from '../conversations/style';
|
|
4
|
-
import type { ComponentToken as SenderComponentToken } from '../sender/style';
|
|
5
|
-
export interface ComponentTokenMap {
|
|
6
|
-
Attachments?: AttachmentsToken;
|
|
7
|
-
Bubble?: BubbleComponentToken;
|
|
8
|
-
Conversations?: ConversationsComponentToken;
|
|
9
|
-
Sender?: SenderComponentToken;
|
|
10
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { GlobalToken as GlobalTokenTypeUtil, OverrideTokenMap as OverrideTokenTypeUtil, FullToken as FullTokenTypeUtil, GetDefaultToken as GetDefaultTokenTypeUtil, GenStyleFn as GenStyleFnTypeUtil, TokenMapKey } from '@ant-design/cssinjs-utils';
|
|
2
|
-
import type { CSSInterpolation } from '@ant-design/cssinjs';
|
|
3
|
-
import type { AliasToken } from 'antd/es/theme/internal';
|
|
4
|
-
import type { AnyObject } from '../_util/type';
|
|
5
|
-
import type { ComponentTokenMap } from './components';
|
|
6
|
-
export type { AliasToken, SeedToken } from 'antd/es/theme/internal';
|
|
7
|
-
/** Final token which contains the components level override */
|
|
8
|
-
export type GlobalToken = GlobalTokenTypeUtil<ComponentTokenMap, AliasToken>;
|
|
9
|
-
export type OverrideToken = OverrideTokenTypeUtil<ComponentTokenMap, AliasToken>;
|
|
10
|
-
export type OverrideComponent = TokenMapKey<ComponentTokenMap>;
|
|
11
|
-
export type FullToken<C extends TokenMapKey<ComponentTokenMap>> = FullTokenTypeUtil<ComponentTokenMap, AliasToken, C>;
|
|
12
|
-
export type GetDefaultToken<C extends TokenMapKey<ComponentTokenMap>> = GetDefaultTokenTypeUtil<ComponentTokenMap, AliasToken, C>;
|
|
13
|
-
export type GenStyleFn<C extends TokenMapKey<ComponentTokenMap>> = GenStyleFnTypeUtil<ComponentTokenMap, AliasToken, C>;
|
|
14
|
-
export type GenerateStyle<ComponentToken extends AnyObject = AliasToken, ReturnType = CSSInterpolation> = (token: ComponentToken) => ReturnType;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { ComponentTokenMap } from './components';
|
|
3
|
-
import type { AliasToken } from './cssinjs-utils';
|
|
4
|
-
export declare const genStyleHooks: <C extends keyof ComponentTokenMap>(component: C | [C, string], styleFn: import("@ant-design/cssinjs-utils").GenStyleFn<ComponentTokenMap, AliasToken, C>, getDefaultToken?: import("@ant-design/cssinjs-utils").GetDefaultToken<ComponentTokenMap, AliasToken, C>, options?: {
|
|
5
|
-
resetStyle?: boolean;
|
|
6
|
-
resetFont?: boolean;
|
|
7
|
-
deprecatedTokens?: [keyof Exclude<import("@ant-design/cssinjs-utils").OverrideTokenMap<ComponentTokenMap, AliasToken>[C], undefined>, keyof Exclude<import("@ant-design/cssinjs-utils").OverrideTokenMap<ComponentTokenMap, AliasToken>[C], undefined>][];
|
|
8
|
-
unitless?: Partial<Record<keyof Exclude<import("@ant-design/cssinjs-utils").OverrideTokenMap<ComponentTokenMap, AliasToken>[C], undefined>, boolean>>;
|
|
9
|
-
clientOnly?: boolean;
|
|
10
|
-
order?: number;
|
|
11
|
-
injectStyle?: boolean;
|
|
12
|
-
}) => (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], genComponentStyleHook: <C_2 extends keyof ComponentTokenMap>(componentName: C_2 | [C_2, string], styleFn: import("@ant-design/cssinjs-utils").GenStyleFn<ComponentTokenMap, AliasToken, C_2>, getDefaultToken?: import("@ant-design/cssinjs-utils").GetDefaultToken<ComponentTokenMap, AliasToken, C_2>, options?: {
|
|
13
|
-
resetStyle?: boolean;
|
|
14
|
-
resetFont?: boolean;
|
|
15
|
-
deprecatedTokens?: [keyof Exclude<import("@ant-design/cssinjs-utils").OverrideTokenMap<ComponentTokenMap, AliasToken>[C_2], undefined>, keyof Exclude<import("@ant-design/cssinjs-utils").OverrideTokenMap<ComponentTokenMap, AliasToken>[C_2], undefined>][];
|
|
16
|
-
clientOnly?: boolean;
|
|
17
|
-
order?: number;
|
|
18
|
-
injectStyle?: boolean;
|
|
19
|
-
unitless?: Partial<Record<keyof Exclude<import("@ant-design/cssinjs-utils").OverrideTokenMap<ComponentTokenMap, AliasToken>[C_2], undefined>, boolean>>;
|
|
20
|
-
}) => (prefixCls: string, rootCls?: string) => import("@ant-design/cssinjs-utils/lib/interface").UseComponentStyleResult, genSubStyleComponent: <C_1 extends keyof ComponentTokenMap>(componentName: C_1 | [C_1, string], styleFn: import("@ant-design/cssinjs-utils").GenStyleFn<ComponentTokenMap, AliasToken, C_1>, getDefaultToken?: import("@ant-design/cssinjs-utils").GetDefaultToken<ComponentTokenMap, AliasToken, C_1>, options?: {
|
|
21
|
-
resetStyle?: boolean;
|
|
22
|
-
resetFont?: boolean;
|
|
23
|
-
deprecatedTokens?: [keyof Exclude<import("@ant-design/cssinjs-utils").OverrideTokenMap<ComponentTokenMap, AliasToken>[C_1], undefined>, keyof Exclude<import("@ant-design/cssinjs-utils").OverrideTokenMap<ComponentTokenMap, AliasToken>[C_1], undefined>][];
|
|
24
|
-
clientOnly?: boolean;
|
|
25
|
-
order?: number;
|
|
26
|
-
injectStyle?: boolean;
|
|
27
|
-
unitless?: Partial<Record<keyof Exclude<import("@ant-design/cssinjs-utils").OverrideTokenMap<ComponentTokenMap, AliasToken>[C_1], undefined>, boolean>>;
|
|
28
|
-
}) => import("react").FunctionComponent<import("@ant-design/cssinjs-utils/lib/util/genStyleUtils").SubStyleComponentProps>;
|
package/dist/theme/useToken.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Theme } from '@ant-design/cssinjs';
|
|
2
|
-
import type { DesignTokenProviderProps } from 'antd/es/theme/context';
|
|
3
|
-
import type { AliasToken, GlobalToken, SeedToken } from './cssinjs-utils';
|
|
4
|
-
export declare const getComputedToken: (originToken: SeedToken, overrideToken: import("antd/es/theme/context").ComponentsToken & {
|
|
5
|
-
override?: Partial<AliasToken>;
|
|
6
|
-
}, theme: Theme<any, any>) => any;
|
|
7
|
-
export declare function useInternalToken(): [
|
|
8
|
-
theme: Theme<SeedToken, AliasToken>,
|
|
9
|
-
token: GlobalToken,
|
|
10
|
-
hashId: string,
|
|
11
|
-
realToken: GlobalToken,
|
|
12
|
-
cssVar?: DesignTokenProviderProps['cssVar']
|
|
13
|
-
];
|
|
14
|
-
export default function useToken(): {
|
|
15
|
-
theme: Theme<SeedToken, AliasToken>;
|
|
16
|
-
token: GlobalToken;
|
|
17
|
-
hashId: string;
|
|
18
|
-
};
|
package/dist/theme/useToken.js
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
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 = ["override"],
|
|
3
|
-
_excluded2 = ["theme"];
|
|
4
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
5
|
-
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."); }
|
|
6
|
-
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); }
|
|
7
|
-
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; }
|
|
8
|
-
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; } }
|
|
9
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
10
|
-
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; }
|
|
11
|
-
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; }
|
|
12
|
-
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; }
|
|
13
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
14
|
-
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); }
|
|
15
|
-
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; }
|
|
16
|
-
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; }
|
|
17
|
-
import { createTheme, useCacheToken } from '@ant-design/cssinjs';
|
|
18
|
-
import { theme as antdTheme } from 'antd';
|
|
19
|
-
import { ignore, unitless } from 'antd/es/theme/useToken';
|
|
20
|
-
import formatToken from 'antd/es/theme/util/alias';
|
|
21
|
-
import React from 'react';
|
|
22
|
-
import version from "../version";
|
|
23
|
-
var defaultTheme = createTheme(antdTheme.defaultAlgorithm);
|
|
24
|
-
var preserve = {
|
|
25
|
-
screenXS: true,
|
|
26
|
-
screenXSMin: true,
|
|
27
|
-
screenXSMax: true,
|
|
28
|
-
screenSM: true,
|
|
29
|
-
screenSMMin: true,
|
|
30
|
-
screenSMMax: true,
|
|
31
|
-
screenMD: true,
|
|
32
|
-
screenMDMin: true,
|
|
33
|
-
screenMDMax: true,
|
|
34
|
-
screenLG: true,
|
|
35
|
-
screenLGMin: true,
|
|
36
|
-
screenLGMax: true,
|
|
37
|
-
screenXL: true,
|
|
38
|
-
screenXLMin: true,
|
|
39
|
-
screenXLMax: true,
|
|
40
|
-
screenXXL: true,
|
|
41
|
-
screenXXLMin: true
|
|
42
|
-
};
|
|
43
|
-
export var getComputedToken = function getComputedToken(originToken, overrideToken, theme) {
|
|
44
|
-
var derivativeToken = theme.getDerivativeToken(originToken);
|
|
45
|
-
var override = overrideToken.override,
|
|
46
|
-
components = _objectWithoutProperties(overrideToken, _excluded);
|
|
47
|
-
|
|
48
|
-
// Merge with override
|
|
49
|
-
var mergedDerivativeToken = _objectSpread(_objectSpread({}, derivativeToken), {}, {
|
|
50
|
-
override: override
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
// Format if needed
|
|
54
|
-
mergedDerivativeToken = formatToken(mergedDerivativeToken);
|
|
55
|
-
if (components) {
|
|
56
|
-
Object.entries(components).forEach(function (_ref) {
|
|
57
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
58
|
-
key = _ref2[0],
|
|
59
|
-
value = _ref2[1];
|
|
60
|
-
var componentTheme = value.theme,
|
|
61
|
-
componentTokens = _objectWithoutProperties(value, _excluded2);
|
|
62
|
-
var mergedComponentToken = componentTokens;
|
|
63
|
-
if (componentTheme) {
|
|
64
|
-
mergedComponentToken = getComputedToken(_objectSpread(_objectSpread({}, mergedDerivativeToken), componentTokens), {
|
|
65
|
-
override: componentTokens
|
|
66
|
-
}, componentTheme);
|
|
67
|
-
}
|
|
68
|
-
mergedDerivativeToken[key] = mergedComponentToken;
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
return mergedDerivativeToken;
|
|
72
|
-
};
|
|
73
|
-
export function useInternalToken() {
|
|
74
|
-
var _React$useContext = React.useContext(antdTheme._internalContext),
|
|
75
|
-
rootDesignToken = _React$useContext.token,
|
|
76
|
-
hashed = _React$useContext.hashed,
|
|
77
|
-
_React$useContext$the = _React$useContext.theme,
|
|
78
|
-
theme = _React$useContext$the === void 0 ? defaultTheme : _React$useContext$the,
|
|
79
|
-
override = _React$useContext.override,
|
|
80
|
-
cssVar = _React$useContext.cssVar;
|
|
81
|
-
var _useCacheToken = useCacheToken(theme, [antdTheme.defaultSeed, rootDesignToken], {
|
|
82
|
-
salt: "".concat(version, "-").concat(hashed || ''),
|
|
83
|
-
override: override,
|
|
84
|
-
getComputedToken: getComputedToken,
|
|
85
|
-
cssVar: cssVar && {
|
|
86
|
-
prefix: cssVar.prefix,
|
|
87
|
-
key: cssVar.key,
|
|
88
|
-
unitless: unitless,
|
|
89
|
-
ignore: ignore,
|
|
90
|
-
preserve: preserve
|
|
91
|
-
}
|
|
92
|
-
}),
|
|
93
|
-
_useCacheToken2 = _slicedToArray(_useCacheToken, 3),
|
|
94
|
-
token = _useCacheToken2[0],
|
|
95
|
-
hashId = _useCacheToken2[1],
|
|
96
|
-
realToken = _useCacheToken2[2];
|
|
97
|
-
return [theme, realToken, hashed ? hashId : '', token, cssVar];
|
|
98
|
-
}
|
|
99
|
-
export default function useToken() {
|
|
100
|
-
var _useInternalToken = useInternalToken(),
|
|
101
|
-
_useInternalToken2 = _slicedToArray(_useInternalToken, 3),
|
|
102
|
-
theme = _useInternalToken2[0],
|
|
103
|
-
token = _useInternalToken2[1],
|
|
104
|
-
hashId = _useInternalToken2[2];
|
|
105
|
-
return {
|
|
106
|
-
theme: theme,
|
|
107
|
-
token: token,
|
|
108
|
-
hashId: hashId
|
|
109
|
-
};
|
|
110
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import 'recorder-core/src/extensions/waveview';
|
|
2
|
-
import { IVoiceChatContext } from '../VoiceChatProvider/context';
|
|
3
|
-
import { IVoiceChatService } from '../VoiceChatService';
|
|
4
|
-
export interface IRecorder extends IVoiceChatService {
|
|
5
|
-
onStart?: () => void;
|
|
6
|
-
onStop?: () => void;
|
|
7
|
-
chatState: IVoiceChatContext;
|
|
8
|
-
}
|
|
9
|
-
declare class Recorder {
|
|
10
|
-
private _recorderInstance;
|
|
11
|
-
private _voiceChatService;
|
|
12
|
-
private _recorderWave;
|
|
13
|
-
private _sendPcmBufferRef;
|
|
14
|
-
private _sendChunkRef;
|
|
15
|
-
private _sendLastFrameRef;
|
|
16
|
-
onStart: () => void;
|
|
17
|
-
onStop: () => void;
|
|
18
|
-
chatState: IVoiceChatContext;
|
|
19
|
-
constructor(props: IRecorder);
|
|
20
|
-
start(): Promise<void>;
|
|
21
|
-
stop(): void;
|
|
22
|
-
reset(): void;
|
|
23
|
-
send(pcmFrame: Int16Array, isClose: boolean): void;
|
|
24
|
-
process(buffers: (Int16Array | null)[], bufferSampleRate: number, isClose: boolean): void;
|
|
25
|
-
}
|
|
26
|
-
export default Recorder;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { TMessage } from "../..";
|
|
2
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
3
|
-
import Recorder from '../Recorder';
|
|
4
|
-
export interface IVoiceChatContext {
|
|
5
|
-
botSpeaking: boolean;
|
|
6
|
-
setBotSpeaking: Dispatch<SetStateAction<boolean>>;
|
|
7
|
-
getBotSpeaking: () => boolean;
|
|
8
|
-
userSpeaking: boolean;
|
|
9
|
-
setUserSpeaking: Dispatch<SetStateAction<boolean>>;
|
|
10
|
-
getUserSpeaking: () => boolean;
|
|
11
|
-
wsConnected: boolean;
|
|
12
|
-
setWsConnected: Dispatch<SetStateAction<boolean>>;
|
|
13
|
-
getWsConnected: () => boolean;
|
|
14
|
-
messages: TMessage[];
|
|
15
|
-
setMessages: Dispatch<SetStateAction<TMessage[]>>;
|
|
16
|
-
getMessages: () => TMessage[];
|
|
17
|
-
}
|
|
18
|
-
export declare const VoiceChatContext: import("react").Context<IVoiceChatContext>;
|
|
19
|
-
export interface IRecorderContext {
|
|
20
|
-
recorderRef: React.MutableRefObject<Recorder>;
|
|
21
|
-
}
|
|
22
|
-
export declare const RecorderContext: import("react").Context<IRecorderContext>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function (): import("../context").IVoiceChatContext;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { TMessage } from "../../..";
|
|
3
|
-
export default function (): {
|
|
4
|
-
messages: TMessage[];
|
|
5
|
-
setMessages: import("react").Dispatch<import("react").SetStateAction<TMessage[]>>;
|
|
6
|
-
getMessages: () => TMessage[];
|
|
7
|
-
updateMessage: (message: TMessage) => void;
|
|
8
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
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); }
|
|
4
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
|
-
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; }
|
|
7
|
-
import { useContext } from 'react';
|
|
8
|
-
import { VoiceChatContext } from "../context";
|
|
9
|
-
export default function () {
|
|
10
|
-
var _useContext = useContext(VoiceChatContext),
|
|
11
|
-
messages = _useContext.messages,
|
|
12
|
-
setMessages = _useContext.setMessages,
|
|
13
|
-
getMessages = _useContext.getMessages;
|
|
14
|
-
return {
|
|
15
|
-
messages: messages,
|
|
16
|
-
setMessages: setMessages,
|
|
17
|
-
getMessages: getMessages,
|
|
18
|
-
updateMessage: function updateMessage(message) {
|
|
19
|
-
setMessages(function (prev) {
|
|
20
|
-
var index = prev.findIndex(function (item) {
|
|
21
|
-
return item.id === message.id;
|
|
22
|
-
});
|
|
23
|
-
if (index > -1) {
|
|
24
|
-
return [].concat(_toConsumableArray(prev.slice(0, index)), [message], _toConsumableArray(prev.slice(index + 1)));
|
|
25
|
-
} else {
|
|
26
|
-
return [].concat(_toConsumableArray(prev), [message]);
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { useEffect, useRef } from 'react';
|
|
2
|
-
import Recorder from "../../Recorder";
|
|
3
|
-
import useChatState from "./useChatState";
|
|
4
|
-
import useMessages from "./useMessages";
|
|
5
|
-
export default function () {
|
|
6
|
-
var chatState = useChatState();
|
|
7
|
-
var messageContext = useMessages();
|
|
8
|
-
var recorderRef = useRef(new Recorder({
|
|
9
|
-
chatState: chatState,
|
|
10
|
-
wsURL: 'ws://localhost:8000/api',
|
|
11
|
-
onProcessASR: function onProcessASR(data) {
|
|
12
|
-
messageContext.updateMessage({
|
|
13
|
-
id: data.payload._id,
|
|
14
|
-
content: data.payload.text,
|
|
15
|
-
role: 'user'
|
|
16
|
-
});
|
|
17
|
-
chatState.setBotSpeaking(false);
|
|
18
|
-
chatState.setUserSpeaking(true);
|
|
19
|
-
},
|
|
20
|
-
onProcessResponseText: function onProcessResponseText(data) {
|
|
21
|
-
messageContext.updateMessage({
|
|
22
|
-
id: data.payload._id,
|
|
23
|
-
content: data.payload.text,
|
|
24
|
-
role: 'assistant'
|
|
25
|
-
});
|
|
26
|
-
chatState.setBotSpeaking(true);
|
|
27
|
-
chatState.setUserSpeaking(false);
|
|
28
|
-
},
|
|
29
|
-
onStart: function onStart() {
|
|
30
|
-
chatState.setUserSpeaking(true);
|
|
31
|
-
chatState.setWsConnected(true);
|
|
32
|
-
},
|
|
33
|
-
onStop: function onStop() {
|
|
34
|
-
messageContext.setMessages([]);
|
|
35
|
-
chatState.setBotSpeaking(false);
|
|
36
|
-
chatState.setUserSpeaking(false);
|
|
37
|
-
chatState.setWsConnected(false);
|
|
38
|
-
}
|
|
39
|
-
}));
|
|
40
|
-
useEffect(function () {
|
|
41
|
-
return function () {
|
|
42
|
-
recorderRef.current.stop();
|
|
43
|
-
};
|
|
44
|
-
}, []);
|
|
45
|
-
return {
|
|
46
|
-
recorderRef: recorderRef
|
|
47
|
-
};
|
|
48
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { useContext } from 'react';
|
|
2
|
-
import { RecorderContext, VoiceChatContext } from "../context";
|
|
3
|
-
export default function useVoiceChat() {
|
|
4
|
-
var voiceChatContext = useContext(VoiceChatContext);
|
|
5
|
-
var recorderContext = useContext(RecorderContext);
|
|
6
|
-
return {
|
|
7
|
-
voiceChatContext: voiceChatContext,
|
|
8
|
-
recorderContext: recorderContext
|
|
9
|
-
};
|
|
10
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ReactElement } from "react";
|
|
3
|
-
declare function VoiceChatProvider(props: {
|
|
4
|
-
children: ReactElement;
|
|
5
|
-
}): React.JSX.Element;
|
|
6
|
-
declare function RecorderProvider(props: {
|
|
7
|
-
children: ReactElement | ReactElement[];
|
|
8
|
-
}): React.JSX.Element;
|
|
9
|
-
export { VoiceChatProvider, RecorderProvider, };
|