efficient-easel 15.0.0 → 16.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 (41) hide show
  1. package/README.md +5 -3
  2. package/dist/{chunk-GS44HQ45.js → chunk-63ZDVAVE.js} +1 -1
  3. package/dist/chunk-BALFHI3G.js +2 -0
  4. package/dist/{chunk-Z62Z75UI.js → chunk-GGC72GS4.js} +1 -1
  5. package/dist/{chunk-5EPK5WB3.js → chunk-JD5HXBEX.js} +1 -1
  6. package/dist/{chunk-YQVR54RE.js → chunk-KFPCMMRK.js} +1 -1
  7. package/dist/chunk-N2B32EZB.js +5 -0
  8. package/dist/{chunk-OJ6QWOLG.js → chunk-N2BVA6TS.js} +1 -1
  9. package/dist/chunk-N3LYD2LK.js +21 -0
  10. package/dist/{chunk-GOABCALQ.js → chunk-OK7OH2ZN.js} +1 -1
  11. package/dist/{chunk-JASNL4KG.js → chunk-P3XVBLZ6.js} +4 -4
  12. package/dist/{chunk-EHBWUEEE.js → chunk-PQRYAW2G.js} +4 -4
  13. package/dist/chunk-RQBIFINA.js +57 -0
  14. package/dist/chunk-UVQR7W6I.js +1 -0
  15. package/dist/chunk-WXFZD7WC.js +1 -0
  16. package/dist/fields/index.js +1 -1
  17. package/dist/menu/index.d.ts +22 -27
  18. package/dist/menu/index.js +1 -1
  19. package/dist/menu/menu.css +7 -6
  20. package/dist/screen/components/AddBlockRow.js +1 -1
  21. package/dist/screen/components/AddSidePanel.js +1 -1
  22. package/dist/screen/components/MediaSidePanel.js +1 -1
  23. package/dist/screen/components/NodeContextMenu.js +1 -1
  24. package/dist/screen/components/ScreenChrome.js +1 -1
  25. package/dist/screen/components/ScreenMount.js +1 -1
  26. package/dist/screen/components/ScreenStoreProvider.js +1 -1
  27. package/dist/screen/components/SectionScreenShell.js +16 -16
  28. package/dist/screen/components/usePartBridge.js +1 -1
  29. package/dist/screen/index.js +1 -1
  30. package/dist/screen/lib/puck/style-clipboard.js +1 -1
  31. package/dist/screen/lib/puck/use-section-ops.js +1 -1
  32. package/dist/screen/lib/screen-parts.js +1 -1
  33. package/dist/strings/catalogue.js +1 -1
  34. package/dist/strings/index.js +1 -1
  35. package/package.json +3 -3
  36. package/dist/chunk-BXMXTO36.js +0 -1
  37. package/dist/chunk-EA2HTX37.js +0 -5
  38. package/dist/chunk-FRXE6EQN.js +0 -5
  39. package/dist/chunk-QKZPPI5O.js +0 -57
  40. package/dist/chunk-SO5OLDH7.js +0 -21
  41. package/dist/chunk-VJZDNOQ7.js +0 -1
