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.dev.js +299 -226
- package/Lexical.js.flow +6 -2
- package/Lexical.prod.js +166 -163
- package/LexicalCommands.d.ts +4 -4
- package/LexicalConstants.d.ts +5 -3
- package/LexicalEditor.d.ts +35 -12
- package/LexicalNode.d.ts +7 -7
- package/LexicalSelection.d.ts +6 -6
- package/LexicalUtils.d.ts +7 -8
- package/LexicalVersion.d.ts +1 -1
- package/index.d.ts +1 -1
- package/nodes/LexicalElementNode.d.ts +1 -1
- package/nodes/LexicalTextNode.d.ts +3 -2
- package/package.json +1 -4
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:
|
|
309
|
+
[NodeName]: <T: HTMLElement>(node: T) => DOMConversion | null,
|
|
306
310
|
};
|
|
307
311
|
type NodeName = string;
|
|
308
312
|
export type DOMConversionOutput = {
|