Comparing version 0.2.5 to 0.2.6
@@ -35,2 +35,3 @@ /** | ||
export var KEY_ENTER_COMMAND: LexicalCommand<KeyboardEvent | null>; | ||
export var KEY_SPACE_COMMAND: LexicalCommand<KeyboardEvent>; | ||
export var KEY_BACKSPACE_COMMAND: LexicalCommand<KeyboardEvent>; | ||
@@ -67,3 +68,3 @@ export var KEY_ESCAPE_COMMAND: LexicalCommand<KeyboardEvent>; | ||
type MutationListeners = Map<MutationListener, Class<LexicalNode>>; | ||
export type NodeMutation = 'created' | 'destroyed'; | ||
export type NodeMutation = 'created' | 'updated' | 'destroyed'; | ||
type UpdateListener = (arg0: { | ||
@@ -151,3 +152,3 @@ tags: Set<string>; | ||
): () => void; | ||
dispatchCommand<P>(type: string, payload: P): boolean; | ||
dispatchCommand<P>(type: LexicalCommand<P>, payload: P): boolean; | ||
hasNodes(nodes: Array<Class<LexicalNode>>): boolean; | ||
@@ -160,3 +161,5 @@ getDecorators<X>(): Record<NodeKey, X>; | ||
setEditorState(editorState: EditorState, options?: EditorSetOptions): void; | ||
parseEditorState(stringifiedEditorState: string): EditorState; | ||
parseEditorState( | ||
maybeStringifiedEditorState: string | ParsedEditorState, | ||
): EditorState; | ||
update(updateFn: () => void, options?: EditorUpdateOptions): boolean; | ||
@@ -185,2 +188,4 @@ focus(callbackFn?: () => void): void; | ||
code?: EditorThemeClassName; | ||
subscript?: EditorThemeClassName; | ||
superscript?: EditorThemeClassName; | ||
}; | ||
@@ -190,3 +195,2 @@ export type EditorThemeClasses = { | ||
rtl?: EditorThemeClassName; | ||
root?: EditorThemeClassName; | ||
text?: TextNodeThemeClasses; | ||
@@ -201,2 +205,4 @@ paragraph?: EditorThemeClassName; | ||
listitem?: EditorThemeClassName; | ||
listitemChecked?: EditorThemeClassName; | ||
listitemUnchecked?: EditorThemeClassName; | ||
nested?: { | ||
@@ -211,2 +217,4 @@ list?: EditorThemeClassName; | ||
tableCellHeader?: EditorThemeClassName; | ||
mark?: EditorThemeClassName; | ||
markOverlap?: EditorThemeClassName; | ||
link?: EditorThemeClassName; | ||
@@ -309,4 +317,4 @@ quote?: EditorThemeClassName; | ||
lexicalNode: LexicalNode, | ||
parentLexicalNode: LexicalNode | null, | ||
) => LexicalNode | void | null; | ||
parentLexicalNode: LexicalNode | null | undefined, | ||
) => LexicalNode | null; | ||
export type DOMConversionMap = Record< | ||
@@ -356,3 +364,2 @@ NodeName, | ||
isDirty(): boolean; | ||
isComposing(): boolean; | ||
// $FlowFixMe | ||
@@ -571,5 +578,3 @@ getLatest<T extends LexicalNode>(): T; | ||
type TextModeType = 'normal' | 'token' | 'segmented' | 'inert'; | ||
export type TextMark = {end: null | number; id: string; start: null | number}; | ||
export type TextMarks = Array<TextMark>; | ||
export declare class TextNode extends LexicalNode { | ||
@@ -581,11 +586,8 @@ __text: string; | ||
__detail: number; | ||
__marks: null | TextMarks; | ||
static getType(): string; | ||
static clone(node: any): TextNode; | ||
constructor(text: string, key?: NodeKey); | ||
getMark(id: string): null | TextMark; | ||
setMark(id: string, start: null | number, end: null | number): void; | ||
deleteMark(id: string): void; | ||
getFormat(): number; | ||
getStyle(): string; | ||
isComposing(): boolean; | ||
isToken(): boolean; | ||
@@ -633,3 +635,3 @@ isSegmented(): boolean; | ||
export function $isTextNode( | ||
node: LexicalNode | null | undefined, | ||
node: TextNode | LexicalNode | null | undefined, | ||
): node is TextNode; | ||
@@ -715,6 +717,11 @@ | ||
collapseAtStart(selection: RangeSelection): boolean; | ||
excludeFromCopy(): boolean; | ||
excludeFromCopy(destination: 'clone' | 'html'): boolean; | ||
canExtractContents(): boolean; | ||
canReplaceWith(replacement: LexicalNode): boolean; | ||
canInsertAfter(node: LexicalNode): boolean; | ||
extractWithChild( | ||
child: LexicalNode, | ||
selection: RangeSelection | NodeSelection | GridSelection, | ||
destination: 'clone' | 'html', | ||
): boolean; | ||
canBeEmpty(): boolean; | ||
@@ -788,3 +795,5 @@ canInsertTextBefore(): boolean; | ||
export function $getRoot(): RootNode; | ||
export function $isLeafNode(node: LexicalNode | null | undefined): boolean; | ||
export function $isLeafNode( | ||
node: LexicalNode | null | undefined, | ||
): node is TextNode | LineBreakNode | DecoratorNode<unknown>; | ||
export function $setCompositionKey(compositionKey: null | NodeKey): void; | ||
@@ -791,0 +800,0 @@ export function $setSelection( |
@@ -12,3 +12,3 @@ { | ||
"license": "MIT", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"main": "Lexical.js", | ||
@@ -15,0 +15,0 @@ "typings": "Lexical.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 too big to display
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
395202
8289