@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.
Files changed (308) hide show
  1. package/dist/AILabel/index.js +17 -8
  2. package/dist/AgenticLayout/index.js +3 -5
  3. package/dist/BackTo/BackBottom.js +17 -8
  4. package/dist/BackTo/BackTop.js +17 -8
  5. package/dist/BackTo/ScrollVisibleButton.js +75 -11
  6. package/dist/Bubble/AIBubble.js +131 -121
  7. package/dist/Bubble/Avatar/index.js +19 -10
  8. package/dist/Bubble/FileView.js +2 -2
  9. package/dist/Bubble/List/PureBubbleList.js +4 -5
  10. package/dist/Bubble/List/index.js +4 -5
  11. package/dist/Bubble/List/style.js +3 -0
  12. package/dist/Bubble/MessagesContent/BubbleExtra.js +108 -93
  13. package/dist/Bubble/MessagesContent/CopyButton/index.js +36 -26
  14. package/dist/Bubble/MessagesContent/DocInfo.js +19 -10
  15. package/dist/Bubble/MessagesContent/MarkdownPreview.js +2 -2
  16. package/dist/Bubble/MessagesContent/index.js +149 -130
  17. package/dist/Bubble/PureBubble.js +151 -133
  18. package/dist/Bubble/UserBubble.js +1 -1
  19. package/dist/Bubble/style.js +2 -2
  20. package/dist/Bubble/types/BubbleExtra.js +4 -1
  21. package/dist/Bubble/types/DocInfo.js +9 -1
  22. package/dist/ChatLayout/components/FooterBackgroundLottie/images/img_0.png +0 -0
  23. package/dist/ChatLayout/components/FooterBackgroundLottie/images/img_1.png +0 -0
  24. package/dist/ChatLayout/components/FooterBackgroundLottie/images/img_2.png +0 -0
  25. package/dist/ChatLayout/components/FooterBackgroundLottie/index.d.ts +51 -0
  26. package/dist/ChatLayout/components/FooterBackgroundLottie/index.js +45 -0
  27. package/dist/ChatLayout/components/FooterBackgroundLottie/lottie.d.ts +85 -0
  28. package/dist/ChatLayout/components/FooterBackgroundLottie/lottie.js +382 -0
  29. package/dist/ChatLayout/index.js +52 -14
  30. package/dist/ChatLayout/style.js +11 -0
  31. package/dist/ChatLayout/types.d.ts +28 -0
  32. package/dist/Components/ActionIconBox/index.js +30 -38
  33. package/dist/Components/ActionItemBox/ActionItemBox.js +1 -1
  34. package/dist/Components/Button/SwitchButton/index.js +18 -17
  35. package/dist/Components/LayoutHeader/index.js +5 -3
  36. package/dist/Components/LayoutHeader/style.js +5 -0
  37. package/dist/Components/Loading/CreativeRecommendationLoading.js +2 -2
  38. package/dist/Components/Loading/CreativeSparkLoading.js +2 -2
  39. package/dist/Components/SuggestionList/index.js +20 -19
  40. package/dist/Components/TextAnimate/index.js +19 -10
  41. package/dist/Components/TypingAnimation/index.js +19 -10
  42. package/dist/Components/effects/EffectPlayer.js +20 -11
  43. package/dist/Components/icons/LoadingSpinnerIcon.js +19 -10
  44. package/dist/History/components/HistoryActionsBox.js +21 -23
  45. package/dist/History/components/HistoryItem.js +61 -53
  46. package/dist/History/components/HistoryRunningIcon.js +19 -10
  47. package/dist/History/components/LoadMoreComponent.js +61 -55
  48. package/dist/History/components/NewChatComponent.js +53 -47
  49. package/dist/History/components/SearchComponent.js +24 -26
  50. package/dist/History/hooks/useHistory.js +80 -73
  51. package/dist/History/index.js +17 -16
  52. package/dist/History/menu.js +17 -8
  53. package/dist/Hooks/useAutoScroll.js +19 -19
  54. package/dist/Hooks/useDebounceFn/index.js +51 -45
  55. package/dist/Hooks/useElementSize.d.ts +5 -0
  56. package/dist/Hooks/useElementSize.js +71 -0
  57. package/dist/Hooks/useIntersectionOnce.js +17 -8
  58. package/dist/Hooks/useLanguage.d.ts +3 -0
  59. package/dist/I18n/locales.d.ts +3 -0
  60. package/dist/I18n/locales.js +8 -0
  61. package/dist/MarkdownEditor/BaseMarkdownEditor.js +22 -12
  62. package/dist/MarkdownEditor/editor/Editor.js +31 -39
  63. package/dist/MarkdownEditor/editor/components/CommentList/index.js +29 -37
  64. package/dist/MarkdownEditor/editor/elements/Image/index.js +86 -71
  65. package/dist/MarkdownEditor/editor/elements/List/ListItem.js +17 -16
  66. package/dist/MarkdownEditor/editor/elements/Media/index.js +107 -92
  67. package/dist/MarkdownEditor/editor/elements/Table/Table.js +19 -10
  68. package/dist/MarkdownEditor/editor/elements/TagPopup/index.js +17 -16
  69. package/dist/MarkdownEditor/editor/parser/parse/parseBlockElements.js +1 -1
  70. package/dist/MarkdownEditor/editor/parser/parse/parseCode.js +1 -1
  71. package/dist/MarkdownEditor/editor/parser/parse/parseEmptyLines.js +1 -1
  72. package/dist/MarkdownEditor/editor/parser/parse/parseTable.js +4 -1
  73. package/dist/MarkdownEditor/editor/parser/parserSlateNodeToMarkdown.js +2 -2
  74. package/dist/MarkdownEditor/editor/parser/remarkParse.js +3 -1
  75. package/dist/MarkdownEditor/editor/plugins/handlePaste.js +25 -30
  76. package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/arrow.js +0 -1
  77. package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/enter.js +0 -1
  78. package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/match.js +0 -1
  79. package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/tab.js +0 -1
  80. package/dist/MarkdownEditor/editor/plugins/insertParsedHtmlNodes.js +39 -53
  81. package/dist/MarkdownEditor/editor/plugins/useKeyboard.js +1 -1
  82. package/dist/MarkdownEditor/editor/plugins/useOnchange.js +28 -22
  83. package/dist/MarkdownEditor/editor/plugins/withMarkdown.js +1 -1
  84. package/dist/MarkdownEditor/editor/store.js +17 -13
  85. package/dist/MarkdownEditor/editor/tools/InsertAutocomplete.js +202 -197
  86. package/dist/MarkdownEditor/editor/tools/InsertLink.js +2 -2
  87. package/dist/MarkdownEditor/editor/tools/ToolBar/ReadonlyBaseBar.js +142 -134
  88. package/dist/MarkdownEditor/editor/utils/ace.js +61 -61
  89. package/dist/MarkdownEditor/editor/utils/editorUtils.js +11 -4
  90. package/dist/MarkdownEditor/editor/utils/index.js +8 -2
  91. package/dist/MarkdownEditor/editor/utils/keyboard.js +31 -35
  92. package/dist/MarkdownEditor/editor/utils/markdownToHtml.js +23 -17
  93. package/dist/MarkdownEditor/editor/utils/media.js +21 -23
  94. package/dist/MarkdownEditor/editor/utils/performanceMonitor.js +55 -50
  95. package/dist/MarkdownEditor/editor/utils/useLocalState.js +11 -4
  96. package/dist/MarkdownEditor/types.d.ts +1 -0
  97. package/dist/MarkdownEditor/types.js +4 -1
  98. package/dist/MarkdownEditor/utils/native-table/native-table-editor.js +14 -14
  99. package/dist/MarkdownEditor/utils/native-table/native-table-keyboard.js +2 -2
  100. package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/style.js +1 -0
  101. package/dist/MarkdownInputField/AttachmentButton/index.js +33 -31
  102. package/dist/MarkdownInputField/BeforeToolContainer/BeforeToolContainer.js +14 -7
  103. package/dist/MarkdownInputField/FileMapView/FileMapViewItem.js +2 -2
  104. package/dist/MarkdownInputField/FileMapView/index.js +17 -16
  105. package/dist/MarkdownInputField/FilePaste/index.js +25 -30
  106. package/dist/MarkdownInputField/FileUploadManager/index.js +39 -40
  107. package/dist/MarkdownInputField/MarkdownInputField.js +38 -29
  108. package/dist/MarkdownInputField/QuickActions/index.js +66 -60
  109. package/dist/MarkdownInputField/SendButton/index.js +22 -13
  110. package/dist/MarkdownInputField/Suggestion/index.js +17 -16
  111. package/dist/MarkdownInputField/VoiceInput/index.js +51 -45
  112. package/dist/MarkdownInputField/VoiceInputManager/index.js +133 -125
  113. package/dist/MarkdownInputField/hooks/useMarkdownInputFieldHandlers.js +103 -101
  114. package/dist/MarkdownInputField/hooks/useMarkdownInputFieldStyles.js +1 -1
  115. package/dist/MarkdownInputField/style.js +1 -2
  116. package/dist/MarkdownInputField/types/MarkdownInputFieldProps.js +14 -1
  117. package/dist/Plugins/chart/BarChart/index.js +8 -8
  118. package/dist/Plugins/chart/ChartRender.js +52 -46
  119. package/dist/Plugins/chart/DonutChart/index.js +26 -17
  120. package/dist/Plugins/chart/DonutChart/plugins.js +1 -1
  121. package/dist/Plugins/chart/DonutChart/types.js +1 -1
  122. package/dist/Plugins/chart/FunnelChart/index.js +31 -28
  123. package/dist/Plugins/chart/LineChart/index.js +19 -10
  124. package/dist/Plugins/chart/RadarChart/index.js +19 -10
  125. package/dist/Plugins/chart/ScatterChart/index.js +19 -10
  126. package/dist/Plugins/chart/components/ChartContainer/ChartContainer.js +20 -11
  127. package/dist/Plugins/chart/index.js +31 -13
  128. package/dist/Plugins/chart/loadChartRuntime.js +17 -16
  129. package/dist/Plugins/chart/types/classNames.js +4 -1
  130. package/dist/Plugins/chart/utils.js +20 -20
  131. package/dist/Plugins/code/CodeUI/Katex/Katex.js +52 -46
  132. package/dist/Plugins/code/components/AceEditor.js +149 -133
  133. package/dist/Plugins/code/components/CodeRenderer.js +7 -7
  134. package/dist/Plugins/code/components/CodeToolbar.js +2 -2
  135. package/dist/Plugins/code/components/LanguageSelector.js +6 -6
  136. package/dist/Plugins/code/components/LoadImage.js +5 -5
  137. package/dist/Plugins/code/components/ThinkBlock.js +8 -8
  138. package/dist/Plugins/code/hooks/useCodeEditorState.js +5 -5
  139. package/dist/Plugins/code/index.js +6 -6
  140. package/dist/Plugins/code/langIconMap.js +0 -1
  141. package/dist/Plugins/code/langIcons/AbapIcon.js +19 -10
  142. package/dist/Plugins/code/langIcons/ActionscriptIcon.js +19 -10
  143. package/dist/Plugins/code/langIcons/AdaIcon.js +19 -10
  144. package/dist/Plugins/code/langIcons/ApacheIcon.js +19 -10
  145. package/dist/Plugins/code/langIcons/ApexIcon.js +19 -10
  146. package/dist/Plugins/code/langIcons/AplIcon.js +19 -10
  147. package/dist/Plugins/code/langIcons/ApplescriptIcon.js +19 -10
  148. package/dist/Plugins/code/langIcons/AstroIcon.js +19 -10
  149. package/dist/Plugins/code/langIcons/AwkIcon.js +19 -10
  150. package/dist/Plugins/code/langIcons/BallerinaIcon.js +19 -10
  151. package/dist/Plugins/code/langIcons/BatIcon.js +19 -10
  152. package/dist/Plugins/code/langIcons/BicepIcon.js +19 -10
  153. package/dist/Plugins/code/langIcons/BladeIcon.js +19 -10
  154. package/dist/Plugins/code/langIcons/CIcon.js +19 -10
  155. package/dist/Plugins/code/langIcons/CadenceIcon.js +19 -10
  156. package/dist/Plugins/code/langIcons/ClojureIcon.js +19 -10
  157. package/dist/Plugins/code/langIcons/CmakeIcon.js +19 -10
  158. package/dist/Plugins/code/langIcons/CobolIcon.js +19 -10
  159. package/dist/Plugins/code/langIcons/CodeqlIcon.js +19 -10
  160. package/dist/Plugins/code/langIcons/CoffeeIcon.js +19 -10
  161. package/dist/Plugins/code/langIcons/ConsoleIcon.js +19 -10
  162. package/dist/Plugins/code/langIcons/CppIcon.js +19 -10
  163. package/dist/Plugins/code/langIcons/CrystalIcon.js +19 -10
  164. package/dist/Plugins/code/langIcons/CsharpIcon.js +19 -10
  165. package/dist/Plugins/code/langIcons/CssIcon.js +19 -10
  166. package/dist/Plugins/code/langIcons/DIcon.js +19 -10
  167. package/dist/Plugins/code/langIcons/DartIcon.js +19 -10
  168. package/dist/Plugins/code/langIcons/DatabaseIcon.js +19 -10
  169. package/dist/Plugins/code/langIcons/DiffIcon.js +19 -10
  170. package/dist/Plugins/code/langIcons/DockerIcon.js +19 -10
  171. package/dist/Plugins/code/langIcons/DotenvIcon.js +19 -10
  172. package/dist/Plugins/code/langIcons/ElixirIcon.js +19 -10
  173. package/dist/Plugins/code/langIcons/ElmIcon.js +19 -10
  174. package/dist/Plugins/code/langIcons/ErbIcon.js +19 -10
  175. package/dist/Plugins/code/langIcons/ErlangIcon.js +19 -10
  176. package/dist/Plugins/code/langIcons/FsharpIcon.js +19 -10
  177. package/dist/Plugins/code/langIcons/GdscriptIcon.js +19 -10
  178. package/dist/Plugins/code/langIcons/GlslIcon.js +19 -10
  179. package/dist/Plugins/code/langIcons/GnuplotIcon.js +19 -10
  180. package/dist/Plugins/code/langIcons/GoIcon.js +19 -10
  181. package/dist/Plugins/code/langIcons/GraphqlIcon.js +19 -10
  182. package/dist/Plugins/code/langIcons/GroovyIcon.js +19 -10
  183. package/dist/Plugins/code/langIcons/HackIcon.js +19 -10
  184. package/dist/Plugins/code/langIcons/HamlIcon.js +19 -10
  185. package/dist/Plugins/code/langIcons/HandlebarsIcon.js +19 -10
  186. package/dist/Plugins/code/langIcons/HaskellIcon.js +19 -10
  187. package/dist/Plugins/code/langIcons/HclIcon.js +19 -10
  188. package/dist/Plugins/code/langIcons/HclLightIcon.js +19 -10
  189. package/dist/Plugins/code/langIcons/HjsonIcon.js +19 -10
  190. package/dist/Plugins/code/langIcons/HlslIcon.js +19 -10
  191. package/dist/Plugins/code/langIcons/HtmlIcon.js +19 -10
  192. package/dist/Plugins/code/langIcons/HttpIcon.js +19 -10
  193. package/dist/Plugins/code/langIcons/ImbaIcon.js +19 -10
  194. package/dist/Plugins/code/langIcons/IniIcon.js +19 -10
  195. package/dist/Plugins/code/langIcons/JavaIcon.js +19 -10
  196. package/dist/Plugins/code/langIcons/JavascriptIcon.js +19 -10
  197. package/dist/Plugins/code/langIcons/JinjaIcon.js +19 -10
  198. package/dist/Plugins/code/langIcons/Json5Icon.js +19 -10
  199. package/dist/Plugins/code/langIcons/JsonIcon.js +19 -10
  200. package/dist/Plugins/code/langIcons/JsonnetIcon.js +19 -10
  201. package/dist/Plugins/code/langIcons/JuliaIcon.js +19 -10
  202. package/dist/Plugins/code/langIcons/KotlinIcon.js +19 -10
  203. package/dist/Plugins/code/langIcons/KustoIcon.js +19 -10
  204. package/dist/Plugins/code/langIcons/LessIcon.js +19 -10
  205. package/dist/Plugins/code/langIcons/LiquidIcon.js +19 -10
  206. package/dist/Plugins/code/langIcons/LispIcon.js +19 -10
  207. package/dist/Plugins/code/langIcons/LuaIcon.js +19 -10
  208. package/dist/Plugins/code/langIcons/MakefileIcon.js +19 -10
  209. package/dist/Plugins/code/langIcons/MarkdownIcon.js +19 -10
  210. package/dist/Plugins/code/langIcons/MarkojsIcon.js +19 -10
  211. package/dist/Plugins/code/langIcons/MatlabIcon.js +19 -10
  212. package/dist/Plugins/code/langIcons/MdxIcon.js +19 -10
  213. package/dist/Plugins/code/langIcons/MermaidIcon.js +19 -10
  214. package/dist/Plugins/code/langIcons/MojoIcon.js +19 -10
  215. package/dist/Plugins/code/langIcons/NginxIcon.js +19 -10
  216. package/dist/Plugins/code/langIcons/NimIcon.js +19 -10
  217. package/dist/Plugins/code/langIcons/NixIcon.js +19 -10
  218. package/dist/Plugins/code/langIcons/ObjectiveCIcon.js +19 -10
  219. package/dist/Plugins/code/langIcons/ObjectiveCppIcon.js +19 -10
  220. package/dist/Plugins/code/langIcons/OcamlIcon.js +19 -10
  221. package/dist/Plugins/code/langIcons/PascalIcon.js +19 -10
  222. package/dist/Plugins/code/langIcons/Perl6Icon.js +19 -10
  223. package/dist/Plugins/code/langIcons/PerlIcon.js +19 -10
  224. package/dist/Plugins/code/langIcons/PhpIcon.js +19 -10
  225. package/dist/Plugins/code/langIcons/PostcssIcon.js +19 -10
  226. package/dist/Plugins/code/langIcons/PowershellIcon.js +19 -10
  227. package/dist/Plugins/code/langIcons/PrismaIcon.js +19 -10
  228. package/dist/Plugins/code/langIcons/PrologIcon.js +19 -10
  229. package/dist/Plugins/code/langIcons/ProtoIcon.js +19 -10
  230. package/dist/Plugins/code/langIcons/PugIcon.js +19 -10
  231. package/dist/Plugins/code/langIcons/PuppetIcon.js +19 -10
  232. package/dist/Plugins/code/langIcons/PurescriptIcon.js +19 -10
  233. package/dist/Plugins/code/langIcons/PythonIcon.js +19 -10
  234. package/dist/Plugins/code/langIcons/RIcon.js +19 -10
  235. package/dist/Plugins/code/langIcons/RazorIcon.js +19 -10
  236. package/dist/Plugins/code/langIcons/ReactIcon.js +19 -10
  237. package/dist/Plugins/code/langIcons/ReactTsIcon.js +19 -10
  238. package/dist/Plugins/code/langIcons/RubyIcon.js +19 -10
  239. package/dist/Plugins/code/langIcons/RustIcon.js +19 -10
  240. package/dist/Plugins/code/langIcons/SasIcon.js +19 -10
  241. package/dist/Plugins/code/langIcons/SassIcon.js +19 -10
  242. package/dist/Plugins/code/langIcons/ScalaIcon.js +19 -10
  243. package/dist/Plugins/code/langIcons/SchemeIcon.js +19 -10
  244. package/dist/Plugins/code/langIcons/ShaderlabIcon.js +19 -10
  245. package/dist/Plugins/code/langIcons/SolidityIcon.js +19 -10
  246. package/dist/Plugins/code/langIcons/SparqlIcon.js +19 -10
  247. package/dist/Plugins/code/langIcons/StataIcon.js +19 -10
  248. package/dist/Plugins/code/langIcons/StylusIcon.js +19 -10
  249. package/dist/Plugins/code/langIcons/SvelteIcon.js +19 -10
  250. package/dist/Plugins/code/langIcons/SwiftIcon.js +19 -10
  251. package/dist/Plugins/code/langIcons/SystemverilogIcon.js +19 -10
  252. package/dist/Plugins/code/langIcons/TclIcon.js +19 -10
  253. package/dist/Plugins/code/langIcons/TexIcon.js +19 -10
  254. package/dist/Plugins/code/langIcons/TomlIcon.js +19 -10
  255. package/dist/Plugins/code/langIcons/TwigIcon.js +19 -10
  256. package/dist/Plugins/code/langIcons/TypescriptIcon.js +19 -10
  257. package/dist/Plugins/code/langIcons/VerilogIcon.js +19 -10
  258. package/dist/Plugins/code/langIcons/VhdlIcon.js +19 -10
  259. package/dist/Plugins/code/langIcons/VimIcon.js +19 -10
  260. package/dist/Plugins/code/langIcons/VueIcon.js +19 -10
  261. package/dist/Plugins/code/langIcons/WebassemblyIcon.js +19 -10
  262. package/dist/Plugins/code/langIcons/WenyanIcon.js +19 -10
  263. package/dist/Plugins/code/langIcons/WgslIcon.js +19 -10
  264. package/dist/Plugins/code/langIcons/WolframlanguageIcon.js +19 -10
  265. package/dist/Plugins/code/langIcons/XmlIcon.js +19 -10
  266. package/dist/Plugins/code/langIcons/XslIcon.js +19 -10
  267. package/dist/Plugins/code/langIcons/YamlIcon.js +19 -10
  268. package/dist/Plugins/code/langIcons/ZigIcon.js +19 -10
  269. package/dist/Plugins/code/loadAceEditor.js +21 -23
  270. package/dist/Plugins/code/utils/langOptions.js +6 -6
  271. package/dist/Plugins/formatter/index.js +6 -6
  272. package/dist/Plugins/katex/InlineKatex.js +52 -46
  273. package/dist/Plugins/katex/Katex.js +53 -47
  274. package/dist/Plugins/katex/index.js +6 -6
  275. package/dist/Plugins/katex/loadKatex.js +27 -29
  276. package/dist/Plugins/mermaid/Mermaid.js +34 -28
  277. package/dist/Plugins/mermaid/useMermaidRender.js +103 -97
  278. package/dist/Plugins/mermaid/utils.js +25 -17
  279. package/dist/Schema/SchemaEditor/AceEditorWrapper.js +162 -150
  280. package/dist/Schema/SchemaEditor/index.js +8 -1
  281. package/dist/Schema/SchemaForm/index.js +2 -2
  282. package/dist/Schema/SchemaRenderer/index.js +45 -46
  283. package/dist/ThoughtChainList/index.js +22 -13
  284. package/dist/ToolUseBar/BarItem/Content.js +3 -3
  285. package/dist/ToolUseBar/BarItem/index.js +10 -3
  286. package/dist/ToolUseBar/index.js +19 -10
  287. package/dist/ToolUseBar/style.js +4 -4
  288. package/dist/Types/common.js +4 -1
  289. package/dist/Types/message.js +4 -1
  290. package/dist/Utils/debugUtils.js +8 -8
  291. package/dist/Utils/getScroll.js +12 -5
  292. package/dist/Utils/loadCSS.js +23 -22
  293. package/dist/Utils/proxySandbox/ProxySandbox.js +42 -34
  294. package/dist/Utils/proxySandbox/SecurityContextManager.js +54 -54
  295. package/dist/Utils/proxySandbox/index.js +25 -22
  296. package/dist/Utils/proxySandbox/types.js +11 -11
  297. package/dist/Utils/scrollTo.js +8 -1
  298. package/dist/WelcomeMessage/index.js +1 -1
  299. package/dist/Workspace/File/FileComponent.js +91 -66
  300. package/dist/Workspace/File/PreviewComponent.js +15 -8
  301. package/dist/Workspace/File/index.d.ts +1 -1
  302. package/dist/Workspace/File/style.js +7 -0
  303. package/dist/Workspace/RealtimeFollow/index.js +1 -2
  304. package/dist/Workspace/index.js +13 -11
  305. package/dist/Workspace/style.js +8 -14
  306. package/dist/Workspace/types.d.ts +50 -0
  307. package/dist/Workspace/types.js +0 -1
  308. package/package.json +25 -25
