efficient-easel 19.0.0 → 19.2.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.
Files changed (48) hide show
  1. package/dist/chrome/chrome.css +11 -0
  2. package/dist/{chunk-4ES5JGGX.js → chunk-3Z2MVLCD.js} +1 -1
  3. package/dist/chunk-45NZSAND.js +2 -0
  4. package/dist/{chunk-WMQKV3DK.js → chunk-6U6AISPX.js} +4 -4
  5. package/dist/{chunk-6DNDTEF6.js → chunk-BQMZ2YAF.js} +1 -1
  6. package/dist/chunk-EFQCH7CO.js +1 -0
  7. package/dist/chunk-I2BCNLLV.js +5 -0
  8. package/dist/chunk-LFHMDGLE.js +8 -0
  9. package/dist/chunk-LOXB5OVK.js +63 -0
  10. package/dist/chunk-OD4WIIER.js +1 -0
  11. package/dist/{chunk-CM732ENS.js → chunk-RTCNJRF6.js} +1 -1
  12. package/dist/chunk-UAS2LEW2.js +1 -0
  13. package/dist/chunk-UZXGXMNO.js +14 -0
  14. package/dist/{chunk-5ZBV5RA6.js → chunk-ZFFWO2AF.js} +16 -16
  15. package/dist/copy/index.js +13 -13
  16. package/dist/easel/index.d.ts +13 -0
  17. package/dist/easel/index.js +1 -1
  18. package/dist/fields/index.js +1 -1
  19. package/dist/panel/index.d.ts +93 -1
  20. package/dist/panel/index.js +15 -13
  21. package/dist/panel/panel.css +12 -0
  22. package/dist/screen/components/AddBlockRow.js +1 -1
  23. package/dist/screen/components/AddSidePanel.js +1 -1
  24. package/dist/screen/components/NodeContextMenu.js +1 -1
  25. package/dist/screen/components/ScreenChrome.js +1 -1
  26. package/dist/screen/components/ScreenMount.js +1 -1
  27. package/dist/screen/components/ScreenStoreProvider.d.ts +3 -1
  28. package/dist/screen/components/ScreenStoreProvider.js +1 -1
  29. package/dist/screen/components/SectionScreenShell.js +17 -17
  30. package/dist/screen/components/usePartBridge.js +1 -1
  31. package/dist/screen/index.js +1 -1
  32. package/dist/screen/lib/key-scope.js +1 -1
  33. package/dist/screen/lib/puck/preview-dom.js +1 -1
  34. package/dist/screen/lib/puck/style-clipboard.js +1 -1
  35. package/dist/screen/lib/puck/use-section-ops.js +1 -1
  36. package/dist/screen/lib/screen-parts.js +1 -1
  37. package/dist/screen/screen.css +9 -0
  38. package/dist/strings/index.js +2 -2
  39. package/dist/text-styles/index.js +20 -20
  40. package/package.json +1 -1
  41. package/dist/chunk-324PHMLC.js +0 -8
  42. package/dist/chunk-CPFDJMFD.js +0 -14
  43. package/dist/chunk-EZKUTVQP.js +0 -62
  44. package/dist/chunk-J4MHNAED.js +0 -5
  45. package/dist/chunk-JC34NH4G.js +0 -1
  46. package/dist/chunk-LUBJKUVV.js +0 -1
  47. package/dist/chunk-SP3TRDKA.js +0 -2
  48. package/dist/chunk-T5WDR5IE.js +0 -1
