@lobehub/editor 4.15.1 → 4.15.2

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 (520) hide show
  1. package/es/_virtual/_rolldown/runtime.js +28 -0
  2. package/es/codemirror/components/CopyButton.d.ts +7 -0
  3. package/es/codemirror/components/CopyButton.js +24 -0
  4. package/es/codemirror/components/LanguageSelect.d.ts +7 -0
  5. package/es/codemirror/components/LanguageSelect.js +59 -0
  6. package/es/codemirror/components/MoreOptions.d.ts +7 -0
  7. package/es/codemirror/components/MoreOptions.js +66 -0
  8. package/es/codemirror/components/Toolbar.d.ts +7 -0
  9. package/es/codemirror/components/Toolbar.js +51 -0
  10. package/es/codemirror/components/style.js +7 -0
  11. package/es/codemirror/constants.d.ts +6 -0
  12. package/es/codemirror/constants.js +512 -0
  13. package/es/codemirror/loader.d.ts +61 -0
  14. package/es/codemirror/loader.js +77 -0
  15. package/es/codemirror/style.d.ts +4 -0
  16. package/es/codemirror/style.js +82 -0
  17. package/es/codemirror/theme.d.ts +132 -0
  18. package/es/codemirror/theme.js +75 -0
  19. package/es/codemirror/types.d.ts +53 -0
  20. package/es/codemirror.d.ts +9 -263
  21. package/es/codemirror.js +8 -1
  22. package/es/common/canUseDOM.js +11 -0
  23. package/es/common/sys.js +27 -0
  24. package/es/const/hotkey.js +100 -0
  25. package/es/editor-kernel/data-source.d.ts +15 -0
  26. package/es/editor-kernel/data-source.js +15 -0
  27. package/es/editor-kernel/event.d.ts +7 -0
  28. package/es/editor-kernel/event.js +19 -0
  29. package/es/editor-kernel/index.d.ts +5 -0
  30. package/es/editor-kernel/index.js +17 -0
  31. package/es/editor-kernel/inode/helper.js +87 -0
  32. package/es/editor-kernel/inode/i-element-node.d.ts +6 -0
  33. package/es/editor-kernel/inode/i-node.d.ts +6 -0
  34. package/es/editor-kernel/inode/index.d.ts +4 -0
  35. package/es/editor-kernel/inode/paragraph-node.d.ts +1 -0
  36. package/es/editor-kernel/inode/root-node.d.ts +9 -0
  37. package/es/editor-kernel/inode/text-node.d.ts +9 -0
  38. package/es/editor-kernel/kernel.d.ts +122 -0
  39. package/es/editor-kernel/kernel.js +661 -0
  40. package/es/editor-kernel/plugin.js +59 -0
  41. package/es/editor-kernel/react/LexicalErrorBoundary.d.ts +13 -0
  42. package/es/editor-kernel/react/LexicalErrorBoundary.js +19 -0
  43. package/es/editor-kernel/react/PortalAnchor.js +12 -0
  44. package/es/editor-kernel/react/PortalContainer.d.ts +14 -0
  45. package/es/editor-kernel/react/PortalContainer.js +25 -0
  46. package/es/editor-kernel/react/index.d.ts +5 -0
  47. package/es/editor-kernel/react/react-context.d.ts +11 -0
  48. package/es/editor-kernel/react/react-context.js +21 -0
  49. package/es/editor-kernel/react/react-editor.d.ts +16 -0
  50. package/es/editor-kernel/react/react-editor.js +32 -0
  51. package/es/editor-kernel/react/useAnchor.js +17 -0
  52. package/es/editor-kernel/react/useDecorators.js +54 -0
  53. package/es/editor-kernel/react/useEditable.js +25 -0
  54. package/es/editor-kernel/react/useLexicalEditor.d.ts +6 -0
  55. package/es/editor-kernel/react/useLexicalEditor.js +23 -0
  56. package/es/editor-kernel/react/useLexicalNodeSelection.js +86 -0
  57. package/es/editor-kernel/react/useTranslation.js +9 -0
  58. package/es/editor-kernel/utils.d.ts +46 -0
  59. package/es/editor-kernel/utils.js +138 -0
  60. package/es/headless/extract-media-from-editor-state.d.ts +22 -0
  61. package/es/headless/extract-media-from-editor-state.js +49 -0
  62. package/es/headless/index.d.ts +69 -0
  63. package/es/headless/index.js +189 -0
  64. package/es/headless/plugins/codeblock.js +82 -0
  65. package/es/headless.js +3 -20139
  66. package/es/index.d.ts +112 -3059
  67. package/es/index.js +100 -8484
  68. package/es/locale/index.d.ts +61 -0
  69. package/es/locale/index.js +62 -0
  70. package/es/node_modules/.pnpm/@types_mdast@4.0.4/node_modules/@types/mdast/index.d.ts +953 -0
  71. package/es/node_modules/.pnpm/@types_unist@3.0.3/node_modules/@types/unist/index.d.ts +83 -0
  72. package/es/plugins/auto-complete/index.d.ts +2 -0
  73. package/es/plugins/auto-complete/node/placeholderNode.js +89 -0
  74. package/es/plugins/auto-complete/plugin/index.d.ts +31 -0
  75. package/es/plugins/auto-complete/plugin/index.js +395 -0
  76. package/es/plugins/auto-complete/react/ReactAutoCompletePlugin.d.ts +7 -0
  77. package/es/plugins/auto-complete/react/ReactAutoCompletePlugin.js +60 -0
  78. package/es/plugins/auto-complete/react/index.d.ts +1 -0
  79. package/es/plugins/auto-complete/react/style.js +12 -0
  80. package/es/plugins/auto-complete/react/type.d.ts +25 -0
  81. package/es/plugins/block/command/index.d.ts +13 -0
  82. package/es/plugins/block/command/index.js +161 -0
  83. package/es/plugins/block/index.d.ts +5 -0
  84. package/es/plugins/block/plugin/index.d.ts +9 -0
  85. package/es/plugins/block/plugin/index.js +86 -0
  86. package/es/plugins/block/react/ReactBlockPlugin.d.ts +18 -0
  87. package/es/plugins/block/react/ReactBlockPlugin.js +457 -0
  88. package/es/plugins/block/react/core/runtime-context.js +19 -0
  89. package/es/plugins/block/react/core/types.d.ts +6 -0
  90. package/es/plugins/block/react/drag/drag-session.js +264 -0
  91. package/es/plugins/block/react/drag/drag-utils.js +95 -0
  92. package/es/plugins/block/react/index.d.ts +2 -0
  93. package/es/plugins/block/react/style.js +66 -0
  94. package/es/plugins/block/service/i-block-menu-service.d.ts +44 -0
  95. package/es/plugins/block/service/i-block-menu-service.js +43 -0
  96. package/es/plugins/block/service/index.d.ts +1 -0
  97. package/es/plugins/code/command/index.d.ts +7 -0
  98. package/es/plugins/code/command/index.js +30 -0
  99. package/es/plugins/code/index.d.ts +3 -0
  100. package/es/plugins/code/node/code.js +91 -0
  101. package/es/plugins/code/plugin/index.d.ts +9 -0
  102. package/es/plugins/code/plugin/index.js +74 -0
  103. package/es/plugins/code/plugin/registry.js +33 -0
  104. package/es/plugins/code/react/CodeReactPlugin.d.ts +7 -0
  105. package/es/plugins/code/react/CodeReactPlugin.js +27 -0
  106. package/es/plugins/code/react/index.d.ts +1 -0
  107. package/es/plugins/code/react/style.js +21 -0
  108. package/es/plugins/code/react/type.d.ts +7 -0
  109. package/es/plugins/codeblock/command/index.d.ts +8 -0
  110. package/es/plugins/codeblock/command/index.js +40 -0
  111. package/es/plugins/codeblock/index.d.ts +6 -0
  112. package/es/plugins/codeblock/index.js +5 -0
  113. package/es/plugins/codeblock/plugin/CodeHighlighterShiki.js +415 -0
  114. package/es/plugins/codeblock/plugin/FacadeShiki.js +193 -0
  115. package/es/plugins/codeblock/plugin/index.d.ts +16 -0
  116. package/es/plugins/codeblock/plugin/index.js +157 -0
  117. package/es/plugins/codeblock/plugin/invariant.js +14 -0
  118. package/es/plugins/codeblock/react/ReactCodeblockPlugin.d.ts +7 -0
  119. package/es/plugins/codeblock/react/ReactCodeblockPlugin.js +27 -0
  120. package/es/plugins/codeblock/react/index.d.ts +2 -0
  121. package/es/plugins/codeblock/react/style.js +58 -0
  122. package/es/plugins/codeblock/react/type.d.ts +8 -0
  123. package/es/plugins/codeblock/utils/language.js +9 -0
  124. package/es/plugins/codemirror-block/command/index.d.ts +13 -0
  125. package/es/plugins/codemirror-block/command/index.js +67 -0
  126. package/es/plugins/codemirror-block/index.d.ts +3 -0
  127. package/es/plugins/codemirror-block/lib/mode.js +8 -0
  128. package/es/plugins/codemirror-block/node/CodeMirrorNode.d.ts +48 -0
  129. package/es/plugins/codemirror-block/node/CodeMirrorNode.js +205 -0
  130. package/es/plugins/codemirror-block/plugin/index.d.ts +12 -0
  131. package/es/plugins/codemirror-block/plugin/index.js +80 -0
  132. package/es/plugins/codemirror-block/react/CodemirrorNode.js +219 -0
  133. package/es/plugins/codemirror-block/react/ReactCodemirrorNode.d.ts +7 -0
  134. package/es/plugins/codemirror-block/react/ReactCodemirrorNode.js +26 -0
  135. package/es/plugins/codemirror-block/react/index.d.ts +1 -0
  136. package/es/plugins/codemirror-block/react/type.d.ts +6 -0
  137. package/es/plugins/common/command/index.d.ts +11 -0
  138. package/es/plugins/common/command/index.js +24 -0
  139. package/es/plugins/common/data-source/json-data-source.js +133 -0
  140. package/es/plugins/common/data-source/text-data-source.js +32 -0
  141. package/es/plugins/common/index.d.ts +6 -0
  142. package/es/plugins/common/node/ElementDOMSlot.js +30 -0
  143. package/es/plugins/common/node/cursor.d.ts +16 -0
  144. package/es/plugins/common/node/cursor.js +189 -0
  145. package/es/plugins/common/plugin/index.d.ts +43 -0
  146. package/es/plugins/common/plugin/index.js +338 -0
  147. package/es/plugins/common/plugin/mdReader.js +62 -0
  148. package/es/plugins/common/plugin/paste-handler.d.ts +11 -0
  149. package/es/plugins/common/plugin/paste-handler.js +61 -0
  150. package/es/plugins/common/plugin/register.js +306 -0
  151. package/es/plugins/common/react/Placeholder/index.js +65 -0
  152. package/es/plugins/common/react/Placeholder/style.js +22 -0
  153. package/es/plugins/common/react/ReactEditorContent.d.ts +7 -0
  154. package/es/plugins/common/react/ReactEditorContent.js +8 -0
  155. package/es/plugins/common/react/ReactPlainText.d.ts +7 -0
  156. package/es/plugins/common/react/ReactPlainText.js +192 -0
  157. package/es/plugins/common/react/index.d.ts +3 -0
  158. package/es/plugins/common/react/style.js +206 -0
  159. package/es/plugins/common/react/type.d.ts +94 -0
  160. package/es/plugins/common/utils/index.js +135 -0
  161. package/es/plugins/content-blocks/data-source/content-blocks-data-source.d.ts +15 -0
  162. package/es/plugins/content-blocks/data-source/content-blocks-data-source.js +21 -0
  163. package/es/plugins/content-blocks/index.d.ts +6 -0
  164. package/es/plugins/content-blocks/plugin/index.d.ts +10 -0
  165. package/es/plugins/content-blocks/plugin/index.js +24 -0
  166. package/es/plugins/content-blocks/types.d.ts +33 -0
  167. package/es/plugins/content-blocks/types.js +4 -0
  168. package/es/plugins/content-blocks/utils/extract-media-lists.d.ts +7 -0
  169. package/es/plugins/content-blocks/utils/extract-media-lists.js +32 -0
  170. package/es/plugins/content-blocks/utils/extract.d.ts +8 -0
  171. package/es/plugins/content-blocks/utils/extract.js +188 -0
  172. package/es/plugins/file/command/index.d.ts +9 -0
  173. package/es/plugins/file/command/index.js +31 -0
  174. package/es/plugins/file/index.d.ts +4 -0
  175. package/es/plugins/file/node/FileNode.d.ts +38 -0
  176. package/es/plugins/file/node/FileNode.js +106 -0
  177. package/es/plugins/file/plugin/index.d.ts +18 -0
  178. package/es/plugins/file/plugin/index.js +103 -0
  179. package/es/plugins/file/react/ReactFilePlugin.d.ts +7 -0
  180. package/es/plugins/file/react/ReactFilePlugin.js +35 -0
  181. package/es/plugins/file/react/components/ReactFile.js +50 -0
  182. package/es/plugins/file/react/index.d.ts +2 -0
  183. package/es/plugins/file/react/style.js +32 -0
  184. package/es/plugins/file/react/type.d.ts +17 -0
  185. package/es/plugins/file/utils/index.js +29 -0
  186. package/es/plugins/hr/command/index.d.ts +7 -0
  187. package/es/plugins/hr/command/index.js +14 -0
  188. package/es/plugins/hr/index.d.ts +4 -0
  189. package/es/plugins/hr/node/HorizontalRuleNode.d.ts +18 -0
  190. package/es/plugins/hr/node/HorizontalRuleNode.js +59 -0
  191. package/es/plugins/hr/plugin/index.d.ts +12 -0
  192. package/es/plugins/hr/plugin/index.js +60 -0
  193. package/es/plugins/hr/react/ReactHRPlugin.d.ts +7 -0
  194. package/es/plugins/hr/react/ReactHRPlugin.js +28 -0
  195. package/es/plugins/hr/react/components/HRNode.js +36 -0
  196. package/es/plugins/hr/react/index.d.ts +2 -0
  197. package/es/plugins/hr/react/style.js +32 -0
  198. package/es/plugins/hr/react/type.d.ts +6 -0
  199. package/es/plugins/image/command/index.d.ts +12 -0
  200. package/es/plugins/image/command/index.js +53 -0
  201. package/es/plugins/image/index.d.ts +4 -0
  202. package/es/plugins/image/node/basie-image-node.d.ts +33 -0
  203. package/es/plugins/image/node/basie-image-node.js +68 -0
  204. package/es/plugins/image/node/block-image-node.d.ts +43 -0
  205. package/es/plugins/image/node/block-image-node.js +137 -0
  206. package/es/plugins/image/node/image-node.d.ts +41 -0
  207. package/es/plugins/image/node/image-node.js +128 -0
  208. package/es/plugins/image/plugin/index.d.ts +24 -0
  209. package/es/plugins/image/plugin/index.js +183 -0
  210. package/es/plugins/image/react/ReactImagePlugin.d.ts +7 -0
  211. package/es/plugins/image/react/ReactImagePlugin.js +41 -0
  212. package/es/plugins/image/react/components/BrokenImage.js +16 -0
  213. package/es/plugins/image/react/components/Image.js +190 -0
  214. package/es/plugins/image/react/components/ImageEditPopover.js +160 -0
  215. package/es/plugins/image/react/components/LazyImage.js +73 -0
  216. package/es/plugins/image/react/components/ResizeHandle.js +62 -0
  217. package/es/plugins/image/react/components/style.js +135 -0
  218. package/es/plugins/image/react/components/useSupenseImage.js +22 -0
  219. package/es/plugins/image/react/index.d.ts +2 -0
  220. package/es/plugins/image/react/style.js +31 -0
  221. package/es/plugins/image/react/type.d.ts +23 -0
  222. package/es/plugins/inode/index.d.ts +3 -0
  223. package/es/plugins/inode/plugin/index.d.ts +19 -0
  224. package/es/plugins/inode/plugin/index.js +23 -0
  225. package/es/plugins/inode/react/index.d.ts +6 -0
  226. package/es/plugins/inode/react/index.js +15 -0
  227. package/es/plugins/inode/service/index.d.ts +17 -0
  228. package/es/plugins/inode/service/index.js +22 -0
  229. package/es/plugins/link/command/index.d.ts +10 -0
  230. package/es/plugins/link/command/index.js +33 -0
  231. package/es/plugins/link/index.d.ts +5 -0
  232. package/es/plugins/link/node/LinkNode.d.ts +10 -0
  233. package/es/plugins/link/node/LinkNode.js +448 -0
  234. package/es/plugins/link/plugin/index.d.ts +16 -0
  235. package/es/plugins/link/plugin/index.js +106 -0
  236. package/es/plugins/link/plugin/registry.js +82 -0
  237. package/es/plugins/link/react/ReactLinkPlugin.d.ts +7 -0
  238. package/es/plugins/link/react/ReactLinkPlugin.js +50 -0
  239. package/es/plugins/link/react/components/LinkEdit.js +204 -0
  240. package/es/plugins/link/react/components/LinkToolbar.js +148 -0
  241. package/es/plugins/link/react/index.d.ts +2 -0
  242. package/es/plugins/link/react/style.js +34 -0
  243. package/es/plugins/link/react/type.d.ts +14 -0
  244. package/es/plugins/link/service/i-link-service.d.ts +10 -0
  245. package/es/plugins/link/service/i-link-service.js +19 -0
  246. package/es/plugins/link/utils/index.js +45 -0
  247. package/es/plugins/link-highlight/command/index.d.ts +8 -0
  248. package/es/plugins/link-highlight/command/index.js +30 -0
  249. package/es/plugins/link-highlight/index.d.ts +3 -0
  250. package/es/plugins/link-highlight/node/link-highlight.js +80 -0
  251. package/es/plugins/link-highlight/plugin/index.d.ts +18 -0
  252. package/es/plugins/link-highlight/plugin/index.js +109 -0
  253. package/es/plugins/link-highlight/plugin/registry.js +33 -0
  254. package/es/plugins/link-highlight/react/ReactLinkHighlightPlugin.d.ts +7 -0
  255. package/es/plugins/link-highlight/react/ReactLinkHighlightPlugin.js +29 -0
  256. package/es/plugins/link-highlight/react/index.d.ts +1 -0
  257. package/es/plugins/link-highlight/react/style.js +14 -0
  258. package/es/plugins/link-highlight/react/type.d.ts +16 -0
  259. package/es/plugins/list/command/index.d.ts +3 -0
  260. package/es/plugins/list/command/index.js +3 -0
  261. package/es/plugins/list/index.d.ts +5 -0
  262. package/es/plugins/list/plugin/checkList.d.ts +6 -0
  263. package/es/plugins/list/plugin/checkList.js +140 -0
  264. package/es/plugins/list/plugin/index.d.ts +9 -0
  265. package/es/plugins/list/plugin/index.js +195 -0
  266. package/es/plugins/list/plugin/registry.js +68 -0
  267. package/es/plugins/list/react/ReactListPlugin.d.ts +7 -0
  268. package/es/plugins/list/react/ReactListPlugin.js +21 -0
  269. package/es/plugins/list/react/index.d.ts +2 -0
  270. package/es/plugins/list/react/style.js +123 -0
  271. package/es/plugins/list/react/type.d.ts +7 -0
  272. package/es/plugins/list/utils/index.js +58 -0
  273. package/es/plugins/litexml/command/diffCommand.d.ts +17 -0
  274. package/es/plugins/litexml/command/diffCommand.js +97 -0
  275. package/es/plugins/litexml/command/index.d.ts +38 -0
  276. package/es/plugins/litexml/command/index.js +333 -0
  277. package/es/plugins/litexml/data-source/litexml-data-source.d.ts +65 -0
  278. package/es/plugins/litexml/data-source/litexml-data-source.js +286 -0
  279. package/es/plugins/litexml/index.d.ts +7 -0
  280. package/es/plugins/litexml/node/DiffNode.d.ts +29 -0
  281. package/es/plugins/litexml/node/DiffNode.js +95 -0
  282. package/es/plugins/litexml/plugin/index.d.ts +24 -0
  283. package/es/plugins/litexml/plugin/index.js +100 -0
  284. package/es/plugins/litexml/react/DiffNodeToolbar/index.js +60 -0
  285. package/es/plugins/litexml/react/DiffNodeToolbar/style.js +24 -0
  286. package/es/plugins/litexml/react/hooks/useHasDiffNode.d.ts +7 -0
  287. package/es/plugins/litexml/react/hooks/useHasDiffNode.js +35 -0
  288. package/es/plugins/litexml/react/index.d.ts +6 -0
  289. package/es/plugins/litexml/react/index.js +26 -0
  290. package/es/plugins/litexml/react/style.js +124 -0
  291. package/es/plugins/litexml/service/litexml-service.d.ts +93 -0
  292. package/es/plugins/litexml/service/litexml-service.js +42 -0
  293. package/es/plugins/litexml/utils/index.js +59 -0
  294. package/es/plugins/markdown/command/index.d.ts +14 -0
  295. package/es/plugins/markdown/command/index.js +74 -0
  296. package/es/plugins/markdown/data-source/markdown/parse.d.ts +14 -0
  297. package/es/plugins/markdown/data-source/markdown/parse.js +195 -0
  298. package/es/plugins/markdown/data-source/markdown-data-source.js +148 -0
  299. package/es/plugins/markdown/data-source/markdown-writer-context.js +40 -0
  300. package/es/plugins/markdown/index.d.ts +7 -0
  301. package/es/plugins/markdown/plugin/index.d.ts +22 -0
  302. package/es/plugins/markdown/plugin/index.js +285 -0
  303. package/es/plugins/markdown/react/index.d.ts +6 -0
  304. package/es/plugins/markdown/react/index.js +31 -0
  305. package/es/plugins/markdown/service/shortcut.d.ts +57 -0
  306. package/es/plugins/markdown/service/shortcut.js +101 -0
  307. package/es/plugins/markdown/service/transformers.d.ts +61 -0
  308. package/es/plugins/markdown/service/transformers.js +119 -0
  309. package/es/plugins/markdown/utils/detectLanguage.d.ts +22 -0
  310. package/es/plugins/markdown/utils/detectLanguage.js +251 -0
  311. package/es/plugins/markdown/utils/index.d.ts +11 -0
  312. package/es/plugins/markdown/utils/index.js +143 -0
  313. package/es/plugins/markdown/utils/logger.js +6 -0
  314. package/es/plugins/math/command/index.d.ts +9 -0
  315. package/es/plugins/math/command/index.js +38 -0
  316. package/es/plugins/math/index.d.ts +3 -0
  317. package/es/plugins/math/node/index.d.ts +44 -0
  318. package/es/plugins/math/node/index.js +161 -0
  319. package/es/plugins/math/plugin/index.d.ts +15 -0
  320. package/es/plugins/math/plugin/index.js +119 -0
  321. package/es/plugins/math/react/components/MathEditor.js +198 -0
  322. package/es/plugins/math/react/components/MathEditorContainer.js +101 -0
  323. package/es/plugins/math/react/components/MathEditorContent.js +133 -0
  324. package/es/plugins/math/react/components/MathInline.js +86 -0
  325. package/es/plugins/math/react/components/Placeholder.js +24 -0
  326. package/es/plugins/math/react/index.d.ts +7 -0
  327. package/es/plugins/math/react/index.js +35 -0
  328. package/es/plugins/math/react/style.js +96 -0
  329. package/es/plugins/math/react/type.d.ts +17 -0
  330. package/es/plugins/math/utils/index.js +23 -0
  331. package/es/plugins/mention/command/index.d.ts +10 -0
  332. package/es/plugins/mention/command/index.js +18 -0
  333. package/es/plugins/mention/index.d.ts +5 -0
  334. package/es/plugins/mention/node/MentionNode.d.ts +28 -0
  335. package/es/plugins/mention/node/MentionNode.js +86 -0
  336. package/es/plugins/mention/plugin/index.d.ts +18 -0
  337. package/es/plugins/mention/plugin/index.js +63 -0
  338. package/es/plugins/mention/plugin/register.js +30 -0
  339. package/es/plugins/mention/react/ReactMentionPlugin.d.ts +7 -0
  340. package/es/plugins/mention/react/ReactMentionPlugin.js +36 -0
  341. package/es/plugins/mention/react/components/Mention.js +33 -0
  342. package/es/plugins/mention/react/index.d.ts +2 -0
  343. package/es/plugins/mention/react/style.js +34 -0
  344. package/es/plugins/mention/react/type.d.ts +12 -0
  345. package/es/plugins/slash/index.d.ts +6 -0
  346. package/es/plugins/slash/plugin/index.d.ts +27 -0
  347. package/es/plugins/slash/plugin/index.js +160 -0
  348. package/es/plugins/slash/react/ReactSlashOption.d.ts +7 -0
  349. package/es/plugins/slash/react/ReactSlashOption.js +8 -0
  350. package/es/plugins/slash/react/ReactSlashPlugin.d.ts +7 -0
  351. package/es/plugins/slash/react/ReactSlashPlugin.js +190 -0
  352. package/es/plugins/slash/react/components/DefaultSlashMenu.js +168 -0
  353. package/es/plugins/slash/react/components/SlashMenu.d.ts +11 -0
  354. package/es/plugins/slash/react/components/SlashMenu.js +40 -0
  355. package/es/plugins/slash/react/index.d.ts +4 -0
  356. package/es/plugins/slash/react/type.d.ts +114 -0
  357. package/es/plugins/slash/react/utils.js +18 -0
  358. package/es/plugins/slash/service/i-slash-service.d.ts +50 -0
  359. package/es/plugins/slash/service/i-slash-service.js +55 -0
  360. package/es/plugins/slash/utils/utils.d.ts +1 -0
  361. package/es/plugins/slash/utils/utils.js +97 -0
  362. package/es/plugins/table/command/index.d.ts +17 -0
  363. package/es/plugins/table/command/index.js +57 -0
  364. package/es/plugins/table/index.d.ts +3 -0
  365. package/es/plugins/table/node/index.js +18 -0
  366. package/es/plugins/table/plugin/index.d.ts +8 -0
  367. package/es/plugins/table/plugin/index.js +172 -0
  368. package/es/plugins/table/react/TableActionMenu/ActionMenu.js +220 -0
  369. package/es/plugins/table/react/TableActionMenu/index.js +128 -0
  370. package/es/plugins/table/react/TableActionMenu/style.js +20 -0
  371. package/es/plugins/table/react/TableActionMenu/utils.js +34 -0
  372. package/es/plugins/table/react/TableHoverActions/index.js +147 -0
  373. package/es/plugins/table/react/TableHoverActions/style.js +14 -0
  374. package/es/plugins/table/react/TableHoverActions/utils.js +32 -0
  375. package/es/plugins/table/react/TableResize/index.js +253 -0
  376. package/es/plugins/table/react/TableResize/style.js +16 -0
  377. package/es/plugins/table/react/TableResize/utils.js +9 -0
  378. package/es/plugins/table/react/index.d.ts +7 -0
  379. package/es/plugins/table/react/index.js +49 -0
  380. package/es/plugins/table/react/style.js +63 -0
  381. package/es/plugins/table/react/type.d.ts +8 -0
  382. package/es/plugins/table/utils/index.js +48 -0
  383. package/es/plugins/toolbar/command/index.d.ts +12 -0
  384. package/es/plugins/toolbar/command/index.js +17 -0
  385. package/es/plugins/toolbar/index.d.ts +2 -0
  386. package/es/plugins/toolbar/react/index.d.ts +7 -0
  387. package/es/plugins/toolbar/react/index.js +109 -0
  388. package/es/plugins/toolbar/react/style.js +55 -0
  389. package/es/plugins/toolbar/react/type.d.ts +9 -0
  390. package/es/plugins/toolbar/utils/getDOMRangeRect.js +20 -0
  391. package/es/plugins/toolbar/utils/setFloatingElemPosition.js +50 -0
  392. package/es/plugins/upload/index.d.ts +2 -0
  393. package/es/plugins/upload/plugin/index.d.ts +6 -0
  394. package/es/plugins/upload/plugin/index.js +47 -0
  395. package/es/plugins/upload/service/i-upload-service.d.ts +13 -0
  396. package/es/plugins/upload/service/i-upload-service.js +30 -0
  397. package/es/plugins/upload/utils/index.js +15 -0
  398. package/es/plugins/virtual-block/index.d.ts +2 -0
  399. package/es/plugins/virtual-block/plugin/index.d.ts +8 -0
  400. package/es/plugins/virtual-block/plugin/index.js +19 -0
  401. package/es/plugins/virtual-block/plugin/register.js +150 -0
  402. package/es/plugins/virtual-block/react/ReactVirtualBlock.d.ts +6 -0
  403. package/es/plugins/virtual-block/react/ReactVirtualBlock.js +15 -0
  404. package/es/plugins/virtual-block/react/index.d.ts +1 -0
  405. package/es/react/ChatInput/ChatInput.d.ts +7 -0
  406. package/es/react/ChatInput/ChatInput.js +91 -0
  407. package/es/react/ChatInput/index.d.ts +2 -0
  408. package/es/react/ChatInput/style.js +115 -0
  409. package/es/react/ChatInput/type.d.ts +32 -0
  410. package/es/react/ChatInputActionBar/ChatInputActionBar.d.ts +7 -0
  411. package/es/react/ChatInputActionBar/ChatInputActionBar.js +22 -0
  412. package/es/react/ChatInputActionBar/index.d.ts +2 -0
  413. package/es/react/ChatInputActionBar/style.js +7 -0
  414. package/es/react/ChatInputActionBar/type.d.ts +10 -0
  415. package/es/react/ChatInputActions/ChatInputActions.d.ts +7 -0
  416. package/es/react/ChatInputActions/ChatInputActions.js +65 -0
  417. package/es/react/ChatInputActions/components/ActionItem.js +46 -0
  418. package/es/react/ChatInputActions/components/ActionRender.js +45 -0
  419. package/es/react/ChatInputActions/components/CollapsedActions.js +60 -0
  420. package/es/react/ChatInputActions/components/useDisplayActionCount.js +45 -0
  421. package/es/react/ChatInputActions/index.d.ts +2 -0
  422. package/es/react/ChatInputActions/style.js +20 -0
  423. package/es/react/ChatInputActions/type.d.ts +36 -0
  424. package/es/react/CodeLanguageSelect/CodeLanguageSelect.d.ts +7 -0
  425. package/es/react/CodeLanguageSelect/CodeLanguageSelect.js +67 -0
  426. package/es/react/CodeLanguageSelect/index.d.ts +2 -0
  427. package/es/react/CodeLanguageSelect/style.js +7 -0
  428. package/es/react/CodeLanguageSelect/type.d.ts +6 -0
  429. package/es/react/Editor/Editor.js +108 -0
  430. package/es/react/Editor/index.d.ts +16 -0
  431. package/es/react/Editor/index.js +11 -0
  432. package/es/react/Editor/type.d.ts +64 -0
  433. package/es/react/Editor/utils.d.ts +6 -0
  434. package/es/react/Editor/utils.js +6 -0
  435. package/es/react/EditorProvider/index.d.ts +28 -0
  436. package/es/react/EditorProvider/index.js +18 -0
  437. package/es/react/FloatActions/FloatActions.d.ts +7 -0
  438. package/es/react/FloatActions/FloatActions.js +34 -0
  439. package/es/react/FloatActions/components/ActionItem.js +46 -0
  440. package/es/react/FloatActions/components/ActionRender.js +45 -0
  441. package/es/react/FloatActions/components/CollapsedActions.js +60 -0
  442. package/es/react/FloatActions/index.d.ts +2 -0
  443. package/es/react/FloatActions/style.js +19 -0
  444. package/es/react/FloatActions/type.d.ts +33 -0
  445. package/es/react/FloatMenu/FloatMenu.d.ts +7 -0
  446. package/es/react/FloatMenu/FloatMenu.js +32 -0
  447. package/es/react/FloatMenu/index.d.ts +2 -0
  448. package/es/react/FloatMenu/style.js +28 -0
  449. package/es/react/FloatMenu/type.d.ts +25 -0
  450. package/es/react/SendButton/SendButton.d.ts +7 -0
  451. package/es/react/SendButton/SendButton.js +107 -0
  452. package/es/react/SendButton/components/SendIcon.js +23 -0
  453. package/es/react/SendButton/components/StopIcon.js +56 -0
  454. package/es/react/SendButton/index.d.ts +2 -0
  455. package/es/react/SendButton/style.js +68 -0
  456. package/es/react/SendButton/type.d.ts +12 -0
  457. package/es/react/SlashMenu/SlashMenu.d.ts +7 -0
  458. package/es/react/SlashMenu/SlashMenu.js +40 -0
  459. package/es/react/SlashMenu/index.d.ts +2 -0
  460. package/es/react/SlashMenu/type.d.ts +17 -0
  461. package/es/react/hooks/useEditor.d.ts +5 -0
  462. package/es/react/hooks/useEditor.js +8 -0
  463. package/es/react/hooks/useEditorState/index.d.ts +71 -0
  464. package/es/react/hooks/useEditorState/index.js +347 -0
  465. package/es/react/hooks/useEditorState/utils.js +28 -0
  466. package/es/react/hooks/useSize.js +61 -0
  467. package/es/react.d.ts +22 -334
  468. package/es/react.js +13 -1573
  469. package/es/renderer/LexicalDiff.d.ts +41 -0
  470. package/es/renderer/LexicalDiff.js +96 -0
  471. package/es/renderer/LexicalRenderer.d.ts +16 -0
  472. package/es/renderer/LexicalRenderer.js +48 -0
  473. package/es/renderer/diff/compute.js +396 -0
  474. package/es/renderer/diff/style.d.ts +4 -0
  475. package/es/renderer/diff/style.js +104 -0
  476. package/es/renderer/diff/types.d.ts +32 -0
  477. package/es/renderer/engine/render-builtin-node.js +196 -0
  478. package/es/renderer/engine/render-text-node.js +33 -0
  479. package/es/renderer/engine/render-tree.js +35 -0
  480. package/es/renderer/engine/shiki.d.ts +4 -0
  481. package/es/renderer/engine/shiki.js +24 -0
  482. package/es/renderer/engine/utils.js +16 -0
  483. package/es/renderer/nodes/index.d.ts +6 -0
  484. package/es/renderer/nodes/index.js +44 -0
  485. package/es/renderer/renderers/codeblock.js +21 -0
  486. package/es/renderer/renderers/file.js +29 -0
  487. package/es/renderer/renderers/horizontalrule.js +29 -0
  488. package/es/renderer/renderers/image.js +35 -0
  489. package/es/renderer/renderers/index.d.ts +6 -0
  490. package/es/renderer/renderers/index.js +21 -0
  491. package/es/renderer/renderers/math.js +19 -0
  492. package/es/renderer/renderers/mention.js +15 -0
  493. package/es/renderer/renderers/mermaid.js +17 -0
  494. package/es/renderer/style.js +52 -0
  495. package/es/renderer/types.d.ts +29 -0
  496. package/es/renderer.d.ts +8 -114
  497. package/es/renderer.js +5 -1153
  498. package/es/types/hotkey.d.ts +76 -0
  499. package/es/types/hotkey.js +65 -0
  500. package/es/types/index.d.ts +2 -0
  501. package/es/types/kernel.d.ts +359 -0
  502. package/es/types/locale.d.ts +11 -0
  503. package/es/utils/cx.js +4 -0
  504. package/es/utils/debug.d.ts +425 -0
  505. package/es/{debug-CIvbNHJu.js → utils/debug.js} +3 -35
  506. package/es/utils/hotkey/isHotkeyMatch.js +17 -0
  507. package/es/utils/hotkey/parseHotkeys.js +53 -0
  508. package/es/utils/hotkey/registerHotkey.d.ts +18 -0
  509. package/es/utils/hotkey/registerHotkey.js +35 -0
  510. package/es/utils/scrollIntoView.d.ts +8 -0
  511. package/es/utils/scrollIntoView.js +29 -0
  512. package/es/utils/updatePosition.js +26 -0
  513. package/es/utils/url.d.ts +18 -0
  514. package/es/utils/url.js +34 -0
  515. package/package.json +4 -1
  516. package/es/ReactSlashPlugin-BiVy_Iwf.js +0 -23072
  517. package/es/codemirror-3POv7f__.js +0 -923
  518. package/es/index-DHGp94p0.d.ts +0 -916
  519. package/es/style-DADgHVA1.js +0 -2889
  520. package/es/style-DMdPzCo-.js +0 -999
