@lexical/react 0.44.1-nightly.20260519.0 → 0.45.1-dev.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 (576) hide show
  1. package/README.md +1 -1
  2. package/{LexicalClearEditorPlugin.dev.js → dist/LexicalClearEditorPlugin.dev.js} +2 -11
  3. package/{LexicalClearEditorPlugin.dev.mjs → dist/LexicalClearEditorPlugin.dev.mjs} +1 -10
  4. package/dist/LexicalClearEditorPlugin.prod.js +9 -0
  5. package/dist/LexicalClearEditorPlugin.prod.mjs +9 -0
  6. package/{LexicalComposer.dev.js → dist/LexicalComposer.dev.js} +2 -12
  7. package/{LexicalComposer.dev.mjs → dist/LexicalComposer.dev.mjs} +1 -11
  8. package/dist/LexicalComposer.prod.js +9 -0
  9. package/dist/LexicalComposer.prod.mjs +9 -0
  10. package/{LexicalContentEditable.dev.js → dist/LexicalContentEditable.dev.js} +13 -22
  11. package/{LexicalContentEditable.dev.mjs → dist/LexicalContentEditable.dev.mjs} +12 -21
  12. package/dist/LexicalContentEditable.prod.js +9 -0
  13. package/dist/LexicalContentEditable.prod.mjs +9 -0
  14. package/{LexicalDraggableBlockPlugin.dev.js → dist/LexicalDraggableBlockPlugin.dev.js} +5 -27
  15. package/{LexicalDraggableBlockPlugin.dev.mjs → dist/LexicalDraggableBlockPlugin.dev.mjs} +1 -23
  16. package/dist/LexicalDraggableBlockPlugin.prod.js +9 -0
  17. package/dist/LexicalDraggableBlockPlugin.prod.mjs +9 -0
  18. package/{LexicalNestedComposer.dev.js → dist/LexicalNestedComposer.dev.js} +1 -0
  19. package/{LexicalNestedComposer.dev.mjs → dist/LexicalNestedComposer.dev.mjs} +1 -0
  20. package/{LexicalNodeMenuPlugin.dev.js → dist/LexicalNodeMenuPlugin.dev.js} +24 -34
  21. package/{LexicalNodeMenuPlugin.dev.mjs → dist/LexicalNodeMenuPlugin.dev.mjs} +22 -32
  22. package/dist/LexicalNodeMenuPlugin.prod.js +9 -0
  23. package/dist/LexicalNodeMenuPlugin.prod.mjs +9 -0
  24. package/{LexicalOnChangePlugin.dev.js → dist/LexicalOnChangePlugin.dev.js} +1 -11
  25. package/{LexicalOnChangePlugin.dev.mjs → dist/LexicalOnChangePlugin.dev.mjs} +1 -11
  26. package/dist/LexicalOnChangePlugin.prod.js +9 -0
  27. package/dist/LexicalOnChangePlugin.prod.mjs +9 -0
  28. package/{LexicalPlainTextPlugin.dev.js → dist/LexicalPlainTextPlugin.dev.js} +2 -11
  29. package/{LexicalPlainTextPlugin.dev.mjs → dist/LexicalPlainTextPlugin.dev.mjs} +1 -10
  30. package/dist/LexicalPlainTextPlugin.prod.js +9 -0
  31. package/dist/LexicalPlainTextPlugin.prod.mjs +9 -0
  32. package/{LexicalRichTextPlugin.dev.js → dist/LexicalRichTextPlugin.dev.js} +2 -11
  33. package/{LexicalRichTextPlugin.dev.mjs → dist/LexicalRichTextPlugin.dev.mjs} +1 -10
  34. package/dist/LexicalRichTextPlugin.prod.js +9 -0
  35. package/dist/LexicalRichTextPlugin.prod.mjs +9 -0
  36. package/{LexicalTablePlugin.dev.js → dist/LexicalTablePlugin.dev.js} +6 -3
  37. package/{LexicalTablePlugin.dev.mjs → dist/LexicalTablePlugin.dev.mjs} +7 -4
  38. package/dist/LexicalTablePlugin.prod.js +9 -0
  39. package/dist/LexicalTablePlugin.prod.mjs +9 -0
  40. package/{LexicalTypeaheadMenuPlugin.dev.js → dist/LexicalTypeaheadMenuPlugin.dev.js} +24 -34
  41. package/{LexicalTypeaheadMenuPlugin.dev.mjs → dist/LexicalTypeaheadMenuPlugin.dev.mjs} +22 -32
  42. package/dist/LexicalTypeaheadMenuPlugin.prod.js +9 -0
  43. package/dist/LexicalTypeaheadMenuPlugin.prod.mjs +9 -0
  44. package/dist/shared/reactPatches.d.ts +8 -0
  45. package/dist/shared/useLayoutEffect.d.ts +10 -0
  46. package/{useLexicalEditable.dev.js → dist/useLexicalEditable.dev.js} +2 -11
  47. package/{useLexicalEditable.dev.mjs → dist/useLexicalEditable.dev.mjs} +1 -10
  48. package/dist/useLexicalEditable.prod.js +9 -0
  49. package/dist/useLexicalEditable.prod.mjs +9 -0
  50. package/{useLexicalIsTextContentEmpty.dev.js → dist/useLexicalIsTextContentEmpty.dev.js} +2 -11
  51. package/{useLexicalIsTextContentEmpty.dev.mjs → dist/useLexicalIsTextContentEmpty.dev.mjs} +1 -10
  52. package/dist/useLexicalIsTextContentEmpty.prod.js +9 -0
  53. package/dist/useLexicalIsTextContentEmpty.prod.mjs +9 -0
  54. package/{useLexicalSubscription.dev.js → dist/useLexicalSubscription.dev.js} +2 -11
  55. package/{useLexicalSubscription.dev.mjs → dist/useLexicalSubscription.dev.mjs} +1 -10
  56. package/dist/useLexicalSubscription.prod.js +9 -0
  57. package/dist/useLexicalSubscription.prod.mjs +9 -0
  58. package/package.json +1054 -938
  59. package/src/ExtensionComponent.tsx +59 -0
  60. package/src/LexicalAutoEmbedPlugin.tsx +300 -0
  61. package/src/LexicalAutoFocusPlugin.ts +41 -0
  62. package/src/LexicalAutoLinkPlugin.ts +61 -0
  63. package/src/LexicalBlockWithAlignableContents.tsx +119 -0
  64. package/src/LexicalCharacterLimitPlugin.tsx +91 -0
  65. package/src/LexicalCheckListPlugin.tsx +24 -0
  66. package/src/LexicalClearEditorPlugin.ts +27 -0
  67. package/src/LexicalClickableLinkPlugin.tsx +28 -0
  68. package/src/LexicalCollaborationContext.tsx +91 -0
  69. package/src/LexicalCollaborationPlugin.tsx +266 -0
  70. package/src/LexicalComposer.tsx +185 -0
  71. package/src/LexicalComposerContext.ts +63 -0
  72. package/src/LexicalContentEditable.tsx +98 -0
  73. package/src/LexicalDecoratorBlockNode.ts +87 -0
  74. package/src/LexicalDraggableBlockPlugin.tsx +601 -0
  75. package/src/LexicalEditorRefPlugin.tsx +41 -0
  76. package/src/LexicalErrorBoundary.tsx +46 -0
  77. package/src/LexicalExtensionComposer.tsx +117 -0
  78. package/src/LexicalExtensionEditorComposer.tsx +46 -0
  79. package/src/LexicalHashtagPlugin.ts +26 -0
  80. package/src/LexicalHistoryPlugin.ts +31 -0
  81. package/src/LexicalHorizontalRuleNode.tsx +123 -0
  82. package/src/LexicalHorizontalRulePlugin.ts +52 -0
  83. package/src/LexicalLinkPlugin.ts +32 -0
  84. package/src/LexicalListPlugin.ts +60 -0
  85. package/src/LexicalMarkdownShortcutPlugin.tsx +56 -0
  86. package/src/LexicalNestedComposer.tsx +221 -0
  87. package/src/LexicalNodeContextMenuPlugin.tsx +316 -0
  88. package/src/LexicalNodeEventPlugin.ts +71 -0
  89. package/src/LexicalNodeMenuPlugin.tsx +131 -0
  90. package/src/LexicalOnChangePlugin.ts +52 -0
  91. package/src/LexicalPlainTextPlugin.tsx +65 -0
  92. package/src/LexicalRichTextPlugin.tsx +65 -0
  93. package/src/LexicalSelectionAlwaysOnDisplay.tsx +24 -0
  94. package/src/LexicalTabIndentationPlugin.tsx +40 -0
  95. package/src/LexicalTableOfContentsPlugin.tsx +277 -0
  96. package/src/LexicalTablePlugin.ts +118 -0
  97. package/src/LexicalTreeView.tsx +128 -0
  98. package/src/LexicalTypeaheadMenuPlugin.tsx +365 -0
  99. package/src/ReactExtension.tsx +113 -0
  100. package/src/ReactPluginHostExtension.tsx +228 -0
  101. package/src/ReactProviderExtension.tsx +20 -0
  102. package/src/TreeViewExtension.tsx +48 -0
  103. package/src/shared/LegacyDecorators.tsx +62 -0
  104. package/src/shared/LexicalContentEditableElement.tsx +126 -0
  105. package/src/shared/LexicalMenu.tsx +738 -0
  106. package/src/shared/buildEditorComponent.tsx +60 -0
  107. package/src/shared/mergeRefs.ts +20 -0
  108. package/src/shared/point.ts +55 -0
  109. package/src/shared/reactPatches.ts +22 -0
  110. package/src/shared/rect.ts +158 -0
  111. package/src/shared/types.ts +106 -0
  112. package/src/shared/useCanShowPlaceholder.ts +50 -0
  113. package/src/shared/useCharacterLimit.ts +314 -0
  114. package/src/shared/useDecorators.tsx +73 -0
  115. package/src/shared/useHistory.ts +28 -0
  116. package/src/shared/useLayoutEffect.ts +19 -0
  117. package/src/shared/useList.ts +18 -0
  118. package/src/shared/usePlainTextSetup.ts +24 -0
  119. package/src/shared/useReactDecorators.tsx +53 -0
  120. package/src/shared/useRichTextSetup.ts +24 -0
  121. package/src/shared/useYjsCollaboration.tsx +694 -0
  122. package/src/useExtensionComponent.tsx +57 -0
  123. package/src/useExtensionSignalValue.ts +85 -0
  124. package/src/useLexicalEditable.ts +33 -0
  125. package/src/useLexicalIsTextContentEmpty.ts +37 -0
  126. package/src/useLexicalNodeSelection.ts +114 -0
  127. package/src/useLexicalSubscription.tsx +52 -0
  128. package/src/useLexicalTextEntity.ts +29 -0
  129. package/LexicalClearEditorPlugin.prod.js +0 -9
  130. package/LexicalClearEditorPlugin.prod.mjs +0 -9
  131. package/LexicalComposer.prod.js +0 -9
  132. package/LexicalComposer.prod.mjs +0 -9
  133. package/LexicalContentEditable.prod.js +0 -9
  134. package/LexicalContentEditable.prod.mjs +0 -9
  135. package/LexicalDraggableBlockPlugin.prod.js +0 -9
  136. package/LexicalDraggableBlockPlugin.prod.mjs +0 -9
  137. package/LexicalNodeMenuPlugin.prod.js +0 -9
  138. package/LexicalNodeMenuPlugin.prod.mjs +0 -9
  139. package/LexicalOnChangePlugin.prod.js +0 -9
  140. package/LexicalOnChangePlugin.prod.mjs +0 -9
  141. package/LexicalPlainTextPlugin.prod.js +0 -9
  142. package/LexicalPlainTextPlugin.prod.mjs +0 -9
  143. package/LexicalRichTextPlugin.prod.js +0 -9
  144. package/LexicalRichTextPlugin.prod.mjs +0 -9
  145. package/LexicalTablePlugin.prod.js +0 -9
  146. package/LexicalTablePlugin.prod.mjs +0 -9
  147. package/LexicalTypeaheadMenuPlugin.prod.js +0 -9
  148. package/LexicalTypeaheadMenuPlugin.prod.mjs +0 -9
  149. package/useLexicalEditable.prod.js +0 -9
  150. package/useLexicalEditable.prod.mjs +0 -9
  151. package/useLexicalIsTextContentEmpty.prod.js +0 -9
  152. package/useLexicalIsTextContentEmpty.prod.mjs +0 -9
  153. package/useLexicalSubscription.prod.js +0 -9
  154. package/useLexicalSubscription.prod.mjs +0 -9
  155. /package/{ExtensionComponent.d.ts → dist/ExtensionComponent.d.ts} +0 -0
  156. /package/{LexicalAutoEmbedPlugin.d.ts → dist/LexicalAutoEmbedPlugin.d.ts} +0 -0
  157. /package/{LexicalAutoEmbedPlugin.dev.js → dist/LexicalAutoEmbedPlugin.dev.js} +0 -0
  158. /package/{LexicalAutoEmbedPlugin.dev.mjs → dist/LexicalAutoEmbedPlugin.dev.mjs} +0 -0
  159. /package/{LexicalAutoEmbedPlugin.js → dist/LexicalAutoEmbedPlugin.js} +0 -0
  160. /package/{LexicalAutoEmbedPlugin.js.flow → dist/LexicalAutoEmbedPlugin.js.flow} +0 -0
  161. /package/{LexicalAutoEmbedPlugin.mjs → dist/LexicalAutoEmbedPlugin.mjs} +0 -0
  162. /package/{LexicalAutoEmbedPlugin.node.mjs → dist/LexicalAutoEmbedPlugin.node.mjs} +0 -0
  163. /package/{LexicalAutoEmbedPlugin.prod.js → dist/LexicalAutoEmbedPlugin.prod.js} +0 -0
  164. /package/{LexicalAutoEmbedPlugin.prod.mjs → dist/LexicalAutoEmbedPlugin.prod.mjs} +0 -0
  165. /package/{LexicalAutoFocusPlugin.d.ts → dist/LexicalAutoFocusPlugin.d.ts} +0 -0
  166. /package/{LexicalAutoFocusPlugin.dev.js → dist/LexicalAutoFocusPlugin.dev.js} +0 -0
  167. /package/{LexicalAutoFocusPlugin.dev.mjs → dist/LexicalAutoFocusPlugin.dev.mjs} +0 -0
  168. /package/{LexicalAutoFocusPlugin.js → dist/LexicalAutoFocusPlugin.js} +0 -0
  169. /package/{LexicalAutoFocusPlugin.js.flow → dist/LexicalAutoFocusPlugin.js.flow} +0 -0
  170. /package/{LexicalAutoFocusPlugin.mjs → dist/LexicalAutoFocusPlugin.mjs} +0 -0
  171. /package/{LexicalAutoFocusPlugin.node.mjs → dist/LexicalAutoFocusPlugin.node.mjs} +0 -0
  172. /package/{LexicalAutoFocusPlugin.prod.js → dist/LexicalAutoFocusPlugin.prod.js} +0 -0
  173. /package/{LexicalAutoFocusPlugin.prod.mjs → dist/LexicalAutoFocusPlugin.prod.mjs} +0 -0
  174. /package/{LexicalAutoLinkPlugin.d.ts → dist/LexicalAutoLinkPlugin.d.ts} +0 -0
  175. /package/{LexicalAutoLinkPlugin.dev.js → dist/LexicalAutoLinkPlugin.dev.js} +0 -0
  176. /package/{LexicalAutoLinkPlugin.dev.mjs → dist/LexicalAutoLinkPlugin.dev.mjs} +0 -0
  177. /package/{LexicalAutoLinkPlugin.js → dist/LexicalAutoLinkPlugin.js} +0 -0
  178. /package/{LexicalAutoLinkPlugin.js.flow → dist/LexicalAutoLinkPlugin.js.flow} +0 -0
  179. /package/{LexicalAutoLinkPlugin.mjs → dist/LexicalAutoLinkPlugin.mjs} +0 -0
  180. /package/{LexicalAutoLinkPlugin.node.mjs → dist/LexicalAutoLinkPlugin.node.mjs} +0 -0
  181. /package/{LexicalAutoLinkPlugin.prod.js → dist/LexicalAutoLinkPlugin.prod.js} +0 -0
  182. /package/{LexicalAutoLinkPlugin.prod.mjs → dist/LexicalAutoLinkPlugin.prod.mjs} +0 -0
  183. /package/{LexicalBlockWithAlignableContents.d.ts → dist/LexicalBlockWithAlignableContents.d.ts} +0 -0
  184. /package/{LexicalBlockWithAlignableContents.dev.js → dist/LexicalBlockWithAlignableContents.dev.js} +0 -0
  185. /package/{LexicalBlockWithAlignableContents.dev.mjs → dist/LexicalBlockWithAlignableContents.dev.mjs} +0 -0
  186. /package/{LexicalBlockWithAlignableContents.js → dist/LexicalBlockWithAlignableContents.js} +0 -0
  187. /package/{LexicalBlockWithAlignableContents.js.flow → dist/LexicalBlockWithAlignableContents.js.flow} +0 -0
  188. /package/{LexicalBlockWithAlignableContents.mjs → dist/LexicalBlockWithAlignableContents.mjs} +0 -0
  189. /package/{LexicalBlockWithAlignableContents.node.mjs → dist/LexicalBlockWithAlignableContents.node.mjs} +0 -0
  190. /package/{LexicalBlockWithAlignableContents.prod.js → dist/LexicalBlockWithAlignableContents.prod.js} +0 -0
  191. /package/{LexicalBlockWithAlignableContents.prod.mjs → dist/LexicalBlockWithAlignableContents.prod.mjs} +0 -0
  192. /package/{LexicalCharacterLimitPlugin.d.ts → dist/LexicalCharacterLimitPlugin.d.ts} +0 -0
  193. /package/{LexicalCharacterLimitPlugin.dev.js → dist/LexicalCharacterLimitPlugin.dev.js} +0 -0
  194. /package/{LexicalCharacterLimitPlugin.dev.mjs → dist/LexicalCharacterLimitPlugin.dev.mjs} +0 -0
  195. /package/{LexicalCharacterLimitPlugin.js → dist/LexicalCharacterLimitPlugin.js} +0 -0
  196. /package/{LexicalCharacterLimitPlugin.js.flow → dist/LexicalCharacterLimitPlugin.js.flow} +0 -0
  197. /package/{LexicalCharacterLimitPlugin.mjs → dist/LexicalCharacterLimitPlugin.mjs} +0 -0
  198. /package/{LexicalCharacterLimitPlugin.node.mjs → dist/LexicalCharacterLimitPlugin.node.mjs} +0 -0
  199. /package/{LexicalCharacterLimitPlugin.prod.js → dist/LexicalCharacterLimitPlugin.prod.js} +0 -0
  200. /package/{LexicalCharacterLimitPlugin.prod.mjs → dist/LexicalCharacterLimitPlugin.prod.mjs} +0 -0
  201. /package/{LexicalCheckListPlugin.d.ts → dist/LexicalCheckListPlugin.d.ts} +0 -0
  202. /package/{LexicalCheckListPlugin.dev.js → dist/LexicalCheckListPlugin.dev.js} +0 -0
  203. /package/{LexicalCheckListPlugin.dev.mjs → dist/LexicalCheckListPlugin.dev.mjs} +0 -0
  204. /package/{LexicalCheckListPlugin.js → dist/LexicalCheckListPlugin.js} +0 -0
  205. /package/{LexicalCheckListPlugin.js.flow → dist/LexicalCheckListPlugin.js.flow} +0 -0
  206. /package/{LexicalCheckListPlugin.mjs → dist/LexicalCheckListPlugin.mjs} +0 -0
  207. /package/{LexicalCheckListPlugin.node.mjs → dist/LexicalCheckListPlugin.node.mjs} +0 -0
  208. /package/{LexicalCheckListPlugin.prod.js → dist/LexicalCheckListPlugin.prod.js} +0 -0
  209. /package/{LexicalCheckListPlugin.prod.mjs → dist/LexicalCheckListPlugin.prod.mjs} +0 -0
  210. /package/{LexicalClearEditorPlugin.d.ts → dist/LexicalClearEditorPlugin.d.ts} +0 -0
  211. /package/{LexicalClearEditorPlugin.js → dist/LexicalClearEditorPlugin.js} +0 -0
  212. /package/{LexicalClearEditorPlugin.js.flow → dist/LexicalClearEditorPlugin.js.flow} +0 -0
  213. /package/{LexicalClearEditorPlugin.mjs → dist/LexicalClearEditorPlugin.mjs} +0 -0
  214. /package/{LexicalClearEditorPlugin.node.mjs → dist/LexicalClearEditorPlugin.node.mjs} +0 -0
  215. /package/{LexicalClickableLinkPlugin.d.ts → dist/LexicalClickableLinkPlugin.d.ts} +0 -0
  216. /package/{LexicalClickableLinkPlugin.dev.js → dist/LexicalClickableLinkPlugin.dev.js} +0 -0
  217. /package/{LexicalClickableLinkPlugin.dev.mjs → dist/LexicalClickableLinkPlugin.dev.mjs} +0 -0
  218. /package/{LexicalClickableLinkPlugin.js → dist/LexicalClickableLinkPlugin.js} +0 -0
  219. /package/{LexicalClickableLinkPlugin.js.flow → dist/LexicalClickableLinkPlugin.js.flow} +0 -0
  220. /package/{LexicalClickableLinkPlugin.mjs → dist/LexicalClickableLinkPlugin.mjs} +0 -0
  221. /package/{LexicalClickableLinkPlugin.node.mjs → dist/LexicalClickableLinkPlugin.node.mjs} +0 -0
  222. /package/{LexicalClickableLinkPlugin.prod.js → dist/LexicalClickableLinkPlugin.prod.js} +0 -0
  223. /package/{LexicalClickableLinkPlugin.prod.mjs → dist/LexicalClickableLinkPlugin.prod.mjs} +0 -0
  224. /package/{LexicalCollaborationContext.d.ts → dist/LexicalCollaborationContext.d.ts} +0 -0
  225. /package/{LexicalCollaborationContext.dev.js → dist/LexicalCollaborationContext.dev.js} +0 -0
  226. /package/{LexicalCollaborationContext.dev.mjs → dist/LexicalCollaborationContext.dev.mjs} +0 -0
  227. /package/{LexicalCollaborationContext.js → dist/LexicalCollaborationContext.js} +0 -0
  228. /package/{LexicalCollaborationContext.js.flow → dist/LexicalCollaborationContext.js.flow} +0 -0
  229. /package/{LexicalCollaborationContext.mjs → dist/LexicalCollaborationContext.mjs} +0 -0
  230. /package/{LexicalCollaborationContext.node.mjs → dist/LexicalCollaborationContext.node.mjs} +0 -0
  231. /package/{LexicalCollaborationContext.prod.js → dist/LexicalCollaborationContext.prod.js} +0 -0
  232. /package/{LexicalCollaborationContext.prod.mjs → dist/LexicalCollaborationContext.prod.mjs} +0 -0
  233. /package/{LexicalCollaborationPlugin.d.ts → dist/LexicalCollaborationPlugin.d.ts} +0 -0
  234. /package/{LexicalCollaborationPlugin.dev.js → dist/LexicalCollaborationPlugin.dev.js} +0 -0
  235. /package/{LexicalCollaborationPlugin.dev.mjs → dist/LexicalCollaborationPlugin.dev.mjs} +0 -0
  236. /package/{LexicalCollaborationPlugin.js → dist/LexicalCollaborationPlugin.js} +0 -0
  237. /package/{LexicalCollaborationPlugin.js.flow → dist/LexicalCollaborationPlugin.js.flow} +0 -0
  238. /package/{LexicalCollaborationPlugin.mjs → dist/LexicalCollaborationPlugin.mjs} +0 -0
  239. /package/{LexicalCollaborationPlugin.node.mjs → dist/LexicalCollaborationPlugin.node.mjs} +0 -0
  240. /package/{LexicalCollaborationPlugin.prod.js → dist/LexicalCollaborationPlugin.prod.js} +0 -0
  241. /package/{LexicalCollaborationPlugin.prod.mjs → dist/LexicalCollaborationPlugin.prod.mjs} +0 -0
  242. /package/{LexicalComposer.d.ts → dist/LexicalComposer.d.ts} +0 -0
  243. /package/{LexicalComposer.js → dist/LexicalComposer.js} +0 -0
  244. /package/{LexicalComposer.js.flow → dist/LexicalComposer.js.flow} +0 -0
  245. /package/{LexicalComposer.mjs → dist/LexicalComposer.mjs} +0 -0
  246. /package/{LexicalComposer.node.mjs → dist/LexicalComposer.node.mjs} +0 -0
  247. /package/{LexicalComposerContext.d.ts → dist/LexicalComposerContext.d.ts} +0 -0
  248. /package/{LexicalComposerContext.dev.js → dist/LexicalComposerContext.dev.js} +0 -0
  249. /package/{LexicalComposerContext.dev.mjs → dist/LexicalComposerContext.dev.mjs} +0 -0
  250. /package/{LexicalComposerContext.js → dist/LexicalComposerContext.js} +0 -0
  251. /package/{LexicalComposerContext.js.flow → dist/LexicalComposerContext.js.flow} +0 -0
  252. /package/{LexicalComposerContext.mjs → dist/LexicalComposerContext.mjs} +0 -0
  253. /package/{LexicalComposerContext.node.mjs → dist/LexicalComposerContext.node.mjs} +0 -0
  254. /package/{LexicalComposerContext.prod.js → dist/LexicalComposerContext.prod.js} +0 -0
  255. /package/{LexicalComposerContext.prod.mjs → dist/LexicalComposerContext.prod.mjs} +0 -0
  256. /package/{LexicalContentEditable.d.ts → dist/LexicalContentEditable.d.ts} +0 -0
  257. /package/{LexicalContentEditable.js → dist/LexicalContentEditable.js} +0 -0
  258. /package/{LexicalContentEditable.js.flow → dist/LexicalContentEditable.js.flow} +0 -0
  259. /package/{LexicalContentEditable.mjs → dist/LexicalContentEditable.mjs} +0 -0
  260. /package/{LexicalContentEditable.node.mjs → dist/LexicalContentEditable.node.mjs} +0 -0
  261. /package/{LexicalDecoratorBlockNode.d.ts → dist/LexicalDecoratorBlockNode.d.ts} +0 -0
  262. /package/{LexicalDecoratorBlockNode.dev.js → dist/LexicalDecoratorBlockNode.dev.js} +0 -0
  263. /package/{LexicalDecoratorBlockNode.dev.mjs → dist/LexicalDecoratorBlockNode.dev.mjs} +0 -0
  264. /package/{LexicalDecoratorBlockNode.js → dist/LexicalDecoratorBlockNode.js} +0 -0
  265. /package/{LexicalDecoratorBlockNode.js.flow → dist/LexicalDecoratorBlockNode.js.flow} +0 -0
  266. /package/{LexicalDecoratorBlockNode.mjs → dist/LexicalDecoratorBlockNode.mjs} +0 -0
  267. /package/{LexicalDecoratorBlockNode.node.mjs → dist/LexicalDecoratorBlockNode.node.mjs} +0 -0
  268. /package/{LexicalDecoratorBlockNode.prod.js → dist/LexicalDecoratorBlockNode.prod.js} +0 -0
  269. /package/{LexicalDecoratorBlockNode.prod.mjs → dist/LexicalDecoratorBlockNode.prod.mjs} +0 -0
  270. /package/{LexicalDraggableBlockPlugin.d.ts → dist/LexicalDraggableBlockPlugin.d.ts} +0 -0
  271. /package/{LexicalDraggableBlockPlugin.js → dist/LexicalDraggableBlockPlugin.js} +0 -0
  272. /package/{LexicalDraggableBlockPlugin.js.flow → dist/LexicalDraggableBlockPlugin.js.flow} +0 -0
  273. /package/{LexicalDraggableBlockPlugin.mjs → dist/LexicalDraggableBlockPlugin.mjs} +0 -0
  274. /package/{LexicalDraggableBlockPlugin.node.mjs → dist/LexicalDraggableBlockPlugin.node.mjs} +0 -0
  275. /package/{LexicalEditorRefPlugin.d.ts → dist/LexicalEditorRefPlugin.d.ts} +0 -0
  276. /package/{LexicalEditorRefPlugin.dev.js → dist/LexicalEditorRefPlugin.dev.js} +0 -0
  277. /package/{LexicalEditorRefPlugin.dev.mjs → dist/LexicalEditorRefPlugin.dev.mjs} +0 -0
  278. /package/{LexicalEditorRefPlugin.js → dist/LexicalEditorRefPlugin.js} +0 -0
  279. /package/{LexicalEditorRefPlugin.js.flow → dist/LexicalEditorRefPlugin.js.flow} +0 -0
  280. /package/{LexicalEditorRefPlugin.mjs → dist/LexicalEditorRefPlugin.mjs} +0 -0
  281. /package/{LexicalEditorRefPlugin.node.mjs → dist/LexicalEditorRefPlugin.node.mjs} +0 -0
  282. /package/{LexicalEditorRefPlugin.prod.js → dist/LexicalEditorRefPlugin.prod.js} +0 -0
  283. /package/{LexicalEditorRefPlugin.prod.mjs → dist/LexicalEditorRefPlugin.prod.mjs} +0 -0
  284. /package/{LexicalErrorBoundary.d.ts → dist/LexicalErrorBoundary.d.ts} +0 -0
  285. /package/{LexicalErrorBoundary.dev.js → dist/LexicalErrorBoundary.dev.js} +0 -0
  286. /package/{LexicalErrorBoundary.dev.mjs → dist/LexicalErrorBoundary.dev.mjs} +0 -0
  287. /package/{LexicalErrorBoundary.js → dist/LexicalErrorBoundary.js} +0 -0
  288. /package/{LexicalErrorBoundary.js.flow → dist/LexicalErrorBoundary.js.flow} +0 -0
  289. /package/{LexicalErrorBoundary.mjs → dist/LexicalErrorBoundary.mjs} +0 -0
  290. /package/{LexicalErrorBoundary.node.mjs → dist/LexicalErrorBoundary.node.mjs} +0 -0
  291. /package/{LexicalErrorBoundary.prod.js → dist/LexicalErrorBoundary.prod.js} +0 -0
  292. /package/{LexicalErrorBoundary.prod.mjs → dist/LexicalErrorBoundary.prod.mjs} +0 -0
  293. /package/{LexicalExtensionComponent.dev.js → dist/LexicalExtensionComponent.dev.js} +0 -0
  294. /package/{LexicalExtensionComponent.dev.mjs → dist/LexicalExtensionComponent.dev.mjs} +0 -0
  295. /package/{LexicalExtensionComponent.js → dist/LexicalExtensionComponent.js} +0 -0
  296. /package/{LexicalExtensionComponent.js.flow → dist/LexicalExtensionComponent.js.flow} +0 -0
  297. /package/{LexicalExtensionComponent.mjs → dist/LexicalExtensionComponent.mjs} +0 -0
  298. /package/{LexicalExtensionComponent.node.mjs → dist/LexicalExtensionComponent.node.mjs} +0 -0
  299. /package/{LexicalExtensionComponent.prod.js → dist/LexicalExtensionComponent.prod.js} +0 -0
  300. /package/{LexicalExtensionComponent.prod.mjs → dist/LexicalExtensionComponent.prod.mjs} +0 -0
  301. /package/{LexicalExtensionComposer.d.ts → dist/LexicalExtensionComposer.d.ts} +0 -0
  302. /package/{LexicalExtensionComposer.dev.js → dist/LexicalExtensionComposer.dev.js} +0 -0
  303. /package/{LexicalExtensionComposer.dev.mjs → dist/LexicalExtensionComposer.dev.mjs} +0 -0
  304. /package/{LexicalExtensionComposer.js → dist/LexicalExtensionComposer.js} +0 -0
  305. /package/{LexicalExtensionComposer.js.flow → dist/LexicalExtensionComposer.js.flow} +0 -0
  306. /package/{LexicalExtensionComposer.mjs → dist/LexicalExtensionComposer.mjs} +0 -0
  307. /package/{LexicalExtensionComposer.node.mjs → dist/LexicalExtensionComposer.node.mjs} +0 -0
  308. /package/{LexicalExtensionComposer.prod.js → dist/LexicalExtensionComposer.prod.js} +0 -0
  309. /package/{LexicalExtensionComposer.prod.mjs → dist/LexicalExtensionComposer.prod.mjs} +0 -0
  310. /package/{LexicalExtensionEditorComposer.d.ts → dist/LexicalExtensionEditorComposer.d.ts} +0 -0
  311. /package/{LexicalExtensionEditorComposer.dev.js → dist/LexicalExtensionEditorComposer.dev.js} +0 -0
  312. /package/{LexicalExtensionEditorComposer.dev.mjs → dist/LexicalExtensionEditorComposer.dev.mjs} +0 -0
  313. /package/{LexicalExtensionEditorComposer.js → dist/LexicalExtensionEditorComposer.js} +0 -0
  314. /package/{LexicalExtensionEditorComposer.js.flow → dist/LexicalExtensionEditorComposer.js.flow} +0 -0
  315. /package/{LexicalExtensionEditorComposer.mjs → dist/LexicalExtensionEditorComposer.mjs} +0 -0
  316. /package/{LexicalExtensionEditorComposer.node.mjs → dist/LexicalExtensionEditorComposer.node.mjs} +0 -0
  317. /package/{LexicalExtensionEditorComposer.prod.js → dist/LexicalExtensionEditorComposer.prod.js} +0 -0
  318. /package/{LexicalExtensionEditorComposer.prod.mjs → dist/LexicalExtensionEditorComposer.prod.mjs} +0 -0
  319. /package/{LexicalHashtagPlugin.d.ts → dist/LexicalHashtagPlugin.d.ts} +0 -0
  320. /package/{LexicalHashtagPlugin.dev.js → dist/LexicalHashtagPlugin.dev.js} +0 -0
  321. /package/{LexicalHashtagPlugin.dev.mjs → dist/LexicalHashtagPlugin.dev.mjs} +0 -0
  322. /package/{LexicalHashtagPlugin.js → dist/LexicalHashtagPlugin.js} +0 -0
  323. /package/{LexicalHashtagPlugin.js.flow → dist/LexicalHashtagPlugin.js.flow} +0 -0
  324. /package/{LexicalHashtagPlugin.mjs → dist/LexicalHashtagPlugin.mjs} +0 -0
  325. /package/{LexicalHashtagPlugin.node.mjs → dist/LexicalHashtagPlugin.node.mjs} +0 -0
  326. /package/{LexicalHashtagPlugin.prod.js → dist/LexicalHashtagPlugin.prod.js} +0 -0
  327. /package/{LexicalHashtagPlugin.prod.mjs → dist/LexicalHashtagPlugin.prod.mjs} +0 -0
  328. /package/{LexicalHistoryPlugin.d.ts → dist/LexicalHistoryPlugin.d.ts} +0 -0
  329. /package/{LexicalHistoryPlugin.dev.js → dist/LexicalHistoryPlugin.dev.js} +0 -0
  330. /package/{LexicalHistoryPlugin.dev.mjs → dist/LexicalHistoryPlugin.dev.mjs} +0 -0
  331. /package/{LexicalHistoryPlugin.js → dist/LexicalHistoryPlugin.js} +0 -0
  332. /package/{LexicalHistoryPlugin.js.flow → dist/LexicalHistoryPlugin.js.flow} +0 -0
  333. /package/{LexicalHistoryPlugin.mjs → dist/LexicalHistoryPlugin.mjs} +0 -0
  334. /package/{LexicalHistoryPlugin.node.mjs → dist/LexicalHistoryPlugin.node.mjs} +0 -0
  335. /package/{LexicalHistoryPlugin.prod.js → dist/LexicalHistoryPlugin.prod.js} +0 -0
  336. /package/{LexicalHistoryPlugin.prod.mjs → dist/LexicalHistoryPlugin.prod.mjs} +0 -0
  337. /package/{LexicalHorizontalRuleNode.d.ts → dist/LexicalHorizontalRuleNode.d.ts} +0 -0
  338. /package/{LexicalHorizontalRuleNode.dev.js → dist/LexicalHorizontalRuleNode.dev.js} +0 -0
  339. /package/{LexicalHorizontalRuleNode.dev.mjs → dist/LexicalHorizontalRuleNode.dev.mjs} +0 -0
  340. /package/{LexicalHorizontalRuleNode.js → dist/LexicalHorizontalRuleNode.js} +0 -0
  341. /package/{LexicalHorizontalRuleNode.js.flow → dist/LexicalHorizontalRuleNode.js.flow} +0 -0
  342. /package/{LexicalHorizontalRuleNode.mjs → dist/LexicalHorizontalRuleNode.mjs} +0 -0
  343. /package/{LexicalHorizontalRuleNode.node.mjs → dist/LexicalHorizontalRuleNode.node.mjs} +0 -0
  344. /package/{LexicalHorizontalRuleNode.prod.js → dist/LexicalHorizontalRuleNode.prod.js} +0 -0
  345. /package/{LexicalHorizontalRuleNode.prod.mjs → dist/LexicalHorizontalRuleNode.prod.mjs} +0 -0
  346. /package/{LexicalHorizontalRulePlugin.d.ts → dist/LexicalHorizontalRulePlugin.d.ts} +0 -0
  347. /package/{LexicalHorizontalRulePlugin.dev.js → dist/LexicalHorizontalRulePlugin.dev.js} +0 -0
  348. /package/{LexicalHorizontalRulePlugin.dev.mjs → dist/LexicalHorizontalRulePlugin.dev.mjs} +0 -0
  349. /package/{LexicalHorizontalRulePlugin.js → dist/LexicalHorizontalRulePlugin.js} +0 -0
  350. /package/{LexicalHorizontalRulePlugin.js.flow → dist/LexicalHorizontalRulePlugin.js.flow} +0 -0
  351. /package/{LexicalHorizontalRulePlugin.mjs → dist/LexicalHorizontalRulePlugin.mjs} +0 -0
  352. /package/{LexicalHorizontalRulePlugin.node.mjs → dist/LexicalHorizontalRulePlugin.node.mjs} +0 -0
  353. /package/{LexicalHorizontalRulePlugin.prod.js → dist/LexicalHorizontalRulePlugin.prod.js} +0 -0
  354. /package/{LexicalHorizontalRulePlugin.prod.mjs → dist/LexicalHorizontalRulePlugin.prod.mjs} +0 -0
  355. /package/{LexicalLinkPlugin.d.ts → dist/LexicalLinkPlugin.d.ts} +0 -0
  356. /package/{LexicalLinkPlugin.dev.js → dist/LexicalLinkPlugin.dev.js} +0 -0
  357. /package/{LexicalLinkPlugin.dev.mjs → dist/LexicalLinkPlugin.dev.mjs} +0 -0
  358. /package/{LexicalLinkPlugin.js → dist/LexicalLinkPlugin.js} +0 -0
  359. /package/{LexicalLinkPlugin.js.flow → dist/LexicalLinkPlugin.js.flow} +0 -0
  360. /package/{LexicalLinkPlugin.mjs → dist/LexicalLinkPlugin.mjs} +0 -0
  361. /package/{LexicalLinkPlugin.node.mjs → dist/LexicalLinkPlugin.node.mjs} +0 -0
  362. /package/{LexicalLinkPlugin.prod.js → dist/LexicalLinkPlugin.prod.js} +0 -0
  363. /package/{LexicalLinkPlugin.prod.mjs → dist/LexicalLinkPlugin.prod.mjs} +0 -0
  364. /package/{LexicalListPlugin.d.ts → dist/LexicalListPlugin.d.ts} +0 -0
  365. /package/{LexicalListPlugin.dev.js → dist/LexicalListPlugin.dev.js} +0 -0
  366. /package/{LexicalListPlugin.dev.mjs → dist/LexicalListPlugin.dev.mjs} +0 -0
  367. /package/{LexicalListPlugin.js → dist/LexicalListPlugin.js} +0 -0
  368. /package/{LexicalListPlugin.js.flow → dist/LexicalListPlugin.js.flow} +0 -0
  369. /package/{LexicalListPlugin.mjs → dist/LexicalListPlugin.mjs} +0 -0
  370. /package/{LexicalListPlugin.node.mjs → dist/LexicalListPlugin.node.mjs} +0 -0
  371. /package/{LexicalListPlugin.prod.js → dist/LexicalListPlugin.prod.js} +0 -0
  372. /package/{LexicalListPlugin.prod.mjs → dist/LexicalListPlugin.prod.mjs} +0 -0
  373. /package/{LexicalMarkdownShortcutPlugin.d.ts → dist/LexicalMarkdownShortcutPlugin.d.ts} +0 -0
  374. /package/{LexicalMarkdownShortcutPlugin.dev.js → dist/LexicalMarkdownShortcutPlugin.dev.js} +0 -0
  375. /package/{LexicalMarkdownShortcutPlugin.dev.mjs → dist/LexicalMarkdownShortcutPlugin.dev.mjs} +0 -0
  376. /package/{LexicalMarkdownShortcutPlugin.js → dist/LexicalMarkdownShortcutPlugin.js} +0 -0
  377. /package/{LexicalMarkdownShortcutPlugin.js.flow → dist/LexicalMarkdownShortcutPlugin.js.flow} +0 -0
  378. /package/{LexicalMarkdownShortcutPlugin.mjs → dist/LexicalMarkdownShortcutPlugin.mjs} +0 -0
  379. /package/{LexicalMarkdownShortcutPlugin.node.mjs → dist/LexicalMarkdownShortcutPlugin.node.mjs} +0 -0
  380. /package/{LexicalMarkdownShortcutPlugin.prod.js → dist/LexicalMarkdownShortcutPlugin.prod.js} +0 -0
  381. /package/{LexicalMarkdownShortcutPlugin.prod.mjs → dist/LexicalMarkdownShortcutPlugin.prod.mjs} +0 -0
  382. /package/{LexicalNestedComposer.d.ts → dist/LexicalNestedComposer.d.ts} +0 -0
  383. /package/{LexicalNestedComposer.js → dist/LexicalNestedComposer.js} +0 -0
  384. /package/{LexicalNestedComposer.js.flow → dist/LexicalNestedComposer.js.flow} +0 -0
  385. /package/{LexicalNestedComposer.mjs → dist/LexicalNestedComposer.mjs} +0 -0
  386. /package/{LexicalNestedComposer.node.mjs → dist/LexicalNestedComposer.node.mjs} +0 -0
  387. /package/{LexicalNestedComposer.prod.js → dist/LexicalNestedComposer.prod.js} +0 -0
  388. /package/{LexicalNestedComposer.prod.mjs → dist/LexicalNestedComposer.prod.mjs} +0 -0
  389. /package/{LexicalNodeContextMenuPlugin.d.ts → dist/LexicalNodeContextMenuPlugin.d.ts} +0 -0
  390. /package/{LexicalNodeContextMenuPlugin.dev.js → dist/LexicalNodeContextMenuPlugin.dev.js} +0 -0
  391. /package/{LexicalNodeContextMenuPlugin.dev.mjs → dist/LexicalNodeContextMenuPlugin.dev.mjs} +0 -0
  392. /package/{LexicalNodeContextMenuPlugin.js → dist/LexicalNodeContextMenuPlugin.js} +0 -0
  393. /package/{LexicalNodeContextMenuPlugin.js.flow → dist/LexicalNodeContextMenuPlugin.js.flow} +0 -0
  394. /package/{LexicalNodeContextMenuPlugin.mjs → dist/LexicalNodeContextMenuPlugin.mjs} +0 -0
  395. /package/{LexicalNodeContextMenuPlugin.node.mjs → dist/LexicalNodeContextMenuPlugin.node.mjs} +0 -0
  396. /package/{LexicalNodeContextMenuPlugin.prod.js → dist/LexicalNodeContextMenuPlugin.prod.js} +0 -0
  397. /package/{LexicalNodeContextMenuPlugin.prod.mjs → dist/LexicalNodeContextMenuPlugin.prod.mjs} +0 -0
  398. /package/{LexicalNodeEventPlugin.d.ts → dist/LexicalNodeEventPlugin.d.ts} +0 -0
  399. /package/{LexicalNodeEventPlugin.dev.js → dist/LexicalNodeEventPlugin.dev.js} +0 -0
  400. /package/{LexicalNodeEventPlugin.dev.mjs → dist/LexicalNodeEventPlugin.dev.mjs} +0 -0
  401. /package/{LexicalNodeEventPlugin.js → dist/LexicalNodeEventPlugin.js} +0 -0
  402. /package/{LexicalNodeEventPlugin.js.flow → dist/LexicalNodeEventPlugin.js.flow} +0 -0
  403. /package/{LexicalNodeEventPlugin.mjs → dist/LexicalNodeEventPlugin.mjs} +0 -0
  404. /package/{LexicalNodeEventPlugin.node.mjs → dist/LexicalNodeEventPlugin.node.mjs} +0 -0
  405. /package/{LexicalNodeEventPlugin.prod.js → dist/LexicalNodeEventPlugin.prod.js} +0 -0
  406. /package/{LexicalNodeEventPlugin.prod.mjs → dist/LexicalNodeEventPlugin.prod.mjs} +0 -0
  407. /package/{LexicalNodeMenuPlugin.d.ts → dist/LexicalNodeMenuPlugin.d.ts} +0 -0
  408. /package/{LexicalNodeMenuPlugin.js → dist/LexicalNodeMenuPlugin.js} +0 -0
  409. /package/{LexicalNodeMenuPlugin.js.flow → dist/LexicalNodeMenuPlugin.js.flow} +0 -0
  410. /package/{LexicalNodeMenuPlugin.mjs → dist/LexicalNodeMenuPlugin.mjs} +0 -0
  411. /package/{LexicalNodeMenuPlugin.node.mjs → dist/LexicalNodeMenuPlugin.node.mjs} +0 -0
  412. /package/{LexicalOnChangePlugin.d.ts → dist/LexicalOnChangePlugin.d.ts} +0 -0
  413. /package/{LexicalOnChangePlugin.js → dist/LexicalOnChangePlugin.js} +0 -0
  414. /package/{LexicalOnChangePlugin.js.flow → dist/LexicalOnChangePlugin.js.flow} +0 -0
  415. /package/{LexicalOnChangePlugin.mjs → dist/LexicalOnChangePlugin.mjs} +0 -0
  416. /package/{LexicalOnChangePlugin.node.mjs → dist/LexicalOnChangePlugin.node.mjs} +0 -0
  417. /package/{LexicalPlainTextPlugin.d.ts → dist/LexicalPlainTextPlugin.d.ts} +0 -0
  418. /package/{LexicalPlainTextPlugin.js → dist/LexicalPlainTextPlugin.js} +0 -0
  419. /package/{LexicalPlainTextPlugin.js.flow → dist/LexicalPlainTextPlugin.js.flow} +0 -0
  420. /package/{LexicalPlainTextPlugin.mjs → dist/LexicalPlainTextPlugin.mjs} +0 -0
  421. /package/{LexicalPlainTextPlugin.node.mjs → dist/LexicalPlainTextPlugin.node.mjs} +0 -0
  422. /package/{LexicalReactExtension.dev.js → dist/LexicalReactExtension.dev.js} +0 -0
  423. /package/{LexicalReactExtension.dev.mjs → dist/LexicalReactExtension.dev.mjs} +0 -0
  424. /package/{LexicalReactExtension.js → dist/LexicalReactExtension.js} +0 -0
  425. /package/{LexicalReactExtension.js.flow → dist/LexicalReactExtension.js.flow} +0 -0
  426. /package/{LexicalReactExtension.mjs → dist/LexicalReactExtension.mjs} +0 -0
  427. /package/{LexicalReactExtension.node.mjs → dist/LexicalReactExtension.node.mjs} +0 -0
  428. /package/{LexicalReactExtension.prod.js → dist/LexicalReactExtension.prod.js} +0 -0
  429. /package/{LexicalReactExtension.prod.mjs → dist/LexicalReactExtension.prod.mjs} +0 -0
  430. /package/{LexicalReactPluginHostExtension.dev.js → dist/LexicalReactPluginHostExtension.dev.js} +0 -0
  431. /package/{LexicalReactPluginHostExtension.dev.mjs → dist/LexicalReactPluginHostExtension.dev.mjs} +0 -0
  432. /package/{LexicalReactPluginHostExtension.js → dist/LexicalReactPluginHostExtension.js} +0 -0
  433. /package/{LexicalReactPluginHostExtension.js.flow → dist/LexicalReactPluginHostExtension.js.flow} +0 -0
  434. /package/{LexicalReactPluginHostExtension.mjs → dist/LexicalReactPluginHostExtension.mjs} +0 -0
  435. /package/{LexicalReactPluginHostExtension.node.mjs → dist/LexicalReactPluginHostExtension.node.mjs} +0 -0
  436. /package/{LexicalReactPluginHostExtension.prod.js → dist/LexicalReactPluginHostExtension.prod.js} +0 -0
  437. /package/{LexicalReactPluginHostExtension.prod.mjs → dist/LexicalReactPluginHostExtension.prod.mjs} +0 -0
  438. /package/{LexicalReactProviderExtension.dev.js → dist/LexicalReactProviderExtension.dev.js} +0 -0
  439. /package/{LexicalReactProviderExtension.dev.mjs → dist/LexicalReactProviderExtension.dev.mjs} +0 -0
  440. /package/{LexicalReactProviderExtension.js → dist/LexicalReactProviderExtension.js} +0 -0
  441. /package/{LexicalReactProviderExtension.js.flow → dist/LexicalReactProviderExtension.js.flow} +0 -0
  442. /package/{LexicalReactProviderExtension.mjs → dist/LexicalReactProviderExtension.mjs} +0 -0
  443. /package/{LexicalReactProviderExtension.node.mjs → dist/LexicalReactProviderExtension.node.mjs} +0 -0
  444. /package/{LexicalReactProviderExtension.prod.js → dist/LexicalReactProviderExtension.prod.js} +0 -0
  445. /package/{LexicalReactProviderExtension.prod.mjs → dist/LexicalReactProviderExtension.prod.mjs} +0 -0
  446. /package/{LexicalRichTextPlugin.d.ts → dist/LexicalRichTextPlugin.d.ts} +0 -0
  447. /package/{LexicalRichTextPlugin.js → dist/LexicalRichTextPlugin.js} +0 -0
  448. /package/{LexicalRichTextPlugin.js.flow → dist/LexicalRichTextPlugin.js.flow} +0 -0
  449. /package/{LexicalRichTextPlugin.mjs → dist/LexicalRichTextPlugin.mjs} +0 -0
  450. /package/{LexicalRichTextPlugin.node.mjs → dist/LexicalRichTextPlugin.node.mjs} +0 -0
  451. /package/{LexicalSelectionAlwaysOnDisplay.d.ts → dist/LexicalSelectionAlwaysOnDisplay.d.ts} +0 -0
  452. /package/{LexicalSelectionAlwaysOnDisplay.dev.js → dist/LexicalSelectionAlwaysOnDisplay.dev.js} +0 -0
  453. /package/{LexicalSelectionAlwaysOnDisplay.dev.mjs → dist/LexicalSelectionAlwaysOnDisplay.dev.mjs} +0 -0
  454. /package/{LexicalSelectionAlwaysOnDisplay.js → dist/LexicalSelectionAlwaysOnDisplay.js} +0 -0
  455. /package/{LexicalSelectionAlwaysOnDisplay.js.flow → dist/LexicalSelectionAlwaysOnDisplay.js.flow} +0 -0
  456. /package/{LexicalSelectionAlwaysOnDisplay.mjs → dist/LexicalSelectionAlwaysOnDisplay.mjs} +0 -0
  457. /package/{LexicalSelectionAlwaysOnDisplay.node.mjs → dist/LexicalSelectionAlwaysOnDisplay.node.mjs} +0 -0
  458. /package/{LexicalSelectionAlwaysOnDisplay.prod.js → dist/LexicalSelectionAlwaysOnDisplay.prod.js} +0 -0
  459. /package/{LexicalSelectionAlwaysOnDisplay.prod.mjs → dist/LexicalSelectionAlwaysOnDisplay.prod.mjs} +0 -0
  460. /package/{LexicalTabIndentationPlugin.d.ts → dist/LexicalTabIndentationPlugin.d.ts} +0 -0
  461. /package/{LexicalTabIndentationPlugin.dev.js → dist/LexicalTabIndentationPlugin.dev.js} +0 -0
  462. /package/{LexicalTabIndentationPlugin.dev.mjs → dist/LexicalTabIndentationPlugin.dev.mjs} +0 -0
  463. /package/{LexicalTabIndentationPlugin.js → dist/LexicalTabIndentationPlugin.js} +0 -0
  464. /package/{LexicalTabIndentationPlugin.js.flow → dist/LexicalTabIndentationPlugin.js.flow} +0 -0
  465. /package/{LexicalTabIndentationPlugin.mjs → dist/LexicalTabIndentationPlugin.mjs} +0 -0
  466. /package/{LexicalTabIndentationPlugin.node.mjs → dist/LexicalTabIndentationPlugin.node.mjs} +0 -0
  467. /package/{LexicalTabIndentationPlugin.prod.js → dist/LexicalTabIndentationPlugin.prod.js} +0 -0
  468. /package/{LexicalTabIndentationPlugin.prod.mjs → dist/LexicalTabIndentationPlugin.prod.mjs} +0 -0
  469. /package/{LexicalTableOfContentsPlugin.d.ts → dist/LexicalTableOfContentsPlugin.d.ts} +0 -0
  470. /package/{LexicalTableOfContentsPlugin.dev.js → dist/LexicalTableOfContentsPlugin.dev.js} +0 -0
  471. /package/{LexicalTableOfContentsPlugin.dev.mjs → dist/LexicalTableOfContentsPlugin.dev.mjs} +0 -0
  472. /package/{LexicalTableOfContentsPlugin.js → dist/LexicalTableOfContentsPlugin.js} +0 -0
  473. /package/{LexicalTableOfContentsPlugin.js.flow → dist/LexicalTableOfContentsPlugin.js.flow} +0 -0
  474. /package/{LexicalTableOfContentsPlugin.mjs → dist/LexicalTableOfContentsPlugin.mjs} +0 -0
  475. /package/{LexicalTableOfContentsPlugin.node.mjs → dist/LexicalTableOfContentsPlugin.node.mjs} +0 -0
  476. /package/{LexicalTableOfContentsPlugin.prod.js → dist/LexicalTableOfContentsPlugin.prod.js} +0 -0
  477. /package/{LexicalTableOfContentsPlugin.prod.mjs → dist/LexicalTableOfContentsPlugin.prod.mjs} +0 -0
  478. /package/{LexicalTablePlugin.d.ts → dist/LexicalTablePlugin.d.ts} +0 -0
  479. /package/{LexicalTablePlugin.js → dist/LexicalTablePlugin.js} +0 -0
  480. /package/{LexicalTablePlugin.js.flow → dist/LexicalTablePlugin.js.flow} +0 -0
  481. /package/{LexicalTablePlugin.mjs → dist/LexicalTablePlugin.mjs} +0 -0
  482. /package/{LexicalTablePlugin.node.mjs → dist/LexicalTablePlugin.node.mjs} +0 -0
  483. /package/{LexicalTreeView.d.ts → dist/LexicalTreeView.d.ts} +0 -0
  484. /package/{LexicalTreeView.dev.js → dist/LexicalTreeView.dev.js} +0 -0
  485. /package/{LexicalTreeView.dev.mjs → dist/LexicalTreeView.dev.mjs} +0 -0
  486. /package/{LexicalTreeView.js → dist/LexicalTreeView.js} +0 -0
  487. /package/{LexicalTreeView.js.flow → dist/LexicalTreeView.js.flow} +0 -0
  488. /package/{LexicalTreeView.mjs → dist/LexicalTreeView.mjs} +0 -0
  489. /package/{LexicalTreeView.node.mjs → dist/LexicalTreeView.node.mjs} +0 -0
  490. /package/{LexicalTreeView.prod.js → dist/LexicalTreeView.prod.js} +0 -0
  491. /package/{LexicalTreeView.prod.mjs → dist/LexicalTreeView.prod.mjs} +0 -0
  492. /package/{LexicalTreeViewExtension.dev.js → dist/LexicalTreeViewExtension.dev.js} +0 -0
  493. /package/{LexicalTreeViewExtension.dev.mjs → dist/LexicalTreeViewExtension.dev.mjs} +0 -0
  494. /package/{LexicalTreeViewExtension.js → dist/LexicalTreeViewExtension.js} +0 -0
  495. /package/{LexicalTreeViewExtension.js.flow → dist/LexicalTreeViewExtension.js.flow} +0 -0
  496. /package/{LexicalTreeViewExtension.mjs → dist/LexicalTreeViewExtension.mjs} +0 -0
  497. /package/{LexicalTreeViewExtension.node.mjs → dist/LexicalTreeViewExtension.node.mjs} +0 -0
  498. /package/{LexicalTreeViewExtension.prod.js → dist/LexicalTreeViewExtension.prod.js} +0 -0
  499. /package/{LexicalTreeViewExtension.prod.mjs → dist/LexicalTreeViewExtension.prod.mjs} +0 -0
  500. /package/{LexicalTypeaheadMenuPlugin.d.ts → dist/LexicalTypeaheadMenuPlugin.d.ts} +0 -0
  501. /package/{LexicalTypeaheadMenuPlugin.js → dist/LexicalTypeaheadMenuPlugin.js} +0 -0
  502. /package/{LexicalTypeaheadMenuPlugin.js.flow → dist/LexicalTypeaheadMenuPlugin.js.flow} +0 -0
  503. /package/{LexicalTypeaheadMenuPlugin.mjs → dist/LexicalTypeaheadMenuPlugin.mjs} +0 -0
  504. /package/{LexicalTypeaheadMenuPlugin.node.mjs → dist/LexicalTypeaheadMenuPlugin.node.mjs} +0 -0
  505. /package/{ReactExtension.d.ts → dist/ReactExtension.d.ts} +0 -0
  506. /package/{ReactPluginHostExtension.d.ts → dist/ReactPluginHostExtension.d.ts} +0 -0
  507. /package/{ReactProviderExtension.d.ts → dist/ReactProviderExtension.d.ts} +0 -0
  508. /package/{TreeViewExtension.d.ts → dist/TreeViewExtension.d.ts} +0 -0
  509. /package/{shared → dist/shared}/LegacyDecorators.d.ts +0 -0
  510. /package/{shared → dist/shared}/LexicalContentEditableElement.d.ts +0 -0
  511. /package/{shared → dist/shared}/LexicalMenu.d.ts +0 -0
  512. /package/{shared → dist/shared}/buildEditorComponent.d.ts +0 -0
  513. /package/{shared → dist/shared}/mergeRefs.d.ts +0 -0
  514. /package/{shared → dist/shared}/point.d.ts +0 -0
  515. /package/{shared → dist/shared}/rect.d.ts +0 -0
  516. /package/{shared → dist/shared}/types.d.ts +0 -0
  517. /package/{shared → dist/shared}/useCanShowPlaceholder.d.ts +0 -0
  518. /package/{shared → dist/shared}/useCharacterLimit.d.ts +0 -0
  519. /package/{shared → dist/shared}/useDecorators.d.ts +0 -0
  520. /package/{shared → dist/shared}/useHistory.d.ts +0 -0
  521. /package/{shared → dist/shared}/useList.d.ts +0 -0
  522. /package/{shared → dist/shared}/usePlainTextSetup.d.ts +0 -0
  523. /package/{shared → dist/shared}/useReactDecorators.d.ts +0 -0
  524. /package/{shared → dist/shared}/useRichTextSetup.d.ts +0 -0
  525. /package/{shared → dist/shared}/useYjsCollaboration.d.ts +0 -0
  526. /package/{useExtensionComponent.d.ts → dist/useExtensionComponent.d.ts} +0 -0
  527. /package/{useExtensionSignalValue.d.ts → dist/useExtensionSignalValue.d.ts} +0 -0
  528. /package/{useLexicalEditable.d.ts → dist/useLexicalEditable.d.ts} +0 -0
  529. /package/{useLexicalEditable.js → dist/useLexicalEditable.js} +0 -0
  530. /package/{useLexicalEditable.js.flow → dist/useLexicalEditable.js.flow} +0 -0
  531. /package/{useLexicalEditable.mjs → dist/useLexicalEditable.mjs} +0 -0
  532. /package/{useLexicalEditable.node.mjs → dist/useLexicalEditable.node.mjs} +0 -0
  533. /package/{useLexicalExtensionComponent.dev.js → dist/useLexicalExtensionComponent.dev.js} +0 -0
  534. /package/{useLexicalExtensionComponent.dev.mjs → dist/useLexicalExtensionComponent.dev.mjs} +0 -0
  535. /package/{useLexicalExtensionComponent.js → dist/useLexicalExtensionComponent.js} +0 -0
  536. /package/{useLexicalExtensionComponent.js.flow → dist/useLexicalExtensionComponent.js.flow} +0 -0
  537. /package/{useLexicalExtensionComponent.mjs → dist/useLexicalExtensionComponent.mjs} +0 -0
  538. /package/{useLexicalExtensionComponent.node.mjs → dist/useLexicalExtensionComponent.node.mjs} +0 -0
  539. /package/{useLexicalExtensionComponent.prod.js → dist/useLexicalExtensionComponent.prod.js} +0 -0
  540. /package/{useLexicalExtensionComponent.prod.mjs → dist/useLexicalExtensionComponent.prod.mjs} +0 -0
  541. /package/{useLexicalExtensionSignalValue.dev.js → dist/useLexicalExtensionSignalValue.dev.js} +0 -0
  542. /package/{useLexicalExtensionSignalValue.dev.mjs → dist/useLexicalExtensionSignalValue.dev.mjs} +0 -0
  543. /package/{useLexicalExtensionSignalValue.js → dist/useLexicalExtensionSignalValue.js} +0 -0
  544. /package/{useLexicalExtensionSignalValue.js.flow → dist/useLexicalExtensionSignalValue.js.flow} +0 -0
  545. /package/{useLexicalExtensionSignalValue.mjs → dist/useLexicalExtensionSignalValue.mjs} +0 -0
  546. /package/{useLexicalExtensionSignalValue.node.mjs → dist/useLexicalExtensionSignalValue.node.mjs} +0 -0
  547. /package/{useLexicalExtensionSignalValue.prod.js → dist/useLexicalExtensionSignalValue.prod.js} +0 -0
  548. /package/{useLexicalExtensionSignalValue.prod.mjs → dist/useLexicalExtensionSignalValue.prod.mjs} +0 -0
  549. /package/{useLexicalIsTextContentEmpty.d.ts → dist/useLexicalIsTextContentEmpty.d.ts} +0 -0
  550. /package/{useLexicalIsTextContentEmpty.js → dist/useLexicalIsTextContentEmpty.js} +0 -0
  551. /package/{useLexicalIsTextContentEmpty.js.flow → dist/useLexicalIsTextContentEmpty.js.flow} +0 -0
  552. /package/{useLexicalIsTextContentEmpty.mjs → dist/useLexicalIsTextContentEmpty.mjs} +0 -0
  553. /package/{useLexicalIsTextContentEmpty.node.mjs → dist/useLexicalIsTextContentEmpty.node.mjs} +0 -0
  554. /package/{useLexicalNodeSelection.d.ts → dist/useLexicalNodeSelection.d.ts} +0 -0
  555. /package/{useLexicalNodeSelection.dev.js → dist/useLexicalNodeSelection.dev.js} +0 -0
  556. /package/{useLexicalNodeSelection.dev.mjs → dist/useLexicalNodeSelection.dev.mjs} +0 -0
  557. /package/{useLexicalNodeSelection.js → dist/useLexicalNodeSelection.js} +0 -0
  558. /package/{useLexicalNodeSelection.js.flow → dist/useLexicalNodeSelection.js.flow} +0 -0
  559. /package/{useLexicalNodeSelection.mjs → dist/useLexicalNodeSelection.mjs} +0 -0
  560. /package/{useLexicalNodeSelection.node.mjs → dist/useLexicalNodeSelection.node.mjs} +0 -0
  561. /package/{useLexicalNodeSelection.prod.js → dist/useLexicalNodeSelection.prod.js} +0 -0
  562. /package/{useLexicalNodeSelection.prod.mjs → dist/useLexicalNodeSelection.prod.mjs} +0 -0
  563. /package/{useLexicalSubscription.d.ts → dist/useLexicalSubscription.d.ts} +0 -0
  564. /package/{useLexicalSubscription.js → dist/useLexicalSubscription.js} +0 -0
  565. /package/{useLexicalSubscription.js.flow → dist/useLexicalSubscription.js.flow} +0 -0
  566. /package/{useLexicalSubscription.mjs → dist/useLexicalSubscription.mjs} +0 -0
  567. /package/{useLexicalSubscription.node.mjs → dist/useLexicalSubscription.node.mjs} +0 -0
  568. /package/{useLexicalTextEntity.d.ts → dist/useLexicalTextEntity.d.ts} +0 -0
  569. /package/{useLexicalTextEntity.dev.js → dist/useLexicalTextEntity.dev.js} +0 -0
  570. /package/{useLexicalTextEntity.dev.mjs → dist/useLexicalTextEntity.dev.mjs} +0 -0
  571. /package/{useLexicalTextEntity.js → dist/useLexicalTextEntity.js} +0 -0
  572. /package/{useLexicalTextEntity.js.flow → dist/useLexicalTextEntity.js.flow} +0 -0
  573. /package/{useLexicalTextEntity.mjs → dist/useLexicalTextEntity.mjs} +0 -0
  574. /package/{useLexicalTextEntity.node.mjs → dist/useLexicalTextEntity.node.mjs} +0 -0
  575. /package/{useLexicalTextEntity.prod.js → dist/useLexicalTextEntity.prod.js} +0 -0
  576. /package/{useLexicalTextEntity.prod.mjs → dist/useLexicalTextEntity.prod.mjs} +0 -0
