efficient-easel 23.2.0 → 24.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/{ScreenDocumentContext-BDLUYzlM.d.ts → ScreenDocumentContext-DPW_6gOC.d.ts} +16 -1
  2. package/dist/{chunk-4RRIYPAV.js → chunk-2AV62DEP.js} +1 -1
  3. package/dist/{chunk-UNVKPVZW.js → chunk-3FIS2FRS.js} +1 -1
  4. package/dist/chunk-4RJBW7VC.js +8 -0
  5. package/dist/chunk-5NHQ452C.js +1 -0
  6. package/dist/{chunk-33P4J2SF.js → chunk-7BW74Y55.js} +1 -1
  7. package/dist/{chunk-VNDPFDO5.js → chunk-CMMR6CJS.js} +1 -1
  8. package/dist/chunk-CZAAGBVL.js +7 -0
  9. package/dist/{chunk-RMQDKVGW.js → chunk-D5GQEUKM.js} +1 -1
  10. package/dist/{chunk-CMBJHSHY.js → chunk-FRAIEWRC.js} +1 -1
  11. package/dist/chunk-G7ISR6DI.js +1 -0
  12. package/dist/{chunk-6QSFJCJT.js → chunk-H4Z2V56N.js} +16 -16
  13. package/dist/{chunk-ZOPYJQFS.js → chunk-HHQZB6IE.js} +41 -41
  14. package/dist/{chunk-77IWWW6X.js → chunk-ISS72IKO.js} +1 -1
  15. package/dist/chunk-K7MMLCTT.js +2 -0
  16. package/dist/chunk-LX23TCTP.js +2 -0
  17. package/dist/{chunk-FHCKFOCD.js → chunk-NCXYC7WI.js} +2 -2
  18. package/dist/{chunk-BIK3AO2V.js → chunk-NQW6XCAY.js} +1 -1
  19. package/dist/{chunk-MYAJ7MGI.js → chunk-PDJ5ZALV.js} +1 -1
  20. package/dist/{chunk-2G6MAXPY.js → chunk-T2RINM7R.js} +1 -1
  21. package/dist/chunk-TOHOGVAE.js +15 -0
  22. package/dist/{chunk-FEF3OQRT.js → chunk-VBOSOH5M.js} +5 -5
  23. package/dist/chunk-Z5BPY2VG.js +5 -0
  24. package/dist/chunk-ZYHKXEND.js +7 -0
  25. package/dist/copy/index.js +10 -10
  26. package/dist/draw/index.js +1 -1
  27. package/dist/easel/index.js +1 -1
  28. package/dist/fields/index.js +1 -1
  29. package/dist/panel/index.js +1 -15
  30. package/dist/panel/panel.css +8 -0
  31. package/dist/screen/components/AddBlockRow.js +1 -1
  32. package/dist/screen/components/AddSidePanel.js +1 -1
  33. package/dist/screen/components/MediaPopup.js +1 -1
  34. package/dist/screen/components/NodeContextMenu.d.ts +1 -1
  35. package/dist/screen/components/NodeContextMenu.js +1 -1
  36. package/dist/screen/components/PageEditGuardNotices.js +1 -1
  37. package/dist/screen/components/SaveControls.d.ts +1 -1
  38. package/dist/screen/components/ScreenChrome.js +1 -1
  39. package/dist/screen/components/ScreenDocumentContext.d.ts +1 -1
  40. package/dist/screen/components/ScreenDocumentContext.js +1 -1
  41. package/dist/screen/components/ScreenMount.d.ts +1 -1
  42. package/dist/screen/components/ScreenMount.js +1 -1
  43. package/dist/screen/components/ScreenStoreProvider.d.ts +1 -1
  44. package/dist/screen/components/ScreenStoreProvider.js +1 -1
  45. package/dist/screen/components/SectionScreenShell.js +17 -17
  46. package/dist/screen/components/usePartBridge.d.ts +1 -1
  47. package/dist/screen/components/usePartBridge.js +1 -1
  48. package/dist/screen/index.d.ts +1 -1
  49. package/dist/screen/index.js +1 -1
  50. package/dist/screen/lib/admin-bridge.js +1 -1
  51. package/dist/screen/lib/document/box-fields.d.ts +389 -0
  52. package/dist/screen/lib/document/box-fields.js +9 -0
  53. package/dist/screen/lib/document/slot-child-name.js +1 -1
  54. package/dist/screen/lib/document/style-clipboard.d.ts +1 -1
  55. package/dist/screen/lib/document/style-clipboard.js +1 -1
  56. package/dist/screen/lib/document/use-section-ops.js +1 -1
  57. package/dist/screen/lib/document-addressing.d.ts +1 -1
  58. package/dist/screen/lib/host-inbound.js +1 -1
  59. package/dist/screen/lib/host.d.ts +1 -1
  60. package/dist/screen/lib/host.js +1 -1
  61. package/dist/screen/lib/key-scope.js +1 -1
  62. package/dist/screen/lib/media-panel.d.ts +1 -1
  63. package/dist/screen/lib/media-panel.js +1 -1
  64. package/dist/screen/lib/media-picker.d.ts +1 -1
  65. package/dist/screen/lib/media-picker.js +1 -1
  66. package/dist/screen/lib/screen-parts.d.ts +1 -1
  67. package/dist/screen/lib/screen-parts.js +1 -1
  68. package/dist/screen/screen.css +32 -0
  69. package/dist/strings/index.js +1 -1
  70. package/dist/text-styles/index.js +21 -21
  71. package/package.json +9 -3
  72. package/dist/chunk-A6ZP5II4.js +0 -2
  73. package/dist/chunk-C57RLYDQ.js +0 -8
  74. package/dist/chunk-DCBSRZ6Z.js +0 -5
  75. package/dist/chunk-J5OSNZPU.js +0 -1
  76. package/dist/chunk-MQA7OFRA.js +0 -2
  77. package/dist/chunk-QWLWSIDH.js +0 -7
  78. package/dist/chunk-S3DUFDQ6.js +0 -6
  79. package/dist/chunk-SSRYU3YG.js +0 -1
