efficient-easel 20.2.1 → 21.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 (97) hide show
  1. package/README.md +15 -6
  2. package/dist/{CanvasDragLayer-ARfaivCu.d.ts → CanvasDragLayer-Cd1o0HQf.d.ts} +1 -1
  3. package/dist/{chunk-TNGOL65V.js → chunk-2E2SXDYQ.js} +1 -1
  4. package/dist/chunk-2M4T27BI.js +18 -0
  5. package/dist/chunk-4IJVV7DA.js +1 -0
  6. package/dist/{chunk-JQXD3TDE.js → chunk-66JNVRQM.js} +1 -1
  7. package/dist/{chunk-EFHV56BO.js → chunk-7L3NKHEC.js} +14 -14
  8. package/dist/{chunk-XJ2WXGFJ.js → chunk-APVUYICP.js} +42 -42
  9. package/dist/{chunk-HK6I3NVO.js → chunk-E52W3M5I.js} +1 -1
  10. package/dist/chunk-EB6NI2VK.js +1 -0
  11. package/dist/chunk-EZTP6E2M.js +5 -0
  12. package/dist/chunk-FM6JO4WF.js +2 -0
  13. package/dist/chunk-FOHHXSOL.js +1 -0
  14. package/dist/{chunk-I7BROL77.js → chunk-HGCGIRVA.js} +1 -1
  15. package/dist/chunk-JACEEVVF.js +1 -0
  16. package/dist/{chunk-QAJAEWCZ.js → chunk-KFWNGPW3.js} +5 -5
  17. package/dist/{chunk-276MBG5P.js → chunk-LXTM2OLQ.js} +2 -2
  18. package/dist/{chunk-FGYJ5DJY.js → chunk-MSGZ56QL.js} +1 -1
  19. package/dist/chunk-MZ5GSSZ3.js +7 -0
  20. package/dist/{chunk-UJ46J7QW.js → chunk-N2RISV46.js} +1 -1
  21. package/dist/chunk-NA3GMA43.js +5 -0
  22. package/dist/chunk-OBWDHKLI.js +8 -0
  23. package/dist/chunk-Q2A7RHG2.js +1 -0
  24. package/dist/{chunk-JBOSEHIX.js → chunk-R4QJ6DC5.js} +1 -1
  25. package/dist/chunk-S3DUFDQ6.js +6 -0
  26. package/dist/chunk-TQ5Y6S2X.js +1 -0
  27. package/dist/{chunk-7YVEYQDE.js → chunk-V2ULLALL.js} +3 -3
  28. package/dist/chunk-WHS6Y55E.js +10 -0
  29. package/dist/{chunk-ZOBSIXRD.js → chunk-Y2T3JX7K.js} +1 -1
  30. package/dist/chunk-YHFKWV7H.js +21 -0
  31. package/dist/copy/index.js +13 -13
  32. package/dist/drag/drag.css +3 -9
  33. package/dist/drag/index.d.ts +2 -2
  34. package/dist/drag/index.js +1 -1
  35. package/dist/draw/index.d.ts +1 -1
  36. package/dist/draw/index.js +1 -1
  37. package/dist/easel/index.js +1 -1
  38. package/dist/fields/fields.css +2 -2
  39. package/dist/fields/index.d.ts +1 -1
  40. package/dist/fields/index.js +1 -1
  41. package/dist/panel/index.d.ts +37 -138
  42. package/dist/panel/index.js +15 -15
  43. package/dist/panel/panel.css +53 -347
  44. package/dist/screen/components/AddBlockRow.js +1 -1
  45. package/dist/screen/components/AddSidePanel.js +1 -1
  46. package/dist/screen/components/NodeContextMenu.d.ts +3 -3
  47. package/dist/screen/components/NodeContextMenu.js +1 -1
  48. package/dist/screen/components/PageEditGuardNotices.js +1 -1
  49. package/dist/screen/components/SaveControls.d.ts +3 -3
  50. package/dist/screen/components/ScreenChrome.js +1 -1
  51. package/dist/screen/components/ScreenDocumentContext.js +1 -1
  52. package/dist/screen/components/ScreenMount.d.ts +3 -3
  53. package/dist/screen/components/ScreenMount.js +1 -1
  54. package/dist/screen/components/ScreenStoreProvider.d.ts +3 -3
  55. package/dist/screen/components/ScreenStoreProvider.js +1 -1
  56. package/dist/screen/components/SectionScreenShell.js +16 -16
  57. package/dist/screen/components/usePartBridge.d.ts +3 -3
  58. package/dist/screen/components/usePartBridge.js +1 -1
  59. package/dist/screen/index.d.ts +3 -3
  60. package/dist/screen/index.js +1 -1
  61. package/dist/screen/lib/content/view-tiers.d.ts +14 -2
  62. package/dist/screen/lib/content/view-tiers.js +1 -1
  63. package/dist/screen/lib/key-scope.js +1 -1
  64. package/dist/screen/lib/puck/device-fields.js +1 -1
  65. package/dist/screen/lib/puck/preview-dom.js +1 -1
  66. package/dist/screen/lib/puck/style-clipboard.d.ts +3 -3
  67. package/dist/screen/lib/puck/style-clipboard.js +1 -1
  68. package/dist/screen/lib/puck/use-section-ops.js +1 -1
  69. package/dist/screen/lib/screen-parts.d.ts +3 -3
  70. package/dist/screen/lib/screen-parts.js +1 -1
  71. package/dist/screen/screen.css +3 -7
  72. package/dist/screen/words.d.ts +4 -0
  73. package/dist/screen/words.js +1 -1
  74. package/dist/strings/index.d.ts +2 -2
  75. package/dist/strings/index.js +2 -2
  76. package/dist/text-styles/index.js +30 -30
  77. package/dist/tree/index.d.ts +4 -4
  78. package/dist/tree/index.js +1 -1
  79. package/dist/{types-Bqq6ya0y.d.ts → types-DBy3L69b.d.ts} +11 -4
  80. package/dist/{words-vhnV8sM7.d.ts → words-CFkb8XtN.d.ts} +5 -0
  81. package/dist/{words-CvwYvkJm.d.ts → words-SD4neL0n.d.ts} +6 -0
  82. package/package.json +3 -3
  83. package/dist/chunk-23DYNW6S.js +0 -1
  84. package/dist/chunk-23VM4PMV.js +0 -7
  85. package/dist/chunk-6FWAE2RN.js +0 -1
  86. package/dist/chunk-7LYKFL3Q.js +0 -21
  87. package/dist/chunk-A6Z4SD3I.js +0 -10
  88. package/dist/chunk-KAML3KQH.js +0 -1
  89. package/dist/chunk-L2Y3PF2R.js +0 -4
  90. package/dist/chunk-LQV5FZTQ.js +0 -18
  91. package/dist/chunk-MEHLY5Q4.js +0 -1
  92. package/dist/chunk-PAOZMXEI.js +0 -5
  93. package/dist/chunk-R5KEFI55.js +0 -8
  94. package/dist/chunk-RC25EGHD.js +0 -5
  95. package/dist/chunk-VANKQVOW.js +0 -8
  96. package/dist/chunk-WEIE2FBC.js +0 -1
  97. package/dist/chunk-WRFD4EXD.js +0 -1