@@ -1 +1 @@
1
- export{ScreenChrome as default}from"../../chunk-QKZPPI5O.js";import"../../chunk-XT6DOSHO.js";import"../../chunk-FGNR22NY.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-NBDMTIU2.js";import"../../chunk-MQNBD6AB.js";import"../../chunk-LER7RKTO.js";import"../../chunk-7F52SZOI.js";import"../../chunk-RSKHAHPJ.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-3Z2MVLCD.js";import"../../chunk-HM7S7H5H.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-TZIIRGVY.js";import"../../chunk-Z62Z75UI.js";import"../../chunk-OJ6QWOLG.js";import"../../chunk-5545A3PC.js";import"../../chunk-FRXE6EQN.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-BVN33R76.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-62VPYC7F.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-GS44HQ45.js";import"../../chunk-EHBWUEEE.js";import"../../chunk-VJZDNOQ7.js";import"../../chunk-2H3W5OLQ.js";import"../../chunk-ZZ64CEC2.js";import"../../chunk-ERR437B5.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-V7U33NF2.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-BXMXTO36.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-VVPZMWJE.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-BSPCSC45.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-TBF5CVPA.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-SMM3ST7A.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-SO5OLDH7.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-EA2HTX37.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-4VJATVVR.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-23VM4PMV.js";import"../../chunk-B4JN227A.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-POSLNRTO.js";import"../../chunk-KAML3KQH.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{ScreenChrome as default}from"../../chunk-RQBIFINA.js";import"../../chunk-XT6DOSHO.js";import"../../chunk-FGNR22NY.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-NBDMTIU2.js";import"../../chunk-MQNBD6AB.js";import"../../chunk-LER7RKTO.js";import"../../chunk-7F52SZOI.js";import"../../chunk-RSKHAHPJ.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-3Z2MVLCD.js";import"../../chunk-HM7S7H5H.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-TZIIRGVY.js";import"../../chunk-GGC72GS4.js";import"../../chunk-N2BVA6TS.js";import"../../chunk-5545A3PC.js";import"../../chunk-N2B32EZB.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-BVN33R76.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-62VPYC7F.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-63ZDVAVE.js";import"../../chunk-PQRYAW2G.js";import"../../chunk-UVQR7W6I.js";import"../../chunk-2H3W5OLQ.js";import"../../chunk-ZZ64CEC2.js";import"../../chunk-ERR437B5.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-VVPZMWJE.js";import"../../chunk-V7U33NF2.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-WXFZD7WC.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-BSPCSC45.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-TBF5CVPA.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-SMM3ST7A.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-N3LYD2LK.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-BALFHI3G.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-4VJATVVR.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-23VM4PMV.js";import"../../chunk-B4JN227A.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-POSLNRTO.js";import"../../chunk-KAML3KQH.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -1 +1 @@
1
- export{DocumentScreen,ScreenMount as default}from"../../chunk-JASNL4KG.js";import"../../chunk-GXQCZJOP.js";import"../../chunk-QKZPPI5O.js";import"../../chunk-XT6DOSHO.js";import"../../chunk-FGNR22NY.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-NBDMTIU2.js";import"../../chunk-MQNBD6AB.js";import"../../chunk-LER7RKTO.js";import"../../chunk-7F52SZOI.js";import"../../chunk-RSKHAHPJ.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-YQVR54RE.js";import"../../chunk-3Z2MVLCD.js";import"../../chunk-HM7S7H5H.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-TZIIRGVY.js";import"../../chunk-Z62Z75UI.js";import"../../chunk-OJ6QWOLG.js";import"../../chunk-5545A3PC.js";import"../../chunk-FRXE6EQN.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-BVN33R76.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-62VPYC7F.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-GS44HQ45.js";import"../../chunk-EHBWUEEE.js";import"../../chunk-VJZDNOQ7.js";import"../../chunk-2H3W5OLQ.js";import"../../chunk-ZZ64CEC2.js";import"../../chunk-ERR437B5.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-V7U33NF2.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-BXMXTO36.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-VVPZMWJE.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-BSPCSC45.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-TBF5CVPA.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-SMM3ST7A.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-SO5OLDH7.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-EA2HTX37.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-4VJATVVR.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-23VM4PMV.js";import"../../chunk-B4JN227A.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-POSLNRTO.js";import"../../chunk-KAML3KQH.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{DocumentScreen,ScreenMount as default}from"../../chunk-P3XVBLZ6.js";import"../../chunk-GXQCZJOP.js";import"../../chunk-RQBIFINA.js";import"../../chunk-XT6DOSHO.js";import"../../chunk-FGNR22NY.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-NBDMTIU2.js";import"../../chunk-MQNBD6AB.js";import"../../chunk-LER7RKTO.js";import"../../chunk-7F52SZOI.js";import"../../chunk-RSKHAHPJ.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-KFPCMMRK.js";import"../../chunk-3Z2MVLCD.js";import"../../chunk-HM7S7H5H.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-TZIIRGVY.js";import"../../chunk-GGC72GS4.js";import"../../chunk-N2BVA6TS.js";import"../../chunk-5545A3PC.js";import"../../chunk-N2B32EZB.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-BVN33R76.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-62VPYC7F.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-63ZDVAVE.js";import"../../chunk-PQRYAW2G.js";import"../../chunk-UVQR7W6I.js";import"../../chunk-2H3W5OLQ.js";import"../../chunk-ZZ64CEC2.js";import"../../chunk-ERR437B5.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-VVPZMWJE.js";import"../../chunk-V7U33NF2.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-WXFZD7WC.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-BSPCSC45.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-TBF5CVPA.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-SMM3ST7A.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-N3LYD2LK.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-BALFHI3G.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-4VJATVVR.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-23VM4PMV.js";import"../../chunk-B4JN227A.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-POSLNRTO.js";import"../../chunk-KAML3KQH.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -1 +1 @@
1
- export{ScreenStoreProvider as default}from"../../chunk-YQVR54RE.js";import"../../chunk-EHBWUEEE.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-SMM3ST7A.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-SO5OLDH7.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-EA2HTX37.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-23VM4PMV.js";import"../../chunk-B4JN227A.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{ScreenStoreProvider as default}from"../../chunk-KFPCMMRK.js";import"../../chunk-PQRYAW2G.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-SMM3ST7A.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-N3LYD2LK.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-BALFHI3G.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-23VM4PMV.js";import"../../chunk-B4JN227A.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -1,16 +1,16 @@
1
- import{AddBlockRow as e}from"../../chunk-GOABCALQ.js";import{scrollPreviewToSection as n,gotoPreviewSlide as o}from"../../chunk-3Z2MVLCD.js";import{useEaselUndoKeys as r}from"../../chunk-HM7S7H5H.js";import{SlotChildActionsProvider as t}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as s}from"../../chunk-TZIIRGVY.js";import{usePartBridge as i}from"../../chunk-Z62Z75UI.js";import{useSectionOps as c}from"../../chunk-OJ6QWOLG.js";import"../../chunk-HQ4VVRIC.js";import{MediaSidePanel as p}from"../../chunk-GS44HQ45.js";import{SELECTION_MODE as l,useScreenPinned as m,useScreenCanvasFrame as d,useScreenInspectorPanel as a,useScreenPickFollowsSelection as u,sameInspectorMode as h,useStandaloneScreenBridges as k,useScreenBlockLook as f,useScreenBlockRules as j}from"../../chunk-EHBWUEEE.js";import{useScreenDocument as S}from"../../chunk-ZZ64CEC2.js";import"../../chunk-ERR437B5.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import{useMediaPanel as y,usePanelPick as N,useCancelPanelPick as C}from"../../chunk-R6WTQWAC.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import{useHostEscape as A}from"../../chunk-U3JP4VGF.js";import{DEFAULT_SCREEN_WORDS as M}from"../../chunk-VVPZMWJE.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-IQ5TA7AM.js";import{slotChildRowName as x}from"../../chunk-TBF5CVPA.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-IYT6NN2J.js";import{slotFieldsOf as P,nestsInTree as R}from"../../chunk-PLVEGYK6.js";import{useEasel as E}from"../../chunk-SMM3ST7A.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-SO5OLDH7.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-XWFH2NHZ.js";import{LayersTree as H,Subtree as O,TreeRow as v,TreeRowAction as V,TreeSeam as g}from"../../chunk-4JSBIW5H.js";import{DEFAULT_TREE_WORDS as B}from"../../chunk-K56YDHYQ.js";import"../../chunk-EA2HTX37.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-NDRZP6YR.js";import{DEFAULT_SAVE_WORDS as w,saveIndicator as z}from"../../chunk-H6DDIBQ4.js";import{SaveState as L,panelWidthVars as W}from"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-23VM4PMV.js";import"../../chunk-B4JN227A.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import{useWords as b}from"../../chunk-MFIRYGHW.js";import"../../chunk-POSLNRTO.js";import"../../chunk-KAML3KQH.js";import{useTreeDrag as D}from"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import{zoneKey as T,parseZoneKey as Z}from"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import{useState as J,useRef as F,useEffect as G,useCallback as I,Fragment as K}from"react";import{Tooltip as X}from"efficient-shell/ui";import{TrashIcon as Y}from"efficient-shell/icons/efficient";import{jsxs as Q,jsx as $,Fragment as U}from"react/jsx-runtime";var q=e=>n=>{n.target.closest("button, input")||e()},_={rowClick:q};function ee(){const{saveState:ee,readOnly:ne,readOnlyReason:oe=null}=S(),re=c(),{appState:te,selectedItem:se,config:ie}=E(e=>e),[ce,pe]=J(l),le=b("screen",M),me=b("tree",B),de=b("save",w),{first:ae,last:ue,panelOf:he}=m(),ke=he(ae),fe=d(),je=a(),Se=te.data.content?.[0]??null,ye=Se?.props.id??null,Ne=Se?.type===ae,Ce=Se?.type===ue,Ae=F(null),Me=F(null);r(Me);const xe=y(),Pe=N(),Re=C();u(se?.props.id),G(()=>{const e=Me.current;if(!Pe||!e)return;const n=e=>{"Escape"===e.key&&Re()};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[Pe]),A(null!==Pe,()=>Re()),G(()=>{ye&&Ae.current!==ye&&(Ae.current=ye,Ne?pe(ke??l):se||re.select({index:0}))},[ye,se,re,Ne]);const Ee=I(e=>pe(n=>h(n,e)?n:e),[]),He=k({kind:ce.kind,mode:ce,open:Ee,show:e=>pe(e),reveal:()=>{},select:(e,n)=>{pe(e=>h(e,n)?e:n),re.select(e)}}),{selectNode:Oe}=i({mode:ce,setMode:pe,onOpenPart:n}),ve=f(),{labelAtLevel:Ve,Icon:ge}=ve,{canAddTo:Be}=j(),we=e=>Ve(e,"block",ie.components[e]?.label??e),ze=e=>Ve(e,"section",we(e)),Le=!Ne&&"puck"===ce.kind&&se?.props.id===ye,We=Se?Be(Se.type)?.spec??null:null,be=Se&&We?`${Se.props.id}:${We.slot}`:null,De=Se&&We&&Array.isArray(Se.props[We.slot])?Se.props[We.slot]:[],Te=e=>x(e,we,ve.plainText),Ze=(e,r)=>{Se&&We&&be&&(pe(l),We.slider?(o(String(Se.props.id),e),re.select({index:e,zone:be}),n(String(Se.props.id))):(re.select({index:e,zone:be}),n(r)))},Je=()=>{if(!Se||!We||!be)return;const e=De.length;re.insertComponent(be,We.childType,e),pe(l),We.slider?requestAnimationFrame(()=>{o(String(Se.props.id),e),re.select({index:e,zone:be})}):re.select({index:e,zone:be})},Fe=e=>P(ie,e),Ge=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(Se)?.props[o];return Array.isArray(t)?t.length:0},Ie=(e,n,o)=>{const r=Math.min(Math.max(o,0),Ge(e)),t=n<r?r-1:r;t!==n&&(re.reorderComponent(e,n,t),pe(l),re.select({index:t,zone:e}))},Ke=D({keyOf:e=>e.id,readOnly:Boolean(ne),canDrop:(e,n)=>T(n)===e.zone&&n.index>=0&&n.index<=Ge(e.zone),onDrop:(e,n)=>Ie(e.zone,e.index,n.index),onStep:(e,n)=>Ie(e.zone,e.index,n<0?e.index-1:e.index+2)}),Xe=(e,n)=>/* @__PURE__ */$(g,{...ne?{}:Ke.seam({place:{...Z(e),index:n}})},`seam:${e}:${n}`),Ye=e=>ve.blockRowName(e,we),Qe=(e,o,r)=>{pe(l),re.select({index:o,zone:e}),n(r)},$e=(e,n,o)=>{re.insertComponent(e,n,o),pe(l),re.select({index:o,zone:e})},Ue=(n,o,r)=>/* @__PURE__ */$(e,{choices:r,onPick:e=>$e(n,e,o)}),qe=(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=Be(e.type),s=t?.choices??null,i="footer"===t?.source?Ye:Te;/* @__PURE__ */
2
- return Q(U,{children:[o.map(({child:e,zone:o,index:r})=>{const t=se?.props.id===e.props.id,s=R(ie,e.type,n),c=i(e),p=String(e.props.id),m=()=>Qe(o,r,p),{rowProps:d,...a}=Ke.row({item:{id:p,zone:o,index:r},place:{...Z(o),index:r}},{onClick:q(m)});/* @__PURE__ */
3
- return Q(K,{children:[0===r&&Xe(o,0),
4
- /* @__PURE__ */$(v,{words:me,icon:/* @__PURE__ */$(ge,{type:e.type,size:13}),name:c,selected:t,onSelect:m,...a,actions:/* @__PURE__ */$(V,{kind:"delete",label:le.deleteNamed({name:c}),onClick:()=>{return e=o,n=r,re.removeComponent(e,n),pe(l),void re.select(null);var e,n},children:/* @__PURE__ */$(Y,{size:13})}),rowProps:d}),s&&/* @__PURE__ */$(O,{children:qe(e,n+1)}),Xe(o,r+1)]},String(e.props.id??`${o}-${r}`))}),t&&s?Ue(`${e.props.id}:${t.slot}`,o.length,s):null]})},_e="HeroSingle"===Se?.type,en=Boolean(Se)&&(Boolean(Be(Se.type))||Fe(Se.type).length>0),nn=Boolean(Se)&&(Boolean(We)||Ce||Ne||_e||en);/* @__PURE__ */
5
- return Q("div",{ref:Me,className:"sf-editor es-editor",style:W(s),children:[
6
- /* @__PURE__ */$("div",{className:"sf-section-bar",children:/* @__PURE__ */$(L,null!==oe?{tone:"off",label:oe,role:"status"}:{...z(ee,de),role:"status"})}),
7
- /* @__PURE__ */Q("div",{className:"sf-body",children:[Pe&&xe?/* @__PURE__ */$("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:/* @__PURE__ */$(p,{panel:xe,pick:Pe})}):nn&&Se&&/* @__PURE__ */Q("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
8
- /* @__PURE__ */$("div",{className:"sf-panel-head",children:/* @__PURE__ */$(X,{content:Ne?le.headerSettings:le.sectionSettings({name:ze(Se.type)}),side:"bottom",children:/* @__PURE__ */$("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(Le?"is-selected":""),"aria-pressed":Le,onClick:()=>{Ne?pe(ke??l):(pe(l),re.select({index:0}))},children:ze(Se.type)})})}),
9
- /* @__PURE__ */$(H,{className:"sf-tree sf-scroll",rootProps:Ke.rootProps(),words:me,children:/* @__PURE__ */$(O,{children:Ne?
10
- /* @__PURE__ */$(v,{words:me,icon:/* @__PURE__ */$(ge,{type:"header",size:13}),name:le.headerSettings,selected:ce.kind===ke?.kind,onSelect:()=>pe(ke??l),rowProps:{onClick:q(()=>pe(ke??l))}}):We?/* @__PURE__ */Q(U,{children:[De.map((e,n)=>{const o=se?.props.id===e.props.id,r=Te(e),t=String(e.props.id),s=()=>Ze(n,t),{rowProps:i,...c}=Ke.row({item:{id:t,zone:be,index:n},place:{...Z(be),index:n}},{onClick:q(s)});/* @__PURE__ */
11
- return Q(K,{children:[0===n&&Xe(be,0),
12
- /* @__PURE__ */$(v,{words:me,icon:/* @__PURE__ */$(ge,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */$(V,{kind:"delete",label:le.deleteNamed({name:r}),onClick:()=>{return e=n,void(be&&(re.removeComponent(be,e),pe(l),re.select(null)));var e},children:/* @__PURE__ */$(Y,{size:13})}),rowProps:i}),Xe(be,n+1)]},String(e.props.id??n))}),
13
- /* @__PURE__ */Q("button",{type:"button",className:"sf-add-card",onClick:Je,children:[
14
- /* @__PURE__ */$("span",{className:"sf-plus sf-plus--sm",children:"+"}),We.addLabel]}),ye?He.partRows?.(Se,_):null]}):qe(Se,1)})})]}),
15
- /* @__PURE__ */$("div",{className:"sf-center",children:/* @__PURE__ */$("div",{className:"sf-preview-host",children:/* @__PURE__ */$(fe,{})})}),
16
- /* @__PURE__ */$(t,{value:{selectChild:(e,n,o,r)=>"section"===Be(r)?.source?Ze(n,o):Qe(e,n,o),addChild:(e,n,o,r,t)=>"section"===Be(t)?.source?Je():$e(`${e}:${n}`,o,r),childRowName:Te,blockRowName:Ye},children:/* @__PURE__ */$(je,{mode:ce,onOpenWebsiteSettings:He.openSettings??(()=>{}),onSelectNode:Oe,hideNodeActions:!0})})]})]})}export{ee as default};
1
+ import{AddBlockRow as e}from"../../chunk-OK7OH2ZN.js";import{scrollPreviewToSection as n,gotoPreviewSlide as o}from"../../chunk-3Z2MVLCD.js";import{useEaselUndoKeys as r}from"../../chunk-HM7S7H5H.js";import{SlotChildActionsProvider as t}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as s}from"../../chunk-TZIIRGVY.js";import{usePartBridge as i}from"../../chunk-GGC72GS4.js";import{useSectionOps as c}from"../../chunk-N2BVA6TS.js";import"../../chunk-HQ4VVRIC.js";import{MediaSidePanel as p}from"../../chunk-63ZDVAVE.js";import{SELECTION_MODE as l,useScreenPinned as m,useScreenCanvasFrame as d,useScreenInspectorPanel as a,useScreenPickFollowsSelection as u,sameInspectorMode as h,useStandaloneScreenBridges as k,useScreenBlockLook as f,useScreenBlockRules as j}from"../../chunk-PQRYAW2G.js";import{useScreenDocument as S}from"../../chunk-ZZ64CEC2.js";import"../../chunk-ERR437B5.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import{useMediaPanel as y,usePanelPick as N,useCancelPanelPick as C}from"../../chunk-R6WTQWAC.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import{useHostEscape as A}from"../../chunk-U3JP4VGF.js";import{DEFAULT_SCREEN_WORDS as M}from"../../chunk-VVPZMWJE.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-IQ5TA7AM.js";import{slotChildRowName as P}from"../../chunk-TBF5CVPA.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-IYT6NN2J.js";import{slotFieldsOf as R,nestsInTree as x}from"../../chunk-PLVEGYK6.js";import{useEasel as V}from"../../chunk-SMM3ST7A.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-N3LYD2LK.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-XWFH2NHZ.js";import{LayersTree as v,Subtree as H,TreeRow as g,TreeRowAction as B,TreeSeam as E}from"../../chunk-4JSBIW5H.js";import{DEFAULT_TREE_WORDS as O}from"../../chunk-K56YDHYQ.js";import"../../chunk-BALFHI3G.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-NDRZP6YR.js";import{DEFAULT_SAVE_WORDS as w,saveIndicator as z}from"../../chunk-H6DDIBQ4.js";import{SaveState as D,panelWidthVars as L}from"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-23VM4PMV.js";import"../../chunk-B4JN227A.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import{useWords as b}from"../../chunk-MFIRYGHW.js";import"../../chunk-POSLNRTO.js";import"../../chunk-KAML3KQH.js";import{useTreeDrag as T}from"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import{zoneKey as W,parseZoneKey as Z}from"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import{useState as F,useRef as G,useEffect as K,useCallback as Y,Fragment as J}from"react";import{Tooltip as I}from"efficient-shell/ui";import{TrashIcon as X}from"efficient-shell/icons/efficient";import{jsxs as $,jsx as Q,Fragment as U}from"react/jsx-runtime";var q=e=>n=>{n.target.closest("button, input")||e()},_={rowClick:q};function ee(){const{saveState:ee,readOnly:ne,readOnlyReason:oe=null}=S(),re=c(),{appState:te,selectedItem:se,config:ie}=V(e=>e),[ce,pe]=F(l),le=b("screen",M),me=b("tree",O),de=b("save",w),{first:ae,last:ue,panelOf:he}=m(),ke=he(ae),fe=d(),je=a(),Se=te.data.content?.[0]??null,ye=Se?.props.id??null,Ne=Se?.type===ae,Ce=Se?.type===ue,Ae=G(null),Me=G(null);r(Me);const Pe=y(),Re=N(),xe=C();u(se?.props.id),K(()=>{const e=Me.current;if(!Re||!e)return;const n=e=>{"Escape"===e.key&&xe()};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[Re]),A(null!==Re,()=>xe()),K(()=>{ye&&Ae.current!==ye&&(Ae.current=ye,Ne?pe(ke??l):se||re.select({index:0}))},[ye,se,re,Ne]);const Ve=Y(e=>pe(n=>h(n,e)?n:e),[]),ve=k({kind:ce.kind,mode:ce,open:Ve,show:e=>pe(e),reveal:()=>{},select:(e,n)=>{pe(e=>h(e,n)?e:n),re.select(e)}}),{selectNode:He}=i({mode:ce,setMode:pe,onOpenPart:n}),ge=f(),{labelAtLevel:Be,Icon:Ee}=ge,{canAddTo:Oe}=j(),we=e=>Be(e,"block",ie.components[e]?.label??e),ze=e=>Be(e,"section",we(e)),De=!Ne&&"puck"===ce.kind&&se?.props.id===ye,Le=Se?Oe(Se.type)?.spec??null:null,be=Se&&Le?`${Se.props.id}:${Le.slot}`:null,Te=Se&&Le&&Array.isArray(Se.props[Le.slot])?Se.props[Le.slot]:[],We=e=>P(e,we,ge.plainText),Ze=(e,r)=>{Se&&Le&&be&&(pe(l),Le.slider?(o(String(Se.props.id),e),re.select({index:e,zone:be}),n(String(Se.props.id))):(re.select({index:e,zone:be}),n(r)))},Fe=()=>{if(!Se||!Le||!be)return;const e=Te.length;re.insertComponent(be,Le.childType,e),pe(l),Le.slider?requestAnimationFrame(()=>{o(String(Se.props.id),e),re.select({index:e,zone:be})}):re.select({index:e,zone:be})},Ge=e=>R(ie,e),Ke=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 Ge(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(Se)?.props[o];return Array.isArray(t)?t.length:0},Ye=(e,n,o)=>{const r=Math.min(Math.max(o,0),Ke(e)),t=n<r?r-1:r;t!==n&&(re.reorderComponent(e,n,t),pe(l),re.select({index:t,zone:e}))},Je=T({keyOf:e=>e.id,readOnly:Boolean(ne),canDrop:(e,n)=>W(n)===e.zone&&n.index>=0&&n.index<=Ke(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)}),Ie=(e,n)=>/* @__PURE__ */Q(E,{...ne?{}:Je.seam({place:{...Z(e),index:n}})},`seam:${e}:${n}`),Xe=e=>ge.blockRowName(e,we),$e=(e,o,r)=>{pe(l),re.select({index:o,zone:e}),n(r)},Qe=(e,n,o)=>{re.insertComponent(e,n,o),pe(l),re.select({index:o,zone:e})},Ue=(n,o,r)=>/* @__PURE__ */Q(e,{choices:r,onPick:e=>Qe(n,e,o)}),qe=(e,n)=>{const o=Ge((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?Xe:We;/* @__PURE__ */
2
+ return $(U,{children:[o.map(({child:e,zone:o,index:r})=>{const t=se?.props.id===e.props.id,s=x(ie,e.type,n),c=i(e),p=String(e.props.id),m=()=>$e(o,r,p),{rowProps:d,...a}=Je.row({item:{id:p,zone:o,index:r},place:{...Z(o),index:r}},{onClick:q(m)});/* @__PURE__ */
3
+ return $(J,{children:[0===r&&Ie(o,0),
4
+ /* @__PURE__ */Q(g,{words:me,icon:/* @__PURE__ */Q(Ee,{type:e.type,size:13}),name:c,selected:t,onSelect:m,...a,actions:/* @__PURE__ */Q(B,{kind:"delete",label:le.deleteNamed({name:c}),onClick:()=>{return e=o,n=r,re.removeComponent(e,n),pe(l),void re.select(null);var e,n},children:/* @__PURE__ */Q(X,{size:13})}),rowProps:d}),s&&/* @__PURE__ */Q(H,{children:qe(e,n+1)}),Ie(o,r+1)]},String(e.props.id??`${o}-${r}`))}),t&&s?Ue(`${e.props.id}:${t.slot}`,o.length,s):null]})},_e="HeroSingle"===Se?.type,en=Boolean(Se)&&(Boolean(Oe(Se.type))||Ge(Se.type).length>0),nn=Boolean(Se)&&(Boolean(Le)||Ce||Ne||_e||en);/* @__PURE__ */
5
+ return $("div",{ref:Me,className:"sf-editor es-editor",style:L(s),children:[
6
+ /* @__PURE__ */Q("div",{className:"sf-section-bar",children:/* @__PURE__ */Q(D,null!==oe?{tone:"off",label:oe,role:"status"}:{...z(ee,de),role:"status"})}),
7
+ /* @__PURE__ */$("div",{className:"sf-body",children:[Re&&Pe?/* @__PURE__ */Q("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:/* @__PURE__ */Q(p,{panel:Pe,pick:Re})}):nn&&Se&&/* @__PURE__ */$("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
8
+ /* @__PURE__ */Q("div",{className:"sf-panel-head",children:/* @__PURE__ */Q(I,{content:Ne?le.headerSettings:le.sectionSettings({name:ze(Se.type)}),side:"bottom",children:/* @__PURE__ */Q("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(De?"is-selected":""),"aria-pressed":De,onClick:()=>{Ne?pe(ke??l):(pe(l),re.select({index:0}))},children:ze(Se.type)})})}),
9
+ /* @__PURE__ */Q(v,{className:"sf-tree sf-scroll",rootProps:Je.rootProps(),words:me,children:/* @__PURE__ */Q(H,{children:Ne?
10
+ /* @__PURE__ */Q(g,{words:me,icon:/* @__PURE__ */Q(Ee,{type:"header",size:13}),name:le.headerSettings,selected:ce.kind===ke?.kind,onSelect:()=>pe(ke??l),rowProps:{onClick:q(()=>pe(ke??l))}}):Le?/* @__PURE__ */$(U,{children:[Te.map((e,n)=>{const o=se?.props.id===e.props.id,r=We(e),t=String(e.props.id),s=()=>Ze(n,t),{rowProps:i,...c}=Je.row({item:{id:t,zone:be,index:n},place:{...Z(be),index:n}},{onClick:q(s)});/* @__PURE__ */
11
+ return $(J,{children:[0===n&&Ie(be,0),
12
+ /* @__PURE__ */Q(g,{words:me,icon:/* @__PURE__ */Q(Ee,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */Q(B,{kind:"delete",label:le.deleteNamed({name:r}),onClick:()=>{return e=n,void(be&&(re.removeComponent(be,e),pe(l),re.select(null)));var e},children:/* @__PURE__ */Q(X,{size:13})}),rowProps:i}),Ie(be,n+1)]},String(e.props.id??n))}),
13
+ /* @__PURE__ */$("button",{type:"button",className:"sf-add-card",onClick:Fe,children:[
14
+ /* @__PURE__ */Q("span",{className:"sf-plus sf-plus--sm",children:"+"}),Le.addLabel]}),ye?ve.partRows?.(Se,_):null]}):qe(Se,1)})})]}),
15
+ /* @__PURE__ */Q("div",{className:"sf-center",children:/* @__PURE__ */Q("div",{className:"sf-preview-host",children:/* @__PURE__ */Q(fe,{})})}),
16
+ /* @__PURE__ */Q(t,{value:{selectChild:(e,n,o,r)=>"section"===Oe(r)?.source?Ze(n,o):$e(e,n,o),addChild:(e,n,o,r,t)=>"section"===Oe(t)?.source?Fe():Qe(`${e}:${n}`,o,r),childRowName:We,blockRowName:Xe},children:/* @__PURE__ */Q(je,{mode:ce,onOpenWebsiteSettings:ve.openSettings??(()=>{}),onSelectNode:He,hideNodeActions:!0})})]})]})}export{ee as default};
@@ -1 +1 @@
1
- export{usePartBridge}from"../../chunk-Z62Z75UI.js";import"../../chunk-OJ6QWOLG.js";import"../../chunk-EHBWUEEE.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-SMM3ST7A.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-SO5OLDH7.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-EA2HTX37.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-23VM4PMV.js";import"../../chunk-B4JN227A.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{usePartBridge}from"../../chunk-GGC72GS4.js";import"../../chunk-N2BVA6TS.js";import"../../chunk-PQRYAW2G.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-SMM3ST7A.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-N3LYD2LK.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-BALFHI3G.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-23VM4PMV.js";import"../../chunk-B4JN227A.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -1 +1 @@
1
- import"../chunk-GZO72N3Q.js";export{DocumentScreen,ScreenMount}from"../chunk-JASNL4KG.js";import"../chunk-GXQCZJOP.js";import"../chunk-QKZPPI5O.js";import"../chunk-XT6DOSHO.js";import"../chunk-FGNR22NY.js";import"../chunk-2GVCAIPX.js";import"../chunk-26OOWIJJ.js";import"../chunk-NBDMTIU2.js";import"../chunk-MQNBD6AB.js";import"../chunk-LER7RKTO.js";import"../chunk-7F52SZOI.js";import"../chunk-RSKHAHPJ.js";import"../chunk-RKTF5XLP.js";export{ScreenStoreProvider}from"../chunk-YQVR54RE.js";import"../chunk-3Z2MVLCD.js";import"../chunk-HM7S7H5H.js";import"../chunk-KCBEE2MC.js";import"../chunk-TZIIRGVY.js";import"../chunk-Z62Z75UI.js";import"../chunk-OJ6QWOLG.js";import"../chunk-5545A3PC.js";import"../chunk-FRXE6EQN.js";import"../chunk-PA3PNTVV.js";import"../chunk-BVN33R76.js";import"../chunk-5ZBY24K7.js";import"../chunk-62VPYC7F.js";import"../chunk-HQ4VVRIC.js";import"../chunk-GS44HQ45.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-EHBWUEEE.js";import"../chunk-VJZDNOQ7.js";import"../chunk-2H3W5OLQ.js";import"../chunk-ZZ64CEC2.js";import"../chunk-ERR437B5.js";import"../chunk-GMCZXMOV.js";export{NO_DOCUMENT_ADDRESSING}from"../chunk-RLBXE4EU.js";import"../chunk-HNKB2ZYR.js";import"../chunk-CLOS6SSX.js";import"../chunk-S4AWJX4Q.js";import"../chunk-KG7RJWOK.js";import"../chunk-VPFNZ7TB.js";import"../chunk-LOMEH6DG.js";import"../chunk-KCOBHPN6.js";import"../chunk-R6WTQWAC.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-U3JP4VGF.js";import"../chunk-UMDQ6CLQ.js";import"../chunk-V7U33NF2.js";import"../chunk-6WY6ZXJG.js";import"../chunk-BXMXTO36.js";import"../chunk-OSPUG6S6.js";import"../chunk-WK3AFPXY.js";import"../chunk-VVPZMWJE.js";import"../chunk-I54UCYOU.js";import"../chunk-GOTN2KY4.js";import"../chunk-R5L2E7JX.js";import"../chunk-BSPCSC45.js";import"../chunk-IQ5TA7AM.js";import"../chunk-TBF5CVPA.js";import"../chunk-DUVRZ456.js";import"../chunk-6W7WLPZH.js";import"../chunk-IYT6NN2J.js";import"../chunk-PLVEGYK6.js";import"../chunk-SMM3ST7A.js";import"../chunk-TBY3DFKS.js";import"../chunk-ECM5F6JJ.js";import"../chunk-SO5OLDH7.js";import"../chunk-BPXEFVSQ.js";import"../chunk-XWFH2NHZ.js";import"../chunk-4JSBIW5H.js";import"../chunk-K56YDHYQ.js";import"../chunk-EA2HTX37.js";import"../chunk-RC25EGHD.js";import"../chunk-KFV7N2DJ.js";import"../chunk-YRLPFZW3.js";import"../chunk-4VJATVVR.js";import"../chunk-NDRZP6YR.js";import"../chunk-H6DDIBQ4.js";import"../chunk-IE55HNMA.js";import"../chunk-Z6PVRXVY.js";import"../chunk-THWO5YVZ.js";import"../chunk-RE4LP46F.js";import"../chunk-MJM6SFD3.js";import"../chunk-2OAZYSWJ.js";import"../chunk-23VM4PMV.js";import"../chunk-B4JN227A.js";import"../chunk-2XMHLXMA.js";import"../chunk-G3GWAP5R.js";import"../chunk-WRFD4EXD.js";import"../chunk-36LVP5WD.js";import"../chunk-MFIRYGHW.js";import"../chunk-POSLNRTO.js";import"../chunk-KAML3KQH.js";import"../chunk-67GNT6PF.js";import"../chunk-P2VEMZH5.js";import"../chunk-X4T6JT3M.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
1
+ import"../chunk-GZO72N3Q.js";export{DocumentScreen,ScreenMount}from"../chunk-P3XVBLZ6.js";import"../chunk-GXQCZJOP.js";import"../chunk-RQBIFINA.js";import"../chunk-XT6DOSHO.js";import"../chunk-FGNR22NY.js";import"../chunk-2GVCAIPX.js";import"../chunk-26OOWIJJ.js";import"../chunk-NBDMTIU2.js";import"../chunk-MQNBD6AB.js";import"../chunk-LER7RKTO.js";import"../chunk-7F52SZOI.js";import"../chunk-RSKHAHPJ.js";import"../chunk-RKTF5XLP.js";export{ScreenStoreProvider}from"../chunk-KFPCMMRK.js";import"../chunk-3Z2MVLCD.js";import"../chunk-HM7S7H5H.js";import"../chunk-KCBEE2MC.js";import"../chunk-TZIIRGVY.js";import"../chunk-GGC72GS4.js";import"../chunk-N2BVA6TS.js";import"../chunk-5545A3PC.js";import"../chunk-N2B32EZB.js";import"../chunk-PA3PNTVV.js";import"../chunk-BVN33R76.js";import"../chunk-5ZBY24K7.js";import"../chunk-62VPYC7F.js";import"../chunk-HQ4VVRIC.js";import"../chunk-63ZDVAVE.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-PQRYAW2G.js";import"../chunk-UVQR7W6I.js";import"../chunk-2H3W5OLQ.js";import"../chunk-ZZ64CEC2.js";import"../chunk-ERR437B5.js";import"../chunk-GMCZXMOV.js";export{NO_DOCUMENT_ADDRESSING}from"../chunk-RLBXE4EU.js";import"../chunk-HNKB2ZYR.js";import"../chunk-CLOS6SSX.js";import"../chunk-S4AWJX4Q.js";import"../chunk-KG7RJWOK.js";import"../chunk-VPFNZ7TB.js";import"../chunk-LOMEH6DG.js";import"../chunk-KCOBHPN6.js";import"../chunk-R6WTQWAC.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-U3JP4VGF.js";import"../chunk-UMDQ6CLQ.js";import"../chunk-VVPZMWJE.js";import"../chunk-V7U33NF2.js";import"../chunk-6WY6ZXJG.js";import"../chunk-WXFZD7WC.js";import"../chunk-OSPUG6S6.js";import"../chunk-WK3AFPXY.js";import"../chunk-I54UCYOU.js";import"../chunk-GOTN2KY4.js";import"../chunk-R5L2E7JX.js";import"../chunk-BSPCSC45.js";import"../chunk-IQ5TA7AM.js";import"../chunk-TBF5CVPA.js";import"../chunk-DUVRZ456.js";import"../chunk-6W7WLPZH.js";import"../chunk-IYT6NN2J.js";import"../chunk-PLVEGYK6.js";import"../chunk-SMM3ST7A.js";import"../chunk-TBY3DFKS.js";import"../chunk-ECM5F6JJ.js";import"../chunk-N3LYD2LK.js";import"../chunk-BPXEFVSQ.js";import"../chunk-XWFH2NHZ.js";import"../chunk-4JSBIW5H.js";import"../chunk-K56YDHYQ.js";import"../chunk-BALFHI3G.js";import"../chunk-RC25EGHD.js";import"../chunk-KFV7N2DJ.js";import"../chunk-YRLPFZW3.js";import"../chunk-4VJATVVR.js";import"../chunk-NDRZP6YR.js";import"../chunk-H6DDIBQ4.js";import"../chunk-IE55HNMA.js";import"../chunk-Z6PVRXVY.js";import"../chunk-THWO5YVZ.js";import"../chunk-RE4LP46F.js";import"../chunk-MJM6SFD3.js";import"../chunk-2OAZYSWJ.js";import"../chunk-23VM4PMV.js";import"../chunk-B4JN227A.js";import"../chunk-2XMHLXMA.js";import"../chunk-G3GWAP5R.js";import"../chunk-WRFD4EXD.js";import"../chunk-36LVP5WD.js";import"../chunk-MFIRYGHW.js";import"../chunk-POSLNRTO.js";import"../chunk-KAML3KQH.js";import"../chunk-67GNT6PF.js";import"../chunk-P2VEMZH5.js";import"../chunk-X4T6JT3M.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
@@ -1 +1 @@
1
- export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-XT6DOSHO.js";import"../../../chunk-NBDMTIU2.js";import"../../../chunk-MQNBD6AB.js";import"../../../chunk-LER7RKTO.js";import"../../../chunk-7F52SZOI.js";import"../../../chunk-V7U33NF2.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-VVPZMWJE.js";import"../../../chunk-BSPCSC45.js";import"../../../chunk-DUVRZ456.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-MFIRYGHW.js";
1
+ export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-XT6DOSHO.js";import"../../../chunk-NBDMTIU2.js";import"../../../chunk-MQNBD6AB.js";import"../../../chunk-LER7RKTO.js";import"../../../chunk-7F52SZOI.js";import"../../../chunk-VVPZMWJE.js";import"../../../chunk-V7U33NF2.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-BSPCSC45.js";import"../../../chunk-DUVRZ456.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-MFIRYGHW.js";
@@ -1 +1 @@
1
- export{useSectionOps}from"../../../chunk-OJ6QWOLG.js";import"../../../chunk-EHBWUEEE.js";import"../../../chunk-R6WTQWAC.js";import"../../../chunk-U3JP4VGF.js";import"../../../chunk-PLVEGYK6.js";import"../../../chunk-SMM3ST7A.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-ECM5F6JJ.js";import"../../../chunk-SO5OLDH7.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-XWFH2NHZ.js";import"../../../chunk-4JSBIW5H.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-EA2HTX37.js";import"../../../chunk-RC25EGHD.js";import"../../../chunk-KFV7N2DJ.js";import"../../../chunk-YRLPFZW3.js";import"../../../chunk-23VM4PMV.js";import"../../../chunk-B4JN227A.js";import"../../../chunk-2XMHLXMA.js";import"../../../chunk-G3GWAP5R.js";import"../../../chunk-WRFD4EXD.js";import"../../../chunk-36LVP5WD.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-67GNT6PF.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-X4T6JT3M.js";import"../../../chunk-KRXQM65X.js";import"../../../chunk-NKB3KVAB.js";
1
+ export{useSectionOps}from"../../../chunk-N2BVA6TS.js";import"../../../chunk-PQRYAW2G.js";import"../../../chunk-R6WTQWAC.js";import"../../../chunk-U3JP4VGF.js";import"../../../chunk-PLVEGYK6.js";import"../../../chunk-SMM3ST7A.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-ECM5F6JJ.js";import"../../../chunk-N3LYD2LK.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-XWFH2NHZ.js";import"../../../chunk-4JSBIW5H.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-BALFHI3G.js";import"../../../chunk-RC25EGHD.js";import"../../../chunk-KFV7N2DJ.js";import"../../../chunk-YRLPFZW3.js";import"../../../chunk-23VM4PMV.js";import"../../../chunk-B4JN227A.js";import"../../../chunk-2XMHLXMA.js";import"../../../chunk-G3GWAP5R.js";import"../../../chunk-WRFD4EXD.js";import"../../../chunk-36LVP5WD.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-67GNT6PF.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-X4T6JT3M.js";import"../../../chunk-KRXQM65X.js";import"../../../chunk-NKB3KVAB.js";
@@ -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-EHBWUEEE.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-SMM3ST7A.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-SO5OLDH7.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-EA2HTX37.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-23VM4PMV.js";import"../../chunk-B4JN227A.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.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-PQRYAW2G.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-SMM3ST7A.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-N3LYD2LK.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-BALFHI3G.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-23VM4PMV.js";import"../../chunk-B4JN227A.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -1 +1 @@
1
- export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-5EPK5WB3.js";import"../chunk-OGH6CC3E.js";import"../chunk-OFBZOI6W.js";import"../chunk-6WY6ZXJG.js";import"../chunk-WK3AFPXY.js";import"../chunk-VVPZMWJE.js";import"../chunk-TBY3DFKS.js";import"../chunk-K56YDHYQ.js";import"../chunk-KFV7N2DJ.js";import"../chunk-H6DDIBQ4.js";import"../chunk-Z6PVRXVY.js";import"../chunk-RE4LP46F.js";import"../chunk-2OAZYSWJ.js";import"../chunk-B4JN227A.js";import"../chunk-WRFD4EXD.js";import"../chunk-KAML3KQH.js";
1
+ export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-JD5HXBEX.js";import"../chunk-OGH6CC3E.js";import"../chunk-OFBZOI6W.js";import"../chunk-VVPZMWJE.js";import"../chunk-6WY6ZXJG.js";import"../chunk-WK3AFPXY.js";import"../chunk-TBY3DFKS.js";import"../chunk-K56YDHYQ.js";import"../chunk-KFV7N2DJ.js";import"../chunk-H6DDIBQ4.js";import"../chunk-Z6PVRXVY.js";import"../chunk-RE4LP46F.js";import"../chunk-2OAZYSWJ.js";import"../chunk-B4JN227A.js";import"../chunk-WRFD4EXD.js";import"../chunk-KAML3KQH.js";
@@ -1,2 +1,2 @@
1
- import{DEFAULT_EASEL_STRINGS as r,mergeEaselStrings as n}from"../chunk-5EPK5WB3.js";export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-5EPK5WB3.js";import"../chunk-OGH6CC3E.js";import"../chunk-OFBZOI6W.js";import"../chunk-6WY6ZXJG.js";import"../chunk-WK3AFPXY.js";import"../chunk-VVPZMWJE.js";import"../chunk-TBY3DFKS.js";import"../chunk-K56YDHYQ.js";import"../chunk-KFV7N2DJ.js";import"../chunk-H6DDIBQ4.js";import"../chunk-Z6PVRXVY.js";import"../chunk-RE4LP46F.js";import"../chunk-2OAZYSWJ.js";import"../chunk-B4JN227A.js";import"../chunk-WRFD4EXD.js";import{stringsContext as o}from"../chunk-MFIRYGHW.js";import"../chunk-KAML3KQH.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-JD5HXBEX.js";export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-JD5HXBEX.js";import"../chunk-OGH6CC3E.js";import"../chunk-OFBZOI6W.js";import"../chunk-VVPZMWJE.js";import"../chunk-6WY6ZXJG.js";import"../chunk-WK3AFPXY.js";import"../chunk-TBY3DFKS.js";import"../chunk-K56YDHYQ.js";import"../chunk-KFV7N2DJ.js";import"../chunk-H6DDIBQ4.js";import"../chunk-Z6PVRXVY.js";import"../chunk-RE4LP46F.js";import"../chunk-2OAZYSWJ.js";import"../chunk-B4JN227A.js";import"../chunk-WRFD4EXD.js";import{stringsContext as o}from"../chunk-MFIRYGHW.js";import"../chunk-KAML3KQH.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": "15.0.0",
3
+ "version": "16.0.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",
@@ -654,7 +654,7 @@
654
654
  "dist"
655
655
  ],
656
656
  "peerDependencies": {
657
- "efficient-shell": "^8.9.0",
657
+ "efficient-shell": "^8.18.0",
658
658
  "react": ">=18",
659
659
  "react-dom": ">=18"
660
660
  },
@@ -664,7 +664,7 @@
664
664
  "@types/node": "^22.0.0",
665
665
  "@types/react": "^18.2.0",
666
666
  "@types/react-dom": "^18.2.0",
667
- "efficient-shell": "^8.9.0",
667
+ "efficient-shell": "^8.18.0",
668
668
  "esbuild": "^0.27.0",
669
669
  "jsdom": "^26.1.0",
670
670
  "react": "^18.2.0",
@@ -1 +0,0 @@
1
- import{EaselMenuItems as o,menuLabel as e}from"./chunk-EA2HTX37.js";import{ContextMenu as r}from"efficient-shell/ui";import{jsx as n}from"react/jsx-runtime";function l({x:l,y:t,items:i,onClose:m,owner:s,portalTo:u}){return 0===i.length?null:/* @__PURE__ */n(r,{at:{x:l,y:t},owner:s??u??null,onClose:m,"aria-label":e(i),children:/* @__PURE__ */n(o,{items:i,onClose:m})})}export{l as EaselContextMenu};
@@ -1,5 +0,0 @@
1
- import{PopupMenuDivider as e,PopupMenuLabel as n,PopupSubmenu as l,PopupMenuItem as r}from"efficient-shell/ui";import{jsx as i,Fragment as c,jsxs as a}from"react/jsx-runtime";function t({items:a,onClose:t}){/* @__PURE__ */
2
- return i(c,{children:a.map((c,a)=>{if("—"===c.label)/* @__PURE__ */return i(e,{},a);if(c.header)/* @__PURE__ */return i(n,{children:c.label},a);if(c.children?.length){const e=c.children.some(e=>void 0!==e.checked);/* @__PURE__ */
3
- return i(l,{label:c.label,icon:u(c),children:c.children.map((n,l)=>/* @__PURE__ */i(r,{danger:n.danger,onClick:n.onClick,...e?{role:"menuitemradio",checked:Boolean(n.checked)}:{},children:d(n)},l))},a)}/* @__PURE__ */
4
- return i(r,{danger:c.danger,onClick:()=>{c.onClick(),t()},children:d(c)},a)})})}function o(e){return e.find(e=>e.header)?.label}function u(e){return null==e.icon?null:/* @__PURE__ */i("span",{className:"es-menu-icon","aria-hidden":"true",children:e.icon})}function d(e){return null==e.icon&&null==e.shortcut?e.label:/* @__PURE__ */a(c,{children:[u(e),
5
- /* @__PURE__ */i("span",{className:"es-menu-label",children:e.label}),null==e.shortcut?null:/* @__PURE__ */i("span",{className:"es-menu-shortcut","aria-hidden":"true",children:e.shortcut})]})}export{t as EaselMenuItems,o as menuLabel};
@@ -1,5 +0,0 @@
1
- import{buildPaletteSections as e,pinnedSection as t,categoryLabel as o}from"./chunk-PA3PNTVV.js";import{sectionTemplatesOf as n}from"./chunk-BVN33R76.js";import{blockTypesIn as s}from"./chunk-5ZBY24K7.js";import{SidePanelHead as i,PanelModeExit as r}from"./chunk-62VPYC7F.js";import{blockRuns as l}from"./chunk-HQ4VVRIC.js";import{useScreenBlockLook as c,useScreenBlockRules as a}from"./chunk-EHBWUEEE.js";import{useEaselSession as p}from"./chunk-O7Q4DDJT.js";import{DEFAULT_SCREEN_WORDS as m}from"./chunk-VVPZMWJE.js";import{useEasel as d}from"./chunk-SMM3ST7A.js";import{useWords as f}from"./chunk-MFIRYGHW.js";import{AddPanel as y}from"./chunk-POSLNRTO.js";import{DEFAULT_DRAG_WORDS as h}from"./chunk-KAML3KQH.js";import{useState as u,useEffect as k,useMemo as b}from"react";import{AddIcon as g}from"efficient-shell/icons/efficient";import{jsx as j,jsxs as v,Fragment as E}from"react/jsx-runtime";var O=e=>`section:${e}`,V=e=>`block:${e}`,T=e=>`template:${e}`;function $({at:$,placeBlocks:w,canTake:A,onPick:B,itemFor:H,session:L,siteWide:M,onClose:P,onHide:x,readOnly:I}){const N=d(e=>e.config),R=c(),{labelAtLevel:S,categoryLabel:W,firstSection:C,Icon:F,Thumbnail:D}=R,{blockIsOffered:K,canAddTo:Q}=a(),Y=f("screen",m).add,z=f("drag",h).add,J=p(),[Z,G]=u([]);k(()=>{let e=!1;const t=e=>K(e,J);return n(J).list().then(o=>{if(e)return;const n=N.components;G(o.filter(e=>e.node?.type&&n[e.node.type]&&s(e.node).every(t)))}).catch(()=>{}),()=>{e=!0}},[N,J]);const U=b(()=>e(N,R),[N]),q=e=>({type:O(e.type),label:e.name,cover:/* @__PURE__ */j(D,{type:e.type}),title:e.desc?`${e.name} — ${e.desc}`:Y.tile({name:e.name}),keywords:[e.alias??"",e.desc,e.type,e.catLabel].filter(Boolean)}),X=e=>{const t=e.indexOf(":"),o=e.slice(0,t),n=e.slice(t+1);if("section"===o)return{kind:"section",type:n};if("block"===o)return{kind:"block",type:n};if("template"===o){const e=Z.find(e=>e.id===n);return e?{kind:"template",template:e}:null}return null},_=e=>/* @__PURE__ */j("span",{className:"es-add-glyph-cover",children:/* @__PURE__ */j(F,{type:e,size:26})}),ee=b(()=>{const e=t(U,C),n=/* @__PURE__ */new Map,s=e=>{!n.has(e.type)&&K(e.type,J)&&n.set(e.type,e)};for(const t of e?[e]:U){const e=Q(t.type)?.choices??[];e.forEach(s),e.forEach(e=>Q(e.type,1)?.choices?.forEach(s))}w?.forEach(s);const i=new Set(U.map(e=>e.type)),r=[...n.values()].filter(e=>!i.has(e.type)),c=e=>({type:V(e.type),label:e.label,cover:_(e.type),title:Y.tile({name:e.label}),keywords:[e.group??"",e.type].filter(Boolean)}),a=e=>n.has(e.type)?{...q(e),cover:_(e.type)}:q(e),p=[];Z.length>0&&p.push({key:"templates",title:Y.templates,tiles:Z.map(e=>{return{type:T(e.id),label:e.name,cover:/* @__PURE__ */j(D,{type:e.node.type}),keywords:[(t=e.node.type,S(t,"section",N.components[t]?.label??t)),e.node.type]};var t})});const m=r.filter(e=>!e.group);let d=!1;for(const t of Object.keys(N.categories??{})){const n=U.filter(e=>e.cat===t);if(0===n.length)continue;const s=e&&n.some(t=>t.type===e.type)?e:null,i=(s?[s,...n.filter(e=>e.type!==s.type)]:n).map(a);s&&!d&&(i.splice(1,0,...m.map(c)),d=!0),p.push({key:`category:${t}`,title:o(N,t,W),tiles:i})}const f=p.find(e=>e.key?.startsWith("category:"));if(!d&&f&&m.length>0&&(f.tiles=[...f.tiles,...m.map(c)],d=!0),l(r.filter(e=>e.group||!d)).forEach((e,t)=>{p.push({key:`blocks:${t}`,title:e.group??"",tiles:e.items.map(c)})}),!A)return p;const y=p.map(e=>({...e,tiles:e.tiles.map(e=>{const t=X(e.type),o=t?A(t):null;return o?{...e,disabled:!0,disabledReason:o}:e})})),h=e=>e.tiles.some(e=>!e.disabled);return[...y.filter(h),...y.filter(e=>!h(e))]},[Z,U,N,Y,A,w,J]);/* @__PURE__ */
2
- return v(E,{children:[
3
- /* @__PURE__ */j(i,{icon:/* @__PURE__ */j(g,{size:15}),title:Y.title,context:Y.contextAll,actions:/* @__PURE__ */j(r,{label:Y.done,description:Y.doneDescription,onClick:P}),onHide:x}),
4
- /* @__PURE__ */v("div",{className:"sf-addside sf-scroll",children:[
5
- /* @__PURE__ */j(y,{groups:ee,session:L,itemFor:e=>H(X(e)??{kind:"section",type:e}),onInsert:B?e=>{const t=X(e);t&&B(t)}:void 0,at:$,hint:Y.hint,searchLabel:Y.search,readOnly:I,words:z}),M??null]})]})}export{$ as AddSidePanel,V as blockKey,O as sectionKey,T as templateKey};
@@ -1,57 +0,0 @@
1
- import{styleClipboardOf as e}from"./chunk-XT6DOSHO.js";import{markedTreeNodeId as n,revealSelectedTreeRow as t,sameSelector as o}from"./chunk-FGNR22NY.js";import{cloneNodeWithFreshIds as r}from"./chunk-2GVCAIPX.js";import{dedupeSlotChildren as i}from"./chunk-26OOWIJJ.js";import{ScreenSaveIcon as l,ScreenMainButton as s}from"./chunk-RSKHAHPJ.js";import{useBrowserOffline as d}from"./chunk-RKTF5XLP.js";import{scrollPreviewToSection as c,gotoPreviewSlide as a,scrollPreviewToTop as p}from"./chunk-3Z2MVLCD.js";import{useEaselKeyTarget as u,useEaselUndoKeys as f,useEaselSaveKey as h,editorRootFocus as m}from"./chunk-HM7S7H5H.js";import{SlotChildActionsProvider as g}from"./chunk-KCBEE2MC.js";import{screenStorageKeys as y,DEFAULT_PANEL_W as S,clampPanelWidth as k}from"./chunk-TZIIRGVY.js";import{usePartBridge as v}from"./chunk-Z62Z75UI.js";import{useSectionOps as b}from"./chunk-OJ6QWOLG.js";import{AddChildRow as w}from"./chunk-5545A3PC.js";import{AddSidePanel as x}from"./chunk-FRXE6EQN.js";import{SidePanelHead as z,PanelShowStrip as C}from"./chunk-62VPYC7F.js";import{MediaSidePanel as O}from"./chunk-GS44HQ45.js";import{useScreenSaveSwitch as B,useScreenNodeKeys as I,useScreenPinned as N,useScreenDocumentLabel as P,useScreenCanvasFrame as $,useScreenInspectorPanel as M,useScreenDevices as T,useScreenPickFollowsSelection as j,useScreenLeftView as A,SELECTION_MODE as L,sameInspectorMode as E,useScreenBridges as R,useScreenBlockRules as V,useScreenBlockLook as H,useScreenStorageNamespace as F,useScreenNotify as W,useScreenCanvasHead as D,isSlotMode as J,useScreenStyleClipboard as U,useScreenDocumentPass as G,useScreenCanvasDrag as Y,ScreenCanvasTargetProvider as Z,isPinnedFirst as K,isPinnedLast as X,screenSlotsOf as Q}from"./chunk-EHBWUEEE.js";import{useNodeClipboard as q,useNodeContextMenu as _}from"./chunk-VJZDNOQ7.js";import{PageEditGuardNotices as ee}from"./chunk-2H3W5OLQ.js";import{useScreenDocument as ne}from"./chunk-ZZ64CEC2.js";import{requestMediaPick as te}from"./chunk-KG7RJWOK.js";import{useMediaPanel as oe,usePanelPick as re,useCancelPanelPick as ie}from"./chunk-R6WTQWAC.js";import{useEaselSession as le}from"./chunk-O7Q4DDJT.js";import{useEaselHost as se,useHostEscape as de}from"./chunk-U3JP4VGF.js";import{heldStyle as ce,styleShortcut as ae}from"./chunk-V7U33NF2.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as pe}from"./chunk-6WY6ZXJG.js";import{DEFAULT_NODE_MENU_WORDS as ue}from"./chunk-WK3AFPXY.js";import{DEFAULT_SCREEN_WORDS as fe}from"./chunk-VVPZMWJE.js";import{rootRowName as he,slotChildRowName as me,slotChildRenameProp as ge,sectionRenameProp as ye}from"./chunk-TBF5CVPA.js";import{ROOT_ZONE as Se,blockNodeActions as ke,TREE_MAX_DEPTH as ve,childSlotsOf as be,slotFieldsOf as we,slotChildrenIn as xe,nestsInTree as ze,newNodeId as Ce}from"./chunk-PLVEGYK6.js";import{useEasel as Oe,useEaselApi as Be,CanvasPassThroughContext as Ie}from"./chunk-SMM3ST7A.js";import{toItemSelector as Ne,useNodeOps as Pe,clickPick as $e}from"./chunk-ECM5F6JJ.js";import{TreeRow as Me,Subtree as Te,LayersTree as je,TreeGroupLabel as Ae,TreeRowAction as Le,TreeSeam as Ee}from"./chunk-4JSBIW5H.js";import{DEFAULT_TREE_WORDS as Re}from"./chunk-K56YDHYQ.js";import{LayersIcon as Ve,MediaIcon as He}from"./chunk-4VJATVVR.js";import{EaselTopBar as Fe,TopBarRail as We,TopBarCluster as De,EaselIconButton as Je,TopBarDivider as Ue,DeviceSwitch as Ge,InspectorIconButton as Ye,PanelResizeHandle as Ze,MAX_PANEL_W as Ke,MIN_PANEL_W as Xe,panelWidthVars as Qe}from"./chunk-IE55HNMA.js";import{DEFAULT_NOTICE_WORDS as qe,DEFAULT_CHROME_WORDS as _e}from"./chunk-Z6PVRXVY.js";import{holderOf as en,nameOrSomeone as nn}from"./chunk-THWO5YVZ.js";import{DEFAULT_LOCK_WORDS as tn}from"./chunk-RE4LP46F.js";import{useWords as on}from"./chunk-MFIRYGHW.js";import{insertSeams as rn,CanvasDragLayer as ln,CanvasInsert as sn}from"./chunk-POSLNRTO.js";import{DEFAULT_DRAG_WORDS as dn}from"./chunk-KAML3KQH.js";import{createDragSession as cn,useTreeDrag as an,gapToMoveIndex as pn}from"./chunk-67GNT6PF.js";import{useCanvasFrame as un,LIST_SELECTOR as fn,BLOCK_SELECTOR as hn,useCanvasTyping as mn,useCanvasEvent as gn,nodeIdAt as yn,frameRectToHost as Sn,BLOCK_ATTRIBUTE as kn,drawnBox as vn}from"./chunk-X4T6JT3M.js";import{ROOT_ID as bn,ROOT_SLOT as wn,zoneKey as xn,parseZoneKey as zn,find as Cn,DataError as On}from"./chunk-KRXQM65X.js";import{useRef as Bn,useMemo as In,useState as Nn,useEffect as Pn,useCallback as $n,useLayoutEffect as Mn,Fragment as Tn}from"react";import{ColoredBadge as jn,toast as An,groupColors as Ln}from"efficient-shell/ui";import{UndoIcon as En,RedoIcon as Rn,RefreshIcon as Vn,AddIcon as Hn,TrashIcon as Fn,EyeOffIcon as Wn,EyeIcon as Dn,DuplicateIcon as Jn}from"efficient-shell/icons/efficient";import{jsx as Un,jsxs as Gn,Fragment as Yn}from"react/jsx-runtime";var Zn=/* @__PURE__ */new WeakSet;function Kn(e,n,t){const o=Cn(e,n,t);if(!o)return null;const r=o.path.find(e=>"root"!==e.parentId);return r?r.parentId:t}function Xn({canvas:e,tabs:n,onSelect:t}){const o=Bn(null),[r,i]=Nn({}),l=n.map(e=>`${e.id}:${e.below?1:0}`).join("|");return Mn(()=>{const t=e?.document,r=e?.window,l=e?.frame;if(!t||!r||!l||0===n.length)return void i({});let s=0;const d=()=>{s=0;const e=o.current;if(!e)return;const d=Sn(l,{left:0,top:0,width:r.innerWidth,height:r.innerHeight},e),c={};for(const o of n){const n=t.querySelector(`[${kn}="${r.CSS?.escape?r.CSS.escape(o.id):o.id}"]`),i=n?vn(n):null;if(!i||0===i.height){c[o.id]=null;continue}const s=Sn(l,{left:i.left,top:i.top,width:i.width,height:i.height},e),a=s.top+s.height;if(a<d.top||s.top>d.top+d.height){c[o.id]=null;continue}const p=o.below?a+4:Math.max(s.top,d.top)+6;c[o.id]={left:Math.max(s.left,d.left)+6,top:p}}i(c)},c=()=>{s||(s=r.requestAnimationFrame(d))};d(),r.addEventListener("scroll",c,!0),r.addEventListener("resize",c);const a=new r.MutationObserver(c);return a.observe(t.body,{childList:!0,subtree:!0,attributes:!0}),()=>{s&&r.cancelAnimationFrame(s),r.removeEventListener("scroll",c,!0),r.removeEventListener("resize",c),a.disconnect()}},[e,l]),/* @__PURE__ */Un("div",{ref:o,className:"es-band-tabs","aria-hidden":"true",children:n.map(e=>{const n=r[e.id];return n?/* @__PURE__ */Un("span",{className:"es-band-tab","data-band-tab":e.id,style:{left:n.left,top:n.top},onClick:n=>{n.stopPropagation(),t(e.id)},children:/* @__PURE__ */Un(jn,{colorClass:Ln("info","solid"),size:"sm",children:e.label})},e.id):null})})}function Qn({expand:e}){/* @__PURE__ */
2
- return Un("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.9,strokeLinecap:"round",strokeLinejoin:"round",children:/* @__PURE__ */Gn(Yn,e?{children:[
3
- /* @__PURE__ */Un("path",{d:"M8 9l4-4 4 4"}),
4
- /* @__PURE__ */Un("path",{d:"M8 15l4 4 4-4"})]}:{children:[
5
- /* @__PURE__ */Un("path",{d:"M8 4l4 4 4-4"}),
6
- /* @__PURE__ */Un("path",{d:"M8 20l4-4 4 4"}),
7
- /* @__PURE__ */Un("path",{d:"M5 12h14"})]})})}var qn=`${fn}, ${hn}`;function _n(e,n,t){const o=t-n;if(o<6)return null;if(o<24)return{top:Math.round((n+t)/2),height:Math.round(o)};return{top:Math.round(Math.min(Math.max(e,n+12),t-12))}}var et="__rungs";var nt="screen:band",tt={duplicate:!0,delete:!0};function ot(){const fn=se(),{target:Sn,docId:kn,capabilities:vn,currentSlug:Ln,siteId:ot,onPublish:rt,saveState:it,saveConflict:lt,retrySave:st,toggleAutoSave:dt,flushSave:ct,access:at,saveUnreachable:pt=!1,readOnly:ut,readOnlyReason:ft=null}=ne(),ht=B(),mt=I(),{mediaEditing:gt,hasEditGuard:yt,hasPinnedChrome:St}=vn,{appState:kt,dispatch:vt,history:bt,selectedItem:wt,getSelectorForId:xt,config:zt}=Oe(e=>e),Ct=N(),{first:Ot,firstGroup:Bt,lastGroup:It,isSectionGroup:Nt,sectionGroupZone:Pt,panelOf:$t}=Ct,Mt=$t(Ot),Tt=e=>K(Ct,e),jt=e=>X(Ct,e),At="node"===Ct.firstRow,Lt=Ct.band??null,Et=on("screen",fe),Rt=on("tree",Re),Vt=on("drag",dn),Ht=on("notice",qe),Ft=on("lock",tn),Wt=on("menu",ue),Dt=on("styleClipboard",pe),Jt=on("chrome",_e),Ut=P()??`/${Ln}`,Gt=$(),Yt=M(),Zt=b({readOnly:ut}),Kt=b({readOnly:ut,foldIntoHistory:!0}),Xt=Bn(null),Qt=Be(),qt=In(()=>({...Zt,select:e=>{Xt.current=e,Zt.select(e)},commitDocument:(e,n)=>{if(void 0!==n){const t=Qt.config;Xt.current=Ne(e,t,n)}Zt.commitDocument(e,n)}}),[Zt,Qt]),_t=kt.ui,eo=_t.leftSideBarVisible,no=_t.rightSideBarVisible,{options:to,widths:oo,initial:ro,fluid:io,fit:lo}=T(),[so,co]=Nn(ro),ao=oe(),po=gt&&null!==ao,uo=re(),fo=ie();j(wt?.props.id);const{read:ho,write:mo,forSelection:go}=A(),[yo,So]=Nn(ho);Pn(()=>{mo(yo)},[yo]);const[ko,vo]=Nn(0),bo=Bn(null),wo=Bn(null),xo=un(wo,{readySelector:qn}),zo=mn(xo),Co=u(wo);f(wo,xo);const Oo=d(),Bo=en(at),Io={state:it,offline:Oo||it.failed&&pt,readOnlyReason:ft,editing:Bo?Ht.editing({name:nn(Bo.name,Ft),noun:Et.noun}):null,conflict:null!=lt,notSaving:Et.bar.notSaving},No=()=>{ut||(it.failed?st():ct())};h(wo,xo,No);const[Po,$o]=Nn(!1),Mo=Bn(!1),To=Bn(!1),[jo,Ao]=Nn(null),[Lo,Eo]=Nn([]),[Ro,Vo]=Nn(L),Ho="puck"===Ro.kind,Fo=n(Ro,wt?.props.id),[Wo,Do]=Nn(null);Pn(()=>{Wo&&(t(),Do(null))},[Wo]);const Jo=Bn(xt);Jo.current=xt;const Uo=$n((e,{scroll:n})=>{So(n=>go(e,n)),n&&Do(e);const t=[];let o=e;for(let e=0;e<4;e++){const e=Jo.current(o)?.zone;if(!e||!e.includes(":"))break;const n=e.split(":")[0];t.push(n),t.push(e),o=n}0!==t.length&&br(e=>{if(t.every(n=>!e.has(n)))return e;const n=new Set(e);return t.forEach(e=>n.delete(e)),n})},[]),Go=Bn(null);Pn(()=>{const e=Go.current;Go.current=null;const n=null==wt?.props.id?null:String(wt.props.id);Vo(t=>e&&e.id===n?e.mode:"part"===t.kind&&"nodeId"in t&&t.nodeId===n?t:$t(wt?.type)??L);const t=wt?.props.id,r=Xt.current;if(Xt.current=null,!t)return;const i=xt(t);Uo(String(t),{scroll:!o(r,i??null,Se)})},[wt?.props.id,Uo]);const Yo=$n(e=>{Vo(n=>E(n,e)?n:e),vt({type:"setUi",ui:{rightSideBarVisible:!0}})},[vt]),Zo=Bn(()=>{});Zo.current=(e,n)=>{const t=e?hi(e.zone??Se)[e.index]?.props.id:null,o=null==t?null:String(t),r=null==wt?.props.id?null:String(wt.props.id);Vo(e=>E(e,n)?e:n),o!==r&&(Go.current={id:o,mode:n},qt.select(e))};const Ko=$n((e,n)=>Zo.current(e,n),[]),Xo={kind:Ro.kind,mode:Ro,open:Yo,show:e=>Vo(e),reveal:()=>{no||vt({type:"setUi",ui:{rightSideBarVisible:!0}})},select:Ko},Qo=R(Xo,{data:kt.data,selected:wt??null,zoneOf:e=>xt(e)?.zone,readOnly:Boolean(ut),select:e=>{Vo(L),qt.select({index:e})},replace:(e,n)=>qt.replaceComponent(Se,e,n),scrollTo:e=>Vi(e)},{device:so,refreshes:ko},{setView:So,reveal:()=>{eo||vt({type:"setUi",ui:{leftSideBarVisible:!0}})}}),qo=Qo.pinnedSource??!1,_o=Qo.resolveLeftView?Qo.resolveLeftView(yo,po):"media"===yo&&po?yo:"sections",er=V(),{isLockedBlock:nr,duplicateBlocked:tr,nestDepth:or,newSectionNode:rr,canAddTo:ir,blockIsOffered:lr}=er,sr=H(),{labelAtLevel:dr,Icon:cr,useProducts:ar}=sr,pr=sr.rowName?(e,n,t)=>sr.rowName(e,n,t):void 0,ur=$n(e=>{vt({type:"setUi",ui:{rightSideBarVisible:!0}}),c(e),Uo(e,{scroll:!0})},[vt,Uo]),{selectNode:fr,openPartId:hr}=v({mode:Ro,setMode:Vo,onOpenPart:ur}),[mr,gr]=Nn(null);de(null!==mr,()=>gr(null));const yr=y(F()),Sr=yr.collapsed,kr=yr.panelWidths,[vr,br]=Nn(()=>{if("undefined"==typeof window)/* @__PURE__ */return new Set;try{const e=window.localStorage.getItem(Sr);return new Set(e?JSON.parse(e):[])}catch{/* @__PURE__ */
8
- return new Set}});Pn(()=>{try{window.localStorage.setItem(Sr,JSON.stringify([...vr]))}catch{}},[vr]);const[wr,xr]=Nn(()=>{if("undefined"==typeof window)return{...S};try{const e=window.localStorage.getItem(kr);if(!e)return{...S};const n=JSON.parse(e);return{left:k(Number(n.left)||S.left),right:k(Number(n.right)||S.right)}}catch{return{...S}}});Pn(()=>{const e=setTimeout(()=>{try{window.localStorage.setItem(kr,JSON.stringify(wr))}catch{}},300);return()=>clearTimeout(e)},[wr]);const zr=$n((e,n)=>xr(t=>{const o="function"==typeof n?n(t[e]):n;return t[e]===o?t:{...t,[e]:o}}),[]),Cr=$n(e=>zr("left",e),[zr]),Or=$n(e=>zr("right",e),[zr]),Br=e=>vr.has(e),Ir=e=>br(n=>{const t=new Set(n);return t.has(e)?t.delete(e):t.add(e),t}),Nr=Bn(!1),Pr=Bn(null);Pn(()=>{if(Nr.current&&!Po){const e=Pr.current,n=e&&e.isConnected&&!e.closest('[aria-hidden="true"]')?e:null;(n??wo.current?.querySelector(`button[aria-label="${CSS.escape(Et.add.title)}"]`))?.focus(),Pr.current=null}Nr.current=Po},[Po]),Pn(()=>{if(!Po||!Co)return;const e=e=>{"Escape"===e.key&&Yi()};return Co.addEventListener("keydown",e),()=>Co.removeEventListener("keydown",e)},[Po,Co]),de(Po,()=>Yi()),Pn(()=>{!eo&&Po&&($o(!1),Ao(null),Mo.current=!1)},[eo]),Pn(()=>{if(!uo)return To.current&&vt({type:"setUi",ui:{leftSideBarVisible:!1}}),void(To.current=!1);Po&&($o(!1),Ao(null),To.current=Mo.current,Mo.current=!1),eo||(To.current=!0,vt({type:"setUi",ui:{leftSideBarVisible:!0}}))},[uo]),Pn(()=>{!eo&&uo&&(To.current=!1,fo())},[eo]),Pn(()=>{if(!uo||!Co)return;const e=e=>{"Escape"===e.key&&fo()};return Co.addEventListener("keydown",e),()=>Co.removeEventListener("keydown",e)},[uo,Co]),de(null!==uo,()=>fo());const $r=W(),Mr=(e,n="success",t)=>{if($r)return void(t?$r(e,"error"===n?"error":"info",t):$r(e,"error"===n?"error":"info"));const o={sound:!1,action:t?.action,onClose:t?.onClose};"error"===n?An.error(e,{...o,duration:t?.duration??3200}):An.success(e,{...o,duration:t?.duration??1900})},Tr=Bn(null),[jr,Ar]=Nn(0),[Lr,Er]=Nn(0),Rr=D(),Vr=Bn(null),Hr=e=>Math.max(0,e.clientHeight-(Vr.current?.offsetHeight??0));Pn(()=>{const e=Tr.current;if(!e)return;const n=()=>{Ar(e.clientWidth),Er(Hr(e))};n();const t=new ResizeObserver(n);return t.observe(e),Vr.current&&t.observe(Vr.current),()=>t.disconnect()},[]),Mn(()=>{Tr.current&&(Ar(Tr.current.clientWidth),Er(Hr(Tr.current)))},[wr,eo,no]);const Fr=so===io?jr>0?jr:oo[io]:oo[so],Wr=jr>0?Math.min(jr/Fr,"shrink"===lo?1:2):1,Dr=Fr*Wr,Jr=jr>0&&Dr>jr+1,Ur={width:Dr,height:Lr||"100%",flex:"none",position:"relative"},Gr={width:Fr,height:Lr?Lr/Wr:"100%",maxHeight:"none",transform:1!==Wr?`scale(${Wr})`:void 0,transformOrigin:"top left"},Yr=()=>vt({type:"setUi",ui:{leftSideBarVisible:!eo}}),Zr=()=>vt({type:"setUi",ui:{rightSideBarVisible:!no}}),Kr=e=>{Po&&($o(!1),Ao(null),Mo.current=!1,eo&&yo===e)||uo&&(To.current=!1,fo(),eo&&yo===e)||(eo&&yo===e?Yr():(So(e),eo||vt({type:"setUi",ui:{leftSideBarVisible:!0}})))},Xr=()=>{te(fn,{accept:"image/*",title:Jt.mediaLibrary})},Qr=()=>{Vo(L),qt.select(null),p()},qr=()=>{Vo(Mt??L),no||vt({type:"setUi",ui:{rightSideBarVisible:!0}})},_r=kt.data.content??[],ei=()=>{const e=_r.findIndex(Tt),n=_r.findIndex(jt);return{floor:e>=0?e+1:0,cap:n>=0?n:_r.length}},ni=zt,ti=er.stripCopy,oi=e=>r(e,ti),ri=q(),ii=Pe({data:kt.data,config:ni,readOnly:Boolean(ut),clipboard:ri,strip:ti?e=>ti(e):void 0,afterRemove:"none",stepBounds:(e,n)=>{if(e.parentId!==bn||e.slot!==wn)return{min:0,max:n-1};const{floor:t,cap:o}=ei();return{min:t,max:o-1}},commit:(e,{select:n})=>{void 0!==n&&Vo(L);const t=void 0===n||"node"===n?.kind?n:null;qt.commitDocument(e,t)}}),li=e=>{const n=Cn(kt.data,zt,e);if(!n)return!1;const t=xn(n.place),o=n.node,r=t===Se?pi(o):Ci(o);return!!ii.remove(e)&&(Mr(Et.deleted({name:r}),"success",{duration:8e3,action:{label:Et.bar.undo,onClick:()=>{ii.restore(n.node,n.place)}}}),!0)},si={...ii,remove:li},di=e=>dr(e,"block",zt.components[e]?.label??e),ci=$n(e=>zt.components[e]?.defaultProps??{},[zt]),ai=e=>dr(e,"section",di(e)),pi=e=>he({type:e.type,props:e.props??{}},ai(e.type),pr),{nodeAddresses:ui,zoneItems:fi}=In(()=>{const e=/* @__PURE__ */new Map,n=/* @__PURE__ */new Map,t=(o,r,i)=>{n.set(r,o),o.forEach((n,o)=>{const l=String(n.props?.id??"");if(l&&e.set(l,{zone:r,index:o}),i>=ve)return;const s=/* @__PURE__ */new Map;for(const{child:e,zone:t}of be(zt,n))s.set(t,[...s.get(t)??[],e]);for(const[e,n]of s)t(n,e,i+1)})};return t(_r,Se,0),{nodeAddresses:e,zoneItems:n}},[_r,zt]),hi=$n(e=>fi.get(e)??[],[fi]),mi=e=>{const n=ui.get(e);return n?hi(n.zone)[n.index]:void 0},gi=e=>Q(er,zt,e),yi=e=>{if(!er.slotsOf||e===Se)return null;const n=e.lastIndexOf(":");if(n<=0)return null;const t=mi(e.slice(0,n));if(!t)return null;const o=gi(t).filter(e=>e.rung),r=o.findIndex(t=>t.slot===e.slice(n+1));return r<0?null:{node:t,slot:o[r],position:r}},Si=(()=>{if(!J(Ro))return null;const e=`${Ro.nodeId}:${Ro.slot}`;return yi(e)?.slot.panel===Ro.kind?e:null})(),ki=Bn(null);Pn(()=>{const e=ki.current;if(ki.current=null,!Si||!J(Ro))return;const n=Ro.nodeId;Uo(n,{scroll:e!==Si}),br(e=>{if(!e.has(n))return e;const t=new Set(e);return t.delete(n),t})},[Ro]);const vi=(e,n,t)=>{const o=String(e.props.id);if(!n.panel)return void(e=>{const n=ui.get(e);n&&(n.zone===Se?Hi(n.index):hl(n.zone,n.index,e,mi(n.zone.slice(0,n.zone.lastIndexOf(":")))?.type??""))})(o);const r={kind:n.panel,nodeId:o,slot:n.slot},i=`${o}:${n.slot}`;t&&Si!==i&&(ki.current=i),Ko(null,r),no||vt({type:"setUi",ui:{rightSideBarVisible:!0}}),Vi(o)},bi=(e,n,t)=>{const o=`${e}:${n}`;if(br(n=>{if(!n.has(o)&&!n.has(e))return n;const t=new Set(n);return t.delete(o),t.delete(e),t}),!t)return;Si!==o&&(ki.current=o);Ko(null,{kind:t,nodeId:e,slot:n})},wi=(e,n,t)=>{if(ut||!er.moveSlot)return;const o=mi(e),r=o?gi(o).filter(e=>e.rung):[],i=r[n];if(!i)return;const l={parentId:e,slot:et,index:n},s=pn(l,{...l,index:Math.min(Math.max(t,0),r.length)});if(s===n)return;const d=er.moveSlot(e,n,s);"string"==typeof d&&bi(e,d,i.panel)},xi=ar(),zi=In(()=>{const e=/* @__PURE__ */new Map;for(const n of xi??[])e.set(n.slug,n.name);return e},[xi]),Ci=e=>me(e,di,sr.plainText,e=>zi.get(e),sr.rowName),Oi=(e,n)=>{const t=zt.components[e.type]?.fields,o=n===Se||Al(n)?"section":"block",r=n===Se&&(Tt(e)||jt(e)||Nt(e.type)),i="block"===o?ge(t):r?null:ye(t);return sr.renamePropOf?sr.renamePropOf(e,o,i):i},Bi=(e,n,t,o)=>{if(!(!ut&&mr?.zone===e&&mr.index===n))return;const r=(t,o)=>{gr(null),o&&((e,n,t)=>{const o=hi(e)[n];if(!o)return;const r=Oi(o,e);r&&qt.replaceComponent(e,n,{...o,props:{...o.props,[r]:t.trim()}})})(e,n,t)};/* @__PURE__ */
9
- return Un("input",{className:"es-tree-rename",defaultValue:o,autoFocus:!0,"aria-label":Et.rename,onClick:e=>e.stopPropagation(),onBlur:e=>r(e.currentTarget.value,!0),onKeyDown:e=>{"Enter"===e.key?(e.preventDefault(),r(e.currentTarget.value,!0)):"Escape"===e.key&&(e.preventDefault(),r("",!1))}},t)},Ii=e(U(),Dt),Ni=Ii.scope({target:Sn,siteId:ot,docId:kn}),Pi=zt,$i=(e,n)=>n===Se?ai(e):di(e),Mi=(e,n,t)=>{const o=Ii.plan(Ni,t,$i(t.type,e),Pi);o&&(o.changed&&qt.replaceComponent(e,n,{...t,props:{...o.props,id:t.props.id}}),Mr(o.message))},Ti=_({nodesIn:hi,nodeAt:(e,n)=>hi(e)[n]??null,labelOf:(e,n)=>n===Se?ai(e):di(e),renamePropOf:Oi,beginRename:(e,n)=>gr({zone:e,index:n}),history:{hasPast:bt.hasPast,hasFuture:bt.hasFuture,back:()=>bt.back(),forward:()=>bt.forward()},openPageSettings:()=>{qt.select(null),Vo(L)},pageSettingsLabel:Et.pageSettings,words:{menu:Wt,styleClipboard:Dt,screen:Et.menu},readOnly:Boolean(ut),collapseAll:()=>br(new Set(hi(Se).map(e=>String(e.props.id)))),onPasteRefused:e=>Mr(e?Et.pasteRefused({name:e.label}):Et.menu.clipboardRefused,"error"),canPasteAt:(e,n)=>Rl(e,n),menuRows:Qo.menuRows,isLocked:e=>nr(e.type),duplicateBlocked:e=>tr(kt.data,e),permits:e=>ke(zt,e.type),nodeOps:si,isPinned:(e,n)=>n===Se&&(Tt(e)||jt(e)),sectionBand:ei,locate:e=>ui.get(e)??null,rowNameOf:(e,n)=>n===Se?pi(e):Ci(e),selectAt:(e,n,t,o)=>{e===Se?Hi(n):hl(e,n,t,o??"")},slotRung:e=>{const n=yi(e);return n?.slot.panel?{label:n.slot.label,select:()=>vi(n.node,n.slot,!1)}:null},style:{held:()=>ce(Ni),canCopy:e=>Ii.rows(Pi,e).some(e=>!1!==e.counted),copy:(e,n)=>Ii.copy(Ni,e,$i(e.type,n),Pi),paste:(e,n,t)=>Mi(e,n,t)},keys:mt?{target:Co,selected:()=>{const e=kt.ui.itemSelector;return e?{zone:e.zone??Se,index:e.index}:null},held:()=>ri.get(),readOnly:Boolean(ut),onDone:({done:e,name:n})=>{"copied"===e&&Mr(Et.copied({name:n}))}}:void 0},xo),ji=Bn({copy:(e,n)=>{},paste:(e,n,t)=>{},at:()=>null,readOnly:!1});Pn(()=>{ji.current={copy:(e,n)=>Ii.copy(Ni,e,$i(e.type,n),Pi),paste:Mi,at:()=>{const e=kt.ui.itemSelector;if(!e)return null;const n=e.zone??Se,t=hi(n)[e.index];return t?{zone:n,index:e.index,node:t}:null},readOnly:Boolean(ut)}});const Ai=$n(e=>{const n=ae(e);if(!n)return;const t=ji.current,o=t.at();o&&(e.preventDefault(),"copy"===n?t.copy(o.node,o.zone):t.readOnly||t.paste(o.zone,o.index,o.node))},[]);Pn(()=>{if(!Co)return;const e=e=>Ai(e);return Co.addEventListener("keydown",e),()=>Co.removeEventListener("keydown",e)},[Ai,Co]),gn(xo,"keydown",Ai);const Li=_r.map(e=>e.props.id).join("|");Pn(()=>{const e=xo?.document??null,n=xo?.window??null;let t=0;const o=[],r=()=>{if(!e)return void Eo(e=>e.length?[]:e);const n=_r.findIndex(jt),t=n>=0?n:_r.length,o=n=>{const t=_r[n]?.props?.id;return null==t?null:e.querySelector(`[data-puck-component="${CSS.escape(String(t))}"]`)},r=e=>e?[...e.querySelectorAll(hn)].map(e=>e.getBoundingClientRect()).filter(e=>e.width>0||e.height>0):[],i=[];for(let e=_r.length>0&&!Tt(_r[0])?0:1;e<=t;e++){const n=o(e),t=o(e-1),l=n?.getBoundingClientRect()??null,s=t?.getBoundingClientRect()??null;if(!l&&!s)continue;const d=_n(l&&s?(s.bottom+l.top)/2:l?0===e?l.top+12:l.top:s.bottom,Math.max(0===e?0:-1/0,...r(t).map(e=>e.bottom)),Math.min(1/0,...r(n).map(e=>e.top)));d&&i.push({...d,index:e})}Eo(e=>function(e,n){if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t].top!==n[t].top||e[t].index!==n[t].index||e[t].height!==n[t].height)return!1;return!0}(e,i)?e:i)},i=()=>{cancelAnimationFrame(t),t=requestAnimationFrame(r)};if(!e||!n)return void r();n.addEventListener("scroll",i,{passive:!0});const l=new ResizeObserver(i);return l.observe(e.documentElement),r(),o.push(setTimeout(r,150),setTimeout(r,450)),()=>{cancelAnimationFrame(t),o.forEach(clearTimeout),n.removeEventListener("scroll",i),l.disconnect()}},[xo,Li,so,Wr,eo,no,wt?.props.id]);const Ei=xo?.document??null,Ri=xo?.window??null;Pn(()=>{const e=bo.current;if(!e||!Ei||!Ri)return;const n=[],t=()=>{const n=Ei.querySelector(`[data-puck-component="${CSS.escape(e.id)}"]`);if(!n)return!1;const t=n.getBoundingClientRect().top-e.offset;return Math.abs(t)>1&&Ri.scrollTo({left:Ri.scrollX,top:Ri.scrollY+t,behavior:"instant"}),!0};return bo.current=null,t()&&n.push(setTimeout(t,150),setTimeout(t,450)),()=>n.forEach(clearTimeout)},[Ei,Ri]);const Vi=e=>{Qo.holdCanvasOn?Qo.holdCanvasOn(e):c(e)},Hi=e=>{Vo(L),qt.select({index:e}),Qo.sectionPressed?.(_r[e]);const n=_r[e]?.props?.id;n&&Vi(n)},Fi=e=>{const{floor:n,cap:t}=ei(),o=e=>Math.min(Math.max(n,e),t);if("number"==typeof e)return o(e);const r=wt&&Ro.kind!==Mt?.kind?_r.findIndex(e=>e.props.id===wt.props.id):-1;return o(r>=0?r+1:t)},Wi=(e,n)=>{const{floor:t,cap:o}=ei(),r=Math.min(Math.max(n,t),o),i=e<r?r-1:r;return i===e?{moved:!1,dest:e}:(qt.reorderComponent(Se,e,i),qt.select({index:i}),{moved:!0,dest:i})},Di=(e,n,t,o)=>{Vo(L),qt.select(o?{index:o.index,zone:o.zone}:{index:e}),c(n),Mr(Et.sectionAdded({name:t}))},Ji=(e,n)=>{const t=Fi(n),o=rr(e,{nodeDefaults:ci,newNodeId:Ce,sectionLabel:ai,blockIsOffered:lr}),r=o?qt.insertNode(Se,t,o):qt.insertSection(e,t);return Di(t,r,ai(e),o?((e,n,t)=>{if(e.type===t)return null;const o={at:null},r=(e,n,i)=>{const l=i.filter(n=>n===e.type).length;for(const{child:s,zone:d,index:c}of be(zt,e)){if(s.type===t&&(!o.at||n>o.at.depth)){const r=ir(e.type,l,d.slice(d.lastIndexOf(":")+1)),i=r?.choices??(r?.spec?[{type:r.spec.childType,label:r.spec.childType}]:[]);null!==r&&"footer"!==r.source&&`${e.props.id}:${r.slot}`===d&&i.some(e=>e.type===t)&&(o.at={zone:d,index:c,depth:n})}r(s,n+1,[...i,e.type])}};return r({type:e.type,props:{...e.props,id:n}},1,[]),o.at?{zone:o.at.zone,index:o.at.index}:null})(o,r,e):null),t},Ui=e=>Gi(Se,e),Gi=(e,n)=>{Pr.current=document.activeElement??null,uo&&(Mo.current=To.current,To.current=!1,fo()),Ao(null===n?null:{zone:e,index:n}),$o(!0),eo||(Mo.current=!0,vt({type:"setUi",ui:{leftSideBarVisible:!0}}))},Yi=()=>{$o(!1),Ao(null),Mo.current&&vt({type:"setUi",ui:{leftSideBarVisible:!1}}),Mo.current=!1},Zi=(e,n)=>sr.rowName?n?Tt(e)?sr.rowName(e,"section",Et.header):jt(e)?sr.rowName(e,"section",Et.footer):Nt(e.type)?sr.rowName(e,"section",di(e.type)):pi(e):Ci(e):n?ai(e.type):di(e.type),Ki=e=>n=>{e()},Xi=()=>Qo.editPinnedSource?.(),Qi=(e,n,t)=>{if(ut)return null;const o=hi(e)[n];return o&&!ke(zt,o.type).delete?null:/* @__PURE__ */Un(Le,{kind:"delete",label:Et.deleteNamed({name:t}),onClick:()=>((e,n)=>{const t=hi(e)[n]?.props?.id;null!=t&&li(String(t))})(e,n),children:/* @__PURE__ */Un(Fn,{size:15})})},qi=e=>sr.rowPreview?.(e)||void 0,_i=e=>sr.rowMarks?.(e)??void 0,el=(e,n,t)=>sr.rowActions?.(e,n,t)??null,nl=(e,n,t,o)=>{if(ut)return null;const r=Boolean(t.props._hidden);/* @__PURE__ */
10
- return Un(Le,{kind:"eye",label:r?Et.showNamed({name:o}):Et.hideNamed({name:o}),onClick:()=>ol(e,n,t),children:/* @__PURE__ */Un(r?Wn:Dn,{size:14,strokeWidth:1.8,strokeLinecap:void 0,strokeLinejoin:void 0})})},tl=e=>ms(Se,e),ol=(e,n,t)=>{qt.replaceComponent(e,n,{...t,props:{...t.props,_hidden:!t.props._hidden}})},rl=e=>we(zt,e),il=e=>be(zt,e),ll=e=>er.slotsOf?gi(e).map(n=>({slot:n.slot,rung:n.rung?n:null,kids:xe(e,n.slot)})):[{slot:null,rung:null,kids:il(e)}],sl=e=>er.slotsOf?ll(e).flatMap(e=>e.kids):il(e),dl=e=>Boolean(er.slotsOf)&&gi(e).some(e=>e.rung),cl=(e,n,t)=>null===t?void 0===n?ir(e):ir(e,n):ir(e,n,t),al=(e,n,t)=>{const o=ze(zt,e.type,n)&&(t||sl(e).length>0||dl(e));return{collapsible:o,folded:o&&Br(String(e.props.id))}},pl=(e,n,t)=>ll(e).flatMap(o=>{const r=o.rung?n+1:n,i=o.kids.flatMap(({child:e})=>al(e,r,t(e.type)).collapsible?[String(e.props.id),...pl(e,r+1,t)]:[]);return o.rung?[`${e.props.id}:${o.rung.slot}`,...i]:i}),ul=e=>sl(e).length>0||dl(e)||Boolean(ir(e.type)),fl=e=>Boolean(ir(e)),hl=(e,n,t,o)=>{if(Vo(L),ir(o)?.spec?.slider){const t=e.split(":")[0];a(t,n),qt.select({index:n,zone:e}),c(t)}else qt.select({index:n,zone:e}),Vi(t)},ml=(e,n,t,o,r)=>{const i=`${e}:${n}`;qt.insertComponent(i,t,o),ir(r)?.spec?.slider?requestAnimationFrame(()=>{a(e,o),qt.select({index:o,zone:i})}):qt.select({index:o,zone:i})},gl=Bn(/* @__PURE__ */new Set);Pn(()=>{_r.forEach(e=>{const n=ir(e.type)?.spec;if(!n)return;const t=e.props.id;if(gl.current.has(t))return;gl.current.add(t);if((Array.isArray(e.props[n.slot])?e.props[n.slot]:[]).length>0)return;if(n.skipSeed?.(e.props))return;const o=`${t}:${n.slot}`,r=n.legacy?.(e.props)??[];(r.length?r:n.seeds(ci)).forEach((e,t)=>Kt.seedChild(o,t,n.childType,e))})},[_r,Kt,ci]);const yl=Bn(/* @__PURE__ */new Set);Pn(()=>{_r.forEach((e,n)=>{const t=e.props.id;if(yl.current.has(t))return;const o=i(e,rl(e.type));yl.current.add(t),o&&Kt.replaceComponent(Se,n,{...e,props:o})})},[_r,Kt]),G(Kt,zt);const Sl=_r.findIndex(jt),kl=Sl>=0?_r[Sl]:null,vl=At?_r.findIndex(Tt):-1,bl=vl>=0?_r[vl]:null,wl=Ct.groupTab,xl=In(()=>wl?e=>Nt(e.type):void 0,[wl]),zl=Boolean(Ct.groupBadge),Cl=Ct.groupBadge?/* @__PURE__ */Un("span",{className:"es-tree-group-badge",children:/* @__PURE__ */Un(jn,{tone:"info",size:"xs",children:Ct.groupBadge})}):void 0,Ol=_r.find(e=>e.type===Bt)??null,Bl=_r.find(e=>e.type===It)??null,Il=Sl>=0?Sl:_r.length,Nl=[];_r.forEach(e=>{jt(e)||(ul(e)&&Nl.push(String(e.props.id)),Nl.push(...pl(e,1,fl)))}),kl&&(Nl.push(String(kl.props.id)),Nl.push(...pl(kl,1,fl)));const Pl=Nl.length>0&&Nl.every(e=>vr.has(e)),$l=e=>{const n=sr.blockRowName(e,di);return sr.rowName?sr.rowName(e,"block",n):n},Ml=(e,n,t,o)=>{const r=hi(e)[t];if(!r)return;const i={...zn(e),index:t},l={...zn(n),index:Math.min(Math.max(o,0),hi(n).length)},s=pn(i,l);if(e!==n||s!==t)try{ii.move(String(r.props.id),{...l,index:s})}catch(e){if(!(e instanceof On))throw e}},Tl=e=>{const n=/* @__PURE__ */new Set,t=e=>{for(const{child:o,zone:r}of il(e))n.add(r),t(o)};for(const t of rl(e.type))n.add(`${e.props.id}:${t}`);return t(e),n},jl=e=>{let n=e.slice(0,e.indexOf(":"));for(let e=0;e<64;e++){const e=ui.get(n);if(!e)return null;if(e.zone===Se)return n;n=e.zone.slice(0,e.zone.indexOf(":"))}return null},Al=e=>{const n=e.slice(0,e.indexOf(":")),t=_r.find(e=>Nt(e.type)&&String(e.props.id)===n);return t&&Pt(n)===e?t:null},Ll=(e,n)=>{const t=Al(e);return!t||(!Ct.groupAccepts||Ct.groupAccepts(t.type,n,hi(e).length))},El=(e,n,t)=>{if(e.rung){const t=mi(e.rung.nodeId),o=t?gi(t).filter(e=>e.rung).length:0;return n.parentId===e.rung.nodeId&&n.slot===et&&n.index>=0&&n.index<=o}if(n.slot===et)return!1;if(e.add)return Fl(e.add,n);const o=xn(n);if(Nt(e.type))return!1;const r=Al(o),i=Al(e.zone);if(r||i)return!(!r||!i)&&(!(r!==i&&!Ll(o,e.type))&&(n.index>=0&&n.index<=hi(o).length));if(e.zone===Se||o===Se){if(e.zone!==o)return!1;const{floor:t,cap:r}=ei();return n.index>=t&&n.index<=r}if(n.index<0||n.index>hi(o).length)return!1;if(e.zone===o)return!0;const l=kl&&!Ct.lastIsOpen?String(kl.props.id):null;return(!l||jl(e.zone)!==l&&jl(o)!==l)&&((e,n,t,o)=>{if(e===n)return!0;const r=o??hi(e)[t];if(!r)return!1;const i=n.split(":")[0],l=ui.get(i),s=l?hi(l.zone)[l.index]:void 0;if(!s)return!1;if(!o&&Tl(r).has(n))return!1;const d=ir(s.type,or(kt?.data,s.type,i),n.slice(n.lastIndexOf(":")+1));return!!d&&(!!(d.choices?d.choices.some(e=>e.type===r.type):d.spec?.childType===r.type)&&!d.spec?.addBlocked?.(hi(n),r))})(e.zone,o,e.index,t)},Rl=(e,n)=>{const t=xn(e.from),o=e.node;return t===xn(n)?Ll(t,o.type):El({id:String(o.props?.id??""),zone:t,index:-1,type:o.type},n,o)},Vl=e=>{const n=e.slice(0,e.indexOf(":")),t=ui.get(n),o=t?hi(t.zone)[t.index]:void 0;if(!t||!o)return null;const r=ir(o.type,or(kt?.data,o.type,n),e.slice(e.lastIndexOf(":")+1));if(!r||`${n}:${r.slot}`!==e)return null;if("footer"===r.source)return null;const i=r.choices??(r.spec?[{type:r.spec.childType,label:di(r.spec.childType)}]:[]),l=yi(e);return{parent:o,parentId:n,target:r,choices:i,parentName:l?l.slot.label:Zi(o,t.zone===Se)}},Hl=(e,n)=>{if("section"!==e.kind)return e;const t=xn(n);return t===Se||Al(t)?e:Vl(t)?.choices.some(n=>n.type===e.type)?{kind:"block",type:e.type}:e},Fl=(e,n)=>{const t=Hl(e,n),o=xn(n);if("block"!==t.kind){if(Al(o)){const e="section"===t.kind?t.type:t.template.node.type;return Ll(o,e)&&n.index>=0&&n.index<=hi(o).length}if(o!==Se)return!1;const{floor:e,cap:r}=ei();return n.index>=e&&n.index<=r}if(o===Se)return!1;const r=Vl(o);return!(!r||!r.choices.some(e=>e.type===t.type))&&!r.target.spec?.addBlocked?.(hi(o))},Wl=(e,n)=>{const t=Hl(e,n);if("block"!==t.kind&&Al(xn(n)))return void((e,n,t)=>{const o="section"===e.kind?e.type:"template"===e.kind?e.template.node.type:null;if(o&&Ll(n,o)){if("section"===e.kind)qt.insertComponent(n,e.type,t);else{if("template"!==e.kind)return;qt.insertNode(n,t,oi(e.template.node))}Vo(L),qt.select({index:t,zone:n})}})(t,xn(n),n.index);if("section"===t.kind)return void Ji(t.type,n.index);if("template"===t.kind)return void((e,n,t)=>{const o=Fi(t),r=qt.insertNode(Se,o,n);Di(o,r,e)})(t.template.name,oi(t.template.node),n.index);const o=xn(n),r=Vl(o);r&&(r.target.spec?ml(r.parentId,r.target.slot,t.type,n.index,r.parent.type):((e,n,t)=>{qt.insertComponent(e,n,t),Vo(L),qt.select({index:t,zone:e})})(o,t.type,n.index))},Dl=(e,n)=>{e.rung?wi(e.rung.nodeId,e.index,n.index):e.add?Wl(e.add,n):e.zone===Se?Wi(e.index,n.index):Ml(e.zone,xn(n),e.index,n.index)},[Jl]=Nn(()=>cn()),Ul=an({keyOf:e=>e.id,readOnly:Boolean(ut),session:Jl,canDrop:El,onDrop:Dl,onStep:(e,n)=>{e.rung?wi(e.rung.nodeId,e.index,n<0?e.index-1:e.index+2):e.zone===Se?((e,n)=>{const t=ai(_r[e]?.type??""),o=Wi(e,n<0?e-1:e+2);if(!o.moved)return void Mr(n<0?Et.sectionFirst({name:t}):Et.sectionLast({name:t}));const{floor:r,cap:i}=ei();Mr(Et.sectionMoved({name:t,n:o.dest-r+1,total:i-r}))})(e.index,n):Ml(e.zone,e.zone,e.index,n<0?e.index-1:e.index+2)}}),Gl=$n(e=>{const{floor:n,cap:t}=ei(),o=[];for(const r of e.nodes){const e=xn(r.place),i=hi(e)[r.place.index];if(!i||String(i.props.id)!==r.id)continue;if(Tt(i)||jt(i)||nr(i.type))continue;if(Nt(i.type))continue;const l=Boolean(Al(e)),s=e===Se||l;e===Se&&t-n<2||o.push({key:r.id,item:{id:r.id,zone:e,index:r.place.index,type:i.type},box:r.box,label:s?ai(i.type):Ci(i),from:r.place})}const r=e.zones.flatMap(e=>{const n=xn(e.list);if(n===Se&&0===e.children.length)return[{...e,addLabel:Et.addSection,addAlways:!0}];const t=Vl(n),o=t?.target.spec?.addLabel;return e.children.length>0||Boolean(t?.choices.length)||Boolean(Al(n))?[o?{...e,addLabel:o}:e]:[]}),i=r.flatMap(e=>{const n=xn(e.list),t=n===Se||Al(n)?null:Vl(n);return t?.choices.length?rn(e,t.target.spec?.addLabel??Et.addBlockHere):[]});return{sources:o,zones:r,seams:i}},[kt.data]),Yl=null==wt?.props.id?null:String(wt.props.id),Zl=$n(e=>{const n=zt,t=e=>!e.item.rung&&null!==Cn(kt.data,n,e.item.id),o=e[e.length-1];if(!t(o))return o;const r=n=>e.find(e=>t(e)&&e.item.id===n),i=r(Yl);return i||(r($e(kt.data,n,o.item.id,Yl,xl))??o)},[kt.data,zt,Yl,xl]),[Kl,Xl]=Nn(null);gn(xo,"mouseover",e=>{if(!wl)return;const n=yn(e.target),t=n?Kn(kt.data,zt,n):null;t!==Kl&&Xl(t)}),gn(xo,"mouseout",e=>{wl&&!e.relatedTarget&&Xl(null)});const Ql=e=>Tt(e)||jt(e)||Nt(e.type),ql=[];if(wl){const e=Yl?Kn(kt.data,zt,Yl):null;for(const n of/* @__PURE__ */new Set([e,Kl])){const e=n?_r.find(e=>String(e.props.id)===n):void 0;if(!e||!Ql(e))continue;const t=wl(e);t&&ql.push({id:String(e.props.id),label:t,below:Tt(e)||e.type===Bt})}}const _l=le(),es=Bn(null);Pn(()=>{const e=Ct.changeNotice;if(!e)return;const n=JSON.stringify(_r.filter(Ql)),t=es.current;if(es.current={doc:kn,bands:n,index:bt.index},!t||t.doc!==kn||t.bands===n)return;bt.hasPast&&bt.index>=t.index&&!Zn.has(_l)&&(Zn.add(_l),Mr(e,"success",{action:{label:Et.bar.undo,onClick:()=>bt.back()},duration:8e3}))},[_r]);const ns=e=>{Vo(L),qt.select(e.zone===Se?{index:e.index}:{index:e.index,zone:e.zone})},ts=Y(),os=()=>({data:kt.data,device:so,ops:qt,inspector:Xo}),rs=ts?.model,is=In(()=>rs?e=>rs(e,Gl(e),os()):Gl,[rs,Gl,so]),ls=ts?.measure,ss=ls?(e,n)=>ls(e,n,os()):void 0,ds=ts?.canDrop,cs=ds?(e,n)=>ds(e,n,El,os()):El,as=ts?.drop,ps=as?(e,n)=>as(e,n,Dl,os()):Dl,us=ts?.pick,fs=us?e=>us(e,ns,os()):ns,hs=e=>{const n=xn(e),t=yi(n);t&&vi(t.node,t.slot,!1),Gi(n,e.index)},ms=(e,n)=>/* @__PURE__ */Un(Ee,{...ut?{}:Ul.seam({place:{...zn(e),index:n}})},`seam:${e}:${n}`),gs={rowClick:Ki,isCollapsed:Br,toggleCollapse:Ir},ys=e=>{const n=String(e.props.id),t=_r.findIndex(e=>String(e.props.id)===n),o=Pt(n),r=hi(o),i=Br(n),l=di(e.type),s=sr.rowName?sr.rowName(e,"section",l):l,d=e=>ms(o,e);/* @__PURE__ */
11
- return Gn(Yn,{children:[
12
- /* @__PURE__ */Un(Me,{words:Rt,icon:/* @__PURE__ */Un(cr,{type:e.type,size:13}),name:s,preview:qi(e),marks:_i(e),onSelect:()=>Hi(t),nameSlot:Bi(Se,t,n,s),selected:Fo===n,badge:Cl,actions:el(e,Se,t)??void 0,rowProps:{"data-node-id":n,onClick:Ki(()=>Hi(t))},fold:{open:!i,label:"section",onToggle:()=>Ir(n)}}),!i&&/* @__PURE__ */Gn(Te,{children:[r.map((n,t)=>{const r=String(n.props.id),i=pi(n),l=ul(n),s=l&&Br(r),c=()=>hl(o,t,r,e.type),{rowProps:a,...p}=Ul.row({item:{id:r,zone:o,index:t,type:n.type},place:{...zn(o),index:t}},{"data-node-id":r,onClick:Ki(c)});/* @__PURE__ */
13
- return Gn(Tn,{children:[d(t),
14
- /* @__PURE__ */Un(Me,{words:Rt,icon:/* @__PURE__ */Un(cr,{type:n.type,size:13}),name:i,preview:qi(n),marks:_i(n),onSelect:c,nameSlot:Bi(o,t,r,i),selected:Fo===r,hidden:Boolean(n.props._hidden),...p,fold:l?{open:!s,label:"section",onToggle:()=>Ir(r)}:void 0,actions:/* @__PURE__ */Gn(Yn,{children:[Qi(o,t,i),el(n,o,t),nl(o,t,n,i)]}),rowProps:a}),l&&!s&&/* @__PURE__ */Un(Te,{children:vs(n,2)})]},r)}),d(r.length)]})]})},Ss=(e,n,t,o,r)=>{const i=String(e.props.id),l=`${i}:${n.slot}`,s=Ul.dragging,d=!Br(l)&&s?.rung?.nodeId!==i,c={...zn(l),index:0},a=s&&!s.rung&&El(s,c)?c:void 0,p=()=>vi(e,n,!0),{rowProps:u,...f}=Ul.row({item:{id:`rung:${l}`,zone:`${i}:${et}`,index:t,type:e.type,rung:{nodeId:i,slot:n.slot}},place:{parentId:i,slot:et,index:t},into:a,canDrag:Boolean(er.moveSlot)&&!1!==n.movable&&o>1},{"data-slot-zone":l,onClick:Ki(p)}),h=ut?null:er.slotActions?.(e,n.slot);/* @__PURE__ */
15
- return Gn(Tn,{children:[n.heading,
16
- /* @__PURE__ */Un(Me,{words:Rt,icon:n.glyph??null,name:n.label,badge:n.badge,onSelect:p,selected:Si===l,...f,dragHint:n.dragHint,fold:{open:d,label:n.label,onToggle:()=>Ir(l)},actions:h&&h.length>0?/* @__PURE__ */Un(Yn,{children:h.map((t,o)=>/* @__PURE__ */Un(Le,{kind:"delete"===t.kind?"delete":"plain",label:t.label,disabled:t.disabled,onClick:()=>((e,n,t)=>{if(ut||t.disabled)return;const o=String(e.props.id),r=e=>{"string"==typeof e&&bi(o,e,n.panel)},i=t.run();i&&"function"==typeof i.then?i.then(r):r(i)})(e,n,t),children:"delete"===t.kind?/* @__PURE__ */Un(Fn,{size:15}):/* @__PURE__ */Un(Jn,{size:15})},`${o}:${t.kind}`))}):void 0,rowProps:u}),d&&/* @__PURE__ */Un(Te,{children:r})]},l)},ks=(e,n)=>{const t=ll(e),o=t.filter(e=>e.rung).length;let r=0;/* @__PURE__ */
17
- return Un(Yn,{children:t.map(t=>{const i=t.kids,l=t.rung?n+1:n,s=cl(e.type,void 0,t.slot),d=s?`${e.props.id}:${s.slot}`:null,c=null===t.slot?null:`${e.props.id}:${t.slot}`,a=(e,n)=>ms(e,n),p=/* @__PURE__ */Gn(Yn,{children:[i.map(({child:n,zone:t,index:o})=>{const r=Fo===String(n.props.id),{collapsible:i,folded:s}=al(n,l,fl(n.type)),d=String(n.props.id),c=$l(n),p=()=>hl(t,o,d,e.type),{rowProps:u,...f}=Ul.row({item:{id:d,zone:t,index:o,type:n.type},place:{...zn(t),index:o}},{"data-node-id":d,onClick:Ki(p)});/* @__PURE__ */
18
- return Gn(Tn,{children:[0===o&&a(t,0),
19
- /* @__PURE__ */Un(Me,{words:Rt,icon:/* @__PURE__ */Un(cr,{type:n.type,size:13}),name:c,preview:qi(n),marks:_i(n),onSelect:p,nameSlot:Bi(t,o,d,c),selected:r,hidden:Boolean(n.props._hidden),...f,fold:i?{open:!s,label:"group",onToggle:()=>Ir(d)}:void 0,actions:/* @__PURE__ */Gn(Yn,{children:[Qi(t,o,c),el(n,t,o),nl(t,o,n,c)]}),rowProps:u}),i&&!s&&/* @__PURE__ */Un(Te,{children:ks(n,l+1)}),a(t,o+1)]},String(n.props.id??`${t}-${o}`))}),null===c?d&&!i.some(e=>e.zone===d)?a(d,0):null:0!==i.length||!t.rung&&d!==c?null:a(c,0)]});return t.rung?Ss(e,t.rung,r++,o,p):/* @__PURE__ */Un(Tn,{children:p},t.slot??"")})})},vs=(e,n)=>{const t=or(kt?.data,e.type,String(e.props.id)),o=ll(e),r=o.filter(e=>e.rung).length;let i=0;/* @__PURE__ */
20
- return Un(Yn,{children:o.map(o=>{const l=o.kids,s=o.rung?n+1:n,d=cl(e.type,t,o.slot),c=d?.spec??null,a=c&&Array.isArray(e.props[c.slot])?e.props[c.slot]:[],p=d&&d.choices?{slot:d.slot,choices:d.choices}:null,u=String(e.props.id),f=c&&!c.fixed?`${u}:${c.slot}`:null,h=p?`${u}:${p.slot}`:null,m=(e,n)=>ms(e,n),g=null===o.slot?null:`${u}:${o.slot}`,y=Boolean(c&&!c.fixed&&(null===g||g===f)),S=/* @__PURE__ */Gn(Yn,{children:[l.map(({child:n,zone:t,index:o})=>{const r=Fo===String(n.props.id),i=Ci(n),l=String(n.props.id),{collapsible:d,folded:c}=al(n,s,fl(n.type)),a=rl(n.type),p=1===a.length?`${l}:${a[0]}`:null,u=p?{...zn(p),index:hi(p).length}:void 0,f=Ul.dragging,h=u&&f&&El(f,u)?u:void 0,g=()=>hl(t,o,l,e.type),{rowProps:y,...S}=Ul.row({item:{id:l,zone:t,index:o,type:n.type},place:{...zn(t),index:o},into:h,canDrag:!nr(n.type)},{"data-node-id":l,onClick:Ki(g)});/* @__PURE__ */
21
- return Gn(Tn,{children:[0===o&&m(t,0),
22
- /* @__PURE__ */Un(Me,{words:Rt,icon:/* @__PURE__ */Un(cr,{type:n.type,size:13}),name:i,preview:qi(n),marks:_i(n),onSelect:g,nameSlot:Bi(t,o,l,i),selected:r,hidden:Boolean(n.props._hidden),...S,fold:d?{open:!c,label:"group",onToggle:()=>Ir(l)}:void 0,actions:nr(n.type)?el(n,t,o)??void 0:/* @__PURE__ */Gn(Yn,{children:[Qi(t,o,i),el(n,t,o),nl(t,o,n,i)]}),rowProps:y}),d&&!c&&/* @__PURE__ */Un(Te,{children:vs(n,s+1)}),m(t,o+1)]},String(n.props.id??`${t}-${o}`))}),y&&c&&
23
- /* @__PURE__ */Un(w,{small:!0,label:c.addLabel,blocked:c.addBlocked?.(a)??null,onAdd:()=>ml(e.props.id,c.slot,c.childType,a.length,e.type)}),null===g?h&&!l.some(e=>e.zone===h)?m(h,0):null:0!==l.length||(o.rung?y:g!==h)?null:m(g,0)]});return o.rung?Ss(e,o.rung,i++,r,S):/* @__PURE__ */Un(Tn,{children:S},o.slot??"")})})},bs=Po||null!==uo,ws=e=>"panel"in e?{id:e.id,label:e.label,icon:e.icon,active:eo&&!bs&&_o===e.id,onSelect:()=>Kr(e.id)}:e,xs=[...(Qo.railLead??[]).map(ws),{id:"sections",label:Et.layers,icon:/* @__PURE__ */Un(Ve,{}),active:eo&&!bs&&"sections"===_o,onSelect:()=>Kr("sections")},...(Qo.railTrail??[]).map(ws)];po?xs.push({id:"media",label:Et.railMedia,icon:/* @__PURE__ */Un(He,{}),active:eo&&!Po&&(null!==uo||"media"===_o),onSelect:()=>Kr("media")}):gt&&xs.push({id:"media",label:Et.railMedia,icon:/* @__PURE__ */Un(He,{}),onSelect:Xr});const zs=[...Qo.railLead??[],...Qo.railTrail??[]].find(e=>"panel"in e&&e.id===_o),Cs=Boolean(Lt?.foldable)&&!qo,Os=Lt?.label??(yt?Et.pageSections:Et.templateSections),Bs=Cs&&Br(nt),Is=/* @__PURE__ */Gn(Yn,{children:[_r.map((e,n)=>{if(Tt(e)||jt(e)||Nt(e.type))return null;const t=Fo===String(e.props.id),o=Boolean(e.props._hidden);il(e);const r=String(e.props.id),i=Qo.hasOwnRows?.(e)??!1,l=ul(e)||i,s=l&&Br(r),d=rl(e.type),c=1===d.length?`${r}:${d[0]}`:null,a=c?{...zn(c),index:hi(c).length}:void 0,p=Ul.dragging,u=a&&p&&El(p,a)?a:void 0,{rowProps:f,...h}=Ul.row({item:{id:r,zone:Se,index:n,type:e.type},place:{...zn(Se),index:n},into:u},{"data-node-id":r,onClick:Ki(()=>Hi(n))});/* @__PURE__ */
24
- return Gn(Tn,{children:[n>0&&tl(n),
25
- /* @__PURE__ */Un(Me,{words:Rt,icon:/* @__PURE__ */Un(cr,{type:e.type,size:13}),name:pi(e),preview:qi(e),marks:_i(e),onSelect:()=>Hi(n),nameSlot:Bi(Se,n,r,pi(e)),selected:t,hidden:o,...h,fold:l?{open:!s,label:"section",onToggle:()=>Ir(r)}:void 0,actions:/* @__PURE__ */Gn(Yn,{children:[Qi(Se,n,pi(e)),el(e,Se,n),nl(Se,n,e,pi(e))]}),rowProps:f}),ul(e)&&!s&&/* @__PURE__ */Gn(Te,{children:[vs(e,1),Qo.partRows?.(e,gs)]}),i&&!s&&/* @__PURE__ */Un(Te,{children:Qo.ownRows?.(e,n,gs)})]},String(e.props.id??n))}),!qo&&Il>0&&tl(Il)]}),Ns=(e,n,t)=>{const o=String(e.props.id),r=sl(e).length>0||dl(e)||Boolean(ir(e.type)),i=r&&Br(o),l="header"===t?Et.header:Et.footer,s=sr.rowName?sr.rowName(e,"section",l):l;/* @__PURE__ */
26
- return Gn(Yn,{children:[
27
- /* @__PURE__ */Un(Me,{words:Rt,icon:/* @__PURE__ */Un(cr,{type:t,size:13}),name:s,preview:qi(e),marks:_i(e),badge:Cl,onSelect:()=>Hi(n),nameSlot:Bi(Se,n,o,s),selected:Fo===String(e.props.id),fold:r?{open:!i,label:"section",onToggle:()=>Ir(o)}:void 0,actions:el(e,Se,n)??void 0,rowProps:{"data-node-id":o,onClick:Ki(()=>Hi(n))}}),r&&!i&&/* @__PURE__ */Un(Te,{children:ks(e,1)})]})};return(Qo.wrap??(e=>e))(
28
- /* @__PURE__ */Un(Z,{target:xo,children:/* @__PURE__ */Gn("div",{ref:wo,className:"sf-editor es-editor",style:Qe(wr),onContextMenu:Ti.onEditorContextMenu,...m(fn),children:[
29
- /* @__PURE__ */Gn(Fe,{children:[
30
- /* @__PURE__ */Un(We,{items:xs,ariaLabel:Et.bar.views}),
31
- /* @__PURE__ */Gn(De,{children:[
32
- /* @__PURE__ */Un(Je,{label:Et.bar.undo,disabled:Boolean(ut)||!bt.hasPast,onClick:()=>bt.back(),children:/* @__PURE__ */Un(En,{})}),
33
- /* @__PURE__ */Un(Je,{label:Et.bar.redo,disabled:Boolean(ut)||!bt.hasFuture,onClick:()=>bt.forward(),children:/* @__PURE__ */Un(Rn,{})}),
34
- /* @__PURE__ */Un(Ue,{}),
35
- /* @__PURE__ */Un(Ge,{devices:to,value:so,onChange:co}),
36
- /* @__PURE__ */Un(Je,{label:Et.bar.refresh,tip:Et.bar.refreshTip,onClick:()=>{bo.current=(()=>{const e=xo?.document;if(!e)return null;const n=_r.findIndex(jt),t=n>=0?n:_r.length;let o=null;for(let n=0;n<t;n++){const t=_r[n]?.props?.id;if(null==t)continue;const r=e.querySelector(`[data-puck-component="${CSS.escape(String(t))}"]`);if(!r)continue;const i=r.getBoundingClientRect().top;i<=4&&(null===o||i>o.offset)&&(o={id:String(t),offset:i})}if(!o){const e=wt?.props?.id??_r[0]?.props?.id;null!=e&&(o={id:String(e),offset:0})}return o})(),vo(e=>e+1)},children:/* @__PURE__ */Un(Vn,{})})]}),
37
- /* @__PURE__ */Gn(De,{kind:"right",style:{minWidth:300},children:[
38
- /* @__PURE__ */Un(l,{input:Io,words:Et.saveStatus}),Qo.barLead?.(),Qo.barTrail?.(),Qo.mainAction||!Qo.barMain?/* @__PURE__ */Un(s,{input:Io,action:Qo.mainAction??{label:Et.done,onPress:()=>{rt(kt.data)}},readOnly:Boolean(ut),saveSwitch:ht,onToggleAutoSave:dt,onSaveNow:No,bar:Et.bar,words:Et.saveStatus}):Qo.barMain()]})]}),
39
- /* @__PURE__ */Un(ee,{}),
40
- /* @__PURE__ */Gn("div",{className:"sf-body",children:[eo?/* @__PURE__ */Gn(Yn,{children:[
41
- /* @__PURE__ */Un("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left","aria-label":Et.leftPanel,children:Po?/* @__PURE__ */Un(x,{at:jo?{label:(e=>{const n=Al(e.zone);if(n)return Et.add.addingTo({name:sr.rowName?Zi(n,!0):di(n.type)});if(e.zone===Se){const n=_r[e.index];return n&&!jt(n)?Et.add.addingBefore({name:Zi(n,!0)}):Et.add.addingAtEnd}const t=Vl(e.zone);return t?Et.add.addingTo({name:t.parentName}):Et.add.addingHere})(jo),onClear:()=>Ao(null)}:void 0,placeBlocks:jo&&jo.zone!==Se?Vl(jo.zone)?.choices:void 0,canTake:jo?e=>{if(!jo)return null;const n={...zn(jo.zone),index:jo.index};if(Fl(e,n))return null;const t=Al(jo.zone);if(t)return Et.add.notInside({name:Zi(t,!0)});if(jo.zone===Se)return Et.add.onlySections;const o=Vl(jo.zone);return o?Et.add.notInside({name:o.parentName}):Et.add.onlySections}:void 0,onPick:jo?e=>{if(!jo)return;const n={...zn(jo.zone),index:jo.index};Fl(e,n)&&(Wl(e,n),Yi())}:void 0,itemFor:e=>({id:`new:${e.kind}:${"template"===e.kind?e.template.id:e.type}`,zone:"",index:-1,type:"template"===e.kind?e.template.node.type:e.type,add:e}),session:Jl,siteWide:Qo.addPanelRow?.(Yi),onClose:Yi,onHide:Yr,readOnly:Boolean(ut)}):uo&&ao?
42
- /* @__PURE__ */Un(O,{panel:ao,pick:uo,onHide:Yr}):zs?zs.panel({onHide:Yr,notify:Mr}):"media"===_o&&ao?/* @__PURE__ */Un(O,{panel:ao,pick:null,onHide:Yr}):/* @__PURE__ */Gn(Yn,{children:[
43
- /* @__PURE__ */Un(z,{icon:/* @__PURE__ */Un(Ve,{}),title:Et.layers,context:Ut,actions:/* @__PURE__ */Gn(Yn,{children:[!ut&&/* @__PURE__ */Un(Ye,{label:Et.add.title,onClick:()=>Ui(null),children:/* @__PURE__ */Un(Hn,{size:15})}),
44
- /* @__PURE__ */Un(Ye,{label:Pl?Et.expandAll:Et.collapseAll,title:0===Nl.length?Et.nothingToFold:void 0,disabled:0===Nl.length,onClick:()=>br(e=>{const n=new Set(Nl);return Pl?new Set([...e].filter(e=>!n.has(e))):/* @__PURE__ */new Set([...e,...Nl])}),children:/* @__PURE__ */Un(Qn,{expand:Pl})})]}),onHide:Yr}),
45
- /* @__PURE__ */Gn(je,{className:"sf-tree sf-scroll",words:Rt,children:[
46
- /* @__PURE__ */Un(Me,{words:Rt,icon:/* @__PURE__ */Un(cr,{type:"page",size:13}),name:Et.pageSettings,onSelect:Qr,selected:!wt&&Ho,rowProps:{onClick:Ki(Qr)}}),Ol&&/* @__PURE__ */Gn(Yn,{children:[!zl&&/* @__PURE__ */Un(Ae,{children:Et.header}),ys(Ol)]}),!qo&&St&&!(zl&&Ol)&&/* @__PURE__ */Gn(Yn,{children:[!zl&&/* @__PURE__ */Un(Ae,{children:Et.header}),!At&&/* @__PURE__ */Un(Me,{words:Rt,icon:/* @__PURE__ */Un(cr,{type:"header",size:13}),name:Et.header,badge:Cl,onSelect:qr,selected:Ro.kind===Mt?.kind,rowProps:{onClick:Ki(qr)}})]}),!qo&&bl&&!(zl&&Ol)&&Ns(bl,vl,"header"),!qo&&!Cs&&/* @__PURE__ */Un(Ae,{children:Os}),Cs?/* @__PURE__ */Gn(Yn,{children:[
47
- /* @__PURE__ */Un(Me,{words:Rt,icon:null,name:Os,fold:{open:!Bs,label:Os,onToggle:()=>Ir(nt)}}),!Bs&&/* @__PURE__ */Un(Te,{children:Is})]}):Is,St&&!zl&&/* @__PURE__ */Un(Ae,{children:Et.footer}),kl&&!(zl&&Bl)&&Ns(kl,Sl,"footer"),!qo&&!kl&&St&&!zl&&/* @__PURE__ */Un(Me,{words:Rt,icon:/* @__PURE__ */Un(cr,{type:"footer",size:13}),name:Et.footer,onSelect:Xi,rowProps:{onClick:Ki(Xi),title:Et.editFooter}}),Bl&&ys(Bl),Qo.treeFoot?.()]})]})}),
48
- /* @__PURE__ */Un(Ze,{side:"left",width:wr.left,min:Xe,max:Ke,defaultWidth:S.left,label:Et.resizeLeftPanel,onResize:Cr})]}):/* @__PURE__ */Un(C,{side:"left",onShow:Yr}),
49
- /* @__PURE__ */Gn("div",{ref:Tr,className:"sf-center sf-scroll","data-sf-canvas-head":Rr?"":void 0,style:{overflowX:Jr?"auto":"hidden",overflowY:"hidden"},children:[Rr&&/* @__PURE__ */Un("div",{ref:Vr,className:"sf-canvas-head",children:/* @__PURE__ */Un(Rr,{device:so})}),
50
- /* @__PURE__ */Gn("div",{className:"sf-frame-scaler",style:Ur,children:[
51
- /* @__PURE__ */Un("div",{className:"sf-frame "+(so===io?"":`sf-frame--${so}`),style:Gr,children:/* @__PURE__ */Gn("div",{className:"sf-preview-host",children:[
52
- /* @__PURE__ */Un(Ie.Provider,{value:xl,children:/* @__PURE__ */Un(Gt,{},ko)}),
53
- /* @__PURE__ */Un(ln,{canvas:xo,session:Jl,model:is,measure:ss,canDrop:cs,onDrop:ps,choose:Zl,onPick:fs,onZoneAdd:hs,onSeamAdd:hs,zoneAddLabel:Et.canvasAddBlock,words:Vt.canvas,readOnly:Boolean(ut),revision:kt.data}),Lo.length>0&&!zo&&/* @__PURE__ */Un("div",{className:"sf-preview-gaps",children:Lo.map(e=>
54
- /* @__PURE__ */Un(sn,{index:e.index,label:Et.addSectionHere,onInsert:()=>Ui(e.index),className:void 0===e.height?"sf-preview-gap":"sf-preview-gap sf-preview-gap--tight",style:void 0===e.height?{top:e.top}:{top:e.top,height:e.height}},e.index))})]})}),wl?/* @__PURE__ */Un(Xn,{canvas:xo,tabs:ql,onSelect:e=>{const n=_r.findIndex(n=>String(n.props.id)===e);n>=0&&Hi(n)}}):null]})]}),no?/* @__PURE__ */Gn(Yn,{children:[
55
- /* @__PURE__ */Un(g,{value:{selectChild:hl,addChild:ml,childRowName:Ci,blockRowName:$l},children:/* @__PURE__ */Un(Yt,{mode:Ro,onOpenWebsiteSettings:Qo.openSettings??(()=>{}),onOpenSiteStyles:Qo.openStyles,onSelectNode:fr,onNotify:Mr,onHidePanel:Zr,nodeActions:wt?ke(zt,wt.type):tt})}),
56
- /* @__PURE__ */Un(Ze,{side:"right",width:wr.right,min:Xe,max:Ke,defaultWidth:S.right,label:Et.resizeSettingsPanel,onResize:Or})]}):
57
- /* @__PURE__ */Un(C,{side:"right",onShow:Zr})]}),Ti.menu]})}))}export{ot as ScreenChrome};
@@ -1,21 +0,0 @@
1
- import{fieldIsShown as e,shownFields as n}from"./chunk-BPXEFVSQ.js";import{TreeSeam as t}from"./chunk-4JSBIW5H.js";import{DEFAULT_TREE_WORDS as l}from"./chunk-K56YDHYQ.js";import{EaselMenuItems as a}from"./chunk-EA2HTX37.js";import{SETTINGS_BUCKETS as r,SettingsGroup as o}from"./chunk-RC25EGHD.js";import{DEFAULT_PANEL_WORDS as i}from"./chunk-KFV7N2DJ.js";import{FieldNumber as s}from"./chunk-2XMHLXMA.js";import{FieldSelect as c}from"./chunk-G3GWAP5R.js";import{DEFAULT_FIELDS_WORDS as d}from"./chunk-WRFD4EXD.js";import{SettingsField as u,SettingsSegmented as m}from"./chunk-36LVP5WD.js";import{useWords as h}from"./chunk-MFIRYGHW.js";import{useTreeDrag as p,gapToMoveIndex as f}from"./chunk-67GNT6PF.js";import{withTip as b}from"./chunk-P2VEMZH5.js";import{Textarea as g,Input as v,SortableList as y,ListRow as k,ContextMenu as x,tabPanelId as w,Tabs as C,tabButtonId as N}from"efficient-shell/ui";export{LinkPicker}from"efficient-shell/ui";import{useRef as O,useState as j,useLayoutEffect as $,useId as D}from"react";import{jsx as S,jsxs as I}from"react/jsx-runtime";import{ChevronIcon as P,LockIcon as L,MoveUpIcon as F,MoveDownIcon as E,DuplicateIcon as M,TrashIcon as R}from"efficient-shell/icons/efficient";function T({id:e,value:n,onChange:t,placeholder:l,multiline:a=!1,rows:r=3,readOnly:o=!1,ariaLabel:i,ariaLabelledBy:s}){const c=n??"";return a?/* @__PURE__ */S(g,{id:e,size:"sm",className:"es-fin",value:c,rows:r,placeholder:l,readOnly:o,"aria-label":i,"aria-labelledby":s,onChange:e=>t(e.target.value)}):/* @__PURE__ */S(v,{id:e,size:"sm",className:"es-fin",type:"text",value:c,placeholder:l,readOnly:o,"aria-label":i,"aria-labelledby":s,onChange:e=>t(e.target.value)})}function W(e,n,t){const l=e.slice();return l.splice(Math.max(0,Math.min(n,l.length)),0,t),l}function A(e,n,t){const l=e.slice(),[a]=l.splice(n,1);return l.splice(Math.max(0,Math.min(t,l.length)),0,a),l}function H(e,n){return e.filter((e,t)=>t!==n)}function z(e){return null===e||"object"!=typeof e?e:JSON.parse(JSON.stringify(e))}var B='input, textarea, select, button, [contenteditable]:not([contenteditable="false"]), [tabindex]',X={parentId:"list",slot:"items"};function G({label:e,icon:n,noun:r,items:o,onChange:i,newItem:s,summary:c,itemName:u,thumb:m,min:g=0,max:v,readOnly:w=!1,open:C,onOpen:N,renderItem:D,renderRow:T,canRemove:G,lockedReason:K,fixed:V=!1,removeOnRow:J=!0,canDuplicate:Y,above:q,head:Q=!0}){const Z=h("fields",d).list,U=h("tree",l),_=r??Z.item,ee=!w&&!V&&("number"!=typeof v||o.length<v),ne=o.length<=g,te=e=>!!G&&!G(o[e],e),le=e=>!w&&!V&&J&&!ne&&!te(e),ae=e=>ee&&(!Y||Y(o[e],e)),re=(e,n)=>u?u(e,n):Z.itemName({noun:_,n:n+1}),oe=O([]),ie=O(null),[se,ce]=j(null),de=O(null),[ue,me]=j(null),[he,pe]=j("");$(()=>{const e=ie.current;if(!e)return;ie.current=null;const n=oe.current[e.index]?.querySelectorAll(B)[e.nth]??oe.current[e.index];if(n?.focus(),n&&null!==e.start&&"setSelectionRange"in n)try{n.setSelectionRange(e.start,e.end)}catch{}});const fe=(e,n)=>{if(n<0||n>=o.length||n===e)return;const t=oe.current[e],l=t?.ownerDocument.activeElement;if(t&&l&&t.contains(l)){const e=[...t.querySelectorAll(B)].indexOf(l),a=l;ie.current={index:n,nth:e,start:"number"==typeof a.selectionStart?a.selectionStart:null,end:"number"==typeof a.selectionEnd?a.selectionEnd:null}}i(A(o,e,n));const a=function(e,n,t){return null===e?null:e===n?t:n<e&&t>=e?e-1:n>e&&t<=e?e+1:e}(C,e,n);a!==C&&N(a),pe(Z.moved({n:n+1,total:o.length}))},be=e=>{ee&&(i(W(o,e,s())),T?(ie.current={index:e,nth:0,start:null,end:null},null!==C&&C>=e&&N(C+1)):N(e))},ge=e=>{le(e)&&(i(H(o,e)),C===e?N(null):null!==C&&C>e&&N(C-1))},ve=p({keyOf:e=>String(e),canDrop:(e,n)=>n.parentId===X.parentId&&n.slot===X.slot,onDrop:(e,n)=>{const t=f({...X,index:e},n);t!==e&&fe(e,t)},onStep:(e,n)=>fe(e,e+n),canStep:(e,n)=>e+n>=0&&e+n<o.length,readOnly:w}),ye=e=>{const n=[];return e>0&&n.push({label:Z.moveUp,icon:/* @__PURE__ */S(F,{size:14}),shortcut:"⌥↑",onClick:()=>fe(e,e-1)}),e<o.length-1&&n.push({label:Z.moveDown,icon:/* @__PURE__ */S(E,{size:14}),shortcut:"⌥↓",onClick:()=>fe(e,e+1)}),ae(e)&&n.push({label:Z.duplicate,icon:/* @__PURE__ */S(M,{size:14}),onClick:()=>(e=>{ae(e)&&(i(W(o,e+1,z(o[e]))),null!==C&&C>e&&N(C+1))})(e)}),le(e)&&n.push({label:Z.delete,icon:/* @__PURE__ */S(R,{size:14}),danger:!0,onClick:()=>ge(e)}),n},ke=(e,n,t,l)=>{w||0===ye(e).length||me({index:e,x:n,y:t,owner:l})},xe=e=>n=>{const t=o.slice();t[e]=n,i(t)};/* @__PURE__ */
2
- return I("div",{className:"es-list",children:[Q?/* @__PURE__ */I("div",{className:"es-list-head",children:[
3
- /* @__PURE__ */I("span",{className:"es-list-label",children:[n?/* @__PURE__ */S("span",{className:"es-field-icon","aria-hidden":"true",children:n}):null,e]}),
4
- /* @__PURE__ */S("span",{className:"es-list-count",children:o.length})]}):null,q?/* @__PURE__ */S("div",{className:"es-list-above",children:q}):null,o.length?/* @__PURE__ */I(y,{"aria-label":e,spacing:"comfortable",className:"es-list-rows",rootProps:ve.rootProps(),children:[o.map((e,n)=>{const l=ve.row({item:n,place:{...X,index:n}}),a=l.draggable&&se!==n,r=!T&&C===n,o=!w&&!V&&J&&te(n),i=["es-list-row",T?"is-inline":"is-item",r?"is-open":"",a?"is-draggable":"",l.dragging?"is-dragging":"",l.drop?`is-drop-${l.drop}`:""].filter(Boolean).join(" ");return[n>0?/* @__PURE__ */S(t,{...ve.seam({place:{...X,index:n}}),onAdd:ee?()=>be(n):void 0,label:Z.addHere({noun:_})},`seam-${n}`):null,
5
- /* @__PURE__ */S(k,{className:i,flat:!!T,active:r,draggable:l.draggable,dragHint:U.dragHint,dragging:l.dragging,drop:"before"===l.drop||"after"===l.drop?l.drop:void 0,onMove:l.draggable?e=>fe(n,"up"===e?n-1:n+1):void 0,rowRef:e=>{oe.current[n]=e},rowProps:{...l.rowProps,draggable:a||void 0,onPointerDown:e=>{const t=e.target.closest?.('input, textarea, select, [contenteditable]:not([contenteditable="false"])'),a=!!t&&t===t.ownerDocument.activeElement;e.currentTarget.draggable=l.draggable&&!a,de.current=t&&!a?t:null,ce(a?n:null)},onDragStart:e=>{const n=de.current;de.current=null,n&&n.ownerDocument.activeElement===n&&n.blur(),l.rowProps.onDragStart?.(e)},onContextMenu:e=>{w||(e.preventDefault(),e.stopPropagation(),ke(n,e.clientX,e.clientY,e.currentTarget))},onKeyDown:e=>{if("ContextMenu"===e.key||e.shiftKey&&"F10"===e.key){e.preventDefault();const t=e.currentTarget.ownerDocument,l=e=>e.preventDefault();t.addEventListener("contextmenu",l,{capture:!0,once:!0}),t.defaultView?.setTimeout(()=>t.removeEventListener("contextmenu",l,{capture:!0}),500);const a=e.currentTarget.getBoundingClientRect();return void ke(n,a.left+24,a.bottom,e.currentTarget)}l.rowProps.onKeyDown?.(e)}},actions:w||V||!J?void 0:o?b(K?K(e,n):Z.locked,/* @__PURE__ */S("span",{className:"es-list-lock",role:"img","aria-label":K?K(e,n):Z.locked,children:/* @__PURE__ */S(L,{size:13})})):b(Z.deleteItem({noun:_}),/* @__PURE__ */S("button",{type:"button",className:"es-list-x","aria-label":Z.deleteItem({noun:_}),disabled:!le(n),onClick:()=>ge(n),children:"×"})),below:r?/* @__PURE__ */S("div",{className:"es-list-item",children:D(e,n,xe(n))}):void 0,children:T?/* @__PURE__ */S("div",{className:"es-list-row-main",children:T(e,n,xe(n))}):/* @__PURE__ */I("button",{type:"button",className:"es-list-open","aria-expanded":r,onClick:()=>N(r?null:n),children:[m?/* @__PURE__ */S("span",{className:"es-list-thumb","aria-hidden":"true",children:m(e,n)}):null,
6
- /* @__PURE__ */S("span",{className:"es-list-row-name",children:re(e,n)}),/* @__PURE__ */S("span",c?{className:"es-list-row-summary",children:c(e,n)}:{className:"es-list-row-summary"}),
7
- /* @__PURE__ */S(P,{size:14,className:"es-list-chev","aria-hidden":"true"})]})},n)]}),
8
- /* @__PURE__ */S(t,{...ve.seam({place:{...X,index:o.length}})})]}):null,w||V?null:/* @__PURE__ */S("button",{type:"button",className:"es-list-add",disabled:!ee,onClick:()=>be(o.length),children:Z.add({noun:_})}),
9
- /* @__PURE__ */S("span",{className:"es-list-said","aria-live":"polite",children:he}),ue&&ue.index<o.length?
10
- /* @__PURE__ */S(x,{at:{x:ue.x,y:ue.y},owner:ue.owner,onClose:()=>me(null),children:/* @__PURE__ */S(a,{items:ye(ue.index),onClose:()=>me(null)})}):null]})}var K=e=>e<6?e+1:6,V=(e,n)=>"string"==typeof e.label&&e.label?e.label:n;function J({field:e,name:t,id:l,value:a,onChange:r,readOnly:i,context:s,showWhenContext:c,renderers:d,headingLevel:u=3}){const[m,h]=j(!0),p=a&&"object"==typeof a?a:{};/* @__PURE__ */
11
- return S(o,{id:`${l}-group`,title:V(e,t),open:m,onToggle:h,level:u,children:Object.entries(n(e.objectFields,{values:p,context:c})).map(([e,n])=>/* @__PURE__ */S(q,{field:n,name:`${t}.${e}`,id:`${l}-${e}`,value:p[e],onChange:n=>r({...p,[e]:n}),readOnly:i,context:s,showWhenContext:c,renderers:d,headingLevel:K(u)},e))})}function Y({field:e,name:t,id:l,value:a,onChange:r,readOnly:o,context:i,showWhenContext:s,renderers:c,openItem:d,onOpenItem:u,headingLevel:m}){const[h,p]=j(null),f=u?d??null:h,b=u??p,g=Array.isArray(a)?a:[],v=e.getItemSummary;/* @__PURE__ */
12
- return S(G,{label:V(e,t),icon:e.icon,noun:"string"==typeof e.noun?e.noun:void 0,items:g,onChange:r,newItem:()=>z({...e.defaultItemProps??{}}),summary:v?(e,n)=>v(e,n):void 0,min:e.min,max:e.max,readOnly:o,open:f,onOpen:b,renderItem:(a,r,d)=>Object.entries(n(e.arrayFields,{values:a,context:s})).map(([e,n])=>/* @__PURE__ */S(q,{field:n,name:`${t}[${r}].${e}`,id:`${l}-${r}-${e}`,value:a?.[e],onChange:n=>d({...a,[e]:n}),readOnly:o,context:i,showWhenContext:s,renderers:c,headingLevel:m},e))})}function q(e){const{field:n,name:t,id:l,value:a,onChange:r,readOnly:o,context:i,renderers:d}=e;if(!n||n.marker||!1===n.visible)return null;const h=d?.[n.type];if(h)return h({field:n,name:t,id:l,value:a,onChange:r,readOnly:o});switch(n.type){case"custom":{const e={...i,field:n,name:t,id:l,value:a,onChange:r,readOnly:o};return n.render(e)}case"text":case"textarea":/* @__PURE__ */
13
- return S(u,{label:V(n,t),htmlFor:l,icon:n.icon,hint:n.hint,children:/* @__PURE__ */S(T,{id:l,value:"string"==typeof a?a:null==a?"":String(a),onChange:r,placeholder:n.placeholder,multiline:"textarea"===n.type,readOnly:o})});case"number":/* @__PURE__ */
14
- return S(u,{label:V(n,t),htmlFor:l,icon:n.icon,hint:n.hint,children:/* @__PURE__ */S(s,{id:l,value:"number"==typeof a?a:void 0,onChange:r,min:n.min,max:n.max,step:n.step,placeholder:n.placeholder,readOnly:o})});case"select":{const e=`${l}-label`;/* @__PURE__ */
15
- return S(u,{label:V(n,t),labelId:e,htmlFor:l,icon:n.icon,hint:n.hint,children:/* @__PURE__ */S(c,{id:l,value:a,options:n.options,onChange:r,readOnly:o,ariaLabelledBy:e})})}case"radio":/* @__PURE__ */
16
- return S(u,{label:V(n,t),icon:n.icon,hint:n.hint,children:/* @__PURE__ */S(m,{ariaLabel:V(n,t),value:a,options:n.options.map(e=>({id:e.value,label:e.label,icon:e.icon,disabled:e.disabled||o})),onChange:e=>{o||r(e)}})});case"object":/* @__PURE__ */
17
- return S(J,{...e,field:n});case"array":/* @__PURE__ */
18
- return S(Y,{...e,field:n});case"slot":return null}}var Q=e=>r.includes(e);function Z(n,t){let l,a=r[0];const o=[],i=/* @__PURE__ */new Set;for(const[r,s]of Object.entries(n))s&&(Q(s.bucket)&&((s.marker||s.bucket!==a)&&(l=void 0),a=s.bucket),s.marker&&"string"==typeof s.fold?l={key:r,title:s.fold}:s.marker&&!1===s.fold&&(l=void 0),s.marker||!1===s.visible||t&&!e(s,t)||(o.push(l?{name:r,field:s,bucket:a,fold:l}:{name:r,field:s,bucket:a}),"slot"!==s.type&&i.add(a)));return{rows:o,buckets:r.filter(e=>i.has(e))}}function U(e){return new Map(Z(e).rows.map(e=>[e.name,e.bucket]))}function _(e){const n=[];for(const t of e){const e=n[n.length-1];e&&e.fold?.key===t.fold?.key?e.rows.push(t):n.push({fold:t.fold,rows:[t]})}return n}function ee({fields:e,values:n,onChange:t,readOnly:l=!1,context:a,showWhenContext:r,tab:s,onTab:c,tabs:d=!0,tabIcons:u,renderers:m,idPrefix:p,ariaLabel:f,lead:b,children:g,leadFold:v,closedFolds:y,onFold:k,headingLevel:x=3}){const O=h("panel",i),$=D(),P=p??`es-insp${$.replace(/:/g,"")}`,L=Z(e,{values:n,context:r}),[F,E]=j(void 0),M=s??F,R=M&&L.buckets.includes(M)?M:L.buckets[0],[T,W]=j(null),A=T&&T.panel===P&&L.rows.some(e=>e.name===T.name)?T:null,H=d&&L.buckets.length>1,z=H&&R?w(P,R):`${P}-rows`,[B,X]=j(()=>/* @__PURE__ */new Set),G=y??B,V=(e,n)=>{/* @__PURE__ */return S(o,{title:e.title,open:!G.has(e.key),onToggle:n=>((e,n)=>{void 0===y&&X(t=>{const l=new Set(t);return n?l.delete(e):l.add(e),l}),k?.(e,n)})(e.key,n),id:`${P}-fold-${t=e.key,[...t].map(e=>/[A-Za-z0-9_-]/.test(e)?e:`-u${e.codePointAt(0).toString(16)}-`).join("")}`,level:x,children:n});var t},J=e=>H&&e!==R,Y=({name:e,field:o,bucket:i,fold:s})=>/* @__PURE__ */S("div",{className:"es-insp-row","data-field":e,"data-bucket":i,hidden:!!J(i)||void 0,children:/* @__PURE__ */S(q,{field:o,name:e,id:`${P}-${e}`,value:n[e],onChange:n=>t(e,n),readOnly:l,context:a,showWhenContext:r,renderers:m,openItem:A&&A.name===e?A.index:null,onOpenItem:n=>W(null===n?null:{panel:P,name:e,index:n}),headingLevel:s?K(x):x})},e);/* @__PURE__ */
19
- return I("div",{className:"es-insp",children:[H?/* @__PURE__ */S("div",{className:"es-insp-tabs",children:/* @__PURE__ */S(C,{variant:"underline",block:!0,"aria-label":f??O.settings,idPrefix:P,value:R,onChange:e=>{const n=e;void 0===s&&E(n),c?.(n)},items:L.buckets.map(e=>{const n=O.buckets[e],t=u?.[e];return t?{id:e,icon:t,label:/* @__PURE__ */S("span",{className:"sr-only",children:n}),tooltip:n}:{id:e,label:n}})})}):null,
20
- /* @__PURE__ */I("div",{className:"es-insp-rows",id:z,role:H?"tabpanel":void 0,"aria-labelledby":H&&R?N(P,R):void 0,children:[b?v?/* @__PURE__ */S("div",{className:"es-insp-band","data-fold":v.key,children:V(v,b)}):b:null,_(L.rows).map((e,n)=>{if(!e.fold)return e.rows.map(Y);const t=e.rows[0].bucket,l=e.rows.every(e=>"slot"===e.field.type);/* @__PURE__ */
21
- return S("div",{className:"es-insp-band","data-fold":e.fold.key,"data-bucket":t,hidden:!(!J(t)&&!l)||void 0,children:V(e.fold,e.rows.map(Y))},`fold-${e.fold.key}-${n}`)}),g]})]})}export{T as FieldText,ee as Inspector,q as InspectorField,G as ListField,U as bucketsOf,z as copyItem,W as insertAt,V as labelOf,A as moveTo,Z as planFields,H as removeAt};
@@ -1 +0,0 @@
1
- import{useEaselSession as e}from"./chunk-O7Q4DDJT.js";import{useHostEscape as n}from"./chunk-U3JP4VGF.js";import{styleMenuItems as t}from"./chunk-V7U33NF2.js";import{createNodeClipboard as o,nodeMenuItems as l}from"./chunk-OSPUG6S6.js";import{DEFAULT_NODE_MENU_WORDS as r}from"./chunk-WK3AFPXY.js";import{DEFAULT_SCREEN_WORDS as i}from"./chunk-VVPZMWJE.js";import{ROOT_ZONE as c}from"./chunk-PLVEGYK6.js";import{EaselMenuItems as s,menuLabel as a}from"./chunk-EA2HTX37.js";import{isTypingTarget as u,useCanvasEvent as d,framePointToHost as p}from"./chunk-X4T6JT3M.js";import{zoneKey as f,ROOT_SLOT as m,ROOT_ID as h}from"./chunk-KRXQM65X.js";import{useState as y,useCallback as k,useRef as b,useEffect as v}from"react";import{ContextMenu as g}from"efficient-shell/ui";import{UndoIcon as w,RedoIcon as x,PasteIcon as C,SettingsIcon as z,LayersIcon as P,CopyIcon as O}from"efficient-shell/icons/efficient";import{jsx as A}from"react/jsx-runtime";function D(e,n){const t=[],o=/* @__PURE__ */new Set;let l={zone:n.zone,index:n.index};for(;l;){const n=e.nodeAt(l.zone,l.index);if(!n||o.has(n.props.id))break;if(o.add(n.props.id),t.push({zone:l.zone,index:l.index,node:n,parentType:null}),l.zone===c)break;const r=l.zone.lastIndexOf(":");if(r<=0)break;l=e.locate(l.zone.slice(0,r))}for(let e=0;e<t.length-1;e+=1)t[e].parentType=t[e+1].node.type;return t}var K=o(),M=/* @__PURE__ */new WeakMap;function T(e){if(e.claimsPage)return K;const n=e.registry;if(!n)return e.cache("easel:node-clipboard",o);let t=M.get(n);return t||(t=o(),M.set(n,t)),t}function j(){return T(e())}function S(e,n,t){if(n===c){const{floor:n,cap:o}=e.sectionBand();return{parentId:h,slot:m,index:Math.min(Math.max(t,n),o)}}const o=n.lastIndexOf(":");return{parentId:n.slice(0,o),slot:n.slice(o+1),index:t}}function X(e,n,t){const o=e.isPinned(n,t),l=!o&&!e.isLocked(n)&&!e.duplicateBlocked(n),r=e.permits?.(n)??{duplicate:!0,delete:!0};return{copy:!o&&r.duplicate,cut:l&&r.duplicate&&r.delete,delete:l&&r.delete}}function E(e,n,t){const o=e.canPasteAt;if(!o)return f(n.from)===t.zone?S(e,t.zone,t.index+1):null;for(const l of D(e,t)){const t=S(e,l.zone,l.index+1);if(o(n,t))return t}return null}function V(e){if(e.defaultPrevented||e.altKey||e.shiftKey)return null;if(u(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;if(!e.metaKey&&!e.ctrlKey)return"Delete"===e.key?"delete":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 L(e,n,t,o){const l=e.nodeAt(t.zone,t.index);if(!l)return null;const r=l.props.id,i=e.labelOf(l.type,t.zone),c=X(e,l,t.zone);if("copy"===n)return c.copy?(e.nodeOps.copy(r,i),{done:"copied",name:i}):null;if(o.readOnly)return null;if("cut"===n)return c.cut?(e.nodeOps.cut(r,i),{done:"cut",name:i}):null;if("delete"===n)return c.delete?(e.nodeOps.remove(r),{done:"deleted",name:i}):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 R(e,n){const{zone:o,index:r}=n,i=e.nodeAt(o,r);if(!i)return[];const s=i.props.id,a=e.labelOf(i.type,o),u=Boolean(i.props._hidden),d=e.nodeOps,p=e.isPinned(i,o),f=e.isLocked(i),m=!p&&!f&&!e.duplicateBlocked(i),h=e.permits?.(i)??{duplicate:!0,delete:!0},y=X(e,i,o),k=D(e,n),b=d.held,v=b&&!p?E(e,b,n):null,g=!e.readOnly,w=e.style?t({held:g?e.style.held():null,canCopy:e.style.canCopy(i,o),onCopy:()=>e.style?.copy(i,o),onPaste:()=>e.style?.paste(o,r,i),words:e.words?.styleClipboard}):[];return l({title:a,words:e.words?.menu,layer:{group:"pick",items:k.flatMap((n,t)=>{const o={label:e.rowNameOf(n.node,n.zone),checked:0===t,onClick:()=>e.selectAt(n.zone,n.index,n.node.props.id,n.parentType)},l=n.zone===c?null:e.slotRung?.(n.zone)??null;return l?[o,{label:l.label,checked:!1,onClick:l.select}]:[o]})},actions:{duplicate:g&&m&&h.duplicate?()=>d.duplicate(s):void 0,moveUp:g&&d.canStep(s,-1)?()=>d.step(s,-1):void 0,moveDown:g&&d.canStep(s,1)?()=>d.step(s,1):void 0,copy:y.copy?()=>d.copy(s,a):void 0,cut:g&&y.cut?()=>d.cut(s,a):void 0,paste:g&&b&&v?{label:b.label,run:()=>d.paste(v)}:void 0,rename:g&&e.renamePropOf(i,o)?()=>e.beginRename(o,r):void 0,hide:!g||f||p?void 0:{hidden:u,run:()=>d.setProps(s,{_hidden:!u})},delete:g&&m&&h.delete?()=>d.remove(s):void 0},style:w,extras:e.menuRows?.(i,o,r)??void 0,pinnedLine:p?I(e).pinned:void 0})}var I=e=>e.words?.screen??i.menu;function U(e){const n=I(e),t=!e.readOnly,o=[];t&&e.history.hasPast&&o.push({label:n.undo,icon:/* @__PURE__ */A(w,{}),shortcut:"⌘Z",onClick:e.history.back}),t&&e.history.hasFuture&&o.push({label:n.redo,icon:/* @__PURE__ */A(x,{}),shortcut:"⇧⌘Z",onClick:e.history.forward});const l=[],s=e.nodeOps.held,a=S(e,c,e.sectionBand().cap);if(t&&s&&(e.canPasteAt?e.canPasteAt(s,a):f(s.from)===c)){const n=a,t=e.words?.menu??r;l.push({label:t.pasteNamed({paste:t.paste,label:s.label}),icon:/* @__PURE__ */A(C,{}),shortcut:"⌘V",onClick:()=>e.nodeOps.paste(n)})}const u=[o,l,[{label:e.pageSettingsLabel??i.pageSettings,icon:/* @__PURE__ */A(z,{}),onClick:e.openPageSettings},{label:n.collapseAll,icon:/* @__PURE__ */A(P,{}),onClick:e.collapseAll}]].filter(e=>e.length>0),d={label:"—",onClick:()=>{}};return u.flatMap((e,n)=>n?[d,...e]:e)}function Y(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}))},c=e.words?.menu??r,s=I(e),a=[];l&&(a.push({label:c.copy,icon:/* @__PURE__ */A(O,{}),shortcut:"⌘C",onClick:()=>navigator.clipboard?.writeText(l)}),a.push({label:c.cut,icon:/* @__PURE__ */A(O,{}),shortcut:"⌘X",onClick:()=>{navigator.clipboard?.writeText(l),i("")}})),a.push({label:c.paste,icon:/* @__PURE__ */A(C,{}),shortcut:"⌘V",onClick:()=>{navigator.clipboard?.readText().then(e=>{e&&i(e)}).catch(()=>e.onPasteRefused())}});const u=[a,n.value?[{label:s.selectAll,shortcut:"⌘A",onClick:()=>{n.focus(),n.select()}}]:[]].filter(e=>e.length>0),d={label:"—",onClick:()=>{}};return u.flatMap((e,n)=>n?[d,...e]:e)}function B(e){return e.shiftKey}function N(e,t){const[o,l]=y(null),r=k(()=>l(null),[]);n(null!==o,r);const i=b(e);i.current=e;const c=k(e=>{const n=i.current,t=n.keys;if(!t)return;const o=V(e);if(!o)return;const l=t.selected();if(!l)return;const r=L(n,o,l,{readOnly:t.readOnly,held:t.held()});r&&(e.preventDefault(),t.onDone?.(r))},[]),s=e.keys?.target??null;v(()=>{if(!s)return;const e=e=>c(e);return s.addEventListener("keydown",e),()=>s.removeEventListener("keydown",e)},[s,c]),d(t,"keydown",c);const a=k(n=>{if(B(n))return;const t=n.target;if(t?.closest?.("[data-slot-zone]"))return n.preventDefault(),void l(null);const o=function(e){const n=e?.closest?.("input, textarea");return n&&("INPUT"!==n.tagName||["text","search","url","email","tel","number",""].includes(n.type))?n:null}(t);if(o)return n.preventDefault(),void l({kind:"input",x:n.clientX,y:n.clientY,el:o,owner:t});const r=t?.closest?.("[data-node-id]")?.getAttribute("data-node-id"),i=r?e.locate(r):null;n.preventDefault(),l(i?{kind:"node",x:n.clientX,y:n.clientY,...i,owner:t}:{kind:"empty",x:n.clientX,y:n.clientY,owner:t})},[e]);d(t,"contextmenu",n=>{if(B(n)||!t)return;const o=n.target?.closest?.("[data-puck-component]")??null,r=o?.getAttribute("data-puck-component"),i=r?e.locate(r):null;n.preventDefault();const c=p(t.frame,n.clientX,n.clientY),s=t.frame;l(i?{kind:"node",...c,...i,owner:s}:{kind:"empty",...c,owner:s})}),d(t,"mousedown",r),d(t,"scroll",r,{on:"window"});return{onEditorContextMenu:a,menu:o?/* @__PURE__ */A(F,{host:e,target:o,onClose:r}):null,closeMenu:r}}function F({host:e,target:n,onClose:t}){const o="node"===n.kind?R(e,n):"input"===n.kind?Y(e,n.el):U(e);return 0===o.length?null:/* @__PURE__ */A(g,{at:{x:n.x,y:n.y},owner:n.owner??null,onClose:t,"aria-label":a(o),children:/* @__PURE__ */A(s,{items:o,onClose:t})})}export{K as EASEL_NODE_CLIPBOARD,D as ancestorChain,T as nodeClipboardOf,X as nodeClipboardRules,R as nodeMenuItems,V as nodeShortcut,U as pageMenuItems,E as pastePlace,L as runNodeShortcut,Y as textMenuItems,j as useNodeClipboard,N as useNodeContextMenu};