efficient-easel 27.0.0 → 27.1.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 (137) hide show
  1. package/dist/blocks/index.d.ts +1 -1
  2. package/dist/canvas/index.d.ts +2 -1
  3. package/dist/canvas/index.js +1 -1
  4. package/dist/chrome/index.js +1 -1
  5. package/dist/{chunk-PVBDKBJB.js → chunk-2EEYFRQM.js} +1 -1
  6. package/dist/{chunk-TYTMUHUK.js → chunk-3FANFZ4D.js} +1 -1
  7. package/dist/{chunk-CWELHADJ.js → chunk-3OOYGEJY.js} +1 -1
  8. package/dist/{chunk-JIP5JNRB.js → chunk-5HYVOOH3.js} +1 -1
  9. package/dist/chunk-6GJEOER4.js +1 -0
  10. package/dist/{chunk-6ATIYLUL.js → chunk-6V6LC7QV.js} +1 -1
  11. package/dist/{chunk-KO47WAWR.js → chunk-7YXWWMBM.js} +1 -1
  12. package/dist/{chunk-GR3XRILS.js → chunk-A5USZ6Z6.js} +1 -1
  13. package/dist/{chunk-Y2T3JX7K.js → chunk-ANBPE45L.js} +1 -1
  14. package/dist/{chunk-KFWNGPW3.js → chunk-C63IB4VW.js} +5 -5
  15. package/dist/chunk-DTEYSPJE.js +64 -0
  16. package/dist/{chunk-YYD257TD.js → chunk-G7J6SGMF.js} +1 -1
  17. package/dist/chunk-GJ427TZL.js +8 -0
  18. package/dist/chunk-J5VPNHOW.js +1 -0
  19. package/dist/{chunk-QZJKWKGH.js → chunk-JUJEVGLY.js} +1 -1
  20. package/dist/chunk-L36E2WCO.js +19 -0
  21. package/dist/chunk-LAJYMOY3.js +1 -0
  22. package/dist/{chunk-K53PQAMP.js → chunk-LDHUPZBK.js} +1 -1
  23. package/dist/{chunk-SBVIW3KJ.js → chunk-MTWQYLJE.js} +1 -1
  24. package/dist/chunk-OB4KI2AN.js +2 -0
  25. package/dist/{chunk-W3UZNKGS.js → chunk-P3HXHLES.js} +4 -4
  26. package/dist/{chunk-3XECMGXX.js → chunk-QEEW4X64.js} +1 -1
  27. package/dist/{chunk-AAZIMKLQ.js → chunk-QPNNWQ24.js} +1 -1
  28. package/dist/{chunk-BFJAEQZ6.js → chunk-RTMDZJNE.js} +1 -1
  29. package/dist/chunk-SDSBXW3V.js +26 -0
  30. package/dist/chunk-SEC6NV6Y.js +18 -0
  31. package/dist/{chunk-5JNVMCCB.js → chunk-SEH3Q3EL.js} +1 -1
  32. package/dist/{chunk-QTHQPJWA.js → chunk-TF6NAIV7.js} +1 -1
  33. package/dist/{chunk-6EDVZBUO.js → chunk-TQUEVJOO.js} +1 -1
  34. package/dist/{chunk-2262JGFV.js → chunk-TUIBPB77.js} +5 -5
  35. package/dist/chunk-UMTUKSE6.js +1 -0
  36. package/dist/chunk-VNUXFD4X.js +1 -0
  37. package/dist/{chunk-VBEVZZTV.js → chunk-VTY7OQB5.js} +11 -11
  38. package/dist/{chunk-76MUJIZE.js → chunk-WL57KM5C.js} +17 -17
  39. package/dist/{chunk-NTG5ODKZ.js → chunk-WW24O7HT.js} +1 -1
  40. package/dist/{chunk-ZFEAWEFS.js → chunk-XESNAMI3.js} +3 -3
  41. package/dist/chunk-XT75WETI.js +1 -0
  42. package/dist/{chunk-YES5F7OS.js → chunk-XV5D4V2T.js} +1 -1
  43. package/dist/chunk-YDTEYXQW.js +1 -0
  44. package/dist/copy/index.js +11 -11
  45. package/dist/data/index.d.ts +2 -1
  46. package/dist/data/index.js +1 -1
  47. package/dist/drag/index.js +1 -1
  48. package/dist/easel/index.d.ts +1 -1
  49. package/dist/easel/index.js +1 -1
  50. package/dist/edit-lock/index.js +1 -1
  51. package/dist/fields/fields.css +8 -0
  52. package/dist/fields/index.d.ts +47 -3
  53. package/dist/fields/index.js +1 -1
  54. package/dist/node-ops/index.js +1 -1
  55. package/dist/phone-order-CRKvsTsz.d.ts +141 -0
  56. package/dist/screen/components/AddBlockRow.js +1 -1
  57. package/dist/screen/components/AddSidePanel.d.ts +1 -1
  58. package/dist/screen/components/AddSidePanel.js +1 -1
  59. package/dist/screen/components/NodeContextMenu.d.ts +1 -1
  60. package/dist/screen/components/NodeContextMenu.js +1 -1
  61. package/dist/screen/components/PageEditGuardNotices.js +1 -1
  62. package/dist/screen/components/SaveControls.d.ts +1 -1
  63. package/dist/screen/components/SaveControls.js +1 -1
  64. package/dist/screen/components/ScreenChrome.js +1 -1
  65. package/dist/screen/components/ScreenDocumentContext.d.ts +1 -1
  66. package/dist/screen/components/ScreenDocumentContext.js +1 -1
  67. package/dist/screen/components/ScreenMount.d.ts +1 -1
  68. package/dist/screen/components/ScreenMount.js +1 -1
  69. package/dist/screen/components/ScreenStoreProvider.d.ts +1 -1
  70. package/dist/screen/components/ScreenStoreProvider.js +1 -1
  71. package/dist/screen/components/SectionScreenShell.js +17 -17
  72. package/dist/screen/components/SidePanelHead.js +1 -1
  73. package/dist/screen/components/panel-widths.js +1 -1
  74. package/dist/screen/components/usePartBridge.d.ts +1 -1
  75. package/dist/screen/components/usePartBridge.js +1 -1
  76. package/dist/screen/index.d.ts +1 -1
  77. package/dist/screen/index.js +1 -1
  78. package/dist/screen/lib/admin-bridge.d.ts +1 -1
  79. package/dist/screen/lib/document/block-set-host.js +1 -1
  80. package/dist/screen/lib/document/block-size-fields.d.ts +1 -1
  81. package/dist/screen/lib/document/block-size-fields.js +1 -1
  82. package/dist/screen/lib/document/block-types-in.js +1 -1
  83. package/dist/screen/lib/document/box-fields.d.ts +1 -1
  84. package/dist/screen/lib/document/box-fields.js +1 -1
  85. package/dist/screen/lib/document/button-fields.d.ts +1 -1
  86. package/dist/screen/lib/document/button-fields.js +1 -1
  87. package/dist/screen/lib/document/image-fields.d.ts +1 -1
  88. package/dist/screen/lib/document/image-fields.js +5 -5
  89. package/dist/screen/lib/document/palette-sections.d.ts +1 -1
  90. package/dist/screen/lib/document/section-doc.d.ts +1 -1
  91. package/dist/screen/lib/document/section-doc.js +1 -1
  92. package/dist/screen/lib/document/shadow-fields.d.ts +1 -1
  93. package/dist/screen/lib/document/shadow-fields.js +2 -2
  94. package/dist/screen/lib/document/style-clipboard.d.ts +1 -1
  95. package/dist/screen/lib/document/style-clipboard.js +1 -1
  96. package/dist/screen/lib/document/style-fields.d.ts +1 -1
  97. package/dist/screen/lib/document/style-fields.js +1 -1
  98. package/dist/screen/lib/document/use-section-ops.d.ts +1 -1
  99. package/dist/screen/lib/document/use-section-ops.js +1 -1
  100. package/dist/screen/lib/document-addressing.d.ts +1 -1
  101. package/dist/screen/lib/document-hooks.d.ts +1 -1
  102. package/dist/screen/lib/document-switch.js +1 -1
  103. package/dist/screen/lib/failure.js +1 -1
  104. package/dist/screen/lib/host-inbound.js +1 -1
  105. package/dist/screen/lib/host.d.ts +1 -1
  106. package/dist/screen/lib/key-scope.js +1 -1
  107. package/dist/screen/lib/media-panel.d.ts +1 -1
  108. package/dist/screen/lib/media-picker.d.ts +1 -1
  109. package/dist/screen/lib/media-picker.js +1 -1
  110. package/dist/screen/lib/page-lock.d.ts +1 -1
  111. package/dist/screen/lib/page-lock.js +1 -1
  112. package/dist/screen/lib/screen-parts.d.ts +1 -1
  113. package/dist/screen/lib/screen-parts.js +1 -1
  114. package/dist/screen/lib/section-templates.d.ts +1 -1
  115. package/dist/screen/lib/session-context.d.ts +1 -1
  116. package/dist/screen/lib/session.d.ts +1 -1
  117. package/dist/screen/lib/shared-sections.d.ts +1 -1
  118. package/dist/strings/index.d.ts +1 -1
  119. package/dist/strings/index.js +2 -2
  120. package/dist/style-clipboard/index.js +1 -1
  121. package/dist/text-styles/index.js +27 -27
  122. package/dist/{words-CFkb8XtN.d.ts → words-dNm6REMa.d.ts} +21 -0
  123. package/package.json +1 -1
  124. package/dist/chunk-3W2O22DZ.js +0 -19
  125. package/dist/chunk-5OWAV3MH.js +0 -1
  126. package/dist/chunk-DAKKPW2Z.js +0 -1
  127. package/dist/chunk-EUFDQ4KL.js +0 -1
  128. package/dist/chunk-FW35PCK7.js +0 -1
  129. package/dist/chunk-HG65R6IN.js +0 -20
  130. package/dist/chunk-JACEEVVF.js +0 -1
  131. package/dist/chunk-JQQFB7EZ.js +0 -1
  132. package/dist/chunk-L2WK5JYB.js +0 -2
  133. package/dist/chunk-L7PSERQH.js +0 -8
  134. package/dist/chunk-O4OWODU2.js +0 -64
  135. package/dist/chunk-SQTVXE5D.js +0 -18
  136. package/dist/chunk-TOKMFZPB.js +0 -1
  137. package/dist/resolve-Bz4mszpL.d.ts +0 -57
@@ -15,7 +15,7 @@ import './block-choice.js';
15
15
  import '../../../blocks/index.js';
16
16
  import '../../../types-BljCVdzR.js';
17
17
  import '../../../data/index.js';
18
- import '../../../resolve-Bz4mszpL.js';
18
+ import '../../../phone-order-CRKvsTsz.js';
19
19
  import '../../../plan-D0DgSLnY.js';
20
20
  import '../../../types-SrGNzYeO.js';
21
21
  import '../../../types-Cy7rdmXt.js';
@@ -1 +1 @@
1
- export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-FW35PCK7.js";import"../../../chunk-5XL2RXFU.js";import"../../../chunk-3QB2ZQXK.js";import"../../../chunk-ZNLODQD4.js";import"../../../chunk-22I55W37.js";import"../../../chunk-G2VZ4DET.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";
1
+ export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-VNUXFD4X.js";import"../../../chunk-5XL2RXFU.js";import"../../../chunk-3QB2ZQXK.js";import"../../../chunk-ZNLODQD4.js";import"../../../chunk-22I55W37.js";import"../../../chunk-G2VZ4DET.js";import"../../../chunk-3OOYGEJY.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-YDTEYXQW.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";
@@ -13,7 +13,7 @@ import '../../../blocks/index.js';
13
13
  import '../../../types-BljCVdzR.js';
14
14
  import '../../../data/index.js';
15
15
  import '../../../types-Dq180WRV.js';
16
- import '../../../resolve-Bz4mszpL.js';
16
+ import '../../../phone-order-CRKvsTsz.js';
17
17
  import '../../../plan-D0DgSLnY.js';
18
18
  import '../document-contract.js';
19
19
  import '../document-switch.js';
@@ -1 +1 @@
1
- export{BORDER_WIDTH_MAX,CORNER_RADIUS_MAX,borderField,colourField,cornersField,keptByRow,styleFieldBuilders}from"../../../chunk-ZFEAWEFS.js";import"../../../chunk-76MUJIZE.js";import"../../../chunk-XWTQTANN.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-ZNLODQD4.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-G2VZ4DET.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";export{CORNER_SIDES}from"../../../chunk-PLTTPHK5.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-3W2O22DZ.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-DIOTWSCO.js";import"../../../chunk-MNQDOSAX.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";
1
+ export{BORDER_WIDTH_MAX,CORNER_RADIUS_MAX,borderField,colourField,cornersField,keptByRow,styleFieldBuilders}from"../../../chunk-XESNAMI3.js";import"../../../chunk-WL57KM5C.js";import"../../../chunk-XWTQTANN.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-ZNLODQD4.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-G2VZ4DET.js";import"../../../chunk-3OOYGEJY.js";import"../../../chunk-6WY6ZXJG.js";export{CORNER_SIDES}from"../../../chunk-PLTTPHK5.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-L36E2WCO.js";import"../../../chunk-XT75WETI.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-D4TH4QQR.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-LDHUPZBK.js";import"../../../chunk-TF6NAIV7.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-DIOTWSCO.js";import"../../../chunk-MNQDOSAX.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-C63IB4VW.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-UMTUKSE6.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-YDTEYXQW.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-6GJEOER4.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-BSPCSC45.js";
@@ -5,7 +5,7 @@ import '../../../types-Dq180WRV.js';
5
5
  import 'react';
6
6
  import '../../../types-BljCVdzR.js';
7
7
  import '../../../data/index.js';
8
- import '../../../resolve-Bz4mszpL.js';
8
+ import '../../../phone-order-CRKvsTsz.js';
9
9
 
