efficient-easel 0.105.1 → 1.0.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 (184) hide show
  1. package/README.md +103 -29
  2. package/dist/{LinkPicker-W2Rtxetz.d.ts → LinkPicker-hPEr1MJx.d.ts} +6 -4
  3. package/dist/autosave/index.d.ts +5 -5
  4. package/dist/chrome/chrome.css +50 -273
  5. package/dist/chrome/index.d.ts +61 -56
  6. package/dist/chrome/index.js +1 -1
  7. package/dist/chunk-2GVCAIPX.js +1 -0
  8. package/dist/chunk-4GNPKHV4.js +64 -0
  9. package/dist/chunk-5545A3PC.js +4 -0
  10. package/dist/chunk-7SQF6LZL.js +1 -0
  11. package/dist/chunk-BXMXTO36.js +1 -0
  12. package/dist/{chunk-NYKIQJT2.js → chunk-CKEPQNSQ.js} +1 -1
  13. package/dist/chunk-DJMMTWFP.js +1 -0
  14. package/dist/{chunk-PQXIFBDY.js → chunk-E2O2MRZR.js} +1 -1
  15. package/dist/chunk-EA2HTX37.js +5 -0
  16. package/dist/{chunk-SARZN4M7.js → chunk-FEK3S6HN.js} +1 -1
  17. package/dist/chunk-FPAVNX3Y.js +6 -0
  18. package/dist/chunk-HMJS344F.js +1 -0
  19. package/dist/chunk-JLTZQ4US.js +1 -0
  20. package/dist/chunk-JMGPPXNQ.js +24 -0
  21. package/dist/chunk-K56YDHYQ.js +1 -0
  22. package/dist/chunk-LOMEH6DG.js +1 -0
  23. package/dist/{chunk-V4LF7D4F.js → chunk-MAEXP3KE.js} +1 -1
  24. package/dist/chunk-MJM6SFD3.js +3 -0
  25. package/dist/chunk-NLRW4BGG.js +8 -0
  26. package/dist/chunk-OJAJVH7S.js +5 -0
  27. package/dist/chunk-ONRYLR2D.js +2 -0
  28. package/dist/chunk-ORR3Q4WV.js +1 -0
  29. package/dist/chunk-OTEXGJDU.js +5 -0
  30. package/dist/chunk-P2VEMZH5.js +1 -0
  31. package/dist/chunk-PT6V53OO.js +1 -0
  32. package/dist/chunk-PYCLHOSA.js +9 -0
  33. package/dist/chunk-Q27BB5ZC.js +14 -0
  34. package/dist/chunk-QLD57GBB.js +6 -0
  35. package/dist/{chunk-NWIW7AWH.js → chunk-QMNML7XH.js} +1 -1
  36. package/dist/chunk-QR4DLZ3P.js +5 -0
  37. package/dist/chunk-TJ7YIRWQ.js +21 -0
  38. package/dist/{chunk-3P6AMTOS.js → chunk-VPFNZ7TB.js} +1 -1
  39. package/dist/chunk-W3XX2CNW.js +16 -0
  40. package/dist/chunk-X6DQWK2C.js +1 -0
  41. package/dist/chunk-XWR5YVA7.js +9 -0
  42. package/dist/chunk-YABL4EWX.js +7 -0
  43. package/dist/chunk-ZNNATBDC.js +1 -0
  44. package/dist/chunk-ZP4G3X44.js +4 -0
  45. package/dist/copy/copy.css +66 -177
  46. package/dist/copy/index.d.ts +0 -2
  47. package/dist/copy/index.js +31 -32
  48. package/dist/drag/drag.css +31 -11
  49. package/dist/drag/index.d.ts +10 -0
  50. package/dist/drag/index.js +1 -1
  51. package/dist/easel/index.d.ts +10 -1
  52. package/dist/easel/index.js +1 -1
  53. package/dist/fields/fields.css +35 -304
  54. package/dist/fields/index.d.ts +87 -95
  55. package/dist/fields/index.js +1 -1
  56. package/dist/gold/gold.css +3 -3
  57. package/dist/gold/index.d.ts +6 -5
  58. package/dist/gold/index.js +1 -1
  59. package/dist/{host-BQ_b9Qzk.d.ts → host-CiuzZJXj.d.ts} +11 -1
  60. package/dist/index.d.ts +3 -3
  61. package/dist/index.js +1 -1
  62. package/dist/menu/index.d.ts +49 -93
  63. package/dist/menu/index.js +1 -1
  64. package/dist/menu/menu.css +37 -246
  65. package/dist/node-ops/index.d.ts +1 -1
  66. package/dist/panel/index.d.ts +46 -72
  67. package/dist/panel/index.js +17 -18
  68. package/dist/panel/panel.css +143 -372
  69. package/dist/pick/index.d.ts +52 -33
  70. package/dist/pick/index.js +7 -7
  71. package/dist/pick/pick.css +19 -150
  72. package/dist/rail/index.d.ts +48 -90
  73. package/dist/rail/index.js +1 -1
  74. package/dist/rail/rail.css +21 -108
  75. package/dist/screen/components/AddBlockRow.d.ts +8 -2
  76. package/dist/screen/components/AddBlockRow.js +1 -1
  77. package/dist/screen/components/AddChildRow.d.ts +4 -3
  78. package/dist/screen/components/AddChildRow.js +1 -1
  79. package/dist/screen/components/AddSidePanel.js +1 -1
  80. package/dist/screen/components/MediaSidePanel.d.ts +2 -2
  81. package/dist/screen/components/MediaSidePanel.js +1 -1
  82. package/dist/screen/components/NodeContextMenu.d.ts +31 -9
  83. package/dist/screen/components/NodeContextMenu.js +1 -1
  84. package/dist/screen/components/PageEditGuardNotices.js +1 -1
  85. package/dist/screen/components/ScreenChrome.js +1 -1
  86. package/dist/screen/components/ScreenDocumentContext.d.ts +2 -2
  87. package/dist/screen/components/ScreenDocumentContext.js +1 -1
  88. package/dist/screen/components/ScreenMount.d.ts +8 -8
  89. package/dist/screen/components/ScreenMount.js +1 -1
  90. package/dist/screen/components/ScreenStoreProvider.d.ts +8 -8
  91. package/dist/screen/components/ScreenStoreProvider.js +1 -1
  92. package/dist/screen/components/SectionScreenShell.js +16 -16
  93. package/dist/screen/components/SidePanelHead.d.ts +4 -2
  94. package/dist/screen/components/SidePanelHead.js +1 -1
  95. package/dist/screen/components/UiIcon.d.ts +10 -26
  96. package/dist/screen/components/UiIcon.js +2 -1
  97. package/dist/screen/components/panel-widths.d.ts +15 -1
  98. package/dist/screen/components/panel-widths.js +1 -1
  99. package/dist/screen/components/usePartBridge.d.ts +8 -8
  100. package/dist/screen/components/usePartBridge.js +1 -1
  101. package/dist/screen/index.d.ts +9 -9
  102. package/dist/screen/index.js +1 -1
  103. package/dist/screen/lib/admin-bridge.d.ts +1 -1
  104. package/dist/screen/lib/admin-bridge.js +1 -1
  105. package/dist/screen/lib/chrome-theme.d.ts +20 -12
  106. package/dist/screen/lib/chrome-theme.js +1 -1
  107. package/dist/screen/lib/document-addressing.d.ts +2 -2
  108. package/dist/screen/lib/host-chrome.d.ts +1 -1
  109. package/dist/screen/lib/host.d.ts +2 -2
  110. package/dist/screen/lib/key-scope.d.ts +31 -2
  111. package/dist/screen/lib/key-scope.js +1 -1
  112. package/dist/screen/lib/links/link-filters.d.ts +1 -1
  113. package/dist/screen/lib/media-panel.d.ts +2 -2
  114. package/dist/screen/lib/media-picker.d.ts +2 -2
  115. package/dist/screen/lib/page-lock.d.ts +1 -1
  116. package/dist/screen/lib/puck/section-doc.d.ts +5 -1
  117. package/dist/screen/lib/puck/section-doc.js +1 -1
  118. package/dist/screen/lib/puck/style-clipboard.d.ts +8 -8
  119. package/dist/screen/lib/puck/use-section-ops.js +1 -1
  120. package/dist/screen/lib/screen-parts.d.ts +47 -10
  121. package/dist/screen/lib/screen-parts.js +1 -1
  122. package/dist/screen/lib/section-templates.d.ts +1 -1
  123. package/dist/screen/lib/session-context.d.ts +1 -1
  124. package/dist/screen/lib/session.d.ts +1 -1
  125. package/dist/screen/screen.css +54 -206
  126. package/dist/screen/words.d.ts +17 -1
  127. package/dist/screen/words.js +1 -1
  128. package/dist/shell/index.d.ts +134 -118
  129. package/dist/shell/index.js +1 -1
  130. package/dist/shell/shell.css +130 -88
  131. package/dist/strings/catalogue.d.ts +5 -5
  132. package/dist/strings/catalogue.js +1 -1
  133. package/dist/strings/index.d.ts +5 -5
  134. package/dist/strings/index.js +1 -1
  135. package/dist/style-clipboard/index.d.ts +1 -1
  136. package/dist/text-styles/index.d.ts +12 -3
  137. package/dist/text-styles/index.js +33 -38
  138. package/dist/text-styles/text-styles.css +39 -71
  139. package/dist/tree/index.d.ts +49 -44
  140. package/dist/tree/index.js +1 -1
  141. package/dist/tree/tree.css +31 -653
  142. package/dist/{types-DJDBtdB2.d.ts → types-BqGnUVX5.d.ts} +32 -32
  143. package/dist/types-BsyPh6EW.d.ts +99 -0
  144. package/dist/{types-DWS-s9z-.d.ts → types-CsgMwHHa.d.ts} +14 -11
  145. package/dist/{types-CqY85foL.d.ts → types-Dt1CFR1S.d.ts} +4 -2
  146. package/dist/{wordFit-D4S36PvB.d.ts → wordFit-7XpmhcaW.d.ts} +3 -5
  147. package/dist/words-Cl9xMUYY.d.ts +41 -0
  148. package/dist/{words-D_Lnw1Gr.d.ts → words-CvFnwGSr.d.ts} +1 -1
  149. package/package.json +5 -1
  150. package/dist/chunk-2UX75JDP.js +0 -1
  151. package/dist/chunk-3EDSDPIP.js +0 -1
  152. package/dist/chunk-3QVB4AG2.js +0 -3
  153. package/dist/chunk-3WSPDAK2.js +0 -1
  154. package/dist/chunk-53G47SWO.js +0 -1
  155. package/dist/chunk-5MZ3RNQQ.js +0 -13
  156. package/dist/chunk-5ZBBXZPV.js +0 -6
  157. package/dist/chunk-7FBDZTUD.js +0 -2
  158. package/dist/chunk-7V5WZ46F.js +0 -2
  159. package/dist/chunk-BXZ6WLHC.js +0 -22
  160. package/dist/chunk-BZ5ASXOL.js +0 -1
  161. package/dist/chunk-EOJNJCMJ.js +0 -16
  162. package/dist/chunk-EWVJSRRY.js +0 -6
  163. package/dist/chunk-FMGFZNPW.js +0 -1
  164. package/dist/chunk-H24N5TMZ.js +0 -11
  165. package/dist/chunk-HLEET6NV.js +0 -65
  166. package/dist/chunk-IE4GFYKO.js +0 -1
  167. package/dist/chunk-KTVH2ZRL.js +0 -15
  168. package/dist/chunk-N7VRF7PR.js +0 -5
  169. package/dist/chunk-OWBO4WKA.js +0 -0
  170. package/dist/chunk-P67FP7PG.js +0 -9
  171. package/dist/chunk-P6O363EE.js +0 -6
  172. package/dist/chunk-Q4N7C6CT.js +0 -10
  173. package/dist/chunk-QH6LCNOX.js +0 -8
  174. package/dist/chunk-RW4XBUUW.js +0 -1
  175. package/dist/chunk-TTJ54QGG.js +0 -18
  176. package/dist/chunk-VSHV6KJQ.js +0 -5
  177. package/dist/chunk-VSOP4GUM.js +0 -1
  178. package/dist/chunk-WZ7TGAAT.js +0 -3
  179. package/dist/chunk-YC4TB3CJ.js +0 -25
  180. package/dist/chunk-ZFDCDJNZ.js +0 -16
  181. package/dist/chunk-ZNS7727Y.js +0 -12
  182. package/dist/chunk-ZTTWFAAC.js +0 -1
  183. package/dist/types-Djdq6Xkd.d.ts +0 -138
  184. package/dist/words-DgHcY5qB.d.ts +0 -33
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { W as WordFit } from '../wordFit-D4S36PvB.js';
3
+ import { W as WordFit } from '../wordFit-7XpmhcaW.js';
4
4
  import { P as PanelWords } from '../words-BGrHZAJJ.js';
