@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
|
@@ -27,8 +27,15 @@ function _async_to_generator(fn) {
|
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
+
function _instanceof(left, right) {
|
|
31
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
32
|
+
return !!right[Symbol.hasInstance](left);
|
|
33
|
+
} else {
|
|
34
|
+
return left instanceof right;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
30
37
|
function _ts_generator(thisArg, body) {
|
|
31
|
-
var f, y, t,
|
|
38
|
+
var f, y, t, _ = {
|
|
32
39
|
label: 0,
|
|
33
40
|
sent: function() {
|
|
34
41
|
if (t[0] & 1) throw t[1];
|
|
@@ -36,13 +43,17 @@ function _ts_generator(thisArg, body) {
|
|
|
36
43
|
},
|
|
37
44
|
trys: [],
|
|
38
45
|
ops: []
|
|
39
|
-
};
|
|
40
|
-
return g
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
47
|
+
return d(g, "next", {
|
|
48
|
+
value: verb(0)
|
|
49
|
+
}), d(g, "throw", {
|
|
50
|
+
value: verb(1)
|
|
51
|
+
}), d(g, "return", {
|
|
52
|
+
value: verb(2)
|
|
53
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
54
|
+
value: function() {
|
|
55
|
+
return this;
|
|
56
|
+
}
|
|
46
57
|
}), g;
|
|
47
58
|
function verb(n) {
|
|
48
59
|
return function(v) {
|
|
@@ -54,7 +65,7 @@ function _ts_generator(thisArg, body) {
|
|
|
54
65
|
}
|
|
55
66
|
function step(op) {
|
|
56
67
|
if (f) throw new TypeError("Generator is already executing.");
|
|
57
|
-
while(_)try {
|
|
68
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
58
69
|
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;
|
|
59
70
|
if (y = 0, t) op = [
|
|
60
71
|
op[0] & 2,
|
|
@@ -126,8 +137,8 @@ var mermaidLoader = null;
|
|
|
126
137
|
/**
|
|
127
138
|
* 加载 Mermaid 库
|
|
128
139
|
* 使用单例模式确保只加载一次,并初始化配置
|
|
129
|
-
*/ export var loadMermaid =
|
|
130
|
-
|
|
140
|
+
*/ export var loadMermaid = function() {
|
|
141
|
+
return _async_to_generator(function() {
|
|
131
142
|
return _ts_generator(this, function(_state) {
|
|
132
143
|
if (typeof window === 'undefined') {
|
|
133
144
|
throw new Error('Mermaid 仅在浏览器环境中可用');
|
|
@@ -153,11 +164,8 @@ var mermaidLoader = null;
|
|
|
153
164
|
mermaidLoader
|
|
154
165
|
];
|
|
155
166
|
});
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
return _ref.apply(this, arguments);
|
|
159
|
-
};
|
|
160
|
-
}();
|
|
167
|
+
})();
|
|
168
|
+
};
|
|
161
169
|
/**
|
|
162
170
|
* 渲染 SVG 到容器
|
|
163
171
|
*/ export var renderSvgToContainer = function(svg, container) {
|
|
@@ -176,7 +184,7 @@ var mermaidLoader = null;
|
|
|
176
184
|
svgElement.setAttribute('class', (svgElement.getAttribute('class') || '') + ' mermaid-isolated');
|
|
177
185
|
var allElements = svgElement.querySelectorAll('*');
|
|
178
186
|
allElements.forEach(function(el) {
|
|
179
|
-
if (el
|
|
187
|
+
if (_instanceof(el, SVGElement)) {
|
|
180
188
|
el.setAttribute('data-mermaid-internal', 'true');
|
|
181
189
|
}
|
|
182
190
|
});
|
|
@@ -121,7 +121,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
121
121
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
122
122
|
}
|
|
123
123
|
function _ts_generator(thisArg, body) {
|
|
124
|
-
var f, y, t,
|
|
124
|
+
var f, y, t, _ = {
|
|
125
125
|
label: 0,
|
|
126
126
|
sent: function() {
|
|
127
127
|
if (t[0] & 1) throw t[1];
|
|
@@ -129,13 +129,17 @@ function _ts_generator(thisArg, body) {
|
|
|
129
129
|
},
|
|
130
130
|
trys: [],
|
|
131
131
|
ops: []
|
|
132
|
-
};
|
|
133
|
-
return g
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
},
|
|
138
|
-
|
|
132
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
133
|
+
return d(g, "next", {
|
|
134
|
+
value: verb(0)
|
|
135
|
+
}), d(g, "throw", {
|
|
136
|
+
value: verb(1)
|
|
137
|
+
}), d(g, "return", {
|
|
138
|
+
value: verb(2)
|
|
139
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
140
|
+
value: function() {
|
|
141
|
+
return this;
|
|
142
|
+
}
|
|
139
143
|
}), g;
|
|
140
144
|
function verb(n) {
|
|
141
145
|
return function(v) {
|
|
@@ -147,7 +151,7 @@ function _ts_generator(thisArg, body) {
|
|
|
147
151
|
}
|
|
148
152
|
function step(op) {
|
|
149
153
|
if (f) throw new TypeError("Generator is already executing.");
|
|
150
|
-
while(_)try {
|
|
154
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
151
155
|
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;
|
|
152
156
|
if (y = 0, t) op = [
|
|
153
157
|
op[0] & 2,
|
|
@@ -258,109 +262,115 @@ if (typeof window !== 'undefined' && !window.ResizeObserver) {
|
|
|
258
262
|
var _useState = _sliced_to_array(useState(false), 2), aceLoaded = _useState[0], setAceLoaded = _useState[1];
|
|
259
263
|
// 异步加载 Ace Editor
|
|
260
264
|
useEffect(function() {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
265
|
+
(function() {
|
|
266
|
+
return _async_to_generator(function() {
|
|
267
|
+
var aceModule, error;
|
|
268
|
+
return _ts_generator(this, function(_state) {
|
|
269
|
+
switch(_state.label){
|
|
270
|
+
case 0:
|
|
271
|
+
_state.trys.push([
|
|
272
|
+
0,
|
|
273
|
+
2,
|
|
274
|
+
,
|
|
275
|
+
3
|
|
276
|
+
]);
|
|
277
|
+
return [
|
|
278
|
+
4,
|
|
279
|
+
loadAceEditor()
|
|
280
|
+
];
|
|
281
|
+
case 1:
|
|
282
|
+
aceModule = _state.sent();
|
|
283
|
+
aceModuleRef.current = aceModule;
|
|
284
|
+
setAceLoaded(true);
|
|
285
|
+
return [
|
|
286
|
+
3,
|
|
287
|
+
3
|
|
288
|
+
];
|
|
289
|
+
case 2:
|
|
290
|
+
error = _state.sent();
|
|
291
|
+
console.error('Failed to load Ace Editor:', error);
|
|
292
|
+
setAceLoaded(true);
|
|
293
|
+
return [
|
|
294
|
+
3,
|
|
295
|
+
3
|
|
296
|
+
];
|
|
297
|
+
case 3:
|
|
298
|
+
return [
|
|
299
|
+
2
|
|
300
|
+
];
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
})();
|
|
298
304
|
})();
|
|
299
305
|
}, []);
|
|
300
306
|
// 初始化编辑器
|
|
301
307
|
useEffect(function() {
|
|
302
308
|
if (!aceLoaded || !aceModuleRef.current || !containerRef.current) return;
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
309
|
+
(function() {
|
|
310
|
+
return _async_to_generator(function() {
|
|
311
|
+
var ace, codeEditor;
|
|
312
|
+
return _ts_generator(this, function(_state) {
|
|
313
|
+
try {
|
|
314
|
+
ace = aceModuleRef.current.default || aceModuleRef.current;
|
|
315
|
+
codeEditor = ace.edit(containerRef.current, _object_spread({
|
|
316
|
+
useWorker: false,
|
|
317
|
+
value: value,
|
|
318
|
+
fontSize: 12,
|
|
319
|
+
animatedScroll: true,
|
|
320
|
+
maxLines: Infinity,
|
|
321
|
+
wrap: true,
|
|
322
|
+
tabSize: 4,
|
|
323
|
+
readOnly: readonly,
|
|
324
|
+
showPrintMargin: false,
|
|
325
|
+
showLineNumbers: true,
|
|
326
|
+
showGutter: true
|
|
327
|
+
}, options));
|
|
328
|
+
editorRef.current = codeEditor;
|
|
329
|
+
// 设置语法高亮
|
|
330
|
+
setTimeout(function() {
|
|
331
|
+
return _async_to_generator(function() {
|
|
332
|
+
var lang, aceLangs;
|
|
333
|
+
return _ts_generator(this, function(_state) {
|
|
334
|
+
switch(_state.label){
|
|
335
|
+
case 0:
|
|
336
|
+
lang = language.toLowerCase();
|
|
337
|
+
if (modeMap.has(lang)) {
|
|
338
|
+
lang = modeMap.get(lang);
|
|
339
|
+
}
|
|
340
|
+
return [
|
|
341
|
+
4,
|
|
342
|
+
getAceLangs()
|
|
343
|
+
];
|
|
344
|
+
case 1:
|
|
345
|
+
aceLangs = _state.sent();
|
|
346
|
+
if (aceLangs.has(lang)) {
|
|
347
|
+
codeEditor.session.setMode("ace/mode/".concat(lang));
|
|
348
|
+
}
|
|
349
|
+
return [
|
|
350
|
+
2
|
|
351
|
+
];
|
|
340
352
|
}
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
353
|
+
});
|
|
354
|
+
})();
|
|
355
|
+
}, 16);
|
|
356
|
+
// 配置编辑器事件
|
|
357
|
+
if (!readonly && onChange) {
|
|
358
|
+
codeEditor.on('change', function() {
|
|
359
|
+
var newValue = codeEditor.getValue();
|
|
360
|
+
if (newValue !== valueRef.current) {
|
|
361
|
+
valueRef.current = newValue;
|
|
362
|
+
onChange(newValue);
|
|
363
|
+
}
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
} catch (error) {
|
|
367
|
+
console.error('Failed to initialize Ace Editor:', error);
|
|
356
368
|
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
];
|
|
363
|
-
});
|
|
369
|
+
return [
|
|
370
|
+
2
|
|
371
|
+
];
|
|
372
|
+
});
|
|
373
|
+
})();
|
|
364
374
|
})();
|
|
365
375
|
return function() {
|
|
366
376
|
var _editorRef_current;
|
|
@@ -385,51 +395,53 @@ if (typeof window !== 'undefined' && !window.ResizeObserver) {
|
|
|
385
395
|
// 更新语言
|
|
386
396
|
useEffect(function() {
|
|
387
397
|
if (!editorRef.current || !aceLoaded) return;
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
398
|
+
(function() {
|
|
399
|
+
return _async_to_generator(function() {
|
|
400
|
+
var lang, aceLangs, _editorRef_current, _editorRef_current1, error;
|
|
401
|
+
return _ts_generator(this, function(_state) {
|
|
402
|
+
switch(_state.label){
|
|
403
|
+
case 0:
|
|
404
|
+
_state.trys.push([
|
|
405
|
+
0,
|
|
406
|
+
2,
|
|
407
|
+
,
|
|
408
|
+
3
|
|
409
|
+
]);
|
|
410
|
+
lang = language.toLowerCase();
|
|
411
|
+
if (modeMap.has(lang)) {
|
|
412
|
+
lang = modeMap.get(lang);
|
|
413
|
+
}
|
|
414
|
+
return [
|
|
415
|
+
4,
|
|
416
|
+
getAceLangs()
|
|
417
|
+
];
|
|
418
|
+
case 1:
|
|
419
|
+
aceLangs = _state.sent();
|
|
420
|
+
if (aceLangs.has(lang)) {
|
|
421
|
+
;
|
|
422
|
+
(_editorRef_current = editorRef.current) === null || _editorRef_current === void 0 ? void 0 : _editorRef_current.session.setMode("ace/mode/".concat(lang));
|
|
423
|
+
} else {
|
|
424
|
+
;
|
|
425
|
+
(_editorRef_current1 = editorRef.current) === null || _editorRef_current1 === void 0 ? void 0 : _editorRef_current1.session.setMode("ace/mode/text");
|
|
426
|
+
}
|
|
427
|
+
return [
|
|
428
|
+
3,
|
|
429
|
+
3
|
|
430
|
+
];
|
|
431
|
+
case 2:
|
|
432
|
+
error = _state.sent();
|
|
433
|
+
console.error('Failed to set editor mode:', error);
|
|
434
|
+
return [
|
|
435
|
+
3,
|
|
436
|
+
3
|
|
437
|
+
];
|
|
438
|
+
case 3:
|
|
439
|
+
return [
|
|
440
|
+
2
|
|
441
|
+
];
|
|
442
|
+
}
|
|
443
|
+
});
|
|
444
|
+
})();
|
|
433
445
|
})();
|
|
434
446
|
}, [
|
|
435
447
|
language,
|
|
@@ -19,6 +19,13 @@ function _define_property(obj, key, value) {
|
|
|
19
19
|
}
|
|
20
20
|
return obj;
|
|
21
21
|
}
|
|
22
|
+
function _instanceof(left, right) {
|
|
23
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
24
|
+
return !!right[Symbol.hasInstance](left);
|
|
25
|
+
} else {
|
|
26
|
+
return left instanceof right;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
22
29
|
function _iterable_to_array_limit(arr, i) {
|
|
23
30
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
24
31
|
if (_i == null) return;
|
|
@@ -187,7 +194,7 @@ import { useStyle } from "./style";
|
|
|
187
194
|
}
|
|
188
195
|
return '';
|
|
189
196
|
} catch (error) {
|
|
190
|
-
return error
|
|
197
|
+
return _instanceof(error, Error) ? error.message : locale['schemaEditor.validationFailed'];
|
|
191
198
|
}
|
|
192
199
|
}, [
|
|
193
200
|
locale
|
|
@@ -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;
|
|
@@ -96,7 +96,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
96
96
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
97
97
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
98
98
|
}
|
|
99
|
-
import { MinusCircleOutlined } from "@ant-design/icons";
|
|
99
|
+
/* eslint-disable @typescript-eslint/no-use-before-define */ import { MinusCircleOutlined } from "@ant-design/icons";
|
|
100
100
|
import { Plus } from "@sofa-design/icons";
|
|
101
101
|
import { Button, Card, Form, Input, InputNumber, Select, Space } from "antd";
|
|
102
102
|
import { merge } from "lodash-es";
|