border-beam 1.0.1 → 1.1.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/README.md +41 -11
- package/dist/index.cjs.js +337 -102
- package/dist/index.d.ts +21 -7
- package/dist/index.es.js +855 -295
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -1,45 +1,66 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
2
|
-
`)}function
|
|
3
|
-
`)}function
|
|
4
|
-
`)}function
|
|
5
|
-
`)}function
|
|
6
|
-
`)}const
|
|
7
|
-
`)}const
|
|
8
|
-
radial-gradient(ellipse calc(10px * var(--beam-spike2-${a})) calc(35px * var(--beam-h-${a})) at 22% calc(100% - 4px), ${
|
|
9
|
-
radial-gradient(ellipse calc(
|
|
10
|
-
radial-gradient(ellipse calc(14px * var(--beam-spike2-${a})) calc(28px * var(--beam-h-${a})) at 50% calc(100% - 2px), ${
|
|
11
|
-
radial-gradient(ellipse calc(
|
|
12
|
-
radial-gradient(ellipse calc(7px * var(--beam-spike-${a})) calc(45px * var(--beam-h-${a})) at 78% calc(100% - 2px), ${
|
|
13
|
-
radial-gradient(ellipse calc(
|
|
14
|
-
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),
|
|
15
|
-
radial-gradient(ellipse calc(42px * var(--beam-w-${a})) calc(40px * var(--beam-h-${a})) at calc(var(--beam-x-${a}) * 100%) 100%,
|
|
16
|
-
radial-gradient(ellipse calc(10px * var(--beam-spike2-${a})) calc(35px * var(--beam-h-${a})) at 22% calc(100% - 4px), ${
|
|
17
|
-
radial-gradient(ellipse calc(
|
|
18
|
-
radial-gradient(ellipse calc(14px * var(--beam-spike2-${a})) calc(28px * var(--beam-h-${a})) at 50% calc(100% - 2px), ${
|
|
19
|
-
radial-gradient(ellipse calc(
|
|
20
|
-
radial-gradient(ellipse calc(7px * var(--beam-spike-${a})) calc(45px * var(--beam-h-${a})) at 78% calc(100% - 2px), ${
|
|
21
|
-
radial-gradient(ellipse calc(
|
|
22
|
-
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%)`}}function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const L=require("react/jsx-runtime"),v=require("react"),ke={sm:{borderRadius:32,borderWidth:1,width:70,height:36},md:{borderRadius:16,borderWidth:1},line:{borderRadius:16,borderWidth:1},"pulse-outside":{borderRadius:16,borderWidth:1},"pulse-inner":{borderRadius:16,borderWidth:1}},K={sm:{dark:{strokeOpacity:.46,innerOpacity:.24,bloomOpacity:.38,innerShadow:"rgba(255, 255, 255, 0.3)",saturation:1.2},light:{strokeOpacity:.12,innerOpacity:.3,bloomOpacity:.16,innerShadow:"rgba(0, 0, 0, 0.14)",saturation:1.8}},md:{dark:{strokeOpacity:.26,innerOpacity:.42,bloomOpacity:.24,innerShadow:"rgba(255, 255, 255, 0.27)",saturation:1.2},light:{strokeOpacity:.12,innerOpacity:.26,bloomOpacity:.34,innerShadow:"rgba(0, 0, 0, 0.14)",saturation:1.5}},line:{dark:{strokeOpacity:1.14,innerOpacity:.7,bloomOpacity:.8,innerShadow:"rgba(255, 255, 255, 0.1)",saturation:1.2},light:{strokeOpacity:.16,innerOpacity:.32,bloomOpacity:.3,innerShadow:"rgba(0, 0, 0, 0.14)",saturation:1.95}},"pulse-outside":{dark:{strokeOpacity:.94,innerOpacity:.34,bloomOpacity:.3,innerShadow:"transparent",saturation:1.2,brightness:1.9,hairlineOpacity:0},light:{strokeOpacity:1.96,innerOpacity:1.04,bloomOpacity:.42,innerShadow:"transparent",saturation:.6,brightness:1.7,hairlineOpacity:0}},"pulse-inner":{dark:{strokeOpacity:1.54,innerOpacity:.44,bloomOpacity:.66,innerShadow:"transparent",saturation:1.2,brightness:.75},light:{strokeOpacity:.32,innerOpacity:.4,bloomOpacity:.8,innerShadow:"transparent",saturation:.75,brightness:1.3}}},Re={dark:{...K.md.dark},light:{...K.md.light}},C={colorful:{border:[{color:"rgb(255, 50, 100)",pos:"33% -7.4%",size:"70px 40px"},{color:"rgb(40, 140, 255)",pos:"12% -5%",size:"60px 35px"},{color:"rgb(50, 200, 80)",pos:"2.1% 68.3%",size:"40px 70px"},{color:"rgb(30, 185, 170)",pos:"2.1% 68.3%",size:"20px 35px"},{color:"rgb(100, 70, 255)",pos:"74.4% 100%",size:"180px 32px"},{color:"rgb(40, 140, 255)",pos:"55% 100%",size:"85px 26px"},{color:"rgb(255, 120, 40)",pos:"93.9% 0%",size:"74px 32px"},{color:"rgb(240, 50, 180)",pos:"100% 27.1%",size:"26px 42px"},{color:"rgb(180, 40, 240)",pos:"100% 27.1%",size:"52px 48px"}],spike:{primary:"rgb(255, 60, 80)",secondary:"rgba(40, 190, 180, 0.98)"},spikeLt:{primary:"rgb(200, 30, 60)",secondary:"rgb(20, 150, 140)"}},mono:{border:[{color:"rgb(180, 180, 180)",pos:"33% -7.4%",size:"70px 40px"},{color:"rgb(140, 140, 140)",pos:"12% -5%",size:"60px 35px"},{color:"rgb(160, 160, 160)",pos:"2.1% 68.3%",size:"40px 70px"},{color:"rgb(130, 130, 130)",pos:"2.1% 68.3%",size:"20px 35px"},{color:"rgb(170, 170, 170)",pos:"74.4% 100%",size:"180px 32px"},{color:"rgb(150, 150, 150)",pos:"55% 100%",size:"85px 26px"},{color:"rgb(190, 190, 190)",pos:"93.9% 0%",size:"74px 32px"},{color:"rgb(145, 145, 145)",pos:"100% 27.1%",size:"26px 42px"},{color:"rgb(165, 165, 165)",pos:"100% 27.1%",size:"52px 48px"}],spike:{primary:"rgb(200, 200, 200)",secondary:"rgb(170, 170, 170)"},spikeLt:{primary:"rgb(80, 80, 80)",secondary:"rgb(120, 120, 120)"}},ocean:{border:[{color:"rgb(100, 80, 220)",pos:"33% -7.4%",size:"70px 40px"},{color:"rgb(60, 120, 255)",pos:"12% -5%",size:"60px 35px"},{color:"rgb(80, 100, 200)",pos:"2.1% 68.3%",size:"40px 70px"},{color:"rgb(50, 140, 220)",pos:"2.1% 68.3%",size:"20px 35px"},{color:"rgb(120, 80, 255)",pos:"74.4% 100%",size:"180px 32px"},{color:"rgb(70, 130, 255)",pos:"55% 100%",size:"85px 26px"},{color:"rgb(140, 100, 240)",pos:"93.9% 0%",size:"74px 32px"},{color:"rgb(90, 110, 230)",pos:"100% 27.1%",size:"26px 42px"},{color:"rgb(130, 70, 255)",pos:"100% 27.1%",size:"52px 48px"}],spike:{primary:"rgb(100, 120, 255)",secondary:"rgba(130, 100, 220, 0.98)"},spikeLt:{primary:"rgb(60, 60, 180)",secondary:"rgb(80, 100, 200)"}},sunset:{border:[{color:"rgb(255, 80, 50)",pos:"33% -7.4%",size:"70px 40px"},{color:"rgb(255, 160, 40)",pos:"12% -5%",size:"60px 35px"},{color:"rgb(255, 120, 60)",pos:"2.1% 68.3%",size:"40px 70px"},{color:"rgb(255, 200, 50)",pos:"2.1% 68.3%",size:"20px 35px"},{color:"rgb(255, 100, 80)",pos:"74.4% 100%",size:"180px 32px"},{color:"rgb(255, 180, 60)",pos:"55% 100%",size:"85px 26px"},{color:"rgb(255, 60, 60)",pos:"93.9% 0%",size:"74px 32px"},{color:"rgb(255, 140, 50)",pos:"100% 27.1%",size:"26px 42px"},{color:"rgb(255, 90, 70)",pos:"100% 27.1%",size:"52px 48px"}],spike:{primary:"rgb(255, 140, 80)",secondary:"rgba(255, 100, 60, 0.98)"},spikeLt:{primary:"rgb(200, 80, 40)",secondary:"rgb(220, 120, 30)"}}},ve={colorful:{border:[{color:"rgb(50, 200, 80)",pos:"2% 68%",size:"9px 18px"},{color:"rgb(30, 185, 170)",pos:"2% 68%",size:"4px 8px"},{color:"rgb(255, 120, 40)",pos:"72% -3%",size:"59px 9px"},{color:"rgb(100, 70, 255)",pos:"74% 100%",size:"42px 7px"},{color:"rgb(240, 50, 180)",pos:"100% 27%",size:"10px 17px"},{color:"rgb(180, 40, 240)",pos:"100% 27%",size:"10px 18px"},{color:"rgb(40, 140, 255)",pos:"100% 27%",size:"5px 10px"},{color:"rgb(255, 50, 100)",pos:"100% 27%",size:"11px 12px"}],inner:[{color:"rgba(50, 200, 80, 0.5)",pos:"2% 68%",size:"9px 18px"},{color:"rgba(30, 185, 170, 0.45)",pos:"2% 68%",size:"4px 8px"},{color:"rgba(255, 120, 40, 0.35)",pos:"72% -3%",size:"59px 9px"},{color:"rgba(100, 70, 255, 0.35)",pos:"74% 100%",size:"42px 7px"},{color:"rgba(240, 50, 180, 0.3)",pos:"100% 27%",size:"10px 17px"},{color:"rgba(180, 40, 240, 0.4)",pos:"100% 27%",size:"10px 18px"},{color:"rgba(40, 140, 255, 0.3)",pos:"100% 27%",size:"5px 10px"},{color:"rgba(255, 50, 100, 0.3)",pos:"100% 27%",size:"11px 12px"}]},mono:{border:[{color:"rgb(160, 160, 160)",pos:"2% 68%",size:"9px 18px"},{color:"rgb(140, 140, 140)",pos:"2% 68%",size:"4px 8px"},{color:"rgb(180, 180, 180)",pos:"72% -3%",size:"59px 9px"},{color:"rgb(150, 150, 150)",pos:"74% 100%",size:"42px 7px"},{color:"rgb(170, 170, 170)",pos:"100% 27%",size:"10px 17px"},{color:"rgb(155, 155, 155)",pos:"100% 27%",size:"10px 18px"},{color:"rgb(145, 145, 145)",pos:"100% 27%",size:"5px 10px"},{color:"rgb(165, 165, 165)",pos:"100% 27%",size:"11px 12px"}],inner:[{color:"rgba(160, 160, 160, 0.25)",pos:"2% 68%",size:"9px 18px"},{color:"rgba(140, 140, 140, 0.22)",pos:"2% 68%",size:"4px 8px"},{color:"rgba(180, 180, 180, 0.17)",pos:"72% -3%",size:"59px 9px"},{color:"rgba(150, 150, 150, 0.17)",pos:"74% 100%",size:"42px 7px"},{color:"rgba(170, 170, 170, 0.15)",pos:"100% 27%",size:"10px 17px"},{color:"rgba(155, 155, 155, 0.20)",pos:"100% 27%",size:"10px 18px"},{color:"rgba(145, 145, 145, 0.15)",pos:"100% 27%",size:"5px 10px"},{color:"rgba(165, 165, 165, 0.15)",pos:"100% 27%",size:"11px 12px"}]},ocean:{border:[{color:"rgb(60, 140, 200)",pos:"2% 68%",size:"9px 18px"},{color:"rgb(50, 120, 180)",pos:"2% 68%",size:"4px 8px"},{color:"rgb(100, 80, 220)",pos:"72% -3%",size:"59px 9px"},{color:"rgb(80, 100, 255)",pos:"74% 100%",size:"42px 7px"},{color:"rgb(120, 70, 240)",pos:"100% 27%",size:"10px 17px"},{color:"rgb(90, 80, 220)",pos:"100% 27%",size:"10px 18px"},{color:"rgb(70, 110, 255)",pos:"100% 27%",size:"5px 10px"},{color:"rgb(110, 90, 230)",pos:"100% 27%",size:"11px 12px"}],inner:[{color:"rgba(60, 140, 200, 0.5)",pos:"2% 68%",size:"9px 18px"},{color:"rgba(50, 120, 180, 0.45)",pos:"2% 68%",size:"4px 8px"},{color:"rgba(100, 80, 220, 0.35)",pos:"72% -3%",size:"59px 9px"},{color:"rgba(80, 100, 255, 0.35)",pos:"74% 100%",size:"42px 7px"},{color:"rgba(120, 70, 240, 0.3)",pos:"100% 27%",size:"10px 17px"},{color:"rgba(90, 80, 220, 0.4)",pos:"100% 27%",size:"10px 18px"},{color:"rgba(70, 110, 255, 0.3)",pos:"100% 27%",size:"5px 10px"},{color:"rgba(110, 90, 230, 0.3)",pos:"100% 27%",size:"11px 12px"}]},sunset:{border:[{color:"rgb(255, 180, 50)",pos:"2% 68%",size:"9px 18px"},{color:"rgb(255, 150, 40)",pos:"2% 68%",size:"4px 8px"},{color:"rgb(255, 80, 60)",pos:"72% -3%",size:"59px 9px"},{color:"rgb(255, 100, 80)",pos:"74% 100%",size:"42px 7px"},{color:"rgb(255, 60, 80)",pos:"100% 27%",size:"10px 17px"},{color:"rgb(255, 120, 60)",pos:"100% 27%",size:"10px 18px"},{color:"rgb(255, 200, 50)",pos:"100% 27%",size:"5px 10px"},{color:"rgb(255, 90, 70)",pos:"100% 27%",size:"11px 12px"}],inner:[{color:"rgba(255, 180, 50, 0.5)",pos:"2% 68%",size:"9px 18px"},{color:"rgba(255, 150, 40, 0.45)",pos:"2% 68%",size:"4px 8px"},{color:"rgba(255, 80, 60, 0.35)",pos:"72% -3%",size:"59px 9px"},{color:"rgba(255, 100, 80, 0.35)",pos:"74% 100%",size:"42px 7px"},{color:"rgba(255, 60, 80, 0.3)",pos:"100% 27%",size:"10px 17px"},{color:"rgba(255, 120, 60, 0.4)",pos:"100% 27%",size:"10px 18px"},{color:"rgba(255, 200, 50, 0.3)",pos:"100% 27%",size:"5px 10px"},{color:"rgba(255, 90, 70, 0.3)",pos:"100% 27%",size:"11px 12px"}]}};function Me(t){return ve[t].border.map(a=>`radial-gradient(ellipse ${a.size} at ${a.pos}, ${a.color}, transparent)`).join(`,
|
|
2
|
+
`)}function qe(t){return ve[t].inner.map(a=>`radial-gradient(ellipse ${a.size} at ${a.pos}, ${a.color}, transparent)`).join(`,
|
|
3
|
+
`)}function Ce(t){return C[t].border.map(a=>`radial-gradient(ellipse ${a.size} at ${a.pos}, ${a.color}, transparent)`).join(`,
|
|
4
|
+
`)}function Ge(t){const e=C[t],a=t==="mono"?.225:.45;return e.border.map(r=>{const o=r.color.replace("rgb(","rgba(").replace(")",`, ${a})`);return`radial-gradient(ellipse ${r.size.split(" ").map(n=>{const c=parseInt(n);return`${Math.round(c*.9)}px`}).join(" ")} at ${r.pos}, ${o}, transparent)`}).join(`,
|
|
5
|
+
`)}function Ie(t,e){const a=C[t];return e?a.spike:a.spikeLt}const Pe={colorful:{dark:[{color:"rgb(255, 50, 100)",sizeW:36,sizeH:36,offsetX:0,offsetY:2},{color:"rgb(40, 180, 220)",sizeW:30,sizeH:32,offsetX:39,offsetY:0},{color:"rgb(50, 200, 80)",sizeW:33,sizeH:28,offsetX:-36,offsetY:2},{color:"rgb(180, 40, 240)",sizeW:29,sizeH:34,offsetX:-54,offsetY:0},{color:"rgb(255, 160, 30)",sizeW:27,sizeH:30,offsetX:51,offsetY:-1},{color:"rgb(100, 70, 255)",sizeW:36,sizeH:24,offsetX:21,offsetY:1},{color:"rgb(40, 140, 255)",sizeW:30,sizeH:22,offsetX:-21,offsetY:0},{color:"rgb(240, 50, 180)",sizeW:25,sizeH:28,offsetX:66,offsetY:1},{color:"rgb(30, 185, 170)",sizeW:23,sizeH:30,offsetX:-66,offsetY:-1}],light:[{color:"rgb(255, 50, 100)",sizeW:45,sizeH:36,offsetX:0,offsetY:2},{color:"rgb(40, 140, 255)",sizeW:35,sizeH:32,offsetX:65,offsetY:0},{color:"rgb(50, 200, 80)",sizeW:40,sizeH:28,offsetX:-60,offsetY:2},{color:"rgb(180, 40, 240)",sizeW:35,sizeH:34,offsetX:-90,offsetY:0},{color:"rgb(30, 185, 170)",sizeW:38,sizeH:30,offsetX:85,offsetY:-1},{color:"rgb(100, 70, 255)",sizeW:50,sizeH:24,offsetX:35,offsetY:1},{color:"rgb(40, 140, 255)",sizeW:40,sizeH:22,offsetX:-35,offsetY:0},{color:"rgb(255, 120, 40)",sizeW:35,sizeH:28,offsetX:110,offsetY:1},{color:"rgb(240, 50, 180)",sizeW:30,sizeH:30,offsetX:-110,offsetY:-1}]},mono:{dark:[{color:"rgb(200, 200, 200)",sizeW:36,sizeH:36,offsetX:0,offsetY:2},{color:"rgb(170, 170, 170)",sizeW:30,sizeH:32,offsetX:39,offsetY:0},{color:"rgb(155, 155, 155)",sizeW:33,sizeH:28,offsetX:-36,offsetY:2},{color:"rgb(185, 185, 185)",sizeW:29,sizeH:34,offsetX:-54,offsetY:0},{color:"rgb(165, 165, 165)",sizeW:27,sizeH:30,offsetX:51,offsetY:-1},{color:"rgb(180, 180, 180)",sizeW:36,sizeH:24,offsetX:21,offsetY:1},{color:"rgb(160, 160, 160)",sizeW:30,sizeH:22,offsetX:-21,offsetY:0},{color:"rgb(175, 175, 175)",sizeW:25,sizeH:28,offsetX:66,offsetY:1},{color:"rgb(190, 190, 190)",sizeW:23,sizeH:30,offsetX:-66,offsetY:-1}],light:[{color:"rgb(100, 100, 100)",sizeW:45,sizeH:36,offsetX:0,offsetY:2},{color:"rgb(80, 80, 80)",sizeW:35,sizeH:32,offsetX:65,offsetY:0},{color:"rgb(90, 90, 90)",sizeW:40,sizeH:28,offsetX:-60,offsetY:2},{color:"rgb(70, 70, 70)",sizeW:35,sizeH:34,offsetX:-90,offsetY:0},{color:"rgb(85, 85, 85)",sizeW:38,sizeH:30,offsetX:85,offsetY:-1},{color:"rgb(95, 95, 95)",sizeW:50,sizeH:24,offsetX:35,offsetY:1},{color:"rgb(75, 75, 75)",sizeW:40,sizeH:22,offsetX:-35,offsetY:0},{color:"rgb(105, 105, 105)",sizeW:35,sizeH:28,offsetX:110,offsetY:1},{color:"rgb(65, 65, 65)",sizeW:30,sizeH:30,offsetX:-110,offsetY:-1}]},ocean:{dark:[{color:"rgb(100, 80, 220)",sizeW:36,sizeH:36,offsetX:0,offsetY:2},{color:"rgb(60, 120, 255)",sizeW:30,sizeH:32,offsetX:39,offsetY:0},{color:"rgb(80, 100, 200)",sizeW:33,sizeH:28,offsetX:-36,offsetY:2},{color:"rgb(130, 70, 255)",sizeW:29,sizeH:34,offsetX:-54,offsetY:0},{color:"rgb(70, 130, 255)",sizeW:27,sizeH:30,offsetX:51,offsetY:-1},{color:"rgb(120, 80, 255)",sizeW:36,sizeH:24,offsetX:21,offsetY:1},{color:"rgb(90, 110, 230)",sizeW:30,sizeH:22,offsetX:-21,offsetY:0},{color:"rgb(110, 90, 240)",sizeW:25,sizeH:28,offsetX:66,offsetY:1},{color:"rgb(140, 100, 255)",sizeW:23,sizeH:30,offsetX:-66,offsetY:-1}],light:[{color:"rgb(80, 60, 200)",sizeW:45,sizeH:36,offsetX:0,offsetY:2},{color:"rgb(50, 100, 220)",sizeW:35,sizeH:32,offsetX:65,offsetY:0},{color:"rgb(70, 90, 190)",sizeW:40,sizeH:28,offsetX:-60,offsetY:2},{color:"rgb(110, 60, 220)",sizeW:35,sizeH:34,offsetX:-90,offsetY:0},{color:"rgb(60, 110, 230)",sizeW:38,sizeH:30,offsetX:85,offsetY:-1},{color:"rgb(100, 70, 240)",sizeW:50,sizeH:24,offsetX:35,offsetY:1},{color:"rgb(80, 100, 210)",sizeW:40,sizeH:22,offsetX:-35,offsetY:0},{color:"rgb(90, 80, 225)",sizeW:35,sizeH:28,offsetX:110,offsetY:1},{color:"rgb(120, 90, 245)",sizeW:30,sizeH:30,offsetX:-110,offsetY:-1}]},sunset:{dark:[{color:"rgb(255, 100, 60)",sizeW:36,sizeH:36,offsetX:0,offsetY:2},{color:"rgb(255, 180, 50)",sizeW:30,sizeH:32,offsetX:39,offsetY:0},{color:"rgb(255, 140, 70)",sizeW:33,sizeH:28,offsetX:-36,offsetY:2},{color:"rgb(255, 80, 80)",sizeW:29,sizeH:34,offsetX:-54,offsetY:0},{color:"rgb(255, 200, 60)",sizeW:27,sizeH:30,offsetX:51,offsetY:-1},{color:"rgb(255, 120, 50)",sizeW:36,sizeH:24,offsetX:21,offsetY:1},{color:"rgb(255, 160, 80)",sizeW:30,sizeH:22,offsetX:-21,offsetY:0},{color:"rgb(255, 90, 60)",sizeW:25,sizeH:28,offsetX:66,offsetY:1},{color:"rgb(255, 70, 70)",sizeW:23,sizeH:30,offsetX:-66,offsetY:-1}],light:[{color:"rgb(220, 80, 40)",sizeW:45,sizeH:36,offsetX:0,offsetY:2},{color:"rgb(230, 150, 30)",sizeW:35,sizeH:32,offsetX:65,offsetY:0},{color:"rgb(210, 110, 50)",sizeW:40,sizeH:28,offsetX:-60,offsetY:2},{color:"rgb(200, 60, 60)",sizeW:35,sizeH:34,offsetX:-90,offsetY:0},{color:"rgb(220, 170, 40)",sizeW:38,sizeH:30,offsetX:85,offsetY:-1},{color:"rgb(210, 100, 30)",sizeW:50,sizeH:24,offsetX:35,offsetY:1},{color:"rgb(230, 130, 60)",sizeW:40,sizeH:22,offsetX:-35,offsetY:0},{color:"rgb(190, 70, 50)",sizeW:35,sizeH:28,offsetX:110,offsetY:1},{color:"rgb(180, 50, 50)",sizeW:30,sizeH:30,offsetX:-110,offsetY:-1}]}};function Ee(t,e,a){return Pe[t][e?"dark":"light"].map(o=>{const s=o.offsetX===0?"":o.offsetX>0?` + ${o.offsetX}px`:` - ${Math.abs(o.offsetX)}px`,n=o.offsetY===0?"":o.offsetY>0?` + ${o.offsetY}px`:` - ${Math.abs(o.offsetY)}px`;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%${n}), ${o.color}, transparent)`}).join(`,
|
|
6
|
+
`)}const Be={colorful:[{color:"rgba(255, 50, 100, 0.48)",sizeW:33,sizeH:30,offsetX:0,offsetY:0},{color:"rgba(40, 180, 220, 0.42)",sizeW:24,sizeH:26,offsetX:39,offsetY:-3},{color:"rgba(50, 200, 80, 0.48)",sizeW:27,sizeH:24,offsetX:-36,offsetY:0},{color:"rgba(180, 40, 240, 0.42)",sizeW:23,sizeH:28,offsetX:-54,offsetY:-2},{color:"rgba(255, 160, 30, 0.50)",sizeW:24,sizeH:24,offsetX:51,offsetY:-1},{color:"rgba(100, 70, 255, 0.45)",sizeW:30,sizeH:20,offsetX:21,offsetY:0},{color:"rgba(40, 140, 255, 0.40)",sizeW:25,sizeH:18,offsetX:-21,offsetY:-2},{color:"rgba(240, 50, 180, 0.45)",sizeW:21,sizeH:24,offsetX:66,offsetY:0},{color:"rgba(30, 185, 170, 0.52)",sizeW:18,sizeH:26,offsetX:-66,offsetY:-1}],mono:[{color:"rgba(200, 200, 200, 0.48)",sizeW:33,sizeH:30,offsetX:0,offsetY:0},{color:"rgba(170, 170, 170, 0.42)",sizeW:24,sizeH:26,offsetX:39,offsetY:-3},{color:"rgba(155, 155, 155, 0.48)",sizeW:27,sizeH:24,offsetX:-36,offsetY:0},{color:"rgba(185, 185, 185, 0.42)",sizeW:23,sizeH:28,offsetX:-54,offsetY:-2},{color:"rgba(165, 165, 165, 0.50)",sizeW:24,sizeH:24,offsetX:51,offsetY:-1},{color:"rgba(180, 180, 180, 0.45)",sizeW:30,sizeH:20,offsetX:21,offsetY:0},{color:"rgba(160, 160, 160, 0.40)",sizeW:25,sizeH:18,offsetX:-21,offsetY:-2},{color:"rgba(175, 175, 175, 0.45)",sizeW:21,sizeH:24,offsetX:66,offsetY:0},{color:"rgba(190, 190, 190, 0.52)",sizeW:18,sizeH:26,offsetX:-66,offsetY:-1}],ocean:[{color:"rgba(100, 80, 220, 0.48)",sizeW:33,sizeH:30,offsetX:0,offsetY:0},{color:"rgba(60, 120, 255, 0.42)",sizeW:24,sizeH:26,offsetX:39,offsetY:-3},{color:"rgba(80, 100, 200, 0.48)",sizeW:27,sizeH:24,offsetX:-36,offsetY:0},{color:"rgba(130, 70, 255, 0.42)",sizeW:23,sizeH:28,offsetX:-54,offsetY:-2},{color:"rgba(70, 130, 255, 0.50)",sizeW:24,sizeH:24,offsetX:51,offsetY:-1},{color:"rgba(120, 80, 255, 0.45)",sizeW:30,sizeH:20,offsetX:21,offsetY:0},{color:"rgba(90, 110, 230, 0.40)",sizeW:25,sizeH:18,offsetX:-21,offsetY:-2},{color:"rgba(110, 90, 240, 0.45)",sizeW:21,sizeH:24,offsetX:66,offsetY:0},{color:"rgba(140, 100, 255, 0.52)",sizeW:18,sizeH:26,offsetX:-66,offsetY:-1}],sunset:[{color:"rgba(255, 100, 60, 0.48)",sizeW:33,sizeH:30,offsetX:0,offsetY:0},{color:"rgba(255, 180, 50, 0.42)",sizeW:24,sizeH:26,offsetX:39,offsetY:-3},{color:"rgba(255, 140, 70, 0.48)",sizeW:27,sizeH:24,offsetX:-36,offsetY:0},{color:"rgba(255, 80, 80, 0.42)",sizeW:23,sizeH:28,offsetX:-54,offsetY:-2},{color:"rgba(255, 200, 60, 0.50)",sizeW:24,sizeH:24,offsetX:51,offsetY:-1},{color:"rgba(255, 120, 50, 0.45)",sizeW:30,sizeH:20,offsetX:21,offsetY:0},{color:"rgba(255, 160, 80, 0.40)",sizeW:25,sizeH:18,offsetX:-21,offsetY:-2},{color:"rgba(255, 90, 60, 0.45)",sizeW:21,sizeH:24,offsetX:66,offsetY:0},{color:"rgba(255, 70, 70, 0.52)",sizeW:18,sizeH:26,offsetX:-66,offsetY:-1}]};function Le(t,e){return Be[t].map(r=>{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`;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)`}).join(`,
|
|
7
|
+
`)}const _e={colorful:{dark:{spikes:[{color1:"rgb(100, 70, 255)",color2:"rgba(100, 70, 255, 1)"},{color1:"rgba(255, 170, 40, 0.59)",color2:"rgba(255, 170, 40, 0.29)"},{color1:"rgb(50, 200, 100)",color2:"rgba(50, 200, 100, 1)"},{color1:"rgba(200, 50, 240, 0.91)",color2:"rgba(200, 50, 240, 0.45)"},{color1:"rgb(40, 140, 255)",color2:"rgba(40, 140, 255, 1)"}]},light:{spikes:[{color1:"rgb(80, 50, 200)",color2:"rgba(80, 50, 200, 0.8)"},{color1:"rgba(210, 130, 0, 0.7)",color2:"rgba(210, 130, 0, 0.46)"},{color1:"rgb(30, 160, 70)",color2:"rgba(30, 160, 70, 0.82)"},{color1:"rgb(160, 30, 190)",color2:"rgba(160, 30, 190, 0.7)"},{color1:"rgb(30, 100, 200)",color2:"rgba(30, 100, 200, 0.78)"}]}},mono:{dark:{spikes:[{color1:"rgb(200, 200, 200)",color2:"rgba(200, 200, 200, 1)"},{color1:"rgba(180, 180, 180, 0.59)",color2:"rgba(180, 180, 180, 0.29)"},{color1:"rgb(190, 190, 190)",color2:"rgba(190, 190, 190, 1)"},{color1:"rgba(170, 170, 170, 0.91)",color2:"rgba(170, 170, 170, 0.45)"},{color1:"rgb(185, 185, 185)",color2:"rgba(185, 185, 185, 1)"}]},light:{spikes:[{color1:"rgb(80, 80, 80)",color2:"rgba(80, 80, 80, 0.8)"},{color1:"rgba(100, 100, 100, 0.7)",color2:"rgba(100, 100, 100, 0.46)"},{color1:"rgb(70, 70, 70)",color2:"rgba(70, 70, 70, 0.82)"},{color1:"rgb(90, 90, 90)",color2:"rgba(90, 90, 90, 0.7)"},{color1:"rgb(85, 85, 85)",color2:"rgba(85, 85, 85, 0.78)"}]}},ocean:{dark:{spikes:[{color1:"rgb(100, 80, 255)",color2:"rgb(100, 80, 255)"},{color1:"rgba(80, 130, 220, 0.59)",color2:"rgba(80, 130, 220, 0.29)"},{color1:"rgb(60, 100, 255)",color2:"rgb(60, 100, 255)"},{color1:"rgba(90, 120, 200, 0.91)",color2:"rgba(90, 120, 200, 0.45)"},{color1:"rgb(120, 90, 255)",color2:"rgb(120, 90, 255)"}]},light:{spikes:[{color1:"rgb(50, 40, 180)",color2:"rgba(50, 40, 180, 0.8)"},{color1:"rgba(40, 80, 200, 0.7)",color2:"rgba(40, 80, 200, 0.46)"},{color1:"rgb(30, 50, 190)",color2:"rgba(30, 50, 190, 0.82)"},{color1:"rgb(60, 90, 180)",color2:"rgba(60, 90, 180, 0.7)"},{color1:"rgb(70, 60, 200)",color2:"rgba(70, 60, 200, 0.78)"}]}},sunset:{dark:{spikes:[{color1:"rgb(255, 100, 80)",color2:"rgb(255, 100, 80)"},{color1:"rgba(255, 150, 80, 0.59)",color2:"rgba(255, 150, 80, 0.29)"},{color1:"rgb(255, 80, 60)",color2:"rgb(255, 80, 60)"},{color1:"rgba(255, 120, 50, 0.91)",color2:"rgba(255, 120, 50, 0.45)"},{color1:"rgb(255, 140, 70)",color2:"rgb(255, 140, 70)"}]},light:{spikes:[{color1:"rgb(200, 60, 30)",color2:"rgba(200, 60, 30, 0.8)"},{color1:"rgba(220, 100, 20, 0.7)",color2:"rgba(220, 100, 20, 0.46)"},{color1:"rgb(180, 40, 20)",color2:"rgba(180, 40, 20, 0.82)"},{color1:"rgb(210, 80, 10)",color2:"rgba(210, 80, 10, 0.7)"},{color1:"rgb(190, 70, 30)",color2:"rgba(190, 70, 30, 0.78)"}]}}};function U(t,e){const a=t.match(/^rgba\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*[\d.]+\s*\)$/);if(a)return`rgba(${a[1]}, ${a[2]}, ${a[3]}, ${e})`;const r=t.match(/^rgb\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)$/);return r?`rgba(${r[1]}, ${r[2]}, ${r[3]}, ${e})`:t}function q(t,e){const a=t.match(/^rgba\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)$/);if(a)return`rgba(${a[1]}, ${a[2]}, ${a[3]}, ${(parseFloat(a[4])*e).toFixed(2)})`;const r=t.match(/^rgb\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)$/);return r?`rgba(${r[1]}, ${r[2]}, ${r[3]}, ${e.toFixed(2)})`:t}function Ae(t,e,a){const r=Ie(t,e),o=_e[t][e?"dark":"light"],s=t==="mono",n=s?.14:1,c=s?q(r.primary,.14):r.primary,f=s?q(r.primary,.09):r.primary,p=s?q(r.secondary,.12):r.secondary,m=s?U(r.secondary,.06):U(r.secondary,.49),i=o.spikes.map($=>s?{color1:q($.color1,n),color2:q($.color2,n*.7)}:$),b=s?"12px":"0.8px",l=s?"14px":"2px",w=s?"12px":"1.2px",d=s?"10px":"0.6px",g=s?"42px":"92px",W=s?"38px":"72px",O=s?"40px":"85px",y=s?"32px":"60px",X=s?"12px":"1px",x=s?"rgba(255, 255, 255, 0.5)":"rgba(255, 255, 255, 1)",H=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)",u=s?"rgba(255, 255, 255, 0.15)":"rgba(255, 255, 255, 0.3)",Y=s?"rgba(255, 255, 255, 0.06)":"rgba(255, 255, 255, 0.12)",h=s?"rgba(255, 255, 255, 0.015)":"rgba(255, 255, 255, 0.03)";if(e)return`radial-gradient(ellipse calc(${b} * var(--beam-spike-${a})) calc(${g} * var(--beam-h-${a})) at 8% calc(100% - 2px), ${c}, ${f} 30%, transparent 88%),
|
|
8
|
+
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%),
|
|
9
|
+
radial-gradient(ellipse calc(${l} * (2 - var(--beam-spike-${a}))) calc(${W} * var(--beam-h-${a})) at 36% calc(100% - 3px), ${i[0].color1}, ${i[0].color2} 40%, transparent 90%),
|
|
10
|
+
radial-gradient(ellipse calc(14px * var(--beam-spike2-${a})) calc(28px * var(--beam-h-${a})) at 50% calc(100% - 2px), ${i[1].color1}, ${i[1].color2} 55%, transparent 96%),
|
|
11
|
+
radial-gradient(ellipse calc(${w} * (2 - var(--beam-spike2-${a}))) calc(${O} * var(--beam-h-${a})) at 64% calc(100% - 4px), ${i[2].color1}, ${i[2].color2} 35%, transparent 89%),
|
|
12
|
+
radial-gradient(ellipse calc(7px * var(--beam-spike-${a})) calc(45px * var(--beam-h-${a})) at 78% calc(100% - 2px), ${i[3].color1}, ${i[3].color2} 48%, transparent 94%),
|
|
13
|
+
radial-gradient(ellipse calc(${d} * (2 - var(--beam-spike-${a}))) calc(${y} * var(--beam-h-${a})) at 92% calc(100% - 3px), ${i[4].color1}, ${i[4].color2} 42%, transparent 91%),
|
|
14
|
+
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%, ${H} 20%, ${k} 50%, transparent 100%),
|
|
15
|
+
radial-gradient(ellipse calc(42px * var(--beam-w-${a})) calc(40px * var(--beam-h-${a})) at calc(var(--beam-x-${a}) * 100%) 100%, ${u} 0%, ${Y} 25%, ${h} 55%, transparent 80%)`;{const $=s?q(r.primary,.11):U(r.primary,.85),R=s?q(r.secondary,.09):U(r.secondary,.7);return`radial-gradient(ellipse calc(${b} * var(--beam-spike-${a})) calc(${g} * var(--beam-h-${a})) at 8% calc(100% - 2px), ${c}, ${$} 30%, transparent 88%),
|
|
16
|
+
radial-gradient(ellipse calc(10px * var(--beam-spike2-${a})) calc(35px * var(--beam-h-${a})) at 22% calc(100% - 4px), ${p}, ${R} 50%, transparent 95%),
|
|
17
|
+
radial-gradient(ellipse calc(${l} * (2 - var(--beam-spike-${a}))) calc(${W} * var(--beam-h-${a})) at 36% calc(100% - 3px), ${i[0].color1}, ${i[0].color2} 40%, transparent 90%),
|
|
18
|
+
radial-gradient(ellipse calc(14px * var(--beam-spike2-${a})) calc(28px * var(--beam-h-${a})) at 50% calc(100% - 2px), ${i[1].color1}, ${i[1].color2} 55%, transparent 96%),
|
|
19
|
+
radial-gradient(ellipse calc(${w} * (2 - var(--beam-spike2-${a}))) calc(${O} * var(--beam-h-${a})) at 64% calc(100% - 4px), ${i[2].color1}, ${i[2].color2} 35%, transparent 89%),
|
|
20
|
+
radial-gradient(ellipse calc(7px * var(--beam-spike-${a})) calc(45px * var(--beam-h-${a})) at 78% calc(100% - 2px), ${i[3].color1}, ${i[3].color2} 48%, transparent 94%),
|
|
21
|
+
radial-gradient(ellipse calc(${X} * (2 - var(--beam-spike-${a}))) calc(${y} * var(--beam-h-${a})) at 92% calc(100% - 3px), ${i[4].color1}, ${i[4].color2} 42%, transparent 91%),
|
|
22
|
+
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%)`}}const we=[{region:1,quad:"tl"},{region:2,quad:"tl"},{region:3,quad:"bl"},{region:1,quad:"bl"},{region:2,quad:"br"},{region:3,quad:"br"},{region:1,quad:"tr"},{region:2,quad:"tr"},{region:3,quad:"tr"}],je=[[65,35],[55,30],[35,65],[15,30],[173,28],[80,22],[69,28],[22,38],[47,44]],Te=[{ci:0,region:1,quad:"tl",w:84,h:48},{ci:1,region:2,quad:"tl",w:72,h:42},{ci:2,region:3,quad:"bl",w:48,h:84},{ci:4,region:2,quad:"br",w:216,h:38},{ci:5,region:3,quad:"br",w:102,h:31},{ci:6,region:1,quad:"tr",w:89,h:38},{ci:8,region:3,quad:"tr",w:62,h:58}],he=[{ci:0,region:1,quad:"tl",w:80,h:19,x:"27%",y:"0%"},{ci:6,region:2,quad:"tr",w:74,h:11,x:"73%",y:"-1%"},{ci:7,region:3,quad:"tr",w:15,h:44,x:"100%",y:"33%"},{ci:8,region:1,quad:"br",w:19,h:38,x:"101%",y:"72%"},{ci:4,region:2,quad:"br",w:84,h:13,x:"67%",y:"100%"},{ci:1,region:3,quad:"bl",w:60,h:21,x:"24%",y:"101%"},{ci:2,region:1,quad:"bl",w:17,h:40,x:"0%",y:"60%"},{ci:3,region:2,quad:"tl",w:13,h:32,x:"-1%",y:"28%"}],Ne=[{ci:0,region:1,quad:"tl",w:110,h:30,x:"27%",y:"3%"},{ci:6,region:2,quad:"tr",w:100,h:20,x:"73%",y:"1%"},{ci:7,region:3,quad:"tr",w:26,h:62,x:"100%",y:"33%"},{ci:8,region:1,quad:"br",w:30,h:56,x:"101%",y:"72%"},{ci:4,region:2,quad:"br",w:120,h:22,x:"67%",y:"99%"},{ci:1,region:3,quad:"bl",w:88,h:32,x:"24%",y:"99%"},{ci:2,region:1,quad:"bl",w:28,h:58,x:"0%",y:"60%"}];function Ve(t,e,a){const r=t.match(/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);return`rgba(${r?`${r[1]}, ${r[2]}, ${r[3]}`:"255, 255, 255"}, var(--bop-${e}-${a}))`}function pe(t,e,a,r,o,s,n,c){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(${n} + var(--by${r}-${c})), ${Ve(t,o,c)}, transparent)`}function De(t,e){return C[t].border.map((a,r)=>{const{region:o,quad:s}=we[r],[n,c]=a.pos.split(" "),[f,p]=a.size.split(" ").map(parseFloat);return pe(a.color,f,p,o,s,n,c,e)}).join(`,
|
|
23
|
+
`)}function Ue(t,e,a){const o=C[t].border.map((p,m)=>{const{region:i,quad:b}=we[m],[l,w]=p.pos.split(" "),[d,g]=je[m];return pe(p.color,d,g,i,b,l,w,e)}),s=a?"255, 255, 255":"0, 0, 0",n=a?.18:.08,f=[["0%","0%","tl"],["100%","0%","tr"],["0%","100%","bl"],["100%","100%","br"]].map(([p,m,i])=>`radial-gradient(ellipse 60px 60px at ${p} ${m}, rgba(${s}, calc(${n} * var(--bop-${i}-${e}))), transparent 70%)`);return[...o,...f].join(`,
|
|
24
|
+
`)}function ze(t,e,a){const r=C[e].border;return t.map(o=>{const s=r[o.ci],[n,c]=s.pos.split(" ");return pe(s.color,o.w,o.h,o.region,o.quad,o.x??n,o.y??c,a)}).join(`,
|
|
25
|
+
`)}function We(t,e,a){const r=C[e].border,o=+a.toFixed(3);return t.map(s=>{const n=r[s.ci],[c,f]=n.pos.split(" "),p=s.x??c,m=s.y??f,i=n.color.match(/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/),b=i?`${i[1]}, ${i[2]}, ${i[3]}`:"255, 255, 255";return`radial-gradient(ellipse ${s.w}px ${s.h}px at ${p} ${m}, rgba(${b}, ${o}), transparent)`}).join(`,
|
|
26
|
+
`)}function _(t){return`
|
|
27
|
+
[data-beam="${t}"][data-paused],
|
|
28
|
+
[data-beam="${t}"][data-paused]::after,
|
|
29
|
+
[data-beam="${t}"][data-paused]::before,
|
|
30
|
+
[data-beam="${t}"][data-paused] [data-beam-bloom] {
|
|
31
|
+
animation-play-state: paused !important;
|
|
32
|
+
}`}function He(t){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(s=>`@property --${s}-${t} {
|
|
33
|
+
syntax: "<number>";
|
|
34
|
+
initial-value: 1;
|
|
35
|
+
inherits: true;
|
|
36
|
+
}`).join(`
|
|
37
|
+
|
|
38
|
+
`),o=a.map(s=>`@property --${s}-${t} {
|
|
39
|
+
syntax: "<length>";
|
|
40
|
+
initial-value: 0px;
|
|
41
|
+
inherits: true;
|
|
42
|
+
}`).join(`
|
|
43
|
+
|
|
44
|
+
`);return`${r}
|
|
45
|
+
|
|
46
|
+
${o}
|
|
47
|
+
|
|
48
|
+
@property --beam-opacity-${t} {
|
|
49
|
+
syntax: "<number>";
|
|
50
|
+
initial-value: 0;
|
|
51
|
+
inherits: true;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@property --beam-hue-${t} {
|
|
55
|
+
syntax: "<angle>";
|
|
56
|
+
initial-value: 0deg;
|
|
57
|
+
inherits: true;
|
|
58
|
+
}`}function be(t,e,a){const r=e==="dark",o=a/2.3;return t==="pulse-inner"?{sp:.28,dr:r?33:40,op:r?.48:.45,gh:r?.34:.22,bs:(r?1.9:2.6)*o,ss:(r?2.6:4.6)*o,ghs:(r?2.4:5.5)*o,huePeriod:12}:{sp:r?.28:.36,dr:r?14:19,op:r?.46:0,gh:r?.16:.58,bs:(r?2.3:3.7)*o,ss:(r?6.4:4.6)*o,ghs:(r?2.4:3.8)*o,huePeriod:8}}function Ke(t,e){const{sp:a,dr:r,op:o,gh:s,bs:n,ss:c,ghs:f}=e;return[{prop:`--bw1-${t}`,a:1-a,b:1+a*1.1,period:c*.9,delay:0,unit:""},{prop:`--bh1-${t}`,a:1+a*.9,b:1-a*.85,period:c*1.26,delay:0,unit:""},{prop:`--bx1-${t}`,a:-r,b:r*.9,period:n*1.6,delay:0,unit:"px"},{prop:`--by1-${t}`,a:r*.55,b:-r*.7,period:n*1.6,delay:0,unit:"px"},{prop:`--bw2-${t}`,a:1+a,b:1-a*.85,period:c*1.1,delay:0,unit:""},{prop:`--bh2-${t}`,a:1-a*.8,b:1+a*1.05,period:c*.81,delay:0,unit:""},{prop:`--bx2-${t}`,a:r*.8,b:-r*.9,period:n*1.88,delay:0,unit:"px"},{prop:`--by2-${t}`,a:-r,b:r*.65,period:n*1.88,delay:0,unit:"px"},{prop:`--bw3-${t}`,a:1-a*.6,b:1+a*1.15,period:c*.98,delay:0,unit:""},{prop:`--bh3-${t}`,a:1+a*.75,b:1-a,period:c*1.4,delay:0,unit:""},{prop:`--bx3-${t}`,a:-r*.6,b:r,period:n*1.45,delay:0,unit:"px"},{prop:`--by3-${t}`,a:-r*.85,b:r*.45,period:n*1.45,delay:0,unit:"px"},{prop:`--bgh-${t}`,a:1-s,b:1+s,period:f,delay:0,unit:""},{prop:`--bop-tl-${t}`,a:1-o,b:1,period:n,delay:0,unit:""},{prop:`--bop-tr-${t}`,a:1-o,b:1,period:n*1.32,delay:n*.28,unit:""},{prop:`--bop-bl-${t}`,a:1-o,b:1,period:n*.84,delay:n*.55,unit:""},{prop:`--bop-br-${t}`,a:1-o,b:1,period:n*1.58,delay:n*.83,unit:""}]}function Qe(t,e,a,r,o,s){if(t!=="pulse-inner"&&t!=="pulse-outside")return null;const n=be(t,e,a);return{oscillators:Ke(s,n),hue:o?null:{prop:`--beam-hue-${s}`,range:r,period:n.huePeriod}}}function Q(t,e,a){return` animation: ${e}-${t} ${a}s ease forwards;`}function Ze(t){const{size:e}=t;return e==="line"?ta(t):e==="sm"?Je(t):e==="pulse-inner"?aa(t):e==="pulse-outside"?ra(t):ea(t)}function Je(t){const{id:e,borderRadius:a,borderWidth:r,duration:o,strokeOpacity:s,innerOpacity:n,bloomOpacity:c,innerShadow:f,colorVariant:p,staticColors:m,brightness:i,saturation:b,hueRange:l,theme:w}=t,d=Math.max(0,a-r),g=p==="mono"?.5:1,W=s*g,O=n*g,y=c*g,X=m?"":`animation: beam-hue-shift-${e} 12s ease-in-out infinite;`,x=m?"":`
|
|
38
59
|
@keyframes beam-hue-shift-${e} {
|
|
39
|
-
0% { filter: hue-rotate(-${l}deg) brightness(${i.toFixed(2)}) saturate(${
|
|
40
|
-
50% { filter: hue-rotate(${l}deg) brightness(${i.toFixed(2)}) saturate(${
|
|
41
|
-
100% { filter: hue-rotate(-${l}deg) brightness(${i.toFixed(2)}) saturate(${
|
|
42
|
-
}`,w
|
|
60
|
+
0% { filter: hue-rotate(-${l}deg) brightness(${i.toFixed(2)}) saturate(${b.toFixed(2)}); }
|
|
61
|
+
50% { filter: hue-rotate(${l}deg) brightness(${i.toFixed(2)}) saturate(${b.toFixed(2)}); }
|
|
62
|
+
100% { filter: hue-rotate(-${l}deg) brightness(${i.toFixed(2)}) saturate(${b.toFixed(2)}); }
|
|
63
|
+
}`,H=w==="dark",k=H?`conic-gradient(
|
|
43
64
|
from var(--beam-angle-${e}),
|
|
44
65
|
transparent 0%, transparent 54%,
|
|
45
66
|
rgba(255, 255, 255, 0.1) 57%,
|
|
@@ -61,7 +82,7 @@
|
|
|
61
82
|
rgba(0, 0, 0, 0.2) 72%,
|
|
62
83
|
rgba(0, 0, 0, 0.08) 75%,
|
|
63
84
|
transparent 78%, transparent 100%
|
|
64
|
-
)`,
|
|
85
|
+
)`,u=Me(p),Y=qe(p),h=H?`conic-gradient(
|
|
65
86
|
from var(--beam-angle-${e}),
|
|
66
87
|
transparent 0%, transparent 58%,
|
|
67
88
|
rgba(255, 255, 255, 0.03) 62%,
|
|
@@ -89,7 +110,7 @@
|
|
|
89
110
|
rgba(0, 0, 0, 0.08) 75%,
|
|
90
111
|
rgba(0, 0, 0, 0.02) 78%,
|
|
91
112
|
transparent 82%
|
|
92
|
-
)
|
|
113
|
+
)`,$=`conic-gradient(
|
|
93
114
|
from var(--beam-angle-${e}),
|
|
94
115
|
transparent 0%, transparent 22%,
|
|
95
116
|
rgba(255, 255, 255, 0.12) 28%, rgba(255, 255, 255, 0.4) 36%,
|
|
@@ -132,10 +153,10 @@
|
|
|
132
153
|
content: "";
|
|
133
154
|
position: absolute;
|
|
134
155
|
inset: 0;
|
|
135
|
-
border-radius: ${
|
|
136
|
-
padding: ${
|
|
156
|
+
border-radius: ${d}px;
|
|
157
|
+
padding: ${r}px;
|
|
137
158
|
clip-path: inset(0 round ${a}px);
|
|
138
|
-
background: ${
|
|
159
|
+
background: ${k},${u};
|
|
139
160
|
-webkit-mask:
|
|
140
161
|
conic-gradient(
|
|
141
162
|
from var(--beam-angle-${e}),
|
|
@@ -162,8 +183,8 @@
|
|
|
162
183
|
mask-composite: intersect, exclude;
|
|
163
184
|
pointer-events: none;
|
|
164
185
|
z-index: 2;
|
|
165
|
-
opacity: calc(var(--beam-opacity-${e}) * ${
|
|
166
|
-
${
|
|
186
|
+
opacity: calc(var(--beam-opacity-${e}) * ${W.toFixed(2)} * var(--beam-strength, 1));
|
|
187
|
+
${X}
|
|
167
188
|
}
|
|
168
189
|
|
|
169
190
|
[data-beam="${e}"][data-active]::before,
|
|
@@ -174,30 +195,30 @@
|
|
|
174
195
|
border-radius: ${a}px;
|
|
175
196
|
clip-path: inset(0 round ${a}px);
|
|
176
197
|
background: ${Y};
|
|
177
|
-
box-shadow: inset 0 0 5px 1px ${
|
|
178
|
-
-webkit-mask-image: ${
|
|
198
|
+
box-shadow: inset 0 0 5px 1px ${f};
|
|
199
|
+
-webkit-mask-image: ${$};
|
|
179
200
|
-webkit-mask-composite: source-over;
|
|
180
|
-
mask-image: ${
|
|
201
|
+
mask-image: ${$};
|
|
181
202
|
mask-composite: add;
|
|
182
203
|
pointer-events: none;
|
|
183
204
|
z-index: 1;
|
|
184
|
-
opacity: calc(var(--beam-opacity-${e}) * ${
|
|
185
|
-
${
|
|
205
|
+
opacity: calc(var(--beam-opacity-${e}) * ${O.toFixed(2)} * var(--beam-strength, 1));
|
|
206
|
+
${X}
|
|
186
207
|
}
|
|
187
208
|
|
|
188
209
|
[data-beam="${e}"] [data-beam-bloom] {
|
|
189
210
|
display: none;
|
|
190
211
|
position: absolute;
|
|
191
212
|
inset: 0;
|
|
192
|
-
border-radius: ${
|
|
213
|
+
border-radius: ${d}px;
|
|
193
214
|
clip-path: inset(0 round ${a}px);
|
|
194
|
-
background: ${
|
|
215
|
+
background: ${h};
|
|
195
216
|
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
196
217
|
-webkit-mask-composite: xor;
|
|
197
218
|
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
198
219
|
mask-composite: exclude;
|
|
199
|
-
padding: ${
|
|
200
|
-
filter: blur(8px) brightness(${i.toFixed(2)}) saturate(${
|
|
220
|
+
padding: ${r}px;
|
|
221
|
+
filter: blur(8px) brightness(${i.toFixed(2)}) saturate(${b.toFixed(2)});
|
|
201
222
|
pointer-events: none;
|
|
202
223
|
z-index: 3;
|
|
203
224
|
opacity: 0;
|
|
@@ -206,7 +227,7 @@
|
|
|
206
227
|
[data-beam="${e}"][data-active] [data-beam-bloom],
|
|
207
228
|
[data-beam="${e}"][data-fading] [data-beam-bloom] {
|
|
208
229
|
display: block;
|
|
209
|
-
opacity: calc(var(--beam-opacity-${e}) * ${
|
|
230
|
+
opacity: calc(var(--beam-opacity-${e}) * ${y.toFixed(2)} * var(--beam-strength, 1));
|
|
210
231
|
}
|
|
211
232
|
|
|
212
233
|
@keyframes beam-spin-${e} {
|
|
@@ -221,13 +242,14 @@
|
|
|
221
242
|
from { --beam-opacity-${e}: 1; }
|
|
222
243
|
to { --beam-opacity-${e}: 0; }
|
|
223
244
|
}
|
|
224
|
-
${
|
|
225
|
-
|
|
245
|
+
${x}
|
|
246
|
+
${_(e)}
|
|
247
|
+
`}function ea(t){const{id:e,borderRadius:a,borderWidth:r,duration:o,strokeOpacity:s,innerOpacity:n,bloomOpacity:c,innerShadow:f,colorVariant:p,staticColors:m,brightness:i,saturation:b,hueRange:l,theme:w}=t,d=Math.max(0,a-r),g=p==="mono"?.5:1,W=s*g,O=n*g,y=c*g,X=m?"":`animation: beam-hue-shift-${e} 12s ease-in-out infinite;`,x=m?"":`
|
|
226
248
|
@keyframes beam-hue-shift-${e} {
|
|
227
|
-
0% { filter: hue-rotate(-${l}deg) brightness(${i.toFixed(2)}) saturate(${
|
|
228
|
-
50% { filter: hue-rotate(${l}deg) brightness(${i.toFixed(2)}) saturate(${
|
|
229
|
-
100% { filter: hue-rotate(-${l}deg) brightness(${i.toFixed(2)}) saturate(${
|
|
230
|
-
}`,w
|
|
249
|
+
0% { filter: hue-rotate(-${l}deg) brightness(${i.toFixed(2)}) saturate(${b.toFixed(2)}); }
|
|
250
|
+
50% { filter: hue-rotate(${l}deg) brightness(${i.toFixed(2)}) saturate(${b.toFixed(2)}); }
|
|
251
|
+
100% { filter: hue-rotate(-${l}deg) brightness(${i.toFixed(2)}) saturate(${b.toFixed(2)}); }
|
|
252
|
+
}`,H=w==="dark",k=H?`conic-gradient(
|
|
231
253
|
from var(--beam-angle-${e}),
|
|
232
254
|
transparent 0%, transparent 54%,
|
|
233
255
|
rgba(255, 255, 255, 0.1) 57%,
|
|
@@ -249,7 +271,7 @@ ${y}
|
|
|
249
271
|
rgba(0, 0, 0, 0.2) 72%,
|
|
250
272
|
rgba(0, 0, 0, 0.08) 75%,
|
|
251
273
|
transparent 78%, transparent 100%
|
|
252
|
-
)`,
|
|
274
|
+
)`,u=Ce(p),Y=Ge(p),h=H?`conic-gradient(
|
|
253
275
|
from var(--beam-angle-${e}),
|
|
254
276
|
transparent 0%, transparent 58%,
|
|
255
277
|
rgba(255, 255, 255, 0.03) 62%,
|
|
@@ -313,10 +335,10 @@ ${y}
|
|
|
313
335
|
content: "";
|
|
314
336
|
position: absolute;
|
|
315
337
|
inset: 0;
|
|
316
|
-
border-radius: ${
|
|
317
|
-
padding: ${
|
|
338
|
+
border-radius: ${d}px;
|
|
339
|
+
padding: ${r}px;
|
|
318
340
|
clip-path: inset(0 round ${a}px);
|
|
319
|
-
background: ${
|
|
341
|
+
background: ${k},${u};
|
|
320
342
|
-webkit-mask:
|
|
321
343
|
conic-gradient(
|
|
322
344
|
from var(--beam-angle-${e}),
|
|
@@ -343,8 +365,8 @@ ${y}
|
|
|
343
365
|
mask-composite: intersect, exclude;
|
|
344
366
|
pointer-events: none;
|
|
345
367
|
z-index: 2;
|
|
346
|
-
opacity: calc(var(--beam-opacity-${e}) * ${
|
|
347
|
-
${
|
|
368
|
+
opacity: calc(var(--beam-opacity-${e}) * ${W.toFixed(2)} * var(--beam-strength, 1));
|
|
369
|
+
${X}
|
|
348
370
|
}
|
|
349
371
|
|
|
350
372
|
[data-beam="${e}"][data-active]::before,
|
|
@@ -354,7 +376,7 @@ ${y}
|
|
|
354
376
|
inset: 0;
|
|
355
377
|
border-radius: ${a}px;
|
|
356
378
|
background: ${Y};
|
|
357
|
-
box-shadow: inset 0 0 9px 1px ${
|
|
379
|
+
box-shadow: inset 0 0 9px 1px ${f};
|
|
358
380
|
-webkit-mask-image:
|
|
359
381
|
conic-gradient(
|
|
360
382
|
from var(--beam-angle-${e}),
|
|
@@ -381,24 +403,24 @@ ${y}
|
|
|
381
403
|
mask-composite: intersect, add;
|
|
382
404
|
pointer-events: none;
|
|
383
405
|
z-index: 1;
|
|
384
|
-
opacity: calc(var(--beam-opacity-${e}) * ${
|
|
406
|
+
opacity: calc(var(--beam-opacity-${e}) * ${O.toFixed(2)} * var(--beam-strength, 1));
|
|
385
407
|
clip-path: inset(0 round ${a}px);
|
|
386
|
-
${
|
|
408
|
+
${X}
|
|
387
409
|
}
|
|
388
410
|
|
|
389
411
|
[data-beam="${e}"] [data-beam-bloom] {
|
|
390
412
|
display: none;
|
|
391
413
|
position: absolute;
|
|
392
414
|
inset: 0;
|
|
393
|
-
border-radius: ${
|
|
415
|
+
border-radius: ${d}px;
|
|
394
416
|
clip-path: inset(0 round ${a}px);
|
|
395
|
-
background: ${
|
|
417
|
+
background: ${h};
|
|
396
418
|
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
397
419
|
-webkit-mask-composite: xor;
|
|
398
420
|
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
399
421
|
mask-composite: exclude;
|
|
400
|
-
padding: ${
|
|
401
|
-
filter: blur(8px) brightness(${i.toFixed(2)}) saturate(${
|
|
422
|
+
padding: ${r}px;
|
|
423
|
+
filter: blur(8px) brightness(${i.toFixed(2)}) saturate(${b.toFixed(2)});
|
|
402
424
|
pointer-events: none;
|
|
403
425
|
z-index: 3;
|
|
404
426
|
opacity: 0;
|
|
@@ -407,7 +429,7 @@ ${y}
|
|
|
407
429
|
[data-beam="${e}"][data-active] [data-beam-bloom],
|
|
408
430
|
[data-beam="${e}"][data-fading] [data-beam-bloom] {
|
|
409
431
|
display: block;
|
|
410
|
-
opacity: calc(var(--beam-opacity-${e}) * ${
|
|
432
|
+
opacity: calc(var(--beam-opacity-${e}) * ${y.toFixed(2)} * var(--beam-strength, 1));
|
|
411
433
|
}
|
|
412
434
|
|
|
413
435
|
@keyframes beam-spin-${e} {
|
|
@@ -422,19 +444,230 @@ ${y}
|
|
|
422
444
|
from { --beam-opacity-${e}: 1; }
|
|
423
445
|
to { --beam-opacity-${e}: 0; }
|
|
424
446
|
}
|
|
425
|
-
${
|
|
426
|
-
|
|
447
|
+
${x}
|
|
448
|
+
${_(e)}
|
|
449
|
+
`}function aa(t){const{id:e,borderRadius:a,borderWidth:r,duration:o,strokeOpacity:s,innerOpacity:n,bloomOpacity:c,colorVariant:f,staticColors:p,brightness:m,saturation:i,hueRange:b,theme:l}=t,w=l==="dark",d=f==="mono"?.5:1,g=(s*d).toFixed(2),W=(n*d).toFixed(2),O=(c*d).toFixed(2),{op:y}=be("pulse-inner",l,o),X=8,x=m.toFixed(2),H=i.toFixed(2),k=p?`filter: brightness(${x}) saturate(${H});`:`filter: hue-rotate(var(--beam-hue-${e})) brightness(${x}) saturate(${H});`,u=`filter: blur(${X}px) brightness(${x}) saturate(${H});`,Y=De(f,e),h=Ue(f,e,w),$=We(Te,f,1-y*.5);return`
|
|
450
|
+
${He(e)}
|
|
451
|
+
|
|
452
|
+
[data-beam="${e}"] {
|
|
453
|
+
position: relative;
|
|
454
|
+
border-radius: ${a}px;
|
|
455
|
+
overflow: hidden;
|
|
456
|
+
isolation: isolate;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
[data-beam="${e}"][data-active] {
|
|
460
|
+
${Q(e,"beam-fade-in",.6)}
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
[data-beam="${e}"][data-fading] {
|
|
464
|
+
${Q(e,"beam-fade-out",.5)}
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
[data-beam="${e}"][data-active]::after,
|
|
468
|
+
[data-beam="${e}"][data-fading]::after {
|
|
469
|
+
content: "";
|
|
470
|
+
position: absolute;
|
|
471
|
+
inset: 0;
|
|
472
|
+
border-radius: ${a}px;
|
|
473
|
+
padding: ${r}px;
|
|
474
|
+
clip-path: inset(0 round ${a}px);
|
|
475
|
+
background: ${Y};
|
|
476
|
+
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
477
|
+
-webkit-mask-composite: xor;
|
|
478
|
+
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
479
|
+
mask-composite: exclude;
|
|
480
|
+
pointer-events: none;
|
|
481
|
+
z-index: 2;
|
|
482
|
+
will-change: opacity, filter;
|
|
483
|
+
opacity: calc(var(--beam-opacity-${e}) * ${g} * var(--beam-strength, 1));
|
|
484
|
+
${k}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
[data-beam="${e}"][data-active]::before,
|
|
488
|
+
[data-beam="${e}"][data-fading]::before {
|
|
489
|
+
content: "";
|
|
490
|
+
position: absolute;
|
|
491
|
+
inset: 0;
|
|
492
|
+
border-radius: ${a}px;
|
|
493
|
+
clip-path: inset(0 round ${a}px);
|
|
494
|
+
background: ${h};
|
|
495
|
+
-webkit-mask-image:
|
|
496
|
+
linear-gradient(white, transparent 28px, transparent calc(100% - 28px), white),
|
|
497
|
+
linear-gradient(to right, white, transparent 28px, transparent calc(100% - 28px), white);
|
|
498
|
+
-webkit-mask-composite: source-over;
|
|
499
|
+
mask-image:
|
|
500
|
+
linear-gradient(white, transparent 28px, transparent calc(100% - 28px), white),
|
|
501
|
+
linear-gradient(to right, white, transparent 28px, transparent calc(100% - 28px), white);
|
|
502
|
+
mask-composite: add;
|
|
503
|
+
pointer-events: none;
|
|
504
|
+
z-index: 1;
|
|
505
|
+
will-change: opacity, filter;
|
|
506
|
+
opacity: calc(var(--beam-opacity-${e}) * ${W} * var(--beam-strength, 1));
|
|
507
|
+
${k}
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
[data-beam="${e}"] [data-beam-bloom] {
|
|
511
|
+
display: none;
|
|
512
|
+
position: absolute;
|
|
513
|
+
inset: 0;
|
|
514
|
+
border-radius: ${a}px;
|
|
515
|
+
clip-path: inset(0 round ${a}px);
|
|
516
|
+
background: ${$};
|
|
517
|
+
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
518
|
+
-webkit-mask-composite: xor;
|
|
519
|
+
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
520
|
+
mask-composite: exclude;
|
|
521
|
+
padding: ${r}px;
|
|
522
|
+
pointer-events: none;
|
|
523
|
+
z-index: 3;
|
|
524
|
+
will-change: opacity;
|
|
525
|
+
opacity: 0;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
[data-beam="${e}"][data-active] [data-beam-bloom],
|
|
529
|
+
[data-beam="${e}"][data-fading] [data-beam-bloom] {
|
|
530
|
+
display: block;
|
|
531
|
+
opacity: calc(var(--beam-opacity-${e}) * ${O} * var(--beam-strength, 1));
|
|
532
|
+
${u}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
@keyframes beam-fade-in-${e} { to { --beam-opacity-${e}: 1; } }
|
|
536
|
+
@keyframes beam-fade-out-${e} { from { --beam-opacity-${e}: 1; } to { --beam-opacity-${e}: 0; } }
|
|
537
|
+
${_(e)}
|
|
538
|
+
|
|
539
|
+
@media (prefers-reduced-motion: reduce) {
|
|
540
|
+
[data-beam="${e}"][data-active],
|
|
541
|
+
[data-beam="${e}"][data-fading],
|
|
542
|
+
[data-beam="${e}"][data-active]::after,
|
|
543
|
+
[data-beam="${e}"][data-fading]::after,
|
|
544
|
+
[data-beam="${e}"][data-active]::before,
|
|
545
|
+
[data-beam="${e}"][data-fading]::before,
|
|
546
|
+
[data-beam="${e}"][data-active] [data-beam-bloom],
|
|
547
|
+
[data-beam="${e}"][data-fading] [data-beam-bloom] {
|
|
548
|
+
animation: none !important;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
`}function ra(t){const{id:e,borderRadius:a,duration:r,strokeOpacity:o,innerOpacity:s,bloomOpacity:n,colorVariant:c,staticColors:f,brightness:p,saturation:m,hueRange:i,theme:b,hairlineOpacity:l=0}=t,w=b==="dark",d=c==="mono"?.5:1,g=(o*d).toFixed(2),W=(s*d).toFixed(2),O=(n*d).toFixed(2),y=w?"70, 70, 70":"0, 0, 0",X=l.toFixed(2),x=`linear-gradient(rgba(${y}, ${X}), rgba(${y}, ${X}))`,{op:H}=be("pulse-outside",b,r),k=.95,u=.9,Y=w?3:6,h=w?22.5:15,$=p.toFixed(2),R=m.toFixed(2),J=f?`filter: brightness(${$}) saturate(${R});`:`filter: hue-rotate(var(--beam-hue-${e})) brightness(${$}) saturate(${R});`,ee=f?`filter: blur(${Y}px) brightness(${$}) saturate(${R});`:`filter: blur(${Y}px) hue-rotate(var(--beam-hue-${e})) brightness(${$}) saturate(${R});`,ae=`filter: blur(${h}px) brightness(${$}) saturate(${R});`,B=ze(he,c,e),A=ze(he,c,e),re=We(Ne,c,1-H*.5),M=l>0?`${B},
|
|
552
|
+
${x}`:B;return`
|
|
553
|
+
${He(e)}
|
|
554
|
+
|
|
555
|
+
[data-beam="${e}"] {
|
|
556
|
+
position: relative;
|
|
557
|
+
border-radius: ${a}px;
|
|
558
|
+
overflow: visible;
|
|
559
|
+
isolation: isolate;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
[data-beam="${e}"][data-active] {
|
|
563
|
+
${Q(e,"beam-fade-in",.6)}
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
[data-beam="${e}"][data-fading] {
|
|
567
|
+
${Q(e,"beam-fade-out",.5)}
|
|
568
|
+
}
|
|
569
|
+
${l>0?`
|
|
570
|
+
/* Idle hairline — painted above the (opaque) child in the inner 1px edge ring so
|
|
571
|
+
it overlaps a standard inset component border exactly. */
|
|
572
|
+
[data-beam="${e}"]::after {
|
|
573
|
+
content: "";
|
|
574
|
+
position: absolute;
|
|
575
|
+
inset: 0;
|
|
576
|
+
border-radius: ${a}px;
|
|
577
|
+
padding: 1px;
|
|
578
|
+
clip-path: inset(0 round ${a}px);
|
|
579
|
+
background: ${x};
|
|
580
|
+
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
581
|
+
-webkit-mask-composite: xor;
|
|
582
|
+
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
583
|
+
mask-composite: exclude;
|
|
584
|
+
pointer-events: none;
|
|
585
|
+
z-index: 2;
|
|
586
|
+
}
|
|
587
|
+
`:""}
|
|
588
|
+
[data-beam="${e}"][data-active]::after,
|
|
589
|
+
[data-beam="${e}"][data-fading]::after {
|
|
590
|
+
content: "";
|
|
591
|
+
position: absolute;
|
|
592
|
+
inset: 0;
|
|
593
|
+
border-radius: ${a}px;
|
|
594
|
+
padding: 1px;
|
|
595
|
+
clip-path: inset(0 round ${a}px);
|
|
596
|
+
background: ${M};
|
|
597
|
+
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
598
|
+
-webkit-mask-composite: xor;
|
|
599
|
+
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
600
|
+
mask-composite: exclude;
|
|
601
|
+
pointer-events: none;
|
|
602
|
+
z-index: 2;
|
|
603
|
+
will-change: opacity, filter;
|
|
604
|
+
opacity: calc(var(--beam-opacity-${e}) * ${g} * var(--beam-strength, 1));
|
|
605
|
+
${J}
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
[data-beam="${e}"][data-active]::before,
|
|
609
|
+
[data-beam="${e}"][data-fading]::before {
|
|
610
|
+
content: "";
|
|
611
|
+
position: absolute;
|
|
612
|
+
inset: -10px;
|
|
613
|
+
z-index: -1;
|
|
614
|
+
border-radius: ${a+10}px;
|
|
615
|
+
background: ${A};
|
|
616
|
+
transform: scale(${k}, ${u});
|
|
617
|
+
pointer-events: none;
|
|
618
|
+
will-change: opacity, filter;
|
|
619
|
+
opacity: calc(var(--beam-opacity-${e}) * ${W} * var(--beam-strength, 1));
|
|
620
|
+
${ee}
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
[data-beam="${e}"] [data-beam-bloom] {
|
|
624
|
+
display: none;
|
|
625
|
+
position: absolute;
|
|
626
|
+
inset: -30px;
|
|
627
|
+
z-index: -1;
|
|
628
|
+
border-radius: ${a+30}px;
|
|
629
|
+
background: ${re};
|
|
630
|
+
transform: scale(${k}, ${u});
|
|
631
|
+
pointer-events: none;
|
|
632
|
+
will-change: transform;
|
|
633
|
+
opacity: 0;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
[data-beam="${e}"][data-active] [data-beam-bloom],
|
|
637
|
+
[data-beam="${e}"][data-fading] [data-beam-bloom] {
|
|
638
|
+
display: block;
|
|
639
|
+
opacity: calc(var(--beam-opacity-${e}) * ${O} * var(--beam-strength, 1));
|
|
640
|
+
${ae}
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
@keyframes beam-fade-in-${e} { to { --beam-opacity-${e}: 1; } }
|
|
644
|
+
@keyframes beam-fade-out-${e} { from { --beam-opacity-${e}: 1; } to { --beam-opacity-${e}: 0; } }
|
|
645
|
+
${_(e)}
|
|
646
|
+
|
|
647
|
+
@media (prefers-reduced-motion: reduce) {
|
|
648
|
+
[data-beam="${e}"][data-active],
|
|
649
|
+
[data-beam="${e}"][data-fading],
|
|
650
|
+
[data-beam="${e}"][data-active]::after,
|
|
651
|
+
[data-beam="${e}"][data-fading]::after,
|
|
652
|
+
[data-beam="${e}"][data-active]::before,
|
|
653
|
+
[data-beam="${e}"][data-fading]::before,
|
|
654
|
+
[data-beam="${e}"][data-active] [data-beam-bloom],
|
|
655
|
+
[data-beam="${e}"][data-fading] [data-beam-bloom] {
|
|
656
|
+
animation: none !important;
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
`}function ta(t){const{id:e,borderRadius:a,borderWidth:r,duration:o,strokeOpacity:s,innerOpacity:n,bloomOpacity:c,innerShadow:f,colorVariant:p,staticColors:m,brightness:i,saturation:b,hueRange:l,theme:w}=t,d=Math.max(0,a-r),g=w==="dark",W=s,O=n,y=c,X=m?"":`animation: beam-hue-shift-${e} 12s ease-in-out infinite;`,x=m?"":`animation: beam-hue-shift-bloom-${e} 8s ease-in-out infinite;`,H=m?"":`
|
|
427
660
|
@keyframes beam-hue-shift-${e} {
|
|
428
|
-
0% { filter: hue-rotate(-${l}deg) brightness(${i.toFixed(2)}) saturate(${
|
|
429
|
-
50% { filter: hue-rotate(${l}deg) brightness(${i.toFixed(2)}) saturate(${
|
|
430
|
-
100% { filter: hue-rotate(-${l}deg) brightness(${i.toFixed(2)}) saturate(${
|
|
661
|
+
0% { filter: hue-rotate(-${l}deg) brightness(${i.toFixed(2)}) saturate(${b.toFixed(2)}); }
|
|
662
|
+
50% { filter: hue-rotate(${l}deg) brightness(${i.toFixed(2)}) saturate(${b.toFixed(2)}); }
|
|
663
|
+
100% { filter: hue-rotate(-${l}deg) brightness(${i.toFixed(2)}) saturate(${b.toFixed(2)}); }
|
|
431
664
|
}
|
|
432
665
|
|
|
433
666
|
@keyframes beam-hue-shift-bloom-${e} {
|
|
434
|
-
0% { filter: blur(8px) hue-rotate(-${l+10}deg) brightness(${i.toFixed(2)}) saturate(${
|
|
435
|
-
50% { filter: blur(8px) hue-rotate(${l+10}deg) brightness(${i.toFixed(2)}) saturate(${
|
|
436
|
-
100% { filter: blur(8px) hue-rotate(-${l+10}deg) brightness(${i.toFixed(2)}) saturate(${
|
|
437
|
-
}`,
|
|
667
|
+
0% { filter: blur(8px) hue-rotate(-${l+10}deg) brightness(${i.toFixed(2)}) saturate(${b.toFixed(2)}); }
|
|
668
|
+
50% { filter: blur(8px) hue-rotate(${l+10}deg) brightness(${i.toFixed(2)}) saturate(${b.toFixed(2)}); }
|
|
669
|
+
100% { filter: blur(8px) hue-rotate(-${l+10}deg) brightness(${i.toFixed(2)}) saturate(${b.toFixed(2)}); }
|
|
670
|
+
}`,k=g?`radial-gradient(
|
|
438
671
|
ellipse calc(24px * var(--beam-w-${e})) calc(28px * var(--beam-h-${e})) at calc(var(--beam-x-${e}) * 100%) calc(100% + 2px),
|
|
439
672
|
rgba(255, 255, 255, 0.38) 0%,
|
|
440
673
|
rgba(255, 255, 255, 0.12) 30%,
|
|
@@ -444,7 +677,7 @@ ${y}
|
|
|
444
677
|
rgba(0, 0, 0, 0.6) 0%,
|
|
445
678
|
rgba(0, 0, 0, 0.25) 35%,
|
|
446
679
|
transparent 70%
|
|
447
|
-
)`,
|
|
680
|
+
)`,u=Ee(p,g,e),Y=Le(p,e),h=Ae(p,g,e),$=p==="mono"?"filter: blur(6px);":"";return`
|
|
448
681
|
@property --beam-x-${e} {
|
|
449
682
|
syntax: "<number>";
|
|
450
683
|
initial-value: 0;
|
|
@@ -518,10 +751,10 @@ ${y}
|
|
|
518
751
|
content: "";
|
|
519
752
|
position: absolute;
|
|
520
753
|
inset: 0;
|
|
521
|
-
border-radius: ${
|
|
522
|
-
padding: ${
|
|
754
|
+
border-radius: ${d}px;
|
|
755
|
+
padding: ${r}px;
|
|
523
756
|
clip-path: inset(0 round ${a}px);
|
|
524
|
-
background: ${
|
|
757
|
+
background: ${k}, ${u};
|
|
525
758
|
-webkit-mask:
|
|
526
759
|
radial-gradient(
|
|
527
760
|
ellipse calc(78px * var(--beam-w-${e})) calc(60px * var(--beam-h-${e})) at calc(var(--beam-x-${e}) * 100%) 100%,
|
|
@@ -540,8 +773,8 @@ ${y}
|
|
|
540
773
|
mask-composite: intersect, exclude;
|
|
541
774
|
pointer-events: none;
|
|
542
775
|
z-index: 2;
|
|
543
|
-
opacity: calc(var(--beam-opacity-${e}) * var(--beam-edge-${e}) * ${
|
|
544
|
-
${
|
|
776
|
+
opacity: calc(var(--beam-opacity-${e}) * var(--beam-edge-${e}) * ${W.toFixed(2)} * var(--beam-strength, 1));
|
|
777
|
+
${X}
|
|
545
778
|
}
|
|
546
779
|
|
|
547
780
|
[data-beam="${e}"][data-active]::before,
|
|
@@ -551,7 +784,7 @@ ${y}
|
|
|
551
784
|
inset: 0;
|
|
552
785
|
border-radius: ${a}px;
|
|
553
786
|
background: ${Y};
|
|
554
|
-
box-shadow: inset 0 0 9px 1px ${
|
|
787
|
+
box-shadow: inset 0 0 9px 1px ${f};
|
|
555
788
|
-webkit-mask-image:
|
|
556
789
|
radial-gradient(
|
|
557
790
|
ellipse calc(78px * var(--beam-w-${e})) calc(60px * var(--beam-h-${e})) at calc(var(--beam-x-${e}) * 100%) 100%,
|
|
@@ -570,16 +803,16 @@ ${y}
|
|
|
570
803
|
mask-composite: intersect, add;
|
|
571
804
|
pointer-events: none;
|
|
572
805
|
z-index: 1;
|
|
573
|
-
opacity: calc(var(--beam-opacity-${e}) * var(--beam-edge-${e}) * ${
|
|
806
|
+
opacity: calc(var(--beam-opacity-${e}) * var(--beam-edge-${e}) * ${O.toFixed(2)} * var(--beam-strength, 1));
|
|
574
807
|
clip-path: inset(0 round ${a}px);
|
|
575
|
-
${
|
|
808
|
+
${X}
|
|
576
809
|
}
|
|
577
810
|
|
|
578
811
|
[data-beam="${e}"] [data-beam-bloom] {
|
|
579
812
|
display: none;
|
|
580
813
|
position: absolute;
|
|
581
814
|
inset: 0;
|
|
582
|
-
border-radius: ${
|
|
815
|
+
border-radius: ${d}px;
|
|
583
816
|
clip-path: inset(0 round ${a}px);
|
|
584
817
|
padding: 0;
|
|
585
818
|
-webkit-mask: radial-gradient(
|
|
@@ -592,7 +825,8 @@ ${y}
|
|
|
592
825
|
white 0%, rgba(255, 255, 255, 0.5) 35%, transparent 100%
|
|
593
826
|
);
|
|
594
827
|
mask-composite: add;
|
|
595
|
-
background: ${
|
|
828
|
+
background: ${h};
|
|
829
|
+
${$}
|
|
596
830
|
pointer-events: none;
|
|
597
831
|
z-index: 3;
|
|
598
832
|
opacity: 0;
|
|
@@ -601,8 +835,8 @@ ${y}
|
|
|
601
835
|
[data-beam="${e}"][data-active] [data-beam-bloom],
|
|
602
836
|
[data-beam="${e}"][data-fading] [data-beam-bloom] {
|
|
603
837
|
display: block;
|
|
604
|
-
opacity: calc(var(--beam-opacity-${e}) * var(--beam-edge-${e}) * ${
|
|
605
|
-
${
|
|
838
|
+
opacity: calc(var(--beam-opacity-${e}) * var(--beam-edge-${e}) * ${y.toFixed(2)} * var(--beam-strength, 1));
|
|
839
|
+
${x}
|
|
606
840
|
}
|
|
607
841
|
|
|
608
842
|
@keyframes beam-travel-${e} {
|
|
@@ -659,5 +893,6 @@ ${y}
|
|
|
659
893
|
from { --beam-opacity-${e}: 1; }
|
|
660
894
|
to { --beam-opacity-${e}: 0; }
|
|
661
895
|
}
|
|
662
|
-
${
|
|
663
|
-
|
|
896
|
+
${H}
|
|
897
|
+
${_(e)}
|
|
898
|
+
`}const Z=new Set;let E=null,ce=0;const oa=1e3/30-2,sa=Math.PI*2;function ye(t){return(1-Math.cos(sa*t))/2}function Xe(t){if(E=requestAnimationFrame(Xe),t-ce<oa)return;ce=t;const e=t/1e3;Z.forEach(({el:a,config:r})=>{for(const o of r.oscillators){const s=(e-o.delay)/o.period,n=o.a+(o.b-o.a)*ye(s);a.style.setProperty(o.prop,o.unit==="px"?`${n.toFixed(2)}px`:n.toFixed(4))}if(r.hue){const{prop:o,range:s,period:n}=r.hue,c=-s+2*s*ye(e/n);a.style.setProperty(o,`${c.toFixed(2)}deg`)}})}function ia(){E==null&&(ce=0,E=requestAnimationFrame(Xe))}function na(){Z.size===0&&E!=null&&(cancelAnimationFrame(E),E=null)}function ca(t,e){const a={el:t,config:e};return Z.add(a),ia(),()=>{Z.delete(a),na()}}function pa(){const[t,e]=v.useState(()=>typeof window>"u"||window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");return v.useEffect(()=>{if(typeof window>"u")return;const a=window.matchMedia("(prefers-color-scheme: dark)"),r=o=>{e(o.matches?"dark":"light")};return a.addEventListener("change",r),()=>a.removeEventListener("change",r)},[]),t}function ba(t,e){return t==="auto"?e:t}const Ye=v.forwardRef(function({children:e,size:a="md",colorVariant:r="colorful",theme:o="dark",staticColors:s=!1,duration:n,active:c=!0,borderRadius:f,brightness:p,saturation:m,hueRange:i=30,strength:b=1,className:l,style:w,onActivate:d,onDeactivate:g,onAnimationEnd:W,...O},y){const x=v.useId().replace(/:/g,"-"),H=pa(),k=v.useRef(null),[u,Y]=v.useState(c),[h,$]=v.useState(!1),[R,J]=v.useState(!0),[ee,ae]=v.useState(null),[B,A]=v.useState({x:1,y:1});v.useEffect(()=>{if(f!=null)return;const z=k.current;if(!z)return;const S=()=>{const I=z.firstElementChild;if(!I)return;const ie=getComputedStyle(I),P=parseFloat(ie.borderTopLeftRadius);!isNaN(P)&&P>0&&ae(P)};S();const G=new MutationObserver(S);return G.observe(z,{childList:!0,subtree:!1}),()=>G.disconnect()},[f,e]),v.useEffect(()=>{c&&!u&&!h?Y(!0):!c&&u&&!h&&$(!0)},[c,u,h]),v.useEffect(()=>{const z=k.current;if(!z||typeof IntersectionObserver>"u")return;const S=new IntersectionObserver(G=>{for(const I of G)J(I.isIntersecting)},{rootMargin:"256px"});return S.observe(z),()=>S.disconnect()},[]),v.useEffect(()=>{if(a!=="pulse-outside"){A({x:1,y:1});return}const z=k.current;if(!z)return;const S=350,G=140,I=.35,ie=4,P=V=>Math.max(I,Math.min(ie,V)),ge=()=>{const V=z.firstElementChild;if(!V)return;const D=V.getBoundingClientRect();if(!D.width||!D.height)return;const xe=+P(D.width/S).toFixed(3),ue=+P(D.height/G).toFixed(3);A(ne=>ne.x===xe&&ne.y===ue?ne:{x:xe,y:ue})};if(ge(),typeof ResizeObserver>"u")return;const me=z.firstElementChild;if(!me)return;const $e=new ResizeObserver(ge);return $e.observe(me),()=>$e.disconnect()},[a,e]);const re=v.useCallback(z=>{const S=z.animationName;S.includes("fade-out")?(Y(!1),$(!1),g==null||g()):S.includes("fade-in")&&(d==null||d()),W==null||W(z)},[d,g,W]),M=ba(o,H),F=K[a][M],te=ke[a],oe=a==="pulse-inner"||a==="pulse-outside",le=f??ee??te.borderRadius,j=n??(a==="line"?3.1:oe?2.3:1.96),fe=m??F.saturation,de=p??F.brightness??1.3,T=a==="line"?Math.min(i,13):i,N=r==="mono"?!0:s,Oe=v.useMemo(()=>Ze({id:x,borderRadius:le,borderWidth:te.borderWidth,duration:j,strokeOpacity:F.strokeOpacity,innerOpacity:F.innerOpacity,bloomOpacity:F.bloomOpacity,innerShadow:F.innerShadow,size:a,colorVariant:r,staticColors:N,brightness:de,saturation:fe,hueRange:T,theme:M,hairlineOpacity:F.hairlineOpacity}),[x,le,te.borderWidth,j,F.strokeOpacity,F.innerOpacity,F.bloomOpacity,F.innerShadow,F.hairlineOpacity,a,r,N,de,fe,T,M]),se=v.useMemo(()=>oe?Qe(a,M,j,T,N,x):null,[oe,a,M,j,T,N,x]);v.useEffect(()=>{var S;if(!se||!(u||h)||!R)return;const z=k.current;if(z&&!(typeof window<"u"&&((S=window.matchMedia)!=null&&S.call(window,"(prefers-reduced-motion: reduce)").matches)))return ca(z,se)},[se,u,h,R]);const Se=v.useCallback(z=>{k.current=z,typeof y=="function"?y(z):y&&(y.current=z)},[y]),Fe={...w??{},"--beam-strength":Math.max(0,Math.min(1,b)),...a==="pulse-outside"?{"--pulse-glow-sx":B.x,"--pulse-glow-sy":B.y}:{}};return L.jsxs(L.Fragment,{children:[L.jsx("style",{children:Oe}),L.jsxs("div",{...O,ref:Se,"data-beam":x,"data-active":u&&!h?"":void 0,"data-fading":h?"":void 0,"data-paused":u&&!h&&!R?"":void 0,className:l,style:Fe,onAnimationEnd:re,children:[e,L.jsx("div",{"data-beam-bloom":!0})]})]})});exports.BorderBeam=Ye;exports.default=Ye;exports.sizePresets=ke;exports.sizeThemePresets=K;exports.themeColors=Re;
|