package/README.md CHANGED
@@ -10,7 +10,7 @@ Install `lexical` and `@lexical/react`:
10
10
  npm install --save lexical @lexical/react
11
11
  ```
12
12
 
13
- Below is an example of a basic plain text editor using `lexical` and `@lexical/react` ([try it yourself](https://stackblitz.com/github/facebook/lexical/tree/main/examples/react-plain-text?embed=1&file=src%2FApp.tsx&terminalHeight=0&ctl=1&showSidebar=0&devtoolsheight=0&view=preview)).
13
+ Below is an example of a basic plain text editor using `lexical` and `@lexical/react` ([try it yourself](https://stackblitz.com/github/facebook/lexical/tree/main/examples/react-plain-text?file=src%2FApp.tsx&terminalHeight=0&ctl=1&showSidebar=0&devtoolsheight=0&view=preview)).
14
14
 
15
15
  ```jsx
16
16
  import {$getRoot, $getSelection} from 'lexical';
@@ -10,18 +10,9 @@
10
10
 
11
11
  var extension = require('@lexical/extension');
12
12
  var LexicalComposerContext = require('@lexical/react/LexicalComposerContext');
13
+ var lexical = require('lexical');
13
14
  var react = require('react');
14
15
 
15
- /**
16
- * Copyright (c) Meta Platforms, Inc. and affiliates.
17
- *
18
- * This source code is licensed under the MIT license found in the
19
- * LICENSE file in the root directory of this source tree.
20
- *
21
- */
22
-
23
- const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
24
-
25
16
  /**
26
17
  * Copyright (c) Meta Platforms, Inc. and affiliates.
27
18
  *
@@ -34,7 +25,7 @@ const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !==
34
25
  // This workaround is no longer necessary in React 19,
35
26
  // but we currently support React >=17.x
36
27
  // https://github.com/facebook/react/pull/26395
37
- const useLayoutEffectImpl = CAN_USE_DOM ? react.useLayoutEffect : react.useEffect;
28
+ const useLayoutEffectImpl = lexical.CAN_USE_DOM ? react.useLayoutEffect : react.useEffect;
38
29
 
39
30
  /**
40
31
  * Copyright (c) Meta Platforms, Inc. and affiliates.
@@ -8,18 +8,9 @@
8
8
 
9
9
  import { registerClearEditor } from '@lexical/extension';
10
10
  import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
11
+ import { CAN_USE_DOM } from 'lexical';
11
12
  import { useLayoutEffect, useEffect } from 'react';
12
13
 
13
- /**
14
- * Copyright (c) Meta Platforms, Inc. and affiliates.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- *
19
- */
20
-
21
- const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
22
-
23
14
  /**
24
15
  * Copyright (c) Meta Platforms, Inc. and affiliates.
25
16
  *
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ "use strict";var e=require("@lexical/extension"),r=require("@lexical/react/LexicalComposerContext"),t=require("lexical"),i=require("react");const o=t.CAN_USE_DOM?i.useLayoutEffect:i.useEffect;exports.ClearEditorPlugin=function({onClear:t}){const[i]=r.useLexicalComposerContext();return o(()=>e.registerClearEditor(i,t),[i,t]),null};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import{registerClearEditor as o}from"@lexical/extension";import{useLexicalComposerContext as r}from"@lexical/react/LexicalComposerContext";import{CAN_USE_DOM as t}from"lexical";import{useLayoutEffect as e,useEffect as i}from"react";const l=t?e:i;function n({onClear:t}){const[e]=r();return l(()=>o(e,t),[e,t]),null}export{n as ClearEditorPlugin};
@@ -13,16 +13,6 @@ var lexical = require('lexical');
13
13
  var react = require('react');
14
14
  var jsxRuntime = require('react/jsx-runtime');
15
15
 
16
- /**
17
- * Copyright (c) Meta Platforms, Inc. and affiliates.
18
- *
19
- * This source code is licensed under the MIT license found in the
20
- * LICENSE file in the root directory of this source tree.
21
- *
22
- */
23
-
24
- const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
25
-
26
16
  /**
27
17
  * Copyright (c) Meta Platforms, Inc. and affiliates.
28
18
  *
@@ -35,7 +25,7 @@ const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !==
35
25
  // This workaround is no longer necessary in React 19,
36
26
  // but we currently support React >=17.x
37
27
  // https://github.com/facebook/react/pull/26395
38
- const useLayoutEffectImpl = CAN_USE_DOM ? react.useLayoutEffect : react.useEffect;
28
+ const useLayoutEffectImpl = lexical.CAN_USE_DOM ? react.useLayoutEffect : react.useEffect;
39
29
 
40
30
  /**
41
31
  * Copyright (c) Meta Platforms, Inc. and affiliates.
@@ -123,7 +113,7 @@ function initializeEditor(editor, initialEditorState) {
123
113
  if (root.isEmpty()) {
124
114
  const paragraph = lexical.$createParagraphNode();
125
115
  root.append(paragraph);
126
- const activeElement = CAN_USE_DOM ? document.activeElement : null;
116
+ const activeElement = lexical.CAN_USE_DOM ? document.activeElement : null;
127
117
  if (lexical.$getSelection() !== null || activeElement !== null && activeElement === editor.getRootElement()) {
128
118
  paragraph.select();
129
119
  }
@@ -7,20 +7,10 @@
7
7
  */
