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

@lexical/html

Package Overview
Dependencies
Maintainers
0
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lexical/html - npm Package Compare versions

Comparing version 0.16.1-nightly.20240627.0 to 0.16.1-nightly.20240628.0

4

LexicalHtml.dev.js

@@ -197,3 +197,5 @@ /**

if (lexical.$isBlockElementNode(node)) {
node.setFormat(textAlign);
if (textAlign && !node.getFormat()) {
node.setFormat(textAlign);
}
out.push(node);

@@ -200,0 +202,0 @@ } else {

@@ -13,4 +13,4 @@ /**

function x(b,a,f,e,g=new Map,c){let d=[];if(w.has(b.nodeName))return d;let h=null;var k=v(b,a),l=k?k(b):null;k=null;if(null!==l){k=l.after;let p=l.node;h=Array.isArray(p)?p[p.length-1]:p;if(null!==h){for(var [,n]of g)if(h=n(h,c),!h)break;h&&d.push(...(Array.isArray(p)?p:[h]))}null!=l.forChild&&g.set(b.nodeName,l.forChild)}c=b.childNodes;n=[];e=null!=h&&r.$isRootOrShadowRoot(h)?!1:null!=h&&r.$isBlockElementNode(h)||e;for(l=0;l<c.length;l++)n.push(...x(c[l],a,f,e,new Map(g),h));null!=k&&(n=k(n));q.isBlockDomNode(b)&&
(n=e?z(b,n,()=>{let p=new r.ArtificialNode__DO_NOT_USE;f.push(p);return p}):z(b,n,r.$createParagraphNode));null==h?d=d.concat(n):r.$isElementNode(h)&&h.append(...n);return d}function z(b,a,f){b=b.style.textAlign;let e=[],g=[];for(let d=0;d<a.length;d++){var c=a[d];if(r.$isBlockElementNode(c))c.setFormat(b),e.push(c);else if(g.push(c),d===a.length-1||d<a.length-1&&r.$isBlockElementNode(a[d+1]))c=f(),c.setFormat(b),c.append(...g),e.push(c),g=[]}return e}
(n=e?z(b,n,()=>{let p=new r.ArtificialNode__DO_NOT_USE;f.push(p);return p}):z(b,n,r.$createParagraphNode));null==h?d=d.concat(n):r.$isElementNode(h)&&h.append(...n);return d}function z(b,a,f){b=b.style.textAlign;let e=[],g=[];for(let d=0;d<a.length;d++){var c=a[d];if(r.$isBlockElementNode(c))b&&!c.getFormat()&&c.setFormat(b),e.push(c);else if(g.push(c),d===a.length-1||d<a.length-1&&r.$isBlockElementNode(a[d+1]))c=f(),c.setFormat(b),c.append(...g),e.push(c),g=[]}return e}
exports.$generateHtmlFromNodes=function(b,a){if("undefined"===typeof document||"undefined"===typeof window&&"undefined"===typeof global.window)throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let f=document.createElement("div"),e=r.$getRoot().getChildren();for(let g=0;g<e.length;g++)t(b,e[g],f,a);return f.innerHTML};
exports.$generateNodesFromDOM=function(b,a){let f=a.body?a.body.childNodes:[];a=[];let e=[];for(let c=0;c<f.length;c++){var g=f[c];w.has(g.nodeName)||(g=x(g,b,e,!1),null!==g&&(a=a.concat(g)))}for(let c of e)c.getNextSibling()instanceof r.ArtificialNode__DO_NOT_USE&&c.insertAfter(r.$createLineBreakNode());for(let c of e){b=c.getChildren();for(let d of b)c.insertBefore(d);c.remove()}return a}

@@ -11,3 +11,3 @@ {

"license": "MIT",
"version": "0.16.1-nightly.20240627.0",
"version": "0.16.1-nightly.20240628.0",
"main": "LexicalHtml.js",

@@ -21,5 +21,5 @@ "types": "index.d.ts",

"dependencies": {
"@lexical/selection": "0.16.1-nightly.20240627.0",
"@lexical/utils": "0.16.1-nightly.20240627.0",
"lexical": "0.16.1-nightly.20240627.0"
"@lexical/selection": "0.16.1-nightly.20240628.0",
"@lexical/utils": "0.16.1-nightly.20240628.0",
"lexical": "0.16.1-nightly.20240628.0"
},

@@ -26,0 +26,0 @@ "module": "LexicalHtml.mjs",

Sorry, the diff of this file is not supported yet

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