efficient-easel 1.0.1 → 1.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 (43) hide show
  1. package/README.md +8 -1
  2. package/dist/chunk-2F6RZTR7.js +5 -0
  3. package/dist/{chunk-I64QM6DU.js → chunk-4OL6MRYY.js} +1 -1
  4. package/dist/chunk-7QWOAQQL.js +5 -0
  5. package/dist/{chunk-O5F46JWM.js → chunk-BEEJ63CT.js} +40 -40
  6. package/dist/{chunk-QRKKQGUO.js → chunk-JMIZ3FOV.js} +1 -1
  7. package/dist/{chunk-RG7PFKCA.js → chunk-KCE5RVVC.js} +3 -3
  8. package/dist/{chunk-QTPJMJOJ.js → chunk-NGT4DAHF.js} +1 -1
  9. package/dist/chunk-PJP46U5L.js +9 -0
  10. package/dist/chunk-Q6ETRSEA.js +24 -0
  11. package/dist/{chunk-GXFAQ7JN.js → chunk-RINSVAKA.js} +1 -1
  12. package/dist/{chunk-FER7FCAG.js → chunk-TJIXDXTV.js} +1 -1
  13. package/dist/{chunk-XWR5YVA7.js → chunk-UFY6RNMT.js} +2 -2
  14. package/dist/chunk-YNOZ5NXW.js +14 -0
  15. package/dist/copy/copy.css +16 -1
  16. package/dist/copy/index.js +31 -31
  17. package/dist/easel/index.d.ts +1 -1
  18. package/dist/fields/index.d.ts +37 -41
  19. package/dist/fields/index.js +1 -1
  20. package/dist/panel/index.js +14 -16
  21. package/dist/panel/panel.css +34 -22
  22. package/dist/screen/components/AddBlockRow.js +1 -1
  23. package/dist/screen/components/AddSidePanel.js +1 -1
  24. package/dist/screen/components/MediaSidePanel.js +1 -1
  25. package/dist/screen/components/ScreenChrome.js +1 -1
  26. package/dist/screen/components/ScreenMount.js +1 -1
  27. package/dist/screen/components/ScreenStoreProvider.js +1 -1
  28. package/dist/screen/components/SectionScreenShell.js +16 -16
  29. package/dist/screen/components/usePartBridge.js +1 -1
  30. package/dist/screen/index.js +1 -1
  31. package/dist/screen/lib/puck/use-section-ops.js +1 -1
  32. package/dist/screen/lib/screen-parts.js +1 -1
  33. package/dist/text-styles/index.js +33 -33
  34. package/dist/text-styles/text-styles.css +3 -3
  35. package/dist/tree/index.js +1 -1
  36. package/dist/tree/tree.css +9 -10
  37. package/dist/{types-VqL6t5HH.d.ts → types-DQp_i3dE.d.ts} +6 -2
  38. package/package.json +3 -3
  39. package/dist/chunk-4SWZAYKI.js +0 -5
  40. package/dist/chunk-NLRW4BGG.js +0 -8
  41. package/dist/chunk-Q27BB5ZC.js +0 -14
  42. package/dist/chunk-QFMJBBKM.js +0 -5
  43. package/dist/chunk-WDXPWSP7.js +0 -24
@@ -270,6 +270,19 @@
270
270
  flex: 1 1 auto;
271
271
  white-space: nowrap;
272
272
  }
273
+ /* A glyph tab stands in the shell Tooltip's wrapper (`TabItem.tooltip`,
274
+ efficient-shell 4.166.0): the wrapper is the strip's item in the tab's
275
+ place, and the tab fills it. The wrapper adds no width of its own, so the
276
+ thresholds below are the tab's, as measured. */
277
+ .es-tabs > :not([role='tab']) {
278
+ display: flex;
279
+ flex: 1 1 auto;
280
+ min-width: 0;
281
+ }
282
+ .es-tabs > :not([role='tab']) > [role='tab'] {
283
+ flex: 1 1 auto;
284
+ white-space: nowrap;
285
+ }
273
286
 
274
287
  /* The glyph in the chip: 16px of drawing, the same size a field's icon takes,
275
288
  standing in an 18px box.
@@ -298,21 +311,20 @@
298
311
  justify-content: center;
299
312
  }
300
313
 
301
- .es-tab-icon svg,
302
- .es-seg-icon svg { width: var(--es-chip-icon); height: var(--es-chip-icon); display: block; }
303
-
304
- /* A tab with a glyph holds its glyph and its word in ONE shell Tooltip (which
305
- says the word on hover, where the panel has dropped it). The Tooltip's
306
- wrapper stands where the shell's tab put them side by side: the same
307
- `gap-1.5`, so the measured thresholds below still hold. A clipped word is
308
- out of the flow, so a glyph-only tab keeps no gap. */
314
+ /* A glyph tab's glyph and word, side by side in `.es-tab-tip` (a hook since
315
+ 1.0.0; the word's Tooltip is the tab's own since efficient-shell 4.166.0):
316
+ the same `gap-1.5` the shell's tab puts between its children, so the
317
+ measured thresholds below still hold. A clipped word is out of the flow,
318
+ so a glyph-only tab keeps no gap. */
309
319
  .es-tab-tip {
310
- position: relative;
311
320
  display: inline-flex;
312
321
  align-items: center;
313
322
  gap: calc(1.5 * var(--spacing));
314
323
  }
315
324
 
325
+ .es-tab-icon svg,
326
+ .es-seg-icon svg { width: var(--es-chip-icon); height: var(--es-chip-icon); display: block; }
327
+
316
328
  /* ── where the word stops fitting ──────────────────────────────────────────── */
317
329
 
318
330
  /* RE-MEASURED ON THE SHELL'S PILL (efficient-easel issue 199, part C, 2026-10-10).
@@ -359,28 +371,28 @@
359
371
 
360
372
  /* TWO OR MORE, under 197px: the word on the tab he is not reading goes. */
