efficient-easel 26.9.0 → 26.11.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 (80) hide show
  1. package/dist/{buckets-_MGDYJlb.d.ts → buckets-BYQBBVgO.d.ts} +2 -1
  2. package/dist/chunk-3IKJ5BST.js +4 -0
  3. package/dist/chunk-3IKUOB4X.js +1 -0
  4. package/dist/chunk-4Y5HS4TQ.js +16 -0
  5. package/dist/{chunk-OHDC426F.js → chunk-5HDQS5MB.js} +3 -3
  6. package/dist/{chunk-4NSLMT3M.js → chunk-CVS3RPO6.js} +1 -1
  7. package/dist/chunk-D4TH4QQR.js +2 -0
  8. package/dist/chunk-E7CTSIOD.js +1 -0
  9. package/dist/{chunk-Z3HNIJ7N.js → chunk-EVYIDHCK.js} +16 -16
  10. package/dist/chunk-IPXJVNRQ.js +64 -0
  11. package/dist/chunk-JHYZRSMQ.js +1 -0
  12. package/dist/chunk-JQQFB7EZ.js +1 -0
  13. package/dist/{chunk-XDX6Y266.js → chunk-JYVQ62TL.js} +1 -1
  14. package/dist/{chunk-EMIWEYU3.js → chunk-LUOY3A3Q.js} +1 -1
  15. package/dist/chunk-O5AMFEPO.js +1 -0
  16. package/dist/chunk-OVDVMBJK.js +8 -0
  17. package/dist/chunk-OXZDSOZV.js +1 -0
  18. package/dist/{chunk-SY74N7LL.js → chunk-PTE3VL3S.js} +19 -19
  19. package/dist/chunk-RQNYAPZI.js +5 -0
  20. package/dist/{chunk-B2EQY2LB.js → chunk-RSIBZAV3.js} +1 -1
  21. package/dist/{chunk-JHCHJNZ2.js → chunk-SQTVXE5D.js} +4 -4
  22. package/dist/{chunk-46HR5HZC.js → chunk-W6OXF3A5.js} +1 -1
  23. package/dist/copy/index.d.ts +2 -2
  24. package/dist/copy/index.js +10 -10
  25. package/dist/drag/index.js +1 -1
  26. package/dist/draw/index.js +1 -1
  27. package/dist/easel/index.d.ts +2 -2
  28. package/dist/easel/index.js +1 -1
  29. package/dist/fields/index.d.ts +15 -7
  30. package/dist/fields/index.js +1 -1
  31. package/dist/panel/index.d.ts +4 -4
  32. package/dist/panel/index.js +1 -1
  33. package/dist/screen/components/AddBlockRow.js +1 -1
  34. package/dist/screen/components/AddSidePanel.js +1 -1
  35. package/dist/screen/components/NodeContextMenu.js +1 -1
  36. package/dist/screen/components/ScreenChrome.js +1 -1
  37. package/dist/screen/components/ScreenMount.js +1 -1
  38. package/dist/screen/components/ScreenStoreProvider.js +1 -1
  39. package/dist/screen/components/SectionScreenShell.js +17 -17
  40. package/dist/screen/components/usePartBridge.js +1 -1
  41. package/dist/screen/index.js +1 -1
  42. package/dist/screen/lib/document/block-set-host.js +1 -1
  43. package/dist/screen/lib/document/block-size-fields.d.ts +3 -3
  44. package/dist/screen/lib/document/block-size-fields.js +1 -1
  45. package/dist/screen/lib/document/box-fields.d.ts +3 -3
  46. package/dist/screen/lib/document/box-fields.js +1 -1
  47. package/dist/screen/lib/document/button-fields.d.ts +10 -8
  48. package/dist/screen/lib/document/button-fields.js +1 -1
  49. package/dist/screen/lib/document/field-buckets.d.ts +1 -1
  50. package/dist/screen/lib/document/image-fields.d.ts +3 -3
  51. package/dist/screen/lib/document/image-fields.js +5 -5
  52. package/dist/screen/lib/document/preview-dom.js +1 -1
  53. package/dist/screen/lib/document/section-doc.js +1 -1
  54. package/dist/screen/lib/document/shadow-fields.d.ts +3 -3
  55. package/dist/screen/lib/document/shadow-fields.js +1 -1
  56. package/dist/screen/lib/document/style-clipboard.js +1 -1
  57. package/dist/screen/lib/document/style-fields.d.ts +3 -3
  58. package/dist/screen/lib/document/style-fields.js +1 -1
  59. package/dist/screen/lib/document/use-section-ops.js +1 -1
  60. package/dist/screen/lib/key-scope.js +1 -1
  61. package/dist/screen/lib/screen-parts.js +1 -1
  62. package/dist/strings/index.d.ts +2 -2
  63. package/dist/strings/index.js +2 -2
  64. package/dist/text-styles/index.js +21 -21
  65. package/dist/{types-BusXrvDU.d.ts → types-BYxYJQMa.d.ts} +1 -1
  66. package/dist/{types-BIytwvvH.d.ts → types-CVHwspYM.d.ts} +1 -1
  67. package/dist/{words-BrN08Fup.d.ts → words-BgeDGDKn.d.ts} +1 -1
  68. package/package.json +1 -1
  69. package/dist/chunk-5RZYLJLX.js +0 -1
  70. package/dist/chunk-6REU2VRA.js +0 -1
  71. package/dist/chunk-7IYL2J5L.js +0 -5
  72. package/dist/chunk-EKBP6JKX.js +0 -1
  73. package/dist/chunk-FM6JO4WF.js +0 -2
  74. package/dist/chunk-FVAEJFYD.js +0 -1
  75. package/dist/chunk-H27SRIVX.js +0 -8
  76. package/dist/chunk-IYMVIA2B.js +0 -16
  77. package/dist/chunk-JAUK6YX6.js +0 -1
  78. package/dist/chunk-LUG22U5L.js +0 -1
  79. package/dist/chunk-SV44ICBE.js +0 -4
  80. package/dist/chunk-TGSBEKAE.js +0 -64
@@ -4,10 +4,10 @@ import { CornerSide } from '../content/style-keys.js';
4
4
  export { CORNER_SIDES } from '../content/style-keys.js';
5
5
  import { ValueAccess, BoxField, BoxFieldSay } from './box-fields.js';
6
6
  import 'efficient-shell/format';
7
- import '../../../types-BusXrvDU.js';
7
+ import '../../../types-BYxYJQMa.js';
8
8
  import '../../../wordFit-7XpmhcaW.js';
9
- import '../../../words-BrN08Fup.js';
10
- import '../../../buckets-_MGDYJlb.js';
9
+ import '../../../words-BgeDGDKn.js';
10
+ import '../../../buckets-BYQBBVgO.js';
11
11
  import '../../../ScreenDocumentContext-DPW_6gOC.js';
12
12
  import '../../../blocks/index.js';
13
13
  import '../../../types-BljCVdzR.js';
@@ -1 +1 @@
1
- export{BORDER_WIDTH_MAX,CORNER_RADIUS_MAX,borderField,colourField,cornersField,keptByRow,styleFieldBuilders}from"../../../chunk-SV44ICBE.js";import"../../../chunk-IYMVIA2B.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-Z3HNIJ7N.js";import"../../../chunk-LUG22U5L.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-FM6JO4WF.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.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-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";export{CORNER_SIDES}from"../../../chunk-PLTTPHK5.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";
1
+ export{BORDER_WIDTH_MAX,CORNER_RADIUS_MAX,borderField,colourField,cornersField,keptByRow,styleFieldBuilders}from"../../../chunk-3IKJ5BST.js";import"../../../chunk-4Y5HS4TQ.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-Q3VAJMXS.js";export{CORNER_SIDES}from"../../../chunk-PLTTPHK5.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-EVYIDHCK.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-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-KFWNGPW3.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 +1 @@
1
- export{useSectionOps}from"../../../chunk-6REU2VRA.js";import"../../../chunk-7IYL2J5L.js";import"../../../chunk-NCXYC7WI.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-Z3HNIJ7N.js";import"../../../chunk-LUG22U5L.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-SY74N7LL.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-ZEH6QLBH.js";import"../../../chunk-WHS6Y55E.js";import"../../../chunk-FM6JO4WF.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-3XECMGXX.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-FIVU2COQ.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-HZSZT3BE.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-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-TCAAOYQY.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";
1
+ export{useSectionOps}from"../../../chunk-JHYZRSMQ.js";import"../../../chunk-RQNYAPZI.js";import"../../../chunk-NCXYC7WI.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-TCAAOYQY.js";import"../../../chunk-EVYIDHCK.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-PTE3VL3S.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-WHS6Y55E.js";import"../../../chunk-D4TH4QQR.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-ZEH6QLBH.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-FIVU2COQ.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-Y2T3JX7K.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-KFWNGPW3.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 +1 @@
1
- export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-4NSLMT3M.js";import"../../chunk-LX23TCTP.js";import"../../chunk-Z3HNIJ7N.js";import"../../chunk-LUG22U5L.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-K53PQAMP.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";
1
+ export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-CVS3RPO6.js";import"../../chunk-LX23TCTP.js";import"../../chunk-EVYIDHCK.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-K53PQAMP.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-HZSZT3BE.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-7IYL2J5L.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-Z3HNIJ7N.js";import"../../chunk-LUG22U5L.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-SY74N7LL.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-FM6JO4WF.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-K53PQAMP.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-HZSZT3BE.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-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.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-RQNYAPZI.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-EVYIDHCK.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-PTE3VL3S.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-D4TH4QQR.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-K53PQAMP.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-KFWNGPW3.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";
@@ -6,7 +6,7 @@ import { LockWords } from '../edit-lock/index.js';
6
6
  import { F as FieldsWords } from '../words-CFkb8XtN.js';
7
7
  import { N as NodeMenuWords } from '../words-DMG4dYq2.js';
8
8
  import { P as PageCopyWords } from '../words-Dl8Qja4K.js';
9
- import { P as PanelWords, C as ColourRowWords } from '../words-BrN08Fup.js';
9
+ import { P as PanelWords, C as ColourRowWords } from '../words-BgeDGDKn.js';
10
10
  import { ImageRowWords, ScreenWords } from '../screen/words.js';
11
11
  export { ScreenAddWords, ScreenSharedWords } from '../screen/words.js';
12
12
  import { S as StyleClipboardWords } from '../words-CnnHb9jo.js';
@@ -20,7 +20,7 @@ import '../wordFit-7XpmhcaW.js';
20
20
  import '../panelWidths-DgQXiPXU.js';
