@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
@@ -118,7 +118,7 @@ function _unsupported_iterable_to_array(o, minLen) {
118
118
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
119
119
  }
120
120
  function _ts_generator(thisArg, body) {
121
- var f, y, t, g, _ = {
121
+ var f, y, t, _ = {
122
122
  label: 0,
123
123
  sent: function() {
124
124
  if (t[0] & 1) throw t[1];
@@ -126,13 +126,17 @@ function _ts_generator(thisArg, body) {
126
126
  },
127
127
  trys: [],
128
128
  ops: []
129
- };
130
- return g = {
131
- next: verb(0),
132
- "throw": verb(1),
133
- "return": verb(2)
134
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
135
- return this;
129
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
130
+ return d(g, "next", {
131
+ value: verb(0)
132
+ }), d(g, "throw", {
133
+ value: verb(1)
134
+ }), d(g, "return", {
135
+ value: verb(2)
136
+ }), typeof Symbol === "function" && d(g, Symbol.iterator, {
137
+ value: function() {
138
+ return this;
139
+ }
136
140
  }), g;
137
141
  function verb(n) {
138
142
  return function(v) {
@@ -144,7 +148,7 @@ function _ts_generator(thisArg, body) {
144
148
  }
145
149
  function step(op) {
146
150
  if (f) throw new TypeError("Generator is already executing.");
147
- while(_)try {
151
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
148
152
  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;
149
153
  if (y = 0, t) op = [
150
154
  op[0] & 2,
@@ -358,7 +362,6 @@ export var KeyboardTask = /*#__PURE__*/ function() {
358
362
  *
359
363
  * @returns {Promise<void>} 一个表示异步操作的 Promise 对象。
360
364
  */ function pastePlainText() {
361
- var _this = this;
362
365
  return _async_to_generator(function() {
363
366
  var text, _node_, _this_curNodes, node;
364
367
  return _ts_generator(this, function(_state) {
@@ -372,11 +375,11 @@ export var KeyboardTask = /*#__PURE__*/ function() {
372
375
  text = _state.sent();
373
376
  if (text) {
374
377
  ;
375
- _this_curNodes = _sliced_to_array(_this.curNodes, 1), node = _this_curNodes[0];
378
+ _this_curNodes = _sliced_to_array(this.curNodes, 1), node = _this_curNodes[0];
376
379
  if ((node === null || node === void 0 ? void 0 : (_node_ = node[0]) === null || _node_ === void 0 ? void 0 : _node_.type) === 'table-cell') {
377
- Editor.insertText(_this.editor, text.replace(/\n/g, ' '));
380
+ Editor.insertText(this.editor, text.replace(/\n/g, ' '));
378
381
  } else {
379
- Editor.insertText(_this.editor, text);
382
+ Editor.insertText(this.editor, text);
380
383
  }
381
384
  }
382
385
  return [
@@ -384,7 +387,7 @@ export var KeyboardTask = /*#__PURE__*/ function() {
384
387
  ];
385
388
  }
386
389
  });
387
- })();
390
+ }).call(this);
388
391
  }
389
392
  },
390
393
  {
@@ -396,19 +399,19 @@ export var KeyboardTask = /*#__PURE__*/ function() {
396
399
  * 支持列单元格、普通节点和空编辑器的不同插入逻辑。
397
400
  */ key: "uploadImage",
398
401
  value: function uploadImage() {
402
+ var _this = this;
399
403
  var input = document.createElement('input');
400
404
  var _this_curNodes = _sliced_to_array(this.curNodes, 1), node = _this_curNodes[0];
401
405
  input.id = 'uploadImage' + '_' + Math.random();
402
406
  input.type = 'file';
403
407
  input.accept = 'image/*';
404
- var _this = this;
405
- var insertMedia = /*#__PURE__*/ function() {
406
- var _ref = _async_to_generator(function(url) {
408
+ var insertMedia = function(url) {
409
+ return _async_to_generator(function() {
407
410
  return _ts_generator(this, function(_state) {
408
411
  if (node && [
409
412
  'column-cell'
410
413
  ].includes(node[0].type)) {
411
- Transforms.insertNodes(_this.editor, [
414
+ Transforms.insertNodes(this.editor, [
412
415
  EditorUtils.createMediaNode(url, 'image', {})
413
416
  ], {
414
417
  at: _to_consumable_array(node[1]).concat([
@@ -420,13 +423,13 @@ export var KeyboardTask = /*#__PURE__*/ function() {
420
423
  ];
421
424
  }
422
425
  if (node) {
423
- Transforms.insertNodes(_this.editor, [
426
+ Transforms.insertNodes(this.editor, [
424
427
  EditorUtils.createMediaNode(url, 'image', {})
425
428
  ], {
426
429
  at: Path.next(node[1])
427
430
  });
428
431
  } else {
429
- Transforms.insertNodes(_this.editor, [
432
+ Transforms.insertNodes(this.editor, [
430
433
  EditorUtils.createMediaNode(url, 'image', {})
431
434
  ], {
432
435
  select: true
@@ -436,14 +439,10 @@ export var KeyboardTask = /*#__PURE__*/ function() {
436
439
  2
437
440
  ];
438
441
  });
439
- });
440
- return function insertMedia(url) {
441
- return _ref.apply(this, arguments);
442
- };
443
- }();
444
- var _this1 = this;
445
- input.onchange = /*#__PURE__*/ function() {
446
- var _ref = _async_to_generator(function(e) {
442
+ }).call(_this);
443
+ };
444
+ input.onchange = function(e) {
445
+ return _async_to_generator(function() {
447
446
  var hideLoading, _this_props_image, _this_props, url, error;
448
447
  return _ts_generator(this, function(_state) {
449
448
  switch(_state.label){
@@ -463,7 +462,7 @@ export var KeyboardTask = /*#__PURE__*/ function() {
463
462
  4,
464
463
  5
465
464
  ]);
466
- if (!((_this_props = _this1.props) === null || _this_props === void 0 ? void 0 : (_this_props_image = _this_props.image) === null || _this_props_image === void 0 ? void 0 : _this_props_image.upload)) {
465
+ if (!((_this_props = this.props) === null || _this_props === void 0 ? void 0 : (_this_props_image = _this_props.image) === null || _this_props_image === void 0 ? void 0 : _this_props_image.upload)) {
467
466
  message.error('图片上传功能未配置');
468
467
  return [
469
468
  2
@@ -471,7 +470,7 @@ export var KeyboardTask = /*#__PURE__*/ function() {
471
470
  }
472
471
  return [
473
472
  4,
474
- _this1.props.image.upload(Array.from(e.target.files) || [])
473
+ this.props.image.upload(Array.from(e.target.files) || [])
475
474
  ];
476
475
  case 2:
477
476
  url = _state.sent() || [];
@@ -507,11 +506,8 @@ export var KeyboardTask = /*#__PURE__*/ function() {
507
506
  ];
508
507
  }
509
508
  });
510
- });
511
- return function(e) {
512
- return _ref.apply(this, arguments);
513
- };
514
- }();
509
+ }).call(_this);
510
+ };
515
511
  if (input.dataset.readonly) {
516
512
  return;
517
513
  }
@@ -62,7 +62,7 @@ function _unsupported_iterable_to_array(o, minLen) {
62
62
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
63
63
  }
64
64
  function _ts_generator(thisArg, body) {
65
- var f, y, t, g, _ = {
65
+ var f, y, t, _ = {
66
66
  label: 0,
67
67
  sent: function() {
68
68
  if (t[0] & 1) throw t[1];
@@ -70,13 +70,17 @@ function _ts_generator(thisArg, body) {
70
70
  },
71
71
  trys: [],
72
72
  ops: []
73
- };
74
- return g = {
75
- next: verb(0),
76
- "throw": verb(1),
77
- "return": verb(2)
78
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
79
- return this;
73
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
74
+ return d(g, "next", {
75
+ value: verb(0)
76
+ }), d(g, "throw", {
77
+ value: verb(1)
78
+ }), d(g, "return", {
79
+ value: verb(2)
80
+ }), typeof Symbol === "function" && d(g, Symbol.iterator, {
81
+ value: function() {
82
+ return this;
83
+ }
80
84
  }), g;
81
85
  function verb(n) {
82
86
  return function(v) {
@@ -88,7 +92,7 @@ function _ts_generator(thisArg, body) {
88
92
  }
89
93
  function step(op) {
90
94
  if (f) throw new TypeError("Generator is already executing.");
91
- while(_)try {
95
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
92
96
  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;
93
97
  if (y = 0, t) op = [
94
98
  op[0] & 2,
@@ -293,7 +297,12 @@ var remarkRehypePlugin = remarkRehype;
293
297
  }
294
298
  export var DEFAULT_MARKDOWN_REMARK_PLUGINS = [
295
299
  remarkParse,
296
- remarkGfm,
300
+ [
301
+ remarkGfm,
302
+ {
303
+ singleTilde: false
304
+ }
305
+ ],
297
306
  fixStrongWithSpecialChars,
298
307
  convertParagraphToImage,
299
308
  [
@@ -385,8 +394,8 @@ var createMarkdownProcessor = function(plugins, config) {
385
394
  * ```
386
395
  *
387
396
  * @throws {Error} 当转换过程中发生错误时返回空字符串
388
- */ export var markdownToHtml = /*#__PURE__*/ function() {
389
- var _ref = _async_to_generator(function(markdown, plugins, config) {
397
+ */ export var markdownToHtml = function(markdown, plugins, config) {
398
+ return _async_to_generator(function() {
390
399
  var htmlContent, error;
391
400
  return _ts_generator(this, function(_state) {
392
401
  switch(_state.label){
@@ -420,11 +429,8 @@ var createMarkdownProcessor = function(plugins, config) {
420
429
  ];
421
430
  }
422
431
  });
423
- });
424
- return function markdownToHtml(markdown, plugins, config) {
425
- return _ref.apply(this, arguments);
426
- };
427
- }();
432
+ })();
433
+ };
428
434
  /**
429
435
  * 将 Markdown 内容转换为 HTML(同步版本)
430
436
  *
@@ -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, g, _ = {
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
- next: verb(0),
67
- "throw": verb(1),
68
- "return": verb(2)
69
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
70
- return this;
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,
@@ -150,8 +154,8 @@ function _ts_generator(thisArg, body) {
150
154
  import { Transforms } from "slate";
151
155
  import { ReactEditor } from "slate-react";
152
156
  import { getMediaType } from "./dom";
153
- export var getRemoteMediaType = /*#__PURE__*/ function() {
154
- var _ref = _async_to_generator(function(url) {
157
+ export var getRemoteMediaType = function(url) {
158
+ return _async_to_generator(function() {
155
159
  var m, type, contentType, controller, res, e;
156
160
  return _ts_generator(this, function(_state) {
157
161
  switch(_state.label){
@@ -222,13 +226,10 @@ export var getRemoteMediaType = /*#__PURE__*/ function() {
222
226
  ];
223
227
  }
224
228
  });
225
- });
226
- return function getRemoteMediaType(url) {
227
- return _ref.apply(this, arguments);
228
- };
229
- }();
230
- export var convertRemoteImages = /*#__PURE__*/ function() {
231
- var _ref = _async_to_generator(function(node, store) {
229
+ })();
230
+ };
231
+ export var convertRemoteImages = function(node, store) {
232
+ return _async_to_generator(function() {
232
233
  var _store_editor, schema, stack, _item_children, item, _item_url, _item_url1, ext, m, _stack;
233
234
  return _ts_generator(this, function(_state) {
234
235
  schema = (store === null || store === void 0 ? void 0 : (_store_editor = store.editor) === null || _store_editor === void 0 ? void 0 : _store_editor.children) || [];
@@ -274,8 +275,5 @@ export var convertRemoteImages = /*#__PURE__*/ function() {
274
275
  2
275
276
  ];
276
277
  });
277
- });
278
- return function convertRemoteImages(node, store) {
279
- return _ref.apply(this, arguments);
280
- };
281
- }();
278
+ })();
279
+ };
@@ -88,7 +88,7 @@ function _unsupported_iterable_to_array(o, minLen) {
88
88
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
89
89
  }
90
90
  function _ts_generator(thisArg, body) {
91
- var f, y, t, g, _ = {
91
+ var f, y, t, _ = {
92
92
  label: 0,
93
93
  sent: function() {
94
94
  if (t[0] & 1) throw t[1];
@@ -96,13 +96,17 @@ function _ts_generator(thisArg, body) {
96
96
  },
97
97
  trys: [],
98
98
  ops: []
99
- };
100
- return g = {
101
- next: verb(0),
102
- "throw": verb(1),
103
- "return": verb(2)
104
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
105
- return this;
99
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
100
+ return d(g, "next", {
101
+ value: verb(0)
102
+ }), d(g, "throw", {
103
+ value: verb(1)
104
+ }), d(g, "return", {
105
+ value: verb(2)
106
+ }), typeof Symbol === "function" && d(g, Symbol.iterator, {
107
+ value: function() {
108
+ return this;
109
+ }
106
110
  }), g;
107
111
  function verb(n) {
108
112
  return function(v) {
@@ -114,7 +118,7 @@ function _ts_generator(thisArg, body) {
114
118
  }
115
119
  function step(op) {
116
120
  if (f) throw new TypeError("Generator is already executing.");
117
- while(_)try {
121
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
118
122
  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;
119
123
  if (y = 0, t) op = [
120
124
  op[0] & 2,
@@ -335,47 +339,48 @@ export var performanceMonitor = new PerformanceMonitor();
335
339
  /**
336
340
  * 性能监控装饰器
337
341
  */ export var withPerformanceMonitoring = function(operationType, fn) {
338
- return /*#__PURE__*/ _async_to_generator(function() {
339
- var _len, args, _key, operationId, result, error;
340
- var _arguments = arguments;
341
- return _ts_generator(this, function(_state) {
342
- switch(_state.label){
343
- case 0:
344
- for(_len = _arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
345
- args[_key] = _arguments[_key];
346
- }
347
- operationId = "".concat(operationType, "-").concat(Date.now(), "-").concat(Math.random().toString(36).substr(2, 9));
348
- performanceMonitor.startSubOperation(operationId, operationType);
349
- _state.label = 1;
350
- case 1:
351
- _state.trys.push([
352
- 1,
353
- 3,
354
- ,
355
- 4
356
- ]);
357
- return [
358
- 4,
359
- fn.apply(void 0, _to_consumable_array(args))
360
- ];
361
- case 2:
362
- result = _state.sent();
363
- performanceMonitor.endSubOperation(operationId, operationType);
364
- return [
365
- 2,
366
- result
367
- ];
368
- case 3:
369
- error = _state.sent();
370
- console.error("❌ ".concat(operationType, " 操作失败:"), error);
371
- throw error;
372
- case 4:
373
- return [
374
- 2
375
- ];
376
- }
377
- });
378
- });
342
+ return function() {
343
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
344
+ args[_key] = arguments[_key];
345
+ }
346
+ return _async_to_generator(function() {
347
+ var operationId, result, error;
348
+ return _ts_generator(this, function(_state) {
349
+ switch(_state.label){
350
+ case 0:
351
+ operationId = "".concat(operationType, "-").concat(Date.now(), "-").concat(Math.random().toString(36).substr(2, 9));
352
+ performanceMonitor.startSubOperation(operationId, operationType);
353
+ _state.label = 1;
354
+ case 1:
355
+ _state.trys.push([
356
+ 1,
357
+ 3,
358
+ ,
359
+ 4
360
+ ]);
361
+ return [
362
+ 4,
363
+ fn.apply(void 0, _to_consumable_array(args))
364
+ ];
365
+ case 2:
366
+ result = _state.sent();
367
+ performanceMonitor.endSubOperation(operationId, operationType);
368
+ return [
369
+ 2,
370
+ result
371
+ ];
372
+ case 3:
373
+ error = _state.sent();
374
+ console.error("❌ ".concat(operationType, " 操作失败:"), error);
375
+ throw error;
376
+ case 4:
377
+ return [
378
+ 2
379
+ ];
380
+ }
381
+ });
382
+ })();
383
+ };
379
384
  };
380
385
  /**
381
386
  * 生成操作ID
@@ -1,4 +1,4 @@
1
- /* eslint-disable @typescript-eslint/ban-types */ 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;
@@ -19,6 +19,13 @@ function _define_property(obj, key, value) {
19
19
  }
20
20
  return obj;
21
21
  }
22
+ function _instanceof(left, right) {
23
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
24
+ return !!right[Symbol.hasInstance](left);
25
+ } else {
26
+ return left instanceof right;
27
+ }
28
+ }
22
29
  function _iterable_to_array_limit(arr, i) {
23
30
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
24
31
  if (_i == null) return;
@@ -72,15 +79,15 @@ function _unsupported_iterable_to_array(o, minLen) {
72
79
  if (n === "Map" || n === "Set") return Array.from(n);
73
80
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
74
81
  }
75
- import { useCallback, useRef, useState } from "react";
82
+ /* eslint-disable @typescript-eslint/ban-types */ import { useCallback, useRef, useState } from "react";
76
83
  export var useLocalState = function(data) {
77
- var initialData = data instanceof Function ? data() : data;
84
+ var initialData = _instanceof(data, Function) ? data() : data;
78
85
  var _useState = _sliced_to_array(useState(initialData), 2), state = _useState[0], setReactState = _useState[1];
79
86
  // Use ref to ensure we always have the latest state in our setter
80
87
  var stateRef = useRef(state);
81
88
  stateRef.current = state;
82
89
  var setState = useCallback(function(update) {
83
- if (update instanceof Function) {
90
+ if (_instanceof(update, Function)) {
84
91
  setReactState(function(prevState) {
85
92
  var newState = _object_spread({}, prevState);
86
93
  update(newState);
@@ -433,6 +433,7 @@ export type MarkdownEditorProps = {
433
433
  enable?: boolean;
434
434
  render?: (props: import('slate-react').RenderElementProps, originData?: import('../Bubble/type').MessageBubbleData) => React.ReactNode;
435
435
  };
436
+ children?: React.ReactNode;
436
437
  /**
437
438
  * 其他属性
438
439
  */
@@ -1 +1,4 @@
1
- import React from "react";
1
+ /**
2
+ * MarkdownEditor 的 props
3
+ * @param props
4
+ */ export { };
@@ -65,7 +65,7 @@ import { Editor, Transforms } from "slate";
65
65
  * 插入表格
66
66
  * @param editor - Slate 编辑器实例
67
67
  * @param options - 表格选项
68
- */ insertTable: function(editor) {
68
+ */ insertTable: function insertTable(editor) {
69
69
  var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
70
70
  var _options_rows = options.rows, rows = _options_rows === void 0 ? 2 : _options_rows, _options_cols = options.cols, cols = _options_cols === void 0 ? 2 : _options_cols, at = options.at;
71
71
  // 确保行数和列数至少为1
@@ -111,7 +111,7 @@ import { Editor, Transforms } from "slate";
111
111
  * 删除表格
112
112
  * @param editor - Slate 编辑器实例
113
113
  * @param at - 位置
114
- */ removeTable: function(editor, at) {
114
+ */ removeTable: function removeTable(editor, at) {
115
115
  var tableEntry = this.findTable(editor, at);
116
116
  if (tableEntry) {
117
117
  var _tableEntry = _sliced_to_array(tableEntry, 2), path = _tableEntry[1];
@@ -124,7 +124,7 @@ import { Editor, Transforms } from "slate";
124
124
  * 查找表格节点
125
125
  * @param editor - Slate 编辑器实例
126
126
  * @param at - 位置
127
- */ findTable: function(editor, at) {
127
+ */ findTable: function findTable(editor, at) {
128
128
  return Editor.above(editor, {
129
129
  match: function(n) {
130
130
  return Editor.isBlock(editor, n) && n.type === 'table';
@@ -136,7 +136,7 @@ import { Editor, Transforms } from "slate";
136
136
  * 查找表格行节点
137
137
  * @param editor - Slate 编辑器实例
138
138
  * @param at - 位置
139
- */ findTableRow: function(editor, at) {
139
+ */ findTableRow: function findTableRow(editor, at) {
140
140
  return Editor.above(editor, {
141
141
  match: function(n) {
142
142
  return Editor.isBlock(editor, n) && n.type === 'table-row';
@@ -148,7 +148,7 @@ import { Editor, Transforms } from "slate";
148
148
  * 查找表格单元格节点
149
149
  * @param editor - Slate 编辑器实例
150
150
  * @param at - 位置
151
- */ findTableCell: function(editor, at) {
151
+ */ findTableCell: function findTableCell(editor, at) {
152
152
  return Editor.above(editor, {
153
153
  match: function(n) {
154
154
  return Editor.isBlock(editor, n) && n.type === 'table-cell';
@@ -160,28 +160,28 @@ import { Editor, Transforms } from "slate";
160
160
  * 检查是否在表格中
161
161
  * @param editor - Slate 编辑器实例
162
162
  * @param at - 位置
163
- */ isInTable: function(editor, at) {
163
+ */ isInTable: function isInTable(editor, at) {
164
164
  return !!this.findTable(editor, at);
165
165
  },
166
166
  /**
167
167
  * 检查是否在表格行中
168
168
  * @param editor - Slate 编辑器实例
169
169
  * @param at - 位置
170
- */ isInTableRow: function(editor, at) {
170
+ */ isInTableRow: function isInTableRow(editor, at) {
171
171
  return !!this.findTableRow(editor, at);
172
172
  },
173
173
  /**
174
174
  * 检查是否在表格单元格中
175
175
  * @param editor - Slate 编辑器实例
176
176
  * @param at - 位置
177
- */ isInTableCell: function(editor, at) {
177
+ */ isInTableCell: function isInTableCell(editor, at) {
178
178
  return !!this.findTableCell(editor, at);
179
179
  },
180
180
  /**
181
181
  * 插入表格行
182
182
  * @param editor - Slate 编辑器实例
183
183
  * @param options - 选项
184
- */ insertTableRow: function(editor) {
184
+ */ insertTableRow: function insertTableRow(editor) {
185
185
  var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
186
186
  var _tableNode_children__children, _tableNode_children_;
187
187
  var at = options.at, _options_position = options.position, position = _options_position === void 0 ? 'below' : _options_position;
@@ -226,7 +226,7 @@ import { Editor, Transforms } from "slate";
226
226
  * 删除表格行
227
227
  * @param editor - Slate 编辑器实例
228
228
  * @param at - 位置
229
- */ removeTableRow: function(editor, at) {
229
+ */ removeTableRow: function removeTableRow(editor, at) {
230
230
  var tableRowEntry = this.findTableRow(editor, at);
231
231
  if (!tableRowEntry) return;
232
232
  var _tableRowEntry = _sliced_to_array(tableRowEntry, 2), rowPath = _tableRowEntry[1];
@@ -247,7 +247,7 @@ import { Editor, Transforms } from "slate";
247
247
  * 插入表格列
248
248
  * @param editor - Slate 编辑器实例
249
249
  * @param options - 选项
250
- */ insertTableColumn: function(editor) {
250
+ */ insertTableColumn: function insertTableColumn(editor) {
251
251
  var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
252
252
  var at = options.at, _options_position = options.position, position = _options_position === void 0 ? 'right' : _options_position;
253
253
  var tableEntry = this.findTable(editor, at);
@@ -288,7 +288,7 @@ import { Editor, Transforms } from "slate";
288
288
  * 删除表格列
289
289
  * @param editor - Slate 编辑器实例
290
290
  * @param at - 位置
291
- */ removeTableColumn: function(editor, at) {
291
+ */ removeTableColumn: function removeTableColumn(editor, at) {
292
292
  var tableCellEntry = this.findTableCell(editor, at);
293
293
  if (!tableCellEntry) return;
294
294
  var _tableCellEntry = _sliced_to_array(tableCellEntry, 2), cellPath = _tableCellEntry[1];
@@ -318,7 +318,7 @@ import { Editor, Transforms } from "slate";
318
318
  * 移动光标到下一个单元格
319
319
  * @param editor - Slate 编辑器实例
320
320
  * @param at - 位置
321
- */ moveToNextCell: function(editor, at) {
321
+ */ moveToNextCell: function moveToNextCell(editor, at) {
322
322
  var tableCellEntry = this.findTableCell(editor, at);
323
323
  if (!tableCellEntry) return;
324
324
  var _tableCellEntry = _sliced_to_array(tableCellEntry, 2), cellPath = _tableCellEntry[1];
@@ -351,7 +351,7 @@ import { Editor, Transforms } from "slate";
351
351
  * 移动光标到上一个单元格
352
352
  * @param editor - Slate 编辑器实例
353
353
  * @param at - 位置
354
- */ moveToPreviousCell: function(editor, at) {
354
+ */ moveToPreviousCell: function moveToPreviousCell(editor, at) {
355
355
  var tableCellEntry = this.findTableCell(editor, at);
356
356
  if (!tableCellEntry) return;
357
357
  var _tableCellEntry = _sliced_to_array(tableCellEntry, 2), cellPath = _tableCellEntry[1];
@@ -66,7 +66,7 @@ import { NativeTableEditor } from "./native-table-editor";
66
66
  * @param editor - Slate 编辑器实例
67
67
  * @param event - 键盘事件
68
68
  * @returns 是否已处理该事件
69
- */ handleKeyDown: function(editor, event) {
69
+ */ handleKeyDown: function handleKeyDown(editor, event) {
70
70
  // 只在表格单元格中处理特殊按键
71
71
  if (!NativeTableEditor.isInTableCell(editor)) {
72
72
  return false;
@@ -209,7 +209,7 @@ import { NativeTableEditor } from "./native-table-editor";
209
209
  * @param editor - Slate 编辑器实例
210
210
  * @param event - 键盘事件
211
211
  * @returns 是否应该处理
212
- */ shouldHandle: function(editor) {
212
+ */ shouldHandle: function shouldHandle(editor) {
213
213
  return NativeTableEditor.isInTableCell(editor);
214
214
  }
215
215
  };