@ant-design/agentic-ui 2.0.0
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 +9 -0
- package/README.md +156 -0
- package/dist/AgentRunBar/Robot.d.ts +15 -0
- package/dist/AgentRunBar/Robot.js +66 -0
- package/dist/AgentRunBar/icons/PauseIcon.d.ts +2 -0
- package/dist/AgentRunBar/icons/PauseIcon.js +45 -0
- package/dist/AgentRunBar/icons/PlayIcon.d.ts +2 -0
- package/dist/AgentRunBar/icons/PlayIcon.js +45 -0
- package/dist/AgentRunBar/icons/SimplePauseIcon.d.ts +2 -0
- package/dist/AgentRunBar/icons/SimplePauseIcon.js +44 -0
- package/dist/AgentRunBar/icons/SimplePlayIcon.d.ts +2 -0
- package/dist/AgentRunBar/icons/SimplePlayIcon.js +44 -0
- package/dist/AgentRunBar/icons/SimpleStopIcon.d.ts +2 -0
- package/dist/AgentRunBar/icons/SimpleStopIcon.js +44 -0
- package/dist/AgentRunBar/icons/StopIcon.d.ts +2 -0
- package/dist/AgentRunBar/icons/StopIcon.js +65 -0
- package/dist/AgentRunBar/icons/index.d.ts +6 -0
- package/dist/AgentRunBar/icons/index.js +7 -0
- package/dist/AgentRunBar/index.d.ts +144 -0
- package/dist/AgentRunBar/index.js +249 -0
- package/dist/AgentRunBar/style.d.ts +22 -0
- package/dist/AgentRunBar/style.js +261 -0
- package/dist/AgenticLayout/index.d.ts +69 -0
- package/dist/AgenticLayout/index.js +97 -0
- package/dist/AgenticLayout/style.d.ts +5 -0
- package/dist/AgenticLayout/style.js +118 -0
- package/dist/AnswerAlert/components/CloseIcon.d.ts +2 -0
- package/dist/AnswerAlert/components/CloseIcon.js +27 -0
- package/dist/AnswerAlert/components/ErrorIcon.d.ts +2 -0
- package/dist/AnswerAlert/components/ErrorIcon.js +45 -0
- package/dist/AnswerAlert/components/InfoIcon.d.ts +2 -0
- package/dist/AnswerAlert/components/InfoIcon.js +45 -0
- package/dist/AnswerAlert/components/LoaderIcon.d.ts +2 -0
- package/dist/AnswerAlert/components/LoaderIcon.js +27 -0
- package/dist/AnswerAlert/components/SuccessIcon.d.ts +2 -0
- package/dist/AnswerAlert/components/SuccessIcon.js +45 -0
- package/dist/AnswerAlert/components/WarningIcon.d.ts +2 -0
- package/dist/AnswerAlert/components/WarningIcon.js +45 -0
- package/dist/AnswerAlert/index.d.ts +69 -0
- package/dist/AnswerAlert/index.js +94 -0
- package/dist/AnswerAlert/style.d.ts +5 -0
- package/dist/AnswerAlert/style.js +161 -0
- package/dist/BackTo/BackBottom.d.ts +10 -0
- package/dist/BackTo/BackBottom.js +80 -0
- package/dist/BackTo/BackTop.d.ts +10 -0
- package/dist/BackTo/BackTop.js +77 -0
- package/dist/BackTo/ScrollVisibleButton.d.ts +25 -0
- package/dist/BackTo/ScrollVisibleButton.js +110 -0
- package/dist/BackTo/hooks/useScrollVisible.d.ts +16 -0
- package/dist/BackTo/hooks/useScrollVisible.js +38 -0
- package/dist/BackTo/icons/BottomIcon.d.ts +2 -0
- package/dist/BackTo/icons/BottomIcon.js +44 -0
- package/dist/BackTo/icons/TopIcon.d.ts +2 -0
- package/dist/BackTo/icons/TopIcon.js +44 -0
- package/dist/BackTo/index.d.ts +7 -0
- package/dist/BackTo/index.js +10 -0
- package/dist/BackTo/style.d.ts +6 -0
- package/dist/BackTo/style.js +75 -0
- package/dist/Bubble/AIBubble.d.ts +46 -0
- package/dist/Bubble/AIBubble.js +470 -0
- package/dist/Bubble/Avatar/index.d.ts +45 -0
- package/dist/Bubble/Avatar/index.js +92 -0
- package/dist/Bubble/Avatar/isEmoji.d.ts +1 -0
- package/dist/Bubble/Avatar/isEmoji.js +8 -0
- package/dist/Bubble/Bubble.d.ts +48 -0
- package/dist/Bubble/Bubble.js +45 -0
- package/dist/Bubble/BubbleConfigProvide.d.ts +34 -0
- package/dist/Bubble/BubbleConfigProvide.js +10 -0
- package/dist/Bubble/FileView.d.ts +27 -0
- package/dist/Bubble/FileView.js +86 -0
- package/dist/Bubble/List/SkeletonList.d.ts +3 -0
- package/dist/Bubble/List/SkeletonList.js +27 -0
- package/dist/Bubble/List/index.d.ts +232 -0
- package/dist/Bubble/List/index.js +133 -0
- package/dist/Bubble/List/style.d.ts +10 -0
- package/dist/Bubble/List/style.js +52 -0
- package/dist/Bubble/MessagesContent/BubbleContext.d.ts +9 -0
- package/dist/Bubble/MessagesContent/BubbleContext.js +14 -0
- package/dist/Bubble/MessagesContent/BubbleExtra.d.ts +26 -0
- package/dist/Bubble/MessagesContent/BubbleExtra.js +377 -0
- package/dist/Bubble/MessagesContent/CopyButton/index.d.ts +77 -0
- package/dist/Bubble/MessagesContent/CopyButton/index.js +111 -0
- package/dist/Bubble/MessagesContent/DocInfo.d.ts +21 -0
- package/dist/Bubble/MessagesContent/DocInfo.js +433 -0
- package/dist/Bubble/MessagesContent/EXCEPTION.d.ts +38 -0
- package/dist/Bubble/MessagesContent/EXCEPTION.js +25 -0
- package/dist/Bubble/MessagesContent/MarkdownPreview.d.ts +77 -0
- package/dist/Bubble/MessagesContent/MarkdownPreview.js +166 -0
- package/dist/Bubble/MessagesContent/VoiceButton/index.d.ts +19 -0
- package/dist/Bubble/MessagesContent/VoiceButton/index.js +130 -0
- package/dist/Bubble/MessagesContent/VoiceButton/style.d.ts +5 -0
- package/dist/Bubble/MessagesContent/VoiceButton/style.js +106 -0
- package/dist/Bubble/MessagesContent/VoiceButton/types.d.ts +42 -0
- package/dist/Bubble/MessagesContent/VoiceButton/types.js +0 -0
- package/dist/Bubble/MessagesContent/docInfoStyle.d.ts +10 -0
- package/dist/Bubble/MessagesContent/docInfoStyle.js +95 -0
- package/dist/Bubble/MessagesContent/icons.d.ts +36 -0
- package/dist/Bubble/MessagesContent/icons.js +68 -0
- package/dist/Bubble/MessagesContent/index.d.ts +44 -0
- package/dist/Bubble/MessagesContent/index.js +387 -0
- package/dist/Bubble/MessagesContent/types.d.ts +32 -0
- package/dist/Bubble/MessagesContent/types.js +0 -0
- package/dist/Bubble/Title.d.ts +61 -0
- package/dist/Bubble/Title.js +97 -0
- package/dist/Bubble/UserBubble.d.ts +47 -0
- package/dist/Bubble/UserBubble.js +329 -0
- package/dist/Bubble/before.d.ts +66 -0
- package/dist/Bubble/before.js +75 -0
- package/dist/Bubble/index.d.ts +6 -0
- package/dist/Bubble/index.js +13 -0
- package/dist/Bubble/style.d.ts +11 -0
- package/dist/Bubble/style.js +238 -0
- package/dist/Bubble/type.d.ts +502 -0
- package/dist/Bubble/type.js +0 -0
- package/dist/Bubble/types/BubbleExtra.d.ts +165 -0
- package/dist/Bubble/types/BubbleExtra.js +0 -0
- package/dist/Bubble/types/DocInfo.d.ts +17 -0
- package/dist/Bubble/types/DocInfo.js +0 -0
- package/dist/ChatBoot/ButtonTab.d.ts +19 -0
- package/dist/ChatBoot/ButtonTab.js +52 -0
- package/dist/ChatBoot/ButtonTabGroup.d.ts +29 -0
- package/dist/ChatBoot/ButtonTabGroup.js +45 -0
- package/dist/ChatBoot/ButtonTabGroupStyle.d.ts +8 -0
- package/dist/ChatBoot/ButtonTabGroupStyle.js +50 -0
- package/dist/ChatBoot/ButtonTabStyle.d.ts +8 -0
- package/dist/ChatBoot/ButtonTabStyle.js +103 -0
- package/dist/ChatBoot/CaseReply.d.ts +45 -0
- package/dist/ChatBoot/CaseReply.js +106 -0
- package/dist/ChatBoot/CaseReplyStyle.d.ts +8 -0
- package/dist/ChatBoot/CaseReplyStyle.js +155 -0
- package/dist/ChatBoot/Title.d.ts +25 -0
- package/dist/ChatBoot/Title.js +28 -0
- package/dist/ChatBoot/index.d.ts +8 -0
- package/dist/ChatBoot/index.js +11 -0
- package/dist/ChatBoot/style.d.ts +10 -0
- package/dist/ChatBoot/style.js +55 -0
- package/dist/ChatLayout/index.d.ts +72 -0
- package/dist/ChatLayout/index.js +63 -0
- package/dist/ChatLayout/style.d.ts +10 -0
- package/dist/ChatLayout/style.js +185 -0
- package/dist/ChatLayout/types.d.ts +20 -0
- package/dist/ChatLayout/types.js +0 -0
- package/dist/History/components/HistoryActionsBox.d.ts +41 -0
- package/dist/History/components/HistoryActionsBox.js +197 -0
- package/dist/History/components/HistoryItem.d.ts +92 -0
- package/dist/History/components/HistoryItem.js +507 -0
- package/dist/History/components/HistoryList.d.ts +59 -0
- package/dist/History/components/HistoryList.js +80 -0
- package/dist/History/components/HistoryRunningIcon.d.ts +79 -0
- package/dist/History/components/HistoryRunningIcon.js +125 -0
- package/dist/History/components/LoadMoreComponent.d.ts +15 -0
- package/dist/History/components/LoadMoreComponent.js +111 -0
- package/dist/History/components/NewChatComponent.d.ts +45 -0
- package/dist/History/components/NewChatComponent.js +85 -0
- package/dist/History/components/NewChatComponent.style.d.ts +5 -0
- package/dist/History/components/NewChatComponent.style.js +58 -0
- package/dist/History/components/SearchComponent.d.ts +58 -0
- package/dist/History/components/SearchComponent.js +170 -0
- package/dist/History/components/index.d.ts +7 -0
- package/dist/History/components/index.js +21 -0
- package/dist/History/hooks/useHistory.d.ts +20 -0
- package/dist/History/hooks/useHistory.js +136 -0
- package/dist/History/index.d.ts +33 -0
- package/dist/History/index.js +191 -0
- package/dist/History/menu.d.ts +50 -0
- package/dist/History/menu.js +213 -0
- package/dist/History/style.d.ts +5 -0
- package/dist/History/style.js +278 -0
- package/dist/History/types/HistoryData.d.ts +67 -0
- package/dist/History/types/HistoryData.js +11 -0
- package/dist/History/types/HistoryList.d.ts +56 -0
- package/dist/History/types/HistoryList.js +0 -0
- package/dist/History/types/index.d.ts +93 -0
- package/dist/History/types/index.js +0 -0
- package/dist/History/utils/index.d.ts +13 -0
- package/dist/History/utils/index.js +35 -0
- package/dist/MarkdownEditor/BaseMarkdownEditor.d.ts +60 -0
- package/dist/MarkdownEditor/BaseMarkdownEditor.js +382 -0
- package/dist/MarkdownEditor/editor/Editor.d.ts +70 -0
- package/dist/MarkdownEditor/editor/Editor.js +865 -0
- package/dist/MarkdownEditor/editor/code.css +47 -0
- package/dist/MarkdownEditor/editor/components/CommentList/index.d.ts +47 -0
- package/dist/MarkdownEditor/editor/components/CommentList/index.js +262 -0
- package/dist/MarkdownEditor/editor/components/CommentList/style.d.ts +10 -0
- package/dist/MarkdownEditor/editor/components/CommentList/style.js +97 -0
- package/dist/MarkdownEditor/editor/components/ContributorAvatar/index.d.ts +17 -0
- package/dist/MarkdownEditor/editor/components/ContributorAvatar/index.js +74 -0
- package/dist/MarkdownEditor/editor/components/ContributorAvatar/style.d.ts +10 -0
- package/dist/MarkdownEditor/editor/components/ContributorAvatar/style.js +57 -0
- package/dist/MarkdownEditor/editor/components/LazyElement/index.d.ts +45 -0
- package/dist/MarkdownEditor/editor/components/LazyElement/index.js +69 -0
- package/dist/MarkdownEditor/editor/components/LazyElement/style.d.ts +8 -0
- package/dist/MarkdownEditor/editor/components/LazyElement/style.js +47 -0
- package/dist/MarkdownEditor/editor/components/fntTag/index.d.ts +4 -0
- package/dist/MarkdownEditor/editor/components/fntTag/index.js +16 -0
- package/dist/MarkdownEditor/editor/components/fntTag/style.d.ts +10 -0
- package/dist/MarkdownEditor/editor/components/fntTag/style.js +41 -0
- package/dist/MarkdownEditor/editor/components/index.d.ts +4 -0
- package/dist/MarkdownEditor/editor/components/index.js +5 -0
- package/dist/MarkdownEditor/editor/elements/Blockquote.d.ts +35 -0
- package/dist/MarkdownEditor/editor/elements/Blockquote.js +41 -0
- package/dist/MarkdownEditor/editor/elements/Break.d.ts +3 -0
- package/dist/MarkdownEditor/editor/elements/Break.js +28 -0
- package/dist/MarkdownEditor/editor/elements/Card/index.d.ts +3 -0
- package/dist/MarkdownEditor/editor/elements/Card/index.js +57 -0
- package/dist/MarkdownEditor/editor/elements/Code.d.ts +3 -0
- package/dist/MarkdownEditor/editor/elements/Code.js +72 -0
- package/dist/MarkdownEditor/editor/elements/Comment/index.d.ts +53 -0
- package/dist/MarkdownEditor/editor/elements/Comment/index.js +55 -0
- package/dist/MarkdownEditor/editor/elements/ErrorBoundary.d.ts +14 -0
- package/dist/MarkdownEditor/editor/elements/ErrorBoundary.js +23 -0
- package/dist/MarkdownEditor/editor/elements/FootnoteDefinition.d.ts +3 -0
- package/dist/MarkdownEditor/editor/elements/FootnoteDefinition.js +71 -0
- package/dist/MarkdownEditor/editor/elements/FootnoteReference.d.ts +3 -0
- package/dist/MarkdownEditor/editor/elements/FootnoteReference.js +48 -0
- package/dist/MarkdownEditor/editor/elements/Head.d.ts +17 -0
- package/dist/MarkdownEditor/editor/elements/Head.js +77 -0
- package/dist/MarkdownEditor/editor/elements/Hr.d.ts +3 -0
- package/dist/MarkdownEditor/editor/elements/Hr.js +41 -0
- package/dist/MarkdownEditor/editor/elements/Image/index.d.ts +36 -0
- package/dist/MarkdownEditor/editor/elements/Image/index.js +546 -0
- package/dist/MarkdownEditor/editor/elements/InlineKatex.d.ts +3 -0
- package/dist/MarkdownEditor/editor/elements/InlineKatex.js +49 -0
- package/dist/MarkdownEditor/editor/elements/Katex.d.ts +3 -0
- package/dist/MarkdownEditor/editor/elements/Katex.js +60 -0
- package/dist/MarkdownEditor/editor/elements/LinkCard/index.d.ts +9 -0
- package/dist/MarkdownEditor/editor/elements/LinkCard/index.js +192 -0
- package/dist/MarkdownEditor/editor/elements/LinkCard/style.d.ts +10 -0
- package/dist/MarkdownEditor/editor/elements/LinkCard/style.js +106 -0
- package/dist/MarkdownEditor/editor/elements/List/List.d.ts +22 -0
- package/dist/MarkdownEditor/editor/elements/List/List.js +76 -0
- package/dist/MarkdownEditor/editor/elements/List/ListItem.d.ts +19 -0
- package/dist/MarkdownEditor/editor/elements/List/ListItem.js +268 -0
- package/dist/MarkdownEditor/editor/elements/List/index.d.ts +3 -0
- package/dist/MarkdownEditor/editor/elements/List/index.js +7 -0
- package/dist/MarkdownEditor/editor/elements/List/style.d.ts +10 -0
- package/dist/MarkdownEditor/editor/elements/List/style.js +125 -0
- package/dist/MarkdownEditor/editor/elements/Media.d.ts +47 -0
- package/dist/MarkdownEditor/editor/elements/Media.js +574 -0
- package/dist/MarkdownEditor/editor/elements/Mermaid.d.ts +3 -0
- package/dist/MarkdownEditor/editor/elements/Mermaid.js +57 -0
- package/dist/MarkdownEditor/editor/elements/Paragraph.d.ts +3 -0
- package/dist/MarkdownEditor/editor/elements/Paragraph.js +92 -0
- package/dist/MarkdownEditor/editor/elements/Schema.d.ts +40 -0
- package/dist/MarkdownEditor/editor/elements/Schema.js +136 -0
- package/dist/MarkdownEditor/editor/elements/Table/ReadonlyTableComponent.d.ts +14 -0
- package/dist/MarkdownEditor/editor/elements/Table/ReadonlyTableComponent.js +200 -0
- package/dist/MarkdownEditor/editor/elements/Table/SimpleTable.d.ts +7 -0
- package/dist/MarkdownEditor/editor/elements/Table/SimpleTable.js +59 -0
- package/dist/MarkdownEditor/editor/elements/Table/Table.d.ts +32 -0
- package/dist/MarkdownEditor/editor/elements/Table/Table.js +221 -0
- package/dist/MarkdownEditor/editor/elements/Table/TableCellIndex/index.d.ts +52 -0
- package/dist/MarkdownEditor/editor/elements/Table/TableCellIndex/index.js +300 -0
- package/dist/MarkdownEditor/editor/elements/Table/TableCellIndex/style.d.ts +10 -0
- package/dist/MarkdownEditor/editor/elements/Table/TableCellIndex/style.js +106 -0
- package/dist/MarkdownEditor/editor/elements/Table/TableCellIndexSpacer/index.d.ts +52 -0
- package/dist/MarkdownEditor/editor/elements/Table/TableCellIndexSpacer/index.js +302 -0
- package/dist/MarkdownEditor/editor/elements/Table/TableCellIndexSpacer/style.d.ts +10 -0
- package/dist/MarkdownEditor/editor/elements/Table/TableCellIndexSpacer/style.js +103 -0
- package/dist/MarkdownEditor/editor/elements/Table/TableContext.d.ts +23 -0
- package/dist/MarkdownEditor/editor/elements/Table/TableContext.js +23 -0
- package/dist/MarkdownEditor/editor/elements/Table/TableRowIndex/index.d.ts +47 -0
- package/dist/MarkdownEditor/editor/elements/Table/TableRowIndex/index.js +51 -0
- package/dist/MarkdownEditor/editor/elements/Table/TableRowIndex/style.d.ts +10 -0
- package/dist/MarkdownEditor/editor/elements/Table/TableRowIndex/style.js +44 -0
- package/dist/MarkdownEditor/editor/elements/Table/Td/index.d.ts +51 -0
- package/dist/MarkdownEditor/editor/elements/Table/Td/index.js +84 -0
- package/dist/MarkdownEditor/editor/elements/Table/Td/style.d.ts +10 -0
- package/dist/MarkdownEditor/editor/elements/Table/Td/style.js +60 -0
- package/dist/MarkdownEditor/editor/elements/Table/index.d.ts +44 -0
- package/dist/MarkdownEditor/editor/elements/Table/index.js +117 -0
- package/dist/MarkdownEditor/editor/elements/Table/style.d.ts +11 -0
- package/dist/MarkdownEditor/editor/elements/Table/style.js +241 -0
- package/dist/MarkdownEditor/editor/elements/Table/useScrollShadow.d.ts +15 -0
- package/dist/MarkdownEditor/editor/elements/Table/useScrollShadow.js +65 -0
- package/dist/MarkdownEditor/editor/elements/TagPopup/index.d.ts +126 -0
- package/dist/MarkdownEditor/editor/elements/TagPopup/index.js +247 -0
- package/dist/MarkdownEditor/editor/elements/TagPopup/style.d.ts +5 -0
- package/dist/MarkdownEditor/editor/elements/TagPopup/style.js +79 -0
- package/dist/MarkdownEditor/editor/elements/index.d.ts +25 -0
- package/dist/MarkdownEditor/editor/elements/index.js +473 -0
- package/dist/MarkdownEditor/editor/keyframes.css +20 -0
- package/dist/MarkdownEditor/editor/parser/json-parse.d.ts +37 -0
- package/dist/MarkdownEditor/editor/parser/json-parse.js +10 -0
- package/dist/MarkdownEditor/editor/parser/parserMarkdownToSlateNode.d.ts +20 -0
- package/dist/MarkdownEditor/editor/parser/parserMarkdownToSlateNode.js +1357 -0
- package/dist/MarkdownEditor/editor/parser/parserMdToSchema.d.ts +10 -0
- package/dist/MarkdownEditor/editor/parser/parserMdToSchema.js +23 -0
- package/dist/MarkdownEditor/editor/parser/parserSlateNodeToMarkdown.d.ts +16 -0
- package/dist/MarkdownEditor/editor/parser/parserSlateNodeToMarkdown.js +642 -0
- package/dist/MarkdownEditor/editor/parser/remarkParse.d.ts +9 -0
- package/dist/MarkdownEditor/editor/parser/remarkParse.js +118 -0
- package/dist/MarkdownEditor/editor/plugins/catchError.d.ts +2 -0
- package/dist/MarkdownEditor/editor/plugins/catchError.js +20 -0
- package/dist/MarkdownEditor/editor/plugins/elements.d.ts +29 -0
- package/dist/MarkdownEditor/editor/plugins/elements.js +365 -0
- package/dist/MarkdownEditor/editor/plugins/handlePaste.d.ts +34 -0
- package/dist/MarkdownEditor/editor/plugins/handlePaste.js +332 -0
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/arrow.d.ts +29 -0
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/arrow.js +141 -0
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/backspace.d.ts +8 -0
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/backspace.js +191 -0
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/enter.d.ts +16 -0
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/enter.js +431 -0
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/match.d.ts +8 -0
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/match.js +50 -0
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/tab.d.ts +12 -0
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/tab.js +216 -0
- package/dist/MarkdownEditor/editor/plugins/index.d.ts +1 -0
- package/dist/MarkdownEditor/editor/plugins/index.js +2 -0
- package/dist/MarkdownEditor/editor/plugins/insertParsedHtmlNodes.d.ts +104 -0
- package/dist/MarkdownEditor/editor/plugins/insertParsedHtmlNodes.js +540 -0
- package/dist/MarkdownEditor/editor/plugins/parseMarkdownToNodesAndInsert.d.ts +11 -0
- package/dist/MarkdownEditor/editor/plugins/parseMarkdownToNodesAndInsert.js +30 -0
- package/dist/MarkdownEditor/editor/plugins/useHighlight.d.ts +8 -0
- package/dist/MarkdownEditor/editor/plugins/useHighlight.js +126 -0
- package/dist/MarkdownEditor/editor/plugins/useKeyboard.d.ts +47 -0
- package/dist/MarkdownEditor/editor/plugins/useKeyboard.js +173 -0
- package/dist/MarkdownEditor/editor/plugins/useOnchange.d.ts +17 -0
- package/dist/MarkdownEditor/editor/plugins/useOnchange.js +101 -0
- package/dist/MarkdownEditor/editor/plugins/withMarkdown.d.ts +22 -0
- package/dist/MarkdownEditor/editor/plugins/withMarkdown.js +441 -0
- package/dist/MarkdownEditor/editor/store.d.ts +500 -0
- package/dist/MarkdownEditor/editor/store.js +1446 -0
- package/dist/MarkdownEditor/editor/style.d.ts +12 -0
- package/dist/MarkdownEditor/editor/style.js +532 -0
- package/dist/MarkdownEditor/editor/tagStyles.d.ts +78 -0
- package/dist/MarkdownEditor/editor/tagStyles.js +47 -0
- package/dist/MarkdownEditor/editor/tools/DragHandle.d.ts +4 -0
- package/dist/MarkdownEditor/editor/tools/DragHandle.js +61 -0
- package/dist/MarkdownEditor/editor/tools/InsertAutocomplete.d.ts +48 -0
- package/dist/MarkdownEditor/editor/tools/InsertAutocomplete.js +811 -0
- package/dist/MarkdownEditor/editor/tools/InsertLink.d.ts +34 -0
- package/dist/MarkdownEditor/editor/tools/InsertLink.js +210 -0
- package/dist/MarkdownEditor/editor/tools/Leading.d.ts +29 -0
- package/dist/MarkdownEditor/editor/tools/Leading.js +328 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/BaseBar.d.ts +16 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/BaseBar.js +414 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/FloatBar.d.ts +7 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/FloatBar.js +144 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/ReadonlyBaseBar.d.ts +10 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/ReadonlyBaseBar.js +274 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/ToolBar.d.ts +8 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/ToolBar.js +53 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/ClearFormatButton.d.ts +9 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/ClearFormatButton.js +42 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/ColorPickerButton.d.ts +12 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/ColorPickerButton.js +89 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/FormatButton.d.ts +9 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/FormatButton.js +24 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/FormattingTools.d.ts +22 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/FormattingTools.js +45 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/HeadingDropdown.d.ts +11 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/HeadingDropdown.js +57 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/LinkButton.d.ts +10 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/LinkButton.js +26 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/ToolBarItem.d.ts +14 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/ToolBarItem.js +50 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/UndoRedoButtons.d.ts +10 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/UndoRedoButtons.js +31 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/config/toolsConfig.d.ts +18 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/config/toolsConfig.js +110 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/floatBarStyle.d.ts +10 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/floatBarStyle.js +71 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/hooks/useToolBarLogic.d.ts +31 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/hooks/useToolBarLogic.js +168 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/index.d.ts +12 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/index.js +25 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/toolBarStyle.d.ts +10 -0
- package/dist/MarkdownEditor/editor/tools/ToolBar/toolBarStyle.js +71 -0
- package/dist/MarkdownEditor/editor/tools/insertAutocompleteStyle.d.ts +10 -0
- package/dist/MarkdownEditor/editor/tools/insertAutocompleteStyle.js +58 -0
- package/dist/MarkdownEditor/editor/types/Table.d.ts +40 -0
- package/dist/MarkdownEditor/editor/types/Table.js +0 -0
- package/dist/MarkdownEditor/editor/utils/InlineChromiumBugfix.d.ts +2 -0
- package/dist/MarkdownEditor/editor/utils/InlineChromiumBugfix.js +18 -0
- package/dist/MarkdownEditor/editor/utils/ace.d.ts +106 -0
- package/dist/MarkdownEditor/editor/utils/ace.js +144 -0
- package/dist/MarkdownEditor/editor/utils/docx/docxDeserializer.d.ts +1 -0
- package/dist/MarkdownEditor/editor/utils/docx/docxDeserializer.js +36 -0
- package/dist/MarkdownEditor/editor/utils/docx/index.d.ts +3 -0
- package/dist/MarkdownEditor/editor/utils/docx/index.js +4 -0
- package/dist/MarkdownEditor/editor/utils/docx/module.d.ts +24 -0
- package/dist/MarkdownEditor/editor/utils/docx/module.js +179 -0
- package/dist/MarkdownEditor/editor/utils/docx/utils.d.ts +4 -0
- package/dist/MarkdownEditor/editor/utils/docx/utils.js +108 -0
- package/dist/MarkdownEditor/editor/utils/dom.d.ts +33 -0
- package/dist/MarkdownEditor/editor/utils/dom.js +99 -0
- package/dist/MarkdownEditor/editor/utils/editorUtils.d.ts +330 -0
- package/dist/MarkdownEditor/editor/utils/editorUtils.js +1060 -0
- package/dist/MarkdownEditor/editor/utils/htmlToMarkdown.d.ts +37 -0
- package/dist/MarkdownEditor/editor/utils/htmlToMarkdown.js +197 -0
- package/dist/MarkdownEditor/editor/utils/index.d.ts +98 -0
- package/dist/MarkdownEditor/editor/utils/index.js +233 -0
- package/dist/MarkdownEditor/editor/utils/isMarkdown.d.ts +6 -0
- package/dist/MarkdownEditor/editor/utils/isMarkdown.js +46 -0
- package/dist/MarkdownEditor/editor/utils/keyboard.d.ts +184 -0
- package/dist/MarkdownEditor/editor/utils/keyboard.js +793 -0
- package/dist/MarkdownEditor/editor/utils/markdownToHtml.d.ts +44 -0
- package/dist/MarkdownEditor/editor/utils/markdownToHtml.js +61 -0
- package/dist/MarkdownEditor/editor/utils/media.d.ts +4 -0
- package/dist/MarkdownEditor/editor/utils/media.js +106 -0
- package/dist/MarkdownEditor/editor/utils/path.d.ts +9 -0
- package/dist/MarkdownEditor/editor/utils/path.js +19 -0
- package/dist/MarkdownEditor/editor/utils/performanceMonitor.d.ts +65 -0
- package/dist/MarkdownEditor/editor/utils/performanceMonitor.js +182 -0
- package/dist/MarkdownEditor/editor/utils/useLocalState.d.ts +8 -0
- package/dist/MarkdownEditor/editor/utils/useLocalState.js +40 -0
- package/dist/MarkdownEditor/el.d.ts +241 -0
- package/dist/MarkdownEditor/el.js +0 -0
- package/dist/MarkdownEditor/hooks/editor.d.ts +43 -0
- package/dist/MarkdownEditor/hooks/editor.js +52 -0
- package/dist/MarkdownEditor/hooks/subscribe.d.ts +10 -0
- package/dist/MarkdownEditor/hooks/subscribe.js +17 -0
- package/dist/MarkdownEditor/index.d.ts +43 -0
- package/dist/MarkdownEditor/index.js +36 -0
- package/dist/MarkdownEditor/plugin.d.ts +19 -0
- package/dist/MarkdownEditor/plugin.js +6 -0
- package/dist/MarkdownEditor/style.d.ts +10 -0
- package/dist/MarkdownEditor/style.js +71 -0
- package/dist/MarkdownEditor/types.d.ts +265 -0
- package/dist/MarkdownEditor/types.js +0 -0
- package/dist/MarkdownEditor/utils/exportHtml.d.ts +16 -0
- package/dist/MarkdownEditor/utils/exportHtml.js +85 -0
- package/dist/MarkdownEditor/utils/native-table/index.d.ts +2 -0
- package/dist/MarkdownEditor/utils/native-table/index.js +3 -0
- package/dist/MarkdownEditor/utils/native-table/native-table-editor.d.ts +122 -0
- package/dist/MarkdownEditor/utils/native-table/native-table-editor.js +267 -0
- package/dist/MarkdownEditor/utils/native-table/native-table-keyboard.d.ts +21 -0
- package/dist/MarkdownEditor/utils/native-table/native-table-keyboard.js +127 -0
- package/dist/MarkdownInputField/AttachmentButton/AttachmentButtonPopover.d.ts +104 -0
- package/dist/MarkdownInputField/AttachmentButton/AttachmentButtonPopover.js +102 -0
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileIcon.d.ts +40 -0
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileIcon.js +43 -0
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileListItem.d.ts +55 -0
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileListItem.js +152 -0
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/index.d.ts +52 -0
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/index.js +126 -0
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/style.d.ts +9 -0
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/style.js +216 -0
- package/dist/MarkdownInputField/AttachmentButton/index.d.ts +142 -0
- package/dist/MarkdownInputField/AttachmentButton/index.js +202 -0
- package/dist/MarkdownInputField/AttachmentButton/style.d.ts +10 -0
- package/dist/MarkdownInputField/AttachmentButton/style.js +121 -0
- package/dist/MarkdownInputField/AttachmentButton/types.d.ts +6 -0
- package/dist/MarkdownInputField/AttachmentButton/types.js +0 -0
- package/dist/MarkdownInputField/AttachmentButton/utils.d.ts +18 -0
- package/dist/MarkdownInputField/AttachmentButton/utils.js +13 -0
- package/dist/MarkdownInputField/BeforeToolContainer/BeforeToolContainer.d.ts +16 -0
- package/dist/MarkdownInputField/BeforeToolContainer/BeforeToolContainer.js +368 -0
- package/dist/MarkdownInputField/FileMapView/FileMapViewItem.d.ts +49 -0
- package/dist/MarkdownInputField/FileMapView/FileMapViewItem.js +220 -0
- package/dist/MarkdownInputField/FileMapView/index.d.ts +65 -0
- package/dist/MarkdownInputField/FileMapView/index.js +174 -0
- package/dist/MarkdownInputField/FileMapView/style.d.ts +10 -0
- package/dist/MarkdownInputField/FileMapView/style.js +276 -0
- package/dist/MarkdownInputField/FilePaste/index.d.ts +1 -0
- package/dist/MarkdownInputField/FilePaste/index.js +70 -0
- package/dist/MarkdownInputField/FileUploadManager/index.d.ts +38 -0
- package/dist/MarkdownInputField/FileUploadManager/index.js +149 -0
- package/dist/MarkdownInputField/MarkdownInputField.d.ts +415 -0
- package/dist/MarkdownInputField/MarkdownInputField.js +583 -0
- package/dist/MarkdownInputField/QuickActions/index.d.ts +42 -0
- package/dist/MarkdownInputField/QuickActions/index.js +129 -0
- package/dist/MarkdownInputField/RefinePromptButton/index.d.ts +11 -0
- package/dist/MarkdownInputField/RefinePromptButton/index.js +88 -0
- package/dist/MarkdownInputField/RefinePromptButton/style.d.ts +5 -0
- package/dist/MarkdownInputField/RefinePromptButton/style.js +79 -0
- package/dist/MarkdownInputField/SendActions/index.d.ts +59 -0
- package/dist/MarkdownInputField/SendActions/index.js +221 -0
- package/dist/MarkdownInputField/SendButton/index.d.ts +79 -0
- package/dist/MarkdownInputField/SendButton/index.js +137 -0
- package/dist/MarkdownInputField/SendButton/style.d.ts +10 -0
- package/dist/MarkdownInputField/SendButton/style.js +70 -0
- package/dist/MarkdownInputField/SkillModeBar/hooks/index.d.ts +4 -0
- package/dist/MarkdownInputField/SkillModeBar/hooks/index.js +5 -0
- package/dist/MarkdownInputField/SkillModeBar/hooks/useSkillModeState.d.ts +22 -0
- package/dist/MarkdownInputField/SkillModeBar/hooks/useSkillModeState.js +30 -0
- package/dist/MarkdownInputField/SkillModeBar/index.d.ts +82 -0
- package/dist/MarkdownInputField/SkillModeBar/index.js +121 -0
- package/dist/MarkdownInputField/SkillModeBar/style.d.ts +10 -0
- package/dist/MarkdownInputField/SkillModeBar/style.js +103 -0
- package/dist/MarkdownInputField/Suggestion/index.d.ts +75 -0
- package/dist/MarkdownInputField/Suggestion/index.js +176 -0
- package/dist/MarkdownInputField/TopOperatingArea/index.d.ts +8 -0
- package/dist/MarkdownInputField/TopOperatingArea/index.js +56 -0
- package/dist/MarkdownInputField/TopOperatingArea/style.d.ts +6 -0
- package/dist/MarkdownInputField/TopOperatingArea/style.js +94 -0
- package/dist/MarkdownInputField/VoiceInput/index.d.ts +27 -0
- package/dist/MarkdownInputField/VoiceInput/index.js +96 -0
- package/dist/MarkdownInputField/VoiceInput/style.d.ts +5 -0
- package/dist/MarkdownInputField/VoiceInput/style.js +64 -0
- package/dist/MarkdownInputField/VoiceInputManager/index.d.ts +25 -0
- package/dist/MarkdownInputField/VoiceInputManager/index.js +101 -0
- package/dist/MarkdownInputField/style.d.ts +11 -0
- package/dist/MarkdownInputField/style.js +238 -0
- package/dist/Quote/index.d.ts +73 -0
- package/dist/Quote/index.js +85 -0
- package/dist/Quote/style.d.ts +5 -0
- package/dist/Quote/style.js +166 -0
- package/dist/TaskList/LoadingLottie/index.d.ts +60 -0
- package/dist/TaskList/LoadingLottie/index.js +39 -0
- package/dist/TaskList/LoadingLottie/loading.json +483 -0
- package/dist/TaskList/index.d.ts +83 -0
- package/dist/TaskList/index.js +147 -0
- package/dist/TaskList/style.d.ts +5 -0
- package/dist/TaskList/style.js +138 -0
- package/dist/ThoughtChainList/CostMillis.d.ts +32 -0
- package/dist/ThoughtChainList/CostMillis.js +61 -0
- package/dist/ThoughtChainList/DeepThink.d.ts +54 -0
- package/dist/ThoughtChainList/DeepThink.js +168 -0
- package/dist/ThoughtChainList/DotAni/index.css +41 -0
- package/dist/ThoughtChainList/DotAni/index.d.ts +27 -0
- package/dist/ThoughtChainList/DotAni/index.js +21 -0
- package/dist/ThoughtChainList/DotAni/style.d.ts +10 -0
- package/dist/ThoughtChainList/DotAni/style.js +55 -0
- package/dist/ThoughtChainList/FlipText/index.d.ts +54 -0
- package/dist/ThoughtChainList/FlipText/index.js +34 -0
- package/dist/ThoughtChainList/MarkdownEditor.d.ts +40 -0
- package/dist/ThoughtChainList/MarkdownEditor.js +78 -0
- package/dist/ThoughtChainList/RagRetrievalInfo.d.ts +20 -0
- package/dist/ThoughtChainList/RagRetrievalInfo.js +161 -0
- package/dist/ThoughtChainList/TableSql.d.ts +30 -0
- package/dist/ThoughtChainList/TableSql.js +497 -0
- package/dist/ThoughtChainList/ThoughtChainListItem.d.ts +66 -0
- package/dist/ThoughtChainList/ThoughtChainListItem.js +241 -0
- package/dist/ThoughtChainList/TitleInfo.d.ts +68 -0
- package/dist/ThoughtChainList/TitleInfo.js +198 -0
- package/dist/ThoughtChainList/ToolCall.d.ts +59 -0
- package/dist/ThoughtChainList/ToolCall.js +503 -0
- package/dist/ThoughtChainList/WebSearch.d.ts +52 -0
- package/dist/ThoughtChainList/WebSearch.js +178 -0
- package/dist/ThoughtChainList/index.d.ts +49 -0
- package/dist/ThoughtChainList/index.js +463 -0
- package/dist/ThoughtChainList/style.d.ts +10 -0
- package/dist/ThoughtChainList/style.js +247 -0
- package/dist/ThoughtChainList/types.d.ts +159 -0
- package/dist/ThoughtChainList/types.js +0 -0
- package/dist/ToolUseBar/ToolUseBarItem.d.ts +26 -0
- package/dist/ToolUseBar/ToolUseBarItem.js +209 -0
- package/dist/ToolUseBar/ToolUseBarThink.d.ts +48 -0
- package/dist/ToolUseBar/ToolUseBarThink.js +333 -0
- package/dist/ToolUseBar/index.d.ts +60 -0
- package/dist/ToolUseBar/index.js +114 -0
- package/dist/ToolUseBar/style.d.ts +5 -0
- package/dist/ToolUseBar/style.js +321 -0
- package/dist/ToolUseBar/thinkStyle.d.ts +5 -0
- package/dist/ToolUseBar/thinkStyle.js +330 -0
- package/dist/Welcome/index.d.ts +14 -0
- package/dist/Welcome/index.js +31 -0
- package/dist/Welcome/style.d.ts +5 -0
- package/dist/Welcome/style.js +60 -0
- package/dist/Workspace/Browser/index.d.ts +47 -0
- package/dist/Workspace/Browser/index.js +52 -0
- package/dist/Workspace/Browser/style.d.ts +5 -0
- package/dist/Workspace/Browser/style.js +38 -0
- package/dist/Workspace/File/DataSourceStrategy.d.ts +92 -0
- package/dist/Workspace/File/DataSourceStrategy.js +226 -0
- package/dist/Workspace/File/FileComponent.d.ts +87 -0
- package/dist/Workspace/File/FileComponent.js +769 -0
- package/dist/Workspace/File/FileTypeProcessor.d.ts +82 -0
- package/dist/Workspace/File/FileTypeProcessor.js +207 -0
- package/dist/Workspace/File/PreviewComponent.d.ts +47 -0
- package/dist/Workspace/File/PreviewComponent.js +562 -0
- package/dist/Workspace/File/index.d.ts +5 -0
- package/dist/Workspace/File/index.js +10 -0
- package/dist/Workspace/File/style.d.ts +5 -0
- package/dist/Workspace/File/style.js +448 -0
- package/dist/Workspace/File/utils.d.ts +11 -0
- package/dist/Workspace/File/utils.js +116 -0
- package/dist/Workspace/HtmlPreview/index.d.ts +75 -0
- package/dist/Workspace/HtmlPreview/index.js +153 -0
- package/dist/Workspace/HtmlPreview/style.d.ts +5 -0
- package/dist/Workspace/HtmlPreview/style.js +83 -0
- package/dist/Workspace/RealtimeFollow/index.d.ts +56 -0
- package/dist/Workspace/RealtimeFollow/index.js +433 -0
- package/dist/Workspace/RealtimeFollow/style.d.ts +5 -0
- package/dist/Workspace/RealtimeFollow/style.js +325 -0
- package/dist/Workspace/Task/index.d.ts +12 -0
- package/dist/Workspace/Task/index.js +43 -0
- package/dist/Workspace/Task/style.d.ts +5 -0
- package/dist/Workspace/Task/style.js +79 -0
- package/dist/Workspace/index.d.ts +63 -0
- package/dist/Workspace/index.js +279 -0
- package/dist/Workspace/style.d.ts +5 -0
- package/dist/Workspace/style.js +159 -0
- package/dist/Workspace/types.d.ts +165 -0
- package/dist/Workspace/types.js +257 -0
- package/dist/Workspace/utils/codeLanguageUtils.d.ts +23 -0
- package/dist/Workspace/utils/codeLanguageUtils.js +133 -0
- package/dist/Workspace/utils.d.ts +12 -0
- package/dist/Workspace/utils.js +23 -0
- package/dist/components/ActionIconBox/index.d.ts +74 -0
- package/dist/components/ActionIconBox/index.js +157 -0
- package/dist/components/ActionIconBox/style.d.ts +10 -0
- package/dist/components/ActionIconBox/style.js +117 -0
- package/dist/components/ActionItemBox/ActionItemBox.d.ts +20 -0
- package/dist/components/ActionItemBox/ActionItemBox.js +162 -0
- package/dist/components/ActionItemBox/index.d.ts +3 -0
- package/dist/components/ActionItemBox/index.js +7 -0
- package/dist/components/ActionItemBox/style.d.ts +10 -0
- package/dist/components/ActionItemBox/style.js +373 -0
- package/dist/components/Button/IconButton/index.d.ts +16 -0
- package/dist/components/Button/IconButton/index.js +46 -0
- package/dist/components/Button/IconButton/style.d.ts +5 -0
- package/dist/components/Button/IconButton/style.js +355 -0
- package/dist/components/Button/SwitchButton/index.d.ts +16 -0
- package/dist/components/Button/SwitchButton/index.js +99 -0
- package/dist/components/Button/SwitchButton/style.d.ts +5 -0
- package/dist/components/Button/SwitchButton/style.js +158 -0
- package/dist/components/Button/ToggleButton/index.d.ts +13 -0
- package/dist/components/Button/ToggleButton/index.js +63 -0
- package/dist/components/Button/ToggleButton/style.d.ts +5 -0
- package/dist/components/Button/ToggleButton/style.js +277 -0
- package/dist/components/Button/index.d.ts +3 -0
- package/dist/components/Button/index.js +4 -0
- package/dist/components/ImageList.d.ts +22 -0
- package/dist/components/ImageList.js +138 -0
- package/dist/components/LayoutHeader/index.d.ts +55 -0
- package/dist/components/LayoutHeader/index.js +94 -0
- package/dist/components/LayoutHeader/style.d.ts +5 -0
- package/dist/components/LayoutHeader/style.js +70 -0
- package/dist/components/LayoutHeader/types.d.ts +41 -0
- package/dist/components/LayoutHeader/types.js +0 -0
- package/dist/components/Loading/index.d.ts +25 -0
- package/dist/components/Loading/index.js +184 -0
- package/dist/components/Loading/style.d.ts +5 -0
- package/dist/components/Loading/style.js +46 -0
- package/dist/components/Robot/index.d.ts +16 -0
- package/dist/components/Robot/index.js +66 -0
- package/dist/components/Robot/lotties/DazingLottie/dazing.json +3780 -0
- package/dist/components/Robot/lotties/DazingLottie/index.d.ts +59 -0
- package/dist/components/Robot/lotties/DazingLottie/index.js +52 -0
- package/dist/components/Robot/lotties/ThinkingLottie/index.d.ts +59 -0
- package/dist/components/Robot/lotties/ThinkingLottie/index.js +52 -0
- package/dist/components/Robot/lotties/ThinkingLottie/thinking.json +3447 -0
- package/dist/components/Robot/lotties/index.d.ts +2 -0
- package/dist/components/Robot/lotties/index.js +3 -0
- package/dist/components/SuggestionList/index.d.ts +31 -0
- package/dist/components/SuggestionList/index.js +195 -0
- package/dist/components/SuggestionList/style.d.ts +5 -0
- package/dist/components/SuggestionList/style.js +196 -0
- package/dist/components/VisualList/index.d.ts +96 -0
- package/dist/components/VisualList/index.js +151 -0
- package/dist/components/VisualList/style.d.ts +5 -0
- package/dist/components/VisualList/style.js +138 -0
- package/dist/components/icons/LoadingSpinnerIcon.d.ts +38 -0
- package/dist/components/icons/LoadingSpinnerIcon.js +83 -0
- package/dist/components/lotties/DazingLottie/dazing.json +3780 -0
- package/dist/components/lotties/DazingLottie/index.d.ts +59 -0
- package/dist/components/lotties/DazingLottie/index.js +52 -0
- package/dist/components/lotties/ThinkingLottie/index.d.ts +59 -0
- package/dist/components/lotties/ThinkingLottie/index.js +52 -0
- package/dist/components/lotties/ThinkingLottie/thinking.json +3447 -0
- package/dist/components/lotties/index.d.ts +2 -0
- package/dist/components/lotties/index.js +3 -0
- package/dist/constants/colors.d.ts +104 -0
- package/dist/constants/colors.js +98 -0
- package/dist/hooks/useAutoScroll.d.ts +50 -0
- package/dist/hooks/useAutoScroll.js +90 -0
- package/dist/hooks/useClickAway.d.ts +36 -0
- package/dist/hooks/useClickAway.js +23 -0
- package/dist/hooks/useCopied.d.ts +4 -0
- package/dist/hooks/useCopied.js +22 -0
- package/dist/hooks/useDebounceFn/index.d.ts +9 -0
- package/dist/hooks/useDebounceFn/index.js +59 -0
- package/dist/hooks/useLanguage.d.ts +378 -0
- package/dist/hooks/useLanguage.js +29 -0
- package/dist/hooks/useRefFunction/index.d.ts +40 -0
- package/dist/hooks/useRefFunction/index.js +13 -0
- package/dist/hooks/useSpeechSynthesis.d.ts +3 -0
- package/dist/hooks/useSpeechSynthesis.js +108 -0
- package/dist/hooks/useStyle/index.d.ts +36 -0
- package/dist/hooks/useStyle/index.js +64 -0
- package/dist/hooks/useThrottleFn/index.d.ts +1 -0
- package/dist/hooks/useThrottleFn/index.js +44 -0
- package/dist/i18n/index.d.ts +88 -0
- package/dist/i18n/index.js +122 -0
- package/dist/i18n/locales.d.ts +343 -0
- package/dist/i18n/locales.js +705 -0
- package/dist/icons/animated/VoicePlayLottie/index.d.ts +57 -0
- package/dist/icons/animated/VoicePlayLottie/index.js +51 -0
- package/dist/icons/animated/VoicePlayLottie/voicePlay.json +270 -0
- package/dist/icons/animated/VoicingLottie/index.d.ts +59 -0
- package/dist/icons/animated/VoicingLottie/index.js +52 -0
- package/dist/icons/animated/VoicingLottie/voicing.json +3609 -0
- package/dist/index.d.ts +81 -0
- package/dist/index.js +88 -0
- package/dist/plugins/chart/AreaChart/index.d.ts +60 -0
- package/dist/plugins/chart/AreaChart/index.js +380 -0
- package/dist/plugins/chart/AreaChart/style.d.ts +5 -0
- package/dist/plugins/chart/AreaChart/style.js +89 -0
- package/dist/plugins/chart/BarChart/index.d.ts +73 -0
- package/dist/plugins/chart/BarChart/index.js +516 -0
- package/dist/plugins/chart/BarChart/style.d.ts +5 -0
- package/dist/plugins/chart/BarChart/style.js +89 -0
- package/dist/plugins/chart/ChartAttrToolBar/ChartAttrToolBarStyle.d.ts +10 -0
- package/dist/plugins/chart/ChartAttrToolBar/ChartAttrToolBarStyle.js +57 -0
- package/dist/plugins/chart/ChartAttrToolBar/index.d.ts +56 -0
- package/dist/plugins/chart/ChartAttrToolBar/index.js +87 -0
- package/dist/plugins/chart/ChartMark/Area.d.ts +3 -0
- package/dist/plugins/chart/ChartMark/Area.js +147 -0
- package/dist/plugins/chart/ChartMark/Bar.d.ts +3 -0
- package/dist/plugins/chart/ChartMark/Bar.js +151 -0
- package/dist/plugins/chart/ChartMark/Column.d.ts +3 -0
- package/dist/plugins/chart/ChartMark/Column.js +150 -0
- package/dist/plugins/chart/ChartMark/Container.d.ts +8 -0
- package/dist/plugins/chart/ChartMark/Container.js +81 -0
- package/dist/plugins/chart/ChartMark/Line.d.ts +3 -0
- package/dist/plugins/chart/ChartMark/Line.js +150 -0
- package/dist/plugins/chart/ChartMark/Pie.d.ts +3 -0
- package/dist/plugins/chart/ChartMark/Pie.js +61 -0
- package/dist/plugins/chart/ChartMark/index.d.ts +5 -0
- package/dist/plugins/chart/ChartMark/index.js +13 -0
- package/dist/plugins/chart/ChartMark/useChart.d.ts +10 -0
- package/dist/plugins/chart/ChartMark/useChart.js +0 -0
- package/dist/plugins/chart/ChartRender.d.ts +79 -0
- package/dist/plugins/chart/ChartRender.js +611 -0
- package/dist/plugins/chart/ChartStatistic/index.d.ts +18 -0
- package/dist/plugins/chart/ChartStatistic/index.js +70 -0
- package/dist/plugins/chart/ChartStatistic/style.d.ts +10 -0
- package/dist/plugins/chart/ChartStatistic/style.js +153 -0
- package/dist/plugins/chart/ChartStatistic/utils.d.ts +18 -0
- package/dist/plugins/chart/ChartStatistic/utils.js +29 -0
- package/dist/plugins/chart/DonutChart/Legend.d.ts +17 -0
- package/dist/plugins/chart/DonutChart/Legend.js +136 -0
- package/dist/plugins/chart/DonutChart/constants.d.ts +5 -0
- package/dist/plugins/chart/DonutChart/constants.js +25 -0
- package/dist/plugins/chart/DonutChart/hooks.d.ts +30 -0
- package/dist/plugins/chart/DonutChart/hooks.js +121 -0
- package/dist/plugins/chart/DonutChart/index.d.ts +5 -0
- package/dist/plugins/chart/DonutChart/index.js +501 -0
- package/dist/plugins/chart/DonutChart/plugins.d.ts +3 -0
- package/dist/plugins/chart/DonutChart/plugins.js +45 -0
- package/dist/plugins/chart/DonutChart/style.d.ts +5 -0
- package/dist/plugins/chart/DonutChart/style.js +176 -0
- package/dist/plugins/chart/DonutChart/types.d.ts +47 -0
- package/dist/plugins/chart/DonutChart/types.js +0 -0
- package/dist/plugins/chart/FunnelChart/index.d.ts +54 -0
- package/dist/plugins/chart/FunnelChart/index.js +588 -0
- package/dist/plugins/chart/FunnelChart/style.d.ts +5 -0
- package/dist/plugins/chart/FunnelChart/style.js +66 -0
- package/dist/plugins/chart/LineChart/index.d.ts +60 -0
- package/dist/plugins/chart/LineChart/index.js +373 -0
- package/dist/plugins/chart/LineChart/style.d.ts +5 -0
- package/dist/plugins/chart/LineChart/style.js +89 -0
- package/dist/plugins/chart/RadarChart/index.d.ts +28 -0
- package/dist/plugins/chart/RadarChart/index.js +610 -0
- package/dist/plugins/chart/RadarChart/style.d.ts +10 -0
- package/dist/plugins/chart/RadarChart/style.js +111 -0
- package/dist/plugins/chart/ScatterChart/index.d.ts +31 -0
- package/dist/plugins/chart/ScatterChart/index.js +647 -0
- package/dist/plugins/chart/ScatterChart/style.d.ts +10 -0
- package/dist/plugins/chart/ScatterChart/style.js +93 -0
- package/dist/plugins/chart/components/ChartContainer/ChartContainer.d.ts +101 -0
- package/dist/plugins/chart/components/ChartContainer/ChartContainer.js +87 -0
- package/dist/plugins/chart/components/ChartContainer/ChartErrorBoundary.d.ts +47 -0
- package/dist/plugins/chart/components/ChartContainer/ChartErrorBoundary.js +46 -0
- package/dist/plugins/chart/components/ChartContainer/ChartErrorBoundaryExample.d.ts +6 -0
- package/dist/plugins/chart/components/ChartContainer/ChartErrorBoundaryExample.js +70 -0
- package/dist/plugins/chart/components/ChartContainer/index.d.ts +4 -0
- package/dist/plugins/chart/components/ChartContainer/index.js +7 -0
- package/dist/plugins/chart/components/ChartContainer/style.d.ts +10 -0
- package/dist/plugins/chart/components/ChartContainer/style.js +90 -0
- package/dist/plugins/chart/components/ChartFilter/ChartFilter.d.ts +21 -0
- package/dist/plugins/chart/components/ChartFilter/ChartFilter.js +99 -0
- package/dist/plugins/chart/components/ChartFilter/style.d.ts +10 -0
- package/dist/plugins/chart/components/ChartFilter/style.js +161 -0
- package/dist/plugins/chart/components/ChartToolBar/ChartToolBar.d.ts +11 -0
- package/dist/plugins/chart/components/ChartToolBar/ChartToolBar.js +67 -0
- package/dist/plugins/chart/components/ChartToolBar/style.d.ts +10 -0
- package/dist/plugins/chart/components/ChartToolBar/style.js +129 -0
- package/dist/plugins/chart/components/icons/TimeIcon.d.ts +7 -0
- package/dist/plugins/chart/components/icons/TimeIcon.js +32 -0
- package/dist/plugins/chart/components/index.d.ts +9 -0
- package/dist/plugins/chart/components/index.js +36 -0
- package/dist/plugins/chart/const.d.ts +1 -0
- package/dist/plugins/chart/const.js +16 -0
- package/dist/plugins/chart/hooks/useChartStatistic.d.ts +9 -0
- package/dist/plugins/chart/hooks/useChartStatistic.js +16 -0
- package/dist/plugins/chart/index.d.ts +60 -0
- package/dist/plugins/chart/index.js +375 -0
- package/dist/plugins/chart/utils.d.ts +83 -0
- package/dist/plugins/chart/utils.js +98 -0
- package/dist/plugins/code/CodeUI/Katex/Katex.d.ts +6 -0
- package/dist/plugins/code/CodeUI/Katex/Katex.js +75 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_AMS-Regular.ttf +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Main-Bold.ttf +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Main-Bold.woff +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Main-Italic.ttf +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Main-Italic.woff +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Main-Regular.ttf +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Main-Regular.woff +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Math-Italic.ttf +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Math-Italic.woff +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Script-Regular.woff +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Size2-Regular.ttf +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Size3-Regular.ttf +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/dist/plugins/code/CodeUI/Katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/dist/plugins/code/CodeUI/Katex/katex.min.css +1133 -0
- package/dist/plugins/code/components/AceEditor.d.ts +77 -0
- package/dist/plugins/code/components/AceEditor.js +257 -0
- package/dist/plugins/code/components/AceEditorContainer.d.ts +13 -0
- package/dist/plugins/code/components/AceEditorContainer.js +33 -0
- package/dist/plugins/code/components/CodeContainer.d.ts +17 -0
- package/dist/plugins/code/components/CodeContainer.js +63 -0
- package/dist/plugins/code/components/CodeRenderer.d.ts +19 -0
- package/dist/plugins/code/components/CodeRenderer.js +163 -0
- package/dist/plugins/code/components/CodeToolbar.d.ts +63 -0
- package/dist/plugins/code/components/CodeToolbar.js +206 -0
- package/dist/plugins/code/components/HtmlPreview.d.ts +10 -0
- package/dist/plugins/code/components/HtmlPreview.js +23 -0
- package/dist/plugins/code/components/LanguageSelector.d.ts +50 -0
- package/dist/plugins/code/components/LanguageSelector.js +110 -0
- package/dist/plugins/code/components/LoadImage.d.ts +29 -0
- package/dist/plugins/code/components/LoadImage.js +49 -0
- package/dist/plugins/code/components/ThinkBlock.d.ts +11 -0
- package/dist/plugins/code/components/ThinkBlock.js +47 -0
- package/dist/plugins/code/components/index.d.ts +14 -0
- package/dist/plugins/code/components/index.js +23 -0
- package/dist/plugins/code/hooks/index.d.ts +8 -0
- package/dist/plugins/code/hooks/index.js +9 -0
- package/dist/plugins/code/hooks/useCodeEditorState.d.ts +24 -0
- package/dist/plugins/code/hooks/useCodeEditorState.js +69 -0
- package/dist/plugins/code/hooks/useRenderConditions.d.ts +10 -0
- package/dist/plugins/code/hooks/useRenderConditions.js +24 -0
- package/dist/plugins/code/hooks/useToolbarConfig.d.ts +29 -0
- package/dist/plugins/code/hooks/useToolbarConfig.js +47 -0
- package/dist/plugins/code/index.d.ts +12 -0
- package/dist/plugins/code/index.js +98 -0
- package/dist/plugins/code/langIconMap.d.ts +4 -0
- package/dist/plugins/code/langIconMap.js +181 -0
- package/dist/plugins/code/langIcons/AbapIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/AbapIcon.js +65 -0
- package/dist/plugins/code/langIcons/ActionscriptIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/ActionscriptIcon.js +63 -0
- package/dist/plugins/code/langIcons/AdaIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/AdaIcon.js +59 -0
- package/dist/plugins/code/langIcons/ApacheIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/ApacheIcon.js +379 -0
- package/dist/plugins/code/langIcons/ApexIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/ApexIcon.js +92 -0
- package/dist/plugins/code/langIcons/AplIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/AplIcon.js +62 -0
- package/dist/plugins/code/langIcons/ApplescriptIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/ApplescriptIcon.js +63 -0
- package/dist/plugins/code/langIcons/AstroIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/AstroIcon.js +69 -0
- package/dist/plugins/code/langIcons/AwkIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/AwkIcon.js +82 -0
- package/dist/plugins/code/langIcons/BallerinaIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/BallerinaIcon.js +68 -0
- package/dist/plugins/code/langIcons/BatIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/BatIcon.js +330 -0
- package/dist/plugins/code/langIcons/BicepIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/BicepIcon.js +66 -0
- package/dist/plugins/code/langIcons/BladeIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/BladeIcon.js +66 -0
- package/dist/plugins/code/langIcons/CIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/CIcon.js +63 -0
- package/dist/plugins/code/langIcons/CadenceIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/CadenceIcon.js +65 -0
- package/dist/plugins/code/langIcons/ClojureIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/ClojureIcon.js +96 -0
- package/dist/plugins/code/langIcons/CmakeIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/CmakeIcon.js +71 -0
- package/dist/plugins/code/langIcons/CobolIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/CobolIcon.js +83 -0
- package/dist/plugins/code/langIcons/CodeqlIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/CodeqlIcon.js +93 -0
- package/dist/plugins/code/langIcons/CoffeeIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/CoffeeIcon.js +63 -0
- package/dist/plugins/code/langIcons/ConsoleIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/ConsoleIcon.js +63 -0
- package/dist/plugins/code/langIcons/CppIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/CppIcon.js +62 -0
- package/dist/plugins/code/langIcons/CrystalIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/CrystalIcon.js +64 -0
- package/dist/plugins/code/langIcons/CsharpIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/CsharpIcon.js +66 -0
- package/dist/plugins/code/langIcons/CssIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/CssIcon.js +59 -0
- package/dist/plugins/code/langIcons/DIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/DIcon.js +60 -0
- package/dist/plugins/code/langIcons/DartIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/DartIcon.js +84 -0
- package/dist/plugins/code/langIcons/DatabaseIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/DatabaseIcon.js +65 -0
- package/dist/plugins/code/langIcons/DiffIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/DiffIcon.js +65 -0
- package/dist/plugins/code/langIcons/DockerIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/DockerIcon.js +63 -0
- package/dist/plugins/code/langIcons/DotenvIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/DotenvIcon.js +64 -0
- package/dist/plugins/code/langIcons/ElixirIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/ElixirIcon.js +66 -0
- package/dist/plugins/code/langIcons/ElmIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/ElmIcon.js +65 -0
- package/dist/plugins/code/langIcons/ErbIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/ErbIcon.js +62 -0
- package/dist/plugins/code/langIcons/ErlangIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/ErlangIcon.js +63 -0
- package/dist/plugins/code/langIcons/FsharpIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/FsharpIcon.js +71 -0
- package/dist/plugins/code/langIcons/GdscriptIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/GdscriptIcon.js +107 -0
- package/dist/plugins/code/langIcons/GlslIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/GlslIcon.js +66 -0
- package/dist/plugins/code/langIcons/GnuplotIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/GnuplotIcon.js +97 -0
- package/dist/plugins/code/langIcons/GoIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/GoIcon.js +102 -0
- package/dist/plugins/code/langIcons/GraphqlIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/GraphqlIcon.js +73 -0
- package/dist/plugins/code/langIcons/GroovyIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/GroovyIcon.js +63 -0
- package/dist/plugins/code/langIcons/HackIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/HackIcon.js +73 -0
- package/dist/plugins/code/langIcons/HamlIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/HamlIcon.js +63 -0
- package/dist/plugins/code/langIcons/HandlebarsIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/HandlebarsIcon.js +64 -0
- package/dist/plugins/code/langIcons/HaskellIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/HaskellIcon.js +75 -0
- package/dist/plugins/code/langIcons/HclIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/HclIcon.js +100 -0
- package/dist/plugins/code/langIcons/HclLightIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/HclLightIcon.js +104 -0
- package/dist/plugins/code/langIcons/HjsonIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/HjsonIcon.js +73 -0
- package/dist/plugins/code/langIcons/HlslIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/HlslIcon.js +93 -0
- package/dist/plugins/code/langIcons/HtmlIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/HtmlIcon.js +63 -0
- package/dist/plugins/code/langIcons/HttpIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/HttpIcon.js +63 -0
- package/dist/plugins/code/langIcons/ImbaIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/ImbaIcon.js +73 -0
- package/dist/plugins/code/langIcons/IniIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/IniIcon.js +62 -0
- package/dist/plugins/code/langIcons/JavaIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/JavaIcon.js +63 -0
- package/dist/plugins/code/langIcons/JavascriptIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/JavascriptIcon.js +63 -0
- package/dist/plugins/code/langIcons/JinjaIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/JinjaIcon.js +82 -0
- package/dist/plugins/code/langIcons/Json5Icon.d.ts +6 -0
- package/dist/plugins/code/langIcons/Json5Icon.js +100 -0
- package/dist/plugins/code/langIcons/JsonIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/JsonIcon.js +63 -0
- package/dist/plugins/code/langIcons/JsonnetIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/JsonnetIcon.js +106 -0
- package/dist/plugins/code/langIcons/JuliaIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/JuliaIcon.js +57 -0
- package/dist/plugins/code/langIcons/KotlinIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/KotlinIcon.js +97 -0
- package/dist/plugins/code/langIcons/KustoIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/KustoIcon.js +64 -0
- package/dist/plugins/code/langIcons/LessIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/LessIcon.js +66 -0
- package/dist/plugins/code/langIcons/LiquidIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/LiquidIcon.js +66 -0
- package/dist/plugins/code/langIcons/LispIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/LispIcon.js +63 -0
- package/dist/plugins/code/langIcons/LuaIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/LuaIcon.js +79 -0
- package/dist/plugins/code/langIcons/MakefileIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/MakefileIcon.js +66 -0
- package/dist/plugins/code/langIcons/MarkdownIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/MarkdownIcon.js +63 -0
- package/dist/plugins/code/langIcons/MarkojsIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/MarkojsIcon.js +88 -0
- package/dist/plugins/code/langIcons/MatlabIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/MatlabIcon.js +75 -0
- package/dist/plugins/code/langIcons/MdxIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/MdxIcon.js +62 -0
- package/dist/plugins/code/langIcons/MermaidIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/MermaidIcon.js +73 -0
- package/dist/plugins/code/langIcons/MojoIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/MojoIcon.js +71 -0
- package/dist/plugins/code/langIcons/NginxIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/NginxIcon.js +68 -0
- package/dist/plugins/code/langIcons/NimIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/NimIcon.js +62 -0
- package/dist/plugins/code/langIcons/NixIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/NixIcon.js +65 -0
- package/dist/plugins/code/langIcons/ObjectiveCIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/ObjectiveCIcon.js +67 -0
- package/dist/plugins/code/langIcons/ObjectiveCppIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/ObjectiveCppIcon.js +65 -0
- package/dist/plugins/code/langIcons/OcamlIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/OcamlIcon.js +70 -0
- package/dist/plugins/code/langIcons/PascalIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/PascalIcon.js +60 -0
- package/dist/plugins/code/langIcons/Perl6Icon.d.ts +6 -0
- package/dist/plugins/code/langIcons/Perl6Icon.js +401 -0
- package/dist/plugins/code/langIcons/PerlIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/PerlIcon.js +63 -0
- package/dist/plugins/code/langIcons/PhpIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/PhpIcon.js +59 -0
- package/dist/plugins/code/langIcons/PostcssIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/PostcssIcon.js +121 -0
- package/dist/plugins/code/langIcons/PowershellIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/PowershellIcon.js +66 -0
- package/dist/plugins/code/langIcons/PrismaIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/PrismaIcon.js +75 -0
- package/dist/plugins/code/langIcons/PrologIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/PrologIcon.js +66 -0
- package/dist/plugins/code/langIcons/ProtoIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/ProtoIcon.js +81 -0
- package/dist/plugins/code/langIcons/PugIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/PugIcon.js +226 -0
- package/dist/plugins/code/langIcons/PuppetIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/PuppetIcon.js +57 -0
- package/dist/plugins/code/langIcons/PurescriptIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/PurescriptIcon.js +72 -0
- package/dist/plugins/code/langIcons/PythonIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/PythonIcon.js +70 -0
- package/dist/plugins/code/langIcons/RIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/RIcon.js +59 -0
- package/dist/plugins/code/langIcons/RazorIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/RazorIcon.js +65 -0
- package/dist/plugins/code/langIcons/ReactIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/ReactIcon.js +63 -0
- package/dist/plugins/code/langIcons/ReactTsIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/ReactTsIcon.js +66 -0
- package/dist/plugins/code/langIcons/RubyIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/RubyIcon.js +66 -0
- package/dist/plugins/code/langIcons/RustIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/RustIcon.js +63 -0
- package/dist/plugins/code/langIcons/SasIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/SasIcon.js +59 -0
- package/dist/plugins/code/langIcons/SassIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/SassIcon.js +66 -0
- package/dist/plugins/code/langIcons/ScalaIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/ScalaIcon.js +58 -0
- package/dist/plugins/code/langIcons/SchemeIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/SchemeIcon.js +66 -0
- package/dist/plugins/code/langIcons/ShaderlabIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/ShaderlabIcon.js +63 -0
- package/dist/plugins/code/langIcons/SolidityIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/SolidityIcon.js +57 -0
- package/dist/plugins/code/langIcons/SparqlIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/SparqlIcon.js +73 -0
- package/dist/plugins/code/langIcons/StataIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/StataIcon.js +155 -0
- package/dist/plugins/code/langIcons/StylusIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/StylusIcon.js +67 -0
- package/dist/plugins/code/langIcons/SvelteIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/SvelteIcon.js +66 -0
- package/dist/plugins/code/langIcons/SwiftIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/SwiftIcon.js +65 -0
- package/dist/plugins/code/langIcons/SystemverilogIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/SystemverilogIcon.js +137 -0
- package/dist/plugins/code/langIcons/TclIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/TclIcon.js +59 -0
- package/dist/plugins/code/langIcons/TexIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/TexIcon.js +76 -0
- package/dist/plugins/code/langIcons/TomlIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/TomlIcon.js +84 -0
- package/dist/plugins/code/langIcons/TwigIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/TwigIcon.js +63 -0
- package/dist/plugins/code/langIcons/TypescriptIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/TypescriptIcon.js +67 -0
- package/dist/plugins/code/langIcons/VerilogIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/VerilogIcon.js +63 -0
- package/dist/plugins/code/langIcons/VhdlIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/VhdlIcon.js +73 -0
- package/dist/plugins/code/langIcons/VimIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/VimIcon.js +556 -0
- package/dist/plugins/code/langIcons/VueIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/VueIcon.js +72 -0
- package/dist/plugins/code/langIcons/WebassemblyIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/WebassemblyIcon.js +85 -0
- package/dist/plugins/code/langIcons/WenyanIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/WenyanIcon.js +144 -0
- package/dist/plugins/code/langIcons/WgslIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/WgslIcon.js +102 -0
- package/dist/plugins/code/langIcons/WolframlanguageIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/WolframlanguageIcon.js +79 -0
- package/dist/plugins/code/langIcons/XmlIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/XmlIcon.js +59 -0
- package/dist/plugins/code/langIcons/XslIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/XslIcon.js +80 -0
- package/dist/plugins/code/langIcons/YamlIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/YamlIcon.js +63 -0
- package/dist/plugins/code/langIcons/ZigIcon.d.ts +6 -0
- package/dist/plugins/code/langIcons/ZigIcon.js +89 -0
- package/dist/plugins/code/langIcons/index.d.ts +128 -0
- package/dist/plugins/code/langIcons/index.js +259 -0
- package/dist/plugins/code/utils/index.d.ts +6 -0
- package/dist/plugins/code/utils/index.js +5 -0
- package/dist/plugins/code/utils/langOptions.d.ts +28 -0
- package/dist/plugins/code/utils/langOptions.js +14 -0
- package/dist/plugins/defaultPlugins.d.ts +13 -0
- package/dist/plugins/defaultPlugins.js +17 -0
- package/dist/plugins/formatter/index.d.ts +26 -0
- package/dist/plugins/formatter/index.js +109 -0
- package/dist/plugins/index.d.ts +6 -0
- package/dist/plugins/index.js +7 -0
- package/dist/plugins/katex/InlineKatex.d.ts +43 -0
- package/dist/plugins/katex/InlineKatex.js +124 -0
- package/dist/plugins/katex/Katex.d.ts +40 -0
- package/dist/plugins/katex/Katex.js +74 -0
- package/dist/plugins/katex/fonts/KaTeX_AMS-Regular.ttf +0 -0
- package/dist/plugins/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/dist/plugins/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Main-Bold.ttf +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Main-Bold.woff +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Main-Italic.ttf +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Main-Italic.woff +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Main-Regular.ttf +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Main-Regular.woff +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Math-Italic.ttf +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Math-Italic.woff +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/plugins/katex/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- package/dist/plugins/katex/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/dist/plugins/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/plugins/katex/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- package/dist/plugins/katex/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/dist/plugins/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/plugins/katex/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- package/dist/plugins/katex/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/dist/plugins/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Script-Regular.woff +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Size2-Regular.ttf +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Size3-Regular.ttf +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/dist/plugins/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/dist/plugins/katex/index.d.ts +50 -0
- package/dist/plugins/katex/index.js +113 -0
- package/dist/plugins/katex/katex.min.css +1133 -0
- package/dist/plugins/mermaid/Mermaid.d.ts +40 -0
- package/dist/plugins/mermaid/Mermaid.js +102 -0
- package/dist/plugins/mermaid/index.d.ts +44 -0
- package/dist/plugins/mermaid/index.js +165 -0
- package/dist/schema/SchemaEditor/AceEditorWrapper.d.ts +26 -0
- package/dist/schema/SchemaEditor/AceEditorWrapper.js +126 -0
- package/dist/schema/SchemaEditor/index.d.ts +32 -0
- package/dist/schema/SchemaEditor/index.js +291 -0
- package/dist/schema/SchemaEditor/style.d.ts +5 -0
- package/dist/schema/SchemaEditor/style.js +274 -0
- package/dist/schema/SchemaForm/index.d.ts +61 -0
- package/dist/schema/SchemaForm/index.js +285 -0
- package/dist/schema/SchemaForm/types.d.ts +15 -0
- package/dist/schema/SchemaForm/types.js +0 -0
- package/dist/schema/SchemaRenderer/index.d.ts +81 -0
- package/dist/schema/SchemaRenderer/index.js +610 -0
- package/dist/schema/SchemaRenderer/templateEngine.d.ts +8 -0
- package/dist/schema/SchemaRenderer/templateEngine.js +26 -0
- package/dist/schema/index.d.ts +6 -0
- package/dist/schema/index.js +15 -0
- package/dist/schema/schema.definition.json +297 -0
- package/dist/schema/schema.json +109 -0
- package/dist/schema/types.d.ts +140 -0
- package/dist/schema/types.js +0 -0
- package/dist/schema/validator.d.ts +17 -0
- package/dist/schema/validator.js +42 -0
- package/dist/types/slash2.d.ts +4 -0
- package/dist/typing.d.ts +29 -0
- package/dist/utils/easings.d.ts +1 -0
- package/dist/utils/easings.js +13 -0
- package/dist/utils/formatTime.d.ts +30 -0
- package/dist/utils/formatTime.js +19 -0
- package/dist/utils/getScroll.d.ts +4 -0
- package/dist/utils/getScroll.js +45 -0
- package/dist/utils/language.d.ts +220 -0
- package/dist/utils/language.js +168 -0
- package/dist/utils/proxySandbox/ProxySandbox.d.ts +164 -0
- package/dist/utils/proxySandbox/ProxySandbox.js +1061 -0
- package/dist/utils/proxySandbox/SecurityContextManager.d.ts +183 -0
- package/dist/utils/proxySandbox/SecurityContextManager.js +369 -0
- package/dist/utils/proxySandbox/index.d.ts +57 -0
- package/dist/utils/proxySandbox/index.js +281 -0
- package/dist/utils/proxySandbox/types.d.ts +332 -0
- package/dist/utils/proxySandbox/types.js +52 -0
- package/dist/utils/reset-ant.css +432 -0
- package/dist/utils/scrollTo.d.ts +10 -0
- package/dist/utils/scrollTo.js +63 -0
- package/dist/utils/throttleByAnimationFrame.d.ts +5 -0
- package/dist/utils/throttleByAnimationFrame.js +23 -0
- package/package.json +165 -0
|
@@ -0,0 +1,1357 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
|
|
21
|
+
// src/MarkdownEditor/editor/parser/parserMarkdownToSlateNode.ts
|
|
22
|
+
import json5 from "json5";
|
|
23
|
+
import rehypeKatex from "rehype-katex";
|
|
24
|
+
import rehypeRaw from "rehype-raw";
|
|
25
|
+
import { remark } from "remark";
|
|
26
|
+
import remarkFrontmatter from "remark-frontmatter";
|
|
27
|
+
import remarkGfm from "remark-gfm";
|
|
28
|
+
import remarkMath from "remark-math";
|
|
29
|
+
import remarkParse from "remark-parse";
|
|
30
|
+
import remarkRehype from "remark-rehype";
|
|
31
|
+
import { fixStrongWithSpecialChars } from "./remarkParse";
|
|
32
|
+
import { htmlToFragmentList } from "../plugins/insertParsedHtmlNodes";
|
|
33
|
+
import { EditorUtils } from "../utils";
|
|
34
|
+
import partialJsonParse from "./json-parse";
|
|
35
|
+
import mdastParser from "./remarkParse";
|
|
36
|
+
var processSchemaLanguage = (element, value) => {
|
|
37
|
+
let json = [];
|
|
38
|
+
try {
|
|
39
|
+
json = json5.parse(value || "[]");
|
|
40
|
+
} catch (error) {
|
|
41
|
+
try {
|
|
42
|
+
json = partialJsonParse(value || "[]");
|
|
43
|
+
} catch (error2) {
|
|
44
|
+
json = value;
|
|
45
|
+
console.error("parse schema error", error2);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return __spreadProps(__spreadValues({}, element), {
|
|
49
|
+
type: "apaasify",
|
|
50
|
+
value: json,
|
|
51
|
+
children: [{ text: value }]
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
var LANGUAGE_HANDLERS = {
|
|
55
|
+
mermaid: (element) => __spreadProps(__spreadValues({}, element), {
|
|
56
|
+
type: "mermaid"
|
|
57
|
+
}),
|
|
58
|
+
schema: processSchemaLanguage,
|
|
59
|
+
apaasify: processSchemaLanguage,
|
|
60
|
+
apassify: processSchemaLanguage,
|
|
61
|
+
katex: (element) => __spreadProps(__spreadValues({}, element), {
|
|
62
|
+
type: "katex"
|
|
63
|
+
}),
|
|
64
|
+
"agentar-card": processSchemaLanguage
|
|
65
|
+
};
|
|
66
|
+
var advancedNumericCheck = (value) => {
|
|
67
|
+
const numericPattern = /^[-+]?[0-9,]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;
|
|
68
|
+
return typeof value === "number" || typeof value === "string" && numericPattern.test(value);
|
|
69
|
+
};
|
|
70
|
+
var isNumericValue = (value) => {
|
|
71
|
+
return typeof value === "number" || !isNaN(parseFloat(value)) && isFinite(value) || advancedNumericCheck(value);
|
|
72
|
+
};
|
|
73
|
+
var hasIncompleteNumericInput = (values) => {
|
|
74
|
+
return values.some((val) => {
|
|
75
|
+
if (typeof val !== "string")
|
|
76
|
+
return false;
|
|
77
|
+
return val.endsWith(".") && /\d/.test(val) || // 以小数点结尾
|
|
78
|
+
val === "-" || // 只有负号
|
|
79
|
+
val === "+" || // 只有正号
|
|
80
|
+
val.length === 1 && /\d/.test(val);
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
var getColumnAlignment = (data, columns) => {
|
|
84
|
+
if (!data.length)
|
|
85
|
+
return [];
|
|
86
|
+
const prevAlignments = [];
|
|
87
|
+
return columns.map((col, index) => {
|
|
88
|
+
const values = data.map((row) => row[col.dataIndex]).filter(Boolean);
|
|
89
|
+
values == null ? void 0 : values.pop();
|
|
90
|
+
if (hasIncompleteNumericInput(values)) {
|
|
91
|
+
return prevAlignments[index] || null;
|
|
92
|
+
}
|
|
93
|
+
const alignment = values.every(isNumericValue) ? "right" : null;
|
|
94
|
+
prevAlignments[index] = alignment;
|
|
95
|
+
return alignment;
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
var stringifyObj = remark().use(remarkParse).use(fixStrongWithSpecialChars).use(remarkMath, {
|
|
99
|
+
singleDollarTextMath: false
|
|
100
|
+
// 暂时禁用单美元符号,只使用双美元符号 $$...$$
|
|
101
|
+
}).use(remarkRehype, { allowDangerousHtml: true }).use(rehypeRaw).use(rehypeKatex).use(remarkGfm).use(remarkFrontmatter, ["yaml"]);
|
|
102
|
+
var myRemark = {
|
|
103
|
+
stringify: (obj) => {
|
|
104
|
+
const mdStr = stringifyObj.stringify(obj);
|
|
105
|
+
return mdStr;
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
var findThinkElement = (str) => {
|
|
109
|
+
try {
|
|
110
|
+
const thinkMatch = str.match(/^\s*<think>([\s\S]*?)<\/think>\s*$/);
|
|
111
|
+
if (thinkMatch) {
|
|
112
|
+
return {
|
|
113
|
+
content: thinkMatch[1].trim()
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
return null;
|
|
117
|
+
} catch (e) {
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
var findAnswerElement = (str) => {
|
|
122
|
+
try {
|
|
123
|
+
const answerMatch = str.match(/^\s*<answer>([\s\S]*?)<\/answer>\s*$/);
|
|
124
|
+
if (answerMatch) {
|
|
125
|
+
return {
|
|
126
|
+
content: answerMatch[1].trim()
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
return null;
|
|
130
|
+
} catch (e) {
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
var findImageElement = (str) => {
|
|
135
|
+
var _a, _b, _c;
|
|
136
|
+
try {
|
|
137
|
+
const videoWithSourceMatch = str.match(
|
|
138
|
+
/^\s*<video[^>\n]*>[\s\S]*?<source[^>]*src="([^"\n]+)"[^>]*>[\s\S]*?<\/video>\s*$/
|
|
139
|
+
);
|
|
140
|
+
if (videoWithSourceMatch) {
|
|
141
|
+
const tagName = "video";
|
|
142
|
+
const height = str.match(/height="(\d+)"/);
|
|
143
|
+
const width = str.match(/width="(\d+)"/);
|
|
144
|
+
const align = str.match(/data-align="(\w+)"/);
|
|
145
|
+
const controls = str.match(/controls/);
|
|
146
|
+
const autoplay = str.match(/autoplay/);
|
|
147
|
+
const loop = str.match(/loop/);
|
|
148
|
+
const muted = str.match(/muted/);
|
|
149
|
+
const poster = str.match(/poster="([^"\n]+)"/);
|
|
150
|
+
return {
|
|
151
|
+
url: decodeURIComponent(videoWithSourceMatch[1]),
|
|
152
|
+
height: height ? +height[1] : void 0,
|
|
153
|
+
width: width ? +width[1] : void 0,
|
|
154
|
+
align: align == null ? void 0 : align[1],
|
|
155
|
+
alt: (_a = str.match(/alt="([^"\n]+)"/)) == null ? void 0 : _a[1],
|
|
156
|
+
tagName,
|
|
157
|
+
controls: !!controls,
|
|
158
|
+
autoplay: !!autoplay,
|
|
159
|
+
loop: !!loop,
|
|
160
|
+
muted: !!muted,
|
|
161
|
+
poster: poster == null ? void 0 : poster[1]
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
const match = str.match(
|
|
165
|
+
/^\s*<(img|video|iframe)[^>\n]*\/?>(.*<\/(?:img|video|iframe)>)?\s*$/
|
|
166
|
+
);
|
|
167
|
+
const selfClosingMatch = str.match(/^\s*<(img|video|iframe)[^>\n]*\/>\s*$/);
|
|
168
|
+
const fullTagMatch = str.match(
|
|
169
|
+
/^\s*<(img|video|iframe)[^>\n]*>.*?<\/(?:img|video|iframe)>\s*$/
|
|
170
|
+
);
|
|
171
|
+
const startTagMatch = str.match(/^\s*<(img|video|iframe)[^>\n]*>\s*$/);
|
|
172
|
+
const fullMatch = fullTagMatch || match || selfClosingMatch || startTagMatch;
|
|
173
|
+
if (fullMatch) {
|
|
174
|
+
const tagName = (_b = fullMatch[0].match(/<(img|video|iframe)/)) == null ? void 0 : _b[1];
|
|
175
|
+
let url = fullMatch[0].match(/src="([^"\n]+)"/);
|
|
176
|
+
if (tagName === "video" && !url) {
|
|
177
|
+
const sourceMatch = fullMatch[0].match(
|
|
178
|
+
/<source[^>]*src="([^"\n]+)"[^>]*>/
|
|
179
|
+
);
|
|
180
|
+
if (sourceMatch) {
|
|
181
|
+
url = sourceMatch;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
const height = fullMatch[0].match(/height="(\d+)"/);
|
|
185
|
+
const width = fullMatch[0].match(/width="(\d+)"/);
|
|
186
|
+
const align = fullMatch[0].match(/data-align="(\w+)"/);
|
|
187
|
+
const controls = fullMatch[0].match(/controls/);
|
|
188
|
+
const autoplay = fullMatch[0].match(/autoplay/);
|
|
189
|
+
const loop = fullMatch[0].match(/loop/);
|
|
190
|
+
const muted = fullMatch[0].match(/muted/);
|
|
191
|
+
const poster = fullMatch[0].match(/poster="([^"\n]+)"/);
|
|
192
|
+
return {
|
|
193
|
+
url: url == null ? void 0 : url[1],
|
|
194
|
+
height: height ? +height[1] : void 0,
|
|
195
|
+
width: width ? +width[1] : void 0,
|
|
196
|
+
align: align == null ? void 0 : align[1],
|
|
197
|
+
alt: (_c = fullMatch[0].match(/alt="([^"\n]+)"/)) == null ? void 0 : _c[1],
|
|
198
|
+
tagName,
|
|
199
|
+
controls: !!controls,
|
|
200
|
+
autoplay: !!autoplay,
|
|
201
|
+
loop: !!loop,
|
|
202
|
+
muted: !!muted,
|
|
203
|
+
poster: poster == null ? void 0 : poster[1]
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
return null;
|
|
207
|
+
} catch (e) {
|
|
208
|
+
return null;
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
var findAttachment = (str) => {
|
|
212
|
+
try {
|
|
213
|
+
const match = str.match(/^\s*<a[^>\n]*download[^>\n]*\/?>(.*<\/a>:?)?\s*$/);
|
|
214
|
+
if (match) {
|
|
215
|
+
const url = match[0].match(/href="([^"\n]+)"/);
|
|
216
|
+
const size = match[0].match(/data-size="(\d+)"/);
|
|
217
|
+
if (url) {
|
|
218
|
+
return { url: url[1], size: Number((size == null ? void 0 : size[1]) || 0) };
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return null;
|
|
222
|
+
} catch (e) {
|
|
223
|
+
return null;
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
var parseText = (els, leaf = {
|
|
227
|
+
data: {}
|
|
228
|
+
}) => {
|
|
229
|
+
let leafs = [];
|
|
230
|
+
for (let n of els) {
|
|
231
|
+
if (n.type === "strong")
|
|
232
|
+
leafs = leafs.concat(parseText(n.children, __spreadProps(__spreadValues({}, leaf), { bold: true })));
|
|
233
|
+
if (n.type === "emphasis")
|
|
234
|
+
leafs = leafs.concat(parseText(n.children, __spreadProps(__spreadValues({}, leaf), { italic: true })));
|
|
235
|
+
if (n.type === "delete")
|
|
236
|
+
leafs = leafs.concat(
|
|
237
|
+
parseText(n.children, __spreadProps(__spreadValues({}, leaf), { strikethrough: true }))
|
|
238
|
+
);
|
|
239
|
+
if (n.type === "link") {
|
|
240
|
+
leafs = leafs.concat(parseText(n.children, __spreadProps(__spreadValues({}, leaf), { url: n == null ? void 0 : n.url })));
|
|
241
|
+
}
|
|
242
|
+
if (n.type === "inlineCode")
|
|
243
|
+
leafs.push(__spreadProps(__spreadValues({}, leaf), { text: n.value, code: true }));
|
|
244
|
+
if (n.type === "inlineMath") {
|
|
245
|
+
leafs.push(__spreadProps(__spreadValues({}, leaf), {
|
|
246
|
+
type: "inline-katex",
|
|
247
|
+
children: [{ text: n.value }]
|
|
248
|
+
}));
|
|
249
|
+
continue;
|
|
250
|
+
}
|
|
251
|
+
leafs.push(__spreadProps(__spreadValues({}, leaf), { text: n.value || "" }));
|
|
252
|
+
}
|
|
253
|
+
return leafs;
|
|
254
|
+
};
|
|
255
|
+
var parseTableOrChart = (table, preNode, plugins) => {
|
|
256
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
257
|
+
const keyMap = /* @__PURE__ */ new Map();
|
|
258
|
+
const config = (
|
|
259
|
+
// @ts-ignore
|
|
260
|
+
(preNode == null ? void 0 : preNode.type) === "code" && // @ts-ignore
|
|
261
|
+
(preNode == null ? void 0 : preNode.language) === "html" && // @ts-ignore
|
|
262
|
+
(preNode == null ? void 0 : preNode.otherProps) ? (
|
|
263
|
+
// @ts-ignore
|
|
264
|
+
preNode == null ? void 0 : preNode.otherProps
|
|
265
|
+
) : {}
|
|
266
|
+
);
|
|
267
|
+
const tableHeader = (_a = table == null ? void 0 : table.children) == null ? void 0 : _a.at(0);
|
|
268
|
+
const columns = ((_b = tableHeader == null ? void 0 : tableHeader.children) == null ? void 0 : _b.map((node2) => {
|
|
269
|
+
var _a2;
|
|
270
|
+
return (_a2 = myRemark.stringify({
|
|
271
|
+
type: "root",
|
|
272
|
+
children: [node2]
|
|
273
|
+
})) == null ? void 0 : _a2.replace(/\n/g, "").trim();
|
|
274
|
+
}).map((title) => (title == null ? void 0 : title.replaceAll("\\", "")) || " ").map((title, index) => {
|
|
275
|
+
var _a2, _b2, _c2;
|
|
276
|
+
if (keyMap.has(title)) {
|
|
277
|
+
keyMap.set(title, keyMap.get(title) + "_" + index);
|
|
278
|
+
return {
|
|
279
|
+
title: (_c2 = (_b2 = (_a2 = title == null ? void 0 : title.replace(/\n/g, "")) == null ? void 0 : _a2.replace(/\\(?=")/g, "")) == null ? void 0 : _b2.replace(/\\_/g, "")) == null ? void 0 : _c2.trim(),
|
|
280
|
+
dataIndex: title + "_" + index,
|
|
281
|
+
key: title + "_" + index
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
keyMap.set(title, title);
|
|
285
|
+
return {
|
|
286
|
+
title,
|
|
287
|
+
dataIndex: title,
|
|
288
|
+
key: title
|
|
289
|
+
};
|
|
290
|
+
})) || [];
|
|
291
|
+
const dataSource = ((_d = (_c = table == null ? void 0 : table.children) == null ? void 0 : _c.slice(1)) == null ? void 0 : _d.map((row) => {
|
|
292
|
+
var _a2;
|
|
293
|
+
return (_a2 = row.children) == null ? void 0 : _a2.reduce((acc, cell, index) => {
|
|
294
|
+
var _a3, _b2, _c2, _d2;
|
|
295
|
+
if (index >= columns.length) {
|
|
296
|
+
return acc;
|
|
297
|
+
}
|
|
298
|
+
acc[columns[index].dataIndex] = (_d2 = (_c2 = (_b2 = (_a3 = myRemark.stringify({
|
|
299
|
+
type: "root",
|
|
300
|
+
children: [cell]
|
|
301
|
+
})) == null ? void 0 : _a3.replace(/\n/g, "")) == null ? void 0 : _b2.replace(/\\(?=")/g, "")) == null ? void 0 : _c2.replace(/\\_/g, "")) == null ? void 0 : _d2.trim();
|
|
302
|
+
return acc;
|
|
303
|
+
}, {});
|
|
304
|
+
})) || [];
|
|
305
|
+
if ((_e = table.align) == null ? void 0 : _e.every((item) => !item)) {
|
|
306
|
+
const aligns2 = getColumnAlignment(dataSource, columns);
|
|
307
|
+
table.align = aligns2;
|
|
308
|
+
}
|
|
309
|
+
const aligns = table.align;
|
|
310
|
+
const isChart = (config == null ? void 0 : config.chartType) || ((_g = (_f = config == null ? void 0 : config.at) == null ? void 0 : _f.call(config, 0)) == null ? void 0 : _g.chartType);
|
|
311
|
+
const mergeCells = config.mergeCells || [];
|
|
312
|
+
const mergeMap = /* @__PURE__ */ new Map();
|
|
313
|
+
mergeCells == null ? void 0 : mergeCells.forEach(
|
|
314
|
+
({ row, col, rowSpan, rowspan, colSpan, colspan }) => {
|
|
315
|
+
let rawRowSpan = rowSpan || rowspan;
|
|
316
|
+
let rawColSpan = colSpan || colspan;
|
|
317
|
+
mergeMap.set(`${row}-${col}`, {
|
|
318
|
+
rowSpan: rawRowSpan,
|
|
319
|
+
colSpan: rawColSpan
|
|
320
|
+
});
|
|
321
|
+
for (let r = row; r < row + rawRowSpan; r++) {
|
|
322
|
+
for (let c = col; c < col + rawColSpan; c++) {
|
|
323
|
+
if (r !== row || c !== col) {
|
|
324
|
+
mergeMap.set(`${r}-${c}`, { rowSpan: 1, colSpan: 1, hidden: true });
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
);
|
|
330
|
+
const children = table.children.map((r, l) => {
|
|
331
|
+
return {
|
|
332
|
+
type: "table-row",
|
|
333
|
+
align: (aligns == null ? void 0 : aligns[l]) || void 0,
|
|
334
|
+
children: r.children.map(
|
|
335
|
+
(c, i) => {
|
|
336
|
+
var _a2;
|
|
337
|
+
const mergeInfo = mergeMap.get(`${l}-${i}`);
|
|
338
|
+
return __spreadProps(__spreadValues(__spreadValues(__spreadValues({
|
|
339
|
+
type: "table-cell",
|
|
340
|
+
align: (aligns == null ? void 0 : aligns[i]) || void 0,
|
|
341
|
+
title: l === 0,
|
|
342
|
+
rows: l,
|
|
343
|
+
cols: i
|
|
344
|
+
}, (mergeInfo == null ? void 0 : mergeInfo.rowSpan) && mergeInfo.rowSpan > 1 ? { rowSpan: mergeInfo.rowSpan } : {}), (mergeInfo == null ? void 0 : mergeInfo.colSpan) && mergeInfo.colSpan > 1 ? { colSpan: mergeInfo.colSpan } : {}), (mergeInfo == null ? void 0 : mergeInfo.hidden) ? { hidden: true } : {}), {
|
|
345
|
+
children: ((_a2 = c.children) == null ? void 0 : _a2.length) ? [
|
|
346
|
+
{
|
|
347
|
+
type: "paragraph",
|
|
348
|
+
children: parserBlock(
|
|
349
|
+
c.children,
|
|
350
|
+
false,
|
|
351
|
+
c,
|
|
352
|
+
plugins
|
|
353
|
+
)
|
|
354
|
+
}
|
|
355
|
+
] : [
|
|
356
|
+
{
|
|
357
|
+
type: "paragraph",
|
|
358
|
+
children: [{ text: "" }]
|
|
359
|
+
}
|
|
360
|
+
]
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
)
|
|
364
|
+
};
|
|
365
|
+
});
|
|
366
|
+
const otherProps = __spreadProps(__spreadValues({}, isChart ? {
|
|
367
|
+
config
|
|
368
|
+
} : config), {
|
|
369
|
+
columns,
|
|
370
|
+
dataSource: dataSource.map((item) => {
|
|
371
|
+
item == null ? true : delete item.chartType;
|
|
372
|
+
return __spreadValues({}, item);
|
|
373
|
+
})
|
|
374
|
+
});
|
|
375
|
+
const node = {
|
|
376
|
+
type: isChart ? "chart" : "table",
|
|
377
|
+
children,
|
|
378
|
+
otherProps
|
|
379
|
+
};
|
|
380
|
+
return EditorUtils.wrapperCardNode(node);
|
|
381
|
+
};
|
|
382
|
+
var handleHeading = (currentElement, plugins) => {
|
|
383
|
+
var _a;
|
|
384
|
+
return {
|
|
385
|
+
type: "head",
|
|
386
|
+
level: currentElement.depth,
|
|
387
|
+
children: ((_a = currentElement.children) == null ? void 0 : _a.length) ? parserBlock(currentElement.children, false, currentElement, plugins) : [{ text: "" }]
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
var decodeURIComponentUrl = (url) => {
|
|
391
|
+
try {
|
|
392
|
+
return decodeURIComponent(url);
|
|
393
|
+
} catch (e) {
|
|
394
|
+
console.error("Failed to decode URI component:", e);
|
|
395
|
+
return url;
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
var handleHtml = (currentElement, parent, htmlTag) => {
|
|
399
|
+
var _a, _b, _c, _d, _e, _f;
|
|
400
|
+
const value = ((_a = currentElement == null ? void 0 : currentElement.value) == null ? void 0 : _a.replace("<!--", "").replace("-->", "").trim()) || "{}";
|
|
401
|
+
let contextProps = {};
|
|
402
|
+
if (value && ((_c = (_b = currentElement == null ? void 0 : currentElement.value) == null ? void 0 : _b.trim()) == null ? void 0 : _c.endsWith("-->")) && ((_d = currentElement == null ? void 0 : currentElement.value.trim()) == null ? void 0 : _d.startsWith("<!--"))) {
|
|
403
|
+
try {
|
|
404
|
+
contextProps = json5.parse(value);
|
|
405
|
+
} catch (e) {
|
|
406
|
+
try {
|
|
407
|
+
contextProps = partialJsonParse(value);
|
|
408
|
+
} catch (error) {
|
|
409
|
+
}
|
|
410
|
+
console.log("parse html error", e);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
let el;
|
|
414
|
+
if (!parent || ["listItem", "blockquote"].includes(parent.type)) {
|
|
415
|
+
const thinkElement = findThinkElement(currentElement.value);
|
|
416
|
+
if (thinkElement) {
|
|
417
|
+
el = {
|
|
418
|
+
type: "code",
|
|
419
|
+
language: "think",
|
|
420
|
+
value: thinkElement.content,
|
|
421
|
+
children: [
|
|
422
|
+
{
|
|
423
|
+
text: thinkElement.content
|
|
424
|
+
}
|
|
425
|
+
]
|
|
426
|
+
};
|
|
427
|
+
} else {
|
|
428
|
+
const answerElement = findAnswerElement(currentElement.value);
|
|
429
|
+
if (answerElement) {
|
|
430
|
+
el = { text: answerElement.content };
|
|
431
|
+
} else {
|
|
432
|
+
const mediaElement = findImageElement(currentElement.value);
|
|
433
|
+
if (mediaElement) {
|
|
434
|
+
let mediaType = "image";
|
|
435
|
+
if (mediaElement.tagName === "video") {
|
|
436
|
+
mediaType = "video";
|
|
437
|
+
} else if (mediaElement.tagName === "iframe") {
|
|
438
|
+
mediaType = "iframe";
|
|
439
|
+
}
|
|
440
|
+
el = EditorUtils.createMediaNode(
|
|
441
|
+
decodeURIComponentUrl((mediaElement == null ? void 0 : mediaElement.url) || ""),
|
|
442
|
+
mediaType,
|
|
443
|
+
{
|
|
444
|
+
align: mediaElement.align,
|
|
445
|
+
alt: mediaElement.alt,
|
|
446
|
+
height: mediaElement == null ? void 0 : mediaElement.height,
|
|
447
|
+
width: mediaElement == null ? void 0 : mediaElement.width,
|
|
448
|
+
controls: mediaElement == null ? void 0 : mediaElement.controls,
|
|
449
|
+
autoplay: mediaElement == null ? void 0 : mediaElement.autoplay,
|
|
450
|
+
loop: mediaElement == null ? void 0 : mediaElement.loop,
|
|
451
|
+
muted: mediaElement == null ? void 0 : mediaElement.muted,
|
|
452
|
+
poster: mediaElement == null ? void 0 : mediaElement.poster
|
|
453
|
+
}
|
|
454
|
+
);
|
|
455
|
+
} else if (currentElement.value === "<br/>") {
|
|
456
|
+
el = { type: "paragraph", children: [{ text: "" }] };
|
|
457
|
+
} else if (currentElement.value.match(/^<\/(img|video|iframe)>/)) {
|
|
458
|
+
el = null;
|
|
459
|
+
} else {
|
|
460
|
+
const isComment = currentElement.value.trim().startsWith("<!--") && currentElement.value.trim().endsWith("-->");
|
|
461
|
+
if (isComment || isStandardHtmlElement(currentElement.value)) {
|
|
462
|
+
el = currentElement.value.match(
|
|
463
|
+
/<\/?(table|div|ul|li|ol|p|strong)[^\n>]*?>/
|
|
464
|
+
) ? htmlToFragmentList(currentElement.value, "") : {
|
|
465
|
+
type: "code",
|
|
466
|
+
language: "html",
|
|
467
|
+
render: true,
|
|
468
|
+
value: currentElement.value,
|
|
469
|
+
children: [
|
|
470
|
+
{
|
|
471
|
+
text: currentElement.value
|
|
472
|
+
}
|
|
473
|
+
]
|
|
474
|
+
};
|
|
475
|
+
} else {
|
|
476
|
+
el = { text: currentElement.value };
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
} else {
|
|
482
|
+
el = processInlineHtml(currentElement, htmlTag);
|
|
483
|
+
}
|
|
484
|
+
if (el && !Array.isArray(el)) {
|
|
485
|
+
if (!("text" in el && Object.keys(el).length === 1)) {
|
|
486
|
+
el.isConfig = (_f = (_e = currentElement == null ? void 0 : currentElement.value) == null ? void 0 : _e.trim()) == null ? void 0 : _f.startsWith("<!--");
|
|
487
|
+
el.otherProps = contextProps;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
return { el, contextProps };
|
|
491
|
+
};
|
|
492
|
+
var processInlineHtml = (currentElement, htmlTag) => {
|
|
493
|
+
const breakMatch = currentElement.value.match(/<br\/?>/);
|
|
494
|
+
if (breakMatch) {
|
|
495
|
+
return { type: "break", children: [{ text: "\n" }] };
|
|
496
|
+
}
|
|
497
|
+
const answerElement = findAnswerElement(currentElement.value);
|
|
498
|
+
if (answerElement) {
|
|
499
|
+
return { text: answerElement.content };
|
|
500
|
+
}
|
|
501
|
+
if (!isStandardHtmlElement(currentElement.value)) {
|
|
502
|
+
return { text: currentElement.value };
|
|
503
|
+
}
|
|
504
|
+
const htmlMatch = currentElement.value.match(
|
|
505
|
+
/<\/?(b|i|del|font|code|span|sup|sub|strong|a)[^\n>]*?>/
|
|
506
|
+
);
|
|
507
|
+
if (htmlMatch) {
|
|
508
|
+
const [str, tag] = htmlMatch;
|
|
509
|
+
if (str.startsWith("</") && htmlTag.length && htmlTag[htmlTag.length - 1].tag === tag) {
|
|
510
|
+
htmlTag.pop();
|
|
511
|
+
}
|
|
512
|
+
if (!str.startsWith("</")) {
|
|
513
|
+
processHtmlTag(str, tag, htmlTag);
|
|
514
|
+
}
|
|
515
|
+
return null;
|
|
516
|
+
} else {
|
|
517
|
+
const mediaElement = findImageElement(currentElement.value);
|
|
518
|
+
if (mediaElement) {
|
|
519
|
+
let mediaType = "image";
|
|
520
|
+
if (mediaElement.tagName === "video") {
|
|
521
|
+
mediaType = "video";
|
|
522
|
+
} else if (mediaElement.tagName === "iframe") {
|
|
523
|
+
mediaType = "iframe";
|
|
524
|
+
}
|
|
525
|
+
return EditorUtils.createMediaNode(mediaElement == null ? void 0 : mediaElement.url, mediaType, {
|
|
526
|
+
align: mediaElement.align,
|
|
527
|
+
alt: mediaElement.alt,
|
|
528
|
+
height: mediaElement == null ? void 0 : mediaElement.height,
|
|
529
|
+
width: mediaElement == null ? void 0 : mediaElement.width,
|
|
530
|
+
controls: mediaElement == null ? void 0 : mediaElement.controls,
|
|
531
|
+
autoplay: mediaElement == null ? void 0 : mediaElement.autoplay,
|
|
532
|
+
loop: mediaElement == null ? void 0 : mediaElement.loop,
|
|
533
|
+
muted: mediaElement == null ? void 0 : mediaElement.muted,
|
|
534
|
+
poster: mediaElement == null ? void 0 : mediaElement.poster
|
|
535
|
+
});
|
|
536
|
+
} else {
|
|
537
|
+
return { text: currentElement.value };
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
};
|
|
541
|
+
var processHtmlTag = (str, tag, htmlTag) => {
|
|
542
|
+
if (tag === "span") {
|
|
543
|
+
try {
|
|
544
|
+
const styles = str.match(/style="([^"\n]+)"/);
|
|
545
|
+
if (styles) {
|
|
546
|
+
const stylesMap = new Map(
|
|
547
|
+
styles[1].split(";").map(
|
|
548
|
+
(item) => item.split(":").map((item2) => item2.trim())
|
|
549
|
+
)
|
|
550
|
+
);
|
|
551
|
+
if (stylesMap.get("color")) {
|
|
552
|
+
htmlTag.push({
|
|
553
|
+
tag,
|
|
554
|
+
color: stylesMap.get("color")
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
} catch (e) {
|
|
559
|
+
}
|
|
560
|
+
} else if (tag === "a") {
|
|
561
|
+
const url = str.match(/href="([\w:./_\-#\\]+)"/);
|
|
562
|
+
if (url) {
|
|
563
|
+
htmlTag.push({
|
|
564
|
+
tag,
|
|
565
|
+
url: url[1]
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
} else if (tag === "font") {
|
|
569
|
+
let color = str.match(/color="([^"\n]+)"/);
|
|
570
|
+
if (!color) {
|
|
571
|
+
color = str.match(/color=([^"\n]+)/);
|
|
572
|
+
}
|
|
573
|
+
if (color) {
|
|
574
|
+
htmlTag.push({
|
|
575
|
+
tag,
|
|
576
|
+
color: color[1].replaceAll(">", "")
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
} else {
|
|
580
|
+
htmlTag.push({ tag });
|
|
581
|
+
}
|
|
582
|
+
};
|
|
583
|
+
var handleImage = (currentElement) => {
|
|
584
|
+
return EditorUtils.createMediaNode(
|
|
585
|
+
decodeURIComponent(currentElement == null ? void 0 : currentElement.url),
|
|
586
|
+
"image",
|
|
587
|
+
{
|
|
588
|
+
alt: currentElement.alt
|
|
589
|
+
}
|
|
590
|
+
);
|
|
591
|
+
};
|
|
592
|
+
var handleInlineMath = (currentElement) => {
|
|
593
|
+
return {
|
|
594
|
+
type: "inline-katex",
|
|
595
|
+
children: [{ text: currentElement.value }]
|
|
596
|
+
};
|
|
597
|
+
};
|
|
598
|
+
var handleMath = (currentElement) => {
|
|
599
|
+
return {
|
|
600
|
+
type: "katex",
|
|
601
|
+
language: "latex",
|
|
602
|
+
katex: true,
|
|
603
|
+
value: currentElement.value,
|
|
604
|
+
children: [{ text: "" }]
|
|
605
|
+
};
|
|
606
|
+
};
|
|
607
|
+
var handleList = (currentElement, plugins) => {
|
|
608
|
+
var _a;
|
|
609
|
+
const el = {
|
|
610
|
+
type: "list",
|
|
611
|
+
order: currentElement.ordered,
|
|
612
|
+
start: currentElement.start,
|
|
613
|
+
children: parserBlock(
|
|
614
|
+
currentElement.children,
|
|
615
|
+
false,
|
|
616
|
+
currentElement,
|
|
617
|
+
plugins
|
|
618
|
+
)
|
|
619
|
+
};
|
|
620
|
+
el.task = (_a = el.children) == null ? void 0 : _a.some((s) => typeof s.checked === "boolean");
|
|
621
|
+
return el;
|
|
622
|
+
};
|
|
623
|
+
var handleFootnoteReference = (currentElement) => {
|
|
624
|
+
var _a;
|
|
625
|
+
return {
|
|
626
|
+
text: `${(_a = currentElement.identifier) == null ? void 0 : _a.toUpperCase()}`,
|
|
627
|
+
identifier: currentElement.identifier,
|
|
628
|
+
type: "footnoteReference"
|
|
629
|
+
};
|
|
630
|
+
};
|
|
631
|
+
var handleFootnoteDefinition = (currentElement, plugins) => {
|
|
632
|
+
var _a, _b;
|
|
633
|
+
const linkNode = (_a = parserBlock(
|
|
634
|
+
currentElement.children,
|
|
635
|
+
false,
|
|
636
|
+
currentElement,
|
|
637
|
+
plugins
|
|
638
|
+
)) == null ? void 0 : _a.at(0);
|
|
639
|
+
const cellNode = (_b = linkNode == null ? void 0 : linkNode.children) == null ? void 0 : _b.at(0);
|
|
640
|
+
return {
|
|
641
|
+
value: cellNode == null ? void 0 : cellNode.text,
|
|
642
|
+
url: cellNode == null ? void 0 : cellNode.url,
|
|
643
|
+
type: "footnoteDefinition",
|
|
644
|
+
identifier: currentElement.identifier,
|
|
645
|
+
children: [cellNode]
|
|
646
|
+
};
|
|
647
|
+
};
|
|
648
|
+
var handleListItem = (currentElement, plugins) => {
|
|
649
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
|
|
650
|
+
const children = ((_a = currentElement.children) == null ? void 0 : _a.length) ? parserBlock(currentElement.children, false, currentElement, plugins) : [{ type: "paragraph", children: [{ text: "" }] }];
|
|
651
|
+
let mentions = void 0;
|
|
652
|
+
if (((_e = (_d = (_c = (_b = currentElement.children) == null ? void 0 : _b[0]) == null ? void 0 : _c.children) == null ? void 0 : _d[0]) == null ? void 0 : _e.type) === "link" && ((_h = (_g = (_f = currentElement.children) == null ? void 0 : _f[0]) == null ? void 0 : _g.children) == null ? void 0 : _h.length) > 1) {
|
|
653
|
+
const item = (_j = (_i = children == null ? void 0 : children[0]) == null ? void 0 : _i.children) == null ? void 0 : _j[0];
|
|
654
|
+
const label = item == null ? void 0 : item.text;
|
|
655
|
+
if (label) {
|
|
656
|
+
mentions = [
|
|
657
|
+
{
|
|
658
|
+
avatar: item == null ? void 0 : item.url,
|
|
659
|
+
name: label,
|
|
660
|
+
id: new URLSearchParams("?" + ((_k = item == null ? void 0 : item.url) == null ? void 0 : _k.split("?")[1])).get("id") || void 0
|
|
661
|
+
}
|
|
662
|
+
];
|
|
663
|
+
(_m = (_l = children == null ? void 0 : children[0]) == null ? void 0 : _l.children) == null ? true : delete _m[0];
|
|
664
|
+
if ((_n = children == null ? void 0 : children[0]) == null ? void 0 : _n.children) {
|
|
665
|
+
children[0].children = (_p = (_o = children == null ? void 0 : children[0]) == null ? void 0 : _o.children) == null ? void 0 : _p.filter(Boolean);
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
if (children[0].type === "paragraph" && ((_q = children[0].children[0]) == null ? void 0 : _q.text)) {
|
|
670
|
+
const text = (_r = children[0].children[0]) == null ? void 0 : _r.text;
|
|
671
|
+
const m = text.match(/^\[([x\s])]/);
|
|
672
|
+
if (m) {
|
|
673
|
+
children[0].children[0].text = text.replace(/^\[([x\s])]/, "");
|
|
674
|
+
return {
|
|
675
|
+
type: "list-item",
|
|
676
|
+
checked: m ? m[1] === "x" : void 0,
|
|
677
|
+
children,
|
|
678
|
+
mentions
|
|
679
|
+
};
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
return {
|
|
683
|
+
type: "list-item",
|
|
684
|
+
checked: currentElement.checked,
|
|
685
|
+
children,
|
|
686
|
+
mentions
|
|
687
|
+
};
|
|
688
|
+
};
|
|
689
|
+
var handleParagraph = (currentElement, config, plugins) => {
|
|
690
|
+
var _a, _b, _c, _d;
|
|
691
|
+
if (((_a = currentElement.children) == null ? void 0 : _a[0].type) === "html" && currentElement.children[0].value.startsWith("<a")) {
|
|
692
|
+
const text = currentElement.children.map((n) => n.value || "").join("");
|
|
693
|
+
const attach = findAttachment(text);
|
|
694
|
+
if (attach) {
|
|
695
|
+
const name = text.match(/>(.*)<\/a>/);
|
|
696
|
+
return {
|
|
697
|
+
type: "attach",
|
|
698
|
+
url: decodeURIComponentUrl(attach == null ? void 0 : attach.url),
|
|
699
|
+
size: attach.size,
|
|
700
|
+
children: [
|
|
701
|
+
{
|
|
702
|
+
type: "card-before",
|
|
703
|
+
children: [{ text: "" }]
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
type: "card-after",
|
|
707
|
+
children: [{ text: "" }]
|
|
708
|
+
}
|
|
709
|
+
],
|
|
710
|
+
name: name ? name[1] : attach == null ? void 0 : attach.url
|
|
711
|
+
};
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
if (((_c = (_b = currentElement == null ? void 0 : currentElement.children) == null ? void 0 : _b.at(0)) == null ? void 0 : _c.type) === "link" && config.type === "card") {
|
|
715
|
+
const link = (_d = currentElement == null ? void 0 : currentElement.children) == null ? void 0 : _d.at(0);
|
|
716
|
+
return __spreadProps(__spreadValues({}, config), {
|
|
717
|
+
type: "link-card",
|
|
718
|
+
url: decodeURIComponentUrl(link == null ? void 0 : link.url),
|
|
719
|
+
children: [
|
|
720
|
+
{
|
|
721
|
+
type: "card-before",
|
|
722
|
+
children: [{ text: "" }]
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
type: "card-after",
|
|
726
|
+
children: [{ text: "" }]
|
|
727
|
+
}
|
|
728
|
+
],
|
|
729
|
+
name: link.title
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
const elements = [];
|
|
733
|
+
let textNodes = [];
|
|
734
|
+
for (let currentChild of currentElement.children || []) {
|
|
735
|
+
if (currentChild.type === "image") {
|
|
736
|
+
if (textNodes.length) {
|
|
737
|
+
elements.push({
|
|
738
|
+
type: "paragraph",
|
|
739
|
+
children: parseWithPlugins(textNodes, plugins, false, currentElement)
|
|
740
|
+
});
|
|
741
|
+
textNodes = [];
|
|
742
|
+
}
|
|
743
|
+
elements.push(
|
|
744
|
+
EditorUtils.createMediaNode(
|
|
745
|
+
decodeURIComponentUrl(currentChild == null ? void 0 : currentChild.url),
|
|
746
|
+
"image",
|
|
747
|
+
{
|
|
748
|
+
alt: currentChild.alt
|
|
749
|
+
}
|
|
750
|
+
)
|
|
751
|
+
);
|
|
752
|
+
} else if (currentChild.type === "html") {
|
|
753
|
+
if (currentChild.value.match(/^<\/(img|video|iframe)>/)) {
|
|
754
|
+
continue;
|
|
755
|
+
}
|
|
756
|
+
const mediaElement = findImageElement(currentChild.value);
|
|
757
|
+
if (mediaElement) {
|
|
758
|
+
let mediaType = "image";
|
|
759
|
+
if (mediaElement.tagName === "video") {
|
|
760
|
+
mediaType = "video";
|
|
761
|
+
} else if (mediaElement.tagName === "iframe") {
|
|
762
|
+
mediaType = "iframe";
|
|
763
|
+
}
|
|
764
|
+
elements.push(
|
|
765
|
+
EditorUtils.createMediaNode(
|
|
766
|
+
decodeURIComponentUrl((mediaElement == null ? void 0 : mediaElement.url) || ""),
|
|
767
|
+
mediaType,
|
|
768
|
+
{
|
|
769
|
+
alt: mediaElement.alt,
|
|
770
|
+
height: mediaElement == null ? void 0 : mediaElement.height,
|
|
771
|
+
width: mediaElement == null ? void 0 : mediaElement.width,
|
|
772
|
+
controls: mediaElement == null ? void 0 : mediaElement.controls,
|
|
773
|
+
autoplay: mediaElement == null ? void 0 : mediaElement.autoplay,
|
|
774
|
+
loop: mediaElement == null ? void 0 : mediaElement.loop,
|
|
775
|
+
muted: mediaElement == null ? void 0 : mediaElement.muted,
|
|
776
|
+
poster: mediaElement == null ? void 0 : mediaElement.poster
|
|
777
|
+
}
|
|
778
|
+
)
|
|
779
|
+
);
|
|
780
|
+
} else {
|
|
781
|
+
textNodes.push({ type: "html", value: currentChild.value });
|
|
782
|
+
}
|
|
783
|
+
} else {
|
|
784
|
+
textNodes.push(currentChild);
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
if (textNodes.length) {
|
|
788
|
+
elements.push({
|
|
789
|
+
type: "paragraph",
|
|
790
|
+
children: parseWithPlugins(textNodes, plugins, false, currentElement)
|
|
791
|
+
});
|
|
792
|
+
}
|
|
793
|
+
return elements;
|
|
794
|
+
};
|
|
795
|
+
var handleInlineCode = (currentElement) => {
|
|
796
|
+
var _a, _b;
|
|
797
|
+
const hasPlaceHolder = (_a = currentElement.value) == null ? void 0 : _a.match(/\$\{(.*?)\}/);
|
|
798
|
+
const values = hasPlaceHolder ? hasPlaceHolder[1].split(";").map((item) => {
|
|
799
|
+
const values2 = item == null ? void 0 : item.split(":");
|
|
800
|
+
return {
|
|
801
|
+
[(values2 == null ? void 0 : values2.at(0)) || ""]: values2 == null ? void 0 : values2.at(1)
|
|
802
|
+
};
|
|
803
|
+
}).reduce((acc, item) => {
|
|
804
|
+
return __spreadValues(__spreadValues({}, acc), item);
|
|
805
|
+
}, {}) : void 0;
|
|
806
|
+
return {
|
|
807
|
+
text: values ? (values == null ? void 0 : values.initialValue) || " " : currentElement.value,
|
|
808
|
+
tag: (_b = currentElement.value) == null ? void 0 : _b.startsWith("${"),
|
|
809
|
+
placeholder: (values == null ? void 0 : values.placeholder) || void 0,
|
|
810
|
+
initialValue: (values == null ? void 0 : values.initialValue) || void 0,
|
|
811
|
+
code: true
|
|
812
|
+
};
|
|
813
|
+
};
|
|
814
|
+
var handleThematicBreak = () => {
|
|
815
|
+
return { type: "hr", children: [{ text: "" }] };
|
|
816
|
+
};
|
|
817
|
+
var handleCode = (currentElement) => {
|
|
818
|
+
var _a;
|
|
819
|
+
const baseCodeElement = {
|
|
820
|
+
type: "code",
|
|
821
|
+
language: currentElement.lang === "apaasify" ? "apaasify" : currentElement.lang,
|
|
822
|
+
render: currentElement.meta === "render",
|
|
823
|
+
value: currentElement.value,
|
|
824
|
+
isConfig: (_a = currentElement == null ? void 0 : currentElement.value.trim()) == null ? void 0 : _a.startsWith("<!--"),
|
|
825
|
+
children: [{ text: currentElement.value }]
|
|
826
|
+
};
|
|
827
|
+
const handler = LANGUAGE_HANDLERS[currentElement.lang];
|
|
828
|
+
return handler ? handler(baseCodeElement, currentElement.value) : baseCodeElement;
|
|
829
|
+
};
|
|
830
|
+
var handleYaml = (currentElement) => {
|
|
831
|
+
return {
|
|
832
|
+
type: "code",
|
|
833
|
+
language: "yaml",
|
|
834
|
+
value: currentElement.value,
|
|
835
|
+
frontmatter: true,
|
|
836
|
+
children: [{ text: currentElement.value }]
|
|
837
|
+
};
|
|
838
|
+
};
|
|
839
|
+
var handleBlockquote = (currentElement, plugins) => {
|
|
840
|
+
var _a;
|
|
841
|
+
return {
|
|
842
|
+
type: "blockquote",
|
|
843
|
+
children: ((_a = currentElement.children) == null ? void 0 : _a.length) ? parserBlock(currentElement.children, false, currentElement, plugins) : [{ type: "paragraph", children: [{ text: "" }] }]
|
|
844
|
+
};
|
|
845
|
+
};
|
|
846
|
+
var handleDefinition = (currentElement) => {
|
|
847
|
+
return {
|
|
848
|
+
type: "paragraph",
|
|
849
|
+
children: [
|
|
850
|
+
{
|
|
851
|
+
text: `[${currentElement.label}]: ` + (currentElement.url ? `${currentElement.url}` : "")
|
|
852
|
+
}
|
|
853
|
+
]
|
|
854
|
+
};
|
|
855
|
+
};
|
|
856
|
+
var handleTextAndInlineElements = (currentElement, htmlTag, plugins) => {
|
|
857
|
+
var _a, _b, _c;
|
|
858
|
+
if (currentElement.type === "text" && htmlTag.length) {
|
|
859
|
+
const el = { text: currentElement.value };
|
|
860
|
+
if (currentElement.value) {
|
|
861
|
+
applyHtmlTagsToElement(el, htmlTag);
|
|
862
|
+
}
|
|
863
|
+
return el;
|
|
864
|
+
}
|
|
865
|
+
if (["strong", "link", "text", "emphasis", "delete", "inlineCode"].includes(
|
|
866
|
+
currentElement.type
|
|
867
|
+
)) {
|
|
868
|
+
if (currentElement.type === "text") {
|
|
869
|
+
return { text: currentElement.value };
|
|
870
|
+
}
|
|
871
|
+
const leaf = {};
|
|
872
|
+
applyInlineFormatting(leaf, currentElement);
|
|
873
|
+
applyHtmlTagsToElement(leaf, htmlTag);
|
|
874
|
+
if ((_a = currentElement == null ? void 0 : currentElement.children) == null ? void 0 : _a.some((n) => n.type === "html")) {
|
|
875
|
+
return __spreadProps(__spreadValues({}, (_b = parserBlock(
|
|
876
|
+
currentElement == null ? void 0 : currentElement.children,
|
|
877
|
+
false,
|
|
878
|
+
currentElement,
|
|
879
|
+
plugins
|
|
880
|
+
)) == null ? void 0 : _b.at(0)), {
|
|
881
|
+
url: leaf.url
|
|
882
|
+
});
|
|
883
|
+
} else {
|
|
884
|
+
return parseText(
|
|
885
|
+
((_c = currentElement.children) == null ? void 0 : _c.length) ? currentElement.children : [{ value: (leaf == null ? void 0 : leaf.url) || "" }],
|
|
886
|
+
leaf
|
|
887
|
+
);
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
if (currentElement.type === "break") {
|
|
891
|
+
return { text: "\n" };
|
|
892
|
+
}
|
|
893
|
+
return { text: "" };
|
|
894
|
+
};
|
|
895
|
+
var applyInlineFormatting = (leaf, currentElement) => {
|
|
896
|
+
if (currentElement.type === "strong")
|
|
897
|
+
leaf.bold = true;
|
|
898
|
+
if (currentElement.type === "emphasis")
|
|
899
|
+
leaf.italic = true;
|
|
900
|
+
if (currentElement.type === "delete")
|
|
901
|
+
leaf.strikethrough = true;
|
|
902
|
+
if (currentElement.type === "link") {
|
|
903
|
+
try {
|
|
904
|
+
leaf.url = currentElement == null ? void 0 : currentElement.url;
|
|
905
|
+
} catch (error) {
|
|
906
|
+
leaf.url = currentElement == null ? void 0 : currentElement.url;
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
};
|
|
910
|
+
var applyHtmlTagsToElement = (el, htmlTag) => {
|
|
911
|
+
for (let t of htmlTag) {
|
|
912
|
+
if (t.tag === "font") {
|
|
913
|
+
el.color = t.color;
|
|
914
|
+
}
|
|
915
|
+
if (t.tag === "sup")
|
|
916
|
+
el.identifier = el.text;
|
|
917
|
+
if (t.tag === "sub")
|
|
918
|
+
el.identifier = el.text;
|
|
919
|
+
if (t.tag === "code")
|
|
920
|
+
el.code = true;
|
|
921
|
+
if (t.tag === "i")
|
|
922
|
+
el.italic = true;
|
|
923
|
+
if (t.tag === "b" || t.tag === "strong")
|
|
924
|
+
el.bold = true;
|
|
925
|
+
if (t.tag === "del")
|
|
926
|
+
el.strikethrough = true;
|
|
927
|
+
if ((t.tag === "span" || t.tag === "font") && t.color)
|
|
928
|
+
el.highColor = t.color;
|
|
929
|
+
if (t.tag === "a" && (t == null ? void 0 : t.url)) {
|
|
930
|
+
el.url = t == null ? void 0 : t.url;
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
};
|
|
934
|
+
var applyContextPropsAndConfig = (el, contextProps, config) => {
|
|
935
|
+
if (Array.isArray(el)) {
|
|
936
|
+
return el.map((item) => {
|
|
937
|
+
if (Object.keys(contextProps || {}).length) {
|
|
938
|
+
item.contextProps = contextProps;
|
|
939
|
+
}
|
|
940
|
+
if (Object.keys(config || {}).length && !item.otherProps) {
|
|
941
|
+
item.otherProps = config;
|
|
942
|
+
}
|
|
943
|
+
return item;
|
|
944
|
+
});
|
|
945
|
+
} else {
|
|
946
|
+
if (Object.keys(contextProps || {}).length) {
|
|
947
|
+
el.contextProps = contextProps;
|
|
948
|
+
}
|
|
949
|
+
if (Object.keys(config || {}).length && !el.otherProps) {
|
|
950
|
+
el.otherProps = config;
|
|
951
|
+
}
|
|
952
|
+
return el;
|
|
953
|
+
}
|
|
954
|
+
};
|
|
955
|
+
var addEmptyLinesIfNeeded = (els, preNode, currentElement, top) => {
|
|
956
|
+
var _a, _b;
|
|
957
|
+
if (preNode && top) {
|
|
958
|
+
const distance = (((_a = currentElement.position) == null ? void 0 : _a.start.line) || 0) - (((_b = preNode.position) == null ? void 0 : _b.end.line) || 0);
|
|
959
|
+
if (distance >= 4) {
|
|
960
|
+
const lines = Math.floor((distance - 2) / 2);
|
|
961
|
+
Array.from(new Array(lines)).forEach(() => {
|
|
962
|
+
els.push({ type: "paragraph", children: [{ text: "" }] });
|
|
963
|
+
});
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
};
|
|
967
|
+
var parserBlock = (nodes, top = false, parent = void 0, plugins) => {
|
|
968
|
+
if (!(nodes == null ? void 0 : nodes.length))
|
|
969
|
+
return [{ type: "paragraph", children: [{ text: "" }] }];
|
|
970
|
+
let els = [];
|
|
971
|
+
let el = null;
|
|
972
|
+
let preNode = null;
|
|
973
|
+
let preElement = null;
|
|
974
|
+
let htmlTag = [];
|
|
975
|
+
let contextProps = {};
|
|
976
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
977
|
+
const currentElement = nodes[i];
|
|
978
|
+
const config = (preElement == null ? void 0 : preElement.type) === "code" && (preElement == null ? void 0 : preElement.language) === "html" && (preElement == null ? void 0 : preElement.otherProps) ? preElement == null ? void 0 : preElement.otherProps : {};
|
|
979
|
+
switch (currentElement.type) {
|
|
980
|
+
case "heading":
|
|
981
|
+
el = handleHeading(currentElement, plugins || []);
|
|
982
|
+
break;
|
|
983
|
+
case "html":
|
|
984
|
+
const htmlResult = handleHtml(currentElement, parent, htmlTag);
|
|
985
|
+
el = htmlResult.el;
|
|
986
|
+
if (htmlResult.contextProps) {
|
|
987
|
+
contextProps = __spreadValues(__spreadValues({}, contextProps), htmlResult.contextProps);
|
|
988
|
+
}
|
|
989
|
+
break;
|
|
990
|
+
case "image":
|
|
991
|
+
el = handleImage(currentElement);
|
|
992
|
+
break;
|
|
993
|
+
case "inlineMath":
|
|
994
|
+
el = handleInlineMath(currentElement);
|
|
995
|
+
break;
|
|
996
|
+
case "math":
|
|
997
|
+
el = handleMath(currentElement);
|
|
998
|
+
break;
|
|
999
|
+
case "list":
|
|
1000
|
+
el = handleList(currentElement, plugins || []);
|
|
1001
|
+
break;
|
|
1002
|
+
case "footnoteReference":
|
|
1003
|
+
el = handleFootnoteReference(currentElement);
|
|
1004
|
+
break;
|
|
1005
|
+
case "footnoteDefinition":
|
|
1006
|
+
el = handleFootnoteDefinition(currentElement, plugins || []);
|
|
1007
|
+
break;
|
|
1008
|
+
case "listItem":
|
|
1009
|
+
el = handleListItem(currentElement, plugins || []);
|
|
1010
|
+
break;
|
|
1011
|
+
case "paragraph":
|
|
1012
|
+
el = handleParagraph(currentElement, config, plugins || []);
|
|
1013
|
+
break;
|
|
1014
|
+
case "inlineCode":
|
|
1015
|
+
el = handleInlineCode(currentElement);
|
|
1016
|
+
break;
|
|
1017
|
+
case "thematicBreak":
|
|
1018
|
+
el = handleThematicBreak();
|
|
1019
|
+
break;
|
|
1020
|
+
case "code":
|
|
1021
|
+
el = handleCode(currentElement);
|
|
1022
|
+
break;
|
|
1023
|
+
case "yaml":
|
|
1024
|
+
el = handleYaml(currentElement);
|
|
1025
|
+
break;
|
|
1026
|
+
case "blockquote":
|
|
1027
|
+
el = handleBlockquote(currentElement, plugins || []);
|
|
1028
|
+
break;
|
|
1029
|
+
case "table":
|
|
1030
|
+
el = parseTableOrChart(currentElement, preElement, plugins || []);
|
|
1031
|
+
break;
|
|
1032
|
+
case "definition":
|
|
1033
|
+
el = handleDefinition(currentElement);
|
|
1034
|
+
break;
|
|
1035
|
+
default:
|
|
1036
|
+
el = handleTextAndInlineElements(
|
|
1037
|
+
currentElement,
|
|
1038
|
+
htmlTag,
|
|
1039
|
+
plugins || []
|
|
1040
|
+
);
|
|
1041
|
+
}
|
|
1042
|
+
addEmptyLinesIfNeeded(els, preNode, currentElement, top);
|
|
1043
|
+
if (el) {
|
|
1044
|
+
el = applyContextPropsAndConfig(el, contextProps, config);
|
|
1045
|
+
Array.isArray(el) ? els.push(...el) : els.push(el);
|
|
1046
|
+
}
|
|
1047
|
+
preNode = currentElement;
|
|
1048
|
+
preElement = el;
|
|
1049
|
+
el = null;
|
|
1050
|
+
}
|
|
1051
|
+
return els;
|
|
1052
|
+
};
|
|
1053
|
+
var parseWithPlugins = (nodes, plugins, top = false, parent) => {
|
|
1054
|
+
var _a;
|
|
1055
|
+
if (!(nodes == null ? void 0 : nodes.length))
|
|
1056
|
+
return [{ type: "paragraph", children: [{ text: "" }] }];
|
|
1057
|
+
let els = [];
|
|
1058
|
+
let preNode = null;
|
|
1059
|
+
let preElement = null;
|
|
1060
|
+
let htmlTag = [];
|
|
1061
|
+
let contextProps = {};
|
|
1062
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
1063
|
+
const currentElement = nodes[i];
|
|
1064
|
+
let el = null;
|
|
1065
|
+
let pluginHandled = false;
|
|
1066
|
+
for (const plugin of plugins) {
|
|
1067
|
+
const rule = (_a = plugin.parseMarkdown) == null ? void 0 : _a.find((r) => r.match(currentElement));
|
|
1068
|
+
if (rule) {
|
|
1069
|
+
const converted = rule.convert(currentElement);
|
|
1070
|
+
if (Array.isArray(converted) && converted.length === 2) {
|
|
1071
|
+
el = converted[0];
|
|
1072
|
+
} else {
|
|
1073
|
+
el = converted;
|
|
1074
|
+
}
|
|
1075
|
+
pluginHandled = true;
|
|
1076
|
+
break;
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
if (!pluginHandled) {
|
|
1080
|
+
const config = (preElement == null ? void 0 : preElement.type) === "code" && (preElement == null ? void 0 : preElement.language) === "html" && (preElement == null ? void 0 : preElement.otherProps) ? preElement == null ? void 0 : preElement.otherProps : {};
|
|
1081
|
+
switch (currentElement.type) {
|
|
1082
|
+
case "heading":
|
|
1083
|
+
el = handleHeading(currentElement, plugins || []);
|
|
1084
|
+
break;
|
|
1085
|
+
case "html":
|
|
1086
|
+
const htmlResult = handleHtml(currentElement, parent, htmlTag);
|
|
1087
|
+
el = htmlResult.el;
|
|
1088
|
+
if (htmlResult.contextProps) {
|
|
1089
|
+
contextProps = __spreadValues(__spreadValues({}, contextProps), htmlResult.contextProps);
|
|
1090
|
+
}
|
|
1091
|
+
break;
|
|
1092
|
+
case "image":
|
|
1093
|
+
el = handleImage(currentElement);
|
|
1094
|
+
break;
|
|
1095
|
+
case "inlineMath":
|
|
1096
|
+
el = handleInlineMath(currentElement);
|
|
1097
|
+
break;
|
|
1098
|
+
case "math":
|
|
1099
|
+
el = handleMath(currentElement);
|
|
1100
|
+
break;
|
|
1101
|
+
case "list":
|
|
1102
|
+
el = handleList(currentElement, plugins || []);
|
|
1103
|
+
break;
|
|
1104
|
+
case "footnoteReference":
|
|
1105
|
+
el = handleFootnoteReference(currentElement);
|
|
1106
|
+
break;
|
|
1107
|
+
case "footnoteDefinition":
|
|
1108
|
+
el = handleFootnoteDefinition(currentElement, plugins || []);
|
|
1109
|
+
break;
|
|
1110
|
+
case "listItem":
|
|
1111
|
+
el = handleListItem(currentElement, plugins || []);
|
|
1112
|
+
break;
|
|
1113
|
+
case "paragraph":
|
|
1114
|
+
el = handleParagraph(currentElement, config, plugins);
|
|
1115
|
+
break;
|
|
1116
|
+
case "inlineCode":
|
|
1117
|
+
el = handleInlineCode(currentElement);
|
|
1118
|
+
break;
|
|
1119
|
+
case "thematicBreak":
|
|
1120
|
+
el = handleThematicBreak();
|
|
1121
|
+
break;
|
|
1122
|
+
case "code":
|
|
1123
|
+
el = handleCode(currentElement);
|
|
1124
|
+
break;
|
|
1125
|
+
case "yaml":
|
|
1126
|
+
el = handleYaml(currentElement);
|
|
1127
|
+
break;
|
|
1128
|
+
case "blockquote":
|
|
1129
|
+
el = handleBlockquote(currentElement, plugins || []);
|
|
1130
|
+
break;
|
|
1131
|
+
case "table":
|
|
1132
|
+
el = parseTableOrChart(currentElement, preElement, plugins || []);
|
|
1133
|
+
break;
|
|
1134
|
+
case "definition":
|
|
1135
|
+
el = handleDefinition(currentElement);
|
|
1136
|
+
break;
|
|
1137
|
+
default:
|
|
1138
|
+
el = handleTextAndInlineElements(
|
|
1139
|
+
currentElement,
|
|
1140
|
+
htmlTag,
|
|
1141
|
+
plugins || []
|
|
1142
|
+
);
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
addEmptyLinesIfNeeded(els, preNode, currentElement, top);
|
|
1146
|
+
if (el) {
|
|
1147
|
+
el = applyContextPropsAndConfig(el, contextProps, {});
|
|
1148
|
+
Array.isArray(el) ? els.push(...el) : els.push(el);
|
|
1149
|
+
}
|
|
1150
|
+
preNode = currentElement;
|
|
1151
|
+
preElement = el;
|
|
1152
|
+
}
|
|
1153
|
+
return els;
|
|
1154
|
+
};
|
|
1155
|
+
var tableRegex = /^\|.*\|\s*\n\|[-:| ]+\|/m;
|
|
1156
|
+
var STANDARD_HTML_ELEMENTS = /* @__PURE__ */ new Set([
|
|
1157
|
+
// 文档结构
|
|
1158
|
+
"html",
|
|
1159
|
+
"head",
|
|
1160
|
+
"body",
|
|
1161
|
+
"title",
|
|
1162
|
+
"meta",
|
|
1163
|
+
"link",
|
|
1164
|
+
"style",
|
|
1165
|
+
"script",
|
|
1166
|
+
// 内容分区
|
|
1167
|
+
"header",
|
|
1168
|
+
"nav",
|
|
1169
|
+
"main",
|
|
1170
|
+
"section",
|
|
1171
|
+
"article",
|
|
1172
|
+
"aside",
|
|
1173
|
+
"footer",
|
|
1174
|
+
"h1",
|
|
1175
|
+
"h2",
|
|
1176
|
+
"h3",
|
|
1177
|
+
"h4",
|
|
1178
|
+
"h5",
|
|
1179
|
+
"h6",
|
|
1180
|
+
// 文本内容
|
|
1181
|
+
"div",
|
|
1182
|
+
"p",
|
|
1183
|
+
"hr",
|
|
1184
|
+
"pre",
|
|
1185
|
+
"blockquote",
|
|
1186
|
+
// 列表
|
|
1187
|
+
"ul",
|
|
1188
|
+
"ol",
|
|
1189
|
+
"li",
|
|
1190
|
+
"dl",
|
|
1191
|
+
"dt",
|
|
1192
|
+
"dd",
|
|
1193
|
+
// 表格
|
|
1194
|
+
"table",
|
|
1195
|
+
"thead",
|
|
1196
|
+
"tbody",
|
|
1197
|
+
"tfoot",
|
|
1198
|
+
"tr",
|
|
1199
|
+
"th",
|
|
1200
|
+
"td",
|
|
1201
|
+
"caption",
|
|
1202
|
+
"colgroup",
|
|
1203
|
+
"col",
|
|
1204
|
+
// 表单
|
|
1205
|
+
"form",
|
|
1206
|
+
"input",
|
|
1207
|
+
"textarea",
|
|
1208
|
+
"button",
|
|
1209
|
+
"select",
|
|
1210
|
+
"option",
|
|
1211
|
+
"label",
|
|
1212
|
+
"fieldset",
|
|
1213
|
+
"legend",
|
|
1214
|
+
// 内联文本语义
|
|
1215
|
+
"a",
|
|
1216
|
+
"em",
|
|
1217
|
+
"strong",
|
|
1218
|
+
"small",
|
|
1219
|
+
"mark",
|
|
1220
|
+
"del",
|
|
1221
|
+
"ins",
|
|
1222
|
+
"sub",
|
|
1223
|
+
"sup",
|
|
1224
|
+
"i",
|
|
1225
|
+
"b",
|
|
1226
|
+
"u",
|
|
1227
|
+
"s",
|
|
1228
|
+
"code",
|
|
1229
|
+
"kbd",
|
|
1230
|
+
"samp",
|
|
1231
|
+
"var",
|
|
1232
|
+
"span",
|
|
1233
|
+
"br",
|
|
1234
|
+
"wbr",
|
|
1235
|
+
// 图片和多媒体
|
|
1236
|
+
"img",
|
|
1237
|
+
"video",
|
|
1238
|
+
"audio",
|
|
1239
|
+
"source",
|
|
1240
|
+
"track",
|
|
1241
|
+
"iframe",
|
|
1242
|
+
"embed",
|
|
1243
|
+
"object",
|
|
1244
|
+
"param",
|
|
1245
|
+
"picture",
|
|
1246
|
+
// 其他
|
|
1247
|
+
"canvas",
|
|
1248
|
+
"svg",
|
|
1249
|
+
"math",
|
|
1250
|
+
"details",
|
|
1251
|
+
"summary",
|
|
1252
|
+
"dialog",
|
|
1253
|
+
"menu",
|
|
1254
|
+
"menuitem",
|
|
1255
|
+
// 字体
|
|
1256
|
+
"font"
|
|
1257
|
+
]);
|
|
1258
|
+
function isStandardHtmlElement(htmlString) {
|
|
1259
|
+
const tagMatch = htmlString.match(/<\/?(\w+)/);
|
|
1260
|
+
if (!tagMatch)
|
|
1261
|
+
return false;
|
|
1262
|
+
const tagName = tagMatch[1].toLowerCase();
|
|
1263
|
+
return STANDARD_HTML_ELEMENTS.has(tagName);
|
|
1264
|
+
}
|
|
1265
|
+
function preprocessSpecialTags(markdown, tagName) {
|
|
1266
|
+
const tagRegex = new RegExp(`<${tagName}>([\\s\\S]*?)<\\/${tagName}>`, "g");
|
|
1267
|
+
return markdown.replace(tagRegex, (match, content) => {
|
|
1268
|
+
const trimmedContent = content.trim();
|
|
1269
|
+
const processedContent = trimmedContent.replace(
|
|
1270
|
+
/```(\w*)\n?([\s\S]*?)```/g,
|
|
1271
|
+
(_, lang, code) => {
|
|
1272
|
+
const marker = "";
|
|
1273
|
+
return `${marker}【CODE_BLOCK:${lang || ""}】
|
|
1274
|
+
${code}
|
|
1275
|
+
【/CODE_BLOCK】${marker}`;
|
|
1276
|
+
}
|
|
1277
|
+
);
|
|
1278
|
+
return `\`\`\`${tagName}
|
|
1279
|
+
${processedContent}
|
|
1280
|
+
\`\`\``;
|
|
1281
|
+
});
|
|
1282
|
+
}
|
|
1283
|
+
function preprocessThinkTags(markdown) {
|
|
1284
|
+
return preprocessSpecialTags(markdown, "think");
|
|
1285
|
+
}
|
|
1286
|
+
function preprocessNonStandardHtmlTags(markdown) {
|
|
1287
|
+
let result = markdown;
|
|
1288
|
+
let hasNonStandardTags = true;
|
|
1289
|
+
while (hasNonStandardTags) {
|
|
1290
|
+
const before = result;
|
|
1291
|
+
result = result.replace(
|
|
1292
|
+
/<(\w+)>([\s\S]*?)<\/\1>/g,
|
|
1293
|
+
(match, tagName, content) => {
|
|
1294
|
+
if (STANDARD_HTML_ELEMENTS.has(tagName.toLowerCase())) {
|
|
1295
|
+
return match;
|
|
1296
|
+
}
|
|
1297
|
+
return content;
|
|
1298
|
+
}
|
|
1299
|
+
);
|
|
1300
|
+
hasNonStandardTags = before !== result;
|
|
1301
|
+
}
|
|
1302
|
+
return result;
|
|
1303
|
+
}
|
|
1304
|
+
function preprocessMarkdownTableNewlines(markdown) {
|
|
1305
|
+
if (!tableRegex.test(markdown))
|
|
1306
|
+
return markdown;
|
|
1307
|
+
let processedMarkdown = markdown.replace(
|
|
1308
|
+
/(\|[^|\n]*\|)\n(?!\n|\|)/g,
|
|
1309
|
+
// 匹配表格行后面跟着单个换行符(不是两个),但下一行不是表格行
|
|
1310
|
+
"$1\n\n"
|
|
1311
|
+
// 替换为两个换行符
|
|
1312
|
+
).replace(
|
|
1313
|
+
/(\|[^|\n]*\|)\n{3,}(?!\|)/g,
|
|
1314
|
+
// 匹配表格行后面跟着3个或更多换行符,但下一行不是表格行
|
|
1315
|
+
"$1\n\n"
|
|
1316
|
+
// 替换为两个换行符
|
|
1317
|
+
);
|
|
1318
|
+
return processedMarkdown == null ? void 0 : processedMarkdown.split("\n\n").map((line) => {
|
|
1319
|
+
if (line.includes("```"))
|
|
1320
|
+
return line;
|
|
1321
|
+
if (!tableRegex.test(line))
|
|
1322
|
+
return line;
|
|
1323
|
+
return line.replace(/\|([^|]+)\|/g, (match) => {
|
|
1324
|
+
var _a;
|
|
1325
|
+
if (((_a = match.replaceAll("\n", "")) == null ? void 0 : _a.length) < 5)
|
|
1326
|
+
return match;
|
|
1327
|
+
return match.split("\n").join("<br>");
|
|
1328
|
+
});
|
|
1329
|
+
}).join("\n\n");
|
|
1330
|
+
}
|
|
1331
|
+
var parserMarkdownToSlateNode = (md, plugins) => {
|
|
1332
|
+
var _a;
|
|
1333
|
+
const thinkProcessed = preprocessThinkTags(md || "");
|
|
1334
|
+
const nonStandardProcessed = preprocessNonStandardHtmlTags(thinkProcessed);
|
|
1335
|
+
const processedMarkdown = mdastParser.parse(
|
|
1336
|
+
preprocessMarkdownTableNewlines(nonStandardProcessed)
|
|
1337
|
+
);
|
|
1338
|
+
const markdownRoot = processedMarkdown.children;
|
|
1339
|
+
const schema = ((_a = plugins || []) == null ? void 0 : _a.length) > 0 ? parseWithPlugins(markdownRoot, plugins || [], true) : parserBlock(markdownRoot, true, void 0, []);
|
|
1340
|
+
return {
|
|
1341
|
+
schema: schema == null ? void 0 : schema.filter((item) => {
|
|
1342
|
+
var _a2;
|
|
1343
|
+
if (item.type === "paragraph" && ((_a2 = item.children) == null ? void 0 : _a2.length) === 1) {
|
|
1344
|
+
if (item.children[0].text === "\n") {
|
|
1345
|
+
return false;
|
|
1346
|
+
}
|
|
1347
|
+
return true;
|
|
1348
|
+
}
|
|
1349
|
+
return true;
|
|
1350
|
+
}),
|
|
1351
|
+
links: []
|
|
1352
|
+
};
|
|
1353
|
+
};
|
|
1354
|
+
export {
|
|
1355
|
+
decodeURIComponentUrl,
|
|
1356
|
+
parserMarkdownToSlateNode
|
|
1357
|
+
};
|