efficient-easel 0.105.1 → 0.106.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/README.md +33 -0
  2. package/dist/chunk-2GVCAIPX.js +1 -0
  3. package/dist/chunk-37OCQYNX.js +65 -0
  4. package/dist/chunk-6WH7FA2M.js +9 -0
  5. package/dist/chunk-C6BJB5AC.js +2 -0
  6. package/dist/{chunk-TTJ54QGG.js → chunk-DX4XELD6.js} +6 -6
  7. package/dist/{chunk-PQXIFBDY.js → chunk-E2O2MRZR.js} +1 -1
  8. package/dist/{chunk-V4LF7D4F.js → chunk-FS5BLARH.js} +1 -1
  9. package/dist/{chunk-QH6LCNOX.js → chunk-I6T4TZ5Q.js} +1 -1
  10. package/dist/{chunk-NYKIQJT2.js → chunk-JWMNPRTT.js} +1 -1
  11. package/dist/chunk-LY4K2ECT.js +1 -0
  12. package/dist/chunk-M7N2V4TG.js +2 -0
  13. package/dist/chunk-MHKBLPQ2.js +1 -0
  14. package/dist/chunk-MS4QRBJ6.js +5 -0
  15. package/dist/chunk-ND55LTCA.js +5 -0
  16. package/dist/{chunk-NWIW7AWH.js → chunk-PBSEUZD6.js} +1 -1
  17. package/dist/{chunk-Q4N7C6CT.js → chunk-UEVTQBM7.js} +3 -3
  18. package/dist/{chunk-BXZ6WLHC.js → chunk-VCQVNPTG.js} +16 -16
  19. package/dist/{chunk-SARZN4M7.js → chunk-VINYARYJ.js} +1 -1
  20. package/dist/chunk-WTMHT7BI.js +1 -0
  21. package/dist/chunk-Z6SOLDWV.js +1 -0
  22. package/dist/copy/index.js +9 -9
  23. package/dist/drag/index.d.ts +10 -0
  24. package/dist/drag/index.js +1 -1
  25. package/dist/easel/index.d.ts +10 -1
  26. package/dist/easel/index.js +1 -1
  27. package/dist/fields/index.js +1 -1
  28. package/dist/{host-BQ_b9Qzk.d.ts → host-CiuzZJXj.d.ts} +11 -1
  29. package/dist/index.js +1 -1
  30. package/dist/screen/components/AddBlockRow.js +1 -1
  31. package/dist/screen/components/AddSidePanel.js +1 -1
  32. package/dist/screen/components/MediaSidePanel.d.ts +1 -1
  33. package/dist/screen/components/MediaSidePanel.js +1 -1
  34. package/dist/screen/components/NodeContextMenu.d.ts +19 -1
  35. package/dist/screen/components/NodeContextMenu.js +1 -1
  36. package/dist/screen/components/PageEditGuardNotices.js +1 -1
  37. package/dist/screen/components/ScreenChrome.js +1 -1
  38. package/dist/screen/components/ScreenDocumentContext.d.ts +1 -1
  39. package/dist/screen/components/ScreenDocumentContext.js +1 -1
  40. package/dist/screen/components/ScreenMount.d.ts +1 -1
  41. package/dist/screen/components/ScreenMount.js +1 -1
  42. package/dist/screen/components/ScreenStoreProvider.d.ts +1 -1
  43. package/dist/screen/components/ScreenStoreProvider.js +1 -1
  44. package/dist/screen/components/SectionScreenShell.js +16 -16
  45. package/dist/screen/components/panel-widths.d.ts +15 -1
  46. package/dist/screen/components/panel-widths.js +1 -1
  47. package/dist/screen/components/usePartBridge.d.ts +1 -1
  48. package/dist/screen/components/usePartBridge.js +1 -1
  49. package/dist/screen/index.d.ts +2 -2
  50. package/dist/screen/index.js +1 -1
  51. package/dist/screen/lib/document-addressing.d.ts +1 -1
  52. package/dist/screen/lib/host.d.ts +1 -1
  53. package/dist/screen/lib/key-scope.d.ts +31 -2
  54. package/dist/screen/lib/key-scope.js +1 -1
  55. package/dist/screen/lib/media-panel.d.ts +1 -1
  56. package/dist/screen/lib/media-picker.d.ts +1 -1
  57. package/dist/screen/lib/puck/section-doc.d.ts +5 -1
  58. package/dist/screen/lib/puck/section-doc.js +1 -1
  59. package/dist/screen/lib/puck/style-clipboard.d.ts +1 -1
  60. package/dist/screen/lib/puck/use-section-ops.js +1 -1
  61. package/dist/screen/lib/screen-parts.d.ts +38 -2
  62. package/dist/screen/lib/screen-parts.js +1 -1
  63. package/dist/screen/screen.css +21 -0
  64. package/dist/screen/words.d.ts +17 -1
  65. package/dist/screen/words.js +1 -1
  66. package/dist/strings/catalogue.js +1 -1
  67. package/dist/strings/index.js +1 -1
  68. package/package.json +1 -1
  69. package/dist/chunk-53G47SWO.js +0 -1
  70. package/dist/chunk-7FBDZTUD.js +0 -2
  71. package/dist/chunk-7V5WZ46F.js +0 -2
  72. package/dist/chunk-FMGFZNPW.js +0 -1
  73. package/dist/chunk-HLEET6NV.js +0 -65
  74. package/dist/chunk-IE4GFYKO.js +0 -1
  75. package/dist/chunk-N7VRF7PR.js +0 -5
  76. package/dist/chunk-P67FP7PG.js +0 -9
  77. package/dist/chunk-VSHV6KJQ.js +0 -5
  78. package/dist/chunk-VSOP4GUM.js +0 -1
  79. package/dist/chunk-ZTTWFAAC.js +0 -1
@@ -1 +1 @@
1
- export{DocumentScreen,ScreenMount as default}from"../../chunk-Q4N7C6CT.js";import"../../chunk-GXQCZJOP.js";import"../../chunk-SARZN4M7.js";import"../../chunk-HLEET6NV.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-SQTY6CJD.js";import"../../chunk-FGNR22NY.js";import"../../chunk-ZE7I3PLX.js";import"../../chunk-IE4GFYKO.js";import"../../chunk-PWZOS45R.js";import"../../chunk-7F52SZOI.js";import"../../chunk-R2HLPNQF.js";import"../../chunk-TBF5CVPA.js";import"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-VSOP4GUM.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-5MZ3RNQQ.js";import"../../chunk-ZTTWFAAC.js";import"../../chunk-FMGFZNPW.js";import"../../chunk-NWIW7AWH.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-7FBDZTUD.js";import"../../chunk-V4LF7D4F.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-7V5WZ46F.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-3P6AMTOS.js";import"../../chunk-3WSPDAK2.js";import"../../chunk-57DJOKXT.js";import"../../chunk-3QVB4AG2.js";import"../../chunk-N7VRF7PR.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-BVN33R76.js";import"../../chunk-5ZBBXZPV.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-NYKIQJT2.js";import"../../chunk-VSHV6KJQ.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-PQXIFBDY.js";import"../../chunk-P67FP7PG.js";import"../../chunk-AELNNAFM.js";import"../../chunk-BXZ6WLHC.js";import"../../chunk-EOJNJCMJ.js";import"../../chunk-ZFDCDJNZ.js";import"../../chunk-ZNS7727Y.js";import"../../chunk-3EDSDPIP.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-RW4XBUUW.js";import"../../chunk-KTVH2ZRL.js";import"../../chunk-2LK54I4E.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-OWBO4WKA.js";import"../../chunk-BDTITTMW.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-YC4TB3CJ.js";import"../../chunk-ZJEBF4NB.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-WZ7TGAAT.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-EWVJSRRY.js";import"../../chunk-P6O363EE.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-BZ5ASXOL.js";import"../../chunk-TTJ54QGG.js";import"../../chunk-O2NLQBFX.js";import"../../chunk-67GNT6PF.js";import"../../chunk-PAELDYYS.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{DocumentScreen,ScreenMount as default}from"../../chunk-UEVTQBM7.js";import"../../chunk-GXQCZJOP.js";import"../../chunk-VINYARYJ.js";import"../../chunk-37OCQYNX.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-SQTY6CJD.js";import"../../chunk-FGNR22NY.js";import"../../chunk-ZE7I3PLX.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-PWZOS45R.js";import"../../chunk-7F52SZOI.js";import"../../chunk-R2HLPNQF.js";import"../../chunk-TBF5CVPA.js";import"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-MHKBLPQ2.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-5MZ3RNQQ.js";import"../../chunk-WTMHT7BI.js";import"../../chunk-LY4K2ECT.js";import"../../chunk-PBSEUZD6.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-M7N2V4TG.js";import"../../chunk-FS5BLARH.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-C6BJB5AC.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-3P6AMTOS.js";import"../../chunk-3WSPDAK2.js";import"../../chunk-57DJOKXT.js";import"../../chunk-3QVB4AG2.js";import"../../chunk-MS4QRBJ6.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-BVN33R76.js";import"../../chunk-5ZBBXZPV.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-JWMNPRTT.js";import"../../chunk-ND55LTCA.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-2LK54I4E.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-E2O2MRZR.js";import"../../chunk-6WH7FA2M.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-AELNNAFM.js";import"../../chunk-VCQVNPTG.js";import"../../chunk-EOJNJCMJ.js";import"../../chunk-ZFDCDJNZ.js";import"../../chunk-3EDSDPIP.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-RW4XBUUW.js";import"../../chunk-KTVH2ZRL.js";import"../../chunk-ZNS7727Y.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-OWBO4WKA.js";import"../../chunk-BDTITTMW.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-YC4TB3CJ.js";import"../../chunk-ZJEBF4NB.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-WZ7TGAAT.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-EWVJSRRY.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-P6O363EE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-BZ5ASXOL.js";import"../../chunk-DX4XELD6.js";import"../../chunk-O2NLQBFX.js";import"../../chunk-67GNT6PF.js";import"../../chunk-PAELDYYS.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -25,7 +25,7 @@ import './AddSidePanel.js';
25
25
  import '../lib/section-template-types.js';
26
26
  import '../lib/puck/content-tree.js';
27
27
  import '../lib/puck/block-choice.js';
28
- import '../../host-BQ_b9Qzk.js';
28
+ import '../../host-CiuzZJXj.js';
29
29
  import '../lib/document-contract.js';
30
30
  import '../lib/session.js';
31
31
  import '../lib/backend-error.js';