@@ -1,4 +1,4 @@
1
- import{TEXT_STYLE_CASES as e}from"../chunk-YHZSBL2N.js";import{selectionToVisible as t,selectionToSource as n,richLayout as r,createHistory as l,colorRunOf as o,textRange as a,selectionBox as s,placeWindow as c,offsetOrigin as i,visibleArea as u,ColorWindow as d,markPress as p,pasteToMarkup as h,richInput as m,editVisible as f,MARKUP_CLIPBOARD_TYPE as g,markupOfRange as y}from"../chunk-23VM4PMV.js";export{ColorWindow,MARKUP_CLIPBOARD_TYPE,TYPING_BURST_MS,colorRunOf,createHistory,editVisible,markupOfRange,newLine,pasteToMarkup,richInput,richLayout,selectionToSource,selectionToVisible,setBullet,startCanvasTyping,textMap,toSource,toSourceStart,toVisible}from"../chunk-23VM4PMV.js";import{DEFAULT_COPY_WORDS as v}from"../chunk-KRL3IUV3.js";import{FieldNumber as b}from"../chunk-2XMHLXMA.js";import{FieldSelect as k}from"../chunk-G3GWAP5R.js";import"../chunk-WRFD4EXD.js";import{SettingsSwitch as x,SettingsField as S,SettingsSegmented as w}from"../chunk-36LVP5WD.js";import{useWords as E}from"../chunk-MFIRYGHW.js";import{registerModalEscapeInterceptor as C,textToolbarRows as D,TextToolbar as N,textAlignWords as T,useShellStrings as L,textAlignOptions as O,TEXT_ALIGNS as R,LinkPicker as K,Tooltip as M,IconButton as V}from"efficient-shell/ui";export{TextToolbar}from"efficient-shell/ui";import{useRef as j,useState as B,useLayoutEffect as F,useEffect as H,useId as P}from"react";import{RETIRED_MARKS as W,applyMark as $,marksIn as z,STANDARD_MARKUP as I,listIn as q,colorIn as A,spanFor as U,findLink as Y,tokenizeInline as G,colorOver as _,setList as X,unlinkAt as Z,removeLink as J,linkOver as Q,writeLink as ee}from"efficient-shell/markup";import{jsxs as te,jsx as ne,Fragment as re}from"react/jsx-runtime";import{ParagraphSpacingIcon as le,LetterSpacingIcon as oe,LineSpacingIcon as ae,TextSizeIcon as se,StylesIcon as ce,TypeIcon as ie,AlignmentIcon as ue,ListFormatIcon as de,CaseIcon as pe,ItalicIcon as he,NumberedListIcon as me,ListIcon as fe,ListNoneIcon as ge,CaseLowerIcon as ye,CaseCapitalizedIcon as ve,CaseUpperIcon as be,CaseNormalIcon as ke}from"efficient-shell/icons/efficient";function xe(e,t,n,r,l){for(const o of l){if(o.kind!==n)continue;if(!e.startsWith(o.open,t))continue;const l=t+o.open.length;if(e.startsWith(r,l)&&e.startsWith(o.close,l+r.length))return o}return null}function Se({value:e,rules:t=I,className:n,layerRef:r}){const l=function(e,t){const n=[];let r=0;for(const l of G(e,t)){if("text"===l.kind){l.text.length>0&&(n.push({kind:"text",text:e.slice(r,r+l.text.length)}),r+=l.text.length);continue}const o=xe(e,r,l.kind,l.text,t);if(!o)return[{kind:"text",text:e}];const a=r+o.open.length,s=a+l.text.length,c=s+o.close.length;n.push({kind:"delimiter",text:e.slice(r,a)}),n.push({kind:l.kind,text:e.slice(a,s)}),n.push({kind:"delimiter",text:e.slice(s,c)}),r=c}return n.map(e=>e.text).join("")!==e?[{kind:"text",text:e}]:n}(e,t);/* @__PURE__ */
1
+ import{selectionToVisible as e,selectionToSource as t,richLayout as n,createHistory as r,colorRunOf as l,textRange as o,selectionBox as a,placeWindow as s,offsetOrigin as c,visibleArea as i,ColorWindow as u,markPress as d,pasteToMarkup as p,richInput as h,editVisible as m,MARKUP_CLIPBOARD_TYPE as f,markupOfRange as g}from"../chunk-23VM4PMV.js";export{ColorWindow,MARKUP_CLIPBOARD_TYPE,TYPING_BURST_MS,colorRunOf,createHistory,editVisible,markupOfRange,newLine,pasteToMarkup,richInput,richLayout,selectionToSource,selectionToVisible,setBullet,startCanvasTyping,textMap,toSource,toSourceStart,toVisible}from"../chunk-23VM4PMV.js";import{DEFAULT_COPY_WORDS as y}from"../chunk-KRL3IUV3.js";import{FieldNumber as v}from"../chunk-2XMHLXMA.js";import{FieldSelect as b}from"../chunk-G3GWAP5R.js";import"../chunk-WRFD4EXD.js";import{SettingsSwitch as k,SettingsField as x,SettingsSegmented as S}from"../chunk-36LVP5WD.js";import{useWords as w}from"../chunk-MFIRYGHW.js";import{TEXT_STYLE_CASES as E}from"../chunk-YHZSBL2N.js";import{registerModalEscapeInterceptor as C,textToolbarRows as D,TextToolbar as N,textAlignWords as T,useShellStrings as L,textAlignOptions as O,TEXT_ALIGNS as R,LinkPicker as K,Tooltip as M,IconButton as V}from"efficient-shell/ui";export{TextToolbar}from"efficient-shell/ui";import{useRef as j,useState as B,useLayoutEffect as F,useEffect as H,useId as P}from"react";import{RETIRED_MARKS as W,applyMark as $,marksIn as z,STANDARD_MARKUP as I,listIn as q,colorIn as A,spanFor as U,findLink as Y,tokenizeInline as G,colorOver as _,setList as X,unlinkAt as Z,removeLink as J,linkOver as Q,writeLink as ee}from"efficient-shell/markup";import{jsxs as te,jsx as ne,Fragment as re}from"react/jsx-runtime";import{ParagraphSpacingIcon as le,LetterSpacingIcon as oe,LineSpacingIcon as ae,TextSizeIcon as se,StylesIcon as ce,TypeIcon as ie,AlignmentIcon as ue,ListFormatIcon as de,CaseIcon as pe,ItalicIcon as he,NumberedListIcon as me,ListIcon as fe,ListNoneIcon as ge,CaseLowerIcon as ye,CaseCapitalizedIcon as ve,CaseUpperIcon as be,CaseNormalIcon as ke}from"efficient-shell/icons/efficient";function xe(e,t,n,r,l){for(const o of l){if(o.kind!==n)continue;if(!e.startsWith(o.open,t))continue;const l=t+o.open.length;if(e.startsWith(r,l)&&e.startsWith(o.close,l+r.length))return o}return null}function Se({value:e,rules:t=I,className:n,layerRef:r}){const l=function(e,t){const n=[];let r=0;for(const l of G(e,t)){if("text"===l.kind){l.text.length>0&&(n.push({kind:"text",text:e.slice(r,r+l.text.length)}),r+=l.text.length);continue}const o=xe(e,r,l.kind,l.text,t);if(!o)return[{kind:"text",text:e}];const a=r+o.open.length,s=a+l.text.length,c=s+o.close.length;n.push({kind:"delimiter",text:e.slice(r,a)}),n.push({kind:l.kind,text:e.slice(a,s)}),n.push({kind:"delimiter",text:e.slice(s,c)}),r=c}return n.map(e=>e.text).join("")!==e?[{kind:"text",text:e}]:n}(e,t);/* @__PURE__ */
2
2
  return ne("div",{ref:r,className:["es-gold-layer",n??""].filter(Boolean).join(" "),"aria-hidden":"true",children:l.map((e,t)=>function(e,t){const{kind:n,text:r}=e;switch(n){case"delimiter":/* @__PURE__ */
3
3
  return ne("span",{className:"es-gold-delim",children:r},t);case"accent":case"highlight":/* @__PURE__ */
4
4
  return ne("em",{className:"es-gold-mark es-gold-accent",children:r},t);case"bold":/* @__PURE__ */
@@ -10,20 +10,20 @@ return ne("span",{className:"es-gold-text",children:r},t)}}(e,t))})}function we(
10
10
  return te("div",{className:["es-gold",l?"es-gold-is-multiline":"es-gold-is-single",i?"es-gold-is-off":"",a??""].filter(Boolean).join(" "),children:[
11
11
  /* @__PURE__ */ne(Se,{value:e,rules:s,layerRef:d}),o&&""===e?
12
12
  /* @__PURE__ */ne("div",{className:"es-gold-placeholder","aria-hidden":"true",children:o}):null,
13
- /* @__PURE__ */ne("textarea",{ref:u,className:"es-gold-input",disabled:i,value:e,placeholder:o,"aria-label":c,onChange:function(e){h.current=!0,t(e.currentTarget.value)},onFocus:function(){p.current=e,h.current=!1},onBlur:function(){m(e)},onKeyDown:function(t){return"Escape"===t.key?(t.preventDefault(),h.current=!1,void r?.(p.current)):"Enter"!==t.key||l?void 0:(t.preventDefault(),void m(e))},onScroll:function(e){const t=d.current;t&&(t.scrollTop=e.currentTarget.scrollTop,t.scrollLeft=e.currentTarget.scrollLeft)}})]})}function Ee(e,t){const n=t?.selectionStart??e.length;return{start:n,end:t?.selectionEnd??n}}function Ce(e,t,n,r=$){const{start:l,end:o}=Ee(e,n);return r(e,l,o,t)}function De(e,t,n){const{start:r,end:l}=Ee(e,n),o=r+t.length;return{text:e.slice(0,r)+t+e.slice(l),selectionStart:o,selectionEnd:o}}function Ne(e,t,n,r){switch(t){case"bold":return e.createElement("strong");case"italic":return e.createElement("em");case"strike":return e.createElement("s");case"underline":return e.createElement("u");case"sup":return e.createElement("sup");case"sub":return e.createElement("sub");case"color":{const t=e.createElement("span");return t.className="es-rich-color",r&&(t.dataset.color=r,t.title=r.startsWith("#")?r.toUpperCase():r,t.style.color=r.startsWith("#")?r:`var(--es-color-${r}, inherit)`),t}case"link":{const t=e.createElement("a");return t.className="es-rich-link",n&&(t.title=n),t}default:{const n=e.createElement("span");return n.className="highlight"===t||"accent"===t?"es-rich-emphasis":`es-rich-${t}`,n}}}function Te(e,t,n,r){const l=e.layout.lines;if(n===t)return r>=e.lines.length?e.layout.text.length:l[r].vis;const o=e.lines.findIndex(e=>e===n||e.contains(n));if(-1===o)return 0;const a=t.ownerDocument.createRange();a.setStart(e.lines[o],0);try{a.setEnd(n,r)}catch{return l[o].vis}return l[o].vis+Math.min(a.toString().length,l[o].text.length)}function Le(e,t){const n=e.layout.lines;let r=n.length-1;for(let e=0;e<n.length;e+=1)if(t<=n[e].vis+n[e].text.length){r=e;break}let l=Math.max(0,t-n[r].vis);const o=e.lines[r].ownerDocument.createTreeWalker(e.lines[r],4);let a=o.nextNode(),s=null;for(;a;){if(l<=a.data.length)return[a,l];l-=a.data.length,s=a,a=o.nextNode()}return s?[s,s.data.length]:[e.lines[r],0]}function Oe({value:e,rules:l,multiline:o,readOnly:a=!1,placeholder:s,ariaLabel:c,handle:i,onEdit:u,onSelect:d,onHistory:p,onFormat:v,pending:b,onCommit:k,onCancel:x}){const S=j(null),w=j(null),E=j(null),C=j(null),D=j(null),N=j(e),[T,L]=B(0),O=j({value:e,rules:l,multiline:o,readOnly:a,pending:b,onEdit:u,onHistory:p,onFormat:v});O.current={value:e,rules:l,multiline:o,readOnly:a,pending:b,onEdit:u,onHistory:p,onFormat:v};const R=()=>{const e=S.current,t=w.current,n=e?.ownerDocument.getSelection();if(!(e&&t&&n&&0!==n.rangeCount&&n.anchorNode&&e.contains(n.anchorNode)))return null;const r=Te(t,e,n.anchorNode,n.anchorOffset),l=n.focusNode&&e.contains(n.focusNode)?Te(t,e,n.focusNode,n.focusOffset):r;return r<=l?[r,l]:[l,r]},K=(e,t)=>{const n=S.current,r=w.current;if(!n||!r)return;const[l,o]=Le(r,e),[a,s]=Le(r,t);n.ownerDocument.getSelection()?.setBaseAndExtent(l,o,a,s)};i.current={getSource(){const e=R(),t=w.current;if(!e||!t)return null;const[r,l]=n(t.layout,e[0],e[1]);return{start:r,end:l}},setSource(e,t,n){C.current={text:n,src:[e,t]},L(e=>e+1)},focus(){S.current?.focus()},rangeOf(e,n){const r=S.current,l=w.current;if(!r||!l)return null;const[o,a]=t(l.layout,e,n),[s,c]=Le(l,o),[i,u]=Le(l,a),d=r.ownerDocument.createRange();return d.setStart(s,c),d.setEnd(i,u),d}},F(()=>{const n=S.current;if(!n||D.current)return;const o=C.current?null:R();w.current=function(e,t){const n=e.ownerDocument;e.replaceChildren();const r=t.lines.map(t=>{const r=n.createElement("div");r.className=null!=t.number?"es-rich-line is-numbered":t.bullet?"es-rich-line is-bullet":"es-rich-line",null!=t.number&&(r.dataset.number=t.number);const l=[],o=()=>l.length?l[l.length-1].el:r;let a=null;for(const e of t.chars){let t=0;for(;t<l.length&&t<e.marks.length&&l[t].id===e.marks[t].id;)t+=1;(l.length>t||e.marks.length>t)&&(a=null),l.length=t;for(let r=t;r<e.marks.length;r+=1){const t=Ne(n,e.marks[r].kind,e.marks[r].href,e.marks[r].color);o().appendChild(t),l.push({id:e.marks[r].id,el:t})}a||(a=n.createTextNode(""),o().appendChild(a)),a.data+=e.ch}return 0===t.chars.length&&r.appendChild(n.createElement("br")),e.appendChild(r),r});return{layout:t,lines:r}}(n,r(e,l)),E.current=e;const a=C.current;if(!a||a.text!==e)return void(o&&n.ownerDocument.activeElement===n&&K(o[0],Math.min(o[1],w.current.layout.text.length)));C.current=null;const s=w.current.layout,[c,i]=a.vis??t(s,a.src[0],a.src[1]);n.ownerDocument.activeElement!==n&&n.focus(),K(c,i)},[e,l,T]);const M=(e,t,r)=>{const l=w.current,[o,a]=n(l.layout,t[0],t[1]);C.current={text:e.text,vis:[e.caret,e.caret]},e.text!==O.current.value?O.current.onEdit(e.text,{start:o,end:a},r):L(e=>e+1)};H(()=>{const e=S.current;if(!e)return;const t=t=>{const{value:n,rules:r,multiline:l,readOnly:o,pending:a}=O.current;if("insertCompositionText"===t.inputType)return;if(t.preventDefault(),o)return;const s=w.current,c=R();if(!s||!c)return;const i="function"==typeof t.getTargetRanges?t.getTargetRanges()[0]:void 0,u=i&&!i.collapsed?[Te(s,e,i.startContainer,i.startOffset),Te(s,e,i.endContainer,i.endOffset)]:null,d=m({value:n,rules:r,multiline:l,inputType:t.inputType,data:t.data??t.dataTransfer?.getData("text/plain")??"",html:t.dataTransfer?.getData("text/html"),doc:e.ownerDocument,sel:c,target:u,pending:a});d&&("history"!==d.kind?"format"!==d.kind?M(d.edit,d.range,d.kind):O.current.onFormat(d.style):O.current.onHistory(d.dir))},n=()=>{D.current||L(e=>e+1)};return e.addEventListener("beforeinput",t),e.addEventListener("input",n),()=>{e.removeEventListener("beforeinput",t),e.removeEventListener("input",n)}},[]),H(()=>{const e=S.current;if(!e)return;const t=e.ownerDocument,n=()=>{const e=i.current?.getSource();e&&d(e)};return t.addEventListener("selectionchange",n),()=>t.removeEventListener("selectionchange",n)});const V=(t,n=!1)=>{const r=R();if(!r||r[0]===r[1])return;t.preventDefault();const o=w.current;t.clipboardData.setData("text/plain",o.layout.text.slice(r[0],r[1])),t.clipboardData.setData(g,y(e,l,r[0],r[1])),n&&!a&&M(f(e,l,r[0],r[1],{text:""}),r,"edit")};/* @__PURE__ */
14
- return te("div",{className:"es-rich-wrap",children:[s&&""===e?/* @__PURE__ */ne("div",{className:"es-rich-placeholder","aria-hidden":"true",children:s}):null,
15
- /* @__PURE__ */ne("div",{ref:S,className:`es-rich${o?" is-multiline":" is-single"}${a?" is-off":""}`,contentEditable:!a,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":o,"aria-label":c,"aria-readonly":a||void 0,"aria-placeholder":s,tabIndex:a?-1:0,spellCheck:!0,onFocus:()=>{N.current=e},onBlur:()=>{e!==N.current&&k?.(e),N.current=e},onKeyDown:t=>{if("Escape"===t.key)return t.preventDefault(),x?.(N.current),void(N.current=e);"Enter"!==t.key||o||(t.preventDefault(),e!==N.current&&k?.(e),N.current=e)},onCompositionStart:()=>{const e=R()??[0,0];D.current={from:e[0],to:e[1]}},onCompositionEnd:e=>{const t=D.current;if(D.current=null,!t)return;const{value:n,rules:r,pending:l}=O.current;e.data?M(f(n,r,t.from,t.to,{text:e.data,add:l?.add,drop:l?.drop,color:l?.color}),[t.from,t.to],"type"):L(e=>e+1)},onCopy:e=>V(e),onCut:e=>V(e,!0),onPaste:t=>{if(t.preventDefault(),a)return;const n=R();if(!n)return;const r=t.clipboardData.getData(g),s=r?o?r:r.replace(/\s*\r?\n\s*/g," "):h({html:t.clipboardData.getData("text/html"),text:t.clipboardData.getData("text/plain")},{doc:t.currentTarget.ownerDocument,multiline:o,rules:l});M(f(e,l,n[0],n[1],{markup:s}),n,"edit")}})]})}var Re={fontSize:{key:"fontSize",nameKey:"fontSize",icon:/* @__PURE__ */ne(se,{}),unit:"px",step:1,shiftStep:10,min:5},lineHeight:{key:"lineHeight",nameKey:"lineHeight",icon:/* @__PURE__ */ne(ae,{}),unit:"%",step:1,shiftStep:10,min:50,max:250,scale:100},letterSpacing:{key:"letterSpacing",nameKey:"letterSpacing",icon:/* @__PURE__ */ne(oe,{}),unit:"px",step:.1,shiftStep:1,min:-10},paragraphSpacing:{key:"paragraphSpacing",nameKey:"paragraphSpacing",icon:/* @__PURE__ */ne(le,{}),unit:"px",step:1,shiftStep:10,min:0}};function Ke(e,t){return void 0===e?void 0:Number((e*t).toFixed(6))}function Me({cells:e,words:t,readOnly:n=!1}){const r=t??v.cells,l=P();/* @__PURE__ */
13
+ /* @__PURE__ */ne("textarea",{ref:u,className:"es-gold-input",disabled:i,value:e,placeholder:o,"aria-label":c,onChange:function(e){h.current=!0,t(e.currentTarget.value)},onFocus:function(){p.current=e,h.current=!1},onBlur:function(){m(e)},onKeyDown:function(t){return"Escape"===t.key?(t.preventDefault(),h.current=!1,void r?.(p.current)):"Enter"!==t.key||l?void 0:(t.preventDefault(),void m(e))},onScroll:function(e){const t=d.current;t&&(t.scrollTop=e.currentTarget.scrollTop,t.scrollLeft=e.currentTarget.scrollLeft)}})]})}function Ee(e,t){const n=t?.selectionStart??e.length;return{start:n,end:t?.selectionEnd??n}}function Ce(e,t,n,r=$){const{start:l,end:o}=Ee(e,n);return r(e,l,o,t)}function De(e,t,n){const{start:r,end:l}=Ee(e,n),o=r+t.length;return{text:e.slice(0,r)+t+e.slice(l),selectionStart:o,selectionEnd:o}}function Ne(e,t,n,r){switch(t){case"bold":return e.createElement("strong");case"italic":return e.createElement("em");case"strike":return e.createElement("s");case"underline":return e.createElement("u");case"sup":return e.createElement("sup");case"sub":return e.createElement("sub");case"color":{const t=e.createElement("span");return t.className="es-rich-color",r&&(t.dataset.color=r,t.title=r.startsWith("#")?r.toUpperCase():r,t.style.color=r.startsWith("#")?r:`var(--es-color-${r}, inherit)`),t}case"link":{const t=e.createElement("a");return t.className="es-rich-link",n&&(t.title=n),t}default:{const n=e.createElement("span");return n.className="highlight"===t||"accent"===t?"es-rich-emphasis":`es-rich-${t}`,n}}}function Te(e,t,n,r){const l=e.layout.lines;if(n===t)return r>=e.lines.length?e.layout.text.length:l[r].vis;const o=e.lines.findIndex(e=>e===n||e.contains(n));if(-1===o)return 0;const a=t.ownerDocument.createRange();a.setStart(e.lines[o],0);try{a.setEnd(n,r)}catch{return l[o].vis}return l[o].vis+Math.min(a.toString().length,l[o].text.length)}function Le(e,t){const n=e.layout.lines;let r=n.length-1;for(let e=0;e<n.length;e+=1)if(t<=n[e].vis+n[e].text.length){r=e;break}let l=Math.max(0,t-n[r].vis);const o=e.lines[r].ownerDocument.createTreeWalker(e.lines[r],4);let a=o.nextNode(),s=null;for(;a;){if(l<=a.data.length)return[a,l];l-=a.data.length,s=a,a=o.nextNode()}return s?[s,s.data.length]:[e.lines[r],0]}function Oe({value:r,rules:l,multiline:o,readOnly:a=!1,placeholder:s,ariaLabel:c,handle:i,onEdit:u,onSelect:d,onHistory:y,onFormat:v,pending:b,onCommit:k,onCancel:x}){const S=j(null),w=j(null),E=j(null),C=j(null),D=j(null),N=j(r),[T,L]=B(0),O=j({value:r,rules:l,multiline:o,readOnly:a,pending:b,onEdit:u,onHistory:y,onFormat:v});O.current={value:r,rules:l,multiline:o,readOnly:a,pending:b,onEdit:u,onHistory:y,onFormat:v};const R=()=>{const e=S.current,t=w.current,n=e?.ownerDocument.getSelection();if(!(e&&t&&n&&0!==n.rangeCount&&n.anchorNode&&e.contains(n.anchorNode)))return null;const r=Te(t,e,n.anchorNode,n.anchorOffset),l=n.focusNode&&e.contains(n.focusNode)?Te(t,e,n.focusNode,n.focusOffset):r;return r<=l?[r,l]:[l,r]},K=(e,t)=>{const n=S.current,r=w.current;if(!n||!r)return;const[l,o]=Le(r,e),[a,s]=Le(r,t);n.ownerDocument.getSelection()?.setBaseAndExtent(l,o,a,s)};i.current={getSource(){const e=R(),n=w.current;if(!e||!n)return null;const[r,l]=t(n.layout,e[0],e[1]);return{start:r,end:l}},setSource(e,t,n){C.current={text:n,src:[e,t]},L(e=>e+1)},focus(){S.current?.focus()},rangeOf(t,n){const r=S.current,l=w.current;if(!r||!l)return null;const[o,a]=e(l.layout,t,n),[s,c]=Le(l,o),[i,u]=Le(l,a),d=r.ownerDocument.createRange();return d.setStart(s,c),d.setEnd(i,u),d}},F(()=>{const t=S.current;if(!t||D.current)return;const o=C.current?null:R();w.current=function(e,t){const n=e.ownerDocument;e.replaceChildren();const r=t.lines.map(t=>{const r=n.createElement("div");r.className=null!=t.number?"es-rich-line is-numbered":t.bullet?"es-rich-line is-bullet":"es-rich-line",null!=t.number&&(r.dataset.number=t.number);const l=[],o=()=>l.length?l[l.length-1].el:r;let a=null;for(const e of t.chars){let t=0;for(;t<l.length&&t<e.marks.length&&l[t].id===e.marks[t].id;)t+=1;(l.length>t||e.marks.length>t)&&(a=null),l.length=t;for(let r=t;r<e.marks.length;r+=1){const t=Ne(n,e.marks[r].kind,e.marks[r].href,e.marks[r].color);o().appendChild(t),l.push({id:e.marks[r].id,el:t})}a||(a=n.createTextNode(""),o().appendChild(a)),a.data+=e.ch}return 0===t.chars.length&&r.appendChild(n.createElement("br")),e.appendChild(r),r});return{layout:t,lines:r}}(t,n(r,l)),E.current=r;const a=C.current;if(!a||a.text!==r)return void(o&&t.ownerDocument.activeElement===t&&K(o[0],Math.min(o[1],w.current.layout.text.length)));C.current=null;const s=w.current.layout,[c,i]=a.vis??e(s,a.src[0],a.src[1]);t.ownerDocument.activeElement!==t&&t.focus(),K(c,i)},[r,l,T]);const M=(e,n,r)=>{const l=w.current,[o,a]=t(l.layout,n[0],n[1]);C.current={text:e.text,vis:[e.caret,e.caret]},e.text!==O.current.value?O.current.onEdit(e.text,{start:o,end:a},r):L(e=>e+1)};H(()=>{const e=S.current;if(!e)return;const t=t=>{const{value:n,rules:r,multiline:l,readOnly:o,pending:a}=O.current;if("insertCompositionText"===t.inputType)return;if(t.preventDefault(),o)return;const s=w.current,c=R();if(!s||!c)return;const i="function"==typeof t.getTargetRanges?t.getTargetRanges()[0]:void 0,u=i&&!i.collapsed?[Te(s,e,i.startContainer,i.startOffset),Te(s,e,i.endContainer,i.endOffset)]:null,d=h({value:n,rules:r,multiline:l,inputType:t.inputType,data:t.data??t.dataTransfer?.getData("text/plain")??"",html:t.dataTransfer?.getData("text/html"),doc:e.ownerDocument,sel:c,target:u,pending:a});d&&("history"!==d.kind?"format"!==d.kind?M(d.edit,d.range,d.kind):O.current.onFormat(d.style):O.current.onHistory(d.dir))},n=()=>{D.current||L(e=>e+1)};return e.addEventListener("beforeinput",t),e.addEventListener("input",n),()=>{e.removeEventListener("beforeinput",t),e.removeEventListener("input",n)}},[]),H(()=>{const e=S.current;if(!e)return;const t=e.ownerDocument,n=()=>{const e=i.current?.getSource();e&&d(e)};return t.addEventListener("selectionchange",n),()=>t.removeEventListener("selectionchange",n)});const V=(e,t=!1)=>{const n=R();if(!n||n[0]===n[1])return;e.preventDefault();const o=w.current;e.clipboardData.setData("text/plain",o.layout.text.slice(n[0],n[1])),e.clipboardData.setData(f,g(r,l,n[0],n[1])),t&&!a&&M(m(r,l,n[0],n[1],{text:""}),n,"edit")};/* @__PURE__ */
14
+ return te("div",{className:"es-rich-wrap",children:[s&&""===r?/* @__PURE__ */ne("div",{className:"es-rich-placeholder","aria-hidden":"true",children:s}):null,
15
+ /* @__PURE__ */ne("div",{ref:S,className:`es-rich${o?" is-multiline":" is-single"}${a?" is-off":""}`,contentEditable:!a,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":o,"aria-label":c,"aria-readonly":a||void 0,"aria-placeholder":s,tabIndex:a?-1:0,spellCheck:!0,onFocus:()=>{N.current=r},onBlur:()=>{r!==N.current&&k?.(r),N.current=r},onKeyDown:e=>{if("Escape"===e.key)return e.preventDefault(),x?.(N.current),void(N.current=r);"Enter"!==e.key||o||(e.preventDefault(),r!==N.current&&k?.(r),N.current=r)},onCompositionStart:()=>{const e=R()??[0,0];D.current={from:e[0],to:e[1]}},onCompositionEnd:e=>{const t=D.current;if(D.current=null,!t)return;const{value:n,rules:r,pending:l}=O.current;e.data?M(m(n,r,t.from,t.to,{text:e.data,add:l?.add,drop:l?.drop,color:l?.color}),[t.from,t.to],"type"):L(e=>e+1)},onCopy:e=>V(e),onCut:e=>V(e,!0),onPaste:e=>{if(e.preventDefault(),a)return;const t=R();if(!t)return;const n=e.clipboardData.getData(f),s=n?o?n:n.replace(/\s*\r?\n\s*/g," "):p({html:e.clipboardData.getData("text/html"),text:e.clipboardData.getData("text/plain")},{doc:e.currentTarget.ownerDocument,multiline:o,rules:l});M(m(r,l,t[0],t[1],{markup:s}),t,"edit")}})]})}var Re={fontSize:{key:"fontSize",nameKey:"fontSize",icon:/* @__PURE__ */ne(se,{}),unit:"px",step:1,shiftStep:10,min:5},lineHeight:{key:"lineHeight",nameKey:"lineHeight",icon:/* @__PURE__ */ne(ae,{}),unit:"%",step:1,shiftStep:10,min:50,max:250,scale:100},letterSpacing:{key:"letterSpacing",nameKey:"letterSpacing",icon:/* @__PURE__ */ne(oe,{}),unit:"px",step:.1,shiftStep:1,min:-10},paragraphSpacing:{key:"paragraphSpacing",nameKey:"paragraphSpacing",icon:/* @__PURE__ */ne(le,{}),unit:"px",step:1,shiftStep:10,min:0}};function Ke(e,t){return void 0===e?void 0:Number((e*t).toFixed(6))}function Me({cells:e,words:t,readOnly:n=!1}){const r=t??y.cells,l=P();/* @__PURE__ */
16
16
  return ne("div",{className:"es-copy-cells-fit",children:/* @__PURE__ */ne("div",{className:"es-copy-cells",children:e.map(e=>{const t=e.scale??1,o=e.name??(e.nameKey?r[e.nameKey]:e.key),a=e.unit??"",s=e.step??1,c=`${l}-${e.key}`;/* @__PURE__ */
17
17
  return te("div",{className:"es-copy-cell",children:[
18
18
  /* @__PURE__ */ne("label",{className:"es-field-label es-copy-cell-name",htmlFor:c,children:o}),
19
- /* @__PURE__ */ne(b,{id:c,value:Ke(e.value,t),styleValue:Ke(e.styleValue,t),onChange:n=>e.onChange(void 0===n?void 0:Number((n/t).toFixed(6))),min:e.min,max:e.max,step:s,shiftStep:e.shiftStep,icon:e.icon,unit:a||void 0,steppers:"compact",readOnly:n,ariaLabel:o,title:r.tip({name:o,step:s,unit:a})})]},e.key)})})})}function Ve({target:e,onChange:t}){const n=j(null);return F(()=>{const t=n.current,r=e.current;t&&r&&r.value===t.text&&(n.current=null,r.focus(),r.setSelectionRange(t.start,t.end))}),r=>{const l=r(e.current);t(l.text),n.current={start:l.selectionStart,end:l.selectionEnd,text:l.text}}}var je=/* @__PURE__ */new Set([...W,"clear"]);function Be({value:e,onChange:t,onCommit:n,onCancel:r,multiline:m=!1,placeholder:f,ariaLabel:g,className:y,readOnly:b=!1,rules:k,tools:S=[],writeMark:w,align:T,actions:L,toolbar:O,barLabel:R,renderFooter:M,inputRef:V,barShows:W="always",richText:G=!0,defaultShowMarks:le=!1,colors:oe,cells:ae,letterCase:se,lastTool:ce}){const ie=E("copy",v),ue=j(null),de=V??ue,[pe,he]=B(!1),[me,fe]=B(null),ge=j(l()).current,ye=j(null);H(()=>{const t=ye.current;t&&e===t.to?ye.current=null:t&&e===t.from||(ye.current=null,ge.reset())},[e,ge]);const ve=n=>{ye.current={from:ye.current?.from??e,to:n},t(n)},be=t=>({text:e,start:t?.selectionStart??me?.start??e.length,end:t?.selectionEnd??me?.end??e.length}),[ke,xe]=B(le),Se=G&&!(m&&ke),Ee=j(null),Ne=P(),[Te,Le]=B(null),[Re,Ke]=B(!1),Be=()=>{if(!Se)return de.current;const e=Ee.current?.getSource()??me;return e?{selectionStart:e.start,selectionEnd:e.end}:null},Fe=Ve({target:de,onChange:ve}),He=e=>(fe({start:e.selectionStart,end:e.selectionEnd}),e),Pe=(t,n)=>{if(!Se)return void Fe(e=>(n&&ge.record(be(e),"edit",Date.now()),He(t(e))));const r=Be(),l=He(t(r));n&&ge.record(be(r),"edit",Date.now()),Le(null),l.text!==e&&ve(l.text),Ee.current?.setSource(l.selectionStart,l.selectionEnd,l.text)},We=e=>Pe(e,!0),$e=e=>Pe(t=>{const n=be(t),r=ge[e](n);return r?{text:r.text,selectionStart:r.start,selectionEnd:r.end}:{text:n.text,selectionStart:n.start,selectionEnd:n.end}},!1),ze=j(null);F(()=>{const t=ze.current;t&&(ze.current=null,Se?Ee.current?.setSource(t.start,t.end,e):(de.current?.focus(),de.current?.setSelectionRange(t.start,t.end),fe(t)))},[Se]);const[Ie,qe]=B(null),Ae=k??I,Ue=("string"==typeof S[0]?S:S.map(e=>e.style)).filter(e=>!je.has(e)),Ye={};if(me){const t=z(e,me.start,me.end,Ae);for(const e of Ue){const n=t.has(e)||"highlight"===e&&t.has("accent");Ye[e]=!!Te?.add.includes(e)||!Te?.drop.includes(e)&&n}Ye.link=t.has("link")}const Ge=()=>{const t=Be(),n=t?.selectionStart??e.length;return{start:n,end:t?.selectionEnd??n}},_e=t=>{if("link"!==t&&U(0,t)){const{start:n,end:r}=Ge();if(n===r&&!Se)return void We(n=>Ce(e,t,n,(e,t,n,r)=>$(e,t,n,r,Ae,ie.placeholders)));const l=p({value:e,rules:Ae,start:n,end:r,style:t,pending:Te});return void("pending"===l.kind?Le(l.pending):We(()=>l.result))}if("link"!==t){const n=w??((e,t,n,r)=>$(e,t,n,r,I,ie.placeholders));return void We(r=>Ce(e,t,r,n))}const n=Be(),r=n?.selectionStart??e.length,l=n?.selectionEnd??r;Ke(!1),qe({start:r,end:l,link:Y(e,r,l)})},Xe=Boolean(me&&me.start!==me.end),Ze=me?q(e,me.start,me.end,Ae):null,Je=me?Te&&void 0!==Te.color&&Te.at===me.start?Te.color:A(e,me.start,me.end,Ae):null,Qe=o(Je,oe),et=t=>{Se?t?Ee.current?.setSource(t.start,t.end,e):Ee.current?.focus():(de.current?.focus(),t&&de.current?.setSelectionRange(t.start,t.end))},tt=()=>{const e=Ie;qe(null),et(e?{start:e.start,end:e.end}:me)},nt=()=>{const e=lt.current,t=Boolean(e&&e.querySelector(".es-copy-colors")?.contains(e.ownerDocument.activeElement));Ke(!1),t&&et(me)},rt=j(nt);rt.current=nt,H(()=>{if(Re)return C(e=>{const t=lt.current;return!!("Escape"===e.key&&t&&e.target instanceof Node&&t.contains(e.target))&&(rt.current(),!0)},()=>lt.current?.querySelector(".es-copy-colors"))},[Re]);const lt=j(null),ot=Re||null!==Ie;H(()=>{const e=lt.current;if(!ot||!e)return;const t=e.ownerDocument,n=()=>{Ke(!1),qe(null)},r=t=>{e.contains(t.target)||n()};let l;const o=r=>{const o=r.relatedTarget;o?e.contains(o)||n():(clearTimeout(l),l=setTimeout(()=>{const r=t.activeElement;t.hasFocus()&&r&&r!==t.body&&!e.contains(r)&&n()},0))};return t.addEventListener("pointerdown",r,!0),e.addEventListener("focusout",o),()=>{clearTimeout(l),t.removeEventListener("pointerdown",r,!0),e.removeEventListener("focusout",o)}},[ot]);const at=Ie??(Re?me??{start:e.length,end:e.length}:null),st=j(()=>{});st.current=()=>{const e=lt.current,t=e?.querySelector(".rosh-tb-wrap > .es-copy-pop");if(!e||!t||!at)return;const n=Se?null:e.querySelector(".es-gold-layer"),r=Se?Ee.current?.rangeOf(at.start,at.end)??null:n?a(n,at.start,at.end):null,l=r?.endContainer,o=l?1===l.nodeType?l:l.parentElement:null,d=r?s(r,o?.closest(".es-rich-line, .es-gold-layer")??null):null;if(!d)return;const p=c({anchor:d,size:{width:t.offsetWidth,height:t.offsetHeight},within:e.getBoundingClientRect(),clip:u(e),parent:i(t)});t.style.top=`${p.top}px`,t.style.left=`${p.left}px`,t.style.setProperty("--es-pop-point",`${p.point}px`),t.dataset.side=p.above?"above":"below"},F(()=>{const e=lt.current;if(!ot||!e)return;const t=()=>st.current();t();const n=e.ownerDocument.defaultView;n?.addEventListener("resize",t);const r=e.querySelector(".rosh-tb-wrap > .es-copy-pop"),l=n?.ResizeObserver,o=l&&r?new l(t):null;return o&&r&&o.observe(r),()=>{n?.removeEventListener("resize",t),o?.disconnect()}},[ot,Re,Ie,at?.start,at?.end,Se]);const ct="always"===W||pe||null!==Ie||Re,it=oe&&oe.length>0?{run:Qe,open:Re,onToggle:()=>{qe(null),Re?nt():Ke(!0)}}:void 0,ut=ct?ce?ce({className:"rosh-tb-btn",disabled:b,selected:Xe,keepCaret:e=>e.preventDefault(),insert:t=>We(n=>De(e,t,n))}):"classic"===O?L:void 0:void 0,dt=new Set(Ue),pt=T?{value:T.value,allow:T.allow,onChange:T.onChange,disabled:T.disabled}:void 0,ht={pressed:Ze,onList:t=>{const{start:n,end:r}=Ge(),l=q(e,n,r,Ae);We(()=>X(e,n,r,l===t?null:t,Ae))}},mt=D({offered:dt,color:it,last:ut,alignment:pt,list:ht,letterCase:se});/* @__PURE__ */
20
- return te("div",{ref:lt,className:"es-copy"+(y?` ${y}`:""),onFocus:()=>he(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||he(!1)},onKeyDown:e=>{const t=e.target===de.current||Boolean(e.target.closest?.(".es-rich"));if(b||!t)return;if(e.altKey||e.metaKey===e.ctrlKey)return;const n=e.key.toLowerCase(),r="KeyZ"===e.code||"z"===n,l=("KeyY"===e.code||"y"===n)&&!e.shiftKey;if(r||l)return e.preventDefault(),e.stopPropagation(),void $e(l||e.shiftKey?"redo":"undo");const o={b:"bold",i:"italic",u:"underline",k:"link"}[`${e.shiftKey?"shift+":""}${n}`];o&&Ue.includes(o)&&(e.preventDefault(),e.stopPropagation(),_e(o))},onPaste:t=>{const n=de.current;if(b||!n||t.target!==n)return;t.preventDefault();const r=h({html:t.clipboardData.getData("text/html"),text:t.clipboardData.getData("text/plain")},{doc:n.ownerDocument,multiline:m,rules:Ae});We(t=>De(e,r,t))},style:oe&&oe.length>0?Object.fromEntries(oe.map(e=>[`--es-color-${e.name}`,e.value])):void 0,onSelect:()=>{const t=de.current;t&&t.ownerDocument.activeElement===t&&fe({start:t.selectionStart??e.length,end:t.selectionEnd??e.length})},children:[ct&&(mt.words||mt.paragraph)?
21
- /* @__PURE__ */ne(N,{className:"es-copy-toolbar","aria-label":R??ie.formatting,offered:dt,pressed:Ye,onMark:e=>_e(e),color:it,linkOpen:null!==Ie,last:ut,alignment:pt,list:ht,letterCase:se,disabled:b,windows:/* @__PURE__ */te(re,{children:[Re&&oe&&oe.length>0?/* @__PURE__ */ne(d,{colors:oe,current:Je,words:ie.colors??v.colors,onPick:t=>{const{start:n,end:r}=Ge();if(n!==r)We(()=>_(e,n,r,t,Ae));else{if(!Se)return;Le({add:Te?.add??[],drop:Te?.drop??[],color:t,at:n})}}}):null,Ie?Ie&&/* @__PURE__ */ne(K,{className:"es-copy-link es-copy-pop",value:Ie.link?.href??"",onApply:t=>{const n=Ie;qe(null),We(()=>Se?Q(e,n.start,n.end,t,Ae):ee(e,n.start,n.end,t))},onRemove:Ie.link?()=>{const t=Ie.link,n=Ie;qe(null),t&&We(()=>Se?Z(e,n.start,n.end,Ae):J(e,t))}:void 0,onCancel:tt}):null]})}):null,ae&&ae.length>0?/* @__PURE__ */ne(Me,{cells:ae,words:ie.cells??v.cells,readOnly:b}):null,Se?/* @__PURE__ */ne(Oe,{value:e,rules:Ae,multiline:m,readOnly:b,placeholder:f,ariaLabel:g,handle:Ee,pending:Te??void 0,onEdit:(t,n,r)=>{ge.record({text:e,start:n.start,end:n.end},r,Date.now()),Le(null),ve(t)},onSelect:e=>{fe(t=>t&&t.start===e.start&&t.end===e.end?t:e),!Te||e.start===Te.at&&e.end===Te.at||Le(null)},onHistory:$e,onFormat:e=>{Ue.includes(e)&&_e(e)},onCommit:n,onCancel:r}):/* @__PURE__ */ne(we,{value:e,onInput:e=>{ge.record(be(null),"type",Date.now()),ve(e)},onCommit:n,onCancel:r,multiline:m,placeholder:f,ariaLabel:g,rules:k,disabled:b,inputRef:de,className:"es-copy-box"}),M?M({focused:pe,insert:t=>We(n=>De(e,t,n))}):null,G&&m?
19
+ /* @__PURE__ */ne(v,{id:c,value:Ke(e.value,t),styleValue:Ke(e.styleValue,t),onChange:n=>e.onChange(void 0===n?void 0:Number((n/t).toFixed(6))),min:e.min,max:e.max,step:s,shiftStep:e.shiftStep,icon:e.icon,unit:a||void 0,steppers:"compact",readOnly:n,ariaLabel:o,title:r.tip({name:o,step:s,unit:a})})]},e.key)})})})}function Ve({target:e,onChange:t}){const n=j(null);return F(()=>{const t=n.current,r=e.current;t&&r&&r.value===t.text&&(n.current=null,r.focus(),r.setSelectionRange(t.start,t.end))}),r=>{const l=r(e.current);t(l.text),n.current={start:l.selectionStart,end:l.selectionEnd,text:l.text}}}var je=/* @__PURE__ */new Set([...W,"clear"]);function Be({value:e,onChange:t,onCommit:n,onCancel:h,multiline:m=!1,placeholder:f,ariaLabel:g,className:v,readOnly:b=!1,rules:x,tools:S=[],writeMark:E,align:T,actions:L,toolbar:O,barLabel:R,renderFooter:M,inputRef:V,barShows:W="always",richText:G=!0,defaultShowMarks:le=!1,colors:oe,cells:ae,letterCase:se,lastTool:ce}){const ie=w("copy",y),ue=j(null),de=V??ue,[pe,he]=B(!1),[me,fe]=B(null),ge=j(r()).current,ye=j(null);H(()=>{const t=ye.current;t&&e===t.to?ye.current=null:t&&e===t.from||(ye.current=null,ge.reset())},[e,ge]);const ve=n=>{ye.current={from:ye.current?.from??e,to:n},t(n)},be=t=>({text:e,start:t?.selectionStart??me?.start??e.length,end:t?.selectionEnd??me?.end??e.length}),[ke,xe]=B(le),Se=G&&!(m&&ke),Ee=j(null),Ne=P(),[Te,Le]=B(null),[Re,Ke]=B(!1),Be=()=>{if(!Se)return de.current;const e=Ee.current?.getSource()??me;return e?{selectionStart:e.start,selectionEnd:e.end}:null},Fe=Ve({target:de,onChange:ve}),He=e=>(fe({start:e.selectionStart,end:e.selectionEnd}),e),Pe=(t,n)=>{if(!Se)return void Fe(e=>(n&&ge.record(be(e),"edit",Date.now()),He(t(e))));const r=Be(),l=He(t(r));n&&ge.record(be(r),"edit",Date.now()),Le(null),l.text!==e&&ve(l.text),Ee.current?.setSource(l.selectionStart,l.selectionEnd,l.text)},We=e=>Pe(e,!0),$e=e=>Pe(t=>{const n=be(t),r=ge[e](n);return r?{text:r.text,selectionStart:r.start,selectionEnd:r.end}:{text:n.text,selectionStart:n.start,selectionEnd:n.end}},!1),ze=j(null);F(()=>{const t=ze.current;t&&(ze.current=null,Se?Ee.current?.setSource(t.start,t.end,e):(de.current?.focus(),de.current?.setSelectionRange(t.start,t.end),fe(t)))},[Se]);const[Ie,qe]=B(null),Ae=x??I,Ue=("string"==typeof S[0]?S:S.map(e=>e.style)).filter(e=>!je.has(e)),Ye={};if(me){const t=z(e,me.start,me.end,Ae);for(const e of Ue){const n=t.has(e)||"highlight"===e&&t.has("accent");Ye[e]=!!Te?.add.includes(e)||!Te?.drop.includes(e)&&n}Ye.link=t.has("link")}const Ge=()=>{const t=Be(),n=t?.selectionStart??e.length;return{start:n,end:t?.selectionEnd??n}},_e=t=>{if("link"!==t&&U(0,t)){const{start:n,end:r}=Ge();if(n===r&&!Se)return void We(n=>Ce(e,t,n,(e,t,n,r)=>$(e,t,n,r,Ae,ie.placeholders)));const l=d({value:e,rules:Ae,start:n,end:r,style:t,pending:Te});return void("pending"===l.kind?Le(l.pending):We(()=>l.result))}if("link"!==t){const n=E??((e,t,n,r)=>$(e,t,n,r,I,ie.placeholders));return void We(r=>Ce(e,t,r,n))}const n=Be(),r=n?.selectionStart??e.length,l=n?.selectionEnd??r;Ke(!1),qe({start:r,end:l,link:Y(e,r,l)})},Xe=Boolean(me&&me.start!==me.end),Ze=me?q(e,me.start,me.end,Ae):null,Je=me?Te&&void 0!==Te.color&&Te.at===me.start?Te.color:A(e,me.start,me.end,Ae):null,Qe=l(Je,oe),et=t=>{Se?t?Ee.current?.setSource(t.start,t.end,e):Ee.current?.focus():(de.current?.focus(),t&&de.current?.setSelectionRange(t.start,t.end))},tt=()=>{const e=Ie;qe(null),et(e?{start:e.start,end:e.end}:me)},nt=()=>{const e=lt.current,t=Boolean(e&&e.querySelector(".es-copy-colors")?.contains(e.ownerDocument.activeElement));Ke(!1),t&&et(me)},rt=j(nt);rt.current=nt,H(()=>{if(Re)return C(e=>{const t=lt.current;return!!("Escape"===e.key&&t&&e.target instanceof Node&&t.contains(e.target))&&(rt.current(),!0)},()=>lt.current?.querySelector(".es-copy-colors"))},[Re]);const lt=j(null),ot=Re||null!==Ie;H(()=>{const e=lt.current;if(!ot||!e)return;const t=e.ownerDocument,n=()=>{Ke(!1),qe(null)},r=t=>{e.contains(t.target)||n()};let l;const o=r=>{const o=r.relatedTarget;o?e.contains(o)||n():(clearTimeout(l),l=setTimeout(()=>{const r=t.activeElement;t.hasFocus()&&r&&r!==t.body&&!e.contains(r)&&n()},0))};return t.addEventListener("pointerdown",r,!0),e.addEventListener("focusout",o),()=>{clearTimeout(l),t.removeEventListener("pointerdown",r,!0),e.removeEventListener("focusout",o)}},[ot]);const at=Ie??(Re?me??{start:e.length,end:e.length}:null),st=j(()=>{});st.current=()=>{const e=lt.current,t=e?.querySelector(".rosh-tb-wrap > .es-copy-pop");if(!e||!t||!at)return;const n=Se?null:e.querySelector(".es-gold-layer"),r=Se?Ee.current?.rangeOf(at.start,at.end)??null:n?o(n,at.start,at.end):null,l=r?.endContainer,u=l?1===l.nodeType?l:l.parentElement:null,d=r?a(r,u?.closest(".es-rich-line, .es-gold-layer")??null):null;if(!d)return;const p=s({anchor:d,size:{width:t.offsetWidth,height:t.offsetHeight},within:e.getBoundingClientRect(),clip:i(e),parent:c(t)});t.style.top=`${p.top}px`,t.style.left=`${p.left}px`,t.style.setProperty("--es-pop-point",`${p.point}px`),t.dataset.side=p.above?"above":"below"},F(()=>{const e=lt.current;if(!ot||!e)return;const t=()=>st.current();t();const n=e.ownerDocument.defaultView;n?.addEventListener("resize",t);const r=e.querySelector(".rosh-tb-wrap > .es-copy-pop"),l=n?.ResizeObserver,o=l&&r?new l(t):null;return o&&r&&o.observe(r),()=>{n?.removeEventListener("resize",t),o?.disconnect()}},[ot,Re,Ie,at?.start,at?.end,Se]);const ct="always"===W||pe||null!==Ie||Re,it=oe&&oe.length>0?{run:Qe,open:Re,onToggle:()=>{qe(null),Re?nt():Ke(!0)}}:void 0,ut=ct?ce?ce({className:"rosh-tb-btn",disabled:b,selected:Xe,keepCaret:e=>e.preventDefault(),insert:t=>We(n=>De(e,t,n))}):"classic"===O?L:void 0:void 0,dt=new Set(Ue),pt=T?{value:T.value,allow:T.allow,onChange:T.onChange,disabled:T.disabled}:void 0,ht={pressed:Ze,onList:t=>{const{start:n,end:r}=Ge(),l=q(e,n,r,Ae);We(()=>X(e,n,r,l===t?null:t,Ae))}},mt=D({offered:dt,color:it,last:ut,alignment:pt,list:ht,letterCase:se});/* @__PURE__ */
20
+ return te("div",{ref:lt,className:"es-copy"+(v?` ${v}`:""),onFocus:()=>he(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||he(!1)},onKeyDown:e=>{const t=e.target===de.current||Boolean(e.target.closest?.(".es-rich"));if(b||!t)return;if(e.altKey||e.metaKey===e.ctrlKey)return;const n=e.key.toLowerCase(),r="KeyZ"===e.code||"z"===n,l=("KeyY"===e.code||"y"===n)&&!e.shiftKey;if(r||l)return e.preventDefault(),e.stopPropagation(),void $e(l||e.shiftKey?"redo":"undo");const o={b:"bold",i:"italic",u:"underline",k:"link"}[`${e.shiftKey?"shift+":""}${n}`];o&&Ue.includes(o)&&(e.preventDefault(),e.stopPropagation(),_e(o))},onPaste:t=>{const n=de.current;if(b||!n||t.target!==n)return;t.preventDefault();const r=p({html:t.clipboardData.getData("text/html"),text:t.clipboardData.getData("text/plain")},{doc:n.ownerDocument,multiline:m,rules:Ae});We(t=>De(e,r,t))},style:oe&&oe.length>0?Object.fromEntries(oe.map(e=>[`--es-color-${e.name}`,e.value])):void 0,onSelect:()=>{const t=de.current;t&&t.ownerDocument.activeElement===t&&fe({start:t.selectionStart??e.length,end:t.selectionEnd??e.length})},children:[ct&&(mt.words||mt.paragraph)?
21
+ /* @__PURE__ */ne(N,{className:"es-copy-toolbar","aria-label":R??ie.formatting,offered:dt,pressed:Ye,onMark:e=>_e(e),color:it,linkOpen:null!==Ie,last:ut,alignment:pt,list:ht,letterCase:se,disabled:b,windows:/* @__PURE__ */te(re,{children:[Re&&oe&&oe.length>0?/* @__PURE__ */ne(u,{colors:oe,current:Je,words:ie.colors??y.colors,onPick:t=>{const{start:n,end:r}=Ge();if(n!==r)We(()=>_(e,n,r,t,Ae));else{if(!Se)return;Le({add:Te?.add??[],drop:Te?.drop??[],color:t,at:n})}}}):null,Ie?Ie&&/* @__PURE__ */ne(K,{className:"es-copy-link es-copy-pop",value:Ie.link?.href??"",onApply:t=>{const n=Ie;qe(null),We(()=>Se?Q(e,n.start,n.end,t,Ae):ee(e,n.start,n.end,t))},onRemove:Ie.link?()=>{const t=Ie.link,n=Ie;qe(null),t&&We(()=>Se?Z(e,n.start,n.end,Ae):J(e,t))}:void 0,onCancel:tt}):null]})}):null,ae&&ae.length>0?/* @__PURE__ */ne(Me,{cells:ae,words:ie.cells??y.cells,readOnly:b}):null,Se?/* @__PURE__ */ne(Oe,{value:e,rules:Ae,multiline:m,readOnly:b,placeholder:f,ariaLabel:g,handle:Ee,pending:Te??void 0,onEdit:(t,n,r)=>{ge.record({text:e,start:n.start,end:n.end},r,Date.now()),Le(null),ve(t)},onSelect:e=>{fe(t=>t&&t.start===e.start&&t.end===e.end?t:e),!Te||e.start===Te.at&&e.end===Te.at||Le(null)},onHistory:$e,onFormat:e=>{Ue.includes(e)&&_e(e)},onCommit:n,onCancel:h}):/* @__PURE__ */ne(we,{value:e,onInput:e=>{ge.record(be(null),"type",Date.now()),ve(e)},onCommit:n,onCancel:h,multiline:m,placeholder:f,ariaLabel:g,rules:x,disabled:b,inputRef:de,className:"es-copy-box"}),M?M({focused:pe,insert:t=>We(n=>De(e,t,n))}):null,G&&m?
22
22
  /* @__PURE__ */te("div",{className:"es-copy-marks",children:[
23
- /* @__PURE__ */ne(x,{checked:ke,onChange:()=>{const e=Be();ze.current=e&&null!==e.selectionStart&&null!==e.selectionEnd?{start:e.selectionStart,end:e.selectionEnd}:me,Le(null),xe(e=>!e)},ariaLabelledBy:Ne,disabled:b}),
24
- /* @__PURE__ */ne("span",{id:Ne,className:"es-copy-marks-label",children:ie.showMarks??"Show marks"})]}):null]})}var Fe=["none","bullet","number"],He=e,Pe={none:/* @__PURE__ */ne(ge,{}),bullet:/* @__PURE__ */ne(fe,{}),number:/* @__PURE__ */ne(me,{})},We={none:/* @__PURE__ */ne(ke,{}),upper:/* @__PURE__ */ne(be,{}),capitalize:/* @__PURE__ */ne(ve,{}),lower:/* @__PURE__ */ne(ye,{})};function $e({label:e,icon:t,answers:n,names:r,glyphs:l,row:o,readOnly:a}){const s=o.value||o.styleValue||"";/* @__PURE__ */
25
- return ne(S,{label:e,icon:t,children:/* @__PURE__ */ne(w,{ariaLabel:e,value:s,disabled:a,onChange:e=>{a||o.onChange(function(e,t){return t===e.value||""===e.value&&t===e.styleValue?"":t}(o,e))},options:n.map(e=>({id:e,label:l[e],title:r[e]}))})})}function ze({kept:e,keptHint:t,readOnly:n=!1,style:r,font:l,italic:o,cells:a,align:s,list:c,letterCase:i}){const u=E("copy",v),d=T(L().textToolbar),p=Object.fromEntries(O(R).map(e=>[e.value,e.icon])),h={...v.panel,...u.panel},m=r&&!n?[r.onEditStyles&&{label:h.editStyles,onSelect:r.onEditStyles},r.onUpdateStyle&&{label:h.updateStyle,onSelect:r.onUpdateStyle}].filter(e=>!!e):[],f=!!o&&(o.value??o.styleValue??!1),g=o?/* @__PURE__ */ne(M,{content:h.italic,children:/* @__PURE__ */ne(V,{size:"sm",variant:"ghost","aria-label":h.italic,"aria-pressed":f,disabled:n,onClick:()=>{if(n)return;const e=!f;o.onChange(e===(o.styleValue??!1)?void 0:e)},children:/* @__PURE__ */ne(he,{})})}):null;/* @__PURE__ */
23
+ /* @__PURE__ */ne(k,{checked:ke,onChange:()=>{const e=Be();ze.current=e&&null!==e.selectionStart&&null!==e.selectionEnd?{start:e.selectionStart,end:e.selectionEnd}:me,Le(null),xe(e=>!e)},ariaLabelledBy:Ne,disabled:b}),
24
+ /* @__PURE__ */ne("span",{id:Ne,className:"es-copy-marks-label",children:ie.showMarks??"Show marks"})]}):null]})}var Fe=["none","bullet","number"],He=E,Pe={none:/* @__PURE__ */ne(ge,{}),bullet:/* @__PURE__ */ne(fe,{}),number:/* @__PURE__ */ne(me,{})},We={none:/* @__PURE__ */ne(ke,{}),upper:/* @__PURE__ */ne(be,{}),capitalize:/* @__PURE__ */ne(ve,{}),lower:/* @__PURE__ */ne(ye,{})};function $e({label:e,icon:t,answers:n,names:r,glyphs:l,row:o,readOnly:a}){const s=o.value||o.styleValue||"";/* @__PURE__ */
25
+ return ne(x,{label:e,icon:t,children:/* @__PURE__ */ne(S,{ariaLabel:e,value:s,disabled:a,onChange:e=>{a||o.onChange(function(e,t){return t===e.value||""===e.value&&t===e.styleValue?"":t}(o,e))},options:n.map(e=>({id:e,label:l[e],title:r[e]}))})})}function ze({kept:e,keptHint:t,readOnly:n=!1,style:r,font:l,italic:o,cells:a,align:s,list:c,letterCase:i}){const u=w("copy",y),d=T(L().textToolbar),p=Object.fromEntries(O(R).map(e=>[e.value,e.icon])),h={...y.panel,...u.panel},m=r&&!n?[r.onEditStyles&&{label:h.editStyles,onSelect:r.onEditStyles},r.onUpdateStyle&&{label:h.updateStyle,onSelect:r.onUpdateStyle}].filter(e=>!!e):[],f=!!o&&(o.value??o.styleValue??!1),g=o?/* @__PURE__ */ne(M,{content:h.italic,children:/* @__PURE__ */ne(V,{size:"sm",variant:"ghost","aria-label":h.italic,"aria-pressed":f,disabled:n,onClick:()=>{if(n)return;const e=!f;o.onChange(e===(o.styleValue??!1)?void 0:e)},children:/* @__PURE__ */ne(he,{})})}):null;/* @__PURE__ */
26
26
  return te("div",{className:"es-tpp",children:[e?/* @__PURE__ */te("div",{className:"es-tpp-kept",children:[
27
- /* @__PURE__ */ne(Be,{...e,readOnly:n||e.readOnly}),t?/* @__PURE__ */ne("p",{className:"es-field-hint",children:t}):null]}):null,r?/* @__PURE__ */ne(S,{label:h.style,icon:/* @__PURE__ */ne(ce,{}),children:/* @__PURE__ */ne(k,{ariaLabel:h.style,value:r.value,options:r.options,onChange:r.onChange,changed:r.changed,footer:m,readOnly:n})}):null,l?/* @__PURE__ */ne(S,{label:h.font,icon:/* @__PURE__ */ne(ie,{}),children:/* @__PURE__ */te("div",{className:"es-tpp-font",children:[
28
- /* @__PURE__ */ne("div",{className:"es-tpp-font-select",children:/* @__PURE__ */ne(k,{ariaLabel:h.font,value:l.value||void 0,placeholder:l.styleValue,options:l.options,onChange:l.onChange,searchable:l.searchable,readOnly:n})}),g]})}):g?
29
- /* @__PURE__ */ne(S,{label:h.italic,icon:/* @__PURE__ */ne(ie,{}),children:/* @__PURE__ */ne("div",{className:"es-tpp-font",children:g})}):null,a?.length?/* @__PURE__ */ne(Me,{cells:a,words:u.cells,readOnly:n}):null,s?/* @__PURE__ */ne($e,{label:u.alignment,icon:/* @__PURE__ */ne(ue,{}),answers:R.filter(e=>!s.allow||s.allow.includes(e)),names:d,glyphs:p,row:s,readOnly:n}):null,c?/* @__PURE__ */ne($e,{label:h.list,icon:/* @__PURE__ */ne(de,{}),answers:Fe,names:h.lists,glyphs:Pe,row:c,readOnly:n}):null,i?/* @__PURE__ */ne($e,{label:h.capitalization,icon:/* @__PURE__ */ne(pe,{}),answers:He,names:h.cases,glyphs:We,row:i,readOnly:n}):null]})}export{Re as COPY_CELLS,Be as CopyBox,Me as CopyCells,Oe as RichBox,ze as TextPartPanel,De as insertSelection,Ce as markSelection,Ve as useCaretEdit};
27
+ /* @__PURE__ */ne(Be,{...e,readOnly:n||e.readOnly}),t?/* @__PURE__ */ne("p",{className:"es-field-hint",children:t}):null]}):null,r?/* @__PURE__ */ne(x,{label:h.style,icon:/* @__PURE__ */ne(ce,{}),children:/* @__PURE__ */ne(b,{ariaLabel:h.style,value:r.value,options:r.options,onChange:r.onChange,changed:r.changed,footer:m,readOnly:n})}):null,l?/* @__PURE__ */ne(x,{label:h.font,icon:/* @__PURE__ */ne(ie,{}),children:/* @__PURE__ */te("div",{className:"es-tpp-font",children:[
28
+ /* @__PURE__ */ne("div",{className:"es-tpp-font-select",children:/* @__PURE__ */ne(b,{ariaLabel:h.font,value:l.value||void 0,placeholder:l.styleValue,options:l.options,onChange:l.onChange,searchable:l.searchable,readOnly:n})}),g]})}):g?
29
+ /* @__PURE__ */ne(x,{label:h.italic,icon:/* @__PURE__ */ne(ie,{}),children:/* @__PURE__ */ne("div",{className:"es-tpp-font",children:g})}):null,a?.length?/* @__PURE__ */ne(Me,{cells:a,words:u.cells,readOnly:n}):null,s?/* @__PURE__ */ne($e,{label:u.alignment,icon:/* @__PURE__ */ne(ue,{}),answers:R.filter(e=>!s.allow||s.allow.includes(e)),names:d,glyphs:p,row:s,readOnly:n}):null,c?/* @__PURE__ */ne($e,{label:h.list,icon:/* @__PURE__ */ne(de,{}),answers:Fe,names:h.lists,glyphs:Pe,row:c,readOnly:n}):null,i?/* @__PURE__ */ne($e,{label:h.capitalization,icon:/* @__PURE__ */ne(pe,{}),answers:He,names:h.cases,glyphs:We,row:i,readOnly:n}):null]})}export{Re as COPY_CELLS,Be as CopyBox,Me as CopyCells,Oe as RichBox,ze as TextPartPanel,De as insertSelection,Ce as markSelection,Ve as useCaretEdit};
@@ -158,6 +158,19 @@ interface Easel<C extends EaselConfig = EaselConfig> {
158
158
  setConfig: (config: C) => void;
159
159
  /** The config in force now. */
160
160
  readonly config: C;
161
+ /**
162
+ * THE DOCUMENT AS LOADED: the data the easel was made or `load`ed with, and
163
+ * then what the mount's `resolveAll` brought it to — the engine's own
164
+ * normalisation (a block's migration, a stamped default), which is not an
165
+ * edit. The same object as `getState().appState.data` until the first change
166
+ * that is not that, so a host compares by identity: the screen's autosave
167
+ * sends nothing while the document is still this (2026-10-23, GG: "a change
168
+ * made on mount is not an edit and is never saved by itself").
169
+ *
170
+ * A `resolveAll` that lands after a change by hand does not move it: the
171
+ * document is then edited, and the resolver's write rides with that edit.
172
+ */
173
+ readonly loaded: Data;
161
174
  }
