@lexical/rich-text
Advanced tools
Comparing version 0.18.1-nightly.20241011.0 to 0.18.1-nightly.20241014.0
@@ -340,2 +340,3 @@ /** | ||
if (element.style !== null) { | ||
lexical.setNodeIndentFromDOM(element, node); | ||
node.setFormat(element.style.textAlign); | ||
@@ -352,2 +353,3 @@ } | ||
node.setFormat(element.style.textAlign); | ||
lexical.setNodeIndentFromDOM(element, node); | ||
} | ||
@@ -354,0 +356,0 @@ return { |
@@ -18,4 +18,4 @@ /** | ||
a.setDirection(b.direction);return a}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(b,a=!0){let d=b?b.anchor.offset:0;var e=this.getLastDescendant();e=!e||b&&b.anchor.key===e.getKey()&&d===e.getTextContentSize()||!b?k.$createParagraphNode():F(this.getTag());let f=this.getDirection();e.setDirection(f);this.insertAfter(e,a);0===d&&!this.isEmpty()&&b&&(b=k.$createParagraphNode(),b.select(),this.replace(b,!0));return e}collapseAtStart(){let b=this.isEmpty()? | ||
k.$createParagraphNode():F(this.getTag());this.getChildren().forEach(a=>b.append(a));this.replace(b);return!0}extractWithChild(){return!0}}function E(b){return"span"===b.nodeName.toLowerCase()?"26pt"===b.style.fontSize:!1}function D(b){let a=b.nodeName.toLowerCase(),d=null;if("h1"===a||"h2"===a||"h3"===a||"h4"===a||"h5"===a||"h6"===a)d=F(a),null!==b.style&&d.setFormat(b.style.textAlign);return{node:d}}function z(b){let a=A();null!==b.style&&a.setFormat(b.style.textAlign);return{node:a}} | ||
function F(b){return k.$applyNodeReplacement(new C(b))}function G(b,a){b.preventDefault();a.update(()=>{let d=k.$getSelection(),e=h.objectKlassEquals(b,InputEvent)||h.objectKlassEquals(b,KeyboardEvent)?null:b.clipboardData;null!=e&&null!==d&&c.$insertDataTransferForRichText(e,d,a)},{tag:"paste"})} | ||
k.$createParagraphNode():F(this.getTag());this.getChildren().forEach(a=>b.append(a));this.replace(b);return!0}extractWithChild(){return!0}}function E(b){return"span"===b.nodeName.toLowerCase()?"26pt"===b.style.fontSize:!1}function D(b){let a=b.nodeName.toLowerCase(),d=null;if("h1"===a||"h2"===a||"h3"===a||"h4"===a||"h5"===a||"h6"===a)d=F(a),null!==b.style&&(k.setNodeIndentFromDOM(b,d),d.setFormat(b.style.textAlign));return{node:d}} | ||
function z(b){let a=A();null!==b.style&&(a.setFormat(b.style.textAlign),k.setNodeIndentFromDOM(b,a));return{node:a}}function F(b){return k.$applyNodeReplacement(new C(b))}function G(b,a){b.preventDefault();a.update(()=>{let d=k.$getSelection(),e=h.objectKlassEquals(b,InputEvent)||h.objectKlassEquals(b,KeyboardEvent)?null:b.clipboardData;null!=e&&null!==d&&c.$insertDataTransferForRichText(e,d,a)},{tag:"paste"})} | ||
async function H(b,a){await c.copyToClipboard(a,h.objectKlassEquals(b,ClipboardEvent)?b:null);a.update(()=>{let d=k.$getSelection();k.$isRangeSelection(d)?d.removeText():k.$isNodeSelection(d)&&d.getNodes().forEach(e=>e.remove())})} | ||
@@ -22,0 +22,0 @@ function I(b){let a=null;h.objectKlassEquals(b,DragEvent)?a=b.dataTransfer:h.objectKlassEquals(b,ClipboardEvent)&&(a=b.clipboardData);if(null===a)return[!1,[],!1];var d=a.types;b=d.includes("Files");d=d.includes("text/html")||d.includes("text/plain");return[b,Array.from(a.files),d]} |
@@ -10,3 +10,3 @@ { | ||
"license": "MIT", | ||
"version": "0.18.1-nightly.20241011.0", | ||
"version": "0.18.1-nightly.20241014.0", | ||
"main": "LexicalRichText.js", | ||
@@ -39,7 +39,7 @@ "types": "index.d.ts", | ||
"dependencies": { | ||
"@lexical/clipboard": "0.18.1-nightly.20241011.0", | ||
"@lexical/selection": "0.18.1-nightly.20241011.0", | ||
"@lexical/utils": "0.18.1-nightly.20241011.0", | ||
"lexical": "0.18.1-nightly.20241011.0" | ||
"@lexical/clipboard": "0.18.1-nightly.20241014.0", | ||
"@lexical/selection": "0.18.1-nightly.20241014.0", | ||
"@lexical/utils": "0.18.1-nightly.20241014.0", | ||
"lexical": "0.18.1-nightly.20241014.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
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
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
86352
1740
+ Added@lexical/clipboard@0.18.1-nightly.20241014.0(transitive)
+ Added@lexical/html@0.18.1-nightly.20241014.0(transitive)
+ Added@lexical/list@0.18.1-nightly.20241014.0(transitive)
+ Added@lexical/selection@0.18.1-nightly.20241014.0(transitive)
+ Added@lexical/table@0.18.1-nightly.20241014.0(transitive)
+ Added@lexical/utils@0.18.1-nightly.20241014.0(transitive)
+ Addedlexical@0.18.1-nightly.20241014.0(transitive)
- Removed@lexical/clipboard@0.18.1-nightly.20241011.0(transitive)
- Removed@lexical/html@0.18.1-nightly.20241011.0(transitive)
- Removed@lexical/list@0.18.1-nightly.20241011.0(transitive)
- Removed@lexical/selection@0.18.1-nightly.20241011.0(transitive)
- Removed@lexical/table@0.18.1-nightly.20241011.0(transitive)
- Removed@lexical/utils@0.18.1-nightly.20241011.0(transitive)
- Removedlexical@0.18.1-nightly.20241011.0(transitive)