@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,221 @@
|
|
|
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 {LexicalComposerContextType} from '@lexical/react/LexicalComposerContext';
|
|
10
|
+
import type {EditableListener} from 'lexical';
|
|
11
|
+
import type {JSX} from 'react';
|
|
12
|
+
|
|
13
|
+
import invariant from '@lexical/internal/invariant';
|
|
14
|
+
import warnOnlyOnce from '@lexical/internal/warnOnlyOnce';
|
|
15
|
+
import {CollaborationContext} from '@lexical/react/LexicalCollaborationContext';
|
|
16
|
+
import {
|
|
17
|
+
createLexicalComposerContext,
|
|
18
|
+
LexicalComposerContext,
|
|
19
|
+
} from '@lexical/react/LexicalComposerContext';
|
|
20
|
+
import {
|
|
21
|
+
createSharedNodeState,
|
|
22
|
+
EditorThemeClasses,
|
|
23
|
+
getRegisteredNode,
|
|
24
|
+
getTransformSetFromKlass,
|
|
25
|
+
Klass,
|
|
26
|
+
LexicalEditor,
|
|
27
|
+
LexicalNode,
|
|
28
|
+
LexicalNodeReplacement,
|
|
29
|
+
} from 'lexical';
|
|
30
|
+
import * as React from 'react';
|
|
31
|
+
import {ReactNode, useContext, useEffect, useMemo, useRef} from 'react';
|
|
32
|
+
|
|
33
|
+
export interface LexicalNestedComposerProps {
|
|
34
|
+
/**
|
|
35
|
+
* Any children (e.g. plug-ins) for this editor. Note that the nested editor
|
|
36
|
+
* does not inherit any plug-ins or registrations from those plug-ins (such
|
|
37
|
+
* as transforms and command listeners that may be necessary for correct
|
|
38
|
+
* operation of those nodes) from the parent editor. If you are using nodes
|
|
39
|
+
* that require plug-ins they must also be instantiated here.
|
|
40
|
+
*/
|
|
41
|
+
children?: ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* The nested editor, created outside of this component (typically in the
|
|
44
|
+
* implementation of a LexicalNode) with {@link createEditor}
|
|
45
|
+
*/
|
|
46
|
+
initialEditor: LexicalEditor;
|
|
47
|
+
/**
|
|
48
|
+
* Optionally overwrite the theme of the initialEditor
|
|
49
|
+
*/
|
|
50
|
+
initialTheme?: EditorThemeClasses;
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated This feature is not safe or correctly implemented and will be
|
|
53
|
+
* removed in v0.32.0. The only correct time to configure the nodes is when
|
|
54
|
+
* creating the initialEditor.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* // This is normally in the implementation of a LexicalNode that
|
|
59
|
+
* // owns the nested editor
|
|
60
|
+
* editor = createEditor({nodes: [], parentEditor: $getEditor()});
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
initialNodes?: ReadonlyArray<Klass<LexicalNode> | LexicalNodeReplacement>;
|
|
64
|
+
/**
|
|
65
|
+
* If this is not explicitly set to true, and the collab plugin is active,
|
|
66
|
+
* rendering the children of this component will not happen until collab is ready.
|
|
67
|
+
*/
|
|
68
|
+
skipCollabChecks?: undefined | true;
|
|
69
|
+
/**
|
|
70
|
+
* If this is not explicitly set to true, the editable state of the nested
|
|
71
|
+
* editor will automatically follow the parent editor's editable state.
|
|
72
|
+
* When set to true, the nested editor is responsible for managing its own
|
|
73
|
+
* editable state.
|
|
74
|
+
*
|
|
75
|
+
* Available since v0.29.0
|
|
76
|
+
*/
|
|
77
|
+
skipEditableListener?: undefined | true;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const initialNodesWarning = warnOnlyOnce(
|
|
81
|
+
`LexicalNestedComposer initialNodes is deprecated and will be removed in v0.32.0, it has never worked correctly.\nYou can configure your editor's nodes with createEditor({nodes: [], parentEditor: $getEditor()})`,
|
|
82
|
+
);
|
|
83
|
+
const explicitNamespaceWarning = warnOnlyOnce(
|
|
84
|
+
`LexicalNestedComposer initialEditor should explicitly initialize its namespace when the node configuration differs from the parentEditor. For backwards compatibility, the namespace will be initialized from parentEditor until v0.32.0, but this has always had incorrect copy/paste behavior when the configuration differed.\nYou can configure your editor's namespace with createEditor({namespace: 'nested-editor-namespace', nodes: [], parentEditor: $getEditor()}).`,
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
export function LexicalNestedComposer({
|
|
88
|
+
initialEditor,
|
|
89
|
+
children,
|
|
90
|
+
initialNodes,
|
|
91
|
+
initialTheme,
|
|
92
|
+
skipCollabChecks,
|
|
93
|
+
skipEditableListener,
|
|
94
|
+
}: LexicalNestedComposerProps): JSX.Element {
|
|
95
|
+
const wasCollabPreviouslyReadyRef = useRef(false);
|
|
96
|
+
const parentContext = useContext(LexicalComposerContext);
|
|
97
|
+
|
|
98
|
+
if (parentContext == null) {
|
|
99
|
+
invariant(false, 'Unexpected parent context null on a nested composer');
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const [parentEditor, {getTheme: getParentTheme}] = parentContext;
|
|
103
|
+
|
|
104
|
+
const composerContext: [LexicalEditor, LexicalComposerContextType] = useMemo(
|
|
105
|
+
() => {
|
|
106
|
+
const composerTheme: EditorThemeClasses | undefined =
|
|
107
|
+
initialTheme || getParentTheme() || undefined;
|
|
108
|
+
|
|
109
|
+
const context: LexicalComposerContextType = createLexicalComposerContext(
|
|
110
|
+
parentContext,
|
|
111
|
+
composerTheme,
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
if (composerTheme !== undefined) {
|
|
115
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
116
|
+
initialEditor._config.theme = composerTheme;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
120
|
+
initialEditor._parentEditor = initialEditor._parentEditor || parentEditor;
|
|
121
|
+
const createEditorArgs = initialEditor._createEditorArgs;
|
|
122
|
+
const explicitNamespace = createEditorArgs && createEditorArgs.namespace;
|
|
123
|
+
|
|
124
|
+
if (!initialNodes) {
|
|
125
|
+
if (!(createEditorArgs && createEditorArgs.nodes)) {
|
|
126
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
127
|
+
const parentNodes = (initialEditor._nodes = new Map(
|
|
128
|
+
parentEditor._nodes,
|
|
129
|
+
));
|
|
130
|
+
if (!explicitNamespace) {
|
|
131
|
+
// This is the only safe situation to inherit the parent's namespace
|
|
132
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
133
|
+
initialEditor._config.namespace = parentEditor._config.namespace;
|
|
134
|
+
}
|
|
135
|
+
for (const [type, entry] of parentNodes) {
|
|
136
|
+
initialEditor._nodes.set(type, {
|
|
137
|
+
exportDOM: entry.exportDOM,
|
|
138
|
+
klass: entry.klass,
|
|
139
|
+
replace: entry.replace,
|
|
140
|
+
replaceWithKlass: entry.replaceWithKlass,
|
|
141
|
+
sharedNodeState: createSharedNodeState(entry.klass),
|
|
142
|
+
transforms: getTransformSetFromKlass(entry.klass),
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
} else if (!explicitNamespace) {
|
|
146
|
+
explicitNamespaceWarning();
|
|
147
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
148
|
+
initialEditor._config.namespace = parentEditor._config.namespace;
|
|
149
|
+
}
|
|
150
|
+
} else {
|
|
151
|
+
initialNodesWarning();
|
|
152
|
+
if (!explicitNamespace) {
|
|
153
|
+
explicitNamespaceWarning();
|
|
154
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
155
|
+
initialEditor._config.namespace = parentEditor._config.namespace;
|
|
156
|
+
}
|
|
157
|
+
for (let klass of initialNodes) {
|
|
158
|
+
let replace = null;
|
|
159
|
+
let replaceWithKlass = null;
|
|
160
|
+
|
|
161
|
+
if (typeof klass !== 'function') {
|
|
162
|
+
const options = klass;
|
|
163
|
+
klass = options.replace;
|
|
164
|
+
replace = options.with;
|
|
165
|
+
replaceWithKlass = options.withKlass || null;
|
|
166
|
+
}
|
|
167
|
+
const registeredKlass = getRegisteredNode(
|
|
168
|
+
initialEditor,
|
|
169
|
+
klass.getType(),
|
|
170
|
+
);
|
|
171
|
+
|
|
172
|
+
initialEditor._nodes.set(klass.getType(), {
|
|
173
|
+
exportDOM: registeredKlass ? registeredKlass.exportDOM : undefined,
|
|
174
|
+
klass,
|
|
175
|
+
replace,
|
|
176
|
+
replaceWithKlass,
|
|
177
|
+
sharedNodeState: createSharedNodeState(klass),
|
|
178
|
+
transforms: getTransformSetFromKlass(klass),
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
return [initialEditor, context];
|
|
184
|
+
},
|
|
185
|
+
|
|
186
|
+
// We only do this for init
|
|
187
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
188
|
+
[],
|
|
189
|
+
);
|
|
190
|
+
|
|
191
|
+
// If collaboration is enabled, make sure we don't render the children until the collaboration subdocument is ready.
|
|
192
|
+
const collabContext = useContext(CollaborationContext);
|
|
193
|
+
const {isCollabActive, yjsDocMap} = collabContext ?? {};
|
|
194
|
+
|
|
195
|
+
const isCollabReady =
|
|
196
|
+
skipCollabChecks ||
|
|
197
|
+
wasCollabPreviouslyReadyRef.current ||
|
|
198
|
+
(yjsDocMap && yjsDocMap.has(initialEditor.getKey()));
|
|
199
|
+
|
|
200
|
+
useEffect(() => {
|
|
201
|
+
if (isCollabReady) {
|
|
202
|
+
wasCollabPreviouslyReadyRef.current = true;
|
|
203
|
+
}
|
|
204
|
+
}, [isCollabReady]);
|
|
205
|
+
|
|
206
|
+
// Update `isEditable` state of nested editor in response to the same change on parent editor.
|
|
207
|
+
useEffect(() => {
|
|
208
|
+
if (!skipEditableListener) {
|
|
209
|
+
const editableListener: EditableListener = editable =>
|
|
210
|
+
initialEditor.setEditable(editable);
|
|
211
|
+
editableListener(parentEditor.isEditable());
|
|
212
|
+
return parentEditor.registerEditableListener(editableListener);
|
|
213
|
+
}
|
|
214
|
+
}, [initialEditor, parentEditor, skipEditableListener]);
|
|
215
|
+
|
|
216
|
+
return (
|
|
217
|
+
<LexicalComposerContext.Provider value={composerContext}>
|
|
218
|
+
{!isCollabActive || isCollabReady ? children : null}
|
|
219
|
+
</LexicalComposerContext.Provider>
|
|
220
|
+
);
|
|
221
|
+
}
|
|
@@ -0,0 +1,316 @@
|
|
|
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
|
+
autoUpdate,
|
|
11
|
+
flip,
|
|
12
|
+
FloatingFocusManager,
|
|
13
|
+
FloatingOverlay,
|
|
14
|
+
FloatingPortal,
|
|
15
|
+
offset,
|
|
16
|
+
shift,
|
|
17
|
+
useDismiss,
|
|
18
|
+
useFloating,
|
|
19
|
+
useInteractions,
|
|
20
|
+
useListNavigation,
|
|
21
|
+
useRole,
|
|
22
|
+
useTypeahead,
|
|
23
|
+
} from '@floating-ui/react';
|
|
24
|
+
import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext';
|
|
25
|
+
import {$getNearestNodeFromDOMNode, $getRoot, LexicalNode} from 'lexical';
|
|
26
|
+
import {forwardRef, JSX, RefObject, useEffect, useRef, useState} from 'react';
|
|
27
|
+
|
|
28
|
+
class MenuOption {
|
|
29
|
+
key: string;
|
|
30
|
+
ref?: RefObject<HTMLElement | null>;
|
|
31
|
+
|
|
32
|
+
constructor(key: string) {
|
|
33
|
+
this.key = key;
|
|
34
|
+
this.ref = {current: null};
|
|
35
|
+
this.setRefElement = this.setRefElement.bind(this);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
setRefElement(element: HTMLElement | null) {
|
|
39
|
+
this.ref = {current: element};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
class NodeContextMenuOption extends MenuOption {
|
|
44
|
+
type: string;
|
|
45
|
+
title: string;
|
|
46
|
+
icon: JSX.Element | null;
|
|
47
|
+
disabled: boolean;
|
|
48
|
+
$onSelect: () => void;
|
|
49
|
+
$showOn?: (node: LexicalNode) => boolean;
|
|
50
|
+
|
|
51
|
+
constructor(
|
|
52
|
+
title: string,
|
|
53
|
+
options: {
|
|
54
|
+
disabled?: boolean;
|
|
55
|
+
icon?: JSX.Element;
|
|
56
|
+
$onSelect: () => void;
|
|
57
|
+
$showOn?: (node: LexicalNode) => boolean;
|
|
58
|
+
},
|
|
59
|
+
) {
|
|
60
|
+
super(title);
|
|
61
|
+
this.type = 'item';
|
|
62
|
+
this.title = title;
|
|
63
|
+
this.disabled = options.disabled ?? false;
|
|
64
|
+
this.icon = options.icon ?? null;
|
|
65
|
+
this.$onSelect = options.$onSelect;
|
|
66
|
+
if (options.$showOn) {
|
|
67
|
+
this.$showOn = options.$showOn;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
class NodeContextMenuSeparator extends MenuOption {
|
|
73
|
+
type: string;
|
|
74
|
+
$showOn?: (node: LexicalNode) => boolean;
|
|
75
|
+
|
|
76
|
+
constructor(options?: {$showOn?: (node: LexicalNode) => boolean}) {
|
|
77
|
+
super('_separator');
|
|
78
|
+
this.type = 'separator';
|
|
79
|
+
if (options && options.$showOn) {
|
|
80
|
+
this.$showOn = options.$showOn;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const ContextMenuSeparatorItem = forwardRef<
|
|
86
|
+
HTMLButtonElement,
|
|
87
|
+
React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
88
|
+
disabled?: boolean;
|
|
89
|
+
}
|
|
90
|
+
>(({className, disabled, ...props}, ref) => {
|
|
91
|
+
return <hr className={className} />;
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
const ContextMenuItem = forwardRef<
|
|
95
|
+
HTMLButtonElement,
|
|
96
|
+
React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
97
|
+
label?: string;
|
|
98
|
+
disabled?: boolean;
|
|
99
|
+
icon?: JSX.Element | null;
|
|
100
|
+
}
|
|
101
|
+
>(({className, label, disabled, icon, ...props}, ref) => {
|
|
102
|
+
return (
|
|
103
|
+
<button
|
|
104
|
+
{...props}
|
|
105
|
+
className={className}
|
|
106
|
+
ref={ref}
|
|
107
|
+
role="menuitem"
|
|
108
|
+
disabled={disabled}>
|
|
109
|
+
{icon}
|
|
110
|
+
{label}
|
|
111
|
+
</button>
|
|
112
|
+
);
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
type ContextMenuType = NodeContextMenuOption | NodeContextMenuSeparator;
|
|
116
|
+
|
|
117
|
+
interface MenuSeparatorType {
|
|
118
|
+
className: string;
|
|
119
|
+
key: string;
|
|
120
|
+
type: string;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
interface MenuItemType extends MenuSeparatorType {
|
|
124
|
+
disabled: boolean;
|
|
125
|
+
label: string;
|
|
126
|
+
onClick: () => void;
|
|
127
|
+
title: string;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
type MenuType = MenuItemType | MenuSeparatorType;
|
|
131
|
+
|
|
132
|
+
interface Props {
|
|
133
|
+
label?: string;
|
|
134
|
+
nested?: boolean;
|
|
135
|
+
itemClassName?: string;
|
|
136
|
+
separatorClassName?: string;
|
|
137
|
+
items: ContextMenuType[];
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const NodeContextMenuPlugin = forwardRef<
|
|
141
|
+
HTMLButtonElement,
|
|
142
|
+
Props & React.HTMLProps<HTMLButtonElement>
|
|
143
|
+
>(({items, className, itemClassName, separatorClassName}, forwardedRef) => {
|
|
144
|
+
const [editor] = useLexicalComposerContext();
|
|
145
|
+
const [activeIndex, setActiveIndex] = useState<number | null>(null);
|
|
146
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
147
|
+
|
|
148
|
+
const listItemsRef = useRef<Array<HTMLButtonElement | null>>([]);
|
|
149
|
+
const listContentRef = useRef<Array<string | null>>([]);
|
|
150
|
+
|
|
151
|
+
const {refs, floatingStyles, context} = useFloating({
|
|
152
|
+
middleware: [
|
|
153
|
+
offset({alignmentAxis: 4, mainAxis: 5}),
|
|
154
|
+
flip({
|
|
155
|
+
fallbackPlacements: ['left-start'],
|
|
156
|
+
}),
|
|
157
|
+
shift({padding: 10}),
|
|
158
|
+
],
|
|
159
|
+
onOpenChange: setIsOpen,
|
|
160
|
+
open: isOpen,
|
|
161
|
+
placement: 'right-start',
|
|
162
|
+
strategy: 'fixed',
|
|
163
|
+
whileElementsMounted: autoUpdate,
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
const role = useRole(context, {role: 'menu'});
|
|
167
|
+
const dismiss = useDismiss(context);
|
|
168
|
+
const listNavigation = useListNavigation(context, {
|
|
169
|
+
activeIndex,
|
|
170
|
+
listRef: listItemsRef,
|
|
171
|
+
onNavigate: setActiveIndex,
|
|
172
|
+
});
|
|
173
|
+
const typeahead = useTypeahead(context, {
|
|
174
|
+
activeIndex,
|
|
175
|
+
enabled: isOpen,
|
|
176
|
+
listRef: listContentRef,
|
|
177
|
+
onMatch: setActiveIndex,
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
const {getFloatingProps, getItemProps} = useInteractions([
|
|
181
|
+
role,
|
|
182
|
+
dismiss,
|
|
183
|
+
listNavigation,
|
|
184
|
+
typeahead,
|
|
185
|
+
]);
|
|
186
|
+
|
|
187
|
+
const [renderItems, setRenderItems] = useState<MenuType[]>([]);
|
|
188
|
+
|
|
189
|
+
useEffect(() => {
|
|
190
|
+
function onContextMenu(e: MouseEvent) {
|
|
191
|
+
e.preventDefault();
|
|
192
|
+
|
|
193
|
+
refs.setPositionReference({
|
|
194
|
+
getBoundingClientRect() {
|
|
195
|
+
return {
|
|
196
|
+
bottom: e.clientY,
|
|
197
|
+
height: 0,
|
|
198
|
+
left: e.clientX,
|
|
199
|
+
right: e.clientX,
|
|
200
|
+
top: e.clientY,
|
|
201
|
+
width: 0,
|
|
202
|
+
x: e.clientX,
|
|
203
|
+
y: e.clientY,
|
|
204
|
+
};
|
|
205
|
+
},
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
let visibleItems: ContextMenuType[] = [];
|
|
209
|
+
if (items) {
|
|
210
|
+
editor.read(() => {
|
|
211
|
+
const node =
|
|
212
|
+
$getNearestNodeFromDOMNode(e.target as Element) ?? $getRoot();
|
|
213
|
+
if (node) {
|
|
214
|
+
visibleItems = items!.filter(option =>
|
|
215
|
+
option.$showOn ? option.$showOn(node) : true,
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
const renderableItems = visibleItems.map((option, index) => {
|
|
222
|
+
if (option.type === 'separator') {
|
|
223
|
+
return {
|
|
224
|
+
className: separatorClassName,
|
|
225
|
+
key: option.key + '-' + index,
|
|
226
|
+
type: option.type,
|
|
227
|
+
};
|
|
228
|
+
} else {
|
|
229
|
+
return {
|
|
230
|
+
className: itemClassName,
|
|
231
|
+
disabled: (option as NodeContextMenuOption).disabled,
|
|
232
|
+
icon: (option as NodeContextMenuOption).icon,
|
|
233
|
+
key: option.key,
|
|
234
|
+
label: (option as NodeContextMenuOption).title,
|
|
235
|
+
onClick: () =>
|
|
236
|
+
editor.update(() =>
|
|
237
|
+
(option as NodeContextMenuOption).$onSelect(),
|
|
238
|
+
),
|
|
239
|
+
title: (option as NodeContextMenuOption).title,
|
|
240
|
+
type: option.type,
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
}) as MenuType[];
|
|
244
|
+
|
|
245
|
+
listContentRef.current = renderableItems.map(item => item.key);
|
|
246
|
+
|
|
247
|
+
setRenderItems(renderableItems);
|
|
248
|
+
|
|
249
|
+
setIsOpen(true);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
return editor.registerRootListener(rootElement => {
|
|
253
|
+
if (rootElement !== null) {
|
|
254
|
+
rootElement.addEventListener('contextmenu', onContextMenu);
|
|
255
|
+
return () =>
|
|
256
|
+
rootElement.removeEventListener('contextmenu', onContextMenu);
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
}, [items, itemClassName, separatorClassName, refs, editor]);
|
|
260
|
+
|
|
261
|
+
return (
|
|
262
|
+
<FloatingPortal>
|
|
263
|
+
{isOpen && (
|
|
264
|
+
<FloatingOverlay lockScroll={true}>
|
|
265
|
+
<FloatingFocusManager context={context} initialFocus={refs.floating}>
|
|
266
|
+
<div
|
|
267
|
+
className={className}
|
|
268
|
+
ref={refs.setFloating}
|
|
269
|
+
style={floatingStyles}
|
|
270
|
+
{...getFloatingProps()}>
|
|
271
|
+
{renderItems.map((item, index) => {
|
|
272
|
+
if (item.type === 'item') {
|
|
273
|
+
return (
|
|
274
|
+
<ContextMenuItem
|
|
275
|
+
{...getItemProps({
|
|
276
|
+
...item,
|
|
277
|
+
onClick() {
|
|
278
|
+
(item as MenuItemType).onClick();
|
|
279
|
+
setIsOpen(false);
|
|
280
|
+
},
|
|
281
|
+
onMouseUp() {
|
|
282
|
+
(item as MenuItemType).onClick();
|
|
283
|
+
setIsOpen(false);
|
|
284
|
+
},
|
|
285
|
+
ref(node: HTMLButtonElement) {
|
|
286
|
+
listItemsRef.current[index] = node;
|
|
287
|
+
},
|
|
288
|
+
tabIndex: activeIndex === index ? 0 : -1,
|
|
289
|
+
})}
|
|
290
|
+
key={item.key}
|
|
291
|
+
/>
|
|
292
|
+
);
|
|
293
|
+
} else if (item.type === 'separator') {
|
|
294
|
+
return (
|
|
295
|
+
<ContextMenuSeparatorItem
|
|
296
|
+
{...getItemProps({
|
|
297
|
+
...item,
|
|
298
|
+
ref(node: HTMLButtonElement) {
|
|
299
|
+
listItemsRef.current[index] = node;
|
|
300
|
+
},
|
|
301
|
+
tabIndex: activeIndex === index ? 0 : -1,
|
|
302
|
+
})}
|
|
303
|
+
key={item.key}
|
|
304
|
+
/>
|
|
305
|
+
);
|
|
306
|
+
}
|
|
307
|
+
})}
|
|
308
|
+
</div>
|
|
309
|
+
</FloatingFocusManager>
|
|
310
|
+
</FloatingOverlay>
|
|
311
|
+
)}
|
|
312
|
+
</FloatingPortal>
|
|
313
|
+
);
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
export {NodeContextMenuOption, NodeContextMenuPlugin, NodeContextMenuSeparator};
|
|
@@ -0,0 +1,71 @@
|
|
|
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 {Klass, LexicalEditor, LexicalNode, NodeKey} from 'lexical';
|
|
10
|
+
|
|
11
|
+
import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext';
|
|
12
|
+
import {$findMatchingParent} from '@lexical/utils';
|
|
13
|
+
import {$getNearestNodeFromDOMNode} from 'lexical';
|
|
14
|
+
import {useEffect, useRef} from 'react';
|
|
15
|
+
|
|
16
|
+
const capturedEvents = new Set<string>(['mouseenter', 'mouseleave']);
|
|
17
|
+
|
|
18
|
+
export function NodeEventPlugin({
|
|
19
|
+
nodeType,
|
|
20
|
+
eventType,
|
|
21
|
+
eventListener,
|
|
22
|
+
}: {
|
|
23
|
+
nodeType: Klass<LexicalNode>;
|
|
24
|
+
eventType: string;
|
|
25
|
+
eventListener: (
|
|
26
|
+
event: Event,
|
|
27
|
+
editor: LexicalEditor,
|
|
28
|
+
nodeKey: NodeKey,
|
|
29
|
+
) => void;
|
|
30
|
+
}): null {
|
|
31
|
+
const [editor] = useLexicalComposerContext();
|
|
32
|
+
const listenerRef = useRef(eventListener);
|
|
33
|
+
|
|
34
|
+
listenerRef.current = eventListener;
|
|
35
|
+
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
const isCaptured = capturedEvents.has(eventType);
|
|
38
|
+
|
|
39
|
+
const onEvent = (event: Event) => {
|
|
40
|
+
editor.update(() => {
|
|
41
|
+
const nearestNode = $getNearestNodeFromDOMNode(event.target as Element);
|
|
42
|
+
if (nearestNode !== null) {
|
|
43
|
+
const targetNode = isCaptured
|
|
44
|
+
? nearestNode instanceof nodeType
|
|
45
|
+
? nearestNode
|
|
46
|
+
: null
|
|
47
|
+
: $findMatchingParent(
|
|
48
|
+
nearestNode,
|
|
49
|
+
node => node instanceof nodeType,
|
|
50
|
+
);
|
|
51
|
+
if (targetNode !== null) {
|
|
52
|
+
listenerRef.current(event, editor, targetNode.getKey());
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
return editor.registerRootListener(rootElement => {
|
|
60
|
+
if (rootElement) {
|
|
61
|
+
rootElement.addEventListener(eventType, onEvent, isCaptured);
|
|
62
|
+
return () =>
|
|
63
|
+
rootElement.removeEventListener(eventType, onEvent, isCaptured);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
// We intentionally don't respect changes to eventType.
|
|
67
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
68
|
+
}, [editor, nodeType]);
|
|
69
|
+
|
|
70
|
+
return null;
|
|
71
|
+
}
|