@ant-design/agentic-ui 2.29.19 → 2.29.21
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/dist/AILabel/index.js +2 -2
- package/dist/AILabel/style.js +1 -1
- package/dist/AgentRunBar/Robot.js +1 -1
- package/dist/AgentRunBar/index.js +2 -2
- package/dist/AgentRunBar/style.js +1 -1
- package/dist/AgenticLayout/index.js +2 -2
- package/dist/AgenticLayout/style.js +2 -2
- package/dist/AnswerAlert/components/ErrorIcon.js +1 -1
- package/dist/AnswerAlert/components/InfoIcon.js +1 -1
- package/dist/AnswerAlert/components/SuccessIcon.js +1 -1
- package/dist/AnswerAlert/components/WarningIcon.js +1 -1
- package/dist/AnswerAlert/index.js +1 -1
- package/dist/AnswerAlert/style.js +1 -1
- package/dist/BackTo/BackTop.js +1 -1
- package/dist/BackTo/ScrollVisibleButton.js +4 -4
- package/dist/BackTo/hooks/useScrollVisible.js +1 -1
- package/dist/BackTo/icons/BottomIcon.js +1 -1
- package/dist/BackTo/icons/TopIcon.js +1 -1
- package/dist/BackTo/style.js +1 -1
- package/dist/Bubble/AIBubble.js +5 -5
- package/dist/Bubble/Avatar/index.js +1 -1
- package/dist/Bubble/Avatar/isEmoji.js +1 -1
- package/dist/Bubble/Bubble.js +1 -1
- package/dist/Bubble/BubbleBeforeNode.js +3 -3
- package/dist/Bubble/FileView.js +6 -6
- package/dist/Bubble/List/PureBubbleList.js +3 -3
- package/dist/Bubble/List/index.js +3 -3
- package/dist/Bubble/List/style.js +1 -1
- package/dist/Bubble/MessagesContent/BubbleContext.js +2 -2
- package/dist/Bubble/MessagesContent/BubbleExtra.js +9 -11
- package/dist/Bubble/MessagesContent/CopyButton/index.js +2 -2
- package/dist/Bubble/MessagesContent/DocInfo.js +7 -7
- package/dist/Bubble/MessagesContent/EXCEPTION.js +1 -1
- package/dist/Bubble/MessagesContent/MarkdownPreview.js +1 -1
- package/dist/Bubble/MessagesContent/VoiceButton/index.js +8 -8
- package/dist/Bubble/MessagesContent/VoiceButton/style.js +1 -1
- package/dist/Bubble/MessagesContent/docInfoStyle.js +1 -1
- package/dist/Bubble/MessagesContent/icons.js +2 -2
- package/dist/Bubble/MessagesContent/index.js +10 -10
- package/dist/Bubble/MessagesContent/style.js +15 -8
- package/dist/Bubble/PureBubble.js +1 -1
- package/dist/Bubble/Title.js +4 -4
- package/dist/Bubble/UserBubble.js +4 -4
- package/dist/Bubble/schema-editor/SchemaEditorBridgeManager.js +3 -3
- package/dist/Bubble/schema-editor/useSchemaEditorBridge.js +1 -1
- package/dist/Bubble/style.js +1 -1
- package/dist/ChatBootPage/ButtonTab.js +1 -1
- package/dist/ChatBootPage/ButtonTabGroup.js +2 -2
- package/dist/ChatBootPage/ButtonTabGroupStyle.js +2 -2
- package/dist/ChatBootPage/ButtonTabStyle.js +2 -2
- package/dist/ChatBootPage/CaseReply.js +2 -2
- package/dist/ChatBootPage/CaseReplyStyle.js +2 -2
- package/dist/ChatBootPage/Title.js +1 -1
- package/dist/ChatBootPage/style.js +2 -2
- package/dist/ChatLayout/components/FooterBackground/index.js +1 -1
- package/dist/ChatLayout/index.js +1 -1
- package/dist/ChatLayout/style.js +1 -1
- package/dist/Components/ActionIconBox/index.js +12 -12
- package/dist/Components/ActionIconBox/style.js +1 -1
- package/dist/Components/ActionItemBox/ActionItemBox.js +1 -1
- package/dist/Components/ActionItemBox/style.js +1 -1
- package/dist/Components/Button/IconButton/index.js +1 -1
- package/dist/Components/Button/IconButton/style.js +1 -1
- package/dist/Components/Button/SwitchButton/index.js +3 -3
- package/dist/Components/Button/SwitchButton/style.js +1 -1
- package/dist/Components/Button/ToggleButton/index.js +1 -1
- package/dist/Components/Button/ToggleButton/style.js +1 -1
- package/dist/Components/GradientText/style.js +2 -2
- package/dist/Components/ImageList.js +2 -2
- package/dist/Components/LayoutHeader/index.js +4 -4
- package/dist/Components/LayoutHeader/style.js +2 -2
- package/dist/Components/Loading/CreativeRecommendationLoading.js +1 -1
- package/dist/Components/Loading/CreativeSparkLoading.js +1 -1
- package/dist/Components/Loading/Loading.js +1 -1
- package/dist/Components/Loading/style.js +1 -1
- package/dist/Components/Robot/index.js +1 -1
- package/dist/Components/Robot/lotties/BlowingWindLottie/index.js +1 -1
- package/dist/Components/Robot/lotties/BouncingLottie/index.js +1 -1
- package/dist/Components/Robot/lotties/DazingLottie/index.js +1 -1
- package/dist/Components/Robot/lotties/PeekLottie/index.js +1 -1
- package/dist/Components/Robot/lotties/ThinkingLottie/index.js +1 -1
- package/dist/Components/SuggestionList/index.js +4 -4
- package/dist/Components/SuggestionList/style.js +1 -1
- package/dist/Components/TextAnimate/index.js +2 -2
- package/dist/Components/TextAnimate/style.js +2 -2
- package/dist/Components/TypingAnimation/index.js +1 -1
- package/dist/Components/TypingAnimation/style.js +2 -2
- package/dist/Components/VisualList/index.js +3 -3
- package/dist/Components/VisualList/style.js +1 -1
- package/dist/Components/effects/CreativeRecommendationEffect/index.js +1 -1
- package/dist/Components/effects/LoadingEffect/index.js +1 -1
- package/dist/Components/icons/LoadingSpinnerIcon.js +1 -1
- package/dist/Components/lotties/CreativeSparkLottie/index.js +1 -1
- package/dist/Components/lotties/DazingLottie/index.js +1 -1
- package/dist/Components/lotties/LoadingLottie/index.js +1 -1
- package/dist/Components/lotties/TextLoading/index.js +1 -1
- package/dist/Components/lotties/TextLoading/style.js +1 -1
- package/dist/Components/lotties/ThinkingLottie/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Abstract/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Abstract/style.js +1 -1
- package/dist/Components/lotties/bubble-actions/Copy/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Dislike/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Like/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/More/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Play/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Quote/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Refresh/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Share/index.js +1 -1
- package/dist/History/components/HistoryActionsBox.js +9 -9
- package/dist/History/components/HistoryEmpty.js +1 -1
- package/dist/History/components/HistoryEmptyIcon.js +1 -1
- package/dist/History/components/HistoryItem.js +4 -4
- package/dist/History/components/HistoryList.js +2 -2
- package/dist/History/components/LoadMoreComponent.js +2 -2
- package/dist/History/components/NewChatComponent.js +1 -1
- package/dist/History/components/NewChatComponent.style.js +2 -2
- package/dist/History/components/SearchComponent.js +6 -6
- package/dist/History/hooks/useHistory.js +1 -1
- package/dist/History/index.js +3 -3
- package/dist/History/menu.js +2 -2
- package/dist/History/style.js +1 -1
- package/dist/History/utils/index.js +2 -2
- package/dist/Hooks/useAutoScroll.js +3 -3
- package/dist/Hooks/useClickAway.js +2 -2
- package/dist/Hooks/useCopied.js +1 -1
- package/dist/Hooks/useElementSize.js +1 -1
- package/dist/Hooks/useIntersectionOnce.js +1 -1
- package/dist/Hooks/useRefFunction/index.js +1 -1
- package/dist/Hooks/useSpeechSynthesis.js +1 -1
- package/dist/Hooks/useStyle/index.js +2 -2
- package/dist/I18n/index.js +1 -1
- package/dist/Icons/animated/VoicePlayLottie/index.js +1 -1
- package/dist/Icons/animated/VoicingLottie/index.js +1 -1
- package/dist/MarkdownEditor/BaseMarkdownEditor.js +7 -7
- package/dist/MarkdownEditor/editor/Editor.js +18 -18
- package/dist/MarkdownEditor/editor/components/CommentList/index.js +6 -6
- package/dist/MarkdownEditor/editor/components/CommentList/style.js +1 -1
- package/dist/MarkdownEditor/editor/components/ContributorAvatar/index.js +2 -2
- package/dist/MarkdownEditor/editor/components/ContributorAvatar/style.js +1 -1
- package/dist/MarkdownEditor/editor/components/LazyElement/index.js +1 -1
- package/dist/MarkdownEditor/editor/components/LazyElement/style.js +2 -2
- package/dist/MarkdownEditor/editor/components/MediaErrorLink.js +2 -2
- package/dist/MarkdownEditor/editor/components/fntTag/index.js +1 -1
- package/dist/MarkdownEditor/editor/components/fntTag/style.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Blockquote/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Break/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Card/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Code/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Comment/index.js +3 -3
- package/dist/MarkdownEditor/editor/elements/CommentLeaf/index.js +2 -2
- package/dist/MarkdownEditor/editor/elements/FncLeaf/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/FootnoteDefinition/index.js +2 -2
- package/dist/MarkdownEditor/editor/elements/FootnoteReference/index.js +2 -2
- package/dist/MarkdownEditor/editor/elements/Head/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Hr/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Image/index.js +17 -17
- package/dist/MarkdownEditor/editor/elements/InlineKatex/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Katex/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/LinkCard/ReadonlyLinkCard.js +2 -2
- package/dist/MarkdownEditor/editor/elements/LinkCard/index.js +4 -4
- package/dist/MarkdownEditor/editor/elements/List/List.js +2 -2
- package/dist/MarkdownEditor/editor/elements/List/ListItem.js +9 -9
- package/dist/MarkdownEditor/editor/elements/Media/ReadonlyMedia.js +2 -2
- package/dist/MarkdownEditor/editor/elements/Media/index.js +15 -15
- package/dist/MarkdownEditor/editor/elements/Mermaid/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Paragraph/index.js +2 -2
- package/dist/MarkdownEditor/editor/elements/Schema/index.js +4 -4
- package/dist/MarkdownEditor/editor/elements/Table/ReadonlyTableComponent.js +5 -5
- package/dist/MarkdownEditor/editor/elements/Table/SimpleTable.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/Table.js +5 -5
- package/dist/MarkdownEditor/editor/elements/Table/TableCellIndex/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/TableCellIndexSpacer/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/TableContext.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/TableRowIndex/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/Td/index.js +2 -2
- package/dist/MarkdownEditor/editor/elements/Table/index.js +5 -5
- package/dist/MarkdownEditor/editor/elements/Table/useScrollShadow.js +2 -2
- package/dist/MarkdownEditor/editor/elements/TagPopup/index.js +18 -18
- package/dist/MarkdownEditor/editor/elements/index.js +9 -9
- package/dist/MarkdownEditor/editor/parser/parse/applyContextPropsAndConfig.js +2 -2
- package/dist/MarkdownEditor/editor/parser/parse/parseBlockElements.js +9 -9
- package/dist/MarkdownEditor/editor/parser/parse/parseCode.js +5 -5
- package/dist/MarkdownEditor/editor/parser/parse/parseElements.js +3 -3
- package/dist/MarkdownEditor/editor/parser/parse/parseEmptyLines.js +1 -1
- package/dist/MarkdownEditor/editor/parser/parse/parseFootnote.js +1 -1
- package/dist/MarkdownEditor/editor/parser/parse/parseHtml.js +18 -18
- package/dist/MarkdownEditor/editor/parser/parse/parseMath.js +3 -3
- package/dist/MarkdownEditor/editor/parser/parse/parseMedia.js +3 -3
- package/dist/MarkdownEditor/editor/parser/parse/parseTable.js +10 -10
- package/dist/MarkdownEditor/editor/parser/parse/parseText.js +5 -5
- package/dist/MarkdownEditor/editor/parser/parserMarkdownToSlateNode.js +24 -24
- package/dist/MarkdownEditor/editor/parser/parserMdToSchema.js +2 -2
- package/dist/MarkdownEditor/editor/parser/parserSlateNodeToMarkdown.js +41 -41
- package/dist/MarkdownEditor/editor/plugins/catchError.js +2 -2
- package/dist/MarkdownEditor/editor/plugins/elements.js +21 -21
- package/dist/MarkdownEditor/editor/plugins/handlePaste.js +9 -9
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/arrow.js +4 -4
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/backspace.js +1 -1
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/enter.js +1 -1
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/match.js +1 -1
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/tab.js +4 -4
- package/dist/MarkdownEditor/editor/plugins/insertParsedHtmlNodes.js +44 -44
- package/dist/MarkdownEditor/editor/plugins/parseMarkdownToNodesAndInsert.js +1 -1
- package/dist/MarkdownEditor/editor/plugins/useHighlight.js +5 -5
- package/dist/MarkdownEditor/editor/plugins/useKeyboard.js +5 -5
- package/dist/MarkdownEditor/editor/plugins/useOnchange.js +1 -1
- package/dist/MarkdownEditor/editor/plugins/utils.js +2 -2
- package/dist/MarkdownEditor/editor/plugins/withCardPlugin.js +2 -2
- package/dist/MarkdownEditor/editor/plugins/withCodeTagPlugin.js +2 -2
- package/dist/MarkdownEditor/editor/plugins/withInlineNodes.js +1 -1
- package/dist/MarkdownEditor/editor/plugins/withLinkAndMediaPlugin.js +2 -2
- package/dist/MarkdownEditor/editor/plugins/withListsPlugin.js +3 -3
- package/dist/MarkdownEditor/editor/plugins/withMarkdown.js +1 -1
- package/dist/MarkdownEditor/editor/plugins/withSchemaPlugin.js +2 -2
- package/dist/MarkdownEditor/editor/plugins/withVoidNodes.js +1 -1
- package/dist/MarkdownEditor/editor/store.js +6 -6
- package/dist/MarkdownEditor/editor/style.js +2 -2
- package/dist/MarkdownEditor/editor/tools/DragHandle.js +2 -2
- package/dist/MarkdownEditor/editor/tools/InsertAutocomplete.js +22 -22
- package/dist/MarkdownEditor/editor/tools/InsertLink.js +7 -7
- package/dist/MarkdownEditor/editor/tools/Leading.js +8 -8
- package/dist/MarkdownEditor/editor/tools/ToolBar/BaseBar.js +6 -6
- package/dist/MarkdownEditor/editor/tools/ToolBar/FloatBar.js +5 -5
- package/dist/MarkdownEditor/editor/tools/ToolBar/ReadonlyBaseBar.js +7 -7
- package/dist/MarkdownEditor/editor/tools/ToolBar/ToolBar.js +2 -2
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/ColorPickerButton.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/FormattingTools.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/HeadingDropdown.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/config/toolsConfig.js +9 -9
- package/dist/MarkdownEditor/editor/tools/ToolBar/floatBarStyle.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/hooks/useToolBarLogic.js +4 -4
- package/dist/MarkdownEditor/editor/tools/ToolBar/toolBarStyle.js +1 -1
- package/dist/MarkdownEditor/editor/tools/insertAutocompleteStyle.js +1 -1
- package/dist/MarkdownEditor/editor/utils/ace.js +3 -3
- package/dist/MarkdownEditor/editor/utils/docx/docxDeserializer.js +2 -2
- package/dist/MarkdownEditor/editor/utils/docx/module.js +9 -9
- package/dist/MarkdownEditor/editor/utils/docx/utils.js +5 -5
- package/dist/MarkdownEditor/editor/utils/dom.js +5 -5
- package/dist/MarkdownEditor/editor/utils/editorCommands.js +5 -5
- package/dist/MarkdownEditor/editor/utils/editorUtils.js +17 -17
- package/dist/MarkdownEditor/editor/utils/index.js +9 -9
- package/dist/MarkdownEditor/editor/utils/keyboard.js +4 -4
- package/dist/MarkdownEditor/editor/utils/markdownToHtml.js +6 -6
- package/dist/MarkdownEditor/editor/utils/media.js +2 -2
- package/dist/MarkdownEditor/editor/utils/path.js +3 -3
- package/dist/MarkdownEditor/editor/utils/performanceMonitor.js +2 -2
- package/dist/MarkdownEditor/editor/utils/useLocalState.js +1 -1
- package/dist/MarkdownEditor/hooks/editor.js +2 -2
- package/dist/MarkdownEditor/hooks/subscribe.js +1 -1
- package/dist/MarkdownEditor/index.js +1 -1
- package/dist/MarkdownEditor/style.js +1 -1
- package/dist/MarkdownEditor/utils/exportHtml.js +2 -2
- package/dist/MarkdownEditor/utils/native-table/native-table-editor.js +4 -4
- package/dist/MarkdownInputField/AttachmentButton/AttachmentButtonPopover.js +8 -8
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileIcon.js +1 -1
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileListItem.js +10 -10
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/index.js +10 -10
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/style.js +1 -1
- package/dist/MarkdownInputField/AttachmentButton/index.js +18 -18
- package/dist/MarkdownInputField/AttachmentButton/style.js +1 -1
- package/dist/MarkdownInputField/AttachmentButton/utils.js +8 -8
- package/dist/MarkdownInputField/BeforeToolContainer/BeforeToolContainer.js +4 -4
- package/dist/MarkdownInputField/BorderBeamAnimation.js +1 -1
- package/dist/MarkdownInputField/Enlargement/index.js +1 -1
- package/dist/MarkdownInputField/FileMapView/FileMapViewItem.js +8 -8
- package/dist/MarkdownInputField/FileMapView/index.js +2 -2
- package/dist/MarkdownInputField/FileMapView/style.js +1 -1
- package/dist/MarkdownInputField/FilePaste/index.js +2 -2
- package/dist/MarkdownInputField/FileUploadManager/index.js +2 -2
- package/dist/MarkdownInputField/MarkdownInputField.js +10 -10
- package/dist/MarkdownInputField/QuickActions/index.js +5 -5
- package/dist/MarkdownInputField/RefinePromptButton/index.js +3 -3
- package/dist/MarkdownInputField/RefinePromptButton/style.js +1 -1
- package/dist/MarkdownInputField/SendActions/index.js +6 -6
- package/dist/MarkdownInputField/SendButton/index.js +3 -3
- package/dist/MarkdownInputField/SendButton/style.js +1 -1
- package/dist/MarkdownInputField/SkillModeBar/index.js +3 -3
- package/dist/MarkdownInputField/SkillModeBar/style.js +1 -1
- package/dist/MarkdownInputField/Suggestion/index.js +8 -8
- package/dist/MarkdownInputField/TopOperatingArea/index.js +2 -2
- package/dist/MarkdownInputField/TopOperatingArea/style.js +2 -2
- package/dist/MarkdownInputField/VoiceInput/index.js +2 -2
- package/dist/MarkdownInputField/VoiceInput/style.js +1 -1
- package/dist/MarkdownInputField/VoiceInputManager/index.js +3 -3
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldActions.js +1 -1
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldHandlers.js +1 -1
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldLayout.js +2 -2
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldRefs.js +1 -1
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldState.js +1 -1
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldStyles.js +1 -1
- package/dist/MarkdownInputField/style.js +2 -2
- package/dist/MarkdownInputField/utils/renderHelpers.js +5 -5
- package/dist/Plugins/chart/AreaChart/index.js +4 -4
- package/dist/Plugins/chart/AreaChart/style.js +1 -1
- package/dist/Plugins/chart/BarChart/index.js +11 -11
- package/dist/Plugins/chart/BarChart/style.js +1 -1
- package/dist/Plugins/chart/ChartAttrToolBar/ChartAttrToolBarStyle.js +1 -1
- package/dist/Plugins/chart/ChartAttrToolBar/index.js +3 -3
- package/dist/Plugins/chart/ChartMark/Area.js +2 -2
- package/dist/Plugins/chart/ChartMark/Bar.js +2 -2
- package/dist/Plugins/chart/ChartMark/Column.js +2 -2
- package/dist/Plugins/chart/ChartMark/Container.js +1 -1
- package/dist/Plugins/chart/ChartMark/Line.js +2 -2
- package/dist/Plugins/chart/ChartMark/Pie.js +2 -2
- package/dist/Plugins/chart/ChartRender.js +19 -19
- package/dist/Plugins/chart/ChartStatistic/index.js +3 -3
- package/dist/Plugins/chart/ChartStatistic/style.js +1 -1
- package/dist/Plugins/chart/ChartStatistic/utils.js +2 -2
- package/dist/Plugins/chart/DonutChart/Legend.js +3 -3
- package/dist/Plugins/chart/DonutChart/hooks.js +5 -5
- package/dist/Plugins/chart/DonutChart/index.js +11 -11
- package/dist/Plugins/chart/DonutChart/plugins.js +3 -3
- package/dist/Plugins/chart/DonutChart/style.js +1 -1
- package/dist/Plugins/chart/FunnelChart/index.js +14 -14
- package/dist/Plugins/chart/FunnelChart/style.js +1 -1
- package/dist/Plugins/chart/LineChart/index.js +3 -3
- package/dist/Plugins/chart/LineChart/style.js +1 -1
- package/dist/Plugins/chart/RadarChart/index.js +7 -7
- package/dist/Plugins/chart/RadarChart/style.js +1 -1
- package/dist/Plugins/chart/ScatterChart/index.js +7 -7
- package/dist/Plugins/chart/ScatterChart/style.js +1 -1
- package/dist/Plugins/chart/components/ChartContainer/ChartContainer.js +1 -1
- package/dist/Plugins/chart/components/ChartContainer/style.js +2 -2
- package/dist/Plugins/chart/components/ChartFilter/ChartFilter.js +6 -6
- package/dist/Plugins/chart/components/ChartFilter/style.js +1 -1
- package/dist/Plugins/chart/components/ChartToolBar/ChartToolBar.js +2 -2
- package/dist/Plugins/chart/components/ChartToolBar/style.js +1 -1
- package/dist/Plugins/chart/components/icons/TimeIcon.js +1 -1
- package/dist/Plugins/chart/components/index.js +1 -1
- package/dist/Plugins/chart/hooks/useChartDataFilter.js +1 -1
- package/dist/Plugins/chart/hooks/useChartStatistics.js +1 -1
- package/dist/Plugins/chart/hooks/useChartTheme.js +1 -1
- package/dist/Plugins/chart/hooks/useResponsiveSize.js +2 -2
- package/dist/Plugins/chart/index.js +8 -8
- package/dist/Plugins/chart/loadChartRuntime.js +1 -1
- package/dist/Plugins/chart/utils/registerChart.js +3 -3
- package/dist/Plugins/chart/utils.js +12 -12
- package/dist/Plugins/code/CodeUI/Katex/Katex.js +1 -1
- package/dist/Plugins/code/components/AceEditor.js +2 -2
- package/dist/Plugins/code/components/CodeContainer.js +3 -3
- package/dist/Plugins/code/components/CodeRenderer.js +2 -2
- package/dist/Plugins/code/components/CodeToolbar.js +5 -5
- package/dist/Plugins/code/components/LanguageSelector.js +7 -7
- package/dist/Plugins/code/components/LoadImage.js +3 -3
- package/dist/Plugins/code/components/ThinkBlock.js +2 -2
- package/dist/Plugins/code/index.js +1 -1
- package/dist/Plugins/code/langIcons/AbapIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ActionscriptIcon.js +1 -1
- package/dist/Plugins/code/langIcons/AdaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ApacheIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ApexIcon.js +1 -1
- package/dist/Plugins/code/langIcons/AplIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ApplescriptIcon.js +1 -1
- package/dist/Plugins/code/langIcons/AstroIcon.js +1 -1
- package/dist/Plugins/code/langIcons/AwkIcon.js +1 -1
- package/dist/Plugins/code/langIcons/BallerinaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/BatIcon.js +1 -1
- package/dist/Plugins/code/langIcons/BicepIcon.js +1 -1
- package/dist/Plugins/code/langIcons/BladeIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CadenceIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ClojureIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CmakeIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CobolIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CodeqlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CoffeeIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ConsoleIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CppIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CrystalIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CsharpIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CssIcon.js +1 -1
- package/dist/Plugins/code/langIcons/DIcon.js +1 -1
- package/dist/Plugins/code/langIcons/DartIcon.js +1 -1
- package/dist/Plugins/code/langIcons/DatabaseIcon.js +1 -1
- package/dist/Plugins/code/langIcons/DiffIcon.js +1 -1
- package/dist/Plugins/code/langIcons/DockerIcon.js +1 -1
- package/dist/Plugins/code/langIcons/DotenvIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ElixirIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ElmIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ErbIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ErlangIcon.js +1 -1
- package/dist/Plugins/code/langIcons/FsharpIcon.js +1 -1
- package/dist/Plugins/code/langIcons/GdscriptIcon.js +1 -1
- package/dist/Plugins/code/langIcons/GlslIcon.js +1 -1
- package/dist/Plugins/code/langIcons/GnuplotIcon.js +1 -1
- package/dist/Plugins/code/langIcons/GoIcon.js +1 -1
- package/dist/Plugins/code/langIcons/GraphqlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/GroovyIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HackIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HamlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HandlebarsIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HaskellIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HclIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HclLightIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HjsonIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HlslIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HtmlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HttpIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ImbaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/IniIcon.js +1 -1
- package/dist/Plugins/code/langIcons/JavaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/JavascriptIcon.js +1 -1
- package/dist/Plugins/code/langIcons/JinjaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/Json5Icon.js +1 -1
- package/dist/Plugins/code/langIcons/JsonIcon.js +1 -1
- package/dist/Plugins/code/langIcons/JsonnetIcon.js +1 -1
- package/dist/Plugins/code/langIcons/JuliaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/KotlinIcon.js +1 -1
- package/dist/Plugins/code/langIcons/KustoIcon.js +1 -1
- package/dist/Plugins/code/langIcons/LessIcon.js +1 -1
- package/dist/Plugins/code/langIcons/LiquidIcon.js +1 -1
- package/dist/Plugins/code/langIcons/LispIcon.js +1 -1
- package/dist/Plugins/code/langIcons/LuaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/MakefileIcon.js +1 -1
- package/dist/Plugins/code/langIcons/MarkdownIcon.js +1 -1
- package/dist/Plugins/code/langIcons/MarkojsIcon.js +1 -1
- package/dist/Plugins/code/langIcons/MatlabIcon.js +1 -1
- package/dist/Plugins/code/langIcons/MdxIcon.js +1 -1
- package/dist/Plugins/code/langIcons/MermaidIcon.js +1 -1
- package/dist/Plugins/code/langIcons/MojoIcon.js +1 -1
- package/dist/Plugins/code/langIcons/NginxIcon.js +1 -1
- package/dist/Plugins/code/langIcons/NimIcon.js +1 -1
- package/dist/Plugins/code/langIcons/NixIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ObjectiveCIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ObjectiveCppIcon.js +1 -1
- package/dist/Plugins/code/langIcons/OcamlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PascalIcon.js +1 -1
- package/dist/Plugins/code/langIcons/Perl6Icon.js +1 -1
- package/dist/Plugins/code/langIcons/PerlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PhpIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PostcssIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PowershellIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PrismaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PrologIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ProtoIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PugIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PuppetIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PurescriptIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PythonIcon.js +1 -1
- package/dist/Plugins/code/langIcons/RIcon.js +1 -1
- package/dist/Plugins/code/langIcons/RazorIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ReactIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ReactTsIcon.js +1 -1
- package/dist/Plugins/code/langIcons/RubyIcon.js +1 -1
- package/dist/Plugins/code/langIcons/RustIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SasIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SassIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ScalaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SchemeIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ShaderlabIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SolidityIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SparqlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/StataIcon.js +1 -1
- package/dist/Plugins/code/langIcons/StylusIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SvelteIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SwiftIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SystemverilogIcon.js +1 -1
- package/dist/Plugins/code/langIcons/TclIcon.js +1 -1
- package/dist/Plugins/code/langIcons/TexIcon.js +1 -1
- package/dist/Plugins/code/langIcons/TomlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/TwigIcon.js +1 -1
- package/dist/Plugins/code/langIcons/TypescriptIcon.js +1 -1
- package/dist/Plugins/code/langIcons/VerilogIcon.js +1 -1
- package/dist/Plugins/code/langIcons/VhdlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/VimIcon.js +1 -1
- package/dist/Plugins/code/langIcons/VueIcon.js +1 -1
- package/dist/Plugins/code/langIcons/WebassemblyIcon.js +1 -1
- package/dist/Plugins/code/langIcons/WenyanIcon.js +1 -1
- package/dist/Plugins/code/langIcons/WgslIcon.js +1 -1
- package/dist/Plugins/code/langIcons/WolframlanguageIcon.js +1 -1
- package/dist/Plugins/code/langIcons/XmlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/XslIcon.js +1 -1
- package/dist/Plugins/code/langIcons/YamlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ZigIcon.js +1 -1
- package/dist/Plugins/code/loadAceEditor.js +3 -3
- package/dist/Plugins/katex/InlineKatex.js +2 -2
- package/dist/Plugins/katex/Katex.js +1 -1
- package/dist/Plugins/katex/index.js +2 -2
- package/dist/Plugins/katex/loadKatex.js +2 -2
- package/dist/Plugins/mermaid/Mermaid.js +1 -1
- package/dist/Plugins/mermaid/MermaidFallback.js +1 -1
- package/dist/Plugins/mermaid/MermaidRendererImpl.js +1 -1
- package/dist/Plugins/mermaid/index.js +5 -5
- package/dist/Plugins/mermaid/style.js +1 -1
- package/dist/Plugins/mermaid/useMermaidRender.js +1 -1
- package/dist/Plugins/mermaid/utils.js +3 -3
- package/dist/Quote/index.js +2 -2
- package/dist/Quote/style.js +1 -1
- package/dist/Schema/SchemaEditor/AceEditorWrapper.js +1 -1
- package/dist/Schema/SchemaEditor/index.js +6 -6
- package/dist/Schema/SchemaEditor/style.js +1 -1
- package/dist/Schema/SchemaForm/index.js +4 -4
- package/dist/Schema/SchemaRenderer/index.js +8 -8
- package/dist/TaskList/index.js +4 -4
- package/dist/TaskList/style.js +1 -1
- package/dist/ThoughtChainList/CostMillis.js +2 -2
- package/dist/ThoughtChainList/DeepThink.js +1 -1
- package/dist/ThoughtChainList/DotAni/index.js +1 -1
- package/dist/ThoughtChainList/DotAni/style.js +1 -1
- package/dist/ThoughtChainList/MarkdownEditor.js +2 -2
- package/dist/ThoughtChainList/RagRetrievalInfo.js +2 -2
- package/dist/ThoughtChainList/TableSql.js +8 -8
- package/dist/ThoughtChainList/TitleInfo.js +3 -3
- package/dist/ThoughtChainList/ToolCall.js +7 -7
- package/dist/ThoughtChainList/WebSearch.js +1 -1
- package/dist/ThoughtChainList/style.js +1 -1
- package/dist/ToolUseBar/BarItem/Content.js +5 -5
- package/dist/ToolUseBar/BarItem/index.js +1 -1
- package/dist/ToolUseBar/index.js +1 -1
- package/dist/ToolUseBar/style.js +1 -1
- package/dist/ToolUseBarThink/index.js +10 -10
- package/dist/ToolUseBarThink/style.js +1 -1
- package/dist/Types/message.d.ts +1 -0
- package/dist/Utils/debugUtils.js +1 -1
- package/dist/Utils/formatTime.js +1 -1
- package/dist/Utils/getScroll.js +2 -2
- package/dist/Utils/loadCSS.js +2 -2
- package/dist/Utils/proxySandbox/ProxySandbox.js +37 -37
- package/dist/Utils/proxySandbox/SecurityContextManager.js +6 -6
- package/dist/Utils/scrollTo.js +1 -1
- package/dist/Utils/throttleByAnimationFrame.js +2 -2
- package/dist/WelcomeMessage/index.js +1 -1
- package/dist/WelcomeMessage/style.js +1 -1
- package/dist/Workspace/Browser/index.js +13 -13
- package/dist/Workspace/Browser/style.js +1 -1
- package/dist/Workspace/File/FileComponent.js +38 -38
- package/dist/Workspace/File/FileTypeProcessor.js +8 -8
- package/dist/Workspace/File/PreviewComponent.js +14 -14
- package/dist/Workspace/File/style.js +1 -1
- package/dist/Workspace/File/utils.js +3 -3
- package/dist/Workspace/HtmlPreview/index.js +5 -5
- package/dist/Workspace/HtmlPreview/style.js +1 -1
- package/dist/Workspace/RealtimeFollow/index.js +18 -18
- package/dist/Workspace/RealtimeFollow/style.js +1 -1
- package/dist/Workspace/Task/index.js +3 -3
- package/dist/Workspace/Task/style.js +1 -1
- package/dist/Workspace/index.js +9 -9
- package/dist/Workspace/style.js +1 -1
- package/dist/Workspace/types.js +3 -3
- package/dist/Workspace/utils/codeLanguageUtils.js +3 -3
- package/dist/Workspace/utils.js +2 -2
- package/package.json +4 -3
|
@@ -57,7 +57,7 @@ import { decodeURIComponentUrl, findAttachment } from "./parseHtml";
|
|
|
57
57
|
* 处理图片节点
|
|
58
58
|
* @param currentElement - 当前处理的图片元素,包含url和alt属性
|
|
59
59
|
* @returns 返回格式化的图片节点对象
|
|
60
|
-
*/ export var handleImage = function(currentElement) {
|
|
60
|
+
*/ export var handleImage = function handleImage(currentElement) {
|
|
61
61
|
debugInfo('handleImage - 处理图片', {
|
|
62
62
|
url: currentElement === null || currentElement === void 0 ? void 0 : currentElement.url,
|
|
63
63
|
alt: currentElement === null || currentElement === void 0 ? void 0 : currentElement.alt,
|
|
@@ -76,7 +76,7 @@ import { decodeURIComponentUrl, findAttachment } from "./parseHtml";
|
|
|
76
76
|
};
|
|
77
77
|
/**
|
|
78
78
|
* 处理附件链接
|
|
79
|
-
*/ export var handleAttachmentLink = function(currentElement) {
|
|
79
|
+
*/ export var handleAttachmentLink = function handleAttachmentLink(currentElement) {
|
|
80
80
|
var _currentElement_children;
|
|
81
81
|
debugInfo('handleAttachmentLink - 处理附件链接', {
|
|
82
82
|
childrenCount: (_currentElement_children = currentElement.children) === null || _currentElement_children === void 0 ? void 0 : _currentElement_children.length
|
|
@@ -124,7 +124,7 @@ import { decodeURIComponentUrl, findAttachment } from "./parseHtml";
|
|
|
124
124
|
};
|
|
125
125
|
/**
|
|
126
126
|
* 处理链接卡片
|
|
127
|
-
*/ export var handleLinkCard = function(currentElement, config) {
|
|
127
|
+
*/ export var handleLinkCard = function handleLinkCard(currentElement, config) {
|
|
128
128
|
var _currentElement_children, _currentElement_children1;
|
|
129
129
|
debugInfo('handleLinkCard - 处理链接卡片', {
|
|
130
130
|
childrenCount: currentElement === null || currentElement === void 0 ? void 0 : (_currentElement_children = currentElement.children) === null || _currentElement_children === void 0 ? void 0 : _currentElement_children.length,
|
|
@@ -80,26 +80,26 @@ var stringifyObj = remark().use(remarkParse).use(fixStrongWithSpecialChars).use(
|
|
|
80
80
|
'yaml'
|
|
81
81
|
]);
|
|
82
82
|
var myRemark = {
|
|
83
|
-
stringify: function(obj) {
|
|
83
|
+
stringify: function stringify(obj) {
|
|
84
84
|
var mdStr = stringifyObj.stringify(obj);
|
|
85
85
|
return mdStr;
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
88
|
/**
|
|
89
89
|
* 高级数字检查
|
|
90
|
-
*/ var advancedNumericCheck = function(value) {
|
|
90
|
+
*/ var advancedNumericCheck = function advancedNumericCheck(value) {
|
|
91
91
|
var numericPattern = /^[-+]?[0-9,]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;
|
|
92
92
|
return typeof value === 'number' || typeof value === 'string' && numericPattern.test(value);
|
|
93
93
|
};
|
|
94
94
|
/**
|
|
95
95
|
* 判断是否为数字值
|
|
96
|
-
*/ var isNumericValue = function(value) {
|
|
96
|
+
*/ var isNumericValue = function isNumericValue(value) {
|
|
97
97
|
return typeof value === 'number' || !isNaN(parseFloat(value)) && isFinite(value) || advancedNumericCheck(value);
|
|
98
98
|
};
|
|
99
99
|
/**
|
|
100
100
|
* 判断是否包含不完整输入
|
|
101
101
|
* 如果一行中包含可能尚未完成的数字输入,返回 true
|
|
102
|
-
*/ var hasIncompleteNumericInput = function(values) {
|
|
102
|
+
*/ var hasIncompleteNumericInput = function hasIncompleteNumericInput(values) {
|
|
103
103
|
// 检查是否有可能是正在输入的不完整数字
|
|
104
104
|
// 例如: '12.' 或 '0.' 或 '-' 或 仅有一个数字字符的情况
|
|
105
105
|
return values.some(function(val) {
|
|
@@ -116,7 +116,7 @@ var myRemark = {
|
|
|
116
116
|
* 将 `index\_value` 转换为 `index_value`,确保字段名一致
|
|
117
117
|
* @param fieldName - 原始字段名
|
|
118
118
|
* @returns 规范化后的字段名
|
|
119
|
-
*/ export var normalizeFieldName = function(fieldName) {
|
|
119
|
+
*/ export var normalizeFieldName = function normalizeFieldName(fieldName) {
|
|
120
120
|
if (!fieldName) return fieldName;
|
|
121
121
|
// 移除转义字符:将 `\_` 转换为 `_`,`\\` 转换为 `\`
|
|
122
122
|
return fieldName.replace(/\\_/g, '_').replace(/\\\\/g, '\\').replace(/\\(?=")/g, '') // 移除转义的双引号
|
|
@@ -124,7 +124,7 @@ var myRemark = {
|
|
|
124
124
|
};
|
|
125
125
|
/**
|
|
126
126
|
* 获取列对齐方式
|
|
127
|
-
*/ export var getColumnAlignment = function(data, columns) {
|
|
127
|
+
*/ export var getColumnAlignment = function getColumnAlignment(data, columns) {
|
|
128
128
|
if (!data.length) return [];
|
|
129
129
|
// 缓存上一次的对齐结果,避免频繁切换
|
|
130
130
|
var prevAlignments = [];
|
|
@@ -151,7 +151,7 @@ var myRemark = {
|
|
|
151
151
|
* @param parserConfig - 解析配置
|
|
152
152
|
* @param contextChartConfig - 由上一条 HTML 注释(<!-- [{"chartType":...}] -->)解析得到的配置;当 preNode 无 html 配置且注释被 skip 时由此传入
|
|
153
153
|
* @returns 返回表格或图表节点
|
|
154
|
-
*/ export var parseTableOrChart = function(table, preNode, plugins, parseNodes, parserConfig, contextChartConfig) {
|
|
154
|
+
*/ export var parseTableOrChart = function parseTableOrChart(table, preNode, plugins, parseNodes, parserConfig, contextChartConfig) {
|
|
155
155
|
var _table_children, _tableHeader_children, _table_children_slice, _table_children1, _table_align;
|
|
156
156
|
var keyMap = new Map();
|
|
157
157
|
// 优先使用前一个 HTML 代码块的 otherProps;若 HTML 注释被 skip(不产出 code 节点),则使用 contextChartConfig
|
|
@@ -222,7 +222,7 @@ var myRemark = {
|
|
|
222
222
|
* 将对象转换为数组(处理 {0: {...}, 1: {...}} 这种错误格式)
|
|
223
223
|
* @param obj - 要转换的对象
|
|
224
224
|
* @returns 转换后的数组,如果不是数字键对象则返回原对象
|
|
225
|
-
*/ var convertObjectToArray = function(obj) {
|
|
225
|
+
*/ var convertObjectToArray = function convertObjectToArray(obj) {
|
|
226
226
|
if (!obj || (typeof obj === "undefined" ? "undefined" : _type_of(obj)) !== 'object' || Array.isArray(obj)) {
|
|
227
227
|
return obj;
|
|
228
228
|
}
|
|
@@ -248,7 +248,7 @@ var myRemark = {
|
|
|
248
248
|
// 如果 chartConfig 是对象且键都是数字(如 {0: {...}}),转换为数组
|
|
249
249
|
chartConfig = convertObjectToArray(chartConfig);
|
|
250
250
|
// 获取 chartType,支持多种配置格式
|
|
251
|
-
var getChartType = function() {
|
|
251
|
+
var getChartType = function getChartType() {
|
|
252
252
|
var _chartConfig_, _config_at, _config_at1;
|
|
253
253
|
return (chartConfig === null || chartConfig === void 0 ? void 0 : chartConfig.chartType) || Array.isArray(chartConfig) && (chartConfig === null || chartConfig === void 0 ? void 0 : (_chartConfig_ = chartConfig[0]) === null || _chartConfig_ === void 0 ? void 0 : _chartConfig_.chartType) || (config === null || config === void 0 ? void 0 : config.chartType) || (config === null || config === void 0 ? void 0 : (_config_at1 = config.at) === null || _config_at1 === void 0 ? void 0 : (_config_at = _config_at1.call(config, 0)) === null || _config_at === void 0 ? void 0 : _config_at.chartType);
|
|
254
254
|
};
|
|
@@ -343,7 +343,7 @@ var myRemark = {
|
|
|
343
343
|
* 预处理 Markdown 表格换行符
|
|
344
344
|
* @param markdown - 原始 Markdown 字符串
|
|
345
345
|
* @returns 处理后的 Markdown 字符串
|
|
346
|
-
*/ export var preprocessMarkdownTableNewlines = function(markdown) {
|
|
346
|
+
*/ export var preprocessMarkdownTableNewlines = function preprocessMarkdownTableNewlines(markdown) {
|
|
347
347
|
// 检查是否包含表格
|
|
348
348
|
if (!tableRegex.test(markdown)) return markdown; // 如果没有表格,直接返回原始字符串
|
|
349
349
|
// 处理表格结尾的换行符:
|
|
@@ -54,7 +54,7 @@ import { handleInlineCode } from "./parseElements";
|
|
|
54
54
|
import { shouldTreatInlineMathAsText } from "./parseMath";
|
|
55
55
|
/**
|
|
56
56
|
* 设置节点的 finished 属性
|
|
57
|
-
*/ export var setFinishedProp = function(leaf, finished) {
|
|
57
|
+
*/ export var setFinishedProp = function setFinishedProp(leaf, finished) {
|
|
58
58
|
if (finished !== false) {
|
|
59
59
|
return leaf;
|
|
60
60
|
}
|
|
@@ -66,13 +66,13 @@ import { shouldTreatInlineMathAsText } from "./parseMath";
|
|
|
66
66
|
};
|
|
67
67
|
/**
|
|
68
68
|
* 检查 leaf 是否有格式属性需要保留
|
|
69
|
-
*/ var hasFormattingProps = function(leaf) {
|
|
69
|
+
*/ var hasFormattingProps = function hasFormattingProps(leaf) {
|
|
70
70
|
var _leaf_otherProps;
|
|
71
71
|
return !!(leaf.bold || leaf.italic || leaf.strikethrough || leaf.url || leaf.code || ((_leaf_otherProps = leaf.otherProps) === null || _leaf_otherProps === void 0 ? void 0 : _leaf_otherProps.finished) === false);
|
|
72
72
|
};
|
|
73
73
|
/**
|
|
74
74
|
* 解析文本节点和内联元素
|
|
75
|
-
*/ export var parseText = function(els) {
|
|
75
|
+
*/ export var parseText = function parseText1(els) {
|
|
76
76
|
var leaf = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
77
77
|
data: {}
|
|
78
78
|
};
|
|
@@ -193,7 +193,7 @@ import { shouldTreatInlineMathAsText } from "./parseMath";
|
|
|
193
193
|
* @param el - 目标元素对象
|
|
194
194
|
* @param htmlTag - HTML标签数组,包含样式信息
|
|
195
195
|
* @returns 返回应用了样式的新元素对象
|
|
196
|
-
*/ export var applyHtmlTagsToElement = function(el, htmlTag) {
|
|
196
|
+
*/ export var applyHtmlTagsToElement = function applyHtmlTagsToElement(el, htmlTag) {
|
|
197
197
|
if (!htmlTag.length) {
|
|
198
198
|
return el;
|
|
199
199
|
}
|
|
@@ -241,7 +241,7 @@ import { shouldTreatInlineMathAsText } from "./parseMath";
|
|
|
241
241
|
* @param applyInlineFormattingFn - 应用内联格式的函数
|
|
242
242
|
* @param parseNodesFn - 解析节点的函数
|
|
243
243
|
* @returns 处理后的元素对象
|
|
244
|
-
*/ export var handleTextAndInlineElementsPure = function(currentElement, htmlTag, applyInlineFormattingFn, parseNodesFn) {
|
|
244
|
+
*/ export var handleTextAndInlineElementsPure = function handleTextAndInlineElementsPure(currentElement, htmlTag, applyInlineFormattingFn, parseNodesFn) {
|
|
245
245
|
var elementType = currentElement.type;
|
|
246
246
|
// 处理文本节点
|
|
247
247
|
if (elementType === 'text') {
|
|
@@ -109,12 +109,12 @@ import mdastParser from "./remarkParse";
|
|
|
109
109
|
var parseCache = new Map();
|
|
110
110
|
/**
|
|
111
111
|
* 清空解析缓存
|
|
112
|
-
*/ export var clearParseCache = function() {
|
|
112
|
+
*/ export var clearParseCache = function clearParseCache() {
|
|
113
113
|
parseCache.clear();
|
|
114
114
|
};
|
|
115
115
|
/**
|
|
116
116
|
* 生成简单的字符串哈希
|
|
117
|
-
*/ export var simpleHash = function(str) {
|
|
117
|
+
*/ export var simpleHash = function simpleHash(str) {
|
|
118
118
|
var hash = 0;
|
|
119
119
|
for(var i = 0; i < str.length; i++){
|
|
120
120
|
var char = str.charCodeAt(i);
|
|
@@ -127,7 +127,7 @@ var parseCache = new Map();
|
|
|
127
127
|
* 将 Markdown 文本按块分割
|
|
128
128
|
* 正确处理代码块、HTML 标签、脚注等内容
|
|
129
129
|
* 返回带有内容和哈希的块数组
|
|
130
|
-
*/ var splitMarkdownIntoBlocks = function(md, config, plugins) {
|
|
130
|
+
*/ var splitMarkdownIntoBlocks = function splitMarkdownIntoBlocks(md, config, plugins) {
|
|
131
131
|
var blocks = [];
|
|
132
132
|
var currentBlock = '';
|
|
133
133
|
var inCodeBlock = false;
|
|
@@ -198,7 +198,7 @@ var parseCache = new Map();
|
|
|
198
198
|
});
|
|
199
199
|
};
|
|
200
200
|
// 删除 <answer> 和 </answer> 标签,保留中间内容
|
|
201
|
-
var removeAnswerTags = function(text) {
|
|
201
|
+
var removeAnswerTags = function removeAnswerTags(text) {
|
|
202
202
|
return text.replace(/<answer>\s*/g, '').replace(/\s*<\/answer>/g, '');
|
|
203
203
|
};
|
|
204
204
|
/**
|
|
@@ -461,98 +461,98 @@ var removeAnswerTags = function(text) {
|
|
|
461
461
|
* 获取统一的元素处理器映射表
|
|
462
462
|
*/ function getElementHandlers() {
|
|
463
463
|
var _this = this;
|
|
464
|
-
var parseNodesFn = function(nodes, top, parent) {
|
|
464
|
+
var parseNodesFn = function parseNodesFn(nodes, top, parent) {
|
|
465
465
|
return _this.parseNodes(nodes, top, parent);
|
|
466
466
|
};
|
|
467
|
-
var parseNodesForTable = function(nodes, _plugins, top, parent) {
|
|
467
|
+
var parseNodesForTable = function parseNodesForTable(nodes, _plugins, top, parent) {
|
|
468
468
|
return _this.parseNodes(nodes, top || false, parent);
|
|
469
469
|
};
|
|
470
470
|
return {
|
|
471
471
|
html: {
|
|
472
|
-
handler: function() {
|
|
472
|
+
handler: function handler() {
|
|
473
473
|
return null;
|
|
474
474
|
},
|
|
475
475
|
needsHtmlResult: true
|
|
476
476
|
},
|
|
477
477
|
image: {
|
|
478
|
-
handler: function(el) {
|
|
478
|
+
handler: function handler(el) {
|
|
479
479
|
return handleImage(el);
|
|
480
480
|
}
|
|
481
481
|
},
|
|
482
482
|
inlineMath: {
|
|
483
|
-
handler: function(el) {
|
|
483
|
+
handler: function handler(el) {
|
|
484
484
|
return handleInlineMath(el);
|
|
485
485
|
}
|
|
486
486
|
},
|
|
487
487
|
math: {
|
|
488
|
-
handler: function(el) {
|
|
488
|
+
handler: function handler(el) {
|
|
489
489
|
return handleMath(el);
|
|
490
490
|
}
|
|
491
491
|
},
|
|
492
492
|
footnoteReference: {
|
|
493
|
-
handler: function(el) {
|
|
493
|
+
handler: function handler(el) {
|
|
494
494
|
return handleFootnoteReference(el);
|
|
495
495
|
}
|
|
496
496
|
},
|
|
497
497
|
inlineCode: {
|
|
498
|
-
handler: function(el) {
|
|
498
|
+
handler: function handler(el) {
|
|
499
499
|
return handleInlineCode(el);
|
|
500
500
|
}
|
|
501
501
|
},
|
|
502
502
|
thematicBreak: {
|
|
503
|
-
handler: function() {
|
|
503
|
+
handler: function handler() {
|
|
504
504
|
return handleThematicBreak();
|
|
505
505
|
}
|
|
506
506
|
},
|
|
507
507
|
code: {
|
|
508
|
-
handler: function(el, context) {
|
|
508
|
+
handler: function handler(el, context) {
|
|
509
509
|
return handleCode(el, context.config);
|
|
510
510
|
}
|
|
511
511
|
},
|
|
512
512
|
yaml: {
|
|
513
|
-
handler: function(el) {
|
|
513
|
+
handler: function handler(el) {
|
|
514
514
|
return handleYaml(el);
|
|
515
515
|
}
|
|
516
516
|
},
|
|
517
517
|
definition: {
|
|
518
|
-
handler: function(el) {
|
|
518
|
+
handler: function handler(el) {
|
|
519
519
|
return handleDefinition(el);
|
|
520
520
|
}
|
|
521
521
|
},
|
|
522
522
|
heading: {
|
|
523
|
-
handler: function(el) {
|
|
523
|
+
handler: function handler(el) {
|
|
524
524
|
return handleHeading(el, parseNodesFn);
|
|
525
525
|
}
|
|
526
526
|
},
|
|
527
527
|
list: {
|
|
528
|
-
handler: function(el) {
|
|
528
|
+
handler: function handler(el) {
|
|
529
529
|
return handleList(el, parseNodesFn);
|
|
530
530
|
}
|
|
531
531
|
},
|
|
532
532
|
listItem: {
|
|
533
|
-
handler: function(el) {
|
|
533
|
+
handler: function handler(el) {
|
|
534
534
|
return handleListItem(el, parseNodesFn);
|
|
535
535
|
}
|
|
536
536
|
},
|
|
537
537
|
blockquote: {
|
|
538
|
-
handler: function(el) {
|
|
538
|
+
handler: function handler(el) {
|
|
539
539
|
return handleBlockquote(el, parseNodesFn);
|
|
540
540
|
}
|
|
541
541
|
},
|
|
542
542
|
footnoteDefinition: {
|
|
543
|
-
handler: function(el) {
|
|
543
|
+
handler: function handler(el) {
|
|
544
544
|
return handleFootnoteDefinition(el, parseNodesFn);
|
|
545
545
|
}
|
|
546
546
|
},
|
|
547
547
|
paragraph: {
|
|
548
|
-
handler: function(el, context) {
|
|
548
|
+
handler: function handler(el, context) {
|
|
549
549
|
return handleParagraph(el, context.config, parseNodesFn);
|
|
550
550
|
}
|
|
551
551
|
},
|
|
552
552
|
table: {
|
|
553
553
|
// 传入 config:当上一条是图表注释且被 continue 掉时,config 来自 contextProps,
|
|
554
554
|
// 作为 contextChartConfig 供 parseTableOrChart 在 preNode 无 html 配置时使用
|
|
555
|
-
handler: function(el, context) {
|
|
555
|
+
handler: function handler(el, context) {
|
|
556
556
|
return parseTableOrChart(el, context.preElement || context.parent, _this.plugins, parseNodesForTable, _this.config, context.config);
|
|
557
557
|
}
|
|
558
558
|
}
|
|
@@ -628,7 +628,7 @@ var removeAnswerTags = function(text) {
|
|
|
628
628
|
* );
|
|
629
629
|
* const result = parser.parse(markdown);
|
|
630
630
|
* ```
|
|
631
|
-
*/ export var parserMarkdownToSlateNode = function(md, plugins, config) {
|
|
631
|
+
*/ export var parserMarkdownToSlateNode = function parserMarkdownToSlateNode(md, plugins, config) {
|
|
632
632
|
var _loop = function(i) {
|
|
633
633
|
var _allSchemas;
|
|
634
634
|
var _blocks_i = blocks[i], content = _blocks_i.content, hash = _blocks_i.hash;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parserMarkdownToSlateNode } from "./parserMarkdownToSlateNode";
|
|
2
|
-
var transformResult = function(result) {
|
|
2
|
+
var transformResult = function transformResult(result) {
|
|
3
3
|
var _result_schema;
|
|
4
4
|
return {
|
|
5
5
|
schema: (_result_schema = result.schema) === null || _result_schema === void 0 ? void 0 : _result_schema.filter(function(s) {
|
|
@@ -14,6 +14,6 @@ var transformResult = function(result) {
|
|
|
14
14
|
links: result.links || []
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
|
-
export var parserMdToSchema = function(code, plugins) {
|
|
17
|
+
export var parserMdToSchema = function parserMdToSchema(code, plugins) {
|
|
18
18
|
return transformResult(parserMarkdownToSlateNode(code, plugins));
|
|
19
19
|
};
|
|
@@ -88,7 +88,7 @@ var inlineNode = new Set([
|
|
|
88
88
|
]);
|
|
89
89
|
/**
|
|
90
90
|
* 尝试使用插件转换节点
|
|
91
|
-
*/ var tryPluginConversion = function(node, preString, parent, plugins) {
|
|
91
|
+
*/ var tryPluginConversion = function tryPluginConversion(node, preString, parent, plugins) {
|
|
92
92
|
if (!(plugins === null || plugins === void 0 ? void 0 : plugins.length)) return null;
|
|
93
93
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
94
94
|
try {
|
|
@@ -120,7 +120,7 @@ var inlineNode = new Set([
|
|
|
120
120
|
};
|
|
121
121
|
/**
|
|
122
122
|
* 转换插件节点为 Markdown 字符串
|
|
123
|
-
*/ var convertPluginNode = function(converted, preString, parent, plugins) {
|
|
123
|
+
*/ var convertPluginNode = function convertPluginNode(converted, preString, parent, plugins) {
|
|
124
124
|
switch(converted.type){
|
|
125
125
|
case 'code':
|
|
126
126
|
return convertCodeNode(converted, preString);
|
|
@@ -138,7 +138,7 @@ var inlineNode = new Set([
|
|
|
138
138
|
};
|
|
139
139
|
/**
|
|
140
140
|
* 转换代码节点
|
|
141
|
-
*/ var convertCodeNode = function(codeNode, preString) {
|
|
141
|
+
*/ var convertCodeNode = function convertCodeNode(codeNode, preString) {
|
|
142
142
|
var language = codeNode.lang || '';
|
|
143
143
|
var value = codeNode.value || '';
|
|
144
144
|
if (!(value === null || value === void 0 ? void 0 : value.trim())) {
|
|
@@ -153,7 +153,7 @@ var inlineNode = new Set([
|
|
|
153
153
|
};
|
|
154
154
|
/**
|
|
155
155
|
* 转换引用节点
|
|
156
|
-
*/ var convertBlockquoteNode = function(blockquoteNode, preString, parent, plugins) {
|
|
156
|
+
*/ var convertBlockquoteNode = function convertBlockquoteNode(blockquoteNode, preString, parent, plugins) {
|
|
157
157
|
return '> ' + parserSlateNodeToMarkdown(blockquoteNode.children || [], preString, _to_consumable_array(parent).concat([
|
|
158
158
|
_object_spread_props(_object_spread({}, blockquoteNode), {
|
|
159
159
|
converted: true
|
|
@@ -162,7 +162,7 @@ var inlineNode = new Set([
|
|
|
162
162
|
};
|
|
163
163
|
/**
|
|
164
164
|
* 转换段落节点
|
|
165
|
-
*/ var convertParagraphNode = function(paragraphNode, preString, parent, plugins) {
|
|
165
|
+
*/ var convertParagraphNode = function convertParagraphNode(paragraphNode, preString, parent, plugins) {
|
|
166
166
|
return preString + parserSlateNodeToMarkdown(paragraphNode.children || [], preString, _to_consumable_array(parent).concat([
|
|
167
167
|
_object_spread_props(_object_spread({}, paragraphNode), {
|
|
168
168
|
converted: true
|
|
@@ -171,7 +171,7 @@ var inlineNode = new Set([
|
|
|
171
171
|
};
|
|
172
172
|
/**
|
|
173
173
|
* 转换标题节点
|
|
174
|
-
*/ var convertHeadingNode = function(headingNode, preString, parent, plugins) {
|
|
174
|
+
*/ var convertHeadingNode = function convertHeadingNode(headingNode, preString, parent, plugins) {
|
|
175
175
|
var level = headingNode.depth || 1;
|
|
176
176
|
var content = parserSlateNodeToMarkdown(headingNode.children || [], preString, _to_consumable_array(parent).concat([
|
|
177
177
|
_object_spread_props(_object_spread({}, headingNode), {
|
|
@@ -247,7 +247,7 @@ var inlineNode = new Set([
|
|
|
247
247
|
* const result = parserNode(codeNode, '', []);
|
|
248
248
|
* // 输出: "```javascript\nconsole.log(\"hello\");\n```"
|
|
249
249
|
* ```
|
|
250
|
-
*/ var parserNode = function(node) {
|
|
250
|
+
*/ var parserNode = function parserNode(node) {
|
|
251
251
|
var preString = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : '', parent = arguments.length > 2 ? arguments[2] : void 0, plugins = arguments.length > 3 ? arguments[3] : void 0;
|
|
252
252
|
var _parent_;
|
|
253
253
|
var str = '';
|
|
@@ -348,7 +348,7 @@ var inlineNode = new Set([
|
|
|
348
348
|
* 该函数遍历 Slate 节点树,并根据节点类型和属性生成相应的 Markdown 字符串。
|
|
349
349
|
* 对于具有其他属性的节点,会将这些属性转换为 JSON 字符串并作为注释插入。
|
|
350
350
|
* 对于列表项、引用块、段落等不同类型的节点,会根据其特定的格式生成相应的 Markdown。
|
|
351
|
-
*/ export var parserSlateNodeToMarkdown = function(tree) {
|
|
351
|
+
*/ export var parserSlateNodeToMarkdown = function parserSlateNodeToMarkdown(tree) {
|
|
352
352
|
var _loop = function(i) {
|
|
353
353
|
var _tree_, _tree_1, _tree_2, _tree_3, _tree_4, _tree_5;
|
|
354
354
|
var node = tree[i];
|
|
@@ -400,7 +400,7 @@ var inlineNode = new Set([
|
|
|
400
400
|
* 将对象转换为数组(处理 {0: {...}, 1: {...}} 这种错误格式)
|
|
401
401
|
* @param obj - 要转换的对象
|
|
402
402
|
* @returns 转换后的数组,如果不是数字键对象则返回原对象
|
|
403
|
-
*/ var convertObjectToArray = function(obj) {
|
|
403
|
+
*/ var convertObjectToArray = function convertObjectToArray(obj) {
|
|
404
404
|
if (!obj || (typeof obj === "undefined" ? "undefined" : _type_of(obj)) !== 'object' || Array.isArray(obj)) {
|
|
405
405
|
return obj;
|
|
406
406
|
}
|
|
@@ -694,7 +694,7 @@ var inlineNode = new Set([
|
|
|
694
694
|
});
|
|
695
695
|
return str;
|
|
696
696
|
};
|
|
697
|
-
export var isMix = function(t) {
|
|
697
|
+
export var isMix = function isMix(t) {
|
|
698
698
|
return Object.keys(t).filter(function(key) {
|
|
699
699
|
return [
|
|
700
700
|
'bold',
|
|
@@ -717,7 +717,7 @@ export var isMix = function(t) {
|
|
|
717
717
|
* - `<b>` if `bold` is true.
|
|
718
718
|
* - `<del>` if `strikethrough` is true.
|
|
719
719
|
* - `<a href="{url}">` if `url` is defined.
|
|
720
|
-
*/ var textHtml = function(t) {
|
|
720
|
+
*/ var textHtml = function textHtml(t) {
|
|
721
721
|
var str = t.text || '';
|
|
722
722
|
if (t.highColor) str = '<span style="color:'.concat(t.highColor, '">').concat(str, "</span>");
|
|
723
723
|
if (t.code) str = "<code>".concat(str, "</code>");
|
|
@@ -744,7 +744,7 @@ export var isMix = function(t) {
|
|
|
744
744
|
* - 转义反斜杠
|
|
745
745
|
* - 将换行符转换为 Markdown 换行符
|
|
746
746
|
* - 保留文本前后的空白字符
|
|
747
|
-
*/ var textStyle = function(t) {
|
|
747
|
+
*/ var textStyle = function textStyle(t) {
|
|
748
748
|
var _t_text;
|
|
749
749
|
if (!t.text && !t.tag) return '';
|
|
750
750
|
var str = (t === null || t === void 0 ? void 0 : (_t_text = t.text) === null || _t_text === void 0 ? void 0 : _t_text.replace(RegExp("(?<!\\\\)\\\\", "g"), '\\').replace(/\n/g, ' \n')) || '';
|
|
@@ -823,7 +823,7 @@ export var isMix = function(t) {
|
|
|
823
823
|
* - 高亮颜色:使用 span 标签和 style 属性
|
|
824
824
|
* - 脚注标识:使用 [^] 语法
|
|
825
825
|
* - 混合样式:确保相邻文本之间的空格正确
|
|
826
|
-
*/ var composeText = function(t, parent) {
|
|
826
|
+
*/ var composeText = function composeText(t, parent) {
|
|
827
827
|
var _parent_;
|
|
828
828
|
if (!t.text && !t.tag) return '';
|
|
829
829
|
if (t.highColor || t.identifier || t.fnc || t.strikethrough && (t.bold || t.italic || t.code)) return textHtml(t);
|
|
@@ -879,7 +879,7 @@ export var isMix = function(t) {
|
|
|
879
879
|
* |:--- |:---:| ---:|
|
|
880
880
|
* | 左对齐 | 居中 | 右对齐 |
|
|
881
881
|
* ```
|
|
882
|
-
*/ var table = function(el, parent, plugins) {
|
|
882
|
+
*/ var table = function table(el, parent, plugins) {
|
|
883
883
|
var _el_children, _children_;
|
|
884
884
|
debugInfo('parserSlateNodeToMarkdown.table - 开始处理表格', {
|
|
885
885
|
elType: el.type,
|
|
@@ -904,14 +904,14 @@ export var isMix = function(t) {
|
|
|
904
904
|
var maxColumns = 0;
|
|
905
905
|
// 使用策略模式处理不同类型的表格
|
|
906
906
|
var tableProcessors = {
|
|
907
|
-
default: function() {
|
|
907
|
+
default: function _default() {
|
|
908
908
|
var rowIndex = 0;
|
|
909
909
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
910
910
|
try {
|
|
911
911
|
for(var _iterator = children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
912
912
|
var c = _step.value;
|
|
913
913
|
if (!c) continue;
|
|
914
|
-
var processRow = function(cells, processCell) {
|
|
914
|
+
var processRow = function processRow(cells, processCell) {
|
|
915
915
|
var row = new Array(cells.length);
|
|
916
916
|
// 处理每个单元格,包括空单元格
|
|
917
917
|
for(var i = 0; i < cells.length; i++){
|
|
@@ -926,7 +926,7 @@ export var isMix = function(t) {
|
|
|
926
926
|
rowIndex++;
|
|
927
927
|
}
|
|
928
928
|
};
|
|
929
|
-
var cellProcessor = function(cell) {
|
|
929
|
+
var cellProcessor = function cellProcessor(cell) {
|
|
930
930
|
if (cell.type !== 'table-cell') return '';
|
|
931
931
|
// 对于表格单元格,直接提取文本内容,避免段落格式化
|
|
932
932
|
return cell.children.map(function(child) {
|
|
@@ -1005,32 +1005,32 @@ export var isMix = function(t) {
|
|
|
1005
1005
|
}
|
|
1006
1006
|
// 对齐策略表
|
|
1007
1007
|
var alignStrategies = {
|
|
1008
|
-
right: function(str, diff) {
|
|
1008
|
+
right: function right(str, diff) {
|
|
1009
1009
|
return ' '.repeat(diff) + str;
|
|
1010
1010
|
},
|
|
1011
|
-
center: function(str, diff) {
|
|
1011
|
+
center: function center(str, diff) {
|
|
1012
1012
|
var pre = Math.floor(diff / 2);
|
|
1013
1013
|
return ' '.repeat(pre) + str + ' '.repeat(diff - pre);
|
|
1014
1014
|
},
|
|
1015
|
-
left: function(str, diff) {
|
|
1015
|
+
left: function left(str, diff) {
|
|
1016
1016
|
return str + ' '.repeat(diff);
|
|
1017
1017
|
},
|
|
1018
|
-
default: function(str, diff) {
|
|
1018
|
+
default: function _default(str, diff) {
|
|
1019
1019
|
return str + ' '.repeat(diff);
|
|
1020
1020
|
}
|
|
1021
1021
|
};
|
|
1022
1022
|
// 修改分隔符策略表
|
|
1023
1023
|
var separatorStrategies = {
|
|
1024
|
-
left: function(length) {
|
|
1024
|
+
left: function left(length) {
|
|
1025
1025
|
return ':' + '-'.repeat(Math.max(3, length - 1));
|
|
1026
1026
|
},
|
|
1027
|
-
center: function(length) {
|
|
1027
|
+
center: function center(length) {
|
|
1028
1028
|
return ':' + '-'.repeat(Math.max(3, length - 2)) + ':';
|
|
1029
1029
|
},
|
|
1030
|
-
right: function(length) {
|
|
1030
|
+
right: function right(length) {
|
|
1031
1031
|
return '-'.repeat(Math.max(3, length - 1)) + ':';
|
|
1032
1032
|
},
|
|
1033
|
-
default: function(length) {
|
|
1033
|
+
default: function _default(length) {
|
|
1034
1034
|
return ':' + '-'.repeat(Math.max(3, length - 1));
|
|
1035
1035
|
}
|
|
1036
1036
|
};
|
|
@@ -1078,7 +1078,7 @@ export var isMix = function(t) {
|
|
|
1078
1078
|
* @param parent - 父节点数组
|
|
1079
1079
|
* @param plugins - 可选的插件数组
|
|
1080
1080
|
* @returns 处理后的 Markdown 字符串
|
|
1081
|
-
*/ var handleCard = function(node, preString, parent, plugins) {
|
|
1081
|
+
*/ var handleCard = function handleCard(node, preString, parent, plugins) {
|
|
1082
1082
|
return parserSlateNodeToMarkdown(node === null || node === void 0 ? void 0 : node.children, preString, _to_consumable_array(parent).concat([
|
|
1083
1083
|
node
|
|
1084
1084
|
]), plugins);
|
|
@@ -1090,7 +1090,7 @@ export var isMix = function(t) {
|
|
|
1090
1090
|
* @param parent - 父节点数组
|
|
1091
1091
|
* @param plugins - 可选的插件数组
|
|
1092
1092
|
* @returns 处理后的 Markdown 字符串
|
|
1093
|
-
*/ var handleParagraph = function(node, preString, parent, plugins) {
|
|
1093
|
+
*/ var handleParagraph = function handleParagraph(node, preString, parent, plugins) {
|
|
1094
1094
|
var _node_align;
|
|
1095
1095
|
var _node_otherProps;
|
|
1096
1096
|
var str = '';
|
|
@@ -1115,7 +1115,7 @@ export var isMix = function(t) {
|
|
|
1115
1115
|
* @param parent - 父节点数组
|
|
1116
1116
|
* @param plugins - 可选的插件数组
|
|
1117
1117
|
* @returns 处理后的 Markdown 标题字符串
|
|
1118
|
-
*/ var handleHead = function(node, preString, parent, plugins) {
|
|
1118
|
+
*/ var handleHead = function handleHead(node, preString, parent, plugins) {
|
|
1119
1119
|
var _node_align;
|
|
1120
1120
|
var _node_otherProps;
|
|
1121
1121
|
var str = '';
|
|
@@ -1138,7 +1138,7 @@ export var isMix = function(t) {
|
|
|
1138
1138
|
* @param node - 代码节点,包含 language、value、render、frontmatter 等属性
|
|
1139
1139
|
* @param preString - 前缀字符串,用于处理缩进
|
|
1140
1140
|
* @returns 处理后的代码块字符串
|
|
1141
|
-
*/ var handleCode = function(node, preString) {
|
|
1141
|
+
*/ var handleCode = function handleCode(node, preString) {
|
|
1142
1142
|
var code = (node === null || node === void 0 ? void 0 : node.value) || '';
|
|
1143
1143
|
// 如果 code 是对象,则转换为 JSON 字符串,实现对 apaasify 等节点的支持
|
|
1144
1144
|
if ((typeof code === "undefined" ? "undefined" : _type_of(code)) === 'object') {
|
|
@@ -1180,7 +1180,7 @@ export var isMix = function(t) {
|
|
|
1180
1180
|
* 处理附件节点,生成带下载属性的链接标签
|
|
1181
1181
|
* @param node - 附件节点,包含 url、size、name 属性
|
|
1182
1182
|
* @returns 处理后的 HTML 链接标签字符串
|
|
1183
|
-
*/ var handleAttach = function(node) {
|
|
1183
|
+
*/ var handleAttach = function handleAttach(node) {
|
|
1184
1184
|
return '<a href="'.concat(encodeURI(node === null || node === void 0 ? void 0 : node.url), '" download data-size="').concat(node.size, '">').concat(node.name, "</a>");
|
|
1185
1185
|
};
|
|
1186
1186
|
/**
|
|
@@ -1190,7 +1190,7 @@ export var isMix = function(t) {
|
|
|
1190
1190
|
* @param parent - 父节点数组
|
|
1191
1191
|
* @param plugins - 可选的插件数组
|
|
1192
1192
|
* @returns 处理后的 Markdown 引用字符串
|
|
1193
|
-
*/ var handleBlockquote = function(node, preString, parent, plugins) {
|
|
1193
|
+
*/ var handleBlockquote = function handleBlockquote(node, preString, parent, plugins) {
|
|
1194
1194
|
// Handle empty blockquotes
|
|
1195
1195
|
if (!node.children || node.children.length === 0) {
|
|
1196
1196
|
return '> ';
|
|
@@ -1225,7 +1225,7 @@ export var isMix = function(t) {
|
|
|
1225
1225
|
* 处理图片节点,支持宽度、高度和块级显示参数
|
|
1226
1226
|
* @param node - 图片节点,包含 url、width、height、block、alt 属性
|
|
1227
1227
|
* @returns 处理后的 Markdown 图片字符串
|
|
1228
|
-
*/ var handleImage = function(node) {
|
|
1228
|
+
*/ var handleImage = function handleImage(node) {
|
|
1229
1229
|
try {
|
|
1230
1230
|
var nodeImageUrl = new URL(node === null || node === void 0 ? void 0 : node.url);
|
|
1231
1231
|
if (node.width) {
|
|
@@ -1247,7 +1247,7 @@ export var isMix = function(t) {
|
|
|
1247
1247
|
* 处理媒体节点,支持视频、图片和 iframe
|
|
1248
1248
|
* @param node - 媒体节点,包含 url、mediaType、height、align、alt 属性
|
|
1249
1249
|
* @returns 处理后的 HTML 媒体标签或 Markdown 图片字符串
|
|
1250
|
-
*/ var handleMedia = function(node) {
|
|
1250
|
+
*/ var handleMedia = function handleMedia(node) {
|
|
1251
1251
|
var nodeUrl = node === null || node === void 0 ? void 0 : node.url;
|
|
1252
1252
|
var type = node.mediaType || getMediaType(nodeUrl, node === null || node === void 0 ? void 0 : node.alt);
|
|
1253
1253
|
if (node.height) {
|
|
@@ -1278,7 +1278,7 @@ export var isMix = function(t) {
|
|
|
1278
1278
|
* @param parent - 父节点数组
|
|
1279
1279
|
* @param plugins - 可选的插件数组
|
|
1280
1280
|
* @returns 处理后的 Markdown 列表字符串
|
|
1281
|
-
*/ var handleList = function(node, preString, parent, plugins) {
|
|
1281
|
+
*/ var handleList = function handleList(node, preString, parent, plugins) {
|
|
1282
1282
|
var _parent_;
|
|
1283
1283
|
// 检查是否在嵌套列表中(父节点是 list-item)
|
|
1284
1284
|
var isNested = parent.length > 0 && ((_parent_ = parent[parent.length - 1]) === null || _parent_ === void 0 ? void 0 : _parent_.type) === 'list-item';
|
|
@@ -1303,7 +1303,7 @@ export var isMix = function(t) {
|
|
|
1303
1303
|
* @param parent - 父节点数组
|
|
1304
1304
|
* @param plugins - 可选的插件数组
|
|
1305
1305
|
* @returns 处理后的 Markdown 列表项字符串
|
|
1306
|
-
*/ var handleListItem = function(node, preString, parent, plugins) {
|
|
1306
|
+
*/ var handleListItem = function handleListItem(node, preString, parent, plugins) {
|
|
1307
1307
|
// 列表项的第一个子节点应该是段落或其他块级元素
|
|
1308
1308
|
// 后续子节点可能是嵌套的列表
|
|
1309
1309
|
var result = [];
|
|
@@ -1331,35 +1331,35 @@ export var isMix = function(t) {
|
|
|
1331
1331
|
* 处理模式定义节点,生成 schema 代码块
|
|
1332
1332
|
* @param node - 模式定义节点,包含 otherProps 属性
|
|
1333
1333
|
* @returns 处理后的 schema 代码块字符串
|
|
1334
|
-
*/ var handleSchema = function(node) {
|
|
1334
|
+
*/ var handleSchema = function handleSchema(node) {
|
|
1335
1335
|
return '```schema\n' + JSON.stringify(node.otherProps, null, 2) + '\n```';
|
|
1336
1336
|
};
|
|
1337
1337
|
/**
|
|
1338
1338
|
* 处理链接卡片节点,生成 Markdown 链接格式
|
|
1339
1339
|
* @param node - 链接卡片节点,包含 name、url 属性
|
|
1340
1340
|
* @returns 处理后的 Markdown 链接字符串
|
|
1341
|
-
*/ var handleLinkCard = function(node) {
|
|
1341
|
+
*/ var handleLinkCard = function handleLinkCard(node) {
|
|
1342
1342
|
return "[".concat(node.name, "](").concat(node === null || node === void 0 ? void 0 : node.url, ' "').concat(node.name, '")');
|
|
1343
1343
|
};
|
|
1344
1344
|
/**
|
|
1345
1345
|
* 处理水平分割线节点
|
|
1346
1346
|
* @param preString - 前缀字符串,用于处理缩进
|
|
1347
1347
|
* @returns 处理后的 Markdown 分割线字符串
|
|
1348
|
-
*/ var handleHr = function(preString) {
|
|
1348
|
+
*/ var handleHr = function handleHr(preString) {
|
|
1349
1349
|
return preString + '***';
|
|
1350
1350
|
};
|
|
1351
1351
|
/**
|
|
1352
1352
|
* 处理换行节点
|
|
1353
1353
|
* @param preString - 前缀字符串,用于处理缩进
|
|
1354
1354
|
* @returns 处理后的 HTML 换行标签字符串
|
|
1355
|
-
*/ var handleBreak = function(preString) {
|
|
1355
|
+
*/ var handleBreak = function handleBreak(preString) {
|
|
1356
1356
|
return preString + '<br/>';
|
|
1357
1357
|
};
|
|
1358
1358
|
/**
|
|
1359
1359
|
* 处理脚注定义节点
|
|
1360
1360
|
* @param node - 脚注定义节点,包含 identifier、value、url 属性
|
|
1361
1361
|
* @returns 处理后的 Markdown 脚注字符串
|
|
1362
|
-
*/ var handleFootnoteDefinition = function(node) {
|
|
1362
|
+
*/ var handleFootnoteDefinition = function handleFootnoteDefinition(node) {
|
|
1363
1363
|
return "[^".concat(node.identifier, "]: [").concat(node.value, "](").concat(node.url, ")\n");
|
|
1364
1364
|
};
|
|
1365
1365
|
/**
|
|
@@ -1367,7 +1367,7 @@ export var isMix = function(t) {
|
|
|
1367
1367
|
* @param node - 文本节点
|
|
1368
1368
|
* @param parent - 父节点数组
|
|
1369
1369
|
* @returns 处理后的文本字符串
|
|
1370
|
-
*/ var handleDefault = function(node, parent) {
|
|
1370
|
+
*/ var handleDefault = function handleDefault(node, parent) {
|
|
1371
1371
|
if (node.text || node.tag) return composeText(node, parent);
|
|
1372
1372
|
return '';
|
|
1373
1373
|
};
|