efficient-easel 25.1.0 → 26.1.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 (69) hide show
  1. package/README.md +3 -4
  2. package/dist/chunk-2T22IY3J.js +2 -0
  3. package/dist/chunk-4FFDGEWA.js +1 -0
  4. package/dist/{chunk-KFV7N2DJ.js → chunk-56ID6FKZ.js} +1 -1
  5. package/dist/chunk-5OKOCRXT.js +11 -0
  6. package/dist/{chunk-ITIVCER6.js → chunk-5QUIXGQU.js} +1 -1
  7. package/dist/{chunk-6WTWYHC2.js → chunk-6BOOYHHK.js} +4 -4
  8. package/dist/{chunk-OXOUGEAT.js → chunk-7GGNFLHT.js} +1 -1
  9. package/dist/{chunk-XTDOSL2M.js → chunk-7PGO4K5M.js} +8 -8
  10. package/dist/chunk-BA5X67LQ.js +1 -0
  11. package/dist/chunk-BYONFJVQ.js +2 -0
  12. package/dist/chunk-CLAADE4J.js +14 -0
  13. package/dist/chunk-IMAN6IP5.js +4 -0
  14. package/dist/{chunk-LUHGBFOD.js → chunk-LSGKADNV.js} +3 -3
  15. package/dist/{chunk-UDWXBS46.js → chunk-O4DQ6O6W.js} +1 -1
  16. package/dist/{chunk-S6YOIRXQ.js → chunk-Q3VAJMXS.js} +1 -1
  17. package/dist/{chunk-KF3LT7J2.js → chunk-QAVA4V2C.js} +1 -1
  18. package/dist/{chunk-U3LTJSBU.js → chunk-R76XMEKT.js} +11 -11
  19. package/dist/{chunk-FEP6XMNX.js → chunk-STQDOTHF.js} +1 -1
  20. package/dist/{chunk-62UGN7VM.js → chunk-TOEJCZUO.js} +1 -1
  21. package/dist/chunk-TTCUC2Q3.js +1 -0
  22. package/dist/{chunk-IW5QXREH.js → chunk-VXAGXHKI.js} +40 -40
  23. package/dist/{chunk-XLC7HWW3.js → chunk-WOA775T4.js} +1 -1
  24. package/dist/fields/index.js +1 -1
  25. package/dist/panel/index.d.ts +63 -2
  26. package/dist/panel/index.js +1 -1
  27. package/dist/panel/panel.css +46 -0
  28. package/dist/pick/index.d.ts +16 -195
  29. package/dist/pick/index.js +1 -1
  30. package/dist/pick/pick.css +6 -196
  31. package/dist/screen/components/AddBlockRow.js +1 -1
  32. package/dist/screen/components/AddSidePanel.js +1 -1
  33. package/dist/screen/components/NodeContextMenu.js +1 -1
  34. package/dist/screen/components/PageEditGuardNotices.js +1 -1
  35. package/dist/screen/components/ScreenChrome.js +1 -1
  36. package/dist/screen/components/ScreenDocumentContext.js +1 -1
  37. package/dist/screen/components/ScreenMount.js +1 -1
  38. package/dist/screen/components/ScreenStoreProvider.js +1 -1
  39. package/dist/screen/components/SectionScreenShell.js +17 -17
  40. package/dist/screen/components/usePartBridge.js +1 -1
  41. package/dist/screen/index.js +1 -1
  42. package/dist/screen/lib/document/block-set-host.js +1 -1
  43. package/dist/screen/lib/document/box-fields.d.ts +44 -6
  44. package/dist/screen/lib/document/box-fields.js +1 -1
  45. package/dist/screen/lib/document/button-fields.d.ts +97 -0
  46. package/dist/screen/lib/document/button-fields.js +1 -0
  47. package/dist/screen/lib/document/device-fields.js +1 -1
  48. package/dist/screen/lib/document/image-fields.d.ts +118 -0
  49. package/dist/screen/lib/document/image-fields.js +5 -0
  50. package/dist/screen/lib/document/style-clipboard.js +1 -1
  51. package/dist/screen/lib/document/style-fields.d.ts +109 -0
  52. package/dist/screen/lib/document/style-fields.js +1 -0
  53. package/dist/screen/lib/document/use-section-ops.js +1 -1
  54. package/dist/screen/lib/screen-parts.js +1 -1
  55. package/dist/screen/words.d.ts +22 -1
  56. package/dist/screen/words.js +1 -1
  57. package/dist/strings/index.d.ts +12 -9
  58. package/dist/strings/index.js +2 -2
  59. package/dist/text-styles/index.d.ts +3 -3
  60. package/dist/text-styles/index.js +37 -37
  61. package/dist/{words-fbR9IwxH.d.ts → words-BrN08Fup.d.ts} +16 -1
  62. package/package.json +19 -1
  63. package/dist/chunk-ERB6FAZT.js +0 -2
  64. package/dist/chunk-H6BER2EU.js +0 -1
  65. package/dist/chunk-KVIEUWTX.js +0 -11
  66. package/dist/chunk-OFBZOI6W.js +0 -1
  67. package/dist/chunk-SC6E3UUS.js +0 -13
  68. package/dist/chunk-U6LJ5UKD.js +0 -6
  69. package/dist/words-DWvCJXwR.d.ts +0 -51