5
5
  export { a as SETTINGS_BUCKETS, S as SettingsBucket } from '../buckets-CuLM47h9.js';
6
6
 
@@ -21,11 +21,12 @@ interface SettingsTabItem {
21
21
  *
22
22
  * Required, and a plain string, on purpose. Give the tab an `icon` and a
23
23
  * narrow panel takes this word off the screen, but never out of the tab: it
24
- * stays in the markup and it is carried as `title` and `aria-label` on the
25
- * button at every width. An icon-only control with no name is the exact
26
- * defect card 8801 shipped and had to have caught in review, and a separate
27
- * optional `ariaLabel` prop is how that happens again. Here it cannot — the
28
- * name is the field the tab has always had, and it is not optional.
24
+ * stays in the markup (clipped, never `display: none`) as the tab's
25
+ * accessible name at every width, and the shell's `Tooltip` says it on
26
+ * hover. An icon-only control with no name is the exact defect card 8801
27
+ * shipped and had to have caught in review, and a separate optional
28
+ * `ariaLabel` prop is how that happens again. Here it cannot — the name is
29
+ * the field the tab has always had, and it is not optional.
29
30
  */
30
31
  label: string;
31
32
  /**
@@ -63,6 +64,12 @@ interface SettingsTabsProps {
63
64
  activeId: string;
64
65
  onSelect: (id: string) => void;
65
66
  ariaLabel?: string;
67
+ /**
68
+ * Wires each tab to its panel, the shell's way: tab `tabButtonId(prefix, id)`,
69
+ * `aria-controls` → `tabPanelId(prefix, id)` (both from efficient-shell/ui).
70
+ * The host gives the panel it shows that id and names it with the tab's.
71
+ */
72
+ idPrefix?: string;
66
73
  className?: string;
67
74
  }
