lexical 0.3.8 → 0.3.9
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/Lexical.dev.js +164 -113
- package/Lexical.js.flow +4 -1
- package/Lexical.prod.js +132 -130
- package/LexicalEditor.d.ts +4 -1
- package/LexicalUtils.d.ts +6 -5
- package/LexicalVersion.d.ts +1 -1
- package/README.md +1 -1
- package/index.d.ts +1 -1
- package/package.json +1 -1
package/LexicalEditor.d.ts
CHANGED
|
@@ -106,7 +106,10 @@ export declare type UpdateListener = (arg0: {
|
|
|
106
106
|
export declare type DecoratorListener<T = never> = (decorator: Record<NodeKey, T>) => void;
|
|
107
107
|
export declare type RootListener = (rootElement: null | HTMLElement, prevRootElement: null | HTMLElement) => void;
|
|
108
108
|
export declare type TextContentListener = (text: string) => void;
|
|
109
|
-
export declare type MutationListener = (nodes: Map<NodeKey, NodeMutation
|
|
109
|
+
export declare type MutationListener = (nodes: Map<NodeKey, NodeMutation>, payload: {
|
|
110
|
+
updateTags: Set<string>;
|
|
111
|
+
dirtyLeaves: Set<string>;
|
|
112
|
+
}) => void;
|
|
110
113
|
export declare type CommandListener<P> = (payload: P, editor: LexicalEditor) => boolean;
|
|
111
114
|
export declare type ReadOnlyListener = (readOnly: boolean) => void;
|
|
112
115
|
export declare type CommandListenerPriority = 0 | 1 | 2 | 3 | 4;
|
package/LexicalUtils.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export declare function getTextNodeOffset(node: TextNode, moveSelectionToEnd: bo
|
|
|
48
48
|
export declare function doesContainGrapheme(str: string): boolean;
|
|
49
49
|
export declare function getEditorsToPropagate(editor: LexicalEditor): Array<LexicalEditor>;
|
|
50
50
|
export declare function createUID(): string;
|
|
51
|
-
export declare function $updateSelectedTextFromDOM(
|
|
51
|
+
export declare function $updateSelectedTextFromDOM(isCompositionEnd: boolean, data?: string): void;
|
|
52
52
|
export declare function $updateTextNodeFromDOMContent(textNode: TextNode, textContent: string, anchorOffset: null | number, focusOffset: null | number, compositionEnd: boolean): void;
|
|
53
53
|
export declare function $shouldPreventDefaultAndInsertText(selection: RangeSelection, text: string): boolean;
|
|
54
54
|
export declare function isTab(keyCode: number, altKey: boolean, ctrlKey: boolean, metaKey: boolean): boolean;
|
|
@@ -68,12 +68,12 @@ export declare function isUndo(keyCode: number, shiftKey: boolean, metaKey: bool
|
|
|
68
68
|
export declare function isRedo(keyCode: number, shiftKey: boolean, metaKey: boolean, ctrlKey: boolean): boolean;
|
|
69
69
|
export declare function isCopy(keyCode: number, shiftKey: boolean, metaKey: boolean, ctrlKey: boolean): boolean;
|
|
70
70
|
export declare function isCut(keyCode: number, shiftKey: boolean, metaKey: boolean, ctrlKey: boolean): boolean;
|
|
71
|
-
export declare function isMoveBackward(keyCode: number, ctrlKey: boolean,
|
|
71
|
+
export declare function isMoveBackward(keyCode: number, ctrlKey: boolean, altKey: boolean, metaKey: boolean): boolean;
|
|
72
72
|
export declare function isMoveToStart(keyCode: number, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean): boolean;
|
|
73
|
-
export declare function isMoveForward(keyCode: number, ctrlKey: boolean,
|
|
73
|
+
export declare function isMoveForward(keyCode: number, ctrlKey: boolean, altKey: boolean, metaKey: boolean): boolean;
|
|
74
74
|
export declare function isMoveToEnd(keyCode: number, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean): boolean;
|
|
75
|
-
export declare function isMoveUp(keyCode: number, ctrlKey: boolean,
|
|
76
|
-
export declare function isMoveDown(keyCode: number, ctrlKey: boolean,
|
|
75
|
+
export declare function isMoveUp(keyCode: number, ctrlKey: boolean, metaKey: boolean): boolean;
|
|
76
|
+
export declare function isMoveDown(keyCode: number, ctrlKey: boolean, metaKey: boolean): boolean;
|
|
77
77
|
export declare function isModifier(ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean): boolean;
|
|
78
78
|
export declare function isSpace(keyCode: number): boolean;
|
|
79
79
|
export declare function controlOrMeta(metaKey: boolean, ctrlKey: boolean): boolean;
|
|
@@ -92,3 +92,4 @@ export declare function getElementByKeyOrThrow(editor: LexicalEditor, key: NodeK
|
|
|
92
92
|
export declare function scrollIntoViewIfNeeded(editor: LexicalEditor, anchor: PointType, rootElement: HTMLElement, tags: Set<string>): void;
|
|
93
93
|
export declare function $hasUpdateTag(tag: string): boolean;
|
|
94
94
|
export declare function $addUpdateTag(tag: string): void;
|
|
95
|
+
export declare function $maybeMoveChildrenSelectionToParent(parentNode: LexicalNode, offset?: number): RangeSelection | NodeSelection | GridSelection | null;
|
package/LexicalVersion.d.ts
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# `lexical`
|
|
2
2
|
|
|
3
|
-
Lexical is an extensible JavaScript web text-editor framework with an emphasis on reliability, accessibility and performance. Lexical aims to provide a best-in-class developer experience, so you can easily prototype and build features with confidence. Combined with a highly extensible architecture, Lexical allows developers to create unique text editing experiences that scale in size and functionality.
|
|
3
|
+
Lexical is an extensible JavaScript web text-editor framework with an emphasis on reliability, accessibility, and performance. Lexical aims to provide a best-in-class developer experience, so you can easily prototype and build features with confidence. Combined with a highly extensible architecture, Lexical allows developers to create unique text editing experiences that scale in size and functionality.
|
|
4
4
|
|
|
5
5
|
The core of Lexical is a dependency-free text editor engine that allows for powerful, simple and complex,
|
|
6
6
|
editor implementations to be built on top. Lexical's engine provides three main parts:
|
package/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
export type { CommandListenerPriority, CommandPayloadType, EditorConfig, EditorThemeClasses, IntentionallyMarkedAsDirtyElement, Klass, LexicalCommand, LexicalEditor, NodeMutation, ReadOnlyListener, SerializedEditor, Spread, } from './LexicalEditor';
|
|
8
|
+
export type { CommandListenerPriority, CommandPayloadType, EditorConfig, EditorThemeClasses, IntentionallyMarkedAsDirtyElement, Klass, LexicalCommand, LexicalEditor, MutationListener, NodeMutation, ReadOnlyListener, SerializedEditor, Spread, } from './LexicalEditor';
|
|
9
9
|
export type { EditorState, SerializedEditorState } from './LexicalEditorState';
|
|
10
10
|
export type { DOMChildConversion, DOMConversion, DOMConversionFn, DOMConversionMap, DOMConversionOutput, DOMExportOutput, LexicalNode, NodeKey, NodeMap, SerializedLexicalNode, } from './LexicalNode';
|
|
11
11
|
export type { BaseSelection, ElementPointType as ElementPoint, GridSelection, GridSelectionShape, NodeSelection, Point, RangeSelection, TextPointType as TextPoint, } from './LexicalSelection';
|