21
21
  import '../engine-CvXpFE86.js';
22
22
  import 'efficient-shell/markup';
23
- import '../buckets-_MGDYJlb.js';
23
+ import '../buckets-BYQBBVgO.js';
24
24
 
25
25
  /**
26
26
  * The easel canvas's own words (`efficient-easel/strings`, 0.95.0): what the
@@ -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-Q3VAJMXS.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as t}from"../chunk-6WY6ZXJG.js";import{DEFAULT_DRAG_WORDS as c}from"../chunk-TQ5Y6S2X.js";import{DEFAULT_CANVAS_WORDS as e}from"../chunk-TBY3DFKS.js";import{DEFAULT_TREE_WORDS as m}from"../chunk-K56YDHYQ.js";import{DEFAULT_COLOUR_ROW_WORDS as i,DEFAULT_PANEL_WORDS as s}from"../chunk-56ID6FKZ.js";import{DEFAULT_NODE_MENU_WORDS as u}from"../chunk-WK3AFPXY.js";import{DEFAULT_PAGE_COPY_WORDS as f}from"../chunk-CEC5XLN4.js";import{DEFAULT_SAVE_WORDS as p}from"../chunk-H6DDIBQ4.js";import{DEFAULT_CHROME_WORDS as l,DEFAULT_NOTICE_WORDS as h}from"../chunk-AJSDWWJW.js";import{DEFAULT_RAIL_WORDS as j}from"../chunk-2OAZYSWJ.js";import{DEFAULT_LOCK_WORDS as a}from"../chunk-RE4LP46F.js";import{DEFAULT_COPY_WORDS as k}from"../chunk-PMRN5Z3T.js";import{DEFAULT_FIELDS_WORDS as y}from"../chunk-JACEEVVF.js";import{stringsContext as Y}from"../chunk-MFIRYGHW.js";import{useContext as C,useMemo as W}from"react";import{jsx as d}from"react/jsx-runtime";var g={notice:h,lock:a,save:p,chrome:l,rail:j,tree:m,panel:s,fields:y,colourRow:i,imageRow:n,drag:c,menu:u,styleClipboard:t,copy:k,canvas:e,textStyles:o,screen:r,pageCopy:f},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=C(t),e=c?.strings??g,m=r??c?.locale??"en",i=W(()=>({strings:F(e,o),locale:m}),[e,o,m]);/* @__PURE__ */
2
- return d(t.Provider,{value:i,children:n})}function S(){return C(Y())?.strings??g}function A(){return C(Y())?.locale??"en"}export{g as DEFAULT_EASEL_STRINGS,J as EaselStringsProvider,F as mergeEaselStrings,A as useEaselLocale,S as useEaselStrings};
1
+ import{DEFAULT_STYLE_CLIPBOARD_WORDS as o}from"../chunk-6WY6ZXJG.js";import{DEFAULT_SCREEN_WORDS as r,DEFAULT_IMAGE_ROW_WORDS as n}from"../chunk-Q3VAJMXS.js";import{DEFAULT_TEXT_STYLES_WORDS as t}from"../chunk-OGH6CC3E.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 Y}from"../chunk-TQ5Y6S2X.js";import{useContext as C,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:Y,menu:s,styleClipboard:o,copy:a,canvas:c,textStyles:t,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=C(t),e=c?.strings??g,m=r??c?.locale??"en",i=W(()=>({strings:F(e,o),locale:m}),[e,o,m]);/* @__PURE__ */
2
+ return d(t.Provider,{value:i,children:n})}function S(){return C(y())?.strings??g}function A(){return C(y())?.locale??"en"}export{g as DEFAULT_EASEL_STRINGS,J as EaselStringsProvider,F as mergeEaselStrings,A as useEaselLocale,S as useEaselStrings};
@@ -1,37 +1,37 @@
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{withTip as l}from"../chunk-P2VEMZH5.js";import{FieldSelect as i}from"../chunk-KFWNGPW3.js";import{SettingsSegmented as n}from"../chunk-DX3VILZ3.js";import"../chunk-JACEEVVF.js";import{useWords as r}from"../chunk-MFIRYGHW.js";import{TEXT_STYLE_KINDS as o,canAddTextStyle as d,TEXT_STYLE_MAX as c,isDefaultTextStyle as u,CAMPAIGN_TEXT_STYLE_SETTINGS as m,TEXT_STYLE_SETTINGS as h,textStyleRowSize as p,describeTextStyle as v,updateTextStyle as f,textStyleCaseCss as y,TEXT_STYLE_CASES as g,addTextStyle as S,removeTextStyle as b,TEXT_STYLE_RANGES as N}from"../chunk-YHZSBL2N.js";export{CAMPAIGN_TEXT_STYLE_SETTINGS,TEXT_STYLE_CASES,TEXT_STYLE_CASE_CSS,TEXT_STYLE_DEFAULT_COUNT,TEXT_STYLE_KINDS,TEXT_STYLE_MAX,TEXT_STYLE_RANGES,TEXT_STYLE_SETTINGS,addTextStyle,canAddTextStyle,defaultTextStyles,describeTextStyle,isDefaultTextStyle,isTextStyleCase,removeTextStyle,resolveTextStyle,textStyleCaseCss,textStyleCaseOfCss,textStyleRowSize,updateTextStyle,weightWord}from"../chunk-YHZSBL2N.js";import{hsvToHex as 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{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__ */
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}),
5
5
  /* @__PURE__ */B("span",{className:"es-ts-colour-read",children:t?e(t):i})]}),
