@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
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import useStyle from "./style";
|
|
3
|
+
import { useProviderContext } from "../Provider";
|
|
4
|
+
import { ConfigProvider, Image } from 'antd';
|
|
5
|
+
import { SparkCheckCircleFill } from '@agentscope-ai/icons';
|
|
6
|
+
import Dot from "../Markdown/cursor/Dot";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
|
+
var ImageGenerator = function ImageGenerator(props) {
|
|
11
|
+
var Style = useStyle();
|
|
12
|
+
var _useProviderContext = useProviderContext(),
|
|
13
|
+
getPrefixCls = _useProviderContext.getPrefixCls;
|
|
14
|
+
var prefixCls = getPrefixCls('image-generator');
|
|
15
|
+
var _props$width = props.width,
|
|
16
|
+
width = _props$width === void 0 ? 320 : _props$width,
|
|
17
|
+
_props$height = props.height,
|
|
18
|
+
height = _props$height === void 0 ? 320 : _props$height,
|
|
19
|
+
src = props.src,
|
|
20
|
+
_props$loadingText = props.loadingText,
|
|
21
|
+
loadingText = _props$loadingText === void 0 ? 'Painting...' : _props$loadingText,
|
|
22
|
+
_props$doneText = props.doneText,
|
|
23
|
+
doneText = _props$doneText === void 0 ? 'Paint Completed' : _props$doneText;
|
|
24
|
+
var skeleton = props.skeleton || /*#__PURE__*/_jsxs("div", {
|
|
25
|
+
className: "".concat(prefixCls, "-default-skeleton"),
|
|
26
|
+
style: {
|
|
27
|
+
width: width,
|
|
28
|
+
height: height
|
|
29
|
+
},
|
|
30
|
+
children: [/*#__PURE__*/_jsx("img", {
|
|
31
|
+
className: "".concat(prefixCls, "-default-skeleton-bg"),
|
|
32
|
+
src: "https://img.alicdn.com/imgextra/i2/O1CN01jwLfwV1hPiHfJjQXM_!!6000000004270-2-tps-1155-763.png",
|
|
33
|
+
alt: ""
|
|
34
|
+
}), /*#__PURE__*/_jsx("img", {
|
|
35
|
+
className: "".concat(prefixCls, "-default-skeleton-icon"),
|
|
36
|
+
src: "https://img.alicdn.com/imgextra/i2/O1CN01M1X8yM1MWUC7u3Go5_!!6000000001442-54-tps-72-72.apng"
|
|
37
|
+
})]
|
|
38
|
+
});
|
|
39
|
+
var loading = !src;
|
|
40
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
41
|
+
children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsxs("div", {
|
|
42
|
+
className: prefixCls,
|
|
43
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
44
|
+
className: "".concat(prefixCls, "-text"),
|
|
45
|
+
children: [loading ? /*#__PURE__*/_jsx(Dot, {}) : /*#__PURE__*/_jsx(SparkCheckCircleFill, {
|
|
46
|
+
className: "".concat(prefixCls, "-text-success")
|
|
47
|
+
}), loading ? /*#__PURE__*/_jsx("span", {
|
|
48
|
+
style: {
|
|
49
|
+
paddingLeft: 20
|
|
50
|
+
},
|
|
51
|
+
children: loadingText
|
|
52
|
+
}) : doneText]
|
|
53
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
54
|
+
className: "".concat(prefixCls, "-wrapper"),
|
|
55
|
+
style: {
|
|
56
|
+
width: width,
|
|
57
|
+
height: height
|
|
58
|
+
},
|
|
59
|
+
children: loading ? skeleton : /*#__PURE__*/_jsx(ConfigProvider, {
|
|
60
|
+
locale: {
|
|
61
|
+
Image: {
|
|
62
|
+
preview: ''
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
children: /*#__PURE__*/_jsx(Image, {
|
|
66
|
+
height: height,
|
|
67
|
+
width: width,
|
|
68
|
+
src: src
|
|
69
|
+
})
|
|
70
|
+
})
|
|
71
|
+
})]
|
|
72
|
+
})]
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
export default ImageGenerator;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import { createGlobalStyle } from "./..";
|
|
4
|
+
export default createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-image-generator {\n\n .", "-image {\n border-radius: 8px;\n filter: blur(20px);\n animation: ", "clearBlur 1s ease forwards;\n overflow: hidden;\n }\n\n\n &-wrapper {\n overflow: hidden;\n }\n\n\n &-text {\n position: relative;\n display: flex;\n gap: 8px;\n height: 40px;\n align-items: center;\n font-size: 14px;\n line-height: 26px;\n color: ", ";\n\n\n &-success {\n color: ", ";\n font-size: 20px;\n }\n }\n\n &-default-skeleton {\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n\n\n &-bg {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(0deg);\n width: 300%;\n height: 300%;\n object-fit: cover;\n animation: ", "spin 6s linear infinite;\n pointer-events: none;\n }\n\n &-icon {\n width: 32px;\n height: 32px;\n z-index: 1;\n }\n }\n}\n\n\n\n@keyframes ", "clearBlur {\n from {\n filter: blur(20px);\n }\n to {\n filter: blur(0);\n }\n}\n\n@keyframes ", "spin {\n from {\n transform: translate(-50%, -50%) rotate(0deg);\n }\n to {\n transform: translate(-50%, -50%) rotate(360deg);\n }\n}\n"])), function (p) {
|
|
5
|
+
return p.prefix;
|
|
6
|
+
}, function (p) {
|
|
7
|
+
return p.prefix;
|
|
8
|
+
}, function (p) {
|
|
9
|
+
return p.prefix;
|
|
10
|
+
}, function (p) {
|
|
11
|
+
return p.theme.colorText;
|
|
12
|
+
}, function (p) {
|
|
13
|
+
return p.theme.colorSuccess;
|
|
14
|
+
}, function (p) {
|
|
15
|
+
return p.prefix;
|
|
16
|
+
}, function (p) {
|
|
17
|
+
return p.prefix;
|
|
18
|
+
}, function (p) {
|
|
19
|
+
return p.prefix;
|
|
20
|
+
});
|
|
@@ -3,6 +3,7 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { createStyles } from 'antd-style';
|
|
5
5
|
import { Popover } from 'antd';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
7
|
var useStyles = createStyles(function (_ref) {
|
|
7
8
|
var css = _ref.css,
|
|
8
9
|
token = _ref.token;
|
|
@@ -21,23 +22,27 @@ function DefaultRender(_ref2) {
|
|
|
21
22
|
cx = _useStyles.cx;
|
|
22
23
|
var isTooltip = citationDetail.content || citationDetail.title;
|
|
23
24
|
var url = citationDetail === null || citationDetail === void 0 ? void 0 : citationDetail.url;
|
|
24
|
-
var node = /*#__PURE__*/
|
|
25
|
-
className: cx(styles.container, styles.supContainer)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
var node = /*#__PURE__*/_jsx("sup", {
|
|
26
|
+
className: cx(styles.container, styles.supContainer),
|
|
27
|
+
children: /*#__PURE__*/_jsx("a", {
|
|
28
|
+
className: cx(styles.content, styles.hover),
|
|
29
|
+
rel: "noreferrer",
|
|
30
|
+
href: citationDetail.url,
|
|
31
|
+
target: '_blank',
|
|
32
|
+
children: id
|
|
33
|
+
})
|
|
34
|
+
});
|
|
32
35
|
if (isTooltip) {
|
|
33
|
-
return /*#__PURE__*/
|
|
36
|
+
return /*#__PURE__*/_jsx(Popover, {
|
|
34
37
|
title: citationDetail.title,
|
|
35
|
-
content: url ? /*#__PURE__*/
|
|
38
|
+
content: url ? /*#__PURE__*/_jsx("a", {
|
|
36
39
|
href: url,
|
|
37
40
|
rel: "noreferrer",
|
|
38
|
-
target: '_blank'
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
target: '_blank',
|
|
42
|
+
children: url
|
|
43
|
+
}) : citationDetail.content,
|
|
44
|
+
children: node
|
|
45
|
+
});
|
|
41
46
|
}
|
|
42
47
|
return node;
|
|
43
48
|
}
|
|
@@ -47,7 +52,7 @@ var Citation = function Citation(props) {
|
|
|
47
52
|
var _citationDetail$rende = citationDetail.render,
|
|
48
53
|
render = _citationDetail$rende === void 0 ? DefaultRender : _citationDetail$rende;
|
|
49
54
|
var Render = render;
|
|
50
|
-
return /*#__PURE__*/
|
|
55
|
+
return /*#__PURE__*/_jsx(Render, {
|
|
51
56
|
id: id,
|
|
52
57
|
citationDetail: citationDetail
|
|
53
58
|
});
|
|
@@ -7,11 +7,13 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
7
7
|
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; } }
|
|
8
8
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9
9
|
import React, { useState } from 'react';
|
|
10
|
-
import { CodeBlock as Code, CodeBlockLangExtensionsMap } from
|
|
10
|
+
import { CodeBlock as Code, CodeBlockLangExtensionsMap } from "@agentscope-ai/design";
|
|
11
11
|
import { createStyles } from 'antd-style';
|
|
12
|
-
import {
|
|
13
|
-
import { useProviderContext } from "./..";
|
|
12
|
+
import { useProviderContext, Mermaid } from "./..";
|
|
14
13
|
import { theme as AntdTheme } from 'antd';
|
|
14
|
+
import { SparkCopyLine, SparkTrueLine } from '@agentscope-ai/icons';
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
17
|
var supportedLanguages = Object.keys(CodeBlockLangExtensionsMap);
|
|
16
18
|
var countLines = function countLines(str) {
|
|
17
19
|
var regex = /\n/g;
|
|
@@ -34,7 +36,8 @@ var useCode = function useCode(raw) {
|
|
|
34
36
|
};
|
|
35
37
|
};
|
|
36
38
|
var CodeBlock = function CodeBlock(_ref) {
|
|
37
|
-
var children = _ref.children
|
|
39
|
+
var children = _ref.children,
|
|
40
|
+
enableMermaid = _ref.enableMermaid;
|
|
38
41
|
var code = useCode(children);
|
|
39
42
|
var _useStyles = useStyles(),
|
|
40
43
|
styles = _useStyles.styles,
|
|
@@ -51,38 +54,56 @@ var CodeBlock = function CodeBlock(_ref) {
|
|
|
51
54
|
content = _code$content === void 0 ? '' : _code$content,
|
|
52
55
|
_code$lang = code.lang,
|
|
53
56
|
lang = _code$lang === void 0 ? '' : _code$lang;
|
|
54
|
-
if (!
|
|
55
|
-
if (
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
57
|
+
if (!content) return null;
|
|
58
|
+
if (enableMermaid && lang === 'mermaid') {
|
|
59
|
+
return /*#__PURE__*/_jsx(Mermaid, {
|
|
60
|
+
content: content,
|
|
61
|
+
width: "50%"
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
if (supportedLanguages.indexOf(lang) === -1) return /*#__PURE__*/_jsx("pre", {
|
|
65
|
+
children: /*#__PURE__*/_jsx("code", {
|
|
66
|
+
children: content
|
|
67
|
+
})
|
|
68
|
+
});
|
|
69
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
70
|
+
className: styles.container,
|
|
71
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
72
|
+
className: styles.header,
|
|
73
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
74
|
+
className: styles.lang,
|
|
75
|
+
children: lang
|
|
76
|
+
}), copied ? /*#__PURE__*/_jsx(SparkTrueLine, {
|
|
77
|
+
className: styles.copied
|
|
78
|
+
}) : /*#__PURE__*/_jsx(SparkCopyLine, {
|
|
79
|
+
className: styles.icon,
|
|
80
|
+
onClick: function onClick() {
|
|
81
|
+
navigator.clipboard.writeText(content);
|
|
82
|
+
setCopied(true);
|
|
83
|
+
setTimeout(function () {
|
|
84
|
+
setCopied(false);
|
|
85
|
+
}, 1000);
|
|
86
|
+
}
|
|
87
|
+
})]
|
|
88
|
+
}), /*#__PURE__*/_jsx(Code, {
|
|
89
|
+
value: content,
|
|
90
|
+
language: lang,
|
|
91
|
+
theme: isDarkMode ? 'dark' : 'light',
|
|
92
|
+
readOnly: true
|
|
93
|
+
})]
|
|
94
|
+
});
|
|
77
95
|
};
|
|
78
96
|
var useStyles = createStyles(function (_ref2) {
|
|
79
97
|
var css = _ref2.css,
|
|
80
98
|
token = _ref2.token;
|
|
81
99
|
return {
|
|
82
|
-
copied: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", "
|
|
83
|
-
container: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n border-radius: 6px;\n overflow: hidden;\n font-size: 0.8571428571428571em;\n "])), token.colorBorderSecondary),
|
|
100
|
+
copied: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n cursor: pointer;\n font-size: 16px;\n "])), token.colorSuccess),
|
|
101
|
+
container: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n border-radius: 6px;\n overflow: hidden;\n font-size: 0.8571428571428571em;\n margin: 1em 0;\n "])), token.colorBorderSecondary),
|
|
84
102
|
header: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n background: ", ";\n height: 28px;\n line-height: 28px;\n border-radius: 4px 4px 0 0;\n align-items: center;\n user-select: none;\n position: relative;\n padding: 0 12px;\n "])), token.colorFillSecondary),
|
|
85
|
-
icon: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n fontsize:
|
|
103
|
+
icon: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n fontsize: 16px;\n cursor: pointer;\n "]))),
|
|
104
|
+
lang: {
|
|
105
|
+
textTransform: 'capitalize'
|
|
106
|
+
}
|
|
86
107
|
};
|
|
87
108
|
});
|
|
88
109
|
export default CodeBlock;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (props: any): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,113 @@
|
|
|
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
+
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."); }
|
|
4
|
+
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); }
|
|
5
|
+
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; }
|
|
6
|
+
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; } }
|
|
7
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
|
+
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; }
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
12
|
+
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); }
|
|
13
|
+
import React, { useState } from "react";
|
|
14
|
+
import { ConfigProvider, Modal, Image as ImageViewer } from 'antd';
|
|
15
|
+
import { useProviderContext } from "../Provider";
|
|
16
|
+
import { SparkFalseLine, SparkPlayCircleFill } from "@agentscope-ai/icons";
|
|
17
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
19
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
+
export default function (props) {
|
|
21
|
+
try {
|
|
22
|
+
var src = props.src;
|
|
23
|
+
var url = new URL(src);
|
|
24
|
+
var pathname = url.pathname;
|
|
25
|
+
var isVideo = pathname.endsWith(".mp4");
|
|
26
|
+
var isAudio = pathname.endsWith(".mp3");
|
|
27
|
+
if (isAudio) {
|
|
28
|
+
return /*#__PURE__*/_jsx("audio", _objectSpread(_objectSpread({
|
|
29
|
+
src: props.src
|
|
30
|
+
}, props), {}, {
|
|
31
|
+
controls: true
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
if (isVideo) {
|
|
35
|
+
return /*#__PURE__*/_jsx(Video, _objectSpread({
|
|
36
|
+
src: props.src
|
|
37
|
+
}, props));
|
|
38
|
+
}
|
|
39
|
+
return /*#__PURE__*/_jsx(Image, _objectSpread({
|
|
40
|
+
src: props.src
|
|
41
|
+
}, props));
|
|
42
|
+
} catch (error) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function Image(props) {
|
|
47
|
+
return /*#__PURE__*/_jsx(ConfigProvider, {
|
|
48
|
+
locale: {
|
|
49
|
+
Image: {
|
|
50
|
+
preview: ''
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
children: /*#__PURE__*/_jsx(ImageViewer, _objectSpread({
|
|
54
|
+
src: props.src
|
|
55
|
+
}, props))
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function Video(props) {
|
|
59
|
+
var src = props.src;
|
|
60
|
+
var _useState = useState(false),
|
|
61
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
62
|
+
open = _useState2[0],
|
|
63
|
+
setOpen = _useState2[1];
|
|
64
|
+
var _useProviderContext = useProviderContext(),
|
|
65
|
+
getPrefixCls = _useProviderContext.getPrefixCls;
|
|
66
|
+
var prefixCls = getPrefixCls('markdown-video');
|
|
67
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
68
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
69
|
+
onClick: function onClick() {
|
|
70
|
+
return setOpen(true);
|
|
71
|
+
},
|
|
72
|
+
className: prefixCls,
|
|
73
|
+
children: /*#__PURE__*/_jsx(SparkPlayCircleFill, {
|
|
74
|
+
className: "".concat(prefixCls, "-play")
|
|
75
|
+
})
|
|
76
|
+
}), /*#__PURE__*/_jsx(Modal, {
|
|
77
|
+
closeIcon: /*#__PURE__*/_jsx("a", {
|
|
78
|
+
children: /*#__PURE__*/_jsx(SparkFalseLine, {
|
|
79
|
+
style: {
|
|
80
|
+
fontSize: 20
|
|
81
|
+
}
|
|
82
|
+
})
|
|
83
|
+
}),
|
|
84
|
+
centered: true,
|
|
85
|
+
transitionName: "",
|
|
86
|
+
footer: null,
|
|
87
|
+
width: 500,
|
|
88
|
+
title: "",
|
|
89
|
+
styles: {
|
|
90
|
+
content: {
|
|
91
|
+
padding: 0
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
open: open,
|
|
95
|
+
destroyOnHidden: true,
|
|
96
|
+
onCancel: function onCancel() {
|
|
97
|
+
return setOpen(false);
|
|
98
|
+
},
|
|
99
|
+
children: /*#__PURE__*/_jsx("video", {
|
|
100
|
+
controls: true,
|
|
101
|
+
autoPlay: true,
|
|
102
|
+
style: {
|
|
103
|
+
display: 'block',
|
|
104
|
+
width: '100%'
|
|
105
|
+
},
|
|
106
|
+
children: /*#__PURE__*/_jsx("source", {
|
|
107
|
+
src: src,
|
|
108
|
+
type: "video/mp4"
|
|
109
|
+
})
|
|
110
|
+
})
|
|
111
|
+
})]
|
|
112
|
+
});
|
|
113
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var _excluded = ["href", "target", "citationsData"];
|
|
2
|
+
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); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
+
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; }
|
|
6
|
+
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; }
|
|
7
|
+
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; }
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
9
|
+
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); }
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import Citation from "./Citation";
|
|
12
|
+
import Underline from "./cursor/Underline";
|
|
13
|
+
import Dot from "./cursor/Dot";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
var Link = function Link(props) {
|
|
16
|
+
var _href$startsWith;
|
|
17
|
+
var href = props.href,
|
|
18
|
+
target = props.target,
|
|
19
|
+
citationsData = props.citationsData,
|
|
20
|
+
children = props.children;
|
|
21
|
+
if (children === 'cursor' && (href === 'dot' || href === 'underline')) {
|
|
22
|
+
if (href === 'dot') return /*#__PURE__*/_jsx(Dot, {});
|
|
23
|
+
if (href === 'underline') return /*#__PURE__*/_jsx(Underline, {});
|
|
24
|
+
}
|
|
25
|
+
var match = href === null || href === void 0 || (_href$startsWith = href.startsWith) === null || _href$startsWith === void 0 ? void 0 : _href$startsWith.call(href, 'citation-');
|
|
26
|
+
if (match) {
|
|
27
|
+
var key = href === null || href === void 0 ? void 0 : href.replace('citation-', '');
|
|
28
|
+
var detail = citationsData === null || citationsData === void 0 ? void 0 : citationsData[key];
|
|
29
|
+
return detail ? /*#__PURE__*/_jsx(Citation, {
|
|
30
|
+
citationDetail: detail,
|
|
31
|
+
id: key
|
|
32
|
+
}) : /*#__PURE__*/_jsx(InnerLink, _objectSpread({}, props));
|
|
33
|
+
}
|
|
34
|
+
return /*#__PURE__*/_jsx(InnerLink, _objectSpread({}, props));
|
|
35
|
+
};
|
|
36
|
+
function InnerLink(props) {
|
|
37
|
+
var href = props.href,
|
|
38
|
+
target = props.target,
|
|
39
|
+
citationsData = props.citationsData,
|
|
40
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
41
|
+
var isNewWindow = href === null || href === void 0 ? void 0 : href.startsWith('http');
|
|
42
|
+
return /*#__PURE__*/_jsx("a", _objectSpread({
|
|
43
|
+
href: href,
|
|
44
|
+
target: target || isNewWindow ? '_blank' : undefined,
|
|
45
|
+
rel: "noopener noreferrer"
|
|
46
|
+
}, rest));
|
|
47
|
+
}
|
|
48
|
+
export default Link;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
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 _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
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; }
|
|
@@ -11,13 +10,16 @@ import ReactMarkdown from 'react-markdown';
|
|
|
11
10
|
import { addToCache, contentCache, createPlugins, escapeBrackets, escapeMhchem, fixMarkdownBold, transformCitations, Null } from "./utils";
|
|
12
11
|
import Link from "./Link";
|
|
13
12
|
import CodeBlock from "./CodeBlock";
|
|
14
|
-
import
|
|
13
|
+
import ImageOrMedia from "./ImageOrMedia";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
var emptyArray = [];
|
|
16
16
|
var emptyMap = {};
|
|
17
17
|
var Markdown = /*#__PURE__*/memo(function (_ref) {
|
|
18
18
|
var children = _ref.children,
|
|
19
19
|
_ref$enableLatex = _ref.enableLatex,
|
|
20
20
|
enableLatex = _ref$enableLatex === void 0 ? true : _ref$enableLatex,
|
|
21
|
+
_ref$enableMermaid = _ref.enableMermaid,
|
|
22
|
+
enableMermaid = _ref$enableMermaid === void 0 ? true : _ref$enableMermaid,
|
|
21
23
|
_ref$enableCustomFoot = _ref.enableCustomFootnotes,
|
|
22
24
|
enableCustomFootnotes = _ref$enableCustomFoot === void 0 ? true : _ref$enableCustomFoot,
|
|
23
25
|
componentProps = _ref.componentProps,
|
|
@@ -66,13 +68,19 @@ var Markdown = /*#__PURE__*/memo(function (_ref) {
|
|
|
66
68
|
|
|
67
69
|
// 缓存处理结果
|
|
68
70
|
addToCache(cacheKey, processedContent);
|
|
71
|
+
if (cursor) {
|
|
72
|
+
if (typeof cursor === 'string') {
|
|
73
|
+
processedContent = processedContent + " [cursor](".concat(cursor, ")");
|
|
74
|
+
} else {
|
|
75
|
+
processedContent = processedContent + " [cursor](dot)";
|
|
76
|
+
}
|
|
77
|
+
}
|
|
69
78
|
return processedContent;
|
|
70
|
-
}, [cacheKey, children, enableLatex, enableCustomFootnotes, citationsData]);
|
|
79
|
+
}, [cacheKey, children, cursor, enableLatex, enableCustomFootnotes, citationsData]);
|
|
71
80
|
|
|
72
81
|
// 创建插件
|
|
73
82
|
var _useMemo = useMemo(function () {
|
|
74
83
|
return createPlugins({
|
|
75
|
-
cursor: cursor,
|
|
76
84
|
allowHtml: allowHtml,
|
|
77
85
|
enableLatex: enableLatex,
|
|
78
86
|
enableCustomFootnotes: enableCustomFootnotes,
|
|
@@ -84,17 +92,19 @@ var Markdown = /*#__PURE__*/memo(function (_ref) {
|
|
|
84
92
|
rehypePluginsList = _useMemo.rehypePluginsList,
|
|
85
93
|
remarkPluginsList = _useMemo.remarkPluginsList;
|
|
86
94
|
var renderLink = useCallback(function (props) {
|
|
87
|
-
return /*#__PURE__*/
|
|
95
|
+
return /*#__PURE__*/_jsx(Link, _objectSpread(_objectSpread({
|
|
88
96
|
citationsData: citationsData
|
|
89
|
-
}, props, componentProps === null || componentProps === void 0 ? void 0 : componentProps.a));
|
|
97
|
+
}, props), componentProps === null || componentProps === void 0 ? void 0 : componentProps.a));
|
|
90
98
|
}, [citationsData, componentProps === null || componentProps === void 0 ? void 0 : componentProps.a]);
|
|
91
99
|
var renderImage = useCallback(function (props) {
|
|
92
|
-
return /*#__PURE__*/
|
|
100
|
+
return /*#__PURE__*/_jsx(ImageOrMedia, _objectSpread({
|
|
93
101
|
src: props.src
|
|
94
102
|
}, props));
|
|
95
103
|
}, [componentProps === null || componentProps === void 0 ? void 0 : componentProps.img]);
|
|
96
104
|
var renderCodeBlock = useCallback(function (props) {
|
|
97
|
-
return /*#__PURE__*/
|
|
105
|
+
return /*#__PURE__*/_jsx(CodeBlock, _objectSpread(_objectSpread(_objectSpread({}, props), componentProps === null || componentProps === void 0 ? void 0 : componentProps.pre), {}, {
|
|
106
|
+
enableMermaid: enableMermaid
|
|
107
|
+
}));
|
|
98
108
|
}, [componentProps === null || componentProps === void 0 ? void 0 : componentProps.pre]);
|
|
99
109
|
|
|
100
110
|
// 创建组件映射
|
|
@@ -110,11 +120,12 @@ var Markdown = /*#__PURE__*/memo(function (_ref) {
|
|
|
110
120
|
|
|
111
121
|
// 渲染默认内容
|
|
112
122
|
var defaultDOM = useMemo(function () {
|
|
113
|
-
return /*#__PURE__*/
|
|
123
|
+
return /*#__PURE__*/_jsx(ReactMarkdown, _objectSpread(_objectSpread({}, reactMarkdownProps), {}, {
|
|
114
124
|
components: memoComponents,
|
|
115
125
|
rehypePlugins: rehypePluginsList,
|
|
116
|
-
remarkPlugins: remarkPluginsList
|
|
117
|
-
|
|
126
|
+
remarkPlugins: remarkPluginsList,
|
|
127
|
+
children: escapedContent
|
|
128
|
+
}));
|
|
118
129
|
}, [escapedContent, memoComponents, rehypePluginsList, remarkPluginsList]);
|
|
119
130
|
return defaultDOM;
|
|
120
131
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import { createGlobalStyle, useProviderContext } from "../..";
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
|
+
var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-markdown-cursor-dot {\n display: inline-flex;\n width: 0;\n align-items: center;\n padding-left: 2px;\n gap: 4px;\n\n\n &-dot1 {\n flex: 0 0 5px;\n width: 5px;\n height: 5px;\n border-radius: 999px;\n background-color: ", ";\n animation: markdown-cursor-dot1 2s infinite ease;\n }\n\n\n &-dot2 {\n flex: 0 0 5px;\n width: 5px;\n height: 5px;\n border-radius: 999px;\n opacity: 0.5;\n background-color: ", ";\n animation: markdown-cursor-dot2 2s infinite ease;\n }\n\n}\n\n\n@keyframes markdown-cursor-dot1 {\n 0% {\n transform: translateX(0px)scale(1);\n z-index: 1;\n opacity: 1;\n\n }\n\n 40% {\n transform: translateX(8.5px)scale(0.8);\n z-index: 3;\n opacity: 0.5;\n\n }\n\n 50% {\n transform: translateX(8.5px) scale(0.8);\n z-index: 1;\n opacity: 0.5;\n }\n\n 90% {\n transform: translateX(0px) scale(1);\n z-index: 1;\n opacity: 1;\n }\n}\n\n@keyframes markdown-cursor-dot2 {\n 0% {\n transform: translateX(0px)scale(1);\n z-index: 1;\n opacity: 0.5;\n\n }\n\n 40% {\n transform: translateX(-8.5px)scale(1.25);\n z-index: 3;\n opacity: 1;\n\n }\n\n 50% {\n transform: translateX(-8.5px) scale(1.25);\n z-index: 1;\n opacity: 1;\n }\n\n 90% {\n transform: translateX(0px) scale(1);\n z-index: 1;\n opacity: 0.5;\n }\n}\n"])), function (p) {
|
|
9
|
+
return p.prefix;
|
|
10
|
+
}, function (p) {
|
|
11
|
+
return p.theme.colorText;
|
|
12
|
+
}, function (p) {
|
|
13
|
+
return p.theme.colorText;
|
|
14
|
+
});
|
|
15
|
+
export default function () {
|
|
16
|
+
var _useProviderContext = useProviderContext(),
|
|
17
|
+
getPrefixCls = _useProviderContext.getPrefixCls;
|
|
18
|
+
var prefixCls = getPrefixCls('markdown-cursor-dot');
|
|
19
|
+
var Style = useStyle();
|
|
20
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
21
|
+
children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsxs("span", {
|
|
22
|
+
className: classNames(prefixCls, getPrefixCls('markdown-cursor')),
|
|
23
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
24
|
+
style: {
|
|
25
|
+
opacity: 0,
|
|
26
|
+
marginLeft: '-.75em'
|
|
27
|
+
},
|
|
28
|
+
children: "_"
|
|
29
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
30
|
+
className: "".concat(prefixCls, "-dot1")
|
|
31
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
32
|
+
className: "".concat(prefixCls, "-dot2")
|
|
33
|
+
})]
|
|
34
|
+
})]
|
|
35
|
+
});
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { createGlobalStyle, useProviderContext } from "../..";
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.markdown-cursor-underline {\n opacity: 1;\n padding: 0 2px;\n animation: markdown-cursor-underline .8s infinite;\n\n &::after {\n content: '_';\n color: e('var(--@{ant-prefix}-color-primary)'),\n }\n}\n\n\n@keyframes markdown-cursor-underline {\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n}\n"])));
|
|
10
|
+
export default function () {
|
|
11
|
+
var _useProviderContext = useProviderContext(),
|
|
12
|
+
getPrefixCls = _useProviderContext.getPrefixCls;
|
|
13
|
+
var prefixCls = 'markdown-cursor-underline';
|
|
14
|
+
var Style = useStyle();
|
|
15
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
16
|
+
children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx("span", {
|
|
17
|
+
className: classNames(prefixCls, getPrefixCls('markdown-cursor'))
|
|
18
|
+
})]
|
|
19
|
+
});
|
|
20
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -4,7 +4,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
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; }
|
|
5
5
|
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; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import { BubbleContext } from "../../
|
|
7
|
+
import { BubbleContext } from "../../Bubble/Bubble";
|
|
8
8
|
import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect';
|
|
9
9
|
import * as React from 'react';
|
|
10
10
|
function isString(str) {
|