@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
|
@@ -87,12 +87,22 @@ function _object_spread_props(target, source) {
|
|
|
87
87
|
}
|
|
88
88
|
function _object_without_properties(source, excluded) {
|
|
89
89
|
if (source == null) return {};
|
|
90
|
-
var target =
|
|
91
|
-
|
|
90
|
+
var target = {}, sourceKeys, key, i;
|
|
91
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
92
|
+
sourceKeys = Reflect.ownKeys(source);
|
|
93
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
94
|
+
key = sourceKeys[i];
|
|
95
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
96
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
97
|
+
target[key] = source[key];
|
|
98
|
+
}
|
|
99
|
+
return target;
|
|
100
|
+
}
|
|
101
|
+
target = _object_without_properties_loose(source, excluded);
|
|
92
102
|
if (Object.getOwnPropertySymbols) {
|
|
93
|
-
|
|
94
|
-
for(i = 0; i <
|
|
95
|
-
key =
|
|
103
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
104
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
105
|
+
key = sourceKeys[i];
|
|
96
106
|
if (excluded.indexOf(key) >= 0) continue;
|
|
97
107
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
98
108
|
target[key] = source[key];
|
|
@@ -102,12 +112,11 @@ function _object_without_properties(source, excluded) {
|
|
|
102
112
|
}
|
|
103
113
|
function _object_without_properties_loose(source, excluded) {
|
|
104
114
|
if (source == null) return {};
|
|
105
|
-
var target = {};
|
|
106
|
-
var sourceKeys = Object.keys(source);
|
|
107
|
-
var key, i;
|
|
115
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
108
116
|
for(i = 0; i < sourceKeys.length; i++){
|
|
109
117
|
key = sourceKeys[i];
|
|
110
118
|
if (excluded.indexOf(key) >= 0) continue;
|
|
119
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
111
120
|
target[key] = source[key];
|
|
112
121
|
}
|
|
113
122
|
return target;
|
|
@@ -138,8 +147,8 @@ import { defaultColorList } from "../const";
|
|
|
138
147
|
import { hexToRgba, resolveCssVariable } from "../utils";
|
|
139
148
|
import { useStyle } from "./style";
|
|
140
149
|
var radarChartComponentsRegistered = false;
|
|
141
|
-
var RadarChart = function(
|
|
142
|
-
var data =
|
|
150
|
+
var RadarChart = function(_0) {
|
|
151
|
+
var data = _0.data, title = _0.title, _0_width = _0.width, width = _0_width === void 0 ? 600 : _0_width, _0_height = _0.height, height = _0_height === void 0 ? 400 : _0_height, className = _0.className, classNamesProp = _0.classNames, toolbarExtra = _0.toolbarExtra, _0_renderFilterInToolbar = _0.renderFilterInToolbar, renderFilterInToolbar = _0_renderFilterInToolbar === void 0 ? false : _0_renderFilterInToolbar, dataTime = _0.dataTime, color = _0.color, statisticConfig = _0.statistic, _0_textMaxWidth = _0.textMaxWidth, textMaxWidth = _0_textMaxWidth === void 0 ? 80 : _0_textMaxWidth, _0_loading = _0.loading, loading = _0_loading === void 0 ? false : _0_loading, props = _object_without_properties(_0, [
|
|
143
152
|
"data",
|
|
144
153
|
"title",
|
|
145
154
|
"width",
|
|
@@ -87,12 +87,22 @@ function _object_spread_props(target, source) {
|
|
|
87
87
|
}
|
|
88
88
|
function _object_without_properties(source, excluded) {
|
|
89
89
|
if (source == null) return {};
|
|
90
|
-
var target =
|
|
91
|
-
|
|
90
|
+
var target = {}, sourceKeys, key, i;
|
|
91
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
92
|
+
sourceKeys = Reflect.ownKeys(source);
|
|
93
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
94
|
+
key = sourceKeys[i];
|
|
95
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
96
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
97
|
+
target[key] = source[key];
|
|
98
|
+
}
|
|
99
|
+
return target;
|
|
100
|
+
}
|
|
101
|
+
target = _object_without_properties_loose(source, excluded);
|
|
92
102
|
if (Object.getOwnPropertySymbols) {
|
|
93
|
-
|
|
94
|
-
for(i = 0; i <
|
|
95
|
-
key =
|
|
103
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
104
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
105
|
+
key = sourceKeys[i];
|
|
96
106
|
if (excluded.indexOf(key) >= 0) continue;
|
|
97
107
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
98
108
|
target[key] = source[key];
|
|
@@ -102,12 +112,11 @@ function _object_without_properties(source, excluded) {
|
|
|
102
112
|
}
|
|
103
113
|
function _object_without_properties_loose(source, excluded) {
|
|
104
114
|
if (source == null) return {};
|
|
105
|
-
var target = {};
|
|
106
|
-
var sourceKeys = Object.keys(source);
|
|
107
|
-
var key, i;
|
|
115
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
108
116
|
for(i = 0; i < sourceKeys.length; i++){
|
|
109
117
|
key = sourceKeys[i];
|
|
110
118
|
if (excluded.indexOf(key) >= 0) continue;
|
|
119
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
111
120
|
target[key] = source[key];
|
|
112
121
|
}
|
|
113
122
|
return target;
|
|
@@ -138,8 +147,8 @@ import { defaultColorList } from "../const";
|
|
|
138
147
|
import { hexToRgba, resolveCssVariable } from "../utils";
|
|
139
148
|
import { useStyle } from "./style";
|
|
140
149
|
var scatterChartComponentsRegistered = false;
|
|
141
|
-
var ScatterChart = function(
|
|
142
|
-
var data =
|
|
150
|
+
var ScatterChart = function(_0) {
|
|
151
|
+
var data = _0.data, _0_width = _0.width, width = _0_width === void 0 ? 600 : _0_width, _0_height = _0.height, height = _0_height === void 0 ? 400 : _0_height, className = _0.className, classNamesProp = _0.classNames, title = _0.title, toolbarExtra = _0.toolbarExtra, _0_renderFilterInToolbar = _0.renderFilterInToolbar, renderFilterInToolbar = _0_renderFilterInToolbar === void 0 ? false : _0_renderFilterInToolbar, dataTime = _0.dataTime, _0_xUnit = _0.xUnit, xUnit = _0_xUnit === void 0 ? '月' : _0_xUnit, yUnit = _0.yUnit, xAxisLabel = _0.xAxisLabel, yAxisLabel = _0.yAxisLabel, _0_xPosition = _0.xPosition, xPosition = _0_xPosition === void 0 ? 'bottom' : _0_xPosition, _0_yPosition = _0.yPosition, yPosition = _0_yPosition === void 0 ? 'left' : _0_yPosition, _0_hiddenX = _0.hiddenX, hiddenX = _0_hiddenX === void 0 ? false : _0_hiddenX, _0_hiddenY = _0.hiddenY, hiddenY = _0_hiddenY === void 0 ? false : _0_hiddenY, _0_showGrid = _0.showGrid, showGrid = _0_showGrid === void 0 ? true : _0_showGrid, color = _0.color, statisticConfig = _0.statistic, _0_textMaxWidth = _0.textMaxWidth, textMaxWidth = _0_textMaxWidth === void 0 ? 80 : _0_textMaxWidth, _0_loading = _0.loading, loading = _0_loading === void 0 ? false : _0_loading, props = _object_without_properties(_0, [
|
|
143
152
|
"data",
|
|
144
153
|
"width",
|
|
145
154
|
"height",
|
|
@@ -28,12 +28,22 @@ function _object_spread(target) {
|
|
|
28
28
|
}
|
|
29
29
|
function _object_without_properties(source, excluded) {
|
|
30
30
|
if (source == null) return {};
|
|
31
|
-
var target =
|
|
32
|
-
|
|
31
|
+
var target = {}, sourceKeys, key, i;
|
|
32
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
33
|
+
sourceKeys = Reflect.ownKeys(source);
|
|
34
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
35
|
+
key = sourceKeys[i];
|
|
36
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
37
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
38
|
+
target[key] = source[key];
|
|
39
|
+
}
|
|
40
|
+
return target;
|
|
41
|
+
}
|
|
42
|
+
target = _object_without_properties_loose(source, excluded);
|
|
33
43
|
if (Object.getOwnPropertySymbols) {
|
|
34
|
-
|
|
35
|
-
for(i = 0; i <
|
|
36
|
-
key =
|
|
44
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
45
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
46
|
+
key = sourceKeys[i];
|
|
37
47
|
if (excluded.indexOf(key) >= 0) continue;
|
|
38
48
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
39
49
|
target[key] = source[key];
|
|
@@ -43,12 +53,11 @@ function _object_without_properties(source, excluded) {
|
|
|
43
53
|
}
|
|
44
54
|
function _object_without_properties_loose(source, excluded) {
|
|
45
55
|
if (source == null) return {};
|
|
46
|
-
var target = {};
|
|
47
|
-
var sourceKeys = Object.keys(source);
|
|
48
|
-
var key, i;
|
|
56
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
49
57
|
for(i = 0; i < sourceKeys.length; i++){
|
|
50
58
|
key = sourceKeys[i];
|
|
51
59
|
if (excluded.indexOf(key) >= 0) continue;
|
|
60
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
52
61
|
target[key] = source[key];
|
|
53
62
|
}
|
|
54
63
|
return target;
|
|
@@ -125,10 +134,10 @@ import { useStyle } from "./style";
|
|
|
125
134
|
* - 统一的样式管理
|
|
126
135
|
* - 内置错误边界保护,防止图表错误影响整个应用
|
|
127
136
|
* - 错误边界默认启用,可通过配置禁用或自定义
|
|
128
|
-
*/ var ChartContainer = function(
|
|
129
|
-
var baseClassName =
|
|
137
|
+
*/ var ChartContainer = function(_0) {
|
|
138
|
+
var baseClassName = _0.baseClassName, className = _0.className, children = _0.children, style = _0.style, classNamesProp = _0.classNames, stylesProp = _0.styles, _0_theme = _0.theme, theme = _0_theme === void 0 ? 'light' : _0_theme, _0_variant = _0.variant, variant = _0_variant === void 0 ? 'default' : _0_variant, _0_isMobile = _0.isMobile, isMobile = _0_isMobile === void 0 ? false : _0_isMobile, _0_errorBoundary = _0.errorBoundary, errorBoundary = _0_errorBoundary === void 0 ? {
|
|
130
139
|
enabled: true
|
|
131
|
-
} :
|
|
140
|
+
} : _0_errorBoundary, restProps = _object_without_properties(_0, [
|
|
132
141
|
"baseClassName",
|
|
133
142
|
"className",
|
|
134
143
|
"children",
|
|
@@ -19,6 +19,9 @@ function _define_property(obj, key, value) {
|
|
|
19
19
|
}
|
|
20
20
|
return obj;
|
|
21
21
|
}
|
|
22
|
+
function _iterable_to_array(iter) {
|
|
23
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
24
|
+
}
|
|
22
25
|
function _iterable_to_array_limit(arr, i) {
|
|
23
26
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
24
27
|
if (_i == null) return;
|
|
@@ -87,12 +90,22 @@ function _object_spread_props(target, source) {
|
|
|
87
90
|
}
|
|
88
91
|
function _object_without_properties(source, excluded) {
|
|
89
92
|
if (source == null) return {};
|
|
90
|
-
var target =
|
|
91
|
-
|
|
93
|
+
var target = {}, sourceKeys, key, i;
|
|
94
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
95
|
+
sourceKeys = Reflect.ownKeys(source);
|
|
96
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
97
|
+
key = sourceKeys[i];
|
|
98
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
99
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
100
|
+
target[key] = source[key];
|
|
101
|
+
}
|
|
102
|
+
return target;
|
|
103
|
+
}
|
|
104
|
+
target = _object_without_properties_loose(source, excluded);
|
|
92
105
|
if (Object.getOwnPropertySymbols) {
|
|
93
|
-
|
|
94
|
-
for(i = 0; i <
|
|
95
|
-
key =
|
|
106
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
107
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
108
|
+
key = sourceKeys[i];
|
|
96
109
|
if (excluded.indexOf(key) >= 0) continue;
|
|
97
110
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
98
111
|
target[key] = source[key];
|
|
@@ -102,12 +115,11 @@ function _object_without_properties(source, excluded) {
|
|
|
102
115
|
}
|
|
103
116
|
function _object_without_properties_loose(source, excluded) {
|
|
104
117
|
if (source == null) return {};
|
|
105
|
-
var target = {};
|
|
106
|
-
var sourceKeys = Object.keys(source);
|
|
107
|
-
var key, i;
|
|
118
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
108
119
|
for(i = 0; i < sourceKeys.length; i++){
|
|
109
120
|
key = sourceKeys[i];
|
|
110
121
|
if (excluded.indexOf(key) >= 0) continue;
|
|
122
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
111
123
|
target[key] = source[key];
|
|
112
124
|
}
|
|
113
125
|
return target;
|
|
@@ -115,6 +127,9 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
115
127
|
function _sliced_to_array(arr, i) {
|
|
116
128
|
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
117
129
|
}
|
|
130
|
+
function _to_array(arr) {
|
|
131
|
+
return _array_with_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_rest();
|
|
132
|
+
}
|
|
118
133
|
function _unsupported_iterable_to_array(o, minLen) {
|
|
119
134
|
if (!o) return;
|
|
120
135
|
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
@@ -230,8 +245,8 @@ export { ChartFilter, ChartToolBar, downloadChart } from "./components";
|
|
|
230
245
|
* @returns {Object} 分组后的数据对象
|
|
231
246
|
*/ var groupByCategory = function(data, key) {
|
|
232
247
|
return data.reduce(function(group, product) {
|
|
233
|
-
var category = product[key];
|
|
234
248
|
var _group_category;
|
|
249
|
+
var category = product[key];
|
|
235
250
|
group[category] = (_group_category = group[category]) !== null && _group_category !== void 0 ? _group_category : [];
|
|
236
251
|
group[category].push(product);
|
|
237
252
|
return group;
|
|
@@ -323,7 +338,7 @@ export { ChartFilter, ChartToolBar, downloadChart } from "./components";
|
|
|
323
338
|
var isLastNode = useMemo(function() {
|
|
324
339
|
try {
|
|
325
340
|
return store.isLatestNode(node);
|
|
326
|
-
} catch (
|
|
341
|
+
} catch (unused) {
|
|
327
342
|
return false;
|
|
328
343
|
}
|
|
329
344
|
}, [
|
|
@@ -455,12 +470,15 @@ export { ChartFilter, ChartToolBar, downloadChart } from "./components";
|
|
|
455
470
|
onKeyDown: function(e) {
|
|
456
471
|
e.stopPropagation();
|
|
457
472
|
}
|
|
458
|
-
}, config.map(function(
|
|
459
|
-
var
|
|
473
|
+
}, config.map(function(_0, _1) {
|
|
474
|
+
var _ref = [
|
|
475
|
+
_0,
|
|
476
|
+
_1
|
|
477
|
+
], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), chartType = _ref2.chartType, x = _ref2.x, y = _ref2.y, rest = _object_without_properties(_ref2, [
|
|
460
478
|
"chartType",
|
|
461
479
|
"x",
|
|
462
480
|
"y"
|
|
463
|
-
]);
|
|
481
|
+
]), _rest1 = _sliced_to_array(_rest, 1), index = _rest1[0];
|
|
464
482
|
var _htmlRef_current;
|
|
465
483
|
var height = Math.min(400, ((_htmlRef_current = htmlRef.current) === null || _htmlRef_current === void 0 ? void 0 : _htmlRef_current.clientWidth) || 400);
|
|
466
484
|
if (typeof window === 'undefined' || typeof document === 'undefined') {
|
|
@@ -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,
|
|
@@ -169,8 +173,8 @@ function _ts_generator(thisArg, body) {
|
|
|
169
173
|
}
|
|
170
174
|
}
|
|
171
175
|
var runtimeLoader = null;
|
|
172
|
-
export var loadChartRuntime =
|
|
173
|
-
|
|
176
|
+
export var loadChartRuntime = function() {
|
|
177
|
+
return _async_to_generator(function() {
|
|
174
178
|
return _ts_generator(this, function(_state) {
|
|
175
179
|
if (typeof window === 'undefined') {
|
|
176
180
|
throw new Error('图表运行时仅在浏览器环境中可用');
|
|
@@ -206,8 +210,5 @@ export var loadChartRuntime = /*#__PURE__*/ function() {
|
|
|
206
210
|
runtimeLoader
|
|
207
211
|
];
|
|
208
212
|
});
|
|
209
|
-
});
|
|
210
|
-
|
|
211
|
-
return _ref.apply(this, arguments);
|
|
212
|
-
};
|
|
213
|
-
}();
|
|
213
|
+
})();
|
|
214
|
+
};
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @fileoverview 图表插件工具函数文件
|
|
3
|
-
*
|
|
4
|
-
* 该文件提供了图表数据处理、格式化、转换等工具函数。
|
|
5
|
-
* 包括数字格式化、数据验证、排序、查找等功能。
|
|
6
|
-
*
|
|
7
|
-
* @author md-editor
|
|
8
|
-
* @version 1.0.0
|
|
9
|
-
* @since 2024
|
|
10
|
-
*/ /**
|
|
11
|
-
* 创建一个新的 `Intl.NumberFormat` 实例,用于将数字格式化为美国英语的十进制格式。
|
|
12
|
-
*
|
|
13
|
-
* @constant
|
|
14
|
-
* @type {Intl.NumberFormat}
|
|
15
|
-
* @default
|
|
16
|
-
* @example
|
|
17
|
-
* const formattedNumber = intl.format(1234567.89);
|
|
18
|
-
* console.log(formattedNumber); // 输出: "1,234,567.89"
|
|
19
|
-
*/ function _array_like_to_array(arr, len) {
|
|
1
|
+
function _array_like_to_array(arr, len) {
|
|
20
2
|
if (len == null || len > arr.length) len = arr.length;
|
|
21
3
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
22
4
|
return arr2;
|
|
@@ -41,7 +23,25 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
41
23
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
42
24
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
43
25
|
}
|
|
44
|
-
|
|
26
|
+
/* eslint-disable @typescript-eslint/no-unused-expressions */ /* eslint-disable @typescript-eslint/ban-types */ /**
|
|
27
|
+
* @fileoverview 图表插件工具函数文件
|
|
28
|
+
*
|
|
29
|
+
* 该文件提供了图表数据处理、格式化、转换等工具函数。
|
|
30
|
+
* 包括数字格式化、数据验证、排序、查找等功能。
|
|
31
|
+
*
|
|
32
|
+
* @author md-editor
|
|
33
|
+
* @version 1.0.0
|
|
34
|
+
* @since 2024
|
|
35
|
+
*/ /**
|
|
36
|
+
* 创建一个新的 `Intl.NumberFormat` 实例,用于将数字格式化为美国英语的十进制格式。
|
|
37
|
+
*
|
|
38
|
+
* @constant
|
|
39
|
+
* @type {Intl.NumberFormat}
|
|
40
|
+
* @default
|
|
41
|
+
* @example
|
|
42
|
+
* const formattedNumber = intl.format(1234567.89);
|
|
43
|
+
* console.log(formattedNumber); // 输出: "1,234,567.89"
|
|
44
|
+
*/ var intl = new Intl.NumberFormat('en-US', {
|
|
45
45
|
style: 'decimal'
|
|
46
46
|
});
|
|
47
47
|
/**
|
|
@@ -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,
|
|
@@ -195,43 +199,45 @@ export var Katex = function(props) {
|
|
|
195
199
|
}
|
|
196
200
|
startTransition(function() {
|
|
197
201
|
// 异步加载在 startTransition 外部执行
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
202
|
+
(function() {
|
|
203
|
+
return _async_to_generator(function() {
|
|
204
|
+
var katexModule, error;
|
|
205
|
+
return _ts_generator(this, function(_state) {
|
|
206
|
+
switch(_state.label){
|
|
207
|
+
case 0:
|
|
208
|
+
_state.trys.push([
|
|
209
|
+
0,
|
|
210
|
+
2,
|
|
211
|
+
,
|
|
212
|
+
3
|
|
213
|
+
]);
|
|
214
|
+
return [
|
|
215
|
+
4,
|
|
216
|
+
loadKatex()
|
|
217
|
+
];
|
|
218
|
+
case 1:
|
|
219
|
+
katexModule = _state.sent();
|
|
220
|
+
katexRef.current = katexModule.default;
|
|
221
|
+
setKatexLoaded(true);
|
|
222
|
+
return [
|
|
223
|
+
3,
|
|
224
|
+
3
|
|
225
|
+
];
|
|
226
|
+
case 2:
|
|
227
|
+
error = _state.sent();
|
|
228
|
+
console.error('Failed to load Katex:', error);
|
|
229
|
+
setKatexLoaded(true);
|
|
230
|
+
return [
|
|
231
|
+
3,
|
|
232
|
+
3
|
|
233
|
+
];
|
|
234
|
+
case 3:
|
|
235
|
+
return [
|
|
236
|
+
2
|
|
237
|
+
];
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
})();
|
|
235
241
|
})();
|
|
236
242
|
});
|
|
237
243
|
}, []);
|