lexical 0.9.0 → 0.9.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.js.flow CHANGED
@@ -375,8 +375,14 @@ declare export class LexicalNode {
375
375
  ): boolean;
376
376
  remove(preserveEmptyParent?: boolean): void;
377
377
  replace<N: LexicalNode>(replaceWith: N): N;
378
- insertAfter(nodeToInsert: LexicalNode): LexicalNode;
379
- insertBefore(nodeToInsert: LexicalNode): LexicalNode;
378
+ insertAfter(
379
+ nodeToInsert: LexicalNode,
380
+ restoreSelection?: boolean,
381
+ ): LexicalNode;
382
+ insertBefore(
383
+ nodeToInsert: LexicalNode,
384
+ restoreSelection?: boolean,
385
+ ): LexicalNode;
380
386
  selectPrevious(anchorOffset?: number, focusOffset?: number): RangeSelection;
381
387
  selectNext(anchorOffset?: number, focusOffset?: number): RangeSelection;
382
388
  markDirty(): void;
@@ -541,6 +547,20 @@ declare export function $insertNodes(
541
547
  nodes: Array<LexicalNode>,
542
548
  selectStart?: boolean,
543
549
  ): boolean;
550
+ export type GridMapValueType = {
551
+ cell: deprecated_GridCellNode,
552
+ startRow: number,
553
+ startColumn: number,
554
+ };
555
+ export type GridMapType = Array<Array<GridMapValueType>>;
556
+ declare export function DEPRECATED_$computeGridMap(
557
+ grid: deprecated_GridNode,
558
+ cellA: deprecated_GridCellNode,
559
+ cellB: deprecated_GridCellNode,
560
+ ): [GridMapType, GridMapValueType, GridMapValueType];
561
+ declare export function DEPRECATED_$getNodeTriplet(
562
+ source: PointType | LexicalNode | deprecated_GridCellNode,
563
+ ): [deprecated_GridCellNode, deprecated_GridRowNode, deprecated_GridNode];
544
564
 
545
565
  /**
546
566
  * LexicalTextNode
@@ -791,8 +811,13 @@ declare export function DEPRECATED_$isGridRowNode(
791
811
 
792
812
  declare export class deprecated_GridCellNode extends ElementNode {
793
813
  __colSpan: number;
814
+ __rowSpan: number;
794
815
 
795
816
  constructor(colSpan: number, key?: NodeKey): void;
817
+ getColSpan(): number;
818
+ setColSpan(colSpan: number): this;
819
+ getRowSpan(): number;
820
+ setRowSpan(rowSpan: number): this;
796
821
  }
797
822
 
798
823
  declare export function DEPRECATED_$isGridCellNode(
@@ -835,7 +860,7 @@ declare export function $getNearestRootOrShadowRoot(
835
860
  node: LexicalNode,
836
861
  ): RootNode | ElementNode;
837
862
  declare export function $isRootOrShadowRoot(
838
- node: LexicalNode,
863
+ node: ?LexicalNode,
839
864
  ): boolean %checks(node instanceof RootNode || node instanceof ElementNode);
840
865
  declare export function $hasAncestor(
841
866
  child: LexicalNode,
@@ -891,19 +916,21 @@ export type SerializedElementNode = {
891
916
 
892
917
  export type SerializedParagraphNode = {
893
918
  ...SerializedElementNode,
894
- type: 'paragraph',
895
919
  ...
896
920
  };
897
921
 
898
922
  export type SerializedLineBreakNode = {
899
923
  ...SerializedLexicalNode,
900
- type: 'linebreak',
924
+ ...
925
+ };
926
+
927
+ export type SerializedDecoratorNode = {
928
+ ...SerializedLexicalNode,
901
929
  ...
902
930
  };
903
931
 
904
932
  export type SerializedRootNode = {
905
933
  ...SerializedElementNode,
906
- type: 'root',
907
934
  ...
908
935
  };
909
936