package/es/index.d.ts CHANGED
@@ -1,3062 +1,115 @@
1
- import { $ as ModifierCombination, A as INSERT_HEADING_COMMAND, B as ISelectionObject, C as CommonPlugin, D as $isCursorNode, E as $isCardLikeElementNode, F as IEditor, G as HotkeysEvent, H as ILocaleKeys, I as IEditorKernel, J as HotkeyId, K as getHotkeyById, L as IEditorPluginConstructor, M as IBeforeEditorInitLifecycle, N as IDecorator, O as CardLikeElementNode, P as IDocumentOptions, Q as KeyEnum, R as INodeRegistrationTransform, S as ReactPlainTextProps, T as $createCursorNode, V as IServiceID, W as HotkeyOptions, X as HotkeyScopeEnum, Y as HotkeyItem, Z as HotkeyScopeId, _ as MentionNode, a as ReactSlashOptionProps, b as ReactEditorContent, c as ITriggerContext, d as ISlashMenuOption, et as DataSource, f as ISlashOption, g as ReactMentionPluginProps, h as ReactMentionPlugin, i as MenuRenderProps, j as INSERT_QUOTE_COMMAND, k as cursorNodeSerialized, l as SlashPlugin, m as SlashOptions, n as ReactSlashOption, o as ReactSlashPluginProps, p as ISlashService, q as HotkeyEnum, r as SlashMenu, s as SlashMenuProps, t as ReactSlashPlugin, tt as IWriteOptions, u as SlashPluginOptions, v as SerializedMentionNode, w as CommonPluginOptions, x as ReactEditorContentProps, y as ReactPlainText, z as IPlugin } from "./index-DHGp94p0.js";
2
- import React, { FC, JSX, ReactNode } from "react";
3
- import createDebug from "debug";
4
- import { HistoryState, HistoryStateEntry } from "@lexical/history";
5
- import { InsertTableCommandPayloadHeaders } from "@lexical/table";
6
- import EventEmitter from "eventemitter3";
7
- import * as _$lexical from "lexical";
8
- import { BaseSelection, CommandListener, CommandListenerPriority, CommandPayloadType, DOMConversionMap, DOMExportOutput, DecoratorNode, EditorConfig, EditorThemeClasses, ElementDOMSlot, ElementNode, LexicalCommand, LexicalEditor, LexicalNode, LexicalNodeConfig, LexicalUpdateJSON, NodeKey, RangeSelection, SerializedEditorState, SerializedElementNode, SerializedLexicalNode, SerializedRootNode, SerializedTextNode, Spread, TextFormatType, TextNode, resetRandomKey } from "lexical";
9
- import { INSERT_ORDERED_LIST_COMMAND, INSERT_UNORDERED_LIST_COMMAND, REMOVE_LIST_COMMAND, UPDATE_LIST_START_COMMAND } from "@lexical/list";
10
- import { bundledLanguagesInfo } from "shiki";
1
+ import { DataSource } from "./editor-kernel/data-source.js";
2
+ import { HotkeyEnum, HotkeyId, HotkeyItem, HotkeyScopeEnum, HotkeyScopeId, KeyEnum, ModifierCombination } from "./types/hotkey.js";
3
+ import { getHotkeyById } from "./utils/hotkey/registerHotkey.js";
4
+ import { IEditor } from "./types/kernel.js";
5
+ import { $closest, $closestNodeType, $getNearestNodeFromDOMNode, $getNodeFromDOMNode, DOM_DOCUMENT_FRAGMENT_TYPE, DOM_DOCUMENT_TYPE, DOM_ELEMENT_TYPE, DOM_TEXT_TYPE, EDITOR_THEME_KEY, assert, compareNodeOrder, createEmptyEditorState, genServiceId, generateEditorId, getKernelFromEditor, getKernelFromEditorConfig, getNodeKeyFromDOMNode, getParentElement, isDOMNode, isDocumentFragment, moment, noop, reconcileDecorator, registerEditorKernel, unregisterEditorKernel } from "./editor-kernel/utils.js";
6
+ import { HOVER_COMMAND } from "./editor-kernel/event.js";
7
+ import { resetRandomKey } from "./editor-kernel/index.js";
8
+ import { LexicalErrorBoundary } from "./editor-kernel/react/LexicalErrorBoundary.js";
9
+ import { LexicalPortalContainer } from "./editor-kernel/react/PortalContainer.js";
10
+ import { useLexicalComposerContext } from "./editor-kernel/react/react-context.js";
11
+ import { ReactEditor } from "./editor-kernel/react/react-editor.js";
12
+ import { useLexicalEditor } from "./editor-kernel/react/useLexicalEditor.js";
13
+ import { ILitexmlService, LitexmlService, XMLReaderFunc, XMLReaderRecord, XMLWriterFunc, XMLWriterRecord } from "./plugins/litexml/service/litexml-service.js";
14
+ import { LitexmlDataSource } from "./plugins/litexml/data-source/litexml-data-source.js";
15
+ import { LITEXML_APPLY_COMMAND, LITEXML_INSERT_COMMAND, LITEXML_MODIFY_COMMAND, LITEXML_REMOVE_COMMAND } from "./plugins/litexml/command/index.js";
16
+ import { FileListItem, ImageListItem, MediaLists, extractMediaFromEditorState } from "./headless/extract-media-from-editor-state.js";
17
+ import { DEFAULT_HEADLESS_EDITOR_PLUGINS, HeadlessDocumentType, HeadlessEditor, HeadlessEditorExport, HeadlessEditorExportOptions, HeadlessEditorHydrationInput, HeadlessEditorOptions, HeadlessLiteXMLBatchOperation, HeadlessLiteXMLInsertOperation, HeadlessLiteXMLOperation, HeadlessLiteXMLRemoveOperation, HeadlessLiteXMLReplaceOperation, createHeadlessEditor } from "./headless/index.js";
18
+ import { AutoCompletePlugin } from "./plugins/auto-complete/plugin/index.js";
19
+ import { ReactAutoCompletePlugin } from "./plugins/auto-complete/react/ReactAutoCompletePlugin.js";
20
+ import { BlockMovePayload, MOVE_BLOCK_COMMAND, registerBlockMoveCommand } from "./plugins/block/command/index.js";
21
+ import { BlockPlugin, BlockPluginOptions } from "./plugins/block/plugin/index.js";
22
+ import { BlockDragTarget } from "./plugins/block/react/core/types.js";
23
+ import { BlockMenuService, IBlockActionButton, IBlockActionButtonIcon, IBlockMenuItem, IBlockMenuRenderContext, IBlockMenuService } from "./plugins/block/service/i-block-menu-service.js";
24
+ import { ReactBlockPlugin, ReactBlockPluginProps } from "./plugins/block/react/ReactBlockPlugin.js";
25
+ import { INSERT_CODEINLINE_COMMAND } from "./plugins/code/command/index.js";
26
+ import { CodePlugin } from "./plugins/code/plugin/index.js";
27
+ import { ReactCodePlugin } from "./plugins/code/react/CodeReactPlugin.js";
28
+ import { UPDATE_CODEBLOCK_LANG } from "./plugins/codeblock/command/index.js";
29
+ import { CodeblockPlugin, CodeblockPluginOptions } from "./plugins/codeblock/plugin/index.js";
30
+ import { ReactCodeblockPluginProps } from "./plugins/codeblock/react/type.js";
31
+ import { ReactCodeblockPlugin } from "./plugins/codeblock/react/ReactCodeblockPlugin.js";
32
+ import { bundledLanguagesInfo } from "./plugins/codeblock/index.js";
33
+ import { INSERT_CODEMIRROR_COMMAND, SELECT_AFTER_CODEMIRROR_COMMAND, SELECT_BEFORE_CODEMIRROR_COMMAND } from "./plugins/codemirror-block/command/index.js";
34
+ import { CodemirrorPlugin, CodemirrorPluginOptions } from "./plugins/codemirror-block/plugin/index.js";
35
+ import { ReactCodemirrorPlugin } from "./plugins/codemirror-block/react/ReactCodemirrorNode.js";
36
+ import { INSERT_HEADING_COMMAND, INSERT_QUOTE_COMMAND } from "./plugins/common/command/index.js";
37
+ import { $createCursorNode, $isCardLikeElementNode, $isCursorNode, CardLikeElementNode, cursorNodeSerialized } from "./plugins/common/node/cursor.js";
38
+ import { CommonPlugin, CommonPluginOptions } from "./plugins/common/plugin/index.js";
39
+ import { ReactEditorContentProps, ReactPlainTextProps } from "./plugins/common/react/type.js";
40
+ import { ReactEditorContent } from "./plugins/common/react/ReactEditorContent.js";
41
+ import { ReactPlainText } from "./plugins/common/react/ReactPlainText.js";
42
+ import { IMarkdownShortCutService, MARKDOWN_READER_LEVEL, MARKDOWN_READER_LEVEL_HIGH, MARKDOWN_READER_LEVEL_NORMAL, MARKDOWN_WRITER_LEVEL_MAX } from "./plugins/markdown/service/shortcut.js";
43
+ import { CONTENT_BLOCKS_DATA_TYPE, ContentBlock, ExtractContentBlocksOptions, FileContentBlock, ImageContentBlock, TextContentBlock } from "./plugins/content-blocks/types.js";
44
+ import { ContentBlocksDataSource } from "./plugins/content-blocks/data-source/content-blocks-data-source.js";
45
+ import { ContentBlocksPlugin, ContentBlocksPluginOptions } from "./plugins/content-blocks/plugin/index.js";
46
+ import { extractContentBlocks } from "./plugins/content-blocks/utils/extract.js";
47
+ import { extractMediaLists } from "./plugins/content-blocks/utils/extract-media-lists.js";
48
+ import { INSERT_FILE_COMMAND } from "./plugins/file/command/index.js";
49
+ import { FilePlugin, FilePluginOptions } from "./plugins/file/plugin/index.js";
50
+ import { ReactFilePluginProps } from "./plugins/file/react/type.js";
51
+ import { ReactFilePlugin } from "./plugins/file/react/ReactFilePlugin.js";
52
+ import { INSERT_HORIZONTAL_RULE_COMMAND } from "./plugins/hr/command/index.js";
53
+ import { HRPlugin, HRPluginOptions } from "./plugins/hr/plugin/index.js";
54
+ import { ReactHRPluginProps } from "./plugins/hr/react/type.js";
55
+ import { ReactHRPlugin } from "./plugins/hr/react/ReactHRPlugin.js";
56
+ import { INSERT_IMAGE_COMMAND } from "./plugins/image/command/index.js";
57
+ import { ImagePlugin, ImagePluginOptions } from "./plugins/image/plugin/index.js";
58
+ import { ReactImagePluginProps } from "./plugins/image/react/type.js";
59
+ import { ReactImagePlugin } from "./plugins/image/react/ReactImagePlugin.js";
60
+ import { INodePlugin, INodePluginOptions } from "./plugins/inode/plugin/index.js";
61
+ import { ReactNodePlugin } from "./plugins/inode/react/index.js";
62
+ import { INodeService } from "./plugins/inode/service/index.js";
63
+ import { INSERT_LINK_COMMAND } from "./plugins/link/command/index.js";
64
+ import { LinkPlugin, LinkPluginOptions } from "./plugins/link/plugin/index.js";
65
+ import { ReactLinkPluginProps } from "./plugins/link/react/type.js";
66
+ import { ReactLinkPlugin } from "./plugins/link/react/ReactLinkPlugin.js";
67
+ import { ILinkService } from "./plugins/link/service/i-link-service.js";
68
+ import { INSERT_LINK_HIGHLIGHT_COMMAND, registerLinkHighlightCommand } from "./plugins/link-highlight/command/index.js";
69
+ import { LinkHighlightPlugin, LinkHighlightPluginOptions } from "./plugins/link-highlight/plugin/index.js";
70
+ import { ReactLinkHighlightPlugin } from "./plugins/link-highlight/react/ReactLinkHighlightPlugin.js";
71
+ import { INSERT_CHECK_LIST_COMMAND } from "./plugins/list/plugin/checkList.js";
72
+ import { INSERT_ORDERED_LIST_COMMAND, INSERT_UNORDERED_LIST_COMMAND, REMOVE_LIST_COMMAND, UPDATE_LIST_START_COMMAND } from "./plugins/list/command/index.js";
73
+ import { ListPlugin, ListPluginOptions } from "./plugins/list/plugin/index.js";
74
+ import { ReactListPluginProps } from "./plugins/list/react/type.js";
75
+ import { ReactListPlugin } from "./plugins/list/react/ReactListPlugin.js";
76
+ import { DiffAction, LITEXML_DIFFNODE_ALL_COMMAND, LITEXML_DIFFNODE_COMMAND } from "./plugins/litexml/command/diffCommand.js";
77
+ import { LitexmlPlugin, LitexmlPluginOptions } from "./plugins/litexml/plugin/index.js";
78
+ import { ReactLiteXmlPlugin } from "./plugins/litexml/react/index.js";
79
+ import { useHasDiffNode } from "./plugins/litexml/react/hooks/useHasDiffNode.js";
80
+ import { GET_MARKDOWN_SELECTION_COMMAND, INSERT_MARKDOWN_COMMAND } from "./plugins/markdown/command/index.js";
81
+ import { MarkdownPlugin } from "./plugins/markdown/plugin/index.js";
82
+ import { ReactMarkdownPlugin } from "./plugins/markdown/react/index.js";
83
+ import { isPunctuationChar } from "./plugins/markdown/utils/index.js";
84
+ import { detectCodeLanguage, detectLanguage } from "./plugins/markdown/utils/detectLanguage.js";
85
+ import { isPureUrl, isValidUrl } from "./utils/url.js";
86
+ import { INSERT_MATH_COMMAND } from "./plugins/math/command/index.js";
87
+ import { MathPlugin } from "./plugins/math/plugin/index.js";
88
+ import { ReactMathPlugin } from "./plugins/math/react/index.js";
89
+ import { INSERT_MENTION_COMMAND } from "./plugins/mention/command/index.js";
90
+ import { SerializedMentionNode } from "./plugins/mention/node/MentionNode.js";
91
+ import { MentionPlugin, MentionPluginOptions } from "./plugins/mention/plugin/index.js";
92
+ import { ReactMentionPluginProps } from "./plugins/mention/react/type.js";
93
+ import { ReactMentionPlugin } from "./plugins/mention/react/ReactMentionPlugin.js";
94
+ import { ISlashMenuOption, ISlashOption, ISlashService, SlashOptions } from "./plugins/slash/service/i-slash-service.js";
95
+ import { ITriggerContext, SlashPlugin, SlashPluginOptions } from "./plugins/slash/plugin/index.js";
96
+ import { MenuRenderProps, ReactSlashOptionProps, ReactSlashPluginProps, SlashMenuProps } from "./plugins/slash/react/type.js";
97
+ import { SlashMenu } from "./plugins/slash/react/components/SlashMenu.js";
98
+ import { ReactSlashOption } from "./plugins/slash/react/ReactSlashOption.js";
99
+ import { ReactSlashPlugin } from "./plugins/slash/react/ReactSlashPlugin.js";
100
+ import { INSERT_TABLE_COMMAND, SELECT_TABLE_COMMAND } from "./plugins/table/command/index.js";
101
+ import { TablePlugin, TablePluginOptions } from "./plugins/table/plugin/index.js";
102
+ import { ReactTablePlugin } from "./plugins/table/react/index.js";
103
+ import { HIDE_TOOLBAR_COMMAND, SHOW_TOOLBAR_COMMAND, ToolbarCommandOptions, registerToolbarCommand } from "./plugins/toolbar/command/index.js";
104
+ import { ReactToolbarPlugin } from "./plugins/toolbar/react/index.js";
105
+ import { UploadPlugin, UploadPluginOptions } from "./plugins/upload/plugin/index.js";
106
+ import { IUploadService, UPLOAD_PRIORITY_HIGH, UPLOAD_PRIORITY_LOW, UPLOAD_PRIORITY_MEDIUM } from "./plugins/upload/service/i-upload-service.js";
107
+ import { VirtualBlockPlugin, VirtualBlockPluginOptions } from "./plugins/virtual-block/plugin/index.js";
108
+ import { ReactVirtualBlockPlugin } from "./plugins/virtual-block/react/ReactVirtualBlock.js";
109
+ import { browserDebug, createDebugLogger, debugLogger, debugLoggers, devConsole, prodSafeLogger } from "./utils/debug.js";
110
+ import { Kernel } from "./editor-kernel/kernel.js";
111
+ import { scrollIntoView } from "./utils/scrollIntoView.js";
11
112
 
