@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
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Install `lexical` and `@lexical/react`:
|
|
|
10
10
|
npm install --save lexical @lexical/react
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Below is an example of a basic plain text editor using `lexical` and `@lexical/react` ([try it yourself](https://stackblitz.com/github/facebook/lexical/tree/main/examples/react-plain-text?
|
|
13
|
+
Below is an example of a basic plain text editor using `lexical` and `@lexical/react` ([try it yourself](https://stackblitz.com/github/facebook/lexical/tree/main/examples/react-plain-text?file=src%2FApp.tsx&terminalHeight=0&ctl=1&showSidebar=0&devtoolsheight=0&view=preview)).
|
|
14
14
|
|
|
15
15
|
```jsx
|
|
16
16
|
import {$getRoot, $getSelection} from 'lexical';
|
|
@@ -10,18 +10,9 @@
|
|
|
10
10
|
|
|
11
11
|
var extension = require('@lexical/extension');
|
|
12
12
|
var LexicalComposerContext = require('@lexical/react/LexicalComposerContext');
|
|
13
|
+
var lexical = require('lexical');
|
|
13
14
|
var react = require('react');
|
|
14
15
|
|
|
15
|
-
/**
|
|
16
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
17
|
-
*
|
|
18
|
-
* This source code is licensed under the MIT license found in the
|
|
19
|
-
* LICENSE file in the root directory of this source tree.
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
|
|
24
|
-
|
|
25
16
|
/**
|
|
26
17
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
27
18
|
*
|
|
@@ -34,7 +25,7 @@ const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !==
|
|
|
34
25
|
// This workaround is no longer necessary in React 19,
|
|
35
26
|
// but we currently support React >=17.x
|
|
36
27
|
// https://github.com/facebook/react/pull/26395
|
|
37
|
-
const useLayoutEffectImpl = CAN_USE_DOM ? react.useLayoutEffect : react.useEffect;
|
|
28
|
+
const useLayoutEffectImpl = lexical.CAN_USE_DOM ? react.useLayoutEffect : react.useEffect;
|
|
38
29
|
|
|
39
30
|
/**
|
|
40
31
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
@@ -8,18 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
import { registerClearEditor } from '@lexical/extension';
|
|
10
10
|
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
11
|
+
import { CAN_USE_DOM } from 'lexical';
|
|
11
12
|
import { useLayoutEffect, useEffect } from 'react';
|
|
12
13
|
|
|
13
|
-
/**
|
|
14
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
|
|
22
|
-
|
|
23
14
|
/**
|
|
24
15
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
25
16
|
*
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
"use strict";var e=require("@lexical/extension"),r=require("@lexical/react/LexicalComposerContext"),t=require("lexical"),i=require("react");const o=t.CAN_USE_DOM?i.useLayoutEffect:i.useEffect;exports.ClearEditorPlugin=function({onClear:t}){const[i]=r.useLexicalComposerContext();return o(()=>e.registerClearEditor(i,t),[i,t]),null};
|
|
@@ -0,0 +1,9 @@
|
|
|
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{registerClearEditor as o}from"@lexical/extension";import{useLexicalComposerContext as r}from"@lexical/react/LexicalComposerContext";import{CAN_USE_DOM as t}from"lexical";import{useLayoutEffect as e,useEffect as i}from"react";const l=t?e:i;function n({onClear:t}){const[e]=r();return l(()=>o(e,t),[e,t]),null}export{n as ClearEditorPlugin};
|
|
@@ -13,16 +13,6 @@ var lexical = require('lexical');
|
|
|
13
13
|
var react = require('react');
|
|
14
14
|
var jsxRuntime = require('react/jsx-runtime');
|
|
15
15
|
|
|
16
|
-
/**
|
|
17
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the MIT license found in the
|
|
20
|
-
* LICENSE file in the root directory of this source tree.
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
|
|
25
|
-
|
|
26
16
|
/**
|
|
27
17
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
28
18
|
*
|
|
@@ -35,7 +25,7 @@ const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !==
|
|
|
35
25
|
// This workaround is no longer necessary in React 19,
|
|
36
26
|
// but we currently support React >=17.x
|
|
37
27
|
// https://github.com/facebook/react/pull/26395
|
|
38
|
-
const useLayoutEffectImpl = CAN_USE_DOM ? react.useLayoutEffect : react.useEffect;
|
|
28
|
+
const useLayoutEffectImpl = lexical.CAN_USE_DOM ? react.useLayoutEffect : react.useEffect;
|
|
39
29
|
|
|
40
30
|
/**
|
|
41
31
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
@@ -123,7 +113,7 @@ function initializeEditor(editor, initialEditorState) {
|
|
|
123
113
|
if (root.isEmpty()) {
|
|
124
114
|
const paragraph = lexical.$createParagraphNode();
|
|
125
115
|
root.append(paragraph);
|
|
126
|
-
const activeElement = CAN_USE_DOM ? document.activeElement : null;
|
|
116
|
+
const activeElement = lexical.CAN_USE_DOM ? document.activeElement : null;
|
|
127
117
|
if (lexical.$getSelection() !== null || activeElement !== null && activeElement === editor.getRootElement()) {
|
|
128
118
|
paragraph.select();
|
|
129
119
|
}
|
|
@@ -7,20 +7,10 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { createLexicalComposerContext, LexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
10
|
-
import { createEditor, $getRoot, $createParagraphNode, $getSelection, HISTORY_MERGE_TAG } from 'lexical';
|
|
10
|
+
import { CAN_USE_DOM, createEditor, $getRoot, $createParagraphNode, $getSelection, HISTORY_MERGE_TAG } from 'lexical';
|
|
11
11
|
import { useLayoutEffect, useEffect, useMemo } from 'react';
|
|
12
12
|
import { jsx } from 'react/jsx-runtime';
|
|
13
13
|
|
|
14
|
-
/**
|
|
15
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
16
|
-
*
|
|
17
|
-
* This source code is licensed under the MIT license found in the
|
|
18
|
-
* LICENSE file in the root directory of this source tree.
|
|
19
|
-
*
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
|
|
23
|
-
|
|
24
14
|
/**
|
|
25
15
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
26
16
|
*
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
"use strict";var e=require("@lexical/react/LexicalComposerContext"),t=require("lexical"),o=require("react"),r=require("react/jsx-runtime");const i=t.CAN_USE_DOM?o.useLayoutEffect:o.useEffect,n={tag:t.HISTORY_MERGE_TAG};exports.LexicalComposer=function({initialConfig:a,children:c}){const s=o.useMemo(()=>{const{theme:o,namespace:r,nodes:i,onError:c,editorState:s,html:l}=a,u=e.createLexicalComposerContext(null,o),d=t.createEditor({editable:a.editable,html:l,namespace:r,nodes:i,onError:e=>c(e,d),theme:o});return function(e,o){if(null===o)return;if(void 0===o)e.update(()=>{const o=t.$getRoot();if(o.isEmpty()){const r=t.$createParagraphNode();o.append(r);const i=t.CAN_USE_DOM?document.activeElement:null;(null!==t.$getSelection()||null!==i&&i===e.getRootElement())&&r.select()}},n);else if(null!==o)switch(typeof o){case"string":{const t=e.parseEditorState(o);e.setEditorState(t,n);break}case"object":e.setEditorState(o,n);break;case"function":e.update(()=>{t.$getRoot().isEmpty()&&o(e)},n)}}(d,s),[d,u]},[]);return i(()=>{const e=a.editable,[t]=s;t.setEditable(void 0===e||e)},[]),r.jsx(e.LexicalComposerContext.Provider,{value:s,children:c})};
|
|
@@ -0,0 +1,9 @@
|
|
|
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{createLexicalComposerContext as t,LexicalComposerContext as e}from"@lexical/react/LexicalComposerContext";import{CAN_USE_DOM as o,createEditor as n,$getRoot as r,$createParagraphNode as i,$getSelection as a,HISTORY_MERGE_TAG as l}from"lexical";import{useLayoutEffect as c,useEffect as s,useMemo as m}from"react";import{jsx as d}from"react/jsx-runtime";const u=o?c:s,p={tag:l};function f({initialConfig:l,children:c}){const s=m(()=>{const{theme:e,namespace:c,nodes:s,onError:m,editorState:d,html:u}=l,f=t(null,e),E=n({editable:l.editable,html:u,namespace:c,nodes:s,onError:t=>m(t,E),theme:e});return function(t,e){if(null===e)return;if(void 0===e)t.update(()=>{const e=r();if(e.isEmpty()){const n=i();e.append(n);const r=o?document.activeElement:null;(null!==a()||null!==r&&r===t.getRootElement())&&n.select()}},p);else if(null!==e)switch(typeof e){case"string":{const o=t.parseEditorState(e);t.setEditorState(o,p);break}case"object":t.setEditorState(e,p);break;case"function":t.update(()=>{r().isEmpty()&&e(t)},p)}}(E,d),[E,f]},[]);return u(()=>{const t=l.editable,[e]=s;e.setEditable(void 0===t||t)},[]),d(e.Provider,{value:s,children:c})}export{f as LexicalComposer};
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
var LexicalComposerContext = require('@lexical/react/LexicalComposerContext');
|
|
12
12
|
var react = require('react');
|
|
13
|
+
var lexical = require('lexical');
|
|
13
14
|
var jsxRuntime = require('react/jsx-runtime');
|
|
14
15
|
var text = require('@lexical/text');
|
|
15
16
|
var utils = require('@lexical/utils');
|
|
@@ -22,7 +23,17 @@ var utils = require('@lexical/utils');
|
|
|
22
23
|
*
|
|
23
24
|
*/
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
function mergeRefs(...refs) {
|
|
27
|
+
return value => {
|
|
28
|
+
for (const ref of refs) {
|
|
29
|
+
if (typeof ref === 'function') {
|
|
30
|
+
ref(value);
|
|
31
|
+
} else if (ref != null) {
|
|
32
|
+
ref.current = value;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
26
37
|
|
|
27
38
|
/**
|
|
28
39
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
@@ -36,27 +47,7 @@ const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !==
|
|
|
36
47
|
// This workaround is no longer necessary in React 19,
|
|
37
48
|
// but we currently support React >=17.x
|
|
38
49
|
// https://github.com/facebook/react/pull/26395
|
|
39
|
-
const useLayoutEffectImpl = CAN_USE_DOM ? react.useLayoutEffect : react.useEffect;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the MIT license found in the
|
|
45
|
-
* LICENSE file in the root directory of this source tree.
|
|
46
|
-
*
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
function mergeRefs(...refs) {
|
|
50
|
-
return value => {
|
|
51
|
-
for (const ref of refs) {
|
|
52
|
-
if (typeof ref === 'function') {
|
|
53
|
-
ref(value);
|
|
54
|
-
} else if (ref != null) {
|
|
55
|
-
ref.current = value;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
}
|
|
50
|
+
const useLayoutEffectImpl = lexical.CAN_USE_DOM ? react.useLayoutEffect : react.useEffect;
|
|
60
51
|
|
|
61
52
|
/**
|
|
62
53
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
10
10
|
import { useLayoutEffect, useEffect, forwardRef, useState, useCallback, useMemo } from 'react';
|
|
11
|
+
import { CAN_USE_DOM } from 'lexical';
|
|
11
12
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
12
13
|
import { $canShowPlaceholderCurry } from '@lexical/text';
|
|
13
14
|
import { mergeRegister } from '@lexical/utils';
|
|
@@ -20,7 +21,17 @@ import { mergeRegister } from '@lexical/utils';
|
|
|
20
21
|
*
|
|
21
22
|
*/
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
function mergeRefs(...refs) {
|
|
25
|
+
return value => {
|
|
26
|
+
for (const ref of refs) {
|
|
27
|
+
if (typeof ref === 'function') {
|
|
28
|
+
ref(value);
|
|
29
|
+
} else if (ref != null) {
|
|
30
|
+
ref.current = value;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
24
35
|
|
|
25
36
|
/**
|
|
26
37
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
@@ -36,26 +47,6 @@ const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !==
|
|
|
36
47
|
// https://github.com/facebook/react/pull/26395
|
|
37
48
|
const useLayoutEffectImpl = CAN_USE_DOM ? useLayoutEffect : useEffect;
|
|
38
49
|
|
|
39
|
-
/**
|
|
40
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
41
|
-
*
|
|
42
|
-
* This source code is licensed under the MIT license found in the
|
|
43
|
-
* LICENSE file in the root directory of this source tree.
|
|
44
|
-
*
|
|
45
|
-
*/
|
|
46
|
-
|
|
47
|
-
function mergeRefs(...refs) {
|
|
48
|
-
return value => {
|
|
49
|
-
for (const ref of refs) {
|
|
50
|
-
if (typeof ref === 'function') {
|
|
51
|
-
ref(value);
|
|
52
|
-
} else if (ref != null) {
|
|
53
|
-
ref.current = value;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
|
|
59
50
|
/**
|
|
60
51
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
61
52
|
*
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
"use strict";var e=require("@lexical/react/LexicalComposerContext"),t=require("react"),a=require("lexical"),r=require("react/jsx-runtime"),i=require("@lexical/text"),n=require("@lexical/utils");const l=a.CAN_USE_DOM?t.useLayoutEffect:t.useEffect;function o({editor:e,ariaActiveDescendant:a,ariaAutoComplete:i,ariaControls:n,ariaDescribedBy:o,ariaErrorMessage:s,ariaExpanded:u,ariaInvalid:d,ariaLabel:c,ariaLabelledBy:f,ariaMultiline:b,ariaOwns:x,ariaRequired:E,autoCapitalize:m,className:p,id:C,role:v="textbox",spellCheck:y=!0,style:g,tabIndex:L,"data-testid":h,...q},w){const[j,R]=t.useState(e.isEditable()),S=t.useCallback(t=>{t&&t.ownerDocument&&t.ownerDocument.defaultView?e.setRootElement(t):e.setRootElement(null)},[e]),D=t.useMemo(()=>function(...e){return t=>{for(const a of e)"function"==typeof a?a(t):null!=a&&(a.current=t)}}(w,S),[S,w]);return l(()=>(R(e.isEditable()),e.registerEditableListener(e=>{R(e)})),[e]),r.jsx("div",{"aria-activedescendant":j?a:void 0,"aria-autocomplete":j?i:"none","aria-controls":j?n:void 0,"aria-describedby":o,...null!=s?{"aria-errormessage":s}:{},"aria-expanded":j&&"combobox"===v?!!u:void 0,...null!=d?{"aria-invalid":d}:{},"aria-label":c,"aria-labelledby":f,"aria-multiline":b,"aria-owns":j?x:void 0,"aria-readonly":!j||void 0,"aria-required":E,autoCapitalize:m,className:p,contentEditable:j,"data-testid":h,id:C,ref:D,role:v,spellCheck:y,style:g,tabIndex:L,...q})}const s=t.forwardRef(o);function u(e){return e.getEditorState().read(i.$canShowPlaceholderCurry(e.isComposing()))}const d=t.forwardRef(c);function c(t,a){const{placeholder:i,...n}=t,[l]=e.useLexicalComposerContext();return r.jsxs(r.Fragment,{children:[r.jsx(s,{editor:l,...n,ref:a}),null!=i&&r.jsx(f,{editor:l,content:i})]})}function f({content:e,editor:a}){const i=function(e){const[a,r]=t.useState(()=>u(e));return l(()=>{function t(){const t=u(e);r(t)}return t(),n.mergeRegister(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),a}(a),[o,s]=t.useState(a.isEditable());if(t.useLayoutEffect(()=>(s(a.isEditable()),a.registerEditableListener(e=>{s(e)})),[a]),!i)return null;let d=null;return"function"==typeof e?d=e(o):null!==e&&(d=e),null===d?null:r.jsx("div",{"aria-hidden":!0,children:d})}exports.ContentEditable=d,exports.ContentEditableElement=s;
|
|
@@ -0,0 +1,9 @@
|
|
|
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 as e}from"@lexical/react/LexicalComposerContext";import{useLayoutEffect as t,useEffect as i,forwardRef as a,useState as r,useCallback as n,useMemo as o}from"react";import{CAN_USE_DOM as l}from"lexical";import{jsx as d,jsxs as s,Fragment as c}from"react/jsx-runtime";import{$canShowPlaceholderCurry as u}from"@lexical/text";import{mergeRegister as m}from"@lexical/utils";const f=l?t:i;function b({editor:e,ariaActiveDescendant:t,ariaAutoComplete:i,ariaControls:a,ariaDescribedBy:l,ariaErrorMessage:s,ariaExpanded:c,ariaInvalid:u,ariaLabel:m,ariaLabelledBy:b,ariaMultiline:p,ariaOwns:x,ariaRequired:E,autoCapitalize:v,className:y,id:C,role:g="textbox",spellCheck:L=!0,style:h,tabIndex:w,"data-testid":D,...I},R){const[k,q]=r(e.isEditable()),z=n(t=>{t&&t.ownerDocument&&t.ownerDocument.defaultView?e.setRootElement(t):e.setRootElement(null)},[e]),A=o(()=>function(...e){return t=>{for(const i of e)"function"==typeof i?i(t):null!=i&&(i.current=t)}}(R,z),[z,R]);return f(()=>(q(e.isEditable()),e.registerEditableListener(e=>{q(e)})),[e]),d("div",{"aria-activedescendant":k?t:void 0,"aria-autocomplete":k?i:"none","aria-controls":k?a:void 0,"aria-describedby":l,...null!=s?{"aria-errormessage":s}:{},"aria-expanded":k&&"combobox"===g?!!c:void 0,...null!=u?{"aria-invalid":u}:{},"aria-label":m,"aria-labelledby":b,"aria-multiline":p,"aria-owns":k?x:void 0,"aria-readonly":!k||void 0,"aria-required":E,autoCapitalize:v,className:y,contentEditable:k,"data-testid":D,id:C,ref:A,role:g,spellCheck:L,style:h,tabIndex:w,...I})}const p=a(b);function x(e){return e.getEditorState().read(u(e.isComposing()))}const E=a(v);function v(t,i){const{placeholder:a,...r}=t,[n]=e();return s(c,{children:[d(p,{editor:n,...r,ref:i}),null!=a&&d(y,{editor:n,content:a})]})}function y({content:e,editor:i}){const a=function(e){const[t,i]=r(()=>x(e));return f(()=>{function t(){const t=x(e);i(t)}return t(),m(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),t}(i),[n,o]=r(i.isEditable());if(t(()=>(o(i.isEditable()),i.registerEditableListener(e=>{o(e)})),[i]),!a)return null;let l=null;return"function"==typeof e?l=e(n):null!==e&&(l=e),null===l?null:d("div",{"aria-hidden":!0,children:l})}export{E as ContentEditable,p as ContentEditableElement};
|
|
@@ -16,28 +16,6 @@ var react = require('react');
|
|
|
16
16
|
var reactDom = require('react-dom');
|
|
17
17
|
var jsxRuntime = require('react/jsx-runtime');
|
|
18
18
|
|
|
19
|
-
/**
|
|
20
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
21
|
-
*
|
|
22
|
-
* This source code is licensed under the MIT license found in the
|
|
23
|
-
* LICENSE file in the root directory of this source tree.
|
|
24
|
-
*
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
31
|
-
*
|
|
32
|
-
* This source code is licensed under the MIT license found in the
|
|
33
|
-
* LICENSE file in the root directory of this source tree.
|
|
34
|
-
*
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
const documentMode = CAN_USE_DOM && 'documentMode' in document ? document.documentMode : null;
|
|
38
|
-
const IS_FIREFOX = CAN_USE_DOM && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);
|
|
39
|
-
CAN_USE_DOM && 'InputEvent' in window && !documentMode ? 'getTargetRanges' in new window.InputEvent('input') : false;
|
|
40
|
-
|
|
41
19
|
/**
|
|
42
20
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
43
21
|
*
|
|
@@ -496,7 +474,7 @@ function useDraggableBlockMenu(editor, anchorElem, menuRef, targetLineRef, isEdi
|
|
|
496
474
|
}
|
|
497
475
|
if (targetNode === draggedNode) {
|
|
498
476
|
// Firefox-specific fix: Even when no move occurs, restore focus to ensure cursor visibility
|
|
499
|
-
if (IS_FIREFOX) {
|
|
477
|
+
if (lexical.IS_FIREFOX) {
|
|
500
478
|
editor.focus();
|
|
501
479
|
}
|
|
502
480
|
return true;
|
|
@@ -511,7 +489,7 @@ function useDraggableBlockMenu(editor, anchorElem, menuRef, targetLineRef, isEdi
|
|
|
511
489
|
|
|
512
490
|
// Firefox-specific fix: Use editor.focus() after drop to properly restore
|
|
513
491
|
// both focus and selection. This ensures cursor visibility immediately.
|
|
514
|
-
if (IS_FIREFOX) {
|
|
492
|
+
if (lexical.IS_FIREFOX) {
|
|
515
493
|
// Using $onUpdate ensures this happens after the current update cycle finishes
|
|
516
494
|
lexical.$onUpdate(() => {
|
|
517
495
|
editor.focus();
|
|
@@ -530,7 +508,7 @@ function useDraggableBlockMenu(editor, anchorElem, menuRef, targetLineRef, isEdi
|
|
|
530
508
|
// Firefox fires blur before dragstart, causing focus loss. We detect this by checking if
|
|
531
509
|
// the blur's relatedTarget is on the menu using isOnMenu, then restore focus synchronously.
|
|
532
510
|
react.useEffect(() => {
|
|
533
|
-
if (!IS_FIREFOX || !isEditable) {
|
|
511
|
+
if (!lexical.IS_FIREFOX || !isEditable) {
|
|
534
512
|
return;
|
|
535
513
|
}
|
|
536
514
|
return utils.mergeRegister(editor.registerRootListener(rootElement => {
|
|
@@ -599,7 +577,7 @@ function useDraggableBlockMenu(editor, anchorElem, menuRef, targetLineRef, isEdi
|
|
|
599
577
|
// Firefox-specific: Restore focus synchronously after drag starts to prevent cursor loss.
|
|
600
578
|
// The blur handler should have already restored focus, but we do it here as a fallback
|
|
601
579
|
// and to ensure selection is properly maintained during drag.
|
|
602
|
-
if (IS_FIREFOX) {
|
|
580
|
+
if (lexical.IS_FIREFOX) {
|
|
603
581
|
const rootElement = editor.getRootElement();
|
|
604
582
|
if (rootElement !== null && document.activeElement !== rootElement) {
|
|
605
583
|
// Restore focus synchronously - don't use requestAnimationFrame as blur already happened
|
|
@@ -623,7 +601,7 @@ function useDraggableBlockMenu(editor, anchorElem, menuRef, targetLineRef, isEdi
|
|
|
623
601
|
|
|
624
602
|
// Firefox-specific fix: Use editor.focus() to properly restore both focus and
|
|
625
603
|
// selection after drag ends. This ensures cursor visibility immediately.
|
|
626
|
-
if (IS_FIREFOX) {
|
|
604
|
+
if (lexical.IS_FIREFOX) {
|
|
627
605
|
// editor.focus() handles both focus restoration and selection update properly
|
|
628
606
|
editor.focus();
|
|
629
607
|
}
|
|
@@ -9,33 +9,11 @@
|
|
|
9
9
|
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
10
10
|
import { eventFiles } from '@lexical/rich-text';
|
|
11
11
|
import { calculateZoomLevel, mergeRegister, isHTMLElement } from '@lexical/utils';
|
|
12
|
-
import { DRAGOVER_COMMAND, COMMAND_PRIORITY_LOW, DROP_COMMAND, COMMAND_PRIORITY_HIGH, BLUR_COMMAND, $getSelection, $getNodeByKey, $getNearestNodeFromDOMNode, $onUpdate, $getRoot } from 'lexical';
|
|
12
|
+
import { DRAGOVER_COMMAND, COMMAND_PRIORITY_LOW, DROP_COMMAND, COMMAND_PRIORITY_HIGH, IS_FIREFOX, BLUR_COMMAND, $getSelection, $getNodeByKey, $getNearestNodeFromDOMNode, $onUpdate, $getRoot } from 'lexical';
|
|
13
13
|
import { useRef, useState, useCallback, useEffect } from 'react';
|
|
14
14
|
import { createPortal } from 'react-dom';
|
|
15
15
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
19
|
-
*
|
|
20
|
-
* This source code is licensed under the MIT license found in the
|
|
21
|
-
* LICENSE file in the root directory of this source tree.
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
29
|
-
*
|
|
30
|
-
* This source code is licensed under the MIT license found in the
|
|
31
|
-
* LICENSE file in the root directory of this source tree.
|
|
32
|
-
*
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
|
-
const documentMode = CAN_USE_DOM && 'documentMode' in document ? document.documentMode : null;
|
|
36
|
-
const IS_FIREFOX = CAN_USE_DOM && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);
|
|
37
|
-
CAN_USE_DOM && 'InputEvent' in window && !documentMode ? 'getTargetRanges' in new window.InputEvent('input') : false;
|
|
38
|
-
|
|
39
17
|
/**
|
|
40
18
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
41
19
|
*
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
"use strict";var t=require("@lexical/react/LexicalComposerContext"),e=require("@lexical/rich-text"),n=require("@lexical/utils"),r=require("lexical"),o=require("react"),i=require("react-dom"),s=require("react/jsx-runtime");class l{_x;_y;constructor(t,e){this._x=t,this._y=e}get x(){return this._x}get y(){return this._y}equals({x:t,y:e}){return this.x===t&&this.y===e}calcDeltaXTo({x:t}){return this.x-t}calcDeltaYTo({y:t}){return this.y-t}calcHorizontalDistanceTo(t){return Math.abs(this.calcDeltaXTo(t))}calcVerticalDistance(t){return Math.abs(this.calcDeltaYTo(t))}calcDistanceTo(t){return Math.sqrt(Math.pow(this.calcDeltaXTo(t),2)+Math.pow(this.calcDeltaYTo(t),2))}}class a{_left;_top;_right;_bottom;constructor(t,e,n,r){const[o,i]=e<=r?[e,r]:[r,e],[s,l]=t<=n?[t,n]:[n,t];this._top=o,this._right=l,this._left=s,this._bottom=i}get top(){return this._top}get right(){return this._right}get bottom(){return this._bottom}get left(){return this._left}get width(){return Math.abs(this._left-this._right)}get height(){return Math.abs(this._bottom-this._top)}equals({top:t,left:e,bottom:n,right:r}){return t===this._top&&n===this._bottom&&e===this._left&&r===this._right}contains(t){if(t instanceof l){const{x:e,y:n}=t,r=n<this._top,o=n>this._bottom,i=e<this._left,s=e>this._right;return{reason:{isOnBottomSide:o,isOnLeftSide:i,isOnRightSide:s,isOnTopSide:r},result:!(r||o||i||s)}}{const{top:e,left:n,bottom:r,right:o}=t;return e>=this._top&&e<=this._bottom&&r>=this._top&&r<=this._bottom&&n>=this._left&&n<=this._right&&o>=this._left&&o<=this._right}}intersectsWith(t){const{left:e,top:n,width:r,height:o}=t,{left:i,top:s,width:l,height:a}=this;return(e+r>=i+l?e+r:i+l)-(e<=i?e:i)<=r+l&&(n+o>=s+a?n+o:s+a)-(n<=s?n:s)<=o+a}generateNewRect({left:t=this.left,top:e=this.top,right:n=this.right,bottom:r=this.bottom}){return new a(t,e,n,r)}static fromLTRB(t,e,n,r){return new a(t,e,n,r)}static fromLWTH(t,e,n,r){return new a(t,n,t+e,n+r)}static fromPoints(t,e){const{y:n,x:r}=t,{y:o,x:i}=e;return a.fromLTRB(r,n,i,o)}static fromDOM(t){const{top:e,width:n,left:r,height:o}=t.getBoundingClientRect();return a.fromLWTH(r,n,e,o)}}const c="application/x-lexical-drag-block";let u=1/0;function g(t){const e=(t,e)=>t?parseFloat(window.getComputedStyle(t)[e]):0,{marginTop:n,marginBottom:r}=window.getComputedStyle(t),o=e(t.previousElementSibling,"marginBottom"),i=e(t.nextElementSibling,"marginTop"),s=Math.max(parseFloat(n),o);return{marginBottom:Math.max(parseFloat(r),i),marginTop:s}}function m(t,e,o,i=!1){const s=t.getBoundingClientRect(),c=function(t){return t.getEditorState().read(()=>r.$getRoot().getChildrenKeys())}(e);let m=null;return e.getEditorState().read(()=>{if(i){const[t,r]=[e.getElementByKey(c[0]),e.getElementByKey(c[c.length-1])],[i,s]=[null!=t?t.getBoundingClientRect():void 0,null!=r?r.getBoundingClientRect():void 0];if(i&&s){const e=n.calculateZoomLevel(t),l=n.calculateZoomLevel(r);if(o.y/e<i.top?m=t:o.y/l>s.bottom&&(m=r),m)return}}let t=0===(r=c.length)?1/0:u>=0&&u<r?u:Math.floor(r/2);var r;let h=0;for(;t>=0&&t<c.length;){const r=c[t],i=e.getElementByKey(r);if(null===i)break;const f=n.calculateZoomLevel(i),d=new l(o.x/f,o.y/f),p=a.fromDOM(i),{marginTop:_,marginBottom:y}=g(i),E=p.generateNewRect({bottom:p.bottom+y,left:s.left,right:s.right,top:p.top-_}),{result:R,reason:{isOnTopSide:x,isOnBottomSide:v}}=E.contains(d);if(R){m=i,u=t;break}0===h&&(h=x?-1:v?1:1/0),t+=h}}),m}function h(t,l,a,u,h,f,d,p,_){const y=l.parentElement,E=o.useRef(!1),[R,x]=o.useState(null),v=o.useCallback(t=>{x(t),_&&_(t)},[_]);return o.useEffect(()=>{function e(e){const r=e.target;if(!n.isHTMLElement(r))return void v(null);if(p(r))return;const o=m(l,t,e);v(o)}function r(){v(null)}return null!=y&&(y.addEventListener("mousemove",e),y.addEventListener("mouseleave",r)),()=>{null!=y&&(y.removeEventListener("mousemove",e),y.removeEventListener("mouseleave",r))}},[y,l,t,p,v]),o.useEffect(()=>{const t=n.calculateZoomLevel(document.getElementsByClassName("ContentEditable__root")[0],!0);a.current&&function(t,e,n,r){if(!t)return void(e.style.display="none");const o=t.getBoundingClientRect(),i=window.getComputedStyle(t),s=e.getBoundingClientRect(),l=n.getBoundingClientRect();let a=parseInt(i.lineHeight,10);isNaN(a)&&(a=o.bottom-o.top);const c=(o.top+(a-(s.height||a))/2-l.top+n.scrollTop)/r;e.style.display="flex",e.style.opacity="1",e.style.transform=`translate(4px, ${c}px)`}(R,a.current,l,t)},[l,R,a]),o.useEffect(()=>{function o(r){if(!E.current)return!1;const[o]=e.eventFiles(r);if(o)return!1;const{pageY:i,target:s}=r;if(!n.isHTMLElement(s))return!1;const a=m(l,t,r,!0),c=u.current;return null!==a&&null!==c&&(function(t,e,n,r){const{top:o,height:i}=e.getBoundingClientRect(),{top:s,width:l}=r.getBoundingClientRect(),{marginTop:a,marginBottom:c}=g(e);let u=o;n>=o?u+=i+c/2:u-=a/2;const m=u-s-2+r.scrollTop;t.style.transform=`translate(24px, ${m}px)`,t.style.width=l-48+"px",t.style.opacity=".4"}(c,a,i/n.calculateZoomLevel(s),l),r.preventDefault(),!0)}return n.mergeRegister(t.registerCommand(r.DRAGOVER_COMMAND,t=>o(t),r.COMMAND_PRIORITY_LOW),t.registerCommand(r.DROP_COMMAND,o=>function(o){if(!E.current)return!1;const[i]=e.eventFiles(o);if(i)return!1;const{target:s,dataTransfer:a,pageY:u}=o,g=null!=a?a.getData(c):"",h=r.$getNodeByKey(g);if(!h)return!1;if(!n.isHTMLElement(s))return!1;const f=m(l,t,o,!0);if(!f)return!1;const d=r.$getNearestNodeFromDOMNode(f);if(!d)return!1;if(d===h)return r.IS_FIREFOX&&t.focus(),!0;const p=f.getBoundingClientRect().top;return u/n.calculateZoomLevel(s)>=p?d.insertAfter(h):d.insertBefore(h),v(null),r.IS_FIREFOX&&r.$onUpdate(()=>{t.focus()}),!0}(o),r.COMMAND_PRIORITY_HIGH))},[l,t,u,v]),o.useEffect(()=>{if(r.IS_FIREFOX&&h)return n.mergeRegister(t.registerRootListener(e=>{function o(o){const i=o.relatedTarget;n.isHTMLElement(i)&&p(i)&&(e&&(e.focus({preventScroll:!0}),t.update(()=>{const t=r.$getSelection();null===t||t.dirty||(t.dirty=!0)})),o.stopImmediatePropagation())}if(e)return e.addEventListener("blur",o,!0),()=>e.removeEventListener("blur",o,!0)}),t.registerCommand(r.BLUR_COMMAND,()=>{const e=t.getRootElement(),o=document.activeElement;return!!(e&&n.isHTMLElement(o)&&p(o))&&(e.focus({preventScroll:!0}),t.update(()=>{const t=r.$getSelection();null===t||t.dirty||(t.dirty=!0)}),!0)},r.COMMAND_PRIORITY_HIGH))},[t,h,p]),i.createPortal(s.jsxs(s.Fragment,{children:[s.jsx("div",{draggable:!0,onDragStart:function(e){const n=e.dataTransfer;if(!n||!R)return;!function(t,e){const{transform:n}=e.style;e.style.transform="translateZ(0)",t.setDragImage(e,0,0),setTimeout(()=>{e.style.transform=n})}(n,R);let o="";if(t.update(()=>{const t=r.$getNearestNodeFromDOMNode(R);t&&(o=t.getKey())}),E.current=!0,n.setData(c,o),r.IS_FIREFOX){const e=t.getRootElement();null!==e&&document.activeElement!==e&&(e.focus({preventScroll:!0}),t.update(()=>{const t=r.$getSelection();null===t||t.dirty||(t.dirty=!0)}))}},onDragEnd:function(){var e;E.current=!1,(e=u.current)&&(e.style.opacity="0",e.style.transform="translate(-10000px, -10000px)"),r.IS_FIREFOX&&t.focus()},children:h&&f}),d]}),l)}exports.DraggableBlockPlugin_EXPERIMENTAL=function({anchorElem:e=document.body,menuRef:n,targetLineRef:r,menuComponent:o,targetLineComponent:i,isOnMenu:s,onElementChanged:l}){const[a]=t.useLexicalComposerContext();return h(a,e,n,r,a._editable,o,i,s,l)};
|
|
@@ -0,0 +1,9 @@
|
|
|
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 as t}from"@lexical/react/LexicalComposerContext";import{eventFiles as e}from"@lexical/rich-text";import{calculateZoomLevel as n,mergeRegister as r,isHTMLElement as o}from"@lexical/utils";import{DRAGOVER_COMMAND as i,COMMAND_PRIORITY_LOW as s,DROP_COMMAND as l,COMMAND_PRIORITY_HIGH as a,IS_FIREFOX as c,BLUR_COMMAND as u,$getSelection as m,$getNodeByKey as g,$getNearestNodeFromDOMNode as h,$onUpdate as f,$getRoot as p}from"lexical";import{useRef as d,useState as y,useCallback as _,useEffect as x}from"react";import{createPortal as b}from"react-dom";import{jsxs as v,Fragment as T,jsx as B}from"react/jsx-runtime";class C{_x;_y;constructor(t,e){this._x=t,this._y=e}get x(){return this._x}get y(){return this._y}equals({x:t,y:e}){return this.x===t&&this.y===e}calcDeltaXTo({x:t}){return this.x-t}calcDeltaYTo({y:t}){return this.y-t}calcHorizontalDistanceTo(t){return Math.abs(this.calcDeltaXTo(t))}calcVerticalDistance(t){return Math.abs(this.calcDeltaYTo(t))}calcDistanceTo(t){return Math.sqrt(Math.pow(this.calcDeltaXTo(t),2)+Math.pow(this.calcDeltaYTo(t),2))}}class E{_left;_top;_right;_bottom;constructor(t,e,n,r){const[o,i]=e<=r?[e,r]:[r,e],[s,l]=t<=n?[t,n]:[n,t];this._top=o,this._right=l,this._left=s,this._bottom=i}get top(){return this._top}get right(){return this._right}get bottom(){return this._bottom}get left(){return this._left}get width(){return Math.abs(this._left-this._right)}get height(){return Math.abs(this._bottom-this._top)}equals({top:t,left:e,bottom:n,right:r}){return t===this._top&&n===this._bottom&&e===this._left&&r===this._right}contains(t){if(t instanceof C){const{x:e,y:n}=t,r=n<this._top,o=n>this._bottom,i=e<this._left,s=e>this._right;return{reason:{isOnBottomSide:o,isOnLeftSide:i,isOnRightSide:s,isOnTopSide:r},result:!(r||o||i||s)}}{const{top:e,left:n,bottom:r,right:o}=t;return e>=this._top&&e<=this._bottom&&r>=this._top&&r<=this._bottom&&n>=this._left&&n<=this._right&&o>=this._left&&o<=this._right}}intersectsWith(t){const{left:e,top:n,width:r,height:o}=t,{left:i,top:s,width:l,height:a}=this;return(e+r>=i+l?e+r:i+l)-(e<=i?e:i)<=r+l&&(n+o>=s+a?n+o:s+a)-(n<=s?n:s)<=o+a}generateNewRect({left:t=this.left,top:e=this.top,right:n=this.right,bottom:r=this.bottom}){return new E(t,e,n,r)}static fromLTRB(t,e,n,r){return new E(t,e,n,r)}static fromLWTH(t,e,n,r){return new E(t,n,t+e,n+r)}static fromPoints(t,e){const{y:n,x:r}=t,{y:o,x:i}=e;return E.fromLTRB(r,n,i,o)}static fromDOM(t){const{top:e,width:n,left:r,height:o}=t.getBoundingClientRect();return E.fromLWTH(r,n,e,o)}}const w="application/x-lexical-drag-block";let R=1/0;function D(t){const e=(t,e)=>t?parseFloat(window.getComputedStyle(t)[e]):0,{marginTop:n,marginBottom:r}=window.getComputedStyle(t),o=e(t.previousElementSibling,"marginBottom"),i=e(t.nextElementSibling,"marginTop"),s=Math.max(parseFloat(n),o);return{marginBottom:Math.max(parseFloat(r),i),marginTop:s}}function S(t,e,r,o=!1){const i=t.getBoundingClientRect(),s=function(t){return t.getEditorState().read(()=>p().getChildrenKeys())}(e);let l=null;return e.getEditorState().read(()=>{if(o){const[t,o]=[e.getElementByKey(s[0]),e.getElementByKey(s[s.length-1])],[i,a]=[null!=t?t.getBoundingClientRect():void 0,null!=o?o.getBoundingClientRect():void 0];if(i&&a){const e=n(t),s=n(o);if(r.y/e<i.top?l=t:r.y/s>a.bottom&&(l=o),l)return}}let t=0===(a=s.length)?1/0:R>=0&&R<a?R:Math.floor(a/2);var a;let c=0;for(;t>=0&&t<s.length;){const o=s[t],a=e.getElementByKey(o);if(null===a)break;const u=n(a),m=new C(r.x/u,r.y/u),g=E.fromDOM(a),{marginTop:h,marginBottom:f}=D(a),p=g.generateNewRect({bottom:g.bottom+f,left:i.left,right:i.right,top:g.top-h}),{result:d,reason:{isOnTopSide:y,isOnBottomSide:_}}=p.contains(m);if(d){l=a,R=t;break}0===c&&(c=y?-1:_?1:1/0),t+=c}}),l}function L(t,p,C,E,R,L,M,O,K){const N=p.parentElement,Y=d(!1),[H,k]=y(null),q=_(t=>{k(t),K&&K(t)},[K]);return x(()=>{function e(e){const n=e.target;if(!o(n))return void q(null);if(O(n))return;const r=S(p,t,e);q(r)}function n(){q(null)}return null!=N&&(N.addEventListener("mousemove",e),N.addEventListener("mouseleave",n)),()=>{null!=N&&(N.removeEventListener("mousemove",e),N.removeEventListener("mouseleave",n))}},[N,p,t,O,q]),x(()=>{const t=n(document.getElementsByClassName("ContentEditable__root")[0],!0);C.current&&function(t,e,n,r){if(!t)return void(e.style.display="none");const o=t.getBoundingClientRect(),i=window.getComputedStyle(t),s=e.getBoundingClientRect(),l=n.getBoundingClientRect();let a=parseInt(i.lineHeight,10);isNaN(a)&&(a=o.bottom-o.top);const c=(o.top+(a-(s.height||a))/2-l.top+n.scrollTop)/r;e.style.display="flex",e.style.opacity="1",e.style.transform=`translate(4px, ${c}px)`}(H,C.current,p,t)},[p,H,C]),x(()=>{function u(r){if(!Y.current)return!1;const[i]=e(r);if(i)return!1;const{pageY:s,target:l}=r;if(!o(l))return!1;const a=S(p,t,r,!0),c=E.current;return null!==a&&null!==c&&(function(t,e,n,r){const{top:o,height:i}=e.getBoundingClientRect(),{top:s,width:l}=r.getBoundingClientRect(),{marginTop:a,marginBottom:c}=D(e);let u=o;n>=o?u+=i+c/2:u-=a/2;const m=u-s-2+r.scrollTop;t.style.transform=`translate(24px, ${m}px)`,t.style.width=l-48+"px",t.style.opacity=".4"}(c,a,s/n(l),p),r.preventDefault(),!0)}return r(t.registerCommand(i,t=>u(t),s),t.registerCommand(l,r=>function(r){if(!Y.current)return!1;const[i]=e(r);if(i)return!1;const{target:s,dataTransfer:l,pageY:a}=r,u=null!=l?l.getData(w):"",m=g(u);if(!m)return!1;if(!o(s))return!1;const d=S(p,t,r,!0);if(!d)return!1;const y=h(d);if(!y)return!1;if(y===m)return c&&t.focus(),!0;const _=d.getBoundingClientRect().top;return a/n(s)>=_?y.insertAfter(m):y.insertBefore(m),q(null),c&&f(()=>{t.focus()}),!0}(r),a))},[p,t,E,q]),x(()=>{if(c&&R)return r(t.registerRootListener(e=>{function n(n){const r=n.relatedTarget;o(r)&&O(r)&&(e&&(e.focus({preventScroll:!0}),t.update(()=>{const t=m();null===t||t.dirty||(t.dirty=!0)})),n.stopImmediatePropagation())}if(e)return e.addEventListener("blur",n,!0),()=>e.removeEventListener("blur",n,!0)}),t.registerCommand(u,()=>{const e=t.getRootElement(),n=document.activeElement;return!!(e&&o(n)&&O(n))&&(e.focus({preventScroll:!0}),t.update(()=>{const t=m();null===t||t.dirty||(t.dirty=!0)}),!0)},a))},[t,R,O]),b(v(T,{children:[B("div",{draggable:!0,onDragStart:function(e){const n=e.dataTransfer;if(!n||!H)return;!function(t,e){const{transform:n}=e.style;e.style.transform="translateZ(0)",t.setDragImage(e,0,0),setTimeout(()=>{e.style.transform=n})}(n,H);let r="";if(t.update(()=>{const t=h(H);t&&(r=t.getKey())}),Y.current=!0,n.setData(w,r),c){const e=t.getRootElement();null!==e&&document.activeElement!==e&&(e.focus({preventScroll:!0}),t.update(()=>{const t=m();null===t||t.dirty||(t.dirty=!0)}))}},onDragEnd:function(){var e;Y.current=!1,(e=E.current)&&(e.style.opacity="0",e.style.transform="translate(-10000px, -10000px)"),c&&t.focus()},children:R&&L}),M]}),p)}function M({anchorElem:e=document.body,menuRef:n,targetLineRef:r,menuComponent:o,targetLineComponent:i,isOnMenu:s,onElementChanged:l}){const[a]=t();return L(a,e,n,r,a._editable,o,i,s,l)}export{M as DraggableBlockPlugin_EXPERIMENTAL};
|
|
@@ -24,41 +24,10 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
// Webpack + React 17 fails to compile on the usage of `React.startTransition` or
|
|
28
|
-
// `React["startTransition"]` even if it's behind a feature detection of
|
|
29
|
-
// `"startTransition" in React`. Moving this to a constant avoids the issue :/
|
|
30
|
-
const START_TRANSITION = 'startTransition';
|
|
31
|
-
function startTransition(callback) {
|
|
32
|
-
if (START_TRANSITION in React) {
|
|
33
|
-
React[START_TRANSITION](callback);
|
|
34
|
-
} else {
|
|
35
|
-
callback();
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
41
|
-
*
|
|
42
|
-
* This source code is licensed under the MIT license found in the
|
|
43
|
-
* LICENSE file in the root directory of this source tree.
|
|
44
|
-
*
|
|
45
|
-
*/
|
|
46
|
-
|
|
47
|
-
const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
51
|
-
*
|
|
52
|
-
* This source code is licensed under the MIT license found in the
|
|
53
|
-
* LICENSE file in the root directory of this source tree.
|
|
54
|
-
*
|
|
55
|
-
*/
|
|
56
|
-
|
|
57
|
-
|
|
58
27
|
// This workaround is no longer necessary in React 19,
|
|
59
28
|
// but we currently support React >=17.x
|
|
60
29
|
// https://github.com/facebook/react/pull/26395
|
|
61
|
-
const useLayoutEffectImpl = CAN_USE_DOM ? React.useLayoutEffect : React.useEffect;
|
|
30
|
+
const useLayoutEffectImpl = lexical.CAN_USE_DOM ? React.useLayoutEffect : React.useEffect;
|
|
62
31
|
|
|
63
32
|
/**
|
|
64
33
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
@@ -419,9 +388,9 @@ function setContainerDivAttributes(containerDiv, className) {
|
|
|
419
388
|
containerDiv.style.display = 'block';
|
|
420
389
|
containerDiv.style.position = 'absolute';
|
|
421
390
|
}
|
|
422
|
-
function useMenuAnchorRef(resolution, setResolution, className, parent = CAN_USE_DOM ? document.body : undefined, shouldIncludePageYOffset__EXPERIMENTAL = true) {
|
|
391
|
+
function useMenuAnchorRef(resolution, setResolution, className, parent = lexical.CAN_USE_DOM ? document.body : undefined, shouldIncludePageYOffset__EXPERIMENTAL = true) {
|
|
423
392
|
const [editor] = LexicalComposerContext.useLexicalComposerContext();
|
|
424
|
-
const initialAnchorElement = CAN_USE_DOM ? document.createElement('div') : null;
|
|
393
|
+
const initialAnchorElement = lexical.CAN_USE_DOM ? document.createElement('div') : null;
|
|
425
394
|
const anchorElementRef = React.useRef(initialAnchorElement);
|
|
426
395
|
const positionMenu = React.useCallback(() => {
|
|
427
396
|
if (anchorElementRef.current === null || parent === undefined) {
|
|
@@ -500,6 +469,27 @@ function useMenuAnchorRef(resolution, setResolution, className, parent = CAN_USE
|
|
|
500
469
|
return anchorElementRef;
|
|
501
470
|
}
|
|
502
471
|
|
|
472
|
+
/**
|
|
473
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
474
|
+
*
|
|
475
|
+
* This source code is licensed under the MIT license found in the
|
|
476
|
+
* LICENSE file in the root directory of this source tree.
|
|
477
|
+
*
|
|
478
|
+
*/
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
// Webpack + React 17 fails to compile on the usage of `React.startTransition` or
|
|
482
|
+
// `React["startTransition"]` even if it's behind a feature detection of
|
|
483
|
+
// `"startTransition" in React`. Moving this to a constant avoids the issue :/
|
|
484
|
+
const START_TRANSITION = 'startTransition';
|
|
485
|
+
function startTransition(callback) {
|
|
486
|
+
if (START_TRANSITION in React) {
|
|
487
|
+
React[START_TRANSITION](callback);
|
|
488
|
+
} else {
|
|
489
|
+
callback();
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
|
|
503
493
|
/**
|
|
504
494
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
505
495
|
*
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
10
|
-
import { createCommand, COMMAND_PRIORITY_LOW, KEY_ARROW_DOWN_COMMAND, KEY_ARROW_UP_COMMAND, KEY_ESCAPE_COMMAND, KEY_TAB_COMMAND, KEY_ENTER_COMMAND, $getSelection, $isRangeSelection, $getNodeByKey } from 'lexical';
|
|
10
|
+
import { CAN_USE_DOM, createCommand, COMMAND_PRIORITY_LOW, KEY_ARROW_DOWN_COMMAND, KEY_ARROW_UP_COMMAND, KEY_ESCAPE_COMMAND, KEY_TAB_COMMAND, KEY_ENTER_COMMAND, $getSelection, $isRangeSelection, $getNodeByKey } from 'lexical';
|
|
11
11
|
import React, { useLayoutEffect, useEffect, useRef, useCallback, useState, useMemo } from 'react';
|
|
12
12
|
import { mergeRegister } from '@lexical/utils';
|
|
13
13
|
import ReactDOM from 'react-dom';
|
|
@@ -22,37 +22,6 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
// Webpack + React 17 fails to compile on the usage of `React.startTransition` or
|
|
26
|
-
// `React["startTransition"]` even if it's behind a feature detection of
|
|
27
|
-
// `"startTransition" in React`. Moving this to a constant avoids the issue :/
|
|
28
|
-
const START_TRANSITION = 'startTransition';
|
|
29
|
-
function startTransition(callback) {
|
|
30
|
-
if (START_TRANSITION in React) {
|
|
31
|
-
React[START_TRANSITION](callback);
|
|
32
|
-
} else {
|
|
33
|
-
callback();
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
-
*
|
|
40
|
-
* This source code is licensed under the MIT license found in the
|
|
41
|
-
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
49
|
-
*
|
|
50
|
-
* This source code is licensed under the MIT license found in the
|
|
51
|
-
* LICENSE file in the root directory of this source tree.
|
|
52
|
-
*
|
|
53
|
-
*/
|
|
54
|
-
|
|
55
|
-
|
|
56
25
|
// This workaround is no longer necessary in React 19,
|
|
57
26
|
// but we currently support React >=17.x
|
|
58
27
|
// https://github.com/facebook/react/pull/26395
|
|
@@ -498,6 +467,27 @@ function useMenuAnchorRef(resolution, setResolution, className, parent = CAN_USE
|
|
|
498
467
|
return anchorElementRef;
|
|
499
468
|
}
|
|
500
469
|
|
|
470
|
+
/**
|
|
471
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
472
|
+
*
|
|
473
|
+
* This source code is licensed under the MIT license found in the
|
|
474
|
+
* LICENSE file in the root directory of this source tree.
|
|
475
|
+
*
|
|
476
|
+
*/
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
// Webpack + React 17 fails to compile on the usage of `React.startTransition` or
|
|
480
|
+
// `React["startTransition"]` even if it's behind a feature detection of
|
|
481
|
+
// `"startTransition" in React`. Moving this to a constant avoids the issue :/
|
|
482
|
+
const START_TRANSITION = 'startTransition';
|
|
483
|
+
function startTransition(callback) {
|
|
484
|
+
if (START_TRANSITION in React) {
|
|
485
|
+
React[START_TRANSITION](callback);
|
|
486
|
+
} else {
|
|
487
|
+
callback();
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
|
|
501
491
|
/**
|
|
502
492
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
503
493
|
*
|