@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
|
@@ -30,7 +30,7 @@ import { HolderOutlined } from "@ant-design/icons";
|
|
|
30
30
|
import { Tooltip } from "antd";
|
|
31
31
|
import React from "react";
|
|
32
32
|
import { useEditorStore } from "../store";
|
|
33
|
-
export var DragHandle = function(props) {
|
|
33
|
+
export var DragHandle = function DragHandle(props) {
|
|
34
34
|
var _editorProps_drag;
|
|
35
35
|
var ref = React.useRef(null);
|
|
36
36
|
var _useEditorStore = useEditorStore(), store = _useEditorStore.store, editorProps = _useEditorStore.editorProps, readonly = _useEditorStore.readonly;
|
|
@@ -45,7 +45,7 @@ export var DragHandle = function(props) {
|
|
|
45
45
|
style: _object_spread({}, props.style),
|
|
46
46
|
contentEditable: false,
|
|
47
47
|
ref: ref,
|
|
48
|
-
onMouseDown: function(e) {
|
|
48
|
+
onMouseDown: function onMouseDown(e) {
|
|
49
49
|
var _parent_parentElement;
|
|
50
50
|
var parent = ref.current.parentElement;
|
|
51
51
|
if (((_parent_parentElement = parent.parentElement) === null || _parent_parentElement === void 0 ? void 0 : _parent_parentElement.dataset.be) === 'list-item') {
|
|
@@ -253,7 +253,7 @@ import { EditorUtils } from "../utils/editorUtils";
|
|
|
253
253
|
import { getRemoteMediaType } from "../utils/media";
|
|
254
254
|
import { useLocalState } from "../utils/useLocalState";
|
|
255
255
|
import { useStyle } from "./insertAutocompleteStyle";
|
|
256
|
-
var ImageIcon = function() {
|
|
256
|
+
var ImageIcon = function ImageIcon() {
|
|
257
257
|
return /*#__PURE__*/ React.createElement("svg", {
|
|
258
258
|
className: "ant-menu-item-icon",
|
|
259
259
|
viewBox: "0 0 1024 1024",
|
|
@@ -265,7 +265,7 @@ var ImageIcon = function() {
|
|
|
265
265
|
d: "M0 128l0 768 1024 0L1024 128 0 128zM944 816 80 816 80 208l864 0L944 816zM704 368c0 53.024 42.976 96 96 96 53.024 0 96-42.976 96-96 0-53.024-42.976-96-96-96C746.976 272 704 314.976 704 368M888 760l-192-288-128 96-240-304-192 496L888 760z"
|
|
266
266
|
}));
|
|
267
267
|
};
|
|
268
|
-
var Quote = function() {
|
|
268
|
+
var Quote = function Quote() {
|
|
269
269
|
return /*#__PURE__*/ React.createElement("svg", {
|
|
270
270
|
className: "ant-menu-item-icon",
|
|
271
271
|
viewBox: "0 0 1024 1024",
|
|
@@ -283,24 +283,24 @@ var Quote = function() {
|
|
|
283
283
|
var replaceUrl = [
|
|
284
284
|
{
|
|
285
285
|
reg: /https?:\/\/youtu.be\/([\w-]+)(\?si=\w+)?/i,
|
|
286
|
-
replace: function(match) {
|
|
286
|
+
replace: function replace(match) {
|
|
287
287
|
return "https://www.youtube.com/embed/".concat(match[1]).concat(match[2] || '');
|
|
288
288
|
}
|
|
289
289
|
},
|
|
290
290
|
{
|
|
291
291
|
reg: /https?:\/\/www.bilibili.com\/video\/([\w-]+)\/?/,
|
|
292
|
-
replace: function(match) {
|
|
292
|
+
replace: function replace(match) {
|
|
293
293
|
return "https://player.bilibili.com/player.html?isOutside=true&bvid=".concat(match[1]);
|
|
294
294
|
}
|
|
295
295
|
},
|
|
296
296
|
{
|
|
297
297
|
reg: /src=["']([^"\n]+)["']/i,
|
|
298
|
-
replace: function(match) {
|
|
298
|
+
replace: function replace(match) {
|
|
299
299
|
return match[1];
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
];
|
|
303
|
-
export var getInsertOptions = function(ctx, locale) {
|
|
303
|
+
export var getInsertOptions = function getInsertOptions(ctx, locale) {
|
|
304
304
|
var options = [
|
|
305
305
|
{
|
|
306
306
|
label: [
|
|
@@ -445,7 +445,7 @@ export var getInsertOptions = function(ctx, locale) {
|
|
|
445
445
|
}
|
|
446
446
|
return options;
|
|
447
447
|
};
|
|
448
|
-
export var InsertAutocomplete = function(props) {
|
|
448
|
+
export var InsertAutocomplete = function InsertAutocomplete(props) {
|
|
449
449
|
var _props_optionsRender;
|
|
450
450
|
var _useEditorStore = useEditorStore(), markdownEditorRef = _useEditorStore.markdownEditorRef, markdownContainerRef = _useEditorStore.markdownContainerRef, openInsertCompletion = _useEditorStore.openInsertCompletion, setOpenInsertCompletion = _useEditorStore.setOpenInsertCompletion, keyTask$ = _useEditorStore.keyTask$, insertCompletionText$ = _useEditorStore.insertCompletionText$;
|
|
451
451
|
var dom = useRef(null);
|
|
@@ -633,7 +633,7 @@ export var InsertAutocomplete = function(props) {
|
|
|
633
633
|
});
|
|
634
634
|
}
|
|
635
635
|
_Editor_nodes = _sliced_to_array(Editor.nodes(markdownEditorRef.current, {
|
|
636
|
-
match: function(n) {
|
|
636
|
+
match: function match(n) {
|
|
637
637
|
return !!n.type;
|
|
638
638
|
},
|
|
639
639
|
mode: 'lowest'
|
|
@@ -784,7 +784,7 @@ export var InsertAutocomplete = function(props) {
|
|
|
784
784
|
});
|
|
785
785
|
EditorUtils.focus(markdownEditorRef.current);
|
|
786
786
|
_Editor_nodes = _sliced_to_array(Editor.nodes(markdownEditorRef.current, {
|
|
787
|
-
match: function(n) {
|
|
787
|
+
match: function match(n) {
|
|
788
788
|
return !!n.type;
|
|
789
789
|
},
|
|
790
790
|
mode: 'lowest'
|
|
@@ -874,7 +874,7 @@ export var InsertAutocomplete = function(props) {
|
|
|
874
874
|
});
|
|
875
875
|
});
|
|
876
876
|
useEffect(function() {
|
|
877
|
-
var calculatePosition = function(nodeEl, containerEl) {
|
|
877
|
+
var calculatePosition = function calculatePosition(nodeEl, containerEl) {
|
|
878
878
|
var top = nodeEl.getBoundingClientRect().top;
|
|
879
879
|
var left = getOffsetLeft(nodeEl, containerEl) + 24;
|
|
880
880
|
var containerScrollTop = containerEl.scrollTop;
|
|
@@ -910,13 +910,13 @@ export var InsertAutocomplete = function(props) {
|
|
|
910
910
|
}
|
|
911
911
|
return undefined;
|
|
912
912
|
};
|
|
913
|
-
var setupEventListeners = function() {
|
|
913
|
+
var setupEventListeners = function setupEventListeners() {
|
|
914
914
|
var _markdownContainerRef_current, _markdownContainerRef_current1;
|
|
915
915
|
if (typeof window === 'undefined') return;
|
|
916
916
|
markdownContainerRef === null || markdownContainerRef === void 0 ? void 0 : (_markdownContainerRef_current = markdownContainerRef.current) === null || _markdownContainerRef_current === void 0 ? void 0 : _markdownContainerRef_current.addEventListener('keydown', keydown);
|
|
917
917
|
markdownContainerRef === null || markdownContainerRef === void 0 ? void 0 : (_markdownContainerRef_current1 = markdownContainerRef.current) === null || _markdownContainerRef_current1 === void 0 ? void 0 : _markdownContainerRef_current1.addEventListener('click', clickClose);
|
|
918
918
|
};
|
|
919
|
-
var removeEventListeners = function() {
|
|
919
|
+
var removeEventListeners = function removeEventListeners() {
|
|
920
920
|
var _markdownContainerRef_current, _markdownContainerRef_current1;
|
|
921
921
|
if (typeof window === 'undefined') return;
|
|
922
922
|
markdownContainerRef === null || markdownContainerRef === void 0 ? void 0 : (_markdownContainerRef_current = markdownContainerRef.current) === null || _markdownContainerRef_current === void 0 ? void 0 : _markdownContainerRef_current.removeEventListener('keydown', keydown);
|
|
@@ -924,7 +924,7 @@ export var InsertAutocomplete = function(props) {
|
|
|
924
924
|
};
|
|
925
925
|
if (openInsertCompletion) {
|
|
926
926
|
var _Editor_nodes = _sliced_to_array(Editor.nodes(markdownEditorRef.current, {
|
|
927
|
-
match: function(n) {
|
|
927
|
+
match: function match(n) {
|
|
928
928
|
return Element.isElement(n);
|
|
929
929
|
},
|
|
930
930
|
mode: 'lowest'
|
|
@@ -985,7 +985,7 @@ export var InsertAutocomplete = function(props) {
|
|
|
985
985
|
top: state.top,
|
|
986
986
|
bottom: state.bottom
|
|
987
987
|
},
|
|
988
|
-
onMouseDown: function(e) {
|
|
988
|
+
onMouseDown: function onMouseDown(e) {
|
|
989
989
|
e.preventDefault();
|
|
990
990
|
}
|
|
991
991
|
}, !state.insertLink && !state.insertAttachment && /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(Menu, {
|
|
@@ -1001,7 +1001,7 @@ export var InsertAutocomplete = function(props) {
|
|
|
1001
1001
|
label: (_el_label = el.label) === null || _el_label === void 0 ? void 0 : _el_label[1],
|
|
1002
1002
|
key: el.key,
|
|
1003
1003
|
icon: el.icon,
|
|
1004
|
-
onClick: function(_) {
|
|
1004
|
+
onClick: function onClick(_) {
|
|
1005
1005
|
var _props_insertOptions_find, _props_insertOptions;
|
|
1006
1006
|
_.domEvent.stopPropagation();
|
|
1007
1007
|
_.domEvent.preventDefault();
|
|
@@ -1044,16 +1044,16 @@ export var InsertAutocomplete = function(props) {
|
|
|
1044
1044
|
}
|
|
1045
1045
|
}, /*#__PURE__*/ React.createElement(PlayCircleOutlined, null), /*#__PURE__*/ React.createElement("span", null, "Embed media links")), /*#__PURE__*/ React.createElement(Input, {
|
|
1046
1046
|
placeholder: 'Paste media link',
|
|
1047
|
-
onMouseDown: function(e) {
|
|
1047
|
+
onMouseDown: function onMouseDown(e) {
|
|
1048
1048
|
return e.stopPropagation();
|
|
1049
1049
|
},
|
|
1050
1050
|
value: state.insertUrl,
|
|
1051
|
-
onKeyDown: function(e) {
|
|
1051
|
+
onKeyDown: function onKeyDown(e) {
|
|
1052
1052
|
if (isHotkey('enter', e)) {
|
|
1053
1053
|
insertMedia();
|
|
1054
1054
|
}
|
|
1055
1055
|
},
|
|
1056
|
-
onChange: function(e) {
|
|
1056
|
+
onChange: function onChange(e) {
|
|
1057
1057
|
return setState({
|
|
1058
1058
|
insertUrl: e.target.value
|
|
1059
1059
|
});
|
|
@@ -1083,7 +1083,7 @@ export var InsertAutocomplete = function(props) {
|
|
|
1083
1083
|
block: true,
|
|
1084
1084
|
size: 'small',
|
|
1085
1085
|
type: 'primary',
|
|
1086
|
-
onClick: function() {
|
|
1086
|
+
onClick: function onClick() {
|
|
1087
1087
|
Transforms.insertText(markdownEditorRef.current, '', {
|
|
1088
1088
|
at: {
|
|
1089
1089
|
anchor: Editor.start(markdownEditorRef.current, ctx.current.path),
|
|
@@ -1102,16 +1102,16 @@ export var InsertAutocomplete = function(props) {
|
|
|
1102
1102
|
key: 'embed',
|
|
1103
1103
|
children: /*#__PURE__*/ React.createElement("div", null, /*#__PURE__*/ React.createElement(Input, {
|
|
1104
1104
|
placeholder: 'Paste attachment link',
|
|
1105
|
-
onMouseDown: function(e) {
|
|
1105
|
+
onMouseDown: function onMouseDown(e) {
|
|
1106
1106
|
return e.stopPropagation();
|
|
1107
1107
|
},
|
|
1108
1108
|
value: state.insertUrl,
|
|
1109
|
-
onKeyDown: function(e) {
|
|
1109
|
+
onKeyDown: function onKeyDown(e) {
|
|
1110
1110
|
if (isHotkey('enter', e)) {
|
|
1111
1111
|
insertAttachByLink();
|
|
1112
1112
|
}
|
|
1113
1113
|
},
|
|
1114
|
-
onChange: function(e) {
|
|
1114
|
+
onChange: function onChange(e) {
|
|
1115
1115
|
return setState({
|
|
1116
1116
|
insertUrl: e.target.value
|
|
1117
1117
|
});
|
|
@@ -86,7 +86,7 @@ import { isLink, parsePath } from "../utils/path";
|
|
|
86
86
|
* - 使用 `useGetSetState` 管理模态框状态
|
|
87
87
|
* - 支持通过 EditorUtils 操作 Slate.js 编辑器
|
|
88
88
|
* - 提供链接有效性检查和用户反馈
|
|
89
|
-
*/ export var InsertLink = function() {
|
|
89
|
+
*/ export var InsertLink = function InsertLink() {
|
|
90
90
|
var _useEditorStore = useEditorStore(), markdownContainerRef = _useEditorStore.markdownContainerRef, openInsertLink$ = _useEditorStore.openInsertLink$, domRect = _useEditorStore.domRect, markdownEditorRef = _useEditorStore.markdownEditorRef;
|
|
91
91
|
var locale = useContext(I18nContext).locale;
|
|
92
92
|
var selRef = useRef();
|
|
@@ -168,11 +168,11 @@ import { isLink, parsePath } from "../utils/path";
|
|
|
168
168
|
}, []);
|
|
169
169
|
if (!state().open) return null;
|
|
170
170
|
return /*#__PURE__*/ React.createElement(Modal, {
|
|
171
|
-
afterClose: function() {
|
|
171
|
+
afterClose: function afterClose() {
|
|
172
172
|
close(state().oldUrl);
|
|
173
173
|
},
|
|
174
174
|
open: state().open,
|
|
175
|
-
onOk: function(e) {
|
|
175
|
+
onOk: function onOk(e) {
|
|
176
176
|
e.preventDefault();
|
|
177
177
|
if (isLink(state().inputKeyword)) {
|
|
178
178
|
close(state().inputKeyword);
|
|
@@ -192,7 +192,7 @@ import { isLink, parsePath } from "../utils/path";
|
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
},
|
|
195
|
-
onCancel: function() {
|
|
195
|
+
onCancel: function onCancel() {
|
|
196
196
|
close(state().oldUrl);
|
|
197
197
|
},
|
|
198
198
|
style: {
|
|
@@ -212,7 +212,7 @@ import { isLink, parsePath } from "../utils/path";
|
|
|
212
212
|
ref: inputRef,
|
|
213
213
|
value: state().inputKeyword,
|
|
214
214
|
spellCheck: false,
|
|
215
|
-
onKeyDown: function(e) {
|
|
215
|
+
onKeyDown: function onKeyDown(e) {
|
|
216
216
|
if (e.key.toLowerCase() === 'backspace' && state().anchors.length && (e.metaKey || e.altKey || state().inputKeyword.endsWith('#') || !state().inputKeyword.includes('#'))) {
|
|
217
217
|
setState({
|
|
218
218
|
anchors: [],
|
|
@@ -220,7 +220,7 @@ import { isLink, parsePath } from "../utils/path";
|
|
|
220
220
|
});
|
|
221
221
|
}
|
|
222
222
|
},
|
|
223
|
-
onChange: function(e) {
|
|
223
|
+
onChange: function onChange(e) {
|
|
224
224
|
var key = e.target.value.toLowerCase();
|
|
225
225
|
if (state().anchors.length) {
|
|
226
226
|
var parse = parsePath(key);
|
|
@@ -254,7 +254,7 @@ import { isLink, parsePath } from "../utils/path";
|
|
|
254
254
|
fontSize: '1.1em',
|
|
255
255
|
color: 'rgba(0,0,0,0.5)'
|
|
256
256
|
},
|
|
257
|
-
onClick: function() {
|
|
257
|
+
onClick: function onClick() {
|
|
258
258
|
close();
|
|
259
259
|
}
|
|
260
260
|
}, /*#__PURE__*/ React.createElement(DeleteOutlined, null)))));
|
|
@@ -103,7 +103,7 @@ import { Node } from "slate";
|
|
|
103
103
|
import { useDebounce, useGetSetState } from "../../BaseMarkdownEditor";
|
|
104
104
|
import { useEditorStore } from "../store";
|
|
105
105
|
import { getOffsetTop, slugify } from "../utils/dom";
|
|
106
|
-
var TocTitle = function(param) {
|
|
106
|
+
var TocTitle = function TocTitle(param) {
|
|
107
107
|
var children = param.children;
|
|
108
108
|
return /*#__PURE__*/ React.createElement("span", {
|
|
109
109
|
style: {
|
|
@@ -245,11 +245,11 @@ var TocTitle = function(param) {
|
|
|
245
245
|
/**
|
|
246
246
|
* 目录容器组件
|
|
247
247
|
* 用于处理目录的边界和溢出情况
|
|
248
|
-
*/ var TocContainer = function(param) {
|
|
248
|
+
*/ var TocContainer = function TocContainer(param) {
|
|
249
249
|
var children = param.children, containerRef = param.containerRef;
|
|
250
250
|
var _useState = _sliced_to_array(useState(null), 2), containerRect = _useState[0], setContainerRect = _useState[1];
|
|
251
251
|
useEffect(function() {
|
|
252
|
-
var updateRect = function() {
|
|
252
|
+
var updateRect = function updateRect() {
|
|
253
253
|
if (containerRef.current) {
|
|
254
254
|
setContainerRect(containerRef.current.getBoundingClientRect());
|
|
255
255
|
}
|
|
@@ -274,13 +274,13 @@ var TocTitle = function(param) {
|
|
|
274
274
|
containerRect
|
|
275
275
|
]);
|
|
276
276
|
return /*#__PURE__*/ React.createElement(ConfigProvider, {
|
|
277
|
-
getPopupContainer: function() {
|
|
277
|
+
getPopupContainer: function getPopupContainer() {
|
|
278
278
|
if (shouldRenderInContainer && containerRef.current) {
|
|
279
279
|
return containerRef.current;
|
|
280
280
|
}
|
|
281
281
|
return document.body;
|
|
282
282
|
},
|
|
283
|
-
getTargetContainer: function() {
|
|
283
|
+
getTargetContainer: function getTargetContainer() {
|
|
284
284
|
return containerRef.current || document.body;
|
|
285
285
|
}
|
|
286
286
|
}, children);
|
|
@@ -297,7 +297,7 @@ var TocTitle = function(param) {
|
|
|
297
297
|
* @param schema - 编辑器的内容数据
|
|
298
298
|
* @param anchorProps - 传递给 Anchor 组件的额外属性
|
|
299
299
|
* @returns 目录组件
|
|
300
|
-
*/ export var TocHeading = function(param) {
|
|
300
|
+
*/ export var TocHeading = function TocHeading(param) {
|
|
301
301
|
var schema = param.schema, anchorProps = param.anchorProps, _param_useCustomContainer = param.useCustomContainer, useCustomContainer = _param_useCustomContainer === void 0 ? true : _param_useCustomContainer;
|
|
302
302
|
var markdownContainerRef = useEditorStore().markdownContainerRef;
|
|
303
303
|
// 使用 useGetSetState 管理组件状态
|
|
@@ -391,7 +391,7 @@ var TocTitle = function(param) {
|
|
|
391
391
|
*/ useEffect(function() {
|
|
392
392
|
var container = markdownContainerRef.current;
|
|
393
393
|
if (!container) return;
|
|
394
|
-
var handleScroll = function(e) {
|
|
394
|
+
var handleScroll = function handleScroll(e) {
|
|
395
395
|
// 只在内部滚动时处理
|
|
396
396
|
if (!isScrollingInternally.current) return;
|
|
397
397
|
var target = e.target;
|
|
@@ -446,7 +446,7 @@ var TocTitle = function(param) {
|
|
|
446
446
|
* 当页面发生滚动时,更新当前激活的标题
|
|
447
447
|
* 只在非内部滚动时处理,避免冲突
|
|
448
448
|
*/ useEffect(function() {
|
|
449
|
-
var handleScroll = function() {
|
|
449
|
+
var handleScroll = function handleScroll() {
|
|
450
450
|
// 服务端渲染检查
|
|
451
451
|
if (typeof window === 'undefined') return;
|
|
452
452
|
// 如果正在进行内部滚动,忽略页面滚动
|
|
@@ -93,10 +93,10 @@ var HEADING_ALLOWED_NODE_TYPES = [
|
|
|
93
93
|
'paragraph'
|
|
94
94
|
];
|
|
95
95
|
// 工具函数
|
|
96
|
-
var isTableNode = function(nodeType) {
|
|
96
|
+
var isTableNode = function isTableNode(nodeType) {
|
|
97
97
|
return TABLE_NODE_TYPES.includes(nodeType);
|
|
98
98
|
};
|
|
99
|
-
var isNodeInTable = function(currentNode, markdownEditorRef) {
|
|
99
|
+
var isNodeInTable = function isNodeInTable(currentNode, markdownEditorRef) {
|
|
100
100
|
var _currentNode_;
|
|
101
101
|
if (!currentNode || !markdownEditorRef.current) {
|
|
102
102
|
return false;
|
|
@@ -134,7 +134,7 @@ var isNodeInTable = function(currentNode, markdownEditorRef) {
|
|
|
134
134
|
var currentNode = toolBarLogic.currentNode, highColor = toolBarLogic.highColor, isCodeNode = toolBarLogic.isCodeNode, isFormatActive = toolBarLogic.isFormatActive, isHighColorActive = toolBarLogic.isHighColorActive, isLinkActive = toolBarLogic.isLinkActive, handleUndo = toolBarLogic.handleUndo, handleRedo = toolBarLogic.handleRedo, handleClearFormat = toolBarLogic.handleClearFormat, handleFormat = toolBarLogic.handleFormat, handleHeadingChange = toolBarLogic.handleHeadingChange, handleColorChange = toolBarLogic.handleColorChange, handleToggleHighColor = toolBarLogic.handleToggleHighColor, handleToolClick = toolBarLogic.handleToolClick, handleInsertLink = toolBarLogic.handleInsertLink, handleInsert = toolBarLogic.handleInsert;
|
|
135
135
|
// 插入选项
|
|
136
136
|
var insertOptions = useMemo(function() {
|
|
137
|
-
var filterOption = function(option) {
|
|
137
|
+
var filterOption = function filterOption(option) {
|
|
138
138
|
// 过滤上传图片功能
|
|
139
139
|
if (!(editorProps === null || editorProps === void 0 ? void 0 : editorProps.image) && option.task === 'uploadImage') {
|
|
140
140
|
return false;
|
|
@@ -159,7 +159,7 @@ var isNodeInTable = function(currentNode, markdownEditorRef) {
|
|
|
159
159
|
key: option.key,
|
|
160
160
|
title: option.label.join(' '),
|
|
161
161
|
icon: option.icon,
|
|
162
|
-
onClick: function() {
|
|
162
|
+
onClick: function onClick() {
|
|
163
163
|
return handleInsert(option);
|
|
164
164
|
},
|
|
165
165
|
className: classnames("".concat(baseClassName, "-item"), hashId)
|
|
@@ -191,7 +191,7 @@ var isNodeInTable = function(currentNode, markdownEditorRef) {
|
|
|
191
191
|
i18n: i18n
|
|
192
192
|
};
|
|
193
193
|
// 工具栏元素生成器
|
|
194
|
-
var createToolbarElement = function(key, Component, props) {
|
|
194
|
+
var createToolbarElement = function createToolbarElement(key, Component, props) {
|
|
195
195
|
return /*#__PURE__*/ React.createElement(Component, _object_spread({
|
|
196
196
|
key: key
|
|
197
197
|
}, commonProps, props));
|
|
@@ -341,7 +341,7 @@ var isNodeInTable = function(currentNode, markdownEditorRef) {
|
|
|
341
341
|
}
|
|
342
342
|
}, option.icon, (_option_label = option.label) === null || _option_label === void 0 ? void 0 : _option_label.at(0)),
|
|
343
343
|
key: "min-".concat(option.key),
|
|
344
|
-
onClick: function() {
|
|
344
|
+
onClick: function onClick() {
|
|
345
345
|
return handleInsert(option);
|
|
346
346
|
}
|
|
347
347
|
};
|
|
@@ -59,7 +59,7 @@ import { ReadonlyBaseBar } from "./ReadonlyBaseBar";
|
|
|
59
59
|
var fileMap = new Map();
|
|
60
60
|
/**
|
|
61
61
|
* 浮动工具栏,用于设置文本样式
|
|
62
|
-
*/ export var FloatBar = function(props) {
|
|
62
|
+
*/ export var FloatBar = function FloatBar(props) {
|
|
63
63
|
var floatBarRef = useRef(null);
|
|
64
64
|
var _useEditorStore = useEditorStore(), domRect = _useEditorStore.domRect, setDomRect = _useEditorStore.setDomRect, markdownContainerRef = _useEditorStore.markdownContainerRef, markdownEditorRef = _useEditorStore.markdownEditorRef;
|
|
65
65
|
var _useState = _sliced_to_array(useState(false), 2), isOpen = _useState[0], setIsOpen = _useState[1];
|
|
@@ -95,7 +95,7 @@ var fileMap = new Map();
|
|
|
95
95
|
domRect
|
|
96
96
|
]);
|
|
97
97
|
useEffect(function() {
|
|
98
|
-
var resizeFn = function(e) {
|
|
98
|
+
var resizeFn = function resizeFn(e) {
|
|
99
99
|
if (markdownEditorRef.current && floatBarRef.current) {
|
|
100
100
|
floatBarRef.current.style.top = e.clientY + 20 + 'px';
|
|
101
101
|
floatBarRef.current.style.left = e.clientX + 'px';
|
|
@@ -118,7 +118,7 @@ var fileMap = new Map();
|
|
|
118
118
|
useEffect(function() {
|
|
119
119
|
var _markdownContainerRef_current;
|
|
120
120
|
if (typeof window === 'undefined') return;
|
|
121
|
-
var close = function(e) {
|
|
121
|
+
var close = function close(e) {
|
|
122
122
|
if (e.key === 'Escape') {
|
|
123
123
|
e.preventDefault();
|
|
124
124
|
setIsOpen(false);
|
|
@@ -140,7 +140,7 @@ var fileMap = new Map();
|
|
|
140
140
|
isOpen
|
|
141
141
|
]);
|
|
142
142
|
useEffect(function() {
|
|
143
|
-
var change = function() {
|
|
143
|
+
var change = function change() {
|
|
144
144
|
if (isOpen) {
|
|
145
145
|
var rect = getSelRect();
|
|
146
146
|
if (rect) {
|
|
@@ -166,7 +166,7 @@ var fileMap = new Map();
|
|
|
166
166
|
userSelect: 'none'
|
|
167
167
|
},
|
|
168
168
|
ref: floatBarRef,
|
|
169
|
-
onMouseDown: function(e) {
|
|
169
|
+
onMouseDown: function onMouseDown(e) {
|
|
170
170
|
e.preventDefault();
|
|
171
171
|
e.stopPropagation();
|
|
172
172
|
},
|
|
@@ -185,7 +185,7 @@ import { getPointStrOffset, getSelectionFromDomSelection } from "../../utils/edi
|
|
|
185
185
|
* 复制基础栏
|
|
186
186
|
* @param props
|
|
187
187
|
* @returns
|
|
188
|
-
*/ export var ReadonlyBaseBar = function(props) {
|
|
188
|
+
*/ export var ReadonlyBaseBar = function ReadonlyBaseBar(props) {
|
|
189
189
|
var baseClassName = props.prefix || "toolbar-action";
|
|
190
190
|
var _useEditorStore = useEditorStore(), refreshFloatBar = _useEditorStore.refreshFloatBar, markdownEditorRef = _useEditorStore.markdownEditorRef, editorProps = _useEditorStore.editorProps;
|
|
191
191
|
var _React_useState = _sliced_to_array(React.useState(false), 2), setRefresh = _React_useState[1];
|
|
@@ -200,7 +200,7 @@ import { getPointStrOffset, getSelectionFromDomSelection } from "../../utils/edi
|
|
|
200
200
|
/**
|
|
201
201
|
* 获取当前节点
|
|
202
202
|
*/ var _Editor_nodes = _sliced_to_array(Editor.nodes(markdownEditorRef.current, {
|
|
203
|
-
match: function(n) {
|
|
203
|
+
match: function match(n) {
|
|
204
204
|
return Element.isElement(n);
|
|
205
205
|
},
|
|
206
206
|
mode: 'lowest'
|
|
@@ -213,7 +213,7 @@ import { getPointStrOffset, getSelectionFromDomSelection } from "../../utils/edi
|
|
|
213
213
|
role: "button",
|
|
214
214
|
key: "highlight",
|
|
215
215
|
className: classnames("".concat(baseClassName, "-item")),
|
|
216
|
-
onClick: function() {
|
|
216
|
+
onClick: function onClick() {
|
|
217
217
|
return _async_to_generator(function() {
|
|
218
218
|
var _editorProps_comment_onSubmit, _editorProps_comment, domSelection, editor, selection, texts, title, fragments, i, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, str, focus, anchor, _ref, start, end, anchorOffset, focusOffset, comment;
|
|
219
219
|
return _ts_generator(this, function(_state) {
|
|
@@ -309,7 +309,7 @@ import { getPointStrOffset, getSelectionFromDomSelection } from "../../utils/edi
|
|
|
309
309
|
role: "button",
|
|
310
310
|
key: "comment",
|
|
311
311
|
className: classnames("".concat(baseClassName, "-item")),
|
|
312
|
-
onClick: function() {
|
|
312
|
+
onClick: function onClick() {
|
|
313
313
|
var _i18n_locale, _editorProps_comment, _i18n_locale1;
|
|
314
314
|
if (typeof window === 'undefined') return;
|
|
315
315
|
var domSelection = window.getSelection();
|
|
@@ -382,12 +382,12 @@ import { getPointStrOffset, getSelectionFromDomSelection } from "../../utils/edi
|
|
|
382
382
|
resize: 'none'
|
|
383
383
|
},
|
|
384
384
|
placeholder: (editorProps === null || editorProps === void 0 ? void 0 : (_editorProps_comment = editorProps.comment) === null || _editorProps_comment === void 0 ? void 0 : _editorProps_comment.placeholder) || (editorProps === null || editorProps === void 0 ? void 0 : editorProps.titlePlaceholderContent) || ((_i18n_locale1 = i18n.locale) === null || _i18n_locale1 === void 0 ? void 0 : _i18n_locale1.inputPlaceholder) || '请输入内容...',
|
|
385
|
-
onChange: function(e) {
|
|
385
|
+
onChange: function onChange(e) {
|
|
386
386
|
comment.content = e.target.value;
|
|
387
387
|
}
|
|
388
388
|
}),
|
|
389
389
|
icon: null,
|
|
390
|
-
onOk: function() {
|
|
390
|
+
onOk: function onOk() {
|
|
391
391
|
return _async_to_generator(function() {
|
|
392
392
|
var _editorProps_comment_onSubmit, _editorProps_comment, error;
|
|
393
393
|
return _ts_generator(this, function(_state) {
|
|
@@ -444,7 +444,7 @@ import { getPointStrOffset, getSelectionFromDomSelection } from "../../utils/edi
|
|
|
444
444
|
role: "button",
|
|
445
445
|
key: "insert",
|
|
446
446
|
className: classnames("".concat(baseClassName, "-item")),
|
|
447
|
-
onClick: function() {
|
|
447
|
+
onClick: function onClick() {
|
|
448
448
|
var domSelection = window.getSelection();
|
|
449
449
|
var editor = markdownEditorRef.current;
|
|
450
450
|
var selection = editor.selection;
|
|
@@ -33,12 +33,12 @@ import { BaseToolBar } from "./BaseBar";
|
|
|
33
33
|
import { useStyle } from "./toolBarStyle";
|
|
34
34
|
/**
|
|
35
35
|
* 浮动工具栏,用于设置文本样式
|
|
36
|
-
*/ var ToolBar = function(props) {
|
|
36
|
+
*/ var ToolBar = function ToolBar(props) {
|
|
37
37
|
var context = useContext(ConfigProvider.ConfigContext);
|
|
38
38
|
var baseClassName = context === null || context === void 0 ? void 0 : context.getPrefixCls("agentic-md-editor-toolbar");
|
|
39
39
|
var _useStyle = useStyle(baseClassName), wrapSSR = _useStyle.wrapSSR, hashId = _useStyle.hashId;
|
|
40
40
|
return wrapSSR(/*#__PURE__*/ React.createElement("div", {
|
|
41
|
-
onMouseDown: function(e) {
|
|
41
|
+
onMouseDown: function onMouseDown(e) {
|
|
42
42
|
e.preventDefault();
|
|
43
43
|
e.stopPropagation();
|
|
44
44
|
},
|
|
@@ -76,7 +76,7 @@ export var ColorPickerButton = /*#__PURE__*/ React.memo(function(param) {
|
|
|
76
76
|
color: highColor || undefined
|
|
77
77
|
},
|
|
78
78
|
role: "button",
|
|
79
|
-
onMouseEnter: function(e) {
|
|
79
|
+
onMouseEnter: function onMouseEnter(e) {
|
|
80
80
|
return e.stopPropagation();
|
|
81
81
|
},
|
|
82
82
|
onClick: onToggleHighColor
|
|
@@ -25,7 +25,7 @@ export var FormattingTools = /*#__PURE__*/ React.memo(function(param) {
|
|
|
25
25
|
key: tool.key,
|
|
26
26
|
title: (i18n === null || i18n === void 0 ? void 0 : (_i18n_locale = i18n.locale) === null || _i18n_locale === void 0 ? void 0 : _i18n_locale[tool.key]) || tool.title,
|
|
27
27
|
icon: tool.icon,
|
|
28
|
-
onClick: function() {
|
|
28
|
+
onClick: function onClick() {
|
|
29
29
|
return !isCodeNode && onToolClick(tool);
|
|
30
30
|
},
|
|
31
31
|
className: classnames("".concat(baseClassName, "-item"), hashId),
|
|
@@ -25,7 +25,7 @@ export var HeadingDropdown = /*#__PURE__*/ React.memo(function(param) {
|
|
|
25
25
|
return {
|
|
26
26
|
label: HeatTextMap[item.replace('H', '')] || item,
|
|
27
27
|
key: "head-".concat(item),
|
|
28
|
-
onClick: function() {
|
|
28
|
+
onClick: function onClick() {
|
|
29
29
|
return onHeadingChange(index + 1);
|
|
30
30
|
}
|
|
31
31
|
};
|
|
@@ -61,17 +61,17 @@ var LineCode = /*#__PURE__*/ React.memo(function() {
|
|
|
61
61
|
}));
|
|
62
62
|
});
|
|
63
63
|
LineCode.displayName = 'LineCode';
|
|
64
|
-
export var isCodeNode = function(editor) {
|
|
64
|
+
export var isCodeNode = function isCodeNode(editor) {
|
|
65
65
|
if (!editor) return false;
|
|
66
66
|
var _Editor_nodes = _sliced_to_array(Editor.nodes(editor, {
|
|
67
|
-
match: function(n) {
|
|
67
|
+
match: function match(n) {
|
|
68
68
|
return Element.isElement(n);
|
|
69
69
|
},
|
|
70
70
|
mode: 'lowest'
|
|
71
71
|
}), 1), node = _Editor_nodes[0];
|
|
72
72
|
return node && node[0].type === 'code';
|
|
73
73
|
};
|
|
74
|
-
export var useToolsConfig = function() {
|
|
74
|
+
export var useToolsConfig = function useToolsConfig() {
|
|
75
75
|
var locale = useContext(I18nContext).locale;
|
|
76
76
|
return [
|
|
77
77
|
{
|
|
@@ -103,12 +103,12 @@ export var useToolsConfig = function() {
|
|
|
103
103
|
title: (locale === null || locale === void 0 ? void 0 : locale['toolbar.alignLeft']) || '左对齐',
|
|
104
104
|
type: 'align-left',
|
|
105
105
|
icon: /*#__PURE__*/ React.createElement(AlignLeftOutlined, null),
|
|
106
|
-
onClick: function(editor) {
|
|
106
|
+
onClick: function onClick(editor) {
|
|
107
107
|
if (!isCodeNode(editor)) {
|
|
108
108
|
EditorUtils.setAlignment(editor, 'left');
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
|
-
isActive: function(editor) {
|
|
111
|
+
isActive: function isActive(editor) {
|
|
112
112
|
var _EditorUtils_isAlignmentActive;
|
|
113
113
|
return EditorUtils === null || EditorUtils === void 0 ? void 0 : (_EditorUtils_isAlignmentActive = EditorUtils.isAlignmentActive) === null || _EditorUtils_isAlignmentActive === void 0 ? void 0 : _EditorUtils_isAlignmentActive.call(EditorUtils, editor, 'left');
|
|
114
114
|
}
|
|
@@ -118,12 +118,12 @@ export var useToolsConfig = function() {
|
|
|
118
118
|
title: (locale === null || locale === void 0 ? void 0 : locale['toolbar.alignCenter']) || '居中对齐',
|
|
119
119
|
type: 'align-center',
|
|
120
120
|
icon: /*#__PURE__*/ React.createElement(AlignCenterOutlined, null),
|
|
121
|
-
onClick: function(editor) {
|
|
121
|
+
onClick: function onClick(editor) {
|
|
122
122
|
if (!isCodeNode(editor)) {
|
|
123
123
|
EditorUtils.setAlignment(editor, 'center');
|
|
124
124
|
}
|
|
125
125
|
},
|
|
126
|
-
isActive: function(editor) {
|
|
126
|
+
isActive: function isActive(editor) {
|
|
127
127
|
var _EditorUtils_isAlignmentActive;
|
|
128
128
|
return EditorUtils === null || EditorUtils === void 0 ? void 0 : (_EditorUtils_isAlignmentActive = EditorUtils.isAlignmentActive) === null || _EditorUtils_isAlignmentActive === void 0 ? void 0 : _EditorUtils_isAlignmentActive.call(EditorUtils, editor, 'center');
|
|
129
129
|
}
|
|
@@ -133,12 +133,12 @@ export var useToolsConfig = function() {
|
|
|
133
133
|
title: (locale === null || locale === void 0 ? void 0 : locale['toolbar.alignRight']) || '右对齐',
|
|
134
134
|
type: 'align-right',
|
|
135
135
|
icon: /*#__PURE__*/ React.createElement(AlignRightOutlined, null),
|
|
136
|
-
onClick: function(editor) {
|
|
136
|
+
onClick: function onClick(editor) {
|
|
137
137
|
if (!isCodeNode(editor)) {
|
|
138
138
|
EditorUtils.setAlignment(editor, 'right');
|
|
139
139
|
}
|
|
140
140
|
},
|
|
141
|
-
isActive: function(editor) {
|
|
141
|
+
isActive: function isActive(editor) {
|
|
142
142
|
var _EditorUtils_isAlignmentActive;
|
|
143
143
|
return EditorUtils === null || EditorUtils === void 0 ? void 0 : (_EditorUtils_isAlignmentActive = EditorUtils.isAlignmentActive) === null || _EditorUtils_isAlignmentActive === void 0 ? void 0 : _EditorUtils_isAlignmentActive.call(EditorUtils, editor, 'right');
|
|
144
144
|
}
|
|
@@ -51,7 +51,7 @@ function _object_spread_props(target, source) {
|
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
53
|
import { resetComponent, useEditorStyleRegister } from "../../../../Hooks/useStyle";
|
|
54
|
-
var genStyle = function(token) {
|
|
54
|
+
var genStyle = function genStyle(token) {
|
|
55
55
|
return _define_property({}, token.componentCls, {
|
|
56
56
|
position: 'absolute',
|
|
57
57
|
zIndex: 121,
|
|
@@ -49,14 +49,14 @@ import { Editor, Element, Node, Text, Transforms } from "slate";
|
|
|
49
49
|
import { MarkdownFormatter } from "../../../../../Plugins/formatter";
|
|
50
50
|
import { getSelRect } from "../../../utils/dom";
|
|
51
51
|
import { EditorUtils } from "../../../utils/editorUtils";
|
|
52
|
-
export var useToolBarLogic = function(param) {
|
|
52
|
+
export var useToolBarLogic = function useToolBarLogic(param) {
|
|
53
53
|
var markdownEditorRef = param.markdownEditorRef, keyTask$ = param.keyTask$, store = param.store, openInsertLink$ = param.openInsertLink$, setDomRect = param.setDomRect, refreshFloatBar = param.refreshFloatBar, domRect = param.domRect;
|
|
54
54
|
var _useState = _sliced_to_array(useState(false), 2), refresh = _useState[0], setRefresh = _useState[1];
|
|
55
55
|
var _useState1 = _sliced_to_array(useState(null), 2), highColor = _useState1[0], setHighColor = _useState1[1];
|
|
56
56
|
// 检查是否为代码节点
|
|
57
57
|
var isCodeNode = useCallback(function(editor) {
|
|
58
58
|
var _Editor_nodes = _sliced_to_array(Editor.nodes(editor, {
|
|
59
|
-
match: function(n) {
|
|
59
|
+
match: function match(n) {
|
|
60
60
|
return Element.isElement(n);
|
|
61
61
|
},
|
|
62
62
|
mode: 'lowest'
|
|
@@ -67,7 +67,7 @@ export var useToolBarLogic = function(param) {
|
|
|
67
67
|
var currentNode = useMemo(function() {
|
|
68
68
|
if (!markdownEditorRef.current) return null;
|
|
69
69
|
var _Editor_nodes = _sliced_to_array(Editor.nodes(markdownEditorRef.current, {
|
|
70
|
-
match: function(n) {
|
|
70
|
+
match: function match(n) {
|
|
71
71
|
return Element.isElement(n);
|
|
72
72
|
},
|
|
73
73
|
mode: 'lowest'
|
|
@@ -117,7 +117,7 @@ export var useToolBarLogic = function(param) {
|
|
|
117
117
|
var editor = markdownEditorRef.current;
|
|
118
118
|
if (!editor) return;
|
|
119
119
|
var _Editor_nodes = _sliced_to_array(Editor.nodes(editor, {
|
|
120
|
-
match: function(n) {
|
|
120
|
+
match: function match(n) {
|
|
121
121
|
return Text.isText(n);
|
|
122
122
|
},
|
|
123
123
|
mode: 'all'
|
|
@@ -51,7 +51,7 @@ function _object_spread_props(target, source) {
|
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
53
|
import { resetComponent, useEditorStyleRegister } from "../../../../Hooks/useStyle";
|
|
54
|
-
var genStyle = function(token) {
|
|
54
|
+
var genStyle = function genStyle(token) {
|
|
55
55
|
return _define_property({}, token.componentCls, {
|
|
56
56
|
borderTopLeftRadius: '0.5em',
|
|
57
57
|
borderTopRightRadius: '0.5em',
|
|
@@ -51,7 +51,7 @@ function _object_spread_props(target, source) {
|
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
53
|
import { resetComponent, useEditorStyleRegister } from "../../../Hooks/useStyle";
|
|
54
|
-
var genStyle = function(token) {
|
|
54
|
+
var genStyle = function genStyle(token) {
|
|
55
55
|
return _define_property({}, token.componentCls, {
|
|
56
56
|
display: 'flex',
|
|
57
57
|
flexDirection: 'column',
|