efficient-easel 20.2.1 → 21.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 (266) hide show
  1. package/README.md +30 -9
  2. package/dist/{CanvasDragLayer-ARfaivCu.d.ts → CanvasDragLayer-CFUcBbgc.d.ts} +2 -2
  3. package/dist/{ScreenDocumentContext-CFJeqqKk.d.ts → ScreenDocumentContext-1RgtGKWR.d.ts} +4 -0
  4. package/dist/blocks/index.d.ts +5 -3
  5. package/dist/{buckets-Tj-nkBpg.d.ts → buckets-Sw94ll9I.d.ts} +1 -1
  6. package/dist/canvas/index.d.ts +8 -6
  7. package/dist/canvas/index.js +1 -1
  8. package/dist/chunk-2C7W64S5.js +8 -0
  9. package/dist/chunk-2L6KWUBC.js +1 -0
  10. package/dist/chunk-467WWV4I.js +1 -0
  11. package/dist/chunk-4FD7TAOE.js +1 -0
  12. package/dist/chunk-67HCYOW4.js +1 -0
  13. package/dist/chunk-A2VVB4RH.js +0 -0
  14. package/dist/{chunk-2GVCAIPX.js → chunk-BDSLF5BR.js} +1 -1
  15. package/dist/{chunk-U66YKDAR.js → chunk-BIK3AO2V.js} +1 -1
  16. package/dist/chunk-BTDI7JAA.js +2 -0
  17. package/dist/chunk-DDH2DYQP.js +1 -0
  18. package/dist/{chunk-I7BROL77.js → chunk-DNQ7AF6K.js} +1 -1
  19. package/dist/{chunk-HK6I3NVO.js → chunk-E52W3M5I.js} +1 -1
  20. package/dist/chunk-EB6NI2VK.js +1 -0
  21. package/dist/chunk-FM6JO4WF.js +2 -0
  22. package/dist/{chunk-JQXD3TDE.js → chunk-GWYNMSIP.js} +1 -1
  23. package/dist/{chunk-7YVEYQDE.js → chunk-I67UW5UG.js} +3 -3
  24. package/dist/chunk-JACEEVVF.js +1 -0
  25. package/dist/{chunk-QAJAEWCZ.js → chunk-KFWNGPW3.js} +5 -5
  26. package/dist/{chunk-FGYJ5DJY.js → chunk-KWLHKKZO.js} +1 -1
  27. package/dist/chunk-MLQKNED6.js +1 -0
  28. package/dist/chunk-MZ5GSSZ3.js +7 -0
  29. package/dist/{chunk-43AEUUNQ.js → chunk-N3MJOHAG.js} +1 -1
  30. package/dist/{chunk-BVN33R76.js → chunk-N7E6264U.js} +1 -1
  31. package/dist/chunk-OHZHYROJ.js +5 -0
  32. package/dist/chunk-PFFH7ASD.js +21 -0
  33. package/dist/chunk-PRHBWA5V.js +0 -0
  34. package/dist/chunk-S3DUFDQ6.js +6 -0
  35. package/dist/chunk-SNF5764Q.js +1 -0
  36. package/dist/chunk-SSRYU3YG.js +1 -0
  37. package/dist/chunk-SWBADIQT.js +1 -0
  38. package/dist/{chunk-GOTN2KY4.js → chunk-TIAWIOGD.js} +1 -1
  39. package/dist/chunk-TQ5Y6S2X.js +1 -0
  40. package/dist/chunk-TUXLORVR.js +15 -0
  41. package/dist/{chunk-FGNR22NY.js → chunk-U5DNBT63.js} +1 -1
  42. package/dist/chunk-U7TFWHST.js +5 -0
  43. package/dist/chunk-WHS6Y55E.js +10 -0
  44. package/dist/chunk-WJJ7H42G.js +18 -0
  45. package/dist/{chunk-ZOBSIXRD.js → chunk-Y2T3JX7K.js} +1 -1
  46. package/dist/chunk-YIUE4US7.js +0 -0
  47. package/dist/{chunk-O7Q4DDJT.js → chunk-YM4UEGBV.js} +1 -1
  48. package/dist/chunk-YVFYWAYU.js +65 -0
  49. package/dist/{chunk-UJ46J7QW.js → chunk-ZOSEBPAI.js} +1 -1
  50. package/dist/copy/index.d.ts +2 -2
  51. package/dist/copy/index.js +13 -13
  52. package/dist/drag/drag.css +3 -9
  53. package/dist/drag/index.d.ts +3 -3
  54. package/dist/drag/index.js +1 -1
  55. package/dist/draw/client.d.ts +1 -1
  56. package/dist/draw/client.js +1 -1
  57. package/dist/draw/index.d.ts +9 -9
  58. package/dist/draw/index.js +1 -1
  59. package/dist/easel/easel.css +3 -1
  60. package/dist/easel/index.d.ts +2 -2
  61. package/dist/easel/index.js +1 -1
  62. package/dist/fields/fields.css +2 -2
  63. package/dist/fields/index.d.ts +5 -5
  64. package/dist/fields/index.js +1 -1
  65. package/dist/panel/index.d.ts +39 -140
  66. package/dist/panel/index.js +15 -15
  67. package/dist/panel/panel.css +53 -347
  68. package/dist/render/index.d.ts +2 -2
  69. package/dist/render/index.js +5 -5
  70. package/dist/{repeat-Czi-6zPX.d.ts → repeat-BNgSq2Nw.d.ts} +1 -1
  71. package/dist/screen/components/AddBlockRow.d.ts +1 -1
  72. package/dist/screen/components/AddBlockRow.js +1 -1
  73. package/dist/screen/components/AddSidePanel.d.ts +2 -2
  74. package/dist/screen/components/AddSidePanel.js +1 -1
  75. package/dist/screen/components/NodeContextMenu.d.ts +15 -15
  76. package/dist/screen/components/NodeContextMenu.js +1 -1
  77. package/dist/screen/components/PageEditGuardNotices.js +1 -1
  78. package/dist/screen/components/PreviewPartsContext.d.ts +2 -2
  79. package/dist/screen/components/PreviewPartsContext.js +1 -1
  80. package/dist/screen/components/SaveControls.d.ts +9 -9
  81. package/dist/screen/components/ScreenChrome.js +1 -1
  82. package/dist/screen/components/ScreenDocumentContext.d.ts +2 -2
  83. package/dist/screen/components/ScreenDocumentContext.js +1 -1
  84. package/dist/screen/components/ScreenMount.d.ts +9 -9
  85. package/dist/screen/components/ScreenMount.js +1 -1
  86. package/dist/screen/components/ScreenStoreProvider.d.ts +9 -9
  87. package/dist/screen/components/ScreenStoreProvider.js +1 -1
  88. package/dist/screen/components/SectionScreenShell.js +17 -17
  89. package/dist/screen/components/SlotChildActionsContext.d.ts +1 -1
  90. package/dist/screen/components/usePartBridge.d.ts +9 -9
  91. package/dist/screen/components/usePartBridge.js +1 -1
  92. package/dist/screen/index.d.ts +10 -10
  93. package/dist/screen/index.js +1 -1
  94. package/dist/screen/lib/admin-bridge.d.ts +1 -1
  95. package/dist/screen/lib/admin-bridge.js +1 -1
  96. package/dist/screen/lib/content/view-tiers.d.ts +15 -3
  97. package/dist/screen/lib/content/view-tiers.js +1 -1
  98. package/dist/screen/lib/document/add-target-types.d.ts +55 -0
  99. package/dist/screen/lib/document/add-target-types.js +1 -0
  100. package/dist/screen/lib/document/block-choice.d.ts +64 -0
  101. package/dist/screen/lib/document/block-choice.js +1 -0
  102. package/dist/screen/lib/document/block-types-in.d.ts +39 -0
  103. package/dist/screen/lib/document/block-types-in.js +1 -0
  104. package/dist/screen/lib/document/content-tree.d.ts +222 -0
  105. package/dist/screen/lib/document/content-tree.js +1 -0
  106. package/dist/screen/lib/document/device-fields.d.ts +128 -0
  107. package/dist/screen/lib/document/device-fields.js +1 -0
  108. package/dist/screen/lib/document/field-buckets.d.ts +36 -0
  109. package/dist/screen/lib/document/field-buckets.js +1 -0
  110. package/dist/screen/lib/document/field-markers.d.ts +205 -0
  111. package/dist/screen/lib/document/field-markers.js +1 -0
  112. package/dist/screen/lib/document/hidable.d.ts +44 -0
  113. package/dist/screen/lib/document/hidable.js +1 -0
  114. package/dist/screen/lib/document/palette-sections.d.ts +103 -0
  115. package/dist/screen/lib/document/palette-sections.js +1 -0
  116. package/dist/screen/lib/document/panel-fields.d.ts +47 -0
  117. package/dist/screen/lib/document/panel-fields.js +1 -0
  118. package/dist/screen/lib/document/panel-no-control-mark.d.ts +74 -0
  119. package/dist/screen/lib/document/panel-no-control-mark.js +1 -0
  120. package/dist/screen/lib/document/part-id.d.ts +23 -0
  121. package/dist/screen/lib/document/part-id.js +1 -0
  122. package/dist/screen/lib/document/preview-click.d.ts +49 -0
  123. package/dist/screen/lib/document/preview-click.js +1 -0
  124. package/dist/screen/lib/document/preview-dom.d.ts +8 -0
  125. package/dist/screen/lib/document/preview-dom.js +1 -0
  126. package/dist/screen/lib/document/preview-events.d.ts +25 -0
  127. package/dist/screen/lib/document/preview-events.js +1 -0
  128. package/dist/screen/lib/document/preview-selection-context.d.ts +72 -0
  129. package/dist/screen/lib/document/preview-selection-context.js +1 -0
  130. package/dist/screen/lib/document/section-doc.d.ts +24 -0
  131. package/dist/screen/lib/document/section-doc.js +1 -0
  132. package/dist/screen/lib/document/slot-child-name.d.ts +225 -0
  133. package/dist/screen/lib/document/slot-child-name.js +1 -0
  134. package/dist/screen/lib/document/slot-heal.d.ts +5 -0
  135. package/dist/screen/lib/document/slot-heal.js +1 -0
  136. package/dist/screen/lib/document/slot-section-spec.d.ts +96 -0
  137. package/dist/screen/lib/document/slot-section-spec.js +1 -0
  138. package/dist/screen/lib/document/style-clipboard.d.ts +144 -0
  139. package/dist/screen/lib/document/style-clipboard.js +1 -0
  140. package/dist/screen/lib/document/text-control-kinds.d.ts +71 -0
  141. package/dist/screen/lib/document/text-control-kinds.js +1 -0
  142. package/dist/screen/lib/document/tree-reveal.d.ts +62 -0
  143. package/dist/screen/lib/document/tree-reveal.js +1 -0
  144. package/dist/screen/lib/document/use-section-ops.d.ts +110 -0
  145. package/dist/screen/lib/document/use-section-ops.js +1 -0
  146. package/dist/screen/lib/document-addressing.d.ts +2 -2
  147. package/dist/screen/lib/document-switch.d.ts +1 -1
  148. package/dist/screen/lib/host.d.ts +2 -2
  149. package/dist/screen/lib/key-scope.d.ts +1 -1
  150. package/dist/screen/lib/key-scope.js +1 -1
  151. package/dist/screen/lib/media-panel.d.ts +2 -2
  152. package/dist/screen/lib/media-picker.d.ts +2 -2
  153. package/dist/screen/lib/page-lock.d.ts +1 -1
  154. package/dist/screen/lib/puck/add-target-types.d.ts +3 -55
  155. package/dist/screen/lib/puck/add-target-types.js +1 -0
  156. package/dist/screen/lib/puck/block-choice.d.ts +1 -64
  157. package/dist/screen/lib/puck/block-choice.js +1 -1
  158. package/dist/screen/lib/puck/block-types-in.d.ts +1 -39
  159. package/dist/screen/lib/puck/block-types-in.js +1 -1
  160. package/dist/screen/lib/puck/content-tree.d.ts +1 -222
  161. package/dist/screen/lib/puck/content-tree.js +1 -1
  162. package/dist/screen/lib/puck/device-fields.d.ts +3 -127
  163. package/dist/screen/lib/puck/device-fields.js +1 -1
  164. package/dist/screen/lib/puck/field-buckets.d.ts +2 -36
  165. package/dist/screen/lib/puck/field-buckets.js +1 -1
  166. package/dist/screen/lib/puck/field-markers.d.ts +2 -205
  167. package/dist/screen/lib/puck/field-markers.js +1 -1
  168. package/dist/screen/lib/puck/hidable.d.ts +1 -44
  169. package/dist/screen/lib/puck/hidable.js +1 -1
  170. package/dist/screen/lib/puck/palette-sections.d.ts +2 -97
  171. package/dist/screen/lib/puck/palette-sections.js +1 -1
  172. package/dist/screen/lib/puck/panel-fields.d.ts +1 -47
  173. package/dist/screen/lib/puck/panel-fields.js +1 -1
  174. package/dist/screen/lib/puck/panel-no-control-mark.d.ts +2 -74
  175. package/dist/screen/lib/puck/panel-no-control-mark.js +1 -1
  176. package/dist/screen/lib/puck/part-id.d.ts +1 -23
  177. package/dist/screen/lib/puck/part-id.js +1 -1
  178. package/dist/screen/lib/puck/preview-click.d.ts +1 -49
  179. package/dist/screen/lib/puck/preview-click.js +1 -1
  180. package/dist/screen/lib/puck/preview-dom.d.ts +1 -8
  181. package/dist/screen/lib/puck/preview-dom.js +1 -1
  182. package/dist/screen/lib/puck/preview-events.d.ts +1 -25
  183. package/dist/screen/lib/puck/preview-events.js +1 -1
  184. package/dist/screen/lib/puck/preview-selection-context.d.ts +2 -72
  185. package/dist/screen/lib/puck/preview-selection-context.js +1 -1
  186. package/dist/screen/lib/puck/section-doc.d.ts +3 -18
  187. package/dist/screen/lib/puck/section-doc.js +1 -1
  188. package/dist/screen/lib/puck/slot-child-name.d.ts +1 -225
  189. package/dist/screen/lib/puck/slot-child-name.js +1 -1
  190. package/dist/screen/lib/puck/slot-heal.d.ts +2 -5
  191. package/dist/screen/lib/puck/slot-heal.js +1 -1
  192. package/dist/screen/lib/puck/slot-section-spec.d.ts +1 -96
  193. package/dist/screen/lib/puck/slot-section-spec.js +1 -0
  194. package/dist/screen/lib/puck/style-clipboard.d.ts +14 -116
  195. package/dist/screen/lib/puck/style-clipboard.js +1 -1
  196. package/dist/screen/lib/puck/text-control-kinds.d.ts +1 -71
  197. package/dist/screen/lib/puck/text-control-kinds.js +1 -1
  198. package/dist/screen/lib/puck/tree-reveal.d.ts +1 -62
  199. package/dist/screen/lib/puck/tree-reveal.js +1 -1
  200. package/dist/screen/lib/puck/use-section-ops.d.ts +4 -105
  201. package/dist/screen/lib/puck/use-section-ops.js +1 -1
  202. package/dist/screen/lib/screen-parts.d.ts +27 -20
  203. package/dist/screen/lib/screen-parts.js +1 -1
  204. package/dist/screen/lib/section-template-types.d.ts +1 -1
  205. package/dist/screen/lib/section-templates.d.ts +1 -1
  206. package/dist/screen/lib/section-templates.js +1 -1
  207. package/dist/screen/lib/session-context.d.ts +1 -1
  208. package/dist/screen/lib/session-context.js +1 -1
  209. package/dist/screen/lib/session.d.ts +3 -3
  210. package/dist/screen/lib/session.js +1 -1
  211. package/dist/screen/lib/shared-section-types.d.ts +1 -1
  212. package/dist/screen/lib/shared-sections.d.ts +1 -1
  213. package/dist/screen/lib/shared-sections.js +1 -1
  214. package/dist/screen/screen.css +5 -9
  215. package/dist/screen/words.d.ts +4 -0
  216. package/dist/screen/words.js +1 -1
  217. package/dist/strings/index.d.ts +4 -4
  218. package/dist/strings/index.js +2 -2
  219. package/dist/text-styles/index.js +33 -33
  220. package/dist/tree/index.d.ts +5 -5
  221. package/dist/tree/index.js +1 -1
  222. package/dist/{types-CDX6vd6A.d.ts → types-B8NwXKlE.d.ts} +1 -1
  223. package/dist/{types-Bqq6ya0y.d.ts → types-DBy3L69b.d.ts} +11 -4
  224. package/dist/{watch-BTYOJpQU.d.ts → watch-D8xZow3y.d.ts} +2 -2
  225. package/dist/{words-vhnV8sM7.d.ts → words-CFkb8XtN.d.ts} +5 -0
  226. package/dist/{words-BeX5eGq7.d.ts → words-CmEnDoOe.d.ts} +1 -1
  227. package/dist/{words-CvwYvkJm.d.ts → words-SD4neL0n.d.ts} +6 -0
  228. package/package.json +156 -12
  229. package/dist/chunk-23DYNW6S.js +0 -1
  230. package/dist/chunk-23VM4PMV.js +0 -7
  231. package/dist/chunk-276MBG5P.js +0 -2
  232. package/dist/chunk-6FWAE2RN.js +0 -1
  233. package/dist/chunk-7LYKFL3Q.js +0 -21
  234. package/dist/chunk-A6Z4SD3I.js +0 -10
  235. package/dist/chunk-BHRC3ASL.js +0 -1
  236. package/dist/chunk-EFHV56BO.js +0 -15
  237. package/dist/chunk-I54UCYOU.js +0 -1
  238. package/dist/chunk-JBOSEHIX.js +0 -1
  239. package/dist/chunk-KAML3KQH.js +0 -1
  240. package/dist/chunk-L2Y3PF2R.js +0 -4
  241. package/dist/chunk-LQV5FZTQ.js +0 -18
  242. package/dist/chunk-MEHLY5Q4.js +0 -1
  243. package/dist/chunk-PAOZMXEI.js +0 -5
  244. package/dist/chunk-QIDRJH3S.js +0 -1
  245. package/dist/chunk-R5KEFI55.js +0 -8
  246. package/dist/chunk-RC25EGHD.js +0 -5
  247. package/dist/chunk-RSCMJIWS.js +0 -1
  248. package/dist/chunk-TNGOL65V.js +0 -1
  249. package/dist/chunk-VANKQVOW.js +0 -8
  250. package/dist/chunk-WEIE2FBC.js +0 -1
  251. package/dist/chunk-WRFD4EXD.js +0 -1
  252. package/dist/chunk-XJ2WXGFJ.js +0 -65
  253. /package/dist/{chunk-MQNBD6AB.js → chunk-3QB2ZQXK.js} +0 -0
  254. /package/dist/{chunk-LER7RKTO.js → chunk-5XL2RXFU.js} +0 -0
  255. /package/dist/{chunk-6W7WLPZH.js → chunk-6UAEFOJ4.js} +0 -0
  256. /package/dist/{chunk-26OOWIJJ.js → chunk-7OCEPOEJ.js} +0 -0
  257. /package/dist/{chunk-IQ5TA7AM.js → chunk-AJ2SUSET.js} +0 -0
  258. /package/dist/{chunk-DUVRZ456.js → chunk-ANPOR6EY.js} +0 -0
  259. /package/dist/{chunk-5ZBY24K7.js → chunk-CPL43ZLJ.js} +0 -0
  260. /package/dist/{chunk-PIND6KE7.js → chunk-I6SK6ZDT.js} +0 -0
  261. /package/dist/{chunk-7F52SZOI.js → chunk-INRERJU4.js} +0 -0
  262. /package/dist/{chunk-R5L2E7JX.js → chunk-MGVI67QV.js} +0 -0
  263. /package/dist/{chunk-IYT6NN2J.js → chunk-R4AUZVA3.js} +0 -0
  264. /package/dist/{chunk-M2Z775ZC.js → chunk-RUQOIQWI.js} +0 -0
  265. /package/dist/{chunk-PLVEGYK6.js → chunk-TCAAOYQY.js} +0 -0
  266. /package/dist/{chunk-PA3PNTVV.js → chunk-VKPOH6MK.js} +0 -0
