New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

lexical

Package Overview
Dependencies
Maintainers
0
Versions
306
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.21.1-nightly.20241213.0 to 0.21.1-nightly.20241216.0

4

index.d.ts

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

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

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

export { $parseSerializedNode, isCurrentlyReadOnlyMode } from './LexicalUpdates';
export { $addUpdateTag, $applyNodeReplacement, $cloneWithProperties, $copyNode, $getAdjacentNode, $getEditor, $getNearestNodeFromDOMNode, $getNearestRootOrShadowRoot, $getNodeByKey, $getNodeByKeyOrThrow, $getRoot, $hasAncestor, $hasUpdateTag, $isInlineElementOrDecoratorNode, $isLeafNode, $isRootOrShadowRoot, $isTokenOrSegmented, $nodesOfType, $onUpdate, $selectAll, $setCompositionKey, $setSelection, $splitNode, getDOMSelection, getDOMTextNode, getEditorPropertyFromDOMNode, getNearestEditorFromDOMNode, isBlockDomNode, isDocumentFragment, isDOMTextNode, isDOMUnmanaged, isHTMLAnchorElement, isHTMLElement, isInlineDomNode, isLexicalEditor, isSelectionCapturedInDecoratorInput, isSelectionWithinEditor, resetRandomKey, setDOMUnmanaged, setNodeIndentFromDOM, } from './LexicalUtils';
export { $addUpdateTag, $applyNodeReplacement, $cloneWithProperties, $copyNode, $getAdjacentNode, $getEditor, $getNearestNodeFromDOMNode, $getNearestRootOrShadowRoot, $getNodeByKey, $getNodeByKeyOrThrow, $getRoot, $hasAncestor, $hasUpdateTag, $isInlineElementOrDecoratorNode, $isLeafNode, $isRootOrShadowRoot, $isTokenOrSegmented, $nodesOfType, $onUpdate, $selectAll, $setCompositionKey, $setSelection, $splitNode, getDOMSelection, getDOMTextNode, getEditorPropertyFromDOMNode, getNearestEditorFromDOMNode, isBlockDomNode, isDocumentFragment, isDOMNode, isDOMTextNode, isDOMUnmanaged, isHTMLAnchorElement, isHTMLElement, isInlineDomNode, isLexicalEditor, isSelectionCapturedInDecoratorInput, isSelectionWithinEditor, resetRandomKey, setDOMUnmanaged, setNodeIndentFromDOM, } from './LexicalUtils';
export { ArtificialNode__DO_NOT_USE } from './nodes/ArtificialNode';

@@ -27,0 +27,0 @@ export { $isDecoratorNode, DecoratorNode } from './nodes/LexicalDecoratorNode';

@@ -26,2 +26,5 @@ /**

export declare const IS_HIGHLIGHT: number;
export declare const IS_LOWERCASE: number;
export declare const IS_UPPERCASE: number;
export declare const IS_CAPITALIZE: number;
export declare const IS_ALL_FORMATTING: number;

@@ -28,0 +31,0 @@ export declare const IS_DIRECTIONLESS = 1;

@@ -24,2 +24,5 @@ /**

italic?: EditorThemeClassName;
lowercase?: EditorThemeClassName;
uppercase?: EditorThemeClassName;
capitalize?: EditorThemeClassName;
strikethrough?: EditorThemeClassName;

@@ -192,7 +195,7 @@ subscript?: EditorThemeClassName;

* // Type of `payload` is inferred here. But lets say we want to extract a function to delegate to
* handleMyCommand(editor, payload);
* $handleMyCommand(editor, payload);
* return true;
* });
*
* function handleMyCommand(editor: LexicalEditor, payload: CommandPayloadType<typeof MY_COMMAND>) {
* function $handleMyCommand(editor: LexicalEditor, payload: CommandPayloadType<typeof MY_COMMAND>) {
* // `payload` is of type `SomeType`, extracted from the command.

@@ -350,10 +353,20 @@ * }

* Registers a listener that will trigger anytime the provided command
* is dispatched, subject to priority. Listeners that run at a higher priority can "intercept"
* commands and prevent them from propagating to other handlers by returning true.
* is dispatched with {@link LexicalEditor.dispatch}, subject to priority.
* Listeners that run at a higher priority can "intercept" commands and
* prevent them from propagating to other handlers by returning true.
*
* Listeners registered at the same priority level will run deterministically in the order of registration.
* Listeners are always invoked in an {@link LexicalEditor.update} and can
* call dollar functions.
*
* Listeners registered at the same priority level will run
* deterministically in the order of registration.
*
* @param command - the command that will trigger the callback.
* @param listener - the function that will execute when the command is dispatched.
* @param priority - the relative priority of the listener. 0 | 1 | 2 | 3 | 4
* (or {@link COMMAND_PRIORITY_EDITOR} |
* {@link COMMAND_PRIORITY_LOW} |
* {@link COMMAND_PRIORITY_NORMAL} |
* {@link COMMAND_PRIORITY_HIGH} |
* {@link COMMAND_PRIORITY_CRITICAL})
* @returns a teardown function that can be used to cleanup the listener.

@@ -415,3 +428,6 @@ */

