efficient-easel 26.16.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.
- package/README.md +9 -8
- package/dist/{chunk-YTF65TZA.js → chunk-2262JGFV.js} +5 -5
- package/dist/chunk-53QUHEHK.js +1 -0
- package/dist/{chunk-W2S2VJOQ.js → chunk-5JNVMCCB.js} +1 -1
- package/dist/{chunk-XFI3UPB2.js → chunk-5OWAV3MH.js} +1 -1
- package/dist/chunk-76MUJIZE.js +17 -0
- package/dist/{chunk-JDQSRKJG.js → chunk-AAZIMKLQ.js} +1 -1
- package/dist/{chunk-RN5AYO53.js → chunk-DAKKPW2Z.js} +1 -1
- package/dist/chunk-DIOTWSCO.js +1 -0
- package/dist/chunk-FW35PCK7.js +1 -0
- package/dist/{chunk-C4TJN6GR.js → chunk-G2VZ4DET.js} +1 -1
- package/dist/{chunk-LWFE6QDN.js → chunk-HG65R6IN.js} +12 -12
- package/dist/chunk-L2WK5JYB.js +2 -0
- package/dist/{chunk-RQO3UDKP.js → chunk-L7PSERQH.js} +8 -8
- package/dist/{chunk-H4TUOPI7.js → chunk-NTG5ODKZ.js} +1 -1
- package/dist/{chunk-T5U2UZO6.js → chunk-O4OWODU2.js} +31 -31
- package/dist/chunk-TDEBPOWV.js +3 -0
- package/dist/{chunk-6DUCOSHW.js → chunk-TYTMUHUK.js} +1 -1
- package/dist/chunk-W3UZNKGS.js +7 -0
- package/dist/{chunk-CLAADE4J.js → chunk-XWTQTANN.js} +5 -5
- package/dist/{chunk-MGEXTIZH.js → chunk-YES5F7OS.js} +1 -1
- package/dist/chunk-ZFEAWEFS.js +4 -0
- package/dist/chunk-ZNLODQD4.js +3 -0
- package/dist/copy/index.d.ts +1 -1
- package/dist/copy/index.js +13 -13
- package/dist/draw/index.js +1 -1
- package/dist/easel/index.d.ts +1 -1
- package/dist/fields/index.d.ts +43 -16
- package/dist/fields/index.js +1 -1
- package/dist/panel/index.js +1 -1
- package/dist/{rowMarks-CO5TpfLY.d.ts → rowMarks-D2cO7UTi.d.ts} +5 -5
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.js +1 -1
- package/dist/screen/components/PageEditGuardNotices.js +1 -1
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenDocumentContext.js +1 -1
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +17 -17
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/content/view-tiers.d.ts +11 -1
- package/dist/screen/lib/content/view-tiers.js +1 -1
- package/dist/screen/lib/document/block-set-host.js +1 -1
- package/dist/screen/lib/document/block-size-fields.js +1 -1
- package/dist/screen/lib/document/box-fields.d.ts +41 -13
- package/dist/screen/lib/document/box-fields.js +1 -1
- package/dist/screen/lib/document/button-fields.js +1 -1
- package/dist/screen/lib/document/device-fields.d.ts +10 -17
- package/dist/screen/lib/document/device-fields.js +1 -1
- package/dist/screen/lib/document/image-fields.js +4 -4
- package/dist/screen/lib/document/panel-no-control-mark.d.ts +2 -2
- package/dist/screen/lib/document/shadow-fields.js +1 -1
- package/dist/screen/lib/document/style-clipboard.js +1 -1
- package/dist/screen/lib/document/style-fields.js +1 -1
- package/dist/screen/lib/document/use-section-ops.js +1 -1
- package/dist/screen/lib/screen-parts.d.ts +0 -10
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/screen/screen.css +0 -6
- package/dist/screen/words.d.ts +1 -3
- package/dist/screen/words.js +1 -1
- package/dist/strings/index.js +2 -2
- package/dist/text-styles/index.d.ts +6 -5
- package/dist/text-styles/index.js +37 -37
- package/dist/text-styles/model.d.ts +24 -14
- package/dist/text-styles/model.js +1 -1
- package/dist/{types-CVHwspYM.d.ts → types-DcyH17ij.d.ts} +2 -0
- package/package.json +1 -1
- package/dist/chunk-5U6DUZE2.js +0 -7
- package/dist/chunk-BLE3U2GS.js +0 -2
- package/dist/chunk-CPIWSFGR.js +0 -2
- package/dist/chunk-E52W3M5I.js +0 -1
- package/dist/chunk-OGG6FMBA.js +0 -17
- package/dist/chunk-TXNCWF67.js +0 -4
- package/dist/chunk-U4TG43PD.js +0 -1
- package/dist/chunk-YHZSBL2N.js +0 -1
- package/dist/chunk-ZEH6QLBH.js +0 -4
package/dist/copy/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
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=A,ariaLabel:c,disabled:i=!1,inputRef:u}){const d=
|
|
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 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:
|
|
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&&
|
|
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(
|
|
20
|
-
return oe("div",{ref:ct,className:"es-copy"+(
|
|
21
|
-
/* @__PURE__ */ae(O,{className:"es-copy-toolbar","aria-label":j??he.formatting,offered:ft,pressed:
|
|
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&<(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(
|
|
24
|
-
/* @__PURE__ */ae("span",{id:Re,className:"es-copy-marks-label",children:he.showMarks??"Show marks"})]}):null]})}var Pe=["none","bullet","number"],ze=
|
|
25
|
-
return ae(
|
|
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(
|
|
28
|
-
/* @__PURE__ */ae("div",{className:"es-tpp-font-select",children:/* @__PURE__ */ae(
|
|
29
|
-
/* @__PURE__ */ae(
|
|
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
|
+
/* @__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(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};
|
package/dist/draw/index.js
CHANGED
|
@@ -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{
|
|
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";
|
package/dist/easel/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export { r as repeatCopyAt } from '../copy-place-CQIemdtU.js';
|
|
|
13
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-
|
|
16
|
+
import { I as InspectorFields } from '../types-DcyH17ij.js';
|
|
17
17
|
import '../words-Cf5VT2Ic.js';
|
|
18
18
|
import '../buckets-BYQBBVgO.js';
|
|
19
19
|
|
package/dist/fields/index.d.ts
CHANGED
|
@@ -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-
|
|
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-
|
|
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"`
|
|
169
|
-
*
|
|
170
|
-
* desktop value under
|
|
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
|
-
*
|
|
282
|
-
*
|
|
283
|
-
* the desktop
|
|
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).
|
|
292
|
-
* view named
|
|
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
|
|
296
|
-
*
|
|
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 };
|
package/dist/fields/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{FieldText,Inspector,InspectorField,LinkPicker,ListField,bucketsOf,fieldShownInView,insertAt,labelOf,moveTo,planFields,removeAt}from"../chunk-
|
|
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";
|
package/dist/panel/index.js
CHANGED
|
@@ -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-
|
|
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
|
|
11
|
-
*
|
|
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
|
|
23
|
-
*
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
2
|
-
return
|
|
3
|
-
return
|
|
4
|
-
/* @__PURE__ */
|
|
5
|
-
return
|
|
6
|
-
/* @__PURE__ */
|
|
7
|
-
/* @__PURE__ */
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
/* @__PURE__ */
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
return
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
/* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */
|
|
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};
|