@lexical/react 0.14.2 → 0.14.3

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 (191) hide show
  1. package/{LexicalAutoEmbedPlugin.esm.js → LexicalAutoEmbedPlugin.mjs} +2 -2
  2. package/LexicalAutoEmbedPlugin.node.mjs +11 -0
  3. package/{LexicalHashtagPlugin.esm.js → LexicalAutoFocusPlugin.mjs} +3 -3
  4. package/LexicalAutoFocusPlugin.node.mjs +8 -0
  5. package/{LexicalAutoLinkPlugin.esm.js → LexicalAutoLinkPlugin.mjs} +2 -2
  6. package/LexicalAutoLinkPlugin.node.mjs +9 -0
  7. package/{LexicalBlockWithAlignableContents.esm.js → LexicalBlockWithAlignableContents.mjs} +2 -2
  8. package/LexicalBlockWithAlignableContents.node.mjs +8 -0
  9. package/{LexicalClearEditorPlugin.esm.js → LexicalCharacterLimitPlugin.mjs} +3 -3
  10. package/LexicalCharacterLimitPlugin.node.mjs +8 -0
  11. package/LexicalCheckListPlugin.dev.js +1 -1
  12. package/{LexicalCheckListPlugin.dev.esm.js → LexicalCheckListPlugin.dev.mjs} +2 -2
  13. package/LexicalCheckListPlugin.mjs +10 -0
  14. package/LexicalCheckListPlugin.node.mjs +8 -0
  15. package/LexicalCheckListPlugin.prod.js +1 -1
  16. package/LexicalCheckListPlugin.prod.mjs +7 -0
  17. package/{LexicalCheckListPlugin.esm.js → LexicalClearEditorPlugin.mjs} +3 -3
  18. package/LexicalClearEditorPlugin.node.mjs +8 -0
  19. package/LexicalClickableLinkPlugin.d.ts +2 -1
  20. package/LexicalClickableLinkPlugin.dev.js +8 -3
  21. package/{LexicalClickableLinkPlugin.dev.esm.js → LexicalClickableLinkPlugin.dev.mjs} +8 -3
  22. package/LexicalClickableLinkPlugin.mjs +10 -0
  23. package/LexicalClickableLinkPlugin.node.mjs +8 -0
  24. package/LexicalClickableLinkPlugin.prod.js +4 -3
  25. package/LexicalClickableLinkPlugin.prod.mjs +7 -0
  26. package/{LexicalCollaborationContext.esm.js → LexicalCollaborationContext.mjs} +2 -2
  27. package/LexicalCollaborationContext.node.mjs +9 -0
  28. package/LexicalCollaborationPlugin.mjs +10 -0
  29. package/LexicalCollaborationPlugin.node.mjs +8 -0
  30. package/{LexicalListPlugin.esm.js → LexicalComposer.mjs} +3 -3
  31. package/LexicalComposer.node.mjs +8 -0
  32. package/{LexicalComposerContext.esm.js → LexicalComposerContext.mjs} +2 -2
  33. package/LexicalComposerContext.node.mjs +10 -0
  34. package/LexicalContentEditable.mjs +10 -0
  35. package/LexicalContentEditable.node.mjs +8 -0
  36. package/LexicalContextMenuPlugin.d.ts +2 -1
  37. package/LexicalContextMenuPlugin.dev.js +9 -4
  38. package/{LexicalContextMenuPlugin.dev.esm.js → LexicalContextMenuPlugin.dev.mjs} +9 -4
  39. package/{LexicalContextMenuPlugin.esm.js → LexicalContextMenuPlugin.mjs} +2 -2
  40. package/LexicalContextMenuPlugin.node.mjs +9 -0
  41. package/LexicalContextMenuPlugin.prod.js +16 -16
  42. package/LexicalContextMenuPlugin.prod.mjs +7 -0
  43. package/{LexicalDecoratorBlockNode.esm.js → LexicalDecoratorBlockNode.mjs} +2 -2
  44. package/LexicalDecoratorBlockNode.node.mjs +9 -0
  45. package/LexicalEditorRefPlugin.mjs +10 -0
  46. package/LexicalEditorRefPlugin.node.mjs +8 -0
  47. package/{useLexicalEditable.esm.js → LexicalErrorBoundary.mjs} +2 -2
  48. package/LexicalErrorBoundary.node.mjs +8 -0
  49. package/{LexicalClickableLinkPlugin.esm.js → LexicalHashtagPlugin.mjs} +3 -3
  50. package/LexicalHashtagPlugin.node.mjs +8 -0
  51. package/{LexicalHistoryPlugin.esm.js → LexicalHistoryPlugin.mjs} +2 -2
  52. package/LexicalHistoryPlugin.node.mjs +9 -0
  53. package/{LexicalHorizontalRuleNode.esm.js → LexicalHorizontalRuleNode.mjs} +2 -2
  54. package/LexicalHorizontalRuleNode.node.mjs +11 -0
  55. package/{LexicalCollaborationPlugin.esm.js → LexicalHorizontalRulePlugin.mjs} +3 -3
  56. package/LexicalHorizontalRulePlugin.node.mjs +8 -0
  57. package/{LexicalTableOfContents.esm.js → LexicalLinkPlugin.mjs} +3 -3
  58. package/LexicalLinkPlugin.node.mjs +8 -0
  59. package/LexicalListPlugin.mjs +10 -0
  60. package/LexicalListPlugin.node.mjs +8 -0
  61. package/{LexicalMarkdownShortcutPlugin.esm.js → LexicalMarkdownShortcutPlugin.mjs} +2 -2
  62. package/LexicalMarkdownShortcutPlugin.node.mjs +9 -0
  63. package/LexicalNestedComposer.dev.js +6 -2
  64. package/{LexicalNestedComposer.dev.esm.js → LexicalNestedComposer.dev.mjs} +6 -2
  65. package/LexicalNestedComposer.mjs +10 -0
  66. package/LexicalNestedComposer.node.mjs +8 -0
  67. package/LexicalNestedComposer.prod.js +5 -4
  68. package/LexicalNestedComposer.prod.mjs +7 -0
  69. package/LexicalNodeEventPlugin.mjs +10 -0
  70. package/LexicalNodeEventPlugin.node.mjs +8 -0
  71. package/LexicalNodeMenuPlugin.dev.js +1 -1
  72. package/{LexicalNodeMenuPlugin.dev.esm.js → LexicalNodeMenuPlugin.dev.mjs} +1 -1
  73. package/{LexicalNodeMenuPlugin.esm.js → LexicalNodeMenuPlugin.mjs} +2 -2
  74. package/LexicalNodeMenuPlugin.node.mjs +9 -0
  75. package/LexicalNodeMenuPlugin.prod.js +1 -1
  76. package/{LexicalNodeMenuPlugin.prod.esm.js → LexicalNodeMenuPlugin.prod.mjs} +1 -1
  77. package/{LexicalComposer.esm.js → LexicalOnChangePlugin.mjs} +3 -3
  78. package/LexicalOnChangePlugin.node.mjs +8 -0
  79. package/LexicalPlainTextPlugin.mjs +10 -0
  80. package/LexicalPlainTextPlugin.node.mjs +8 -0
  81. package/{LexicalLinkPlugin.esm.js → LexicalRichTextPlugin.mjs} +3 -3
  82. package/LexicalRichTextPlugin.node.mjs +8 -0
  83. package/{LexicalTabIndentationPlugin.esm.js → LexicalTabIndentationPlugin.mjs} +2 -2
  84. package/LexicalTabIndentationPlugin.node.mjs +9 -0
  85. package/{LexicalErrorBoundary.esm.js → LexicalTableOfContents.mjs} +2 -2
  86. package/LexicalTableOfContents.node.mjs +8 -0
  87. package/LexicalTablePlugin.mjs +10 -0
  88. package/LexicalTablePlugin.node.mjs +8 -0
  89. package/{LexicalTreeView.esm.js → LexicalTreeView.mjs} +2 -2
  90. package/LexicalTreeView.node.mjs +8 -0
  91. package/LexicalTypeaheadMenuPlugin.dev.js +1 -1
  92. package/{LexicalTypeaheadMenuPlugin.dev.esm.js → LexicalTypeaheadMenuPlugin.dev.mjs} +1 -1
  93. package/{LexicalTypeaheadMenuPlugin.esm.js → LexicalTypeaheadMenuPlugin.mjs} +2 -2
  94. package/LexicalTypeaheadMenuPlugin.node.mjs +14 -0
  95. package/LexicalTypeaheadMenuPlugin.prod.js +1 -1
  96. package/{LexicalTypeaheadMenuPlugin.prod.esm.js → LexicalTypeaheadMenuPlugin.prod.mjs} +1 -1
  97. package/package.json +499 -179
  98. package/useLexicalEditable.mjs +10 -0
  99. package/useLexicalEditable.node.mjs +8 -0
  100. package/{useLexicalIsTextContentEmpty.esm.js → useLexicalIsTextContentEmpty.mjs} +2 -2
  101. package/useLexicalIsTextContentEmpty.node.mjs +8 -0
  102. package/{useLexicalNodeSelection.esm.js → useLexicalNodeSelection.mjs} +2 -2
  103. package/useLexicalNodeSelection.node.mjs +8 -0
  104. package/useLexicalSubscription.mjs +10 -0
  105. package/useLexicalSubscription.node.mjs +8 -0
  106. package/{LexicalAutoFocusPlugin.esm.js → useLexicalTextEntity.mjs} +3 -3
  107. package/useLexicalTextEntity.node.mjs +8 -0
  108. package/LexicalCharacterLimitPlugin.esm.js +0 -10
  109. package/LexicalCheckListPlugin.prod.esm.js +0 -7
  110. package/LexicalClickableLinkPlugin.prod.esm.js +0 -7
  111. package/LexicalContentEditable.esm.js +0 -10
  112. package/LexicalContextMenuPlugin.prod.esm.js +0 -7
  113. package/LexicalEditorRefPlugin.esm.js +0 -10
  114. package/LexicalHorizontalRulePlugin.esm.js +0 -10
  115. package/LexicalNestedComposer.esm.js +0 -10
  116. package/LexicalNestedComposer.prod.esm.js +0 -7
  117. package/LexicalNodeEventPlugin.esm.js +0 -10
  118. package/LexicalOnChangePlugin.esm.js +0 -10
  119. package/LexicalPlainTextPlugin.esm.js +0 -10
  120. package/LexicalRichTextPlugin.esm.js +0 -10
  121. package/LexicalTablePlugin.esm.js +0 -10
  122. package/useLexicalSubscription.esm.js +0 -10
  123. package/useLexicalTextEntity.esm.js +0 -10
  124. /package/{LexicalAutoEmbedPlugin.dev.esm.js → LexicalAutoEmbedPlugin.dev.mjs} +0 -0
  125. /package/{LexicalAutoEmbedPlugin.prod.esm.js → LexicalAutoEmbedPlugin.prod.mjs} +0 -0
  126. /package/{LexicalAutoFocusPlugin.dev.esm.js → LexicalAutoFocusPlugin.dev.mjs} +0 -0
  127. /package/{LexicalAutoFocusPlugin.prod.esm.js → LexicalAutoFocusPlugin.prod.mjs} +0 -0
  128. /package/{LexicalAutoLinkPlugin.dev.esm.js → LexicalAutoLinkPlugin.dev.mjs} +0 -0
  129. /package/{LexicalAutoLinkPlugin.prod.esm.js → LexicalAutoLinkPlugin.prod.mjs} +0 -0
  130. /package/{LexicalBlockWithAlignableContents.dev.esm.js → LexicalBlockWithAlignableContents.dev.mjs} +0 -0
  131. /package/{LexicalBlockWithAlignableContents.prod.esm.js → LexicalBlockWithAlignableContents.prod.mjs} +0 -0
  132. /package/{LexicalCharacterLimitPlugin.dev.esm.js → LexicalCharacterLimitPlugin.dev.mjs} +0 -0
  133. /package/{LexicalCharacterLimitPlugin.prod.esm.js → LexicalCharacterLimitPlugin.prod.mjs} +0 -0
  134. /package/{LexicalClearEditorPlugin.dev.esm.js → LexicalClearEditorPlugin.dev.mjs} +0 -0
  135. /package/{LexicalClearEditorPlugin.prod.esm.js → LexicalClearEditorPlugin.prod.mjs} +0 -0
  136. /package/{LexicalCollaborationContext.dev.esm.js → LexicalCollaborationContext.dev.mjs} +0 -0
  137. /package/{LexicalCollaborationContext.prod.esm.js → LexicalCollaborationContext.prod.mjs} +0 -0
  138. /package/{LexicalCollaborationPlugin.dev.esm.js → LexicalCollaborationPlugin.dev.mjs} +0 -0
  139. /package/{LexicalCollaborationPlugin.prod.esm.js → LexicalCollaborationPlugin.prod.mjs} +0 -0
  140. /package/{LexicalComposer.dev.esm.js → LexicalComposer.dev.mjs} +0 -0
  141. /package/{LexicalComposer.prod.esm.js → LexicalComposer.prod.mjs} +0 -0
  142. /package/{LexicalComposerContext.dev.esm.js → LexicalComposerContext.dev.mjs} +0 -0
  143. /package/{LexicalComposerContext.prod.esm.js → LexicalComposerContext.prod.mjs} +0 -0
  144. /package/{LexicalContentEditable.dev.esm.js → LexicalContentEditable.dev.mjs} +0 -0
  145. /package/{LexicalContentEditable.prod.esm.js → LexicalContentEditable.prod.mjs} +0 -0
  146. /package/{LexicalDecoratorBlockNode.dev.esm.js → LexicalDecoratorBlockNode.dev.mjs} +0 -0
  147. /package/{LexicalDecoratorBlockNode.prod.esm.js → LexicalDecoratorBlockNode.prod.mjs} +0 -0
  148. /package/{LexicalEditorRefPlugin.dev.esm.js → LexicalEditorRefPlugin.dev.mjs} +0 -0
  149. /package/{LexicalEditorRefPlugin.prod.esm.js → LexicalEditorRefPlugin.prod.mjs} +0 -0
  150. /package/{LexicalErrorBoundary.dev.esm.js → LexicalErrorBoundary.dev.mjs} +0 -0
  151. /package/{LexicalErrorBoundary.prod.esm.js → LexicalErrorBoundary.prod.mjs} +0 -0
  152. /package/{LexicalHashtagPlugin.dev.esm.js → LexicalHashtagPlugin.dev.mjs} +0 -0
  153. /package/{LexicalHashtagPlugin.prod.esm.js → LexicalHashtagPlugin.prod.mjs} +0 -0
  154. /package/{LexicalHistoryPlugin.dev.esm.js → LexicalHistoryPlugin.dev.mjs} +0 -0
  155. /package/{LexicalHistoryPlugin.prod.esm.js → LexicalHistoryPlugin.prod.mjs} +0 -0
  156. /package/{LexicalHorizontalRuleNode.dev.esm.js → LexicalHorizontalRuleNode.dev.mjs} +0 -0
  157. /package/{LexicalHorizontalRuleNode.prod.esm.js → LexicalHorizontalRuleNode.prod.mjs} +0 -0
  158. /package/{LexicalHorizontalRulePlugin.dev.esm.js → LexicalHorizontalRulePlugin.dev.mjs} +0 -0
  159. /package/{LexicalHorizontalRulePlugin.prod.esm.js → LexicalHorizontalRulePlugin.prod.mjs} +0 -0
  160. /package/{LexicalLinkPlugin.dev.esm.js → LexicalLinkPlugin.dev.mjs} +0 -0
  161. /package/{LexicalLinkPlugin.prod.esm.js → LexicalLinkPlugin.prod.mjs} +0 -0
  162. /package/{LexicalListPlugin.dev.esm.js → LexicalListPlugin.dev.mjs} +0 -0
  163. /package/{LexicalListPlugin.prod.esm.js → LexicalListPlugin.prod.mjs} +0 -0
  164. /package/{LexicalMarkdownShortcutPlugin.dev.esm.js → LexicalMarkdownShortcutPlugin.dev.mjs} +0 -0
  165. /package/{LexicalMarkdownShortcutPlugin.prod.esm.js → LexicalMarkdownShortcutPlugin.prod.mjs} +0 -0
  166. /package/{LexicalNodeEventPlugin.dev.esm.js → LexicalNodeEventPlugin.dev.mjs} +0 -0
  167. /package/{LexicalNodeEventPlugin.prod.esm.js → LexicalNodeEventPlugin.prod.mjs} +0 -0
  168. /package/{LexicalOnChangePlugin.dev.esm.js → LexicalOnChangePlugin.dev.mjs} +0 -0
  169. /package/{LexicalOnChangePlugin.prod.esm.js → LexicalOnChangePlugin.prod.mjs} +0 -0
  170. /package/{LexicalPlainTextPlugin.dev.esm.js → LexicalPlainTextPlugin.dev.mjs} +0 -0
  171. /package/{LexicalPlainTextPlugin.prod.esm.js → LexicalPlainTextPlugin.prod.mjs} +0 -0
  172. /package/{LexicalRichTextPlugin.dev.esm.js → LexicalRichTextPlugin.dev.mjs} +0 -0
  173. /package/{LexicalRichTextPlugin.prod.esm.js → LexicalRichTextPlugin.prod.mjs} +0 -0
  174. /package/{LexicalTabIndentationPlugin.dev.esm.js → LexicalTabIndentationPlugin.dev.mjs} +0 -0
  175. /package/{LexicalTabIndentationPlugin.prod.esm.js → LexicalTabIndentationPlugin.prod.mjs} +0 -0
  176. /package/{LexicalTableOfContents.dev.esm.js → LexicalTableOfContents.dev.mjs} +0 -0
  177. /package/{LexicalTableOfContents.prod.esm.js → LexicalTableOfContents.prod.mjs} +0 -0
  178. /package/{LexicalTablePlugin.dev.esm.js → LexicalTablePlugin.dev.mjs} +0 -0
  179. /package/{LexicalTablePlugin.prod.esm.js → LexicalTablePlugin.prod.mjs} +0 -0
  180. /package/{LexicalTreeView.dev.esm.js → LexicalTreeView.dev.mjs} +0 -0
  181. /package/{LexicalTreeView.prod.esm.js → LexicalTreeView.prod.mjs} +0 -0
  182. /package/{useLexicalEditable.dev.esm.js → useLexicalEditable.dev.mjs} +0 -0
  183. /package/{useLexicalEditable.prod.esm.js → useLexicalEditable.prod.mjs} +0 -0
  184. /package/{useLexicalIsTextContentEmpty.dev.esm.js → useLexicalIsTextContentEmpty.dev.mjs} +0 -0
  185. /package/{useLexicalIsTextContentEmpty.prod.esm.js → useLexicalIsTextContentEmpty.prod.mjs} +0 -0
  186. /package/{useLexicalNodeSelection.dev.esm.js → useLexicalNodeSelection.dev.mjs} +0 -0
  187. /package/{useLexicalNodeSelection.prod.esm.js → useLexicalNodeSelection.prod.mjs} +0 -0
  188. /package/{useLexicalSubscription.dev.esm.js → useLexicalSubscription.dev.mjs} +0 -0
  189. /package/{useLexicalSubscription.prod.esm.js → useLexicalSubscription.prod.mjs} +0 -0
  190. /package/{useLexicalTextEntity.dev.esm.js → useLexicalTextEntity.dev.mjs} +0 -0
  191. /package/{useLexicalTextEntity.prod.esm.js → useLexicalTextEntity.prod.mjs} +0 -0
