border-beam 1.1.0 → 1.3.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.cjs.js +108 -108
- package/dist/index.es.js +296 -292
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
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
|
|
2
|
+
import { forwardRef as Ge, useId as Me, useRef as Ie, useState as P, useEffect as B, useCallback as ye, useMemo as ve } from "react";
|
|
3
3
|
const Le = {
|
|
4
4
|
sm: {
|
|
5
5
|
borderRadius: 32,
|
|
@@ -286,8 +286,8 @@ function Ae(t) {
|
|
|
286
286
|
const e = C[t], a = t === "mono" ? 0.225 : 0.45;
|
|
287
287
|
return e.border.map((r) => {
|
|
288
288
|
const o = r.color.replace("rgb(", "rgba(").replace(")", `, ${a})`);
|
|
289
|
-
return `radial-gradient(ellipse ${r.size.split(" ").map((
|
|
290
|
-
const c = parseInt(
|
|
289
|
+
return `radial-gradient(ellipse ${r.size.split(" ").map((i) => {
|
|
290
|
+
const c = parseInt(i);
|
|
291
291
|
return `${Math.round(c * 0.9)}px`;
|
|
292
292
|
}).join(" ")} at ${r.pos}, ${o}, transparent)`;
|
|
293
293
|
}).join(`,
|
|
@@ -397,8 +397,8 @@ const je = {
|
|
|
397
397
|
};
|
|
398
398
|
function Te(t, e, a) {
|
|
399
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`,
|
|
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%${
|
|
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)`;
|
|
402
402
|
}).join(`,
|
|
403
403
|
`);
|
|
404
404
|
}
|
|
@@ -547,7 +547,7 @@ const De = {
|
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
};
|
|
550
|
-
function
|
|
550
|
+
function K(t, e) {
|
|
551
551
|
const a = t.match(/^rgba\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*[\d.]+\s*\)$/);
|
|
552
552
|
if (a) return `rgba(${a[1]}, ${a[2]}, ${a[3]}, ${e})`;
|
|
553
553
|
const r = t.match(/^rgb\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)$/);
|
|
@@ -560,28 +560,28 @@ function q(t, e) {
|
|
|
560
560
|
return r ? `rgba(${r[1]}, ${r[2]}, ${r[3]}, ${e.toFixed(2)})` : t;
|
|
561
561
|
}
|
|
562
562
|
function Ue(t, e, a) {
|
|
563
|
-
const r = _e(t, e), o = De[t][e ? "dark" : "light"], s = t === "mono",
|
|
564
|
-
(
|
|
565
|
-
),
|
|
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, p = s ? q(r.primary, 0.09) : r.primary, b = s ? q(r.secondary, 0.12) : r.secondary, m = s ? K(r.secondary, 0.06) : K(r.secondary, 0.49), n = o.spikes.map(
|
|
564
|
+
(v) => s ? { color1: q(v.color1, i), color2: q(v.color2, i * 0.7) } : v
|
|
565
|
+
), l = s ? "12px" : "0.8px", d = s ? "14px" : "2px", k = s ? "12px" : "1.2px", f = s ? "10px" : "0.6px", g = s ? "42px" : "92px", W = s ? "38px" : "72px", Y = s ? "40px" : "85px", z = s ? "32px" : "60px", H = s ? "12px" : "1px", $ = 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)", y = s ? "rgba(255, 255, 255, 0.25)" : "rgba(255, 255, 255, 0.5)", x = 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
566
|
if (e)
|
|
567
|
-
return `radial-gradient(ellipse calc(${
|
|
568
|
-
radial-gradient(ellipse calc(10px * var(--beam-spike2-${a})) calc(35px * var(--beam-h-${a})) at 22% calc(100% - 4px), ${
|
|
569
|
-
radial-gradient(ellipse calc(${
|
|
570
|
-
radial-gradient(ellipse calc(14px * var(--beam-spike2-${a})) calc(28px * var(--beam-h-${a})) at 50% calc(100% - 2px), ${
|
|
571
|
-
radial-gradient(ellipse calc(${
|
|
572
|
-
radial-gradient(ellipse calc(7px * var(--beam-spike-${a})) calc(45px * var(--beam-h-${a})) at 78% calc(100% - 2px), ${
|
|
573
|
-
radial-gradient(ellipse calc(${
|
|
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), ${
|
|
575
|
-
radial-gradient(ellipse calc(42px * var(--beam-w-${a})) calc(40px * var(--beam-h-${a})) at calc(var(--beam-x-${a}) * 100%) 100%, ${
|
|
567
|
+
return `radial-gradient(ellipse calc(${l} * var(--beam-spike-${a})) calc(${g} * var(--beam-h-${a})) at 8% calc(100% - 2px), ${c}, ${p} 30%, transparent 88%),
|
|
568
|
+
radial-gradient(ellipse calc(10px * var(--beam-spike2-${a})) calc(35px * var(--beam-h-${a})) at 22% calc(100% - 4px), ${b}, ${m} 50%, transparent 95%),
|
|
569
|
+
radial-gradient(ellipse calc(${d} * (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(${k} * (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(${f} * (2 - var(--beam-spike-${a}))) calc(${z} * 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), ${$} 0%, ${w} 20%, ${y} 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%, ${x} 0%, ${X} 25%, ${u} 55%, transparent 80%)`;
|
|
576
576
|
{
|
|
577
|
-
const
|
|
578
|
-
return `radial-gradient(ellipse calc(${
|
|
579
|
-
radial-gradient(ellipse calc(10px * var(--beam-spike2-${a})) calc(35px * var(--beam-h-${a})) at 22% calc(100% - 4px), ${
|
|
580
|
-
radial-gradient(ellipse calc(${
|
|
581
|
-
radial-gradient(ellipse calc(14px * var(--beam-spike2-${a})) calc(28px * var(--beam-h-${a})) at 50% calc(100% - 2px), ${
|
|
582
|
-
radial-gradient(ellipse calc(${
|
|
583
|
-
radial-gradient(ellipse calc(7px * var(--beam-spike-${a})) calc(45px * var(--beam-h-${a})) at 78% calc(100% - 2px), ${
|
|
584
|
-
radial-gradient(ellipse calc(${H} * (2 - var(--beam-spike-${a}))) calc(${
|
|
577
|
+
const v = s ? q(r.primary, 0.11) : K(r.primary, 0.85), S = s ? q(r.secondary, 0.09) : K(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}, ${v} 30%, transparent 88%),
|
|
579
|
+
radial-gradient(ellipse calc(10px * var(--beam-spike2-${a})) calc(35px * var(--beam-h-${a})) at 22% calc(100% - 4px), ${b}, ${S} 50%, transparent 95%),
|
|
580
|
+
radial-gradient(ellipse calc(${d} * (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(${k} * (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(${z} * var(--beam-h-${a})) at 92% calc(100% - 3px), ${n[4].color1}, ${n[4].color2} 42%, transparent 91%),
|
|
585
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%)`;
|
|
586
586
|
}
|
|
587
587
|
}
|
|
@@ -613,7 +613,7 @@ const Xe = [
|
|
|
613
613
|
{ ci: 5, region: 3, quad: "br", w: 102, h: 31 },
|
|
614
614
|
{ ci: 6, region: 1, quad: "tr", w: 89, h: 38 },
|
|
615
615
|
{ ci: 8, region: 3, quad: "tr", w: 62, h: 58 }
|
|
616
|
-
],
|
|
616
|
+
], ke = [
|
|
617
617
|
{ ci: 0, region: 1, quad: "tl", w: 80, h: 19, x: "27%", y: "0%" },
|
|
618
618
|
{ ci: 6, region: 2, quad: "tr", w: 74, h: 11, x: "73%", y: "-1%" },
|
|
619
619
|
{ ci: 7, region: 3, quad: "tr", w: 15, h: 44, x: "100%", y: "33%" },
|
|
@@ -635,48 +635,48 @@ function Je(t, e, a) {
|
|
|
635
635
|
const r = t.match(/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);
|
|
636
636
|
return `rgba(${r ? `${r[1]}, ${r[2]}, ${r[3]}` : "255, 255, 255"}, var(--bop-${e}-${a}))`;
|
|
637
637
|
}
|
|
638
|
-
function
|
|
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(${
|
|
638
|
+
function be(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) * var(--pulse-glow-boost, 1)) calc(${a}px * var(--bh${r}-${c}) * var(--bgh-${c}) * var(--pulse-glow-sy, 1) * var(--pulse-glow-boost, 1)) at calc(${s} + var(--bx${r}-${c})) calc(${i} + var(--by${r}-${c})), ${Je(t, o, c)}, transparent)`;
|
|
640
640
|
}
|
|
641
641
|
function ea(t, e) {
|
|
642
642
|
return C[t].border.map((a, r) => {
|
|
643
|
-
const { region: o, quad: s } = Xe[r], [
|
|
644
|
-
return
|
|
643
|
+
const { region: o, quad: s } = Xe[r], [i, c] = a.pos.split(" "), [p, b] = a.size.split(" ").map(parseFloat);
|
|
644
|
+
return be(a.color, p, b, o, s, i, c, e);
|
|
645
645
|
}).join(`,
|
|
646
646
|
`);
|
|
647
647
|
}
|
|
648
648
|
function aa(t, e, a) {
|
|
649
|
-
const o = C[t].border.map((
|
|
650
|
-
const { region:
|
|
651
|
-
return
|
|
652
|
-
}), s = a ? "255, 255, 255" : "0, 0, 0",
|
|
649
|
+
const o = C[t].border.map((b, m) => {
|
|
650
|
+
const { region: n, quad: l } = Xe[m], [d, k] = b.pos.split(" "), [f, g] = Ke[m];
|
|
651
|
+
return be(b.color, f, g, n, l, d, k, e);
|
|
652
|
+
}), s = a ? "255, 255, 255" : "0, 0, 0", i = a ? 0.18 : 0.08, p = [
|
|
653
653
|
["0%", "0%", "tl"],
|
|
654
654
|
["100%", "0%", "tr"],
|
|
655
655
|
["0%", "100%", "bl"],
|
|
656
656
|
["100%", "100%", "br"]
|
|
657
657
|
].map(
|
|
658
|
-
([
|
|
658
|
+
([b, m, n]) => `radial-gradient(ellipse 60px 60px at ${b} ${m}, rgba(${s}, calc(${i} * var(--bop-${n}-${e}))), transparent 70%)`
|
|
659
659
|
);
|
|
660
|
-
return [...o, ...
|
|
660
|
+
return [...o, ...p].join(`,
|
|
661
661
|
`);
|
|
662
662
|
}
|
|
663
663
|
function we(t, e, a) {
|
|
664
664
|
const r = C[e].border;
|
|
665
665
|
return t.map((o) => {
|
|
666
|
-
const s = r[o.ci], [
|
|
667
|
-
return
|
|
666
|
+
const s = r[o.ci], [i, c] = s.pos.split(" ");
|
|
667
|
+
return be(s.color, o.w, o.h, o.region, o.quad, o.x ?? i, o.y ?? c, a);
|
|
668
668
|
}).join(`,
|
|
669
669
|
`);
|
|
670
670
|
}
|
|
671
671
|
function Ye(t, e, a) {
|
|
672
672
|
const r = C[e].border, o = +a.toFixed(3);
|
|
673
673
|
return t.map((s) => {
|
|
674
|
-
const
|
|
675
|
-
return `radial-gradient(ellipse ${s.w}px ${s.h}px at ${
|
|
674
|
+
const i = r[s.ci], [c, p] = i.pos.split(" "), b = s.x ?? c, m = s.y ?? p, 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) * var(--pulse-glow-boost, 1)) calc(${s.h}px * var(--pulse-glow-sy, 1) * var(--pulse-glow-boost, 1)) at ${b} ${m}, rgba(${l}, ${o}), transparent)`;
|
|
676
676
|
}).join(`,
|
|
677
677
|
`);
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function _(t) {
|
|
680
680
|
return `
|
|
681
681
|
[data-beam="${t}"][data-paused],
|
|
682
682
|
[data-beam="${t}"][data-paused]::after,
|
|
@@ -719,7 +719,7 @@ ${o}
|
|
|
719
719
|
inherits: true;
|
|
720
720
|
}`;
|
|
721
721
|
}
|
|
722
|
-
function
|
|
722
|
+
function pe(t, e, a) {
|
|
723
723
|
const r = e === "dark", o = a / 2.3;
|
|
724
724
|
return t === "pulse-inner" ? {
|
|
725
725
|
sp: 0.28,
|
|
@@ -729,7 +729,8 @@ function be(t, e, a) {
|
|
|
729
729
|
bs: (r ? 1.9 : 2.6) * o,
|
|
730
730
|
ss: (r ? 2.6 : 4.6) * o,
|
|
731
731
|
ghs: (r ? 2.4 : 5.5) * o,
|
|
732
|
-
|
|
732
|
+
// Full hue revolution period (seconds) — colors continuously cycle.
|
|
733
|
+
huePeriod: 16
|
|
733
734
|
} : {
|
|
734
735
|
sp: r ? 0.28 : 0.36,
|
|
735
736
|
dr: r ? 14 : 19,
|
|
@@ -738,45 +739,48 @@ function be(t, e, a) {
|
|
|
738
739
|
bs: (r ? 2.3 : 3.7) * o,
|
|
739
740
|
ss: (r ? 6.4 : 4.6) * o,
|
|
740
741
|
ghs: (r ? 2.4 : 3.8) * o,
|
|
741
|
-
|
|
742
|
+
// Full hue revolution period (seconds) — colors continuously cycle.
|
|
743
|
+
huePeriod: 14
|
|
742
744
|
};
|
|
743
745
|
}
|
|
744
746
|
function ra(t, e) {
|
|
745
|
-
const { sp: a, dr: r, op: o, gh: s, bs:
|
|
747
|
+
const { sp: a, dr: r, op: o, gh: s, bs: i, ss: c, ghs: p } = e;
|
|
746
748
|
return [
|
|
747
749
|
{ prop: `--bw1-${t}`, a: 1 - a, b: 1 + a * 1.1, period: c * 0.9, delay: 0, unit: "" },
|
|
748
750
|
{ prop: `--bh1-${t}`, a: 1 + a * 0.9, b: 1 - a * 0.85, period: c * 1.26, delay: 0, unit: "" },
|
|
749
|
-
{ prop: `--bx1-${t}`, a: -r, b: r * 0.9, period:
|
|
750
|
-
{ prop: `--by1-${t}`, a: r * 0.55, b: -r * 0.7, period:
|
|
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" },
|
|
751
753
|
{ prop: `--bw2-${t}`, a: 1 + a, b: 1 - a * 0.85, period: c * 1.1, delay: 0, unit: "" },
|
|
752
754
|
{ prop: `--bh2-${t}`, a: 1 - a * 0.8, b: 1 + a * 1.05, period: c * 0.81, delay: 0, unit: "" },
|
|
753
|
-
{ prop: `--bx2-${t}`, a: r * 0.8, b: -r * 0.9, period:
|
|
754
|
-
{ prop: `--by2-${t}`, a: -r, b: r * 0.65, period:
|
|
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" },
|
|
755
757
|
{ prop: `--bw3-${t}`, a: 1 - a * 0.6, b: 1 + a * 1.15, period: c * 0.98, delay: 0, unit: "" },
|
|
756
758
|
{ prop: `--bh3-${t}`, a: 1 + a * 0.75, b: 1 - a, period: c * 1.4, delay: 0, unit: "" },
|
|
757
|
-
{ prop: `--bx3-${t}`, a: -r * 0.6, b: r, period:
|
|
758
|
-
{ prop: `--by3-${t}`, a: -r * 0.85, b: r * 0.45, period:
|
|
759
|
-
{ prop: `--bgh-${t}`, a: 1 - s, b: 1 + s, period:
|
|
760
|
-
{ prop: `--bop-tl-${t}`, a: 1 - o, b: 1, period:
|
|
761
|
-
{ prop: `--bop-tr-${t}`, a: 1 - o, b: 1, period:
|
|
762
|
-
{ prop: `--bop-bl-${t}`, a: 1 - o, b: 1, period:
|
|
763
|
-
{ prop: `--bop-br-${t}`, a: 1 - o, b: 1, period:
|
|
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: p, 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: "" }
|
|
764
766
|
];
|
|
765
767
|
}
|
|
766
768
|
function ta(t, e, a, r, o, s) {
|
|
767
769
|
if (t !== "pulse-inner" && t !== "pulse-outside") return null;
|
|
768
|
-
const
|
|
770
|
+
const i = pe(t, e, a);
|
|
769
771
|
return {
|
|
770
|
-
oscillators: ra(s,
|
|
771
|
-
|
|
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 }
|
|
772
776
|
};
|
|
773
777
|
}
|
|
774
|
-
function
|
|
778
|
+
function Q(t, e, a) {
|
|
775
779
|
return ` animation: ${e}-${t} ${a}s ease forwards;`;
|
|
776
780
|
}
|
|
777
781
|
function oa(t) {
|
|
778
782
|
const { size: e } = t;
|
|
779
|
-
return e === "line" ?
|
|
783
|
+
return e === "line" ? ba(t) : e === "sm" ? sa(t) : e === "pulse-inner" ? na(t) : e === "pulse-outside" ? ca(t) : ia(t);
|
|
780
784
|
}
|
|
781
785
|
function sa(t) {
|
|
782
786
|
const {
|
|
@@ -785,21 +789,21 @@ function sa(t) {
|
|
|
785
789
|
borderWidth: r,
|
|
786
790
|
duration: o,
|
|
787
791
|
strokeOpacity: s,
|
|
788
|
-
innerOpacity:
|
|
792
|
+
innerOpacity: i,
|
|
789
793
|
bloomOpacity: c,
|
|
790
|
-
innerShadow:
|
|
791
|
-
colorVariant:
|
|
794
|
+
innerShadow: p,
|
|
795
|
+
colorVariant: b,
|
|
792
796
|
staticColors: m,
|
|
793
|
-
brightness:
|
|
794
|
-
saturation:
|
|
795
|
-
hueRange:
|
|
796
|
-
theme:
|
|
797
|
-
} = t,
|
|
797
|
+
brightness: n,
|
|
798
|
+
saturation: l,
|
|
799
|
+
hueRange: d,
|
|
800
|
+
theme: k
|
|
801
|
+
} = t, f = Math.max(0, a - r), g = b === "mono" ? 0.5 : 1, W = s * g, Y = i * g, z = c * g, H = m ? "" : `animation: beam-hue-shift-${e} 12s ease-in-out infinite;`, $ = m ? "" : `
|
|
798
802
|
@keyframes beam-hue-shift-${e} {
|
|
799
|
-
0% { filter: hue-rotate(
|
|
800
|
-
50% { filter: hue-rotate(${
|
|
801
|
-
100% { filter: hue-rotate(
|
|
802
|
-
}`,
|
|
803
|
+
0% { filter: hue-rotate(calc(var(--beam-hue-base, 0deg) - ${d}deg)) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
|
|
804
|
+
50% { filter: hue-rotate(calc(var(--beam-hue-base, 0deg) + ${d}deg)) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
|
|
805
|
+
100% { filter: hue-rotate(calc(var(--beam-hue-base, 0deg) - ${d}deg)) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
|
|
806
|
+
}`, w = k === "dark", y = w ? `conic-gradient(
|
|
803
807
|
from var(--beam-angle-${e}),
|
|
804
808
|
transparent 0%, transparent 54%,
|
|
805
809
|
rgba(255, 255, 255, 0.1) 57%,
|
|
@@ -821,7 +825,7 @@ function sa(t) {
|
|
|
821
825
|
rgba(0, 0, 0, 0.2) 72%,
|
|
822
826
|
rgba(0, 0, 0, 0.08) 75%,
|
|
823
827
|
transparent 78%, transparent 100%
|
|
824
|
-
)`,
|
|
828
|
+
)`, x = Pe(b), X = Be(b), u = w ? `conic-gradient(
|
|
825
829
|
from var(--beam-angle-${e}),
|
|
826
830
|
transparent 0%, transparent 58%,
|
|
827
831
|
rgba(255, 255, 255, 0.03) 62%,
|
|
@@ -849,7 +853,7 @@ function sa(t) {
|
|
|
849
853
|
rgba(0, 0, 0, 0.08) 75%,
|
|
850
854
|
rgba(0, 0, 0, 0.02) 78%,
|
|
851
855
|
transparent 82%
|
|
852
|
-
)`,
|
|
856
|
+
)`, v = `conic-gradient(
|
|
853
857
|
from var(--beam-angle-${e}),
|
|
854
858
|
transparent 0%, transparent 22%,
|
|
855
859
|
rgba(255, 255, 255, 0.12) 28%, rgba(255, 255, 255, 0.4) 36%,
|
|
@@ -893,10 +897,10 @@ function sa(t) {
|
|
|
893
897
|
content: "";
|
|
894
898
|
position: absolute;
|
|
895
899
|
inset: 0;
|
|
896
|
-
border-radius: ${
|
|
900
|
+
border-radius: ${f}px;
|
|
897
901
|
padding: ${r}px;
|
|
898
902
|
clip-path: inset(0 round ${a}px);
|
|
899
|
-
background: ${
|
|
903
|
+
background: ${y},${x};
|
|
900
904
|
-webkit-mask:
|
|
901
905
|
conic-gradient(
|
|
902
906
|
from var(--beam-angle-${e}),
|
|
@@ -923,7 +927,7 @@ function sa(t) {
|
|
|
923
927
|
mask-composite: intersect, exclude;
|
|
924
928
|
pointer-events: none;
|
|
925
929
|
z-index: 2;
|
|
926
|
-
opacity: calc(var(--beam-opacity-${e}) * ${
|
|
930
|
+
opacity: calc(var(--beam-opacity-${e}) * ${W.toFixed(2)} * var(--beam-stroke-opacity, 1) * var(--beam-strength, 1));
|
|
927
931
|
${H}
|
|
928
932
|
}
|
|
929
933
|
|
|
@@ -935,14 +939,14 @@ function sa(t) {
|
|
|
935
939
|
border-radius: ${a}px;
|
|
936
940
|
clip-path: inset(0 round ${a}px);
|
|
937
941
|
background: ${X};
|
|
938
|
-
box-shadow: inset 0 0 5px 1px ${
|
|
939
|
-
-webkit-mask-image: ${
|
|
942
|
+
box-shadow: inset 0 0 5px 1px ${p};
|
|
943
|
+
-webkit-mask-image: ${v};
|
|
940
944
|
-webkit-mask-composite: source-over;
|
|
941
|
-
mask-image: ${
|
|
945
|
+
mask-image: ${v};
|
|
942
946
|
mask-composite: add;
|
|
943
947
|
pointer-events: none;
|
|
944
948
|
z-index: 1;
|
|
945
|
-
opacity: calc(var(--beam-opacity-${e}) * ${Y.toFixed(2)} * var(--beam-strength, 1));
|
|
949
|
+
opacity: calc(var(--beam-opacity-${e}) * ${Y.toFixed(2)} * var(--beam-inner-opacity, 1) * var(--beam-strength, 1));
|
|
946
950
|
${H}
|
|
947
951
|
}
|
|
948
952
|
|
|
@@ -950,15 +954,15 @@ function sa(t) {
|
|
|
950
954
|
display: none;
|
|
951
955
|
position: absolute;
|
|
952
956
|
inset: 0;
|
|
953
|
-
border-radius: ${
|
|
957
|
+
border-radius: ${f}px;
|
|
954
958
|
clip-path: inset(0 round ${a}px);
|
|
955
|
-
background: ${
|
|
959
|
+
background: ${u};
|
|
956
960
|
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
957
961
|
-webkit-mask-composite: xor;
|
|
958
962
|
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
959
963
|
mask-composite: exclude;
|
|
960
964
|
padding: ${r}px;
|
|
961
|
-
filter: blur(8px) brightness(${
|
|
965
|
+
filter: blur(8px) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)});
|
|
962
966
|
pointer-events: none;
|
|
963
967
|
z-index: 3;
|
|
964
968
|
opacity: 0;
|
|
@@ -967,7 +971,7 @@ function sa(t) {
|
|
|
967
971
|
[data-beam="${e}"][data-active] [data-beam-bloom],
|
|
968
972
|
[data-beam="${e}"][data-fading] [data-beam-bloom] {
|
|
969
973
|
display: block;
|
|
970
|
-
opacity: calc(var(--beam-opacity-${e}) * ${
|
|
974
|
+
opacity: calc(var(--beam-opacity-${e}) * ${z.toFixed(2)} * var(--beam-bloom-opacity, 1) * var(--beam-strength, 1));
|
|
971
975
|
}
|
|
972
976
|
|
|
973
977
|
@keyframes beam-spin-${e} {
|
|
@@ -982,8 +986,8 @@ function sa(t) {
|
|
|
982
986
|
from { --beam-opacity-${e}: 1; }
|
|
983
987
|
to { --beam-opacity-${e}: 0; }
|
|
984
988
|
}
|
|
985
|
-
${
|
|
986
|
-
${
|
|
989
|
+
${$}
|
|
990
|
+
${_(e)}
|
|
987
991
|
`;
|
|
988
992
|
}
|
|
989
993
|
function ia(t) {
|
|
@@ -993,21 +997,21 @@ function ia(t) {
|
|
|
993
997
|
borderWidth: r,
|
|
994
998
|
duration: o,
|
|
995
999
|
strokeOpacity: s,
|
|
996
|
-
innerOpacity:
|
|
1000
|
+
innerOpacity: i,
|
|
997
1001
|
bloomOpacity: c,
|
|
998
|
-
innerShadow:
|
|
999
|
-
colorVariant:
|
|
1002
|
+
innerShadow: p,
|
|
1003
|
+
colorVariant: b,
|
|
1000
1004
|
staticColors: m,
|
|
1001
|
-
brightness:
|
|
1002
|
-
saturation:
|
|
1003
|
-
hueRange:
|
|
1004
|
-
theme:
|
|
1005
|
-
} = t,
|
|
1005
|
+
brightness: n,
|
|
1006
|
+
saturation: l,
|
|
1007
|
+
hueRange: d,
|
|
1008
|
+
theme: k
|
|
1009
|
+
} = t, f = Math.max(0, a - r), g = b === "mono" ? 0.5 : 1, W = s * g, Y = i * g, z = c * g, H = m ? "" : `animation: beam-hue-shift-${e} 12s ease-in-out infinite;`, $ = m ? "" : `
|
|
1006
1010
|
@keyframes beam-hue-shift-${e} {
|
|
1007
|
-
0% { filter: hue-rotate(
|
|
1008
|
-
50% { filter: hue-rotate(${
|
|
1009
|
-
100% { filter: hue-rotate(
|
|
1010
|
-
}`,
|
|
1011
|
+
0% { filter: hue-rotate(calc(var(--beam-hue-base, 0deg) - ${d}deg)) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
|
|
1012
|
+
50% { filter: hue-rotate(calc(var(--beam-hue-base, 0deg) + ${d}deg)) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
|
|
1013
|
+
100% { filter: hue-rotate(calc(var(--beam-hue-base, 0deg) - ${d}deg)) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
|
|
1014
|
+
}`, w = k === "dark", y = w ? `conic-gradient(
|
|
1011
1015
|
from var(--beam-angle-${e}),
|
|
1012
1016
|
transparent 0%, transparent 54%,
|
|
1013
1017
|
rgba(255, 255, 255, 0.1) 57%,
|
|
@@ -1029,7 +1033,7 @@ function ia(t) {
|
|
|
1029
1033
|
rgba(0, 0, 0, 0.2) 72%,
|
|
1030
1034
|
rgba(0, 0, 0, 0.08) 75%,
|
|
1031
1035
|
transparent 78%, transparent 100%
|
|
1032
|
-
)`,
|
|
1036
|
+
)`, x = Ee(b), X = Ae(b), u = w ? `conic-gradient(
|
|
1033
1037
|
from var(--beam-angle-${e}),
|
|
1034
1038
|
transparent 0%, transparent 58%,
|
|
1035
1039
|
rgba(255, 255, 255, 0.03) 62%,
|
|
@@ -1094,10 +1098,10 @@ function ia(t) {
|
|
|
1094
1098
|
content: "";
|
|
1095
1099
|
position: absolute;
|
|
1096
1100
|
inset: 0;
|
|
1097
|
-
border-radius: ${
|
|
1101
|
+
border-radius: ${f}px;
|
|
1098
1102
|
padding: ${r}px;
|
|
1099
1103
|
clip-path: inset(0 round ${a}px);
|
|
1100
|
-
background: ${
|
|
1104
|
+
background: ${y},${x};
|
|
1101
1105
|
-webkit-mask:
|
|
1102
1106
|
conic-gradient(
|
|
1103
1107
|
from var(--beam-angle-${e}),
|
|
@@ -1124,7 +1128,7 @@ function ia(t) {
|
|
|
1124
1128
|
mask-composite: intersect, exclude;
|
|
1125
1129
|
pointer-events: none;
|
|
1126
1130
|
z-index: 2;
|
|
1127
|
-
opacity: calc(var(--beam-opacity-${e}) * ${
|
|
1131
|
+
opacity: calc(var(--beam-opacity-${e}) * ${W.toFixed(2)} * var(--beam-stroke-opacity, 1) * var(--beam-strength, 1));
|
|
1128
1132
|
${H}
|
|
1129
1133
|
}
|
|
1130
1134
|
|
|
@@ -1135,7 +1139,7 @@ function ia(t) {
|
|
|
1135
1139
|
inset: 0;
|
|
1136
1140
|
border-radius: ${a}px;
|
|
1137
1141
|
background: ${X};
|
|
1138
|
-
box-shadow: inset 0 0 9px 1px ${
|
|
1142
|
+
box-shadow: inset 0 0 9px 1px ${p};
|
|
1139
1143
|
-webkit-mask-image:
|
|
1140
1144
|
conic-gradient(
|
|
1141
1145
|
from var(--beam-angle-${e}),
|
|
@@ -1162,7 +1166,7 @@ function ia(t) {
|
|
|
1162
1166
|
mask-composite: intersect, add;
|
|
1163
1167
|
pointer-events: none;
|
|
1164
1168
|
z-index: 1;
|
|
1165
|
-
opacity: calc(var(--beam-opacity-${e}) * ${Y.toFixed(2)} * var(--beam-strength, 1));
|
|
1169
|
+
opacity: calc(var(--beam-opacity-${e}) * ${Y.toFixed(2)} * var(--beam-inner-opacity, 1) * var(--beam-strength, 1));
|
|
1166
1170
|
clip-path: inset(0 round ${a}px);
|
|
1167
1171
|
${H}
|
|
1168
1172
|
}
|
|
@@ -1171,15 +1175,15 @@ function ia(t) {
|
|
|
1171
1175
|
display: none;
|
|
1172
1176
|
position: absolute;
|
|
1173
1177
|
inset: 0;
|
|
1174
|
-
border-radius: ${
|
|
1178
|
+
border-radius: ${f}px;
|
|
1175
1179
|
clip-path: inset(0 round ${a}px);
|
|
1176
|
-
background: ${
|
|
1180
|
+
background: ${u};
|
|
1177
1181
|
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
1178
1182
|
-webkit-mask-composite: xor;
|
|
1179
1183
|
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
1180
1184
|
mask-composite: exclude;
|
|
1181
1185
|
padding: ${r}px;
|
|
1182
|
-
filter: blur(8px) brightness(${
|
|
1186
|
+
filter: blur(8px) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)});
|
|
1183
1187
|
pointer-events: none;
|
|
1184
1188
|
z-index: 3;
|
|
1185
1189
|
opacity: 0;
|
|
@@ -1188,7 +1192,7 @@ function ia(t) {
|
|
|
1188
1192
|
[data-beam="${e}"][data-active] [data-beam-bloom],
|
|
1189
1193
|
[data-beam="${e}"][data-fading] [data-beam-bloom] {
|
|
1190
1194
|
display: block;
|
|
1191
|
-
opacity: calc(var(--beam-opacity-${e}) * ${
|
|
1195
|
+
opacity: calc(var(--beam-opacity-${e}) * ${z.toFixed(2)} * var(--beam-bloom-opacity, 1) * var(--beam-strength, 1));
|
|
1192
1196
|
}
|
|
1193
1197
|
|
|
1194
1198
|
@keyframes beam-spin-${e} {
|
|
@@ -1203,8 +1207,8 @@ function ia(t) {
|
|
|
1203
1207
|
from { --beam-opacity-${e}: 1; }
|
|
1204
1208
|
to { --beam-opacity-${e}: 0; }
|
|
1205
1209
|
}
|
|
1206
|
-
${
|
|
1207
|
-
${
|
|
1210
|
+
${$}
|
|
1211
|
+
${_(e)}
|
|
1208
1212
|
`;
|
|
1209
1213
|
}
|
|
1210
1214
|
function na(t) {
|
|
@@ -1214,15 +1218,15 @@ function na(t) {
|
|
|
1214
1218
|
borderWidth: r,
|
|
1215
1219
|
duration: o,
|
|
1216
1220
|
strokeOpacity: s,
|
|
1217
|
-
innerOpacity:
|
|
1221
|
+
innerOpacity: i,
|
|
1218
1222
|
bloomOpacity: c,
|
|
1219
|
-
colorVariant:
|
|
1220
|
-
staticColors:
|
|
1223
|
+
colorVariant: p,
|
|
1224
|
+
staticColors: b,
|
|
1221
1225
|
brightness: m,
|
|
1222
|
-
saturation:
|
|
1223
|
-
hueRange:
|
|
1224
|
-
theme:
|
|
1225
|
-
} = t,
|
|
1226
|
+
saturation: n,
|
|
1227
|
+
hueRange: l,
|
|
1228
|
+
theme: d
|
|
1229
|
+
} = t, k = d === "dark", f = p === "mono" ? 0.5 : 1, g = (s * f).toFixed(2), W = (i * f).toFixed(2), Y = (c * f).toFixed(2), { op: z } = pe("pulse-inner", d, o), H = 8, $ = m.toFixed(2), w = n.toFixed(2), y = b ? `filter: brightness(${$}) saturate(${w});` : `filter: hue-rotate(calc(var(--beam-hue-base, 0deg) + var(--beam-hue-${e}))) brightness(${$}) saturate(${w});`, x = b ? `filter: blur(${H}px) brightness(${$}) saturate(${w});` : `filter: blur(${H}px) hue-rotate(calc(var(--beam-hue-base, 0deg) + var(--beam-hue-${e}))) brightness(${$}) saturate(${w});`, X = ea(p, e), u = aa(p, e, k), v = Ye(Qe, p, 1 - z * 0.5);
|
|
1226
1230
|
return `
|
|
1227
1231
|
${Oe(e)}
|
|
1228
1232
|
|
|
@@ -1234,11 +1238,11 @@ ${Oe(e)}
|
|
|
1234
1238
|
}
|
|
1235
1239
|
|
|
1236
1240
|
[data-beam="${e}"][data-active] {
|
|
1237
|
-
${
|
|
1241
|
+
${Q(e, "beam-fade-in", 0.6)}
|
|
1238
1242
|
}
|
|
1239
1243
|
|
|
1240
1244
|
[data-beam="${e}"][data-fading] {
|
|
1241
|
-
${
|
|
1245
|
+
${Q(e, "beam-fade-out", 0.5)}
|
|
1242
1246
|
}
|
|
1243
1247
|
|
|
1244
1248
|
[data-beam="${e}"][data-active]::after,
|
|
@@ -1257,8 +1261,8 @@ ${K(e, "beam-fade-out", 0.5)}
|
|
|
1257
1261
|
pointer-events: none;
|
|
1258
1262
|
z-index: 2;
|
|
1259
1263
|
will-change: opacity, filter;
|
|
1260
|
-
opacity: calc(var(--beam-opacity-${e}) * ${g} * var(--beam-strength, 1));
|
|
1261
|
-
${
|
|
1264
|
+
opacity: calc(var(--beam-opacity-${e}) * ${g} * var(--beam-stroke-opacity, 1) * var(--beam-strength, 1));
|
|
1265
|
+
${y}
|
|
1262
1266
|
}
|
|
1263
1267
|
|
|
1264
1268
|
[data-beam="${e}"][data-active]::before,
|
|
@@ -1268,7 +1272,7 @@ ${K(e, "beam-fade-out", 0.5)}
|
|
|
1268
1272
|
inset: 0;
|
|
1269
1273
|
border-radius: ${a}px;
|
|
1270
1274
|
clip-path: inset(0 round ${a}px);
|
|
1271
|
-
background: ${
|
|
1275
|
+
background: ${u};
|
|
1272
1276
|
-webkit-mask-image:
|
|
1273
1277
|
linear-gradient(white, transparent 28px, transparent calc(100% - 28px), white),
|
|
1274
1278
|
linear-gradient(to right, white, transparent 28px, transparent calc(100% - 28px), white);
|
|
@@ -1280,8 +1284,8 @@ ${K(e, "beam-fade-out", 0.5)}
|
|
|
1280
1284
|
pointer-events: none;
|
|
1281
1285
|
z-index: 1;
|
|
1282
1286
|
will-change: opacity, filter;
|
|
1283
|
-
opacity: calc(var(--beam-opacity-${e}) * ${
|
|
1284
|
-
${
|
|
1287
|
+
opacity: calc(var(--beam-opacity-${e}) * ${W} * var(--beam-inner-opacity, 1) * var(--beam-strength, 1));
|
|
1288
|
+
${y}
|
|
1285
1289
|
}
|
|
1286
1290
|
|
|
1287
1291
|
[data-beam="${e}"] [data-beam-bloom] {
|
|
@@ -1290,7 +1294,7 @@ ${K(e, "beam-fade-out", 0.5)}
|
|
|
1290
1294
|
inset: 0;
|
|
1291
1295
|
border-radius: ${a}px;
|
|
1292
1296
|
clip-path: inset(0 round ${a}px);
|
|
1293
|
-
background: ${
|
|
1297
|
+
background: ${v};
|
|
1294
1298
|
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
1295
1299
|
-webkit-mask-composite: xor;
|
|
1296
1300
|
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
@@ -1305,13 +1309,13 @@ ${K(e, "beam-fade-out", 0.5)}
|
|
|
1305
1309
|
[data-beam="${e}"][data-active] [data-beam-bloom],
|
|
1306
1310
|
[data-beam="${e}"][data-fading] [data-beam-bloom] {
|
|
1307
1311
|
display: block;
|
|
1308
|
-
opacity: calc(var(--beam-opacity-${e}) * ${Y} * var(--beam-strength, 1));
|
|
1309
|
-
${
|
|
1312
|
+
opacity: calc(var(--beam-opacity-${e}) * ${Y} * var(--beam-bloom-opacity, 1) * var(--beam-strength, 1));
|
|
1313
|
+
${x}
|
|
1310
1314
|
}
|
|
1311
1315
|
|
|
1312
1316
|
@keyframes beam-fade-in-${e} { to { --beam-opacity-${e}: 1; } }
|
|
1313
1317
|
@keyframes beam-fade-out-${e} { from { --beam-opacity-${e}: 1; } to { --beam-opacity-${e}: 0; } }
|
|
1314
|
-
${
|
|
1318
|
+
${_(e)}
|
|
1315
1319
|
|
|
1316
1320
|
@media (prefers-reduced-motion: reduce) {
|
|
1317
1321
|
[data-beam="${e}"][data-active],
|
|
@@ -1334,16 +1338,16 @@ function ca(t) {
|
|
|
1334
1338
|
duration: r,
|
|
1335
1339
|
strokeOpacity: o,
|
|
1336
1340
|
innerOpacity: s,
|
|
1337
|
-
bloomOpacity:
|
|
1341
|
+
bloomOpacity: i,
|
|
1338
1342
|
colorVariant: c,
|
|
1339
|
-
staticColors:
|
|
1340
|
-
brightness:
|
|
1343
|
+
staticColors: p,
|
|
1344
|
+
brightness: b,
|
|
1341
1345
|
saturation: m,
|
|
1342
|
-
hueRange:
|
|
1343
|
-
theme:
|
|
1344
|
-
hairlineOpacity:
|
|
1345
|
-
} = t,
|
|
1346
|
-
${
|
|
1346
|
+
hueRange: n,
|
|
1347
|
+
theme: l,
|
|
1348
|
+
hairlineOpacity: d = 0
|
|
1349
|
+
} = t, k = l === "dark", f = c === "mono" ? 0.5 : 1, g = (o * f).toFixed(2), W = (s * f).toFixed(2), Y = (i * f).toFixed(2), z = k ? "70, 70, 70" : "0, 0, 0", H = d.toFixed(2), $ = `linear-gradient(rgba(${z}, ${H}), rgba(${z}, ${H}))`, { op: w } = pe("pulse-outside", l, r), y = 0.95, x = 0.9, X = k ? 3 : 6, u = k ? 22.5 : 15, v = b.toFixed(2), S = m.toFixed(2), J = p ? `filter: brightness(${v}) saturate(${S});` : `filter: hue-rotate(calc(var(--beam-hue-base, 0deg) + var(--beam-hue-${e}))) brightness(${v}) saturate(${S});`, G = `brightness(var(--beam-glow-brightness, ${v})) saturate(var(--beam-glow-saturate, ${S}))`, ee = p ? `filter: blur(var(--beam-core-blur, ${X}px)) ${G};` : `filter: blur(var(--beam-core-blur, ${X}px)) hue-rotate(calc(var(--beam-hue-base, 0deg) + var(--beam-hue-${e}))) ${G};`, j = p ? `filter: blur(var(--beam-bloom-blur, ${u}px)) ${G};` : `filter: blur(var(--beam-bloom-blur, ${u}px)) hue-rotate(calc(var(--beam-hue-base, 0deg) + var(--beam-hue-${e}))) ${G};`, A = we(ke, c, e), ae = we(ke, c, e), R = Ye(Ze, c, 1 - w * 0.5), O = d > 0 ? `${A},
|
|
1350
|
+
${$}` : A;
|
|
1347
1351
|
return `
|
|
1348
1352
|
${Oe(e)}
|
|
1349
1353
|
|
|
@@ -1355,13 +1359,13 @@ ${Oe(e)}
|
|
|
1355
1359
|
}
|
|
1356
1360
|
|
|
1357
1361
|
[data-beam="${e}"][data-active] {
|
|
1358
|
-
${
|
|
1362
|
+
${Q(e, "beam-fade-in", 0.6)}
|
|
1359
1363
|
}
|
|
1360
1364
|
|
|
1361
1365
|
[data-beam="${e}"][data-fading] {
|
|
1362
|
-
${
|
|
1366
|
+
${Q(e, "beam-fade-out", 0.5)}
|
|
1363
1367
|
}
|
|
1364
|
-
${
|
|
1368
|
+
${d > 0 ? `
|
|
1365
1369
|
/* Idle hairline — painted above the (opaque) child in the inner 1px edge ring so
|
|
1366
1370
|
it overlaps a standard inset component border exactly. */
|
|
1367
1371
|
[data-beam="${e}"]::after {
|
|
@@ -1371,7 +1375,7 @@ ${l > 0 ? `
|
|
|
1371
1375
|
border-radius: ${a}px;
|
|
1372
1376
|
padding: 1px;
|
|
1373
1377
|
clip-path: inset(0 round ${a}px);
|
|
1374
|
-
background: ${
|
|
1378
|
+
background: ${$};
|
|
1375
1379
|
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
1376
1380
|
-webkit-mask-composite: xor;
|
|
1377
1381
|
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
@@ -1388,7 +1392,7 @@ ${l > 0 ? `
|
|
|
1388
1392
|
border-radius: ${a}px;
|
|
1389
1393
|
padding: 1px;
|
|
1390
1394
|
clip-path: inset(0 round ${a}px);
|
|
1391
|
-
background: ${
|
|
1395
|
+
background: ${O};
|
|
1392
1396
|
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
1393
1397
|
-webkit-mask-composite: xor;
|
|
1394
1398
|
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
@@ -1396,8 +1400,8 @@ ${l > 0 ? `
|
|
|
1396
1400
|
pointer-events: none;
|
|
1397
1401
|
z-index: 2;
|
|
1398
1402
|
will-change: opacity, filter;
|
|
1399
|
-
opacity: calc(var(--beam-opacity-${e}) * ${g} * var(--beam-strength, 1));
|
|
1400
|
-
${
|
|
1403
|
+
opacity: calc(var(--beam-opacity-${e}) * ${g} * var(--beam-stroke-opacity, 1) * var(--beam-strength, 1));
|
|
1404
|
+
${J}
|
|
1401
1405
|
}
|
|
1402
1406
|
|
|
1403
1407
|
[data-beam="${e}"][data-active]::before,
|
|
@@ -1407,12 +1411,12 @@ ${l > 0 ? `
|
|
|
1407
1411
|
inset: -10px;
|
|
1408
1412
|
z-index: -1;
|
|
1409
1413
|
border-radius: ${a + 10}px;
|
|
1410
|
-
background: ${
|
|
1411
|
-
transform: scale(${
|
|
1414
|
+
background: ${ae};
|
|
1415
|
+
transform: scale(${y}, ${x});
|
|
1412
1416
|
pointer-events: none;
|
|
1413
1417
|
will-change: opacity, filter;
|
|
1414
|
-
opacity: calc(var(--beam-opacity-${e}) * ${
|
|
1415
|
-
${
|
|
1418
|
+
opacity: calc(var(--beam-opacity-${e}) * ${W} * var(--beam-inner-opacity, 1) * var(--beam-strength, 1));
|
|
1419
|
+
${ee}
|
|
1416
1420
|
}
|
|
1417
1421
|
|
|
1418
1422
|
[data-beam="${e}"] [data-beam-bloom] {
|
|
@@ -1421,8 +1425,8 @@ ${l > 0 ? `
|
|
|
1421
1425
|
inset: -30px;
|
|
1422
1426
|
z-index: -1;
|
|
1423
1427
|
border-radius: ${a + 30}px;
|
|
1424
|
-
background: ${
|
|
1425
|
-
transform: scale(${
|
|
1428
|
+
background: ${R};
|
|
1429
|
+
transform: scale(${y}, ${x});
|
|
1426
1430
|
pointer-events: none;
|
|
1427
1431
|
will-change: transform;
|
|
1428
1432
|
opacity: 0;
|
|
@@ -1431,13 +1435,13 @@ ${l > 0 ? `
|
|
|
1431
1435
|
[data-beam="${e}"][data-active] [data-beam-bloom],
|
|
1432
1436
|
[data-beam="${e}"][data-fading] [data-beam-bloom] {
|
|
1433
1437
|
display: block;
|
|
1434
|
-
opacity: calc(var(--beam-opacity-${e}) * ${Y} * var(--beam-strength, 1));
|
|
1435
|
-
${
|
|
1438
|
+
opacity: calc(var(--beam-opacity-${e}) * ${Y} * var(--beam-bloom-opacity, 1) * var(--beam-strength, 1));
|
|
1439
|
+
${j}
|
|
1436
1440
|
}
|
|
1437
1441
|
|
|
1438
1442
|
@keyframes beam-fade-in-${e} { to { --beam-opacity-${e}: 1; } }
|
|
1439
1443
|
@keyframes beam-fade-out-${e} { from { --beam-opacity-${e}: 1; } to { --beam-opacity-${e}: 0; } }
|
|
1440
|
-
${
|
|
1444
|
+
${_(e)}
|
|
1441
1445
|
|
|
1442
1446
|
@media (prefers-reduced-motion: reduce) {
|
|
1443
1447
|
[data-beam="${e}"][data-active],
|
|
@@ -1453,34 +1457,34 @@ ${A(e)}
|
|
|
1453
1457
|
}
|
|
1454
1458
|
`;
|
|
1455
1459
|
}
|
|
1456
|
-
function
|
|
1460
|
+
function ba(t) {
|
|
1457
1461
|
const {
|
|
1458
1462
|
id: e,
|
|
1459
1463
|
borderRadius: a,
|
|
1460
1464
|
borderWidth: r,
|
|
1461
1465
|
duration: o,
|
|
1462
1466
|
strokeOpacity: s,
|
|
1463
|
-
innerOpacity:
|
|
1467
|
+
innerOpacity: i,
|
|
1464
1468
|
bloomOpacity: c,
|
|
1465
|
-
innerShadow:
|
|
1466
|
-
colorVariant:
|
|
1469
|
+
innerShadow: p,
|
|
1470
|
+
colorVariant: b,
|
|
1467
1471
|
staticColors: m,
|
|
1468
|
-
brightness:
|
|
1469
|
-
saturation:
|
|
1470
|
-
hueRange:
|
|
1471
|
-
theme:
|
|
1472
|
-
} = t,
|
|
1472
|
+
brightness: n,
|
|
1473
|
+
saturation: l,
|
|
1474
|
+
hueRange: d,
|
|
1475
|
+
theme: k
|
|
1476
|
+
} = t, f = Math.max(0, a - r), g = k === "dark", W = s, Y = i, z = c, H = m ? "" : `animation: beam-hue-shift-${e} 12s ease-in-out infinite;`, $ = m ? "" : `animation: beam-hue-shift-bloom-${e} 8s ease-in-out infinite;`, w = m ? "" : `
|
|
1473
1477
|
@keyframes beam-hue-shift-${e} {
|
|
1474
|
-
0% { filter: hue-rotate(
|
|
1475
|
-
50% { filter: hue-rotate(${
|
|
1476
|
-
100% { filter: hue-rotate(
|
|
1478
|
+
0% { filter: hue-rotate(calc(var(--beam-hue-base, 0deg) - ${d}deg)) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
|
|
1479
|
+
50% { filter: hue-rotate(calc(var(--beam-hue-base, 0deg) + ${d}deg)) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
|
|
1480
|
+
100% { filter: hue-rotate(calc(var(--beam-hue-base, 0deg) - ${d}deg)) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
|
|
1477
1481
|
}
|
|
1478
1482
|
|
|
1479
1483
|
@keyframes beam-hue-shift-bloom-${e} {
|
|
1480
|
-
0% { filter: blur(8px) hue-rotate(
|
|
1481
|
-
50% { filter: blur(8px) hue-rotate(${
|
|
1482
|
-
100% { filter: blur(8px) hue-rotate(
|
|
1483
|
-
}`,
|
|
1484
|
+
0% { filter: blur(8px) hue-rotate(calc(var(--beam-hue-base, 0deg) - ${d + 10}deg)) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
|
|
1485
|
+
50% { filter: blur(8px) hue-rotate(calc(var(--beam-hue-base, 0deg) + ${d + 10}deg)) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
|
|
1486
|
+
100% { filter: blur(8px) hue-rotate(calc(var(--beam-hue-base, 0deg) - ${d + 10}deg)) brightness(${n.toFixed(2)}) saturate(${l.toFixed(2)}); }
|
|
1487
|
+
}`, y = g ? `radial-gradient(
|
|
1484
1488
|
ellipse calc(24px * var(--beam-w-${e})) calc(28px * var(--beam-h-${e})) at calc(var(--beam-x-${e}) * 100%) calc(100% + 2px),
|
|
1485
1489
|
rgba(255, 255, 255, 0.38) 0%,
|
|
1486
1490
|
rgba(255, 255, 255, 0.12) 30%,
|
|
@@ -1490,7 +1494,7 @@ function pa(t) {
|
|
|
1490
1494
|
rgba(0, 0, 0, 0.6) 0%,
|
|
1491
1495
|
rgba(0, 0, 0, 0.25) 35%,
|
|
1492
1496
|
transparent 70%
|
|
1493
|
-
)`,
|
|
1497
|
+
)`, x = Te(b, g, e), X = Ve(b, e), u = Ue(b, g, e), v = b === "mono" ? "filter: blur(6px);" : "";
|
|
1494
1498
|
return `
|
|
1495
1499
|
@property --beam-x-${e} {
|
|
1496
1500
|
syntax: "<number>";
|
|
@@ -1565,10 +1569,10 @@ function pa(t) {
|
|
|
1565
1569
|
content: "";
|
|
1566
1570
|
position: absolute;
|
|
1567
1571
|
inset: 0;
|
|
1568
|
-
border-radius: ${
|
|
1572
|
+
border-radius: ${f}px;
|
|
1569
1573
|
padding: ${r}px;
|
|
1570
1574
|
clip-path: inset(0 round ${a}px);
|
|
1571
|
-
background: ${
|
|
1575
|
+
background: ${y}, ${x};
|
|
1572
1576
|
-webkit-mask:
|
|
1573
1577
|
radial-gradient(
|
|
1574
1578
|
ellipse calc(78px * var(--beam-w-${e})) calc(60px * var(--beam-h-${e})) at calc(var(--beam-x-${e}) * 100%) 100%,
|
|
@@ -1587,7 +1591,7 @@ function pa(t) {
|
|
|
1587
1591
|
mask-composite: intersect, exclude;
|
|
1588
1592
|
pointer-events: none;
|
|
1589
1593
|
z-index: 2;
|
|
1590
|
-
opacity: calc(var(--beam-opacity-${e}) * var(--beam-edge-${e}) * ${
|
|
1594
|
+
opacity: calc(var(--beam-opacity-${e}) * var(--beam-edge-${e}) * ${W.toFixed(2)} * var(--beam-stroke-opacity, 1) * var(--beam-strength, 1));
|
|
1591
1595
|
${H}
|
|
1592
1596
|
}
|
|
1593
1597
|
|
|
@@ -1598,7 +1602,7 @@ function pa(t) {
|
|
|
1598
1602
|
inset: 0;
|
|
1599
1603
|
border-radius: ${a}px;
|
|
1600
1604
|
background: ${X};
|
|
1601
|
-
box-shadow: inset 0 0 9px 1px ${
|
|
1605
|
+
box-shadow: inset 0 0 9px 1px ${p};
|
|
1602
1606
|
-webkit-mask-image:
|
|
1603
1607
|
radial-gradient(
|
|
1604
1608
|
ellipse calc(78px * var(--beam-w-${e})) calc(60px * var(--beam-h-${e})) at calc(var(--beam-x-${e}) * 100%) 100%,
|
|
@@ -1617,7 +1621,7 @@ function pa(t) {
|
|
|
1617
1621
|
mask-composite: intersect, add;
|
|
1618
1622
|
pointer-events: none;
|
|
1619
1623
|
z-index: 1;
|
|
1620
|
-
opacity: calc(var(--beam-opacity-${e}) * var(--beam-edge-${e}) * ${Y.toFixed(2)} * var(--beam-strength, 1));
|
|
1624
|
+
opacity: calc(var(--beam-opacity-${e}) * var(--beam-edge-${e}) * ${Y.toFixed(2)} * var(--beam-inner-opacity, 1) * var(--beam-strength, 1));
|
|
1621
1625
|
clip-path: inset(0 round ${a}px);
|
|
1622
1626
|
${H}
|
|
1623
1627
|
}
|
|
@@ -1626,7 +1630,7 @@ function pa(t) {
|
|
|
1626
1630
|
display: none;
|
|
1627
1631
|
position: absolute;
|
|
1628
1632
|
inset: 0;
|
|
1629
|
-
border-radius: ${
|
|
1633
|
+
border-radius: ${f}px;
|
|
1630
1634
|
clip-path: inset(0 round ${a}px);
|
|
1631
1635
|
padding: 0;
|
|
1632
1636
|
-webkit-mask: radial-gradient(
|
|
@@ -1639,8 +1643,8 @@ function pa(t) {
|
|
|
1639
1643
|
white 0%, rgba(255, 255, 255, 0.5) 35%, transparent 100%
|
|
1640
1644
|
);
|
|
1641
1645
|
mask-composite: add;
|
|
1642
|
-
background: ${
|
|
1643
|
-
${
|
|
1646
|
+
background: ${u};
|
|
1647
|
+
${v}
|
|
1644
1648
|
pointer-events: none;
|
|
1645
1649
|
z-index: 3;
|
|
1646
1650
|
opacity: 0;
|
|
@@ -1649,8 +1653,8 @@ function pa(t) {
|
|
|
1649
1653
|
[data-beam="${e}"][data-active] [data-beam-bloom],
|
|
1650
1654
|
[data-beam="${e}"][data-fading] [data-beam-bloom] {
|
|
1651
1655
|
display: block;
|
|
1652
|
-
opacity: calc(var(--beam-opacity-${e}) * var(--beam-edge-${e}) * ${
|
|
1653
|
-
${
|
|
1656
|
+
opacity: calc(var(--beam-opacity-${e}) * var(--beam-edge-${e}) * ${z.toFixed(2)} * var(--beam-bloom-opacity, 1) * var(--beam-strength, 1));
|
|
1657
|
+
${$}
|
|
1654
1658
|
}
|
|
1655
1659
|
|
|
1656
1660
|
@keyframes beam-travel-${e} {
|
|
@@ -1707,49 +1711,49 @@ function pa(t) {
|
|
|
1707
1711
|
from { --beam-opacity-${e}: 1; }
|
|
1708
1712
|
to { --beam-opacity-${e}: 0; }
|
|
1709
1713
|
}
|
|
1710
|
-
${
|
|
1711
|
-
${
|
|
1714
|
+
${w}
|
|
1715
|
+
${_(e)}
|
|
1712
1716
|
`;
|
|
1713
1717
|
}
|
|
1714
|
-
const
|
|
1715
|
-
let
|
|
1716
|
-
const
|
|
1718
|
+
const Z = /* @__PURE__ */ new Set();
|
|
1719
|
+
let E = null, ce = 0;
|
|
1720
|
+
const pa = 1e3 / 30 - 2, la = Math.PI * 2;
|
|
1717
1721
|
function We(t) {
|
|
1718
1722
|
return (1 - Math.cos(la * t)) / 2;
|
|
1719
1723
|
}
|
|
1720
1724
|
function Fe(t) {
|
|
1721
|
-
if (
|
|
1725
|
+
if (E = requestAnimationFrame(Fe), t - ce < pa) return;
|
|
1722
1726
|
ce = t;
|
|
1723
1727
|
const e = t / 1e3;
|
|
1724
|
-
|
|
1728
|
+
Z.forEach(({ el: a, config: r }) => {
|
|
1725
1729
|
for (const o of r.oscillators) {
|
|
1726
|
-
const s = (e - o.delay) / o.period,
|
|
1730
|
+
const s = (e - o.delay) / o.period, i = o.a + (o.b - o.a) * We(s);
|
|
1727
1731
|
a.style.setProperty(
|
|
1728
1732
|
o.prop,
|
|
1729
|
-
o.unit === "px" ? `${
|
|
1733
|
+
o.unit === "px" ? `${i.toFixed(2)}px` : i.toFixed(4)
|
|
1730
1734
|
);
|
|
1731
1735
|
}
|
|
1732
1736
|
if (r.hue) {
|
|
1733
|
-
const { prop: o, range: s, period:
|
|
1734
|
-
a.style.setProperty(o, `${
|
|
1737
|
+
const { prop: o, range: s, period: i, continuous: c } = r.hue, p = c ? e / i % 1 * s : -s + 2 * s * We(e / i);
|
|
1738
|
+
a.style.setProperty(o, `${p.toFixed(2)}deg`);
|
|
1735
1739
|
}
|
|
1736
1740
|
});
|
|
1737
1741
|
}
|
|
1738
|
-
function fa() {
|
|
1739
|
-
B == null && (ce = 0, B = requestAnimationFrame(Fe));
|
|
1740
|
-
}
|
|
1741
1742
|
function da() {
|
|
1742
|
-
|
|
1743
|
+
E == null && (ce = 0, E = requestAnimationFrame(Fe));
|
|
1744
|
+
}
|
|
1745
|
+
function fa() {
|
|
1746
|
+
Z.size === 0 && E != null && (cancelAnimationFrame(E), E = null);
|
|
1743
1747
|
}
|
|
1744
1748
|
function ga(t, e) {
|
|
1745
1749
|
const a = { el: t, config: e };
|
|
1746
|
-
return
|
|
1747
|
-
|
|
1750
|
+
return Z.add(a), da(), () => {
|
|
1751
|
+
Z.delete(a), fa();
|
|
1748
1752
|
};
|
|
1749
1753
|
}
|
|
1750
1754
|
function ma() {
|
|
1751
|
-
const [t, e] =
|
|
1752
|
-
return
|
|
1755
|
+
const [t, e] = P(() => typeof window > "u" || window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
|
|
1756
|
+
return B(() => {
|
|
1753
1757
|
if (typeof window > "u") return;
|
|
1754
1758
|
const a = window.matchMedia("(prefers-color-scheme: dark)"), r = (o) => {
|
|
1755
1759
|
e(o.matches ? "dark" : "light");
|
|
@@ -1767,131 +1771,131 @@ const za = Ge(
|
|
|
1767
1771
|
colorVariant: r = "colorful",
|
|
1768
1772
|
theme: o = "dark",
|
|
1769
1773
|
staticColors: s = !1,
|
|
1770
|
-
duration:
|
|
1774
|
+
duration: i,
|
|
1771
1775
|
active: c = !0,
|
|
1772
|
-
borderRadius:
|
|
1773
|
-
brightness:
|
|
1776
|
+
borderRadius: p,
|
|
1777
|
+
brightness: b,
|
|
1774
1778
|
saturation: m,
|
|
1775
|
-
hueRange:
|
|
1776
|
-
strength:
|
|
1777
|
-
className:
|
|
1778
|
-
style:
|
|
1779
|
-
onActivate:
|
|
1779
|
+
hueRange: n = 30,
|
|
1780
|
+
strength: l = 1,
|
|
1781
|
+
className: d,
|
|
1782
|
+
style: k,
|
|
1783
|
+
onActivate: f,
|
|
1780
1784
|
onDeactivate: g,
|
|
1781
|
-
onAnimationEnd:
|
|
1785
|
+
onAnimationEnd: W,
|
|
1782
1786
|
...Y
|
|
1783
|
-
},
|
|
1784
|
-
const
|
|
1785
|
-
|
|
1786
|
-
if (
|
|
1787
|
-
const
|
|
1788
|
-
if (!
|
|
1789
|
-
const
|
|
1790
|
-
const
|
|
1791
|
-
if (!
|
|
1792
|
-
const se = getComputedStyle(
|
|
1793
|
-
!isNaN(
|
|
1787
|
+
}, z) {
|
|
1788
|
+
const $ = Me().replace(/:/g, "-"), w = ma(), y = Ie(null), [x, X] = P(c), [u, v] = P(!1), [S, J] = P(!0), [G, ee] = P(null), [j, A] = P({ x: 1, y: 1 });
|
|
1789
|
+
B(() => {
|
|
1790
|
+
if (p != null) return;
|
|
1791
|
+
const h = y.current;
|
|
1792
|
+
if (!h) return;
|
|
1793
|
+
const F = () => {
|
|
1794
|
+
const I = h.firstElementChild;
|
|
1795
|
+
if (!I) return;
|
|
1796
|
+
const se = getComputedStyle(I), L = parseFloat(se.borderTopLeftRadius);
|
|
1797
|
+
!isNaN(L) && L > 0 && ee(L);
|
|
1794
1798
|
};
|
|
1795
|
-
|
|
1796
|
-
const
|
|
1797
|
-
return
|
|
1798
|
-
}, [
|
|
1799
|
-
c && !
|
|
1800
|
-
}, [c,
|
|
1801
|
-
const
|
|
1802
|
-
if (!
|
|
1803
|
-
const
|
|
1804
|
-
(
|
|
1805
|
-
for (const
|
|
1799
|
+
F();
|
|
1800
|
+
const M = new MutationObserver(F);
|
|
1801
|
+
return M.observe(h, { childList: !0, subtree: !1 }), () => M.disconnect();
|
|
1802
|
+
}, [p, e]), B(() => {
|
|
1803
|
+
c && !x && !u ? X(!0) : !c && x && !u && v(!0);
|
|
1804
|
+
}, [c, x, u]), B(() => {
|
|
1805
|
+
const h = y.current;
|
|
1806
|
+
if (!h || typeof IntersectionObserver > "u") return;
|
|
1807
|
+
const F = new IntersectionObserver(
|
|
1808
|
+
(M) => {
|
|
1809
|
+
for (const I of M) J(I.isIntersecting);
|
|
1806
1810
|
},
|
|
1807
1811
|
// Start animating slightly before the element scrolls into view.
|
|
1808
1812
|
{ rootMargin: "256px" }
|
|
1809
1813
|
);
|
|
1810
|
-
return
|
|
1811
|
-
}, []),
|
|
1814
|
+
return F.observe(h), () => F.disconnect();
|
|
1815
|
+
}, []), B(() => {
|
|
1812
1816
|
if (a !== "pulse-outside") {
|
|
1813
|
-
|
|
1817
|
+
A({ x: 1, y: 1 });
|
|
1814
1818
|
return;
|
|
1815
1819
|
}
|
|
1816
|
-
const
|
|
1817
|
-
if (!
|
|
1818
|
-
const
|
|
1819
|
-
const
|
|
1820
|
-
if (!
|
|
1821
|
-
const
|
|
1822
|
-
if (!
|
|
1823
|
-
const
|
|
1824
|
-
|
|
1820
|
+
const h = y.current;
|
|
1821
|
+
if (!h) return;
|
|
1822
|
+
const F = 350, M = 140, I = 0.35, se = 4, L = (D) => Math.max(I, Math.min(se, D)), ge = () => {
|
|
1823
|
+
const D = h.firstElementChild;
|
|
1824
|
+
if (!D) return;
|
|
1825
|
+
const U = D.getBoundingClientRect();
|
|
1826
|
+
if (!U.width || !U.height) return;
|
|
1827
|
+
const ue = +L(U.width / F).toFixed(3), xe = +L(U.height / M).toFixed(3);
|
|
1828
|
+
A((ie) => ie.x === ue && ie.y === xe ? ie : { x: ue, y: xe });
|
|
1825
1829
|
};
|
|
1826
1830
|
if (ge(), typeof ResizeObserver > "u") return;
|
|
1827
|
-
const me =
|
|
1831
|
+
const me = h.firstElementChild;
|
|
1828
1832
|
if (!me) return;
|
|
1829
1833
|
const $e = new ResizeObserver(ge);
|
|
1830
1834
|
return $e.observe(me), () => $e.disconnect();
|
|
1831
1835
|
}, [a, e]);
|
|
1832
1836
|
const ae = ye(
|
|
1833
|
-
(
|
|
1834
|
-
const
|
|
1835
|
-
|
|
1837
|
+
(h) => {
|
|
1838
|
+
const F = h.animationName;
|
|
1839
|
+
F.includes("fade-out") ? (X(!1), v(!1), g == null || g()) : F.includes("fade-in") && (f == null || f()), W == null || W(h);
|
|
1836
1840
|
},
|
|
1837
|
-
[
|
|
1838
|
-
), R = $a(o,
|
|
1841
|
+
[f, g, W]
|
|
1842
|
+
), R = $a(o, w), O = ne[a][R], re = Le[a], te = a === "pulse-inner" || a === "pulse-outside", le = p ?? G ?? re.borderRadius, T = i ?? (a === "line" ? 3.1 : te ? 2.3 : 1.96), de = m ?? O.saturation, fe = b ?? O.brightness ?? 1.3, N = a === "line" ? Math.min(n, 13) : n, V = r === "mono" ? !0 : s, Se = ve(
|
|
1839
1843
|
() => oa({
|
|
1840
|
-
id:
|
|
1844
|
+
id: $,
|
|
1841
1845
|
borderRadius: le,
|
|
1842
1846
|
borderWidth: re.borderWidth,
|
|
1843
|
-
duration:
|
|
1844
|
-
strokeOpacity:
|
|
1845
|
-
innerOpacity:
|
|
1846
|
-
bloomOpacity:
|
|
1847
|
-
innerShadow:
|
|
1847
|
+
duration: T,
|
|
1848
|
+
strokeOpacity: O.strokeOpacity,
|
|
1849
|
+
innerOpacity: O.innerOpacity,
|
|
1850
|
+
bloomOpacity: O.bloomOpacity,
|
|
1851
|
+
innerShadow: O.innerShadow,
|
|
1848
1852
|
size: a,
|
|
1849
1853
|
colorVariant: r,
|
|
1850
|
-
staticColors:
|
|
1851
|
-
brightness:
|
|
1852
|
-
saturation:
|
|
1853
|
-
hueRange:
|
|
1854
|
+
staticColors: V,
|
|
1855
|
+
brightness: fe,
|
|
1856
|
+
saturation: de,
|
|
1857
|
+
hueRange: N,
|
|
1854
1858
|
theme: R,
|
|
1855
|
-
hairlineOpacity:
|
|
1859
|
+
hairlineOpacity: O.hairlineOpacity
|
|
1856
1860
|
}),
|
|
1857
1861
|
[
|
|
1858
|
-
|
|
1862
|
+
$,
|
|
1859
1863
|
le,
|
|
1860
1864
|
re.borderWidth,
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1865
|
+
T,
|
|
1866
|
+
O.strokeOpacity,
|
|
1867
|
+
O.innerOpacity,
|
|
1868
|
+
O.bloomOpacity,
|
|
1869
|
+
O.innerShadow,
|
|
1870
|
+
O.hairlineOpacity,
|
|
1867
1871
|
a,
|
|
1868
1872
|
r,
|
|
1869
|
-
|
|
1870
|
-
de,
|
|
1873
|
+
V,
|
|
1871
1874
|
fe,
|
|
1872
|
-
|
|
1875
|
+
de,
|
|
1876
|
+
N,
|
|
1873
1877
|
R
|
|
1874
1878
|
]
|
|
1875
|
-
), oe =
|
|
1876
|
-
() => te ? ta(a, R,
|
|
1877
|
-
[te, a, R,
|
|
1879
|
+
), oe = ve(
|
|
1880
|
+
() => te ? ta(a, R, T, N, V, $) : null,
|
|
1881
|
+
[te, a, R, T, N, V, $]
|
|
1878
1882
|
);
|
|
1879
|
-
|
|
1880
|
-
var
|
|
1881
|
-
if (!oe || !(
|
|
1882
|
-
const
|
|
1883
|
-
if (
|
|
1884
|
-
return ga(
|
|
1885
|
-
}, [oe,
|
|
1883
|
+
B(() => {
|
|
1884
|
+
var F;
|
|
1885
|
+
if (!oe || !(x || u) || !S) return;
|
|
1886
|
+
const h = y.current;
|
|
1887
|
+
if (h && !(typeof window < "u" && ((F = window.matchMedia) != null && F.call(window, "(prefers-reduced-motion: reduce)").matches)))
|
|
1888
|
+
return ga(h, oe);
|
|
1889
|
+
}, [oe, x, u, S]);
|
|
1886
1890
|
const Re = ye(
|
|
1887
|
-
(
|
|
1888
|
-
|
|
1891
|
+
(h) => {
|
|
1892
|
+
y.current = h, typeof z == "function" ? z(h) : z && (z.current = h);
|
|
1889
1893
|
},
|
|
1890
|
-
[
|
|
1894
|
+
[z]
|
|
1891
1895
|
), qe = {
|
|
1892
|
-
...
|
|
1893
|
-
"--beam-strength": Math.max(0, Math.min(1,
|
|
1894
|
-
...a === "pulse-outside" ? { "--pulse-glow-sx":
|
|
1896
|
+
...k ?? {},
|
|
1897
|
+
"--beam-strength": Math.max(0, Math.min(1, l)),
|
|
1898
|
+
...a === "pulse-outside" ? { "--pulse-glow-sx": j.x, "--pulse-glow-sy": j.y } : {}
|
|
1895
1899
|
};
|
|
1896
1900
|
return /* @__PURE__ */ he(Ce, { children: [
|
|
1897
1901
|
/* @__PURE__ */ ze("style", { children: Se }),
|
|
@@ -1900,11 +1904,11 @@ const za = Ge(
|
|
|
1900
1904
|
{
|
|
1901
1905
|
...Y,
|
|
1902
1906
|
ref: Re,
|
|
1903
|
-
"data-beam":
|
|
1904
|
-
"data-active":
|
|
1905
|
-
"data-fading":
|
|
1906
|
-
"data-paused":
|
|
1907
|
-
className:
|
|
1907
|
+
"data-beam": $,
|
|
1908
|
+
"data-active": x && !u ? "" : void 0,
|
|
1909
|
+
"data-fading": u ? "" : void 0,
|
|
1910
|
+
"data-paused": x && !u && !S ? "" : void 0,
|
|
1911
|
+
className: d,
|
|
1908
1912
|
style: qe,
|
|
1909
1913
|
onAnimationEnd: ae,
|
|
1910
1914
|
children: [
|