lexical 0.3.5 → 0.3.8

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
@@ -169,7 +169,7 @@ declare export class LexicalEditor {
169
169
  updateFn?: () => void,
170
170
  ): EditorState;
171
171
  update(updateFn: () => void, options?: EditorUpdateOptions): boolean;
172
- focus(callbackFn?: () => void): void;
172
+ focus(callbackFn?: () => void, options?: EditorFocusOptions): void;
173
173
  blur(): void;
174
174
  isReadOnly(): boolean;
175
175
  setReadOnly(readOnly: boolean): void;
@@ -180,6 +180,9 @@ type EditorUpdateOptions = {
180
180
  tag?: string,
181
181
  skipTransforms?: true,
182
182
  };
183
+ type EditorFocusOptions = {
184
+ defaultSelection?: 'rootStart' | 'rootEnd',
185
+ };
183
186
  type EditorSetOptions = {
184
187
  tag?: string,
185
188
  };
@@ -196,6 +199,7 @@ type TextNodeThemeClasses = {
196
199
  superscript?: EditorThemeClassName,
197
200
  };
198
201
  export type EditorThemeClasses = {
202
+ characterLimit?: EditorThemeClassName,
199
203
  ltr?: EditorThemeClassName,
200
204
  rtl?: EditorThemeClassName,
201
205
  text?: TextNodeThemeClasses,
@@ -302,7 +306,7 @@ export type DOMChildConversion = (
302
306
  parentLexicalNode: ?LexicalNode | null,
303
307
  ) => LexicalNode | null | void;
304
308
  export type DOMConversionMap = {
305
- [NodeName]: (node: Node) => DOMConversion | null,
309
+ [NodeName]: <T: HTMLElement>(node: T) => DOMConversion | null,
306
310
  };
307
311
  type NodeName = string;
308
312
  export type DOMConversionOutput = {