68
75
  /**
@@ -676,66 +683,18 @@ type SettingsActionNote = {
676
683
  };
677
684
  type SettingsActionProps = SettingsActionBaseProps & SettingsActionNote;
678
685
 
679
- /**
680
- * The tab strip under the panel head.
681
- *
682
- * It replaces the old stack of fold headers a merchant had to open and hunt
683
- * through: the buckets a section actually has become tabs, in one fixed order,
684
- * so the panel keeps the same shape on every section. A section shows only the
685
- * tabs it has — pass three items and three tabs render.
686
- *
687
- * Controlled: the host decides `activeId`. No hooks, no browser globals.
688
- *
689
- * A tab can be WIRED to what it shows (`panelId` / `htmlId` on the item). That
690
- * is not decoration: `role="tab"` promises a panel, and a tab strip that names
691
- * none announces "tab, 1 of 4, selected" over nothing. The shell cannot supply
692
- * those ids — only the host knows the element the settings land in — but until
693
- * card 8802.d it could not ACCEPT them either, so no host could fix it. A tab
694
- * with nothing to point at renders no attribute at all; an empty
695
- * `aria-controls` is worse than a missing one, because it names an element
696
- * that does not exist instead of admitting there is none.
697
- *
698
- * A SEGMENTED CONTROL (card 66138). The strip is a grey track and the chosen
699
- * bucket is a raised white chip on it. Lewis, looking at a real panel: the tab
700
- * he is NOT on does not invite a click — it does not even look like a button.
701
- * The track is the answer to that, because it makes every segment look
702
- * pressable, where a mark under the chosen tab only ever made the chosen tab
703
- * louder. It replaces the underline strip and card 8811's tint ground; see the
704
- * long note on `.es-tab.is-active` in `panel.css`.
705
- *
706
- * A segment takes the width its OWN label needs and shares what is left over,
707
- * rather than every segment taking the width of the widest label. Equal
708
- * segments were measured and cost too much: three of them need a 267px track
709
- * and four need 355px, against the 281px the shop's default panel gives.
710
- *
711
- * THE WORD DROPS WHERE IT STOPS FITTING. Natural widths fit two and three
712
- * buckets across the whole panel-drag band; they do not fit four, where the
713
- * last segment ends 39px past the panel edge. So given an `icon`, a segment can
714
- * spend less width instead of more — the word goes and the glyph stays.
715
- *
716
- * Where that happens depends on HOW MANY buckets a section has, because with
717
- * natural widths the question is about the sum of the labels:
718
- *
719
- * two buckets both words, at every width the panel drags to.
720
- * three buckets words down to 240px, then glyph plus the chosen word.
721
- * four buckets glyph plus the chosen word under 320px; glyphs under 200px.
722
- *
723
- * Which state is a CSS decision, taken against the PANEL's width — see the
724
- * `@container` blocks in `panel.css`, and the wrapper below that gives them
725
- * something to measure. React cannot know the answer at render time, and it
726
- * does not need to: BOTH parts are always in the markup, and CSS shows the one
727
- * that fits. The word is only ever hidden, never dropped, and the label rides
728
- * along as `title` and `aria-label` on every tab in every state, so the glyph
729
- * never has to speak for the tab.
730
- *
731
- * A tab with no icon is untouched at every width — it has nothing to fall back
732
- * to, so it keeps its word.
733
- */
734
- declare function SettingsTabs({ items, activeId, onSelect, ariaLabel, className, }: SettingsTabsProps): react.JSX.Element;
686
+ declare function SettingsTabs({ items, activeId, onSelect, ariaLabel, idPrefix, className, }: SettingsTabsProps): react.JSX.Element;
735
687
 