@@ -0,0 +1,10 @@
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
+ import * as modDev from './useLexicalEditable.dev.mjs';
8
+ import * as modProd from './useLexicalEditable.prod.mjs';
9
+ const mod = process.env.NODE_ENV === 'development' ? modDev : modProd;
10
+ export default mod.default;
@@ -0,0 +1,8 @@
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
+ const mod = await (process.env.NODE_ENV === 'development' ? import('./useLexicalEditable.dev.mjs') : import('./useLexicalEditable.prod.mjs'));
8
+ export default mod.default;
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import * as modDev from './useLexicalIsTextContentEmpty.dev.esm.js';
8
- import * as modProd from './useLexicalIsTextContentEmpty.prod.esm.js';
7
+ import * as modDev from './useLexicalIsTextContentEmpty.dev.mjs';
8
+ import * as modProd from './useLexicalIsTextContentEmpty.prod.mjs';
9
9
  const mod = process.env.NODE_ENV === 'development' ? modDev : modProd;
10
10
  export const useLexicalIsTextContentEmpty = mod.useLexicalIsTextContentEmpty;
@@ -0,0 +1,8 @@
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
+ const mod = await (process.env.NODE_ENV === 'development' ? import('./useLexicalIsTextContentEmpty.dev.mjs') : import('./useLexicalIsTextContentEmpty.prod.mjs'));
8
+ export const useLexicalIsTextContentEmpty = mod.useLexicalIsTextContentEmpty;
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import * as modDev from './useLexicalNodeSelection.dev.esm.js';
8
- import * as modProd from './useLexicalNodeSelection.prod.esm.js';
7
+ import * as modDev from './useLexicalNodeSelection.dev.mjs';
8
+ import * as modProd from './useLexicalNodeSelection.prod.mjs';
9
9
  const mod = process.env.NODE_ENV === 'development' ? modDev : modProd;