@@ -1,17 +1,17 @@
1
- import{AddBlockRow as e}from"../../chunk-L2Y3PF2R.js";import{scrollPreviewToSection as n,gotoPreviewSlide as o}from"../../chunk-TNGOL65V.js";import{useEaselUndoKeys as r}from"../../chunk-I7BROL77.js";import{SlotChildActionsProvider as t}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as s}from"../../chunk-C56MPJBH.js";import{usePartBridge as i}from"../../chunk-MEHLY5Q4.js";import{useSectionOps as c}from"../../chunk-WEIE2FBC.js";import"../../chunk-M2Z775ZC.js";import{SELECTION_MODE as p,useScreenPinned as l,useScreenCanvasFrame as m,useScreenInspectorPanel as d,useScreenPickFollowsSelection as a,sameInspectorMode as u,useStandaloneScreenBridges as h,useScreenBlockLook as k,useScreenBlockRules as j}from"../../chunk-PAOZMXEI.js";import{MediaPopup as f}from"../../chunk-2G6MAXPY.js";import{useScreenDocument as S}from"../../chunk-276MBG5P.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-U66YKDAR.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-MQA7OFRA.js";import{DEFAULT_SCREEN_WORDS as C}from"../../chunk-23DYNW6S.js";import{useEasel as y}from"../../chunk-EFHV56BO.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-7LYKFL3Q.js";import"../../chunk-BPXEFVSQ.js";import{LayersTree as N,Subtree as x,TreeRow as A,TreeRowAction as R,TreeSeam as D}from"../../chunk-A6Z4SD3I.js";import{DEFAULT_TREE_WORDS as M}from"../../chunk-K56YDHYQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-IWCKVZHS.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-BSHIQIZC.js";import"../../chunk-NDRZP6YR.js";import{DEFAULT_SAVE_WORDS as O,saveIndicator as B}from"../../chunk-H6DDIBQ4.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-ZOBSIXRD.js";import"../../chunk-QAJAEWCZ.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-VANKQVOW.js";import{SaveState as P,panelWidthVars as H}from"../../chunk-ZG6PVMC3.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import{useWords as L}from"../../chunk-MFIRYGHW.js";import"../../chunk-LQV5FZTQ.js";import"../../chunk-KAML3KQH.js";import{useTreeDrag as I}from"../../chunk-3S5N4HLJ.js";import"../../chunk-P2VEMZH5.js";import{zoneKey as g,parseZoneKey as W}from"../../chunk-K7BTCBWD.js";import"../../chunk-L55YIXDC.js";import"../../chunk-QIDRJH3S.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import{slotChildRowName as v}from"../../chunk-BHRC3ASL.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-IYT6NN2J.js";import{slotFieldsOf as z,nestsInTree as E}from"../../chunk-PLVEGYK6.js";import"../../chunk-LF3FUSCQ.js";import{useState as F,useRef as V,useEffect as Z,useCallback as b,Fragment as Y}from"react";import{Tooltip as w}from"efficient-shell/ui";import{TrashIcon as K}from"efficient-shell/icons/efficient";import{jsxs as Q,jsx as J,Fragment as T}from"react/jsx-runtime";var $=e=>n=>{n.target.closest("button, input")||e()},X={rowClick:$};function G(){const{saveState:G,readOnly:U,readOnlyReason:q=null}=S(),_=c(),{appState:ee,selectedItem:ne,config:oe}=y(e=>e),[re,te]=F(p),se=L("screen",C),ie=L("tree",M),ce=L("save",O),{first:pe,last:le,panelOf:me}=l(),de=me(pe),ae=m(),ue=d(),he=ee.data.content?.[0]??null,ke=he?.props.id??null,je=he?.type===pe,fe=he?.type===le,Se=V(null),Ce=V(null);r(Ce),a(ne?.props.id),Z(()=>{ke&&Se.current!==ke&&(Se.current=ke,je?te(de??p):ne||_.select({index:0}))},[ke,ne,_,je]);const ye=b(e=>te(n=>u(n,e)?n:e),[]),Ne=h({kind:re.kind,mode:re,open:ye,show:e=>te(e),reveal:()=>{},select:(e,n)=>{te(e=>u(e,n)?e:n),_.select(e)}}),{selectNode:xe}=i({mode:re,setMode:te,onOpenPart:n}),Ae=k(),{labelAtLevel:Re,Icon:De}=Ae,{canAddTo:Me}=j(),Oe=e=>Re(e,"block",oe.components[e]?.label??e),Be=e=>Re(e,"section",Oe(e)),Pe=!je&&"puck"===re.kind&&ne?.props.id===ke,He=he?Me(he.type)?.spec??null:null,Le=he&&He?`${he.props.id}:${He.slot}`:null,Ie=he&&He&&Array.isArray(he.props[He.slot])?he.props[He.slot]:[],ge=e=>v(e,Oe,Ae.plainText),We=(e,r)=>{he&&He&&Le&&(te(p),He.slider?(o(String(he.props.id),e),_.select({index:e,zone:Le}),n(String(he.props.id))):(_.select({index:e,zone:Le}),n(r)))},ve=()=>{if(!he||!He||!Le)return;const e=Ie.length;_.insertComponent(Le,He.childType,e),te(p),He.slider?requestAnimationFrame(()=>{o(String(he.props.id),e),_.select({index:e,zone:Le})}):_.select({index:e,zone:Le})},ze=e=>z(oe,e),Ee=e=>{const{parentId:n,slot:o}=W(e),r=e=>{if(!e)return null;if(String(e.props.id)===n)return e;for(const n of ze(e.type)){const o=Array.isArray(e.props[n])?e.props[n]:[];for(const e of o){const n=r(e);if(n)return n}}return null},t=r(he)?.props[o];return Array.isArray(t)?t.length:0},Fe=(e,n,o)=>{const r=Math.min(Math.max(o,0),Ee(e)),t=n<r?r-1:r;t!==n&&(_.reorderComponent(e,n,t),te(p),_.select({index:t,zone:e}))},Ve=I({keyOf:e=>e.id,readOnly:Boolean(U),canDrop:(e,n)=>g(n)===e.zone&&n.index>=0&&n.index<=Ee(e.zone),onDrop:(e,n)=>Fe(e.zone,e.index,n.index),onStep:(e,n)=>Fe(e.zone,e.index,n<0?e.index-1:e.index+2)}),Ze=(e,n)=>/* @__PURE__ */J(D,{...U?{}:Ve.seam({place:{...W(e),index:n}})},`seam:${e}:${n}`),be=e=>Ae.blockRowName(e,Oe),Ye=(e,o,r)=>{te(p),_.select({index:o,zone:e}),n(r)},we=(e,n,o)=>{_.insertComponent(e,n,o),te(p),_.select({index:o,zone:e})},Ke=(n,o,r)=>/* @__PURE__ */J(e,{choices:r,onPick:e=>we(n,e,o)}),Qe=(e,n)=>{const o=ze((r=e).type).flatMap(e=>(Array.isArray(r.props[e])?r.props[e]:[]).map((n,o)=>({child:n,zone:`${r.props.id}:${e}`,index:o})));var r;const t=Me(e.type),s=t?.choices??null,i="footer"===t?.source?be:ge;/* @__PURE__ */
2
- return Q(T,{children:[o.map(({child:e,zone:o,index:r})=>{const t=ne?.props.id===e.props.id,s=E(oe,e.type,n),c=i(e),l=String(e.props.id),m=()=>Ye(o,r,l),{rowProps:d,...a}=Ve.row({item:{id:l,zone:o,index:r},place:{...W(o),index:r}},{onClick:$(m)});/* @__PURE__ */
3
- return Q(Y,{children:[0===r&&Ze(o,0),
4
- /* @__PURE__ */J(A,{words:ie,icon:/* @__PURE__ */J(De,{type:e.type,size:13}),name:c,selected:t,onSelect:m,...a,actions:/* @__PURE__ */J(R,{kind:"delete",label:se.deleteNamed({name:c}),onClick:()=>{return e=o,n=r,_.removeComponent(e,n),te(p),void _.select(null);var e,n},children:/* @__PURE__ */J(K,{size:13})}),rowProps:d}),s&&/* @__PURE__ */J(x,{children:Qe(e,n+1)}),Ze(o,r+1)]},String(e.props.id??`${o}-${r}`))}),t&&s?Ke(`${e.props.id}:${t.slot}`,o.length,s):null]})},Je="HeroSingle"===he?.type,Te=Boolean(he)&&(Boolean(Me(he.type))||ze(he.type).length>0),$e=Boolean(he)&&(Boolean(He)||fe||je||Je||Te);/* @__PURE__ */
5
- return Q("div",{ref:Ce,className:"sf-editor es-editor",style:H(s),children:[
6
- /* @__PURE__ */J("div",{className:"sf-section-bar",children:/* @__PURE__ */J(P,null!==q?{tone:"off",label:q,role:"status"}:{...B(G,ce),role:"status"})}),
7
- /* @__PURE__ */Q("div",{className:"sf-body",children:[$e&&he&&/* @__PURE__ */Q("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
8
- /* @__PURE__ */J("div",{className:"sf-panel-head",children:/* @__PURE__ */J(w,{content:je?se.headerSettings:se.sectionSettings({name:Be(he.type)}),side:"bottom",children:/* @__PURE__ */J("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(Pe?"is-selected":""),"aria-pressed":Pe,onClick:()=>{je?te(de??p):(te(p),_.select({index:0}))},children:Be(he.type)})})}),
9
- /* @__PURE__ */J(N,{className:"sf-tree sf-scroll",rootProps:Ve.rootProps(),words:ie,children:/* @__PURE__ */J(x,{children:je?
10
- /* @__PURE__ */J(A,{words:ie,icon:/* @__PURE__ */J(De,{type:"header",size:13}),name:se.headerSettings,selected:re.kind===de?.kind,onSelect:()=>te(de??p),rowProps:{onClick:$(()=>te(de??p))}}):He?/* @__PURE__ */Q(T,{children:[Ie.map((e,n)=>{const o=ne?.props.id===e.props.id,r=ge(e),t=String(e.props.id),s=()=>We(n,t),{rowProps:i,...c}=Ve.row({item:{id:t,zone:Le,index:n},place:{...W(Le),index:n}},{onClick:$(s)});/* @__PURE__ */
11
- return Q(Y,{children:[0===n&&Ze(Le,0),
12
- /* @__PURE__ */J(A,{words:ie,icon:/* @__PURE__ */J(De,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */J(R,{kind:"delete",label:se.deleteNamed({name:r}),onClick:()=>{return e=n,void(Le&&(_.removeComponent(Le,e),te(p),_.select(null)));var e},children:/* @__PURE__ */J(K,{size:13})}),rowProps:i}),Ze(Le,n+1)]},String(e.props.id??n))}),
13
- /* @__PURE__ */Q("button",{type:"button",className:"sf-add-card",onClick:ve,children:[
14
- /* @__PURE__ */J("span",{className:"sf-plus sf-plus--sm",children:"+"}),He.addLabel]}),ke?Ne.partRows?.(he,X):null]}):Qe(he,1)})})]}),
1
+ import{AddBlockRow as e}from"../../chunk-EZTP6E2M.js";import{scrollPreviewToSection as n,gotoPreviewSlide as o}from"../../chunk-2E2SXDYQ.js";import{useEaselUndoKeys as r}from"../../chunk-HGCGIRVA.js";import{SlotChildActionsProvider as t}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as s}from"../../chunk-C56MPJBH.js";import{usePartBridge as i}from"../../chunk-Q2A7RHG2.js";import{useSectionOps as c}from"../../chunk-FOHHXSOL.js";import"../../chunk-M2Z775ZC.js";import{SELECTION_MODE as p,useScreenPinned as l,useScreenCanvasFrame as m,useScreenInspectorPanel as d,useScreenPickFollowsSelection as a,sameInspectorMode as u,useStandaloneScreenBridges as h,useScreenBlockLook as k,useScreenBlockRules as j}from"../../chunk-NA3GMA43.js";import{MediaPopup as f}from"../../chunk-2G6MAXPY.js";import{useScreenDocument as S}from"../../chunk-LXTM2OLQ.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-U66YKDAR.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-MQA7OFRA.js";import{DEFAULT_SCREEN_WORDS as C}from"../../chunk-EB6NI2VK.js";import{slotChildRowName as y}from"../../chunk-BHRC3ASL.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-IYT6NN2J.js";import{slotFieldsOf as N,nestsInTree as x}from"../../chunk-PLVEGYK6.js";import{useEasel as H}from"../../chunk-7L3NKHEC.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-YHFKWV7H.js";import"../../chunk-BPXEFVSQ.js";import{LayersTree as A,Subtree as M,TreeRow as O,TreeRowAction as R,TreeSeam as D}from"../../chunk-WHS6Y55E.js";import{DEFAULT_TREE_WORDS as P}from"../../chunk-K56YDHYQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-IWCKVZHS.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-FM6JO4WF.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-BSHIQIZC.js";import"../../chunk-NDRZP6YR.js";import{DEFAULT_SAVE_WORDS as g,saveIndicator as B}from"../../chunk-H6DDIBQ4.js";import"../../chunk-MZ5GSSZ3.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-S3DUFDQ6.js";import{SaveState as F,panelWidthVars as W}from"../../chunk-ZG6PVMC3.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import{useWords as v}from"../../chunk-MFIRYGHW.js";import"../../chunk-2M4T27BI.js";import"../../chunk-TQ5Y6S2X.js";import{useTreeDrag as z}from"../../chunk-3S5N4HLJ.js";import"../../chunk-P2VEMZH5.js";import{zoneKey as E,parseZoneKey as I}from"../../chunk-K7BTCBWD.js";import"../../chunk-L55YIXDC.js";import"../../chunk-QIDRJH3S.js";import"../../chunk-LF3FUSCQ.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import{useState as Y,useRef as b,useEffect as K,useCallback as L,Fragment as w}from"react";import{Tooltip as V}from"efficient-shell/ui";import{TrashIcon as Z}from"efficient-shell/icons/efficient";import{jsxs as Q,jsx as J,Fragment as T}from"react/jsx-runtime";var G=e=>n=>{n.target.closest("button, input")||e()},X={rowClick:G};function $(){const{saveState:$,readOnly:U,readOnlyReason:q=null}=S(),_=c(),{appState:ee,selectedItem:ne,config:oe}=H(e=>e),[re,te]=Y(p),se=v("screen",C),ie=v("tree",P),ce=v("save",g),{first:pe,last:le,panelOf:me}=l(),de=me(pe),ae=m(),ue=d(),he=ee.data.content?.[0]??null,ke=he?.props.id??null,je=he?.type===pe,fe=he?.type===le,Se=b(null),Ce=b(null);r(Ce),a(ne?.props.id),K(()=>{ke&&Se.current!==ke&&(Se.current=ke,je?te(de??p):ne||_.select({index:0}))},[ke,ne,_,je]);const ye=L(e=>te(n=>u(n,e)?n:e),[]),Ne=h({kind:re.kind,mode:re,open:ye,show:e=>te(e),reveal:()=>{},select:(e,n)=>{te(e=>u(e,n)?e:n),_.select(e)}}),{selectNode:xe}=i({mode:re,setMode:te,onOpenPart:n}),He=k(),{labelAtLevel:Ae,Icon:Me}=He,{canAddTo:Oe}=j(),Re=e=>Ae(e,"block",oe.components[e]?.label??e),De=e=>Ae(e,"section",Re(e)),Pe=!je&&"puck"===re.kind&&ne?.props.id===ke,ge=he?Oe(he.type)?.spec??null:null,Be=he&&ge?`${he.props.id}:${ge.slot}`:null,Fe=he&&ge&&Array.isArray(he.props[ge.slot])?he.props[ge.slot]:[],We=e=>y(e,Re,He.plainText),ve=(e,r)=>{he&&ge&&Be&&(te(p),ge.slider?(o(String(he.props.id),e),_.select({index:e,zone:Be}),n(String(he.props.id))):(_.select({index:e,zone:Be}),n(r)))},ze=()=>{if(!he||!ge||!Be)return;const e=Fe.length;_.insertComponent(Be,ge.childType,e),te(p),ge.slider?requestAnimationFrame(()=>{o(String(he.props.id),e),_.select({index:e,zone:Be})}):_.select({index:e,zone:Be})},Ee=e=>N(oe,e),Ie=e=>{const{parentId:n,slot:o}=I(e),r=e=>{if(!e)return null;if(String(e.props.id)===n)return e;for(const n of Ee(e.type)){const o=Array.isArray(e.props[n])?e.props[n]:[];for(const e of o){const n=r(e);if(n)return n}}return null},t=r(he)?.props[o];return Array.isArray(t)?t.length:0},Ye=(e,n,o)=>{const r=Math.min(Math.max(o,0),Ie(e)),t=n<r?r-1:r;t!==n&&(_.reorderComponent(e,n,t),te(p),_.select({index:t,zone:e}))},be=z({keyOf:e=>e.id,readOnly:Boolean(U),canDrop:(e,n)=>E(n)===e.zone&&n.index>=0&&n.index<=Ie(e.zone),onDrop:(e,n)=>Ye(e.zone,e.index,n.index),onStep:(e,n)=>Ye(e.zone,e.index,n<0?e.index-1:e.index+2)}),Ke=(e,n)=>/* @__PURE__ */J(D,{...U?{}:be.seam({place:{...I(e),index:n}})},`seam:${e}:${n}`),Le=e=>He.blockRowName(e,Re),we=(e,o,r)=>{te(p),_.select({index:o,zone:e}),n(r)},Ve=(e,n,o)=>{_.insertComponent(e,n,o),te(p),_.select({index:o,zone:e})},Ze=(n,o,r)=>/* @__PURE__ */J(e,{choices:r,onPick:e=>Ve(n,e,o)}),Qe=(e,n)=>{const o=Ee((r=e).type).flatMap(e=>(Array.isArray(r.props[e])?r.props[e]:[]).map((n,o)=>({child:n,zone:`${r.props.id}:${e}`,index:o})));var r;const t=Oe(e.type),s=t?.choices??null,i="footer"===t?.source?Le:We;/* @__PURE__ */
2
+ return Q(T,{children:[o.map(({child:e,zone:o,index:r})=>{const t=ne?.props.id===e.props.id,s=x(oe,e.type,n),c=i(e),l=String(e.props.id),m=()=>we(o,r,l),{rowProps:d,...a}=be.row({item:{id:l,zone:o,index:r},place:{...I(o),index:r}},{onClick:G(m)});/* @__PURE__ */
3
+ return Q(w,{children:[0===r&&Ke(o,0),
4
+ /* @__PURE__ */J(O,{words:ie,icon:/* @__PURE__ */J(Me,{type:e.type,size:13}),name:c,selected:t,onSelect:m,...a,actions:/* @__PURE__ */J(R,{kind:"delete",label:se.deleteNamed({name:c}),onClick:()=>{return e=o,n=r,_.removeComponent(e,n),te(p),void _.select(null);var e,n},children:/* @__PURE__ */J(Z,{size:13})}),rowProps:d}),s&&/* @__PURE__ */J(M,{children:Qe(e,n+1)}),Ke(o,r+1)]},String(e.props.id??`${o}-${r}`))}),t&&s?Ze(`${e.props.id}:${t.slot}`,o.length,s):null]})},Je="HeroSingle"===he?.type,Te=Boolean(he)&&(Boolean(Oe(he.type))||Ee(he.type).length>0),Ge=Boolean(he)&&(Boolean(ge)||fe||je||Je||Te);/* @__PURE__ */
5
+ return Q("div",{ref:Ce,className:"sf-editor es-editor",style:W(s),children:[
6
+ /* @__PURE__ */J("div",{className:"sf-section-bar",children:/* @__PURE__ */J(F,null!==q?{tone:"off",label:q,role:"status"}:{...B($,ce),role:"status"})}),
7
+ /* @__PURE__ */Q("div",{className:"sf-body",children:[Ge&&he&&/* @__PURE__ */Q("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
8
+ /* @__PURE__ */J("div",{className:"sf-panel-head",children:/* @__PURE__ */J(V,{content:je?se.headerSettings:se.sectionSettings({name:De(he.type)}),side:"bottom",children:/* @__PURE__ */J("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(Pe?"is-selected":""),"aria-pressed":Pe,onClick:()=>{je?te(de??p):(te(p),_.select({index:0}))},children:De(he.type)})})}),
9
+ /* @__PURE__ */J(A,{className:"sf-tree sf-scroll",rootProps:be.rootProps(),words:ie,children:/* @__PURE__ */J(M,{children:je?
10
+ /* @__PURE__ */J(O,{words:ie,icon:/* @__PURE__ */J(Me,{type:"header",size:13}),name:se.headerSettings,selected:re.kind===de?.kind,onSelect:()=>te(de??p),rowProps:{onClick:G(()=>te(de??p))}}):ge?/* @__PURE__ */Q(T,{children:[Fe.map((e,n)=>{const o=ne?.props.id===e.props.id,r=We(e),t=String(e.props.id),s=()=>ve(n,t),{rowProps:i,...c}=be.row({item:{id:t,zone:Be,index:n},place:{...I(Be),index:n}},{onClick:G(s)});/* @__PURE__ */
11
+ return Q(w,{children:[0===n&&Ke(Be,0),
12
+ /* @__PURE__ */J(O,{words:ie,icon:/* @__PURE__ */J(Me,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */J(R,{kind:"delete",label:se.deleteNamed({name:r}),onClick:()=>{return e=n,void(Be&&(_.removeComponent(Be,e),te(p),_.select(null)));var e},children:/* @__PURE__ */J(Z,{size:13})}),rowProps:i}),Ke(Be,n+1)]},String(e.props.id??n))}),
13
+ /* @__PURE__ */Q("button",{type:"button",className:"sf-add-card",onClick:ze,children:[
14
+ /* @__PURE__ */J("span",{className:"sf-plus sf-plus--sm",children:"+"}),ge.addLabel]}),ke?Ne.partRows?.(he,X):null]}):Qe(he,1)})})]}),
15
15
  /* @__PURE__ */J("div",{className:"sf-center",children:/* @__PURE__ */J("div",{className:"sf-preview-host",children:/* @__PURE__ */J(ae,{})})}),
16
- /* @__PURE__ */J(t,{value:{selectChild:(e,n,o,r)=>"section"===Me(r)?.source?We(n,o):Ye(e,n,o),addChild:(e,n,o,r,t)=>"section"===Me(t)?.source?ve():we(`${e}:${n}`,o,r),childRowName:ge,blockRowName:be},children:/* @__PURE__ */J(ue,{mode:re,onOpenWebsiteSettings:Ne.openSettings??(()=>{}),onSelectNode:xe,hideNodeActions:!0})})]}),
17
- /* @__PURE__ */J(f,{})]})}export{G as default};
16
+ /* @__PURE__ */J(t,{value:{selectChild:(e,n,o,r)=>"section"===Oe(r)?.source?ve(n,o):we(e,n,o),addChild:(e,n,o,r,t)=>"section"===Oe(t)?.source?ze():Ve(`${e}:${n}`,o,r),childRowName:We,blockRowName:Le},children:/* @__PURE__ */J(ue,{mode:re,onOpenWebsiteSettings:Ne.openSettings??(()=>{}),onSelectNode:xe,hideNodeActions:!0})})]}),
17
+ /* @__PURE__ */J(f,{})]})}export{$ as default};
@@ -12,13 +12,13 @@ import '../../types-Cy7rdmXt.js';
12
12
  import '../../wordFit-7XpmhcaW.js';
13
13
  import '../../edit-lock/index.js';
14
14
  import '../../panelWidths-DgQXiPXU.js';
15
- import '../../CanvasDragLayer-ARfaivCu.js';
15
+ import '../../CanvasDragLayer-Cd1o0HQf.js';
16
16
  import '../../session-DSQFmIvx.js';
17
- import '../../words-CvwYvkJm.js';
17
+ import '../../words-SD4neL0n.js';
18
18
  import '../../types-BbOBWXMP.js';
19
19
  import '../../style-clipboard/index.js';
20
20
  import '../../words-CnnHb9jo.js';
21
- import '../../types-Bqq6ya0y.js';
21
+ import '../../types-DBy3L69b.js';
22
22
  import 'efficient-shell/ui';
23
23
  import '../../words-Cl9xMUYY.js';
24
24
  import './AddSidePanel.js';
@@ -1 +1 @@
1
- export{usePartBridge}from"../../chunk-MEHLY5Q4.js";import"../../chunk-WEIE2FBC.js";import"../../chunk-PAOZMXEI.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-MQA7OFRA.js";import"../../chunk-EFHV56BO.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-7LYKFL3Q.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-IWCKVZHS.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-BSHIQIZC.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-ZOBSIXRD.js";import"../../chunk-QAJAEWCZ.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-VANKQVOW.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-3S5N4HLJ.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-K7BTCBWD.js";import"../../chunk-L55YIXDC.js";import"../../chunk-QIDRJH3S.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-LF3FUSCQ.js";
1
+ export{usePartBridge}from"../../chunk-Q2A7RHG2.js";import"../../chunk-FOHHXSOL.js";import"../../chunk-NA3GMA43.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-MQA7OFRA.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-7L3NKHEC.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-YHFKWV7H.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-IWCKVZHS.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-FM6JO4WF.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-BSHIQIZC.js";import"../../chunk-MZ5GSSZ3.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-3S5N4HLJ.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-K7BTCBWD.js";import"../../chunk-L55YIXDC.js";import"../../chunk-QIDRJH3S.js";import"../../chunk-LF3FUSCQ.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";
@@ -18,13 +18,13 @@ import '../types-Cy7rdmXt.js';
18
18
  import '../wordFit-7XpmhcaW.js';
19
19
  import '../edit-lock/index.js';
20
20
  import '../panelWidths-DgQXiPXU.js';
21
- import '../CanvasDragLayer-ARfaivCu.js';
21
+ import '../CanvasDragLayer-Cd1o0HQf.js';
22
22
  import '../session-DSQFmIvx.js';
23
- import '../words-CvwYvkJm.js';
23
+ import '../words-SD4neL0n.js';
24
24
  import '../types-BbOBWXMP.js';
25
25
  import '../style-clipboard/index.js';
26
26
  import '../words-CnnHb9jo.js';
27
- import '../types-Bqq6ya0y.js';
27
+ import '../types-DBy3L69b.js';
28
28
  import 'efficient-shell/ui';
29
29
  import '../words-Cl9xMUYY.js';
30
30
  import './components/AddSidePanel.js';
@@ -1 +1 @@
1
- import"../chunk-GZO72N3Q.js";export{DocumentScreen,ScreenMount}from"../chunk-7YVEYQDE.js";import"../chunk-GXQCZJOP.js";import"../chunk-XJ2WXGFJ.js";import"../chunk-2GVCAIPX.js";import"../chunk-26OOWIJJ.js";import"../chunk-JBOSEHIX.js";import"../chunk-FGNR22NY.js";import"../chunk-LER7RKTO.js";import"../chunk-FGYJ5DJY.js";import"../chunk-7F52SZOI.js";import"../chunk-MQNBD6AB.js";import"../chunk-TNGOL65V.js";import"../chunk-I7BROL77.js";import"../chunk-KCBEE2MC.js";import"../chunk-C56MPJBH.js";import"../chunk-MEHLY5Q4.js";import"../chunk-WEIE2FBC.js";import"../chunk-PY7OOQEZ.js";import"../chunk-RKTF5XLP.js";export{ScreenStoreProvider}from"../chunk-JQXD3TDE.js";import"../chunk-5545A3PC.js";import"../chunk-R5KEFI55.js";import"../chunk-PA3PNTVV.js";import"../chunk-5ZBY24K7.js";import"../chunk-BVN33R76.js";import"../chunk-43AEUUNQ.js";import"../chunk-SINAM2IT.js";import"../chunk-UMDQ6CLQ.js";import"../chunk-M2Z775ZC.js";export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../chunk-PAOZMXEI.js";import"../chunk-2G6MAXPY.js";import"../chunk-6FWAE2RN.js";import"../chunk-UJ46J7QW.js";import"../chunk-276MBG5P.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-U66YKDAR.js";import"../chunk-LOMEH6DG.js";import"../chunk-KCOBHPN6.js";import"../chunk-FHCKFOCD.js";export{EaselSessionProvider,useEaselSession}from"../chunk-O7Q4DDJT.js";export{EFFICIENT_BACKEND,activateEaselSession,backendOf,createEaselSession,currentEaselSession,deactivateEaselSession,efficientClientOpen,isEfficientBackend,provideDefaultBackend,resetAmbientEaselSession,sessionRegistry,setSessionBridgedSite,setSessionDocumentSite}from"../chunk-RSCMJIWS.js";export{DETACHED_EASEL_HOST,EaselHostContext,EaselHostProvider,createEaselHost,useEaselHost,useHostEscape}from"../chunk-MQA7OFRA.js";import"../chunk-XFYFKITX.js";import"../chunk-23DYNW6S.js";import"../chunk-V7U33NF2.js";import"../chunk-6WY6ZXJG.js";import"../chunk-EFHV56BO.js";import"../chunk-TBY3DFKS.js";import"../chunk-7LYKFL3Q.js";import"../chunk-BPXEFVSQ.js";import"../chunk-A6Z4SD3I.js";import"../chunk-K56YDHYQ.js";import"../chunk-ZEH6QLBH.js";import"../chunk-IWCKVZHS.js";import"../chunk-ZKY45F5G.js";import"../chunk-FIVU2COQ.js";import"../chunk-RC25EGHD.js";import"../chunk-KFV7N2DJ.js";import"../chunk-P5VYGWYO.js";import"../chunk-WK3AFPXY.js";import"../chunk-BSHIQIZC.js";import"../chunk-NDRZP6YR.js";import"../chunk-H6DDIBQ4.js";import"../chunk-23VM4PMV.js";import"../chunk-KRL3IUV3.js";import"../chunk-ZOBSIXRD.js";import"../chunk-QAJAEWCZ.js";import"../chunk-WRFD4EXD.js";import"../chunk-VANKQVOW.js";import"../chunk-ZG6PVMC3.js";import"../chunk-MJM6SFD3.js";import"../chunk-AJSDWWJW.js";import"../chunk-2OAZYSWJ.js";import"../chunk-THWO5YVZ.js";import"../chunk-RE4LP46F.js";import"../chunk-MFIRYGHW.js";import"../chunk-LQV5FZTQ.js";import"../chunk-KAML3KQH.js";import"../chunk-3S5N4HLJ.js";import"../chunk-P2VEMZH5.js";import"../chunk-K7BTCBWD.js";import"../chunk-L55YIXDC.js";import"../chunk-QIDRJH3S.js";import"../chunk-BSPCSC45.js";import"../chunk-I54UCYOU.js";import"../chunk-GOTN2KY4.js";import"../chunk-R5L2E7JX.js";import"../chunk-BHRC3ASL.js";import"../chunk-6W7WLPZH.js";import"../chunk-IQ5TA7AM.js";import"../chunk-DUVRZ456.js";import"../chunk-IYT6NN2J.js";import"../chunk-PLVEGYK6.js";import"../chunk-LF3FUSCQ.js";
1
+ import"../chunk-GZO72N3Q.js";export{DocumentScreen,ScreenMount}from"../chunk-V2ULLALL.js";import"../chunk-GXQCZJOP.js";import"../chunk-APVUYICP.js";import"../chunk-2GVCAIPX.js";import"../chunk-26OOWIJJ.js";import"../chunk-R4QJ6DC5.js";import"../chunk-FGNR22NY.js";import"../chunk-LER7RKTO.js";import"../chunk-MSGZ56QL.js";import"../chunk-7F52SZOI.js";import"../chunk-MQNBD6AB.js";import"../chunk-2E2SXDYQ.js";import"../chunk-HGCGIRVA.js";import"../chunk-KCBEE2MC.js";import"../chunk-C56MPJBH.js";import"../chunk-Q2A7RHG2.js";import"../chunk-FOHHXSOL.js";import"../chunk-PY7OOQEZ.js";import"../chunk-RKTF5XLP.js";export{ScreenStoreProvider}from"../chunk-66JNVRQM.js";import"../chunk-5545A3PC.js";import"../chunk-OBWDHKLI.js";import"../chunk-PA3PNTVV.js";import"../chunk-5ZBY24K7.js";import"../chunk-BVN33R76.js";import"../chunk-43AEUUNQ.js";import"../chunk-SINAM2IT.js";import"../chunk-UMDQ6CLQ.js";import"../chunk-M2Z775ZC.js";export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../chunk-NA3GMA43.js";import"../chunk-2G6MAXPY.js";import"../chunk-4IJVV7DA.js";import"../chunk-N2RISV46.js";import"../chunk-LXTM2OLQ.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-U66YKDAR.js";import"../chunk-LOMEH6DG.js";import"../chunk-KCOBHPN6.js";import"../chunk-FHCKFOCD.js";export{EaselSessionProvider,useEaselSession}from"../chunk-O7Q4DDJT.js";export{EFFICIENT_BACKEND,activateEaselSession,backendOf,createEaselSession,currentEaselSession,deactivateEaselSession,efficientClientOpen,isEfficientBackend,provideDefaultBackend,resetAmbientEaselSession,sessionRegistry,setSessionBridgedSite,setSessionDocumentSite}from"../chunk-RSCMJIWS.js";export{DETACHED_EASEL_HOST,EaselHostContext,EaselHostProvider,createEaselHost,useEaselHost,useHostEscape}from"../chunk-MQA7OFRA.js";import"../chunk-XFYFKITX.js";import"../chunk-EB6NI2VK.js";import"../chunk-V7U33NF2.js";import"../chunk-6WY6ZXJG.js";import"../chunk-BHRC3ASL.js";import"../chunk-6W7WLPZH.js";import"../chunk-IQ5TA7AM.js";import"../chunk-DUVRZ456.js";import"../chunk-IYT6NN2J.js";import"../chunk-PLVEGYK6.js";import"../chunk-7L3NKHEC.js";import"../chunk-TBY3DFKS.js";import"../chunk-YHFKWV7H.js";import"../chunk-BPXEFVSQ.js";import"../chunk-WHS6Y55E.js";import"../chunk-K56YDHYQ.js";import"../chunk-ZEH6QLBH.js";import"../chunk-IWCKVZHS.js";import"../chunk-ZKY45F5G.js";import"../chunk-FIVU2COQ.js";import"../chunk-FM6JO4WF.js";import"../chunk-KFV7N2DJ.js";import"../chunk-P5VYGWYO.js";import"../chunk-WK3AFPXY.js";import"../chunk-BSHIQIZC.js";import"../chunk-NDRZP6YR.js";import"../chunk-H6DDIBQ4.js";import"../chunk-MZ5GSSZ3.js";import"../chunk-KRL3IUV3.js";import"../chunk-Y2T3JX7K.js";import"../chunk-KFWNGPW3.js";import"../chunk-JACEEVVF.js";import"../chunk-S3DUFDQ6.js";import"../chunk-ZG6PVMC3.js";import"../chunk-MJM6SFD3.js";import"../chunk-AJSDWWJW.js";import"../chunk-2OAZYSWJ.js";import"../chunk-THWO5YVZ.js";import"../chunk-RE4LP46F.js";import"../chunk-MFIRYGHW.js";import"../chunk-2M4T27BI.js";import"../chunk-TQ5Y6S2X.js";import"../chunk-3S5N4HLJ.js";import"../chunk-P2VEMZH5.js";import"../chunk-K7BTCBWD.js";import"../chunk-L55YIXDC.js";import"../chunk-QIDRJH3S.js";import"../chunk-LF3FUSCQ.js";import"../chunk-BSPCSC45.js";import"../chunk-I54UCYOU.js";import"../chunk-GOTN2KY4.js";import"../chunk-R5L2E7JX.js";
@@ -85,6 +85,16 @@ interface AutoRule {
85
85
  * Example: padding 80 → 60 → 40; 120 → 88 → 60; gap 32 → 24 → 16.
86
86
  */
87
87
  declare const AUTO_RULES: Record<ViewValueKind, AutoRule>;
88
+ /**
89
+ * The rules a page drew by before the auto rules (web-builder's rule version
90
+ * "v1"): an empty view takes its parent's value UNCHANGED, for every kind.
91
+ * Tablet = Desktop, Phone = Tablet. With no Tablet values stored, that is
92
+ * exactly what every page draws today (an empty phone value follows the
93
+ * desktop one). The switch to {@link AUTO_RULES} is web-builder's, made once
94
+ * for every site (Lewis 2026-10-23); both tables are here so the rules are
95
+ * spelled once.
96
+ */
97
+ declare const FOLLOW_RULES: Record<ViewValueKind, AutoRule>;
88
98
  /** What each view draws. */
89
99
  interface ViewValues<T> {
90
100
  desktop: T;
@@ -96,10 +106,12 @@ interface ViewValues<T> {
96
106
  * through `AUTO_RULES[kind]`. Phone's parent is Tablet (stored or auto);
97
107
  * Tablet's parent is Desktop. A desktop value nobody set stays unset in every
98
108
  * auto view, so the host's default applies there as it does on Desktop.
109
+ * `rules` is the rule set the page draws by: {@link AUTO_RULES} (the default)
110
+ * or {@link FOLLOW_RULES}.
99
111
  *
100
112
  * DISPLAY ONLY: never store what this returns for an auto view — that turns
101
113
  * auto into a copy that stops following its parent.
102
114
  */
103
- declare function resolveViewValue<T>(kind: ViewValueKind, desktop: T, tablet?: T | null, phone?: T | null): ViewValues<T>;
115
+ declare function resolveViewValue<T>(kind: ViewValueKind, desktop: T, tablet?: T | null, phone?: T | null, rules?: Record<ViewValueKind, AutoRule>): ViewValues<T>;
104
116
 
105
- export { AUTO_RULES, type AutoRule, VIEW_DESKTOP_MIN, VIEW_TABLET_MIN, VIEW_TIERS, VIEW_TIER_LABEL, type ViewTier, type ViewValueKind, type ViewValues, isAuto, phoneKey, resolveViewValue, tabletKey, viewTierForWidth };
117
+ export { AUTO_RULES, type AutoRule, FOLLOW_RULES, VIEW_DESKTOP_MIN, VIEW_TABLET_MIN, VIEW_TIERS, VIEW_TIER_LABEL, type ViewTier, type ViewValueKind, type ViewValues, isAuto, phoneKey, resolveViewValue, tabletKey, viewTierForWidth };
@@ -1 +1 @@
1
- export{AUTO_RULES,VIEW_DESKTOP_MIN,VIEW_TABLET_MIN,VIEW_TIERS,VIEW_TIER_LABEL,isAuto,phoneKey,resolveViewValue,tabletKey,viewTierForWidth}from"../../../chunk-HK6I3NVO.js";
1
+ export{AUTO_RULES,FOLLOW_RULES,VIEW_DESKTOP_MIN,VIEW_TABLET_MIN,VIEW_TIERS,VIEW_TIER_LABEL,isAuto,phoneKey,resolveViewValue,tabletKey,viewTierForWidth}from"../../../chunk-E52W3M5I.js";
@@ -1 +1 @@
1
- export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-I7BROL77.js";import"../../chunk-MQA7OFRA.js";import"../../chunk-EFHV56BO.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-IWCKVZHS.js";import"../../chunk-BSHIQIZC.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-K7BTCBWD.js";import"../../chunk-L55YIXDC.js";import"../../chunk-QIDRJH3S.js";import"../../chunk-LF3FUSCQ.js";
1
+ export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-HGCGIRVA.js";import"../../chunk-MQA7OFRA.js";import"../../chunk-7L3NKHEC.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-IWCKVZHS.js";import"../../chunk-BSHIQIZC.js";import"../../chunk-MZ5GSSZ3.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-K7BTCBWD.js";import"../../chunk-L55YIXDC.js";import"../../chunk-QIDRJH3S.js";import"../../chunk-LF3FUSCQ.js";
@@ -1 +1 @@
1
- export{DEVICE_FIELD_MARKER,DEVICE_HIDDEN_ATTR,DEVICE_NOTE,deviceField,deviceMetaOf,deviceNote,shownTier,withoutDeviceGate}from"../../../chunk-FGYJ5DJY.js";import"../../../chunk-7F52SZOI.js";import"../../../chunk-23DYNW6S.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-BSPCSC45.js";
1
+ export{DEVICE_FIELD_MARKER,DEVICE_HIDDEN_ATTR,DEVICE_NOTE,deviceField,deviceMetaOf,deviceNote,shownTier,withoutDeviceGate}from"../../../chunk-MSGZ56QL.js";import"../../../chunk-7F52SZOI.js";import"../../../chunk-EB6NI2VK.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-BSPCSC45.js";
@@ -1 +1 @@
1
- export{gotoPreviewSlide,pinPreviewToBottom,pinPreviewToSection,previewFrame,scrollPreviewToSection,scrollPreviewToTop}from"../../../chunk-TNGOL65V.js";import"../../../chunk-R5L2E7JX.js";import"../../../chunk-IQ5TA7AM.js";import"../../../chunk-LF3FUSCQ.js";
1
+ export{gotoPreviewSlide,pinPreviewToBottom,pinPreviewToSection,previewFrame,scrollPreviewToSection,scrollPreviewToTop}from"../../../chunk-2E2SXDYQ.js";import"../../../chunk-IQ5TA7AM.js";import"../../../chunk-LF3FUSCQ.js";import"../../../chunk-R5L2E7JX.js";
@@ -16,10 +16,10 @@ import '../../../types-Cy7rdmXt.js';
16
16
  import '../../../wordFit-7XpmhcaW.js';
17
17
  import '../../../edit-lock/index.js';
18
18
  import '../../../panelWidths-DgQXiPXU.js';
19
- import '../../../CanvasDragLayer-ARfaivCu.js';
19
+ import '../../../CanvasDragLayer-Cd1o0HQf.js';
20
20
  import '../../../session-DSQFmIvx.js';
21
- import '../../../words-CvwYvkJm.js';
22
- import '../../../types-Bqq6ya0y.js';
21
+ import '../../../words-SD4neL0n.js';
22
+ import '../../../types-DBy3L69b.js';
23
23
  import 'efficient-shell/ui';
24
24
  import '../../../words-Cl9xMUYY.js';
25
25
  import '../../components/AddSidePanel.js';
@@ -1 +1 @@
1
- export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-JBOSEHIX.js";import"../../../chunk-LER7RKTO.js";import"../../../chunk-FGYJ5DJY.js";import"../../../chunk-7F52SZOI.js";import"../../../chunk-MQNBD6AB.js";import"../../../chunk-23DYNW6S.js";import"../../../chunk-V7U33NF2.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-BSPCSC45.js";import"../../../chunk-DUVRZ456.js";
1
+ export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-R4QJ6DC5.js";import"../../../chunk-LER7RKTO.js";import"../../../chunk-MSGZ56QL.js";import"../../../chunk-7F52SZOI.js";import"../../../chunk-MQNBD6AB.js";import"../../../chunk-EB6NI2VK.js";import"../../../chunk-V7U33NF2.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-DUVRZ456.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-BSPCSC45.js";
@@ -1 +1 @@
1
- export{useSectionOps}from"../../../chunk-WEIE2FBC.js";import"../../../chunk-PAOZMXEI.js";import"../../../chunk-FHCKFOCD.js";import"../../../chunk-MQA7OFRA.js";import"../../../chunk-EFHV56BO.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-7LYKFL3Q.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-A6Z4SD3I.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-ZEH6QLBH.js";import"../../../chunk-IWCKVZHS.js";import"../../../chunk-FIVU2COQ.js";import"../../../chunk-RC25EGHD.js";import"../../../chunk-KFV7N2DJ.js";import"../../../chunk-BSHIQIZC.js";import"../../../chunk-23VM4PMV.js";import"../../../chunk-KRL3IUV3.js";import"../../../chunk-ZOBSIXRD.js";import"../../../chunk-QAJAEWCZ.js";import"../../../chunk-WRFD4EXD.js";import"../../../chunk-VANKQVOW.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-3S5N4HLJ.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-K7BTCBWD.js";import"../../../chunk-L55YIXDC.js";import"../../../chunk-QIDRJH3S.js";import"../../../chunk-PLVEGYK6.js";import"../../../chunk-LF3FUSCQ.js";
1
+ export{useSectionOps}from"../../../chunk-FOHHXSOL.js";import"../../../chunk-NA3GMA43.js";import"../../../chunk-FHCKFOCD.js";import"../../../chunk-MQA7OFRA.js";import"../../../chunk-PLVEGYK6.js";import"../../../chunk-7L3NKHEC.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YHFKWV7H.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-WHS6Y55E.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-ZEH6QLBH.js";import"../../../chunk-IWCKVZHS.js";import"../../../chunk-FIVU2COQ.js";import"../../../chunk-FM6JO4WF.js";import"../../../chunk-KFV7N2DJ.js";import"../../../chunk-BSHIQIZC.js";import"../../../chunk-MZ5GSSZ3.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-3S5N4HLJ.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-K7BTCBWD.js";import"../../../chunk-L55YIXDC.js";import"../../../chunk-QIDRJH3S.js";import"../../../chunk-LF3FUSCQ.js";
@@ -4,11 +4,11 @@ import { Data } from '../../blocks/index.js';
4
4
  import { C as CanvasTarget } from '../../watch-BTYOJpQU.js';
5
5
  import { D as DeviceOption } from '../../types-B3iSHX-w.js';
6
6
  import { P as Place } from '../../types-41704JE4.js';
7
- import { M as MeasuredCanvas, C as CanvasDragModel } from '../../CanvasDragLayer-ARfaivCu.js';
7
+ import { M as MeasuredCanvas, C as CanvasDragModel } from '../../CanvasDragLayer-Cd1o0HQf.js';
8
8
  import { E as EaselContextMenuItem } from '../../types-BbOBWXMP.js';
9
9
  import { E as EaselRailItem } from '../../types-Cy7rdmXt.js';
10
10
  import { StyleRow } from '../../style-clipboard/index.js';
11
- import { T as TreeRowMark } from '../../types-Bqq6ya0y.js';
11
+ import { T as TreeRowMark } from '../../types-DBy3L69b.js';
12
12
  import { AddKey } from '../components/AddSidePanel.js';
13
13
  import { p as AnyScreenTarget } from '../../ScreenDocumentContext-CFJeqqKk.js';
14
14
  import { HostProduct } from './host-chrome.js';
@@ -23,7 +23,7 @@ import '../../plan-CZS902DV.js';
23
23
  import '../../edit-lock/index.js';
24
24
  import '../../panelWidths-DgQXiPXU.js';
25
25
  import '../../session-DSQFmIvx.js';
26
- import '../../words-CvwYvkJm.js';
26
+ import '../../words-SD4neL0n.js';
27
27
  import '../../wordFit-7XpmhcaW.js';
28
28
  import '../../words-CnnHb9jo.js';
29
29
  import 'efficient-shell/ui';
@@ -1 +1 @@
1
- export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-PAOZMXEI.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-MQA7OFRA.js";import"../../chunk-EFHV56BO.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-7LYKFL3Q.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-IWCKVZHS.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-BSHIQIZC.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-ZOBSIXRD.js";import"../../chunk-QAJAEWCZ.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-VANKQVOW.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-3S5N4HLJ.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-K7BTCBWD.js";import"../../chunk-L55YIXDC.js";import"../../chunk-QIDRJH3S.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-LF3FUSCQ.js";
1
+ export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-NA3GMA43.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-MQA7OFRA.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-7L3NKHEC.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-YHFKWV7H.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-IWCKVZHS.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-FM6JO4WF.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-BSHIQIZC.js";import"../../chunk-MZ5GSSZ3.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-3S5N4HLJ.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-K7BTCBWD.js";import"../../chunk-L55YIXDC.js";import"../../chunk-QIDRJH3S.js";import"../../chunk-LF3FUSCQ.js";
@@ -438,13 +438,9 @@
438
438
  }
439
439
 
440
440
  /* ── Footer "Add block" menu — the shell's DropdownMenu (easel issue 199, step 4) ────── */
441
- /* The menu, its rows and its group headings are efficient-shell's; the row
442
- that opens it is the add card (`.sf-add-card`, the trigger's own look). What
443
- stays is a heading's count, quieter than its word. */
444
- .sf-menugroup-count {
445
- font-size: var(--text-2xs, 11px);
446
- color: var(--sf-field-placeholder);
447
- }
441
+ /* The menu, its rows, its group headings and their counts (`ItemCount`) are
442
+ efficient-shell's; the row that opens it is the add card (`.sf-add-card`,
443
+ the trigger's own look). */
448
444
 
449
445
  /* ── Footer "Add block" menu — heterogeneous block-type picker ──────────── */
450
446
  /* ── Add — a mode over the left panel (components/AddSidePanel) ────────────
@@ -238,6 +238,10 @@ type ScreenMenuWords = {
238
238
  clipboardRefused: string;
239
239
  };
240
240
  type ScreenWords = {
241
+ /** An "Add block" run heading's count, in words: its Tooltip and screen-reader text. */
242
+ blockCount: (v: {
243
+ count: number;
244
+ }) => string;
241
245
  /** While the document is on its way, and while an entry may still bounce. */
242
246
  loading: string;
243
247
  /** Before the console's sign-in has reached an editor that needs it. */
@@ -1 +1 @@
1
- export{DEFAULT_SCREEN_ADD_WORDS,DEFAULT_SCREEN_SAVE_STATUS_WORDS,DEFAULT_SCREEN_SHARED_WORDS,DEFAULT_SCREEN_WORDS}from"../chunk-23DYNW6S.js";
1
+ export{DEFAULT_SCREEN_ADD_WORDS,DEFAULT_SCREEN_SAVE_STATUS_WORDS,DEFAULT_SCREEN_SHARED_WORDS,DEFAULT_SCREEN_WORDS}from"../chunk-EB6NI2VK.js";
@@ -1,9 +1,9 @@
1
1
  import { a as SaveWords } from '../words-Cm8PMYn0.js';
2
2
  import { N as NoticeWords, C as ChromeWords } from '../words-DYu4iBrR.js';
3
3
  import { C as CopyWords } from '../words-BpTjCfqO.js';
4
- import { D as DragWords } from '../words-CvwYvkJm.js';
4
+ import { D as DragWords } from '../words-SD4neL0n.js';
5
5
  import { LockWords } from '../edit-lock/index.js';
6
- import { F as FieldsWords } from '../words-vhnV8sM7.js';
6
+ import { F as FieldsWords } from '../words-CFkb8XtN.js';
7
7
  import { N as NodeMenuWords } from '../words-DMG4dYq2.js';
8
8
  import { P as PanelWords } from '../words-BeX5eGq7.js';
9
9
  import { P as PickWords } from '../words-DWvCJXwR.js';
@@ -1,2 +1,2 @@
1
- import{DEFAULT_SCREEN_WORDS as r}from"../chunk-23DYNW6S.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as o}from"../chunk-6WY6ZXJG.js";import{DEFAULT_TEXT_STYLES_WORDS as n}from"../chunk-OGH6CC3E.js";import{DEFAULT_PICK_WORDS as t}from"../chunk-OFBZOI6W.js";import{DEFAULT_CANVAS_WORDS as c}from"../chunk-TBY3DFKS.js";import{DEFAULT_TREE_WORDS as e}from"../chunk-K56YDHYQ.js";import{DEFAULT_PANEL_WORDS as m}from"../chunk-KFV7N2DJ.js";import{DEFAULT_NODE_MENU_WORDS as i}from"../chunk-WK3AFPXY.js";import{DEFAULT_SAVE_WORDS as s}from"../chunk-H6DDIBQ4.js";import{DEFAULT_COPY_WORDS as u}from"../chunk-KRL3IUV3.js";import{DEFAULT_FIELDS_WORDS as f}from"../chunk-WRFD4EXD.js";import{DEFAULT_CHROME_WORDS as p,DEFAULT_NOTICE_WORDS as l}from"../chunk-AJSDWWJW.js";import{DEFAULT_RAIL_WORDS as h}from"../chunk-2OAZYSWJ.js";import{DEFAULT_LOCK_WORDS as j}from"../chunk-RE4LP46F.js";import{stringsContext as k}from"../chunk-MFIRYGHW.js";import{DEFAULT_DRAG_WORDS as a}from"../chunk-KAML3KQH.js";import{useContext as W,useMemo as D}from"react";import{jsx as Y}from"react/jsx-runtime";var y={notice:l,lock:j,save:s,chrome:p,rail:h,tree:e,panel:m,fields:f,pick:t,drag:a,menu:i,styleClipboard:o,copy:u,canvas:c,textStyles:n,screen:r},F=r=>"object"==typeof r&&null!==r;function K(r,o){const n={};for(const t of Object.keys(r)){const c=r[t],e=o[t];null==e?n[t]=c:F(c)?n[t]=F(e)?K(c,e):c:n[t]=typeof e==typeof c?e:c}return n}function d(r,o){return o?K(r,o):r}function v({value:r,locale:o,children:n}){const t=k(),c=W(t),e=c?.strings??y,m=o??c?.locale??"en",i=D(()=>({strings:d(e,r),locale:m}),[e,r,m]);/* @__PURE__ */
2
- return Y(t.Provider,{value:i,children:n})}function H(){return W(k())?.strings??y}function J(){return W(k())?.locale??"en"}export{y as DEFAULT_EASEL_STRINGS,v as EaselStringsProvider,d as mergeEaselStrings,J as useEaselLocale,H as useEaselStrings};
1
+ import{DEFAULT_SCREEN_WORDS as r}from"../chunk-EB6NI2VK.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as o}from"../chunk-6WY6ZXJG.js";import{DEFAULT_TEXT_STYLES_WORDS as n}from"../chunk-OGH6CC3E.js";import{DEFAULT_PICK_WORDS as t}from"../chunk-OFBZOI6W.js";import{DEFAULT_CANVAS_WORDS as c}from"../chunk-TBY3DFKS.js";import{DEFAULT_TREE_WORDS as e}from"../chunk-K56YDHYQ.js";import{DEFAULT_PANEL_WORDS as m}from"../chunk-KFV7N2DJ.js";import{DEFAULT_NODE_MENU_WORDS as i}from"../chunk-WK3AFPXY.js";import{DEFAULT_SAVE_WORDS as s}from"../chunk-H6DDIBQ4.js";import{DEFAULT_COPY_WORDS as u}from"../chunk-KRL3IUV3.js";import{DEFAULT_FIELDS_WORDS as f}from"../chunk-JACEEVVF.js";import{DEFAULT_CHROME_WORDS as p,DEFAULT_NOTICE_WORDS as l}from"../chunk-AJSDWWJW.js";import{DEFAULT_RAIL_WORDS as h}from"../chunk-2OAZYSWJ.js";import{DEFAULT_LOCK_WORDS as j}from"../chunk-RE4LP46F.js";import{stringsContext as k}from"../chunk-MFIRYGHW.js";import{DEFAULT_DRAG_WORDS as a}from"../chunk-TQ5Y6S2X.js";import{useContext as W,useMemo as Y}from"react";import{jsx as y}from"react/jsx-runtime";var F={notice:l,lock:j,save:s,chrome:p,rail:h,tree:e,panel:m,fields:f,pick:t,drag:a,menu:i,styleClipboard:o,copy:u,canvas:c,textStyles:n,screen:r},d=r=>"object"==typeof r&&null!==r;function v(r,o){const n={};for(const t of Object.keys(r)){const c=r[t],e=o[t];null==e?n[t]=c:d(c)?n[t]=d(e)?v(c,e):c:n[t]=typeof e==typeof c?e:c}return n}function D(r,o){return o?v(r,o):r}function J({value:r,locale:o,children:n}){const t=k(),c=W(t),e=c?.strings??F,m=o??c?.locale??"en",i=Y(()=>({strings:D(e,r),locale:m}),[e,r,m]);/* @__PURE__ */
2
+ return y(t.Provider,{value:i,children:n})}function K(){return W(k())?.strings??F}function E(){return W(k())?.locale??"en"}export{F as DEFAULT_EASEL_STRINGS,J as EaselStringsProvider,D as mergeEaselStrings,E as useEaselLocale,K as useEaselStrings};
@@ -1,36 +1,36 @@
1
- import{hexReadout as e,ColourWindow as s,typedHex as t}from"../chunk-U6LJ5UKD.js";import{DEFAULT_TEXT_STYLES_WORDS as a}from"../chunk-OGH6CC3E.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-OGH6CC3E.js";import"../chunk-OFBZOI6W.js";import{FieldSlider as n}from"../chunk-ZEH6QLBH.js";import{FieldSelect as l}from"../chunk-QAJAEWCZ.js";import"../chunk-WRFD4EXD.js";import{useWords as i}from"../chunk-MFIRYGHW.js";import{withTip as r}from"../chunk-P2VEMZH5.js";import{TEXT_STYLE_KINDS as o,canAddTextStyle as d,TEXT_STYLE_MAX as c,isDefaultTextStyle as u,CAMPAIGN_TEXT_STYLE_SETTINGS as m,TEXT_STYLE_SETTINGS as h,textStyleRowSize as f,describeTextStyle as p,updateTextStyle as v,textStyleCaseCss as y,TEXT_STYLE_CASES as S,addTextStyle as g,removeTextStyle as b,TEXT_STYLE_RANGES as k}from"../chunk-YHZSBL2N.js";export{CAMPAIGN_TEXT_STYLE_SETTINGS,TEXT_STYLE_CASES,TEXT_STYLE_CASE_CSS,TEXT_STYLE_DEFAULT_COUNT,TEXT_STYLE_KINDS,TEXT_STYLE_MAX,TEXT_STYLE_RANGES,TEXT_STYLE_SETTINGS,addTextStyle,canAddTextStyle,defaultTextStyles,describeTextStyle,isDefaultTextStyle,isTextStyleCase,removeTextStyle,resolveTextStyle,textStyleCaseCss,textStyleCaseOfCss,textStyleRowSize,updateTextStyle,weightWord}from"../chunk-YHZSBL2N.js";import{hsvToHex as N,Tooltip as C,ColorSwatch as x,IconButton as T}from"efficient-shell/ui";import{useState as w,useRef as E,useId as z,useEffect as O,Fragment as _}from"react";import{TrashIcon as L,ChevronIcon as A,BoldIcon as j,ItalicIcon as M,CaseLowerIcon as $,CaseCapitalizedIcon as D,CaseUpperIcon as W,CaseNormalIcon as Y}from"efficient-shell/icons/efficient";import{jsxs as I,jsx as X,Fragment as H}from"react/jsx-runtime";var B=`conic-gradient(${[0,60,120,180,240,300,0].map(e=>N({h:e,s:1,v:1})).join(", ")})`;function F({value:t,hex:a,colours:n,label:l,followsWord:i,anyWord:r,onChange:o,readOnly:d=!1}){const[c,u]=w(!1),m=E(null),h=E(null),f=z(),p=void 0!==t&&n.some(e=>e.key===t),v=void 0!==t&&!p;return O(()=>{if(!c)return;const e=m.current?.ownerDocument;if(!e)return;const s=e=>{m.current&&!m.current.contains(e.target)&&u(!1)};return e.addEventListener("click",s,!0),()=>e.removeEventListener("click",s,!0)},[c]),/* @__PURE__ */I("div",{ref:m,className:"es-ts-set","data-ts-setting":"color",children:[
2
- /* @__PURE__ */I("div",{className:"es-ts-top",children:[
1
+ import{hexReadout as e,ColourWindow as s,typedHex as t}from"../chunk-U6LJ5UKD.js";import{DEFAULT_TEXT_STYLES_WORDS as a}from"../chunk-OGH6CC3E.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-OGH6CC3E.js";import"../chunk-OFBZOI6W.js";import{FieldSlider as n}from"../chunk-ZEH6QLBH.js";import{TEXT_STYLE_KINDS as l,canAddTextStyle as i,TEXT_STYLE_MAX as r,isDefaultTextStyle as o,CAMPAIGN_TEXT_STYLE_SETTINGS as d,TEXT_STYLE_SETTINGS as c,textStyleRowSize as u,describeTextStyle as m,updateTextStyle as h,textStyleCaseCss as f,TEXT_STYLE_CASES as p,addTextStyle as v,removeTextStyle as y,TEXT_STYLE_RANGES as S}from"../chunk-YHZSBL2N.js";export{CAMPAIGN_TEXT_STYLE_SETTINGS,TEXT_STYLE_CASES,TEXT_STYLE_CASE_CSS,TEXT_STYLE_DEFAULT_COUNT,TEXT_STYLE_KINDS,TEXT_STYLE_MAX,TEXT_STYLE_RANGES,TEXT_STYLE_SETTINGS,addTextStyle,canAddTextStyle,defaultTextStyles,describeTextStyle,isDefaultTextStyle,isTextStyleCase,removeTextStyle,resolveTextStyle,textStyleCaseCss,textStyleCaseOfCss,textStyleRowSize,updateTextStyle,weightWord}from"../chunk-YHZSBL2N.js";import{FieldSelect as g}from"../chunk-KFWNGPW3.js";import"../chunk-JACEEVVF.js";import{useWords as b}from"../chunk-MFIRYGHW.js";import{withTip as k}from"../chunk-P2VEMZH5.js";import{hsvToHex as N,Tooltip as C,ColorSwatch as x,IconButton as T}from"efficient-shell/ui";import{useState as w,useRef as E,useId as z,useEffect as O,Fragment as _}from"react";import{TrashIcon as L,ChevronIcon as A,BoldIcon as j,ItalicIcon as M,CaseLowerIcon as $,CaseCapitalizedIcon as W,CaseUpperIcon as Y,CaseNormalIcon as I}from"efficient-shell/icons/efficient";import{jsxs as D,jsx as X,Fragment as F}from"react/jsx-runtime";var H=`conic-gradient(${[0,60,120,180,240,300,0].map(e=>N({h:e,s:1,v:1})).join(", ")})`;function P({value:t,hex:a,colours:n,label:l,followsWord:i,anyWord:r,onChange:o,readOnly:d=!1}){const[c,u]=w(!1),m=E(null),h=E(null),f=z(),p=void 0!==t&&n.some(e=>e.key===t),v=void 0!==t&&!p;return O(()=>{if(!c)return;const e=m.current?.ownerDocument;if(!e)return;const s=e=>{m.current&&!m.current.contains(e.target)&&u(!1)};return e.addEventListener("click",s,!0),()=>e.removeEventListener("click",s,!0)},[c]),/* @__PURE__ */D("div",{ref:m,className:"es-ts-set","data-ts-setting":"color",children:[
2
+ /* @__PURE__ */D("div",{className:"es-ts-top",children:[
3
3
  /* @__PURE__ */X("span",{className:"es-ts-sub",children:l}),
4
4
  /* @__PURE__ */X("span",{className:"es-ts-colour-read",children:a?e(a):i})]}),
5
- /* @__PURE__ */I("div",{className:"es-ts-swatches",role:"group","aria-label":l,children:[n.map(s=>/* @__PURE__ */X(C,{content:`${s.name} · ${e(s.value)}`,children:/* @__PURE__ */X(x,{color:s.value,size:"sm",className:"es-ts-swatch","aria-label":s.name,selected:t===s.key,disabled:d,onClick:()=>o(s.key)})},s.key)),
6
- /* @__PURE__ */X(C,{content:r,children:/* @__PURE__ */X(x,{ref:h,color:B,size:"sm",className:"es-ts-swatch es-ts-swatch--any","aria-label":r,selected:v,"aria-expanded":c,"aria-controls":c?f:void 0,disabled:d,onClick:()=>u(e=>!e)})})]}),c?/* @__PURE__ */X(s,{id:f,value:a??"",onChange:e=>o(e),label:l,readOnly:d,onClose:()=>{u(!1),h.current?.focus()}}):null]})}function P({styles:e,onChange:s,fonts:t,colours:n=[],settings:l=m,auto:h=[],fallback:f,sample:p,openId:v,defaultOpenId:y=null,onOpenChange:S,onAdd:k,rowActions:N,onRemove:C,max:x=c,device:T="desktop",readOnly:_=!1}){const A=i("textStyles",a),j=z(),[M,$]=w(y),D=void 0!==v?v:M,W=e=>{void 0===v&&$(e),S?.(e)},Y=E(null),[B,F]=w(null);O(()=>{if(!B||!Y.current)return;const e=[...Y.current.querySelectorAll(".es-ts-item")].find(e=>e.dataset.tsId===B.id),s=e?e.querySelector(".es-ts-row"):Y.current.querySelector(`.es-ts-add[data-ts-kind="${B.kind}"]`);s?.focus(),F(null)},[B]);/* @__PURE__ */
7
- return X("div",{className:"es-ts",ref:Y,children:o.map(a=>{const i=e.filter(e=>e.kind===a),o=!d(e,a,x),c=!_&&!o;/* @__PURE__ */
8
- return I(R,{label:A.groups[a],children:[i.map(a=>{const i=N?.(a),o=null!=i&&!1!==i,d=Boolean(C)&&!_&&!u(a);/* @__PURE__ */
9
- return X(G,{style:a,fonts:t,colours:n,settings:l,auto:h,fallback:f,sample:p,device:T,readOnly:_,open:D===a.id,onOpenChange:e=>W(e?a.id:null),onChange:t=>s(e.map(e=>e.id===t.id?t:e)),actions:d||o?/* @__PURE__ */I(H,{children:[d?r(A.remove,/* @__PURE__ */X("button",{type:"button",className:"es-ts-del","aria-label":A.removeNamed({name:a.name}),onClick:()=>(t=>{if(_||!C)return;const a=b(e,t.id,{name:A.styleName});if(!a)return;const n=e.filter(e=>e.kind===t.kind),l=n[n.indexOf(t)+1];D===t.id&&W(null),s(a.styles),C(a.removed),F({id:l?.id??null,kind:t.kind})})(a),children:/* @__PURE__ */X(L,{size:14,"aria-hidden":"true"})})):null,o?i:null]}):null},a.id)}),r(!_&&o?A.full({kind:a,max:x}):void 0,/* @__PURE__ */I("button",{type:"button",className:"es-ts-add","data-ts-kind":a,disabled:_,"aria-disabled":!(_||!o)||void 0,"aria-describedby":!_&&o?`${j}-full-${a}`:void 0,onClick:()=>{c&&(t=>{if(_)return;const a=g(e,t,{max:x,name:A.styleName,make:k});a&&s(a.styles)})(a)},children:[
5
+ /* @__PURE__ */D("div",{className:"es-ts-swatches",role:"group","aria-label":l,children:[n.map(s=>/* @__PURE__ */X(C,{content:`${s.name} · ${e(s.value)}`,children:/* @__PURE__ */X(x,{color:s.value,size:"sm",className:"es-ts-swatch","aria-label":s.name,selected:t===s.key,disabled:d,onClick:()=>o(s.key)})},s.key)),
6
+ /* @__PURE__ */X(C,{content:r,children:/* @__PURE__ */X(x,{ref:h,color:H,size:"sm",className:"es-ts-swatch es-ts-swatch--any","aria-label":r,selected:v,"aria-expanded":c,"aria-controls":c?f:void 0,disabled:d,onClick:()=>u(e=>!e)})})]}),c?/* @__PURE__ */X(s,{id:f,value:a??"",onChange:e=>o(e),label:l,readOnly:d,onClose:()=>{u(!1),h.current?.focus()}}):null]})}function B({styles:e,onChange:s,fonts:t,colours:n=[],settings:c=d,auto:u=[],fallback:m,sample:h,openId:f,defaultOpenId:p=null,onOpenChange:S,onAdd:g,rowActions:N,onRemove:C,max:x=r,device:T="desktop",readOnly:_=!1}){const A=b("textStyles",a),j=z(),[M,$]=w(p),W=void 0!==f?f:M,Y=e=>{void 0===f&&$(e),S?.(e)},I=E(null),[H,P]=w(null);O(()=>{if(!H||!I.current)return;const e=[...I.current.querySelectorAll(".es-ts-item")].find(e=>e.dataset.tsId===H.id),s=e?e.querySelector(".es-ts-row"):I.current.querySelector(`.es-ts-add[data-ts-kind="${H.kind}"]`);s?.focus(),P(null)},[H]);/* @__PURE__ */
7
+ return X("div",{className:"es-ts",ref:I,children:l.map(a=>{const l=e.filter(e=>e.kind===a),r=!i(e,a,x),d=!_&&!r;/* @__PURE__ */
8
+ return D(G,{label:A.groups[a],children:[l.map(a=>{const l=N?.(a),i=null!=l&&!1!==l,r=Boolean(C)&&!_&&!o(a);/* @__PURE__ */
9
+ return X(R,{style:a,fonts:t,colours:n,settings:c,auto:u,fallback:m,sample:h,device:T,readOnly:_,open:W===a.id,onOpenChange:e=>Y(e?a.id:null),onChange:t=>s(e.map(e=>e.id===t.id?t:e)),actions:r||i?/* @__PURE__ */D(F,{children:[r?k(A.remove,/* @__PURE__ */X("button",{type:"button",className:"es-ts-del","aria-label":A.removeNamed({name:a.name}),onClick:()=>(t=>{if(_||!C)return;const a=y(e,t.id,{name:A.styleName});if(!a)return;const n=e.filter(e=>e.kind===t.kind),l=n[n.indexOf(t)+1];W===t.id&&Y(null),s(a.styles),C(a.removed),P({id:l?.id??null,kind:t.kind})})(a),children:/* @__PURE__ */X(L,{size:14,"aria-hidden":"true"})})):null,i?l:null]}):null},a.id)}),k(!_&&r?A.full({kind:a,max:x}):void 0,/* @__PURE__ */D("button",{type:"button",className:"es-ts-add","data-ts-kind":a,disabled:_,"aria-disabled":!(_||!r)||void 0,"aria-describedby":!_&&r?`${j}-full-${a}`:void 0,onClick:()=>{d&&(t=>{if(_)return;const a=v(e,t,{max:x,name:A.styleName,make:g});a&&s(a.styles)})(a)},children:[
10
10
  /* @__PURE__ */X("span",{className:"es-ts-add-word",children:A.add[a]}),
11
- /* @__PURE__ */X("span",{className:"es-ts-count",children:A.count({n:i.length,max:x})})]})),_||!o?null:/* @__PURE__ */X("span",{id:`${j}-full-${a}`,className:"es-vh",children:A.full({kind:a,max:x})})]},a)})})}function R({label:e,children:s}){const t=z();/* @__PURE__ */
12
- return I("section",{className:"es-ts-section","aria-labelledby":t,children:[
13
- /* @__PURE__ */X("div",{className:"es-ts-group",id:t,children:e}),s]})}function G({style:e,fonts:s,colours:t=[],settings:n=m,auto:l=[],fallback:r,sample:o,open:d,onOpenChange:c,onChange:u,actions:y,device:S="desktop",readOnly:g=!1}){const b=i("textStyles",a),k=`${z()}-open-${e.id}`,N=new Set(l),C=h.filter(e=>n.includes(e)),x={...r?.(e)??{},...e.values},T="phone"===S,w=T&&void 0!==e.values.sizePhone?{...x,size:e.values.sizePhone}:x,E=s.find(e=>e.value===x.font),O={fontFamily:E?.family,fontSize:`${f(w.size??16)}px`,fontWeight:x.weight,fontStyle:x.italic?"italic":void 0};/* @__PURE__ */
14
- return I(_,{children:[
15
- /* @__PURE__ */I("div",{className:"es-ts-item","data-ts-id":e.id,children:[
16
- /* @__PURE__ */I("button",{type:"button",className:"es-ts-row","aria-expanded":d,"aria-controls":d?k:void 0,onClick:()=>c(!d),children:[
11
+ /* @__PURE__ */X("span",{className:"es-ts-count",children:A.count({n:l.length,max:x})})]})),_||!r?null:/* @__PURE__ */X("span",{id:`${j}-full-${a}`,className:"es-vh",children:A.full({kind:a,max:x})})]},a)})})}function G({label:e,children:s}){const t=z();/* @__PURE__ */
12
+ return D("section",{className:"es-ts-section","aria-labelledby":t,children:[
13
+ /* @__PURE__ */X("div",{className:"es-ts-group",id:t,children:e}),s]})}function R({style:e,fonts:s,colours:t=[],settings:n=d,auto:l=[],fallback:i,sample:r,open:o,onOpenChange:f,onChange:p,actions:v,device:y="desktop",readOnly:S=!1}){const g=b("textStyles",a),k=`${z()}-open-${e.id}`,N=new Set(l),C=c.filter(e=>n.includes(e)),x={...i?.(e)??{},...e.values},T="phone"===y,w=T&&void 0!==e.values.sizePhone?{...x,size:e.values.sizePhone}:x,E=s.find(e=>e.value===x.font),O={fontFamily:E?.family,fontSize:`${u(w.size??16)}px`,fontWeight:x.weight,fontStyle:x.italic?"italic":void 0};/* @__PURE__ */
14
+ return D(_,{children:[
15
+ /* @__PURE__ */D("div",{className:"es-ts-item","data-ts-id":e.id,children:[
16
+ /* @__PURE__ */D("button",{type:"button",className:"es-ts-row","aria-expanded":o,"aria-controls":o?k:void 0,onClick:()=>f(!o),children:[
17
17
  /* @__PURE__ */X("span",{className:"es-ts-chev","aria-hidden":"true",children:/* @__PURE__ */X(A,{size:12})}),
18
18
  /* @__PURE__ */X("span",{className:"es-ts-name",style:O,children:e.name}),
19
- /* @__PURE__ */X("span",{className:"es-ts-meta",children:p(w,s,b,{autoSize:N.has("size")&&w===x&&void 0===e.values.size})})]}),y?/* @__PURE__ */X("div",{className:"es-ts-actions",children:y}):null]}),d?/* @__PURE__ */X("div",{className:"es-ts-open",id:k,children:/* @__PURE__ */X(Z,{style:e,values:x,fonts:s,colours:t,settings:C,autoSet:N,sample:o??b.sample,words:b,phone:T,readOnly:g,set:s=>u(v([e],e.id,s)[0])})}):null]})}var U={none:Y,upper:W,capitalize:D,lower:$};function Z({style:e,values:s,fonts:a,colours:l,settings:i,autoSet:o,sample:d,words:c,phone:u,readOnly:m,set:h}){const f=e.values,p=a.find(e=>e.value===s.font),v=function(e,s){return e?s.find(s=>s.key===e)?.value??t(e)??void 0:void 0}(s.color,l),S=e=>"largestSize"===e||o.has(e),g=e=>S(e)?f[e]:s[e],b=g("size"),N=u&&void 0!==f.sizePhone?f.sizePhone:b,C=g("lineSpacing"),x=g("letterSpacing"),w=S("letterCase")?f.letterCase:s.letterCase,E={fontFamily:p?.family,fontSize:void 0===N?void 0:`${N}px`,fontWeight:s.weight,fontStyle:s.italic?"italic":void 0,lineHeight:void 0===C?void 0:String(C/100),letterSpacing:void 0===x?void 0:`${x}px`,color:v,textTransform:y(w)},z=e=>{const t=k[e],a=S(e);/* @__PURE__ */
20
- return X("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */X(n,{label:c.settings[e],value:f[e],onChange:s=>h({[e]:s}),min:t.min,max:t.max,step:t.step,shiftStep:t.shiftStep,sliderMin:t.sliderMin,sliderMax:t.sliderMax,unit:t.unit||void 0,styleValue:a?void 0:s[e],auto:a?c.auto:void 0,readOnly:m})},e)};/* @__PURE__ */
21
- return I(H,{children:[
22
- /* @__PURE__ */X("div",{className:"es-ts-preview",style:E,"aria-label":c.preview,children:d}),i.map(t=>{switch(t){case"font":/* @__PURE__ */
23
- return X(q,{value:f.font,fonts:a,words:c,readOnly:m,set:h},t);case"color":/* @__PURE__ */
24
- return X(K,{value:f.color,hex:v,colours:l,words:c,readOnly:m,set:h},t);case"emphasis":{const e=(s.weight??400)>=600,a=!1!==p?.italic;/* @__PURE__ */
25
- return I("div",{className:"es-ts-set","data-ts-setting":t,children:[
26
- /* @__PURE__ */X("span",{className:"es-ts-sub",children:c.settings.emphasis}),
27
- /* @__PURE__ */I("div",{className:"es-ts-icons",children:[r(c.bold,/* @__PURE__ */X(T,{className:"es-ts-icon","aria-label":c.bold,"aria-pressed":e,disabled:m,onClick:()=>h({weight:e?400:700}),children:/* @__PURE__ */X(j,{size:16})})),m||a?r(c.italic,/* @__PURE__ */X(T,{className:"es-ts-icon","aria-label":c.italic,"aria-pressed":Boolean(s.italic),disabled:m,onClick:()=>h({italic:!s.italic||void 0}),children:/* @__PURE__ */X(M,{size:16})})):/* @__PURE__ */X(T,{className:"es-ts-icon","aria-label":c.italic,"aria-pressed":Boolean(s.italic),"aria-disabled":!0,disabledReason:c.italicMissing,children:/* @__PURE__ */X(M,{size:16})})]})]},t)}case"letterCase":/* @__PURE__ */
28
- return X(V,{value:f.letterCase??s.letterCase,auto:S("letterCase"),words:c,readOnly:m,set:h},t);case"largestSize":return"heading"===e.kind?z(t):null;case"size":return u?(()=>{const e=k.size;/* @__PURE__ */
29
- return X("div",{className:"es-ts-slider","data-ts-setting":"size","data-ts-device":"phone",children:/* @__PURE__ */X(n,{label:c.settings.size,value:f.sizePhone,onChange:e=>h({sizePhone:e}),min:e.min,max:e.max,step:e.step,shiftStep:e.shiftStep,sliderMin:e.sliderMin,sliderMax:e.sliderMax,unit:e.unit||void 0,styleValue:b,readOnly:m})},"size")})():z(t);default:return z(t)}})]})}function q({value:e,fonts:s,words:t,readOnly:a,set:n}){const i=z();/* @__PURE__ */
30
- return I("div",{className:"es-ts-set","data-ts-setting":"font",children:[
31
- /* @__PURE__ */X("span",{className:"es-ts-sub",id:i,children:t.settings.font}),
32
- /* @__PURE__ */X(l,{value:e,options:s.map(e=>({label:e.label,value:e.value})),onChange:e=>n({font:e}),ariaLabelledBy:i,readOnly:a})]})}function K({value:e,hex:s,colours:t,words:a,readOnly:n,set:l}){/* @__PURE__ */
33
- return X(F,{value:e,hex:s,colours:t,label:a.settings.color,followsWord:a.colour.follows,anyWord:a.colour.any,readOnly:n,onChange:e=>l({color:e})})}function V({value:e,auto:s,words:t,readOnly:a,set:n}){const l=s?["auto",...S]:S,i=e??(s?"auto":"none"),o=E([]),d=e=>n({letterCase:"auto"===e?void 0:e});/* @__PURE__ */
34
- return I("div",{className:"es-ts-set","data-ts-setting":"letterCase",children:[
19
+ /* @__PURE__ */X("span",{className:"es-ts-meta",children:m(w,s,g,{autoSize:N.has("size")&&w===x&&void 0===e.values.size})})]}),v?/* @__PURE__ */X("div",{className:"es-ts-actions",children:v}):null]}),o?/* @__PURE__ */X("div",{className:"es-ts-open",id:k,children:/* @__PURE__ */X(V,{style:e,values:x,fonts:s,colours:t,settings:C,autoSet:N,sample:r??g.sample,words:g,phone:T,readOnly:S,set:s=>p(h([e],e.id,s)[0])})}):null]})}var U={none:I,upper:Y,capitalize:W,lower:$};function V({style:e,values:s,fonts:a,colours:l,settings:i,autoSet:r,sample:o,words:d,phone:c,readOnly:u,set:m}){const h=e.values,p=a.find(e=>e.value===s.font),v=function(e,s){return e?s.find(s=>s.key===e)?.value??t(e)??void 0:void 0}(s.color,l),y=e=>"largestSize"===e||r.has(e),g=e=>y(e)?h[e]:s[e],b=g("size"),N=c&&void 0!==h.sizePhone?h.sizePhone:b,C=g("lineSpacing"),x=g("letterSpacing"),w=y("letterCase")?h.letterCase:s.letterCase,E={fontFamily:p?.family,fontSize:void 0===N?void 0:`${N}px`,fontWeight:s.weight,fontStyle:s.italic?"italic":void 0,lineHeight:void 0===C?void 0:String(C/100),letterSpacing:void 0===x?void 0:`${x}px`,color:v,textTransform:f(w)},z=e=>{const t=S[e],a=y(e);/* @__PURE__ */
20
+ return X("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */X(n,{label:d.settings[e],value:h[e],onChange:s=>m({[e]:s}),min:t.min,max:t.max,step:t.step,shiftStep:t.shiftStep,sliderMin:t.sliderMin,sliderMax:t.sliderMax,unit:t.unit||void 0,styleValue:a?void 0:s[e],auto:a?d.auto:void 0,readOnly:u})},e)};/* @__PURE__ */
21
+ return D(F,{children:[
22
+ /* @__PURE__ */X("div",{className:"es-ts-preview",style:E,"aria-label":d.preview,children:o}),i.map(t=>{switch(t){case"font":/* @__PURE__ */
23
+ return X(Z,{value:h.font,fonts:a,words:d,readOnly:u,set:m},t);case"color":/* @__PURE__ */
24
+ return X(K,{value:h.color,hex:v,colours:l,words:d,readOnly:u,set:m},t);case"emphasis":{const e=(s.weight??400)>=600,a=!1!==p?.italic;/* @__PURE__ */
25
+ return D("div",{className:"es-ts-set","data-ts-setting":t,children:[
26
+ /* @__PURE__ */X("span",{className:"es-ts-sub",children:d.settings.emphasis}),
27
+ /* @__PURE__ */D("div",{className:"es-ts-icons",children:[k(d.bold,/* @__PURE__ */X(T,{className:"es-ts-icon","aria-label":d.bold,"aria-pressed":e,disabled:u,onClick:()=>m({weight:e?400:700}),children:/* @__PURE__ */X(j,{size:16})})),u||a?k(d.italic,/* @__PURE__ */X(T,{className:"es-ts-icon","aria-label":d.italic,"aria-pressed":Boolean(s.italic),disabled:u,onClick:()=>m({italic:!s.italic||void 0}),children:/* @__PURE__ */X(M,{size:16})})):/* @__PURE__ */X(T,{className:"es-ts-icon","aria-label":d.italic,"aria-pressed":Boolean(s.italic),"aria-disabled":!0,disabledReason:d.italicMissing,children:/* @__PURE__ */X(M,{size:16})})]})]},t)}case"letterCase":/* @__PURE__ */
28
+ return X(q,{value:h.letterCase??s.letterCase,auto:y("letterCase"),words:d,readOnly:u,set:m},t);case"largestSize":return"heading"===e.kind?z(t):null;case"size":return c?(()=>{const e=S.size;/* @__PURE__ */
29
+ return X("div",{className:"es-ts-slider","data-ts-setting":"size","data-ts-device":"phone",children:/* @__PURE__ */X(n,{label:d.settings.size,value:h.sizePhone,onChange:e=>m({sizePhone:e}),min:e.min,max:e.max,step:e.step,shiftStep:e.shiftStep,sliderMin:e.sliderMin,sliderMax:e.sliderMax,unit:e.unit||void 0,styleValue:b,readOnly:u})},"size")})():z(t);default:return z(t)}})]})}function Z({value:e,fonts:s,words:t,readOnly:a,set:n}){const l=z();/* @__PURE__ */
30
+ return D("div",{className:"es-ts-set","data-ts-setting":"font",children:[
31
+ /* @__PURE__ */X("span",{className:"es-ts-sub",id:l,children:t.settings.font}),
32
+ /* @__PURE__ */X(g,{value:e,options:s.map(e=>({label:e.label,value:e.value})),onChange:e=>n({font:e}),ariaLabelledBy:l,readOnly:a})]})}function K({value:e,hex:s,colours:t,words:a,readOnly:n,set:l}){/* @__PURE__ */
33
+ return X(P,{value:e,hex:s,colours:t,label:a.settings.color,followsWord:a.colour.follows,anyWord:a.colour.any,readOnly:n,onChange:e=>l({color:e})})}function q({value:e,auto:s,words:t,readOnly:a,set:n}){const l=s?["auto",...p]:p,i=e??(s?"auto":"none"),r=E([]),o=e=>n({letterCase:"auto"===e?void 0:e});/* @__PURE__ */
34
+ return D("div",{className:"es-ts-set","data-ts-setting":"letterCase",children:[
35
35
  /* @__PURE__ */X("span",{className:"es-ts-sub",children:t.settings.letterCase}),
36
- /* @__PURE__ */X("div",{className:"es-ts-icons",role:"radiogroup","aria-label":t.settings.letterCase,onKeyDown:e=>{const s="ArrowRight"===e.key||"ArrowDown"===e.key?1:"ArrowLeft"===e.key||"ArrowUp"===e.key?-1:0;if(!s||a)return;e.preventDefault();const t=(l.indexOf(i)+s+l.length)%l.length;d(l[t]),o.current[t]?.focus()},children:l.map((e,s)=>{const n=e===i;if("auto"===e)return r(t.case.autoTitle,/* @__PURE__ */X(T,{ref:e=>{o.current[s]=e},role:"radio",pressed:n,className:"es-ts-icon es-ts-icon--word","aria-checked":n,"aria-label":t.case.auto,tabIndex:n?0:-1,disabled:a,onClick:()=>d(e),children:t.case.auto},e));const l=U[e];return r(t.case[e],/* @__PURE__ */X(T,{ref:e=>{o.current[s]=e},role:"radio",pressed:n,className:"es-ts-icon","aria-checked":n,"aria-label":t.case[e],tabIndex:n?0:-1,disabled:a,onClick:()=>d(e),children:/* @__PURE__ */X(l,{size:16})},e))})})]})}export{F as ColourSwatchRow,G as TextStyleItem,R as TextStylesGroup,P as TextStylesList};
36
+ /* @__PURE__ */X("div",{className:"es-ts-icons",role:"radiogroup","aria-label":t.settings.letterCase,onKeyDown:e=>{const s="ArrowRight"===e.key||"ArrowDown"===e.key?1:"ArrowLeft"===e.key||"ArrowUp"===e.key?-1:0;if(!s||a)return;e.preventDefault();const t=(l.indexOf(i)+s+l.length)%l.length;o(l[t]),r.current[t]?.focus()},children:l.map((e,s)=>{const n=e===i;if("auto"===e)return k(t.case.autoTitle,/* @__PURE__ */X(T,{ref:e=>{r.current[s]=e},role:"radio",pressed:n,className:"es-ts-icon es-ts-icon--word","aria-checked":n,"aria-label":t.case.auto,tabIndex:n?0:-1,disabled:a,onClick:()=>o(e),children:t.case.auto},e));const l=U[e];return k(t.case[e],/* @__PURE__ */X(T,{ref:e=>{r.current[s]=e},role:"radio",pressed:n,className:"es-ts-icon","aria-checked":n,"aria-label":t.case[e],tabIndex:n?0:-1,disabled:a,onClick:()=>o(e),children:/* @__PURE__ */X(l,{size:16})},e))})})]})}export{P as ColourSwatchRow,R as TextStyleItem,G as TextStylesGroup,B as TextStylesList};
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
- import { L as LayersTreeProps, S as SubtreeProps, a as TreeGroupLabelProps, b as TreeEmptySlotProps, c as TreeRowProps, d as TreeRowActionProps, e as TreeSeamProps } from '../types-Bqq6ya0y.js';
3
- export { f as TreeRowFold, T as TreeRowMark } from '../types-Bqq6ya0y.js';
2
+ import { L as LayersTreeProps, S as SubtreeProps, a as TreeGroupLabelProps, b as TreeEmptySlotProps, c as TreeRowProps, d as TreeRowActionProps, e as TreeSeamProps } from '../types-DBy3L69b.js';
3
+ export { f as TreeRowFold, T as TreeRowMark } from '../types-DBy3L69b.js';
4
4
  export { T as TreeWords } from '../words-Cl9xMUYY.js';
5
5
  import 'efficient-shell/ui';
6
6
 
@@ -15,7 +15,7 @@ declare function LayersTree({ className, children, rootProps, ariaLabel, words }
15
15
  * with its count and its fold (efficient-shell, "TreeGroupLabel takes a count
16
16
  * and folds"): the Pages panel's headings and the Layers panel's are one.
17
17
  */
18
- declare function TreeGroupLabel({ children, count, expanded, onToggle }: TreeGroupLabelProps): react.JSX.Element;
18
+ declare function TreeGroupLabel({ children, count, countLabel, expanded, onToggle }: TreeGroupLabelProps): react.JSX.Element;
19
19
  /**
20
20
  * The rows one level down: the shell's `TreeGroup` (`role="group"`, the indent
21
21
  * and the hairline — the only thing in the tree that says depth), and one more
@@ -53,7 +53,7 @@ declare const TREE_DRAG_HINT: string;
53
53
  * selected wherever the old name button did not) is selected by that onClick
54
54
  * alone on a click, and by `onSelect` from the keyboard (Enter, Space).
55
55
  */
56
- declare function TreeRow({ icon, name, preview, selected, hidden, draggable, dragHint, dragging, drop, fold, actions, nameSlot, onSelect, marks, badge, trailing, shared, children, rowProps, level, words, }: TreeRowProps): react.JSX.Element;
56
+ declare function TreeRow({ icon, name, preview, selected, hidden, draggable, dragHint, dragging, drop, fold, actions, nameSlot, onSelect, marks, badge, count, countLabel, trailing, shared, children, rowProps, level, words, }: TreeRowProps): react.JSX.Element;
57
57
  /**
58
58
  * An action over the end of a row's name — delete (the danger tone) or show /
59
59
  * hide, or any other: the shell's `IconButton` with its `Tooltip`. Pressing it
@@ -1 +1 @@
1
- export{LayersTree,Subtree,TREE_DRAG_HINT,TreeEmptySlot,TreeGroupLabel,TreeRow,TreeRowAction,TreeSeam}from"../chunk-A6Z4SD3I.js";import"../chunk-K56YDHYQ.js";
1
+ export{LayersTree,Subtree,TREE_DRAG_HINT,TreeEmptySlot,TreeGroupLabel,TreeRow,TreeRowAction,TreeSeam}from"../chunk-WHS6Y55E.js";import"../chunk-K56YDHYQ.js";
@@ -15,8 +15,10 @@ type LayersTreeProps = {
15
15
  };
16
16
  type TreeGroupLabelProps = {
17
17
  children: ReactNode;
18
- /** How many rows it heads, in the shell's count pill at its end — "MAIN PAGES 3". */
18
+ /** How many rows it heads: the shell's `ItemCount` at its end — "MAIN PAGES 3". */
19
19
  count?: ReactNode;
20
+ /** What `count` counts, in full words — "3 pages". Default "N items". */
21
+ countLabel?: string;
20
22
  /** Present when the heading folds the rows under it: whether they show. The
21
23
  * heading is then the shell's button, with `aria-expanded` and the row's caret. */
22
24
  expanded?: boolean;
@@ -78,11 +80,16 @@ type TreeRowProps = {
78
80
  /** Named state glyphs drawn right after the name — "Hidden on phones". */
79
81
  marks?: ReadonlyArray<TreeRowMark>;
80
82
  /**
81
- * The pill after the name: a count or position ("1 of 2"), or a tag with a
82
- * status tone (`{ label: 'Dynamic', tone: 'info' }`), or several tags. The
83
- * shell's one pill draws all three (efficient-shell 7.70.0, `TreeBadge`).
83
+ * A tag after the name: a position ("1 of 2"), a status tone
84
+ * (`{ label: 'Dynamic', tone: 'info' }`), or several tags. A COUNT is
85
+ * `count`, not a badge.
84
86
  */
85
87
  badge?: ReactNode | TreeBadge | readonly TreeBadge[];
88
+ /** How many things the row holds: the shell's `ItemCount` at the row's END
89
+ * (Lewis, 2026-10-23). */
90
+ count?: number;
91
+ /** What `count` counts, in full words — "3 locations". Default "N items". */
92
+ countLabel?: string;
86
93
  /** A non-interactive named mark — the Lock on a pinned section. Drawn after the marks. */
87
94
  trailing?: {
88
95
  label: string;
@@ -29,6 +29,11 @@ type FieldsWords = {
29
29
  noun: string;
30
30
  n: number;
31
31
  }) => string;
32
+ /** How many items, in words: the head's count Tooltip and screen-reader text. */
33
+ count: (v: {
34
+ noun: string;
35
+ n: number;
36
+ }) => string;
32
37
  /** Where the open item sits: "2 of 5". */
33
38
  position: (v: {
34
39
  n: number;
@@ -32,6 +32,12 @@ type DragWords = {
32
32
  tile: (v: {
33
33
  label: string;
34
34
  }) => string;
35
+ /** A group's count, in words: its Tooltip and its screen-reader text.
36
+ * `sections` is true for a group of cards (sections with covers). */
37
+ count: (v: {
38
+ count: number;
39
+ sections: boolean;
40
+ }) => string;
35
41
  };
36
42
  canvas: {
37
43
  /** The button in a gap between two sections. */