lexical 0.8.0 → 0.9.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 +2985 -705
- package/Lexical.prod.js +195 -193
- package/LexicalCommands.d.ts +1 -0
- package/LexicalEditor.d.ts +232 -16
- package/LexicalEditorState.d.ts +3 -3
- package/LexicalNode.d.ts +241 -0
- package/LexicalUtils.d.ts +2 -0
- package/index.d.ts +2 -2
- package/nodes/LexicalElementNode.d.ts +3 -2
- package/nodes/LexicalGridCellNode.d.ts +3 -0
- package/nodes/LexicalRootNode.d.ts +2 -2
- package/package.json +1 -1
|
@@ -10,8 +10,8 @@ import type { GridSelection, NodeSelection, RangeSelection } from '../LexicalSel
|
|
|
10
10
|
import type { Spread } from 'lexical';
|
|
11
11
|
import { TextNode } from '../';
|
|
12
12
|
import { LexicalNode } from '../LexicalNode';
|
|
13
|
-
export declare type SerializedElementNode = Spread<{
|
|
14
|
-
children: Array<
|
|
13
|
+
export declare type SerializedElementNode<T extends SerializedLexicalNode = SerializedLexicalNode> = Spread<{
|
|
14
|
+
children: Array<T>;
|
|
15
15
|
direction: 'ltr' | 'rtl' | null;
|
|
16
16
|
format: ElementFormatType;
|
|
17
17
|
indent: number;
|
|
@@ -51,6 +51,7 @@ export declare class ElementNode extends LexicalNode {
|
|
|
51
51
|
getLastChildOrThrow<T extends LexicalNode>(): T;
|
|
52
52
|
getChildAtIndex<T extends LexicalNode>(index: number): null | T;
|
|
53
53
|
getTextContent(): string;
|
|
54
|
+
getTextContentSize(): number;
|
|
54
55
|
getDirection(): 'ltr' | 'rtl' | null;
|
|
55
56
|
hasFormat(type: ElementFormatType): boolean;
|
|
56
57
|
select(_anchorOffset?: number, _focusOffset?: number): RangeSelection;
|
|
@@ -14,7 +14,10 @@ export declare type SerializedGridCellNode = Spread<{
|
|
|
14
14
|
export declare class DEPRECATED_GridCellNode extends ElementNode {
|
|
15
15
|
/** @internal */
|
|
16
16
|
__colSpan: number;
|
|
17
|
+
__rowSpan: number;
|
|
17
18
|
constructor(colSpan: number, key?: NodeKey);
|
|
18
19
|
exportJSON(): SerializedGridCellNode;
|
|
20
|
+
setColSpan(colSpan: number): this;
|
|
21
|
+
setRowSpan(rowSpan: number): this;
|
|
19
22
|
}
|
|
20
23
|
export declare function DEPRECATED_$isGridCellNode(node: DEPRECATED_GridCellNode | LexicalNode | null | undefined): node is DEPRECATED_GridCellNode;
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type { LexicalNode } from '../LexicalNode';
|
|
8
|
+
import type { LexicalNode, SerializedLexicalNode } from '../LexicalNode';
|
|
9
9
|
import type { SerializedElementNode } from './LexicalElementNode';
|
|
10
10
|
import { ElementNode } from './LexicalElementNode';
|
|
11
|
-
export declare type SerializedRootNode = SerializedElementNode
|
|
11
|
+
export declare type SerializedRootNode<T extends SerializedLexicalNode = SerializedLexicalNode> = SerializedElementNode<T>;
|
|
12
12
|
/** @noInheritDoc */
|
|
13
13
|
export declare class RootNode extends ElementNode {
|
|
14
14
|
/** @internal */
|