@tempots/beatui 0.83.5 → 0.85.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 (63) hide show
  1. package/dist/beatui.css +840 -428
  2. package/dist/beatui.tailwind.css +840 -428
  3. package/dist/{index-C2_iX1um.cjs → index-4GQLcxme.cjs} +1 -1
  4. package/dist/{index-DiEcd7ZV.js → index-BFe-x3-z.js} +2 -2
  5. package/dist/index-BywbRDsb.cjs +1 -0
  6. package/dist/{index-Bm43lZqE.cjs → index-BzRuy4V1.cjs} +3 -3
  7. package/dist/{index-Di1_W_7Q.js → index-D2_J_-XS.js} +46 -45
  8. package/dist/{index-CEqc0H3v.js → index-DfJMDwSU.js} +1 -1
  9. package/dist/{index-CCMjK4fD.js → index-KNk3k6NI.js} +1 -1
  10. package/dist/{index-BS31JX7x.cjs → index-anrXec7K.cjs} +1 -1
  11. package/dist/{index-C32iUFIr.js → index-vzoI95E1.js} +3 -3
  12. package/dist/{index-BZYWyjM_.cjs → index-yMrXbIdg.cjs} +1 -1
  13. package/dist/index.cjs.js +4 -4
  14. package/dist/index.es.js +865 -848
  15. package/dist/json-schema/index.cjs.js +1 -1
  16. package/dist/json-schema/index.es.js +2 -2
  17. package/dist/lexical/index.cjs.js +2 -2
  18. package/dist/lexical/index.es.js +5 -5
  19. package/dist/lexical.css +79 -79
  20. package/dist/markdown/index.cjs.js +1 -1
  21. package/dist/markdown/index.es.js +1 -1
  22. package/dist/menu-DMAhcoJ2.js +377 -0
  23. package/dist/menu-q8xJaBIb.cjs +1 -0
  24. package/dist/monaco/index.cjs.js +2 -2
  25. package/dist/monaco/index.es.js +2 -2
  26. package/dist/prosemirror/index.cjs.js +1 -1
  27. package/dist/prosemirror/index.es.js +1 -1
  28. package/dist/prosemirror.css +10 -10
  29. package/dist/styles-url-BSUFsmMD.cjs +1 -0
  30. package/dist/styles-url-BvcVGpBJ.js +4 -0
  31. package/dist/styles-url-BzPix7VR.cjs +1 -0
  32. package/dist/styles-url-CCopc5pG.js +4 -0
  33. package/dist/styles-url-CEDSZTyZ.cjs +1 -0
  34. package/dist/styles-url-CSXq0ZRz.js +4 -0
  35. package/dist/styles-url-DZhZ-9Bf.js +4 -0
  36. package/dist/styles-url-YAJ6Q1GS.cjs +1 -0
  37. package/dist/tailwind/preset.cjs.js +1 -1
  38. package/dist/tailwind/preset.es.js +18 -18
  39. package/dist/tailwind/vite-plugin.cjs.js +12 -15
  40. package/dist/tailwind/vite-plugin.es.js +178 -181
  41. package/dist/{theme-B5pmbvQ_.js → theme-BzpMLdvH.js} +6 -6
  42. package/dist/theme-DogY9oT1.cjs +1 -0
  43. package/dist/types/components/form/input/advanced-slider.d.ts +1 -1
  44. package/dist/types/components/form/input/combobox-input.d.ts +2 -0
  45. package/dist/types/components/form/input/switch.d.ts +2 -1
  46. package/dist/types/components/theme/theme.d.ts +5 -4
  47. package/dist/types/tailwind/preset.d.ts +1 -1
  48. package/dist/widget-customization-BngYjPvO.cjs +1 -0
  49. package/dist/{widget-customization-0is7oTeP.js → widget-customization-D-Vvr4vg.js} +300 -329
  50. package/package.json +1 -1
  51. package/dist/index-DH37GTQj.cjs +0 -1
  52. package/dist/menu-CX72LaZ3.cjs +0 -1
  53. package/dist/menu-D_slbwl8.js +0 -374
  54. package/dist/styles-url-B3p8AqBy.cjs +0 -1
  55. package/dist/styles-url-COuz9fVH.js +0 -4
  56. package/dist/styles-url-CVCcF0ra.cjs +0 -1
  57. package/dist/styles-url-CZUL_YRT.cjs +0 -1
  58. package/dist/styles-url-CzNVxeM7.js +0 -4
  59. package/dist/styles-url-D8MjxiP-.cjs +0 -1
  60. package/dist/styles-url-DUdp56Ts.js +0 -4
  61. package/dist/styles-url-DpP5gepF.js +0 -4
  62. package/dist/theme-Dt6lCAvY.cjs +0 -1
  63. package/dist/widget-customization-B-LmxkPE.cjs +0 -1
@@ -1,44 +1,44 @@
1
- import { Value as p, prop as rt, computedOf as D, html as C, attr as u, svg as tt, svgAttr as Y, on as M, Empty as A, When as H, Fragment as E, aria as N, emitValue as Z, Use as ot, input as ct, emitValueAsNullableDate as et, emitValueAsNullableDateTime as nt, style as it, Repeat as pt, emit as dt, emitValueAsNumber as V } from "@tempots/dom";
1
+ import { Value as p, prop as rt, computedOf as D, html as k, attr as u, svg as tt, svgAttr as Y, on as M, Empty as A, When as H, Fragment as E, aria as N, emitValue as Z, Use as lt, input as ot, emitValueAsNullableDate as et, emitValueAsNullableDateTime as nt, Repeat as ut, style as pt, emit as dt, emitValueAsNumber as V } from "@tempots/dom";
2
2
  import { F as ht, N as z, T as gt, U as ft, a as mt } from "./deep-merge-CmQoIYPC.js";
3
3
  import { $ as bt } from "./string-DYyMxBl-.js";