8
8
 
9
9
  import { createLexicalComposerContext, LexicalComposerContext } from '@lexical/react/LexicalComposerContext';
10
- import { createEditor, $getRoot, $createParagraphNode, $getSelection, HISTORY_MERGE_TAG } from 'lexical';
10
+ import { CAN_USE_DOM, createEditor, $getRoot, $createParagraphNode, $getSelection, HISTORY_MERGE_TAG } from 'lexical';
11
11
  import { useLayoutEffect, useEffect, useMemo } from 'react';
12
12
  import { jsx } from 'react/jsx-runtime';
13
13
 
14
- /**
15
- * Copyright (c) Meta Platforms, Inc. and affiliates.
16
- *
17
- * This source code is licensed under the MIT license found in the
18
- * LICENSE file in the root directory of this source tree.
19
- *
20
- */
21
-
22
- const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
23
-
24
14
  /**
25
15
  * Copyright (c) Meta Platforms, Inc. and affiliates.
26
16
  *
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ "use strict";var e=require("@lexical/react/LexicalComposerContext"),t=require("lexical"),o=require("react"),r=require("react/jsx-runtime");const i=t.CAN_USE_DOM?o.useLayoutEffect:o.useEffect,n={tag:t.HISTORY_MERGE_TAG};exports.LexicalComposer=function({initialConfig:a,children:c}){const s=o.useMemo(()=>{const{theme:o,namespace:r,nodes:i,onError:c,editorState:s,html:l}=a,u=e.createLexicalComposerContext(null,o),d=t.createEditor({editable:a.editable,html:l,namespace:r,nodes:i,onError:e=>c(e,d),theme:o});return function(e,o){if(null===o)return;if(void 0===o)e.update(()=>{const o=t.$getRoot();if(o.isEmpty()){const r=t.$createParagraphNode();o.append(r);const i=t.CAN_USE_DOM?document.activeElement:null;(null!==t.$getSelection()||null!==i&&i===e.getRootElement())&&r.select()}},n);else if(null!==o)switch(typeof o){case"string":{const t=e.parseEditorState(o);e.setEditorState(t,n);break}case"object":e.setEditorState(o,n);break;case"function":e.update(()=>{t.$getRoot().isEmpty()&&o(e)},n)}}(d,s),[d,u]},[]);return i(()=>{const e=a.editable,[t]=s;t.setEditable(void 0===e||e)},[]),r.jsx(e.LexicalComposerContext.Provider,{value:s,children:c})};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import{createLexicalComposerContext as t,LexicalComposerContext as e}from"@lexical/react/LexicalComposerContext";import{CAN_USE_DOM as o,createEditor as n,$getRoot as r,$createParagraphNode as i,$getSelection as a,HISTORY_MERGE_TAG as l}from"lexical";import{useLayoutEffect as c,useEffect as s,useMemo as m}from"react";import{jsx as d}from"react/jsx-runtime";const u=o?c:s,p={tag:l};function f({initialConfig:l,children:c}){const s=m(()=>{const{theme:e,namespace:c,nodes:s,onError:m,editorState:d,html:u}=l,f=t(null,e),E=n({editable:l.editable,html:u,namespace:c,nodes:s,onError:t=>m(t,E),theme:e});return function(t,e){if(null===e)return;if(void 0===e)t.update(()=>{const e=r();if(e.isEmpty()){const n=i();e.append(n);const r=o?document.activeElement:null;(null!==a()||null!==r&&r===t.getRootElement())&&n.select()}},p);else if(null!==e)switch(typeof e){case"string":{const o=t.parseEditorState(e);t.setEditorState(o,p);break}case"object":t.setEditorState(e,p);break;case"function":t.update(()=>{r().isEmpty()&&e(t)},p)}}(E,d),[E,f]},[]);return u(()=>{const t=l.editable,[e]=s;e.setEditable(void 0===t||t)},[]),d(e.Provider,{value:s,children:c})}export{f as LexicalComposer};
@@ -10,6 +10,7 @@
10
10
 
11
11
  var LexicalComposerContext = require('@lexical/react/LexicalComposerContext');
12
12
  var react = require('react');
13
+ var lexical = require('lexical');
13
14
  var jsxRuntime = require('react/jsx-runtime');
14
15
  var text = require('@lexical/text');
15
16
  var utils = require('@lexical/utils');
@@ -22,7 +23,17 @@ var utils = require('@lexical/utils');
22
23
  *
23
24
  */
