@lexical/html 0.51.0 → 0.51.1-nightly.20260921.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.
@@ -241,7 +241,7 @@ function $inlineStylesFromStyleSheetsDOM(dom) {
241
241
  let rules;
242
242
  try {
243
243
  rules = sheet.cssRules;
244
- } catch (_unused) {
244
+ } catch {
245
245
  continue;
246
246
  }
247
247
  for (const rule of Array.from(rules)) {
@@ -251,7 +251,7 @@ function $inlineStylesFromStyleSheetsDOM(dom) {
251
251
  let elements;
252
252
  try {
253
253
  elements = doc.querySelectorAll(rule.selectorText);
254
- } catch (_unused2) {
254
+ } catch {
255
255
  continue;
256
256
  }
257
257
  for (const el of Array.from(elements)) {
@@ -268,7 +268,7 @@ function $inlineStylesFromStyleSheetsDOM(dom) {
268
268
  }
269
269
  }
270
270
  }
271
- } catch (_unused3) {
271
+ } catch {
272
272
  // styleSheets API not supported in this environment
273
273
  }
274
274
  }
@@ -777,7 +777,7 @@ class DOMRenderRuntimeImpl {
777
777
  installed;
778
778
 
779
779
  /** Memoized session configs keyed by the set of session-disabled overrides. */
780
- sessionCache = new Map();
780
+ sessionCache = (() => new Map())();
781
781
  constructor(editor, initialEditorConfig, overrides, editorContext) {
782
782
  this.editor = editor;
783
783
  this.initialEditorConfig = initialEditorConfig;
@@ -6,4 +6,4 @@
6
6
  *
7
7
  */
8
8
 
9
- import{$sliceSelectedTextNodeContent as t}from"@lexical/selection";import{$getEditor as e,createState as n,isDOMDocumentNode as o,isHTMLElement as r,$getEditorDOMRenderConfig as s,DEFAULT_EDITOR_DOM_CONFIG as i,getRegisteredSubtypeMap as c,$isLexicalNode as l,iterStaticNodeConfigChain as u,$fullReconcile as a,shallowMergeConfig as f,RootNode as p,$getDocument as d,isDOMTextNode as h,isBlockDomNode as m,isInlineDomNode as g,$isElementNode as y,$isBlockElementNode as x,$isDecoratorNode as S,$isLineBreakNode as $,$createParagraphNode as v,$setFormatFromDOM as C,setNodeIndentFromDOM as b,$setDirectionFromDOM as k,$generateNodesFromRawText as w,$createTextNode as D,isOnlyChildInBlockNode as O,isLastChildInBlockNode as A,$createLineBreakNode as M,$isTextNode as E,IS_BOLD as N,IS_ITALIC as I,IS_UNDERLINE as W,IS_STRIKETHROUGH as R,TEXT_TYPE_TO_FORMAT as T,IS_SUBSCRIPT as F,IS_SUPERSCRIPT as z,IS_HIGHLIGHT as P,IS_CODE as j,$getRoot as _,$getSelectionSlotFrame as L,$assumeActiveEditor as B,$isNodeSelection as U,isDocumentFragment as V,$isRootOrShadowRoot as q,ArtificialNode__DO_NOT_USE as G}from"lexical";import{objectKlassEquals as H}from"@lexical/utils";import{getPeerDependencyFromEditor as J}from"@lexical/extension/getPeerDependencyFromEditor";import{getKnownTypesAndNodes as Q}from"@lexical/extension/config";import{HorizontalRuleNode as K,$createHorizontalRuleNode as Y,HorizontalRuleExtension as Z}from"@lexical/extension/HorizontalRuleExtension";import{$getExtensionOutput as X}from"@lexical/extension/getExtensionDependency";function tt(t,...e){const n=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",t);for(const t of e)o.append("v",t);throw n.search=o.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.`)}let et;function nt(t,e){const{key:n}=e;return t&&n in t?t[n]:e.defaultValue}function ot(t){return et&&et.editor===t?et:void 0}function rt(t,e){const n=ot(e);return n&&n[t]}function st(t,e){if("cfg"in e){const{cfg:n,updater:o}=e;return[n,o(nt(t,n))]}return e}function it(t,e){let n=e;for(const o of t){const[t,r]=st(n,o),s=t.key;if(n===e&&nt(n,t)===r)continue;const i=n===e||void 0===n?ct(e):n;i[s]=r,n=i}return n}function ct(t){return Object.create(t||null)}function lt(t,e){return[t,e]}function ut(t,e){return{cfg:t,updater:e}}function at(t,n,o,r=e()){const s=et,i=ot(r);try{return et={...i,editor:r,[t]:n},o()}finally{et=s}}function ft(t,n=()=>{}){return(o,r=e())=>e=>{const s=ot(r),i=s&&s[t],c=it(o,i||n(r));return c&&c!==i?at(t,c,e,r):e()}}function pt(t,e,o,r){return Object.assign(n(Symbol(e),{isEqual:r,parse:o}),{[t]:!0})}const dt=(t,e,n)=>{ht(t),n()};function ht(t){if(!o(t))return;const e=t;if(null===e.querySelector("style"))return;const n=new Map;function s(t){let e=n.get(t);if(void 0===e){e=new Set;for(let n=0;n<t.style.length;n++)e.add(t.style[n]);n.set(t,e)}return e}try{for(const t of Array.from(e.styleSheets)){let n;try{n=t.cssRules}catch(t){continue}for(const t of Array.from(n)){if(!H(t,CSSStyleRule))continue;let n;try{n=e.querySelectorAll(t.selectorText)}catch(t){continue}for(const e of Array.from(n)){if(!r(e))continue;const n=s(e);for(let o=0;o<t.style.length;o++){const r=t.style[o];n.has(r)||e.style.setProperty(r,t.style.getPropertyValue(r),t.style.getPropertyPriority(r))}}}}}catch(t){}}const mt="@lexical/html/DOM",gt=Symbol.for("@lexical/html/DOMExportContext"),yt="@lexical/html/DOMImport",xt=Symbol.for("@lexical/html/DOMImportContext"),St=()=>!0;function $t(t,e,n){return pt(gt,t,e,n)}const vt=/* @__PURE__ */$t("root",Boolean),Ct=/* @__PURE__ */$t("isExport",Boolean);function bt(t){const e=J(t,mt);return e?e.output.defaults:void 0}function kt(t,n=e()){return nt(function(t){return rt(gt,t)||bt(t)}(n),t)}function wt(t){const e=J(t,mt);return e?e.output.runtime:void 0}function Dt(t,n,o=e()){const r=wt(o);r&&r.setContextValue(t,n)}function Ot(t,n,o=e()){const r=wt(o);r&&r.setContextValue(t,n(nt(r.editorContext,t)))}function At(t=e()){const n=wt(t);return n?n.getSessionConfig():s(t)}const Mt=/* @__PURE__ */ft(gt,bt);function Et(t,e,n){return{...e,...n,nodes:t}}function Nt(t){return e=>e instanceof t}function It(t,{nodes:e}){if("*"===e)return St;let n={};const o=[];for(const r of e)if("getType"in r){const e=r.getType();if(n){const o=t.get(e);void 0===o&&tt(339,r.name,e);for(const t of o)n[t]=!0}o.push(Nt(r))}else n=void 0,o.push(r);return n||(1===o.length?o[0]:t=>{for(const e of o)if(e(t))return!0;return!1})}function Wt(t){return(e,n,o)=>t(e,o)}function Rt(t){return(e,n,o,r)=>t(e,n,r)}function Tt(t){return(e,n,o,r,s)=>t(e,n,o,s)}function Ft(t){return(e,n,o,r,s,i)=>t(e,n,o,r,i)}function zt(t,e){return(n,o)=>{const r=()=>t(n,o),s=e(n);return s?s(n,r,o):r()}}function Pt(t,e){return(n,o,r)=>{const s=()=>t(n,o,r),i=e(n);return i?i(n,o,s,r):s()}}const jt=Pt,_t=Rt;function Lt(t,e){return(n,o,r,s)=>{const i=()=>t(n,o,r,s),c=e(n);return c?c(n,o,r,i,s):i()}}function Bt(t,e){return(n,o,r,s,i)=>{const c=()=>t(n,o,r,s,i),l=e(n);return l?l(n,o,r,s,c,i):c()}}function Ut(t,e){return(n,o,r,s)=>{t(n,o,r,s);const i=e(n);i&&i(n,o,r,s)}}function Vt(t,e,n,o,r){let s=n[e];for(const n of t[e])if("function"==typeof n[0]){const[t,e]=n;s=o(s,n=>t(n)&&e||void 0)}else{const t=n[1],e={};for(const n in t){const r=t[n];r&&(e[n]=r.reduce((t,e)=>o(t,()=>e),s))}s=o(s,t=>{const n=e[t.getType()];return n&&r(n)})}n[e]=s}function qt(t,e,n,o){if(!o)return;const r=t[e];if("function"==typeof n)r.push([n,o]);else{const t=r[r.length-1];let e;t&&"types"===t[0]?e=t[1]:(e={},r.push(["types",e]));for(const t in n){const n=e[t]||[];e[t]=n,n.push(o)}}}function Gt(t){return"*"===t.nodes}function Ht(t,e){const n=c(Q(t).nodes),o={$createDOM:[],$decorateDOM:[],$exportDOM:[],$extractWithChild:[],$getDOMSlot:[],$getSlotTargetElement:[],$shouldExclude:[],$shouldInclude:[],$updateDOM:[]};for(const t of function(t){const e=[],n=[],o=[];for(const r of t)if(Gt(r))e.push(r);else if(Array.isArray(r.nodes))for(const t of r.nodes)l(t.prototype)?o.push(1===r.nodes.length?r:{...r,nodes:[t]}):n.push(1===r.nodes.length?r:{...r,nodes:[t]});const r=new Map,s=t=>{let e=r.get(t);if(void 0===e){e=-1;for(const n of u(t))e++;r.set(t,e)}return e};return o.sort((t,e)=>s(t.nodes[0])-s(e.nodes[0])),[...o,...n,...e]}(e)){const e=It(n,t);for(const n in o){qt(o,n,e,t[n])}}return o}function Jt(t){return t}function Qt(t,{overrides:e}){const n=Ht(t,e),o={...i,...t.dom};return Vt(n,"$createDOM",o,zt,Wt),Vt(n,"$exportDOM",o,zt,Wt),Vt(n,"$extractWithChild",o,Bt,Ft),Vt(n,"$getDOMSlot",o,jt,_t),Vt(n,"$shouldExclude",o,Pt,Rt),Vt(n,"$shouldInclude",o,Pt,Rt),Vt(n,"$getSlotTargetElement",o,Lt,Tt),Vt(n,"$updateDOM",o,Lt,Tt),Vt(n,"$decorateDOM",o,Ut,Jt),o}function Kt(t){return{get:e=>nt(t,e)}}function Yt(t){const e=Object.create(null);return it(t,e)||e}function Zt(t,e){const n=Kt(e);return t.filter(t=>!(t.disabledForEditor&&t.disabledForEditor(n)))}function Xt(t){if("*"===t.nodes)return()=>!0;const e=t.nodes.map(t=>{const e=t;return l(e.prototype)?t=>t instanceof e:t});return t=>e.some(e=>e(t))}class te{editor;initialEditorConfig;overrides;editorContext;hasSessionGates;installed;sessionCache=new Map;constructor(t,e,n,o){this.editor=t,this.initialEditorConfig=e,this.overrides=n,this.editorContext=o,this.installed=Zt(n,o),this.hasSessionGates=n.some(t=>t.disabledForSession)}setContextValue(t,e){const n=this.installed;this.editorContext[t.key]=e;const o=Zt(this.overrides,this.editorContext);if(function(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}(n,o))return;const r=function(t,e){const n=new Set(t),o=new Set(e),r=[];for(const e of t)o.has(e)||r.push(e);for(const t of e)n.has(t)||r.push(t);return r}(n,o);this.installed=o,this.sessionCache.clear();const s=Qt(this.initialEditorConfig,{overrides:o});this.editor._config.dom=s;const i=function(t){const e=[];for(const n of t)(n.$createDOM||n.$getDOMSlot||n.$decorateDOM)&&e.push(Xt(n));return 0===e.length?null:t=>e.some(e=>e(t))}(r);if(!i)return;const c=s.$updateDOM;s.$updateDOM=(t,e,n,o)=>!!i(t)||c(t,e,n,o),this.editor.update(a,{discrete:!0}),s.$updateDOM=c}getSessionConfig(){const t=this.editor._config.dom||i;if(!this.hasSessionGates)return t;const e=Kt(rt(gt,this.editor)||this.editorContext),n=[],o=[];if(this.installed.forEach((t,r)=>{t.disabledForSession&&t.disabledForSession(e)?n.push(String(r)):o.push(t)}),0===n.length)return t;const r=n.join(",");let s=this.sessionCache.get(r);return s||(s=Qt(this.initialEditorConfig,{overrides:o}),this.sessionCache.set(r,s)),s}}const ee={build(t,e,n){const{initialEditorConfig:o}=n.getInitResult(),r=Yt(e.contextDefaults);return{defaults:r,runtime:new te(t,o,e.overrides,r)}},config:{contextDefaults:[],overrides:[]},html:{export:new Map([[p,()=>{const t=d().createElement("div");return t.role="textbox",{element:t}}]])},init(t,e){const n={dom:t.dom,nodes:t.nodes},o=Yt(e.contextDefaults),r=Zt(e.overrides,o);return t.dom=Qt(t,{overrides:r}),{initialEditorConfig:n}},mergeConfig(t,e){const n=f(t,e);for(const o of["overrides","contextDefaults"])e[o]&&(n[o]=[...t[o],...e[o]]);return n},name:mt},ne=Symbol.for("@lexical/html/SelectorImpl");function oe(t,e){const n={kind:"element",predicate:(o=e,0===o.length?r:1===o.length?o[0]:(t,e)=>{for(const n of o)if(!n(t,e))return!1;return!0}),tags:t};var o;const s=n=>oe(t,[...e,n]);return{[ne]:n,attr:(t,e,n)=>s(ie(t,e,n)),classAll:(...t)=>s(se(t)),classAny:(...t)=>s(function(t){const e=re(t);if(0===e.length)return()=>!1;return t=>{if(!r(t))return!1;const n=t.classList;for(const t of e)if(n.contains(t))return!0;return!1}}(t)),styleAny:(t,e,n)=>s(function(t,e,n){if("string"==typeof e)return n=>r(n)&&n.style.getPropertyValue(t)===e;if(e instanceof RegExp){const o=n&&n.capture,s=e;return(e,n)=>{if(!r(e))return!1;const i=e.style.getPropertyValue(t);if(!i)return!1;const c=i.match(s);return null!==c&&(void 0!==o&&(n[o]=c),!0)}}tt(362,JSON.stringify(t))}(t,e,n))}}function re(t){const e=[];for(const n of t)n&&e.push(n);return e}function se(t){const e=re(t);return 0===e.length?()=>!0:t=>{if(!r(t))return!1;const n=t.classList;for(const t of e)if(!n.contains(t))return!1;return!0}}function ie(t,e,n){if(!0===e)return e=>r(e)&&e.hasAttribute(t);if("string"==typeof e)return n=>r(n)&&n.getAttribute(t)===e;if(e instanceof RegExp){const o=n&&n.capture,s=e;return(e,n)=>{if(!r(e))return!1;const i=e.getAttribute(t);if(null==i)return!1;const c=i.match(s);return null!==c&&(void 0!==o&&(n[o]=c),!0)}}tt(361,JSON.stringify(t))}function ce(t){return{[ne]:t}}const le=/* @__PURE__ */ce({kind:"text",predicate:h,tags:new Set}),ue=/* @__PURE__ */ce({kind:"comment",predicate:t=>8===t.nodeType,tags:new Set});function ae(){return oe(new Set,[])}function fe(){return ue}function pe(...t){t.length>0||tt(363);const e=new Set;for(const n of t)e.add(n.toUpperCase());return oe(e,[])}function de(){return le}const he={any:ae,comment:fe,tag:pe,text:de};function me(t,e){return r(t)&&t.nodeName===e.toUpperCase()}const ge=/[A-Za-z0-9_-]/;class ye{constructor(t,e){this.source=t,this.pos=e}peek(t=0){return this.source[this.pos+t]||""}consume(){return this.source[this.pos++]||""}eof(){return this.pos>=this.source.length}skipWhitespace(){for(;!this.eof()&&/\s/.test(this.peek());)this.pos++}readIdent(){const t=this.pos;for(;!this.eof()&&ge.test(this.peek());)this.pos++;return this.source.slice(t,this.pos)}readQuoted(){const t=this.consume();this.assert('"'===t||"'"===t,"expected quote");const e=this.pos;for(;!this.eof()&&this.peek()!==t;)"\\"===this.peek()?this.pos+=2:this.pos++;this.assert(!this.eof(),"unterminated string");const n=this.source.slice(e,this.pos);return this.pos++,n.replace(/\\(.)/g,"$1")}assert(t,e){t||tt(364,String(this.pos+1),e,this.source)}}function xe(t){const e=new Set,n=[],o=[];let r=!1;if(t.skipWhitespace(),"*"===t.peek())t.consume(),r=!0;else if(ge.test(t.peek())){const n=t.readIdent();n&&e.add(n.toUpperCase())}for(;!t.eof();){const e=t.peek();if("."===e){t.consume();const e=t.readIdent();t.assert(""!==e,'expected class name after "."'),o.push(e)}else if("#"===e){t.consume();const e=t.readIdent();t.assert(""!==e,'expected id after "#"'),n.push(ie("id",e))}else{if("["!==e)break;{t.consume(),t.skipWhitespace();const e=t.readIdent();t.assert(""!==e,'expected attribute name after "["'),t.skipWhitespace();let o=!0;if("="===t.peek()){t.consume(),t.skipWhitespace();const e=t.peek();'"'===e||"'"===e?o=t.readQuoted():(o=t.readIdent(),t.assert(""!==o,"expected attribute value")),t.skipWhitespace()}t.assert("]"===t.peek(),'expected "]"'),t.consume(),n.push(ie(e,o))}}}return o.length>0&&n.push(se(o)),t.assert(r||e.size>0||n.length>0,"expected a selector"),{predicates:n,tags:e}}function Se(t){const e=new ye(t,0),n=[];for(;n.push(xe(e)),e.skipWhitespace(),!e.eof();)e.assert(","===e.peek(),'expected "," (selector lists are the only supported combinator)'),e.consume(),e.skipWhitespace();if(1===n.length)return oe(n[0].tags,n[0].predicates);const o=new Set;if(n.every(t=>t.tags.size>0))for(const t of n)for(const e of t.tags)o.add(e);return oe(o,[(t,e)=>{for(const o of n){const n=t.nodeName;if(o.tags.size>0&&!o.tags.has(n))continue;let r=!0;for(const n of o.predicates)if(!n(t,e)){r=!1;break}if(r)return!0}return!1}])}function $e(t,e,n){return pt(xt,t,e,n)}const ve=/* @__PURE__ */$e("importSource",()=>"unknown"),Ce=/* @__PURE__ */$e("importSourceDataTransfer",()=>null),be=/* @__PURE__ */$e("textFormat",()=>0),ke=/* @__PURE__ */$e("textStyle",()=>({}));function we(t){if(!r(t))return!1;if("PRE"===t.nodeName)return!0;const e=t.style.whiteSpace;return"string"==typeof e&&e.startsWith("pre")}function De(t){if(h(t))return!0;if(!r(t))return!1;const e=t.style.display;return e?e.startsWith("inline"):!m(t)&&g(t)}const Oe=/* @__PURE__ */$e("whitespaceConfig",()=>({isInline:De,preservesWhitespace:we})),Ae=/* @__PURE__ */$e("importOverlays",()=>[]);class Me{constructor(t){this.record=t}get(t){return nt(this.record,t)}set(t,e){this.record[t.key]=e}update(t,e){this.record[t.key]=e(nt(this.record,t))}has(t){return Object.prototype.hasOwnProperty.call(this.record,t.key)}}function Ee(t){const e=J(t,yt);return e?e.output.defaults:void 0}function Ne(t,n=e()){return nt(function(t){return rt(xt,t)||Ee(t)}(n),t)}const Ie=/* @__PURE__ */ft(xt,Ee);function We(t){return x(t)||S(t)&&!t.isInline()}function Re(t,e){const n=[];let o=[];const r=()=>{0!==o.length&&(n.push(e().splice(0,0,o)),o=[])};for(const s of t)if(We(s)){if(r(),y(s)){const t=Re(s.getChildren(),e);s.splice(0,s.getChildrenSize(),t)}n.push(s)}else o.push(s);return r(),n}function Te(t,e){if(!r(e))return t;const n=e.style.textAlign;if(!Ue(n))return t;for(const e of t)x(e)&&""===e.getFormatType()&&e.setFormat(n);return t}function Fe(t,e,n){1===t.length&&$(t[0])&&(t=[]);const o=v();if(r(n)){const t=n.style.textAlign;Ue(t)&&o.setFormat(t)}return[o.splice(0,0,t)]}const ze={$accepts:We,$packageRun:Fe,name:"BlockSchema"},Pe={$accepts:t=>!We(t),name:"InlineSchema"},je={$accepts:We,$packageRun:t=>t,name:"NestedBlockSchema"},_e={$accepts:We,$packageRun:Fe,name:"RootSchema"},Le=he,Be=new Set(["center","end","justify","left","right","start"]);function Ue(t){return Be.has(t)}const Ve={B:{fontWeight:"bold"},EM:{fontStyle:"italic"},I:{fontStyle:"italic"},S:{textDecoration:"line-through"},STRONG:{fontWeight:"bold"},SUB:{verticalAlign:"sub"},SUP:{verticalAlign:"super"},U:{textDecoration:"underline"}},qe={CODE:j,MARK:P};const Ge=new Set(["font-weight","font-style","text-decoration","text-transform","vertical-align"]);const He={$import:(t,e)=>{const n=t.get(be),o=Ve[e.nodeName],r=function(t){return{fontStyle:t.style.fontStyle,fontWeight:t.style.fontWeight,textDecoration:t.style.textDecoration,textTransform:t.style.textTransform,verticalAlign:t.style.verticalAlign}}(e),s=o?(i=o,{fontStyle:(c=r).fontStyle||i.fontStyle,fontWeight:c.fontWeight||i.fontWeight,textDecoration:c.textDecoration||i.textDecoration,textTransform:c.textTransform||i.textTransform,verticalAlign:c.verticalAlign||i.verticalAlign}):r;var i,c;let l=(u=n,a=function(t){let e=0,n=0;const{fontWeight:o,fontStyle:r,textDecoration:s,textTransform:i,verticalAlign:c}=t;if("700"===o||"bold"===o?e|=N:"normal"!==o&&"400"!==o||(n|=N),"italic"===r?e|=I:"normal"===r&&(n|=I),s){const t=s.split(" ");t.includes("underline")&&(e|=W),t.includes("line-through")&&(e|=R),t.includes("none")&&(n|=W|R)}return"lowercase"===i?(e|=T.lowercase,n|=T.uppercase|T.capitalize):"uppercase"===i?(e|=T.uppercase,n|=T.lowercase|T.capitalize):"capitalize"===i?(e|=T.capitalize,n|=T.lowercase|T.uppercase):"none"===i&&(n|=T.lowercase|T.uppercase|T.capitalize),"sub"===c?(e|=F,n|=z):"super"===c?(e|=z,n|=F):"baseline"===c&&(n|=F|z),{clear:n,set:e}}(s),u&~a.clear|a.set);var u,a;const f=qe[e.nodeName];return f&&(l|=f),l===n?t.$importChildren(e):t.$importChildren(e,{context:[lt(be,l)]})},match:/* @__PURE__ */Le.tag("b","strong","em","i","code","mark","s","sub","sup","u","span"),name:"@lexical/html/inline-format"};function Je(t,e,n){let o=t;for(;;){let t=null;for(;null===(t=e?o.nextSibling:o.previousSibling);){const t=o.parentNode;if(null===t)return null;o=t}if(o=t,!n.isInline(o))return null;let r=o;for(;null!==(r=e?o.firstChild:o.lastChild);)o=r;if(h(o))return o;if("BR"===o.nodeName)return null}}function Qe(t,e){return 0!==e&&E(t)?t.setFormat(e):t}function Ke(t,e){if(E(t)){const n=function(t){let e="";for(const n in t)Ge.has(n)||(e+=`${n}: ${t[n]}; `);return e.trimEnd()}(e);""!==n&&t.setStyle(n)}return t}const Ye={$import:(t,e)=>{const n=t.get(be),o=t.get(ke),r=t.get(Oe);if(function(t,e){let n=t.parentNode;for(;null!==n;){if(e.preservesWhitespace(n))return!0;n=n.parentNode}return!1}(e,r)){const t=w(e.textContent||"");for(const e of t)Qe(e,n),Ke(e,o);return t}const s=function(t,e){let n=(t.textContent||"").replace(/\r/g,"").replace(/[ \t\n]+/g," ");if(0===n.length)return"";if(" "===n[0]){let o=t,r=!0;for(;null!==o&&null!==(o=Je(o,!1,e));){const t=o.textContent||"";if(t.length>0){/[ \t\n]$/.test(t)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(n.length>0&&" "===n[n.length-1]){let o=t,r=!0;for(;null!==o&&null!==(o=Je(o,!0,e));)if((o.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){r=!1;break}r&&(n=n.slice(0,-1))}return n}(e,r);if(""===s)return[];const i=D(s);return Qe(i,n),Ke(i,o),[i]},match:/* @__PURE__ */Le.text(),name:"@lexical/html/#text"},Ze={$import:()=>[],match:/* @__PURE__ */Le.tag("script","style"),name:"@lexical/html/script-style-ignore"},Xe={$import:(t,e)=>O(e)||A(e)?[]:[M()],match:/* @__PURE__ */Le.tag("br"),name:"@lexical/html/br"},tn={$import:(t,e)=>{const n=v();if(C(n,e),b(e,n),""===n.getFormatType()){const t=e.getAttribute("align");t&&Ue(t)&&n.setFormat(t)}return k(n,e),[n.splice(0,0,t.$importChildren(e))]},match:/* @__PURE__ */Le.tag("p"),name:"@lexical/html/p"},en={$import:(t,n,o)=>e().hasNode(K)?[Y()]:o(),match:/* @__PURE__ */Le.tag("hr"),name:"@lexical/html/hr"},nn=[Ze,tn,en,{$import:(t,e,n)=>m(e)?Te(t.$importChildren(e,{schema:ze}),e):n(),match:/* @__PURE__ */Le.any(),name:"@lexical/html/transparent-block"},Ye,Xe,He];function on(t,e){const n=[];let o=0,r=0;for(;o<t.length&&r<e.length;)t[o]<=e[r]?n.push(t[o++]):n.push(e[r++]);for(;o<t.length;)n.push(t[o++]);for(;r<e.length;)n.push(e[r++]);return n}function rn(t){const e=[],n=new Map,o=[],r=[],s=[],i=new Set;t.forEach((t,c)=>{const l=function(t){const e=t[ne];return void 0===e&&tt(360),e}(t.match),u=t.name||function(t,e){if("text"===t.kind)return`#text@${e}`;if("comment"===t.kind)return`#comment@${e}`;if(0===t.tags.size)return`*@${e}`;const n=Array.from(t.tags).join(",").toLowerCase();return`${n}@${e}`}(l,c);if(t.name&&i.add(t.name),e.push({$import:t.$import,name:u,predicate:l.predicate}),"text"===l.kind)r.push(c);else if("comment"===l.kind)s.push(c);else if(0===l.tags.size)o.push(c);else for(const t of l.tags){let e=n.get(t);e||(e=[],n.set(t,e)),e.push(c)}});const c=new Map;if(0===o.length)for(const[t,e]of n)c.set(t,e);else for(const[t,e]of n)c.set(t,on(e,o));return{byTag:c,commentIndices:s,rules:e,textIndices:r,wildcardIndices:o}}function sn(t,e){return h(e)?t.textIndices:8===e.nodeType?t.commentIndices:r(e)?t.byTag.get(e.nodeName)||t.wildcardIndices:cn}const cn=/* @__PURE__ */Object.freeze([]);function ln(t){const e=[];for(const n of t)if(un(n))for(const t of n.rules)e.push(t);else e.push(n);return e}function un(t){return"object"==typeof t&&null!==t&&"__type"in t&&"CompiledOverlayRules"===t.__type}function an(t){const e=ln(t);return{__type:"CompiledOverlayRules",dispatch:rn(e),rules:e}}const fn=/* @__PURE__ */Object.freeze({});function pn(t,e){const n={$importChildren:(e,n)=>function(t,e,n){const o=n&&n.rules?n.rules.dispatch:void 0;o&&t.overlays.push(o);try{const o=()=>dn(t,e,n);return n&&n.context?Ie(n.context,t.editor)(o):o()}finally{o&&t.overlays.pop()}}(t,e,n),$importOne:(e,n)=>hn(t,e,n),captures:e,get:e=>Ne(e,t.editor),session:t.session};return n}function dn(t,e,n){const o=n&&n.$onChild,r=[];for(const n of Array.from(e.childNodes)){const e=hn(t,n,void 0);for(const t of e){const e=o?o(t):t;null!=e&&r.push(e)}}const s=n&&n.$after?n.$after(r):r,i=n&&n.schema;return i?function(t,e,n,o){const r=[];let s=null;const i=()=>{if(null===s)return;const e=s;if(s=null,t.$packageRun){const s=t.$packageRun(e,n,o);if(s.length>0){for(const t of s)r.push(t);return}}if("hoist"===t.onReject)for(const t of e)r.push(t)};for(const o of e)t.$accepts(o,n)?(i(),r.push(o)):(null===s&&(s=[]),s.push(o));return i(),t.$finalize?t.$finalize(r,n):r}(i,s,null,e):s}function hn(t,e,n){const o=()=>function(t,e){const n=function(t,e){const n=[];for(let o=t.overlays.length-1;o>=0;o--){const r=t.overlays[o],s=sn(r,e);s.length>0&&n.push({dispatch:r,indices:s})}const o=sn(t.dispatch,e);o.length>0&&n.push({dispatch:t.dispatch,indices:o});return n}(t,e);if(0===n.length)return mn(t,e);let o=0,r=0;const s=()=>{for(;o<n.length;){const{dispatch:i,indices:c}=n[o];for(;r<c.length;){const n=c[r++],o=i.rules[n],l={};if(o.predicate(e,l)){const n=pn(t,0===Object.keys(l).length?fn:l);try{return o.$import(n,e,s)}catch(t){throw t}}}o++,r=0}return mn(t,e)};return s()}(t,e);return n&&n.context?Ie(n.context,t.editor)(o):o()}function mn(t,e){if(0===e.childNodes.length)return[];const n=[];for(const o of Array.from(e.childNodes)){const e=hn(t,o,void 0);for(const t of e)n.push(t)}return n}const gn={$import:(t,e)=>t.$importChildren(e),match:/* @__PURE__ */he.any(),name:"@lexical/html/default-hoist"},yn={build(t,e){const n=rn(ln(e.rules)),r=it(e.contextDefaults,void 0),s=e.preprocess;return{$generateNodesFromDOM:(e,i)=>{const c=rt(xt,t)||r,l=i&&i.context?it(i.context,c):c,u=void 0!==l&&l!==c?l:Object.create(c||null),a=new Me(u),f={session:a};return function(t,e,n){let o=t.length-1;const r=()=>{for(;o>=0;)return void(0,t[o--])(e,n,r)};r()}(i&&i.preprocess?[...s,...i.preprocess]:s,e,f),at(xt,u,()=>function(t,e,n,r){return dn({dispatch:t,editor:e,overlays:r.get(Ae).map(t=>t.dispatch),session:r},o(n)?n.body:n,{schema:_e})}(n,t,e,a),t)},defaults:r}},config:{contextDefaults:[],preprocess:[dt],rules:[gn]},mergeConfig:(t,e)=>f(t,{...e,...e.contextDefaults&&{contextDefaults:[...t.contextDefaults,...e.contextDefaults]},...e.preprocess&&{preprocess:[...t.preprocess,...e.preprocess]},...e.rules&&{rules:[...e.rules,...t.rules]}}),name:yt};function xn(t,e){return X(yn).$generateNodesFromDOM(t,e)}const Sn={dependencies:[[yn,{rules:nn}]],name:"@lexical/html/CoreImport"};function $n(t){return t}const vn=[en],Cn={dependencies:[Z,Sn],name:"@lexical/html/HorizontalRuleImport"},bn={any:ae,comment:fe,css:Se,tag:pe,text:de},kn=new Set(["STYLE","SCRIPT"]);function wn(t,e){ht(e);const n=o(e)?e.body.childNodes:e.childNodes,r=[],s=[];for(const e of n)if(!kn.has(e.nodeName)){const n=Nn(e,t,s,!1);if(null!==n)for(const t of n)r.push(t)}return function(t){for(const e of t)e.getParent()&&e.getNextSibling()instanceof G&&e.insertAfter(M());for(const e of t){const t=e.getParent();t&&t.splice(e.getIndexWithinParent(),1,e.getChildren())}}(s),r}function Dn(t,n=null,o=e()){return Mt([lt(Ct,!0)],o)(()=>{const e=_(),r=At(o),s=L(n),i=t.append.bind(t);for(const t of(y(s)?s:e).getChildren())Mn(o,t,i,n,r);return t})}function On(t,n=_()){const o=e();return Mt([lt(Ct,!0),lt(vt,!0)],o)(()=>{const e=At(o),r=t.append.bind(t);return Mn(o,n,r,null,e),t})}function An(t,e=null){return("undefined"==typeof document||"undefined"==typeof window&&void 0===global.window)&&tt(338),B(t),Dn(d().createElement("div"),e,t).innerHTML}function Mn(e,n,o,i=null,c=s(e)){let l=c.$shouldInclude(n,i,e);const u=c.$shouldExclude(n,i,e);let a=n;null!==i&&E(n)&&(a=t(i,n,"clone"));const f=c.$exportDOM(a,e),{element:p,after:h,append:g,$getChildNodes:x}=f;if(!p)return!1;const S=d().createDocumentFragment(),v=x?x():y(a)?a.getChildren():[],C=l&&U(i)&&y(n)?null:i,b=S.append.bind(S);let k=null;for(const t of v){const o=Mn(e,t,b,C,c);o&&(k=t),!l&&o&&c.$extractWithChild(n,t,i,"html",e)&&(l=!0)}if(l&&!u){if((r(p)||V(p))&&(g?g(S):p.append(S),function(t,e){const n=t.lastChild;if($(e)&&r(t)&&m(t)&&null!==n&&"BR"===n.nodeName){const e=d().createElement("br");e.setAttribute("data-lexical-managed-linebreak","true"),t.append(e)}}(p,k)),V(p)){if(h){const t=h.call(a,p);t&&p.replaceChildren(t)}o(p)}else if(o(p),h){const t=h.call(a,p);t&&p.replaceWith(t)}}else o(S);return l}function En(t,e,n,o=null){return Mn(t,e,n.append.bind(n),o,At(t))}function Nn(t,e,n,o,r=new Map,s){const i=[];if(kn.has(t.nodeName))return i;let c=null;const l=function(t,e){const{nodeName:n}=t,o=e._htmlConversions.get(n.toLowerCase());let r=null;if(void 0!==o)for(const e of o){const n=e(t);null!==n&&(null===r||(r.priority||0)<=(n.priority||0))&&(r=n)}return null!==r?r.conversion:null}(t,e),u=l?l(t):null;let a=null;if(null!==u){a=u.after;const e=u.node;if(c=Array.isArray(e)?e[e.length-1]:e,null!==c){for(const[,t]of r)if(c=t(c,s),!c)break;c&&i.push(...Array.isArray(e)?e:[c])}null!=u.forChild&&r.set(t.nodeName,u.forChild)}const f=t.childNodes;let p=[];const d=(null==c||!q(c))&&(null!=c&&x(c)||o);for(let t=0;t<f.length;t++)p.push(...Nn(f[t],e,n,d,new Map(r),c));if(null!=a&&(p=a(p)),m(t)&&(p=In(t,p,d?()=>{const t=new G;return n.push(t),t}:v)),null==c)if(p.length>0)for(const t of p)i.push(t);else m(t)&&function(t){if(null==t.nextSibling||null==t.previousSibling)return!1;return g(t.nextSibling)&&g(t.previousSibling)}(t)&&i.push(M());else y(c)&&c.append(...p);return i}function In(t,e,n){const o=t.style.textAlign,r=[];let s=[];for(let t=0;t<e.length;t++){const i=e[t];if(x(i))o&&!i.getFormat()&&i.setFormat(o),r.push(i);else if(s.push(i),t===e.length-1||t<e.length-1&&x(e[t+1])){const t=n();t.setFormat(o),t.append(...s),r.push(t),s=[]}}return r}export{En as $appendNodeToHTML,Re as $distributeInlineWrapper,Dn as $generateDOMFromNodes,On as $generateDOMFromRoot,An as $generateHtmlFromNodes,wn as $generateNodesFromDOM,xn as $generateNodesFromDOMViaExtension,Ne as $getImportContextValue,kt as $getRenderContextValue,At as $getSessionDOMRenderConfig,dt as $inlineStylesFromStyleSheets,We as $isBlockLevel,Te as $propagateTextAlignToBlockChildren,Dt as $setRenderContextValue,Ot as $updateRenderContextValue,Ie as $withImportContext,Mt as $withRenderContext,ze as BlockSchema,Sn as CoreImportExtension,nn as CoreImportRules,yn as DOMImportExtension,ee as DOMRenderExtension,Cn as HorizontalRuleImportExtension,vn as HorizontalRuleImportRules,Ae as ImportOverlays,ve as ImportSource,Ce as ImportSourceDataTransfer,be as ImportTextFormat,ke as ImportTextStyle,Oe as ImportWhitespaceConfig,Pe as InlineSchema,je as NestedBlockSchema,Ct as RenderContextExport,vt as RenderContextRoot,_e as RootSchema,ut as contextUpdater,lt as contextValue,$e as createImportState,$t as createRenderState,De as defaultIsInline,we as defaultPreservesWhitespace,$n as defineImportRule,an as defineOverlayRules,Et as domOverride,me as isElementOfTag,Se as parseSelector,bn as sel};
9
+ import{$sliceSelectedTextNodeContent as t}from"@lexical/selection";import{$getEditor as e,createState as n,isDOMDocumentNode as o,isHTMLElement as r,$getEditorDOMRenderConfig as s,DEFAULT_EDITOR_DOM_CONFIG as i,getRegisteredSubtypeMap as c,$isLexicalNode as l,iterStaticNodeConfigChain as u,$fullReconcile as a,shallowMergeConfig as f,RootNode as p,$getDocument as d,isDOMTextNode as h,isBlockDomNode as m,isInlineDomNode as g,$isElementNode as y,$isBlockElementNode as x,$isDecoratorNode as S,$isLineBreakNode as $,$createParagraphNode as v,$setFormatFromDOM as C,setNodeIndentFromDOM as b,$setDirectionFromDOM as k,$generateNodesFromRawText as w,$createTextNode as D,isOnlyChildInBlockNode as O,isLastChildInBlockNode as A,$createLineBreakNode as M,$isTextNode as E,IS_BOLD as N,IS_ITALIC as I,IS_UNDERLINE as W,IS_STRIKETHROUGH as R,TEXT_TYPE_TO_FORMAT as T,IS_SUBSCRIPT as F,IS_SUPERSCRIPT as z,IS_HIGHLIGHT as P,IS_CODE as j,$getRoot as _,$getSelectionSlotFrame as L,$assumeActiveEditor as B,$isNodeSelection as U,isDocumentFragment as V,$isRootOrShadowRoot as q,ArtificialNode__DO_NOT_USE as G}from"lexical";import{objectKlassEquals as H}from"@lexical/utils";import{getPeerDependencyFromEditor as J}from"@lexical/extension/getPeerDependencyFromEditor";import{getKnownTypesAndNodes as Q}from"@lexical/extension/config";import{HorizontalRuleNode as K,$createHorizontalRuleNode as Y,HorizontalRuleExtension as Z}from"@lexical/extension/HorizontalRuleExtension";import{$getExtensionOutput as X}from"@lexical/extension/getExtensionDependency";function tt(t,...e){const n=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",t);for(const t of e)o.append("v",t);throw n.search=o.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.`)}let et;function nt(t,e){const{key:n}=e;return t&&n in t?t[n]:e.defaultValue}function ot(t){return et&&et.editor===t?et:void 0}function rt(t,e){const n=ot(e);return n&&n[t]}function st(t,e){if("cfg"in e){const{cfg:n,updater:o}=e;return[n,o(nt(t,n))]}return e}function it(t,e){let n=e;for(const o of t){const[t,r]=st(n,o),s=t.key;if(n===e&&nt(n,t)===r)continue;const i=n===e||void 0===n?ct(e):n;i[s]=r,n=i}return n}function ct(t){return Object.create(t||null)}function lt(t,e){return[t,e]}function ut(t,e){return{cfg:t,updater:e}}function at(t,n,o,r=e()){const s=et,i=ot(r);try{return et={...i,editor:r,[t]:n},o()}finally{et=s}}function ft(t,n=()=>{}){return(o,r=e())=>e=>{const s=ot(r),i=s&&s[t],c=it(o,i||n(r));return c&&c!==i?at(t,c,e,r):e()}}function pt(t,e,o,r){return Object.assign(n(Symbol(e),{isEqual:r,parse:o}),{[t]:!0})}const dt=(t,e,n)=>{ht(t),n()};function ht(t){if(!o(t))return;const e=t;if(null===e.querySelector("style"))return;const n=new Map;function s(t){let e=n.get(t);if(void 0===e){e=new Set;for(let n=0;n<t.style.length;n++)e.add(t.style[n]);n.set(t,e)}return e}try{for(const t of Array.from(e.styleSheets)){let n;try{n=t.cssRules}catch{continue}for(const t of Array.from(n)){if(!H(t,CSSStyleRule))continue;let n;try{n=e.querySelectorAll(t.selectorText)}catch{continue}for(const e of Array.from(n)){if(!r(e))continue;const n=s(e);for(let o=0;o<t.style.length;o++){const r=t.style[o];n.has(r)||e.style.setProperty(r,t.style.getPropertyValue(r),t.style.getPropertyPriority(r))}}}}}catch{}}const mt="@lexical/html/DOM",gt=Symbol.for("@lexical/html/DOMExportContext"),yt="@lexical/html/DOMImport",xt=Symbol.for("@lexical/html/DOMImportContext"),St=()=>!0;function $t(t,e,n){return pt(gt,t,e,n)}const vt=/* @__PURE__ */$t("root",Boolean),Ct=/* @__PURE__ */$t("isExport",Boolean);function bt(t){const e=J(t,mt);return e?e.output.defaults:void 0}function kt(t,n=e()){return nt(function(t){return rt(gt,t)||bt(t)}(n),t)}function wt(t){const e=J(t,mt);return e?e.output.runtime:void 0}function Dt(t,n,o=e()){const r=wt(o);r&&r.setContextValue(t,n)}function Ot(t,n,o=e()){const r=wt(o);r&&r.setContextValue(t,n(nt(r.editorContext,t)))}function At(t=e()){const n=wt(t);return n?n.getSessionConfig():s(t)}const Mt=/* @__PURE__ */ft(gt,bt);function Et(t,e,n){return{...e,...n,nodes:t}}function Nt(t){return e=>e instanceof t}function It(t,{nodes:e}){if("*"===e)return St;let n={};const o=[];for(const r of e)if("getType"in r){const e=r.getType();if(n){const o=t.get(e);void 0===o&&tt(339,r.name,e);for(const t of o)n[t]=!0}o.push(Nt(r))}else n=void 0,o.push(r);return n||(1===o.length?o[0]:t=>{for(const e of o)if(e(t))return!0;return!1})}function Wt(t){return(e,n,o)=>t(e,o)}function Rt(t){return(e,n,o,r)=>t(e,n,r)}function Tt(t){return(e,n,o,r,s)=>t(e,n,o,s)}function Ft(t){return(e,n,o,r,s,i)=>t(e,n,o,r,i)}function zt(t,e){return(n,o)=>{const r=()=>t(n,o),s=e(n);return s?s(n,r,o):r()}}function Pt(t,e){return(n,o,r)=>{const s=()=>t(n,o,r),i=e(n);return i?i(n,o,s,r):s()}}const jt=Pt,_t=Rt;function Lt(t,e){return(n,o,r,s)=>{const i=()=>t(n,o,r,s),c=e(n);return c?c(n,o,r,i,s):i()}}function Bt(t,e){return(n,o,r,s,i)=>{const c=()=>t(n,o,r,s,i),l=e(n);return l?l(n,o,r,s,c,i):c()}}function Ut(t,e){return(n,o,r,s)=>{t(n,o,r,s);const i=e(n);i&&i(n,o,r,s)}}function Vt(t,e,n,o,r){let s=n[e];for(const n of t[e])if("function"==typeof n[0]){const[t,e]=n;s=o(s,n=>t(n)&&e||void 0)}else{const t=n[1],e={};for(const n in t){const r=t[n];r&&(e[n]=r.reduce((t,e)=>o(t,()=>e),s))}s=o(s,t=>{const n=e[t.getType()];return n&&r(n)})}n[e]=s}function qt(t,e,n,o){if(!o)return;const r=t[e];if("function"==typeof n)r.push([n,o]);else{const t=r[r.length-1];let e;t&&"types"===t[0]?e=t[1]:(e={},r.push(["types",e]));for(const t in n){const n=e[t]||[];e[t]=n,n.push(o)}}}function Gt(t){return"*"===t.nodes}function Ht(t){return t}function Jt(t,{overrides:e}){const n=function(t,e){const n=c(Q(t).nodes),o={$createDOM:[],$decorateDOM:[],$exportDOM:[],$extractWithChild:[],$getDOMSlot:[],$getSlotTargetElement:[],$shouldExclude:[],$shouldInclude:[],$updateDOM:[]};for(const t of function(t){const e=[],n=[],o=[];for(const r of t)if(Gt(r))e.push(r);else if(Array.isArray(r.nodes))for(const t of r.nodes)l(t.prototype)?o.push(1===r.nodes.length?r:{...r,nodes:[t]}):n.push(1===r.nodes.length?r:{...r,nodes:[t]});const r=new Map,s=t=>{let e=r.get(t);if(void 0===e){e=-1;for(const n of u(t))e++;r.set(t,e)}return e};return o.sort((t,e)=>s(t.nodes[0])-s(e.nodes[0])),[...o,...n,...e]}(e)){const e=It(n,t);for(const n in o)qt(o,n,e,t[n])}return o}(t,e),o={...i,...t.dom};return Vt(n,"$createDOM",o,zt,Wt),Vt(n,"$exportDOM",o,zt,Wt),Vt(n,"$extractWithChild",o,Bt,Ft),Vt(n,"$getDOMSlot",o,jt,_t),Vt(n,"$shouldExclude",o,Pt,Rt),Vt(n,"$shouldInclude",o,Pt,Rt),Vt(n,"$getSlotTargetElement",o,Lt,Tt),Vt(n,"$updateDOM",o,Lt,Tt),Vt(n,"$decorateDOM",o,Ut,Ht),o}function Qt(t){return{get:e=>nt(t,e)}}function Kt(t){const e=Object.create(null);return it(t,e)||e}function Yt(t,e){const n=Qt(e);return t.filter(t=>!(t.disabledForEditor&&t.disabledForEditor(n)))}function Zt(t){if("*"===t.nodes)return()=>!0;const e=t.nodes.map(t=>{const e=t;return l(e.prototype)?t=>t instanceof e:t});return t=>e.some(e=>e(t))}class Xt{editor;initialEditorConfig;overrides;editorContext;hasSessionGates;installed;sessionCache=(()=>new Map)();constructor(t,e,n,o){this.editor=t,this.initialEditorConfig=e,this.overrides=n,this.editorContext=o,this.installed=Yt(n,o),this.hasSessionGates=n.some(t=>t.disabledForSession)}setContextValue(t,e){const n=this.installed;this.editorContext[t.key]=e;const o=Yt(this.overrides,this.editorContext);if(function(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}(n,o))return;const r=function(t,e){const n=new Set(t),o=new Set(e),r=[];for(const e of t)o.has(e)||r.push(e);for(const t of e)n.has(t)||r.push(t);return r}(n,o);this.installed=o,this.sessionCache.clear();const s=Jt(this.initialEditorConfig,{overrides:o});this.editor._config.dom=s;const i=function(t){const e=[];for(const n of t)(n.$createDOM||n.$getDOMSlot||n.$decorateDOM)&&e.push(Zt(n));return 0===e.length?null:t=>e.some(e=>e(t))}(r);if(!i)return;const c=s.$updateDOM;s.$updateDOM=(t,e,n,o)=>!!i(t)||c(t,e,n,o),this.editor.update(a,{discrete:!0}),s.$updateDOM=c}getSessionConfig(){const t=this.editor._config.dom||i;if(!this.hasSessionGates)return t;const e=Qt(rt(gt,this.editor)||this.editorContext),n=[],o=[];if(this.installed.forEach((t,r)=>{t.disabledForSession&&t.disabledForSession(e)?n.push(String(r)):o.push(t)}),0===n.length)return t;const r=n.join(",");let s=this.sessionCache.get(r);return s||(s=Jt(this.initialEditorConfig,{overrides:o}),this.sessionCache.set(r,s)),s}}const te={build(t,e,n){const{initialEditorConfig:o}=n.getInitResult(),r=Kt(e.contextDefaults);return{defaults:r,runtime:new Xt(t,o,e.overrides,r)}},config:{contextDefaults:[],overrides:[]},html:{export:new Map([[p,()=>{const t=d().createElement("div");return t.role="textbox",{element:t}}]])},init(t,e){const n={dom:t.dom,nodes:t.nodes},o=Kt(e.contextDefaults),r=Yt(e.overrides,o);return t.dom=Jt(t,{overrides:r}),{initialEditorConfig:n}},mergeConfig(t,e){const n=f(t,e);for(const o of["overrides","contextDefaults"])e[o]&&(n[o]=[...t[o],...e[o]]);return n},name:mt},ee=Symbol.for("@lexical/html/SelectorImpl");function ne(t,e){const n={kind:"element",predicate:(o=e,0===o.length?r:1===o.length?o[0]:(t,e)=>{for(const n of o)if(!n(t,e))return!1;return!0}),tags:t};var o;const s=n=>ne(t,[...e,n]);return{[ee]:n,attr:(t,e,n)=>s(se(t,e,n)),classAll:(...t)=>s(re(t)),classAny:(...t)=>s(function(t){const e=oe(t);return 0===e.length?()=>!1:t=>{if(!r(t))return!1;const n=t.classList;for(const t of e)if(n.contains(t))return!0;return!1}}(t)),styleAny:(t,e,n)=>s(function(t,e,n){if("string"==typeof e)return n=>r(n)&&n.style.getPropertyValue(t)===e;if(e instanceof RegExp){const o=n&&n.capture,s=e;return(e,n)=>{if(!r(e))return!1;const i=e.style.getPropertyValue(t);if(!i)return!1;const c=i.match(s);return null!==c&&(void 0!==o&&(n[o]=c),!0)}}tt(362,JSON.stringify(t))}(t,e,n))}}function oe(t){const e=[];for(const n of t)n&&e.push(n);return e}function re(t){const e=oe(t);return 0===e.length?()=>!0:t=>{if(!r(t))return!1;const n=t.classList;for(const t of e)if(!n.contains(t))return!1;return!0}}function se(t,e,n){if(!0===e)return e=>r(e)&&e.hasAttribute(t);if("string"==typeof e)return n=>r(n)&&n.getAttribute(t)===e;if(e instanceof RegExp){const o=n&&n.capture,s=e;return(e,n)=>{if(!r(e))return!1;const i=e.getAttribute(t);if(null==i)return!1;const c=i.match(s);return null!==c&&(void 0!==o&&(n[o]=c),!0)}}tt(361,JSON.stringify(t))}function ie(t){return{[ee]:t}}const ce=/* @__PURE__ */ie({kind:"text",predicate:h,tags:new Set}),le=/* @__PURE__ */ie({kind:"comment",predicate:t=>8===t.nodeType,tags:new Set});function ue(){return ne(new Set,[])}function ae(){return le}function fe(...t){t.length>0||tt(363);const e=new Set;for(const n of t)e.add(n.toUpperCase());return ne(e,[])}function pe(){return ce}const de={any:ue,comment:ae,tag:fe,text:pe};function he(t,e){return r(t)&&t.nodeName===e.toUpperCase()}const me=/[A-Za-z0-9_-]/;class ge{constructor(t,e){this.source=t,this.pos=e}peek(t=0){return this.source[this.pos+t]||""}consume(){return this.source[this.pos++]||""}eof(){return this.pos>=this.source.length}skipWhitespace(){for(;!this.eof()&&/\s/.test(this.peek());)this.pos++}readIdent(){const t=this.pos;for(;!this.eof()&&me.test(this.peek());)this.pos++;return this.source.slice(t,this.pos)}readQuoted(){const t=this.consume();this.assert('"'===t||"'"===t,"expected quote");const e=this.pos;for(;!this.eof()&&this.peek()!==t;)"\\"===this.peek()?this.pos+=2:this.pos++;this.assert(!this.eof(),"unterminated string");const n=this.source.slice(e,this.pos);return this.pos++,n.replace(/\\(.)/g,"$1")}assert(t,e){t||tt(364,String(this.pos+1),e,this.source)}}function ye(t){const e=new Set,n=[],o=[];let r=!1;if(t.skipWhitespace(),"*"===t.peek())t.consume(),r=!0;else if(me.test(t.peek())){const n=t.readIdent();n&&e.add(n.toUpperCase())}for(;!t.eof();){const e=t.peek();if("."===e){t.consume();const e=t.readIdent();t.assert(""!==e,'expected class name after "."'),o.push(e)}else if("#"===e){t.consume();const e=t.readIdent();t.assert(""!==e,'expected id after "#"'),n.push(se("id",e))}else{if("["!==e)break;{t.consume(),t.skipWhitespace();const e=t.readIdent();t.assert(""!==e,'expected attribute name after "["'),t.skipWhitespace();let o=!0;if("="===t.peek()){t.consume(),t.skipWhitespace();const e=t.peek();'"'===e||"'"===e?o=t.readQuoted():(o=t.readIdent(),t.assert(""!==o,"expected attribute value")),t.skipWhitespace()}t.assert("]"===t.peek(),'expected "]"'),t.consume(),n.push(se(e,o))}}}return o.length>0&&n.push(re(o)),t.assert(r||e.size>0||n.length>0,"expected a selector"),{predicates:n,tags:e}}function xe(t){const e=new ge(t,0),n=[];for(;n.push(ye(e)),e.skipWhitespace(),!e.eof();)e.assert(","===e.peek(),'expected "," (selector lists are the only supported combinator)'),e.consume(),e.skipWhitespace();if(1===n.length)return ne(n[0].tags,n[0].predicates);const o=new Set;if(n.every(t=>t.tags.size>0))for(const t of n)for(const e of t.tags)o.add(e);return ne(o,[(t,e)=>{for(const o of n){const n=t.nodeName;if(o.tags.size>0&&!o.tags.has(n))continue;let r=!0;for(const n of o.predicates)if(!n(t,e)){r=!1;break}if(r)return!0}return!1}])}function Se(t,e,n){return pt(xt,t,e,n)}const $e=/* @__PURE__ */Se("importSource",()=>"unknown"),ve=/* @__PURE__ */Se("importSourceDataTransfer",()=>null),Ce=/* @__PURE__ */Se("textFormat",()=>0),be=/* @__PURE__ */Se("textStyle",()=>({}));function ke(t){if(!r(t))return!1;if("PRE"===t.nodeName)return!0;const e=t.style.whiteSpace;return"string"==typeof e&&e.startsWith("pre")}function we(t){if(h(t))return!0;if(!r(t))return!1;const e=t.style.display;return e?e.startsWith("inline"):!m(t)&&g(t)}const De=/* @__PURE__ */Se("whitespaceConfig",()=>({isInline:we,preservesWhitespace:ke})),Oe=/* @__PURE__ */Se("importOverlays",()=>[]);class Ae{constructor(t){this.record=t}get(t){return nt(this.record,t)}set(t,e){this.record[t.key]=e}update(t,e){this.record[t.key]=e(nt(this.record,t))}has(t){return Object.prototype.hasOwnProperty.call(this.record,t.key)}}function Me(t){const e=J(t,yt);return e?e.output.defaults:void 0}function Ee(t,n=e()){return nt(function(t){return rt(xt,t)||Me(t)}(n),t)}const Ne=/* @__PURE__ */ft(xt,Me);function Ie(t){return x(t)||S(t)&&!t.isInline()}function We(t,e){const n=[];let o=[];const r=()=>{0!==o.length&&(n.push(e().splice(0,0,o)),o=[])};for(const s of t)if(Ie(s)){if(r(),y(s)){const t=We(s.getChildren(),e);s.splice(0,s.getChildrenSize(),t)}n.push(s)}else o.push(s);return r(),n}function Re(t,e){if(!r(e))return t;const n=e.style.textAlign;if(!Be(n))return t;for(const e of t)x(e)&&""===e.getFormatType()&&e.setFormat(n);return t}function Te(t,e,n){1===t.length&&$(t[0])&&(t=[]);const o=v();if(r(n)){const t=n.style.textAlign;Be(t)&&o.setFormat(t)}return[o.splice(0,0,t)]}const Fe={$accepts:Ie,$packageRun:Te,name:"BlockSchema"},ze={$accepts:t=>!Ie(t),name:"InlineSchema"},Pe={$accepts:Ie,$packageRun:t=>t,name:"NestedBlockSchema"},je={$accepts:Ie,$packageRun:Te,name:"RootSchema"},_e=de,Le=new Set(["center","end","justify","left","right","start"]);function Be(t){return Le.has(t)}const Ue={B:{fontWeight:"bold"},EM:{fontStyle:"italic"},I:{fontStyle:"italic"},S:{textDecoration:"line-through"},STRONG:{fontWeight:"bold"},SUB:{verticalAlign:"sub"},SUP:{verticalAlign:"super"},U:{textDecoration:"underline"}},Ve={CODE:j,MARK:P},qe=new Set(["font-weight","font-style","text-decoration","text-transform","vertical-align"]),Ge={$import:(t,e)=>{const n=t.get(Ce),o=Ue[e.nodeName],r=function(t){return{fontStyle:t.style.fontStyle,fontWeight:t.style.fontWeight,textDecoration:t.style.textDecoration,textTransform:t.style.textTransform,verticalAlign:t.style.verticalAlign}}(e);var s,i;let c=n&~(l=function(t){let e=0,n=0;const{fontWeight:o,fontStyle:r,textDecoration:s,textTransform:i,verticalAlign:c}=t;if("700"===o||"bold"===o?e|=N:"normal"!==o&&"400"!==o||(n|=N),"italic"===r?e|=I:"normal"===r&&(n|=I),s){const t=s.split(" ");t.includes("underline")&&(e|=W),t.includes("line-through")&&(e|=R),t.includes("none")&&(n|=W|R)}return"lowercase"===i?(e|=T.lowercase,n|=T.uppercase|T.capitalize):"uppercase"===i?(e|=T.uppercase,n|=T.lowercase|T.capitalize):"capitalize"===i?(e|=T.capitalize,n|=T.lowercase|T.uppercase):"none"===i&&(n|=T.lowercase|T.uppercase|T.capitalize),"sub"===c?(e|=F,n|=z):"super"===c?(e|=z,n|=F):"baseline"===c&&(n|=F|z),{clear:n,set:e}}(o?(s=o,{fontStyle:(i=r).fontStyle||s.fontStyle,fontWeight:i.fontWeight||s.fontWeight,textDecoration:i.textDecoration||s.textDecoration,textTransform:i.textTransform||s.textTransform,verticalAlign:i.verticalAlign||s.verticalAlign}):r)).clear|l.set;var l;const u=Ve[e.nodeName];return u&&(c|=u),c===n?t.$importChildren(e):t.$importChildren(e,{context:[lt(Ce,c)]})},match:/* @__PURE__ */_e.tag("b","strong","em","i","code","mark","s","sub","sup","u","span"),name:"@lexical/html/inline-format"};function He(t,e,n){let o=t;for(;;){let t=null;for(;null===(t=e?o.nextSibling:o.previousSibling);){const t=o.parentNode;if(null===t)return null;o=t}if(o=t,!n.isInline(o))return null;let r=o;for(;null!==(r=e?o.firstChild:o.lastChild);)o=r;if(h(o))return o;if("BR"===o.nodeName)return null}}function Je(t,e){return 0!==e&&E(t)?t.setFormat(e):t}function Qe(t,e){if(E(t)){const n=function(t){let e="";for(const n in t)qe.has(n)||(e+=`${n}: ${t[n]}; `);return e.trimEnd()}(e);""!==n&&t.setStyle(n)}return t}const Ke={$import:(t,e)=>{const n=t.get(Ce),o=t.get(be),r=t.get(De);if(function(t,e){let n=t.parentNode;for(;null!==n;){if(e.preservesWhitespace(n))return!0;n=n.parentNode}return!1}(e,r)){const t=w(e.textContent||"");for(const e of t)Je(e,n),Qe(e,o);return t}const s=function(t,e){let n=(t.textContent||"").replace(/\r/g,"").replace(/[ \t\n]+/g," ");if(0===n.length)return"";if(" "===n[0]){let o=t,r=!0;for(;null!==o&&null!==(o=He(o,!1,e));){const t=o.textContent||"";if(t.length>0){/[ \t\n]$/.test(t)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(n.length>0&&" "===n[n.length-1]){let o=t,r=!0;for(;null!==o&&null!==(o=He(o,!0,e));)if((o.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){r=!1;break}r&&(n=n.slice(0,-1))}return n}(e,r);if(""===s)return[];const i=D(s);return Je(i,n),Qe(i,o),[i]},match:/* @__PURE__ */_e.text(),name:"@lexical/html/#text"},Ye={$import:()=>[],match:/* @__PURE__ */_e.tag("script","style"),name:"@lexical/html/script-style-ignore"},Ze={$import:(t,e)=>O(e)||A(e)?[]:[M()],match:/* @__PURE__ */_e.tag("br"),name:"@lexical/html/br"},Xe={$import:(t,e)=>{const n=v();if(C(n,e),b(e,n),""===n.getFormatType()){const t=e.getAttribute("align");t&&Be(t)&&n.setFormat(t)}return k(n,e),[n.splice(0,0,t.$importChildren(e))]},match:/* @__PURE__ */_e.tag("p"),name:"@lexical/html/p"},tn={$import:(t,n,o)=>e().hasNode(K)?[Y()]:o(),match:/* @__PURE__ */_e.tag("hr"),name:"@lexical/html/hr"},en=[Ye,Xe,tn,{$import:(t,e,n)=>m(e)?Re(t.$importChildren(e,{schema:Fe}),e):n(),match:/* @__PURE__ */_e.any(),name:"@lexical/html/transparent-block"},Ke,Ze,Ge];function nn(t,e){const n=[];let o=0,r=0;for(;o<t.length&&r<e.length;)t[o]<=e[r]?n.push(t[o++]):n.push(e[r++]);for(;o<t.length;)n.push(t[o++]);for(;r<e.length;)n.push(e[r++]);return n}function on(t){const e=[],n=new Map,o=[],r=[],s=[],i=new Set;t.forEach((t,c)=>{const l=function(t){const e=t[ee];return void 0===e&&tt(360),e}(t.match),u=t.name||function(t,e){if("text"===t.kind)return`#text@${e}`;if("comment"===t.kind)return`#comment@${e}`;if(0===t.tags.size)return`*@${e}`;return`${Array.from(t.tags).join(",").toLowerCase()}@${e}`}(l,c);if(t.name&&i.add(t.name),e.push({$import:t.$import,name:u,predicate:l.predicate}),"text"===l.kind)r.push(c);else if("comment"===l.kind)s.push(c);else if(0===l.tags.size)o.push(c);else for(const t of l.tags){let e=n.get(t);e||(e=[],n.set(t,e)),e.push(c)}});const c=new Map;if(0===o.length)for(const[t,e]of n)c.set(t,e);else for(const[t,e]of n)c.set(t,nn(e,o));return{byTag:c,commentIndices:s,rules:e,textIndices:r,wildcardIndices:o}}function rn(t,e){return h(e)?t.textIndices:8===e.nodeType?t.commentIndices:r(e)?t.byTag.get(e.nodeName)||t.wildcardIndices:sn}const sn=/* @__PURE__ */Object.freeze([]);function cn(t){const e=[];for(const n of t)if(ln(n))for(const t of n.rules)e.push(t);else e.push(n);return e}function ln(t){return"object"==typeof t&&null!==t&&"__type"in t&&"CompiledOverlayRules"===t.__type}function un(t){const e=cn(t);return{__type:"CompiledOverlayRules",dispatch:on(e),rules:e}}const an=/* @__PURE__ */Object.freeze({});function fn(t,e){const n={$importChildren:(e,n)=>function(t,e,n){const o=n&&n.rules?n.rules.dispatch:void 0;o&&t.overlays.push(o);try{const o=()=>pn(t,e,n);return n&&n.context?Ne(n.context,t.editor)(o):o()}finally{o&&t.overlays.pop()}}(t,e,n),$importOne:(e,n)=>dn(t,e,n),captures:e,get:e=>Ee(e,t.editor),session:t.session};return n}function pn(t,e,n){const o=n&&n.$onChild,r=[];for(const n of Array.from(e.childNodes)){const e=dn(t,n,void 0);for(const t of e){const e=o?o(t):t;null!=e&&r.push(e)}}const s=n&&n.$after?n.$after(r):r,i=n&&n.schema;return i?function(t,e,n,o){const r=[];let s=null;const i=()=>{if(null===s)return;const e=s;if(s=null,t.$packageRun){const s=t.$packageRun(e,n,o);if(s.length>0){for(const t of s)r.push(t);return}}if("hoist"===t.onReject)for(const t of e)r.push(t)};for(const o of e)t.$accepts(o,n)?(i(),r.push(o)):(null===s&&(s=[]),s.push(o));return i(),t.$finalize?t.$finalize(r,n):r}(i,s,null,e):s}function dn(t,e,n){const o=()=>function(t,e){const n=function(t,e){const n=[];for(let o=t.overlays.length-1;o>=0;o--){const r=t.overlays[o],s=rn(r,e);s.length>0&&n.push({dispatch:r,indices:s})}const o=rn(t.dispatch,e);return o.length>0&&n.push({dispatch:t.dispatch,indices:o}),n}(t,e);if(0===n.length)return hn(t,e);let o=0,r=0;const s=()=>{for(;o<n.length;){const{dispatch:i,indices:c}=n[o];for(;r<c.length;){const n=c[r++],o=i.rules[n],l={};if(o.predicate(e,l)){const n=fn(t,0===Object.keys(l).length?an:l);try{return o.$import(n,e,s)}catch(t){throw t}}}o++,r=0}return hn(t,e)};return s()}(t,e);return n&&n.context?Ne(n.context,t.editor)(o):o()}function hn(t,e){if(0===e.childNodes.length)return[];const n=[];for(const o of Array.from(e.childNodes)){const e=dn(t,o,void 0);for(const t of e)n.push(t)}return n}const mn={$import:(t,e)=>t.$importChildren(e),match:/* @__PURE__ */de.any(),name:"@lexical/html/default-hoist"},gn={build(t,e){const n=on(cn(e.rules)),r=it(e.contextDefaults,void 0),s=e.preprocess;return{$generateNodesFromDOM:(e,i)=>{const c=rt(xt,t)||r,l=i&&i.context?it(i.context,c):c,u=void 0!==l&&l!==c?l:Object.create(c||null),a=new Ae(u),f={session:a};return function(t,e,n){let o=t.length-1;const r=()=>{for(;o>=0;)return void(0,t[o--])(e,n,r)};r()}(i&&i.preprocess?[...s,...i.preprocess]:s,e,f),at(xt,u,()=>function(t,e,n,r){return pn({dispatch:t,editor:e,overlays:r.get(Oe).map(t=>t.dispatch),session:r},o(n)?n.body:n,{schema:je})}(n,t,e,a),t)},defaults:r}},config:{contextDefaults:[],preprocess:[dt],rules:[mn]},mergeConfig:(t,e)=>f(t,{...e,...e.contextDefaults&&{contextDefaults:[...t.contextDefaults,...e.contextDefaults]},...e.preprocess&&{preprocess:[...t.preprocess,...e.preprocess]},...e.rules&&{rules:[...e.rules,...t.rules]}}),name:yt};function yn(t,e){return X(gn).$generateNodesFromDOM(t,e)}const xn={dependencies:[[gn,{rules:en}]],name:"@lexical/html/CoreImport"};function Sn(t){return t}const $n=[tn],vn={dependencies:[Z,xn],name:"@lexical/html/HorizontalRuleImport"},Cn={any:ue,comment:ae,css:xe,tag:fe,text:pe},bn=new Set(["STYLE","SCRIPT"]);function kn(t,e){ht(e);const n=o(e)?e.body.childNodes:e.childNodes,r=[],s=[];for(const e of n)if(!bn.has(e.nodeName)){const n=En(e,t,s,!1);if(null!==n)for(const t of n)r.push(t)}return function(t){for(const e of t)e.getParent()&&e.getNextSibling()instanceof G&&e.insertAfter(M());for(const e of t){const t=e.getParent();t&&t.splice(e.getIndexWithinParent(),1,e.getChildren())}}(s),r}function wn(t,n=null,o=e()){return Mt([lt(Ct,!0)],o)(()=>{const e=_(),r=At(o),s=L(n),i=t.append.bind(t);for(const t of(y(s)?s:e).getChildren())An(o,t,i,n,r);return t})}function Dn(t,n=_()){const o=e();return Mt([lt(Ct,!0),lt(vt,!0)],o)(()=>{const e=At(o),r=t.append.bind(t);return An(o,n,r,null,e),t})}function On(t,e=null){return("undefined"==typeof document||"undefined"==typeof window&&void 0===global.window)&&tt(338),B(t),wn(d().createElement("div"),e,t).innerHTML}function An(e,n,o,i=null,c=s(e)){let l=c.$shouldInclude(n,i,e);const u=c.$shouldExclude(n,i,e);let a=n;null!==i&&E(n)&&(a=t(i,n,"clone"));const f=c.$exportDOM(a,e),{element:p,after:h,append:g,$getChildNodes:x}=f;if(!p)return!1;const S=d().createDocumentFragment(),v=x?x():y(a)?a.getChildren():[],C=l&&U(i)&&y(n)?null:i,b=S.append.bind(S);let k=null;for(const t of v){const o=An(e,t,b,C,c);o&&(k=t),!l&&o&&c.$extractWithChild(n,t,i,"html",e)&&(l=!0)}if(l&&!u){if((r(p)||V(p))&&(g?g(S):p.append(S),function(t,e){const n=t.lastChild;if($(e)&&r(t)&&m(t)&&null!==n&&"BR"===n.nodeName){const e=d().createElement("br");e.setAttribute("data-lexical-managed-linebreak","true"),t.append(e)}}(p,k)),V(p)){if(h){const t=h.call(a,p);t&&p.replaceChildren(t)}o(p)}else if(o(p),h){const t=h.call(a,p);t&&p.replaceWith(t)}}else o(S);return l}function Mn(t,e,n,o=null){return An(t,e,n.append.bind(n),o,At(t))}function En(t,e,n,o,r=new Map,s){const i=[];if(bn.has(t.nodeName))return i;let c=null;const l=function(t,e){const{nodeName:n}=t,o=e._htmlConversions.get(n.toLowerCase());let r=null;if(void 0!==o)for(const e of o){const n=e(t);null!==n&&(null===r||(r.priority||0)<=(n.priority||0))&&(r=n)}return null!==r?r.conversion:null}(t,e),u=l?l(t):null;let a=null;if(null!==u){a=u.after;const e=u.node;if(c=Array.isArray(e)?e[e.length-1]:e,null!==c){for(const[,t]of r)if(c=t(c,s),!c)break;c&&i.push(...Array.isArray(e)?e:[c])}null!=u.forChild&&r.set(t.nodeName,u.forChild)}const f=t.childNodes;let p=[];const d=(null==c||!q(c))&&(null!=c&&x(c)||o);for(let t=0;t<f.length;t++)p.push(...En(f[t],e,n,d,new Map(r),c));if(null!=a&&(p=a(p)),m(t)&&(p=function(t,e,n){const o=t.style.textAlign,r=[];let s=[];for(let t=0;t<e.length;t++){const i=e[t];if(x(i))o&&!i.getFormat()&&i.setFormat(o),r.push(i);else if(s.push(i),t===e.length-1||t<e.length-1&&x(e[t+1])){const t=n();t.setFormat(o),t.append(...s),r.push(t),s=[]}}return r}(t,p,d?()=>{const t=new G;return n.push(t),t}:v)),null==c)if(p.length>0)for(const t of p)i.push(t);else m(t)&&function(t){return null!=t.nextSibling&&null!=t.previousSibling&&(g(t.nextSibling)&&g(t.previousSibling))}(t)&&i.push(M());else y(c)&&c.append(...p);return i}export{Mn as $appendNodeToHTML,We as $distributeInlineWrapper,wn as $generateDOMFromNodes,Dn as $generateDOMFromRoot,On as $generateHtmlFromNodes,kn as $generateNodesFromDOM,yn as $generateNodesFromDOMViaExtension,Ee as $getImportContextValue,kt as $getRenderContextValue,At as $getSessionDOMRenderConfig,dt as $inlineStylesFromStyleSheets,Ie as $isBlockLevel,Re as $propagateTextAlignToBlockChildren,Dt as $setRenderContextValue,Ot as $updateRenderContextValue,Ne as $withImportContext,Mt as $withRenderContext,Fe as BlockSchema,xn as CoreImportExtension,en as CoreImportRules,gn as DOMImportExtension,te as DOMRenderExtension,vn as HorizontalRuleImportExtension,$n as HorizontalRuleImportRules,Oe as ImportOverlays,$e as ImportSource,ve as ImportSourceDataTransfer,Ce as ImportTextFormat,be as ImportTextStyle,De as ImportWhitespaceConfig,ze as InlineSchema,Pe as NestedBlockSchema,Ct as RenderContextExport,vt as RenderContextRoot,je as RootSchema,ut as contextUpdater,lt as contextValue,Se as createImportState,$t as createRenderState,we as defaultIsInline,ke as defaultPreservesWhitespace,Sn as defineImportRule,un as defineOverlayRules,Et as domOverride,he as isElementOfTag,xe as parseSelector,Cn as sel};
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "html"
9
9
  ],
10
10
  "license": "MIT",
11
- "version": "0.51.0",
11
+ "version": "0.51.1-nightly.20260921.0",
12
12
  "main": "./dist/LexicalHtml.js",
13
13
  "types": "./dist/typescript-too-old.d.ts",
14
14
  "repository": {
@@ -17,11 +17,11 @@
17
17
  "directory": "packages/lexical-html"
18
18
  },
19
19
  "dependencies": {
20
- "@lexical/extension": "0.51.0",
21
- "@lexical/internal": "0.51.0",
22
- "@lexical/selection": "0.51.0",
23
- "@lexical/utils": "0.51.0",
24
- "lexical": "0.51.0"
20
+ "@lexical/extension": "0.51.1-nightly.20260921.0",
21
+ "@lexical/internal": "0.51.1-nightly.20260921.0",
22
+ "@lexical/selection": "0.51.1-nightly.20260921.0",
23
+ "@lexical/utils": "0.51.1-nightly.20260921.0",
24
+ "lexical": "0.51.1-nightly.20260921.0"
25
25
  },
26
26
  "module": "./dist/LexicalHtml.js",
27
27
  "sideEffects": false,