@@ -284,6 +284,10 @@
284
284
  'workspace.title': '工作空间',
285
285
  'workspace.searchPlaceholder': '搜索文件名',
286
286
  'workspace.noResultsFor': '未找到与「${keyword}」匹配的结果',
287
+ // 新增:文件预览相关
288
+ 'workspace.file.generating': '正在生成',
289
+ 'workspace.file.processing': '正在处理文件...',
290
+ 'workspace.file.processFailed': '文件处理失败',
287
291
  // 工具栏相关
288
292
  'toolbar.bold': '加粗',
289
293
  'toolbar.italic': '斜体',
@@ -654,6 +658,10 @@
654
658
  'workspace.title': 'Workspace',
655
659
  'workspace.searchPlaceholder': 'Search file name',
656
660
  'workspace.noResultsFor': 'No results for "${keyword}"',
661
+ // New: File preview related
662
+ 'workspace.file.generating': 'Generating',
663
+ 'workspace.file.processing': 'Processing file...',
664
+ 'workspace.file.processFailed': 'File processing failed',
657
665
  // Toolbar related
658
666
  'toolbar.bold': 'Bold',
659
667
  'toolbar.italic': 'Italic',
@@ -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 = _object_without_properties_loose(source, excluded);
91
- var key, i;
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
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
94
- for(i = 0; i < sourceSymbolKeys.length; i++){
95
- key = sourceSymbolKeys[i];
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;
@@ -213,10 +222,11 @@ var composeEditors = function(editor, plugins) {
213
222
  * - 支持键盘事件处理
214
223
  * - 提供Markdown解析和渲染
215
224
  */ export var BaseMarkdownEditor = function(props) {
225
+ var _props_typewriter, _props_readonly;
216
226
  var _props_floatBar, _props_floatBar1, _props_textAreaProps;
217
227
  var initValue = props.initValue, width = props.width, _props_toolBar = props.toolBar, toolBar = _props_toolBar === void 0 ? {} : _props_toolBar, editorRef = props.editorRef, _props_toc = props.toc, toc = _props_toc === void 0 ? false : _props_toc, readonly = props.readonly, lazy = props.lazy, style = props.style, _props_contentStyle = props.contentStyle, contentStyle = _props_contentStyle === void 0 ? {
218
228
  height: '100%'
219
- } : _props_contentStyle, editorStyle = props.editorStyle, height = props.height, rest = _object_without_properties(props, [
229
+ } : _props_contentStyle, editorStyle = props.editorStyle, height = props.height, children = props.children, rest = _object_without_properties(props, [
220
230
  "initValue",
221
231
  "width",
222
232
  "toolBar",
@@ -227,7 +237,8 @@ var composeEditors = function(editor, plugins) {
227
237
  "style",
228
238
  "contentStyle",
229
239
  "editorStyle",
230
- "height"
240
+ "height",
241
+ "children"
231
242
  ]);
232
243
  // 是否挂载
233
244
  var _useState = _sliced_to_array(useState(false), 2), editorMountStatus = _useState[0], setMountedStatus = _useState[1];
@@ -357,7 +368,6 @@ var composeEditors = function(editor, plugins) {
357
368
  return new Subject();
358
369
  }, []);
359
370
  var _useState6 = _sliced_to_array(useState(null), 2), domRect = _useState6[0], setDomRect = _useState6[1];
360
- var _props_typewriter, _props_readonly;
361
371
  var _obj;
362
372
  return wrapSSR(/*#__PURE__*/ React.createElement(I18nProvide, null, /*#__PURE__*/ React.createElement(PluginContext.Provider, {
363
373
  value: props.plugins || []
@@ -436,5 +446,5 @@ var composeEditors = function(editor, plugins) {
436
446
  comment: props.comment
437
447
  }) : null), readonly || (props === null || props === void 0 ? void 0 : (_props_textAreaProps = props.textAreaProps) === null || _props_textAreaProps === void 0 ? void 0 : _props_textAreaProps.enable) || (props === null || props === void 0 ? void 0 : props.reportMode) ? null : /*#__PURE__*/ React.createElement("div", {
438
448
  className: classNames("".concat(baseClassName, "-focus"))
439
- }), readonly ? /*#__PURE__*/ React.createElement(React.Fragment, null) : /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(InsertLink, null), /*#__PURE__*/ React.createElement(InsertAutocomplete, (props === null || props === void 0 ? void 0 : props.insertAutocompleteProps) || {})))))));
449
+ }), readonly ? /*#__PURE__*/ React.createElement(React.Fragment, null) : /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(InsertLink, null), /*#__PURE__*/ React.createElement(InsertAutocomplete, (props === null || props === void 0 ? void 0 : props.insertAutocompleteProps) || {})), children)))));
440
450
  };
