@lexical/code-core 0.44.1-nightly.20260508.0 → 0.44.1-nightly.20260512.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/LexicalCodeCore.dev.js
CHANGED
|
@@ -244,7 +244,9 @@ function hasChildDOMNodeTag(node, tagName) {
|
|
|
244
244
|
if (lexical.isHTMLElement(child) && child.tagName === tagName) {
|
|
245
245
|
return true;
|
|
246
246
|
}
|
|
247
|
-
hasChildDOMNodeTag(child, tagName)
|
|
247
|
+
if (hasChildDOMNodeTag(child, tagName)) {
|
|
248
|
+
return true;
|
|
249
|
+
}
|
|
248
250
|
}
|
|
249
251
|
return false;
|
|
250
252
|
}
|
package/LexicalCodeCore.dev.mjs
CHANGED
|
@@ -242,7 +242,9 @@ function hasChildDOMNodeTag(node, tagName) {
|
|
|
242
242
|
if (isHTMLElement(child) && child.tagName === tagName) {
|
|
243
243
|
return true;
|
|
244
244
|
}
|
|
245
|
-
hasChildDOMNodeTag(child, tagName)
|
|
245
|
+
if (hasChildDOMNodeTag(child, tagName)) {
|
|
246
|
+
return true;
|
|
247
|
+
}
|
|
246
248
|
}
|
|
247
249
|
return false;
|
|
248
250
|
}
|
package/LexicalCodeCore.prod.js
CHANGED
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
"use strict";var e=require("lexical"),t=require("@lexical/extension");function n(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const e of t)r.append("v",e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function r(t,n){let r=t;for(let i=e.$getSiblingCaret(t,n);i&&(A(i.origin)||e.$isTabNode(i.origin));i=i.getAdjacentCaret())r=i.origin;return r}function i(e){return r(e,"previous")}function o(e){return r(e,"next")}function s(t){const n=i(t),r=o(t);let s=n;for(;null!==s;){if(A(s)){const t=e.getTextDirection(s.getTextContent());if(null!==t)return t}if(s===r)break;s=s.getNextSibling()}const l=n.getParent();if(e.$isElementNode(l)){const e=l.getDirection();if("ltr"===e||"rtl"===e)return e}return null}function l(t,r){let i=null,o=null,s=t,l=r,a=t.getTextContent();for(;;){if(0===l){if(s=s.getPreviousSibling(),null===s)break;if(A(s)||e.$isTabNode(s)||e.$isLineBreakNode(s)||n(167),e.$isLineBreakNode(s)){i={node:s,offset:1};break}l=Math.max(0,s.getTextContentSize()-1),a=s.getTextContent()}else l--;const t=a[l];A(s)&&" "!==t&&(o={node:s,offset:l})}if(null!==o)return o;let g=null;if(r<t.getTextContentSize())A(t)&&(g=t.getTextContent()[r]);else{const e=t.getNextSibling();A(e)&&(g=e.getTextContent()[0])}if(null!==g&&" "!==g)return i;{const n=function(t,n){let r=t,i=n,o=t.getTextContent(),s=t.getTextContentSize();for(;;){if(!A(r)||i===s){if(r=r.getNextSibling(),null===r||e.$isLineBreakNode(r))return null;A(r)&&(i=0,o=r.getTextContent(),s=r.getTextContentSize())}if(A(r)){if(" "!==o[i])return{node:r,offset:i};i++}}}(t,r);return null!==n?n:i}}function a(t){const r=o(t);return e.$isLineBreakNode(r)&&n(168),r}function g(e,t,n){if(!Number.isInteger(t)||t<=0)return!1;const r=e.getTextContent(),i=/^ +/.exec(r);if(!i)return!1;const o=Math.min(t,i[0].length),s=e.getKey(),l=n.anchor.key===s&&"text"===n.anchor.type?n.anchor.offset:null,a=n.focus.key===s&&"text"===n.focus.type?n.focus.offset:null;return e.spliceText(0,o,""),null!==l&&n.anchor.set(s,Math.max(0,l-o),"text"),null!==a&&n.focus.set(s,Math.max(0,a-o),"text"),!0}const u="javascript";function c(t,n){for(const r of t.childNodes){if(e.isHTMLElement(r)&&r.tagName===n)return!0;c(r,n)}return!1}const d="data-language",h="data-highlight-language",f="data-theme",N=()=>{};class _ extends e.ElementNode{__language;__theme;__isSyntaxHighlightSupported;static getType(){return"code"}static clone(e){return new _(e.__language,e.__key)}constructor(e,t){super(t),this.__language=e||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(e){super.afterCloneFrom(e),this.__language=e.__language,this.__theme=e.__theme,this.__isSyntaxHighlightSupported=e.__isSyntaxHighlightSupported}createDOM(t){const n=document.createElement("code");e.addClassNamesToElement(n,t.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(n.setAttribute(d,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(h,r));const i=this.getTheme();i&&n.setAttribute(f,i);const o=this.getStyle();return o&&e.setDOMStyleFromCSS(n.style,o),n}updateDOM(t,n,r){const i=this.__language,o=t.__language;i?i!==o&&n.setAttribute(d,i):o&&n.removeAttribute(d);const s=this.__isSyntaxHighlightSupported;t.__isSyntaxHighlightSupported&&o?s&&i?i!==o&&n.setAttribute(h,i):n.removeAttribute(h):s&&i&&n.setAttribute(h,i);const l=this.__theme,a=t.__theme;l?l!==a&&n.setAttribute(f,l):a&&n.removeAttribute(f);const g=this.__style,u=t.__style;return g!==u&&e.setDOMStyleFromCSS(n.style,g,u),!1}exportDOM(t){const n=document.createElement("pre");e.addClassNamesToElement(n,t._config.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(n.setAttribute(d,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(h,r));const i=this.getTheme();i&&n.setAttribute(f,i);const o=this.getStyle();return o&&e.setDOMStyleFromCSS(n.style,o),{element:n}}static importDOM(){return{code:e=>null!=e.textContent&&(/\r?\n/.test(e.textContent)||c(e,"BR"))?{conversion:C,priority:1}:null,div:()=>({conversion:O,priority:1}),pre:()=>({conversion:C,priority:0}),table:e=>M(e)?{conversion:m,priority:3}:null,td:e=>{const t=e,n=t.closest("table");return t.classList.contains("js-file-line")||n&&M(n)?{conversion:x,priority:3}:null},tr:e=>{const t=e.closest("table");return t&&M(t)?{conversion:x,priority:3}:null}}}static importJSON(e){return p().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setLanguage(e.language).setTheme(e.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(n,r=!0){if(!t.getPeerDependencyFromEditor(e.$getEditor(),"@lexical/code")){N();const e=$(n);if(e)return e}const{anchor:o,focus:s}=n,l=(o.isBefore(s)?o:s).getNode();if(e.$isTextNode(l)){let t=i(l);const n=[];for(;;)if(e.$isTabNode(t))n.push(e.$createTabNode()),t=t.getNextSibling();else{if(!A(t))break;{let e=0;const r=t.getTextContent(),i=t.getTextContentSize();for(;e<i&&" "===r[e];)e++;if(0!==e&&n.push(E(" ".repeat(e))),e!==i)break;t=t.getNextSibling()}}const r=l.splitText(o.offset)[0],s=0===o.offset?0:1,a=r.getIndexWithinParent()+s,g=l.getParentOrThrow(),u=[e.$createLineBreakNode(),...n];g.splice(a,0,u);const c=n[n.length-1];c?c.select():0===o.offset?r.selectPrevious():r.getNextSibling().selectNext(0,0)}if(T(l)){const{offset:t}=n.anchor;l.splice(t,0,[e.$createLineBreakNode()]),l.select(t+1,t+1)}return null}canIndent(){return!1}collapseAtStart(){const t=e.$createParagraphNode();return this.getChildren().forEach(e=>t.append(e)),this.replace(t),!0}setLanguage(e){const t=this.getWritable();return t.__language=e||void 0,t}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(e){const t=this.getWritable();return t.__isSyntaxHighlightSupported=e,t}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(e){const t=this.getWritable();return t.__theme=e||void 0,t}getTheme(){return this.getLatest().__theme}}function p(t,n){return e.$create(_).setLanguage(t).setTheme(n)}function T(e){return e instanceof _}function C(e){return{node:p(e.getAttribute(d))}}function O(e){const t=e,n=S(t);return n||function(e){let t=e.parentElement;for(;null!==t;){if(S(t))return!0;t=t.parentElement}return!1}(t)?{node:n?p():null}:{node:null}}function m(){return{node:p()}}function x(){return{node:null}}function S(e){return null!==e.style.fontFamily.match("monospace")}function M(e){return e.classList.contains("js-file-line-container")}function $(t){const{anchor:n}=t;if(t.isCollapsed()&&"element"===n.type){const t=n.getNode();if(T(t)){const r=t.getChildrenSize();if(r>=2&&n.offset===r){const n=t.getLastChild();if(e.$isLineBreakNode(n)&&e.$isLineBreakNode(n.getPreviousSibling())){const n=e.$createParagraphNode();return t.splice(r-2,2,[]).insertAfter(n,!1),n.select(),n}}}}return null}class b extends e.TextNode{__highlightType;constructor(e="",t,n){super(e,n),this.__highlightType=t}static getType(){return"code-highlight"}static clone(e){return new b(e.__text,e.__highlightType||void 0,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__highlightType=e.__highlightType}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(e){const t=this.getWritable();return t.__highlightType=e||void 0,t}canHaveFormat(){return!1}createDOM(t){const n=super.createDOM(t),r=D(t.theme,this.__highlightType);return e.addClassNamesToElement(n,r),n}updateDOM(t,n,r){const i=super.updateDOM(t,n,r),o=D(r.theme,t.__highlightType),s=D(r.theme,this.__highlightType);return o!==s&&(o&&e.removeClassNamesFromElement(n,o),s&&e.addClassNamesToElement(n,s)),i}static importJSON(e){return E().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHighlightType(e.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return p()}}function D(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function E(t="",n){return e.$applyNodeReplacement(new b(t,n))}function A(e){return e instanceof b}const y=e.defineExtension({name:"@lexical/code",nodes:()=>[_,b],register:t=>t.registerCommand(e.KEY_ENTER_COMMAND,t=>{const n=e.$getSelection();return!(!e.$isRangeSelection(n)||!$(n))&&(t.preventDefault(),!0)},e.COMMAND_PRIORITY_LOW)});function R(t){if(!e.$isRangeSelection(t))return!1;const n=t.anchor.getNode(),r=T(n)?n:n.getParent(),i=t.focus.getNode(),o=T(i)?i:i.getParent();return T(r)&&r.is(o)}function v(t){const r=t.getNodes(),i=[];if(1===r.length&&T(r[0]))return i;let o=[];for(let t=0;t<r.length;t++){const s=r[t];A(s)||e.$isTabNode(s)||e.$isLineBreakNode(s)||n(169),e.$isLineBreakNode(s)?o.length>0&&(i.push(o),o=[]):o.push(s)}if(o.length>0){const n=t.isBackward()?t.anchor:t.focus,r=e.$createPoint(o[0].getKey(),0,"text");n.is(r)||i.push(o)}return i}function L(t,n){const r=e.$getSelection();if(!e.$isRangeSelection(r)||!R(r))return!1;const o=v(r),s=o.length;if(0===s&&r.isCollapsed())return t===e.INDENT_CONTENT_COMMAND&&r.insertNodes([e.$createTabNode()]),!0;if(0===s&&t===e.INDENT_CONTENT_COMMAND&&"\n"===r.getTextContent()){const t=e.$createTabNode(),n=e.$createLineBreakNode(),i=r.isBackward()?"previous":"next";return r.insertNodes([t,n]),e.$setSelectionFromCaretRange(e.$getCaretRangeInDirection(e.$getCaretRange(e.$getTextPointCaret(t,"next",0),e.$normalizeCaret(e.$getSiblingCaret(n,"next"))),i)),!0}for(let l=0;l<s;l++){const s=o[l];if(s.length>0){let o=s[0];if(0===l&&(o=i(o)),t===e.INDENT_CONTENT_COMMAND){const t=e.$createTabNode();if(o.insertBefore(t),0===l){const n=r.isBackward()?"focus":"anchor",i=e.$createPoint(o.getKey(),0,"text");r[n].is(i)&&r[n].set(t.getKey(),0,"text")}}else e.$isTabNode(o)?o.remove():void 0!==n&&A(o)&&g(o,n,r)}}return!0}function P(t,n){const r=e.$getSelection();if(!e.$isRangeSelection(r))return!1;const{anchor:s,focus:l}=r,a=s.offset,g=l.offset,u=s.getNode(),c=l.getNode(),d=t===e.KEY_ARROW_UP_COMMAND;if(!R(r)||!A(u)&&!e.$isTabNode(u)||!A(c)&&!e.$isTabNode(c))return!1;if(!n.altKey){if(r.isCollapsed()){const e=u.getParentOrThrow();if(d&&0===a&&null===u.getPreviousSibling()){if(null===e.getPreviousSibling())return e.selectPrevious(),n.preventDefault(),!0}else if(!d&&a===u.getTextContentSize()&&null===u.getNextSibling()){if(null===e.getNextSibling())return e.selectNext(),n.preventDefault(),!0}}return!1}let h,f;if(u.isBefore(c)?(h=i(u),f=o(c)):(h=i(c),f=o(u)),null==h||null==f)return!1;const N=h.getNodesBetween(f);for(let t=0;t<N.length;t++){const n=N[t];if(!A(n)&&!e.$isTabNode(n)&&!e.$isLineBreakNode(n))return!1}n.preventDefault(),n.stopPropagation();const _=d?h.getPreviousSibling():f.getNextSibling();if(!e.$isLineBreakNode(_))return!0;const p=d?_.getPreviousSibling():_.getNextSibling();if(null==p)return!0;const T=A(p)||e.$isTabNode(p)||e.$isLineBreakNode(p)?d?i(p):o(p):null;let C=null!=T?T:p;return _.remove(),N.forEach(e=>e.remove()),t===e.KEY_ARROW_UP_COMMAND?(N.forEach(e=>C.insertBefore(e)),C.insertBefore(_)):(C.insertAfter(_),C=_,N.forEach(e=>{C.insertAfter(e),C=e})),r.setTextNodeRange(u,a,c,g),!0}function I(t,n){const r=e.$getSelection();if(!e.$isRangeSelection(r))return!1;const{anchor:i,focus:o}=r,g=i.getNode(),u=o.getNode(),c=t===e.MOVE_TO_START;if(!R(r)||!A(g)&&!e.$isTabNode(g)||!A(u)&&!e.$isTabNode(u))return!1;const d=u;if("rtl"===s(d)?!c:c){const t=l(d,o.offset);if(null!==t){const{node:n,offset:i}=t;e.$isLineBreakNode(n)?n.selectNext(0,0):r.setTextNodeRange(n,i,n,i)}else d.getParentOrThrow().selectStart()}else{a(d).select()}return n.preventDefault(),n.stopPropagation(),!0}function B(t,r){return e.mergeRegister(t.registerCommand(e.KEY_TAB_COMMAND,r=>{const s=function(t){const r=e.$getSelection();if(!e.$isRangeSelection(r)||!R(r))return null;const s=t?e.OUTDENT_CONTENT_COMMAND:e.INDENT_CONTENT_COMMAND,l=t?e.OUTDENT_CONTENT_COMMAND:e.INSERT_TAB_COMMAND,a=r.anchor,g=r.focus;if(a.is(g))return l;const u=v(r);if(1!==u.length)return s;const c=u[0];let d,h;0===c.length&&n(285),r.isBackward()?(d=g,h=a):(d=a,h=g);const f=i(c[0]),N=o(c[0]),_=e.$createPoint(f.getKey(),0,"text"),p=e.$createPoint(N.getKey(),N.getTextContentSize(),"text");return d.isBefore(_)||p.isBefore(h)?s:_.isBefore(d)||h.isBefore(p)?l:s}(r.shiftKey);return null!==s&&(r.preventDefault(),t.dispatchCommand(s,void 0),!0)},e.COMMAND_PRIORITY_LOW),t.registerCommand(e.INSERT_TAB_COMMAND,()=>!!R(e.$getSelection())&&(e.$insertNodes([e.$createTabNode()]),!0),e.COMMAND_PRIORITY_LOW),t.registerCommand(e.INDENT_CONTENT_COMMAND,()=>L(e.INDENT_CONTENT_COMMAND),e.COMMAND_PRIORITY_LOW),t.registerCommand(e.OUTDENT_CONTENT_COMMAND,()=>L(e.OUTDENT_CONTENT_COMMAND,r),e.COMMAND_PRIORITY_LOW),t.registerCommand(e.KEY_ARROW_UP_COMMAND,t=>{const n=e.$getSelection();if(!e.$isRangeSelection(n))return!1;const{anchor:r}=n,i=r.getNode();return!!R(n)&&(n.isCollapsed()&&0===r.offset&&null===i.getPreviousSibling()&&T(i.getParentOrThrow())?(t.preventDefault(),!0):P(e.KEY_ARROW_UP_COMMAND,t))},e.COMMAND_PRIORITY_LOW),t.registerCommand(e.KEY_ARROW_DOWN_COMMAND,t=>{const n=e.$getSelection();if(!e.$isRangeSelection(n))return!1;const{anchor:r}=n,i=r.getNode();return!!R(n)&&(n.isCollapsed()&&r.offset===i.getTextContentSize()&&null===i.getNextSibling()&&T(i.getParentOrThrow())?(t.preventDefault(),!0):P(e.KEY_ARROW_DOWN_COMMAND,t))},e.COMMAND_PRIORITY_LOW),t.registerCommand(e.MOVE_TO_START,t=>I(e.MOVE_TO_START,t),e.COMMAND_PRIORITY_LOW),t.registerCommand(e.MOVE_TO_END,t=>I(e.MOVE_TO_END,t),e.COMMAND_PRIORITY_LOW))}const k=e.defineExtension({build:(e,n)=>t.namedSignals(n),config:e.safeCast({disabled:!1,tabSize:void 0}),dependencies:[y],name:"@lexical/code-indent",register:(e,n,r)=>{const i=r.getOutput();return t.effect(()=>{if(!i.disabled.value)return B(e,i.tabSize.value)})}});exports.$createCodeHighlightNode=E,exports.$createCodeNode=p,exports.$getCodeLineDirection=s,exports.$getEndOfCodeInLine=a,exports.$getFirstCodeNodeOfLine=i,exports.$getLastCodeNodeOfLine=o,exports.$getStartOfCodeInLine=l,exports.$isCodeHighlightNode=A,exports.$isCodeNode=T,exports.$outdentLeadingSpaces=g,exports.CodeExtension=y,exports.CodeHighlightNode=b,exports.CodeIndentExtension=k,exports.CodeNode=_,exports.DEFAULT_CODE_LANGUAGE=u,exports.getDefaultCodeLanguage=()=>u,exports.registerCodeIndentation=B;
|
|
9
|
+
"use strict";var e=require("lexical"),t=require("@lexical/extension");function n(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const e of t)r.append("v",e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function r(t,n){let r=t;for(let i=e.$getSiblingCaret(t,n);i&&(A(i.origin)||e.$isTabNode(i.origin));i=i.getAdjacentCaret())r=i.origin;return r}function i(e){return r(e,"previous")}function o(e){return r(e,"next")}function s(t){const n=i(t),r=o(t);let s=n;for(;null!==s;){if(A(s)){const t=e.getTextDirection(s.getTextContent());if(null!==t)return t}if(s===r)break;s=s.getNextSibling()}const l=n.getParent();if(e.$isElementNode(l)){const e=l.getDirection();if("ltr"===e||"rtl"===e)return e}return null}function l(t,r){let i=null,o=null,s=t,l=r,a=t.getTextContent();for(;;){if(0===l){if(s=s.getPreviousSibling(),null===s)break;if(A(s)||e.$isTabNode(s)||e.$isLineBreakNode(s)||n(167),e.$isLineBreakNode(s)){i={node:s,offset:1};break}l=Math.max(0,s.getTextContentSize()-1),a=s.getTextContent()}else l--;const t=a[l];A(s)&&" "!==t&&(o={node:s,offset:l})}if(null!==o)return o;let g=null;if(r<t.getTextContentSize())A(t)&&(g=t.getTextContent()[r]);else{const e=t.getNextSibling();A(e)&&(g=e.getTextContent()[0])}if(null!==g&&" "!==g)return i;{const n=function(t,n){let r=t,i=n,o=t.getTextContent(),s=t.getTextContentSize();for(;;){if(!A(r)||i===s){if(r=r.getNextSibling(),null===r||e.$isLineBreakNode(r))return null;A(r)&&(i=0,o=r.getTextContent(),s=r.getTextContentSize())}if(A(r)){if(" "!==o[i])return{node:r,offset:i};i++}}}(t,r);return null!==n?n:i}}function a(t){const r=o(t);return e.$isLineBreakNode(r)&&n(168),r}function g(e,t,n){if(!Number.isInteger(t)||t<=0)return!1;const r=e.getTextContent(),i=/^ +/.exec(r);if(!i)return!1;const o=Math.min(t,i[0].length),s=e.getKey(),l=n.anchor.key===s&&"text"===n.anchor.type?n.anchor.offset:null,a=n.focus.key===s&&"text"===n.focus.type?n.focus.offset:null;return e.spliceText(0,o,""),null!==l&&n.anchor.set(s,Math.max(0,l-o),"text"),null!==a&&n.focus.set(s,Math.max(0,a-o),"text"),!0}const u="javascript";function c(t,n){for(const r of t.childNodes){if(e.isHTMLElement(r)&&r.tagName===n)return!0;if(c(r,n))return!0}return!1}const d="data-language",h="data-highlight-language",f="data-theme",N=()=>{};class _ extends e.ElementNode{__language;__theme;__isSyntaxHighlightSupported;static getType(){return"code"}static clone(e){return new _(e.__language,e.__key)}constructor(e,t){super(t),this.__language=e||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(e){super.afterCloneFrom(e),this.__language=e.__language,this.__theme=e.__theme,this.__isSyntaxHighlightSupported=e.__isSyntaxHighlightSupported}createDOM(t){const n=document.createElement("code");e.addClassNamesToElement(n,t.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(n.setAttribute(d,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(h,r));const i=this.getTheme();i&&n.setAttribute(f,i);const o=this.getStyle();return o&&e.setDOMStyleFromCSS(n.style,o),n}updateDOM(t,n,r){const i=this.__language,o=t.__language;i?i!==o&&n.setAttribute(d,i):o&&n.removeAttribute(d);const s=this.__isSyntaxHighlightSupported;t.__isSyntaxHighlightSupported&&o?s&&i?i!==o&&n.setAttribute(h,i):n.removeAttribute(h):s&&i&&n.setAttribute(h,i);const l=this.__theme,a=t.__theme;l?l!==a&&n.setAttribute(f,l):a&&n.removeAttribute(f);const g=this.__style,u=t.__style;return g!==u&&e.setDOMStyleFromCSS(n.style,g,u),!1}exportDOM(t){const n=document.createElement("pre");e.addClassNamesToElement(n,t._config.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(n.setAttribute(d,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(h,r));const i=this.getTheme();i&&n.setAttribute(f,i);const o=this.getStyle();return o&&e.setDOMStyleFromCSS(n.style,o),{element:n}}static importDOM(){return{code:e=>null!=e.textContent&&(/\r?\n/.test(e.textContent)||c(e,"BR"))?{conversion:C,priority:1}:null,div:()=>({conversion:O,priority:1}),pre:()=>({conversion:C,priority:0}),table:e=>M(e)?{conversion:m,priority:3}:null,td:e=>{const t=e,n=t.closest("table");return t.classList.contains("js-file-line")||n&&M(n)?{conversion:x,priority:3}:null},tr:e=>{const t=e.closest("table");return t&&M(t)?{conversion:x,priority:3}:null}}}static importJSON(e){return p().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setLanguage(e.language).setTheme(e.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(n,r=!0){if(!t.getPeerDependencyFromEditor(e.$getEditor(),"@lexical/code")){N();const e=$(n);if(e)return e}const{anchor:o,focus:s}=n,l=(o.isBefore(s)?o:s).getNode();if(e.$isTextNode(l)){let t=i(l);const n=[];for(;;)if(e.$isTabNode(t))n.push(e.$createTabNode()),t=t.getNextSibling();else{if(!A(t))break;{let e=0;const r=t.getTextContent(),i=t.getTextContentSize();for(;e<i&&" "===r[e];)e++;if(0!==e&&n.push(E(" ".repeat(e))),e!==i)break;t=t.getNextSibling()}}const r=l.splitText(o.offset)[0],s=0===o.offset?0:1,a=r.getIndexWithinParent()+s,g=l.getParentOrThrow(),u=[e.$createLineBreakNode(),...n];g.splice(a,0,u);const c=n[n.length-1];c?c.select():0===o.offset?r.selectPrevious():r.getNextSibling().selectNext(0,0)}if(T(l)){const{offset:t}=n.anchor;l.splice(t,0,[e.$createLineBreakNode()]),l.select(t+1,t+1)}return null}canIndent(){return!1}collapseAtStart(){const t=e.$createParagraphNode();return this.getChildren().forEach(e=>t.append(e)),this.replace(t),!0}setLanguage(e){const t=this.getWritable();return t.__language=e||void 0,t}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(e){const t=this.getWritable();return t.__isSyntaxHighlightSupported=e,t}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(e){const t=this.getWritable();return t.__theme=e||void 0,t}getTheme(){return this.getLatest().__theme}}function p(t,n){return e.$create(_).setLanguage(t).setTheme(n)}function T(e){return e instanceof _}function C(e){return{node:p(e.getAttribute(d))}}function O(e){const t=e,n=S(t);return n||function(e){let t=e.parentElement;for(;null!==t;){if(S(t))return!0;t=t.parentElement}return!1}(t)?{node:n?p():null}:{node:null}}function m(){return{node:p()}}function x(){return{node:null}}function S(e){return null!==e.style.fontFamily.match("monospace")}function M(e){return e.classList.contains("js-file-line-container")}function $(t){const{anchor:n}=t;if(t.isCollapsed()&&"element"===n.type){const t=n.getNode();if(T(t)){const r=t.getChildrenSize();if(r>=2&&n.offset===r){const n=t.getLastChild();if(e.$isLineBreakNode(n)&&e.$isLineBreakNode(n.getPreviousSibling())){const n=e.$createParagraphNode();return t.splice(r-2,2,[]).insertAfter(n,!1),n.select(),n}}}}return null}class b extends e.TextNode{__highlightType;constructor(e="",t,n){super(e,n),this.__highlightType=t}static getType(){return"code-highlight"}static clone(e){return new b(e.__text,e.__highlightType||void 0,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__highlightType=e.__highlightType}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(e){const t=this.getWritable();return t.__highlightType=e||void 0,t}canHaveFormat(){return!1}createDOM(t){const n=super.createDOM(t),r=D(t.theme,this.__highlightType);return e.addClassNamesToElement(n,r),n}updateDOM(t,n,r){const i=super.updateDOM(t,n,r),o=D(r.theme,t.__highlightType),s=D(r.theme,this.__highlightType);return o!==s&&(o&&e.removeClassNamesFromElement(n,o),s&&e.addClassNamesToElement(n,s)),i}static importJSON(e){return E().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHighlightType(e.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return p()}}function D(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function E(t="",n){return e.$applyNodeReplacement(new b(t,n))}function A(e){return e instanceof b}const y=e.defineExtension({name:"@lexical/code",nodes:()=>[_,b],register:t=>t.registerCommand(e.KEY_ENTER_COMMAND,t=>{const n=e.$getSelection();return!(!e.$isRangeSelection(n)||!$(n))&&(t.preventDefault(),!0)},e.COMMAND_PRIORITY_LOW)});function R(t){if(!e.$isRangeSelection(t))return!1;const n=t.anchor.getNode(),r=T(n)?n:n.getParent(),i=t.focus.getNode(),o=T(i)?i:i.getParent();return T(r)&&r.is(o)}function v(t){const r=t.getNodes(),i=[];if(1===r.length&&T(r[0]))return i;let o=[];for(let t=0;t<r.length;t++){const s=r[t];A(s)||e.$isTabNode(s)||e.$isLineBreakNode(s)||n(169),e.$isLineBreakNode(s)?o.length>0&&(i.push(o),o=[]):o.push(s)}if(o.length>0){const n=t.isBackward()?t.anchor:t.focus,r=e.$createPoint(o[0].getKey(),0,"text");n.is(r)||i.push(o)}return i}function L(t,n){const r=e.$getSelection();if(!e.$isRangeSelection(r)||!R(r))return!1;const o=v(r),s=o.length;if(0===s&&r.isCollapsed())return t===e.INDENT_CONTENT_COMMAND&&r.insertNodes([e.$createTabNode()]),!0;if(0===s&&t===e.INDENT_CONTENT_COMMAND&&"\n"===r.getTextContent()){const t=e.$createTabNode(),n=e.$createLineBreakNode(),i=r.isBackward()?"previous":"next";return r.insertNodes([t,n]),e.$setSelectionFromCaretRange(e.$getCaretRangeInDirection(e.$getCaretRange(e.$getTextPointCaret(t,"next",0),e.$normalizeCaret(e.$getSiblingCaret(n,"next"))),i)),!0}for(let l=0;l<s;l++){const s=o[l];if(s.length>0){let o=s[0];if(0===l&&(o=i(o)),t===e.INDENT_CONTENT_COMMAND){const t=e.$createTabNode();if(o.insertBefore(t),0===l){const n=r.isBackward()?"focus":"anchor",i=e.$createPoint(o.getKey(),0,"text");r[n].is(i)&&r[n].set(t.getKey(),0,"text")}}else e.$isTabNode(o)?o.remove():void 0!==n&&A(o)&&g(o,n,r)}}return!0}function P(t,n){const r=e.$getSelection();if(!e.$isRangeSelection(r))return!1;const{anchor:s,focus:l}=r,a=s.offset,g=l.offset,u=s.getNode(),c=l.getNode(),d=t===e.KEY_ARROW_UP_COMMAND;if(!R(r)||!A(u)&&!e.$isTabNode(u)||!A(c)&&!e.$isTabNode(c))return!1;if(!n.altKey){if(r.isCollapsed()){const e=u.getParentOrThrow();if(d&&0===a&&null===u.getPreviousSibling()){if(null===e.getPreviousSibling())return e.selectPrevious(),n.preventDefault(),!0}else if(!d&&a===u.getTextContentSize()&&null===u.getNextSibling()){if(null===e.getNextSibling())return e.selectNext(),n.preventDefault(),!0}}return!1}let h,f;if(u.isBefore(c)?(h=i(u),f=o(c)):(h=i(c),f=o(u)),null==h||null==f)return!1;const N=h.getNodesBetween(f);for(let t=0;t<N.length;t++){const n=N[t];if(!A(n)&&!e.$isTabNode(n)&&!e.$isLineBreakNode(n))return!1}n.preventDefault(),n.stopPropagation();const _=d?h.getPreviousSibling():f.getNextSibling();if(!e.$isLineBreakNode(_))return!0;const p=d?_.getPreviousSibling():_.getNextSibling();if(null==p)return!0;const T=A(p)||e.$isTabNode(p)||e.$isLineBreakNode(p)?d?i(p):o(p):null;let C=null!=T?T:p;return _.remove(),N.forEach(e=>e.remove()),t===e.KEY_ARROW_UP_COMMAND?(N.forEach(e=>C.insertBefore(e)),C.insertBefore(_)):(C.insertAfter(_),C=_,N.forEach(e=>{C.insertAfter(e),C=e})),r.setTextNodeRange(u,a,c,g),!0}function I(t,n){const r=e.$getSelection();if(!e.$isRangeSelection(r))return!1;const{anchor:i,focus:o}=r,g=i.getNode(),u=o.getNode(),c=t===e.MOVE_TO_START;if(!R(r)||!A(g)&&!e.$isTabNode(g)||!A(u)&&!e.$isTabNode(u))return!1;const d=u;if("rtl"===s(d)?!c:c){const t=l(d,o.offset);if(null!==t){const{node:n,offset:i}=t;e.$isLineBreakNode(n)?n.selectNext(0,0):r.setTextNodeRange(n,i,n,i)}else d.getParentOrThrow().selectStart()}else{a(d).select()}return n.preventDefault(),n.stopPropagation(),!0}function B(t,r){return e.mergeRegister(t.registerCommand(e.KEY_TAB_COMMAND,r=>{const s=function(t){const r=e.$getSelection();if(!e.$isRangeSelection(r)||!R(r))return null;const s=t?e.OUTDENT_CONTENT_COMMAND:e.INDENT_CONTENT_COMMAND,l=t?e.OUTDENT_CONTENT_COMMAND:e.INSERT_TAB_COMMAND,a=r.anchor,g=r.focus;if(a.is(g))return l;const u=v(r);if(1!==u.length)return s;const c=u[0];let d,h;0===c.length&&n(285),r.isBackward()?(d=g,h=a):(d=a,h=g);const f=i(c[0]),N=o(c[0]),_=e.$createPoint(f.getKey(),0,"text"),p=e.$createPoint(N.getKey(),N.getTextContentSize(),"text");return d.isBefore(_)||p.isBefore(h)?s:_.isBefore(d)||h.isBefore(p)?l:s}(r.shiftKey);return null!==s&&(r.preventDefault(),t.dispatchCommand(s,void 0),!0)},e.COMMAND_PRIORITY_LOW),t.registerCommand(e.INSERT_TAB_COMMAND,()=>!!R(e.$getSelection())&&(e.$insertNodes([e.$createTabNode()]),!0),e.COMMAND_PRIORITY_LOW),t.registerCommand(e.INDENT_CONTENT_COMMAND,()=>L(e.INDENT_CONTENT_COMMAND),e.COMMAND_PRIORITY_LOW),t.registerCommand(e.OUTDENT_CONTENT_COMMAND,()=>L(e.OUTDENT_CONTENT_COMMAND,r),e.COMMAND_PRIORITY_LOW),t.registerCommand(e.KEY_ARROW_UP_COMMAND,t=>{const n=e.$getSelection();if(!e.$isRangeSelection(n))return!1;const{anchor:r}=n,i=r.getNode();return!!R(n)&&(n.isCollapsed()&&0===r.offset&&null===i.getPreviousSibling()&&T(i.getParentOrThrow())?(t.preventDefault(),!0):P(e.KEY_ARROW_UP_COMMAND,t))},e.COMMAND_PRIORITY_LOW),t.registerCommand(e.KEY_ARROW_DOWN_COMMAND,t=>{const n=e.$getSelection();if(!e.$isRangeSelection(n))return!1;const{anchor:r}=n,i=r.getNode();return!!R(n)&&(n.isCollapsed()&&r.offset===i.getTextContentSize()&&null===i.getNextSibling()&&T(i.getParentOrThrow())?(t.preventDefault(),!0):P(e.KEY_ARROW_DOWN_COMMAND,t))},e.COMMAND_PRIORITY_LOW),t.registerCommand(e.MOVE_TO_START,t=>I(e.MOVE_TO_START,t),e.COMMAND_PRIORITY_LOW),t.registerCommand(e.MOVE_TO_END,t=>I(e.MOVE_TO_END,t),e.COMMAND_PRIORITY_LOW))}const k=e.defineExtension({build:(e,n)=>t.namedSignals(n),config:e.safeCast({disabled:!1,tabSize:void 0}),dependencies:[y],name:"@lexical/code-indent",register:(e,n,r)=>{const i=r.getOutput();return t.effect(()=>{if(!i.disabled.value)return B(e,i.tabSize.value)})}});exports.$createCodeHighlightNode=E,exports.$createCodeNode=p,exports.$getCodeLineDirection=s,exports.$getEndOfCodeInLine=a,exports.$getFirstCodeNodeOfLine=i,exports.$getLastCodeNodeOfLine=o,exports.$getStartOfCodeInLine=l,exports.$isCodeHighlightNode=A,exports.$isCodeNode=T,exports.$outdentLeadingSpaces=g,exports.CodeExtension=y,exports.CodeHighlightNode=b,exports.CodeIndentExtension=k,exports.CodeNode=_,exports.DEFAULT_CODE_LANGUAGE=u,exports.getDefaultCodeLanguage=()=>u,exports.registerCodeIndentation=B;
|
package/LexicalCodeCore.prod.mjs
CHANGED
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import{getTextDirection as t,$isElementNode as e,$isTabNode as n,$isLineBreakNode as r,$getSiblingCaret as i,$create as o,ElementNode as s,addClassNamesToElement as l,setDOMStyleFromCSS as u,$getEditor as g,$isTextNode as c,$createTabNode as a,$createLineBreakNode as h,$createParagraphNode as f,isHTMLElement as p,$applyNodeReplacement as d,TextNode as m,removeClassNamesFromElement as x,defineExtension as _,KEY_ENTER_COMMAND as S,$getSelection as y,$isRangeSelection as b,COMMAND_PRIORITY_LOW as T,safeCast as v,mergeRegister as N,KEY_TAB_COMMAND as C,INSERT_TAB_COMMAND as O,$insertNodes as P,INDENT_CONTENT_COMMAND as A,OUTDENT_CONTENT_COMMAND as H,KEY_ARROW_UP_COMMAND as w,KEY_ARROW_DOWN_COMMAND as D,MOVE_TO_START as L,MOVE_TO_END as k,$createPoint as B,$setSelectionFromCaretRange as F,$getCaretRangeInDirection as M,$getCaretRange as J,$getTextPointCaret as z,$normalizeCaret as E}from"lexical";import{getPeerDependencyFromEditor as K,effect as I,namedSignals as R}from"@lexical/extension";function W(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const t of e)r.append("v",t);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function j(t,e){let r=t;for(let o=i(t,e);o&&(xt(o.origin)||n(o.origin));o=o.getAdjacentCaret())r=o.origin;return r}function U(t){return j(t,"previous")}function $(t){return j(t,"next")}function q(n){const r=U(n),i=$(n);let o=r;for(;null!==o;){if(xt(o)){const e=t(o.getTextContent());if(null!==e)return e}if(o===i)break;o=o.getNextSibling()}const s=r.getParent();if(e(s)){const t=s.getDirection();if("ltr"===t||"rtl"===t)return t}return null}function G(t,e){let i=null,o=null,s=t,l=e,u=t.getTextContent();for(;;){if(0===l){if(s=s.getPreviousSibling(),null===s)break;if(xt(s)||n(s)||r(s)||W(167),r(s)){i={node:s,offset:1};break}l=Math.max(0,s.getTextContentSize()-1),u=s.getTextContent()}else l--;const t=u[l];xt(s)&&" "!==t&&(o={node:s,offset:l})}if(null!==o)return o;let g=null;if(e<t.getTextContentSize())xt(t)&&(g=t.getTextContent()[e]);else{const e=t.getNextSibling();xt(e)&&(g=e.getTextContent()[0])}if(null!==g&&" "!==g)return i;{const n=function(t,e){let n=t,i=e,o=t.getTextContent(),s=t.getTextContentSize();for(;;){if(!xt(n)||i===s){if(n=n.getNextSibling(),null===n||r(n))return null;xt(n)&&(i=0,o=n.getTextContent(),s=n.getTextContentSize())}if(xt(n)){if(" "!==o[i])return{node:n,offset:i};i++}}}(t,e);return null!==n?n:i}}function Q(t){const e=$(t);return r(e)&&W(168),e}function V(t,e,n){if(!Number.isInteger(e)||e<=0)return!1;const r=t.getTextContent(),i=/^ +/.exec(r);if(!i)return!1;const o=Math.min(e,i[0].length),s=t.getKey(),l=n.anchor.key===s&&"text"===n.anchor.type?n.anchor.offset:null,u=n.focus.key===s&&"text"===n.focus.type?n.focus.offset:null;return t.spliceText(0,o,""),null!==l&&n.anchor.set(s,Math.max(0,l-o),"text"),null!==u&&n.focus.set(s,Math.max(0,u-o),"text"),!0}const X="javascript",Y=()=>X;function Z(t,e){for(const n of t.childNodes){if(p(n)&&n.tagName===e)return!0;Z(n,e)}return!1}const tt="data-language",et="data-highlight-language",nt="data-theme",rt=()=>{};class it extends s{__language;__theme;__isSyntaxHighlightSupported;static getType(){return"code"}static clone(t){return new it(t.__language,t.__key)}constructor(t,e){super(e),this.__language=t||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(t){super.afterCloneFrom(t),this.__language=t.__language,this.__theme=t.__theme,this.__isSyntaxHighlightSupported=t.__isSyntaxHighlightSupported}createDOM(t){const e=document.createElement("code");l(e,t.theme.code),e.setAttribute("spellcheck","false");const n=this.getLanguage();n&&(e.setAttribute(tt,n),this.getIsSyntaxHighlightSupported()&&e.setAttribute(et,n));const r=this.getTheme();r&&e.setAttribute(nt,r);const i=this.getStyle();return i&&u(e.style,i),e}updateDOM(t,e,n){const r=this.__language,i=t.__language;r?r!==i&&e.setAttribute(tt,r):i&&e.removeAttribute(tt);const o=this.__isSyntaxHighlightSupported;t.__isSyntaxHighlightSupported&&i?o&&r?r!==i&&e.setAttribute(et,r):e.removeAttribute(et):o&&r&&e.setAttribute(et,r);const s=this.__theme,l=t.__theme;s?s!==l&&e.setAttribute(nt,s):l&&e.removeAttribute(nt);const g=this.__style,c=t.__style;return g!==c&&u(e.style,g,c),!1}exportDOM(t){const e=document.createElement("pre");l(e,t._config.theme.code),e.setAttribute("spellcheck","false");const n=this.getLanguage();n&&(e.setAttribute(tt,n),this.getIsSyntaxHighlightSupported()&&e.setAttribute(et,n));const r=this.getTheme();r&&e.setAttribute(nt,r);const i=this.getStyle();return i&&u(e.style,i),{element:e}}static importDOM(){return{code:t=>null!=t.textContent&&(/\r?\n/.test(t.textContent)||Z(t,"BR"))?{conversion:lt,priority:1}:null,div:()=>({conversion:ut,priority:1}),pre:()=>({conversion:lt,priority:0}),table:t=>ht(t)?{conversion:gt,priority:3}:null,td:t=>{const e=t,n=e.closest("table");return e.classList.contains("js-file-line")||n&&ht(n)?{conversion:ct,priority:3}:null},tr:t=>{const e=t.closest("table");return e&&ht(e)?{conversion:ct,priority:3}:null}}}static importJSON(t){return ot().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setLanguage(t.language).setTheme(t.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(t,e=!0){if(!K(g(),"@lexical/code")){rt();const e=ft(t);if(e)return e}const{anchor:r,focus:i}=t,o=(r.isBefore(i)?r:i).getNode();if(c(o)){let t=U(o);const e=[];for(;;)if(n(t))e.push(a()),t=t.getNextSibling();else{if(!xt(t))break;{let n=0;const r=t.getTextContent(),i=t.getTextContentSize();for(;n<i&&" "===r[n];)n++;if(0!==n&&e.push(mt(" ".repeat(n))),n!==i)break;t=t.getNextSibling()}}const i=o.splitText(r.offset)[0],s=0===r.offset?0:1,l=i.getIndexWithinParent()+s,u=o.getParentOrThrow(),g=[h(),...e];u.splice(l,0,g);const c=e[e.length-1];c?c.select():0===r.offset?i.selectPrevious():i.getNextSibling().selectNext(0,0)}if(st(o)){const{offset:e}=t.anchor;o.splice(e,0,[h()]),o.select(e+1,e+1)}return null}canIndent(){return!1}collapseAtStart(){const t=f();return this.getChildren().forEach(e=>t.append(e)),this.replace(t),!0}setLanguage(t){const e=this.getWritable();return e.__language=t||void 0,e}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(t){const e=this.getWritable();return e.__isSyntaxHighlightSupported=t,e}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(t){const e=this.getWritable();return e.__theme=t||void 0,e}getTheme(){return this.getLatest().__theme}}function ot(t,e){return o(it).setLanguage(t).setTheme(e)}function st(t){return t instanceof it}function lt(t){return{node:ot(t.getAttribute(tt))}}function ut(t){const e=t,n=at(e);return n||function(t){let e=t.parentElement;for(;null!==e;){if(at(e))return!0;e=e.parentElement}return!1}(e)?{node:n?ot():null}:{node:null}}function gt(){return{node:ot()}}function ct(){return{node:null}}function at(t){return null!==t.style.fontFamily.match("monospace")}function ht(t){return t.classList.contains("js-file-line-container")}function ft(t){const{anchor:e}=t;if(t.isCollapsed()&&"element"===e.type){const t=e.getNode();if(st(t)){const n=t.getChildrenSize();if(n>=2&&e.offset===n){const e=t.getLastChild();if(r(e)&&r(e.getPreviousSibling())){const e=f();return t.splice(n-2,2,[]).insertAfter(e,!1),e.select(),e}}}}return null}class pt extends m{__highlightType;constructor(t="",e,n){super(t,n),this.__highlightType=e}static getType(){return"code-highlight"}static clone(t){return new pt(t.__text,t.__highlightType||void 0,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__highlightType=t.__highlightType}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(t){const e=this.getWritable();return e.__highlightType=t||void 0,e}canHaveFormat(){return!1}createDOM(t){const e=super.createDOM(t),n=dt(t.theme,this.__highlightType);return l(e,n),e}updateDOM(t,e,n){const r=super.updateDOM(t,e,n),i=dt(n.theme,t.__highlightType),o=dt(n.theme,this.__highlightType);return i!==o&&(i&&x(e,i),o&&l(e,o)),r}static importJSON(t){return mt().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setHighlightType(t.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(t){return this}isParentRequired(){return!0}createParentElementNode(){return ot()}}function dt(t,e){return e&&t&&t.codeHighlight&&t.codeHighlight[e]}function mt(t="",e){return d(new pt(t,e))}function xt(t){return t instanceof pt}const _t=_({name:"@lexical/code",nodes:()=>[it,pt],register:t=>t.registerCommand(S,t=>{const e=y();return!(!b(e)||!ft(e))&&(t.preventDefault(),!0)},T)});function St(t){if(!b(t))return!1;const e=t.anchor.getNode(),n=st(e)?e:e.getParent(),r=t.focus.getNode(),i=st(r)?r:r.getParent();return st(n)&&n.is(i)}function yt(t){const e=t.getNodes(),i=[];if(1===e.length&&st(e[0]))return i;let o=[];for(let t=0;t<e.length;t++){const s=e[t];xt(s)||n(s)||r(s)||W(169),r(s)?o.length>0&&(i.push(o),o=[]):o.push(s)}if(o.length>0){const e=t.isBackward()?t.anchor:t.focus,n=B(o[0].getKey(),0,"text");e.is(n)||i.push(o)}return i}function bt(t,e){const r=y();if(!b(r)||!St(r))return!1;const o=yt(r),s=o.length;if(0===s&&r.isCollapsed())return t===A&&r.insertNodes([a()]),!0;if(0===s&&t===A&&"\n"===r.getTextContent()){const t=a(),e=h(),n=r.isBackward()?"previous":"next";return r.insertNodes([t,e]),F(M(J(z(t,"next",0),E(i(e,"next"))),n)),!0}for(let i=0;i<s;i++){const s=o[i];if(s.length>0){let o=s[0];if(0===i&&(o=U(o)),t===A){const t=a();if(o.insertBefore(t),0===i){const e=r.isBackward()?"focus":"anchor",n=B(o.getKey(),0,"text");r[e].is(n)&&r[e].set(t.getKey(),0,"text")}}else n(o)?o.remove():void 0!==e&&xt(o)&&V(o,e,r)}}return!0}function Tt(t,e){const i=y();if(!b(i))return!1;const{anchor:o,focus:s}=i,l=o.offset,u=s.offset,g=o.getNode(),c=s.getNode(),a=t===w;if(!St(i)||!xt(g)&&!n(g)||!xt(c)&&!n(c))return!1;if(!e.altKey){if(i.isCollapsed()){const t=g.getParentOrThrow();if(a&&0===l&&null===g.getPreviousSibling()){if(null===t.getPreviousSibling())return t.selectPrevious(),e.preventDefault(),!0}else if(!a&&l===g.getTextContentSize()&&null===g.getNextSibling()){if(null===t.getNextSibling())return t.selectNext(),e.preventDefault(),!0}}return!1}let h,f;if(g.isBefore(c)?(h=U(g),f=$(c)):(h=U(c),f=$(g)),null==h||null==f)return!1;const p=h.getNodesBetween(f);for(let t=0;t<p.length;t++){const e=p[t];if(!xt(e)&&!n(e)&&!r(e))return!1}e.preventDefault(),e.stopPropagation();const d=a?h.getPreviousSibling():f.getNextSibling();if(!r(d))return!0;const m=a?d.getPreviousSibling():d.getNextSibling();if(null==m)return!0;const x=xt(m)||n(m)||r(m)?a?U(m):$(m):null;let _=null!=x?x:m;return d.remove(),p.forEach(t=>t.remove()),t===w?(p.forEach(t=>_.insertBefore(t)),_.insertBefore(d)):(_.insertAfter(d),_=d,p.forEach(t=>{_.insertAfter(t),_=t})),i.setTextNodeRange(g,l,c,u),!0}function vt(t,e){const i=y();if(!b(i))return!1;const{anchor:o,focus:s}=i,l=o.getNode(),u=s.getNode(),g=t===L;if(!St(i)||!xt(l)&&!n(l)||!xt(u)&&!n(u))return!1;const c=u;if("rtl"===q(c)?!g:g){const t=G(c,s.offset);if(null!==t){const{node:e,offset:n}=t;r(e)?e.selectNext(0,0):i.setTextNodeRange(e,n,e,n)}else c.getParentOrThrow().selectStart()}else{Q(c).select()}return e.preventDefault(),e.stopPropagation(),!0}function Nt(t,e){return N(t.registerCommand(C,e=>{const n=function(t){const e=y();if(!b(e)||!St(e))return null;const n=t?H:A,r=t?H:O,i=e.anchor,o=e.focus;if(i.is(o))return r;const s=yt(e);if(1!==s.length)return n;const l=s[0];let u,g;0===l.length&&W(285),e.isBackward()?(u=o,g=i):(u=i,g=o);const c=U(l[0]),a=$(l[0]),h=B(c.getKey(),0,"text"),f=B(a.getKey(),a.getTextContentSize(),"text");return u.isBefore(h)||f.isBefore(g)?n:h.isBefore(u)||g.isBefore(f)?r:n}(e.shiftKey);return null!==n&&(e.preventDefault(),t.dispatchCommand(n,void 0),!0)},T),t.registerCommand(O,()=>!!St(y())&&(P([a()]),!0),T),t.registerCommand(A,()=>bt(A),T),t.registerCommand(H,()=>bt(H,e),T),t.registerCommand(w,t=>{const e=y();if(!b(e))return!1;const{anchor:n}=e,r=n.getNode();return!!St(e)&&(e.isCollapsed()&&0===n.offset&&null===r.getPreviousSibling()&&st(r.getParentOrThrow())?(t.preventDefault(),!0):Tt(w,t))},T),t.registerCommand(D,t=>{const e=y();if(!b(e))return!1;const{anchor:n}=e,r=n.getNode();return!!St(e)&&(e.isCollapsed()&&n.offset===r.getTextContentSize()&&null===r.getNextSibling()&&st(r.getParentOrThrow())?(t.preventDefault(),!0):Tt(D,t))},T),t.registerCommand(L,t=>vt(L,t),T),t.registerCommand(k,t=>vt(k,t),T))}const Ct=_({build:(t,e)=>R(e),config:v({disabled:!1,tabSize:void 0}),dependencies:[_t],name:"@lexical/code-indent",register:(t,e,n)=>{const r=n.getOutput();return I(()=>{if(!r.disabled.value)return Nt(t,r.tabSize.value)})}});export{mt as $createCodeHighlightNode,ot as $createCodeNode,q as $getCodeLineDirection,Q as $getEndOfCodeInLine,U as $getFirstCodeNodeOfLine,$ as $getLastCodeNodeOfLine,G as $getStartOfCodeInLine,xt as $isCodeHighlightNode,st as $isCodeNode,V as $outdentLeadingSpaces,_t as CodeExtension,pt as CodeHighlightNode,Ct as CodeIndentExtension,it as CodeNode,X as DEFAULT_CODE_LANGUAGE,Y as getDefaultCodeLanguage,Nt as registerCodeIndentation};
|
|
9
|
+
import{getTextDirection as t,$isElementNode as e,$isTabNode as n,$isLineBreakNode as r,$getSiblingCaret as i,$create as o,ElementNode as s,addClassNamesToElement as l,setDOMStyleFromCSS as u,$getEditor as g,$isTextNode as c,$createTabNode as a,$createLineBreakNode as h,$createParagraphNode as f,isHTMLElement as p,$applyNodeReplacement as d,TextNode as m,removeClassNamesFromElement as x,defineExtension as _,KEY_ENTER_COMMAND as S,$getSelection as y,$isRangeSelection as b,COMMAND_PRIORITY_LOW as T,safeCast as v,mergeRegister as N,KEY_TAB_COMMAND as C,INSERT_TAB_COMMAND as O,$insertNodes as P,INDENT_CONTENT_COMMAND as A,OUTDENT_CONTENT_COMMAND as H,KEY_ARROW_UP_COMMAND as w,KEY_ARROW_DOWN_COMMAND as D,MOVE_TO_START as L,MOVE_TO_END as k,$createPoint as B,$setSelectionFromCaretRange as F,$getCaretRangeInDirection as M,$getCaretRange as J,$getTextPointCaret as z,$normalizeCaret as E}from"lexical";import{getPeerDependencyFromEditor as K,effect as I,namedSignals as R}from"@lexical/extension";function W(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const t of e)r.append("v",t);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function j(t,e){let r=t;for(let o=i(t,e);o&&(xt(o.origin)||n(o.origin));o=o.getAdjacentCaret())r=o.origin;return r}function U(t){return j(t,"previous")}function $(t){return j(t,"next")}function q(n){const r=U(n),i=$(n);let o=r;for(;null!==o;){if(xt(o)){const e=t(o.getTextContent());if(null!==e)return e}if(o===i)break;o=o.getNextSibling()}const s=r.getParent();if(e(s)){const t=s.getDirection();if("ltr"===t||"rtl"===t)return t}return null}function G(t,e){let i=null,o=null,s=t,l=e,u=t.getTextContent();for(;;){if(0===l){if(s=s.getPreviousSibling(),null===s)break;if(xt(s)||n(s)||r(s)||W(167),r(s)){i={node:s,offset:1};break}l=Math.max(0,s.getTextContentSize()-1),u=s.getTextContent()}else l--;const t=u[l];xt(s)&&" "!==t&&(o={node:s,offset:l})}if(null!==o)return o;let g=null;if(e<t.getTextContentSize())xt(t)&&(g=t.getTextContent()[e]);else{const e=t.getNextSibling();xt(e)&&(g=e.getTextContent()[0])}if(null!==g&&" "!==g)return i;{const n=function(t,e){let n=t,i=e,o=t.getTextContent(),s=t.getTextContentSize();for(;;){if(!xt(n)||i===s){if(n=n.getNextSibling(),null===n||r(n))return null;xt(n)&&(i=0,o=n.getTextContent(),s=n.getTextContentSize())}if(xt(n)){if(" "!==o[i])return{node:n,offset:i};i++}}}(t,e);return null!==n?n:i}}function Q(t){const e=$(t);return r(e)&&W(168),e}function V(t,e,n){if(!Number.isInteger(e)||e<=0)return!1;const r=t.getTextContent(),i=/^ +/.exec(r);if(!i)return!1;const o=Math.min(e,i[0].length),s=t.getKey(),l=n.anchor.key===s&&"text"===n.anchor.type?n.anchor.offset:null,u=n.focus.key===s&&"text"===n.focus.type?n.focus.offset:null;return t.spliceText(0,o,""),null!==l&&n.anchor.set(s,Math.max(0,l-o),"text"),null!==u&&n.focus.set(s,Math.max(0,u-o),"text"),!0}const X="javascript",Y=()=>X;function Z(t,e){for(const n of t.childNodes){if(p(n)&&n.tagName===e)return!0;if(Z(n,e))return!0}return!1}const tt="data-language",et="data-highlight-language",nt="data-theme",rt=()=>{};class it extends s{__language;__theme;__isSyntaxHighlightSupported;static getType(){return"code"}static clone(t){return new it(t.__language,t.__key)}constructor(t,e){super(e),this.__language=t||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(t){super.afterCloneFrom(t),this.__language=t.__language,this.__theme=t.__theme,this.__isSyntaxHighlightSupported=t.__isSyntaxHighlightSupported}createDOM(t){const e=document.createElement("code");l(e,t.theme.code),e.setAttribute("spellcheck","false");const n=this.getLanguage();n&&(e.setAttribute(tt,n),this.getIsSyntaxHighlightSupported()&&e.setAttribute(et,n));const r=this.getTheme();r&&e.setAttribute(nt,r);const i=this.getStyle();return i&&u(e.style,i),e}updateDOM(t,e,n){const r=this.__language,i=t.__language;r?r!==i&&e.setAttribute(tt,r):i&&e.removeAttribute(tt);const o=this.__isSyntaxHighlightSupported;t.__isSyntaxHighlightSupported&&i?o&&r?r!==i&&e.setAttribute(et,r):e.removeAttribute(et):o&&r&&e.setAttribute(et,r);const s=this.__theme,l=t.__theme;s?s!==l&&e.setAttribute(nt,s):l&&e.removeAttribute(nt);const g=this.__style,c=t.__style;return g!==c&&u(e.style,g,c),!1}exportDOM(t){const e=document.createElement("pre");l(e,t._config.theme.code),e.setAttribute("spellcheck","false");const n=this.getLanguage();n&&(e.setAttribute(tt,n),this.getIsSyntaxHighlightSupported()&&e.setAttribute(et,n));const r=this.getTheme();r&&e.setAttribute(nt,r);const i=this.getStyle();return i&&u(e.style,i),{element:e}}static importDOM(){return{code:t=>null!=t.textContent&&(/\r?\n/.test(t.textContent)||Z(t,"BR"))?{conversion:lt,priority:1}:null,div:()=>({conversion:ut,priority:1}),pre:()=>({conversion:lt,priority:0}),table:t=>ht(t)?{conversion:gt,priority:3}:null,td:t=>{const e=t,n=e.closest("table");return e.classList.contains("js-file-line")||n&&ht(n)?{conversion:ct,priority:3}:null},tr:t=>{const e=t.closest("table");return e&&ht(e)?{conversion:ct,priority:3}:null}}}static importJSON(t){return ot().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setLanguage(t.language).setTheme(t.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(t,e=!0){if(!K(g(),"@lexical/code")){rt();const e=ft(t);if(e)return e}const{anchor:r,focus:i}=t,o=(r.isBefore(i)?r:i).getNode();if(c(o)){let t=U(o);const e=[];for(;;)if(n(t))e.push(a()),t=t.getNextSibling();else{if(!xt(t))break;{let n=0;const r=t.getTextContent(),i=t.getTextContentSize();for(;n<i&&" "===r[n];)n++;if(0!==n&&e.push(mt(" ".repeat(n))),n!==i)break;t=t.getNextSibling()}}const i=o.splitText(r.offset)[0],s=0===r.offset?0:1,l=i.getIndexWithinParent()+s,u=o.getParentOrThrow(),g=[h(),...e];u.splice(l,0,g);const c=e[e.length-1];c?c.select():0===r.offset?i.selectPrevious():i.getNextSibling().selectNext(0,0)}if(st(o)){const{offset:e}=t.anchor;o.splice(e,0,[h()]),o.select(e+1,e+1)}return null}canIndent(){return!1}collapseAtStart(){const t=f();return this.getChildren().forEach(e=>t.append(e)),this.replace(t),!0}setLanguage(t){const e=this.getWritable();return e.__language=t||void 0,e}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(t){const e=this.getWritable();return e.__isSyntaxHighlightSupported=t,e}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(t){const e=this.getWritable();return e.__theme=t||void 0,e}getTheme(){return this.getLatest().__theme}}function ot(t,e){return o(it).setLanguage(t).setTheme(e)}function st(t){return t instanceof it}function lt(t){return{node:ot(t.getAttribute(tt))}}function ut(t){const e=t,n=at(e);return n||function(t){let e=t.parentElement;for(;null!==e;){if(at(e))return!0;e=e.parentElement}return!1}(e)?{node:n?ot():null}:{node:null}}function gt(){return{node:ot()}}function ct(){return{node:null}}function at(t){return null!==t.style.fontFamily.match("monospace")}function ht(t){return t.classList.contains("js-file-line-container")}function ft(t){const{anchor:e}=t;if(t.isCollapsed()&&"element"===e.type){const t=e.getNode();if(st(t)){const n=t.getChildrenSize();if(n>=2&&e.offset===n){const e=t.getLastChild();if(r(e)&&r(e.getPreviousSibling())){const e=f();return t.splice(n-2,2,[]).insertAfter(e,!1),e.select(),e}}}}return null}class pt extends m{__highlightType;constructor(t="",e,n){super(t,n),this.__highlightType=e}static getType(){return"code-highlight"}static clone(t){return new pt(t.__text,t.__highlightType||void 0,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__highlightType=t.__highlightType}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(t){const e=this.getWritable();return e.__highlightType=t||void 0,e}canHaveFormat(){return!1}createDOM(t){const e=super.createDOM(t),n=dt(t.theme,this.__highlightType);return l(e,n),e}updateDOM(t,e,n){const r=super.updateDOM(t,e,n),i=dt(n.theme,t.__highlightType),o=dt(n.theme,this.__highlightType);return i!==o&&(i&&x(e,i),o&&l(e,o)),r}static importJSON(t){return mt().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setHighlightType(t.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(t){return this}isParentRequired(){return!0}createParentElementNode(){return ot()}}function dt(t,e){return e&&t&&t.codeHighlight&&t.codeHighlight[e]}function mt(t="",e){return d(new pt(t,e))}function xt(t){return t instanceof pt}const _t=_({name:"@lexical/code",nodes:()=>[it,pt],register:t=>t.registerCommand(S,t=>{const e=y();return!(!b(e)||!ft(e))&&(t.preventDefault(),!0)},T)});function St(t){if(!b(t))return!1;const e=t.anchor.getNode(),n=st(e)?e:e.getParent(),r=t.focus.getNode(),i=st(r)?r:r.getParent();return st(n)&&n.is(i)}function yt(t){const e=t.getNodes(),i=[];if(1===e.length&&st(e[0]))return i;let o=[];for(let t=0;t<e.length;t++){const s=e[t];xt(s)||n(s)||r(s)||W(169),r(s)?o.length>0&&(i.push(o),o=[]):o.push(s)}if(o.length>0){const e=t.isBackward()?t.anchor:t.focus,n=B(o[0].getKey(),0,"text");e.is(n)||i.push(o)}return i}function bt(t,e){const r=y();if(!b(r)||!St(r))return!1;const o=yt(r),s=o.length;if(0===s&&r.isCollapsed())return t===A&&r.insertNodes([a()]),!0;if(0===s&&t===A&&"\n"===r.getTextContent()){const t=a(),e=h(),n=r.isBackward()?"previous":"next";return r.insertNodes([t,e]),F(M(J(z(t,"next",0),E(i(e,"next"))),n)),!0}for(let i=0;i<s;i++){const s=o[i];if(s.length>0){let o=s[0];if(0===i&&(o=U(o)),t===A){const t=a();if(o.insertBefore(t),0===i){const e=r.isBackward()?"focus":"anchor",n=B(o.getKey(),0,"text");r[e].is(n)&&r[e].set(t.getKey(),0,"text")}}else n(o)?o.remove():void 0!==e&&xt(o)&&V(o,e,r)}}return!0}function Tt(t,e){const i=y();if(!b(i))return!1;const{anchor:o,focus:s}=i,l=o.offset,u=s.offset,g=o.getNode(),c=s.getNode(),a=t===w;if(!St(i)||!xt(g)&&!n(g)||!xt(c)&&!n(c))return!1;if(!e.altKey){if(i.isCollapsed()){const t=g.getParentOrThrow();if(a&&0===l&&null===g.getPreviousSibling()){if(null===t.getPreviousSibling())return t.selectPrevious(),e.preventDefault(),!0}else if(!a&&l===g.getTextContentSize()&&null===g.getNextSibling()){if(null===t.getNextSibling())return t.selectNext(),e.preventDefault(),!0}}return!1}let h,f;if(g.isBefore(c)?(h=U(g),f=$(c)):(h=U(c),f=$(g)),null==h||null==f)return!1;const p=h.getNodesBetween(f);for(let t=0;t<p.length;t++){const e=p[t];if(!xt(e)&&!n(e)&&!r(e))return!1}e.preventDefault(),e.stopPropagation();const d=a?h.getPreviousSibling():f.getNextSibling();if(!r(d))return!0;const m=a?d.getPreviousSibling():d.getNextSibling();if(null==m)return!0;const x=xt(m)||n(m)||r(m)?a?U(m):$(m):null;let _=null!=x?x:m;return d.remove(),p.forEach(t=>t.remove()),t===w?(p.forEach(t=>_.insertBefore(t)),_.insertBefore(d)):(_.insertAfter(d),_=d,p.forEach(t=>{_.insertAfter(t),_=t})),i.setTextNodeRange(g,l,c,u),!0}function vt(t,e){const i=y();if(!b(i))return!1;const{anchor:o,focus:s}=i,l=o.getNode(),u=s.getNode(),g=t===L;if(!St(i)||!xt(l)&&!n(l)||!xt(u)&&!n(u))return!1;const c=u;if("rtl"===q(c)?!g:g){const t=G(c,s.offset);if(null!==t){const{node:e,offset:n}=t;r(e)?e.selectNext(0,0):i.setTextNodeRange(e,n,e,n)}else c.getParentOrThrow().selectStart()}else{Q(c).select()}return e.preventDefault(),e.stopPropagation(),!0}function Nt(t,e){return N(t.registerCommand(C,e=>{const n=function(t){const e=y();if(!b(e)||!St(e))return null;const n=t?H:A,r=t?H:O,i=e.anchor,o=e.focus;if(i.is(o))return r;const s=yt(e);if(1!==s.length)return n;const l=s[0];let u,g;0===l.length&&W(285),e.isBackward()?(u=o,g=i):(u=i,g=o);const c=U(l[0]),a=$(l[0]),h=B(c.getKey(),0,"text"),f=B(a.getKey(),a.getTextContentSize(),"text");return u.isBefore(h)||f.isBefore(g)?n:h.isBefore(u)||g.isBefore(f)?r:n}(e.shiftKey);return null!==n&&(e.preventDefault(),t.dispatchCommand(n,void 0),!0)},T),t.registerCommand(O,()=>!!St(y())&&(P([a()]),!0),T),t.registerCommand(A,()=>bt(A),T),t.registerCommand(H,()=>bt(H,e),T),t.registerCommand(w,t=>{const e=y();if(!b(e))return!1;const{anchor:n}=e,r=n.getNode();return!!St(e)&&(e.isCollapsed()&&0===n.offset&&null===r.getPreviousSibling()&&st(r.getParentOrThrow())?(t.preventDefault(),!0):Tt(w,t))},T),t.registerCommand(D,t=>{const e=y();if(!b(e))return!1;const{anchor:n}=e,r=n.getNode();return!!St(e)&&(e.isCollapsed()&&n.offset===r.getTextContentSize()&&null===r.getNextSibling()&&st(r.getParentOrThrow())?(t.preventDefault(),!0):Tt(D,t))},T),t.registerCommand(L,t=>vt(L,t),T),t.registerCommand(k,t=>vt(k,t),T))}const Ct=_({build:(t,e)=>R(e),config:v({disabled:!1,tabSize:void 0}),dependencies:[_t],name:"@lexical/code-indent",register:(t,e,n)=>{const r=n.getOutput();return I(()=>{if(!r.disabled.value)return Nt(t,r.tabSize.value)})}});export{mt as $createCodeHighlightNode,ot as $createCodeNode,q as $getCodeLineDirection,Q as $getEndOfCodeInLine,U as $getFirstCodeNodeOfLine,$ as $getLastCodeNodeOfLine,G as $getStartOfCodeInLine,xt as $isCodeHighlightNode,st as $isCodeNode,V as $outdentLeadingSpaces,_t as CodeExtension,pt as CodeHighlightNode,Ct as CodeIndentExtension,it as CodeNode,X as DEFAULT_CODE_LANGUAGE,Y as getDefaultCodeLanguage,Nt as registerCodeIndentation};
|
package/package.json
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
"code"
|
|
9
9
|
],
|
|
10
10
|
"license": "MIT",
|
|
11
|
-
"version": "0.44.1-nightly.
|
|
11
|
+
"version": "0.44.1-nightly.20260512.0",
|
|
12
12
|
"main": "LexicalCodeCore.js",
|
|
13
13
|
"types": "index.d.ts",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@lexical/extension": "0.44.1-nightly.
|
|
16
|
-
"lexical": "0.44.1-nightly.
|
|
15
|
+
"@lexical/extension": "0.44.1-nightly.20260512.0",
|
|
16
|
+
"lexical": "0.44.1-nightly.20260512.0"
|
|
17
17
|
},
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|