10
10
  type NodeSelector = {
11
11
  index: number;
@@ -1 +1 @@
1
- export{useSectionOps}from"../../../chunk-TYTMUHUK.js";import"../../../chunk-2262JGFV.js";import"../../../chunk-NCXYC7WI.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-TCAAOYQY.js";import"../../../chunk-3W2O22DZ.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-HG65R6IN.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-TDEBPOWV.js";import"../../../chunk-WHS6Y55E.js";import"../../../chunk-D4TH4QQR.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-FIVU2COQ.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-MNQDOSAX.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-Y2T3JX7K.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-3XECMGXX.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";
1
+ export{useSectionOps}from"../../../chunk-3FANFZ4D.js";import"../../../chunk-TUIBPB77.js";import"../../../chunk-NCXYC7WI.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-TCAAOYQY.js";import"../../../chunk-L36E2WCO.js";import"../../../chunk-XT75WETI.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-SDSBXW3V.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-TDEBPOWV.js";import"../../../chunk-WHS6Y55E.js";import"../../../chunk-D4TH4QQR.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-LDHUPZBK.js";import"../../../chunk-FIVU2COQ.js";import"../../../chunk-TF6NAIV7.js";import"../../../chunk-MNQDOSAX.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-ANBPE45L.js";import"../../../chunk-C63IB4VW.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-UMTUKSE6.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-QEEW4X64.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-YDTEYXQW.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-6GJEOER4.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";
@@ -6,7 +6,7 @@ import '../../blocks/index.js';
6
6
  import '../../types-BljCVdzR.js';
7
7
  import '../../data/index.js';
8
8
  import '../../types-Dq180WRV.js';
9
- import '../../resolve-Bz4mszpL.js';
9
+ import '../../phone-order-CRKvsTsz.js';
10
10
  import '../../plan-D0DgSLnY.js';
11
11
  import './document-switch.js';
12
12
  import '../../engine-CvXpFE86.js';
@@ -4,7 +4,7 @@ import 'react';
4
4
  import '../../types-BljCVdzR.js';
5
5
  import '../../data/index.js';
6
6
  import '../../types-Dq180WRV.js';
7
- import '../../resolve-Bz4mszpL.js';
7
+ import '../../phone-order-CRKvsTsz.js';
8
8
  import '../../plan-D0DgSLnY.js';
9
9
 
10
10
  /**
@@ -1 +1 @@
1
- export{resetForDocumentSwitch,saveStatusForNewDocument,saveStatusOf}from"../../chunk-6ATIYLUL.js";import"../../chunk-YYD257TD.js";import"../../chunk-RE4LP46F.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
1
+ export{resetForDocumentSwitch,saveStatusForNewDocument,saveStatusOf}from"../../chunk-6V6LC7QV.js";import"../../chunk-G7J6SGMF.js";import"../../chunk-RE4LP46F.js";import"../../chunk-YDTEYXQW.js";import"../../chunk-KXM6YRG2.js";
@@ -1 +1 @@
1
- export{PAGE_CONFLICT_CODE,isExpiredSession,readEaselFailure}from"../../chunk-KO47WAWR.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-YYD257TD.js";import"../../chunk-RE4LP46F.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
1
+ export{PAGE_CONFLICT_CODE,isExpiredSession,readEaselFailure}from"../../chunk-7YXWWMBM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-G7J6SGMF.js";import"../../chunk-RE4LP46F.js";import"../../chunk-YDTEYXQW.js";import"../../chunk-KXM6YRG2.js";
@@ -1 +1 @@
1
- export{routeSharedHostMessage}from"../../chunk-QZJKWKGH.js";import"../../chunk-JIP5JNRB.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
1
+ export{routeSharedHostMessage}from"../../chunk-JUJEVGLY.js";import"../../chunk-5HYVOOH3.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-YDTEYXQW.js";import"../../chunk-KXM6YRG2.js";
@@ -4,7 +4,7 @@ import '../../blocks/index.js';
4
4
  import '../../types-BljCVdzR.js';
5
5
  import '../../data/index.js';
6
6
  import '../../types-Dq180WRV.js';
7
- import '../../resolve-Bz4mszpL.js';
7
+ import '../../phone-order-CRKvsTsz.js';
8
8
  import '../../plan-D0DgSLnY.js';
9
9
  import './document-contract.js';
10
10
  import './document-switch.js';
@@ -1 +1 @@
1
- export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-BFJAEQZ6.js";import"../../chunk-LX23TCTP.js";import"../../chunk-3W2O22DZ.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-K53PQAMP.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-MNQDOSAX.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
1
+ export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-RTMDZJNE.js";import"../../chunk-LX23TCTP.js";import"../../chunk-L36E2WCO.js";import"../../chunk-XT75WETI.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-LDHUPZBK.js";import"../../chunk-TF6NAIV7.js";import"../../chunk-MNQDOSAX.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-YDTEYXQW.js";import"../../chunk-KXM6YRG2.js";import"../../chunk-6GJEOER4.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";
@@ -5,7 +5,7 @@ import '../../blocks/index.js';
5
5
  import '../../types-BljCVdzR.js';
6
6
  import '../../data/index.js';
7
7
  import '../../types-Dq180WRV.js';
8
- import '../../resolve-Bz4mszpL.js';
8
+ import '../../phone-order-CRKvsTsz.js';
9
9
  import '../../plan-D0DgSLnY.js';
10
10
  import './document-contract.js';
11
11
  import './document-switch.js';
@@ -4,7 +4,7 @@ import '../../blocks/index.js';
4
4
  import '../../types-BljCVdzR.js';
5
5
  import '../../data/index.js';
6
6
  import '../../types-Dq180WRV.js';
7
- import '../../resolve-Bz4mszpL.js';
7
+ import '../../phone-order-CRKvsTsz.js';
8
8
  import '../../plan-D0DgSLnY.js';
9
9
  import './document-contract.js';
10
10
  import './document-switch.js';
@@ -1 +1 @@
1
- export{requestMediaPick,resolveMediaPick}from"../../chunk-JIP5JNRB.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
1
+ export{requestMediaPick,resolveMediaPick}from"../../chunk-5HYVOOH3.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-YDTEYXQW.js";import"../../chunk-KXM6YRG2.js";
@@ -5,7 +5,7 @@ import 'react';
5
5
  import '../../types-BljCVdzR.js';
6
6
  import '../../data/index.js';
7
7
  import '../../types-Dq180WRV.js';
8
- import '../../resolve-Bz4mszpL.js';
8
+ import '../../phone-order-CRKvsTsz.js';
9
9
  import '../../plan-D0DgSLnY.js';
10
10
  import './backend-error.js';
11
11
  import './host-chrome.js';
@@ -1 +1 @@
1
- export{editLockOf,pageEditLock}from"../../chunk-GR3XRILS.js";import"../../chunk-KO47WAWR.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-YYD257TD.js";import"../../chunk-RE4LP46F.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
1
+ export{editLockOf,pageEditLock}from"../../chunk-A5USZ6Z6.js";import"../../chunk-7YXWWMBM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-G7J6SGMF.js";import"../../chunk-RE4LP46F.js";import"../../chunk-YDTEYXQW.js";import"../../chunk-KXM6YRG2.js";
@@ -21,7 +21,7 @@ import { SlotConfigView, SlotChild } from './document/content-tree.js';
21
21
  import '../../words-SD4neL0n.js';
22
22
  import '../../types-BljCVdzR.js';
23
23
  import '../../data/index.js';
24
- import '../../resolve-Bz4mszpL.js';
24
+ import '../../phone-order-CRKvsTsz.js';
25
25
  import '../../plan-D0DgSLnY.js';
26
26
  import '../../edit-lock/index.js';
27
27
  import '../../panelWidths-DgQXiPXU.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-2262JGFV.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-3W2O22DZ.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-HG65R6IN.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-TDEBPOWV.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-D4TH4QQR.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-MNQDOSAX.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-JACEEVVF.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
1
+ export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSelectionMode,isSlotMode,sameInspectorMode,screenSlotsOf,shownChildSlotsOf,shownSlotFieldsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-TUIBPB77.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-L36E2WCO.js";import"../../chunk-XT75WETI.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-SDSBXW3V.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-TDEBPOWV.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-D4TH4QQR.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-LDHUPZBK.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-TF6NAIV7.js";import"../../chunk-MNQDOSAX.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-ANBPE45L.js";import"../../chunk-C63IB4VW.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-UMTUKSE6.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-QEEW4X64.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-YDTEYXQW.js";import"../../chunk-KXM6YRG2.js";import"../../chunk-6GJEOER4.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";
@@ -6,7 +6,7 @@ import 'react';
6
6
  import '../../types-BljCVdzR.js';
7
7
  import '../../data/index.js';
8
8
  import '../../types-Dq180WRV.js';
9
- import '../../resolve-Bz4mszpL.js';
9
+ import '../../phone-order-CRKvsTsz.js';
10
10
  import '../../plan-D0DgSLnY.js';
11
11
  import './backend-error.js';
12
12
  import '../../edit-lock/index.js';
@@ -5,7 +5,7 @@ import '../../blocks/index.js';
5
5
  import '../../types-BljCVdzR.js';
6
6
  import '../../data/index.js';
7
7
  import '../../types-Dq180WRV.js';
8
- import '../../resolve-Bz4mszpL.js';
8
+ import '../../phone-order-CRKvsTsz.js';
9
9
  import '../../plan-D0DgSLnY.js';
10
10
  import './backend-error.js';
11
11
  import '../../edit-lock/index.js';
@@ -9,7 +9,7 @@ import 'react';
9
9
  import '../../types-BljCVdzR.js';
10
10
  import '../../data/index.js';
11
11
  import '../../types-Dq180WRV.js';
12
- import '../../resolve-Bz4mszpL.js';
12
+ import '../../phone-order-CRKvsTsz.js';
13
13
  import '../../plan-D0DgSLnY.js';
14
14
  import '../../edit-lock/index.js';
15
15
  import './links/link-filters.js';
@@ -6,7 +6,7 @@ import 'react';
6
6
  import '../../types-BljCVdzR.js';
7
7
  import '../../data/index.js';
8
8
  import '../../types-Dq180WRV.js';
9
- import '../../resolve-Bz4mszpL.js';
9
+ import '../../phone-order-CRKvsTsz.js';
10
10
  import '../../plan-D0DgSLnY.js';
11
11
  import './backend-error.js';
12
12
  import '../../edit-lock/index.js';
@@ -3,7 +3,7 @@ import { N as NoticeWords, C as ChromeWords } from '../words-DYu4iBrR.js';
3
3
  import { C as CopyWords } from '../words-Cf5VT2Ic.js';
4
4
  import { D as DragWords } from '../words-SD4neL0n.js';
5
5
  import { LockWords } from '../edit-lock/index.js';
6
- import { F as FieldsWords } from '../words-CFkb8XtN.js';
6
+ import { F as FieldsWords } from '../words-dNm6REMa.js';
7
7
  import { N as NodeMenuWords } from '../words-DMG4dYq2.js';
8
8
  import { P as PageCopyWords } from '../words-Dl8Qja4K.js';
9
9
  import { P as PanelWords, C as ColourRowWords } from '../words-BgeDGDKn.js';
@@ -1,2 +1,2 @@
1
- import{DEFAULT_TEXT_STYLES_WORDS as o}from"../chunk-OGH6CC3E.js";import{DEFAULT_SCREEN_WORDS as r,DEFAULT_IMAGE_ROW_WORDS as n}from"../chunk-G2VZ4DET.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as t}from"../chunk-6WY6ZXJG.js";import{DEFAULT_CANVAS_WORDS as c}from"../chunk-TBY3DFKS.js";import{DEFAULT_TREE_WORDS as e}from"../chunk-K56YDHYQ.js";import{DEFAULT_COLOUR_ROW_WORDS as m,DEFAULT_PANEL_WORDS as i}from"../chunk-56ID6FKZ.js";import{DEFAULT_NODE_MENU_WORDS as s}from"../chunk-WK3AFPXY.js";import{DEFAULT_PAGE_COPY_WORDS as u}from"../chunk-CEC5XLN4.js";import{DEFAULT_SAVE_WORDS as f}from"../chunk-H6DDIBQ4.js";import{DEFAULT_CHROME_WORDS as p,DEFAULT_NOTICE_WORDS as l}from"../chunk-AJSDWWJW.js";import{DEFAULT_RAIL_WORDS as h}from"../chunk-2OAZYSWJ.js";import{DEFAULT_LOCK_WORDS as j}from"../chunk-RE4LP46F.js";import{DEFAULT_COPY_WORDS as a}from"../chunk-PMRN5Z3T.js";import{DEFAULT_FIELDS_WORDS as k}from"../chunk-JACEEVVF.js";import{stringsContext as y}from"../chunk-MFIRYGHW.js";import{DEFAULT_DRAG_WORDS as Y}from"../chunk-TQ5Y6S2X.js";import{useContext as C,useMemo as D}from"react";import{jsx as W}from"react/jsx-runtime";var d={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:t,copy:a,canvas:c,textStyles:o,screen:r,pageCopy:u},g=o=>"object"==typeof o&&null!==o;function v(o,r){const n={};for(const t of Object.keys(o)){const c=o[t],e=r[t];null==e?n[t]=c:g(c)?n[t]=g(e)?v(c,e):c:n[t]=typeof e==typeof c?e:c}return n}function E(o,r){return r?v(o,r):o}function F({value:o,locale:r,children:n}){const t=y(),c=C(t),e=c?.strings??d,m=r??c?.locale??"en",i=D(()=>({strings:E(e,o),locale:m}),[e,o,m]);/* @__PURE__ */
2
- return W(t.Provider,{value:i,children:n})}function J(){return C(y())?.strings??d}function R(){return C(y())?.locale??"en"}export{d as DEFAULT_EASEL_STRINGS,F as EaselStringsProvider,E as mergeEaselStrings,R as useEaselLocale,J as useEaselStrings};
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-G2VZ4DET.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as t}from"../chunk-6WY6ZXJG.js";import{DEFAULT_CANVAS_WORDS as c}from"../chunk-TBY3DFKS.js";import{DEFAULT_TREE_WORDS as e}from"../chunk-K56YDHYQ.js";import{DEFAULT_COLOUR_ROW_WORDS as m,DEFAULT_PANEL_WORDS as i}from"../chunk-56ID6FKZ.js";import{DEFAULT_NODE_MENU_WORDS as s}from"../chunk-WK3AFPXY.js";import{DEFAULT_PAGE_COPY_WORDS as u}from"../chunk-CEC5XLN4.js";import{DEFAULT_SAVE_WORDS as f}from"../chunk-H6DDIBQ4.js";import{DEFAULT_CHROME_WORDS as p,DEFAULT_NOTICE_WORDS as l}from"../chunk-AJSDWWJW.js";import{DEFAULT_RAIL_WORDS as h}from"../chunk-2OAZYSWJ.js";import{DEFAULT_LOCK_WORDS as j}from"../chunk-RE4LP46F.js";import{DEFAULT_COPY_WORDS as a}from"../chunk-PMRN5Z3T.js";import{DEFAULT_FIELDS_WORDS as k}from"../chunk-UMTUKSE6.js";import{stringsContext as y}from"../chunk-MFIRYGHW.js";import{DEFAULT_DRAG_WORDS as Y}from"../chunk-TQ5Y6S2X.js";import{useContext as D,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:t,copy:a,canvas:c,textStyles:o,screen:r,pageCopy:u},v=o=>"object"==typeof o&&null!==o;function C(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)?C(c,e):c:n[t]=typeof e==typeof c?e:c}return n}function S(o,r){return r?C(o,r):o}function E({value:o,locale:r,children:n}){const t=y(),c=D(t),e=c?.strings??g,m=r??c?.locale??"en",i=W(()=>({strings:S(e,o),locale:m}),[e,o,m]);/* @__PURE__ */
2
+ return d(t.Provider,{value:i,children:n})}function F(){return D(y())?.strings??g}function K(){return D(y())?.locale??"en"}export{g as DEFAULT_EASEL_STRINGS,E as EaselStringsProvider,S as mergeEaselStrings,K as useEaselLocale,F as useEaselStrings};
@@ -1 +1 @@
1
- export{COPY_STYLE_SHORTCUT,PASTE_STYLE_SHORTCUT,STYLE_KIND,choiceKind,clearStyle,copyStyle,fieldKind,heldStyle,pasteMessage,planPaste,styleMenuItems,styleShortcut,subscribeStyle,withStyleKind}from"../chunk-CWELHADJ.js";import"../chunk-6WY6ZXJG.js";import"../chunk-EUFDQ4KL.js";import"../chunk-KXM6YRG2.js";
1
+ export{COPY_STYLE_SHORTCUT,PASTE_STYLE_SHORTCUT,STYLE_KIND,choiceKind,clearStyle,copyStyle,fieldKind,heldStyle,pasteMessage,planPaste,styleMenuItems,styleShortcut,subscribeStyle,withStyleKind}from"../chunk-3OOYGEJY.js";import"../chunk-6WY6ZXJG.js";import"../chunk-YDTEYXQW.js";import"../chunk-KXM6YRG2.js";
@@ -1,37 +1,37 @@
1
- import{SettingsDefaultReset as e}from"../chunk-2T22IY3J.js";import{hexReadout as s,typedHex as t}from"../chunk-4FFDGEWA.js";import{DEFAULT_TEXT_STYLES_WORDS as a}from"../chunk-OGH6CC3E.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-OGH6CC3E.js";import{FieldSlider as l}from"../chunk-TDEBPOWV.js";import{DEFAULT_PANEL_WORDS as i}from"../chunk-56ID6FKZ.js";import{TEXT_STYLE_KINDS as n,canAddTextStyle as r,TEXT_STYLE_MAX as o,isDefaultTextStyle as d,CAMPAIGN_TEXT_STYLE_SETTINGS as c,TEXT_STYLE_SETTINGS as u,textStyleViewValues as m,textStyleRowSize as h,describeTextStyle as p,updateTextStyle as f,textStyleCaseCss as v,TEXT_STYLE_VIEW_NUMBERS as g,TEXT_STYLE_CASES as y,addTextStyle as S,removeTextStyle as b,TEXT_STYLE_RANGES as T,textStyleViewKey as N}from"../chunk-53QUHEHK.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,TEXT_STYLE_VIEW_NUMBERS,addTextStyle,canAddTextStyle,defaultTextStyles,describeTextStyle,isDefaultTextStyle,isTextStyleCase,removeTextStyle,resolveTextStyle,textStyleCaseCss,textStyleCaseOfCss,textStyleRowSize,textStyleViewKey,textStyleViewValues,updateTextStyle,weightWord}from"../chunk-53QUHEHK.js";import{viewFollows as k,isAuto as C}from"../chunk-DIOTWSCO.js";import{FieldSelect as x}from"../chunk-KFWNGPW3.js";import{SettingsSegmented as E}from"../chunk-DX3VILZ3.js";import{SettingsField as w}from"../chunk-MIX7EGRG.js";import"../chunk-JACEEVVF.js";import{useWords as O}from"../chunk-MFIRYGHW.js";import{withTip as _}from"../chunk-P2VEMZH5.js";import{hsvToHex as z,Tooltip as j,ColorSwatch as L,Popover as M,ColorPickerPanel as W,colorSwatchClasses as $,IconButton as A,Button as I}from"efficient-shell/ui";import{useId as X,useState as Y,useRef as F,useEffect as G,Fragment as V}from"react";import{TrashIcon as D,ChevronIcon as H,BoldIcon as R,ItalicIcon as B,CaseLowerIcon as K,CaseCapitalizedIcon as U,CaseUpperIcon as P,CaseNormalIcon as q}from"efficient-shell/icons/efficient";import{jsxs as Z,jsx as J,Fragment as Q}from"react/jsx-runtime";var ee=`conic-gradient(${[0,60,120,180,240,300,0].map(e=>z({h:e,s:1,v:1})).join(", ")})`;function se({value:e,hex:t,colours:a,label:l,followsWord:i,anyWord:n,onChange:r,readOnly:o=!1}){const d=void 0!==e&&a.some(s=>s.key===e),c=void 0!==e&&!d;/* @__PURE__ */
1
+ import{SettingsDefaultReset as e}from"../chunk-2T22IY3J.js";import{hexReadout as s,typedHex as t}from"../chunk-4FFDGEWA.js";import{DEFAULT_TEXT_STYLES_WORDS as a}from"../chunk-OGH6CC3E.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-OGH6CC3E.js";import{FieldSlider as l}from"../chunk-TDEBPOWV.js";import{DEFAULT_PANEL_WORDS as i}from"../chunk-56ID6FKZ.js";import{TEXT_STYLE_KINDS as n,canAddTextStyle as r,TEXT_STYLE_MAX as o,isDefaultTextStyle as d,CAMPAIGN_TEXT_STYLE_SETTINGS as c,TEXT_STYLE_SETTINGS as u,textStyleViewValues as m,textStyleRowSize as h,describeTextStyle as p,updateTextStyle as f,textStyleCaseCss as v,TEXT_STYLE_VIEW_NUMBERS as g,TEXT_STYLE_CASES as y,addTextStyle as S,removeTextStyle as b,TEXT_STYLE_RANGES as T,textStyleViewKey as k}from"../chunk-53QUHEHK.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,TEXT_STYLE_VIEW_NUMBERS,addTextStyle,canAddTextStyle,defaultTextStyles,describeTextStyle,isDefaultTextStyle,isTextStyleCase,removeTextStyle,resolveTextStyle,textStyleCaseCss,textStyleCaseOfCss,textStyleRowSize,textStyleViewKey,textStyleViewValues,updateTextStyle,weightWord}from"../chunk-53QUHEHK.js";import{viewFollows as N,isAuto as C}from"../chunk-DIOTWSCO.js";import{FieldSelect as x}from"../chunk-C63IB4VW.js";import{SettingsSegmented as E}from"../chunk-DX3VILZ3.js";import{SettingsField as w}from"../chunk-MIX7EGRG.js";import"../chunk-UMTUKSE6.js";import{useWords as O}from"../chunk-MFIRYGHW.js";import{withTip as _}from"../chunk-P2VEMZH5.js";import{hsvToHex as z,Tooltip as j,ColorSwatch as L,Popover as M,ColorPickerPanel as I,colorSwatchClasses as $,IconButton as W,Button as A}from"efficient-shell/ui";import{useId as X,useState as Y,useRef as D,useEffect as G,Fragment as V}from"react";import{TrashIcon as F,ChevronIcon as H,BoldIcon as R,ItalicIcon as U,CaseLowerIcon as B,CaseCapitalizedIcon as K,CaseUpperIcon as q,CaseNormalIcon as P}from"efficient-shell/icons/efficient";import{jsxs as Z,jsx as Q,Fragment as J}from"react/jsx-runtime";var ee=`conic-gradient(${[0,60,120,180,240,300,0].map(e=>z({h:e,s:1,v:1})).join(", ")})`;function se({value:e,hex:t,colours:a,label:l,followsWord:i,anyWord:n,onChange:r,readOnly:o=!1}){const d=void 0!==e&&a.some(s=>s.key===e),c=void 0!==e&&!d;/* @__PURE__ */
2
2
  return Z("div",{className:"es-ts-set","data-ts-setting":"color",children:[
3
3
  /* @__PURE__ */Z("div",{className:"es-ts-top",children:[
4
- /* @__PURE__ */J("span",{className:"es-ts-sub",children:l}),
5
- /* @__PURE__ */J("span",{className:"es-ts-colour-read",children:t?s(t):i})]}),
6
- /* @__PURE__ */Z("div",{className:"es-ts-swatches",role:"group","aria-label":l,children:[a.map(t=>/* @__PURE__ */J(j,{content:`${t.name} · ${s(t.value)}`,children:/* @__PURE__ */J(L,{color:t.value,size:"sm",className:"es-ts-swatch","aria-label":t.name,selected:e===t.key,disabled:o,onClick:()=>r(t.key)})},t.key)),
7
- /* @__PURE__ */J(j,{content:n,children:/* @__PURE__ */J(M,{trigger:/* @__PURE__ */J("span",{"aria-hidden":"true",className:"absolute inset-0",style:{background:ee}}),triggerLabel:n,triggerClassName:$({size:"sm",selected:c,className:"es-ts-swatch es-ts-swatch--any"}),"aria-label":l,disabled:o,children:/* @__PURE__ */J(W,{className:"es-pick-window",value:t??"",onChange:e=>r(e),label:l,disabled:o})})})]})]})}function te({styles:e,onChange:s,fonts:t,colours:l=[],settings:i=c,auto:u=[],fallback:m,sample:h,openId:p,defaultOpenId:f=null,onOpenChange:v,onAdd:g,rowActions:y,onRemove:T,max:N=o,device:k="desktop",readOnly:C=!1}){const x=O("textStyles",a),E=X(),[w,z]=Y(f),j=void 0!==p?p:w,L=e=>{void 0===p&&z(e),v?.(e)},M=F(null),[W,$]=Y(null);G(()=>{if(!W||!M.current)return;const e=[...M.current.querySelectorAll(".es-ts-item")].find(e=>e.dataset.tsId===W.id),s=e?e.querySelector(".es-ts-row"):M.current.querySelector(`.es-ts-add[data-ts-kind="${W.kind}"]`);s?.focus(),$(null)},[W]);/* @__PURE__ */
8
- return J("div",{className:"es-ts",ref:M,children:n.map(a=>{const n=e.filter(e=>e.kind===a),o=!r(e,a,N),c=!C&&!o;/* @__PURE__ */
4
+ /* @__PURE__ */Q("span",{className:"es-ts-sub",children:l}),
5
+ /* @__PURE__ */Q("span",{className:"es-ts-colour-read",children:t?s(t):i})]}),
6
+ /* @__PURE__ */Z("div",{className:"es-ts-swatches",role:"group","aria-label":l,children:[a.map(t=>/* @__PURE__ */Q(j,{content:`${t.name} · ${s(t.value)}`,children:/* @__PURE__ */Q(L,{color:t.value,size:"sm",className:"es-ts-swatch","aria-label":t.name,selected:e===t.key,disabled:o,onClick:()=>r(t.key)})},t.key)),
7
+ /* @__PURE__ */Q(j,{content:n,children:/* @__PURE__ */Q(M,{trigger:/* @__PURE__ */Q("span",{"aria-hidden":"true",className:"absolute inset-0",style:{background:ee}}),triggerLabel:n,triggerClassName:$({size:"sm",selected:c,className:"es-ts-swatch es-ts-swatch--any"}),"aria-label":l,disabled:o,children:/* @__PURE__ */Q(I,{className:"es-pick-window",value:t??"",onChange:e=>r(e),label:l,disabled:o})})})]})]})}function te({styles:e,onChange:s,fonts:t,colours:l=[],settings:i=c,auto:u=[],fallback:m,sample:h,openId:p,defaultOpenId:f=null,onOpenChange:v,onAdd:g,rowActions:y,onRemove:T,max:k=o,device:N="desktop",readOnly:C=!1}){const x=O("textStyles",a),E=X(),[w,z]=Y(f),j=void 0!==p?p:w,L=e=>{void 0===p&&z(e),v?.(e)},M=D(null),[I,$]=Y(null);G(()=>{if(!I||!M.current)return;const e=[...M.current.querySelectorAll(".es-ts-item")].find(e=>e.dataset.tsId===I.id),s=e?e.querySelector(".es-ts-row"):M.current.querySelector(`.es-ts-add[data-ts-kind="${I.kind}"]`);s?.focus(),$(null)},[I]);/* @__PURE__ */
8
+ return Q("div",{className:"es-ts",ref:M,children:n.map(a=>{const n=e.filter(e=>e.kind===a),o=!r(e,a,k),c=!C&&!o;/* @__PURE__ */
9
9
  return Z(ae,{label:x.groups[a],children:[n.map(a=>{const n=y?.(a),r=null!=n&&!1!==n,o=Boolean(T)&&!C&&!d(a);/* @__PURE__ */
10
- return J(le,{style:a,fonts:t,colours:l,settings:i,auto:u,fallback:m,sample:h,device:k,readOnly:C,open:j===a.id,onOpenChange:e=>L(e?a.id:null),onChange:t=>s(e.map(e=>e.id===t.id?t:e)),actions:o||r?/* @__PURE__ */Z(Q,{children:[o?_(x.remove,/* @__PURE__ */J(A,{variant:"ghost-danger",size:"sm",className:"es-ts-del","aria-label":x.removeNamed({name:a.name}),onClick:()=>(t=>{if(C||!T)return;const a=b(e,t.id,{name:x.styleName});if(!a)return;const l=e.filter(e=>e.kind===t.kind),i=l[l.indexOf(t)+1];j===t.id&&L(null),s(a.styles),T(a.removed),$({id:i?.id??null,kind:t.kind})})(a),children:/* @__PURE__ */J(D,{size:14,"aria-hidden":"true"})})):null,r?n:null]}):null},a.id)}),_(!C&&o?x.full({kind:a,max:N}):void 0,/* @__PURE__ */Z(I,{variant:"link",className:"es-ts-add","data-ts-kind":a,disabled:C,"aria-disabled":!(C||!o)||void 0,"aria-describedby":!C&&o?`${E}-full-${a}`:void 0,onClick:()=>{c&&(t=>{if(C)return;const a=S(e,t,{max:N,name:x.styleName,make:g});a&&s(a.styles)})(a)},children:[
11
- /* @__PURE__ */J("span",{className:"es-ts-add-word",children:x.add[a]}),
12
- /* @__PURE__ */J("span",{className:"es-ts-count",children:x.count({n:n.length,max:N})})]})),C||!o?null:/* @__PURE__ */J("span",{id:`${E}-full-${a}`,className:"es-vh",children:x.full({kind:a,max:N})})]},a)})})}function ae({label:e,children:s}){const t=X();/* @__PURE__ */
10
+ return Q(le,{style:a,fonts:t,colours:l,settings:i,auto:u,fallback:m,sample:h,device:N,readOnly:C,open:j===a.id,onOpenChange:e=>L(e?a.id:null),onChange:t=>s(e.map(e=>e.id===t.id?t:e)),actions:o||r?/* @__PURE__ */Z(J,{children:[o?_(x.remove,/* @__PURE__ */Q(W,{variant:"ghost-danger",size:"sm",className:"es-ts-del","aria-label":x.removeNamed({name:a.name}),onClick:()=>(t=>{if(C||!T)return;const a=b(e,t.id,{name:x.styleName});if(!a)return;const l=e.filter(e=>e.kind===t.kind),i=l[l.indexOf(t)+1];j===t.id&&L(null),s(a.styles),T(a.removed),$({id:i?.id??null,kind:t.kind})})(a),children:/* @__PURE__ */Q(F,{size:14,"aria-hidden":"true"})})):null,r?n:null]}):null},a.id)}),_(!C&&o?x.full({kind:a,max:k}):void 0,/* @__PURE__ */Z(A,{variant:"link",className:"es-ts-add","data-ts-kind":a,disabled:C,"aria-disabled":!(C||!o)||void 0,"aria-describedby":!C&&o?`${E}-full-${a}`:void 0,onClick:()=>{c&&(t=>{if(C)return;const a=S(e,t,{max:k,name:x.styleName,make:g});a&&s(a.styles)})(a)},children:[
11
+ /* @__PURE__ */Q("span",{className:"es-ts-add-word",children:x.add[a]}),
12
+ /* @__PURE__ */Q("span",{className:"es-ts-count",children:x.count({n:n.length,max:k})})]})),C||!o?null:/* @__PURE__ */Q("span",{id:`${E}-full-${a}`,className:"es-vh",children:x.full({kind:a,max:k})})]},a)})})}function ae({label:e,children:s}){const t=X();/* @__PURE__ */
13
13
  return Z("section",{className:"es-ts-section","aria-labelledby":t,children:[
14
- /* @__PURE__ */J("div",{className:"es-ts-group",id:t,children:e}),s]})}function le({style:e,fonts:s,colours:t=[],settings:l=c,auto:i=[],fallback:n,sample:r,open:o,onOpenChange:d,onChange:v,actions:g,device:y="desktop",readOnly:S=!1}){const b=O("textStyles",a),T=`${X()}-open-${e.id}`,N=new Set(i),k=u.filter(e=>l.includes(e)),C={...n?.(e)??{},...e.values},x=m(C,y),E=s.find(e=>e.value===C.font),w={fontFamily:E?.family,fontSize:`${h(x.size??16)}px`,fontWeight:C.weight,fontStyle:C.italic?"italic":void 0};/* @__PURE__ */
14
+ /* @__PURE__ */Q("div",{className:"es-ts-group",id:t,children:e}),s]})}function le({style:e,fonts:s,colours:t=[],settings:l=c,auto:i=[],fallback:n,sample:r,open:o,onOpenChange:d,onChange:v,actions:g,device:y="desktop",readOnly:S=!1}){const b=O("textStyles",a),T=`${X()}-open-${e.id}`,k=new Set(i),N=u.filter(e=>l.includes(e)),C={...n?.(e)??{},...e.values},x=m(C,y),E=s.find(e=>e.value===C.font),w={fontFamily:E?.family,fontSize:`${h(x.size??16)}px`,fontWeight:C.weight,fontStyle:C.italic?"italic":void 0};/* @__PURE__ */
15
15
  return Z(V,{children:[
16
16
  /* @__PURE__ */Z("div",{className:"es-ts-item","data-ts-id":e.id,children:[
17
17
  /* @__PURE__ */Z("button",{type:"button",className:"es-ts-row","aria-expanded":o,"aria-controls":o?T:void 0,onClick:()=>d(!o),children:[
18
- /* @__PURE__ */J("span",{className:"es-ts-chev","aria-hidden":"true",children:/* @__PURE__ */J(H,{size:12})}),
19
- /* @__PURE__ */J("span",{className:"es-ts-name",style:w,children:e.name}),
20
- /* @__PURE__ */J("span",{className:"es-ts-meta",children:p(x,s,b,{autoSize:N.has("size")&&void 0===x.size})})]}),g?/* @__PURE__ */J("div",{className:"es-ts-actions",children:g}):null]}),o?/* @__PURE__ */J("div",{className:"es-ts-open",id:T,children:/* @__PURE__ */J(ne,{style:e,values:C,fonts:s,colours:t,settings:k,autoSet:N,sample:r??b.sample,words:b,device:y,readOnly:S,set:s=>v(f([e],e.id,s)[0])})}):null]})}var ie={none:q,upper:P,capitalize:U,lower:K};function ne({style:s,values:a,fonts:n,colours:r,settings:o,autoSet:d,sample:c,words:u,device:h,readOnly:p,set:f}){const y=s.values,S=O("panel",i),b=n.find(e=>e.value===a.font),x=function(e,s){return e?s.find(s=>s.key===e)?.value??t(e)??void 0:void 0}(a.color,r),E=e=>"largestSize"===e||d.has(e),z=e=>E(e)?y[e]:a[e],j=m(y,h),L=j.size??z("size"),M=j.lineSpacing??z("lineSpacing"),W=j.letterSpacing??z("letterSpacing"),$=E("letterCase")?y.letterCase:a.letterCase,I={fontFamily:b?.family,fontSize:void 0===L?void 0:`${L}px`,fontWeight:a.weight,fontStyle:a.italic?"italic":void 0,lineHeight:void 0===M?void 0:String(M/100),letterSpacing:void 0===W?void 0:`${W}px`,color:x,textTransform:v($)},X=e=>{const s=T[e],t=E(e);/* @__PURE__ */
21
- return J("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */J(l,{label:u.settings[e],value:y[e],onChange:s=>f({[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:t?void 0:a[e],auto:t?u.auto:void 0,readOnly:p})},e)};/* @__PURE__ */
22
- return Z(Q,{children:[
23
- /* @__PURE__ */J("div",{className:"es-ts-preview",style:I,"aria-label":u.preview,children:c}),o.map(t=>{if("desktop"!==h)return g.includes(t)?"largestSize"===t&&"heading"!==s.kind?null:((s,t)=>{const a=T[s],i=N(s,t),n=k(z(s),"phone"===t?y[N(s,"tablet")]:void 0),r=!C(y[i]);/* @__PURE__ */
24
- return J("div",{className:"es-ts-slider","data-ts-setting":s,"data-ts-device":t,children:/* @__PURE__ */J(w,{label:u.settings[s],changed:r,action:/* @__PURE__ */J(e,{label:u.settings[s],changed:r,disabled:p,onReset:()=>f({[i]:void 0}),detail:void 0===n?u.auto:`${n}${a.unit}`,words:S}),children:/* @__PURE__ */J(l,{bare:!0,label:u.settings[s],value:y[i],onChange:e=>f({[i]:e}),min:a.min,max:a.max,step:a.step,shiftStep:a.shiftStep,sliderMin:a.sliderMin,sliderMax:a.sliderMax,unit:a.unit||void 0,styleValue:n,auto:void 0===n?u.auto:void 0,readOnly:p})})},s)})(t,h):null;switch(t){case"font":/* @__PURE__ */
25
- return J(re,{value:y.font,fonts:n,words:u,readOnly:p,set:f},t);case"color":/* @__PURE__ */
26
- return J(oe,{value:y.color,hex:x,colours:r,words:u,readOnly:p,set:f},t);case"emphasis":{const e=(a.weight??400)>=600,s=!1!==b?.italic;/* @__PURE__ */
18
+ /* @__PURE__ */Q("span",{className:"es-ts-chev","aria-hidden":"true",children:/* @__PURE__ */Q(H,{size:12})}),
19
+ /* @__PURE__ */Q("span",{className:"es-ts-name",style:w,children:e.name}),
20
+ /* @__PURE__ */Q("span",{className:"es-ts-meta",children:p(x,s,b,{autoSize:k.has("size")&&void 0===x.size})})]}),g?/* @__PURE__ */Q("div",{className:"es-ts-actions",children:g}):null]}),o?/* @__PURE__ */Q("div",{className:"es-ts-open",id:T,children:/* @__PURE__ */Q(ne,{style:e,values:C,fonts:s,colours:t,settings:N,autoSet:k,sample:r??b.sample,words:b,device:y,readOnly:S,set:s=>v(f([e],e.id,s)[0])})}):null]})}var ie={none:P,upper:q,capitalize:K,lower:B};function ne({style:s,values:a,fonts:n,colours:r,settings:o,autoSet:d,sample:c,words:u,device:h,readOnly:p,set:f}){const y=s.values,S=O("panel",i),b=n.find(e=>e.value===a.font),x=function(e,s){return e?s.find(s=>s.key===e)?.value??t(e)??void 0:void 0}(a.color,r),E=e=>"largestSize"===e||d.has(e),z=e=>E(e)?y[e]:a[e],j=m(y,h),L=j.size??z("size"),M=j.lineSpacing??z("lineSpacing"),I=j.letterSpacing??z("letterSpacing"),$=E("letterCase")?y.letterCase:a.letterCase,A={fontFamily:b?.family,fontSize:void 0===L?void 0:`${L}px`,fontWeight:a.weight,fontStyle:a.italic?"italic":void 0,lineHeight:void 0===M?void 0:String(M/100),letterSpacing:void 0===I?void 0:`${I}px`,color:x,textTransform:v($)},X=e=>{const s=T[e],t=E(e);/* @__PURE__ */
21
+ return Q("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */Q(l,{label:u.settings[e],value:y[e],onChange:s=>f({[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:t?void 0:a[e],auto:t?u.auto:void 0,readOnly:p})},e)};/* @__PURE__ */
22
+ return Z(J,{children:[
23
+ /* @__PURE__ */Q("div",{className:"es-ts-preview",style:A,"aria-label":u.preview,children:c}),o.map(t=>{if("desktop"!==h)return g.includes(t)?"largestSize"===t&&"heading"!==s.kind?null:((s,t)=>{const a=T[s],i=k(s,t),n=N(z(s),"phone"===t?y[k(s,"tablet")]:void 0),r=!C(y[i]);/* @__PURE__ */
24
+ return Q("div",{className:"es-ts-slider","data-ts-setting":s,"data-ts-device":t,children:/* @__PURE__ */Q(w,{label:u.settings[s],changed:r,action:/* @__PURE__ */Q(e,{label:u.settings[s],changed:r,disabled:p,onReset:()=>f({[i]:void 0}),detail:void 0===n?u.auto:`${n}${a.unit}`,words:S}),children:/* @__PURE__ */Q(l,{bare:!0,label:u.settings[s],value:y[i],onChange:e=>f({[i]:e}),min:a.min,max:a.max,step:a.step,shiftStep:a.shiftStep,sliderMin:a.sliderMin,sliderMax:a.sliderMax,unit:a.unit||void 0,styleValue:n,auto:void 0===n?u.auto:void 0,readOnly:p})})},s)})(t,h):null;switch(t){case"font":/* @__PURE__ */
25
+ return Q(re,{value:y.font,fonts:n,words:u,readOnly:p,set:f},t);case"color":/* @__PURE__ */
26
+ return Q(oe,{value:y.color,hex:x,colours:r,words:u,readOnly:p,set:f},t);case"emphasis":{const e=(a.weight??400)>=600,s=!1!==b?.italic;/* @__PURE__ */
27
27
  return Z("div",{className:"es-ts-set","data-ts-setting":t,children:[
28
- /* @__PURE__ */J("span",{className:"es-ts-sub",children:u.settings.emphasis}),
29
- /* @__PURE__ */Z("div",{className:"es-ts-icons",children:[_(u.bold,/* @__PURE__ */J(A,{className:"es-ts-icon","aria-label":u.bold,"aria-pressed":e,disabled:p,onClick:()=>f({weight:e?400:700}),children:/* @__PURE__ */J(R,{size:16})})),p||s?_(u.italic,/* @__PURE__ */J(A,{className:"es-ts-icon","aria-label":u.italic,"aria-pressed":Boolean(a.italic),disabled:p,onClick:()=>f({italic:!a.italic||void 0}),children:/* @__PURE__ */J(B,{size:16})})):/* @__PURE__ */J(A,{className:"es-ts-icon","aria-label":u.italic,"aria-pressed":Boolean(a.italic),"aria-disabled":!0,disabledReason:u.italicMissing,children:/* @__PURE__ */J(B,{size:16})})]})]},t)}case"letterCase":/* @__PURE__ */
30
- return J(de,{value:y.letterCase??a.letterCase,auto:E("letterCase"),words:u,readOnly:p,set:f},t);case"largestSize":return"heading"===s.kind?X(t):null;default:return X(t)}})]})}function re({value:e,fonts:s,words:t,readOnly:a,set:l}){const i=X();/* @__PURE__ */
28
+ /* @__PURE__ */Q("span",{className:"es-ts-sub",children:u.settings.emphasis}),
29
+ /* @__PURE__ */Z("div",{className:"es-ts-icons",children:[_(u.bold,/* @__PURE__ */Q(W,{className:"es-ts-icon","aria-label":u.bold,"aria-pressed":e,disabled:p,onClick:()=>f({weight:e?400:700}),children:/* @__PURE__ */Q(R,{size:16})})),p||s?_(u.italic,/* @__PURE__ */Q(W,{className:"es-ts-icon","aria-label":u.italic,"aria-pressed":Boolean(a.italic),disabled:p,onClick:()=>f({italic:!a.italic||void 0}),children:/* @__PURE__ */Q(U,{size:16})})):/* @__PURE__ */Q(W,{className:"es-ts-icon","aria-label":u.italic,"aria-pressed":Boolean(a.italic),"aria-disabled":!0,disabledReason:u.italicMissing,children:/* @__PURE__ */Q(U,{size:16})})]})]},t)}case"letterCase":/* @__PURE__ */
30
+ return Q(de,{value:y.letterCase??a.letterCase,auto:E("letterCase"),words:u,readOnly:p,set:f},t);case"largestSize":return"heading"===s.kind?X(t):null;default:return X(t)}})]})}function re({value:e,fonts:s,words:t,readOnly:a,set:l}){const i=X();/* @__PURE__ */
31
31
  return Z("div",{className:"es-ts-set","data-ts-setting":"font",children:[
32
- /* @__PURE__ */J("span",{className:"es-ts-sub",id:i,children:t.settings.font}),
33
- /* @__PURE__ */J(x,{value:e,options:s.map(e=>({label:e.label,value:e.value})),onChange:e=>l({font:e}),ariaLabelledBy:i,readOnly:a})]})}function oe({value:e,hex:s,colours:t,words:a,readOnly:l,set:i}){/* @__PURE__ */
34
- return J(se,{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 de({value:e,auto:s,words:t,readOnly:a,set:l}){const i=y.map(e=>{const s=ie[e];return{id:e,label:/* @__PURE__ */J(s,{size:16}),title:t.case[e]}}),n=s?[{id:"auto",label:/* @__PURE__ */J("span",{children:t.case.auto}),title:t.case.autoTitle},...i]:i;/* @__PURE__ */
32
+ /* @__PURE__ */Q("span",{className:"es-ts-sub",id:i,children:t.settings.font}),
33
+ /* @__PURE__ */Q(x,{value:e,options:s.map(e=>({label:e.label,value:e.value})),onChange:e=>l({font:e}),ariaLabelledBy:i,readOnly:a})]})}function oe({value:e,hex:s,colours:t,words:a,readOnly:l,set:i}){/* @__PURE__ */
34
+ return Q(se,{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 de({value:e,auto:s,words:t,readOnly:a,set:l}){const i=y.map(e=>{const s=ie[e];return{id:e,label:/* @__PURE__ */Q(s,{size:16}),title:t.case[e]}}),n=s?[{id:"auto",label:/* @__PURE__ */Q("span",{children:t.case.auto}),title:t.case.autoTitle},...i]:i;/* @__PURE__ */
35
35
  return Z("div",{className:"es-ts-set","data-ts-setting":"letterCase",children:[
36
- /* @__PURE__ */J("span",{className:"es-ts-sub",children:t.settings.letterCase}),
37
- /* @__PURE__ */J(E,{options:n,value:e??(s?"auto":"none"),ariaLabel:t.settings.letterCase,disabled:a,onChange:e=>l({letterCase:"auto"===e?void 0:e})})]})}export{se as ColourSwatchRow,le as TextStyleItem,ae as TextStylesGroup,te as TextStylesList};
36
+ /* @__PURE__ */Q("span",{className:"es-ts-sub",children:t.settings.letterCase}),
37
+ /* @__PURE__ */Q(E,{options:n,value:e??(s?"auto":"none"),ariaLabel:t.settings.letterCase,disabled:a,onChange:e=>l({letterCase:"auto"===e?void 0:e})})]})}export{se as ColourSwatchRow,le as TextStyleItem,ae as TextStylesGroup,te as TextStylesList};
@@ -71,6 +71,27 @@ type FieldsWords = {
71
71
  total: number;
72
72
  }) => string;
