lexical 0.2.1 → 0.2.2
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.d.ts +14 -20
- package/Lexical.dev.js +4441 -4377
- package/Lexical.js.flow +6 -12
- package/Lexical.prod.js +141 -139
- package/package.json +1 -1
package/Lexical.d.ts
CHANGED
|
@@ -53,7 +53,6 @@ export var INSERT_TABLE_COMMAND: LexicalCommand<{
|
|
|
53
53
|
rows: string;
|
|
54
54
|
columns: string;
|
|
55
55
|
}>;
|
|
56
|
-
export var READ_ONLY_COMMAND: LexicalCommand<void>;
|
|
57
56
|
|
|
58
57
|
export declare function createCommand<T>(): LexicalCommand<T>;
|
|
59
58
|
|
|
@@ -222,17 +221,12 @@ export type EditorConfig<EditorContext> = {
|
|
|
222
221
|
context: EditorContext;
|
|
223
222
|
disableEvents?: boolean;
|
|
224
223
|
};
|
|
225
|
-
export type
|
|
226
|
-
export
|
|
227
|
-
export
|
|
228
|
-
export
|
|
229
|
-
export
|
|
230
|
-
|
|
231
|
-
| CommandListenerEditorPriority
|
|
232
|
-
| CommandListenerLowPriority
|
|
233
|
-
| CommandListenerNormalPriority
|
|
234
|
-
| CommandListenerHighPriority
|
|
235
|
-
| CommandListenerCriticalPriority;
|
|
224
|
+
export type CommandListenerPriority = 0 | 1 | 2 | 3 | 4;
|
|
225
|
+
export const COMMAND_PRIORITY_EDITOR = 0;
|
|
226
|
+
export const COMMAND_PRIORITY_LOW = 1;
|
|
227
|
+
export const COMMAND_PRIORITY_NORMAL = 2;
|
|
228
|
+
export const COMMAND_PRIORITY_HIGH = 3;
|
|
229
|
+
export const COMMAND_PRIORITY_CRITICAL = 4;
|
|
236
230
|
export type IntentionallyMarkedAsDirtyElement = boolean;
|
|
237
231
|
export function createEditor<EditorContext>(editorConfig?: {
|
|
238
232
|
namespace?: string;
|
|
@@ -569,8 +563,8 @@ export declare class TextNode extends LexicalNode {
|
|
|
569
563
|
__style: string;
|
|
570
564
|
__mode: 0 | 1 | 2 | 3;
|
|
571
565
|
__detail: number;
|
|
572
|
-
getType(): string;
|
|
573
|
-
clone(node: any): TextNode;
|
|
566
|
+
static getType(): string;
|
|
567
|
+
static clone(node: any): TextNode;
|
|
574
568
|
constructor(text: string, key?: NodeKey);
|
|
575
569
|
getFormat(): number;
|
|
576
570
|
getStyle(): string;
|
|
@@ -623,8 +617,8 @@ export function $isTextNode(node: LexicalNode | null | undefined): boolean;
|
|
|
623
617
|
* LexicalLineBreakNode
|
|
624
618
|
*/
|
|
625
619
|
export declare class LineBreakNode extends LexicalNode {
|
|
626
|
-
getType(): string;
|
|
627
|
-
clone(node: LineBreakNode): LineBreakNode;
|
|
620
|
+
static getType(): string;
|
|
621
|
+
static clone(node: LineBreakNode): LineBreakNode;
|
|
628
622
|
constructor(key?: NodeKey);
|
|
629
623
|
getTextContent(): '\n';
|
|
630
624
|
createDOM(): HTMLElement;
|
|
@@ -638,8 +632,8 @@ export function $isLineBreakNode(node: LexicalNode | null | undefined): boolean;
|
|
|
638
632
|
*/
|
|
639
633
|
export declare class RootNode extends ElementNode {
|
|
640
634
|
__cachedText: null | string;
|
|
641
|
-
getType(): string;
|
|
642
|
-
clone(): RootNode;
|
|
635
|
+
static getType(): string;
|
|
636
|
+
static clone(): RootNode;
|
|
643
637
|
constructor();
|
|
644
638
|
getTextContent(includeInert?: boolean, includeDirectionless?: false): string;
|
|
645
639
|
select(): RangeSelection;
|
|
@@ -723,8 +717,8 @@ export function $isDecoratorNode(node: LexicalNode | null | undefined): boolean;
|
|
|
723
717
|
* LexicalHorizontalRuleNode
|
|
724
718
|
*/
|
|
725
719
|
export declare class HorizontalRuleNode extends LexicalNode {
|
|
726
|
-
getType(): string;
|
|
727
|
-
clone(node: HorizontalRuleNode): HorizontalRuleNode;
|
|
720
|
+
static getType(): string;
|
|
721
|
+
static clone(node: HorizontalRuleNode): HorizontalRuleNode;
|
|
728
722
|
constructor(key?: NodeKey);
|
|
729
723
|
createDOM(): HTMLElement;
|
|
730
724
|
updateDOM(): false;
|