@lexical/react 0.44.1-nightly.20260519.0 → 0.45.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.
- package/README.md +1 -1
- package/{LexicalClearEditorPlugin.dev.js → dist/LexicalClearEditorPlugin.dev.js} +2 -11
- package/{LexicalClearEditorPlugin.dev.mjs → dist/LexicalClearEditorPlugin.dev.mjs} +1 -10
- package/dist/LexicalClearEditorPlugin.prod.js +9 -0
- package/dist/LexicalClearEditorPlugin.prod.mjs +9 -0
- package/{LexicalComposer.dev.js → dist/LexicalComposer.dev.js} +2 -12
- package/{LexicalComposer.dev.mjs → dist/LexicalComposer.dev.mjs} +1 -11
- package/dist/LexicalComposer.prod.js +9 -0
- package/dist/LexicalComposer.prod.mjs +9 -0
- package/{LexicalContentEditable.dev.js → dist/LexicalContentEditable.dev.js} +13 -22
- package/{LexicalContentEditable.dev.mjs → dist/LexicalContentEditable.dev.mjs} +12 -21
- package/dist/LexicalContentEditable.prod.js +9 -0
- package/dist/LexicalContentEditable.prod.mjs +9 -0
- package/{LexicalDraggableBlockPlugin.dev.js → dist/LexicalDraggableBlockPlugin.dev.js} +5 -27
- package/{LexicalDraggableBlockPlugin.dev.mjs → dist/LexicalDraggableBlockPlugin.dev.mjs} +1 -23
- package/dist/LexicalDraggableBlockPlugin.prod.js +9 -0
- package/dist/LexicalDraggableBlockPlugin.prod.mjs +9 -0
- package/{LexicalNestedComposer.dev.js → dist/LexicalNestedComposer.dev.js} +1 -0
- package/{LexicalNestedComposer.dev.mjs → dist/LexicalNestedComposer.dev.mjs} +1 -0
- package/{LexicalNodeMenuPlugin.dev.js → dist/LexicalNodeMenuPlugin.dev.js} +24 -34
- package/{LexicalNodeMenuPlugin.dev.mjs → dist/LexicalNodeMenuPlugin.dev.mjs} +22 -32
- package/dist/LexicalNodeMenuPlugin.prod.js +9 -0
- package/dist/LexicalNodeMenuPlugin.prod.mjs +9 -0
- package/{LexicalOnChangePlugin.dev.js → dist/LexicalOnChangePlugin.dev.js} +1 -11
- package/{LexicalOnChangePlugin.dev.mjs → dist/LexicalOnChangePlugin.dev.mjs} +1 -11
- package/dist/LexicalOnChangePlugin.prod.js +9 -0
- package/dist/LexicalOnChangePlugin.prod.mjs +9 -0
- package/{LexicalPlainTextPlugin.dev.js → dist/LexicalPlainTextPlugin.dev.js} +2 -11
- package/{LexicalPlainTextPlugin.dev.mjs → dist/LexicalPlainTextPlugin.dev.mjs} +1 -10
- package/dist/LexicalPlainTextPlugin.prod.js +9 -0
- package/dist/LexicalPlainTextPlugin.prod.mjs +9 -0
- package/{LexicalRichTextPlugin.dev.js → dist/LexicalRichTextPlugin.dev.js} +2 -11
- package/{LexicalRichTextPlugin.dev.mjs → dist/LexicalRichTextPlugin.dev.mjs} +1 -10
- package/dist/LexicalRichTextPlugin.prod.js +9 -0
- package/dist/LexicalRichTextPlugin.prod.mjs +9 -0
- package/{LexicalTablePlugin.dev.js → dist/LexicalTablePlugin.dev.js} +6 -3
- package/{LexicalTablePlugin.dev.mjs → dist/LexicalTablePlugin.dev.mjs} +7 -4
- package/dist/LexicalTablePlugin.prod.js +9 -0
- package/dist/LexicalTablePlugin.prod.mjs +9 -0
- package/{LexicalTypeaheadMenuPlugin.dev.js → dist/LexicalTypeaheadMenuPlugin.dev.js} +24 -34
- package/{LexicalTypeaheadMenuPlugin.dev.mjs → dist/LexicalTypeaheadMenuPlugin.dev.mjs} +22 -32
- package/dist/LexicalTypeaheadMenuPlugin.prod.js +9 -0
- package/dist/LexicalTypeaheadMenuPlugin.prod.mjs +9 -0
- package/dist/shared/reactPatches.d.ts +8 -0
- package/dist/shared/useLayoutEffect.d.ts +10 -0
- package/{useLexicalEditable.dev.js → dist/useLexicalEditable.dev.js} +2 -11
- package/{useLexicalEditable.dev.mjs → dist/useLexicalEditable.dev.mjs} +1 -10
- package/dist/useLexicalEditable.prod.js +9 -0
- package/dist/useLexicalEditable.prod.mjs +9 -0
- package/{useLexicalIsTextContentEmpty.dev.js → dist/useLexicalIsTextContentEmpty.dev.js} +2 -11
- package/{useLexicalIsTextContentEmpty.dev.mjs → dist/useLexicalIsTextContentEmpty.dev.mjs} +1 -10
- package/dist/useLexicalIsTextContentEmpty.prod.js +9 -0
- package/dist/useLexicalIsTextContentEmpty.prod.mjs +9 -0
- package/{useLexicalSubscription.dev.js → dist/useLexicalSubscription.dev.js} +2 -11
- package/{useLexicalSubscription.dev.mjs → dist/useLexicalSubscription.dev.mjs} +1 -10
- package/dist/useLexicalSubscription.prod.js +9 -0
- package/dist/useLexicalSubscription.prod.mjs +9 -0
- package/package.json +1054 -938
- package/src/ExtensionComponent.tsx +59 -0
- package/src/LexicalAutoEmbedPlugin.tsx +300 -0
- package/src/LexicalAutoFocusPlugin.ts +41 -0
- package/src/LexicalAutoLinkPlugin.ts +61 -0
- package/src/LexicalBlockWithAlignableContents.tsx +119 -0
- package/src/LexicalCharacterLimitPlugin.tsx +91 -0
- package/src/LexicalCheckListPlugin.tsx +24 -0
- package/src/LexicalClearEditorPlugin.ts +27 -0
- package/src/LexicalClickableLinkPlugin.tsx +28 -0
- package/src/LexicalCollaborationContext.tsx +91 -0
- package/src/LexicalCollaborationPlugin.tsx +266 -0
- package/src/LexicalComposer.tsx +185 -0
- package/src/LexicalComposerContext.ts +63 -0
- package/src/LexicalContentEditable.tsx +98 -0
- package/src/LexicalDecoratorBlockNode.ts +87 -0
- package/src/LexicalDraggableBlockPlugin.tsx +601 -0
- package/src/LexicalEditorRefPlugin.tsx +41 -0
- package/src/LexicalErrorBoundary.tsx +46 -0
- package/src/LexicalExtensionComposer.tsx +117 -0
- package/src/LexicalExtensionEditorComposer.tsx +46 -0
- package/src/LexicalHashtagPlugin.ts +26 -0
- package/src/LexicalHistoryPlugin.ts +31 -0
- package/src/LexicalHorizontalRuleNode.tsx +123 -0
- package/src/LexicalHorizontalRulePlugin.ts +52 -0
- package/src/LexicalLinkPlugin.ts +32 -0
- package/src/LexicalListPlugin.ts +60 -0
- package/src/LexicalMarkdownShortcutPlugin.tsx +56 -0
- package/src/LexicalNestedComposer.tsx +221 -0
- package/src/LexicalNodeContextMenuPlugin.tsx +316 -0
- package/src/LexicalNodeEventPlugin.ts +71 -0
- package/src/LexicalNodeMenuPlugin.tsx +131 -0
- package/src/LexicalOnChangePlugin.ts +52 -0
- package/src/LexicalPlainTextPlugin.tsx +65 -0
- package/src/LexicalRichTextPlugin.tsx +65 -0
- package/src/LexicalSelectionAlwaysOnDisplay.tsx +24 -0
- package/src/LexicalTabIndentationPlugin.tsx +40 -0
- package/src/LexicalTableOfContentsPlugin.tsx +277 -0
- package/src/LexicalTablePlugin.ts +118 -0
- package/src/LexicalTreeView.tsx +128 -0
- package/src/LexicalTypeaheadMenuPlugin.tsx +365 -0
- package/src/ReactExtension.tsx +113 -0
- package/src/ReactPluginHostExtension.tsx +228 -0
- package/src/ReactProviderExtension.tsx +20 -0
- package/src/TreeViewExtension.tsx +48 -0
- package/src/shared/LegacyDecorators.tsx +62 -0
- package/src/shared/LexicalContentEditableElement.tsx +126 -0
- package/src/shared/LexicalMenu.tsx +738 -0
- package/src/shared/buildEditorComponent.tsx +60 -0
- package/src/shared/mergeRefs.ts +20 -0
- package/src/shared/point.ts +55 -0
- package/src/shared/reactPatches.ts +22 -0
- package/src/shared/rect.ts +158 -0
- package/src/shared/types.ts +106 -0
- package/src/shared/useCanShowPlaceholder.ts +50 -0
- package/src/shared/useCharacterLimit.ts +314 -0
- package/src/shared/useDecorators.tsx +73 -0
- package/src/shared/useHistory.ts +28 -0
- package/src/shared/useLayoutEffect.ts +19 -0
- package/src/shared/useList.ts +18 -0
- package/src/shared/usePlainTextSetup.ts +24 -0
- package/src/shared/useReactDecorators.tsx +53 -0
- package/src/shared/useRichTextSetup.ts +24 -0
- package/src/shared/useYjsCollaboration.tsx +694 -0
- package/src/useExtensionComponent.tsx +57 -0
- package/src/useExtensionSignalValue.ts +85 -0
- package/src/useLexicalEditable.ts +33 -0
- package/src/useLexicalIsTextContentEmpty.ts +37 -0
- package/src/useLexicalNodeSelection.ts +114 -0
- package/src/useLexicalSubscription.tsx +52 -0
- package/src/useLexicalTextEntity.ts +29 -0
- package/LexicalClearEditorPlugin.prod.js +0 -9
- package/LexicalClearEditorPlugin.prod.mjs +0 -9
- package/LexicalComposer.prod.js +0 -9
- package/LexicalComposer.prod.mjs +0 -9
- package/LexicalContentEditable.prod.js +0 -9
- package/LexicalContentEditable.prod.mjs +0 -9
- package/LexicalDraggableBlockPlugin.prod.js +0 -9
- package/LexicalDraggableBlockPlugin.prod.mjs +0 -9
- package/LexicalNodeMenuPlugin.prod.js +0 -9
- package/LexicalNodeMenuPlugin.prod.mjs +0 -9
- package/LexicalOnChangePlugin.prod.js +0 -9
- package/LexicalOnChangePlugin.prod.mjs +0 -9
- package/LexicalPlainTextPlugin.prod.js +0 -9
- package/LexicalPlainTextPlugin.prod.mjs +0 -9
- package/LexicalRichTextPlugin.prod.js +0 -9
- package/LexicalRichTextPlugin.prod.mjs +0 -9
- package/LexicalTablePlugin.prod.js +0 -9
- package/LexicalTablePlugin.prod.mjs +0 -9
- package/LexicalTypeaheadMenuPlugin.prod.js +0 -9
- package/LexicalTypeaheadMenuPlugin.prod.mjs +0 -9
- package/useLexicalEditable.prod.js +0 -9
- package/useLexicalEditable.prod.mjs +0 -9
- package/useLexicalIsTextContentEmpty.prod.js +0 -9
- package/useLexicalIsTextContentEmpty.prod.mjs +0 -9
- package/useLexicalSubscription.prod.js +0 -9
- package/useLexicalSubscription.prod.mjs +0 -9
- /package/{ExtensionComponent.d.ts → dist/ExtensionComponent.d.ts} +0 -0
- /package/{LexicalAutoEmbedPlugin.d.ts → dist/LexicalAutoEmbedPlugin.d.ts} +0 -0
- /package/{LexicalAutoEmbedPlugin.dev.js → dist/LexicalAutoEmbedPlugin.dev.js} +0 -0
- /package/{LexicalAutoEmbedPlugin.dev.mjs → dist/LexicalAutoEmbedPlugin.dev.mjs} +0 -0
- /package/{LexicalAutoEmbedPlugin.js → dist/LexicalAutoEmbedPlugin.js} +0 -0
- /package/{LexicalAutoEmbedPlugin.js.flow → dist/LexicalAutoEmbedPlugin.js.flow} +0 -0
- /package/{LexicalAutoEmbedPlugin.mjs → dist/LexicalAutoEmbedPlugin.mjs} +0 -0
- /package/{LexicalAutoEmbedPlugin.node.mjs → dist/LexicalAutoEmbedPlugin.node.mjs} +0 -0
- /package/{LexicalAutoEmbedPlugin.prod.js → dist/LexicalAutoEmbedPlugin.prod.js} +0 -0
- /package/{LexicalAutoEmbedPlugin.prod.mjs → dist/LexicalAutoEmbedPlugin.prod.mjs} +0 -0
- /package/{LexicalAutoFocusPlugin.d.ts → dist/LexicalAutoFocusPlugin.d.ts} +0 -0
- /package/{LexicalAutoFocusPlugin.dev.js → dist/LexicalAutoFocusPlugin.dev.js} +0 -0
- /package/{LexicalAutoFocusPlugin.dev.mjs → dist/LexicalAutoFocusPlugin.dev.mjs} +0 -0
- /package/{LexicalAutoFocusPlugin.js → dist/LexicalAutoFocusPlugin.js} +0 -0
- /package/{LexicalAutoFocusPlugin.js.flow → dist/LexicalAutoFocusPlugin.js.flow} +0 -0
- /package/{LexicalAutoFocusPlugin.mjs → dist/LexicalAutoFocusPlugin.mjs} +0 -0
- /package/{LexicalAutoFocusPlugin.node.mjs → dist/LexicalAutoFocusPlugin.node.mjs} +0 -0
- /package/{LexicalAutoFocusPlugin.prod.js → dist/LexicalAutoFocusPlugin.prod.js} +0 -0
- /package/{LexicalAutoFocusPlugin.prod.mjs → dist/LexicalAutoFocusPlugin.prod.mjs} +0 -0
- /package/{LexicalAutoLinkPlugin.d.ts → dist/LexicalAutoLinkPlugin.d.ts} +0 -0
- /package/{LexicalAutoLinkPlugin.dev.js → dist/LexicalAutoLinkPlugin.dev.js} +0 -0
- /package/{LexicalAutoLinkPlugin.dev.mjs → dist/LexicalAutoLinkPlugin.dev.mjs} +0 -0
- /package/{LexicalAutoLinkPlugin.js → dist/LexicalAutoLinkPlugin.js} +0 -0
- /package/{LexicalAutoLinkPlugin.js.flow → dist/LexicalAutoLinkPlugin.js.flow} +0 -0
- /package/{LexicalAutoLinkPlugin.mjs → dist/LexicalAutoLinkPlugin.mjs} +0 -0
- /package/{LexicalAutoLinkPlugin.node.mjs → dist/LexicalAutoLinkPlugin.node.mjs} +0 -0
- /package/{LexicalAutoLinkPlugin.prod.js → dist/LexicalAutoLinkPlugin.prod.js} +0 -0
- /package/{LexicalAutoLinkPlugin.prod.mjs → dist/LexicalAutoLinkPlugin.prod.mjs} +0 -0
- /package/{LexicalBlockWithAlignableContents.d.ts → dist/LexicalBlockWithAlignableContents.d.ts} +0 -0
- /package/{LexicalBlockWithAlignableContents.dev.js → dist/LexicalBlockWithAlignableContents.dev.js} +0 -0
- /package/{LexicalBlockWithAlignableContents.dev.mjs → dist/LexicalBlockWithAlignableContents.dev.mjs} +0 -0
- /package/{LexicalBlockWithAlignableContents.js → dist/LexicalBlockWithAlignableContents.js} +0 -0
- /package/{LexicalBlockWithAlignableContents.js.flow → dist/LexicalBlockWithAlignableContents.js.flow} +0 -0
- /package/{LexicalBlockWithAlignableContents.mjs → dist/LexicalBlockWithAlignableContents.mjs} +0 -0
- /package/{LexicalBlockWithAlignableContents.node.mjs → dist/LexicalBlockWithAlignableContents.node.mjs} +0 -0
- /package/{LexicalBlockWithAlignableContents.prod.js → dist/LexicalBlockWithAlignableContents.prod.js} +0 -0
- /package/{LexicalBlockWithAlignableContents.prod.mjs → dist/LexicalBlockWithAlignableContents.prod.mjs} +0 -0
- /package/{LexicalCharacterLimitPlugin.d.ts → dist/LexicalCharacterLimitPlugin.d.ts} +0 -0
- /package/{LexicalCharacterLimitPlugin.dev.js → dist/LexicalCharacterLimitPlugin.dev.js} +0 -0
- /package/{LexicalCharacterLimitPlugin.dev.mjs → dist/LexicalCharacterLimitPlugin.dev.mjs} +0 -0
- /package/{LexicalCharacterLimitPlugin.js → dist/LexicalCharacterLimitPlugin.js} +0 -0
- /package/{LexicalCharacterLimitPlugin.js.flow → dist/LexicalCharacterLimitPlugin.js.flow} +0 -0
- /package/{LexicalCharacterLimitPlugin.mjs → dist/LexicalCharacterLimitPlugin.mjs} +0 -0
- /package/{LexicalCharacterLimitPlugin.node.mjs → dist/LexicalCharacterLimitPlugin.node.mjs} +0 -0
- /package/{LexicalCharacterLimitPlugin.prod.js → dist/LexicalCharacterLimitPlugin.prod.js} +0 -0
- /package/{LexicalCharacterLimitPlugin.prod.mjs → dist/LexicalCharacterLimitPlugin.prod.mjs} +0 -0
- /package/{LexicalCheckListPlugin.d.ts → dist/LexicalCheckListPlugin.d.ts} +0 -0
- /package/{LexicalCheckListPlugin.dev.js → dist/LexicalCheckListPlugin.dev.js} +0 -0
- /package/{LexicalCheckListPlugin.dev.mjs → dist/LexicalCheckListPlugin.dev.mjs} +0 -0
- /package/{LexicalCheckListPlugin.js → dist/LexicalCheckListPlugin.js} +0 -0
- /package/{LexicalCheckListPlugin.js.flow → dist/LexicalCheckListPlugin.js.flow} +0 -0
- /package/{LexicalCheckListPlugin.mjs → dist/LexicalCheckListPlugin.mjs} +0 -0
- /package/{LexicalCheckListPlugin.node.mjs → dist/LexicalCheckListPlugin.node.mjs} +0 -0
- /package/{LexicalCheckListPlugin.prod.js → dist/LexicalCheckListPlugin.prod.js} +0 -0
- /package/{LexicalCheckListPlugin.prod.mjs → dist/LexicalCheckListPlugin.prod.mjs} +0 -0
- /package/{LexicalClearEditorPlugin.d.ts → dist/LexicalClearEditorPlugin.d.ts} +0 -0
- /package/{LexicalClearEditorPlugin.js → dist/LexicalClearEditorPlugin.js} +0 -0
- /package/{LexicalClearEditorPlugin.js.flow → dist/LexicalClearEditorPlugin.js.flow} +0 -0
- /package/{LexicalClearEditorPlugin.mjs → dist/LexicalClearEditorPlugin.mjs} +0 -0
- /package/{LexicalClearEditorPlugin.node.mjs → dist/LexicalClearEditorPlugin.node.mjs} +0 -0
- /package/{LexicalClickableLinkPlugin.d.ts → dist/LexicalClickableLinkPlugin.d.ts} +0 -0
- /package/{LexicalClickableLinkPlugin.dev.js → dist/LexicalClickableLinkPlugin.dev.js} +0 -0
- /package/{LexicalClickableLinkPlugin.dev.mjs → dist/LexicalClickableLinkPlugin.dev.mjs} +0 -0
- /package/{LexicalClickableLinkPlugin.js → dist/LexicalClickableLinkPlugin.js} +0 -0
- /package/{LexicalClickableLinkPlugin.js.flow → dist/LexicalClickableLinkPlugin.js.flow} +0 -0
- /package/{LexicalClickableLinkPlugin.mjs → dist/LexicalClickableLinkPlugin.mjs} +0 -0
- /package/{LexicalClickableLinkPlugin.node.mjs → dist/LexicalClickableLinkPlugin.node.mjs} +0 -0
- /package/{LexicalClickableLinkPlugin.prod.js → dist/LexicalClickableLinkPlugin.prod.js} +0 -0
- /package/{LexicalClickableLinkPlugin.prod.mjs → dist/LexicalClickableLinkPlugin.prod.mjs} +0 -0
- /package/{LexicalCollaborationContext.d.ts → dist/LexicalCollaborationContext.d.ts} +0 -0
- /package/{LexicalCollaborationContext.dev.js → dist/LexicalCollaborationContext.dev.js} +0 -0
- /package/{LexicalCollaborationContext.dev.mjs → dist/LexicalCollaborationContext.dev.mjs} +0 -0
- /package/{LexicalCollaborationContext.js → dist/LexicalCollaborationContext.js} +0 -0
- /package/{LexicalCollaborationContext.js.flow → dist/LexicalCollaborationContext.js.flow} +0 -0
- /package/{LexicalCollaborationContext.mjs → dist/LexicalCollaborationContext.mjs} +0 -0
- /package/{LexicalCollaborationContext.node.mjs → dist/LexicalCollaborationContext.node.mjs} +0 -0
- /package/{LexicalCollaborationContext.prod.js → dist/LexicalCollaborationContext.prod.js} +0 -0
- /package/{LexicalCollaborationContext.prod.mjs → dist/LexicalCollaborationContext.prod.mjs} +0 -0
- /package/{LexicalCollaborationPlugin.d.ts → dist/LexicalCollaborationPlugin.d.ts} +0 -0
- /package/{LexicalCollaborationPlugin.dev.js → dist/LexicalCollaborationPlugin.dev.js} +0 -0
- /package/{LexicalCollaborationPlugin.dev.mjs → dist/LexicalCollaborationPlugin.dev.mjs} +0 -0
- /package/{LexicalCollaborationPlugin.js → dist/LexicalCollaborationPlugin.js} +0 -0
- /package/{LexicalCollaborationPlugin.js.flow → dist/LexicalCollaborationPlugin.js.flow} +0 -0
- /package/{LexicalCollaborationPlugin.mjs → dist/LexicalCollaborationPlugin.mjs} +0 -0
- /package/{LexicalCollaborationPlugin.node.mjs → dist/LexicalCollaborationPlugin.node.mjs} +0 -0
- /package/{LexicalCollaborationPlugin.prod.js → dist/LexicalCollaborationPlugin.prod.js} +0 -0
- /package/{LexicalCollaborationPlugin.prod.mjs → dist/LexicalCollaborationPlugin.prod.mjs} +0 -0
- /package/{LexicalComposer.d.ts → dist/LexicalComposer.d.ts} +0 -0
- /package/{LexicalComposer.js → dist/LexicalComposer.js} +0 -0
- /package/{LexicalComposer.js.flow → dist/LexicalComposer.js.flow} +0 -0
- /package/{LexicalComposer.mjs → dist/LexicalComposer.mjs} +0 -0
- /package/{LexicalComposer.node.mjs → dist/LexicalComposer.node.mjs} +0 -0
- /package/{LexicalComposerContext.d.ts → dist/LexicalComposerContext.d.ts} +0 -0
- /package/{LexicalComposerContext.dev.js → dist/LexicalComposerContext.dev.js} +0 -0
- /package/{LexicalComposerContext.dev.mjs → dist/LexicalComposerContext.dev.mjs} +0 -0
- /package/{LexicalComposerContext.js → dist/LexicalComposerContext.js} +0 -0
- /package/{LexicalComposerContext.js.flow → dist/LexicalComposerContext.js.flow} +0 -0
- /package/{LexicalComposerContext.mjs → dist/LexicalComposerContext.mjs} +0 -0
- /package/{LexicalComposerContext.node.mjs → dist/LexicalComposerContext.node.mjs} +0 -0
- /package/{LexicalComposerContext.prod.js → dist/LexicalComposerContext.prod.js} +0 -0
- /package/{LexicalComposerContext.prod.mjs → dist/LexicalComposerContext.prod.mjs} +0 -0
- /package/{LexicalContentEditable.d.ts → dist/LexicalContentEditable.d.ts} +0 -0
- /package/{LexicalContentEditable.js → dist/LexicalContentEditable.js} +0 -0
- /package/{LexicalContentEditable.js.flow → dist/LexicalContentEditable.js.flow} +0 -0
- /package/{LexicalContentEditable.mjs → dist/LexicalContentEditable.mjs} +0 -0
- /package/{LexicalContentEditable.node.mjs → dist/LexicalContentEditable.node.mjs} +0 -0
- /package/{LexicalDecoratorBlockNode.d.ts → dist/LexicalDecoratorBlockNode.d.ts} +0 -0
- /package/{LexicalDecoratorBlockNode.dev.js → dist/LexicalDecoratorBlockNode.dev.js} +0 -0
- /package/{LexicalDecoratorBlockNode.dev.mjs → dist/LexicalDecoratorBlockNode.dev.mjs} +0 -0
- /package/{LexicalDecoratorBlockNode.js → dist/LexicalDecoratorBlockNode.js} +0 -0
- /package/{LexicalDecoratorBlockNode.js.flow → dist/LexicalDecoratorBlockNode.js.flow} +0 -0
- /package/{LexicalDecoratorBlockNode.mjs → dist/LexicalDecoratorBlockNode.mjs} +0 -0
- /package/{LexicalDecoratorBlockNode.node.mjs → dist/LexicalDecoratorBlockNode.node.mjs} +0 -0
- /package/{LexicalDecoratorBlockNode.prod.js → dist/LexicalDecoratorBlockNode.prod.js} +0 -0
- /package/{LexicalDecoratorBlockNode.prod.mjs → dist/LexicalDecoratorBlockNode.prod.mjs} +0 -0
- /package/{LexicalDraggableBlockPlugin.d.ts → dist/LexicalDraggableBlockPlugin.d.ts} +0 -0
- /package/{LexicalDraggableBlockPlugin.js → dist/LexicalDraggableBlockPlugin.js} +0 -0
- /package/{LexicalDraggableBlockPlugin.js.flow → dist/LexicalDraggableBlockPlugin.js.flow} +0 -0
- /package/{LexicalDraggableBlockPlugin.mjs → dist/LexicalDraggableBlockPlugin.mjs} +0 -0
- /package/{LexicalDraggableBlockPlugin.node.mjs → dist/LexicalDraggableBlockPlugin.node.mjs} +0 -0
- /package/{LexicalEditorRefPlugin.d.ts → dist/LexicalEditorRefPlugin.d.ts} +0 -0
- /package/{LexicalEditorRefPlugin.dev.js → dist/LexicalEditorRefPlugin.dev.js} +0 -0
- /package/{LexicalEditorRefPlugin.dev.mjs → dist/LexicalEditorRefPlugin.dev.mjs} +0 -0
- /package/{LexicalEditorRefPlugin.js → dist/LexicalEditorRefPlugin.js} +0 -0
- /package/{LexicalEditorRefPlugin.js.flow → dist/LexicalEditorRefPlugin.js.flow} +0 -0
- /package/{LexicalEditorRefPlugin.mjs → dist/LexicalEditorRefPlugin.mjs} +0 -0
- /package/{LexicalEditorRefPlugin.node.mjs → dist/LexicalEditorRefPlugin.node.mjs} +0 -0
- /package/{LexicalEditorRefPlugin.prod.js → dist/LexicalEditorRefPlugin.prod.js} +0 -0
- /package/{LexicalEditorRefPlugin.prod.mjs → dist/LexicalEditorRefPlugin.prod.mjs} +0 -0
- /package/{LexicalErrorBoundary.d.ts → dist/LexicalErrorBoundary.d.ts} +0 -0
- /package/{LexicalErrorBoundary.dev.js → dist/LexicalErrorBoundary.dev.js} +0 -0
- /package/{LexicalErrorBoundary.dev.mjs → dist/LexicalErrorBoundary.dev.mjs} +0 -0
- /package/{LexicalErrorBoundary.js → dist/LexicalErrorBoundary.js} +0 -0
- /package/{LexicalErrorBoundary.js.flow → dist/LexicalErrorBoundary.js.flow} +0 -0
- /package/{LexicalErrorBoundary.mjs → dist/LexicalErrorBoundary.mjs} +0 -0
- /package/{LexicalErrorBoundary.node.mjs → dist/LexicalErrorBoundary.node.mjs} +0 -0
- /package/{LexicalErrorBoundary.prod.js → dist/LexicalErrorBoundary.prod.js} +0 -0
- /package/{LexicalErrorBoundary.prod.mjs → dist/LexicalErrorBoundary.prod.mjs} +0 -0
- /package/{LexicalExtensionComponent.dev.js → dist/LexicalExtensionComponent.dev.js} +0 -0
- /package/{LexicalExtensionComponent.dev.mjs → dist/LexicalExtensionComponent.dev.mjs} +0 -0
- /package/{LexicalExtensionComponent.js → dist/LexicalExtensionComponent.js} +0 -0
- /package/{LexicalExtensionComponent.js.flow → dist/LexicalExtensionComponent.js.flow} +0 -0
- /package/{LexicalExtensionComponent.mjs → dist/LexicalExtensionComponent.mjs} +0 -0
- /package/{LexicalExtensionComponent.node.mjs → dist/LexicalExtensionComponent.node.mjs} +0 -0
- /package/{LexicalExtensionComponent.prod.js → dist/LexicalExtensionComponent.prod.js} +0 -0
- /package/{LexicalExtensionComponent.prod.mjs → dist/LexicalExtensionComponent.prod.mjs} +0 -0
- /package/{LexicalExtensionComposer.d.ts → dist/LexicalExtensionComposer.d.ts} +0 -0
- /package/{LexicalExtensionComposer.dev.js → dist/LexicalExtensionComposer.dev.js} +0 -0
- /package/{LexicalExtensionComposer.dev.mjs → dist/LexicalExtensionComposer.dev.mjs} +0 -0
- /package/{LexicalExtensionComposer.js → dist/LexicalExtensionComposer.js} +0 -0
- /package/{LexicalExtensionComposer.js.flow → dist/LexicalExtensionComposer.js.flow} +0 -0
- /package/{LexicalExtensionComposer.mjs → dist/LexicalExtensionComposer.mjs} +0 -0
- /package/{LexicalExtensionComposer.node.mjs → dist/LexicalExtensionComposer.node.mjs} +0 -0
- /package/{LexicalExtensionComposer.prod.js → dist/LexicalExtensionComposer.prod.js} +0 -0
- /package/{LexicalExtensionComposer.prod.mjs → dist/LexicalExtensionComposer.prod.mjs} +0 -0
- /package/{LexicalExtensionEditorComposer.d.ts → dist/LexicalExtensionEditorComposer.d.ts} +0 -0
- /package/{LexicalExtensionEditorComposer.dev.js → dist/LexicalExtensionEditorComposer.dev.js} +0 -0
- /package/{LexicalExtensionEditorComposer.dev.mjs → dist/LexicalExtensionEditorComposer.dev.mjs} +0 -0
- /package/{LexicalExtensionEditorComposer.js → dist/LexicalExtensionEditorComposer.js} +0 -0
- /package/{LexicalExtensionEditorComposer.js.flow → dist/LexicalExtensionEditorComposer.js.flow} +0 -0
- /package/{LexicalExtensionEditorComposer.mjs → dist/LexicalExtensionEditorComposer.mjs} +0 -0
- /package/{LexicalExtensionEditorComposer.node.mjs → dist/LexicalExtensionEditorComposer.node.mjs} +0 -0
- /package/{LexicalExtensionEditorComposer.prod.js → dist/LexicalExtensionEditorComposer.prod.js} +0 -0
- /package/{LexicalExtensionEditorComposer.prod.mjs → dist/LexicalExtensionEditorComposer.prod.mjs} +0 -0
- /package/{LexicalHashtagPlugin.d.ts → dist/LexicalHashtagPlugin.d.ts} +0 -0
- /package/{LexicalHashtagPlugin.dev.js → dist/LexicalHashtagPlugin.dev.js} +0 -0
- /package/{LexicalHashtagPlugin.dev.mjs → dist/LexicalHashtagPlugin.dev.mjs} +0 -0
- /package/{LexicalHashtagPlugin.js → dist/LexicalHashtagPlugin.js} +0 -0
- /package/{LexicalHashtagPlugin.js.flow → dist/LexicalHashtagPlugin.js.flow} +0 -0
- /package/{LexicalHashtagPlugin.mjs → dist/LexicalHashtagPlugin.mjs} +0 -0
- /package/{LexicalHashtagPlugin.node.mjs → dist/LexicalHashtagPlugin.node.mjs} +0 -0
- /package/{LexicalHashtagPlugin.prod.js → dist/LexicalHashtagPlugin.prod.js} +0 -0
- /package/{LexicalHashtagPlugin.prod.mjs → dist/LexicalHashtagPlugin.prod.mjs} +0 -0
- /package/{LexicalHistoryPlugin.d.ts → dist/LexicalHistoryPlugin.d.ts} +0 -0
- /package/{LexicalHistoryPlugin.dev.js → dist/LexicalHistoryPlugin.dev.js} +0 -0
- /package/{LexicalHistoryPlugin.dev.mjs → dist/LexicalHistoryPlugin.dev.mjs} +0 -0
- /package/{LexicalHistoryPlugin.js → dist/LexicalHistoryPlugin.js} +0 -0
- /package/{LexicalHistoryPlugin.js.flow → dist/LexicalHistoryPlugin.js.flow} +0 -0
- /package/{LexicalHistoryPlugin.mjs → dist/LexicalHistoryPlugin.mjs} +0 -0
- /package/{LexicalHistoryPlugin.node.mjs → dist/LexicalHistoryPlugin.node.mjs} +0 -0
- /package/{LexicalHistoryPlugin.prod.js → dist/LexicalHistoryPlugin.prod.js} +0 -0
- /package/{LexicalHistoryPlugin.prod.mjs → dist/LexicalHistoryPlugin.prod.mjs} +0 -0
- /package/{LexicalHorizontalRuleNode.d.ts → dist/LexicalHorizontalRuleNode.d.ts} +0 -0
- /package/{LexicalHorizontalRuleNode.dev.js → dist/LexicalHorizontalRuleNode.dev.js} +0 -0
- /package/{LexicalHorizontalRuleNode.dev.mjs → dist/LexicalHorizontalRuleNode.dev.mjs} +0 -0
- /package/{LexicalHorizontalRuleNode.js → dist/LexicalHorizontalRuleNode.js} +0 -0
- /package/{LexicalHorizontalRuleNode.js.flow → dist/LexicalHorizontalRuleNode.js.flow} +0 -0
- /package/{LexicalHorizontalRuleNode.mjs → dist/LexicalHorizontalRuleNode.mjs} +0 -0
- /package/{LexicalHorizontalRuleNode.node.mjs → dist/LexicalHorizontalRuleNode.node.mjs} +0 -0
- /package/{LexicalHorizontalRuleNode.prod.js → dist/LexicalHorizontalRuleNode.prod.js} +0 -0
- /package/{LexicalHorizontalRuleNode.prod.mjs → dist/LexicalHorizontalRuleNode.prod.mjs} +0 -0
- /package/{LexicalHorizontalRulePlugin.d.ts → dist/LexicalHorizontalRulePlugin.d.ts} +0 -0
- /package/{LexicalHorizontalRulePlugin.dev.js → dist/LexicalHorizontalRulePlugin.dev.js} +0 -0
- /package/{LexicalHorizontalRulePlugin.dev.mjs → dist/LexicalHorizontalRulePlugin.dev.mjs} +0 -0
- /package/{LexicalHorizontalRulePlugin.js → dist/LexicalHorizontalRulePlugin.js} +0 -0
- /package/{LexicalHorizontalRulePlugin.js.flow → dist/LexicalHorizontalRulePlugin.js.flow} +0 -0
- /package/{LexicalHorizontalRulePlugin.mjs → dist/LexicalHorizontalRulePlugin.mjs} +0 -0
- /package/{LexicalHorizontalRulePlugin.node.mjs → dist/LexicalHorizontalRulePlugin.node.mjs} +0 -0
- /package/{LexicalHorizontalRulePlugin.prod.js → dist/LexicalHorizontalRulePlugin.prod.js} +0 -0
- /package/{LexicalHorizontalRulePlugin.prod.mjs → dist/LexicalHorizontalRulePlugin.prod.mjs} +0 -0
- /package/{LexicalLinkPlugin.d.ts → dist/LexicalLinkPlugin.d.ts} +0 -0
- /package/{LexicalLinkPlugin.dev.js → dist/LexicalLinkPlugin.dev.js} +0 -0
- /package/{LexicalLinkPlugin.dev.mjs → dist/LexicalLinkPlugin.dev.mjs} +0 -0
- /package/{LexicalLinkPlugin.js → dist/LexicalLinkPlugin.js} +0 -0
- /package/{LexicalLinkPlugin.js.flow → dist/LexicalLinkPlugin.js.flow} +0 -0
- /package/{LexicalLinkPlugin.mjs → dist/LexicalLinkPlugin.mjs} +0 -0
- /package/{LexicalLinkPlugin.node.mjs → dist/LexicalLinkPlugin.node.mjs} +0 -0
- /package/{LexicalLinkPlugin.prod.js → dist/LexicalLinkPlugin.prod.js} +0 -0
- /package/{LexicalLinkPlugin.prod.mjs → dist/LexicalLinkPlugin.prod.mjs} +0 -0
- /package/{LexicalListPlugin.d.ts → dist/LexicalListPlugin.d.ts} +0 -0
- /package/{LexicalListPlugin.dev.js → dist/LexicalListPlugin.dev.js} +0 -0
- /package/{LexicalListPlugin.dev.mjs → dist/LexicalListPlugin.dev.mjs} +0 -0
- /package/{LexicalListPlugin.js → dist/LexicalListPlugin.js} +0 -0
- /package/{LexicalListPlugin.js.flow → dist/LexicalListPlugin.js.flow} +0 -0
- /package/{LexicalListPlugin.mjs → dist/LexicalListPlugin.mjs} +0 -0
- /package/{LexicalListPlugin.node.mjs → dist/LexicalListPlugin.node.mjs} +0 -0
- /package/{LexicalListPlugin.prod.js → dist/LexicalListPlugin.prod.js} +0 -0
- /package/{LexicalListPlugin.prod.mjs → dist/LexicalListPlugin.prod.mjs} +0 -0
- /package/{LexicalMarkdownShortcutPlugin.d.ts → dist/LexicalMarkdownShortcutPlugin.d.ts} +0 -0
- /package/{LexicalMarkdownShortcutPlugin.dev.js → dist/LexicalMarkdownShortcutPlugin.dev.js} +0 -0
- /package/{LexicalMarkdownShortcutPlugin.dev.mjs → dist/LexicalMarkdownShortcutPlugin.dev.mjs} +0 -0
- /package/{LexicalMarkdownShortcutPlugin.js → dist/LexicalMarkdownShortcutPlugin.js} +0 -0
- /package/{LexicalMarkdownShortcutPlugin.js.flow → dist/LexicalMarkdownShortcutPlugin.js.flow} +0 -0
- /package/{LexicalMarkdownShortcutPlugin.mjs → dist/LexicalMarkdownShortcutPlugin.mjs} +0 -0
- /package/{LexicalMarkdownShortcutPlugin.node.mjs → dist/LexicalMarkdownShortcutPlugin.node.mjs} +0 -0
- /package/{LexicalMarkdownShortcutPlugin.prod.js → dist/LexicalMarkdownShortcutPlugin.prod.js} +0 -0
- /package/{LexicalMarkdownShortcutPlugin.prod.mjs → dist/LexicalMarkdownShortcutPlugin.prod.mjs} +0 -0
- /package/{LexicalNestedComposer.d.ts → dist/LexicalNestedComposer.d.ts} +0 -0
- /package/{LexicalNestedComposer.js → dist/LexicalNestedComposer.js} +0 -0
- /package/{LexicalNestedComposer.js.flow → dist/LexicalNestedComposer.js.flow} +0 -0
- /package/{LexicalNestedComposer.mjs → dist/LexicalNestedComposer.mjs} +0 -0
- /package/{LexicalNestedComposer.node.mjs → dist/LexicalNestedComposer.node.mjs} +0 -0
- /package/{LexicalNestedComposer.prod.js → dist/LexicalNestedComposer.prod.js} +0 -0
- /package/{LexicalNestedComposer.prod.mjs → dist/LexicalNestedComposer.prod.mjs} +0 -0
- /package/{LexicalNodeContextMenuPlugin.d.ts → dist/LexicalNodeContextMenuPlugin.d.ts} +0 -0
- /package/{LexicalNodeContextMenuPlugin.dev.js → dist/LexicalNodeContextMenuPlugin.dev.js} +0 -0
- /package/{LexicalNodeContextMenuPlugin.dev.mjs → dist/LexicalNodeContextMenuPlugin.dev.mjs} +0 -0
- /package/{LexicalNodeContextMenuPlugin.js → dist/LexicalNodeContextMenuPlugin.js} +0 -0
- /package/{LexicalNodeContextMenuPlugin.js.flow → dist/LexicalNodeContextMenuPlugin.js.flow} +0 -0
- /package/{LexicalNodeContextMenuPlugin.mjs → dist/LexicalNodeContextMenuPlugin.mjs} +0 -0
- /package/{LexicalNodeContextMenuPlugin.node.mjs → dist/LexicalNodeContextMenuPlugin.node.mjs} +0 -0
- /package/{LexicalNodeContextMenuPlugin.prod.js → dist/LexicalNodeContextMenuPlugin.prod.js} +0 -0
- /package/{LexicalNodeContextMenuPlugin.prod.mjs → dist/LexicalNodeContextMenuPlugin.prod.mjs} +0 -0
- /package/{LexicalNodeEventPlugin.d.ts → dist/LexicalNodeEventPlugin.d.ts} +0 -0
- /package/{LexicalNodeEventPlugin.dev.js → dist/LexicalNodeEventPlugin.dev.js} +0 -0
- /package/{LexicalNodeEventPlugin.dev.mjs → dist/LexicalNodeEventPlugin.dev.mjs} +0 -0
- /package/{LexicalNodeEventPlugin.js → dist/LexicalNodeEventPlugin.js} +0 -0
- /package/{LexicalNodeEventPlugin.js.flow → dist/LexicalNodeEventPlugin.js.flow} +0 -0
- /package/{LexicalNodeEventPlugin.mjs → dist/LexicalNodeEventPlugin.mjs} +0 -0
- /package/{LexicalNodeEventPlugin.node.mjs → dist/LexicalNodeEventPlugin.node.mjs} +0 -0
- /package/{LexicalNodeEventPlugin.prod.js → dist/LexicalNodeEventPlugin.prod.js} +0 -0
- /package/{LexicalNodeEventPlugin.prod.mjs → dist/LexicalNodeEventPlugin.prod.mjs} +0 -0
- /package/{LexicalNodeMenuPlugin.d.ts → dist/LexicalNodeMenuPlugin.d.ts} +0 -0
- /package/{LexicalNodeMenuPlugin.js → dist/LexicalNodeMenuPlugin.js} +0 -0
- /package/{LexicalNodeMenuPlugin.js.flow → dist/LexicalNodeMenuPlugin.js.flow} +0 -0
- /package/{LexicalNodeMenuPlugin.mjs → dist/LexicalNodeMenuPlugin.mjs} +0 -0
- /package/{LexicalNodeMenuPlugin.node.mjs → dist/LexicalNodeMenuPlugin.node.mjs} +0 -0
- /package/{LexicalOnChangePlugin.d.ts → dist/LexicalOnChangePlugin.d.ts} +0 -0
- /package/{LexicalOnChangePlugin.js → dist/LexicalOnChangePlugin.js} +0 -0
- /package/{LexicalOnChangePlugin.js.flow → dist/LexicalOnChangePlugin.js.flow} +0 -0
- /package/{LexicalOnChangePlugin.mjs → dist/LexicalOnChangePlugin.mjs} +0 -0
- /package/{LexicalOnChangePlugin.node.mjs → dist/LexicalOnChangePlugin.node.mjs} +0 -0
- /package/{LexicalPlainTextPlugin.d.ts → dist/LexicalPlainTextPlugin.d.ts} +0 -0
- /package/{LexicalPlainTextPlugin.js → dist/LexicalPlainTextPlugin.js} +0 -0
- /package/{LexicalPlainTextPlugin.js.flow → dist/LexicalPlainTextPlugin.js.flow} +0 -0
- /package/{LexicalPlainTextPlugin.mjs → dist/LexicalPlainTextPlugin.mjs} +0 -0
- /package/{LexicalPlainTextPlugin.node.mjs → dist/LexicalPlainTextPlugin.node.mjs} +0 -0
- /package/{LexicalReactExtension.dev.js → dist/LexicalReactExtension.dev.js} +0 -0
- /package/{LexicalReactExtension.dev.mjs → dist/LexicalReactExtension.dev.mjs} +0 -0
- /package/{LexicalReactExtension.js → dist/LexicalReactExtension.js} +0 -0
- /package/{LexicalReactExtension.js.flow → dist/LexicalReactExtension.js.flow} +0 -0
- /package/{LexicalReactExtension.mjs → dist/LexicalReactExtension.mjs} +0 -0
- /package/{LexicalReactExtension.node.mjs → dist/LexicalReactExtension.node.mjs} +0 -0
- /package/{LexicalReactExtension.prod.js → dist/LexicalReactExtension.prod.js} +0 -0
- /package/{LexicalReactExtension.prod.mjs → dist/LexicalReactExtension.prod.mjs} +0 -0
- /package/{LexicalReactPluginHostExtension.dev.js → dist/LexicalReactPluginHostExtension.dev.js} +0 -0
- /package/{LexicalReactPluginHostExtension.dev.mjs → dist/LexicalReactPluginHostExtension.dev.mjs} +0 -0
- /package/{LexicalReactPluginHostExtension.js → dist/LexicalReactPluginHostExtension.js} +0 -0
- /package/{LexicalReactPluginHostExtension.js.flow → dist/LexicalReactPluginHostExtension.js.flow} +0 -0
- /package/{LexicalReactPluginHostExtension.mjs → dist/LexicalReactPluginHostExtension.mjs} +0 -0
- /package/{LexicalReactPluginHostExtension.node.mjs → dist/LexicalReactPluginHostExtension.node.mjs} +0 -0
- /package/{LexicalReactPluginHostExtension.prod.js → dist/LexicalReactPluginHostExtension.prod.js} +0 -0
- /package/{LexicalReactPluginHostExtension.prod.mjs → dist/LexicalReactPluginHostExtension.prod.mjs} +0 -0
- /package/{LexicalReactProviderExtension.dev.js → dist/LexicalReactProviderExtension.dev.js} +0 -0
- /package/{LexicalReactProviderExtension.dev.mjs → dist/LexicalReactProviderExtension.dev.mjs} +0 -0
- /package/{LexicalReactProviderExtension.js → dist/LexicalReactProviderExtension.js} +0 -0
- /package/{LexicalReactProviderExtension.js.flow → dist/LexicalReactProviderExtension.js.flow} +0 -0
- /package/{LexicalReactProviderExtension.mjs → dist/LexicalReactProviderExtension.mjs} +0 -0
- /package/{LexicalReactProviderExtension.node.mjs → dist/LexicalReactProviderExtension.node.mjs} +0 -0
- /package/{LexicalReactProviderExtension.prod.js → dist/LexicalReactProviderExtension.prod.js} +0 -0
- /package/{LexicalReactProviderExtension.prod.mjs → dist/LexicalReactProviderExtension.prod.mjs} +0 -0
- /package/{LexicalRichTextPlugin.d.ts → dist/LexicalRichTextPlugin.d.ts} +0 -0
- /package/{LexicalRichTextPlugin.js → dist/LexicalRichTextPlugin.js} +0 -0
- /package/{LexicalRichTextPlugin.js.flow → dist/LexicalRichTextPlugin.js.flow} +0 -0
- /package/{LexicalRichTextPlugin.mjs → dist/LexicalRichTextPlugin.mjs} +0 -0
- /package/{LexicalRichTextPlugin.node.mjs → dist/LexicalRichTextPlugin.node.mjs} +0 -0
- /package/{LexicalSelectionAlwaysOnDisplay.d.ts → dist/LexicalSelectionAlwaysOnDisplay.d.ts} +0 -0
- /package/{LexicalSelectionAlwaysOnDisplay.dev.js → dist/LexicalSelectionAlwaysOnDisplay.dev.js} +0 -0
- /package/{LexicalSelectionAlwaysOnDisplay.dev.mjs → dist/LexicalSelectionAlwaysOnDisplay.dev.mjs} +0 -0
- /package/{LexicalSelectionAlwaysOnDisplay.js → dist/LexicalSelectionAlwaysOnDisplay.js} +0 -0
- /package/{LexicalSelectionAlwaysOnDisplay.js.flow → dist/LexicalSelectionAlwaysOnDisplay.js.flow} +0 -0
- /package/{LexicalSelectionAlwaysOnDisplay.mjs → dist/LexicalSelectionAlwaysOnDisplay.mjs} +0 -0
- /package/{LexicalSelectionAlwaysOnDisplay.node.mjs → dist/LexicalSelectionAlwaysOnDisplay.node.mjs} +0 -0
- /package/{LexicalSelectionAlwaysOnDisplay.prod.js → dist/LexicalSelectionAlwaysOnDisplay.prod.js} +0 -0
- /package/{LexicalSelectionAlwaysOnDisplay.prod.mjs → dist/LexicalSelectionAlwaysOnDisplay.prod.mjs} +0 -0
- /package/{LexicalTabIndentationPlugin.d.ts → dist/LexicalTabIndentationPlugin.d.ts} +0 -0
- /package/{LexicalTabIndentationPlugin.dev.js → dist/LexicalTabIndentationPlugin.dev.js} +0 -0
- /package/{LexicalTabIndentationPlugin.dev.mjs → dist/LexicalTabIndentationPlugin.dev.mjs} +0 -0
- /package/{LexicalTabIndentationPlugin.js → dist/LexicalTabIndentationPlugin.js} +0 -0
- /package/{LexicalTabIndentationPlugin.js.flow → dist/LexicalTabIndentationPlugin.js.flow} +0 -0
- /package/{LexicalTabIndentationPlugin.mjs → dist/LexicalTabIndentationPlugin.mjs} +0 -0
- /package/{LexicalTabIndentationPlugin.node.mjs → dist/LexicalTabIndentationPlugin.node.mjs} +0 -0
- /package/{LexicalTabIndentationPlugin.prod.js → dist/LexicalTabIndentationPlugin.prod.js} +0 -0
- /package/{LexicalTabIndentationPlugin.prod.mjs → dist/LexicalTabIndentationPlugin.prod.mjs} +0 -0
- /package/{LexicalTableOfContentsPlugin.d.ts → dist/LexicalTableOfContentsPlugin.d.ts} +0 -0
- /package/{LexicalTableOfContentsPlugin.dev.js → dist/LexicalTableOfContentsPlugin.dev.js} +0 -0
- /package/{LexicalTableOfContentsPlugin.dev.mjs → dist/LexicalTableOfContentsPlugin.dev.mjs} +0 -0
- /package/{LexicalTableOfContentsPlugin.js → dist/LexicalTableOfContentsPlugin.js} +0 -0
- /package/{LexicalTableOfContentsPlugin.js.flow → dist/LexicalTableOfContentsPlugin.js.flow} +0 -0
- /package/{LexicalTableOfContentsPlugin.mjs → dist/LexicalTableOfContentsPlugin.mjs} +0 -0
- /package/{LexicalTableOfContentsPlugin.node.mjs → dist/LexicalTableOfContentsPlugin.node.mjs} +0 -0
- /package/{LexicalTableOfContentsPlugin.prod.js → dist/LexicalTableOfContentsPlugin.prod.js} +0 -0
- /package/{LexicalTableOfContentsPlugin.prod.mjs → dist/LexicalTableOfContentsPlugin.prod.mjs} +0 -0
- /package/{LexicalTablePlugin.d.ts → dist/LexicalTablePlugin.d.ts} +0 -0
- /package/{LexicalTablePlugin.js → dist/LexicalTablePlugin.js} +0 -0
- /package/{LexicalTablePlugin.js.flow → dist/LexicalTablePlugin.js.flow} +0 -0
- /package/{LexicalTablePlugin.mjs → dist/LexicalTablePlugin.mjs} +0 -0
- /package/{LexicalTablePlugin.node.mjs → dist/LexicalTablePlugin.node.mjs} +0 -0
- /package/{LexicalTreeView.d.ts → dist/LexicalTreeView.d.ts} +0 -0
- /package/{LexicalTreeView.dev.js → dist/LexicalTreeView.dev.js} +0 -0
- /package/{LexicalTreeView.dev.mjs → dist/LexicalTreeView.dev.mjs} +0 -0
- /package/{LexicalTreeView.js → dist/LexicalTreeView.js} +0 -0
- /package/{LexicalTreeView.js.flow → dist/LexicalTreeView.js.flow} +0 -0
- /package/{LexicalTreeView.mjs → dist/LexicalTreeView.mjs} +0 -0
- /package/{LexicalTreeView.node.mjs → dist/LexicalTreeView.node.mjs} +0 -0
- /package/{LexicalTreeView.prod.js → dist/LexicalTreeView.prod.js} +0 -0
- /package/{LexicalTreeView.prod.mjs → dist/LexicalTreeView.prod.mjs} +0 -0
- /package/{LexicalTreeViewExtension.dev.js → dist/LexicalTreeViewExtension.dev.js} +0 -0
- /package/{LexicalTreeViewExtension.dev.mjs → dist/LexicalTreeViewExtension.dev.mjs} +0 -0
- /package/{LexicalTreeViewExtension.js → dist/LexicalTreeViewExtension.js} +0 -0
- /package/{LexicalTreeViewExtension.js.flow → dist/LexicalTreeViewExtension.js.flow} +0 -0
- /package/{LexicalTreeViewExtension.mjs → dist/LexicalTreeViewExtension.mjs} +0 -0
- /package/{LexicalTreeViewExtension.node.mjs → dist/LexicalTreeViewExtension.node.mjs} +0 -0
- /package/{LexicalTreeViewExtension.prod.js → dist/LexicalTreeViewExtension.prod.js} +0 -0
- /package/{LexicalTreeViewExtension.prod.mjs → dist/LexicalTreeViewExtension.prod.mjs} +0 -0
- /package/{LexicalTypeaheadMenuPlugin.d.ts → dist/LexicalTypeaheadMenuPlugin.d.ts} +0 -0
- /package/{LexicalTypeaheadMenuPlugin.js → dist/LexicalTypeaheadMenuPlugin.js} +0 -0
- /package/{LexicalTypeaheadMenuPlugin.js.flow → dist/LexicalTypeaheadMenuPlugin.js.flow} +0 -0
- /package/{LexicalTypeaheadMenuPlugin.mjs → dist/LexicalTypeaheadMenuPlugin.mjs} +0 -0
- /package/{LexicalTypeaheadMenuPlugin.node.mjs → dist/LexicalTypeaheadMenuPlugin.node.mjs} +0 -0
- /package/{ReactExtension.d.ts → dist/ReactExtension.d.ts} +0 -0
- /package/{ReactPluginHostExtension.d.ts → dist/ReactPluginHostExtension.d.ts} +0 -0
- /package/{ReactProviderExtension.d.ts → dist/ReactProviderExtension.d.ts} +0 -0
- /package/{TreeViewExtension.d.ts → dist/TreeViewExtension.d.ts} +0 -0
- /package/{shared → dist/shared}/LegacyDecorators.d.ts +0 -0
- /package/{shared → dist/shared}/LexicalContentEditableElement.d.ts +0 -0
- /package/{shared → dist/shared}/LexicalMenu.d.ts +0 -0
- /package/{shared → dist/shared}/buildEditorComponent.d.ts +0 -0
- /package/{shared → dist/shared}/mergeRefs.d.ts +0 -0
- /package/{shared → dist/shared}/point.d.ts +0 -0
- /package/{shared → dist/shared}/rect.d.ts +0 -0
- /package/{shared → dist/shared}/types.d.ts +0 -0
- /package/{shared → dist/shared}/useCanShowPlaceholder.d.ts +0 -0
- /package/{shared → dist/shared}/useCharacterLimit.d.ts +0 -0
- /package/{shared → dist/shared}/useDecorators.d.ts +0 -0
- /package/{shared → dist/shared}/useHistory.d.ts +0 -0
- /package/{shared → dist/shared}/useList.d.ts +0 -0
- /package/{shared → dist/shared}/usePlainTextSetup.d.ts +0 -0
- /package/{shared → dist/shared}/useReactDecorators.d.ts +0 -0
- /package/{shared → dist/shared}/useRichTextSetup.d.ts +0 -0
- /package/{shared → dist/shared}/useYjsCollaboration.d.ts +0 -0
- /package/{useExtensionComponent.d.ts → dist/useExtensionComponent.d.ts} +0 -0
- /package/{useExtensionSignalValue.d.ts → dist/useExtensionSignalValue.d.ts} +0 -0
- /package/{useLexicalEditable.d.ts → dist/useLexicalEditable.d.ts} +0 -0
- /package/{useLexicalEditable.js → dist/useLexicalEditable.js} +0 -0
- /package/{useLexicalEditable.js.flow → dist/useLexicalEditable.js.flow} +0 -0
- /package/{useLexicalEditable.mjs → dist/useLexicalEditable.mjs} +0 -0
- /package/{useLexicalEditable.node.mjs → dist/useLexicalEditable.node.mjs} +0 -0
- /package/{useLexicalExtensionComponent.dev.js → dist/useLexicalExtensionComponent.dev.js} +0 -0
- /package/{useLexicalExtensionComponent.dev.mjs → dist/useLexicalExtensionComponent.dev.mjs} +0 -0
- /package/{useLexicalExtensionComponent.js → dist/useLexicalExtensionComponent.js} +0 -0
- /package/{useLexicalExtensionComponent.js.flow → dist/useLexicalExtensionComponent.js.flow} +0 -0
- /package/{useLexicalExtensionComponent.mjs → dist/useLexicalExtensionComponent.mjs} +0 -0
- /package/{useLexicalExtensionComponent.node.mjs → dist/useLexicalExtensionComponent.node.mjs} +0 -0
- /package/{useLexicalExtensionComponent.prod.js → dist/useLexicalExtensionComponent.prod.js} +0 -0
- /package/{useLexicalExtensionComponent.prod.mjs → dist/useLexicalExtensionComponent.prod.mjs} +0 -0
- /package/{useLexicalExtensionSignalValue.dev.js → dist/useLexicalExtensionSignalValue.dev.js} +0 -0
- /package/{useLexicalExtensionSignalValue.dev.mjs → dist/useLexicalExtensionSignalValue.dev.mjs} +0 -0
- /package/{useLexicalExtensionSignalValue.js → dist/useLexicalExtensionSignalValue.js} +0 -0
- /package/{useLexicalExtensionSignalValue.js.flow → dist/useLexicalExtensionSignalValue.js.flow} +0 -0
- /package/{useLexicalExtensionSignalValue.mjs → dist/useLexicalExtensionSignalValue.mjs} +0 -0
- /package/{useLexicalExtensionSignalValue.node.mjs → dist/useLexicalExtensionSignalValue.node.mjs} +0 -0
- /package/{useLexicalExtensionSignalValue.prod.js → dist/useLexicalExtensionSignalValue.prod.js} +0 -0
- /package/{useLexicalExtensionSignalValue.prod.mjs → dist/useLexicalExtensionSignalValue.prod.mjs} +0 -0
- /package/{useLexicalIsTextContentEmpty.d.ts → dist/useLexicalIsTextContentEmpty.d.ts} +0 -0
- /package/{useLexicalIsTextContentEmpty.js → dist/useLexicalIsTextContentEmpty.js} +0 -0
- /package/{useLexicalIsTextContentEmpty.js.flow → dist/useLexicalIsTextContentEmpty.js.flow} +0 -0
- /package/{useLexicalIsTextContentEmpty.mjs → dist/useLexicalIsTextContentEmpty.mjs} +0 -0
- /package/{useLexicalIsTextContentEmpty.node.mjs → dist/useLexicalIsTextContentEmpty.node.mjs} +0 -0
- /package/{useLexicalNodeSelection.d.ts → dist/useLexicalNodeSelection.d.ts} +0 -0
- /package/{useLexicalNodeSelection.dev.js → dist/useLexicalNodeSelection.dev.js} +0 -0
- /package/{useLexicalNodeSelection.dev.mjs → dist/useLexicalNodeSelection.dev.mjs} +0 -0
- /package/{useLexicalNodeSelection.js → dist/useLexicalNodeSelection.js} +0 -0
- /package/{useLexicalNodeSelection.js.flow → dist/useLexicalNodeSelection.js.flow} +0 -0
- /package/{useLexicalNodeSelection.mjs → dist/useLexicalNodeSelection.mjs} +0 -0
- /package/{useLexicalNodeSelection.node.mjs → dist/useLexicalNodeSelection.node.mjs} +0 -0
- /package/{useLexicalNodeSelection.prod.js → dist/useLexicalNodeSelection.prod.js} +0 -0
- /package/{useLexicalNodeSelection.prod.mjs → dist/useLexicalNodeSelection.prod.mjs} +0 -0
- /package/{useLexicalSubscription.d.ts → dist/useLexicalSubscription.d.ts} +0 -0
- /package/{useLexicalSubscription.js → dist/useLexicalSubscription.js} +0 -0
- /package/{useLexicalSubscription.js.flow → dist/useLexicalSubscription.js.flow} +0 -0
- /package/{useLexicalSubscription.mjs → dist/useLexicalSubscription.mjs} +0 -0
- /package/{useLexicalSubscription.node.mjs → dist/useLexicalSubscription.node.mjs} +0 -0
- /package/{useLexicalTextEntity.d.ts → dist/useLexicalTextEntity.d.ts} +0 -0
- /package/{useLexicalTextEntity.dev.js → dist/useLexicalTextEntity.dev.js} +0 -0
- /package/{useLexicalTextEntity.dev.mjs → dist/useLexicalTextEntity.dev.mjs} +0 -0
- /package/{useLexicalTextEntity.js → dist/useLexicalTextEntity.js} +0 -0
- /package/{useLexicalTextEntity.js.flow → dist/useLexicalTextEntity.js.flow} +0 -0
- /package/{useLexicalTextEntity.mjs → dist/useLexicalTextEntity.mjs} +0 -0
- /package/{useLexicalTextEntity.node.mjs → dist/useLexicalTextEntity.node.mjs} +0 -0
- /package/{useLexicalTextEntity.prod.js → dist/useLexicalTextEntity.prod.js} +0 -0
- /package/{useLexicalTextEntity.prod.mjs → dist/useLexicalTextEntity.prod.mjs} +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
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 type {MenuRenderFn, MenuResolution} from './shared/LexicalMenu';
|
|
10
|
+
import type {JSX} from 'react';
|
|
11
|
+
|
|
12
|
+
import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext';
|
|
13
|
+
import {
|
|
14
|
+
$getNodeByKey,
|
|
15
|
+
COMMAND_PRIORITY_LOW,
|
|
16
|
+
CommandListenerPriority,
|
|
17
|
+
NodeKey,
|
|
18
|
+
TextNode,
|
|
19
|
+
} from 'lexical';
|
|
20
|
+
import * as React from 'react';
|
|
21
|
+
import {useCallback, useEffect, useState} from 'react';
|
|
22
|
+
|
|
23
|
+
import {LexicalMenu, MenuOption, useMenuAnchorRef} from './shared/LexicalMenu';
|
|
24
|
+
import {startTransition} from './shared/reactPatches';
|
|
25
|
+
|
|
26
|
+
export type NodeMenuPluginProps<TOption extends MenuOption> = {
|
|
27
|
+
onSelectOption: (
|
|
28
|
+
option: TOption,
|
|
29
|
+
textNodeContainingQuery: TextNode | null,
|
|
30
|
+
closeMenu: () => void,
|
|
31
|
+
matchingString: string,
|
|
32
|
+
) => void;
|
|
33
|
+
options: Array<TOption>;
|
|
34
|
+
nodeKey: NodeKey | null;
|
|
35
|
+
menuRenderFn?: MenuRenderFn<TOption>;
|
|
36
|
+
onClose?: () => void;
|
|
37
|
+
onOpen?: (resolution: MenuResolution) => void;
|
|
38
|
+
anchorClassName?: string;
|
|
39
|
+
commandPriority?: CommandListenerPriority;
|
|
40
|
+
parent?: HTMLElement;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export function LexicalNodeMenuPlugin<TOption extends MenuOption>({
|
|
44
|
+
options,
|
|
45
|
+
nodeKey,
|
|
46
|
+
onClose,
|
|
47
|
+
onOpen,
|
|
48
|
+
onSelectOption,
|
|
49
|
+
menuRenderFn,
|
|
50
|
+
anchorClassName,
|
|
51
|
+
commandPriority = COMMAND_PRIORITY_LOW,
|
|
52
|
+
parent,
|
|
53
|
+
}: NodeMenuPluginProps<TOption>): JSX.Element | null {
|
|
54
|
+
const [editor] = useLexicalComposerContext();
|
|
55
|
+
const [resolution, setResolution] = useState<MenuResolution | null>(null);
|
|
56
|
+
const anchorElementRef = useMenuAnchorRef(
|
|
57
|
+
resolution,
|
|
58
|
+
setResolution,
|
|
59
|
+
anchorClassName,
|
|
60
|
+
parent,
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
const closeNodeMenu = useCallback(() => {
|
|
64
|
+
setResolution(null);
|
|
65
|
+
if (onClose != null && resolution !== null) {
|
|
66
|
+
onClose();
|
|
67
|
+
}
|
|
68
|
+
}, [onClose, resolution]);
|
|
69
|
+
|
|
70
|
+
const openNodeMenu = useCallback(
|
|
71
|
+
(res: MenuResolution) => {
|
|
72
|
+
setResolution(res);
|
|
73
|
+
if (onOpen != null && resolution === null) {
|
|
74
|
+
onOpen(res);
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
[onOpen, resolution],
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
const positionOrCloseMenu = useCallback(() => {
|
|
81
|
+
if (nodeKey) {
|
|
82
|
+
editor.update(() => {
|
|
83
|
+
const node = $getNodeByKey(nodeKey);
|
|
84
|
+
const domElement = editor.getElementByKey(nodeKey);
|
|
85
|
+
if (node != null && domElement != null) {
|
|
86
|
+
if (resolution == null) {
|
|
87
|
+
startTransition(() =>
|
|
88
|
+
openNodeMenu({
|
|
89
|
+
getRect: () => domElement.getBoundingClientRect(),
|
|
90
|
+
}),
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
} else if (nodeKey == null && resolution != null) {
|
|
96
|
+
closeNodeMenu();
|
|
97
|
+
}
|
|
98
|
+
}, [closeNodeMenu, editor, nodeKey, openNodeMenu, resolution]);
|
|
99
|
+
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
102
|
+
positionOrCloseMenu();
|
|
103
|
+
}, [positionOrCloseMenu, nodeKey]);
|
|
104
|
+
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
if (nodeKey != null) {
|
|
107
|
+
return editor.registerUpdateListener(({dirtyElements}) => {
|
|
108
|
+
if (dirtyElements.get(nodeKey)) {
|
|
109
|
+
positionOrCloseMenu();
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}, [editor, positionOrCloseMenu, nodeKey]);
|
|
114
|
+
|
|
115
|
+
return anchorElementRef.current === null ||
|
|
116
|
+
resolution === null ||
|
|
117
|
+
editor === null ? null : (
|
|
118
|
+
<LexicalMenu
|
|
119
|
+
close={closeNodeMenu}
|
|
120
|
+
resolution={resolution}
|
|
121
|
+
editor={editor}
|
|
122
|
+
anchorElementRef={anchorElementRef}
|
|
123
|
+
options={options}
|
|
124
|
+
menuRenderFn={menuRenderFn}
|
|
125
|
+
onSelectOption={onSelectOption}
|
|
126
|
+
commandPriority={commandPriority}
|
|
127
|
+
/>
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export {MenuOption, MenuRenderFn, MenuResolution};
|
|
@@ -0,0 +1,52 @@
|
|
|
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 type {EditorState, LexicalEditor} from 'lexical';
|
|
10
|
+
|
|
11
|
+
import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext';
|
|
12
|
+
import {HISTORY_MERGE_TAG} from 'lexical';
|
|
13
|
+
|
|
14
|
+
import useLayoutEffect from './shared/useLayoutEffect';
|
|
15
|
+
|
|
16
|
+
export function OnChangePlugin({
|
|
17
|
+
ignoreHistoryMergeTagChange = true,
|
|
18
|
+
ignoreSelectionChange = false,
|
|
19
|
+
onChange,
|
|
20
|
+
}: {
|
|
21
|
+
ignoreHistoryMergeTagChange?: boolean;
|
|
22
|
+
ignoreSelectionChange?: boolean;
|
|
23
|
+
onChange: (
|
|
24
|
+
editorState: EditorState,
|
|
25
|
+
editor: LexicalEditor,
|
|
26
|
+
tags: Set<string>,
|
|
27
|
+
) => void;
|
|
28
|
+
}): null {
|
|
29
|
+
const [editor] = useLexicalComposerContext();
|
|
30
|
+
|
|
31
|
+
useLayoutEffect(() => {
|
|
32
|
+
if (onChange) {
|
|
33
|
+
return editor.registerUpdateListener(
|
|
34
|
+
({editorState, dirtyElements, dirtyLeaves, prevEditorState, tags}) => {
|
|
35
|
+
if (
|
|
36
|
+
(ignoreSelectionChange &&
|
|
37
|
+
dirtyElements.size === 0 &&
|
|
38
|
+
dirtyLeaves.size === 0) ||
|
|
39
|
+
(ignoreHistoryMergeTagChange && tags.has(HISTORY_MERGE_TAG)) ||
|
|
40
|
+
prevEditorState.isEmpty()
|
|
41
|
+
) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
onChange(editorState, editor, tags);
|
|
46
|
+
},
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
}, [editor, ignoreHistoryMergeTagChange, ignoreSelectionChange, onChange]);
|
|
50
|
+
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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 type {JSX} from 'react';
|
|
10
|
+
|
|
11
|
+
import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext';
|
|
12
|
+
import {useLexicalEditable} from '@lexical/react/useLexicalEditable';
|
|
13
|
+
|
|
14
|
+
import {
|
|
15
|
+
type ErrorBoundaryType,
|
|
16
|
+
LegacyDecorators,
|
|
17
|
+
} from './shared/LegacyDecorators';
|
|
18
|
+
import {useCanShowPlaceholder} from './shared/useCanShowPlaceholder';
|
|
19
|
+
import {usePlainTextSetup} from './shared/usePlainTextSetup';
|
|
20
|
+
|
|
21
|
+
export function PlainTextPlugin({
|
|
22
|
+
contentEditable,
|
|
23
|
+
// TODO Remove. This property is now part of ContentEditable
|
|
24
|
+
placeholder = null,
|
|
25
|
+
ErrorBoundary,
|
|
26
|
+
}: {
|
|
27
|
+
contentEditable: JSX.Element;
|
|
28
|
+
placeholder?:
|
|
29
|
+
| ((isEditable: boolean) => null | JSX.Element)
|
|
30
|
+
| null
|
|
31
|
+
| JSX.Element;
|
|
32
|
+
ErrorBoundary: ErrorBoundaryType;
|
|
33
|
+
}): JSX.Element {
|
|
34
|
+
const [editor] = useLexicalComposerContext();
|
|
35
|
+
usePlainTextSetup(editor);
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<>
|
|
39
|
+
{contentEditable}
|
|
40
|
+
<Placeholder content={placeholder} />
|
|
41
|
+
<LegacyDecorators editor={editor} ErrorBoundary={ErrorBoundary} />
|
|
42
|
+
</>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// TODO Remove
|
|
47
|
+
function Placeholder({
|
|
48
|
+
content,
|
|
49
|
+
}: {
|
|
50
|
+
content: ((isEditable: boolean) => null | JSX.Element) | null | JSX.Element;
|
|
51
|
+
}): null | JSX.Element {
|
|
52
|
+
const [editor] = useLexicalComposerContext();
|
|
53
|
+
const showPlaceholder = useCanShowPlaceholder(editor);
|
|
54
|
+
const editable = useLexicalEditable();
|
|
55
|
+
|
|
56
|
+
if (!showPlaceholder) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (typeof content === 'function') {
|
|
61
|
+
return content(editable);
|
|
62
|
+
} else {
|
|
63
|
+
return content;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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 type {JSX} from 'react';
|
|
10
|
+
|
|
11
|
+
import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext';
|
|
12
|
+
import {useLexicalEditable} from '@lexical/react/useLexicalEditable';
|
|
13
|
+
|
|
14
|
+
import {
|
|
15
|
+
type ErrorBoundaryType,
|
|
16
|
+
LegacyDecorators,
|
|
17
|
+
} from './shared/LegacyDecorators';
|
|
18
|
+
import {useCanShowPlaceholder} from './shared/useCanShowPlaceholder';
|
|
19
|
+
import {useRichTextSetup} from './shared/useRichTextSetup';
|
|
20
|
+
|
|
21
|
+
export function RichTextPlugin({
|
|
22
|
+
contentEditable,
|
|
23
|
+
// TODO Remove. This property is now part of ContentEditable
|
|
24
|
+
placeholder = null,
|
|
25
|
+
ErrorBoundary,
|
|
26
|
+
}: {
|
|
27
|
+
contentEditable: JSX.Element;
|
|
28
|
+
placeholder?:
|
|
29
|
+
| ((isEditable: boolean) => null | JSX.Element)
|
|
30
|
+
| null
|
|
31
|
+
| JSX.Element;
|
|
32
|
+
ErrorBoundary: ErrorBoundaryType;
|
|
33
|
+
}): JSX.Element {
|
|
34
|
+
const [editor] = useLexicalComposerContext();
|
|
35
|
+
useRichTextSetup(editor);
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<>
|
|
39
|
+
{contentEditable}
|
|
40
|
+
<Placeholder content={placeholder} />
|
|
41
|
+
<LegacyDecorators editor={editor} ErrorBoundary={ErrorBoundary} />
|
|
42
|
+
</>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// TODO remove
|
|
47
|
+
function Placeholder({
|
|
48
|
+
content,
|
|
49
|
+
}: {
|
|
50
|
+
content: ((isEditable: boolean) => null | JSX.Element) | null | JSX.Element;
|
|
51
|
+
}): null | JSX.Element {
|
|
52
|
+
const [editor] = useLexicalComposerContext();
|
|
53
|
+
const showPlaceholder = useCanShowPlaceholder(editor);
|
|
54
|
+
const editable = useLexicalEditable();
|
|
55
|
+
|
|
56
|
+
if (!showPlaceholder) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (typeof content === 'function') {
|
|
61
|
+
return content(editable);
|
|
62
|
+
} else {
|
|
63
|
+
return content;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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} from '@lexical/react/LexicalComposerContext';
|
|
10
|
+
import {selectionAlwaysOnDisplay} from '@lexical/utils';
|
|
11
|
+
import {useEffect} from 'react';
|
|
12
|
+
|
|
13
|
+
type Props = Readonly<{
|
|
14
|
+
onReposition?: (node: readonly HTMLElement[]) => void;
|
|
15
|
+
}>;
|
|
16
|
+
|
|
17
|
+
export function SelectionAlwaysOnDisplay({onReposition}: Props): null {
|
|
18
|
+
const [editor] = useLexicalComposerContext();
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
return selectionAlwaysOnDisplay(editor, onReposition);
|
|
21
|
+
}, [editor, onReposition]);
|
|
22
|
+
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 {
|
|
10
|
+
type CanIndentPredicate,
|
|
11
|
+
registerTabIndentation,
|
|
12
|
+
} from '@lexical/extension';
|
|
13
|
+
import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext';
|
|
14
|
+
import {useEffect} from 'react';
|
|
15
|
+
|
|
16
|
+
export {registerTabIndentation};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* This plugin adds the ability to indent content using the tab key. Generally, we don't
|
|
20
|
+
* recommend using this plugin as it could negatively affect accessibility for keyboard
|
|
21
|
+
* users, causing focus to become trapped within the editor.
|
|
22
|
+
*/
|
|
23
|
+
export function TabIndentationPlugin({
|
|
24
|
+
maxIndent,
|
|
25
|
+
$canIndent,
|
|
26
|
+
}: {
|
|
27
|
+
maxIndent?: number;
|
|
28
|
+
/**
|
|
29
|
+
* By default, indents are set on all elements for which the {@link ElementNode.canIndent} returns true.
|
|
30
|
+
* This option allows you to set indents for specific nodes without overriding the method for others.
|
|
31
|
+
*/
|
|
32
|
+
$canIndent?: CanIndentPredicate;
|
|
33
|
+
}): null {
|
|
34
|
+
const [editor] = useLexicalComposerContext();
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
return registerTabIndentation(editor, maxIndent, $canIndent);
|
|
37
|
+
}, [editor, maxIndent, $canIndent]);
|
|
38
|
+
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
@@ -0,0 +1,277 @@
|
|
|
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 type {JSX} from 'react';
|
|
10
|
+
|
|
11
|
+
import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext';
|
|
12
|
+
import {$isHeadingNode, HeadingNode, HeadingTagType} from '@lexical/rich-text';
|
|
13
|
+
import {$getNextRightPreorderNode} from '@lexical/utils';
|
|
14
|
+
import {
|
|
15
|
+
$getNodeByKey,
|
|
16
|
+
$getRoot,
|
|
17
|
+
$isElementNode,
|
|
18
|
+
ElementNode,
|
|
19
|
+
LexicalEditor,
|
|
20
|
+
NodeKey,
|
|
21
|
+
NodeMutation,
|
|
22
|
+
TextNode,
|
|
23
|
+
} from 'lexical';
|
|
24
|
+
import {useEffect, useState} from 'react';
|
|
25
|
+
|
|
26
|
+
export type TableOfContentsEntry = [
|
|
27
|
+
key: NodeKey,
|
|
28
|
+
text: string,
|
|
29
|
+
tag: HeadingTagType,
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
function toEntry(heading: HeadingNode): TableOfContentsEntry {
|
|
33
|
+
return [heading.getKey(), heading.getTextContent(), heading.getTag()];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function $insertHeadingIntoTableOfContents(
|
|
37
|
+
prevHeading: HeadingNode | null,
|
|
38
|
+
newHeading: HeadingNode | null,
|
|
39
|
+
currentTableOfContents: Array<TableOfContentsEntry>,
|
|
40
|
+
): Array<TableOfContentsEntry> {
|
|
41
|
+
if (newHeading === null) {
|
|
42
|
+
return currentTableOfContents;
|
|
43
|
+
}
|
|
44
|
+
const newEntry: TableOfContentsEntry = toEntry(newHeading);
|
|
45
|
+
let newTableOfContents: Array<TableOfContentsEntry> = [];
|
|
46
|
+
if (prevHeading === null) {
|
|
47
|
+
// check if key already exists
|
|
48
|
+
if (
|
|
49
|
+
currentTableOfContents.length > 0 &&
|
|
50
|
+
currentTableOfContents[0][0] === newHeading.__key
|
|
51
|
+
) {
|
|
52
|
+
return currentTableOfContents;
|
|
53
|
+
}
|
|
54
|
+
newTableOfContents = [newEntry, ...currentTableOfContents];
|
|
55
|
+
} else {
|
|
56
|
+
for (let i = 0; i < currentTableOfContents.length; i++) {
|
|
57
|
+
const key = currentTableOfContents[i][0];
|
|
58
|
+
newTableOfContents.push(currentTableOfContents[i]);
|
|
59
|
+
if (key === prevHeading.getKey() && key !== newHeading.getKey()) {
|
|
60
|
+
// check if key already exists
|
|
61
|
+
if (
|
|
62
|
+
i + 1 < currentTableOfContents.length &&
|
|
63
|
+
currentTableOfContents[i + 1][0] === newHeading.__key
|
|
64
|
+
) {
|
|
65
|
+
return currentTableOfContents;
|
|
66
|
+
}
|
|
67
|
+
newTableOfContents.push(newEntry);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return newTableOfContents;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function $deleteHeadingFromTableOfContents(
|
|
75
|
+
key: NodeKey,
|
|
76
|
+
currentTableOfContents: Array<TableOfContentsEntry>,
|
|
77
|
+
): Array<TableOfContentsEntry> {
|
|
78
|
+
const newTableOfContents = [];
|
|
79
|
+
for (const heading of currentTableOfContents) {
|
|
80
|
+
if (heading[0] !== key) {
|
|
81
|
+
newTableOfContents.push(heading);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return newTableOfContents;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function $updateHeadingInTableOfContents(
|
|
88
|
+
heading: HeadingNode,
|
|
89
|
+
currentTableOfContents: Array<TableOfContentsEntry>,
|
|
90
|
+
): Array<TableOfContentsEntry> {
|
|
91
|
+
const newTableOfContents: Array<TableOfContentsEntry> = [];
|
|
92
|
+
for (const oldHeading of currentTableOfContents) {
|
|
93
|
+
if (oldHeading[0] === heading.getKey()) {
|
|
94
|
+
newTableOfContents.push(toEntry(heading));
|
|
95
|
+
} else {
|
|
96
|
+
newTableOfContents.push(oldHeading);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return newTableOfContents;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Returns the updated table of contents, placing the given `heading` before the given `prevHeading`. If `prevHeading`
|
|
104
|
+
* is undefined, `heading` is placed at the start of table of contents
|
|
105
|
+
*/
|
|
106
|
+
function $updateHeadingPosition(
|
|
107
|
+
prevHeading: HeadingNode | null,
|
|
108
|
+
heading: HeadingNode,
|
|
109
|
+
currentTableOfContents: Array<TableOfContentsEntry>,
|
|
110
|
+
): Array<TableOfContentsEntry> {
|
|
111
|
+
const newTableOfContents: Array<TableOfContentsEntry> = [];
|
|
112
|
+
const newEntry: TableOfContentsEntry = toEntry(heading);
|
|
113
|
+
|
|
114
|
+
if (!prevHeading) {
|
|
115
|
+
newTableOfContents.push(newEntry);
|
|
116
|
+
}
|
|
117
|
+
for (const oldHeading of currentTableOfContents) {
|
|
118
|
+
if (oldHeading[0] === heading.getKey()) {
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
newTableOfContents.push(oldHeading);
|
|
122
|
+
if (prevHeading && oldHeading[0] === prevHeading.getKey()) {
|
|
123
|
+
newTableOfContents.push(newEntry);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return newTableOfContents;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function $getPreviousHeading(node: HeadingNode): HeadingNode | null {
|
|
131
|
+
let prevHeading = $getNextRightPreorderNode(node);
|
|
132
|
+
while (prevHeading !== null && !$isHeadingNode(prevHeading)) {
|
|
133
|
+
prevHeading = $getNextRightPreorderNode(prevHeading);
|
|
134
|
+
}
|
|
135
|
+
return prevHeading;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
type Props = {
|
|
139
|
+
children: (
|
|
140
|
+
values: Array<TableOfContentsEntry>,
|
|
141
|
+
editor: LexicalEditor,
|
|
142
|
+
) => JSX.Element;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export function TableOfContentsPlugin({children}: Props): JSX.Element {
|
|
146
|
+
const [tableOfContents, setTableOfContents] = useState<
|
|
147
|
+
Array<TableOfContentsEntry>
|
|
148
|
+
>([]);
|
|
149
|
+
const [editor] = useLexicalComposerContext();
|
|
150
|
+
useEffect(() => {
|
|
151
|
+
// Set table of contents initial state
|
|
152
|
+
let currentTableOfContents: Array<TableOfContentsEntry> = [];
|
|
153
|
+
editor.getEditorState().read(() => {
|
|
154
|
+
const updateCurrentTableOfContents = (node: ElementNode) => {
|
|
155
|
+
for (const child of node.getChildren()) {
|
|
156
|
+
if ($isHeadingNode(child)) {
|
|
157
|
+
currentTableOfContents.push([
|
|
158
|
+
child.getKey(),
|
|
159
|
+
child.getTextContent(),
|
|
160
|
+
child.getTag(),
|
|
161
|
+
]);
|
|
162
|
+
} else if ($isElementNode(child)) {
|
|
163
|
+
updateCurrentTableOfContents(child);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
updateCurrentTableOfContents($getRoot());
|
|
169
|
+
setTableOfContents(currentTableOfContents);
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
const removeRootUpdateListener = editor.registerUpdateListener(
|
|
173
|
+
({editorState, dirtyElements}) => {
|
|
174
|
+
editorState.read(() => {
|
|
175
|
+
const updateChildHeadings = (node: ElementNode) => {
|
|
176
|
+
for (const child of node.getChildren()) {
|
|
177
|
+
if ($isHeadingNode(child)) {
|
|
178
|
+
const prevHeading = $getPreviousHeading(child);
|
|
179
|
+
currentTableOfContents = $updateHeadingPosition(
|
|
180
|
+
prevHeading,
|
|
181
|
+
child,
|
|
182
|
+
currentTableOfContents,
|
|
183
|
+
);
|
|
184
|
+
setTableOfContents(currentTableOfContents);
|
|
185
|
+
} else if ($isElementNode(child)) {
|
|
186
|
+
updateChildHeadings(child);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
// If a node is changes, all child heading positions need to be updated
|
|
192
|
+
$getRoot()
|
|
193
|
+
.getChildren()
|
|
194
|
+
.forEach(node => {
|
|
195
|
+
if ($isElementNode(node) && dirtyElements.get(node.__key)) {
|
|
196
|
+
updateChildHeadings(node);
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
},
|
|
201
|
+
);
|
|
202
|
+
|
|
203
|
+
// Listen to updates to heading mutations and update state
|
|
204
|
+
const removeHeaderMutationListener = editor.registerMutationListener(
|
|
205
|
+
HeadingNode,
|
|
206
|
+
(mutatedNodes: Map<string, NodeMutation>) => {
|
|
207
|
+
editor.getEditorState().read(() => {
|
|
208
|
+
for (const [nodeKey, mutation] of mutatedNodes) {
|
|
209
|
+
if (mutation === 'created') {
|
|
210
|
+
const newHeading = $getNodeByKey<HeadingNode>(nodeKey);
|
|
211
|
+
if (newHeading !== null) {
|
|
212
|
+
const prevHeading = $getPreviousHeading(newHeading);
|
|
213
|
+
currentTableOfContents = $insertHeadingIntoTableOfContents(
|
|
214
|
+
prevHeading,
|
|
215
|
+
newHeading,
|
|
216
|
+
currentTableOfContents,
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
} else if (mutation === 'destroyed') {
|
|
220
|
+
currentTableOfContents = $deleteHeadingFromTableOfContents(
|
|
221
|
+
nodeKey,
|
|
222
|
+
currentTableOfContents,
|
|
223
|
+
);
|
|
224
|
+
} else if (mutation === 'updated') {
|
|
225
|
+
const newHeading = $getNodeByKey<HeadingNode>(nodeKey);
|
|
226
|
+
if (newHeading !== null) {
|
|
227
|
+
const prevHeading = $getPreviousHeading(newHeading);
|
|
228
|
+
currentTableOfContents = $updateHeadingPosition(
|
|
229
|
+
prevHeading,
|
|
230
|
+
newHeading,
|
|
231
|
+
currentTableOfContents,
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
setTableOfContents(currentTableOfContents);
|
|
237
|
+
});
|
|
238
|
+
},
|
|
239
|
+
// Initialization is handled separately
|
|
240
|
+
{skipInitialization: true},
|
|
241
|
+
);
|
|
242
|
+
|
|
243
|
+
// Listen to text node mutation updates
|
|
244
|
+
const removeTextNodeMutationListener = editor.registerMutationListener(
|
|
245
|
+
TextNode,
|
|
246
|
+
(mutatedNodes: Map<string, NodeMutation>) => {
|
|
247
|
+
editor.getEditorState().read(() => {
|
|
248
|
+
for (const [nodeKey, mutation] of mutatedNodes) {
|
|
249
|
+
if (mutation === 'updated') {
|
|
250
|
+
const currNode = $getNodeByKey(nodeKey);
|
|
251
|
+
if (currNode !== null) {
|
|
252
|
+
const parentNode = currNode.getParentOrThrow();
|
|
253
|
+
if ($isHeadingNode(parentNode)) {
|
|
254
|
+
currentTableOfContents = $updateHeadingInTableOfContents(
|
|
255
|
+
parentNode,
|
|
256
|
+
currentTableOfContents,
|
|
257
|
+
);
|
|
258
|
+
setTableOfContents(currentTableOfContents);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
},
|
|
265
|
+
// Initialization is handled separately
|
|
266
|
+
{skipInitialization: true},
|
|
267
|
+
);
|
|
268
|
+
|
|
269
|
+
return () => {
|
|
270
|
+
removeHeaderMutationListener();
|
|
271
|
+
removeTextNodeMutationListener();
|
|
272
|
+
removeRootUpdateListener();
|
|
273
|
+
};
|
|
274
|
+
}, [editor]);
|
|
275
|
+
|
|
276
|
+
return children(tableOfContents, editor);
|
|
277
|
+
}
|