361
373
  @container (width < 197px) {
362
- .es-tabs:has([role='tab']:nth-child(2)) [role='tab']:not([aria-selected='true']) .es-tab-word.has-icon { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
374
+ .es-tabs:has(> :nth-child(2)) [role='tab']:not([aria-selected='true']) .es-tab-word.has-icon { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
363
375
  }
364
376
 
365
377
  /* THREE OR MORE, under 280px. */
366
378
  @container (width < 280px) {
367
- .es-tabs:has([role='tab']:nth-child(3)) [role='tab']:not([aria-selected='true']) .es-tab-word.has-icon { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
379
+ .es-tabs:has(> :nth-child(3)) [role='tab']:not([aria-selected='true']) .es-tab-word.has-icon { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
368
380
  }
369
381
 
370
382
  /* FOUR OR MORE, under 375px: a fourth label is another ~95px of track. */
371
383
  @container (width < 375px) {
372
- .es-tabs:has([role='tab']:nth-child(4)) [role='tab']:not([aria-selected='true']) .es-tab-word.has-icon { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
384
+ .es-tabs:has(> :nth-child(4)) [role='tab']:not([aria-selected='true']) .es-tab-word.has-icon { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
373
385
  }
374
386
 
375
387
  /* THREE OR MORE at the narrow end, under 195px: the last word goes as well. */
376
388
  @container (width < 195px) {
377
- .es-tabs:has([role='tab']:nth-child(3)) [role='tab'][aria-selected='true'] .es-tab-word.has-icon { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
389
+ .es-tabs:has(> :nth-child(3)) [role='tab'][aria-selected='true'] .es-tab-word.has-icon { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
378
390
  }
379
391
 
380
392
  /* FOUR OR MORE, under 239px: the strip is four glyphs on a track. It reads —
381
393
  the track and the chips are what say "these are buttons". */
382
394
  @container (width < 239px) {
383
- .es-tabs:has([role='tab']:nth-child(4)) [role='tab'][aria-selected='true'] .es-tab-word.has-icon { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
395
+ .es-tabs:has(> :nth-child(4)) [role='tab'][aria-selected='true'] .es-tab-word.has-icon { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
384
396
  }
385
397
 
386
398
  /* ── the segmented control: the same chip, a different promise ─────────────── */
@@ -1090,12 +1102,12 @@ button.es-group-head:hover { background: var(--es-chip-bg); }
1090
1102
  }
1091
1103
  /* A position the caller has closed. It keeps its square — nine that became
1092
1104
  eight would read as a broken control — and stops answering the pointer; the
1093
- reason is on the button's `title`. */
1094
- .es-placement-cell.is-off .es-placement-dot { opacity: 0.22; }
1095
- /* Off with a reason is `aria-disabled` (the keyboard reaches it and hears why),
1096
- so the pointer is told here what `:disabled` used to tell it. */
1097
- .es-placement-cell.is-off,
1098
- .es-corners-cell.is-off { cursor: not-allowed; }
1105
+ reason is the cell's description and its Tooltip. The cell is the shell
1106
+ IconButton's `aria-disabled` (efficient-shell 4.166.0), which fades the
1107
+ whole cell to 0.6 and shows the not-allowed cursor; the dot under that fade
1108
+ stays at the 0.22 it showed before the cell faded (0.22 / 0.6), and does not
1109
+ brighten on hover. */
1110
+ .es-placement-cell.is-off .es-placement-dot { opacity: calc(0.22 / 0.6); }
1099
1111
  /* A cell that draws a GLYPH instead of its dot — the Scrolling Bar's
1100
1112
  `Scroll direction`, where four live cells mean a direction of travel and a
1101
1113
  dot cannot say which way. It follows the cell through every state the dot
@@ -1123,7 +1135,7 @@ button.es-group-head:hover { background: var(--es-chip-bg); }
1123
1135
  color: var(--es-on-accent);
1124
1136
  opacity: 1;
1125
1137
  }
1126
- .es-placement-cell.is-off .es-placement-icon { opacity: 0.22; }
1138
+ .es-placement-cell.is-off .es-placement-icon { opacity: calc(0.22 / 0.6); }
1127
1139
  /* Keyboard focus is visible, like every other control in this panel. */
1128
1140
  @media (prefers-reduced-motion: reduce) {
1129
1141
  .es-placement-icon,
@@ -1184,7 +1196,7 @@ button.es-group-head:hover { background: var(--es-chip-bg); }
1184
1196
  /* A corner the caller has closed. It keeps its cell — four that became three
1185
1197
  would read as a broken control — and stops answering the pointer; the reason
1186
1198
  is on the button's `title`. */
1187
- .es-corners-cell.is-off .es-corners-mark { opacity: 0.22; }
1199
+ .es-corners-cell.is-off .es-corners-mark { opacity: calc(0.22 / 0.6); }
1188
1200
  /* Keyboard focus is visible, like every other control in this panel. */
1189
1201
  @media (prefers-reduced-motion: reduce) {
1190
1202
  .es-corners-mark { transition: none; }
@@ -1 +1 @@
1
- export{AddBlockRow as default}from"../../chunk-QRKKQGUO.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-QFMJBBKM.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PYCLHOSA.js";import"../../chunk-AELNNAFM.js";import"../../chunk-WDXPWSP7.js";import"../../chunk-NLRW4BGG.js";import"../../chunk-XWR5YVA7.js";import"../../chunk-Q27BB5ZC.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-7SQF6LZL.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{AddBlockRow as default}from"../../chunk-JMIZ3FOV.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-2F6RZTR7.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PYCLHOSA.js";import"../../chunk-AELNNAFM.js";import"../../chunk-Q6ETRSEA.js";import"../../chunk-PJP46U5L.js";import"../../chunk-UFY6RNMT.js";import"../../chunk-YNOZ5NXW.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-7SQF6LZL.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -1 +1 @@
1
- export{blockKey,AddSidePanel as default,sectionKey,templateKey}from"../../chunk-4SWZAYKI.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-BVN33R76.js";import"../../chunk-QR4DLZ3P.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-QFMJBBKM.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-E2O2MRZR.js";import"../../chunk-PYCLHOSA.js";import"../../chunk-AELNNAFM.js";import"../../chunk-WDXPWSP7.js";import"../../chunk-NLRW4BGG.js";import"../../chunk-XWR5YVA7.js";import"../../chunk-Q27BB5ZC.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-TJ7YIRWQ.js";import"../../chunk-ZJEBF4NB.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-7SQF6LZL.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-W3XX2CNW.js";import"../../chunk-O2NLQBFX.js";import"../../chunk-67GNT6PF.js";import"../../chunk-PAELDYYS.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{blockKey,AddSidePanel as default,sectionKey,templateKey}from"../../chunk-7QWOAQQL.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-BVN33R76.js";import"../../chunk-QR4DLZ3P.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-2F6RZTR7.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-E2O2MRZR.js";import"../../chunk-PYCLHOSA.js";import"../../chunk-AELNNAFM.js";import"../../chunk-Q6ETRSEA.js";import"../../chunk-PJP46U5L.js";import"../../chunk-UFY6RNMT.js";import"../../chunk-YNOZ5NXW.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-TJ7YIRWQ.js";import"../../chunk-ZJEBF4NB.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-7SQF6LZL.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-W3XX2CNW.js";import"../../chunk-O2NLQBFX.js";import"../../chunk-67GNT6PF.js";import"../../chunk-PAELDYYS.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -1 +1 @@
1
- export{MediaSidePanel as default}from"../../chunk-I64QM6DU.js";import"../../chunk-QFMJBBKM.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PYCLHOSA.js";import"../../chunk-AELNNAFM.js";import"../../chunk-WDXPWSP7.js";import"../../chunk-NLRW4BGG.js";import"../../chunk-XWR5YVA7.js";import"../../chunk-Q27BB5ZC.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-TJ7YIRWQ.js";import"../../chunk-ZJEBF4NB.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-7SQF6LZL.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{MediaSidePanel as default}from"../../chunk-4OL6MRYY.js";import"../../chunk-2F6RZTR7.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PYCLHOSA.js";import"../../chunk-AELNNAFM.js";import"../../chunk-Q6ETRSEA.js";import"../../chunk-PJP46U5L.js";import"../../chunk-UFY6RNMT.js";import"../../chunk-YNOZ5NXW.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-TJ7YIRWQ.js";import"../../chunk-ZJEBF4NB.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-7SQF6LZL.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -1 +1 @@
1
- export{ScreenChrome as default}from"../../chunk-O5F46JWM.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-SQTY6CJD.js";import"../../chunk-FGNR22NY.js";import"../../chunk-ZE7I3PLX.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-PWZOS45R.js";import"../../chunk-7F52SZOI.js";import"../../chunk-R2HLPNQF.js";import"../../chunk-TBF5CVPA.js";import"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-PT6V53OO.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-ORR3Q4WV.js";import"../../chunk-GXFAQ7JN.js";import"../../chunk-QTPJMJOJ.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-JLTZQ4US.js";import"../../chunk-MAEXP3KE.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-ONRYLR2D.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-57DJOKXT.js";import"../../chunk-5545A3PC.js";import"../../chunk-4SWZAYKI.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-BVN33R76.js";import"../../chunk-QR4DLZ3P.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-I64QM6DU.js";import"../../chunk-QFMJBBKM.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-E2O2MRZR.js";import"../../chunk-PYCLHOSA.js";import"../../chunk-AELNNAFM.js";import"../../chunk-WDXPWSP7.js";import"../../chunk-NLRW4BGG.js";import"../../chunk-XWR5YVA7.js";import"../../chunk-Q27BB5ZC.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-BXMXTO36.js";import"../../chunk-EA2HTX37.js";import"../../chunk-2LK54I4E.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-X6DQWK2C.js";import"../../chunk-BDTITTMW.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-TJ7YIRWQ.js";import"../../chunk-ZJEBF4NB.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-7SQF6LZL.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-W3XX2CNW.js";import"../../chunk-O2NLQBFX.js";import"../../chunk-67GNT6PF.js";import"../../chunk-PAELDYYS.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{ScreenChrome as default}from"../../chunk-BEEJ63CT.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-SQTY6CJD.js";import"../../chunk-FGNR22NY.js";import"../../chunk-ZE7I3PLX.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-PWZOS45R.js";import"../../chunk-7F52SZOI.js";import"../../chunk-R2HLPNQF.js";import"../../chunk-TBF5CVPA.js";import"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-PT6V53OO.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-ORR3Q4WV.js";import"../../chunk-RINSVAKA.js";import"../../chunk-NGT4DAHF.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-JLTZQ4US.js";import"../../chunk-MAEXP3KE.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-ONRYLR2D.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-57DJOKXT.js";import"../../chunk-5545A3PC.js";import"../../chunk-7QWOAQQL.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-BVN33R76.js";import"../../chunk-QR4DLZ3P.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-4OL6MRYY.js";import"../../chunk-2F6RZTR7.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-E2O2MRZR.js";import"../../chunk-PYCLHOSA.js";import"../../chunk-AELNNAFM.js";import"../../chunk-Q6ETRSEA.js";import"../../chunk-PJP46U5L.js";import"../../chunk-UFY6RNMT.js";import"../../chunk-YNOZ5NXW.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-BXMXTO36.js";import"../../chunk-EA2HTX37.js";import"../../chunk-2LK54I4E.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-X6DQWK2C.js";import"../../chunk-BDTITTMW.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-TJ7YIRWQ.js";import"../../chunk-ZJEBF4NB.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-7SQF6LZL.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-W3XX2CNW.js";import"../../chunk-O2NLQBFX.js";import"../../chunk-67GNT6PF.js";import"../../chunk-PAELDYYS.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -1 +1 @@
1
- export{DocumentScreen,ScreenMount as default}from"../../chunk-RG7PFKCA.js";import"../../chunk-GXQCZJOP.js";import"../../chunk-FER7FCAG.js";import"../../chunk-O5F46JWM.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-SQTY6CJD.js";import"../../chunk-FGNR22NY.js";import"../../chunk-ZE7I3PLX.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-PWZOS45R.js";import"../../chunk-7F52SZOI.js";import"../../chunk-R2HLPNQF.js";import"../../chunk-TBF5CVPA.js";import"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-PT6V53OO.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-ORR3Q4WV.js";import"../../chunk-GXFAQ7JN.js";import"../../chunk-QTPJMJOJ.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-JLTZQ4US.js";import"../../chunk-MAEXP3KE.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-ONRYLR2D.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-57DJOKXT.js";import"../../chunk-5545A3PC.js";import"../../chunk-4SWZAYKI.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-BVN33R76.js";import"../../chunk-QR4DLZ3P.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-I64QM6DU.js";import"../../chunk-QFMJBBKM.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-E2O2MRZR.js";import"../../chunk-PYCLHOSA.js";import"../../chunk-AELNNAFM.js";import"../../chunk-WDXPWSP7.js";import"../../chunk-NLRW4BGG.js";import"../../chunk-XWR5YVA7.js";import"../../chunk-Q27BB5ZC.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-BXMXTO36.js";import"../../chunk-EA2HTX37.js";import"../../chunk-2LK54I4E.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-X6DQWK2C.js";import"../../chunk-BDTITTMW.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-TJ7YIRWQ.js";import"../../chunk-ZJEBF4NB.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-7SQF6LZL.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-W3XX2CNW.js";import"../../chunk-O2NLQBFX.js";import"../../chunk-67GNT6PF.js";import"../../chunk-PAELDYYS.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{DocumentScreen,ScreenMount as default}from"../../chunk-KCE5RVVC.js";import"../../chunk-GXQCZJOP.js";import"../../chunk-TJIXDXTV.js";import"../../chunk-BEEJ63CT.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-SQTY6CJD.js";import"../../chunk-FGNR22NY.js";import"../../chunk-ZE7I3PLX.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-PWZOS45R.js";import"../../chunk-7F52SZOI.js";import"../../chunk-R2HLPNQF.js";import"../../chunk-TBF5CVPA.js";import"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-PT6V53OO.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-ORR3Q4WV.js";import"../../chunk-RINSVAKA.js";import"../../chunk-NGT4DAHF.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-JLTZQ4US.js";import"../../chunk-MAEXP3KE.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-ONRYLR2D.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-57DJOKXT.js";import"../../chunk-5545A3PC.js";import"../../chunk-7QWOAQQL.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-BVN33R76.js";import"../../chunk-QR4DLZ3P.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-4OL6MRYY.js";import"../../chunk-2F6RZTR7.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-E2O2MRZR.js";import"../../chunk-PYCLHOSA.js";import"../../chunk-AELNNAFM.js";import"../../chunk-Q6ETRSEA.js";import"../../chunk-PJP46U5L.js";import"../../chunk-UFY6RNMT.js";import"../../chunk-YNOZ5NXW.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-BXMXTO36.js";import"../../chunk-EA2HTX37.js";import"../../chunk-2LK54I4E.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-X6DQWK2C.js";import"../../chunk-BDTITTMW.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-TJ7YIRWQ.js";import"../../chunk-ZJEBF4NB.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-7SQF6LZL.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-W3XX2CNW.js";import"../../chunk-O2NLQBFX.js";import"../../chunk-67GNT6PF.js";import"../../chunk-PAELDYYS.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -1 +1 @@
1
- export{ScreenStoreProvider as default}from"../../chunk-FER7FCAG.js";import"../../chunk-QFMJBBKM.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PYCLHOSA.js";import"../../chunk-AELNNAFM.js";import"../../chunk-WDXPWSP7.js";import"../../chunk-NLRW4BGG.js";import"../../chunk-XWR5YVA7.js";import"../../chunk-Q27BB5ZC.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-7SQF6LZL.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{ScreenStoreProvider as default}from"../../chunk-TJIXDXTV.js";import"../../chunk-2F6RZTR7.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PYCLHOSA.js";import"../../chunk-AELNNAFM.js";import"../../chunk-Q6ETRSEA.js";import"../../chunk-PJP46U5L.js";import"../../chunk-UFY6RNMT.js";import"../../chunk-YNOZ5NXW.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-7SQF6LZL.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -1,16 +1,16 @@
1
- import{AddBlockRow as e}from"../../chunk-QRKKQGUO.js";import{slotChildRowName as n}from"../../chunk-TBF5CVPA.js";import{scrollPreviewToSection as o,gotoPreviewSlide as r}from"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import{useEaselUndoKeys as t}from"../../chunk-PT6V53OO.js";import{SlotChildActionsProvider as s}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as i}from"../../chunk-ORR3Q4WV.js";import{usePartBridge as c}from"../../chunk-GXFAQ7JN.js";import{useSectionOps as p}from"../../chunk-QTPJMJOJ.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import{useScreenDocument as l}from"../../chunk-ONRYLR2D.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import{MediaSidePanel as m}from"../../chunk-I64QM6DU.js";import{SELECTION_MODE as d,useScreenPinned as a,useScreenCanvasFrame as u,useScreenInspectorPanel as h,useScreenPickFollowsSelection as k,sameInspectorMode as j,useStandaloneScreenBridges as f,useScreenBlockLook as N,useScreenBlockRules as y}from"../../chunk-QFMJBBKM.js";import{nestsInTree as S,slotFieldsOf as C}from"../../chunk-PLVEGYK6.js";import{useMediaPanel as O,usePanelPick as R,useCancelPanelPick as x}from"../../chunk-R6WTQWAC.js";import{useHostEscape as A}from"../../chunk-U3JP4VGF.js";import"../../chunk-E2O2MRZR.js";import{useEasel as P}from"../../chunk-PYCLHOSA.js";import"../../chunk-AELNNAFM.js";import"../../chunk-WDXPWSP7.js";import"../../chunk-NLRW4BGG.js";import{LayersTree as B,Subtree as L,TreeRow as v,TreeRowAction as M,TreeSeam as Q}from"../../chunk-XWR5YVA7.js";import"../../chunk-Q27BB5ZC.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-BDTITTMW.js";import{saveIndicator as W}from"../../chunk-H6DDIBQ4.js";import{SaveState as E,panelWidthVars as T}from"../../chunk-TJ7YIRWQ.js";import"../../chunk-ZJEBF4NB.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-7SQF6LZL.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-W3XX2CNW.js";import"../../chunk-O2NLQBFX.js";import{useTreeDrag as g}from"../../chunk-67GNT6PF.js";import"../../chunk-PAELDYYS.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import{TrashIcon as z}from"../../chunk-L5KW4HG5.js";import{zoneKey as D,parseZoneKey as b}from"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import{useState as J,useRef as F,useEffect as H,useCallback as Y,Fragment as w}from"react";import{Tooltip as G}from"efficient-shell/ui";import{jsxs as K,jsx as X,Fragment as V}from"react/jsx-runtime";var $=e=>n=>{n.target.closest("button, input")||e()},Z={rowClick:$};function I(){const{saveState:I,readOnly:U,readOnlyReason:q=null}=l(),_=p(),{appState:ee,selectedItem:ne,config:oe}=P(e=>e),[re,te]=J(d),{first:se,last:ie,panelOf:ce}=a(),pe=ce(se),le=u(),me=h(),de=ee.data.content?.[0]??null,ae=de?.props.id??null,ue=de?.type===se,he=de?.type===ie,ke=F(null),je=F(null);t(je);const fe=O(),Ne=R(),ye=x();k(ne?.props.id),H(()=>{const e=je.current;if(!Ne||!e)return;const n=e=>{"Escape"===e.key&&ye()};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[Ne]),A(null!==Ne,()=>ye()),H(()=>{ae&&ke.current!==ae&&(ke.current=ae,ue?te(pe??d):ne||_.select({index:0}))},[ae,ne,_,ue]);const Se=Y(e=>te(n=>j(n,e)?n:e),[]),Ce=f({kind:re.kind,mode:re,open:Se,show:e=>te(e),reveal:()=>{},select:(e,n)=>{te(e=>j(e,n)?e:n),_.select(e)}}),{selectNode:Oe}=c({mode:re,setMode:te,onOpenPart:o}),Re=N(),{labelAtLevel:xe,Icon:Ae}=Re,{canAddTo:Pe}=y(),Be=e=>oe.components[e]?.label??e,Le=e=>xe(e,"section",Be(e)),ve=!ue&&"puck"===re.kind&&ne?.props.id===ae,Me=de?Pe(de.type)?.spec??null:null,Qe=de&&Me?`${de.props.id}:${Me.slot}`:null,We=de&&Me&&Array.isArray(de.props[Me.slot])?de.props[Me.slot]:[],Ee=e=>n(e,Be,Re.plainText),Te=(e,n)=>{de&&Me&&Qe&&(te(d),Me.slider?(r(String(de.props.id),e),_.select({index:e,zone:Qe}),o(String(de.props.id))):(_.select({index:e,zone:Qe}),o(n)))},ge=()=>{if(!de||!Me||!Qe)return;const e=We.length;_.insertComponent(Qe,Me.childType,e),te(d),Me.slider?requestAnimationFrame(()=>{r(String(de.props.id),e),_.select({index:e,zone:Qe})}):_.select({index:e,zone:Qe})},ze=e=>C(oe,e),De=e=>{const{parentId:n,slot:o}=b(e),r=e=>{if(!e)return null;if(String(e.props.id)===n)return e;for(const n of ze(e.type)){const o=Array.isArray(e.props[n])?e.props[n]:[];for(const e of o){const n=r(e);if(n)return n}}return null},t=r(de)?.props[o];return Array.isArray(t)?t.length:0},be=(e,n,o)=>{const r=Math.min(Math.max(o,0),De(e)),t=n<r?r-1:r;t!==n&&(_.reorderComponent(e,n,t),te(d),_.select({index:t,zone:e}))},Je=g({keyOf:e=>e.id,readOnly:Boolean(U),canDrop:(e,n)=>D(n)===e.zone&&n.index>=0&&n.index<=De(e.zone),onDrop:(e,n)=>be(e.zone,e.index,n.index),onStep:(e,n)=>be(e.zone,e.index,n<0?e.index-1:e.index+2)}),Fe=(e,n)=>/* @__PURE__ */X(Q,{...U?{}:Je.seam({place:{...b(e),index:n}})},`seam:${e}:${n}`),He=e=>Re.blockRowName(e,Be),Ye=(e,n,r)=>{te(d),_.select({index:n,zone:e}),o(r)},we=(e,n,o)=>{_.insertComponent(e,n,o),te(d),_.select({index:o,zone:e})},Ge=(n,o,r)=>/* @__PURE__ */X(e,{choices:r,onPick:e=>we(n,e,o)}),Ke=(e,n)=>{const o=ze((r=e).type).flatMap(e=>(Array.isArray(r.props[e])?r.props[e]:[]).map((n,o)=>({child:n,zone:`${r.props.id}:${e}`,index:o})));var r;const t=Pe(e.type),s=t?.choices??null,i="footer"===t?.source?He:Ee;/* @__PURE__ */
2
- return K(V,{children:[o.map(({child:e,zone:o,index:r})=>{const t=ne?.props.id===e.props.id,s=S(oe,e.type,n),c=i(e),p=String(e.props.id),l=()=>Ye(o,r,p),{rowProps:m,...a}=Je.row({item:{id:p,zone:o,index:r},place:{...b(o),index:r}},{onClick:$(l)});/* @__PURE__ */
3
- return K(w,{children:[0===r&&Fe(o,0),
4
- /* @__PURE__ */X(v,{icon:/* @__PURE__ */X(Ae,{type:e.type,size:13}),name:c,selected:t,onSelect:l,...a,actions:/* @__PURE__ */X(M,{kind:"delete",label:`Delete ${c}`,onClick:()=>{return e=o,n=r,_.removeComponent(e,n),te(d),void _.select(null);var e,n},children:/* @__PURE__ */X(z,{size:13})}),rowProps:m}),s&&/* @__PURE__ */X(L,{children:Ke(e,n+1)}),Fe(o,r+1)]},String(e.props.id??`${o}-${r}`))}),t&&s?Ge(`${e.props.id}:${t.slot}`,o.length,s):null]})},Xe="HeroSingle"===de?.type,Ve=Boolean(de)&&(Boolean(Me)||he||ue||Xe);/* @__PURE__ */
5
- return K("div",{ref:je,className:"sf-editor es-editor",style:T(i),children:[
6
- /* @__PURE__ */X("div",{className:"sf-section-bar",children:/* @__PURE__ */X(E,null!==q?{tone:"off",label:q,role:"status"}:{...W(I),role:"status"})}),
7
- /* @__PURE__ */K("div",{className:"sf-body",children:[Ne&&fe?/* @__PURE__ */X("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:/* @__PURE__ */X(m,{panel:fe,pick:Ne})}):Ve&&de&&/* @__PURE__ */K("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
8
- /* @__PURE__ */X("div",{className:"sf-panel-head",children:/* @__PURE__ */X(G,{content:ue?"Header settings":`${Le(de.type)} settings`,side:"bottom",children:/* @__PURE__ */X("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(ve?"is-selected":""),"aria-pressed":ve,onClick:()=>{ue?te(pe??d):(te(d),_.select({index:0}))},children:Le(de.type)})})}),
9
- /* @__PURE__ */X(B,{className:"sf-tree sf-scroll",rootProps:Je.rootProps(),children:/* @__PURE__ */X(L,{children:ue?
10
- /* @__PURE__ */X(v,{icon:/* @__PURE__ */X(Ae,{type:"header",size:13}),name:"Header settings",selected:re.kind===pe?.kind,onSelect:()=>te(pe??d),rowProps:{onClick:$(()=>te(pe??d))}}):Me?/* @__PURE__ */K(V,{children:[We.map((e,n)=>{const o=ne?.props.id===e.props.id,r=Ee(e),t=String(e.props.id),s=()=>Te(n,t),{rowProps:i,...c}=Je.row({item:{id:t,zone:Qe,index:n},place:{...b(Qe),index:n}},{onClick:$(s)});/* @__PURE__ */
11
- return K(w,{children:[0===n&&Fe(Qe,0),
12
- /* @__PURE__ */X(v,{icon:/* @__PURE__ */X(Ae,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */X(M,{kind:"delete",label:`Delete ${r}`,onClick:()=>{return e=n,void(Qe&&(_.removeComponent(Qe,e),te(d),_.select(null)));var e},children:/* @__PURE__ */X(z,{size:13})}),rowProps:i}),Fe(Qe,n+1)]},String(e.props.id??n))}),
13
- /* @__PURE__ */K("button",{type:"button",className:"sf-add-card",onClick:ge,children:[
14
- /* @__PURE__ */X("span",{className:"sf-plus sf-plus--sm",children:"+"}),Me.addLabel]}),ae?Ce.partRows?.(de,Z):null]}):Ke(de,1)})})]}),
15
- /* @__PURE__ */X("div",{className:"sf-center",children:/* @__PURE__ */X("div",{className:"sf-preview-host",children:/* @__PURE__ */X(le,{})})}),
16
- /* @__PURE__ */X(s,{value:{selectChild:(e,n,o,r)=>"section"===Pe(r)?.source?Te(n,o):Ye(e,n,o),addChild:(e,n,o,r,t)=>"section"===Pe(t)?.source?ge():we(`${e}:${n}`,o,r),childRowName:Ee,blockRowName:He},children:/* @__PURE__ */X(me,{mode:re,onOpenWebsiteSettings:Ce.openSettings??(()=>{}),onSelectNode:Oe,hideNodeActions:!0})})]})]})}export{I as default};
1
+ import{AddBlockRow as e}from"../../chunk-JMIZ3FOV.js";import{slotChildRowName as n}from"../../chunk-TBF5CVPA.js";import{scrollPreviewToSection as o,gotoPreviewSlide as r}from"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import{useEaselUndoKeys as t}from"../../chunk-PT6V53OO.js";import{SlotChildActionsProvider as s}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as i}from"../../chunk-ORR3Q4WV.js";import{usePartBridge as c}from"../../chunk-RINSVAKA.js";import{useSectionOps as p}from"../../chunk-NGT4DAHF.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import{useScreenDocument as l}from"../../chunk-ONRYLR2D.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import{MediaSidePanel as m}from"../../chunk-4OL6MRYY.js";import{SELECTION_MODE as d,useScreenPinned as a,useScreenCanvasFrame as u,useScreenInspectorPanel as h,useScreenPickFollowsSelection as k,sameInspectorMode as j,useStandaloneScreenBridges as f,useScreenBlockLook as N,useScreenBlockRules as y}from"../../chunk-2F6RZTR7.js";import{nestsInTree as R,slotFieldsOf as S}from"../../chunk-PLVEGYK6.js";import{useMediaPanel as O,usePanelPick as A,useCancelPanelPick as C}from"../../chunk-R6WTQWAC.js";import{useHostEscape as x}from"../../chunk-U3JP4VGF.js";import"../../chunk-E2O2MRZR.js";import{useEasel as P}from"../../chunk-PYCLHOSA.js";import"../../chunk-AELNNAFM.js";import"../../chunk-Q6ETRSEA.js";import"../../chunk-PJP46U5L.js";import{LayersTree as L,Subtree as T,TreeRow as E,TreeRowAction as v,TreeSeam as M}from"../../chunk-UFY6RNMT.js";import"../../chunk-YNOZ5NXW.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-BDTITTMW.js";import{saveIndicator as g}from"../../chunk-H6DDIBQ4.js";import{SaveState as z,panelWidthVars as B}from"../../chunk-TJ7YIRWQ.js";import"../../chunk-ZJEBF4NB.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-7SQF6LZL.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-W3XX2CNW.js";import"../../chunk-O2NLQBFX.js";import{useTreeDrag as Y}from"../../chunk-67GNT6PF.js";import"../../chunk-PAELDYYS.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import{TrashIcon as D}from"../../chunk-L5KW4HG5.js";import{zoneKey as F,parseZoneKey as W}from"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import{useState as b,useRef as H,useEffect as w,useCallback as Q,Fragment as V}from"react";import{Tooltip as Z}from"efficient-shell/ui";import{jsxs as J,jsx as $,Fragment as I}from"react/jsx-runtime";var K=e=>n=>{n.target.closest("button, input")||e()},X={rowClick:K};function G(){const{saveState:G,readOnly:U,readOnlyReason:q=null}=l(),_=p(),{appState:ee,selectedItem:ne,config:oe}=P(e=>e),[re,te]=b(d),{first:se,last:ie,panelOf:ce}=a(),pe=ce(se),le=u(),me=h(),de=ee.data.content?.[0]??null,ae=de?.props.id??null,ue=de?.type===se,he=de?.type===ie,ke=H(null),je=H(null);t(je);const fe=O(),Ne=A(),ye=C();k(ne?.props.id),w(()=>{const e=je.current;if(!Ne||!e)return;const n=e=>{"Escape"===e.key&&ye()};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[Ne]),x(null!==Ne,()=>ye()),w(()=>{ae&&ke.current!==ae&&(ke.current=ae,ue?te(pe??d):ne||_.select({index:0}))},[ae,ne,_,ue]);const Re=Q(e=>te(n=>j(n,e)?n:e),[]),Se=f({kind:re.kind,mode:re,open:Re,show:e=>te(e),reveal:()=>{},select:(e,n)=>{te(e=>j(e,n)?e:n),_.select(e)}}),{selectNode:Oe}=c({mode:re,setMode:te,onOpenPart:o}),Ae=N(),{labelAtLevel:Ce,Icon:xe}=Ae,{canAddTo:Pe}=y(),Le=e=>oe.components[e]?.label??e,Te=e=>Ce(e,"section",Le(e)),Ee=!ue&&"puck"===re.kind&&ne?.props.id===ae,ve=de?Pe(de.type)?.spec??null:null,Me=de&&ve?`${de.props.id}:${ve.slot}`:null,ge=de&&ve&&Array.isArray(de.props[ve.slot])?de.props[ve.slot]:[],ze=e=>n(e,Le,Ae.plainText),Be=(e,n)=>{de&&ve&&Me&&(te(d),ve.slider?(r(String(de.props.id),e),_.select({index:e,zone:Me}),o(String(de.props.id))):(_.select({index:e,zone:Me}),o(n)))},Ye=()=>{if(!de||!ve||!Me)return;const e=ge.length;_.insertComponent(Me,ve.childType,e),te(d),ve.slider?requestAnimationFrame(()=>{r(String(de.props.id),e),_.select({index:e,zone:Me})}):_.select({index:e,zone:Me})},De=e=>S(oe,e),Fe=e=>{const{parentId:n,slot:o}=W(e),r=e=>{if(!e)return null;if(String(e.props.id)===n)return e;for(const n of De(e.type)){const o=Array.isArray(e.props[n])?e.props[n]:[];for(const e of o){const n=r(e);if(n)return n}}return null},t=r(de)?.props[o];return Array.isArray(t)?t.length:0},We=(e,n,o)=>{const r=Math.min(Math.max(o,0),Fe(e)),t=n<r?r-1:r;t!==n&&(_.reorderComponent(e,n,t),te(d),_.select({index:t,zone:e}))},be=Y({keyOf:e=>e.id,readOnly:Boolean(U),canDrop:(e,n)=>F(n)===e.zone&&n.index>=0&&n.index<=Fe(e.zone),onDrop:(e,n)=>We(e.zone,e.index,n.index),onStep:(e,n)=>We(e.zone,e.index,n<0?e.index-1:e.index+2)}),He=(e,n)=>/* @__PURE__ */$(M,{...U?{}:be.seam({place:{...W(e),index:n}})},`seam:${e}:${n}`),we=e=>Ae.blockRowName(e,Le),Qe=(e,n,r)=>{te(d),_.select({index:n,zone:e}),o(r)},Ve=(e,n,o)=>{_.insertComponent(e,n,o),te(d),_.select({index:o,zone:e})},Ze=(n,o,r)=>/* @__PURE__ */$(e,{choices:r,onPick:e=>Ve(n,e,o)}),Je=(e,n)=>{const o=De((r=e).type).flatMap(e=>(Array.isArray(r.props[e])?r.props[e]:[]).map((n,o)=>({child:n,zone:`${r.props.id}:${e}`,index:o})));var r;const t=Pe(e.type),s=t?.choices??null,i="footer"===t?.source?we:ze;/* @__PURE__ */
2
+ return J(I,{children:[o.map(({child:e,zone:o,index:r})=>{const t=ne?.props.id===e.props.id,s=R(oe,e.type,n),c=i(e),p=String(e.props.id),l=()=>Qe(o,r,p),{rowProps:m,...a}=be.row({item:{id:p,zone:o,index:r},place:{...W(o),index:r}},{onClick:K(l)});/* @__PURE__ */
3
+ return J(V,{children:[0===r&&He(o,0),
4
+ /* @__PURE__ */$(E,{icon:/* @__PURE__ */$(xe,{type:e.type,size:13}),name:c,selected:t,onSelect:l,...a,actions:/* @__PURE__ */$(v,{kind:"delete",label:`Delete ${c}`,onClick:()=>{return e=o,n=r,_.removeComponent(e,n),te(d),void _.select(null);var e,n},children:/* @__PURE__ */$(D,{size:13})}),rowProps:m}),s&&/* @__PURE__ */$(T,{children:Je(e,n+1)}),He(o,r+1)]},String(e.props.id??`${o}-${r}`))}),t&&s?Ze(`${e.props.id}:${t.slot}`,o.length,s):null]})},$e="HeroSingle"===de?.type,Ie=Boolean(de)&&(Boolean(ve)||he||ue||$e);/* @__PURE__ */
5
+ return J("div",{ref:je,className:"sf-editor es-editor",style:B(i),children:[
6
+ /* @__PURE__ */$("div",{className:"sf-section-bar",children:/* @__PURE__ */$(z,null!==q?{tone:"off",label:q,role:"status"}:{...g(G),role:"status"})}),
7
+ /* @__PURE__ */J("div",{className:"sf-body",children:[Ne&&fe?/* @__PURE__ */$("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:/* @__PURE__ */$(m,{panel:fe,pick:Ne})}):Ie&&de&&/* @__PURE__ */J("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
8
+ /* @__PURE__ */$("div",{className:"sf-panel-head",children:/* @__PURE__ */$(Z,{content:ue?"Header settings":`${Te(de.type)} settings`,side:"bottom",children:/* @__PURE__ */$("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(Ee?"is-selected":""),"aria-pressed":Ee,onClick:()=>{ue?te(pe??d):(te(d),_.select({index:0}))},children:Te(de.type)})})}),
9
+ /* @__PURE__ */$(L,{className:"sf-tree sf-scroll",rootProps:be.rootProps(),children:/* @__PURE__ */$(T,{children:ue?
10
+ /* @__PURE__ */$(E,{icon:/* @__PURE__ */$(xe,{type:"header",size:13}),name:"Header settings",selected:re.kind===pe?.kind,onSelect:()=>te(pe??d),rowProps:{onClick:K(()=>te(pe??d))}}):ve?/* @__PURE__ */J(I,{children:[ge.map((e,n)=>{const o=ne?.props.id===e.props.id,r=ze(e),t=String(e.props.id),s=()=>Be(n,t),{rowProps:i,...c}=be.row({item:{id:t,zone:Me,index:n},place:{...W(Me),index:n}},{onClick:K(s)});/* @__PURE__ */
11
+ return J(V,{children:[0===n&&He(Me,0),
12
+ /* @__PURE__ */$(E,{icon:/* @__PURE__ */$(xe,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */$(v,{kind:"delete",label:`Delete ${r}`,onClick:()=>{return e=n,void(Me&&(_.removeComponent(Me,e),te(d),_.select(null)));var e},children:/* @__PURE__ */$(D,{size:13})}),rowProps:i}),He(Me,n+1)]},String(e.props.id??n))}),
13
+ /* @__PURE__ */J("button",{type:"button",className:"sf-add-card",onClick:Ye,children:[
14
+ /* @__PURE__ */$("span",{className:"sf-plus sf-plus--sm",children:"+"}),ve.addLabel]}),ae?Se.partRows?.(de,X):null]}):Je(de,1)})})]}),
15
+ /* @__PURE__ */$("div",{className:"sf-center",children:/* @__PURE__ */$("div",{className:"sf-preview-host",children:/* @__PURE__ */$(le,{})})}),
16
+ /* @__PURE__ */$(s,{value:{selectChild:(e,n,o,r)=>"section"===Pe(r)?.source?Be(n,o):Qe(e,n,o),addChild:(e,n,o,r,t)=>"section"===Pe(t)?.source?Ye():Ve(`${e}:${n}`,o,r),childRowName:ze,blockRowName:we},children:/* @__PURE__ */$(me,{mode:re,onOpenWebsiteSettings:Se.openSettings??(()=>{}),onSelectNode:Oe,hideNodeActions:!0})})]})]})}export{G as default};
@@ -1 +1 @@
1
- export{usePartBridge}from"../../chunk-GXFAQ7JN.js";import"../../chunk-QTPJMJOJ.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-QFMJBBKM.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PYCLHOSA.js";import"../../chunk-AELNNAFM.js";import"../../chunk-WDXPWSP7.js";import"../../chunk-NLRW4BGG.js";import"../../chunk-XWR5YVA7.js";import"../../chunk-Q27BB5ZC.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-7SQF6LZL.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{usePartBridge}from"../../chunk-RINSVAKA.js";import"../../chunk-NGT4DAHF.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-2F6RZTR7.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PYCLHOSA.js";import"../../chunk-AELNNAFM.js";import"../../chunk-Q6ETRSEA.js";import"../../chunk-PJP46U5L.js";import"../../chunk-UFY6RNMT.js";import"../../chunk-YNOZ5NXW.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-7SQF6LZL.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -1 +1 @@
1
- import"../chunk-GZO72N3Q.js";export{DocumentScreen,ScreenMount}from"../chunk-RG7PFKCA.js";import"../chunk-GXQCZJOP.js";export{ScreenStoreProvider}from"../chunk-FER7FCAG.js";import"../chunk-O5F46JWM.js";import"../chunk-26OOWIJJ.js";import"../chunk-SQTY6CJD.js";import"../chunk-FGNR22NY.js";import"../chunk-ZE7I3PLX.js";import"../chunk-2GVCAIPX.js";import"../chunk-PWZOS45R.js";import"../chunk-7F52SZOI.js";import"../chunk-R2HLPNQF.js";import"../chunk-TBF5CVPA.js";import"../chunk-4ES5JGGX.js";import"../chunk-IQ5TA7AM.js";import"../chunk-DUVRZ456.js";import"../chunk-6W7WLPZH.js";import"../chunk-PT6V53OO.js";import"../chunk-KCBEE2MC.js";import"../chunk-ORR3Q4WV.js";import"../chunk-GXFAQ7JN.js";import"../chunk-QTPJMJOJ.js";import"../chunk-IYT6NN2J.js";import"../chunk-JLTZQ4US.js";import"../chunk-MAEXP3KE.js";import"../chunk-BSPCSC45.js";import"../chunk-I54UCYOU.js";import"../chunk-GOTN2KY4.js";import"../chunk-R5L2E7JX.js";import"../chunk-ONRYLR2D.js";import"../chunk-S4AWJX4Q.js";import"../chunk-ERR437B5.js";import"../chunk-KG7RJWOK.js";import"../chunk-GMCZXMOV.js";export{NO_DOCUMENT_ADDRESSING}from"../chunk-RLBXE4EU.js";import"../chunk-HNKB2ZYR.js";import"../chunk-CLOS6SSX.js";import"../chunk-VPFNZ7TB.js";import"../chunk-LOMEH6DG.js";import"../chunk-57DJOKXT.js";import"../chunk-5545A3PC.js";import"../chunk-4SWZAYKI.js";import"../chunk-5ZBY24K7.js";import"../chunk-PA3PNTVV.js";import"../chunk-BVN33R76.js";import"../chunk-QR4DLZ3P.js";import"../chunk-KQMML6JM.js";import"../chunk-KCOBHPN6.js";export{EaselSessionProvider,useEaselSession}from"../chunk-O7Q4DDJT.js";export{EFFICIENT_BACKEND,activateEaselSession,backendOf,createEaselSession,currentEaselSession,deactivateEaselSession,efficientClientOpen,isEfficientBackend,provideDefaultBackend,resetAmbientEaselSession,sessionRegistry,setSessionBridgedSite,setSessionDocumentSite}from"../chunk-RSCMJIWS.js";import"../chunk-HQ4VVRIC.js";import"../chunk-I64QM6DU.js";export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenAdd,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../chunk-QFMJBBKM.js";import"../chunk-PLVEGYK6.js";import"../chunk-R6WTQWAC.js";export{DETACHED_EASEL_HOST,EaselHostContext,EaselHostProvider,createEaselHost,useEaselHost,useHostEscape}from"../chunk-U3JP4VGF.js";import"../chunk-6WY6ZXJG.js";import"../chunk-E2O2MRZR.js";import"../chunk-PYCLHOSA.js";import"../chunk-AELNNAFM.js";import"../chunk-WDXPWSP7.js";import"../chunk-NLRW4BGG.js";import"../chunk-XWR5YVA7.js";import"../chunk-Q27BB5ZC.js";import"../chunk-K56YDHYQ.js";import"../chunk-QTLAVDJE.js";import"../chunk-YRLPFZW3.js";import"../chunk-BXMXTO36.js";import"../chunk-EA2HTX37.js";import"../chunk-2LK54I4E.js";import"../chunk-WK3AFPXY.js";import"../chunk-D2BCHTQR.js";import"../chunk-X6DQWK2C.js";import"../chunk-BDTITTMW.js";import"../chunk-H6DDIBQ4.js";import"../chunk-TJ7YIRWQ.js";import"../chunk-ZJEBF4NB.js";import"../chunk-THWO5YVZ.js";import"../chunk-RE4LP46F.js";import"../chunk-MJM6SFD3.js";import"../chunk-2OAZYSWJ.js";import"../chunk-7SQF6LZL.js";import"../chunk-QLD57GBB.js";import"../chunk-FPOKPNO4.js";import"../chunk-MFIRYGHW.js";import"../chunk-W3XX2CNW.js";import"../chunk-O2NLQBFX.js";import"../chunk-67GNT6PF.js";import"../chunk-PAELDYYS.js";import"../chunk-ZNCEOSXO.js";import"../chunk-P2VEMZH5.js";import"../chunk-L5KW4HG5.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
1
+ import"../chunk-GZO72N3Q.js";export{DocumentScreen,ScreenMount}from"../chunk-KCE5RVVC.js";import"../chunk-GXQCZJOP.js";export{ScreenStoreProvider}from"../chunk-TJIXDXTV.js";import"../chunk-BEEJ63CT.js";import"../chunk-26OOWIJJ.js";import"../chunk-SQTY6CJD.js";import"../chunk-FGNR22NY.js";import"../chunk-ZE7I3PLX.js";import"../chunk-2GVCAIPX.js";import"../chunk-PWZOS45R.js";import"../chunk-7F52SZOI.js";import"../chunk-R2HLPNQF.js";import"../chunk-TBF5CVPA.js";import"../chunk-4ES5JGGX.js";import"../chunk-IQ5TA7AM.js";import"../chunk-DUVRZ456.js";import"../chunk-6W7WLPZH.js";import"../chunk-PT6V53OO.js";import"../chunk-KCBEE2MC.js";import"../chunk-ORR3Q4WV.js";import"../chunk-RINSVAKA.js";import"../chunk-NGT4DAHF.js";import"../chunk-IYT6NN2J.js";import"../chunk-JLTZQ4US.js";import"../chunk-MAEXP3KE.js";import"../chunk-BSPCSC45.js";import"../chunk-I54UCYOU.js";import"../chunk-GOTN2KY4.js";import"../chunk-R5L2E7JX.js";import"../chunk-ONRYLR2D.js";import"../chunk-S4AWJX4Q.js";import"../chunk-ERR437B5.js";import"../chunk-KG7RJWOK.js";import"../chunk-GMCZXMOV.js";export{NO_DOCUMENT_ADDRESSING}from"../chunk-RLBXE4EU.js";import"../chunk-HNKB2ZYR.js";import"../chunk-CLOS6SSX.js";import"../chunk-VPFNZ7TB.js";import"../chunk-LOMEH6DG.js";import"../chunk-57DJOKXT.js";import"../chunk-5545A3PC.js";import"../chunk-7QWOAQQL.js";import"../chunk-5ZBY24K7.js";import"../chunk-PA3PNTVV.js";import"../chunk-BVN33R76.js";import"../chunk-QR4DLZ3P.js";import"../chunk-KQMML6JM.js";import"../chunk-KCOBHPN6.js";export{EaselSessionProvider,useEaselSession}from"../chunk-O7Q4DDJT.js";export{EFFICIENT_BACKEND,activateEaselSession,backendOf,createEaselSession,currentEaselSession,deactivateEaselSession,efficientClientOpen,isEfficientBackend,provideDefaultBackend,resetAmbientEaselSession,sessionRegistry,setSessionBridgedSite,setSessionDocumentSite}from"../chunk-RSCMJIWS.js";import"../chunk-HQ4VVRIC.js";import"../chunk-4OL6MRYY.js";export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenAdd,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../chunk-2F6RZTR7.js";import"../chunk-PLVEGYK6.js";import"../chunk-R6WTQWAC.js";export{DETACHED_EASEL_HOST,EaselHostContext,EaselHostProvider,createEaselHost,useEaselHost,useHostEscape}from"../chunk-U3JP4VGF.js";import"../chunk-6WY6ZXJG.js";import"../chunk-E2O2MRZR.js";import"../chunk-PYCLHOSA.js";import"../chunk-AELNNAFM.js";import"../chunk-Q6ETRSEA.js";import"../chunk-PJP46U5L.js";import"../chunk-UFY6RNMT.js";import"../chunk-YNOZ5NXW.js";import"../chunk-K56YDHYQ.js";import"../chunk-QTLAVDJE.js";import"../chunk-YRLPFZW3.js";import"../chunk-BXMXTO36.js";import"../chunk-EA2HTX37.js";import"../chunk-2LK54I4E.js";import"../chunk-WK3AFPXY.js";import"../chunk-D2BCHTQR.js";import"../chunk-X6DQWK2C.js";import"../chunk-BDTITTMW.js";import"../chunk-H6DDIBQ4.js";import"../chunk-TJ7YIRWQ.js";import"../chunk-ZJEBF4NB.js";import"../chunk-THWO5YVZ.js";import"../chunk-RE4LP46F.js";import"../chunk-MJM6SFD3.js";import"../chunk-2OAZYSWJ.js";import"../chunk-7SQF6LZL.js";import"../chunk-QLD57GBB.js";import"../chunk-FPOKPNO4.js";import"../chunk-MFIRYGHW.js";import"../chunk-W3XX2CNW.js";import"../chunk-O2NLQBFX.js";import"../chunk-67GNT6PF.js";import"../chunk-PAELDYYS.js";import"../chunk-ZNCEOSXO.js";import"../chunk-P2VEMZH5.js";import"../chunk-L5KW4HG5.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
@@ -1 +1 @@
1
- export{useSectionOps}from"../../../chunk-QTPJMJOJ.js";import"../../../chunk-QFMJBBKM.js";import"../../../chunk-PLVEGYK6.js";import"../../../chunk-R6WTQWAC.js";import"../../../chunk-U3JP4VGF.js";import"../../../chunk-PYCLHOSA.js";import"../../../chunk-AELNNAFM.js";import"../../../chunk-WDXPWSP7.js";import"../../../chunk-NLRW4BGG.js";import"../../../chunk-XWR5YVA7.js";import"../../../chunk-Q27BB5ZC.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-QTLAVDJE.js";import"../../../chunk-YRLPFZW3.js";import"../../../chunk-EA2HTX37.js";import"../../../chunk-D2BCHTQR.js";import"../../../chunk-7SQF6LZL.js";import"../../../chunk-QLD57GBB.js";import"../../../chunk-FPOKPNO4.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-67GNT6PF.js";import"../../../chunk-ZNCEOSXO.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-L5KW4HG5.js";import"../../../chunk-KRXQM65X.js";import"../../../chunk-NKB3KVAB.js";
1
+ export{useSectionOps}from"../../../chunk-NGT4DAHF.js";import"../../../chunk-2F6RZTR7.js";import"../../../chunk-PLVEGYK6.js";import"../../../chunk-R6WTQWAC.js";import"../../../chunk-U3JP4VGF.js";import"../../../chunk-PYCLHOSA.js";import"../../../chunk-AELNNAFM.js";import"../../../chunk-Q6ETRSEA.js";import"../../../chunk-PJP46U5L.js";import"../../../chunk-UFY6RNMT.js";import"../../../chunk-YNOZ5NXW.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-QTLAVDJE.js";import"../../../chunk-YRLPFZW3.js";import"../../../chunk-EA2HTX37.js";import"../../../chunk-D2BCHTQR.js";import"../../../chunk-7SQF6LZL.js";import"../../../chunk-QLD57GBB.js";import"../../../chunk-FPOKPNO4.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-67GNT6PF.js";import"../../../chunk-ZNCEOSXO.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-L5KW4HG5.js";import"../../../chunk-KRXQM65X.js";import"../../../chunk-NKB3KVAB.js";
@@ -1 +1 @@
1
- export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenAdd,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-QFMJBBKM.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PYCLHOSA.js";import"../../chunk-AELNNAFM.js";import"../../chunk-WDXPWSP7.js";import"../../chunk-NLRW4BGG.js";import"../../chunk-XWR5YVA7.js";import"../../chunk-Q27BB5ZC.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-7SQF6LZL.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenAdd,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-2F6RZTR7.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PYCLHOSA.js";import"../../chunk-AELNNAFM.js";import"../../chunk-Q6ETRSEA.js";import"../../chunk-PJP46U5L.js";import"../../chunk-UFY6RNMT.js";import"../../chunk-YNOZ5NXW.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-7SQF6LZL.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -1,33 +1,33 @@
1
- import{hexReadout as e,ColourWindow as n,typedHex as t}from"../chunk-FPAVNX3Y.js";import{DEFAULT_TEXT_STYLES_WORDS as s}from"../chunk-M6F6LS3H.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-M6F6LS3H.js";import"../chunk-ZAOM6PFH.js";import{FieldSelect as i,FieldSlider as a}from"../chunk-NLRW4BGG.js";import"../chunk-FPOKPNO4.js";import{useWords as l}from"../chunk-MFIRYGHW.js";import{withTip as r}from"../chunk-P2VEMZH5.js";import{ChevronIcon as o,TrashIcon as d,BoldIcon as c,ItalicIcon as u,CaseLowerIcon as m,CaseUpperIcon as h,CaseNormalIcon as f}from"../chunk-L5KW4HG5.js";import{hsvToHex as p,Tooltip as v,ColorSwatch as g,IconButton as y,iconButtonClasses as k}from"efficient-shell/ui";import{useState as b,useRef as x,useId as w,useEffect as N,Fragment as S}from"react";import{jsxs as C,jsx as M,Fragment as $}from"react/jsx-runtime";var z=["font","color","size","weight","emphasis","lineSpacing","letterSpacing","paragraphSpacing","letterCase","largestSize"],O=["font","color","size","weight","lineSpacing","letterSpacing","paragraphSpacing","letterCase"],j=["heading","body"],A=7,L={heading:3,body:5},F={min:5,max:void 0,sliderMin:12,sliderMax:72,step:1,shiftStep:10,unit:"px"},W={size:F,weight:{min:100,max:900,sliderMin:300,sliderMax:900,step:100,shiftStep:100,unit:""},lineSpacing:{min:50,max:250,sliderMin:50,sliderMax:250,step:1,shiftStep:10,unit:"%"},letterSpacing:{min:-10,max:void 0,sliderMin:-5,sliderMax:10,step:.1,shiftStep:1,unit:"px"},paragraphSpacing:{min:0,max:void 0,sliderMin:0,sliderMax:48,step:1,shiftStep:10,unit:"px"},largestSize:F},E=(e,n)=>`${"heading"===e?"Heading":"Body"} ${n}`;function H(e=({kind:e,n:n})=>E(e,n)){return j.flatMap(n=>Array.from({length:L[n]},(t,s)=>({id:`${n}-${s+1}`,kind:n,name:e({kind:n,n:s+1}),values:{}})))}function B(e,n,t=A){return e.filter(e=>e.kind===n).length<t}function D(e,n){const t=new RegExp(`^${n}-([1-9]\\d*)$`).exec(e);return t?Number(t[1]):void 0}function I(e){const n=D(e.id,e.kind);return void 0!==n&&n<=L[e.kind]}function R(e,n,t={}){const{max:s=A,name:i=({kind:e,n:n})=>E(e,n),make:a}=t;if(!B(e,n,s))return null;const l=e.filter(e=>e.kind===n);let r=l.length+1;const o=new Set(e.map(e=>e.name));for(;o.has(i({kind:n,n:r}));)r+=1;const d=new Set(e.map(e=>e.id));let c=Math.max(r,...l.map(e=>(D(e.id,n)??0)+1));for(;d.has(`${n}-${c}`);)c+=1;const u=l.at(-1),m=a?a(n,r):{id:`${n}-${c}`,kind:n,name:i({kind:n,n:r}),values:{...u?.values??{}}},h=u?e.indexOf(u)+1:"heading"===n?0:e.length;return{styles:[...e.slice(0,h),m,...e.slice(h)],added:m}}function T(e,n,t={}){const{name:s=({kind:e,n:n})=>E(e,n)}=t,i=e.find(e=>e.id===n);if(!i||I(i))return null;const a=e.filter(e=>e.kind===i.kind),l=a.indexOf(i),r=/* @__PURE__ */new Map;return a.forEach((e,n)=>{n>l&&e.name===s({kind:e.kind,n:n+1})&&r.set(e,s({kind:e.kind,n:n}))}),{styles:e.filter(e=>e!==i).map(e=>r.has(e)?{...e,name:r.get(e)}:e),removed:i}}function P(e,n){const t=e.find(e=>e.id===n);if(t)return t;for(const t of j){const s=D(n,t);if(void 0===s)continue;let i;for(const n of e){const e=n.kind===t?D(n.id,t):void 0;void 0!==e&&e<s&&(!i||e>i.n)&&(i={n:e,style:n})}return i?.style}}function G(e,n,t){return e.map(e=>{if(e.id!==n)return e;const s={...e.values};for(const[e,n]of Object.entries(t))void 0===n?delete s[e]:s[e]=n;return{...e,values:s}})}function q(e){return Math.min(20,Math.max(12,Math.round(.5*e+6)))}function K(e,n){const t=n.weights;return[t.thin,t.extraLight,t.light,t.regular,t.medium,t.semibold,t.bold,t.extraBold,t.black][Math.min(8,Math.max(0,Math.round(e/100)-1))]}function V(e,n,t,s={}){const i=n.find(n=>n.value===e.font)?.label??e.font??"",a=void 0===e.size?s.autoSize?t.auto:"":t.px({n:e.size});return t.summary({font:i,size:a,weight:K(e.weight??400,t)})}var Y=`conic-gradient(${[0,60,120,180,240,300,0].map(e=>p({h:e,s:1,v:1})).join(", ")})`;function _({value:t,hex:s,colours:i,label:a,followsWord:l,anyWord:r,onChange:o,readOnly:d=!1}){const[c,u]=b(!1),m=x(null),h=x(null),f=w(),p=void 0!==t&&i.some(e=>e.key===t),y=void 0!==t&&!p;return N(()=>{if(!c)return;const e=m.current?.ownerDocument;if(!e)return;const n=e=>{m.current&&!m.current.contains(e.target)&&u(!1)};return e.addEventListener("click",n,!0),()=>e.removeEventListener("click",n,!0)},[c]),/* @__PURE__ */C("div",{ref:m,className:"es-ts-set","data-ts-setting":"color",children:[
2
- /* @__PURE__ */C("div",{className:"es-ts-top",children:[
3
- /* @__PURE__ */M("span",{className:"es-ts-sub",children:a}),
4
- /* @__PURE__ */M("span",{className:"es-ts-colour-read",children:s?e(s):l})]}),
5
- /* @__PURE__ */C("div",{className:"es-ts-swatches",role:"group","aria-label":a,children:[i.map(n=>/* @__PURE__ */M(v,{content:`${n.name} · ${e(n.value)}`,children:/* @__PURE__ */M(g,{color:n.value,size:"sm",className:"es-ts-swatch","aria-label":n.name,selected:t===n.key,disabled:d,onClick:()=>o(n.key)})},n.key)),
6
- /* @__PURE__ */M(v,{content:r,children:/* @__PURE__ */M(g,{ref:h,color:Y,size:"sm",className:"es-ts-swatch es-ts-swatch--any","aria-label":r,selected:y,"aria-expanded":c,"aria-controls":c?f:void 0,disabled:d,onClick:()=>u(e=>!e)})})]}),c?/* @__PURE__ */M(n,{id:f,value:s??"",onChange:e=>o(e),label:a,readOnly:d,onClose:()=>{u(!1),h.current?.focus()}}):null]})}function U({styles:e,onChange:n,fonts:t,colours:i=[],settings:a=O,auto:c=[],fallback:u,sample:m,openId:h,defaultOpenId:f=null,onOpenChange:p,onAdd:v,rowActions:g,onRemove:y,max:k=A,readOnly:$=!1}){const L=l("textStyles",s),F=w(),[W,E]=b(f),H=void 0!==h?h:W,D=e=>{void 0===h&&E(e),p?.(e)},P=new Set(c),K=z.filter(e=>a.includes(e)),Y=x(null),[_,U]=b(null);N(()=>{if(!_||!Y.current)return;const e=[...Y.current.querySelectorAll(".es-ts-item")].find(e=>e.dataset.tsId===_.id),n=e?e.querySelector(".es-ts-row"):Y.current.querySelector(`.es-ts-add[data-ts-kind="${_.kind}"]`);n?.focus(),U(null)},[_]);/* @__PURE__ */
7
- return M("div",{className:"es-ts",ref:Y,children:j.map(s=>{const a=e.filter(e=>e.kind===s),l=`${F}-${s}`,c=!B(e,s,k),h=!$&&!c;/* @__PURE__ */
8
- return C("section",{className:"es-ts-section","aria-labelledby":l,children:[
9
- /* @__PURE__ */M("div",{className:"es-ts-group",id:l,children:L.groups[s]}),a.map(s=>{const a=H===s.id,l={...u?.(s)??{},...s.values},c=t.find(e=>e.value===l.font),h=`${F}-open-${s.id}`,f=g?.(s),p=null!=f&&!1!==f,v=Boolean(y)&&!$&&!I(s),k={fontFamily:c?.family,fontSize:`${q(l.size??16)}px`,fontWeight:l.weight,fontStyle:l.italic?"italic":void 0};/* @__PURE__ */
10
- return C(S,{children:[
11
- /* @__PURE__ */C("div",{className:"es-ts-item","data-ts-id":s.id,children:[
12
- /* @__PURE__ */C("button",{type:"button",className:"es-ts-row","aria-expanded":a,"aria-controls":a?h:void 0,onClick:()=>D(a?null:s.id),children:[
13
- /* @__PURE__ */M("span",{className:"es-ts-chev","aria-hidden":"true",children:/* @__PURE__ */M(o,{size:12})}),
14
- /* @__PURE__ */M("span",{className:"es-ts-name",style:k,children:s.name}),
15
- /* @__PURE__ */M("span",{className:"es-ts-meta",children:V(l,t,L,{autoSize:P.has("size")&&void 0===s.values.size})})]}),v||p?/* @__PURE__ */C("div",{className:"es-ts-actions",children:[v?r(L.remove,/* @__PURE__ */M("button",{type:"button",className:"es-ts-del","aria-label":L.removeNamed({name:s.name}),onClick:()=>(t=>{if($||!y)return;const s=T(e,t.id,{name:L.styleName});if(!s)return;const i=e.filter(e=>e.kind===t.kind),a=i[i.indexOf(t)+1];H===t.id&&D(null),n(s.styles),y(s.removed),U({id:a?.id??null,kind:t.kind})})(s),children:/* @__PURE__ */M(d,{size:14,"aria-hidden":"true"})})):null,p?f:null]}):null]}),a?/* @__PURE__ */M("div",{className:"es-ts-open",id:h,children:/* @__PURE__ */M(J,{style:s,values:l,fonts:t,colours:i,settings:K,autoSet:P,sample:m??L.sample,words:L,readOnly:$,set:t=>n(G(e,s.id,t))})}):null]},s.id)}),r(!$&&c?L.full({kind:s,max:k}):void 0,/* @__PURE__ */C("button",{type:"button",className:"es-ts-add","data-ts-kind":s,disabled:$,"aria-disabled":!($||!c)||void 0,"aria-describedby":!$&&c?`${F}-full-${s}`:void 0,onClick:()=>{h&&(t=>{if($)return;const s=R(e,t,{max:k,name:L.styleName,make:v});s&&n(s.styles)})(s)},children:[
16
- /* @__PURE__ */M("span",{className:"es-ts-add-word",children:L.add[s]}),
17
- /* @__PURE__ */M("span",{className:"es-ts-count",children:L.count({n:a.length,max:k})})]})),$||!c?null:/* @__PURE__ */M("span",{id:`${F}-full-${s}`,className:"es-vh",children:L.full({kind:s,max:k})})]},s)})})}var X={none:f,upper:h,lower:m},Z={none:"none",upper:"uppercase",lower:"lowercase"};function J({style:e,values:n,fonts:s,colours:i,settings:l,autoSet:o,sample:d,words:m,readOnly:h,set:f}){const p=w(),v=e.values,g=s.find(e=>e.value===n.font),k=function(e,n){return e?n.find(n=>n.key===e)?.value??t(e)??void 0:void 0}(n.color,i),b=e=>"largestSize"===e||o.has(e),x=e=>b(e)?v[e]:n[e],N=x("size"),S=x("lineSpacing"),z=x("letterSpacing"),O=b("letterCase")?v.letterCase:n.letterCase,j={fontFamily:g?.family,fontSize:void 0===N?void 0:`${N}px`,fontWeight:n.weight,fontStyle:n.italic?"italic":void 0,lineHeight:void 0===S?void 0:String(S/100),letterSpacing:void 0===z?void 0:`${z}px`,color:k,textTransform:O?Z[O]:void 0},A=e=>{const t=W[e],s=b(e);/* @__PURE__ */
18
- return M("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */M(a,{label:m.settings[e],value:v[e],onChange:n=>f({[e]:n}),min:t.min,max:t.max,step:t.step,shiftStep:t.shiftStep,sliderMin:t.sliderMin,sliderMax:t.sliderMax,unit:t.unit||void 0,styleValue:s?void 0:n[e],auto:s?m.auto:void 0,readOnly:h})},e)};/* @__PURE__ */
19
- return C($,{children:[
20
- /* @__PURE__ */M("div",{className:"es-ts-preview",style:j,"aria-label":m.preview,children:d}),l.map(t=>{switch(t){case"font":/* @__PURE__ */
21
- return M(Q,{value:v.font,fonts:s,words:m,readOnly:h,set:f},t);case"color":/* @__PURE__ */
22
- return M(ee,{value:v.color,hex:k,colours:i,words:m,readOnly:h,set:f},t);case"emphasis":{const e=(n.weight??400)>=600,s=!1!==g?.italic;/* @__PURE__ */
23
- return C("div",{className:"es-ts-set","data-ts-setting":t,children:[
24
- /* @__PURE__ */M("span",{className:"es-ts-sub",children:m.settings.emphasis}),
25
- /* @__PURE__ */C("div",{className:"es-ts-icons",children:[r(m.bold,/* @__PURE__ */M(y,{className:"es-ts-icon","aria-label":m.bold,"aria-pressed":e,disabled:h,onClick:()=>f({weight:e?400:700}),children:/* @__PURE__ */M(c,{size:16})})),r(s?m.italic:m.italicMissing,/* @__PURE__ */M(y,{className:"es-ts-icon","aria-label":m.italic,"aria-pressed":Boolean(n.italic),disabled:h,"aria-disabled":!h&&!s||void 0,"aria-describedby":h||s?void 0:`${p}-no-italic`,onClick:()=>{s&&f({italic:!n.italic||void 0})},children:/* @__PURE__ */M(u,{size:16})})),h||s?null:/* @__PURE__ */M("span",{id:`${p}-no-italic`,className:"es-vh",children:m.italicMissing})]})]},t)}case"letterCase":/* @__PURE__ */
26
- return M(ne,{value:v.letterCase??n.letterCase,auto:b("letterCase"),words:m,readOnly:h,set:f},t);case"largestSize":return"heading"===e.kind?A(t):null;default:return A(t)}})]})}function Q({value:e,fonts:n,words:t,readOnly:s,set:a}){const l=w();/* @__PURE__ */
27
- return C("div",{className:"es-ts-set","data-ts-setting":"font",children:[
28
- /* @__PURE__ */M("span",{className:"es-ts-sub",id:l,children:t.settings.font}),
29
- /* @__PURE__ */M(i,{value:e,options:n.map(e=>({label:e.label,value:e.value})),onChange:e=>a({font:e}),ariaLabelledBy:l,readOnly:s})]})}function ee({value:e,hex:n,colours:t,words:s,readOnly:i,set:a}){/* @__PURE__ */
30
- return M(_,{value:e,hex:n,colours:t,label:s.settings.color,followsWord:s.colour.follows,anyWord:s.colour.any,readOnly:i,onChange:e=>a({color:e})})}function ne({value:e,auto:n,words:t,readOnly:s,set:i}){const a=n?["auto","none","upper","lower"]:["none","upper","lower"],l=e??(n?"auto":"none"),o=x([]),d=e=>i({letterCase:"auto"===e?void 0:e});/* @__PURE__ */
31
- return C("div",{className:"es-ts-set","data-ts-setting":"letterCase",children:[
32
- /* @__PURE__ */M("span",{className:"es-ts-sub",children:t.settings.letterCase}),
33
- /* @__PURE__ */M("div",{className:"es-ts-icons",role:"radiogroup","aria-label":t.settings.letterCase,onKeyDown:e=>{const n="ArrowRight"===e.key||"ArrowDown"===e.key?1:"ArrowLeft"===e.key||"ArrowUp"===e.key?-1:0;if(!n||s)return;e.preventDefault();const t=(a.indexOf(l)+n+a.length)%a.length;d(a[t]),o.current[t]?.focus()},children:a.map((e,n)=>{const i=e===l;if("auto"===e)return r(t.case.autoTitle,/* @__PURE__ */M("button",{ref:e=>{o.current[n]=e},type:"button",role:"radio",className:k({pressed:i,className:"es-ts-icon es-ts-icon--word"}),"aria-checked":i,tabIndex:i?0:-1,disabled:s,onClick:()=>d(e),children:t.case.auto},e));const a=X[e];return r(t.case[e],/* @__PURE__ */M("button",{ref:e=>{o.current[n]=e},type:"button",role:"radio",className:k({pressed:i,className:"es-ts-icon"}),"aria-checked":i,"aria-label":t.case[e],tabIndex:i?0:-1,disabled:s,onClick:()=>d(e),children:/* @__PURE__ */M(a,{size:16})},e))})})]})}export{O as CAMPAIGN_TEXT_STYLE_SETTINGS,_ as ColourSwatchRow,L as TEXT_STYLE_DEFAULT_COUNT,j as TEXT_STYLE_KINDS,A as TEXT_STYLE_MAX,W as TEXT_STYLE_RANGES,z as TEXT_STYLE_SETTINGS,U as TextStylesList,R as addTextStyle,B as canAddTextStyle,H as defaultTextStyles,V as describeTextStyle,I as isDefaultTextStyle,T as removeTextStyle,P as resolveTextStyle,q as textStyleRowSize,G as updateTextStyle,K as weightWord};
1
+ import{hexReadout as e,ColourWindow as n,typedHex as t}from"../chunk-FPAVNX3Y.js";import{DEFAULT_TEXT_STYLES_WORDS as s}from"../chunk-M6F6LS3H.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-M6F6LS3H.js";import"../chunk-ZAOM6PFH.js";import{FieldSelect as a,FieldSlider as i}from"../chunk-PJP46U5L.js";import"../chunk-FPOKPNO4.js";import{useWords as l}from"../chunk-MFIRYGHW.js";import{withTip as r}from"../chunk-P2VEMZH5.js";import{ChevronIcon as o,TrashIcon as d,BoldIcon as c,ItalicIcon as u,CaseLowerIcon as m,CaseUpperIcon as f,CaseNormalIcon as h}from"../chunk-L5KW4HG5.js";import{hsvToHex as p,Tooltip as v,ColorSwatch as g,IconButton as k}from"efficient-shell/ui";import{useState as y,useRef as b,useId as x,useEffect as w,Fragment as S}from"react";import{jsxs as N,jsx as C,Fragment as M}from"react/jsx-runtime";var z=["font","color","size","weight","emphasis","lineSpacing","letterSpacing","paragraphSpacing","letterCase","largestSize"],O=["font","color","size","weight","lineSpacing","letterSpacing","paragraphSpacing","letterCase"],$=["heading","body"],j=7,A={heading:3,body:5},L={min:5,max:void 0,sliderMin:12,sliderMax:72,step:1,shiftStep:10,unit:"px"},F={size:L,weight:{min:100,max:900,sliderMin:300,sliderMax:900,step:100,shiftStep:100,unit:""},lineSpacing:{min:50,max:250,sliderMin:50,sliderMax:250,step:1,shiftStep:10,unit:"%"},letterSpacing:{min:-10,max:void 0,sliderMin:-5,sliderMax:10,step:.1,shiftStep:1,unit:"px"},paragraphSpacing:{min:0,max:void 0,sliderMin:0,sliderMax:48,step:1,shiftStep:10,unit:"px"},largestSize:L},W=(e,n)=>`${"heading"===e?"Heading":"Body"} ${n}`;function E(e=({kind:e,n:n})=>W(e,n)){return $.flatMap(n=>Array.from({length:A[n]},(t,s)=>({id:`${n}-${s+1}`,kind:n,name:e({kind:n,n:s+1}),values:{}})))}function H(e,n,t=j){return e.filter(e=>e.kind===n).length<t}function P(e,n){const t=new RegExp(`^${n}-([1-9]\\d*)$`).exec(e);return t?Number(t[1]):void 0}function B(e){const n=P(e.id,e.kind);return void 0!==n&&n<=A[e.kind]}function D(e,n,t={}){const{max:s=j,name:a=({kind:e,n:n})=>W(e,n),make:i}=t;if(!H(e,n,s))return null;const l=e.filter(e=>e.kind===n);let r=l.length+1;const o=new Set(e.map(e=>e.name));for(;o.has(a({kind:n,n:r}));)r+=1;const d=new Set(e.map(e=>e.id));let c=Math.max(r,...l.map(e=>(P(e.id,n)??0)+1));for(;d.has(`${n}-${c}`);)c+=1;const u=l.at(-1),m=i?i(n,r):{id:`${n}-${c}`,kind:n,name:a({kind:n,n:r}),values:{...u?.values??{}}},f=u?e.indexOf(u)+1:"heading"===n?0:e.length;return{styles:[...e.slice(0,f),m,...e.slice(f)],added:m}}function I(e,n,t={}){const{name:s=({kind:e,n:n})=>W(e,n)}=t,a=e.find(e=>e.id===n);if(!a||B(a))return null;const i=e.filter(e=>e.kind===a.kind),l=i.indexOf(a),r=/* @__PURE__ */new Map;return i.forEach((e,n)=>{n>l&&e.name===s({kind:e.kind,n:n+1})&&r.set(e,s({kind:e.kind,n:n}))}),{styles:e.filter(e=>e!==a).map(e=>r.has(e)?{...e,name:r.get(e)}:e),removed:a}}function R(e,n){const t=e.find(e=>e.id===n);if(t)return t;for(const t of $){const s=P(n,t);if(void 0===s)continue;let a;for(const n of e){const e=n.kind===t?P(n.id,t):void 0;void 0!==e&&e<s&&(!a||e>a.n)&&(a={n:e,style:n})}return a?.style}}function T(e,n,t){return e.map(e=>{if(e.id!==n)return e;const s={...e.values};for(const[e,n]of Object.entries(t))void 0===n?delete s[e]:s[e]=n;return{...e,values:s}})}function q(e){return Math.min(20,Math.max(12,Math.round(.5*e+6)))}function K(e,n){const t=n.weights;return[t.thin,t.extraLight,t.light,t.regular,t.medium,t.semibold,t.bold,t.extraBold,t.black][Math.min(8,Math.max(0,Math.round(e/100)-1))]}function U(e,n,t,s={}){const a=n.find(n=>n.value===e.font)?.label??e.font??"",i=void 0===e.size?s.autoSize?t.auto:"":t.px({n:e.size});return t.summary({font:a,size:i,weight:K(e.weight??400,t)})}var V=`conic-gradient(${[0,60,120,180,240,300,0].map(e=>p({h:e,s:1,v:1})).join(", ")})`;function Y({value:t,hex:s,colours:a,label:i,followsWord:l,anyWord:r,onChange:o,readOnly:d=!1}){const[c,u]=y(!1),m=b(null),f=b(null),h=x(),p=void 0!==t&&a.some(e=>e.key===t),k=void 0!==t&&!p;return w(()=>{if(!c)return;const e=m.current?.ownerDocument;if(!e)return;const n=e=>{m.current&&!m.current.contains(e.target)&&u(!1)};return e.addEventListener("click",n,!0),()=>e.removeEventListener("click",n,!0)},[c]),/* @__PURE__ */N("div",{ref:m,className:"es-ts-set","data-ts-setting":"color",children:[
2
+ /* @__PURE__ */N("div",{className:"es-ts-top",children:[
3
+ /* @__PURE__ */C("span",{className:"es-ts-sub",children:i}),
4
+ /* @__PURE__ */C("span",{className:"es-ts-colour-read",children:s?e(s):l})]}),
5
+ /* @__PURE__ */N("div",{className:"es-ts-swatches",role:"group","aria-label":i,children:[a.map(n=>/* @__PURE__ */C(v,{content:`${n.name} · ${e(n.value)}`,children:/* @__PURE__ */C(g,{color:n.value,size:"sm",className:"es-ts-swatch","aria-label":n.name,selected:t===n.key,disabled:d,onClick:()=>o(n.key)})},n.key)),
6
+ /* @__PURE__ */C(v,{content:r,children:/* @__PURE__ */C(g,{ref:f,color:V,size:"sm",className:"es-ts-swatch es-ts-swatch--any","aria-label":r,selected:k,"aria-expanded":c,"aria-controls":c?h:void 0,disabled:d,onClick:()=>u(e=>!e)})})]}),c?/* @__PURE__ */C(n,{id:h,value:s??"",onChange:e=>o(e),label:i,readOnly:d,onClose:()=>{u(!1),f.current?.focus()}}):null]})}function _({styles:e,onChange:n,fonts:t,colours:a=[],settings:i=O,auto:c=[],fallback:u,sample:m,openId:f,defaultOpenId:h=null,onOpenChange:p,onAdd:v,rowActions:g,onRemove:k,max:M=j,readOnly:A=!1}){const L=l("textStyles",s),F=x(),[W,E]=y(h),P=void 0!==f?f:W,R=e=>{void 0===f&&E(e),p?.(e)},K=new Set(c),V=z.filter(e=>i.includes(e)),Y=b(null),[_,G]=y(null);w(()=>{if(!_||!Y.current)return;const e=[...Y.current.querySelectorAll(".es-ts-item")].find(e=>e.dataset.tsId===_.id),n=e?e.querySelector(".es-ts-row"):Y.current.querySelector(`.es-ts-add[data-ts-kind="${_.kind}"]`);n?.focus(),G(null)},[_]);/* @__PURE__ */
7
+ return C("div",{className:"es-ts",ref:Y,children:$.map(s=>{const i=e.filter(e=>e.kind===s),l=`${F}-${s}`,c=!H(e,s,M),f=!A&&!c;/* @__PURE__ */
8
+ return N("section",{className:"es-ts-section","aria-labelledby":l,children:[
9
+ /* @__PURE__ */C("div",{className:"es-ts-group",id:l,children:L.groups[s]}),i.map(s=>{const i=P===s.id,l={...u?.(s)??{},...s.values},c=t.find(e=>e.value===l.font),f=`${F}-open-${s.id}`,h=g?.(s),p=null!=h&&!1!==h,v=Boolean(k)&&!A&&!B(s),y={fontFamily:c?.family,fontSize:`${q(l.size??16)}px`,fontWeight:l.weight,fontStyle:l.italic?"italic":void 0};/* @__PURE__ */
10
+ return N(S,{children:[
11
+ /* @__PURE__ */N("div",{className:"es-ts-item","data-ts-id":s.id,children:[
12
+ /* @__PURE__ */N("button",{type:"button",className:"es-ts-row","aria-expanded":i,"aria-controls":i?f:void 0,onClick:()=>R(i?null:s.id),children:[
13
+ /* @__PURE__ */C("span",{className:"es-ts-chev","aria-hidden":"true",children:/* @__PURE__ */C(o,{size:12})}),
14
+ /* @__PURE__ */C("span",{className:"es-ts-name",style:y,children:s.name}),
15
+ /* @__PURE__ */C("span",{className:"es-ts-meta",children:U(l,t,L,{autoSize:K.has("size")&&void 0===s.values.size})})]}),v||p?/* @__PURE__ */N("div",{className:"es-ts-actions",children:[v?r(L.remove,/* @__PURE__ */C("button",{type:"button",className:"es-ts-del","aria-label":L.removeNamed({name:s.name}),onClick:()=>(t=>{if(A||!k)return;const s=I(e,t.id,{name:L.styleName});if(!s)return;const a=e.filter(e=>e.kind===t.kind),i=a[a.indexOf(t)+1];P===t.id&&R(null),n(s.styles),k(s.removed),G({id:i?.id??null,kind:t.kind})})(s),children:/* @__PURE__ */C(d,{size:14,"aria-hidden":"true"})})):null,p?h:null]}):null]}),i?/* @__PURE__ */C("div",{className:"es-ts-open",id:f,children:/* @__PURE__ */C(Z,{style:s,values:l,fonts:t,colours:a,settings:V,autoSet:K,sample:m??L.sample,words:L,readOnly:A,set:t=>n(T(e,s.id,t))})}):null]},s.id)}),r(!A&&c?L.full({kind:s,max:M}):void 0,/* @__PURE__ */N("button",{type:"button",className:"es-ts-add","data-ts-kind":s,disabled:A,"aria-disabled":!(A||!c)||void 0,"aria-describedby":!A&&c?`${F}-full-${s}`:void 0,onClick:()=>{f&&(t=>{if(A)return;const s=D(e,t,{max:M,name:L.styleName,make:v});s&&n(s.styles)})(s)},children:[
16
+ /* @__PURE__ */C("span",{className:"es-ts-add-word",children:L.add[s]}),
17
+ /* @__PURE__ */C("span",{className:"es-ts-count",children:L.count({n:i.length,max:M})})]})),A||!c?null:/* @__PURE__ */C("span",{id:`${F}-full-${s}`,className:"es-vh",children:L.full({kind:s,max:M})})]},s)})})}var G={none:h,upper:f,lower:m},X={none:"none",upper:"uppercase",lower:"lowercase"};function Z({style:e,values:n,fonts:s,colours:a,settings:l,autoSet:o,sample:d,words:m,readOnly:f,set:h}){const p=e.values,v=s.find(e=>e.value===n.font),g=function(e,n){return e?n.find(n=>n.key===e)?.value??t(e)??void 0:void 0}(n.color,a),y=e=>"largestSize"===e||o.has(e),b=e=>y(e)?p[e]:n[e],x=b("size"),w=b("lineSpacing"),S=b("letterSpacing"),z=y("letterCase")?p.letterCase:n.letterCase,O={fontFamily:v?.family,fontSize:void 0===x?void 0:`${x}px`,fontWeight:n.weight,fontStyle:n.italic?"italic":void 0,lineHeight:void 0===w?void 0:String(w/100),letterSpacing:void 0===S?void 0:`${S}px`,color:g,textTransform:z?X[z]:void 0},$=e=>{const t=F[e],s=y(e);/* @__PURE__ */
18
+ return C("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */C(i,{label:m.settings[e],value:p[e],onChange:n=>h({[e]:n}),min:t.min,max:t.max,step:t.step,shiftStep:t.shiftStep,sliderMin:t.sliderMin,sliderMax:t.sliderMax,unit:t.unit||void 0,styleValue:s?void 0:n[e],auto:s?m.auto:void 0,readOnly:f})},e)};/* @__PURE__ */
19
+ return N(M,{children:[
20
+ /* @__PURE__ */C("div",{className:"es-ts-preview",style:O,"aria-label":m.preview,children:d}),l.map(t=>{switch(t){case"font":/* @__PURE__ */
21
+ return C(J,{value:p.font,fonts:s,words:m,readOnly:f,set:h},t);case"color":/* @__PURE__ */
22
+ return C(Q,{value:p.color,hex:g,colours:a,words:m,readOnly:f,set:h},t);case"emphasis":{const e=(n.weight??400)>=600,s=!1!==v?.italic;/* @__PURE__ */
23
+ return N("div",{className:"es-ts-set","data-ts-setting":t,children:[
24
+ /* @__PURE__ */C("span",{className:"es-ts-sub",children:m.settings.emphasis}),
25
+ /* @__PURE__ */N("div",{className:"es-ts-icons",children:[r(m.bold,/* @__PURE__ */C(k,{className:"es-ts-icon","aria-label":m.bold,"aria-pressed":e,disabled:f,onClick:()=>h({weight:e?400:700}),children:/* @__PURE__ */C(c,{size:16})})),f||s?r(m.italic,/* @__PURE__ */C(k,{className:"es-ts-icon","aria-label":m.italic,"aria-pressed":Boolean(n.italic),disabled:f,onClick:()=>h({italic:!n.italic||void 0}),children:/* @__PURE__ */C(u,{size:16})})):/* @__PURE__ */C(k,{className:"es-ts-icon","aria-label":m.italic,"aria-pressed":Boolean(n.italic),"aria-disabled":!0,disabledReason:m.italicMissing,children:/* @__PURE__ */C(u,{size:16})})]})]},t)}case"letterCase":/* @__PURE__ */
26
+ return C(ee,{value:p.letterCase??n.letterCase,auto:y("letterCase"),words:m,readOnly:f,set:h},t);case"largestSize":return"heading"===e.kind?$(t):null;default:return $(t)}})]})}function J({value:e,fonts:n,words:t,readOnly:s,set:i}){const l=x();/* @__PURE__ */
27
+ return N("div",{className:"es-ts-set","data-ts-setting":"font",children:[
28
+ /* @__PURE__ */C("span",{className:"es-ts-sub",id:l,children:t.settings.font}),
29
+ /* @__PURE__ */C(a,{value:e,options:n.map(e=>({label:e.label,value:e.value})),onChange:e=>i({font:e}),ariaLabelledBy:l,readOnly:s})]})}function Q({value:e,hex:n,colours:t,words:s,readOnly:a,set:i}){/* @__PURE__ */
30
+ return C(Y,{value:e,hex:n,colours:t,label:s.settings.color,followsWord:s.colour.follows,anyWord:s.colour.any,readOnly:a,onChange:e=>i({color:e})})}function ee({value:e,auto:n,words:t,readOnly:s,set:a}){const i=n?["auto","none","upper","lower"]:["none","upper","lower"],l=e??(n?"auto":"none"),o=b([]),d=e=>a({letterCase:"auto"===e?void 0:e});/* @__PURE__ */
31
+ return N("div",{className:"es-ts-set","data-ts-setting":"letterCase",children:[
32
+ /* @__PURE__ */C("span",{className:"es-ts-sub",children:t.settings.letterCase}),
33
+ /* @__PURE__ */C("div",{className:"es-ts-icons",role:"radiogroup","aria-label":t.settings.letterCase,onKeyDown:e=>{const n="ArrowRight"===e.key||"ArrowDown"===e.key?1:"ArrowLeft"===e.key||"ArrowUp"===e.key?-1:0;if(!n||s)return;e.preventDefault();const t=(i.indexOf(l)+n+i.length)%i.length;d(i[t]),o.current[t]?.focus()},children:i.map((e,n)=>{const a=e===l;if("auto"===e)return r(t.case.autoTitle,/* @__PURE__ */C(k,{ref:e=>{o.current[n]=e},role:"radio",pressed:a,className:"es-ts-icon es-ts-icon--word","aria-checked":a,"aria-label":t.case.auto,tabIndex:a?0:-1,disabled:s,onClick:()=>d(e),children:t.case.auto},e));const i=G[e];return r(t.case[e],/* @__PURE__ */C(k,{ref:e=>{o.current[n]=e},role:"radio",pressed:a,className:"es-ts-icon","aria-checked":a,"aria-label":t.case[e],tabIndex:a?0:-1,disabled:s,onClick:()=>d(e),children:/* @__PURE__ */C(i,{size:16})},e))})})]})}export{O as CAMPAIGN_TEXT_STYLE_SETTINGS,Y as ColourSwatchRow,A as TEXT_STYLE_DEFAULT_COUNT,$ as TEXT_STYLE_KINDS,j as TEXT_STYLE_MAX,F as TEXT_STYLE_RANGES,z as TEXT_STYLE_SETTINGS,_ as TextStylesList,D as addTextStyle,H as canAddTextStyle,E as defaultTextStyles,U as describeTextStyle,B as isDefaultTextStyle,I as removeTextStyle,R as resolveTextStyle,q as textStyleRowSize,T as updateTextStyle,K as weightWord};
@@ -234,9 +234,9 @@
234
234
  flex-wrap: wrap;
235
235
  gap: var(--es-space-2, 2px);
236
236
  }
237
- /* An icon is efficient-shell's IconButton look (harness UI-24): a toggle its
238
- `IconButton`, lit from `aria-pressed`; a case radio the same look from
239
- `iconButtonClasses({ pressed })`. What stays is the word button's width. */
237
+ /* An icon is efficient-shell's IconButton (harness UI-24): a toggle lit from
238
+ `aria-pressed`, a case radio from `pressed` (it says `aria-checked`). What
239
+ stays is the word button's width. */
240
240
  .es-ts-icon--word {
241
241
  width: auto;
242
242
  padding: 0 var(--es-space-8, 8px);
@@ -1 +1 @@
1
- export{LayersTree,Subtree,TREE_DRAG_HINT,TreeEmptySlot,TreeGroupLabel,TreeRow,TreeRowAction,TreeSeam}from"../chunk-XWR5YVA7.js";import"../chunk-K56YDHYQ.js";
1
+ export{LayersTree,Subtree,TREE_DRAG_HINT,TreeEmptySlot,TreeGroupLabel,TreeRow,TreeRowAction,TreeSeam}from"../chunk-UFY6RNMT.js";import"../chunk-K56YDHYQ.js";
@@ -8,10 +8,13 @@
8
8
  *
9
9
  * · the scroll box round the tree (the shell's `Tree` does not scroll);
10
10
  * · the lift of a row at the instant the browser takes its drag picture;
11
- * · the size of the marks a row carries after its name, and the rename box.
11
+ * · the size of the marks a row carries after its name, and the rename box;
12
+ * · the ground the row actions' scrim is painted over (`--rosh-tree-ground`).
12
13
  *
13
14
  * The seam, and a draggable row's grip, hint and cursor, are the shell's since
14
- * efficient-shell 4.165.0 (`TreeSeam`; `TreeRow`'s `draggable` / `dragHint`).
15
+ * efficient-shell 4.165.0 (`TreeSeam`; `TreeRow`'s `draggable` / `dragHint`);
16
+ * the row actions laid over the end of the name, and a row action that is off
17
+ * with a reason, since 4.166.0.
15
18
  *
16
19
  * Shell tokens only (`--es-*` resolve to them, `--spacing` is the shell's step).
17
20
  */
@@ -22,6 +25,10 @@
22
25
  /* LEFT 8 — the inset a rounded row needs. RIGHT 12 — the room a real,
23
26
  space-taking scrollbar takes, so nothing at a row's end sits under the thumb. */
24
27
  padding: 0 12px 12px 8px;
28
+ /* The row actions lie over the end of the name on a scrim of the row's own
29
+ tone over the PANEL's ground (efficient-shell 4.166.0). The shell assumes
30
+ `--surface`; the tree sits on easel's panel, so it says which. */
31
+ --rosh-tree-ground: var(--es-panel);
25
32
  }
26
33
 
27
34
  /* On for the instant the browser takes the drag picture: the row that follows
@@ -57,11 +64,3 @@
57
64
  color: inherit;
58
65
  outline: none;
59
66
  }
60
-
61
- /* A row action off WITH A REASON (`aria-disabled`, so the keyboard reaches it
62
- and its Tooltip says why): the shell IconButton's own disabled fade, which
63
- only `:disabled` draws. SHELL GAP: the kit has no focusable-disabled look. */
64
- .es-tree-act-off {
65
- opacity: 0.6;
66
- cursor: not-allowed;
67
- }
@@ -35,8 +35,12 @@ interface FieldNumberProps extends ControlBase {
35
35
  icon?: ReactNode;
36
36
  /** Shown after the number, inside the cell, e.g. `px`. */
37
37
  unit?: string;
38
- /** Two small stacked arrows at the cell's end. */
39
- steppers?: boolean;
38
+ /**
39
+ * The shell's arrows at the box's end: `true` the side-by-side pair,
40
+ * `'compact'` the two stacked in one 16px column, for a narrow cell
41
+ * (efficient-shell 4.166.0).
42
+ */
43
+ steppers?: boolean | 'compact';
40
44
  placeholder?: string;
41
45
  /** The cell's tooltip — the text box's cells say their name and step here
42
46
  * (E5b), since the cell draws no name. */