efficient-easel 26.15.0 → 26.16.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 (47) hide show
  1. package/dist/{canvas-typing--FlIZwbT.d.ts → canvas-typing-CD1aeYnk.d.ts} +7 -0
  2. package/dist/{chunk-NUJEHA6A.js → chunk-3W2O22DZ.js} +10 -10
  3. package/dist/{chunk-IHOTVWDE.js → chunk-5U6DUZE2.js} +3 -3
  4. package/dist/{chunk-3ZGOVNVH.js → chunk-6DUCOSHW.js} +1 -1
  5. package/dist/{chunk-PG7G7ELT.js → chunk-BFJAEQZ6.js} +1 -1
  6. package/dist/{chunk-YMK3MZJK.js → chunk-JDQSRKJG.js} +1 -1
  7. package/dist/{chunk-WMC6FE3G.js → chunk-LWFE6QDN.js} +11 -11
  8. package/dist/{chunk-3BQT7FC7.js → chunk-MNQDOSAX.js} +2 -2
  9. package/dist/chunk-OGG6FMBA.js +17 -0
  10. package/dist/chunk-RN5AYO53.js +1 -0
  11. package/dist/chunk-RQO3UDKP.js +8 -0
  12. package/dist/{chunk-2EDOL4IW.js → chunk-T5U2UZO6.js} +35 -35
  13. package/dist/chunk-TXNCWF67.js +4 -0
  14. package/dist/{chunk-7U4HEUZM.js → chunk-W2S2VJOQ.js} +1 -1
  15. package/dist/{chunk-5OYP3C2K.js → chunk-XFI3UPB2.js} +1 -1
  16. package/dist/chunk-YTF65TZA.js +5 -0
  17. package/dist/copy/index.d.ts +2 -2
  18. package/dist/copy/index.js +13 -13
  19. package/dist/easel/index.d.ts +1 -1
  20. package/dist/easel/index.js +1 -1
  21. package/dist/fields/index.js +1 -1
  22. package/dist/screen/components/AddBlockRow.js +1 -1
  23. package/dist/screen/components/AddSidePanel.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 +17 -17
  28. package/dist/screen/components/usePartBridge.js +1 -1
  29. package/dist/screen/index.js +1 -1
  30. package/dist/screen/lib/document/block-set-host.js +1 -1
  31. package/dist/screen/lib/document/block-size-fields.js +1 -1
  32. package/dist/screen/lib/document/box-fields.js +1 -1
  33. package/dist/screen/lib/document/button-fields.js +1 -1
  34. package/dist/screen/lib/document/image-fields.js +5 -5
  35. package/dist/screen/lib/document/shadow-fields.js +2 -2
  36. package/dist/screen/lib/document/style-fields.js +1 -1
  37. package/dist/screen/lib/document/use-section-ops.js +1 -1
  38. package/dist/screen/lib/key-scope.js +1 -1
  39. package/dist/screen/lib/screen-parts.js +1 -1
  40. package/dist/strings/index.js +1 -1
  41. package/dist/text-styles/index.js +1 -1
  42. package/package.json +1 -1
  43. package/dist/chunk-K6TDOXHR.js +0 -17
  44. package/dist/chunk-L4DFCNDQ.js +0 -5
  45. package/dist/chunk-M4SOZEZR.js +0 -4
  46. package/dist/chunk-RWGOCHH7.js +0 -1
  47. package/dist/chunk-VVHDUTAE.js +0 -8
