@weasel-js/ui 1.2.0 → 1.3.0-pre.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 (227) hide show
  1. package/dist/chunks/{ActionBar-BvPEd_GW.js → ActionBar-BTev_ZZl.js} +21 -21
  2. package/dist/chunks/ActionBar-BTev_ZZl.js.map +1 -0
  3. package/dist/chunks/{ActionsBar-9aR5N3lU.js → ActionsBar-gTuCtkv8.js} +4 -4
  4. package/dist/chunks/{ActionsBar-9aR5N3lU.js.map → ActionsBar-gTuCtkv8.js.map} +1 -1
  5. package/dist/chunks/{Badge-dQzbkk-C.js → Badge-9dPfvYOk.js} +672 -670
  6. package/dist/chunks/Badge-9dPfvYOk.js.map +1 -0
  7. package/dist/chunks/{BandEditor-D3i6l299.js → BandEditor-DKbcHG2_.js} +46 -46
  8. package/dist/chunks/BandEditor-DKbcHG2_.js.map +1 -0
  9. package/dist/chunks/{Button-9QNIYugK.js → Button-CIu40Epu.js} +28 -28
  10. package/dist/chunks/Button-CIu40Epu.js.map +1 -0
  11. package/dist/chunks/{Callout-cJHJ4kIN.js → Callout-CHs98djt.js} +35 -35
  12. package/dist/chunks/Callout-CHs98djt.js.map +1 -0
  13. package/dist/chunks/Checkbox-BLEw-wEb.js +47 -0
  14. package/dist/chunks/Checkbox-BLEw-wEb.js.map +1 -0
  15. package/dist/chunks/ColorField-D1t-BdSa.js +60 -0
  16. package/dist/chunks/ColorField-D1t-BdSa.js.map +1 -0
  17. package/dist/chunks/{ComboBox-ONQISwtI.js → ComboBox-cvdKolWv.js} +28 -28
  18. package/dist/chunks/ComboBox-cvdKolWv.js.map +1 -0
  19. package/dist/chunks/{CurveEditor-SmwwvrsA.js → CurveEditor-BaA-PabB.js} +116 -116
  20. package/dist/chunks/{CurveEditor-SmwwvrsA.js.map → CurveEditor-BaA-PabB.js.map} +1 -1
  21. package/dist/chunks/DataGrid-D15I779H.js +210 -0
  22. package/dist/chunks/DataGrid-D15I779H.js.map +1 -0
  23. package/dist/chunks/Dialog-DC1x46Sq.js +59 -0
  24. package/dist/chunks/Dialog-DC1x46Sq.js.map +1 -0
  25. package/dist/chunks/{Field-VQwmrIna.js → Field-BjFl_yng.js} +6 -6
  26. package/dist/chunks/Field-BjFl_yng.js.map +1 -0
  27. package/dist/chunks/GradientEditor-BJRD0n1g.js +308 -0
  28. package/dist/chunks/GradientEditor-BJRD0n1g.js.map +1 -0
  29. package/dist/chunks/InlineRange-C6UYKxLD.js +24 -0
  30. package/dist/chunks/InlineRange-C6UYKxLD.js.map +1 -0
  31. package/dist/chunks/Input-DhWBgpRx.js +55 -0
  32. package/dist/chunks/Input-DhWBgpRx.js.map +1 -0
  33. package/dist/chunks/{Keycaps-CFX7UAj8.js → Keycaps-BhCKdyws.js} +15 -15
  34. package/dist/chunks/Keycaps-BhCKdyws.js.map +1 -0
  35. package/dist/chunks/NumberField-ZdVa4bpJ.js +59 -0
  36. package/dist/chunks/NumberField-ZdVa4bpJ.js.map +1 -0
  37. package/dist/chunks/{OptionsBar-CHvH4n4u.js → OptionsBar-DahCI4Aq.js} +4 -4
  38. package/dist/chunks/{OptionsBar-CHvH4n4u.js.map → OptionsBar-DahCI4Aq.js.map} +1 -1
  39. package/dist/chunks/PaintInput-Cggm9OIl.js +205 -0
  40. package/dist/chunks/PaintInput-Cggm9OIl.js.map +1 -0
  41. package/dist/chunks/PatternPicker-B63SlDoF.js +93 -0
  42. package/dist/chunks/PatternPicker-B63SlDoF.js.map +1 -0
  43. package/dist/chunks/{Plot2D-CEnhzodm.js → Plot2D-sPXTw_-l.js} +27 -27
  44. package/dist/chunks/{Plot2D-CEnhzodm.js.map → Plot2D-sPXTw_-l.js.map} +1 -1
  45. package/dist/chunks/{PointPlotter-BUIse9c4.js → PointPlotter-CLd9u5Bq.js} +2 -2
  46. package/dist/chunks/{PointPlotter-BUIse9c4.js.map → PointPlotter-CLd9u5Bq.js.map} +1 -1
  47. package/dist/chunks/{Powerline-BYWdK8QH.js → Powerline-DhQJYaUg.js} +2 -2
  48. package/dist/chunks/{Powerline-BYWdK8QH.js.map → Powerline-DhQJYaUg.js.map} +1 -1
  49. package/dist/chunks/Prefs-BSJ0lMmJ.js +300 -0
  50. package/dist/chunks/Prefs-BSJ0lMmJ.js.map +1 -0
  51. package/dist/chunks/RadioGroup-vtwjRiUm.js +49 -0
  52. package/dist/chunks/RadioGroup-vtwjRiUm.js.map +1 -0
  53. package/dist/chunks/RangeSlider-B-n_7AgJ.js +52 -0
  54. package/dist/chunks/RangeSlider-B-n_7AgJ.js.map +1 -0
  55. package/dist/chunks/{ResizeHandle-BOpmtOOj.js → ResizeHandle--ZExnMfa.js} +8 -8
  56. package/dist/chunks/{ResizeHandle-BOpmtOOj.js.map → ResizeHandle--ZExnMfa.js.map} +1 -1
  57. package/dist/chunks/{Select-CHsuQCp0.js → Select--BVTi-j0.js} +32 -32
  58. package/dist/chunks/Select--BVTi-j0.js.map +1 -0
  59. package/dist/chunks/SelectionPanel-C7kygTFE.js +446 -0
  60. package/dist/chunks/SelectionPanel-C7kygTFE.js.map +1 -0
  61. package/dist/chunks/{Sidebar-DP_nyJze.js → Sidebar-CtwBdr4n.js} +1 -1
  62. package/dist/chunks/{Sidebar-DP_nyJze.js.map → Sidebar-CtwBdr4n.js.map} +1 -1
  63. package/dist/chunks/SidebarPanel-AeSc7wNR.js +59 -0
  64. package/dist/chunks/SidebarPanel-AeSc7wNR.js.map +1 -0
  65. package/dist/chunks/{Slider-tGbqoAZH.js → Slider-cxWR47gi.js} +39 -39
  66. package/dist/chunks/Slider-cxWR47gi.js.map +1 -0
  67. package/dist/chunks/{StatusBar-DBO0E0Yd.js → StatusBar-D_wu-SZh.js} +6 -6
  68. package/dist/chunks/StatusBar-D_wu-SZh.js.map +1 -0
  69. package/dist/chunks/Switch-CtZwp5zm.js +27 -0
  70. package/dist/chunks/Switch-CtZwp5zm.js.map +1 -0
  71. package/dist/chunks/Tabs-lB0IB4TX.js +41 -0
  72. package/dist/chunks/Tabs-lB0IB4TX.js.map +1 -0
  73. package/dist/chunks/{Toast-DFw4IrD_.js → Toast-hr9BYsho.js} +31 -31
  74. package/dist/chunks/{Toast-DFw4IrD_.js.map → Toast-hr9BYsho.js.map} +1 -1
  75. package/dist/chunks/{ToggleBar-BP1zFcvg.js → ToggleBar-BxgWq-wO.js} +11 -10
  76. package/dist/chunks/ToggleBar-BxgWq-wO.js.map +1 -0
  77. package/dist/chunks/{ToolButton-ClPz5L6j.js → ToolButton-CJrPjbsj.js} +16 -16
  78. package/dist/chunks/ToolButton-CJrPjbsj.js.map +1 -0
  79. package/dist/chunks/{ToolGroup-BTIwd4U4.js → ToolGroup-D_lDzkvU.js} +1 -1
  80. package/dist/chunks/{ToolGroup-BTIwd4U4.js.map → ToolGroup-D_lDzkvU.js.map} +1 -1
  81. package/dist/chunks/{ToolOptionsBar-JvmY7iNe.js → ToolOptionsBar-BA6Sb3U2.js} +4 -4
  82. package/dist/chunks/ToolOptionsBar-BA6Sb3U2.js.map +1 -0
  83. package/dist/chunks/{ToolPalette-DAiVhdtV.js → ToolPalette-TMvkaJwr.js} +24 -24
  84. package/dist/chunks/ToolPalette-TMvkaJwr.js.map +1 -0
  85. package/dist/chunks/Tooltip-Di7vxbFa.js +40 -0
  86. package/dist/chunks/Tooltip-Di7vxbFa.js.map +1 -0
  87. package/dist/chunks/{keyGlyph-BDH5fqkO.js → keyGlyph-DNpLxF8u.js} +1 -1
  88. package/dist/chunks/{keyGlyph-BDH5fqkO.js.map → keyGlyph-DNpLxF8u.js.map} +1 -1
  89. package/dist/chunks/segmentedControl.module-D4b7x19O.js +11 -0
  90. package/dist/chunks/segmentedControl.module-D4b7x19O.js.map +1 -0
  91. package/dist/chunks/{useRovingTabIndex-DBZtq4IH.js → useRovingTabIndex-CQz8EiKh.js} +1 -1
  92. package/dist/chunks/{useRovingTabIndex-DBZtq4IH.js.map → useRovingTabIndex-CQz8EiKh.js.map} +1 -1
  93. package/dist/components/ActionBar/index.js +1 -1
  94. package/dist/components/ActionsBar/index.js +1 -1
  95. package/dist/components/Badge/Badge.d.ts.map +1 -1
  96. package/dist/components/Badge/index.js +1 -1
  97. package/dist/components/BandEditor/index.js +1 -1
  98. package/dist/components/Button/index.js +1 -1
  99. package/dist/components/Callout/index.js +1 -1
  100. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  101. package/dist/components/Checkbox/index.js +1 -1
  102. package/dist/components/ColorField/ColorField.d.ts.map +1 -1
  103. package/dist/components/ColorField/index.js +1 -1
  104. package/dist/components/ComboBox/index.js +1 -1
  105. package/dist/components/CurveEditor/index.js +1 -1
  106. package/dist/components/DataGrid/index.js +1 -1
  107. package/dist/components/Dialog/index.js +1 -1
  108. package/dist/components/Field/index.js +1 -1
  109. package/dist/components/GradientEditor/SceneGradientHandles.d.ts +41 -0
  110. package/dist/components/GradientEditor/SceneGradientHandles.d.ts.map +1 -0
  111. package/dist/components/GradientEditor/index.d.ts +1 -0
  112. package/dist/components/GradientEditor/index.d.ts.map +1 -1
  113. package/dist/components/GradientEditor/index.js +2 -2
  114. package/dist/components/InlineRange/InlineRange.d.ts +17 -0
  115. package/dist/components/InlineRange/InlineRange.d.ts.map +1 -0
  116. package/dist/components/InlineRange/index.d.ts +2 -0
  117. package/dist/components/InlineRange/index.d.ts.map +1 -0
  118. package/dist/components/InlineRange/index.js +2 -0
  119. package/dist/components/Input/Input.d.ts +1 -1
  120. package/dist/components/Input/index.js +1 -1
  121. package/dist/components/Keycaps/index.js +2 -2
  122. package/dist/components/NumberField/NumberField.d.ts +1 -1
  123. package/dist/components/NumberField/index.js +1 -1
  124. package/dist/components/OptionsBar/index.js +1 -1
  125. package/dist/components/PaintInput/PaintInput.d.ts +40 -0
  126. package/dist/components/PaintInput/PaintInput.d.ts.map +1 -0
  127. package/dist/components/PaintInput/index.d.ts +2 -0
  128. package/dist/components/PaintInput/index.d.ts.map +1 -0
  129. package/dist/components/PaintInput/index.js +2 -0
  130. package/dist/components/PatternPicker/PatternPicker.d.ts +31 -0
  131. package/dist/components/PatternPicker/PatternPicker.d.ts.map +1 -0
  132. package/dist/components/PatternPicker/index.d.ts +2 -0
  133. package/dist/components/PatternPicker/index.d.ts.map +1 -0
  134. package/dist/components/PatternPicker/index.js +2 -0
  135. package/dist/components/Plot2D/index.js +1 -1
  136. package/dist/components/PointPlotter/index.js +1 -1
  137. package/dist/components/Powerline/index.js +2 -2
  138. package/dist/components/Prefs/PrefsForm.d.ts.map +1 -1
  139. package/dist/components/Prefs/index.d.ts +1 -1
  140. package/dist/components/Prefs/index.d.ts.map +1 -1
  141. package/dist/components/Prefs/index.js +1 -1
  142. package/dist/components/Prefs/schema.d.ts +4 -92
  143. package/dist/components/Prefs/schema.d.ts.map +1 -1
  144. package/dist/components/RadioGroup/index.js +1 -1
  145. package/dist/components/RangeSlider/index.js +1 -1
  146. package/dist/components/ResizeHandle/index.js +1 -1
  147. package/dist/components/Select/index.js +1 -1
  148. package/dist/components/SelectionPanel/SelectionPanel.d.ts +32 -1
  149. package/dist/components/SelectionPanel/SelectionPanel.d.ts.map +1 -1
  150. package/dist/components/SelectionPanel/index.js +1 -1
  151. package/dist/components/Sidebar/index.js +1 -1
  152. package/dist/components/SidebarPanel/index.js +1 -1
  153. package/dist/components/Slider/index.js +1 -1
  154. package/dist/components/StatusBar/index.js +1 -1
  155. package/dist/components/Switch/Switch.d.ts +1 -1
  156. package/dist/components/Switch/index.js +1 -1
  157. package/dist/components/Tabs/index.js +1 -1
  158. package/dist/components/Toast/index.js +1 -1
  159. package/dist/components/ToggleBar/ToggleBar.d.ts +1 -1
  160. package/dist/components/ToggleBar/ToggleBar.d.ts.map +1 -1
  161. package/dist/components/ToggleBar/index.js +1 -1
  162. package/dist/components/ToolButton/index.js +1 -1
  163. package/dist/components/ToolGroup/index.js +1 -1
  164. package/dist/components/ToolOptionsBar/index.js +1 -1
  165. package/dist/components/ToolPalette/index.js +1 -1
  166. package/dist/components/Tooltip/index.js +1 -1
  167. package/dist/components/paintValue.d.ts +8 -0
  168. package/dist/components/paintValue.d.ts.map +1 -0
  169. package/dist/icons/Icon.d.ts +17 -0
  170. package/dist/icons/Icon.d.ts.map +1 -0
  171. package/dist/icons/index.d.ts +50 -0
  172. package/dist/icons/index.d.ts.map +1 -0
  173. package/dist/icons/paths.d.ts +71 -0
  174. package/dist/icons/paths.d.ts.map +1 -0
  175. package/dist/index.d.ts +5 -0
  176. package/dist/index.d.ts.map +1 -1
  177. package/dist/index.js +184 -48
  178. package/dist/index.js.map +1 -1
  179. package/dist/style.css +1 -1
  180. package/package.json +4 -3
  181. package/dist/chunks/ActionBar-BvPEd_GW.js.map +0 -1
  182. package/dist/chunks/Badge-dQzbkk-C.js.map +0 -1
  183. package/dist/chunks/BandEditor-D3i6l299.js.map +0 -1
  184. package/dist/chunks/Button-9QNIYugK.js.map +0 -1
  185. package/dist/chunks/Callout-cJHJ4kIN.js.map +0 -1
  186. package/dist/chunks/Checkbox-KQ5L8APP.js +0 -47
  187. package/dist/chunks/Checkbox-KQ5L8APP.js.map +0 -1
  188. package/dist/chunks/ColorField-ykpiD3XU.js +0 -60
  189. package/dist/chunks/ColorField-ykpiD3XU.js.map +0 -1
  190. package/dist/chunks/ComboBox-ONQISwtI.js.map +0 -1
  191. package/dist/chunks/DataGrid-DZQ4Chbd.js +0 -210
  192. package/dist/chunks/DataGrid-DZQ4Chbd.js.map +0 -1
  193. package/dist/chunks/Dialog-CqwdJv_t.js +0 -59
  194. package/dist/chunks/Dialog-CqwdJv_t.js.map +0 -1
  195. package/dist/chunks/Field-VQwmrIna.js.map +0 -1
  196. package/dist/chunks/GradientEditor-Bg6SX64V.js +0 -280
  197. package/dist/chunks/GradientEditor-Bg6SX64V.js.map +0 -1
  198. package/dist/chunks/Input-DpkwYtUY.js +0 -55
  199. package/dist/chunks/Input-DpkwYtUY.js.map +0 -1
  200. package/dist/chunks/Keycaps-CFX7UAj8.js.map +0 -1
  201. package/dist/chunks/NumberField-BbzI0GtU.js +0 -59
  202. package/dist/chunks/NumberField-BbzI0GtU.js.map +0 -1
  203. package/dist/chunks/Prefs-BMR9wMiZ.js +0 -238
  204. package/dist/chunks/Prefs-BMR9wMiZ.js.map +0 -1
  205. package/dist/chunks/RadioGroup-CIpHr3g6.js +0 -49
  206. package/dist/chunks/RadioGroup-CIpHr3g6.js.map +0 -1
  207. package/dist/chunks/RangeSlider-CaDogGTj.js +0 -52
  208. package/dist/chunks/RangeSlider-CaDogGTj.js.map +0 -1
  209. package/dist/chunks/Select-CHsuQCp0.js.map +0 -1
  210. package/dist/chunks/SelectionPanel-D_wk_8ZN.js +0 -303
  211. package/dist/chunks/SelectionPanel-D_wk_8ZN.js.map +0 -1
  212. package/dist/chunks/SidebarPanel-BVTQ1ZyM.js +0 -59
  213. package/dist/chunks/SidebarPanel-BVTQ1ZyM.js.map +0 -1
  214. package/dist/chunks/Slider-tGbqoAZH.js.map +0 -1
  215. package/dist/chunks/StatusBar-DBO0E0Yd.js.map +0 -1
  216. package/dist/chunks/Switch-JyVSSAzC.js +0 -27
  217. package/dist/chunks/Switch-JyVSSAzC.js.map +0 -1
  218. package/dist/chunks/Tabs-Df0sDomx.js +0 -41
  219. package/dist/chunks/Tabs-Df0sDomx.js.map +0 -1
  220. package/dist/chunks/ToggleBar-BP1zFcvg.js.map +0 -1
  221. package/dist/chunks/ToolButton-ClPz5L6j.js.map +0 -1
  222. package/dist/chunks/ToolOptionsBar-JvmY7iNe.js.map +0 -1
  223. package/dist/chunks/ToolPalette-DAiVhdtV.js.map +0 -1
  224. package/dist/chunks/Tooltip-DXJbdR5B.js +0 -40
  225. package/dist/chunks/Tooltip-DXJbdR5B.js.map +0 -1
  226. package/dist/chunks/segmentedControl.module-DCyuDbj1.js +0 -11
  227. package/dist/chunks/segmentedControl.module-DCyuDbj1.js.map +0 -1
