@lobehub/editor 4.5.0 → 4.6.0

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