@@ -1,2 +1,2 @@
1
- import{DEFAULT_SHADOW_COLOR as o,DEFAULT_SHADOW as n,shadowValue as r,SHADOWS as i}from"../../../chunk-CRITA6CA.js";export{DEFAULT_SHADOW,DEFAULT_SHADOW_COLOR,SHADOWS,shadowValue}from"../../../chunk-CRITA6CA.js";import{styleFieldBuilders as t}from"../../../chunk-M4SOZEZR.js";import"../../../chunk-K6TDOXHR.js";import"../../../chunk-CLAADE4J.js";import{SettingsDefaultReset as s}from"../../../chunk-2T22IY3J.js";import"../../../chunk-BLE3U2GS.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-C4TJN6GR.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-PLTTPHK5.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-NUJEHA6A.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-D4TH4QQR.js";import{DEFAULT_PANEL_WORDS as e}from"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-3BQT7FC7.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import{SettingsField as p}from"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import{useWords as c}from"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";import{ShadowIcon as h}from"efficient-shell/icons/efficient";import{IconPicker as u}from"efficient-shell/ui";import{jsx as l}from"react/jsx-runtime";var m={none:"None",soft:"Soft",lifted:"Lifted"},a={none:"none",soft:"0 1px 1px rgba(20, 20, 22, 0.10), 0 2px 4px -1px rgba(20, 20, 22, 0.14)",lifted:"0 1px 2px rgba(20, 20, 22, 0.10), 0 4px 7px -2px rgba(20, 20, 22, 0.30)"},k={display:"block",flex:"none",boxSizing:"border-box",width:16,height:11};function j({o:o,say:t,props:j}){const d=c("panel",e),f=o.builtIn??n,b=r(j.value),C=b??f,F=t(o.label);/* @__PURE__ */
2
- return l(p,{label:F,icon:o.icon??/* @__PURE__ */l(h,{}),value:t(m[C]),changed:null!==b,hint:o.hint,action:/* @__PURE__ */l(s,{words:d,label:F,changed:null!==b,detail:t(m[f]),onReset:()=>j.onChange(void 0),disabled:j.readOnly}),children:/* @__PURE__ */l(u,{label:F,value:C,options:i.map(o=>({value:o,label:t(m[o]),icon:/* @__PURE__ */l("span",{"data-shadow-chip":"",className:"border border-line bg-surface",style:{...k,boxShadow:a[o]}})})),onChange:o=>j.onChange(o),disabled:j.readOnly})})}function d(n=o=>o){const{colourField:r}=t(n);return{shadowField:o=>({type:"custom",render:r=>/* @__PURE__ */l(j,{o:o,say:n,props:r})}),shadowColourField:n=>{const i=n.follows??o;return r({key:n.key??"shadowColor",label:n.label,icon:/* @__PURE__ */l(h,{}),hint:n.hint,useFollows:()=>i})}}}var{shadowField:f,shadowColourField:b}=d();export{b as shadowColourField,f as shadowField,d as shadowFieldBuilders};
1
+ import{DEFAULT_SHADOW_COLOR as o,DEFAULT_SHADOW as n,shadowValue as r,SHADOWS as i}from"../../../chunk-CRITA6CA.js";export{DEFAULT_SHADOW,DEFAULT_SHADOW_COLOR,SHADOWS,shadowValue}from"../../../chunk-CRITA6CA.js";import{styleFieldBuilders as t}from"../../../chunk-TXNCWF67.js";import"../../../chunk-OGG6FMBA.js";import"../../../chunk-BLE3U2GS.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-C4TJN6GR.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-PLTTPHK5.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-3W2O22DZ.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-CLAADE4J.js";import{SettingsDefaultReset as s}from"../../../chunk-2T22IY3J.js";import"../../../chunk-D4TH4QQR.js";import{DEFAULT_PANEL_WORDS as e}from"../../../chunk-56ID6FKZ.js";import"../../../chunk-MNQDOSAX.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-OECWLNKJ.js";import{SettingsField as p}from"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import{useWords as c}from"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";import{ShadowIcon as h}from"efficient-shell/icons/efficient";import{IconPicker as u}from"efficient-shell/ui";import{jsx as l}from"react/jsx-runtime";var m={none:"None",soft:"Soft",lifted:"Lifted"},a={none:"none",soft:"0 1px 1px rgba(20, 20, 22, 0.10), 0 2px 4px -1px rgba(20, 20, 22, 0.14)",lifted:"0 1px 2px rgba(20, 20, 22, 0.10), 0 4px 7px -2px rgba(20, 20, 22, 0.30)"},k={display:"block",flex:"none",boxSizing:"border-box",width:16,height:11};function j({o:o,say:t,props:j}){const d=c("panel",e),f=o.builtIn??n,b=r(j.value),F=b??f,C=t(o.label);/* @__PURE__ */
2
+ return l(p,{label:C,icon:o.icon??/* @__PURE__ */l(h,{}),value:t(m[F]),changed:null!==b,hint:o.hint,action:/* @__PURE__ */l(s,{words:d,label:C,changed:null!==b,detail:t(m[f]),onReset:()=>j.onChange(void 0),disabled:j.readOnly}),children:/* @__PURE__ */l(u,{label:C,value:F,options:i.map(o=>({value:o,label:t(m[o]),icon:/* @__PURE__ */l("span",{"data-shadow-chip":"",className:"border border-line bg-surface",style:{...k,boxShadow:a[o]}})})),onChange:o=>j.onChange(o),disabled:j.readOnly})})}function d(n=o=>o){const{colourField:r}=t(n);return{shadowField:o=>({type:"custom",render:r=>/* @__PURE__ */l(j,{o:o,say:n,props:r})}),shadowColourField:n=>{const i=n.follows??o;return r({key:n.key??"shadowColor",label:n.label,icon:/* @__PURE__ */l(h,{}),hint:n.hint,useFollows:()=>i})}}}var{shadowField:f,shadowColourField:b}=d();export{b as shadowColourField,f as shadowField,d as shadowFieldBuilders};
@@ -1 +1 @@
1
- export{BORDER_WIDTH_MAX,CORNER_RADIUS_MAX,borderField,colourField,cornersField,keptByRow,styleFieldBuilders}from"../../../chunk-M4SOZEZR.js";import"../../../chunk-K6TDOXHR.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-BLE3U2GS.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-C4TJN6GR.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";export{CORNER_SIDES}from"../../../chunk-PLTTPHK5.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-NUJEHA6A.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-D4TH4QQR.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-3BQT7FC7.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";
1
+ export{BORDER_WIDTH_MAX,CORNER_RADIUS_MAX,borderField,colourField,cornersField,keptByRow,styleFieldBuilders}from"../../../chunk-TXNCWF67.js";import"../../../chunk-OGG6FMBA.js";import"../../../chunk-BLE3U2GS.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-C4TJN6GR.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";export{CORNER_SIDES}from"../../../chunk-PLTTPHK5.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-3W2O22DZ.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-D4TH4QQR.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-MNQDOSAX.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";
@@ -1 +1 @@
1
- export{useSectionOps}from"../../../chunk-3ZGOVNVH.js";import"../../../chunk-L4DFCNDQ.js";import"../../../chunk-NCXYC7WI.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-TCAAOYQY.js";import"../../../chunk-NUJEHA6A.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-WMC6FE3G.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-ZEH6QLBH.js";import"../../../chunk-WHS6Y55E.js";import"../../../chunk-D4TH4QQR.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-FIVU2COQ.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-3BQT7FC7.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-Y2T3JX7K.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-3XECMGXX.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";
1
+ export{useSectionOps}from"../../../chunk-6DUCOSHW.js";import"../../../chunk-YTF65TZA.js";import"../../../chunk-NCXYC7WI.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-TCAAOYQY.js";import"../../../chunk-3W2O22DZ.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-LWFE6QDN.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-ZEH6QLBH.js";import"../../../chunk-WHS6Y55E.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-FIVU2COQ.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-D4TH4QQR.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-MNQDOSAX.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-Y2T3JX7K.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-3XECMGXX.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";
@@ -1 +1 @@
1
- export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-PG7G7ELT.js";import"../../chunk-LX23TCTP.js";import"../../chunk-NUJEHA6A.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-K53PQAMP.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-3BQT7FC7.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
1
+ export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-BFJAEQZ6.js";import"../../chunk-LX23TCTP.js";import"../../chunk-3W2O22DZ.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-K53PQAMP.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-MNQDOSAX.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
@@ -1 +1 @@
1
- export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSelectionMode,isSlotMode,sameInspectorMode,screenSlotsOf,shownChildSlotsOf,shownSlotFieldsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-L4DFCNDQ.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-NUJEHA6A.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-WMC6FE3G.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-D4TH4QQR.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-3BQT7FC7.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
1
+ export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSelectionMode,isSlotMode,sameInspectorMode,screenSlotsOf,shownChildSlotsOf,shownSlotFieldsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-YTF65TZA.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-3W2O22DZ.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-LWFE6QDN.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-D4TH4QQR.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-MNQDOSAX.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
@@ -1,2 +1,2 @@
1
- import{DEFAULT_TEXT_STYLES_WORDS as o}from"../chunk-OGH6CC3E.js";import{DEFAULT_SCREEN_WORDS as r,DEFAULT_IMAGE_ROW_WORDS as n}from"../chunk-C4TJN6GR.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as t}from"../chunk-6WY6ZXJG.js";import{DEFAULT_CANVAS_WORDS as c}from"../chunk-TBY3DFKS.js";import{DEFAULT_TREE_WORDS as e}from"../chunk-K56YDHYQ.js";import{DEFAULT_COLOUR_ROW_WORDS as m,DEFAULT_PANEL_WORDS as i}from"../chunk-56ID6FKZ.js";import{DEFAULT_NODE_MENU_WORDS as s}from"../chunk-WK3AFPXY.js";import{DEFAULT_PAGE_COPY_WORDS as u}from"../chunk-CEC5XLN4.js";import{DEFAULT_SAVE_WORDS as f}from"../chunk-H6DDIBQ4.js";import{DEFAULT_CHROME_WORDS as p,DEFAULT_NOTICE_WORDS as l}from"../chunk-AJSDWWJW.js";import{DEFAULT_RAIL_WORDS as h}from"../chunk-2OAZYSWJ.js";import{DEFAULT_LOCK_WORDS as j}from"../chunk-RE4LP46F.js";import{DEFAULT_COPY_WORDS as a}from"../chunk-PMRN5Z3T.js";import{DEFAULT_FIELDS_WORDS as k}from"../chunk-JACEEVVF.js";import{stringsContext as y}from"../chunk-MFIRYGHW.js";import{DEFAULT_DRAG_WORDS as C}from"../chunk-TQ5Y6S2X.js";import{useContext as Y,useMemo as W}from"react";import{jsx as d}from"react/jsx-runtime";var g={notice:l,lock:j,save:f,chrome:p,rail:h,tree:e,panel:i,fields:k,colourRow:m,imageRow:n,drag:C,menu:s,styleClipboard:t,copy:a,canvas:c,textStyles:o,screen:r,pageCopy:u},v=o=>"object"==typeof o&&null!==o;function D(o,r){const n={};for(const t of Object.keys(o)){const c=o[t],e=r[t];null==e?n[t]=c:v(c)?n[t]=v(e)?D(c,e):c:n[t]=typeof e==typeof c?e:c}return n}function F(o,r){return r?D(o,r):o}function J({value:o,locale:r,children:n}){const t=y(),c=Y(t),e=c?.strings??g,m=r??c?.locale??"en",i=W(()=>({strings:F(e,o),locale:m}),[e,o,m]);/* @__PURE__ */
1
+ import{DEFAULT_TEXT_STYLES_WORDS as o}from"../chunk-OGH6CC3E.js";import{DEFAULT_PAGE_COPY_WORDS as r}from"../chunk-CEC5XLN4.js";import{DEFAULT_SCREEN_WORDS as n,DEFAULT_IMAGE_ROW_WORDS as t}from"../chunk-C4TJN6GR.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as c}from"../chunk-6WY6ZXJG.js";import{DEFAULT_CANVAS_WORDS as e}from"../chunk-TBY3DFKS.js";import{DEFAULT_TREE_WORDS as m}from"../chunk-K56YDHYQ.js";import{DEFAULT_NODE_MENU_WORDS as i}from"../chunk-WK3AFPXY.js";import{DEFAULT_COLOUR_ROW_WORDS as s,DEFAULT_PANEL_WORDS as u}from"../chunk-56ID6FKZ.js";import{DEFAULT_SAVE_WORDS as f}from"../chunk-H6DDIBQ4.js";import{DEFAULT_CHROME_WORDS as p,DEFAULT_NOTICE_WORDS as l}from"../chunk-AJSDWWJW.js";import{DEFAULT_RAIL_WORDS as h}from"../chunk-2OAZYSWJ.js";import{DEFAULT_LOCK_WORDS as j}from"../chunk-RE4LP46F.js";import{DEFAULT_COPY_WORDS as a}from"../chunk-PMRN5Z3T.js";import{DEFAULT_FIELDS_WORDS as k}from"../chunk-JACEEVVF.js";import{stringsContext as y}from"../chunk-MFIRYGHW.js";import{DEFAULT_DRAG_WORDS as C}from"../chunk-TQ5Y6S2X.js";import{useContext as Y,useMemo as W}from"react";import{jsx as d}from"react/jsx-runtime";var g={notice:l,lock:j,save:f,chrome:p,rail:h,tree:m,panel:u,fields:k,colourRow:s,imageRow:t,drag:C,menu:i,styleClipboard:c,copy:a,canvas:e,textStyles:o,screen:n,pageCopy:r},v=o=>"object"==typeof o&&null!==o;function D(o,r){const n={};for(const t of Object.keys(o)){const c=o[t],e=r[t];null==e?n[t]=c:v(c)?n[t]=v(e)?D(c,e):c:n[t]=typeof e==typeof c?e:c}return n}function F(o,r){return r?D(o,r):o}function J({value:o,locale:r,children:n}){const t=y(),c=Y(t),e=c?.strings??g,m=r??c?.locale??"en",i=W(()=>({strings:F(e,o),locale:m}),[e,o,m]);/* @__PURE__ */
2
2
  return d(t.Provider,{value:i,children:n})}function R(){return Y(y())?.strings??g}function E(){return Y(y())?.locale??"en"}export{g as DEFAULT_EASEL_STRINGS,J as EaselStringsProvider,F as mergeEaselStrings,E as useEaselLocale,R as useEaselStrings};