4
- import { I as L } from "./input-container-Nx0gMAzS.js";
5
- import { C as U, T as wt } from "./text-input-CPJzUC2r.js";
6
- import { B as yt, I as q, L as $t, b as st, a as It } from "./translations-BGblCUBj.js";
7
- import { AutoSelect as Mt, ElementRect as xt } from "@tempots/ui";
8
- import { E as _t, P as kt } from "./notice-Dz4nX57_.js";
9
- import { s as Ft } from "./session-id-3KiilioY.js";
10
- import { r as Ct } from "./utils-DEbsp9Q9.js";
11
- function lt(t) {
4
+ import { I as U } from "./input-container-Nx0gMAzS.js";
5
+ import { C as L, T as wt } from "./text-input-CPJzUC2r.js";
6
+ import { B as yt, I as q, b as st, a as It } from "./translations-BGblCUBj.js";
7
+ import { AutoSelect as Mt } from "@tempots/ui";
8
+ import { E as $t, P as xt } from "./notice-Dz4nX57_.js";
9
+ import { s as _t } from "./session-id-3KiilioY.js";
10
+ import { r as kt } from "./utils-DEbsp9Q9.js";
11
+ function it(t) {
12
12
  if (typeof t != "string") return !1;
13
13
  const e = t.startsWith("#") ? t.slice(1) : t;
14
14
  return /^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(e);
15
15
  }
16
- function Tt(t) {
16
+ function Ft(t) {
17
17
  if (typeof t != "string") return !1;
18
18
  const e = /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i, s = t.match(e);
19
19
  if (!s) return !1;
20
- const [, n, r, a] = s, o = parseInt(n, 10), c = parseInt(r, 10), i = parseInt(a, 10);
21
- return o >= 0 && o <= 255 && c >= 0 && c <= 255 && i >= 0 && i <= 255;
20
+ const [, n, r, a] = s, o = parseInt(n, 10), i = parseInt(r, 10), c = parseInt(a, 10);
21
+ return o >= 0 && o <= 255 && i >= 0 && i <= 255 && c >= 0 && c <= 255;
22
22
  }
23
- function At(t) {
23
+ function Ct(t) {
24
24
  if (typeof t != "string") return !1;
25
25
  const e = /^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(0|1|0?\.\d+)\s*\)$/i, s = t.match(e);
26
26
  if (!s) return !1;
27
- const [, n, r, a, o] = s, c = parseInt(n, 10), i = parseInt(r, 10), l = parseInt(a, 10), d = parseFloat(o);
28
- return c >= 0 && c <= 255 && i >= 0 && i <= 255 && l >= 0 && l <= 255 && d >= 0 && d <= 1;
27
+ const [, n, r, a, o] = s, i = parseInt(n, 10), c = parseInt(r, 10), l = parseInt(a, 10), d = parseFloat(o);
28
+ return i >= 0 && i <= 255 && c >= 0 && c <= 255 && l >= 0 && l <= 255 && d >= 0 && d <= 1;
29
29
  }
30
- function St(t) {
30
+ function Tt(t) {
31
31
  if (typeof t != "string") return !1;
32
32
  const e = /^hsl\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*\)$/i, s = t.match(e);
33
33
  if (!s) return !1;
34
- const [, n, r, a] = s, o = parseInt(n, 10), c = parseInt(r, 10), i = parseInt(a, 10);
35
- return o >= 0 && o <= 360 && c >= 0 && c <= 100 && i >= 0 && i <= 100;
34
+ const [, n, r, a] = s, o = parseInt(n, 10), i = parseInt(r, 10), c = parseInt(a, 10);
35
+ return o >= 0 && o <= 360 && i >= 0 && i <= 100 && c >= 0 && c <= 100;
36
36
  }
37
- function ce(t) {
38
- return lt(t) || Tt(t) || At(t) || St(t);
37
+ function re(t) {
38
+ return it(t) || Ft(t) || Ct(t) || Tt(t);
39
39
  }
40
- function vt(t) {
41
- if (!lt(t)) return null;
40
+ function At(t) {
41
+ if (!it(t)) return null;
42
42
  let e = t.startsWith("#") ? t.slice(1) : t;
43
43
  return e.length === 3 && (e = e.split("").map((s) => s + s).join("")), `#${e.toLowerCase()}`;
44
44
  }
@@ -50,7 +50,7 @@ function Q(t, e, s) {
50
50
  return `#${n(t)}${n(e)}${n(s)}`;
51
51
  }
52
52
  function j(t) {
53
- const e = vt(t);
53
+ const e = At(t);
54
54
  if (!e) return null;
55
55
  const s = /^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
56
56
  return s ? {
@@ -59,16 +59,16 @@ function j(t) {
59
59
  b: parseInt(s[3], 16)
60
60
  } : null;
61
61
  }
62
- function ie(t, e) {
62
+ function oe(t, e) {
63
63
  const s = j(t), n = j(e);
64
64
  if (!s || !n) return null;
65
65
  const r = (l, d, f) => {
66
- const [m, h, w] = [l, d, f].map(($) => ($ = $ / 255, $ <= 0.03928 ? $ / 12.92 : Math.pow(($ + 0.055) / 1.055, 2.4)));
66
+ const [m, h, w] = [l, d, f].map((I) => (I = I / 255, I <= 0.03928 ? I / 12.92 : Math.pow((I + 0.055) / 1.055, 2.4)));
67
67
  return 0.2126 * m + 0.7152 * h + 0.0722 * w;
68
- }, a = r(s.r, s.g, s.b), o = r(n.r, n.g, n.b), c = Math.max(a, o), i = Math.min(a, o);
69
- return (c + 0.05) / (i + 0.05);
68
+ }, a = r(s.r, s.g, s.b), o = r(n.r, n.g, n.b), i = Math.max(a, o), c = Math.min(a, o);
69
+ return (i + 0.05) / (c + 0.05);
70
70
  }
71
- function Rt(t) {
71
+ function St(t) {
72
72
  if (!t) return [0, 0, 0, 1];
73
73
  const s = t.trim().match(
74
74
  /^#?([a-fA-F0-9]{3,4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$/
@@ -114,78 +114,78 @@ function Rt(t) {
114
114
  /^hsla?\(\s*([+-]?[\d.]+)(?:deg)?\s*[ ,]?\s*([\d.]+)%\s*[ ,]?\s*([\d.]+)%\s*(?:[/,]\s*(\d?(?:\.\d+)?))?\s*\)$/i
115
115
  );
116
116
  if (a) {
117
- const l = parseFloat(a[1]), d = parseFloat(a[2]), f = parseFloat(a[3]), m = a[4] != null ? parseFloat(a[4]) : 1, [h, w, $] = ut(l, d / 100, f / 100);
118
- return [h, w, $, m];
117
+ const l = parseFloat(a[1]), d = parseFloat(a[2]), f = parseFloat(a[3]), m = a[4] != null ? parseFloat(a[4]) : 1, [h, w, I] = ct(l, d / 100, f / 100);
118
+ return [h, w, I, m];
119
119
  }
120
120
  const o = t.match(
121
121
  /^hwb\(\s*([+-]?[\d.]+)(?:deg)?\s*[, ]\s*([\d.]+)%\s*[, ]\s*([\d.]+)%\s*(?:[/]\s*(\d?(?:\.\d+)?))?\s*\)$/i
122
122
  );
123
123
  if (o) {
124
- const l = parseFloat(o[1]), d = parseFloat(o[2]) / 100, f = parseFloat(o[3]) / 100, m = o[4] != null ? parseFloat(o[4]) : 1, [h, w, $] = Bt(l, d, f);
125
- return [h, w, $, m];
124
+ const l = parseFloat(o[1]), d = parseFloat(o[2]) / 100, f = parseFloat(o[3]) / 100, m = o[4] != null ? parseFloat(o[4]) : 1, [h, w, I] = Nt(l, d, f);
125
+ return [h, w, I, m];
126
126
  }
127
- const c = t.match(
127
+ const i = t.match(
128
128
  /^oklch\(\s*([+-]?[\d.]+%?)\s+([\d.]+)\s+([+-]?[\d.]+)(?:deg)?(?:\s*\/\s*(\d?(?:\.\d+)?))?\s*\)$/i
129
129
  );
130
- if (c) {
131
- const l = c[1], d = parseFloat(c[2]), f = parseFloat(c[3]), m = c[4] != null ? parseFloat(c[4]) : 1, h = l.endsWith("%") ? Math.max(0, Math.min(1, parseFloat(l) / 100)) : Math.max(0, Math.min(1, parseFloat(l))), [w, $, _] = Et(h, d, f);
132
- return [w, $, _, m];
130
+ if (i) {
131
+ const l = i[1], d = parseFloat(i[2]), f = parseFloat(i[3]), m = i[4] != null ? parseFloat(i[4]) : 1, h = l.endsWith("%") ? Math.max(0, Math.min(1, parseFloat(l) / 100)) : Math.max(0, Math.min(1, parseFloat(l))), [w, I, x] = Bt(h, d, f);
132
+ return [w, I, x, m];
133
133
  }
134
- const i = j(t);
135
- return i ? [i.r, i.g, i.b, 1] : [0, 0, 0, 1];
134
+ const c = j(t);
135
+ return c ? [c.r, c.g, c.b, 1] : [0, 0, 0, 1];
136
136
  }
137
- function Nt(t, e, s, n) {
137
+ function vt(t, e, s, n) {
138
138
  return `rgba(${Math.round(t)}, ${Math.round(e)}, ${Math.round(s)}, ${Math.max(
139
139
  0,
140
140
  Math.min(1, Math.round(n * 100) / 100)
141
141
  )})`;
142
142
  }
143
- function Dt(t) {
143
+ function Rt(t) {
144
144
  let e = t + 1831565813;
145
145
  return function() {
146
146
  return e = Math.imul(e ^ e >>> 15, e | 1), e ^= e + Math.imul(e ^ e >>> 7, e | 61), ((e ^ e >>> 14) >>> 0) / 4294967296;
147
147
  };
148
148
  }
149
- function ut(t, e, s) {
149
+ function ct(t, e, s) {
150
150
  t = (t % 360 + 360) % 360;
151
151
  const n = (1 - Math.abs(2 * s - 1)) * e, r = n * (1 - Math.abs(t / 60 % 2 - 1)), a = s - n / 2;
152
- let o = 0, c = 0, i = 0;
153
- return 0 <= t && t < 60 ? [o, c, i] = [n, r, 0] : 60 <= t && t < 120 ? [o, c, i] = [r, n, 0] : 120 <= t && t < 180 ? [o, c, i] = [0, n, r] : 180 <= t && t < 240 ? [o, c, i] = [0, r, n] : 240 <= t && t < 300 ? [o, c, i] = [r, 0, n] : [o, c, i] = [n, 0, r], [
152
+ let o = 0, i = 0, c = 0;
153
+ return 0 <= t && t < 60 ? [o, i, c] = [n, r, 0] : 60 <= t && t < 120 ? [o, i, c] = [r, n, 0] : 120 <= t && t < 180 ? [o, i, c] = [0, n, r] : 180 <= t && t < 240 ? [o, i, c] = [0, r, n] : 240 <= t && t < 300 ? [o, i, c] = [r, 0, n] : [o, i, c] = [n, 0, r], [
154
154
  Math.round((o + a) * 255),
155
- Math.round((c + a) * 255),
156
- Math.round((i + a) * 255)
155
+ Math.round((i + a) * 255),
156
+ Math.round((c + a) * 255)
157
157
  ];
158
158
  }
159
- function Bt(t, e, s) {
159
+ function Nt(t, e, s) {
160
160
  t = (t % 360 + 360) % 360;
161
161
  const n = e + s;
162
162
  n > 1 && (e /= n, s /= n);
163
- const [r, a, o] = ut(t, 1, 0.5).map((f) => f / 255), c = 1 - e - s, i = r * c + e, l = a * c + e, d = o * c + e;
164
- return [Math.round(i * 255), Math.round(l * 255), Math.round(d * 255)];
163
+ const [r, a, o] = ct(t, 1, 0.5).map((f) => f / 255), i = 1 - e - s, c = r * i + e, l = a * i + e, d = o * i + e;
164
+ return [Math.round(c * 255), Math.round(l * 255), Math.round(d * 255)];
165
165
  }
166
166
  function J(t, e, s) {
167
167
  t /= 255, e /= 255, s /= 255;
168
168
  const n = Math.max(t, e, s), r = Math.min(t, e, s);
169
169
  let a = 0, o = 0;
170
- const c = (n + r) / 2, i = n - r;
171
- if (i !== 0) {
172
- switch (o = c > 0.5 ? i / (2 - n - r) : i / (n + r), n) {
170
+ const i = (n + r) / 2, c = n - r;
171
+ if (c !== 0) {
172
+ switch (o = i > 0.5 ? c / (2 - n - r) : c / (n + r), n) {
173
173
  case t:
174
- a = (e - s) / i + (e < s ? 6 : 0);
174
+ a = (e - s) / c + (e < s ? 6 : 0);
175
175
  break;
176
176
  case e:
177
- a = (s - t) / i + 2;
177
+ a = (s - t) / c + 2;
178
178
  break;
179
179
  default:
180
- a = (t - e) / i + 4;
180
+ a = (t - e) / c + 4;
181
181
  }
182
182
  a *= 60;
183
183
  }
184
- return [Math.round(a), Math.round(o * 100), Math.round(c * 100)];
184
+ return [Math.round(a), Math.round(o * 100), Math.round(i * 100)];
185
185
  }
186
- function Vt(t, e, s) {
187
- const [n] = J(t, e, s), r = t / 255, a = e / 255, o = s / 255, c = Math.min(r, a, o), i = 1 - Math.max(r, a, o);
188
- return [n, Math.round(c * 100), Math.round(i * 100)];
186
+ function Dt(t, e, s) {
187
+ const [n] = J(t, e, s), r = t / 255, a = e / 255, o = s / 255, i = Math.min(r, a, o), c = 1 - Math.max(r, a, o);
188
+ return [n, Math.round(i * 100), Math.round(c * 100)];
189
189
  }
190
190
  function G(t) {
191
191
  const e = t / 255;
@@ -195,21 +195,21 @@ function K(t) {
195
195
  const e = t <= 31308e-7 ? 12.92 * t : 1.055 * Math.pow(t, 0.4166666666666667) - 0.055;
196
196
  return Math.round(Math.max(0, Math.min(1, e)) * 255);
197
197
  }
198
- function Et(t, e, s) {
199
- const n = s * Math.PI / 180, r = Math.cos(n) * e, a = Math.sin(n) * e, o = t + 0.3963377774 * r + 0.2158037573 * a, c = t - 0.1055613458 * r - 0.0638541728 * a, i = t - 0.0894841775 * r - 1.291485548 * a, l = o * o * o, d = c * c * c, f = i * i * i, m = 4.0767416621 * l - 3.3077115913 * d + 0.2309699292 * f, h = -1.2684380046 * l + 2.6097574011 * d - 0.3413193965 * f, w = -0.0041960863 * l - 0.7034186147 * d + 1.707614701 * f;
198
+ function Bt(t, e, s) {
199
+ const n = s * Math.PI / 180, r = Math.cos(n) * e, a = Math.sin(n) * e, o = t + 0.3963377774 * r + 0.2158037573 * a, i = t - 0.1055613458 * r - 0.0638541728 * a, c = t - 0.0894841775 * r - 1.291485548 * a, l = o * o * o, d = i * i * i, f = c * c * c, m = 4.0767416621 * l - 3.3077115913 * d + 0.2309699292 * f, h = -1.2684380046 * l + 2.6097574011 * d - 0.3413193965 * f, w = -0.0041960863 * l - 0.7034186147 * d + 1.707614701 * f;
200
200
  return [K(m), K(h), K(w)];
201
201
  }
202
- function Lt(t, e, s) {
203
- const n = G(t), r = G(e), a = G(s), o = 0.4122214708 * n + 0.5363325363 * r + 0.0514459929 * a, c = 0.2119034982 * n + 0.6806995451 * r + 0.1073969566 * a, i = 0.0883024619 * n + 0.2817188376 * r + 0.6299787005 * a, l = Math.cbrt(o), d = Math.cbrt(c), f = Math.cbrt(i), m = 0.2104542553 * l + 0.793617785 * d - 0.0040720468 * f, h = 1.9779984951 * l - 2.428592205 * d + 0.4505937099 * f, w = 0.0259040371 * l + 0.7827717662 * d - 0.808675766 * f, $ = Math.sqrt(h * h + w * w);
204
- let _ = Math.atan2(w, h) * 180 / Math.PI;
205
- return _ < 0 && (_ += 360), [m, $, _];
202
+ function Vt(t, e, s) {
203
+ const n = G(t), r = G(e), a = G(s), o = 0.4122214708 * n + 0.5363325363 * r + 0.0514459929 * a, i = 0.2119034982 * n + 0.6806995451 * r + 0.1073969566 * a, c = 0.0883024619 * n + 0.2817188376 * r + 0.6299787005 * a, l = Math.cbrt(o), d = Math.cbrt(i), f = Math.cbrt(c), m = 0.2104542553 * l + 0.793617785 * d - 0.0040720468 * f, h = 1.9779984951 * l - 2.428592205 * d + 0.4505937099 * f, w = 0.0259040371 * l + 0.7827717662 * d - 0.808675766 * f, I = Math.sqrt(h * h + w * w);
204
+ let x = Math.atan2(w, h) * 180 / Math.PI;
205
+ return x < 0 && (x += 360), [m, I, x];
206
206
  }
207
207
  function O(t, e, s, n, r, a) {
208
208
  switch (r) {
209
209
  case "hex":
210
210
  if (a) {
211
- const o = (i) => i.toString(16).padStart(2, "0"), c = Math.max(0, Math.min(255, Math.round(n * 255)));
212
- return `#${o(t)}${o(e)}${o(s)}${o(c)}`;
211
+ const o = (c) => c.toString(16).padStart(2, "0"), i = Math.max(0, Math.min(255, Math.round(n * 255)));
212
+ return `#${o(t)}${o(e)}${o(s)}${o(i)}`;
213
213
  }
214
214
  return Q(t, e, s);
215
215
  case "rgb":
@@ -217,19 +217,19 @@ function O(t, e, s, n, r, a) {
217
217
  case "rgba":
218
218
  return `rgba(${t}, ${e}, ${s}, ${Math.round(n * 100) / 100})`;
219
219
  case "hsl": {
220
- const [o, c, i] = J(t, e, s);
221
- return `hsl(${o}, ${c}%, ${i}%)`;
220
+ const [o, i, c] = J(t, e, s);
221
+ return `hsl(${o}, ${i}%, ${c}%)`;
222
222
  }
223
223
  case "hsla": {
224
- const [o, c, i] = J(t, e, s);
225
- return `hsla(${o}, ${c}%, ${i}%, ${Math.round(n * 100) / 100})`;
224
+ const [o, i, c] = J(t, e, s);
225
+ return `hsla(${o}, ${i}%, ${c}%, ${Math.round(n * 100) / 100})`;
226
226
  }
227
227
  case "hwb": {
228
- const [o, c, i] = Vt(t, e, s);
229
- return n < 1 ? `hwb(${o} ${c}% ${i}% / ${Math.round(n * 100) / 100})` : `hwb(${o} ${c}% ${i}%)`;
228
+ const [o, i, c] = Dt(t, e, s);
229
+ return n < 1 ? `hwb(${o} ${i}% ${c}% / ${Math.round(n * 100) / 100})` : `hwb(${o} ${i}% ${c}%)`;
230
230
  }
231
231
  case "oklch": {
232
- const [o, c, i] = Lt(t, e, s), l = (Math.round(o * 1e3) / 1e3).toFixed(3), d = (Math.round(c * 1e3) / 1e3).toFixed(3), f = (Math.round(i * 10) / 10).toFixed(1), m = Math.round(n * 100) / 100;
232
+ const [o, i, c] = Vt(t, e, s), l = (Math.round(o * 1e3) / 1e3).toFixed(3), d = (Math.round(i * 1e3) / 1e3).toFixed(3), f = (Math.round(c * 10) / 10).toFixed(1), m = Math.round(n * 100) / 100;
233
233
  return a || n < 1 ? `oklch(${l} ${d} ${f} / ${m})` : `oklch(${l} ${d} ${f})`;
234
234
  }
235
235
  }
@@ -237,7 +237,7 @@ function O(t, e, s, n, r, a) {
237
237
  function W(t, e) {
238
238
  return e ? t === "rgb" ? "rgba" : t === "hsl" ? "hsla" : t : t === "rgba" ? "rgb" : t === "hsla" ? "hsl" : t;
239
239
  }
240
- async function Ut(t) {
240
+ async function Et(t) {
241
241
  return new Promise((e, s) => {
242
242
  const n = new FileReader();
243
243
  n.readAsDataURL(t), n.onload = () => {
@@ -246,10 +246,10 @@ async function Ut(t) {
246
246
  }, n.onerror = (r) => s(r);
247
247
  });
248
248
  }
249
- function Pt(t) {
250
- return Promise.all(t.map(Ut));
249
+ function Ut(t) {
250
+ return Promise.all(t.map(Et));
251
251
  }
252
- function Ot(t) {
252
+ function Lt(t) {
253
253
  if (t.length >= 4) {
254
254
  if (t[0] === 137 && t[1] === 80 && t[2] === 78 && t[3] === 71)
255
255
  return "image/png";
@@ -265,45 +265,45 @@ function Ot(t) {
265
265
  }
266
266
  return "application/octet-stream";
267
267
  }
268
- function Wt(t) {
268
+ function Pt(t) {
269
269
  const e = bt(t ?? ""), s = e.length, n = new Uint8Array(s);
270
270
  for (let r = 0; r < s; r++) n[r] = e.charCodeAt(r);
271
271
  return n;
272
272
  }
273
- function Ht(t) {
273
+ function Ot(t) {
274
274
  const {
275
275
  value: e,
276
276
  onChange: s,
277
277
  onInput: n,
278
278
  ...r
279
279
  } = t, a = /* @__PURE__ */ new Map(), o = p.toSignal(e).map((d) => d.map((f, m) => {
280
- const h = a.get(f), w = Wt(f ?? ""), $ = h?.type || Ot(w), _ = h?.name ?? `file-${m}`, y = w.buffer.slice(
280
+ const h = a.get(f), w = Pt(f ?? ""), I = h?.type || Lt(w), x = h?.name ?? `file-${m}`, y = w.buffer.slice(
281
281
  w.byteOffset,
282
282
  w.byteOffset + w.byteLength
283
- ), b = new Blob([y], { type: $ });
284
- return new File([b], _, { type: $ });
285
- })), c = (d) => (f) => {
286
- d && Pt(f).then((m) => {
283
+ ), b = new Blob([y], { type: I });
284
+ return new File([b], x, { type: I });
285
+ })), i = (d) => (f) => {
286
+ d && Ut(f).then((m) => {
287
287
  for (const [h, w] of m.entries())
288
288
  a.set(w, { name: f[h].name, type: f[h].type });
289
289
  d(m);
290
290
  });
291
- }, i = c(s), l = c(n);
291
+ }, c = i(s), l = i(n);
292
292
  return ht({
293
293
  ...r,
294
294
  value: o,
295
- onChange: i,
295
+ onChange: c,
296
296
  onInput: l
297
297
  });
298
298
  }
299
- function le(t) {
299
+ function ie(t) {
300
300
  const {
301
301
  value: e,
302
302
  onInput: s,
303
303
  onChange: n,
304
304
  ...r
305
305
  } = t;
306
- return Ht({
306
+ return Ot({
307
307
  ...r,
308
308
  maxFiles: 1,
309
309
  value: p.map(e, (a) => a == null ? [] : [a]),
@@ -315,47 +315,47 @@ function le(t) {
315
315
  }
316
316
  });
317
317
  }
318
- function jt(t, e) {
319
- const [s, n, r] = t, a = s << 16 ^ n << 8 ^ r, o = Dt(a), c = 6 + Math.floor(o() * 5), i = 0.18 + o() * 0.06, l = [];
320
- for (let h = 0; h < c; h++) {
321
- const w = h / c * Math.PI * 2, $ = e * (1 + (o() * 2 - 1) * i), _ = Math.cos(w) * $, y = Math.sin(w) * $;
322
- l.push({ x: _, y });
318
+ function Wt(t, e) {
319
+ const [s, n, r] = t, a = s << 16 ^ n << 8 ^ r, o = Rt(a), i = 6 + Math.floor(o() * 5), c = 0.18 + o() * 0.06, l = [];
320
+ for (let h = 0; h < i; h++) {
321
+ const w = h / i * Math.PI * 2, I = e * (1 + (o() * 2 - 1) * c), x = Math.cos(w) * I, y = Math.sin(w) * I;
322
+ l.push({ x, y });
323
323
  }
324
- const d = (l[0].x + l[c - 1].x) / 2, f = (l[0].y + l[c - 1].y) / 2;
324
+ const d = (l[0].x + l[i - 1].x) / 2, f = (l[0].y + l[i - 1].y) / 2;
325
325
  let m = `M ${d.toFixed(3)} ${f.toFixed(3)}`;
326
- for (let h = 0; h < c; h++) {
327
- const w = l[h], $ = l[(h + 1) % c], _ = (w.x + $.x) / 2, y = (w.y + $.y) / 2;
328
- m += ` Q ${w.x.toFixed(3)} ${w.y.toFixed(3)} ${_.toFixed(3)} ${y.toFixed(3)}`;
326
+ for (let h = 0; h < i; h++) {
327
+ const w = l[h], I = l[(h + 1) % i], x = (w.x + I.x) / 2, y = (w.y + I.y) / 2;
328
+ m += ` Q ${w.x.toFixed(3)} ${w.y.toFixed(3)} ${x.toFixed(3)} ${y.toFixed(3)}`;
329
329
  }
330
330
  return m += " Z", m;
331
331
  }
332
- const ue = (t) => {
333
- const { value: e, onBlur: s, onChange: n, onInput: r, displayValue: a, size: o, withAlpha: c } = t, i = p.map(o ?? 32, (g) => g), l = p.map(e, (g) => Rt(g ?? "#000000")), d = p.map(
332
+ const ce = (t) => {
333
+ const { value: e, onBlur: s, onChange: n, onInput: r, displayValue: a, size: o, withAlpha: i } = t, c = p.map(o ?? 32, (g) => g), l = p.map(e, (g) => St(g ?? "#000000")), d = p.map(
334
334
  l,
335
- ([g, I, k]) => [g, I, k]
336
- ), f = p.map(l, ([, , , g]) => g), m = rt(p.get(f) ?? 1), h = p.map(c ?? !1, (g) => g), w = p.map(
335
+ ([g, $, F]) => [g, $, F]
336
+ ), f = p.map(l, ([, , , g]) => g), m = rt(p.get(f) ?? 1), h = p.map(i ?? !1, (g) => g), w = p.map(
337
337
  t.colorTextFormat ?? "rgb",
338
338
  (g) => g
339
- ), $ = D(
339
+ ), I = D(
340
340
  d,
341
341
  m,
342
342
  w,
343
343
  h
344
344
  )(
345
- ([g, I, k], S, v, R) => O(g, I, k, S ?? 1, W(v, R), R)
346
- ), _ = p.map(
345
+ ([g, $, F], S, v, R) => O(g, $, F, S ?? 1, W(v, R), R)
346
+ ), x = p.map(
347
347
  t.colorTextFormat ?? "hex",
348
348
  (g) => g
349
- ), y = p.map(i, (g) => `${-g / 2} ${-g / 2} ${g} ${g}`), b = D(
349
+ ), y = p.map(c, (g) => `${-g / 2} ${-g / 2} ${g} ${g}`), b = D(
350
350
  d,
351
- i
352
- )((g, I) => jt(g, I / 2)), x = D(
351
+ c
352
+ )((g, $) => Wt(g, $ / 2)), _ = D(
353
353
  d,
354
354
  m,
355
355
  h
356
356
  )(
357
- ([g, I, k], S, v) => v || S < 1 ? Nt(g, I, k, S) : Q(g, I, k)
358
- ), T = C.div(
357
+ ([g, $, F], S, v) => v || S < 1 ? vt(g, $, F, S) : Q(g, $, F)
358
+ ), T = k.div(
359
359
  u.class("bc-color-swatch-input__control"),
360
360
  u.class(
361
361
  p.map(
@@ -364,46 +364,46 @@ const ue = (t) => {
364
364
  )
365
365
  ),
366
366
  u.style(
367
- D(i)((g) => `min-width:${g + 2}px;height:${g + 2}px`)
367
+ D(c)((g) => `min-width:${g + 2}px;height:${g + 2}px`)
368
368
  ),
369
369
  // The SVG blob preview
370
370
  tt.svg(
371
371
  u.class("bc-color-swatch-input__svg"),
372
372
  Y.viewBox(y),
373
- tt.path(Y.d(b), Y.fill(x))
373
+ tt.path(Y.d(b), Y.fill(_))
374
374
  ),
375
375
  // Invisible native input overlays the blob for picker and accessibility
376
- C.input(
376
+ k.input(
377
377
  u.type("color"),
378
- U(t),
378
+ L(t),
379
379
  // Native color input needs hex without alpha
380
- u.value(p.map(d, ([g, I, k]) => Q(g, I, k))),
380
+ u.value(p.map(d, ([g, $, F]) => Q(g, $, F))),
381
381
  u.class(
382
382
  "bc-input bc-color-swatch-input bc-color-swatch-input__native"
383
383
  ),
384
384
  s != null ? M.blur(s) : A,
385
385
  n != null ? M.change((g) => {
386
- const I = g.target.value;
386
+ const $ = g.target.value;
387
387
  if (!n) return;
388
- const { r: k, g: S, b: v } = j(I) ?? { r: 0, g: 0, b: 0 }, R = p.get(m) ?? 1, B = W(
389
- p.get(_),
388
+ const { r: F, g: S, b: v } = j($) ?? { r: 0, g: 0, b: 0 }, R = p.get(m) ?? 1, B = W(
389
+ p.get(x),
390
390
  p.get(h)
391
- ), X = O(k, S, v, R, B, p.get(h));
391
+ ), X = O(F, S, v, R, B, p.get(h));
392
392
  n(X);
393
393
  }) : A,
394
394
  r != null ? M.input((g) => {
395
- const I = g.target.value;
395
+ const $ = g.target.value;
396
396
  if (!r) return;
397
- const { r: k, g: S, b: v } = j(I) ?? { r: 0, g: 0, b: 0 }, R = p.get(m) ?? 1, B = W(
398
- p.get(_),
397
+ const { r: F, g: S, b: v } = j($) ?? { r: 0, g: 0, b: 0 }, R = p.get(m) ?? 1, B = W(
398
+ p.get(x),
399
399
  p.get(h)
400
- ), X = O(k, S, v, R, B, p.get(h));
400
+ ), X = O(F, S, v, R, B, p.get(h));
401
401
  r(X);
402
402
  }) : A
403
403
  )
404
- ), F = H(
404
+ ), C = H(
405
405
  h,
406
- () => C.input(
406
+ () => k.input(
407
407
  u.type("range"),
408
408
  u.class("bc-color-swatch-input__alpha"),
409
409
  u.min(0),
@@ -412,26 +412,26 @@ const ue = (t) => {
412
412
  u.value(p.map(m, (g) => String(g ?? 1))),
413
413
  u.disabled(t.disabled),
414
414
  M.input((g) => {
415
- const I = parseFloat(g.target.value);
416
- m.set(I);
417
- const [k, S, v] = p.get(d), R = W(
418
- p.get(_),
415
+ const $ = parseFloat(g.target.value);
416
+ m.set($);
417
+ const [F, S, v] = p.get(d), R = W(
418
+ p.get(x),
419
419
  p.get(h)
420
- ), B = O(k, S, v, I, R, p.get(h));
420
+ ), B = O(F, S, v, $, R, p.get(h));
421
421
  r?.(B);
422
422
  }),
423
423
  M.change((g) => {
424
- const I = parseFloat(g.target.value);
425
- m.set(I);
426
- const [k, S, v] = p.get(d), R = W(
427
- p.get(_),
424
+ const $ = parseFloat(g.target.value);
425
+ m.set($);
426
+ const [F, S, v] = p.get(d), R = W(
427
+ p.get(x),
428
428
  p.get(h)
429
- ), B = O(k, S, v, I, R, p.get(h));
429
+ ), B = O(F, S, v, $, R, p.get(h));
430
430
  n?.(B);
431
431
  })
432
432
  )
433
433
  );
434
- return L({
434
+ return U({
435
435
  baseContainer: !0,
436
436
  ...t,
437
437
  // ensure our control does not try to grow
@@ -441,68 +441,68 @@ const ue = (t) => {
441
441
  after: E(
442
442
  H(
443
443
  a ?? !1,
444
- () => C.span(u.class("bc-color-swatch-input__rgb"), $)
444
+ () => k.span(u.class("bc-color-swatch-input__rgb"), I)
445
445
  ),
446
- F,
446
+ C,
447
447
  t.after
448
448
  )
449
449
  });
450
- }, pe = ({
450
+ }, le = ({
451
451
  startEditing: t,
452
452
  value: e,
453
453
  onChange: s,
454
454
  placeholder: n,
455
455
  disabled: r
456
456
  }) => {
457
- const a = p.deriveProp(t ?? !1), o = rt(!1), c = p.map(r ?? !1, (i) => i);
458
- return C.div(
457
+ const a = p.deriveProp(t ?? !1), o = rt(!1), i = p.map(r ?? !1, (c) => c);
458
+ return k.div(
459
459
  u.class("bc-editable-text"),
460
460
  u.class(
461
461
  p.map(
462
- c,
463
- (i) => i ? "bc-editable-text--disabled" : ""
462
+ i,
463
+ (c) => c ? "bc-editable-text--disabled" : ""
464
464
  )
465
465
  ),
466
- N.disabled(c),
466
+ N.disabled(i),
467
467
  H(
468
468
  a,
469
- () => C.input(
469
+ () => k.input(
470
470
  u.placeholder(n),
471
471
  u.value(e),
472
472
  u.class("bc-editable-text__input"),
473
473
  Mt(),
474
- M.keydown((i) => {
475
- i.key === "Enter" ? a.set(!1) : i.key === "Escape" && (o.set(!0), a.set(!1));
474
+ M.keydown((c) => {
475
+ c.key === "Enter" ? a.set(!1) : c.key === "Escape" && (o.set(!0), a.set(!1));
476
476
  }),
477
477
  M.blur(
478
- Z((i) => {
478
+ Z((c) => {
479
479
  if (a.set(!1), o.value) {
480
480
  o.set(!1);
481
481
  return;
482
482
  }
483
- s(i);
483
+ s(c);
484
484
  })
485
485
  )
486
486
  ),
487
- () => C.span(
487
+ () => k.span(
488
488
  M.click(() => {
489
- p.get(c) || a.set(!0);
489
+ p.get(i) || a.set(!0);
490
490
  }),
491
491
  u.class("bc-editable-text__display"),
492
492
  H(
493
- p.map(e, (i) => i != null && i.trim() !== ""),
494
- () => C.span(u.class("bc-editable-text__text"), e),
495
- () => C.span(
493
+ p.map(e, (c) => c != null && c.trim() !== ""),
494
+ () => k.span(u.class("bc-editable-text__text"), e),
495
+ () => k.span(
496
496
  u.class("bc-editable-text__placeholder"),
497
497
  n
498
498
  )
499
499
  ),
500
500
  H(
501
- p.map(c, (i) => !i),
502
- () => C.button(
501
+ p.map(i, (c) => !c),
502
+ () => k.button(
503
503
  u.type("button"),
504
504
  u.class("bc-editable-text__edit-button"),
505
- ot(yt, (i) => N.label(i.$.editLabel)),
505
+ lt(yt, (c) => N.label(c.$.editLabel)),
506
506
  M.click(() => a.set(!0)),
507
507
  q({ icon: "line-md/pencil", color: "neutral" })
508
508
  )
@@ -510,45 +510,45 @@ const ue = (t) => {
510
510
  )
511
511
  )
512
512
  );
513
- }, de = (t) => {
514
- const { value: e, onBlur: s, onChange: n, onInput: r, after: a, disabled: o } = t, c = z(e, o, n ?? r);
515
- return L({
513
+ }, ue = (t) => {
514
+ const { value: e, onBlur: s, onChange: n, onInput: r, after: a, disabled: o } = t, i = z(e, o, n ?? r);
515
+ return U({
516
516
  ...t,
517
- input: ct.date(
518
- U(t),
517
+ input: ot.date(
518
+ L(t),
519
519
  u.valueAsDate(e),
520
520
  u.class("bc-input"),
521
521
  s != null ? M.blur(Z(s)) : A,
522
522
  n != null ? M.change(et(n)) : A,
523
523
  r != null ? M.input(et(r)) : A
524
524
  ),
525
- after: a != null ? E(c, a) : c
525
+ after: a != null ? E(i, a) : i
526
526
  });
527
- }, zt = (t) => {
527
+ }, Ht = (t) => {
528
528
  const e = t.getFullYear(), s = t.getMonth() + 1, n = t.getDate(), r = t.getHours(), a = t.getMinutes(), o = t.getSeconds();
529
529
  return `${e}-${s.toString().padStart(2, "0")}-${n.toString().padStart(2, "0")}T${r.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}:${o.toString().padStart(2, "0")}`;
530
- }, he = (t) => {
531
- const { value: e, onBlur: s, onChange: n, onInput: r, after: a, disabled: o } = t, c = p.map(e, (l) => l != null ? zt(l) : null), i = z(e, o, n ?? r);
532
- return L({
530
+ }, pe = (t) => {
531
+ const { value: e, onBlur: s, onChange: n, onInput: r, after: a, disabled: o } = t, i = p.map(e, (l) => l != null ? Ht(l) : null), c = z(e, o, n ?? r);
532
+ return U({
533
533
  ...t,
534
- input: ct["datetime-local"](
535
- U(t),
536
- u.value(p.map(c, (l) => l ?? null)),
534
+ input: ot["datetime-local"](
535
+ L(t),
536
+ u.value(p.map(i, (l) => l ?? null)),
537
537
  u.class("bc-input"),
538
538
  s != null ? M.blur(Z(s)) : A,
539
539
  n != null ? M.change(nt(n)) : A,
540
540
  r != null ? M.input(nt(r)) : A
541
541
  ),
542
- after: a != null ? E(i, a) : i
542
+ after: a != null ? E(c, a) : c
543
543
  });
544
- }, at = (t) => typeof t == "string" && t.trim() === "" ? null : t, Xt = (t) => t ?? "";
544
+ }, at = (t) => typeof t == "string" && t.trim() === "" ? null : t, jt = (t) => t ?? "";
545
545
  function P(t) {
546
546
  return (e) => {
547
- const { value: s, onBlur: n, onChange: r, onInput: a, after: o, disabled: c, ...i } = e, l = z(s, c, r ?? a);
547
+ const { value: s, onBlur: n, onChange: r, onInput: a, after: o, disabled: i, ...c } = e, l = z(s, i, r ?? a);
548
548
  return t({
549
- ...i,
550
- disabled: c,
551
- value: p.map(s, Xt),
549
+ ...c,
550
+ disabled: i,
551
+ value: p.map(s, jt),
552
552
  onChange: r != null ? (d) => r(at(d)) : void 0,
553
553
  onInput: a != null ? (d) => a(at(d)) : void 0,
554
554
  onBlur: n,
@@ -556,9 +556,9 @@ function P(t) {
556
556
  });
557
557
  };
558
558
  }
559
- const ge = P(_t), fe = P(wt), me = P(kt), be = P(
559
+ const de = P($t), he = P(wt), ge = P(xt), fe = P(
560
560
  gt
561
- ), we = ({
561
+ ), me = ({
562
562
  value: t,
563
563
  onChange: e,
564
564
  onInput: s,
@@ -566,38 +566,38 @@ const ge = P(_t), fe = P(wt), me = P(kt), be = P(
566
566
  offLabel: r,
567
567
  onLabel: a,
568
568
  disabled: o = !1,
569
- size: c = "md",
570
- id: i,
569
+ size: i = "md",
570
+ id: c,
571
571
  color: l = "primary",
572
572
  tabIndex: d = 0,
573
573
  matchInputHeight: f = !0
574
574
  }) => {
575
- const m = i ?? Ft("switch");
575
+ const m = c ?? _t("switch");
576
576
  function h(y, b) {
577
- const x = [
577
+ const _ = [
578
578
  "bc-switch",
579
579
  `bc-switch--size-${b}`,
580
580
  `bc-switch--${b}`
581
581
  ];
582
- return f && x.push("bc-switch--match-input"), y && x.push("bc-switch--disabled"), x.join(" ");
582
+ return f && _.push("bc-switch--match-input"), y && _.push("bc-switch--disabled"), _.join(" ");
583
583
  }
584
584
  function w(y) {
585
- const b = y ?? "primary", x = /* @__PURE__ */ new Map(), T = st(b, "solid", "light"), F = st(b, "solid", "dark");
586
- return x.set("--switch-track-on-bg", T.backgroundColor), x.set("--switch-track-on-label", T.textColor), x.set("--switch-track-on-bg-dark", F.backgroundColor), x.set("--switch-track-on-label-dark", F.textColor), x.set(
585
+ const b = y ?? "primary", _ = /* @__PURE__ */ new Map(), T = st(b, "solid", "light"), C = st(b, "solid", "dark");
586
+ return _.set("--switch-track-on-bg", T.backgroundColor), _.set("--switch-track-on-label", T.textColor), _.set("--switch-track-on-bg-dark", C.backgroundColor), _.set("--switch-track-on-label-dark", C.textColor), _.set(
587
587
  "--switch-track-on-border-dark",
588
588
  It(b, "dark")
589
- ), Array.from(x.entries()).map(([g, I]) => `${g}: ${I}`).join("; ");
589
+ ), Array.from(_.entries()).map(([g, $]) => `${g}: ${$}`).join("; ");
590
590
  }
591
- const $ = () => {
591
+ const I = () => {
592
592
  p.get(o) || (e?.(!p.get(t)), s?.(!p.get(t)));
593
- }, _ = (y) => {
594
- p.get(o) || (y.key === " " || y.key === "Enter") && (y.preventDefault(), $());
593
+ }, x = (y) => {
594
+ p.get(o) || (y.key === " " || y.key === "Enter") && (y.preventDefault(), I());
595
595
  };
596
- return C.div(
596
+ return k.div(
597
597
  u.class(
598
598
  D(
599
599
  o ?? !1,
600
- c
600
+ i
601
601
  )(
602
602
  (y, b) => h(y ?? !1, b ?? "md")
603
603
  )
@@ -617,10 +617,10 @@ const ge = P(_t), fe = P(wt), me = P(kt), be = P(
617
617
  ),
618
618
  N.checked(t),
619
619
  N.disabled(o),
620
- M.click($),
621
- M.keydown(_),
620
+ M.click(I),
621
+ M.keydown(x),
622
622
  n != null ? M.blur(n) : null,
623
- C.div(
623
+ k.div(
624
624
  u.class("bc-switch__track"),
625
625
  u.class(
626
626
  p.map(
@@ -628,7 +628,7 @@ const ge = P(_t), fe = P(wt), me = P(kt), be = P(
628
628
  (y) => y ? "bc-switch__track--on" : "bc-switch__track--off"
629
629
  )
630
630
  ),
631
- r != null ? C.div(
631
+ r != null ? k.div(
632
632
  N.hidden(!0),
633
633
  u.class("bc-switch__track-label bc-switch__track-label--off"),
634
634
  u.class(
@@ -639,7 +639,7 @@ const ge = P(_t), fe = P(wt), me = P(kt), be = P(
639
639
  ),
640
640
  r
641
641
  ) : null,
642
- a != null ? C.div(
642
+ a != null ? k.div(
643
643
  u.class("bc-switch__track-label bc-switch__track-label--on"),
644
644
  u.class(
645
645
  p.map(
@@ -649,47 +649,18 @@ const ge = P(_t), fe = P(wt), me = P(kt), be = P(
649
649
  ),
650
650
  a
651
651
  ) : null,
652
- xt(
653
- (y) => ot(
654
- $t,
655
- ({ direction: b }) => C.div(
656
- u.class("bc-switch__thumb"),
657
- u.class(
658
- p.map(
659
- t,
660
- (x) => x ? "bc-switch__thumb--on" : "bc-switch__thumb--off"
661
- )
662
- ),
663
- it.transform(
664
- D(
665
- t,
666
- y,
667
- c,
668
- b
669
- )((x, { width: T }, F, g) => {
670
- const I = (() => {
671
- switch (F) {
672
- case "xs":
673
- return 5;
674
- case "sm":
675
- return 5.5;
676
- case "md":
677
- return 6;
678
- case "lg":
679
- return 7;
680
- case "xl":
681
- return 8;
682
- }
683
- })(), k = g === "rtl" ? `calc((var(--spacing-base) * ${I}) - ${T}px)` : `calc(${T}px - (var(--spacing-base) * ${I}))`;
684
- return x ? `translateX(${k})` : "translateX(0)";
685
- })
686
- )
652
+ k.div(
653
+ u.class("bc-switch__thumb"),
654
+ u.class(
655
+ p.map(
656
+ t,
657
+ (y) => y ? "bc-switch__thumb--on" : "bc-switch__thumb--off"
687
658
  )
688
659
  )
689
660
  )
690
661
  )
691
662
  );
692
- }, ye = P(ft), Yt = "line-md:star-alt-filled", Gt = "line-md:star-alt", Kt = (t) => {
663
+ }, be = P(ft), zt = "line-md:star-alt-filled", Xt = "line-md:star-alt", Yt = (t) => {
693
664
  const {
694
665
  value: e,
695
666
  onChange: s,
@@ -697,65 +668,65 @@ const ge = P(_t), fe = P(wt), me = P(kt), be = P(
697
668
  max: r = 5,
698
669
  fullColor: a = "yellow",
699
670
  emptyColor: o = "neutral",
700
- fullIcon: c = Yt,
701
- emptyIcon: i = Gt,
671
+ fullIcon: i = zt,
672
+ emptyIcon: c = Xt,
702
673
  size: l = "md",
703
674
  onBlur: d,
704
675
  rounding: f = 1
705
676
  } = t, m = () => {
706
677
  const b = p.get(f);
707
678
  return b > 0 ? b : 1;
708
- }, h = (b) => Math.min(Math.max(b, 0), p.get(r)), w = (b, x) => {
679
+ }, h = (b) => Math.min(Math.max(b, 0), p.get(r)), w = (b, _) => {
709
680
  if (p.get(n ?? !1)) return;
710
- const F = b.currentTarget.getBoundingClientRect(), g = (b.clientX - F.left) / F.width, I = x - 1 + g, k = m(), S = Math.ceil(I / k) * k, v = h(S);
681
+ const C = b.currentTarget.getBoundingClientRect(), g = (b.clientX - C.left) / C.width, $ = _ - 1 + g, F = m(), S = Math.ceil($ / F) * F, v = h(S);
711
682
  s?.(v);
712
- }, $ = (b) => {
683
+ }, I = (b) => {
713
684
  if (p.get(n ?? !1)) return;
714
- const x = m(), T = p.get(e) ?? 0;
715
- let F;
685
+ const _ = m(), T = p.get(e) ?? 0;
686
+ let C;
716
687
  switch (b.key) {
717
688
  case "ArrowRight":
718
689
  case "ArrowUp":
719
- F = h(T + x);
690
+ C = h(T + _);
720
691
  break;
721
692
  case "ArrowLeft":
722
693
  case "ArrowDown":
723
- F = h(T - x);
694
+ C = h(T - _);
724
695
  break;
725
696
  case "Home":
726
- F = 0;
697
+ C = 0;
727
698
  break;
728
699
  case "End":
729
- F = p.get(r);
700
+ C = p.get(r);
730
701
  break;
731
702
  default:
732
703
  return;
733
704
  }
734
- b.preventDefault(), s?.(F);
735
- }, _ = p.map(l, (b) => `bc-icon--${b}`), y = ({ index: b, counter: x }) => C.span(
705
+ b.preventDefault(), s?.(C);
706
+ }, x = p.map(l, (b) => `bc-icon--${b}`), y = ({ index: b, counter: _ }) => k.span(
736
707
  u.class("bc-rating-input__icon-container"),
737
- u.class(_),
708
+ u.class(x),
738
709
  q(
739
710
  {
740
- icon: i,
711
+ icon: c,
741
712
  size: l,
742
713
  color: o,
743
714
  tone: "soft"
744
715
  },
745
716
  u.class("bc-rating-input__icon-empty")
746
717
  ),
747
- C.span(
718
+ k.span(
748
719
  u.class("bc-rating-input__icon-clipper"),
749
- u.class(_),
750
- it.width(
720
+ u.class(x),
721
+ pt.width(
751
722
  p.map(e, (T) => {
752
- const F = Math.floor(T);
753
- return F > b ? "100%" : F < b ? "0%" : `${(T - b) * 100}%`;
723
+ const C = Math.floor(T);
724
+ return C > b ? "100%" : C < b ? "0%" : `${(T - b) * 100}%`;
754
725
  })
755
726
  ),
756
727
  q(
757
728
  {
758
- icon: c,
729
+ icon: i,
759
730
  size: l,
760
731
  color: a,
761
732
  tone: "soft"
@@ -764,20 +735,20 @@ const ge = P(_t), fe = P(wt), me = P(kt), be = P(
764
735
  )
765
736
  ),
766
737
  M.click(
767
- dt((T) => w(T, x), {
738
+ dt((T) => w(T, _), {
768
739
  preventDefault: !0,
769
740
  stopPropagation: !0
770
741
  })
771
742
  )
772
743
  );
773
- return L({
744
+ return U({
774
745
  baseContainer: !0,
775
746
  growInput: !1,
776
747
  focusableSelector: '[role="slider"]',
777
748
  ...t,
778
- input: C.div(
749
+ input: k.div(
779
750
  // Common input attributes (id, required, invalid, custom classes, etc.)
780
- U(t),
751
+ L(t),
781
752
  u.class("bc-rating-input"),
782
753
  // ARIA slider semantics
783
754
  u.role("slider"),
@@ -790,38 +761,38 @@ const ge = P(_t), fe = P(wt), me = P(kt), be = P(
790
761
  D(
791
762
  e,
792
763
  r
793
- )((b, x) => {
794
- const T = b ?? 0, F = x ?? 0;
795
- return `${String(T)} / ${String(F)}`;
764
+ )((b, _) => {
765
+ const T = b ?? 0, C = _ ?? 0;
766
+ return `${String(T)} / ${String(C)}`;
796
767
  })
797
768
  ),
798
769
  // Keyboard & focus handlers
799
- M.keydown($),
770
+ M.keydown(I),
800
771
  d != null ? M.blur(d) : null,
801
- pt(r, y)
772
+ ut(r, y)
802
773
  )
803
774
  });
804
- }, $e = (t) => {
805
- const { value: e, onChange: s, onInput: n, onBlur: r, after: a, disabled: o, ...c } = t, i = z(e, o, s ?? n);
806
- return Kt({
807
- ...c,
775
+ }, we = (t) => {
776
+ const { value: e, onChange: s, onInput: n, onBlur: r, after: a, disabled: o, ...i } = t, c = z(e, o, s ?? n);
777
+ return Yt({
778
+ ...i,
808
779
  // Map null -> 0 for display so the control shows as empty when null
809
780
  value: p.map(e, (l) => l ?? 0),
810
781
  // Pass through numeric changes; clear button will call onChange(null)
811
782
  onChange: s,
812
783
  onInput: n,
813
784
  onBlur: r,
814
- after: a != null ? E(i, a) : i
785
+ after: a != null ? E(c, a) : c
815
786
  });
816
- }, Ie = (t) => {
817
- const { value: e, step: s, min: n, max: r, onBlur: a, onChange: o, onInput: c } = t;
818
- return L({
787
+ }, ye = (t) => {
788
+ const { value: e, step: s, min: n, max: r, onBlur: a, onChange: o, onInput: i } = t;
789
+ return U({
819
790
  ...t,
820
791
  // Make sure clicks anywhere focus the range input
821
792
  focusableSelector: 'input[type="range"]',
822
- input: C.input(
793
+ input: k.input(
823
794
  u.type("range"),
824
- U(t),
795
+ L(t),
825
796
  u.min(n),
826
797
  u.max(r),
827
798
  u.step(s),
@@ -830,31 +801,31 @@ const ge = P(_t), fe = P(wt), me = P(kt), be = P(
830
801
  u.class("bc-input bc-slider-input"),
831
802
  a != null ? M.blur(V(a)) : A,
832
803
  o != null ? M.change(V(o)) : A,
833
- c != null ? M.input(V(c)) : A
804
+ i != null ? M.input(V(i)) : A
834
805
  )
835
806
  });
836
- }, Me = (t) => {
837
- const { value: e, step: s, min: n, max: r, onBlur: a, onChange: o, onInput: c } = t, i = p.map(e, (d) => {
807
+ }, Ie = (t) => {
808
+ const { value: e, step: s, min: n, max: r, onBlur: a, onChange: o, onInput: i } = t, c = p.map(e, (d) => {
838
809
  if (d != null) return d;
839
810
  const f = n != null ? p.get(n) : void 0;
840
811
  return typeof f == "number" ? f : 0;
841
812
  }), l = z(
842
813
  e,
843
814
  t.disabled,
844
- o ?? c
815
+ o ?? i
845
816
  );
846
- return L(
817
+ return U(
847
818
  {
848
819
  ...t,
849
820
  focusableSelector: 'input[type="range"]',
850
821
  after: l,
851
- input: C.input(
822
+ input: k.input(
852
823
  u.type("range"),
853
- U(t),
824
+ L(t),
854
825
  u.min(n),
855
826
  u.max(r),
856
827
  u.step(s),
857
- u.valueAsNumber(i),
828
+ u.valueAsNumber(c),
858
829
  u.class("bc-input bc-slider-input"),
859
830
  a != null ? M.blur(V(a)) : A,
860
831
  o != null ? M.change(
@@ -862,9 +833,9 @@ const ge = P(_t), fe = P(wt), me = P(kt), be = P(
862
833
  o(d);
863
834
  })
864
835
  ) : A,
865
- c != null ? M.input(
836
+ i != null ? M.input(
866
837
  V((d) => {
867
- c(d);
838
+ i(d);
868
839
  })
869
840
  ) : A
870
841
  )
@@ -872,8 +843,8 @@ const ge = P(_t), fe = P(wt), me = P(kt), be = P(
872
843
  // Ensure container grows input naturally
873
844
  E()
874
845
  );
875
- }, xe = P(mt);
876
- class qt {
846
+ }, Me = P(mt);
847
+ class Gt {
877
848
  widgets = /* @__PURE__ */ new Map();
878
849
  typeMapping = /* @__PURE__ */ new Map();
879
850
  // JSON Schema type -> widget names
@@ -924,7 +895,7 @@ class qt {
924
895
  * Find the best widget for a schema context
925
896
  */
926
897
  findBestWidget(e) {
927
- const s = Ct(e.definition, e.name);
898
+ const s = kt(e.definition, e.name);
928
899
  if (s?.widget) {
929
900
  const r = this.widgets.get(s.widget);
930
901
  if (r)
@@ -965,8 +936,8 @@ class qt {
965
936
  return null;
966
937
  }
967
938
  }
968
- const _e = new qt();
969
- function ke(t, e, s) {
939
+ const $e = new Gt();
940
+ function xe(t, e, s) {
970
941
  return {
971
942
  factory: e,
972
943
  matcher: (n) => {
@@ -979,7 +950,7 @@ function ke(t, e, s) {
979
950
  ...s
980
951
  };
981
952
  }
982
- function Fe(t, e, s) {
953
+ function _e(t, e, s) {
983
954
  return {
984
955
  factory: e,
985
956
  matcher: (n) => n.definition.format === t,
@@ -988,7 +959,7 @@ function Fe(t, e, s) {
988
959
  ...s
989
960
  };
990
961
  }
991
- function Ce(t, e, s, n) {
962
+ function ke(t, e, s, n) {
992
963
  return {
993
964
  factory: s,
994
965
  matcher: (r) => {
@@ -1000,7 +971,7 @@ function Ce(t, e, s, n) {
1000
971
  ...n
1001
972
  };
1002
973
  }
1003
- function Te(t) {
974
+ function Fe(t) {
1004
975
  const e = t?.logPrefix ?? "WIDGET_DIAG", s = t?.filterFn ?? (() => !0);
1005
976
  return {
1006
977
  factory: () => null,
@@ -1024,51 +995,51 @@ function Te(t) {
1024
995
  }
1025
996
  export {
1026
997
  j as A,
1027
- le as B,
1028
- ue as C,
1029
- ie as D,
1030
- pe as E,
1031
- Rt as F,
1032
- Nt as G,
1033
- Dt as H,
1034
- ut as I,
1035
- Bt as J,
998
+ ie as B,
999
+ ce as C,
1000
+ oe as D,
1001
+ le as E,
1002
+ St as F,
1003
+ vt as G,
1004
+ Rt as H,
1005
+ ct as I,
1006
+ Nt as J,
1036
1007
  J as K,
1037
- Vt as L,
1008
+ Dt as L,
1038
1009
  G as M,
1039
- fe as N,
1010
+ he as N,
1040
1011
  K as O,
1041
- Et as P,
1042
- Lt as Q,
1043
- Kt as R,
1044
- Ie as S,
1012
+ Bt as P,
1013
+ Vt as Q,
1014
+ Yt as R,
1015
+ ye as S,
1045
1016
  O as T,
1046
1017
  W as U,
1047
- qt as W,
1048
- be as a,
1049
- ye as b,
1050
- xe as c,
1051
- me as d,
1052
- he as e,
1053
- de as f,
1054
- _e as g,
1055
- ge as h,
1056
- Me as i,
1057
- $e as j,
1058
- we as k,
1059
- ke as l,
1060
- Fe as m,
1061
- Ce as n,
1062
- Te as o,
1018
+ Gt as W,
1019
+ fe as a,
1020
+ be as b,
1021
+ Me as c,
1022
+ ge as d,
1023
+ pe as e,
1024
+ ue as f,
1025
+ $e as g,
1026
+ de as h,
1027
+ Ie as i,
1028
+ we as j,
1029
+ me as k,
1030
+ xe as l,
1031
+ _e as m,
1032
+ ke as n,
1033
+ Fe as o,
1063
1034
  at as p,
1064
- Xt as q,
1065
- ce as r,
1066
- lt as s,
1067
- vt as t,
1068
- Ut as u,
1069
- Ht as v,
1070
- Tt as w,
1071
- At as x,
1072
- St as y,
1035
+ jt as q,
1036
+ re as r,
1037
+ it as s,
1038
+ At as t,
1039
+ Et as u,
1040
+ Ot as v,
1041
+ Ft as w,
1042
+ Ct as x,
1043
+ Tt as y,
1073
1044
  Q as z
1074
1045
  };