6
6
  /* @__PURE__ */P("div",{className:"es-ts-swatches",role:"group","aria-label":l,children:[a.map(t=>/* @__PURE__ */B(T,{content:`${t.name} · ${e(t.value)}`,children:/* @__PURE__ */B(k,{color:t.value,size:"sm",className:"es-ts-swatch","aria-label":t.name,selected:s===t.key,disabled:o,onClick:()=>r(t.key)})},t.key)),
7
- /* @__PURE__ */B(T,{content:n,children:/* @__PURE__ */B(x,{trigger:/* @__PURE__ */B("span",{"aria-hidden":"true",className:"absolute inset-0",style:{background:R}}),triggerLabel:n,triggerClassName:z({size:"sm",selected:c,className:"es-ts-swatch es-ts-swatch--any"}),"aria-label":l,disabled:o,children:/* @__PURE__ */B(w,{className:"es-pick-window",value:t??"",onChange:e=>r(e),label:l,disabled:o})})})]})]})}function Z({styles:e,onChange:s,fonts:a,colours:i=[],settings:n=m,auto:h=[],fallback:p,sample:v,openId:f,defaultOpenId:y=null,onOpenChange:g,onAdd:N,rowActions:C,onRemove:T,max:k=c,device:x="desktop",readOnly:w=!1}){const z=r("textStyles",t),M=_(),[W,Y]=L(y),X=void 0!==f?f:W,F=e=>{void 0===f&&Y(e),g?.(e)},G=A(null),[H,I]=L(null);j(()=>{if(!H||!G.current)return;const e=[...G.current.querySelectorAll(".es-ts-item")].find(e=>e.dataset.tsId===H.id),s=e?e.querySelector(".es-ts-row"):G.current.querySelector(`.es-ts-add[data-ts-kind="${H.kind}"]`);s?.focus(),I(null)},[H]);/* @__PURE__ */
8
- return B("div",{className:"es-ts",ref:G,children:o.map(t=>{const r=e.filter(e=>e.kind===t),o=!d(e,t,k),c=!w&&!o;/* @__PURE__ */
9
- return P(q,{label:z.groups[t],children:[r.map(t=>{const r=C?.(t),o=null!=r&&!1!==r,d=Boolean(T)&&!w&&!u(t);/* @__PURE__ */
10
- return B(U,{style:t,fonts:a,colours:i,settings:n,auto:h,fallback:p,sample:v,device:x,readOnly:w,open:X===t.id,onOpenChange:e=>F(e?t.id:null),onChange:t=>s(e.map(e=>e.id===t.id?t:e)),actions:d||o?/* @__PURE__ */P(D,{children:[d?l(z.remove,/* @__PURE__ */B(E,{variant:"ghost-danger",size:"sm",className:"es-ts-del","aria-label":z.removeNamed({name:t.name}),onClick:()=>(t=>{if(w||!T)return;const a=b(e,t.id,{name:z.styleName});if(!a)return;const l=e.filter(e=>e.kind===t.kind),i=l[l.indexOf(t)+1];X===t.id&&F(null),s(a.styles),T(a.removed),I({id:i?.id??null,kind:t.kind})})(t),children:/* @__PURE__ */B($,{size:14,"aria-hidden":"true"})})):null,o?r:null]}):null},t.id)}),l(!w&&o?z.full({kind:t,max:k}):void 0,/* @__PURE__ */P(O,{variant:"link",className:"es-ts-add","data-ts-kind":t,disabled:w,"aria-disabled":!(w||!o)||void 0,"aria-describedby":!w&&o?`${M}-full-${t}`:void 0,onClick:()=>{c&&(t=>{if(w)return;const a=S(e,t,{max:k,name:z.styleName,make:N});a&&s(a.styles)})(t)},children:[
7
+ /* @__PURE__ */B(T,{content:n,children:/* @__PURE__ */B(x,{trigger:/* @__PURE__ */B("span",{"aria-hidden":"true",className:"absolute inset-0",style:{background:R}}),triggerLabel:n,triggerClassName:z({size:"sm",selected:c,className:"es-ts-swatch es-ts-swatch--any"}),"aria-label":l,disabled:o,children:/* @__PURE__ */B(w,{className:"es-pick-window",value:t??"",onChange:e=>r(e),label:l,disabled:o})})})]})]})}function Z({styles:e,onChange:s,fonts:a,colours:d=[],settings:c=o,auto:u=[],fallback:m,sample:h,openId:p,defaultOpenId:y=null,onOpenChange:g,onAdd:S,rowActions:C,onRemove:T,max:k=n,device:x="desktop",readOnly:w=!1}){const z=b("textStyles",t),M=_(),[W,Y]=L(y),X=void 0!==p?p:W,F=e=>{void 0===p&&Y(e),g?.(e)},G=A(null),[H,I]=L(null);j(()=>{if(!H||!G.current)return;const e=[...G.current.querySelectorAll(".es-ts-item")].find(e=>e.dataset.tsId===H.id),s=e?e.querySelector(".es-ts-row"):G.current.querySelector(`.es-ts-add[data-ts-kind="${H.kind}"]`);s?.focus(),I(null)},[H]);/* @__PURE__ */
8
+ return B("div",{className:"es-ts",ref:G,children:l.map(t=>{const l=e.filter(e=>e.kind===t),n=!i(e,t,k),o=!w&&!n;/* @__PURE__ */
9
+ return P(q,{label:z.groups[t],children:[l.map(t=>{const l=C?.(t),i=null!=l&&!1!==l,n=Boolean(T)&&!w&&!r(t);/* @__PURE__ */
10
+ return B(U,{style:t,fonts:a,colours:d,settings:c,auto:u,fallback:m,sample:h,device:x,readOnly:w,open:X===t.id,onOpenChange:e=>F(e?t.id:null),onChange:t=>s(e.map(e=>e.id===t.id?t:e)),actions:n||i?/* @__PURE__ */P(D,{children:[n?N(z.remove,/* @__PURE__ */B(E,{variant:"ghost-danger",size:"sm",className:"es-ts-del","aria-label":z.removeNamed({name:t.name}),onClick:()=>(t=>{if(w||!T)return;const a=f(e,t.id,{name:z.styleName});if(!a)return;const l=e.filter(e=>e.kind===t.kind),i=l[l.indexOf(t)+1];X===t.id&&F(null),s(a.styles),T(a.removed),I({id:i?.id??null,kind:t.kind})})(t),children:/* @__PURE__ */B($,{size:14,"aria-hidden":"true"})})):null,i?l:null]}):null},t.id)}),N(!w&&n?z.full({kind:t,max:k}):void 0,/* @__PURE__ */P(O,{variant:"link",className:"es-ts-add","data-ts-kind":t,disabled:w,"aria-disabled":!(w||!n)||void 0,"aria-describedby":!w&&n?`${M}-full-${t}`:void 0,onClick:()=>{o&&(t=>{if(w)return;const a=v(e,t,{max:k,name:z.styleName,make:S});a&&s(a.styles)})(t)},children:[
11
11
  /* @__PURE__ */B("span",{className:"es-ts-add-word",children:z.add[t]}),
12
- /* @__PURE__ */B("span",{className:"es-ts-count",children:z.count({n:r.length,max:k})})]})),w||!o?null:/* @__PURE__ */B("span",{id:`${M}-full-${t}`,className:"es-vh",children:z.full({kind:t,max:k})})]},t)})})}function q({label:e,children:s}){const t=_();/* @__PURE__ */
12
+ /* @__PURE__ */B("span",{className:"es-ts-count",children:z.count({n:l.length,max:k})})]})),w||!n?null:/* @__PURE__ */B("span",{id:`${M}-full-${t}`,className:"es-vh",children:z.full({kind:t,max:k})})]},t)})})}function q({label:e,children:s}){const t=_();/* @__PURE__ */
13
13
  return P("section",{className:"es-ts-section","aria-labelledby":t,children:[
14
- /* @__PURE__ */B("div",{className:"es-ts-group",id:t,children:e}),s]})}function U({style:e,fonts:s,colours:a=[],settings:l=m,auto:i=[],fallback:n,sample:o,open:d,onOpenChange:c,onChange:u,actions:y,device:g="desktop",readOnly:S=!1}){const b=r("textStyles",t),N=`${_()}-open-${e.id}`,C=new Set(i),T=h.filter(e=>l.includes(e)),k={...n?.(e)??{},...e.values},x="phone"===g,w=x&&void 0!==e.values.sizePhone?{...k,size:e.values.sizePhone}:k,z=s.find(e=>e.value===k.font),E={fontFamily:z?.family,fontSize:`${p(w.size??16)}px`,fontWeight:k.weight,fontStyle:k.italic?"italic":void 0};/* @__PURE__ */
14
+ /* @__PURE__ */B("div",{className:"es-ts-group",id:t,children:e}),s]})}function U({style:e,fonts:s,colours:a=[],settings:l=o,auto:i=[],fallback:n,sample:r,open:h,onOpenChange:p,onChange:v,actions:f,device:y="desktop",readOnly:g=!1}){const S=b("textStyles",t),N=`${_()}-open-${e.id}`,C=new Set(i),T=d.filter(e=>l.includes(e)),k={...n?.(e)??{},...e.values},x="phone"===y,w=x&&void 0!==e.values.sizePhone?{...k,size:e.values.sizePhone}:k,z=s.find(e=>e.value===k.font),E={fontFamily:z?.family,fontSize:`${c(w.size??16)}px`,fontWeight:k.weight,fontStyle:k.italic?"italic":void 0};/* @__PURE__ */
15
15
  return P(M,{children:[
16
16
  /* @__PURE__ */P("div",{className:"es-ts-item","data-ts-id":e.id,children:[
17
- /* @__PURE__ */P("button",{type:"button",className:"es-ts-row","aria-expanded":d,"aria-controls":d?N:void 0,onClick:()=>c(!d),children:[
17
+ /* @__PURE__ */P("button",{type:"button",className:"es-ts-row","aria-expanded":h,"aria-controls":h?N:void 0,onClick:()=>p(!h),children:[
18
18
  /* @__PURE__ */B("span",{className:"es-ts-chev","aria-hidden":"true",children:/* @__PURE__ */B(W,{size:12})}),
19
19
  /* @__PURE__ */B("span",{className:"es-ts-name",style:E,children:e.name}),
20
- /* @__PURE__ */B("span",{className:"es-ts-meta",children:v(w,s,b,{autoSize:C.has("size")&&w===k&&void 0===e.values.size})})]}),y?/* @__PURE__ */B("div",{className:"es-ts-actions",children:y}):null]}),d?/* @__PURE__ */B("div",{className:"es-ts-open",id:N,children:/* @__PURE__ */B(J,{style:e,values:k,fonts:s,colours:a,settings:T,autoSet:C,sample:o??b.sample,words:b,phone:x,readOnly:S,set:s=>u(f([e],e.id,s)[0])})}):null]})}var K={none:I,upper:H,capitalize:G,lower:F};function J({style:e,values:t,fonts:i,colours:n,settings:r,autoSet:o,sample:d,words:c,phone:u,readOnly:m,set:h}){const p=e.values,v=i.find(e=>e.value===t.font),f=function(e,t){return e?t.find(s=>s.key===e)?.value??s(e)??void 0:void 0}(t.color,n),g=e=>"largestSize"===e||o.has(e),S=e=>g(e)?p[e]:t[e],b=S("size"),C=u&&void 0!==p.sizePhone?p.sizePhone:b,T=S("lineSpacing"),k=S("letterSpacing"),x=g("letterCase")?p.letterCase:t.letterCase,w={fontFamily:v?.family,fontSize:void 0===C?void 0:`${C}px`,fontWeight:t.weight,fontStyle:t.italic?"italic":void 0,lineHeight:void 0===T?void 0:String(T/100),letterSpacing:void 0===k?void 0:`${k}px`,color:f,textTransform:y(x)},z=e=>{const s=N[e],l=g(e);/* @__PURE__ */
21
- return B("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */B(a,{label:c.settings[e],value:p[e],onChange:s=>h({[e]:s}),min:s.min,max:s.max,step:s.step,shiftStep:s.shiftStep,sliderMin:s.sliderMin,sliderMax:s.sliderMax,unit:s.unit||void 0,styleValue:l?void 0:t[e],auto:l?c.auto:void 0,readOnly:m})},e)};/* @__PURE__ */
20
+ /* @__PURE__ */B("span",{className:"es-ts-meta",children:u(w,s,S,{autoSize:C.has("size")&&w===k&&void 0===e.values.size})})]}),f?/* @__PURE__ */B("div",{className:"es-ts-actions",children:f}):null]}),h?/* @__PURE__ */B("div",{className:"es-ts-open",id:N,children:/* @__PURE__ */B(J,{style:e,values:k,fonts:s,colours:a,settings:T,autoSet:C,sample:r??S.sample,words:S,phone:x,readOnly:g,set:s=>v(m([e],e.id,s)[0])})}):null]})}var K={none:I,upper:H,capitalize:G,lower:F};function J({style:e,values:t,fonts:l,colours:i,settings:n,autoSet:r,sample:o,words:d,phone:c,readOnly:u,set:m}){const p=e.values,v=l.find(e=>e.value===t.font),f=function(e,t){return e?t.find(s=>s.key===e)?.value??s(e)??void 0:void 0}(t.color,i),g=e=>"largestSize"===e||r.has(e),S=e=>g(e)?p[e]:t[e],b=S("size"),C=c&&void 0!==p.sizePhone?p.sizePhone:b,T=S("lineSpacing"),k=S("letterSpacing"),x=g("letterCase")?p.letterCase:t.letterCase,w={fontFamily:v?.family,fontSize:void 0===C?void 0:`${C}px`,fontWeight:t.weight,fontStyle:t.italic?"italic":void 0,lineHeight:void 0===T?void 0:String(T/100),letterSpacing:void 0===k?void 0:`${k}px`,color:f,textTransform:h(x)},z=e=>{const s=y[e],l=g(e);/* @__PURE__ */
21
+ return B("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */B(a,{label:d.settings[e],value:p[e],onChange:s=>m({[e]:s}),min:s.min,max:s.max,step:s.step,shiftStep:s.shiftStep,sliderMin:s.sliderMin,sliderMax:s.sliderMax,unit:s.unit||void 0,styleValue:l?void 0:t[e],auto:l?d.auto:void 0,readOnly:u})},e)};/* @__PURE__ */
22
22
  return P(D,{children:[
23
- /* @__PURE__ */B("div",{className:"es-ts-preview",style:w,"aria-label":c.preview,children:d}),r.map(s=>{switch(s){case"font":/* @__PURE__ */
24
- return B(Q,{value:p.font,fonts:i,words:c,readOnly:m,set:h},s);case"color":/* @__PURE__ */
25
- return B(ee,{value:p.color,hex:f,colours:n,words:c,readOnly:m,set:h},s);case"emphasis":{const e=(t.weight??400)>=600,a=!1!==v?.italic;/* @__PURE__ */
23
+ /* @__PURE__ */B("div",{className:"es-ts-preview",style:w,"aria-label":d.preview,children:o}),n.map(s=>{switch(s){case"font":/* @__PURE__ */
24
+ return B(Q,{value:p.font,fonts:l,words:d,readOnly:u,set:m},s);case"color":/* @__PURE__ */
25
+ return B(ee,{value:p.color,hex:f,colours:i,words:d,readOnly:u,set:m},s);case"emphasis":{const e=(t.weight??400)>=600,a=!1!==v?.italic;/* @__PURE__ */
26
26
  return P("div",{className:"es-ts-set","data-ts-setting":s,children:[
27
- /* @__PURE__ */B("span",{className:"es-ts-sub",children:c.settings.emphasis}),
28
- /* @__PURE__ */P("div",{className:"es-ts-icons",children:[l(c.bold,/* @__PURE__ */B(E,{className:"es-ts-icon","aria-label":c.bold,"aria-pressed":e,disabled:m,onClick:()=>h({weight:e?400:700}),children:/* @__PURE__ */B(Y,{size:16})})),m||a?l(c.italic,/* @__PURE__ */B(E,{className:"es-ts-icon","aria-label":c.italic,"aria-pressed":Boolean(t.italic),disabled:m,onClick:()=>h({italic:!t.italic||void 0}),children:/* @__PURE__ */B(X,{size:16})})):/* @__PURE__ */B(E,{className:"es-ts-icon","aria-label":c.italic,"aria-pressed":Boolean(t.italic),"aria-disabled":!0,disabledReason:c.italicMissing,children:/* @__PURE__ */B(X,{size:16})})]})]},s)}case"letterCase":/* @__PURE__ */
29
- return B(se,{value:p.letterCase??t.letterCase,auto:g("letterCase"),words:c,readOnly:m,set:h},s);case"largestSize":return"heading"===e.kind?z(s):null;case"size":return u?(()=>{const e=N.size;/* @__PURE__ */
30
- return B("div",{className:"es-ts-slider","data-ts-setting":"size","data-ts-device":"phone",children:/* @__PURE__ */B(a,{label:c.settings.size,value:p.sizePhone,onChange:e=>h({sizePhone:e}),min:e.min,max:e.max,step:e.step,shiftStep:e.shiftStep,sliderMin:e.sliderMin,sliderMax:e.sliderMax,unit:e.unit||void 0,styleValue:b,readOnly:m})},"size")})():z(s);default:return z(s)}})]})}function Q({value:e,fonts:s,words:t,readOnly:a,set:l}){const n=_();/* @__PURE__ */
27
+ /* @__PURE__ */B("span",{className:"es-ts-sub",children:d.settings.emphasis}),
28
+ /* @__PURE__ */P("div",{className:"es-ts-icons",children:[N(d.bold,/* @__PURE__ */B(E,{className:"es-ts-icon","aria-label":d.bold,"aria-pressed":e,disabled:u,onClick:()=>m({weight:e?400:700}),children:/* @__PURE__ */B(Y,{size:16})})),u||a?N(d.italic,/* @__PURE__ */B(E,{className:"es-ts-icon","aria-label":d.italic,"aria-pressed":Boolean(t.italic),disabled:u,onClick:()=>m({italic:!t.italic||void 0}),children:/* @__PURE__ */B(X,{size:16})})):/* @__PURE__ */B(E,{className:"es-ts-icon","aria-label":d.italic,"aria-pressed":Boolean(t.italic),"aria-disabled":!0,disabledReason:d.italicMissing,children:/* @__PURE__ */B(X,{size:16})})]})]},s)}case"letterCase":/* @__PURE__ */
29
+ return B(se,{value:p.letterCase??t.letterCase,auto:g("letterCase"),words:d,readOnly:u,set:m},s);case"largestSize":return"heading"===e.kind?z(s):null;case"size":return c?(()=>{const e=y.size;/* @__PURE__ */
30
+ return B("div",{className:"es-ts-slider","data-ts-setting":"size","data-ts-device":"phone",children:/* @__PURE__ */B(a,{label:d.settings.size,value:p.sizePhone,onChange:e=>m({sizePhone:e}),min:e.min,max:e.max,step:e.step,shiftStep:e.shiftStep,sliderMin:e.sliderMin,sliderMax:e.sliderMax,unit:e.unit||void 0,styleValue:b,readOnly:u})},"size")})():z(s);default:return z(s)}})]})}function Q({value:e,fonts:s,words:t,readOnly:a,set:l}){const i=_();/* @__PURE__ */
31
31
  return P("div",{className:"es-ts-set","data-ts-setting":"font",children:[
32
- /* @__PURE__ */B("span",{className:"es-ts-sub",id:n,children:t.settings.font}),
33
- /* @__PURE__ */B(i,{value:e,options:s.map(e=>({label:e.label,value:e.value})),onChange:e=>l({font:e}),ariaLabelledBy:n,readOnly:a})]})}function ee({value:e,hex:s,colours:t,words:a,readOnly:l,set:i}){/* @__PURE__ */
34
- return B(V,{value:e,hex:s,colours:t,label:a.settings.color,followsWord:a.colour.follows,anyWord:a.colour.any,readOnly:l,onChange:e=>i({color:e})})}function se({value:e,auto:s,words:t,readOnly:a,set:l}){const i=g.map(e=>{const s=K[e];return{id:e,label:/* @__PURE__ */B(s,{size:16}),title:t.case[e]}}),r=s?[{id:"auto",label:/* @__PURE__ */B("span",{children:t.case.auto}),title:t.case.autoTitle},...i]:i;/* @__PURE__ */
32
+ /* @__PURE__ */B("span",{className:"es-ts-sub",id:i,children:t.settings.font}),
33
+ /* @__PURE__ */B(g,{value:e,options:s.map(e=>({label:e.label,value:e.value})),onChange:e=>l({font:e}),ariaLabelledBy:i,readOnly:a})]})}function ee({value:e,hex:s,colours:t,words:a,readOnly:l,set:i}){/* @__PURE__ */
34
+ return B(V,{value:e,hex:s,colours:t,label:a.settings.color,followsWord:a.colour.follows,anyWord:a.colour.any,readOnly:l,onChange:e=>i({color:e})})}function se({value:e,auto:s,words:t,readOnly:a,set:l}){const i=p.map(e=>{const s=K[e];return{id:e,label:/* @__PURE__ */B(s,{size:16}),title:t.case[e]}}),n=s?[{id:"auto",label:/* @__PURE__ */B("span",{children:t.case.auto}),title:t.case.autoTitle},...i]:i;/* @__PURE__ */
35
35
  return P("div",{className:"es-ts-set","data-ts-setting":"letterCase",children:[
36
36
  /* @__PURE__ */B("span",{className:"es-ts-sub",children:t.settings.letterCase}),
37
- /* @__PURE__ */B(n,{options:r,value:e??(s?"auto":"none"),ariaLabel:t.settings.letterCase,disabled:a,onChange:e=>l({letterCase:"auto"===e?void 0:e})})]})}export{V as ColourSwatchRow,U as TextStyleItem,q as TextStylesGroup,Z as TextStylesList};
37
+ /* @__PURE__ */B(S,{options:n,value:e??(s?"auto":"none"),ariaLabel:t.settings.letterCase,disabled:a,onChange:e=>l({letterCase:"auto"===e?void 0:e})})]})}export{V as ColourSwatchRow,U as TextStyleItem,q as TextStylesGroup,Z as TextStylesList};
@@ -1,6 +1,6 @@
1
1
  import { W as WordFit } from './wordFit-7XpmhcaW.js';