736
688
  /**
737
689
  * A segmented control: one row of chips, one of them pressed.
738
690
  *
691
+ * THE SHELL'S `Segmented` (harness UI-24, efficient-easel#199 step 4): a
692
+ * button group (no `name`), its track, chips, pressed state and disabled look
693
+ * the kit's. What stays here is what the shell's has no prop for: a value of
694
+ * any type (the options are keyed by position), the word that drops where it
695
+ * stops fitting (below), and a name for a glyph — the shell's `Tooltip` around
696
+ * it, never a `title`.
697
+ *
739
698
  * THE SAME CHIP AS `SettingsTabs`, AND A DIFFERENT PROMISE. Everything a
740
699
  * merchant sees is shared — the grey track, the raised white chip for the one
741
700
  * he is on, the glyph drawn at every width, the word that drops where it stops
@@ -919,11 +878,11 @@ declare function SettingsField({ label, labelId, icon, value, hint, changed, htm
919
878
  * had to learn the control twice. Both now import this file, which is the only
920
879
  * thing that stops them drifting apart again.
921
880
  *
922
- * It is a real <button>, and that is the whole keyboard story: a button is
923
- * activated by Space and by Enter in every browser, and that activation IS a
924
- * click — so the one `onClick` below serves mouse and keyboard alike. A div
925
- * wearing `role="switch"` would need a key handler of our own. Do not add one.
926
- * `type="button"` keeps it from submitting a form it happens to sit in.
881
+ * IT IS THE SHELL'S `Switch` (harness UI-24, efficient-easel#199 step 4): a
882
+ * real `<button role="switch">`, so Space and Enter are a click with no key
883
+ * handler of ours, and its look is the kit's, in both themes. This name stays
884
+ * because both editors' hosts import it, and `SettingsField` recognises it in
885
+ * its `action` slot; nothing here draws a switch any more.
927
886
  *
928
887
  * It cannot exist without a NAME. `SettingsSwitchProps` demands `ariaLabel` or
929
888
  * `ariaLabelledBy` and forbids both at once, so an unnamed switch — which a
@@ -933,12 +892,13 @@ declare function SettingsField({ label, labelId, icon, value, hint, changed, htm
933
892
  * ONE-WAY DEPENDENCY. `SettingsField` imports this module so it can recognise a
934
893
  * switch in its `action` slot and hand it the field's label as a name. This
935
894
  * module must NEVER import `SettingsField` back — that would close a cycle
936
- * between two siblings in the same folder. It imports `./types` and nothing
937
- * else, and `tests/settings-switch.test.tsx` (o) keeps it that way.
895
+ * between two siblings in the same folder. It imports `./types` and the
896
+ * shell's kit, nothing else, and `tests/settings-switch.test.tsx` (o) keeps it
897
+ * that way.
938
898
  *
939
- * CONTROLLED and hook-free like the other three: `checked` comes from the host
940
- * and the switch only ever ASKS to be flipped. That is what keeps this module a
941
- * directive-free leaf a Next-16 server component can import.
899
+ * CONTROLLED: `checked` comes from the host and the switch only ever ASKS to
900
+ * be flipped. Hook-free and directive-free here; the shell's kit entry is a
901
+ * client boundary, so a Next-16 server component can still import this.
942
902
  */
