@lexical/react 0.35.1-nightly.20250924.0 → 0.36.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/ExtensionComponent.d.ts +42 -0
- package/LexicalAutoEmbedPlugin.dev.js +2 -0
- package/LexicalAutoEmbedPlugin.dev.mjs +2 -0
- package/LexicalAutoEmbedPlugin.prod.js +1 -1
- package/LexicalAutoEmbedPlugin.prod.mjs +1 -1
- package/LexicalAutoLinkPlugin.d.ts +2 -17
- package/LexicalAutoLinkPlugin.dev.js +7 -309
- package/LexicalAutoLinkPlugin.dev.mjs +9 -310
- package/LexicalAutoLinkPlugin.js.flow +4 -18
- package/LexicalAutoLinkPlugin.prod.js +1 -1
- package/LexicalAutoLinkPlugin.prod.mjs +1 -1
- package/LexicalClearEditorPlugin.dev.js +2 -23
- package/LexicalClearEditorPlugin.dev.mjs +2 -23
- package/LexicalClearEditorPlugin.prod.js +1 -1
- package/LexicalClearEditorPlugin.prod.mjs +1 -1
- package/LexicalClickableLinkPlugin.dev.js +5 -70
- package/LexicalClickableLinkPlugin.dev.mjs +6 -71
- package/LexicalClickableLinkPlugin.prod.js +1 -1
- package/LexicalClickableLinkPlugin.prod.mjs +1 -1
- package/LexicalCollaborationContext.prod.js +1 -1
- package/LexicalCollaborationContext.prod.mjs +1 -1
- package/LexicalCollaborationPlugin.dev.mjs +2 -2
- package/LexicalCollaborationPlugin.prod.mjs +1 -1
- package/LexicalContentEditable.dev.js +2 -3
- package/LexicalContentEditable.dev.mjs +2 -3
- package/LexicalContentEditable.prod.js +1 -1
- package/LexicalContentEditable.prod.mjs +1 -1
- package/LexicalContextMenuPlugin.dev.js +2 -0
- package/LexicalContextMenuPlugin.dev.mjs +4 -2
- package/LexicalContextMenuPlugin.prod.js +1 -1
- package/LexicalContextMenuPlugin.prod.mjs +1 -1
- package/LexicalDecoratorBlockNode.dev.js +1 -0
- package/LexicalDecoratorBlockNode.dev.mjs +1 -0
- package/LexicalDecoratorBlockNode.js.flow +7 -0
- package/LexicalDecoratorBlockNode.prod.js +1 -1
- package/LexicalDecoratorBlockNode.prod.mjs +1 -1
- package/LexicalDraggableBlockPlugin.dev.js +6 -0
- package/LexicalDraggableBlockPlugin.dev.mjs +6 -0
- package/LexicalDraggableBlockPlugin.prod.js +1 -1
- package/LexicalDraggableBlockPlugin.prod.mjs +1 -1
- package/LexicalExtensionComponent.dev.js +53 -0
- package/LexicalExtensionComponent.dev.mjs +51 -0
- package/LexicalExtensionComponent.js +11 -0
- package/LexicalExtensionComponent.js.flow +12 -0
- package/LexicalExtensionComponent.mjs +12 -0
- package/LexicalExtensionComponent.node.mjs +10 -0
- package/LexicalExtensionComponent.prod.js +9 -0
- package/LexicalExtensionComponent.prod.mjs +9 -0
- package/LexicalExtensionComposer.d.ts +69 -0
- package/LexicalExtensionComposer.dev.js +105 -0
- package/LexicalExtensionComposer.dev.mjs +103 -0
- package/LexicalExtensionComposer.js +11 -0
- package/LexicalExtensionComposer.js.flow +20 -0
- package/LexicalExtensionComposer.mjs +12 -0
- package/LexicalExtensionComposer.node.mjs +10 -0
- package/LexicalExtensionComposer.prod.js +9 -0
- package/LexicalExtensionComposer.prod.mjs +9 -0
- package/LexicalHashtagPlugin.dev.js +1 -136
- package/LexicalHashtagPlugin.dev.mjs +3 -138
- package/LexicalHashtagPlugin.prod.js +1 -1
- package/LexicalHashtagPlugin.prod.mjs +1 -1
- package/LexicalHorizontalRuleNode.d.ts +10 -11
- package/LexicalHorizontalRuleNode.dev.js +12 -26
- package/LexicalHorizontalRuleNode.dev.mjs +14 -27
- package/LexicalHorizontalRuleNode.js.flow +2 -3
- package/LexicalHorizontalRuleNode.prod.js +1 -1
- package/LexicalHorizontalRuleNode.prod.mjs +1 -1
- package/LexicalLinkPlugin.d.ts +1 -1
- package/LexicalLinkPlugin.dev.js +7 -52
- package/LexicalLinkPlugin.dev.mjs +8 -53
- package/LexicalLinkPlugin.prod.js +1 -1
- package/LexicalLinkPlugin.prod.mjs +1 -1
- package/LexicalListPlugin.js.flow +5 -0
- package/LexicalMarkdownShortcutPlugin.dev.mjs +1 -1
- package/LexicalMarkdownShortcutPlugin.prod.mjs +1 -1
- package/LexicalNestedComposer.js.flow +10 -6
- package/LexicalNodeContextMenuPlugin.dev.js +10 -0
- package/LexicalNodeContextMenuPlugin.dev.mjs +11 -1
- package/LexicalNodeContextMenuPlugin.prod.js +1 -1
- package/LexicalNodeContextMenuPlugin.prod.mjs +1 -1
- package/LexicalNodeMenuPlugin.dev.js +2 -0
- package/LexicalNodeMenuPlugin.dev.mjs +4 -2
- package/LexicalNodeMenuPlugin.prod.js +1 -1
- package/LexicalNodeMenuPlugin.prod.mjs +1 -1
- package/LexicalPlainTextPlugin.d.ts +1 -1
- package/LexicalPlainTextPlugin.dev.js +85 -30
- package/LexicalPlainTextPlugin.dev.mjs +85 -30
- package/LexicalPlainTextPlugin.prod.js +1 -1
- package/LexicalPlainTextPlugin.prod.mjs +1 -1
- package/LexicalReactExtension.dev.js +187 -0
- package/LexicalReactExtension.dev.mjs +184 -0
- package/LexicalReactExtension.js +11 -0
- package/LexicalReactExtension.js.flow +68 -0
- package/LexicalReactExtension.mjs +13 -0
- package/LexicalReactExtension.node.mjs +11 -0
- package/LexicalReactExtension.prod.js +9 -0
- package/LexicalReactExtension.prod.mjs +9 -0
- package/LexicalReactPluginHostExtension.dev.js +189 -0
- package/LexicalReactPluginHostExtension.dev.mjs +181 -0
- package/LexicalReactPluginHostExtension.js +11 -0
- package/LexicalReactPluginHostExtension.js.flow +84 -0
- package/LexicalReactPluginHostExtension.mjs +18 -0
- package/LexicalReactPluginHostExtension.node.mjs +16 -0
- package/LexicalReactPluginHostExtension.prod.js +9 -0
- package/LexicalReactPluginHostExtension.prod.mjs +9 -0
- package/LexicalReactProviderExtension.dev.js +33 -0
- package/LexicalReactProviderExtension.dev.mjs +31 -0
- package/LexicalReactProviderExtension.js +11 -0
- package/LexicalReactProviderExtension.js.flow +12 -0
- package/LexicalReactProviderExtension.mjs +12 -0
- package/LexicalReactProviderExtension.node.mjs +10 -0
- package/LexicalReactProviderExtension.prod.js +9 -0
- package/LexicalReactProviderExtension.prod.mjs +9 -0
- package/LexicalRichTextPlugin.d.ts +1 -1
- package/LexicalRichTextPlugin.dev.js +85 -30
- package/LexicalRichTextPlugin.dev.mjs +85 -30
- package/LexicalRichTextPlugin.prod.js +1 -1
- package/LexicalRichTextPlugin.prod.mjs +1 -1
- package/LexicalTabIndentationPlugin.d.ts +2 -2
- package/LexicalTabIndentationPlugin.dev.js +3 -57
- package/LexicalTabIndentationPlugin.dev.mjs +3 -56
- package/LexicalTabIndentationPlugin.prod.js +1 -1
- package/LexicalTabIndentationPlugin.prod.mjs +1 -1
- package/LexicalTreeViewExtension.dev.js +57 -0
- package/LexicalTreeViewExtension.dev.mjs +54 -0
- package/LexicalTreeViewExtension.js +11 -0
- package/LexicalTreeViewExtension.js.flow +12 -0
- package/LexicalTreeViewExtension.mjs +13 -0
- package/LexicalTreeViewExtension.node.mjs +11 -0
- package/LexicalTreeViewExtension.prod.js +9 -0
- package/LexicalTreeViewExtension.prod.mjs +9 -0
- package/LexicalTypeaheadMenuPlugin.dev.js +2 -0
- package/LexicalTypeaheadMenuPlugin.dev.mjs +4 -2
- package/LexicalTypeaheadMenuPlugin.prod.js +1 -1
- package/LexicalTypeaheadMenuPlugin.prod.mjs +1 -1
- package/ReactExtension.d.ts +41 -0
- package/ReactPluginHostExtension.d.ts +56 -0
- package/ReactProviderExtension.d.ts +9 -0
- package/TreeViewExtension.d.ts +18 -0
- package/package.json +228 -17
- package/shared/LegacyDecorators.d.ts +23 -0
- package/shared/buildEditorComponent.d.ts +11 -0
- package/shared/mergeRefs.d.ts +2 -1
- package/shared/types.d.ts +89 -0
- package/shared/useReactDecorators.d.ts +12 -0
- package/useExtensionComponent.d.ts +10 -0
- package/useLexicalExtensionComponent.dev.js +37 -0
- package/useLexicalExtensionComponent.dev.mjs +34 -0
- package/useLexicalExtensionComponent.js +11 -0
- package/useLexicalExtensionComponent.js.flow +12 -0
- package/useLexicalExtensionComponent.mjs +13 -0
- package/useLexicalExtensionComponent.node.mjs +11 -0
- package/useLexicalExtensionComponent.prod.js +9 -0
- package/useLexicalExtensionComponent.prod.mjs +9 -0
|
@@ -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,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;
|
|
@@ -0,0 +1,37 @@
|
|
|
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';
|
|
10
|
+
|
|
11
|
+
var extension = require('@lexical/extension');
|
|
12
|
+
var LexicalComposerContext = require('@lexical/react/LexicalComposerContext');
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
16
|
+
*
|
|
17
|
+
* This source code is licensed under the MIT license found in the
|
|
18
|
+
* LICENSE file in the root directory of this source tree.
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
function useExtensionDependency(extension$1) {
|
|
22
|
+
return extension.getExtensionDependencyFromEditor(LexicalComposerContext.useLexicalComposerContext()[0], extension$1);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Use a Component from the given Extension that uses the ReactExtension convention
|
|
27
|
+
* of exposing a Component property in its output.
|
|
28
|
+
*
|
|
29
|
+
* @param extension - An extension with a Component property in the output
|
|
30
|
+
* @returns `getExtensionConfigFromEditor(useLexicalComposerContext()[0], extension).Component`
|
|
31
|
+
*/
|
|
32
|
+
function useExtensionComponent(extension) {
|
|
33
|
+
return useExtensionDependency(extension).output.Component;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
exports.useExtensionComponent = useExtensionComponent;
|
|
37
|
+
exports.useExtensionDependency = useExtensionDependency;
|
|
@@ -0,0 +1,34 @@
|
|
|
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 { getExtensionDependencyFromEditor } from '@lexical/extension';
|
|
10
|
+
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
function useExtensionDependency(extension) {
|
|
20
|
+
return getExtensionDependencyFromEditor(useLexicalComposerContext()[0], extension);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Use a Component from the given Extension that uses the ReactExtension convention
|
|
25
|
+
* of exposing a Component property in its output.
|
|
26
|
+
*
|
|
27
|
+
* @param extension - An extension with a Component property in the output
|
|
28
|
+
* @returns `getExtensionConfigFromEditor(useLexicalComposerContext()[0], extension).Component`
|
|
29
|
+
*/
|
|
30
|
+
function useExtensionComponent(extension) {
|
|
31
|
+
return useExtensionDependency(extension).output.Component;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { useExtensionComponent, useExtensionDependency };
|
|
@@ -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
|
+
|
|
9
|
+
'use strict'
|
|
10
|
+
const useLexicalExtensionComponent = process.env.NODE_ENV !== 'production' ? require('./useLexicalExtensionComponent.dev.js') : require('./useLexicalExtensionComponent.prod.js');
|
|
11
|
+
module.exports = useLexicalExtensionComponent;
|
|
@@ -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
|
+
* @flow strict
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* useLexicalExtensionComponent
|
|
12
|
+
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
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 * as modDev from './useLexicalExtensionComponent.dev.mjs';
|
|
10
|
+
import * as modProd from './useLexicalExtensionComponent.prod.mjs';
|
|
11
|
+
const mod = process.env.NODE_ENV !== 'production' ? modDev : modProd;
|
|
12
|
+
export const useExtensionComponent = mod.useExtensionComponent;
|
|
13
|
+
export const useExtensionDependency = mod.useExtensionDependency;
|
|
@@ -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
|
+
|
|
9
|
+
const mod = await (process.env.NODE_ENV !== 'production' ? import('./useLexicalExtensionComponent.dev.mjs') : import('./useLexicalExtensionComponent.prod.mjs'));
|
|
10
|
+
export const useExtensionComponent = mod.useExtensionComponent;
|
|
11
|
+
export const useExtensionDependency = mod.useExtensionDependency;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
"use strict";var e=require("@lexical/extension"),n=require("@lexical/react/LexicalComposerContext");function t(t){return e.getExtensionDependencyFromEditor(n.useLexicalComposerContext()[0],t)}exports.useExtensionComponent=function(e){return t(e).output.Component},exports.useExtensionDependency=t;
|
|
@@ -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{getExtensionDependencyFromEditor as o}from"@lexical/extension";import{useLexicalComposerContext as t}from"@lexical/react/LexicalComposerContext";function e(e){return o(t()[0],e)}function n(o){return e(o).output.Component}export{n as useExtensionComponent,e as useExtensionDependency};
|