@lexical/selection 0.15.0 → 0.16.1-nightly.20240610.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LexicalSelection.dev.js
CHANGED
|
@@ -515,7 +515,11 @@ function $patchStyleText(selection, patch) {
|
|
|
515
515
|
// the entire first node isn't selected, so split it
|
|
516
516
|
firstNode = firstNode.splitText(startOffset)[1];
|
|
517
517
|
startOffset = 0;
|
|
518
|
-
|
|
518
|
+
if (isBefore) {
|
|
519
|
+
anchor.set(firstNode.getKey(), startOffset, 'text');
|
|
520
|
+
} else {
|
|
521
|
+
focus.set(firstNode.getKey(), startOffset, 'text');
|
|
522
|
+
}
|
|
519
523
|
}
|
|
520
524
|
$patchStyle(firstNode, patch);
|
|
521
525
|
}
|
package/LexicalSelection.dev.mjs
CHANGED
|
@@ -513,7 +513,11 @@ function $patchStyleText(selection, patch) {
|
|
|
513
513
|
// the entire first node isn't selected, so split it
|
|
514
514
|
firstNode = firstNode.splitText(startOffset)[1];
|
|
515
515
|
startOffset = 0;
|
|
516
|
-
|
|
516
|
+
if (isBefore) {
|
|
517
|
+
anchor.set(firstNode.getKey(), startOffset, 'text');
|
|
518
|
+
} else {
|
|
519
|
+
focus.set(firstNode.getKey(), startOffset, 'text');
|
|
520
|
+
}
|
|
517
521
|
}
|
|
518
522
|
$patchStyle(firstNode, patch);
|
|
519
523
|
}
|
package/LexicalSelection.prod.js
CHANGED
|
@@ -6,27 +6,28 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
'use strict';var k=require("lexical"),
|
|
10
|
-
function y(a){for(;null!=a;){if(a.nodeType===Node.TEXT_NODE)return a;a=a.firstChild}return null}function z(a){let b=a.parentNode;if(null==b)throw Error("Should never happen");return[b,Array.from(b.childNodes).indexOf(a)]}function
|
|
11
|
-
function
|
|
9
|
+
'use strict';var k=require("lexical"),u;function w(a){let b=new URLSearchParams;b.append("code",a);for(let c=1;c<arguments.length;c++)b.append("v",arguments[c]);throw Error(`Minified Lexical error #${a}; visit https://lexical.dev/docs/error?${b} 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;
|
|
10
|
+
function y(a){for(;null!=a;){if(a.nodeType===Node.TEXT_NODE)return a;a=a.firstChild}return null}function z(a){let b=a.parentNode;if(null==b)throw Error("Should never happen");return[b,Array.from(b.childNodes).indexOf(a)]}function B(a){let b={};a=a.split(";");for(let c of a)if(""!==c){let [e,d]=c.split(/:([^]+)/);e&&d&&(b[e.trim()]=d.trim())}return b}function C(a){let b=x.get(a);void 0===b&&(b=B(a),x.set(a,b));return b}function D(a){let b="";for(let c in a)c&&(b+=`${c}: ${a[c]};`);return b}
|
|
11
|
+
function E(a,b,c){let e=b.getNode();if(k.$isElementNode(e)){var d=e.getDescendantByIndex(b.offset);null!==d&&(e=d)}for(;0<c&&null!==e;){k.$isElementNode(e)&&(d=e.getLastDescendant(),null!==d&&(e=d));var g=e.getPreviousSibling(),h=0;if(null===g){d=e.getParentOrThrow();for(var f=d.getPreviousSibling();null===f;){d=d.getParent();if(null===d){g=null;break}f=d.getPreviousSibling()}null!==d&&(h=d.isInline()?0:2,g=f)}f=e.getTextContent();""===f&&k.$isElementNode(e)&&!e.isInline()&&(f="\n\n");d=f.length;
|
|
12
12
|
if(!k.$isTextNode(e)||c>=d)f=e.getParent(),e.remove(),null==f||0!==f.getChildrenSize()||k.$isRootNode(f)||f.remove(),c-=d+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=d-c;let m=f.slice(0,g);null!==h&&h!==f?(c=k.$getPreviousSelection(),d=e,e.isSimpleText()?e.setTextContent(h):(d=k.$createTextNode(h),e.replace(d)),k.$isRangeSelection(c)&&c.isCollapsed()&&(c=c.anchor.offset,d.select(c,c))):
|
|
13
|
-
e.isSimpleText()?(h=b.key===l,f=b.offset,f<c&&(f=d),c=h?f-c:0,d=h?f:g,h&&0===c?([c]=e.splitText(c,d),c.remove()):([,c]=e.splitText(c,d),c.remove())):(c=k.$createTextNode(m),e.replace(c));c=0}}}function
|
|
14
|
-
function
|
|
15
|
-
function
|
|
16
|
-
r&&k.$isLeafNode(q)&&!n.has(q.getKey())){if(q=r.getKey(),void 0===h.get(q)){let t=e();t.setFormat(r.getFormatType());t.setIndent(r.getIndent());f.push(t);h.set(q,t);r.getChildren().forEach(
|
|
13
|
+
e.isSimpleText()?(h=b.key===l,f=b.offset,f<c&&(f=d),c=h?f-c:0,d=h?f:g,h&&0===c?([c]=e.splitText(c,d),c.remove()):([,c]=e.splitText(c,d),c.remove())):(c=k.$createTextNode(m),e.replace(c));c=0}}}function F(a,b){let c=C("getStyle"in a?a.getStyle():a.style);b=Object.entries(b).reduce((d,[g,h])=>{h instanceof Function?d[g]=h(c[g]):null===h?delete d[g]:d[g]=h;return d},{...c});let e=D(b);a.setStyle(e);x.set(e,b)}
|
|
14
|
+
function G(a){for(;null!==a&&!k.$isRootOrShadowRoot(a);){let b=a.getLatest(),c=a.getParent();0===b.getChildrenSize()&&a.remove(!0);a=c}}
|
|
15
|
+
function H(a,b,c,e,d=null){if(0!==b.length){var g=b[0],h=new Map,f=[];g=k.$isElementNode(g)?g:g.getParentOrThrow();g.isInline()&&(g=g.getParentOrThrow());for(var l=!1;null!==g;){var m=g.getPreviousSibling();if(null!==m){g=m;l=!0;break}g=g.getParentOrThrow();if(k.$isRootOrShadowRoot(g))break}m=new Set;for(var p=0;p<c;p++){var q=b[p];k.$isElementNode(q)&&0===q.getChildrenSize()&&m.add(q.getKey())}var n=new Set;for(p=0;p<c;p++){q=b[p];var r=q.getParent();null!==r&&r.isInline()&&(r=r.getParent());if(null!==
|
|
16
|
+
r&&k.$isLeafNode(q)&&!n.has(q.getKey())){if(q=r.getKey(),void 0===h.get(q)){let t=e();t.setFormat(r.getFormatType());t.setIndent(r.getIndent());f.push(t);h.set(q,t);r.getChildren().forEach(v=>{t.append(v);n.add(v.getKey());k.$isElementNode(v)&&v.getChildrenKeys().forEach(A=>n.add(A))});G(r)}}else m.has(q.getKey())&&(k.$isElementNode(q)||u(179),r=e(),r.setFormat(q.getFormatType()),r.setIndent(q.getIndent()),f.push(r),q.remove(!0))}if(null!==d)for(b=0;b<f.length;b++)d.append(f[b]);b=null;if(k.$isRootOrShadowRoot(g))if(l)if(null!==
|
|
17
17
|
d)g.insertAfter(d);else for(d=f.length-1;0<=d;d--)g.insertAfter(f[d]);else if(l=g.getFirstChild(),k.$isElementNode(l)&&(g=l),null===l)if(d)g.append(d);else for(d=0;d<f.length;d++)l=f[d],g.append(l),b=l;else if(null!==d)l.insertBefore(d);else for(g=0;g<f.length;g++)d=f[g],l.insertBefore(d),b=d;else if(d)g.insertAfter(d);else for(d=f.length-1;0<=d;d--)l=f[d],g.insertAfter(l),b=l;f=k.$getPreviousSelection();k.$isRangeSelection(f)&&f.anchor.getNode().isAttached()&&f.focus.getNode().isAttached()?k.$setSelection(f.clone()):
|
|
18
|
-
null!==b?b.selectEnd():a.dirty=!0}}function
|
|
18
|
+
null!==b?b.selectEnd():a.dirty=!0}}function I(a,b,c,e){a.modify(b?"extend":"move",c,e)}function J(a){a=a.anchor.getNode();return"rtl"===(k.$isRootNode(a)?a:a.getParentOrThrow()).getDirection()}function K(a){if(k.$isDecoratorNode(a)||!k.$isElementNode(a)||k.$isRootOrShadowRoot(a))return!1;var b=a.getFirstChild();b=null===b||k.$isLineBreakNode(b)||k.$isTextNode(b)||b.isInline();return!a.isInline()&&!1!==a.canBeEmpty()&&b}exports.$addNodeStyle=function(a){a=a.getStyle();let b=B(a);x.set(a,b)};
|
|
19
19
|
exports.$cloneWithProperties=function(a){let b=a.constructor.clone(a);b.__parent=a.__parent;b.__next=a.__next;b.__prev=a.__prev;if(k.$isElementNode(a)&&k.$isElementNode(b))return b.__first=a.__first,b.__last=a.__last,b.__size=a.__size,b.__format=a.__format,b.__indent=a.__indent,b.__dir=a.__dir,b;if(k.$isTextNode(a)&&k.$isTextNode(b))return b.__format=a.__format,b.__style=a.__style,b.__mode=a.__mode,b.__detail=a.__detail,b;k.$isParagraphNode(a)&&k.$isParagraphNode(b)&&(b.__textFormat=a.__textFormat);
|
|
20
|
-
return b};exports.$getSelectionStyleValueForProperty=function(a,b,c=""){let e=null,d=a.getNodes();var g=a.anchor,h=a.focus,f=a.isBackward();let l=f?h.offset:g.offset;g=f?h.getNode():g.getNode();if(k.$isRangeSelection(a)&&a.isCollapsed()&&""!==a.style&&(a=
|
|
21
|
-
exports.$isAtNodeEnd=function(a){if("text"===a.type)return a.offset===a.getNode().getTextContentSize();let b=a.getNode();k.$isElementNode(b)||
|
|
22
|
-
exports.$patchStyleText=function(a,b){var c=a.getNodes(),e=c.length,d=a.getStartEndPoints();if(null!==d){var [g,h]=d;--e;d=c[0];var f=c[e];if(a.isCollapsed()&&k.$isRangeSelection(a))
|
|
23
|
-
"element"===t?l:p>m?p:m,n!==a&&(0===n&&a===l?(
|
|
24
|
-
t!==f.getKey()&&!n.isToken()&&
|
|
25
|
-
exports.$
|
|
20
|
+
return b};exports.$getSelectionStyleValueForProperty=function(a,b,c=""){let e=null,d=a.getNodes();var g=a.anchor,h=a.focus,f=a.isBackward();let l=f?h.offset:g.offset;g=f?h.getNode():g.getNode();if(k.$isRangeSelection(a)&&a.isCollapsed()&&""!==a.style&&(a=C(a.style),null!==a&&b in a))return a[b];for(a=0;a<d.length;a++){var m=d[a];if((0===a||0!==l||!m.is(g))&&k.$isTextNode(m))if(h=b,f=c,m=m.getStyle(),m=C(m),h=null!==m?m[h]||f:f,null===e)e=h;else if(e!==h){e="";break}}return null===e?c:e};
|
|
21
|
+
exports.$isAtNodeEnd=function(a){if("text"===a.type)return a.offset===a.getNode().getTextContentSize();let b=a.getNode();k.$isElementNode(b)||u(177);return a.offset===b.getChildrenSize()};exports.$isParentElementRTL=J;exports.$moveCaretSelection=I;exports.$moveCharacter=function(a,b,c){let e=J(a);I(a,b,c?!e:e,"character")};
|
|
22
|
+
exports.$patchStyleText=function(a,b){var c=a.getNodes(),e=c.length,d=a.getStartEndPoints();if(null!==d){var [g,h]=d;--e;d=c[0];var f=c[e];if(a.isCollapsed()&&k.$isRangeSelection(a))F(a,b);else{var l=d.getTextContent().length,m=h.offset,p=g.offset,q=g.isBefore(h),n=q?p:m;a=q?m:p;var r=q?g.type:h.type,t=q?h.type:g.type,v=q?h.key:g.key;if(k.$isTextNode(d)&&n===l){let A=d.getNextSibling();k.$isTextNode(A)&&(n=p=0,d=A)}if(1===c.length)k.$isTextNode(d)&&d.canHaveFormat()&&(n="element"===r?0:p>m?m:p,a=
|
|
23
|
+
"element"===t?l:p>m?p:m,n!==a&&(0===n&&a===l?(F(d,b),d.select(n,a)):(c=d.splitText(n,a),c=0===n?c[0]:c[1],F(c,b),c.select(0,a-n))));else for(k.$isTextNode(d)&&n<d.getTextContentSize()&&d.canHaveFormat()&&(0!==n&&(d=d.splitText(n)[1],n=0,q?g.set(d.getKey(),n,"text"):h.set(d.getKey(),n,"text")),F(d,b)),k.$isTextNode(f)&&f.canHaveFormat()&&(n=f.getTextContent().length,f.__key!==v&&0!==a&&(a=n),a!==n&&([f]=f.splitText(a)),0===a&&"element"!==t||F(f,b)),a=1;a<e;a++)n=c[a],t=n.getKey(),k.$isTextNode(n)&&
|
|
24
|
+
n.canHaveFormat()&&t!==d.getKey()&&t!==f.getKey()&&!n.isToken()&&F(n,b)}}};
|
|
25
|
+
exports.$selectAll=function(a){let b=a.anchor;a=a.focus;var c=b.getNode().getTopLevelElementOrThrow().getParentOrThrow();let e=c.getFirstDescendant();c=c.getLastDescendant();let d="element",g="element",h=0;k.$isTextNode(e)?d="text":k.$isElementNode(e)||null===e||(e=e.getParentOrThrow());k.$isTextNode(c)?(g="text",h=c.getTextContentSize()):k.$isElementNode(c)||null===c||(c=c.getParentOrThrow());e&&c&&(b.set(e.getKey(),0,d),a.set(c.getKey(),h,g))};
|
|
26
|
+
exports.$setBlocksType=function(a,b){if(null!==a){var c=a.getStartEndPoints();c=c?c[0]:null;if(null!==c&&"root"===c.key)b=b(),a=k.$getRoot(),(c=a.getFirstChild())?c.replace(b,!0):a.append(b);else{a=a.getNodes();if(null!==c){for(c=c.getNode();null!==c&&null!==c.getParent()&&!K(c);)c=c.getParentOrThrow();c=K(c)?c:null}else c=!1;c&&-1===a.indexOf(c)&&a.push(c);for(c=0;c<a.length;c++){let e=a[c];if(!K(e))continue;k.$isElementNode(e)||u(178);let d=b();d.setFormat(e.getFormatType());d.setIndent(e.getIndent());
|
|
26
27
|
e.replace(d,!0)}}}};exports.$shouldOverrideDefaultCharacterSelection=function(a,b){a=k.$getAdjacentNode(a.focus,b);return k.$isDecoratorNode(a)&&!a.isIsolated()||k.$isElementNode(a)&&!a.isInline()&&!a.canBeEmpty()};
|
|
27
|
-
exports.$sliceSelectedTextNodeContent=function(a,b){var c=a.getStartEndPoints();if(b.isSelected(a)&&!b.isSegmented()&&!b.isToken()&&null!==c){let [f,l]=c;c=a.isBackward();var e=f.getNode(),d=l.getNode(),g=b.is(e),h=b.is(d);if(g||h){let [m,p]=k.$getCharacterOffsets(a);a=e.is(d);g=b.is(c?d:e);d=b.is(c?e:d);e=0;h=void 0;a?(e=m>p?p:m,h=m>p?m:p):g?(e=c?p:m,h=void 0):d&&(c=c?m:p,e=0,h=c);b.__text=b.__text.slice(e,h)}}return b};exports.$trimTextContentFromAnchor=
|
|
28
|
-
exports.$wrapNodes=function(a,b,c=null){var e=a.getStartEndPoints(),d=e?e[0]:null;e=a.getNodes();let g=e.length;if(null!==d&&(0===g||1===g&&"element"===d.type&&0===d.getNode().getChildrenSize())){a="text"===d.type?d.getNode().getParentOrThrow():d.getNode();e=a.getChildren();let f=b();f.setFormat(a.getFormatType());f.setIndent(a.getIndent());e.forEach(l=>f.append(l));c&&(f=c.append(f));a.replace(f)}else{d=null;var h=[];for(let f=0;f<g;f++){let l=e[f];k.$isRootOrShadowRoot(l)?(
|
|
29
|
-
[],d=l):null===d||null!==d&&k.$hasAncestor(l,d)?h.push(l):(
|
|
28
|
+
exports.$sliceSelectedTextNodeContent=function(a,b){var c=a.getStartEndPoints();if(b.isSelected(a)&&!b.isSegmented()&&!b.isToken()&&null!==c){let [f,l]=c;c=a.isBackward();var e=f.getNode(),d=l.getNode(),g=b.is(e),h=b.is(d);if(g||h){let [m,p]=k.$getCharacterOffsets(a);a=e.is(d);g=b.is(c?d:e);d=b.is(c?e:d);e=0;h=void 0;a?(e=m>p?p:m,h=m>p?m:p):g?(e=c?p:m,h=void 0):d&&(c=c?m:p,e=0,h=c);b.__text=b.__text.slice(e,h)}}return b};exports.$trimTextContentFromAnchor=E;
|
|
29
|
+
exports.$wrapNodes=function(a,b,c=null){var e=a.getStartEndPoints(),d=e?e[0]:null;e=a.getNodes();let g=e.length;if(null!==d&&(0===g||1===g&&"element"===d.type&&0===d.getNode().getChildrenSize())){a="text"===d.type?d.getNode().getParentOrThrow():d.getNode();e=a.getChildren();let f=b();f.setFormat(a.getFormatType());f.setIndent(a.getIndent());e.forEach(l=>f.append(l));c&&(f=c.append(f));a.replace(f)}else{d=null;var h=[];for(let f=0;f<g;f++){let l=e[f];k.$isRootOrShadowRoot(l)?(H(a,h,h.length,b,c),h=
|
|
30
|
+
[],d=l):null===d||null!==d&&k.$hasAncestor(l,d)?h.push(l):(H(a,h,h.length,b,c),h=[l])}H(a,h,h.length,b,c)}};
|
|
30
31
|
exports.createDOMRange=function(a,b,c,e,d){let g=b.getKey(),h=e.getKey(),f=document.createRange(),l=a.getElementByKey(g);a=a.getElementByKey(h);k.$isTextNode(b)&&(l=y(l));k.$isTextNode(e)&&(a=y(a));if(void 0===b||void 0===e||null===l||null===a)return null;"BR"===l.nodeName&&([l,c]=z(l));"BR"===a.nodeName&&([a,d]=z(a));b=l.firstChild;l===a&&null!=b&&"BR"===b.nodeName&&0===c&&0===d&&(d=1);try{f.setStart(l,c),f.setEnd(a,d)}catch(m){return null}!f.collapsed||c===d&&g===h||(f.setStart(a,d),f.setEnd(l,
|
|
31
32
|
c));return f};exports.createRectsFromDOMRange=function(a,b){var c=a.getRootElement();if(null===c)return[];a=c.getBoundingClientRect();c=getComputedStyle(c);c=parseFloat(c.paddingLeft)+parseFloat(c.paddingRight);b=Array.from(b.getClientRects());let e=b.length;b.sort((g,h)=>{let f=g.top-h.top;return 3>=Math.abs(f)?g.left-h.left:f});let d;for(let g=0;g<e;g++){let h=b[g],f=h.width+c===a.width;d&&d.top<=h.top&&d.top+d.height>h.top&&d.left+d.width>h.left||f?(b.splice(g--,1),e--):d=h}return b};
|
|
32
|
-
exports.getStyleObjectFromCSS=
|
|
33
|
+
exports.getStyleObjectFromCSS=C;exports.trimTextContentFromAnchor=E
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import{$isTextNode as e,$isElementNode as t,$isParagraphNode as n,$getCharacterOffsets as o,$isRootNode as l,$getNodeByKey as r,$getPreviousSelection as s,$createTextNode as i,$isRangeSelection as c,$getRoot as f,$isRootOrShadowRoot as u,$hasAncestor as a,$isLeafNode as g,$setSelection as d,$getAdjacentNode as p,$isDecoratorNode as h,$isLineBreakNode as _}from"lexical";function m(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var y=m((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const T=new Map;function x(e){let t=e;for(;null!=t;){if(t.nodeType===Node.TEXT_NODE)return t;t=t.firstChild}return null}function S(e){const t=e.parentNode;if(null==t)throw new Error("Should never happen");return[t,Array.from(t.childNodes).indexOf(e)]}function v(t,n,o,l,r){const s=n.getKey(),i=l.getKey(),c=document.createRange();let f=t.getElementByKey(s),u=t.getElementByKey(i),a=o,g=r;if(e(n)&&(f=x(f)),e(l)&&(u=x(u)),void 0===n||void 0===l||null===f||null===u)return null;"BR"===f.nodeName&&([f,a]=S(f)),"BR"===u.nodeName&&([u,g]=S(u));const d=f.firstChild;f===u&&null!=d&&"BR"===d.nodeName&&0===a&&0===g&&(g=1);try{c.setStart(f,a),c.setEnd(u,g)}catch(e){return null}return!c.collapsed||a===g&&s===i||(c.setStart(u,g),c.setEnd(f,a)),c}function C(e,t){const n=e.getRootElement();if(null===n)return[];const o=n.getBoundingClientRect(),l=getComputedStyle(n),r=parseFloat(l.paddingLeft)+parseFloat(l.paddingRight),s=Array.from(t.getClientRects());let i,c=s.length;s.sort(((e,t)=>{const n=e.top-t.top;return Math.abs(n)<=3?e.left-t.left:n}));for(let e=0;e<c;e++){const t=s[e],n=i&&i.top<=t.top&&i.top+i.height>t.top&&i.left+i.width>t.left,l=t.width+r===o.width;n||l?(s.splice(e--,1),c--):i=t}return s}function w(e){const t={},n=e.split(";");for(const e of n)if(""!==e){const[n,o]=e.split(/:([^]+)/);n&&o&&(t[n.trim()]=o.trim())}return t}function N(e){let t=T.get(e);return void 0===t&&(t=w(e),T.set(e,t)),t}function P(o){const l=o.constructor.clone(o);return l.__parent=o.__parent,l.__next=o.__next,l.__prev=o.__prev,t(o)&&t(l)?(s=o,(r=l).__first=s.__first,r.__last=s.__last,r.__size=s.__size,r.__format=s.__format,r.__indent=s.__indent,r.__dir=s.__dir,r):e(o)&&e(l)?function(e,t){return e.__format=t.__format,e.__style=t.__style,e.__mode=t.__mode,e.__detail=t.__detail,e}(l,o):n(o)&&n(l)?function(e,t){return e.__textFormat=t.__textFormat,e}(l,o):l;var r,s}function E(e,t){const n=e.getStartEndPoints();if(t.isSelected(e)&&!t.isSegmented()&&!t.isToken()&&null!==n){const[l,r]=n,s=e.isBackward(),i=l.getNode(),c=r.getNode(),f=t.is(i),u=t.is(c);if(f||u){const[n,l]=o(e),r=i.is(c),f=t.is(s?c:i),u=t.is(s?i:c);let a,g=0;if(r)g=n>l?l:n,a=n>l?n:l;else if(f){g=s?l:n,a=void 0}else if(u){g=0,a=s?n:l}return t.__text=t.__text.slice(g,a),t}}return t}function F(e){if("text"===e.type)return e.offset===e.getNode().getTextContentSize();const n=e.getNode();return t(n)||y(177),e.offset===n.getChildrenSize()}function I(n,o,f){let u=o.getNode(),a=f;if(t(u)){const e=u.getDescendantByIndex(o.offset);null!==e&&(u=e)}for(;a>0&&null!==u;){if(t(u)){const e=u.getLastDescendant();null!==e&&(u=e)}let f=u.getPreviousSibling(),g=0;if(null===f){let e=u.getParentOrThrow(),t=e.getPreviousSibling();for(;null===t;){if(e=e.getParent(),null===e){f=null;break}t=e.getPreviousSibling()}null!==e&&(g=e.isInline()?0:2,f=t)}let d=u.getTextContent();""===d&&t(u)&&!u.isInline()&&(d="\n\n");const p=d.length;if(!e(u)||a>=p){const e=u.getParent();u.remove(),null==e||0!==e.getChildrenSize()||l(e)||e.remove(),a-=p+g,u=f}else{const t=u.getKey(),l=n.getEditorState().read((()=>{const n=r(t);return e(n)&&n.isSimpleText()?n.getTextContent():null})),f=p-a,g=d.slice(0,f);if(null!==l&&l!==d){const e=s();let t=u;if(u.isSimpleText())u.setTextContent(l);else{const e=i(l);u.replace(e),t=e}if(c(e)&&e.isCollapsed()){const n=e.anchor.offset;t.select(n,n)}}else if(u.isSimpleText()){const e=o.key===t;let n=o.offset;n<a&&(n=p);const l=e?n-a:0,r=e?n:f;if(e&&0===l){const[e]=u.splitText(l,r);e.remove()}else{const[,e]=u.splitText(l,r);e.remove()}}else{const e=i(g);u.replace(e)}a=0}}}function K(e){const t=e.getStyle(),n=w(t);T.set(t,n)}function O(e,t){const n=N("getStyle"in e?e.getStyle():e.style),o=Object.entries(t).reduce(((e,[t,o])=>(o instanceof Function?e[t]=o(n[t]):null===o?delete e[t]:e[t]=o,e)),{...n}||{}),l=function(e){let t="";for(const n in e)n&&(t+=`${n}: ${e[n]};`);return t}(o);e.setStyle(l),T.set(l,o)}function B(t,n){const o=t.getNodes(),l=o.length,r=t.getStartEndPoints();if(null===r)return;const[s,i]=r,f=l-1;let u=o[0],a=o[f];if(t.isCollapsed()&&c(t))return void O(t,n);const g=u.getTextContent().length,d=i.offset;let p=s.offset;const h=s.isBefore(i);let _=h?p:d,m=h?d:p;const y=h?s.type:i.type,T=h?i.type:s.type,x=h?i.key:s.key;if(e(u)&&_===g){const t=u.getNextSibling();e(t)&&(p=0,_=0,u=t)}if(1===o.length){if(e(u)&&u.canHaveFormat()){if(_="element"===y?0:p>d?d:p,m="element"===T?g:p>d?p:d,_===m)return;if(0===_&&m===g)O(u,n),u.select(_,m);else{const e=u.splitText(_,m),t=0===_?e[0]:e[1];O(t,n),t.select(0,m-_)}}}else{if(e(u)&&_<u.getTextContentSize()&&u.canHaveFormat()&&(0!==_&&(u=u.splitText(_)[1],_=0,s.set(u.getKey(),_,"text")),O(u,n)),e(a)&&a.canHaveFormat()){const e=a.getTextContent().length;a.__key!==x&&0!==m&&(m=e),m!==e&&([a]=a.splitText(m)),0===m&&"element"!==T||O(a,n)}for(let t=1;t<f;t++){const l=o[t],r=l.getKey();e(l)&&l.canHaveFormat()&&r!==u.getKey()&&r!==a.getKey()&&!l.isToken()&&O(l,n)}}}function k(e,n){if(null===e)return;const o=e.getStartEndPoints(),l=o?o[0]:null;if(null!==l&&"root"===l.key){const e=n(),t=f(),o=t.getFirstChild();return void(o?o.replace(e,!0):t.append(e))}const r=e.getNodes(),s=null!==l&&function(e,t){let n=e;for(;null!==n&&null!==n.getParent()&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}(l.getNode(),X);s&&-1===r.indexOf(s)&&r.push(s);for(let e=0;e<r.length;e++){const o=r[e];if(!X(o))continue;t(o)||y(178);const l=n();l.setFormat(o.getFormatType()),l.setIndent(o.getIndent()),o.replace(l,!0)}}function b(e){return e.getNode().isAttached()}function z(e){let t=e;for(;null!==t&&!u(t);){const e=t.getLatest(),n=t.getParent();0===e.getChildrenSize()&&t.remove(!0),t=n}}function R(e,t,n=null){const o=e.getStartEndPoints(),l=o?o[0]:null,r=e.getNodes(),s=r.length;if(null!==l&&(0===s||1===s&&"element"===l.type&&0===l.getNode().getChildrenSize())){const e="text"===l.type?l.getNode().getParentOrThrow():l.getNode(),o=e.getChildren();let r=t();return r.setFormat(e.getFormatType()),r.setIndent(e.getIndent()),o.forEach((e=>r.append(e))),n&&(r=n.append(r)),void e.replace(r)}let i=null,c=[];for(let o=0;o<s;o++){const l=r[o];u(l)?(A(e,c,c.length,t,n),c=[],i=l):null===i||null!==i&&a(l,i)?c.push(l):(A(e,c,c.length,t,n),c=[l])}A(e,c,c.length,t,n)}function A(e,n,o,l,r=null){if(0===n.length)return;const i=n[0],f=new Map,a=[];let p=t(i)?i:i.getParentOrThrow();p.isInline()&&(p=p.getParentOrThrow());let h=!1;for(;null!==p;){const e=p.getPreviousSibling();if(null!==e){p=e,h=!0;break}if(p=p.getParentOrThrow(),u(p))break}const _=new Set;for(let e=0;e<o;e++){const o=n[e];t(o)&&0===o.getChildrenSize()&&_.add(o.getKey())}const m=new Set;for(let e=0;e<o;e++){const o=n[e];let r=o.getParent();if(null!==r&&r.isInline()&&(r=r.getParent()),null!==r&&g(o)&&!m.has(o.getKey())){const e=r.getKey();if(void 0===f.get(e)){const n=l();n.setFormat(r.getFormatType()),n.setIndent(r.getIndent()),a.push(n),f.set(e,n),r.getChildren().forEach((e=>{n.append(e),m.add(e.getKey()),t(e)&&e.getChildrenKeys().forEach((e=>m.add(e)))})),z(r)}}else if(_.has(o.getKey())){t(o)||y(179);const e=l();e.setFormat(o.getFormatType()),e.setIndent(o.getIndent()),a.push(e),o.remove(!0)}}if(null!==r)for(let e=0;e<a.length;e++){const t=a[e];r.append(t)}let T=null;if(u(p))if(h)if(null!==r)p.insertAfter(r);else for(let e=a.length-1;e>=0;e--){const t=a[e];p.insertAfter(t)}else{const e=p.getFirstChild();if(t(e)&&(p=e),null===e)if(r)p.append(r);else for(let e=0;e<a.length;e++){const t=a[e];p.append(t),T=t}else if(null!==r)e.insertBefore(r);else for(let t=0;t<a.length;t++){const n=a[t];e.insertBefore(n),T=n}}else if(r)p.insertAfter(r);else for(let e=a.length-1;e>=0;e--){const t=a[e];p.insertAfter(t),T=t}const x=s();c(x)&&b(x.anchor)&&b(x.focus)?d(x.clone()):null!==T?T.selectEnd():e.dirty=!0}function L(e,n){const o=p(e.focus,n);return h(o)&&!o.isIsolated()||t(o)&&!o.isInline()&&!o.canBeEmpty()}function D(e,t,n,o){e.modify(t?"extend":"move",n,o)}function M(e){const t=e.anchor.getNode();return"rtl"===(l(t)?t:t.getParentOrThrow()).getDirection()}function H(e,t,n){const o=M(e);D(e,t,n?!o:o,"character")}function $(n){const o=n.anchor,l=n.focus,r=o.getNode().getTopLevelElementOrThrow().getParentOrThrow();let s=r.getFirstDescendant(),i=r.getLastDescendant(),c="element",f="element",u=0;e(s)?c="text":t(s)||null===s||(s=s.getParentOrThrow()),e(i)?(f="text",u=i.getTextContentSize()):t(i)||null===i||(i=i.getParentOrThrow()),s&&i&&(o.set(s.getKey(),0,c),l.set(i.getKey(),u,f))}function j(e,t,n){const o=N(e.getStyle());return null!==o&&o[t]||n}function U(t,n,o=""){let l=null;const r=t.getNodes(),s=t.anchor,i=t.focus,f=t.isBackward(),u=f?i.offset:s.offset,a=f?i.getNode():s.getNode();if(c(t)&&t.isCollapsed()&&""!==t.style){const e=N(t.style);if(null!==e&&n in e)return e[n]}for(let t=0;t<r.length;t++){const s=r[t];if((0===t||0!==u||!s.is(a))&&e(s)){const e=j(s,n,o);if(null===l)l=e;else if(l!==e){l="";break}}}return null===l?o:l}function X(n){if(h(n))return!1;if(!t(n)||u(n))return!1;const o=n.getFirstChild(),l=null===o||_(o)||e(o)||o.isInline();return!n.isInline()&&!1!==n.canBeEmpty()&&l}const q=I;export{K as $addNodeStyle,P as $cloneWithProperties,U as $getSelectionStyleValueForProperty,F as $isAtNodeEnd,M as $isParentElementRTL,D as $moveCaretSelection,H as $moveCharacter,B as $patchStyleText,$ as $selectAll,k as $setBlocksType,L as $shouldOverrideDefaultCharacterSelection,E as $sliceSelectedTextNodeContent,I as $trimTextContentFromAnchor,R as $wrapNodes,v as createDOMRange,C as createRectsFromDOMRange,N as getStyleObjectFromCSS,q as trimTextContentFromAnchor};
|
|
9
|
+
import{$isTextNode as e,$isElementNode as t,$isParagraphNode as n,$getCharacterOffsets as o,$isRootNode as l,$getNodeByKey as r,$getPreviousSelection as s,$createTextNode as i,$isRangeSelection as c,$getRoot as f,$isRootOrShadowRoot as u,$hasAncestor as a,$isLeafNode as g,$setSelection as d,$getAdjacentNode as p,$isDecoratorNode as h,$isLineBreakNode as _}from"lexical";function m(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var y=m((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const x=new Map;function T(e){let t=e;for(;null!=t;){if(t.nodeType===Node.TEXT_NODE)return t;t=t.firstChild}return null}function S(e){const t=e.parentNode;if(null==t)throw new Error("Should never happen");return[t,Array.from(t.childNodes).indexOf(e)]}function v(t,n,o,l,r){const s=n.getKey(),i=l.getKey(),c=document.createRange();let f=t.getElementByKey(s),u=t.getElementByKey(i),a=o,g=r;if(e(n)&&(f=T(f)),e(l)&&(u=T(u)),void 0===n||void 0===l||null===f||null===u)return null;"BR"===f.nodeName&&([f,a]=S(f)),"BR"===u.nodeName&&([u,g]=S(u));const d=f.firstChild;f===u&&null!=d&&"BR"===d.nodeName&&0===a&&0===g&&(g=1);try{c.setStart(f,a),c.setEnd(u,g)}catch(e){return null}return!c.collapsed||a===g&&s===i||(c.setStart(u,g),c.setEnd(f,a)),c}function C(e,t){const n=e.getRootElement();if(null===n)return[];const o=n.getBoundingClientRect(),l=getComputedStyle(n),r=parseFloat(l.paddingLeft)+parseFloat(l.paddingRight),s=Array.from(t.getClientRects());let i,c=s.length;s.sort(((e,t)=>{const n=e.top-t.top;return Math.abs(n)<=3?e.left-t.left:n}));for(let e=0;e<c;e++){const t=s[e],n=i&&i.top<=t.top&&i.top+i.height>t.top&&i.left+i.width>t.left,l=t.width+r===o.width;n||l?(s.splice(e--,1),c--):i=t}return s}function w(e){const t={},n=e.split(";");for(const e of n)if(""!==e){const[n,o]=e.split(/:([^]+)/);n&&o&&(t[n.trim()]=o.trim())}return t}function N(e){let t=x.get(e);return void 0===t&&(t=w(e),x.set(e,t)),t}function P(o){const l=o.constructor.clone(o);return l.__parent=o.__parent,l.__next=o.__next,l.__prev=o.__prev,t(o)&&t(l)?(s=o,(r=l).__first=s.__first,r.__last=s.__last,r.__size=s.__size,r.__format=s.__format,r.__indent=s.__indent,r.__dir=s.__dir,r):e(o)&&e(l)?function(e,t){return e.__format=t.__format,e.__style=t.__style,e.__mode=t.__mode,e.__detail=t.__detail,e}(l,o):n(o)&&n(l)?function(e,t){return e.__textFormat=t.__textFormat,e}(l,o):l;var r,s}function E(e,t){const n=e.getStartEndPoints();if(t.isSelected(e)&&!t.isSegmented()&&!t.isToken()&&null!==n){const[l,r]=n,s=e.isBackward(),i=l.getNode(),c=r.getNode(),f=t.is(i),u=t.is(c);if(f||u){const[n,l]=o(e),r=i.is(c),f=t.is(s?c:i),u=t.is(s?i:c);let a,g=0;if(r)g=n>l?l:n,a=n>l?n:l;else if(f){g=s?l:n,a=void 0}else if(u){g=0,a=s?n:l}return t.__text=t.__text.slice(g,a),t}}return t}function F(e){if("text"===e.type)return e.offset===e.getNode().getTextContentSize();const n=e.getNode();return t(n)||y(177),e.offset===n.getChildrenSize()}function K(n,o,f){let u=o.getNode(),a=f;if(t(u)){const e=u.getDescendantByIndex(o.offset);null!==e&&(u=e)}for(;a>0&&null!==u;){if(t(u)){const e=u.getLastDescendant();null!==e&&(u=e)}let f=u.getPreviousSibling(),g=0;if(null===f){let e=u.getParentOrThrow(),t=e.getPreviousSibling();for(;null===t;){if(e=e.getParent(),null===e){f=null;break}t=e.getPreviousSibling()}null!==e&&(g=e.isInline()?0:2,f=t)}let d=u.getTextContent();""===d&&t(u)&&!u.isInline()&&(d="\n\n");const p=d.length;if(!e(u)||a>=p){const e=u.getParent();u.remove(),null==e||0!==e.getChildrenSize()||l(e)||e.remove(),a-=p+g,u=f}else{const t=u.getKey(),l=n.getEditorState().read((()=>{const n=r(t);return e(n)&&n.isSimpleText()?n.getTextContent():null})),f=p-a,g=d.slice(0,f);if(null!==l&&l!==d){const e=s();let t=u;if(u.isSimpleText())u.setTextContent(l);else{const e=i(l);u.replace(e),t=e}if(c(e)&&e.isCollapsed()){const n=e.anchor.offset;t.select(n,n)}}else if(u.isSimpleText()){const e=o.key===t;let n=o.offset;n<a&&(n=p);const l=e?n-a:0,r=e?n:f;if(e&&0===l){const[e]=u.splitText(l,r);e.remove()}else{const[,e]=u.splitText(l,r);e.remove()}}else{const e=i(g);u.replace(e)}a=0}}}function I(e){const t=e.getStyle(),n=w(t);x.set(t,n)}function O(e,t){const n=N("getStyle"in e?e.getStyle():e.style),o=Object.entries(t).reduce(((e,[t,o])=>(o instanceof Function?e[t]=o(n[t]):null===o?delete e[t]:e[t]=o,e)),{...n}||{}),l=function(e){let t="";for(const n in e)n&&(t+=`${n}: ${e[n]};`);return t}(o);e.setStyle(l),x.set(l,o)}function B(t,n){const o=t.getNodes(),l=o.length,r=t.getStartEndPoints();if(null===r)return;const[s,i]=r,f=l-1;let u=o[0],a=o[f];if(t.isCollapsed()&&c(t))return void O(t,n);const g=u.getTextContent().length,d=i.offset;let p=s.offset;const h=s.isBefore(i);let _=h?p:d,m=h?d:p;const y=h?s.type:i.type,x=h?i.type:s.type,T=h?i.key:s.key;if(e(u)&&_===g){const t=u.getNextSibling();e(t)&&(p=0,_=0,u=t)}if(1===o.length){if(e(u)&&u.canHaveFormat()){if(_="element"===y?0:p>d?d:p,m="element"===x?g:p>d?p:d,_===m)return;if(0===_&&m===g)O(u,n),u.select(_,m);else{const e=u.splitText(_,m),t=0===_?e[0]:e[1];O(t,n),t.select(0,m-_)}}}else{if(e(u)&&_<u.getTextContentSize()&&u.canHaveFormat()&&(0!==_&&(u=u.splitText(_)[1],_=0,h?s.set(u.getKey(),_,"text"):i.set(u.getKey(),_,"text")),O(u,n)),e(a)&&a.canHaveFormat()){const e=a.getTextContent().length;a.__key!==T&&0!==m&&(m=e),m!==e&&([a]=a.splitText(m)),0===m&&"element"!==x||O(a,n)}for(let t=1;t<f;t++){const l=o[t],r=l.getKey();e(l)&&l.canHaveFormat()&&r!==u.getKey()&&r!==a.getKey()&&!l.isToken()&&O(l,n)}}}function k(e,n){if(null===e)return;const o=e.getStartEndPoints(),l=o?o[0]:null;if(null!==l&&"root"===l.key){const e=n(),t=f(),o=t.getFirstChild();return void(o?o.replace(e,!0):t.append(e))}const r=e.getNodes(),s=null!==l&&function(e,t){let n=e;for(;null!==n&&null!==n.getParent()&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}(l.getNode(),X);s&&-1===r.indexOf(s)&&r.push(s);for(let e=0;e<r.length;e++){const o=r[e];if(!X(o))continue;t(o)||y(178);const l=n();l.setFormat(o.getFormatType()),l.setIndent(o.getIndent()),o.replace(l,!0)}}function b(e){return e.getNode().isAttached()}function z(e){let t=e;for(;null!==t&&!u(t);){const e=t.getLatest(),n=t.getParent();0===e.getChildrenSize()&&t.remove(!0),t=n}}function R(e,t,n=null){const o=e.getStartEndPoints(),l=o?o[0]:null,r=e.getNodes(),s=r.length;if(null!==l&&(0===s||1===s&&"element"===l.type&&0===l.getNode().getChildrenSize())){const e="text"===l.type?l.getNode().getParentOrThrow():l.getNode(),o=e.getChildren();let r=t();return r.setFormat(e.getFormatType()),r.setIndent(e.getIndent()),o.forEach((e=>r.append(e))),n&&(r=n.append(r)),void e.replace(r)}let i=null,c=[];for(let o=0;o<s;o++){const l=r[o];u(l)?(A(e,c,c.length,t,n),c=[],i=l):null===i||null!==i&&a(l,i)?c.push(l):(A(e,c,c.length,t,n),c=[l])}A(e,c,c.length,t,n)}function A(e,n,o,l,r=null){if(0===n.length)return;const i=n[0],f=new Map,a=[];let p=t(i)?i:i.getParentOrThrow();p.isInline()&&(p=p.getParentOrThrow());let h=!1;for(;null!==p;){const e=p.getPreviousSibling();if(null!==e){p=e,h=!0;break}if(p=p.getParentOrThrow(),u(p))break}const _=new Set;for(let e=0;e<o;e++){const o=n[e];t(o)&&0===o.getChildrenSize()&&_.add(o.getKey())}const m=new Set;for(let e=0;e<o;e++){const o=n[e];let r=o.getParent();if(null!==r&&r.isInline()&&(r=r.getParent()),null!==r&&g(o)&&!m.has(o.getKey())){const e=r.getKey();if(void 0===f.get(e)){const n=l();n.setFormat(r.getFormatType()),n.setIndent(r.getIndent()),a.push(n),f.set(e,n),r.getChildren().forEach((e=>{n.append(e),m.add(e.getKey()),t(e)&&e.getChildrenKeys().forEach((e=>m.add(e)))})),z(r)}}else if(_.has(o.getKey())){t(o)||y(179);const e=l();e.setFormat(o.getFormatType()),e.setIndent(o.getIndent()),a.push(e),o.remove(!0)}}if(null!==r)for(let e=0;e<a.length;e++){const t=a[e];r.append(t)}let x=null;if(u(p))if(h)if(null!==r)p.insertAfter(r);else for(let e=a.length-1;e>=0;e--){const t=a[e];p.insertAfter(t)}else{const e=p.getFirstChild();if(t(e)&&(p=e),null===e)if(r)p.append(r);else for(let e=0;e<a.length;e++){const t=a[e];p.append(t),x=t}else if(null!==r)e.insertBefore(r);else for(let t=0;t<a.length;t++){const n=a[t];e.insertBefore(n),x=n}}else if(r)p.insertAfter(r);else for(let e=a.length-1;e>=0;e--){const t=a[e];p.insertAfter(t),x=t}const T=s();c(T)&&b(T.anchor)&&b(T.focus)?d(T.clone()):null!==x?x.selectEnd():e.dirty=!0}function L(e,n){const o=p(e.focus,n);return h(o)&&!o.isIsolated()||t(o)&&!o.isInline()&&!o.canBeEmpty()}function D(e,t,n,o){e.modify(t?"extend":"move",n,o)}function M(e){const t=e.anchor.getNode();return"rtl"===(l(t)?t:t.getParentOrThrow()).getDirection()}function H(e,t,n){const o=M(e);D(e,t,n?!o:o,"character")}function $(n){const o=n.anchor,l=n.focus,r=o.getNode().getTopLevelElementOrThrow().getParentOrThrow();let s=r.getFirstDescendant(),i=r.getLastDescendant(),c="element",f="element",u=0;e(s)?c="text":t(s)||null===s||(s=s.getParentOrThrow()),e(i)?(f="text",u=i.getTextContentSize()):t(i)||null===i||(i=i.getParentOrThrow()),s&&i&&(o.set(s.getKey(),0,c),l.set(i.getKey(),u,f))}function j(e,t,n){const o=N(e.getStyle());return null!==o&&o[t]||n}function U(t,n,o=""){let l=null;const r=t.getNodes(),s=t.anchor,i=t.focus,f=t.isBackward(),u=f?i.offset:s.offset,a=f?i.getNode():s.getNode();if(c(t)&&t.isCollapsed()&&""!==t.style){const e=N(t.style);if(null!==e&&n in e)return e[n]}for(let t=0;t<r.length;t++){const s=r[t];if((0===t||0!==u||!s.is(a))&&e(s)){const e=j(s,n,o);if(null===l)l=e;else if(l!==e){l="";break}}}return null===l?o:l}function X(n){if(h(n))return!1;if(!t(n)||u(n))return!1;const o=n.getFirstChild(),l=null===o||_(o)||e(o)||o.isInline();return!n.isInline()&&!1!==n.canBeEmpty()&&l}const q=K;export{I as $addNodeStyle,P as $cloneWithProperties,U as $getSelectionStyleValueForProperty,F as $isAtNodeEnd,M as $isParentElementRTL,D as $moveCaretSelection,H as $moveCharacter,B as $patchStyleText,$ as $selectAll,k as $setBlocksType,L as $shouldOverrideDefaultCharacterSelection,E as $sliceSelectedTextNodeContent,K as $trimTextContentFromAnchor,R as $wrapNodes,v as createDOMRange,C as createRectsFromDOMRange,N as getStyleObjectFromCSS,q as trimTextContentFromAnchor};
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"selection"
|
|
10
10
|
],
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"version": "0.
|
|
12
|
+
"version": "0.16.1-nightly.20240610.0",
|
|
13
13
|
"main": "LexicalSelection.js",
|
|
14
14
|
"types": "index.d.ts",
|
|
15
15
|
"repository": {
|
|
@@ -37,6 +37,6 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"lexical": "0.
|
|
40
|
+
"lexical": "0.16.1-nightly.20240610.0"
|
|
41
41
|
}
|
|
42
42
|
}
|