@@ -1 +1 @@
1
- export{markedTreeNodeId,revealSelectedTreeRow,sameSelector}from"../../../chunk-FGNR22NY.js";
1
+ export{markedTreeNodeId,revealSelectedTreeRow,sameSelector}from"../../../chunk-U5DNBT63.js";
@@ -1,110 +1,9 @@
1
- import { N as NodeSelection } from '../../../plan-CZS902DV.js';
2
- import { Data } from '../../../blocks/index.js';
3
- import { TreeItem } from './content-tree.js';
1
+ export { NodeSelector, SectionOps, SectionOpsOptions, useSectionOps } from '../document/use-section-ops.js';
2
+ import '../../../plan-CZS902DV.js';
4
3
  import '../../../types-41704JE4.js';
4
+ import '../../../blocks/index.js';
5
5
  import 'react';
6
6
  import '../../../types-Cq53lL8d.js';
7
7
  import '../../../data/index.js';
8
8
  import '../../../resolve-D68pb3Bx.js';
9
-
10
- type NodeSelector = {
11
- index: number;
12
- zone?: string;
13
- } | null;
14
- type ComponentData = TreeItem;
15
- type SectionOps = {
16
- /** Insert a component into a zone at an index; returns the generated id. */
17
- insertComponent: (zone: string, type: string, index: number) => string;
18
- /** Insert into ROOT_ZONE (top-level section); returns the generated id. */
19
- insertSection: (type: string, index: number) => string;
20
- /** Atomically replace the node at (zone, index) — heal, reseed, hide toggle. */
21
- replaceComponent: (zone: string, index: number, data: ComponentData) => void;
22
- /** Seed a freshly-inserted slot child's props (insert THEN replace at a stable id). */
23
- seedChild: (zone: string, index: number, childType: string, props: Record<string, unknown>) => void;
24
- /**
25
- * Insert a FULL node — type + props, including inline slot children — at
26
- * (zone, index); returns its id. The same insert-then-replace pattern as
27
- * seedChild, one level up: how a saved section template lands in a page.
28
- * Callers pass a node whose ids are already fresh (cloneNodeWithFreshIds).
29
- */
30
- insertNode: (zone: string, index: number, node: TreeItem) => string;
31
- /** Remove the node at (zone, index). A normal dispatch, so Undo restores it. */
32
- removeComponent: (zone: string, index: number) => void;
33
- /**
34
- * Move the node at (zone, sourceIndex) to destinationIndex WITHIN THE SAME
35
- * zone. `destinationIndex` is the node's final resting index in the array
36
- * (Puck's `reorder` reducer splices it out then back in), so a caller moving a
37
- * node DOWN must account for the one-slot shift itself.
38
- */
39
- reorderComponent: (zone: string, sourceIndex: number, destinationIndex: number) => void;
40
- /** Duplicate the node at (zone, index). */
41
- duplicateComponent: (zone: string, index: number) => void;
42
- /** Set (or clear) the Puck selection by index-based address. */
43
- select: (selector: NodeSelector) => void;
44
- /** Replace the whole working document (used by Reset). */
45
- setDocument: (data: Data) => void;
46
- /**
47
- * Write the next document, and what to select in it, as ONE undo step — the
48
- * commit behind the block operations (`efficient-easel/node-ops`, blueprint
49
- * step 2.4b: the menu's Delete, Duplicate, Move, Copy / Cut / Paste and Hide,
50
- * and the rows' hover-delete). Each of those is planned whole and lands here
51
- * once, instead of the two or three dispatches it used to be.
52
- *
53
- * `select` is BY ID, in `data` (`undefined` leaves the selection as it is),
54
- * and goes in with the document through the store's `run` (0.105.1). Until
55
- * then the chrome selected first, by position (`setUi { itemSelector }`),
56
- * which the store reads in the document it still holds: a paste or a
57
- * Duplicate selected the node after its copy, and a Move the node it passed.
58
- * Behind the read-only gate like every other mutation here.
59
- */
60
- commitDocument: (data: Data, select?: NodeSelection) => void;
61
- };
62
- type SectionOpsOptions = {
63
- /**
64
- * SOMEBODY ELSE holds the open document: every MUTATION below becomes a no-op.
65
- *
66
- * This is the one place the editor's read-only state is enforced on the
67
- * document, and it is here rather than on each button because this hook is
68
- * already the single source of truth for every mutation — the tree rows, the
69
- * canvas "+" seams, the inspector head buttons and the lifecycle effects all
70
- * come through it. A gate on the buttons would be a gate on the ones somebody
71
- * remembered.
72
- *
73
- * `select` and `setUi` are NOT mutations and stay live: a read-only viewer must
74
- * still be able to click a section and read its settings.
75
- *
76
- * Deliberately keyed on "somebody else has it" and NOT on the wider save gate.
77
- * The save gate is also false while the lock claim is still `checking`, and the
78
- * pinned Header/Footer seed runs in the chrome's mount commit, inside that
79
- * window, through these very ops. Its WRITE is what is held there — by
80
- * `onChange`, released by the claim if it is granted — so the seed must be
81
- * allowed to lay the node down (card 1096). Blocking it here would silently
82
- * un-fix that card.
83
- */
84
- readOnly?: boolean;
85
- /**
86
- * Resolve each node an op puts in (`easel.resolveNode`, trigger `"insert"`).
87
- * Default: the layer's rule (`ScreenBlockRules.resolveOnInsert`), else
88
- * false — no op resolves anything, as before 0.103.0.
89
- */
90
- resolveOnInsert?: boolean;
91
- /**
92
- * NOT AN UNDO STEP: every write is folded into the history entry it happens
93
- * in (the store's `recordHistory: false`), as the store folds a resolver's
94
- * write (`resolveAll`), instead of being recorded as a step of its own.
95
- *
96
- * For the passes the screen runs over a document AS IT OPENS — the slot
97
- * seeding, the duplicate-id heal, and the layer's own pass (the website's
98
- * pinned Header and Footer). Recorded, each was the first entry of the
99
- * history: Undo was offered the moment the page opened, and ONE press took
100
- * the seeded slides and cards (or the Header) back out of the page, which
101
- * autosave then wrote (1.0.1). Folded, the document opens as the history's
102
- * first entry; a pass that runs after an edit (a section just inserted,
103
- * seeded) lands in that edit's step, so one Undo takes both out together.
104
- * Autosave still hears every write (the store's `onChange` fires on a fold).
105
- */
106
- foldIntoHistory?: boolean;
107
- };
108
- declare function useSectionOps(options?: SectionOpsOptions): SectionOps;
109
-
110
- export { type NodeSelector, type SectionOps, type SectionOpsOptions, useSectionOps };
9
+ import '../document/content-tree.js';
@@ -1 +1 @@
1
- export{useSectionOps}from"../../../chunk-WEIE2FBC.js";import"../../../chunk-PAOZMXEI.js";import"../../../chunk-FHCKFOCD.js";import"../../../chunk-MQA7OFRA.js";import"../../../chunk-EFHV56BO.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-7LYKFL3Q.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-A6Z4SD3I.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-ZEH6QLBH.js";import"../../../chunk-IWCKVZHS.js";import"../../../chunk-FIVU2COQ.js";import"../../../chunk-RC25EGHD.js";import"../../../chunk-KFV7N2DJ.js";import"../../../chunk-BSHIQIZC.js";import"../../../chunk-23VM4PMV.js";import"../../../chunk-KRL3IUV3.js";import"../../../chunk-ZOBSIXRD.js";import"../../../chunk-QAJAEWCZ.js";import"../../../chunk-WRFD4EXD.js";import"../../../chunk-VANKQVOW.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-3S5N4HLJ.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-K7BTCBWD.js";import"../../../chunk-L55YIXDC.js";import"../../../chunk-QIDRJH3S.js";import"../../../chunk-PLVEGYK6.js";import"../../../chunk-LF3FUSCQ.js";
1
+ export{useSectionOps}from"../../../chunk-MLQKNED6.js";import"../../../chunk-OHZHYROJ.js";import"../../../chunk-PRHBWA5V.js";import"../../../chunk-FHCKFOCD.js";import"../../../chunk-MQA7OFRA.js";import"../../../chunk-TCAAOYQY.js";import"../../../chunk-TUXLORVR.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-PFFH7ASD.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-ZEH6QLBH.js";import"../../../chunk-FM6JO4WF.js";import"../../../chunk-KFV7N2DJ.js";import"../../../chunk-WHS6Y55E.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-IWCKVZHS.js";import"../../../chunk-FIVU2COQ.js";import"../../../chunk-BSHIQIZC.js";import"../../../chunk-MZ5GSSZ3.js";import"../../../chunk-KRL3IUV3.js";import"../../../chunk-Y2T3JX7K.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-S3DUFDQ6.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-3S5N4HLJ.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-4FD7TAOE.js";import"../../../chunk-LF3FUSCQ.js";import"../../../chunk-K7BTCBWD.js";import"../../../chunk-L55YIXDC.js";
@@ -1,21 +1,21 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, MouseEvent, ComponentType } from 'react';
3
3
  import { Data } from '../../blocks/index.js';
