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.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 = (nodes: Map<NodeKey, NodeMutation>) => void;
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
  };