@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
|
@@ -138,7 +138,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
138
138
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
139
139
|
}
|
|
140
140
|
function _ts_generator(thisArg, body) {
|
|
141
|
-
var f, y, t,
|
|
141
|
+
var f, y, t, _ = {
|
|
142
142
|
label: 0,
|
|
143
143
|
sent: function() {
|
|
144
144
|
if (t[0] & 1) throw t[1];
|
|
@@ -146,13 +146,17 @@ function _ts_generator(thisArg, body) {
|
|
|
146
146
|
},
|
|
147
147
|
trys: [],
|
|
148
148
|
ops: []
|
|
149
|
-
};
|
|
150
|
-
return g
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
},
|
|
155
|
-
|
|
149
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
150
|
+
return d(g, "next", {
|
|
151
|
+
value: verb(0)
|
|
152
|
+
}), d(g, "throw", {
|
|
153
|
+
value: verb(1)
|
|
154
|
+
}), d(g, "return", {
|
|
155
|
+
value: verb(2)
|
|
156
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
157
|
+
value: function() {
|
|
158
|
+
return this;
|
|
159
|
+
}
|
|
156
160
|
}), g;
|
|
157
161
|
function verb(n) {
|
|
158
162
|
return function(v) {
|
|
@@ -164,7 +168,7 @@ function _ts_generator(thisArg, body) {
|
|
|
164
168
|
}
|
|
165
169
|
function step(op) {
|
|
166
170
|
if (f) throw new TypeError("Generator is already executing.");
|
|
167
|
-
while(_)try {
|
|
171
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
168
172
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
169
173
|
if (y = 0, t) op = [
|
|
170
174
|
op[0] & 2,
|
|
@@ -244,28 +248,30 @@ import { useRefFunction } from "../../index";
|
|
|
244
248
|
var _useState2 = _sliced_to_array(useState(''), 2), searchKeyword = _useState2[0], setSearchKeyword = _useState2[1];
|
|
245
249
|
var _useState3 = _sliced_to_array(useState([]), 2), selectedIds = _useState3[0], setSelectedIds = _useState3[1];
|
|
246
250
|
var _useState4 = _sliced_to_array(useState([]), 2), filteredList = _useState4[0], setFilteredList = _useState4[1];
|
|
247
|
-
var loadHistory = useRefFunction(
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
251
|
+
var loadHistory = useRefFunction(function() {
|
|
252
|
+
return _async_to_generator(function() {
|
|
253
|
+
var _props_request, msg;
|
|
254
|
+
return _ts_generator(this, function(_state) {
|
|
255
|
+
switch(_state.label){
|
|
256
|
+
case 0:
|
|
257
|
+
return [
|
|
258
|
+
4,
|
|
259
|
+
props === null || props === void 0 ? void 0 : (_props_request = props.request) === null || _props_request === void 0 ? void 0 : _props_request.call(props, {
|
|
260
|
+
agentId: props.agentId
|
|
261
|
+
}).then(function(msg) {
|
|
262
|
+
return msg;
|
|
263
|
+
})
|
|
264
|
+
];
|
|
265
|
+
case 1:
|
|
266
|
+
msg = _state.sent();
|
|
267
|
+
setChatList(msg || []);
|
|
268
|
+
return [
|
|
269
|
+
2
|
|
270
|
+
];
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
})();
|
|
274
|
+
});
|
|
269
275
|
// 暴露 reload 方法给 actionRef
|
|
270
276
|
useEffect(function() {
|
|
271
277
|
if (props.actionRef) {
|
|
@@ -310,8 +316,8 @@ import { useRefFunction } from "../../index";
|
|
|
310
316
|
searchKeyword
|
|
311
317
|
]);
|
|
312
318
|
// 处理收藏
|
|
313
|
-
var handleFavorite = useRefFunction(
|
|
314
|
-
|
|
319
|
+
var handleFavorite = useRefFunction(function(sessionId, isFavorite) {
|
|
320
|
+
return _async_to_generator(function() {
|
|
315
321
|
var _props_agent_onFavorite, _props_agent;
|
|
316
322
|
return _ts_generator(this, function(_state) {
|
|
317
323
|
switch(_state.label){
|
|
@@ -335,11 +341,8 @@ import { useRefFunction } from "../../index";
|
|
|
335
341
|
];
|
|
336
342
|
}
|
|
337
343
|
});
|
|
338
|
-
});
|
|
339
|
-
|
|
340
|
-
return _ref.apply(this, arguments);
|
|
341
|
-
};
|
|
342
|
-
}());
|
|
344
|
+
})();
|
|
345
|
+
});
|
|
343
346
|
// 处理多选
|
|
344
347
|
var handleSelectionChange = useRefFunction(function(sessionId, checked) {
|
|
345
348
|
var _props_agent_onSelectionChange, _props_agent;
|
|
@@ -358,42 +361,46 @@ import { useRefFunction } from "../../index";
|
|
|
358
361
|
(_props_agent = props.agent) === null || _props_agent === void 0 ? void 0 : (_props_agent_onSearch = _props_agent.onSearch) === null || _props_agent_onSearch === void 0 ? void 0 : _props_agent_onSearch.call(_props_agent, value);
|
|
359
362
|
});
|
|
360
363
|
// 处理加载更多
|
|
361
|
-
var handleLoadMore = useRefFunction(
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
364
|
+
var handleLoadMore = useRefFunction(function() {
|
|
365
|
+
return _async_to_generator(function() {
|
|
366
|
+
var _props_agent_onLoadMore, _props_agent;
|
|
367
|
+
return _ts_generator(this, function(_state) {
|
|
368
|
+
switch(_state.label){
|
|
369
|
+
case 0:
|
|
370
|
+
return [
|
|
371
|
+
4,
|
|
372
|
+
(_props_agent = props.agent) === null || _props_agent === void 0 ? void 0 : (_props_agent_onLoadMore = _props_agent.onLoadMore) === null || _props_agent_onLoadMore === void 0 ? void 0 : _props_agent_onLoadMore.call(_props_agent)
|
|
373
|
+
];
|
|
374
|
+
case 1:
|
|
375
|
+
_state.sent();
|
|
376
|
+
return [
|
|
377
|
+
2
|
|
378
|
+
];
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
})();
|
|
382
|
+
});
|
|
378
383
|
// 处理新对话
|
|
379
|
-
var handleNewChat = useRefFunction(
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
384
|
+
var handleNewChat = useRefFunction(function() {
|
|
385
|
+
return _async_to_generator(function() {
|
|
386
|
+
var _props_agent_onNewChat, _props_agent;
|
|
387
|
+
return _ts_generator(this, function(_state) {
|
|
388
|
+
switch(_state.label){
|
|
389
|
+
case 0:
|
|
390
|
+
return [
|
|
391
|
+
4,
|
|
392
|
+
(_props_agent = props.agent) === null || _props_agent === void 0 ? void 0 : (_props_agent_onNewChat = _props_agent.onNewChat) === null || _props_agent_onNewChat === void 0 ? void 0 : _props_agent_onNewChat.call(_props_agent)
|
|
393
|
+
];
|
|
394
|
+
case 1:
|
|
395
|
+
_state.sent();
|
|
396
|
+
setOpen(false);
|
|
397
|
+
return [
|
|
398
|
+
2
|
|
399
|
+
];
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
})();
|
|
403
|
+
});
|
|
397
404
|
return {
|
|
398
405
|
open: open,
|
|
399
406
|
setOpen: setOpen,
|
package/dist/History/index.js
CHANGED
|
@@ -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,
|
|
@@ -191,8 +195,8 @@ export * from "./utils";
|
|
|
191
195
|
},
|
|
192
196
|
groupLabelRender: props.groupLabelRender,
|
|
193
197
|
customOperationExtra: props.customOperationExtra || [],
|
|
194
|
-
onDeleteItem: props.onDeleteItem ?
|
|
195
|
-
|
|
198
|
+
onDeleteItem: props.onDeleteItem ? function(sessionId) {
|
|
199
|
+
return _async_to_generator(function() {
|
|
196
200
|
var _props_onDeleteItem;
|
|
197
201
|
return _ts_generator(this, function(_state) {
|
|
198
202
|
switch(_state.label){
|
|
@@ -209,11 +213,8 @@ export * from "./utils";
|
|
|
209
213
|
];
|
|
210
214
|
}
|
|
211
215
|
});
|
|
212
|
-
});
|
|
213
|
-
|
|
214
|
-
return _ref.apply(this, arguments);
|
|
215
|
-
};
|
|
216
|
-
}() : undefined,
|
|
216
|
+
})();
|
|
217
|
+
} : undefined,
|
|
217
218
|
onFavorite: handleFavorite,
|
|
218
219
|
agent: props.agent,
|
|
219
220
|
extra: props.extra,
|
package/dist/History/menu.js
CHANGED
|
@@ -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;
|
|
@@ -53,7 +53,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
53
53
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
54
54
|
}
|
|
55
55
|
function _ts_generator(thisArg, body) {
|
|
56
|
-
var f, y, t,
|
|
56
|
+
var f, y, t, _ = {
|
|
57
57
|
label: 0,
|
|
58
58
|
sent: function() {
|
|
59
59
|
if (t[0] & 1) throw t[1];
|
|
@@ -61,13 +61,17 @@ function _ts_generator(thisArg, body) {
|
|
|
61
61
|
},
|
|
62
62
|
trys: [],
|
|
63
63
|
ops: []
|
|
64
|
-
};
|
|
65
|
-
return g
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
|
|
64
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
65
|
+
return d(g, "next", {
|
|
66
|
+
value: verb(0)
|
|
67
|
+
}), d(g, "throw", {
|
|
68
|
+
value: verb(1)
|
|
69
|
+
}), d(g, "return", {
|
|
70
|
+
value: verb(2)
|
|
71
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
72
|
+
value: function() {
|
|
73
|
+
return this;
|
|
74
|
+
}
|
|
71
75
|
}), g;
|
|
72
76
|
function verb(n) {
|
|
73
77
|
return function(v) {
|
|
@@ -79,7 +83,7 @@ function _ts_generator(thisArg, body) {
|
|
|
79
83
|
}
|
|
80
84
|
function step(op) {
|
|
81
85
|
if (f) throw new TypeError("Generator is already executing.");
|
|
82
|
-
while(_)try {
|
|
86
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
83
87
|
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;
|
|
84
88
|
if (y = 0, t) op = [
|
|
85
89
|
op[0] & 2,
|
|
@@ -204,12 +208,11 @@ var SCROLL_TOLERANCE = 20; // 滚动到底部的容差阈值
|
|
|
204
208
|
var isLocked = useRef(false); // 用户滚动锁定状态
|
|
205
209
|
var observer = useRef(null);
|
|
206
210
|
// 主滚动逻辑
|
|
207
|
-
var _checkScroll =
|
|
208
|
-
var
|
|
209
|
-
|
|
210
|
-
var
|
|
211
|
+
var _checkScroll = function() {
|
|
212
|
+
var force = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false, behavior = arguments.length > 1 ? arguments[1] : void 0;
|
|
213
|
+
return _async_to_generator(function() {
|
|
214
|
+
var _props_onResize, container, currentScrollHeight, prevScrollHeight, isNearBottom, shouldScroll, _container_scrollTo, scrollBehavior;
|
|
211
215
|
return _ts_generator(this, function(_state) {
|
|
212
|
-
force = _arguments.length > 0 && _arguments[0] !== void 0 ? _arguments[0] : false, behavior = _arguments.length > 1 ? _arguments[1] : void 0;
|
|
213
216
|
container = containerRef.current;
|
|
214
217
|
if (!container) return [
|
|
215
218
|
2
|
|
@@ -241,11 +244,8 @@ var SCROLL_TOLERANCE = 20; // 滚动到底部的容差阈值
|
|
|
241
244
|
2
|
|
242
245
|
];
|
|
243
246
|
});
|
|
244
|
-
});
|
|
245
|
-
|
|
246
|
-
return _ref.apply(this, arguments);
|
|
247
|
-
};
|
|
248
|
-
}();
|
|
247
|
+
})();
|
|
248
|
+
};
|
|
249
249
|
var checkScroll = useThrottleFn(_checkScroll, props.timeout || 160);
|
|
250
250
|
// DOM 变化监听(MutationObserver)
|
|
251
251
|
useEffect(function() {
|
|
@@ -53,7 +53,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
53
53
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
54
54
|
}
|
|
55
55
|
function _ts_generator(thisArg, body) {
|
|
56
|
-
var f, y, t,
|
|
56
|
+
var f, y, t, _ = {
|
|
57
57
|
label: 0,
|
|
58
58
|
sent: function() {
|
|
59
59
|
if (t[0] & 1) throw t[1];
|
|
@@ -61,13 +61,17 @@ function _ts_generator(thisArg, body) {
|
|
|
61
61
|
},
|
|
62
62
|
trys: [],
|
|
63
63
|
ops: []
|
|
64
|
-
};
|
|
65
|
-
return g
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
|
|
64
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
65
|
+
return d(g, "next", {
|
|
66
|
+
value: verb(0)
|
|
67
|
+
}), d(g, "throw", {
|
|
68
|
+
value: verb(1)
|
|
69
|
+
}), d(g, "return", {
|
|
70
|
+
value: verb(2)
|
|
71
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
72
|
+
value: function() {
|
|
73
|
+
return this;
|
|
74
|
+
}
|
|
71
75
|
}), g;
|
|
72
76
|
function verb(n) {
|
|
73
77
|
return function(v) {
|
|
@@ -79,7 +83,7 @@ function _ts_generator(thisArg, body) {
|
|
|
79
83
|
}
|
|
80
84
|
function step(op) {
|
|
81
85
|
if (f) throw new TypeError("Generator is already executing.");
|
|
82
|
-
while(_)try {
|
|
86
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
83
87
|
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;
|
|
84
88
|
if (y = 0, t) op = [
|
|
85
89
|
op[0] & 2,
|
|
@@ -162,45 +166,47 @@ import { useRefFunction } from "../useRefFunction";
|
|
|
162
166
|
timer.current = null;
|
|
163
167
|
}
|
|
164
168
|
}, []);
|
|
165
|
-
var run = useCallback(
|
|
166
|
-
var _len, args, _key;
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
169
|
+
var run = useCallback(function() {
|
|
170
|
+
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
171
|
+
args[_key] = arguments[_key];
|
|
172
|
+
}
|
|
173
|
+
return _async_to_generator(function() {
|
|
174
|
+
return _ts_generator(this, function(_state) {
|
|
175
|
+
if (wait === 0 || wait === undefined) {
|
|
176
|
+
return [
|
|
177
|
+
2,
|
|
178
|
+
callback.apply(void 0, _to_consumable_array(args))
|
|
179
|
+
];
|
|
180
|
+
}
|
|
181
|
+
cancel();
|
|
173
182
|
return [
|
|
174
183
|
2,
|
|
175
|
-
|
|
184
|
+
new Promise(function(resolve) {
|
|
185
|
+
timer.current = setTimeout(function() {
|
|
186
|
+
return _async_to_generator(function() {
|
|
187
|
+
return _ts_generator(this, function(_state) {
|
|
188
|
+
switch(_state.label){
|
|
189
|
+
case 0:
|
|
190
|
+
return [
|
|
191
|
+
4,
|
|
192
|
+
callback.apply(void 0, _to_consumable_array(args))
|
|
193
|
+
];
|
|
194
|
+
case 1:
|
|
195
|
+
resolve.apply(void 0, [
|
|
196
|
+
_state.sent()
|
|
197
|
+
]);
|
|
198
|
+
return [
|
|
199
|
+
2
|
|
200
|
+
];
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
})();
|
|
204
|
+
}, wait);
|
|
205
|
+
})
|
|
176
206
|
];
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
2,
|
|
181
|
-
new Promise(function(resolve) {
|
|
182
|
-
timer.current = setTimeout(/*#__PURE__*/ _async_to_generator(function() {
|
|
183
|
-
return _ts_generator(this, function(_state) {
|
|
184
|
-
switch(_state.label){
|
|
185
|
-
case 0:
|
|
186
|
-
return [
|
|
187
|
-
4,
|
|
188
|
-
callback.apply(void 0, _to_consumable_array(args))
|
|
189
|
-
];
|
|
190
|
-
case 1:
|
|
191
|
-
resolve.apply(void 0, [
|
|
192
|
-
_state.sent()
|
|
193
|
-
]);
|
|
194
|
-
return [
|
|
195
|
-
2
|
|
196
|
-
];
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
}), wait);
|
|
200
|
-
})
|
|
201
|
-
];
|
|
202
|
-
});
|
|
203
|
-
}), [
|
|
207
|
+
});
|
|
208
|
+
})();
|
|
209
|
+
}, [
|
|
204
210
|
callback,
|
|
205
211
|
cancel,
|
|
206
212
|
wait
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
function _array_like_to_array(arr, len) {
|
|
2
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
3
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4
|
+
return arr2;
|
|
5
|
+
}
|
|
6
|
+
function _array_with_holes(arr) {
|
|
7
|
+
if (Array.isArray(arr)) return arr;
|
|
8
|
+
}
|
|
9
|
+
function _iterable_to_array_limit(arr, i) {
|
|
10
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
11
|
+
if (_i == null) return;
|
|
12
|
+
var _arr = [];
|
|
13
|
+
var _n = true;
|
|
14
|
+
var _d = false;
|
|
15
|
+
var _s, _e;
|
|
16
|
+
try {
|
|
17
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
18
|
+
_arr.push(_s.value);
|
|
19
|
+
if (i && _arr.length === i) break;
|
|
20
|
+
}
|
|
21
|
+
} catch (err) {
|
|
22
|
+
_d = true;
|
|
23
|
+
_e = err;
|
|
24
|
+
} finally{
|
|
25
|
+
try {
|
|
26
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
27
|
+
} finally{
|
|
28
|
+
if (_d) throw _e;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return _arr;
|
|
32
|
+
}
|
|
33
|
+
function _non_iterable_rest() {
|
|
34
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
35
|
+
}
|
|
36
|
+
function _sliced_to_array(arr, i) {
|
|
37
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
38
|
+
}
|
|
39
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
40
|
+
if (!o) return;
|
|
41
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
42
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
43
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
44
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
45
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
46
|
+
}
|
|
47
|
+
import { useEffect, useState } from "react";
|
|
48
|
+
export var useElementSize = function(element) {
|
|
49
|
+
var _useState = _sliced_to_array(useState({
|
|
50
|
+
width: 0,
|
|
51
|
+
height: 0
|
|
52
|
+
}), 2), size = _useState[0], setSize = _useState[1];
|
|
53
|
+
useEffect(function() {
|
|
54
|
+
if (!element.current) return;
|
|
55
|
+
var resizeObserver = new ResizeObserver(function(entries) {
|
|
56
|
+
var entry = entries[0];
|
|
57
|
+
console.log(entry);
|
|
58
|
+
setSize({
|
|
59
|
+
width: entry.borderBoxSize[0].inlineSize,
|
|
60
|
+
height: entry.borderBoxSize[0].blockSize
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
resizeObserver.observe(element.current);
|
|
64
|
+
return function() {
|
|
65
|
+
resizeObserver.disconnect();
|
|
66
|
+
};
|
|
67
|
+
}, [
|
|
68
|
+
element
|
|
69
|
+
]);
|
|
70
|
+
return size;
|
|
71
|
+
};
|
|
@@ -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;
|
|
@@ -307,6 +307,9 @@ export declare function useLanguage(): {
|
|
|
307
307
|
'workspace.title': string;
|
|
308
308
|
'workspace.searchPlaceholder': string;
|
|
309
309
|
'workspace.noResultsFor': string;
|
|
310
|
+
'workspace.file.generating': string;
|
|
311
|
+
'workspace.file.processing': string;
|
|
312
|
+
'workspace.file.processFailed': string;
|
|
310
313
|
'toolbar.bold': string;
|
|
311
314
|
'toolbar.italic': string;
|
|
312
315
|
'toolbar.strikethrough': string;
|
package/dist/I18n/locales.d.ts
CHANGED
|
@@ -271,6 +271,9 @@ export declare const cnLabels: {
|
|
|
271
271
|
'workspace.title': string;
|
|
272
272
|
'workspace.searchPlaceholder': string;
|
|
273
273
|
'workspace.noResultsFor': string;
|
|
274
|
+
'workspace.file.generating': string;
|
|
275
|
+
'workspace.file.processing': string;
|
|
276
|
+
'workspace.file.processFailed': string;
|
|
274
277
|
'toolbar.bold': string;
|
|
275
278
|
'toolbar.italic': string;
|
|
276
279
|
'toolbar.strikethrough': string;
|