@ant-design/agentic-ui 2.29.5 → 2.29.7
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 +17 -8
- package/dist/AgenticLayout/index.js +3 -5
- package/dist/BackTo/BackBottom.js +17 -8
- package/dist/BackTo/BackTop.js +17 -8
- package/dist/BackTo/ScrollVisibleButton.js +75 -11
- package/dist/Bubble/AIBubble.js +131 -121
- package/dist/Bubble/Avatar/index.js +19 -10
- package/dist/Bubble/FileView.js +2 -2
- package/dist/Bubble/List/PureBubbleList.js +4 -5
- package/dist/Bubble/List/index.js +4 -5
- package/dist/Bubble/List/style.js +3 -0
- package/dist/Bubble/MessagesContent/BubbleExtra.js +108 -93
- package/dist/Bubble/MessagesContent/CopyButton/index.js +36 -26
- package/dist/Bubble/MessagesContent/DocInfo.js +19 -10
- package/dist/Bubble/MessagesContent/MarkdownPreview.js +2 -2
- package/dist/Bubble/MessagesContent/index.js +149 -130
- package/dist/Bubble/PureBubble.js +151 -133
- package/dist/Bubble/UserBubble.js +1 -1
- package/dist/Bubble/style.js +2 -2
- package/dist/Bubble/types/BubbleExtra.js +4 -1
- package/dist/Bubble/types/DocInfo.js +9 -1
- package/dist/ChatLayout/components/FooterBackgroundLottie/images/img_0.png +0 -0
- package/dist/ChatLayout/components/FooterBackgroundLottie/images/img_1.png +0 -0
- package/dist/ChatLayout/components/FooterBackgroundLottie/images/img_2.png +0 -0
- package/dist/ChatLayout/components/FooterBackgroundLottie/index.d.ts +51 -0
- package/dist/ChatLayout/components/FooterBackgroundLottie/index.js +45 -0
- package/dist/ChatLayout/components/FooterBackgroundLottie/lottie.d.ts +85 -0
- package/dist/ChatLayout/components/FooterBackgroundLottie/lottie.js +382 -0
- package/dist/ChatLayout/index.js +52 -14
- package/dist/ChatLayout/style.js +11 -0
- package/dist/ChatLayout/types.d.ts +28 -0
- package/dist/Components/ActionIconBox/index.js +30 -38
- package/dist/Components/ActionItemBox/ActionItemBox.js +1 -1
- package/dist/Components/Button/SwitchButton/index.js +18 -17
- package/dist/Components/LayoutHeader/index.js +5 -3
- package/dist/Components/LayoutHeader/style.js +5 -0
- package/dist/Components/Loading/CreativeRecommendationLoading.js +2 -2
- package/dist/Components/Loading/CreativeSparkLoading.js +2 -2
- package/dist/Components/SuggestionList/index.js +20 -19
- package/dist/Components/TextAnimate/index.js +19 -10
- package/dist/Components/TypingAnimation/index.js +19 -10
- package/dist/Components/effects/EffectPlayer.js +20 -11
- package/dist/Components/icons/LoadingSpinnerIcon.js +19 -10
- package/dist/History/components/HistoryActionsBox.js +21 -23
- package/dist/History/components/HistoryItem.js +61 -53
- package/dist/History/components/HistoryRunningIcon.js +19 -10
- package/dist/History/components/LoadMoreComponent.js +61 -55
- package/dist/History/components/NewChatComponent.js +53 -47
- package/dist/History/components/SearchComponent.js +24 -26
- package/dist/History/hooks/useHistory.js +80 -73
- package/dist/History/index.js +17 -16
- package/dist/History/menu.js +17 -8
- package/dist/Hooks/useAutoScroll.js +19 -19
- package/dist/Hooks/useDebounceFn/index.js +51 -45
- package/dist/Hooks/useElementSize.d.ts +5 -0
- package/dist/Hooks/useElementSize.js +71 -0
- package/dist/Hooks/useIntersectionOnce.js +17 -8
- package/dist/Hooks/useLanguage.d.ts +3 -0
- package/dist/I18n/locales.d.ts +3 -0
- package/dist/I18n/locales.js +8 -0
- package/dist/MarkdownEditor/BaseMarkdownEditor.js +22 -12
- package/dist/MarkdownEditor/editor/Editor.js +31 -39
- package/dist/MarkdownEditor/editor/components/CommentList/index.js +29 -37
- package/dist/MarkdownEditor/editor/elements/Image/index.js +86 -71
- package/dist/MarkdownEditor/editor/elements/List/ListItem.js +17 -16
- package/dist/MarkdownEditor/editor/elements/Media/index.js +107 -92
- package/dist/MarkdownEditor/editor/elements/Table/Table.js +19 -10
- package/dist/MarkdownEditor/editor/elements/TagPopup/index.js +17 -16
- package/dist/MarkdownEditor/editor/parser/parse/parseBlockElements.js +1 -1
- package/dist/MarkdownEditor/editor/parser/parse/parseCode.js +1 -1
- package/dist/MarkdownEditor/editor/parser/parse/parseEmptyLines.js +1 -1
- package/dist/MarkdownEditor/editor/parser/parse/parseTable.js +4 -1
- package/dist/MarkdownEditor/editor/parser/parserSlateNodeToMarkdown.js +2 -2
- package/dist/MarkdownEditor/editor/parser/remarkParse.js +3 -1
- package/dist/MarkdownEditor/editor/plugins/handlePaste.js +25 -30
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/arrow.js +0 -1
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/enter.js +0 -1
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/match.js +0 -1
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/tab.js +0 -1
- package/dist/MarkdownEditor/editor/plugins/insertParsedHtmlNodes.js +39 -53
- package/dist/MarkdownEditor/editor/plugins/useKeyboard.js +1 -1
- package/dist/MarkdownEditor/editor/plugins/useOnchange.js +28 -22
- package/dist/MarkdownEditor/editor/plugins/withMarkdown.js +1 -1
- package/dist/MarkdownEditor/editor/store.js +17 -13
- package/dist/MarkdownEditor/editor/tools/InsertAutocomplete.js +202 -197
- package/dist/MarkdownEditor/editor/tools/InsertLink.js +2 -2
- package/dist/MarkdownEditor/editor/tools/ToolBar/ReadonlyBaseBar.js +142 -134
- package/dist/MarkdownEditor/editor/utils/ace.js +61 -61
- package/dist/MarkdownEditor/editor/utils/editorUtils.js +11 -4
- package/dist/MarkdownEditor/editor/utils/index.js +8 -2
- package/dist/MarkdownEditor/editor/utils/keyboard.js +31 -35
- package/dist/MarkdownEditor/editor/utils/markdownToHtml.js +23 -17
- package/dist/MarkdownEditor/editor/utils/media.js +21 -23
- package/dist/MarkdownEditor/editor/utils/performanceMonitor.js +55 -50
- package/dist/MarkdownEditor/editor/utils/useLocalState.js +11 -4
- package/dist/MarkdownEditor/types.d.ts +1 -0
- package/dist/MarkdownEditor/types.js +4 -1
- package/dist/MarkdownEditor/utils/native-table/native-table-editor.js +14 -14
- package/dist/MarkdownEditor/utils/native-table/native-table-keyboard.js +2 -2
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/style.js +1 -0
- package/dist/MarkdownInputField/AttachmentButton/index.js +33 -31
- package/dist/MarkdownInputField/BeforeToolContainer/BeforeToolContainer.js +14 -7
- package/dist/MarkdownInputField/FileMapView/FileMapViewItem.js +2 -2
- package/dist/MarkdownInputField/FileMapView/index.js +17 -16
- package/dist/MarkdownInputField/FilePaste/index.js +25 -30
- package/dist/MarkdownInputField/FileUploadManager/index.js +39 -40
- package/dist/MarkdownInputField/MarkdownInputField.js +38 -29
- package/dist/MarkdownInputField/QuickActions/index.js +66 -60
- package/dist/MarkdownInputField/SendButton/index.js +22 -13
- package/dist/MarkdownInputField/Suggestion/index.js +17 -16
- package/dist/MarkdownInputField/VoiceInput/index.js +51 -45
- package/dist/MarkdownInputField/VoiceInputManager/index.js +133 -125
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldHandlers.js +103 -101
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldStyles.js +1 -1
- package/dist/MarkdownInputField/style.js +1 -2
- package/dist/MarkdownInputField/types/MarkdownInputFieldProps.js +14 -1
- package/dist/Plugins/chart/BarChart/index.js +8 -8
- package/dist/Plugins/chart/ChartRender.js +52 -46
- package/dist/Plugins/chart/DonutChart/index.js +26 -17
- package/dist/Plugins/chart/DonutChart/plugins.js +1 -1
- package/dist/Plugins/chart/DonutChart/types.js +1 -1
- package/dist/Plugins/chart/FunnelChart/index.js +31 -28
- package/dist/Plugins/chart/LineChart/index.js +19 -10
- package/dist/Plugins/chart/RadarChart/index.js +19 -10
- package/dist/Plugins/chart/ScatterChart/index.js +19 -10
- package/dist/Plugins/chart/components/ChartContainer/ChartContainer.js +20 -11
- package/dist/Plugins/chart/index.js +31 -13
- package/dist/Plugins/chart/loadChartRuntime.js +17 -16
- package/dist/Plugins/chart/types/classNames.js +4 -1
- package/dist/Plugins/chart/utils.js +20 -20
- package/dist/Plugins/code/CodeUI/Katex/Katex.js +52 -46
- package/dist/Plugins/code/components/AceEditor.js +149 -133
- package/dist/Plugins/code/components/CodeRenderer.js +7 -7
- package/dist/Plugins/code/components/CodeToolbar.js +2 -2
- package/dist/Plugins/code/components/LanguageSelector.js +6 -6
- package/dist/Plugins/code/components/LoadImage.js +5 -5
- package/dist/Plugins/code/components/ThinkBlock.js +8 -8
- package/dist/Plugins/code/hooks/useCodeEditorState.js +5 -5
- package/dist/Plugins/code/index.js +6 -6
- package/dist/Plugins/code/langIconMap.js +0 -1
- package/dist/Plugins/code/langIcons/AbapIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ActionscriptIcon.js +19 -10
- package/dist/Plugins/code/langIcons/AdaIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ApacheIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ApexIcon.js +19 -10
- package/dist/Plugins/code/langIcons/AplIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ApplescriptIcon.js +19 -10
- package/dist/Plugins/code/langIcons/AstroIcon.js +19 -10
- package/dist/Plugins/code/langIcons/AwkIcon.js +19 -10
- package/dist/Plugins/code/langIcons/BallerinaIcon.js +19 -10
- package/dist/Plugins/code/langIcons/BatIcon.js +19 -10
- package/dist/Plugins/code/langIcons/BicepIcon.js +19 -10
- package/dist/Plugins/code/langIcons/BladeIcon.js +19 -10
- package/dist/Plugins/code/langIcons/CIcon.js +19 -10
- package/dist/Plugins/code/langIcons/CadenceIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ClojureIcon.js +19 -10
- package/dist/Plugins/code/langIcons/CmakeIcon.js +19 -10
- package/dist/Plugins/code/langIcons/CobolIcon.js +19 -10
- package/dist/Plugins/code/langIcons/CodeqlIcon.js +19 -10
- package/dist/Plugins/code/langIcons/CoffeeIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ConsoleIcon.js +19 -10
- package/dist/Plugins/code/langIcons/CppIcon.js +19 -10
- package/dist/Plugins/code/langIcons/CrystalIcon.js +19 -10
- package/dist/Plugins/code/langIcons/CsharpIcon.js +19 -10
- package/dist/Plugins/code/langIcons/CssIcon.js +19 -10
- package/dist/Plugins/code/langIcons/DIcon.js +19 -10
- package/dist/Plugins/code/langIcons/DartIcon.js +19 -10
- package/dist/Plugins/code/langIcons/DatabaseIcon.js +19 -10
- package/dist/Plugins/code/langIcons/DiffIcon.js +19 -10
- package/dist/Plugins/code/langIcons/DockerIcon.js +19 -10
- package/dist/Plugins/code/langIcons/DotenvIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ElixirIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ElmIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ErbIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ErlangIcon.js +19 -10
- package/dist/Plugins/code/langIcons/FsharpIcon.js +19 -10
- package/dist/Plugins/code/langIcons/GdscriptIcon.js +19 -10
- package/dist/Plugins/code/langIcons/GlslIcon.js +19 -10
- package/dist/Plugins/code/langIcons/GnuplotIcon.js +19 -10
- package/dist/Plugins/code/langIcons/GoIcon.js +19 -10
- package/dist/Plugins/code/langIcons/GraphqlIcon.js +19 -10
- package/dist/Plugins/code/langIcons/GroovyIcon.js +19 -10
- package/dist/Plugins/code/langIcons/HackIcon.js +19 -10
- package/dist/Plugins/code/langIcons/HamlIcon.js +19 -10
- package/dist/Plugins/code/langIcons/HandlebarsIcon.js +19 -10
- package/dist/Plugins/code/langIcons/HaskellIcon.js +19 -10
- package/dist/Plugins/code/langIcons/HclIcon.js +19 -10
- package/dist/Plugins/code/langIcons/HclLightIcon.js +19 -10
- package/dist/Plugins/code/langIcons/HjsonIcon.js +19 -10
- package/dist/Plugins/code/langIcons/HlslIcon.js +19 -10
- package/dist/Plugins/code/langIcons/HtmlIcon.js +19 -10
- package/dist/Plugins/code/langIcons/HttpIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ImbaIcon.js +19 -10
- package/dist/Plugins/code/langIcons/IniIcon.js +19 -10
- package/dist/Plugins/code/langIcons/JavaIcon.js +19 -10
- package/dist/Plugins/code/langIcons/JavascriptIcon.js +19 -10
- package/dist/Plugins/code/langIcons/JinjaIcon.js +19 -10
- package/dist/Plugins/code/langIcons/Json5Icon.js +19 -10
- package/dist/Plugins/code/langIcons/JsonIcon.js +19 -10
- package/dist/Plugins/code/langIcons/JsonnetIcon.js +19 -10
- package/dist/Plugins/code/langIcons/JuliaIcon.js +19 -10
- package/dist/Plugins/code/langIcons/KotlinIcon.js +19 -10
- package/dist/Plugins/code/langIcons/KustoIcon.js +19 -10
- package/dist/Plugins/code/langIcons/LessIcon.js +19 -10
- package/dist/Plugins/code/langIcons/LiquidIcon.js +19 -10
- package/dist/Plugins/code/langIcons/LispIcon.js +19 -10
- package/dist/Plugins/code/langIcons/LuaIcon.js +19 -10
- package/dist/Plugins/code/langIcons/MakefileIcon.js +19 -10
- package/dist/Plugins/code/langIcons/MarkdownIcon.js +19 -10
- package/dist/Plugins/code/langIcons/MarkojsIcon.js +19 -10
- package/dist/Plugins/code/langIcons/MatlabIcon.js +19 -10
- package/dist/Plugins/code/langIcons/MdxIcon.js +19 -10
- package/dist/Plugins/code/langIcons/MermaidIcon.js +19 -10
- package/dist/Plugins/code/langIcons/MojoIcon.js +19 -10
- package/dist/Plugins/code/langIcons/NginxIcon.js +19 -10
- package/dist/Plugins/code/langIcons/NimIcon.js +19 -10
- package/dist/Plugins/code/langIcons/NixIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ObjectiveCIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ObjectiveCppIcon.js +19 -10
- package/dist/Plugins/code/langIcons/OcamlIcon.js +19 -10
- package/dist/Plugins/code/langIcons/PascalIcon.js +19 -10
- package/dist/Plugins/code/langIcons/Perl6Icon.js +19 -10
- package/dist/Plugins/code/langIcons/PerlIcon.js +19 -10
- package/dist/Plugins/code/langIcons/PhpIcon.js +19 -10
- package/dist/Plugins/code/langIcons/PostcssIcon.js +19 -10
- package/dist/Plugins/code/langIcons/PowershellIcon.js +19 -10
- package/dist/Plugins/code/langIcons/PrismaIcon.js +19 -10
- package/dist/Plugins/code/langIcons/PrologIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ProtoIcon.js +19 -10
- package/dist/Plugins/code/langIcons/PugIcon.js +19 -10
- package/dist/Plugins/code/langIcons/PuppetIcon.js +19 -10
- package/dist/Plugins/code/langIcons/PurescriptIcon.js +19 -10
- package/dist/Plugins/code/langIcons/PythonIcon.js +19 -10
- package/dist/Plugins/code/langIcons/RIcon.js +19 -10
- package/dist/Plugins/code/langIcons/RazorIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ReactIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ReactTsIcon.js +19 -10
- package/dist/Plugins/code/langIcons/RubyIcon.js +19 -10
- package/dist/Plugins/code/langIcons/RustIcon.js +19 -10
- package/dist/Plugins/code/langIcons/SasIcon.js +19 -10
- package/dist/Plugins/code/langIcons/SassIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ScalaIcon.js +19 -10
- package/dist/Plugins/code/langIcons/SchemeIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ShaderlabIcon.js +19 -10
- package/dist/Plugins/code/langIcons/SolidityIcon.js +19 -10
- package/dist/Plugins/code/langIcons/SparqlIcon.js +19 -10
- package/dist/Plugins/code/langIcons/StataIcon.js +19 -10
- package/dist/Plugins/code/langIcons/StylusIcon.js +19 -10
- package/dist/Plugins/code/langIcons/SvelteIcon.js +19 -10
- package/dist/Plugins/code/langIcons/SwiftIcon.js +19 -10
- package/dist/Plugins/code/langIcons/SystemverilogIcon.js +19 -10
- package/dist/Plugins/code/langIcons/TclIcon.js +19 -10
- package/dist/Plugins/code/langIcons/TexIcon.js +19 -10
- package/dist/Plugins/code/langIcons/TomlIcon.js +19 -10
- package/dist/Plugins/code/langIcons/TwigIcon.js +19 -10
- package/dist/Plugins/code/langIcons/TypescriptIcon.js +19 -10
- package/dist/Plugins/code/langIcons/VerilogIcon.js +19 -10
- package/dist/Plugins/code/langIcons/VhdlIcon.js +19 -10
- package/dist/Plugins/code/langIcons/VimIcon.js +19 -10
- package/dist/Plugins/code/langIcons/VueIcon.js +19 -10
- package/dist/Plugins/code/langIcons/WebassemblyIcon.js +19 -10
- package/dist/Plugins/code/langIcons/WenyanIcon.js +19 -10
- package/dist/Plugins/code/langIcons/WgslIcon.js +19 -10
- package/dist/Plugins/code/langIcons/WolframlanguageIcon.js +19 -10
- package/dist/Plugins/code/langIcons/XmlIcon.js +19 -10
- package/dist/Plugins/code/langIcons/XslIcon.js +19 -10
- package/dist/Plugins/code/langIcons/YamlIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ZigIcon.js +19 -10
- package/dist/Plugins/code/loadAceEditor.js +21 -23
- package/dist/Plugins/code/utils/langOptions.js +6 -6
- package/dist/Plugins/formatter/index.js +6 -6
- package/dist/Plugins/katex/InlineKatex.js +52 -46
- package/dist/Plugins/katex/Katex.js +53 -47
- package/dist/Plugins/katex/index.js +6 -6
- package/dist/Plugins/katex/loadKatex.js +27 -29
- package/dist/Plugins/mermaid/Mermaid.js +34 -28
- package/dist/Plugins/mermaid/useMermaidRender.js +103 -97
- package/dist/Plugins/mermaid/utils.js +25 -17
- package/dist/Schema/SchemaEditor/AceEditorWrapper.js +162 -150
- package/dist/Schema/SchemaEditor/index.js +8 -1
- package/dist/Schema/SchemaForm/index.js +2 -2
- package/dist/Schema/SchemaRenderer/index.js +45 -46
- package/dist/ThoughtChainList/index.js +22 -13
- package/dist/ToolUseBar/BarItem/Content.js +3 -3
- package/dist/ToolUseBar/BarItem/index.js +10 -3
- package/dist/ToolUseBar/index.js +19 -10
- package/dist/ToolUseBar/style.js +4 -4
- package/dist/Types/common.js +4 -1
- package/dist/Types/message.js +4 -1
- package/dist/Utils/debugUtils.js +8 -8
- package/dist/Utils/getScroll.js +12 -5
- package/dist/Utils/loadCSS.js +23 -22
- package/dist/Utils/proxySandbox/ProxySandbox.js +42 -34
- package/dist/Utils/proxySandbox/SecurityContextManager.js +54 -54
- package/dist/Utils/proxySandbox/index.js +25 -22
- package/dist/Utils/proxySandbox/types.js +11 -11
- package/dist/Utils/scrollTo.js +8 -1
- package/dist/WelcomeMessage/index.js +1 -1
- package/dist/Workspace/File/FileComponent.js +91 -66
- package/dist/Workspace/File/PreviewComponent.js +15 -8
- package/dist/Workspace/File/index.d.ts +1 -1
- package/dist/Workspace/File/style.js +7 -0
- package/dist/Workspace/RealtimeFollow/index.js +1 -2
- package/dist/Workspace/index.js +13 -11
- package/dist/Workspace/style.js +8 -14
- package/dist/Workspace/types.d.ts +50 -0
- package/dist/Workspace/types.js +0 -1
- package/package.json +25 -25
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
function _array_like_to_array(arr, len) {
|
|
2
2
|
if (len == null || len > arr.length) len = arr.length;
|
|
3
3
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4
4
|
return arr2;
|
|
@@ -138,7 +138,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
138
138
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
139
139
|
}
|
|
140
140
|
function _ts_generator(thisArg, body) {
|
|
141
|
-
var f, y, t,
|
|
141
|
+
var f, y, t, _ = {
|
|
142
142
|
label: 0,
|
|
143
143
|
sent: function() {
|
|
144
144
|
if (t[0] & 1) throw t[1];
|
|
@@ -146,13 +146,17 @@ function _ts_generator(thisArg, body) {
|
|
|
146
146
|
},
|
|
147
147
|
trys: [],
|
|
148
148
|
ops: []
|
|
149
|
-
};
|
|
150
|
-
return g
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
},
|
|
155
|
-
|
|
149
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
150
|
+
return d(g, "next", {
|
|
151
|
+
value: verb(0)
|
|
152
|
+
}), d(g, "throw", {
|
|
153
|
+
value: verb(1)
|
|
154
|
+
}), d(g, "return", {
|
|
155
|
+
value: verb(2)
|
|
156
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
157
|
+
value: function() {
|
|
158
|
+
return this;
|
|
159
|
+
}
|
|
156
160
|
}), g;
|
|
157
161
|
function verb(n) {
|
|
158
162
|
return function(v) {
|
|
@@ -164,7 +168,7 @@ function _ts_generator(thisArg, body) {
|
|
|
164
168
|
}
|
|
165
169
|
function step(op) {
|
|
166
170
|
if (f) throw new TypeError("Generator is already executing.");
|
|
167
|
-
while(_)try {
|
|
171
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
168
172
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
169
173
|
if (y = 0, t) op = [
|
|
170
174
|
op[0] & 2,
|
|
@@ -232,7 +236,7 @@ function _ts_generator(thisArg, body) {
|
|
|
232
236
|
};
|
|
233
237
|
}
|
|
234
238
|
}
|
|
235
|
-
import { message } from "antd";
|
|
239
|
+
/* eslint-disable @typescript-eslint/no-use-before-define */ /* eslint-disable no-param-reassign */ import { message } from "antd";
|
|
236
240
|
import { Editor, Element, Node, Path, Range, Transforms } from "slate";
|
|
237
241
|
import { jsx } from "slate-hyperscript";
|
|
238
242
|
import { debugInfo } from "../../../Utils/debugUtils";
|
|
@@ -585,8 +589,8 @@ var getTextsNode = function(nodes) {
|
|
|
585
589
|
}
|
|
586
590
|
return text;
|
|
587
591
|
};
|
|
588
|
-
var blobToFile =
|
|
589
|
-
|
|
592
|
+
var blobToFile = function(blobUrl, fileName) {
|
|
593
|
+
return _async_to_generator(function() {
|
|
590
594
|
var blob, file;
|
|
591
595
|
return _ts_generator(this, function(_state) {
|
|
592
596
|
switch(_state.label){
|
|
@@ -608,15 +612,12 @@ var blobToFile = /*#__PURE__*/ function() {
|
|
|
608
612
|
];
|
|
609
613
|
}
|
|
610
614
|
});
|
|
611
|
-
});
|
|
612
|
-
|
|
613
|
-
return _ref.apply(this, arguments);
|
|
614
|
-
};
|
|
615
|
-
}();
|
|
615
|
+
})();
|
|
616
|
+
};
|
|
616
617
|
/**
|
|
617
618
|
* 分段处理文件上传,避免阻塞主线程
|
|
618
|
-
*/ var upLoadFileBatch =
|
|
619
|
-
|
|
619
|
+
*/ var upLoadFileBatch = function(fragmentList, editorProps) {
|
|
620
|
+
return _async_to_generator(function() {
|
|
620
621
|
var mediaFragments, collectMediaFragments, hideLoading, i, batch, progress, error;
|
|
621
622
|
return _ts_generator(this, function(_state) {
|
|
622
623
|
switch(_state.label){
|
|
@@ -676,8 +677,8 @@ var blobToFile = /*#__PURE__*/ function() {
|
|
|
676
677
|
batch = mediaFragments.slice(i, i + BATCH_SIZE);
|
|
677
678
|
return [
|
|
678
679
|
4,
|
|
679
|
-
Promise.all(batch.map(
|
|
680
|
-
|
|
680
|
+
Promise.all(batch.map(function(fragment) {
|
|
681
|
+
return _async_to_generator(function() {
|
|
681
682
|
var url, _editorProps_image, file, serverUrl, _editorProps_image1, serverUrl1;
|
|
682
683
|
return _ts_generator(this, function(_state) {
|
|
683
684
|
switch(_state.label){
|
|
@@ -739,11 +740,8 @@ var blobToFile = /*#__PURE__*/ function() {
|
|
|
739
740
|
];
|
|
740
741
|
}
|
|
741
742
|
});
|
|
742
|
-
});
|
|
743
|
-
|
|
744
|
-
return _ref.apply(this, arguments);
|
|
745
|
-
};
|
|
746
|
-
}()))
|
|
743
|
+
})();
|
|
744
|
+
}))
|
|
747
745
|
];
|
|
748
746
|
case 3:
|
|
749
747
|
_state.sent();
|
|
@@ -795,15 +793,12 @@ var blobToFile = /*#__PURE__*/ function() {
|
|
|
795
793
|
];
|
|
796
794
|
}
|
|
797
795
|
});
|
|
798
|
-
});
|
|
799
|
-
|
|
800
|
-
return _ref.apply(this, arguments);
|
|
801
|
-
};
|
|
802
|
-
}();
|
|
796
|
+
})();
|
|
797
|
+
};
|
|
803
798
|
/**
|
|
804
799
|
* 分段插入节点,避免一次性插入大量内容导致卡顿
|
|
805
|
-
*/ var insertNodesBatch =
|
|
806
|
-
|
|
800
|
+
*/ var insertNodesBatch = function(editor, nodes, at, options) {
|
|
801
|
+
return _async_to_generator(function() {
|
|
807
802
|
var i, batch, insertAt;
|
|
808
803
|
return _ts_generator(this, function(_state) {
|
|
809
804
|
switch(_state.label){
|
|
@@ -858,15 +853,12 @@ var blobToFile = /*#__PURE__*/ function() {
|
|
|
858
853
|
];
|
|
859
854
|
}
|
|
860
855
|
});
|
|
861
|
-
});
|
|
862
|
-
|
|
863
|
-
return _ref.apply(this, arguments);
|
|
864
|
-
};
|
|
865
|
-
}();
|
|
856
|
+
})();
|
|
857
|
+
};
|
|
866
858
|
/**
|
|
867
859
|
* 优化的HTML解析函数,支持分段处理
|
|
868
|
-
*/ var parseHtmlOptimized =
|
|
869
|
-
|
|
860
|
+
*/ var parseHtmlOptimized = function(html, rtf) {
|
|
861
|
+
return _async_to_generator(function() {
|
|
870
862
|
var result;
|
|
871
863
|
return _ts_generator(this, function(_state) {
|
|
872
864
|
debugInfo('parseHtmlOptimized - 开始解析', {
|
|
@@ -923,11 +915,8 @@ var blobToFile = /*#__PURE__*/ function() {
|
|
|
923
915
|
})
|
|
924
916
|
];
|
|
925
917
|
});
|
|
926
|
-
});
|
|
927
|
-
|
|
928
|
-
return _ref.apply(this, arguments);
|
|
929
|
-
};
|
|
930
|
-
}();
|
|
918
|
+
})();
|
|
919
|
+
};
|
|
931
920
|
/**
|
|
932
921
|
* 转化 html 到 slate - 性能优化版本
|
|
933
922
|
* @param editor
|
|
@@ -965,8 +954,8 @@ var blobToFile = /*#__PURE__*/ function() {
|
|
|
965
954
|
});
|
|
966
955
|
return result;
|
|
967
956
|
};
|
|
968
|
-
export var insertParsedHtmlNodes =
|
|
969
|
-
|
|
957
|
+
export var insertParsedHtmlNodes = function(editor, html, editorProps, rtl) {
|
|
958
|
+
return _async_to_generator(function() {
|
|
970
959
|
var hideLoading, fragmentList, _Editor_nodes, node, selection, processedNodes, back, _Editor_nodes1, specialNode, parsed, inner, hasCodeTags, textContent, children, _Editor_nodes2, p, parent, nextPath, texts, text, processedNodes1, error;
|
|
971
960
|
return _ts_generator(this, function(_state) {
|
|
972
961
|
switch(_state.label){
|
|
@@ -1378,8 +1367,5 @@ export var insertParsedHtmlNodes = /*#__PURE__*/ function() {
|
|
|
1378
1367
|
];
|
|
1379
1368
|
}
|
|
1380
1369
|
});
|
|
1381
|
-
});
|
|
1382
|
-
|
|
1383
|
-
return _ref.apply(this, arguments);
|
|
1384
|
-
};
|
|
1385
|
-
}();
|
|
1370
|
+
})();
|
|
1371
|
+
};
|
|
@@ -45,7 +45,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
45
45
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
46
46
|
}
|
|
47
47
|
import isHotkey from "is-hotkey";
|
|
48
|
-
import
|
|
48
|
+
import { useMemo } from "react";
|
|
49
49
|
import { Editor, Element, Node, Path, Range, Transforms } from "slate";
|
|
50
50
|
import { EditorUtils } from "../utils/editorUtils";
|
|
51
51
|
import { BackspaceKey } from "./hotKeyCommands/backspace";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
function _array_like_to_array(arr, len) {
|
|
2
2
|
if (len == null || len > arr.length) len = arr.length;
|
|
3
3
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4
4
|
return arr2;
|
|
@@ -74,7 +74,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
74
74
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
75
75
|
}
|
|
76
76
|
function _ts_generator(thisArg, body) {
|
|
77
|
-
var f, y, t,
|
|
77
|
+
var f, y, t, _ = {
|
|
78
78
|
label: 0,
|
|
79
79
|
sent: function() {
|
|
80
80
|
if (t[0] & 1) throw t[1];
|
|
@@ -82,13 +82,17 @@ function _ts_generator(thisArg, body) {
|
|
|
82
82
|
},
|
|
83
83
|
trys: [],
|
|
84
84
|
ops: []
|
|
85
|
-
};
|
|
86
|
-
return g
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
},
|
|
91
|
-
|
|
85
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
86
|
+
return d(g, "next", {
|
|
87
|
+
value: verb(0)
|
|
88
|
+
}), d(g, "throw", {
|
|
89
|
+
value: verb(1)
|
|
90
|
+
}), d(g, "return", {
|
|
91
|
+
value: verb(2)
|
|
92
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
93
|
+
value: function() {
|
|
94
|
+
return this;
|
|
95
|
+
}
|
|
92
96
|
}), g;
|
|
93
97
|
function verb(n) {
|
|
94
98
|
return function(v) {
|
|
@@ -100,7 +104,7 @@ function _ts_generator(thisArg, body) {
|
|
|
100
104
|
}
|
|
101
105
|
function step(op) {
|
|
102
106
|
if (f) throw new TypeError("Generator is already executing.");
|
|
103
|
-
while(_)try {
|
|
107
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
104
108
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
105
109
|
if (y = 0, t) op = [
|
|
106
110
|
op[0] & 2,
|
|
@@ -168,7 +172,7 @@ function _ts_generator(thisArg, body) {
|
|
|
168
172
|
};
|
|
169
173
|
}
|
|
170
174
|
}
|
|
171
|
-
import { useDebounceFn } from "@ant-design/pro-components";
|
|
175
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */ import { useDebounceFn } from "@ant-design/pro-components";
|
|
172
176
|
import React, { useRef } from "react";
|
|
173
177
|
import { Subject } from "rxjs";
|
|
174
178
|
import { Editor, Element, Path, Range } from "slate";
|
|
@@ -188,17 +192,19 @@ var floatBarIgnoreNode = new Set([
|
|
|
188
192
|
* @returns 一个函数,用于处理编辑器内容变化。
|
|
189
193
|
*/ export function useOnchange(editor, onChange) {
|
|
190
194
|
var rangeContent = useRef('');
|
|
191
|
-
var onChangeDebounce = useDebounceFn(
|
|
192
|
-
return
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
195
|
+
var onChangeDebounce = useDebounceFn(function() {
|
|
196
|
+
return _async_to_generator(function() {
|
|
197
|
+
return _ts_generator(this, function(_state) {
|
|
198
|
+
if (!onChange) return [
|
|
199
|
+
2
|
|
200
|
+
];
|
|
201
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(parserSlateNodeToMarkdown(editor.children), editor.children);
|
|
202
|
+
return [
|
|
203
|
+
2
|
|
204
|
+
];
|
|
205
|
+
});
|
|
206
|
+
})();
|
|
207
|
+
}, 16);
|
|
202
208
|
var _useEditorStore = useEditorStore(), setRefreshFloatBar = _useEditorStore.setRefreshFloatBar, setDomRect = _useEditorStore.setDomRect, refreshFloatBar = _useEditorStore.refreshFloatBar;
|
|
203
209
|
return React.useMemo(function() {
|
|
204
210
|
return function(_value, _operations) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
function _array_like_to_array(arr, len) {
|
|
2
2
|
if (len == null || len > arr.length) len = arr.length;
|
|
3
3
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4
4
|
return arr2;
|
|
@@ -41,6 +41,13 @@ function _define_property(obj, key, value) {
|
|
|
41
41
|
}
|
|
42
42
|
return obj;
|
|
43
43
|
}
|
|
44
|
+
function _instanceof(left, right) {
|
|
45
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
46
|
+
return !!right[Symbol.hasInstance](left);
|
|
47
|
+
} else {
|
|
48
|
+
return left instanceof right;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
44
51
|
function _iterable_to_array(iter) {
|
|
45
52
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
46
53
|
}
|
|
@@ -127,7 +134,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
127
134
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
128
135
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
129
136
|
}
|
|
130
|
-
import isEqual from "lodash-es/isEqual";
|
|
137
|
+
/* eslint-disable @typescript-eslint/no-this-alias */ /* eslint-disable no-param-reassign */ import isEqual from "lodash-es/isEqual";
|
|
131
138
|
import { parse } from "querystring";
|
|
132
139
|
import * as React from "react";
|
|
133
140
|
import { Editor, Element, Node, Path, Range, Text, Transforms } from "slate";
|
|
@@ -417,17 +424,14 @@ export var EditorStoreContext = createContext(null);
|
|
|
417
424
|
* @returns 如果使用 RAF,返回 Promise;否则同步执行
|
|
418
425
|
*/ key: "setMDContent",
|
|
419
426
|
value: function setMDContent(md, plugins, options) {
|
|
427
|
+
var _ref, _ref1, _ref2, _ref3;
|
|
420
428
|
if (md === undefined) return;
|
|
421
429
|
if (this._shouldSkipSetContent(md)) return;
|
|
422
430
|
this.cancelSetMDContent();
|
|
423
|
-
var
|
|
424
|
-
var
|
|
425
|
-
var
|
|
426
|
-
var
|
|
427
|
-
var _options_useRAF;
|
|
428
|
-
var useRAF = (_options_useRAF = options === null || options === void 0 ? void 0 : options.useRAF) !== null && _options_useRAF !== void 0 ? _options_useRAF : true;
|
|
429
|
-
var _options_batchSize;
|
|
430
|
-
var batchSize = (_options_batchSize = options === null || options === void 0 ? void 0 : options.batchSize) !== null && _options_batchSize !== void 0 ? _options_batchSize : 50;
|
|
431
|
+
var chunkSize = (_ref = options === null || options === void 0 ? void 0 : options.chunkSize) !== null && _ref !== void 0 ? _ref : 5000;
|
|
432
|
+
var separator = (_ref1 = options === null || options === void 0 ? void 0 : options.separator) !== null && _ref1 !== void 0 ? _ref1 : /\n\n/;
|
|
433
|
+
var useRAF = (_ref2 = options === null || options === void 0 ? void 0 : options.useRAF) !== null && _ref2 !== void 0 ? _ref2 : true;
|
|
434
|
+
var batchSize = (_ref3 = options === null || options === void 0 ? void 0 : options.batchSize) !== null && _ref3 !== void 0 ? _ref3 : 50;
|
|
431
435
|
var targetPlugins = plugins || this.plugins;
|
|
432
436
|
if (md.length <= chunkSize) {
|
|
433
437
|
return this._setShortContent(md, targetPlugins, options === null || options === void 0 ? void 0 : options.onProgress);
|
|
@@ -902,9 +906,9 @@ export var EditorStoreContext = createContext(null);
|
|
|
902
906
|
* @returns finished 属性值
|
|
903
907
|
* @private
|
|
904
908
|
*/ function _getNodeFinished(node) {
|
|
909
|
+
var _ref;
|
|
905
910
|
var _node_otherProps;
|
|
906
|
-
|
|
907
|
-
return (_node_finished = node === null || node === void 0 ? void 0 : node.finished) !== null && _node_finished !== void 0 ? _node_finished : node === null || node === void 0 ? void 0 : (_node_otherProps = node.otherProps) === null || _node_otherProps === void 0 ? void 0 : _node_otherProps.finished;
|
|
911
|
+
return (_ref = node === null || node === void 0 ? void 0 : node.finished) !== null && _ref !== void 0 ? _ref : node === null || node === void 0 ? void 0 : (_node_otherProps = node.otherProps) === null || _node_otherProps === void 0 ? void 0 : _node_otherProps.finished;
|
|
908
912
|
}
|
|
909
913
|
},
|
|
910
914
|
{
|
|
@@ -2266,7 +2270,7 @@ export var EditorStoreContext = createContext(null);
|
|
|
2266
2270
|
* ```
|
|
2267
2271
|
*/ key: "setState",
|
|
2268
2272
|
value: function setState(value) {
|
|
2269
|
-
if (value
|
|
2273
|
+
if (_instanceof(value, Function)) {
|
|
2270
2274
|
value(this);
|
|
2271
2275
|
} else {
|
|
2272
2276
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|