@lexical/selection
Advanced tools
Comparing version 0.18.1-nightly.20241021.0 to 0.18.1-nightly.20241022.0
@@ -148,2 +148,5 @@ /** | ||
const styleObject = {}; | ||
if (!css) { | ||
return styleObject; | ||
} | ||
const styles = css.split(';'); | ||
@@ -150,0 +153,0 @@ for (const style of styles) { |
@@ -10,3 +10,4 @@ /** | ||
'use strict';var k=require("lexical"),u;function w(a){let d=new URLSearchParams;d.append("code",a);for(let b=1;b<arguments.length;b++)d.append("v",arguments[b]);throw Error(`Minified Lexical error #${a}; visit https://lexical.dev/docs/error?${d} for the full message or `+"use the non-minified dev environment for full errors and additional helpful warnings.");}u=w&&w.__esModule&&Object.prototype.hasOwnProperty.call(w,"default")?w["default"]:w;let x=new Map; | ||
function y(a){for(;null!=a;){if(a.nodeType===Node.TEXT_NODE)return a;a=a.firstChild}return null}function z(a){let d=a.parentNode;if(null==d)throw Error("Should never happen");return[d,Array.from(d.childNodes).indexOf(a)]}function B(a){let d={};a=a.split(";");for(let b of a)if(""!==b){let [e,c]=b.split(/:([^]+)/);e&&c&&(d[e.trim()]=c.trim())}return d}function C(a){let d=x.get(a);void 0===d&&(d=B(a),x.set(a,d));return d}function D(a){let d="";for(let b in a)b&&(d+=`${b}: ${a[b]};`);return d} | ||
function y(a){for(;null!=a;){if(a.nodeType===Node.TEXT_NODE)return a;a=a.firstChild}return null}function z(a){let d=a.parentNode;if(null==d)throw Error("Should never happen");return[d,Array.from(d.childNodes).indexOf(a)]}function B(a){let d={};if(!a)return d;a=a.split(";");for(let b of a)if(""!==b){let [e,c]=b.split(/:([^]+)/);e&&c&&(d[e.trim()]=c.trim())}return d}function C(a){let d=x.get(a);void 0===d&&(d=B(a),x.set(a,d));return d} | ||
function D(a){let d="";for(let b in a)b&&(d+=`${b}: ${a[b]};`);return d} | ||
function E(a,d,b){let e=d.getNode();if(k.$isElementNode(e)){var c=e.getDescendantByIndex(d.offset);null!==c&&(e=c)}for(;0<b&&null!==e;){k.$isElementNode(e)&&(c=e.getLastDescendant(),null!==c&&(e=c));var g=e.getPreviousSibling(),h=0;if(null===g){c=e.getParentOrThrow();for(var f=c.getPreviousSibling();null===f;){c=c.getParent();if(null===c){g=null;break}f=c.getPreviousSibling()}null!==c&&(h=c.isInline()?0:2,g=f)}f=e.getTextContent();""===f&&k.$isElementNode(e)&&!e.isInline()&&(f="\n\n");c=f.length; | ||
@@ -13,0 +14,0 @@ if(!k.$isTextNode(e)||b>=c)f=e.getParent(),e.remove(),null==f||0!==f.getChildrenSize()||k.$isRootNode(f)||f.remove(),b-=c+h,e=g;else{let l=e.getKey();h=a.getEditorState().read(()=>{const p=k.$getNodeByKey(l);return k.$isTextNode(p)&&p.isSimpleText()?p.getTextContent():null});g=c-b;let m=f.slice(0,g);null!==h&&h!==f?(b=k.$getPreviousSelection(),c=e,e.isSimpleText()?e.setTextContent(h):(c=k.$createTextNode(h),e.replace(c)),k.$isRangeSelection(b)&&b.isCollapsed()&&(b=b.anchor.offset,c.select(b,b))): |
@@ -12,3 +12,3 @@ { | ||
"license": "MIT", | ||
"version": "0.18.1-nightly.20241021.0", | ||
"version": "0.18.1-nightly.20241022.0", | ||
"main": "LexicalSelection.js", | ||
@@ -41,4 +41,4 @@ "types": "index.d.ts", | ||
"dependencies": { | ||
"lexical": "0.18.1-nightly.20241021.0" | ||
"lexical": "0.18.1-nightly.20241022.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
112504
2205
+ Addedlexical@0.18.1-nightly.20241022.0(transitive)
- Removedlexical@0.18.1-nightly.20241021.0(transitive)