4
- import { C as CanvasTarget } from '../../watch-BTYOJpQU.js';
4
+ import { C as CanvasTarget } from '../../watch-D8xZow3y.js';
5
5
  import { D as DeviceOption } from '../../types-B3iSHX-w.js';
6
6
  import { P as Place } from '../../types-41704JE4.js';
7
- import { M as MeasuredCanvas, C as CanvasDragModel } from '../../CanvasDragLayer-ARfaivCu.js';
7
+ import { M as MeasuredCanvas, C as CanvasDragModel } from '../../CanvasDragLayer-CFUcBbgc.js';
8
8
  import { E as EaselContextMenuItem } from '../../types-BbOBWXMP.js';
9
9
  import { E as EaselRailItem } from '../../types-Cy7rdmXt.js';
10
10
  import { StyleRow } from '../../style-clipboard/index.js';
11
- import { T as TreeRowMark } from '../../types-Bqq6ya0y.js';
11
+ import { T as TreeRowMark } from '../../types-DBy3L69b.js';
12
12
  import { AddKey } from '../components/AddSidePanel.js';
13
- import { p as AnyScreenTarget } from '../../ScreenDocumentContext-CFJeqqKk.js';
13
+ import { p as AnyScreenTarget } from '../../ScreenDocumentContext-1RgtGKWR.js';
14
14
  import { HostProduct } from './host-chrome.js';
15
15
  import { EaselSession } from './session.js';
16
16
  import { SharedSectionUse, SharedSection } from './shared-section-types.js';
17
- import { AddTarget } from './puck/add-target-types.js';
18
- import { SlotConfigView } from './puck/content-tree.js';
17
+ import { AddTarget } from './document/add-target-types.js';
18
+ import { SlotConfigView } from './document/content-tree.js';
19
19
  import '../../types-Cq53lL8d.js';
20
20
  import '../../data/index.js';
21
21
  import '../../resolve-D68pb3Bx.js';
@@ -23,13 +23,13 @@ import '../../plan-CZS902DV.js';
23
23
  import '../../edit-lock/index.js';
24
24
  import '../../panelWidths-DgQXiPXU.js';
25
25
  import '../../session-DSQFmIvx.js';
26
- import '../../words-CvwYvkJm.js';
26
+ import '../../words-SD4neL0n.js';
27
27
  import '../../wordFit-7XpmhcaW.js';
28
28
  import '../../words-CnnHb9jo.js';
29
29
  import 'efficient-shell/ui';
30
30
  import '../../words-Cl9xMUYY.js';
31
31
  import './section-template-types.js';
32
- import './puck/block-choice.js';
32
+ import './document/block-choice.js';
33
33
  import './document-contract.js';
34
34
  import './document-switch.js';
35
35
  import '../../engine-CvXpFE86.js';
@@ -37,7 +37,7 @@ import './admin-bridge.js';
37
37
  import './links/link-filters.js';
38
38
  import './backend-error.js';
39
39
  import './document-hooks.js';
40
- import './puck/slot-section-spec.js';
40
+ import './document/slot-section-spec.js';
41
41
 
42
42
  /**
43
43
  * WHAT THE WEBSITE HANDS THE EDITOR'S SCREEN — the parts of the screen that
@@ -90,12 +90,19 @@ type ScreenInspectorMode = {
90
90
  * bails out of the state update. A layer whose inspector names this mode names
91
91
  * THIS object (the website's `PUCK_MODE`, components/SectionEditor, is it), so
92
92
  * "is the panel showing the selection's own?" has one answer on both sides.
93
- * The kind keeps the spelling the website's inspector has always tested for.
93
+ * The kind is `"selection"`; `"puck"` was its spelling until easel 21.1.0 and a
94
+ * layer that still names it is read as the same mode (`isSelectionMode`).
94
95
  */
95
96
  declare const SELECTION_MODE: {
96
- readonly kind: "puck";
97
+ readonly kind: "selection";
97
98
  };