@@ -1,4 +1,4 @@
1
- /* eslint-disable @typescript-eslint/no-use-before-define */ /* eslint-disable react/no-children-prop */ function _array_like_to_array(arr, len) {
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;
@@ -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, g, _ = {
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
- next: verb(0),
152
- "throw": verb(1),
153
- "return": verb(2)
154
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
155
- return this;
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,
@@ -232,7 +236,7 @@ function _ts_generator(thisArg, body) {
232
236
  };
233
237
  }
234
238
  }
235
- import { useDebounceFn } from "@ant-design/pro-components";
239
+ /* eslint-disable @typescript-eslint/no-use-before-define */ /* eslint-disable react/no-children-prop */ import { useDebounceFn } from "@ant-design/pro-components";
236
240
  import classNames from "classnames";
237
241
  import React, { useContext, useEffect, useMemo, useRef } from "react";
238
242
  import { ErrorBoundary } from "react-error-boundary";
@@ -409,8 +413,8 @@ var defaultAllowedTypes = [
409
413
  }, [
410
414
  props === null || props === void 0 ? void 0 : (_props_comment = props.comment) === null || _props_comment === void 0 ? void 0 : _props_comment.commentList
411
415
  ]);
412
- var handleSelectionChange = useDebounceFn(/*#__PURE__*/ function() {
413
- var _ref = _async_to_generator(function(e) {
416
+ var handleSelectionChange = useDebounceFn(function(e) {
417
+ return _async_to_generator(function() {
414
418
  var currentSelection, getSelectionContent, _markdownContainerRef_current, event, _props_onSelectionChange, _getSelectionContent, markdown, nodes, domSelection, _props_onSelectionChange1, selection, _markdownContainerRef_current1, event1, _props_onSelectionChange2, _getSelectionContent1, markdown1, nodes1, range, rect, _props_onSelectionChange3;
415
419
  return _ts_generator(this, function(_state) {
416
420
  currentSelection = markdownEditorRef.current.selection;
@@ -514,11 +518,8 @@ var defaultAllowedTypes = [
514
518
  2
515
519
  ];
516
520
  });
517
- });
518
- return function(e) {
519
- return _ref.apply(this, arguments);
520
- };
521
- }(), 16);
521
+ })();
522
+ }, 16);
522
523
  // 添加选区变化的监听