162
175
  /**
163
176
  * Puck 0.20's UI at mount (`defaultAppState.ui`), less the selection, which
@@ -1 +1 @@
1
- export{CanvasFrame,CanvasPartsContext,CanvasPassThroughContext,CanvasSharedContext,DEFAULT_UI,EaselCanvas,EaselProvider,EditDocument,bindUndoKeys,createEasel,createUseEasel,recordsByDefault,reduce,uiView,useEasel,useEaselApi,useEaselNodeOps,useSelectedFields,validSelection}from"../chunk-CPFDJMFD.js";import"../chunk-TBY3DFKS.js";import"../chunk-YRLPFZW3.js";import"../chunk-X3TYRF5V.js";import"../chunk-23VM4PMV.js";import"../chunk-KRL3IUV3.js";import"../chunk-MFIRYGHW.js";import"../chunk-X4T6JT3M.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
1
+ export{CanvasFrame,CanvasPartsContext,CanvasPassThroughContext,CanvasSharedContext,DEFAULT_UI,EaselCanvas,EaselProvider,EditDocument,bindUndoKeys,createEasel,createUseEasel,recordsByDefault,reduce,uiView,useEasel,useEaselApi,useEaselNodeOps,useSelectedFields,validSelection}from"../chunk-UZXGXMNO.js";import"../chunk-TBY3DFKS.js";import"../chunk-YRLPFZW3.js";import"../chunk-X3TYRF5V.js";import"../chunk-X4T6JT3M.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";import"../chunk-23VM4PMV.js";import"../chunk-KRL3IUV3.js";import"../chunk-MFIRYGHW.js";
@@ -1 +1 @@
1
- export{FieldText,Inspector,InspectorField,LinkPicker,ListField,bucketsOf,copyItem,insertAt,labelOf,moveTo,planFields,removeAt}from"../chunk-5ZBV5RA6.js";export{fieldIsShown,showWhenOf,shownFields,withShowWhen}from"../chunk-BPXEFVSQ.js";import"../chunk-A6Z4SD3I.js";import"../chunk-K56YDHYQ.js";export{FieldSlider}from"../chunk-XWFH2NHZ.js";export{useResolvedFields}from"../chunk-YRLPFZW3.js";import"../chunk-BALFHI3G.js";import"../chunk-RC25EGHD.js";import"../chunk-KFV7N2DJ.js";export{FieldNumber}from"../chunk-2XMHLXMA.js";export{FieldSelect,optionFor}from"../chunk-G3GWAP5R.js";import"../chunk-WRFD4EXD.js";import"../chunk-36LVP5WD.js";import"../chunk-MFIRYGHW.js";import"../chunk-67GNT6PF.js";import"../chunk-P2VEMZH5.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
1
+ export{FieldText,Inspector,InspectorField,LinkPicker,ListField,bucketsOf,copyItem,insertAt,labelOf,moveTo,planFields,removeAt}from"../chunk-ZFFWO2AF.js";export{fieldIsShown,showWhenOf,shownFields,withShowWhen}from"../chunk-BPXEFVSQ.js";import"../chunk-A6Z4SD3I.js";import"../chunk-K56YDHYQ.js";export{FieldSlider}from"../chunk-XWFH2NHZ.js";import"../chunk-67GNT6PF.js";export{useResolvedFields}from"../chunk-YRLPFZW3.js";import"../chunk-BALFHI3G.js";import"../chunk-RC25EGHD.js";import"../chunk-KFV7N2DJ.js";import"../chunk-P2VEMZH5.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";export{FieldNumber}from"../chunk-2XMHLXMA.js";export{FieldSelect,optionFor}from"../chunk-G3GWAP5R.js";import"../chunk-WRFD4EXD.js";import"../chunk-36LVP5WD.js";import"../chunk-MFIRYGHW.js";
@@ -873,4 +873,96 @@ declare function SettingsDrill({ name, preview, offPage, status, onOpen, id, cla
873
873
  */
