@lexical/code
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -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
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
39505
769
1
+ Added@lexical/list@0.2.2(transitive)
+ Added@lexical/table@0.2.2(transitive)
+ Added@lexical/utils@0.2.2(transitive)
+ Addedlexical@0.2.2(transitive)
- Removed@lexical/list@0.2.1(transitive)
- Removed@lexical/table@0.2.1(transitive)
- Removed@lexical/utils@0.2.1(transitive)
- Removedlexical@0.2.1(transitive)
Updated@lexical/utils@0.2.2