efficient-easel 26.15.0 → 27.0.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 (87) hide show
  1. package/README.md +9 -8
  2. package/dist/{canvas-typing--FlIZwbT.d.ts → canvas-typing-CD1aeYnk.d.ts} +7 -0
  3. package/dist/chunk-2262JGFV.js +5 -0
  4. package/dist/{chunk-NUJEHA6A.js → chunk-3W2O22DZ.js} +10 -10
  5. package/dist/chunk-53QUHEHK.js +1 -0
  6. package/dist/{chunk-7U4HEUZM.js → chunk-5JNVMCCB.js} +1 -1
  7. package/dist/{chunk-5OYP3C2K.js → chunk-5OWAV3MH.js} +1 -1
  8. package/dist/chunk-76MUJIZE.js +17 -0
  9. package/dist/{chunk-YMK3MZJK.js → chunk-AAZIMKLQ.js} +1 -1
  10. package/dist/{chunk-PG7G7ELT.js → chunk-BFJAEQZ6.js} +1 -1
  11. package/dist/chunk-DAKKPW2Z.js +1 -0
  12. package/dist/chunk-DIOTWSCO.js +1 -0
  13. package/dist/chunk-FW35PCK7.js +1 -0
  14. package/dist/{chunk-C4TJN6GR.js → chunk-G2VZ4DET.js} +1 -1
  15. package/dist/{chunk-WMC6FE3G.js → chunk-HG65R6IN.js} +14 -14
  16. package/dist/chunk-L2WK5JYB.js +2 -0
  17. package/dist/chunk-L7PSERQH.js +8 -0
  18. package/dist/{chunk-3BQT7FC7.js → chunk-MNQDOSAX.js} +2 -2
  19. package/dist/{chunk-H4TUOPI7.js → chunk-NTG5ODKZ.js} +1 -1
  20. package/dist/{chunk-2EDOL4IW.js → chunk-O4OWODU2.js} +35 -35
  21. package/dist/chunk-TDEBPOWV.js +3 -0
  22. package/dist/{chunk-3ZGOVNVH.js → chunk-TYTMUHUK.js} +1 -1
  23. package/dist/chunk-W3UZNKGS.js +7 -0
  24. package/dist/{chunk-CLAADE4J.js → chunk-XWTQTANN.js} +5 -5
  25. package/dist/{chunk-MGEXTIZH.js → chunk-YES5F7OS.js} +1 -1
  26. package/dist/chunk-ZFEAWEFS.js +4 -0
  27. package/dist/chunk-ZNLODQD4.js +3 -0
  28. package/dist/copy/index.d.ts +3 -3
  29. package/dist/copy/index.js +12 -12
  30. package/dist/draw/index.js +1 -1
  31. package/dist/easel/index.d.ts +2 -2
  32. package/dist/easel/index.js +1 -1
  33. package/dist/fields/index.d.ts +43 -16
  34. package/dist/fields/index.js +1 -1
  35. package/dist/panel/index.js +1 -1
  36. package/dist/{rowMarks-CO5TpfLY.d.ts → rowMarks-D2cO7UTi.d.ts} +5 -5
  37. package/dist/screen/components/AddBlockRow.js +1 -1
  38. package/dist/screen/components/AddSidePanel.js +1 -1
  39. package/dist/screen/components/NodeContextMenu.js +1 -1
  40. package/dist/screen/components/PageEditGuardNotices.js +1 -1
  41. package/dist/screen/components/ScreenChrome.js +1 -1
  42. package/dist/screen/components/ScreenDocumentContext.js +1 -1
  43. package/dist/screen/components/ScreenMount.js +1 -1
  44. package/dist/screen/components/ScreenStoreProvider.js +1 -1
  45. package/dist/screen/components/SectionScreenShell.js +17 -17
  46. package/dist/screen/components/usePartBridge.js +1 -1
  47. package/dist/screen/index.js +1 -1
  48. package/dist/screen/lib/content/view-tiers.d.ts +11 -1
  49. package/dist/screen/lib/content/view-tiers.js +1 -1
  50. package/dist/screen/lib/document/block-set-host.js +1 -1
  51. package/dist/screen/lib/document/block-size-fields.js +1 -1
  52. package/dist/screen/lib/document/box-fields.d.ts +41 -13
  53. package/dist/screen/lib/document/box-fields.js +1 -1
  54. package/dist/screen/lib/document/button-fields.js +1 -1
  55. package/dist/screen/lib/document/device-fields.d.ts +10 -17
  56. package/dist/screen/lib/document/device-fields.js +1 -1
  57. package/dist/screen/lib/document/image-fields.js +5 -5
  58. package/dist/screen/lib/document/panel-no-control-mark.d.ts +2 -2
  59. package/dist/screen/lib/document/shadow-fields.js +2 -2
  60. package/dist/screen/lib/document/style-clipboard.js +1 -1
  61. package/dist/screen/lib/document/style-fields.js +1 -1
  62. package/dist/screen/lib/document/use-section-ops.js +1 -1
  63. package/dist/screen/lib/key-scope.js +1 -1
  64. package/dist/screen/lib/screen-parts.d.ts +0 -10
  65. package/dist/screen/lib/screen-parts.js +1 -1
  66. package/dist/screen/screen.css +0 -6
  67. package/dist/screen/words.d.ts +1 -3
  68. package/dist/screen/words.js +1 -1
  69. package/dist/strings/index.js +2 -2
  70. package/dist/text-styles/index.d.ts +6 -5
  71. package/dist/text-styles/index.js +37 -37
  72. package/dist/text-styles/model.d.ts +24 -14
  73. package/dist/text-styles/model.js +1 -1
  74. package/dist/{types-CVHwspYM.d.ts → types-DcyH17ij.d.ts} +2 -0
  75. package/package.json +1 -1
  76. package/dist/chunk-BLE3U2GS.js +0 -2
  77. package/dist/chunk-CPIWSFGR.js +0 -2
  78. package/dist/chunk-E52W3M5I.js +0 -1
  79. package/dist/chunk-IHOTVWDE.js +0 -7
  80. package/dist/chunk-K6TDOXHR.js +0 -17
  81. package/dist/chunk-L4DFCNDQ.js +0 -5
  82. package/dist/chunk-M4SOZEZR.js +0 -4
  83. package/dist/chunk-RWGOCHH7.js +0 -1
  84. package/dist/chunk-U4TG43PD.js +0 -1
  85. package/dist/chunk-VVHDUTAE.js +0 -8
  86. package/dist/chunk-YHZSBL2N.js +0 -1
  87. package/dist/chunk-ZEH6QLBH.js +0 -4