874
874
  declare function SettingsAction({ label, onPress, disabled, note, done, doneLabel, icon, id, className, }: SettingsActionProps): react.JSX.Element;
875
875
 
876
- export { SettingsAction, type SettingsActionBaseProps, type SettingsActionNote, type SettingsActionProps, SettingsDefaultReset, type SettingsDefaultResetProps, SettingsDrill, type SettingsDrillProps, SettingsField, type SettingsFieldProps, SettingsGroup, SettingsGroupHead, type SettingsGroupHeadProps, type SettingsGroupProps, SettingsGroupSub, type SettingsGroupSubProps, SettingsSegmented, type SettingsSegmentedFit, type SettingsSegmentedOption, type SettingsSegmentedProps, SettingsSwitch, type SettingsSwitchBaseProps, type SettingsSwitchLabel, type SettingsSwitchProps };
876
+ /**
877
+ * WIDTH › BACKGROUND — how wide a section's background is, ONE row for both
878
+ * editors (Lewis 2026-10-20 for the website, width mockup v6; 2026-10-23 for
879
+ * the email designer, "Email Section panel split", which replaces its
880
+ * "Full-width background" switch with this row).
881
+ *
882
+ * Background Full width | Content width [↺]
883
+ *
884
+ * PRESENTATIONAL, like every part here: what the row shows, and what a choice
885
+ * writes, are the host's. The website reads the section's own value or the
886
+ * site's; the email designer reads the section's value or the old switch. The
887
+ * part never decides a width.
888
+ *
889
+ * Full width comes first, everywhere a width is chosen (`BACKGROUND_WIDTHS`).
890
+ * The words are N10.1's: "Full width" and "Content width" — never "Site width"
891
+ * or "Max width".
892
+ */
893
+ type BackgroundWidth = 'full' | 'content';
894
+ /** The one order of the two choices. */
895
+ declare const BACKGROUND_WIDTHS: readonly BackgroundWidth[];
896
+ type BackgroundWidthWords = {
897
+ /** The row's name. */
898
+ label: string;
899
+ full: string;
900
+ content: string;
901
+ };
902
+ declare const DEFAULT_BACKGROUND_WIDTH_WORDS: BackgroundWidthWords;
903
+ interface SettingsBackgroundWidthProps {
904
+ /** The width the band draws at — the section's own, or the one it follows. */
905
+ value: BackgroundWidth;
906
+ /** The row holds a value of its own (blue name, ↺). */
907
+ changed: boolean;
908
+ /** What ↺ goes back to, in the host's words, for its tooltip. */
909
+ detail?: string;
910
+ onChange: (next: BackgroundWidth) => void;
911
+ onReset: () => void;
912
+ /** The strip cannot apply here (the website's phone view). */
913
+ disabled?: boolean;
914
+ /** One quiet line under the strip — why it is closed, when it is. */
915
+ hint?: string;
916
+ labelId?: string;
917
+ /** The host's words for the row. English when left out. */
918
+ words?: Partial<BackgroundWidthWords>;
919
+ /** The host's words for ↺, from `useWords('panel', …)`. */
920
+ resetWords?: SettingsDefaultResetProps['words'];
921
+ }
922
+ declare function SettingsBackgroundWidth({ value, changed, detail, onChange, onReset, disabled, hint, labelId, words, resetWords, }: SettingsBackgroundWidthProps): react.JSX.Element;
923
+
924
+ /**
925
+ * WIDTH › CONTENT — how wide everything INSIDE a section is, the twin of
926
+ * {@link SettingsBackgroundWidth} and ONE row for both editors (Lewis
927
+ * 2026-10-20 for the website, width mockup v6; 2026-10-23 for the email
928
+ * designer: "we have Background width AND page width — why is page width not
929
+ * here?", and words must not touch the edge by default).
930
+ *
931
+ * Content Full width | Content width [↺]
932
+ * [ number ] ← only where the host has one
933
+ *
934
+ * PRESENTATIONAL, like {@link SettingsBackgroundWidth}: the host says what the
935
+ * row shows and what a choice writes, and hands its own number control as
936
+ * `number` (the website: a px slider under Content width; the email designer:
937
+ * none — its content width is Email styles' side padding). Without `mode` the
938
+ * row is the number alone (the website's Site styles row, where the number is
939
+ * also the header's and the footer's width).
940
+ *
941
+ * Full width comes first, the order of {@link BACKGROUND_WIDTHS}.
942
+ */
943
+ type ContentWidthWords = BackgroundWidthWords;
944
+ declare const DEFAULT_CONTENT_WIDTH_WORDS: ContentWidthWords;
945
+ interface SettingsContentWidthProps {
946
+ /** Full width or Content width. Left out: the row is `number` alone. */
947
+ mode?: BackgroundWidth;
948
+ onMode?: (next: BackgroundWidth) => void;
949
+ /** The host's number control, drawn under the choices (or alone). */
950
+ number?: ReactNode;
951
+ /** The row holds a value of its own (blue name, ↺). */
952
+ changed: boolean;
953
+ /** What ↺ goes back to, in the host's words, for its tooltip. */
954
+ detail?: string;
955
+ onReset: () => void;
956
+ /** Full width cannot be chosen: the background is at content width, and
957
+ * content is never wider than its background. */
958
+ fullClosed?: boolean;
959
+ disabled?: boolean;
960
+ /** One quiet line under the control — why something is closed. */
961
+ hint?: string;
962
+ labelId?: string;
963
+ words?: Partial<ContentWidthWords>;
964
+ resetWords?: SettingsDefaultResetProps['words'];
965
+ }
966
+ declare function SettingsContentWidth({ mode, onMode, number, changed, detail, onReset, fullClosed, disabled, hint, labelId, words, resetWords, }: SettingsContentWidthProps): react.JSX.Element;
967
+
968
+ export { BACKGROUND_WIDTHS, type BackgroundWidth, type BackgroundWidthWords, type ContentWidthWords, DEFAULT_BACKGROUND_WIDTH_WORDS, DEFAULT_CONTENT_WIDTH_WORDS, SettingsAction, type SettingsActionBaseProps, type SettingsActionNote, type SettingsActionProps, SettingsBackgroundWidth, type SettingsBackgroundWidthProps, SettingsContentWidth, type SettingsContentWidthProps, SettingsDefaultReset, type SettingsDefaultResetProps, SettingsDrill, type SettingsDrillProps, SettingsField, type SettingsFieldProps, SettingsGroup, SettingsGroupHead, type SettingsGroupHeadProps, type SettingsGroupProps, SettingsGroupSub, type SettingsGroupSubProps, SettingsSegmented, type SettingsSegmentedFit, type SettingsSegmentedOption, type SettingsSegmentedProps, SettingsSwitch, type SettingsSwitchBaseProps, type SettingsSwitchLabel, type SettingsSwitchProps };
@@ -1,13 +1,15 @@
1
- export{DESIGN_GROUPS,SETTINGS_BUCKETS,SettingsGroup}from"../chunk-RC25EGHD.js";import{DEFAULT_PANEL_WORDS as e}from"../chunk-KFV7N2DJ.js";export{SettingsField,SettingsSegmented,SettingsSwitch}from"../chunk-36LVP5WD.js";import{withTip as s}from"../chunk-P2VEMZH5.js";import{jsx as t,jsxs as n,Fragment as i}from"react/jsx-runtime";import{RevertIcon as l}from"efficient-shell/icons/efficient";import{Tooltip as a}from"efficient-shell/ui";export{BorderInput as SettingsBorder,CornersInput as SettingsCorners,AlignmentGrid as SettingsPlacement,SidesInput as SettingsSides,SidesEachToggle as SettingsSidesEach,borderSides,borderStartEach,sidesStartEach}from"efficient-shell/ui";function r({title:e,level:s=3,id:n,className:i}){/* @__PURE__ */
2
- return t(`h${s}`,{id:n,className:i?`es-group-head ${i}`:"es-group-head",children:e})}function o({title:e,level:s=4,id:n,className:i}){/* @__PURE__ */
3
- return t(`h${s}`,{id:n,className:i?`es-group-sub ${i}`:"es-group-sub",children:e})}function d({label:n,changed:i,onReset:a,detail:r,disabled:o,defaultAction:d,words:m,className:h}){const b={...e,...m},f=["es-default-reset"];if(i&&f.push("is-changed"),h&&f.push(h),!i&&d)return f.push("is-pressable"),s(d.title,/* @__PURE__ */t("button",{type:"button",className:f.join(" "),"aria-label":d.title,disabled:o,onClick:d.onPress,children:d.icon}));if(!i)/* @__PURE__ */
4
- return t("span",{className:f.join(" "),"aria-hidden":"true"});const N=b.resetName({label:n});return s(r?b.resetTitle({label:n,detail:r}):N,/* @__PURE__ */t("button",{type:"button",className:f.join(" "),"aria-label":N,"aria-description":r||void 0,disabled:o,onClick:e=>{a(),function(e){const s=e.currentTarget,t=s.closest(".es-field");let n=t?.querySelector(u(".es-field-ctl"))??t?.querySelector(u(".es-field-head"))??null,i=t?null:s.parentElement;for(let e=0;!n&&i&&e<p;e+=1,i=i.parentElement)n=[...i.querySelectorAll(c)].find(e=>e!==s)??null;n?.focus()}(e)},children:/* @__PURE__ */t(l,{size:15})}))}var c=['input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled]):not(.es-default-reset)",'[tabindex]:not([tabindex="-1"])'].join(", "),u=e=>c.split(", ").map(s=>`${e} ${s}`).join(", "),p=4;function m({name:e,preview:s,offPage:l,status:r,onOpen:o,id:d,className:c}){const u=null!=s;/* @__PURE__ */
5
- return n("button",{type:"button",id:d,className:c?`es-drill ${c}`:"es-drill",onClick:o,children:[
6
- /* @__PURE__ */n(a,{content:u?/* @__PURE__ */n(i,{children:[e,
7
- /* @__PURE__ */t("br",{}),s]}):e,describe:!1,className:"es-drill-text",children:[
8
- /* @__PURE__ */t("span",{className:"es-drill-name",children:e}),u?/* @__PURE__ */t("span",{className:l?"es-drill-preview is-offpage":"es-drill-preview",children:s}):null]}),r?/* @__PURE__ */t("span",{className:"es-drill-status",children:r}):null,
9
- /* @__PURE__ */t("span",{className:"es-drill-chev","aria-hidden":"true"})]})}function h({label:e,onPress:s,disabled:i,note:l,done:a,doneLabel:r,icon:o,id:d,className:c}){const u=void 0===r?e:r,p=a?u:e,m=null!=l,h=m&&d?`${d}-note`:void 0;/* @__PURE__ */
10
- return n("div",{className:c?`es-action-wrap ${c}`:"es-action-wrap",children:[
11
- /* @__PURE__ */n("button",{type:"button",id:d,className:a?"es-action is-done":"es-action",disabled:i,"aria-describedby":h,onClick:s,children:[o?/* @__PURE__ */t("span",{className:"es-action-icon","aria-hidden":"true",children:o}):null,
12
- /* @__PURE__ */t("span",{className:"es-action-label",children:p})]}),m?/* @__PURE__ */t("p",{id:h,className:"es-action-note",children:l}):null,
13
- /* @__PURE__ */t("span",{className:"es-action-live",role:"status","aria-live":"polite",children:a?u:null})]})}export{h as SettingsAction,d as SettingsDefaultReset,m as SettingsDrill,r as SettingsGroupHead,o as SettingsGroupSub};
1
+ export{DESIGN_GROUPS,SETTINGS_BUCKETS,SettingsGroup}from"../chunk-RC25EGHD.js";import{DEFAULT_PANEL_WORDS as e}from"../chunk-KFV7N2DJ.js";import{withTip as l}from"../chunk-P2VEMZH5.js";import{SettingsField as n,SettingsSegmented as t}from"../chunk-36LVP5WD.js";export{SettingsField,SettingsSegmented,SettingsSwitch}from"../chunk-36LVP5WD.js";import{jsx as a,jsxs as i,Fragment as s}from"react/jsx-runtime";import{RevertIcon as d,BackgroundIcon as o,WidthIcon as r}from"efficient-shell/icons/efficient";import{Tooltip as c}from"efficient-shell/ui";export{BorderInput as SettingsBorder,CornersInput as SettingsCorners,AlignmentGrid as SettingsPlacement,SidesInput as SettingsSides,SidesEachToggle as SettingsSidesEach,borderSides,borderStartEach,sidesStartEach}from"efficient-shell/ui";function u({title:e,level:l=3,id:n,className:t}){/* @__PURE__ */
2
+ return a(`h${l}`,{id:n,className:t?`es-group-head ${t}`:"es-group-head",children:e})}function h({title:e,level:l=4,id:n,className:t}){/* @__PURE__ */
3
+ return a(`h${l}`,{id:n,className:t?`es-group-sub ${t}`:"es-group-sub",children:e})}function b({label:n,changed:t,onReset:i,detail:s,disabled:o,defaultAction:r,words:c,className:u}){const h={...e,...c},b=["es-default-reset"];if(t&&b.push("is-changed"),u&&b.push(u),!t&&r)return b.push("is-pressable"),l(r.title,/* @__PURE__ */a("button",{type:"button",className:b.join(" "),"aria-label":r.title,disabled:o,onClick:r.onPress,children:r.icon}));if(!t)/* @__PURE__ */
4
+ return a("span",{className:b.join(" "),"aria-hidden":"true"});const g=h.resetName({label:n});return l(s?h.resetTitle({label:n,detail:s}):g,/* @__PURE__ */a("button",{type:"button",className:b.join(" "),"aria-label":g,"aria-description":s||void 0,disabled:o,onClick:e=>{i(),function(e){const l=e.currentTarget,n=l.closest(".es-field");let t=n?.querySelector(m(".es-field-ctl"))??n?.querySelector(m(".es-field-head"))??null,a=n?null:l.parentElement;for(let e=0;!t&&a&&e<f;e+=1,a=a.parentElement)t=[...a.querySelectorAll(p)].find(e=>e!==l)??null;t?.focus()}(e)},children:/* @__PURE__ */a(d,{size:15})}))}var p=['input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled]):not(.es-default-reset)",'[tabindex]:not([tabindex="-1"])'].join(", "),m=e=>p.split(", ").map(l=>`${e} ${l}`).join(", "),f=4;function g({name:e,preview:l,offPage:n,status:t,onOpen:d,id:o,className:r}){const u=null!=l;/* @__PURE__ */
5
+ return i("button",{type:"button",id:o,className:r?`es-drill ${r}`:"es-drill",onClick:d,children:[
6
+ /* @__PURE__ */i(c,{content:u?/* @__PURE__ */i(s,{children:[e,
7
+ /* @__PURE__ */a("br",{}),l]}):e,describe:!1,className:"es-drill-text",children:[
8
+ /* @__PURE__ */a("span",{className:"es-drill-name",children:e}),u?/* @__PURE__ */a("span",{className:n?"es-drill-preview is-offpage":"es-drill-preview",children:l}):null]}),t?/* @__PURE__ */a("span",{className:"es-drill-status",children:t}):null,
9
+ /* @__PURE__ */a("span",{className:"es-drill-chev","aria-hidden":"true"})]})}function N({label:e,onPress:l,disabled:n,note:t,done:s,doneLabel:d,icon:o,id:r,className:c}){const u=void 0===d?e:d,h=s?u:e,b=null!=t,p=b&&r?`${r}-note`:void 0;/* @__PURE__ */
10
+ return i("div",{className:c?`es-action-wrap ${c}`:"es-action-wrap",children:[
11
+ /* @__PURE__ */i("button",{type:"button",id:r,className:s?"es-action is-done":"es-action",disabled:n,"aria-describedby":p,onClick:l,children:[o?/* @__PURE__ */a("span",{className:"es-action-icon","aria-hidden":"true",children:o}):null,
12
+ /* @__PURE__ */a("span",{className:"es-action-label",children:h})]}),b?/* @__PURE__ */a("p",{id:p,className:"es-action-note",children:t}):null,
13
+ /* @__PURE__ */a("span",{className:"es-action-live",role:"status","aria-live":"polite",children:s?u:null})]})}var S=["full","content"],v={label:"Background",full:"Full width",content:"Content width"};function w({value:e,changed:l,detail:i,onChange:s,onReset:d,disabled:r=!1,hint:c,labelId:u,words:h,resetWords:p}){const m={...v,...h};/* @__PURE__ */
14
+ return a(n,{label:m.label,labelId:u,icon:/* @__PURE__ */a(o,{}),changed:l,hint:c,action:/* @__PURE__ */a(b,{words:p,label:m.label,changed:l,detail:i,onReset:d}),children:/* @__PURE__ */a(t,{options:S.map(e=>({id:e,label:"full"===e?m.full:m.content})),value:e,onChange:s,ariaLabel:m.label,disabled:r})})}var C={label:"Content",full:"Full width",content:"Content width"};function j({mode:e,onMode:l,number:s,changed:d,detail:o,onReset:c,fullClosed:u=!1,disabled:h=!1,hint:p,labelId:m,words:f,resetWords:g}){const N={...C,...f},v=void 0!==e&&l?/* @__PURE__ */a(t,{options:S.map(e=>({id:e,label:"full"===e?N.full:N.content,disabled:"full"===e&&u})),value:e,onChange:l,ariaLabel:N.label,disabled:h}):null;/* @__PURE__ */
15
+ return a(n,{label:N.label,labelId:m,icon:/* @__PURE__ */a(r,{}),changed:d,hint:p,action:/* @__PURE__ */a(b,{words:g,label:N.label,changed:d,detail:o,onReset:c}),children:v&&s?/* @__PURE__ */i("div",{className:"es-width-stack",children:[v,s]}):v??s??null})}export{S as BACKGROUND_WIDTHS,v as DEFAULT_BACKGROUND_WIDTH_WORDS,C as DEFAULT_CONTENT_WIDTH_WORDS,N as SettingsAction,w as SettingsBackgroundWidth,j as SettingsContentWidth,b as SettingsDefaultReset,g as SettingsDrill,u as SettingsGroupHead,h as SettingsGroupSub};
@@ -1103,3 +1103,15 @@ button.es-group-head:hover { background: var(--es-chip-bg); }
1103
1103
  @media (prefers-reduced-motion: reduce) {
1104
1104
  .es-action { transition: none; }
1105
1105
  }
