lexical 0.9.0 → 0.9.1

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.
@@ -7,10 +7,11 @@
7
7
  */
8
8
  import type { LexicalEditor } from './LexicalEditor';
9
9
  import type { EditorState } from './LexicalEditorState';
10
- import type { LexicalNode, NodeKey } from './LexicalNode';
10
+ import type { NodeKey } from './LexicalNode';
11
11
  import type { ElementNode } from './nodes/LexicalElementNode';
12
12
  import type { TextFormatType } from './nodes/LexicalTextNode';
13
- import { TextNode } from '.';
13
+ import { DEPRECATED_GridCellNode, DEPRECATED_GridNode, DEPRECATED_GridRowNode, TextNode } from '.';
14
+ import { LexicalNode } from './LexicalNode';
14
15
  export declare type TextPointType = {
15
16
  _selection: RangeSelection | GridSelection;
16
17
  getNode: () => TextNode;
@@ -32,6 +33,12 @@ export declare type ElementPointType = {
32
33
  type: 'element';
33
34
  };
34
35
  export declare type PointType = TextPointType | ElementPointType;
36
+ export declare type GridMapValueType = {
37
+ cell: DEPRECATED_GridCellNode;
38
+ startRow: number;
39
+ startColumn: number;
40
+ };
41
+ export declare type GridMapType = Array<Array<GridMapValueType>>;
35
42
  export declare class Point {
36
43
  key: NodeKey;
37
44
  offset: number;
@@ -149,3 +156,5 @@ export declare function adjustPointOffsetForMergedSibling(point: PointType, isBe
149
156
  export declare function updateDOMSelection(prevSelection: RangeSelection | NodeSelection | GridSelection | null, nextSelection: RangeSelection | NodeSelection | GridSelection | null, editor: LexicalEditor, domSelection: Selection, tags: Set<string>, rootElement: HTMLElement, nodeCount: number): void;
150
157
  export declare function $insertNodes(nodes: Array<LexicalNode>, selectStart?: boolean): boolean;
151
158
  export declare function $getTextContent(): string;
159
+ export declare function DEPRECATED_$computeGridMap(grid: DEPRECATED_GridNode, cellA: DEPRECATED_GridCellNode, cellB: DEPRECATED_GridCellNode): [GridMapType, GridMapValueType, GridMapValueType];
160
+ export declare function DEPRECATED_$getNodeTriplet(source: PointType | LexicalNode | DEPRECATED_GridCellNode): [DEPRECATED_GridCellNode, DEPRECATED_GridRowNode, DEPRECATED_GridNode];
package/index.d.ts CHANGED
@@ -10,7 +10,7 @@ export type { PasteCommandType } from './LexicalCommands';
10
10
  export type { CommandListener, CommandListenerPriority, CommandPayloadType, CreateEditorArgs, EditableListener, EditorConfig, EditorThemeClasses, Klass, LexicalCommand, LexicalEditor, MutationListener, NodeMutation, SerializedEditor, Spread, } from './LexicalEditor';
11
11
  export type { EditorState, SerializedEditorState } from './LexicalEditorState';
12
12
  export type { DOMChildConversion, DOMConversion, DOMConversionFn, DOMConversionMap, DOMConversionOutput, DOMExportOutput, LexicalNode, NodeKey, NodeMap, SerializedLexicalNode, } from './LexicalNode';
13
- export type { BaseSelection, ElementPointType as ElementPoint, GridSelection, GridSelectionShape, NodeSelection, Point, RangeSelection, TextPointType as TextPoint, } from './LexicalSelection';
13
+ export type { BaseSelection, ElementPointType as ElementPoint, GridMapType, GridMapValueType, GridSelection, GridSelectionShape, NodeSelection, Point, RangeSelection, TextPointType as TextPoint, } from './LexicalSelection';
14
14
  export type { ElementFormatType, SerializedElementNode, } from './nodes/LexicalElementNode';
15
15
  export type { SerializedGridCellNode } from './nodes/LexicalGridCellNode';
16
16
  export type { SerializedRootNode } from './nodes/LexicalRootNode';
@@ -19,9 +19,9 @@ export { BLUR_COMMAND, CAN_REDO_COMMAND, CAN_UNDO_COMMAND, CLEAR_EDITOR_COMMAND,
19
19
  export { COMMAND_PRIORITY_CRITICAL, COMMAND_PRIORITY_EDITOR, COMMAND_PRIORITY_HIGH, COMMAND_PRIORITY_LOW, COMMAND_PRIORITY_NORMAL, createEditor, } from './LexicalEditor';
20
20
  export type { EventHandler } from './LexicalEvents';
21
21
  export { $normalizeSelection as $normalizeSelection__EXPERIMENTAL } from './LexicalNormalization';
22
- export { $createNodeSelection, $createRangeSelection, $getPreviousSelection, $getSelection, $getTextContent, $insertNodes, $isNodeSelection, $isRangeSelection, DEPRECATED_$createGridSelection, DEPRECATED_$isGridSelection, } from './LexicalSelection';
22
+ export { $createNodeSelection, $createRangeSelection, $getPreviousSelection, $getSelection, $getTextContent, $insertNodes, $isNodeSelection, $isRangeSelection, DEPRECATED_$computeGridMap, DEPRECATED_$createGridSelection, DEPRECATED_$getNodeTriplet, DEPRECATED_$isGridSelection, } from './LexicalSelection';
23
23
  export { $parseSerializedNode } from './LexicalUpdates';
24
- export { $addUpdateTag, $applyNodeReplacement, $copyNode, $getAdjacentNode, $getNearestNodeFromDOMNode, $getNearestRootOrShadowRoot, $getNodeByKey, $getRoot, $hasAncestor, $isInlineElementOrDecoratorNode, $isLeafNode, $isRootOrShadowRoot, $nodesOfType, $setCompositionKey, $setSelection, $splitNode, isSelectionWithinEditor, } from './LexicalUtils';
24
+ export { $addUpdateTag, $applyNodeReplacement, $copyNode, $getAdjacentNode, $getNearestNodeFromDOMNode, $getNearestRootOrShadowRoot, $getNodeByKey, $getRoot, $hasAncestor, $isInlineElementOrDecoratorNode, $isLeafNode, $isRootOrShadowRoot, $nodesOfType, $setCompositionKey, $setSelection, $splitNode, getNearestEditorFromDOMNode, isSelectionWithinEditor, } from './LexicalUtils';
25
25
  export { $isDecoratorNode, DecoratorNode } from './nodes/LexicalDecoratorNode';
26
26
  export { $isElementNode, ElementNode } from './nodes/LexicalElementNode';
27
27
  export { DEPRECATED_$isGridCellNode, DEPRECATED_GridCellNode, } from './nodes/LexicalGridCellNode';
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "rich-text"
10
10
  ],
11
11
  "license": "MIT",
12
- "version": "0.9.0",
12
+ "version": "0.9.1",
13
13
  "main": "Lexical.js",
14
14
  "repository": {
15
15
  "type": "git",