@@ -1,4 +1,4 @@
1
- import{SettingsSwitch as e}from"../chunk-OECWLNKJ.js";import{TEXT_STYLE_CASES as t}from"../chunk-YHZSBL2N.js";import{selectionToVisible as n,selectionToSource as r,richLayout as l,createHistory as o,colorRunOf as a,textRange as s,selectionBox as c,placeWindow as i,offsetOrigin as u,visibleArea as d,styleChange as p,clearRangeOf as h,ColorWindow as m,markPress as f,pasteToMarkup as g,richInput as y,editVisible as v,MARKUP_CLIPBOARD_TYPE as b,markupOfRange as k}from"../chunk-3BQT7FC7.js";export{ColorWindow,MARKUP_CLIPBOARD_TYPE,TYPING_BURST_MS,clearRangeOf,colorRunOf,createHistory,editVisible,markupOfRange,newLine,pasteToMarkup,richInput,richLayout,selectionToSource,selectionToVisible,setBullet,startCanvasTyping,textMap,toSource,toSourceStart,toVisible}from"../chunk-3BQT7FC7.js";import{DEFAULT_COPY_WORDS as x}from"../chunk-PMRN5Z3T.js";import{FieldNumber as S}from"../chunk-Y2T3JX7K.js";import{FieldSelect as E}from"../chunk-KFWNGPW3.js";import{SettingsField as w}from"../chunk-MIX7EGRG.js";import{SettingsSegmented as C}from"../chunk-DX3VILZ3.js";import"../chunk-JACEEVVF.js";import{useWords as N}from"../chunk-MFIRYGHW.js";import{registerModalEscapeInterceptor as D,textToolbarRows as T,TextToolbar as O,textAlignWords as L,useShellStrings as R,textAlignOptions as K,TEXT_ALIGNS as F,LinkPicker as j,Tooltip as B,IconButton as M}from"efficient-shell/ui";export{TextToolbar}from"efficient-shell/ui";import{useRef as V,useState as H,useLayoutEffect as W,useEffect as $,useId as P}from"react";import{RETIRED_MARKS as z,applyMark as I,marksIn as q,STANDARD_MARKUP as Y,listIn as A,colorIn as G,styleIn as U,clearStyle as Z,spanFor as _,findLink as J,tokenizeInline as X,colorOver as Q,setList as ee,unlinkAt as te,removeLink as ne,linkOver as re,writeLink as le}from"efficient-shell/markup";import{jsxs as oe,jsx as ae,Fragment as se}from"react/jsx-runtime";import{ParagraphSpacingIcon as ce,LetterSpacingIcon as ie,LineSpacingIcon as ue,TextSizeIcon as de,StylesIcon as pe,TypeIcon as he,AlignmentIcon as me,ListFormatIcon as fe,CaseIcon as ge,ItalicIcon as ye,NumberedListIcon as ve,ListIcon as be,ListNoneIcon as ke,CaseLowerIcon as xe,CaseCapitalizedIcon as Se,CaseUpperIcon as Ee,CaseNormalIcon as we}from"efficient-shell/icons/efficient";function Ce(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 Ne({value:e,rules:t=Y,className:n,layerRef:r}){const l=function(e,t){const n=[];let r=0;for(const l of X(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=Ce(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{SettingsSwitch as e}from"../chunk-OECWLNKJ.js";import{TEXT_STYLE_CASES as t}from"../chunk-53QUHEHK.js";import"../chunk-DIOTWSCO.js";import{selectionToVisible as n,selectionToSource as r,richLayout as l,createHistory as o,colorRunOf as a,textRange as s,selectionBox as c,placeWindow as i,offsetOrigin as u,visibleArea as d,styleChange as p,clearRangeOf as h,ColorWindow as m,markPress as f,pasteToMarkup as g,richInput as y,editVisible as v,MARKUP_CLIPBOARD_TYPE as b,markupOfRange as k}from"../chunk-MNQDOSAX.js";export{ColorWindow,MARKUP_CLIPBOARD_TYPE,TYPING_BURST_MS,clearRangeOf,colorRunOf,createHistory,editVisible,markupOfRange,newLine,pasteToMarkup,richInput,richLayout,selectionToSource,selectionToVisible,setBullet,startCanvasTyping,textMap,toSource,toSourceStart,toVisible}from"../chunk-MNQDOSAX.js";import{DEFAULT_COPY_WORDS as x}from"../chunk-PMRN5Z3T.js";import{FieldNumber as S}from"../chunk-Y2T3JX7K.js";import{FieldSelect as E}from"../chunk-KFWNGPW3.js";import{SettingsSegmented as w}from"../chunk-DX3VILZ3.js";import{SettingsField as C}from"../chunk-MIX7EGRG.js";import"../chunk-JACEEVVF.js";import{useWords as N}from"../chunk-MFIRYGHW.js";import{registerModalEscapeInterceptor as D,textToolbarRows as T,TextToolbar as O,textAlignWords as L,useShellStrings as R,textAlignOptions as K,TEXT_ALIGNS as j,LinkPicker as F,Tooltip as M,IconButton as B}from"efficient-shell/ui";export{TextToolbar}from"efficient-shell/ui";import{useRef as H,useState as V,useLayoutEffect as W,useEffect as $,useId as P}from"react";import{RETIRED_MARKS as z,applyMark as I,marksIn as q,STANDARD_MARKUP as A,listIn as U,colorIn as G,styleIn as X,clearStyle as Y,spanFor as _,findLink as J,tokenizeInline as Q,colorOver as Z,setList as ee,unlinkAt as te,removeLink as ne,linkOver as re,writeLink as le}from"efficient-shell/markup";import{jsxs as oe,jsx as ae,Fragment as se}from"react/jsx-runtime";import{ParagraphSpacingIcon as ce,LetterSpacingIcon as ie,LineSpacingIcon as ue,TextSizeIcon as de,StylesIcon as pe,TypeIcon as he,AlignmentIcon as me,ListFormatIcon as fe,CaseIcon as ge,ItalicIcon as ye,NumberedListIcon as ve,ListIcon as be,ListNoneIcon as ke,CaseLowerIcon as xe,CaseCapitalizedIcon as Se,CaseUpperIcon as Ee,CaseNormalIcon as we}from"efficient-shell/icons/efficient";function Ce(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 Ne({value:e,rules:t=A,className:n,layerRef:r}){const l=function(e,t){const n=[];let r=0;for(const l of Q(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=Ce(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 ae("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 ae("span",{className:"es-gold-delim",children:r},t);case"accent":case"highlight":/* @__PURE__ */
4
4
  return ae("em",{className:"es-gold-mark es-gold-accent",children:r},t);case"bold":/* @__PURE__ */
@@ -6,24 +6,24 @@ return ae("strong",{className:"es-gold-mark es-gold-bold",children:r},t);case"it
6
6
  return ae("em",{className:"es-gold-mark es-gold-italic",children:r},t);case"strike":/* @__PURE__ */
7
7
  return ae("s",{className:"es-gold-mark es-gold-strike",children:r},t);case"quiet":/* @__PURE__ */
8
8
  return ae("span",{className:"es-gold-mark es-gold-quiet",children:r},t);default:/* @__PURE__ */
9
- return ae("span",{className:"es-gold-text",children:r},t)}}(e,t))})}function De({value:e,onInput:t,onCommit:n,onCancel:r,multiline:l=!1,placeholder:o,className:a,rules:s=Y,ariaLabel:c,disabled:i=!1,inputRef:u}){const d=V(null),p=V(e),h=V(!1);function m(e){h.current&&(h.current=!1,n?.(e))}/* @__PURE__ */
9
+ return ae("span",{className:"es-gold-text",children:r},t)}}(e,t))})}function De({value:e,onInput:t,onCommit:n,onCancel:r,multiline:l=!1,placeholder:o,className:a,rules:s=A,ariaLabel:c,disabled:i=!1,inputRef:u}){const d=H(null),p=H(e),h=H(!1);function m(e){h.current&&(h.current=!1,n?.(e))}/* @__PURE__ */
10
10
  return oe("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__ */ae(Ne,{value:e,rules:s,layerRef:d}),o&&""===e?
12
12
  /* @__PURE__ */ae("div",{className:"es-gold-placeholder","aria-hidden":"true",children:o}):null,
13
- /* @__PURE__ */ae("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 Te(e,t){const n=t?.selectionStart??e.length;return{start:n,end:t?.selectionEnd??n}}function Oe(e,t,n,r=I){const{start:l,end:o}=Te(e,n);return r(e,l,o,t)}function Le(e,t,n){const{start:r,end:l}=Te(e,n),o=r+t.length;return{text:e.slice(0,r)+t+e.slice(l),selectionStart:o,selectionEnd:o}}function Re(e,t,n,r,l){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}`,l&&(n.dataset.textStyle=l),n}}}function Ke(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 Fe(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 je({value:e,rules:t,multiline:o,readOnly:a=!1,placeholder:s,ariaLabel:c,handle:i,onEdit:u,onSelect:d,onHistory:p,onFormat:h,pending:m,onCommit:f,onCancel:x}){const S=V(null),E=V(null),w=V(null),C=V(null),N=V(null),D=V(e),[T,O]=H(0),L=V({value:e,rules:t,multiline:o,readOnly:a,pending:m,onEdit:u,onHistory:p,onFormat:h});L.current={value:e,rules:t,multiline:o,readOnly:a,pending:m,onEdit:u,onHistory:p,onFormat:h};const R=()=>{const e=S.current,t=E.current,n=e?.ownerDocument.getSelection();if(!(e&&t&&n&&0!==n.rangeCount&&n.anchorNode&&e.contains(n.anchorNode)))return null;const r=Ke(t,e,n.anchorNode,n.anchorOffset),l=n.focusNode&&e.contains(n.focusNode)?Ke(t,e,n.focusNode,n.focusOffset):r;return r<=l?[r,l]:[l,r]},K=(e,t)=>{const n=S.current,r=E.current;if(!n||!r)return;const[l,o]=Fe(r,e),[a,s]=Fe(r,t);n.ownerDocument.getSelection()?.setBaseAndExtent(l,o,a,s)};i.current={getSource(){const e=R(),t=E.current;if(!e||!t)return null;const[n,l]=r(t.layout,e[0],e[1]);return{start:n,end:l}},setSource(e,t,n){C.current={text:n,src:[e,t]},O(e=>e+1)},focus(){S.current?.focus()},rangeOf(e,t){const r=S.current,l=E.current;if(!r||!l)return null;const[o,a]=n(l.layout,e,t),[s,c]=Fe(l,o),[i,u]=Fe(l,a),d=r.ownerDocument.createRange();return d.setStart(s,c),d.setEnd(i,u),d}},W(()=>{const r=S.current;if(!r||N.current)return;const o=C.current?null:R();E.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=Re(n,e.marks[r].kind,e.marks[r].href,e.marks[r].color,e.marks[r].style);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}}(r,l(e,t)),w.current=e;const a=C.current;if(!a||a.text!==e)return void(o&&r.ownerDocument.activeElement===r&&K(o[0],Math.min(o[1],E.current.layout.text.length)));C.current=null;const s=E.current.layout,[c,i]=a.vis??n(s,a.src[0],a.src[1]);r.ownerDocument.activeElement!==r&&r.focus(),K(c,i)},[e,t,T]);const F=(e,t,n)=>{const l=E.current,[o,a]=r(l.layout,t[0],t[1]);C.current={text:e.text,vis:[e.caret,e.caret]},e.text!==L.current.value?L.current.onEdit(e.text,{start:o,end:a},n):O(e=>e+1)};$(()=>{const e=S.current;if(!e)return;const t=t=>{const{value:n,rules:r,multiline:l,readOnly:o,pending:a}=L.current;if("insertCompositionText"===t.inputType)return;if(t.preventDefault(),o)return;const s=E.current,c=R();if(!s||!c)return;const i="function"==typeof t.getTargetRanges?t.getTargetRanges()[0]:void 0,u=i&&!i.collapsed?[Ke(s,e,i.startContainer,i.startOffset),Ke(s,e,i.endContainer,i.endOffset)]:null,d=y({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?F(d.edit,d.range,d.kind):L.current.onFormat(d.style):L.current.onHistory(d.dir))},n=()=>{N.current||O(e=>e+1)};return e.addEventListener("beforeinput",t),e.addEventListener("input",n),()=>{e.removeEventListener("beforeinput",t),e.removeEventListener("input",n)}},[]),$(()=>{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 j=(n,r=!1)=>{const l=R();if(!l||l[0]===l[1])return;n.preventDefault();const o=E.current;n.clipboardData.setData("text/plain",o.layout.text.slice(l[0],l[1])),n.clipboardData.setData(b,k(e,t,l[0],l[1])),r&&!a&&F(v(e,t,l[0],l[1],{text:""}),l,"edit")};/* @__PURE__ */
13
+ /* @__PURE__ */ae("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 Te(e,t){const n=t?.selectionStart??e.length;return{start:n,end:t?.selectionEnd??n}}function Oe(e,t,n,r=I){const{start:l,end:o}=Te(e,n);return r(e,l,o,t)}function Le(e,t,n){const{start:r,end:l}=Te(e,n),o=r+t.length;return{text:e.slice(0,r)+t+e.slice(l),selectionStart:o,selectionEnd:o}}function Re(e,t,n,r,l){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}`,l&&(n.dataset.textStyle=l),n}}}function Ke(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 je(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 Fe({value:e,rules:t,multiline:o,readOnly:a=!1,placeholder:s,ariaLabel:c,handle:i,onEdit:u,onSelect:d,onHistory:p,onFormat:h,pending:m,onCommit:f,onCancel:x}){const S=H(null),E=H(null),w=H(null),C=H(null),N=H(null),D=H(e),[T,O]=V(0),L=H({value:e,rules:t,multiline:o,readOnly:a,pending:m,onEdit:u,onHistory:p,onFormat:h});L.current={value:e,rules:t,multiline:o,readOnly:a,pending:m,onEdit:u,onHistory:p,onFormat:h};const R=()=>{const e=S.current,t=E.current,n=e?.ownerDocument.getSelection();if(!(e&&t&&n&&0!==n.rangeCount&&n.anchorNode&&e.contains(n.anchorNode)))return null;const r=Ke(t,e,n.anchorNode,n.anchorOffset),l=n.focusNode&&e.contains(n.focusNode)?Ke(t,e,n.focusNode,n.focusOffset):r;return r<=l?[r,l]:[l,r]},K=(e,t)=>{const n=S.current,r=E.current;if(!n||!r)return;const[l,o]=je(r,e),[a,s]=je(r,t);n.ownerDocument.getSelection()?.setBaseAndExtent(l,o,a,s)};i.current={getSource(){const e=R(),t=E.current;if(!e||!t)return null;const[n,l]=r(t.layout,e[0],e[1]);return{start:n,end:l}},setSource(e,t,n){C.current={text:n,src:[e,t]},O(e=>e+1)},focus(){S.current?.focus()},rangeOf(e,t){const r=S.current,l=E.current;if(!r||!l)return null;const[o,a]=n(l.layout,e,t),[s,c]=je(l,o),[i,u]=je(l,a),d=r.ownerDocument.createRange();return d.setStart(s,c),d.setEnd(i,u),d}},W(()=>{const r=S.current;if(!r||N.current)return;const o=C.current?null:R();E.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=Re(n,e.marks[r].kind,e.marks[r].href,e.marks[r].color,e.marks[r].style);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}}(r,l(e,t)),w.current=e;const a=C.current;if(!a||a.text!==e)return void(o&&r.ownerDocument.activeElement===r&&K(o[0],Math.min(o[1],E.current.layout.text.length)));C.current=null;const s=E.current.layout,[c,i]=a.vis??n(s,a.src[0],a.src[1]);r.ownerDocument.activeElement!==r&&r.focus(),K(c,i)},[e,t,T]);const j=(e,t,n)=>{const l=E.current,[o,a]=r(l.layout,t[0],t[1]);C.current={text:e.text,vis:[e.caret,e.caret]},e.text!==L.current.value?L.current.onEdit(e.text,{start:o,end:a},n):O(e=>e+1)};$(()=>{const e=S.current;if(!e)return;const t=t=>{const{value:n,rules:r,multiline:l,readOnly:o,pending:a}=L.current;if("insertCompositionText"===t.inputType)return;if(t.preventDefault(),o)return;const s=E.current,c=R();if(!s||!c)return;const i="function"==typeof t.getTargetRanges?t.getTargetRanges()[0]:void 0,u=i&&!i.collapsed?[Ke(s,e,i.startContainer,i.startOffset),Ke(s,e,i.endContainer,i.endOffset)]:null,d=y({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?j(d.edit,d.range,d.kind):L.current.onFormat(d.style):L.current.onHistory(d.dir))},n=()=>{N.current||O(e=>e+1)};return e.addEventListener("beforeinput",t),e.addEventListener("input",n),()=>{e.removeEventListener("beforeinput",t),e.removeEventListener("input",n)}},[]),$(()=>{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 F=(n,r=!1)=>{const l=R();if(!l||l[0]===l[1])return;n.preventDefault();const o=E.current;n.clipboardData.setData("text/plain",o.layout.text.slice(l[0],l[1])),n.clipboardData.setData(b,k(e,t,l[0],l[1])),r&&!a&&j(v(e,t,l[0],l[1],{text:""}),l,"edit")};/* @__PURE__ */
14
14
  return oe("div",{className:"es-rich-wrap",children:[s&&""===e?/* @__PURE__ */ae("div",{className:"es-rich-placeholder","aria-hidden":"true",children:s}):null,
15
- /* @__PURE__ */ae("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:()=>{D.current=e},onBlur:()=>{e!==D.current&&f?.(e),D.current=e},onKeyDown:t=>{if("Escape"===t.key)return t.preventDefault(),x?.(D.current),void(D.current=e);"Enter"!==t.key||o||(t.preventDefault(),e!==D.current&&f?.(e),D.current=e)},onCompositionStart:()=>{const e=R()??[0,0];N.current={from:e[0],to:e[1]}},onCompositionEnd:e=>{const t=N.current;if(N.current=null,!t)return;const{value:n,rules:r,pending:l}=L.current;e.data?F(v(n,r,t.from,t.to,{text:e.data,add:l?.add,drop:l?.drop,color:l?.color}),[t.from,t.to],"type"):O(e=>e+1)},onCopy:e=>j(e),onCut:e=>j(e,!0),onPaste:n=>{if(n.preventDefault(),a)return;const r=R();if(!r)return;const l=n.clipboardData.getData(b),s=l?o?l:l.replace(/\s*\r?\n\s*/g," "):g({html:n.clipboardData.getData("text/html"),text:n.clipboardData.getData("text/plain")},{doc:n.currentTarget.ownerDocument,multiline:o,rules:t});F(v(e,t,r[0],r[1],{markup:s}),r,"edit")}})]})}var Be={fontSize:{key:"fontSize",nameKey:"fontSize",icon:/* @__PURE__ */ae(de,{}),unit:"px",step:1,shiftStep:10,min:5},lineHeight:{key:"lineHeight",nameKey:"lineHeight",icon:/* @__PURE__ */ae(ue,{}),unit:"%",step:1,shiftStep:10,min:50,max:250,scale:100},letterSpacing:{key:"letterSpacing",nameKey:"letterSpacing",icon:/* @__PURE__ */ae(ie,{}),unit:"px",step:.1,shiftStep:1,min:-10},paragraphSpacing:{key:"paragraphSpacing",nameKey:"paragraphSpacing",icon:/* @__PURE__ */ae(ce,{}),unit:"px",step:1,shiftStep:10,min:0}};function Me(e,t){return void 0===e?void 0:Number((e*t).toFixed(6))}function Ve({cells:e,words:t,readOnly:n=!1}){const r=t??x.cells,l=P();/* @__PURE__ */
15
+ /* @__PURE__ */ae("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:()=>{D.current=e},onBlur:()=>{e!==D.current&&f?.(e),D.current=e},onKeyDown:t=>{if("Escape"===t.key)return t.preventDefault(),x?.(D.current),void(D.current=e);"Enter"!==t.key||o||(t.preventDefault(),e!==D.current&&f?.(e),D.current=e)},onCompositionStart:()=>{const e=R()??[0,0];N.current={from:e[0],to:e[1]}},onCompositionEnd:e=>{const t=N.current;if(N.current=null,!t)return;const{value:n,rules:r,pending:l}=L.current;e.data?j(v(n,r,t.from,t.to,{text:e.data,add:l?.add,drop:l?.drop,color:l?.color}),[t.from,t.to],"type"):O(e=>e+1)},onCopy:e=>F(e),onCut:e=>F(e,!0),onPaste:n=>{if(n.preventDefault(),a)return;const r=R();if(!r)return;const l=n.clipboardData.getData(b),s=l?o?l:l.replace(/\s*\r?\n\s*/g," "):g({html:n.clipboardData.getData("text/html"),text:n.clipboardData.getData("text/plain")},{doc:n.currentTarget.ownerDocument,multiline:o,rules:t});j(v(e,t,r[0],r[1],{markup:s}),r,"edit")}})]})}var Me={fontSize:{key:"fontSize",nameKey:"fontSize",icon:/* @__PURE__ */ae(de,{}),unit:"px",step:1,shiftStep:10,min:5},lineHeight:{key:"lineHeight",nameKey:"lineHeight",icon:/* @__PURE__ */ae(ue,{}),unit:"%",step:1,shiftStep:10,min:50,max:250,scale:100},letterSpacing:{key:"letterSpacing",nameKey:"letterSpacing",icon:/* @__PURE__ */ae(ie,{}),unit:"px",step:.1,shiftStep:1,min:-10},paragraphSpacing:{key:"paragraphSpacing",nameKey:"paragraphSpacing",icon:/* @__PURE__ */ae(ce,{}),unit:"px",step:1,shiftStep:10,min:0}};function Be(e,t){return void 0===e?void 0:Number((e*t).toFixed(6))}function He({cells:e,words:t,readOnly:n=!1}){const r=t??x.cells,l=P();/* @__PURE__ */
16
16
  return ae("div",{className:"es-copy-cells-fit",children:/* @__PURE__ */ae("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 oe("div",{className:"es-copy-cell",children:[
18
18
  /* @__PURE__ */ae("label",{className:"es-field-label es-copy-cell-name",htmlFor:c,children:o}),
19
- /* @__PURE__ */ae(S,{id:c,value:Me(e.value,t),styleValue:Me(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 He({target:e,onChange:t}){const n=V(null);return W(()=>{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 We=/* @__PURE__ */new Set([...z,"clear"]);function $e({value:t,onChange:n,onCommit:r,onCancel:l,multiline:y=!1,placeholder:v,ariaLabel:b,className:k,readOnly:S=!1,rules:E,tools:w=[],writeMark:C,align:L,actions:R,toolbar:K,barLabel:F,renderFooter:B,inputRef:M,barShows:z="always",richText:X=!0,defaultShowMarks:ce=!1,colors:ie,cells:ue,letterCase:de,lastTool:pe}){const he=N("copy",x),me=V(null),fe=M??me,[ge,ye]=H(!1),[ve,be]=H(null),ke=V(o()).current,xe=V(null);$(()=>{const e=xe.current;e&&t===e.to?xe.current=null:e&&t===e.from||(xe.current=null,ke.reset(),be(Te.current?.getSource()??null))},[t,ke]);const Se=e=>{xe.current={from:xe.current?.from??t,to:e},n(e)},Ee=e=>({text:t,start:e?.selectionStart??ve?.start??t.length,end:e?.selectionEnd??ve?.end??t.length}),[we,Ce]=H(ce),Ne=X&&!(y&&we),Te=V(null),Re=P(),[Ke,Fe]=H(null),[Be,Me]=H(!1),$e=()=>{if(!Ne)return fe.current;const e=Te.current?.getSource()??ve;return e?{selectionStart:e.start,selectionEnd:e.end}:null},Pe=He({target:fe,onChange:Se}),ze=e=>(be({start:e.selectionStart,end:e.selectionEnd}),e),Ie=(e,n)=>{if(!Ne)return void Pe(t=>(n&&ke.record(Ee(t),"edit",Date.now()),ze(e(t))));const r=$e(),l=ze(e(r));n&&ke.record(Ee(r),"edit",Date.now()),Fe(null),l.text!==t&&Se(l.text),Te.current?.setSource(l.selectionStart,l.selectionEnd,l.text)},qe=e=>Ie(e,!0),Ye=e=>Ie(t=>{const n=Ee(t),r=ke[e](n);return r?{text:r.text,selectionStart:r.start,selectionEnd:r.end}:{text:n.text,selectionStart:n.start,selectionEnd:n.end}},!1),Ae=V(null);W(()=>{const e=Ae.current;e&&(Ae.current=null,Ne?Te.current?.setSource(e.start,e.end,t):(fe.current?.focus(),fe.current?.setSelectionRange(e.start,e.end),be(e)))},[Ne]);const[Ge,Ue]=H(null),Ze=E??Y,_e=("string"==typeof w[0]?w:w.map(e=>e.style)).filter(e=>!We.has(e)),Je={};if(ve){const e=q(t,ve.start,ve.end,Ze);for(const t of _e){const n=e.has(t)||"highlight"===t&&e.has("accent");Je[t]=!!Ke?.add.includes(t)||!Ke?.drop.includes(t)&&n}Je.link=e.has("link")}const Xe=()=>{const e=$e(),n=e?.selectionStart??t.length;return{start:n,end:e?.selectionEnd??n}},Qe=e=>{if("link"!==e&&_(0,e)){const{start:n,end:r}=Xe();if(n===r&&!Ne)return void qe(n=>Oe(t,e,n,(e,t,n,r)=>I(e,t,n,r,Ze,he.placeholders)));const l=f({value:t,rules:Ze,start:n,end:r,style:e,pending:Ke});return void("pending"===l.kind?Fe(l.pending):qe(()=>l.result))}if("link"!==e){const n=C??((e,t,n,r)=>I(e,t,n,r,Y,he.placeholders));return void qe(r=>Oe(t,e,r,n))}const n=$e(),r=n?.selectionStart??t.length,l=n?.selectionEnd??r;Me(!1),Ue({start:r,end:l,link:J(t,r,l)})},et=Boolean(ve&&ve.start!==ve.end),tt=ve?A(t,ve.start,ve.end,Ze):null,nt=ve?Ke&&void 0!==Ke.color&&Ke.at===ve.start?Ke.color:G(t,ve.start,ve.end,Ze):null,rt=a(nt,ie),lt=e=>{Ne?e?Te.current?.setSource(e.start,e.end,t):Te.current?.focus():(fe.current?.focus(),e&&fe.current?.setSelectionRange(e.start,e.end))},ot=()=>{const e=Ge;Ue(null),lt(e?{start:e.start,end:e.end}:ve)},at=()=>{const e=ct.current,t=Boolean(e&&e.querySelector(".es-copy-colors")?.contains(e.ownerDocument.activeElement));Me(!1),t&&lt(ve)},st=V(at);st.current=at,$(()=>{if(Be)return D(e=>{const t=ct.current;return!!("Escape"===e.key&&t&&e.target instanceof Node&&t.contains(e.target))&&(st.current(),!0)},()=>ct.current?.querySelector(".es-copy-colors"))},[Be]);const ct=V(null),it=Be||null!==Ge;$(()=>{const e=ct.current;if(!it||!e)return;const t=e.ownerDocument,n=()=>{Me(!1),Ue(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)}},[it]);const ut=Ge??(Be?ve??{start:t.length,end:t.length}:null),dt=V(()=>{});dt.current=()=>{const e=ct.current,t=e?.querySelector(".rosh-tb-wrap > .es-copy-pop");if(!e||!t||!ut)return;const n=Ne?null:e.querySelector(".es-gold-layer"),r=Ne?Te.current?.rangeOf(ut.start,ut.end)??null:n?s(n,ut.start,ut.end):null,l=r?.endContainer,o=l?1===l.nodeType?l:l.parentElement:null,a=r?c(r,o?.closest(".es-rich-line, .es-gold-layer")??null):null;if(!a)return;const p=i({anchor:a,size:{width:t.offsetWidth,height:t.offsetHeight},within:e.getBoundingClientRect(),clip:d(e),parent:u(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"},W(()=>{const e=ct.current;if(!it||!e)return;const t=()=>dt.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()}},[it,Be,Ge,ut?.start,ut?.end,Ne]);const pt="always"===z||ge||null!==Ge||Be,ht=ie&&ie.length>0?{run:rt,open:Be,onToggle:()=>{Ue(null),Be?at():Me(!0)}}:void 0,mt=pt?pe?pe({className:"rosh-tb-btn",disabled:S,selected:et,keepCaret:e=>e.preventDefault(),insert:e=>qe(n=>Le(t,e,n)),style:et&&ve?U(t,ve.start,ve.end,Ze):null,applyStyle:e=>{if(S)return;const{start:n,end:r}=Xe();if(n===r)return;const l=p({value:t,start:n,end:r,id:e,rules:Ze});l?qe(()=>l):((e,n)=>{be({start:e,end:n}),Ne?Te.current?.setSource(e,n,t):(fe.current?.focus(),fe.current?.setSelectionRange(e,n))})(n,r)}}):"classic"===K?R:void 0:void 0,ft=new Set(_e),gt=L?{value:L.value,allow:L.allow,onChange:L.onChange,disabled:L.disabled}:void 0,yt={pressed:tt,onList:e=>{const{start:n,end:r}=Xe(),l=A(t,n,r,Ze);qe(()=>ee(t,n,r,l===e?null:e,Ze))}},vt=h(ve,t.length),bt=S||Z(t,vt.start,vt.end,Ze).text===t?void 0:{onClear:()=>{const{start:e,end:n}=h(Xe(),t.length);qe(()=>Z(t,e,n,Ze))}},kt=T({offered:ft,color:ht,last:mt,alignment:gt,list:yt,letterCase:de,clear:bt});/* @__PURE__ */
20
- return oe("div",{ref:ct,className:"es-copy"+(k?` ${k}`:""),onFocus:()=>ye(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||ye(!1)},onKeyDown:e=>{const t=e.target===fe.current||Boolean(e.target.closest?.(".es-rich"));if(S||!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 Ye(l||e.shiftKey?"redo":"undo");const o={b:"bold",i:"italic",u:"underline",k:"link"}[`${e.shiftKey?"shift+":""}${n}`];o&&_e.includes(o)&&(e.preventDefault(),e.stopPropagation(),Qe(o))},onPaste:e=>{const n=fe.current;if(S||!n||e.target!==n)return;e.preventDefault();const r=g({html:e.clipboardData.getData("text/html"),text:e.clipboardData.getData("text/plain")},{doc:n.ownerDocument,multiline:y,rules:Ze});qe(e=>Le(t,r,e))},style:ie&&ie.length>0?Object.fromEntries(ie.map(e=>[`--es-color-${e.name}`,e.value])):void 0,onSelect:()=>{const e=fe.current;e&&e.ownerDocument.activeElement===e&&be({start:e.selectionStart??t.length,end:e.selectionEnd??t.length})},children:[pt&&(kt.words||kt.paragraph)?
21
- /* @__PURE__ */ae(O,{className:"es-copy-toolbar","aria-label":F??he.formatting,offered:ft,pressed:Je,onMark:e=>Qe(e),color:ht,linkOpen:null!==Ge,last:mt,alignment:gt,list:yt,letterCase:de,clear:bt,disabled:S,windows:/* @__PURE__ */oe(se,{children:[Be&&ie&&ie.length>0?/* @__PURE__ */ae(m,{colors:ie,current:nt,words:he.colors??x.colors,onPick:e=>{const{start:n,end:r}=Xe();if(n!==r)qe(()=>Q(t,n,r,e,Ze));else{if(!Ne)return;Fe({add:Ke?.add??[],drop:Ke?.drop??[],color:e,at:n})}}}):null,Ge?Ge&&/* @__PURE__ */ae(j,{className:"es-copy-link es-copy-pop",value:Ge.link?.href??"",onApply:e=>{const n=Ge;Ue(null),qe(()=>Ne?re(t,n.start,n.end,e,Ze):le(t,n.start,n.end,e))},onRemove:Ge.link?()=>{const e=Ge.link,n=Ge;Ue(null),e&&qe(()=>Ne?te(t,n.start,n.end,Ze):ne(t,e))}:void 0,onCancel:ot}):null]})}):null,ue&&ue.length>0?/* @__PURE__ */ae(Ve,{cells:ue,words:he.cells??x.cells,readOnly:S}):null,Ne?/* @__PURE__ */ae(je,{value:t,rules:Ze,multiline:y,readOnly:S,placeholder:v,ariaLabel:b,handle:Te,pending:Ke??void 0,onEdit:(e,n,r)=>{ke.record({text:t,start:n.start,end:n.end},r,Date.now()),Fe(null),Se(e)},onSelect:e=>{be(t=>t&&t.start===e.start&&t.end===e.end?t:e),!Ke||e.start===Ke.at&&e.end===Ke.at||Fe(null)},onHistory:Ye,onFormat:e=>{_e.includes(e)&&Qe(e)},onCommit:r,onCancel:l}):/* @__PURE__ */ae(De,{value:t,onInput:e=>{ke.record(Ee(null),"type",Date.now()),Se(e)},onCommit:r,onCancel:l,multiline:y,placeholder:v,ariaLabel:b,rules:E,disabled:S,inputRef:fe,className:"es-copy-box"}),B?B({focused:ge,insert:e=>qe(n=>Le(t,e,n))}):null,X&&y?
19
+ /* @__PURE__ */ae(S,{id:c,value:Be(e.value,t),styleValue:Be(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=H(null);return W(()=>{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 We=/* @__PURE__ */new Set([...z,"clear"]);function $e({value:t,onChange:n,onCommit:r,onCancel:l,multiline:y=!1,placeholder:v,ariaLabel:b,className:k,readOnly:S=!1,rules:E,tools:w=[],writeMark:C,align:L,actions:R,toolbar:K,barLabel:j,renderFooter:M,inputRef:B,barShows:z="always",richText:Q=!0,defaultShowMarks:ce=!1,colors:ie,cells:ue,letterCase:de,lastTool:pe}){const he=N("copy",x),me=H(null),fe=B??me,[ge,ye]=V(!1),[ve,be]=V(null),ke=H(o()).current,xe=H(null);$(()=>{const e=xe.current;e&&t===e.to?xe.current=null:e&&t===e.from||(xe.current=null,ke.reset(),be(Te.current?.getSource()??null))},[t,ke]);const Se=e=>{xe.current={from:xe.current?.from??t,to:e},n(e)},Ee=e=>({text:t,start:e?.selectionStart??ve?.start??t.length,end:e?.selectionEnd??ve?.end??t.length}),[we,Ce]=V(ce),Ne=Q&&!(y&&we),Te=H(null),Re=P(),[Ke,je]=V(null),[Me,Be]=V(!1),$e=()=>{if(!Ne)return fe.current;const e=Te.current?.getSource()??ve;return e?{selectionStart:e.start,selectionEnd:e.end}:null},Pe=Ve({target:fe,onChange:Se}),ze=e=>(be({start:e.selectionStart,end:e.selectionEnd}),e),Ie=(e,n)=>{if(!Ne)return void Pe(t=>(n&&ke.record(Ee(t),"edit",Date.now()),ze(e(t))));const r=$e(),l=ze(e(r));n&&ke.record(Ee(r),"edit",Date.now()),je(null),l.text!==t&&Se(l.text),Te.current?.setSource(l.selectionStart,l.selectionEnd,l.text)},qe=e=>Ie(e,!0),Ae=e=>Ie(t=>{const n=Ee(t),r=ke[e](n);return r?{text:r.text,selectionStart:r.start,selectionEnd:r.end}:{text:n.text,selectionStart:n.start,selectionEnd:n.end}},!1),Ue=H(null);W(()=>{const e=Ue.current;e&&(Ue.current=null,Ne?Te.current?.setSource(e.start,e.end,t):(fe.current?.focus(),fe.current?.setSelectionRange(e.start,e.end),be(e)))},[Ne]);const[Ge,Xe]=V(null),Ye=E??A,_e=("string"==typeof w[0]?w:w.map(e=>e.style)).filter(e=>!We.has(e)),Je={};if(ve){const e=q(t,ve.start,ve.end,Ye);for(const t of _e){const n=e.has(t)||"highlight"===t&&e.has("accent");Je[t]=!!Ke?.add.includes(t)||!Ke?.drop.includes(t)&&n}Je.link=e.has("link")}const Qe=()=>{const e=$e(),n=e?.selectionStart??t.length;return{start:n,end:e?.selectionEnd??n}},Ze=e=>{if("link"!==e&&_(0,e)){const{start:n,end:r}=Qe();if(n===r&&!Ne)return void qe(n=>Oe(t,e,n,(e,t,n,r)=>I(e,t,n,r,Ye,he.placeholders)));const l=f({value:t,rules:Ye,start:n,end:r,style:e,pending:Ke});return void("pending"===l.kind?je(l.pending):qe(()=>l.result))}if("link"!==e){const n=C??((e,t,n,r)=>I(e,t,n,r,A,he.placeholders));return void qe(r=>Oe(t,e,r,n))}const n=$e(),r=n?.selectionStart??t.length,l=n?.selectionEnd??r;Be(!1),Xe({start:r,end:l,link:J(t,r,l)})},et=Boolean(ve&&ve.start!==ve.end),tt=ve?U(t,ve.start,ve.end,Ye):null,nt=ve?Ke&&void 0!==Ke.color&&Ke.at===ve.start?Ke.color:G(t,ve.start,ve.end,Ye):null,rt=a(nt,ie),lt=e=>{Ne?e?Te.current?.setSource(e.start,e.end,t):Te.current?.focus():(fe.current?.focus(),e&&fe.current?.setSelectionRange(e.start,e.end))},ot=()=>{const e=Ge;Xe(null),lt(e?{start:e.start,end:e.end}:ve)},at=()=>{const e=ct.current,t=Boolean(e&&e.querySelector(".es-copy-colors")?.contains(e.ownerDocument.activeElement));Be(!1),t&&lt(ve)},st=H(at);st.current=at,$(()=>{if(Me)return D(e=>{const t=ct.current;return!!("Escape"===e.key&&t&&e.target instanceof Node&&t.contains(e.target))&&(st.current(),!0)},()=>ct.current?.querySelector(".es-copy-colors"))},[Me]);const ct=H(null),it=Me||null!==Ge;$(()=>{const e=ct.current;if(!it||!e)return;const t=e.ownerDocument,n=()=>{Be(!1),Xe(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)}},[it]);const ut=Ge??(Me?ve??{start:t.length,end:t.length}:null),dt=H(()=>{});dt.current=()=>{const e=ct.current,t=e?.querySelector(".rosh-tb-wrap > .es-copy-pop");if(!e||!t||!ut)return;const n=Ne?null:e.querySelector(".es-gold-layer"),r=Ne?Te.current?.rangeOf(ut.start,ut.end)??null:n?s(n,ut.start,ut.end):null,l=r?.endContainer,o=l?1===l.nodeType?l:l.parentElement:null,a=r?c(r,o?.closest(".es-rich-line, .es-gold-layer")??null):null;if(!a)return;const p=i({anchor:a,size:{width:t.offsetWidth,height:t.offsetHeight},within:e.getBoundingClientRect(),clip:d(e),parent:u(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"},W(()=>{const e=ct.current;if(!it||!e)return;const t=()=>dt.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()}},[it,Me,Ge,ut?.start,ut?.end,Ne]);const pt="always"===z||ge||null!==Ge||Me,ht=ie&&ie.length>0?{run:rt,open:Me,onToggle:()=>{Xe(null),Me?at():Be(!0)}}:void 0,mt=pt?pe?pe({className:"rosh-tb-btn",disabled:S,selected:et,keepCaret:e=>e.preventDefault(),insert:e=>qe(n=>Le(t,e,n)),style:et&&ve?X(t,ve.start,ve.end,Ye):null,applyStyle:e=>{if(S)return;const{start:n,end:r}=Qe();if(n===r)return;const l=p({value:t,start:n,end:r,id:e,rules:Ye});l?qe(()=>l):((e,n)=>{be({start:e,end:n}),Ne?Te.current?.setSource(e,n,t):(fe.current?.focus(),fe.current?.setSelectionRange(e,n))})(n,r)}}):"classic"===K?R:void 0:void 0,ft=new Set(_e),gt=L?{value:L.value,allow:L.allow,onChange:L.onChange,disabled:L.disabled}:void 0,yt={pressed:tt,onList:e=>{const{start:n,end:r}=Qe(),l=U(t,n,r,Ye);qe(()=>ee(t,n,r,l===e?null:e,Ye))}},vt=h(ve,t.length),bt=S||Y(t,vt.start,vt.end,Ye).text===t?void 0:{onClear:()=>{const{start:e,end:n}=h(Qe(),t.length);qe(()=>Y(t,e,n,Ye))}},kt=T({offered:ft,color:ht,last:mt,alignment:gt,list:yt,letterCase:de,clear:bt});/* @__PURE__ */
20
+ return oe("div",{ref:ct,className:"es-copy"+(k?` ${k}`:""),onFocus:()=>ye(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||ye(!1)},onKeyDown:e=>{const t=e.target===fe.current||Boolean(e.target.closest?.(".es-rich"));if(S||!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 Ae(l||e.shiftKey?"redo":"undo");const o={b:"bold",i:"italic",u:"underline",k:"link"}[`${e.shiftKey?"shift+":""}${n}`];o&&_e.includes(o)&&(e.preventDefault(),e.stopPropagation(),Ze(o))},onPaste:e=>{const n=fe.current;if(S||!n||e.target!==n)return;e.preventDefault();const r=g({html:e.clipboardData.getData("text/html"),text:e.clipboardData.getData("text/plain")},{doc:n.ownerDocument,multiline:y,rules:Ye});qe(e=>Le(t,r,e))},style:ie&&ie.length>0?Object.fromEntries(ie.map(e=>[`--es-color-${e.name}`,e.value])):void 0,onSelect:()=>{const e=fe.current;e&&e.ownerDocument.activeElement===e&&be({start:e.selectionStart??t.length,end:e.selectionEnd??t.length})},children:[pt&&(kt.words||kt.paragraph)?
21
+ /* @__PURE__ */ae(O,{className:"es-copy-toolbar","aria-label":j??he.formatting,offered:ft,pressed:Je,onMark:e=>Ze(e),color:ht,linkOpen:null!==Ge,last:mt,alignment:gt,list:yt,letterCase:de,clear:bt,disabled:S,windows:/* @__PURE__ */oe(se,{children:[Me&&ie&&ie.length>0?/* @__PURE__ */ae(m,{colors:ie,current:nt,words:he.colors??x.colors,onPick:e=>{const{start:n,end:r}=Qe();if(n!==r)qe(()=>Z(t,n,r,e,Ye));else{if(!Ne)return;je({add:Ke?.add??[],drop:Ke?.drop??[],color:e,at:n})}}}):null,Ge?Ge&&/* @__PURE__ */ae(F,{className:"es-copy-link es-copy-pop",value:Ge.link?.href??"",onApply:e=>{const n=Ge;Xe(null),qe(()=>Ne?re(t,n.start,n.end,e,Ye):le(t,n.start,n.end,e))},onRemove:Ge.link?()=>{const e=Ge.link,n=Ge;Xe(null),e&&qe(()=>Ne?te(t,n.start,n.end,Ye):ne(t,e))}:void 0,onCancel:ot}):null]})}):null,ue&&ue.length>0?/* @__PURE__ */ae(He,{cells:ue,words:he.cells??x.cells,readOnly:S}):null,Ne?/* @__PURE__ */ae(Fe,{value:t,rules:Ye,multiline:y,readOnly:S,placeholder:v,ariaLabel:b,handle:Te,pending:Ke??void 0,onEdit:(e,n,r)=>{ke.record({text:t,start:n.start,end:n.end},r,Date.now()),je(null),Se(e)},onSelect:e=>{be(t=>t&&t.start===e.start&&t.end===e.end?t:e),!Ke||e.start===Ke.at&&e.end===Ke.at||je(null)},onHistory:Ae,onFormat:e=>{_e.includes(e)&&Ze(e)},onCommit:r,onCancel:l}):/* @__PURE__ */ae(De,{value:t,onInput:e=>{ke.record(Ee(null),"type",Date.now()),Se(e)},onCommit:r,onCancel:l,multiline:y,placeholder:v,ariaLabel:b,rules:E,disabled:S,inputRef:fe,className:"es-copy-box"}),M?M({focused:ge,insert:e=>qe(n=>Le(t,e,n))}):null,Q&&y?
22
22
  /* @__PURE__ */oe("div",{className:"es-copy-marks",children:[
23
- /* @__PURE__ */ae(e,{checked:we,onChange:()=>{const e=$e();Ae.current=e&&null!==e.selectionStart&&null!==e.selectionEnd?{start:e.selectionStart,end:e.selectionEnd}:ve,Fe(null),Ce(e=>!e)},ariaLabelledBy:Re,disabled:S}),
24
- /* @__PURE__ */ae("span",{id:Re,className:"es-copy-marks-label",children:he.showMarks??"Show marks"})]}):null]})}var Pe=["none","bullet","number"],ze=t,Ie={none:/* @__PURE__ */ae(ke,{}),bullet:/* @__PURE__ */ae(be,{}),number:/* @__PURE__ */ae(ve,{})},qe={none:/* @__PURE__ */ae(we,{}),upper:/* @__PURE__ */ae(Ee,{}),capitalize:/* @__PURE__ */ae(Se,{}),lower:/* @__PURE__ */ae(xe,{})};function Ye({label:e,icon:t,answers:n,names:r,glyphs:l,row:o,readOnly:a}){const s=o.value||o.styleValue||"";/* @__PURE__ */
25
- return ae(w,{label:e,icon:t,children:/* @__PURE__ */ae(C,{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 Ae({kept:e,keptHint:t,readOnly:n=!1,style:r,font:l,italic:o,cells:a,align:s,list:c,letterCase:i}){const u=N("copy",x),d=L(R().textToolbar),p=Object.fromEntries(K(F).map(e=>[e.value,e.icon])),h={...x.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__ */ae(B,{content:h.italic,children:/* @__PURE__ */ae(M,{size:"md",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__ */ae(ye,{})})}):null;/* @__PURE__ */
23
+ /* @__PURE__ */ae(e,{checked:we,onChange:()=>{const e=$e();Ue.current=e&&null!==e.selectionStart&&null!==e.selectionEnd?{start:e.selectionStart,end:e.selectionEnd}:ve,je(null),Ce(e=>!e)},ariaLabelledBy:Re,disabled:S}),
24
+ /* @__PURE__ */ae("span",{id:Re,className:"es-copy-marks-label",children:he.showMarks??"Show marks"})]}):null]})}var Pe=["none","bullet","number"],ze=t,Ie={none:/* @__PURE__ */ae(ke,{}),bullet:/* @__PURE__ */ae(be,{}),number:/* @__PURE__ */ae(ve,{})},qe={none:/* @__PURE__ */ae(we,{}),upper:/* @__PURE__ */ae(Ee,{}),capitalize:/* @__PURE__ */ae(Se,{}),lower:/* @__PURE__ */ae(xe,{})};function Ae({label:e,icon:t,answers:n,names:r,glyphs:l,row:o,readOnly:a}){const s=o.value||o.styleValue||"";/* @__PURE__ */
25
+ return ae(C,{label:e,icon:t,children:/* @__PURE__ */ae(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 Ue({kept:e,keptHint:t,readOnly:n=!1,style:r,font:l,italic:o,cells:a,align:s,list:c,letterCase:i}){const u=N("copy",x),d=L(R().textToolbar),p=Object.fromEntries(K(j).map(e=>[e.value,e.icon])),h={...x.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__ */ae(M,{content:h.italic,children:/* @__PURE__ */ae(B,{size:"md",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__ */ae(ye,{})})}):null;/* @__PURE__ */
26
26
  return oe("div",{className:"es-tpp",children:[e?/* @__PURE__ */oe("div",{className:"es-tpp-kept",children:[
27
- /* @__PURE__ */ae($e,{...e,readOnly:n||e.readOnly}),t?/* @__PURE__ */ae("p",{className:"es-field-hint",children:t}):null]}):null,r?/* @__PURE__ */ae(w,{label:h.style,icon:/* @__PURE__ */ae(pe,{}),children:/* @__PURE__ */ae(E,{ariaLabel:h.style,value:r.value,options:r.options,onChange:r.onChange,changed:r.changed,footer:m,readOnly:n})}):null,l?/* @__PURE__ */ae(w,{label:h.font,icon:/* @__PURE__ */ae(he,{}),children:/* @__PURE__ */oe("div",{className:"es-tpp-font",children:[
27
+ /* @__PURE__ */ae($e,{...e,readOnly:n||e.readOnly}),t?/* @__PURE__ */ae("p",{className:"es-field-hint",children:t}):null]}):null,r?/* @__PURE__ */ae(C,{label:h.style,icon:/* @__PURE__ */ae(pe,{}),children:/* @__PURE__ */ae(E,{ariaLabel:h.style,value:r.value,options:r.options,onChange:r.onChange,changed:r.changed,footer:m,readOnly:n})}):null,l?/* @__PURE__ */ae(C,{label:h.font,icon:/* @__PURE__ */ae(he,{}),children:/* @__PURE__ */oe("div",{className:"es-tpp-font",children:[
28
28
  /* @__PURE__ */ae("div",{className:"es-tpp-font-select",children:/* @__PURE__ */ae(E,{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__ */ae(w,{label:h.italic,icon:/* @__PURE__ */ae(he,{}),children:/* @__PURE__ */ae("div",{className:"es-tpp-font",children:g})}):null,a?.length?/* @__PURE__ */ae(Ve,{cells:a,words:u.cells,readOnly:n}):null,s?/* @__PURE__ */ae(Ye,{label:u.alignment,icon:/* @__PURE__ */ae(me,{}),answers:F.filter(e=>!s.allow||s.allow.includes(e)),names:d,glyphs:p,row:s,readOnly:n}):null,c?/* @__PURE__ */ae(Ye,{label:h.list,icon:/* @__PURE__ */ae(fe,{}),answers:Pe,names:h.lists,glyphs:Ie,row:c,readOnly:n}):null,i?/* @__PURE__ */ae(Ye,{label:h.capitalization,icon:/* @__PURE__ */ae(ge,{}),answers:ze,names:h.cases,glyphs:qe,row:i,readOnly:n}):null]})}export{Be as COPY_CELLS,$e as CopyBox,Ve as CopyCells,je as RichBox,Ae as TextPartPanel,Le as insertSelection,Oe as markSelection,He as useCaretEdit};
29
+ /* @__PURE__ */ae(C,{label:h.italic,icon:/* @__PURE__ */ae(he,{}),children:/* @__PURE__ */ae("div",{className:"es-tpp-font",children:g})}):null,a?.length?/* @__PURE__ */ae(He,{cells:a,words:u.cells,readOnly:n}):null,s?/* @__PURE__ */ae(Ae,{label:u.alignment,icon:/* @__PURE__ */ae(me,{}),answers:j.filter(e=>!s.allow||s.allow.includes(e)),names:d,glyphs:p,row:s,readOnly:n}):null,c?/* @__PURE__ */ae(Ae,{label:h.list,icon:/* @__PURE__ */ae(fe,{}),answers:Pe,names:h.lists,glyphs:Ie,row:c,readOnly:n}):null,i?/* @__PURE__ */ae(Ae,{label:h.capitalization,icon:/* @__PURE__ */ae(ge,{}),answers:ze,names:h.cases,glyphs:qe,row:i,readOnly:n}):null]})}export{Me as COPY_CELLS,$e as CopyBox,He as CopyCells,Fe as RichBox,Ue as TextPartPanel,Le as insertSelection,Oe as markSelection,Ve as useCaretEdit};
@@ -1 +1 @@
1
- export{SCALAR_TEXT_CONTROLS,TEXT_CONTROL_KINDS}from"../chunk-I6SK6ZDT.js";export{BUTTON_PAD_KEYS,BUTTON_STYLE_KEYS,CORNER_SIDES,buttonBorderOf,buttonFillOpacityOf,buttonPadSidesOf,hasCornerSubset,normalizeCornerSides}from"../chunk-PLTTPHK5.js";export{BLOCK_FIXED_WIDTH,BLOCK_SIZE_KEYS,BLOCK_WIDTH_FIT_DEFAULT,BLOCK_WIDTH_FIT_POINTS,BLOCK_WIDTH_LIMIT,TEXT_FIT_MIN_FONT,TEXT_FIT_POINTS,parseBlockWidthFit,parseTextFit}from"../chunk-XH4BP64C.js";export{AUTO_RULES,FOLLOW_RULES,VIEW_DESKTOP_MIN,VIEW_TABLET_MIN,VIEW_TIERS,VIEW_TIER_LABEL,isAuto,phoneKey,resolveViewValue,tabletKey,viewTierForWidth}from"../chunk-E52W3M5I.js";export{rootRowName,sectionRenameProp,slotChildName,slotChildRenameProp,slotChildRowName}from"../chunk-5NHQ452C.js";export{HERO_SLIDER_GOTO_EVENT}from"../chunk-AJ2SUSET.js";export{hidableText,readHidable}from"../chunk-6UAEFOJ4.js";export{ANCHOR_FIELD_KEYS,FOLD_FIELD_MARKER,LINK_FIELD_MARKER,MEDIA_FIELD_MARKER,SCAFFOLD_FIELD_MARKER,TEXT_FIELD_MARKER,foldMetaOf,textFieldIdentifier}from"../chunk-ANPOR6EY.js";export{PART_SEP,decodePartId,encodePartId}from"../chunk-R4AUZVA3.js";export{FOOTER_TYPE,HEADER_TYPE,ROOT_ZONE,TREE_MAX_DEPTH,blockNodeActions,childSlotsOf,locateNode,missingPinnedTypes,nestsInTree,newNodeId,pinnedDuplicateIds,pinnedDuplicateIndices,slotChildrenIn,slotFieldsOf}from"../chunk-TCAAOYQY.js";export{TEXT_STYLE_CASES,TEXT_STYLE_CASE_CSS,isTextStyleCase,textStyleCaseCss,textStyleCaseOfCss}from"../chunk-YHZSBL2N.js";export{BLOCK_ATTRIBUTE}from"../chunk-FR7EEKFF.js";export{REPEAT_ATTRIBUTE,REPEAT_INDEX_ATTRIBUTE}from"../chunk-7UFKEX72.js";
1
+ export{SCALAR_TEXT_CONTROLS,TEXT_CONTROL_KINDS}from"../chunk-I6SK6ZDT.js";export{BUTTON_PAD_KEYS,BUTTON_STYLE_KEYS,CORNER_SIDES,buttonBorderOf,buttonFillOpacityOf,buttonPadSidesOf,hasCornerSubset,normalizeCornerSides}from"../chunk-PLTTPHK5.js";export{BLOCK_FIXED_WIDTH,BLOCK_SIZE_KEYS,BLOCK_WIDTH_FIT_DEFAULT,BLOCK_WIDTH_FIT_POINTS,BLOCK_WIDTH_LIMIT,TEXT_FIT_MIN_FONT,TEXT_FIT_POINTS,parseBlockWidthFit,parseTextFit}from"../chunk-XH4BP64C.js";export{rootRowName,sectionRenameProp,slotChildName,slotChildRenameProp,slotChildRowName}from"../chunk-5NHQ452C.js";export{HERO_SLIDER_GOTO_EVENT}from"../chunk-AJ2SUSET.js";export{hidableText,readHidable}from"../chunk-6UAEFOJ4.js";export{ANCHOR_FIELD_KEYS,FOLD_FIELD_MARKER,LINK_FIELD_MARKER,MEDIA_FIELD_MARKER,SCAFFOLD_FIELD_MARKER,TEXT_FIELD_MARKER,foldMetaOf,textFieldIdentifier}from"../chunk-ANPOR6EY.js";export{PART_SEP,decodePartId,encodePartId}from"../chunk-R4AUZVA3.js";export{FOOTER_TYPE,HEADER_TYPE,ROOT_ZONE,TREE_MAX_DEPTH,blockNodeActions,childSlotsOf,locateNode,missingPinnedTypes,nestsInTree,newNodeId,pinnedDuplicateIds,pinnedDuplicateIndices,slotChildrenIn,slotFieldsOf}from"../chunk-TCAAOYQY.js";export{TEXT_STYLE_CASES,TEXT_STYLE_CASE_CSS,isTextStyleCase,textStyleCaseCss,textStyleCaseOfCss}from"../chunk-53QUHEHK.js";export{AUTO_RULES,FOLLOW_RULES,VIEW_DESKTOP_MIN,VIEW_TABLET_MIN,VIEW_TIERS,VIEW_TIER_LABEL,isAuto,phoneKey,resolveViewValue,tabletKey,viewTierForWidth}from"../chunk-DIOTWSCO.js";export{BLOCK_ATTRIBUTE}from"../chunk-FR7EEKFF.js";export{REPEAT_ATTRIBUTE,REPEAT_INDEX_ATTRIBUTE}from"../chunk-7UFKEX72.js";
@@ -10,10 +10,10 @@ import { ReactNode, CSSProperties, ComponentType, ReactElement } from 'react';
10
10
  import { TextToolbarProps } from 'efficient-shell/ui';
11
11
  import { R as RepeatCopy } from '../copy-place-CQIemdtU.js';
12
12
  export { r as repeatCopyAt } from '../copy-place-CQIemdtU.js';
13
- import { C as CopyBoxLastTool, a as CopyThemeColor, b as CanvasTypingEnd } from '../canvas-typing--FlIZwbT.js';
13
+ import { C as CopyBoxLastTool, a as CopyThemeColor, b as CanvasTypingEnd } from '../canvas-typing-CD1aeYnk.js';
14
14
  import { InlineRule } from 'efficient-shell/markup';
15
15
  import { b as NodeOpsHost, C as ClipboardEntry } from '../useNodeOps-igxrnEhq.js';
16
- import { I as InspectorFields } from '../types-CVHwspYM.js';
16
+ import { I as InspectorFields } from '../types-DcyH17ij.js';
17
17
  import '../words-Cf5VT2Ic.js';
18
18
  import '../buckets-BYQBBVgO.js';
19
19
 
@@ -1 +1 @@
1
- export{CHROME_ATTR,CanvasChromeContext,CanvasFrame,CanvasPartsContext,CanvasPassThroughContext,CanvasSharedContext,DEFAULT_UI,EaselCanvas,EaselProvider,EditDocument,RootHostScope,bindUndoKeys,createEasel,createUseEasel,partHasOwnBox,recordsByDefault,reduce,subscribeLateWrites,uiView,useEasel,useEaselApi,useEaselNodeOps,useRootFields,useSelectedFields,useSelectedHost,useSettledAction,useSettledPress,validSelection,writesSettled}from"../chunk-NUJEHA6A.js";export{repeatCopyAt}from"../chunk-JQQFB7EZ.js";import"../chunk-TBY3DFKS.js";import"../chunk-K53PQAMP.js";import"../chunk-QTHQPJWA.js";import"../chunk-3BQT7FC7.js";import"../chunk-PMRN5Z3T.js";import"../chunk-MFIRYGHW.js";import"../chunk-TOKMFZPB.js";import"../chunk-FR7EEKFF.js";import"../chunk-7UFKEX72.js";import"../chunk-EUFDQ4KL.js";import"../chunk-KXM6YRG2.js";
1
+ export{CHROME_ATTR,CanvasChromeContext,CanvasFrame,CanvasPartsContext,CanvasPassThroughContext,CanvasSharedContext,DEFAULT_UI,EaselCanvas,EaselProvider,EditDocument,RootHostScope,bindUndoKeys,createEasel,createUseEasel,partHasOwnBox,recordsByDefault,reduce,subscribeLateWrites,uiView,useEasel,useEaselApi,useEaselNodeOps,useRootFields,useSelectedFields,useSelectedHost,useSettledAction,useSettledPress,validSelection,writesSettled}from"../chunk-3W2O22DZ.js";export{repeatCopyAt}from"../chunk-JQQFB7EZ.js";import"../chunk-TBY3DFKS.js";import"../chunk-K53PQAMP.js";import"../chunk-QTHQPJWA.js";import"../chunk-MNQDOSAX.js";import"../chunk-PMRN5Z3T.js";import"../chunk-MFIRYGHW.js";import"../chunk-TOKMFZPB.js";import"../chunk-FR7EEKFF.js";import"../chunk-7UFKEX72.js";import"../chunk-EUFDQ4KL.js";import"../chunk-KXM6YRG2.js";
@@ -4,8 +4,8 @@ import { S as SettingsBucket } from '../buckets-BYQBBVgO.js';
4
4
  export { D as DesignGroup } from '../buckets-BYQBBVgO.js';
5
5
  import { ShowWhenContext } from 'efficient-shell/format';
6
6
  export { ShowWhenContext, ShowWhenRule, showWhenOf, withShowWhen } from 'efficient-shell/format';
7
- import { a as InspectorFieldDef, b as FieldRenderer, I as InspectorFields, c as FieldTextProps, d as FieldNumberProps, e as FieldSliderProps, f as FieldSelectManyProps, g as FieldSelectOneProps, F as FieldOption } from '../types-CVHwspYM.js';
8
- export { A as ArrayFieldDef, C as CustomFieldDef, h as CustomFieldRenderProps, i as FieldSelectProps, N as NumberFieldDef, O as ObjectFieldDef, R as RadioFieldDef, S as SelectFieldDef, j as SlotFieldDef, T as TextFieldDef, k as TextareaFieldDef } from '../types-CVHwspYM.js';
7
+ import { a as InspectorFieldDef, b as FieldRenderer, I as InspectorFields, c as FieldTextProps, d as FieldNumberProps, e as FieldSliderProps, f as FieldSelectManyProps, g as FieldSelectOneProps, F as FieldOption } from '../types-DcyH17ij.js';
8
+ export { A as ArrayFieldDef, C as CustomFieldDef, h as CustomFieldRenderProps, i as FieldSelectProps, N as NumberFieldDef, O as ObjectFieldDef, R as RadioFieldDef, S as SelectFieldDef, j as SlotFieldDef, T as TextFieldDef, k as TextareaFieldDef } from '../types-DcyH17ij.js';
9
9
  import { R as ResolvableItem } from '../resolve-Bz4mszpL.js';
10
10
  export { F as FieldsWords } from '../words-CFkb8XtN.js';
11
11
  export { LinkFilter, LinkFilterField, LinkKindChoice, LinkOption, LinkOptionGroup, LinkPicker, LinkPickerProps, LinkRules, LinkTarget } from 'efficient-shell/ui';
@@ -165,9 +165,9 @@ interface FieldPlan {
165
165
  * cannot be said. A band whose rows are all hidden draws nothing
166
166
  * (`Inspector`).
167
167
  *
168
- * THE VIEW (Lewis, 2026-10-27). When `show.context.device` is `"mobile"` (the phone
169
- * view), a row without a phone value is not planned either: it would write the
170
- * desktop value under the phone's name (`fieldShownInView`). Its `bucket` and
168
+ * THE VIEW (Lewis, 2026-10-27). When `show.context.device` is `"mobile"` or
169
+ * `"tablet"`, a row without a value of that view is not planned either: it would
170
+ * write the desktop value under that view's name (`fieldShownInView`). Its `bucket` and
171
171
  * `fold` still count, as for a show-when row.
172
172
  */
173
173
  declare function planFields(fields: InspectorFields, show?: ShowWhenInput): FieldPlan;
@@ -277,10 +277,11 @@ declare function Inspector({ fields, values, onChange, readOnly, context, showWh
277
277
  *
278
278
  * In the phone view the panel draws only rows that have a phone value of their
279
279
  * own: a `deviceField("mobile", …)`, which is a phone twin or a phone-only row,
280
- * or a `deviceField("each", …)`, one row that writes the view's own value.
281
- * Every other row writes the DESKTOP value, so drawing it under the phone view
282
- * lets a merchant move the desktop while they look at the phone. The phone and
283
- * the desktop are set apart and do not disturb each other.
280
+ * or a `deviceField("each", …)`, one row that writes the view's own value. The
281
+ * tablet view is the same with `deviceField("tablet", …)` (Lewis 2026-11-02).
282
+ * Every other row writes the DESKTOP value, so drawing it under another view
283
+ * lets a merchant move the desktop while they look at that view. The views are
284
+ * set apart and do not disturb each other.
284
285
  *
285
286
  * The answer comes from the one mark `deviceField` stamps (`deviceMetaOf`). It
286
287
  * is not a list, and not a second filter beside the gate: a row is either
@@ -288,15 +289,15 @@ declare function Inspector({ fields, values, onChange, readOnly, context, showWh
288
289
  *
289
290
  * Never hidden by it, because they are not setting rows: a heading or tab mark
290
291
  * (`marker`), a slot (it draws nothing; its name has a tab), and a field that
291
- * draws no control anywhere (`noControlField(…, "always")`: the device note). Every other view (desktop, tablet, or no
292
- * view named) draws every row, as before: tablet shows the desktop values.
292
+ * draws no control anywhere (`noControlField(…, "always")`: the device note).
293
+ * The desktop view, and no view named, draws every row, as before.
293
294
  *
294
295
  * A host says which view it is in by `showWhenContext.device`; `"mobile"` is
295
- * the phone. A host with no such fact (the campaign designer today) sees no
296
- * change until it passes one.
296
+ * the phone and `"tablet"` the tablet. A host with no such fact sees no change
297
+ * until it passes one.
297
298
  *
298
299
  * A kept key (a field with `reachedBy`, `keptByRow`) is no row of its own:
299
- * in the phone view it is shown only where its row is (`siblings`, the
300
+ * in the phone or tablet view it is shown only where its row is (`siblings`, the
300
301
  * fields it sits among), and with no siblings given it is not shown.
301
302
  *
302
303
  * The `Inspector`'s `lead` (the host's own entry rows above the planned rows:
@@ -305,6 +306,32 @@ declare function Inspector({ fields, values, onChange, readOnly, context, showWh
305
306
  */
306
307
  declare function fieldShownInView(field: unknown, device: unknown, siblings?: Readonly<Record<string, unknown>>): boolean;
307
308
 
309
+ /**
310
+ * THE CENSUS OF A PANEL'S ROWS, per view (Lewis 2026-10-27: a row in a view
311
+ * stores that view's own value or is hidden; a shared row is never allowed).
312
+ * Each host's guard counts its own panels with these and keeps its own ratchet,
313
+ * so the reading of a row cannot differ between the two repositories.
314
+ */
315
+ /** Does a panel draw `row` in `device`? */
316
+ type RowShownInView = (row: unknown, device: 'mobile' | 'tablet', siblings: Readonly<Record<string, unknown>>) => boolean;
317
+ /**
318
+ * Is this row drawn in a view where it writes another view's value?
319
+ *
320
+ * `shown` is how the panel decides what it draws. Left out: the one gate,
321
+ * {@link fieldShownInView}, which hides every such row, so a panel drawn
322
+ * through it counts 0. A panel that draws its rows by hand (not through
323
+ * `planFields`) passes its own answer, and the census counts each row it
324
+ * draws in a view that the row does not own.
325
+ */
326
+ declare function rowViewState(row: unknown, siblings: Readonly<Record<string, unknown>>, shown?: RowShownInView): {
327
+ phoneShared: 0 | 1;
328
+ tabletShared: 0 | 1;
329
+ };
330
+ /** How many rows sit inside an array or object row. */
331
+ declare function innerRowCount(row: unknown): number;
332
+ /** Every read of the view in this source text. */
333
+ declare function viewReadsIn(source: string): string[];
334
+
308
335
  /** What a block may declare about its fields. */
309
336
  interface FieldsBlock {
310
337
  fields?: object;
@@ -513,7 +540,7 @@ declare function FieldNumber({ id, value, onChange, min, max, step, shiftStep, s
513
540
  * to `step` and held to `min` / `max` — and Escape puts back the value the
514
541
  * box had when it was entered.
515
542
  */
516
- declare function FieldSlider({ id, label, value, onChange, min, max, step, shiftStep, styleValue, unit, sliderMin, sliderMax, auto, readOnly, }: FieldSliderProps): react.JSX.Element;
543
+ declare function FieldSlider({ id, label, value, onChange, min, max, step, shiftStep, styleValue, unit, sliderMin, sliderMax, auto, bare, readOnly, }: FieldSliderProps): react.JSX.Element;
517
544
 
518
545
  /** The option a stored value names: equal by `Object.is`, so `0`, `false` and `''` are values too. */
519
546
  declare function optionFor<V>(options: readonly FieldOption<V>[], value: V | undefined): FieldOption<V> | undefined;
@@ -559,4 +586,4 @@ declare function optionFor<V>(options: readonly FieldOption<V>[], value: V | und
559
586
  declare function FieldSelect<V>(props: FieldSelectManyProps<V>): ReactNode;
560
587
  declare function FieldSelect<V>(props: FieldSelectOneProps<V>): ReactNode;
561
588
 
562
- export { FieldNumber, FieldNumberProps, FieldOption, type FieldPlan, FieldRenderer, FieldSelect, FieldSelectManyProps, FieldSelectOneProps, FieldSlider, FieldSliderProps, FieldText, FieldTextProps, type FieldsBlock, Inspector, InspectorField, InspectorFieldDef, type InspectorFieldProps, InspectorFields, type InspectorProps, ListField, type ListFieldProps, type PlannedFold, type PlannedRow, type ResolvedFieldsInput, SettingsBucket, type ShowWhenInput, bucketsOf, fieldIsShown, fieldShownInView, insertAt, labelOf, moveTo, optionFor, planFields, removeAt, shownFields, useResolvedFields };
589
+ export { FieldNumber, FieldNumberProps, FieldOption, type FieldPlan, FieldRenderer, FieldSelect, FieldSelectManyProps, FieldSelectOneProps, FieldSlider, FieldSliderProps, FieldText, FieldTextProps, type FieldsBlock, Inspector, InspectorField, InspectorFieldDef, type InspectorFieldProps, InspectorFields, type InspectorProps, ListField, type ListFieldProps, type PlannedFold, type PlannedRow, type ResolvedFieldsInput, type RowShownInView, SettingsBucket, type ShowWhenInput, bucketsOf, fieldIsShown, fieldShownInView, innerRowCount, insertAt, labelOf, moveTo, optionFor, planFields, removeAt, rowViewState, shownFields, useResolvedFields, viewReadsIn };
@@ -1 +1 @@
1
- export{FieldText,Inspector,InspectorField,LinkPicker,ListField,bucketsOf,fieldShownInView,insertAt,labelOf,moveTo,planFields,removeAt}from"../chunk-WMC6FE3G.js";export{fieldIsShown,showWhenOf,shownFields,withShowWhen}from"../chunk-BPXEFVSQ.js";import"../chunk-YCSZAP7T.js";export{FieldSlider}from"../chunk-ZEH6QLBH.js";import"../chunk-WHS6Y55E.js";import"../chunk-D4TH4QQR.js";import"../chunk-K56YDHYQ.js";import"../chunk-56ID6FKZ.js";export{useResolvedFields}from"../chunk-K53PQAMP.js";import"../chunk-FIVU2COQ.js";export{FieldNumber}from"../chunk-Y2T3JX7K.js";export{FieldSelect,optionFor}from"../chunk-KFWNGPW3.js";import"../chunk-MIX7EGRG.js";import"../chunk-DX3VILZ3.js";import"../chunk-JACEEVVF.js";import"../chunk-MFIRYGHW.js";import"../chunk-3XECMGXX.js";import"../chunk-P2VEMZH5.js";import"../chunk-EUFDQ4KL.js";import"../chunk-KXM6YRG2.js";
1
+ export{FieldText,Inspector,InspectorField,LinkPicker,ListField,bucketsOf,fieldShownInView,innerRowCount,insertAt,labelOf,moveTo,planFields,removeAt,rowViewState,viewReadsIn}from"../chunk-HG65R6IN.js";export{fieldIsShown,showWhenOf,shownFields,withShowWhen}from"../chunk-BPXEFVSQ.js";import"../chunk-YCSZAP7T.js";export{FieldSlider}from"../chunk-TDEBPOWV.js";import"../chunk-WHS6Y55E.js";import"../chunk-D4TH4QQR.js";import"../chunk-K56YDHYQ.js";import"../chunk-56ID6FKZ.js";export{useResolvedFields}from"../chunk-K53PQAMP.js";import"../chunk-FIVU2COQ.js";export{FieldNumber}from"../chunk-Y2T3JX7K.js";export{FieldSelect,optionFor}from"../chunk-KFWNGPW3.js";import"../chunk-DX3VILZ3.js";import"../chunk-MIX7EGRG.js";import"../chunk-JACEEVVF.js";import"../chunk-MFIRYGHW.js";import"../chunk-3XECMGXX.js";import"../chunk-P2VEMZH5.js";import"../chunk-EUFDQ4KL.js";import"../chunk-KXM6YRG2.js";
@@ -1 +1 @@
1
- export{BACKGROUND_WIDTHS,DEFAULT_BACKGROUND_WIDTH_WORDS,DEFAULT_CONTENT_WIDTH_WORDS,SettingsAction,SettingsBackgroundWidth,BorderInput as SettingsBorder,SettingsColour,SettingsContentWidth,CornersInput as SettingsCorners,SettingsDrill,SettingsGroupHead,SettingsGroupSub,AlignmentGrid as SettingsPlacement,SidesInput as SettingsSides,SidesEachToggle as SettingsSidesEach,borderSides,borderStartEach,sidesStartEach}from"../chunk-CLAADE4J.js";export{SettingsDefaultReset}from"../chunk-2T22IY3J.js";export{DESIGN_GROUPS,SETTINGS_BUCKETS,SettingsGroup}from"../chunk-D4TH4QQR.js";import"../chunk-56ID6FKZ.js";export{SettingsSwitch}from"../chunk-OECWLNKJ.js";export{SettingsField}from"../chunk-MIX7EGRG.js";export{SettingsSegmented}from"../chunk-DX3VILZ3.js";
1
+ export{BACKGROUND_WIDTHS,DEFAULT_BACKGROUND_WIDTH_WORDS,DEFAULT_CONTENT_WIDTH_WORDS,SettingsAction,SettingsBackgroundWidth,BorderInput as SettingsBorder,SettingsColour,SettingsContentWidth,CornersInput as SettingsCorners,SettingsDrill,SettingsGroupHead,SettingsGroupSub,AlignmentGrid as SettingsPlacement,SidesInput as SettingsSides,SidesEachToggle as SettingsSidesEach,borderSides,borderStartEach,sidesStartEach}from"../chunk-XWTQTANN.js";export{SettingsDefaultReset}from"../chunk-2T22IY3J.js";export{DESIGN_GROUPS,SETTINGS_BUCKETS,SettingsGroup}from"../chunk-D4TH4QQR.js";import"../chunk-56ID6FKZ.js";export{SettingsSwitch}from"../chunk-OECWLNKJ.js";export{SettingsSegmented}from"../chunk-DX3VILZ3.js";export{SettingsField}from"../chunk-MIX7EGRG.js";
@@ -7,9 +7,9 @@
7
7
  * own paths (`screen/lib/document/device-fields`, `…/panel-no-control-mark`)
8
8
  * re-export them under the names hosts already import: one definition, no copy.
9
9
  */
10
- /** The two tiers a stored value can belong to. Tablet is not one: it shows the
11
- * desktop values (`screen/lib/document/device-fields` `shownTier`). */
12
- type DeviceTier = 'desktop' | 'mobile';
10
+ /** The three tiers a stored value can belong to: each view owns its values
11
+ * (Lewis 2026-10-09, 2026-10-23, 2026-11-02). */
12
+ type DeviceTier = 'desktop' | 'tablet' | 'mobile';
13
13
  /** Marker carried by every gated field, in the same style as the fold marker:
14
14
  * the tier and the field it wraps live ON the field object, never only inside
15
15
  * the render closure. Without it a gated control is opaque to every static
@@ -19,8 +19,8 @@ declare const DEVICE_FIELD_MARKER: "__device";
19
19
  * Which views a gated row is drawn in. A {@link DeviceTier} draws the row in
20
20
  * that tier's view only. `'each'` draws it in EACH view, where it writes THAT
21
21
  * view's own value (Lewis 2026-10-27: the phone and the desktop are set apart
22
- * and do not disturb each other): one row that holds a desktop value and a phone
23
- * value of one setting, as the email's text panel and coupon lines do. The gate
22
+ * and do not disturb each other): one row that holds a value per view of one
23
+ * setting, as the email's text panel and coupon lines do. The gate
24
24
  * hands its control the tier it writes now (`screen/lib/document/device-fields`).
25
25
  */
26
26
  type DeviceFieldTier = DeviceTier | 'each';
@@ -1 +1 @@
1
- export{AddBlockRow as default}from"../../chunk-7U4HEUZM.js";import"../../chunk-RUQOIQWI.js";import"../../chunk-L4DFCNDQ.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-C4TJN6GR.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-NUJEHA6A.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-WMC6FE3G.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-D4TH4QQR.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-3BQT7FC7.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
1
+ export{AddBlockRow as default}from"../../chunk-5JNVMCCB.js";import"../../chunk-RUQOIQWI.js";import"../../chunk-2262JGFV.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-G2VZ4DET.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-3W2O22DZ.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-HG65R6IN.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-TDEBPOWV.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-D4TH4QQR.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-MNQDOSAX.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-JACEEVVF.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
@@ -1 +1 @@
1
- export{blockKey,AddSidePanel as default,presetKey,sectionKey,sharedKey,templateKey}from"../../chunk-VVHDUTAE.js";import"../../chunk-GDO4QJ4G.js";import"../../chunk-IZGFJWH4.js";import"../../chunk-N7E6264U.js";import"../../chunk-N3MJOHAG.js";import"../../chunk-SBVIW3KJ.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-RUQOIQWI.js";import"../../chunk-L4DFCNDQ.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-LX23TCTP.js";import"../../chunk-C4TJN6GR.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-NUJEHA6A.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-WMC6FE3G.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-D4TH4QQR.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-ZKY45F5G.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-VBEVZZTV.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-YYD257TD.js";import"../../chunk-RE4LP46F.js";import"../../chunk-3BQT7FC7.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-SQTVXE5D.js";import"../../chunk-TQ5Y6S2X.js";import"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
1
+ export{blockKey,AddSidePanel as default,presetKey,sectionKey,sharedKey,templateKey}from"../../chunk-L7PSERQH.js";import"../../chunk-GDO4QJ4G.js";import"../../chunk-IZGFJWH4.js";import"../../chunk-N7E6264U.js";import"../../chunk-N3MJOHAG.js";import"../../chunk-SBVIW3KJ.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-RUQOIQWI.js";import"../../chunk-2262JGFV.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-LX23TCTP.js";import"../../chunk-G2VZ4DET.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-3W2O22DZ.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-HG65R6IN.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-TDEBPOWV.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-D4TH4QQR.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-ZKY45F5G.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-VBEVZZTV.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-YYD257TD.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MNQDOSAX.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-JACEEVVF.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-SQTVXE5D.js";import"../../chunk-TQ5Y6S2X.js";import"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
@@ -1 +1 @@
1
- export{EASEL_NODE_CLIPBOARD,ancestorChain,nodeClipboardOf,nodeClipboardRules,nodeMenuItems,nodeShortcut,pageMenuItems,pastePlace,runNodeShortcut,textMenuItems,useNodeClipboard,useNodeContextMenu}from"../../chunk-H4TUOPI7.js";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-LX23TCTP.js";import"../../chunk-C4TJN6GR.js";import"../../chunk-CWELHADJ.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-ZKY45F5G.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-P5VYGWYO.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
1
+ export{EASEL_NODE_CLIPBOARD,ancestorChain,nodeClipboardOf,nodeClipboardRules,nodeMenuItems,nodeShortcut,pageMenuItems,pastePlace,runNodeShortcut,textMenuItems,useNodeClipboard,useNodeContextMenu}from"../../chunk-NTG5ODKZ.js";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-LX23TCTP.js";import"../../chunk-G2VZ4DET.js";import"../../chunk-CWELHADJ.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-ZKY45F5G.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-P5VYGWYO.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
@@ -1 +1 @@
1
- export{PageEditGuardNotices as default}from"../../chunk-MGEXTIZH.js";import"../../chunk-CPIWSFGR.js";import"../../chunk-QZJKWKGH.js";import"../../chunk-ERR437B5.js";import"../../chunk-JIP5JNRB.js";import"../../chunk-GR3XRILS.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-6ATIYLUL.js";import"../../chunk-KO47WAWR.js";import"../../chunk-NQW6XCAY.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-LX23TCTP.js";import"../../chunk-C4TJN6GR.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-VBEVZZTV.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-YYD257TD.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
1
+ export{PageEditGuardNotices as default}from"../../chunk-YES5F7OS.js";import"../../chunk-L2WK5JYB.js";import"../../chunk-QZJKWKGH.js";import"../../chunk-ERR437B5.js";import"../../chunk-JIP5JNRB.js";import"../../chunk-GR3XRILS.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-6ATIYLUL.js";import"../../chunk-KO47WAWR.js";import"../../chunk-NQW6XCAY.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-LX23TCTP.js";import"../../chunk-G2VZ4DET.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-VBEVZZTV.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-YYD257TD.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
@@ -1 +1 @@
1
- export{ScreenChrome as default}from"../../chunk-2EDOL4IW.js";import"../../chunk-UMBNBCL4.js";import"../../chunk-OXZDSOZV.js";import"../../chunk-7OCEPOEJ.js";import"../../chunk-U4TG43PD.js";import"../../chunk-5XL2RXFU.js";import"../../chunk-3QB2ZQXK.js";import"../../chunk-BLE3U2GS.js";import"../../chunk-22I55W37.js";import"../../chunk-LUOY3A3Q.js";import"../../chunk-PG7G7ELT.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-6EDVZBUO.js";import"../../chunk-5OYP3C2K.js";import"../../chunk-3ZGOVNVH.js";import"../../chunk-MGEXTIZH.js";import"../../chunk-PVBDKBJB.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-CPIWSFGR.js";import"../../chunk-QZJKWKGH.js";import"../../chunk-ERR437B5.js";import"../../chunk-JIP5JNRB.js";import"../../chunk-GR3XRILS.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-6ATIYLUL.js";import"../../chunk-KO47WAWR.js";import"../../chunk-NQW6XCAY.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-5545A3PC.js";import"../../chunk-VVHDUTAE.js";import"../../chunk-GDO4QJ4G.js";import"../../chunk-IZGFJWH4.js";import"../../chunk-N7E6264U.js";import"../../chunk-N3MJOHAG.js";import"../../chunk-SBVIW3KJ.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-RUQOIQWI.js";import"../../chunk-L4DFCNDQ.js";import"../../chunk-T2RINM7R.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-H4TUOPI7.js";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-LX23TCTP.js";import"../../chunk-XFYFKITX.js";import"../../chunk-C4TJN6GR.js";import"../../chunk-CWELHADJ.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-5NHQ452C.js";import"../../chunk-AJ2SUSET.js";import"../../chunk-6UAEFOJ4.js";import"../../chunk-ANPOR6EY.js";import"../../chunk-R4AUZVA3.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-NUJEHA6A.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-WMC6FE3G.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-D4TH4QQR.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-ZKY45F5G.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-P5VYGWYO.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-VBEVZZTV.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-YYD257TD.js";import"../../chunk-RE4LP46F.js";import"../../chunk-3BQT7FC7.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-SQTVXE5D.js";import"../../chunk-TQ5Y6S2X.js";import"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";import"../../chunk-BSPCSC45.js";import"../../chunk-467WWV4I.js";import"../../chunk-TIAWIOGD.js";import"../../chunk-MGVI67QV.js";
1
+ export{ScreenChrome as default}from"../../chunk-O4OWODU2.js";import"../../chunk-UMBNBCL4.js";import"../../chunk-OXZDSOZV.js";import"../../chunk-7OCEPOEJ.js";import"../../chunk-FW35PCK7.js";import"../../chunk-5XL2RXFU.js";import"../../chunk-3QB2ZQXK.js";import"../../chunk-ZNLODQD4.js";import"../../chunk-22I55W37.js";import"../../chunk-LUOY3A3Q.js";import"../../chunk-BFJAEQZ6.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-6EDVZBUO.js";import"../../chunk-5OWAV3MH.js";import"../../chunk-TYTMUHUK.js";import"../../chunk-YES5F7OS.js";import"../../chunk-PVBDKBJB.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-L2WK5JYB.js";import"../../chunk-QZJKWKGH.js";import"../../chunk-ERR437B5.js";import"../../chunk-JIP5JNRB.js";import"../../chunk-GR3XRILS.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-6ATIYLUL.js";import"../../chunk-KO47WAWR.js";import"../../chunk-NQW6XCAY.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-5545A3PC.js";import"../../chunk-L7PSERQH.js";import"../../chunk-GDO4QJ4G.js";import"../../chunk-IZGFJWH4.js";import"../../chunk-N7E6264U.js";import"../../chunk-N3MJOHAG.js";import"../../chunk-SBVIW3KJ.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-RUQOIQWI.js";import"../../chunk-2262JGFV.js";import"../../chunk-T2RINM7R.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-NTG5ODKZ.js";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-LX23TCTP.js";import"../../chunk-XFYFKITX.js";import"../../chunk-G2VZ4DET.js";import"../../chunk-CWELHADJ.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-5NHQ452C.js";import"../../chunk-AJ2SUSET.js";import"../../chunk-6UAEFOJ4.js";import"../../chunk-ANPOR6EY.js";import"../../chunk-R4AUZVA3.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-3W2O22DZ.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-HG65R6IN.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-TDEBPOWV.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-D4TH4QQR.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-ZKY45F5G.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-P5VYGWYO.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-VBEVZZTV.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-YYD257TD.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MNQDOSAX.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-JACEEVVF.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-SQTVXE5D.js";import"../../chunk-TQ5Y6S2X.js";import"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";import"../../chunk-BSPCSC45.js";import"../../chunk-467WWV4I.js";import"../../chunk-TIAWIOGD.js";import"../../chunk-MGVI67QV.js";
@@ -1 +1 @@
1
- export{ScreenDocumentContext,ScreenDocumentProvider,useScreenDocument}from"../../chunk-CPIWSFGR.js";import"../../chunk-QZJKWKGH.js";import"../../chunk-ERR437B5.js";import"../../chunk-JIP5JNRB.js";import"../../chunk-GR3XRILS.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-6ATIYLUL.js";import"../../chunk-KO47WAWR.js";import"../../chunk-NQW6XCAY.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-LX23TCTP.js";import"../../chunk-C4TJN6GR.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-YYD257TD.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
1
+ export{ScreenDocumentContext,ScreenDocumentProvider,useScreenDocument}from"../../chunk-L2WK5JYB.js";import"../../chunk-QZJKWKGH.js";import"../../chunk-ERR437B5.js";import"../../chunk-JIP5JNRB.js";import"../../chunk-GR3XRILS.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-6ATIYLUL.js";import"../../chunk-KO47WAWR.js";import"../../chunk-NQW6XCAY.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-LX23TCTP.js";import"../../chunk-G2VZ4DET.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-YYD257TD.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
@@ -1 +1 @@
1
- export{DocumentScreen,ScreenMount as default}from"../../chunk-IHOTVWDE.js";import"../../chunk-GXQCZJOP.js";import"../../chunk-YMK3MZJK.js";import"../../chunk-2EDOL4IW.js";import"../../chunk-UMBNBCL4.js";import"../../chunk-OXZDSOZV.js";import"../../chunk-7OCEPOEJ.js";import"../../chunk-U4TG43PD.js";import"../../chunk-5XL2RXFU.js";import"../../chunk-3QB2ZQXK.js";import"../../chunk-BLE3U2GS.js";import"../../chunk-22I55W37.js";import"../../chunk-LUOY3A3Q.js";import"../../chunk-PG7G7ELT.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-6EDVZBUO.js";import"../../chunk-5OYP3C2K.js";import"../../chunk-3ZGOVNVH.js";import"../../chunk-MGEXTIZH.js";import"../../chunk-PVBDKBJB.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-CPIWSFGR.js";import"../../chunk-QZJKWKGH.js";import"../../chunk-ERR437B5.js";import"../../chunk-JIP5JNRB.js";import"../../chunk-GR3XRILS.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-6ATIYLUL.js";import"../../chunk-KO47WAWR.js";import"../../chunk-NQW6XCAY.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-5545A3PC.js";import"../../chunk-VVHDUTAE.js";import"../../chunk-GDO4QJ4G.js";import"../../chunk-IZGFJWH4.js";import"../../chunk-N7E6264U.js";import"../../chunk-N3MJOHAG.js";import"../../chunk-SBVIW3KJ.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-RUQOIQWI.js";import"../../chunk-L4DFCNDQ.js";import"../../chunk-T2RINM7R.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-H4TUOPI7.js";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-LX23TCTP.js";import"../../chunk-XFYFKITX.js";import"../../chunk-C4TJN6GR.js";import"../../chunk-CWELHADJ.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-5NHQ452C.js";import"../../chunk-AJ2SUSET.js";import"../../chunk-6UAEFOJ4.js";import"../../chunk-ANPOR6EY.js";import"../../chunk-R4AUZVA3.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-NUJEHA6A.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-WMC6FE3G.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-D4TH4QQR.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-ZKY45F5G.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-P5VYGWYO.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-VBEVZZTV.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-YYD257TD.js";import"../../chunk-RE4LP46F.js";import"../../chunk-3BQT7FC7.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-SQTVXE5D.js";import"../../chunk-TQ5Y6S2X.js";import"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";import"../../chunk-BSPCSC45.js";import"../../chunk-467WWV4I.js";import"../../chunk-TIAWIOGD.js";import"../../chunk-MGVI67QV.js";
1
+ export{DocumentScreen,ScreenMount as default}from"../../chunk-W3UZNKGS.js";import"../../chunk-GXQCZJOP.js";import"../../chunk-AAZIMKLQ.js";import"../../chunk-O4OWODU2.js";import"../../chunk-UMBNBCL4.js";import"../../chunk-OXZDSOZV.js";import"../../chunk-7OCEPOEJ.js";import"../../chunk-FW35PCK7.js";import"../../chunk-5XL2RXFU.js";import"../../chunk-3QB2ZQXK.js";import"../../chunk-ZNLODQD4.js";import"../../chunk-22I55W37.js";import"../../chunk-LUOY3A3Q.js";import"../../chunk-BFJAEQZ6.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-6EDVZBUO.js";import"../../chunk-5OWAV3MH.js";import"../../chunk-TYTMUHUK.js";import"../../chunk-YES5F7OS.js";import"../../chunk-PVBDKBJB.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-L2WK5JYB.js";import"../../chunk-QZJKWKGH.js";import"../../chunk-ERR437B5.js";import"../../chunk-JIP5JNRB.js";import"../../chunk-GR3XRILS.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-6ATIYLUL.js";import"../../chunk-KO47WAWR.js";import"../../chunk-NQW6XCAY.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-5545A3PC.js";import"../../chunk-L7PSERQH.js";import"../../chunk-GDO4QJ4G.js";import"../../chunk-IZGFJWH4.js";import"../../chunk-N7E6264U.js";import"../../chunk-N3MJOHAG.js";import"../../chunk-SBVIW3KJ.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-RUQOIQWI.js";import"../../chunk-2262JGFV.js";import"../../chunk-T2RINM7R.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-NTG5ODKZ.js";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-LX23TCTP.js";import"../../chunk-XFYFKITX.js";import"../../chunk-G2VZ4DET.js";import"../../chunk-CWELHADJ.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-5NHQ452C.js";import"../../chunk-AJ2SUSET.js";import"../../chunk-6UAEFOJ4.js";import"../../chunk-ANPOR6EY.js";import"../../chunk-R4AUZVA3.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-3W2O22DZ.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-HG65R6IN.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-TDEBPOWV.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-D4TH4QQR.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-ZKY45F5G.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-P5VYGWYO.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-VBEVZZTV.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-YYD257TD.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MNQDOSAX.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-JACEEVVF.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-SQTVXE5D.js";import"../../chunk-TQ5Y6S2X.js";import"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";import"../../chunk-BSPCSC45.js";import"../../chunk-467WWV4I.js";import"../../chunk-TIAWIOGD.js";import"../../chunk-MGVI67QV.js";
@@ -1 +1 @@
1
- export{ScreenStoreProvider as default}from"../../chunk-YMK3MZJK.js";import"../../chunk-L4DFCNDQ.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-NUJEHA6A.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-WMC6FE3G.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-D4TH4QQR.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-3BQT7FC7.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
1
+ export{ScreenStoreProvider as default}from"../../chunk-AAZIMKLQ.js";import"../../chunk-2262JGFV.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-3W2O22DZ.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-HG65R6IN.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-TDEBPOWV.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-D4TH4QQR.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-MNQDOSAX.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-JACEEVVF.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
@@ -1,17 +1,17 @@
1
- import{AddBlockRow as e}from"../../chunk-7U4HEUZM.js";import{scrollPreviewToSection as n,gotoPreviewSlide as o}from"../../chunk-LUOY3A3Q.js";import{useEaselUndoKeys as r}from"../../chunk-PG7G7ELT.js";import{SlotChildActionsProvider as t}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as s}from"../../chunk-6EDVZBUO.js";import{usePartBridge as i}from"../../chunk-5OYP3C2K.js";import{useSectionOps as c}from"../../chunk-3ZGOVNVH.js";import{useScreenDocument as p}from"../../chunk-CPIWSFGR.js";import"../../chunk-QZJKWKGH.js";import"../../chunk-ERR437B5.js";import"../../chunk-JIP5JNRB.js";import"../../chunk-GR3XRILS.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-6ATIYLUL.js";import"../../chunk-KO47WAWR.js";import"../../chunk-NQW6XCAY.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-RUQOIQWI.js";import{SELECTION_MODE as l,useScreenPinned as m,useScreenCanvasFrame as d,useScreenInspectorPanel as u,useScreenPickFollowsSelection as a,sameInspectorMode as h,useStandaloneScreenBridges as k,useScreenBlockLook as j,useScreenBlockRules as f,isSelectionMode as S,shownChildSlotsOf as C}from"../../chunk-L4DFCNDQ.js";import{MediaPopup as N}from"../../chunk-T2RINM7R.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-LX23TCTP.js";import{DEFAULT_SCREEN_WORDS as y}from"../../chunk-C4TJN6GR.js";import{slotChildRowName as E}from"../../chunk-5NHQ452C.js";import"../../chunk-AJ2SUSET.js";import"../../chunk-6UAEFOJ4.js";import"../../chunk-ANPOR6EY.js";import"../../chunk-R4AUZVA3.js";import{slotFieldsOf as A,nestsInTree as R}from"../../chunk-TCAAOYQY.js";import{useEasel as P}from"../../chunk-NUJEHA6A.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-WMC6FE3G.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-ZEH6QLBH.js";import{LayersTree as x,Subtree as Q,TreeRow as F,TreeRowAction as T,TreeSeam as g}from"../../chunk-WHS6Y55E.js";import"../../chunk-D4TH4QQR.js";import{DEFAULT_TREE_WORDS as O}from"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-NDRZP6YR.js";import{DEFAULT_SAVE_WORDS as Y,saveIndicator as v}from"../../chunk-H6DDIBQ4.js";import{SaveState as D,panelWidthVars as I}from"../../chunk-VBEVZZTV.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-YYD257TD.js";import"../../chunk-RE4LP46F.js";import"../../chunk-3BQT7FC7.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-JACEEVVF.js";import{useWords as W}from"../../chunk-MFIRYGHW.js";import"../../chunk-SQTVXE5D.js";import"../../chunk-TQ5Y6S2X.js";import{useTreeDrag as B}from"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import{zoneKey as M,parseZoneKey as b}from"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";import"../../chunk-467WWV4I.js";import"../../chunk-TIAWIOGD.js";import"../../chunk-MGVI67QV.js";import{useState as z,useRef as w,useEffect as G,useCallback as V,Fragment as H}from"react";import{Tooltip as K}from"efficient-shell/ui";import{TrashIcon as Z}from"efficient-shell/icons/efficient";import{jsxs as X,jsx as J,Fragment as L}from"react/jsx-runtime";var U=e=>n=>{n.target.closest("button, input")||e()},$={rowClick:U};function q(){const{saveState:q,readOnly:_,readOnlyReason:ee=null}=p(),ne=c(),{appState:oe,selectedItem:re,config:te}=P(e=>e),[se,ie]=z(l),ce=W("screen",y),pe=W("tree",O),le=W("save",Y),{first:me,last:de,panelOf:ue}=m(),ae=ue(me),he=d(),ke=u(),je=oe.data.content?.[0]??null,fe=je?.props.id??null,Se=je?.type===me,Ce=je?.type===de,Ne=w(null),ye=w(null);r(ye),a(re?.props.id),G(()=>{fe&&Ne.current!==fe&&(Ne.current=fe,Se?ie(ae??l):re||ne.select({index:0}))},[fe,re,ne,Se]);const Ee=V(e=>ie(n=>h(n,e)?n:e),[]),Ae=k({kind:se.kind,mode:se,open:Ee,show:e=>ie(e),reveal:()=>{},select:(e,n)=>{ie(e=>h(e,n)?e:n),ne.select(e)}}),{selectNode:Re}=i({mode:se,setMode:ie,onOpenPart:n}),Pe=j(),{labelAtLevel:xe,Icon:Qe}=Pe,{canAddTo:Fe}=f(),Te=e=>xe(e,"block",te.components[e]?.label??e),ge=e=>xe(e,"section",Te(e)),Oe=!Se&&S(se)&&re?.props.id===fe,Ye=je?Fe(je.type)?.spec??null:null,ve=je&&Ye?`${je.props.id}:${Ye.slot}`:null,De=je&&Ye&&Array.isArray(je.props[Ye.slot])?je.props[Ye.slot]:[],Ie=e=>E(e,Te,Pe.plainText),We=(e,r)=>{je&&Ye&&ve&&(ie(l),Ye.slider?(o(String(je.props.id),e),ne.select({index:e,zone:ve}),n(String(je.props.id))):(ne.select({index:e,zone:ve}),n(r)))},Be=()=>{if(!je||!Ye||!ve)return;const e=De.length;ne.insertComponent(ve,Ye.childType,e),ie(l),Ye.slider?requestAnimationFrame(()=>{o(String(je.props.id),e),ne.select({index:e,zone:ve})}):ne.select({index:e,zone:ve})},Me=e=>A(te,e),be=e=>{const{parentId:n,slot:o}=b(e),r=e=>{if(!e)return null;if(String(e.props.id)===n)return e;for(const n of Me(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(je)?.props[o];return Array.isArray(t)?t.length:0},ze=(e,n,o)=>{const r=Math.min(Math.max(o,0),be(e)),t=n<r?r-1:r;t!==n&&(ne.reorderComponent(e,n,t),ie(l),ne.select({index:t,zone:e}))},we=B({keyOf:e=>e.id,readOnly:Boolean(_),canDrop:(e,n)=>M(n)===e.zone&&n.index>=0&&n.index<=be(e.zone),onDrop:(e,n)=>ze(e.zone,e.index,n.index),onStep:(e,n)=>ze(e.zone,e.index,n<0?e.index-1:e.index+2)}),Ge=(e,n)=>/* @__PURE__ */J(g,{..._?{}:we.seam({place:{...b(e),index:n}})},`seam:${e}:${n}`),Ve=e=>Pe.blockRowName(e,Te),He=(e,o,r)=>{ie(l),ne.select({index:o,zone:e}),n(r)},Ke=(e,n,o)=>{ne.insertComponent(e,n,o),ie(l),ne.select({index:o,zone:e})},Ze=(n,o,r)=>/* @__PURE__ */J(e,{choices:r,onPick:e=>Ke(n,e,o)}),Xe=(e,n)=>{const o=C(te,e);const r=Fe(e.type,void 0,void 0,{id:String(e.props.id??""),data:oe.data}),t=r?.choices??null,s="footer"===r?.source?Ve:Ie;/* @__PURE__ */
2
- return X(L,{children:[o.map(({child:e,zone:o,index:r})=>{const t=re?.props.id===e.props.id,i=R(te,e.type,n),c=s(e),p=String(e.props.id),m=()=>He(o,r,p),{rowProps:d,...u}=we.row({item:{id:p,zone:o,index:r},place:{...b(o),index:r}},{onClick:U(m)});/* @__PURE__ */
3
- return X(H,{children:[0===r&&Ge(o,0),
4
- /* @__PURE__ */J(F,{words:pe,icon:/* @__PURE__ */J(Qe,{type:e.type,size:13}),name:c,selected:t,onSelect:m,...u,actions:/* @__PURE__ */J(T,{kind:"delete",label:ce.deleteNamed({name:c}),onClick:()=>{return e=o,n=r,ne.removeComponent(e,n),ie(l),void ne.select(null);var e,n},children:/* @__PURE__ */J(Z,{size:13})}),rowProps:d}),i&&/* @__PURE__ */J(Q,{children:Xe(e,n+1)}),Ge(o,r+1)]},String(e.props.id??`${o}-${r}`))}),r&&t?Ze(`${e.props.id}:${r.slot}`,o.length,t):null]})},Je="HeroSingle"===je?.type,Le=Boolean(je)&&(Boolean(Fe(je.type))||Me(je.type).length>0),Ue=Boolean(je)&&(Boolean(Ye)||Ce||Se||Je||Le);/* @__PURE__ */
5
- return X("div",{ref:ye,className:"sf-editor es-editor",style:I(s),children:[
6
- /* @__PURE__ */J("div",{className:"sf-section-bar",children:/* @__PURE__ */J(D,null!==ee?{tone:"off",label:ee,role:"status"}:{...v(q,le),role:"status"})}),
7
- /* @__PURE__ */X("div",{className:"sf-body",children:[Ue&&je&&/* @__PURE__ */X("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
8
- /* @__PURE__ */J("div",{className:"sf-panel-head",children:/* @__PURE__ */J(K,{content:Se?ce.headerSettings:ce.sectionSettings({name:ge(je.type)}),side:"bottom",children:/* @__PURE__ */J("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(Oe?"is-selected":""),"aria-pressed":Oe,onClick:()=>{Se?ie(ae??l):(ie(l),ne.select({index:0}))},children:ge(je.type)})})}),
9
- /* @__PURE__ */J(x,{className:"sf-tree sf-scroll",rootProps:we.rootProps(),words:pe,children:/* @__PURE__ */J(Q,{children:Se?
10
- /* @__PURE__ */J(F,{words:pe,icon:/* @__PURE__ */J(Qe,{type:"header",size:13}),name:ce.headerSettings,selected:se.kind===ae?.kind,onSelect:()=>ie(ae??l),rowProps:{onClick:U(()=>ie(ae??l))}}):Ye?/* @__PURE__ */X(L,{children:[De.map((e,n)=>{const o=re?.props.id===e.props.id,r=Ie(e),t=String(e.props.id),s=()=>We(n,t),{rowProps:i,...c}=we.row({item:{id:t,zone:ve,index:n},place:{...b(ve),index:n}},{onClick:U(s)});/* @__PURE__ */
11
- return X(H,{children:[0===n&&Ge(ve,0),
12
- /* @__PURE__ */J(F,{words:pe,icon:/* @__PURE__ */J(Qe,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */J(T,{kind:"delete",label:ce.deleteNamed({name:r}),onClick:()=>{return e=n,void(ve&&(ne.removeComponent(ve,e),ie(l),ne.select(null)));var e},children:/* @__PURE__ */J(Z,{size:13})}),rowProps:i}),Ge(ve,n+1)]},String(e.props.id??n))}),
13
- /* @__PURE__ */X("button",{type:"button",className:"sf-add-card",onClick:Be,children:[
14
- /* @__PURE__ */J("span",{className:"sf-plus sf-plus--sm",children:"+"}),Ye.addLabel]}),fe?Ae.partRows?.(je,$):null]}):Xe(je,1)})})]}),
15
- /* @__PURE__ */J("div",{className:"sf-center",children:/* @__PURE__ */J("div",{className:"sf-preview-host",children:/* @__PURE__ */J(he,{})})}),
16
- /* @__PURE__ */J(t,{value:{selectChild:(e,n,o,r)=>"section"===Fe(r)?.source?We(n,o):He(e,n,o),addChild:(e,n,o,r,t)=>"section"===Fe(t)?.source?Be():Ke(`${e}:${n}`,o,r),childRowName:Ie,blockRowName:Ve},children:/* @__PURE__ */J(ke,{mode:se,onOpenWebsiteSettings:Ae.openSettings??(()=>{}),onSelectNode:Re,hideNodeActions:!0})})]}),
17
- /* @__PURE__ */J(N,{})]})}export{q as default};
1
+ import{AddBlockRow as e}from"../../chunk-5JNVMCCB.js";import{scrollPreviewToSection as n,gotoPreviewSlide as o}from"../../chunk-LUOY3A3Q.js";import{useEaselUndoKeys as r}from"../../chunk-BFJAEQZ6.js";import{SlotChildActionsProvider as t}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as s}from"../../chunk-6EDVZBUO.js";import{usePartBridge as i}from"../../chunk-5OWAV3MH.js";import{useSectionOps as c}from"../../chunk-TYTMUHUK.js";import{useScreenDocument as p}from"../../chunk-L2WK5JYB.js";import"../../chunk-QZJKWKGH.js";import"../../chunk-ERR437B5.js";import"../../chunk-JIP5JNRB.js";import"../../chunk-GR3XRILS.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-6ATIYLUL.js";import"../../chunk-KO47WAWR.js";import"../../chunk-NQW6XCAY.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-RUQOIQWI.js";import{SELECTION_MODE as l,useScreenPinned as m,useScreenCanvasFrame as d,useScreenInspectorPanel as u,useScreenPickFollowsSelection as a,sameInspectorMode as h,useStandaloneScreenBridges as k,useScreenBlockLook as j,useScreenBlockRules as f,isSelectionMode as S,shownChildSlotsOf as N}from"../../chunk-2262JGFV.js";import{MediaPopup as y}from"../../chunk-T2RINM7R.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-LX23TCTP.js";import{DEFAULT_SCREEN_WORDS as A}from"../../chunk-G2VZ4DET.js";import{slotChildRowName as C}from"../../chunk-5NHQ452C.js";import"../../chunk-AJ2SUSET.js";import"../../chunk-6UAEFOJ4.js";import"../../chunk-ANPOR6EY.js";import"../../chunk-R4AUZVA3.js";import{slotFieldsOf as E,nestsInTree as R}from"../../chunk-TCAAOYQY.js";import{useEasel as x}from"../../chunk-3W2O22DZ.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-HG65R6IN.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-TDEBPOWV.js";import{LayersTree as P,Subtree as Q,TreeRow as T,TreeRowAction as O,TreeSeam as D}from"../../chunk-WHS6Y55E.js";import"../../chunk-D4TH4QQR.js";import{DEFAULT_TREE_WORDS as W}from"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-NDRZP6YR.js";import{DEFAULT_SAVE_WORDS as Y,saveIndicator as g}from"../../chunk-H6DDIBQ4.js";import{SaveState as B,panelWidthVars as F}from"../../chunk-VBEVZZTV.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-YYD257TD.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MNQDOSAX.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-JACEEVVF.js";import{useWords as M}from"../../chunk-MFIRYGHW.js";import"../../chunk-SQTVXE5D.js";import"../../chunk-TQ5Y6S2X.js";import{useTreeDrag as v}from"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import{zoneKey as I,parseZoneKey as V}from"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";import"../../chunk-467WWV4I.js";import"../../chunk-TIAWIOGD.js";import"../../chunk-MGVI67QV.js";import{useState as b,useRef as z,useEffect as w,useCallback as K,Fragment as J}from"react";import{Tooltip as X}from"efficient-shell/ui";import{TrashIcon as Z}from"efficient-shell/icons/efficient";import{jsxs as G,jsx as H,Fragment as U}from"react/jsx-runtime";var L=e=>n=>{n.target.closest("button, input")||e()},$={rowClick:L};function q(){const{saveState:q,readOnly:_,readOnlyReason:ee=null}=p(),ne=c(),{appState:oe,selectedItem:re,config:te}=x(e=>e),[se,ie]=b(l),ce=M("screen",A),pe=M("tree",W),le=M("save",Y),{first:me,last:de,panelOf:ue}=m(),ae=ue(me),he=d(),ke=u(),je=oe.data.content?.[0]??null,fe=je?.props.id??null,Se=je?.type===me,Ne=je?.type===de,ye=z(null),Ae=z(null);r(Ae),a(re?.props.id),w(()=>{fe&&ye.current!==fe&&(ye.current=fe,Se?ie(ae??l):re||ne.select({index:0}))},[fe,re,ne,Se]);const Ce=K(e=>ie(n=>h(n,e)?n:e),[]),Ee=k({kind:se.kind,mode:se,open:Ce,show:e=>ie(e),reveal:()=>{},select:(e,n)=>{ie(e=>h(e,n)?e:n),ne.select(e)}}),{selectNode:Re}=i({mode:se,setMode:ie,onOpenPart:n}),xe=j(),{labelAtLevel:Pe,Icon:Qe}=xe,{canAddTo:Te}=f(),Oe=e=>Pe(e,"block",te.components[e]?.label??e),De=e=>Pe(e,"section",Oe(e)),We=!Se&&S(se)&&re?.props.id===fe,Ye=je?Te(je.type)?.spec??null:null,ge=je&&Ye?`${je.props.id}:${Ye.slot}`:null,Be=je&&Ye&&Array.isArray(je.props[Ye.slot])?je.props[Ye.slot]:[],Fe=e=>C(e,Oe,xe.plainText),Me=(e,r)=>{je&&Ye&&ge&&(ie(l),Ye.slider?(o(String(je.props.id),e),ne.select({index:e,zone:ge}),n(String(je.props.id))):(ne.select({index:e,zone:ge}),n(r)))},ve=()=>{if(!je||!Ye||!ge)return;const e=Be.length;ne.insertComponent(ge,Ye.childType,e),ie(l),Ye.slider?requestAnimationFrame(()=>{o(String(je.props.id),e),ne.select({index:e,zone:ge})}):ne.select({index:e,zone:ge})},Ie=e=>E(te,e),Ve=e=>{const{parentId:n,slot:o}=V(e),r=e=>{if(!e)return null;if(String(e.props.id)===n)return e;for(const n of Ie(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(je)?.props[o];return Array.isArray(t)?t.length:0},be=(e,n,o)=>{const r=Math.min(Math.max(o,0),Ve(e)),t=n<r?r-1:r;t!==n&&(ne.reorderComponent(e,n,t),ie(l),ne.select({index:t,zone:e}))},ze=v({keyOf:e=>e.id,readOnly:Boolean(_),canDrop:(e,n)=>I(n)===e.zone&&n.index>=0&&n.index<=Ve(e.zone),onDrop:(e,n)=>be(e.zone,e.index,n.index),onStep:(e,n)=>be(e.zone,e.index,n<0?e.index-1:e.index+2)}),we=(e,n)=>/* @__PURE__ */H(D,{..._?{}:ze.seam({place:{...V(e),index:n}})},`seam:${e}:${n}`),Ke=e=>xe.blockRowName(e,Oe),Je=(e,o,r)=>{ie(l),ne.select({index:o,zone:e}),n(r)},Xe=(e,n,o)=>{ne.insertComponent(e,n,o),ie(l),ne.select({index:o,zone:e})},Ze=(n,o,r)=>/* @__PURE__ */H(e,{choices:r,onPick:e=>Xe(n,e,o)}),Ge=(e,n)=>{const o=N(te,e);const r=Te(e.type,void 0,void 0,{id:String(e.props.id??""),data:oe.data}),t=r?.choices??null,s="footer"===r?.source?Ke:Fe;/* @__PURE__ */
2
+ return G(U,{children:[o.map(({child:e,zone:o,index:r})=>{const t=re?.props.id===e.props.id,i=R(te,e.type,n),c=s(e),p=String(e.props.id),m=()=>Je(o,r,p),{rowProps:d,...u}=ze.row({item:{id:p,zone:o,index:r},place:{...V(o),index:r}},{onClick:L(m)});/* @__PURE__ */
3
+ return G(J,{children:[0===r&&we(o,0),
4
+ /* @__PURE__ */H(T,{words:pe,icon:/* @__PURE__ */H(Qe,{type:e.type,size:13}),name:c,selected:t,onSelect:m,...u,actions:/* @__PURE__ */H(O,{kind:"delete",label:ce.deleteNamed({name:c}),onClick:()=>{return e=o,n=r,ne.removeComponent(e,n),ie(l),void ne.select(null);var e,n},children:/* @__PURE__ */H(Z,{size:13})}),rowProps:d}),i&&/* @__PURE__ */H(Q,{children:Ge(e,n+1)}),we(o,r+1)]},String(e.props.id??`${o}-${r}`))}),r&&t?Ze(`${e.props.id}:${r.slot}`,o.length,t):null]})},He="HeroSingle"===je?.type,Ue=Boolean(je)&&(Boolean(Te(je.type))||Ie(je.type).length>0),Le=Boolean(je)&&(Boolean(Ye)||Ne||Se||He||Ue);/* @__PURE__ */
5
+ return G("div",{ref:Ae,className:"sf-editor es-editor",style:F(s),children:[
6
+ /* @__PURE__ */H("div",{className:"sf-section-bar",children:/* @__PURE__ */H(B,null!==ee?{tone:"off",label:ee,role:"status"}:{...g(q,le),role:"status"})}),
7
+ /* @__PURE__ */G("div",{className:"sf-body",children:[Le&&je&&/* @__PURE__ */G("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
8
+ /* @__PURE__ */H("div",{className:"sf-panel-head",children:/* @__PURE__ */H(X,{content:Se?ce.headerSettings:ce.sectionSettings({name:De(je.type)}),side:"bottom",children:/* @__PURE__ */H("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(We?"is-selected":""),"aria-pressed":We,onClick:()=>{Se?ie(ae??l):(ie(l),ne.select({index:0}))},children:De(je.type)})})}),
9
+ /* @__PURE__ */H(P,{className:"sf-tree sf-scroll",rootProps:ze.rootProps(),words:pe,children:/* @__PURE__ */H(Q,{children:Se?
10
+ /* @__PURE__ */H(T,{words:pe,icon:/* @__PURE__ */H(Qe,{type:"header",size:13}),name:ce.headerSettings,selected:se.kind===ae?.kind,onSelect:()=>ie(ae??l),rowProps:{onClick:L(()=>ie(ae??l))}}):Ye?/* @__PURE__ */G(U,{children:[Be.map((e,n)=>{const o=re?.props.id===e.props.id,r=Fe(e),t=String(e.props.id),s=()=>Me(n,t),{rowProps:i,...c}=ze.row({item:{id:t,zone:ge,index:n},place:{...V(ge),index:n}},{onClick:L(s)});/* @__PURE__ */
11
+ return G(J,{children:[0===n&&we(ge,0),
12
+ /* @__PURE__ */H(T,{words:pe,icon:/* @__PURE__ */H(Qe,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */H(O,{kind:"delete",label:ce.deleteNamed({name:r}),onClick:()=>{return e=n,void(ge&&(ne.removeComponent(ge,e),ie(l),ne.select(null)));var e},children:/* @__PURE__ */H(Z,{size:13})}),rowProps:i}),we(ge,n+1)]},String(e.props.id??n))}),
13
+ /* @__PURE__ */G("button",{type:"button",className:"sf-add-card",onClick:ve,children:[
14
+ /* @__PURE__ */H("span",{className:"sf-plus sf-plus--sm",children:"+"}),Ye.addLabel]}),fe?Ee.partRows?.(je,$):null]}):Ge(je,1)})})]}),
15
+ /* @__PURE__ */H("div",{className:"sf-center",children:/* @__PURE__ */H("div",{className:"sf-preview-host",children:/* @__PURE__ */H(he,{})})}),
16
+ /* @__PURE__ */H(t,{value:{selectChild:(e,n,o,r)=>"section"===Te(r)?.source?Me(n,o):Je(e,n,o),addChild:(e,n,o,r,t)=>"section"===Te(t)?.source?ve():Xe(`${e}:${n}`,o,r),childRowName:Fe,blockRowName:Ke},children:/* @__PURE__ */H(ke,{mode:se,onOpenWebsiteSettings:Ee.openSettings??(()=>{}),onSelectNode:Re,hideNodeActions:!0})})]}),
17
+ /* @__PURE__ */H(y,{})]})}export{q as default};