Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lexical

Package Overview
Dependencies
Maintainers
7
Versions
216
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lexical - npm Package Compare versions

Comparing version 0.12.2 to 0.12.3

2

index.d.ts

@@ -10,3 +10,3 @@ /** @module lexical */

export type { PasteCommandType } from './LexicalCommands';
export type { CommandListener, CommandListenerPriority, CommandPayloadType, CreateEditorArgs, EditableListener, EditorConfig, EditorThemeClasses, Klass, LexicalCommand, LexicalEditor, MutationListener, NodeMutation, SerializedEditor, Spread, } from './LexicalEditor';
export type { CommandListener, CommandListenerPriority, CommandPayloadType, CreateEditorArgs, EditableListener, EditorConfig, EditorThemeClasses, HTMLConfig, Klass, LexicalCommand, LexicalEditor, LexicalNodeReplacement, MutationListener, NodeMutation, SerializedEditor, Spread, } from './LexicalEditor';
export type { EditorState, SerializedEditorState } from './LexicalEditorState';

@@ -13,0 +13,0 @@ export type { DOMChildConversion, DOMConversion, DOMConversionFn, DOMConversionMap, DOMConversionOutput, DOMExportOutput, LexicalNode, NodeKey, NodeMap, SerializedLexicalNode, } from './LexicalNode';

@@ -9,3 +9,3 @@ /**

import type { EditorState, SerializedEditorState } from './LexicalEditorState';
import type { DOMConversion, NodeKey } from './LexicalNode';
import type { DOMConversion, DOMConversionMap, DOMExportOutput, NodeKey } from './LexicalNode';
import { LexicalNode } from './LexicalNode';

@@ -105,2 +105,13 @@ export type Spread<T1, T2> = Omit<T2, keyof T1> & T1;

};
export type LexicalNodeReplacement = {
replace: Klass<LexicalNode>;
with: <T extends {
new (...args: any): any;
}>(node: InstanceType<T>) => LexicalNode;
withKlass?: Klass<LexicalNode>;
};
export type HTMLConfig = {
export?: Map<Klass<LexicalNode>, (editor: LexicalEditor, target: LexicalNode) => DOMExportOutput>;
import?: DOMConversionMap;
};
export type CreateEditorArgs = {

@@ -110,9 +121,3 @@ disableEvents?: boolean;

namespace?: string;
nodes?: ReadonlyArray<Klass<LexicalNode> | {
replace: Klass<LexicalNode>;
with: <T extends {
new (...args: any): any;
}>(node: InstanceType<T>) => LexicalNode;
withKlass?: Klass<LexicalNode>;
}>;
nodes?: ReadonlyArray<Klass<LexicalNode> | LexicalNodeReplacement>;
onError?: ErrorHandler;

@@ -122,2 +127,3 @@ parentEditor?: LexicalEditor;

theme?: EditorThemeClasses;
html?: HTMLConfig;
};

@@ -130,2 +136,3 @@ export type RegisteredNodes = Map<string, RegisteredNode>;

replaceWithKlass: null | Klass<LexicalNode>;
exportDOM?: (editor: LexicalEditor, targetNode: LexicalNode) => DOMExportOutput;
};

@@ -132,0 +139,0 @@ export type Transform<T extends LexicalNode> = (node: T) => void;

@@ -77,3 +77,3 @@ /**

insertText(): void;
insertNodes(nodes: Array<LexicalNode>, selectStart?: boolean): boolean;
insertNodes(nodes: Array<LexicalNode>): void;
getNodes(): Array<LexicalNode>;

@@ -111,3 +111,3 @@ getTextContent(): string;

insertText(): void;
insertNodes(nodes: Array<LexicalNode>, selectStart?: boolean): boolean;
insertNodes(nodes: Array<LexicalNode>): void;
getShape(): GridSelectionShape;

@@ -232,15 +232,13 @@ getNodes(): Array<LexicalNode>;

* @param nodes - the nodes to insert
* @param selectStart - whether or not to select the start after the insertion.
* @returns true if the nodes were inserted successfully, false otherwise.
*/
insertNodes(nodes: Array<LexicalNode>, selectStart?: boolean): boolean;
insertNodes(nodes: Array<LexicalNode>): void;
/**
* Inserts a new ParagraphNode into the EditorState at the current Selection
*
* @returns the newly inserted node.
*/
insertParagraph(): void;
insertParagraph(): ElementNode | null;
/**
* Inserts a logical linebreak, which may be a new LineBreakNode or a new ParagraphNode, into the EditorState at the
* current Selection.
*
* @param selectStart whether or not to select the start of the insertion range after the operation completes.
*/

@@ -309,5 +307,5 @@ insertLineBreak(selectStart?: boolean): void;

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;
export declare function $insertNodes(nodes: Array<LexicalNode>, selectStart?: boolean): boolean;
export declare function $insertNodes(nodes: Array<LexicalNode>): void;
export declare function $getTextContent(): string;
export declare function DEPRECATED_$computeGridMap(grid: DEPRECATED_GridNode, cellA: DEPRECATED_GridCellNode, cellB: DEPRECATED_GridCellNode): [GridMapType, GridMapValueType, GridMapValueType];
export declare function DEPRECATED_$getNodeTriplet(source: PointType | LexicalNode | DEPRECATED_GridCellNode): [DEPRECATED_GridCellNode, DEPRECATED_GridRowNode, DEPRECATED_GridNode];

@@ -12,3 +12,3 @@ {

"license": "MIT",
"version": "0.12.2",
"version": "0.12.3",
"main": "Lexical.js",

@@ -15,0 +15,0 @@ "repository": {

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc