@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
|
@@ -275,7 +275,7 @@ var aceLangsLoader = null;
|
|
|
275
275
|
/**
|
|
276
276
|
* 异步加载所有 Ace Editor 语言模式
|
|
277
277
|
* 这些导入主要用于注册模式,不需要直接使用返回值
|
|
278
|
-
*/ var loadAceModes = function() {
|
|
278
|
+
*/ var loadAceModes = function loadAceModes() {
|
|
279
279
|
return _async_to_generator(function() {
|
|
280
280
|
return _ts_generator(this, function(_state) {
|
|
281
281
|
switch(_state.label){
|
|
@@ -401,7 +401,7 @@ var aceLangsLoader = null;
|
|
|
401
401
|
* 使用单例模式确保只加载一次
|
|
402
402
|
*
|
|
403
403
|
* @returns {Promise<Set<string>>} Ace Editor 支持的语言名称集合
|
|
404
|
-
*/ export var getAceLangs = function() {
|
|
404
|
+
*/ export var getAceLangs = function getAceLangs() {
|
|
405
405
|
return _async_to_generator(function() {
|
|
406
406
|
return _ts_generator(this, function(_state) {
|
|
407
407
|
if (aceLangsCache) {
|
|
@@ -452,7 +452,7 @@ var aceLangsLoader = null;
|
|
|
452
452
|
/**
|
|
453
453
|
* 预加载 Ace Editor 语言模式
|
|
454
454
|
* 可以在应用启动时调用,提前开始加载
|
|
455
|
-
*/ export var preloadAceModes = function() {
|
|
455
|
+
*/ export var preloadAceModes = function preloadAceModes() {
|
|
456
456
|
if (typeof window === 'undefined') return;
|
|
457
457
|
if (aceLangsLoader) return;
|
|
458
458
|
// 触发加载但不等待结果
|
|
@@ -3,11 +3,11 @@ import { makeDeserializer } from "./module";
|
|
|
3
3
|
import { imagePastingListener } from "./utils";
|
|
4
4
|
/* eslint-disable no-param-reassign */ import { Node } from "slate";
|
|
5
5
|
import { EditorUtils } from "..";
|
|
6
|
-
var isMarkdownLink = function(text) {
|
|
6
|
+
var isMarkdownLink = function isMarkdownLink(text) {
|
|
7
7
|
var markdownLinkRegex = /\[([^\]]+)\]\(([^)]+)\)/;
|
|
8
8
|
return markdownLinkRegex.test(text);
|
|
9
9
|
};
|
|
10
|
-
export var docxDeserializer = function(rtf, html) {
|
|
10
|
+
export var docxDeserializer = function docxDeserializer(rtf, html) {
|
|
11
11
|
var deserialize = makeDeserializer(jsx);
|
|
12
12
|
// image tags have to be cleaned out and converted
|
|
13
13
|
var imageTags = imagePastingListener(rtf, html);
|
|
@@ -29,44 +29,44 @@ function _object_spread(target) {
|
|
|
29
29
|
/* eslint-disable @typescript-eslint/no-use-before-define */ import { message } from "antd";
|
|
30
30
|
import { ELEMENT_TAGS } from "../../plugins/insertParsedHtmlNodes";
|
|
31
31
|
export var TEXT_TAGS = {
|
|
32
|
-
CODE: function() {
|
|
32
|
+
CODE: function CODE() {
|
|
33
33
|
return {
|
|
34
34
|
code: true
|
|
35
35
|
};
|
|
36
36
|
},
|
|
37
|
-
DEL: function() {
|
|
37
|
+
DEL: function DEL() {
|
|
38
38
|
return {
|
|
39
39
|
strikethrough: true
|
|
40
40
|
};
|
|
41
41
|
},
|
|
42
|
-
EM: function() {
|
|
42
|
+
EM: function EM() {
|
|
43
43
|
return {
|
|
44
44
|
italic: true
|
|
45
45
|
};
|
|
46
46
|
},
|
|
47
|
-
I: function() {
|
|
47
|
+
I: function I() {
|
|
48
48
|
return {
|
|
49
49
|
italic: true
|
|
50
50
|
};
|
|
51
51
|
},
|
|
52
|
-
S: function() {
|
|
52
|
+
S: function S() {
|
|
53
53
|
return {
|
|
54
54
|
strikethrough: true
|
|
55
55
|
};
|
|
56
56
|
},
|
|
57
|
-
B: function() {
|
|
57
|
+
B: function B() {
|
|
58
58
|
return {
|
|
59
59
|
bold: true
|
|
60
60
|
};
|
|
61
61
|
},
|
|
62
|
-
U: function() {
|
|
62
|
+
U: function U() {
|
|
63
63
|
return {
|
|
64
64
|
underline: true
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
|
-
export var makeDeserializer = function(jsx) {
|
|
69
|
-
var deserialize = function(el, imageTags) {
|
|
68
|
+
export var makeDeserializer = function makeDeserializer(jsx) {
|
|
69
|
+
var deserialize = function deserialize(el, imageTags) {
|
|
70
70
|
if (el.attributes && el.attributes.getNamedItem('class') && el.attributes.getNamedItem('class').value.match(/done/g)) {
|
|
71
71
|
return null;
|
|
72
72
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Receives rtf and html data
|
|
3
3
|
// Returns dictionary object of original img[src]:imgBlob
|
|
4
4
|
// We must read the data from the rtf because the browser is not allowed to render pasted images using simply the src from your clipboard
|
|
5
|
-
export var imagePastingListener = function(rtf, html) {
|
|
5
|
+
export var imagePastingListener = function imagePastingListener(rtf, html) {
|
|
6
6
|
var ret = {};
|
|
7
7
|
var imgTags = extractTagsFromHtml(html);
|
|
8
8
|
var newSrcValues = [];
|
|
@@ -27,7 +27,7 @@ export var imagePastingListener = function(rtf, html) {
|
|
|
27
27
|
}
|
|
28
28
|
return ret;
|
|
29
29
|
};
|
|
30
|
-
var extractFromRtf = function(rtfContent) {
|
|
30
|
+
var extractFromRtf = function extractFromRtf(rtfContent) {
|
|
31
31
|
var ret = [];
|
|
32
32
|
var rePictureHeader = /\{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?(\{\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/;
|
|
33
33
|
var rePicture = new RegExp("(?:(".concat(rePictureHeader.source, "))([\\da-fA-F\\s]+)\\}"), 'g');
|
|
@@ -53,7 +53,7 @@ var extractFromRtf = function(rtfContent) {
|
|
|
53
53
|
}
|
|
54
54
|
return ret;
|
|
55
55
|
};
|
|
56
|
-
export var extractTagsFromHtml = function(html) {
|
|
56
|
+
export var extractTagsFromHtml = function extractTagsFromHtml(html) {
|
|
57
57
|
var regexp = /<img[^>]+src="([^"]+)[^>]+/g;
|
|
58
58
|
var ret = [];
|
|
59
59
|
var item;
|
|
@@ -62,7 +62,7 @@ export var extractTagsFromHtml = function(html) {
|
|
|
62
62
|
}
|
|
63
63
|
return ret;
|
|
64
64
|
};
|
|
65
|
-
var convertHexStringToBytes = function(hexString) {
|
|
65
|
+
var convertHexStringToBytes = function convertHexStringToBytes(hexString) {
|
|
66
66
|
var bytesArray = [];
|
|
67
67
|
var bytesArrayLength = hexString.length / 2;
|
|
68
68
|
var i;
|
|
@@ -74,7 +74,7 @@ var convertHexStringToBytes = function(hexString) {
|
|
|
74
74
|
function createSrcWithBase64(img) {
|
|
75
75
|
return convertBytesToBase64(convertHexStringToBytes(img.hex));
|
|
76
76
|
}
|
|
77
|
-
var convertBytesToBase64 = function(bytesArray) {
|
|
77
|
+
var convertBytesToBase64 = function convertBytesToBase64(bytesArray) {
|
|
78
78
|
// Bytes are `8bit` numbers, where base64 use `6bit` to store data. That's why we process 3 Bytes into 4 characters representing base64.
|
|
79
79
|
//
|
|
80
80
|
// Algorithm:
|
|
@@ -6,7 +6,7 @@ var rSpecial = /[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'<>,.?/]+/g;
|
|
|
6
6
|
* @param dom The DOM element for which to calculate the offset top.
|
|
7
7
|
* @param target The target element relative to which the offset top is calculated. Defaults to document.body.
|
|
8
8
|
* @returns The offset top of the DOM element.
|
|
9
|
-
*/ export var getOffsetTop = function(dom) {
|
|
9
|
+
*/ export var getOffsetTop = function getOffsetTop(dom) {
|
|
10
10
|
var target = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : document.body;
|
|
11
11
|
var top = 0;
|
|
12
12
|
while(target.contains(dom.offsetParent) && target !== dom){
|
|
@@ -20,7 +20,7 @@ var rSpecial = /[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'<>,.?/]+/g;
|
|
|
20
20
|
* @param dom - The DOM element for which to calculate the offset left.
|
|
21
21
|
* @param target - The target element relative to which the offset left is calculated. Defaults to `document.body`.
|
|
22
22
|
* @returns The offset left of the DOM element relative to the target element.
|
|
23
|
-
*/ export var getOffsetLeft = function(dom) {
|
|
23
|
+
*/ export var getOffsetLeft = function getOffsetLeft(dom) {
|
|
24
24
|
var target = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : document.body;
|
|
25
25
|
var left = 0;
|
|
26
26
|
while(target.contains(dom) && target !== dom){
|
|
@@ -35,7 +35,7 @@ var rSpecial = /[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'<>,.?/]+/g;
|
|
|
35
35
|
*
|
|
36
36
|
* @param str - The string to be converted to a slug.
|
|
37
37
|
* @returns The slugified string.
|
|
38
|
-
*/ export var slugify = function(str) {
|
|
38
|
+
*/ export var slugify = function slugify(str) {
|
|
39
39
|
return removeDiacritics(str)// Remove control characters
|
|
40
40
|
.replace(rControl, '')// Replace special characters
|
|
41
41
|
.replace(rSpecial, '-')// Remove continuous separators
|
|
@@ -48,7 +48,7 @@ var rSpecial = /[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'<>,.?/]+/g;
|
|
|
48
48
|
* Determines the media type based on the file extension.
|
|
49
49
|
* @param name - The name of the file.
|
|
50
50
|
* @returns The media type of the file.
|
|
51
|
-
*/ export var getMediaType = function(name, alt) {
|
|
51
|
+
*/ export var getMediaType = function getMediaType(name, alt) {
|
|
52
52
|
var _name_startsWith, _originName_toLowerCase_match;
|
|
53
53
|
// Handle blob URLs
|
|
54
54
|
if (typeof name === 'string' && name.startsWith('blob:')) {
|
|
@@ -119,7 +119,7 @@ var rSpecial = /[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'<>,.?/]+/g;
|
|
|
119
119
|
/**
|
|
120
120
|
* Retrieves the bounding rectangle of the current selection.
|
|
121
121
|
* @returns The bounding rectangle of the selection, or null if no selection exists.
|
|
122
|
-
*/ export var getSelRect = function() {
|
|
122
|
+
*/ export var getSelRect = function getSelRect() {
|
|
123
123
|
if (typeof window === 'undefined') return null;
|
|
124
124
|
var domSelection = window.getSelection();
|
|
125
125
|
if ((domSelection === null || domSelection === void 0 ? void 0 : domSelection.rangeCount) === 0) return null;
|
|
@@ -93,7 +93,7 @@ import { EditorUtils } from "./editorUtils";
|
|
|
93
93
|
*/ export function getCurrentNodes(editor) {
|
|
94
94
|
return Editor.nodes(editor, {
|
|
95
95
|
mode: 'lowest',
|
|
96
|
-
match: function(m) {
|
|
96
|
+
match: function match(m) {
|
|
97
97
|
return Element.isElement(m);
|
|
98
98
|
}
|
|
99
99
|
});
|
|
@@ -285,7 +285,7 @@ import { EditorUtils } from "./editorUtils";
|
|
|
285
285
|
}
|
|
286
286
|
var blockNodes = Array.from(Editor.nodes(editor, {
|
|
287
287
|
at: selection,
|
|
288
|
-
match: function(n) {
|
|
288
|
+
match: function match(n) {
|
|
289
289
|
return Element.isElement(n) && !Editor.isInline(editor, n) && [
|
|
290
290
|
'paragraph',
|
|
291
291
|
'head'
|
|
@@ -414,7 +414,7 @@ import { EditorUtils } from "./editorUtils";
|
|
|
414
414
|
// 遍历新节点内的文本节点,计算正确的拆分点
|
|
415
415
|
var textNodes = Array.from(Editor.nodes(editor, {
|
|
416
416
|
at: middlePath,
|
|
417
|
-
match: function(n) {
|
|
417
|
+
match: function match(n) {
|
|
418
418
|
return Text.isText(n);
|
|
419
419
|
}
|
|
420
420
|
}));
|
|
@@ -689,7 +689,7 @@ export { convertToParagraph };
|
|
|
689
689
|
// 如果是任务列表,更新所有列表项的 checked 状态
|
|
690
690
|
if (mode === 'task') {
|
|
691
691
|
var listItems = Array.from(Editor.nodes(editor, {
|
|
692
|
-
match: function(n) {
|
|
692
|
+
match: function match(n) {
|
|
693
693
|
return n.type === 'list-item';
|
|
694
694
|
},
|
|
695
695
|
at: listPath,
|
|
@@ -828,7 +828,7 @@ export { convertToParagraph };
|
|
|
828
828
|
// 跨节点选中,查找所有涉及的块级节点
|
|
829
829
|
var allBlockNodes = Array.from(Editor.nodes(editor, {
|
|
830
830
|
at: selection,
|
|
831
|
-
match: function(n) {
|
|
831
|
+
match: function match(n) {
|
|
832
832
|
return Element.isElement(n) && !Editor.isInline(editor, n) && [
|
|
833
833
|
'paragraph',
|
|
834
834
|
'head'
|
|
@@ -230,7 +230,7 @@ export var EditorUtils = /*#__PURE__*/ function() {
|
|
|
230
230
|
value: function findMediaInsertPath(editor) {
|
|
231
231
|
var _cur_, _cur_1, _cur_2;
|
|
232
232
|
var _Editor_nodes = _sliced_to_array(Editor.nodes(editor, {
|
|
233
|
-
match: function(n) {
|
|
233
|
+
match: function match(n) {
|
|
234
234
|
return Element.isElement(n);
|
|
235
235
|
},
|
|
236
236
|
mode: 'lowest'
|
|
@@ -361,7 +361,7 @@ export var EditorUtils = /*#__PURE__*/ function() {
|
|
|
361
361
|
}
|
|
362
362
|
// 查找最高级别的选中元素节点
|
|
363
363
|
var nodeEntries = Array.from(Editor.nodes(editor, {
|
|
364
|
-
match: function(n) {
|
|
364
|
+
match: function match(n) {
|
|
365
365
|
return Element.isElement(n);
|
|
366
366
|
},
|
|
367
367
|
mode: 'highest'
|
|
@@ -411,7 +411,7 @@ export var EditorUtils = /*#__PURE__*/ function() {
|
|
|
411
411
|
return [];
|
|
412
412
|
}
|
|
413
413
|
var paragraphNodes = [];
|
|
414
|
-
var extractParagraphs = function(children) {
|
|
414
|
+
var extractParagraphs = function extractParagraphs(children) {
|
|
415
415
|
children.forEach(function(item) {
|
|
416
416
|
if (!(item === null || item === void 0 ? void 0 : item.children)) return;
|
|
417
417
|
item.children.forEach(function(child) {
|
|
@@ -440,7 +440,7 @@ export var EditorUtils = /*#__PURE__*/ function() {
|
|
|
440
440
|
*/ function deleteAll(editor, insertNodes) {
|
|
441
441
|
var allNodes = Array.from(Editor.nodes(editor, {
|
|
442
442
|
at: [],
|
|
443
|
-
match: function(n) {
|
|
443
|
+
match: function match(n) {
|
|
444
444
|
return Element.isElement(n);
|
|
445
445
|
},
|
|
446
446
|
mode: 'highest',
|
|
@@ -604,7 +604,7 @@ export var EditorUtils = /*#__PURE__*/ function() {
|
|
|
604
604
|
*/ function isFormatActive(editor, format, value) {
|
|
605
605
|
try {
|
|
606
606
|
var nodeEntries = Array.from(Editor.nodes(editor, {
|
|
607
|
-
match: function(n) {
|
|
607
|
+
match: function match(n) {
|
|
608
608
|
return !!n[format];
|
|
609
609
|
},
|
|
610
610
|
mode: 'lowest'
|
|
@@ -629,7 +629,7 @@ export var EditorUtils = /*#__PURE__*/ function() {
|
|
|
629
629
|
try {
|
|
630
630
|
var _nodeEntries__;
|
|
631
631
|
var nodeEntries = Array.from(Editor.nodes(editor, {
|
|
632
|
-
match: function(n) {
|
|
632
|
+
match: function match(n) {
|
|
633
633
|
return Text.isText(n) && !!(n === null || n === void 0 ? void 0 : n.url);
|
|
634
634
|
},
|
|
635
635
|
mode: 'lowest'
|
|
@@ -688,7 +688,7 @@ export var EditorUtils = /*#__PURE__*/ function() {
|
|
|
688
688
|
Transforms.setNodes(editor, {
|
|
689
689
|
align: alignment
|
|
690
690
|
}, {
|
|
691
|
-
match: function(n) {
|
|
691
|
+
match: function match(n) {
|
|
692
692
|
return Element.isElement(n) && !Editor.isEditor(n);
|
|
693
693
|
}
|
|
694
694
|
});
|
|
@@ -705,7 +705,7 @@ export var EditorUtils = /*#__PURE__*/ function() {
|
|
|
705
705
|
*/ function isAlignmentActive(editor, alignment) {
|
|
706
706
|
try {
|
|
707
707
|
var nodeEntries = Array.from(Editor.nodes(editor, {
|
|
708
|
-
match: function(n) {
|
|
708
|
+
match: function match(n) {
|
|
709
709
|
return Element.isElement(n) && n.align === alignment;
|
|
710
710
|
}
|
|
711
711
|
}));
|
|
@@ -729,7 +729,7 @@ export var EditorUtils = /*#__PURE__*/ function() {
|
|
|
729
729
|
var nodeEntries = Array.from(Editor.nodes(editor, {
|
|
730
730
|
at: [],
|
|
731
731
|
mode: 'highest',
|
|
732
|
-
match: function(n) {
|
|
732
|
+
match: function match(n) {
|
|
733
733
|
return Element.isElement(n);
|
|
734
734
|
},
|
|
735
735
|
reverse: true
|
|
@@ -1021,21 +1021,21 @@ _define_property(EditorUtils, "CLEARABLE_MARKS", [
|
|
|
1021
1021
|
});
|
|
1022
1022
|
}
|
|
1023
1023
|
});
|
|
1024
|
-
export var getDefaultView = function(value) {
|
|
1024
|
+
export var getDefaultView = function getDefaultView(value) {
|
|
1025
1025
|
return value && value.ownerDocument && value.ownerDocument.defaultView || null;
|
|
1026
1026
|
};
|
|
1027
|
-
export var isDOMNode = function(value) {
|
|
1027
|
+
export var isDOMNode = function isDOMNode(value) {
|
|
1028
1028
|
var window1 = getDefaultView(value);
|
|
1029
1029
|
return !!window1 && _instanceof(value, window1.Node);
|
|
1030
1030
|
};
|
|
1031
|
-
export var isEventHandled = function(event, handler) {
|
|
1031
|
+
export var isEventHandled = function isEventHandled(event, handler) {
|
|
1032
1032
|
if (!handler) {
|
|
1033
1033
|
return false;
|
|
1034
1034
|
}
|
|
1035
1035
|
handler(event);
|
|
1036
1036
|
return event.isDefaultPrevented() || event.isPropagationStopped();
|
|
1037
1037
|
};
|
|
1038
|
-
export var hasTarget = function(editor, target) {
|
|
1038
|
+
export var hasTarget = function hasTarget(editor, target) {
|
|
1039
1039
|
return isDOMNode(target) && ReactEditor.hasDOMNode(editor, target);
|
|
1040
1040
|
};
|
|
1041
1041
|
function checkText(domPoint) {
|
|
@@ -1050,7 +1050,7 @@ function checkText(domPoint) {
|
|
|
1050
1050
|
var textNode = leafNode.closest('[data-slate-node="text"]');
|
|
1051
1051
|
return !!textNode;
|
|
1052
1052
|
}
|
|
1053
|
-
export var isTargetInsideVoid = function(editor, target) {
|
|
1053
|
+
export var isTargetInsideVoid = function isTargetInsideVoid(editor, target) {
|
|
1054
1054
|
var slateNode = hasTarget(editor, target) && ReactEditor.toSlateNode(editor, target);
|
|
1055
1055
|
// @ts-ignore
|
|
1056
1056
|
return Editor.isVoid(editor, slateNode);
|
|
@@ -1185,7 +1185,7 @@ export var isTargetInsideVoid = function(editor, target) {
|
|
|
1185
1185
|
* @param editor - React 编辑器实例。
|
|
1186
1186
|
* @param target - 事件目标,可能为 null。
|
|
1187
1187
|
* @returns 如果目标是可编辑的 DOM 节点,则返回 true。
|
|
1188
|
-
*/ export var hasEditableTarget = function(editor, target) {
|
|
1188
|
+
*/ export var hasEditableTarget = function hasEditableTarget(editor, target) {
|
|
1189
1189
|
return isDOMNode(target) && ReactEditor.hasDOMNode(editor, target, {
|
|
1190
1190
|
editable: true
|
|
1191
1191
|
});
|
|
@@ -1381,7 +1381,7 @@ export function findLeafPath(editor, path) {
|
|
|
1381
1381
|
var _allTextNodes;
|
|
1382
1382
|
var rangeNodes = Array.from(Editor.nodes(editor, {
|
|
1383
1383
|
at: rangePath,
|
|
1384
|
-
match: function(n) {
|
|
1384
|
+
match: function match(n) {
|
|
1385
1385
|
return Text.isText(n) && typeof n.text === 'string' && n.text.length > 0;
|
|
1386
1386
|
}
|
|
1387
1387
|
}));
|
|
@@ -1409,7 +1409,7 @@ export function findLeafPath(editor, path) {
|
|
|
1409
1409
|
// 在整个编辑器中搜索
|
|
1410
1410
|
textNodesGenerator = Array.from(Editor.nodes(editor, {
|
|
1411
1411
|
at: [],
|
|
1412
|
-
match: function(n) {
|
|
1412
|
+
match: function match(n) {
|
|
1413
1413
|
return Text.isText(n) && typeof n.text === 'string' && n.text.length > 0;
|
|
1414
1414
|
}
|
|
1415
1415
|
}));
|
|
@@ -101,16 +101,16 @@ export var nid = customAlphabet('1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJK
|
|
|
101
101
|
var kb = 1024;
|
|
102
102
|
var mb = kb * 1024;
|
|
103
103
|
var gb = mb * 1024;
|
|
104
|
-
export var sizeUnit = function(size) {
|
|
104
|
+
export var sizeUnit = function sizeUnit(size) {
|
|
105
105
|
if (size > gb) return (size / gb).toFixed(2) + ' GB';
|
|
106
106
|
if (size > mb) return (size / mb).toFixed(2) + ' MB';
|
|
107
107
|
if (size > kb) return (size / kb).toFixed(2) + ' KB';
|
|
108
108
|
return size + ' B';
|
|
109
109
|
};
|
|
110
|
-
export var copy = function(data) {
|
|
110
|
+
export var copy = function copy(data) {
|
|
111
111
|
return JSON.parse(JSON.stringify(data));
|
|
112
112
|
};
|
|
113
|
-
export var isMod = function(e) {
|
|
113
|
+
export var isMod = function isMod(e) {
|
|
114
114
|
return e.metaKey || e.ctrlKey;
|
|
115
115
|
};
|
|
116
116
|
export function base64ToArrayBuffer(base64) {
|
|
@@ -121,7 +121,7 @@ export function base64ToArrayBuffer(base64) {
|
|
|
121
121
|
}
|
|
122
122
|
return bytes.buffer;
|
|
123
123
|
}
|
|
124
|
-
export var getImageData = function() {
|
|
124
|
+
export var getImageData = function getImageData() {
|
|
125
125
|
var filePath = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : '';
|
|
126
126
|
if (filePath.startsWith('data:image')) {
|
|
127
127
|
return filePath;
|
|
@@ -136,7 +136,7 @@ export function toArrayBuffer(buffer) {
|
|
|
136
136
|
}
|
|
137
137
|
return arrayBuffer;
|
|
138
138
|
}
|
|
139
|
-
export var download = function(data, fileName) {
|
|
139
|
+
export var download = function download(data, fileName) {
|
|
140
140
|
data = _instanceof(data, Uint8Array) ? new Blob([
|
|
141
141
|
data
|
|
142
142
|
]) : data;
|
|
@@ -155,7 +155,7 @@ export var download = function(data, fileName) {
|
|
|
155
155
|
}
|
|
156
156
|
};
|
|
157
157
|
export var modal$ = new Subject();
|
|
158
|
-
export var encodeHtml = function(str) {
|
|
158
|
+
export var encodeHtml = function encodeHtml(str) {
|
|
159
159
|
var encodeHTMLRules = {
|
|
160
160
|
'&': '&',
|
|
161
161
|
'<': '<',
|
|
@@ -280,14 +280,14 @@ import { useCallback, useEffect, useRef } from "react";
|
|
|
280
280
|
];
|
|
281
281
|
}
|
|
282
282
|
import { useReducer } from "react";
|
|
283
|
-
var updateReducer = function(num) {
|
|
283
|
+
var updateReducer = function updateReducer(num) {
|
|
284
284
|
return (num + 1) % 1000000;
|
|
285
285
|
};
|
|
286
286
|
export default function useUpdate() {
|
|
287
287
|
var _useReducer = _sliced_to_array(useReducer(updateReducer, 0), 2), update = _useReducer[1];
|
|
288
288
|
return update;
|
|
289
289
|
}
|
|
290
|
-
export var useGetSetState = function() {
|
|
290
|
+
export var useGetSetState = function useGetSetState() {
|
|
291
291
|
var initialState = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
292
292
|
if (process.env.NODE_ENV !== 'production') {
|
|
293
293
|
if ((typeof initialState === "undefined" ? "undefined" : _type_of(initialState)) !== 'object') {
|
|
@@ -341,7 +341,7 @@ export function throttle(fn, wait) {
|
|
|
341
341
|
};
|
|
342
342
|
return runFn;
|
|
343
343
|
}
|
|
344
|
-
export var debugLog = function(path) {
|
|
344
|
+
export var debugLog = function debugLog(path) {
|
|
345
345
|
for(var _len = arguments.length, msg = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
346
346
|
msg[_key - 1] = arguments[_key];
|
|
347
347
|
}
|
|
@@ -247,7 +247,7 @@ export var KeyboardTask = /*#__PURE__*/ function() {
|
|
|
247
247
|
*/ function get() {
|
|
248
248
|
return Editor.nodes(this.editor, {
|
|
249
249
|
mode: 'lowest',
|
|
250
|
-
match: function(m) {
|
|
250
|
+
match: function match(m) {
|
|
251
251
|
return Element.isElement(m);
|
|
252
252
|
}
|
|
253
253
|
});
|
|
@@ -406,7 +406,7 @@ export var KeyboardTask = /*#__PURE__*/ function() {
|
|
|
406
406
|
input.id = 'uploadImage' + '_' + Math.random();
|
|
407
407
|
input.type = 'file';
|
|
408
408
|
input.accept = 'image/*';
|
|
409
|
-
var insertMedia = function(url) {
|
|
409
|
+
var insertMedia = function insertMedia(url) {
|
|
410
410
|
return _async_to_generator(function() {
|
|
411
411
|
return _ts_generator(this, function(_state) {
|
|
412
412
|
if (node && [
|
|
@@ -859,7 +859,7 @@ export var KeyboardTask = /*#__PURE__*/ function() {
|
|
|
859
859
|
]
|
|
860
860
|
]
|
|
861
861
|
];
|
|
862
|
-
export var useSystemKeyboard = function(keyTask$, store, props, markdownContainerRef) {
|
|
862
|
+
export var useSystemKeyboard = function useSystemKeyboard(keyTask$, store, props, markdownContainerRef) {
|
|
863
863
|
var task = useMemo(function() {
|
|
864
864
|
return new KeyboardTask(store, props);
|
|
865
865
|
}, [
|
|
@@ -878,7 +878,7 @@ export var useSystemKeyboard = function(keyTask$, store, props, markdownContaine
|
|
|
878
878
|
var _node_, _node_1, _node_2;
|
|
879
879
|
var _Editor_nodes = _sliced_to_array(Editor.nodes(store === null || store === void 0 ? void 0 : store.editor, {
|
|
880
880
|
mode: 'lowest',
|
|
881
|
-
match: function(m) {
|
|
881
|
+
match: function match(m) {
|
|
882
882
|
return Element.isElement(m) && (m.type === 'media' || m.type === 'attach');
|
|
883
883
|
}
|
|
884
884
|
}), 1), node = _Editor_nodes[0];
|
|
@@ -184,7 +184,7 @@ var ESCAPE_REPLACEMENTS = {
|
|
|
184
184
|
'"': '"',
|
|
185
185
|
"'": '''
|
|
186
186
|
};
|
|
187
|
-
var getEscapeReplacement = function(ch) {
|
|
187
|
+
var getEscapeReplacement = function getEscapeReplacement(ch) {
|
|
188
188
|
return ESCAPE_REPLACEMENTS[ch];
|
|
189
189
|
};
|
|
190
190
|
/**
|
|
@@ -321,7 +321,7 @@ export var DEFAULT_MARKDOWN_REMARK_PLUGINS = [
|
|
|
321
321
|
]
|
|
322
322
|
];
|
|
323
323
|
var DEFAULT_REMARK_PLUGINS = _to_consumable_array(DEFAULT_MARKDOWN_REMARK_PLUGINS);
|
|
324
|
-
var applyPlugins = function(processor, plugins) {
|
|
324
|
+
var applyPlugins = function applyPlugins(processor, plugins) {
|
|
325
325
|
var extendedProcessor = processor;
|
|
326
326
|
plugins.forEach(function(entry) {
|
|
327
327
|
if (Array.isArray(entry)) {
|
|
@@ -336,13 +336,13 @@ var applyPlugins = function(processor, plugins) {
|
|
|
336
336
|
});
|
|
337
337
|
return processor;
|
|
338
338
|
};
|
|
339
|
-
var resolveRemarkPlugins = function(plugins) {
|
|
339
|
+
var resolveRemarkPlugins = function resolveRemarkPlugins(plugins) {
|
|
340
340
|
if (!plugins || plugins.length === 0) {
|
|
341
341
|
return DEFAULT_REMARK_PLUGINS;
|
|
342
342
|
}
|
|
343
343
|
return plugins;
|
|
344
344
|
};
|
|
345
|
-
var createMarkdownProcessor = function(plugins, config) {
|
|
345
|
+
var createMarkdownProcessor = function createMarkdownProcessor(plugins, config) {
|
|
346
346
|
var processor = unified();
|
|
347
347
|
var remarkPlugins = resolveRemarkPlugins(plugins);
|
|
348
348
|
applyPlugins(processor, remarkPlugins);
|
|
@@ -394,7 +394,7 @@ var createMarkdownProcessor = function(plugins, config) {
|
|
|
394
394
|
* ```
|
|
395
395
|
*
|
|
396
396
|
* @throws {Error} 当转换过程中发生错误时返回空字符串
|
|
397
|
-
*/ export var markdownToHtml = function(markdown, plugins, config) {
|
|
397
|
+
*/ export var markdownToHtml = function markdownToHtml(markdown, plugins, config) {
|
|
398
398
|
return _async_to_generator(function() {
|
|
399
399
|
var htmlContent, error;
|
|
400
400
|
return _ts_generator(this, function(_state) {
|
|
@@ -460,7 +460,7 @@ var createMarkdownProcessor = function(plugins, config) {
|
|
|
460
460
|
* @remarks
|
|
461
461
|
* - 建议在可能的情况下使用异步版本 `markdownToHtml`
|
|
462
462
|
* - 同步版本可能影响用户界面响应性
|
|
463
|
-
*/ export var markdownToHtmlSync = function(markdown, plugins, config) {
|
|
463
|
+
*/ export var markdownToHtmlSync = function markdownToHtmlSync(markdown, plugins, config) {
|
|
464
464
|
try {
|
|
465
465
|
var file = createMarkdownProcessor(plugins, config).processSync(markdown);
|
|
466
466
|
return String(file);
|
|
@@ -154,7 +154,7 @@ function _ts_generator(thisArg, body) {
|
|
|
154
154
|
import { Transforms } from "slate";
|
|
155
155
|
import { ReactEditor } from "slate-react";
|
|
156
156
|
import { getMediaType } from "./dom";
|
|
157
|
-
export var getRemoteMediaType = function(url) {
|
|
157
|
+
export var getRemoteMediaType = function getRemoteMediaType(url) {
|
|
158
158
|
return _async_to_generator(function() {
|
|
159
159
|
var m, type, contentType, controller, res, e;
|
|
160
160
|
return _ts_generator(this, function(_state) {
|
|
@@ -228,7 +228,7 @@ export var getRemoteMediaType = function(url) {
|
|
|
228
228
|
});
|
|
229
229
|
})();
|
|
230
230
|
};
|
|
231
|
-
export var convertRemoteImages = function(node, store) {
|
|
231
|
+
export var convertRemoteImages = function convertRemoteImages(node, store) {
|
|
232
232
|
return _async_to_generator(function() {
|
|
233
233
|
var _store_editor, schema, stack, _item_children, item, _item_url, _item_url1, ext, m, _stack;
|
|
234
234
|
return _ts_generator(this, function(_state) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import slash from "slash2";
|
|
2
|
-
export var isLink = function() {
|
|
2
|
+
export var isLink = function isLink() {
|
|
3
3
|
var url = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : '';
|
|
4
4
|
return /^[a-zA-Z]+:(\/\/)?/i.test(url);
|
|
5
5
|
};
|
|
6
|
-
export var parsePath = function(path) {
|
|
6
|
+
export var parsePath = function parsePath(path) {
|
|
7
7
|
var m = path.match(/#([^\n]*)/);
|
|
8
8
|
if (m) {
|
|
9
9
|
var hashPart = m[0];
|
|
@@ -20,6 +20,6 @@ export var parsePath = function(path) {
|
|
|
20
20
|
hash: null
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
|
-
export var toUnixPath = function(path) {
|
|
23
|
+
export var toUnixPath = function toUnixPath(path) {
|
|
24
24
|
return slash(path);
|
|
25
25
|
};
|
|
@@ -338,7 +338,7 @@ var PerformanceMonitor = /*#__PURE__*/ function() {
|
|
|
338
338
|
export var performanceMonitor = new PerformanceMonitor();
|
|
339
339
|
/**
|
|
340
340
|
* 性能监控装饰器
|
|
341
|
-
*/ export var withPerformanceMonitoring = function(operationType, fn) {
|
|
341
|
+
*/ export var withPerformanceMonitoring = function withPerformanceMonitoring(operationType, fn) {
|
|
342
342
|
return function() {
|
|
343
343
|
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
344
344
|
args[_key] = arguments[_key];
|
|
@@ -384,6 +384,6 @@ export var performanceMonitor = new PerformanceMonitor();
|
|
|
384
384
|
};
|
|
385
385
|
/**
|
|
386
386
|
* 生成操作ID
|
|
387
|
-
*/ export var generateOperationId = function() {
|
|
387
|
+
*/ export var generateOperationId = function generateOperationId() {
|
|
388
388
|
return "paste-".concat(Date.now(), "-").concat(Math.random().toString(36).substr(2, 9));
|
|
389
389
|
};
|
|
@@ -80,7 +80,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
80
80
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
81
81
|
}
|
|
82
82
|
/* eslint-disable @typescript-eslint/ban-types */ import { useCallback, useRef, useState } from "react";
|
|
83
|
-
export var useLocalState = function(data) {
|
|
83
|
+
export var useLocalState = function useLocalState(data) {
|
|
84
84
|
var initialData = _instanceof(data, Function) ? data() : data;
|
|
85
85
|
var _useState = _sliced_to_array(useState(initialData), 2), state = _useState[0], setReactState = _useState[1];
|
|
86
86
|
// Use ref to ensure we always have the latest state in our setter
|
|
@@ -74,7 +74,7 @@ import { useSubject } from "./subscribe";
|
|
|
74
74
|
* @param {BaseElement} el - 基础元素,用于确定操作的目标节点。
|
|
75
75
|
* @returns {[Editor, (props: Record<string, any>, current?: BaseElement) => void, (current?: BaseElement) => void]}
|
|
76
76
|
* 包含编辑器实例、更新函数和删除函数的元组。
|
|
77
|
-
*/ export var useMEditor = function(el) {
|
|
77
|
+
*/ export var useMEditor = function useMEditor(el) {
|
|
78
78
|
var editor = useSlate();
|
|
79
79
|
var update = useCallback(function(props, current) {
|
|
80
80
|
Transforms.setNodes(editor, props, {
|
|
@@ -103,7 +103,7 @@ import { useSubject } from "./subscribe";
|
|
|
103
103
|
* ```typescript
|
|
104
104
|
* const [isSelected, elementPath, editorStore] = useSelStatus(someElement);
|
|
105
105
|
* ```
|
|
106
|
-
*/ export var useSelStatus = function(element) {
|
|
106
|
+
*/ export var useSelStatus = function useSelStatus(element) {
|
|
107
107
|
var editor = useSlate();
|
|
108
108
|
var _useEditorStore = useEditorStore(), store = _useEditorStore.store, markdownEditorRef = _useEditorStore.markdownEditorRef;
|
|
109
109
|
var _useGetSetState = _sliced_to_array(useGetSetState({
|
|
@@ -6,7 +6,7 @@ import { useLayoutEffect } from "react";
|
|
|
6
6
|
* @param {Subject<T> | Observable<T>} subject - 要订阅的 `Subject` 或 `Observable`。
|
|
7
7
|
* @param {(value: T) => void} fn - 当 `subject` 发出新值时调用的回调函数。
|
|
8
8
|
* @param {any[]} [deps=[]] - 依赖项数组,当依赖项变化时重新订阅 `subject`。
|
|
9
|
-
*/ export var useSubject = function(subject, fn) {
|
|
9
|
+
*/ export var useSubject = function useSubject(subject, fn) {
|
|
10
10
|
var deps = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
11
11
|
useLayoutEffect(function() {
|
|
12
12
|
var _subject_subscribe;
|
|
@@ -117,7 +117,7 @@ export * from "./BaseMarkdownEditor";
|
|
|
117
117
|
* - 支持只读模式
|
|
118
118
|
* - 支持内容变化监听
|
|
119
119
|
* - 提供编辑器引用
|
|
120
|
-
*/ var MarkdownEditorComponent = function(props) {
|
|
120
|
+
*/ var MarkdownEditorComponent = function MarkdownEditorComponent(props) {
|
|
121
121
|
return /*#__PURE__*/ React.createElement(BaseMarkdownEditor, _object_spread_props(_object_spread({}, props), {
|
|
122
122
|
plugins: _to_consumable_array(standardPlugins || []).concat(_to_consumable_array((props === null || props === void 0 ? void 0 : props.plugins) || []))
|
|
123
123
|
}));
|
|
@@ -52,7 +52,7 @@ function _object_spread_props(target, source) {
|
|
|
52
52
|
}
|
|
53
53
|
import { MOBILE_BREAKPOINT, MOBILE_PADDING } from "../Constants/mobile";
|
|
54
54
|
import { resetComponent, useEditorStyleRegister } from "../Hooks/useStyle";
|
|
55
|
-
var genStyle = function(token) {
|
|
55
|
+
var genStyle = function genStyle(token) {
|
|
56
56
|
var _obj, _obj1, _obj2;
|
|
57
57
|
return _define_property({}, token.componentCls, (_obj2 = {
|
|
58
58
|
boxSizing: 'border-box',
|