10
10
  export const useLexicalNodeSelection = mod.useLexicalNodeSelection;
@@ -0,0 +1,8 @@
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
+ const mod = await (process.env.NODE_ENV === 'development' ? import('./useLexicalNodeSelection.dev.mjs') : import('./useLexicalNodeSelection.prod.mjs'));
8
+ export const useLexicalNodeSelection = mod.useLexicalNodeSelection;
@@ -0,0 +1,10 @@
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
+ import * as modDev from './useLexicalSubscription.dev.mjs';
8
+ import * as modProd from './useLexicalSubscription.prod.mjs';
9
+ const mod = process.env.NODE_ENV === 'development' ? modDev : modProd;
10
+ export default mod.default;
@@ -0,0 +1,8 @@
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
+ const mod = await (process.env.NODE_ENV === 'development' ? import('./useLexicalSubscription.dev.mjs') : import('./useLexicalSubscription.prod.mjs'));
8
+ export default mod.default;
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import * as modDev from './LexicalAutoFocusPlugin.dev.esm.js';
8
- import * as modProd from './LexicalAutoFocusPlugin.prod.esm.js';
7
+ import * as modDev from './useLexicalTextEntity.dev.mjs';
8
+ import * as modProd from './useLexicalTextEntity.prod.mjs';
9
9
  const mod = process.env.NODE_ENV === 'development' ? modDev : modProd;