24
25
 
25
- const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
26
+ function mergeRefs(...refs) {
27
+ return value => {
28
+ for (const ref of refs) {
29
+ if (typeof ref === 'function') {
30
+ ref(value);
31
+ } else if (ref != null) {
32
+ ref.current = value;
33
+ }
34
+ }
35
+ };
36
+ }
26
37
 
27
38
  /**
28
39
  * Copyright (c) Meta Platforms, Inc. and affiliates.
@@ -36,27 +47,7 @@ const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !==
36
47
  // This workaround is no longer necessary in React 19,
37
48
  // but we currently support React >=17.x
38
49
  // https://github.com/facebook/react/pull/26395
39
- const useLayoutEffectImpl = CAN_USE_DOM ? react.useLayoutEffect : react.useEffect;
40
-
41
- /**
42
- * Copyright (c) Meta Platforms, Inc. and affiliates.
43
- *
44
- * This source code is licensed under the MIT license found in the
45
- * LICENSE file in the root directory of this source tree.
46
- *
47
- */
48
-
49
- function mergeRefs(...refs) {
50
- return value => {
51
- for (const ref of refs) {
52
- if (typeof ref === 'function') {
53
- ref(value);
54
- } else if (ref != null) {
55
- ref.current = value;
56
- }
57
- }
58
- };
59
- }
50
+ const useLayoutEffectImpl = lexical.CAN_USE_DOM ? react.useLayoutEffect : react.useEffect;
60
51
 
