lexical 0.3.6 → 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 +232 -183
- package/Lexical.js.flow +8 -2
- package/Lexical.prod.js +163 -160
- package/LexicalCommands.d.ts +4 -4
- package/LexicalConstants.d.ts +1 -0
- package/LexicalEditor.d.ts +31 -4
- package/LexicalUtils.d.ts +8 -7
- package/LexicalVersion.d.ts +1 -1
- package/README.md +1 -1
- package/index.d.ts +1 -1
- package/package.json +1 -1
package/Lexical.js.flow
CHANGED
|
@@ -78,7 +78,10 @@ type RootListener = (
|
|
|
78
78
|
) => void;
|
|
79
79
|
type TextContentListener = (text: string) => void;
|
|
80
80
|
type ErrorHandler = (error: Error) => void;
|
|
81
|
-
type MutationListener = (
|
|
81
|
+
export type MutationListener = (
|
|
82
|
+
nodes: Map<NodeKey, NodeMutation>,
|
|
83
|
+
{updateTags: Set<string>, dirtyLeaves: Set<string>},
|
|
84
|
+
) => void;
|
|
82
85
|
export type ReadOnlyListener = (readOnly: boolean) => void;
|
|
83
86
|
type Listeners = {
|
|
84
87
|
decorator: Set<DecoratorListener>,
|
|
@@ -169,7 +172,7 @@ declare export class LexicalEditor {
|
|
|
169
172
|
updateFn?: () => void,
|
|
170
173
|
): EditorState;
|
|
171
174
|
update(updateFn: () => void, options?: EditorUpdateOptions): boolean;
|
|
172
|
-
focus(callbackFn?: () => void): void;
|
|
175
|
+
focus(callbackFn?: () => void, options?: EditorFocusOptions): void;
|
|
173
176
|
blur(): void;
|
|
174
177
|
isReadOnly(): boolean;
|
|
175
178
|
setReadOnly(readOnly: boolean): void;
|
|
@@ -180,6 +183,9 @@ type EditorUpdateOptions = {
|
|
|
180
183
|
tag?: string,
|
|
181
184
|
skipTransforms?: true,
|
|
182
185
|
};
|
|
186
|
+
type EditorFocusOptions = {
|
|
187
|
+
defaultSelection?: 'rootStart' | 'rootEnd',
|
|
188
|
+
};
|
|
183
189
|
type EditorSetOptions = {
|
|
184
190
|
tag?: string,
|
|
185
191
|
};
|