10
- export const AutoFocusPlugin = mod.AutoFocusPlugin;
10
+ export const useLexicalTextEntity = mod.useLexicalTextEntity;
@@ -0,0 +1,8 @@
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
+ const mod = await (process.env.NODE_ENV === 'development' ? import('./useLexicalTextEntity.dev.mjs') : import('./useLexicalTextEntity.prod.mjs'));
8
+ export const useLexicalTextEntity = mod.useLexicalTextEntity;
@@ -1,10 +0,0 @@
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
- import * as modDev from './LexicalCharacterLimitPlugin.dev.esm.js';
8
- import * as modProd from './LexicalCharacterLimitPlugin.prod.esm.js';
9
- const mod = process.env.NODE_ENV === 'development' ? modDev : modProd;
10
- export const CharacterLimitPlugin = mod.CharacterLimitPlugin;
@@ -1,7 +0,0 @@
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
- import{INSERT_CHECK_LIST_COMMAND as e,insertList as t,$isListItemNode as n,$isListNode as r}from"@lexical/list";import{useLexicalComposerContext as i}from"@lexical/react/LexicalComposerContext";import{mergeRegister as l,$findMatchingParent as o,isHTMLElement as c}from"@lexical/utils";import{COMMAND_PRIORITY_LOW as u,KEY_ARROW_DOWN_COMMAND as s,KEY_ARROW_UP_COMMAND as a,KEY_ESCAPE_COMMAND as g,KEY_SPACE_COMMAND as f,$getNearestNodeFromDOMNode as d,KEY_ARROW_LEFT_COMMAND as m,$getSelection as p,$isRangeSelection as C,$isElementNode as h}from"lexical";import{useEffect as v}from"react";function E(){const[c]=i();return v((()=>l(c.registerCommand(e,(()=>(t(c,"check"),!0)),u),c.registerCommand(s,(e=>y(e,c,!1)),u),c.registerCommand(a,(e=>y(e,c,!0)),u),c.registerCommand(g,(e=>{if(null!=k()){const e=c.getRootElement();return null!=e&&e.focus(),!0}return!1}),u),c.registerCommand(f,(e=>{const t=k();return!(null==t||!c.isEditable())&&(c.update((()=>{const r=d(t);n(r)&&(e.preventDefault(),r.toggleChecked())})),!0)}),u),c.registerCommand(m,(e=>c.getEditorState().read((()=>{const t=p();if(C(t)&&t.isCollapsed()){const{anchor:i}=t,l="element"===i.type;if(l||0===i.offset){const t=i.getNode(),u=o(t,(e=>h(e)&&!e.isInline()));if(n(u)){const n=u.getParent();if(r(n)&&"check"===n.getListType()&&(l||u.getFirstDescendant()===t)){const t=c.getElementByKey(u.__key);if(null!=t&&document.activeElement!==t)return t.focus(),e.preventDefault(),!0}}}}return!1}))),u),c.registerRootListener(((e,t)=>{null!==e&&(e.addEventListener("click",x),e.addEventListener("pointerdown",_)),null!==t&&(t.removeEventListener("click",x),t.removeEventListener("pointerdown",_))}))))),null}function L(e,t){const n=e.target;if(null===n||!c(n))return;const r=n.firstChild;if(null!=r&&c(r)&&("UL"===r.tagName||"OL"===r.tagName))return;const i=n.parentNode;if(!i||"check"!==i.__lexicalListType)return;const l=e.pageX,o=n.getBoundingClientRect();("rtl"===n.dir?l<o.right&&l>o.right-20:l>o.left&&l<o.left+20)&&t()}function x(e){L(e,(()=>{const t=e.target,r=function(e){let t=e;for(;t;){if(t.__lexicalEditor)return t.__lexicalEditor;t=t.parentNode}return null}(t);null!=r&&r.isEditable()&&r.update((()=>{if(e.target){const e=d(t);n(e)&&(t.focus(),e.toggleChecked())}}))}))}function _(e){L(e,(()=>{e.preventDefault()}))}function k(){const e=document.activeElement;return null!=e&&"LI"===e.tagName&&null!=e.parentNode&&"check"===e.parentNode.__lexicalListType?e:null}function y(e,t,i){const l=k();return null!=l&&t.update((()=>{const o=d(l);if(!n(o))return;const c=function(e,t){let i=t?e.getPreviousSibling():e.getNextSibling(),l=e;for(;null==i&&n(l);)l=l.getParentOrThrow().getParent(),null!=l&&(i=t?l.getPreviousSibling():l.getNextSibling());for(;n(i);){const e=t?i.getLastChild():i.getFirstChild();if(!r(e))return i;i=t?e.getLastChild():e.getFirstChild()}return null}(o,i);if(null!=c){c.selectStart();const n=t.getElementByKey(c.__key);null!=n&&(e.preventDefault(),setTimeout((()=>{n.focus()}),0))}})),!1}export{E as CheckListPlugin};
@@ -1,7 +0,0 @@
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
- import{$isLinkNode as e}from"@lexical/link";import{useLexicalComposerContext as t}from"@lexical/react/LexicalComposerContext";import{$findMatchingParent as n,isHTMLAnchorElement as r}from"@lexical/utils";import{getNearestEditorFromDOMNode as l,$getNearestNodeFromDOMNode as o,$isElementNode as i,$getSelection as u,$isRangeSelection as a}from"lexical";import{useEffect as s}from"react";function c({newTab:c=!0}){const[f]=t();return s((()=>{const t=t=>{const s=t.target;if(!(s instanceof Node))return;const m=l(s);if(null===m)return;let p=null,d=null;if(m.update((()=>{const t=o(s);if(null!==t){const l=n(t,i);if(e(l))p=l.sanitizeUrl(l.getURL()),d=l.getTarget();else{const e=function(e,t){let n=e;for(;null!=n;){if(t(n))return n;n=n.parentNode}return null}(s,r);null!==e&&(p=e.href,d=e.target)}}})),null===p||""===p)return;const v=f.getEditorState().read(u);if(a(v)&&!v.isCollapsed())return void t.preventDefault();const x="auxclick"===t.type&&1===t.button;window.open(p,c||x||t.metaKey||t.ctrlKey||"_blank"===d?"_blank":"_self"),t.preventDefault()},s=e=>{1===e.button&&f.isEditable()&&t(e)};return f.registerRootListener(((e,n)=>{null!==n&&(n.removeEventListener("click",t),n.removeEventListener("mouseup",s)),null!==e&&(e.addEventListener("click",t),e.addEventListener("mouseup",s))}))}),[f,c]),null}export{c as default};
@@ -1,10 +0,0 @@
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
- import * as modDev from './LexicalContentEditable.dev.esm.js';
8
- import * as modProd from './LexicalContentEditable.prod.esm.js';
9
- const mod = process.env.NODE_ENV === 'development' ? modDev : modProd;
10
- export const ContentEditable = mod.ContentEditable;
@@ -1,7 +0,0 @@
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
- import{useLexicalComposerContext as t}from"@lexical/react/LexicalComposerContext";import{createCommand as e,KEY_ARROW_DOWN_COMMAND as n,KEY_ARROW_UP_COMMAND as o,KEY_ESCAPE_COMMAND as l,KEY_TAB_COMMAND as r,KEY_ENTER_COMMAND as i,COMMAND_PRIORITY_LOW as u,$getSelection as c,$isRangeSelection as s}from"lexical";import*as a from"react";import{useLayoutEffect as m,useEffect as d,useState as p,useCallback as f,useMemo as g,useRef as h}from"react";import{mergeRegister as w}from"@lexical/utils";var v="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?m:d;class y{constructor(t){this.key=t,this.ref={current:null},this.setRefElement=this.setRefElement.bind(this)}setRefElement(t){this.ref={current:t}}}const b=t=>{const e=document.getElementById("typeahead-menu");if(!e)return;const n=e.getBoundingClientRect();n.top+n.height>window.innerHeight&&e.scrollIntoView({block:"center"}),n.top<0&&e.scrollIntoView({block:"center"}),t.scrollIntoView({block:"nearest"})};function E(t,e){const n=t.getBoundingClientRect(),o=e.getBoundingClientRect();return n.top>o.top&&n.top<o.bottom}function C(e,n,o,l){const[r]=t();d((()=>{if(null!=n&&null!=e){const t=r.getRootElement(),e=null!=t?function(t,e){let n=getComputedStyle(t);const o="absolute"===n.position,l=e?/(auto|scroll|hidden)/:/(auto|scroll)/;if("fixed"===n.position)return document.body;for(let e=t;e=e.parentElement;)if(n=getComputedStyle(e),(!o||"static"!==n.position)&&l.test(n.overflow+n.overflowY+n.overflowX))return e;return document.body}(t,!1):document.body;let i=!1,u=E(n,e);const c=function(){i||(window.requestAnimationFrame((function(){o(),i=!1})),i=!0);const t=E(n,e);t!==u&&(u=t,null!=l&&l(t))},s=new ResizeObserver(o);return window.addEventListener("resize",o),document.addEventListener("scroll",c,{capture:!0,passive:!0}),s.observe(n),()=>{s.unobserve(n),window.removeEventListener("resize",o),document.removeEventListener("scroll",c,!0)}}}),[n,r,l,o,e])}const R=e("SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND");function x({close:t,editor:e,anchorElementRef:a,resolution:m,options:h,menuRenderFn:y,onSelectOption:E,shouldSplitNodeWithQuery:C=!1,commandPriority:x=u}){const[O,I]=p(null),S=m.match&&m.match.matchingString;d((()=>{I(0)}),[S]);const A=f((n=>{e.update((()=>{const e=null!=m.match&&C?function(t){const e=c();if(!s(e)||!e.isCollapsed())return null;const n=e.anchor;if("text"!==n.type)return null;const o=n.getNode();if(!o.isSimpleText())return null;const l=n.offset,r=o.getTextContent().slice(0,l),i=t.replaceableString.length,u=l-function(t,e,n){let o=n;for(let n=o;n<=e.length;n++)t.substr(-n)===e.substr(0,n)&&(o=n);return o}(r,t.matchingString,i);if(u<0)return null;let a;return 0===u?[a]=o.splitText(l):[,a]=o.splitText(u,l),a}(m.match):null;E(n,e,t,m.match?m.match.matchingString:"")}))}),[e,C,m.match,E,t]),L=f((t=>{const n=e.getRootElement();null!==n&&(n.setAttribute("aria-activedescendant","typeahead-item-"+t),I(t))}),[e]);d((()=>()=>{const t=e.getRootElement();null!==t&&t.removeAttribute("aria-activedescendant")}),[e]),v((()=>{null===h?I(null):null===O&&L(0)}),[h,O,L]),d((()=>w(e.registerCommand(R,(({option:t})=>!(!t.ref||null==t.ref.current)&&(b(t.ref.current),!0)),x))),[e,L,x]),d((()=>w(e.registerCommand(n,(t=>{const n=t;if(null!==h&&h.length&&null!==O){const t=O!==h.length-1?O+1:0;L(t);const o=h[t];null!=o.ref&&o.ref.current&&e.dispatchCommand(R,{index:t,option:o}),n.preventDefault(),n.stopImmediatePropagation()}return!0}),x),e.registerCommand(o,(t=>{const e=t;if(null!==h&&h.length&&null!==O){const t=0!==O?O-1:h.length-1;L(t);const n=h[t];null!=n.ref&&n.ref.current&&b(n.ref.current),e.preventDefault(),e.stopImmediatePropagation()}return!0}),x),e.registerCommand(l,(e=>{const n=e;return n.preventDefault(),n.stopImmediatePropagation(),t(),!0}),x),e.registerCommand(r,(t=>{const e=t;return null!==h&&null!==O&&null!=h[O]&&(e.preventDefault(),e.stopImmediatePropagation(),A(h[O]),!0)}),x),e.registerCommand(i,(t=>null!==h&&null!==O&&null!=h[O]&&(null!==t&&(t.preventDefault(),t.stopImmediatePropagation()),A(h[O]),!0)),x))),[A,t,e,h,O,L,x]);return y(a,g((()=>({options:h,selectOptionAndCleanUp:A,selectedIndex:O,setHighlightedIndex:I})),[A,O,h]),m.match?m.match.matchingString:"")}function O({options:e,onClose:n,onOpen:o,onSelectOption:l,menuRenderFn:r,anchorClassName:i,commandPriority:c=u,parent:s}){const[m]=t(),[g,w]=p(null),v=a.useRef(null),y=function(e,n,o,l=document.body){const[r]=t(),i=h(document.createElement("div")),u=f((()=>{i.current.style.top=i.current.style.bottom;const t=r.getRootElement(),n=i.current,u=n.firstChild;if(null!==t&&null!==e){const{left:r,top:c,width:s,height:a}=e.getRect(),m=i.current.offsetHeight;if(n.style.top=`${c+window.pageYOffset+m+3}px`,n.style.left=`${r+window.pageXOffset}px`,n.style.height=`${a}px`,n.style.width=`${s}px`,null!==u){u.style.top=`${c}`;const e=u.getBoundingClientRect(),o=e.height,l=e.width,i=t.getBoundingClientRect();r+l>i.right&&(n.style.left=`${i.right-l+window.pageXOffset}px`),(c+o>window.innerHeight||c+o>i.bottom)&&c-i.top>o&&(n.style.top=c-o+window.pageYOffset-a+"px")}n.isConnected||(null!=o&&(n.className=o),n.setAttribute("aria-label","Typeahead menu"),n.setAttribute("id","typeahead-menu"),n.setAttribute("role","listbox"),n.style.display="block",n.style.position="absolute",l.append(n)),i.current=n,t.setAttribute("aria-controls","typeahead-menu")}}),[r,e,o,l]);d((()=>{const t=r.getRootElement();if(null!==e)return u(),()=>{null!==t&&t.removeAttribute("aria-controls");const e=i.current;null!==e&&e.isConnected&&e.remove()}}),[r,u,e]);const c=f((t=>{null!==e&&(t||n(null))}),[e,n]);return C(e,i.current,u,c),i}(g,w,i,s),b=f((()=>{w(null),null!=n&&null!==g&&n()}),[n,g]),E=f((t=>{w(t),null!=o&&null===g&&o(t)}),[o,g]),R=f((t=>{t.preventDefault(),E({getRect:()=>new DOMRect(t.clientX,t.clientY,1,1)})}),[E]),O=f((t=>{null===g||null==v.current||null==t.target||v.current.contains(t.target)||b()}),[b,g]);return d((()=>{const t=m.getRootElement();if(t)return t.addEventListener("contextmenu",R),()=>t.removeEventListener("contextmenu",R)}),[m,R]),d((()=>(document.addEventListener("click",O),()=>document.removeEventListener("click",O))),[m,O]),null===g||null===m?null:a.createElement(x,{close:b,resolution:g,editor:m,anchorElementRef:y,options:e,menuRenderFn:(t,e)=>r(t,e,{setMenuRef:t=>{v.current=t}}),onSelectOption:l,commandPriority:c})}export{O as LexicalContextMenuPlugin,y as MenuOption};
@@ -1,10 +0,0 @@
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
- import * as modDev from './LexicalEditorRefPlugin.dev.esm.js';
8
- import * as modProd from './LexicalEditorRefPlugin.prod.esm.js';
9
- const mod = process.env.NODE_ENV === 'development' ? modDev : modProd;
10
- export const EditorRefPlugin = mod.EditorRefPlugin;
@@ -1,10 +0,0 @@
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
- import * as modDev from './LexicalHorizontalRulePlugin.dev.esm.js';
8
- import * as modProd from './LexicalHorizontalRulePlugin.prod.esm.js';
9
- const mod = process.env.NODE_ENV === 'development' ? modDev : modProd;
10
- export const HorizontalRulePlugin = mod.HorizontalRulePlugin;
@@ -1,10 +0,0 @@
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
- import * as modDev from './LexicalNestedComposer.dev.esm.js';
8
- import * as modProd from './LexicalNestedComposer.prod.esm.js';
9
- const mod = process.env.NODE_ENV === 'development' ? modDev : modProd;
10
- export const LexicalNestedComposer = mod.LexicalNestedComposer;
@@ -1,7 +0,0 @@
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
- import{useCollaborationContext as e}from"@lexical/react/LexicalCollaborationContext";import{LexicalComposerContext as t,createLexicalComposerContext as r}from"@lexical/react/LexicalComposerContext";import*as o from"react";import{useRef as n,useContext as i,useMemo as l,useEffect as a}from"react";var s=function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)};function c({initialEditor:c,children:p,initialNodes:d,initialTheme:f,skipCollabChecks:m}){const h=n(!1),u=i(t);null==u&&s(9);const[x,{getTheme:g}]=u,v=l((()=>{const e=f||g()||void 0,t=r(u,e);if(void 0!==e&&(c._config.theme=e),c._parentEditor=x,d)for(let e of d){let t=null,r=null;if("function"!=typeof e){const o=e;e=o.replace,t=o.with,r=o.withKlass||null}const o=c._nodes.get(e.getType());c._nodes.set(e.getType(),{exportDOM:o?o.exportDOM:void 0,klass:e,replace:t,replaceWithKlass:r,transforms:new Set})}else{const e=c._nodes=new Map(x._nodes);for(const[t,r]of e)c._nodes.set(t,{exportDOM:r.exportDOM,klass:r.klass,replace:r.replace,replaceWithKlass:r.replaceWithKlass,transforms:new Set})}return c._config.namespace=x._config.namespace,c._editable=x._editable,[c,t]}),[]),{isCollabActive:_,yjsDocMap:w}=e(),b=m||h.current||w.has(c.getKey());return a((()=>{b&&(h.current=!0)}),[b]),a((()=>x.registerEditableListener((e=>{c.setEditable(e)}))),[c,x]),o.createElement(t.Provider,{value:v},!_||b?p:null)}export{c as LexicalNestedComposer};
@@ -1,10 +0,0 @@
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
- import * as modDev from './LexicalNodeEventPlugin.dev.esm.js';
8
- import * as modProd from './LexicalNodeEventPlugin.prod.esm.js';
9
- const mod = process.env.NODE_ENV === 'development' ? modDev : modProd;
10
- export const NodeEventPlugin = mod.NodeEventPlugin;
@@ -1,10 +0,0 @@
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
- import * as modDev from './LexicalOnChangePlugin.dev.esm.js';
8
- import * as modProd from './LexicalOnChangePlugin.prod.esm.js';
9
- const mod = process.env.NODE_ENV === 'development' ? modDev : modProd;
10
- export const OnChangePlugin = mod.OnChangePlugin;
@@ -1,10 +0,0 @@
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
- import * as modDev from './LexicalPlainTextPlugin.dev.esm.js';
8
- import * as modProd from './LexicalPlainTextPlugin.prod.esm.js';
9
- const mod = process.env.NODE_ENV === 'development' ? modDev : modProd;
10
- export const PlainTextPlugin = mod.PlainTextPlugin;
@@ -1,10 +0,0 @@
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
- import * as modDev from './LexicalRichTextPlugin.dev.esm.js';
8
- import * as modProd from './LexicalRichTextPlugin.prod.esm.js';
9
- const mod = process.env.NODE_ENV === 'development' ? modDev : modProd;
10
- export const RichTextPlugin = mod.RichTextPlugin;
@@ -1,10 +0,0 @@
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
- import * as modDev from './LexicalTablePlugin.dev.esm.js';
8
- import * as modProd from './LexicalTablePlugin.prod.esm.js';
9
- const mod = process.env.NODE_ENV === 'development' ? modDev : modProd;
10
- export const TablePlugin = mod.TablePlugin;
@@ -1,10 +0,0 @@
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
- import * as modDev from './useLexicalSubscription.dev.esm.js';
8
- import * as modProd from './useLexicalSubscription.prod.esm.js';
9
- const mod = process.env.NODE_ENV === 'development' ? modDev : modProd;
10
- export default mod.default;
@@ -1,10 +0,0 @@
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
- import * as modDev from './useLexicalTextEntity.dev.esm.js';
8
- import * as modProd from './useLexicalTextEntity.prod.esm.js';
9
- const mod = process.env.NODE_ENV === 'development' ? modDev : modProd;
10
- export const useLexicalTextEntity = mod.useLexicalTextEntity;