border-beam 1.0.1 → 1.2.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.
package/dist/index.es.js CHANGED
@@ -1,8 +1,8 @@
1
- import { jsxs as Q, Fragment as oe, jsx as V } from "react/jsx-runtime";
2
- import { forwardRef as te, useId as se, useRef as ie, useState as O, useEffect as L, useCallback as q, useMemo as ne } from "react";
3
- const ce = {
1
+ import { jsxs as he, Fragment as Ce, jsx as ze } from "react/jsx-runtime";
2
+ import { forwardRef as Ge, useId as Me, useRef as Ie, useState as L, useEffect as P, useCallback as ye, useMemo as ke } from "react";
3
+ const Le = {
4
4
  sm: {
5
- borderRadius: 18,
5
+ borderRadius: 32,
6
6
  borderWidth: 1,
7
7
  width: 70,
8
8
  height: 36
@@ -14,60 +14,112 @@ const ce = {
14
14
  line: {
15
15
  borderRadius: 16,
16
16
  borderWidth: 1
17
+ },
18
+ "pulse-outside": {
19
+ borderRadius: 16,
20
+ borderWidth: 1
21
+ },
22
+ "pulse-inner": {
23
+ borderRadius: 16,
24
+ borderWidth: 1
17
25
  }
18
- }, I = {
26
+ }, ne = {
19
27
  sm: {
20
28
  dark: {
21
- strokeOpacity: 0.48,
22
- innerOpacity: 0.7,
23
- bloomOpacity: 0.8,
29
+ strokeOpacity: 0.46,
30
+ innerOpacity: 0.24,
31
+ bloomOpacity: 0.38,
24
32
  innerShadow: "rgba(255, 255, 255, 0.3)",
25
33
  saturation: 1.2
26
34
  },
27
35
  light: {
28
- strokeOpacity: 0.33,
29
- innerOpacity: 0.46,
30
- bloomOpacity: 0.54,
36
+ strokeOpacity: 0.12,
37
+ innerOpacity: 0.3,
38
+ bloomOpacity: 0.16,
31
39
  innerShadow: "rgba(0, 0, 0, 0.14)",
32
- saturation: 0.96
40
+ saturation: 1.8
33
41
  }
34
42
  },
35
43
  md: {
36
44
  dark: {
37
- strokeOpacity: 0.48,
38
- innerOpacity: 0.7,
39
- bloomOpacity: 0.8,
45
+ strokeOpacity: 0.26,
46
+ innerOpacity: 0.42,
47
+ bloomOpacity: 0.24,
40
48
  innerShadow: "rgba(255, 255, 255, 0.27)",
41
49
  saturation: 1.2
42
50
  },
43
51
  light: {
44
- strokeOpacity: 0.33,
45
- innerOpacity: 0.46,
46
- bloomOpacity: 0.54,
52
+ strokeOpacity: 0.12,
53
+ innerOpacity: 0.26,
54
+ bloomOpacity: 0.34,
47
55
  innerShadow: "rgba(0, 0, 0, 0.14)",
48
- saturation: 0.96
56
+ saturation: 1.5
49
57
  }
50
58
  },
51
59
  line: {
52
60
  dark: {
53
- strokeOpacity: 0.72,
61
+ strokeOpacity: 1.14,
54
62
  innerOpacity: 0.7,
55
63
  bloomOpacity: 0.8,
56
64
  innerShadow: "rgba(255, 255, 255, 0.1)",
57
65
  saturation: 1.2
58
66
  },
59
67
  light: {
60
- strokeOpacity: 0.72,
61
- innerOpacity: 0.7,
62
- bloomOpacity: 0.8,
68
+ strokeOpacity: 0.16,
69
+ innerOpacity: 0.32,
70
+ bloomOpacity: 0.3,
63
71
  innerShadow: "rgba(0, 0, 0, 0.14)",
64
- saturation: 1.2
72
+ saturation: 1.95
73
+ }
74
+ },
75
+ // Pulse Outside — outward-blooming breathe (ported from v5 "Breathe Outside Uncropped" / c6)
76
+ "pulse-outside": {
77
+ dark: {
78
+ strokeOpacity: 0.94,
79
+ innerOpacity: 0.34,
80
+ bloomOpacity: 0.3,
81
+ innerShadow: "transparent",
82
+ saturation: 1.2,
83
+ brightness: 1.9,
84
+ // v5 Card 5 frames the card with a single 1px hairline (its box-shadow at
85
+ // 0.3). Wrapped components here already supply their own ~equivalent 1px
86
+ // border, so the beam must NOT add a second hairline on top or the edge
87
+ // reads brighter than v5. Kept at 0 to match v5's single-hairline look.
88
+ hairlineOpacity: 0
89
+ },
90
+ light: {
91
+ strokeOpacity: 1.96,
92
+ innerOpacity: 1.04,
93
+ bloomOpacity: 0.42,
94
+ innerShadow: "transparent",
95
+ saturation: 0.6,
96
+ brightness: 1.7,
97
+ hairlineOpacity: 0
98
+ }
99
+ },
100
+ // Pulse Inner — contained breathe (ported from v5 "Breathe" / c4)
101
+ "pulse-inner": {
102
+ dark: {
103
+ strokeOpacity: 1.54,
104
+ innerOpacity: 0.44,
105
+ bloomOpacity: 0.66,
106
+ innerShadow: "transparent",
107
+ saturation: 1.2,
108
+ brightness: 0.75
109
+ },
110
+ light: {
111
+ strokeOpacity: 0.32,
112
+ innerOpacity: 0.4,
113
+ bloomOpacity: 0.8,
114
+ innerShadow: "transparent",
115
+ saturation: 0.75,
116
+ brightness: 1.3
65
117
  }
66
118
  }
67
- }, Fe = {
68
- dark: { ...I.md.dark },
69
- light: { ...I.md.light }
70
- }, B = {
119
+ }, ha = {
120
+ dark: { ...ne.md.dark },
121
+ light: { ...ne.md.light }
122
+ }, C = {
71
123
  colorful: {
72
124
  border: [
73
125
  { color: "rgb(255, 50, 100)", pos: "33% -7.4%", size: "70px 40px" },
@@ -128,7 +180,7 @@ const ce = {
128
180
  spike: { primary: "rgb(255, 140, 80)", secondary: "rgba(255, 100, 60, 0.98)" },
129
181
  spikeLt: { primary: "rgb(200, 80, 40)", secondary: "rgb(220, 120, 30)" }
130
182
  }
131
- }, A = {
183
+ }, He = {
132
184
  colorful: {
133
185
  border: [
134
186
  { color: "rgb(50, 200, 80)", pos: "2% 68%", size: "9px 18px" },
@@ -218,34 +270,34 @@ const ce = {
218
270
  ]
219
271
  }
220
272
  };
221
- function pe(r) {
222
- return A[r].border.map((a) => `radial-gradient(ellipse ${a.size} at ${a.pos}, ${a.color}, transparent)`).join(`,
273
+ function Pe(t) {
274
+ return He[t].border.map((a) => `radial-gradient(ellipse ${a.size} at ${a.pos}, ${a.color}, transparent)`).join(`,
223
275
  `);
224
276
  }
225
- function le(r) {
226
- return A[r].inner.map((a) => `radial-gradient(ellipse ${a.size} at ${a.pos}, ${a.color}, transparent)`).join(`,
277
+ function Be(t) {
278
+ return He[t].inner.map((a) => `radial-gradient(ellipse ${a.size} at ${a.pos}, ${a.color}, transparent)`).join(`,
227
279
  `);
228
280
  }
229
- function be(r) {
230
- return B[r].border.map((a) => `radial-gradient(ellipse ${a.size} at ${a.pos}, ${a.color}, transparent)`).join(`,
281
+ function Ee(t) {
282
+ return C[t].border.map((a) => `radial-gradient(ellipse ${a.size} at ${a.pos}, ${a.color}, transparent)`).join(`,
231
283
  `);
232
284
  }
233
- function fe(r) {
234
- const e = B[r], a = r === "mono" ? 0.225 : 0.45;
235
- return e.border.map((t) => {
236
- const o = t.color.replace("rgb(", "rgba(").replace(")", `, ${a})`);
237
- return `radial-gradient(ellipse ${t.size.split(" ").map((m) => {
238
- const s = parseInt(m);
239
- return `${Math.round(s * 0.9)}px`;
240
- }).join(" ")} at ${t.pos}, ${o}, transparent)`;
285
+ function Ae(t) {
286
+ const e = C[t], a = t === "mono" ? 0.225 : 0.45;
287
+ return e.border.map((r) => {
288
+ const o = r.color.replace("rgb(", "rgba(").replace(")", `, ${a})`);
289
+ return `radial-gradient(ellipse ${r.size.split(" ").map((i) => {
290
+ const c = parseInt(i);
291
+ return `${Math.round(c * 0.9)}px`;
292
+ }).join(" ")} at ${r.pos}, ${o}, transparent)`;
241
293
  }).join(`,
242
294
  `);
243
295
  }
244
- function ge(r, e) {
245
- const a = B[r];
296
+ function _e(t, e) {
297
+ const a = C[t];
246
298
  return e ? a.spike : a.spikeLt;
247
299
  }
248
- const me = {
300
+ const je = {
249
301
  colorful: {
250
302
  dark: [
251
303
  { color: "rgb(255, 50, 100)", sizeW: 36, sizeH: 36, offsetX: 0, offsetY: 2 },
@@ -343,14 +395,14 @@ const me = {
343
395
  ]
344
396
  }
345
397
  };
346
- function de(r, e, a) {
347
- return me[r][e ? "dark" : "light"].map((o) => {
348
- const p = o.offsetX === 0 ? "" : o.offsetX > 0 ? ` + ${o.offsetX}px` : ` - ${Math.abs(o.offsetX)}px`, m = o.offsetY === 0 ? "" : o.offsetY > 0 ? ` + ${o.offsetY}px` : ` - ${Math.abs(o.offsetY)}px`;
349
- return `radial-gradient(ellipse calc(${o.sizeW}px * var(--beam-w-${a})) calc(${o.sizeH}px * var(--beam-h-${a})) at calc(var(--beam-x-${a}) * 100%${p}) calc(100%${m}), ${o.color}, transparent)`;
398
+ function Te(t, e, a) {
399
+ return je[t][e ? "dark" : "light"].map((o) => {
400
+ const s = o.offsetX === 0 ? "" : o.offsetX > 0 ? ` + ${o.offsetX}px` : ` - ${Math.abs(o.offsetX)}px`, i = o.offsetY === 0 ? "" : o.offsetY > 0 ? ` + ${o.offsetY}px` : ` - ${Math.abs(o.offsetY)}px`;
401
+ return `radial-gradient(ellipse calc(${o.sizeW}px * var(--beam-w-${a})) calc(${o.sizeH}px * var(--beam-h-${a})) at calc(var(--beam-x-${a}) * 100%${s}) calc(100%${i}), ${o.color}, transparent)`;
350
402
  }).join(`,
351
403
  `);
352
404
  }
353
- const xe = {
405
+ const Ne = {
354
406
  colorful: [
355
407
  { color: "rgba(255, 50, 100, 0.48)", sizeW: 33, sizeH: 30, offsetX: 0, offsetY: 0 },
356
408
  { color: "rgba(40, 180, 220, 0.42)", sizeW: 24, sizeH: 26, offsetX: 39, offsetY: -3 },
@@ -396,14 +448,14 @@ const xe = {
396
448
  { color: "rgba(255, 70, 70, 0.52)", sizeW: 18, sizeH: 26, offsetX: -66, offsetY: -1 }
397
449
  ]
398
450
  };
399
- function $e(r, e) {
400
- return xe[r].map((t) => {
401
- const o = t.offsetX === 0 ? "" : t.offsetX > 0 ? ` + ${t.offsetX}px` : ` - ${Math.abs(t.offsetX)}px`, p = t.offsetY === 0 ? "" : ` - ${Math.abs(t.offsetY)}px`;
402
- return `radial-gradient(ellipse calc(${t.sizeW}px * var(--beam-w-${e})) calc(${t.sizeH}px * var(--beam-h-${e})) at calc(var(--beam-x-${e}) * 100%${o}) calc(100%${p}), ${t.color}, transparent)`;
451
+ function Ve(t, e) {
452
+ return Ne[t].map((r) => {
453
+ const o = r.offsetX === 0 ? "" : r.offsetX > 0 ? ` + ${r.offsetX}px` : ` - ${Math.abs(r.offsetX)}px`, s = r.offsetY === 0 ? "" : ` - ${Math.abs(r.offsetY)}px`;
454
+ return `radial-gradient(ellipse calc(${r.sizeW}px * var(--beam-w-${e})) calc(${r.sizeH}px * var(--beam-h-${e})) at calc(var(--beam-x-${e}) * 100%${o}) calc(100%${s}), ${r.color}, transparent)`;
403
455
  }).join(`,
404
456
  `);
405
457
  }
406
- const ze = {
458
+ const De = {
407
459
  colorful: {
408
460
  dark: {
409
461
  spikes: [
@@ -495,83 +547,263 @@ const ze = {
495
547
  }
496
548
  }
497
549
  };
498
- function G(r, e) {
499
- const a = r.match(/^rgba\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*[\d.]+\s*\)$/);
550
+ function U(t, e) {
551
+ const a = t.match(/^rgba\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*[\d.]+\s*\)$/);
500
552
  if (a) return `rgba(${a[1]}, ${a[2]}, ${a[3]}, ${e})`;
501
- const t = r.match(/^rgb\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)$/);
502
- return t ? `rgba(${t[1]}, ${t[2]}, ${t[3]}, ${e})` : r;
503
- }
504
- function he(r, e, a) {
505
- const t = ge(r, e), o = t.primary, p = t.secondary, s = ze[r][e ? "dark" : "light"].spikes;
506
- if (r === "mono")
507
- return ue(e, a);
508
- if (e) {
509
- const c = o, f = o, i = p, n = G(p, 0.49);
510
- return `radial-gradient(ellipse calc(0.8px * var(--beam-spike-${a})) calc(92px * var(--beam-h-${a})) at 8% calc(100% - 2px), ${c}, ${f} 30%, transparent 88%),
511
- radial-gradient(ellipse calc(10px * var(--beam-spike2-${a})) calc(35px * var(--beam-h-${a})) at 22% calc(100% - 4px), ${i}, ${n} 50%, transparent 95%),
512
- radial-gradient(ellipse calc(2px * (2 - var(--beam-spike-${a}))) calc(72px * var(--beam-h-${a})) at 36% calc(100% - 3px), ${s[0].color1}, ${s[0].color2} 40%, transparent 90%),
513
- radial-gradient(ellipse calc(14px * var(--beam-spike2-${a})) calc(28px * var(--beam-h-${a})) at 50% calc(100% - 2px), ${s[1].color1}, ${s[1].color2} 55%, transparent 96%),
514
- radial-gradient(ellipse calc(1.2px * (2 - var(--beam-spike2-${a}))) calc(85px * var(--beam-h-${a})) at 64% calc(100% - 4px), ${s[2].color1}, ${s[2].color2} 35%, transparent 89%),
515
- radial-gradient(ellipse calc(7px * var(--beam-spike-${a})) calc(45px * var(--beam-h-${a})) at 78% calc(100% - 2px), ${s[3].color1}, ${s[3].color2} 48%, transparent 94%),
516
- radial-gradient(ellipse calc(0.6px * (2 - var(--beam-spike-${a}))) calc(60px * var(--beam-h-${a})) at 92% calc(100% - 3px), ${s[4].color1}, ${s[4].color2} 42%, transparent 91%),
517
- radial-gradient(ellipse calc(21px * var(--beam-spike-${a})) calc(15px * var(--beam-spike2-${a})) at calc(var(--beam-x-${a}) * 100%) calc(100% + 1px), rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.9) 20%, rgba(255, 255, 255, 0.5) 50%, transparent 100%),
518
- radial-gradient(ellipse calc(42px * var(--beam-w-${a})) calc(40px * var(--beam-h-${a})) at calc(var(--beam-x-${a}) * 100%) 100%, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.12) 25%, rgba(255, 255, 255, 0.03) 55%, transparent 80%)`;
519
- } else {
520
- const c = o, f = G(o, 0.85), i = p, n = G(p, 0.7);
521
- return `radial-gradient(ellipse calc(0.8px * var(--beam-spike-${a})) calc(92px * var(--beam-h-${a})) at 8% calc(100% - 2px), ${c}, ${f} 30%, transparent 88%),
522
- radial-gradient(ellipse calc(10px * var(--beam-spike2-${a})) calc(35px * var(--beam-h-${a})) at 22% calc(100% - 4px), ${i}, ${n} 50%, transparent 95%),
523
- radial-gradient(ellipse calc(2px * (2 - var(--beam-spike-${a}))) calc(72px * var(--beam-h-${a})) at 36% calc(100% - 3px), ${s[0].color1}, ${s[0].color2} 40%, transparent 90%),
524
- radial-gradient(ellipse calc(14px * var(--beam-spike2-${a})) calc(28px * var(--beam-h-${a})) at 50% calc(100% - 2px), ${s[1].color1}, ${s[1].color2} 55%, transparent 96%),
525
- radial-gradient(ellipse calc(1.2px * (2 - var(--beam-spike2-${a}))) calc(85px * var(--beam-h-${a})) at 64% calc(100% - 4px), ${s[2].color1}, ${s[2].color2} 35%, transparent 89%),
526
- radial-gradient(ellipse calc(7px * var(--beam-spike-${a})) calc(45px * var(--beam-h-${a})) at 78% calc(100% - 2px), ${s[3].color1}, ${s[3].color2} 48%, transparent 94%),
527
- radial-gradient(ellipse calc(1px * (2 - var(--beam-spike-${a}))) calc(60px * var(--beam-h-${a})) at 92% calc(100% - 3px), ${s[4].color1}, ${s[4].color2} 42%, transparent 91%),
553
+ const r = t.match(/^rgb\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)$/);
554
+ return r ? `rgba(${r[1]}, ${r[2]}, ${r[3]}, ${e})` : t;
555
+ }
556
+ function q(t, e) {
557
+ const a = t.match(/^rgba\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)$/);
558
+ if (a) return `rgba(${a[1]}, ${a[2]}, ${a[3]}, ${(parseFloat(a[4]) * e).toFixed(2)})`;
559
+ const r = t.match(/^rgb\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)$/);
560
+ return r ? `rgba(${r[1]}, ${r[2]}, ${r[3]}, ${e.toFixed(2)})` : t;
561
+ }
562
+ function Ue(t, e, a) {
563
+ const r = _e(t, e), o = De[t][e ? "dark" : "light"], s = t === "mono", i = s ? 0.14 : 1, c = s ? q(r.primary, 0.14) : r.primary, b = s ? q(r.primary, 0.09) : r.primary, p = s ? q(r.secondary, 0.12) : r.secondary, m = s ? U(r.secondary, 0.06) : U(r.secondary, 0.49), n = o.spikes.map(
564
+ ($) => s ? { color1: q($.color1, i), color2: q($.color2, i * 0.7) } : $
565
+ ), l = s ? "12px" : "0.8px", f = s ? "14px" : "2px", v = s ? "12px" : "1.2px", d = s ? "10px" : "0.6px", g = s ? "42px" : "92px", W = s ? "38px" : "72px", Y = s ? "40px" : "85px", y = s ? "32px" : "60px", H = s ? "12px" : "1px", x = s ? "rgba(255, 255, 255, 0.5)" : "rgba(255, 255, 255, 1)", w = s ? "rgba(255, 255, 255, 0.45)" : "rgba(255, 255, 255, 0.9)", k = s ? "rgba(255, 255, 255, 0.25)" : "rgba(255, 255, 255, 0.5)", h = s ? "rgba(255, 255, 255, 0.15)" : "rgba(255, 255, 255, 0.3)", X = s ? "rgba(255, 255, 255, 0.06)" : "rgba(255, 255, 255, 0.12)", u = s ? "rgba(255, 255, 255, 0.015)" : "rgba(255, 255, 255, 0.03)";
566
+ if (e)
567
+ return `radial-gradient(ellipse calc(${l} * var(--beam-spike-${a})) calc(${g} * var(--beam-h-${a})) at 8% calc(100% - 2px), ${c}, ${b} 30%, transparent 88%),
568
+ radial-gradient(ellipse calc(10px * var(--beam-spike2-${a})) calc(35px * var(--beam-h-${a})) at 22% calc(100% - 4px), ${p}, ${m} 50%, transparent 95%),
569
+ radial-gradient(ellipse calc(${f} * (2 - var(--beam-spike-${a}))) calc(${W} * var(--beam-h-${a})) at 36% calc(100% - 3px), ${n[0].color1}, ${n[0].color2} 40%, transparent 90%),
570
+ radial-gradient(ellipse calc(14px * var(--beam-spike2-${a})) calc(28px * var(--beam-h-${a})) at 50% calc(100% - 2px), ${n[1].color1}, ${n[1].color2} 55%, transparent 96%),
571
+ radial-gradient(ellipse calc(${v} * (2 - var(--beam-spike2-${a}))) calc(${Y} * var(--beam-h-${a})) at 64% calc(100% - 4px), ${n[2].color1}, ${n[2].color2} 35%, transparent 89%),
572
+ radial-gradient(ellipse calc(7px * var(--beam-spike-${a})) calc(45px * var(--beam-h-${a})) at 78% calc(100% - 2px), ${n[3].color1}, ${n[3].color2} 48%, transparent 94%),
573
+ radial-gradient(ellipse calc(${d} * (2 - var(--beam-spike-${a}))) calc(${y} * var(--beam-h-${a})) at 92% calc(100% - 3px), ${n[4].color1}, ${n[4].color2} 42%, transparent 91%),
574
+ radial-gradient(ellipse calc(21px * var(--beam-spike-${a})) calc(15px * var(--beam-spike2-${a})) at calc(var(--beam-x-${a}) * 100%) calc(100% + 1px), ${x} 0%, ${w} 20%, ${k} 50%, transparent 100%),
575
+ radial-gradient(ellipse calc(42px * var(--beam-w-${a})) calc(40px * var(--beam-h-${a})) at calc(var(--beam-x-${a}) * 100%) 100%, ${h} 0%, ${X} 25%, ${u} 55%, transparent 80%)`;
576
+ {
577
+ const $ = s ? q(r.primary, 0.11) : U(r.primary, 0.85), F = s ? q(r.secondary, 0.09) : U(r.secondary, 0.7);
578
+ return `radial-gradient(ellipse calc(${l} * var(--beam-spike-${a})) calc(${g} * var(--beam-h-${a})) at 8% calc(100% - 2px), ${c}, ${$} 30%, transparent 88%),
579
+ radial-gradient(ellipse calc(10px * var(--beam-spike2-${a})) calc(35px * var(--beam-h-${a})) at 22% calc(100% - 4px), ${p}, ${F} 50%, transparent 95%),
580
+ radial-gradient(ellipse calc(${f} * (2 - var(--beam-spike-${a}))) calc(${W} * var(--beam-h-${a})) at 36% calc(100% - 3px), ${n[0].color1}, ${n[0].color2} 40%, transparent 90%),
581
+ radial-gradient(ellipse calc(14px * var(--beam-spike2-${a})) calc(28px * var(--beam-h-${a})) at 50% calc(100% - 2px), ${n[1].color1}, ${n[1].color2} 55%, transparent 96%),
582
+ radial-gradient(ellipse calc(${v} * (2 - var(--beam-spike2-${a}))) calc(${Y} * var(--beam-h-${a})) at 64% calc(100% - 4px), ${n[2].color1}, ${n[2].color2} 35%, transparent 89%),
583
+ radial-gradient(ellipse calc(7px * var(--beam-spike-${a})) calc(45px * var(--beam-h-${a})) at 78% calc(100% - 2px), ${n[3].color1}, ${n[3].color2} 48%, transparent 94%),
584
+ radial-gradient(ellipse calc(${H} * (2 - var(--beam-spike-${a}))) calc(${y} * var(--beam-h-${a})) at 92% calc(100% - 3px), ${n[4].color1}, ${n[4].color2} 42%, transparent 91%),
528
585
  radial-gradient(ellipse calc(50px * var(--beam-w-${a})) calc(32px * var(--beam-h-${a})) at calc(var(--beam-x-${a}) * 100%) calc(100%), rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.18) 30%, rgba(0, 0, 0, 0.03) 60%, transparent 85%)`;
529
586
  }
530
587
  }
531
- function ue(r, e) {
532
- return r ? `radial-gradient(ellipse calc(18px * var(--beam-spike-${e})) calc(30px * var(--beam-h-${e})) at 8% calc(100% - 2px), rgba(200, 200, 200, 0.35), rgba(200, 200, 200, 0.12) 50%, transparent 100%),
533
- radial-gradient(ellipse calc(14px * var(--beam-spike2-${e})) calc(28px * var(--beam-h-${e})) at 22% calc(100% - 4px), rgba(170, 170, 170, 0.3), rgba(170, 170, 170, 0.1) 50%, transparent 100%),
534
- radial-gradient(ellipse calc(16px * var(--beam-spike-${e})) calc(32px * var(--beam-h-${e})) at 36% calc(100% - 3px), rgba(190, 190, 190, 0.35), rgba(190, 190, 190, 0.12) 50%, transparent 100%),
535
- radial-gradient(ellipse calc(20px * var(--beam-spike2-${e})) calc(25px * var(--beam-h-${e})) at 50% calc(100% - 2px), rgba(180, 180, 180, 0.25), rgba(180, 180, 180, 0.08) 55%, transparent 100%),
536
- radial-gradient(ellipse calc(15px * var(--beam-spike2-${e})) calc(30px * var(--beam-h-${e})) at 64% calc(100% - 4px), rgba(185, 185, 185, 0.32), rgba(185, 185, 185, 0.1) 50%, transparent 100%),
537
- radial-gradient(ellipse calc(12px * var(--beam-spike-${e})) calc(28px * var(--beam-h-${e})) at 78% calc(100% - 2px), rgba(175, 175, 175, 0.28), rgba(175, 175, 175, 0.09) 50%, transparent 100%),
538
- radial-gradient(ellipse calc(17px * var(--beam-spike-${e})) calc(26px * var(--beam-h-${e})) at 92% calc(100% - 3px), rgba(195, 195, 195, 0.3), rgba(195, 195, 195, 0.1) 50%, transparent 100%),
539
- radial-gradient(ellipse calc(21px * var(--beam-spike-${e})) calc(15px * var(--beam-spike2-${e})) at calc(var(--beam-x-${e}) * 100%) calc(100% + 1px), rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.9) 20%, rgba(255, 255, 255, 0.5) 50%, transparent 100%),
540
- radial-gradient(ellipse calc(42px * var(--beam-w-${e})) calc(40px * var(--beam-h-${e})) at calc(var(--beam-x-${e}) * 100%) 100%, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.12) 25%, rgba(255, 255, 255, 0.03) 55%, transparent 80%)` : `radial-gradient(ellipse calc(18px * var(--beam-spike-${e})) calc(30px * var(--beam-h-${e})) at 8% calc(100% - 2px), rgba(80, 80, 80, 0.3), rgba(80, 80, 80, 0.1) 50%, transparent 100%),
541
- radial-gradient(ellipse calc(14px * var(--beam-spike2-${e})) calc(28px * var(--beam-h-${e})) at 22% calc(100% - 4px), rgba(100, 100, 100, 0.25), rgba(100, 100, 100, 0.08) 50%, transparent 100%),
542
- radial-gradient(ellipse calc(16px * var(--beam-spike-${e})) calc(32px * var(--beam-h-${e})) at 36% calc(100% - 3px), rgba(70, 70, 70, 0.3), rgba(70, 70, 70, 0.1) 50%, transparent 100%),
543
- radial-gradient(ellipse calc(20px * var(--beam-spike2-${e})) calc(25px * var(--beam-h-${e})) at 50% calc(100% - 2px), rgba(90, 90, 90, 0.22), rgba(90, 90, 90, 0.07) 55%, transparent 100%),
544
- radial-gradient(ellipse calc(15px * var(--beam-spike2-${e})) calc(30px * var(--beam-h-${e})) at 64% calc(100% - 4px), rgba(85, 85, 85, 0.28), rgba(85, 85, 85, 0.09) 50%, transparent 100%),
545
- radial-gradient(ellipse calc(12px * var(--beam-spike-${e})) calc(28px * var(--beam-h-${e})) at 78% calc(100% - 2px), rgba(95, 95, 95, 0.24), rgba(95, 95, 95, 0.08) 50%, transparent 100%),
546
- radial-gradient(ellipse calc(17px * var(--beam-spike-${e})) calc(26px * var(--beam-h-${e})) at 92% calc(100% - 3px), rgba(75, 75, 75, 0.26), rgba(75, 75, 75, 0.08) 50%, transparent 100%),
547
- radial-gradient(ellipse calc(50px * var(--beam-w-${e})) calc(32px * var(--beam-h-${e})) at calc(var(--beam-x-${e}) * 100%) calc(100%), rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.18) 30%, rgba(0, 0, 0, 0.03) 60%, transparent 85%)`;
548
- }
549
- function ke(r) {
550
- const { size: e } = r;
551
- return e === "line" ? we(r) : e === "sm" ? ve(r) : ye(r);
552
- }
553
- function ve(r) {
588
+ const Xe = [
589
+ { region: 1, quad: "tl" },
590
+ { region: 2, quad: "tl" },
591
+ { region: 3, quad: "bl" },
592
+ { region: 1, quad: "bl" },
593
+ { region: 2, quad: "br" },
594
+ { region: 3, quad: "br" },
595
+ { region: 1, quad: "tr" },
596
+ { region: 2, quad: "tr" },
597
+ { region: 3, quad: "tr" }
598
+ ], Ke = [
599
+ [65, 35],
600
+ [55, 30],
601
+ [35, 65],
602
+ [15, 30],
603
+ [173, 28],
604
+ [80, 22],
605
+ [69, 28],
606
+ [22, 38],
607
+ [47, 44]
608
+ ], Qe = [
609
+ { ci: 0, region: 1, quad: "tl", w: 84, h: 48 },
610
+ { ci: 1, region: 2, quad: "tl", w: 72, h: 42 },
611
+ { ci: 2, region: 3, quad: "bl", w: 48, h: 84 },
612
+ { ci: 4, region: 2, quad: "br", w: 216, h: 38 },
613
+ { ci: 5, region: 3, quad: "br", w: 102, h: 31 },
614
+ { ci: 6, region: 1, quad: "tr", w: 89, h: 38 },
615
+ { ci: 8, region: 3, quad: "tr", w: 62, h: 58 }
616
+ ], ve = [
617
+ { ci: 0, region: 1, quad: "tl", w: 80, h: 19, x: "27%", y: "0%" },
618
+ { ci: 6, region: 2, quad: "tr", w: 74, h: 11, x: "73%", y: "-1%" },
619
+ { ci: 7, region: 3, quad: "tr", w: 15, h: 44, x: "100%", y: "33%" },
620
+ { ci: 8, region: 1, quad: "br", w: 19, h: 38, x: "101%", y: "72%" },
621
+ { ci: 4, region: 2, quad: "br", w: 84, h: 13, x: "67%", y: "100%" },
622
+ { ci: 1, region: 3, quad: "bl", w: 60, h: 21, x: "24%", y: "101%" },
623
+ { ci: 2, region: 1, quad: "bl", w: 17, h: 40, x: "0%", y: "60%" },
624
+ { ci: 3, region: 2, quad: "tl", w: 13, h: 32, x: "-1%", y: "28%" }
625
+ ], Ze = [
626
+ { ci: 0, region: 1, quad: "tl", w: 110, h: 30, x: "27%", y: "3%" },
627
+ { ci: 6, region: 2, quad: "tr", w: 100, h: 20, x: "73%", y: "1%" },
628
+ { ci: 7, region: 3, quad: "tr", w: 26, h: 62, x: "100%", y: "33%" },
629
+ { ci: 8, region: 1, quad: "br", w: 30, h: 56, x: "101%", y: "72%" },
630
+ { ci: 4, region: 2, quad: "br", w: 120, h: 22, x: "67%", y: "99%" },
631
+ { ci: 1, region: 3, quad: "bl", w: 88, h: 32, x: "24%", y: "99%" },
632
+ { ci: 2, region: 1, quad: "bl", w: 28, h: 58, x: "0%", y: "60%" }
633
+ ];
634
+ function Je(t, e, a) {
635
+ const r = t.match(/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);
636
+ return `rgba(${r ? `${r[1]}, ${r[2]}, ${r[3]}` : "255, 255, 255"}, var(--bop-${e}-${a}))`;
637
+ }
638
+ function pe(t, e, a, r, o, s, i, c) {
639
+ return `radial-gradient(ellipse calc(${e}px * var(--bw${r}-${c}) * var(--pulse-glow-sx, 1)) calc(${a}px * var(--bh${r}-${c}) * var(--bgh-${c}) * var(--pulse-glow-sy, 1)) at calc(${s} + var(--bx${r}-${c})) calc(${i} + var(--by${r}-${c})), ${Je(t, o, c)}, transparent)`;
640
+ }
641
+ function ea(t, e) {
642
+ return C[t].border.map((a, r) => {
643
+ const { region: o, quad: s } = Xe[r], [i, c] = a.pos.split(" "), [b, p] = a.size.split(" ").map(parseFloat);
644
+ return pe(a.color, b, p, o, s, i, c, e);
645
+ }).join(`,
646
+ `);
647
+ }
648
+ function aa(t, e, a) {
649
+ const o = C[t].border.map((p, m) => {
650
+ const { region: n, quad: l } = Xe[m], [f, v] = p.pos.split(" "), [d, g] = Ke[m];
651
+ return pe(p.color, d, g, n, l, f, v, e);
652
+ }), s = a ? "255, 255, 255" : "0, 0, 0", i = a ? 0.18 : 0.08, b = [
653
+ ["0%", "0%", "tl"],
654
+ ["100%", "0%", "tr"],
655
+ ["0%", "100%", "bl"],
656
+ ["100%", "100%", "br"]
657
+ ].map(
658
+ ([p, m, n]) => `radial-gradient(ellipse 60px 60px at ${p} ${m}, rgba(${s}, calc(${i} * var(--bop-${n}-${e}))), transparent 70%)`
659
+ );
660
+ return [...o, ...b].join(`,
661
+ `);
662
+ }
663
+ function we(t, e, a) {
664
+ const r = C[e].border;
665
+ return t.map((o) => {
666
+ const s = r[o.ci], [i, c] = s.pos.split(" ");
667
+ return pe(s.color, o.w, o.h, o.region, o.quad, o.x ?? i, o.y ?? c, a);
668
+ }).join(`,
669
+ `);
670
+ }
671
+ function Ye(t, e, a) {
672
+ const r = C[e].border, o = +a.toFixed(3);
673
+ return t.map((s) => {
674
+ const i = r[s.ci], [c, b] = i.pos.split(" "), p = s.x ?? c, m = s.y ?? b, n = i.color.match(/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/), l = n ? `${n[1]}, ${n[2]}, ${n[3]}` : "255, 255, 255";
675
+ return `radial-gradient(ellipse calc(${s.w}px * var(--pulse-glow-sx, 1)) calc(${s.h}px * var(--pulse-glow-sy, 1)) at ${p} ${m}, rgba(${l}, ${o}), transparent)`;
676
+ }).join(`,
677
+ `);
678
+ }
679
+ function A(t) {
680
+ return `
681
+ [data-beam="${t}"][data-paused],
682
+ [data-beam="${t}"][data-paused]::after,
683
+ [data-beam="${t}"][data-paused]::before,
684
+ [data-beam="${t}"][data-paused] [data-beam-bloom] {
685
+ animation-play-state: paused !important;
686
+ }`;
687
+ }
688
+ function Oe(t) {
689
+ const e = ["bw1", "bh1", "bw2", "bh2", "bw3", "bh3", "bgh", "bop-tl", "bop-tr", "bop-bl", "bop-br"], a = ["bx1", "by1", "bx2", "by2", "bx3", "by3"], r = e.map(
690
+ (s) => `@property --${s}-${t} {
691
+ syntax: "<number>";
692
+ initial-value: 1;
693
+ inherits: true;
694
+ }`
695
+ ).join(`
696
+
697
+ `), o = a.map(
698
+ (s) => `@property --${s}-${t} {
699
+ syntax: "<length>";
700
+ initial-value: 0px;
701
+ inherits: true;
702
+ }`
703
+ ).join(`
704
+
705
+ `);
706
+ return `${r}
707
+
708
+ ${o}
709
+
710
+ @property --beam-opacity-${t} {
711
+ syntax: "<number>";
712
+ initial-value: 0;
713
+ inherits: true;
714
+ }
715
+
716
+ @property --beam-hue-${t} {
717
+ syntax: "<angle>";
718
+ initial-value: 0deg;
719
+ inherits: true;
720
+ }`;
721
+ }
722
+ function be(t, e, a) {
723
+ const r = e === "dark", o = a / 2.3;
724
+ return t === "pulse-inner" ? {
725
+ sp: 0.28,
726
+ dr: r ? 33 : 40,
727
+ op: r ? 0.48 : 0.45,
728
+ gh: r ? 0.34 : 0.22,
729
+ bs: (r ? 1.9 : 2.6) * o,
730
+ ss: (r ? 2.6 : 4.6) * o,
731
+ ghs: (r ? 2.4 : 5.5) * o,
732
+ // Full hue revolution period (seconds) — colors continuously cycle.
733
+ huePeriod: 16
734
+ } : {
735
+ sp: r ? 0.28 : 0.36,
736
+ dr: r ? 14 : 19,
737
+ op: r ? 0.46 : 0,
738
+ gh: r ? 0.16 : 0.58,
739
+ bs: (r ? 2.3 : 3.7) * o,
740
+ ss: (r ? 6.4 : 4.6) * o,
741
+ ghs: (r ? 2.4 : 3.8) * o,
742
+ // Full hue revolution period (seconds) — colors continuously cycle.
743
+ huePeriod: 14
744
+ };
745
+ }
746
+ function ra(t, e) {
747
+ const { sp: a, dr: r, op: o, gh: s, bs: i, ss: c, ghs: b } = e;
748
+ return [
749
+ { prop: `--bw1-${t}`, a: 1 - a, b: 1 + a * 1.1, period: c * 0.9, delay: 0, unit: "" },
750
+ { prop: `--bh1-${t}`, a: 1 + a * 0.9, b: 1 - a * 0.85, period: c * 1.26, delay: 0, unit: "" },
751
+ { prop: `--bx1-${t}`, a: -r, b: r * 0.9, period: i * 1.6, delay: 0, unit: "px" },
752
+ { prop: `--by1-${t}`, a: r * 0.55, b: -r * 0.7, period: i * 1.6, delay: 0, unit: "px" },
753
+ { prop: `--bw2-${t}`, a: 1 + a, b: 1 - a * 0.85, period: c * 1.1, delay: 0, unit: "" },
754
+ { prop: `--bh2-${t}`, a: 1 - a * 0.8, b: 1 + a * 1.05, period: c * 0.81, delay: 0, unit: "" },
755
+ { prop: `--bx2-${t}`, a: r * 0.8, b: -r * 0.9, period: i * 1.88, delay: 0, unit: "px" },
756
+ { prop: `--by2-${t}`, a: -r, b: r * 0.65, period: i * 1.88, delay: 0, unit: "px" },
757
+ { prop: `--bw3-${t}`, a: 1 - a * 0.6, b: 1 + a * 1.15, period: c * 0.98, delay: 0, unit: "" },
758
+ { prop: `--bh3-${t}`, a: 1 + a * 0.75, b: 1 - a, period: c * 1.4, delay: 0, unit: "" },
759
+ { prop: `--bx3-${t}`, a: -r * 0.6, b: r, period: i * 1.45, delay: 0, unit: "px" },
760
+ { prop: `--by3-${t}`, a: -r * 0.85, b: r * 0.45, period: i * 1.45, delay: 0, unit: "px" },
761
+ { prop: `--bgh-${t}`, a: 1 - s, b: 1 + s, period: b, delay: 0, unit: "" },
762
+ { prop: `--bop-tl-${t}`, a: 1 - o, b: 1, period: i, delay: 0, unit: "" },
763
+ { prop: `--bop-tr-${t}`, a: 1 - o, b: 1, period: i * 1.32, delay: i * 0.28, unit: "" },
764
+ { prop: `--bop-bl-${t}`, a: 1 - o, b: 1, period: i * 0.84, delay: i * 0.55, unit: "" },
765
+ { prop: `--bop-br-${t}`, a: 1 - o, b: 1, period: i * 1.58, delay: i * 0.83, unit: "" }
766
+ ];
767
+ }
768
+ function ta(t, e, a, r, o, s) {
769
+ if (t !== "pulse-inner" && t !== "pulse-outside") return null;
770
+ const i = be(t, e, a);
771
+ return {
772
+ oscillators: ra(s, i),
773
+ // Pulse colors continuously rotate a full hue circle so the palette is never
774
+ // pinned to fixed edges (no more "always red top-right / green left").
775
+ hue: o ? null : { prop: `--beam-hue-${s}`, range: 360, period: i.huePeriod, continuous: !0 }
776
+ };
777
+ }
778
+ function K(t, e, a) {
779
+ return ` animation: ${e}-${t} ${a}s ease forwards;`;
780
+ }
781
+ function oa(t) {
782
+ const { size: e } = t;
783
+ return e === "line" ? pa(t) : e === "sm" ? sa(t) : e === "pulse-inner" ? na(t) : e === "pulse-outside" ? ca(t) : ia(t);
784
+ }
785
+ function sa(t) {
554
786
  const {
555
787
  id: e,
556
788
  borderRadius: a,
557
- borderWidth: t,
789
+ borderWidth: r,
558
790
  duration: o,
559
- strokeOpacity: p,
560
- innerOpacity: m,
561
- bloomOpacity: s,
562
- innerShadow: $,
563
- colorVariant: c,
564
- staticColors: f,
565
- brightness: i,
566
- saturation: n,
567
- hueRange: l,
568
- theme: Y
569
- } = r, g = Math.max(0, a - t), b = c === "mono" ? 0.5 : 1, z = p * b, H = m * b, d = s * b, k = f ? "" : `animation: beam-hue-shift-${e} 12s ease-in-out infinite;`, v = f ? "" : `
791
+ strokeOpacity: s,
792
+ innerOpacity: i,
793
+ bloomOpacity: c,
794
+ innerShadow: b,
795
+ colorVariant: p,
796
+ staticColors: m,
797
+ brightness: n,
798
+ saturation: l,
799
+ hueRange: f,
800
+ theme: v
801
+ } = t, d = Math.max(0, a - r), g = p === "mono" ? 0.5 : 1, W = s * g, Y = i * g, y = c * g, H = m ? "" : `animation: beam-hue-shift-${e} 12s ease-in-out infinite;`, x = m ? "" : `
570
802
  @keyframes beam-hue-shift-${e} {
571
- 0% { filter: hue-rotate(-${l}deg) brightness(${i.toFixed(2)}) saturate(${n.toFixed(2)}); }
572
- 50% { filter: hue-rotate(${l}deg) brightness(${i.toFixed(2)}) saturate(${n.toFixed(2)}); }
573
- 100% { filter: hue-rotate(-${l}deg) brightness(${i.toFixed(2)}) saturate(${n.toFixed(2)}); }
574
- }`, y = Y === "dark", W = y ? `conic-gradient(
803
+ 0% { filter: hue-rotate(-${f}deg) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
804
+ 50% { filter: hue-rotate(${f}deg) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
805
+ 100% { filter: hue-rotate(-${f}deg) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
806
+ }`, w = v === "dark", k = w ? `conic-gradient(
575
807
  from var(--beam-angle-${e}),
576
808
  transparent 0%, transparent 54%,
577
809
  rgba(255, 255, 255, 0.1) 57%,
@@ -593,7 +825,7 @@ function ve(r) {
593
825
  rgba(0, 0, 0, 0.2) 72%,
594
826
  rgba(0, 0, 0, 0.08) 75%,
595
827
  transparent 78%, transparent 100%
596
- )`, h = pe(c), X = le(c), x = y ? `conic-gradient(
828
+ )`, h = Pe(p), X = Be(p), u = w ? `conic-gradient(
597
829
  from var(--beam-angle-${e}),
598
830
  transparent 0%, transparent 58%,
599
831
  rgba(255, 255, 255, 0.03) 62%,
@@ -621,7 +853,7 @@ function ve(r) {
621
853
  rgba(0, 0, 0, 0.08) 75%,
622
854
  rgba(0, 0, 0, 0.02) 78%,
623
855
  transparent 82%
624
- )`, F = `conic-gradient(
856
+ )`, $ = `conic-gradient(
625
857
  from var(--beam-angle-${e}),
626
858
  transparent 0%, transparent 22%,
627
859
  rgba(255, 255, 255, 0.12) 28%, rgba(255, 255, 255, 0.4) 36%,
@@ -665,10 +897,10 @@ function ve(r) {
665
897
  content: "";
666
898
  position: absolute;
667
899
  inset: 0;
668
- border-radius: ${g}px;
669
- padding: ${t}px;
900
+ border-radius: ${d}px;
901
+ padding: ${r}px;
670
902
  clip-path: inset(0 round ${a}px);
671
- background: ${W},${h};
903
+ background: ${k},${h};
672
904
  -webkit-mask:
673
905
  conic-gradient(
674
906
  from var(--beam-angle-${e}),
@@ -695,8 +927,8 @@ function ve(r) {
695
927
  mask-composite: intersect, exclude;
696
928
  pointer-events: none;
697
929
  z-index: 2;
698
- opacity: calc(var(--beam-opacity-${e}) * ${z.toFixed(2)} * var(--beam-strength, 1));
699
- ${k}
930
+ opacity: calc(var(--beam-opacity-${e}) * ${W.toFixed(2)} * var(--beam-strength, 1));
931
+ ${H}
700
932
  }
701
933
 
702
934
  [data-beam="${e}"][data-active]::before,
@@ -707,30 +939,30 @@ function ve(r) {
707
939
  border-radius: ${a}px;
708
940
  clip-path: inset(0 round ${a}px);
709
941
  background: ${X};
710
- box-shadow: inset 0 0 5px 1px ${$};
711
- -webkit-mask-image: ${F};
942
+ box-shadow: inset 0 0 5px 1px ${b};
943
+ -webkit-mask-image: ${$};
712
944
  -webkit-mask-composite: source-over;
713
- mask-image: ${F};
945
+ mask-image: ${$};
714
946
  mask-composite: add;
715
947
  pointer-events: none;
716
948
  z-index: 1;
717
- opacity: calc(var(--beam-opacity-${e}) * ${H.toFixed(2)} * var(--beam-strength, 1));
718
- ${k}
949
+ opacity: calc(var(--beam-opacity-${e}) * ${Y.toFixed(2)} * var(--beam-strength, 1));
950
+ ${H}
719
951
  }
720
952
 
721
953
  [data-beam="${e}"] [data-beam-bloom] {
722
954
  display: none;
723
955
  position: absolute;
724
956
  inset: 0;
725
- border-radius: ${g}px;
957
+ border-radius: ${d}px;
726
958
  clip-path: inset(0 round ${a}px);
727
- background: ${x};
959
+ background: ${u};
728
960
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
729
961
  -webkit-mask-composite: xor;
730
962
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
731
963
  mask-composite: exclude;
732
- padding: ${t}px;
733
- filter: blur(8px) brightness(${i.toFixed(2)}) saturate(${n.toFixed(2)});
964
+ padding: ${r}px;
965
+ filter: blur(8px) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)});
734
966
  pointer-events: none;
735
967
  z-index: 3;
736
968
  opacity: 0;
@@ -739,7 +971,7 @@ function ve(r) {
739
971
  [data-beam="${e}"][data-active] [data-beam-bloom],
740
972
  [data-beam="${e}"][data-fading] [data-beam-bloom] {
741
973
  display: block;
742
- opacity: calc(var(--beam-opacity-${e}) * ${d.toFixed(2)} * var(--beam-strength, 1));
974
+ opacity: calc(var(--beam-opacity-${e}) * ${y.toFixed(2)} * var(--beam-strength, 1));
743
975
  }
744
976
 
745
977
  @keyframes beam-spin-${e} {
@@ -754,31 +986,32 @@ function ve(r) {
754
986
  from { --beam-opacity-${e}: 1; }
755
987
  to { --beam-opacity-${e}: 0; }
756
988
  }
757
- ${v}
989
+ ${x}
990
+ ${A(e)}
758
991
  `;
759
992
  }
760
- function ye(r) {
993
+ function ia(t) {
761
994
  const {
762
995
  id: e,
763
996
  borderRadius: a,
764
- borderWidth: t,
997
+ borderWidth: r,
765
998
  duration: o,
766
- strokeOpacity: p,
767
- innerOpacity: m,
768
- bloomOpacity: s,
769
- innerShadow: $,
770
- colorVariant: c,
771
- staticColors: f,
772
- brightness: i,
773
- saturation: n,
774
- hueRange: l,
775
- theme: Y
776
- } = r, g = Math.max(0, a - t), b = c === "mono" ? 0.5 : 1, z = p * b, H = m * b, d = s * b, k = f ? "" : `animation: beam-hue-shift-${e} 12s ease-in-out infinite;`, v = f ? "" : `
999
+ strokeOpacity: s,
1000
+ innerOpacity: i,
1001
+ bloomOpacity: c,
1002
+ innerShadow: b,
1003
+ colorVariant: p,
1004
+ staticColors: m,
1005
+ brightness: n,
1006
+ saturation: l,
1007
+ hueRange: f,
1008
+ theme: v
1009
+ } = t, d = Math.max(0, a - r), g = p === "mono" ? 0.5 : 1, W = s * g, Y = i * g, y = c * g, H = m ? "" : `animation: beam-hue-shift-${e} 12s ease-in-out infinite;`, x = m ? "" : `
777
1010
  @keyframes beam-hue-shift-${e} {
778
- 0% { filter: hue-rotate(-${l}deg) brightness(${i.toFixed(2)}) saturate(${n.toFixed(2)}); }
779
- 50% { filter: hue-rotate(${l}deg) brightness(${i.toFixed(2)}) saturate(${n.toFixed(2)}); }
780
- 100% { filter: hue-rotate(-${l}deg) brightness(${i.toFixed(2)}) saturate(${n.toFixed(2)}); }
781
- }`, y = Y === "dark", W = y ? `conic-gradient(
1011
+ 0% { filter: hue-rotate(-${f}deg) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
1012
+ 50% { filter: hue-rotate(${f}deg) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
1013
+ 100% { filter: hue-rotate(-${f}deg) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
1014
+ }`, w = v === "dark", k = w ? `conic-gradient(
782
1015
  from var(--beam-angle-${e}),
783
1016
  transparent 0%, transparent 54%,
784
1017
  rgba(255, 255, 255, 0.1) 57%,
@@ -800,7 +1033,7 @@ function ye(r) {
800
1033
  rgba(0, 0, 0, 0.2) 72%,
801
1034
  rgba(0, 0, 0, 0.08) 75%,
802
1035
  transparent 78%, transparent 100%
803
- )`, h = be(c), X = fe(c), x = y ? `conic-gradient(
1036
+ )`, h = Ee(p), X = Ae(p), u = w ? `conic-gradient(
804
1037
  from var(--beam-angle-${e}),
805
1038
  transparent 0%, transparent 58%,
806
1039
  rgba(255, 255, 255, 0.03) 62%,
@@ -865,10 +1098,10 @@ function ye(r) {
865
1098
  content: "";
866
1099
  position: absolute;
867
1100
  inset: 0;
868
- border-radius: ${g}px;
869
- padding: ${t}px;
1101
+ border-radius: ${d}px;
1102
+ padding: ${r}px;
870
1103
  clip-path: inset(0 round ${a}px);
871
- background: ${W},${h};
1104
+ background: ${k},${h};
872
1105
  -webkit-mask:
873
1106
  conic-gradient(
874
1107
  from var(--beam-angle-${e}),
@@ -895,8 +1128,8 @@ function ye(r) {
895
1128
  mask-composite: intersect, exclude;
896
1129
  pointer-events: none;
897
1130
  z-index: 2;
898
- opacity: calc(var(--beam-opacity-${e}) * ${z.toFixed(2)} * var(--beam-strength, 1));
899
- ${k}
1131
+ opacity: calc(var(--beam-opacity-${e}) * ${W.toFixed(2)} * var(--beam-strength, 1));
1132
+ ${H}
900
1133
  }
901
1134
 
902
1135
  [data-beam="${e}"][data-active]::before,
@@ -906,7 +1139,7 @@ function ye(r) {
906
1139
  inset: 0;
907
1140
  border-radius: ${a}px;
908
1141
  background: ${X};
909
- box-shadow: inset 0 0 9px 1px ${$};
1142
+ box-shadow: inset 0 0 9px 1px ${b};
910
1143
  -webkit-mask-image:
911
1144
  conic-gradient(
912
1145
  from var(--beam-angle-${e}),
@@ -933,24 +1166,24 @@ function ye(r) {
933
1166
  mask-composite: intersect, add;
934
1167
  pointer-events: none;
935
1168
  z-index: 1;
936
- opacity: calc(var(--beam-opacity-${e}) * ${H.toFixed(2)} * var(--beam-strength, 1));
1169
+ opacity: calc(var(--beam-opacity-${e}) * ${Y.toFixed(2)} * var(--beam-strength, 1));
937
1170
  clip-path: inset(0 round ${a}px);
938
- ${k}
1171
+ ${H}
939
1172
  }
940
1173
 
941
1174
  [data-beam="${e}"] [data-beam-bloom] {
942
1175
  display: none;
943
1176
  position: absolute;
944
1177
  inset: 0;
945
- border-radius: ${g}px;
1178
+ border-radius: ${d}px;
946
1179
  clip-path: inset(0 round ${a}px);
947
- background: ${x};
1180
+ background: ${u};
948
1181
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
949
1182
  -webkit-mask-composite: xor;
950
1183
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
951
1184
  mask-composite: exclude;
952
- padding: ${t}px;
953
- filter: blur(8px) brightness(${i.toFixed(2)}) saturate(${n.toFixed(2)});
1185
+ padding: ${r}px;
1186
+ filter: blur(8px) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)});
954
1187
  pointer-events: none;
955
1188
  z-index: 3;
956
1189
  opacity: 0;
@@ -959,7 +1192,7 @@ function ye(r) {
959
1192
  [data-beam="${e}"][data-active] [data-beam-bloom],
960
1193
  [data-beam="${e}"][data-fading] [data-beam-bloom] {
961
1194
  display: block;
962
- opacity: calc(var(--beam-opacity-${e}) * ${d.toFixed(2)} * var(--beam-strength, 1));
1195
+ opacity: calc(var(--beam-opacity-${e}) * ${y.toFixed(2)} * var(--beam-strength, 1));
963
1196
  }
964
1197
 
965
1198
  @keyframes beam-spin-${e} {
@@ -974,37 +1207,284 @@ function ye(r) {
974
1207
  from { --beam-opacity-${e}: 1; }
975
1208
  to { --beam-opacity-${e}: 0; }
976
1209
  }
977
- ${v}
1210
+ ${x}
1211
+ ${A(e)}
978
1212
  `;
979
1213
  }
980
- function we(r) {
1214
+ function na(t) {
981
1215
  const {
982
1216
  id: e,
983
1217
  borderRadius: a,
984
- borderWidth: t,
1218
+ borderWidth: r,
985
1219
  duration: o,
986
- strokeOpacity: p,
987
- innerOpacity: m,
988
- bloomOpacity: s,
989
- innerShadow: $,
990
- colorVariant: c,
991
- staticColors: f,
992
- brightness: i,
1220
+ strokeOpacity: s,
1221
+ innerOpacity: i,
1222
+ bloomOpacity: c,
1223
+ colorVariant: b,
1224
+ staticColors: p,
1225
+ brightness: m,
993
1226
  saturation: n,
994
1227
  hueRange: l,
995
- theme: Y
996
- } = r, g = Math.max(0, a - t), b = Y === "dark", z = p, H = m, d = s, k = f ? "" : `animation: beam-hue-shift-${e} 12s ease-in-out infinite;`, v = f ? "" : `animation: beam-hue-shift-bloom-${e} 8s ease-in-out infinite;`, y = f ? "" : `
1228
+ theme: f
1229
+ } = t, v = f === "dark", d = b === "mono" ? 0.5 : 1, g = (s * d).toFixed(2), W = (i * d).toFixed(2), Y = (c * d).toFixed(2), { op: y } = be("pulse-inner", f, o), H = 8, x = m.toFixed(2), w = n.toFixed(2), k = p ? `filter: brightness(${x}) saturate(${w});` : `filter: hue-rotate(var(--beam-hue-${e})) brightness(${x}) saturate(${w});`, h = p ? `filter: blur(${H}px) brightness(${x}) saturate(${w});` : `filter: blur(${H}px) hue-rotate(var(--beam-hue-${e})) brightness(${x}) saturate(${w});`, X = ea(b, e), u = aa(b, e, v), $ = Ye(Qe, b, 1 - y * 0.5);
1230
+ return `
1231
+ ${Oe(e)}
1232
+
1233
+ [data-beam="${e}"] {
1234
+ position: relative;
1235
+ border-radius: ${a}px;
1236
+ overflow: hidden;
1237
+ isolation: isolate;
1238
+ }
1239
+
1240
+ [data-beam="${e}"][data-active] {
1241
+ ${K(e, "beam-fade-in", 0.6)}
1242
+ }
1243
+
1244
+ [data-beam="${e}"][data-fading] {
1245
+ ${K(e, "beam-fade-out", 0.5)}
1246
+ }
1247
+
1248
+ [data-beam="${e}"][data-active]::after,
1249
+ [data-beam="${e}"][data-fading]::after {
1250
+ content: "";
1251
+ position: absolute;
1252
+ inset: 0;
1253
+ border-radius: ${a}px;
1254
+ padding: ${r}px;
1255
+ clip-path: inset(0 round ${a}px);
1256
+ background: ${X};
1257
+ -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
1258
+ -webkit-mask-composite: xor;
1259
+ mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
1260
+ mask-composite: exclude;
1261
+ pointer-events: none;
1262
+ z-index: 2;
1263
+ will-change: opacity, filter;
1264
+ opacity: calc(var(--beam-opacity-${e}) * ${g} * var(--beam-strength, 1));
1265
+ ${k}
1266
+ }
1267
+
1268
+ [data-beam="${e}"][data-active]::before,
1269
+ [data-beam="${e}"][data-fading]::before {
1270
+ content: "";
1271
+ position: absolute;
1272
+ inset: 0;
1273
+ border-radius: ${a}px;
1274
+ clip-path: inset(0 round ${a}px);
1275
+ background: ${u};
1276
+ -webkit-mask-image:
1277
+ linear-gradient(white, transparent 28px, transparent calc(100% - 28px), white),
1278
+ linear-gradient(to right, white, transparent 28px, transparent calc(100% - 28px), white);
1279
+ -webkit-mask-composite: source-over;
1280
+ mask-image:
1281
+ linear-gradient(white, transparent 28px, transparent calc(100% - 28px), white),
1282
+ linear-gradient(to right, white, transparent 28px, transparent calc(100% - 28px), white);
1283
+ mask-composite: add;
1284
+ pointer-events: none;
1285
+ z-index: 1;
1286
+ will-change: opacity, filter;
1287
+ opacity: calc(var(--beam-opacity-${e}) * ${W} * var(--beam-strength, 1));
1288
+ ${k}
1289
+ }
1290
+
1291
+ [data-beam="${e}"] [data-beam-bloom] {
1292
+ display: none;
1293
+ position: absolute;
1294
+ inset: 0;
1295
+ border-radius: ${a}px;
1296
+ clip-path: inset(0 round ${a}px);
1297
+ background: ${$};
1298
+ -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
1299
+ -webkit-mask-composite: xor;
1300
+ mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
1301
+ mask-composite: exclude;
1302
+ padding: ${r}px;
1303
+ pointer-events: none;
1304
+ z-index: 3;
1305
+ will-change: opacity;
1306
+ opacity: 0;
1307
+ }
1308
+
1309
+ [data-beam="${e}"][data-active] [data-beam-bloom],
1310
+ [data-beam="${e}"][data-fading] [data-beam-bloom] {
1311
+ display: block;
1312
+ opacity: calc(var(--beam-opacity-${e}) * ${Y} * var(--beam-strength, 1));
1313
+ ${h}
1314
+ }
1315
+
1316
+ @keyframes beam-fade-in-${e} { to { --beam-opacity-${e}: 1; } }
1317
+ @keyframes beam-fade-out-${e} { from { --beam-opacity-${e}: 1; } to { --beam-opacity-${e}: 0; } }
1318
+ ${A(e)}
1319
+
1320
+ @media (prefers-reduced-motion: reduce) {
1321
+ [data-beam="${e}"][data-active],
1322
+ [data-beam="${e}"][data-fading],
1323
+ [data-beam="${e}"][data-active]::after,
1324
+ [data-beam="${e}"][data-fading]::after,
1325
+ [data-beam="${e}"][data-active]::before,
1326
+ [data-beam="${e}"][data-fading]::before,
1327
+ [data-beam="${e}"][data-active] [data-beam-bloom],
1328
+ [data-beam="${e}"][data-fading] [data-beam-bloom] {
1329
+ animation: none !important;
1330
+ }
1331
+ }
1332
+ `;
1333
+ }
1334
+ function ca(t) {
1335
+ const {
1336
+ id: e,
1337
+ borderRadius: a,
1338
+ duration: r,
1339
+ strokeOpacity: o,
1340
+ innerOpacity: s,
1341
+ bloomOpacity: i,
1342
+ colorVariant: c,
1343
+ staticColors: b,
1344
+ brightness: p,
1345
+ saturation: m,
1346
+ hueRange: n,
1347
+ theme: l,
1348
+ hairlineOpacity: f = 0
1349
+ } = t, v = l === "dark", d = c === "mono" ? 0.5 : 1, g = (o * d).toFixed(2), W = (s * d).toFixed(2), Y = (i * d).toFixed(2), y = v ? "70, 70, 70" : "0, 0, 0", H = f.toFixed(2), x = `linear-gradient(rgba(${y}, ${H}), rgba(${y}, ${H}))`, { op: w } = be("pulse-outside", l, r), k = 0.95, h = 0.9, X = v ? 3 : 6, u = v ? 22.5 : 15, $ = p.toFixed(2), F = m.toFixed(2), Z = b ? `filter: brightness(${$}) saturate(${F});` : `filter: hue-rotate(var(--beam-hue-${e})) brightness(${$}) saturate(${F});`, J = b ? `filter: blur(${X}px) brightness(${$}) saturate(${F});` : `filter: blur(${X}px) hue-rotate(var(--beam-hue-${e})) brightness(${$}) saturate(${F});`, ee = b ? `filter: blur(${u}px) brightness(${$}) saturate(${F});` : `filter: blur(${u}px) hue-rotate(var(--beam-hue-${e})) brightness(${$}) saturate(${F});`, E = we(ve, c, e), _ = we(ve, c, e), ae = Ye(Ze, c, 1 - w * 0.5), R = f > 0 ? `${E},
1350
+ ${x}` : E;
1351
+ return `
1352
+ ${Oe(e)}
1353
+
1354
+ [data-beam="${e}"] {
1355
+ position: relative;
1356
+ border-radius: ${a}px;
1357
+ overflow: visible;
1358
+ isolation: isolate;
1359
+ }
1360
+
1361
+ [data-beam="${e}"][data-active] {
1362
+ ${K(e, "beam-fade-in", 0.6)}
1363
+ }
1364
+
1365
+ [data-beam="${e}"][data-fading] {
1366
+ ${K(e, "beam-fade-out", 0.5)}
1367
+ }
1368
+ ${f > 0 ? `
1369
+ /* Idle hairline — painted above the (opaque) child in the inner 1px edge ring so
1370
+ it overlaps a standard inset component border exactly. */
1371
+ [data-beam="${e}"]::after {
1372
+ content: "";
1373
+ position: absolute;
1374
+ inset: 0;
1375
+ border-radius: ${a}px;
1376
+ padding: 1px;
1377
+ clip-path: inset(0 round ${a}px);
1378
+ background: ${x};
1379
+ -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
1380
+ -webkit-mask-composite: xor;
1381
+ mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
1382
+ mask-composite: exclude;
1383
+ pointer-events: none;
1384
+ z-index: 2;
1385
+ }
1386
+ ` : ""}
1387
+ [data-beam="${e}"][data-active]::after,
1388
+ [data-beam="${e}"][data-fading]::after {
1389
+ content: "";
1390
+ position: absolute;
1391
+ inset: 0;
1392
+ border-radius: ${a}px;
1393
+ padding: 1px;
1394
+ clip-path: inset(0 round ${a}px);
1395
+ background: ${R};
1396
+ -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
1397
+ -webkit-mask-composite: xor;
1398
+ mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
1399
+ mask-composite: exclude;
1400
+ pointer-events: none;
1401
+ z-index: 2;
1402
+ will-change: opacity, filter;
1403
+ opacity: calc(var(--beam-opacity-${e}) * ${g} * var(--beam-strength, 1));
1404
+ ${Z}
1405
+ }
1406
+
1407
+ [data-beam="${e}"][data-active]::before,
1408
+ [data-beam="${e}"][data-fading]::before {
1409
+ content: "";
1410
+ position: absolute;
1411
+ inset: -10px;
1412
+ z-index: -1;
1413
+ border-radius: ${a + 10}px;
1414
+ background: ${_};
1415
+ transform: scale(${k}, ${h});
1416
+ pointer-events: none;
1417
+ will-change: opacity, filter;
1418
+ opacity: calc(var(--beam-opacity-${e}) * ${W} * var(--beam-strength, 1));
1419
+ ${J}
1420
+ }
1421
+
1422
+ [data-beam="${e}"] [data-beam-bloom] {
1423
+ display: none;
1424
+ position: absolute;
1425
+ inset: -30px;
1426
+ z-index: -1;
1427
+ border-radius: ${a + 30}px;
1428
+ background: ${ae};
1429
+ transform: scale(${k}, ${h});
1430
+ pointer-events: none;
1431
+ will-change: transform;
1432
+ opacity: 0;
1433
+ }
1434
+
1435
+ [data-beam="${e}"][data-active] [data-beam-bloom],
1436
+ [data-beam="${e}"][data-fading] [data-beam-bloom] {
1437
+ display: block;
1438
+ opacity: calc(var(--beam-opacity-${e}) * ${Y} * var(--beam-strength, 1));
1439
+ ${ee}
1440
+ }
1441
+
1442
+ @keyframes beam-fade-in-${e} { to { --beam-opacity-${e}: 1; } }
1443
+ @keyframes beam-fade-out-${e} { from { --beam-opacity-${e}: 1; } to { --beam-opacity-${e}: 0; } }
1444
+ ${A(e)}
1445
+
1446
+ @media (prefers-reduced-motion: reduce) {
1447
+ [data-beam="${e}"][data-active],
1448
+ [data-beam="${e}"][data-fading],
1449
+ [data-beam="${e}"][data-active]::after,
1450
+ [data-beam="${e}"][data-fading]::after,
1451
+ [data-beam="${e}"][data-active]::before,
1452
+ [data-beam="${e}"][data-fading]::before,
1453
+ [data-beam="${e}"][data-active] [data-beam-bloom],
1454
+ [data-beam="${e}"][data-fading] [data-beam-bloom] {
1455
+ animation: none !important;
1456
+ }
1457
+ }
1458
+ `;
1459
+ }
1460
+ function pa(t) {
1461
+ const {
1462
+ id: e,
1463
+ borderRadius: a,
1464
+ borderWidth: r,
1465
+ duration: o,
1466
+ strokeOpacity: s,
1467
+ innerOpacity: i,
1468
+ bloomOpacity: c,
1469
+ innerShadow: b,
1470
+ colorVariant: p,
1471
+ staticColors: m,
1472
+ brightness: n,
1473
+ saturation: l,
1474
+ hueRange: f,
1475
+ theme: v
1476
+ } = t, d = Math.max(0, a - r), g = v === "dark", W = s, Y = i, y = c, H = m ? "" : `animation: beam-hue-shift-${e} 12s ease-in-out infinite;`, x = m ? "" : `animation: beam-hue-shift-bloom-${e} 8s ease-in-out infinite;`, w = m ? "" : `
997
1477
  @keyframes beam-hue-shift-${e} {
998
- 0% { filter: hue-rotate(-${l}deg) brightness(${i.toFixed(2)}) saturate(${n.toFixed(2)}); }
999
- 50% { filter: hue-rotate(${l}deg) brightness(${i.toFixed(2)}) saturate(${n.toFixed(2)}); }
1000
- 100% { filter: hue-rotate(-${l}deg) brightness(${i.toFixed(2)}) saturate(${n.toFixed(2)}); }
1478
+ 0% { filter: hue-rotate(-${f}deg) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
1479
+ 50% { filter: hue-rotate(${f}deg) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
1480
+ 100% { filter: hue-rotate(-${f}deg) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
1001
1481
  }
1002
1482
 
1003
1483
  @keyframes beam-hue-shift-bloom-${e} {
1004
- 0% { filter: blur(8px) hue-rotate(-${l + 10}deg) brightness(${i.toFixed(2)}) saturate(${n.toFixed(2)}); }
1005
- 50% { filter: blur(8px) hue-rotate(${l + 10}deg) brightness(${i.toFixed(2)}) saturate(${n.toFixed(2)}); }
1006
- 100% { filter: blur(8px) hue-rotate(-${l + 10}deg) brightness(${i.toFixed(2)}) saturate(${n.toFixed(2)}); }
1007
- }`, W = b ? `radial-gradient(
1484
+ 0% { filter: blur(8px) hue-rotate(-${f + 10}deg) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
1485
+ 50% { filter: blur(8px) hue-rotate(${f + 10}deg) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
1486
+ 100% { filter: blur(8px) hue-rotate(-${f + 10}deg) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
1487
+ }`, k = g ? `radial-gradient(
1008
1488
  ellipse calc(24px * var(--beam-w-${e})) calc(28px * var(--beam-h-${e})) at calc(var(--beam-x-${e}) * 100%) calc(100% + 2px),
1009
1489
  rgba(255, 255, 255, 0.38) 0%,
1010
1490
  rgba(255, 255, 255, 0.12) 30%,
@@ -1014,7 +1494,7 @@ function we(r) {
1014
1494
  rgba(0, 0, 0, 0.6) 0%,
1015
1495
  rgba(0, 0, 0, 0.25) 35%,
1016
1496
  transparent 70%
1017
- )`, h = de(c, b, e), X = $e(c, e), x = he(c, b, e);
1497
+ )`, h = Te(p, g, e), X = Ve(p, e), u = Ue(p, g, e), $ = p === "mono" ? "filter: blur(6px);" : "";
1018
1498
  return `
1019
1499
  @property --beam-x-${e} {
1020
1500
  syntax: "<number>";
@@ -1089,10 +1569,10 @@ function we(r) {
1089
1569
  content: "";
1090
1570
  position: absolute;
1091
1571
  inset: 0;
1092
- border-radius: ${g}px;
1093
- padding: ${t}px;
1572
+ border-radius: ${d}px;
1573
+ padding: ${r}px;
1094
1574
  clip-path: inset(0 round ${a}px);
1095
- background: ${W}, ${h};
1575
+ background: ${k}, ${h};
1096
1576
  -webkit-mask:
1097
1577
  radial-gradient(
1098
1578
  ellipse calc(78px * var(--beam-w-${e})) calc(60px * var(--beam-h-${e})) at calc(var(--beam-x-${e}) * 100%) 100%,
@@ -1111,8 +1591,8 @@ function we(r) {
1111
1591
  mask-composite: intersect, exclude;
1112
1592
  pointer-events: none;
1113
1593
  z-index: 2;
1114
- opacity: calc(var(--beam-opacity-${e}) * var(--beam-edge-${e}) * ${z.toFixed(2)} * var(--beam-strength, 1));
1115
- ${k}
1594
+ opacity: calc(var(--beam-opacity-${e}) * var(--beam-edge-${e}) * ${W.toFixed(2)} * var(--beam-strength, 1));
1595
+ ${H}
1116
1596
  }
1117
1597
 
1118
1598
  [data-beam="${e}"][data-active]::before,
@@ -1122,7 +1602,7 @@ function we(r) {
1122
1602
  inset: 0;
1123
1603
  border-radius: ${a}px;
1124
1604
  background: ${X};
1125
- box-shadow: inset 0 0 9px 1px ${$};
1605
+ box-shadow: inset 0 0 9px 1px ${b};
1126
1606
  -webkit-mask-image:
1127
1607
  radial-gradient(
1128
1608
  ellipse calc(78px * var(--beam-w-${e})) calc(60px * var(--beam-h-${e})) at calc(var(--beam-x-${e}) * 100%) 100%,
@@ -1141,16 +1621,16 @@ function we(r) {
1141
1621
  mask-composite: intersect, add;
1142
1622
  pointer-events: none;
1143
1623
  z-index: 1;
1144
- opacity: calc(var(--beam-opacity-${e}) * var(--beam-edge-${e}) * ${H.toFixed(2)} * var(--beam-strength, 1));
1624
+ opacity: calc(var(--beam-opacity-${e}) * var(--beam-edge-${e}) * ${Y.toFixed(2)} * var(--beam-strength, 1));
1145
1625
  clip-path: inset(0 round ${a}px);
1146
- ${k}
1626
+ ${H}
1147
1627
  }
1148
1628
 
1149
1629
  [data-beam="${e}"] [data-beam-bloom] {
1150
1630
  display: none;
1151
1631
  position: absolute;
1152
1632
  inset: 0;
1153
- border-radius: ${g}px;
1633
+ border-radius: ${d}px;
1154
1634
  clip-path: inset(0 round ${a}px);
1155
1635
  padding: 0;
1156
1636
  -webkit-mask: radial-gradient(
@@ -1163,7 +1643,8 @@ function we(r) {
1163
1643
  white 0%, rgba(255, 255, 255, 0.5) 35%, transparent 100%
1164
1644
  );
1165
1645
  mask-composite: add;
1166
- background: ${x};
1646
+ background: ${u};
1647
+ ${$}
1167
1648
  pointer-events: none;
1168
1649
  z-index: 3;
1169
1650
  opacity: 0;
@@ -1172,8 +1653,8 @@ function we(r) {
1172
1653
  [data-beam="${e}"][data-active] [data-beam-bloom],
1173
1654
  [data-beam="${e}"][data-fading] [data-beam-bloom] {
1174
1655
  display: block;
1175
- opacity: calc(var(--beam-opacity-${e}) * var(--beam-edge-${e}) * ${d.toFixed(2)} * var(--beam-strength, 1));
1176
- ${v}
1656
+ opacity: calc(var(--beam-opacity-${e}) * var(--beam-edge-${e}) * ${y.toFixed(2)} * var(--beam-strength, 1));
1657
+ ${x}
1177
1658
  }
1178
1659
 
1179
1660
  @keyframes beam-travel-${e} {
@@ -1230,126 +1711,209 @@ function we(r) {
1230
1711
  from { --beam-opacity-${e}: 1; }
1231
1712
  to { --beam-opacity-${e}: 0; }
1232
1713
  }
1233
- ${y}
1714
+ ${w}
1715
+ ${A(e)}
1234
1716
  `;
1235
1717
  }
1236
- function We() {
1237
- const [r, e] = O(() => typeof window > "u" || window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
1238
- return L(() => {
1718
+ const Q = /* @__PURE__ */ new Set();
1719
+ let B = null, ce = 0;
1720
+ const ba = 1e3 / 30 - 2, la = Math.PI * 2;
1721
+ function We(t) {
1722
+ return (1 - Math.cos(la * t)) / 2;
1723
+ }
1724
+ function Fe(t) {
1725
+ if (B = requestAnimationFrame(Fe), t - ce < ba) return;
1726
+ ce = t;
1727
+ const e = t / 1e3;
1728
+ Q.forEach(({ el: a, config: r }) => {
1729
+ for (const o of r.oscillators) {
1730
+ const s = (e - o.delay) / o.period, i = o.a + (o.b - o.a) * We(s);
1731
+ a.style.setProperty(
1732
+ o.prop,
1733
+ o.unit === "px" ? `${i.toFixed(2)}px` : i.toFixed(4)
1734
+ );
1735
+ }
1736
+ if (r.hue) {
1737
+ const { prop: o, range: s, period: i, continuous: c } = r.hue, b = c ? e / i % 1 * s : -s + 2 * s * We(e / i);
1738
+ a.style.setProperty(o, `${b.toFixed(2)}deg`);
1739
+ }
1740
+ });
1741
+ }
1742
+ function fa() {
1743
+ B == null && (ce = 0, B = requestAnimationFrame(Fe));
1744
+ }
1745
+ function da() {
1746
+ Q.size === 0 && B != null && (cancelAnimationFrame(B), B = null);
1747
+ }
1748
+ function ga(t, e) {
1749
+ const a = { el: t, config: e };
1750
+ return Q.add(a), fa(), () => {
1751
+ Q.delete(a), da();
1752
+ };
1753
+ }
1754
+ function ma() {
1755
+ const [t, e] = L(() => typeof window > "u" || window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
1756
+ return P(() => {
1239
1757
  if (typeof window > "u") return;
1240
- const a = window.matchMedia("(prefers-color-scheme: dark)"), t = (o) => {
1758
+ const a = window.matchMedia("(prefers-color-scheme: dark)"), r = (o) => {
1241
1759
  e(o.matches ? "dark" : "light");
1242
1760
  };
1243
- return a.addEventListener("change", t), () => a.removeEventListener("change", t);
1244
- }, []), r;
1761
+ return a.addEventListener("change", r), () => a.removeEventListener("change", r);
1762
+ }, []), t;
1245
1763
  }
1246
- function Xe(r, e) {
1247
- return r === "auto" ? e : r;
1764
+ function $a(t, e) {
1765
+ return t === "auto" ? e : t;
1248
1766
  }
1249
- const Se = te(
1767
+ const za = Ge(
1250
1768
  function({
1251
1769
  children: e,
1252
1770
  size: a = "md",
1253
- colorVariant: t = "colorful",
1771
+ colorVariant: r = "colorful",
1254
1772
  theme: o = "dark",
1255
- staticColors: p = !1,
1256
- duration: m,
1257
- active: s = !0,
1258
- borderRadius: $,
1259
- brightness: c = 1.3,
1260
- saturation: f,
1261
- hueRange: i = 30,
1262
- strength: n = 1,
1263
- className: l,
1264
- style: Y,
1265
- onActivate: g,
1266
- onDeactivate: b,
1267
- onAnimationEnd: z,
1268
- ...H
1269
- }, d) {
1270
- const v = se().replace(/:/g, "-"), y = We(), W = ie(null), [h, X] = O(s), [x, F] = O(!1), [D, J] = O(null);
1271
- L(() => {
1272
- if ($ != null) return;
1273
- const u = W.current;
1274
- if (!u) return;
1275
- const S = () => {
1276
- const E = u.firstElementChild;
1277
- if (!E) return;
1278
- const re = getComputedStyle(E), R = parseFloat(re.borderTopLeftRadius);
1279
- !isNaN(R) && R > 0 && J(R);
1773
+ staticColors: s = !1,
1774
+ duration: i,
1775
+ active: c = !0,
1776
+ borderRadius: b,
1777
+ brightness: p,
1778
+ saturation: m,
1779
+ hueRange: n = 30,
1780
+ strength: l = 1,
1781
+ className: f,
1782
+ style: v,
1783
+ onActivate: d,
1784
+ onDeactivate: g,
1785
+ onAnimationEnd: W,
1786
+ ...Y
1787
+ }, y) {
1788
+ const x = Me().replace(/:/g, "-"), w = ma(), k = Ie(null), [h, X] = L(c), [u, $] = L(!1), [F, Z] = L(!0), [J, ee] = L(null), [E, _] = L({ x: 1, y: 1 });
1789
+ P(() => {
1790
+ if (b != null) return;
1791
+ const z = k.current;
1792
+ if (!z) return;
1793
+ const O = () => {
1794
+ const M = z.firstElementChild;
1795
+ if (!M) return;
1796
+ const se = getComputedStyle(M), I = parseFloat(se.borderTopLeftRadius);
1797
+ !isNaN(I) && I > 0 && ee(I);
1280
1798
  };
1281
- S();
1282
- const K = new MutationObserver(S);
1283
- return K.observe(u, { childList: !0, subtree: !1 }), () => K.disconnect();
1284
- }, [$, e]), L(() => {
1285
- s && !h && !x ? X(!0) : !s && h && !x && F(!0);
1286
- }, [s, h, x]);
1287
- const U = q(
1288
- (u) => {
1289
- const S = u.animationName;
1290
- S.includes("fade-out") ? (X(!1), F(!1), b == null || b()) : S.includes("fade-in") && (g == null || g()), z == null || z(u);
1799
+ O();
1800
+ const G = new MutationObserver(O);
1801
+ return G.observe(z, { childList: !0, subtree: !1 }), () => G.disconnect();
1802
+ }, [b, e]), P(() => {
1803
+ c && !h && !u ? X(!0) : !c && h && !u && $(!0);
1804
+ }, [c, h, u]), P(() => {
1805
+ const z = k.current;
1806
+ if (!z || typeof IntersectionObserver > "u") return;
1807
+ const O = new IntersectionObserver(
1808
+ (G) => {
1809
+ for (const M of G) Z(M.isIntersecting);
1810
+ },
1811
+ // Start animating slightly before the element scrolls into view.
1812
+ { rootMargin: "256px" }
1813
+ );
1814
+ return O.observe(z), () => O.disconnect();
1815
+ }, []), P(() => {
1816
+ if (a !== "pulse-outside") {
1817
+ _({ x: 1, y: 1 });
1818
+ return;
1819
+ }
1820
+ const z = k.current;
1821
+ if (!z) return;
1822
+ const O = 350, G = 140, M = 0.35, se = 4, I = (V) => Math.max(M, Math.min(se, V)), ge = () => {
1823
+ const V = z.firstElementChild;
1824
+ if (!V) return;
1825
+ const D = V.getBoundingClientRect();
1826
+ if (!D.width || !D.height) return;
1827
+ const xe = +I(D.width / O).toFixed(3), ue = +I(D.height / G).toFixed(3);
1828
+ _((ie) => ie.x === xe && ie.y === ue ? ie : { x: xe, y: ue });
1829
+ };
1830
+ if (ge(), typeof ResizeObserver > "u") return;
1831
+ const me = z.firstElementChild;
1832
+ if (!me) return;
1833
+ const $e = new ResizeObserver(ge);
1834
+ return $e.observe(me), () => $e.disconnect();
1835
+ }, [a, e]);
1836
+ const ae = ye(
1837
+ (z) => {
1838
+ const O = z.animationName;
1839
+ O.includes("fade-out") ? (X(!1), $(!1), g == null || g()) : O.includes("fade-in") && (d == null || d()), W == null || W(z);
1291
1840
  },
1292
- [g, b, z]
1293
- ), C = Xe(o, y), w = I[a][C], M = ce[a], j = $ ?? D ?? M.borderRadius, T = m ?? (a === "line" ? 2.4 : 1.96), P = f ?? w.saturation, N = a === "line" ? Math.min(i, 13) : i, _ = t === "mono" ? !0 : p, Z = ne(
1294
- () => ke({
1295
- id: v,
1296
- borderRadius: j,
1297
- borderWidth: M.borderWidth,
1298
- duration: T,
1299
- strokeOpacity: w.strokeOpacity,
1300
- innerOpacity: w.innerOpacity,
1301
- bloomOpacity: w.bloomOpacity,
1302
- innerShadow: w.innerShadow,
1841
+ [d, g, W]
1842
+ ), R = $a(o, w), S = ne[a][R], re = Le[a], te = a === "pulse-inner" || a === "pulse-outside", le = b ?? J ?? re.borderRadius, j = i ?? (a === "line" ? 3.1 : te ? 2.3 : 1.96), fe = m ?? S.saturation, de = p ?? S.brightness ?? 1.3, T = a === "line" ? Math.min(n, 13) : n, N = r === "mono" ? !0 : s, Se = ke(
1843
+ () => oa({
1844
+ id: x,
1845
+ borderRadius: le,
1846
+ borderWidth: re.borderWidth,
1847
+ duration: j,
1848
+ strokeOpacity: S.strokeOpacity,
1849
+ innerOpacity: S.innerOpacity,
1850
+ bloomOpacity: S.bloomOpacity,
1851
+ innerShadow: S.innerShadow,
1303
1852
  size: a,
1304
- colorVariant: t,
1305
- staticColors: _,
1306
- brightness: c,
1307
- saturation: P,
1308
- hueRange: N,
1309
- theme: C
1853
+ colorVariant: r,
1854
+ staticColors: N,
1855
+ brightness: de,
1856
+ saturation: fe,
1857
+ hueRange: T,
1858
+ theme: R,
1859
+ hairlineOpacity: S.hairlineOpacity
1310
1860
  }),
1311
1861
  [
1312
- v,
1862
+ x,
1863
+ le,
1864
+ re.borderWidth,
1313
1865
  j,
1314
- M.borderWidth,
1315
- T,
1316
- w.strokeOpacity,
1317
- w.innerOpacity,
1318
- w.bloomOpacity,
1319
- w.innerShadow,
1866
+ S.strokeOpacity,
1867
+ S.innerOpacity,
1868
+ S.bloomOpacity,
1869
+ S.innerShadow,
1870
+ S.hairlineOpacity,
1320
1871
  a,
1321
- t,
1322
- _,
1323
- c,
1324
- P,
1872
+ r,
1325
1873
  N,
1326
- C
1874
+ de,
1875
+ fe,
1876
+ T,
1877
+ R
1327
1878
  ]
1328
- ), ee = q(
1329
- (u) => {
1330
- W.current = u, typeof d == "function" ? d(u) : d && (d.current = u);
1879
+ ), oe = ke(
1880
+ () => te ? ta(a, R, j, T, N, x) : null,
1881
+ [te, a, R, j, T, N, x]
1882
+ );
1883
+ P(() => {
1884
+ var O;
1885
+ if (!oe || !(h || u) || !F) return;
1886
+ const z = k.current;
1887
+ if (z && !(typeof window < "u" && ((O = window.matchMedia) != null && O.call(window, "(prefers-reduced-motion: reduce)").matches)))
1888
+ return ga(z, oe);
1889
+ }, [oe, h, u, F]);
1890
+ const Re = ye(
1891
+ (z) => {
1892
+ k.current = z, typeof y == "function" ? y(z) : y && (y.current = z);
1331
1893
  },
1332
- [d]
1333
- ), ae = {
1334
- ...Y ?? {},
1335
- "--beam-strength": Math.max(0, Math.min(1, n))
1894
+ [y]
1895
+ ), qe = {
1896
+ ...v ?? {},
1897
+ "--beam-strength": Math.max(0, Math.min(1, l)),
1898
+ ...a === "pulse-outside" ? { "--pulse-glow-sx": E.x, "--pulse-glow-sy": E.y } : {}
1336
1899
  };
1337
- return /* @__PURE__ */ Q(oe, { children: [
1338
- /* @__PURE__ */ V("style", { children: Z }),
1339
- /* @__PURE__ */ Q(
1900
+ return /* @__PURE__ */ he(Ce, { children: [
1901
+ /* @__PURE__ */ ze("style", { children: Se }),
1902
+ /* @__PURE__ */ he(
1340
1903
  "div",
1341
1904
  {
1342
- ...H,
1343
- ref: ee,
1344
- "data-beam": v,
1345
- "data-active": h && !x ? "" : void 0,
1346
- "data-fading": x ? "" : void 0,
1347
- className: l,
1348
- style: ae,
1349
- onAnimationEnd: U,
1905
+ ...Y,
1906
+ ref: Re,
1907
+ "data-beam": x,
1908
+ "data-active": h && !u ? "" : void 0,
1909
+ "data-fading": u ? "" : void 0,
1910
+ "data-paused": h && !u && !F ? "" : void 0,
1911
+ className: f,
1912
+ style: qe,
1913
+ onAnimationEnd: ae,
1350
1914
  children: [
1351
1915
  e,
1352
- /* @__PURE__ */ V("div", { "data-beam-bloom": !0 })
1916
+ /* @__PURE__ */ ze("div", { "data-beam-bloom": !0 })
1353
1917
  ]
1354
1918
  }
1355
1919
  )
@@ -1357,9 +1921,9 @@ const Se = te(
1357
1921
  }
1358
1922
  );
1359
1923
  export {
1360
- Se as BorderBeam,
1361
- Se as default,
1362
- ce as sizePresets,
1363
- I as sizeThemePresets,
1364
- Fe as themeColors
1924
+ za as BorderBeam,
1925
+ za as default,
1926
+ Le as sizePresets,
1927
+ ne as sizeThemePresets,
1928
+ ha as themeColors
1365
1929
  };