@@ -1 +1 @@
1
- export{ScreenStoreProvider as default}from"../../chunk-SARZN4M7.js";import"../../chunk-VSHV6KJQ.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-P67FP7PG.js";import"../../chunk-AELNNAFM.js";import"../../chunk-BXZ6WLHC.js";import"../../chunk-EOJNJCMJ.js";import"../../chunk-ZFDCDJNZ.js";import"../../chunk-ZNS7727Y.js";import"../../chunk-3EDSDPIP.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-KTVH2ZRL.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-EWVJSRRY.js";import"../../chunk-P6O363EE.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-BZ5ASXOL.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{ScreenStoreProvider as default}from"../../chunk-VINYARYJ.js";import"../../chunk-ND55LTCA.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6WH7FA2M.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-AELNNAFM.js";import"../../chunk-VCQVNPTG.js";import"../../chunk-EOJNJCMJ.js";import"../../chunk-ZFDCDJNZ.js";import"../../chunk-3EDSDPIP.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-KTVH2ZRL.js";import"../../chunk-ZNS7727Y.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-EWVJSRRY.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-P6O363EE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-BZ5ASXOL.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -1,16 +1,16 @@
1
- import{AddBlockRow as e}from"../../chunk-QH6LCNOX.js";import{slotChildRowName as n}from"../../chunk-TBF5CVPA.js";import{scrollPreviewToSection as o,gotoPreviewSlide as r}from"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import{useEaselUndoKeys as t}from"../../chunk-VSOP4GUM.js";import{SlotChildActionsProvider as s}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as i}from"../../chunk-ZTTWFAAC.js";import{usePartBridge as c}from"../../chunk-FMGFZNPW.js";import{useSectionOps as p}from"../../chunk-NWIW7AWH.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import{useScreenDocument as l}from"../../chunk-7V5WZ46F.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-3P6AMTOS.js";import"../../chunk-3WSPDAK2.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import{MediaSidePanel as d}from"../../chunk-NYKIQJT2.js";import{SELECTION_MODE as m,useScreenPinned as a,useScreenCanvasFrame as u,useScreenInspectorPanel as h,useScreenPickFollowsSelection as k,sameInspectorMode as j,useStandaloneScreenBridges as f,useScreenBlockLook as N,useScreenBlockRules as S}from"../../chunk-VSHV6KJQ.js";import{nestsInTree as y,slotFieldsOf as C}from"../../chunk-PLVEGYK6.js";import{useMediaPanel as A,usePanelPick as P,useCancelPanelPick as x}from"../../chunk-R6WTQWAC.js";import{useHostEscape as O}from"../../chunk-U3JP4VGF.js";import"../../chunk-PQXIFBDY.js";import{useEasel as T}from"../../chunk-P67FP7PG.js";import"../../chunk-AELNNAFM.js";import"../../chunk-BXZ6WLHC.js";import"../../chunk-EOJNJCMJ.js";import{LayersTree as W,Subtree as R,TreeRow as g,TreeRowAction as v,TreeSeam as E}from"../../chunk-ZFDCDJNZ.js";import"../../chunk-ZNS7727Y.js";import"../../chunk-3EDSDPIP.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-KTVH2ZRL.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-BDTITTMW.js";import{saveIndicator as B}from"../../chunk-H6DDIBQ4.js";import{SaveState as z,panelWidthVars as J}from"../../chunk-YC4TB3CJ.js";import"../../chunk-ZJEBF4NB.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-WZ7TGAAT.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-EWVJSRRY.js";import"../../chunk-P6O363EE.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-BZ5ASXOL.js";import"../../chunk-TTJ54QGG.js";import"../../chunk-O2NLQBFX.js";import{useTreeDrag as L}from"../../chunk-67GNT6PF.js";import"../../chunk-PAELDYYS.js";import"../../chunk-ZNCEOSXO.js";import{TrashIcon as D}from"../../chunk-L5KW4HG5.js";import{zoneKey as F,parseZoneKey as Z}from"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import{useState as b,useRef as H,useEffect as M,useCallback as w,Fragment as G}from"react";import{jsxs as K,jsx as V,Fragment as Y}from"react/jsx-runtime";var I=e=>n=>{n.target.closest(".es-tree-select, button")||e()},Q={rowClick:I};function $(){const{saveState:$,readOnly:X,readOnlyReason:U=null}=l(),q=p(),{appState:_,selectedItem:ee,config:ne}=T(e=>e),[oe,re]=b(m),[te,se]=b(null),{first:ie,last:ce,panelOf:pe}=a(),le=pe(ie),de=u(),me=h(),ae=_.data.content?.[0]??null,ue=ae?.props.id??null,he=ae?.type===ie,ke=ae?.type===ce,je=H(null),fe=H(null);t(fe);const Ne=A(),Se=P(),ye=x();k(ee?.props.id),M(()=>{const e=fe.current;if(!Se||!e)return;const n=e=>{"Escape"===e.key&&ye()};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[Se]),O(null!==Se,()=>ye()),M(()=>{ue&&je.current!==ue&&(je.current=ue,he?re(le??m):ee||q.select({index:0}))},[ue,ee,q,he]);const Ce=w(e=>re(n=>j(n,e)?n:e),[]),Ae=f({kind:oe.kind,mode:oe,open:Ce,show:e=>re(e),reveal:()=>{},select:(e,n)=>{re(e=>j(e,n)?e:n),q.select(e)}}),{selectNode:Pe}=c({mode:oe,setMode:re,onOpenPart:o}),xe=N(),{labelAtLevel:Oe,Icon:Te}=xe,{canAddTo:We}=S(),Re=e=>ne.components[e]?.label??e,ge=e=>Oe(e,"section",Re(e)),ve=!he&&"puck"===oe.kind&&ee?.props.id===ue,Ee=ae?We(ae.type)?.spec??null:null,Be=ae&&Ee?`${ae.props.id}:${Ee.slot}`:null,ze=ae&&Ee&&Array.isArray(ae.props[Ee.slot])?ae.props[Ee.slot]:[],Je=e=>n(e,Re,xe.plainText),Le=(e,n)=>{ae&&Ee&&Be&&(re(m),Ee.slider?(r(String(ae.props.id),e),q.select({index:e,zone:Be}),o(String(ae.props.id))):(q.select({index:e,zone:Be}),o(n)))},De=()=>{if(!ae||!Ee||!Be)return;const e=ze.length;q.insertComponent(Be,Ee.childType,e),re(m),Ee.slider?requestAnimationFrame(()=>{r(String(ae.props.id),e),q.select({index:e,zone:Be})}):q.select({index:e,zone:Be})},Fe=e=>C(ne,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 Fe(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(ae)?.props[o];return Array.isArray(t)?t.length:0},be=(e,n,o)=>{const r=Math.min(Math.max(o,0),Ze(e)),t=n<r?r-1:r;t!==n&&(q.reorderComponent(e,n,t),re(m),q.select({index:t,zone:e}))},He=L({keyOf:e=>e.id,readOnly:Boolean(X),canDrop:(e,n)=>F(n)===e.zone&&n.index>=0&&n.index<=Ze(e.zone),onDrop:(e,n)=>be(e.zone,e.index,n.index),onStep:(e,n)=>be(e.zone,e.index,n<0?e.index-1:e.index+2)}),Me=(e,n)=>/* @__PURE__ */V(E,{...X?{}:He.seam({place:{...Z(e),index:n}})},`seam:${e}:${n}`),we=e=>xe.blockRowName(e,Re),Ge=(e,n,r)=>{re(m),q.select({index:n,zone:e}),o(r)},Ke=(e,n,o)=>{q.insertComponent(e,n,o),re(m),q.select({index:o,zone:e}),se(null)},Ve=(n,o,r)=>/* @__PURE__ */V(e,{choices:r,open:te===n,onToggle:()=>se(te===n?null:n),onPick:e=>Ke(n,e,o)}),Ye=(e,n)=>{const o=Fe((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=We(e.type),s=t?.choices??null,i="footer"===t?.source?we:Je;/* @__PURE__ */
2
- return K(Y,{children:[o.map(({child:e,zone:o,index:r})=>{const t=ee?.props.id===e.props.id,s=y(ne,e.type,n),c=i(e),p=String(e.props.id),l=()=>Ge(o,r,p),{rowProps:d,...a}=He.row({item:{id:p,zone:o,index:r},place:{...Z(o),index:r}},{onClick:I(l)});/* @__PURE__ */
3
- return K(G,{children:[0===r&&Me(o,0),
4
- /* @__PURE__ */V(g,{icon:/* @__PURE__ */V(Te,{type:e.type,size:13}),name:c,selected:t,onSelect:l,...a,actions:/* @__PURE__ */V(v,{kind:"delete",label:`Delete ${c}`,onClick:()=>{return e=o,n=r,q.removeComponent(e,n),re(m),void q.select(null);var e,n},children:/* @__PURE__ */V(D,{size:13})}),rowProps:d}),s&&/* @__PURE__ */V(R,{children:Ye(e,n+1)}),Me(o,r+1)]},String(e.props.id??`${o}-${r}`))}),t&&s?Ve(`${e.props.id}:${t.slot}`,o.length,s):null]})},Ie="HeroSingle"===ae?.type,Qe=Boolean(ae)&&(Boolean(Ee)||ke||he||Ie);/* @__PURE__ */
5
- return K("div",{ref:fe,className:"sf-editor es-editor",style:J(i),children:[
6
- /* @__PURE__ */V("div",{className:"sf-section-bar",children:/* @__PURE__ */V(z,null!==U?{tone:"off",label:U,role:"status"}:{...B($),role:"status"})}),
7
- /* @__PURE__ */K("div",{className:"sf-body",children:[Se&&Ne?/* @__PURE__ */V("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:/* @__PURE__ */V(d,{panel:Ne,pick:Se})}):Qe&&ae&&/* @__PURE__ */K("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
8
- /* @__PURE__ */V("div",{className:"sf-panel-head",children:/* @__PURE__ */V("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(ve?"is-selected":""),"aria-pressed":ve,title:he?"Header settings":`${ge(ae.type)} settings`,onClick:()=>{he?re(le??m):(re(m),q.select({index:0}))},children:ge(ae.type)})}),
9
- /* @__PURE__ */V(W,{className:"sf-tree sf-scroll",rootProps:He.rootProps(),children:/* @__PURE__ */V(R,{children:he?
10
- /* @__PURE__ */V(g,{icon:/* @__PURE__ */V(Te,{type:"header",size:13}),name:"Header settings",selected:oe.kind===le?.kind,onSelect:()=>re(le??m),rowProps:{onClick:I(()=>re(le??m))}}):Ee?/* @__PURE__ */K(Y,{children:[ze.map((e,n)=>{const o=ee?.props.id===e.props.id,r=Je(e),t=String(e.props.id),s=()=>Le(n,t),{rowProps:i,...c}=He.row({item:{id:t,zone:Be,index:n},place:{...Z(Be),index:n}},{onClick:I(s)});/* @__PURE__ */
11
- return K(G,{children:[0===n&&Me(Be,0),
12
- /* @__PURE__ */V(g,{icon:/* @__PURE__ */V(Te,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */V(v,{kind:"delete",label:`Delete ${r}`,onClick:()=>{return e=n,void(Be&&(q.removeComponent(Be,e),re(m),q.select(null)));var e},children:/* @__PURE__ */V(D,{size:13})}),rowProps:i}),Me(Be,n+1)]},String(e.props.id??n))}),
13
- /* @__PURE__ */K("button",{type:"button",className:"sf-add-card",onClick:De,children:[
14
- /* @__PURE__ */V("span",{className:"sf-plus sf-plus--sm",children:"+"}),Ee.addLabel]}),ue?Ae.partRows?.(ae,Q):null]}):Ye(ae,1)})})]}),
15
- /* @__PURE__ */V("div",{className:"sf-center",children:/* @__PURE__ */V("div",{className:"sf-preview-host",children:/* @__PURE__ */V(de,{})})}),
16
- /* @__PURE__ */V(s,{value:{selectChild:(e,n,o,r)=>"section"===We(r)?.source?Le(n,o):Ge(e,n,o),addChild:(e,n,o,r,t)=>"section"===We(t)?.source?De():Ke(`${e}:${n}`,o,r),childRowName:Je,blockRowName:we},children:/* @__PURE__ */V(me,{mode:oe,onOpenWebsiteSettings:Ae.openSettings??(()=>{}),onSelectNode:Pe,hideNodeActions:!0})})]})]})}export{$ as default};
1
+ import{AddBlockRow as e}from"../../chunk-I6T4TZ5Q.js";import{slotChildRowName as n}from"../../chunk-TBF5CVPA.js";import{scrollPreviewToSection as o,gotoPreviewSlide as r}from"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import{useEaselUndoKeys as t}from"../../chunk-MHKBLPQ2.js";import{SlotChildActionsProvider as s}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as i}from"../../chunk-WTMHT7BI.js";import{usePartBridge as c}from"../../chunk-LY4K2ECT.js";import{useSectionOps as p}from"../../chunk-PBSEUZD6.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import{useScreenDocument as l}from"../../chunk-C6BJB5AC.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-3P6AMTOS.js";import"../../chunk-3WSPDAK2.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import{MediaSidePanel as d}from"../../chunk-JWMNPRTT.js";import{SELECTION_MODE as m,useScreenPinned as a,useScreenCanvasFrame as u,useScreenInspectorPanel as h,useScreenPickFollowsSelection as k,sameInspectorMode as j,useStandaloneScreenBridges as f,useScreenBlockLook as N,useScreenBlockRules as C}from"../../chunk-ND55LTCA.js";import{nestsInTree as y,slotFieldsOf as S}from"../../chunk-PLVEGYK6.js";import{useMediaPanel as A,usePanelPick as T,useCancelPanelPick as P}from"../../chunk-R6WTQWAC.js";import{useHostEscape as x}from"../../chunk-U3JP4VGF.js";import"../../chunk-E2O2MRZR.js";import{useEasel as E}from"../../chunk-6WH7FA2M.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-AELNNAFM.js";import"../../chunk-VCQVNPTG.js";import"../../chunk-EOJNJCMJ.js";import{LayersTree as O,Subtree as R,TreeRow as B,TreeRowAction as g,TreeSeam as v}from"../../chunk-ZFDCDJNZ.js";import"../../chunk-3EDSDPIP.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-KTVH2ZRL.js";import"../../chunk-ZNS7727Y.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-BDTITTMW.js";import{saveIndicator as D}from"../../chunk-H6DDIBQ4.js";import{SaveState as L,panelWidthVars as z}from"../../chunk-YC4TB3CJ.js";import"../../chunk-ZJEBF4NB.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-WZ7TGAAT.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-EWVJSRRY.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-P6O363EE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-BZ5ASXOL.js";import"../../chunk-DX4XELD6.js";import"../../chunk-O2NLQBFX.js";import{useTreeDrag as M}from"../../chunk-67GNT6PF.js";import"../../chunk-PAELDYYS.js";import"../../chunk-ZNCEOSXO.js";import{TrashIcon as W}from"../../chunk-L5KW4HG5.js";import{zoneKey as J,parseZoneKey as Z}from"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import{useState as b,useRef as w,useEffect as H,useCallback as K,Fragment as Y}from"react";import{jsxs as $,jsx as F,Fragment as I}from"react/jsx-runtime";var V=e=>n=>{n.target.closest(".es-tree-select, button")||e()},Q={rowClick:V};function X(){const{saveState:X,readOnly:G,readOnlyReason:U=null}=l(),q=p(),{appState:_,selectedItem:ee,config:ne}=E(e=>e),[oe,re]=b(m),[te,se]=b(null),{first:ie,last:ce,panelOf:pe}=a(),le=pe(ie),de=u(),me=h(),ae=_.data.content?.[0]??null,ue=ae?.props.id??null,he=ae?.type===ie,ke=ae?.type===ce,je=w(null),fe=w(null);t(fe);const Ne=A(),Ce=T(),ye=P();k(ee?.props.id),H(()=>{const e=fe.current;if(!Ce||!e)return;const n=e=>{"Escape"===e.key&&ye()};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[Ce]),x(null!==Ce,()=>ye()),H(()=>{ue&&je.current!==ue&&(je.current=ue,he?re(le??m):ee||q.select({index:0}))},[ue,ee,q,he]);const Se=K(e=>re(n=>j(n,e)?n:e),[]),Ae=f({kind:oe.kind,mode:oe,open:Se,show:e=>re(e),reveal:()=>{},select:(e,n)=>{re(e=>j(e,n)?e:n),q.select(e)}}),{selectNode:Te}=c({mode:oe,setMode:re,onOpenPart:o}),Pe=N(),{labelAtLevel:xe,Icon:Ee}=Pe,{canAddTo:Oe}=C(),Re=e=>ne.components[e]?.label??e,Be=e=>xe(e,"section",Re(e)),ge=!he&&"puck"===oe.kind&&ee?.props.id===ue,ve=ae?Oe(ae.type)?.spec??null:null,De=ae&&ve?`${ae.props.id}:${ve.slot}`:null,Le=ae&&ve&&Array.isArray(ae.props[ve.slot])?ae.props[ve.slot]:[],ze=e=>n(e,Re,Pe.plainText),Me=(e,n)=>{ae&&ve&&De&&(re(m),ve.slider?(r(String(ae.props.id),e),q.select({index:e,zone:De}),o(String(ae.props.id))):(q.select({index:e,zone:De}),o(n)))},We=()=>{if(!ae||!ve||!De)return;const e=Le.length;q.insertComponent(De,ve.childType,e),re(m),ve.slider?requestAnimationFrame(()=>{r(String(ae.props.id),e),q.select({index:e,zone:De})}):q.select({index:e,zone:De})},Je=e=>S(ne,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 Je(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(ae)?.props[o];return Array.isArray(t)?t.length:0},be=(e,n,o)=>{const r=Math.min(Math.max(o,0),Ze(e)),t=n<r?r-1:r;t!==n&&(q.reorderComponent(e,n,t),re(m),q.select({index:t,zone:e}))},we=M({keyOf:e=>e.id,readOnly:Boolean(G),canDrop:(e,n)=>J(n)===e.zone&&n.index>=0&&n.index<=Ze(e.zone),onDrop:(e,n)=>be(e.zone,e.index,n.index),onStep:(e,n)=>be(e.zone,e.index,n<0?e.index-1:e.index+2)}),He=(e,n)=>/* @__PURE__ */F(v,{...G?{}:we.seam({place:{...Z(e),index:n}})},`seam:${e}:${n}`),Ke=e=>Pe.blockRowName(e,Re),Ye=(e,n,r)=>{re(m),q.select({index:n,zone:e}),o(r)},$e=(e,n,o)=>{q.insertComponent(e,n,o),re(m),q.select({index:o,zone:e}),se(null)},Fe=(n,o,r)=>/* @__PURE__ */F(e,{choices:r,open:te===n,onToggle:()=>se(te===n?null:n),onPick:e=>$e(n,e,o)}),Ie=(e,n)=>{const o=Je((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?Ke:ze;/* @__PURE__ */
2
+ return $(I,{children:[o.map(({child:e,zone:o,index:r})=>{const t=ee?.props.id===e.props.id,s=y(ne,e.type,n),c=i(e),p=String(e.props.id),l=()=>Ye(o,r,p),{rowProps:d,...a}=we.row({item:{id:p,zone:o,index:r},place:{...Z(o),index:r}},{onClick:V(l)});/* @__PURE__ */
3
+ return $(Y,{children:[0===r&&He(o,0),
4
+ /* @__PURE__ */F(B,{icon:/* @__PURE__ */F(Ee,{type:e.type,size:13}),name:c,selected:t,onSelect:l,...a,actions:/* @__PURE__ */F(g,{kind:"delete",label:`Delete ${c}`,onClick:()=>{return e=o,n=r,q.removeComponent(e,n),re(m),void q.select(null);var e,n},children:/* @__PURE__ */F(W,{size:13})}),rowProps:d}),s&&/* @__PURE__ */F(R,{children:Ie(e,n+1)}),He(o,r+1)]},String(e.props.id??`${o}-${r}`))}),t&&s?Fe(`${e.props.id}:${t.slot}`,o.length,s):null]})},Ve="HeroSingle"===ae?.type,Qe=Boolean(ae)&&(Boolean(ve)||ke||he||Ve);/* @__PURE__ */
5
+ return $("div",{ref:fe,className:"sf-editor es-editor",style:z(i),children:[
6
+ /* @__PURE__ */F("div",{className:"sf-section-bar",children:/* @__PURE__ */F(L,null!==U?{tone:"off",label:U,role:"status"}:{...D(X),role:"status"})}),
7
+ /* @__PURE__ */$("div",{className:"sf-body",children:[Ce&&Ne?/* @__PURE__ */F("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:/* @__PURE__ */F(d,{panel:Ne,pick:Ce})}):Qe&&ae&&/* @__PURE__ */$("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
8
+ /* @__PURE__ */F("div",{className:"sf-panel-head",children:/* @__PURE__ */F("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(ge?"is-selected":""),"aria-pressed":ge,title:he?"Header settings":`${Be(ae.type)} settings`,onClick:()=>{he?re(le??m):(re(m),q.select({index:0}))},children:Be(ae.type)})}),
9
+ /* @__PURE__ */F(O,{className:"sf-tree sf-scroll",rootProps:we.rootProps(),children:/* @__PURE__ */F(R,{children:he?
10
+ /* @__PURE__ */F(B,{icon:/* @__PURE__ */F(Ee,{type:"header",size:13}),name:"Header settings",selected:oe.kind===le?.kind,onSelect:()=>re(le??m),rowProps:{onClick:V(()=>re(le??m))}}):ve?/* @__PURE__ */$(I,{children:[Le.map((e,n)=>{const o=ee?.props.id===e.props.id,r=ze(e),t=String(e.props.id),s=()=>Me(n,t),{rowProps:i,...c}=we.row({item:{id:t,zone:De,index:n},place:{...Z(De),index:n}},{onClick:V(s)});/* @__PURE__ */
11
+ return $(Y,{children:[0===n&&He(De,0),
12
+ /* @__PURE__ */F(B,{icon:/* @__PURE__ */F(Ee,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */F(g,{kind:"delete",label:`Delete ${r}`,onClick:()=>{return e=n,void(De&&(q.removeComponent(De,e),re(m),q.select(null)));var e},children:/* @__PURE__ */F(W,{size:13})}),rowProps:i}),He(De,n+1)]},String(e.props.id??n))}),
13
+ /* @__PURE__ */$("button",{type:"button",className:"sf-add-card",onClick:We,children:[
14
+ /* @__PURE__ */F("span",{className:"sf-plus sf-plus--sm",children:"+"}),ve.addLabel]}),ue?Ae.partRows?.(ae,Q):null]}):Ie(ae,1)})})]}),
15
+ /* @__PURE__ */F("div",{className:"sf-center",children:/* @__PURE__ */F("div",{className:"sf-preview-host",children:/* @__PURE__ */F(de,{})})}),
16
+ /* @__PURE__ */F(s,{value:{selectChild:(e,n,o,r)=>"section"===Oe(r)?.source?Me(n,o):Ye(e,n,o),addChild:(e,n,o,r,t)=>"section"===Oe(t)?.source?We():$e(`${e}:${n}`,o,r),childRowName:ze,blockRowName:Ke},children:/* @__PURE__ */F(me,{mode:oe,onOpenWebsiteSettings:Ae.openSettings??(()=>{}),onSelectNode:Te,hideNodeActions:!0})})]})]})}export{X as default};
@@ -21,6 +21,20 @@ import 'react';
21
21
  */
22
22
 
23
23
  declare const PANEL_WIDTHS_KEY = "sf-editor-panel-widths";
24
+ /** …and the key the Layers tree's folds are kept under, beside them. */
25
+ declare const COLLAPSED_SECTIONS_KEY = "sf-editor-collapsed-sections";
26
+ /**
27
+ * THE KEYS ONE MOUNT KEEPS A PERSON'S WIDTHS AND FOLDS UNDER (0.106.0, parity
28
+ * item #21): the website's two above, or — where the layer names a namespace
29
+ * of its own (`ScreenParts.storageNamespace`) — `<namespace>-panel-widths` and
30
+ * `<namespace>-collapsed-sections`. The campaign designer and the website
31
+ * editor, open in one browser, each keep their own; a website, which names
32
+ * none, reads what it always kept, so nobody's layout resets.
33
+ */
34
+ declare function screenStorageKeys(namespace?: string): {
35
+ panelWidths: string;
36
+ collapsed: string;
37
+ };
24
38
  declare const DEFAULT_PANEL_W: {
25
39
  readonly left: 288;
26
40
  readonly right: 320;
@@ -34,4 +48,4 @@ type PanelWidths = {
34
48
  /** Clamp a width into the panels' resizable band and round to a whole pixel. */
35
49
  declare const clampPanelWidth: (w: number) => number;
36
50
 
37
- export { DEFAULT_PANEL_W, PANEL_WIDTHS_KEY, type PanelSide, type PanelWidths, clampPanelWidth };
51
+ export { COLLAPSED_SECTIONS_KEY, DEFAULT_PANEL_W, PANEL_WIDTHS_KEY, type PanelSide, type PanelWidths, clampPanelWidth, screenStorageKeys };
@@ -1 +1 @@
1
- export{DEFAULT_PANEL_W,PANEL_WIDTHS_KEY,clampPanelWidth}from"../../chunk-ZTTWFAAC.js";export{MAX_PANEL_W,MIN_PANEL_W,panelWidthVars}from"../../chunk-YC4TB3CJ.js";import"../../chunk-ZJEBF4NB.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-WZ7TGAAT.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-BZ5ASXOL.js";import"../../chunk-L5KW4HG5.js";
1
+ export{COLLAPSED_SECTIONS_KEY,DEFAULT_PANEL_W,PANEL_WIDTHS_KEY,clampPanelWidth,screenStorageKeys}from"../../chunk-WTMHT7BI.js";export{MAX_PANEL_W,MIN_PANEL_W,panelWidthVars}from"../../chunk-YC4TB3CJ.js";import"../../chunk-ZJEBF4NB.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-WZ7TGAAT.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-BZ5ASXOL.js";import"../../chunk-L5KW4HG5.js";
@@ -24,7 +24,7 @@ import './AddSidePanel.js';
24
24
  import '../lib/section-template-types.js';
25
25
  import '../lib/puck/content-tree.js';
26
26
  import '../lib/puck/block-choice.js';
27
- import '../../host-BQ_b9Qzk.js';
27
+ import '../../host-CiuzZJXj.js';
28
28
  import '../lib/document-contract.js';
29
29
  import '../lib/session.js';
30
30
  import '../lib/backend-error.js';
@@ -1 +1 @@
1
- export{usePartBridge}from"../../chunk-FMGFZNPW.js";import"../../chunk-NWIW7AWH.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-VSHV6KJQ.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-P67FP7PG.js";import"../../chunk-AELNNAFM.js";import"../../chunk-BXZ6WLHC.js";import"../../chunk-EOJNJCMJ.js";import"../../chunk-ZFDCDJNZ.js";import"../../chunk-ZNS7727Y.js";import"../../chunk-3EDSDPIP.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-KTVH2ZRL.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-EWVJSRRY.js";import"../../chunk-P6O363EE.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-BZ5ASXOL.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{usePartBridge}from"../../chunk-LY4K2ECT.js";import"../../chunk-PBSEUZD6.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-ND55LTCA.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6WH7FA2M.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-AELNNAFM.js";import"../../chunk-VCQVNPTG.js";import"../../chunk-EOJNJCMJ.js";import"../../chunk-ZFDCDJNZ.js";import"../../chunk-3EDSDPIP.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-KTVH2ZRL.js";import"../../chunk-ZNS7727Y.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-EWVJSRRY.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-P6O363EE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-BZ5ASXOL.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -1,9 +1,9 @@
1
1
  export { DocumentScreen, default as ScreenMount } from './components/ScreenMount.js';
2
2
  export { default as ScreenStoreProvider } from './components/ScreenStoreProvider.js';
3
- export { NodeDefaults, SELECTION_MODE, ScreenAdd, ScreenBlockLook, ScreenBlockRules, ScreenBridges, ScreenCanvas, ScreenCanvasDrag, ScreenCanvasDragContext, ScreenCanvasHeadProps, ScreenCanvasTargetProvider, ScreenDevices, ScreenDocumentOps, ScreenDragItem, ScreenInspector, ScreenInspectorMode, ScreenInspectorPanelProps, ScreenLeftPanel, ScreenLeftView, ScreenLeftViewFrame, ScreenLeftViewRules, ScreenMenuRows, ScreenNewNode, ScreenNode, ScreenNodeActions, ScreenNodeLevel, ScreenNodeMaker, ScreenPartMode, ScreenParts, ScreenPartsProvider, ScreenPinnedBand, ScreenPinnedNodes, ScreenRailItem, ScreenSelection, ScreenSelector, ScreenSlot, ScreenSlotAction, ScreenSlotMode, ScreenStyleClipboard, ScreenStyleDocument, ScreenStylePastePlan, ScreenTree, ScreenTreeFolds, ScreenTreeRows, isPinnedFirst, isPinnedLast, isSlotMode, sameInspectorMode, screenSlotsOf, useScreenAdd, useScreenBlockLook, useScreenBlockRules, useScreenBridges, useScreenCanvasDrag, useScreenCanvasFrame, useScreenCanvasHead, useScreenCanvasTarget, useScreenDevices, useScreenDocumentLabel, useScreenDocumentPass, useScreenInspectorPanel, useScreenLeftView, useScreenNodeKeys, useScreenNotify, useScreenOwnerName, useScreenParts, useScreenPickFollowsSelection, useScreenPinned, useScreenSaveSwitch, useScreenStyleClipboard, useStandaloneScreenBridges } from './lib/screen-parts.js';
3
+ export { NodeDefaults, SELECTION_MODE, ScreenAdd, ScreenBlockLook, ScreenBlockRules, ScreenBridges, ScreenCanvas, ScreenCanvasDrag, ScreenCanvasDragContext, ScreenCanvasHeadProps, ScreenCanvasTargetProvider, ScreenDevices, ScreenDocumentOps, ScreenDragItem, ScreenInspector, ScreenInspectorMode, ScreenInspectorPanelProps, ScreenLeftPanel, ScreenLeftView, ScreenLeftViewFrame, ScreenLeftViewRules, ScreenMenuRows, ScreenNewNode, ScreenNode, ScreenNodeActions, ScreenNodeLevel, ScreenNodeMaker, ScreenPartMode, ScreenParts, ScreenPartsProvider, ScreenPinnedBand, ScreenPinnedNodes, ScreenRailItem, ScreenSelection, ScreenSelector, ScreenSlot, ScreenSlotAction, ScreenSlotMode, ScreenStyleClipboard, ScreenStyleDocument, ScreenStylePastePlan, ScreenTree, ScreenTreeFolds, ScreenTreeRows, isPinnedFirst, isPinnedLast, isSlotMode, sameInspectorMode, screenSlotsOf, useScreenAdd, 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 EaselHost, b as EaselHostAddress, c as EaselHostContext, d as EaselHostProvider, e as EaselMessageType, f as EaselToHostMessage, H as HostPickedMedia, g as HostToEaselMessage, I as InboundHostMessage, N as NO_DOCUMENT_ADDRESSING, S as SectionScreenTarget, h as SendToHost, i as createEaselHost, u as useEaselHost, j as useHostEscape } from '../host-BQ_b9Qzk.js';
6
+ export { A as AnyDocumentAddressing, D as DETACHED_EASEL_HOST, a as DocumentAddressing, E as EaselHost, b as EaselHostAddress, c as EaselHostContext, d as EaselHostProvider, e as EaselMessageType, f as EaselToHostMessage, H as HostPickedMedia, g as HostToEaselMessage, I as InboundHostMessage, N as NO_DOCUMENT_ADDRESSING, S as SectionScreenTarget, h as SendToHost, i as createEaselHost, u as useEaselHost, j as useHostEscape } from '../host-CiuzZJXj.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-Q4N7C6CT.js";import"../chunk-GXQCZJOP.js";export{ScreenStoreProvider}from"../chunk-SARZN4M7.js";import"../chunk-HLEET6NV.js";import"../chunk-26OOWIJJ.js";import"../chunk-SQTY6CJD.js";import"../chunk-FGNR22NY.js";import"../chunk-ZE7I3PLX.js";import"../chunk-IE4GFYKO.js";import"../chunk-PWZOS45R.js";import"../chunk-7F52SZOI.js";import"../chunk-R2HLPNQF.js";import"../chunk-TBF5CVPA.js";import"../chunk-4ES5JGGX.js";import"../chunk-IQ5TA7AM.js";import"../chunk-DUVRZ456.js";import"../chunk-6W7WLPZH.js";import"../chunk-VSOP4GUM.js";import"../chunk-KCBEE2MC.js";import"../chunk-5MZ3RNQQ.js";import"../chunk-ZTTWFAAC.js";import"../chunk-FMGFZNPW.js";import"../chunk-NWIW7AWH.js";import"../chunk-IYT6NN2J.js";import"../chunk-7FBDZTUD.js";import"../chunk-V4LF7D4F.js";import"../chunk-BSPCSC45.js";import"../chunk-I54UCYOU.js";import"../chunk-GOTN2KY4.js";import"../chunk-R5L2E7JX.js";import"../chunk-7V5WZ46F.js";import"../chunk-S4AWJX4Q.js";import"../chunk-ERR437B5.js";import"../chunk-KG7RJWOK.js";import"../chunk-GMCZXMOV.js";export{NO_DOCUMENT_ADDRESSING}from"../chunk-RLBXE4EU.js";import"../chunk-HNKB2ZYR.js";import"../chunk-CLOS6SSX.js";import"../chunk-3P6AMTOS.js";import"../chunk-3WSPDAK2.js";import"../chunk-57DJOKXT.js";import"../chunk-3QVB4AG2.js";import"../chunk-N7VRF7PR.js";import"../chunk-5ZBY24K7.js";import"../chunk-PA3PNTVV.js";import"../chunk-BVN33R76.js";import"../chunk-5ZBBXZPV.js";import"../chunk-KQMML6JM.js";import"../chunk-KCOBHPN6.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";import"../chunk-HQ4VVRIC.js";import"../chunk-NYKIQJT2.js";export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenAdd,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStyleClipboard,useStandaloneScreenBridges}from"../chunk-VSHV6KJQ.js";import"../chunk-PLVEGYK6.js";import"../chunk-R6WTQWAC.js";export{DETACHED_EASEL_HOST,EaselHostContext,EaselHostProvider,createEaselHost,useEaselHost,useHostEscape}from"../chunk-U3JP4VGF.js";import"../chunk-6WY6ZXJG.js";import"../chunk-PQXIFBDY.js";import"../chunk-P67FP7PG.js";import"../chunk-AELNNAFM.js";import"../chunk-BXZ6WLHC.js";import"../chunk-EOJNJCMJ.js";import"../chunk-ZFDCDJNZ.js";import"../chunk-ZNS7727Y.js";import"../chunk-3EDSDPIP.js";import"../chunk-QTLAVDJE.js";import"../chunk-YRLPFZW3.js";import"../chunk-RW4XBUUW.js";import"../chunk-KTVH2ZRL.js";import"../chunk-2LK54I4E.js";import"../chunk-WK3AFPXY.js";import"../chunk-D2BCHTQR.js";import"../chunk-OWBO4WKA.js";import"../chunk-BDTITTMW.js";import"../chunk-H6DDIBQ4.js";import"../chunk-YC4TB3CJ.js";import"../chunk-ZJEBF4NB.js";import"../chunk-THWO5YVZ.js";import"../chunk-RE4LP46F.js";import"../chunk-WZ7TGAAT.js";import"../chunk-2OAZYSWJ.js";import"../chunk-EWVJSRRY.js";import"../chunk-P6O363EE.js";import"../chunk-FPOKPNO4.js";import"../chunk-MFIRYGHW.js";import"../chunk-BZ5ASXOL.js";import"../chunk-TTJ54QGG.js";import"../chunk-O2NLQBFX.js";import"../chunk-67GNT6PF.js";import"../chunk-PAELDYYS.js";import"../chunk-ZNCEOSXO.js";import"../chunk-L5KW4HG5.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
1
+ import"../chunk-GZO72N3Q.js";export{DocumentScreen,ScreenMount}from"../chunk-UEVTQBM7.js";import"../chunk-GXQCZJOP.js";export{ScreenStoreProvider}from"../chunk-VINYARYJ.js";import"../chunk-37OCQYNX.js";import"../chunk-26OOWIJJ.js";import"../chunk-SQTY6CJD.js";import"../chunk-FGNR22NY.js";import"../chunk-ZE7I3PLX.js";import"../chunk-2GVCAIPX.js";import"../chunk-PWZOS45R.js";import"../chunk-7F52SZOI.js";import"../chunk-R2HLPNQF.js";import"../chunk-TBF5CVPA.js";import"../chunk-4ES5JGGX.js";import"../chunk-IQ5TA7AM.js";import"../chunk-DUVRZ456.js";import"../chunk-6W7WLPZH.js";import"../chunk-MHKBLPQ2.js";import"../chunk-KCBEE2MC.js";import"../chunk-5MZ3RNQQ.js";import"../chunk-WTMHT7BI.js";import"../chunk-LY4K2ECT.js";import"../chunk-PBSEUZD6.js";import"../chunk-IYT6NN2J.js";import"../chunk-M7N2V4TG.js";import"../chunk-FS5BLARH.js";import"../chunk-BSPCSC45.js";import"../chunk-I54UCYOU.js";import"../chunk-GOTN2KY4.js";import"../chunk-R5L2E7JX.js";import"../chunk-C6BJB5AC.js";import"../chunk-S4AWJX4Q.js";import"../chunk-ERR437B5.js";import"../chunk-KG7RJWOK.js";import"../chunk-GMCZXMOV.js";export{NO_DOCUMENT_ADDRESSING}from"../chunk-RLBXE4EU.js";import"../chunk-HNKB2ZYR.js";import"../chunk-CLOS6SSX.js";import"../chunk-3P6AMTOS.js";import"../chunk-3WSPDAK2.js";import"../chunk-57DJOKXT.js";import"../chunk-3QVB4AG2.js";import"../chunk-MS4QRBJ6.js";import"../chunk-5ZBY24K7.js";import"../chunk-PA3PNTVV.js";import"../chunk-BVN33R76.js";import"../chunk-5ZBBXZPV.js";import"../chunk-KQMML6JM.js";import"../chunk-KCOBHPN6.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";import"../chunk-HQ4VVRIC.js";import"../chunk-JWMNPRTT.js";export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenAdd,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../chunk-ND55LTCA.js";import"../chunk-PLVEGYK6.js";import"../chunk-R6WTQWAC.js";export{DETACHED_EASEL_HOST,EaselHostContext,EaselHostProvider,createEaselHost,useEaselHost,useHostEscape}from"../chunk-U3JP4VGF.js";import"../chunk-2LK54I4E.js";import"../chunk-6WY6ZXJG.js";import"../chunk-WK3AFPXY.js";import"../chunk-E2O2MRZR.js";import"../chunk-6WH7FA2M.js";import"../chunk-D2BCHTQR.js";import"../chunk-AELNNAFM.js";import"../chunk-VCQVNPTG.js";import"../chunk-EOJNJCMJ.js";import"../chunk-ZFDCDJNZ.js";import"../chunk-3EDSDPIP.js";import"../chunk-YRLPFZW3.js";import"../chunk-RW4XBUUW.js";import"../chunk-KTVH2ZRL.js";import"../chunk-ZNS7727Y.js";import"../chunk-QTLAVDJE.js";import"../chunk-OWBO4WKA.js";import"../chunk-BDTITTMW.js";import"../chunk-H6DDIBQ4.js";import"../chunk-YC4TB3CJ.js";import"../chunk-ZJEBF4NB.js";import"../chunk-THWO5YVZ.js";import"../chunk-RE4LP46F.js";import"../chunk-WZ7TGAAT.js";import"../chunk-2OAZYSWJ.js";import"../chunk-EWVJSRRY.js";import"../chunk-FPOKPNO4.js";import"../chunk-P6O363EE.js";import"../chunk-MFIRYGHW.js";import"../chunk-BZ5ASXOL.js";import"../chunk-DX4XELD6.js";import"../chunk-O2NLQBFX.js";import"../chunk-67GNT6PF.js";import"../chunk-PAELDYYS.js";import"../chunk-ZNCEOSXO.js";import"../chunk-L5KW4HG5.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
@@ -1,4 +1,4 @@
1
- export { A as AnyDocumentAddressing, a as DocumentAddressing, N as NO_DOCUMENT_ADDRESSING } from '../../host-BQ_b9Qzk.js';
1
+ export { A as AnyDocumentAddressing, a as DocumentAddressing, N as NO_DOCUMENT_ADDRESSING } from '../../host-CiuzZJXj.js';
2
2
  import './document-contract.js';
3
3
  import './session.js';
4
4
  import 'react';
@@ -1,5 +1,5 @@
1
1
  import 'react';
2
- export { D as DETACHED_EASEL_HOST, E as EaselHost, b as EaselHostAddress, c as EaselHostContext, d as EaselHostProvider, e as EaselMessageType, f as EaselToHostMessage, H as HostPickedMedia, g as HostToEaselMessage, I as InboundHostMessage, S as SectionScreenTarget, h as SendToHost, i as createEaselHost, u as useEaselHost, j as useHostEscape } from '../../host-BQ_b9Qzk.js';
2
+ export { D as DETACHED_EASEL_HOST, E as EaselHost, b as EaselHostAddress, c as EaselHostContext, d as EaselHostProvider, e as EaselMessageType, f as EaselToHostMessage, H as HostPickedMedia, g as HostToEaselMessage, I as InboundHostMessage, S as SectionScreenTarget, h as SendToHost, i as createEaselHost, u as useEaselHost, j as useHostEscape } from '../../host-CiuzZJXj.js';
3
3
  import '../../blocks/index.js';
4
4
  import '../../types-E3HrTPg2.js';
5
5
  import '../../data/index.js';
@@ -1,4 +1,5 @@
1
1
  import { RefObject } from 'react';
2
+ import { C as CanvasTarget } from '../../watch-BTYOJpQU.js';
2
3
 
3
4
  /**
4
5
  * Where the editor listens for its page-wide shortcuts — undo / redo, copy and
@@ -17,7 +18,35 @@ declare function useEaselKeyTarget(rootRef: RefObject<HTMLElement | null>): Even
17
18
  * Undo / redo on the editor's own root when the editor does not own the page —
18
19
  * the engine's `EaselProvider` binds them to `document`, and is told not to
19
20
  * (`hotkeys={host.ownsDocument}` in ScreenStoreProvider) in exactly this case.
21
+ *
22
+ * …and in the CANVAS FRAME (`canvas`, the frame the screen found, 0.106.0): a
23
+ * key pressed in the frame never leaves its document, and the canvas binds
24
+ * the frame's keys only under the provider's switch, which is off here. Until
25
+ * 0.106.0 ⌘Z on the canvas did nothing in the campaign designer, and in the
26
+ * website editor inside the admin's window. One binder for both
27
+ * (`bindUndoKeys`), never a copy of it; a layer's canvas leaves its own
28
+ * `hotkeys` out, or the frame would answer twice.
29
+ *
30
+ * Both leave a press where a person types to the field (`leaveTyping`): ⌘Z in
31
+ * a settings box or an editable region of the canvas is that field's own undo.
32
+ * And the root takes focus without a tab stop (`editorRootFocus`), so a click
33
+ * on the editor's ground — the top bar between its buttons, a panel's
34
+ * padding — leaves focus inside it, where its keys are heard, and not on the
35
+ * page's body.
36
+ */
37
+ declare function useEaselUndoKeys(rootRef: RefObject<HTMLElement | null>, canvas?: CanvasTarget | null): void;
38
+ /**
39
+ * What the editor's root carries so a click on its ground keeps focus inside
40
+ * it (0.106.0): a tab index of -1 — focusable, and never a tab stop — where
41
+ * its keys are its root's, inside another app's page; nothing where it owns
42
+ * the page and listens on `document`. A browser moves focus on a press to the
43
+ * nearest focusable thing round it, else to the body, which is outside the
44
+ * root and so out of its keys' hearing.
20
45
  */
21
- declare function useEaselUndoKeys(rootRef: RefObject<HTMLElement | null>): void;
46
+ declare function editorRootFocus(host: {
47
+ ownsDocument: boolean;
48
+ }): {
49
+ tabIndex?: number;
50
+ };
22
51
 
23
- export { useEaselKeyTarget, useEaselUndoKeys };
52
+ export { editorRootFocus, useEaselKeyTarget, useEaselUndoKeys };
@@ -1 +1 @@
1
- export{useEaselKeyTarget,useEaselUndoKeys}from"../../chunk-VSOP4GUM.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-P67FP7PG.js";import"../../chunk-AELNNAFM.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{editorRootFocus,useEaselKeyTarget,useEaselUndoKeys}from"../../chunk-MHKBLPQ2.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6WH7FA2M.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-AELNNAFM.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ComponentType, ReactNode } from 'react';
3
- import { H as HostPickedMedia, E as EaselHost } from '../../host-BQ_b9Qzk.js';
3
+ import { H as HostPickedMedia, E as EaselHost } from '../../host-CiuzZJXj.js';
4
4
  import '../../blocks/index.js';
5
5
  import '../../types-E3HrTPg2.js';
6
6
  import '../../data/index.js';
@@ -1,4 +1,4 @@
1
- import { E as EaselHost } from '../../host-BQ_b9Qzk.js';
1
+ import { E as EaselHost } from '../../host-CiuzZJXj.js';
2
2
  import 'react';
3
3
  import '../../blocks/index.js';
4
4
  import '../../types-E3HrTPg2.js';
@@ -14,7 +14,11 @@ declare function docToNode(data: Data): TreeItem | null;
14
14
  * inline slot child's, recursively — so inserting the same template twice never
15
15
  * lands two nodes with colliding ids (Puck keys selection/replace on id, and
16
16
  * React keys render on it).
17
+ *
18
+ * `strip` (0.106.0) sees each copied node once its children are copied, and
19
+ * answers it as the copy should hold it — the layer's `blockRules.stripCopy`,
20
+ * which takes out what only an original may hold. It keeps the fresh id.
17
21
  */
18
- declare function cloneNodeWithFreshIds(node: TreeItem): TreeItem;
22
+ declare function cloneNodeWithFreshIds(node: TreeItem, strip?: (node: TreeItem) => TreeItem): TreeItem;
19
23
 
20
24
  export { cloneNodeWithFreshIds, docToNode, nodeToDoc };
@@ -1 +1 @@
1
- export{cloneNodeWithFreshIds,docToNode,nodeToDoc}from"../../../chunk-IE4GFYKO.js";import"../../../chunk-PLVEGYK6.js";
1
+ export{cloneNodeWithFreshIds,docToNode,nodeToDoc}from"../../../chunk-2GVCAIPX.js";import"../../../chunk-PLVEGYK6.js";
@@ -25,7 +25,7 @@ import '../../components/AddSidePanel.js';
25
25
  import '../section-template-types.js';
26
26
  import './content-tree.js';
27
27
  import './block-choice.js';
28
- import '../../../host-BQ_b9Qzk.js';
28
+ import '../../../host-CiuzZJXj.js';
29
29
  import '../document-contract.js';
30
30
  import '../session.js';
31
31
  import '../backend-error.js';
@@ -1 +1 @@
1
- export{useSectionOps}from"../../../chunk-NWIW7AWH.js";import"../../../chunk-VSHV6KJQ.js";import"../../../chunk-PLVEGYK6.js";import"../../../chunk-R6WTQWAC.js";import"../../../chunk-U3JP4VGF.js";import"../../../chunk-P67FP7PG.js";import"../../../chunk-AELNNAFM.js";import"../../../chunk-BXZ6WLHC.js";import"../../../chunk-EOJNJCMJ.js";import"../../../chunk-ZFDCDJNZ.js";import"../../../chunk-ZNS7727Y.js";import"../../../chunk-3EDSDPIP.js";import"../../../chunk-QTLAVDJE.js";import"../../../chunk-YRLPFZW3.js";import"../../../chunk-KTVH2ZRL.js";import"../../../chunk-D2BCHTQR.js";import"../../../chunk-EWVJSRRY.js";import"../../../chunk-P6O363EE.js";import"../../../chunk-FPOKPNO4.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-BZ5ASXOL.js";import"../../../chunk-67GNT6PF.js";import"../../../chunk-ZNCEOSXO.js";import"../../../chunk-L5KW4HG5.js";import"../../../chunk-KRXQM65X.js";import"../../../chunk-NKB3KVAB.js";
1
+ export{useSectionOps}from"../../../chunk-PBSEUZD6.js";import"../../../chunk-ND55LTCA.js";import"../../../chunk-PLVEGYK6.js";import"../../../chunk-R6WTQWAC.js";import"../../../chunk-U3JP4VGF.js";import"../../../chunk-6WH7FA2M.js";import"../../../chunk-D2BCHTQR.js";import"../../../chunk-AELNNAFM.js";import"../../../chunk-VCQVNPTG.js";import"../../../chunk-EOJNJCMJ.js";import"../../../chunk-ZFDCDJNZ.js";import"../../../chunk-3EDSDPIP.js";import"../../../chunk-YRLPFZW3.js";import"../../../chunk-KTVH2ZRL.js";import"../../../chunk-ZNS7727Y.js";import"../../../chunk-QTLAVDJE.js";import"../../../chunk-EWVJSRRY.js";import"../../../chunk-FPOKPNO4.js";import"../../../chunk-P6O363EE.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-BZ5ASXOL.js";import"../../../chunk-67GNT6PF.js";import"../../../chunk-ZNCEOSXO.js";import"../../../chunk-L5KW4HG5.js";import"../../../chunk-KRXQM65X.js";import"../../../chunk-NKB3KVAB.js";
@@ -10,7 +10,7 @@ import { a as EaselRailItem } from '../../types-DWS-s9z-.js';
10
10
  import { StyleRow } from '../../style-clipboard/index.js';
11
11
  import { T as TreeRowMark } from '../../types-DJDBtdB2.js';
12
12
  import { AddKey } from '../components/AddSidePanel.js';
13
- import { k as AnyScreenTarget } from '../../host-BQ_b9Qzk.js';
13
+ import { k as AnyScreenTarget } from '../../host-CiuzZJXj.js';
14
14
  import { HostProduct } from './host-chrome.js';
15
15
  import { EaselSession } from './session.js';
16
16
  import { AddTarget } from './puck/add-target-types.js';
@@ -585,6 +585,19 @@ interface ScreenBlockRules {
585
585
  * the website's never has.
586
586
  */
587
587
  resolveOnInsert?: boolean;
588
+ /**
589
+ * CLEAN A COPY (0.106.0): handed every node the screen COPIES into the
590
+ * document — the menu's Duplicate and Paste, ⌘V (a cut block pasted back
591
+ * too), a saved section put in from Add — one node at a time, a copied
592
+ * section's blocks each as well, and it answers the node as the copy should
593
+ * hold it: what only the original may hold taken out. The campaign
594
+ * designer's image block releases the hosted picture it baked (`bakedId`):
595
+ * the next bake deletes the asset that id names, so two blocks holding one
596
+ * would destroy each other's picture. It must keep the node's id (the copy's
597
+ * own, already fresh) and its type. Absent: a copy is its original, prop for
598
+ * prop, but its ids, as before.
599
+ */
600
+ stripCopy?: (node: ScreenNode) => ScreenNode;
588
601
  }
589
602
  /**
590
603
  * ONE SLOT OF A NODE, as the screen draws it (`ScreenBlockRules.slotsOf`,
@@ -947,6 +960,16 @@ interface ScreenPinnedNodes {
947
960
  isFirst?: (node: ScreenNode) => boolean;
948
961
  /** …and the one pinned last (the Footer). Absent: a node of type `last`. */
949
962
  isLast?: (node: ScreenNode) => boolean;
963
+ /**
964
+ * May a block cross into and out of the node pinned LAST (0.106.0) — dragged
965
+ * in the Layers tree or on the canvas, or pasted? Absent or false, the
966
+ * website's Footer: its blocks reorder within their own slot and nothing
967
+ * from the page's sections lands in it, nor leaves it. True, the campaign
968
+ * designer's Footer, a section whose columns hold any block: its slots are
969
+ * lists like every other's, asked what they take (the slot's own list, the
970
+ * depth, never into itself). The node itself stays pinned either way.
971
+ */
972
+ lastIsOpen?: boolean;
950
973
  /**
951
974
  * How the Layers tree draws the node pinned first (0.103.0). `"panel"`: a
952
975
  * row of its own that opens the layer's panel for it (`panelOf`), drawn
@@ -1203,6 +1226,16 @@ interface ScreenParts {
1203
1226
  /** Where Add puts what it adds, and whether it is a picker of blocks first
1204
1227
  * (0.105.0; `ScreenAdd`). Absent: the screen's Add, as it always was. */
1205
1228
  add?: ScreenAdd;
1229
+ /**
1230
+ * WHERE A PERSON'S PANEL WIDTHS AND TREE FOLDS ARE KEPT (0.106.0): the
1231
+ * first part of the two `localStorage` keys, `<namespace>-panel-widths` and
1232
+ * `<namespace>-collapsed-sections`, so an editor beside the website's keeps
1233
+ * its own — the campaign designer's panels and folds are not the website
1234
+ * editor's. Read once, as the screen mounts. Absent (or empty): the website
1235
+ * editor's keys, `sf-editor-panel-widths` and
1236
+ * `sf-editor-collapsed-sections`, so a website's layout is what it was.
1237
+ */
1238
+ storageNamespace?: string;
1206
1239
  /** Copy style / Paste style's scope and a node's look, where they are the
1207
1240
  * layer's (0.105.0; `ScreenStyleClipboard`). Absent: the website's. */
1208
1241
  styleClipboard?: ScreenStyleClipboard;
@@ -1323,6 +1356,9 @@ declare function useScreenPickFollowsSelection(selection: unknown): void;
1323
1356
  /** Where Add puts what it adds (`add`). With no layer's, nothing: the
1324
1357
  * screen's own Add. */
1325
1358
  declare function useScreenAdd(): ScreenAdd;
1359
+ /** Where widths and folds are kept (`storageNamespace`), or undefined: the
1360
+ * website editor's keys. */
1361
+ declare function useScreenStorageNamespace(): string | undefined;
1326
1362
  /** The layer's style clipboard (`styleClipboard`), or null: the website's. */
1327
1363
  declare function useScreenStyleClipboard(): ScreenStyleClipboard | null;
1328
1364
  /** Whether ⌘C / ⌘X / ⌘V reach the selected block (`nodeKeys`). They do
@@ -1354,4 +1390,4 @@ declare function useScreenCanvasTarget(): CanvasTarget | null;
1354
1390
  * engine's plain rows for the selection. */
1355
1391
  declare function useScreenInspectorPanel(): ComponentType<ScreenInspectorPanelProps>;
1356
1392
 
1357
- export { type NodeDefaults, SELECTION_MODE, type ScreenAdd, type ScreenBlockLook, type ScreenBlockRules, type ScreenBridges, type ScreenCanvas, type ScreenCanvasDrag, type ScreenCanvasDragContext, type ScreenCanvasHeadProps, ScreenCanvasTargetProvider, type ScreenDevices, type ScreenDocumentOps, type ScreenDragItem, type ScreenInspector, type ScreenInspectorMode, type ScreenInspectorPanelProps, type ScreenLeftPanel, type ScreenLeftView, type ScreenLeftViewFrame, type ScreenLeftViewRules, type ScreenMenuRows, type ScreenNewNode, type ScreenNode, type ScreenNodeActions, type ScreenNodeLevel, type ScreenNodeMaker, type ScreenPartMode, type ScreenParts, ScreenPartsProvider, type ScreenPinnedBand, type ScreenPinnedNodes, type ScreenRailItem, type ScreenSelection, type ScreenSelector, type ScreenSlot, type ScreenSlotAction, type ScreenSlotMode, type ScreenStyleClipboard, type ScreenStyleDocument, type ScreenStylePastePlan, type ScreenTree, type ScreenTreeFolds, type ScreenTreeRows, isPinnedFirst, isPinnedLast, isSlotMode, sameInspectorMode, screenSlotsOf, useScreenAdd, useScreenBlockLook, useScreenBlockRules, useScreenBridges, useScreenCanvasDrag, useScreenCanvasFrame, useScreenCanvasHead, useScreenCanvasTarget, useScreenDevices, useScreenDocumentLabel, useScreenDocumentPass, useScreenInspectorPanel, useScreenLeftView, useScreenNodeKeys, useScreenNotify, useScreenOwnerName, useScreenParts, useScreenPickFollowsSelection, useScreenPinned, useScreenSaveSwitch, useScreenStyleClipboard, useStandaloneScreenBridges };
1393
+ export { type NodeDefaults, SELECTION_MODE, type ScreenAdd, type ScreenBlockLook, type ScreenBlockRules, type ScreenBridges, type ScreenCanvas, type ScreenCanvasDrag, type ScreenCanvasDragContext, type ScreenCanvasHeadProps, ScreenCanvasTargetProvider, type ScreenDevices, type ScreenDocumentOps, type ScreenDragItem, type ScreenInspector, type ScreenInspectorMode, type ScreenInspectorPanelProps, type ScreenLeftPanel, type ScreenLeftView, type ScreenLeftViewFrame, type ScreenLeftViewRules, type ScreenMenuRows, type ScreenNewNode, type ScreenNode, type ScreenNodeActions, type ScreenNodeLevel, type ScreenNodeMaker, type ScreenPartMode, type ScreenParts, ScreenPartsProvider, type ScreenPinnedBand, type ScreenPinnedNodes, type ScreenRailItem, type ScreenSelection, type ScreenSelector, type ScreenSlot, type ScreenSlotAction, type ScreenSlotMode, type ScreenStyleClipboard, type ScreenStyleDocument, type ScreenStylePastePlan, type ScreenTree, type ScreenTreeFolds, type ScreenTreeRows, isPinnedFirst, isPinnedLast, isSlotMode, sameInspectorMode, screenSlotsOf, useScreenAdd, useScreenBlockLook, useScreenBlockRules, useScreenBridges, useScreenCanvasDrag, useScreenCanvasFrame, useScreenCanvasHead, useScreenCanvasTarget, useScreenDevices, useScreenDocumentLabel, useScreenDocumentPass, useScreenInspectorPanel, useScreenLeftView, useScreenNodeKeys, useScreenNotify, useScreenOwnerName, useScreenParts, useScreenPickFollowsSelection, useScreenPinned, useScreenSaveSwitch, useScreenStorageNamespace, useScreenStyleClipboard, useStandaloneScreenBridges };
@@ -1 +1 @@
1
- export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenAdd,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-VSHV6KJQ.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-P67FP7PG.js";import"../../chunk-AELNNAFM.js";import"../../chunk-BXZ6WLHC.js";import"../../chunk-EOJNJCMJ.js";import"../../chunk-ZFDCDJNZ.js";import"../../chunk-ZNS7727Y.js";import"../../chunk-3EDSDPIP.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-KTVH2ZRL.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-EWVJSRRY.js";import"../../chunk-P6O363EE.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-BZ5ASXOL.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenAdd,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-ND55LTCA.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6WH7FA2M.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-AELNNAFM.js";import"../../chunk-VCQVNPTG.js";import"../../chunk-EOJNJCMJ.js";import"../../chunk-ZFDCDJNZ.js";import"../../chunk-3EDSDPIP.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-KTVH2ZRL.js";import"../../chunk-ZNS7727Y.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-EWVJSRRY.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-P6O363EE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-BZ5ASXOL.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -206,6 +206,14 @@
206
206
  box-sizing: border-box;
207
207
  }
208
208
 
209
+ /* The root takes focus without a tab stop inside another app's page (0.106.0,
210
+ lib/key-scope `editorRootFocus`), so a click on its ground keeps its keys in
211
+ hearing. It is never a place a person tabs to, so it draws no ring of its own:
212
+ the ring belongs to the control focus lands on. */
213
+ .sf-editor[tabindex="-1"]:focus {
214
+ outline: none;
215
+ }
216
+
209
217
  /* Scrollbars inside the editor panels */
210
218
  .sf-scroll::-webkit-scrollbar {
211
219
  width: 11px;
@@ -766,6 +774,19 @@
766
774
  pointer-events: none;
767
775
  }
768
776
 
777
+ /* A band CUT TO THE ROOM between two blocks (0.106.0): where the gap two
778
+ sections leave is narrower than the pill, the chrome sizes the band to it
779
+ (ScreenChrome `previewGapAt`), and the band clips the pill at rest — so the
780
+ pill, hidden but still taking the pointer, never lies over a block. Hovered,
781
+ it is drawn whole. */
782
+ .sf-preview-gap--tight {
783
+ overflow: hidden;
784
+ }
785
+
786
+ .sf-preview-gap--tight:hover {
787
+ overflow: visible;
788
+ }
789
+
769
790
  /* ── Canvas "Add section" seams (overlay between preview sections) ──────────
770
791
  Absolutely positioned over .sf-preview-host (the iframe's box), one band per
771
792
  seam between top-level sections, placed at the boundary Y measured from the
@@ -5,7 +5,9 @@
5
5
  * the Layers tree's frame round the document's nodes (0.103.0): its first
6
6
  * row, the pinned groups, the band of sections and the band's "+". And
7
7
  * (0.105.0) the Add panel's words (`add`), the main button's, and what the
8
- * block keys say when a block is copied or will not paste.
8
+ * block keys say when a block is copied or will not paste. And (0.106.0) the
9
+ * canvas's empty-slot cell, the rail's Media button, and the left panel's
10
+ * accessible name and its grip's.
9
11
  *
10
12
  * They came with the screen from the website editor, written into the
11
13
  * provider, the mount and the notice; a second host (the campaign designer)
@@ -130,6 +132,20 @@ type ScreenWords = {
130
132
  }) => string;
131
133
  /** The Add panel's words (0.105.0). */
132
134
  add: ScreenAddWords;
135
+ /** The cell over an EMPTY slot on the canvas, after its "+" (0.106.0): the
136
+ * campaign designer's "Add a block". */
137
+ canvasAddBlock: string;
138
+ /** The rail's button to the media library (0.106.0). Owner ruling R21
139
+ * (Victor Mau, 2026-10-09): the campaign designer's rail reads Add,
140
+ * Layers, Email styles, Media. The panel's own head keeps its word
141
+ * (`EaselStrings.chrome.mediaLibrary`). */
142
+ railMedia: string;
143
+ /** The left panel's accessible name (0.106.0): the panel is a labelled
144
+ * `<aside>`, whichever view it shows. */
145
+ leftPanel: string;
146
+ /** The left panel's resize grip's accessible name (0.106.0). It said
147
+ * "Resize Sections panel", from when the tree was the panel's one view. */
148
+ resizeLeftPanel: string;
133
149
  };
134
150
  declare const DEFAULT_SCREEN_WORDS: ScreenWords;
135
151
 
@@ -1 +1 @@
1
- export{DEFAULT_SCREEN_ADD_WORDS,DEFAULT_SCREEN_WORDS}from"../chunk-PQXIFBDY.js";
1
+ export{DEFAULT_SCREEN_ADD_WORDS,DEFAULT_SCREEN_WORDS}from"../chunk-E2O2MRZR.js";
@@ -1 +1 @@
1
- export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-53G47SWO.js";import"../chunk-M6F6LS3H.js";import"../chunk-6WY6ZXJG.js";import"../chunk-PQXIFBDY.js";import"../chunk-AELNNAFM.js";import"../chunk-3EDSDPIP.js";import"../chunk-QTLAVDJE.js";import"../chunk-WK3AFPXY.js";import"../chunk-H6DDIBQ4.js";import"../chunk-ZJEBF4NB.js";import"../chunk-RE4LP46F.js";import"../chunk-2OAZYSWJ.js";import"../chunk-UH7IGZKF.js";import"../chunk-ZAOM6PFH.js";import"../chunk-FPOKPNO4.js";import"../chunk-546BBOPE.js";import"../chunk-O2NLQBFX.js";
1
+ export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-Z6SOLDWV.js";import"../chunk-M6F6LS3H.js";import"../chunk-6WY6ZXJG.js";import"../chunk-WK3AFPXY.js";import"../chunk-E2O2MRZR.js";import"../chunk-AELNNAFM.js";import"../chunk-3EDSDPIP.js";import"../chunk-QTLAVDJE.js";import"../chunk-H6DDIBQ4.js";import"../chunk-ZJEBF4NB.js";import"../chunk-RE4LP46F.js";import"../chunk-2OAZYSWJ.js";import"../chunk-UH7IGZKF.js";import"../chunk-ZAOM6PFH.js";import"../chunk-FPOKPNO4.js";import"../chunk-546BBOPE.js";import"../chunk-O2NLQBFX.js";
@@ -1,2 +1,2 @@
1
- import{DEFAULT_EASEL_STRINGS as r,mergeEaselStrings as n}from"../chunk-53G47SWO.js";export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-53G47SWO.js";import"../chunk-M6F6LS3H.js";import"../chunk-6WY6ZXJG.js";import"../chunk-PQXIFBDY.js";import"../chunk-AELNNAFM.js";import"../chunk-3EDSDPIP.js";import"../chunk-QTLAVDJE.js";import"../chunk-WK3AFPXY.js";import"../chunk-H6DDIBQ4.js";import"../chunk-ZJEBF4NB.js";import"../chunk-RE4LP46F.js";import"../chunk-2OAZYSWJ.js";import"../chunk-UH7IGZKF.js";import"../chunk-ZAOM6PFH.js";import"../chunk-FPOKPNO4.js";import"../chunk-546BBOPE.js";import{stringsContext as o}from"../chunk-MFIRYGHW.js";import"../chunk-O2NLQBFX.js";import{useContext as t,useMemo as c}from"react";import{jsx as i}from"react/jsx-runtime";function s({value:s,locale:u,children:m}){const e=o(),p=t(e),h=p?.strings??r,j=u??p?.locale??"en",k=c(()=>({strings:n(h,s),locale:j}),[h,s,j]);/* @__PURE__ */
1
+ import{DEFAULT_EASEL_STRINGS as r,mergeEaselStrings as n}from"../chunk-Z6SOLDWV.js";export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-Z6SOLDWV.js";import"../chunk-M6F6LS3H.js";import"../chunk-6WY6ZXJG.js";import"../chunk-WK3AFPXY.js";import"../chunk-E2O2MRZR.js";import"../chunk-AELNNAFM.js";import"../chunk-3EDSDPIP.js";import"../chunk-QTLAVDJE.js";import"../chunk-H6DDIBQ4.js";import"../chunk-ZJEBF4NB.js";import"../chunk-RE4LP46F.js";import"../chunk-2OAZYSWJ.js";import"../chunk-UH7IGZKF.js";import"../chunk-ZAOM6PFH.js";import"../chunk-FPOKPNO4.js";import"../chunk-546BBOPE.js";import{stringsContext as o}from"../chunk-MFIRYGHW.js";import"../chunk-O2NLQBFX.js";import{useContext as t,useMemo as c}from"react";import{jsx as i}from"react/jsx-runtime";function s({value:s,locale:u,children:m}){const e=o(),p=t(e),h=p?.strings??r,j=u??p?.locale??"en",k=c(()=>({strings:n(h,s),locale:j}),[h,s,j]);/* @__PURE__ */
2
2
  return i(e.Provider,{value:k,children:m})}function u(){return t(o())?.strings??r}function m(){return t(o())?.locale??"en"}export{s as EaselStringsProvider,m as useEaselLocale,u as useEaselStrings};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-easel",
3
- "version": "0.105.1",
3
+ "version": "0.106.0",
4
4
  "description": "Efficient Easel: the EFFICIENT editors' shared engine and chrome: the saved document as pure functions, the published renderer, and the editor frame, panels, Layers tree, text grammar and type-in-place box. Published as editor-shell up to 0.66.0 and as efficient-editor up to 0.95.0.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",
@@ -1 +0,0 @@
1
- import{DEFAULT_TEXT_STYLES_WORDS as o}from"./chunk-M6F6LS3H.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as r}from"./chunk-6WY6ZXJG.js";import{DEFAULT_SCREEN_WORDS as t}from"./chunk-PQXIFBDY.js";import{DEFAULT_CANVAS_WORDS as m}from"./chunk-AELNNAFM.js";import{DEFAULT_TREE_WORDS as n}from"./chunk-3EDSDPIP.js";import{DEFAULT_PANEL_WORDS as c}from"./chunk-QTLAVDJE.js";import{DEFAULT_NODE_MENU_WORDS as s}from"./chunk-WK3AFPXY.js";import{DEFAULT_SAVE_WORDS as f}from"./chunk-H6DDIBQ4.js";import{DEFAULT_CHROME_WORDS as p,DEFAULT_NOTICE_WORDS as e}from"./chunk-ZJEBF4NB.js";import{DEFAULT_LOCK_WORDS as i}from"./chunk-RE4LP46F.js";import{DEFAULT_RAIL_WORDS as u}from"./chunk-2OAZYSWJ.js";import{DEFAULT_COPY_WORDS as k}from"./chunk-UH7IGZKF.js";import{DEFAULT_PICK_WORDS as j}from"./chunk-ZAOM6PFH.js";import{DEFAULT_FIELDS_WORDS as h}from"./chunk-FPOKPNO4.js";import{DEFAULT_DRAG_WORDS as l}from"./chunk-O2NLQBFX.js";var F={notice:e,lock:i,save:f,chrome:p,rail:u,tree:n,panel:c,fields:h,pick:j,drag:l,menu:s,styleClipboard:r,copy:k,canvas:m,textStyles:o,screen:t},a=o=>"object"==typeof o&&null!==o;function P(o,r){const t={};for(const m of Object.keys(o)){const n=o[m],c=r[m];null==c?t[m]=n:a(n)?t[m]=a(c)?P(n,c):n:t[m]=typeof c==typeof n?c:n}return t}function y(o,r){return r?P(o,r):o}export{F as DEFAULT_EASEL_STRINGS,y as mergeEaselStrings};
@@ -1,2 +0,0 @@
1
- import{styleMenuItems as e}from"./chunk-57DJOKXT.js";import{useEaselSession as n}from"./chunk-O7Q4DDJT.js";import{ROOT_ZONE as t}from"./chunk-PLVEGYK6.js";import{useHostEscape as o}from"./chunk-U3JP4VGF.js";import{EaselContextMenu as l}from"./chunk-KTVH2ZRL.js";import{createNodeClipboard as i,nodeMenuItems as r}from"./chunk-2LK54I4E.js";import{useCanvasEvent as c}from"./chunk-PAELDYYS.js";import{isTypingTarget as s,framePointToHost as a}from"./chunk-ZNCEOSXO.js";import{UndoIcon as u,RedoIcon as d,AddIcon as p,PasteIcon as f,SettingsIcon as m,LayersIcon as y,CopyIcon as h}from"./chunk-L5KW4HG5.js";import{zoneKey as k,ROOT_SLOT as b,ROOT_ID as v}from"./chunk-KRXQM65X.js";import{useState as x,useCallback as g,useRef as C,useEffect as P}from"react";import{jsx as z}from"react/jsx-runtime";function O(e,n){const o=[],l=/* @__PURE__ */new Set;let i={zone:n.zone,index:n.index};for(;i;){const n=e.nodeAt(i.zone,i.index);if(!n||l.has(n.props.id))break;if(l.add(n.props.id),o.push({zone:i.zone,index:i.index,node:n,parentType:null}),i.zone===t)break;const r=i.zone.lastIndexOf(":");if(r<=0)break;i=e.locate(i.zone.slice(0,r))}for(let e=0;e<o.length-1;e+=1)o[e].parentType=o[e+1].node.type;return o}var w=i(),A=/* @__PURE__ */new WeakMap;function K(e){if(e.claimsPage)return w;const n=e.registry;if(!n)return e.cache("easel:node-clipboard",i);let t=A.get(n);return t||(t=i(),A.set(n,t)),t}function D(){return K(n())}function T(e,n,o){if(n===t){const{floor:n,cap:t}=e.sectionBand();return{parentId:v,slot:b,index:Math.min(Math.max(o,n),t)}}const l=n.lastIndexOf(":");return{parentId:n.slice(0,l),slot:n.slice(l+1),index:o}}function j(e,n,t){const o=e.isPinned(n,t),l=!o&&!e.isLocked(n)&&!e.duplicateBlocked(n),i=e.permits?.(n)??{duplicate:!0,delete:!0};return{copy:!o&&i.duplicate,cut:l&&i.duplicate&&i.delete}}function E(e,n,t){const o=e.canPasteAt;if(!o)return k(n.from)===t.zone?T(e,t.zone,t.index+1):null;for(const l of O(e,t)){const t=T(e,l.zone,l.index+1);if(o(n,t))return t}return null}function L(e){if(e.defaultPrevented||e.altKey||e.shiftKey||!e.metaKey&&!e.ctrlKey)return null;if(s(e.target))return null;const n=e.target,t=n&&"ownerDocument"in n?n.ownerDocument??n:null,o=t?.getSelection?.();if(o&&!o.isCollapsed&&o.toString().trim())return null;const l=e.code||(1===e.key.length?`Key${e.key.toUpperCase()}`:"");return"KeyC"===l?"copy":"KeyX"===l?"cut":"KeyV"===l?"paste":null}function M(e,n,t,o){const l=e.nodeAt(t.zone,t.index);if(!l)return null;const i=l.props.id,r=e.labelOf(l.type,t.zone),c=j(e,l,t.zone);if("copy"===n)return c.copy?(e.nodeOps.copy(i,r),{done:"copied",name:r}):null;if(o.readOnly)return null;if("cut"===n)return c.cut?(e.nodeOps.cut(i,r),{done:"cut",name:r}):null;const s=o.held;if(!s)return null;const a=e.isPinned(l,t.zone)?null:E(e,s,t);return a?(e.nodeOps.paste(a),{done:"pasted",name:s.label}):(e.onPasteRefused(s),{done:"refused",name:s.label})}function S(n,o){const{zone:l,index:i}=o,c=n.nodeAt(l,i);if(!c)return[];const s=c.props.id,a=n.labelOf(c.type,l),u=Boolean(c.props._hidden),d=n.nodeOps,p=n.isPinned(c,l),f=n.isLocked(c),m=!p&&!f&&!n.duplicateBlocked(c),y=n.permits?.(c)??{duplicate:!0,delete:!0},h=j(n,c,l),k=O(n,o),b=d.held,v=b&&!p?E(n,b,o):null,x=n.style?e({held:n.style.held(),canCopy:n.style.canCopy(c,l),onCopy:()=>n.style?.copy(c,l),onPaste:()=>n.style?.paste(l,i,c)}):[];return r({title:a,layer:{group:"pick",items:k.flatMap((e,o)=>{const l={label:n.rowNameOf(e.node,e.zone),checked:0===o,onClick:()=>n.selectAt(e.zone,e.index,e.node.props.id,e.parentType)},i=e.zone===t?null:n.slotRung?.(e.zone)??null;return i?[l,{label:i.label,checked:!1,onClick:i.select}]:[l]})},actions:{addInside:n.canAddTo(c.type)?()=>n.openAddInside(l,i):void 0,duplicate:m&&y.duplicate?()=>d.duplicate(s):void 0,moveUp:d.canStep(s,-1)?()=>d.step(s,-1):void 0,moveDown:d.canStep(s,1)?()=>d.step(s,1):void 0,copy:h.copy?()=>d.copy(s,a):void 0,cut:h.cut?()=>d.cut(s,a):void 0,paste:b&&v?{label:b.label,run:()=>d.paste(v)}:void 0,rename:n.renamePropOf(c,l)?()=>n.beginRename(l,i):void 0,hide:f||p?void 0:{hidden:u,run:()=>d.setProps(s,{_hidden:!u})},delete:m&&y.delete?()=>d.remove(s):void 0},style:x,extras:n.menuRows?.(c,l,i)??void 0,pinnedLine:p?"Pinned — can’t be moved or deleted":void 0})}function X(e){const n=[];e.history.hasPast&&n.push({label:"Undo",icon:/* @__PURE__ */z(u,{}),shortcut:"⌘Z",onClick:e.history.back}),e.history.hasFuture&&n.push({label:"Redo",icon:/* @__PURE__ */z(d,{}),shortcut:"⇧⌘Z",onClick:e.history.forward});const o=[{label:"Add section",icon:/* @__PURE__ */z(p,{}),onClick:e.openAddSection}],l=e.nodeOps.held,i=T(e,t,e.sectionBand().cap);if(l&&(e.canPasteAt?e.canPasteAt(l,i):k(l.from)===t)){const n=i;o.push({label:`Paste ${l.label}`,icon:/* @__PURE__ */z(f,{}),shortcut:"⌘V",onClick:()=>e.nodeOps.paste(n)})}const r=[n,o,[{label:"Page settings",icon:/* @__PURE__ */z(m,{}),onClick:e.openPageSettings},{label:"Collapse all layers",icon:/* @__PURE__ */z(y,{}),onClick:e.collapseAll}]].filter(e=>e.length>0),c={label:"—",onClick:()=>{}};return r.flatMap((e,n)=>n?[c,...e]:e)}function I(e,n){const t=n.selectionStart??0,o=n.selectionEnd??0,l=n.value.slice(t,o),i=e=>{n.focus(),n.setRangeText(e,t,o,"end"),n.dispatchEvent(new Event("input",{bubbles:!0}))},r=[];l&&(r.push({label:"Copy",icon:/* @__PURE__ */z(h,{}),shortcut:"⌘C",onClick:()=>navigator.clipboard?.writeText(l)}),r.push({label:"Cut",icon:/* @__PURE__ */z(h,{}),shortcut:"⌘X",onClick:()=>{navigator.clipboard?.writeText(l),i("")}})),r.push({label:"Paste",icon:/* @__PURE__ */z(f,{}),shortcut:"⌘V",onClick:()=>{navigator.clipboard?.readText().then(e=>{e&&i(e)}).catch(()=>e.onPasteRefused())}});const c=[r,n.value?[{label:"Select all",shortcut:"⌘A",onClick:()=>{n.focus(),n.select()}}]:[]].filter(e=>e.length>0),s={label:"—",onClick:()=>{}};return c.flatMap((e,n)=>n?[s,...e]:e)}function R(e){return e.shiftKey}function Y(e,n){const[t,l]=x(null),i=g(()=>l(null),[]);o(null!==t,i);const r=C(e);r.current=e;const s=g(e=>{const n=r.current,t=n.keys;if(!t)return;const o=L(e);if(!o)return;const l=t.selected();if(!l)return;const i=M(n,o,l,{readOnly:t.readOnly,held:t.held()});i&&(e.preventDefault(),t.onDone?.(i))},[]),u=e.keys?.target??null;P(()=>{if(!u)return;const e=e=>s(e);return u.addEventListener("keydown",e),()=>u.removeEventListener("keydown",e)},[u,s]),c(n,"keydown",s);const d=g(n=>{if(R(n))return;const t=n.target,o=function(e){const n=e?.closest?.("input, textarea");return n?n instanceof HTMLInputElement&&!["text","search","url","email","tel","number",""].includes(n.type)?null:n:null}(t);if(o)return n.preventDefault(),void l({kind:"input",x:n.clientX,y:n.clientY,el:o});const i=t?.closest?.("[data-node-id]")?.getAttribute("data-node-id"),r=i?e.locate(i):null;n.preventDefault(),l(r?{kind:"node",x:n.clientX,y:n.clientY,...r}:{kind:"empty",x:n.clientX,y:n.clientY})},[e]);c(n,"contextmenu",t=>{if(R(t)||!n)return;const o=t.target?.closest?.("[data-puck-component]")??null,i=o?.getAttribute("data-puck-component"),r=i?e.locate(i):null;t.preventDefault();const c=a(n.frame,t.clientX,t.clientY);l(r?{kind:"node",...c,...r}:{kind:"empty",...c})}),c(n,"mousedown",i),c(n,"scroll",i,{on:"window"});return{onEditorContextMenu:d,menu:t?/* @__PURE__ */z(V,{host:e,target:t,onClose:i}):null,closeMenu:i}}function V({host:e,target:n,onClose:t}){/* @__PURE__ */
2
- return z(l,{x:n.x,y:n.y,items:"node"===n.kind?S(e,n):"input"===n.kind?I(e,n.el):X(e),onClose:t})}export{w as EASEL_NODE_CLIPBOARD,O as ancestorChain,K as nodeClipboardOf,j as nodeClipboardRules,S as nodeMenuItems,L as nodeShortcut,X as pageMenuItems,E as pastePlace,M as runNodeShortcut,I as textMenuItems,D as useNodeClipboard,Y as useNodeContextMenu};