@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
|
@@ -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,
|
|
@@ -223,44 +227,46 @@ import { loadKatex } from "./loadKatex";
|
|
|
223
227
|
}
|
|
224
228
|
startTransition(function() {
|
|
225
229
|
// 异步加载在 startTransition 外部执行
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
230
|
+
(function() {
|
|
231
|
+
return _async_to_generator(function() {
|
|
232
|
+
var katexModule, error;
|
|
233
|
+
return _ts_generator(this, function(_state) {
|
|
234
|
+
switch(_state.label){
|
|
235
|
+
case 0:
|
|
236
|
+
_state.trys.push([
|
|
237
|
+
0,
|
|
238
|
+
2,
|
|
239
|
+
,
|
|
240
|
+
3
|
|
241
|
+
]);
|
|
242
|
+
return [
|
|
243
|
+
4,
|
|
244
|
+
loadKatex()
|
|
245
|
+
];
|
|
246
|
+
case 1:
|
|
247
|
+
katexModule = _state.sent();
|
|
248
|
+
katexRef.current = katexModule.default;
|
|
249
|
+
setKatexLoaded(true);
|
|
250
|
+
return [
|
|
251
|
+
3,
|
|
252
|
+
3
|
|
253
|
+
];
|
|
254
|
+
case 2:
|
|
255
|
+
error = _state.sent();
|
|
256
|
+
console.error('Failed to load Katex:', error);
|
|
257
|
+
// 即使加载失败也设置 loaded,避免无限加载
|
|
258
|
+
setKatexLoaded(true);
|
|
259
|
+
return [
|
|
260
|
+
3,
|
|
261
|
+
3
|
|
262
|
+
];
|
|
263
|
+
case 3:
|
|
264
|
+
return [
|
|
265
|
+
2
|
|
266
|
+
];
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
})();
|
|
264
270
|
})();
|
|
265
271
|
});
|
|
266
272
|
}, []);
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @fileoverview Katex 数学公式渲染插件
|
|
3
|
-
* 提供基于 KaTeX 的数学公式渲染功能,支持块级和内联公式
|
|
4
|
-
* @author Katex Plugin Team
|
|
5
|
-
*/ function _define_property(obj, key, value) {
|
|
1
|
+
function _define_property(obj, key, value) {
|
|
6
2
|
if (key in obj) {
|
|
7
3
|
Object.defineProperty(obj, key, {
|
|
8
4
|
value: value,
|
|
@@ -54,7 +50,11 @@ function _object_spread_props(target, source) {
|
|
|
54
50
|
}
|
|
55
51
|
return target;
|
|
56
52
|
}
|
|
57
|
-
|
|
53
|
+
/**
|
|
54
|
+
* @fileoverview Katex 数学公式渲染插件
|
|
55
|
+
* 提供基于 KaTeX 的数学公式渲染功能,支持块级和内联公式
|
|
56
|
+
* @author Katex Plugin Team
|
|
57
|
+
*/ import React, { useMemo } from "react";
|
|
58
58
|
import { useEditorStore } from "../../MarkdownEditor/editor/store";
|
|
59
59
|
import { DragHandle } from "../../MarkdownEditor/editor/tools/DragHandle";
|
|
60
60
|
import { Katex } from "./Katex";
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @fileoverview Katex 异步加载器
|
|
3
|
-
*
|
|
4
|
-
* 使用单例模式确保 katex 库和 CSS 只加载一次
|
|
5
|
-
*/ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
1
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
6
2
|
try {
|
|
7
3
|
var info = gen[key](arg);
|
|
8
4
|
var value = info.value;
|
|
@@ -32,7 +28,7 @@ function _async_to_generator(fn) {
|
|
|
32
28
|
};
|
|
33
29
|
}
|
|
34
30
|
function _ts_generator(thisArg, body) {
|
|
35
|
-
var f, y, t,
|
|
31
|
+
var f, y, t, _ = {
|
|
36
32
|
label: 0,
|
|
37
33
|
sent: function() {
|
|
38
34
|
if (t[0] & 1) throw t[1];
|
|
@@ -40,13 +36,17 @@ function _ts_generator(thisArg, body) {
|
|
|
40
36
|
},
|
|
41
37
|
trys: [],
|
|
42
38
|
ops: []
|
|
43
|
-
};
|
|
44
|
-
return g
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
|
|
39
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
40
|
+
return d(g, "next", {
|
|
41
|
+
value: verb(0)
|
|
42
|
+
}), d(g, "throw", {
|
|
43
|
+
value: verb(1)
|
|
44
|
+
}), d(g, "return", {
|
|
45
|
+
value: verb(2)
|
|
46
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
47
|
+
value: function() {
|
|
48
|
+
return this;
|
|
49
|
+
}
|
|
50
50
|
}), g;
|
|
51
51
|
function verb(n) {
|
|
52
52
|
return function(v) {
|
|
@@ -58,7 +58,7 @@ function _ts_generator(thisArg, body) {
|
|
|
58
58
|
}
|
|
59
59
|
function step(op) {
|
|
60
60
|
if (f) throw new TypeError("Generator is already executing.");
|
|
61
|
-
while(_)try {
|
|
61
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
62
62
|
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;
|
|
63
63
|
if (y = 0, t) op = [
|
|
64
64
|
op[0] & 2,
|
|
@@ -126,21 +126,25 @@ function _ts_generator(thisArg, body) {
|
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
|
|
129
|
+
/**
|
|
130
|
+
* @fileoverview Katex 异步加载器
|
|
131
|
+
*
|
|
132
|
+
* 使用单例模式确保 katex 库和 CSS 只加载一次
|
|
133
|
+
*/ import "./katex.min.css";
|
|
130
134
|
var katexLoader = null;
|
|
131
135
|
/**
|
|
132
136
|
* 加载 Katex 核心库
|
|
133
137
|
* 使用单例模式确保只加载一次
|
|
134
|
-
*/ export var loadKatex =
|
|
135
|
-
|
|
138
|
+
*/ export var loadKatex = function() {
|
|
139
|
+
return _async_to_generator(function() {
|
|
136
140
|
return _ts_generator(this, function(_state) {
|
|
137
141
|
if (typeof window === 'undefined') {
|
|
138
142
|
throw new Error('Katex 仅在浏览器环境中可用');
|
|
139
143
|
}
|
|
140
144
|
if (!katexLoader) {
|
|
141
145
|
// 使用 webpack 魔法注释确保正确代码分割
|
|
142
|
-
katexLoader = import(/* webpackChunkName: "katex" */ "katex").then(
|
|
143
|
-
|
|
146
|
+
katexLoader = import(/* webpackChunkName: "katex" */ "katex").then(function(module) {
|
|
147
|
+
return _async_to_generator(function() {
|
|
144
148
|
return _ts_generator(this, function(_state) {
|
|
145
149
|
// 异步加载 CSS
|
|
146
150
|
return [
|
|
@@ -148,11 +152,8 @@ var katexLoader = null;
|
|
|
148
152
|
module
|
|
149
153
|
];
|
|
150
154
|
});
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
return _ref.apply(this, arguments);
|
|
154
|
-
};
|
|
155
|
-
}()).catch(function(error) {
|
|
155
|
+
})();
|
|
156
|
+
}).catch(function(error) {
|
|
156
157
|
katexLoader = null;
|
|
157
158
|
throw error;
|
|
158
159
|
});
|
|
@@ -162,11 +163,8 @@ var katexLoader = null;
|
|
|
162
163
|
katexLoader
|
|
163
164
|
];
|
|
164
165
|
});
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
return _ref.apply(this, arguments);
|
|
168
|
-
};
|
|
169
|
-
}();
|
|
166
|
+
})();
|
|
167
|
+
};
|
|
170
168
|
/**
|
|
171
169
|
* 预加载 Katex 资源
|
|
172
170
|
* 使用动态 import 提前开始加载,但不阻塞当前执行
|
|
@@ -28,7 +28,7 @@ function _async_to_generator(fn) {
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
function _ts_generator(thisArg, body) {
|
|
31
|
-
var f, y, t,
|
|
31
|
+
var f, y, t, _ = {
|
|
32
32
|
label: 0,
|
|
33
33
|
sent: function() {
|
|
34
34
|
if (t[0] & 1) throw t[1];
|
|
@@ -36,13 +36,17 @@ function _ts_generator(thisArg, body) {
|
|
|
36
36
|
},
|
|
37
37
|
trys: [],
|
|
38
38
|
ops: []
|
|
39
|
-
};
|
|
40
|
-
return g
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
|
|
39
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
40
|
+
return d(g, "next", {
|
|
41
|
+
value: verb(0)
|
|
42
|
+
}), d(g, "throw", {
|
|
43
|
+
value: verb(1)
|
|
44
|
+
}), d(g, "return", {
|
|
45
|
+
value: verb(2)
|
|
46
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
47
|
+
value: function() {
|
|
48
|
+
return this;
|
|
49
|
+
}
|
|
46
50
|
}), g;
|
|
47
51
|
function verb(n) {
|
|
48
52
|
return function(v) {
|
|
@@ -54,7 +58,7 @@ function _ts_generator(thisArg, body) {
|
|
|
54
58
|
}
|
|
55
59
|
function step(op) {
|
|
56
60
|
if (f) throw new TypeError("Generator is already executing.");
|
|
57
|
-
while(_)try {
|
|
61
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
58
62
|
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
63
|
if (y = 0, t) op = [
|
|
60
64
|
op[0] & 2,
|
|
@@ -129,25 +133,27 @@ import { loadMermaid } from "./utils";
|
|
|
129
133
|
/**
|
|
130
134
|
* Mermaid 渲染器组件
|
|
131
135
|
* 使用 React.lazy 延迟加载,仅在需要时加载 mermaid 库
|
|
132
|
-
*/ var MermaidRenderer = /*#__PURE__*/ lazy(
|
|
133
|
-
return
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
})
|
|
136
|
+
*/ var MermaidRenderer = /*#__PURE__*/ lazy(function() {
|
|
137
|
+
return _async_to_generator(function() {
|
|
138
|
+
return _ts_generator(this, function(_state) {
|
|
139
|
+
switch(_state.label){
|
|
140
|
+
case 0:
|
|
141
|
+
return [
|
|
142
|
+
4,
|
|
143
|
+
loadMermaid()
|
|
144
|
+
];
|
|
145
|
+
case 1:
|
|
146
|
+
_state.sent();
|
|
147
|
+
return [
|
|
148
|
+
2,
|
|
149
|
+
{
|
|
150
|
+
default: MermaidRendererImpl
|
|
151
|
+
}
|
|
152
|
+
];
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
})();
|
|
156
|
+
});
|
|
151
157
|
/**
|
|
152
158
|
* Mermaid 组件 - Mermaid图表渲染组件
|
|
153
159
|
*
|
|
@@ -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
|
|
175
|
+
import { useEffect, useRef, useState } from "react";
|
|
172
176
|
import { cleanupTempElement, loadMermaid, renderSvgToContainer } from "./utils";
|
|
173
177
|
/**
|
|
174
178
|
* Mermaid 渲染 Hook
|
|
@@ -195,101 +199,103 @@ import { cleanupTempElement, loadMermaid, renderSvgToContainer } from "./utils";
|
|
|
195
199
|
return;
|
|
196
200
|
}
|
|
197
201
|
var currentCode = code;
|
|
198
|
-
timer.current = window.setTimeout(
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
202
|
+
timer.current = window.setTimeout(function() {
|
|
203
|
+
return _async_to_generator(function() {
|
|
204
|
+
var _mermaidRef_current, api, _tmp, trimmedCode, svg, err;
|
|
205
|
+
return _ts_generator(this, function(_state) {
|
|
206
|
+
switch(_state.label){
|
|
207
|
+
case 0:
|
|
208
|
+
if (code !== currentCode) {
|
|
209
|
+
timer.current = null;
|
|
210
|
+
return [
|
|
211
|
+
2
|
|
212
|
+
];
|
|
213
|
+
}
|
|
214
|
+
_state.label = 1;
|
|
215
|
+
case 1:
|
|
216
|
+
_state.trys.push([
|
|
217
|
+
1,
|
|
218
|
+
6,
|
|
219
|
+
7,
|
|
220
|
+
8
|
|
221
|
+
]);
|
|
222
|
+
if (!((_mermaidRef_current = mermaidRef.current) !== null && _mermaidRef_current !== void 0)) return [
|
|
223
|
+
3,
|
|
206
224
|
2
|
|
207
225
|
];
|
|
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
|
-
|
|
235
|
-
|
|
236
|
-
mermaidRef.current = api;
|
|
237
|
-
trimmedCode = code.trim();
|
|
238
|
-
if (!trimmedCode) {
|
|
239
|
-
renderedCodeRef.current = '';
|
|
240
|
-
setRenderedCode('');
|
|
241
|
-
setError('');
|
|
242
|
-
if (divRef.current) {
|
|
243
|
-
divRef.current.innerHTML = '';
|
|
226
|
+
_tmp = _mermaidRef_current;
|
|
227
|
+
return [
|
|
228
|
+
3,
|
|
229
|
+
4
|
|
230
|
+
];
|
|
231
|
+
case 2:
|
|
232
|
+
return [
|
|
233
|
+
4,
|
|
234
|
+
loadMermaid()
|
|
235
|
+
];
|
|
236
|
+
case 3:
|
|
237
|
+
_tmp = _state.sent();
|
|
238
|
+
_state.label = 4;
|
|
239
|
+
case 4:
|
|
240
|
+
api = _tmp;
|
|
241
|
+
mermaidRef.current = api;
|
|
242
|
+
trimmedCode = code.trim();
|
|
243
|
+
if (!trimmedCode) {
|
|
244
|
+
renderedCodeRef.current = '';
|
|
245
|
+
setRenderedCode('');
|
|
246
|
+
setError('');
|
|
247
|
+
if (divRef.current) {
|
|
248
|
+
divRef.current.innerHTML = '';
|
|
249
|
+
}
|
|
250
|
+
timer.current = null;
|
|
251
|
+
return [
|
|
252
|
+
2
|
|
253
|
+
];
|
|
244
254
|
}
|
|
245
|
-
timer.current = null;
|
|
246
255
|
return [
|
|
247
|
-
|
|
256
|
+
4,
|
|
257
|
+
api.render(id, trimmedCode.endsWith('```') ? trimmedCode : trimmedCode)
|
|
248
258
|
];
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
case 5:
|
|
255
|
-
svg = _state.sent().svg;
|
|
256
|
-
if (divRef.current) {
|
|
257
|
-
renderSvgToContainer(svg, divRef.current);
|
|
258
|
-
}
|
|
259
|
-
renderedCodeRef.current = code;
|
|
260
|
-
setRenderedCode(code);
|
|
261
|
-
setError('');
|
|
262
|
-
return [
|
|
263
|
-
3,
|
|
264
|
-
8
|
|
265
|
-
];
|
|
266
|
-
case 6:
|
|
267
|
-
err = _state.sent();
|
|
268
|
-
if (code === currentCode) {
|
|
269
|
-
setError(String(err));
|
|
259
|
+
case 5:
|
|
260
|
+
svg = _state.sent().svg;
|
|
261
|
+
if (divRef.current) {
|
|
262
|
+
renderSvgToContainer(svg, divRef.current);
|
|
263
|
+
}
|
|
270
264
|
renderedCodeRef.current = code;
|
|
271
265
|
setRenderedCode(code);
|
|
272
|
-
|
|
273
|
-
|
|
266
|
+
setError('');
|
|
267
|
+
return [
|
|
268
|
+
3,
|
|
269
|
+
8
|
|
270
|
+
];
|
|
271
|
+
case 6:
|
|
272
|
+
err = _state.sent();
|
|
273
|
+
if (code === currentCode) {
|
|
274
|
+
setError(String(err));
|
|
275
|
+
renderedCodeRef.current = code;
|
|
276
|
+
setRenderedCode(code);
|
|
277
|
+
if (divRef.current) {
|
|
278
|
+
divRef.current.innerHTML = '';
|
|
279
|
+
}
|
|
274
280
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
}
|
|
291
|
-
});
|
|
292
|
-
}
|
|
281
|
+
return [
|
|
282
|
+
3,
|
|
283
|
+
8
|
|
284
|
+
];
|
|
285
|
+
case 7:
|
|
286
|
+
cleanupTempElement(id);
|
|
287
|
+
timer.current = null;
|
|
288
|
+
return [
|
|
289
|
+
7
|
|
290
|
+
];
|
|
291
|
+
case 8:
|
|
292
|
+
return [
|
|
293
|
+
2
|
|
294
|
+
];
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
})();
|
|
298
|
+
}, 100);
|
|
293
299
|
return function() {
|
|
294
300
|
if (timer.current) {
|
|
295
301
|
window.clearTimeout(timer.current);
|