@@ -1,4 +1,4 @@
1
- import{hexReadout as e,typedHex as s}from"../chunk-4FFDGEWA.js";import{DEFAULT_TEXT_STYLES_WORDS as t}from"../chunk-OGH6CC3E.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-OGH6CC3E.js";import{FieldSlider as a}from"../chunk-ZEH6QLBH.js";import{TEXT_STYLE_KINDS as l,canAddTextStyle as i,TEXT_STYLE_MAX as n,isDefaultTextStyle as r,CAMPAIGN_TEXT_STYLE_SETTINGS as o,TEXT_STYLE_SETTINGS as d,textStyleRowSize as c,describeTextStyle as u,updateTextStyle as m,textStyleCaseCss as h,TEXT_STYLE_CASES as p,addTextStyle as v,removeTextStyle as f,TEXT_STYLE_RANGES as y}from"../chunk-YHZSBL2N.js";export{CAMPAIGN_TEXT_STYLE_SETTINGS,TEXT_STYLE_CASES,TEXT_STYLE_CASE_CSS,TEXT_STYLE_DEFAULT_COUNT,TEXT_STYLE_KINDS,TEXT_STYLE_MAX,TEXT_STYLE_RANGES,TEXT_STYLE_SETTINGS,addTextStyle,canAddTextStyle,defaultTextStyles,describeTextStyle,isDefaultTextStyle,isTextStyleCase,removeTextStyle,resolveTextStyle,textStyleCaseCss,textStyleCaseOfCss,textStyleRowSize,updateTextStyle,weightWord}from"../chunk-YHZSBL2N.js";import{FieldSelect as g}from"../chunk-KFWNGPW3.js";import{SettingsSegmented as S}from"../chunk-DX3VILZ3.js";import"../chunk-JACEEVVF.js";import{useWords as b}from"../chunk-MFIRYGHW.js";import{withTip as N}from"../chunk-P2VEMZH5.js";import{hsvToHex as C,Tooltip as T,ColorSwatch as k,Popover as x,ColorPickerPanel as w,colorSwatchClasses as z,IconButton as E,Button as O}from"efficient-shell/ui";import{useId as _,useState as L,useRef as A,useEffect as j,Fragment as M}from"react";import{TrashIcon as $,ChevronIcon as W,BoldIcon as Y,ItalicIcon as X,CaseLowerIcon as F,CaseCapitalizedIcon as G,CaseUpperIcon as H,CaseNormalIcon as I}from"efficient-shell/icons/efficient";import{jsxs as P,jsx as B,Fragment as D}from"react/jsx-runtime";var R=`conic-gradient(${[0,60,120,180,240,300,0].map(e=>C({h:e,s:1,v:1})).join(", ")})`;function V({value:s,hex:t,colours:a,label:l,followsWord:i,anyWord:n,onChange:r,readOnly:o=!1}){const d=void 0!==s&&a.some(e=>e.key===s),c=void 0!==s&&!d;/* @__PURE__ */
1
+ import{hexReadout as e,typedHex as s}from"../chunk-4FFDGEWA.js";import{DEFAULT_TEXT_STYLES_WORDS as t}from"../chunk-OGH6CC3E.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-OGH6CC3E.js";import{FieldSlider as a}from"../chunk-ZEH6QLBH.js";import{TEXT_STYLE_KINDS as l,canAddTextStyle as i,TEXT_STYLE_MAX as n,isDefaultTextStyle as r,CAMPAIGN_TEXT_STYLE_SETTINGS as o,TEXT_STYLE_SETTINGS as d,textStyleRowSize as c,describeTextStyle as u,updateTextStyle as m,textStyleCaseCss as h,TEXT_STYLE_CASES as p,addTextStyle as v,removeTextStyle as f,TEXT_STYLE_RANGES as y}from"../chunk-YHZSBL2N.js";export{CAMPAIGN_TEXT_STYLE_SETTINGS,TEXT_STYLE_CASES,TEXT_STYLE_CASE_CSS,TEXT_STYLE_DEFAULT_COUNT,TEXT_STYLE_KINDS,TEXT_STYLE_MAX,TEXT_STYLE_RANGES,TEXT_STYLE_SETTINGS,addTextStyle,canAddTextStyle,defaultTextStyles,describeTextStyle,isDefaultTextStyle,isTextStyleCase,removeTextStyle,resolveTextStyle,textStyleCaseCss,textStyleCaseOfCss,textStyleRowSize,updateTextStyle,weightWord}from"../chunk-YHZSBL2N.js";import{FieldSelect as g}from"../chunk-KFWNGPW3.js";import"../chunk-JACEEVVF.js";import{SettingsSegmented as S}from"../chunk-DX3VILZ3.js";import{useWords as b}from"../chunk-MFIRYGHW.js";import{withTip as N}from"../chunk-P2VEMZH5.js";import{hsvToHex as C,Tooltip as T,ColorSwatch as k,Popover as x,ColorPickerPanel as w,colorSwatchClasses as z,IconButton as E,Button as O}from"efficient-shell/ui";import{useId as _,useState as L,useRef as A,useEffect as j,Fragment as M}from"react";import{TrashIcon as $,ChevronIcon as W,BoldIcon as Y,ItalicIcon as X,CaseLowerIcon as F,CaseCapitalizedIcon as G,CaseUpperIcon as H,CaseNormalIcon as I}from"efficient-shell/icons/efficient";import{jsxs as P,jsx as B,Fragment as D}from"react/jsx-runtime";var R=`conic-gradient(${[0,60,120,180,240,300,0].map(e=>C({h:e,s:1,v:1})).join(", ")})`;function V({value:s,hex:t,colours:a,label:l,followsWord:i,anyWord:n,onChange:r,readOnly:o=!1}){const d=void 0!==s&&a.some(e=>e.key===s),c=void 0!==s&&!d;/* @__PURE__ */
2
2
  return P("div",{className:"es-ts-set","data-ts-setting":"color",children:[
3
3
  /* @__PURE__ */P("div",{className:"es-ts-top",children:[
4
4
  /* @__PURE__ */B("span",{className:"es-ts-sub",children:l}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-easel",
3
- "version": "26.15.0",
3
+ "version": "26.16.0",
4
4
  "description": "Efficient Easel: the EFFICIENT editors' shared engine and chrome: the saved document as pure functions, the published renderer, and the editor frame, panels, Layers tree, text grammar and type-in-place box. Published as editor-shell up to 0.66.0 and as efficient-editor up to 0.95.0.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",
@@ -1,17 +0,0 @@
1
- import{sidesStartEach as e,SidesInput as n,SidesEachToggle as t}from"./chunk-CLAADE4J.js";import{SettingsDefaultReset as l}from"./chunk-2T22IY3J.js";import{deviceField as o}from"./chunk-BLE3U2GS.js";import{noControlField as a,NoControlMark as i}from"./chunk-22I55W37.js";import{describedAs as r}from"./chunk-LX23TCTP.js";import{withStyleKind as s}from"./chunk-CWELHADJ.js";import{phoneKey as u}from"./chunk-E52W3M5I.js";import{foldMetaOf as c,FOLD_FIELD_MARKER as d}from"./chunk-ANPOR6EY.js";import{useSelectedHost as p,useEasel as f}from"./chunk-NUJEHA6A.js";import{DEFAULT_PANEL_WORDS as b}from"./chunk-56ID6FKZ.js";import{SettingsSwitch as m}from"./chunk-OECWLNKJ.js";import{FieldSelect as h}from"./chunk-KFWNGPW3.js";import{SettingsField as v}from"./chunk-MIX7EGRG.js";import{SettingsSegmented as g}from"./chunk-DX3VILZ3.js";import{useWords as y}from"./chunk-MFIRYGHW.js";import{useState as k}from"react";import{AlignmentIcon as w,BoxJustifyIcon as x,WrapIcon as C,ArrowRightIcon as j,GapIcon as F,WidthIcon as L,PlacementIcon as O,NudgeIcon as E,DesktopIcon as S,BoxXEndIcon as P,BoxXCenterIcon as A,BoxXStartIcon as R,PaddingAllIcon as M,BoxYBetweenIcon as I,BoxYStretchIcon as K,BoxYEndIcon as W,BoxYCenterIcon as B,BoxYStartIcon as N,BoxXBetweenIcon as $,BoxXStretchIcon as G,BoxItemAlignmentIcon as T}from"efficient-shell/icons/efficient";import{textAlignOptions as V,AlignmentGrid as J,PositionInput as H,Slider as D}from"efficient-shell/ui";import{jsx as _,Fragment as z,jsxs as X}from"react/jsx-runtime";var Y=e=>e;function U(e,n){return e("{value} on desktop").replace("{value}",n)}var Z=()=>{};function q(){return null}function Q(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");/* @__PURE__ */
2
- return _(q,{},e)}function ee(e){return e.type===q}function ne(e){return ee(e)?void 0:e}function te(e){for(const[n,t]of Object.entries(e))t&&"object"==typeof t&&!c(t)&&s(t,`section:${n}`);return e}function le(e,n){return{type:"custom",[d]:{label:e,level:n},marker:!0,fold:e,render:()=>/* @__PURE__ */_(z,{})}}function oe(e){return le(e,2)}function ae(e){return le(e,1)}var ie=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Space between",value:"between"},{label:"End",value:"end"}],re=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"End",value:"end"},{label:"Stretch",value:"stretch"}],se="Wrap",ue=[{label:"Wrap",value:"wrap"},{label:"No wrap",value:"nowrap"}],ce="Direction",de=[{label:"Stacked",value:"column"},{label:"One row",value:"row"}],pe={min:-32,max:64,step:2,builtIn:0},fe={min:30,max:100,step:5,fallback:60},be=["top-left","top-center","top-right","left","center","right","bottom-left","bottom-center","bottom-right"],me="bottom-left",he={"top-left":"Top left","top-center":"Top center","top-right":"Top right",left:"Left",center:"Center",right:"Right","bottom-left":"Bottom left","bottom-center":"Bottom center","bottom-right":"Bottom right"},ve=be.map(e=>({value:e,label:he[e]}));function ge(e,n=me){return be.includes(e)?e:n}var ye=40,ke=e=>"number"==typeof e?e:null;function we(e,n,t){const l={};for(const o of["x","y"])t[o]!==n[o]&&(l[e[o]]=t[o]??void 0);return l}var xe=["top","right","bottom","left"],Ce={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},je=e=>"number"==typeof e?e:null;function Fe(e,n,t){const l={};for(const o of xe)t[o]!==n[o]&&(l[e[o]]=t[o]??void 0);return l}function Le(e){if("number"==typeof e)return{top:e,right:e,bottom:e,left:e};const n=e&&"object"==typeof e?e:{};return Object.fromEntries(xe.map(e=>[e,je(n[e])]))}function Oe(e){const n={};for(const t of xe)"number"==typeof e[t]&&(n[t]=e[t]);return Object.keys(n).length?n:void 0}function Ee(e,n={}){const t=n=>{const t=n[e];return t&&"object"==typeof t?t:{}},l=e=>Object.hasOwn(n,e)?n[e]:e;return{read:(e,n)=>t(e)[l(n)],write:(n,o,a)=>{const i={...t(n)};return void 0===a?delete i[l(o)]:i[l(o)]=a,{[e]:Object.keys(i).length?i:void 0}}}}function Se(e,n,t){const l=Pe(e),o=p();if(t)return[t.value,t.onChange];const a=o?.values??{};return[e.read(a,n),e=>l([[n,e]])]}function Pe(e){const n=p();return t=>{n&&n.onChangeMany(n=>{let l={};for(const[o,a]of t)l={...l,...e.write({...n,...l},o,a)};return l})}}var Ae={read:(e,n)=>e[n],write:(e,n,t)=>({[n]:t})},Re={fieldKey:u,ownField:!0,read:(e,n)=>e[u(n)],write:(e,n,t)=>({[u(n)]:t})};function Me(e){return{...Ee(e),fieldKey:n=>`_${e}_${n}`}}function Ie({row:e,desktopKey:n,access:t,props:l}){const o=p(),a=o?.values?.[n],[i,r]=Se(t,n);return t.ownField?e.render({...l,follows:a,twinAccess:t}):e.render({...l,value:i,storedValue:i,follows:a,twinAccess:t,onChange:r})}function Ke(e,n,t=Re,l={}){const a=l.phoneRow??n,i={...a,render:n=>/* @__PURE__ */_(Ie,{row:a,desktopKey:e,access:t,props:n})};return{[e]:o("desktop",n),[t.fieldKey(e)]:o("mobile",i)}}var We=["left","center","right"];function Be(e,{options:n,value:t,onChange:l,ariaLabel:o,disabled:a=!1}){/* @__PURE__ */
3
- return _(g,{options:n.map(n=>n.picture?{id:n.value,label:n.picture,title:e(n.title??n.label)}:{id:n.value,label:e(n.label),title:void 0===n.title?void 0:e(n.title)}),value:t,onChange:l,ariaLabel:e(o),disabled:a})}function Ne(e,{label:n,value:t,onChange:l,points:o}){const a=o.find(e=>e.disabled),i=o.map(n=>({...n,label:e(n.label),...n.title?{title:e(n.title)}:null}));/* @__PURE__ */
4
- return _(v,{label:e(n),icon:/* @__PURE__ */_(O,{}),hint:a?.title?e(a.title):void 0,children:/* @__PURE__ */_(J,{label:e(n),value:t,points:i,onChange:l})})}function $e({say:e,label:n,value:t,onChange:l,pointsFor:o}){const{appState:a,selectedItem:i}=f(e=>e),r=i?.props?.id?String(i.props.id):void 0;return Ne(e,{label:n,value:t,onChange:l,points:o(a?.data,r)})}function Ge({say:e,o:n}){const t=p(),o=y("panel",b),a=t?.values??{},i={x:ke(a[n.keys.x]),y:ke(a[n.keys.y])},r=e(n.label??"Position"),s=Boolean(i.x||i.y),u=e=>{const l=we(n.keys,i,e);Object.keys(l).length&&t?.onChangeMany(l)},c=/* @__PURE__ */_(H,{label:r,value:i,onChange:u,words:{x:e("Left and right"),y:e("Up and down"),unit:"px"},placeholder:{x:"0",y:"0"},min:n.min,max:n.max,step:n.step??1}),d=/* @__PURE__ */_(l,{words:o,label:r,changed:s,detail:"0 px, 0 px",onReset:()=>u({x:null,y:null})});return null===n.label?/* @__PURE__ */X("div",{className:"sf-position-line",children:[c,d]}):/* @__PURE__ */_(v,{label:r,icon:/* @__PURE__ */_(E,{}),changed:s,action:d,children:c})}var Te={x:{start:/* @__PURE__ */_(R,{}),center:/* @__PURE__ */_(A,{}),end:/* @__PURE__ */_(P,{}),stretch:/* @__PURE__ */_(G,{}),between:/* @__PURE__ */_($,{})},y:{start:/* @__PURE__ */_(N,{}),center:/* @__PURE__ */_(B,{}),end:/* @__PURE__ */_(W,{}),stretch:/* @__PURE__ */_(K,{}),between:/* @__PURE__ */_(I,{})}},Ve=e=>"row"===e?"row":"column";function Je({say:e,kind:n,label:t,options:l,value:o,onChange:a,o:i}){const r=p(),s="justify"===n==("row"===(i.runs??Ve)(r?.values?.[i.directionKey??"direction"]))?"x":"y";return Be(e,{options:l.map(e=>({label:e.label,value:e.value,picture:Te[s][e.value]})),value:o,onChange:a,ariaLabel:t})}function He(e,n){const t=(e.useFallback??Z)(n);return Object.fromEntries(xe.map(n=>[n,t?.[n]??e.fallback[n]]))}function De({say:e,tier:n,o:t,props:l}){const o=He(t,l),a=p(),i=a?.values??{},r="mobile"===n?t.phoneKeys:t.keys,s=Object.fromEntries(xe.map(e=>[e,je(i[r[e]])])),u="mobile"===n?Object.fromEntries(xe.map(e=>[e,je(i[t.keys[e]])])):null;/* @__PURE__ */
5
- return _(ze,{say:e,o:t,fallback:o,value:s,follows:u,readOnly:l.readOnly,onChange:e=>{const n=Fe(r,s,e);Object.keys(n).length&&a?.onChangeMany(n)}})}function _e({say:e,o:n,props:t}){const l=He(n,t);/* @__PURE__ */
6
- return _(ze,{say:e,o:n,fallback:l,value:Le(t.value),follows:"follows"in t?Le(t.follows):null,readOnly:t.readOnly,onChange:e=>t.onChange(Oe(e))})}function ze({say:o,o:a,fallback:i,value:r,follows:s,readOnly:u,onChange:c}){const d=Object.fromEntries(xe.map(e=>[e,String(s?.[e]??i[e])])),[p,f]=k(()=>e(r,d)),m=y("panel",b),h=xe.map(e=>d[e]),g=`${1===new Set(h).size?h[0]:h.join(" / ")}px`;/* @__PURE__ */
7
- return _(v,{label:o(a.label),icon:a.icon??/* @__PURE__ */_(M,{}),action:/* @__PURE__ */X(z,{children:[
8
- /* @__PURE__ */_(t,{each:p,label:o("Each side"),onChange:f,disabled:u}),
9
- /* @__PURE__ */_(l,{words:m,label:o(a.label),changed:xe.some(e=>"number"==typeof r[e]),detail:s?U(o,g):g,disabled:u,onReset:()=>c({top:null,right:null,bottom:null,left:null})})]}),children:/* @__PURE__ */_(n,{label:o(a.label),each:p,value:r,placeholder:d,min:a.min,max:a.max,step:a.step,readOnly:u,onChange:c,words:{sides:{top:o("Padding top"),right:o("Padding right"),bottom:o("Padding bottom"),left:o("Padding left")},vertical:o("Top and bottom"),horizontal:o("Left and right"),unit:"px"}})})}var Xe=e=>""===e||"px"===e?e:` ${e}`;function Ye({label:e,value:n,onChange:t,min:o,max:a,step:i=1,unit:r="",hint:s,emptyLabel:u,inputMax:c,readOnly:d=!1,clears:p,detail:f,resetWords:b}){const m="number"==typeof n,h=p?/* @__PURE__ */_(l,{label:e,changed:m,detail:f??u??(void 0===s?void 0:`${s}${Xe(r)}`),disabled:d,onReset:()=>t(void 0),...b?{words:b}:{}}):void 0;return{track:/* @__PURE__ */_("div",{className:"sf-slider",children:/* @__PURE__ */_(D,{min:o,max:a,step:i,value:n,suffix:r||void 0,showInput:!0,label:e,disabled:d,...p&&void 0!==s?{placeholderValue:s}:{},...u?{emptyLabel:u}:{},...void 0!==c?{inputMax:c}:{},size:"sm",boxSize:"md",className:"sf-slider-track",onChange:e=>{null===e?p&&m&&t(void 0):e!==n&&t(e)}})}),reset:h}}function Ue({caption:e,label:n,value:t,hint:l,emptyLabel:o,...a}){const i=void 0!==l||void 0!==o,r="number"==typeof t,{track:s,reset:u}=Ye({...a,label:n,value:r?t:i?null:a.min,hint:l,emptyLabel:o,clears:i});/* @__PURE__ */
10
- return _(v,{label:e??n,action:u,children:s})}function Ze({draw:e,props:n,useMax:t,useHint:l}){return e(n,{max:(t??Z)(n),hint:(l??Z)(n)})}function qe(e=Y){function n(n,t,l,o,a,i,s="",u){const c="function"==typeof u?{action:u}:u??{},{action:d,clear:p}=c,f=(r,u)=>{const f="storedValue"in r?r.storedValue:r.value,b="follows"in r,m=b&&!1!==p?.phoneFollows,h=b||void 0!==p,g="number"==typeof r.value,y=void 0===p?i:u.hint??("function"==typeof p.hint?p.hint(r):p.hint)??i,k=m&&"number"==typeof r.follows?r.follows:y,w=Xe(s),x=!p?.emptyLabel||m&&"number"==typeof r.follows?void 0:p.emptyLabel,C=x??`${k}${w}`,j="function"==typeof c.hint?c.hint(r):c.hint,{track:F,reset:L}=Ye({label:e(n),value:g?r.value:h?null:i,onChange:e=>r.onChange(e),min:l,max:u.max??o,step:a,unit:s,hint:h?k:void 0,emptyLabel:x,inputMax:c.inputMax,readOnly:!0===r.readOnly,clears:h,detail:m?U(e,C):C});/* @__PURE__ */
11
- return _(v,{label:e(n),icon:ne(t),hint:void 0===j?void 0:e(j),action:h?L:d?d(f,r.onChange):void 0,children:F})},b=c.useMax,m=p?.useHint;return{type:"custom",...r({},{type:"number",label:n}),render:b||m?e=>/* @__PURE__ */_(Ze,{draw:f,props:e,useMax:b,useHint:m}):e=>f(e,{})}}function t(n){return Be(e,n)}function s(n,o,a,i,s={}){const u=a.map(e=>"string"==typeof e?{label:e,value:e}:e);return{type:"custom",...r({},{type:"radio",label:n,options:u.map(e=>({value:e.value,label:e.label}))}),render:a=>{const{value:r,onChange:c,field:d}=a,p=u.some(e=>e.value===r),f=!0===a.readOnly;if("follows"in a&&!u.some(e=>""===e.value)){const d=s.phoneRest?s.phoneRest(a.follows):a.follows,b=u.find(e=>e.value===d)??u.find(e=>e.value===i);/* @__PURE__ */
12
- return _(v,{label:e(n),icon:ne(o),action:/* @__PURE__ */_(l,{label:e(n),changed:p,detail:U(e,e(b?.label??"")),disabled:f,onReset:()=>c(void 0)}),children:t({options:u,value:p?r:b?.value??i,onChange:c,ariaLabel:n,disabled:f})})}const b="follows"in a&&s.followsLabel?s.followsLabel(a.follows):void 0;/* @__PURE__ */
13
- return _(v,{label:e(n),icon:ne(o),action:"follows"in a&&s.followsLabel?/* @__PURE__ */_(l,{label:e(n),changed:null!=r&&""!==r,detail:void 0===b?void 0:U(e,e(b)),disabled:f,onReset:()=>c(void 0)}):void 0,children:t({options:u,value:p?r:r||d?.currentValue||i,onChange:c,ariaLabel:n,disabled:f})})}}}function c(e,n){return n.phone?e.unshift({label:"Match desktop",value:"",picture:/* @__PURE__ */_(S,{})}):n.inherit&&e.unshift({label:n.inherit,value:""}),e}function d(e,n){return n.inherit||n.phone?{...e,render:n=>e.render({...n,onChange:e=>n.onChange(""===e?void 0:e)})}:e}function p(e,n,t,l){if(l.access){const o=l.inherit?"":l.fallback??"left",a=t({...l,phone:!1}),i=e=>{const n="string"==typeof e&&""!==e&&a.some(n=>n.value===e)?e:o;return a.find(e=>e.value===n)?.label};return Ke(e,n(l,o),l.access,{phoneRow:n({...l,phone:!0},"",i)})}return{[e]:o("desktop",n(l)),[u(e)]:o("mobile",n({...l,phone:!0},""))}}function f(e){return c(V(e.allow??We).map(e=>({label:e.label,value:e.value,picture:e.icon})),e)}function b(e,n=e.fallback??"left",t){return d(s(e.label??"Text alignment",/* @__PURE__ */_(w,{}),f(e),n,t?{followsLabel:t}:{}),e)}function g(e){const n={left:Te.x.start,center:Te.x.center,right:Te.x.end};return c(V((e.allow??We).filter(e=>e in n)).map(e=>({label:e.label,value:e.value,picture:n[e.value]})),e)}function y(e,n=e.fallback??"left",t){return d(s(e.label??"Block alignment",/* @__PURE__ */_(x,{}),g(e),n,t?{followsLabel:t}:{}),e)}function k(n,t,l,o,a,i){return{type:"custom",options:o,fallback:a,...r({},{type:"radio",label:t,options:o.map(e=>({value:e.value,label:e.label}))}),render:({value:r,onChange:s,field:u})=>{const c=u.options??o,d=u.fallback??a,p=c.some(e=>e.value===r)?r:d;/* @__PURE__ */
14
- return _(v,{label:e(t),icon:ne(l),children:/* @__PURE__ */_(Je,{say:e,kind:n,label:t,options:c,value:p,onChange:s,o:i})})}}}function O(e={}){return k("justify","Justify",/* @__PURE__ */_(x,{}),ie,ie[0].value,e)}function E(e={}){return k("align","Item alignment",/* @__PURE__ */_(T,{}),re,"stretch",e)}function P(){const n=se;return{type:"custom",options:ue,fallback:ue[1].value,...r({},{type:"radio",label:n,options:ue.map(e=>({value:e.value,label:e.label}))}),render:({value:t,onChange:l,id:o,name:a})=>{const i=`${o??a??n}-label`;/* @__PURE__ */
15
- return _(v,{label:e(n),labelId:i,icon:/* @__PURE__ */_(C,{}),action:/* @__PURE__ */_(m,{checked:(r=t,!0===r||"wrap"===r),onChange:e=>l(e?ue[0].value:ue[1].value),ariaLabelledBy:i})});var r}}}function A({offered:e,fallback:n,resolve:t}){const l=t??(t=>e.some(e=>e.value===t)?t:n),o=s(ce,
16
- /* @__PURE__ */_(j,{}),e.map(e=>({label:e.label,value:e.value})),l(void 0));return{type:"custom",render:e=>o.render({...e,value:l(e.value),onChange:n=>e.onChange(n)})}}function R({min:e,max:t,step:l,builtIn:o,resolve:a,action:i,mark:r}){const s=n("Gap",/* @__PURE__ */_(F,{}),e,t,l,o,"px",i),u=a??(e=>"number"==typeof e?e:o);return{...r,type:"custom",render:e=>s.render({...e,value:u(e.value,e.field),storedValue:e.value,onChange:n=>e.onChange(n)})}}function M(n,{fallback:t=me,pointsFor:l}={}){return{type:"custom",render:({value:o,onChange:a})=>{const i=ge(o,t);return l?/* @__PURE__ */_($e,{say:e,label:n,value:i,onChange:a,pointsFor:l}):Ne(e,{label:n,value:i,onChange:a,points:ve})}}}function I(n){return{[n.keys.x]:{type:"custom",render:()=>/* @__PURE__ */_(Ge,{say:e,o:n})},[n.keys.y]:{...a({type:"custom",render:()=>/* @__PURE__ */_(i,{})},"always"),reachedBy:n.keys.x}}}function K(n={}){const t={...Ce,...n.keys},l={keys:t,phoneKeys:Object.fromEntries(xe.map(e=>[e,u(t[e])])),fallback:{top:0,right:0,bottom:0,left:0,...n.fallback},useFallback:n.useFallback,label:n.label??"Padding",icon:n.icon,min:n.min??0,max:n.max??200,step:n.step??4},r=!1!==n.phone,s=!1===n.group?{}:{_gSpacing:oe("Padding")};if(n.object){const t={type:"custom",render:n=>/* @__PURE__ */_(_e,{say:e,o:l,props:n})};return te({...s,...r?Ke(n.object.key,t,n.object.phone):{[n.object.key]:t}})}const c=n=>{const t={type:"custom",render:t=>/* @__PURE__ */_(De,{say:e,tier:n,o:l,props:t})};return r?o(n,t):t},d=()=>a({type:"custom",render:()=>/* @__PURE__ */_(i,{})},"always"),p=xe.filter(e=>"top"!==e);return te({...s,[l.keys.top]:c("desktop"),...r?{[l.phoneKeys.top]:c("mobile")}:{},...Object.fromEntries(p.map(e=>[l.keys[e],{...d(),reachedBy:l.keys.top}])),...r?Object.fromEntries(p.map(e=>[l.phoneKeys[e],o("mobile",d())])):{}})}return{slider:n,select:function(n,t,o,a,i){const{note:s,phoneRest:u}="string"==typeof i?{note:i,phoneRest:void 0}:i??{};return{type:"custom",options:o,fallback:a,...s?{note:s}:{},...r({},{type:"select",label:n}),render:i=>{const{value:r,onChange:c,field:d}=i,p=d.options??o,f=d.fallback??a,b=p.some(e=>e.value===r),m="follows"in i,g=m?u?u(i.follows):i.follows:void 0,y=m?p.find(e=>e.value===g)??p.find(e=>e.value===f):void 0,k=b?r:y?.value??f,w=!0===i.readOnly;/* @__PURE__ */
17
- return _(v,{label:e(n),icon:ne(t),action:m?/* @__PURE__ */_(l,{label:e(n),changed:null!=r&&""!==r,detail:y?U(e,e(y.label)):void 0,disabled:w,onReset:()=>c(void 0)}):void 0,children:/* @__PURE__ */_(h,{value:k,ariaLabel:e(n),readOnly:w,onChange:c,options:[...s?[{label:e(s),value:"\0note",disabled:!0}]:[],...p.map(n=>({label:e(n.label),value:n.value}))]})})}}},Segmented:t,segmented:s,boxJustifyField:O,boxAlignField:E,boxWrapField:P,directionField:A,gapField:R,placementField:M,PlacementGridView:function(n){return Ne(e,n)},positionFields:I,sidesPaddingFields:K,alignmentField:function(e={},n=e.fallback??"left"){return b(e,n)},alignmentFields:function(e="align",n={}){return p(e,b,f,n)},AlignmentStrip:function({opts:e={},value:n,onChange:l,ariaLabel:o,disabled:a=!1}){return t({options:f(e),value:n,onChange:l,ariaLabel:o,disabled:a})},blockAlignmentField:function(e={},n=e.fallback??"left"){return y(e,n)},blockAlignmentFields:function(e="align",n={}){return p(e,y,g,n)},BlockAlignmentStrip:function({opts:e={},value:n,onChange:l,ariaLabel:o,disabled:a=!1}){return t({options:g(e),value:n,onChange:l,ariaLabel:o,disabled:a})},boxFieldSet:function(e={}){const t=e.width??fe,l=e.nudge?.limit??40,o=e.direction??{offered:de,fallback:"column"},a=o.resolve??(e=>o.offered.some(n=>n.value===e)?e:o.fallback),i={runs:e=>"row"===a(e)?"row":"column"};return{_gLayout:oe("Layout"),placement:M("Placement",e.placement),width:n("Width",/* @__PURE__ */_(L,{}),t.min,t.max,t.step,t.fallback,"%"),direction:A(o),gap:R(e.gap??pe),justify:O(i),align:E(i),wrap:P(),_gNudge:oe("Nudge"),...I({keys:e.nudge?.keys??{x:"nudgeX",y:"nudgeY"},min:-l,max:l,label:null}),...K(e.padding)}}}}var{slider:Qe,select:en,Segmented:nn,segmented:tn,boxJustifyField:ln,boxAlignField:on,boxWrapField:an,directionField:rn,gapField:sn,placementField:un,PlacementGridView:cn,positionFields:dn,sidesPaddingFields:pn,alignmentField:fn,alignmentFields:bn,AlignmentStrip:mn,blockAlignmentField:hn,blockAlignmentFields:vn,BlockAlignmentStrip:gn,boxFieldSet:yn}=qe();export{he as ANCHOR_LABELS,mn as AlignmentStrip,re as BOX_ALIGN_POINTS,de as BOX_DIRECTIONS,ce as BOX_DIRECTION_LABEL,pe as BOX_GAP,ie as BOX_JUSTIFY_POINTS,ye as BOX_NUDGE_LIMIT,be as BOX_PLACEMENTS,me as BOX_PLACEMENT_DEFAULT,fe as BOX_WIDTH,se as BOX_WRAP_LABEL,ue as BOX_WRAP_POINTS,gn as BlockAlignmentStrip,Ae as FLAT_ACCESS,ve as OPEN_PLACEMENT_POINTS,Re as PHONE_KEY_ACCESS,cn as PlacementGridView,Ce as SIDE_PAD_KEYS,nn as Segmented,Ue as SliderControl,fn as alignmentField,bn as alignmentFields,hn as blockAlignmentField,vn as blockAlignmentFields,on as boxAlignField,qe as boxFieldBuilders,yn as boxFieldSet,ln as boxJustifyField,an as boxWrapField,rn as directionField,sn as gapField,oe as group,ne as iconOf,ee as isNoGlyph,Q as noGlyph,ge as normaliseBoxPlacement,Ee as objectAccess,U as onDesktopWords,Me as phoneObjectAccess,Ke as phoneTwinFields,un as placementField,dn as positionFields,we as positionPatch,ae as section,tn as segmented,en as select,te as sharedStyleKinds,Le as sidesFromObject,pn as sidesPaddingFields,Fe as sidesPaddingPatch,Oe as sidesToObject,Qe as slider,Pe as useAccessPatch,Se as useAccessValue};
@@ -1,5 +0,0 @@
1
- import{usePickFollowsSelection as n}from"./chunk-NCXYC7WI.js";import{slotFieldsOf as e,slotChildrenIn as t}from"./chunk-TCAAOYQY.js";import{EaselCanvas as r,useSelectedFields as o}from"./chunk-NUJEHA6A.js";import{Inspector as i}from"./chunk-WMC6FE3G.js";import{fieldIsShown as u}from"./chunk-BPXEFVSQ.js";import{createContext as l,useContext as s}from"react";import{DesktopIcon as c}from"efficient-shell/icons/efficient";import{jsx as f}from"react/jsx-runtime";var a={kind:"selection"};function d(n){return"selection"===n.kind}function p(n,e){if(d(n)&&d(e))return!0;const t=n,r=e,o=Object.keys(t);return o.length===Object.keys(r).length&&o.every(n=>Object.is(t[n],r[n]))}function m(n){const e=n;return"string"==typeof e.nodeId&&"string"==typeof e.slot}function k(n,t){const r=n.components?.[t.type]?.fields??{};return e(n,t.type).filter(n=>u(r[n],{values:t.props}))}function h(n,e){return k(n,e).flatMap(n=>t(e,n))}function v(n,e,t){const r=n.slotsOf?.(t);return r||k(e,t).map(n=>({slot:n,label:n,rung:!1}))}function y(n,e){return n.isFirst?n.isFirst(e):e.type===n.first}function g(n,e){return n.isLast?n.isLast(e):e.type===n.last}var b={},O=()=>b,j=()=>"",C=()=>null,w=()=>{},S={isLockedBlock:()=>!1,duplicateBlocked:()=>null,nestDepth:()=>0,newSectionNode:()=>null,canAddTo:()=>null,blockIsOffered:()=>!0},L={labelAtLevel:(n,e,t)=>t,descriptions:{},categoryLabel:()=>{},firstSection:null,blockRowName:(n,e)=>e(n.type),plainText:n=>n,Icon:()=>null,Thumbnail:()=>null,useProducts:()=>null},N={options:[{id:"desktop",label:"Desktop",icon:/* @__PURE__ */f(c,{})}],initial:"desktop",fluid:"desktop",widths:{desktop:2e3}},A={read:()=>"sections",write:()=>{},forSelection:(n,e)=>n?"sections":e},P={first:null,last:null,firstGroup:null,lastGroup:null,isSectionGroup:()=>!1,sectionGroupZone:()=>"",panelOf:()=>null};function B(){/* @__PURE__ */
2
- return f(r,{height:"fill"})}function D(){const{id:n,fields:e,values:t,readOnly:r,onChange:u}=o();/* @__PURE__ */
3
- return f("div",{className:"es-sidepanel es-sidepanel--right",children:/* @__PURE__ */f(i,{fields:e,values:t,onChange:u,readOnly:r,idPrefix:n})})}var F=l({});function G({parts:n,children:e}){/* @__PURE__ */
4
- return f(F.Provider,{value:n,children:e})}function I(){return s(F)}function x(){return(I().useOwnerName??j)()}function T(){return(I().useDocumentLabel??C)()}function E(n,e,t,r){return(I().useBridges??O)(n,e,t,r)}function Y(n){return(I().useStandaloneBridges??O)(n)}function H(n,e){(I().useDocumentPass??w)(n,e)}function M(){return I().blockRules??S}function Q(){return I().blockLook??L}function R(){return I().devices??N}function V(){return I().leftView??A}function W(){return I().pinned??P}function X(){return I().saveSwitch??!0}function J(e){n(!0===I().pickFollowsSelection,e)}function K(){return I().storageNamespace||void 0}function U(){return I().styleClipboard??null}function Z(){return I().nodeKeys??!0}function q(){return I().notify??null}function z(){return I().Canvas??B}function $(){return I().CanvasHead??null}function _(){return I().canvasDrag??null}var nn=l(null);function en({target:n,children:e}){/* @__PURE__ */
5
- return f(nn.Provider,{value:n,children:e})}function tn(){return s(nn)}function rn(){return I().Inspector??D}export{a as SELECTION_MODE,en as ScreenCanvasTargetProvider,G as ScreenPartsProvider,y as isPinnedFirst,g as isPinnedLast,d as isSelectionMode,m as isSlotMode,p as sameInspectorMode,v as screenSlotsOf,h as shownChildSlotsOf,k as shownSlotFieldsOf,Q as useScreenBlockLook,M as useScreenBlockRules,E as useScreenBridges,_ as useScreenCanvasDrag,z as useScreenCanvasFrame,$ as useScreenCanvasHead,tn as useScreenCanvasTarget,R as useScreenDevices,T as useScreenDocumentLabel,H as useScreenDocumentPass,rn as useScreenInspectorPanel,V as useScreenLeftView,Z as useScreenNodeKeys,q as useScreenNotify,x as useScreenOwnerName,I as useScreenParts,J as useScreenPickFollowsSelection,W as useScreenPinned,X as useScreenSaveSwitch,K as useScreenStorageNamespace,U as useScreenStyleClipboard,Y as useStandaloneScreenBridges};
@@ -1,4 +0,0 @@
1
- import{useAccessPatch as e,FLAT_ACCESS as o,onDesktopWords as r,useAccessValue as t}from"./chunk-K6TDOXHR.js";import{CornersInput as s,BorderInput as l,SettingsColour as n}from"./chunk-CLAADE4J.js";import{SettingsDefaultReset as i}from"./chunk-2T22IY3J.js";import{noControlField as c,NoControlMark as a}from"./chunk-22I55W37.js";import{normalizeCornerSides as d,CORNER_SIDES as u}from"./chunk-PLTTPHK5.js";import{DEFAULT_PANEL_WORDS as p,DEFAULT_COLOUR_ROW_WORDS as y}from"./chunk-56ID6FKZ.js";import{SettingsField as h}from"./chunk-MIX7EGRG.js";import{useWords as f}from"./chunk-MFIRYGHW.js";import{CornerIcon as m,BorderAllIcon as b}from"efficient-shell/icons/efficient";import{jsx as w}from"react/jsx-runtime";var g=e=>e;function v(e,o){const r=o.twinAccess;return r?{key:e.key,access:r,ownField:r.ownField}:e}function k(e,r){const s=!e.access||e.ownField?{value:r.value,onChange:r.onChange}:void 0;return t(e.access??o,e.key,s)}function F(e,r){return t(e.access??o,r??"")}function j(e){return{...c({type:"custom",render:()=>/* @__PURE__ */w(a,{})},"always"),reachedBy:e}}function C({o:t,say:s,props:l}){const i=f("colourRow",y),c=f("panel",p),a=t.useFollows(),d=t.usePresets?.(),u=t.opacity?.useUnset?.()??100,h=v(t,l),[m,b]=k(h,l),[g,j]=F(h,t.opacity?.key),C=e(h.access??o),B="string"==typeof m?m:"",O="number"==typeof g,A="follows"in l,T=(A&&"string"==typeof l.follows&&""!==l.follows?l.follows:void 0)??a,R=t.access||A?void 0:"";/* @__PURE__ */
2
- return w(n,{label:s(t.label),icon:t.icon,hint:t.hint,value:B,onChange:e=>b(""===e?R:e),inherited:T,presets:d,changed:""!==B||O,onReset:()=>{O&&t.opacity?C([[t.key,R],[t.opacity.key,void 0]]):b(R)},resetTo:A?r(s,T.toUpperCase()):t.resetTo?t.resetTo(a.toUpperCase()):a.toUpperCase(),...t.opacity?{opacity:O?g:u,onOpacityChange:e=>j(e)}:{},readOnly:l.readOnly,words:i,resetWords:c})}var B=20;function O({o:e,say:o,props:t}){const s=e.useFollows(),[n,c]=k(v(e,t),t),a=n&&"object"==typeof n?n:{},d="follows"in t,u=d&&t.follows&&"object"==typeof t.follows?t.follows:{},p="number"==typeof u.width?u.width:s.width,y="string"==typeof u.color&&""!==u.color?u.color:s.color,f=Object.keys(a).length>0,m={width:o("Border width"),sides:{top:o("Border top"),right:o("Border right"),bottom:o("Border bottom"),left:o("Border left")},style:o("Border style"),styles:{solid:o("Solid"),dashed:o("Dashed"),dotted:o("Dotted")},color:o("Border color"),unit:"px"};/* @__PURE__ */
3
- return w(h,{label:o("Border"),icon:/* @__PURE__ */w(b,{}),action:d?/* @__PURE__ */w(i,{label:o("Border"),changed:f,detail:r(o,`${p}px`),disabled:t.readOnly,onReset:()=>c(void 0)}):void 0,children:/* @__PURE__ */w(l,{label:o("Border"),value:a,each:!1,onChange:o=>c(function(e){const o=Object.fromEntries(Object.entries(e).filter(([,e])=>null!=e&&""!==e));return Object.keys(o).length?o:void 0}(e.styles?{width:o.width,color:o.color,style:o.style}:{width:o.width,color:o.color})),placeholder:{sides:{top:p,right:p,bottom:p,left:p},style:u.style??"solid",color:y},presets:[y],words:m,styles:e.styles??!1,max:20,readOnly:t.readOnly})})}var A=40,T=()=>null;function R({o:r,say:t,props:l}){const n=f("panel",p),c=r.useFollows(),[a,y]=k(r,l),[b,g]=F(r,r.sidesKey),v=e(r.access??o),j=r.access?void 0:null,C="number"==typeof a&&Number.isFinite(a)?a:null,B=d((r.useFollowsSides??T)())??[...u],O=d(b)??B,A=[{value:"tl",label:t("Top left")},{value:"tr",label:t("Top right")},{value:"bl",label:t("Bottom left")},{value:"br",label:t("Bottom right")}];/* @__PURE__ */
4
- return w(h,{label:t("Corners"),icon:/* @__PURE__ */w(m,{}),changed:null!==C||Array.isArray(b),action:/* @__PURE__ */w(i,{label:t("Corners"),changed:null!==C||Array.isArray(b),detail:`${c}px`,onReset:()=>Array.isArray(b)?v([[r.key,j],[r.sidesKey,j]]):y(j),words:n}),children:/* @__PURE__ */w(s,{label:t("Corners"),value:O,corners:A,onChange:e=>{const o=u.filter(o=>e.includes(o)),r=o.length===B.length&&o.every(e=>B.includes(e));g(r?j:o)},radius:C,onRadiusChange:e=>y(e??j),radiusMin:0,radiusMax:40,radiusStep:r.step??1,radiusPlaceholder:String(c),disabled:l.readOnly})})}function x(e=g){return{colourField:o=>({type:"custom",render:r=>/* @__PURE__ */w(C,{o:o,say:e,props:r})}),borderField:o=>({type:"custom",render:r=>/* @__PURE__ */w(O,{o:o,say:e,props:r})}),cornersField:o=>({type:"custom",render:r=>/* @__PURE__ */w(R,{o:o,say:e,props:r})})}}var{colourField:D,borderField:I,cornersField:K}=x();export{B as BORDER_WIDTH_MAX,A as CORNER_RADIUS_MAX,I as borderField,D as colourField,K as cornersField,j as keptByRow,x as styleFieldBuilders};
@@ -1 +0,0 @@
1
- import{styleFieldBuilders as e,keptByRow as s}from"./chunk-M4SOZEZR.js";import{boxFieldBuilders as o,PHONE_KEY_ACCESS as l,phoneTwinFields as r,section as i}from"./chunk-K6TDOXHR.js";import{deviceField as t}from"./chunk-BLE3U2GS.js";import{BUTTON_STYLE_KEYS as c,BUTTON_PAD_KEYS as n}from"./chunk-PLTTPHK5.js";import{TextColorIcon as u,GroundIcon as d}from"efficient-shell/icons/efficient";import{jsx as f}from"react/jsx-runtime";function a(a){const p=o(a.say),y=e(a.say),m=c,F=a.style,k=a.phone??l;return{...a.padding&&{_dSize:i("Size"),...p.sidesPaddingFields({keys:n,group:!1,...a.padding})},_dDesign:i("Design"),[m.fill]:y.colourField({key:m.fill,access:F,label:"Fill color",icon:/* @__PURE__ */f(d,{}),useFollows:a.follows.useFill,usePresets:a.usePresets,resetTo:a.resetTo,opacity:{key:m.fillOpacity,useUnset:a.follows.useFillOpacity}}),[m.fillOpacity]:s(m.fill),[m.border]:y.borderField({key:m.border,access:F,useFollows:a.follows.useBorder}),[m.text]:y.colourField({key:m.text,access:F,label:"Text color",icon:/* @__PURE__ */f(u,{}),useFollows:a.follows.useText,usePresets:a.usePresets,resetTo:a.resetTo}),[m.corners]:y.cornersField({key:m.corners,access:F,sidesKey:m.cornerSides,useFollows:a.follows.useCorners,useFollowsSides:a.follows.useCornerSides}),[m.cornerSides]:s(m.corners),_dLayout:i("Layout"),...r("align",p.blockAlignmentField({phone:!0},""),k),align:t("desktop",p.blockAlignmentField())}}export{a as buttonFieldSet};
@@ -1,8 +0,0 @@
1
- import{buildPaletteSections as e,pinnedSection as t,categoryLabel as n}from"./chunk-GDO4QJ4G.js";import{blockTypesIn as o}from"./chunk-IZGFJWH4.js";import{sectionTemplatesOf as r}from"./chunk-N7E6264U.js";import{sharedSectionsOf as l}from"./chunk-N3MJOHAG.js";import{SidePanelHead as i,PanelModeExit as s}from"./chunk-SBVIW3KJ.js";import{blockRuns as c}from"./chunk-RUQOIQWI.js";import{useScreenBlockLook as a,useScreenBlockRules as p,useScreenPinned as d}from"./chunk-L4DFCNDQ.js";import{useEaselSession as m}from"./chunk-YM4UEGBV.js";import{DEFAULT_SCREEN_WORDS as f}from"./chunk-C4TJN6GR.js";import{useEasel as u}from"./chunk-NUJEHA6A.js";import{easelMenuEntries as y}from"./chunk-FIVU2COQ.js";import{useWords as h}from"./chunk-MFIRYGHW.js";import{AddPanel as k}from"./chunk-SQTVXE5D.js";import{DEFAULT_DRAG_WORDS as g}from"./chunk-TQ5Y6S2X.js";import{useState as b,useEffect as v,useMemo as j,useRef as C}from"react";import{SharedIcon as w,AddIcon as E}from"efficient-shell/icons/efficient";import{ContextMenu as I,toast as O,Dialog as $,Button as F}from"efficient-shell/ui";import{jsx as T,jsxs as x,Fragment as D}from"react/jsx-runtime";function G({name:e,pages:t,onDelete:n,onCancel:o}){const r=h("screen",f).shared,[l,i]=b(!1),s=C(null);/* @__PURE__ */
2
- return T($,{open:!0,role:"alertdialog",size:"sm",title:r.deleteTitle({name:e}),onClose:o,initialFocus:s,footer:/* @__PURE__ */x(D,{children:[
3
- /* @__PURE__ */T(F,{ref:s,variant:"secondary",onClick:o,children:r.cancel}),
4
- /* @__PURE__ */T(F,{variant:"danger",loading:l,onClick:()=>{(async()=>{i(!0);try{await n()}finally{i(!1)}})()},children:r.deleteShared})]}),children:r.deleteMessage({count:t})})}var N=e=>`section:${e}`,Q=e=>`block:${e}`,S=e=>`template:${e}`,A=e=>`shared:${e}`,H=e=>`preset:${e}`;function J({at:C,placeBlocks:$,canTake:F,onPick:J,itemFor:M,session:W,siteWide:B,onClose:L,onHide:U,readOnly:z}){const R=u(e=>e.config),V=a(),{labelAtLevel:Y,categoryLabel:P,firstSection:X,Icon:_,Thumbnail:K}=V,{blockIsOffered:Z,canAddTo:q}=p(),ee=h("screen",f).add,te=h("drag",g).add,ne=m(),[oe,re]=b([]);v(()=>{let e=!1;const t=e=>Z(e,ne);return r(ne).list().then(n=>{if(e)return;const r=R.components;re(n.filter(e=>e.node?.type&&r[e.node.type]&&o(e.node).every(t)))}).catch(()=>{}),()=>{e=!0}},[R,ne]);const le=d().shared,ie=h("screen",f).shared,[se,ce]=b([]),[ae,pe]=b(0);v(()=>{if(!le)return;let e=!1;const t=e=>Z(e,ne);return l(ne).list().then(n=>{if(e)return;const r=R.components;ce(n.filter(e=>e.node?.type&&r[e.node.type]&&o(e.node).every(t)))}).catch(()=>{}),()=>{e=!0}},[R,ne,ae]);const[de,me]=b(null),[fe,ue]=b(null),ye=j(()=>e(R,V),[R]),he=e=>Y(e,"section",R.components[e]?.label??e),ke=e=>({type:e.preset?H(e.preset.key):N(e.type),label:e.name,cover:/* @__PURE__ */T(K,{type:e.type}),title:e.desc?`${e.name} — ${e.desc}`:ee.tile({name:e.name}),keywords:[e.alias??"",e.desc,e.type,e.catLabel].filter(Boolean)}),ge=e=>{const t=e.indexOf(":"),n=e.slice(0,t),o=e.slice(t+1);if("section"===n)return{kind:"section",type:o};if("block"===n)return{kind:"block",type:o};if("template"===n){const e=oe.find(e=>e.id===o);return e?{kind:"template",template:e}:null}if("shared"===n){const e=se.find(e=>e.id===o);return e?{kind:"shared",section:e}:null}if("preset"===n){const e=ye.find(e=>e.preset?.key===o)?.preset;return e?{kind:"preset",preset:e}:null}return null},be=e=>/* @__PURE__ */T("span",{className:"es-add-glyph-cover",children:/* @__PURE__ */T(_,{type:e,size:26})}),ve=j(()=>{const e=t(ye,X),o=/* @__PURE__ */new Map,r=e=>{e.retired||o.has(e.type)||!Z(e.type,ne)||o.set(e.type,e)};for(const t of e?[e]:ye.filter(e=>!e.preset)){const e=q(t.type)?.choices??[];e.forEach(r),e.forEach(e=>q(e.type,1)?.choices?.forEach(r))}$?.forEach(r);const l=new Set(ye.filter(e=>!e.preset).map(e=>e.type)),i=[...o.values()].filter(e=>!l.has(e.type)),s=e=>({type:Q(e.type),label:e.label,cover:be(e.type),title:ee.tile({name:e.label}),keywords:[e.group??"",e.type].filter(Boolean)}),a=e=>!e.preset&&o.has(e.type)?{...ke(e),cover:be(e.type)}:ke(e),p=[];se.length>0&&p.push({key:"shared",title:ie.group,tiles:se.map(e=>({type:A(e.id),label:e.title,cover:/* @__PURE__ */T(K,{type:e.node.type}),mark:/* @__PURE__ */T(w,{size:12}),title:ie.onPages({count:e.used_on.length}),keywords:[he(e.node.type),e.node.type]}))}),oe.length>0&&p.push({key:"templates",title:ee.templates,tiles:oe.map(e=>({type:S(e.id),label:e.name,cover:/* @__PURE__ */T(K,{type:e.node.type}),keywords:[he(e.node.type),e.node.type]}))});const d=i.filter(e=>!e.group);let m=!1;for(const t of Object.keys(R.categories??{})){const o=ye.filter(e=>e.cat===t);if(0===o.length)continue;const r=e&&o.some(t=>t.type===e.type)?e:null,l=(r?[r,...o.filter(e=>e.type!==r.type)]:o).map(a);r&&!m&&(l.splice(1,0,...d.map(s)),m=!0),p.push({key:`category:${t}`,title:n(R,t,P),tiles:l})}const f=p.find(e=>e.key?.startsWith("category:"));if(!m&&f&&d.length>0&&(f.tiles=[...f.tiles,...d.map(s)],m=!0),c(i.filter(e=>e.group||!m)).forEach((e,t)=>{p.push({key:`blocks:${t}`,title:e.group??"",tiles:e.items.map(s)})}),!F)return p;const u=p.map(e=>({...e,tiles:e.tiles.map(e=>{const t=ge(e.type),n=t?F(t):null;return n?{...e,disabled:!0,disabledReason:n}:e})})),y=e=>e.tiles.some(e=>!e.disabled);return[...u.filter(y),...u.filter(e=>!y(e))]},[oe,se,ie,ye,R,ee,F,$,ne]);/* @__PURE__ */
5
- return x(D,{children:[
6
- /* @__PURE__ */T(i,{icon:/* @__PURE__ */T(E,{size:15}),title:ee.title,context:ee.contextAll,actions:/* @__PURE__ */T(s,{label:ee.done,description:ee.doneDescription,onClick:L}),onHide:U}),
7
- /* @__PURE__ */x("div",{className:"sf-addside sf-scroll",children:[
8
- /* @__PURE__ */T(k,{groups:ve,session:W,itemFor:e=>M(ge(e)??{kind:"section",type:e}),onInsert:J?e=>{const t=ge(e);t&&J(t)}:void 0,onTileMenu:(e,t)=>{const n=ge(e);return"shared"===n?.kind&&!z&&(me({section:n.section,...t}),!0)},at:C,hint:ee.hint,searchLabel:ee.search,readOnly:z,words:te}),B??null]}),de?/* @__PURE__ */T(I,{at:{x:de.x,y:de.y},owner:de.owner,onClose:()=>me(null),"aria-label":de.section.title,items:y([{label:ie.deleteShared,danger:!0,onClick:()=>{ue(de.section),me(null)}}])}):null,fe?/* @__PURE__ */T(G,{name:fe.title,pages:fe.used_on.length,onDelete:()=>(async e=>{try{await l(ne).remove(e.id)}catch{return void O.error(ie.deleteFailed)}ue(null),le?.removed?.(e),ce(t=>t.filter(t=>t.id!==e.id)),pe(e=>e+1)})(fe),onCancel:()=>ue(null)}):null]})}export{J as AddSidePanel,Q as blockKey,H as presetKey,N as sectionKey,A as sharedKey,S as templateKey};