@lexical/react 0.2.7 → 0.3.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/DEPRECATED_useLexical.dev.js +55 -4
- package/DEPRECATED_useLexical.js.flow +23 -0
- package/DEPRECATED_useLexical.prod.js +3 -1
- package/DEPRECATED_useLexicalAutoFormatter.dev.js +1 -2
- package/DEPRECATED_useLexicalAutoFormatter.js.flow +12 -0
- package/DEPRECATED_useLexicalAutoFormatter.prod.js +1 -1
- package/DEPRECATED_useLexicalCanShowPlaceholder.dev.js +6 -8
- package/DEPRECATED_useLexicalCanShowPlaceholder.js.flow +12 -0
- package/DEPRECATED_useLexicalCanShowPlaceholder.prod.js +2 -1
- package/DEPRECATED_useLexicalCharacterLimit.dev.js +5 -3
- package/DEPRECATED_useLexicalCharacterLimit.js.flow +28 -0
- package/DEPRECATED_useLexicalCharacterLimit.prod.js +6 -6
- package/DEPRECATED_useLexicalDecorators.dev.js +7 -5
- package/DEPRECATED_useLexicalDecorators.js.flow +14 -0
- package/DEPRECATED_useLexicalDecorators.prod.js +2 -2
- package/DEPRECATED_useLexicalEditor.dev.js +55 -3
- package/DEPRECATED_useLexicalEditor.prod.js +2 -1
- package/DEPRECATED_useLexicalEditorEvents.dev.js +1 -5
- package/DEPRECATED_useLexicalEditorEvents.js.flow +19 -0
- package/DEPRECATED_useLexicalEditorEvents.prod.js +2 -2
- package/DEPRECATED_useLexicalHistory.dev.js +0 -2
- package/DEPRECATED_useLexicalHistory.js.flow +31 -0
- package/DEPRECATED_useLexicalHistory.prod.js +1 -1
- package/DEPRECATED_useLexicalList.dev.js +3 -5
- package/DEPRECATED_useLexicalList.js.flow +10 -0
- package/DEPRECATED_useLexicalList.prod.js +2 -2
- package/DEPRECATED_useLexicalPlainText.dev.js +1 -7
- package/DEPRECATED_useLexicalPlainText.js.flow +15 -0
- package/DEPRECATED_useLexicalPlainText.prod.js +2 -2
- package/DEPRECATED_useLexicalRichText.dev.js +1 -7
- package/DEPRECATED_useLexicalRichText.js.flow +15 -0
- package/DEPRECATED_useLexicalRichText.prod.js +2 -2
- package/LexicalAutoFocusPlugin.d.ts +1 -1
- package/LexicalAutoFocusPlugin.dev.js +17 -4
- package/LexicalAutoFocusPlugin.js.flow +1 -1
- package/LexicalAutoFocusPlugin.prod.js +1 -1
- package/LexicalAutoLinkPlugin.d.ts +1 -1
- package/LexicalAutoLinkPlugin.dev.js +4 -5
- package/LexicalAutoLinkPlugin.js.flow +2 -1
- package/LexicalAutoLinkPlugin.prod.js +5 -5
- package/LexicalAutoScrollPlugin.d.ts +2 -3
- package/LexicalAutoScrollPlugin.dev.js +2 -5
- package/LexicalAutoScrollPlugin.js.flow +1 -3
- package/LexicalAutoScrollPlugin.prod.js +2 -2
- package/LexicalBlockWithAlignableContents.d.ts +16 -0
- package/LexicalBlockWithAlignableContents.dev.js +7 -9
- package/LexicalBlockWithAlignableContents.prod.js +4 -4
- package/LexicalCharacterLimitPlugin.d.ts +1 -1
- package/LexicalCharacterLimitPlugin.dev.js +6 -5
- package/LexicalCharacterLimitPlugin.js.flow +1 -1
- package/LexicalCharacterLimitPlugin.prod.js +8 -8
- package/LexicalCheckListPlugin.d.ts +9 -0
- package/LexicalCheckListPlugin.dev.js +7 -15
- package/LexicalCheckListPlugin.js.flow +1 -1
- package/LexicalCheckListPlugin.prod.js +7 -7
- package/LexicalClearEditorPlugin.d.ts +2 -6
- package/LexicalClearEditorPlugin.dev.js +2 -5
- package/LexicalClearEditorPlugin.js.flow +1 -1
- package/LexicalClearEditorPlugin.prod.js +2 -2
- package/LexicalCollaborationPlugin.d.ts +3 -20
- package/LexicalCollaborationPlugin.dev.js +9 -5
- package/LexicalCollaborationPlugin.prod.js +9 -9
- package/LexicalComposer.d.ts +2 -2
- package/LexicalComposer.dev.js +1 -6
- package/LexicalComposer.js.flow +1 -1
- package/LexicalComposer.prod.js +2 -2
- package/LexicalComposerContext.dev.js +0 -1
- package/LexicalComposerContext.prod.js +1 -1
- package/LexicalContentEditable.d.ts +2 -5
- package/LexicalContentEditable.dev.js +5 -7
- package/LexicalContentEditable.js.flow +1 -3
- package/LexicalContentEditable.prod.js +3 -3
- package/LexicalDecoratorBlockNode.d.ts +32 -0
- package/LexicalDecoratorBlockNode.dev.js +8 -1
- package/LexicalDecoratorBlockNode.prod.js +1 -1
- package/LexicalHashtagPlugin.d.ts +1 -1
- package/LexicalHashtagPlugin.dev.js +2 -3
- package/LexicalHashtagPlugin.js.flow +1 -1
- package/LexicalHashtagPlugin.prod.js +3 -3
- package/LexicalHistoryPlugin.d.ts +1 -0
- package/LexicalHistoryPlugin.dev.js +0 -2
- package/LexicalHistoryPlugin.prod.js +1 -1
- package/LexicalHorizontalRuleNode.d.ts +1 -1
- package/LexicalHorizontalRuleNode.dev.js +11 -1
- package/LexicalHorizontalRuleNode.prod.js +3 -3
- package/LexicalLinkPlugin.d.ts +1 -1
- package/LexicalLinkPlugin.dev.js +3 -107
- package/LexicalLinkPlugin.js.flow +1 -1
- package/LexicalLinkPlugin.prod.js +1 -4
- package/LexicalListPlugin.d.ts +1 -1
- package/LexicalListPlugin.dev.js +9 -6
- package/LexicalListPlugin.js.flow +1 -1
- package/LexicalListPlugin.prod.js +3 -3
- package/LexicalMarkdownShortcutPlugin.d.ts +4 -2
- package/LexicalMarkdownShortcutPlugin.dev.js +7 -83
- package/LexicalMarkdownShortcutPlugin.js.flow +2 -2
- package/LexicalMarkdownShortcutPlugin.prod.js +2 -3
- package/LexicalNestedComposer.d.ts +2 -2
- package/LexicalNestedComposer.dev.js +1 -2
- package/LexicalNestedComposer.js.flow +1 -1
- package/LexicalNestedComposer.prod.js +3 -3
- package/LexicalOnChangePlugin.d.ts +2 -1
- package/LexicalOnChangePlugin.dev.js +1 -4
- package/LexicalOnChangePlugin.js.flow +1 -1
- package/LexicalOnChangePlugin.prod.js +2 -2
- package/LexicalPlainTextPlugin.d.ts +3 -2
- package/LexicalPlainTextPlugin.dev.js +12 -10
- package/LexicalPlainTextPlugin.js.flow +1 -1
- package/LexicalPlainTextPlugin.prod.js +4 -4
- package/LexicalRichTextPlugin.d.ts +3 -2
- package/LexicalRichTextPlugin.dev.js +12 -10
- package/LexicalRichTextPlugin.js.flow +1 -1
- package/LexicalRichTextPlugin.prod.js +4 -4
- package/LexicalTablePlugin.d.ts +1 -1
- package/LexicalTablePlugin.dev.js +7 -8
- package/LexicalTablePlugin.js.flow +1 -1
- package/LexicalTablePlugin.prod.js +4 -4
- package/LexicalTreeView.d.ts +2 -1
- package/LexicalTreeView.dev.js +4 -5
- package/LexicalTreeView.js.flow +1 -1
- package/LexicalTreeView.prod.js +11 -11
- package/README.md +10 -6
- package/package.json +19 -19
- package/useLexicalIsTextContentEmpty.d.ts +2 -1
- package/useLexicalIsTextContentEmpty.dev.js +2 -5
- package/useLexicalIsTextContentEmpty.js.flow +1 -1
- package/useLexicalIsTextContentEmpty.prod.js +1 -1
- package/useLexicalNodeSelection.d.ts +2 -1
- package/useLexicalNodeSelection.dev.js +1 -2
- package/useLexicalNodeSelection.js.flow +1 -1
- package/useLexicalNodeSelection.prod.js +2 -2
- package/useLexicalTextEntity.d.ts +2 -1
- package/useLexicalTextEntity.dev.js +1 -2
- package/useLexicalTextEntity.js.flow +1 -1
- package/useLexicalTextEntity.prod.js +1 -1
|
@@ -17,7 +17,6 @@ var react = require('react');
|
|
|
17
17
|
* This source code is licensed under the MIT license found in the
|
|
18
18
|
* LICENSE file in the root directory of this source tree.
|
|
19
19
|
*
|
|
20
|
-
*
|
|
21
20
|
*/
|
|
22
21
|
function useLexicalTextEntity(getMatch, targetNode, createNode) {
|
|
23
22
|
const [editor] = LexicalComposerContext.useLexicalComposerContext();
|
|
@@ -26,4 +25,4 @@ function useLexicalTextEntity(getMatch, targetNode, createNode) {
|
|
|
26
25
|
}, [createNode, editor, getMatch, targetNode]);
|
|
27
26
|
}
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
exports.useLexicalTextEntity = useLexicalTextEntity;
|
|
@@ -11,7 +11,7 @@ import type {TextNode} from 'lexical';
|
|
|
11
11
|
|
|
12
12
|
export type EntityMatch = {end: number, start: number};
|
|
13
13
|
|
|
14
|
-
declare export
|
|
14
|
+
declare export function useLexicalTextEntity<N: TextNode>(
|
|
15
15
|
getMatch: (text: string) => null | EntityMatch,
|
|
16
16
|
targetNode: Class<N>,
|
|
17
17
|
createNode: (textNode: TextNode) => N,
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
var e=require("@lexical/react/LexicalComposerContext"),f=require("@lexical/text"),g=require("@lexical/utils"),h=require("react");
|
|
7
|
+
'use strict';var e=require("@lexical/react/LexicalComposerContext"),f=require("@lexical/text"),g=require("@lexical/utils"),h=require("react");exports.useLexicalTextEntity=function(a,b,c){let [d]=e.useLexicalComposerContext();h.useEffect(()=>g.mergeRegister(...f.registerLexicalTextEntity(d,a,b,c)),[c,d,a,b])}
|