1106
+
1107
+ /* Width › Content (`SettingsContentWidth`): the choices over the host's number
1108
+ in ONE full-width column. The column is the flex item and fills the row; the
1109
+ number's track fills the column (measured on width mockup v3, 2026-10-20, at
1110
+ 320, 270 and 220px). */
1111
+ .es-width-stack {
1112
+ display: flex;
1113
+ flex-direction: column;
1114
+ gap: 8px;
1115
+ width: 100%;
1116
+ min-width: 0;
1117
+ }
@@ -1 +1 @@
1
- export{AddBlockRow as default}from"../../chunk-CM732ENS.js";import"../../chunk-M2Z775ZC.js";import"../../chunk-J4MHNAED.js";import"../../chunk-LNHT2KPX.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-23DYNW6S.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-CPFDJMFD.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-5ZBV5RA6.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-BALFHI3G.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{AddBlockRow as default}from"../../chunk-RTCNJRF6.js";import"../../chunk-M2Z775ZC.js";import"../../chunk-I2BCNLLV.js";import"../../chunk-LNHT2KPX.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-23DYNW6S.js";import"../../chunk-UZXGXMNO.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ZFFWO2AF.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-67GNT6PF.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-BALFHI3G.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-PLVEGYK6.js";
@@ -1 +1 @@
1
- export{blockKey,AddSidePanel as default,sectionKey,sharedKey,templateKey}from"../../chunk-324PHMLC.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-BVN33R76.js";import"../../chunk-43AEUUNQ.js";import"../../chunk-SINAM2IT.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-M2Z775ZC.js";import"../../chunk-J4MHNAED.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-LNHT2KPX.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-23DYNW6S.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-CPFDJMFD.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-5ZBV5RA6.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-WXFZD7WC.js";import"../../chunk-BALFHI3G.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-ZG6PVMC3.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-Z2V3TTAR.js";import"../../chunk-KAML3KQH.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{blockKey,AddSidePanel as default,sectionKey,sharedKey,templateKey}from"../../chunk-LFHMDGLE.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-BVN33R76.js";import"../../chunk-43AEUUNQ.js";import"../../chunk-SINAM2IT.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-M2Z775ZC.js";import"../../chunk-I2BCNLLV.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-LNHT2KPX.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-23DYNW6S.js";import"../../chunk-Z2V3TTAR.js";import"../../chunk-KAML3KQH.js";import"../../chunk-UZXGXMNO.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ZFFWO2AF.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-67GNT6PF.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-WXFZD7WC.js";import"../../chunk-BALFHI3G.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-ZG6PVMC3.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-PLVEGYK6.js";
@@ -1 +1 @@
1
- export{EASEL_NODE_CLIPBOARD,ancestorChain,nodeClipboardOf,nodeClipboardRules,nodeMenuItems,nodeShortcut,pageMenuItems,pastePlace,runNodeShortcut,textMenuItems,useNodeClipboard,useNodeContextMenu}from"../../chunk-JC34NH4G.js";import"../../chunk-V7U33NF2.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-23DYNW6S.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-WXFZD7WC.js";import"../../chunk-BALFHI3G.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{EASEL_NODE_CLIPBOARD,ancestorChain,nodeClipboardOf,nodeClipboardRules,nodeMenuItems,nodeShortcut,pageMenuItems,pastePlace,runNodeShortcut,textMenuItems,useNodeClipboard,useNodeContextMenu}from"../../chunk-EFQCH7CO.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-23DYNW6S.js";import"../../chunk-V7U33NF2.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-WXFZD7WC.js";import"../../chunk-BALFHI3G.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-PLVEGYK6.js";
@@ -1 +1 @@
1
- export{ScreenChrome as default}from"../../chunk-EZKUTVQP.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-JBOSEHIX.js";import"../../chunk-FGNR22NY.js";import"../../chunk-LER7RKTO.js";import"../../chunk-FGYJ5DJY.js";import"../../chunk-7F52SZOI.js";import"../../chunk-MQNBD6AB.js";import"../../chunk-4ES5JGGX.js";import"../../chunk-6DNDTEF6.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-C56MPJBH.js";import"../../chunk-T5WDR5IE.js";import"../../chunk-LUBJKUVV.js";import"../../chunk-PY7OOQEZ.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-5545A3PC.js";import"../../chunk-324PHMLC.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-BVN33R76.js";import"../../chunk-43AEUUNQ.js";import"../../chunk-SINAM2IT.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-M2Z775ZC.js";import"../../chunk-J4MHNAED.js";import"../../chunk-MS2U6MV5.js";import"../../chunk-JC34NH4G.js";import"../../chunk-V7U33NF2.js";import"../../chunk-5DPIGWUL.js";import"../../chunk-M62P4IQK.js";import"../../chunk-EZG3TGQ7.js";import"../../chunk-ERR437B5.js";import"../../chunk-RYNBSKE7.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-LNHT2KPX.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-4VJATVVR.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-23DYNW6S.js";import"../../chunk-BHRC3ASL.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-CPFDJMFD.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-5ZBV5RA6.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-WXFZD7WC.js";import"../../chunk-BALFHI3G.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-ZG6PVMC3.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-Z2V3TTAR.js";import"../../chunk-KAML3KQH.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";
1
+ export{ScreenChrome as default}from"../../chunk-LOXB5OVK.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-JBOSEHIX.js";import"../../chunk-FGNR22NY.js";import"../../chunk-LER7RKTO.js";import"../../chunk-FGYJ5DJY.js";import"../../chunk-7F52SZOI.js";import"../../chunk-MQNBD6AB.js";import"../../chunk-3Z2MVLCD.js";import"../../chunk-BQMZ2YAF.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-C56MPJBH.js";import"../../chunk-OD4WIIER.js";import"../../chunk-UAS2LEW2.js";import"../../chunk-PY7OOQEZ.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-5545A3PC.js";import"../../chunk-LFHMDGLE.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-BVN33R76.js";import"../../chunk-43AEUUNQ.js";import"../../chunk-SINAM2IT.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-M2Z775ZC.js";import"../../chunk-I2BCNLLV.js";import"../../chunk-MS2U6MV5.js";import"../../chunk-EFQCH7CO.js";import"../../chunk-5DPIGWUL.js";import"../../chunk-M62P4IQK.js";import"../../chunk-EZG3TGQ7.js";import"../../chunk-ERR437B5.js";import"../../chunk-RYNBSKE7.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-LNHT2KPX.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-4VJATVVR.js";import"../../chunk-23DYNW6S.js";import"../../chunk-V7U33NF2.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-Z2V3TTAR.js";import"../../chunk-KAML3KQH.js";import"../../chunk-UZXGXMNO.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ZFFWO2AF.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-67GNT6PF.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-WXFZD7WC.js";import"../../chunk-BALFHI3G.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-ZG6PVMC3.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-BHRC3ASL.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-PLVEGYK6.js";
@@ -1 +1 @@
1
- export{DocumentScreen,ScreenMount as default}from"../../chunk-WMQKV3DK.js";import"../../chunk-GXQCZJOP.js";import"../../chunk-EZKUTVQP.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-JBOSEHIX.js";import"../../chunk-FGNR22NY.js";import"../../chunk-LER7RKTO.js";import"../../chunk-FGYJ5DJY.js";import"../../chunk-7F52SZOI.js";import"../../chunk-MQNBD6AB.js";import"../../chunk-4ES5JGGX.js";import"../../chunk-6DNDTEF6.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-C56MPJBH.js";import"../../chunk-T5WDR5IE.js";import"../../chunk-LUBJKUVV.js";import"../../chunk-PY7OOQEZ.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-SP3TRDKA.js";import"../../chunk-5545A3PC.js";import"../../chunk-324PHMLC.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-BVN33R76.js";import"../../chunk-43AEUUNQ.js";import"../../chunk-SINAM2IT.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-M2Z775ZC.js";import"../../chunk-J4MHNAED.js";import"../../chunk-MS2U6MV5.js";import"../../chunk-JC34NH4G.js";import"../../chunk-V7U33NF2.js";import"../../chunk-5DPIGWUL.js";import"../../chunk-M62P4IQK.js";import"../../chunk-EZG3TGQ7.js";import"../../chunk-ERR437B5.js";import"../../chunk-RYNBSKE7.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-LNHT2KPX.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-4VJATVVR.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-23DYNW6S.js";import"../../chunk-BHRC3ASL.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-CPFDJMFD.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-5ZBV5RA6.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-WXFZD7WC.js";import"../../chunk-BALFHI3G.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-ZG6PVMC3.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-Z2V3TTAR.js";import"../../chunk-KAML3KQH.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";
1
+ export{DocumentScreen,ScreenMount as default}from"../../chunk-6U6AISPX.js";import"../../chunk-GXQCZJOP.js";import"../../chunk-LOXB5OVK.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-JBOSEHIX.js";import"../../chunk-FGNR22NY.js";import"../../chunk-LER7RKTO.js";import"../../chunk-FGYJ5DJY.js";import"../../chunk-7F52SZOI.js";import"../../chunk-MQNBD6AB.js";import"../../chunk-3Z2MVLCD.js";import"../../chunk-BQMZ2YAF.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-C56MPJBH.js";import"../../chunk-OD4WIIER.js";import"../../chunk-UAS2LEW2.js";import"../../chunk-PY7OOQEZ.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-45NZSAND.js";import"../../chunk-5545A3PC.js";import"../../chunk-LFHMDGLE.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-BVN33R76.js";import"../../chunk-43AEUUNQ.js";import"../../chunk-SINAM2IT.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-M2Z775ZC.js";import"../../chunk-I2BCNLLV.js";import"../../chunk-MS2U6MV5.js";import"../../chunk-EFQCH7CO.js";import"../../chunk-5DPIGWUL.js";import"../../chunk-M62P4IQK.js";import"../../chunk-EZG3TGQ7.js";import"../../chunk-ERR437B5.js";import"../../chunk-RYNBSKE7.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-LNHT2KPX.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-4VJATVVR.js";import"../../chunk-23DYNW6S.js";import"../../chunk-V7U33NF2.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-Z2V3TTAR.js";import"../../chunk-KAML3KQH.js";import"../../chunk-UZXGXMNO.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ZFFWO2AF.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-67GNT6PF.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-WXFZD7WC.js";import"../../chunk-BALFHI3G.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-ZG6PVMC3.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-BHRC3ASL.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-PLVEGYK6.js";
@@ -59,7 +59,9 @@ import '../lib/puck/slot-section-spec.js';
59
59
  * seven container blocks' fields while the editor stays open.