@@ -1,16 +1,16 @@
1
- import { useCallback as e, useEffect as t, useRef as n } from "react";
2
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
+ import { useCallback as n, useEffect as r, useRef as i } from "react";
3
3
  var a = {
4
- root: "_root_q2asl_1",
5
- row: "_row_q2asl_8",
6
- track: "_track_q2asl_14",
7
- trackInner: "_trackInner_q2asl_25",
8
- thumb: "_thumb_q2asl_35",
9
- thumbActive: "_thumbActive_q2asl_74",
10
- readoutsBelow: "_readoutsBelow_q2asl_79",
11
- readoutBelow: "_readoutBelow_q2asl_85",
12
- readoutInline: "_readoutInline_q2asl_93",
13
- notched: "_notched_q2asl_101"
4
+ root: "_root_1qeyx_1",
5
+ row: "_row_1qeyx_8",
6
+ track: "_track_1qeyx_14",
7
+ trackInner: "_trackInner_1qeyx_25",
8
+ thumb: "_thumb_1qeyx_35",
9
+ thumbActive: "_thumbActive_1qeyx_74",
10
+ readoutsBelow: "_readoutsBelow_1qeyx_79",
11
+ readoutBelow: "_readoutBelow_1qeyx_85",
12
+ readoutInline: "_readoutInline_1qeyx_93",
13
+ notched: "_notched_1qeyx_101"
14
14
  }, o = "−";
15
15
  function s(e, t) {
16
16
  return (Number.isFinite(e) ? e.toLocaleString(void 0, t) : String(e)).replace(/^-/, "−");
@@ -66,11 +66,11 @@ function _(e) {
66
66
  });
67
67
  }