61
52
  /**
62
53
  * Copyright (c) Meta Platforms, Inc. and affiliates.
@@ -8,6 +8,7 @@
8
8
 
9
9
  import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
10
10
  import { useLayoutEffect, useEffect, forwardRef, useState, useCallback, useMemo } from 'react';
11
+ import { CAN_USE_DOM } from 'lexical';
11
12
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
12
13
  import { $canShowPlaceholderCurry } from '@lexical/text';
13
14
  import { mergeRegister } from '@lexical/utils';
@@ -20,7 +21,17 @@ import { mergeRegister } from '@lexical/utils';
20
21
  *
21
22
  */
22
23
 
23
- const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
24
+ function mergeRefs(...refs) {
25
+ return value => {
26
+ for (const ref of refs) {
27
+ if (typeof ref === 'function') {
28
+ ref(value);
29
+ } else if (ref != null) {
30
+ ref.current = value;
31
+ }
32
+ }
33
+ };
34
+ }
24
35
 
25
36
  /**
26
37
  * Copyright (c) Meta Platforms, Inc. and affiliates.
@@ -36,26 +47,6 @@ const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !==
36
47
  // https://github.com/facebook/react/pull/26395
37
48
  const useLayoutEffectImpl = CAN_USE_DOM ? useLayoutEffect : useEffect;
38
49
 
39
- /**
40
- * Copyright (c) Meta Platforms, Inc. and affiliates.
41
- *
42
- * This source code is licensed under the MIT license found in the
43
- * LICENSE file in the root directory of this source tree.
44
- *
45
- */
46
-
47
- function mergeRefs(...refs) {
48
- return value => {
49
- for (const ref of refs) {
50
- if (typeof ref === 'function') {
51
- ref(value);
52
- } else if (ref != null) {
53
- ref.current = value;
54
- }
55
- }
56
- };
57
- }
58
-
59
50
  /**
60
51
  * Copyright (c) Meta Platforms, Inc. and affiliates.
61
52
  *
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ "use strict";var e=require("@lexical/react/LexicalComposerContext"),t=require("react"),a=require("lexical"),r=require("react/jsx-runtime"),i=require("@lexical/text"),n=require("@lexical/utils");const l=a.CAN_USE_DOM?t.useLayoutEffect:t.useEffect;function o({editor:e,ariaActiveDescendant:a,ariaAutoComplete:i,ariaControls:n,ariaDescribedBy:o,ariaErrorMessage:s,ariaExpanded:u,ariaInvalid:d,ariaLabel:c,ariaLabelledBy:f,ariaMultiline:b,ariaOwns:x,ariaRequired:E,autoCapitalize:m,className:p,id:C,role:v="textbox",spellCheck:y=!0,style:g,tabIndex:L,"data-testid":h,...q},w){const[j,R]=t.useState(e.isEditable()),S=t.useCallback(t=>{t&&t.ownerDocument&&t.ownerDocument.defaultView?e.setRootElement(t):e.setRootElement(null)},[e]),D=t.useMemo(()=>function(...e){return t=>{for(const a of e)"function"==typeof a?a(t):null!=a&&(a.current=t)}}(w,S),[S,w]);return l(()=>(R(e.isEditable()),e.registerEditableListener(e=>{R(e)})),[e]),r.jsx("div",{"aria-activedescendant":j?a:void 0,"aria-autocomplete":j?i:"none","aria-controls":j?n:void 0,"aria-describedby":o,...null!=s?{"aria-errormessage":s}:{},"aria-expanded":j&&"combobox"===v?!!u:void 0,...null!=d?{"aria-invalid":d}:{},"aria-label":c,"aria-labelledby":f,"aria-multiline":b,"aria-owns":j?x:void 0,"aria-readonly":!j||void 0,"aria-required":E,autoCapitalize:m,className:p,contentEditable:j,"data-testid":h,id:C,ref:D,role:v,spellCheck:y,style:g,tabIndex:L,...q})}const s=t.forwardRef(o);function u(e){return e.getEditorState().read(i.$canShowPlaceholderCurry(e.isComposing()))}const d=t.forwardRef(c);function c(t,a){const{placeholder:i,...n}=t,[l]=e.useLexicalComposerContext();return r.jsxs(r.Fragment,{children:[r.jsx(s,{editor:l,...n,ref:a}),null!=i&&r.jsx(f,{editor:l,content:i})]})}function f({content:e,editor:a}){const i=function(e){const[a,r]=t.useState(()=>u(e));return l(()=>{function t(){const t=u(e);r(t)}return t(),n.mergeRegister(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),a}(a),[o,s]=t.useState(a.isEditable());if(t.useLayoutEffect(()=>(s(a.isEditable()),a.registerEditableListener(e=>{s(e)})),[a]),!i)return null;let d=null;return"function"==typeof e?d=e(o):null!==e&&(d=e),null===d?null:r.jsx("div",{"aria-hidden":!0,children:d})}exports.ContentEditable=d,exports.ContentEditableElement=s;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import{useLexicalComposerContext as e}from"@lexical/react/LexicalComposerContext";import{useLayoutEffect as t,useEffect as i,forwardRef as a,useState as r,useCallback as n,useMemo as o}from"react";import{CAN_USE_DOM as l}from"lexical";import{jsx as d,jsxs as s,Fragment as c}from"react/jsx-runtime";import{$canShowPlaceholderCurry as u}from"@lexical/text";import{mergeRegister as m}from"@lexical/utils";const f=l?t:i;function b({editor:e,ariaActiveDescendant:t,ariaAutoComplete:i,ariaControls:a,ariaDescribedBy:l,ariaErrorMessage:s,ariaExpanded:c,ariaInvalid:u,ariaLabel:m,ariaLabelledBy:b,ariaMultiline:p,ariaOwns:x,ariaRequired:E,autoCapitalize:v,className:y,id:C,role:g="textbox",spellCheck:L=!0,style:h,tabIndex:w,"data-testid":D,...I},R){const[k,q]=r(e.isEditable()),z=n(t=>{t&&t.ownerDocument&&t.ownerDocument.defaultView?e.setRootElement(t):e.setRootElement(null)},[e]),A=o(()=>function(...e){return t=>{for(const i of e)"function"==typeof i?i(t):null!=i&&(i.current=t)}}(R,z),[z,R]);return f(()=>(q(e.isEditable()),e.registerEditableListener(e=>{q(e)})),[e]),d("div",{"aria-activedescendant":k?t:void 0,"aria-autocomplete":k?i:"none","aria-controls":k?a:void 0,"aria-describedby":l,...null!=s?{"aria-errormessage":s}:{},"aria-expanded":k&&"combobox"===g?!!c:void 0,...null!=u?{"aria-invalid":u}:{},"aria-label":m,"aria-labelledby":b,"aria-multiline":p,"aria-owns":k?x:void 0,"aria-readonly":!k||void 0,"aria-required":E,autoCapitalize:v,className:y,contentEditable:k,"data-testid":D,id:C,ref:A,role:g,spellCheck:L,style:h,tabIndex:w,...I})}const p=a(b);function x(e){return e.getEditorState().read(u(e.isComposing()))}const E=a(v);function v(t,i){const{placeholder:a,...r}=t,[n]=e();return s(c,{children:[d(p,{editor:n,...r,ref:i}),null!=a&&d(y,{editor:n,content:a})]})}function y({content:e,editor:i}){const a=function(e){const[t,i]=r(()=>x(e));return f(()=>{function t(){const t=x(e);i(t)}return t(),m(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),t}(i),[n,o]=r(i.isEditable());if(t(()=>(o(i.isEditable()),i.registerEditableListener(e=>{o(e)})),[i]),!a)return null;let l=null;return"function"==typeof e?l=e(n):null!==e&&(l=e),null===l?null:d("div",{"aria-hidden":!0,children:l})}export{E as ContentEditable,p as ContentEditableElement};
@@ -16,28 +16,6 @@ var react = require('react');
16
16
  var reactDom = require('react-dom');
17
17
  var jsxRuntime = require('react/jsx-runtime');
18
18
 
19
- /**
20
- * Copyright (c) Meta Platforms, Inc. and affiliates.
21
- *
22
- * This source code is licensed under the MIT license found in the
23
- * LICENSE file in the root directory of this source tree.
24
- *
25
- */
26
-
27
- const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
28
-
29
- /**
30
- * Copyright (c) Meta Platforms, Inc. and affiliates.
31
- *
32
- * This source code is licensed under the MIT license found in the
33
- * LICENSE file in the root directory of this source tree.
34
- *
35
- */
36
-
37
- const documentMode = CAN_USE_DOM && 'documentMode' in document ? document.documentMode : null;
38
- const IS_FIREFOX = CAN_USE_DOM && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);
39
- CAN_USE_DOM && 'InputEvent' in window && !documentMode ? 'getTargetRanges' in new window.InputEvent('input') : false;
40
-
41
19
  /**
42
20
  * Copyright (c) Meta Platforms, Inc. and affiliates.
43
21
  *
@@ -496,7 +474,7 @@ function useDraggableBlockMenu(editor, anchorElem, menuRef, targetLineRef, isEdi
496
474
  }
497
475
  if (targetNode === draggedNode) {
498
476
  // Firefox-specific fix: Even when no move occurs, restore focus to ensure cursor visibility
499
- if (IS_FIREFOX) {
477
+ if (lexical.IS_FIREFOX) {
500
478
  editor.focus();
501
479
  }
502
480
  return true;
@@ -511,7 +489,7 @@ function useDraggableBlockMenu(editor, anchorElem, menuRef, targetLineRef, isEdi
511
489
 
512
490
  // Firefox-specific fix: Use editor.focus() after drop to properly restore
513
491
  // both focus and selection. This ensures cursor visibility immediately.
514
- if (IS_FIREFOX) {
492
+ if (lexical.IS_FIREFOX) {
515
493
  // Using $onUpdate ensures this happens after the current update cycle finishes
516
494
  lexical.$onUpdate(() => {
517
495
  editor.focus();
@@ -530,7 +508,7 @@ function useDraggableBlockMenu(editor, anchorElem, menuRef, targetLineRef, isEdi
530
508
  // Firefox fires blur before dragstart, causing focus loss. We detect this by checking if
531
509
  // the blur's relatedTarget is on the menu using isOnMenu, then restore focus synchronously.
532
510
  react.useEffect(() => {
533
- if (!IS_FIREFOX || !isEditable) {
511
+ if (!lexical.IS_FIREFOX || !isEditable) {
534
512
  return;
535
513
  }
536
514
  return utils.mergeRegister(editor.registerRootListener(rootElement => {
@@ -599,7 +577,7 @@ function useDraggableBlockMenu(editor, anchorElem, menuRef, targetLineRef, isEdi
599
577
  // Firefox-specific: Restore focus synchronously after drag starts to prevent cursor loss.
600
578
  // The blur handler should have already restored focus, but we do it here as a fallback
601
579
  // and to ensure selection is properly maintained during drag.
602
- if (IS_FIREFOX) {
580
+ if (lexical.IS_FIREFOX) {
603
581
  const rootElement = editor.getRootElement();
604
582
  if (rootElement !== null && document.activeElement !== rootElement) {
605
583
  // Restore focus synchronously - don't use requestAnimationFrame as blur already happened
@@ -623,7 +601,7 @@ function useDraggableBlockMenu(editor, anchorElem, menuRef, targetLineRef, isEdi
623
601
 
624
602
  // Firefox-specific fix: Use editor.focus() to properly restore both focus and
625
603
  // selection after drag ends. This ensures cursor visibility immediately.
626
- if (IS_FIREFOX) {
604
+ if (lexical.IS_FIREFOX) {
627
605
  // editor.focus() handles both focus restoration and selection update properly
628
606
  editor.focus();
629
607
  }
@@ -9,33 +9,11 @@
9
9
  import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
10
10
  import { eventFiles } from '@lexical/rich-text';
11
11
  import { calculateZoomLevel, mergeRegister, isHTMLElement } from '@lexical/utils';
12
- import { DRAGOVER_COMMAND, COMMAND_PRIORITY_LOW, DROP_COMMAND, COMMAND_PRIORITY_HIGH, BLUR_COMMAND, $getSelection, $getNodeByKey, $getNearestNodeFromDOMNode, $onUpdate, $getRoot } from 'lexical';
12
+ import { DRAGOVER_COMMAND, COMMAND_PRIORITY_LOW, DROP_COMMAND, COMMAND_PRIORITY_HIGH, IS_FIREFOX, BLUR_COMMAND, $getSelection, $getNodeByKey, $getNearestNodeFromDOMNode, $onUpdate, $getRoot } from 'lexical';
13
13
  import { useRef, useState, useCallback, useEffect } from 'react';
14
14
  import { createPortal } from 'react-dom';
15
15
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
16
16
 
17
- /**
18
- * Copyright (c) Meta Platforms, Inc. and affiliates.
19
- *
20
- * This source code is licensed under the MIT license found in the
21
- * LICENSE file in the root directory of this source tree.
22
- *
23
- */
24
-
25
- const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
26
-
27
- /**
28
- * Copyright (c) Meta Platforms, Inc. and affiliates.
29
- *
30
- * This source code is licensed under the MIT license found in the
31
- * LICENSE file in the root directory of this source tree.
32
- *
33
- */
34
-
35
- const documentMode = CAN_USE_DOM && 'documentMode' in document ? document.documentMode : null;
36
- const IS_FIREFOX = CAN_USE_DOM && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);
37
- CAN_USE_DOM && 'InputEvent' in window && !documentMode ? 'getTargetRanges' in new window.InputEvent('input') : false;
38
-
39
17
  /**
40
18
  * Copyright (c) Meta Platforms, Inc. and affiliates.
41
19
  *
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ "use strict";var t=require("@lexical/react/LexicalComposerContext"),e=require("@lexical/rich-text"),n=require("@lexical/utils"),r=require("lexical"),o=require("react"),i=require("react-dom"),s=require("react/jsx-runtime");class l{_x;_y;constructor(t,e){this._x=t,this._y=e}get x(){return this._x}get y(){return this._y}equals({x:t,y:e}){return this.x===t&&this.y===e}calcDeltaXTo({x:t}){return this.x-t}calcDeltaYTo({y:t}){return this.y-t}calcHorizontalDistanceTo(t){return Math.abs(this.calcDeltaXTo(t))}calcVerticalDistance(t){return Math.abs(this.calcDeltaYTo(t))}calcDistanceTo(t){return Math.sqrt(Math.pow(this.calcDeltaXTo(t),2)+Math.pow(this.calcDeltaYTo(t),2))}}class a{_left;_top;_right;_bottom;constructor(t,e,n,r){const[o,i]=e<=r?[e,r]:[r,e],[s,l]=t<=n?[t,n]:[n,t];this._top=o,this._right=l,this._left=s,this._bottom=i}get top(){return this._top}get right(){return this._right}get bottom(){return this._bottom}get left(){return this._left}get width(){return Math.abs(this._left-this._right)}get height(){return Math.abs(this._bottom-this._top)}equals({top:t,left:e,bottom:n,right:r}){return t===this._top&&n===this._bottom&&e===this._left&&r===this._right}contains(t){if(t instanceof l){const{x:e,y:n}=t,r=n<this._top,o=n>this._bottom,i=e<this._left,s=e>this._right;return{reason:{isOnBottomSide:o,isOnLeftSide:i,isOnRightSide:s,isOnTopSide:r},result:!(r||o||i||s)}}{const{top:e,left:n,bottom:r,right:o}=t;return e>=this._top&&e<=this._bottom&&r>=this._top&&r<=this._bottom&&n>=this._left&&n<=this._right&&o>=this._left&&o<=this._right}}intersectsWith(t){const{left:e,top:n,width:r,height:o}=t,{left:i,top:s,width:l,height:a}=this;return(e+r>=i+l?e+r:i+l)-(e<=i?e:i)<=r+l&&(n+o>=s+a?n+o:s+a)-(n<=s?n:s)<=o+a}generateNewRect({left:t=this.left,top:e=this.top,right:n=this.right,bottom:r=this.bottom}){return new a(t,e,n,r)}static fromLTRB(t,e,n,r){return new a(t,e,n,r)}static fromLWTH(t,e,n,r){return new a(t,n,t+e,n+r)}static fromPoints(t,e){const{y:n,x:r}=t,{y:o,x:i}=e;return a.fromLTRB(r,n,i,o)}static fromDOM(t){const{top:e,width:n,left:r,height:o}=t.getBoundingClientRect();return a.fromLWTH(r,n,e,o)}}const c="application/x-lexical-drag-block";let u=1/0;function g(t){const e=(t,e)=>t?parseFloat(window.getComputedStyle(t)[e]):0,{marginTop:n,marginBottom:r}=window.getComputedStyle(t),o=e(t.previousElementSibling,"marginBottom"),i=e(t.nextElementSibling,"marginTop"),s=Math.max(parseFloat(n),o);return{marginBottom:Math.max(parseFloat(r),i),marginTop:s}}function m(t,e,o,i=!1){const s=t.getBoundingClientRect(),c=function(t){return t.getEditorState().read(()=>r.$getRoot().getChildrenKeys())}(e);let m=null;return e.getEditorState().read(()=>{if(i){const[t,r]=[e.getElementByKey(c[0]),e.getElementByKey(c[c.length-1])],[i,s]=[null!=t?t.getBoundingClientRect():void 0,null!=r?r.getBoundingClientRect():void 0];if(i&&s){const e=n.calculateZoomLevel(t),l=n.calculateZoomLevel(r);if(o.y/e<i.top?m=t:o.y/l>s.bottom&&(m=r),m)return}}let t=0===(r=c.length)?1/0:u>=0&&u<r?u:Math.floor(r/2);var r;let h=0;for(;t>=0&&t<c.length;){const r=c[t],i=e.getElementByKey(r);if(null===i)break;const f=n.calculateZoomLevel(i),d=new l(o.x/f,o.y/f),p=a.fromDOM(i),{marginTop:_,marginBottom:y}=g(i),E=p.generateNewRect({bottom:p.bottom+y,left:s.left,right:s.right,top:p.top-_}),{result:R,reason:{isOnTopSide:x,isOnBottomSide:v}}=E.contains(d);if(R){m=i,u=t;break}0===h&&(h=x?-1:v?1:1/0),t+=h}}),m}function h(t,l,a,u,h,f,d,p,_){const y=l.parentElement,E=o.useRef(!1),[R,x]=o.useState(null),v=o.useCallback(t=>{x(t),_&&_(t)},[_]);return o.useEffect(()=>{function e(e){const r=e.target;if(!n.isHTMLElement(r))return void v(null);if(p(r))return;const o=m(l,t,e);v(o)}function r(){v(null)}return null!=y&&(y.addEventListener("mousemove",e),y.addEventListener("mouseleave",r)),()=>{null!=y&&(y.removeEventListener("mousemove",e),y.removeEventListener("mouseleave",r))}},[y,l,t,p,v]),o.useEffect(()=>{const t=n.calculateZoomLevel(document.getElementsByClassName("ContentEditable__root")[0],!0);a.current&&function(t,e,n,r){if(!t)return void(e.style.display="none");const o=t.getBoundingClientRect(),i=window.getComputedStyle(t),s=e.getBoundingClientRect(),l=n.getBoundingClientRect();let a=parseInt(i.lineHeight,10);isNaN(a)&&(a=o.bottom-o.top);const c=(o.top+(a-(s.height||a))/2-l.top+n.scrollTop)/r;e.style.display="flex",e.style.opacity="1",e.style.transform=`translate(4px, ${c}px)`}(R,a.current,l,t)},[l,R,a]),o.useEffect(()=>{function o(r){if(!E.current)return!1;const[o]=e.eventFiles(r);if(o)return!1;const{pageY:i,target:s}=r;if(!n.isHTMLElement(s))return!1;const a=m(l,t,r,!0),c=u.current;return null!==a&&null!==c&&(function(t,e,n,r){const{top:o,height:i}=e.getBoundingClientRect(),{top:s,width:l}=r.getBoundingClientRect(),{marginTop:a,marginBottom:c}=g(e);let u=o;n>=o?u+=i+c/2:u-=a/2;const m=u-s-2+r.scrollTop;t.style.transform=`translate(24px, ${m}px)`,t.style.width=l-48+"px",t.style.opacity=".4"}(c,a,i/n.calculateZoomLevel(s),l),r.preventDefault(),!0)}return n.mergeRegister(t.registerCommand(r.DRAGOVER_COMMAND,t=>o(t),r.COMMAND_PRIORITY_LOW),t.registerCommand(r.DROP_COMMAND,o=>function(o){if(!E.current)return!1;const[i]=e.eventFiles(o);if(i)return!1;const{target:s,dataTransfer:a,pageY:u}=o,g=null!=a?a.getData(c):"",h=r.$getNodeByKey(g);if(!h)return!1;if(!n.isHTMLElement(s))return!1;const f=m(l,t,o,!0);if(!f)return!1;const d=r.$getNearestNodeFromDOMNode(f);if(!d)return!1;if(d===h)return r.IS_FIREFOX&&t.focus(),!0;const p=f.getBoundingClientRect().top;return u/n.calculateZoomLevel(s)>=p?d.insertAfter(h):d.insertBefore(h),v(null),r.IS_FIREFOX&&r.$onUpdate(()=>{t.focus()}),!0}(o),r.COMMAND_PRIORITY_HIGH))},[l,t,u,v]),o.useEffect(()=>{if(r.IS_FIREFOX&&h)return n.mergeRegister(t.registerRootListener(e=>{function o(o){const i=o.relatedTarget;n.isHTMLElement(i)&&p(i)&&(e&&(e.focus({preventScroll:!0}),t.update(()=>{const t=r.$getSelection();null===t||t.dirty||(t.dirty=!0)})),o.stopImmediatePropagation())}if(e)return e.addEventListener("blur",o,!0),()=>e.removeEventListener("blur",o,!0)}),t.registerCommand(r.BLUR_COMMAND,()=>{const e=t.getRootElement(),o=document.activeElement;return!!(e&&n.isHTMLElement(o)&&p(o))&&(e.focus({preventScroll:!0}),t.update(()=>{const t=r.$getSelection();null===t||t.dirty||(t.dirty=!0)}),!0)},r.COMMAND_PRIORITY_HIGH))},[t,h,p]),i.createPortal(s.jsxs(s.Fragment,{children:[s.jsx("div",{draggable:!0,onDragStart:function(e){const n=e.dataTransfer;if(!n||!R)return;!function(t,e){const{transform:n}=e.style;e.style.transform="translateZ(0)",t.setDragImage(e,0,0),setTimeout(()=>{e.style.transform=n})}(n,R);let o="";if(t.update(()=>{const t=r.$getNearestNodeFromDOMNode(R);t&&(o=t.getKey())}),E.current=!0,n.setData(c,o),r.IS_FIREFOX){const e=t.getRootElement();null!==e&&document.activeElement!==e&&(e.focus({preventScroll:!0}),t.update(()=>{const t=r.$getSelection();null===t||t.dirty||(t.dirty=!0)}))}},onDragEnd:function(){var e;E.current=!1,(e=u.current)&&(e.style.opacity="0",e.style.transform="translate(-10000px, -10000px)"),r.IS_FIREFOX&&t.focus()},children:h&&f}),d]}),l)}exports.DraggableBlockPlugin_EXPERIMENTAL=function({anchorElem:e=document.body,menuRef:n,targetLineRef:r,menuComponent:o,targetLineComponent:i,isOnMenu:s,onElementChanged:l}){const[a]=t.useLexicalComposerContext();return h(a,e,n,r,a._editable,o,i,s,l)};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import{useLexicalComposerContext as t}from"@lexical/react/LexicalComposerContext";import{eventFiles as e}from"@lexical/rich-text";import{calculateZoomLevel as n,mergeRegister as r,isHTMLElement as o}from"@lexical/utils";import{DRAGOVER_COMMAND as i,COMMAND_PRIORITY_LOW as s,DROP_COMMAND as l,COMMAND_PRIORITY_HIGH as a,IS_FIREFOX as c,BLUR_COMMAND as u,$getSelection as m,$getNodeByKey as g,$getNearestNodeFromDOMNode as h,$onUpdate as f,$getRoot as p}from"lexical";import{useRef as d,useState as y,useCallback as _,useEffect as x}from"react";import{createPortal as b}from"react-dom";import{jsxs as v,Fragment as T,jsx as B}from"react/jsx-runtime";class C{_x;_y;constructor(t,e){this._x=t,this._y=e}get x(){return this._x}get y(){return this._y}equals({x:t,y:e}){return this.x===t&&this.y===e}calcDeltaXTo({x:t}){return this.x-t}calcDeltaYTo({y:t}){return this.y-t}calcHorizontalDistanceTo(t){return Math.abs(this.calcDeltaXTo(t))}calcVerticalDistance(t){return Math.abs(this.calcDeltaYTo(t))}calcDistanceTo(t){return Math.sqrt(Math.pow(this.calcDeltaXTo(t),2)+Math.pow(this.calcDeltaYTo(t),2))}}class E{_left;_top;_right;_bottom;constructor(t,e,n,r){const[o,i]=e<=r?[e,r]:[r,e],[s,l]=t<=n?[t,n]:[n,t];this._top=o,this._right=l,this._left=s,this._bottom=i}get top(){return this._top}get right(){return this._right}get bottom(){return this._bottom}get left(){return this._left}get width(){return Math.abs(this._left-this._right)}get height(){return Math.abs(this._bottom-this._top)}equals({top:t,left:e,bottom:n,right:r}){return t===this._top&&n===this._bottom&&e===this._left&&r===this._right}contains(t){if(t instanceof C){const{x:e,y:n}=t,r=n<this._top,o=n>this._bottom,i=e<this._left,s=e>this._right;return{reason:{isOnBottomSide:o,isOnLeftSide:i,isOnRightSide:s,isOnTopSide:r},result:!(r||o||i||s)}}{const{top:e,left:n,bottom:r,right:o}=t;return e>=this._top&&e<=this._bottom&&r>=this._top&&r<=this._bottom&&n>=this._left&&n<=this._right&&o>=this._left&&o<=this._right}}intersectsWith(t){const{left:e,top:n,width:r,height:o}=t,{left:i,top:s,width:l,height:a}=this;return(e+r>=i+l?e+r:i+l)-(e<=i?e:i)<=r+l&&(n+o>=s+a?n+o:s+a)-(n<=s?n:s)<=o+a}generateNewRect({left:t=this.left,top:e=this.top,right:n=this.right,bottom:r=this.bottom}){return new E(t,e,n,r)}static fromLTRB(t,e,n,r){return new E(t,e,n,r)}static fromLWTH(t,e,n,r){return new E(t,n,t+e,n+r)}static fromPoints(t,e){const{y:n,x:r}=t,{y:o,x:i}=e;return E.fromLTRB(r,n,i,o)}static fromDOM(t){const{top:e,width:n,left:r,height:o}=t.getBoundingClientRect();return E.fromLWTH(r,n,e,o)}}const w="application/x-lexical-drag-block";let R=1/0;function D(t){const e=(t,e)=>t?parseFloat(window.getComputedStyle(t)[e]):0,{marginTop:n,marginBottom:r}=window.getComputedStyle(t),o=e(t.previousElementSibling,"marginBottom"),i=e(t.nextElementSibling,"marginTop"),s=Math.max(parseFloat(n),o);return{marginBottom:Math.max(parseFloat(r),i),marginTop:s}}function S(t,e,r,o=!1){const i=t.getBoundingClientRect(),s=function(t){return t.getEditorState().read(()=>p().getChildrenKeys())}(e);let l=null;return e.getEditorState().read(()=>{if(o){const[t,o]=[e.getElementByKey(s[0]),e.getElementByKey(s[s.length-1])],[i,a]=[null!=t?t.getBoundingClientRect():void 0,null!=o?o.getBoundingClientRect():void 0];if(i&&a){const e=n(t),s=n(o);if(r.y/e<i.top?l=t:r.y/s>a.bottom&&(l=o),l)return}}let t=0===(a=s.length)?1/0:R>=0&&R<a?R:Math.floor(a/2);var a;let c=0;for(;t>=0&&t<s.length;){const o=s[t],a=e.getElementByKey(o);if(null===a)break;const u=n(a),m=new C(r.x/u,r.y/u),g=E.fromDOM(a),{marginTop:h,marginBottom:f}=D(a),p=g.generateNewRect({bottom:g.bottom+f,left:i.left,right:i.right,top:g.top-h}),{result:d,reason:{isOnTopSide:y,isOnBottomSide:_}}=p.contains(m);if(d){l=a,R=t;break}0===c&&(c=y?-1:_?1:1/0),t+=c}}),l}function L(t,p,C,E,R,L,M,O,K){const N=p.parentElement,Y=d(!1),[H,k]=y(null),q=_(t=>{k(t),K&&K(t)},[K]);return x(()=>{function e(e){const n=e.target;if(!o(n))return void q(null);if(O(n))return;const r=S(p,t,e);q(r)}function n(){q(null)}return null!=N&&(N.addEventListener("mousemove",e),N.addEventListener("mouseleave",n)),()=>{null!=N&&(N.removeEventListener("mousemove",e),N.removeEventListener("mouseleave",n))}},[N,p,t,O,q]),x(()=>{const t=n(document.getElementsByClassName("ContentEditable__root")[0],!0);C.current&&function(t,e,n,r){if(!t)return void(e.style.display="none");const o=t.getBoundingClientRect(),i=window.getComputedStyle(t),s=e.getBoundingClientRect(),l=n.getBoundingClientRect();let a=parseInt(i.lineHeight,10);isNaN(a)&&(a=o.bottom-o.top);const c=(o.top+(a-(s.height||a))/2-l.top+n.scrollTop)/r;e.style.display="flex",e.style.opacity="1",e.style.transform=`translate(4px, ${c}px)`}(H,C.current,p,t)},[p,H,C]),x(()=>{function u(r){if(!Y.current)return!1;const[i]=e(r);if(i)return!1;const{pageY:s,target:l}=r;if(!o(l))return!1;const a=S(p,t,r,!0),c=E.current;return null!==a&&null!==c&&(function(t,e,n,r){const{top:o,height:i}=e.getBoundingClientRect(),{top:s,width:l}=r.getBoundingClientRect(),{marginTop:a,marginBottom:c}=D(e);let u=o;n>=o?u+=i+c/2:u-=a/2;const m=u-s-2+r.scrollTop;t.style.transform=`translate(24px, ${m}px)`,t.style.width=l-48+"px",t.style.opacity=".4"}(c,a,s/n(l),p),r.preventDefault(),!0)}return r(t.registerCommand(i,t=>u(t),s),t.registerCommand(l,r=>function(r){if(!Y.current)return!1;const[i]=e(r);if(i)return!1;const{target:s,dataTransfer:l,pageY:a}=r,u=null!=l?l.getData(w):"",m=g(u);if(!m)return!1;if(!o(s))return!1;const d=S(p,t,r,!0);if(!d)return!1;const y=h(d);if(!y)return!1;if(y===m)return c&&t.focus(),!0;const _=d.getBoundingClientRect().top;return a/n(s)>=_?y.insertAfter(m):y.insertBefore(m),q(null),c&&f(()=>{t.focus()}),!0}(r),a))},[p,t,E,q]),x(()=>{if(c&&R)return r(t.registerRootListener(e=>{function n(n){const r=n.relatedTarget;o(r)&&O(r)&&(e&&(e.focus({preventScroll:!0}),t.update(()=>{const t=m();null===t||t.dirty||(t.dirty=!0)})),n.stopImmediatePropagation())}if(e)return e.addEventListener("blur",n,!0),()=>e.removeEventListener("blur",n,!0)}),t.registerCommand(u,()=>{const e=t.getRootElement(),n=document.activeElement;return!!(e&&o(n)&&O(n))&&(e.focus({preventScroll:!0}),t.update(()=>{const t=m();null===t||t.dirty||(t.dirty=!0)}),!0)},a))},[t,R,O]),b(v(T,{children:[B("div",{draggable:!0,onDragStart:function(e){const n=e.dataTransfer;if(!n||!H)return;!function(t,e){const{transform:n}=e.style;e.style.transform="translateZ(0)",t.setDragImage(e,0,0),setTimeout(()=>{e.style.transform=n})}(n,H);let r="";if(t.update(()=>{const t=h(H);t&&(r=t.getKey())}),Y.current=!0,n.setData(w,r),c){const e=t.getRootElement();null!==e&&document.activeElement!==e&&(e.focus({preventScroll:!0}),t.update(()=>{const t=m();null===t||t.dirty||(t.dirty=!0)}))}},onDragEnd:function(){var e;Y.current=!1,(e=E.current)&&(e.style.opacity="0",e.style.transform="translate(-10000px, -10000px)"),c&&t.focus()},children:R&&L}),M]}),p)}function M({anchorElem:e=document.body,menuRef:n,targetLineRef:r,menuComponent:o,targetLineComponent:i,isOnMenu:s,onElementChanged:l}){const[a]=t();return L(a,e,n,r,a._editable,o,i,s,l)}export{M as DraggableBlockPlugin_EXPERIMENTAL};
@@ -36,6 +36,7 @@ function formatDevErrorMessage(message) {
36
36
  *
37
37
  */