523
524
  useEffect(function() {
524
525
  var container = markdownContainerRef === null || markdownContainerRef === void 0 ? void 0 : markdownContainerRef.current;
@@ -695,8 +696,8 @@ var defaultAllowedTypes = [
695
696
  });
696
697
  /**
697
698
  * 初始化编辑器
698
- */ var initialNote = /*#__PURE__*/ function() {
699
- var _ref = _async_to_generator(function() {
699
+ */ var initialNote = function() {
700
+ return _async_to_generator(function() {
700
701
  var tableConfig, _props_initSchemaValue;
701
702
  return _ts_generator(this, function(_state) {
702
703
  if (props.instance) {
@@ -720,11 +721,8 @@ var defaultAllowedTypes = [
720
721
  2
721
722
  ];
722
723
  });
723
- });
724
- return function initialNote() {
725
- return _ref.apply(this, arguments);
726
- };
727
- }();
724
+ })();
725
+ };
728
726
  useEffect(function() {
729
727
  if (nodeRef.current !== props.instance) {
730
728
  initialNote();
@@ -737,8 +735,8 @@ var defaultAllowedTypes = [
737
735
  * 处理粘贴事件,会把粘贴的内容转换为对应的节点
738
736
  * @description paste event
739
737
  * @param {React.ClipboardEvent<HTMLDivElement>} e
740
- */ var onPaste = /*#__PURE__*/ function() {
741
- var _ref = _async_to_generator(function(event) {
738
+ */ var onPaste = function(event) {
739
+ return _async_to_generator(function() {
742
740
  return _ts_generator(this, function(_state) {
743
741
  switch(_state.label){
744
742
  case 0:
@@ -753,15 +751,12 @@ var defaultAllowedTypes = [
753
751
  ];
754
752
  }
755
753
  });
756
- });
757
- return function onPaste(event) {
758
- return _ref.apply(this, arguments);
759
- };
760
- }();
754
+ })();
755
+ };
761
756
  /**
762
757
  * 实际的粘贴处理逻辑
763
- */ var handlePasteEvent = /*#__PURE__*/ function() {
764
- var _ref = _async_to_generator(function(event) {
758
+ */ var handlePasteEvent = function(event) {
759
+ return _async_to_generator(function() {
765
760
  var _props_onPaste, _event_clipboardData, pasteConfig, currentTextSelection, nodeList, curNode, types, allowedTypes, _event_clipboardData_getData, _event_clipboardData_getData1, _event_clipboardData1, text, _event_clipboardData_getData2, _event_clipboardData_getData3, _event_clipboardData2, text1, selection, e;
766
761
  return _ts_generator(this, function(_state) {
767
762
  switch(_state.label){
@@ -915,11 +910,8 @@ var defaultAllowedTypes = [
915
910
  ];
916
911
  }
917
912
  });
918
- });
919
- return function handlePasteEvent(event) {
920
- return _ref.apply(this, arguments);
921
- };
922
- }();
913
+ })();
914
+ };
923
915
  /**
924
916
  * 处理输入法开始事件
925
917
  */ var onCompositionStart = function(e) {
@@ -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, g, _ = {
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
- next: verb(0),
42
- "throw": verb(1),
43
- "return": verb(2)
44
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
45
- return this;
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,
@@ -263,8 +267,8 @@ import { useStyle } from "./style";
263
267
  scale: 1.04
264
268
  },
265
269
  variants: itemVariants,
266
- onClick: /*#__PURE__*/ function() {
267
- var _ref = _async_to_generator(function(e) {
270
+ onClick: function(e) {
271
+ return _async_to_generator(function() {
268
272
  var _props_comment_onClick, _props_comment;
269
273
  return _ts_generator(this, function(_state) {
270
274
  switch(_state.label){
@@ -282,11 +286,8 @@ import { useStyle } from "./style";
282
286
  ];
283
287
  }
284
288
  });
285
- });
286
- return function(e) {
287
- return _ref.apply(this, arguments);
288
- };
289
- }(),
289
+ })();
290
+ },
290
291
  className: classNames("".concat(baseCls, "-item"), hashId)
291
292
  }, /*#__PURE__*/ React.createElement("div", {
292
293
  className: classNames("".concat(baseCls, "-item-header"), hashId)
@@ -306,8 +307,8 @@ import { useStyle } from "./style";
306
307
  className: classNames("".concat(baseCls, "-item-header-action"), hashId)
307
308
  }, ((_props_comment = props.comment) === null || _props_comment === void 0 ? void 0 : _props_comment.onDelete) ? /*#__PURE__*/ React.createElement(Popconfirm, {
308
309
  title: ((_props_comment1 = props.comment) === null || _props_comment1 === void 0 ? void 0 : _props_comment1.deleteConfirmText) || 'Are you sure to delete this comment?',
309
- onConfirm: /*#__PURE__*/ function() {
310
- var _ref = _async_to_generator(function(e) {
310
+ onConfirm: function(e) {
311
+ return _async_to_generator(function() {
311
312
  var _props_comment_onDelete, _props_comment, error;
312
313
  return _ts_generator(this, function(_state) {
313
314
  switch(_state.label){
@@ -350,11 +351,8 @@ import { useStyle } from "./style";
350
351
  ];
351
352
  }
352
353
  });
353
- });
354
- return function(e) {
355
- return _ref.apply(this, arguments);
356
- };
357
- }()
354
+ })();
355
+ }
358
356
  }, /*#__PURE__*/ React.createElement(Tooltip, {
359
357
  title: "删除评论"
360
358
  }, /*#__PURE__*/ React.createElement("span", {
@@ -363,8 +361,8 @@ import { useStyle } from "./style";
363
361
  title: "编辑评论"
364
362
  }, /*#__PURE__*/ React.createElement("span", {
365
363
  className: classNames("".concat(baseCls, "-item-header-action-item"), hashId),
366
- onClick: /*#__PURE__*/ function() {
367
- var _ref = _async_to_generator(function(e) {
364
+ onClick: function(e) {
365
+ return _async_to_generator(function() {
368
366
  var _props_comment_onEdit, _props_comment;
369
367
  return _ts_generator(this, function(_state) {
370
368
  switch(_state.label){
@@ -382,17 +380,14 @@ import { useStyle } from "./style";
382
380
  ];
383
381
  }
384
382
  });
385
- });
386
- return function(e) {
387
- return _ref.apply(this, arguments);
388
- };
389
- }()
383
+ })();
384
+ }
390
385
  }, /*#__PURE__*/ React.createElement(EditOutlined, null))) : null, /*#__PURE__*/ React.createElement(Tooltip, {
391
386
  title: "跳转到评论位置"
392
387
  }, /*#__PURE__*/ React.createElement("span", {
393
388
  className: classNames("".concat(baseCls, "-item-header-action-item"), hashId),
394
- onClick: /*#__PURE__*/ function() {
395
- var _ref = _async_to_generator(function(e) {
389
+ onClick: function(e) {
390
+ return _async_to_generator(function() {
396
391
  var _props_comment_onClick, _props_comment, element;
397
392
  return _ts_generator(this, function(_state) {
398
393
  switch(_state.label){
@@ -418,11 +413,8 @@ import { useStyle } from "./style";
418
413
  ];
419
414
  }
420
415
  });
421
- });
422
- return function(e) {
423
- return _ref.apply(this, arguments);
424
- };
425
- }()
416
+ })();
417
+ }
426
418
  }, /*#__PURE__*/ React.createElement(ExportOutlined, null))))), /*#__PURE__*/ React.createElement("div", {
427
419
  className: classNames("".concat(baseCls, "-item-content"), hashId)
428
420
  }, item.content));
@@ -116,12 +116,22 @@ function _object_spread_props(target, source) {
116
116
  }
117
117
  function _object_without_properties(source, excluded) {
118
118
  if (source == null) return {};
119
- var target = _object_without_properties_loose(source, excluded);
120
- var key, i;
119
+ var target = {}, sourceKeys, key, i;
120
+ if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
121
+ sourceKeys = Reflect.ownKeys(source);
122
+ for(i = 0; i < sourceKeys.length; i++){
123
+ key = sourceKeys[i];
124
+ if (excluded.indexOf(key) >= 0) continue;
125
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
126
+ target[key] = source[key];
127
+ }
128
+ return target;
129
+ }
130
+ target = _object_without_properties_loose(source, excluded);
121
131
  if (Object.getOwnPropertySymbols) {
122
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
123
- for(i = 0; i < sourceSymbolKeys.length; i++){
124
- key = sourceSymbolKeys[i];
132
+ sourceKeys = Object.getOwnPropertySymbols(source);
133
+ for(i = 0; i < sourceKeys.length; i++){
134
+ key = sourceKeys[i];
125
135
  if (excluded.indexOf(key) >= 0) continue;
126
136
  if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
127
137
  target[key] = source[key];
@@ -131,12 +141,11 @@ function _object_without_properties(source, excluded) {
131
141
  }
132
142
  function _object_without_properties_loose(source, excluded) {
133
143
  if (source == null) return {};
134
- var target = {};
135
- var sourceKeys = Object.keys(source);
136
- var key, i;
144
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
137
145
  for(i = 0; i < sourceKeys.length; i++){
138
146
  key = sourceKeys[i];
139
147
  if (excluded.indexOf(key) >= 0) continue;
148
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
140
149
  target[key] = source[key];
141
150
  }
142
151
  return target;
@@ -153,7 +162,7 @@ function _unsupported_iterable_to_array(o, minLen) {
153
162
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
154
163
  }
155
164
  function _ts_generator(thisArg, body) {
156
- var f, y, t, g, _ = {
165
+ var f, y, t, _ = {
157
166
  label: 0,
158
167
  sent: function() {
159
168
  if (t[0] & 1) throw t[1];
@@ -161,13 +170,17 @@ function _ts_generator(thisArg, body) {
161
170
  },
162
171
  trys: [],
163
172
  ops: []
164
- };
165
- return g = {
166
- next: verb(0),
167
- "throw": verb(1),
168
- "return": verb(2)
169
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
170
- return this;
173
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
174
+ return d(g, "next", {
175
+ value: verb(0)
176
+ }), d(g, "throw", {
177
+ value: verb(1)
178
+ }), d(g, "return", {
179
+ value: verb(2)
180
+ }), typeof Symbol === "function" && d(g, Symbol.iterator, {
181
+ value: function() {
182
+ return this;
183
+ }
171
184
  }), g;
172
185
  function verb(n) {
173
186
  return function(v) {
@@ -179,7 +192,7 @@ function _ts_generator(thisArg, body) {
179
192
  }
180
193
  function step(op) {
181
194
  if (f) throw new TypeError("Generator is already executing.");
182
- while(_)try {
195
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
183
196
  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;
184
197
  if (y = 0, t) op = [
185
198
  op[0] & 2,
@@ -309,8 +322,8 @@ export var ReadonlyImage = function(param) {
309
322
  * 修复图片大小的问题
310
323
  * @param props
311
324
  * @returns
312
- */ export var ResizeImage = function(_param) {
313
- var onResizeStart = _param.onResizeStart, onResizeStop = _param.onResizeStop, selected = _param.selected, defaultSize = _param.defaultSize, props = _object_without_properties(_param, [
325
+ */ export var ResizeImage = function(_0) {
326
+ var onResizeStart = _0.onResizeStart, onResizeStop = _0.onResizeStop, selected = _0.selected, defaultSize = _0.defaultSize, props = _object_without_properties(_0, [
314
327
  "onResizeStart",
315
328
  "onResizeStop",
316
329
  "selected",
@@ -471,59 +484,61 @@ export function EditorImage(param) {
471
484
  });
472
485
  });
473
486
  var locale = useContext(I18nContext).locale;
474
- var initial = useRefFunction(/*#__PURE__*/ _async_to_generator(function() {
475
- var _element_url, type, realUrl, img;
476
- return _ts_generator(this, function(_state) {
477
- debugInfo('EditorImage - 初始化图片', {
478
- url: element === null || element === void 0 ? void 0 : (_element_url = element.url) === null || _element_url === void 0 ? void 0 : _element_url.substring(0, 100),
479
- alt: element === null || element === void 0 ? void 0 : element.alt
480
- });
481
- type = getMediaType(element === null || element === void 0 ? void 0 : element.url, element.alt);
482
- type = !type ? 'image' : type;
483
- setState({
484
- type: [
485
- 'image',
486
- 'video',
487
- 'autio',
488
- 'attachment'
489
- ].includes(type) ? type : 'other'
490
- });
491
- realUrl = element === null || element === void 0 ? void 0 : element.url;
492
- setState({
493
- url: realUrl
494
- });
495
- debugInfo('EditorImage - 设置图片类型和URL', {
496
- type: state().type,
497
- url: realUrl === null || realUrl === void 0 ? void 0 : realUrl.substring(0, 100)
498
- });
499
- if (state().type === 'image' || state().type === 'other') {
500
- img = document.createElement('img');
501
- img.referrerPolicy = 'no-referrer';
502
- img.crossOrigin = 'anonymous';
503
- img.src = realUrl;
504
- img.onerror = function() {
505
- debugInfo('EditorImage - 图片加载失败');
506
- setState({
507
- loadSuccess: false
508
- });
509
- };
510
- img.onload = function() {
511
- debugInfo('EditorImage - 图片加载成功');
512
- setState({
513
- loadSuccess: true
514
- });
515
- };
516
- }
517
- if (!element.mediaType) {
518
- updateElement({
519
- mediaType: state().type
487
+ var initial = useRefFunction(function() {
488
+ return _async_to_generator(function() {
489
+ var _element_url, type, realUrl, img;
490
+ return _ts_generator(this, function(_state) {
491
+ debugInfo('EditorImage - 初始化图片', {
492
+ url: element === null || element === void 0 ? void 0 : (_element_url = element.url) === null || _element_url === void 0 ? void 0 : _element_url.substring(0, 100),
493
+ alt: element === null || element === void 0 ? void 0 : element.alt
520
494
  });
521
- }
522
- return [
523
- 2
524
- ];
525
- });
526
- }));
495
+ type = getMediaType(element === null || element === void 0 ? void 0 : element.url, element.alt);
496
+ type = !type ? 'image' : type;
497
+ setState({
498
+ type: [
499
+ 'image',
500
+ 'video',
501
+ 'autio',
502
+ 'attachment'
503
+ ].includes(type) ? type : 'other'
504
+ });
505
+ realUrl = element === null || element === void 0 ? void 0 : element.url;
506
+ setState({
507
+ url: realUrl
508
+ });
509
+ debugInfo('EditorImage - 设置图片类型和URL', {
510
+ type: state().type,
511
+ url: realUrl === null || realUrl === void 0 ? void 0 : realUrl.substring(0, 100)
512
+ });
513
+ if (state().type === 'image' || state().type === 'other') {
514
+ img = document.createElement('img');
515
+ img.referrerPolicy = 'no-referrer';
516
+ img.crossOrigin = 'anonymous';
517
+ img.src = realUrl;
518
+ img.onerror = function() {
519
+ debugInfo('EditorImage - 图片加载失败');
520
+ setState({
521
+ loadSuccess: false
522
+ });
523
+ };
524
+ img.onload = function() {
525
+ debugInfo('EditorImage - 图片加载成功');
526
+ setState({
527
+ loadSuccess: true
528
+ });
529
+ };
530
+ }
531
+ if (!element.mediaType) {
532
+ updateElement({
533
+ mediaType: state().type
534
+ });
535
+ }
536
+ return [
537
+ 2
538
+ ];
539
+ });
540
+ })();
541
+ });
527
542
  useLayoutEffect(function() {
528
543
  initial();
529
544
  }, [
@@ -102,7 +102,7 @@ function _unsupported_iterable_to_array(o, minLen) {
102
102
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
103
103
  }
104
104
  function _ts_generator(thisArg, body) {
105
- var f, y, t, g, _ = {
105
+ var f, y, t, _ = {
106
106
  label: 0,
107
107
  sent: function() {
108
108
  if (t[0] & 1) throw t[1];
@@ -110,13 +110,17 @@ function _ts_generator(thisArg, body) {
110
110
  },
111
111
  trys: [],
112
112
  ops: []
113
- };
114
- return g = {
115
- next: verb(0),
116
- "throw": verb(1),
117
- "return": verb(2)
118
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
119
- return this;
113
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
114
+ return d(g, "next", {
115
+ value: verb(0)
116
+ }), d(g, "throw", {
117
+ value: verb(1)
118
+ }), d(g, "return", {
119
+ value: verb(2)
120
+ }), typeof Symbol === "function" && d(g, Symbol.iterator, {
121
+ value: function() {
122
+ return this;
123
+ }
120
124
  }), g;
121
125
  function verb(n) {
122
126
  return function(v) {
@@ -128,7 +132,7 @@ function _ts_generator(thisArg, body) {
128
132
  }
129
133
  function step(op) {
130
134
  if (f) throw new TypeError("Generator is already executing.");
131
- while(_)try {
135
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
132
136
  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;
133
137
  if (y = 0, t) op = [
134
138
  op[0] & 2,
@@ -214,8 +218,8 @@ var MentionsUser = function(props) {
214
218
  onChange: props.onSelect
215
219
  }), 2), selectedUsers = _useMountMergeState[0], setSelectedUsers = _useMountMergeState[1];
216
220
  var _useEditorStore = useEditorStore(), editorProps = _useEditorStore.editorProps, readonly = _useEditorStore.readonly;
217
- var onSearch = /*#__PURE__*/ function() {
218
- var _ref = _async_to_generator(function(text) {
221
+ var onSearch = function(text) {
222
+ return _async_to_generator(function() {
219
223
  var _editorProps_comment_loadMentions, _editorProps_comment, list;
220
224
  return _ts_generator(this, function(_state) {
221
225
  switch(_state.label){
@@ -234,11 +238,8 @@ var MentionsUser = function(props) {
234
238
  ];
235
239
  }
236
240
  });
237
- });
238
- return function onSearch(text) {
239
- return _ref.apply(this, arguments);
240
- };
241
- }();
241
+ })();
242
+ };
242
243
  useEffect(function() {
243
244
  onSearch('');
244
245
  }, [