@@ -1 +1 @@
1
- export{ScreenStoreProvider as default}from"../../chunk-VNDPFDO5.js";import"../../chunk-DCBSRZ6Z.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-MQA7OFRA.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-FEF3OQRT.js";import"../../chunk-RPMSET77.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-6QSFJCJT.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-AGWKB77Q.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-FM6JO4WF.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-S3DUFDQ6.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-6NJHYXJM.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-YU3WHLGI.js";import"../../chunk-LF3FUSCQ.js";import"../../chunk-TGZCD6IP.js";import"../../chunk-KXM6YRG2.js";
1
+ export{ScreenStoreProvider as default}from"../../chunk-CMMR6CJS.js";import"../../chunk-Z5BPY2VG.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-VBOSOH5M.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-H4Z2V56N.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-AGWKB77Q.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-RPMSET77.js";import"../../chunk-FM6JO4WF.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-CZAAGBVL.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-6NJHYXJM.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-YU3WHLGI.js";import"../../chunk-LF3FUSCQ.js";import"../../chunk-TGZCD6IP.js";import"../../chunk-KXM6YRG2.js";
@@ -1,17 +1,17 @@
1
- import{AddBlockRow as e}from"../../chunk-4RRIYPAV.js";import{scrollPreviewToSection as n,gotoPreviewSlide as o}from"../../chunk-DDH2DYQP.js";import{useEaselUndoKeys as r}from"../../chunk-MYAJ7MGI.js";import{SlotChildActionsProvider as t}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as s}from"../../chunk-Y53EKN35.js";import{usePartBridge as i}from"../../chunk-33P4J2SF.js";import{useSectionOps as c}from"../../chunk-RMQDKVGW.js";import"../../chunk-RUQOIQWI.js";import{SELECTION_MODE as p,useScreenPinned as l,useScreenCanvasFrame as m,useScreenInspectorPanel as d,useScreenPickFollowsSelection as u,sameInspectorMode as a,useStandaloneScreenBridges as h,useScreenBlockLook as k,useScreenBlockRules as j,isSelectionMode as f,shownChildSlotsOf as S}from"../../chunk-DCBSRZ6Z.js";import{MediaPopup as y}from"../../chunk-2G6MAXPY.js";import{useScreenDocument as A}from"../../chunk-A6ZP5II4.js";import"../../chunk-77IWWW6X.js";import"../../chunk-ERR437B5.js";import"../../chunk-UNVKPVZW.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-BIK3AO2V.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-MQA7OFRA.js";import{DEFAULT_SCREEN_WORDS as C}from"../../chunk-IYHO4XQX.js";import{slotChildRowName as N}from"../../chunk-SSRYU3YG.js";import"../../chunk-AJ2SUSET.js";import"../../chunk-ANPOR6EY.js";import"../../chunk-6UAEFOJ4.js";import"../../chunk-R4AUZVA3.js";import{slotFieldsOf as Y,nestsInTree as P}from"../../chunk-TCAAOYQY.js";import{useEasel as x}from"../../chunk-FEF3OQRT.js";import"../../chunk-RPMSET77.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-6QSFJCJT.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import{LayersTree as F,Subtree as R,TreeRow as O,TreeRowAction as W,TreeSeam as D}from"../../chunk-WHS6Y55E.js";import{DEFAULT_TREE_WORDS as I}from"../../chunk-K56YDHYQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-AGWKB77Q.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-FM6JO4WF.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-NDRZP6YR.js";import{DEFAULT_SAVE_WORDS as M,saveIndicator as g}from"../../chunk-H6DDIBQ4.js";import{SaveState as E,panelWidthVars as Q}from"../../chunk-WYTPBF3Q.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-S3DUFDQ6.js";import{useWords as B}from"../../chunk-MFIRYGHW.js";import"../../chunk-LN43DP2A.js";import"../../chunk-TQ5Y6S2X.js";import{useTreeDrag as b}from"../../chunk-6NJHYXJM.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-YU3WHLGI.js";import"../../chunk-LF3FUSCQ.js";import{zoneKey as v,parseZoneKey as z}from"../../chunk-TGZCD6IP.js";import"../../chunk-KXM6YRG2.js";import"../../chunk-467WWV4I.js";import"../../chunk-TIAWIOGD.js";import"../../chunk-MGVI67QV.js";import{useState as V,useRef as w,useEffect as H,useCallback as T,Fragment as J}from"react";import{Tooltip as K}from"efficient-shell/ui";import{TrashIcon as Z}from"efficient-shell/icons/efficient";import{jsxs as G,jsx as U,Fragment as X}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}=A(),ne=c(),{appState:oe,selectedItem:re,config:te}=x(e=>e),[se,ie]=V(p),ce=B("screen",C),pe=B("tree",I),le=B("save",M),{first:me,last:de,panelOf:ue}=l(),ae=ue(me),he=m(),ke=d(),je=oe.data.content?.[0]??null,fe=je?.props.id??null,Se=je?.type===me,ye=je?.type===de,Ae=w(null),Ce=w(null);r(Ce),u(re?.props.id),H(()=>{fe&&Ae.current!==fe&&(Ae.current=fe,Se?ie(ae??p):re||ne.select({index:0}))},[fe,re,ne,Se]);const Ne=T(e=>ie(n=>a(n,e)?n:e),[]),Ye=h({kind:se.kind,mode:se,open:Ne,show:e=>ie(e),reveal:()=>{},select:(e,n)=>{ie(e=>a(e,n)?e:n),ne.select(e)}}),{selectNode:Pe}=i({mode:se,setMode:ie,onOpenPart:n}),xe=k(),{labelAtLevel:Fe,Icon:Re}=xe,{canAddTo:Oe}=j(),We=e=>Fe(e,"block",te.components[e]?.label??e),De=e=>Fe(e,"section",We(e)),Ie=!Se&&f(se)&&re?.props.id===fe,Me=je?Oe(je.type)?.spec??null:null,ge=je&&Me?`${je.props.id}:${Me.slot}`:null,Ee=je&&Me&&Array.isArray(je.props[Me.slot])?je.props[Me.slot]:[],Qe=e=>N(e,We,xe.plainText),Be=(e,r)=>{je&&Me&&ge&&(ie(p),Me.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)))},be=()=>{if(!je||!Me||!ge)return;const e=Ee.length;ne.insertComponent(ge,Me.childType,e),ie(p),Me.slider?requestAnimationFrame(()=>{o(String(je.props.id),e),ne.select({index:e,zone:ge})}):ne.select({index:e,zone:ge})},ve=e=>Y(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 ve(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},Ve=(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(p),ne.select({index:t,zone:e}))},we=b({keyOf:e=>e.id,readOnly:Boolean(_),canDrop:(e,n)=>v(n)===e.zone&&n.index>=0&&n.index<=ze(e.zone),onDrop:(e,n)=>Ve(e.zone,e.index,n.index),onStep:(e,n)=>Ve(e.zone,e.index,n<0?e.index-1:e.index+2)}),He=(e,n)=>/* @__PURE__ */U(D,{..._?{}:we.seam({place:{...z(e),index:n}})},`seam:${e}:${n}`),Te=e=>xe.blockRowName(e,We),Je=(e,o,r)=>{ie(p),ne.select({index:o,zone:e}),n(r)},Ke=(e,n,o)=>{ne.insertComponent(e,n,o),ie(p),ne.select({index:o,zone:e})},Ze=(n,o,r)=>/* @__PURE__ */U(e,{choices:r,onPick:e=>Ke(n,e,o)}),Ge=(e,n)=>{const o=S(te,e);const r=Oe(e.type),t=r?.choices??null,s="footer"===r?.source?Te:Qe;/* @__PURE__ */
2
- return G(X,{children:[o.map(({child:e,zone:o,index:r})=>{const t=re?.props.id===e.props.id,i=P(te,e.type,n),c=s(e),l=String(e.props.id),m=()=>Je(o,r,l),{rowProps:d,...u}=we.row({item:{id:l,zone:o,index:r},place:{...z(o),index:r}},{onClick:L(m)});/* @__PURE__ */
3
- return G(J,{children:[0===r&&He(o,0),
4
- /* @__PURE__ */U(O,{words:pe,icon:/* @__PURE__ */U(Re,{type:e.type,size:13}),name:c,selected:t,onSelect:m,...u,actions:/* @__PURE__ */U(W,{kind:"delete",label:ce.deleteNamed({name:c}),onClick:()=>{return e=o,n=r,ne.removeComponent(e,n),ie(p),void ne.select(null);var e,n},children:/* @__PURE__ */U(Z,{size:13})}),rowProps:d}),i&&/* @__PURE__ */U(R,{children:Ge(e,n+1)}),He(o,r+1)]},String(e.props.id??`${o}-${r}`))}),r&&t?Ze(`${e.props.id}:${r.slot}`,o.length,t):null]})},Ue="HeroSingle"===je?.type,Xe=Boolean(je)&&(Boolean(Oe(je.type))||ve(je.type).length>0),Le=Boolean(je)&&(Boolean(Me)||ye||Se||Ue||Xe);/* @__PURE__ */
5
- return G("div",{ref:Ce,className:"sf-editor es-editor",style:Q(s),children:[
6
- /* @__PURE__ */U("div",{className:"sf-section-bar",children:/* @__PURE__ */U(E,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__ */U("div",{className:"sf-panel-head",children:/* @__PURE__ */U(K,{content:Se?ce.headerSettings:ce.sectionSettings({name:De(je.type)}),side:"bottom",children:/* @__PURE__ */U("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(Ie?"is-selected":""),"aria-pressed":Ie,onClick:()=>{Se?ie(ae??p):(ie(p),ne.select({index:0}))},children:De(je.type)})})}),
9
- /* @__PURE__ */U(F,{className:"sf-tree sf-scroll",rootProps:we.rootProps(),words:pe,children:/* @__PURE__ */U(R,{children:Se?
10
- /* @__PURE__ */U(O,{words:pe,icon:/* @__PURE__ */U(Re,{type:"header",size:13}),name:ce.headerSettings,selected:se.kind===ae?.kind,onSelect:()=>ie(ae??p),rowProps:{onClick:L(()=>ie(ae??p))}}):Me?/* @__PURE__ */G(X,{children:[Ee.map((e,n)=>{const o=re?.props.id===e.props.id,r=Qe(e),t=String(e.props.id),s=()=>Be(n,t),{rowProps:i,...c}=we.row({item:{id:t,zone:ge,index:n},place:{...z(ge),index:n}},{onClick:L(s)});/* @__PURE__ */
11
- return G(J,{children:[0===n&&He(ge,0),
12
- /* @__PURE__ */U(O,{words:pe,icon:/* @__PURE__ */U(Re,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */U(W,{kind:"delete",label:ce.deleteNamed({name:r}),onClick:()=>{return e=n,void(ge&&(ne.removeComponent(ge,e),ie(p),ne.select(null)));var e},children:/* @__PURE__ */U(Z,{size:13})}),rowProps:i}),He(ge,n+1)]},String(e.props.id??n))}),
13
- /* @__PURE__ */G("button",{type:"button",className:"sf-add-card",onClick:be,children:[
14
- /* @__PURE__ */U("span",{className:"sf-plus sf-plus--sm",children:"+"}),Me.addLabel]}),fe?Ye.partRows?.(je,$):null]}):Ge(je,1)})})]}),
15
- /* @__PURE__ */U("div",{className:"sf-center",children:/* @__PURE__ */U("div",{className:"sf-preview-host",children:/* @__PURE__ */U(he,{})})}),
16
- /* @__PURE__ */U(t,{value:{selectChild:(e,n,o,r)=>"section"===Oe(r)?.source?Be(n,o):Je(e,n,o),addChild:(e,n,o,r,t)=>"section"===Oe(t)?.source?be():Ke(`${e}:${n}`,o,r),childRowName:Qe,blockRowName:Te},children:/* @__PURE__ */U(ke,{mode:se,onOpenWebsiteSettings:Ye.openSettings??(()=>{}),onSelectNode:Pe,hideNodeActions:!0})})]}),
17
- /* @__PURE__ */U(y,{})]})}export{q as default};
1
+ import{AddBlockRow as e}from"../../chunk-2AV62DEP.js";import{scrollPreviewToSection as n,gotoPreviewSlide as o}from"../../chunk-DDH2DYQP.js";import{useEaselUndoKeys as r}from"../../chunk-PDJ5ZALV.js";import{SlotChildActionsProvider as t}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as s}from"../../chunk-Y53EKN35.js";import{usePartBridge as i}from"../../chunk-7BW74Y55.js";import{useSectionOps as c}from"../../chunk-D5GQEUKM.js";import"../../chunk-RUQOIQWI.js";import{SELECTION_MODE as p,useScreenPinned as l,useScreenCanvasFrame as m,useScreenInspectorPanel as d,useScreenPickFollowsSelection as u,sameInspectorMode as a,useStandaloneScreenBridges as h,useScreenBlockLook as k,useScreenBlockRules as j,isSelectionMode as f,shownChildSlotsOf as S}from"../../chunk-Z5BPY2VG.js";import{MediaPopup as N}from"../../chunk-T2RINM7R.js";import{useScreenDocument as C}from"../../chunk-K7MMLCTT.js";import"../../chunk-ISS72IKO.js";import"../../chunk-ERR437B5.js";import"../../chunk-3FIS2FRS.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.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{DEFAULT_SCREEN_WORDS as y}from"../../chunk-IYHO4XQX.js";import{slotChildRowName as A}from"../../chunk-5NHQ452C.js";import"../../chunk-6UAEFOJ4.js";import"../../chunk-AJ2SUSET.js";import"../../chunk-ANPOR6EY.js";import"../../chunk-R4AUZVA3.js";import{slotFieldsOf as Y,nestsInTree as x}from"../../chunk-TCAAOYQY.js";import{useEasel as P}from"../../chunk-VBOSOH5M.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-H4Z2V56N.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import{LayersTree as O,Subtree as B,TreeRow as E,TreeRowAction as M,TreeSeam as R}from"../../chunk-WHS6Y55E.js";import{DEFAULT_TREE_WORDS as g}from"../../chunk-K56YDHYQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-AGWKB77Q.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-RPMSET77.js";import"../../chunk-FM6JO4WF.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-NDRZP6YR.js";import{DEFAULT_SAVE_WORDS as I,saveIndicator as W}from"../../chunk-H6DDIBQ4.js";import{SaveState as D,panelWidthVars as F}from"../../chunk-WYTPBF3Q.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-CZAAGBVL.js";import{useWords as H}from"../../chunk-MFIRYGHW.js";import"../../chunk-LN43DP2A.js";import"../../chunk-TQ5Y6S2X.js";import{useTreeDrag as T}from"../../chunk-6NJHYXJM.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-YU3WHLGI.js";import"../../chunk-LF3FUSCQ.js";import{zoneKey as V,parseZoneKey as b}from"../../chunk-TGZCD6IP.js";import"../../chunk-KXM6YRG2.js";import"../../chunk-467WWV4I.js";import"../../chunk-TIAWIOGD.js";import"../../chunk-MGVI67QV.js";import{useState as v,useRef as z,useEffect as Q,useCallback as w,Fragment as Z}from"react";import{Tooltip as K}from"efficient-shell/ui";import{TrashIcon as L}from"efficient-shell/icons/efficient";import{jsxs as G,jsx as J,Fragment as X}from"react/jsx-runtime";var U=e=>n=>{n.target.closest("button, input")||e()},$={rowClick:U};function q(){const{saveState:q,readOnly:_,readOnlyReason:ee=null}=C(),ne=c(),{appState:oe,selectedItem:re,config:te}=P(e=>e),[se,ie]=v(p),ce=H("screen",y),pe=H("tree",g),le=H("save",I),{first:me,last:de,panelOf:ue}=l(),ae=ue(me),he=m(),ke=d(),je=oe.data.content?.[0]??null,fe=je?.props.id??null,Se=je?.type===me,Ne=je?.type===de,Ce=z(null),ye=z(null);r(ye),u(re?.props.id),Q(()=>{fe&&Ce.current!==fe&&(Ce.current=fe,Se?ie(ae??p):re||ne.select({index:0}))},[fe,re,ne,Se]);const Ae=w(e=>ie(n=>a(n,e)?n:e),[]),Ye=h({kind:se.kind,mode:se,open:Ae,show:e=>ie(e),reveal:()=>{},select:(e,n)=>{ie(e=>a(e,n)?e:n),ne.select(e)}}),{selectNode:xe}=i({mode:se,setMode:ie,onOpenPart:n}),Pe=k(),{labelAtLevel:Oe,Icon:Be}=Pe,{canAddTo:Ee}=j(),Me=e=>Oe(e,"block",te.components[e]?.label??e),Re=e=>Oe(e,"section",Me(e)),ge=!Se&&f(se)&&re?.props.id===fe,Ie=je?Ee(je.type)?.spec??null:null,We=je&&Ie?`${je.props.id}:${Ie.slot}`:null,De=je&&Ie&&Array.isArray(je.props[Ie.slot])?je.props[Ie.slot]:[],Fe=e=>A(e,Me,Pe.plainText),He=(e,r)=>{je&&Ie&&We&&(ie(p),Ie.slider?(o(String(je.props.id),e),ne.select({index:e,zone:We}),n(String(je.props.id))):(ne.select({index:e,zone:We}),n(r)))},Te=()=>{if(!je||!Ie||!We)return;const e=De.length;ne.insertComponent(We,Ie.childType,e),ie(p),Ie.slider?requestAnimationFrame(()=>{o(String(je.props.id),e),ne.select({index:e,zone:We})}):ne.select({index:e,zone:We})},Ve=e=>Y(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 Ve(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},ve=(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(p),ne.select({index:t,zone:e}))},ze=T({keyOf:e=>e.id,readOnly:Boolean(_),canDrop:(e,n)=>V(n)===e.zone&&n.index>=0&&n.index<=be(e.zone),onDrop:(e,n)=>ve(e.zone,e.index,n.index),onStep:(e,n)=>ve(e.zone,e.index,n<0?e.index-1:e.index+2)}),Qe=(e,n)=>/* @__PURE__ */J(R,{..._?{}:ze.seam({place:{...b(e),index:n}})},`seam:${e}:${n}`),we=e=>Pe.blockRowName(e,Me),Ze=(e,o,r)=>{ie(p),ne.select({index:o,zone:e}),n(r)},Ke=(e,n,o)=>{ne.insertComponent(e,n,o),ie(p),ne.select({index:o,zone:e})},Le=(n,o,r)=>/* @__PURE__ */J(e,{choices:r,onPick:e=>Ke(n,e,o)}),Ge=(e,n)=>{const o=S(te,e);const r=Ee(e.type),t=r?.choices??null,s="footer"===r?.source?we:Fe;/* @__PURE__ */
2
+ return G(X,{children:[o.map(({child:e,zone:o,index:r})=>{const t=re?.props.id===e.props.id,i=x(te,e.type,n),c=s(e),l=String(e.props.id),m=()=>Ze(o,r,l),{rowProps:d,...u}=ze.row({item:{id:l,zone:o,index:r},place:{...b(o),index:r}},{onClick:U(m)});/* @__PURE__ */
3
+ return G(Z,{children:[0===r&&Qe(o,0),
4
+ /* @__PURE__ */J(E,{words:pe,icon:/* @__PURE__ */J(Be,{type:e.type,size:13}),name:c,selected:t,onSelect:m,...u,actions:/* @__PURE__ */J(M,{kind:"delete",label:ce.deleteNamed({name:c}),onClick:()=>{return e=o,n=r,ne.removeComponent(e,n),ie(p),void ne.select(null);var e,n},children:/* @__PURE__ */J(L,{size:13})}),rowProps:d}),i&&/* @__PURE__ */J(B,{children:Ge(e,n+1)}),Qe(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,Xe=Boolean(je)&&(Boolean(Ee(je.type))||Ve(je.type).length>0),Ue=Boolean(je)&&(Boolean(Ie)||Ne||Se||Je||Xe);/* @__PURE__ */
5
+ return G("div",{ref:ye,className:"sf-editor es-editor",style:F(s),children:[
6
+ /* @__PURE__ */J("div",{className:"sf-section-bar",children:/* @__PURE__ */J(D,null!==ee?{tone:"off",label:ee,role:"status"}:{...W(q,le),role:"status"})}),
7
+ /* @__PURE__ */G("div",{className:"sf-body",children:[Ue&&je&&/* @__PURE__ */G("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
8
+ /* @__PURE__ */J("div",{className:"sf-panel-head",children:/* @__PURE__ */J(K,{content:Se?ce.headerSettings:ce.sectionSettings({name:Re(je.type)}),side:"bottom",children:/* @__PURE__ */J("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(ge?"is-selected":""),"aria-pressed":ge,onClick:()=>{Se?ie(ae??p):(ie(p),ne.select({index:0}))},children:Re(je.type)})})}),
9
+ /* @__PURE__ */J(O,{className:"sf-tree sf-scroll",rootProps:ze.rootProps(),words:pe,children:/* @__PURE__ */J(B,{children:Se?
10
+ /* @__PURE__ */J(E,{words:pe,icon:/* @__PURE__ */J(Be,{type:"header",size:13}),name:ce.headerSettings,selected:se.kind===ae?.kind,onSelect:()=>ie(ae??p),rowProps:{onClick:U(()=>ie(ae??p))}}):Ie?/* @__PURE__ */G(X,{children:[De.map((e,n)=>{const o=re?.props.id===e.props.id,r=Fe(e),t=String(e.props.id),s=()=>He(n,t),{rowProps:i,...c}=ze.row({item:{id:t,zone:We,index:n},place:{...b(We),index:n}},{onClick:U(s)});/* @__PURE__ */
11
+ return G(Z,{children:[0===n&&Qe(We,0),
12
+ /* @__PURE__ */J(E,{words:pe,icon:/* @__PURE__ */J(Be,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */J(M,{kind:"delete",label:ce.deleteNamed({name:r}),onClick:()=>{return e=n,void(We&&(ne.removeComponent(We,e),ie(p),ne.select(null)));var e},children:/* @__PURE__ */J(L,{size:13})}),rowProps:i}),Qe(We,n+1)]},String(e.props.id??n))}),
13
+ /* @__PURE__ */G("button",{type:"button",className:"sf-add-card",onClick:Te,children:[
14
+ /* @__PURE__ */J("span",{className:"sf-plus sf-plus--sm",children:"+"}),Ie.addLabel]}),fe?Ye.partRows?.(je,$):null]}):Ge(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"===Ee(r)?.source?He(n,o):Ze(e,n,o),addChild:(e,n,o,r,t)=>"section"===Ee(t)?.source?Te():Ke(`${e}:${n}`,o,r),childRowName:Fe,blockRowName:we},children:/* @__PURE__ */J(ke,{mode:se,onOpenWebsiteSettings:Ye.openSettings??(()=>{}),onSelectNode:xe,hideNodeActions:!0})})]}),
17
+ /* @__PURE__ */J(N,{})]})}export{q as default};
@@ -26,7 +26,7 @@ import '../lib/section-template-types.js';
26
26
  import '../lib/document/content-tree.js';
27
27
  import '../lib/shared-section-types.js';
28
28
  import '../lib/document/block-choice.js';
29
- import '../../ScreenDocumentContext-BDLUYzlM.js';
29
+ import '../../ScreenDocumentContext-DPW_6gOC.js';
30
30
  import '../lib/document-contract.js';
31
31
  import '../lib/document-switch.js';
32
32
  import '../../engine-CvXpFE86.js';
@@ -1 +1 @@
1
- export{usePartBridge}from"../../chunk-33P4J2SF.js";import"../../chunk-RMQDKVGW.js";import"../../chunk-DCBSRZ6Z.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-MQA7OFRA.js";import"../../chunk-R4AUZVA3.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-FEF3OQRT.js";import"../../chunk-RPMSET77.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-6QSFJCJT.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-AGWKB77Q.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-FM6JO4WF.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-S3DUFDQ6.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-6NJHYXJM.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-YU3WHLGI.js";import"../../chunk-LF3FUSCQ.js";import"../../chunk-TGZCD6IP.js";import"../../chunk-KXM6YRG2.js";import"../../chunk-467WWV4I.js";import"../../chunk-TIAWIOGD.js";import"../../chunk-MGVI67QV.js";
1
+ export{usePartBridge}from"../../chunk-7BW74Y55.js";import"../../chunk-D5GQEUKM.js";import"../../chunk-Z5BPY2VG.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-R4AUZVA3.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-VBOSOH5M.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-H4Z2V56N.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-AGWKB77Q.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-RPMSET77.js";import"../../chunk-FM6JO4WF.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-CZAAGBVL.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-6NJHYXJM.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-YU3WHLGI.js";import"../../chunk-LF3FUSCQ.js";import"../../chunk-TGZCD6IP.js";import"../../chunk-KXM6YRG2.js";import"../../chunk-467WWV4I.js";import"../../chunk-TIAWIOGD.js";import"../../chunk-MGVI67QV.js";
@@ -3,7 +3,7 @@ export { default as ScreenStoreProvider } from './components/ScreenStoreProvider
3
3
  export { NodeDefaults, SELECTION_MODE, ScreenBlockLook, ScreenBlockRules, ScreenBridges, ScreenCanvas, ScreenCanvasDrag, ScreenCanvasDragContext, ScreenCanvasHeadProps, ScreenCanvasTargetProvider, ScreenDevices, ScreenDocumentOps, ScreenDragItem, ScreenInspector, ScreenInspectorMode, ScreenInspectorPanelProps, ScreenLeftPanel, ScreenLeftView, ScreenLeftViewFrame, ScreenLeftViewRules, ScreenMainAction, ScreenMediaDrop, ScreenMediaFile, ScreenMenuItem, ScreenMenuRows, ScreenNewNode, ScreenNode, ScreenNodeActions, ScreenNodeLevel, ScreenNodeMaker, ScreenPartMode, ScreenParts, ScreenPartsProvider, ScreenPinnedBand, ScreenPinnedNodes, ScreenRailItem, ScreenSelector, ScreenSharedSections, ScreenSlot, ScreenSlotAction, ScreenSlotMode, ScreenStyleClipboard, ScreenStyleDocument, ScreenStylePastePlan, ScreenToastExtra, ScreenTree, ScreenTreeFolds, ScreenTreeRows, 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 './lib/screen-parts.js';
4
4
  export { DefaultBackend, EFFICIENT_BACKEND, EaselSession, SessionBackend, SessionBlocks, activateEaselSession, backendOf, createEaselSession, currentEaselSession, deactivateEaselSession, efficientClientOpen, isEfficientBackend, provideDefaultBackend, resetAmbientEaselSession, sessionRegistry, setSessionBridgedSite, setSessionDocumentSite } from './lib/session.js';
5
5
  export { EaselSessionProvider, useEaselSession } from './lib/session-context.js';
6
- export { A as AnyDocumentAddressing, D as DETACHED_EASEL_HOST, a as DocumentAddressing, E as EaselBlockType, b as EaselFieldDescription, c as EaselHost, d as EaselHostAddress, e as EaselHostContext, f as EaselHostPanels, g as EaselHostProvider, h as EaselMessageType, i as EaselSelection, j as EaselToHostMessage, H as HostPickedMedia, k as HostToEaselMessage, I as InboundHostMessage, N as NO_DOCUMENT_ADDRESSING, P as PageEditOp, l as PickedMediaSource, S as SectionScreenTarget, m as SendToHost, n as createEaselHost, u as useEaselHost, o as useHostEscape } from '../ScreenDocumentContext-BDLUYzlM.js';
6
+ export { A as AnyDocumentAddressing, D as DETACHED_EASEL_HOST, a as DocumentAddressing, E as EaselBlockType, b as EaselFieldDescription, c as EaselHost, d as EaselHostAddress, e as EaselHostContext, f as EaselHostPanels, g as EaselHostProvider, h as EaselMessageType, i as EaselSelection, j as EaselToHostMessage, F as FIELD_DESCRIPTION_MARKER, H as HostPickedMedia, k as HostToEaselMessage, I as InboundHostMessage, N as NO_DOCUMENT_ADDRESSING, P as PageEditOp, l as PickedMediaSource, S as SectionScreenTarget, m as SendToHost, n as createEaselHost, o as describedAs, u as useEaselHost, p as useHostEscape } from '../ScreenDocumentContext-DPW_6gOC.js';
7
7
  export { EaselCapabilities, EaselDocument, EaselDocumentAdapter, EaselPageRow, SiteRecord, SiteRecordPatch, WebsiteEditLock } from './lib/document-contract.js';
8
8
  import 'react';
9
9
  import '../blocks/index.js';
@@ -1 +1 @@
1
- import"../chunk-GZO72N3Q.js";export{DocumentScreen,ScreenMount}from"../chunk-QWLWSIDH.js";import"../chunk-GXQCZJOP.js";import"../chunk-ZOPYJQFS.js";import"../chunk-OXZDSOZV.js";import"../chunk-7OCEPOEJ.js";import"../chunk-DSKNJXB4.js";import"../chunk-UMBNBCL4.js";import"../chunk-5XL2RXFU.js";import"../chunk-2FYFAAAK.js";import"../chunk-22I55W37.js";import"../chunk-3QB2ZQXK.js";import"../chunk-DDH2DYQP.js";import"../chunk-MYAJ7MGI.js";import"../chunk-KCBEE2MC.js";import"../chunk-Y53EKN35.js";import"../chunk-33P4J2SF.js";import"../chunk-RMQDKVGW.js";import"../chunk-55KKGABA.js";import"../chunk-RKTF5XLP.js";export{ScreenStoreProvider}from"../chunk-VNDPFDO5.js";import"../chunk-5545A3PC.js";import"../chunk-C57RLYDQ.js";import"../chunk-VKPOH6MK.js";import"../chunk-IZGFJWH4.js";import"../chunk-N7E6264U.js";import"../chunk-N3MJOHAG.js";import"../chunk-5PXVT7JY.js";import"../chunk-UMDQ6CLQ.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-DCBSRZ6Z.js";import"../chunk-2G6MAXPY.js";import"../chunk-J5OSNZPU.js";import"../chunk-V7U33NF2.js";import"../chunk-CMBJHSHY.js";import"../chunk-A6ZP5II4.js";import"../chunk-77IWWW6X.js";import"../chunk-ERR437B5.js";import"../chunk-UNVKPVZW.js";import"../chunk-GMCZXMOV.js";export{NO_DOCUMENT_ADDRESSING}from"../chunk-RLBXE4EU.js";import"../chunk-HNKB2ZYR.js";import"../chunk-CLOS6SSX.js";import"../chunk-BIK3AO2V.js";import"../chunk-LOMEH6DG.js";import"../chunk-KCOBHPN6.js";import"../chunk-FHCKFOCD.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,createEaselHost,useEaselHost,useHostEscape}from"../chunk-MQA7OFRA.js";import"../chunk-P5VYGWYO.js";import"../chunk-XFYFKITX.js";import"../chunk-6WY6ZXJG.js";import"../chunk-WK3AFPXY.js";import"../chunk-IYHO4XQX.js";import"../chunk-SSRYU3YG.js";import"../chunk-AJ2SUSET.js";import"../chunk-ANPOR6EY.js";import"../chunk-6UAEFOJ4.js";import"../chunk-R4AUZVA3.js";import"../chunk-TCAAOYQY.js";import"../chunk-FEF3OQRT.js";import"../chunk-RPMSET77.js";import"../chunk-TBY3DFKS.js";import"../chunk-6QSFJCJT.js";import"../chunk-BPXEFVSQ.js";import"../chunk-YCSZAP7T.js";import"../chunk-WHS6Y55E.js";import"../chunk-K56YDHYQ.js";import"../chunk-ZEH6QLBH.js";import"../chunk-AGWKB77Q.js";import"../chunk-ZKY45F5G.js";import"../chunk-FIVU2COQ.js";import"../chunk-FM6JO4WF.js";import"../chunk-KFV7N2DJ.js";import"../chunk-NDRZP6YR.js";import"../chunk-H6DDIBQ4.js";import"../chunk-WYTPBF3Q.js";import"../chunk-MJM6SFD3.js";import"../chunk-AJSDWWJW.js";import"../chunk-2OAZYSWJ.js";import"../chunk-THWO5YVZ.js";import"../chunk-RE4LP46F.js";import"../chunk-HZSZT3BE.js";import"../chunk-KRL3IUV3.js";import"../chunk-Y2T3JX7K.js";import"../chunk-KFWNGPW3.js";import"../chunk-JACEEVVF.js";import"../chunk-S3DUFDQ6.js";import"../chunk-MFIRYGHW.js";import"../chunk-LN43DP2A.js";import"../chunk-TQ5Y6S2X.js";import"../chunk-6NJHYXJM.js";import"../chunk-P2VEMZH5.js";import"../chunk-YU3WHLGI.js";import"../chunk-LF3FUSCQ.js";import"../chunk-TGZCD6IP.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-ZYHKXEND.js";import"../chunk-GXQCZJOP.js";import"../chunk-HHQZB6IE.js";import"../chunk-OXZDSOZV.js";import"../chunk-7OCEPOEJ.js";import"../chunk-DSKNJXB4.js";import"../chunk-UMBNBCL4.js";import"../chunk-5XL2RXFU.js";import"../chunk-2FYFAAAK.js";import"../chunk-22I55W37.js";import"../chunk-3QB2ZQXK.js";import"../chunk-DDH2DYQP.js";import"../chunk-PDJ5ZALV.js";import"../chunk-KCBEE2MC.js";import"../chunk-Y53EKN35.js";import"../chunk-7BW74Y55.js";import"../chunk-D5GQEUKM.js";import"../chunk-55KKGABA.js";import"../chunk-RKTF5XLP.js";export{ScreenStoreProvider}from"../chunk-CMMR6CJS.js";import"../chunk-5545A3PC.js";import"../chunk-4RJBW7VC.js";import"../chunk-VKPOH6MK.js";import"../chunk-IZGFJWH4.js";import"../chunk-N7E6264U.js";import"../chunk-N3MJOHAG.js";import"../chunk-5PXVT7JY.js";import"../chunk-UMDQ6CLQ.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-Z5BPY2VG.js";import"../chunk-T2RINM7R.js";import"../chunk-G7ISR6DI.js";import"../chunk-FRAIEWRC.js";import"../chunk-K7MMLCTT.js";import"../chunk-ISS72IKO.js";import"../chunk-ERR437B5.js";import"../chunk-3FIS2FRS.js";import"../chunk-GMCZXMOV.js";export{NO_DOCUMENT_ADDRESSING}from"../chunk-RLBXE4EU.js";import"../chunk-HNKB2ZYR.js";import"../chunk-CLOS6SSX.js";import"../chunk-NQW6XCAY.js";import"../chunk-LOMEH6DG.js";import"../chunk-KCOBHPN6.js";import"../chunk-NCXYC7WI.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-IYHO4XQX.js";import"../chunk-V7U33NF2.js";import"../chunk-6WY6ZXJG.js";import"../chunk-5NHQ452C.js";import"../chunk-6UAEFOJ4.js";import"../chunk-AJ2SUSET.js";import"../chunk-ANPOR6EY.js";import"../chunk-R4AUZVA3.js";import"../chunk-TCAAOYQY.js";import"../chunk-VBOSOH5M.js";import"../chunk-TBY3DFKS.js";import"../chunk-H4Z2V56N.js";import"../chunk-BPXEFVSQ.js";import"../chunk-YCSZAP7T.js";import"../chunk-WHS6Y55E.js";import"../chunk-K56YDHYQ.js";import"../chunk-ZEH6QLBH.js";import"../chunk-AGWKB77Q.js";import"../chunk-ZKY45F5G.js";import"../chunk-FIVU2COQ.js";import"../chunk-P5VYGWYO.js";import"../chunk-WK3AFPXY.js";import"../chunk-RPMSET77.js";import"../chunk-FM6JO4WF.js";import"../chunk-KFV7N2DJ.js";import"../chunk-NDRZP6YR.js";import"../chunk-H6DDIBQ4.js";import"../chunk-WYTPBF3Q.js";import"../chunk-MJM6SFD3.js";import"../chunk-AJSDWWJW.js";import"../chunk-2OAZYSWJ.js";import"../chunk-THWO5YVZ.js";import"../chunk-RE4LP46F.js";import"../chunk-HZSZT3BE.js";import"../chunk-KRL3IUV3.js";import"../chunk-Y2T3JX7K.js";import"../chunk-KFWNGPW3.js";import"../chunk-JACEEVVF.js";import"../chunk-CZAAGBVL.js";import"../chunk-MFIRYGHW.js";import"../chunk-LN43DP2A.js";import"../chunk-TQ5Y6S2X.js";import"../chunk-6NJHYXJM.js";import"../chunk-P2VEMZH5.js";import"../chunk-YU3WHLGI.js";import"../chunk-LF3FUSCQ.js";import"../chunk-TGZCD6IP.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{NO_BRIDGED_CAPABILITIES,applyAuthGrant,useAdminBridge}from"../../chunk-BIK3AO2V.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-MQA7OFRA.js";
1
+ export{NO_BRIDGED_CAPABILITIES,applyAuthGrant,useAdminBridge}from"../../chunk-NQW6XCAY.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-LX23TCTP.js";
@@ -0,0 +1,389 @@
1
+ import * as react from 'react';
2
+ import { ReactElement, ReactNode } from 'react';
3
+ import { ShowWhenRule } from 'efficient-shell/format';
4
+ import { PositionValue, SidesValue } from 'efficient-shell/ui';
5
+ export { F as FIELD_DESCRIPTION_MARKER, o as describedAs } from '../../../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
+ /** A host's word for an English word or row label a builder draws. */
27
+ type BoxFieldSay = (english: string) => string;
28
+ /** A choice's option, as a builder is given it and as it rides the field. */
29
+ interface SelectOption {
30
+ value: string;
31
+ label: string;
32
+ }
33
+ /** What a {@link select} carries ON THE FIELD OBJECT, not in its closure: the
34
+ * editor memoises a custom field's render on its type alone, so live data must
35
+ * ride the field, which is passed in fresh on every call. */
36
+ type SelectData = {
37
+ options: readonly SelectOption[];
38
+ fallback: string;
39
+ /** The caveat line at the top of the open list, if any — on the field so a
40
+ * guard can read it: a closed dropdown's markup has no list. */
41
+ note?: string;
42
+ };
43
+ /** What a row's render is called with. `field` is the CURRENT field object. */
44
+ type BoxFieldRenderProps<V> = {
45
+ value: V;
46
+ onChange: (v: V) => void;
47
+ field: {
48
+ label?: string;
49
+ /** A per-node display value a host's resolver hangs on the field, for a
50
+ * node that has not stored this field yet. */
51
+ currentValue?: string;
52
+ } & Partial<SelectData>;
53
+ /**
54
+ * The value AS STORED, when the caller has already replaced `value` with a
55
+ * RESOLVED one for display ({@link gapField}). The action slot answers "does
56
+ * this node store its own" and must see the stored value. Tested by KEY, not
57
+ * by value: a node that stores nothing holds `undefined`.
58
+ */
59
+ storedValue?: unknown;
60
+ id?: string;
61
+ name?: string;
62
+ };
63
+ /** One row of the set: a custom field, drawn by its own render. */
64
+ type BoxField<V> = {
65
+ type: 'custom';
66
+ render: (props: BoxFieldRenderProps<V>) => ReactElement;
67
+ /** When the row is shown — the shell's ONE rule. Absent: always shown. */
68
+ showWhen?: ShowWhenRule;
69
+ };
70
+ /** A {@link select} field: its options and fallback ride the field object. */
71
+ type SelectField = BoxField<string> & SelectData;
72
+ declare function noGlyph(reason: string): ReactElement;
73
+ /** Whether a builder's `icon` is the {@link noGlyph} marker. */
74
+ declare function isNoGlyph(icon: ReactElement): boolean;
75
+ /** What a row passes to `SettingsField`'s `icon`: the glyph, or nothing. */
76
+ declare function iconOf(icon: ReactElement): ReactElement | undefined;
77
+ /** Every row of `fields` but the headings copies and pastes as a SECTION
78
+ * setting of its own key (`section:<key>`), so a Box's style pastes onto
79
+ * another Box. */
80
+ declare function sharedStyleKinds<T extends Record<string, unknown>>(fields: T): T;
81
+ /** A group heading — a folding band. */
82
+ declare function group(label: string): BoxField<undefined>;
83
+ /** A level-1 heading over several {@link group}s. */
84
+ declare function section(label: string): BoxField<undefined>;
85
+ /** How a Box spreads its blocks along the direction they run. */
86
+ declare const BOX_JUSTIFY_POINTS: readonly [{
87
+ readonly label: "Start";
88
+ readonly value: "start";
89
+ }, {
90
+ readonly label: "Center";
91
+ readonly value: "center";
92
+ }, {
93
+ readonly label: "Space between";
94
+ readonly value: "between";
95
+ }, {
96
+ readonly label: "End";
97
+ readonly value: "end";
98
+ }];
99
+ /** …and across it. Four, not five: `Space between` means nothing on a cross
100
+ * axis that holds one line. */
101
+ declare const BOX_ALIGN_POINTS: readonly [{
102
+ readonly label: "Start";
103
+ readonly value: "start";
104
+ }, {
105
+ readonly label: "Center";
106
+ readonly value: "center";
107
+ }, {
108
+ readonly label: "End";
109
+ readonly value: "end";
110
+ }, {
111
+ readonly label: "Stretch";
112
+ readonly value: "stretch";
113
+ }];
114
+ declare const BOX_WRAP_LABEL = "Wrap";
115
+ declare const BOX_WRAP_POINTS: readonly [{
116
+ readonly label: "Wrap";
117
+ readonly value: "wrap";
118
+ }, {
119
+ readonly label: "No wrap";
120
+ readonly value: "nowrap";
121
+ }];
122
+ type BoxJustify = (typeof BOX_JUSTIFY_POINTS)[number]['value'];
123
+ type BoxAlign = (typeof BOX_ALIGN_POINTS)[number]['value'];
124
+ type BoxWrap = (typeof BOX_WRAP_POINTS)[number]['value'];
125
+ declare const BOX_DIRECTION_LABEL = "Direction";
126
+ /** The Hero Box's directions: stacked, or one row. */
127
+ declare const BOX_DIRECTIONS: readonly [{
128
+ readonly label: "Stacked";
129
+ readonly value: "column";
130
+ }, {
131
+ readonly label: "One row";
132
+ readonly value: "row";
133
+ }];
134
+ /** The Hero Box's gap: the range every container's Gap row shares, and the
135
+ * Box's built-in (a Box is spaced by its blocks' own padding). */
136
+ declare const BOX_GAP: {
137
+ readonly min: -32;
138
+ readonly max: 64;
139
+ readonly step: 2;
140
+ readonly builtIn: 0;
141
+ };
142
+ /** The Hero Box's Width: a % of what the Box sits on. */
143
+ declare const BOX_WIDTH: {
144
+ readonly min: 30;
145
+ readonly max: 100;
146
+ readonly step: 5;
147
+ readonly fallback: 60;
148
+ };
149
+ /** The nine anchors, in reading order. */
150
+ declare const BOX_PLACEMENTS: readonly ["top-left", "top-center", "top-right", "left", "center", "right", "bottom-left", "bottom-center", "bottom-right"];
151
+ type BoxPlacement = (typeof BOX_PLACEMENTS)[number];
152
+ /** Where an absent stored value puts a Box: where the copy already sits. */
153
+ declare const BOX_PLACEMENT_DEFAULT: BoxPlacement;
154
+ /** What each anchor is CALLED in the panel. */
155
+ declare const BOX_PLACEMENT_LABELS: Readonly<Record<BoxPlacement, string>>;
156
+ /** One square of the grid: shut, with the reason, when it cannot be picked. */
157
+ type PlacementPoint = {
158
+ value: string;
159
+ label: string;
160
+ disabled?: boolean;
161
+ title?: string;
162
+ };
163
+ /** The nine squares with nothing shut. */
164
+ declare const OPEN_PLACEMENT_POINTS: readonly PlacementPoint[];
165
+ /** An unknown stored value read back as one of the nine. */
166
+ declare function normaliseBoxPlacement(value: unknown, fallback?: BoxPlacement): BoxPlacement;
167
+ /** The Hero Box's nudge: fine adjustment only, ±40px, which cannot move a Box
168
+ * off its anchor. */
169
+ declare const BOX_NUDGE_LIMIT = 40;
170
+ type PositionKeys = {
171
+ x: string;
172
+ y: string;
173
+ };
174
+ /** The props one edit of the row writes: only the axis that changed, to its
175
+ * number or to `undefined` (cleared: the prop goes away). */
176
+ declare function positionPatch(keys: PositionKeys, before: PositionValue, next: PositionValue): Record<string, number | undefined>;
177
+ type PadSide = 'top' | 'right' | 'bottom' | 'left';
178
+ /** The four stored keys of a node's own padding. */
179
+ declare const SIDE_PAD_KEYS: Record<PadSide, string>;
180
+ /** The props one edit of the row writes: only the sides that changed, each to
181
+ * its number or to `undefined` (cleared: the side follows again). */
182
+ declare function sidesPaddingPatch(keys: Record<PadSide, string>, before: SidesValue, next: SidesValue): Record<string, number | undefined>;
183
+ /** What {@link directionField} is told: the directions this container offers,
184
+ * in the order the strip draws them, and the one an absent value means. */
185
+ interface DirectionFieldOptions<V extends string = string> {
186
+ offered: readonly {
187
+ label: string;
188
+ value: V;
189
+ }[];
190
+ fallback: V;
191
+ /** A stored value read back as one of `offered` (default: an offered value
192
+ * is itself, anything else is `fallback`). */
193
+ resolve?: (stored: unknown) => V;
194
+ }
195
+ /** What {@link gapField} is told. */
196
+ interface GapFieldOptions {
197
+ min: number;
198
+ max: number;
199
+ step: number;
200
+ /** The px an absent value draws. */
201
+ builtIn: number;
202
+ /** The px the row SHOWS for a stored value (default: a number is itself,
203
+ * anything else is `builtIn`). Display only: it never writes. It is given
204
+ * the CURRENT field, so it reads what a host stamped there (web-builder's
205
+ * site gap, `siteGap`). */
206
+ resolve?: (stored: unknown, field: BoxFieldRenderProps<unknown>['field']) => number;
207
+ /** The label line's mark, as a function of the STORED value. */
208
+ action?: (stored: unknown, onChange: (v: unknown) => void) => ReactNode;
209
+ /** Keys a host puts ON THE FIELD OBJECT to find the row by (web-builder's
210
+ * `GAP_FIELD_CONTAINER`, which its site-gap pass looks for). */
211
+ mark?: Readonly<Record<string, unknown>>;
212
+ }
213
+ /** How {@link placementField} differs between its callers. */
214
+ interface PlacementFieldOptions {
215
+ /** Which anchor an ABSENT stored value means. */
216
+ fallback?: BoxPlacement;
217
+ /**
218
+ * The nine squares for the node being edited, from the open document — for a
219
+ * host whose boxes STACK on an anchor, so an anchor can be full (the website
220
+ * Hero: four). The grid then shuts a full square and says why underneath.
221
+ * Left out, nothing can fill up and the nine are open.
222
+ */
223
+ pointsFor?: (data: unknown, id: string | undefined) => readonly PlacementPoint[];
224
+ }
225
+ /** What {@link positionFields} is told: the two stored keys and the range. */
226
+ type PositionOptions = {
227
+ keys: PositionKeys;
228
+ min: number;
229
+ max: number;
230
+ step?: number;
231
+ /** The row's word (default `Position`). `null`: no row of its own — the two
232
+ * boxes sit straight in the band, whose own word already says Position
233
+ * (Lewis 2026-10-21, the website Hero Box). */
234
+ label?: string | null;
235
+ };
236
+ /** What {@link sidesPaddingFields} is told: the keys, what an empty side means, the grid. */
237
+ type SidesPaddingOptions = {
238
+ /** The four stored keys (default {@link SIDE_PAD_KEYS}). The phone twins are `phoneKey(key)`. */
239
+ keys?: Partial<Record<PadSide, string>>;
240
+ /** Give the row a phone twin (shown in phone view only). Default true. */
241
+ phone?: boolean;
242
+ /** What an EMPTY side draws, per side, shown in grey (default 0). */
243
+ fallback?: Partial<Record<PadSide, number>>;
244
+ /** The `Padding` group head before the row (default true). */
245
+ group?: boolean;
246
+ min?: number;
247
+ max?: number;
248
+ step?: number;
249
+ };
250
+ /** What a flex row is told about the Box it sits in. */
251
+ interface BoxFlexRowOptions {
252
+ /** The key the Box stores its Direction under (default `direction`). */
253
+ directionKey?: string;
254
+ /** How the stored Direction runs: `row` (One row) or `column` (Stacked).
255
+ * Default: `row` is One row, anything else (nothing stored included) is
256
+ * Stacked, the Box set's own fallback. */
257
+ runs?: (direction: unknown) => 'row' | 'column';
258
+ }
259
+ /** What a host tells {@link boxFieldSet}. Everything left out is the website
260
+ * Hero Box's. */
261
+ interface BoxFieldSetOptions {
262
+ placement?: PlacementFieldOptions;
263
+ width?: {
264
+ min: number;
265
+ max: number;
266
+ step: number;
267
+ fallback: number;
268
+ };
269
+ direction?: DirectionFieldOptions;
270
+ gap?: GapFieldOptions;
271
+ nudge?: {
272
+ keys?: PositionKeys;
273
+ limit?: number;
274
+ };
275
+ padding?: SidesPaddingOptions;
276
+ }
277
+ /**
278
+ * The segmented strip: easel's `SettingsSegmented`, with an option's `value`
279
+ * as the strip's `id`. An option that IS a shape passes its `picture`, and the
280
+ * strip shows the glyph alone, named by its word.
281
+ */
282
+ declare function segmentedStrip<V>(say: BoxFieldSay, { options, value, onChange, ariaLabel, disabled, }: {
283
+ options: readonly {
284
+ label: string;
285
+ value: V;
286
+ title?: string;
287
+ picture?: ReactElement;
288
+ }[];
289
+ /** Current selection (already resolved to a concrete option value). */
290
+ value: V;
291
+ onChange: (next: V) => void;
292
+ /** What the strip is CALLED. Required: a strip of pressed buttons with no
293
+ * name is a set a screen reader cannot introduce. */
294
+ ariaLabel: string;
295
+ disabled?: boolean;
296
+ }): react.JSX.Element;
297
+ /**
298
+ * The Placement grid's DRAWING: efficient-shell's `AlignmentGrid` in a row. The
299
+ * sentence under the grid says why a square is shut — a closed square explains
300
+ * itself only on hover otherwise. The glyph is `placement`: WHERE a thing sits
301
+ * in two dimensions (not `v-align`, which is one).
302
+ */
303
+ declare function placementGridView(say: BoxFieldSay, { label, value, onChange, points, }: {
304
+ label: string;
305
+ value: string;
306
+ onChange: (next: string) => void;
307
+ points: readonly PlacementPoint[];
308
+ }): react.JSX.Element;
309
+ /**
310
+ * Every builder, speaking the host's words: `say` answers the host's word for
311
+ * each English word a row draws. Bind it ONCE, where the host's controls are
312
+ * declared (`const { slider, select, … } = boxFieldBuilders(say)`); the
313
+ * builders exported below are this with no `say`, in English.
314
+ */
315
+ declare function boxFieldBuilders(say?: BoxFieldSay): {
316
+ slider: (label: string, icon: ReactElement, min: number, max: number, step: number, fallback: number, suffix?: string, action?: (value: unknown, onChange: (v: unknown) => void) => ReactNode) => BoxField<number>;
317
+ select: (label: string, icon: ReactElement, options: readonly SelectOption[], fallback: string, note?: string) => SelectField;
318
+ Segmented: <V = string>(props: Parameters<typeof segmentedStrip<V>>[1]) => react.JSX.Element;
319
+ segmented: {
320
+ (label: string, icon: ReactElement, options: (string | {
321
+ label: string;
322
+ value: string;
323
+ picture?: ReactElement;
324
+ })[], fallback: string): BoxField<string>;
325
+ <V>(label: string, icon: ReactElement, options: {
326
+ label: string;
327
+ value: V;
328
+ picture?: ReactElement;
329
+ }[], fallback: V): BoxField<V>;
330
+ };
331
+ boxJustifyField: (o?: BoxFlexRowOptions) => SelectField;
332
+ boxAlignField: (o?: BoxFlexRowOptions) => SelectField;
333
+ boxWrapField: () => SelectField;
334
+ directionField: <V extends string>({ offered, fallback, resolve }: DirectionFieldOptions<V>) => BoxField<string>;
335
+ gapField: ({ min, max, step, builtIn, resolve, action, mark }: GapFieldOptions) => BoxField<number | string>;
336
+ placementField: (label: string, { fallback, pointsFor }?: PlacementFieldOptions) => BoxField<string>;
337
+ PlacementGridView: (props: Parameters<typeof placementGridView>[1]) => react.JSX.Element;
338
+ positionFields: (o: PositionOptions) => Record<string, BoxField<number>>;
339
+ sidesPaddingFields: (opts?: SidesPaddingOptions) => Record<string, BoxField<undefined> | BoxField<number>>;
340
+ boxFieldSet: (opts?: BoxFieldSetOptions) => {
341
+ _gLayout: BoxField<undefined>;
342
+ placement: BoxField<string>;
343
+ width: BoxField<number>;
344
+ direction: BoxField<string>;
345
+ gap: BoxField<string | number>;
346
+ justify: SelectField;
347
+ align: SelectField;
348
+ wrap: SelectField;
349
+ _gNudge: BoxField<undefined>;
350
+ };
351
+ };
352
+ /** The builders in English (no host's `say`). */
353
+ declare const slider: (label: string, icon: ReactElement, min: number, max: number, step: number, fallback: number, suffix?: string, action?: (value: unknown, onChange: (v: unknown) => void) => ReactNode) => BoxField<number>;
354
+ declare const select: (label: string, icon: ReactElement, options: readonly SelectOption[], fallback: string, note?: string) => SelectField;
355
+ declare const Segmented: <V = string>(props: Parameters<typeof segmentedStrip<V>>[1]) => react.JSX.Element;
356
+ declare const segmented: {
357
+ (label: string, icon: ReactElement, options: (string | {
358
+ label: string;
359
+ value: string;
360
+ picture?: ReactElement;
361
+ })[], fallback: string): BoxField<string>;
362
+ <V>(label: string, icon: ReactElement, options: {
363
+ label: string;
364
+ value: V;
365
+ picture?: ReactElement;
366
+ }[], fallback: V): BoxField<V>;
367
+ };
368
+ declare const boxJustifyField: (o?: BoxFlexRowOptions) => SelectField;
369
+ declare const boxAlignField: (o?: BoxFlexRowOptions) => SelectField;
370
+ declare const boxWrapField: () => SelectField;
371
+ declare const directionField: <V extends string>({ offered, fallback, resolve }: DirectionFieldOptions<V>) => BoxField<string>;
372
+ declare const gapField: ({ min, max, step, builtIn, resolve, action, mark }: GapFieldOptions) => BoxField<number | string>;
373
+ declare const placementField: (label: string, { fallback, pointsFor }?: PlacementFieldOptions) => BoxField<string>;
374
+ declare const PlacementGridView: (props: Parameters<typeof placementGridView>[1]) => react.JSX.Element;
375
+ declare const positionFields: (o: PositionOptions) => Record<string, BoxField<number>>;
376
+ declare const sidesPaddingFields: (opts?: SidesPaddingOptions) => Record<string, BoxField<undefined> | BoxField<number>>;
377
+ declare const boxFieldSet: (opts?: BoxFieldSetOptions) => {
378
+ _gLayout: BoxField<undefined>;
379
+ placement: BoxField<string>;
380
+ width: BoxField<number>;
381
+ direction: BoxField<string>;
382
+ gap: BoxField<string | number>;
383
+ justify: SelectField;
384
+ align: SelectField;
385
+ wrap: SelectField;
386
+ _gNudge: BoxField<undefined>;
387
+ };
388
+
389
+ export { BOX_ALIGN_POINTS, BOX_DIRECTIONS, BOX_DIRECTION_LABEL, BOX_GAP, BOX_JUSTIFY_POINTS, BOX_NUDGE_LIMIT, BOX_PLACEMENTS, BOX_PLACEMENT_DEFAULT, BOX_PLACEMENT_LABELS, BOX_WIDTH, BOX_WRAP_LABEL, BOX_WRAP_POINTS, 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, type PlacementFieldOptions, PlacementGridView, type PlacementPoint, type PositionOptions, SIDE_PAD_KEYS, Segmented, type SelectField, type SelectOption, type SidesPaddingOptions, boxAlignField, boxFieldBuilders, boxFieldSet, boxJustifyField, boxWrapField, directionField, gapField, group, iconOf, isNoGlyph, noGlyph, normaliseBoxPlacement, placementField, positionFields, positionPatch, section, segmented, select, sharedStyleKinds, sidesPaddingFields, sidesPaddingPatch, slider };
@@ -0,0 +1,9 @@
1
+ import{deviceField as e}from"../../../chunk-2FYFAAAK.js";import{noControlField as t,NoControlMark as n}from"../../../chunk-22I55W37.js";import{describedAs as o}from"../../../chunk-LX23TCTP.js";export{FIELD_DESCRIPTION_MARKER,describedAs}from"../../../chunk-LX23TCTP.js";import"../../../chunk-IYHO4XQX.js";import{withStyleKind as l}from"../../../chunk-V7U33NF2.js";import"../../../chunk-6WY6ZXJG.js";import{phoneKey as a}from"../../../chunk-E52W3M5I.js";import{foldMetaOf as i,FOLD_FIELD_MARKER as r}from"../../../chunk-ANPOR6EY.js";import{useEasel as s,useSelectedFields as u}from"../../../chunk-VBOSOH5M.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-AGWKB77Q.js";import"../../../chunk-RPMSET77.js";import{SettingsDefaultReset as c,sidesStartEach as d,SidesInput as p,SidesEachToggle as m}from"../../../chunk-TOHOGVAE.js";import"../../../chunk-FM6JO4WF.js";import{DEFAULT_PANEL_WORDS as b}from"../../../chunk-KFV7N2DJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-KRL3IUV3.js";import{FieldSelect as f}from"../../../chunk-KFWNGPW3.js";import"../../../chunk-JACEEVVF.js";import{SettingsSwitch as h}from"../../../chunk-OECWLNKJ.js";import{SettingsField as g,SettingsSegmented as v}from"../../../chunk-CZAAGBVL.js";import{useWords as y}from"../../../chunk-MFIRYGHW.js";import"../../../chunk-YU3WHLGI.js";import"../../../chunk-LF3FUSCQ.js";import"../../../chunk-TGZCD6IP.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";import{useState as k}from"react";import{BoxJustifyIcon as C,WrapIcon as j,GapIcon as x,WidthIcon as F,PlacementIcon as w,NudgeIcon as P,PaddingAllIcon as S,BoxYBetweenIcon as E,BoxYStretchIcon as L,BoxYEndIcon as O,BoxYCenterIcon as I,BoxYStartIcon as T,BoxXBetweenIcon as W,BoxXStretchIcon as A,BoxXEndIcon as B,BoxXCenterIcon as G,BoxXStartIcon as K,BoxItemAlignmentIcon as R}from"efficient-shell/icons/efficient";import{Slider as V,AlignmentGrid as N,PositionInput as M}from"efficient-shell/ui";import{jsx as Y,Fragment as D,jsxs as J}from"react/jsx-runtime";var X=e=>e;function H(){return null}function Z(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");/* @__PURE__ */
2
+ return Y(H,{},e)}function U(e){return e.type===H}function _(e){return U(e)?void 0:e}function z(e){for(const[t,n]of Object.entries(e))n&&"object"==typeof n&&!i(n)&&l(n,`section:${t}`);return e}function Q(e,t){return{type:"custom",[r]:{label:e,level:t},marker:!0,fold:e,render:()=>/* @__PURE__ */Y(D,{})}}function $(e){return Q(e,2)}function q(e){return Q(e,1)}var ee=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Space between",value:"between"},{label:"End",value:"end"}],te=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"End",value:"end"},{label:"Stretch",value:"stretch"}],ne="Wrap",oe=[{label:"Wrap",value:"wrap"},{label:"No wrap",value:"nowrap"}],le="Direction",ae=[{label:"Stacked",value:"column"},{label:"One row",value:"row"}],ie={min:-32,max:64,step:2,builtIn:0},re={min:30,max:100,step:5,fallback:60},se=["top-left","top-center","top-right","left","center","right","bottom-left","bottom-center","bottom-right"],ue="bottom-left",ce={"top-left":"Top left","top-center":"Top center","top-right":"Top right",left:"Left",center:"Center",right:"Right","bottom-left":"Bottom left","bottom-center":"Bottom center","bottom-right":"Bottom right"},de=se.map(e=>({value:e,label:ce[e]}));function pe(e,t=ue){return se.includes(e)?e:t}var me=40,be=e=>"number"==typeof e?e:null;function fe(e,t,n){const o={};for(const l of["x","y"])n[l]!==t[l]&&(o[e[l]]=n[l]??void 0);return o}var he=["top","right","bottom","left"],ge={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},ve=e=>"number"==typeof e?e:null;function ye(e,t,n){const o={};for(const l of he)n[l]!==t[l]&&(o[e[l]]=n[l]??void 0);return o}function ke(e,{options:t,value:n,onChange:o,ariaLabel:l,disabled:a=!1}){/* @__PURE__ */
3
+ return Y(v,{options:t.map(t=>t.picture?{id:t.value,label:t.picture,title:e(t.title??t.label)}:{id:t.value,label:e(t.label),title:void 0===t.title?void 0:e(t.title)}),value:n,onChange:o,ariaLabel:e(l),disabled:a})}function Ce(e,{label:t,value:n,onChange:o,points:l}){const a=l.find(e=>e.disabled),i=l.map(t=>({...t,label:e(t.label),...t.title?{title:e(t.title)}:null}));/* @__PURE__ */
4
+ return Y(g,{label:e(t),icon:/* @__PURE__ */Y(w,{}),hint:a?.title?e(a.title):void 0,children:/* @__PURE__ */Y(N,{label:e(t),value:n,points:i,onChange:o})})}function je({say:e,label:t,value:n,onChange:o,pointsFor:l}){const{appState:a,selectedItem:i}=s(e=>e),r=i?.props?.id?String(i.props.id):void 0;return Ce(e,{label:t,value:n,onChange:o,points:l(a?.data,r)})}function xe(){try{return u()}catch{return null}}function Fe({say:e,o:t}){const n=xe(),o=y("panel",b),l=n?.values??{},a={x:be(l[t.keys.x]),y:be(l[t.keys.y])},i=e(t.label??"Position"),r=Boolean(a.x||a.y),s=e=>{const o=fe(t.keys,a,e);Object.keys(o).length&&n?.onChangeMany(o)},u=/* @__PURE__ */Y(M,{label:i,value:a,onChange:s,words:{x:e("Left and right"),y:e("Up and down"),unit:"px"},placeholder:{x:"0",y:"0"},min:t.min,max:t.max,step:t.step??1}),d=/* @__PURE__ */Y(c,{words:o,label:i,changed:r,detail:"0 px, 0 px",onReset:()=>s({x:null,y:null})});return null===t.label?/* @__PURE__ */J("div",{className:"sf-position-line",children:[u,d]}):/* @__PURE__ */Y(g,{label:i,icon:/* @__PURE__ */Y(P,{}),changed:r,action:d,children:u})}var we={x:{start:/* @__PURE__ */Y(K,{}),center:/* @__PURE__ */Y(G,{}),end:/* @__PURE__ */Y(B,{}),stretch:/* @__PURE__ */Y(A,{}),between:/* @__PURE__ */Y(W,{})},y:{start:/* @__PURE__ */Y(T,{}),center:/* @__PURE__ */Y(I,{}),end:/* @__PURE__ */Y(O,{}),stretch:/* @__PURE__ */Y(L,{}),between:/* @__PURE__ */Y(E,{})}},Pe=e=>"row"===e?"row":"column";function Se({say:e,kind:t,label:n,options:o,value:l,onChange:a,o:i}){const r=xe(),s="justify"===t==("row"===(i.runs??Pe)(r?.values?.[i.directionKey??"direction"]))?"x":"y";return ke(e,{options:o.map(e=>({label:e.label,value:e.value,picture:we[s][e.value]})),value:l,onChange:a,ariaLabel:n})}function Ee({say:e,tier:t,o:n}){const o=xe(),l=o?.values??{},a="mobile"===t?n.phoneKeys:n.keys,i=Object.fromEntries(he.map(e=>[e,ve(l[a[e]])])),r=Object.fromEntries(he.map(e=>[e,String("mobile"===t?ve(l[n.keys[e]])??n.fallback[e]:n.fallback[e])])),[s,u]=k(()=>d(i,r));/* @__PURE__ */
5
+ return Y(g,{label:e("Padding"),icon:/* @__PURE__ */Y(S,{}),action:/* @__PURE__ */Y(m,{each:s,label:e("Each side"),onChange:u}),children:/* @__PURE__ */Y(p,{label:e("Padding"),each:s,value:i,placeholder:r,min:n.min,max:n.max,step:n.step,onChange:e=>{const t=ye(a,i,e);Object.keys(t).length&&o?.onChangeMany(t)},words:{sides:{top:e("Padding top"),right:e("Padding right"),bottom:e("Padding bottom"),left:e("Padding left")},vertical:e("Top and bottom"),horizontal:e("Left and right"),unit:"px"}})})}function Le(l=X){function i(e,t,n,a,i,r,s="",u){return{type:"custom",...o({},{type:"number",label:e}),render:o=>{const c="number"==typeof o.value?o.value:r;/* @__PURE__ */
6
+ return Y(g,{label:l(e),icon:_(t),action:u?u("storedValue"in o?o.storedValue:o.value,o.onChange):void 0,children:/* @__PURE__ */Y("div",{className:"sf-slider",children:/* @__PURE__ */Y(V,{min:n,max:a,step:i,value:c,suffix:s||void 0,showInput:!0,label:l(e),disabled:!1,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:e=>{null!==e&&e!==c&&o.onChange(e)}})})})}}}function r(e){return ke(l,e)}function s(e,t,n,a){const i=n.map(e=>"string"==typeof e?{label:e,value:e}:e);return{type:"custom",...o({},{type:"radio",label:e,options:i.map(e=>({value:e.value,label:e.label}))}),render:({value:n,onChange:o,field:s})=>/* @__PURE__ */Y(g,{label:l(e),icon:_(t),children:r({options:i,value:i.some(e=>e.value===n)?n:n||s?.currentValue||a,onChange:o,ariaLabel:e})})}}function u(e,t,n,a,i,r){return{type:"custom",options:a,fallback:i,...o({},{type:"radio",label:t,options:a.map(e=>({value:e.value,label:e.label}))}),render:({value:o,onChange:s,field:u})=>{const c=u.options??a,d=u.fallback??i,p=c.some(e=>e.value===o)?o:d;/* @__PURE__ */
7
+ return Y(g,{label:l(t),icon:_(n),children:/* @__PURE__ */Y(Se,{say:l,kind:e,label:t,options:c,value:p,onChange:s,o:r})})}}}function c(e={}){return u("justify","Justify",/* @__PURE__ */Y(C,{}),ee,ee[0].value,e)}function d(e={}){return u("align","Item alignment",/* @__PURE__ */Y(R,{}),te,"stretch",e)}function p(){const e=ne;return{type:"custom",options:oe,fallback:oe[1].value,...o({},{type:"radio",label:e,options:oe.map(e=>({value:e.value,label:e.label}))}),render:({value:t,onChange:n,id:o,name:a})=>{const i=`${o??a??e}-label`;/* @__PURE__ */
8
+ return Y(g,{label:l(e),labelId:i,icon:/* @__PURE__ */Y(j,{}),action:/* @__PURE__ */Y(h,{checked:(r=t,!0===r||"wrap"===r),onChange:e=>n(e?oe[0].value:oe[1].value),ariaLabelledBy:i})});var r}}}function m({offered:e,fallback:t,resolve:n}){const o=n??(n=>e.some(e=>e.value===n)?n:t),l=s(le,Z("`Direction` names how a container’s children run — a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; the shell’s own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),e.map(e=>({label:e.label,value:e.value})),o(void 0));return{type:"custom",render:e=>l.render({...e,value:o(e.value),onChange:t=>e.onChange(t)})}}function b({min:e,max:t,step:n,builtIn:o,resolve:l,action:a,mark:r}){const s=i("Gap",/* @__PURE__ */Y(x,{}),e,t,n,o,"px",a),u=l??(e=>"number"==typeof e?e:o);return{...r,type:"custom",render:e=>s.render({...e,value:u(e.value,e.field),storedValue:e.value,onChange:t=>e.onChange(t)})}}function v(e,{fallback:t=ue,pointsFor:n}={}){return{type:"custom",render:({value:o,onChange:a})=>{const i=pe(o,t);return n?/* @__PURE__ */Y(je,{say:l,label:e,value:i,onChange:a,pointsFor:n}):Ce(l,{label:e,value:i,onChange:a,points:de})}}}function y(e){return{[e.keys.x]:{type:"custom",render:()=>/* @__PURE__ */Y(Fe,{say:l,o:e})},[e.keys.y]:{...t({type:"custom",render:()=>/* @__PURE__ */Y(n,{})},"always"),reachedBy:e.keys.x}}}function k(o={}){const i={...ge,...o.keys},r={keys:i,phoneKeys:Object.fromEntries(he.map(e=>[e,a(i[e])])),fallback:{top:0,right:0,bottom:0,left:0,...o.fallback},min:o.min??0,max:o.max??200,step:o.step??4},s=!1!==o.phone,u=t=>{const n={type:"custom",render:()=>/* @__PURE__ */Y(Ee,{say:l,tier:t,o:r})};return s?e(t,n):n},c=()=>t({type:"custom",render:()=>/* @__PURE__ */Y(n,{})},"always"),d=he.filter(e=>"top"!==e);return z({...!1===o.group?{}:{_gSpacing:$("Padding")},[r.keys.top]:u("desktop"),...s?{[r.phoneKeys.top]:u("mobile")}:{},...Object.fromEntries(d.map(e=>[r.keys[e],{...c(),reachedBy:r.keys.top}])),...s?Object.fromEntries(d.map(t=>[r.phoneKeys[t],e("mobile",c())])):{}})}return{slider:i,select:function(e,t,n,a,i){return{type:"custom",options:n,fallback:a,...i?{note:i}:{},...o({},{type:"select",label:e}),render:({value:o,onChange:r,field:s})=>{const u=s.options??n,c=s.fallback??a,d=u.some(e=>e.value===o)?o:c;/* @__PURE__ */
9
+ return Y(g,{label:l(e),icon:_(t),children:/* @__PURE__ */Y(f,{value:d,ariaLabel:l(e),onChange:r,options:[...i?[{label:l(i),value:"\0note",disabled:!0}]:[],...u.map(e=>({label:l(e.label),value:e.value}))]})})}}},Segmented:r,segmented:s,boxJustifyField:c,boxAlignField:d,boxWrapField:p,directionField:m,gapField:b,placementField:v,PlacementGridView:function(e){return Ce(l,e)},positionFields:y,sidesPaddingFields:k,boxFieldSet:function(e={}){const t=e.width??re,n=e.nudge?.limit??40,o=e.direction??{offered:ae,fallback:"column"},l=o.resolve??(e=>o.offered.some(t=>t.value===e)?e:o.fallback),a={runs:e=>"row"===l(e)?"row":"column"};return{_gLayout:$("Layout"),placement:v("Placement",e.placement),width:i("Width",/* @__PURE__ */Y(F,{}),t.min,t.max,t.step,t.fallback,"%"),direction:m(o),gap:b(e.gap??ie),justify:c(a),align:d(a),wrap:p(),_gNudge:$("Nudge"),...y({keys:e.nudge?.keys??{x:"nudgeX",y:"nudgeY"},min:-n,max:n,label:null}),...k(e.padding)}}}}var{slider:Oe,select:Ie,Segmented:Te,segmented:We,boxJustifyField:Ae,boxAlignField:Be,boxWrapField:Ge,directionField:Ke,gapField:Re,placementField:Ve,PlacementGridView:Ne,positionFields:Me,sidesPaddingFields:Ye,boxFieldSet:De}=Le();export{te as BOX_ALIGN_POINTS,ae as BOX_DIRECTIONS,le as BOX_DIRECTION_LABEL,ie as BOX_GAP,ee as BOX_JUSTIFY_POINTS,me as BOX_NUDGE_LIMIT,se as BOX_PLACEMENTS,ue as BOX_PLACEMENT_DEFAULT,ce as BOX_PLACEMENT_LABELS,re as BOX_WIDTH,ne as BOX_WRAP_LABEL,oe as BOX_WRAP_POINTS,de as OPEN_PLACEMENT_POINTS,Ne as PlacementGridView,ge as SIDE_PAD_KEYS,Te as Segmented,Be as boxAlignField,Le as boxFieldBuilders,De as boxFieldSet,Ae as boxJustifyField,Ge as boxWrapField,Ke as directionField,Re as gapField,$ as group,_ as iconOf,U as isNoGlyph,Z as noGlyph,pe as normaliseBoxPlacement,Ve as placementField,Me as positionFields,fe as positionPatch,q as section,We as segmented,Ie as select,z as sharedStyleKinds,Ye as sidesPaddingFields,ye as sidesPaddingPatch,Oe as slider};
@@ -1 +1 @@
1
- export{rootRowName,sectionRenameProp,slotChildName,slotChildRenameProp,slotChildRowName}from"../../../chunk-SSRYU3YG.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-6UAEFOJ4.js";
1
+ export{rootRowName,sectionRenameProp,slotChildName,slotChildRenameProp,slotChildRowName}from"../../../chunk-5NHQ452C.js";import"../../../chunk-6UAEFOJ4.js";import"../../../chunk-ANPOR6EY.js";
@@ -27,7 +27,7 @@ import '../section-template-types.js';
27
27
  import './content-tree.js';
28
28
  import '../shared-section-types.js';
29
29
  import './block-choice.js';
30
- import '../../../ScreenDocumentContext-BDLUYzlM.js';
30
+ import '../../../ScreenDocumentContext-DPW_6gOC.js';
31
31
  import '../document-contract.js';
32
32
  import '../document-switch.js';
33
33
  import '../../../engine-CvXpFE86.js';
@@ -1 +1 @@
1
- export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-DSKNJXB4.js";import"../../../chunk-5XL2RXFU.js";import"../../../chunk-2FYFAAAK.js";import"../../../chunk-22I55W37.js";import"../../../chunk-3QB2ZQXK.js";import"../../../chunk-V7U33NF2.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-IYHO4XQX.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-BSPCSC45.js";
1
+ export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-DSKNJXB4.js";import"../../../chunk-5XL2RXFU.js";import"../../../chunk-2FYFAAAK.js";import"../../../chunk-22I55W37.js";import"../../../chunk-3QB2ZQXK.js";import"../../../chunk-IYHO4XQX.js";import"../../../chunk-V7U33NF2.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-BSPCSC45.js";