lexical 0.3.9 → 0.4.0
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 +199 -86
- package/Lexical.js.flow +6 -6
- package/Lexical.prod.js +169 -169
- package/LexicalEditor.d.ts +11 -10
- package/LexicalNode.d.ts +3 -0
- package/LexicalUpdates.d.ts +1 -1
- package/LexicalUtils.d.ts +5 -1
- package/LexicalVersion.d.ts +1 -1
- package/index.d.ts +4 -1
- package/nodes/LexicalDecoratorNode.d.ts +1 -0
- package/nodes/LexicalElementNode.d.ts +5 -0
- package/nodes/LexicalGridCellNode.d.ts +2 -0
- package/nodes/LexicalLineBreakNode.d.ts +1 -0
- package/nodes/LexicalParagraphNode.d.ts +1 -0
- package/nodes/LexicalRootNode.d.ts +2 -0
- package/nodes/LexicalTextNode.d.ts +1 -0
- package/package.json +1 -1
package/Lexical.js.flow
CHANGED
|
@@ -82,7 +82,7 @@ export type MutationListener = (
|
|
|
82
82
|
nodes: Map<NodeKey, NodeMutation>,
|
|
83
83
|
{updateTags: Set<string>, dirtyLeaves: Set<string>},
|
|
84
84
|
) => void;
|
|
85
|
-
export type
|
|
85
|
+
export type EditableListener = (editable: boolean) => void;
|
|
86
86
|
type Listeners = {
|
|
87
87
|
decorator: Set<DecoratorListener>,
|
|
88
88
|
mutation: MutationListeners,
|
|
@@ -135,7 +135,7 @@ declare export class LexicalEditor {
|
|
|
135
135
|
_updateTags: Set<string>;
|
|
136
136
|
_observer: null | MutationObserver;
|
|
137
137
|
_key: string;
|
|
138
|
-
|
|
138
|
+
_editable: boolean;
|
|
139
139
|
_headless: boolean;
|
|
140
140
|
isComposing(): boolean;
|
|
141
141
|
registerUpdateListener(listener: UpdateListener): () => void;
|
|
@@ -147,7 +147,7 @@ declare export class LexicalEditor {
|
|
|
147
147
|
listener: CommandListener<P>,
|
|
148
148
|
priority: CommandListenerPriority,
|
|
149
149
|
): () => void;
|
|
150
|
-
|
|
150
|
+
registerEditableListener(listener: EditableListener): () => void;
|
|
151
151
|
registerMutationListener(
|
|
152
152
|
klass: Class<LexicalNode>,
|
|
153
153
|
listener: MutationListener,
|
|
@@ -174,8 +174,8 @@ declare export class LexicalEditor {
|
|
|
174
174
|
update(updateFn: () => void, options?: EditorUpdateOptions): boolean;
|
|
175
175
|
focus(callbackFn?: () => void, options?: EditorFocusOptions): void;
|
|
176
176
|
blur(): void;
|
|
177
|
-
|
|
178
|
-
|
|
177
|
+
isEditable(): boolean;
|
|
178
|
+
setEditable(editable: boolean): void;
|
|
179
179
|
toJSON(): SerializedEditor;
|
|
180
180
|
}
|
|
181
181
|
type EditorUpdateOptions = {
|
|
@@ -268,7 +268,7 @@ declare export function createEditor(editorConfig?: {
|
|
|
268
268
|
nodes?: $ReadOnlyArray<Class<LexicalNode>>,
|
|
269
269
|
onError: (error: Error) => void,
|
|
270
270
|
disableEvents?: boolean,
|
|
271
|
-
|
|
271
|
+
editable?: boolean,
|
|
272
272
|
}): LexicalEditor;
|
|
273
273
|
|
|
274
274
|
/**
|