@lexical/react 0.44.1-nightly.20260518.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,118 @@
|
|
|
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 {Signal, signal} from '@lexical/extension';
|
|
12
|
+
import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext';
|
|
13
|
+
import {
|
|
14
|
+
$isScrollableTablesActive,
|
|
15
|
+
registerTableCellUnmergeTransform,
|
|
16
|
+
registerTablePlugin,
|
|
17
|
+
registerTableSelectionObserver,
|
|
18
|
+
setScrollableTablesActive,
|
|
19
|
+
TableCellNode,
|
|
20
|
+
} from '@lexical/table';
|
|
21
|
+
import {$fullReconcile} from 'lexical';
|
|
22
|
+
import {useEffect, useState} from 'react';
|
|
23
|
+
|
|
24
|
+
export interface TablePluginProps {
|
|
25
|
+
/**
|
|
26
|
+
* When `false` (default `true`), merged cell support (colspan and rowspan) will be disabled and all
|
|
27
|
+
* tables will be forced into a regular grid with 1x1 table cells.
|
|
28
|
+
*/
|
|
29
|
+
hasCellMerge?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* When `false` (default `true`), the background color of TableCellNode will always be removed.
|
|
32
|
+
*/
|
|
33
|
+
hasCellBackgroundColor?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* When `true` (default `true`), the tab key can be used to navigate table cells.
|
|
36
|
+
*/
|
|
37
|
+
hasTabHandler?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* When `true` (default `false`), tables will be wrapped in a `<div>` to enable horizontal scrolling
|
|
40
|
+
*/
|
|
41
|
+
hasHorizontalScroll?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* When `true` (default `false`), nested tables will be allowed.
|
|
44
|
+
*
|
|
45
|
+
* @experimental Nested tables are not officially supported.
|
|
46
|
+
*/
|
|
47
|
+
hasNestedTables?: boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* A plugin to enable all of the features of Lexical's TableNode.
|
|
52
|
+
*
|
|
53
|
+
* @param props - See type for documentation
|
|
54
|
+
* @returns An element to render in your LexicalComposer
|
|
55
|
+
*/
|
|
56
|
+
export function TablePlugin({
|
|
57
|
+
hasCellMerge = true,
|
|
58
|
+
hasCellBackgroundColor = true,
|
|
59
|
+
hasTabHandler = true,
|
|
60
|
+
hasHorizontalScroll = false,
|
|
61
|
+
hasNestedTables = false,
|
|
62
|
+
}: TablePluginProps): JSX.Element | null {
|
|
63
|
+
const [editor] = useLexicalComposerContext();
|
|
64
|
+
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
const hadHorizontalScroll = $isScrollableTablesActive(editor);
|
|
67
|
+
if (hadHorizontalScroll !== hasHorizontalScroll) {
|
|
68
|
+
setScrollableTablesActive(editor, hasHorizontalScroll);
|
|
69
|
+
// Re-render existing tables through the new scroll-wrapper config without
|
|
70
|
+
// cloning every TableNode the way marking them dirty would. A full
|
|
71
|
+
// reconcile marks no nodes dirty, so it's deferred (no synchronous render
|
|
72
|
+
// from this effect) and produces no history entry.
|
|
73
|
+
editor.update($fullReconcile);
|
|
74
|
+
}
|
|
75
|
+
}, [editor, hasHorizontalScroll]);
|
|
76
|
+
|
|
77
|
+
const hasNestedTablesSignal = usePropSignal(hasNestedTables);
|
|
78
|
+
|
|
79
|
+
useEffect(
|
|
80
|
+
() => registerTablePlugin(editor, {hasNestedTables: hasNestedTablesSignal}),
|
|
81
|
+
[editor, hasNestedTablesSignal],
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
useEffect(
|
|
85
|
+
() => registerTableSelectionObserver(editor, hasTabHandler),
|
|
86
|
+
[editor, hasTabHandler],
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
// Unmerge cells when the feature isn't enabled
|
|
90
|
+
useEffect(() => {
|
|
91
|
+
if (!hasCellMerge) {
|
|
92
|
+
return registerTableCellUnmergeTransform(editor);
|
|
93
|
+
}
|
|
94
|
+
}, [editor, hasCellMerge]);
|
|
95
|
+
|
|
96
|
+
// Remove cell background color when feature is disabled
|
|
97
|
+
useEffect(() => {
|
|
98
|
+
if (hasCellBackgroundColor) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
return editor.registerNodeTransform(TableCellNode, node => {
|
|
102
|
+
if (node.getBackgroundColor() !== null) {
|
|
103
|
+
node.setBackgroundColor(null);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}, [editor, hasCellBackgroundColor, hasCellMerge]);
|
|
107
|
+
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function usePropSignal<T>(value: T): Signal<T> {
|
|
112
|
+
const [configSignal] = useState(() => signal(value));
|
|
113
|
+
if (configSignal.peek() !== value) {
|
|
114
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
115
|
+
configSignal.value = value;
|
|
116
|
+
}
|
|
117
|
+
return configSignal;
|
|
118
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
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
|
+
import type {JSX} from 'react';
|
|
11
|
+
|
|
12
|
+
import {
|
|
13
|
+
CustomPrintNodeFn,
|
|
14
|
+
generateContent,
|
|
15
|
+
TreeView as TreeViewCore,
|
|
16
|
+
useLexicalCommandsLog,
|
|
17
|
+
} from '@lexical/devtools-core';
|
|
18
|
+
import {mergeRegister} from '@lexical/utils';
|
|
19
|
+
import * as React from 'react';
|
|
20
|
+
import {useEffect, useState} from 'react';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* TreeView is a React component that provides a visual representation of
|
|
24
|
+
* the Lexical editor's state and enables debugging features like time travel
|
|
25
|
+
* and custom tree node rendering.
|
|
26
|
+
*
|
|
27
|
+
* @param {Object} props - The properties passed to the TreeView component.
|
|
28
|
+
* @param {LexicalEditor} props.editor - The Lexical editor instance to be visualized and debugged.
|
|
29
|
+
* @param {string} [props.treeTypeButtonClassName] - Custom class name for the tree type toggle button.
|
|
30
|
+
* @param {string} [props.timeTravelButtonClassName] - Custom class name for the time travel toggle button.
|
|
31
|
+
* @param {string} [props.timeTravelPanelButtonClassName] - Custom class name for buttons inside the time travel panel.
|
|
32
|
+
* @param {string} [props.timeTravelPanelClassName] - Custom class name for the overall time travel panel container.
|
|
33
|
+
* @param {string} [props.timeTravelPanelSliderClassName] - Custom class name for the time travel slider in the panel.
|
|
34
|
+
* @param {string} [props.viewClassName] - Custom class name for the tree view container.
|
|
35
|
+
* @param {CustomPrintNodeFn} [props.customPrintNode] - A function for customizing the display of nodes in the tree.
|
|
36
|
+
*
|
|
37
|
+
* @returns {JSX.Element} - A React element that visualizes the editor's state and supports debugging interactions.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
export function TreeView({
|
|
41
|
+
treeTypeButtonClassName,
|
|
42
|
+
timeTravelButtonClassName,
|
|
43
|
+
timeTravelPanelSliderClassName,
|
|
44
|
+
timeTravelPanelButtonClassName,
|
|
45
|
+
timeTravelPanelClassName,
|
|
46
|
+
viewClassName,
|
|
47
|
+
editor,
|
|
48
|
+
customPrintNode,
|
|
49
|
+
}: {
|
|
50
|
+
editor: LexicalEditor;
|
|
51
|
+
treeTypeButtonClassName?: string;
|
|
52
|
+
timeTravelButtonClassName?: string;
|
|
53
|
+
timeTravelPanelButtonClassName?: string;
|
|
54
|
+
timeTravelPanelClassName?: string;
|
|
55
|
+
timeTravelPanelSliderClassName?: string;
|
|
56
|
+
viewClassName?: string;
|
|
57
|
+
customPrintNode?: CustomPrintNodeFn;
|
|
58
|
+
}): JSX.Element {
|
|
59
|
+
const treeElementRef = React.createRef<HTMLPreElement>();
|
|
60
|
+
|
|
61
|
+
const [editorCurrentState, setEditorCurrentState] = useState<EditorState>(
|
|
62
|
+
editor.getEditorState(),
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
const commandsLog = useLexicalCommandsLog(editor);
|
|
66
|
+
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
// Registers listeners to update the tree view when the editor state changes
|
|
69
|
+
return mergeRegister(
|
|
70
|
+
editor.registerUpdateListener(({editorState}) => {
|
|
71
|
+
setEditorCurrentState(editorState);
|
|
72
|
+
}),
|
|
73
|
+
editor.registerEditableListener(() => {
|
|
74
|
+
setEditorCurrentState(editor.getEditorState());
|
|
75
|
+
}),
|
|
76
|
+
);
|
|
77
|
+
}, [editor]);
|
|
78
|
+
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
const element = treeElementRef.current;
|
|
81
|
+
|
|
82
|
+
if (element !== null) {
|
|
83
|
+
// Assigns the editor instance to the tree view DOM element for internal tracking
|
|
84
|
+
// @ts-ignore Internal field used by Lexical
|
|
85
|
+
element.__lexicalEditor = editor;
|
|
86
|
+
|
|
87
|
+
return () => {
|
|
88
|
+
// Cleans up the reference when the component is unmounted
|
|
89
|
+
// @ts-ignore Internal field used by Lexical
|
|
90
|
+
element.__lexicalEditor = null;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
}, [editor, treeElementRef]);
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Handles toggling the readonly state of the editor.
|
|
97
|
+
*
|
|
98
|
+
* @param {boolean} isReadonly - Whether the editor should be set to readonly.
|
|
99
|
+
*/
|
|
100
|
+
const handleEditorReadOnly = (isReadonly: boolean) => {
|
|
101
|
+
const rootElement = editor.getRootElement();
|
|
102
|
+
if (rootElement == null) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
rootElement.contentEditable = isReadonly ? 'false' : 'true';
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
return (
|
|
110
|
+
<TreeViewCore
|
|
111
|
+
treeTypeButtonClassName={treeTypeButtonClassName}
|
|
112
|
+
timeTravelButtonClassName={timeTravelButtonClassName}
|
|
113
|
+
timeTravelPanelSliderClassName={timeTravelPanelSliderClassName}
|
|
114
|
+
timeTravelPanelButtonClassName={timeTravelPanelButtonClassName}
|
|
115
|
+
viewClassName={viewClassName}
|
|
116
|
+
timeTravelPanelClassName={timeTravelPanelClassName}
|
|
117
|
+
setEditorReadOnly={handleEditorReadOnly}
|
|
118
|
+
editorState={editorCurrentState}
|
|
119
|
+
setEditorState={state => editor.setEditorState(state)}
|
|
120
|
+
generateContent={async function (exportDOM) {
|
|
121
|
+
// Generates the content for the tree view, allowing customization with exportDOM and customPrintNode
|
|
122
|
+
return generateContent(editor, commandsLog, exportDOM, customPrintNode);
|
|
123
|
+
}}
|
|
124
|
+
ref={treeElementRef}
|
|
125
|
+
commandsLog={commandsLog}
|
|
126
|
+
/>
|
|
127
|
+
);
|
|
128
|
+
}
|
|
@@ -0,0 +1,365 @@
|
|
|
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 {
|
|
10
|
+
MenuRenderFn,
|
|
11
|
+
MenuResolution,
|
|
12
|
+
MenuTextMatch,
|
|
13
|
+
TriggerFn,
|
|
14
|
+
} from './shared/LexicalMenu';
|
|
15
|
+
import type {JSX} from 'react';
|
|
16
|
+
|
|
17
|
+
import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext';
|
|
18
|
+
import {
|
|
19
|
+
$getSelection,
|
|
20
|
+
$isRangeSelection,
|
|
21
|
+
$isTextNode,
|
|
22
|
+
COMMAND_PRIORITY_LOW,
|
|
23
|
+
CommandListenerPriority,
|
|
24
|
+
createCommand,
|
|
25
|
+
getDOMSelection,
|
|
26
|
+
LexicalCommand,
|
|
27
|
+
LexicalEditor,
|
|
28
|
+
RangeSelection,
|
|
29
|
+
TextNode,
|
|
30
|
+
} from 'lexical';
|
|
31
|
+
import {useCallback, useEffect, useState} from 'react';
|
|
32
|
+
|
|
33
|
+
import {LexicalMenu, MenuOption, useMenuAnchorRef} from './shared/LexicalMenu';
|
|
34
|
+
import {startTransition} from './shared/reactPatches';
|
|
35
|
+
|
|
36
|
+
export const PUNCTUATION =
|
|
37
|
+
'\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%\'"~=<>_:;';
|
|
38
|
+
|
|
39
|
+
function getTextUpToAnchor(selection: RangeSelection): string | null {
|
|
40
|
+
const anchor = selection.anchor;
|
|
41
|
+
if (anchor.type !== 'text') {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
const anchorNode = anchor.getNode();
|
|
45
|
+
if (!anchorNode.isSimpleText()) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
const anchorOffset = anchor.offset;
|
|
49
|
+
return anchorNode.getTextContent().slice(0, anchorOffset);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function tryToPositionRange(
|
|
53
|
+
leadOffset: number,
|
|
54
|
+
range: Range,
|
|
55
|
+
editorWindow: Window,
|
|
56
|
+
): boolean {
|
|
57
|
+
const domSelection = getDOMSelection(editorWindow);
|
|
58
|
+
if (domSelection === null || !domSelection.isCollapsed) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
const anchorNode = domSelection.anchorNode;
|
|
62
|
+
const startOffset = leadOffset;
|
|
63
|
+
const endOffset = domSelection.anchorOffset;
|
|
64
|
+
|
|
65
|
+
if (anchorNode == null || endOffset == null) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
try {
|
|
70
|
+
range.setStart(anchorNode, startOffset);
|
|
71
|
+
range.setEnd(anchorNode, endOffset);
|
|
72
|
+
} catch (_error) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function getQueryTextForSearch(editor: LexicalEditor): string | null {
|
|
80
|
+
let text = null;
|
|
81
|
+
editor.getEditorState().read(() => {
|
|
82
|
+
const selection = $getSelection();
|
|
83
|
+
if (!$isRangeSelection(selection)) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
text = getTextUpToAnchor(selection);
|
|
87
|
+
});
|
|
88
|
+
return text;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function isSelectionOnEntityBoundary(
|
|
92
|
+
editor: LexicalEditor,
|
|
93
|
+
offset: number,
|
|
94
|
+
): boolean {
|
|
95
|
+
if (offset !== 0) {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
return editor.getEditorState().read(() => {
|
|
99
|
+
const selection = $getSelection();
|
|
100
|
+
if ($isRangeSelection(selection)) {
|
|
101
|
+
const anchor = selection.anchor;
|
|
102
|
+
const anchorNode = anchor.getNode();
|
|
103
|
+
const prevSibling = anchorNode.getPreviousSibling();
|
|
104
|
+
return $isTextNode(prevSibling) && prevSibling.isTextEntity();
|
|
105
|
+
}
|
|
106
|
+
return false;
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Got from https://stackoverflow.com/a/42543908/2013580
|
|
111
|
+
export function getScrollParent(
|
|
112
|
+
element: HTMLElement,
|
|
113
|
+
includeHidden: boolean,
|
|
114
|
+
): HTMLElement | HTMLBodyElement {
|
|
115
|
+
let style = getComputedStyle(element);
|
|
116
|
+
const excludeStaticParent = style.position === 'absolute';
|
|
117
|
+
const overflowRegex = includeHidden
|
|
118
|
+
? /(auto|scroll|hidden)/
|
|
119
|
+
: /(auto|scroll)/;
|
|
120
|
+
if (style.position === 'fixed') {
|
|
121
|
+
return document.body;
|
|
122
|
+
}
|
|
123
|
+
for (
|
|
124
|
+
let parent: HTMLElement | null = element;
|
|
125
|
+
(parent = parent.parentElement);
|
|
126
|
+
) {
|
|
127
|
+
style = getComputedStyle(parent);
|
|
128
|
+
if (excludeStaticParent && style.position === 'static') {
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
if (
|
|
132
|
+
overflowRegex.test(style.overflow + style.overflowY + style.overflowX)
|
|
133
|
+
) {
|
|
134
|
+
return parent;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return document.body;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export {useDynamicPositioning} from './shared/LexicalMenu';
|
|
141
|
+
|
|
142
|
+
export const SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND: LexicalCommand<{
|
|
143
|
+
index: number;
|
|
144
|
+
option: MenuOption;
|
|
145
|
+
}> = createCommand('SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND');
|
|
146
|
+
|
|
147
|
+
export function useBasicTypeaheadTriggerMatch(
|
|
148
|
+
trigger: string,
|
|
149
|
+
{
|
|
150
|
+
minLength = 1,
|
|
151
|
+
maxLength = 75,
|
|
152
|
+
punctuation = PUNCTUATION,
|
|
153
|
+
allowWhitespace = false,
|
|
154
|
+
}: {
|
|
155
|
+
minLength?: number;
|
|
156
|
+
maxLength?: number;
|
|
157
|
+
punctuation?: string;
|
|
158
|
+
allowWhitespace?: boolean;
|
|
159
|
+
},
|
|
160
|
+
): TriggerFn {
|
|
161
|
+
return useCallback(
|
|
162
|
+
(text: string) => {
|
|
163
|
+
const validCharsSuffix = allowWhitespace ? '' : '\\s';
|
|
164
|
+
const validChars = '[^' + trigger + punctuation + validCharsSuffix + ']';
|
|
165
|
+
const TypeaheadTriggerRegex = new RegExp(
|
|
166
|
+
'(^|\\s|\\()(' +
|
|
167
|
+
'[' +
|
|
168
|
+
trigger +
|
|
169
|
+
']' +
|
|
170
|
+
'((?:' +
|
|
171
|
+
validChars +
|
|
172
|
+
'){0,' +
|
|
173
|
+
maxLength +
|
|
174
|
+
'})' +
|
|
175
|
+
')$',
|
|
176
|
+
);
|
|
177
|
+
const match = TypeaheadTriggerRegex.exec(text);
|
|
178
|
+
if (match !== null) {
|
|
179
|
+
const maybeLeadingWhitespace = match[1];
|
|
180
|
+
const matchingString = match[3];
|
|
181
|
+
if (matchingString.length >= minLength) {
|
|
182
|
+
return {
|
|
183
|
+
leadOffset: match.index + maybeLeadingWhitespace.length,
|
|
184
|
+
matchingString,
|
|
185
|
+
replaceableString: match[2],
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return null;
|
|
190
|
+
},
|
|
191
|
+
[allowWhitespace, trigger, punctuation, maxLength, minLength],
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export type TypeaheadMenuPluginProps<TOption extends MenuOption> = {
|
|
196
|
+
onQueryChange: (matchingString: string | null) => void;
|
|
197
|
+
onSelectOption: (
|
|
198
|
+
option: TOption,
|
|
199
|
+
textNodeContainingQuery: TextNode | null,
|
|
200
|
+
closeMenu: () => void,
|
|
201
|
+
matchingString: string,
|
|
202
|
+
) => void;
|
|
203
|
+
options: Array<TOption>;
|
|
204
|
+
triggerFn: TriggerFn;
|
|
205
|
+
menuRenderFn?: MenuRenderFn<TOption>;
|
|
206
|
+
onOpen?: (resolution: MenuResolution) => void;
|
|
207
|
+
onClose?: () => void | PromiseLike<void>;
|
|
208
|
+
anchorClassName?: string;
|
|
209
|
+
commandPriority?: CommandListenerPriority;
|
|
210
|
+
parent?: HTMLElement;
|
|
211
|
+
preselectFirstItem?: boolean;
|
|
212
|
+
ignoreEntityBoundary?: boolean;
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
export function LexicalTypeaheadMenuPlugin<TOption extends MenuOption>({
|
|
216
|
+
options,
|
|
217
|
+
onQueryChange,
|
|
218
|
+
onSelectOption,
|
|
219
|
+
onOpen,
|
|
220
|
+
onClose,
|
|
221
|
+
menuRenderFn,
|
|
222
|
+
triggerFn,
|
|
223
|
+
anchorClassName,
|
|
224
|
+
commandPriority = COMMAND_PRIORITY_LOW,
|
|
225
|
+
parent,
|
|
226
|
+
preselectFirstItem = true,
|
|
227
|
+
ignoreEntityBoundary = false,
|
|
228
|
+
}: TypeaheadMenuPluginProps<TOption>): JSX.Element | null {
|
|
229
|
+
const [editor] = useLexicalComposerContext();
|
|
230
|
+
const [resolution, setResolution] = useState<MenuResolution | null>(null);
|
|
231
|
+
const anchorElementRef = useMenuAnchorRef(
|
|
232
|
+
resolution,
|
|
233
|
+
setResolution,
|
|
234
|
+
anchorClassName,
|
|
235
|
+
parent,
|
|
236
|
+
);
|
|
237
|
+
|
|
238
|
+
const closeTypeahead = useCallback(() => {
|
|
239
|
+
if (resolution === null) {
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
const finish = () => {
|
|
243
|
+
setResolution(null);
|
|
244
|
+
};
|
|
245
|
+
let result;
|
|
246
|
+
try {
|
|
247
|
+
result = onClose && onClose();
|
|
248
|
+
} finally {
|
|
249
|
+
if (result) {
|
|
250
|
+
result.then(finish, finish);
|
|
251
|
+
} else {
|
|
252
|
+
finish();
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}, [onClose, resolution]);
|
|
256
|
+
|
|
257
|
+
const openTypeahead = useCallback(
|
|
258
|
+
(res: MenuResolution) => {
|
|
259
|
+
setResolution(res);
|
|
260
|
+
if (onOpen != null && resolution === null) {
|
|
261
|
+
onOpen(res);
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
[onOpen, resolution],
|
|
265
|
+
);
|
|
266
|
+
|
|
267
|
+
useEffect(() => {
|
|
268
|
+
const updateListener = () => {
|
|
269
|
+
editor.getEditorState().read(() => {
|
|
270
|
+
// Check if editor is in read-only mode
|
|
271
|
+
if (!editor.isEditable()) {
|
|
272
|
+
closeTypeahead();
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
if (editor.isComposing()) {
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
const editorWindow = editor._window || window;
|
|
281
|
+
const range = editorWindow.document.createRange();
|
|
282
|
+
const selection = $getSelection();
|
|
283
|
+
const text = getQueryTextForSearch(editor);
|
|
284
|
+
|
|
285
|
+
if (
|
|
286
|
+
!$isRangeSelection(selection) ||
|
|
287
|
+
!selection.isCollapsed() ||
|
|
288
|
+
text === null ||
|
|
289
|
+
range === null
|
|
290
|
+
) {
|
|
291
|
+
closeTypeahead();
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
const match = triggerFn(text, editor);
|
|
296
|
+
onQueryChange(match ? match.matchingString : null);
|
|
297
|
+
|
|
298
|
+
if (
|
|
299
|
+
match !== null &&
|
|
300
|
+
(ignoreEntityBoundary ||
|
|
301
|
+
!isSelectionOnEntityBoundary(editor, match.leadOffset))
|
|
302
|
+
) {
|
|
303
|
+
const isRangePositioned = tryToPositionRange(
|
|
304
|
+
match.leadOffset,
|
|
305
|
+
range,
|
|
306
|
+
editorWindow,
|
|
307
|
+
);
|
|
308
|
+
if (isRangePositioned !== null) {
|
|
309
|
+
startTransition(() =>
|
|
310
|
+
openTypeahead({
|
|
311
|
+
getRect: () => range.getBoundingClientRect(),
|
|
312
|
+
match,
|
|
313
|
+
}),
|
|
314
|
+
);
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
closeTypeahead();
|
|
319
|
+
});
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
const removeUpdateListener = editor.registerUpdateListener(updateListener);
|
|
323
|
+
|
|
324
|
+
return () => {
|
|
325
|
+
removeUpdateListener();
|
|
326
|
+
};
|
|
327
|
+
}, [
|
|
328
|
+
editor,
|
|
329
|
+
triggerFn,
|
|
330
|
+
onQueryChange,
|
|
331
|
+
resolution,
|
|
332
|
+
closeTypeahead,
|
|
333
|
+
openTypeahead,
|
|
334
|
+
ignoreEntityBoundary,
|
|
335
|
+
]);
|
|
336
|
+
|
|
337
|
+
useEffect(
|
|
338
|
+
() =>
|
|
339
|
+
editor.registerEditableListener(isEditable => {
|
|
340
|
+
if (!isEditable) {
|
|
341
|
+
closeTypeahead();
|
|
342
|
+
}
|
|
343
|
+
}),
|
|
344
|
+
[editor, closeTypeahead],
|
|
345
|
+
);
|
|
346
|
+
|
|
347
|
+
return resolution === null ||
|
|
348
|
+
editor === null ||
|
|
349
|
+
anchorElementRef.current === null ? null : (
|
|
350
|
+
<LexicalMenu
|
|
351
|
+
close={closeTypeahead}
|
|
352
|
+
resolution={resolution}
|
|
353
|
+
editor={editor}
|
|
354
|
+
anchorElementRef={anchorElementRef}
|
|
355
|
+
options={options}
|
|
356
|
+
menuRenderFn={menuRenderFn}
|
|
357
|
+
shouldSplitNodeWithQuery={true}
|
|
358
|
+
onSelectOption={onSelectOption}
|
|
359
|
+
commandPriority={commandPriority}
|
|
360
|
+
preselectFirstItem={preselectFirstItem}
|
|
361
|
+
/>
|
|
362
|
+
);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
export {MenuOption, MenuRenderFn, MenuResolution, MenuTextMatch, TriggerFn};
|