2
2
  import { ReactNode } from 'react';
3
- import { P as PanelWords } from './words-BrN08Fup.js';
3
+ import { P as PanelWords } from './words-BgeDGDKn.js';
4
4
 
5
5
  /**
6
6
  * The settings-panel primitives — the shared grammar BOTH editors' inspector
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ShowWhenRule } from 'efficient-shell/ui';
3
- import { S as SettingsBucket } from './buckets-_MGDYJlb.js';
3
+ import { S as SettingsBucket } from './buckets-BYQBBVgO.js';
4
4
 
5
5
  /** What every control shares: an id for its label, a name for screen readers, and a read-only switch. */
6
6
  interface ControlBase {
@@ -1,4 +1,4 @@
1
- import { S as SettingsBucket, D as DesignGroup } from './buckets-_MGDYJlb.js';
1
+ import { S as SettingsBucket, D as DesignGroup } from './buckets-BYQBBVgO.js';
2
2
 
3
3
  /**
4
4
  * The settings panel's own words (`efficient-easel/strings`, 0.95.0): what
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-easel",
3
- "version": "26.9.0",
3
+ "version": "26.11.0",
4
4
  "description": "Efficient Easel: the EFFICIENT editors' shared engine and chrome: the saved document as pure functions, the published renderer, and the editor frame, panels, Layers tree, text grammar and type-in-place box. Published as editor-shell up to 0.66.0 and as efficient-editor up to 0.95.0.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",
@@ -1 +0,0 @@
1
- import{useEaselSession as e}from"./chunk-YM4UEGBV.js";import{useHostEscape as n}from"./chunk-LX23TCTP.js";import{DEFAULT_SCREEN_WORDS as t}from"./chunk-Q3VAJMXS.js";import{styleMenuItems as o}from"./chunk-CWELHADJ.js";import{repeatCopyAt as l}from"./chunk-LUG22U5L.js";import{createNodeClipboard as r,nodeMenuItems as i}from"./chunk-P5VYGWYO.js";import{DEFAULT_NODE_MENU_WORDS as c}from"./chunk-WK3AFPXY.js";import{easelMenuEntries as s,menuLabel as a}from"./chunk-FIVU2COQ.js";import{useCanvasEvent as u}from"./chunk-TOKMFZPB.js";import{zoneKey as d,ROOT_SLOT as p,ROOT_ID as f}from"./chunk-EUFDQ4KL.js";import{ROOT_ZONE as m}from"./chunk-TCAAOYQY.js";import{isTypingTarget as y,framePointToHost as h}from"./chunk-FR7EEKFF.js";import{useState as k,useCallback as b,useRef as v,useEffect as x}from"react";import{ContextMenu as g}from"efficient-shell/ui";import{TrashIcon as w,AddIcon as C,MoveUpIcon as O,MoveDownIcon as z,UndoIcon as A,RedoIcon as P,PasteIcon as j,StylesIcon as E,LayersIcon as M,CopyIcon as D}from"efficient-shell/icons/efficient";import{jsx as K}from"react/jsx-runtime";function L(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===m)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 T=r(),I=/* @__PURE__ */new WeakMap;function S(e){if(e.claimsPage)return T;const n=e.registry;if(!n)return e.cache("easel:node-clipboard",r);let t=I.get(n);return t||(t=r(),I.set(n,t)),t}function Y(){return S(e())}function X(e,n,t){if(n===m){const{floor:n,cap:o}=e.sectionBand();return{parentId:f,slot:p,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 F(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 U(e,n,t){const o=e.canPasteAt;if(!o)return d(n.from)===t.zone?X(e,t.zone,t.index+1):null;for(const l of L(e,t)){const t=X(e,l.zone,l.index+1);if(o(n,t))return t}return null}function B(e){if(e.defaultPrevented||e.altKey||e.shiftKey)return null;if(y(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 R(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=F(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:U(e,s,t);return a?(e.nodeOps.paste(a),{done:"pasted",name:s.label}):(e.onPasteRefused(s),{done:"refused",name:s.label})}function V(e,n){const{zone:t,index:l}=n,r=e.nodeAt(t,l);if(!r)return[];const c=r.props.id,s=e.labelOf(r.type,t),a=Boolean(r.props._hidden),u=e.nodeOps,d=e.isPinned(r,t),p=e.isLocked(r),f=!d&&!p&&!e.duplicateBlocked(r),y=e.permits?.(r)??{duplicate:!0,delete:!0},h=F(e,r,t),k=L(e,n),b=u.held,v=b&&!d?U(e,b,n):null,x=!e.readOnly,g=e.style?o({held:x?e.style.held():null,canCopy:e.style.canCopy(r,t),onCopy:()=>e.style?.copy(r,t),onPaste:()=>e.style?.paste(t,l,r),words:e.words?.styleClipboard}):[];return i({title:s,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===m?null:e.slotRung?.(n.zone)??null;return l?[o,{label:l.label,checked:!1,onClick:l.select}]:[o]})},actions:{duplicate:x&&f&&y.duplicate?()=>u.duplicate(c):void 0,...W(x&&!d,e=>u.canStep(c,e),e=>u.step(c,e)),copy:h.copy?()=>u.copy(c,s):void 0,cut:x&&h.cut?()=>u.cut(c,s):void 0,paste:x&&b&&v?{label:b.label,run:()=>u.paste(v)}:void 0,rename:x&&e.renamePropOf(r,t)?()=>e.beginRename(t,l):void 0,hide:!x||p||d?void 0:{hidden:a,run:()=>u.setProps(c,{_hidden:!a})},delete:x&&f&&y.delete?()=>u.remove(c):void 0},style:g,extras:Q(x?N(e,n.copy):null,e.menuRows?.(r,t,l)),pinnedLine:d?G(e).pinned:void 0})}function N(e,n){const o=e.copyItem;if(!o||!n)return null;const l=G(e),r=t.menu,i=e=>l[e]??r[e]??"",c={ownerId:n.ownerId,slot:n.slot,index:n.index,...n.outer?{outer:n.outer}:{}},s=e=>()=>o({...c,action:e});return{make:[{label:i("itemAddAfter"),icon:/* @__PURE__ */K(C,{}),onClick:s("addAfter")},{label:i("itemMoveEarlier"),icon:/* @__PURE__ */K(O,{}),onClick:s("moveEarlier"),disabled:n.index<=0},{label:i("itemMoveLater"),icon:/* @__PURE__ */K(z,{}),onClick:s("moveLater"),disabled:n.index>=n.count-1}],remove:[{label:i("itemDelete"),icon:/* @__PURE__ */K(w,{}),danger:!0,onClick:s("delete")}]}}function Q(e,n){if(!e)return n??void 0;if(!n)return e;return Object.fromEntries(["pick","make","change","remove"].map(t=>[t,[...e[t]??[],...n[t]??[]]]).filter(([,e])=>e.length>0))}function W(e,n,t){return e?{moveUp:n(-1)?()=>t(-1):null,moveDown:n(1)?()=>t(1):null}:{}}var G=e=>e.words?.screen??t.menu;function Z(e){const n=G(e),o=!e.readOnly,l=[];o&&e.history.hasPast&&l.push({label:n.undo,icon:/* @__PURE__ */K(A,{}),shortcut:"⌘Z",onClick:e.history.back}),o&&e.history.hasFuture&&l.push({label:n.redo,icon:/* @__PURE__ */K(P,{}),shortcut:"⇧⌘Z",onClick:e.history.forward});const r=[],i=e.nodeOps.held,s=X(e,m,e.sectionBand().cap);if(o&&i&&(e.canPasteAt?e.canPasteAt(i,s):d(i.from)===m)){const n=s,t=e.words?.menu??c;r.push({label:t.pasteNamed({paste:t.paste,label:i.label}),icon:/* @__PURE__ */K(j,{}),shortcut:"⌘V",onClick:()=>e.nodeOps.paste(n)})}const a=[l,r,[...e.openPageStyles?[{label:e.pageStylesLabel??t.pageStyles,icon:/* @__PURE__ */K(E,{}),onClick:e.openPageStyles}]:[],{label:n.collapseAll,icon:/* @__PURE__ */K(M,{}),onClick:e.collapseAll}]].filter(e=>e.length>0),u={label:"—",onClick:()=>{}};return a.flatMap((e,n)=>n?[u,...e]:e)}function J(e,n){const t=n.selectionStart??0,o=n.selectionEnd??0,l=n.value.slice(t,o),r=e=>{n.focus(),n.setRangeText(e,t,o,"end"),n.dispatchEvent(new Event("input",{bubbles:!0}))},i=e.words?.menu??c,s=G(e),a=[];l&&(a.push({label:i.copy,icon:/* @__PURE__ */K(D,{}),shortcut:"⌘C",onClick:()=>navigator.clipboard?.writeText(l)}),a.push({label:i.cut,icon:/* @__PURE__ */K(D,{}),shortcut:"⌘X",onClick:()=>{navigator.clipboard?.writeText(l),r("")}})),a.push({label:i.paste,icon:/* @__PURE__ */K(j,{}),shortcut:"⌘V",onClick:()=>{navigator.clipboard?.readText().then(e=>{e&&r(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 _(e){return e.shiftKey}function H(e,t){const[o,r]=k(null),i=b(()=>r(null),[]);n(null!==o,i);const c=v(e);c.current=e;const s=b(e=>{const n=c.current,t=n.keys;if(!t)return;const o=B(e);if(!o)return;const l=t.selected();if(!l)return;const r=R(n,o,l,{readOnly:t.readOnly,held:t.held()});r&&(e.preventDefault(),t.onDone?.(r))},[]),a=e.keys?.target??null;x(()=>{if(!a)return;const e=e=>s(e);return a.addEventListener("keydown",e),()=>a.removeEventListener("keydown",e)},[a,s]),u(t,"keydown",s);const d=b(n=>{if(_(n))return;const t=n.target;if(t?.closest?.("[data-slot-zone]"))return n.preventDefault(),void r(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 r({kind:"input",x:n.clientX,y:n.clientY,el:o,owner:t});const l=t?.closest?.("[data-node-id]")?.getAttribute("data-node-id"),i=l?e.locate(l):null;n.preventDefault(),r(i?{kind:"node",x:n.clientX,y:n.clientY,...i,owner:t}:{kind:"empty",x:n.clientX,y:n.clientY,owner:t})},[e]);u(t,"contextmenu",n=>{if(_(n)||!t)return;const o=n.target?.closest?.("[data-easel-block]")??null,i=o?.getAttribute("data-easel-block"),c=i?e.locate(i):null;n.preventDefault();const s=h(t.frame,n.clientX,n.clientY),a=t.frame,u=o?l(o):null;r(c?{kind:"node",...s,...c,copy:u,owner:a}:{kind:"empty",...s,owner:a})}),u(t,"mousedown",i),u(t,"scroll",i,{on:"window"});return{onEditorContextMenu:d,menu:o?/* @__PURE__ */K($,{host:e,target:o,onClose:i}):null,closeMenu:i}}function $({host:e,target:n,onClose:t}){const o="node"===n.kind?V(e,n):"input"===n.kind?J(e,n.el):Z(e);return 0===o.length?null:/* @__PURE__ */K(g,{at:{x:n.x,y:n.y},owner:n.owner??null,onClose:t,"aria-label":a(o),items:s(o)})}export{T as EASEL_NODE_CLIPBOARD,L as ancestorChain,S as nodeClipboardOf,F as nodeClipboardRules,V as nodeMenuItems,B as nodeShortcut,Z as pageMenuItems,U as pastePlace,R as runNodeShortcut,J as textMenuItems,Y as useNodeClipboard,H as useNodeContextMenu};
@@ -1 +0,0 @@
1
- import{useScreenBlockRules as e}from"./chunk-7IYL2J5L.js";import{useEasel as t,useEaselApi as n}from"./chunk-Z3HNIJ7N.js";import{newNodeId as o,ROOT_ZONE as r}from"./chunk-TCAAOYQY.js";import{useMemo as s}from"react";function i(i={}){const{dispatch:p}=t(e=>e),d=n(),c=!0===i.readOnly,a=e().resolveOnInsert,l=!0===(i.resolveOnInsert??a),m=!0===i.foldIntoHistory;return s(()=>{const e=m?e=>p({...e,recordHistory:!1}):p,t=(t,n,r)=>{const s=o(n);return c||e({type:"insert",componentType:n,destinationZone:t,destinationIndex:r,id:s}),s},n=e=>(l&&!c&&d.resolveNode(e,{trigger:"insert"}),e),s=(t,n,o)=>{c||e({type:"replace",destinationZone:t,destinationIndex:n,data:o})},i=(e,o,r)=>n(t(e,o,r));return{insertComponent:i,insertSection:(e,t)=>i(r,e,t),replaceComponent:s,seedChild:(e,o,r,i)=>{const p=t(e,r,o);s(e,o,{type:r,props:{id:p,...i}}),n(p)},insertNode:(e,o,r)=>{const i=t(e,r.type,o);return s(e,o,{type:r.type,props:{...r.props,id:i}}),n(i)},removeComponent:(t,n)=>{c||e({type:"remove",index:n,zone:t})},reorderComponent:(t,n,o)=>{c||e({type:"reorder",sourceIndex:n,destinationIndex:o,destinationZone:t})},duplicateComponent:(t,n)=>{c||e({type:"duplicate",sourceIndex:n,sourceZone:t})},select:e=>p({type:"setUi",ui:{itemSelector:e}}),setDocument:t=>{c||e({type:"setData",data:t})},commitDocument:(t,n)=>{c||(m?d.batch(()=>{e({type:"setData",data:t}),void 0!==n&&("slot"===n?.kind?d.selectSlot({parentId:n.parentId,slot:n.slot}):d.select(n?n.id:null))}):d.run({data:t,select:n}))}}},[p,c,l,d,m])}export{i as useSectionOps};
@@ -1,5 +0,0 @@
1
- import{usePickFollowsSelection as n}from"./chunk-NCXYC7WI.js";import{EaselCanvas as e,useSelectedFields as t}from"./chunk-Z3HNIJ7N.js";import{Inspector as r}from"./chunk-SY74N7LL.js";import{fieldIsShown as o}from"./chunk-BPXEFVSQ.js";import{slotFieldsOf as i,slotChildrenIn as u}from"./chunk-TCAAOYQY.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,e){const t=n.components?.[e.type]?.fields??{};return i(n,e.type).filter(n=>o(t[n],{values:e.props}))}function h(n,e){return k(n,e).flatMap(n=>u(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=()=>"",L=()=>null,N=()=>{},S={isLockedBlock:()=>!1,duplicateBlocked:()=>null,nestDepth:()=>0,newSectionNode:()=>null,canAddTo:()=>null,blockIsOffered:()=>!0},w={labelAtLevel:(n,e,t)=>t,descriptions:{},categoryLabel:()=>{},firstSection:null,blockRowName:(n,e)=>e(n.type),plainText:n=>n,Icon:()=>null,Thumbnail:()=>null,useProducts:()=>null},C={options:[{id:"desktop",label:"Desktop",icon:/* @__PURE__ */f(c,{})}],initial:"desktop",fluid:"desktop",widths:{desktop:2e3}},I={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(e,{height:"fill"})}function D(){const{id:n,fields:e,values:o,readOnly:i,onChange:u}=t();/* @__PURE__ */
3
- return f("div",{className:"es-sidepanel es-sidepanel--right",children:/* @__PURE__ */f(r,{fields:e,values:o,onChange:u,readOnly:i,idPrefix:n})})}var x=l({});function A({parts:n,children:e}){/* @__PURE__ */
4
- return f(x.Provider,{value:n,children:e})}function F(){return s(x)}function G(){return(F().useOwnerName??j)()}function T(){return(F().useDocumentLabel??L)()}function Y(n,e,t,r){return(F().useBridges??O)(n,e,t,r)}function H(n){return(F().useStandaloneBridges??O)(n)}function Q(n,e){(F().useDocumentPass??N)(n,e)}function R(){return F().blockRules??S}function V(){return F().blockLook??w}function X(){return F().devices??C}function Z(){return F().leftView??I}function E(){return F().pinned??P}function J(){return F().saveSwitch??!0}function K(e){n(!0===F().pickFollowsSelection,e)}function M(){return F().storageNamespace||void 0}function W(){return F().styleClipboard??null}function q(){return F().nodeKeys??!0}function z(){return F().notify??null}function U(){return F().Canvas??B}function $(){return F().CanvasHead??null}function _(){return F().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 F().Inspector??D}export{a as SELECTION_MODE,en as ScreenCanvasTargetProvider,A 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,V as useScreenBlockLook,R as useScreenBlockRules,Y as useScreenBridges,_ as useScreenCanvasDrag,U as useScreenCanvasFrame,$ as useScreenCanvasHead,tn as useScreenCanvasTarget,X as useScreenDevices,T as useScreenDocumentLabel,Q as useScreenDocumentPass,rn as useScreenInspectorPanel,Z as useScreenLeftView,q as useScreenNodeKeys,z as useScreenNotify,G as useScreenOwnerName,F as useScreenParts,K as useScreenPickFollowsSelection,E as useScreenPinned,J as useScreenSaveSwitch,M as useScreenStorageNamespace,W as useScreenStyleClipboard,H as useStandaloneScreenBridges};
@@ -1 +0,0 @@
1
- import{styleFieldBuilders as e,keptByRow as s}from"./chunk-SV44ICBE.js";import{boxFieldBuilders as o,PHONE_KEY_ACCESS as l,phoneTwinFields as r,section as i}from"./chunk-IYMVIA2B.js";import{deviceField as t}from"./chunk-7GGNFLHT.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),F=c,m=a.style,k=a.phone??l;return{_dSize:i("Size"),...p.sidesPaddingFields({keys:n,group:!1,...a.padding}),_dDesign:i("Design"),[F.fill]:y.colourField({key:F.fill,access:m,label:"Fill color",icon:/* @__PURE__ */f(d,{}),useFollows:a.follows.useFill,usePresets:a.usePresets,resetTo:a.resetTo,opacity:{key:F.fillOpacity,useUnset:a.follows.useFillOpacity}}),[F.fillOpacity]:s(F.fill),[F.border]:y.borderField({key:F.border,access:m,useFollows:a.follows.useBorder}),[F.text]:y.colourField({key:F.text,access:m,label:"Text color",icon:/* @__PURE__ */f(u,{}),useFollows:a.follows.useText,usePresets:a.usePresets,resetTo:a.resetTo}),[F.corners]:y.cornersField({key:F.corners,access:m,sidesKey:F.cornerSides,useFollows:a.follows.useCorners,useFollowsSides:a.follows.useCornerSides}),[F.cornerSides]:s(F.corners),_dLayout:i("Layout"),...r("align",p.blockAlignmentField({phone:!0},""),k),align:t("desktop",p.blockAlignmentField())}}export{a as buttonFieldSet};
@@ -1,2 +0,0 @@
1
- import{Accordion as e}from"efficient-shell/ui";import{jsx as n}from"react/jsx-runtime";function t({title:t,open:o,onToggle:i,count:l,level:r=3,id:s,children:a,className:c}){const d=s??"group";/* @__PURE__ */
2
- return n(e,{level:r,keepMounted:!0,openIds:o?[d]:[],onOpenChange:e=>i(e.includes(d)),items:[{id:d,headId:s,title:t,count:l,className:c?`es-panel-band ${c}`:"es-panel-band",content:a}]})}var o=Object.freeze(["Design","Animation"]),i=Object.freeze(["Content","Size","Design","Layout","Position","Anchor"]);export{i as DESIGN_GROUPS,o as SETTINGS_BUCKETS,t as SettingsGroup};
@@ -1 +0,0 @@
1
- import{isNodeList as o}from"./chunk-KXM6YRG2.js";import{newNodeId as t}from"./chunk-TCAAOYQY.js";function n(o){return{root:{props:{}},content:[o],zones:{}}}function r(o){return(o.content??[])[0]??null}function p(n,r){const e={...n.props,id:t(n.type)};for(const[t,n]of Object.entries(e))o(n)&&(e[t]=n.map(o=>p(o,r)));const s={type:n.type,props:e};if(!r)return s;const c=r(s);return{...c,props:{...c.props,id:e.id}}}export{p as cloneNodeWithFreshIds,r as docToNode,n as nodeToDoc};
@@ -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-7IYL2J5L.js";import{useEaselSession as m}from"./chunk-YM4UEGBV.js";import{DEFAULT_SCREEN_WORDS as f}from"./chunk-Q3VAJMXS.js";import{AddPanel as u}from"./chunk-JHCHJNZ2.js";import{DEFAULT_DRAG_WORDS as y}from"./chunk-TQ5Y6S2X.js";import{useEasel as h}from"./chunk-Z3HNIJ7N.js";import{easelMenuEntries as k}from"./chunk-FIVU2COQ.js";import{useWords as g}from"./chunk-MFIRYGHW.js";import{useState as b,useEffect as v,useMemo as j,useRef as w}from"react";import{SharedIcon as C,AddIcon as I}from"efficient-shell/icons/efficient";import{ContextMenu as J,toast as O,Dialog as $,Button as H}from"efficient-shell/ui";import{jsx as x,jsxs as E,Fragment as F}from"react/jsx-runtime";function M({name:e,pages:t,onDelete:n,onCancel:o}){const r=g("screen",f).shared,[l,i]=b(!1),s=w(null);/* @__PURE__ */
2
- return x($,{open:!0,role:"alertdialog",size:"sm",title:r.deleteTitle({name:e}),onClose:o,initialFocus:s,footer:/* @__PURE__ */E(F,{children:[
3
- /* @__PURE__ */x(H,{ref:s,variant:"secondary",onClick:o,children:r.cancel}),
4
- /* @__PURE__ */x(H,{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}`,S=e=>`block:${e}`,G=e=>`template:${e}`,L=e=>`shared:${e}`,Q=e=>`preset:${e}`;function T({at:w,placeBlocks:$,canTake:H,onPick:T,itemFor:W,session:A,siteWide:B,onClose:z,onHide:D,readOnly:U}){const V=h(e=>e.config),Y=a(),{labelAtLevel:R,categoryLabel:Z,firstSection:P,Icon:X,Thumbnail:_}=Y,{blockIsOffered:K,canAddTo:q}=p(),ee=g("screen",f).add,te=g("drag",y).add,ne=m(),[oe,re]=b([]);v(()=>{let e=!1;const t=e=>K(e,ne);return r(ne).list().then(n=>{if(e)return;const r=V.components;re(n.filter(e=>e.node?.type&&r[e.node.type]&&o(e.node).every(t)))}).catch(()=>{}),()=>{e=!0}},[V,ne]);const le=d().shared,ie=g("screen",f).shared,[se,ce]=b([]),[ae,pe]=b(0);v(()=>{if(!le)return;let e=!1;const t=e=>K(e,ne);return l(ne).list().then(n=>{if(e)return;const r=V.components;ce(n.filter(e=>e.node?.type&&r[e.node.type]&&o(e.node).every(t)))}).catch(()=>{}),()=>{e=!0}},[V,ne,ae]);const[de,me]=b(null),[fe,ue]=b(null),ye=j(()=>e(V,Y),[V]),he=e=>R(e,"section",V.components[e]?.label??e),ke=e=>({type:e.preset?Q(e.preset.key):N(e.type),label:e.name,cover:/* @__PURE__ */x(_,{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__ */x("span",{className:"es-add-glyph-cover",children:/* @__PURE__ */x(X,{type:e,size:26})}),ve=j(()=>{const e=t(ye,P),o=/* @__PURE__ */new Map,r=e=>{e.retired||o.has(e.type)||!K(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:S(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:L(e.id),label:e.title,cover:/* @__PURE__ */x(_,{type:e.node.type}),mark:/* @__PURE__ */x(C,{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:G(e.id),label:e.name,cover:/* @__PURE__ */x(_,{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(V.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(V,t,Z),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)})}),!H)return p;const u=p.map(e=>({...e,tiles:e.tiles.map(e=>{const t=ge(e.type),n=t?H(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,V,ee,H,$,ne]);/* @__PURE__ */
5
- return E(F,{children:[
6
- /* @__PURE__ */x(i,{icon:/* @__PURE__ */x(I,{size:15}),title:ee.title,context:ee.contextAll,actions:/* @__PURE__ */x(s,{label:ee.done,description:ee.doneDescription,onClick:z}),onHide:D}),
7
- /* @__PURE__ */E("div",{className:"sf-addside sf-scroll",children:[
8
- /* @__PURE__ */x(u,{groups:ve,session:A,itemFor:e=>W(ge(e)??{kind:"section",type:e}),onInsert:T?e=>{const t=ge(e);t&&T(t)}:void 0,onTileMenu:(e,t)=>{const n=ge(e);return"shared"===n?.kind&&!U&&(me({section:n.section,...t}),!0)},at:w,hint:ee.hint,searchLabel:ee.search,readOnly:U,words:te}),B??null]}),de?/* @__PURE__ */x(J,{at:{x:de.x,y:de.y},owner:de.owner,onClose:()=>me(null),"aria-label":de.section.title,items:k([{label:ie.deleteShared,danger:!0,onClick:()=>{ue(de.section),me(null)}}])}):null,fe?/* @__PURE__ */x(M,{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{T as AddSidePanel,S as blockKey,Q as presetKey,N as sectionKey,L as sharedKey,G as templateKey};
@@ -1,16 +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-7GGNFLHT.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{useSelectedHost as u,useEaselApi as c,useEasel as d}from"./chunk-Z3HNIJ7N.js";import{DEFAULT_PANEL_WORDS as p}from"./chunk-56ID6FKZ.js";import{SettingsSwitch as f}from"./chunk-OECWLNKJ.js";import{FieldSelect as b}from"./chunk-KFWNGPW3.js";import{SettingsField as m}from"./chunk-MIX7EGRG.js";import{SettingsSegmented as h}from"./chunk-DX3VILZ3.js";import{useWords as v}from"./chunk-MFIRYGHW.js";import{phoneKey as g}from"./chunk-E52W3M5I.js";import{foldMetaOf as y,FOLD_FIELD_MARKER as k}from"./chunk-ANPOR6EY.js";import{useState as w}from"react";import{AlignmentIcon as x,BoxJustifyIcon as C,WrapIcon as j,GapIcon as F,WidthIcon as L,PlacementIcon as O,NudgeIcon as S,DesktopIcon as E,BoxXEndIcon as P,BoxXCenterIcon as I,BoxXStartIcon as R,PaddingAllIcon as A,BoxYBetweenIcon as M,BoxYStretchIcon as K,BoxYEndIcon as N,BoxYCenterIcon as W,BoxYStartIcon as B,BoxXBetweenIcon as G,BoxXStretchIcon as T,BoxItemAlignmentIcon as $}from"efficient-shell/icons/efficient";import{textAlignOptions as V,AlignmentGrid as J,PositionInput as D,Slider as H}from"efficient-shell/ui";import{jsx as _,Fragment as z,jsxs as X}from"react/jsx-runtime";var Y=e=>e;function Z(e,n){return e("{value} on desktop").replace("{value}",n)}var U=()=>{};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&&!y(t)&&s(t,`section:${n}`);return e}function le(e,n){return{type:"custom",[k]:{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 Se(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 Ee(e,n,t){const l=Pe(e),o=u();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=u(),t=function(){try{return c()}catch{return null}}();return l=>{if(!n)return;const o=t?.getState(),a=(o?"root"===n.id?o.appState.data.root.props:o.getItemById(n.id)?.props:void 0)??n.values??{};let i={};for(const[n,t]of l)i={...i,...e.write({...a,...i},n,t)};n.onChangeMany(i)}}var Ie={read:(e,n)=>e[n],write:(e,n,t)=>({[n]:t})},Re={fieldKey:g,ownField:!0,read:(e,n)=>e[g(n)],write:(e,n,t)=>({[g(n)]:t})};function Ae(e){return{...Se(e),fieldKey:n=>`_${e}_${n}`}}function Me({row:e,desktopKey:n,access:t,props:l}){const o=u(),a=o?.values?.[n],[i,r]=Ee(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__ */_(Me,{row:a,desktopKey:e,access:t,props:n})};return{[e]:o("desktop",n),[t.fieldKey(e)]:o("mobile",i)}}var Ne=["left","center","right"];function We(e,{options:n,value:t,onChange:l,ariaLabel:o,disabled:a=!1}){/* @__PURE__ */
3
- return _(h,{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 Be(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 _(m,{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 Ge({say:e,label:n,value:t,onChange:l,pointsFor:o}){const{appState:a,selectedItem:i}=d(e=>e),r=i?.props?.id?String(i.props.id):void 0;return Be(e,{label:n,value:t,onChange:l,points:o(a?.data,r)})}function Te({say:e,o:n}){const t=u(),o=v("panel",p),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),c=e=>{const l=we(n.keys,i,e);Object.keys(l).length&&t?.onChangeMany(l)},d=/* @__PURE__ */_(D,{label:r,value:i,onChange:c,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}),f=/* @__PURE__ */_(l,{words:o,label:r,changed:s,detail:"0 px, 0 px",onReset:()=>c({x:null,y:null})});return null===n.label?/* @__PURE__ */X("div",{className:"sf-position-line",children:[d,f]}):/* @__PURE__ */_(m,{label:r,icon:/* @__PURE__ */_(S,{}),changed:s,action:f,children:d})}var $e={x:{start:/* @__PURE__ */_(R,{}),center:/* @__PURE__ */_(I,{}),end:/* @__PURE__ */_(P,{}),stretch:/* @__PURE__ */_(T,{}),between:/* @__PURE__ */_(G,{})},y:{start:/* @__PURE__ */_(B,{}),center:/* @__PURE__ */_(W,{}),end:/* @__PURE__ */_(N,{}),stretch:/* @__PURE__ */_(K,{}),between:/* @__PURE__ */_(M,{})}},Ve=e=>"row"===e?"row":"column";function Je({say:e,kind:n,label:t,options:l,value:o,onChange:a,o:i}){const r=u(),s="justify"===n==("row"===(i.runs??Ve)(r?.values?.[i.directionKey??"direction"]))?"x":"y";return We(e,{options:l.map(e=>({label:e.label,value:e.value,picture:$e[s][e.value]})),value:o,onChange:a,ariaLabel:t})}function De(e,n){const t=(e.useFallback??U)(n);return Object.fromEntries(xe.map(n=>[n,t?.[n]??e.fallback[n]]))}function He({say:e,tier:n,o:t,props:l}){const o=De(t,l),a=u(),i=a?.values??{},r="mobile"===n?t.phoneKeys:t.keys,s=Object.fromEntries(xe.map(e=>[e,je(i[r[e]])])),c="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:c,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=De(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])])),[f,b]=w(()=>e(r,d)),h=v("panel",p),g=xe.map(e=>d[e]),y=`${1===new Set(g).size?g[0]:g.join(" / ")}px`;/* @__PURE__ */
7
- return _(m,{label:o(a.label),icon:a.icon??/* @__PURE__ */_(A,{}),action:/* @__PURE__ */X(z,{children:[
8
- /* @__PURE__ */_(t,{each:f,label:o("Each side"),onChange:b,disabled:u}),
9
- /* @__PURE__ */_(l,{words:h,label:o(a.label),changed:xe.some(e=>"number"==typeof r[e]),detail:s?Z(o,y):y,disabled:u,onReset:()=>c({top:null,right:null,bottom:null,left:null})})]}),children:/* @__PURE__ */_(n,{label:o(a.label),each:f,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__ */_(H,{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 Ze({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 _(m,{label:e??n,action:u,children:s})}function Ue({draw:e,props:n,useMax:t,useHint:l}){return e(n,{max:(t??U)(n),hint:(l??U)(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,h=b&&!1!==p?.phoneFollows,v=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=h&&"number"==typeof r.follows?r.follows:y,w=Xe(s),x=!p?.emptyLabel||h&&"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:v?null:i,onChange:e=>r.onChange(e),min:l,max:u.max??o,step:a,unit:s,hint:v?k:void 0,emptyLabel:x,inputMax:c.inputMax,readOnly:!0===r.readOnly,clears:v,detail:h?Z(e,C):C});/* @__PURE__ */
11
- return _(m,{label:e(n),icon:ne(t),hint:void 0===j?void 0:e(j),action:v?L:d?d(f,r.onChange):void 0,children:F})},b=c.useMax,h=p?.useHint;return{type:"custom",...r({},{type:"number",label:n}),render:b||h?e=>/* @__PURE__ */_(Ue,{draw:f,props:e,useMax:b,useHint:h}):e=>f(e,{})}}function t(n){return We(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 _(m,{label:e(n),icon:ne(o),action:/* @__PURE__ */_(l,{label:e(n),changed:p,detail:Z(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 _(m,{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:Z(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 u(e,n){return n.phone?e.unshift({label:"Match desktop",value:"",picture:/* @__PURE__ */_(E,{})}):n.inherit&&e.unshift({label:n.inherit,value:""}),e}function c(e,n){return n.inherit||n.phone?{...e,render:n=>e.render({...n,onChange:e=>n.onChange(""===e?void 0:e)})}:e}function d(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)),[g(e)]:o("mobile",n({...l,phone:!0},""))}}function p(e){return u(V(e.allow??Ne).map(e=>({label:e.label,value:e.value,picture:e.icon})),e)}function h(e,n=e.fallback??"left",t){return c(s(e.label??"Text alignment",/* @__PURE__ */_(x,{}),p(e),n,t?{followsLabel:t}:{}),e)}function v(e){const n={left:$e.x.start,center:$e.x.center,right:$e.x.end};return u(V((e.allow??Ne).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 c(s(e.label??"Block alignment",/* @__PURE__ */_(C,{}),v(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 _(m,{label:e(t),icon:ne(l),children:/* @__PURE__ */_(Je,{say:e,kind:n,label:t,options:c,value:p,onChange:s,o:i})})}}}function w(e={}){return k("justify","Justify",/* @__PURE__ */_(C,{}),ie,ie[0].value,e)}function O(e={}){return k("align","Item alignment",/* @__PURE__ */_($,{}),re,"stretch",e)}function S(){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 _(m,{label:e(n),labelId:i,icon:/* @__PURE__ */_(j,{}),action:/* @__PURE__ */_(f,{checked:(r=t,!0===r||"wrap"===r),onChange:e=>l(e?ue[0].value:ue[1].value),ariaLabelledBy:i})});var r}}}function P({offered:e,fallback:n,resolve:t}){const l=t??(t=>e.some(e=>e.value===t)?t:n),o=s(ce,Q("`Direction` names how a container’s children run — a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; the shell’s own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),e.map(e=>({label:e.label,value:e.value})),l(void 0));return{type:"custom",render:e=>o.render({...e,value:l(e.value),onChange:n=>e.onChange(n)})}}function I({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 R(n,{fallback:t=me,pointsFor:l}={}){return{type:"custom",render:({value:o,onChange:a})=>{const i=ge(o,t);return l?/* @__PURE__ */_(Ge,{say:e,label:n,value:i,onChange:a,pointsFor:l}):Be(e,{label:n,value:i,onChange:a,points:ve})}}}function A(n){return{[n.keys.x]:{type:"custom",render:()=>/* @__PURE__ */_(Te,{say:e,o:n})},[n.keys.y]:{...a({type:"custom",render:()=>/* @__PURE__ */_(i,{})},"always"),reachedBy:n.keys.x}}}function M(n={}){const t={...Ce,...n.keys},l={keys:t,phoneKeys:Object.fromEntries(xe.map(e=>[e,g(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 u=n=>{const t={type:"custom",render:t=>/* @__PURE__ */_(He,{say:e,tier:n,o:l,props:t})};return r?o(n,t):t},c=()=>a({type:"custom",render:()=>/* @__PURE__ */_(i,{})},"always"),d=xe.filter(e=>"top"!==e);return te({...s,[l.keys.top]:u("desktop"),...r?{[l.phoneKeys.top]:u("mobile")}:{},...Object.fromEntries(d.map(e=>[l.keys[e],{...c(),reachedBy:l.keys.top}])),...r?Object.fromEntries(d.map(e=>[l.phoneKeys[e],o("mobile",c())])):{}})}return{slider:n,select:function(n,t,o,a,i){return{type:"custom",options:o,fallback:a,...i?{note:i}:{},...r({},{type:"select",label:n}),render:r=>{const{value:s,onChange:u,field:c}=r,d=c.options??o,p=c.fallback??a,f=d.some(e=>e.value===s),h="follows"in r,v=h?d.find(e=>e.value===r.follows)??d.find(e=>e.value===p):void 0,g=f?s:v?.value??p,y=!0===r.readOnly;/* @__PURE__ */
16
- return _(m,{label:e(n),icon:ne(t),action:h?/* @__PURE__ */_(l,{label:e(n),changed:null!=s&&""!==s,detail:v?Z(e,e(v.label)):void 0,disabled:y,onReset:()=>u(void 0)}):void 0,children:/* @__PURE__ */_(b,{value:g,ariaLabel:e(n),readOnly:y,onChange:u,options:[...i?[{label:e(i),value:"\0note",disabled:!0}]:[],...d.map(n=>({label:e(n.label),value:n.value}))]})})}}},Segmented:t,segmented:s,boxJustifyField:w,boxAlignField:O,boxWrapField:S,directionField:P,gapField:I,placementField:R,PlacementGridView:function(n){return Be(e,n)},positionFields:A,sidesPaddingFields:M,alignmentField:function(e={},n=e.fallback??"left"){return h(e,n)},alignmentFields:function(e="align",n={}){return d(e,h,p,n)},AlignmentStrip:function({opts:e={},value:n,onChange:l,ariaLabel:o,disabled:a=!1}){return t({options:p(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 d(e,y,v,n)},BlockAlignmentStrip:function({opts:e={},value:n,onChange:l,ariaLabel:o,disabled:a=!1}){return t({options:v(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:R("Placement",e.placement),width:n("Width",/* @__PURE__ */_(L,{}),t.min,t.max,t.step,t.fallback,"%"),direction:P(o),gap:I(e.gap??pe),justify:w(i),align:O(i),wrap:S(),_gNudge:oe("Nudge"),...A({keys:e.nudge?.keys??{x:"nudgeX",y:"nudgeY"},min:-l,max:l,label:null}),...M(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,Ie as FLAT_ACCESS,ve as OPEN_PLACEMENT_POINTS,Re as PHONE_KEY_ACCESS,cn as PlacementGridView,Ce as SIDE_PAD_KEYS,nn as Segmented,Ze 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,Se as objectAccess,Z as onDesktopWords,Ae 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,Ee as useAccessValue};
@@ -1 +0,0 @@
1
- import{useSectionOps as o}from"./chunk-6REU2VRA.js";import{SELECTION_MODE as e}from"./chunk-7IYL2J5L.js";import{useEasel as r}from"./chunk-Z3HNIJ7N.js";import{usePreviewParts as t}from"./chunk-467WWV4I.js";import{decodePartId as n,encodePartId as p}from"./chunk-R4AUZVA3.js";import{useCallback as d,useEffect as c}from"react";var s=o=>"part"===o.kind;function m({mode:m,setMode:i,onOpenPart:I}){const{getSelectorForId:a}=r(o=>o),u=o(),{setSelectedPartId:f,setSelectHandler:k}=t(),l=d(o=>{const r=n(o);if(!r)return;const{nodeId:t,propKey:p}=r;p?(i(o=>s(o)&&o.nodeId===t&&o.propKey===p?o:{kind:"part",nodeId:t,propKey:p}),I?.(t)):i(o=>"part"===o.kind?e:o)},[i,I]);c(()=>{k(l)},[k,l]);const h=s(m)?p(m.nodeId,m.propKey):null;c(()=>{f(h)},[h,f]);return{selectNode:d(o=>{i(()=>e);const r=a(o);r&&u.select(r)},[i,a,u]),openPartId:h}}export{m as usePartBridge};
@@ -1 +0,0 @@
1
- import{parseZoneKey as t}from"./chunk-EUFDQ4KL.js";import{repeatWrapperAt as e,REPEAT_ATTRIBUTE as r,REPEAT_INDEX_ATTRIBUTE as n}from"./chunk-7UFKEX72.js";var o=`[${r}][${n}]`;function l(l){const c=e(l);if(!c)return null;let i;try{i=t(c.zone)}catch{return null}if(!i.parentId||!i.slot)return null;const{wrapper:a,zone:p,index:f}=c;let s=a.parentElement;for(let t=a.parentElement;t;t=t.parentElement)if(t.getAttribute("data-easel-block")===i.parentId){s=t;break}const d=/* @__PURE__ */new Set;for(const t of Array.from(s?.querySelectorAll(o)??[]))t.getAttribute(r)===p&&d.add(t.getAttribute(n)??"");const m={ownerId:i.parentId,slot:i.slot,index:f,count:Math.max(d.size,f+1)},y=a.parentElement?u(a.parentElement):null;return y&&(m.outer=y),{copy:m,wrapper:a}}function u(t){return l(t)?.copy??null}function c(t,e){return t&&e?t.ownerId===e.ownerId&&t.slot===e.slot&&t.index===e.index&&c(t.outer,e.outer):t===e}function i(t,e){for(const r of Array.from(t.querySelectorAll(o))){if(r.getAttribute(n)!==String(e.index))continue;const t=l(r);if(t?.wrapper===r&&c(t.copy,e))return r}return null}export{i as findCopy,u as repeatCopyAt,l as repeatCopyWithWrapper};
@@ -1,4 +0,0 @@
1
- import{useAccessPatch as e,FLAT_ACCESS as o,onDesktopWords as r,useAccessValue as t}from"./chunk-IYMVIA2B.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{DEFAULT_PANEL_WORDS as d,DEFAULT_COLOUR_ROW_WORDS as u}from"./chunk-56ID6FKZ.js";import{SettingsField as p}from"./chunk-MIX7EGRG.js";import{useWords as y}from"./chunk-MFIRYGHW.js";import{normalizeCornerSides as h,CORNER_SIDES as f}from"./chunk-PLTTPHK5.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 B({o:t,say:s,props:l}){const i=y("colourRow",u),c=y("panel",d),a=t.useFollows(),p=t.usePresets?.(),h=t.opacity?.useUnset?.()??100,f=v(t,l),[m,b]=k(f,l),[g,j]=F(f,t.opacity?.key),B=e(f.access??o),C="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,x=t.access||A?void 0:"";/* @__PURE__ */
2
- return w(n,{label:s(t.label),icon:t.icon,hint:t.hint,value:C,onChange:e=>b(""===e?x:e),inherited:T,presets:p,changed:""!==C||O,onReset:()=>{O&&t.opacity?B([[t.key,x],[t.opacity.key,void 0]]):b(x)},resetTo:A?r(s,T.toUpperCase()):t.resetTo?t.resetTo(a.toUpperCase()):a.toUpperCase(),...t.opacity?{opacity:O?g:h,onOpacityChange:e=>j(e)}:{},readOnly:l.readOnly,words:i,resetWords:c})}var C=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:{},y="number"==typeof u.width?u.width:s.width,h="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(p,{label:o("Border"),icon:/* @__PURE__ */w(b,{}),action:d?/* @__PURE__ */w(i,{label:o("Border"),changed:f,detail:r(o,`${y}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:y,right:y,bottom:y,left:y},style:u.style??"solid",color:h},presets:[h],words:m,styles:e.styles??!1,max:20,readOnly:t.readOnly})})}var A=40,T=()=>null;function x({o:r,say:t,props:l}){const n=y("panel",d),c=r.useFollows(),[a,u]=k(r,l),[b,g]=F(r,r.sidesKey),v=e(r.access??o),j=r.access?void 0:null,B="number"==typeof a&&Number.isFinite(a)?a:null,C=h((r.useFollowsSides??T)())??[...f],O=h(b)??C,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(p,{label:t("Corners"),icon:/* @__PURE__ */w(m,{}),changed:null!==B||Array.isArray(b),action:/* @__PURE__ */w(i,{label:t("Corners"),changed:null!==B||Array.isArray(b),detail:`${c}px`,onReset:()=>Array.isArray(b)?v([[r.key,j],[r.sidesKey,j]]):u(j),words:n}),children:/* @__PURE__ */w(s,{label:t("Corners"),value:O,corners:A,onChange:e=>{const o=f.filter(o=>e.includes(o)),r=o.length===C.length&&o.every(e=>C.includes(e));g(r?j:o)},radius:B,onRadiusChange:e=>u(e??j),radiusMin:0,radiusMax:40,radiusStep:r.step??1,radiusPlaceholder:String(c),disabled:l.readOnly})})}function I(e=g){return{colourField:o=>({type:"custom",render:r=>/* @__PURE__ */w(B,{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(x,{o:o,say:e,props:r})})}}var{colourField:R,borderField:M,cornersField:D}=I();export{C as BORDER_WIDTH_MAX,A as CORNER_RADIUS_MAX,M as borderField,R as colourField,D as cornersField,j as keptByRow,I as styleFieldBuilders};