60
60
  * - `onChange` hears every change to the document — once per change, once per
61
61
  * batch, once per undo — through a subscription, so the newest callback is
62
- * the one called.
62
+ * the one called. Except the ENGINE'S OWN change on mount: until the first
63
+ * edit, a document that is still `easel.loaded` is not handed on, so
64
+ * opening and closing a document writes nothing (2026-10-23).
63
65
  * - `permissions` follow the edit lock (`documentPermissions`, every key
64
66
  * named).
65
67
  *
@@ -1 +1 @@
1
- export{ScreenStoreProvider as default}from"../../chunk-SP3TRDKA.js";import"../../chunk-J4MHNAED.js";import"../../chunk-LNHT2KPX.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-CPFDJMFD.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-5ZBV5RA6.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-BALFHI3G.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{ScreenStoreProvider as default}from"../../chunk-45NZSAND.js";import"../../chunk-I2BCNLLV.js";import"../../chunk-LNHT2KPX.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-UZXGXMNO.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ZFFWO2AF.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-67GNT6PF.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-BALFHI3G.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-PLVEGYK6.js";
@@ -1,17 +1,17 @@
1
- import{AddBlockRow as e}from"../../chunk-CM732ENS.js";import{scrollPreviewToSection as n,gotoPreviewSlide as o}from"../../chunk-4ES5JGGX.js";import{useEaselUndoKeys as r}from"../../chunk-6DNDTEF6.js";import{SlotChildActionsProvider as t}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as s}from"../../chunk-C56MPJBH.js";import{usePartBridge as i}from"../../chunk-T5WDR5IE.js";import{useSectionOps as c}from"../../chunk-LUBJKUVV.js";import"../../chunk-M2Z775ZC.js";import{SELECTION_MODE as p,useScreenPinned as l,useScreenCanvasFrame as m,useScreenInspectorPanel as d,useScreenPickFollowsSelection as a,sameInspectorMode as u,useStandaloneScreenBridges as h,useScreenBlockLook as k,useScreenBlockRules as j}from"../../chunk-J4MHNAED.js";import{MediaPopup as f}from"../../chunk-MS2U6MV5.js";import{useScreenDocument as S}from"../../chunk-M62P4IQK.js";import"../../chunk-EZG3TGQ7.js";import"../../chunk-ERR437B5.js";import"../../chunk-RYNBSKE7.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-LNHT2KPX.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-U3JP4VGF.js";import{DEFAULT_SCREEN_WORDS as N}from"../../chunk-23DYNW6S.js";import{slotChildRowName as y}from"../../chunk-BHRC3ASL.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-IYT6NN2J.js";import{slotFieldsOf as M,nestsInTree as C}from"../../chunk-PLVEGYK6.js";import{useEasel as P}from"../../chunk-CPFDJMFD.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-5ZBV5RA6.js";import"../../chunk-BPXEFVSQ.js";import{LayersTree as R,Subtree as x,TreeRow as A,TreeRowAction as D,TreeSeam as B}from"../../chunk-A6Z4SD3I.js";import{DEFAULT_TREE_WORDS as g}from"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-BALFHI3G.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-NDRZP6YR.js";import{DEFAULT_SAVE_WORDS as V,saveIndicator as v}from"../../chunk-H6DDIBQ4.js";import{SaveState as z,panelWidthVars as E}from"../../chunk-ZG6PVMC3.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import{useWords as H}from"../../chunk-MFIRYGHW.js";import"../../chunk-Z2V3TTAR.js";import"../../chunk-KAML3KQH.js";import{useTreeDrag as T}from"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import{zoneKey as b,parseZoneKey as F}from"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import{useState as w,useRef as K,useEffect as L,useCallback as Z,Fragment as W}from"react";import{Tooltip as G}from"efficient-shell/ui";import{TrashIcon as J}from"efficient-shell/icons/efficient";import{jsxs as O,jsx as Y,Fragment as X}from"react/jsx-runtime";var I=e=>n=>{n.target.closest("button, input")||e()},$={rowClick:I};function Q(){const{saveState:Q,readOnly:U,readOnlyReason:q=null}=S(),_=c(),{appState:ee,selectedItem:ne,config:oe}=P(e=>e),[re,te]=w(p),se=H("screen",N),ie=H("tree",g),ce=H("save",V),{first:pe,last:le,panelOf:me}=l(),de=me(pe),ae=m(),ue=d(),he=ee.data.content?.[0]??null,ke=he?.props.id??null,je=he?.type===pe,fe=he?.type===le,Se=K(null),Ne=K(null);r(Ne),a(ne?.props.id),L(()=>{ke&&Se.current!==ke&&(Se.current=ke,je?te(de??p):ne||_.select({index:0}))},[ke,ne,_,je]);const ye=Z(e=>te(n=>u(n,e)?n:e),[]),Me=h({kind:re.kind,mode:re,open:ye,show:e=>te(e),reveal:()=>{},select:(e,n)=>{te(e=>u(e,n)?e:n),_.select(e)}}),{selectNode:Ce}=i({mode:re,setMode:te,onOpenPart:n}),Pe=k(),{labelAtLevel:Re,Icon:xe}=Pe,{canAddTo:Ae}=j(),De=e=>Re(e,"block",oe.components[e]?.label??e),Be=e=>Re(e,"section",De(e)),ge=!je&&"puck"===re.kind&&ne?.props.id===ke,Ve=he?Ae(he.type)?.spec??null:null,ve=he&&Ve?`${he.props.id}:${Ve.slot}`:null,ze=he&&Ve&&Array.isArray(he.props[Ve.slot])?he.props[Ve.slot]:[],Ee=e=>y(e,De,Pe.plainText),He=(e,r)=>{he&&Ve&&ve&&(te(p),Ve.slider?(o(String(he.props.id),e),_.select({index:e,zone:ve}),n(String(he.props.id))):(_.select({index:e,zone:ve}),n(r)))},Te=()=>{if(!he||!Ve||!ve)return;const e=ze.length;_.insertComponent(ve,Ve.childType,e),te(p),Ve.slider?requestAnimationFrame(()=>{o(String(he.props.id),e),_.select({index:e,zone:ve})}):_.select({index:e,zone:ve})},be=e=>M(oe,e),Fe=e=>{const{parentId:n,slot:o}=F(e),r=e=>{if(!e)return null;if(String(e.props.id)===n)return e;for(const n of be(e.type)){const o=Array.isArray(e.props[n])?e.props[n]:[];for(const e of o){const n=r(e);if(n)return n}}return null},t=r(he)?.props[o];return Array.isArray(t)?t.length:0},we=(e,n,o)=>{const r=Math.min(Math.max(o,0),Fe(e)),t=n<r?r-1:r;t!==n&&(_.reorderComponent(e,n,t),te(p),_.select({index:t,zone:e}))},Ke=T({keyOf:e=>e.id,readOnly:Boolean(U),canDrop:(e,n)=>b(n)===e.zone&&n.index>=0&&n.index<=Fe(e.zone),onDrop:(e,n)=>we(e.zone,e.index,n.index),onStep:(e,n)=>we(e.zone,e.index,n<0?e.index-1:e.index+2)}),Le=(e,n)=>/* @__PURE__ */Y(B,{...U?{}:Ke.seam({place:{...F(e),index:n}})},`seam:${e}:${n}`),Ze=e=>Pe.blockRowName(e,De),We=(e,o,r)=>{te(p),_.select({index:o,zone:e}),n(r)},Ge=(e,n,o)=>{_.insertComponent(e,n,o),te(p),_.select({index:o,zone:e})},Je=(n,o,r)=>/* @__PURE__ */Y(e,{choices:r,onPick:e=>Ge(n,e,o)}),Oe=(e,n)=>{const o=be((r=e).type).flatMap(e=>(Array.isArray(r.props[e])?r.props[e]:[]).map((n,o)=>({child:n,zone:`${r.props.id}:${e}`,index:o})));var r;const t=Ae(e.type),s=t?.choices??null,i="footer"===t?.source?Ze:Ee;/* @__PURE__ */
2
- return O(X,{children:[o.map(({child:e,zone:o,index:r})=>{const t=ne?.props.id===e.props.id,s=C(oe,e.type,n),c=i(e),l=String(e.props.id),m=()=>We(o,r,l),{rowProps:d,...a}=Ke.row({item:{id:l,zone:o,index:r},place:{...F(o),index:r}},{onClick:I(m)});/* @__PURE__ */
3
- return O(W,{children:[0===r&&Le(o,0),
4
- /* @__PURE__ */Y(A,{words:ie,icon:/* @__PURE__ */Y(xe,{type:e.type,size:13}),name:c,selected:t,onSelect:m,...a,actions:/* @__PURE__ */Y(D,{kind:"delete",label:se.deleteNamed({name:c}),onClick:()=>{return e=o,n=r,_.removeComponent(e,n),te(p),void _.select(null);var e,n},children:/* @__PURE__ */Y(J,{size:13})}),rowProps:d}),s&&/* @__PURE__ */Y(x,{children:Oe(e,n+1)}),Le(o,r+1)]},String(e.props.id??`${o}-${r}`))}),t&&s?Je(`${e.props.id}:${t.slot}`,o.length,s):null]})},Ye="HeroSingle"===he?.type,Xe=Boolean(he)&&(Boolean(Ae(he.type))||be(he.type).length>0),Ie=Boolean(he)&&(Boolean(Ve)||fe||je||Ye||Xe);/* @__PURE__ */
5
- return O("div",{ref:Ne,className:"sf-editor es-editor",style:E(s),children:[
6
- /* @__PURE__ */Y("div",{className:"sf-section-bar",children:/* @__PURE__ */Y(z,null!==q?{tone:"off",label:q,role:"status"}:{...v(Q,ce),role:"status"})}),
7
- /* @__PURE__ */O("div",{className:"sf-body",children:[Ie&&he&&/* @__PURE__ */O("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
8
- /* @__PURE__ */Y("div",{className:"sf-panel-head",children:/* @__PURE__ */Y(G,{content:je?se.headerSettings:se.sectionSettings({name:Be(he.type)}),side:"bottom",children:/* @__PURE__ */Y("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(ge?"is-selected":""),"aria-pressed":ge,onClick:()=>{je?te(de??p):(te(p),_.select({index:0}))},children:Be(he.type)})})}),
9
- /* @__PURE__ */Y(R,{className:"sf-tree sf-scroll",rootProps:Ke.rootProps(),words:ie,children:/* @__PURE__ */Y(x,{children:je?
10
- /* @__PURE__ */Y(A,{words:ie,icon:/* @__PURE__ */Y(xe,{type:"header",size:13}),name:se.headerSettings,selected:re.kind===de?.kind,onSelect:()=>te(de??p),rowProps:{onClick:I(()=>te(de??p))}}):Ve?/* @__PURE__ */O(X,{children:[ze.map((e,n)=>{const o=ne?.props.id===e.props.id,r=Ee(e),t=String(e.props.id),s=()=>He(n,t),{rowProps:i,...c}=Ke.row({item:{id:t,zone:ve,index:n},place:{...F(ve),index:n}},{onClick:I(s)});/* @__PURE__ */
11
- return O(W,{children:[0===n&&Le(ve,0),
12
- /* @__PURE__ */Y(A,{words:ie,icon:/* @__PURE__ */Y(xe,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */Y(D,{kind:"delete",label:se.deleteNamed({name:r}),onClick:()=>{return e=n,void(ve&&(_.removeComponent(ve,e),te(p),_.select(null)));var e},children:/* @__PURE__ */Y(J,{size:13})}),rowProps:i}),Le(ve,n+1)]},String(e.props.id??n))}),
13
- /* @__PURE__ */O("button",{type:"button",className:"sf-add-card",onClick:Te,children:[
14
- /* @__PURE__ */Y("span",{className:"sf-plus sf-plus--sm",children:"+"}),Ve.addLabel]}),ke?Me.partRows?.(he,$):null]}):Oe(he,1)})})]}),
15
- /* @__PURE__ */Y("div",{className:"sf-center",children:/* @__PURE__ */Y("div",{className:"sf-preview-host",children:/* @__PURE__ */Y(ae,{})})}),
16
- /* @__PURE__ */Y(t,{value:{selectChild:(e,n,o,r)=>"section"===Ae(r)?.source?He(n,o):We(e,n,o),addChild:(e,n,o,r,t)=>"section"===Ae(t)?.source?Te():Ge(`${e}:${n}`,o,r),childRowName:Ee,blockRowName:Ze},children:/* @__PURE__ */Y(ue,{mode:re,onOpenWebsiteSettings:Me.openSettings??(()=>{}),onSelectNode:Ce,hideNodeActions:!0})})]}),
17
- /* @__PURE__ */Y(f,{})]})}export{Q as default};
1
+ import{AddBlockRow as e}from"../../chunk-RTCNJRF6.js";import{scrollPreviewToSection as n,gotoPreviewSlide as o}from"../../chunk-3Z2MVLCD.js";import{useEaselUndoKeys as r}from"../../chunk-BQMZ2YAF.js";import{SlotChildActionsProvider as t}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as s}from"../../chunk-C56MPJBH.js";import{usePartBridge as i}from"../../chunk-OD4WIIER.js";import{useSectionOps as c}from"../../chunk-UAS2LEW2.js";import"../../chunk-M2Z775ZC.js";import{SELECTION_MODE as p,useScreenPinned as l,useScreenCanvasFrame as m,useScreenInspectorPanel as d,useScreenPickFollowsSelection as a,sameInspectorMode as u,useStandaloneScreenBridges as h,useScreenBlockLook as k,useScreenBlockRules as j}from"../../chunk-I2BCNLLV.js";import{MediaPopup as f}from"../../chunk-MS2U6MV5.js";import{useScreenDocument as S}from"../../chunk-M62P4IQK.js";import"../../chunk-EZG3TGQ7.js";import"../../chunk-ERR437B5.js";import"../../chunk-RYNBSKE7.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-LNHT2KPX.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-U3JP4VGF.js";import{DEFAULT_SCREEN_WORDS as N}from"../../chunk-23DYNW6S.js";import"../../chunk-Z2V3TTAR.js";import"../../chunk-KAML3KQH.js";import{useEasel as y}from"../../chunk-UZXGXMNO.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ZFFWO2AF.js";import"../../chunk-BPXEFVSQ.js";import{LayersTree as C,Subtree as M,TreeRow as R,TreeRowAction as x,TreeSeam as A}from"../../chunk-A6Z4SD3I.js";import{DEFAULT_TREE_WORDS as P}from"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import{useTreeDrag as B}from"../../chunk-67GNT6PF.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-BALFHI3G.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-NDRZP6YR.js";import{DEFAULT_SAVE_WORDS as D,saveIndicator as g}from"../../chunk-H6DDIBQ4.js";import"../../chunk-X4T6JT3M.js";import{zoneKey as F,parseZoneKey as L}from"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import{SaveState as Z,panelWidthVars as v}from"../../chunk-ZG6PVMC3.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import{useWords as z}from"../../chunk-MFIRYGHW.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import{slotChildRowName as V}from"../../chunk-BHRC3ASL.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-IYT6NN2J.js";import{slotFieldsOf as b,nestsInTree as H}from"../../chunk-PLVEGYK6.js";import{useState as O,useRef as T,useEffect as W,useCallback as w,Fragment as E}from"react";import{Tooltip as K}from"efficient-shell/ui";import{TrashIcon as Y}from"efficient-shell/icons/efficient";import{jsxs as I,jsx as X,Fragment as G}from"react/jsx-runtime";var J=e=>n=>{n.target.closest("button, input")||e()},$={rowClick:J};function Q(){const{saveState:Q,readOnly:U,readOnlyReason:q=null}=S(),_=c(),{appState:ee,selectedItem:ne,config:oe}=y(e=>e),[re,te]=O(p),se=z("screen",N),ie=z("tree",P),ce=z("save",D),{first:pe,last:le,panelOf:me}=l(),de=me(pe),ae=m(),ue=d(),he=ee.data.content?.[0]??null,ke=he?.props.id??null,je=he?.type===pe,fe=he?.type===le,Se=T(null),Ne=T(null);r(Ne),a(ne?.props.id),W(()=>{ke&&Se.current!==ke&&(Se.current=ke,je?te(de??p):ne||_.select({index:0}))},[ke,ne,_,je]);const ye=w(e=>te(n=>u(n,e)?n:e),[]),Ce=h({kind:re.kind,mode:re,open:ye,show:e=>te(e),reveal:()=>{},select:(e,n)=>{te(e=>u(e,n)?e:n),_.select(e)}}),{selectNode:Me}=i({mode:re,setMode:te,onOpenPart:n}),Re=k(),{labelAtLevel:xe,Icon:Ae}=Re,{canAddTo:Pe}=j(),Be=e=>xe(e,"block",oe.components[e]?.label??e),De=e=>xe(e,"section",Be(e)),ge=!je&&"puck"===re.kind&&ne?.props.id===ke,Fe=he?Pe(he.type)?.spec??null:null,Le=he&&Fe?`${he.props.id}:${Fe.slot}`:null,Ze=he&&Fe&&Array.isArray(he.props[Fe.slot])?he.props[Fe.slot]:[],ve=e=>V(e,Be,Re.plainText),ze=(e,r)=>{he&&Fe&&Le&&(te(p),Fe.slider?(o(String(he.props.id),e),_.select({index:e,zone:Le}),n(String(he.props.id))):(_.select({index:e,zone:Le}),n(r)))},Ve=()=>{if(!he||!Fe||!Le)return;const e=Ze.length;_.insertComponent(Le,Fe.childType,e),te(p),Fe.slider?requestAnimationFrame(()=>{o(String(he.props.id),e),_.select({index:e,zone:Le})}):_.select({index:e,zone:Le})},be=e=>b(oe,e),He=e=>{const{parentId:n,slot:o}=L(e),r=e=>{if(!e)return null;if(String(e.props.id)===n)return e;for(const n of be(e.type)){const o=Array.isArray(e.props[n])?e.props[n]:[];for(const e of o){const n=r(e);if(n)return n}}return null},t=r(he)?.props[o];return Array.isArray(t)?t.length:0},Oe=(e,n,o)=>{const r=Math.min(Math.max(o,0),He(e)),t=n<r?r-1:r;t!==n&&(_.reorderComponent(e,n,t),te(p),_.select({index:t,zone:e}))},Te=B({keyOf:e=>e.id,readOnly:Boolean(U),canDrop:(e,n)=>F(n)===e.zone&&n.index>=0&&n.index<=He(e.zone),onDrop:(e,n)=>Oe(e.zone,e.index,n.index),onStep:(e,n)=>Oe(e.zone,e.index,n<0?e.index-1:e.index+2)}),We=(e,n)=>/* @__PURE__ */X(A,{...U?{}:Te.seam({place:{...L(e),index:n}})},`seam:${e}:${n}`),we=e=>Re.blockRowName(e,Be),Ee=(e,o,r)=>{te(p),_.select({index:o,zone:e}),n(r)},Ke=(e,n,o)=>{_.insertComponent(e,n,o),te(p),_.select({index:o,zone:e})},Ye=(n,o,r)=>/* @__PURE__ */X(e,{choices:r,onPick:e=>Ke(n,e,o)}),Ie=(e,n)=>{const o=be((r=e).type).flatMap(e=>(Array.isArray(r.props[e])?r.props[e]:[]).map((n,o)=>({child:n,zone:`${r.props.id}:${e}`,index:o})));var r;const t=Pe(e.type),s=t?.choices??null,i="footer"===t?.source?we:ve;/* @__PURE__ */
2
+ return I(G,{children:[o.map(({child:e,zone:o,index:r})=>{const t=ne?.props.id===e.props.id,s=H(oe,e.type,n),c=i(e),l=String(e.props.id),m=()=>Ee(o,r,l),{rowProps:d,...a}=Te.row({item:{id:l,zone:o,index:r},place:{...L(o),index:r}},{onClick:J(m)});/* @__PURE__ */
3
+ return I(E,{children:[0===r&&We(o,0),
4
+ /* @__PURE__ */X(R,{words:ie,icon:/* @__PURE__ */X(Ae,{type:e.type,size:13}),name:c,selected:t,onSelect:m,...a,actions:/* @__PURE__ */X(x,{kind:"delete",label:se.deleteNamed({name:c}),onClick:()=>{return e=o,n=r,_.removeComponent(e,n),te(p),void _.select(null);var e,n},children:/* @__PURE__ */X(Y,{size:13})}),rowProps:d}),s&&/* @__PURE__ */X(M,{children:Ie(e,n+1)}),We(o,r+1)]},String(e.props.id??`${o}-${r}`))}),t&&s?Ye(`${e.props.id}:${t.slot}`,o.length,s):null]})},Xe="HeroSingle"===he?.type,Ge=Boolean(he)&&(Boolean(Pe(he.type))||be(he.type).length>0),Je=Boolean(he)&&(Boolean(Fe)||fe||je||Xe||Ge);/* @__PURE__ */
5
+ return I("div",{ref:Ne,className:"sf-editor es-editor",style:v(s),children:[
6
+ /* @__PURE__ */X("div",{className:"sf-section-bar",children:/* @__PURE__ */X(Z,null!==q?{tone:"off",label:q,role:"status"}:{...g(Q,ce),role:"status"})}),
7
+ /* @__PURE__ */I("div",{className:"sf-body",children:[Je&&he&&/* @__PURE__ */I("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
8
+ /* @__PURE__ */X("div",{className:"sf-panel-head",children:/* @__PURE__ */X(K,{content:je?se.headerSettings:se.sectionSettings({name:De(he.type)}),side:"bottom",children:/* @__PURE__ */X("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(ge?"is-selected":""),"aria-pressed":ge,onClick:()=>{je?te(de??p):(te(p),_.select({index:0}))},children:De(he.type)})})}),
9
+ /* @__PURE__ */X(C,{className:"sf-tree sf-scroll",rootProps:Te.rootProps(),words:ie,children:/* @__PURE__ */X(M,{children:je?
10
+ /* @__PURE__ */X(R,{words:ie,icon:/* @__PURE__ */X(Ae,{type:"header",size:13}),name:se.headerSettings,selected:re.kind===de?.kind,onSelect:()=>te(de??p),rowProps:{onClick:J(()=>te(de??p))}}):Fe?/* @__PURE__ */I(G,{children:[Ze.map((e,n)=>{const o=ne?.props.id===e.props.id,r=ve(e),t=String(e.props.id),s=()=>ze(n,t),{rowProps:i,...c}=Te.row({item:{id:t,zone:Le,index:n},place:{...L(Le),index:n}},{onClick:J(s)});/* @__PURE__ */
11
+ return I(E,{children:[0===n&&We(Le,0),
12
+ /* @__PURE__ */X(R,{words:ie,icon:/* @__PURE__ */X(Ae,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */X(x,{kind:"delete",label:se.deleteNamed({name:r}),onClick:()=>{return e=n,void(Le&&(_.removeComponent(Le,e),te(p),_.select(null)));var e},children:/* @__PURE__ */X(Y,{size:13})}),rowProps:i}),We(Le,n+1)]},String(e.props.id??n))}),
13
+ /* @__PURE__ */I("button",{type:"button",className:"sf-add-card",onClick:Ve,children:[
14
+ /* @__PURE__ */X("span",{className:"sf-plus sf-plus--sm",children:"+"}),Fe.addLabel]}),ke?Ce.partRows?.(he,$):null]}):Ie(he,1)})})]}),
15
+ /* @__PURE__ */X("div",{className:"sf-center",children:/* @__PURE__ */X("div",{className:"sf-preview-host",children:/* @__PURE__ */X(ae,{})})}),
16
+ /* @__PURE__ */X(t,{value:{selectChild:(e,n,o,r)=>"section"===Pe(r)?.source?ze(n,o):Ee(e,n,o),addChild:(e,n,o,r,t)=>"section"===Pe(t)?.source?Ve():Ke(`${e}:${n}`,o,r),childRowName:ve,blockRowName:we},children:/* @__PURE__ */X(ue,{mode:re,onOpenWebsiteSettings:Ce.openSettings??(()=>{}),onSelectNode:Me,hideNodeActions:!0})})]}),
17
+ /* @__PURE__ */X(f,{})]})}export{Q as default};