73
73
  };
74
+ /**
75
+ * `PhoneOrderField` — the order a parent's children stack in on a phone.
76
+ * Optional: a host's older catalogue falls back to the English. `noun` is
77
+ * one child's word, lower case ("column", "block").
78
+ */
79
+ phoneOrder?: {
80
+ /** The row's name, and the list's. */
81
+ label: string;
82
+ /** The row's hint when the host gives none: "The order the columns stack in on a phone." */
83
+ hint: (v: {
84
+ noun: string;
85
+ }) => string;
86
+ /** Under the list while it follows the desktop order. */
87
+ followsDesktop: (v: {
88
+ noun: string;
89
+ }) => string;
90
+ /** Under the list once an order is set. */
91
+ desktopKept: string;
92
+ /** The button that clears the order. */
93
+ matchDesktop: string;
94
+ };
74
95
  };
75
96
 
76
97
  export type { FieldsWords as F };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-easel",
3
- "version": "27.0.0",
3
+ "version": "27.1.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,19 +0,0 @@
1
- import{findCopy as e,repeatCopyWithWrapper as t}from"./chunk-JQQFB7EZ.js";import{DEFAULT_CANVAS_WORDS as n}from"./chunk-TBY3DFKS.js";import{useResolvedFields as o}from"./chunk-K53PQAMP.js";import{toItemSelector as r,fromItemSelector as l,useNodeOps as i,parentStep as s,clickPickPart as a,clickPick as c}from"./chunk-QTHQPJWA.js";import{selectionBox as u,placeWindow as d,offsetOrigin as p,colorRunOf as f,ColorWindow as h,startCanvasTyping as m,textMap as g,richLayout as y}from"./chunk-MNQDOSAX.js";import{DEFAULT_COPY_WORDS as v}from"./chunk-PMRN5Z3T.js";import{useWords as w}from"./chunk-MFIRYGHW.js";import{CANVAS_TYPABLE_EVENT as b,CANVAS_TYPING_EVENT as k}from"./chunk-TOKMFZPB.js";import{setCanvasNonce as S,related as x,isTypingTarget as C,upsertCanvasStyle as I,removeCanvasStyle as E,WORDS_CLEAR as A,frameRectToHost as M,drawnBox as D}from"./chunk-FR7EEKFF.js";import{queryAllCopies as O}from"./chunk-7UFKEX72.js";import{find as $,ROOT_ID as P,getList as j,remove as z,parseZoneKey as R,move as L,duplicate as N,replaceNode as B,createNode as V,insert as K,normalizeData as T,createResolveCache as F,slotsOf as Z,deepEqual as H,ROOT_SLOT as W,resolveNodeData as q}from"./chunk-EUFDQ4KL.js";import{topLevelSlotKeys as Q,fieldsFrom as Y,drawnBlockCount as U,defaultsFrom as X}from"./chunk-KXM6YRG2.js";import{createContext as G,useEffect as J,useContext as _,useRef as ee,useSyncExternalStore as te,useState as ne,useReducer as oe,useCallback as re,createElement as le,useMemo as ie,useLayoutEffect as se}from"react";import{jsx as ae,jsxs as ce,Fragment as ue}from"react/jsx-runtime";import{createPortal as de}from"react-dom";import{registerModalEscapeInterceptor as pe,FloatingBar as fe,TextToolbar as he,LinkPicker as me}from"efficient-shell/ui";function ge(e){return!["setData","setUi","set"].includes(e.type)}var ye=(e,t,n,o)=>{const r=j(e,t,R(n));return r?.[o]??null},ve=(e,t,n,o,r)=>{const l=ye(e,t,n,o);if(!l)throw new Error(`${r}: nothing at ${n}[${o}]`);return l};function we(e,t){const{selection:n}=e;return{...e.ui,itemSelector:r(e.data,t,n),selectedSlot:n&&"slot"===n.kind?{parentId:n.parentId,slot:n.slot}:null}}function be(e,t,n){return n?"node"===n.kind?$(e,t,n.id)?n:null:n.parentId===P?j(e,t,n)?n:null:$(e,t,n.parentId)&&j(e,t,n)?n:null:null}function ke(e,t,n,o=!1){const{itemSelector:r,selectedSlot:i,...s}=n;let a=e.selection;var c;return"itemSelector"in n&&(a=l(e.data,t,r??null)),"selectedSlot"in n&&(i?a=(c=i)?{kind:"slot",parentId:c.parentId,slot:c.slot}:null:"slot"===a?.kind&&(a=null)),{...e,selection:a,ui:o?s:{...e.ui,...s}}}function Se(e,t,n){const o=xe(e,t,n);if(o===e)return e;const r=be(o.data,n,o.selection);return r===o.selection?o:{...o,selection:r}}function xe(e,t,n){const{data:o}=e;switch(t.type){case"setData":{const n="function"==typeof t.data?t.data(o):t.data;return{...e,data:{...o,...n}}}case"setUi":return ke(e,n,"function"==typeof t.ui?t.ui(we(e,n)):t.ui);case"set":{const r={data:o,ui:we(e,n)},l="function"==typeof t.state?t.state(r):t.state;let i=l.data?{...e,data:l.data}:e;return l.ui&&(i=ke(i,n,l.ui,!0)),i}case"insert":{const r={...R(t.destinationZone),index:t.destinationIndex},l=V(n,t.componentType,{},t.id?{id:t.id}:{});return{...e,data:K(o,n,r,l)}}case"replace":{const r=ve(o,n,t.destinationZone,t.destinationIndex,"replace");if(r.props.id!==t.data.props.id)throw new Error("Can't change the id during a replace action. Use remove and insert for a new node.");return{...e,data:B(o,n,r.props.id,t.data)}}case"replaceRoot":{const n={...o.root,props:{...o.root.props,...t.root.props},readOnly:t.root.readOnly};return{...e,data:{...o,root:n}}}case"duplicate":{const r=ve(o,n,t.sourceZone,t.sourceIndex,"duplicate"),l=N(o,n,r.props.id),i=ye(l,n,t.sourceZone,t.sourceIndex+1);return{...e,data:l,selection:i?{kind:"node",id:i.props.id}:e.selection}}case"reorder":return xe(e,{...t,type:"move",sourceZone:t.destinationZone},n);case"move":{if(t.sourceZone===t.destinationZone&&t.sourceIndex===t.destinationIndex)return e;const r=ye(o,n,t.sourceZone,t.sourceIndex);if(!r)return e;const l={...R(t.destinationZone),index:t.destinationIndex};return{...e,data:L(o,n,r.props.id,l)}}case"remove":{const r=ve(o,n,t.zone,t.index,"remove");return{...e,data:z(o,n,r.props.id)}}default:return e}}var Ce={drag:!0,duplicate:!0,delete:!0,edit:!0,insert:!0},Ie={leftSideBarVisible:!0,rightSideBarVisible:!0,arrayState:{},componentList:{},isDragging:!1,previewMode:"edit",viewports:{current:{width:360,height:"auto"},options:[],controlsVisible:!0},field:{focus:null}},Ee=0,Ae=()=>`history-${Ee+=1}`;function Me(e){let t=e.config;const n=e.now??(()=>Date.now()),o=e.historyCoalesceMs??250;let i=e.permissions??{};const s=T(e.data,t);let a=s,c={data:s,selection:null,ui:{...Ie}};if(e.ui){const{itemSelector:n,selectedSlot:o,...r}=e.ui;c={data:s,selection:o?{kind:"slot",...o}:l(s,t,n??null),ui:{...Ie,...r}}}let u=[{core:c,at:-1/0,sealed:!0,id:Ae()}],d=0;const p=e=>{const t=u[d],r=n();!e&&d===u.length-1&&d>0&&!t.sealed&&r-t.at<o?u=[...u.slice(0,d),{...t,core:c,at:r}]:(u=[...u.slice(0,d+1),{core:c,at:r,sealed:e,id:Ae()}],d=u.length-1)},f=/* @__PURE__ */new Set;let h=null,m=null,g=0,y=null,v=!1;const w=()=>{for(const e of[...f])e()},b=()=>{u=[...u.slice(0,d),{...u[d],core:c},...u.slice(d+1)]},k=(t,n)=>{g>0?v=v||n:(n?p(!1):c!==t&&b(),c.data!==t.data&&e.onChange?.(c.data),c!==t&&w())},S=e=>{const n=c;if(c=Se(c,e,t),c===n)return;const o=e.recordHistory??ge(e);k(n,o&&c.data!==n.data)},x=t=>{0===g&&(y=c,v=!1),g+=1;try{t()}catch(e){throw g-=1,0===g&&y&&(c=y,y=null),e}if(g-=1,g>0||!y)return;const n=y;y=null,v&&c.data!==n.data?p(!0):c!==n&&b(),c.data!==n.data&&e.onChange?.(c.data),c!==n&&w()},C=e=>{const n=c,o=be(c.data,t,e);var r,l;(r=o,l=c.selection,r===l||r&&l&&r.kind===l.kind&&("node"===r.kind&&"node"===l.kind?r.id===l.id:"slot"===r.kind&&"slot"===l.kind&&r.parentId===l.parentId&&r.slot===l.slot))||(c={...c,selection:o},k(n,!1))},I=t=>{const n=c;d=t,c=u[d].core,c.data!==n.data&&e.onChange?.(c.data),c!==n&&w()},E=()=>(e={})=>{const n=e.root?t.root?.permissions:t.components[e.item?.type??e.type??""]?.permissions;return{...Ce,...i,...n}};let A=E();const M=F(),D={resolveCache:M,async resolveAll({trigger:e="load",metadata:n}={}){const o=c.data,r={type:"root",props:{...o.root.props??{}}},l=[...o.content,...Object.values(o.zones??{}).flat()],[i,...s]=await Promise.all([q(r,t,{cache:M,trigger:e,metadata:n}),...l.map(o=>q(o,t,{cache:M,trigger:e,metadata:n}))]);x(()=>{const n=c;let r=c.data;s.forEach((e,n)=>{if(!e.didChange)return;const i=l[n].props.id,s=$(r,t,i)?.node;s&&s===$(o,t,i)?.node&&(r=B(r,t,i,e.node))}),i.didChange&&r.root===o.root&&(r={...r,root:{...r.root,props:i.node.props,readOnly:i.node.readOnly??r.root.readOnly}}),r!==c.data&&("load"===e&&c.data===a&&(a=r),c={...c,data:r,selection:be(r,t,c.selection)},k(n,!1))})},async resolveNode(e,{trigger:n="replace",metadata:o}={}){const r=$(c.data,t,e)?.node;if(!r)return!1;const l=await q(r,t,{cache:M,trigger:n,metadata:o});if(!l.didChange)return!1;let i=!1;return x(()=>{const n=c;if($(c.data,t,e)?.node!==r)return;const o=B(c.data,t,e,l.node);o!==c.data&&(c={...c,data:o,selection:be(o,t,c.selection)},k(n,!1),i=!0)}),i},get config(){return t},get loaded(){return a},getState(){if(h&&m===c)return h;const e=c,n={data:e.data,ui:we(e,t)},o="node"===e.selection?.kind?$(e.data,t,e.selection.id)?.node??null:null;return h={appState:n,selection:e.selection,selectedItem:o,config:t,dispatch:S,history:{back:()=>D.undo(),forward:()=>D.redo(),hasPast:d>0,hasFuture:d<u.length-1,histories:u.map(e=>({id:e.id,state:{data:e.core.data,ui:we(e.core,t)}})),index:d,setHistoryIndex:e=>{e>=0&&e<u.length&&e!==d&&I(e)}},getPermissions:A,getItemById:n=>$(e.data,t,n)?.node,getItemBySelector:n=>function(e,t,n){const[o,r]=(n.zone??"root:default-zone").split(/:(.*)/s);return j(e,t,{parentId:o,slot:r})?.[n.index]}(e.data,t,n),getSelectorForId:n=>{const o=r(e.data,t,{kind:"node",id:n});return o?{index:o.index,zone:o.zone??"root:default-zone"}:void 0}},m=e,h},subscribe:e=>(f.add(e),()=>{f.delete(e)}),dispatch:S,batch:x,group:()=>{const e=d,t=u[e].id;let n=!0;return{close:()=>{if(!n)return;if(n=!1,u[e]?.id!==t)return;if(d<=e+1)return void(d===e+1&&(u=[...u.slice(0,d),{...u[d],sealed:!0},...u.slice(d+1)]));const o=u[d];u=[...u.slice(0,e+1),{...o,sealed:!0},...u.slice(d+1)],d=e+1}}},select:e=>C(e?{kind:"node",id:e}:null),selectSlot:e=>C(e?{kind:"slot",parentId:e.parentId,slot:e.slot}:null),run(e){x(()=>{const n=c,o=void 0===e.select?c.selection:e.select;c={...c,data:e.data,selection:be(e.data,t,o)},k(n,e.data!==n.data)})},load(e,n={}){const o=c,r=T(e,t);c={...c,data:r,selection:be(r,t,n.selection??c.selection)},a=r,n.keepHistory||(u=[{core:c,at:-1/0,sealed:!0,id:Ae()}],d=0),c!==o&&w()},undo(){d>0&&I(d-1)},redo(){d<u.length-1&&I(d+1)},setPermissions(e){(function(e,t){if(e===t)return!0;const n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>e[n]===t[n])})(e,i)||(i=e,A=E(),h=null,w())},setConfig(e){e!==t&&(t=e,A=E(),h=null,w())}};return D}function De(e,t,n={}){const o=e=>{if(e.altKey)return;if(!(e.metaKey!==e.ctrlKey))return;const o="KeyZ"===e.code,r="KeyY"===e.code&&!e.shiftKey;(o||r)&&(n.leaveTyping&&C(e.target)||!1!==t.getState?.().getPermissions().edit&&(e.preventDefault(),r||e.shiftKey?t.redo():t.undo()))};return e.addEventListener("keydown",o),()=>e.removeEventListener("keydown",o)}var Oe=G(null),$e=G(!0);function Pe({easel:e,hotkeys:t=!0,resolveOnMount:n=!0,children:o}){return J(()=>{n&&e.resolveAll()},[e,n]),J(()=>{if(t&&"undefined"!=typeof document)return De(document,e)},[e,t]),/* @__PURE__ */ae(Oe.Provider,{value:e,children:/* @__PURE__ */ae($e.Provider,{value:t,children:o})})}function je(){const e=_(Oe);if(!e)throw new Error("useEasel: no <EaselProvider> above this component");return e}function ze(e){const t=je(),n=ee({view:null,selector:null,value:void 0,has:!1}),o=()=>{const o=t.getState(),r=n.current;if(r.has&&r.view===o&&r.selector===e)return r.value;const l=e(o);return r.has&&Object.is(r.value,l)?(n.current={view:o,selector:e,value:r.value,has:!0},r.value):(n.current={view:o,selector:e,value:l,has:!0},l)};return te(t.subscribe,o,o)}function Re(){return function(e){return ze(e)}}var Le=["--es-accent","--es-accent-tint","--es-accent-tint-strong","--es-accent-line","--es-accent-text","--es-accent-ring","--es-accent-shadow","--es-on-accent","--status-success-solid","--elevation-panel"],Ne="host-tokens";function Be(e,t){const n=function(e){const t=e.ownerDocument.defaultView;if(!t)return"";const n=t.getComputedStyle(e),o=[];for(const e of Le){const t=n.getPropertyValue(e).trim();t&&o.push(`${e}: ${t};`)}return o.length?`:root { ${o.join(" ")} }`:""}(e);n?I(t,Ne,n):E(t,Ne)}var Ve="data-easel-block",Ke="data-easel-dropzone",Te={},Fe="data-es-mirror",Ze="undefined"==typeof window?J:se;function He(e,t,n){for(const e of Array.from(t.head.querySelectorAll(`[${Fe}]`)))e.remove();for(const o of Array.from(e.head.querySelectorAll('style, link[rel="stylesheet"]'))){const e=o.cloneNode(!0);e.setAttribute(Fe,""),n&&e.setAttribute("nonce",n),t.head.appendChild(e)}}function We({children:e,id:t="preview-frame",title:o,className:r,style:l,mirrorStyles:i=!0,onDocument:s,height:a="auto",nonce:c}){const u=w("canvas",n),d=ee(null),[p,f]=ne(null);return Ze(()=>{const e=d.current,t=p?.ownerDocument.defaultView;if("auto"!==a||!e||!p||!t)return;const n=()=>{e.style.height=`${Math.ceil(p.getBoundingClientRect().height)}px`};n();const o=t.ResizeObserver,r=o?new o(n):null;return r?.observe(p),()=>r?.disconnect()},[p,a]),Ze(()=>{let e=d.current?.contentDocument;if(!e)return;"CSS1Compat"!==e.compatMode&&(e.open(),e.write("<!DOCTYPE html><html><head></head><body></body></html>"),e.close(),e=d.current?.contentDocument??e),e.body||e.documentElement.appendChild(e.createElement("body")),e.body.style.margin="0";const t=e.createElement("div");t.setAttribute("data-easel-entry",""),t.id="frame-root","fill"===a&&t.classList.add("es-frame-fill"),e.body.appendChild(t),S(e,c),f(t),s?.(e);let n=null;const o=d.current?.ownerDocument;if(i&&o){He(o,e,c);const t=o.defaultView;t&&"MutationObserver"in t&&(n=new t.MutationObserver(()=>He(o,e,c)),n.observe(o.head,{childList:!0,subtree:!0,characterData:!0}))}let r=null;const l=d.current;if(l&&o){Be(l,e);const t=o.defaultView;if(t&&"MutationObserver"in t){r=new t.MutationObserver(()=>Be(l,e)),r.observe(o.head,{childList:!0,subtree:!0,characterData:!0});const n={attributes:!0,attributeFilter:["class","style","data-theme"]};for(const e of[o.documentElement,o.body,l.closest(".es-editor")])e&&r.observe(e,n)}}return()=>{n?.disconnect(),r?.disconnect(),t.remove(),f(null),s?.(null)}},[]),/* @__PURE__ */ae("iframe",{ref:d,id:t,title:o??u.frame,className:["es-canvas-frame","fill"===a?"is-fill":"",r??""].filter(Boolean).join(" "),style:l,children:p?de(e,p):null})}var qe=G(null),Qe=G(Te),Ye=[];function Ue({parentId:e,slot:t,className:n,style:o,minEmptyHeight:r=128,minEmptyWidth:l=120}){const i=je(),s=ze(n=>j(n.appState.data,i.config,{parentId:e,slot:t})??Ye),a=ze(t=>"node"===t.selection?.kind&&t.selection.id===e&&e!==P),c=ze(n=>"slot"===n.selection?.kind&&n.selection.parentId===e&&n.selection.slot===t),u=_(qe),d=["es-zone"];return s.length&&d.push("has-children"),e===P&&d.push("is-root"),(a||c)&&d.push("is-area-selected"),null!==u&&u===e&&e!==P&&d.push("is-hovering-area"),n&&d.push(n),/* @__PURE__ */ae("div",{className:d.join(" "),[Ke]:`${e}:${t}`,style:{...o,"--min-empty-height":`${r}px`,"--min-empty-width":`${l}px`},children:s.map(e=>/* @__PURE__ */ae(ot,{node:e},e.props.id))})}function Xe(e,t,n,o){const r=ie(()=>{const n={};for(const o of Q(Y(e)))n[o]=Object.assign(function(e={}){/* @__PURE__ */
2
- return ae(Ue,{parentId:t,slot:o,...e})},{blockCount:0});return n},[e,t]);for(const e of Object.keys(r))r[e].blockCount=U(n[e],o);return r}function Ge(e){return ie(()=>function({zone:t,...n}){/* @__PURE__ */
3
- return ae(Ue,{parentId:e,slot:t,...n})},[e])}var Je=["top","bottom","zIndex"];function _e(e,t,n){e.style[t]!==n&&(e.style[t]=n)}function et(e){const t=function(e){const t=e?.ownerDocument.defaultView?.getComputedStyle(e);if(!t||"sticky"!==t.position)return null;const n=e=>"auto"===e?"":e;return{top:n(t.top),bottom:n(t.bottom),zIndex:n(t.zIndex)}}(function(e){const t=e.ownerDocument.defaultView;let n=null;for(const o of Array.from(e.children))if("none"!==t?.getComputedStyle(o).display){if(n)return null;n=o}return n}(e));_e(e,"position",t?"sticky":"relative");for(const n of Je)_e(e,n,t?.[n]??"");return!!t}var tt="data-es-canvas-relative";function nt(e){e.hasAttribute(tt)&&("relative"===e.style.position&&(e.style.position=""),e.removeAttribute(tt));const t=e.ownerDocument.defaultView?.getComputedStyle(e).position;return t&&"static"!==t?"sticky"===t:(e.style.position||(e.style.position="relative",e.setAttribute(tt,"")),!1)}function ot({node:e}){const t=je().config,n=t.components[e.type],o=e.props.id,r=ee(null),l=function(e,t){return ie(()=>n=>{const o=t.current;o&&o!==n&&(o.removeAttribute(Ve),o.removeAttribute("data-easel-dnd")),t.current=n,n&&(n.setAttribute(Ve,e),n.setAttribute("data-easel-dnd",e),nt(n))},[e,t])}(o,r),i=ee(null),s=!!n?.inline;!function(e,t){const n=ee(!1),o=ee(()=>{});o.current=()=>{const o=e(),l=n.current;n.current=!!o&&t(o),l!==n.current&&r.current()};const r=ee(()=>{});Ze(()=>o.current()),Ze(()=>{const t=e(),l=t?.ownerDocument.defaultView;if(!t||!l)return;const i=()=>o.current();l.addEventListener("resize",i);const s=l.ResizeObserver,a=s?new s(i):null;a?.observe(t);let c=null;return r.current=()=>{c?.disconnect(),c=null;const e=t.ownerDocument.documentElement;n.current&&e&&l.MutationObserver&&(c=new l.MutationObserver(i),c.observe(e,{attributes:!0}))},r.current(),()=>{l.removeEventListener("resize",i),a?.disconnect(),c?.disconnect(),r.current=()=>{}}},[])}(()=>s?r.current:i.current,e=>s?nt(e):et(e));const a=_(Qe),c=Xe(n,o,e.props,t.components),u=Ge(o);if(!n?.render)return null;const d=n.render,p={...X(n),...e.props,...c},f={renderDropZone:u,isEditing:!0,dragRef:n.inline?l:null,metadata:{...a,...n.metadata}};return n.inline?/* @__PURE__ */ae(d,{...p,editor:f,editMode:!0}):
4
- /* @__PURE__ */ae("div",{ref:i,[Ve]:o,"data-easel-dnd":o,style:{position:"relative"},children:/* @__PURE__ */ae(d,{...p,editor:f,editMode:!0})})}function rt({metadata:e}){const t=ze(e=>e.config),n=ze(e=>e.appState.data.root).props??{},o=t.root?.render,r=Xe(t.root,P,n,t.components),l=Ge(P),i=/* @__PURE__ */ae(Ue,{parentId:P,slot:W}),s=o?/* @__PURE__ */ae(o,{id:"page-root",...n,...r,editor:{renderDropZone:l,isEditing:!0,dragRef:null,metadata:e??{}},editMode:!0,children:i}):i;/* @__PURE__ */
5
- return ae(Qe.Provider,{value:e??Te,children:s})}var lt=G(void 0),it=G(void 0);function st(e,t,n,o){const r=$(e,t,n);return!!r&&(Z(r.node,t).length>0||!1===o.whole)}var at=G(void 0),ct="data-es-chrome",ut=G(void 0);function dt(e){const t=e?.closest?.(`[${ct}]`)??null,n=t?.getAttribute(ct);return t&&n?{id:n,element:t}:null}function pt({element:e,clip:t=!1}){const n=ee(null),o=mt(n,e?()=>e:null,e),r=_(St);/* @__PURE__ */
6
- return ae("div",{ref:n,"aria-hidden":"true",className:"es-canvas-outline is-hover is-hover-part",style:o?{position:"absolute",top:o.top,left:o.left,width:o.width,height:o.height,clipPath:t?kt(o,r):void 0}:{display:"none"}})}var ft={"--es-words-clear":`${A}px`};function ht({element:e,words:t=!1,clip:n=!1}){const o=ee(null),r=mt(o,e?()=>e:null,e),l=_(St);/* @__PURE__ */
7
- return ae("div",{ref:o,"aria-hidden":"true",className:"es-canvas-outline is-selected is-selected-part"+(t?" is-words":""),style:r?{position:"absolute",top:r.top,left:r.left,width:r.width,height:r.height,clipPath:n?kt(r,l):void 0,...ft}:{display:"none"}})}function mt(e,t,n){return yt(e,t?e=>{const n=t(e);return n?[n]:[]}:null,n)[0]??null}var gt=[];function yt(e,t,n){const[o,r]=ne(gt),l=ee(t);return l.current=t,Ze(()=>{const t=e.current?.ownerDocument,n=t?.defaultView;if(!t||!n||!l.current)return void r(gt);let o=0;const i=()=>{o=0;const n=e.current?.parentElement??null,i=(l.current?l.current(t):[]).map(e=>function(e,t){if(!e||!t)return null;const n=D(e),o=t.getBoundingClientRect();return{top:n.top-o.top,left:n.left-o.left,width:n.width,height:n.height}}(e,n)).filter(e=>null!==e);r(e=>{return(t=e)===(n=i)||t.length===n.length&&t.every((e,t)=>function(e,t){return e===t||!!e&&!!t&&e.top===t.top&&e.left===t.left&&e.width===t.width&&e.height===t.height}(e,n[t]))?e:i.length?i:gt;var t,n})},s=()=>{o||(o=(n.requestAnimationFrame??(e=>n.setTimeout(e,16)))(i))};i();const a="MutationObserver"in n?new n.MutationObserver(s):null;a?.observe(t.body,{childList:!0,subtree:!0,attributes:!0,characterData:!0});const c="ResizeObserver"in n?new n.ResizeObserver(s):null;return c?.observe(t.documentElement),n.addEventListener("resize",s),n.addEventListener("scroll",s,{capture:!0,passive:!0}),()=>{a?.disconnect(),c?.disconnect(),n.removeEventListener("resize",s),n.removeEventListener("scroll",s,{capture:!0}),o&&(n.cancelAnimationFrame??n.clearTimeout)(o)}},[n]),o}var vt=A+2,wt=vt+2,bt=1;function kt(e,t){const n=e.left+e.width,o=e.top+e.height,r=t.map(t=>{const r=t.left+t.width,l=t.top+t.height;if(!(r>e.left-vt&&t.left<n+vt&&l>e.top-vt&&t.top<o+vt))return null;const i=Math.max(t.left<=e.left&&r>e.left?Math.min(t.left,e.left-bt):t.left,e.left-wt)-e.left,s=Math.max(t.top<=e.top&&l>e.top?Math.min(t.top,e.top-bt):t.top,e.top-wt)-e.top,a=Math.min(r>=n&&t.left<n?Math.max(r,n+bt):r,n+wt)-e.left,c=Math.min(l>=o&&t.top<o?Math.max(l,o+bt):l,o+wt)-e.top;return a>i&&c>s?{x:i,y:s,w:a-i,h:c-s}:null}).filter(e=>null!==e);if(!r.length)return;const l=function(e){if(e.length<2)return e;const t=Array.from(new Set(e.flatMap(e=>[e.x,e.x+e.w]))).sort((e,t)=>e-t),n=Array.from(new Set(e.flatMap(e=>[e.y,e.y+e.h]))).sort((e,t)=>e-t),o=[];for(let r=0;r<n.length-1;r++){const l=o=>e.some(e=>e.x<=t[o]&&t[o+1]<=e.x+e.w&&e.y<=n[r]&&n[r+1]<=e.y+e.h);for(let e=0;e<t.length-1;e++){if(!l(e))continue;let i=e+1;for(;i<t.length-1&&l(i);)i++;const s={x:t[e],y:n[r],w:t[i]-t[e],h:n[r+1]-n[r]},a=o.find(e=>e.x===s.x&&e.w===s.w&&e.y+e.h===s.y);a?a.h+=s.h:o.push(s),e=i-1}}return o}(r);return`path(evenodd, "${`M${-wt} ${-wt}h${e.width+2*wt}v${e.height+2*wt}h${-(e.width+2*wt)}z`}${l.map(e=>`M${e.x} ${e.y}h${e.w}v${e.h}h${-e.w}z`).join("")}")`}var St=G([]);function xt({children:e}){const t=ee(null),n=_(ut),o=yt(t,n?e=>Array.from(e.querySelectorAll(`[${ct}]`)):null,n?1:0);/* @__PURE__ */
8
- return ce("div",{className:"es-canvas-outlines",style:{position:"absolute",top:0,left:0,pointerEvents:"none"},children:[
9
- /* @__PURE__ */ae("span",{ref:t,hidden:!0,"aria-hidden":"true"}),
10
- /* @__PURE__ */ae(St.Provider,{value:o,children:e})]})}function Ct({id:e,kind:t,overlay:n}){const o=ee(null),r=_(it),l=null!==e&&!0===r?.(e),i=yt(o,e?t=>O(t,`[${Ve}="${t.defaultView?.CSS?.escape?t.defaultView.CSS.escape(e):e}"]`):null,e),[s,...a]=i,c=_(St),u=`es-canvas-outline is-${t}${l?" is-shared":""}`,d=e=>({position:"absolute",top:e.top,left:e.left,width:e.width,height:e.height,clipPath:kt(e,c)}),p=/* @__PURE__ */ce(ue,{children:[
11
- /* @__PURE__ */ae("div",{ref:o,"aria-hidden":"true",className:u,style:s?d(s):{display:"none"}}),a.map((e,t)=>/* @__PURE__ */ae("div",{"aria-hidden":"true",className:u,style:d(e)},t))]});return n&&e?/* @__PURE__ */ae(n,{componentId:e,kind:t,children:p}):p}function It(e,n){return Array.from(e.querySelectorAll(`[${Ve}]`)).find(o=>o.getAttribute(Ve)===n&&t(o)?.wrapper===e)??null}function Et(e,t,n){const o=g(e,n),r=o.text.length,l=e.ownerDocument;if(!t)return[r,r];let i=null;const s=l.caretPositionFromPoint?.(t.x,t.y);if(s&&e.contains(s.offsetNode))i=o.at(s.offsetNode,s.offset);else{const n=l.caretRangeFromPoint?.(t.x,t.y);n&&e.contains(n.startContainer)&&(i=o.at(n.startContainer,n.startOffset))}if(null===i)return[r,r];const a=o.text;let c=i,u=i;for(;c>0&&!/\s/.test(a[c-1]);)c-=1;for(;u<a.length&&!/\s/.test(a[u]);)u+=1;return[c,u]}function At(e,t){const n=t?.closest?.(`[${Ve}]`)?.getAttribute(Ve)??null;return!1===e.getPermissions(n?{item:e.getItemById(n)}:{root:!0}).edit}function Mt({s:e,element:t,toolbar:n,label:o,keys:r}){const l=w("copy",v),i=ze(e=>At(e,t())),s=e.pressed(),a=new Set(n.offered),c=n.colors&&n.colors.length>0?n.colors:null,m=ee(null),[g,y]=ne(!1),[b,k]=ne(null),S=g||null!==b,x=()=>{e.hold(),y(!1),k({href:e.pressed().href})},C=()=>{y(!1),k(null),e.resume()};se(()=>{r.current={escape:()=>!!S&&(C(),!0),link:()=>!!a.has("link")&&(x(),!0)}}),se(()=>()=>{r.current=null},[r]);const I=ee(C);I.current=C,J(()=>{if(g)return pe(e=>{const t=m.current;return!!("Escape"===e.key&&t&&e.target instanceof Node&&t.contains(e.target))&&(I.current(),!0)},()=>m.current?.querySelector(".es-copy-colors"))},[g]),J(()=>{const n=m.current;if(!S||!n)return;const o=/* @__PURE__ */new Set([n.ownerDocument]),r=t();r&&o.add(r.ownerDocument);const l=o=>{const r=o.target;if(r&&n.contains(r))return;y(!1),k(null);const l=t();r&&l&&l.contains(r)?e.release():e.stop("outside")};for(const e of o)e.addEventListener("pointerdown",l,!0);return()=>{for(const e of o)e.removeEventListener("pointerdown",l,!0)}},[S,e,t]),se(()=>{const e=m.current,n=e?.querySelector(".rosh-tb-wrap > .es-copy-pop"),o=t();if(!(S&&e&&n&&o))return;const r=o.ownerDocument.defaultView?.getSelection()??null,l=r&&r.rangeCount>0&&o.contains(r.getRangeAt(0).startContainer)?r.getRangeAt(0):null,i=(l?u(l,o):null)??(()=>{const e=o.getBoundingClientRect();return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}})(),s=o.ownerDocument.defaultView?.frameElement,a=s?M(s,{left:i.left,top:i.top,width:i.right-i.left,height:i.bottom-i.top}):{left:i.left,top:i.top,width:i.right-i.left,height:i.bottom-i.top},c=o.getBoundingClientRect(),f=s?M(s,{left:c.left,top:c.top,width:c.width,height:c.height}):{left:c.left,top:c.top,width:c.width,height:c.height},h=(e.closest("[data-floating-bar]")??e).getBoundingClientRect(),g={left:a.left,right:a.left+a.width,top:Math.min(a.top,f.top-6,h.top),bottom:Math.max(a.top+a.height,f.top+f.height+6,h.bottom)},y=e.ownerDocument.documentElement,v=(s??o.closest(".es-canvas")??o).getBoundingClientRect(),w={left:Math.max(0,v.left),top:Math.max(0,v.top),right:Math.min(y.clientWidth||v.right,v.right),bottom:Math.min(y.clientHeight||v.bottom,v.bottom)};if(w.right<=w.left||w.bottom<=w.top||0===n.offsetWidth)return;const b=d({anchor:g,size:{width:n.offsetWidth,height:n.offsetHeight},within:{left:v.left,top:v.top,right:v.right,bottom:v.bottom},clip:w,parent:p(n)});n.style.top=`${b.top}px`,n.style.left=`${b.left}px`,n.style.setProperty("--es-pop-point",`${b.point}px`),n.dataset.side=b.above?"above":"below"});const E=c?{run:f(s.color,c),open:g,onToggle:()=>{k(null),g?C():(e.hold(),y(!0))}}:void 0;/* @__PURE__ */
12
- return ae(fe,{anchor:()=>{const e=t();if(!e)return null;const n=e.getBoundingClientRect(),o=e.ownerDocument.defaultView?.frameElement,r=o?M(o,{left:n.left,top:n.top,width:n.width,height:n.height}):{left:n.left,top:n.top,width:n.width,height:n.height};return{left:r.left-6,top:r.top-6,right:r.left+r.width+6,bottom:r.top+r.height+6}},bounds:()=>{const e=t(),n=e?.ownerDocument.defaultView?.frameElement,o=(n??e?.closest(".es-canvas")??e)?.getBoundingClientRect();return o?{left:o.left,top:o.top,right:o.right,bottom:o.bottom}:{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}},"aria-label":o,children:/* @__PURE__ */ae("div",{ref:m,children:/* @__PURE__ */ae(he,{layout:"row",offered:a,pressed:s.marks,onMark:t=>{"link"===t?x():e.press(t)},color:E,linkOpen:null!==b,list:{pressed:s.list,onList:t=>e.list(t)},clear:s.clearable?{onClear:()=>e.clear()}:void 0,alignment:n.alignment,letterCase:n.letterCase,last:n.lastTool?.({className:"rosh-tb-btn",disabled:i,selected:s.selected,keepCaret:t=>{t.preventDefault(),e.hold()},insert:t=>e.insert(t),style:s.style,applyStyle:t=>e.textStyle(t)}),windows:/* @__PURE__ */ce(ue,{children:[g&&c?/* @__PURE__ */ae(h,{colors:c,current:s.color,words:l.colors??v.colors,onPick:t=>e.color(t)}):null,b?
13
- /* @__PURE__ */ae(me,{className:"es-copy-link es-copy-pop",value:b.href??"",onApply:t=>{k(null),e.link(t)},onRemove:null!==b.href?()=>{k(null),e.link(null)}:void 0,onCancel:C}):null]})})})})}function Dt({element:e,which:t}){const n=ee(null),o=mt(n,()=>e(),t),r=_(St);/* @__PURE__ */
14
- return ae("div",{ref:n,"aria-hidden":"true",className:"es-canvas-outline is-typing",style:o?{position:"absolute",top:o.top,left:o.left,width:o.width,height:o.height,clipPath:kt(o,r),...ft}:{display:"none"}})}function Ot({frame:o=!0,className:r,style:l,metadata:i,mirrorStyles:u,onDocument:d,height:p,title:f,nonce:h,hotkeys:v,frameWrapper:S,overlay:C,children:I,typing:E,passThrough:A}){const M=je(),D=_(lt),O=A??D,P=_($e),j=w("canvas",n),z=v??P,[R,L]=ne(void 0),N=ze(e=>"node"===e.selection?.kind?e.selection.id:null),[B,V]=ne(null),[K,T]=ne(null),F=_(at),H=_(ut),[W,q]=ne(null),[,Q]=oe(e=>e+1,0),[,Y]=oe(e=>e+1,0),U=e=>{F?.select(e),Y()},[X,G]=ne(null),te=ee(null),re=ze(e=>!!X&&At(e,X()));J(()=>{re&&te.current?.s.stop("stop")},[re]);const le=ee(null),[,ie]=ne(0),se=ee(E);se.current=E;const ue=ee(null),de=ee(null),pe=()=>{if(!N)return null;const e=se.current?.atSelection?.()?.element()??null;if(!e)return null;const t=de.current?.ownerDocument;if(F){const n=F.selected()&&t?F.selectedPart?.(t)??null:null;return n&&x(n.element,e)?n.element:null}const n=$(M.getState().appState.data,M.config,N);return n&&0===Z(n.node,M.config).length?e:null},fe=ze(e=>e.appState.data),he=F?.selected()??null;J(()=>{const e=de.current?.ownerDocument,t=e?.defaultView?.CustomEvent;if(!e||!t)return;const n=N&&!X&&se.current?.atSelection?.()?N:null,o=n?pe():null;e.dispatchEvent(new t(b,{detail:o?{id:n,words:o}:{id:n}}))},[N,X,fe,he]);const me=e=>{const t=de.current?.ownerDocument,n=t?.defaultView?.CustomEvent;t&&n&&t.dispatchEvent(new n(k,{detail:{typing:e}}))},ge=(e,t)=>{te.current?.s.stop("stop");const n=e.element();if(!n)return!1;const o=e.element,r=()=>At(M.getState(),o());if(r())return!1;const l=ye(e,n),i=l?.write??e.write,s=M.group(),a=m({element:o,value:l?.value??e.value,rules:e.rules,multiline:e.multiline,skip:e.skip,caret:Et(n,t,e.skip),editable:()=>!r(),write:e=>{r()?queueMicrotask(()=>te.current?.s.stop("stop")):i(e)},remount:e.remount,onSelect:()=>ie(e=>e+1),onEscape:()=>ue.current?.escape()??!1,onLinkKey:()=>ue.current?.link()??!1,end:e=>{s.close(),te.current?.element===o&&(te.current=null),G(null),me(!1),se.current?.onChange?.({typing:!1,why:e})}});if(!a)return s.close(),!1;const c=n.closest?.(`[${Ve}]`)?.getAttribute(Ve);return c&&M.select(c),te.current={s:a,element:o,target:e},G(()=>o),V(null),me(!0),se.current?.onChange?.({typing:!0,element:n}),!0},ye=(e,n)=>{const o=e.key;if(!o||!se.current?.onCopyText)return null;const r=t(n),l=n.closest?.(`[${Ve}]`),i=l?.getAttribute(Ve);if(!r||!i||!r.wrapper.contains(l))return null;const{copy:s}=r,a=se.current.copyValue?.({...s,nodeId:i,key:o}),c=g(n,e.skip).text,u=a??(y(e.value,e.rules).text===c?e.value:c),d={ownerId:s.ownerId,slot:s.slot,index:s.index,...s.outer?{outer:s.outer}:{},nodeId:i,key:o};return{value:u,write:t=>{const n=se.current?.onCopyText;n&&!1!==n({...d,text:t})||e.write(t)}}};J(()=>()=>te.current?.s.stop("stop"),[]);const ve=e=>{const t=te.current?.element();return Boolean(t&&t.contains(e))},we=(e,t)=>st(M.getState().appState.data,M.config,e,t),be=e=>{const t=e.closest?.(`[${Ve}]`)?.getAttribute(Ve);if(!t)return;const n=M.getState(),o="node"===n.selection?.kind?n.selection.id:null,r=F?.partAt(e,t)??null;if(r){const e=a(n.appState.data,M.config,t,r.id,o,F?.selected()??null,O);if(e)return{node:e.node,part:e.part?r:null}}return{node:c(n.appState.data,M.config,t,o,O)??t,part:null}},ke=e=>{if("Enter"!==e.key||e.defaultPrevented||e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return;if(te.current)return;const t=e.target;if(t?.isContentEditable||t?.closest?.("input, textarea, select, button"))return;const n=Se(),o=void 0===n?se.current?.atSelection?.():n;o&&ge(o,null)&&e.preventDefault()},Se=()=>{const t=se.current,n=le.current;if(!t?.onCopyText||!n?.copy||n.node!==N)return;const o=de.current,r=o?e(o,n.copy):null,l=r?It(r,n.node):null;if(!l)return null;const i=t.atSelection?.()??null,s=i?.element()??null;if(!i||!s)return null;if(l.contains(s))return i;const a=function(e,t){const n=e.closest(`[${Ve}]`);if(!n||n.getAttribute(Ve)!==t.getAttribute(Ve))return null;const o=[];for(let t=e;t!==n;t=t.parentElement)o.unshift(Array.prototype.indexOf.call(t.parentElement.children,t));let r=t;for(const e of o)r=r?.children[e];return r&&r.tagName===e.tagName?r:null}(s,l);return a?t.at(a):null},xe=(e,n)=>{if(!se.current?.onCopyText)return null;const o=t(e);return o&&It(o.wrapper,n)?o.copy:null},Ce=de.current?.ownerDocument??null,Ie=F?.selected()&&Ce&&N?F.selectedPart?.(Ce)??null:null,Ee=Ie&&N&&we(N,Ie)?Ie.element:null,Ae=H?.selected()??null,Me=Ae&&Ce?Array.from(Ce.querySelectorAll(`[${ct}]`)).find(e=>e.getAttribute(ct)===Ae)??null:null,Oe=X?null:pe(),Pe=/* @__PURE__ */ce("div",{ref:de,className:"es-canvas-content",style:{position:"relative"},onClick:e=>{const t=e.target;if(t.closest?.("a[href]")&&e.preventDefault(),te.current){if(ve(t))return;te.current.s.stop("outside")}const n=t.ownerDocument?.getSelection?.();n&&n.rangeCount>0&&n.isCollapsed&&n.removeAllRanges();const o=H?dt(t):null;if(H&&o)return H.select(o.id),q(null),void Q();const r=be(t);if(le.current=void 0!==r?{node:r.node,copy:xe(t,r.node)}:null,void 0!==r)return M.select(r.node),void(F&&(r.part?.id??null)!==F.selected()&&U(r.part?.id??null));t.hasAttribute?.(Ke)||(M.select(null),F?.selected()&&U(null))},onDoubleClick:e=>{const t=se.current;if(!t||ve(e.target))return;const n=t.at(e.target);n&&ge(n,{x:e.clientX,y:e.clientY})&&e.preventDefault()},onKeyDown:e=>ke(e),onMouseOver:e=>{if(te.current)return;const t=H?dt(e.target):null;if(t?.element!==W?.element&&q(t),t)return null!==B&&V(null),void(null!==K&&T(null));const n=be(e.target),o=!!n?.part&&we(n.node,n.part),r=n?.part&&o&&n.part.id!==F?.selected()?n.part:null,l=!n||n.part&&o?null:n.node;l!==B&&V(l),r?.id===K?.id&&r?.element===K?.element||T(r)},onMouseLeave:()=>{V(null),T(null),q(null)},children:[
15
- /* @__PURE__ */ae(qe.Provider,{value:B,children:/* @__PURE__ */ae(rt,{metadata:i})}),
16
- /* @__PURE__ */ce(xt,{children:[
17
- /* @__PURE__ */ae(Ct,{id:!X&&B&&B!==N?B:null,kind:"hover",overlay:C}),F?/* @__PURE__ */ae(pt,{clip:!0,element:X||!K||K.id===F.selected()?null:K.element}):null,Oe||Ee?/* @__PURE__ */ae(ht,{clip:!0,element:X?null:Oe??Ee,words:null!==Oe}):null,H?/* @__PURE__ */ae(pt,{element:X||!W||W.element===Me?null:W.element}):null,Me?/* @__PURE__ */ae(ht,{element:X?null:Me}):null,
18
- /* @__PURE__ */ae(Ct,{id:X||Ee||Oe||Me?null:N,kind:"selected",overlay:C}),X?/* @__PURE__ */ae(Dt,{element:()=>{const e=X?.()??null;return e?Ie&&x(Ie.element,e)?Ie.element:e:null},which:Ie?.element??X}):null]}),I]}),Re=S?/* @__PURE__ */ae(S,{document:R,children:Pe}):Pe;J(()=>{if(R&&z)return De(R,M)},[R,z,M]),J(()=>{if(!R)return;const e=e=>{if("Enter"===e.key)return void ke(e);if("Escape"!==e.key||e.defaultPrevented)return;const t=e.target;if(t?.isContentEditable||t?.closest?.("input, textarea, select"))return;const n=M.getState();if("node"!==n.selection?.kind)return;if(F?.selected())return void U(null);const o=s(n.appState.data,M.config,n.selection);"node"===o?.kind&&M.select(o.id)};return R.addEventListener("keydown",e),()=>R.removeEventListener("keydown",e)},[R,M,F]);/* @__PURE__ */
19
- return ce("div",{className:"es-canvas"+(r?` ${r}`:""),style:l,"data-easel-preview":"","data-es-typing":X?"":void 0,children:[X&&te.current?.target.toolbar?/* @__PURE__ */ae(Mt,{s:te.current.s,element:te.current.element,toolbar:te.current.target.toolbar,label:j.textTools,keys:ue}):null,o?/* @__PURE__ */ae(We,{mirrorStyles:u,onDocument:e=>{L(e??void 0),d?.(e)},height:p,title:f,nonce:h,children:Re}):/* @__PURE__ */ae("div",{id:"preview-frame","data-easel-entry":"",children:Re})]})}function $t(e={}){const t=je(),n=ze(e=>e.appState.data);return i({...e,data:n,config:t.config,commit:(e,{select:n})=>t.run({data:e,select:n})})}var Pt=/* @__PURE__ */new WeakMap,jt=[];function zt(e){let t=Pt.get(e);return t||(t={nodes:/* @__PURE__ */new Map,shown:/* @__PURE__ */new Map,listeners:/* @__PURE__ */new Set,lateListeners:/* @__PURE__ */new Set,settled:[]},Pt.set(e,t)),t}function Rt(e,t){const n=e.nodes.get(t),o=n?[...n.running,...n.next]:jt;o.length?e.shown.set(t,o):e.shown.delete(t),e.listeners.forEach(e=>e())}function Lt(e,t,n,o){const r=zt(e),l=r.nodes.get(t);l?l.next=[...l.next,n]:r.nodes.set(t,{running:jt,next:[n]}),Rt(r,t),l||Promise.resolve().then(()=>Nt(r,t,o))}function Nt(e,t,n){const o=e.nodes.get(t);if(!o)return;if(!o.next.length)return e.nodes.delete(t),Rt(e,t),void(e.nodes.size||e.settled.splice(0).forEach(e=>e()));const r=o.next;o.running=r,o.next=jt;let l=!0;const i=()=>{l=!1,clearTimeout(a),o.running=jt,Rt(e,t)};let s=!1;const a=setTimeout(()=>{s=!0,i();try{n.landWithoutAnswer(r)&&(e.lateListeners.forEach(e=>e()),Promise.reject(new Error(`A write to ${t} landed without its resolver's answer after 60000 ms.`)))}catch(e){Promise.reject(e)}Nt(e,t,n)},6e4);n.run(r,{live:()=>l,landing:i}).catch(e=>{if(!s)throw e}).finally(()=>{s||(l&&i(),Nt(e,t,n))})}function Bt(e){const t=zt(e);return t.nodes.size?new Promise(e=>t.settled.push(e)):Promise.resolve()}function Vt(){const e=je(),t=ee([]),n=ee(!1),[o,r]=ne(!1),[,l]=oe(e=>e+1,0);J(()=>{t.current.splice(0).forEach(e=>e())});return{run:re(o=>{n.current||(n.current=!0,r(!0),Bt(e).then(()=>new Promise(e=>{t.current.push(e),l()})).then(()=>{n.current=!1,r(!1),o()}))},[e]),waiting:o}}function Kt(e){const t=Vt(),n=ee(e);return n.current=e,{...e,busy:!0===e.busy||t.waiting,onPress:()=>t.run(()=>n.current.onPress())}}function Tt(e,t){const{lateListeners:n}=zt(e);return n.add(t),()=>{n.delete(t)}}var Ft=e=>"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===Object.prototype;function Zt(e,t,n){if(t===e)return n;if(Array.isArray(e)&&Array.isArray(t)&&Array.isArray(n)){if(e.length!==n.length||e.some((e,t)=>n.includes(e)&&n[t]!==e))return t;const o=e.length===t.length&&1===t.filter((t,n)=>t!==e[n]).length;return t.map((t,r)=>{if(t===e[r])return n[r];const l=Ft(t)?e.indexOf(t):-1;return l>=0?n[l]:o?Zt(e[r],t,n[r]):t})}if(Ft(e)&&Ft(t)&&Ft(n)){const o={...n};for(const n of Object.keys(e))n in t||delete o[n];for(const r of Object.keys(t))o[r]=Zt(e[r],t[r],n[r]);return o}return t}function Ht(e,t){let n=null;for(const o of e){const e="function"==typeof o?o({...t,...n}):o;e&&(n={...n,...e})}return n}function Wt(e,t){if(!e.length)return t;try{return{...t,...Ht(e,t)}}catch{return t}}function qt(){return Gt(ze(e=>e.selectedItem))}function Qt(){const e=_(Yt);try{return function(e){const t=ze(e=>e.selectedItem);return Gt("root"===e?null:t)}(e)}catch{return null}}var Yt=G("selected");function Ut({children:e}){return le(Yt.Provider,{value:"root"},e)}function Xt(){return Gt(null)}function Gt(e){const t=je(),n=ze(e=>e.config),r=t.resolveCache,l=ze(e=>e.appState.data.root),i=e?e.props.id:"root",s=l.props??{},a=ie(()=>e||{type:"root",props:s},[e,s]),c=e?n.components[e.type]:n.root,u=t.getState(),d=e?$(u.appState.data,n,i):null,p=d&&"root"!==d.place.parentId?d.place.parentId:null,f=p?u.getItemById(p)??null:null,{fields:h}=o({id:i,node:a,block:c,parent:f,appState:u.appState}),m=ze(t=>!1===t.getPermissions(e?{item:e}:{root:!0}).edit),g=re(e=>{Lt(t,i,e,{landWithoutAnswer:e=>{const n=t.getState();if("root"===i){const o=n.appState.data.root.props??{},r=Ht(e,o);return!!r&&(t.dispatch({type:"replaceRoot",root:{props:{...o,...r},readOnly:n.appState.data.root.readOnly},recordHistory:!0}),!0)}const o=n.getItemById(i),r=n.getSelectorForId(i);if(!o||!r)return!1;const l=Ht(e,o.props);return!!l&&(t.dispatch({type:"replace",destinationZone:r.zone??"root:default-zone",destinationIndex:r.index,data:{...o,props:{...o.props,...l}}}),!0)},run:async(e,{live:n,landing:o})=>{for(let l=1;;l+=1){const s=t.getState(),a={...r,lastChange:Object.create(r.lastChange)},c=()=>{o(),Object.assign(r.lastChange,a.lastChange)};if("root"!==i){const o=s.getItemById(i);if(!o)return;const r=Ht(e,o.props);if(!r)return;const u={...o,props:{...o.props,...r}},{node:d}=await q(u,t.config,{cache:a,trigger:"replace"});if(!n())return;const p=t.getState(),f=p.getSelectorForId(i);if(!f)return;if(p.getItemById(i)!==o&&l<5)continue;return c(),void t.dispatch({type:"replace",destinationZone:f.zone??"root:default-zone",destinationIndex:f.index,data:d})}const u=s.appState.data.root.props??{},d=Ht(e,u);if(!d)return;const{node:p}=await q({type:"root",props:{...u,...d}},t.config,{cache:a,trigger:"replace"});if(!n())return;if(!(t.getState().appState.data.root.props!==s.appState.data.root.props&&l<5))return c(),void t.dispatch({type:"replaceRoot",root:{props:p.props,readOnly:p.readOnly},recordHistory:!0})}}})},[t,r,i]),y=re(e=>{const{listeners:n}=zt(t);return n.add(e),()=>{n.delete(e)}},[t]),v=re(()=>zt(t).shown.get(i)??jt,[t,i]),w=te(y,v,v),b=ie(()=>Wt(w,a.props),[w,a.props]),k=ee({id:i,values:b});k.current={id:i,values:b};const S=re((e,n)=>{const o=t.getState(),r=("root"===i?o.appState.data.root.props:o.getItemById(i)?.props)??{},l=Wt(zt(t).shown.get(i)??jt,r),s=k.current,a=(s.id===i?s.values:l)[e];H(n,a)&&!H(l[e],a)?g({[e]:n}):g(t=>({[e]:Zt(a,n,t[e])}))},[t,i,g]);return{id:i,node:a,fields:h,values:b,readOnly:m,onChange:S,onChangeMany:g}}export{ct as CHROME_ATTR,ut as CanvasChromeContext,We as CanvasFrame,at as CanvasPartsContext,lt as CanvasPassThroughContext,it as CanvasSharedContext,Ie as DEFAULT_UI,Ot as EaselCanvas,Pe as EaselProvider,rt as EditDocument,Ut as RootHostScope,De as bindUndoKeys,Me as createEasel,Re as createUseEasel,st as partHasOwnBox,ge as recordsByDefault,Se as reduce,Tt as subscribeLateWrites,we as uiView,ze as useEasel,je as useEaselApi,$t as useEaselNodeOps,Xt as useRootFields,qt as useSelectedFields,Qt as useSelectedHost,Kt as useSettledAction,Vt as useSettledPress,be as validSelection,Bt as writesSettled};
@@ -1 +0,0 @@
1
- import{useSectionOps as o}from"./chunk-TYTMUHUK.js";import{SELECTION_MODE as e}from"./chunk-2262JGFV.js";import{decodePartId as r,encodePartId as t}from"./chunk-R4AUZVA3.js";import{useEasel as n}from"./chunk-3W2O22DZ.js";import{usePreviewParts as p}from"./chunk-467WWV4I.js";import{useCallback as d,useEffect as c}from"react";var s=o=>"part"===o.kind;function m({mode:m,setMode:i,onOpenPart:a}){const{getSelectorForId:u}=n(o=>o),f=o(),{setSelectedPartId:k,setSelectHandler:l}=p(),I=d(o=>{const t=r(o);if(!t)return;const{nodeId:n,propKey:p}=t;p?(i(o=>s(o)&&o.nodeId===n&&o.propKey===p?o:{kind:"part",nodeId:n,propKey:p}),a?.(n)):i(o=>"part"===o.kind?e:o)},[i,a]);c(()=>{l(I)},[l,I]);const h=s(m)?t(m.nodeId,m.propKey):null;c(()=>{k(h)},[h,k]);return{selectNode:d(o=>{i(()=>e);const r=u(o);r&&f.select(r)},[i,u,f]),openPartId:h}}export{m as usePartBridge};
@@ -1 +0,0 @@
1
- import{styleFieldBuilders as e,keptByRow as s}from"./chunk-ZFEAWEFS.js";import{boxFieldBuilders as o,PHONE_KEY_ACCESS as l,phoneTwinFields as r,section as i}from"./chunk-76MUJIZE.js";import{deviceField as t}from"./chunk-ZNLODQD4.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),F=e(a.say),y=c,m=a.style,k=a.phone??l;return{...a.padding&&{_dSize:i("Size"),...p.sidesPaddingFields({keys:n,group:!1,...a.padding})},_dDesign:i("Design"),[y.fill]:F.colourField({key:y.fill,access:m,label:"Fill color",icon:/* @__PURE__ */f(d,{}),useFollows:a.follows.useFill,usePresets:a.usePresets,resetTo:a.resetTo,opacity:{key:y.fillOpacity,useUnset:a.follows.useFillOpacity}}),[y.fillOpacity]:s(y.fill),[y.border]:F.borderField({key:y.border,access:m,useFollows:a.follows.useBorder}),[y.text]:F.colourField({key:y.text,access:m,label:"Text color",icon:/* @__PURE__ */f(u,{}),useFollows:a.follows.useText,usePresets:a.usePresets,resetTo:a.resetTo}),[y.corners]:F.cornersField({key:y.corners,access:m,sidesKey:y.cornerSides,useFollows:a.follows.useCorners,useFollowsSides:a.follows.useCornerSides}),[y.cornerSides]:s(y.corners),_dLayout:i("Layout"),...r("align",p.blockAlignmentField({phone:!0},""),k),align:t("desktop",p.blockAlignmentField())}}export{a as buttonFieldSet};