98
- /** The inspector drilled into one PART of a node (lib/puck/part-id): the mode
99
+ /** Is this the selection's own panel? Accepts the old spelling `"puck"`, which
100
+ * the web builder's `SectionEditor` and the admin portal's tests still use;
101
+ * easel 22 drops it. */
102
+ declare function isSelectionMode(mode: {
103
+ kind: string;
104
+ }): boolean;
105
+ /** The inspector drilled into one PART of a node (lib/document/part-id): the mode
99
106
  * the screen's part bridge (components/usePartBridge) opens and closes. The
100
107
  * website's inspector modes include it (components/SectionEditor
101
108
  * `InspectorMode`). */
@@ -206,7 +213,7 @@ interface ScreenInspectorPanelProps {
206
213
  }
207
214
  /** What a block's config allows of the two actions that make another node or
208
215
  * take one away (`ComponentConfig.permissions`): `false` only where the config
209
- * says so (lib/puck/content-tree `blockNodeActions`). */
216
+ * says so (lib/document/content-tree `blockNodeActions`). */
210
217
  interface ScreenNodeActions {
211
218
  duplicate: boolean;
212
219
  delete: boolean;
@@ -324,7 +331,7 @@ type ScreenRailItem = ScreenLeftView | EaselRailItem;
324
331
  /**
325
332
  * The screen's own writes of the document, as far as a layer's pass over a
326
333
  * document needs them. They are the writes every surface of the screen makes
327
- * (lib/puck/use-section-ops), refused the same way while somebody else holds
334
+ * (lib/document/use-section-ops), refused the same way while somebody else holds
328
335
  * the document, and ONE object from render to render until that changes — so a
329
336
  * pass may list it as a dependency and run no oftener for it.
330
337
  *
@@ -806,7 +813,7 @@ interface ScreenBlockLook {
806
813
  firstSection: string | null;
807
814
  /**
808
815
  * What the row of a block says when the block is named by its own content
809
- * and not by the slot-child rule (lib/puck/slot-child-name): the layer reads
816
+ * and not by the slot-child rule (lib/document/slot-child-name): the layer reads
810
817
  * the content, and `compLabel` — the config's label for a type, lent by the
811
818
  * screen — is the word for a block it has no rule for.
812
819
  */
@@ -817,7 +824,7 @@ interface ScreenBlockLook {
817
824
  /**
818
825
  * The plain words of a block's stored copy, every mark of the layer's markup
819
826
  * unwrapped: what a tree row prints of a name the author typed, where no mark
820
- * can be drawn (lib/puck/slot-child-name `slotChildRowName`). Which marks
827
+ * can be drawn (lib/document/slot-child-name `slotChildRowName`). Which marks
821
828
  * there are is the layer's grammar — a website's is not an email's.
822
829
  */
823
830
  plainText: (copy: string) => string;
@@ -842,7 +849,7 @@ interface ScreenBlockLook {
842
849
  /**
843
850
  * THE LAYER'S LAST WORD ON WHAT A LAYERS ROW SAYS (0.103.0): handed a node,
844
851
  * the level it is named at and `fallback` — what the screen's own naming
845
- * rule answered (lib/puck/slot-child-name: a name the node carries, else its
852
+ * rule answered (lib/document/slot-child-name: a name the node carries, else its
846
853
  * type's label; a pinned row's word) — it answers the row's name. Asked of
847
854
  * every node row the page screen's Layers tree draws, and of the menu's
848
855
  * Select layer flyout, a block's canvas handle and a section's own list of
@@ -855,7 +862,7 @@ interface ScreenBlockLook {
855
862
  * THE PROP A RENAME WRITES, by the layer (0.105.0; owner ruling R11, Victor
856
863
  * Mau, 2026-10-09: Rename works on top-level sections in both editors). The
857
864
  * write side of `rowName`: handed a node, the level it is named at and
858
- * `base` — what the screen's own rule answered (lib/puck/slot-child-name
865
+ * `base` — what the screen's own rule answered (lib/document/slot-child-name
859
866
  * `slotChildRenameProp` for a block, `sectionRenameProp` for a section) — it
860
867
  * answers the prop the Layers row's rename box writes, or null for a node
861
868
  * that has no name of its own, which takes Rename out of its menu. Answer the
@@ -1305,7 +1312,7 @@ interface ScreenStylePastePlan {
1305
1312
  * layer's — the website's look is its Style and Layout tabs and travels across
1306
1313
  * one site's pages, the campaign designer's is its own panels' and stays in
1307
1314
  * one campaign. Each member is optional, and one left out is the website's
1308
- * (lib/puck/style-clipboard): a layer may hand only its scope. Plain functions,
1315
+ * (lib/document/style-clipboard): a layer may hand only its scope. Plain functions,
1309
1316
  * the same object for the life of the mount.
1310
1317
  */
1311
1318
  interface ScreenStyleClipboard {
@@ -1565,4 +1572,4 @@ declare function useScreenCanvasTarget(): CanvasTarget | null;
1565
1572
  * engine's plain rows for the selection. */
1566
1573
  declare function useScreenInspectorPanel(): ComponentType<ScreenInspectorPanelProps>;
1567
1574
 
1568
- export { type NodeDefaults, SELECTION_MODE, type ScreenBlockLook, type ScreenBlockRules, type ScreenBridges, type ScreenCanvas, type ScreenCanvasDrag, type ScreenCanvasDragContext, type ScreenCanvasHeadProps, ScreenCanvasTargetProvider, type ScreenDevices, type ScreenDocumentOps, type ScreenDragItem, type ScreenInspector, type ScreenInspectorMode, type ScreenInspectorPanelProps, type ScreenLeftPanel, type ScreenLeftView, type ScreenLeftViewFrame, type ScreenLeftViewRules, type ScreenMainAction, type ScreenMediaDrop, type ScreenMediaFile, type ScreenMenuItem, type ScreenMenuRows, type ScreenNewNode, type ScreenNode, type ScreenNodeActions, type ScreenNodeLevel, type ScreenNodeMaker, type ScreenPartMode, type ScreenParts, ScreenPartsProvider, type ScreenPinnedBand, type ScreenPinnedNodes, type ScreenRailItem, type ScreenSelector, type ScreenSharedSections, type ScreenSlot, type ScreenSlotAction, type ScreenSlotMode, type ScreenStyleClipboard, type ScreenStyleDocument, type ScreenStylePastePlan, type ScreenToastExtra, type ScreenTree, type ScreenTreeFolds, type ScreenTreeRows, isPinnedFirst, isPinnedLast, isSlotMode, sameInspectorMode, screenSlotsOf, useScreenBlockLook, useScreenBlockRules, useScreenBridges, useScreenCanvasDrag, useScreenCanvasFrame, useScreenCanvasHead, useScreenCanvasTarget, useScreenDevices, useScreenDocumentLabel, useScreenDocumentPass, useScreenInspectorPanel, useScreenLeftView, useScreenNodeKeys, useScreenNotify, useScreenOwnerName, useScreenParts, useScreenPickFollowsSelection, useScreenPinned, useScreenSaveSwitch, useScreenStorageNamespace, useScreenStyleClipboard, useStandaloneScreenBridges };
1575
+ export { type NodeDefaults, SELECTION_MODE, type ScreenBlockLook, type ScreenBlockRules, type ScreenBridges, type ScreenCanvas, type ScreenCanvasDrag, type ScreenCanvasDragContext, type ScreenCanvasHeadProps, ScreenCanvasTargetProvider, type ScreenDevices, type ScreenDocumentOps, type ScreenDragItem, type ScreenInspector, type ScreenInspectorMode, type ScreenInspectorPanelProps, type ScreenLeftPanel, type ScreenLeftView, type ScreenLeftViewFrame, type ScreenLeftViewRules, type ScreenMainAction, type ScreenMediaDrop, type ScreenMediaFile, type ScreenMenuItem, type ScreenMenuRows, type ScreenNewNode, type ScreenNode, type ScreenNodeActions, type ScreenNodeLevel, type ScreenNodeMaker, type ScreenPartMode, type ScreenParts, ScreenPartsProvider, type ScreenPinnedBand, type ScreenPinnedNodes, type ScreenRailItem, type ScreenSelector, type ScreenSharedSections, type ScreenSlot, type ScreenSlotAction, type ScreenSlotMode, type ScreenStyleClipboard, type ScreenStyleDocument, type ScreenStylePastePlan, type ScreenToastExtra, type ScreenTree, type ScreenTreeFolds, type ScreenTreeRows, isPinnedFirst, isPinnedLast, isSelectionMode, isSlotMode, sameInspectorMode, screenSlotsOf, useScreenBlockLook, useScreenBlockRules, useScreenBridges, useScreenCanvasDrag, useScreenCanvasFrame, useScreenCanvasHead, useScreenCanvasTarget, useScreenDevices, useScreenDocumentLabel, useScreenDocumentPass, useScreenInspectorPanel, useScreenLeftView, useScreenNodeKeys, useScreenNotify, useScreenOwnerName, useScreenParts, useScreenPickFollowsSelection, useScreenPinned, useScreenSaveSwitch, useScreenStorageNamespace, useScreenStyleClipboard, useStandaloneScreenBridges };
@@ -1 +1 @@
1
- export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-PAOZMXEI.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-MQA7OFRA.js";import"../../chunk-EFHV56BO.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-7LYKFL3Q.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-IWCKVZHS.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-BSHIQIZC.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-ZOBSIXRD.js";import"../../chunk-QAJAEWCZ.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-VANKQVOW.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-3S5N4HLJ.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-K7BTCBWD.js";import"../../chunk-L55YIXDC.js";import"../../chunk-QIDRJH3S.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-LF3FUSCQ.js";
1
+ export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSelectionMode,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-OHZHYROJ.js";import"../../chunk-PRHBWA5V.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-MQA7OFRA.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-TUXLORVR.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-PFFH7ASD.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-FM6JO4WF.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-IWCKVZHS.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-BSHIQIZC.js";import"../../chunk-MZ5GSSZ3.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-S3DUFDQ6.js";import"../../chunk-JACEEVVF.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-3S5N4HLJ.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-4FD7TAOE.js";import"../../chunk-LF3FUSCQ.js";import"../../chunk-K7BTCBWD.js";import"../../chunk-L55YIXDC.js";
@@ -1,4 +1,4 @@
1
- import { TreeItem } from './puck/content-tree.js';
1
+ import { TreeItem } from './document/content-tree.js';
2
2
 
3
3
  /**
4
4
  * A SAVED SECTION, AND THE STORE THE EDITOR KEEPS THEM IN — the types alone.
@@ -1,6 +1,6 @@
1
1
  import { SectionTemplateStore } from './section-template-types.js';
2
2
  import { EaselSession } from './session.js';
3
- import './puck/content-tree.js';
3
+ import './document/content-tree.js';
4
4
  import '../../blocks/index.js';
5
5
  import 'react';
6
6
  import '../../types-Cq53lL8d.js';
@@ -1 +1 @@
1
- export{sectionTemplates,sectionTemplatesOf}from"../../chunk-BVN33R76.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-RSCMJIWS.js";
1
+ export{sectionTemplates,sectionTemplatesOf}from"../../chunk-N7E6264U.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-SNF5764Q.js";
@@ -15,7 +15,7 @@ import 'efficient-shell/ui';
15
15
  import './document-contract.js';
16
16
  import './document-hooks.js';
17
17
  import './section-template-types.js';
18
- import './puck/content-tree.js';
18
+ import './document/content-tree.js';
19
19
  import './shared-section-types.js';
20
20
 
21
21
  /**
@@ -1 +1 @@
1
- export{EaselSessionProvider,useEaselSession}from"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";
1
+ export{EaselSessionProvider,useEaselSession}from"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";
@@ -14,7 +14,7 @@ import '../../plan-CZS902DV.js';
14
14
  import '../../edit-lock/index.js';
15
15
  import './links/link-filters.js';
16
16
  import 'efficient-shell/ui';
17
- import './puck/content-tree.js';
17
+ import './document/content-tree.js';
18
18
 
19
19
  /**
20
20
  * The editor SESSION — everything one mounted editor knows that no prop reaches:
@@ -138,8 +138,8 @@ interface EaselSession {
138
138
  readonly blocks: SessionBlocks | null;
139
139
  /**
140
140
  * The block registry this editor works from — the page root, the palette's
141
- * groups and every block (lib/puck/registry). Whoever mounts the editor hands
142
- * it over: the storefront's is `lib/puck/config`, with its commerce and
141
+ * groups and every block (lib/document/registry). Whoever mounts the editor hands
142
+ * it over: the storefront's is `lib/document/config`, with its commerce and
143
143
  * service blocks registered among the general ones. The editor imports no
144
144
  * registry of its own, so it never imports a block it does not own
145
145
  * (doc/adr/0002). Read once, with the backend — through
@@ -1 +1 @@
1
- export{EFFICIENT_BACKEND,activateEaselSession,backendOf,createEaselSession,currentEaselSession,deactivateEaselSession,efficientClientOpen,isEfficientBackend,provideDefaultBackend,resetAmbientEaselSession,sessionRegistry,setSessionBridgedSite,setSessionDocumentSite}from"../../chunk-RSCMJIWS.js";
1
+ export{EFFICIENT_BACKEND,activateEaselSession,backendOf,createEaselSession,currentEaselSession,deactivateEaselSession,efficientClientOpen,isEfficientBackend,provideDefaultBackend,resetAmbientEaselSession,sessionRegistry,setSessionBridgedSite,setSessionDocumentSite}from"../../chunk-SNF5764Q.js";
@@ -1,4 +1,4 @@
1
- import { TreeItem } from './puck/content-tree.js';
1
+ import { TreeItem } from './document/content-tree.js';
2
2
 
3
3
  /**
4
4
  * A SHARED SECTION, AND THE STORE A WEBSITE KEEPS THEM IN — the types alone.
@@ -1,6 +1,6 @@
1
1
  import { SharedSectionStore } from './shared-section-types.js';
2
2
  import { EaselSession } from './session.js';
3
- import './puck/content-tree.js';
3
+ import './document/content-tree.js';
4
4
  import '../../blocks/index.js';
5
5
  import 'react';
6
6
  import '../../types-Cq53lL8d.js';
@@ -1 +1 @@
1
- export{keepsSharedSections,sharedSectionsOf}from"../../chunk-43AEUUNQ.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-RSCMJIWS.js";
1
+ export{keepsSharedSections,sharedSectionsOf}from"../../chunk-N3MJOHAG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-SNF5764Q.js";
@@ -338,7 +338,7 @@
338
338
  }
339
339
 
340
340
  /* ── Left panel: section tree ─────────────────────────────────────────────
341
- The Layers tree is the left panel's scroll box (`lib/puck/tree-reveal`
341
+ The Layers tree is the left panel's scroll box (`lib/document/tree-reveal`
342
342
  scrolls it to the selected row). Nothing more: its ONE inset, 12 a side, is
343
343
  `.es-tree`'s (`efficient-easel/tree.css`). This rule used to pad the same
344
344
  element a second time (8 / 11 / 10 over `.es-tree`'s 8 / 12 / 12) and to
@@ -438,13 +438,9 @@
438
438
  }
439
439
 
440
440
  /* ── Footer "Add block" menu — the shell's DropdownMenu (easel issue 199, step 4) ────── */
441
- /* The menu, its rows and its group headings are efficient-shell's; the row
442
- that opens it is the add card (`.sf-add-card`, the trigger's own look). What
443
- stays is a heading's count, quieter than its word. */
444
- .sf-menugroup-count {
445
- font-size: var(--text-2xs, 11px);
446
- color: var(--sf-field-placeholder);
447
- }
441
+ /* The menu, its rows, its group headings and their counts (`ItemCount`) are
442
+ efficient-shell's; the row that opens it is the add card (`.sf-add-card`,
443
+ the trigger's own look). */
448
444
 
449
445
  /* ── Footer "Add block" menu — heterogeneous block-type picker ──────────── */
450
446
  /* ── Add — a mode over the left panel (components/AddSidePanel) ────────────
@@ -686,7 +682,7 @@
686
682
  /* The rail's "+" (`.sf-rail-plus`) went in 11.0.0: Add opens from the Layers
687
683
  head's "+" and a canvas ➕ (owner ruling A1, amended 2026-10-14). */
688
684
 
689
- /* ── Device-aware fields (lib/puck/device-fields.tsx) ─────────────────────────
685
+ /* ── Device-aware fields (lib/document/device-fields.tsx) ─────────────────────────
690
686
  A control that belongs to a device the canvas is not showing paints a
691
687
  zero-size marker instead of itself, and its row (efficient-easel's public
692
688
  `.es-insp-row`, blueprint 4.4) collapses when it holds one, so no gap is left.
@@ -238,6 +238,10 @@ type ScreenMenuWords = {
238
238
  clipboardRefused: string;
239
239
  };
240
240
  type ScreenWords = {
241
+ /** An "Add block" run heading's count, in words: its Tooltip and screen-reader text. */
242
+ blockCount: (v: {
243
+ count: number;
244
+ }) => string;
241
245
  /** While the document is on its way, and while an entry may still bounce. */
242
246
  loading: string;
243
247
  /** Before the console's sign-in has reached an editor that needs it. */
@@ -1 +1 @@
1
- export{DEFAULT_SCREEN_ADD_WORDS,DEFAULT_SCREEN_SAVE_STATUS_WORDS,DEFAULT_SCREEN_SHARED_WORDS,DEFAULT_SCREEN_WORDS}from"../chunk-23DYNW6S.js";
1
+ export{DEFAULT_SCREEN_ADD_WORDS,DEFAULT_SCREEN_SAVE_STATUS_WORDS,DEFAULT_SCREEN_SHARED_WORDS,DEFAULT_SCREEN_WORDS}from"../chunk-EB6NI2VK.js";
@@ -1,11 +1,11 @@
1
1
  import { a as SaveWords } from '../words-Cm8PMYn0.js';
2
2
  import { N as NoticeWords, C as ChromeWords } from '../words-DYu4iBrR.js';
3
3
  import { C as CopyWords } from '../words-BpTjCfqO.js';
4
- import { D as DragWords } from '../words-CvwYvkJm.js';
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-vhnV8sM7.js';
6
+ import { F as FieldsWords } from '../words-CFkb8XtN.js';
7
7
  import { N as NodeMenuWords } from '../words-DMG4dYq2.js';
8
- import { P as PanelWords } from '../words-BeX5eGq7.js';
8
+ import { P as PanelWords } from '../words-CmEnDoOe.js';
9
9
  import { P as PickWords } from '../words-DWvCJXwR.js';
10
10
  import { ScreenWords } from '../screen/words.js';
11
11
  export { ScreenAddWords, ScreenSharedWords } from '../screen/words.js';
@@ -20,7 +20,7 @@ import '../wordFit-7XpmhcaW.js';
20
20
  import '../panelWidths-DgQXiPXU.js';
21
21
  import '../engine-CvXpFE86.js';
22
22
  import 'efficient-shell/markup';
23
- import '../buckets-Tj-nkBpg.js';
23
+ import '../buckets-Sw94ll9I.js';
24
24
 
25
25
  /**
26
26
  * The easel canvas's own words (`efficient-easel/strings`, 0.95.0): what the
@@ -1,2 +1,2 @@
1
- import{DEFAULT_SCREEN_WORDS as r}from"../chunk-23DYNW6S.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as o}from"../chunk-6WY6ZXJG.js";import{DEFAULT_TEXT_STYLES_WORDS as n}from"../chunk-OGH6CC3E.js";import{DEFAULT_PICK_WORDS as t}from"../chunk-OFBZOI6W.js";import{DEFAULT_CANVAS_WORDS as c}from"../chunk-TBY3DFKS.js";import{DEFAULT_TREE_WORDS as e}from"../chunk-K56YDHYQ.js";import{DEFAULT_PANEL_WORDS as m}from"../chunk-KFV7N2DJ.js";import{DEFAULT_NODE_MENU_WORDS as i}from"../chunk-WK3AFPXY.js";import{DEFAULT_SAVE_WORDS as s}from"../chunk-H6DDIBQ4.js";import{DEFAULT_COPY_WORDS as u}from"../chunk-KRL3IUV3.js";import{DEFAULT_FIELDS_WORDS as f}from"../chunk-WRFD4EXD.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{stringsContext as k}from"../chunk-MFIRYGHW.js";import{DEFAULT_DRAG_WORDS as a}from"../chunk-KAML3KQH.js";import{useContext as W,useMemo as D}from"react";import{jsx as Y}from"react/jsx-runtime";var y={notice:l,lock:j,save:s,chrome:p,rail:h,tree:e,panel:m,fields:f,pick:t,drag:a,menu:i,styleClipboard:o,copy:u,canvas:c,textStyles:n,screen:r},F=r=>"object"==typeof r&&null!==r;function K(r,o){const n={};for(const t of Object.keys(r)){const c=r[t],e=o[t];null==e?n[t]=c:F(c)?n[t]=F(e)?K(c,e):c:n[t]=typeof e==typeof c?e:c}return n}function d(r,o){return o?K(r,o):r}function v({value:r,locale:o,children:n}){const t=k(),c=W(t),e=c?.strings??y,m=o??c?.locale??"en",i=D(()=>({strings:d(e,r),locale:m}),[e,r,m]);/* @__PURE__ */
2
- return Y(t.Provider,{value:i,children:n})}function H(){return W(k())?.strings??y}function J(){return W(k())?.locale??"en"}export{y as DEFAULT_EASEL_STRINGS,v as EaselStringsProvider,d as mergeEaselStrings,J as useEaselLocale,H as useEaselStrings};
1
+ import{DEFAULT_TEXT_STYLES_WORDS as r}from"../chunk-OGH6CC3E.js";import{DEFAULT_SCREEN_WORDS as o}from"../chunk-EB6NI2VK.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as n}from"../chunk-6WY6ZXJG.js";import{DEFAULT_CANVAS_WORDS as t}from"../chunk-TBY3DFKS.js";import{DEFAULT_PANEL_WORDS as c}from"../chunk-KFV7N2DJ.js";import{DEFAULT_TREE_WORDS as e}from"../chunk-K56YDHYQ.js";import{DEFAULT_NODE_MENU_WORDS as m}from"../chunk-WK3AFPXY.js";import{DEFAULT_PICK_WORDS as i}from"../chunk-OFBZOI6W.js";import{DEFAULT_SAVE_WORDS as s}from"../chunk-H6DDIBQ4.js";import{DEFAULT_CHROME_WORDS as u,DEFAULT_NOTICE_WORDS as f}from"../chunk-AJSDWWJW.js";import{DEFAULT_RAIL_WORDS as p}from"../chunk-2OAZYSWJ.js";import{DEFAULT_LOCK_WORDS as l}from"../chunk-RE4LP46F.js";import{DEFAULT_COPY_WORDS as h}from"../chunk-KRL3IUV3.js";import{DEFAULT_FIELDS_WORDS as j}from"../chunk-JACEEVVF.js";import{stringsContext as k}from"../chunk-MFIRYGHW.js";import{DEFAULT_DRAG_WORDS as a}from"../chunk-TQ5Y6S2X.js";import{useContext as W,useMemo as Y}from"react";import{jsx as y}from"react/jsx-runtime";var F={notice:f,lock:l,save:s,chrome:u,rail:p,tree:e,panel:c,fields:j,pick:i,drag:a,menu:m,styleClipboard:n,copy:h,canvas:t,textStyles:r,screen:o},d=r=>"object"==typeof r&&null!==r;function v(r,o){const n={};for(const t of Object.keys(r)){const c=r[t],e=o[t];null==e?n[t]=c:d(c)?n[t]=d(e)?v(c,e):c:n[t]=typeof e==typeof c?e:c}return n}function D(r,o){return o?v(r,o):r}function J({value:r,locale:o,children:n}){const t=k(),c=W(t),e=c?.strings??F,m=o??c?.locale??"en",i=Y(()=>({strings:D(e,r),locale:m}),[e,r,m]);/* @__PURE__ */
2
+ return y(t.Provider,{value:i,children:n})}function K(){return W(k())?.strings??F}function E(){return W(k())?.locale??"en"}export{F as DEFAULT_EASEL_STRINGS,J as EaselStringsProvider,D as mergeEaselStrings,E as useEaselLocale,K as useEaselStrings};
@@ -1,36 +1,36 @@
1
- import{hexReadout as e,ColourWindow as s,typedHex as t}from"../chunk-U6LJ5UKD.js";import{DEFAULT_TEXT_STYLES_WORDS as a}from"../chunk-OGH6CC3E.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-OGH6CC3E.js";import"../chunk-OFBZOI6W.js";import{FieldSlider as n}from"../chunk-ZEH6QLBH.js";import{FieldSelect as l}from"../chunk-QAJAEWCZ.js";import"../chunk-WRFD4EXD.js";import{useWords as i}from"../chunk-MFIRYGHW.js";import{withTip as r}from"../chunk-P2VEMZH5.js";import{TEXT_STYLE_KINDS as o,canAddTextStyle as d,TEXT_STYLE_MAX as c,isDefaultTextStyle as u,CAMPAIGN_TEXT_STYLE_SETTINGS as m,TEXT_STYLE_SETTINGS as h,textStyleRowSize as f,describeTextStyle as p,updateTextStyle as v,textStyleCaseCss as y,TEXT_STYLE_CASES as S,addTextStyle as g,removeTextStyle as b,TEXT_STYLE_RANGES as k}from"../chunk-YHZSBL2N.js";export{CAMPAIGN_TEXT_STYLE_SETTINGS,TEXT_STYLE_CASES,TEXT_STYLE_CASE_CSS,TEXT_STYLE_DEFAULT_COUNT,TEXT_STYLE_KINDS,TEXT_STYLE_MAX,TEXT_STYLE_RANGES,TEXT_STYLE_SETTINGS,addTextStyle,canAddTextStyle,defaultTextStyles,describeTextStyle,isDefaultTextStyle,isTextStyleCase,removeTextStyle,resolveTextStyle,textStyleCaseCss,textStyleCaseOfCss,textStyleRowSize,updateTextStyle,weightWord}from"../chunk-YHZSBL2N.js";import{hsvToHex as N,Tooltip as C,ColorSwatch as x,IconButton as T}from"efficient-shell/ui";import{useState as w,useRef as E,useId as z,useEffect as O,Fragment as _}from"react";import{TrashIcon as L,ChevronIcon as A,BoldIcon as j,ItalicIcon as M,CaseLowerIcon as $,CaseCapitalizedIcon as D,CaseUpperIcon as W,CaseNormalIcon as Y}from"efficient-shell/icons/efficient";import{jsxs as I,jsx as X,Fragment as H}from"react/jsx-runtime";var B=`conic-gradient(${[0,60,120,180,240,300,0].map(e=>N({h:e,s:1,v:1})).join(", ")})`;function F({value:t,hex:a,colours:n,label:l,followsWord:i,anyWord:r,onChange:o,readOnly:d=!1}){const[c,u]=w(!1),m=E(null),h=E(null),f=z(),p=void 0!==t&&n.some(e=>e.key===t),v=void 0!==t&&!p;return O(()=>{if(!c)return;const e=m.current?.ownerDocument;if(!e)return;const s=e=>{m.current&&!m.current.contains(e.target)&&u(!1)};return e.addEventListener("click",s,!0),()=>e.removeEventListener("click",s,!0)},[c]),/* @__PURE__ */I("div",{ref:m,className:"es-ts-set","data-ts-setting":"color",children:[
2
- /* @__PURE__ */I("div",{className:"es-ts-top",children:[
1
+ import{DEFAULT_TEXT_STYLES_WORDS as e}from"../chunk-OGH6CC3E.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-OGH6CC3E.js";import{FieldSlider as s}from"../chunk-ZEH6QLBH.js";import{hexReadout as t,ColourWindow as a,typedHex as n}from"../chunk-U6LJ5UKD.js";import"../chunk-OFBZOI6W.js";import{TEXT_STYLE_KINDS as l,canAddTextStyle as i,TEXT_STYLE_MAX as r,isDefaultTextStyle as o,CAMPAIGN_TEXT_STYLE_SETTINGS as d,TEXT_STYLE_SETTINGS as c,textStyleRowSize as u,describeTextStyle as m,updateTextStyle as h,textStyleCaseCss as f,TEXT_STYLE_CASES as p,addTextStyle as v,removeTextStyle as y,TEXT_STYLE_RANGES as S}from"../chunk-YHZSBL2N.js";export{CAMPAIGN_TEXT_STYLE_SETTINGS,TEXT_STYLE_CASES,TEXT_STYLE_CASE_CSS,TEXT_STYLE_DEFAULT_COUNT,TEXT_STYLE_KINDS,TEXT_STYLE_MAX,TEXT_STYLE_RANGES,TEXT_STYLE_SETTINGS,addTextStyle,canAddTextStyle,defaultTextStyles,describeTextStyle,isDefaultTextStyle,isTextStyleCase,removeTextStyle,resolveTextStyle,textStyleCaseCss,textStyleCaseOfCss,textStyleRowSize,updateTextStyle,weightWord}from"../chunk-YHZSBL2N.js";import{FieldSelect as g}from"../chunk-KFWNGPW3.js";import"../chunk-JACEEVVF.js";import{useWords as b}from"../chunk-MFIRYGHW.js";import{withTip as k}from"../chunk-P2VEMZH5.js";import{hsvToHex as N,Tooltip as C,ColorSwatch as x,IconButton as T}from"efficient-shell/ui";import{useState as w,useRef as E,useId as z,useEffect as O,Fragment as _}from"react";import{TrashIcon as L,ChevronIcon as A,BoldIcon as j,ItalicIcon as M,CaseLowerIcon as $,CaseCapitalizedIcon as W,CaseUpperIcon as Y,CaseNormalIcon as I}from"efficient-shell/icons/efficient";import{jsxs as D,jsx as X,Fragment as F}from"react/jsx-runtime";var H=`conic-gradient(${[0,60,120,180,240,300,0].map(e=>N({h:e,s:1,v:1})).join(", ")})`;function P({value:e,hex:s,colours:n,label:l,followsWord:i,anyWord:r,onChange:o,readOnly:d=!1}){const[c,u]=w(!1),m=E(null),h=E(null),f=z(),p=void 0!==e&&n.some(s=>s.key===e),v=void 0!==e&&!p;return O(()=>{if(!c)return;const e=m.current?.ownerDocument;if(!e)return;const s=e=>{m.current&&!m.current.contains(e.target)&&u(!1)};return e.addEventListener("click",s,!0),()=>e.removeEventListener("click",s,!0)},[c]),/* @__PURE__ */D("div",{ref:m,className:"es-ts-set","data-ts-setting":"color",children:[
2
+ /* @__PURE__ */D("div",{className:"es-ts-top",children:[
3
3
  /* @__PURE__ */X("span",{className:"es-ts-sub",children:l}),
4
- /* @__PURE__ */X("span",{className:"es-ts-colour-read",children:a?e(a):i})]}),
5
- /* @__PURE__ */I("div",{className:"es-ts-swatches",role:"group","aria-label":l,children:[n.map(s=>/* @__PURE__ */X(C,{content:`${s.name} · ${e(s.value)}`,children:/* @__PURE__ */X(x,{color:s.value,size:"sm",className:"es-ts-swatch","aria-label":s.name,selected:t===s.key,disabled:d,onClick:()=>o(s.key)})},s.key)),
6
- /* @__PURE__ */X(C,{content:r,children:/* @__PURE__ */X(x,{ref:h,color:B,size:"sm",className:"es-ts-swatch es-ts-swatch--any","aria-label":r,selected:v,"aria-expanded":c,"aria-controls":c?f:void 0,disabled:d,onClick:()=>u(e=>!e)})})]}),c?/* @__PURE__ */X(s,{id:f,value:a??"",onChange:e=>o(e),label:l,readOnly:d,onClose:()=>{u(!1),h.current?.focus()}}):null]})}function P({styles:e,onChange:s,fonts:t,colours:n=[],settings:l=m,auto:h=[],fallback:f,sample:p,openId:v,defaultOpenId:y=null,onOpenChange:S,onAdd:k,rowActions:N,onRemove:C,max:x=c,device:T="desktop",readOnly:_=!1}){const A=i("textStyles",a),j=z(),[M,$]=w(y),D=void 0!==v?v:M,W=e=>{void 0===v&&$(e),S?.(e)},Y=E(null),[B,F]=w(null);O(()=>{if(!B||!Y.current)return;const e=[...Y.current.querySelectorAll(".es-ts-item")].find(e=>e.dataset.tsId===B.id),s=e?e.querySelector(".es-ts-row"):Y.current.querySelector(`.es-ts-add[data-ts-kind="${B.kind}"]`);s?.focus(),F(null)},[B]);/* @__PURE__ */
7
- return X("div",{className:"es-ts",ref:Y,children:o.map(a=>{const i=e.filter(e=>e.kind===a),o=!d(e,a,x),c=!_&&!o;/* @__PURE__ */
8
- return I(R,{label:A.groups[a],children:[i.map(a=>{const i=N?.(a),o=null!=i&&!1!==i,d=Boolean(C)&&!_&&!u(a);/* @__PURE__ */
9
- return X(G,{style:a,fonts:t,colours:n,settings:l,auto:h,fallback:f,sample:p,device:T,readOnly:_,open:D===a.id,onOpenChange:e=>W(e?a.id:null),onChange:t=>s(e.map(e=>e.id===t.id?t:e)),actions:d||o?/* @__PURE__ */I(H,{children:[d?r(A.remove,/* @__PURE__ */X("button",{type:"button",className:"es-ts-del","aria-label":A.removeNamed({name:a.name}),onClick:()=>(t=>{if(_||!C)return;const a=b(e,t.id,{name:A.styleName});if(!a)return;const n=e.filter(e=>e.kind===t.kind),l=n[n.indexOf(t)+1];D===t.id&&W(null),s(a.styles),C(a.removed),F({id:l?.id??null,kind:t.kind})})(a),children:/* @__PURE__ */X(L,{size:14,"aria-hidden":"true"})})):null,o?i:null]}):null},a.id)}),r(!_&&o?A.full({kind:a,max:x}):void 0,/* @__PURE__ */I("button",{type:"button",className:"es-ts-add","data-ts-kind":a,disabled:_,"aria-disabled":!(_||!o)||void 0,"aria-describedby":!_&&o?`${j}-full-${a}`:void 0,onClick:()=>{c&&(t=>{if(_)return;const a=g(e,t,{max:x,name:A.styleName,make:k});a&&s(a.styles)})(a)},children:[
10
- /* @__PURE__ */X("span",{className:"es-ts-add-word",children:A.add[a]}),
11
- /* @__PURE__ */X("span",{className:"es-ts-count",children:A.count({n:i.length,max:x})})]})),_||!o?null:/* @__PURE__ */X("span",{id:`${j}-full-${a}`,className:"es-vh",children:A.full({kind:a,max:x})})]},a)})})}function R({label:e,children:s}){const t=z();/* @__PURE__ */
12
- return I("section",{className:"es-ts-section","aria-labelledby":t,children:[
13
- /* @__PURE__ */X("div",{className:"es-ts-group",id:t,children:e}),s]})}function G({style:e,fonts:s,colours:t=[],settings:n=m,auto:l=[],fallback:r,sample:o,open:d,onOpenChange:c,onChange:u,actions:y,device:S="desktop",readOnly:g=!1}){const b=i("textStyles",a),k=`${z()}-open-${e.id}`,N=new Set(l),C=h.filter(e=>n.includes(e)),x={...r?.(e)??{},...e.values},T="phone"===S,w=T&&void 0!==e.values.sizePhone?{...x,size:e.values.sizePhone}:x,E=s.find(e=>e.value===x.font),O={fontFamily:E?.family,fontSize:`${f(w.size??16)}px`,fontWeight:x.weight,fontStyle:x.italic?"italic":void 0};/* @__PURE__ */
14
- return I(_,{children:[
15
- /* @__PURE__ */I("div",{className:"es-ts-item","data-ts-id":e.id,children:[
16
- /* @__PURE__ */I("button",{type:"button",className:"es-ts-row","aria-expanded":d,"aria-controls":d?k:void 0,onClick:()=>c(!d),children:[
4
+ /* @__PURE__ */X("span",{className:"es-ts-colour-read",children:s?t(s):i})]}),
5
+ /* @__PURE__ */D("div",{className:"es-ts-swatches",role:"group","aria-label":l,children:[n.map(s=>/* @__PURE__ */X(C,{content:`${s.name} · ${t(s.value)}`,children:/* @__PURE__ */X(x,{color:s.value,size:"sm",className:"es-ts-swatch","aria-label":s.name,selected:e===s.key,disabled:d,onClick:()=>o(s.key)})},s.key)),
6
+ /* @__PURE__ */X(C,{content:r,children:/* @__PURE__ */X(x,{ref:h,color:H,size:"sm",className:"es-ts-swatch es-ts-swatch--any","aria-label":r,selected:v,"aria-expanded":c,"aria-controls":c?f:void 0,disabled:d,onClick:()=>u(e=>!e)})})]}),c?/* @__PURE__ */X(a,{id:f,value:s??"",onChange:e=>o(e),label:l,readOnly:d,onClose:()=>{u(!1),h.current?.focus()}}):null]})}function B({styles:s,onChange:t,fonts:a,colours:n=[],settings:c=d,auto:u=[],fallback:m,sample:h,openId:f,defaultOpenId:p=null,onOpenChange:S,onAdd:g,rowActions:N,onRemove:C,max:x=r,device:T="desktop",readOnly:_=!1}){const A=b("textStyles",e),j=z(),[M,$]=w(p),W=void 0!==f?f:M,Y=e=>{void 0===f&&$(e),S?.(e)},I=E(null),[H,P]=w(null);O(()=>{if(!H||!I.current)return;const e=[...I.current.querySelectorAll(".es-ts-item")].find(e=>e.dataset.tsId===H.id),s=e?e.querySelector(".es-ts-row"):I.current.querySelector(`.es-ts-add[data-ts-kind="${H.kind}"]`);s?.focus(),P(null)},[H]);/* @__PURE__ */
7
+ return X("div",{className:"es-ts",ref:I,children:l.map(e=>{const l=s.filter(s=>s.kind===e),r=!i(s,e,x),d=!_&&!r;/* @__PURE__ */
8
+ return D(G,{label:A.groups[e],children:[l.map(e=>{const l=N?.(e),i=null!=l&&!1!==l,r=Boolean(C)&&!_&&!o(e);/* @__PURE__ */
9
+ return X(R,{style:e,fonts:a,colours:n,settings:c,auto:u,fallback:m,sample:h,device:T,readOnly:_,open:W===e.id,onOpenChange:s=>Y(s?e.id:null),onChange:e=>t(s.map(s=>s.id===e.id?e:s)),actions:r||i?/* @__PURE__ */D(F,{children:[r?k(A.remove,/* @__PURE__ */X("button",{type:"button",className:"es-ts-del","aria-label":A.removeNamed({name:e.name}),onClick:()=>(e=>{if(_||!C)return;const a=y(s,e.id,{name:A.styleName});if(!a)return;const n=s.filter(s=>s.kind===e.kind),l=n[n.indexOf(e)+1];W===e.id&&Y(null),t(a.styles),C(a.removed),P({id:l?.id??null,kind:e.kind})})(e),children:/* @__PURE__ */X(L,{size:14,"aria-hidden":"true"})})):null,i?l:null]}):null},e.id)}),k(!_&&r?A.full({kind:e,max:x}):void 0,/* @__PURE__ */D("button",{type:"button",className:"es-ts-add","data-ts-kind":e,disabled:_,"aria-disabled":!(_||!r)||void 0,"aria-describedby":!_&&r?`${j}-full-${e}`:void 0,onClick:()=>{d&&(e=>{if(_)return;const a=v(s,e,{max:x,name:A.styleName,make:g});a&&t(a.styles)})(e)},children:[
10
+ /* @__PURE__ */X("span",{className:"es-ts-add-word",children:A.add[e]}),
11
+ /* @__PURE__ */X("span",{className:"es-ts-count",children:A.count({n:l.length,max:x})})]})),_||!r?null:/* @__PURE__ */X("span",{id:`${j}-full-${e}`,className:"es-vh",children:A.full({kind:e,max:x})})]},e)})})}function G({label:e,children:s}){const t=z();/* @__PURE__ */
12
+ return D("section",{className:"es-ts-section","aria-labelledby":t,children:[
13
+ /* @__PURE__ */X("div",{className:"es-ts-group",id:t,children:e}),s]})}function R({style:s,fonts:t,colours:a=[],settings:n=d,auto:l=[],fallback:i,sample:r,open:o,onOpenChange:f,onChange:p,actions:v,device:y="desktop",readOnly:S=!1}){const g=b("textStyles",e),k=`${z()}-open-${s.id}`,N=new Set(l),C=c.filter(e=>n.includes(e)),x={...i?.(s)??{},...s.values},T="phone"===y,w=T&&void 0!==s.values.sizePhone?{...x,size:s.values.sizePhone}:x,E=t.find(e=>e.value===x.font),O={fontFamily:E?.family,fontSize:`${u(w.size??16)}px`,fontWeight:x.weight,fontStyle:x.italic?"italic":void 0};/* @__PURE__ */
14
+ return D(_,{children:[
15
+ /* @__PURE__ */D("div",{className:"es-ts-item","data-ts-id":s.id,children:[
16
+ /* @__PURE__ */D("button",{type:"button",className:"es-ts-row","aria-expanded":o,"aria-controls":o?k:void 0,onClick:()=>f(!o),children:[
17
17
  /* @__PURE__ */X("span",{className:"es-ts-chev","aria-hidden":"true",children:/* @__PURE__ */X(A,{size:12})}),
18
- /* @__PURE__ */X("span",{className:"es-ts-name",style:O,children:e.name}),
19
- /* @__PURE__ */X("span",{className:"es-ts-meta",children:p(w,s,b,{autoSize:N.has("size")&&w===x&&void 0===e.values.size})})]}),y?/* @__PURE__ */X("div",{className:"es-ts-actions",children:y}):null]}),d?/* @__PURE__ */X("div",{className:"es-ts-open",id:k,children:/* @__PURE__ */X(Z,{style:e,values:x,fonts:s,colours:t,settings:C,autoSet:N,sample:o??b.sample,words:b,phone:T,readOnly:g,set:s=>u(v([e],e.id,s)[0])})}):null]})}var U={none:Y,upper:W,capitalize:D,lower:$};function Z({style:e,values:s,fonts:a,colours:l,settings:i,autoSet:o,sample:d,words:c,phone:u,readOnly:m,set:h}){const f=e.values,p=a.find(e=>e.value===s.font),v=function(e,s){return e?s.find(s=>s.key===e)?.value??t(e)??void 0:void 0}(s.color,l),S=e=>"largestSize"===e||o.has(e),g=e=>S(e)?f[e]:s[e],b=g("size"),N=u&&void 0!==f.sizePhone?f.sizePhone:b,C=g("lineSpacing"),x=g("letterSpacing"),w=S("letterCase")?f.letterCase:s.letterCase,E={fontFamily:p?.family,fontSize:void 0===N?void 0:`${N}px`,fontWeight:s.weight,fontStyle:s.italic?"italic":void 0,lineHeight:void 0===C?void 0:String(C/100),letterSpacing:void 0===x?void 0:`${x}px`,color:v,textTransform:y(w)},z=e=>{const t=k[e],a=S(e);/* @__PURE__ */
20
- return X("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */X(n,{label:c.settings[e],value:f[e],onChange:s=>h({[e]:s}),min:t.min,max:t.max,step:t.step,shiftStep:t.shiftStep,sliderMin:t.sliderMin,sliderMax:t.sliderMax,unit:t.unit||void 0,styleValue:a?void 0:s[e],auto:a?c.auto:void 0,readOnly:m})},e)};/* @__PURE__ */
21
- return I(H,{children:[
22
- /* @__PURE__ */X("div",{className:"es-ts-preview",style:E,"aria-label":c.preview,children:d}),i.map(t=>{switch(t){case"font":/* @__PURE__ */
23
- return X(q,{value:f.font,fonts:a,words:c,readOnly:m,set:h},t);case"color":/* @__PURE__ */
24
- return X(K,{value:f.color,hex:v,colours:l,words:c,readOnly:m,set:h},t);case"emphasis":{const e=(s.weight??400)>=600,a=!1!==p?.italic;/* @__PURE__ */
25
- return I("div",{className:"es-ts-set","data-ts-setting":t,children:[
26
- /* @__PURE__ */X("span",{className:"es-ts-sub",children:c.settings.emphasis}),
27
- /* @__PURE__ */I("div",{className:"es-ts-icons",children:[r(c.bold,/* @__PURE__ */X(T,{className:"es-ts-icon","aria-label":c.bold,"aria-pressed":e,disabled:m,onClick:()=>h({weight:e?400:700}),children:/* @__PURE__ */X(j,{size:16})})),m||a?r(c.italic,/* @__PURE__ */X(T,{className:"es-ts-icon","aria-label":c.italic,"aria-pressed":Boolean(s.italic),disabled:m,onClick:()=>h({italic:!s.italic||void 0}),children:/* @__PURE__ */X(M,{size:16})})):/* @__PURE__ */X(T,{className:"es-ts-icon","aria-label":c.italic,"aria-pressed":Boolean(s.italic),"aria-disabled":!0,disabledReason:c.italicMissing,children:/* @__PURE__ */X(M,{size:16})})]})]},t)}case"letterCase":/* @__PURE__ */
28
- return X(V,{value:f.letterCase??s.letterCase,auto:S("letterCase"),words:c,readOnly:m,set:h},t);case"largestSize":return"heading"===e.kind?z(t):null;case"size":return u?(()=>{const e=k.size;/* @__PURE__ */
29
- return X("div",{className:"es-ts-slider","data-ts-setting":"size","data-ts-device":"phone",children:/* @__PURE__ */X(n,{label:c.settings.size,value:f.sizePhone,onChange:e=>h({sizePhone:e}),min:e.min,max:e.max,step:e.step,shiftStep:e.shiftStep,sliderMin:e.sliderMin,sliderMax:e.sliderMax,unit:e.unit||void 0,styleValue:b,readOnly:m})},"size")})():z(t);default:return z(t)}})]})}function q({value:e,fonts:s,words:t,readOnly:a,set:n}){const i=z();/* @__PURE__ */
30
- return I("div",{className:"es-ts-set","data-ts-setting":"font",children:[
31
- /* @__PURE__ */X("span",{className:"es-ts-sub",id:i,children:t.settings.font}),
32
- /* @__PURE__ */X(l,{value:e,options:s.map(e=>({label:e.label,value:e.value})),onChange:e=>n({font:e}),ariaLabelledBy:i,readOnly:a})]})}function K({value:e,hex:s,colours:t,words:a,readOnly:n,set:l}){/* @__PURE__ */
33
- return X(F,{value:e,hex:s,colours:t,label:a.settings.color,followsWord:a.colour.follows,anyWord:a.colour.any,readOnly:n,onChange:e=>l({color:e})})}function V({value:e,auto:s,words:t,readOnly:a,set:n}){const l=s?["auto",...S]:S,i=e??(s?"auto":"none"),o=E([]),d=e=>n({letterCase:"auto"===e?void 0:e});/* @__PURE__ */
34
- return I("div",{className:"es-ts-set","data-ts-setting":"letterCase",children:[
18
+ /* @__PURE__ */X("span",{className:"es-ts-name",style:O,children:s.name}),
19
+ /* @__PURE__ */X("span",{className:"es-ts-meta",children:m(w,t,g,{autoSize:N.has("size")&&w===x&&void 0===s.values.size})})]}),v?/* @__PURE__ */X("div",{className:"es-ts-actions",children:v}):null]}),o?/* @__PURE__ */X("div",{className:"es-ts-open",id:k,children:/* @__PURE__ */X(V,{style:s,values:x,fonts:t,colours:a,settings:C,autoSet:N,sample:r??g.sample,words:g,phone:T,readOnly:S,set:e=>p(h([s],s.id,e)[0])})}):null]})}var U={none:I,upper:Y,capitalize:W,lower:$};function V({style:e,values:t,fonts:a,colours:l,settings:i,autoSet:r,sample:o,words:d,phone:c,readOnly:u,set:m}){const h=e.values,p=a.find(e=>e.value===t.font),v=function(e,s){return e?s.find(s=>s.key===e)?.value??n(e)??void 0:void 0}(t.color,l),y=e=>"largestSize"===e||r.has(e),g=e=>y(e)?h[e]:t[e],b=g("size"),N=c&&void 0!==h.sizePhone?h.sizePhone:b,C=g("lineSpacing"),x=g("letterSpacing"),w=y("letterCase")?h.letterCase:t.letterCase,E={fontFamily:p?.family,fontSize:void 0===N?void 0:`${N}px`,fontWeight:t.weight,fontStyle:t.italic?"italic":void 0,lineHeight:void 0===C?void 0:String(C/100),letterSpacing:void 0===x?void 0:`${x}px`,color:v,textTransform:f(w)},z=e=>{const a=S[e],n=y(e);/* @__PURE__ */
20
+ return X("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */X(s,{label:d.settings[e],value:h[e],onChange:s=>m({[e]:s}),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?void 0:t[e],auto:n?d.auto:void 0,readOnly:u})},e)};/* @__PURE__ */
21
+ return D(F,{children:[
22
+ /* @__PURE__ */X("div",{className:"es-ts-preview",style:E,"aria-label":d.preview,children:o}),i.map(n=>{switch(n){case"font":/* @__PURE__ */
23
+ return X(Z,{value:h.font,fonts:a,words:d,readOnly:u,set:m},n);case"color":/* @__PURE__ */
24
+ return X(K,{value:h.color,hex:v,colours:l,words:d,readOnly:u,set:m},n);case"emphasis":{const e=(t.weight??400)>=600,s=!1!==p?.italic;/* @__PURE__ */
25
+ return D("div",{className:"es-ts-set","data-ts-setting":n,children:[
26
+ /* @__PURE__ */X("span",{className:"es-ts-sub",children:d.settings.emphasis}),
27
+ /* @__PURE__ */D("div",{className:"es-ts-icons",children:[k(d.bold,/* @__PURE__ */X(T,{className:"es-ts-icon","aria-label":d.bold,"aria-pressed":e,disabled:u,onClick:()=>m({weight:e?400:700}),children:/* @__PURE__ */X(j,{size:16})})),u||s?k(d.italic,/* @__PURE__ */X(T,{className:"es-ts-icon","aria-label":d.italic,"aria-pressed":Boolean(t.italic),disabled:u,onClick:()=>m({italic:!t.italic||void 0}),children:/* @__PURE__ */X(M,{size:16})})):/* @__PURE__ */X(T,{className:"es-ts-icon","aria-label":d.italic,"aria-pressed":Boolean(t.italic),"aria-disabled":!0,disabledReason:d.italicMissing,children:/* @__PURE__ */X(M,{size:16})})]})]},n)}case"letterCase":/* @__PURE__ */
28
+ return X(q,{value:h.letterCase??t.letterCase,auto:y("letterCase"),words:d,readOnly:u,set:m},n);case"largestSize":return"heading"===e.kind?z(n):null;case"size":return c?(()=>{const e=S.size;/* @__PURE__ */
29
+ return X("div",{className:"es-ts-slider","data-ts-setting":"size","data-ts-device":"phone",children:/* @__PURE__ */X(s,{label:d.settings.size,value:h.sizePhone,onChange:e=>m({sizePhone:e}),min:e.min,max:e.max,step:e.step,shiftStep:e.shiftStep,sliderMin:e.sliderMin,sliderMax:e.sliderMax,unit:e.unit||void 0,styleValue:b,readOnly:u})},"size")})():z(n);default:return z(n)}})]})}function Z({value:e,fonts:s,words:t,readOnly:a,set:n}){const l=z();/* @__PURE__ */
30
+ return D("div",{className:"es-ts-set","data-ts-setting":"font",children:[
31
+ /* @__PURE__ */X("span",{className:"es-ts-sub",id:l,children:t.settings.font}),
32
+ /* @__PURE__ */X(g,{value:e,options:s.map(e=>({label:e.label,value:e.value})),onChange:e=>n({font:e}),ariaLabelledBy:l,readOnly:a})]})}function K({value:e,hex:s,colours:t,words:a,readOnly:n,set:l}){/* @__PURE__ */
33
+ return X(P,{value:e,hex:s,colours:t,label:a.settings.color,followsWord:a.colour.follows,anyWord:a.colour.any,readOnly:n,onChange:e=>l({color:e})})}function q({value:e,auto:s,words:t,readOnly:a,set:n}){const l=s?["auto",...p]:p,i=e??(s?"auto":"none"),r=E([]),o=e=>n({letterCase:"auto"===e?void 0:e});/* @__PURE__ */
34
+ return D("div",{className:"es-ts-set","data-ts-setting":"letterCase",children:[
35
35
  /* @__PURE__ */X("span",{className:"es-ts-sub",children:t.settings.letterCase}),
36
- /* @__PURE__ */X("div",{className:"es-ts-icons",role:"radiogroup","aria-label":t.settings.letterCase,onKeyDown:e=>{const s="ArrowRight"===e.key||"ArrowDown"===e.key?1:"ArrowLeft"===e.key||"ArrowUp"===e.key?-1:0;if(!s||a)return;e.preventDefault();const t=(l.indexOf(i)+s+l.length)%l.length;d(l[t]),o.current[t]?.focus()},children:l.map((e,s)=>{const n=e===i;if("auto"===e)return r(t.case.autoTitle,/* @__PURE__ */X(T,{ref:e=>{o.current[s]=e},role:"radio",pressed:n,className:"es-ts-icon es-ts-icon--word","aria-checked":n,"aria-label":t.case.auto,tabIndex:n?0:-1,disabled:a,onClick:()=>d(e),children:t.case.auto},e));const l=U[e];return r(t.case[e],/* @__PURE__ */X(T,{ref:e=>{o.current[s]=e},role:"radio",pressed:n,className:"es-ts-icon","aria-checked":n,"aria-label":t.case[e],tabIndex:n?0:-1,disabled:a,onClick:()=>d(e),children:/* @__PURE__ */X(l,{size:16})},e))})})]})}export{F as ColourSwatchRow,G as TextStyleItem,R as TextStylesGroup,P as TextStylesList};
36
+ /* @__PURE__ */X("div",{className:"es-ts-icons",role:"radiogroup","aria-label":t.settings.letterCase,onKeyDown:e=>{const s="ArrowRight"===e.key||"ArrowDown"===e.key?1:"ArrowLeft"===e.key||"ArrowUp"===e.key?-1:0;if(!s||a)return;e.preventDefault();const t=(l.indexOf(i)+s+l.length)%l.length;o(l[t]),r.current[t]?.focus()},children:l.map((e,s)=>{const n=e===i;if("auto"===e)return k(t.case.autoTitle,/* @__PURE__ */X(T,{ref:e=>{r.current[s]=e},role:"radio",pressed:n,className:"es-ts-icon es-ts-icon--word","aria-checked":n,"aria-label":t.case.auto,tabIndex:n?0:-1,disabled:a,onClick:()=>o(e),children:t.case.auto},e));const l=U[e];return k(t.case[e],/* @__PURE__ */X(T,{ref:e=>{r.current[s]=e},role:"radio",pressed:n,className:"es-ts-icon","aria-checked":n,"aria-label":t.case[e],tabIndex:n?0:-1,disabled:a,onClick:()=>o(e),children:/* @__PURE__ */X(l,{size:16})},e))})})]})}export{P as ColourSwatchRow,R as TextStyleItem,G as TextStylesGroup,B as TextStylesList};