* This triggers all command listeners (set by {@link LexicalEditor.registerCommand})
* for this type, passing them the provided payload.
* for this type, passing them the provided payload. The command listeners
* will be triggered in an implicit {@link LexicalEditor.update}, unless
* this was invoked from inside an update in which case that update context
* will be re-used (as if this was a dollar function itself).
* @param type - the type of command listeners to trigger.

@@ -418,0 +434,0 @@ * @param payload - the data to pass as an argument to the command listeners.

@@ -51,3 +51,3 @@ /**

export declare function getEditorStateTextContent(editorState: EditorState): string;
export declare function markAllNodesAsDirty(editor: LexicalEditor, type: string): void;
export declare function markNodesWithTypesAsDirty(editor: LexicalEditor, types: string[]): void;
export declare function $getRoot(): RootNode;

@@ -159,13 +159,18 @@ export declare function internalGetRoot(editorState: EditorState): RootNode;

*/
export declare function isHTMLAnchorElement(x: Node): x is HTMLAnchorElement;
export declare function isHTMLAnchorElement(x: unknown): x is HTMLAnchorElement;
/**
* @param x - The element being testing
* @param x - The element being tested
* @returns Returns true if x is an HTML element, false otherwise.
*/
export declare function isHTMLElement(x: Node | EventTarget): x is HTMLElement;
export declare function isHTMLElement(x: unknown): x is HTMLElement;
/**
* @param x - The element being tested
* @returns Returns true if x is a DOM Node, false otherwise.
*/
export declare function isDOMNode(x: unknown): x is Node;
/**
* @param x - The element being testing
* @returns Returns true if x is a document fragment, false otherwise.
*/
export declare function isDocumentFragment(x: Node | EventTarget): x is DocumentFragment;
export declare function isDocumentFragment(x: unknown): x is DocumentFragment;
/**

@@ -172,0 +177,0 @@ *

@@ -25,3 +25,3 @@ /**

insertAfter(nodeToInsert: LexicalNode): LexicalNode;
updateDOM(prevNode: RootNode, dom: HTMLElement): false;
updateDOM(prevNode: this, dom: HTMLElement): false;
append(...nodesToAppend: LexicalNode[]): this;

@@ -28,0 +28,0 @@ static importJSON(serializedNode: SerializedRootNode): RootNode;

@@ -21,3 +21,3 @@ /**

export type TextDetailType = 'directionless' | 'unmergable';
export type TextFormatType = 'bold' | 'underline' | 'strikethrough' | 'italic' | 'highlight' | 'code' | 'subscript' | 'superscript';
export type TextFormatType = 'bold' | 'underline' | 'strikethrough' | 'italic' | 'highlight' | 'code' | 'subscript' | 'superscript' | 'lowercase' | 'uppercase' | 'capitalize';
export type TextModeType = 'normal' | 'token' | 'segmented';

@@ -144,3 +144,3 @@ export type TextMark = {

createDOM(config: EditorConfig, editor?: LexicalEditor): HTMLElement;
updateDOM(prevNode: TextNode, dom: HTMLElement, config: EditorConfig): boolean;
updateDOM(prevNode: this, dom: HTMLElement, config: EditorConfig): boolean;
static importDOM(): DOMConversionMap | null;

@@ -147,0 +147,0 @@ static importJSON(serializedNode: SerializedTextNode): TextNode;

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

"license": "MIT",
"version": "0.21.1-nightly.20241213.0",
"version": "0.21.1-nightly.20241216.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 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

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