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

@lexical/code

Package Overview
Dependencies
Maintainers
3
Versions
195
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lexical/code - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

2

LexicalCode.dev.js

@@ -792,3 +792,3 @@ /**

});
}), editor.registerNodeTransform(CodeNode, node => codeNodeTransform(node, editor)), editor.registerNodeTransform(lexical.TextNode, node => textNodeTransform(node, editor)), editor.registerNodeTransform(CodeHighlightNode, node => textNodeTransform(node, editor)), editor.registerCommand(lexical.INDENT_CONTENT_COMMAND, payload => handleMultilineIndent(lexical.INDENT_CONTENT_COMMAND), 1), editor.registerCommand(lexical.OUTDENT_CONTENT_COMMAND, payload => handleMultilineIndent(lexical.OUTDENT_CONTENT_COMMAND), 1), editor.registerCommand(lexical.KEY_ARROW_UP_COMMAND, payload => handleShiftLines(lexical.KEY_ARROW_UP_COMMAND, payload), 1), editor.registerCommand(lexical.KEY_ARROW_DOWN_COMMAND, payload => handleShiftLines(lexical.KEY_ARROW_DOWN_COMMAND, payload), 1));
}), editor.registerNodeTransform(CodeNode, node => codeNodeTransform(node, editor)), editor.registerNodeTransform(lexical.TextNode, node => textNodeTransform(node, editor)), editor.registerNodeTransform(CodeHighlightNode, node => textNodeTransform(node, editor)), editor.registerCommand(lexical.INDENT_CONTENT_COMMAND, payload => handleMultilineIndent(lexical.INDENT_CONTENT_COMMAND), lexical.COMMAND_PRIORITY_LOW), editor.registerCommand(lexical.OUTDENT_CONTENT_COMMAND, payload => handleMultilineIndent(lexical.OUTDENT_CONTENT_COMMAND), lexical.COMMAND_PRIORITY_LOW), editor.registerCommand(lexical.KEY_ARROW_UP_COMMAND, payload => handleShiftLines(lexical.KEY_ARROW_UP_COMMAND, payload), lexical.COMMAND_PRIORITY_LOW), editor.registerCommand(lexical.KEY_ARROW_DOWN_COMMAND, payload => handleShiftLines(lexical.KEY_ARROW_DOWN_COMMAND, payload), lexical.COMMAND_PRIORITY_LOW));
}

@@ -795,0 +795,0 @@

@@ -27,2 +27,3 @@ /**

exports.registerCodeHighlighting=function(a){if(!a.hasNodes([z,t]))throw Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");return n.mergeRegister(a.registerMutationListener(z,c=>{a.update(()=>{for(const [f,h]of c)if("destroyed"!==h){var b=r.$getNodeByKey(f);if(null!==b)a:{var d=b;b=a.getElementByKey(d.getKey());if(null===b)break a;d=d.getChildren();const m=d.length;if(m===b.__cachedChildrenLength)break a;b.__cachedChildrenLength=m;let g="1",k=1;for(let l=0;l<m;l++)r.$isLineBreakNode(d[l])&&
(g+="\n"+ ++k);b.setAttribute("data-gutter",g)}}})}),a.registerNodeTransform(z,c=>M(c,a)),a.registerNodeTransform(r.TextNode,c=>L(c,a)),a.registerNodeTransform(t,c=>L(c,a)),a.registerCommand(r.INDENT_CONTENT_COMMAND,()=>S(r.INDENT_CONTENT_COMMAND),1),a.registerCommand(r.OUTDENT_CONTENT_COMMAND,()=>S(r.OUTDENT_CONTENT_COMMAND),1),a.registerCommand(r.KEY_ARROW_UP_COMMAND,c=>U(r.KEY_ARROW_UP_COMMAND,c),1),a.registerCommand(r.KEY_ARROW_DOWN_COMMAND,c=>U(r.KEY_ARROW_DOWN_COMMAND,c),1))};
(g+="\n"+ ++k);b.setAttribute("data-gutter",g)}}})}),a.registerNodeTransform(z,c=>M(c,a)),a.registerNodeTransform(r.TextNode,c=>L(c,a)),a.registerNodeTransform(t,c=>L(c,a)),a.registerCommand(r.INDENT_CONTENT_COMMAND,()=>S(r.INDENT_CONTENT_COMMAND),r.COMMAND_PRIORITY_LOW),a.registerCommand(r.OUTDENT_CONTENT_COMMAND,()=>S(r.OUTDENT_CONTENT_COMMAND),r.COMMAND_PRIORITY_LOW),a.registerCommand(r.KEY_ARROW_UP_COMMAND,c=>U(r.KEY_ARROW_UP_COMMAND,c),r.COMMAND_PRIORITY_LOW),a.registerCommand(r.KEY_ARROW_DOWN_COMMAND,
c=>U(r.KEY_ARROW_DOWN_COMMAND,c),r.COMMAND_PRIORITY_LOW))};

@@ -11,9 +11,9 @@ {

"license": "MIT",
"version": "0.2.1",
"version": "0.2.2",
"main": "LexicalCode.js",
"peerDependencies": {
"lexical": "0.2.1"
"lexical": "0.2.2"
},
"dependencies": {
"@lexical/utils": "0.2.1",
"@lexical/utils": "0.2.2",
"prismjs": "^1.27.0"

@@ -20,0 +20,0 @@ },

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