lexical 0.32.0 → 0.32.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.
package/LexicalUtils.d.ts CHANGED
@@ -30,6 +30,13 @@ export declare function getNearestEditorFromDOMNode(node: Node | null): LexicalE
30
30
  /** @internal */
31
31
  export declare function getEditorPropertyFromDOMNode(node: Node | null): unknown;
32
32
  export declare function getTextDirection(text: string): 'ltr' | 'rtl' | null;
33
+ /**
34
+ * Return true if the TextNode is a TabNode or is in token mode.
35
+ */
36
+ export declare function $isTokenOrTab(node: TextNode): boolean;
37
+ /**
38
+ * Return true if the TextNode is a TabNode, or is in token or segmented mode.
39
+ */
33
40
  export declare function $isTokenOrSegmented(node: TextNode): boolean;
34
41
  /**
35
42
  * @param node - The element being tested
package/index.d.ts CHANGED
@@ -20,7 +20,7 @@ export { $normalizeSelection as $normalizeSelection__EXPERIMENTAL } from './Lexi
20
20
  export type { BaseSelection, ElementPointType as ElementPoint, NodeSelection, Point, PointType, RangeSelection, TextPointType as TextPoint, } from './LexicalSelection';
21
21
  export { $createNodeSelection, $createPoint, $createRangeSelection, $createRangeSelectionFromDom, $getCharacterOffsets, $getPreviousSelection, $getSelection, $getTextContent, $insertNodes, $isBlockElementNode, $isNodeSelection, $isRangeSelection, } from './LexicalSelection';
22
22
  export { $parseSerializedNode, isCurrentlyReadOnlyMode } from './LexicalUpdates';
23
- export { $addUpdateTag, $applyNodeReplacement, $cloneWithProperties, $copyNode, $getAdjacentNode, $getEditor, $getNearestNodeFromDOMNode, $getNearestRootOrShadowRoot, $getNodeByKey, $getNodeByKeyOrThrow, $getRoot, $hasAncestor, $hasUpdateTag, $isInlineElementOrDecoratorNode, $isLeafNode, $isRootOrShadowRoot, $isTokenOrSegmented, $nodesOfType, $onUpdate, $selectAll, $setCompositionKey, $setSelection, $splitNode, getDOMOwnerDocument, getDOMSelection, getDOMSelectionFromTarget, getDOMTextNode, getEditorPropertyFromDOMNode, getNearestEditorFromDOMNode, INTERNAL_$isBlock, isBlockDomNode, isDocumentFragment, isDOMDocumentNode, isDOMNode, isDOMTextNode, isDOMUnmanaged, isExactShortcutMatch, isHTMLAnchorElement, isHTMLElement, isInlineDomNode, isLexicalEditor, isModifierMatch, isSelectionCapturedInDecoratorInput, isSelectionWithinEditor, removeFromParent, resetRandomKey, setDOMUnmanaged, setNodeIndentFromDOM, } from './LexicalUtils';
23
+ export { $addUpdateTag, $applyNodeReplacement, $cloneWithProperties, $copyNode, $getAdjacentNode, $getEditor, $getNearestNodeFromDOMNode, $getNearestRootOrShadowRoot, $getNodeByKey, $getNodeByKeyOrThrow, $getRoot, $hasAncestor, $hasUpdateTag, $isInlineElementOrDecoratorNode, $isLeafNode, $isRootOrShadowRoot, $isTokenOrSegmented, $isTokenOrTab, $nodesOfType, $onUpdate, $selectAll, $setCompositionKey, $setSelection, $splitNode, getDOMOwnerDocument, getDOMSelection, getDOMSelectionFromTarget, getDOMTextNode, getEditorPropertyFromDOMNode, getNearestEditorFromDOMNode, INTERNAL_$isBlock, isBlockDomNode, isDocumentFragment, isDOMDocumentNode, isDOMNode, isDOMTextNode, isDOMUnmanaged, isExactShortcutMatch, isHTMLAnchorElement, isHTMLElement, isInlineDomNode, isLexicalEditor, isModifierMatch, isSelectionCapturedInDecoratorInput, isSelectionWithinEditor, removeFromParent, resetRandomKey, setDOMUnmanaged, setNodeIndentFromDOM, } from './LexicalUtils';
24
24
  export { ArtificialNode__DO_NOT_USE } from './nodes/ArtificialNode';
25
25
  export { $isDecoratorNode, DecoratorNode } from './nodes/LexicalDecoratorNode';
26
26
  export type { ElementDOMSlot, ElementFormatType, SerializedElementNode, } from './nodes/LexicalElementNode';
@@ -19,6 +19,7 @@ export declare class TabNode extends TextNode {
19
19
  createDOM(config: EditorConfig): HTMLElement;
20
20
  static importJSON(serializedTabNode: SerializedTabNode): TabNode;
21
21
  setTextContent(text: string): this;
22
+ spliceText(offset: number, delCount: number, newText: string, moveSelection?: boolean): TextNode;
22
23
  setDetail(detail: TextDetailType | number): this;
23
24
  setMode(type: TextModeType): this;
24
25
  canInsertTextBefore(): boolean;
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "rich-text"
10
10
  ],
11
11
  "license": "MIT",
12
- "version": "0.32.0",
12
+ "version": "0.32.1",
13
13
  "main": "Lexical.js",
14
14
  "types": "index.d.ts",
15
15
  "repository": {