12
- //#region src/editor-kernel/utils.d.ts
13
- declare const DOM_ELEMENT_TYPE = 1;
14
- declare const DOM_TEXT_TYPE = 3;
15
- declare const DOM_DOCUMENT_TYPE = 9;
16
- declare const DOM_DOCUMENT_FRAGMENT_TYPE = 11;
17
- declare function genServiceId<T>(name: string): IServiceID<T>;
18
- declare const noop: () => void;
19
- declare function createEmptyEditorState(): _$lexical.EditorState;
20
- declare function assert(cond?: boolean, message?: string): asserts cond;
21
- declare function getNodeKeyFromDOMNode(dom: Node, editor: LexicalEditor): NodeKey | undefined;
22
- declare function $getNodeFromDOMNode(dom: Node, editor: LexicalEditor, editorState?: ReturnType<LexicalEditor['getEditorState']>): LexicalNode | null;
23
- /**
24
- * @param x - The element being tested
25
- * @returns Returns true if x is a DOM Node, false otherwise.
26
- */
27
- declare function isDOMNode(x: unknown): x is Node;
28
- /**
29
- * @param x - The element being testing
30
- * @returns Returns true if x is a document fragment, false otherwise.
31
- */
32
- declare function isDocumentFragment(x: unknown): x is DocumentFragment;
33
- declare function getParentElement(node: Node): HTMLElement | null;
34
- declare function $getNearestNodeFromDOMNode(startingDOM: Node, editor: LexicalEditor, editorState?: ReturnType<LexicalEditor['getEditorState']>): LexicalNode | null;
35
- declare function getKernelFromEditor(editor: LexicalEditor): IEditorKernel;
36
- declare const EDITOR_THEME_KEY = "__editorId";
37
- declare function generateEditorId(): string;
38
- declare function registerEditorKernel(id: string, kernel: IEditorKernel): void;
39
- declare function unregisterEditorKernel(id: string): void;
40
- declare function getKernelFromEditorConfig(config: EditorConfig): IEditorKernel | null;
41
- /**
42
- *
43
- * @param nodeA
44
- * @param nodeB
45
- * @returns
46
- */
47
- declare function compareNodeOrder(nodeA: LexicalNode, nodeB: LexicalNode): number;
48
- declare function $closest(node: LexicalNode | ElementNode | null, test: (node: LexicalNode) => boolean): LexicalNode | null;
49
- declare function $closestNodeType(node: LexicalNode | ElementNode | null, type: string | string[]): LexicalNode | null;
50
- declare function moment(): Promise<unknown>;
51
- declare function reconcileDecorator(activeEditor: LexicalEditor, key: NodeKey, decorator: unknown): void;
52
- //#endregion
53
- //#region src/editor-kernel/event.d.ts
54
- declare const HOVER_COMMAND: _$lexical.LexicalCommand<MouseEvent>;
55
- //#endregion
56
- //#region src/editor-kernel/react/LexicalErrorBoundary.d.ts
57
- type LexicalErrorBoundaryProps = {
58
- children: JSX.Element;
59
- onError: (error: unknown) => void;
60
- };
61
- declare function LexicalErrorBoundary({
62
- children,
63
- onError
64
- }: LexicalErrorBoundaryProps): JSX.Element;
65
- //#endregion
66
- //#region src/editor-kernel/react/PortalContainer.d.ts
67
- interface PortalContainerProps {
68
- children: React.ReactNode;
69
- className?: string;
70
- editor: LexicalEditor;
71
- node: LexicalNode;
72
- style?: React.CSSProperties;
73
- }
74
- declare const LexicalPortalContainer: React.ForwardRefExoticComponent<PortalContainerProps & React.RefAttributes<HTMLDivElement | null>>;
75
- //#endregion
76
- //#region src/editor-kernel/react/react-context.d.ts
77
- type LexicalComposerContextType = {
78
- getTheme: () => EditorThemeClasses | null | undefined;
79
- };
80
- type LexicalComposerContextWithEditor = [IEditor, LexicalComposerContextType];
81
- declare function useLexicalComposerContext(): LexicalComposerContextWithEditor;
82
- //#endregion
83
- //#region src/editor-kernel/react/react-editor.d.ts
84
- interface IReactEditorProps {
85
- children?: ReactNode | undefined;
86
- /** Editor configuration */
87
- config?: Record<string, any>;
88
- /** Editor instance to use */
89
- editor?: IEditor;
90
- /** Callback called when editor is initialized */
91
- onInit?: (editor: IEditor) => void;
92
- }
93
- declare const ReactEditor: FC<IReactEditorProps>;
94
- //#endregion
95
- //#region src/editor-kernel/react/useLexicalEditor.d.ts
96
- declare function useLexicalEditor(handleEditor: (lexicalEditor: LexicalEditor) => (() => void) | undefined, deps?: any[]): void;
97
- //#endregion
98
- //#region src/plugins/litexml/service/litexml-service.d.ts
99
- /**
100
- * XML Reader function type - converts XML element to Lexical node
101
- */
102
- type XMLReaderFunc = (xmlElement: Element, children: any[]) => any | any[] | false;
103
- /**
104
- * XML Writer function type - converts Lexical node to XML string
105
- */
106
- type XMLWriterFunc = (node: LexicalNode, ctx: IWriterContext, indent: number, nodeToXML: (node: any, lines: string[], indent?: number) => void) => IXmlNode | HandleChildrenResult | false;
107
- /**
108
- * Record of XML readers indexed by tag name
109
- */
110
- type XMLReaderRecord = {
111
- [tagName: string]: XMLReaderFunc | XMLReaderFunc[];
112
- };
113
- /**
114
- * Record of XML writers indexed by node type
115
- */
116
- type XMLWriterRecord = {
117
- [nodeType: string]: XMLWriterFunc | XMLWriterFunc[];
118
- };
119
- interface IXmlNode {
120
- attributes: {
121
- [key: string]: string;
122
- };
123
- children?: IXmlNode[];
124
- tagName: string;
125
- textContent?: string;
126
- }
127
- interface HandleChildrenResult {
128
- lines: string[];
129
- }
130
- interface IWriterContext {
131
- createXmlNode(tagName: string, attributes?: {
132
- [key: string]: string;
133
- }, textContent?: string): IXmlNode;
134
- }
135
- /**
136
- * ILitexmlService - Service interface for extending Litexml plugin
137
- * Allows other plugins to register custom XML readers and writers
138
- */
139
- interface ILitexmlService {
140
- /**
141
- * Get all registered XML readers
142
- */
143
- getXMLReaders(): XMLReaderRecord;
144
- /**
145
- * Get all registered XML writers
146
- */
147
- getXMLWriters(): XMLWriterRecord;
148
- /**
149
- * Check if a reader is registered for a tag
150
- */
151
- hasXMLReader(tagName: string): boolean;
152
- /**
153
- * Check if a writer is registered for a node type
154
- */
155
- hasXMLWriter(nodeType: string): boolean;
156
- /**
157
- * Register a custom XML reader for a specific tag name
158
- * @param tagName - XML tag name to handle (case-insensitive)
159
- * @param reader - Function that converts XML element to Lexical node
160
- */
161
- registerXMLReader(tagName: string, reader: XMLReaderFunc): void;
162
- /**
163
- * Register a custom XML writer for a specific Lexical node type
164
- * @param nodeType - Lexical node type to handle
165
- * @param writer - Function that converts Lexical node to XML string
166
- */
167
- registerXMLWriter(nodeType: string, writer: XMLWriterFunc): void;
168
- }
169
- /**
170
- * Service ID for Litexml service
171
- */
172
- declare const ILitexmlService: IServiceID<ILitexmlService>;
173
- /**
174
- * Default implementation of ILitexmlService
175
- */
176
- declare class LitexmlService implements ILitexmlService {
177
- private readers;
178
- private writers;
179
- registerXMLReader(tagName: string, reader: XMLReaderFunc): void;
180
- registerXMLWriter(nodeType: string, writer: XMLWriterFunc): void;
181
- getXMLReaders(): XMLReaderRecord;
182
- getXMLWriters(): XMLWriterRecord;
183
- hasXMLReader(tagName: string): boolean;
184
- hasXMLWriter(nodeType: string): boolean;
185
- }
186
- //#endregion
187
- //#region src/plugins/litexml/data-source/litexml-data-source.d.ts
188
- /**
189
- * LitexmlDataSource - Handles conversion between Lexical editor state and XML format
190
- * Provides read (parse XML to Lexical) and write (export Lexical to XML) capabilities
191
- */
192
- declare class LitexmlDataSource extends DataSource {
193
- protected dataType: string;
194
- protected getService?: (<T>(serviceId: IServiceID<T>) => T | null) | undefined;
195
- private litexmlService;
196
- private ctx;
197
- constructor(dataType?: string, getService?: (<T>(serviceId: IServiceID<T>) => T | null) | undefined, service?: ILitexmlService);
198
- readLiteXMLToInode(litexml: string): any;
199
- /**
200
- * Parse XML string and set it to the editor
201
- * @param editor - The Lexical editor instance
202
- * @param data - XML string to parse
203
- */
204
- read(editor: LexicalEditor, data: string): void;
205
- /**
206
- * Export editor content to XML format
207
- * @param editor - The Lexical editor instance
208
- * @param options - Write options (e.g., selection flag)
209
- * @returns XML string representation of the editor content
210
- */
211
- write(editor: LexicalEditor, options?: IWriteOptions): any;
212
- /**
213
- * Parse XML string using browser's built-in parser
214
- */
215
- private parseXMLString;
216
- /**
217
- * Convert XML document to Lexical node structure
218
- */
219
- private xmlToLexical;
220
- /**
221
- * Recursively process XML elements and convert to Lexical nodes
222
- */
223
- private processXMLElement;
224
- /**
225
- * Process XML element's children
226
- */
227
- private processXMLChildren;
228
- /**
229
- * Convert Lexical node structure to XML string
230
- */
231
- private lexicalToXML;
232
- /**
233
- * Recursively convert Lexical nodes to XML elements
234
- */
235
- private nodesToXML;
236
- /**
237
- * Build XML attribute string from attributes object
238
- */
239
- private buildXMLAttributes;
240
- /**
241
- * Escape XML special characters
242
- */
243
- private escapeXML;
244
- }
245
- //#endregion
246
- //#region src/plugins/litexml/command/index.d.ts
247
- declare const LITEXML_MODIFY_COMMAND: _$lexical.LexicalCommand<({
248
- action: "insert";
249
- beforeId: string;
250
- litexml: string;
251
- } | {
252
- action: "insert";
253
- afterId: string;
254
- litexml: string;
255
- } | {
256
- action: "remove";
257
- id: string;
258
- } | {
259
- action: "modify";
260
- litexml: string | string[];
261
- })[]>;
262
- declare const LITEXML_APPLY_COMMAND: _$lexical.LexicalCommand<{
263
- delay?: boolean;
264
- litexml: string | string[];
265
- }>;
266
- declare const LITEXML_REMOVE_COMMAND: _$lexical.LexicalCommand<{
267
- delay?: boolean;
268
- id: string;
269
- }>;
270
- declare const LITEXML_INSERT_COMMAND: _$lexical.LexicalCommand<{
271
- beforeId: string;
272
- delay?: boolean;
273
- litexml: string;
274
- } | {
275
- afterId: string;
276
- delay?: boolean;
277
- litexml: string;
278
- }>;
279
- //#endregion
280
- //#region src/headless/extract-media-from-editor-state.d.ts
281
- interface ImageListItem {
282
- alt: string;
283
- id: string;
284
- url: string;
285
- }
286
- interface FileListItem {
287
- fileType: string;
288
- id: string;
289
- name: string;
290
- size: number;
291
- url: string;
292
- }
293
- interface MediaLists {
294
- fileList: FileListItem[];
295
- imageList: ImageListItem[];
296
- }
297
- declare const extractMediaFromEditorState: (state: SerializedEditorState | null | undefined) => MediaLists;
298
- //#endregion
299
- //#region src/headless/index.d.ts
300
- type HeadlessDocumentType = 'json' | 'litexml' | 'markdown' | (string & object);
301
- interface HeadlessEditorHydrationInput {
302
- content: unknown;
303
- options?: IDocumentOptions;
304
- type: HeadlessDocumentType;
305
- }
306
- interface HeadlessEditorExportOptions {
307
- litexml?: boolean;
308
- }
309
- interface HeadlessEditorExport {
310
- editorData: SerializedEditorState<SerializedLexicalNode>;
311
- litexml?: string;
312
- markdown: string;
313
- }
314
- interface HeadlessEditorOptions {
315
- additionalPlugins?: ReadonlyArray<IPlugin>;
316
- initialValue?: HeadlessEditorHydrationInput;
317
- plugins?: ReadonlyArray<IPlugin>;
318
- }
319
- interface HeadlessLiteXMLReplaceOperation {
320
- action: 'apply' | 'replace';
321
- delay?: boolean;
322
- litexml: string | string[];
323
- }
324
- type HeadlessLiteXMLInsertOperation = {
325
- action: 'insert';
326
- afterId: string;
327
- delay?: boolean;
328
- litexml: string;
329
- } | {
330
- action: 'insert';
331
- beforeId: string;
332
- delay?: boolean;
333
- litexml: string;
334
- };
335
- interface HeadlessLiteXMLRemoveOperation {
336
- action: 'remove';
337
- delay?: boolean;
338
- id: string;
339
- }
340
- interface HeadlessLiteXMLBatchOperation {
341
- action: 'batch';
342
- operations: CommandPayloadType<typeof LITEXML_MODIFY_COMMAND>;
343
- }
344
- type HeadlessLiteXMLOperation = HeadlessLiteXMLBatchOperation | HeadlessLiteXMLInsertOperation | HeadlessLiteXMLRemoveOperation | HeadlessLiteXMLReplaceOperation;
345
- declare const DEFAULT_HEADLESS_EDITOR_PLUGINS: ReadonlyArray<IPlugin>;
346
- declare class HeadlessEditor {
347
- readonly kernel: IEditor;
348
- constructor(options?: HeadlessEditorOptions);
349
- hydrate(input: HeadlessEditorHydrationInput): this;
350
- hydrateEditorData(editorData: SerializedEditorState<SerializedLexicalNode> | string, options?: IDocumentOptions): this;
351
- hydrateLiteXML(litexml: string, options?: IDocumentOptions): this;
352
- hydrateMarkdown(markdown: string, options?: IDocumentOptions): this;
353
- applyLiteXML(operation: HeadlessLiteXMLOperation | ReadonlyArray<HeadlessLiteXMLOperation>): Promise<this>;
354
- applyLiteXMLBatch(operations: CommandPayloadType<typeof LITEXML_MODIFY_COMMAND>): Promise<this>;
355
- export(options?: HeadlessEditorExportOptions): HeadlessEditorExport;
356
- exportState(options?: HeadlessEditorExportOptions): HeadlessEditorExport;
357
- destroy(): void;
358
- private applyLiteXMLOperation;
359
- }
360
- declare function createHeadlessEditor(options?: HeadlessEditorOptions): HeadlessEditor;
361
- //#endregion
362
- //#region src/plugins/auto-complete/plugin/index.d.ts
363
- interface AutoCompletePluginOptions {
364
- /** Delay in milliseconds before triggering auto-complete (default: 1000ms) */
365
- delay?: number;
366
- onAutoComplete?: (opt: {
367
- abortSignal: AbortSignal;
368
- afterText: string;
369
- editor: IEditor;
370
- input: string;
371
- selectionType: string;
372
- suggestionId?: string;
373
- }) => Promise<string | null>;
374
- onSuggestionAccepted?: (info: {
375
- acceptedText: string;
376
- suggestionId: string;
377
- visibleMs: number;
378
- }) => void;
379
- onSuggestionRejected?: (info: {
380
- reason: 'cursor-move' | 'typing' | 'esc' | 'blur' | 'other';
381
- suggestionId: string;
382
- visibleMs: number;
383
- }) => void;
384
- theme?: {
385
- placeholderBlock?: string;
386
- placeholderInline?: string;
387
- };
388
- }
389
- declare const AutoCompletePlugin: IEditorPluginConstructor<AutoCompletePluginOptions>;
390
- //#endregion
391
- //#region src/plugins/auto-complete/react/type.d.ts
392
- interface ReactAutoCompletePluginProps {
393
- delay?: number;
394
- onAutoComplete?: (opt: {
395
- abortSignal: AbortSignal;
396
- afterText: string;
397
- editor: IEditor;
398
- input: string;
399
- selectionType: string;
400
- suggestionId?: string;
401
- }) => Promise<string | null>;
402
- onSuggestionAccepted?: (info: {
403
- acceptedText: string;
404
- suggestionId: string;
405
- visibleMs: number;
406
- }) => void;
407
- onSuggestionRejected?: (info: {
408
- reason: 'cursor-move' | 'typing' | 'esc' | 'blur' | 'other';
409
- suggestionId: string;
410
- visibleMs: number;
411
- }) => void;
412
- }
413
- //#endregion
414
- //#region src/plugins/auto-complete/react/ReactAutoCompletePlugin.d.ts
415
- declare const ReactAutoCompletePlugin: FC<ReactAutoCompletePluginProps>;
416
- //#endregion
417
- //#region src/plugins/block/command/index.d.ts
418
- interface BlockMovePayload {
419
- placement: 'after' | 'before';
420
- sourceBlockId: string;
421
- targetBlockId: string;
422
- }
423
- declare const MOVE_BLOCK_COMMAND: _$lexical.LexicalCommand<BlockMovePayload>;
424
- declare function registerBlockMoveCommand(editor: LexicalEditor): () => void;
425
- //#endregion
426
- //#region src/plugins/block/plugin/index.d.ts
427
- interface BlockPluginOptions {
428
- attributeName?: string;
429
- className?: string;
430
- }
431
- declare const BlockPlugin: IEditorPluginConstructor<BlockPluginOptions>;
432
- //#endregion
433
- //#region src/plugins/block/react/core/types.d.ts
434
- type BlockDragTarget = BlockMovePayload;
435
- //#endregion
436
- //#region src/plugins/block/service/i-block-menu-service.d.ts
437
- interface IBlockMenuRenderContext {
438
- blockElement: HTMLElement;
439
- blockId: string;
440
- editor: IEditor;
441
- }
442
- interface IBlockMenuItem {
443
- key: string;
444
- label: string | ((context: IBlockMenuRenderContext) => string);
445
- onClick: (context: IBlockMenuRenderContext) => void;
446
- order?: number;
447
- when?: (context: IBlockMenuRenderContext) => boolean;
448
- }
449
- type IBlockActionButtonIcon = 'plus';
450
- interface IBlockActionButton {
451
- icon?: IBlockActionButtonIcon;
452
- key: string;
453
- onClick: (context: IBlockMenuRenderContext) => void;
454
- order?: number;
455
- title: string | ((context: IBlockMenuRenderContext) => string);
456
- when?: (context: IBlockMenuRenderContext) => boolean;
457
- }
458
- interface IBlockMenuService {
459
- getActionButtons(context: IBlockMenuRenderContext): IBlockActionButton[];
460
- getMenus(context: IBlockMenuRenderContext): IBlockMenuItem[];
461
- registerActionButton(item: IBlockActionButton): () => void;
462
- registerMenu(item: IBlockMenuItem): () => void;
463
- subscribe(listener: () => void): () => void;
464
- }
465
- declare const IBlockMenuService: IServiceID<IBlockMenuService>;
466
- declare class BlockMenuService implements IBlockMenuService {
467
- private actionButtons;
468
- private items;
469
- private listeners;
470
- getActionButtons(context: IBlockMenuRenderContext): IBlockActionButton[];
471
- getMenus(context: IBlockMenuRenderContext): IBlockMenuItem[];
472
- registerActionButton(item: IBlockActionButton): () => void;
473
- registerMenu(item: IBlockMenuItem): () => void;
474
- subscribe(listener: () => void): () => void;
475
- private notify;
476
- }
477
- //#endregion
478
- //#region src/plugins/block/react/ReactBlockPlugin.d.ts
479
- interface ReactBlockPluginProps extends Omit<BlockPluginOptions, 'className'> {
480
- className?: string;
481
- locale?: Partial<Record<keyof ILocaleKeys, string>>;
482
- onDragTargetChange?: (target: BlockDragTarget | null) => void;
483
- onDragTargetResolve?: (target: BlockDragTarget | null) => void;
484
- onHoverBlockChange?: (context: IBlockMenuRenderContext | null) => void;
485
- rootClassName?: string;
486
- }
487
- declare const ReactBlockPlugin: FC<ReactBlockPluginProps>;
488
- //#endregion
489
- //#region src/plugins/code/command/index.d.ts
490
- declare const INSERT_CODEINLINE_COMMAND: _$lexical.LexicalCommand<undefined>;
491
- //#endregion
492
- //#region src/plugins/code/plugin/index.d.ts
493
- interface CodePluginOptions {
494
- enableHotkey?: boolean;
495
- theme?: string;
496
- }
497
- declare const CodePlugin: IEditorPluginConstructor<CodePluginOptions>;
498
- //#endregion
499
- //#region src/plugins/code/react/type.d.ts
500
- interface ReactCodePluginProps {
501
- className?: string;
502
- enableHotkey?: boolean;
503
- }
504
- //#endregion
505
- //#region src/plugins/code/react/CodeReactPlugin.d.ts
506
- declare const ReactCodePlugin: FC<ReactCodePluginProps>;
507
- //#endregion
508
- //#region src/editor-kernel/inode/i-element-node.d.ts
509
- type IElementNode = SerializedElementNode;
510
- //#endregion
511
- //#region src/editor-kernel/inode/i-node.d.ts
512
- type INode = SerializedLexicalNode;
513
- //#endregion
514
- //#region src/editor-kernel/inode/root-node.d.ts
515
- /**
516
- * Root node
517
- */
518
- type IRootNode = SerializedRootNode;
519
- //#endregion
520
- //#region src/editor-kernel/inode/text-node.d.ts
521
- /**
522
- * Text node
523
- */
524
- type ITextNode = SerializedTextNode;
525
- //#endregion
526
- //#region src/plugins/codeblock/command/index.d.ts
527
- declare const UPDATE_CODEBLOCK_LANG: _$lexical.LexicalCommand<{
528
- lang: string;
529
- }>;
530
- //#endregion
531
- //#region src/plugins/codeblock/plugin/index.d.ts
532
- interface CodeblockPluginOptions {
533
- /** Shiki theme name to use for syntax highlighting */
534
- shikiTheme?: string | {
535
- dark: string;
536
- light: string;
537
- };
538
- /** Custom CSS theme configuration */
539
- theme?: {
540
- code?: string;
541
- };
542
- }
543
- declare const CodeblockPlugin: IEditorPluginConstructor<CodeblockPluginOptions>;
544
- //#endregion
545
- //#region src/plugins/codeblock/react/type.d.ts
546
- interface ReactCodeblockPluginProps extends CodeblockPluginOptions {
547
- className?: string;
548
- shikiTheme?: string;
549
- }
550
- //#endregion
551
- //#region src/plugins/codeblock/react/ReactCodeblockPlugin.d.ts
552
- declare const ReactCodeblockPlugin: FC<ReactCodeblockPluginProps>;
553
- //#endregion
554
- //#region src/plugins/codemirror-block/command/index.d.ts
555
- declare const INSERT_CODEMIRROR_COMMAND: _$lexical.LexicalCommand<unknown>;
556
- declare const SELECT_BEFORE_CODEMIRROR_COMMAND: _$lexical.LexicalCommand<{
557
- key: string;
558
- }>;
559
- declare const SELECT_AFTER_CODEMIRROR_COMMAND: _$lexical.LexicalCommand<{
560
- key: string;
561
- }>;
562
- //#endregion
563
- //#region src/plugins/codemirror-block/node/CodeMirrorNode.d.ts
564
- interface CodeMirrorOptions {
565
- indentWithTabs: boolean;
566
- lineNumbers: boolean;
567
- tabSize: number;
568
- }
569
- type SerializedCodeMirrorNode = Spread<{
570
- code: string;
571
- codeTheme: string;
572
- language: string;
573
- options: {
574
- indentWithTabs: boolean;
575
- lineNumbers: boolean;
576
- tabSize: number;
577
- };
578
- }, SerializedLexicalNode>;
579
- declare class CodeMirrorNode extends DecoratorNode<any> {
580
- private __lang;
581
- private __code;
582
- private __codeTheme;
583
- private __options;
584
- static getType(): string;
585
- static clone(node: CodeMirrorNode): CodeMirrorNode;
586
- static importJSON(serializedNode: SerializedCodeMirrorNode): CodeMirrorNode;
587
- static importDOM(): DOMConversionMap | null;
588
- constructor(lang: string, code: string, codeTheme: string, options: CodeMirrorOptions, key?: string);
589
- get lang(): string;
590
- get code(): string;
591
- get codeTheme(): string;
592
- get options(): CodeMirrorOptions;
593
- exportDOM(editor: LexicalEditor): DOMExportOutput;
594
- exportJSON(): SerializedCodeMirrorNode;
595
- setLang(lang: string): this;
596
- setCode(code: string): this;
597
- setCodeTheme(codeTheme: string): this;
598
- setTabSize(tabSize: number): this;
599
- setIndentWithTabs(indentWithTabs: boolean): this;
600
- setLineNumbers(lineNumbers: boolean): this;
601
- createDOM(config: EditorConfig): HTMLElement;
602
- getTextContent(): string;
603
- isInline(): false;
604
- updateDOM(): boolean;
605
- decorate(editor: LexicalEditor): any;
606
- }
607
- //#endregion
608
- //#region src/plugins/codemirror-block/plugin/index.d.ts
609
- interface CodemirrorPluginOptions {
610
- decorator: (node: CodeMirrorNode, editor: LexicalEditor) => any;
611
- theme?: string;
612
- }
613
- declare const CodemirrorPlugin: IEditorPluginConstructor<CodemirrorPluginOptions>;
614
- //#endregion
615
- //#region src/plugins/codemirror-block/react/type.d.ts
616
- interface ReactCodemirrorPluginProps {
617
- className?: string;
618
- }
619
- //#endregion
620
- //#region src/plugins/codemirror-block/react/ReactCodemirrorNode.d.ts
621
- declare const ReactCodemirrorPlugin: FC<ReactCodemirrorPluginProps>;
622
- //#endregion
623
- //#region node_modules/.pnpm/@types+unist@3.0.3/node_modules/@types/unist/index.d.ts
624
- // ## Interfaces
625
- /**
626
- * Info associated with nodes by the ecosystem.
627
- *
628
- * This space is guaranteed to never be specified by unist or specifications
629
- * implementing unist.
630
- * But you can use it in utilities and plugins to store data.
631
- *
632
- * This type can be augmented to register custom data.
633
- * For example:
634
- *
635
- * ```ts
636
- * declare module 'unist' {
637
- * interface Data {
638
- * // `someNode.data.myId` is typed as `number | undefined`
639
- * myId?: number | undefined
640
- * }
641
- * }
642
- * ```
643
- */
644
- interface Data$1 {}
645
- /**
646
- * One place in a source file.
647
- */
648
- interface Point {
649
- /**
650
- * Line in a source file (1-indexed integer).
651
- */
652
- line: number;
653
- /**
654
- * Column in a source file (1-indexed integer).
655
- */
656
- column: number;
657
- /**
658
- * Character in a source file (0-indexed integer).
659
- */
660
- offset?: number | undefined;
661
- }
662
- /**
663
- * Position of a node in a source document.
664
- *
665
- * A position is a range between two points.
666
- */
667
- interface Position {
668
- /**
669
- * Place of the first character of the parsed source region.
670
- */
671
- start: Point;
672
- /**
673
- * Place of the first character after the parsed source region.
674
- */
675
- end: Point;
676
- }
677
- /**
678
- * Abstract unist node.
679
- *
680
- * The syntactic unit in unist syntax trees are called nodes.
681
- *
682
- * This interface is supposed to be extended.
683
- * If you can use {@link Literal} or {@link Parent}, you should.
684
- * But for example in markdown, a `thematicBreak` (`***`), is neither literal
685
- * nor parent, but still a node.
686
- */
687
- interface Node$2 {
688
- /**
689
- * Node type.
690
- */
691
- type: string;
692
- /**
693
- * Info from the ecosystem.
694
- */
695
- data?: Data$1 | undefined;
696
- /**
697
- * Position of a node in a source document.
698
- *
699
- * Nodes that are generated (not in the original source document) must not
700
- * have a position.
701
- */
702
- position?: Position | undefined;
703
- }
704
- //#endregion
705
- //#region node_modules/.pnpm/@types+mdast@4.0.4/node_modules/@types/mdast/index.d.ts
706
- // ## Enumeration
707
- /**
708
- * How phrasing content is aligned
709
- * ({@link https://drafts.csswg.org/css-text/ | [CSSTEXT]}).
710
- *
711
- * * `'left'`: See the
712
- * {@link https://drafts.csswg.org/css-text/#valdef-text-align-left | left}
713
- * value of the `text-align` CSS property
714
- * * `'right'`: See the
715
- * {@link https://drafts.csswg.org/css-text/#valdef-text-align-right | right}
716
- * value of the `text-align` CSS property
717
- * * `'center'`: See the
718
- * {@link https://drafts.csswg.org/css-text/#valdef-text-align-center | center}
719
- * value of the `text-align` CSS property
720
- * * `null`: phrasing content is aligned as defined by the host environment
721
- *
722
- * Used in GFM tables.
723
- */
724
- type AlignType = "center" | "left" | "right" | null;
725
- /**
726
- * Explicitness of a reference.
727
- *
728
- * `'shortcut'`: the reference is implicit, its identifier inferred from its
729
- * content
730
- * `'collapsed'`: the reference is explicit, its identifier inferred from its
731
- * content
732
- * `'full'`: the reference is explicit, its identifier explicitly set
733
- */
734
- type ReferenceType = "shortcut" | "collapsed" | "full";
735
- // ## Mixin
736
- /**
737
- * Node with a fallback.
738
- */
739
- interface Alternative {
740
- /**
741
- * Equivalent content for environments that cannot represent the node as
742
- * intended.
743
- */
744
- alt?: string | null | undefined;
745
- }
746
- /**
747
- * Internal relation from one node to another.
748
- *
749
- * Whether the value of `identifier` is expected to be a unique identifier or
750
- * not depends on the type of node including the Association.
751
- * An example of this is that they should be unique on {@link Definition},
752
- * whereas multiple {@link LinkReference}s can be non-unique to be associated
753
- * with one definition.
754
- */
755
- interface Association {
756
- /**
757
- * Relation of association.
758
- *
759
- * `identifier` is a source value: character escapes and character
760
- * references are not parsed.
761
- *
762
- * It can match another node.
763
- *
764
- * Its value must be normalized.
765
- * To normalize a value, collapse markdown whitespace (`[\t\n\r ]+`) to a space,
766
- * trim the optional initial and/or final space, and perform Unicode-aware
767
- * case-folding.
768
- */
769
- identifier: string;
770
- /**
771
- * Relation of association, in parsed form.
772
- *
773
- * `label` is a `string` value: it works just like `title` on {@link Link}
774
- * or a `lang` on {@link Code}: character escapes and character references
775
- * are parsed.
776
- *
777
- * It can match another node.
778
- */
779
- label?: string | null | undefined;
780
- }
781
- /**
782
- * Marker that is associated to another node.
783
- */
784
- interface Reference extends Association {
785
- /**
786
- * Explicitness of the reference.
787
- */
788
- referenceType: ReferenceType;
789
- }
790
- /**
791
- * Reference to resource.
792
- */
793
- interface Resource {
794
- /**
795
- * URL to the referenced resource.
796
- */
797
- url: string;
798
- /**
799
- * Advisory information for the resource, such as would be appropriate for
800
- * a tooltip.
801
- */
802
- title?: string | null | undefined;
803
- }
804
- // ## Interfaces
805
- /**
806
- * Info associated with mdast nodes by the ecosystem.
807
- *
808
- * This space is guaranteed to never be specified by unist or mdast.
809
- * But you can use it in utilities and plugins to store data.
810
- *
811
- * This type can be augmented to register custom data.
812
- * For example:
813
- *
814
- * ```ts
815
- * declare module 'mdast' {
816
- * interface Data {
817
- * // `someNode.data.myId` is typed as `number | undefined`
818
- * myId?: number | undefined
819
- * }
820
- * }
821
- * ```
822
- */
823
- interface Data extends Data$1 {}
824
- // ## Content maps
825
- /**
826
- * Union of registered mdast nodes that can occur where block content is
827
- * expected.
828
- *
829
- * To register custom mdast nodes, add them to {@link BlockContentMap}.
830
- * They will be automatically added here.
831
- */
832
- type BlockContent = BlockContentMap[keyof BlockContentMap];
833
- /**
834
- * Registry of all mdast nodes that can occur where {@link BlockContent} is
835
- * expected.
836
- *
837
- * This interface can be augmented to register custom node types:
838
- *
839
- * ```ts
840
- * declare module 'mdast' {
841
- * interface BlockContentMap {
842
- * // Allow using MDX ESM nodes defined by `remark-mdx`.
843
- * mdxjsEsm: MdxjsEsm;
844
- * }
845
- * }
846
- * ```
847
- *
848
- * For a union of all block content, see {@link RootContent}.
849
- */
850
- interface BlockContentMap {
851
- blockquote: Blockquote;
852
- code: Code;
853
- heading: Heading;
854
- html: Html;
855
- list: List;
856
- paragraph: Paragraph;
857
- table: Table;
858
- thematicBreak: ThematicBreak;
859
- }
860
- /**
861
- * Union of registered mdast nodes that can occur where definition content is
862
- * expected.
863
- *
864
- * To register custom mdast nodes, add them to {@link DefinitionContentMap}.
865
- * They will be automatically added here.
866
- */
867
- type DefinitionContent = DefinitionContentMap[keyof DefinitionContentMap];
868
- /**
869
- * Registry of all mdast nodes that can occur where {@link DefinitionContent}
870
- * is expected.
871
- *
872
- * This interface can be augmented to register custom node types:
873
- *
874
- * ```ts
875
- * declare module 'mdast' {
876
- * interface DefinitionContentMap {
877
- * custom: Custom;
878
- * }
879
- * }
880
- * ```
881
- *
882
- * For a union of all definition content, see {@link RootContent}.
883
- */
884
- interface DefinitionContentMap {
885
- definition: Definition;
886
- footnoteDefinition: FootnoteDefinition;
887
- }
888
- /**
889
- * Union of registered mdast nodes that can occur where list content is
890
- * expected.
891
- *
892
- * To register custom mdast nodes, add them to {@link ListContentMap}.
893
- * They will be automatically added here.
894
- */
895
- type ListContent = ListContentMap[keyof ListContentMap];
896
- /**
897
- * Registry of all mdast nodes that can occur where {@link ListContent}
898
- * is expected.
899
- *
900
- * This interface can be augmented to register custom node types:
901
- *
902
- * ```ts
903
- * declare module 'mdast' {
904
- * interface ListContentMap {
905
- * custom: Custom;
906
- * }
907
- * }
908
- * ```
909
- *
910
- * For a union of all list content, see {@link RootContent}.
911
- */
912
- interface ListContentMap {
913
- listItem: ListItem;
914
- }
915
- /**
916
- * Union of registered mdast nodes that can occur where phrasing content is
917
- * expected.
918
- *
919
- * To register custom mdast nodes, add them to {@link PhrasingContentMap}.
920
- * They will be automatically added here.
921
- */
922
- type PhrasingContent = PhrasingContentMap[keyof PhrasingContentMap];
923
- /**
924
- * Registry of all mdast nodes that can occur where {@link PhrasingContent}
925
- * is expected.
926
- *
927
- * This interface can be augmented to register custom node types:
928
- *
929
- * ```ts
930
- * declare module 'mdast' {
931
- * interface PhrasingContentMap {
932
- * // Allow using MDX JSX (text) nodes defined by `remark-mdx`.
933
- * mdxJsxTextElement: MDXJSXTextElement;
934
- * }
935
- * }
936
- * ```
937
- *
938
- * For a union of all phrasing content, see {@link RootContent}.
939
- */
940
- interface PhrasingContentMap {
941
- break: Break;
942
- delete: Delete;
943
- emphasis: Emphasis;
944
- footnoteReference: FootnoteReference;
945
- html: Html;
946
- image: Image;
947
- imageReference: ImageReference;
948
- inlineCode: InlineCode;
949
- link: Link;
950
- linkReference: LinkReference;
951
- strong: Strong;
952
- text: Text;
953
- }
954
- /**
955
- * Union of registered mdast nodes that can occur in {@link Root}.
956
- *
957
- * To register custom mdast nodes, add them to {@link RootContentMap}.
958
- * They will be automatically added here.
959
- */
960
- type RootContent = RootContentMap[keyof RootContentMap];
961
- /**
962
- * Registry of all mdast nodes that can occur as children of {@link Root}.
963
- *
964
- * > **Note**: {@link Root} does not need to be an entire document.
965
- * > it can also be a fragment.
966
- *
967
- * This interface can be augmented to register custom node types:
968
- *
969
- * ```ts
970
- * declare module 'mdast' {
971
- * interface RootContentMap {
972
- * // Allow using toml nodes defined by `remark-frontmatter`.
973
- * toml: TOML;
974
- * }
975
- * }
976
- * ```
977
- *
978
- * For a union of all {@link Root} children, see {@link RootContent}.
979
- */
980
- interface RootContentMap {
981
- blockquote: Blockquote;
982
- break: Break;
983
- code: Code;
984
- definition: Definition;
985
- delete: Delete;
986
- emphasis: Emphasis;
987
- footnoteDefinition: FootnoteDefinition;
988
- footnoteReference: FootnoteReference;
989
- heading: Heading;
990
- html: Html;
991
- image: Image;
992
- imageReference: ImageReference;
993
- inlineCode: InlineCode;
994
- link: Link;
995
- linkReference: LinkReference;
996
- list: List;
997
- listItem: ListItem;
998
- paragraph: Paragraph;
999
- strong: Strong;
1000
- table: Table;
1001
- tableCell: TableCell;
1002
- tableRow: TableRow;
1003
- text: Text;
1004
- thematicBreak: ThematicBreak;
1005
- yaml: Yaml;
1006
- }
1007
- /**
1008
- * Union of registered mdast nodes that can occur where row content is
1009
- * expected.
1010
- *
1011
- * To register custom mdast nodes, add them to {@link RowContentMap}.
1012
- * They will be automatically added here.
1013
- */
1014
- type RowContent = RowContentMap[keyof RowContentMap];
1015
- /**
1016
- * Registry of all mdast nodes that can occur where {@link RowContent}
1017
- * is expected.
1018
- *
1019
- * This interface can be augmented to register custom node types:
1020
- *
1021
- * ```ts
1022
- * declare module 'mdast' {
1023
- * interface RowContentMap {
1024
- * custom: Custom;
1025
- * }
1026
- * }
1027
- * ```
1028
- *
1029
- * For a union of all row content, see {@link RootContent}.
1030
- */
1031
- interface RowContentMap {
1032
- tableCell: TableCell;
1033
- }
1034
- /**
1035
- * Union of registered mdast nodes that can occur where table content is
1036
- * expected.
1037
- *
1038
- * To register custom mdast nodes, add them to {@link TableContentMap}.
1039
- * They will be automatically added here.
1040
- */
1041
- type TableContent = TableContentMap[keyof TableContentMap];
1042
- /**
1043
- * Registry of all mdast nodes that can occur where {@link TableContent}
1044
- * is expected.
1045
- *
1046
- * This interface can be augmented to register custom node types:
1047
- *
1048
- * ```ts
1049
- * declare module 'mdast' {
1050
- * interface TableContentMap {
1051
- * custom: Custom;
1052
- * }
1053
- * }
1054
- * ```
1055
- *
1056
- * For a union of all table content, see {@link RootContent}.
1057
- */
1058
- interface TableContentMap {
1059
- tableRow: TableRow;
1060
- }
1061
- // ## Abstract nodes
1062
- /**
1063
- * Abstract mdast node that contains the smallest possible value.
1064
- *
1065
- * This interface is supposed to be extended if you make custom mdast nodes.
1066
- *
1067
- * For a union of all registered mdast literals, see {@link Literals}.
1068
- */
1069
- interface Literal extends Node$1 {
1070
- /**
1071
- * Plain-text value.
1072
- */
1073
- value: string;
1074
- }
1075
- /**
1076
- * Abstract mdast node.
1077
- *
1078
- * This interface is supposed to be extended.
1079
- * If you can use {@link Literal} or {@link Parent}, you should.
1080
- * But for example in markdown, a thematic break (`***`) is neither literal nor
1081
- * parent, but still a node.
1082
- *
1083
- * To register custom mdast nodes, add them to {@link RootContentMap} and other
1084
- * places where relevant (such as {@link ElementContentMap}).
1085
- *
1086
- * For a union of all registered mdast nodes, see {@link Nodes}.
1087
- */
1088
- interface Node$1 extends Node$2 {
1089
- /**
1090
- * Info from the ecosystem.
1091
- */
1092
- data?: Data | undefined;
1093
- }
1094
- /**
1095
- * Abstract mdast node that contains other mdast nodes (*children*).
1096
- *
1097
- * This interface is supposed to be extended if you make custom mdast nodes.
1098
- *
1099
- * For a union of all registered mdast parents, see {@link Parents}.
1100
- */
1101
- interface Parent extends Node$1 {
1102
- /**
1103
- * List of children.
1104
- */
1105
- children: RootContent[];
1106
- }
1107
- // ## Concrete nodes
1108
- /**
1109
- * Markdown block quote.
1110
- */
1111
- interface Blockquote extends Parent {
1112
- /**
1113
- * Node type of mdast block quote.
1114
- */
1115
- type: "blockquote";
1116
- /**
1117
- * Children of block quote.
1118
- */
1119
- children: Array<BlockContent | DefinitionContent>;
1120
- /**
1121
- * Data associated with the mdast block quote.
1122
- */
1123
- data?: BlockquoteData | undefined;
1124
- }
1125
- /**
1126
- * Info associated with mdast block quote nodes by the ecosystem.
1127
- */
1128
- interface BlockquoteData extends Data {}
1129
- /**
1130
- * Markdown break.
1131
- */
1132
- interface Break extends Node$1 {
1133
- /**
1134
- * Node type of mdast break.
1135
- */
1136
- type: "break";
1137
- /**
1138
- * Data associated with the mdast break.
1139
- */
1140
- data?: BreakData | undefined;
1141
- }
1142
- /**
1143
- * Info associated with mdast break nodes by the ecosystem.
1144
- */
1145
- interface BreakData extends Data {}
1146
- /**
1147
- * Markdown code (flow) (block).
1148
- */
1149
- interface Code extends Literal {
1150
- /**
1151
- * Node type of mdast code (flow).
1152
- */
1153
- type: "code";
1154
- /**
1155
- * Language of computer code being marked up.
1156
- */
1157
- lang?: string | null | undefined;
1158
- /**
1159
- * Custom information relating to the node.
1160
- *
1161
- * If the lang field is present, a meta field can be present.
1162
- */
1163
- meta?: string | null | undefined;
1164
- /**
1165
- * Data associated with the mdast code (flow).
1166
- */
1167
- data?: CodeData | undefined;
1168
- }
1169
- /**
1170
- * Info associated with mdast code (flow) (block) nodes by the ecosystem.
1171
- */
1172
- interface CodeData extends Data {}
1173
- /**
1174
- * Markdown definition.
1175
- */
1176
- interface Definition extends Node$1, Association, Resource {
1177
- /**
1178
- * Node type of mdast definition.
1179
- */
1180
- type: "definition";
1181
- /**
1182
- * Data associated with the mdast definition.
1183
- */
1184
- data?: DefinitionData | undefined;
1185
- }
1186
- /**
1187
- * Info associated with mdast definition nodes by the ecosystem.
1188
- */
1189
- interface DefinitionData extends Data {}
1190
- /**
1191
- * Markdown GFM delete (strikethrough).
1192
- */
1193
- interface Delete extends Parent {
1194
- /**
1195
- * Node type of mdast GFM delete.
1196
- */
1197
- type: "delete";
1198
- /**
1199
- * Children of GFM delete.
1200
- */
1201
- children: PhrasingContent[];
1202
- /**
1203
- * Data associated with the mdast GFM delete.
1204
- */
1205
- data?: DeleteData | undefined;
1206
- }
1207
- /**
1208
- * Info associated with mdast GFM delete nodes by the ecosystem.
1209
- */
1210
- interface DeleteData extends Data {}
1211
- /**
1212
- * Markdown emphasis.
1213
- */
1214
- interface Emphasis extends Parent {
1215
- /**
1216
- * Node type of mdast emphasis.
1217
- */
1218
- type: "emphasis";
1219
- /**
1220
- * Children of emphasis.
1221
- */
1222
- children: PhrasingContent[];
1223
- /**
1224
- * Data associated with the mdast emphasis.
1225
- */
1226
- data?: EmphasisData | undefined;
1227
- }
1228
- /**
1229
- * Info associated with mdast emphasis nodes by the ecosystem.
1230
- */
1231
- interface EmphasisData extends Data {}
1232
- /**
1233
- * Markdown GFM footnote definition.
1234
- */
1235
- interface FootnoteDefinition extends Parent, Association {
1236
- /**
1237
- * Node type of mdast GFM footnote definition.
1238
- */
1239
- type: "footnoteDefinition";
1240
- /**
1241
- * Children of GFM footnote definition.
1242
- */
1243
- children: Array<BlockContent | DefinitionContent>;
1244
- /**
1245
- * Data associated with the mdast GFM footnote definition.
1246
- */
1247
- data?: FootnoteDefinitionData | undefined;
1248
- }
1249
- /**
1250
- * Info associated with mdast GFM footnote definition nodes by the ecosystem.
1251
- */
1252
- interface FootnoteDefinitionData extends Data {}
1253
- /**
1254
- * Markdown GFM footnote reference.
1255
- */
1256
- interface FootnoteReference extends Association, Node$1 {
1257
- /**
1258
- * Node type of mdast GFM footnote reference.
1259
- */
1260
- type: "footnoteReference";
1261
- /**
1262
- * Data associated with the mdast GFM footnote reference.
1263
- */
1264
- data?: FootnoteReferenceData | undefined;
1265
- }
1266
- /**
1267
- * Info associated with mdast GFM footnote reference nodes by the ecosystem.
1268
- */
1269
- interface FootnoteReferenceData extends Data {}
1270
- /**
1271
- * Markdown heading.
1272
- */
1273
- interface Heading extends Parent {
1274
- /**
1275
- * Node type of mdast heading.
1276
- */
1277
- type: "heading";
1278
- /**
1279
- * Heading rank.
1280
- *
1281
- * A value of `1` is said to be the highest rank and `6` the lowest.
1282
- */
1283
- depth: 1 | 2 | 3 | 4 | 5 | 6;
1284
- /**
1285
- * Children of heading.
1286
- */
1287
- children: PhrasingContent[];
1288
- /**
1289
- * Data associated with the mdast heading.
1290
- */
1291
- data?: HeadingData | undefined;
1292
- }
1293
- /**
1294
- * Info associated with mdast heading nodes by the ecosystem.
1295
- */
1296
- interface HeadingData extends Data {}
1297
- /**
1298
- * Markdown HTML.
1299
- */
1300
- interface Html extends Literal {
1301
- /**
1302
- * Node type of mdast HTML.
1303
- */
1304
- type: "html";
1305
- /**
1306
- * Data associated with the mdast HTML.
1307
- */
1308
- data?: HtmlData | undefined;
1309
- }
1310
- /**
1311
- * Info associated with mdast HTML nodes by the ecosystem.
1312
- */
1313
- interface HtmlData extends Data {}
1314
- /**
1315
- * Markdown image.
1316
- */
1317
- interface Image extends Alternative, Node$1, Resource {
1318
- /**
1319
- * Node type of mdast image.
1320
- */
1321
- type: "image";
1322
- /**
1323
- * Data associated with the mdast image.
1324
- */
1325
- data?: ImageData | undefined;
1326
- }
1327
- /**
1328
- * Info associated with mdast image nodes by the ecosystem.
1329
- */
1330
- interface ImageData extends Data {}
1331
- /**
1332
- * Markdown image reference.
1333
- */
1334
- interface ImageReference extends Alternative, Node$1, Reference {
1335
- /**
1336
- * Node type of mdast image reference.
1337
- */
1338
- type: "imageReference";
1339
- /**
1340
- * Data associated with the mdast image reference.
1341
- */
1342
- data?: ImageReferenceData | undefined;
1343
- }
1344
- /**
1345
- * Info associated with mdast image reference nodes by the ecosystem.
1346
- */
1347
- interface ImageReferenceData extends Data {}
1348
- /**
1349
- * Markdown code (text) (inline).
1350
- */
1351
- interface InlineCode extends Literal {
1352
- /**
1353
- * Node type of mdast code (text).
1354
- */
1355
- type: "inlineCode";
1356
- /**
1357
- * Data associated with the mdast code (text).
1358
- */
1359
- data?: InlineCodeData | undefined;
1360
- }
1361
- /**
1362
- * Info associated with mdast code (text) (inline) nodes by the ecosystem.
1363
- */
1364
- interface InlineCodeData extends Data {}
1365
- /**
1366
- * Markdown link.
1367
- */
1368
- interface Link extends Parent, Resource {
1369
- /**
1370
- * Node type of mdast link.
1371
- */
1372
- type: "link";
1373
- /**
1374
- * Children of link.
1375
- */
1376
- children: PhrasingContent[];
1377
- /**
1378
- * Data associated with the mdast link.
1379
- */
1380
- data?: LinkData | undefined;
1381
- }
1382
- /**
1383
- * Info associated with mdast link nodes by the ecosystem.
1384
- */
1385
- interface LinkData extends Data {}
1386
- /**
1387
- * Markdown link reference.
1388
- */
1389
- interface LinkReference extends Parent, Reference {
1390
- /**
1391
- * Node type of mdast link reference.
1392
- */
1393
- type: "linkReference";
1394
- /**
1395
- * Children of link reference.
1396
- */
1397
- children: PhrasingContent[];
1398
- /**
1399
- * Data associated with the mdast link reference.
1400
- */
1401
- data?: LinkReferenceData | undefined;
1402
- }
1403
- /**
1404
- * Info associated with mdast link reference nodes by the ecosystem.
1405
- */
1406
- interface LinkReferenceData extends Data {}
1407
- /**
1408
- * Markdown list.
1409
- */
1410
- interface List extends Parent {
1411
- /**
1412
- * Node type of mdast list.
1413
- */
1414
- type: "list";
1415
- /**
1416
- * Whether the items have been intentionally ordered (when `true`), or that
1417
- * the order of items is not important (when `false` or not present).
1418
- */
1419
- ordered?: boolean | null | undefined;
1420
- /**
1421
- * The starting number of the list, when the `ordered` field is `true`.
1422
- */
1423
- start?: number | null | undefined;
1424
- /**
1425
- * Whether one or more of the children are separated with a blank line from
1426
- * its siblings (when `true`), or not (when `false` or not present).
1427
- */
1428
- spread?: boolean | null | undefined;
1429
- /**
1430
- * Children of list.
1431
- */
1432
- children: ListContent[];
1433
- /**
1434
- * Data associated with the mdast list.
1435
- */
1436
- data?: ListData | undefined;
1437
- }
1438
- /**
1439
- * Info associated with mdast list nodes by the ecosystem.
1440
- */
1441
- interface ListData extends Data {}
1442
- /**
1443
- * Markdown list item.
1444
- */
1445
- interface ListItem extends Parent {
1446
- /**
1447
- * Node type of mdast list item.
1448
- */
1449
- type: "listItem";
1450
- /**
1451
- * Whether the item is a tasklist item (when `boolean`).
1452
- *
1453
- * When `true`, the item is complete.
1454
- * When `false`, the item is incomplete.
1455
- */
1456
- checked?: boolean | null | undefined;
1457
- /**
1458
- * Whether one or more of the children are separated with a blank line from
1459
- * its siblings (when `true`), or not (when `false` or not present).
1460
- */
1461
- spread?: boolean | null | undefined;
1462
- /**
1463
- * Children of list item.
1464
- */
1465
- children: Array<BlockContent | DefinitionContent>;
1466
- /**
1467
- * Data associated with the mdast list item.
1468
- */
1469
- data?: ListItemData | undefined;
1470
- }
1471
- /**
1472
- * Info associated with mdast list item nodes by the ecosystem.
1473
- */
1474
- interface ListItemData extends Data {}
1475
- /**
1476
- * Markdown paragraph.
1477
- */
1478
- interface Paragraph extends Parent {
1479
- /**
1480
- * Node type of mdast paragraph.
1481
- */
1482
- type: "paragraph";
1483
- /**
1484
- * Children of paragraph.
1485
- */
1486
- children: PhrasingContent[];
1487
- /**
1488
- * Data associated with the mdast paragraph.
1489
- */
1490
- data?: ParagraphData | undefined;
1491
- }
1492
- /**
1493
- * Info associated with mdast paragraph nodes by the ecosystem.
1494
- */
1495
- interface ParagraphData extends Data {}
1496
- /**
1497
- * Document fragment or a whole document.
1498
- *
1499
- * Should be used as the root of a tree and must not be used as a child.
1500
- */
1501
- interface Root extends Parent {
1502
- /**
1503
- * Node type of mdast root.
1504
- */
1505
- type: "root";
1506
- /**
1507
- * Data associated with the mdast root.
1508
- */
1509
- data?: RootData | undefined;
1510
- }
1511
- /**
1512
- * Info associated with mdast root nodes by the ecosystem.
1513
- */
1514
- interface RootData extends Data {}
1515
- /**
1516
- * Markdown strong.
1517
- */
1518
- interface Strong extends Parent {
1519
- /**
1520
- * Node type of mdast strong.
1521
- */
1522
- type: "strong";
1523
- /**
1524
- * Children of strong.
1525
- */
1526
- children: PhrasingContent[];
1527
- /**
1528
- * Data associated with the mdast strong.
1529
- */
1530
- data?: StrongData | undefined;
1531
- }
1532
- /**
1533
- * Info associated with mdast strong nodes by the ecosystem.
1534
- */
1535
- interface StrongData extends Data {}
1536
- /**
1537
- * Markdown GFM table.
1538
- */
1539
- interface Table extends Parent {
1540
- /**
1541
- * Node type of mdast GFM table.
1542
- */
1543
- type: "table";
1544
- /**
1545
- * How cells in columns are aligned.
1546
- */
1547
- align?: AlignType[] | null | undefined;
1548
- /**
1549
- * Children of GFM table.
1550
- */
1551
- children: TableContent[];
1552
- /**
1553
- * Data associated with the mdast GFM table.
1554
- */
1555
- data?: TableData | undefined;
1556
- }
1557
- /**
1558
- * Info associated with mdast GFM table nodes by the ecosystem.
1559
- */
1560
- interface TableData extends Data {}
1561
- /**
1562
- * Markdown GFM table row.
1563
- */
1564
- interface TableRow extends Parent {
1565
- /**
1566
- * Node type of mdast GFM table row.
1567
- */
1568
- type: "tableRow";
1569
- /**
1570
- * Children of GFM table row.
1571
- */
1572
- children: RowContent[];
1573
- /**
1574
- * Data associated with the mdast GFM table row.
1575
- */
1576
- data?: TableRowData | undefined;
1577
- }
1578
- /**
1579
- * Info associated with mdast GFM table row nodes by the ecosystem.
1580
- */
1581
- interface TableRowData extends Data {}
1582
- /**
1583
- * Markdown GFM table cell.
1584
- */
1585
- interface TableCell extends Parent {
1586
- /**
1587
- * Node type of mdast GFM table cell.
1588
- */
1589
- type: "tableCell";
1590
- /**
1591
- * Children of GFM table cell.
1592
- */
1593
- children: PhrasingContent[];
1594
- /**
1595
- * Data associated with the mdast GFM table cell.
1596
- */
1597
- data?: TableCellData | undefined;
1598
- }
1599
- /**
1600
- * Info associated with mdast GFM table cell nodes by the ecosystem.
1601
- */
1602
- interface TableCellData extends Data {}
1603
- /**
1604
- * Markdown text.
1605
- */
1606
- interface Text extends Literal {
1607
- /**
1608
- * Node type of mdast text.
1609
- */
1610
- type: "text";
1611
- /**
1612
- * Data associated with the mdast text.
1613
- */
1614
- data?: TextData | undefined;
1615
- }
1616
- /**
1617
- * Info associated with mdast text nodes by the ecosystem.
1618
- */
1619
- interface TextData extends Data {}
1620
- /**
1621
- * Markdown thematic break (horizontal rule).
1622
- */
1623
- interface ThematicBreak extends Node$1 {
1624
- /**
1625
- * Node type of mdast thematic break.
1626
- */
1627
- type: "thematicBreak";
1628
- /**
1629
- * Data associated with the mdast thematic break.
1630
- */
1631
- data?: ThematicBreakData | undefined;
1632
- }
1633
- /**
1634
- * Info associated with mdast thematic break nodes by the ecosystem.
1635
- */
1636
- interface ThematicBreakData extends Data {}
1637
- /**
1638
- * Markdown YAML.
1639
- */
1640
- interface Yaml extends Literal {
1641
- /**
1642
- * Node type of mdast YAML.
1643
- */
1644
- type: "yaml";
1645
- /**
1646
- * Data associated with the mdast YAML.
1647
- */
1648
- data?: YamlData | undefined;
1649
- }
1650
- /**
1651
- * Info associated with mdast YAML nodes by the ecosystem.
1652
- */
1653
- interface YamlData extends Data {}
1654
- //#endregion
1655
- //#region src/plugins/markdown/data-source/markdown/parse.d.ts
1656
- type MarkdownReadNode = INode | ITextNode | IElementNode;
1657
- type MarkdownNode = Root | RootContent | PhrasingContent;
1658
- type MarkdownReaderFunc<K> = (node: Extract<MarkdownNode, {
1659
- type: K;
1660
- }>, children: MarkdownReadNode[], index: number) => MarkdownReadNode | MarkdownReadNode[] | false;
1661
- type TransformerRecord = { [K in MarkdownNode['type']]?: MarkdownReaderFunc<K> | Array<MarkdownReaderFunc<K>> };
1662
- //#endregion
1663
- //#region src/plugins/markdown/service/transformers.d.ts
1664
- type TextFormatTransformer = Readonly<{
1665
- format?: ReadonlyArray<TextFormatType>;
1666
- intraword?: boolean;
1667
- process?: (selection: RangeSelection) => boolean | void;
1668
- tag: string;
1669
- type: 'text-format';
1670
- }>;
1671
- type TextMatchTransformer = Readonly<{
1672
- /**
1673
- * For import operations, this function can be used to determine the end index of the match, after `importRegExp` has matched.
1674
- * Without this function, the end index will be determined by the length of the match from `importRegExp`. Manually determining the end index can be useful if
1675
- * the match from `importRegExp` is not the entire text content of the node. That way, `importRegExp` can be used to match only the start of the node, and `getEndIndex`
1676
- * can be used to match the end of the node.
1677
- *
1678
- * @returns The end index of the match, or false if the match was unsuccessful and a different transformer should be tried.
1679
- */
1680
- getEndIndex?: (node: TextNode, match: RegExpMatchArray) => number | false;
1681
- /**
1682
- * This regex determines what text is matched during markdown imports
1683
- */
1684
- importRegExp?: RegExp;
1685
- /**
1686
- * This regex determines what text is matched for markdown shortcuts while typing in the editor
1687
- */
1688
- regExp: RegExp;
1689
- /**
1690
- * Determines how the matched markdown text should be transformed into a node during the markdown import process
1691
- *
1692
- * @returns nothing, or a TextNode that may be a child of the new node that is created.
1693
- * If a TextNode is returned, text format matching will be applied to it (e.g. bold, italic, etc.)
1694
- */
1695
- replace?: (node: TextNode, match: RegExpMatchArray) => void | TextNode;
1696
- /**
1697
- * Single character that allows the transformer to trigger when typed in the editor. This does not affect markdown imports outside of the markdown shortcut plugin.
1698
- * If the trigger is matched, the `regExp` will be used to match the text in the second step.
1699
- */
1700
- trigger?: string;
1701
- type: 'text-match';
1702
- }>;
1703
- type ElementTransformer = {
1704
- regExp: RegExp;
1705
- /**
1706
- * `replace` is called when markdown is imported or typed in the editor
1707
- *
1708
- * @return return false to cancel the transform, even though the regex matched. Lexical will then search for the next transformer.
1709
- */
1710
- replace: (parentNode: ElementNode, children: Array<LexicalNode>, match: Array<string>,
1711
- /**
1712
- * Whether the match is from an import operation (e.g. through `$convertFromMarkdownString`) or not (e.g. through typing in the editor).
1713
- */
1714
-
1715
- isImport: boolean) => boolean | void;
1716
- trigger?: 'enter';
1717
- type: 'element';
1718
- };
1719
- type Transformer = ElementTransformer | TextFormatTransformer | TextMatchTransformer;
1720
- //#endregion
1721
- //#region src/plugins/markdown/service/shortcut.d.ts
1722
- interface IMarkdownWriterContext {
1723
- /**
1724
- * Add processor
1725
- * @param processor
1726
- */
1727
- addProcessor(processor: (before: string, content: string, after: string) => string): void;
1728
- /**
1729
- * Direct output
1730
- * @param line
1731
- * @returns
1732
- */
1733
- appendLine: (line: string) => void;
1734
- /**
1735
- * Control child node to markdown
1736
- * @param parentCtx
1737
- * @param child
1738
- * @returns
1739
- */
1740
- processChild: (parentCtx: IMarkdownWriterContext, child: LexicalNode) => void;
1741
- /**
1742
- * Wrap child elements
1743
- * @param before
1744
- * @param after
1745
- * @returns
1746
- */
1747
- wrap: (before: string, after: string) => void;
1748
- }
1749
- declare const MARKDOWN_WRITER_LEVEL_MAX = 0;
1750
- declare const MARKDOWN_READER_LEVEL_HIGH = 1;
1751
- declare const MARKDOWN_READER_LEVEL_NORMAL = 2;
1752
- type MARKDOWN_READER_LEVEL = typeof MARKDOWN_READER_LEVEL_HIGH | typeof MARKDOWN_READER_LEVEL_NORMAL | typeof MARKDOWN_WRITER_LEVEL_MAX;
1753
- interface IMarkdownShortCutService {
1754
- insertIRootNode(editor: LexicalEditor, root: IRootNode, selection: BaseSelection): void;
1755
- parseMarkdownToLexical(markdown: string): IRootNode;
1756
- /**
1757
- * Register Markdown reader
1758
- */
1759
- registerMarkdownReader<K extends keyof TransformerRecord>(type: K, reader: MarkdownReaderFunc<K>, level?: MARKDOWN_READER_LEVEL): void;
1760
- registerMarkdownShortCut(transformer: Transformer): void;
1761
- registerMarkdownShortCuts(transformers: Transformer[]): void;
1762
- /**
1763
- * Register Markdown writer
1764
- * @param type Lexical Node type
1765
- * @param writer
1766
- */
1767
- registerMarkdownWriter(type: string, writer: (ctx: IMarkdownWriterContext, node: LexicalNode) => void | boolean): void;
1768
- }
1769
- declare const IMarkdownShortCutService: IServiceID<IMarkdownShortCutService>;
1770
- //#endregion
1771
- //#region src/plugins/content-blocks/types.d.ts
1772
- interface TextContentBlock {
1773
- text: string;
1774
- type: 'text';
1775
- }
1776
- interface ImageContentBlock {
1777
- alt: string;
1778
- height?: number;
1779
- type: 'image';
1780
- url: string;
1781
- width?: number;
1782
- }
1783
- interface FileContentBlock {
1784
- name: string;
1785
- size?: number;
1786
- type: 'file';
1787
- url: string;
1788
- }
1789
- type ContentBlock = TextContentBlock | ImageContentBlock | FileContentBlock;
1790
- interface ExtractContentBlocksOptions {
1791
- /**
1792
- * When an image/file is in `loading` / `pending` / `error` state and thus has no
1793
- * usable URL, emit a textual placeholder into the surrounding text block instead
1794
- * of dropping the node silently.
1795
- * @default true
1796
- */
1797
- emitPlaceholderForUnuploaded?: boolean;
1798
- }
1799
- declare const CONTENT_BLOCKS_DATA_TYPE = "content-blocks";
1800
- //#endregion
1801
- //#region src/plugins/content-blocks/data-source/content-blocks-data-source.d.ts
1802
- declare class ContentBlocksDataSource extends DataSource {
1803
- private getMarkdownService;
1804
- private defaultOptions;
1805
- constructor(getMarkdownService: () => IMarkdownShortCutService | null, defaultOptions?: ExtractContentBlocksOptions);
1806
- read(): void;
1807
- write(editor: LexicalEditor): ContentBlock[];
1808
- }
1809
- //#endregion
1810
- //#region src/plugins/content-blocks/plugin/index.d.ts
1811
- interface ContentBlocksPluginOptions {
1812
- defaultOptions?: ExtractContentBlocksOptions;
1813
- }
1814
- declare const ContentBlocksPlugin: IEditorPluginConstructor<ContentBlocksPluginOptions>;
1815
- //#endregion
1816
- //#region src/plugins/content-blocks/utils/extract.d.ts
1817
- declare const extractContentBlocks: (editor: LexicalEditor, service: IMarkdownShortCutService, options?: ExtractContentBlocksOptions) => ContentBlock[];
1818
- //#endregion
1819
- //#region src/plugins/content-blocks/utils/extract-media-lists.d.ts
1820
- declare const extractMediaLists: (blocks: ContentBlock[]) => MediaLists;
1821
- //#endregion
1822
- //#region src/plugins/file/command/index.d.ts
1823
- declare const INSERT_FILE_COMMAND: _$lexical.LexicalCommand<{
1824
- file: File;
1825
- }>;
1826
- //#endregion
1827
- //#region src/plugins/file/node/FileNode.d.ts
1828
- type SerializedFileNode = Spread<{
1829
- fileUrl?: string;
1830
- message?: string;
1831
- name: string;
1832
- size?: number;
1833
- status?: 'pending' | 'uploaded' | 'error';
1834
- }, SerializedLexicalNode>;
1835
- declare class FileNode extends DecoratorNode<any> {
1836
- static getType(): string;
1837
- static clone(node: FileNode): FileNode;
1838
- static importJSON(serializedNode: SerializedFileNode): FileNode;
1839
- static importDOM(): DOMConversionMap | null;
1840
- __name: string;
1841
- __fileUrl: string | undefined;
1842
- __size: number | undefined;
1843
- __status: 'pending' | 'uploaded' | 'error';
1844
- __message?: string;
1845
- get name(): string;
1846
- get fileUrl(): string | undefined;
1847
- get size(): number | undefined;
1848
- get status(): 'pending' | 'uploaded' | 'error';
1849
- get message(): string | undefined;
1850
- constructor(name: string, fileUrl?: string, size?: number, status?: 'pending' | 'uploaded' | 'error', message?: string, key?: string);
1851
- setUploaded(url: string): void;
1852
- setError(message: string): void;
1853
- exportDOM(): DOMExportOutput;
1854
- createDOM(config: EditorConfig): HTMLElement;
1855
- exportJSON(): SerializedFileNode;
1856
- updateFromJSON(serializedNode: LexicalUpdateJSON<SerializedFileNode>): this;
1857
- getTextContent(): string;
1858
- updateDOM(): boolean;
1859
- decorate(editor: LexicalEditor): any;
1860
- }
1861
- //#endregion
1862
- //#region src/plugins/file/plugin/index.d.ts
1863
- interface FilePluginOptions {
1864
- decorator: (node: FileNode, editor: LexicalEditor) => any;
1865
- handleUpload: (file: File) => Promise<{
1866
- url: string;
1867
- }>;
1868
- markdownWriter?: (file: FileNode) => string;
1869
- theme?: {
1870
- file?: string;
1871
- };
1872
- }
1873
- declare const FilePlugin: IEditorPluginConstructor<FilePluginOptions>;
1874
- //#endregion
1875
- //#region src/plugins/file/react/type.d.ts
1876
- interface ReactFilePluginProps {
1877
- className?: string;
1878
- handleUpload: (file: File) => Promise<{
1879
- url: string;
1880
- }>;
1881
- locale?: Partial<Record<keyof ILocaleKeys, string>>;
1882
- markdownWriter?: (file: FileNode) => string;
1883
- theme?: {
1884
- file?: string;
1885
- };
1886
- }
1887
- //#endregion
1888
- //#region src/plugins/file/react/ReactFilePlugin.d.ts
1889
- declare const ReactFilePlugin: FC<ReactFilePluginProps>;
1890
- //#endregion
1891
- //#region src/plugins/hr/command/index.d.ts
1892
- declare const INSERT_HORIZONTAL_RULE_COMMAND: _$lexical.LexicalCommand<unknown>;
1893
- //#endregion
1894
- //#region src/plugins/hr/node/HorizontalRuleNode.d.ts
1895
- type SerializedHorizontalRuleNode = SerializedLexicalNode;
1896
- declare class HorizontalRuleNode extends DecoratorNode<any> {
1897
- static getType(): string;
1898
- static clone(node: HorizontalRuleNode): HorizontalRuleNode;
1899
- static importJSON(serializedNode: SerializedHorizontalRuleNode): HorizontalRuleNode;
1900
- static importDOM(): DOMConversionMap | null;
1901
- exportDOM(): DOMExportOutput;
1902
- createDOM(config: EditorConfig): HTMLElement;
1903
- getTextContent(): string;
1904
- isInline(): false;
1905
- updateDOM(): boolean;
1906
- decorate(editor: LexicalEditor): any;
1907
- }
1908
- //#endregion
1909
- //#region src/plugins/hr/plugin/index.d.ts
1910
- interface HRPluginOptions {
1911
- decorator: (node: HorizontalRuleNode, editor: LexicalEditor) => any;
1912
- theme?: string;
1913
- }
1914
- declare const HRPlugin: IEditorPluginConstructor<HRPluginOptions>;
1915
- //#endregion
1916
- //#region src/plugins/hr/react/type.d.ts
1917
- interface ReactHRPluginProps {
1918
- className?: string;
1919
- }
1920
- //#endregion
1921
- //#region src/plugins/hr/react/ReactHRPlugin.d.ts
1922
- declare const ReactHRPlugin: FC<ReactHRPluginProps>;
1923
- //#endregion
1924
- //#region src/plugins/image/command/index.d.ts
1925
- declare const INSERT_IMAGE_COMMAND: _$lexical.LexicalCommand<{
1926
- block?: boolean;
1927
- file: File;
1928
- maxWidth?: number;
1929
- range?: Range | null;
1930
- }>;
1931
- //#endregion
1932
- //#region src/plugins/image/node/basie-image-node.d.ts
1933
- type SerializedImageNode = Spread<{
1934
- altText: string;
1935
- height?: number;
1936
- maxWidth: number;
1937
- src: string;
1938
- status?: 'uploaded' | 'loading' | 'error';
1939
- width?: number;
1940
- }, SerializedLexicalNode>;
1941
- declare class BaseImageNode extends DecoratorNode<any> {
1942
- __src: string;
1943
- __altText: string;
1944
- __width: 'inherit' | number;
1945
- __height: 'inherit' | number;
1946
- __maxWidth: number;
1947
- static clone(node: BaseImageNode): BaseImageNode;
1948
- static importJSON(serializedNode: SerializedImageNode): BaseImageNode;
1949
- static getType(): string;
1950
- updateFromJSON(serializedNode: LexicalUpdateJSON<SerializedImageNode>): this;
1951
- exportDOM(): DOMExportOutput;
1952
- constructor(src: string, altText: string, maxWidth: number, width?: 'inherit' | number, height?: 'inherit' | number, key?: NodeKey);
1953
- exportJSON(): SerializedImageNode;
1954
- setWidthAndHeight(width: 'inherit' | number, height: 'inherit' | number): void;
1955
- isInline(): boolean;
1956
- createDOM(config: EditorConfig): HTMLElement;
1957
- updateDOM(): false;
1958
- getSrc(): string;
1959
- getAltText(): string;
1960
- }
1961
- //#endregion
1962
- //#region src/plugins/image/node/block-image-node.d.ts
1963
- declare class BlockImageNode extends BaseImageNode {
1964
- private static _decorate;
1965
- static setDecorate(decorate: (node: BlockImageNode) => any): void;
1966
- static getType(): string;
1967
- private __loading;
1968
- private __status;
1969
- private __message;
1970
- private __extra;
1971
- get isLoading(): boolean;
1972
- get status(): 'uploaded' | 'loading' | 'error';
1973
- get message(): string | null;
1974
- get src(): string;
1975
- get altText(): string;
1976
- get maxWidth(): number;
1977
- get width(): number | string;
1978
- get height(): number | string;
1979
- constructor(opt: {
1980
- altText: string;
1981
- height?: 'inherit' | number;
1982
- key?: NodeKey;
1983
- maxWidth: number;
1984
- src: string;
1985
- status?: 'uploaded' | 'loading' | 'error';
1986
- width?: 'inherit' | number;
1987
- });
1988
- isInline(): boolean;
1989
- setMaxWidth(maxWidth: number): void;
1990
- setWidth(width: number): void;
1991
- setStatus(status: 'uploaded' | 'loading' | 'error'): void;
1992
- setUploaded(url: string): void;
1993
- setError(message: string): void;
1994
- static clone(node: BlockImageNode): BlockImageNode;
1995
- static importJSON(serializedNode: SerializedImageNode): BlockImageNode;
1996
- static importDOM(): DOMConversionMap | null;
1997
- decorate(): any;
1998
- createDOM(config: EditorConfig): HTMLElement;
1999
- }
2000
- //#endregion
2001
- //#region src/plugins/image/node/image-node.d.ts
2002
- declare class ImageNode extends BaseImageNode {
2003
- private static _decorate;
2004
- static setDecorate(decorate: (node: ImageNode) => any): void;
2005
- static getType(): string;
2006
- private __loading;
2007
- private __status;
2008
- private __message;
2009
- private __extra;
2010
- constructor(opt: {
2011
- altText: string;
2012
- height?: 'inherit' | number;
2013
- key?: NodeKey;
2014
- maxWidth: number;
2015
- src: string;
2016
- status?: 'uploaded' | 'loading' | 'error';
2017
- width?: 'inherit' | number;
2018
- });
2019
- get isLoading(): boolean;
2020
- get status(): 'uploaded' | 'loading' | 'error';
2021
- get message(): string | null;
2022
- get src(): string;
2023
- get altText(): string;
2024
- get maxWidth(): number;
2025
- get width(): number | string;
2026
- get height(): number | string;
2027
- setMaxWidth(maxWidth: number): void;
2028
- setStatus(status: 'uploaded' | 'loading' | 'error'): void;
2029
- setWidth(width: number): void;
2030
- setUploaded(url: string): void;
2031
- setError(message: string): void;
2032
- static clone(node: ImageNode): ImageNode;
2033
- static importJSON(serializedNode: SerializedImageNode): ImageNode;
2034
- static importDOM(): DOMConversionMap | null;
2035
- decorate(): any;
2036
- }
2037
- //#endregion
2038
- //#region src/plugins/image/plugin/index.d.ts
2039
- interface ImagePluginOptions {
2040
- defaultBlockImage?: boolean;
2041
- handleRehost?: (url: string) => Promise<{
2042
- url: string;
2043
- }>;
2044
- handleUpload: (file: File) => Promise<{
2045
- url: string;
2046
- }>;
2047
- needRehost?: (url: string) => boolean;
2048
- renderImage: (node: ImageNode | BlockImageNode) => JSX.Element | null;
2049
- theme?: {
2050
- blockImage?: string;
2051
- image?: string;
2052
- };
2053
- }
2054
- declare const ImagePlugin: IEditorPluginConstructor<ImagePluginOptions>;
2055
- //#endregion
2056
- //#region src/plugins/image/react/type.d.ts
2057
- interface ReactImagePluginProps {
2058
- className?: string;
2059
- defaultBlockImage?: boolean;
2060
- handleRehost?: (url: string) => Promise<{
2061
- url: string;
2062
- }>;
2063
- handleUpload?: (file: File) => Promise<{
2064
- url: string;
2065
- }>;
2066
- needRehost?: (url: string) => boolean;
2067
- /**
2068
- * Custom file picker for environments where programmatic input.click() is blocked (e.g. Electron).
2069
- * When provided, this will be called instead of triggering the hidden file input.
2070
- */
2071
- onPickFile?: () => Promise<File | null>;
2072
- theme?: {
2073
- blockImage?: string;
2074
- image?: string;
2075
- };
2076
- }
2077
- //#endregion
2078
- //#region src/plugins/image/react/ReactImagePlugin.d.ts
2079
- declare const ReactImagePlugin: FC<ReactImagePluginProps>;
2080
- //#endregion
2081
- //#region src/plugins/inode/plugin/index.d.ts
2082
- /**
2083
- * NodePluginOptions - Configuration options for the Node plugin
2084
- */
2085
- interface INodePluginOptions {
2086
- /**
2087
- * Enable or disable the node data source
2088
- * @default true
2089
- */
2090
- enabled?: boolean;
2091
- }
2092
- /**
2093
- * LitexmlPlugin - A plugin that provides XML-based data source support
2094
- * Allows converting between Lexical editor state and XML format
2095
- */
2096
- declare const INodePlugin: IEditorPluginConstructor<INodePluginOptions>;
2097
- //#endregion
2098
- //#region src/plugins/inode/react/index.d.ts
2099
- declare const ReactNodePlugin: FC<void>;
2100
- //#endregion
2101
- //#region src/plugins/inode/service/index.d.ts
2102
- interface INodeService {
2103
- processNodeTree(inode: {
2104
- root: IRootNode;
2105
- }): void;
2106
- registerProcessNodeTree(process: (inode: {
2107
- root: IRootNode;
2108
- }) => void): void;
2109
- }
2110
- /**
2111
- * Service ID for Node service
2112
- */
2113
- declare const INodeService: IServiceID<INodeService>;
2114
- //#endregion
2115
- //#region src/plugins/link/command/index.d.ts
2116
- declare const INSERT_LINK_COMMAND: _$lexical.LexicalCommand<{
2117
- title?: string;
2118
- url?: string;
2119
- }>;
2120
- //#endregion
2121
- //#region src/plugins/link/node/LinkNode.d.ts
2122
- type LinkAttributes = {
2123
- rel?: null | string;
2124
- target?: null | string;
2125
- title?: null | string;
2126
- };
2127
- //#endregion
2128
- //#region src/plugins/link/plugin/index.d.ts
2129
- interface LinkPluginOptions {
2130
- attributes?: LinkAttributes;
2131
- enableHotkey?: boolean;
2132
- linkRegex?: RegExp;
2133
- theme?: {
2134
- link?: string;
2135
- };
2136
- validateUrl?: (url: string) => boolean;
2137
- }
2138
- declare const LinkPlugin: IEditorPluginConstructor<LinkPluginOptions>;
2139
- //#endregion
2140
- //#region src/plugins/link/react/type.d.ts
2141
- interface ReactLinkPluginProps {
2142
- attributes?: LinkAttributes;
2143
- className?: string;
2144
- enableHotkey?: boolean;
2145
- theme?: {
2146
- link?: string;
2147
- };
2148
- validateUrl?: (url: string) => boolean;
2149
- }
2150
- //#endregion
2151
- //#region src/plugins/link/react/ReactLinkPlugin.d.ts
2152
- declare const ReactLinkPlugin: FC<ReactLinkPluginProps>;
2153
- //#endregion
2154
- //#region src/plugins/link/service/i-link-service.d.ts
2155
- interface ILinkService {
2156
- setLinkToolbar(enable: boolean): void;
2157
- }
2158
- declare const ILinkService: IServiceID<ILinkService>;
2159
- //#endregion
2160
- //#region src/plugins/link-highlight/command/index.d.ts
2161
- declare const INSERT_LINK_HIGHLIGHT_COMMAND: _$lexical.LexicalCommand<undefined>;
2162
- declare function registerLinkHighlightCommand(editor: LexicalEditor): () => void;
2163
- //#endregion
2164
- //#region src/plugins/link-highlight/plugin/index.d.ts
2165
- interface LinkHighlightPluginOptions {
2166
- enableHotkey?: boolean;
2167
- /**
2168
- * Enable auto-highlight when pasting URLs
2169
- * @default true
2170
- */
2171
- enablePasteAutoHighlight?: boolean;
2172
- theme?: string;
2173
- /**
2174
- * Custom URL validation regex
2175
- */
2176
- urlRegex?: RegExp;
2177
- }
2178
- declare const LinkHighlightPlugin: IEditorPluginConstructor<LinkHighlightPluginOptions>;
2179
- //#endregion
2180
- //#region src/plugins/link-highlight/react/type.d.ts
2181
- interface ReactLinkHighlightPluginProps {
2182
- className?: string;
2183
- /**
2184
- * Enable keyboard shortcut (Ctrl+K / Cmd+K)
2185
- * @default true
2186
- */
2187
- enableHotkey?: boolean;
2188
- /**
2189
- * Enable auto-highlight when pasting URLs
2190
- * @default true
2191
- */
2192
- enablePasteAutoHighlight?: boolean;
2193
- }
2194
- //#endregion
2195
- //#region src/plugins/link-highlight/react/ReactLinkHighlightPlugin.d.ts
2196
- declare const ReactLinkHighlightPlugin: FC<ReactLinkHighlightPluginProps>;
2197
- //#endregion
2198
- //#region src/plugins/list/plugin/checkList.d.ts
2199
- declare const INSERT_CHECK_LIST_COMMAND: LexicalCommand<void>;
2200
- //#endregion
2201
- //#region src/plugins/list/plugin/index.d.ts
2202
- interface ListPluginOptions {
2203
- enableHotkey?: boolean;
2204
- theme?: string;
2205
- }
2206
- declare const ListPlugin: IEditorPluginConstructor<ListPluginOptions>;
2207
- //#endregion
2208
- //#region src/plugins/list/react/type.d.ts
2209
- interface ReactListPluginProps {
2210
- className?: string;
2211
- enableHotkey?: boolean;
2212
- }
2213
- //#endregion
2214
- //#region src/plugins/list/react/ReactListPlugin.d.ts
2215
- declare const ReactListPlugin: FC<ReactListPluginProps>;
2216
- //#endregion
2217
- //#region src/plugins/litexml/command/diffCommand.d.ts
2218
- declare enum DiffAction {
2219
- Reject = 0,
2220
- Accept = 1
2221
- }
2222
- declare const LITEXML_DIFFNODE_COMMAND: _$lexical.LexicalCommand<{
2223
- action: DiffAction;
2224
- nodeKey: string;
2225
- }>;
2226
- declare const LITEXML_DIFFNODE_ALL_COMMAND: _$lexical.LexicalCommand<{
2227
- action: DiffAction;
2228
- }>;
2229
- //#endregion
2230
- //#region src/plugins/litexml/node/DiffNode.d.ts
2231
- type DiffType = 'add' | 'remove' | 'modify' | 'unchanged' | 'listItemModify' | 'listItemRemove' | 'listItemAdd';
2232
- type SerializedDiffNode = Spread<{
2233
- diffType: DiffType;
2234
- }, SerializedElementNode>;
2235
- /** DiffNode - contains two block children: original and modified */
2236
- declare class DiffNode extends CardLikeElementNode {
2237
- static getType(): string;
2238
- static clone(node: DiffNode): DiffNode;
2239
- static importJSON(serializedNode: SerializedDiffNode): DiffNode;
2240
- static importDOM(): null;
2241
- private __diffType;
2242
- constructor(type: DiffType, key?: string);
2243
- get diffType(): DiffType;
2244
- setDiffType(type: DiffType): this;
2245
- updateFromJSON(serializedNode: LexicalUpdateJSON<SerializedDiffNode>): this;
2246
- exportJSON(): SerializedDiffNode;
2247
- exportDOM(editor: LexicalEditor): DOMExportOutput;
2248
- createDOM(config: EditorConfig, editor: LexicalEditor): HTMLDivElement;
2249
- updateDOM(_prevNode: unknown, _dom: HTMLElement, _config: EditorConfig): boolean;
2250
- getDOMSlot(element: HTMLElement): ElementDOMSlot<HTMLElement>;
2251
- isInline(): boolean;
2252
- isCardLike(): boolean;
2253
- }
2254
- //#endregion
2255
- //#region src/plugins/litexml/plugin/index.d.ts
2256
- /**
2257
- * LitexmlPluginOptions - Configuration options for the Litexml plugin
2258
- */
2259
- interface LitexmlPluginOptions {
2260
- decorator: (node: DiffNode, editor: LexicalEditor) => any;
2261
- /**
2262
- * Enable or disable the litexml data source
2263
- * @default true
2264
- */
2265
- enabled?: boolean;
2266
- theme?: string;
2267
- }
2268
- /**
2269
- * LitexmlPlugin - A plugin that provides XML-based data source support
2270
- * Allows converting between Lexical editor state and XML format
2271
- */
2272
- declare const LitexmlPlugin: IEditorPluginConstructor<LitexmlPluginOptions>;
2273
- //#endregion
2274
- //#region src/plugins/litexml/react/index.d.ts
2275
- declare const ReactLiteXmlPlugin: FC<void>;
2276
- //#endregion
2277
- //#region src/plugins/litexml/react/hooks/useHasDiffNode.d.ts
2278
- declare function useHasDiffNode(editor?: IEditor): {
2279
- hasDiff: boolean;
2280
- };
2281
- //#endregion
2282
- //#region src/plugins/markdown/command/index.d.ts
2283
- declare const INSERT_MARKDOWN_COMMAND: _$lexical.LexicalCommand<{
2284
- historyState: HistoryStateEntry | null;
2285
- markdown: string;
2286
- }>;
2287
- declare const GET_MARKDOWN_SELECTION_COMMAND: _$lexical.LexicalCommand<{
2288
- onResult: (startLine: number, endLine: number) => void;
2289
- }>;
2290
- //#endregion
2291
- //#region src/plugins/markdown/plugin/index.d.ts
2292
- interface MarkdownPluginOptions {
2293
- /**
2294
- * Automatically convert pasted markdown once the detection threshold is reached
2295
- * @default true
2296
- */
2297
- autoFormatMarkdown?: boolean;
2298
- /**
2299
- * Enable automatic markdown conversion for pasted content
2300
- * @default true
2301
- */
2302
- enablePasteMarkdown?: boolean;
2303
- /**
2304
- * Minimum markdown score required before auto conversion runs
2305
- * @default 5
2306
- */
2307
- pasteMarkdownAutoConvertThreshold?: number;
2308
- }
2309
- declare const MarkdownPlugin: IEditorPluginConstructor<MarkdownPluginOptions>;
2310
- //#endregion
2311
- //#region src/plugins/markdown/react/index.d.ts
2312
- declare const ReactMarkdownPlugin: FC<void>;
2313
- //#endregion
2314
- //#region src/plugins/markdown/utils/index.d.ts
2315
- /**
2316
- * Checks if a character is a punctuation character.
2317
- * @param char The character to check.
2318
- * @returns True if the character is a punctuation character, false otherwise.
2319
- */
2320
- declare function isPunctuationChar(char: string): boolean;
2321
- //#endregion
2322
- //#region src/plugins/markdown/utils/detectLanguage.d.ts
2323
- /**
2324
- * Language detection utility for code snippets
2325
- * Uses pattern matching and heuristics to identify programming languages
2326
- */
2327
- interface LanguageDetectionResult {
2328
- confidence: number;
2329
- language: string;
2330
- }
2331
- /**
2332
- * Detect the programming language of a code snippet
2333
- * @param code - The code snippet to analyze
2334
- * @returns Language detection result with confidence score
2335
- */
2336
- declare function detectLanguage(code: string): LanguageDetectionResult | null;
2337
- /**
2338
- * Simple detection for common formats with high confidence
2339
- * Falls back to detectLanguage for more complex detection
2340
- */
2341
- declare function detectCodeLanguage(code: string): string | null;
2342
- //#endregion
2343
- //#region src/utils/url.d.ts
2344
- /**
2345
- * Shared URL validation utilities
2346
- */
2347
- /**
2348
- * Validates if a string is a valid URL
2349
- * @param url - The URL to validate
2350
- * @returns true if the URL is valid, false otherwise
2351
- */
2352
- declare function isValidUrl(url: string): boolean;
2353
- /**
2354
- * Checks if text is a pure URL (single URL without other text)
2355
- * @param text - The text to check
2356
- * @returns true if text is a pure URL, false otherwise
2357
- */
2358
- declare function isPureUrl(text: string): boolean;
2359
- //#endregion
2360
- //#region src/plugins/math/command/index.d.ts
2361
- declare const INSERT_MATH_COMMAND: _$lexical.LexicalCommand<{
2362
- code: string;
2363
- }>;
2364
- //#endregion
2365
- //#region src/plugins/math/node/index.d.ts
2366
- type SerializedMathInlineNode = Spread<{
2367
- code: string;
2368
- }, SerializedLexicalNode>;
2369
- declare class MathInlineNode extends DecoratorNode<unknown> {
2370
- static getType(): string;
2371
- static clone(node: MathInlineNode): MathInlineNode;
2372
- static importJSON(serializedNode: SerializedMathInlineNode): MathInlineNode;
2373
- static importDOM(): DOMConversionMap | null;
2374
- __code: string;
2375
- constructor(code?: string, key?: string);
2376
- get code(): string;
2377
- updateCode(newCode: string): void;
2378
- exportDOM(): DOMExportOutput;
2379
- createDOM(config: EditorConfig): HTMLElement;
2380
- exportJSON(): SerializedMathInlineNode;
2381
- updateFromJSON(serializedNode: LexicalUpdateJSON<SerializedMathInlineNode>): this;
2382
- getTextContent(): string;
2383
- isInline(): boolean;
2384
- updateDOM(): boolean;
2385
- decorate(editor: LexicalEditor): unknown;
2386
- }
2387
- declare class MathBlockNode extends DecoratorNode<unknown> {
2388
- static getType(): string;
2389
- static clone(node: MathBlockNode): MathBlockNode;
2390
- static importJSON(serializedNode: SerializedMathInlineNode): MathBlockNode;
2391
- static importDOM(): DOMConversionMap | null;
2392
- __code: string;
2393
- constructor(code?: string, key?: string);
2394
- get code(): string;
2395
- updateCode(newCode: string): void;
2396
- exportDOM(): DOMExportOutput;
2397
- createDOM(config: EditorConfig): HTMLElement;
2398
- exportJSON(): SerializedMathInlineNode;
2399
- updateFromJSON(serializedNode: LexicalUpdateJSON<SerializedMathInlineNode>): this;
2400
- getTextContent(): string;
2401
- isInline(): boolean;
2402
- updateDOM(): boolean;
2403
- decorate(editor: LexicalEditor): unknown;
2404
- }
2405
- //#endregion
2406
- //#region src/plugins/math/plugin/index.d.ts
2407
- interface MathPluginOptions {
2408
- decorator: (node: MathInlineNode | MathBlockNode, editor: LexicalEditor) => unknown;
2409
- theme?: {
2410
- mathBlock?: string;
2411
- mathInline?: string;
2412
- };
2413
- }
2414
- declare const MathPlugin: IEditorPluginConstructor<MathPluginOptions>;
2415
- //#endregion
2416
- //#region src/plugins/math/react/type.d.ts
2417
- interface ReactMathPluginProps {
2418
- className?: string;
2419
- /** 自定义渲染组件,接收 MathEditorContent 作为子节点 */
2420
- renderComp?: FC<{
2421
- children: ReactNode;
2422
- open?: boolean;
2423
- }>;
2424
- theme?: {
2425
- mathBlock?: string;
2426
- mathInline?: string;
2427
- };
2428
- }
2429
- //#endregion
2430
- //#region src/plugins/math/react/index.d.ts
2431
- declare const ReactMathPlugin: FC<ReactMathPluginProps>;
2432
- //#endregion
2433
- //#region src/plugins/mention/command/index.d.ts
2434
- declare const INSERT_MENTION_COMMAND: _$lexical.LexicalCommand<{
2435
- label: string;
2436
- metadata?: Record<string, unknown>;
2437
- }>;
2438
- //#endregion
2439
- //#region src/plugins/mention/plugin/index.d.ts
2440
- interface MentionPluginOptions {
2441
- decorator: (node: MentionNode, editor: LexicalEditor) => any;
2442
- markdownReader?: (node: Html, children: INode[]) => SerializedMentionNode | null | false;
2443
- markdownWriter?: (mention: MentionNode) => string;
2444
- theme?: {
2445
- mention?: string;
2446
- };
2447
- }
2448
- declare const MentionPlugin: IEditorPluginConstructor<MentionPluginOptions>;
2449
- //#endregion
2450
- //#region src/plugins/table/command/index.d.ts
2451
- declare const INSERT_TABLE_COMMAND: _$lexical.LexicalCommand<{
2452
- columns: string;
2453
- includeHeaders?: InsertTableCommandPayloadHeaders;
2454
- rows: string;
2455
- }>;
2456
- declare const SELECT_TABLE_COMMAND: _$lexical.LexicalCommand<{
2457
- columnIndex?: number;
2458
- rowIndex?: number;
2459
- table: string;
2460
- }>;
2461
- //#endregion
2462
- //#region src/plugins/table/plugin/index.d.ts
2463
- interface TablePluginOptions {
2464
- theme?: string;
2465
- }
2466
- declare const TablePlugin: IEditorPluginConstructor<TablePluginOptions>;
2467
- //#endregion
2468
- //#region src/plugins/table/react/type.d.ts
2469
- interface ReactTablePluginProps {
2470
- className?: string;
2471
- locale?: Partial<Record<keyof ILocaleKeys, string>>;
2472
- }
2473
- //#endregion
2474
- //#region src/plugins/table/react/index.d.ts
2475
- declare const ReactTablePlugin: FC<ReactTablePluginProps>;
2476
- //#endregion
2477
- //#region src/plugins/toolbar/command/index.d.ts
2478
- declare const HIDE_TOOLBAR_COMMAND: LexicalCommand<void>;
2479
- declare const SHOW_TOOLBAR_COMMAND: LexicalCommand<void>;
2480
- interface ToolbarCommandOptions {
2481
- onHide?: () => void;
2482
- onShow?: () => void;
2483
- }
2484
- declare function registerToolbarCommand(editor: LexicalEditor, options?: ToolbarCommandOptions): () => void;
2485
- //#endregion
2486
- //#region src/plugins/toolbar/react/type.d.ts
2487
- interface ReactToolbarPluginProps {
2488
- children?: ReactNode;
2489
- className?: string;
2490
- }
2491
- //#endregion
2492
- //#region src/plugins/toolbar/react/index.d.ts
2493
- declare const ReactToolbarPlugin: FC<ReactToolbarPluginProps>;
2494
- //#endregion
2495
- //#region src/plugins/upload/plugin/index.d.ts
2496
- interface UploadPluginOptions {}
2497
- declare const UploadPlugin: IEditorPluginConstructor<UploadPluginOptions>;
2498
- //#endregion
2499
- //#region src/plugins/upload/service/i-upload-service.d.ts
2500
- declare const UPLOAD_PRIORITY_LOW = 2;
2501
- declare const UPLOAD_PRIORITY_MEDIUM = 1;
2502
- declare const UPLOAD_PRIORITY_HIGH = 0;
2503
- type UPLOAD_PRIORITY = typeof UPLOAD_PRIORITY_LOW | typeof UPLOAD_PRIORITY_MEDIUM | typeof UPLOAD_PRIORITY_HIGH;
2504
- interface IUploadService {
2505
- registerUpload(handler: (file: File, from: string, range: Range | null | undefined) => Promise<boolean | null>, priority?: UPLOAD_PRIORITY): void;
2506
- uploadFile(file: File, from: string, range: Range | null | undefined): Promise<boolean>;
2507
- }
2508
- declare const IUploadService: IServiceID<IUploadService>;
2509
- //#endregion
2510
- //#region src/plugins/virtual-block/plugin/index.d.ts
2511
- interface VirtualBlockPluginOptions {
2512
- theme?: string;
2513
- }
2514
- declare const VirtualBlockPlugin: IEditorPluginConstructor<VirtualBlockPluginOptions>;
2515
- //#endregion
2516
- //#region src/plugins/virtual-block/react/ReactVirtualBlock.d.ts
2517
- declare const ReactVirtualBlockPlugin: FC;
2518
- //#endregion
2519
- //#region src/utils/debug.d.ts
2520
- /**
2521
- * Debug utility factory for LobeHub Editor
2522
- * Creates namespaced debug functions following the pattern: lobe-editor:category
2523
- */
2524
- declare class DebugLogger {
2525
- private debuggers;
2526
- /**
2527
- * Get or create a debug function for a specific namespace
2528
- * @param category - The debug category (e.g., 'kernel', 'plugin', 'upload')
2529
- * @param subcategory - Optional subcategory for more specific debugging
2530
- * @returns Debug function
2531
- */
2532
- getDebugger(category: string, subcategory?: string): createDebug.Debugger;
2533
- /**
2534
- * Create a scoped debug logger for a specific component/service
2535
- * @param category - Main category
2536
- * @param subcategory - Optional subcategory
2537
- * @returns Object with debug methods
2538
- */
2539
- createLogger(category: string, subcategory?: string): {
2540
- /**
2541
- * General debug logging
2542
- */
2543
- debug: createDebug.Debugger;
2544
- /**
2545
- * Error level logging - uses console.error for proper browser dev tool support
2546
- */
2547
- error: (...args: any[]) => void;
2548
- /**
2549
- * Info level logging
2550
- */
2551
- info: createDebug.Debugger;
2552
- /**
2553
- * Log function - alias for debug for compatibility
2554
- */
2555
- log: createDebug.Debugger;
2556
- /**
2557
- * Warning level logging - uses console.warn for proper browser dev tool support
2558
- */
2559
- warn: (...args: any[]) => void;
2560
- };
2561
- /**
2562
- * Enable debug for specific namespaces
2563
- * @param namespaces - Comma-separated list of namespaces to enable
2564
- */
2565
- enable(namespaces: string): void;
2566
- /**
2567
- * Disable all debug output
2568
- */
2569
- disable(): void;
2570
- /**
2571
- * Check if a namespace is enabled
2572
- * @param namespace - The namespace to check
2573
- * @returns Whether the namespace is enabled
2574
- */
2575
- enabled(namespace: string): boolean;
2576
- }
2577
- /**
2578
- * Global debug logger instance
2579
- */
2580
- declare const debugLogger: DebugLogger;
2581
- /**
2582
- * Convenience function to create a debug logger for a specific category
2583
- * @param category - Main category (e.g., 'kernel', 'plugin', 'upload')
2584
- * @param subcategory - Optional subcategory
2585
- * @returns Logger object with debug methods
2586
- */
2587
- declare function createDebugLogger(category: string, subcategory?: string): {
2588
- /**
2589
- * General debug logging
2590
- */
2591
- debug: createDebug.Debugger;
2592
- /**
2593
- * Error level logging - uses console.error for proper browser dev tool support
2594
- */
2595
- error: (...args: any[]) => void;
2596
- /**
2597
- * Info level logging
2598
- */
2599
- info: createDebug.Debugger;
2600
- /**
2601
- * Log function - alias for debug for compatibility
2602
- */
2603
- log: createDebug.Debugger;
2604
- /**
2605
- * Warning level logging - uses console.warn for proper browser dev tool support
2606
- */
2607
- warn: (...args: any[]) => void;
2608
- };
2609
- /**
2610
- * Pre-configured debug loggers for common categories
2611
- */
2612
- declare const debugLoggers: {
2613
- demo: {
2614
- /**
2615
- * General debug logging
2616
- */
2617
- debug: createDebug.Debugger;
2618
- /**
2619
- * Error level logging - uses console.error for proper browser dev tool support
2620
- */
2621
- error: (...args: any[]) => void;
2622
- /**
2623
- * Info level logging
2624
- */
2625
- info: createDebug.Debugger;
2626
- /**
2627
- * Log function - alias for debug for compatibility
2628
- */
2629
- log: createDebug.Debugger;
2630
- /**
2631
- * Warning level logging - uses console.warn for proper browser dev tool support
2632
- */
2633
- warn: (...args: any[]) => void;
2634
- };
2635
- file: {
2636
- /**
2637
- * General debug logging
2638
- */
2639
- debug: createDebug.Debugger;
2640
- /**
2641
- * Error level logging - uses console.error for proper browser dev tool support
2642
- */
2643
- error: (...args: any[]) => void;
2644
- /**
2645
- * Info level logging
2646
- */
2647
- info: createDebug.Debugger;
2648
- /**
2649
- * Log function - alias for debug for compatibility
2650
- */
2651
- log: createDebug.Debugger;
2652
- /**
2653
- * Warning level logging - uses console.warn for proper browser dev tool support
2654
- */
2655
- warn: (...args: any[]) => void;
2656
- };
2657
- image: {
2658
- /**
2659
- * General debug logging
2660
- */
2661
- debug: createDebug.Debugger;
2662
- /**
2663
- * Error level logging - uses console.error for proper browser dev tool support
2664
- */
2665
- error: (...args: any[]) => void;
2666
- /**
2667
- * Info level logging
2668
- */
2669
- info: createDebug.Debugger;
2670
- /**
2671
- * Log function - alias for debug for compatibility
2672
- */
2673
- log: createDebug.Debugger;
2674
- /**
2675
- * Warning level logging - uses console.warn for proper browser dev tool support
2676
- */
2677
- warn: (...args: any[]) => void;
2678
- };
2679
- kernel: {
2680
- /**
2681
- * General debug logging
2682
- */
2683
- debug: createDebug.Debugger;
2684
- /**
2685
- * Error level logging - uses console.error for proper browser dev tool support
2686
- */
2687
- error: (...args: any[]) => void;
2688
- /**
2689
- * Info level logging
2690
- */
2691
- info: createDebug.Debugger;
2692
- /**
2693
- * Log function - alias for debug for compatibility
2694
- */
2695
- log: createDebug.Debugger;
2696
- /**
2697
- * Warning level logging - uses console.warn for proper browser dev tool support
2698
- */
2699
- warn: (...args: any[]) => void;
2700
- };
2701
- markdown: {
2702
- /**
2703
- * General debug logging
2704
- */
2705
- debug: createDebug.Debugger;
2706
- /**
2707
- * Error level logging - uses console.error for proper browser dev tool support
2708
- */
2709
- error: (...args: any[]) => void;
2710
- /**
2711
- * Info level logging
2712
- */
2713
- info: createDebug.Debugger;
2714
- /**
2715
- * Log function - alias for debug for compatibility
2716
- */
2717
- log: createDebug.Debugger;
2718
- /**
2719
- * Warning level logging - uses console.warn for proper browser dev tool support
2720
- */
2721
- warn: (...args: any[]) => void;
2722
- };
2723
- math: {
2724
- /**
2725
- * General debug logging
2726
- */
2727
- debug: createDebug.Debugger;
2728
- /**
2729
- * Error level logging - uses console.error for proper browser dev tool support
2730
- */
2731
- error: (...args: any[]) => void;
2732
- /**
2733
- * Info level logging
2734
- */
2735
- info: createDebug.Debugger;
2736
- /**
2737
- * Log function - alias for debug for compatibility
2738
- */
2739
- log: createDebug.Debugger;
2740
- /**
2741
- * Warning level logging - uses console.warn for proper browser dev tool support
2742
- */
2743
- warn: (...args: any[]) => void;
2744
- };
2745
- mention: {
2746
- /**
2747
- * General debug logging
2748
- */
2749
- debug: createDebug.Debugger;
2750
- /**
2751
- * Error level logging - uses console.error for proper browser dev tool support
2752
- */
2753
- error: (...args: any[]) => void;
2754
- /**
2755
- * Info level logging
2756
- */
2757
- info: createDebug.Debugger;
2758
- /**
2759
- * Log function - alias for debug for compatibility
2760
- */
2761
- log: createDebug.Debugger;
2762
- /**
2763
- * Warning level logging - uses console.warn for proper browser dev tool support
2764
- */
2765
- warn: (...args: any[]) => void;
2766
- };
2767
- plugin: {
2768
- /**
2769
- * General debug logging
2770
- */
2771
- debug: createDebug.Debugger;
2772
- /**
2773
- * Error level logging - uses console.error for proper browser dev tool support
2774
- */
2775
- error: (...args: any[]) => void;
2776
- /**
2777
- * Info level logging
2778
- */
2779
- info: createDebug.Debugger;
2780
- /**
2781
- * Log function - alias for debug for compatibility
2782
- */
2783
- log: createDebug.Debugger;
2784
- /**
2785
- * Warning level logging - uses console.warn for proper browser dev tool support
2786
- */
2787
- warn: (...args: any[]) => void;
2788
- };
2789
- react: {
2790
- /**
2791
- * General debug logging
2792
- */
2793
- debug: createDebug.Debugger;
2794
- /**
2795
- * Error level logging - uses console.error for proper browser dev tool support
2796
- */
2797
- error: (...args: any[]) => void;
2798
- /**
2799
- * Info level logging
2800
- */
2801
- info: createDebug.Debugger;
2802
- /**
2803
- * Log function - alias for debug for compatibility
2804
- */
2805
- log: createDebug.Debugger;
2806
- /**
2807
- * Warning level logging - uses console.warn for proper browser dev tool support
2808
- */
2809
- warn: (...args: any[]) => void;
2810
- };
2811
- service: {
2812
- /**
2813
- * General debug logging
2814
- */
2815
- debug: createDebug.Debugger;
2816
- /**
2817
- * Error level logging - uses console.error for proper browser dev tool support
2818
- */
2819
- error: (...args: any[]) => void;
2820
- /**
2821
- * Info level logging
2822
- */
2823
- info: createDebug.Debugger;
2824
- /**
2825
- * Log function - alias for debug for compatibility
2826
- */
2827
- log: createDebug.Debugger;
2828
- /**
2829
- * Warning level logging - uses console.warn for proper browser dev tool support
2830
- */
2831
- warn: (...args: any[]) => void;
2832
- };
2833
- slash: {
2834
- /**
2835
- * General debug logging
2836
- */
2837
- debug: createDebug.Debugger;
2838
- /**
2839
- * Error level logging - uses console.error for proper browser dev tool support
2840
- */
2841
- error: (...args: any[]) => void;
2842
- /**
2843
- * Info level logging
2844
- */
2845
- info: createDebug.Debugger;
2846
- /**
2847
- * Log function - alias for debug for compatibility
2848
- */
2849
- log: createDebug.Debugger;
2850
- /**
2851
- * Warning level logging - uses console.warn for proper browser dev tool support
2852
- */
2853
- warn: (...args: any[]) => void;
2854
- };
2855
- upload: {
2856
- /**
2857
- * General debug logging
2858
- */
2859
- debug: createDebug.Debugger;
2860
- /**
2861
- * Error level logging - uses console.error for proper browser dev tool support
2862
- */
2863
- error: (...args: any[]) => void;
2864
- /**
2865
- * Info level logging
2866
- */
2867
- info: createDebug.Debugger;
2868
- /**
2869
- * Log function - alias for debug for compatibility
2870
- */
2871
- log: createDebug.Debugger;
2872
- /**
2873
- * Warning level logging - uses console.warn for proper browser dev tool support
2874
- */
2875
- warn: (...args: any[]) => void;
2876
- };
2877
- };
2878
- /**
2879
- * Conditional console logging - only logs in development mode
2880
- * Use this for demo files and development-only logging
2881
- */
2882
- declare const devConsole: {
2883
- error: (...args: any[]) => void;
2884
- info: (...args: any[]) => void;
2885
- log: (...args: any[]) => void;
2886
- warn: (...args: any[]) => void;
2887
- };
2888
- /**
2889
- * Production-safe error logging
2890
- * Always logs errors and warnings regardless of environment using native console methods
2891
- * for proper browser dev tool support. Debug/info uses debug package.
2892
- */
2893
- declare const prodSafeLogger: {
2894
- /**
2895
- * Debug info - only shown when debug is enabled
2896
- */
2897
- debug: createDebug.Debugger;
2898
- /**
2899
- * Log critical errors that should always be visible (uses console.error)
2900
- */
2901
- error: (...args: any[]) => void;
2902
- /**
2903
- * Info logging - only shown when debug is enabled
2904
- */
2905
- info: createDebug.Debugger;
2906
- /**
2907
- * Log warnings that should always be visible (uses console.warn)
2908
- */
2909
- warn: (...args: any[]) => void;
2910
- };
2911
- /**
2912
- * Browser debug utilities for Next.js and other client-side frameworks
2913
- */
2914
- declare const browserDebug: {
2915
- /**
2916
- * Disable debug logging in browser environment
2917
- */
2918
- disable: () => void;
2919
- /**
2920
- * Enable debug logging in browser environment
2921
- * @param namespaces - Debug namespaces to enable (e.g., 'lobe-editor:*')
2922
- */
2923
- enable: (namespaces?: string) => void;
2924
- /**
2925
- * Get current debug configuration
2926
- */
2927
- getConfig: () => {
2928
- enabled: string | boolean;
2929
- source: string;
2930
- };
2931
- /**
2932
- * Show available debug categories
2933
- */
2934
- showCategories: () => void;
2935
- /**
2936
- * Show current debug status and configuration
2937
- */
2938
- showStatus: () => void;
2939
- };
2940
- //#endregion
2941
- //#region src/editor-kernel/kernel.d.ts
2942
- declare class Kernel extends EventEmitter implements IEditorKernel {
2943
- private static globalHotReloadMode;
2944
- private dataTypeMap;
2945
- private plugins;
2946
- private pluginsConfig;
2947
- private pluginsInstances;
2948
- private beforeEditorInitHooks;
2949
- private nodeTransforms;
2950
- private rootClassNames;
2951
- private nodes;
2952
- private themes;
2953
- private decorators;
2954
- private serviceMap;
2955
- private localeMap;
2956
- private hotReloadMode;
2957
- private logger;
2958
- private historyState;
2959
- private editor?;
2960
- private headlessEditor;
2961
- constructor();
2962
- cloneNodeEditor(): IEditorKernel;
2963
- getHistoryState(): HistoryState;
2964
- isEditable(): boolean;
2965
- private detectDevelopmentMode;
2966
- /**
2967
- * Globally enable or disable hot reload mode for all kernel instances
2968
- * @param enabled Whether to enable hot reload mode globally
2969
- */
2970
- static setGlobalHotReloadMode(enabled: boolean): void;
2971
- /**
2972
- * Reset global hot reload mode to automatic detection
2973
- */
2974
- static resetGlobalHotReloadMode(): void;
2975
- getLexicalEditor(): LexicalEditor | null;
2976
- destroy(): void;
2977
- getRootElement(): HTMLElement | null;
2978
- setRootElement(dom: HTMLElement, editable?: boolean): LexicalEditor;
2979
- setEditable(editable: boolean): void;
2980
- initNodeEditor(): LexicalEditor;
2981
- initHeadlessEditor(): LexicalEditor;
2982
- setDocument(type: string, content: any, options?: IDocumentOptions): void;
2983
- setSelection(selection: ISelectionObject, opt?: {
2984
- collapseToEnd?: boolean;
2985
- collapseToStart?: boolean;
2986
- }): Promise<boolean>;
2987
- getSelection(): ISelectionObject | null;
2988
- focus(): void;
2989
- blur(): void;
2990
- getDocument(type: string): DataSource | undefined;
2991
- getSelectionDocument(type: string): unknown | null;
2992
- registerDecorator(name: string, decorator: IDecorator): this;
2993
- getDecorator(name: string): IDecorator | undefined;
2994
- /**
2995
- * Unregister a decorator
2996
- * @param name Decorator name
2997
- */
2998
- unregisterDecorator(name: string): boolean;
2999
- /**
3000
- * Get all registered decorator names
3001
- */
3002
- getRegisteredDecorators(): string[];
3003
- /**
3004
- * Support registering target data source
3005
- * @param dataSource Data source
3006
- */
3007
- registerDataSource(dataSource: DataSource): void;
3008
- registerThemes(themes: Record<string, any>): void;
3009
- registerPlugin<T>(plugin: IEditorPluginConstructor<T>, config?: T): IEditor;
3010
- registerPlugins(plugins: Array<IPlugin>): IEditor;
3011
- registerNodes(nodes: Array<LexicalNodeConfig>): void;
3012
- registerNodeTransform(transform: INodeRegistrationTransform): () => void;
3013
- registerBeforeEditorInit(hook: IBeforeEditorInitLifecycle): () => void;
3014
- registerRootClassName(className: string): () => void;
3015
- private runBeforeEditorInitLifecycle;
3016
- private applyRootClassNames;
3017
- private resolveNodesForInitialization;
3018
- registerService<T>(serviceId: IServiceID<T>, service: T): void;
3019
- /**
3020
- * Register service with hot reload support - allows overriding existing services
3021
- * @param serviceId Service identifier
3022
- * @param service Service instance
3023
- */
3024
- registerServiceHotReload<T>(serviceId: IServiceID<T>, service: T): void;
3025
- /**
3026
- * Enable or disable hot reload mode
3027
- * @param enabled Whether to enable hot reload mode
3028
- */
3029
- setHotReloadMode(enabled: boolean): void;
3030
- /**
3031
- * Check if hot reload mode is enabled
3032
- */
3033
- isHotReloadMode(): boolean;
3034
- /**
3035
- * Get service
3036
- * @param serviceId Service ID
3037
- */
3038
- requireService<T>(serviceId: IServiceID<T>): T | null;
3039
- dispatchCommand<TCommand extends LexicalCommand<unknown>>(type: TCommand, payload: CommandPayloadType<TCommand>): boolean;
3040
- getTheme(): Record<string, any>;
3041
- updateTheme(key: string, value: string | Record<string, string>): void;
3042
- registerLocale(locale: Partial<Record<keyof ILocaleKeys, string>>): void;
3043
- t<K extends keyof ILocaleKeys>(key: K, params?: Record<string, any>): string;
3044
- get isEmpty(): boolean;
3045
- get isSelected(): boolean;
3046
- cleanDocument(): void;
3047
- private _commands;
3048
- private _commandsClean;
3049
- registerHotkey(hotkeyId: HotkeyId, callback: (event: KeyboardEvent, handler: HotkeysEvent) => void, options?: HotkeyOptions): () => void;
3050
- registerHighCommand<P>(command: LexicalCommand<P>, listener: CommandListener<P>, priority: CommandListenerPriority): () => void;
3051
- }
3052
- //#endregion
3053
- //#region src/utils/scrollIntoView.d.ts
3054
- /**
3055
- * Scroll the current selection into view, centered vertically in the viewport
3056
- * @param offsetY Optional vertical offset from center (default: 0)
3057
- */
3058
- declare function scrollIntoView(offsetY?: number): void;
3059
- //#endregion
3060
113
  //#region src/index.d.ts