943
903
  declare function SettingsSwitch({ checked, onChange, disabled, id, ariaLabel, ariaLabelledBy, className, }: SettingsSwitchProps): react.JSX.Element;
944
904
 
@@ -1053,6 +1013,13 @@ declare function SettingsDrill({ name, preview, offPage, status, onOpen, id, cla
1053
1013
  * or a grid anchor is the host's business, and keeping it that way is what lets
1054
1014
  * one control answer both questions.
1055
1015
  *
1016
+ * ── AN EDITOR'S COMPOSITE, OF THE SHELL'S PARTS (UI-24 §2) ─────────────────
1017
+ *
1018
+ * The shell has a `RadioGroup` of labelled rows and no grid of positions, so
1019
+ * this picture of nine squares stays the editor's — but every cell is the
1020
+ * shell's `IconButton` (a `role="radio"`), its name the shell's `Tooltip`,
1021
+ * and the sheet draws only the picture: the track, the dot, the chosen cell.
1022
+ *
1056
1023
  * Controlled and hook-free, like every primitive here, so a Next server
1057
1024
  * component can import this module.
1058
1025
  */
@@ -1106,6 +1073,13 @@ declare function SettingsPlacement({ label, value, points, onChange, id, classNa
1106
1073
  * grid requires its value already resolved. A control that invented the default
1107
1074
  * would be answering a question only the host can answer.
1108
1075
  *
1076
+ * ── AN EDITOR'S COMPOSITE, OF THE SHELL'S PARTS (UI-24 §2) ─────────────────
1077
+ *
1078
+ * The shell's `Segmented` answers ONE of a set, and it has no set of toggles,
1079
+ * so the four corners stay the editor's picture — but every cell is the
1080
+ * shell's `IconButton` (`aria-pressed`), its name the shell's `Tooltip`, and
1081
+ * the sheet draws only the picture: the track, the frame and the marks.
1082
+ *
1109
1083
  * Controlled and hook-free, like every primitive here, so a Next server
1110
1084
  * component can import this module.
1111
1085
  */
@@ -1,18 +1,17 @@
1
- export{SETTINGS_BUCKETS,SettingsField,SettingsGroup,SettingsTabs}from"../chunk-ZNS7727Y.js";import{DEFAULT_PANEL_WORDS as e}from"../chunk-QTLAVDJE.js";export{SettingsSegmented,SettingsSwitch}from"../chunk-P6O363EE.js";import"../chunk-BZ5ASXOL.js";import{RevertIcon as a}from"../chunk-L5KW4HG5.js";import{jsx as l,jsxs as s}from"react/jsx-runtime";function n({title:e,level:a=3,id:s,className:n}){/* @__PURE__ */
2
- return l(`h${a}`,{id:s,className:n?`es-group-head ${n}`:"es-group-head",children:e})}function i({title:e,level:a=4,id:s,className:n}){/* @__PURE__ */
3
- return l(`h${a}`,{id:s,className:n?`es-group-sub ${n}`:"es-group-sub",children:e})}function t({label:s,changed:n,onReset:i,detail:t,disabled:d,defaultAction:u,words:p,className:m}){const b={...e,...p},h=["es-default-reset"];if(n&&h.push("is-changed"),m&&h.push(m),!n&&u)return h.push("is-pressable"),/* @__PURE__ */l("button",{type:"button",className:h.join(" "),"aria-label":u.title,title:u.title,disabled:d,onClick:u.onPress,children:u.icon});if(!n)/* @__PURE__ */
4
- return l("span",{className:h.join(" "),"aria-hidden":"true"});const N=b.resetName({label:s});/* @__PURE__ */
5
- return l("button",{type:"button",className:h.join(" "),"aria-label":N,"aria-description":t||void 0,title:t?b.resetTitle({label:s,detail:t}):N,disabled:d,onClick:e=>{i(),function(e){const a=e.currentTarget,l=a.closest(".es-field");let s=l?.querySelector(o(".es-field-ctl"))??l?.querySelector(o(".es-field-head"))??null,n=l?null:a.parentElement;for(let e=0;!s&&n&&e<c;e+=1,n=n.parentElement)s=[...n.querySelectorAll(r)].find(e=>e!==a)??null;s?.focus()}(e)},children:/* @__PURE__ */l(a,{size:15})})}var r=['input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled]):not(.es-default-reset)",'[tabindex]:not([tabindex="-1"])'].join(", "),o=e=>r.split(", ").map(a=>`${e} ${a}`).join(", "),c=4;function d({name:e,preview:a,offPage:n,status:i,onOpen:t,id:r,className:o}){const c=null!=a;/* @__PURE__ */
6
- return s("button",{type:"button",id:r,className:o?`es-drill ${o}`:"es-drill",onClick:t,children:[
7
- /* @__PURE__ */s("span",{className:"es-drill-text",children:[
8
- /* @__PURE__ */l("span",{className:"es-drill-name",children:e}),c?/* @__PURE__ */l("span",{className:n?"es-drill-preview is-offpage":"es-drill-preview",children:a}):null]}),i?/* @__PURE__ */l("span",{className:"es-drill-status",children:i}):null,
9
- /* @__PURE__ */l("span",{className:"es-drill-chev","aria-hidden":"true"})]})}function u({label:e,value:a,points:s,onChange:n,id:i,className:t}){/* @__PURE__ */
10
- return l("div",{id:i,className:"es-placement"+(t?` ${t}`:""),role:"radiogroup","aria-label":e,children:s.map(e=>{const s=a===e.value,i=!0===e.disabled;/* @__PURE__ */
11
- return l("button",{type:"button",role:"radio","aria-checked":s,"aria-label":e.label,"aria-disabled":i||void 0,disabled:i,title:e.title??e.label,className:`es-placement-cell${s?" is-active":""}${i?" is-off":""}`,onClick:()=>n(e.value),children:e.icon?/* @__PURE__ */l("span",{className:"es-placement-icon","aria-hidden":"true",children:e.icon}):/* @__PURE__ */l("span",{className:"es-placement-dot"})},e.value)})})}function p({label:e,value:a,corners:n,onChange:i,id:t,className:r}){/* @__PURE__ */
12
- return s("div",{id:t,className:"es-corners"+(r?` ${r}`:""),role:"group","aria-label":e,children:[
13
- /* @__PURE__ */l("span",{className:"es-corners-frame","aria-hidden":"true"}),n.map(e=>{const s=a.includes(e.value),n=!0===e.disabled;/* @__PURE__ */
14
- return l("button",{type:"button","aria-pressed":s,"aria-label":e.label,"aria-disabled":n||void 0,disabled:n,title:e.title??e.label,className:`es-corners-cell es-corners-${e.value}${s?" is-on":""}${n?" is-off":""}`,onClick:()=>i(s?a.filter(a=>a!==e.value):[...a,e.value]),children:/* @__PURE__ */l("span",{className:"es-corners-mark","aria-hidden":"true"})},e.value)})]})}function m({label:e,onPress:a,disabled:n,note:i,done:t,doneLabel:r,icon:o,id:c,className:d}){const u=void 0===r?e:r,p=t?u:e,m=null!=i,b=m&&c?`${c}-note`:void 0;/* @__PURE__ */
15
- return s("div",{className:d?`es-action-wrap ${d}`:"es-action-wrap",children:[
16
- /* @__PURE__ */s("button",{type:"button",id:c,className:t?"es-action is-done":"es-action",disabled:n,"aria-describedby":b,onClick:a,children:[o?/* @__PURE__ */l("span",{className:"es-action-icon","aria-hidden":"true",children:o}):null,
17
- /* @__PURE__ */l("span",{className:"es-action-label",children:p})]}),m?/* @__PURE__ */l("p",{id:b,className:"es-action-note",children:i}):null,
18
- /* @__PURE__ */l("span",{className:"es-action-live",role:"status","aria-live":"polite",children:t?u:null})]})}export{m as SettingsAction,p as SettingsCorners,t as SettingsDefaultReset,d as SettingsDrill,n as SettingsGroupHead,i as SettingsGroupSub,u as SettingsPlacement};
1
+ export{SETTINGS_BUCKETS,SettingsField,SettingsGroup,SettingsTabs}from"../chunk-Q27BB5ZC.js";import{DEFAULT_PANEL_WORDS as e}from"../chunk-QTLAVDJE.js";export{SettingsSegmented,SettingsSwitch}from"../chunk-QLD57GBB.js";import{withTip as a}from"../chunk-P2VEMZH5.js";import{RevertIcon as l}from"../chunk-L5KW4HG5.js";import{jsx as s,jsxs as i}from"react/jsx-runtime";import{Tooltip as n,IconButton as t}from"efficient-shell/ui";function r({title:e,level:a=3,id:l,className:i}){/* @__PURE__ */
2
+ return s(`h${a}`,{id:l,className:i?`es-group-head ${i}`:"es-group-head",children:e})}function c({title:e,level:a=4,id:l,className:i}){/* @__PURE__ */
3
+ return s(`h${a}`,{id:l,className:i?`es-group-sub ${i}`:"es-group-sub",children:e})}function d({label:i,changed:n,onReset:t,detail:r,disabled:c,defaultAction:d,words:p,className:h}){const b={...e,...p},f=["es-default-reset"];if(n&&f.push("is-changed"),h&&f.push(h),!n&&d)return f.push("is-pressable"),a(d.title,/* @__PURE__ */s("button",{type:"button",className:f.join(" "),"aria-label":d.title,disabled:c,onClick:d.onPress,children:d.icon}));if(!n)/* @__PURE__ */
4
+ return s("span",{className:f.join(" "),"aria-hidden":"true"});const v=b.resetName({label:i});return a(r?b.resetTitle({label:i,detail:r}):v,/* @__PURE__ */s("button",{type:"button",className:f.join(" "),"aria-label":v,"aria-description":r||void 0,disabled:c,onClick:e=>{t(),function(e){const a=e.currentTarget,l=a.closest(".es-field");let s=l?.querySelector(u(".es-field-ctl"))??l?.querySelector(u(".es-field-head"))??null,i=l?null:a.parentElement;for(let e=0;!s&&i&&e<m;e+=1,i=i.parentElement)s=[...i.querySelectorAll(o)].find(e=>e!==a)??null;s?.focus()}(e)},children:/* @__PURE__ */s(l,{size:15})}))}var o=['input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled]):not(.es-default-reset)",'[tabindex]:not([tabindex="-1"])'].join(", "),u=e=>o.split(", ").map(a=>`${e} ${a}`).join(", "),m=4;function p({name:e,preview:a,offPage:l,status:n,onOpen:t,id:r,className:c}){const d=null!=a;/* @__PURE__ */
5
+ return i("button",{type:"button",id:r,className:c?`es-drill ${c}`:"es-drill",onClick:t,children:[
6
+ /* @__PURE__ */i("span",{className:"es-drill-text",children:[
7
+ /* @__PURE__ */s("span",{className:"es-drill-name",children:e}),d?/* @__PURE__ */s("span",{className:l?"es-drill-preview is-offpage":"es-drill-preview",children:a}):null]}),n?/* @__PURE__ */s("span",{className:"es-drill-status",children:n}):null,
8
+ /* @__PURE__ */s("span",{className:"es-drill-chev","aria-hidden":"true"})]})}function h({label:e,value:a,points:l,onChange:r,id:c,className:d}){const o=c??`es-placement-${e.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`;/* @__PURE__ */
9
+ return i("div",{id:c,className:"es-placement"+(d?` ${d}`:""),role:"radiogroup","aria-label":e,children:[l.map(e=>{const l=a===e.value,i=!0===e.disabled,c=i&&e.title?`${o}-${e.value}-why`:void 0;/* @__PURE__ */
10
+ return s(n,{content:e.title??e.label,children:/* @__PURE__ */s(t,{size:"sm",role:"radio","aria-checked":l,"aria-label":e.label,"aria-disabled":i||void 0,"aria-describedby":c,className:`es-placement-cell${l?" is-active":""}${i?" is-off":""}`,onClick:()=>{i||r(e.value)},children:e.icon?/* @__PURE__ */s("span",{className:"es-placement-icon","aria-hidden":"true",children:e.icon}):/* @__PURE__ */s("span",{className:"es-placement-dot"})})},e.value)}),l.map(e=>!0===e.disabled&&e.title?/* @__PURE__ */s("span",{id:`${o}-${e.value}-why`,className:"es-vh",children:e.title},`${e.value}-why`):null)]})}function b({label:e,value:a,corners:l,onChange:r,id:c,className:d}){const o=c??`es-corners-${e.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`;/* @__PURE__ */
11
+ return i("div",{id:c,className:"es-corners"+(d?` ${d}`:""),role:"group","aria-label":e,children:[
12
+ /* @__PURE__ */s("span",{className:"es-corners-frame","aria-hidden":"true"}),l.map(e=>{const l=a.includes(e.value),i=!0===e.disabled,c=i&&e.title?`${o}-${e.value}-why`:void 0;/* @__PURE__ */
13
+ return s(n,{content:e.title??e.label,children:/* @__PURE__ */s(t,{size:"sm","aria-pressed":l,"aria-label":e.label,"aria-disabled":i||void 0,"aria-describedby":c,className:`es-corners-cell es-corners-${e.value}${l?" is-on":""}${i?" is-off":""}`,onClick:()=>{i||r(l?a.filter(a=>a!==e.value):[...a,e.value])},children:/* @__PURE__ */s("span",{className:"es-corners-mark","aria-hidden":"true"})})},e.value)}),l.map(e=>!0===e.disabled&&e.title?/* @__PURE__ */s("span",{id:`${o}-${e.value}-why`,className:"es-vh",children:e.title},`${e.value}-why`):null)]})}function f({label:e,onPress:a,disabled:l,note:n,done:t,doneLabel:r,icon:c,id:d,className:o}){const u=void 0===r?e:r,m=t?u:e,p=null!=n,h=p&&d?`${d}-note`:void 0;/* @__PURE__ */
14
+ return i("div",{className:o?`es-action-wrap ${o}`:"es-action-wrap",children:[
15
+ /* @__PURE__ */i("button",{type:"button",id:d,className:t?"es-action is-done":"es-action",disabled:l,"aria-describedby":h,onClick:a,children:[c?/* @__PURE__ */s("span",{className:"es-action-icon","aria-hidden":"true",children:c}):null,
16
+ /* @__PURE__ */s("span",{className:"es-action-label",children:m})]}),p?/* @__PURE__ */s("p",{id:h,className:"es-action-note",children:n}):null,
17
+ /* @__PURE__ */s("span",{className:"es-action-live",role:"status","aria-live":"polite",children:t?u:null})]})}export{f as SettingsAction,b as SettingsCorners,d as SettingsDefaultReset,p as SettingsDrill,r as SettingsGroupHead,c as SettingsGroupSub,h as SettingsPlacement};