@@ -1,17 +1,17 @@
1
- import{AddBlockRow as e}from"../../chunk-ITIVCER6.js";import{scrollPreviewToSection as n,gotoPreviewSlide as o}from"../../chunk-LUOY3A3Q.js";import{useEaselUndoKeys as r}from"../../chunk-UCZQWQNS.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-UDWXBS46.js";import{useSectionOps as c}from"../../chunk-XLC7HWW3.js";import{useScreenDocument as p}from"../../chunk-ERB6FAZT.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-LUHGBFOD.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 C}from"../../chunk-S6YOIRXQ.js";import"../../chunk-AJ2SUSET.js";import{slotChildRowName as E}from"../../chunk-5NHQ452C.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 x}from"../../chunk-BBD3FLU3.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-U3LTJSBU.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-ZEH6QLBH.js";import{LayersTree as B,Subtree as F,TreeRow as Q,TreeRowAction as P,TreeSeam as T}from"../../chunk-WHS6Y55E.js";import"../../chunk-FM6JO4WF.js";import{DEFAULT_TREE_WORDS as W}from"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-NDRZP6YR.js";import{DEFAULT_SAVE_WORDS as O,saveIndicator as g}from"../../chunk-H6DDIBQ4.js";import{SaveState as I,panelWidthVars as Y}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-HZSZT3BE.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 v}from"../../chunk-MFIRYGHW.js";import"../../chunk-SQTVXE5D.js";import"../../chunk-TQ5Y6S2X.js";import{useTreeDrag as D}from"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import{zoneKey as b,parseZoneKey as z}from"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";import"../../chunk-467WWV4I.js";import"../../chunk-TIAWIOGD.js";import"../../chunk-MGVI67QV.js";import{useState as M,useRef as X,useEffect as w,useCallback as U,Fragment as V}from"react";import{Tooltip as Z}from"efficient-shell/ui";import{TrashIcon as L}from"efficient-shell/icons/efficient";import{jsxs as H,jsx as J,Fragment as K}from"react/jsx-runtime";var G=e=>n=>{n.target.closest("button, input")||e()},$={rowClick:G};function q(){const{saveState:q,readOnly:_,readOnlyReason:ee=null}=p(),ne=c(),{appState:oe,selectedItem:re,config:te}=x(e=>e),[se,ie]=M(l),ce=v("screen",C),pe=v("tree",W),le=v("save",O),{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=X(null),Ce=X(null);r(Ce),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 Ee=U(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}),xe=j(),{labelAtLevel:Be,Icon:Fe}=xe,{canAddTo:Qe}=f(),Pe=e=>Be(e,"block",te.components[e]?.label??e),Te=e=>Be(e,"section",Pe(e)),We=!Se&&S(se)&&re?.props.id===fe,Oe=je?Qe(je.type)?.spec??null:null,ge=je&&Oe?`${je.props.id}:${Oe.slot}`:null,Ie=je&&Oe&&Array.isArray(je.props[Oe.slot])?je.props[Oe.slot]:[],Ye=e=>E(e,Pe,xe.plainText),ve=(e,r)=>{je&&Oe&&ge&&(ie(l),Oe.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)))},De=()=>{if(!je||!Oe||!ge)return;const e=Ie.length;ne.insertComponent(ge,Oe.childType,e),ie(l),Oe.slider?requestAnimationFrame(()=>{o(String(je.props.id),e),ne.select({index:e,zone:ge})}):ne.select({index:e,zone:ge})},be=e=>A(te,e),ze=e=>{const{parentId:n,slot:o}=z(e),r=e=>{if(!e)return null;if(String(e.props.id)===n)return e;for(const n of be(e.type)){const o=Array.isArray(e.props[n])?e.props[n]:[];for(const e of o){const n=r(e);if(n)return n}}return null},t=r(je)?.props[o];return Array.isArray(t)?t.length:0},Me=(e,n,o)=>{const r=Math.min(Math.max(o,0),ze(e)),t=n<r?r-1:r;t!==n&&(ne.reorderComponent(e,n,t),ie(l),ne.select({index:t,zone:e}))},Xe=D({keyOf:e=>e.id,readOnly:Boolean(_),canDrop:(e,n)=>b(n)===e.zone&&n.index>=0&&n.index<=ze(e.zone),onDrop:(e,n)=>Me(e.zone,e.index,n.index),onStep:(e,n)=>Me(e.zone,e.index,n<0?e.index-1:e.index+2)}),we=(e,n)=>/* @__PURE__ */J(T,{..._?{}:Xe.seam({place:{...z(e),index:n}})},`seam:${e}:${n}`),Ue=e=>xe.blockRowName(e,Pe),Ve=(e,o,r)=>{ie(l),ne.select({index:o,zone:e}),n(r)},Ze=(e,n,o)=>{ne.insertComponent(e,n,o),ie(l),ne.select({index:o,zone:e})},Le=(n,o,r)=>/* @__PURE__ */J(e,{choices:r,onPick:e=>Ze(n,e,o)}),He=(e,n)=>{const o=N(te,e);const r=Qe(e.type,void 0,void 0,{id:String(e.props.id??""),data:oe.data}),t=r?.choices??null,s="footer"===r?.source?Ue:Ye;/* @__PURE__ */
2
- return H(K,{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=()=>Ve(o,r,p),{rowProps:d,...u}=Xe.row({item:{id:p,zone:o,index:r},place:{...z(o),index:r}},{onClick:G(m)});/* @__PURE__ */
3
- return H(V,{children:[0===r&&we(o,0),
4
- /* @__PURE__ */J(Q,{words:pe,icon:/* @__PURE__ */J(Fe,{type:e.type,size:13}),name:c,selected:t,onSelect:m,...u,actions:/* @__PURE__ */J(P,{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(L,{size:13})}),rowProps:d}),i&&/* @__PURE__ */J(F,{children:He(e,n+1)}),we(o,r+1)]},String(e.props.id??`${o}-${r}`))}),r&&t?Le(`${e.props.id}:${r.slot}`,o.length,t):null]})},Je="HeroSingle"===je?.type,Ke=Boolean(je)&&(Boolean(Qe(je.type))||be(je.type).length>0),Ge=Boolean(je)&&(Boolean(Oe)||Ne||Se||Je||Ke);/* @__PURE__ */
5
- return H("div",{ref:Ce,className:"sf-editor es-editor",style:Y(s),children:[
6
- /* @__PURE__ */J("div",{className:"sf-section-bar",children:/* @__PURE__ */J(I,null!==ee?{tone:"off",label:ee,role:"status"}:{...g(q,le),role:"status"})}),
7
- /* @__PURE__ */H("div",{className:"sf-body",children:[Ge&&je&&/* @__PURE__ */H("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
8
- /* @__PURE__ */J("div",{className:"sf-panel-head",children:/* @__PURE__ */J(Z,{content:Se?ce.headerSettings:ce.sectionSettings({name:Te(je.type)}),side:"bottom",children:/* @__PURE__ */J("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:Te(je.type)})})}),
9
- /* @__PURE__ */J(B,{className:"sf-tree sf-scroll",rootProps:Xe.rootProps(),words:pe,children:/* @__PURE__ */J(F,{children:Se?
10
- /* @__PURE__ */J(Q,{words:pe,icon:/* @__PURE__ */J(Fe,{type:"header",size:13}),name:ce.headerSettings,selected:se.kind===ae?.kind,onSelect:()=>ie(ae??l),rowProps:{onClick:G(()=>ie(ae??l))}}):Oe?/* @__PURE__ */H(K,{children:[Ie.map((e,n)=>{const o=re?.props.id===e.props.id,r=Ye(e),t=String(e.props.id),s=()=>ve(n,t),{rowProps:i,...c}=Xe.row({item:{id:t,zone:ge,index:n},place:{...z(ge),index:n}},{onClick:G(s)});/* @__PURE__ */
11
- return H(V,{children:[0===n&&we(ge,0),
12
- /* @__PURE__ */J(Q,{words:pe,icon:/* @__PURE__ */J(Fe,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */J(P,{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__ */J(L,{size:13})}),rowProps:i}),we(ge,n+1)]},String(e.props.id??n))}),
13
- /* @__PURE__ */H("button",{type:"button",className:"sf-add-card",onClick:De,children:[
14
- /* @__PURE__ */J("span",{className:"sf-plus sf-plus--sm",children:"+"}),Oe.addLabel]}),fe?Ae.partRows?.(je,$):null]}):He(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"===Qe(r)?.source?ve(n,o):Ve(e,n,o),addChild:(e,n,o,r,t)=>"section"===Qe(t)?.source?De():Ze(`${e}:${n}`,o,r),childRowName:Ye,blockRowName:Ue},children:/* @__PURE__ */J(ke,{mode:se,onOpenWebsiteSettings:Ae.openSettings??(()=>{}),onSelectNode:Re,hideNodeActions:!0})})]}),
17
- /* @__PURE__ */J(y,{})]})}export{q as default};
1
+ import{AddBlockRow as e}from"../../chunk-5QUIXGQU.js";import{scrollPreviewToSection as n,gotoPreviewSlide as o}from"../../chunk-LUOY3A3Q.js";import{useEaselUndoKeys as r}from"../../chunk-UCZQWQNS.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-O4DQ6O6W.js";import{useSectionOps as c}from"../../chunk-WOA775T4.js";import{useScreenDocument as p}from"../../chunk-BYONFJVQ.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-LSGKADNV.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-Q3VAJMXS.js";import"../../chunk-AJ2SUSET.js";import{slotChildRowName as C}from"../../chunk-5NHQ452C.js";import"../../chunk-6UAEFOJ4.js";import"../../chunk-ANPOR6EY.js";import"../../chunk-R4AUZVA3.js";import{slotFieldsOf as E,nestsInTree as Q}from"../../chunk-TCAAOYQY.js";import{useEasel as x}from"../../chunk-BBD3FLU3.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-R76XMEKT.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-ZEH6QLBH.js";import{LayersTree as R,Subtree as O,TreeRow as F,TreeRowAction as P,TreeSeam as B}from"../../chunk-WHS6Y55E.js";import"../../chunk-FM6JO4WF.js";import{DEFAULT_TREE_WORDS as T}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 W,saveIndicator as g}from"../../chunk-H6DDIBQ4.js";import{SaveState as Y,panelWidthVars as v}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-HZSZT3BE.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 D}from"../../chunk-MFIRYGHW.js";import"../../chunk-SQTVXE5D.js";import"../../chunk-TQ5Y6S2X.js";import{useTreeDrag as I}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 V,useEffect as X,useCallback as w,Fragment as K}from"react";import{Tooltip as Z}from"efficient-shell/ui";import{TrashIcon as J}from"efficient-shell/icons/efficient";import{jsxs as U,jsx as L,Fragment as G}from"react/jsx-runtime";var H=e=>n=>{n.target.closest("button, input")||e()},$={rowClick:H};function q(){const{saveState:q,readOnly:_,readOnlyReason:ee=null}=p(),ne=c(),{appState:oe,selectedItem:re,config:te}=x(e=>e),[se,ie]=z(l),ce=D("screen",A),pe=D("tree",T),le=D("save",W),{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=V(null),Ae=V(null);r(Ae),a(re?.props.id),X(()=>{fe&&ye.current!==fe&&(ye.current=fe,Se?ie(ae??l):re||ne.select({index:0}))},[fe,re,ne,Se]);const Ce=w(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:Qe}=i({mode:se,setMode:ie,onOpenPart:n}),xe=j(),{labelAtLevel:Re,Icon:Oe}=xe,{canAddTo:Fe}=f(),Pe=e=>Re(e,"block",te.components[e]?.label??e),Be=e=>Re(e,"section",Pe(e)),Te=!Se&&S(se)&&re?.props.id===fe,We=je?Fe(je.type)?.spec??null:null,ge=je&&We?`${je.props.id}:${We.slot}`:null,Ye=je&&We&&Array.isArray(je.props[We.slot])?je.props[We.slot]:[],ve=e=>C(e,Pe,xe.plainText),De=(e,r)=>{je&&We&&ge&&(ie(l),We.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)))},Ie=()=>{if(!je||!We||!ge)return;const e=Ye.length;ne.insertComponent(ge,We.childType,e),ie(l),We.slider?requestAnimationFrame(()=>{o(String(je.props.id),e),ne.select({index:e,zone:ge})}):ne.select({index:e,zone:ge})},Me=e=>E(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}))},Ve=I({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)}),Xe=(e,n)=>/* @__PURE__ */L(B,{..._?{}:Ve.seam({place:{...b(e),index:n}})},`seam:${e}:${n}`),we=e=>xe.blockRowName(e,Pe),Ke=(e,o,r)=>{ie(l),ne.select({index:o,zone:e}),n(r)},Ze=(e,n,o)=>{ne.insertComponent(e,n,o),ie(l),ne.select({index:o,zone:e})},Je=(n,o,r)=>/* @__PURE__ */L(e,{choices:r,onPick:e=>Ze(n,e,o)}),Ue=(e,n)=>{const o=N(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?we:ve;/* @__PURE__ */
2
+ return U(G,{children:[o.map(({child:e,zone:o,index:r})=>{const t=re?.props.id===e.props.id,i=Q(te,e.type,n),c=s(e),p=String(e.props.id),m=()=>Ke(o,r,p),{rowProps:d,...u}=Ve.row({item:{id:p,zone:o,index:r},place:{...b(o),index:r}},{onClick:H(m)});/* @__PURE__ */
3
+ return U(K,{children:[0===r&&Xe(o,0),
4
+ /* @__PURE__ */L(F,{words:pe,icon:/* @__PURE__ */L(Oe,{type:e.type,size:13}),name:c,selected:t,onSelect:m,...u,actions:/* @__PURE__ */L(P,{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__ */L(J,{size:13})}),rowProps:d}),i&&/* @__PURE__ */L(O,{children:Ue(e,n+1)}),Xe(o,r+1)]},String(e.props.id??`${o}-${r}`))}),r&&t?Je(`${e.props.id}:${r.slot}`,o.length,t):null]})},Le="HeroSingle"===je?.type,Ge=Boolean(je)&&(Boolean(Fe(je.type))||Me(je.type).length>0),He=Boolean(je)&&(Boolean(We)||Ne||Se||Le||Ge);/* @__PURE__ */
5
+ return U("div",{ref:Ae,className:"sf-editor es-editor",style:v(s),children:[
6
+ /* @__PURE__ */L("div",{className:"sf-section-bar",children:/* @__PURE__ */L(Y,null!==ee?{tone:"off",label:ee,role:"status"}:{...g(q,le),role:"status"})}),
7
+ /* @__PURE__ */U("div",{className:"sf-body",children:[He&&je&&/* @__PURE__ */U("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
8
+ /* @__PURE__ */L("div",{className:"sf-panel-head",children:/* @__PURE__ */L(Z,{content:Se?ce.headerSettings:ce.sectionSettings({name:Be(je.type)}),side:"bottom",children:/* @__PURE__ */L("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(Te?"is-selected":""),"aria-pressed":Te,onClick:()=>{Se?ie(ae??l):(ie(l),ne.select({index:0}))},children:Be(je.type)})})}),
9
+ /* @__PURE__ */L(R,{className:"sf-tree sf-scroll",rootProps:Ve.rootProps(),words:pe,children:/* @__PURE__ */L(O,{children:Se?
10
+ /* @__PURE__ */L(F,{words:pe,icon:/* @__PURE__ */L(Oe,{type:"header",size:13}),name:ce.headerSettings,selected:se.kind===ae?.kind,onSelect:()=>ie(ae??l),rowProps:{onClick:H(()=>ie(ae??l))}}):We?/* @__PURE__ */U(G,{children:[Ye.map((e,n)=>{const o=re?.props.id===e.props.id,r=ve(e),t=String(e.props.id),s=()=>De(n,t),{rowProps:i,...c}=Ve.row({item:{id:t,zone:ge,index:n},place:{...b(ge),index:n}},{onClick:H(s)});/* @__PURE__ */
11
+ return U(K,{children:[0===n&&Xe(ge,0),
12
+ /* @__PURE__ */L(F,{words:pe,icon:/* @__PURE__ */L(Oe,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */L(P,{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__ */L(J,{size:13})}),rowProps:i}),Xe(ge,n+1)]},String(e.props.id??n))}),
13
+ /* @__PURE__ */U("button",{type:"button",className:"sf-add-card",onClick:Ie,children:[
14
+ /* @__PURE__ */L("span",{className:"sf-plus sf-plus--sm",children:"+"}),We.addLabel]}),fe?Ee.partRows?.(je,$):null]}):Ue(je,1)})})]}),
15
+ /* @__PURE__ */L("div",{className:"sf-center",children:/* @__PURE__ */L("div",{className:"sf-preview-host",children:/* @__PURE__ */L(he,{})})}),
16
+ /* @__PURE__ */L(t,{value:{selectChild:(e,n,o,r)=>"section"===Fe(r)?.source?De(n,o):Ke(e,n,o),addChild:(e,n,o,r,t)=>"section"===Fe(t)?.source?Ie():Ze(`${e}:${n}`,o,r),childRowName:ve,blockRowName:we},children:/* @__PURE__ */L(ke,{mode:se,onOpenWebsiteSettings:Ee.openSettings??(()=>{}),onSelectNode:Qe,hideNodeActions:!0})})]}),
17
+ /* @__PURE__ */L(y,{})]})}export{q as default};
@@ -1 +1 @@
1
- export{usePartBridge}from"../../chunk-UDWXBS46.js";import"../../chunk-XLC7HWW3.js";import"../../chunk-LUHGBFOD.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-R4AUZVA3.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-BBD3FLU3.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-U3LTJSBU.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-FM6JO4WF.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-HZSZT3BE.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";import"../../chunk-467WWV4I.js";import"../../chunk-TIAWIOGD.js";import"../../chunk-MGVI67QV.js";
1
+ export{usePartBridge}from"../../chunk-O4DQ6O6W.js";import"../../chunk-WOA775T4.js";import"../../chunk-LSGKADNV.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-R4AUZVA3.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-BBD3FLU3.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-R76XMEKT.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-FM6JO4WF.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-HZSZT3BE.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";import"../../chunk-467WWV4I.js";import"../../chunk-TIAWIOGD.js";import"../../chunk-MGVI67QV.js";
@@ -1 +1 @@
1
- import"../chunk-GZO72N3Q.js";export{DocumentScreen,ScreenMount}from"../chunk-6WTWYHC2.js";import"../chunk-GXQCZJOP.js";export{ScreenStoreProvider}from"../chunk-KF3LT7J2.js";import"../chunk-IW5QXREH.js";import"../chunk-UMBNBCL4.js";import"../chunk-OXZDSOZV.js";import"../chunk-7OCEPOEJ.js";import"../chunk-H6BER2EU.js";import"../chunk-3QB2ZQXK.js";import"../chunk-5XL2RXFU.js";import"../chunk-OXOUGEAT.js";import"../chunk-22I55W37.js";import"../chunk-LUOY3A3Q.js";import"../chunk-UCZQWQNS.js";import"../chunk-KCBEE2MC.js";import"../chunk-6EDVZBUO.js";import"../chunk-UDWXBS46.js";import"../chunk-XLC7HWW3.js";import"../chunk-62UGN7VM.js";import"../chunk-PVBDKBJB.js";import"../chunk-RKTF5XLP.js";import"../chunk-ERB6FAZT.js";import"../chunk-QZJKWKGH.js";import"../chunk-ERR437B5.js";import"../chunk-JIP5JNRB.js";import"../chunk-GR3XRILS.js";export{NO_DOCUMENT_ADDRESSING}from"../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-XTDOSL2M.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";export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSelectionMode,isSlotMode,sameInspectorMode,screenSlotsOf,shownChildSlotsOf,shownSlotFieldsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../chunk-LUHGBFOD.js";import"../chunk-T2RINM7R.js";import"../chunk-NCXYC7WI.js";import"../chunk-FEP6XMNX.js";export{EaselSessionProvider,useEaselSession}from"../chunk-YM4UEGBV.js";export{EFFICIENT_BACKEND,activateEaselSession,backendOf,createEaselSession,currentEaselSession,deactivateEaselSession,efficientClientOpen,isEfficientBackend,provideDefaultBackend,resetAmbientEaselSession,sessionRegistry,setSessionBridgedSite,setSessionDocumentSite}from"../chunk-SNF5764Q.js";export{DETACHED_EASEL_HOST,EaselHostContext,EaselHostProvider,FIELD_DESCRIPTION_MARKER,createEaselHost,describedAs,useEaselHost,useHostEscape}from"../chunk-LX23TCTP.js";import"../chunk-XFYFKITX.js";import"../chunk-S6YOIRXQ.js";import"../chunk-CWELHADJ.js";import"../chunk-6WY6ZXJG.js";import"../chunk-AJ2SUSET.js";import"../chunk-5NHQ452C.js";import"../chunk-6UAEFOJ4.js";import"../chunk-ANPOR6EY.js";import"../chunk-R4AUZVA3.js";import"../chunk-TCAAOYQY.js";import"../chunk-BBD3FLU3.js";import"../chunk-JQQFB7EZ.js";import"../chunk-TBY3DFKS.js";import"../chunk-U3LTJSBU.js";import"../chunk-BPXEFVSQ.js";import"../chunk-YCSZAP7T.js";import"../chunk-ZEH6QLBH.js";import"../chunk-WHS6Y55E.js";import"../chunk-FM6JO4WF.js";import"../chunk-K56YDHYQ.js";import"../chunk-KFV7N2DJ.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-HZSZT3BE.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
+ import"../chunk-GZO72N3Q.js";export{DocumentScreen,ScreenMount}from"../chunk-6BOOYHHK.js";import"../chunk-GXQCZJOP.js";export{ScreenStoreProvider}from"../chunk-QAVA4V2C.js";import"../chunk-VXAGXHKI.js";import"../chunk-BA5X67LQ.js";import"../chunk-UMBNBCL4.js";import"../chunk-OXZDSOZV.js";import"../chunk-7OCEPOEJ.js";import"../chunk-3QB2ZQXK.js";import"../chunk-5XL2RXFU.js";import"../chunk-7GGNFLHT.js";import"../chunk-22I55W37.js";import"../chunk-LUOY3A3Q.js";import"../chunk-UCZQWQNS.js";import"../chunk-KCBEE2MC.js";import"../chunk-6EDVZBUO.js";import"../chunk-O4DQ6O6W.js";import"../chunk-WOA775T4.js";import"../chunk-TOEJCZUO.js";import"../chunk-PVBDKBJB.js";import"../chunk-RKTF5XLP.js";import"../chunk-BYONFJVQ.js";import"../chunk-QZJKWKGH.js";import"../chunk-ERR437B5.js";import"../chunk-JIP5JNRB.js";import"../chunk-GR3XRILS.js";export{NO_DOCUMENT_ADDRESSING}from"../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-7PGO4K5M.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";export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSelectionMode,isSlotMode,sameInspectorMode,screenSlotsOf,shownChildSlotsOf,shownSlotFieldsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../chunk-LSGKADNV.js";import"../chunk-T2RINM7R.js";import"../chunk-NCXYC7WI.js";import"../chunk-STQDOTHF.js";export{EaselSessionProvider,useEaselSession}from"../chunk-YM4UEGBV.js";export{EFFICIENT_BACKEND,activateEaselSession,backendOf,createEaselSession,currentEaselSession,deactivateEaselSession,efficientClientOpen,isEfficientBackend,provideDefaultBackend,resetAmbientEaselSession,sessionRegistry,setSessionBridgedSite,setSessionDocumentSite}from"../chunk-SNF5764Q.js";export{DETACHED_EASEL_HOST,EaselHostContext,EaselHostProvider,FIELD_DESCRIPTION_MARKER,createEaselHost,describedAs,useEaselHost,useHostEscape}from"../chunk-LX23TCTP.js";import"../chunk-XFYFKITX.js";import"../chunk-Q3VAJMXS.js";import"../chunk-CWELHADJ.js";import"../chunk-6WY6ZXJG.js";import"../chunk-AJ2SUSET.js";import"../chunk-5NHQ452C.js";import"../chunk-6UAEFOJ4.js";import"../chunk-ANPOR6EY.js";import"../chunk-R4AUZVA3.js";import"../chunk-TCAAOYQY.js";import"../chunk-BBD3FLU3.js";import"../chunk-JQQFB7EZ.js";import"../chunk-TBY3DFKS.js";import"../chunk-R76XMEKT.js";import"../chunk-BPXEFVSQ.js";import"../chunk-YCSZAP7T.js";import"../chunk-ZEH6QLBH.js";import"../chunk-WHS6Y55E.js";import"../chunk-FM6JO4WF.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-HZSZT3BE.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 +1 @@
1
- import{boxFieldSet as o}from"../../../chunk-KVIEUWTX.js";import"../../../chunk-SC6E3UUS.js";import"../../../chunk-OXOUGEAT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-S6YOIRXQ.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import{phoneKey as e}from"../../../chunk-E52W3M5I.js";import{foldMetaOf as t}from"../../../chunk-ANPOR6EY.js";import"../../../chunk-BBD3FLU3.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-FM6JO4WF.js";import"../../../chunk-KFV7N2DJ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.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";import"../../../chunk-BSPCSC45.js";function n(o){return Object.keys(o).filter(e=>{return n=o[e],!(null!==t(n));var n})}function s(o,e){const n=e.off??{},s=e.keys??{};for(const[o,e]of Object.entries(n))if(!e.trim())throw new Error(`blockSetFor: off row "${o}" needs a reason.`);for(const e of[...Object.keys(n),...Object.keys(s)]){if(!Object.hasOwn(o,e))throw new Error(`blockSetFor: the set has no row "${e}".`);if(Object.hasOwn(n,e)&&Object.hasOwn(s,e))throw new Error(`blockSetFor: row "${e}" is both off and renamed.`)}const r={};let i=[];for(const[e,c]of Object.entries(o)){const a=t(c);if(a){i=i.filter(([,o])=>t(o).level<a.level),i.push([e,c]);continue}if(Object.hasOwn(n,e))continue;for(const[o,e]of i)r[o]=e;i=[];const h=Object.hasOwn(s,e)?s[e]:e;if(Object.hasOwn(r,h)||h!==e&&Object.hasOwn(o,h))throw new Error(`blockSetFor: renamed key "${h}" is already a row.`);r[h]=c}return r}function r(o){const e=o.build();s(e,o.email),s(e,o.website);const t=n(e),r=o=>new Set(Object.keys(o.off??{})),i=r(o.email),c=r(o.website),a=[];for(const e of t)i.has(e)&&!c.has(e)&&a.push({row:e,only:"website",reason:o.email.off[e]}),c.has(e)&&!i.has(e)&&a.push({row:e,only:"email",reason:o.website.off[e]});return a}var i=["button","image","box","divider","logo","text","section","social"],c={box:{build:()=>o(),email:{editor:"email",keys:{gap:"itemGap"},off:Object.fromEntries(["sectionPaddingTop","sectionPaddingRight","sectionPaddingBottom","sectionPaddingLeft"].map(o=>[e(o),"email: a Banner Box draws in the desktop view only (admin inBannerFields)"]))},website:{editor:"website"}}},a={button:"no easel set yet (plan group 1)",image:"no easel set yet (plan group 2)",box:"the set is in easel and the email Banner Box imports it; the website Flex builds its own rows (plan group 3)",divider:"no easel set yet (plan group 4)",logo:"no easel set yet (plan group 5)",text:"no easel set yet (plan group 6)",section:"no easel set yet (plan group 7)",social:"no easel set yet (plan group 7)"};export{i as BLOCK_KINDS,a as BLOCK_SETS_STILL_TWO_COPIES,c as BLOCK_SET_PAIRS,r as blockSetDifferences,s as blockSetFor,n as blockSetRowKeys};
1
+ import{buttonFieldSet as e}from"../../../chunk-TTCUC2Q3.js";import"../../../chunk-IMAN6IP5.js";import{boxFieldSet as o}from"../../../chunk-5OKOCRXT.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import{phoneKey as t}from"../../../chunk-E52W3M5I.js";import{foldMetaOf as n}from"../../../chunk-ANPOR6EY.js";import"../../../chunk-BBD3FLU3.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-FM6JO4WF.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.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";import"../../../chunk-BSPCSC45.js";function s(e){return Object.keys(e).filter(o=>{return t=e[o],!(null!==n(t));var t})}function r(e,o){const t=o.off??{},s=o.keys??{};for(const[e,o]of Object.entries(t))if(!o.trim())throw new Error(`blockSetFor: off row "${e}" needs a reason.`);for(const o of[...Object.keys(t),...Object.keys(s)]){if(!Object.hasOwn(e,o))throw new Error(`blockSetFor: the set has no row "${o}".`);if(Object.hasOwn(t,o)&&Object.hasOwn(s,o))throw new Error(`blockSetFor: row "${o}" is both off and renamed.`)}const r={};let i=[];for(const[o,c]of Object.entries(e)){const a=n(c);if(a){i=i.filter(([,e])=>n(e).level<a.level),i.push([o,c]);continue}if(Object.hasOwn(t,o))continue;for(const[e,o]of i)r[e]=o;i=[];const u=Object.hasOwn(s,o)?s[o]:o;if(Object.hasOwn(r,u)||u!==o&&Object.hasOwn(e,u))throw new Error(`blockSetFor: renamed key "${u}" is already a row.`);r[u]=c}return r}function i(e){const o=e.build();r(o,e.email),r(o,e.website);const t=s(o),n=e=>new Set(Object.keys(e.off??{})),i=n(e.email),c=n(e.website),a=[];for(const o of t)i.has(o)&&!c.has(o)&&a.push({row:o,only:"website",reason:e.email.off[o]}),c.has(o)&&!i.has(o)&&a.push({row:o,only:"email",reason:e.website.off[o]});return a}var c=["button","image","box","divider","logo","text","section","social"],a={useFill:()=>"",useText:()=>"",useBorder:()=>({width:0,color:""}),useCorners:()=>0},u={button:{build:()=>e({follows:a,padding:{fallback:{}}}),email:{editor:"email"},website:{editor:"website"}},box:{build:()=>o(),email:{editor:"email",keys:{gap:"itemGap"},off:Object.fromEntries(["sectionPaddingTop","sectionPaddingRight","sectionPaddingBottom","sectionPaddingLeft"].map(e=>[t(e),"email: a Banner Box draws in the desktop view only (admin inBannerFields)"]))},website:{editor:"website"}}},h={button:"the set is in easel; admin (A-B) and web-builder (W-B) still build their own rows (plan group 1)",image:"no easel set yet (plan group 2)",box:"the set is in easel and the email Banner Box imports it; the website Flex builds its own rows (plan group 3)",divider:"no easel set yet (plan group 4)",logo:"no easel set yet (plan group 5)",text:"no easel set yet (plan group 6)",section:"no easel set yet (plan group 7)",social:"no easel set yet (plan group 7)"};export{c as BLOCK_KINDS,h as BLOCK_SETS_STILL_TWO_COPIES,u as BLOCK_SET_PAIRS,i as blockSetDifferences,r as blockSetFor,s as blockSetRowKeys};
@@ -197,6 +197,48 @@ declare function sidesFromObject(stored: unknown): SidesValue;
197
197
  * number (0 is a number), and `undefined` — nothing stored, the padding
198
198
  * follows — when none does. */
199
199
  declare function sidesToObject(sides: SidesValue): Partial<Record<PadSide, number>> | undefined;
200
+ /**
201
+ * Where a host keeps a row's value. The two editors store the same setting in
202
+ * different shapes: the website beside the other props (`buttonColor`), the
203
+ * email designer inside one object (`button.background`, {@link objectAccess}).
204
+ * The row is the same; only this differs, and no stored key moves (plan
205
+ * [PLAN] Fill Editor Gaps Both Ways: 0 data moves).
206
+ */
207
+ interface ValueAccess {
208
+ /** The value stored for `key` on a node. */
209
+ read: (values: Record<string, unknown>, key: string) => unknown;
210
+ /** The props one write of the value makes (`undefined`: a clear). */
211
+ write: (values: Record<string, unknown>, key: string, next: unknown) => Record<string, unknown>;
212
+ }
213
+ /**
214
+ * Values kept in ONE object prop (`button: { background, color }`). `names`
215
+ * maps a row's key to its name inside the object; a key it does not name
216
+ * keeps its own. A write keeps the object's other keys; a clear removes only
217
+ * its own, and an object left empty is removed too.
218
+ */
219
+ declare function objectAccess(objectKey: string, names?: Readonly<Record<string, string>>): ValueAccess;
220
+ /**
221
+ * The value `key` holds through `access` on the selected node, and the write
222
+ * that changes it there. `own` is the row's own field (`value` / `onChange`):
223
+ * given, the row reads and writes its own field, as any row does. Without an
224
+ * editor above (a guard, a harness) a value kept elsewhere reads as absent and
225
+ * a write does nothing: the field key itself stores nothing.
226
+ */
227
+ declare function useAccessValue(access: ValueAccess, key: string, own?: {
228
+ value: unknown;
229
+ onChange: (next: unknown) => void;
230
+ }): [unknown, (next: unknown) => void];
231
+ /**
232
+ * ONE write of several values through `access` on the selected node: one
233
+ * merged patch, one `onChangeMany`. A click that changes two values (a Reset
234
+ * that clears a colour and its opacity) must use this, never two writes: a
235
+ * write awaits the node's resolver before it lands, so a second write built
236
+ * on the node from before the first puts back what the first changed.
237
+ * Without an editor above it writes nothing.
238
+ */
239
+ declare function useAccessPatch(access: ValueAccess): (changes: readonly (readonly [string, unknown])[]) => void;
240
+ /** Values kept beside the other props, under their own key (the website). */
241
+ declare const FLAT_ACCESS: ValueAccess;
200
242
  /**
201
243
  * Where a host keeps a row's PHONE value (twins plan E2). The website keeps
202
244
  * it beside the desktop key (`gapPhone`, {@link PHONE_KEY_ACCESS}); the email
@@ -204,16 +246,12 @@ declare function sidesToObject(sides: SidesValue): Partial<Record<PadSide, numbe
204
246
  * {@link phoneObjectAccess}). The row is the same; only this differs, and no
205
247
  * stored key moves.
206
248
  */
207
- interface PhoneValueAccess {
249
+ interface PhoneValueAccess extends ValueAccess {
208
250
  /** The key the phone row is declared under in the host's fields. */
209
251
  fieldKey: (key: string) => string;
210
252
  /** The phone value is stored under `fieldKey` itself, so the row reads and
211
253
  * writes through its own field (`value` / `onChange`), as any row does. */
212
254
  ownField?: boolean;
213
- /** The phone value stored for `key` on a node. */
214
- read: (values: Record<string, unknown>, key: string) => unknown;
215
- /** The props one write of the phone value makes (`undefined`: a clear). */
216
- write: (values: Record<string, unknown>, key: string, next: unknown) => Record<string, unknown>;
217
255
  }
218
256
  /** The website's phone values: `phoneKey(key)`, beside the desktop key. */
219
257
  declare const PHONE_KEY_ACCESS: PhoneValueAccess;
@@ -541,4 +579,4 @@ declare const boxFieldSet: (opts?: BoxFieldSetOptions) => {
541
579
  _gNudge: BoxField<undefined>;
542
580
  };
543
581
 
544
- export { ANCHOR_LABELS, type AlignmentOptions, AlignmentStrip, BOX_ALIGN_POINTS, BOX_DIRECTIONS, BOX_DIRECTION_LABEL, BOX_GAP, BOX_JUSTIFY_POINTS, BOX_NUDGE_LIMIT, BOX_PLACEMENTS, BOX_PLACEMENT_DEFAULT, BOX_WIDTH, BOX_WRAP_LABEL, BOX_WRAP_POINTS, type BlockAlignmentOptions, BlockAlignmentStrip, type BoxAlign, type BoxField, type BoxFieldRenderProps, type BoxFieldSay, type BoxFieldSetOptions, type BoxFlexRowOptions, type BoxJustify, type BoxPlacement, type BoxWrap, type DirectionFieldOptions, type GapFieldOptions, OPEN_PLACEMENT_POINTS, PHONE_KEY_ACCESS, type PhoneValueAccess, type PlacementFieldOptions, PlacementGridView, type PlacementPoint, type PositionOptions, SIDE_PAD_KEYS, Segmented, type SelectField, type SelectOption, type SidesPaddingOptions, type SliderAction, type SliderClear, type SliderOptions, alignmentField, alignmentFields, blockAlignmentField, blockAlignmentFields, boxAlignField, boxFieldBuilders, boxFieldSet, boxJustifyField, boxWrapField, directionField, gapField, group, iconOf, isNoGlyph, noGlyph, normaliseBoxPlacement, phoneObjectAccess, phoneTwinFields, placementField, positionFields, positionPatch, section, segmented, select, sharedStyleKinds, sidesFromObject, sidesPaddingFields, sidesPaddingPatch, sidesToObject, slider };
582
+ export { ANCHOR_LABELS, type AlignmentOptions, AlignmentStrip, BOX_ALIGN_POINTS, BOX_DIRECTIONS, BOX_DIRECTION_LABEL, BOX_GAP, BOX_JUSTIFY_POINTS, BOX_NUDGE_LIMIT, BOX_PLACEMENTS, BOX_PLACEMENT_DEFAULT, BOX_WIDTH, BOX_WRAP_LABEL, BOX_WRAP_POINTS, type BlockAlignmentOptions, BlockAlignmentStrip, type BoxAlign, type BoxField, type BoxFieldRenderProps, type BoxFieldSay, type BoxFieldSetOptions, type BoxFlexRowOptions, type BoxJustify, type BoxPlacement, type BoxWrap, type DirectionFieldOptions, FLAT_ACCESS, type GapFieldOptions, OPEN_PLACEMENT_POINTS, PHONE_KEY_ACCESS, type PhoneValueAccess, type PlacementFieldOptions, PlacementGridView, type PlacementPoint, type PositionOptions, SIDE_PAD_KEYS, Segmented, type SelectField, type SelectOption, type SidesPaddingOptions, type SliderAction, type SliderClear, type SliderOptions, type ValueAccess, alignmentField, alignmentFields, blockAlignmentField, blockAlignmentFields, boxAlignField, boxFieldBuilders, boxFieldSet, boxJustifyField, boxWrapField, directionField, gapField, group, iconOf, isNoGlyph, noGlyph, normaliseBoxPlacement, objectAccess, phoneObjectAccess, phoneTwinFields, placementField, positionFields, positionPatch, section, segmented, select, sharedStyleKinds, sidesFromObject, sidesPaddingFields, sidesPaddingPatch, sidesToObject, slider, useAccessPatch, useAccessValue };
@@ -1 +1 @@
1
- export{ANCHOR_LABELS,AlignmentStrip,BOX_ALIGN_POINTS,BOX_DIRECTIONS,BOX_DIRECTION_LABEL,BOX_GAP,BOX_JUSTIFY_POINTS,BOX_NUDGE_LIMIT,BOX_PLACEMENTS,BOX_PLACEMENT_DEFAULT,BOX_WIDTH,BOX_WRAP_LABEL,BOX_WRAP_POINTS,BlockAlignmentStrip,OPEN_PLACEMENT_POINTS,PHONE_KEY_ACCESS,PlacementGridView,SIDE_PAD_KEYS,Segmented,alignmentField,alignmentFields,blockAlignmentField,blockAlignmentFields,boxAlignField,boxFieldBuilders,boxFieldSet,boxJustifyField,boxWrapField,directionField,gapField,group,iconOf,isNoGlyph,noGlyph,normaliseBoxPlacement,phoneObjectAccess,phoneTwinFields,placementField,positionFields,positionPatch,section,segmented,select,sharedStyleKinds,sidesFromObject,sidesPaddingFields,sidesPaddingPatch,sidesToObject,slider}from"../../../chunk-KVIEUWTX.js";import"../../../chunk-SC6E3UUS.js";import"../../../chunk-OXOUGEAT.js";import"../../../chunk-22I55W37.js";export{FIELD_DESCRIPTION_MARKER,describedAs}from"../../../chunk-LX23TCTP.js";import"../../../chunk-S6YOIRXQ.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-BBD3FLU3.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-FM6JO4WF.js";import"../../../chunk-KFV7N2DJ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.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";import"../../../chunk-BSPCSC45.js";
1
+ export{ANCHOR_LABELS,AlignmentStrip,BOX_ALIGN_POINTS,BOX_DIRECTIONS,BOX_DIRECTION_LABEL,BOX_GAP,BOX_JUSTIFY_POINTS,BOX_NUDGE_LIMIT,BOX_PLACEMENTS,BOX_PLACEMENT_DEFAULT,BOX_WIDTH,BOX_WRAP_LABEL,BOX_WRAP_POINTS,BlockAlignmentStrip,FLAT_ACCESS,OPEN_PLACEMENT_POINTS,PHONE_KEY_ACCESS,PlacementGridView,SIDE_PAD_KEYS,Segmented,alignmentField,alignmentFields,blockAlignmentField,blockAlignmentFields,boxAlignField,boxFieldBuilders,boxFieldSet,boxJustifyField,boxWrapField,directionField,gapField,group,iconOf,isNoGlyph,noGlyph,normaliseBoxPlacement,objectAccess,phoneObjectAccess,phoneTwinFields,placementField,positionFields,positionPatch,section,segmented,select,sharedStyleKinds,sidesFromObject,sidesPaddingFields,sidesPaddingPatch,sidesToObject,slider,useAccessPatch,useAccessValue}from"../../../chunk-5OKOCRXT.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";export{FIELD_DESCRIPTION_MARKER,describedAs}from"../../../chunk-LX23TCTP.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-BBD3FLU3.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-FM6JO4WF.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.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";import"../../../chunk-BSPCSC45.js";
@@ -0,0 +1,97 @@
1
+ import { ValueAccess, SidesPaddingOptions, PhoneValueAccess, BoxFieldSay, BoxField } from './box-fields.js';
2
+ import { ColorPreset } from 'efficient-shell/ui';
3
+ import 'react';
4
+ import 'efficient-shell/format';
5
+ import '../../../ScreenDocumentContext-DPW_6gOC.js';
6
+ import '../../../blocks/index.js';
7
+ import '../../../types-BljCVdzR.js';
8
+ import '../../../data/index.js';
9
+ import '../../../types-Dq180WRV.js';
10
+ import '../../../resolve-Bz4mszpL.js';
11
+ import '../../../plan-D0DgSLnY.js';
12
+ import '../document-contract.js';
13
+ import '../document-switch.js';
14
+ import '../../../engine-CvXpFE86.js';
15
+ import '../../../edit-lock/index.js';
16
+ import '../admin-bridge.js';
17
+ import '../session.js';
18
+ import '../backend-error.js';
19
+ import '../host-chrome.js';
20
+ import '../links/link-filters.js';
21
+ import '../document-hooks.js';
22
+ import '../section-template-types.js';
23
+ import './content-tree.js';
24
+ import '../shared-section-types.js';
25
+
26
+ /** The keys the Button's style rows store, as the website stores them. */
27
+ declare const BUTTON_STYLE_KEYS: {
28
+ readonly fill: "buttonColor";
29
+ readonly fillOpacity: "buttonFillOpacity";
30
+ readonly border: "buttonBorder";
31
+ readonly text: "buttonTextColor";
32
+ readonly corners: "buttonCorners";
33
+ readonly cornerSides: "buttonCornerSides";
34
+ };
35
+ /** The Button's own padding keys, as the website stores them. */
36
+ declare const BUTTON_PAD_KEYS: {
37
+ readonly top: "buttonPaddingTop";
38
+ readonly right: "buttonPaddingRight";
39
+ readonly bottom: "buttonPaddingBottom";
40
+ readonly left: "buttonPaddingLeft";
41
+ };
42
+ /** What a host tells {@link buttonFieldSet}. Values only: every host gets
43
+ * every row. */
44
+ interface ButtonFieldSetOptions {
45
+ /** What each empty style row follows, as hooks: the site's button colours
46
+ * on the website, the campaign's accent and button styles in an email. */
47
+ follows: {
48
+ useFill: () => string;
49
+ useText: () => string;
50
+ useBorder: () => {
51
+ width: number;
52
+ color: string;
53
+ };
54
+ useCorners: () => number;
55
+ /** What an unset Fill opacity draws. 100 when left out. */
56
+ useFillOpacity?: () => number;
57
+ };
58
+ /** The colours each colour window offers first. */
59
+ usePresets?: () => readonly ColorPreset[];
60
+ /** What a colour row's Reset says it goes back to (`#2E2E2E from Styles`). */
61
+ resetTo?: (hex: string) => string;
62
+ /** Where the style values are kept. Left out: each under its own key. */
63
+ style?: ValueAccess;
64
+ /** The Padding row. `fallback` is the HOST's: what an empty side draws
65
+ * (the website's Btn classes, the campaign's Button padding). The set keeps
66
+ * no number of its own. `object` is the email designer's storage. */
67
+ padding: SidesPaddingOptions & {
68
+ fallback: NonNullable<SidesPaddingOptions['fallback']>;
69
+ };
70
+ /** Where the alignment's phone value is kept (default `alignPhone`). */
71
+ phone?: PhoneValueAccess;
72
+ /** The host's words. */
73
+ say?: BoxFieldSay;
74
+ }
75
+ /**
76
+ * The Button's rows, in the order the panel shows them. The order is
77
+ * load-bearing: the inspector is a FLAT SIBLING LIST, so a heading precedes
78
+ * its rows and never wraps them.
79
+ */
80
+ declare function buttonFieldSet(opts: ButtonFieldSetOptions): {
81
+ align: BoxField<string>;
82
+ _dDesign: BoxField<undefined>;
83
+ buttonColor: BoxField<unknown>;
84
+ buttonFillOpacity: BoxField<unknown> & {
85
+ reachedBy: string;
86
+ };
87
+ buttonBorder: BoxField<unknown>;
88
+ buttonTextColor: BoxField<unknown>;
89
+ buttonCorners: BoxField<unknown>;
90
+ buttonCornerSides: BoxField<unknown> & {
91
+ reachedBy: string;
92
+ };
93
+ _dLayout: BoxField<undefined>;
94
+ _dSize: BoxField<undefined>;
95
+ };
96
+
97
+ export { BUTTON_PAD_KEYS, BUTTON_STYLE_KEYS, type ButtonFieldSetOptions, buttonFieldSet };
@@ -0,0 +1 @@
1
+ export{BUTTON_PAD_KEYS,BUTTON_STYLE_KEYS,buttonFieldSet}from"../../../chunk-TTCUC2Q3.js";import"../../../chunk-IMAN6IP5.js";import"../../../chunk-5OKOCRXT.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-BBD3FLU3.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-FM6JO4WF.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.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";import"../../../chunk-BSPCSC45.js";
@@ -1 +1 @@
1
- export{DEVICE_HIDDEN_ATTR,DEVICE_NOTE,deviceField,deviceNote,shownTier,withoutDeviceGate}from"../../../chunk-OXOUGEAT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-S6YOIRXQ.js";export{DEVICE_FIELD_MARKER,deviceMetaOf}from"../../../chunk-YCSZAP7T.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-BSPCSC45.js";
1
+ export{DEVICE_HIDDEN_ATTR,DEVICE_NOTE,deviceField,deviceNote,shownTier,withoutDeviceGate}from"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-Q3VAJMXS.js";export{DEVICE_FIELD_MARKER,deviceMetaOf}from"../../../chunk-YCSZAP7T.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-BSPCSC45.js";
@@ -0,0 +1,118 @@
1
+ import { ReactNode, ReactElement } from 'react';
2
+ import { BoxField } from './box-fields.js';
3
+ import { MEDIA_FIELD_MARKER } from './field-markers.js';
4
+ import 'efficient-shell/format';
5
+ import 'efficient-shell/ui';
6
+ import '../../../ScreenDocumentContext-DPW_6gOC.js';
7
+ import '../../../blocks/index.js';
8
+ import '../../../types-BljCVdzR.js';
9
+ import '../../../data/index.js';
10
+ import '../../../types-Dq180WRV.js';
11
+ import '../../../resolve-Bz4mszpL.js';
12
+ import '../../../plan-D0DgSLnY.js';
13
+ import '../document-contract.js';
14
+ import '../document-switch.js';
15
+ import '../../../engine-CvXpFE86.js';
16
+ import '../../../edit-lock/index.js';
17
+ import '../admin-bridge.js';
18
+ import '../session.js';
19
+ import '../backend-error.js';
20
+ import '../host-chrome.js';
21
+ import '../links/link-filters.js';
22
+ import '../document-hooks.js';
23
+ import '../section-template-types.js';
24
+ import './content-tree.js';
25
+ import '../shared-section-types.js';
26
+ import './text-control-kinds.js';
27
+
28
+ /**
29
+ * THE ONE IMAGE ROW of both editors (twins plan E3, 2026-10-30: the final is
30
+ * easel's row, the look unchanged).
31
+ *
32
+ * Both editors drew efficient-shell's `MediaUploadField` in a row of their
33
+ * own: the website's `MediaUploadField` component (web-builder), the email
34
+ * designer's `emailImageField` (admin portal). Both already asked the library
35
+ * through easel's {@link requestMediaPick}, so the row is easel's: the shell's
36
+ * box, the host's library, and the options only one editor needed until now.
37
+ *
38
+ * - `pickOptions`: the field's own terms for the host's panel (the email
39
+ * Banner's `{ bakeableOnly: true }`).
40
+ * - `paste`: the email's "or paste an image URL" box, for a tenant with no
41
+ * library and for an already-hosted URL. The host's `tidy` runs when the
42
+ * author leaves the box, never per keystroke.
43
+ * - `focusKey`: the website's focus point ON the picture. The dot writes the
44
+ * key of the view it is dragged in — the desktop key, or in the phone view
45
+ * its phone twin (`phoneKey`), which ↺ clears back to the desktop point.
46
+ * - `frameKey`: a picked video's own still. The video and its still go in ONE
47
+ * change: two writes race, and the second is built on the node from before
48
+ * the first, which is then lost.
49
+ * - The template note: a document that cannot hold media
50
+ * (`capabilities.mediaEditing` false, a website template) draws a note in
51
+ * place of the box, so no media can be chosen against a template.
52
+ *
53
+ * What is stored does not change: a URL string. The value read may also be a
54
+ * picture that names its file (`{ src, assetId }`): the box shows its `src`.
55
+ */
56
+
57
+ /** A stored picture: a URL, or a picture that names its file. */
58
+ type ImageValue = string | {
59
+ src?: string | null;
60
+ } | null | undefined;
61
+ /** The URL a stored picture shows. */
62
+ declare function imageValueSrc(value: unknown): string;
63
+ type ImageRowOptions = {
64
+ /** Default image. A video row draws the play glyph and asks for `video/*`. */
65
+ kind?: 'image' | 'video';
66
+ /** The box's own `accept`, where a row takes fewer formats than its kind
67
+ * (a baked picture takes no SVG). */
68
+ accept?: string;
69
+ /** The small kind hint under the box's call to action ("JPG · PNG · WEBP"). */
70
+ acceptHint?: ReactNode;
71
+ /** The field's own terms for the host's panel, handed on untouched. */
72
+ pickOptions?: Record<string, unknown>;
73
+ /** The host's upload cap: a bigger dropped file is refused at the box. */
74
+ maxSizeBytes?: number;
75
+ /** The filled box's height. Default the shell's. */
76
+ height?: number;
77
+ placeholder?: ReactNode;
78
+ /** The bin's name ("Remove hero image"). */
79
+ removeLabel?: string;
80
+ /** The "or paste an image URL" box. `open`: drawn at once (no library). */
81
+ paste?: {
82
+ tidy?: (typed: string) => string;
83
+ open?: boolean;
84
+ };
85
+ /** The sibling key that holds this picture's focus point (images only). */
86
+ focusKey?: string;
87
+ /** Whether a point can move anything now, read off the node's values. */
88
+ focusWhen?: (values: Record<string, unknown>) => boolean;
89
+ /** The sibling key that keeps a picked video's still (`posterUrl`). */
90
+ frameKey?: string;
91
+ /** Drawn under the box: a host's own notes (a picture a bake cannot use). */
92
+ note?: (src: string) => ReactNode;
93
+ /** False when the host has no library to choose in: no Change, and an empty
94
+ * box is off. Default true. What only the host knows while it draws (the
95
+ * email's "this tenant has a site") is passed by a host that draws
96
+ * `ImageRow` in its own field render, with `canPick`, `paste.open` and
97
+ * `note` read there. */
98
+ canPick?: boolean;
99
+ };
100
+ type ImageRowProps = ImageRowOptions & {
101
+ label: string;
102
+ icon?: ReactNode;
103
+ hint?: ReactNode;
104
+ value: ImageValue;
105
+ onChange: (url: string) => void;
106
+ /** This row's own key: with `frameKey`, the video and its still are written
107
+ * in one change under it. */
108
+ name?: string;
109
+ readOnly?: boolean;
110
+ };
111
+ /** THE image row: the shell's box in a settings row, with the options above. */
112
+ declare function ImageRow({ label, icon, hint, value, onChange, name, readOnly: readOnlyProp, canPick, kind, accept, acceptHint, pickOptions, maxSizeBytes, height, placeholder, removeLabel, paste, focusKey, focusWhen, frameKey, note, }: ImageRowProps): ReactElement;
113
+ /** The image row as a field: `label` and `icon` on the row, the options above. */
114
+ declare function imageField(label: string, icon: ReactNode, opts?: ImageRowOptions): BoxField<unknown> & {
115
+ [MEDIA_FIELD_MARKER]: true;
116
+ };
117
+
118
+ export { ImageRow, type ImageRowOptions, type ImageRowProps, type ImageValue, imageField, imageValueSrc };
@@ -0,0 +1,5 @@
1
+ import{SettingsDefaultReset as e}from"../../../chunk-2T22IY3J.js";import{ScreenDocumentContext as n}from"../../../chunk-BYONFJVQ.js";import"../../../chunk-QZJKWKGH.js";import"../../../chunk-ERR437B5.js";import{requestMediaPick as o}from"../../../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{useEaselHost as t}from"../../../chunk-LX23TCTP.js";import{DEFAULT_IMAGE_ROW_WORDS as r}from"../../../chunk-Q3VAJMXS.js";import{phoneKey as i}from"../../../chunk-E52W3M5I.js";import{MEDIA_FIELD_MARKER as c}from"../../../chunk-ANPOR6EY.js";import{useSelectedHost as s}from"../../../chunk-BBD3FLU3.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import{DEFAULT_PANEL_WORDS as a}from"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-NDRZP6YR.js";import"../../../chunk-H6DDIBQ4.js";import"../../../chunk-YYD257TD.js";import"../../../chunk-RE4LP46F.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import{SettingsField as m}from"../../../chunk-MIX7EGRG.js";import{useWords as l}from"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import{usePreviewDevice as u}from"../../../chunk-BSPCSC45.js";import{useContext as p,useState as h}from"react";import{FOCAL_DEFAULT as f}from"efficient-shell/format";import{MediaUploadField as k,Button as d,Input as j}from"efficient-shell/ui";import{jsx as g,jsxs as v}from"react/jsx-runtime";function y(e){return"string"==typeof e?e:e&&"object"==typeof e&&"string"==typeof e.src?e.src:""}function C({src:e,onChange:n,tidy:o,name:t}){const[r,i]=h(null),c=!r||e!==r.text&&e!==r.from?e:r.text;/* @__PURE__ */
2
+ return g(j,{size:"md",type:"url",inputMode:"url",autoComplete:"off",spellCheck:!1,value:c,placeholder:"https://…","aria-label":t,onChange:o=>{const t=o.target.value;i(n=>({text:t,from:!n||e!==n.text&&e!==n.from?e:n.from})),n(t)},onBlur:e=>{const t=e.target.value,r=o?o(t):t;r!==t&&n(r),i(null)},onKeyDown:e=>{"Enter"===e.key&&e.currentTarget.blur()}})}function R({label:c,icon:j,hint:R,value:B,onChange:E,name:b,readOnly:F,canPick:K=!0,kind:P="image",accept:M,acceptHint:L,pickOptions:Y,maxSizeBytes:D,height:N,placeholder:Q,removeLabel:O,paste:S,focusKey:T,focusWhen:I,frameKey:w,note:H}){const W=l("imageRow",r),X=l("panel",a),x=t(),G=s(),J=p(n),Z="video"===P,A=function(e,n){const o=s(),t="mobile"===u();if(!e||!o)return null;const r=o.values??{};if(n&&!n(r))return null;const c="string"==typeof r[e]&&r[e]?String(r[e]):f,a=i(e),m="string"==typeof r[a]&&r[a]?String(r[a]):void 0;return{phone:t,desktop:c,own:m,focus:t?m??c:c,set:n=>o.onChange(t?a:e,n),clear:()=>o.onChange(a,void 0)}}(Z?void 0:T,I),[U,z]=h(!1),V=!0===F||!0===G?.readOnly,q=K&&!V;if(J&&!J.capabilities.mediaEditing)/* @__PURE__ */
3
+ return g(m,{label:c,icon:j,hint:R,children:/* @__PURE__ */g("div",{className:"es-image-row-note",children:Z?W.templateVideo:W.template})});const $=w&&b?{video:b,frame:w}:null,_=$?e=>e?E(e):G?.onChangeMany({[$.video]:"",[$.frame]:""}):E,ee=$?e=>G?.onChangeMany({[$.video]:e,[$.frame]:""}):E,ne=y(B),oe=A?.phone&&ne?/* @__PURE__ */g(e,{words:X,label:W.focus,changed:Boolean(A.own),detail:W.onDesktop(A.desktop),onReset:A.clear,disabled:V}):void 0,te=S&&!V&&(S.open||U);/* @__PURE__ */
4
+ return g(m,{label:c,icon:j,hint:R,action:oe,children:/* @__PURE__ */v("div",{className:"es-image-row",children:[
5
+ /* @__PURE__ */g(k,{value:ne,onChange:_,onPick:e=>{if(q)return $&&!G?Promise.resolve(null):o(x,{accept:M??(Z?"video/*":"image/*"),title:c,...e?{file:e}:{},...Y?{options:Y}:{}}).then(e=>e&&$?(G?.onChangeMany({[$.video]:e.url,[$.frame]:e.posterUrl??""}),null):e?.url??null)},accept:M??(Z?"video/*":"image/*"),acceptHint:L,kind:P,maxSizeBytes:D,height:N,placeholder:Q,removeLabel:O,allowReplace:q,allowRemove:!V,disabled:V||!q&&!ne,focusLabel:W.focus,...A&&!V?{focus:A.focus,onFocusChange:A.set}:A?{focus:A.focus}:{}}),H?.(ne),S&&!V?te?/* @__PURE__ */g(C,{src:ne,onChange:ee,tidy:S.tidy,name:W.pasteName}):/* @__PURE__ */g(d,{variant:"link",size:"sm",onClick:()=>z(!0),children:W.pasteLink}):null]})})}function B(e,n,o={}){return{type:"custom",[c]:!0,render:t=>/* @__PURE__ */g(R,{...o,label:e,icon:n,value:t.value,onChange:e=>t.onChange(e),name:t.name,readOnly:t.readOnly})}}export{R as ImageRow,B as imageField,y as imageValueSrc};
@@ -1 +1 @@
1
- export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-H6BER2EU.js";import"../../../chunk-3QB2ZQXK.js";import"../../../chunk-5XL2RXFU.js";import"../../../chunk-OXOUGEAT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-S6YOIRXQ.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";
1
+ export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-BA5X67LQ.js";import"../../../chunk-3QB2ZQXK.js";import"../../../chunk-5XL2RXFU.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";
@@ -0,0 +1,109 @@
1
+ import { ReactElement } from 'react';
2
+ import { ColorPreset } from 'efficient-shell/ui';
3
+ import { ValueAccess, BoxField, BoxFieldSay } from './box-fields.js';
4
+ import 'efficient-shell/format';
5
+ import '../../../ScreenDocumentContext-DPW_6gOC.js';
6
+ import '../../../blocks/index.js';
7
+ import '../../../types-BljCVdzR.js';
8
+ import '../../../data/index.js';
9
+ import '../../../types-Dq180WRV.js';
10
+ import '../../../resolve-Bz4mszpL.js';
11
+ import '../../../plan-D0DgSLnY.js';
12
+ import '../document-contract.js';
13
+ import '../document-switch.js';
14
+ import '../../../engine-CvXpFE86.js';
15
+ import '../../../edit-lock/index.js';
16
+ import '../admin-bridge.js';
17
+ import '../session.js';
18
+ import '../backend-error.js';
19
+ import '../host-chrome.js';
20
+ import '../links/link-filters.js';
21
+ import '../document-hooks.js';
22
+ import '../section-template-types.js';
23
+ import './content-tree.js';
24
+ import '../shared-section-types.js';
25
+
26
+ /**
27
+ * THE STYLE ROWS of both editors: a colour, a border and the corners, as
28
+ * settings rows (plan [PLAN] Fill Editor Gaps Both Ways). The parts were
29
+ * already one (`SettingsColour`, the shell's `BorderInput` and
30
+ * `CornersInput`); each editor still wrapped them in its own row — the
31
+ * website's `ColourRow`, `BorderRow` and `cornersRowField`, the email
32
+ * designer's colour card and radius slider. These are the rows, built once.
33
+ *
34
+ * What differs between the editors is handed in, never decided here:
35
+ *
36
+ * - where the value is stored (`access`, {@link ValueAccess}): the website
37
+ * beside the other props, the email designer in one object. Left out, the
38
+ * row reads and writes its own field;
39
+ * - what an empty row follows (`useFollows`, a hook): the site's button
40
+ * colour, the campaign's accent, the corner in force. The row shows it in
41
+ * grey and stores nothing for it.
42
+ *
43
+ * A cleared value is `""` (a colour) or `null` (corners) on the row's own
44
+ * field, as the website has always stored it, and is REMOVED from an object.
45
+ */
46
+
47
+ /** Where a style row keeps its value. */
48
+ interface Stored {
49
+ /** The row's own key: the field it is declared under. */
50
+ key: string;
51
+ /** Where the value is kept. Left out: the row's own field. */
52
+ access?: ValueAccess;
53
+ }
54
+ /** A field that keeps a value a style row writes beside its own: saved, and
55
+ * drawn by that row (`reachedBy`), never by a row of its own. */
56
+ declare function keptByRow<V>(reachedBy: string): BoxField<V> & {
57
+ reachedBy: string;
58
+ };
59
+ interface ColourFieldOptions extends Stored {
60
+ label: string;
61
+ icon: ReactElement;
62
+ /** The colour an empty row paints, `#rrggbb`. A hook. */
63
+ useFollows: () => string;
64
+ /** The colours the window offers first. A hook. */
65
+ usePresets?: () => readonly ColorPreset[];
66
+ /** The colour's opacity, 0-100, on a sibling key; `useUnset` is what an
67
+ * unset opacity draws (a hook; 100 when left out). */
68
+ opacity?: {
69
+ key: string;
70
+ useUnset?: () => number;
71
+ };
72
+ /** What Reset's tooltip says it goes back to, in the host's words
73
+ * (`#2E2E2E from Styles`). The bare hex when left out. */
74
+ resetTo?: (hex: string) => string;
75
+ }
76
+ /** The widest border a row offers, px (the website's answer 4). */
77
+ declare const BORDER_WIDTH_MAX = 20;
78
+ interface BorderFieldOptions extends Stored {
79
+ /** What an empty border draws: its width and colour, shown in grey. A hook. */
80
+ useFollows: () => {
81
+ width: number;
82
+ color: string;
83
+ };
84
+ /** The Solid / Dashed / Dotted strip. Default false: the line is solid. */
85
+ styles?: boolean;
86
+ }
87
+ /** The corners in the order they are stored. Absence means all four. */
88
+ declare const CORNER_SIDES: readonly ["tl", "tr", "br", "bl"];
89
+ /** The largest corner a row offers, px (the site's own scale). */
90
+ declare const CORNER_RADIUS_MAX = 40;
91
+ interface CornersFieldOptions extends Stored {
92
+ /** The key on the same node (or in the same object) that holds which
93
+ * corners are round. Nothing stored: all four. */
94
+ sidesKey: string;
95
+ /** The radius an unset row draws, px. A hook. */
96
+ useFollows: () => number;
97
+ step?: number;
98
+ }
99
+ /** The three style rows, in the host's words. */
100
+ declare function styleFieldBuilders(say?: BoxFieldSay): {
101
+ colourField: (o: ColourFieldOptions) => BoxField<unknown>;
102
+ borderField: (o: BorderFieldOptions) => BoxField<unknown>;
103
+ cornersField: (o: CornersFieldOptions) => BoxField<unknown>;
104
+ };
105
+ declare const colourField: (o: ColourFieldOptions) => BoxField<unknown>;
106
+ declare const borderField: (o: BorderFieldOptions) => BoxField<unknown>;
107
+ declare const cornersField: (o: CornersFieldOptions) => BoxField<unknown>;
108
+
109
+ export { BORDER_WIDTH_MAX, type BorderFieldOptions, CORNER_RADIUS_MAX, CORNER_SIDES, type ColourFieldOptions, type CornersFieldOptions, borderField, colourField, cornersField, keptByRow, styleFieldBuilders };