3061
114
  /**
3062
115
  * Enable hot reload mode globally for all editor instances
@@ -3068,4 +121,4 @@ declare function enableHotReload(): void;
3068
121
  */
3069
122
  declare function disableHotReload(): void;
3070
123
  //#endregion
3071
- export { $closest, $closestNodeType, $createCursorNode, $getNearestNodeFromDOMNode, $getNodeFromDOMNode, $isCardLikeElementNode, $isCursorNode, AutoCompletePlugin, type BlockDragTarget, BlockMenuService, BlockMovePayload, BlockPlugin, BlockPluginOptions, CONTENT_BLOCKS_DATA_TYPE, CardLikeElementNode, CodePlugin, CodeblockPlugin, CodeblockPluginOptions, CodemirrorPlugin, CodemirrorPluginOptions, CommonPlugin, CommonPluginOptions, type ContentBlock, ContentBlocksDataSource, ContentBlocksPlugin, type ContentBlocksPluginOptions, DEFAULT_HEADLESS_EDITOR_PLUGINS, DOM_DOCUMENT_FRAGMENT_TYPE, DOM_DOCUMENT_TYPE, DOM_ELEMENT_TYPE, DOM_TEXT_TYPE, DataSource, DiffAction, EDITOR_THEME_KEY, type ExtractContentBlocksOptions, type FileContentBlock, type FileListItem, FilePlugin, FilePluginOptions, GET_MARKDOWN_SELECTION_COMMAND, HIDE_TOOLBAR_COMMAND, HOVER_COMMAND, HRPlugin, HRPluginOptions, HeadlessDocumentType, HeadlessEditor, HeadlessEditorExport, HeadlessEditorExportOptions, HeadlessEditorHydrationInput, HeadlessEditorOptions, HeadlessLiteXMLBatchOperation, HeadlessLiteXMLInsertOperation, HeadlessLiteXMLOperation, HeadlessLiteXMLRemoveOperation, HeadlessLiteXMLReplaceOperation, HotkeyEnum, HotkeyId, HotkeyItem, HotkeyScopeEnum, HotkeyScopeId, IBlockActionButton, IBlockActionButtonIcon, IBlockMenuItem, IBlockMenuRenderContext, IBlockMenuService, type IEditor, ILinkService, ILitexmlService, IMarkdownShortCutService, INSERT_CHECK_LIST_COMMAND, INSERT_CODEINLINE_COMMAND, INSERT_CODEMIRROR_COMMAND, INSERT_FILE_COMMAND, INSERT_HEADING_COMMAND, INSERT_HORIZONTAL_RULE_COMMAND, INSERT_IMAGE_COMMAND, INSERT_LINK_COMMAND, INSERT_LINK_HIGHLIGHT_COMMAND, INSERT_MARKDOWN_COMMAND, INSERT_MATH_COMMAND, INSERT_MENTION_COMMAND, INSERT_ORDERED_LIST_COMMAND, INSERT_QUOTE_COMMAND, INSERT_TABLE_COMMAND, INSERT_UNORDERED_LIST_COMMAND, INodePlugin, INodePluginOptions, INodeService, ISlashMenuOption, ISlashOption, ISlashService, ITriggerContext, IUploadService, type ImageContentBlock, type ImageListItem, ImagePlugin, ImagePluginOptions, Kernel, KeyEnum, LITEXML_APPLY_COMMAND, LITEXML_DIFFNODE_ALL_COMMAND, LITEXML_DIFFNODE_COMMAND, LITEXML_INSERT_COMMAND, LITEXML_MODIFY_COMMAND, LITEXML_REMOVE_COMMAND, LexicalErrorBoundary, LexicalPortalContainer, LinkHighlightPlugin, LinkHighlightPluginOptions, LinkPlugin, LinkPluginOptions, ListPlugin, ListPluginOptions, LitexmlDataSource, LitexmlPlugin, type LitexmlPluginOptions, LitexmlService, type MARKDOWN_READER_LEVEL, MARKDOWN_READER_LEVEL_HIGH, MARKDOWN_READER_LEVEL_NORMAL, MARKDOWN_WRITER_LEVEL_MAX, MOVE_BLOCK_COMMAND, MarkdownPlugin, MathPlugin, type MediaLists, MentionPlugin, MentionPluginOptions, MenuRenderProps, ModifierCombination, REMOVE_LIST_COMMAND, ReactAutoCompletePlugin, ReactBlockPlugin, type ReactBlockPluginProps, ReactCodePlugin, ReactCodeblockPlugin, ReactCodeblockPluginProps, ReactCodemirrorPlugin, ReactEditor, ReactEditorContent, ReactEditorContentProps, ReactFilePlugin, ReactFilePluginProps, ReactHRPlugin, ReactHRPluginProps, ReactImagePlugin, ReactImagePluginProps, ReactLinkHighlightPlugin, ReactLinkPlugin, ReactLinkPluginProps, ReactListPlugin, ReactListPluginProps, ReactLiteXmlPlugin, ReactMarkdownPlugin, ReactMathPlugin, ReactMentionPlugin, ReactMentionPluginProps, ReactNodePlugin, ReactPlainText, ReactPlainTextProps, ReactSlashOption, ReactSlashOptionProps, ReactSlashPlugin, ReactSlashPluginProps, ReactTablePlugin, ReactToolbarPlugin, ReactVirtualBlockPlugin, SELECT_AFTER_CODEMIRROR_COMMAND, SELECT_BEFORE_CODEMIRROR_COMMAND, SELECT_TABLE_COMMAND, SHOW_TOOLBAR_COMMAND, type SerializedMentionNode, SlashMenu, SlashMenuProps, SlashOptions, SlashPlugin, SlashPluginOptions, TablePlugin, TablePluginOptions, type TextContentBlock, ToolbarCommandOptions, UPDATE_CODEBLOCK_LANG, UPDATE_LIST_START_COMMAND, UPLOAD_PRIORITY_HIGH, UPLOAD_PRIORITY_LOW, UPLOAD_PRIORITY_MEDIUM, UploadPlugin, UploadPluginOptions, VirtualBlockPlugin, VirtualBlockPluginOptions, type XMLReaderFunc, type XMLReaderRecord, type XMLWriterFunc, type XMLWriterRecord, assert, browserDebug, bundledLanguagesInfo, compareNodeOrder, createDebugLogger, createEmptyEditorState, createHeadlessEditor, cursorNodeSerialized, debugLogger, debugLoggers, detectCodeLanguage, detectLanguage, devConsole, disableHotReload, enableHotReload, extractContentBlocks, extractMediaFromEditorState, extractMediaLists, genServiceId, generateEditorId, getHotkeyById, getKernelFromEditor, getKernelFromEditorConfig, getNodeKeyFromDOMNode, getParentElement, isDOMNode, isDocumentFragment, isPunctuationChar, isPureUrl, isValidUrl, moment, noop, prodSafeLogger, reconcileDecorator, registerBlockMoveCommand, registerEditorKernel, registerLinkHighlightCommand, registerToolbarCommand, resetRandomKey, scrollIntoView, unregisterEditorKernel, useHasDiffNode, useLexicalComposerContext, useLexicalEditor };
124
+ export { $closest, $closestNodeType, $createCursorNode, $getNearestNodeFromDOMNode, $getNodeFromDOMNode, $isCardLikeElementNode, $isCursorNode, AutoCompletePlugin, BlockDragTarget, BlockMenuService, BlockMovePayload, BlockPlugin, BlockPluginOptions, CONTENT_BLOCKS_DATA_TYPE, CardLikeElementNode, CodePlugin, CodeblockPlugin, CodeblockPluginOptions, CodemirrorPlugin, CodemirrorPluginOptions, CommonPlugin, CommonPluginOptions, ContentBlock, ContentBlocksDataSource, ContentBlocksPlugin, ContentBlocksPluginOptions, DEFAULT_HEADLESS_EDITOR_PLUGINS, DOM_DOCUMENT_FRAGMENT_TYPE, DOM_DOCUMENT_TYPE, DOM_ELEMENT_TYPE, DOM_TEXT_TYPE, DataSource, DiffAction, EDITOR_THEME_KEY, ExtractContentBlocksOptions, FileContentBlock, FileListItem, FilePlugin, FilePluginOptions, GET_MARKDOWN_SELECTION_COMMAND, HIDE_TOOLBAR_COMMAND, HOVER_COMMAND, HRPlugin, HRPluginOptions, HeadlessDocumentType, HeadlessEditor, HeadlessEditorExport, HeadlessEditorExportOptions, HeadlessEditorHydrationInput, HeadlessEditorOptions, HeadlessLiteXMLBatchOperation, HeadlessLiteXMLInsertOperation, HeadlessLiteXMLOperation, HeadlessLiteXMLRemoveOperation, HeadlessLiteXMLReplaceOperation, HotkeyEnum, HotkeyId, HotkeyItem, HotkeyScopeEnum, HotkeyScopeId, IBlockActionButton, IBlockActionButtonIcon, IBlockMenuItem, IBlockMenuRenderContext, IBlockMenuService, type IEditor, ILinkService, ILitexmlService, IMarkdownShortCutService, INSERT_CHECK_LIST_COMMAND, INSERT_CODEINLINE_COMMAND, INSERT_CODEMIRROR_COMMAND, INSERT_FILE_COMMAND, INSERT_HEADING_COMMAND, INSERT_HORIZONTAL_RULE_COMMAND, INSERT_IMAGE_COMMAND, INSERT_LINK_COMMAND, INSERT_LINK_HIGHLIGHT_COMMAND, INSERT_MARKDOWN_COMMAND, INSERT_MATH_COMMAND, INSERT_MENTION_COMMAND, INSERT_ORDERED_LIST_COMMAND, INSERT_QUOTE_COMMAND, INSERT_TABLE_COMMAND, INSERT_UNORDERED_LIST_COMMAND, INodePlugin, INodePluginOptions, INodeService, ISlashMenuOption, ISlashOption, ISlashService, ITriggerContext, IUploadService, ImageContentBlock, ImageListItem, ImagePlugin, ImagePluginOptions, Kernel, KeyEnum, LITEXML_APPLY_COMMAND, LITEXML_DIFFNODE_ALL_COMMAND, LITEXML_DIFFNODE_COMMAND, LITEXML_INSERT_COMMAND, LITEXML_MODIFY_COMMAND, LITEXML_REMOVE_COMMAND, LexicalErrorBoundary, LexicalPortalContainer, LinkHighlightPlugin, LinkHighlightPluginOptions, LinkPlugin, LinkPluginOptions, ListPlugin, ListPluginOptions, LitexmlDataSource, LitexmlPlugin, LitexmlPluginOptions, LitexmlService, MARKDOWN_READER_LEVEL, MARKDOWN_READER_LEVEL_HIGH, MARKDOWN_READER_LEVEL_NORMAL, MARKDOWN_WRITER_LEVEL_MAX, MOVE_BLOCK_COMMAND, MarkdownPlugin, MathPlugin, MediaLists, MentionPlugin, MentionPluginOptions, MenuRenderProps, ModifierCombination, REMOVE_LIST_COMMAND, ReactAutoCompletePlugin, ReactBlockPlugin, ReactBlockPluginProps, ReactCodePlugin, ReactCodeblockPlugin, ReactCodeblockPluginProps, ReactCodemirrorPlugin, ReactEditor, ReactEditorContent, ReactEditorContentProps, ReactFilePlugin, ReactFilePluginProps, ReactHRPlugin, ReactHRPluginProps, ReactImagePlugin, ReactImagePluginProps, ReactLinkHighlightPlugin, ReactLinkPlugin, ReactLinkPluginProps, ReactListPlugin, ReactListPluginProps, ReactLiteXmlPlugin, ReactMarkdownPlugin, ReactMathPlugin, ReactMentionPlugin, ReactMentionPluginProps, ReactNodePlugin, ReactPlainText, ReactPlainTextProps, ReactSlashOption, ReactSlashOptionProps, ReactSlashPlugin, ReactSlashPluginProps, ReactTablePlugin, ReactToolbarPlugin, ReactVirtualBlockPlugin, SELECT_AFTER_CODEMIRROR_COMMAND, SELECT_BEFORE_CODEMIRROR_COMMAND, SELECT_TABLE_COMMAND, SHOW_TOOLBAR_COMMAND, SerializedMentionNode, SlashMenu, SlashMenuProps, SlashOptions, SlashPlugin, SlashPluginOptions, TablePlugin, TablePluginOptions, TextContentBlock, ToolbarCommandOptions, UPDATE_CODEBLOCK_LANG, UPDATE_LIST_START_COMMAND, UPLOAD_PRIORITY_HIGH, UPLOAD_PRIORITY_LOW, UPLOAD_PRIORITY_MEDIUM, UploadPlugin, UploadPluginOptions, VirtualBlockPlugin, VirtualBlockPluginOptions, XMLReaderFunc, XMLReaderRecord, XMLWriterFunc, XMLWriterRecord, assert, browserDebug, bundledLanguagesInfo, compareNodeOrder, createDebugLogger, createEmptyEditorState, createHeadlessEditor, cursorNodeSerialized, debugLogger, debugLoggers, detectCodeLanguage, detectLanguage, devConsole, disableHotReload, enableHotReload, extractContentBlocks, extractMediaFromEditorState, extractMediaLists, genServiceId, generateEditorId, getHotkeyById, getKernelFromEditor, getKernelFromEditorConfig, getNodeKeyFromDOMNode, getParentElement, isDOMNode, isDocumentFragment, isPunctuationChar, isPureUrl, isValidUrl, moment, noop, prodSafeLogger, reconcileDecorator, registerBlockMoveCommand, registerEditorKernel, registerLinkHighlightCommand, registerToolbarCommand, resetRandomKey, scrollIntoView, unregisterEditorKernel, useHasDiffNode, useLexicalComposerContext, useLexicalEditor };