38
38
 
39
+
39
40
  /*@__INLINE__*/
40
41
  function warnOnlyOnce(message) {
41
42
  {
@@ -34,6 +34,7 @@ function formatDevErrorMessage(message) {
34
34
  *
35
35
  */
36
36
 
37
+
37
38
  /*@__INLINE__*/
38
39
  function warnOnlyOnce(message) {
39
40
  {
@@ -24,41 +24,10 @@ var jsxRuntime = require('react/jsx-runtime');
24
24
  */
25
25
 
26
26
 
27
- // Webpack + React 17 fails to compile on the usage of `React.startTransition` or
28
- // `React["startTransition"]` even if it's behind a feature detection of
29
- // `"startTransition" in React`. Moving this to a constant avoids the issue :/
30
- const START_TRANSITION = 'startTransition';
31
- function startTransition(callback) {
32
- if (START_TRANSITION in React) {
33
- React[START_TRANSITION](callback);
34
- } else {
35
- callback();
36
- }
37
- }
38
-
39
- /**
40
- * Copyright (c) Meta Platforms, Inc. and affiliates.
41
- *
42
- * This source code is licensed under the MIT license found in the
43
- * LICENSE file in the root directory of this source tree.
44
- *
45
- */
46
-
47
- const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
48
-
49
- /**
50
- * Copyright (c) Meta Platforms, Inc. and affiliates.
51
- *
52
- * This source code is licensed under the MIT license found in the
53
- * LICENSE file in the root directory of this source tree.
54
- *
55
- */
56
-
57
-
58
27
  // This workaround is no longer necessary in React 19,
59
28
  // but we currently support React >=17.x
60
29
  // https://github.com/facebook/react/pull/26395
61
- const useLayoutEffectImpl = CAN_USE_DOM ? React.useLayoutEffect : React.useEffect;
30
+ const useLayoutEffectImpl = lexical.CAN_USE_DOM ? React.useLayoutEffect : React.useEffect;
62
31
 
63
32
  /**
64
33
  * Copyright (c) Meta Platforms, Inc. and affiliates.
@@ -419,9 +388,9 @@ function setContainerDivAttributes(containerDiv, className) {
419
388
  containerDiv.style.display = 'block';
420
389
  containerDiv.style.position = 'absolute';
421
390
  }
422
- function useMenuAnchorRef(resolution, setResolution, className, parent = CAN_USE_DOM ? document.body : undefined, shouldIncludePageYOffset__EXPERIMENTAL = true) {
391
+ function useMenuAnchorRef(resolution, setResolution, className, parent = lexical.CAN_USE_DOM ? document.body : undefined, shouldIncludePageYOffset__EXPERIMENTAL = true) {
423
392
  const [editor] = LexicalComposerContext.useLexicalComposerContext();
424
- const initialAnchorElement = CAN_USE_DOM ? document.createElement('div') : null;
393
+ const initialAnchorElement = lexical.CAN_USE_DOM ? document.createElement('div') : null;
425
394
  const anchorElementRef = React.useRef(initialAnchorElement);
426
395
  const positionMenu = React.useCallback(() => {
427
396
  if (anchorElementRef.current === null || parent === undefined) {
@@ -500,6 +469,27 @@ function useMenuAnchorRef(resolution, setResolution, className, parent = CAN_USE
500
469
  return anchorElementRef;
501
470
  }
502
471
 
472
+ /**
473
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
474
+ *
475
+ * This source code is licensed under the MIT license found in the
476
+ * LICENSE file in the root directory of this source tree.
477
+ *
478
+ */
479
+
480
+
481
+ // Webpack + React 17 fails to compile on the usage of `React.startTransition` or
482
+ // `React["startTransition"]` even if it's behind a feature detection of
483
+ // `"startTransition" in React`. Moving this to a constant avoids the issue :/
484
+ const START_TRANSITION = 'startTransition';
485
+ function startTransition(callback) {
486
+ if (START_TRANSITION in React) {
487
+ React[START_TRANSITION](callback);
488
+ } else {
489
+ callback();
490
+ }
491
+ }
492
+
503
493
  /**
504
494
  * Copyright (c) Meta Platforms, Inc. and affiliates.
505
495
  *
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
10
- import { createCommand, COMMAND_PRIORITY_LOW, KEY_ARROW_DOWN_COMMAND, KEY_ARROW_UP_COMMAND, KEY_ESCAPE_COMMAND, KEY_TAB_COMMAND, KEY_ENTER_COMMAND, $getSelection, $isRangeSelection, $getNodeByKey } from 'lexical';
10
+ import { CAN_USE_DOM, createCommand, COMMAND_PRIORITY_LOW, KEY_ARROW_DOWN_COMMAND, KEY_ARROW_UP_COMMAND, KEY_ESCAPE_COMMAND, KEY_TAB_COMMAND, KEY_ENTER_COMMAND, $getSelection, $isRangeSelection, $getNodeByKey } from 'lexical';
11
11
  import React, { useLayoutEffect, useEffect, useRef, useCallback, useState, useMemo } from 'react';
12
12
  import { mergeRegister } from '@lexical/utils';
13
13
  import ReactDOM from 'react-dom';
@@ -22,37 +22,6 @@ import { jsx, jsxs } from 'react/jsx-runtime';
22
22
  */
23
23
 
24
24
 
25
- // Webpack + React 17 fails to compile on the usage of `React.startTransition` or
26
- // `React["startTransition"]` even if it's behind a feature detection of
27
- // `"startTransition" in React`. Moving this to a constant avoids the issue :/
28
- const START_TRANSITION = 'startTransition';
29
- function startTransition(callback) {
30
- if (START_TRANSITION in React) {
31
- React[START_TRANSITION](callback);
32
- } else {
33
- callback();
34
- }
35
- }
36
-
37
- /**
38
- * Copyright (c) Meta Platforms, Inc. and affiliates.
39
- *
40
- * This source code is licensed under the MIT license found in the
41
- * LICENSE file in the root directory of this source tree.
42
- *
43
- */
44
-
45
- const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
46
-
47
- /**
48
- * Copyright (c) Meta Platforms, Inc. and affiliates.
49
- *
50
- * This source code is licensed under the MIT license found in the
51
- * LICENSE file in the root directory of this source tree.
52
- *
53
- */
54
-
55
-
56
25
  // This workaround is no longer necessary in React 19,
57
26
  // but we currently support React >=17.x
58
27
  // https://github.com/facebook/react/pull/26395
@@ -498,6 +467,27 @@ function useMenuAnchorRef(resolution, setResolution, className, parent = CAN_USE
498
467
  return anchorElementRef;
499
468
  }
500
469
 
470
+ /**
471
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
472
+ *
473
+ * This source code is licensed under the MIT license found in the
474
+ * LICENSE file in the root directory of this source tree.
475
+ *
476
+ */
477
+
478
+
479
+ // Webpack + React 17 fails to compile on the usage of `React.startTransition` or
480
+ // `React["startTransition"]` even if it's behind a feature detection of
481
+ // `"startTransition" in React`. Moving this to a constant avoids the issue :/
482
+ const START_TRANSITION = 'startTransition';
483
+ function startTransition(callback) {
484
+ if (START_TRANSITION in React) {
485
+ React[START_TRANSITION](callback);
486
+ } else {
487
+ callback();
488
+ }
489
+ }
490
+
501
491
  /**
502
492
  * Copyright (c) Meta Platforms, Inc. and affiliates.
503
493
  *