Comparing version 0.16.2-nightly.20240726.0 to 0.16.2-nightly.20240729.0
@@ -11,3 +11,3 @@ /** | ||
import type { KlassConstructor } from 'lexical'; | ||
import { ElementNode } from '.'; | ||
import { type DecoratorNode, ElementNode } from '.'; | ||
export type NodeMap = Map<NodeKey, LexicalNode>; | ||
@@ -105,3 +105,3 @@ export type SerializedLexicalNode = { | ||
*/ | ||
getTopLevelElement(): ElementNode | null; | ||
getTopLevelElement(): ElementNode | DecoratorNode<unknown> | null; | ||
/** | ||
@@ -112,3 +112,3 @@ * Returns the highest (in the EditorState tree) | ||
*/ | ||
getTopLevelElementOrThrow(): ElementNode; | ||
getTopLevelElementOrThrow(): ElementNode | DecoratorNode<unknown>; | ||
/** | ||
@@ -115,0 +115,0 @@ * Returns a list of the every ancestor of this node, |
@@ -10,4 +10,9 @@ /** | ||
import type { NodeKey } from '../LexicalNode'; | ||
import type { ElementNode } from './LexicalElementNode'; | ||
import { EditorConfig } from 'lexical'; | ||
import { LexicalNode } from '../LexicalNode'; | ||
export interface DecoratorNode<T> { | ||
getTopLevelElement(): ElementNode | this | null; | ||
getTopLevelElementOrThrow(): ElementNode | this; | ||
} | ||
/** @noInheritDoc */ | ||
@@ -14,0 +19,0 @@ export declare class DecoratorNode<T> extends LexicalNode { |
@@ -20,2 +20,6 @@ /** | ||
export type ElementFormatType = 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | ''; | ||
export interface ElementNode { | ||
getTopLevelElement(): ElementNode | null; | ||
getTopLevelElementOrThrow(): ElementNode; | ||
} | ||
/** @noInheritDoc */ | ||
@@ -22,0 +26,0 @@ export declare class ElementNode extends LexicalNode { |
@@ -11,2 +11,3 @@ /** | ||
import type { BaseSelection, RangeSelection } from '../LexicalSelection'; | ||
import type { ElementNode } from './LexicalElementNode'; | ||
import { LexicalNode } from '../LexicalNode'; | ||
@@ -29,2 +30,6 @@ export type SerializedTextNode = Spread<{ | ||
export type TextMarks = Array<TextMark>; | ||
export interface TextNode { | ||
getTopLevelElement(): ElementNode | null; | ||
getTopLevelElementOrThrow(): ElementNode; | ||
} | ||
/** @noInheritDoc */ | ||
@@ -31,0 +36,0 @@ export declare class TextNode extends LexicalNode { |
@@ -12,3 +12,3 @@ { | ||
"license": "MIT", | ||
"version": "0.16.2-nightly.20240726.0", | ||
"version": "0.16.2-nightly.20240729.0", | ||
"main": "Lexical.js", | ||
@@ -15,0 +15,0 @@ "types": "index.d.ts", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1065324
22745