@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
|
@@ -92,12 +92,22 @@ function _object_spread(target) {
|
|
|
92
92
|
}
|
|
93
93
|
function _object_without_properties(source, excluded) {
|
|
94
94
|
if (source == null) return {};
|
|
95
|
-
var target =
|
|
96
|
-
|
|
95
|
+
var target = {}, sourceKeys, key, i;
|
|
96
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
97
|
+
sourceKeys = Reflect.ownKeys(source);
|
|
98
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
99
|
+
key = sourceKeys[i];
|
|
100
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
101
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
102
|
+
target[key] = source[key];
|
|
103
|
+
}
|
|
104
|
+
return target;
|
|
105
|
+
}
|
|
106
|
+
target = _object_without_properties_loose(source, excluded);
|
|
97
107
|
if (Object.getOwnPropertySymbols) {
|
|
98
|
-
|
|
99
|
-
for(i = 0; i <
|
|
100
|
-
key =
|
|
108
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
109
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
110
|
+
key = sourceKeys[i];
|
|
101
111
|
if (excluded.indexOf(key) >= 0) continue;
|
|
102
112
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
103
113
|
target[key] = source[key];
|
|
@@ -107,12 +117,11 @@ function _object_without_properties(source, excluded) {
|
|
|
107
117
|
}
|
|
108
118
|
function _object_without_properties_loose(source, excluded) {
|
|
109
119
|
if (source == null) return {};
|
|
110
|
-
var target = {};
|
|
111
|
-
var sourceKeys = Object.keys(source);
|
|
112
|
-
var key, i;
|
|
120
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
113
121
|
for(i = 0; i < sourceKeys.length; i++){
|
|
114
122
|
key = sourceKeys[i];
|
|
115
123
|
if (excluded.indexOf(key) >= 0) continue;
|
|
124
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
116
125
|
target[key] = source[key];
|
|
117
126
|
}
|
|
118
127
|
return target;
|
|
@@ -129,7 +138,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
129
138
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
130
139
|
}
|
|
131
140
|
function _ts_generator(thisArg, body) {
|
|
132
|
-
var f, y, t,
|
|
141
|
+
var f, y, t, _ = {
|
|
133
142
|
label: 0,
|
|
134
143
|
sent: function() {
|
|
135
144
|
if (t[0] & 1) throw t[1];
|
|
@@ -137,13 +146,17 @@ function _ts_generator(thisArg, body) {
|
|
|
137
146
|
},
|
|
138
147
|
trys: [],
|
|
139
148
|
ops: []
|
|
140
|
-
};
|
|
141
|
-
return g
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
},
|
|
146
|
-
|
|
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
|
+
}
|
|
147
160
|
}), g;
|
|
148
161
|
function verb(n) {
|
|
149
162
|
return function(v) {
|
|
@@ -155,7 +168,7 @@ function _ts_generator(thisArg, body) {
|
|
|
155
168
|
}
|
|
156
169
|
function step(op) {
|
|
157
170
|
if (f) throw new TypeError("Generator is already executing.");
|
|
158
|
-
while(_)try {
|
|
171
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
159
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;
|
|
160
173
|
if (y = 0, t) op = [
|
|
161
174
|
op[0] & 2,
|
|
@@ -261,8 +274,8 @@ import { ReadonlyImage } from "../Image";
|
|
|
261
274
|
* onResizeStop={(size) => console.log('新尺寸:', size)}
|
|
262
275
|
* />
|
|
263
276
|
* ```
|
|
264
|
-
*/ export var ResizeImage = function(
|
|
265
|
-
var onResizeStart =
|
|
277
|
+
*/ export var ResizeImage = function(_0) {
|
|
278
|
+
var onResizeStart = _0.onResizeStart, onResizeStop = _0.onResizeStop, selected = _0.selected, defaultSize = _0.defaultSize, props = _object_without_properties(_0, [
|
|
266
279
|
"onResizeStart",
|
|
267
280
|
"onResizeStop",
|
|
268
281
|
"selected",
|
|
@@ -418,80 +431,82 @@ export function Media(param) {
|
|
|
418
431
|
}, [
|
|
419
432
|
element.finished
|
|
420
433
|
]);
|
|
421
|
-
var initial = useRefFunction(
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
realUrl = element === null || element === void 0 ? void 0 : element.url;
|
|
436
|
-
setState({
|
|
437
|
-
url: realUrl
|
|
438
|
-
});
|
|
439
|
-
if (finalType === 'image' || finalType === 'other') {
|
|
440
|
-
img = document.createElement('img');
|
|
441
|
-
img.referrerPolicy = 'no-referrer';
|
|
442
|
-
img.crossOrigin = 'anonymous';
|
|
443
|
-
img.src = realUrl;
|
|
444
|
-
img.onerror = function() {
|
|
445
|
-
setState({
|
|
446
|
-
loadSuccess: false
|
|
447
|
-
});
|
|
448
|
-
};
|
|
449
|
-
img.onload = function() {
|
|
450
|
-
return setState({
|
|
451
|
-
loadSuccess: true
|
|
452
|
-
});
|
|
453
|
-
};
|
|
454
|
-
}
|
|
455
|
-
if (finalType === 'video') {
|
|
456
|
-
video = document.createElement('video');
|
|
457
|
-
video.src = realUrl;
|
|
458
|
-
video.preload = 'metadata';
|
|
459
|
-
video.onerror = function() {
|
|
460
|
-
setState({
|
|
461
|
-
loadSuccess: false
|
|
462
|
-
});
|
|
463
|
-
};
|
|
464
|
-
video.onloadedmetadata = function() {
|
|
465
|
-
setState({
|
|
466
|
-
loadSuccess: true
|
|
467
|
-
});
|
|
468
|
-
};
|
|
469
|
-
}
|
|
470
|
-
if (finalType === 'audio') {
|
|
471
|
-
audio = document.createElement('audio');
|
|
472
|
-
audio.src = realUrl;
|
|
473
|
-
audio.preload = 'metadata';
|
|
474
|
-
audio.onerror = function() {
|
|
475
|
-
setState({
|
|
476
|
-
loadSuccess: false
|
|
477
|
-
});
|
|
478
|
-
};
|
|
479
|
-
audio.onloadedmetadata = function() {
|
|
480
|
-
setState({
|
|
481
|
-
loadSuccess: true
|
|
482
|
-
});
|
|
483
|
-
};
|
|
484
|
-
}
|
|
485
|
-
if (!element.mediaType) {
|
|
486
|
-
updateElement({
|
|
487
|
-
mediaType: state().type
|
|
434
|
+
var initial = useRefFunction(function() {
|
|
435
|
+
return _async_to_generator(function() {
|
|
436
|
+
var type, finalType, realUrl, img, video, audio;
|
|
437
|
+
return _ts_generator(this, function(_state) {
|
|
438
|
+
type = getMediaType(element === null || element === void 0 ? void 0 : element.url, element.alt);
|
|
439
|
+
type = !type ? 'image' : type;
|
|
440
|
+
finalType = [
|
|
441
|
+
'image',
|
|
442
|
+
'video',
|
|
443
|
+
'autio',
|
|
444
|
+
'attachment'
|
|
445
|
+
].includes(type) ? type : 'other';
|
|
446
|
+
setState({
|
|
447
|
+
type: finalType
|
|
488
448
|
});
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
449
|
+
realUrl = element === null || element === void 0 ? void 0 : element.url;
|
|
450
|
+
setState({
|
|
451
|
+
url: realUrl
|
|
452
|
+
});
|
|
453
|
+
if (finalType === 'image' || finalType === 'other') {
|
|
454
|
+
img = document.createElement('img');
|
|
455
|
+
img.referrerPolicy = 'no-referrer';
|
|
456
|
+
img.crossOrigin = 'anonymous';
|
|
457
|
+
img.src = realUrl;
|
|
458
|
+
img.onerror = function() {
|
|
459
|
+
setState({
|
|
460
|
+
loadSuccess: false
|
|
461
|
+
});
|
|
462
|
+
};
|
|
463
|
+
img.onload = function() {
|
|
464
|
+
return setState({
|
|
465
|
+
loadSuccess: true
|
|
466
|
+
});
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
if (finalType === 'video') {
|
|
470
|
+
video = document.createElement('video');
|
|
471
|
+
video.src = realUrl;
|
|
472
|
+
video.preload = 'metadata';
|
|
473
|
+
video.onerror = function() {
|
|
474
|
+
setState({
|
|
475
|
+
loadSuccess: false
|
|
476
|
+
});
|
|
477
|
+
};
|
|
478
|
+
video.onloadedmetadata = function() {
|
|
479
|
+
setState({
|
|
480
|
+
loadSuccess: true
|
|
481
|
+
});
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
if (finalType === 'audio') {
|
|
485
|
+
audio = document.createElement('audio');
|
|
486
|
+
audio.src = realUrl;
|
|
487
|
+
audio.preload = 'metadata';
|
|
488
|
+
audio.onerror = function() {
|
|
489
|
+
setState({
|
|
490
|
+
loadSuccess: false
|
|
491
|
+
});
|
|
492
|
+
};
|
|
493
|
+
audio.onloadedmetadata = function() {
|
|
494
|
+
setState({
|
|
495
|
+
loadSuccess: true
|
|
496
|
+
});
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
if (!element.mediaType) {
|
|
500
|
+
updateElement({
|
|
501
|
+
mediaType: state().type
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
return [
|
|
505
|
+
2
|
|
506
|
+
];
|
|
507
|
+
});
|
|
508
|
+
})();
|
|
509
|
+
});
|
|
495
510
|
useLayoutEffect(function() {
|
|
496
511
|
initial();
|
|
497
512
|
}, [
|
|
@@ -96,12 +96,22 @@ function _object_spread_props(target, source) {
|
|
|
96
96
|
}
|
|
97
97
|
function _object_without_properties(source, excluded) {
|
|
98
98
|
if (source == null) return {};
|
|
99
|
-
var target =
|
|
100
|
-
|
|
99
|
+
var target = {}, sourceKeys, key, i;
|
|
100
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
101
|
+
sourceKeys = Reflect.ownKeys(source);
|
|
102
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
103
|
+
key = sourceKeys[i];
|
|
104
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
105
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
106
|
+
target[key] = source[key];
|
|
107
|
+
}
|
|
108
|
+
return target;
|
|
109
|
+
}
|
|
110
|
+
target = _object_without_properties_loose(source, excluded);
|
|
101
111
|
if (Object.getOwnPropertySymbols) {
|
|
102
|
-
|
|
103
|
-
for(i = 0; i <
|
|
104
|
-
key =
|
|
112
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
113
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
114
|
+
key = sourceKeys[i];
|
|
105
115
|
if (excluded.indexOf(key) >= 0) continue;
|
|
106
116
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
107
117
|
target[key] = source[key];
|
|
@@ -111,12 +121,11 @@ function _object_without_properties(source, excluded) {
|
|
|
111
121
|
}
|
|
112
122
|
function _object_without_properties_loose(source, excluded) {
|
|
113
123
|
if (source == null) return {};
|
|
114
|
-
var target = {};
|
|
115
|
-
var sourceKeys = Object.keys(source);
|
|
116
|
-
var key, i;
|
|
124
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
117
125
|
for(i = 0; i < sourceKeys.length; i++){
|
|
118
126
|
key = sourceKeys[i];
|
|
119
127
|
if (excluded.indexOf(key) >= 0) continue;
|
|
128
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
120
129
|
target[key] = source[key];
|
|
121
130
|
}
|
|
122
131
|
return target;
|
|
@@ -171,8 +180,8 @@ import useScrollShadow from "./useScrollShadow";
|
|
|
171
180
|
* 组件还使用了 `IntersectionObserver` 来检测表格是否溢出,并相应地添加或移除 CSS 类。
|
|
172
181
|
*
|
|
173
182
|
* @see https://reactjs.org/docs/hooks-intro.html React Hooks
|
|
174
|
-
*/ export var SlateTable = function(
|
|
175
|
-
var hashId =
|
|
183
|
+
*/ export var SlateTable = function(_0) {
|
|
184
|
+
var hashId = _0.hashId, children = _0.children, props = _object_without_properties(_0, [
|
|
176
185
|
"hashId",
|
|
177
186
|
"children"
|
|
178
187
|
]);
|
|
@@ -126,7 +126,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
126
126
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
127
127
|
}
|
|
128
128
|
function _ts_generator(thisArg, body) {
|
|
129
|
-
var f, y, t,
|
|
129
|
+
var f, y, t, _ = {
|
|
130
130
|
label: 0,
|
|
131
131
|
sent: function() {
|
|
132
132
|
if (t[0] & 1) throw t[1];
|
|
@@ -134,13 +134,17 @@ function _ts_generator(thisArg, body) {
|
|
|
134
134
|
},
|
|
135
135
|
trys: [],
|
|
136
136
|
ops: []
|
|
137
|
-
};
|
|
138
|
-
return g
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
},
|
|
143
|
-
|
|
137
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
138
|
+
return d(g, "next", {
|
|
139
|
+
value: verb(0)
|
|
140
|
+
}), d(g, "throw", {
|
|
141
|
+
value: verb(1)
|
|
142
|
+
}), d(g, "return", {
|
|
143
|
+
value: verb(2)
|
|
144
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
145
|
+
value: function() {
|
|
146
|
+
return this;
|
|
147
|
+
}
|
|
144
148
|
}), g;
|
|
145
149
|
function verb(n) {
|
|
146
150
|
return function(v) {
|
|
@@ -152,7 +156,7 @@ function _ts_generator(thisArg, body) {
|
|
|
152
156
|
}
|
|
153
157
|
function step(op) {
|
|
154
158
|
if (f) throw new TypeError("Generator is already executing.");
|
|
155
|
-
while(_)try {
|
|
159
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
156
160
|
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;
|
|
157
161
|
if (y = 0, t) op = [
|
|
158
162
|
op[0] & 2,
|
|
@@ -278,8 +282,8 @@ var updateNodeContext = function(editor, domRef, suggestionConnext, props, onSel
|
|
|
278
282
|
};
|
|
279
283
|
}
|
|
280
284
|
};
|
|
281
|
-
var loadItemsData =
|
|
282
|
-
|
|
285
|
+
var loadItemsData = function(items, props, setLoading, setSelectedItems) {
|
|
286
|
+
return _async_to_generator(function() {
|
|
283
287
|
var result;
|
|
284
288
|
return _ts_generator(this, function(_state) {
|
|
285
289
|
switch(_state.label){
|
|
@@ -303,11 +307,8 @@ var loadItemsData = /*#__PURE__*/ function() {
|
|
|
303
307
|
];
|
|
304
308
|
}
|
|
305
309
|
});
|
|
306
|
-
});
|
|
307
|
-
|
|
308
|
-
return _ref.apply(this, arguments);
|
|
309
|
-
};
|
|
310
|
-
}();
|
|
310
|
+
})();
|
|
311
|
+
};
|
|
311
312
|
var initializeAutoOpen = function(autoOpen, type, setOpen, suggestionConnext) {
|
|
312
313
|
var _suggestionConnext_setOpen;
|
|
313
314
|
if (!autoOpen) return;
|
|
@@ -343,7 +343,7 @@ import { handleTextAndInlineElementsPure, setFinishedProp } from "./parseText";
|
|
|
343
343
|
result.otherProps.finished = finished;
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
|
-
} catch (
|
|
346
|
+
} catch (unused) {
|
|
347
347
|
result.url = currentElement === null || currentElement === void 0 ? void 0 : currentElement.url;
|
|
348
348
|
}
|
|
349
349
|
return result;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// 常量定义
|
|
2
1
|
function _array_like_to_array(arr, len) {
|
|
3
2
|
if (len == null || len > arr.length) len = arr.length;
|
|
4
3
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -24,6 +23,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
24
23
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
25
24
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
26
25
|
}
|
|
26
|
+
// 常量定义
|
|
27
27
|
var EMPTY_LINE_DISTANCE_THRESHOLD = 4; // 两个元素之间的行距阈值
|
|
28
28
|
var EMPTY_LINE_CALCULATION_OFFSET = 2; // 计算空行数量时的偏移量
|
|
29
29
|
var EMPTY_LINE_DIVISOR = 2; // 计算空行数量的除数
|
|
@@ -73,7 +73,10 @@ var stringifyObj = remark().use(remarkParse).use(fixStrongWithSpecialChars).use(
|
|
|
73
73
|
singleDollarTextMath: false
|
|
74
74
|
}).use(remarkRehype, {
|
|
75
75
|
allowDangerousHtml: true
|
|
76
|
-
}).use(rehypeRaw).use(rehypeKatex).use(remarkGfm
|
|
76
|
+
}).use(rehypeRaw).use(rehypeKatex).use(remarkGfm, {
|
|
77
|
+
singleTilde: false
|
|
78
|
+
}) // 禁用单波浪线删除线
|
|
79
|
+
.use(remarkFrontmatter, [
|
|
77
80
|
'yaml'
|
|
78
81
|
]);
|
|
79
82
|
var myRemark = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
function _array_like_to_array(arr, len) {
|
|
2
2
|
if (len == null || len > arr.length) len = arr.length;
|
|
3
3
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4
4
|
return arr2;
|
|
@@ -79,7 +79,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
79
79
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
80
80
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
81
81
|
}
|
|
82
|
-
import { Node } from "slate";
|
|
82
|
+
/* eslint-disable @typescript-eslint/no-loop-func */ /* eslint-disable no-case-declarations */ /* eslint-disable no-param-reassign */ /* eslint-disable @typescript-eslint/no-use-before-define */ import { Node } from "slate";
|
|
83
83
|
import stringWidth from "string-width";
|
|
84
84
|
import { debugInfo } from "../../../Utils/debugUtils";
|
|
85
85
|
import { getMediaType } from "../utils/dom";
|
|
@@ -350,7 +350,9 @@ var markdownParser = unified().use(remarkParse) // 解析 Markdown
|
|
|
350
350
|
.use(remarkHtml).use(remarkFrontmatter, [
|
|
351
351
|
'yaml'
|
|
352
352
|
]) // 处理前置元数据
|
|
353
|
-
.use(remarkGfm
|
|
353
|
+
.use(remarkGfm, {
|
|
354
|
+
singleTilde: false
|
|
355
|
+
}) // GFM 插件,禁用单波浪线删除线
|
|
354
356
|
.use(fixStrongWithSpecialChars) // 修复包含特殊字符的加粗文本
|
|
355
357
|
.use(convertParagraphToImage) // 将以 ! 开头的段落转换为图片,将 | 开头的段落转换为表格
|
|
356
358
|
.use(remarkMath, {
|
|
@@ -146,7 +146,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
146
146
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
147
147
|
}
|
|
148
148
|
function _ts_generator(thisArg, body) {
|
|
149
|
-
var f, y, t,
|
|
149
|
+
var f, y, t, _ = {
|
|
150
150
|
label: 0,
|
|
151
151
|
sent: function() {
|
|
152
152
|
if (t[0] & 1) throw t[1];
|
|
@@ -154,13 +154,17 @@ function _ts_generator(thisArg, body) {
|
|
|
154
154
|
},
|
|
155
155
|
trys: [],
|
|
156
156
|
ops: []
|
|
157
|
-
};
|
|
158
|
-
return g
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
},
|
|
163
|
-
|
|
157
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
158
|
+
return d(g, "next", {
|
|
159
|
+
value: verb(0)
|
|
160
|
+
}), d(g, "throw", {
|
|
161
|
+
value: verb(1)
|
|
162
|
+
}), d(g, "return", {
|
|
163
|
+
value: verb(2)
|
|
164
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
165
|
+
value: function() {
|
|
166
|
+
return this;
|
|
167
|
+
}
|
|
164
168
|
}), g;
|
|
165
169
|
function verb(n) {
|
|
166
170
|
return function(v) {
|
|
@@ -172,7 +176,7 @@ function _ts_generator(thisArg, body) {
|
|
|
172
176
|
}
|
|
173
177
|
function step(op) {
|
|
174
178
|
if (f) throw new TypeError("Generator is already executing.");
|
|
175
|
-
while(_)try {
|
|
179
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
176
180
|
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;
|
|
177
181
|
if (y = 0, t) op = [
|
|
178
182
|
op[0] & 2,
|
|
@@ -300,8 +304,8 @@ import { parseMarkdownToNodesAndInsert } from "./parseMarkdownToNodesAndInsert";
|
|
|
300
304
|
};
|
|
301
305
|
/**
|
|
302
306
|
* 处理粘贴的 HTML 内容
|
|
303
|
-
*/ export var handleHtmlPaste =
|
|
304
|
-
|
|
307
|
+
*/ export var handleHtmlPaste = function(editor, clipboardData, editorProps) {
|
|
308
|
+
return _async_to_generator(function() {
|
|
305
309
|
var html, rtf, error;
|
|
306
310
|
return _ts_generator(this, function(_state) {
|
|
307
311
|
switch(_state.label){
|
|
@@ -355,15 +359,12 @@ import { parseMarkdownToNodesAndInsert } from "./parseMarkdownToNodesAndInsert";
|
|
|
355
359
|
];
|
|
356
360
|
}
|
|
357
361
|
});
|
|
358
|
-
});
|
|
359
|
-
|
|
360
|
-
return _ref.apply(this, arguments);
|
|
361
|
-
};
|
|
362
|
-
}();
|
|
362
|
+
})();
|
|
363
|
+
};
|
|
363
364
|
/**
|
|
364
365
|
* 处理粘贴的文件
|
|
365
|
-
*/ export var handleFilesPaste =
|
|
366
|
-
|
|
366
|
+
*/ export var handleFilesPaste = function(editor, clipboardData, editorProps) {
|
|
367
|
+
return _async_to_generator(function() {
|
|
367
368
|
var _editorProps_image, fileList, hideLoading, _editor_selection_focus, _editor_selection, url, _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, file, _editorProps_image1, serverUrl, err, selection, node, at, error, error1;
|
|
368
369
|
return _ts_generator(this, function(_state) {
|
|
369
370
|
switch(_state.label){
|
|
@@ -525,11 +526,8 @@ import { parseMarkdownToNodesAndInsert } from "./parseMarkdownToNodesAndInsert";
|
|
|
525
526
|
];
|
|
526
527
|
}
|
|
527
528
|
});
|
|
528
|
-
});
|
|
529
|
-
|
|
530
|
-
return _ref.apply(this, arguments);
|
|
531
|
-
};
|
|
532
|
-
}();
|
|
529
|
+
})();
|
|
530
|
+
};
|
|
533
531
|
/**
|
|
534
532
|
* 处理特殊文本格式(media:// 和 attach:// 链接)
|
|
535
533
|
*/ export var handleSpecialTextPaste = function(editor, text, selection) {
|
|
@@ -686,8 +684,8 @@ import { parseMarkdownToNodesAndInsert } from "./parseMarkdownToNodesAndInsert";
|
|
|
686
684
|
};
|
|
687
685
|
/**
|
|
688
686
|
* 处理普通文本粘贴
|
|
689
|
-
*/ export var handlePlainTextPaste =
|
|
690
|
-
|
|
687
|
+
*/ export var handlePlainTextPaste = function(editor, text, selection, plugins) {
|
|
688
|
+
return _async_to_generator(function() {
|
|
691
689
|
var success;
|
|
692
690
|
return _ts_generator(this, function(_state) {
|
|
693
691
|
switch(_state.label){
|
|
@@ -745,11 +743,8 @@ import { parseMarkdownToNodesAndInsert } from "./parseMarkdownToNodesAndInsert";
|
|
|
745
743
|
];
|
|
746
744
|
}
|
|
747
745
|
});
|
|
748
|
-
});
|
|
749
|
-
|
|
750
|
-
return _ref.apply(this, arguments);
|
|
751
|
-
};
|
|
752
|
-
}();
|
|
746
|
+
})();
|
|
747
|
+
};
|
|
753
748
|
/**
|
|
754
749
|
* 检查是否需要直接插入文本(在特定节点类型中)
|
|
755
750
|
*/ export var shouldInsertTextDirectly = function(editor, selection) {
|
|
@@ -45,7 +45,6 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
45
45
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
46
46
|
}
|
|
47
47
|
import isHotkey from "is-hotkey";
|
|
48
|
-
import React from "react";
|
|
49
48
|
import { Editor, Element, Node, Path, Range, Transforms } from "slate";
|
|
50
49
|
import { isMod } from "../../utils";
|
|
51
50
|
import { EditorUtils } from "../../utils/editorUtils";
|
|
@@ -88,7 +88,6 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
88
88
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
89
89
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
90
90
|
}
|
|
91
|
-
import React from "react";
|
|
92
91
|
import { Editor, Element, Node, Path, Point, Range, Transforms } from "slate";
|
|
93
92
|
import { isMod } from "../../utils";
|
|
94
93
|
import { EditorUtils } from "../../utils/editorUtils";
|
|
@@ -80,7 +80,6 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
80
80
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
81
81
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
82
82
|
}
|
|
83
|
-
import React from "react";
|
|
84
83
|
import { Editor, Element, Node, Range } from "slate";
|
|
85
84
|
import { TextMatchNodes } from "../elements";
|
|
86
85
|
export var MatchKey = /*#__PURE__*/ function() {
|
|
@@ -88,7 +88,6 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
88
88
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
89
89
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
90
90
|
}
|
|
91
|
-
import React from "react";
|
|
92
91
|
import { Editor, Element, Node, Path, Point, Range, Text, Transforms } from "slate";
|
|
93
92
|
/**
|
|
94
93
|
* TabKey 类用于处理编辑器中的 Tab 键事件。
|