zurfyx-lexical-react 0.39.1-nightly.20251225.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 +90 -0
- package/dist/ExtensionComponent.d.ts +42 -0
- package/dist/LexicalAutoEmbedPlugin.d.ts +39 -0
- package/dist/LexicalAutoEmbedPlugin.dev.js +146 -0
- package/dist/LexicalAutoEmbedPlugin.dev.mjs +141 -0
- package/dist/LexicalAutoEmbedPlugin.js +11 -0
- package/dist/LexicalAutoEmbedPlugin.mjs +15 -0
- package/dist/LexicalAutoEmbedPlugin.node.mjs +13 -0
- package/dist/LexicalAutoEmbedPlugin.prod.js +9 -0
- package/dist/LexicalAutoEmbedPlugin.prod.mjs +9 -0
- package/dist/LexicalAutoFocusPlugin.d.ts +12 -0
- package/dist/LexicalAutoFocusPlugin.dev.js +47 -0
- package/dist/LexicalAutoFocusPlugin.dev.mjs +45 -0
- package/dist/LexicalAutoFocusPlugin.js +11 -0
- package/dist/LexicalAutoFocusPlugin.mjs +12 -0
- package/dist/LexicalAutoFocusPlugin.node.mjs +10 -0
- package/dist/LexicalAutoFocusPlugin.prod.js +9 -0
- package/dist/LexicalAutoFocusPlugin.prod.mjs +9 -0
- package/dist/LexicalAutoLinkPlugin.d.ts +14 -0
- package/dist/LexicalAutoLinkPlugin.dev.js +54 -0
- package/dist/LexicalAutoLinkPlugin.dev.mjs +52 -0
- package/dist/LexicalAutoLinkPlugin.js +11 -0
- package/dist/LexicalAutoLinkPlugin.mjs +13 -0
- package/dist/LexicalAutoLinkPlugin.node.mjs +11 -0
- package/dist/LexicalAutoLinkPlugin.prod.js +9 -0
- package/dist/LexicalAutoLinkPlugin.prod.mjs +9 -0
- package/dist/LexicalBlockWithAlignableContents.d.ts +21 -0
- package/dist/LexicalBlockWithAlignableContents.dev.js +81 -0
- package/dist/LexicalBlockWithAlignableContents.dev.mjs +79 -0
- package/dist/LexicalBlockWithAlignableContents.js +11 -0
- package/dist/LexicalBlockWithAlignableContents.mjs +12 -0
- package/dist/LexicalBlockWithAlignableContents.node.mjs +10 -0
- package/dist/LexicalBlockWithAlignableContents.prod.js +9 -0
- package/dist/LexicalBlockWithAlignableContents.prod.mjs +9 -0
- package/dist/LexicalCharacterLimitPlugin.d.ts +15 -0
- package/dist/LexicalCharacterLimitPlugin.dev.js +292 -0
- package/dist/LexicalCharacterLimitPlugin.dev.mjs +290 -0
- package/dist/LexicalCharacterLimitPlugin.js +11 -0
- package/dist/LexicalCharacterLimitPlugin.mjs +12 -0
- package/dist/LexicalCharacterLimitPlugin.node.mjs +10 -0
- package/dist/LexicalCharacterLimitPlugin.prod.js +9 -0
- package/dist/LexicalCharacterLimitPlugin.prod.mjs +9 -0
- package/dist/LexicalCheckListPlugin.d.ts +8 -0
- package/dist/LexicalCheckListPlugin.dev.js +31 -0
- package/dist/LexicalCheckListPlugin.dev.mjs +29 -0
- package/dist/LexicalCheckListPlugin.js +11 -0
- package/dist/LexicalCheckListPlugin.mjs +12 -0
- package/dist/LexicalCheckListPlugin.node.mjs +10 -0
- package/dist/LexicalCheckListPlugin.prod.js +9 -0
- package/dist/LexicalCheckListPlugin.prod.mjs +9 -0
- package/dist/LexicalClearEditorPlugin.d.ts +13 -0
- package/dist/LexicalClearEditorPlugin.dev.js +55 -0
- package/dist/LexicalClearEditorPlugin.dev.mjs +53 -0
- package/dist/LexicalClearEditorPlugin.js +11 -0
- package/dist/LexicalClearEditorPlugin.mjs +12 -0
- package/dist/LexicalClearEditorPlugin.node.mjs +10 -0
- package/dist/LexicalClearEditorPlugin.prod.js +9 -0
- package/dist/LexicalClearEditorPlugin.prod.mjs +9 -0
- package/dist/LexicalClickableLinkPlugin.d.ts +11 -0
- package/dist/LexicalClickableLinkPlugin.dev.js +38 -0
- package/dist/LexicalClickableLinkPlugin.dev.mjs +36 -0
- package/dist/LexicalClickableLinkPlugin.js +11 -0
- package/dist/LexicalClickableLinkPlugin.mjs +12 -0
- package/dist/LexicalClickableLinkPlugin.node.mjs +10 -0
- package/dist/LexicalClickableLinkPlugin.prod.js +9 -0
- package/dist/LexicalClickableLinkPlugin.prod.mjs +9 -0
- package/dist/LexicalCollaborationContext.d.ts +19 -0
- package/dist/LexicalCollaborationContext.dev.js +69 -0
- package/dist/LexicalCollaborationContext.dev.mjs +65 -0
- package/dist/LexicalCollaborationContext.js +11 -0
- package/dist/LexicalCollaborationContext.mjs +14 -0
- package/dist/LexicalCollaborationContext.node.mjs +12 -0
- package/dist/LexicalCollaborationContext.prod.js +9 -0
- package/dist/LexicalCollaborationContext.prod.mjs +9 -0
- package/dist/LexicalCollaborationPlugin.d.ts +39 -0
- package/dist/LexicalCollaborationPlugin.dev.js +558 -0
- package/dist/LexicalCollaborationPlugin.dev.mjs +543 -0
- package/dist/LexicalCollaborationPlugin.js +11 -0
- package/dist/LexicalCollaborationPlugin.mjs +13 -0
- package/dist/LexicalCollaborationPlugin.node.mjs +11 -0
- package/dist/LexicalCollaborationPlugin.prod.js +9 -0
- package/dist/LexicalCollaborationPlugin.prod.mjs +9 -0
- package/dist/LexicalComposer.d.ts +25 -0
- package/dist/LexicalComposer.dev.js +134 -0
- package/dist/LexicalComposer.dev.mjs +132 -0
- package/dist/LexicalComposer.js +11 -0
- package/dist/LexicalComposer.mjs +12 -0
- package/dist/LexicalComposer.node.mjs +10 -0
- package/dist/LexicalComposer.prod.js +9 -0
- package/dist/LexicalComposer.prod.mjs +9 -0
- package/dist/LexicalComposerContext.d.ts +18 -0
- package/dist/LexicalComposerContext.dev.js +55 -0
- package/dist/LexicalComposerContext.dev.mjs +51 -0
- package/dist/LexicalComposerContext.js +11 -0
- package/dist/LexicalComposerContext.mjs +14 -0
- package/dist/LexicalComposerContext.node.mjs +12 -0
- package/dist/LexicalComposerContext.prod.js +9 -0
- package/dist/LexicalComposerContext.prod.mjs +9 -0
- package/dist/LexicalContentEditable.d.ts +26 -0
- package/dist/LexicalContentEditable.dev.js +242 -0
- package/dist/LexicalContentEditable.dev.mjs +239 -0
- package/dist/LexicalContentEditable.js +11 -0
- package/dist/LexicalContentEditable.mjs +13 -0
- package/dist/LexicalContentEditable.node.mjs +11 -0
- package/dist/LexicalContentEditable.prod.js +9 -0
- package/dist/LexicalContentEditable.prod.mjs +9 -0
- package/dist/LexicalContextMenuPlugin.d.ts +36 -0
- package/dist/LexicalContextMenuPlugin.dev.js +524 -0
- package/dist/LexicalContextMenuPlugin.dev.mjs +509 -0
- package/dist/LexicalContextMenuPlugin.js +11 -0
- package/dist/LexicalContextMenuPlugin.mjs +13 -0
- package/dist/LexicalContextMenuPlugin.node.mjs +11 -0
- package/dist/LexicalContextMenuPlugin.prod.js +9 -0
- package/dist/LexicalContextMenuPlugin.prod.mjs +9 -0
- package/dist/LexicalDecoratorBlockNode.d.ts +25 -0
- package/dist/LexicalDecoratorBlockNode.dev.js +59 -0
- package/dist/LexicalDecoratorBlockNode.dev.mjs +56 -0
- package/dist/LexicalDecoratorBlockNode.js +11 -0
- package/dist/LexicalDecoratorBlockNode.mjs +13 -0
- package/dist/LexicalDecoratorBlockNode.node.mjs +11 -0
- package/dist/LexicalDecoratorBlockNode.prod.js +9 -0
- package/dist/LexicalDecoratorBlockNode.prod.mjs +9 -0
- package/dist/LexicalDraggableBlockPlugin.d.ts +18 -0
- package/dist/LexicalDraggableBlockPlugin.dev.js +534 -0
- package/dist/LexicalDraggableBlockPlugin.dev.mjs +532 -0
- package/dist/LexicalDraggableBlockPlugin.js +11 -0
- package/dist/LexicalDraggableBlockPlugin.mjs +12 -0
- package/dist/LexicalDraggableBlockPlugin.node.mjs +10 -0
- package/dist/LexicalDraggableBlockPlugin.prod.js +9 -0
- package/dist/LexicalDraggableBlockPlugin.prod.mjs +9 -0
- package/dist/LexicalEditorRefPlugin.d.ts +20 -0
- package/dist/LexicalEditorRefPlugin.dev.js +58 -0
- package/dist/LexicalEditorRefPlugin.dev.mjs +43 -0
- package/dist/LexicalEditorRefPlugin.js +11 -0
- package/dist/LexicalEditorRefPlugin.mjs +12 -0
- package/dist/LexicalEditorRefPlugin.node.mjs +10 -0
- package/dist/LexicalEditorRefPlugin.prod.js +9 -0
- package/dist/LexicalEditorRefPlugin.prod.mjs +9 -0
- package/dist/LexicalErrorBoundary.d.ts +13 -0
- package/dist/LexicalErrorBoundary.dev.js +40 -0
- package/dist/LexicalErrorBoundary.dev.mjs +38 -0
- package/dist/LexicalErrorBoundary.js +11 -0
- package/dist/LexicalErrorBoundary.mjs +12 -0
- package/dist/LexicalErrorBoundary.node.mjs +10 -0
- package/dist/LexicalErrorBoundary.prod.js +9 -0
- package/dist/LexicalErrorBoundary.prod.mjs +9 -0
- package/dist/LexicalExtensionComponent.dev.js +53 -0
- package/dist/LexicalExtensionComponent.dev.mjs +51 -0
- package/dist/LexicalExtensionComponent.js +11 -0
- package/dist/LexicalExtensionComponent.mjs +12 -0
- package/dist/LexicalExtensionComponent.node.mjs +10 -0
- package/dist/LexicalExtensionComponent.prod.js +9 -0
- package/dist/LexicalExtensionComponent.prod.mjs +9 -0
- package/dist/LexicalExtensionComposer.d.ts +69 -0
- package/dist/LexicalExtensionComposer.dev.js +105 -0
- package/dist/LexicalExtensionComposer.dev.mjs +103 -0
- package/dist/LexicalExtensionComposer.js +11 -0
- package/dist/LexicalExtensionComposer.mjs +12 -0
- package/dist/LexicalExtensionComposer.node.mjs +10 -0
- package/dist/LexicalExtensionComposer.prod.js +9 -0
- package/dist/LexicalExtensionComposer.prod.mjs +9 -0
- package/dist/LexicalHashtagPlugin.d.ts +9 -0
- package/dist/LexicalHashtagPlugin.dev.js +34 -0
- package/dist/LexicalHashtagPlugin.dev.mjs +32 -0
- package/dist/LexicalHashtagPlugin.js +11 -0
- package/dist/LexicalHashtagPlugin.mjs +12 -0
- package/dist/LexicalHashtagPlugin.node.mjs +10 -0
- package/dist/LexicalHashtagPlugin.prod.js +9 -0
- package/dist/LexicalHashtagPlugin.prod.mjs +9 -0
- package/dist/LexicalHistoryPlugin.d.ts +14 -0
- package/dist/LexicalHistoryPlugin.dev.js +48 -0
- package/dist/LexicalHistoryPlugin.dev.mjs +46 -0
- package/dist/LexicalHistoryPlugin.js +11 -0
- package/dist/LexicalHistoryPlugin.mjs +13 -0
- package/dist/LexicalHistoryPlugin.node.mjs +11 -0
- package/dist/LexicalHistoryPlugin.prod.js +9 -0
- package/dist/LexicalHistoryPlugin.prod.mjs +9 -0
- package/dist/LexicalHorizontalRuleNode.d.ts +25 -0
- package/dist/LexicalHorizontalRuleNode.dev.js +102 -0
- package/dist/LexicalHorizontalRuleNode.dev.mjs +98 -0
- package/dist/LexicalHorizontalRuleNode.js +11 -0
- package/dist/LexicalHorizontalRuleNode.mjs +15 -0
- package/dist/LexicalHorizontalRuleNode.node.mjs +13 -0
- package/dist/LexicalHorizontalRuleNode.prod.js +9 -0
- package/dist/LexicalHorizontalRuleNode.prod.mjs +9 -0
- package/dist/LexicalHorizontalRulePlugin.d.ts +8 -0
- package/dist/LexicalHorizontalRulePlugin.dev.js +44 -0
- package/dist/LexicalHorizontalRulePlugin.dev.mjs +42 -0
- package/dist/LexicalHorizontalRulePlugin.js +11 -0
- package/dist/LexicalHorizontalRulePlugin.mjs +12 -0
- package/dist/LexicalHorizontalRulePlugin.node.mjs +10 -0
- package/dist/LexicalHorizontalRulePlugin.prod.js +9 -0
- package/dist/LexicalHorizontalRulePlugin.prod.mjs +9 -0
- package/dist/LexicalLinkPlugin.d.ts +14 -0
- package/dist/LexicalLinkPlugin.dev.js +43 -0
- package/dist/LexicalLinkPlugin.dev.mjs +41 -0
- package/dist/LexicalLinkPlugin.js +11 -0
- package/dist/LexicalLinkPlugin.mjs +12 -0
- package/dist/LexicalLinkPlugin.node.mjs +10 -0
- package/dist/LexicalLinkPlugin.prod.js +9 -0
- package/dist/LexicalLinkPlugin.prod.mjs +9 -0
- package/dist/LexicalListPlugin.d.ts +15 -0
- package/dist/LexicalListPlugin.dev.js +56 -0
- package/dist/LexicalListPlugin.dev.mjs +54 -0
- package/dist/LexicalListPlugin.js +11 -0
- package/dist/LexicalListPlugin.mjs +12 -0
- package/dist/LexicalListPlugin.node.mjs +10 -0
- package/dist/LexicalListPlugin.prod.js +9 -0
- package/dist/LexicalListPlugin.prod.mjs +9 -0
- package/dist/LexicalMarkdownShortcutPlugin.d.ts +12 -0
- package/dist/LexicalMarkdownShortcutPlugin.dev.js +55 -0
- package/dist/LexicalMarkdownShortcutPlugin.dev.mjs +52 -0
- package/dist/LexicalMarkdownShortcutPlugin.js +11 -0
- package/dist/LexicalMarkdownShortcutPlugin.mjs +13 -0
- package/dist/LexicalMarkdownShortcutPlugin.node.mjs +11 -0
- package/dist/LexicalMarkdownShortcutPlugin.prod.js +9 -0
- package/dist/LexicalMarkdownShortcutPlugin.prod.mjs +9 -0
- package/dist/LexicalNestedComposer.d.ts +57 -0
- package/dist/LexicalNestedComposer.dev.js +161 -0
- package/dist/LexicalNestedComposer.dev.mjs +159 -0
- package/dist/LexicalNestedComposer.js +11 -0
- package/dist/LexicalNestedComposer.mjs +12 -0
- package/dist/LexicalNestedComposer.node.mjs +10 -0
- package/dist/LexicalNestedComposer.prod.js +9 -0
- package/dist/LexicalNestedComposer.prod.mjs +9 -0
- package/dist/LexicalNodeContextMenuPlugin.d.ts +46 -0
- package/dist/LexicalNodeContextMenuPlugin.dev.js +257 -0
- package/dist/LexicalNodeContextMenuPlugin.dev.mjs +253 -0
- package/dist/LexicalNodeContextMenuPlugin.js +11 -0
- package/dist/LexicalNodeContextMenuPlugin.mjs +14 -0
- package/dist/LexicalNodeContextMenuPlugin.node.mjs +12 -0
- package/dist/LexicalNodeContextMenuPlugin.prod.js +9 -0
- package/dist/LexicalNodeContextMenuPlugin.prod.mjs +9 -0
- package/dist/LexicalNodeEventPlugin.d.ts +13 -0
- package/dist/LexicalNodeEventPlugin.dev.js +61 -0
- package/dist/LexicalNodeEventPlugin.dev.mjs +59 -0
- package/dist/LexicalNodeEventPlugin.js +11 -0
- package/dist/LexicalNodeEventPlugin.mjs +12 -0
- package/dist/LexicalNodeEventPlugin.node.mjs +10 -0
- package/dist/LexicalNodeEventPlugin.prod.js +9 -0
- package/dist/LexicalNodeEventPlugin.prod.mjs +9 -0
- package/dist/LexicalNodeMenuPlugin.d.ts +24 -0
- package/dist/LexicalNodeMenuPlugin.dev.js +527 -0
- package/dist/LexicalNodeMenuPlugin.dev.mjs +524 -0
- package/dist/LexicalNodeMenuPlugin.js +11 -0
- package/dist/LexicalNodeMenuPlugin.mjs +13 -0
- package/dist/LexicalNodeMenuPlugin.node.mjs +11 -0
- package/dist/LexicalNodeMenuPlugin.prod.js +9 -0
- package/dist/LexicalNodeMenuPlugin.prod.mjs +9 -0
- package/dist/LexicalOnChangePlugin.d.ts +13 -0
- package/dist/LexicalOnChangePlugin.dev.js +72 -0
- package/dist/LexicalOnChangePlugin.dev.mjs +70 -0
- package/dist/LexicalOnChangePlugin.js +11 -0
- package/dist/LexicalOnChangePlugin.mjs +12 -0
- package/dist/LexicalOnChangePlugin.node.mjs +10 -0
- package/dist/LexicalOnChangePlugin.prod.js +9 -0
- package/dist/LexicalOnChangePlugin.prod.mjs +9 -0
- package/dist/LexicalPlainTextPlugin.d.ts +14 -0
- package/dist/LexicalPlainTextPlugin.dev.js +235 -0
- package/dist/LexicalPlainTextPlugin.dev.mjs +233 -0
- package/dist/LexicalPlainTextPlugin.js +11 -0
- package/dist/LexicalPlainTextPlugin.mjs +12 -0
- package/dist/LexicalPlainTextPlugin.node.mjs +10 -0
- package/dist/LexicalPlainTextPlugin.prod.js +9 -0
- package/dist/LexicalPlainTextPlugin.prod.mjs +9 -0
- package/dist/LexicalReactExtension.dev.js +187 -0
- package/dist/LexicalReactExtension.dev.mjs +184 -0
- package/dist/LexicalReactExtension.js +11 -0
- package/dist/LexicalReactExtension.mjs +13 -0
- package/dist/LexicalReactExtension.node.mjs +11 -0
- package/dist/LexicalReactExtension.prod.js +9 -0
- package/dist/LexicalReactExtension.prod.mjs +9 -0
- package/dist/LexicalReactPluginHostExtension.dev.js +189 -0
- package/dist/LexicalReactPluginHostExtension.dev.mjs +181 -0
- package/dist/LexicalReactPluginHostExtension.js +11 -0
- package/dist/LexicalReactPluginHostExtension.mjs +18 -0
- package/dist/LexicalReactPluginHostExtension.node.mjs +16 -0
- package/dist/LexicalReactPluginHostExtension.prod.js +9 -0
- package/dist/LexicalReactPluginHostExtension.prod.mjs +9 -0
- package/dist/LexicalReactProviderExtension.dev.js +33 -0
- package/dist/LexicalReactProviderExtension.dev.mjs +31 -0
- package/dist/LexicalReactProviderExtension.js +11 -0
- package/dist/LexicalReactProviderExtension.mjs +12 -0
- package/dist/LexicalReactProviderExtension.node.mjs +10 -0
- package/dist/LexicalReactProviderExtension.prod.js +9 -0
- package/dist/LexicalReactProviderExtension.prod.mjs +9 -0
- package/dist/LexicalRichTextPlugin.d.ts +14 -0
- package/dist/LexicalRichTextPlugin.dev.js +235 -0
- package/dist/LexicalRichTextPlugin.dev.mjs +233 -0
- package/dist/LexicalRichTextPlugin.js +11 -0
- package/dist/LexicalRichTextPlugin.mjs +12 -0
- package/dist/LexicalRichTextPlugin.node.mjs +10 -0
- package/dist/LexicalRichTextPlugin.prod.js +9 -0
- package/dist/LexicalRichTextPlugin.prod.mjs +9 -0
- package/dist/LexicalSelectionAlwaysOnDisplay.d.ts +8 -0
- package/dist/LexicalSelectionAlwaysOnDisplay.dev.js +31 -0
- package/dist/LexicalSelectionAlwaysOnDisplay.dev.mjs +29 -0
- package/dist/LexicalSelectionAlwaysOnDisplay.js +11 -0
- package/dist/LexicalSelectionAlwaysOnDisplay.mjs +12 -0
- package/dist/LexicalSelectionAlwaysOnDisplay.node.mjs +10 -0
- package/dist/LexicalSelectionAlwaysOnDisplay.prod.js +9 -0
- package/dist/LexicalSelectionAlwaysOnDisplay.prod.mjs +9 -0
- package/dist/LexicalTabIndentationPlugin.d.ts +17 -0
- package/dist/LexicalTabIndentationPlugin.dev.js +40 -0
- package/dist/LexicalTabIndentationPlugin.dev.mjs +38 -0
- package/dist/LexicalTabIndentationPlugin.js +11 -0
- package/dist/LexicalTabIndentationPlugin.mjs +13 -0
- package/dist/LexicalTabIndentationPlugin.node.mjs +11 -0
- package/dist/LexicalTabIndentationPlugin.prod.js +9 -0
- package/dist/LexicalTabIndentationPlugin.prod.mjs +9 -0
- package/dist/LexicalTableOfContentsPlugin.d.ts +20 -0
- package/dist/LexicalTableOfContentsPlugin.dev.js +209 -0
- package/dist/LexicalTableOfContentsPlugin.dev.mjs +207 -0
- package/dist/LexicalTableOfContentsPlugin.js +11 -0
- package/dist/LexicalTableOfContentsPlugin.mjs +12 -0
- package/dist/LexicalTableOfContentsPlugin.node.mjs +10 -0
- package/dist/LexicalTableOfContentsPlugin.prod.js +9 -0
- package/dist/LexicalTableOfContentsPlugin.prod.mjs +9 -0
- package/dist/LexicalTablePlugin.d.ts +40 -0
- package/dist/LexicalTablePlugin.dev.js +77 -0
- package/dist/LexicalTablePlugin.dev.mjs +75 -0
- package/dist/LexicalTablePlugin.js +11 -0
- package/dist/LexicalTablePlugin.mjs +12 -0
- package/dist/LexicalTablePlugin.node.mjs +10 -0
- package/dist/LexicalTablePlugin.prod.js +9 -0
- package/dist/LexicalTablePlugin.prod.mjs +9 -0
- package/dist/LexicalTreeView.d.ts +37 -0
- package/dist/LexicalTreeView.dev.js +105 -0
- package/dist/LexicalTreeView.dev.mjs +91 -0
- package/dist/LexicalTreeView.js +11 -0
- package/dist/LexicalTreeView.mjs +12 -0
- package/dist/LexicalTreeView.node.mjs +10 -0
- package/dist/LexicalTreeView.prod.js +9 -0
- package/dist/LexicalTreeView.prod.mjs +9 -0
- package/dist/LexicalTreeViewExtension.dev.js +57 -0
- package/dist/LexicalTreeViewExtension.dev.mjs +54 -0
- package/dist/LexicalTreeViewExtension.js +11 -0
- package/dist/LexicalTreeViewExtension.mjs +13 -0
- package/dist/LexicalTreeViewExtension.node.mjs +11 -0
- package/dist/LexicalTreeViewExtension.prod.js +9 -0
- package/dist/LexicalTreeViewExtension.prod.mjs +9 -0
- package/dist/LexicalTypeaheadMenuPlugin.d.ts +40 -0
- package/dist/LexicalTypeaheadMenuPlugin.dev.js +654 -0
- package/dist/LexicalTypeaheadMenuPlugin.dev.mjs +646 -0
- package/dist/LexicalTypeaheadMenuPlugin.js +11 -0
- package/dist/LexicalTypeaheadMenuPlugin.mjs +18 -0
- package/dist/LexicalTypeaheadMenuPlugin.node.mjs +16 -0
- package/dist/LexicalTypeaheadMenuPlugin.prod.js +9 -0
- package/dist/LexicalTypeaheadMenuPlugin.prod.mjs +9 -0
- package/dist/ReactExtension.d.ts +41 -0
- package/dist/ReactPluginHostExtension.d.ts +56 -0
- package/dist/ReactProviderExtension.d.ts +9 -0
- package/dist/TreeViewExtension.d.ts +18 -0
- package/dist/shared/LegacyDecorators.d.ts +23 -0
- package/dist/shared/LexicalContentEditableElement.d.ts +43 -0
- package/dist/shared/LexicalMenu.d.ts +52 -0
- package/dist/shared/buildEditorComponent.d.ts +11 -0
- package/dist/shared/mergeRefs.d.ts +9 -0
- package/dist/shared/point.d.ts +21 -0
- package/dist/shared/rect.d.ts +45 -0
- package/dist/shared/types.d.ts +89 -0
- package/dist/shared/useCanShowPlaceholder.d.ts +9 -0
- package/dist/shared/useCharacterLimit.d.ts +16 -0
- package/dist/shared/useDecorators.d.ts +17 -0
- package/dist/shared/useHistory.d.ts +10 -0
- package/dist/shared/useList.d.ts +9 -0
- package/dist/shared/usePlainTextSetup.d.ts +9 -0
- package/dist/shared/useReactDecorators.d.ts +12 -0
- package/dist/shared/useRichTextSetup.d.ts +9 -0
- package/dist/shared/useYjsCollaboration.d.ts +25 -0
- package/dist/useExtensionComponent.d.ts +10 -0
- package/dist/useLexicalEditable.d.ts +16 -0
- package/dist/useLexicalEditable.dev.js +102 -0
- package/dist/useLexicalEditable.dev.mjs +100 -0
- package/dist/useLexicalEditable.js +11 -0
- package/dist/useLexicalEditable.mjs +12 -0
- package/dist/useLexicalEditable.node.mjs +10 -0
- package/dist/useLexicalEditable.prod.js +9 -0
- package/dist/useLexicalEditable.prod.mjs +9 -0
- package/dist/useLexicalExtensionComponent.dev.js +37 -0
- package/dist/useLexicalExtensionComponent.dev.mjs +34 -0
- package/dist/useLexicalExtensionComponent.js +11 -0
- package/dist/useLexicalExtensionComponent.mjs +13 -0
- package/dist/useLexicalExtensionComponent.node.mjs +11 -0
- package/dist/useLexicalExtensionComponent.prod.js +9 -0
- package/dist/useLexicalExtensionComponent.prod.mjs +9 -0
- package/dist/useLexicalIsTextContentEmpty.d.ts +9 -0
- package/dist/useLexicalIsTextContentEmpty.dev.js +60 -0
- package/dist/useLexicalIsTextContentEmpty.dev.mjs +58 -0
- package/dist/useLexicalIsTextContentEmpty.js +11 -0
- package/dist/useLexicalIsTextContentEmpty.mjs +12 -0
- package/dist/useLexicalIsTextContentEmpty.node.mjs +10 -0
- package/dist/useLexicalIsTextContentEmpty.prod.js +9 -0
- package/dist/useLexicalIsTextContentEmpty.prod.mjs +9 -0
- package/dist/useLexicalNodeSelection.d.ts +24 -0
- package/dist/useLexicalNodeSelection.dev.js +102 -0
- package/dist/useLexicalNodeSelection.dev.mjs +100 -0
- package/dist/useLexicalNodeSelection.js +11 -0
- package/dist/useLexicalNodeSelection.mjs +12 -0
- package/dist/useLexicalNodeSelection.node.mjs +10 -0
- package/dist/useLexicalNodeSelection.prod.js +9 -0
- package/dist/useLexicalNodeSelection.prod.mjs +9 -0
- package/dist/useLexicalSubscription.d.ts +17 -0
- package/dist/useLexicalSubscription.dev.js +73 -0
- package/dist/useLexicalSubscription.dev.mjs +71 -0
- package/dist/useLexicalSubscription.js +11 -0
- package/dist/useLexicalSubscription.mjs +12 -0
- package/dist/useLexicalSubscription.node.mjs +10 -0
- package/dist/useLexicalSubscription.prod.js +9 -0
- package/dist/useLexicalSubscription.prod.mjs +9 -0
- package/dist/useLexicalTextEntity.d.ts +10 -0
- package/dist/useLexicalTextEntity.dev.js +31 -0
- package/dist/useLexicalTextEntity.dev.mjs +29 -0
- package/dist/useLexicalTextEntity.js +11 -0
- package/dist/useLexicalTextEntity.mjs +12 -0
- package/dist/useLexicalTextEntity.node.mjs +10 -0
- package/dist/useLexicalTextEntity.prod.js +9 -0
- package/dist/useLexicalTextEntity.prod.mjs +9 -0
- package/flow/LexicalAutoEmbedPlugin.js.flow +64 -0
- package/flow/LexicalAutoFocusPlugin.js.flow +14 -0
- package/flow/LexicalAutoLinkPlugin.js.flow +18 -0
- package/flow/LexicalBlockWithAlignableContents.js.flow +28 -0
- package/flow/LexicalCharacterLimitPlugin.js.flow +12 -0
- package/flow/LexicalCheckListPlugin.js.flow +10 -0
- package/flow/LexicalClearEditorPlugin.js.flow +14 -0
- package/flow/LexicalClickableLinkPlugin.js.flow +12 -0
- package/flow/LexicalCollaborationContext.js.flow +22 -0
- package/flow/LexicalCollaborationPlugin.js.flow +50 -0
- package/flow/LexicalComposer.js.flow +40 -0
- package/flow/LexicalComposerContext.js.flow +27 -0
- package/flow/LexicalContentEditable.js.flow +80 -0
- package/flow/LexicalContextMenuPlugin.js.flow +13 -0
- package/flow/LexicalDecoratorBlockNode.js.flow +35 -0
- package/flow/LexicalDraggableBlockPlugin.js.flow +24 -0
- package/flow/LexicalEditorRefPlugin.js.flow +19 -0
- package/flow/LexicalErrorBoundary.js.flow +17 -0
- package/flow/LexicalExtensionComponent.js.flow +12 -0
- package/flow/LexicalExtensionComposer.js.flow +20 -0
- package/flow/LexicalHashtagPlugin.js.flow +10 -0
- package/flow/LexicalHistoryPlugin.js.flow +28 -0
- package/flow/LexicalHorizontalRuleNode.js.flow +27 -0
- package/flow/LexicalHorizontalRulePlugin.js.flow +12 -0
- package/flow/LexicalLinkPlugin.js.flow +21 -0
- package/flow/LexicalListPlugin.js.flow +15 -0
- package/flow/LexicalMarkdownShortcutPlugin.js.flow +16 -0
- package/flow/LexicalNestedComposer.js.flow +26 -0
- package/flow/LexicalNodeContextMenuPlugin.js.flow +12 -0
- package/flow/LexicalNodeEventPlugin.js.flow +20 -0
- package/flow/LexicalNodeMenuPlugin.js.flow +64 -0
- package/flow/LexicalOnChangePlugin.js.flow +16 -0
- package/flow/LexicalPlainTextPlugin.js.flow +29 -0
- package/flow/LexicalReactExtension.js.flow +68 -0
- package/flow/LexicalReactPluginHostExtension.js.flow +84 -0
- package/flow/LexicalReactProviderExtension.js.flow +12 -0
- package/flow/LexicalRichTextPlugin.js.flow +29 -0
- package/flow/LexicalSelectionAlwaysOnDisplay.js.flow +13 -0
- package/flow/LexicalTabIndentationPlugin.js.flow +21 -0
- package/flow/LexicalTableOfContentsPlugin.js.flow +18 -0
- package/flow/LexicalTablePlugin.js.flow +15 -0
- package/flow/LexicalTreeView.js.flow +21 -0
- package/flow/LexicalTreeViewExtension.js.flow +12 -0
- package/flow/LexicalTypeaheadMenuPlugin.js.flow +83 -0
- package/flow/useLexicalEditable.js.flow +12 -0
- package/flow/useLexicalExtensionComponent.js.flow +12 -0
- package/flow/useLexicalIsTextContentEmpty.js.flow +15 -0
- package/flow/useLexicalNodeSelection.js.flow +14 -0
- package/flow/useLexicalSubscription.js.flow +19 -0
- package/flow/useLexicalTextEntity.js.flow +18 -0
- package/npm/ExtensionComponent.d.ts +42 -0
- package/npm/LICENSE +21 -0
- package/npm/LexicalAutoEmbedPlugin.d.ts +39 -0
- package/npm/LexicalAutoEmbedPlugin.dev.js +146 -0
- package/npm/LexicalAutoEmbedPlugin.dev.mjs +141 -0
- package/npm/LexicalAutoEmbedPlugin.js +11 -0
- package/npm/LexicalAutoEmbedPlugin.js.flow +64 -0
- package/npm/LexicalAutoEmbedPlugin.mjs +15 -0
- package/npm/LexicalAutoEmbedPlugin.node.mjs +13 -0
- package/npm/LexicalAutoEmbedPlugin.prod.js +9 -0
- package/npm/LexicalAutoEmbedPlugin.prod.mjs +9 -0
- package/npm/LexicalAutoFocusPlugin.d.ts +12 -0
- package/npm/LexicalAutoFocusPlugin.dev.js +47 -0
- package/npm/LexicalAutoFocusPlugin.dev.mjs +45 -0
- package/npm/LexicalAutoFocusPlugin.js +11 -0
- package/npm/LexicalAutoFocusPlugin.js.flow +14 -0
- package/npm/LexicalAutoFocusPlugin.mjs +12 -0
- package/npm/LexicalAutoFocusPlugin.node.mjs +10 -0
- package/npm/LexicalAutoFocusPlugin.prod.js +9 -0
- package/npm/LexicalAutoFocusPlugin.prod.mjs +9 -0
- package/npm/LexicalAutoLinkPlugin.d.ts +14 -0
- package/npm/LexicalAutoLinkPlugin.dev.js +54 -0
- package/npm/LexicalAutoLinkPlugin.dev.mjs +52 -0
- package/npm/LexicalAutoLinkPlugin.js +11 -0
- package/npm/LexicalAutoLinkPlugin.js.flow +18 -0
- package/npm/LexicalAutoLinkPlugin.mjs +13 -0
- package/npm/LexicalAutoLinkPlugin.node.mjs +11 -0
- package/npm/LexicalAutoLinkPlugin.prod.js +9 -0
- package/npm/LexicalAutoLinkPlugin.prod.mjs +9 -0
- package/npm/LexicalBlockWithAlignableContents.d.ts +21 -0
- package/npm/LexicalBlockWithAlignableContents.dev.js +81 -0
- package/npm/LexicalBlockWithAlignableContents.dev.mjs +79 -0
- package/npm/LexicalBlockWithAlignableContents.js +11 -0
- package/npm/LexicalBlockWithAlignableContents.js.flow +28 -0
- package/npm/LexicalBlockWithAlignableContents.mjs +12 -0
- package/npm/LexicalBlockWithAlignableContents.node.mjs +10 -0
- package/npm/LexicalBlockWithAlignableContents.prod.js +9 -0
- package/npm/LexicalBlockWithAlignableContents.prod.mjs +9 -0
- package/npm/LexicalCharacterLimitPlugin.d.ts +15 -0
- package/npm/LexicalCharacterLimitPlugin.dev.js +292 -0
- package/npm/LexicalCharacterLimitPlugin.dev.mjs +290 -0
- package/npm/LexicalCharacterLimitPlugin.js +11 -0
- package/npm/LexicalCharacterLimitPlugin.js.flow +12 -0
- package/npm/LexicalCharacterLimitPlugin.mjs +12 -0
- package/npm/LexicalCharacterLimitPlugin.node.mjs +10 -0
- package/npm/LexicalCharacterLimitPlugin.prod.js +9 -0
- package/npm/LexicalCharacterLimitPlugin.prod.mjs +9 -0
- package/npm/LexicalCheckListPlugin.d.ts +8 -0
- package/npm/LexicalCheckListPlugin.dev.js +31 -0
- package/npm/LexicalCheckListPlugin.dev.mjs +29 -0
- package/npm/LexicalCheckListPlugin.js +11 -0
- package/npm/LexicalCheckListPlugin.js.flow +10 -0
- package/npm/LexicalCheckListPlugin.mjs +12 -0
- package/npm/LexicalCheckListPlugin.node.mjs +10 -0
- package/npm/LexicalCheckListPlugin.prod.js +9 -0
- package/npm/LexicalCheckListPlugin.prod.mjs +9 -0
- package/npm/LexicalClearEditorPlugin.d.ts +13 -0
- package/npm/LexicalClearEditorPlugin.dev.js +55 -0
- package/npm/LexicalClearEditorPlugin.dev.mjs +53 -0
- package/npm/LexicalClearEditorPlugin.js +11 -0
- package/npm/LexicalClearEditorPlugin.js.flow +14 -0
- package/npm/LexicalClearEditorPlugin.mjs +12 -0
- package/npm/LexicalClearEditorPlugin.node.mjs +10 -0
- package/npm/LexicalClearEditorPlugin.prod.js +9 -0
- package/npm/LexicalClearEditorPlugin.prod.mjs +9 -0
- package/npm/LexicalClickableLinkPlugin.d.ts +11 -0
- package/npm/LexicalClickableLinkPlugin.dev.js +38 -0
- package/npm/LexicalClickableLinkPlugin.dev.mjs +36 -0
- package/npm/LexicalClickableLinkPlugin.js +11 -0
- package/npm/LexicalClickableLinkPlugin.js.flow +12 -0
- package/npm/LexicalClickableLinkPlugin.mjs +12 -0
- package/npm/LexicalClickableLinkPlugin.node.mjs +10 -0
- package/npm/LexicalClickableLinkPlugin.prod.js +9 -0
- package/npm/LexicalClickableLinkPlugin.prod.mjs +9 -0
- package/npm/LexicalCollaborationContext.d.ts +19 -0
- package/npm/LexicalCollaborationContext.dev.js +69 -0
- package/npm/LexicalCollaborationContext.dev.mjs +65 -0
- package/npm/LexicalCollaborationContext.js +11 -0
- package/npm/LexicalCollaborationContext.js.flow +22 -0
- package/npm/LexicalCollaborationContext.mjs +14 -0
- package/npm/LexicalCollaborationContext.node.mjs +12 -0
- package/npm/LexicalCollaborationContext.prod.js +9 -0
- package/npm/LexicalCollaborationContext.prod.mjs +9 -0
- package/npm/LexicalCollaborationPlugin.d.ts +39 -0
- package/npm/LexicalCollaborationPlugin.dev.js +558 -0
- package/npm/LexicalCollaborationPlugin.dev.mjs +543 -0
- package/npm/LexicalCollaborationPlugin.js +11 -0
- package/npm/LexicalCollaborationPlugin.js.flow +50 -0
- package/npm/LexicalCollaborationPlugin.mjs +13 -0
- package/npm/LexicalCollaborationPlugin.node.mjs +11 -0
- package/npm/LexicalCollaborationPlugin.prod.js +9 -0
- package/npm/LexicalCollaborationPlugin.prod.mjs +9 -0
- package/npm/LexicalComposer.d.ts +25 -0
- package/npm/LexicalComposer.dev.js +134 -0
- package/npm/LexicalComposer.dev.mjs +132 -0
- package/npm/LexicalComposer.js +11 -0
- package/npm/LexicalComposer.js.flow +40 -0
- package/npm/LexicalComposer.mjs +12 -0
- package/npm/LexicalComposer.node.mjs +10 -0
- package/npm/LexicalComposer.prod.js +9 -0
- package/npm/LexicalComposer.prod.mjs +9 -0
- package/npm/LexicalComposerContext.d.ts +18 -0
- package/npm/LexicalComposerContext.dev.js +55 -0
- package/npm/LexicalComposerContext.dev.mjs +51 -0
- package/npm/LexicalComposerContext.js +11 -0
- package/npm/LexicalComposerContext.js.flow +27 -0
- package/npm/LexicalComposerContext.mjs +14 -0
- package/npm/LexicalComposerContext.node.mjs +12 -0
- package/npm/LexicalComposerContext.prod.js +9 -0
- package/npm/LexicalComposerContext.prod.mjs +9 -0
- package/npm/LexicalContentEditable.d.ts +26 -0
- package/npm/LexicalContentEditable.dev.js +242 -0
- package/npm/LexicalContentEditable.dev.mjs +239 -0
- package/npm/LexicalContentEditable.js +11 -0
- package/npm/LexicalContentEditable.js.flow +80 -0
- package/npm/LexicalContentEditable.mjs +13 -0
- package/npm/LexicalContentEditable.node.mjs +11 -0
- package/npm/LexicalContentEditable.prod.js +9 -0
- package/npm/LexicalContentEditable.prod.mjs +9 -0
- package/npm/LexicalContextMenuPlugin.d.ts +36 -0
- package/npm/LexicalContextMenuPlugin.dev.js +524 -0
- package/npm/LexicalContextMenuPlugin.dev.mjs +509 -0
- package/npm/LexicalContextMenuPlugin.js +11 -0
- package/npm/LexicalContextMenuPlugin.js.flow +13 -0
- package/npm/LexicalContextMenuPlugin.mjs +13 -0
- package/npm/LexicalContextMenuPlugin.node.mjs +11 -0
- package/npm/LexicalContextMenuPlugin.prod.js +9 -0
- package/npm/LexicalContextMenuPlugin.prod.mjs +9 -0
- package/npm/LexicalDecoratorBlockNode.d.ts +25 -0
- package/npm/LexicalDecoratorBlockNode.dev.js +59 -0
- package/npm/LexicalDecoratorBlockNode.dev.mjs +56 -0
- package/npm/LexicalDecoratorBlockNode.js +11 -0
- package/npm/LexicalDecoratorBlockNode.js.flow +35 -0
- package/npm/LexicalDecoratorBlockNode.mjs +13 -0
- package/npm/LexicalDecoratorBlockNode.node.mjs +11 -0
- package/npm/LexicalDecoratorBlockNode.prod.js +9 -0
- package/npm/LexicalDecoratorBlockNode.prod.mjs +9 -0
- package/npm/LexicalDraggableBlockPlugin.d.ts +18 -0
- package/npm/LexicalDraggableBlockPlugin.dev.js +534 -0
- package/npm/LexicalDraggableBlockPlugin.dev.mjs +532 -0
- package/npm/LexicalDraggableBlockPlugin.js +11 -0
- package/npm/LexicalDraggableBlockPlugin.js.flow +24 -0
- package/npm/LexicalDraggableBlockPlugin.mjs +12 -0
- package/npm/LexicalDraggableBlockPlugin.node.mjs +10 -0
- package/npm/LexicalDraggableBlockPlugin.prod.js +9 -0
- package/npm/LexicalDraggableBlockPlugin.prod.mjs +9 -0
- package/npm/LexicalEditorRefPlugin.d.ts +20 -0
- package/npm/LexicalEditorRefPlugin.dev.js +58 -0
- package/npm/LexicalEditorRefPlugin.dev.mjs +43 -0
- package/npm/LexicalEditorRefPlugin.js +11 -0
- package/npm/LexicalEditorRefPlugin.js.flow +19 -0
- package/npm/LexicalEditorRefPlugin.mjs +12 -0
- package/npm/LexicalEditorRefPlugin.node.mjs +10 -0
- package/npm/LexicalEditorRefPlugin.prod.js +9 -0
- package/npm/LexicalEditorRefPlugin.prod.mjs +9 -0
- package/npm/LexicalErrorBoundary.d.ts +13 -0
- package/npm/LexicalErrorBoundary.dev.js +40 -0
- package/npm/LexicalErrorBoundary.dev.mjs +38 -0
- package/npm/LexicalErrorBoundary.js +11 -0
- package/npm/LexicalErrorBoundary.js.flow +17 -0
- package/npm/LexicalErrorBoundary.mjs +12 -0
- package/npm/LexicalErrorBoundary.node.mjs +10 -0
- package/npm/LexicalErrorBoundary.prod.js +9 -0
- package/npm/LexicalErrorBoundary.prod.mjs +9 -0
- package/npm/LexicalExtensionComponent.dev.js +53 -0
- package/npm/LexicalExtensionComponent.dev.mjs +51 -0
- package/npm/LexicalExtensionComponent.js +11 -0
- package/npm/LexicalExtensionComponent.js.flow +12 -0
- package/npm/LexicalExtensionComponent.mjs +12 -0
- package/npm/LexicalExtensionComponent.node.mjs +10 -0
- package/npm/LexicalExtensionComponent.prod.js +9 -0
- package/npm/LexicalExtensionComponent.prod.mjs +9 -0
- package/npm/LexicalExtensionComposer.d.ts +69 -0
- package/npm/LexicalExtensionComposer.dev.js +105 -0
- package/npm/LexicalExtensionComposer.dev.mjs +103 -0
- package/npm/LexicalExtensionComposer.js +11 -0
- package/npm/LexicalExtensionComposer.js.flow +20 -0
- package/npm/LexicalExtensionComposer.mjs +12 -0
- package/npm/LexicalExtensionComposer.node.mjs +10 -0
- package/npm/LexicalExtensionComposer.prod.js +9 -0
- package/npm/LexicalExtensionComposer.prod.mjs +9 -0
- package/npm/LexicalHashtagPlugin.d.ts +9 -0
- package/npm/LexicalHashtagPlugin.dev.js +34 -0
- package/npm/LexicalHashtagPlugin.dev.mjs +32 -0
- package/npm/LexicalHashtagPlugin.js +11 -0
- package/npm/LexicalHashtagPlugin.js.flow +10 -0
- package/npm/LexicalHashtagPlugin.mjs +12 -0
- package/npm/LexicalHashtagPlugin.node.mjs +10 -0
- package/npm/LexicalHashtagPlugin.prod.js +9 -0
- package/npm/LexicalHashtagPlugin.prod.mjs +9 -0
- package/npm/LexicalHistoryPlugin.d.ts +14 -0
- package/npm/LexicalHistoryPlugin.dev.js +48 -0
- package/npm/LexicalHistoryPlugin.dev.mjs +46 -0
- package/npm/LexicalHistoryPlugin.js +11 -0
- package/npm/LexicalHistoryPlugin.js.flow +28 -0
- package/npm/LexicalHistoryPlugin.mjs +13 -0
- package/npm/LexicalHistoryPlugin.node.mjs +11 -0
- package/npm/LexicalHistoryPlugin.prod.js +9 -0
- package/npm/LexicalHistoryPlugin.prod.mjs +9 -0
- package/npm/LexicalHorizontalRuleNode.d.ts +25 -0
- package/npm/LexicalHorizontalRuleNode.dev.js +102 -0
- package/npm/LexicalHorizontalRuleNode.dev.mjs +98 -0
- package/npm/LexicalHorizontalRuleNode.js +11 -0
- package/npm/LexicalHorizontalRuleNode.js.flow +27 -0
- package/npm/LexicalHorizontalRuleNode.mjs +15 -0
- package/npm/LexicalHorizontalRuleNode.node.mjs +13 -0
- package/npm/LexicalHorizontalRuleNode.prod.js +9 -0
- package/npm/LexicalHorizontalRuleNode.prod.mjs +9 -0
- package/npm/LexicalHorizontalRulePlugin.d.ts +8 -0
- package/npm/LexicalHorizontalRulePlugin.dev.js +44 -0
- package/npm/LexicalHorizontalRulePlugin.dev.mjs +42 -0
- package/npm/LexicalHorizontalRulePlugin.js +11 -0
- package/npm/LexicalHorizontalRulePlugin.js.flow +12 -0
- package/npm/LexicalHorizontalRulePlugin.mjs +12 -0
- package/npm/LexicalHorizontalRulePlugin.node.mjs +10 -0
- package/npm/LexicalHorizontalRulePlugin.prod.js +9 -0
- package/npm/LexicalHorizontalRulePlugin.prod.mjs +9 -0
- package/npm/LexicalLinkPlugin.d.ts +14 -0
- package/npm/LexicalLinkPlugin.dev.js +43 -0
- package/npm/LexicalLinkPlugin.dev.mjs +41 -0
- package/npm/LexicalLinkPlugin.js +11 -0
- package/npm/LexicalLinkPlugin.js.flow +21 -0
- package/npm/LexicalLinkPlugin.mjs +12 -0
- package/npm/LexicalLinkPlugin.node.mjs +10 -0
- package/npm/LexicalLinkPlugin.prod.js +9 -0
- package/npm/LexicalLinkPlugin.prod.mjs +9 -0
- package/npm/LexicalListPlugin.d.ts +15 -0
- package/npm/LexicalListPlugin.dev.js +56 -0
- package/npm/LexicalListPlugin.dev.mjs +54 -0
- package/npm/LexicalListPlugin.js +11 -0
- package/npm/LexicalListPlugin.js.flow +15 -0
- package/npm/LexicalListPlugin.mjs +12 -0
- package/npm/LexicalListPlugin.node.mjs +10 -0
- package/npm/LexicalListPlugin.prod.js +9 -0
- package/npm/LexicalListPlugin.prod.mjs +9 -0
- package/npm/LexicalMarkdownShortcutPlugin.d.ts +12 -0
- package/npm/LexicalMarkdownShortcutPlugin.dev.js +55 -0
- package/npm/LexicalMarkdownShortcutPlugin.dev.mjs +52 -0
- package/npm/LexicalMarkdownShortcutPlugin.js +11 -0
- package/npm/LexicalMarkdownShortcutPlugin.js.flow +16 -0
- package/npm/LexicalMarkdownShortcutPlugin.mjs +13 -0
- package/npm/LexicalMarkdownShortcutPlugin.node.mjs +11 -0
- package/npm/LexicalMarkdownShortcutPlugin.prod.js +9 -0
- package/npm/LexicalMarkdownShortcutPlugin.prod.mjs +9 -0
- package/npm/LexicalNestedComposer.d.ts +57 -0
- package/npm/LexicalNestedComposer.dev.js +161 -0
- package/npm/LexicalNestedComposer.dev.mjs +159 -0
- package/npm/LexicalNestedComposer.js +11 -0
- package/npm/LexicalNestedComposer.js.flow +26 -0
- package/npm/LexicalNestedComposer.mjs +12 -0
- package/npm/LexicalNestedComposer.node.mjs +10 -0
- package/npm/LexicalNestedComposer.prod.js +9 -0
- package/npm/LexicalNestedComposer.prod.mjs +9 -0
- package/npm/LexicalNodeContextMenuPlugin.d.ts +46 -0
- package/npm/LexicalNodeContextMenuPlugin.dev.js +257 -0
- package/npm/LexicalNodeContextMenuPlugin.dev.mjs +253 -0
- package/npm/LexicalNodeContextMenuPlugin.js +11 -0
- package/npm/LexicalNodeContextMenuPlugin.js.flow +12 -0
- package/npm/LexicalNodeContextMenuPlugin.mjs +14 -0
- package/npm/LexicalNodeContextMenuPlugin.node.mjs +12 -0
- package/npm/LexicalNodeContextMenuPlugin.prod.js +9 -0
- package/npm/LexicalNodeContextMenuPlugin.prod.mjs +9 -0
- package/npm/LexicalNodeEventPlugin.d.ts +13 -0
- package/npm/LexicalNodeEventPlugin.dev.js +61 -0
- package/npm/LexicalNodeEventPlugin.dev.mjs +59 -0
- package/npm/LexicalNodeEventPlugin.js +11 -0
- package/npm/LexicalNodeEventPlugin.js.flow +20 -0
- package/npm/LexicalNodeEventPlugin.mjs +12 -0
- package/npm/LexicalNodeEventPlugin.node.mjs +10 -0
- package/npm/LexicalNodeEventPlugin.prod.js +9 -0
- package/npm/LexicalNodeEventPlugin.prod.mjs +9 -0
- package/npm/LexicalNodeMenuPlugin.d.ts +24 -0
- package/npm/LexicalNodeMenuPlugin.dev.js +527 -0
- package/npm/LexicalNodeMenuPlugin.dev.mjs +524 -0
- package/npm/LexicalNodeMenuPlugin.js +11 -0
- package/npm/LexicalNodeMenuPlugin.js.flow +64 -0
- package/npm/LexicalNodeMenuPlugin.mjs +13 -0
- package/npm/LexicalNodeMenuPlugin.node.mjs +11 -0
- package/npm/LexicalNodeMenuPlugin.prod.js +9 -0
- package/npm/LexicalNodeMenuPlugin.prod.mjs +9 -0
- package/npm/LexicalOnChangePlugin.d.ts +13 -0
- package/npm/LexicalOnChangePlugin.dev.js +72 -0
- package/npm/LexicalOnChangePlugin.dev.mjs +70 -0
- package/npm/LexicalOnChangePlugin.js +11 -0
- package/npm/LexicalOnChangePlugin.js.flow +16 -0
- package/npm/LexicalOnChangePlugin.mjs +12 -0
- package/npm/LexicalOnChangePlugin.node.mjs +10 -0
- package/npm/LexicalOnChangePlugin.prod.js +9 -0
- package/npm/LexicalOnChangePlugin.prod.mjs +9 -0
- package/npm/LexicalPlainTextPlugin.d.ts +14 -0
- package/npm/LexicalPlainTextPlugin.dev.js +235 -0
- package/npm/LexicalPlainTextPlugin.dev.mjs +233 -0
- package/npm/LexicalPlainTextPlugin.js +11 -0
- package/npm/LexicalPlainTextPlugin.js.flow +29 -0
- package/npm/LexicalPlainTextPlugin.mjs +12 -0
- package/npm/LexicalPlainTextPlugin.node.mjs +10 -0
- package/npm/LexicalPlainTextPlugin.prod.js +9 -0
- package/npm/LexicalPlainTextPlugin.prod.mjs +9 -0
- package/npm/LexicalReactExtension.dev.js +187 -0
- package/npm/LexicalReactExtension.dev.mjs +184 -0
- package/npm/LexicalReactExtension.js +11 -0
- package/npm/LexicalReactExtension.js.flow +68 -0
- package/npm/LexicalReactExtension.mjs +13 -0
- package/npm/LexicalReactExtension.node.mjs +11 -0
- package/npm/LexicalReactExtension.prod.js +9 -0
- package/npm/LexicalReactExtension.prod.mjs +9 -0
- package/npm/LexicalReactPluginHostExtension.dev.js +189 -0
- package/npm/LexicalReactPluginHostExtension.dev.mjs +181 -0
- package/npm/LexicalReactPluginHostExtension.js +11 -0
- package/npm/LexicalReactPluginHostExtension.js.flow +84 -0
- package/npm/LexicalReactPluginHostExtension.mjs +18 -0
- package/npm/LexicalReactPluginHostExtension.node.mjs +16 -0
- package/npm/LexicalReactPluginHostExtension.prod.js +9 -0
- package/npm/LexicalReactPluginHostExtension.prod.mjs +9 -0
- package/npm/LexicalReactProviderExtension.dev.js +33 -0
- package/npm/LexicalReactProviderExtension.dev.mjs +31 -0
- package/npm/LexicalReactProviderExtension.js +11 -0
- package/npm/LexicalReactProviderExtension.js.flow +12 -0
- package/npm/LexicalReactProviderExtension.mjs +12 -0
- package/npm/LexicalReactProviderExtension.node.mjs +10 -0
- package/npm/LexicalReactProviderExtension.prod.js +9 -0
- package/npm/LexicalReactProviderExtension.prod.mjs +9 -0
- package/npm/LexicalRichTextPlugin.d.ts +14 -0
- package/npm/LexicalRichTextPlugin.dev.js +235 -0
- package/npm/LexicalRichTextPlugin.dev.mjs +233 -0
- package/npm/LexicalRichTextPlugin.js +11 -0
- package/npm/LexicalRichTextPlugin.js.flow +29 -0
- package/npm/LexicalRichTextPlugin.mjs +12 -0
- package/npm/LexicalRichTextPlugin.node.mjs +10 -0
- package/npm/LexicalRichTextPlugin.prod.js +9 -0
- package/npm/LexicalRichTextPlugin.prod.mjs +9 -0
- package/npm/LexicalSelectionAlwaysOnDisplay.d.ts +8 -0
- package/npm/LexicalSelectionAlwaysOnDisplay.dev.js +31 -0
- package/npm/LexicalSelectionAlwaysOnDisplay.dev.mjs +29 -0
- package/npm/LexicalSelectionAlwaysOnDisplay.js +11 -0
- package/npm/LexicalSelectionAlwaysOnDisplay.js.flow +13 -0
- package/npm/LexicalSelectionAlwaysOnDisplay.mjs +12 -0
- package/npm/LexicalSelectionAlwaysOnDisplay.node.mjs +10 -0
- package/npm/LexicalSelectionAlwaysOnDisplay.prod.js +9 -0
- package/npm/LexicalSelectionAlwaysOnDisplay.prod.mjs +9 -0
- package/npm/LexicalTabIndentationPlugin.d.ts +17 -0
- package/npm/LexicalTabIndentationPlugin.dev.js +40 -0
- package/npm/LexicalTabIndentationPlugin.dev.mjs +38 -0
- package/npm/LexicalTabIndentationPlugin.js +11 -0
- package/npm/LexicalTabIndentationPlugin.js.flow +21 -0
- package/npm/LexicalTabIndentationPlugin.mjs +13 -0
- package/npm/LexicalTabIndentationPlugin.node.mjs +11 -0
- package/npm/LexicalTabIndentationPlugin.prod.js +9 -0
- package/npm/LexicalTabIndentationPlugin.prod.mjs +9 -0
- package/npm/LexicalTableOfContentsPlugin.d.ts +20 -0
- package/npm/LexicalTableOfContentsPlugin.dev.js +209 -0
- package/npm/LexicalTableOfContentsPlugin.dev.mjs +207 -0
- package/npm/LexicalTableOfContentsPlugin.js +11 -0
- package/npm/LexicalTableOfContentsPlugin.js.flow +18 -0
- package/npm/LexicalTableOfContentsPlugin.mjs +12 -0
- package/npm/LexicalTableOfContentsPlugin.node.mjs +10 -0
- package/npm/LexicalTableOfContentsPlugin.prod.js +9 -0
- package/npm/LexicalTableOfContentsPlugin.prod.mjs +9 -0
- package/npm/LexicalTablePlugin.d.ts +40 -0
- package/npm/LexicalTablePlugin.dev.js +77 -0
- package/npm/LexicalTablePlugin.dev.mjs +75 -0
- package/npm/LexicalTablePlugin.js +11 -0
- package/npm/LexicalTablePlugin.js.flow +15 -0
- package/npm/LexicalTablePlugin.mjs +12 -0
- package/npm/LexicalTablePlugin.node.mjs +10 -0
- package/npm/LexicalTablePlugin.prod.js +9 -0
- package/npm/LexicalTablePlugin.prod.mjs +9 -0
- package/npm/LexicalTreeView.d.ts +37 -0
- package/npm/LexicalTreeView.dev.js +105 -0
- package/npm/LexicalTreeView.dev.mjs +91 -0
- package/npm/LexicalTreeView.js +11 -0
- package/npm/LexicalTreeView.js.flow +21 -0
- package/npm/LexicalTreeView.mjs +12 -0
- package/npm/LexicalTreeView.node.mjs +10 -0
- package/npm/LexicalTreeView.prod.js +9 -0
- package/npm/LexicalTreeView.prod.mjs +9 -0
- package/npm/LexicalTreeViewExtension.dev.js +57 -0
- package/npm/LexicalTreeViewExtension.dev.mjs +54 -0
- package/npm/LexicalTreeViewExtension.js +11 -0
- package/npm/LexicalTreeViewExtension.js.flow +12 -0
- package/npm/LexicalTreeViewExtension.mjs +13 -0
- package/npm/LexicalTreeViewExtension.node.mjs +11 -0
- package/npm/LexicalTreeViewExtension.prod.js +9 -0
- package/npm/LexicalTreeViewExtension.prod.mjs +9 -0
- package/npm/LexicalTypeaheadMenuPlugin.d.ts +40 -0
- package/npm/LexicalTypeaheadMenuPlugin.dev.js +654 -0
- package/npm/LexicalTypeaheadMenuPlugin.dev.mjs +646 -0
- package/npm/LexicalTypeaheadMenuPlugin.js +11 -0
- package/npm/LexicalTypeaheadMenuPlugin.js.flow +83 -0
- package/npm/LexicalTypeaheadMenuPlugin.mjs +18 -0
- package/npm/LexicalTypeaheadMenuPlugin.node.mjs +16 -0
- package/npm/LexicalTypeaheadMenuPlugin.prod.js +9 -0
- package/npm/LexicalTypeaheadMenuPlugin.prod.mjs +9 -0
- package/npm/README.md +90 -0
- package/npm/ReactExtension.d.ts +41 -0
- package/npm/ReactPluginHostExtension.d.ts +56 -0
- package/npm/ReactProviderExtension.d.ts +9 -0
- package/npm/TreeViewExtension.d.ts +18 -0
- package/npm/package.json +1549 -0
- package/npm/shared/LegacyDecorators.d.ts +23 -0
- package/npm/shared/LexicalContentEditableElement.d.ts +43 -0
- package/npm/shared/LexicalMenu.d.ts +52 -0
- package/npm/shared/buildEditorComponent.d.ts +11 -0
- package/npm/shared/mergeRefs.d.ts +9 -0
- package/npm/shared/point.d.ts +21 -0
- package/npm/shared/rect.d.ts +45 -0
- package/npm/shared/types.d.ts +89 -0
- package/npm/shared/useCanShowPlaceholder.d.ts +9 -0
- package/npm/shared/useCharacterLimit.d.ts +16 -0
- package/npm/shared/useDecorators.d.ts +17 -0
- package/npm/shared/useHistory.d.ts +10 -0
- package/npm/shared/useList.d.ts +9 -0
- package/npm/shared/usePlainTextSetup.d.ts +9 -0
- package/npm/shared/useReactDecorators.d.ts +12 -0
- package/npm/shared/useRichTextSetup.d.ts +9 -0
- package/npm/shared/useYjsCollaboration.d.ts +25 -0
- package/npm/useExtensionComponent.d.ts +10 -0
- package/npm/useLexicalEditable.d.ts +16 -0
- package/npm/useLexicalEditable.dev.js +102 -0
- package/npm/useLexicalEditable.dev.mjs +100 -0
- package/npm/useLexicalEditable.js +11 -0
- package/npm/useLexicalEditable.js.flow +12 -0
- package/npm/useLexicalEditable.mjs +12 -0
- package/npm/useLexicalEditable.node.mjs +10 -0
- package/npm/useLexicalEditable.prod.js +9 -0
- package/npm/useLexicalEditable.prod.mjs +9 -0
- package/npm/useLexicalExtensionComponent.dev.js +37 -0
- package/npm/useLexicalExtensionComponent.dev.mjs +34 -0
- package/npm/useLexicalExtensionComponent.js +11 -0
- package/npm/useLexicalExtensionComponent.js.flow +12 -0
- package/npm/useLexicalExtensionComponent.mjs +13 -0
- package/npm/useLexicalExtensionComponent.node.mjs +11 -0
- package/npm/useLexicalExtensionComponent.prod.js +9 -0
- package/npm/useLexicalExtensionComponent.prod.mjs +9 -0
- package/npm/useLexicalIsTextContentEmpty.d.ts +9 -0
- package/npm/useLexicalIsTextContentEmpty.dev.js +60 -0
- package/npm/useLexicalIsTextContentEmpty.dev.mjs +58 -0
- package/npm/useLexicalIsTextContentEmpty.js +11 -0
- package/npm/useLexicalIsTextContentEmpty.js.flow +15 -0
- package/npm/useLexicalIsTextContentEmpty.mjs +12 -0
- package/npm/useLexicalIsTextContentEmpty.node.mjs +10 -0
- package/npm/useLexicalIsTextContentEmpty.prod.js +9 -0
- package/npm/useLexicalIsTextContentEmpty.prod.mjs +9 -0
- package/npm/useLexicalNodeSelection.d.ts +24 -0
- package/npm/useLexicalNodeSelection.dev.js +102 -0
- package/npm/useLexicalNodeSelection.dev.mjs +100 -0
- package/npm/useLexicalNodeSelection.js +11 -0
- package/npm/useLexicalNodeSelection.js.flow +14 -0
- package/npm/useLexicalNodeSelection.mjs +12 -0
- package/npm/useLexicalNodeSelection.node.mjs +10 -0
- package/npm/useLexicalNodeSelection.prod.js +9 -0
- package/npm/useLexicalNodeSelection.prod.mjs +9 -0
- package/npm/useLexicalSubscription.d.ts +17 -0
- package/npm/useLexicalSubscription.dev.js +73 -0
- package/npm/useLexicalSubscription.dev.mjs +71 -0
- package/npm/useLexicalSubscription.js +11 -0
- package/npm/useLexicalSubscription.js.flow +19 -0
- package/npm/useLexicalSubscription.mjs +12 -0
- package/npm/useLexicalSubscription.node.mjs +10 -0
- package/npm/useLexicalSubscription.prod.js +9 -0
- package/npm/useLexicalSubscription.prod.mjs +9 -0
- package/npm/useLexicalTextEntity.d.ts +10 -0
- package/npm/useLexicalTextEntity.dev.js +31 -0
- package/npm/useLexicalTextEntity.dev.mjs +29 -0
- package/npm/useLexicalTextEntity.js +11 -0
- package/npm/useLexicalTextEntity.js.flow +18 -0
- package/npm/useLexicalTextEntity.mjs +12 -0
- package/npm/useLexicalTextEntity.node.mjs +10 -0
- package/npm/useLexicalTextEntity.prod.js +9 -0
- package/npm/useLexicalTextEntity.prod.mjs +9 -0
- package/package.json +1549 -0
- package/src/ExtensionComponent.tsx +57 -0
- package/src/LexicalAutoEmbedPlugin.tsx +242 -0
- package/src/LexicalAutoFocusPlugin.ts +41 -0
- package/src/LexicalAutoLinkPlugin.ts +57 -0
- package/src/LexicalBlockWithAlignableContents.tsx +119 -0
- package/src/LexicalCharacterLimitPlugin.tsx +91 -0
- package/src/LexicalCheckListPlugin.tsx +20 -0
- package/src/LexicalClearEditorPlugin.ts +26 -0
- package/src/LexicalClickableLinkPlugin.tsx +28 -0
- package/src/LexicalCollaborationContext.tsx +89 -0
- package/src/LexicalCollaborationPlugin.tsx +265 -0
- package/src/LexicalComposer.tsx +151 -0
- package/src/LexicalComposerContext.ts +63 -0
- package/src/LexicalContentEditable.tsx +97 -0
- package/src/LexicalContextMenuPlugin.tsx +169 -0
- package/src/LexicalDecoratorBlockNode.ts +78 -0
- package/src/LexicalDraggableBlockPlugin.tsx +481 -0
- package/src/LexicalEditorRefPlugin.tsx +40 -0
- package/src/LexicalErrorBoundary.tsx +39 -0
- package/src/LexicalExtensionComposer.tsx +117 -0
- package/src/LexicalHashtagPlugin.ts +26 -0
- package/src/LexicalHistoryPlugin.ts +31 -0
- package/src/LexicalHorizontalRuleNode.tsx +123 -0
- package/src/LexicalHorizontalRulePlugin.ts +49 -0
- package/src/LexicalLinkPlugin.ts +32 -0
- package/src/LexicalListPlugin.ts +49 -0
- package/src/LexicalMarkdownShortcutPlugin.tsx +55 -0
- package/src/LexicalNestedComposer.tsx +215 -0
- package/src/LexicalNodeContextMenuPlugin.tsx +316 -0
- package/src/LexicalNodeEventPlugin.ts +73 -0
- package/src/LexicalNodeMenuPlugin.tsx +130 -0
- package/src/LexicalOnChangePlugin.ts +51 -0
- package/src/LexicalPlainTextPlugin.tsx +65 -0
- package/src/LexicalRichTextPlugin.tsx +65 -0
- package/src/LexicalSelectionAlwaysOnDisplay.tsx +20 -0
- package/src/LexicalTabIndentationPlugin.tsx +27 -0
- package/src/LexicalTableOfContentsPlugin.tsx +277 -0
- package/src/LexicalTablePlugin.ts +110 -0
- package/src/LexicalTreeView.tsx +128 -0
- package/src/LexicalTypeaheadMenuPlugin.tsx +354 -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/__tests__/unit/Collaboration.test.ts +563 -0
- package/src/__tests__/unit/CollaborationSnapshot.test.ts +461 -0
- package/src/__tests__/unit/CollaborationWithCollisions.test.ts +246 -0
- package/src/__tests__/unit/LexicalCollaborationPlugin.test.tsx +101 -0
- package/src/__tests__/unit/LexicalComposer.test.tsx +129 -0
- package/src/__tests__/unit/LexicalContentEditableElement.test.tsx +264 -0
- package/src/__tests__/unit/LexicalExtensionComposer.test.tsx +85 -0
- package/src/__tests__/unit/LexicalNestedComposer.test.tsx +1142 -0
- package/src/__tests__/unit/PlainRichTextPlugin.test.tsx +246 -0
- package/src/__tests__/unit/React19.test.tsx +52 -0
- package/src/__tests__/unit/ReactExtension.test.tsx +32 -0
- package/src/__tests__/unit/ReactPluginHostExtension.test.tsx +137 -0
- package/src/__tests__/unit/useLexicalCharacterLimit.test.ts +194 -0
- package/src/__tests__/unit/useLexicalIsTextContentEmpty.test.tsx +96 -0
- package/src/__tests__/unit/useMenuAnchorRef.test.tsx +65 -0
- package/src/__tests__/unit/utils.tsx +356 -0
- package/src/shared/LegacyDecorators.tsx +62 -0
- package/src/shared/LexicalContentEditableElement.tsx +126 -0
- package/src/shared/LexicalMenu.ts +664 -0
- package/src/shared/buildEditorComponent.tsx +61 -0
- package/src/shared/mergeRefs.ts +20 -0
- package/src/shared/point.ts +55 -0
- package/src/shared/rect.ts +158 -0
- package/src/shared/types.ts +106 -0
- package/src/shared/useCanShowPlaceholder.ts +49 -0
- package/src/shared/useCharacterLimit.ts +315 -0
- package/src/shared/useDecorators.tsx +71 -0
- package/src/shared/useHistory.ts +28 -0
- package/src/shared/useList.ts +18 -0
- package/src/shared/usePlainTextSetup.ts +26 -0
- package/src/shared/useReactDecorators.tsx +53 -0
- package/src/shared/useRichTextSetup.ts +26 -0
- package/src/shared/useYjsCollaboration.tsx +666 -0
- package/src/useExtensionComponent.tsx +38 -0
- package/src/useLexicalEditable.ts +33 -0
- package/src/useLexicalIsTextContentEmpty.ts +36 -0
- package/src/useLexicalNodeSelection.ts +114 -0
- package/src/useLexicalSubscription.tsx +51 -0
- package/src/useLexicalTextEntity.ts +29 -0
|
@@ -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"),n=require("react"),o=require("@lexical/utils"),r=require("react/jsx-runtime");const l="startTransition";const i="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,s=i?n.useLayoutEffect:n.useEffect;const u=e=>{const t=document.getElementById("typeahead-menu");if(!t)return;const n=t.getBoundingClientRect();n.top+n.height>window.innerHeight&&t.scrollIntoView({block:"center"}),n.top<0&&t.scrollIntoView({block:"center"}),e.scrollIntoView({block:"nearest"})};function c(e,t){const n=e.getBoundingClientRect(),o=t.getBoundingClientRect();return n.top>=o.top-6&&n.top<=o.bottom+6}function a(t,o,r,l){const[i]=e.useLexicalComposerContext();n.useEffect(()=>{if(null!=o&&null!=t){const e=i.getRootElement(),t=null!=e?function(e){let t=getComputedStyle(e);const n="absolute"===t.position,o=/(auto|scroll)/;if("fixed"===t.position)return document.body;for(let r=e;r=r.parentElement;)if(t=getComputedStyle(r),(!n||"static"!==t.position)&&o.test(t.overflow+t.overflowY+t.overflowX))return r;return document.body}(e):document.body;let n=!1,s=c(o,t);const u=function(){n||(window.requestAnimationFrame(function(){r(),n=!1}),n=!0);const e=c(o,t);e!==s&&(s=e,null!=l&&l(e))},a=new ResizeObserver(r);return window.addEventListener("resize",r),document.addEventListener("scroll",u,{capture:!0,passive:!0}),a.observe(o),()=>{a.unobserve(o),window.removeEventListener("resize",r),document.removeEventListener("scroll",u,!0)}}},[o,i,l,r,t])}const d=t.createCommand("SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND");function f({close:e,editor:r,anchorElementRef:l,resolution:i,options:c,menuRenderFn:a,onSelectOption:f,shouldSplitNodeWithQuery:m=!1,commandPriority:p=t.COMMAND_PRIORITY_LOW,preselectFirstItem:g=!0}){const[h,C]=n.useState(null),E=null!==h?Math.min(c.length-1,h):null,x=i.match&&i.match.matchingString;n.useEffect(()=>{g&&C(0)},[x,g]);const y=n.useCallback(n=>{r.update(()=>{const o=null!=i.match&&m?function(e){const n=t.$getSelection();if(!t.$isRangeSelection(n)||!n.isCollapsed())return null;const o=n.anchor;if("text"!==o.type)return null;const r=o.getNode();if(!r.isSimpleText())return null;const l=o.offset,i=r.getTextContent().slice(0,l),s=e.replaceableString.length,u=l-function(e,t,n){let o=n;for(let n=o;n<=t.length;n++)e.slice(-n)===t.substring(0,n)&&(o=n);return o}(i,e.matchingString,s);if(u<0)return null;let c;return 0===u?[c]=r.splitText(l):[,c]=r.splitText(u,l),c}(i.match):null;f(n,o,e,i.match?i.match.matchingString:"")})},[r,m,i.match,f,e]),O=n.useCallback(e=>{const t=r.getRootElement();null!==t&&(t.setAttribute("aria-activedescendant","typeahead-item-"+e),C(e))},[r]);n.useEffect(()=>()=>{const e=r.getRootElement();null!==e&&e.removeAttribute("aria-activedescendant")},[r]),s(()=>{null===c?C(null):null===E&&g&&O(0)},[c,E,O,g]),n.useEffect(()=>o.mergeRegister(r.registerCommand(d,({option:e})=>!(!e.ref||null==e.ref.current)&&(u(e.ref.current),!0),p)),[r,O,p]),n.useEffect(()=>o.mergeRegister(r.registerCommand(t.KEY_ARROW_DOWN_COMMAND,e=>{const t=e;if(null!==c&&c.length){const e=null===E?0:E!==c.length-1?E+1:0;O(e);const n=c[e];if(!n)return O(-1),t.preventDefault(),t.stopImmediatePropagation(),!0;n.ref&&n.ref.current&&r.dispatchCommand(d,{index:e,option:n}),t.preventDefault(),t.stopImmediatePropagation()}return!0},p),r.registerCommand(t.KEY_ARROW_UP_COMMAND,e=>{const t=e;if(null!==c&&c.length){const e=null===E?c.length-1:0!==E?E-1:c.length-1;O(e);const n=c[e];if(!n)return O(-1),t.preventDefault(),t.stopImmediatePropagation(),!0;n.ref&&n.ref.current&&u(n.ref.current),t.preventDefault(),t.stopImmediatePropagation()}return!0},p),r.registerCommand(t.KEY_ESCAPE_COMMAND,t=>{const n=t;return n.preventDefault(),n.stopImmediatePropagation(),e(),!0},p),r.registerCommand(t.KEY_TAB_COMMAND,e=>{const t=e;return null!==c&&null!==E&&null!=c[E]&&(t.preventDefault(),t.stopImmediatePropagation(),y(c[E]),!0)},p),r.registerCommand(t.KEY_ENTER_COMMAND,e=>null!==c&&null!==E&&null!=c[E]&&(null!==e&&(e.preventDefault(),e.stopImmediatePropagation()),y(c[E]),!0),p)),[y,e,r,c,E,O,p]);return a(l,n.useMemo(()=>({options:c,selectOptionAndCleanUp:y,selectedIndex:E,setHighlightedIndex:C}),[y,E,c]),i.match?i.match.matchingString:"")}function m(e,t){null!=t&&(e.className=t),e.setAttribute("aria-label","Typeahead menu"),e.setAttribute("role","listbox"),e.style.display="block",e.style.position="absolute"}const p="\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;";const g=t.createCommand("SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND");exports.LexicalTypeaheadMenuPlugin=function({options:o,onQueryChange:s,onSelectOption:u,onOpen:c,onClose:d,menuRenderFn:p,triggerFn:g,anchorClassName:h,commandPriority:C=t.COMMAND_PRIORITY_LOW,parent:E,preselectFirstItem:x=!0,ignoreEntityBoundary:y=!1}){const[O]=e.useLexicalComposerContext(),[b,w]=n.useState(null),R=function(t,o,r,l=(i?document.body:void 0),s=!0){const[u]=e.useLexicalComposerContext(),c=i?document.createElement("div"):null,d=n.useRef(c),f=n.useCallback(()=>{if(null===d.current||void 0===l)return;d.current.style.top=d.current.style.bottom;const e=u.getRootElement(),n=d.current,o=n.firstChild;if(null!==e&&null!==t){const{left:i,top:u,width:c,height:a}=t.getRect(),f=d.current.offsetHeight;if(n.style.top=`${u+f+3+(s?window.pageYOffset:0)}px`,n.style.left=`${i+window.pageXOffset}px`,n.style.height=`${a}px`,n.style.width=`${c}px`,null!==o){o.style.top=`${u}`;const t=o.getBoundingClientRect(),r=t.height,l=t.width,c=e.getBoundingClientRect();i+l>c.right&&(n.style.left=`${c.right-l+window.pageXOffset}px`),(u+r>window.innerHeight||u+r>c.bottom)&&u-c.top>r+a&&(n.style.top=`${u-r-a+(s?window.pageYOffset:0)}px`)}n.isConnected||(m(n,r),l.append(n)),n.setAttribute("id","typeahead-menu"),e.setAttribute("aria-controls","typeahead-menu")}},[u,t,s,r,l]);n.useEffect(()=>{const e=u.getRootElement();return null!==t&&f(),()=>{null!==e&&e.removeAttribute("aria-controls");const t=d.current;null!==t&&t.isConnected&&(t.remove(),t.removeAttribute("id"))}},[u,f,t]);const p=n.useCallback(e=>{null!==t&&(e||o(null))},[t,o]);return a(t,d.current,f,p),null!=c&&c===d.current&&(m(c,r),null!=l&&l.append(c)),d}(b,w,h,E),v=n.useCallback(()=>{w(null),null!=d&&null!==b&&d()},[d,b]),S=n.useCallback(e=>{w(e),null!=c&&null===b&&c(e)},[c,b]);return n.useEffect(()=>{const e=O.registerUpdateListener(()=>{O.getEditorState().read(()=>{if(!O.isEditable())return void v();if(O.isComposing())return;const e=O._window||window,o=e.document.createRange(),r=t.$getSelection(),i=function(e){let n=null;return e.getEditorState().read(()=>{const e=t.$getSelection();t.$isRangeSelection(e)&&(n=function(e){const t=e.anchor;if("text"!==t.type)return null;const n=t.getNode();if(!n.isSimpleText())return null;const o=t.offset;return n.getTextContent().slice(0,o)}(e))}),n}(O);if(!t.$isRangeSelection(r)||!r.isCollapsed()||null===i||null===o)return void v();const u=g(i,O);if(s(u?u.matchingString:null),null!==u&&(y||!function(e,n){return 0===n&&e.getEditorState().read(()=>{const e=t.$getSelection();if(t.$isRangeSelection(e)){const n=e.anchor.getNode().getPreviousSibling();return t.$isTextNode(n)&&n.isTextEntity()}return!1})}(O,u.leadOffset))){const r=function(e,n,o){const r=t.getDOMSelection(o);if(null===r||!r.isCollapsed)return!1;const l=r.anchorNode,i=e,s=r.anchorOffset;if(null==l||null==s)return!1;try{n.setStart(l,i),n.setEnd(l,s)}catch(e){return!1}return!0}(u.leadOffset,o,e);if(null!==r)return c=()=>S({getRect:()=>o.getBoundingClientRect(),match:u}),void(l in n?n[l](c):c())}var c;v()})});return()=>{e()}},[O,g,s,b,v,S,y]),n.useEffect(()=>O.registerEditableListener(e=>{e||v()}),[O,v]),null===b||null===O||null===R.current?null:r.jsx(f,{close:v,resolution:b,editor:O,anchorElementRef:R,options:o,menuRenderFn:p,shouldSplitNodeWithQuery:!0,onSelectOption:u,commandPriority:C,preselectFirstItem:x})},exports.MenuOption=class{key;ref;constructor(e){this.key=e,this.ref={current:null},this.setRefElement=this.setRefElement.bind(this)}setRefElement(e){this.ref={current:e}}},exports.PUNCTUATION=p,exports.SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND=g,exports.getScrollParent=function(e,t){let n=getComputedStyle(e);const o="absolute"===n.position,r=t?/(auto|scroll|hidden)/:/(auto|scroll)/;if("fixed"===n.position)return document.body;for(let t=e;t=t.parentElement;)if(n=getComputedStyle(t),(!o||"static"!==n.position)&&r.test(n.overflow+n.overflowY+n.overflowX))return t;return document.body},exports.useBasicTypeaheadTriggerMatch=function(e,{minLength:t=1,maxLength:o=75,punctuation:r=p,allowWhitespace:l=!1}){return n.useCallback(n=>{const i=new RegExp("(^|\\s|\\()(["+e+"]((?:"+("[^"+e+r+(l?"":"\\s")+"]")+"){0,"+o+"}))$").exec(n);if(null!==i){const e=i[1],n=i[3];if(n.length>=t)return{leadOffset:i.index+e.length,matchingString:n,replaceableString:i[2]}}return null},[l,e,r,o,t])},exports.useDynamicPositioning=a;
|
|
@@ -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{createCommand as e,COMMAND_PRIORITY_LOW as n,KEY_ARROW_DOWN_COMMAND as o,KEY_ARROW_UP_COMMAND as r,KEY_ESCAPE_COMMAND as l,KEY_TAB_COMMAND as i,KEY_ENTER_COMMAND as u,$getSelection as s,$isRangeSelection as c,$isTextNode as a,getDOMSelection as d}from"lexical";import m,{useLayoutEffect as f,useEffect as p,useRef as g,useCallback as h,useState as w,useMemo as y}from"react";import{mergeRegister as v}from"@lexical/utils";import{jsx as b}from"react/jsx-runtime";const C="startTransition";const E="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,x=E?f:p;class R{key;ref;constructor(t){this.key=t,this.ref={current:null},this.setRefElement=this.setRefElement.bind(this)}setRefElement(t){this.ref={current:t}}}const S=t=>{const e=document.getElementById("typeahead-menu");if(!e)return;const n=e.getBoundingClientRect();n.top+n.height>window.innerHeight&&e.scrollIntoView({block:"center"}),n.top<0&&e.scrollIntoView({block:"center"}),t.scrollIntoView({block:"nearest"})};function O(t,e){const n=t.getBoundingClientRect(),o=e.getBoundingClientRect();return n.top>=o.top-6&&n.top<=o.bottom+6}function I(e,n,o,r){const[l]=t();p(()=>{if(null!=n&&null!=e){const t=l.getRootElement(),e=null!=t?function(t){let e=getComputedStyle(t);const n="absolute"===e.position,o=/(auto|scroll)/;if("fixed"===e.position)return document.body;for(let r=t;r=r.parentElement;)if(e=getComputedStyle(r),(!n||"static"!==e.position)&&o.test(e.overflow+e.overflowY+e.overflowX))return r;return document.body}(t):document.body;let i=!1,u=O(n,e);const s=function(){i||(window.requestAnimationFrame(function(){o(),i=!1}),i=!0);const t=O(n,e);t!==u&&(u=t,null!=r&&r(t))},c=new ResizeObserver(o);return window.addEventListener("resize",o),document.addEventListener("scroll",s,{capture:!0,passive:!0}),c.observe(n),()=>{c.unobserve(n),window.removeEventListener("resize",o),document.removeEventListener("scroll",s,!0)}}},[n,l,r,o,e])}const A=e("SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND");function P({close:t,editor:e,anchorElementRef:a,resolution:d,options:m,menuRenderFn:f,onSelectOption:g,shouldSplitNodeWithQuery:b=!1,commandPriority:C=n,preselectFirstItem:E=!0}){const[R,O]=w(null),I=null!==R?Math.min(m.length-1,R):null,P=d.match&&d.match.matchingString;p(()=>{E&&O(0)},[P,E]);const T=h(n=>{e.update(()=>{const e=null!=d.match&&b?function(t){const e=s();if(!c(e)||!e.isCollapsed())return null;const n=e.anchor;if("text"!==n.type)return null;const o=n.getNode();if(!o.isSimpleText())return null;const r=n.offset,l=o.getTextContent().slice(0,r),i=t.replaceableString.length,u=r-function(t,e,n){let o=n;for(let n=o;n<=e.length;n++)t.slice(-n)===e.substring(0,n)&&(o=n);return o}(l,t.matchingString,i);if(u<0)return null;let a;return 0===u?[a]=o.splitText(r):[,a]=o.splitText(u,r),a}(d.match):null;g(n,e,t,d.match?d.match.matchingString:"")})},[e,b,d.match,g,t]),N=h(t=>{const n=e.getRootElement();null!==n&&(n.setAttribute("aria-activedescendant","typeahead-item-"+t),O(t))},[e]);p(()=>()=>{const t=e.getRootElement();null!==t&&t.removeAttribute("aria-activedescendant")},[e]),x(()=>{null===m?O(null):null===I&&E&&N(0)},[m,I,N,E]),p(()=>v(e.registerCommand(A,({option:t})=>!(!t.ref||null==t.ref.current)&&(S(t.ref.current),!0),C)),[e,N,C]),p(()=>v(e.registerCommand(o,t=>{const n=t;if(null!==m&&m.length){const t=null===I?0:I!==m.length-1?I+1:0;N(t);const o=m[t];if(!o)return N(-1),n.preventDefault(),n.stopImmediatePropagation(),!0;o.ref&&o.ref.current&&e.dispatchCommand(A,{index:t,option:o}),n.preventDefault(),n.stopImmediatePropagation()}return!0},C),e.registerCommand(r,t=>{const e=t;if(null!==m&&m.length){const t=null===I?m.length-1:0!==I?I-1:m.length-1;N(t);const n=m[t];if(!n)return N(-1),e.preventDefault(),e.stopImmediatePropagation(),!0;n.ref&&n.ref.current&&S(n.ref.current),e.preventDefault(),e.stopImmediatePropagation()}return!0},C),e.registerCommand(l,e=>{const n=e;return n.preventDefault(),n.stopImmediatePropagation(),t(),!0},C),e.registerCommand(i,t=>{const e=t;return null!==m&&null!==I&&null!=m[I]&&(e.preventDefault(),e.stopImmediatePropagation(),T(m[I]),!0)},C),e.registerCommand(u,t=>null!==m&&null!==I&&null!=m[I]&&(null!==t&&(t.preventDefault(),t.stopImmediatePropagation()),T(m[I]),!0),C)),[T,t,e,m,I,N,C]);return f(a,y(()=>({options:m,selectOptionAndCleanUp:T,selectedIndex:I,setHighlightedIndex:O}),[T,I,m]),d.match?d.match.matchingString:"")}function T(t,e){null!=e&&(t.className=e),t.setAttribute("aria-label","Typeahead menu"),t.setAttribute("role","listbox"),t.style.display="block",t.style.position="absolute"}const N="\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;";function L(t,e){let n=getComputedStyle(t);const o="absolute"===n.position,r=e?/(auto|scroll|hidden)/:/(auto|scroll)/;if("fixed"===n.position)return document.body;for(let e=t;e=e.parentElement;)if(n=getComputedStyle(e),(!o||"static"!==n.position)&&r.test(n.overflow+n.overflowY+n.overflowX))return e;return document.body}const _=e("SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND");function D(t,{minLength:e=1,maxLength:n=75,punctuation:o=N,allowWhitespace:r=!1}){return h(l=>{const i=new RegExp("(^|\\s|\\()(["+t+"]((?:"+("[^"+t+o+(r?"":"\\s")+"]")+"){0,"+n+"}))$").exec(l);if(null!==i){const t=i[1],n=i[3];if(n.length>=e)return{leadOffset:i.index+t.length,matchingString:n,replaceableString:i[2]}}return null},[r,t,o,n,e])}function $({options:e,onQueryChange:o,onSelectOption:r,onOpen:l,onClose:i,menuRenderFn:u,triggerFn:f,anchorClassName:y,commandPriority:v=n,parent:x,preselectFirstItem:R=!0,ignoreEntityBoundary:S=!1}){const[O]=t(),[A,N]=w(null),L=function(e,n,o,r=(E?document.body:void 0),l=!0){const[i]=t(),u=E?document.createElement("div"):null,s=g(u),c=h(()=>{if(null===s.current||void 0===r)return;s.current.style.top=s.current.style.bottom;const t=i.getRootElement(),n=s.current,u=n.firstChild;if(null!==t&&null!==e){const{left:i,top:c,width:a,height:d}=e.getRect(),m=s.current.offsetHeight;if(n.style.top=`${c+m+3+(l?window.pageYOffset:0)}px`,n.style.left=`${i+window.pageXOffset}px`,n.style.height=`${d}px`,n.style.width=`${a}px`,null!==u){u.style.top=`${c}`;const e=u.getBoundingClientRect(),o=e.height,r=e.width,s=t.getBoundingClientRect();i+r>s.right&&(n.style.left=`${s.right-r+window.pageXOffset}px`),(c+o>window.innerHeight||c+o>s.bottom)&&c-s.top>o+d&&(n.style.top=`${c-o-d+(l?window.pageYOffset:0)}px`)}n.isConnected||(T(n,o),r.append(n)),n.setAttribute("id","typeahead-menu"),t.setAttribute("aria-controls","typeahead-menu")}},[i,e,l,o,r]);p(()=>{const t=i.getRootElement();return null!==e&&c(),()=>{null!==t&&t.removeAttribute("aria-controls");const e=s.current;null!==e&&e.isConnected&&(e.remove(),e.removeAttribute("id"))}},[i,c,e]);const a=h(t=>{null!==e&&(t||n(null))},[e,n]);return I(e,s.current,c,a),null!=u&&u===s.current&&(T(u,o),null!=r&&r.append(u)),s}(A,N,y,x),_=h(()=>{N(null),null!=i&&null!==A&&i()},[i,A]),D=h(t=>{N(t),null!=l&&null===A&&l(t)},[l,A]);return p(()=>{const t=O.registerUpdateListener(()=>{O.getEditorState().read(()=>{if(!O.isEditable())return void _();if(O.isComposing())return;const t=O._window||window,e=t.document.createRange(),n=s(),r=function(t){let e=null;return t.getEditorState().read(()=>{const t=s();c(t)&&(e=function(t){const e=t.anchor;if("text"!==e.type)return null;const n=e.getNode();if(!n.isSimpleText())return null;const o=e.offset;return n.getTextContent().slice(0,o)}(t))}),e}(O);if(!c(n)||!n.isCollapsed()||null===r||null===e)return void _();const l=f(r,O);if(o(l?l.matchingString:null),null!==l&&(S||!function(t,e){return 0===e&&t.getEditorState().read(()=>{const t=s();if(c(t)){const e=t.anchor.getNode().getPreviousSibling();return a(e)&&e.isTextEntity()}return!1})}(O,l.leadOffset))){const n=function(t,e,n){const o=d(n);if(null===o||!o.isCollapsed)return!1;const r=o.anchorNode,l=t,i=o.anchorOffset;if(null==r||null==i)return!1;try{e.setStart(r,l),e.setEnd(r,i)}catch(t){return!1}return!0}(l.leadOffset,e,t);if(null!==n)return i=()=>D({getRect:()=>e.getBoundingClientRect(),match:l}),void(C in m?m[C](i):i())}var i;_()})});return()=>{t()}},[O,f,o,A,_,D,S]),p(()=>O.registerEditableListener(t=>{t||_()}),[O,_]),null===A||null===O||null===L.current?null:b(P,{close:_,resolution:A,editor:O,anchorElementRef:L,options:e,menuRenderFn:u,shouldSplitNodeWithQuery:!0,onSelectOption:r,commandPriority:v,preselectFirstItem:R})}export{$ as LexicalTypeaheadMenuPlugin,R as MenuOption,N as PUNCTUATION,_ as SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND,L as getScrollParent,D as useBasicTypeaheadTriggerMatch,I as useDynamicPositioning};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
import type { EditorChildrenComponentProps, ReactConfig, ReactOutputs } from './shared/types';
|
|
9
|
+
import type { LexicalComposerContextWithEditor } from '@lexical/react/LexicalComposerContext';
|
|
10
|
+
export type { EditorChildrenComponentProps, ReactConfig, ReactOutputs };
|
|
11
|
+
/**
|
|
12
|
+
* @example
|
|
13
|
+
* The default EditorChildrenComponent implementation
|
|
14
|
+
* ```jsx
|
|
15
|
+
* return (
|
|
16
|
+
* <>
|
|
17
|
+
* {contentEditable}
|
|
18
|
+
* {children}
|
|
19
|
+
* </>
|
|
20
|
+
* );
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare function DefaultEditorChildrenComponent({ contentEditable, children, }: EditorChildrenComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
/**
|
|
25
|
+
* An extension to use or configure React for use with Lexical. In an editor, you
|
|
26
|
+
* would typically use {@link LexicalExtensionComposer} (for React projects) or
|
|
27
|
+
* {@link ReactPluginHostExtension} (to use React Extensions and plug-ins in a non-React
|
|
28
|
+
* project).
|
|
29
|
+
*
|
|
30
|
+
* See {@link ReactConfig} for more detailed exextensionations of how to use
|
|
31
|
+
* the config for this Extension.
|
|
32
|
+
*
|
|
33
|
+
* For an Extension developer, you can defineConfig() override the extension with
|
|
34
|
+
* decorators to add JSX inside the editor context that is not
|
|
35
|
+
* location-dependent (e.g. floating UI that does not need to be mounted in
|
|
36
|
+
* some specific location, or effects that return null).
|
|
37
|
+
*/
|
|
38
|
+
export declare const ReactExtension: import("lexical").LexicalExtension<ReactConfig, "@lexical/react/React", {
|
|
39
|
+
Component: (props: Partial<import("./shared/types").EditorComponentProps>) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
context: LexicalComposerContextWithEditor;
|
|
41
|
+
}, unknown>;
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
import type { DecoratorComponentProps } from './shared/types';
|
|
9
|
+
import type { JSX } from 'react';
|
|
10
|
+
import { type AnyLexicalExtension, type LexicalEditor, type LexicalExtensionOutput } from 'lexical';
|
|
11
|
+
import * as React from 'react';
|
|
12
|
+
import { type Container, type Root } from 'react-dom/client';
|
|
13
|
+
export type { DecoratorComponentProps };
|
|
14
|
+
export interface HostMountCommandArg {
|
|
15
|
+
root: Root;
|
|
16
|
+
}
|
|
17
|
+
export interface MountPluginCommandArg {
|
|
18
|
+
key: string;
|
|
19
|
+
element: JSX.Element | null;
|
|
20
|
+
domNode?: Element | DocumentFragment | null;
|
|
21
|
+
}
|
|
22
|
+
export declare function mountReactExtensionComponent<Extension extends AnyLexicalExtension>(editor: LexicalEditor, opts: {
|
|
23
|
+
extension: Extension;
|
|
24
|
+
props: [LexicalExtensionOutput<Extension>] extends [
|
|
25
|
+
{
|
|
26
|
+
Component: infer OutputComponentType extends React.ComponentType;
|
|
27
|
+
}
|
|
28
|
+
] ? /** The Props from the Extension output Component */ React.ComponentProps<OutputComponentType> | null : never;
|
|
29
|
+
} & Omit<MountPluginCommandArg, 'element'>): void;
|
|
30
|
+
export declare function mountReactPluginComponent<P extends Record<never, never> = Record<never, never>>(editor: LexicalEditor, opts: {
|
|
31
|
+
Component: React.ComponentType<P>;
|
|
32
|
+
props: (P & React.Attributes) | null;
|
|
33
|
+
} & Omit<MountPluginCommandArg, 'element'>): void;
|
|
34
|
+
export declare function mountReactPluginElement(editor: LexicalEditor, opts: MountPluginCommandArg): void;
|
|
35
|
+
export declare function mountReactPluginHost(editor: LexicalEditor, container: Container): void;
|
|
36
|
+
export declare const REACT_PLUGIN_HOST_MOUNT_ROOT_COMMAND: import("lexical").LexicalCommand<HostMountCommandArg>;
|
|
37
|
+
export declare const REACT_PLUGIN_HOST_MOUNT_PLUGIN_COMMAND: import("lexical").LexicalCommand<MountPluginCommandArg>;
|
|
38
|
+
/**
|
|
39
|
+
* This extension provides a React host for editors that are not built
|
|
40
|
+
* with LexicalExtensionComposer (e.g. you are using Vanilla JS or some
|
|
41
|
+
* other framework).
|
|
42
|
+
*
|
|
43
|
+
* You must use {@link mountReactPluginHost} for any React content to work.
|
|
44
|
+
* Afterwards, you may use {@link mountReactExtensionComponent} to
|
|
45
|
+
* render UI for a specific React Extension.
|
|
46
|
+
* {@link mountReactPluginComponent} and
|
|
47
|
+
* {@link mountReactPluginElement} can be used to render
|
|
48
|
+
* legacy React plug-ins (or any React content).
|
|
49
|
+
*/
|
|
50
|
+
export declare const ReactPluginHostExtension: import("lexical").LexicalExtension<import("lexical").ExtensionConfigBase, "@lexical/react/ReactPluginHost", {
|
|
51
|
+
mountReactPlugin: (arg: MountPluginCommandArg) => void;
|
|
52
|
+
mountReactPluginHost: (container: Container) => boolean;
|
|
53
|
+
mountedPluginsStore: import("@preact/signals-core").Signal<{
|
|
54
|
+
plugins: Map<string, MountPluginCommandArg>;
|
|
55
|
+
}>;
|
|
56
|
+
}, unknown>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An extension used to declare that there is a LexicalExtensionComposer or
|
|
3
|
+
* ReactPluginHostExtension available so that we can issue runtime warnings
|
|
4
|
+
* when plugins that depend on React are hosted in an environment
|
|
5
|
+
* where it is not ever going to be rendered.
|
|
6
|
+
*
|
|
7
|
+
* It is a separate extension so it can be used as a peer dependency.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ReactProviderExtension: import("lexical").LexicalExtension<import("lexical").ExtensionConfigBase, "@lexical/react/ReactProvider", unknown, unknown>;
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
import type { JSX } from 'react';
|
|
9
|
+
import { TreeView } from '@lexical/react/LexicalTreeView';
|
|
10
|
+
export type TreeViewConfig = Omit<Parameters<typeof TreeView>[0], 'editor'>;
|
|
11
|
+
export declare function TreeViewExtensionComponent(props: Partial<TreeViewConfig>): JSX.Element;
|
|
12
|
+
/**
|
|
13
|
+
* Provides a configured TreeView debugging tool (React dependent)
|
|
14
|
+
* as an output component with configurable class names.
|
|
15
|
+
*/
|
|
16
|
+
export declare const TreeViewExtension: import("lexical").LexicalExtension<TreeViewConfig, "@lexical/react/TreeView", {
|
|
17
|
+
Component: typeof TreeViewExtensionComponent;
|
|
18
|
+
}, unknown>;
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
import type { JSX } from 'react';
|
|
9
|
+
import { type LexicalEditor } from 'lexical';
|
|
10
|
+
import { type ErrorBoundaryType } from './useDecorators';
|
|
11
|
+
export { type ErrorBoundaryType };
|
|
12
|
+
/**
|
|
13
|
+
* @internal
|
|
14
|
+
*
|
|
15
|
+
* When using @lexical/extension, the ReactProvider is expected to handle
|
|
16
|
+
* rendering decorators. This component allows RichTextPlugin and
|
|
17
|
+
* PlainTextPlugin to be used in extension projects that have not yet
|
|
18
|
+
* migrated to use RichTextExtension or PlainTextExtension.
|
|
19
|
+
**/
|
|
20
|
+
export declare function LegacyDecorators({ editor, ErrorBoundary, }: {
|
|
21
|
+
editor: LexicalEditor;
|
|
22
|
+
ErrorBoundary: ErrorBoundaryType;
|
|
23
|
+
}): JSX.Element | null;
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
import type { LexicalEditor } from 'lexical';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
export type ContentEditableElementProps = {
|
|
11
|
+
editor: LexicalEditor;
|
|
12
|
+
ariaActiveDescendant?: React.AriaAttributes['aria-activedescendant'];
|
|
13
|
+
ariaAutoComplete?: React.AriaAttributes['aria-autocomplete'];
|
|
14
|
+
ariaControls?: React.AriaAttributes['aria-controls'];
|
|
15
|
+
ariaDescribedBy?: React.AriaAttributes['aria-describedby'];
|
|
16
|
+
ariaErrorMessage?: React.AriaAttributes['aria-errormessage'];
|
|
17
|
+
ariaExpanded?: React.AriaAttributes['aria-expanded'];
|
|
18
|
+
ariaInvalid?: React.AriaAttributes['aria-invalid'];
|
|
19
|
+
ariaLabel?: React.AriaAttributes['aria-label'];
|
|
20
|
+
ariaLabelledBy?: React.AriaAttributes['aria-labelledby'];
|
|
21
|
+
ariaMultiline?: React.AriaAttributes['aria-multiline'];
|
|
22
|
+
ariaOwns?: React.AriaAttributes['aria-owns'];
|
|
23
|
+
ariaRequired?: React.AriaAttributes['aria-required'];
|
|
24
|
+
autoCapitalize?: HTMLDivElement['autocapitalize'];
|
|
25
|
+
'data-testid'?: string | null | undefined;
|
|
26
|
+
} & Omit<React.AllHTMLAttributes<HTMLDivElement>, 'placeholder'>;
|
|
27
|
+
export declare const ContentEditableElement: React.ForwardRefExoticComponent<{
|
|
28
|
+
editor: LexicalEditor;
|
|
29
|
+
ariaActiveDescendant?: React.AriaAttributes["aria-activedescendant"];
|
|
30
|
+
ariaAutoComplete?: React.AriaAttributes["aria-autocomplete"];
|
|
31
|
+
ariaControls?: React.AriaAttributes["aria-controls"];
|
|
32
|
+
ariaDescribedBy?: React.AriaAttributes["aria-describedby"];
|
|
33
|
+
ariaErrorMessage?: React.AriaAttributes["aria-errormessage"];
|
|
34
|
+
ariaExpanded?: React.AriaAttributes["aria-expanded"];
|
|
35
|
+
ariaInvalid?: React.AriaAttributes["aria-invalid"];
|
|
36
|
+
ariaLabel?: React.AriaAttributes["aria-label"];
|
|
37
|
+
ariaLabelledBy?: React.AriaAttributes["aria-labelledby"];
|
|
38
|
+
ariaMultiline?: React.AriaAttributes["aria-multiline"];
|
|
39
|
+
ariaOwns?: React.AriaAttributes["aria-owns"];
|
|
40
|
+
ariaRequired?: React.AriaAttributes["aria-required"];
|
|
41
|
+
autoCapitalize?: HTMLDivElement["autocapitalize"];
|
|
42
|
+
'data-testid'?: string | null | undefined;
|
|
43
|
+
} & Omit<React.AllHTMLAttributes<HTMLDivElement>, "placeholder"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
import type { JSX } from 'react';
|
|
9
|
+
import { CommandListenerPriority, LexicalCommand, LexicalEditor, TextNode } from 'lexical';
|
|
10
|
+
import { ReactPortal, RefObject } from 'react';
|
|
11
|
+
export type MenuTextMatch = {
|
|
12
|
+
leadOffset: number;
|
|
13
|
+
matchingString: string;
|
|
14
|
+
replaceableString: string;
|
|
15
|
+
};
|
|
16
|
+
export type MenuResolution = {
|
|
17
|
+
match?: MenuTextMatch;
|
|
18
|
+
getRect: () => DOMRect;
|
|
19
|
+
};
|
|
20
|
+
export declare const PUNCTUATION = "\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;";
|
|
21
|
+
export declare class MenuOption {
|
|
22
|
+
key: string;
|
|
23
|
+
ref?: RefObject<HTMLElement | null>;
|
|
24
|
+
constructor(key: string);
|
|
25
|
+
setRefElement(element: HTMLElement | null): void;
|
|
26
|
+
}
|
|
27
|
+
export type MenuRenderFn<TOption extends MenuOption> = (anchorElementRef: RefObject<HTMLElement | null>, itemProps: {
|
|
28
|
+
selectedIndex: number | null;
|
|
29
|
+
selectOptionAndCleanUp: (option: TOption) => void;
|
|
30
|
+
setHighlightedIndex: (index: number) => void;
|
|
31
|
+
options: Array<TOption>;
|
|
32
|
+
}, matchingString: string | null) => ReactPortal | JSX.Element | null;
|
|
33
|
+
export declare function getScrollParent(element: HTMLElement, includeHidden: boolean): HTMLElement | HTMLBodyElement;
|
|
34
|
+
export declare function useDynamicPositioning(resolution: MenuResolution | null, targetElement: HTMLElement | null, onReposition: () => void, onVisibilityChange?: (isInView: boolean) => void): void;
|
|
35
|
+
export declare const SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND: LexicalCommand<{
|
|
36
|
+
index: number;
|
|
37
|
+
option: MenuOption;
|
|
38
|
+
}>;
|
|
39
|
+
export declare function LexicalMenu<TOption extends MenuOption>({ close, editor, anchorElementRef, resolution, options, menuRenderFn, onSelectOption, shouldSplitNodeWithQuery, commandPriority, preselectFirstItem, }: {
|
|
40
|
+
close: () => void;
|
|
41
|
+
editor: LexicalEditor;
|
|
42
|
+
anchorElementRef: RefObject<HTMLElement | null>;
|
|
43
|
+
resolution: MenuResolution;
|
|
44
|
+
options: Array<TOption>;
|
|
45
|
+
shouldSplitNodeWithQuery?: boolean;
|
|
46
|
+
menuRenderFn: MenuRenderFn<TOption>;
|
|
47
|
+
onSelectOption: (option: TOption, textNodeContainingQuery: TextNode | null, closeMenu: () => void, matchingString: string) => void;
|
|
48
|
+
commandPriority?: CommandListenerPriority;
|
|
49
|
+
preselectFirstItem?: boolean;
|
|
50
|
+
}): JSX.Element | null;
|
|
51
|
+
export declare function useMenuAnchorRef(resolution: MenuResolution | null, setResolution: (r: MenuResolution | null) => void, className?: string, parent?: HTMLElement | undefined, shouldIncludePageYOffset__EXPERIMENTAL?: boolean): RefObject<HTMLElement | null>;
|
|
52
|
+
export type TriggerFn = (text: string, editor: LexicalEditor) => MenuTextMatch | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
import { type LexicalComposerContextWithEditor } from '@lexical/react/LexicalComposerContext';
|
|
9
|
+
import { type EditorComponentProps, type ReactConfig } from './types';
|
|
10
|
+
/** @internal */
|
|
11
|
+
export declare function buildEditorComponent(config: ReactConfig, context: LexicalComposerContextWithEditor): (props: Partial<EditorComponentProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -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
|
+
import type { Ref } from 'react';
|
|
9
|
+
export declare function mergeRefs<T>(...refs: Ref<T>[]): (value: null | T) => void;
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
export declare class Point {
|
|
9
|
+
private readonly _x;
|
|
10
|
+
private readonly _y;
|
|
11
|
+
constructor(x: number, y: number);
|
|
12
|
+
get x(): number;
|
|
13
|
+
get y(): number;
|
|
14
|
+
equals({ x, y }: Point): boolean;
|
|
15
|
+
calcDeltaXTo({ x }: Point): number;
|
|
16
|
+
calcDeltaYTo({ y }: Point): number;
|
|
17
|
+
calcHorizontalDistanceTo(point: Point): number;
|
|
18
|
+
calcVerticalDistance(point: Point): number;
|
|
19
|
+
calcDistanceTo(point: Point): number;
|
|
20
|
+
}
|
|
21
|
+
export declare function isPoint(x: unknown): x is Point;
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
import { Point } from './point';
|
|
9
|
+
type ContainsPointReturn = {
|
|
10
|
+
result: boolean;
|
|
11
|
+
reason: {
|
|
12
|
+
isOnTopSide: boolean;
|
|
13
|
+
isOnBottomSide: boolean;
|
|
14
|
+
isOnLeftSide: boolean;
|
|
15
|
+
isOnRightSide: boolean;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare class Rectangle {
|
|
19
|
+
private readonly _left;
|
|
20
|
+
private readonly _top;
|
|
21
|
+
private readonly _right;
|
|
22
|
+
private readonly _bottom;
|
|
23
|
+
constructor(left: number, top: number, right: number, bottom: number);
|
|
24
|
+
get top(): number;
|
|
25
|
+
get right(): number;
|
|
26
|
+
get bottom(): number;
|
|
27
|
+
get left(): number;
|
|
28
|
+
get width(): number;
|
|
29
|
+
get height(): number;
|
|
30
|
+
equals({ top, left, bottom, right }: Rectangle): boolean;
|
|
31
|
+
contains({ x, y }: Point): ContainsPointReturn;
|
|
32
|
+
contains({ top, left, bottom, right }: Rectangle): boolean;
|
|
33
|
+
intersectsWith(rect: Rectangle): boolean;
|
|
34
|
+
generateNewRect({ left, top, right, bottom, }: {
|
|
35
|
+
left?: number | undefined;
|
|
36
|
+
top?: number | undefined;
|
|
37
|
+
right?: number | undefined;
|
|
38
|
+
bottom?: number | undefined;
|
|
39
|
+
}): Rectangle;
|
|
40
|
+
static fromLTRB(left: number, top: number, right: number, bottom: number): Rectangle;
|
|
41
|
+
static fromLWTH(left: number, width: number, top: number, height: number): Rectangle;
|
|
42
|
+
static fromPoints(startPoint: Point, endPoint: Point): Rectangle;
|
|
43
|
+
static fromDOM(dom: HTMLElement): Rectangle;
|
|
44
|
+
}
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,89 @@
|
|
|
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
|
+
import type { LexicalComposerContextWithEditor } from '@lexical/react/LexicalComposerContext';
|
|
9
|
+
import type { JSX } from 'react';
|
|
10
|
+
export interface EditorChildrenComponentProps {
|
|
11
|
+
context: LexicalComposerContextWithEditor;
|
|
12
|
+
contentEditable: null | JSX.Element;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export type EditorChildrenComponentType = (props: EditorChildrenComponentProps) => JSX.Element | null;
|
|
16
|
+
export interface DecoratorComponentProps {
|
|
17
|
+
context: LexicalComposerContextWithEditor;
|
|
18
|
+
}
|
|
19
|
+
export type DecoratorComponentType = JSX.Element | ((props: DecoratorComponentProps) => JSX.Element | null);
|
|
20
|
+
export interface EditorComponentProps {
|
|
21
|
+
/**
|
|
22
|
+
* The EditorChildrenComponent from the config
|
|
23
|
+
*/
|
|
24
|
+
EditorChildrenComponent: EditorChildrenComponentType;
|
|
25
|
+
/**
|
|
26
|
+
* The children to pass to EditorChildrenComponent
|
|
27
|
+
*/
|
|
28
|
+
children?: React.ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* contentEditable from the config
|
|
31
|
+
*/
|
|
32
|
+
contentEditable: JSX.Element | null;
|
|
33
|
+
/**
|
|
34
|
+
* ErrorBoundary from the config
|
|
35
|
+
*/
|
|
36
|
+
ErrorBoundary: ErrorBoundaryType;
|
|
37
|
+
}
|
|
38
|
+
export type EditorComponentType = (
|
|
39
|
+
/** Optional overrides to any of the props, typically only children is used */
|
|
40
|
+
props: Partial<EditorComponentProps>) => JSX.Element;
|
|
41
|
+
export interface ReactConfig {
|
|
42
|
+
/**
|
|
43
|
+
* The default root element of the editor as JSX. Uses `<ContentEditable />`
|
|
44
|
+
* from \@lexical/react/ContentEditable by default,
|
|
45
|
+
* but may be null or another component.
|
|
46
|
+
*
|
|
47
|
+
* This component is responsible for calling `editor.setRootElement(elem)`.
|
|
48
|
+
*/
|
|
49
|
+
contentEditable: JSX.Element | null;
|
|
50
|
+
/**
|
|
51
|
+
* The ErrorBoundary used for rendering decorators in the editor. By default
|
|
52
|
+
* it is `ErrorBoundary` from \@lexical/react/ErrorBoundary.
|
|
53
|
+
*/
|
|
54
|
+
ErrorBoundary: ErrorBoundaryType;
|
|
55
|
+
/**
|
|
56
|
+
* The component that renders the children of the editor context, by default
|
|
57
|
+
* it is {@link DefaultEditorChildrenComponent} which takes the given props
|
|
58
|
+
* and renders them in this order:
|
|
59
|
+
*
|
|
60
|
+
* - contentEditable
|
|
61
|
+
* - children
|
|
62
|
+
*/
|
|
63
|
+
EditorChildrenComponent: EditorChildrenComponentType;
|
|
64
|
+
/**
|
|
65
|
+
* An array of JSX or components that return JSX that should be rendered
|
|
66
|
+
* as children of Component. These will be merged by array concatenation.
|
|
67
|
+
*/
|
|
68
|
+
decorators: readonly DecoratorComponentType[];
|
|
69
|
+
}
|
|
70
|
+
export interface ReactOutputs {
|
|
71
|
+
/**
|
|
72
|
+
* The editor component, this can be used by Extensions that depend on this to
|
|
73
|
+
* render the editor such as {@link ReactPluginHostExtension} or internally by
|
|
74
|
+
* {@link LexicalExtensionComposer}.
|
|
75
|
+
*
|
|
76
|
+
* All props have defaults based on the config and editor state, but may be
|
|
77
|
+
* overridden.
|
|
78
|
+
*/
|
|
79
|
+
Component: EditorComponentType;
|
|
80
|
+
/**
|
|
81
|
+
* This is equivalent to useLexicalComposerContext() from \@lexical/react/LexicalComposerContext.
|
|
82
|
+
*/
|
|
83
|
+
context: LexicalComposerContextWithEditor;
|
|
84
|
+
}
|
|
85
|
+
export interface ErrorBoundaryProps {
|
|
86
|
+
children: JSX.Element;
|
|
87
|
+
onError: (error: Error) => void;
|
|
88
|
+
}
|
|
89
|
+
export type ErrorBoundaryType = React.ComponentClass<ErrorBoundaryProps> | React.FC<ErrorBoundaryProps>;
|
|
@@ -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
|
+
import type { LexicalEditor } from 'lexical';
|
|
9
|
+
export declare function useCanShowPlaceholder(editor: LexicalEditor): boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
import type { LexicalEditor } from 'lexical';
|
|
9
|
+
import { OverflowNode } from '@lexical/overflow';
|
|
10
|
+
type OptionalProps = {
|
|
11
|
+
remainingCharacters?: (characters: number) => void;
|
|
12
|
+
strlen?: (input: string) => number;
|
|
13
|
+
};
|
|
14
|
+
export declare function useCharacterLimit(editor: LexicalEditor, maxCharacters: number, optional?: OptionalProps): void;
|
|
15
|
+
export declare function $mergePrevious(overflowNode: OverflowNode): void;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
import type { LexicalEditor } from 'lexical';
|
|
9
|
+
import type { JSX } from 'react';
|
|
10
|
+
import * as React from 'react';
|
|
11
|
+
type ErrorBoundaryProps = {
|
|
12
|
+
children: JSX.Element;
|
|
13
|
+
onError: (error: Error) => void;
|
|
14
|
+
};
|
|
15
|
+
export type ErrorBoundaryType = React.ComponentClass<ErrorBoundaryProps> | React.FC<ErrorBoundaryProps>;
|
|
16
|
+
export declare function useDecorators(editor: LexicalEditor, ErrorBoundary: ErrorBoundaryType): Array<JSX.Element>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
import type { HistoryState } from '@lexical/history';
|
|
9
|
+
import type { LexicalEditor } from 'lexical';
|
|
10
|
+
export declare function useHistory(editor: LexicalEditor, externalHistoryState?: HistoryState, delay?: number): void;
|
|
@@ -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
|
+
import type { LexicalEditor } from 'lexical';
|
|
9
|
+
export declare function useList(editor: LexicalEditor): void;
|
|
@@ -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
|
+
import type { LexicalEditor } from 'lexical';
|
|
9
|
+
export declare function usePlainTextSetup(editor: LexicalEditor): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
import type { LexicalEditor } from 'lexical';
|
|
9
|
+
import type { JSX } from 'react';
|
|
10
|
+
import { type ErrorBoundaryType } from './types';
|
|
11
|
+
/** @internal */
|
|
12
|
+
export declare function useReactDecorators(editor: LexicalEditor, ErrorBoundary: ErrorBoundaryType): JSX.Element[];
|
|
@@ -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
|
+
import type { LexicalEditor } from 'lexical';
|
|
9
|
+
export declare function useRichTextSetup(editor: LexicalEditor): void;
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
import type { BaseBinding, Binding, BindingV2, ExcludedProperties, Provider, SyncCursorPositionsFn } from '@lexical/yjs';
|
|
9
|
+
import type { LexicalEditor } from 'lexical';
|
|
10
|
+
import type { JSX } from 'react';
|
|
11
|
+
import * as React from 'react';
|
|
12
|
+
import { Doc } from 'yjs';
|
|
13
|
+
import { InitialEditorStateType } from '../LexicalComposer';
|
|
14
|
+
export type CursorsContainerRef = React.RefObject<HTMLElement | null>;
|
|
15
|
+
export declare function useYjsCollaboration(editor: LexicalEditor, id: string, provider: Provider, docMap: Map<string, Doc>, name: string, color: string, shouldBootstrap: boolean, binding: Binding, setDoc: React.Dispatch<React.SetStateAction<Doc | undefined>>, cursorsContainerRef?: CursorsContainerRef, initialEditorState?: InitialEditorStateType, awarenessData?: object, syncCursorPositionsFn?: SyncCursorPositionsFn): JSX.Element;
|
|
16
|
+
export declare function useYjsCollaborationV2__EXPERIMENTAL(editor: LexicalEditor, id: string, doc: Doc, provider: Provider, docMap: Map<string, Doc>, name: string, color: string, options?: {
|
|
17
|
+
awarenessData?: object;
|
|
18
|
+
excludedProperties?: ExcludedProperties;
|
|
19
|
+
rootName?: string;
|
|
20
|
+
__shouldBootstrapUnsafe?: boolean;
|
|
21
|
+
}): BindingV2;
|
|
22
|
+
export declare function useYjsCursors(binding: BaseBinding, cursorsContainerRef?: CursorsContainerRef): JSX.Element;
|
|
23
|
+
export declare function useYjsFocusTracking(editor: LexicalEditor, provider: Provider, name: string, color: string, awarenessData?: object): void;
|
|
24
|
+
export declare function useYjsHistory(editor: LexicalEditor, binding: Binding): () => void;
|
|
25
|
+
export declare function useYjsHistoryV2(editor: LexicalEditor, binding: BindingV2): () => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type AnyLexicalExtension, type LexicalExtensionDependency, type OutputComponentExtension } from 'lexical';
|
|
2
|
+
export declare function useExtensionDependency<Extension extends AnyLexicalExtension>(extension: Extension): LexicalExtensionDependency<Extension>;
|
|
3
|
+
/**
|
|
4
|
+
* Use a Component from the given Extension that uses the ReactExtension convention
|
|
5
|
+
* of exposing a Component property in its output.
|
|
6
|
+
*
|
|
7
|
+
* @param extension - An extension with a Component property in the output
|
|
8
|
+
* @returns `getExtensionConfigFromEditor(useLexicalComposerContext()[0], extension).Component`
|
|
9
|
+
*/
|
|
10
|
+
export declare function useExtensionComponent<Props extends Record<never, never>, OutputComponent extends React.ComponentType<Props>, Extension extends OutputComponentExtension<OutputComponent>>(extension: Extension): OutputComponent;
|