@lexical/react 0.44.1-nightly.20260519.0 → 0.45.1-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,601 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type {JSX} from 'react';
|
|
10
|
+
|
|
11
|
+
import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext';
|
|
12
|
+
import {eventFiles} from '@lexical/rich-text';
|
|
13
|
+
import {calculateZoomLevel, isHTMLElement, mergeRegister} from '@lexical/utils';
|
|
14
|
+
import {
|
|
15
|
+
$getNearestNodeFromDOMNode,
|
|
16
|
+
$getNodeByKey,
|
|
17
|
+
$getRoot,
|
|
18
|
+
$getSelection,
|
|
19
|
+
$onUpdate,
|
|
20
|
+
BLUR_COMMAND,
|
|
21
|
+
COMMAND_PRIORITY_HIGH,
|
|
22
|
+
COMMAND_PRIORITY_LOW,
|
|
23
|
+
DRAGOVER_COMMAND,
|
|
24
|
+
DROP_COMMAND,
|
|
25
|
+
IS_FIREFOX,
|
|
26
|
+
LexicalEditor,
|
|
27
|
+
} from 'lexical';
|
|
28
|
+
import {
|
|
29
|
+
DragEvent as ReactDragEvent,
|
|
30
|
+
ReactNode,
|
|
31
|
+
useCallback,
|
|
32
|
+
useEffect,
|
|
33
|
+
useRef,
|
|
34
|
+
useState,
|
|
35
|
+
} from 'react';
|
|
36
|
+
import {createPortal} from 'react-dom';
|
|
37
|
+
|
|
38
|
+
import {Point} from './shared/point';
|
|
39
|
+
import {Rectangle} from './shared/rect';
|
|
40
|
+
|
|
41
|
+
const SPACE = 4;
|
|
42
|
+
const TARGET_LINE_HALF_HEIGHT = 2;
|
|
43
|
+
const DRAG_DATA_FORMAT = 'application/x-lexical-drag-block';
|
|
44
|
+
const TEXT_BOX_HORIZONTAL_PADDING = 28;
|
|
45
|
+
|
|
46
|
+
const Downward = 1;
|
|
47
|
+
const Upward = -1;
|
|
48
|
+
const Indeterminate = 0;
|
|
49
|
+
|
|
50
|
+
let prevIndex = Infinity;
|
|
51
|
+
|
|
52
|
+
function getCurrentIndex(keysLength: number): number {
|
|
53
|
+
if (keysLength === 0) {
|
|
54
|
+
return Infinity;
|
|
55
|
+
}
|
|
56
|
+
if (prevIndex >= 0 && prevIndex < keysLength) {
|
|
57
|
+
return prevIndex;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return Math.floor(keysLength / 2);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function getTopLevelNodeKeys(editor: LexicalEditor): string[] {
|
|
64
|
+
return editor.getEditorState().read(() => $getRoot().getChildrenKeys());
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function getCollapsedMargins(elem: HTMLElement): {
|
|
68
|
+
marginTop: number;
|
|
69
|
+
marginBottom: number;
|
|
70
|
+
} {
|
|
71
|
+
const getMargin = (
|
|
72
|
+
element: Element | null,
|
|
73
|
+
margin: 'marginTop' | 'marginBottom',
|
|
74
|
+
): number =>
|
|
75
|
+
element ? parseFloat(window.getComputedStyle(element)[margin]) : 0;
|
|
76
|
+
|
|
77
|
+
const {marginTop, marginBottom} = window.getComputedStyle(elem);
|
|
78
|
+
const prevElemSiblingMarginBottom = getMargin(
|
|
79
|
+
elem.previousElementSibling,
|
|
80
|
+
'marginBottom',
|
|
81
|
+
);
|
|
82
|
+
const nextElemSiblingMarginTop = getMargin(
|
|
83
|
+
elem.nextElementSibling,
|
|
84
|
+
'marginTop',
|
|
85
|
+
);
|
|
86
|
+
const collapsedTopMargin = Math.max(
|
|
87
|
+
parseFloat(marginTop),
|
|
88
|
+
prevElemSiblingMarginBottom,
|
|
89
|
+
);
|
|
90
|
+
const collapsedBottomMargin = Math.max(
|
|
91
|
+
parseFloat(marginBottom),
|
|
92
|
+
nextElemSiblingMarginTop,
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
return {marginBottom: collapsedBottomMargin, marginTop: collapsedTopMargin};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function getBlockElement(
|
|
99
|
+
anchorElem: HTMLElement,
|
|
100
|
+
editor: LexicalEditor,
|
|
101
|
+
event: MouseEvent,
|
|
102
|
+
useEdgeAsDefault = false,
|
|
103
|
+
): HTMLElement | null {
|
|
104
|
+
const anchorElementRect = anchorElem.getBoundingClientRect();
|
|
105
|
+
const topLevelNodeKeys = getTopLevelNodeKeys(editor);
|
|
106
|
+
|
|
107
|
+
let blockElem: HTMLElement | null = null;
|
|
108
|
+
|
|
109
|
+
editor.getEditorState().read(() => {
|
|
110
|
+
if (useEdgeAsDefault) {
|
|
111
|
+
const [firstNode, lastNode] = [
|
|
112
|
+
editor.getElementByKey(topLevelNodeKeys[0]),
|
|
113
|
+
editor.getElementByKey(topLevelNodeKeys[topLevelNodeKeys.length - 1]),
|
|
114
|
+
];
|
|
115
|
+
|
|
116
|
+
const [firstNodeRect, lastNodeRect] = [
|
|
117
|
+
firstNode != null ? firstNode.getBoundingClientRect() : undefined,
|
|
118
|
+
lastNode != null ? lastNode.getBoundingClientRect() : undefined,
|
|
119
|
+
];
|
|
120
|
+
|
|
121
|
+
if (firstNodeRect && lastNodeRect) {
|
|
122
|
+
const firstNodeZoom = calculateZoomLevel(firstNode);
|
|
123
|
+
const lastNodeZoom = calculateZoomLevel(lastNode);
|
|
124
|
+
if (event.y / firstNodeZoom < firstNodeRect.top) {
|
|
125
|
+
blockElem = firstNode;
|
|
126
|
+
} else if (event.y / lastNodeZoom > lastNodeRect.bottom) {
|
|
127
|
+
blockElem = lastNode;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if (blockElem) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
let index = getCurrentIndex(topLevelNodeKeys.length);
|
|
137
|
+
let direction = Indeterminate;
|
|
138
|
+
|
|
139
|
+
while (index >= 0 && index < topLevelNodeKeys.length) {
|
|
140
|
+
const key = topLevelNodeKeys[index];
|
|
141
|
+
const elem = editor.getElementByKey(key);
|
|
142
|
+
if (elem === null) {
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
const zoom = calculateZoomLevel(elem);
|
|
146
|
+
const point = new Point(event.x / zoom, event.y / zoom);
|
|
147
|
+
const domRect = Rectangle.fromDOM(elem);
|
|
148
|
+
const {marginTop, marginBottom} = getCollapsedMargins(elem);
|
|
149
|
+
const rect = domRect.generateNewRect({
|
|
150
|
+
bottom: domRect.bottom + marginBottom,
|
|
151
|
+
left: anchorElementRect.left,
|
|
152
|
+
right: anchorElementRect.right,
|
|
153
|
+
top: domRect.top - marginTop,
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
const {
|
|
157
|
+
result,
|
|
158
|
+
reason: {isOnTopSide, isOnBottomSide},
|
|
159
|
+
} = rect.contains(point);
|
|
160
|
+
|
|
161
|
+
if (result) {
|
|
162
|
+
blockElem = elem;
|
|
163
|
+
prevIndex = index;
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if (direction === Indeterminate) {
|
|
168
|
+
if (isOnTopSide) {
|
|
169
|
+
direction = Upward;
|
|
170
|
+
} else if (isOnBottomSide) {
|
|
171
|
+
direction = Downward;
|
|
172
|
+
} else {
|
|
173
|
+
// stop search block element
|
|
174
|
+
direction = Infinity;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
index += direction;
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
return blockElem;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function setMenuPosition(
|
|
186
|
+
targetElem: HTMLElement | null,
|
|
187
|
+
floatingElem: HTMLElement,
|
|
188
|
+
anchorElem: HTMLElement,
|
|
189
|
+
zoomLevel: number,
|
|
190
|
+
) {
|
|
191
|
+
if (!targetElem) {
|
|
192
|
+
floatingElem.style.display = 'none';
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
const targetRect = targetElem.getBoundingClientRect();
|
|
197
|
+
const targetStyle = window.getComputedStyle(targetElem);
|
|
198
|
+
const floatingElemRect = floatingElem.getBoundingClientRect();
|
|
199
|
+
const anchorElementRect = anchorElem.getBoundingClientRect();
|
|
200
|
+
|
|
201
|
+
// top left
|
|
202
|
+
let targetCalculateHeight: number = parseInt(targetStyle.lineHeight, 10);
|
|
203
|
+
if (isNaN(targetCalculateHeight)) {
|
|
204
|
+
// middle
|
|
205
|
+
targetCalculateHeight = targetRect.bottom - targetRect.top;
|
|
206
|
+
}
|
|
207
|
+
const top =
|
|
208
|
+
(targetRect.top +
|
|
209
|
+
(targetCalculateHeight -
|
|
210
|
+
(floatingElemRect.height || targetCalculateHeight)) /
|
|
211
|
+
2 -
|
|
212
|
+
anchorElementRect.top +
|
|
213
|
+
anchorElem.scrollTop) /
|
|
214
|
+
zoomLevel;
|
|
215
|
+
|
|
216
|
+
const left = SPACE;
|
|
217
|
+
|
|
218
|
+
floatingElem.style.display = 'flex';
|
|
219
|
+
floatingElem.style.opacity = '1';
|
|
220
|
+
floatingElem.style.transform = `translate(${left}px, ${top}px)`;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
function setDragImage(
|
|
224
|
+
dataTransfer: DataTransfer,
|
|
225
|
+
draggableBlockElem: HTMLElement,
|
|
226
|
+
) {
|
|
227
|
+
const {transform} = draggableBlockElem.style;
|
|
228
|
+
|
|
229
|
+
// Remove dragImage borders
|
|
230
|
+
draggableBlockElem.style.transform = 'translateZ(0)';
|
|
231
|
+
dataTransfer.setDragImage(draggableBlockElem, 0, 0);
|
|
232
|
+
|
|
233
|
+
setTimeout(() => {
|
|
234
|
+
draggableBlockElem.style.transform = transform;
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
function setTargetLine(
|
|
239
|
+
targetLineElem: HTMLElement,
|
|
240
|
+
targetBlockElem: HTMLElement,
|
|
241
|
+
mouseY: number,
|
|
242
|
+
anchorElem: HTMLElement,
|
|
243
|
+
) {
|
|
244
|
+
const {top: targetBlockElemTop, height: targetBlockElemHeight} =
|
|
245
|
+
targetBlockElem.getBoundingClientRect();
|
|
246
|
+
const {top: anchorTop, width: anchorWidth} =
|
|
247
|
+
anchorElem.getBoundingClientRect();
|
|
248
|
+
const {marginTop, marginBottom} = getCollapsedMargins(targetBlockElem);
|
|
249
|
+
let lineTop = targetBlockElemTop;
|
|
250
|
+
if (mouseY >= targetBlockElemTop) {
|
|
251
|
+
lineTop += targetBlockElemHeight + marginBottom / 2;
|
|
252
|
+
} else {
|
|
253
|
+
lineTop -= marginTop / 2;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
const top =
|
|
257
|
+
lineTop - anchorTop - TARGET_LINE_HALF_HEIGHT + anchorElem.scrollTop;
|
|
258
|
+
const left = TEXT_BOX_HORIZONTAL_PADDING - SPACE;
|
|
259
|
+
|
|
260
|
+
targetLineElem.style.transform = `translate(${left}px, ${top}px)`;
|
|
261
|
+
targetLineElem.style.width = `${
|
|
262
|
+
anchorWidth - (TEXT_BOX_HORIZONTAL_PADDING - SPACE) * 2
|
|
263
|
+
}px`;
|
|
264
|
+
targetLineElem.style.opacity = '.4';
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
function hideTargetLine(targetLineElem: HTMLElement | null) {
|
|
268
|
+
if (targetLineElem) {
|
|
269
|
+
targetLineElem.style.opacity = '0';
|
|
270
|
+
targetLineElem.style.transform = 'translate(-10000px, -10000px)';
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
function useDraggableBlockMenu(
|
|
275
|
+
editor: LexicalEditor,
|
|
276
|
+
anchorElem: HTMLElement,
|
|
277
|
+
menuRef: React.RefObject<HTMLElement | null>,
|
|
278
|
+
targetLineRef: React.RefObject<HTMLElement | null>,
|
|
279
|
+
isEditable: boolean,
|
|
280
|
+
menuComponent: ReactNode,
|
|
281
|
+
targetLineComponent: ReactNode,
|
|
282
|
+
isOnMenu: (element: HTMLElement) => boolean,
|
|
283
|
+
onElementChanged?: (element: HTMLElement | null) => void,
|
|
284
|
+
): JSX.Element {
|
|
285
|
+
const scrollerElem = anchorElem.parentElement;
|
|
286
|
+
|
|
287
|
+
const isDraggingBlockRef = useRef<boolean>(false);
|
|
288
|
+
const [draggableBlockElem, setDraggableBlockElemState] =
|
|
289
|
+
useState<HTMLElement | null>(null);
|
|
290
|
+
|
|
291
|
+
const setDraggableBlockElem = useCallback(
|
|
292
|
+
(elem: HTMLElement | null) => {
|
|
293
|
+
setDraggableBlockElemState(elem);
|
|
294
|
+
if (onElementChanged) {
|
|
295
|
+
onElementChanged(elem);
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
[onElementChanged],
|
|
299
|
+
);
|
|
300
|
+
|
|
301
|
+
useEffect(() => {
|
|
302
|
+
function onMouseMove(event: MouseEvent) {
|
|
303
|
+
const target = event.target;
|
|
304
|
+
if (!isHTMLElement(target)) {
|
|
305
|
+
setDraggableBlockElem(null);
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
if (isOnMenu(target)) {
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
const _draggableBlockElem = getBlockElement(anchorElem, editor, event);
|
|
314
|
+
|
|
315
|
+
setDraggableBlockElem(_draggableBlockElem);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
function onMouseLeave() {
|
|
319
|
+
setDraggableBlockElem(null);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
if (scrollerElem != null) {
|
|
323
|
+
scrollerElem.addEventListener('mousemove', onMouseMove);
|
|
324
|
+
scrollerElem.addEventListener('mouseleave', onMouseLeave);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
return () => {
|
|
328
|
+
if (scrollerElem != null) {
|
|
329
|
+
scrollerElem.removeEventListener('mousemove', onMouseMove);
|
|
330
|
+
scrollerElem.removeEventListener('mouseleave', onMouseLeave);
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
}, [scrollerElem, anchorElem, editor, isOnMenu, setDraggableBlockElem]);
|
|
334
|
+
|
|
335
|
+
useEffect(() => {
|
|
336
|
+
const zoomLevel = calculateZoomLevel(
|
|
337
|
+
document.getElementsByClassName('ContentEditable__root')[0],
|
|
338
|
+
true,
|
|
339
|
+
);
|
|
340
|
+
if (menuRef.current) {
|
|
341
|
+
setMenuPosition(
|
|
342
|
+
draggableBlockElem,
|
|
343
|
+
menuRef.current,
|
|
344
|
+
anchorElem,
|
|
345
|
+
zoomLevel,
|
|
346
|
+
);
|
|
347
|
+
}
|
|
348
|
+
}, [anchorElem, draggableBlockElem, menuRef]);
|
|
349
|
+
|
|
350
|
+
useEffect(() => {
|
|
351
|
+
function onDragover(event: DragEvent): boolean {
|
|
352
|
+
if (!isDraggingBlockRef.current) {
|
|
353
|
+
return false;
|
|
354
|
+
}
|
|
355
|
+
const [isFileTransfer] = eventFiles(event);
|
|
356
|
+
if (isFileTransfer) {
|
|
357
|
+
return false;
|
|
358
|
+
}
|
|
359
|
+
const {pageY, target} = event;
|
|
360
|
+
if (!isHTMLElement(target)) {
|
|
361
|
+
return false;
|
|
362
|
+
}
|
|
363
|
+
const targetBlockElem = getBlockElement(anchorElem, editor, event, true);
|
|
364
|
+
const targetLineElem = targetLineRef.current;
|
|
365
|
+
if (targetBlockElem === null || targetLineElem === null) {
|
|
366
|
+
return false;
|
|
367
|
+
}
|
|
368
|
+
setTargetLine(
|
|
369
|
+
targetLineElem,
|
|
370
|
+
targetBlockElem,
|
|
371
|
+
pageY / calculateZoomLevel(target),
|
|
372
|
+
anchorElem,
|
|
373
|
+
);
|
|
374
|
+
// Prevent default event to be able to trigger onDrop events
|
|
375
|
+
event.preventDefault();
|
|
376
|
+
return true;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
function $onDrop(event: DragEvent): boolean {
|
|
380
|
+
if (!isDraggingBlockRef.current) {
|
|
381
|
+
return false;
|
|
382
|
+
}
|
|
383
|
+
const [isFileTransfer] = eventFiles(event);
|
|
384
|
+
if (isFileTransfer) {
|
|
385
|
+
return false;
|
|
386
|
+
}
|
|
387
|
+
const {target, dataTransfer, pageY} = event;
|
|
388
|
+
const dragData =
|
|
389
|
+
dataTransfer != null ? dataTransfer.getData(DRAG_DATA_FORMAT) : '';
|
|
390
|
+
const draggedNode = $getNodeByKey(dragData);
|
|
391
|
+
if (!draggedNode) {
|
|
392
|
+
return false;
|
|
393
|
+
}
|
|
394
|
+
if (!isHTMLElement(target)) {
|
|
395
|
+
return false;
|
|
396
|
+
}
|
|
397
|
+
const targetBlockElem = getBlockElement(anchorElem, editor, event, true);
|
|
398
|
+
if (!targetBlockElem) {
|
|
399
|
+
return false;
|
|
400
|
+
}
|
|
401
|
+
const targetNode = $getNearestNodeFromDOMNode(targetBlockElem);
|
|
402
|
+
if (!targetNode) {
|
|
403
|
+
return false;
|
|
404
|
+
}
|
|
405
|
+
if (targetNode === draggedNode) {
|
|
406
|
+
// Firefox-specific fix: Even when no move occurs, restore focus to ensure cursor visibility
|
|
407
|
+
if (IS_FIREFOX) {
|
|
408
|
+
editor.focus();
|
|
409
|
+
}
|
|
410
|
+
return true;
|
|
411
|
+
}
|
|
412
|
+
const targetBlockElemTop = targetBlockElem.getBoundingClientRect().top;
|
|
413
|
+
if (pageY / calculateZoomLevel(target) >= targetBlockElemTop) {
|
|
414
|
+
targetNode.insertAfter(draggedNode);
|
|
415
|
+
} else {
|
|
416
|
+
targetNode.insertBefore(draggedNode);
|
|
417
|
+
}
|
|
418
|
+
setDraggableBlockElem(null);
|
|
419
|
+
|
|
420
|
+
// Firefox-specific fix: Use editor.focus() after drop to properly restore
|
|
421
|
+
// both focus and selection. This ensures cursor visibility immediately.
|
|
422
|
+
if (IS_FIREFOX) {
|
|
423
|
+
// Using $onUpdate ensures this happens after the current update cycle finishes
|
|
424
|
+
$onUpdate(() => {
|
|
425
|
+
editor.focus();
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
return true;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
return mergeRegister(
|
|
433
|
+
editor.registerCommand(
|
|
434
|
+
DRAGOVER_COMMAND,
|
|
435
|
+
event => {
|
|
436
|
+
return onDragover(event);
|
|
437
|
+
},
|
|
438
|
+
COMMAND_PRIORITY_LOW,
|
|
439
|
+
),
|
|
440
|
+
editor.registerCommand(
|
|
441
|
+
DROP_COMMAND,
|
|
442
|
+
event => {
|
|
443
|
+
return $onDrop(event);
|
|
444
|
+
},
|
|
445
|
+
COMMAND_PRIORITY_HIGH,
|
|
446
|
+
),
|
|
447
|
+
);
|
|
448
|
+
}, [anchorElem, editor, targetLineRef, setDraggableBlockElem]);
|
|
449
|
+
|
|
450
|
+
// Firefox-specific: Prevent blur when clicking on drag handle to maintain cursor visibility.
|
|
451
|
+
// Firefox fires blur before dragstart, causing focus loss. We detect this by checking if
|
|
452
|
+
// the blur's relatedTarget is on the menu using isOnMenu, then restore focus synchronously.
|
|
453
|
+
useEffect(() => {
|
|
454
|
+
if (!IS_FIREFOX || !isEditable) {
|
|
455
|
+
return;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
return mergeRegister(
|
|
459
|
+
editor.registerRootListener(rootElement => {
|
|
460
|
+
function onBlur(event: FocusEvent) {
|
|
461
|
+
const relatedTarget = event.relatedTarget;
|
|
462
|
+
if (isHTMLElement(relatedTarget) && isOnMenu(relatedTarget)) {
|
|
463
|
+
// Blur is caused by clicking on drag handle - restore focus immediately
|
|
464
|
+
// to prevent cursor from disappearing. This must be synchronous to work.
|
|
465
|
+
if (rootElement) {
|
|
466
|
+
rootElement.focus({preventScroll: true});
|
|
467
|
+
// Force selection update to ensure cursor is visible
|
|
468
|
+
editor.update(() => {
|
|
469
|
+
const selection = $getSelection();
|
|
470
|
+
if (selection !== null && !selection.dirty) {
|
|
471
|
+
selection.dirty = true;
|
|
472
|
+
}
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
// Prevent the event from propagating to LexicalEvents handler
|
|
476
|
+
event.stopImmediatePropagation();
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
if (rootElement) {
|
|
481
|
+
rootElement.addEventListener('blur', onBlur, true);
|
|
482
|
+
return () => rootElement.removeEventListener('blur', onBlur, true);
|
|
483
|
+
}
|
|
484
|
+
}),
|
|
485
|
+
// Intercept BLUR_COMMAND if focus is on the menu (fallback in case event propagation wasn't stopped)
|
|
486
|
+
editor.registerCommand(
|
|
487
|
+
BLUR_COMMAND,
|
|
488
|
+
() => {
|
|
489
|
+
const rootElement = editor.getRootElement();
|
|
490
|
+
const activeElement = document.activeElement;
|
|
491
|
+
if (
|
|
492
|
+
rootElement &&
|
|
493
|
+
isHTMLElement(activeElement) &&
|
|
494
|
+
isOnMenu(activeElement)
|
|
495
|
+
) {
|
|
496
|
+
// Focus is on menu - restore to root and prevent blur command
|
|
497
|
+
rootElement.focus({preventScroll: true});
|
|
498
|
+
editor.update(() => {
|
|
499
|
+
const selection = $getSelection();
|
|
500
|
+
if (selection !== null && !selection.dirty) {
|
|
501
|
+
selection.dirty = true;
|
|
502
|
+
}
|
|
503
|
+
});
|
|
504
|
+
return true; // Prevent command from propagating
|
|
505
|
+
}
|
|
506
|
+
return false;
|
|
507
|
+
},
|
|
508
|
+
COMMAND_PRIORITY_HIGH,
|
|
509
|
+
),
|
|
510
|
+
);
|
|
511
|
+
}, [editor, isEditable, isOnMenu]);
|
|
512
|
+
|
|
513
|
+
function onDragStart(event: ReactDragEvent<HTMLDivElement>): void {
|
|
514
|
+
const dataTransfer = event.dataTransfer;
|
|
515
|
+
if (!dataTransfer || !draggableBlockElem) {
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
setDragImage(dataTransfer, draggableBlockElem);
|
|
520
|
+
let nodeKey = '';
|
|
521
|
+
editor.update(() => {
|
|
522
|
+
const node = $getNearestNodeFromDOMNode(draggableBlockElem);
|
|
523
|
+
if (node) {
|
|
524
|
+
nodeKey = node.getKey();
|
|
525
|
+
}
|
|
526
|
+
});
|
|
527
|
+
isDraggingBlockRef.current = true;
|
|
528
|
+
dataTransfer.setData(DRAG_DATA_FORMAT, nodeKey);
|
|
529
|
+
|
|
530
|
+
// Firefox-specific: Restore focus synchronously after drag starts to prevent cursor loss.
|
|
531
|
+
// The blur handler should have already restored focus, but we do it here as a fallback
|
|
532
|
+
// and to ensure selection is properly maintained during drag.
|
|
533
|
+
if (IS_FIREFOX) {
|
|
534
|
+
const rootElement = editor.getRootElement();
|
|
535
|
+
if (rootElement !== null && document.activeElement !== rootElement) {
|
|
536
|
+
// Restore focus synchronously - don't use requestAnimationFrame as blur already happened
|
|
537
|
+
// and we need immediate focus restoration to maintain cursor visibility
|
|
538
|
+
rootElement.focus({preventScroll: true});
|
|
539
|
+
// Force selection update to ensure cursor is visible
|
|
540
|
+
editor.update(() => {
|
|
541
|
+
const selection = $getSelection();
|
|
542
|
+
if (selection !== null && !selection.dirty) {
|
|
543
|
+
selection.dirty = true;
|
|
544
|
+
}
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
function onDragEnd(): void {
|
|
551
|
+
isDraggingBlockRef.current = false;
|
|
552
|
+
hideTargetLine(targetLineRef.current);
|
|
553
|
+
|
|
554
|
+
// Firefox-specific fix: Use editor.focus() to properly restore both focus and
|
|
555
|
+
// selection after drag ends. This ensures cursor visibility immediately.
|
|
556
|
+
if (IS_FIREFOX) {
|
|
557
|
+
// editor.focus() handles both focus restoration and selection update properly
|
|
558
|
+
editor.focus();
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
return createPortal(
|
|
562
|
+
<>
|
|
563
|
+
<div draggable={true} onDragStart={onDragStart} onDragEnd={onDragEnd}>
|
|
564
|
+
{isEditable && menuComponent}
|
|
565
|
+
</div>
|
|
566
|
+
{targetLineComponent}
|
|
567
|
+
</>,
|
|
568
|
+
anchorElem,
|
|
569
|
+
);
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
export function DraggableBlockPlugin_EXPERIMENTAL({
|
|
573
|
+
anchorElem = document.body,
|
|
574
|
+
menuRef,
|
|
575
|
+
targetLineRef,
|
|
576
|
+
menuComponent,
|
|
577
|
+
targetLineComponent,
|
|
578
|
+
isOnMenu,
|
|
579
|
+
onElementChanged,
|
|
580
|
+
}: {
|
|
581
|
+
anchorElem?: HTMLElement;
|
|
582
|
+
menuRef: React.RefObject<HTMLElement | null>;
|
|
583
|
+
targetLineRef: React.RefObject<HTMLElement | null>;
|
|
584
|
+
menuComponent: ReactNode;
|
|
585
|
+
targetLineComponent: ReactNode;
|
|
586
|
+
isOnMenu: (element: HTMLElement) => boolean;
|
|
587
|
+
onElementChanged?: (element: HTMLElement | null) => void;
|
|
588
|
+
}): JSX.Element {
|
|
589
|
+
const [editor] = useLexicalComposerContext();
|
|
590
|
+
return useDraggableBlockMenu(
|
|
591
|
+
editor,
|
|
592
|
+
anchorElem,
|
|
593
|
+
menuRef,
|
|
594
|
+
targetLineRef,
|
|
595
|
+
editor._editable,
|
|
596
|
+
menuComponent,
|
|
597
|
+
targetLineComponent,
|
|
598
|
+
isOnMenu,
|
|
599
|
+
onElementChanged,
|
|
600
|
+
);
|
|
601
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext';
|
|
10
|
+
import {LexicalEditor} from 'lexical';
|
|
11
|
+
import * as React from 'react';
|
|
12
|
+
import {RefObject} from 'react';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* Use this plugin to access the editor instance outside of the
|
|
17
|
+
* LexicalComposer. This can help with things like buttons or other
|
|
18
|
+
* UI components that need to update or read EditorState but need to
|
|
19
|
+
* be positioned outside the LexicalComposer in the React tree.
|
|
20
|
+
*/
|
|
21
|
+
export function EditorRefPlugin({
|
|
22
|
+
editorRef,
|
|
23
|
+
}: {
|
|
24
|
+
editorRef:
|
|
25
|
+
| React.RefCallback<LexicalEditor>
|
|
26
|
+
| RefObject<LexicalEditor | null | undefined>;
|
|
27
|
+
}): null {
|
|
28
|
+
const [editor] = useLexicalComposerContext();
|
|
29
|
+
|
|
30
|
+
React.useEffect(() => {
|
|
31
|
+
if (typeof editorRef === 'function') {
|
|
32
|
+
editorRef(editor);
|
|
33
|
+
} else if (typeof editorRef === 'object' && editorRef !== null) {
|
|
34
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
35
|
+
editorRef.current = editor;
|
|
36
|
+
}
|
|
37
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
38
|
+
}, [editor]);
|
|
39
|
+
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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 ErrorInfo, type JSX, useCallback} from 'react';
|
|
10
|
+
import {ErrorBoundary} from 'react-error-boundary';
|
|
11
|
+
|
|
12
|
+
export type LexicalErrorBoundaryProps = {
|
|
13
|
+
children: JSX.Element;
|
|
14
|
+
onError: (error: Error, info: ErrorInfo) => void;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export function LexicalErrorBoundary({
|
|
18
|
+
children,
|
|
19
|
+
onError,
|
|
20
|
+
}: LexicalErrorBoundaryProps): JSX.Element {
|
|
21
|
+
const wrappedOnError = useCallback(
|
|
22
|
+
(err: unknown, info: ErrorInfo) => {
|
|
23
|
+
onError(
|
|
24
|
+
err instanceof Error ? err : new Error(String(err), {cause: err}),
|
|
25
|
+
info,
|
|
26
|
+
);
|
|
27
|
+
},
|
|
28
|
+
[onError],
|
|
29
|
+
);
|
|
30
|
+
return (
|
|
31
|
+
<ErrorBoundary
|
|
32
|
+
fallback={
|
|
33
|
+
<div
|
|
34
|
+
style={{
|
|
35
|
+
border: '1px solid #f00',
|
|
36
|
+
color: '#f00',
|
|
37
|
+
padding: '8px',
|
|
38
|
+
}}>
|
|
39
|
+
An error was thrown.
|
|
40
|
+
</div>
|
|
41
|
+
}
|
|
42
|
+
onError={wrappedOnError}>
|
|
43
|
+
{children}
|
|
44
|
+
</ErrorBoundary>
|
|
45
|
+
);
|
|
46
|
+
}
|