68
68
  function v(o) {
69
- let { thumbs: s, onInput: v, onChange: y, min: b, max: x, step: S, constraint: C, trackHeight: w, ariaLabel: T, className: E } = o, D = d(o.stops, b, x), O = n(null), k = n(null), A = n(null);
70
- t(() => () => {
69
+ let { thumbs: s, onInput: v, onChange: y, min: b, max: x, step: S, constraint: C, trackHeight: w, ariaLabel: T, className: E } = o, D = d(o.stops, b, x), O = i(null), k = i(null), A = i(null);
70
+ r(() => () => {
71
71
  A.current?.();
72
72
  }, []);
73
- let j = e((e) => x === b ? 0 : l((e - b) / (x - b), 0, 1), [b, x]), M = e((e) => b + l(e, 0, 1) * (x - b), [b, x]), N = e((e) => {
73
+ let j = n((e) => x === b ? 0 : l((e - b) / (x - b), 0, 1), [b, x]), M = n((e) => b + l(e, 0, 1) * (x - b), [b, x]), N = n((e) => {
74
74
  k.current = s.map((e) => ({ ...e }));
75
75
  let t = !1, n = (n) => {
76
76
  let r = O.current, i = k.current;
@@ -115,7 +115,7 @@ function v(o) {
115
115
  D,
116
116
  C,
117
117
  o
118
- ]), P = e((e) => {
118
+ ]), P = n((e) => {
119
119
  let t = s.map((e) => ({ ...e })), n = t.map((e) => e.value);
120
120
  k.current = t;
121
121
  let r = (t) => {
@@ -200,60 +200,60 @@ function v(o) {
200
200
  value: w
201
201
  }, v(o), y?.(o);
202
202
  }, z = o.readoutPlacement ?? "none", B = o.renderReadout;
203
- return /* @__PURE__ */ i("div", {
203
+ return /* @__PURE__ */ t("div", {
204
204
  className: E ? `${a.root} ${E}` : a.root,
205
205
  style: w === void 0 ? void 0 : { "--rp-track-height": `${w}px` },
206
- children: [/* @__PURE__ */ i("div", {
206
+ children: [/* @__PURE__ */ t("div", {
207
207
  className: a.row,
208
- children: [/* @__PURE__ */ i("div", {
208
+ children: [/* @__PURE__ */ t("div", {
209
209
  className: a.track,
210
210
  ref: O,
211
211
  onPointerDown: L,
212
- children: [o.renderTrack && /* @__PURE__ */ r("div", {
212
+ children: [o.renderTrack && /* @__PURE__ */ e("div", {
213
213
  className: a.trackInner,
214
214
  children: o.renderTrack({
215
215
  trackWidth: O.current?.getBoundingClientRect().width ?? 0,
216
216
  valueToFraction: j
217
217
  })
218
- }), s.map((e, t) => {
219
- let n = e.shape === "notched", i = typeof e.shape == "object" && e.shape !== null ? e.shape.render : null, o = `${a.thumb}${n ? ` ${a.notched}` : ""}`;
220
- return /* @__PURE__ */ r("div", {
218
+ }), s.map((t, n) => {
219
+ let r = t.shape === "notched", i = typeof t.shape == "object" && t.shape !== null ? t.shape.render : null, o = `${a.thumb}${r ? ` ${a.notched}` : ""}`;
220
+ return /* @__PURE__ */ e("div", {
221
221
  role: "slider",
222
222
  tabIndex: 0,
223
223
  "aria-orientation": "horizontal",
224
224
  "aria-valuemin": b,
225
225
  "aria-valuemax": x,
226
- "aria-valuenow": e.value,
227
- "aria-label": [T, e.label].filter(Boolean).join(" ") || void 0,
226
+ "aria-valuenow": t.value,
227
+ "aria-label": [T, t.label].filter(Boolean).join(" ") || void 0,
228
228
  className: o,
229
- style: { left: `${j(e.value) * 100}%` },
230
- onPointerDown: F(t),
231
- onKeyDown: R(t),
232
- onContextMenu: I(t),
229
+ style: { left: `${j(t.value) * 100}%` },
230
+ onPointerDown: F(n),
231
+ onKeyDown: R(n),
232
+ onContextMenu: I(n),
233
233
  children: i ? i({
234
234
  width: 14,
235
235
  height: 24,
236
236
  isActive: !1
237
- }) : e.label ?? ""
238
- }, t);
237
+ }) : t.label ?? ""
238
+ }, n);
239
239
  })]
240
- }), z === "inline-after" && /* @__PURE__ */ r("span", {
240
+ }), z === "inline-after" && /* @__PURE__ */ e("span", {
241
241
  "data-readout": "inline",
242
242
  className: a.readoutInline,
243
- children: s.map((e, t) => /* @__PURE__ */ i("span", { children: [t > 0 ? " / " : "", B ? B(e, t) : _(e)] }, t))
243
+ children: s.map((e, n) => /* @__PURE__ */ t("span", { children: [n > 0 ? " / " : "", B ? B(e, n) : _(e)] }, n))
244
244
  })]
245
- }), z === "below-thumb" && /* @__PURE__ */ r("div", {
245
+ }), z === "below-thumb" && /* @__PURE__ */ e("div", {
246
246
  className: a.readoutsBelow,
247
- children: s.map((e, t) => /* @__PURE__ */ r("span", {
247
+ children: s.map((t, n) => /* @__PURE__ */ e("span", {
248
248
  "data-readout": "below",
249
249
  className: a.readoutBelow,
250
- style: { left: `${j(e.value) * 100}%` },
251
- children: B ? B(e, t) : _(e)
252
- }, t))
250
+ style: { left: `${j(t.value) * 100}%` },
251
+ children: B ? B(t, n) : _(t)
252
+ }, n))
253
253
  })]
254
254
  });
255
255
  }
256
256
  //#endregion
257
257
  export { o as n, s as r, v as t };
258
258
 
259
- //# sourceMappingURL=Slider-tGbqoAZH.js.map
259
+ //# sourceMappingURL=Slider-cxWR47gi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Slider-cxWR47gi.js","names":[],"sources":["../../src/components/Slider/Slider.module.css","../../src/format/number.ts","../../src/components/Slider/Slider.tsx"],"sourcesContent":[".root {\n position: relative;\n user-select: none;\n -webkit-user-select: none;\n touch-action: none;\n}\n\n.row {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.track {\n position: relative;\n flex: 1;\n min-width: 0;\n height: var(--rp-track-height, 24px);\n background: var(--wzl-surface-sunken);\n border: 1px solid var(--wzl-border);\n border-radius: var(--wzl-radius-sm);\n cursor: crosshair;\n /* No `overflow: hidden` here — thumbs at extreme values would get\n * clipped at the track edges. The gradient/track-paint clip is\n * applied to `.trackInner` instead, which lets thumbs spill freely. */\n}\n\n.trackInner {\n position: absolute;\n inset: 0;\n border-radius: var(--wzl-radius-sm);\n overflow: hidden;\n}\n\n.thumb {\n position: absolute;\n /* Thumb extends 2px above + below the track for grabbability + visual\n * weight. Track itself stays its natural height; the thumb just spills. */\n top: -2px;\n bottom: -2px;\n width: 14px;\n margin-left: -7px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: color-mix(in srgb, var(--wzl-fg-muted) 70%, transparent);\n border: 1px solid var(--wzl-border-strong);\n border-radius: var(--wzl-radius-sm);\n cursor: ew-resize;\n /* Frosted-glass over the (often colorful) track. Cheap on modern GPUs;\n * gracefully degrades to just the partial-alpha background on engines\n * without backdrop-filter support. */\n backdrop-filter: blur(3px);\n -webkit-backdrop-filter: blur(3px);\n /* Subtle raise — sells the \"thumb is on top of the track\" hierarchy. */\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);\n font: var(--wzl-font-weight-medium) var(--wzl-font-size-xs)/var(--wzl-leading-tight) ui-sans-serif, system-ui, sans-serif;\n font-variant-numeric: tabular-nums;\n /* Thumb text reads against `--wzl-thumb-fill`, which can differ from the\n * surrounding panel text color. Default = dark; consumers re-skin via\n * `--wzl-thumb-text` if they pick a dark thumb fill. */\n color: var(--wzl-fg-inverse);\n /* White halo so labels stay legible over wildly varying gradient\n * backgrounds (e.g. labels 'T' / 'P' / 'B' over teal, hue 200° over\n * yellow-green, etc.). */\n text-shadow: 0 0 2px rgba(255, 255, 255, 0.7);\n}\n\n.thumb:focus-visible {\n outline: 2px solid var(--wzl-accent);\n outline-offset: 1px;\n}\n\n.thumbActive {\n /* Visual marker for the dragging/focused thumb; subclass-overridable. */\n z-index: 1;\n}\n\n.readoutsBelow {\n position: relative;\n height: 14px;\n margin-top: 4px;\n}\n\n.readoutBelow {\n position: absolute;\n transform: translateX(-50%);\n font: var(--wzl-font-weight-medium) var(--wzl-font-size-xs)/var(--wzl-leading-tight) ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n color: var(--wzl-fg-muted);\n white-space: nowrap;\n}\n\n.readoutInline {\n display: inline-block;\n margin-left: 8px;\n font: var(--wzl-font-weight-medium) var(--wzl-font-size-sm)/var(--wzl-leading-tight) ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n color: var(--wzl-fg-muted);\n vertical-align: middle;\n}\n\n.notched {\n background: var(--thumb-svg, none);\n background-size: 100% 100%;\n background-repeat: no-repeat;\n background-color: transparent;\n border: none;\n /* Notched thumbs need to disable the .thumb defaults that paint to\n * the bounding box: backdrop-filter and box-shadow both ignore the\n * SVG's polygon/notch and would render through the notch cutout.\n * Use filter: drop-shadow instead — it traces the actual rendered\n * alpha (i.e. the polygon shape including the cut). */\n backdrop-filter: none;\n -webkit-backdrop-filter: none;\n box-shadow: none;\n filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));\n /* Default notched SVG (down-pointing pentagon, matches the perceptual-color experiment). */\n --thumb-svg: url(\"data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 30' preserveAspectRatio='none'%3E%3Cpolygon points='0,0 2.52,0 7,10.3 11.48,0 14,0 14,30 0,30' fill='rgba(255,255,255,0.62)' stroke='rgba(0,0,0,0.55)' stroke-width='0.75' stroke-linejoin='miter'/%3E%3C/svg%3E\");\n}\n","/**\n * Display-formatter for numbers. Use this anywhere a number is shown to\n * a user. The whole point: negative values get prefixed with the real\n * MINUS SIGN (U+2212) instead of the ASCII HYPHEN-MINUS (U+002D) that\n * `toLocaleString` and template literals produce by default.\n *\n * U+2212 is the same visual width as `+` and reads as a sign rather\n * than a hyphen — columns of signed numbers align cleanly and the\n * glyph doesn't get confused with a bullet or list dash.\n */\nexport const MINUS_SIGN = '−';\n\n/**\n * Formats a number for display, substituting {@link MINUS_SIGN} for the ASCII\n * hyphen `toLocaleString` emits. Non-finite values stringify as-is.\n */\nexport function formatNumber(value: number, options?: Intl.NumberFormatOptions): string {\n const formatted = Number.isFinite(value)\n ? value.toLocaleString(undefined, options)\n : String(value);\n return formatted.replace(/^-/, MINUS_SIGN);\n}\n","import { useCallback, useEffect, useRef, type CSSProperties, type KeyboardEvent as ReactKeyboardEvent, type MouseEvent as ReactMouseEvent, type PointerEvent as ReactPointerEvent, type ReactElement, type ReactNode } from 'react';\nimport s from './Slider.module.css';\nimport { formatNumber } from '../../format/number';\n\n/**\n * Passed to a custom thumb renderer: the thumb box in CSS px, and whether\n * this thumb is the one being dragged.\n */\nexport type ThumbRenderCtx = {\n width: number;\n height: number;\n isActive: boolean;\n};\n\n/**\n * A thumb's appearance — one of the two built-in shapes, or a custom\n * renderer.\n */\nexport type ThumbShape =\n | 'round'\n | 'notched'\n | { render: (ctx: ThumbRenderCtx) => ReactNode };\n\n/**\n * One handle on a {@link Slider}. `bounds` narrows the range this particular\n * thumb may move within, either fixed or computed from the current thumb\n * list.\n */\nexport type Thumb = {\n value: number;\n label?: string;\n shape?: ThumbShape;\n bounds?: [number, number] | ((ctx: BoundsCtx) => [number, number]);\n};\n\n/**\n * Passed to a thumb's `bounds` function: the full thumb list and this thumb's\n * index in it, so a bound can be expressed relative to its neighbors.\n */\nexport type BoundsCtx = {\n thumbs: readonly Thumb[];\n index: number;\n};\n\n/**\n * Passed to `renderTrack`: the track's width in CSS px and a mapping from a\n * slider value to its 0..1 position along the track.\n */\nexport type TrackCtx = {\n trackWidth: number;\n valueToFraction: (v: number) => number;\n};\n\n/**\n * Props for {@link Slider}.\n *\n * `onInput` fires continuously through a drag; `onChange` fires once when it\n * ends and is the one to write to history.\n *\n * `stops` are attractors: a drag that passes within a few pixels of one lands\n * on it, and the arrow keys move stop to stop. `step` still quantizes the\n * values between them.\n *\n * `constraint: 'ordered'` keeps thumbs from crossing each other. Supplying\n * `onAddThumb` makes a click on empty track create a thumb, and supplying\n * `onRemoveThumb` lets a right-click or a drag off the track remove one —\n * both callbacks can decline by returning `null`/`false`. `allowShiftAll`\n * makes shift-drag translate every thumb together.\n */\nexport type SliderProps<T extends Thumb = Thumb> = {\n thumbs: readonly T[];\n onInput: (next: T[]) => void;\n onChange?: (next: T[]) => void;\n min: number;\n max: number;\n step?: number;\n stops?: number[];\n constraint?: 'free' | 'ordered';\n onAddThumb?: (atValue: number) => T | null;\n onRemoveThumb?: (index: number) => boolean;\n allowShiftAll?: boolean;\n renderTrack?: (ctx: TrackCtx) => ReactNode;\n trackHeight?: number;\n renderReadout?: (thumb: T, index: number) => ReactNode;\n readoutPlacement?: 'none' | 'inline-after' | 'below-thumb';\n ariaLabel?: string;\n className?: string;\n};\n\nfunction snap(v: number, step: number | undefined, min: number): number {\n if (step === undefined || step <= 0) return v;\n return Math.round((v - min) / step) * step + min;\n}\n\nfunction clamp(v: number, lo: number, hi: number): number {\n return Math.max(lo, Math.min(hi, v));\n}\n\n/** How close a drag has to come to a stop, in track pixels, to land on it. */\nconst STOP_SNAP_PX = 8;\n\n/** The stops that are actually reachable: inside the range, deduped, ascending. */\nfunction usableStops(stops: number[] | undefined, min: number, max: number): number[] {\n if (!stops || stops.length === 0) return [];\n return [...new Set(stops.filter(v => v >= min && v <= max))].sort((a, b) => a - b);\n}\n\n/** Pull `v` onto the nearest stop within `tolerance`, or leave it where it is. */\nfunction attract(v: number, stops: number[], tolerance: number): number {\n let best = v;\n let bestGap = tolerance;\n for (const stop of stops) {\n const gap = Math.abs(stop - v);\n if (gap <= bestGap) {\n best = stop;\n bestGap = gap;\n }\n }\n return best;\n}\n\n/** The stop `count` places past `v` in `direction`, saturating at either end. */\nfunction stepStops(stops: number[], v: number, direction: 1 | -1, count: number): number {\n if (direction > 0) {\n const first = stops.findIndex(stop => stop > v);\n if (first === -1) return stops[stops.length - 1];\n return stops[Math.min(stops.length - 1, first + count - 1)];\n }\n let first = -1;\n for (let i = stops.length - 1; i >= 0; i--) {\n if (stops[i] < v) {\n first = i;\n break;\n }\n }\n if (first === -1) return stops[0];\n return stops[Math.max(0, first - (count - 1))];\n}\n\nfunction defaultStep(step: number | undefined, min: number, max: number): number {\n if (step !== undefined && step > 0) return step;\n return (max - min) / 100;\n}\n\n/** Keep a thumb inside its neighbors when `constraint` is `'ordered'`. */\nfunction clampOrdered(\n v: number,\n thumbs: readonly Thumb[],\n index: number,\n min: number,\n max: number,\n step: number | undefined,\n): number {\n const gap = step !== undefined && step > 0 ? step : (max - min) / 1000;\n const lower = index > 0 ? thumbs[index - 1].value + gap : min;\n const upper = index < thumbs.length - 1 ? thumbs[index + 1].value - gap : max;\n return clamp(v, lower, upper);\n}\n\nfunction resolveBounds(thumb: Thumb, ctx: BoundsCtx, fallbackMin: number, fallbackMax: number): [number, number] {\n if (!thumb.bounds) return [fallbackMin, fallbackMax];\n const tuple = typeof thumb.bounds === 'function' ? thumb.bounds(ctx) : thumb.bounds;\n return [tuple[0], tuple[1]];\n}\n\nfunction defaultReadout(thumb: Thumb): string {\n return formatNumber(thumb.value, { minimumFractionDigits: 3, maximumFractionDigits: 3 });\n}\n\n/**\n * Multi-thumb slider over a shared track. The thumb list is fully controlled:\n * every change, live or committed, arrives as a whole new array.\n *\n * Thumbs are draggable, and arrow/Home/End move the focused thumb — those\n * keystrokes fire `onInput` and `onChange` together, since there is no\n * in-flight state to buffer.\n */\nexport function Slider<T extends Thumb = Thumb>(props: SliderProps<T>): ReactElement {\n const { thumbs, onInput, onChange, min, max, step, constraint, trackHeight, ariaLabel, className } = props;\n\n const stops = usableStops(props.stops, min, max);\n\n const trackRef = useRef<HTMLDivElement | null>(null);\n // In-flight thumb buffer during a drag; null when not dragging.\n const dragBufferRef = useRef<T[] | null>(null);\n // Teardown for the in-flight drag's document listeners, so unmounting\n // mid-drag doesn't leave them running against a gone track.\n const endDragRef = useRef<(() => void) | null>(null);\n\n useEffect(() => () => { endDragRef.current?.(); }, []);\n\n const valueToFraction = useCallback(\n (v: number): number => (max === min ? 0 : clamp((v - min) / (max - min), 0, 1)),\n [min, max],\n );\n\n const fractionToValue = useCallback(\n (f: number): number => min + clamp(f, 0, 1) * (max - min),\n [min, max],\n );\n\n const beginThumbDrag = useCallback(\n (index: number) => {\n const buf: T[] = thumbs.map(t => ({ ...t }));\n dragBufferRef.current = buf;\n let droppedOff = false;\n\n const onMove = (ev: PointerEvent) => {\n const track = trackRef.current;\n const buffer = dragBufferRef.current;\n if (!track || !buffer) return;\n const rect = track.getBoundingClientRect();\n const f = clamp((ev.clientX - rect.left) / rect.width, 0, 1);\n let v = fractionToValue(f);\n v = snap(v, step, min);\n v = clamp(v, min, max);\n if (stops.length > 0) v = attract(v, stops, (STOP_SNAP_PX / rect.width) * (max - min));\n\n const [bLo, bHi] = resolveBounds(buffer[index], { thumbs: buffer, index }, min, max);\n v = clamp(v, bLo, bHi);\n\n if (constraint === 'ordered') v = clampOrdered(v, buffer, index, min, max, step);\n\n // Drop-off detection: pointer exits the track vertically by more than trackHeight.\n const bandHeight = rect.height;\n if (props.onRemoveThumb) {\n if (ev.clientY < rect.top - bandHeight || ev.clientY > rect.bottom + bandHeight) {\n droppedOff = true;\n } else {\n droppedOff = false;\n }\n }\n\n buffer[index] = { ...buffer[index], value: v };\n onInput(buffer.map(t => ({ ...t })));\n };\n\n const unlisten = () => {\n document.removeEventListener('pointermove', onMove);\n document.removeEventListener('pointerup', onUp);\n document.removeEventListener('pointercancel', onCancel);\n endDragRef.current = null;\n };\n\n // A canceled pointer never fires `pointerup`; without this the drag\n // stays live and the thumb tracks a released pointer.\n const onCancel = () => {\n unlisten();\n dragBufferRef.current = null;\n };\n\n const onUp = () => {\n unlisten();\n const buffer = dragBufferRef.current;\n dragBufferRef.current = null;\n if (!buffer) return;\n\n if (droppedOff && props.onRemoveThumb) {\n const accepted = props.onRemoveThumb(index);\n if (accepted) {\n const next = buffer.filter((_, i) => i !== index).map(t => ({ ...t })) as T[];\n onInput(next);\n onChange?.(next);\n return;\n }\n }\n\n onChange?.(buffer.map(t => ({ ...t })));\n };\n\n document.addEventListener('pointermove', onMove);\n document.addEventListener('pointerup', onUp);\n document.addEventListener('pointercancel', onCancel);\n endDragRef.current = onCancel;\n },\n [thumbs, onInput, onChange, fractionToValue, min, max, step, stops, constraint, props],\n );\n\n const beginShiftAllDrag = useCallback(\n (anchorX: number) => {\n const buf: T[] = thumbs.map(t => ({ ...t }));\n const startValues = buf.map(t => t.value);\n dragBufferRef.current = buf;\n\n const onMove = (ev: PointerEvent) => {\n const track = trackRef.current;\n const buffer = dragBufferRef.current;\n if (!track || !buffer) return;\n const rect = track.getBoundingClientRect();\n const dxFraction = (ev.clientX - anchorX) / rect.width;\n let dValue = dxFraction * (max - min);\n dValue = snap(dValue, step, 0);\n\n // Clamp delta so no thumb leaves [min, max] (per-thumb bounds intentionally\n // not enforced — matches the experiment's hue-band shift-translate semantics).\n let allowedNeg = -Infinity;\n let allowedPos = Infinity;\n for (let i = 0; i < startValues.length; i++) {\n allowedNeg = Math.max(allowedNeg, min - startValues[i]);\n allowedPos = Math.min(allowedPos, max - startValues[i]);\n }\n dValue = clamp(dValue, allowedNeg, allowedPos);\n\n for (let i = 0; i < buffer.length; i++) {\n buffer[i] = { ...buffer[i], value: clamp(startValues[i] + dValue, min, max) };\n }\n onInput(buffer.map(t => ({ ...t })));\n };\n\n const unlisten = () => {\n document.removeEventListener('pointermove', onMove);\n document.removeEventListener('pointerup', onUp);\n document.removeEventListener('pointercancel', onCancel);\n endDragRef.current = null;\n };\n\n const onCancel = () => {\n unlisten();\n dragBufferRef.current = null;\n };\n\n const onUp = () => {\n unlisten();\n const buffer = dragBufferRef.current;\n dragBufferRef.current = null;\n if (buffer) onChange?.(buffer.map(t => ({ ...t })));\n };\n\n document.addEventListener('pointermove', onMove);\n document.addEventListener('pointerup', onUp);\n document.addEventListener('pointercancel', onCancel);\n endDragRef.current = onCancel;\n },\n [thumbs, onInput, onChange, min, max, step],\n );\n\n const onThumbPointerDown = (index: number) => (e: ReactPointerEvent) => {\n // Only bail on explicit non-primary buttons (button > 0). jsdom's PointerEvent\n // leaves `button` undefined; treat that as primary so tests can drive drags.\n if (typeof e.button === 'number' && e.button > 0) return;\n // preventDefault below suppresses the focus the press would otherwise\n // give the thumb, and the arrow keys are on the thumb.\n (e.currentTarget as HTMLElement).focus?.();\n e.preventDefault();\n e.stopPropagation();\n if (e.shiftKey && props.allowShiftAll) {\n beginShiftAllDrag(e.clientX);\n } else {\n beginThumbDrag(index);\n }\n };\n\n const onThumbContextMenu = (index: number) => (e: ReactMouseEvent) => {\n if (!props.onRemoveThumb) return;\n e.preventDefault();\n const accepted = props.onRemoveThumb(index);\n if (!accepted) return;\n const next = thumbs.filter((_, i) => i !== index).map(t => ({ ...t })) as T[];\n onInput(next);\n onChange?.(next);\n };\n\n const onTrackPointerDown = (e: ReactPointerEvent<HTMLDivElement>) => {\n if (typeof e.button === 'number' && e.button > 0) return;\n if (!props.onAddThumb) return;\n // If the event originated on a thumb, the thumb's own handler ran first; this is a track click.\n if ((e.target as HTMLElement).closest(`.${s.thumb}`)) return;\n e.preventDefault();\n const track = trackRef.current;\n if (!track) return;\n const rect = track.getBoundingClientRect();\n const f = clamp((e.clientX - rect.left) / rect.width, 0, 1);\n let v = fractionToValue(f);\n v = snap(v, step, min);\n v = clamp(v, min, max);\n if (stops.length > 0) v = attract(v, stops, (STOP_SNAP_PX / rect.width) * (max - min));\n const created = props.onAddThumb(v);\n if (!created) return;\n const next = [...thumbs.map(t => ({ ...t })), created] as T[];\n onInput(next);\n onChange?.(next);\n };\n\n const onThumbKeyDown = (index: number) => (e: ReactKeyboardEvent) => {\n const stepSize = defaultStep(step, min, max);\n let delta = 0;\n // With stops, a keystroke moves by whole stops rather than by value.\n let stopDelta = 0;\n let snapTo: 'home' | 'end' | null = null;\n\n switch (e.key) {\n case 'ArrowRight':\n case 'ArrowUp':\n delta = e.shiftKey ? stepSize * 10 : stepSize;\n stopDelta = e.shiftKey ? 10 : 1;\n break;\n case 'ArrowLeft':\n case 'ArrowDown':\n delta = e.shiftKey ? -stepSize * 10 : -stepSize;\n stopDelta = e.shiftKey ? -10 : -1;\n break;\n case 'PageUp':\n delta = stepSize * 10;\n stopDelta = 10;\n break;\n case 'PageDown':\n delta = -stepSize * 10;\n stopDelta = -10;\n break;\n case 'Home':\n snapTo = 'home';\n break;\n case 'End':\n snapTo = 'end';\n break;\n default:\n return;\n }\n\n e.preventDefault();\n const next = thumbs.map(t => ({ ...t }));\n const [bLo, bHi] = resolveBounds(next[index], { thumbs: next, index }, min, max);\n const lo = Math.max(min, bLo);\n const hi = Math.min(max, bHi);\n let v: number;\n if (snapTo === 'home') v = lo;\n else if (snapTo === 'end') v = hi;\n else if (stops.length > 0) {\n v = stepStops(stops, next[index].value, stopDelta > 0 ? 1 : -1, Math.abs(stopDelta));\n } else {\n v = snap(next[index].value + delta, step, min);\n }\n v = clamp(v, lo, hi);\n if (constraint === 'ordered') v = clampOrdered(v, next, index, lo, hi, step);\n next[index] = { ...next[index], value: v };\n onInput(next);\n onChange?.(next);\n };\n\n const placement = props.readoutPlacement ?? 'none';\n const renderReadout = props.renderReadout;\n\n return (\n <div\n className={className ? `${s.root} ${className}` : s.root}\n style={trackHeight !== undefined ? ({ ['--rp-track-height' as string]: `${trackHeight}px` } as CSSProperties) : undefined}\n >\n <div className={s.row}>\n <div className={s.track} ref={trackRef} onPointerDown={onTrackPointerDown}>\n {props.renderTrack && (\n <div className={s.trackInner}>\n {props.renderTrack({\n trackWidth: trackRef.current?.getBoundingClientRect().width ?? 0,\n valueToFraction,\n })}\n </div>\n )}\n {thumbs.map((thumb, i) => {\n const isNotched = thumb.shape === 'notched';\n const customRender = typeof thumb.shape === 'object' && thumb.shape !== null ? thumb.shape.render : null;\n const cls = `${s.thumb}${isNotched ? ` ${s.notched}` : ''}`;\n return (\n <div\n key={i}\n role=\"slider\"\n tabIndex={0}\n aria-orientation=\"horizontal\"\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={thumb.value}\n aria-label={[ariaLabel, thumb.label].filter(Boolean).join(' ') || undefined}\n className={cls}\n style={{ left: `${valueToFraction(thumb.value) * 100}%` }}\n onPointerDown={onThumbPointerDown(i)}\n onKeyDown={onThumbKeyDown(i)}\n onContextMenu={onThumbContextMenu(i)}\n >\n {customRender ? customRender({ width: 14, height: 24, isActive: false }) : (thumb.label ?? '')}\n </div>\n );\n })}\n </div>\n {placement === 'inline-after' && (\n <span data-readout=\"inline\" className={s.readoutInline}>\n {thumbs.map((t, i) => (\n <span key={i}>{i > 0 ? ' / ' : ''}{renderReadout ? renderReadout(t, i) : defaultReadout(t)}</span>\n ))}\n </span>\n )}\n </div>\n {placement === 'below-thumb' && (\n <div className={s.readoutsBelow}>\n {thumbs.map((t, i) => (\n <span\n key={i}\n data-readout=\"below\"\n className={s.readoutBelow}\n style={{ left: `${valueToFraction(t.value) * 100}%` }}\n >\n {renderReadout ? renderReadout(t, i) : defaultReadout(t)}\n </span>\n ))}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;GCUa,IAAa;AAM1B,SAAgB,EAAa,GAAe,GAA4C;AAItF,SAHkB,OAAO,SAAS,EAAM,GACpC,EAAM,eAAe,KAAA,GAAW,EAAQ,GACxC,OAAO,EAAM,EACA,QAAQ,MAAA,IAAiB;;;;ACqE5C,SAAS,EAAK,GAAW,GAA0B,GAAqB;AAEtE,QADI,MAAS,KAAA,KAAa,KAAQ,IAAU,IACrC,KAAK,OAAO,IAAI,KAAO,EAAK,GAAG,IAAO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D,EAAA,UAAA,CAAe,IAAI,IAAI,QAAQ,IAAI,IAAgB,EAAc,GAAG,EAAE,GAAG,EAAe,EAAE,CAAQ,EAAA,EAAvF,EAAuF,CAClG;IACG,CAAA,CAEH;MACL,MAAc,iBACb,kBAAC,OAAD;GAAK,WAAW,EAAE;aACf,EAAO,KAAK,GAAG,MACd,kBAAC,QAAD;IAEE,gBAAa;IACb,WAAW,EAAE;IACb,OAAO,EAAE,MAAM,GAAG,EAAgB,EAAE,MAAM,GAAG,IAAI,IAAI;cAEpD,IAAgB,EAAc,GAAG,EAAE,GAAG,EAAe,EAAE;IACnD,EANA,EAMA,CACP;GACE,CAAA,CAEJ"}
@@ -1,10 +1,10 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  var t = {
3
- bar: "_bar_38xae_1",
4
- item: "_item_38xae_14",
5
- muted: "_muted_38xae_18",
6
- hasTitle: "_hasTitle_38xae_23",
7
- spacer: "_spacer_38xae_27"
3
+ bar: "_bar_49hmb_1",
4
+ item: "_item_49hmb_14",
5
+ muted: "_muted_49hmb_18",
6
+ hasTitle: "_hasTitle_49hmb_23",
7
+ spacer: "_spacer_49hmb_27"
8
8
  };
9
9
  //#endregion
10
10
  //#region src/components/StatusBar/StatusBar.tsx
@@ -38,4 +38,4 @@ function i() {
38
38
  //#endregion
39
39
  export { r as n, i as r, n as t };
40
40
 
41
- //# sourceMappingURL=StatusBar-DBO0E0Yd.js.map
41
+ //# sourceMappingURL=StatusBar-D_wu-SZh.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusBar-D_wu-SZh.js","names":[],"sources":["../../src/components/StatusBar/StatusBar.module.css","../../src/components/StatusBar/StatusBar.tsx"],"sourcesContent":[".bar {\n display: flex;\n align-items: center;\n gap: 16px;\n flex-shrink: 0;\n padding: 4px 12px;\n font-family: var(--wzl-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);\n font-size: var(--wzl-font-size-sm);\n color: var(--wzl-fg-muted);\n background: var(--wzl-surface);\n border-top: 1px solid var(--wzl-border);\n}\n\n.item {\n white-space: nowrap;\n}\n\n.muted {\n opacity: 0.6;\n font-variant-numeric: tabular-nums;\n}\n\n.hasTitle {\n cursor: help;\n}\n\n.spacer {\n margin-left: auto;\n}\n","import type { ReactNode } from 'react';\nimport s from './StatusBar.module.css';\n\n/** Props for {@link StatusBar}. */\nexport interface StatusBarProps {\n /**\n * Accessible label for the bar. Deliberately not a live region — a status\n * bar's readouts change on every pointer move (zoom, cursor position,\n * selection count), and announcing each one would make a screen reader\n * unusable. Screen-reader users reach the same facts through the controls\n * that own them.\n */\n ariaLabel?: string;\n children?: ReactNode;\n className?: string;\n}\n\n/**\n * The thin readout strip along the bottom of an editor window: monospace,\n * one row, items separated by a fixed gap, with an optional spacer that\n * pushes everything after it to the trailing edge.\n *\n * Pure presentation — it holds whatever the app puts in it. Compose with\n * `<StatusBarItem>` and `<StatusBarSpacer>`.\n */\nexport function StatusBar(props: StatusBarProps) {\n const { ariaLabel, children, className } = props;\n return (\n <footer className={[s.bar, className].filter(Boolean).join(' ')} aria-label={ariaLabel}>\n {children}\n </footer>\n );\n}\n\n/** Props for {@link StatusBarItem}. */\nexport interface StatusBarItemProps {\n /**\n * Hover text. Items that carry one also get a `help` cursor, so the\n * affordance is discoverable rather than hidden behind a hover delay.\n */\n title?: string;\n /**\n * Dim the item and use tabular figures. For reference material that\n * shouldn't compete with live readouts — build stamps, hints, units.\n */\n muted?: boolean;\n children?: ReactNode;\n className?: string;\n}\n\n/** One readout in a `<StatusBar>`. */\nexport function StatusBarItem(props: StatusBarItemProps) {\n const { title, muted, children, className } = props;\n const cls = [s.item, muted && s.muted, title !== undefined && s.hasTitle, className]\n .filter(Boolean).join(' ');\n return <span className={cls} title={title}>{children}</span>;\n}\n\n/**\n * Splits a status bar into leading and trailing runs — everything after the\n * spacer is pushed to the trailing edge. Decorative, so it's hidden from the\n * accessibility tree.\n */\nexport function StatusBarSpacer() {\n return <span className={s.spacer} aria-hidden=\"true\" />;\n}\n"],"mappings":";;;;;;;;;;ACyBA,SAAgB,EAAU,GAAuB;CAC/C,IAAM,EAAE,cAAW,aAAU,iBAAc;AAC3C,QACE,kBAAC,UAAD;EAAQ,WAAW,CAAC,EAAE,KAAK,EAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;EAAE,cAAY;EAC1E;EACM,CAAA;;AAqBb,SAAgB,EAAc,GAA2B;CACvD,IAAM,EAAE,UAAO,UAAO,aAAU,iBAAc;AAG9C,QAAO,kBAAC,QAAD;EAAM,WAFD;GAAC,EAAE;GAAM,KAAS,EAAE;GAAO,MAAU,KAAA,KAAa,EAAE;GAAU;GAAU,CACjF,OAAO,QAAQ,CAAC,KAAK,IACA;EAAY;EAAQ;EAAgB,CAAA;;AAQ9D,SAAgB,IAAkB;AAChC,QAAO,kBAAC,QAAD;EAAM,WAAW,EAAE;EAAQ,eAAY;EAAS,CAAA"}
@@ -0,0 +1,27 @@
1
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
+ import { forwardRef as n } from "react";
3
+ import { Switch as r } from "react-aria-components";
4
+ var i = {
5
+ switch: "_switch_4x0jo_1",
6
+ track: "_track_4x0jo_18",
7
+ thumb: "_thumb_4x0jo_38",
8
+ label: "_label_4x0jo_54"
9
+ }, a = n(function(n, a) {
10
+ let { children: o, className: s, ...c } = n;
11
+ return /* @__PURE__ */ t(r, {
12
+ ...c,
13
+ ref: a,
14
+ className: [i.switch, s].filter(Boolean).join(" "),
15
+ children: [/* @__PURE__ */ e("span", {
16
+ className: i.track,
17
+ children: /* @__PURE__ */ e("span", { className: i.thumb })
18
+ }), o !== void 0 && /* @__PURE__ */ e("span", {
19
+ className: i.label,
20
+ children: o
21
+ })]
22
+ });
23
+ });
24
+ //#endregion
25
+ export { a as t };
26
+
27
+ //# sourceMappingURL=Switch-CtZwp5zm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch-CtZwp5zm.js","names":[],"sources":["../../src/components/Switch/Switch.module.css","../../src/components/Switch/Switch.tsx"],"sourcesContent":[".switch {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n font-family: var(--wzl-font-ui);\n font-size: var(--wzl-font-size);\n color: var(--wzl-fg);\n user-select: none;\n -webkit-user-select: none;\n}\n\n.switch[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.track {\n position: relative;\n flex: 0 0 auto;\n width: 28px;\n height: 16px;\n background: var(--wzl-surface-sunken);\n border: 1px solid var(--wzl-border-strong);\n border-radius: var(--wzl-radius-pill);\n transition: background-color var(--wzl-motion-fast), border-color var(--wzl-motion-fast), box-shadow var(--wzl-motion-fast);\n}\n\n.switch[data-focus-visible] .track {\n box-shadow: 0 0 0 2px var(--wzl-focus-ring);\n}\n\n.switch[data-selected] .track {\n background: var(--wzl-accent-strong);\n border-color: var(--wzl-accent-strong);\n}\n\n.thumb {\n position: absolute;\n top: 1px;\n left: 1px;\n width: 12px;\n height: 12px;\n background: var(--wzl-fg);\n border-radius: 50%;\n transition: transform var(--wzl-motion-fast);\n}\n\n.switch[data-selected] .thumb {\n transform: translateX(12px);\n background: var(--wzl-fg-on-accent);\n}\n\n.label {\n line-height: 1.2;\n}\n","import { forwardRef, type ReactNode, type Ref } from 'react';\nimport {\n Switch as RACSwitch,\n type SwitchProps as RACSwitchProps,\n} from 'react-aria-components';\nimport s from './Switch.module.css';\n\n/**\n * Props for {@link Switch}, on top of React Aria's `Switch` props. The label\n * is passed as children.\n */\nexport type SwitchProps = Omit<RACSwitchProps, 'children' | 'className'> & {\n children?: ReactNode;\n className?: string;\n};\n\n/**\n * On/off toggle wrapping React Aria's Switch, skinned against the `--wzl-*`\n * tokens. Use for a setting that takes effect immediately; use `Checkbox`\n * for one that is submitted with a form.\n *\n * `ref` forwards to the underlying label element.\n */\nexport const Switch = forwardRef(function Switch(\n props: SwitchProps,\n ref: Ref<HTMLLabelElement>,\n) {\n const { children, className, ...rest } = props;\n return (\n <RACSwitch\n {...rest}\n ref={ref}\n className={[s.switch, className].filter(Boolean).join(' ')}\n >\n <span className={s.track}>\n <span className={s.thumb} />\n </span>\n {children !== undefined && <span className={s.label}>{children}</span>}\n </RACSwitch>\n );\n});\n"],"mappings":";;;;;;;;GCuBa,IAAS,EAAW,SAC/B,GACA,GACA;CACA,IAAM,EAAE,aAAU,cAAW,GAAG,MAAS;AACzC,QACE,kBAAC,GAAD;EACE,GAAI;EACC;EACL,WAAW,CAAC,EAAE,QAAQ,EAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;YAH5D,CAKE,kBAAC,QAAD;GAAM,WAAW,EAAE;aACjB,kBAAC,QAAD,EAAM,WAAW,EAAE,OAAS,CAAA;GACvB,CAAA,EACN,MAAa,KAAA,KAAa,kBAAC,QAAD;GAAM,WAAW,EAAE;GAAQ;GAAgB,CAAA,CAC5D;;EAEd"}
@@ -0,0 +1,41 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { Tab as t, TabList as n, TabPanel as r, Tabs as i } from "react-aria-components";
3
+ var a = {
4
+ tabs: "_tabs_1mx31_1",
5
+ list: "_list_1mx31_18",
6
+ tab: "_tab_1mx31_1",
7
+ panel: "_panel_1mx31_81"
8
+ };
9
+ //#endregion
10
+ //#region src/components/Tabs/Tabs.tsx
11
+ function o({ children: t, className: n, ...r }) {
12
+ return /* @__PURE__ */ e(i, {
13
+ ...r,
14
+ className: [a.tabs, n].filter(Boolean).join(" "),
15
+ children: t
16
+ });
17
+ }
18
+ function s({ className: t, ...r }) {
19
+ return /* @__PURE__ */ e(n, {
20
+ ...r,
21
+ className: [a.list, t].filter(Boolean).join(" ")
22
+ });
23
+ }
24
+ function c({ children: n, className: r, ...i }) {
25
+ return /* @__PURE__ */ e(t, {
26
+ ...i,
27
+ className: [a.tab, r].filter(Boolean).join(" "),
28
+ children: n
29
+ });
30
+ }
31
+ function l({ children: t, className: n, ...i }) {
32
+ return /* @__PURE__ */ e(r, {
33
+ ...i,
34
+ className: [a.panel, n].filter(Boolean).join(" "),
35
+ children: t
36
+ });
37
+ }
38
+ //#endregion
39
+ export { o as i, s as n, l as r, c as t };
40
+
41
+ //# sourceMappingURL=Tabs-lB0IB4TX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tabs-lB0IB4TX.js","names":[],"sources":["../../src/components/Tabs/Tabs.module.css","../../src/components/Tabs/Tabs.tsx"],"sourcesContent":[".tabs {\n display: flex;\n flex-direction: column;\n gap: 0;\n font-family: var(--wzl-font-ui);\n color: var(--wzl-fg);\n}\n\n.tabs[data-orientation=\"horizontal\"] {\n flex-direction: column;\n}\n\n.tabs[data-orientation=\"vertical\"] {\n flex-direction: row;\n gap: 12px;\n}\n\n.list {\n display: flex;\n gap: 2px;\n border-bottom: 1px solid var(--wzl-border);\n}\n\n.tabs[data-orientation=\"vertical\"] .list {\n flex-direction: column;\n border-bottom: none;\n border-right: 1px solid var(--wzl-border);\n padding-right: 8px;\n}\n\n.tab {\n position: relative;\n padding: 6px 10px;\n background: transparent;\n border: none;\n color: var(--wzl-fg-muted);\n font: inherit;\n font-size: var(--wzl-font-size-sm);\n cursor: pointer;\n outline: none;\n transition: color var(--wzl-motion-fast);\n}\n\n.tab[data-hovered]:not([data-disabled]) {\n color: var(--wzl-fg);\n}\n\n.tab[data-selected] {\n color: var(--wzl-fg);\n}\n\n.tab[data-selected]::after {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n bottom: -1px;\n height: 2px;\n background: var(--wzl-accent-strong);\n}\n\n.tabs[data-orientation=\"vertical\"] .tab[data-selected]::after {\n left: auto;\n right: -9px;\n top: 0;\n bottom: 0;\n width: 2px;\n height: auto;\n}\n\n.tab[data-focus-visible] {\n box-shadow: inset 0 0 0 2px var(--wzl-focus-ring);\n border-radius: var(--wzl-radius-sm);\n}\n\n.tab[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.panel {\n padding: 12px 0;\n outline: none;\n}\n\n.panel[data-focus-visible] {\n box-shadow: inset 0 0 0 2px var(--wzl-focus-ring);\n border-radius: var(--wzl-radius-sm);\n}\n","import type { ReactNode } from 'react';\nimport {\n Tabs as RACTabs,\n TabList as RACTabList,\n Tab as RACTab,\n TabPanel as RACTabPanel,\n type TabsProps as RACTabsProps,\n type TabListProps as RACTabListProps,\n type TabProps as RACTabProps,\n type TabPanelProps as RACTabPanelProps,\n} from 'react-aria-components';\nimport s from './Tabs.module.css';\n\n/** Props for {@link Tabs}, on top of React Aria's `Tabs` props. */\nexport type TabsProps = Omit<RACTabsProps, 'className' | 'children'> & {\n children?: ReactNode;\n className?: string;\n};\n\n/**\n * Tab set wrapping React Aria's Tabs, skinned against the `--wzl-*` tokens.\n * Holds a {@link TabList} and one {@link TabPanel} per tab.\n */\nexport function Tabs({ children, className, ...rest }: TabsProps) {\n return (\n <RACTabs {...rest} className={[s.tabs, className].filter(Boolean).join(' ')}>\n {children}\n </RACTabs>\n );\n}\n\n/** Props for {@link TabList}, on top of React Aria's `TabList` props. */\nexport type TabListProps<T extends object> = Omit<RACTabListProps<T>, 'className'> & {\n className?: string;\n};\n\n/** The row of tab buttons inside a {@link Tabs}. */\nexport function TabList<T extends object>({ className, ...rest }: TabListProps<T>) {\n return <RACTabList<T> {...rest} className={[s.list, className].filter(Boolean).join(' ')} />;\n}\n\n/** Props for {@link Tab}, on top of React Aria's `Tab` props. */\nexport type TabProps = Omit<RACTabProps, 'className' | 'children'> & {\n children?: ReactNode;\n className?: string;\n};\n\n/** One tab button. Its `id` selects the {@link TabPanel} it reveals. */\nexport function Tab({ children, className, ...rest }: TabProps) {\n return (\n <RACTab {...rest} className={[s.tab, className].filter(Boolean).join(' ')}>\n {children}\n </RACTab>\n );\n}\n\n/** Props for {@link TabPanel}, on top of React Aria's `TabPanel` props. */\nexport type TabPanelProps = Omit<RACTabPanelProps, 'className' | 'children'> & {\n children?: ReactNode;\n className?: string;\n};\n\n/** The content shown for the {@link Tab} whose `id` matches this panel's. */\nexport function TabPanel({ children, className, ...rest }: TabPanelProps) {\n return (\n <RACTabPanel {...rest} className={[s.panel, className].filter(Boolean).join(' ')}>\n {children}\n </RACTabPanel>\n );\n}\n"],"mappings":";;;;;;;;;;ACuBA,SAAgB,EAAK,EAAE,aAAU,cAAW,GAAG,KAAmB;AAChE,QACE,kBAAC,GAAD;EAAS,GAAI;EAAM,WAAW,CAAC,EAAE,MAAM,EAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;EACxE;EACO,CAAA;;AAUd,SAAgB,EAA0B,EAAE,cAAW,GAAG,KAAyB;AACjF,QAAO,kBAAC,GAAD;EAAe,GAAI;EAAM,WAAW,CAAC,EAAE,MAAM,EAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;EAAI,CAAA;;AAU9F,SAAgB,EAAI,EAAE,aAAU,cAAW,GAAG,KAAkB;AAC9D,QACE,kBAAC,GAAD;EAAQ,GAAI;EAAM,WAAW,CAAC,EAAE,KAAK,EAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;EACtE;EACM,CAAA;;AAWb,SAAgB,EAAS,EAAE,aAAU,cAAW,GAAG,KAAuB;AACxE,QACE,kBAAC,GAAD;EAAa,GAAI;EAAM,WAAW,CAAC,EAAE,OAAO,EAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;EAC7E;EACW,CAAA"}
@@ -1,5 +1,5 @@
1
- import { Button as e, Text as t, UNSTABLE_Toast as n, UNSTABLE_ToastContent as r, UNSTABLE_ToastQueue as i, UNSTABLE_ToastRegion as a } from "react-aria-components";
2
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
+ import { Button as n, Text as r, UNSTABLE_Toast as i, UNSTABLE_ToastContent as a, UNSTABLE_ToastQueue as o, UNSTABLE_ToastRegion as s } from "react-aria-components";
3
3
  import { flushSync as c } from "react-dom";
4
4
  //#region src/components/Toast/queue.ts
5
5
  var l = 8e3, u = 0;
@@ -19,7 +19,7 @@ function d(e) {
19
19
  var f = /* @__PURE__ */ new WeakMap(), p = class {
20
20
  keysById = /* @__PURE__ */ new Map();
21
21
  constructor() {
22
- f.set(this, new i({
22
+ f.set(this, new o({
23
23
  maxVisibleToasts: 5,
24
24
  wrapUpdate: d
25
25
  }));
@@ -63,20 +63,20 @@ var v = Object.assign(_("info"), {
63
63
  warning: _("warning"),
64
64
  error: _("error")
65
65
  }), y = {
66
- region: "_region_18i9b_1",
67
- bottomRight: "_bottomRight_18i9b_17",
68
- bottomLeft: "_bottomLeft_18i9b_18",
69
- topRight: "_topRight_18i9b_19",
70
- topLeft: "_topLeft_18i9b_20",
71
- toast: "_toast_18i9b_22",
72
- toneInfo: "_toneInfo_18i9b_48",
73
- toneSuccess: "_toneSuccess_18i9b_49",
74
- toneWarning: "_toneWarning_18i9b_50",
75
- toneError: "_toneError_18i9b_51",
76
- content: "_content_18i9b_53",
77
- title: "_title_18i9b_58",
78
- description: "_description_18i9b_64",
79
- close: "_close_18i9b_71"
66
+ region: "_region_611s6_1",
67
+ bottomRight: "_bottomRight_611s6_17",
68
+ bottomLeft: "_bottomLeft_611s6_18",
69
+ topRight: "_topRight_611s6_19",
70
+ topLeft: "_topLeft_611s6_20",
71
+ toast: "_toast_611s6_22",
72
+ toneInfo: "_toneInfo_611s6_48",
73
+ toneSuccess: "_toneSuccess_611s6_49",
74
+ toneWarning: "_toneWarning_611s6_50",
75
+ toneError: "_toneError_611s6_51",
76
+ content: "_content_611s6_53",
77
+ title: "_title_611s6_58",
78
+ description: "_description_611s6_64",
79
+ close: "_close_611s6_71"
80
80
  }, b = {
81
81
  "bottom-right": y.bottomRight,
82
82
  "bottom-left": y.bottomLeft,
@@ -88,9 +88,9 @@ var v = Object.assign(_("info"), {
88
88
  warning: y.toneWarning,
89
89
  error: y.toneError
90
90
  };
91
- function S(i) {
92
- let { queue: c = g, placement: l = "bottom-right", className: u } = i;
93
- return /* @__PURE__ */ o(a, {
91
+ function S(o) {
92
+ let { queue: c = g, placement: l = "bottom-right", className: u } = o;
93
+ return /* @__PURE__ */ e(s, {
94
94
  queue: h(c),
95
95
  "aria-label": "Notifications",
96
96
  className: [
@@ -98,22 +98,22 @@ function S(i) {
98
98
  b[l],
99
99
  u
100
100
  ].filter(Boolean).join(" "),
101
- children: ({ toast: i }) => /* @__PURE__ */ s(n, {
102
- toast: i,
103
- className: [y.toast, x[i.content.tone]].filter(Boolean).join(" "),
104
- style: { viewTransitionName: `wzl-toast-${i.key.replace(/[^a-zA-Z0-9_-]/g, "_")}` },
105
- children: [/* @__PURE__ */ s(r, {
101
+ children: ({ toast: o }) => /* @__PURE__ */ t(i, {
102
+ toast: o,
103
+ className: [y.toast, x[o.content.tone]].filter(Boolean).join(" "),
104
+ style: { viewTransitionName: `wzl-toast-${o.key.replace(/[^a-zA-Z0-9_-]/g, "_")}` },
105
+ children: [/* @__PURE__ */ t(a, {
106
106
  className: y.content,
107
- children: [/* @__PURE__ */ o(t, {
107
+ children: [/* @__PURE__ */ e(r, {
108
108
  slot: "title",
109
109
  className: y.title,
110
- children: i.content.title
111
- }), i.content.description !== void 0 && /* @__PURE__ */ o(t, {
110
+ children: o.content.title
111
+ }), o.content.description !== void 0 && /* @__PURE__ */ e(r, {
112
112
  slot: "description",
113
113
  className: y.description,
114
- children: i.content.description
114
+ children: o.content.description
115
115
  })]
116
- }), /* @__PURE__ */ o(e, {
116
+ }), /* @__PURE__ */ e(n, {
117
117
  slot: "close",
118
118
  className: y.close,
119
119
  "aria-label": "Dismiss notification",
@@ -125,4 +125,4 @@ function S(i) {
125
125
  //#endregion
126
126
  export { v as a, g as i, p as n, m as r, S as t };
127
127
 
128
- //# sourceMappingURL=Toast-DFw4IrD_.js.map
128
+ //# sourceMappingURL=Toast-hr9BYsho.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Toast-DFw4IrD_.js","names":[],"sources":["../../src/components/Toast/queue.ts","../../src/components/Toast/Toast.module.css","../../src/components/Toast/Toast.tsx"],"sourcesContent":["import { UNSTABLE_ToastQueue } from 'react-aria-components';\nimport { flushSync } from 'react-dom';\n\n/** Severity of a toast, driving its accent color and icon. */\nexport type ToastTone = 'info' | 'success' | 'warning' | 'error';\n\n/** Kit-owned payload rendered inside each toast. */\nexport interface ToastContent {\n title: string;\n description?: string;\n tone: ToastTone;\n}\n\n/** Options for a single toast. */\nexport interface ToastOptions {\n description?: string;\n /**\n * Auto-dismiss delay in ms. Default 8000. `null` — sticky until dismissed.\n * Must be > 0; RAC treats 0 as no timer (sticky).\n */\n ttlMs?: number | null;\n /** Stable identity: re-adding with the same id replaces the earlier toast. */\n id?: string;\n}\n\nconst DEFAULT_TTL_MS = 8000;\n\n// Tracks overlapping toast-triggered view transitions so the `:root`\n// marker class survives until the *last* one settles.\nlet activeToastTransitions = 0;\n\n/**\n * RAC's sanctioned toast-animation hook: wrap every queue mutation in a\n * view transition so entry, exit, and the surviving stack's reflow all\n * animate (choreography lives in `toastViewTransitions.css`). Falls back\n * to a plain synchronous update when the browser lacks the API or the\n * user prefers reduced motion — i.e. exactly the pre-animation behavior.\n * The jsdom test environment always takes the fallback path.\n */\nfunction viewTransitionWrapUpdate(fn: () => void): void {\n const reduceMotion =\n typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;\n if (typeof document === 'undefined' || !('startViewTransition' in document) || reduceMotion) {\n fn();\n return;\n }\n // The marker class scopes the CSS that un-names `:root` (keeps the rest\n // of the page live and interactive during the transition) to\n // toast-owned transitions only.\n const root = document.documentElement;\n activeToastTransitions++;\n root.classList.add('wzl-toast-vt');\n // flushSync: the DOM must reflect the queue change inside the\n // transition callback, before the browser snapshots the new state.\n const vt = document.startViewTransition(() => flushSync(fn));\n // `ready` rejects when the browser skips the transition — routine under\n // a rapid burst of toasts, where each new transition supersedes the\n // in-flight one. The DOM update has still applied by then, but an\n // untouched `ready` surfaces the rejection as a console error, so\n // consume it.\n vt.ready.catch(() => {});\n void vt.finished.finally(() => {\n if (--activeToastTransitions === 0) root.classList.remove('wzl-toast-vt');\n });\n}\n\n// The wrapped RAC queue lives in a module-scoped WeakMap so the public\n// class surface carries no RAC (UNSTABLE_) types — see the design spec's\n// containment rule. `racQueueOf` below is the folder-internal accessor.\nconst RAC_QUEUES = new WeakMap<ToastQueue, UNSTABLE_ToastQueue<ToastContent>>();\n\n/**\n * Kit-owned toast queue. Create isolated instances with\n * `createToastQueue()` (tests, secondary roots); most apps use the\n * module-level `defaultToastQueue` via `toast()`.\n *\n * At most 5 toasts are visible at once; adding a 6th shows immediately\n * and hides the oldest (it returns when a slot frees, with its ttl\n * restarted).\n */\nexport class ToastQueue {\n private keysById = new Map<string, string>();\n\n constructor() {\n RAC_QUEUES.set(\n this,\n new UNSTABLE_ToastQueue<ToastContent>({\n maxVisibleToasts: 5,\n wrapUpdate: viewTransitionWrapUpdate,\n }),\n );\n }\n\n add(tone: ToastTone, title: string, options: ToastOptions = {}): void {\n const { description, ttlMs = DEFAULT_TTL_MS, id } = options;\n const rac = RAC_QUEUES.get(this)!;\n if (id !== undefined) {\n const existing = this.keysById.get(id);\n if (existing !== undefined) rac.close(existing);\n }\n let key: string;\n const racOptions: { timeout?: number; onClose?: () => void } =\n ttlMs === null ? {} : { timeout: ttlMs };\n if (id !== undefined) {\n racOptions.onClose = () => {\n if (this.keysById.get(id) === key) this.keysById.delete(id);\n };\n }\n key = rac.add({ title, description, tone }, racOptions);\n if (id !== undefined) this.keysById.set(id, key);\n }\n\n /** Dismiss the toast previously added with this `id`. No-op if none is live. */\n dismiss(id: string): void {\n const key = this.keysById.get(id);\n if (key !== undefined) RAC_QUEUES.get(this)!.close(key);\n }\n\n /** Dismiss every queued toast. */\n clear(): void {\n RAC_QUEUES.get(this)!.clear();\n this.keysById.clear();\n }\n}\n\n/**\n * Creates an independent toast queue. Most apps use the module-level\n * `defaultToastQueue` that `toast()` writes to; make your own when a surface\n * needs its own stack, and pass it to `ToastRegion`.\n */\nexport function createToastQueue(): ToastQueue {\n return new ToastQueue();\n}\n\n/**\n * Folder-internal bridge to the wrapped RAC queue for `ToastRegion`.\n * Deliberately NOT exported from the Toast folder's `index.ts` — the\n * RAC toast surface is unstable and must not leak past this folder.\n */\nexport function racQueueOf(queue: ToastQueue): UNSTABLE_ToastQueue<ToastContent> {\n return RAC_QUEUES.get(queue)!;\n}\n\n/** Module-level default queue used by `toast()` and `<ToastRegion>`. */\nexport const defaultToastQueue = createToastQueue();\n\ntype ToastFn = {\n (title: string, options?: ToastOptions): void;\n info(title: string, options?: ToastOptions): void;\n success(title: string, options?: ToastOptions): void;\n warning(title: string, options?: ToastOptions): void;\n error(title: string, options?: ToastOptions): void;\n};\n\nfunction tonedAdd(tone: ToastTone) {\n return (title: string, options?: ToastOptions) => defaultToastQueue.add(tone, title, options);\n}\n\n/** Imperative convenience over `defaultToastQueue`. Bare `toast(...)` is `info`. */\nexport const toast: ToastFn = Object.assign(tonedAdd('info'), {\n info: tonedAdd('info'),\n success: tonedAdd('success'),\n warning: tonedAdd('warning'),\n error: tonedAdd('error'),\n});\n",".region {\n position: fixed;\n z-index: 1100;\n display: flex;\n /* RAC unshifts new toasts to the front of the DOM (newest-first), and the\n * ol/li wrappers are display:contents, so the flex direction alone\n * decides which end of the stack the newest toast lands on. Base\n * (bottom corners): column-reverse puts DOM-first (newest) at the\n * bottom, hugging the corner. Top corners override back to column so\n * DOM-first still hugs the top edge. */\n flex-direction: column-reverse;\n gap: 8px;\n max-width: 360px;\n outline: none;\n}\n\n.bottomRight { bottom: 16px; right: 16px; }\n.bottomLeft { bottom: 16px; left: 16px; }\n.topRight { top: 16px; right: 16px; flex-direction: column; }\n.topLeft { top: 16px; left: 16px; flex-direction: column; }\n\n.toast {\n --toast-accent: var(--wzl-accent-strong);\n /* Groups every toast under one ident so toastViewTransitions.css can\n * target `::view-transition-new/old(.wzl-toast)` without knowing the\n * per-toast view-transition-name (set inline in Toast.tsx). */\n view-transition-class: wzl-toast;\n display: flex;\n align-items: flex-start;\n gap: 8px;\n background: var(--wzl-surface);\n border: 1px solid var(--wzl-border);\n border-left: 3px solid var(--toast-accent);\n border-radius: var(--wzl-radius-md);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);\n color: var(--wzl-fg);\n font-family: var(--wzl-font-ui);\n padding: 10px 12px;\n outline: none;\n}\n\n.region[data-focus-visible],\n.toast[data-focus-visible] {\n outline: 2px solid var(--wzl-focus-ring);\n outline-offset: 1px;\n}\n\n.toneInfo { /* default accent — uses --toast-accent fallback */ }\n.toneSuccess { --toast-accent: var(--wzl-success, #2ec27e); }\n.toneWarning { --toast-accent: var(--wzl-warning, #d99a3f); }\n.toneError { --toast-accent: var(--wzl-danger, #d94a3f); }\n\n.content {\n flex: 1;\n min-width: 0;\n}\n\n.title {\n display: block;\n font-size: 13px;\n font-weight: 600;\n}\n\n.description {\n display: block;\n margin-top: 2px;\n font-size: 12px;\n color: var(--wzl-fg-muted);\n}\n\n.close {\n flex: 0 0 auto;\n background: none;\n border: none;\n color: var(--wzl-fg-muted);\n font-size: 16px;\n line-height: 1;\n padding: 2px 4px;\n cursor: pointer;\n border-radius: var(--wzl-radius-sm);\n}\n\n.close:hover {\n color: var(--wzl-fg);\n}\n","import {\n UNSTABLE_ToastRegion as RACToastRegion,\n UNSTABLE_Toast as RACToast,\n UNSTABLE_ToastContent as RACToastContent,\n Text,\n Button,\n} from 'react-aria-components';\nimport { defaultToastQueue, racQueueOf, type ToastQueue, type ToastTone } from './queue';\nimport s from './Toast.module.css';\nimport './toastViewTransitions.css';\n\n/** Screen corner a toast stack anchors to. */\nexport type ToastPlacement = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';\n\n/** Props for {@link ToastRegion}. */\nexport interface ToastRegionProps {\n /** Queue to render. Defaults to the module-level `defaultToastQueue`. */\n queue?: ToastQueue;\n /** Screen corner for the stack. Default `bottom-right`. */\n placement?: ToastPlacement;\n className?: string;\n}\n\nconst placementClass: Record<ToastPlacement, string> = {\n 'bottom-right': s.bottomRight,\n 'bottom-left': s.bottomLeft,\n 'top-right': s.topRight,\n 'top-left': s.topLeft,\n};\n\nconst toneClass: Record<ToastTone, string> = {\n info: s.toneInfo,\n success: s.toneSuccess,\n warning: s.toneWarning,\n error: s.toneError,\n};\n\n/**\n * Renders the toast stack for a queue. Mount once, near the app root.\n * From the underlying React Aria region: landmark semantics (keyboard /\n * F6 reachable), screen-reader announcements, and hover pausing the\n * auto-dismiss timers.\n */\nexport function ToastRegion(props: ToastRegionProps) {\n const { queue = defaultToastQueue, placement = 'bottom-right', className } = props;\n return (\n <RACToastRegion\n queue={racQueueOf(queue)}\n aria-label=\"Notifications\"\n className={[s.region, placementClass[placement], className].filter(Boolean).join(' ')}\n >\n {({ toast: t }) => (\n <RACToast\n toast={t}\n className={[s.toast, toneClass[t.content.tone]].filter(Boolean).join(' ')}\n // Inline style is the one sanctioned exception here: each toast\n // needs a *unique* view-transition-name (so enter/exit/reflow\n // track per-toast), and a class can't mint unique idents. The\n // prefix keeps the ident valid (RAC keys can start with digits).\n style={{ viewTransitionName: `wzl-toast-${t.key.replace(/[^a-zA-Z0-9_-]/g, '_')}` }}\n >\n <RACToastContent className={s.content}>\n <Text slot=\"title\" className={s.title}>{t.content.title}</Text>\n {t.content.description !== undefined && (\n <Text slot=\"description\" className={s.description}>{t.content.description}</Text>\n )}\n </RACToastContent>\n <Button slot=\"close\" className={s.close} aria-label=\"Dismiss notification\">\n ×\n </Button>\n </RACToast>\n )}\n </RACToastRegion>\n );\n}\n"],"mappings":";;;;AAyBA,IAAM,IAAiB,KAInB,IAAyB;AAU7B,SAAS,EAAyB,GAAsB;CACtD,IAAM,IACJ,OAAO,cAAe,cAAc,WAAW,mCAAmC,CAAC;AACrF,KAAI,OAAO,WAAa,OAAe,EAAE,yBAAyB,aAAa,GAAc;AAC3F,KAAI;AACJ;;CAKF,IAAM,IAAO,SAAS;AAEtB,CADA,KACA,EAAK,UAAU,IAAI,eAAe;CAGlC,IAAM,IAAK,SAAS,0BAA0B,EAAU,EAAG,CAAC;AAOvD,CADL,EAAG,MAAM,YAAY,GAAG,EACnB,EA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toast/Toast.module.css","../../src/components/Toast/Toast.tsx"],"sourcesContent":["import { UNSTABLE_ToastQueue } from 'react-aria-components';\nimport { flushSync } from 'react-dom';\n\n/** Severity of a toast, driving its accent color and icon. */\nexport type ToastTone = 'info' | 'success' | 'warning' | 'error';\n\n/** Kit-owned payload rendered inside each toast. */\nexport interface ToastContent {\n title: string;\n description?: string;\n tone: ToastTone;\n}\n\n/** Options for a single toast. */\nexport interface ToastOptions {\n description?: string;\n /**\n * Auto-dismiss delay in ms. Default 8000. `null` — sticky until dismissed.\n * Must be > 0; RAC treats 0 as no timer (sticky).\n */\n ttlMs?: number | null;\n /** Stable identity: re-adding with the same id replaces the earlier toast. */\n id?: string;\n}\n\nconst DEFAULT_TTL_MS = 8000;\n\n// Tracks overlapping toast-triggered view transitions so the `:root`\n// marker class survives until the *last* one settles.\nlet activeToastTransitions = 0;\n\n/**\n * RAC's sanctioned toast-animation hook: wrap every queue mutation in a\n * view transition so entry, exit, and the surviving stack's reflow all\n * animate (choreography lives in `toastViewTransitions.css`). Falls back\n * to a plain synchronous update when the browser lacks the API or the\n * user prefers reduced motion — i.e. exactly the pre-animation behavior.\n * The jsdom test environment always takes the fallback path.\n */\nfunction viewTransitionWrapUpdate(fn: () => void): void {\n const reduceMotion =\n typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;\n if (typeof document === 'undefined' || !('startViewTransition' in document) || reduceMotion) {\n fn();\n return;\n }\n // The marker class scopes the CSS that un-names `:root` (keeps the rest\n // of the page live and interactive during the transition) to\n // toast-owned transitions only.\n const root = document.documentElement;\n activeToastTransitions++;\n root.classList.add('wzl-toast-vt');\n // flushSync: the DOM must reflect the queue change inside the\n // transition callback, before the browser snapshots the new state.\n const vt = document.startViewTransition(() => flushSync(fn));\n // `ready` rejects when the browser skips the transition — routine under\n // a rapid burst of toasts, where each new transition supersedes the\n // in-flight one. The DOM update has still applied by then, but an\n // untouched `ready` surfaces the rejection as a console error, so\n // consume it.\n vt.ready.catch(() => {});\n void vt.finished.finally(() => {\n if (--activeToastTransitions === 0) root.classList.remove('wzl-toast-vt');\n });\n}\n\n// The wrapped RAC queue lives in a module-scoped WeakMap so the public\n// class surface carries no RAC (UNSTABLE_) types — see the design spec's\n// containment rule. `racQueueOf` below is the folder-internal accessor.\nconst RAC_QUEUES = new WeakMap<ToastQueue, UNSTABLE_ToastQueue<ToastContent>>();\n\n/**\n * Kit-owned toast queue. Create isolated instances with\n * `createToastQueue()` (tests, secondary roots); most apps use the\n * module-level `defaultToastQueue` via `toast()`.\n *\n * At most 5 toasts are visible at once; adding a 6th shows immediately\n * and hides the oldest (it returns when a slot frees, with its ttl\n * restarted).\n */\nexport class ToastQueue {\n private keysById = new Map<string, string>();\n\n constructor() {\n RAC_QUEUES.set(\n this,\n new UNSTABLE_ToastQueue<ToastContent>({\n maxVisibleToasts: 5,\n wrapUpdate: viewTransitionWrapUpdate,\n }),\n );\n }\n\n add(tone: ToastTone, title: string, options: ToastOptions = {}): void {\n const { description, ttlMs = DEFAULT_TTL_MS, id } = options;\n const rac = RAC_QUEUES.get(this)!;\n if (id !== undefined) {\n const existing = this.keysById.get(id);\n if (existing !== undefined) rac.close(existing);\n }\n let key: string;\n const racOptions: { timeout?: number; onClose?: () => void } =\n ttlMs === null ? {} : { timeout: ttlMs };\n if (id !== undefined) {\n racOptions.onClose = () => {\n if (this.keysById.get(id) === key) this.keysById.delete(id);\n };\n }\n key = rac.add({ title, description, tone }, racOptions);\n if (id !== undefined) this.keysById.set(id, key);\n }\n\n /** Dismiss the toast previously added with this `id`. No-op if none is live. */\n dismiss(id: string): void {\n const key = this.keysById.get(id);\n if (key !== undefined) RAC_QUEUES.get(this)!.close(key);\n }\n\n /** Dismiss every queued toast. */\n clear(): void {\n RAC_QUEUES.get(this)!.clear();\n this.keysById.clear();\n }\n}\n\n/**\n * Creates an independent toast queue. Most apps use the module-level\n * `defaultToastQueue` that `toast()` writes to; make your own when a surface\n * needs its own stack, and pass it to `ToastRegion`.\n */\nexport function createToastQueue(): ToastQueue {\n return new ToastQueue();\n}\n\n/**\n * Folder-internal bridge to the wrapped RAC queue for `ToastRegion`.\n * Deliberately NOT exported from the Toast folder's `index.ts` — the\n * RAC toast surface is unstable and must not leak past this folder.\n */\nexport function racQueueOf(queue: ToastQueue): UNSTABLE_ToastQueue<ToastContent> {\n return RAC_QUEUES.get(queue)!;\n}\n\n/** Module-level default queue used by `toast()` and `<ToastRegion>`. */\nexport const defaultToastQueue = createToastQueue();\n\ntype ToastFn = {\n (title: string, options?: ToastOptions): void;\n info(title: string, options?: ToastOptions): void;\n success(title: string, options?: ToastOptions): void;\n warning(title: string, options?: ToastOptions): void;\n error(title: string, options?: ToastOptions): void;\n};\n\nfunction tonedAdd(tone: ToastTone) {\n return (title: string, options?: ToastOptions) => defaultToastQueue.add(tone, title, options);\n}\n\n/** Imperative convenience over `defaultToastQueue`. Bare `toast(...)` is `info`. */\nexport const toast: ToastFn = Object.assign(tonedAdd('info'), {\n info: tonedAdd('info'),\n success: tonedAdd('success'),\n warning: tonedAdd('warning'),\n error: tonedAdd('error'),\n});\n",".region {\n position: fixed;\n z-index: 1100;\n display: flex;\n /* RAC unshifts new toasts to the front of the DOM (newest-first), and the\n * ol/li wrappers are display:contents, so the flex direction alone\n * decides which end of the stack the newest toast lands on. Base\n * (bottom corners): column-reverse puts DOM-first (newest) at the\n * bottom, hugging the corner. Top corners override back to column so\n * DOM-first still hugs the top edge. */\n flex-direction: column-reverse;\n gap: 8px;\n max-width: 360px;\n outline: none;\n}\n\n.bottomRight { bottom: 16px; right: 16px; }\n.bottomLeft { bottom: 16px; left: 16px; }\n.topRight { top: 16px; right: 16px; flex-direction: column; }\n.topLeft { top: 16px; left: 16px; flex-direction: column; }\n\n.toast {\n --toast-accent: var(--wzl-accent-strong);\n /* Groups every toast under one ident so toastViewTransitions.css can\n * target `::view-transition-new/old(.wzl-toast)` without knowing the\n * per-toast view-transition-name (set inline in Toast.tsx). */\n view-transition-class: wzl-toast;\n display: flex;\n align-items: flex-start;\n gap: 8px;\n background: var(--wzl-surface);\n border: 1px solid var(--wzl-border);\n border-left: 3px solid var(--toast-accent);\n border-radius: var(--wzl-radius-md);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);\n color: var(--wzl-fg);\n font-family: var(--wzl-font-ui);\n padding: 10px 12px;\n outline: none;\n}\n\n.region[data-focus-visible],\n.toast[data-focus-visible] {\n outline: 2px solid var(--wzl-focus-ring);\n outline-offset: 1px;\n}\n\n.toneInfo { /* default accent — uses --toast-accent fallback */ }\n.toneSuccess { --toast-accent: var(--wzl-success, #2ec27e); }\n.toneWarning { --toast-accent: var(--wzl-warning, #d99a3f); }\n.toneError { --toast-accent: var(--wzl-danger); }\n\n.content {\n flex: 1;\n min-width: 0;\n}\n\n.title {\n display: block;\n font-size: var(--wzl-font-size);\n font-weight: var(--wzl-font-weight-bold);\n}\n\n.description {\n display: block;\n margin-top: 2px;\n font-size: var(--wzl-font-size-sm);\n color: var(--wzl-fg-muted);\n}\n\n.close {\n flex: 0 0 auto;\n background: none;\n border: none;\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-lg);\n line-height: 1;\n padding: 2px 4px;\n cursor: pointer;\n border-radius: var(--wzl-radius-sm);\n}\n\n.close:hover {\n color: var(--wzl-fg);\n}\n","import {\n UNSTABLE_ToastRegion as RACToastRegion,\n UNSTABLE_Toast as RACToast,\n UNSTABLE_ToastContent as RACToastContent,\n Text,\n Button,\n} from 'react-aria-components';\nimport { defaultToastQueue, racQueueOf, type ToastQueue, type ToastTone } from './queue';\nimport s from './Toast.module.css';\nimport './toastViewTransitions.css';\n\n/** Screen corner a toast stack anchors to. */\nexport type ToastPlacement = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';\n\n/** Props for {@link ToastRegion}. */\nexport interface ToastRegionProps {\n /** Queue to render. Defaults to the module-level `defaultToastQueue`. */\n queue?: ToastQueue;\n /** Screen corner for the stack. Default `bottom-right`. */\n placement?: ToastPlacement;\n className?: string;\n}\n\nconst placementClass: Record<ToastPlacement, string> = {\n 'bottom-right': s.bottomRight,\n 'bottom-left': s.bottomLeft,\n 'top-right': s.topRight,\n 'top-left': s.topLeft,\n};\n\nconst toneClass: Record<ToastTone, string> = {\n info: s.toneInfo,\n success: s.toneSuccess,\n warning: s.toneWarning,\n error: s.toneError,\n};\n\n/**\n * Renders the toast stack for a queue. Mount once, near the app root.\n * From the underlying React Aria region: landmark semantics (keyboard /\n * F6 reachable), screen-reader announcements, and hover pausing the\n * auto-dismiss timers.\n */\nexport function ToastRegion(props: ToastRegionProps) {\n const { queue = defaultToastQueue, placement = 'bottom-right', className } = props;\n return (\n <RACToastRegion\n queue={racQueueOf(queue)}\n aria-label=\"Notifications\"\n className={[s.region, placementClass[placement], className].filter(Boolean).join(' ')}\n >\n {({ toast: t }) => (\n <RACToast\n toast={t}\n className={[s.toast, toneClass[t.content.tone]].filter(Boolean).join(' ')}\n // Inline style is the one sanctioned exception here: each toast\n // needs a *unique* view-transition-name (so enter/exit/reflow\n // track per-toast), and a class can't mint unique idents. The\n // prefix keeps the ident valid (RAC keys can start with digits).\n style={{ viewTransitionName: `wzl-toast-${t.key.replace(/[^a-zA-Z0-9_-]/g, '_')}` }}\n >\n <RACToastContent className={s.content}>\n <Text slot=\"title\" className={s.title}>{t.content.title}</Text>\n {t.content.description !== undefined && (\n <Text slot=\"description\" className={s.description}>{t.content.description}</Text>\n )}\n </RACToastContent>\n <Button slot=\"close\" className={s.close} aria-label=\"Dismiss notification\">\n ×\n </Button>\n </RACToast>\n )}\n </RACToastRegion>\n );\n}\n"],"mappings":";;;;AAyBA,IAAM,IAAiB,KAInB,IAAyB;AAU7B,SAAS,EAAyB,GAAsB;CACtD,IAAM,IACJ,OAAO,cAAe,cAAc,WAAW,mCAAmC,CAAC;AACrF,KAAI,OAAO,WAAa,OAAe,EAAE,yBAAyB,aAAa,GAAc;AAC3F,KAAI;AACJ;;CAKF,IAAM,IAAO,SAAS;AAEtB,CADA,KACA,E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,cAAW;cAAuB;IAElE,CAAA,CACA;;EAEE,CAAA"}
@@ -1,13 +1,14 @@
1
- import { t as e } from "./useRovingTabIndex-DBZtq4IH.js";
2
- import "react";
1
+ import { t as e } from "./useRovingTabIndex-CQz8EiKh.js";
3
2
  import { jsx as t } from "react/jsx-runtime";
3
+ import "react";
4
4
  var n = {
5
- root: "_root_1pyfg_6",
6
- segment: "_segment_1pyfg_28",
7
- segmentSelected: "_segmentSelected_1pyfg_75",
8
- segmentMixed: "_segmentMixed_1pyfg_134",
9
- variant_minimal: "_variant_minimal_1pyfg_144",
10
- size_sm: "_size_sm_1pyfg_153"
5
+ root: "_root_164gt_6",
6
+ segment: "_segment_164gt_28",
7
+ segmentSelected: "_segmentSelected_164gt_87",
8
+ segmentMixed: "_segmentMixed_164gt_146",
9
+ variant_minimal: "_variant_minimal_164gt_156",
10
+ size_sm: "_size_sm_164gt_165",
11
+ variant_flat: "_variant_flat_164gt_240"
11
12
  };
12
13
  //#endregion
13
14
  //#region src/components/ToggleBar/ToggleBar.tsx
@@ -34,7 +35,7 @@ function r(r) {
34
35
  tabStopIndex: m >= 0 && !i[m].disabled ? m : void 0,
35
36
  onNavigate: u === "single" ? (e) => r.onChange(i[e].value) : void 0,
36
37
  onActivate: u === "multiple" ? (e) => p(e)() : void 0
37
- }), g = s === void 0 ? void 0 : { "--wzl-tb-height": `${s}px` }, _ = [
38
+ }), g = s === void 0 ? void 0 : { "--tb-h": `${s}px` }, _ = [
38
39
  n.root,
39
40
  c && n[`size_${c}`],
40
41
  l && n[`variant_${l}`],
@@ -71,4 +72,4 @@ function r(r) {
71
72
  //#endregion
72
73
  export { r as t };
73
74
 
74
- //# sourceMappingURL=ToggleBar-BP1zFcvg.js.map
75
+ //# sourceMappingURL=ToggleBar-BxgWq-wO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToggleBar-BxgWq-wO.js","names":[],"sources":["../../src/components/ToggleBar/ToggleBar.module.css","../../src/components/ToggleBar/ToggleBar.tsx"],"sourcesContent":["/* Aqua-glass segmented control. The track is a pill-shaped well; the\n selected segment becomes a tinted glass cylinder that reads as the same\n \"lozenge\" family as the standalone Button. Visual params come from the\n `--btn-*` custom properties (see Button.module.css) so the Button Lab\n can tune both surfaces with one set of sliders. */\n.root {\n display: inline-flex;\n height: var(--tb-h, var(--wzl-control-h, 24px));\n padding: 2px;\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 0.18) 0%,\n rgba(0, 0, 0, 0.05) 100%\n );\n border-radius: var(--wzl-radius-pill);\n /* Clip segments to the track outline so interior corners read crisp and\n the selected segment's glass treatment doesn't paint over the rounded\n outer pixels. */\n overflow: hidden;\n box-shadow:\n inset 0 1px 2px rgba(0, 0, 0, 0.4),\n 0 1px 0 rgba(255, 255, 255, 0.06);\n user-select: none;\n -webkit-user-select: none;\n touch-action: none;\n}\n\n.segment {\n position: relative;\n flex: 1 1 0;\n min-width: 0;\n padding: 0 12px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n background: transparent;\n border: none;\n margin: 0;\n font-family: var(--wzl-font-ui);\n font-weight: var(--wzl-font-weight-normal);\n font-size: var(--btn-fontsize, var(--wzl-font-size));\n line-height: 1;\n color: var(--wzl-fg-muted);\n cursor: pointer;\n /* Only round the outer corners of the bar — middle segments stay square\n so the seams between them don't render as facing parentheses. */\n border-radius: 0;\n isolation: isolate;\n overflow: hidden;\n transition: color var(--wzl-motion-fast);\n}\n\n/* A glyph label is a fixed box, not text that can reflow: without this it is\n the only thing in the segment flex can take width from, and three bars in\n one property row squeeze it to nothing. The side padding drops with it —\n 8px around a 14px glyph is most of a segment. */\n.segment > svg {\n flex: none;\n}\n\n.segment:has(> svg) {\n padding: 0 5px;\n}\n\n.segment:first-child {\n border-radius: var(--wzl-radius-pill) 0 0 var(--wzl-radius-pill);\n}\n\n.segment:last-child {\n border-radius: 0 var(--wzl-radius-pill) var(--wzl-radius-pill) 0;\n}\n\n.segment:only-child {\n border-radius: var(--wzl-radius-pill);\n}\n\n.segment:focus-visible {\n outline: 2px solid var(--wzl-accent);\n outline-offset: -2px;\n}\n\n.segment:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.segment:hover:not(:disabled):not(.segmentSelected) {\n color: var(--wzl-fg);\n}\n\n/* Selected segment — full Aqua glass cylinder. Mirrors Button.variant_primary. */\n.segmentSelected {\n background: linear-gradient(\n 180deg,\n color-mix(in srgb, var(--wzl-accent) var(--btn-top-alpha, 45%), transparent) 0%,\n color-mix(in srgb, var(--wzl-accent) var(--btn-upper-alpha, 70%), transparent) calc(var(--btn-equator, 52%) - var(--btn-equator-spread, 12%)),\n color-mix(in srgb, var(--wzl-accent) var(--btn-equator-tint, 95%), white) var(--btn-equator, 52%),\n var(--wzl-accent) calc(var(--btn-equator, 52%) + var(--btn-equator-spread, 12%) * 1.6),\n color-mix(in srgb, var(--wzl-accent) var(--btn-base-tint, 70%), black) 100%\n );\n backdrop-filter: blur(var(--btn-blur, 6px)) saturate(var(--btn-saturate, 1.3));\n -webkit-backdrop-filter: blur(var(--btn-blur, 6px)) saturate(var(--btn-saturate, 1.3));\n color: var(--wzl-fg-on-accent);\n text-shadow:\n 0 1px 0 rgba(0, 0, 0, var(--btn-text-shadow, 0.35)),\n var(--btn-text-inset-x, 0px) var(--btn-text-inset-y, 1px) 0 rgba(0, 0, 0, var(--btn-text-inset, 0.55)),\n 0 0 6px rgba(0, 0, 0, calc(var(--btn-text-shadow, 0.35) * 0.5));\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, var(--btn-inset-hi, 0.42)),\n inset 0 -1px 2px rgba(0, 0, 0, var(--btn-inset-lo, 0.3)),\n 0 0 0 1px rgba(0, 0, 0, var(--btn-rim, 0.22)),\n 0 1px 2px rgba(0, 0, 0, var(--btn-drop-near, 0.3)),\n 0 2px 4px rgba(0, 0, 0, calc(var(--btn-drop-far, 0.18) * 0.8));\n}\n\n/* Specular gloss on the selected segment. Top corners inherit the\n segment's radius so they hug the upper edge cleanly; bottom corners\n are flattened so the gloss ends in a straight line at the equator\n instead of two little curves that read as `)(` brackets. */\n.segmentSelected::before {\n content: '';\n position: absolute;\n inset: 1px 1px var(--btn-gloss-bottom, 50%) 1px;\n border-radius: inherit;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n background: linear-gradient(\n 180deg,\n rgba(255, 255, 255, var(--btn-gloss-top, 0.42)) 0%,\n rgba(255, 255, 255, var(--btn-gloss-mid, 0.12)) 60%,\n rgba(255, 255, 255, 0) 100%\n );\n pointer-events: none;\n z-index: 1;\n}\n\n.segmentSelected > * {\n position: relative;\n z-index: 2;\n}\n\n/* Mixed segment (`aria-pressed=\"mixed\"`) — the sources disagree. Reads as a\n deliberate third state rather than a dimmed \"on\": a flat accent wash with\n none of the selected segment's gloss/cylinder treatment, so it can't be\n mistaken for the glass lozenge at a glance. */\n.segmentMixed {\n background: color-mix(in srgb, var(--wzl-accent) 22%, transparent);\n color: var(--wzl-fg);\n box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wzl-accent) 45%, transparent);\n}\n\n.segmentMixed:hover:not(:disabled) {\n background: color-mix(in srgb, var(--wzl-accent) 32%, transparent);\n}\n\n.variant_minimal .segmentMixed {\n background: color-mix(in srgb, var(--wzl-accent) 18%, transparent);\n box-shadow: none;\n color: var(--wzl-fg);\n}\n\n/* Small variant — ~60% of the default height, with proportionally reduced\n padding and font. Sized for dense surfaces (lab control panels, inline\n filters, etc.). */\n.size_sm {\n height: 17px;\n padding: 1px;\n}\n\n.size_sm .segment {\n padding: 0 8px;\n font-size: var(--wzl-font-size-sm);\n}\n\n/* `.size_sm .segment` outranks the glyph rule above on specificity, so a\n small bar's glyph segments need the tight padding restated to stay\n near-square rather than reading as wide plates. */\n.size_sm .segment:has(> svg) {\n padding: 0 3px;\n}\n\n/* Minimal variant — strips the pill track, glass selected state, inset\n shadows, and outer padding. Used in dense diagnostic surfaces (dispatch\n trace, lab inspectors) where the bar must read as plain text controls. */\n.variant_minimal {\n height: auto;\n padding: 0;\n background: none;\n border: 1px solid var(--wzl-border);\n border-radius: var(--wzl-radius-sm);\n box-shadow: none;\n gap: 0;\n}\n\n.variant_minimal .segment {\n padding: 0 6px;\n font-size: var(--wzl-font-size-sm);\n font-weight: var(--wzl-font-weight-medium);\n line-height: 1.4;\n border-radius: 0;\n color: var(--wzl-fg-muted);\n transition: none;\n}\n\n/* Dividers between segments make the mutual-exclusion grouping visible\n without a heavy track. Only the inner edges get a rule — the outer\n border on `.variant_minimal` handles the perimeter. */\n.variant_minimal .segment + .segment {\n border-left: 1px solid var(--wzl-border);\n}\n\n.variant_minimal .segment:first-child,\n.variant_minimal .segment:last-child,\n.variant_minimal .segment:only-child {\n border-radius: 0;\n}\n\n.variant_minimal .segment:hover:not(:disabled):not(.segmentSelected) {\n color: var(--wzl-fg);\n background: var(--wzl-surface-hover);\n}\n\n.variant_minimal .segmentSelected {\n background: none;\n backdrop-filter: none;\n -webkit-backdrop-filter: none;\n color: var(--wzl-accent-fg, var(--wzl-accent));\n text-shadow: none;\n box-shadow: none;\n font-weight: var(--wzl-font-weight-medium);\n}\n\n.variant_minimal .segmentSelected::before {\n content: none;\n}\n\n/* Flat variant — no track, no glass, no pill: each segment is its own\n outlined cell. For property panels, where a bar sits in a row beside\n inputs and the glass cylinder makes it the loudest thing on the surface. */\n.variant_flat {\n padding: 0;\n background: none;\n border-radius: var(--wzl-radius-sm);\n box-shadow: none;\n overflow: visible;\n}\n\n.variant_flat .segment {\n border: 1px solid var(--wzl-border-strong);\n border-radius: 0;\n /* Sunken, so an unselected cell sits below the panel and the selected one\n reads as raised without needing the glass treatment back. */\n background: var(--wzl-surface-sunken);\n color: var(--wzl-fg-muted);\n}\n\n/* Adjacent cells share one rule rather than stacking two. */\n.variant_flat .segment + .segment {\n margin-inline-start: -1px;\n}\n\n.variant_flat .segment:first-child {\n border-start-start-radius: var(--wzl-radius-sm);\n border-end-start-radius: var(--wzl-radius-sm);\n}\n\n.variant_flat .segment:last-child {\n border-start-end-radius: var(--wzl-radius-sm);\n border-end-end-radius: var(--wzl-radius-sm);\n}\n\n.variant_flat .segment:hover:not(:disabled):not(.segmentSelected) {\n background: var(--wzl-surface-hover);\n color: var(--wzl-fg);\n}\n\n.variant_flat .segmentSelected {\n background: var(--wzl-accent);\n border-color: var(--wzl-accent);\n color: var(--wzl-fg-on-accent);\n backdrop-filter: none;\n -webkit-backdrop-filter: none;\n text-shadow: none;\n box-shadow: none;\n /* Its own border rather than the neighbour's overlapping edge. */\n z-index: 1;\n}\n\n.variant_flat .segmentSelected::before {\n content: none;\n}\n","import { type CSSProperties, type ReactElement, type ReactNode } from 'react';\nimport s from './ToggleBar.module.css';\nimport { useRovingTabIndex } from '../../useRovingTabIndex';\n\n/** One segment of a {@link ToggleBar}, identified by its `value`. */\nexport type ToggleBarItem<V extends string | number = string> = {\n value: V;\n label?: ReactNode;\n ariaLabel?: string;\n disabled?: boolean;\n};\n\n/** Segment height and type scale for a {@link ToggleBar}. */\nexport type ToggleBarSize = 'sm' | 'md';\n/** Visual treatment of a {@link ToggleBar}. */\nexport type ToggleBarVariant = 'default' | 'minimal' | 'flat';\n\ntype CommonProps = {\n ariaLabel?: string;\n className?: string;\n height?: number;\n /** Size variant. `sm` is ~60% of the default height with reduced padding\n * and font size — sized for dense surfaces like lab control panels. */\n size?: ToggleBarSize;\n /** Visual variant. `minimal` strips the pill track and glass treatment;\n * selection becomes a flat accent. For dense diagnostic surfaces. */\n variant?: ToggleBarVariant;\n};\n\n/**\n * Props for {@link ToggleBar}, discriminated on `mode`. Single mode is\n * controlled by one value or `null`; multiple mode by an array, and only it\n * accepts `mixedValues`.\n */\nexport type ToggleBarProps<V extends string | number = string> =\n | (CommonProps & {\n mode?: 'single';\n items: readonly ToggleBarItem<V>[];\n value: V | null;\n onChange: (next: V | null) => void;\n allowDeselect?: boolean;\n })\n | (CommonProps & {\n mode: 'multiple';\n items: readonly ToggleBarItem<V>[];\n value: readonly V[];\n /**\n * Values that are neither on nor off — the sources this bar\n * aggregates disagree (a text range that is bold in part of it, a\n * multi-selection whose nodes differ). Rendered `aria-pressed=\"mixed\"`,\n * the ARIA tri-state a toggle button actually has, rather than\n * `SelectionPanel`'s reduced-opacity-plus-`title` workaround for\n * `Switch`, which has no indeterminate state to render.\n *\n * `value` wins where the two lists overlap, so a caller that can't\n * cheaply keep them disjoint doesn't get an ambiguous segment.\n *\n * Clicking a mixed segment turns it fully **on**, matching the\n * everywhere-else convention (and `toggleFlagInRange`'s rule for a\n * partially-styled text range) that a mixed toggle resolves toward\n * the affirmative rather than clearing.\n */\n mixedValues?: readonly V[];\n onChange: (next: V[]) => void;\n });\n\n/**\n * Segmented control for choosing among a fixed set of values — one of them\n * (`mode: 'single'`, the default) or any number (`mode: 'multiple'`).\n *\n * Single mode ignores a click on the already-selected segment unless\n * `allowDeselect` is set. Arrow keys move focus without changing the value;\n * Space and Enter commit.\n */\nexport function ToggleBar<V extends string | number = string>(props: ToggleBarProps<V>): ReactElement {\n const { items, ariaLabel, className, height, size, variant } = props;\n const mode = props.mode ?? 'single';\n\n const isSelected = (value: V): boolean => {\n if (mode === 'multiple') return (props.value as readonly V[]).includes(value);\n return (props.value as V | null) === value;\n };\n\n /** Mixed only in multiple mode, and only where `value` doesn't already\n * claim the segment. Single mode has nothing to be mixed about — its\n * aggregate is one value or none. */\n const isMixed = (value: V): boolean => {\n if (mode !== 'multiple') return false;\n const mixed = (props as { mixedValues?: readonly V[] }).mixedValues;\n return mixed !== undefined && mixed.includes(value) && !isSelected(value);\n };\n\n const handleClick = (index: number) => () => {\n const item = items[index];\n if (item.disabled) return;\n if (mode === 'multiple') {\n const current = props.value as readonly V[];\n const next = current.includes(item.value)\n ? current.filter(v => v !== item.value)\n : [...current, item.value];\n (props.onChange as (n: V[]) => void)(next);\n } else {\n const current = props.value as V | null;\n if (current === item.value) {\n if ((props as { allowDeselect?: boolean }).allowDeselect) {\n (props.onChange as (n: V | null) => void)(null);\n }\n return;\n }\n (props.onChange as (n: V | null) => void)(item.value);\n }\n };\n\n const selectedIndex = mode === 'single'\n ? items.findIndex(it => it.value === (props.value as V | null))\n : -1;\n\n const roving = useRovingTabIndex({\n items,\n itemClassName: s.segment,\n // Single mode is a radiogroup: the tab stop is the current value, and\n // arrow keys move the selection with the focus. Multiple mode is a set of\n // independent toggles — focus alone moves, and Space/Enter flips.\n tabStopIndex: selectedIndex >= 0 && !items[selectedIndex].disabled ? selectedIndex : undefined,\n onNavigate: mode === 'single'\n ? (index) => (props.onChange as (n: V | null) => void)(items[index].value)\n : undefined,\n onActivate: mode === 'multiple' ? (index) => handleClick(index)() : undefined,\n });\n\n const style: CSSProperties | undefined = height !== undefined\n ? ({ ['--tb-h' as string]: `${height}px` } as CSSProperties)\n : undefined;\n\n const rootCls = [\n s.root,\n size && s[`size_${size}`],\n variant && s[`variant_${variant}`],\n className,\n ].filter(Boolean).join(' ');\n\n return (\n <div\n ref={roving.rootRef}\n className={rootCls}\n role={mode === 'multiple' ? 'group' : 'radiogroup'}\n aria-label={ariaLabel}\n style={style}\n >\n {items.map((item, i) => {\n const selected = isSelected(item.value);\n const mixed = isMixed(item.value);\n const cls = [s.segment, selected && s.segmentSelected, mixed && s.segmentMixed]\n .filter(Boolean)\n .join(' ');\n return (\n <button\n key={item.value}\n type=\"button\"\n role={mode === 'multiple' ? undefined : 'radio'}\n aria-checked={mode === 'multiple' ? undefined : selected}\n aria-pressed={mode === 'multiple' ? (mixed ? 'mixed' : selected) : undefined}\n aria-label={item.ariaLabel}\n disabled={item.disabled}\n tabIndex={roving.tabIndexFor(i)}\n className={cls}\n onClick={handleClick(i)}\n onKeyDown={roving.onKeyDown(i)}\n >\n {item.label}\n </button>\n );\n })}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AC0EA,SAAgB,EAA8C,GAAwC;CACpG,IAAM,EAAE,UAAO,cAAW,cAAW,WAAQ,SAAM,eAAY,GACzD,IAAO,EAAM,QAAQ,UAErB,KAAc,MACd,MAAS,aAAoB,EAAM,MAAuB,SAAS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