@gradient-ui/core 0.4.0 → 0.5.0-rc.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 +58 -2
- package/dist/GLoading.vue_vue_type_style_index_0_lang-Bv3dWEq8.cjs +1 -0
- package/dist/GLoading.vue_vue_type_style_index_0_lang-CBB_GocW.js +466 -0
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-BS6bb1XY.cjs +1 -0
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-UTBNFP5X.js +7015 -0
- package/dist/{default-585QCoXx.js → camelToKebabCase-6qY6WHvl.js} +987 -1194
- package/dist/camelToKebabCase-BQDotaQm.cjs +316 -0
- package/dist/components.cjs +1 -1
- package/dist/components.mjs +56 -53
- package/dist/default-BhuY-A3o.cjs +4 -0
- package/dist/default-OTmCd0Aq.js +131 -0
- package/dist/directives.cjs +1 -1
- package/dist/directives.mjs +6 -5
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +183 -113
- package/dist/mask-BbofdFd4.cjs +1 -0
- package/dist/mask-CZX-I_iy.js +936 -0
- package/dist/material-Ca7ZZAiO.cjs +194 -0
- package/dist/material-okvXHenb.js +1162 -0
- package/dist/materialSurface-BBrP9ltj.js +591 -0
- package/dist/materialSurface-CK8LN_dU.cjs +1 -0
- package/dist/services.cjs +1 -1
- package/dist/services.mjs +1 -1
- package/dist/style.css +1 -1
- package/dist/surface-8z3gR7vF.cjs +1 -0
- package/dist/surface-BKu4KfkY.js +288 -0
- package/dist/theme.cjs +1 -1
- package/dist/theme.mjs +55 -9
- package/dist/types/components/index.d.ts +3 -1
- package/dist/types/components/ui/BaseOverlay/BaseOverlay.vue.d.ts +1 -1
- package/dist/types/components/ui/GAlert/GAlert.vue.d.ts +675 -9
- package/dist/types/components/ui/GAlert/types.d.ts +352 -4
- package/dist/types/components/ui/GAside/GAside.vue.d.ts +7 -5
- package/dist/types/components/ui/GAside/types.d.ts +17 -6
- package/dist/types/components/ui/GBadge/GBadge.vue.d.ts +679 -13
- package/dist/types/components/ui/GBadge/types.d.ts +350 -3
- package/dist/types/components/ui/GButton/GButton.vue.d.ts +295 -25
- package/dist/types/components/ui/GButton/types.d.ts +194 -49
- package/dist/types/components/ui/GCheckControl/GCheckControl.vue.d.ts +24 -24
- package/dist/types/components/ui/GCheckControl/GCheckGroup.vue.d.ts +24 -24
- package/dist/types/components/ui/GCheckbox/GCheckbox.vue.d.ts +24 -24
- package/dist/types/components/ui/GChip/GChip.vue.d.ts +295 -25
- package/dist/types/components/ui/GChip/types.d.ts +188 -43
- package/dist/types/components/ui/GDrawer/GDrawer.vue.d.ts +1 -1
- package/dist/types/components/ui/GExpansion/GExpansion.vue.d.ts +47 -13
- package/dist/types/components/ui/GExpansion/types.d.ts +284 -22
- package/dist/types/components/ui/GFAB/GFAB.vue.d.ts +220 -7
- package/dist/types/components/ui/GFAB/types.d.ts +122 -3
- package/dist/types/components/ui/GFieldBase/GFieldBase.vue.d.ts +15 -15
- package/dist/types/components/ui/GFieldBase/props.d.ts +10 -10
- package/dist/types/components/ui/GForm/GForm.vue.d.ts +156 -0
- package/dist/types/components/ui/GForm/index.d.ts +2 -0
- package/dist/types/components/ui/GForm/types.d.ts +107 -0
- package/dist/types/components/ui/GGradient/GGradient.vue.d.ts +165 -66
- package/dist/types/components/ui/GGradient/GGradientBorderLayer.vue.d.ts +11 -0
- package/dist/types/components/ui/GGradient/index.d.ts +1 -0
- package/dist/types/components/ui/GGradient/types.d.ts +10 -1
- package/dist/types/components/ui/GGradientMaterial/GGradientMaterial.vue.d.ts +257 -0
- package/dist/types/components/ui/GGradientMaterial/index.d.ts +2 -0
- package/dist/types/components/ui/GGradientMaterial/types.d.ts +140 -0
- package/dist/types/components/ui/GInput/GInput.vue.d.ts +15 -15
- package/dist/types/components/ui/GLoading/GLoading.vue.d.ts +5 -5
- package/dist/types/components/ui/GLoading/types.d.ts +3 -2
- package/dist/types/components/ui/GMenu/GSubmenu.vue.d.ts +14 -14
- package/dist/types/components/ui/GMenuItem/GMenuItem.vue.d.ts +11 -11
- package/dist/types/components/ui/GMenuItem/types.d.ts +4 -4
- package/dist/types/components/ui/GModal/GModal.vue.d.ts +1 -1
- package/dist/types/components/ui/GNavList/GNavList.vue.d.ts +7 -5
- package/dist/types/components/ui/GNavList/types.d.ts +17 -6
- package/dist/types/components/ui/GNavbar/GNavbar.vue.d.ts +4 -4
- package/dist/types/components/ui/GNavbar/types.d.ts +6 -6
- package/dist/types/components/ui/GProgress/GProgress.vue.d.ts +41 -20
- package/dist/types/components/ui/GProgress/types.d.ts +23 -10
- package/dist/types/components/ui/GQuickActions/GQuickActions.vue.d.ts +1 -1
- package/dist/types/components/ui/GSelectItem.vue.d.ts +5 -3
- package/dist/types/components/ui/GSnackbar/GSnackbar.vue.d.ts +681 -15
- package/dist/types/components/ui/GSnackbar/types.d.ts +350 -3
- package/dist/types/components/ui/GSquircle/GSquircle.vue.d.ts +2 -2
- package/dist/types/components/ui/GSquircle/types.d.ts +8 -2
- package/dist/types/components/ui/GSwitch/GSwitch.vue.d.ts +24 -24
- package/dist/types/components/ui/GTable/GTable.vue.d.ts +51 -3
- package/dist/types/components/ui/GTable/types.d.ts +351 -3
- package/dist/types/components/ui/GTabs/GTabs.vue.d.ts +4 -4
- package/dist/types/components/ui/GTabs/types.d.ts +6 -6
- package/dist/types/components/ui/GTextarea/GTextarea.vue.d.ts +15 -15
- package/dist/types/components/ui/GToggleButton/GToggleButton.vue.d.ts +490 -16
- package/dist/types/components/ui/GToggleButton/types.d.ts +284 -32
- package/dist/types/directives/index.d.ts +2 -0
- package/dist/types/directives/ripple.d.ts +1 -1
- package/dist/types/directives/specular.d.ts +34 -0
- package/dist/types/theme/color.d.ts +11 -0
- package/dist/types/theme/colorSeeds.d.ts +21 -20
- package/dist/types/theme/colorSystem.d.ts +12 -0
- package/dist/types/theme/cssTokens.d.ts +7 -0
- package/dist/types/theme/default.d.ts +26 -80
- package/dist/types/theme/gradient/animation/css.d.ts +12 -0
- package/dist/types/theme/gradient/animation/index.d.ts +1 -0
- package/dist/types/theme/gradient/colorMath.d.ts +3 -0
- package/dist/types/theme/gradient/constants.d.ts +3 -0
- package/dist/types/theme/gradient/core.d.ts +1 -0
- package/dist/types/theme/gradient/effects/index.d.ts +1 -0
- package/dist/types/theme/gradient/effects/morph.d.ts +5 -0
- package/dist/types/theme/gradient/effects/shadow.d.ts +3 -0
- package/dist/types/theme/gradient/formatters/canvas.d.ts +2 -0
- package/dist/types/theme/gradient/formatters/css.d.ts +3 -0
- package/dist/types/theme/gradient/formatters/index.d.ts +1 -0
- package/dist/types/theme/gradient/formatters/svg.d.ts +5 -0
- package/dist/types/theme/gradient/index.d.ts +1 -0
- package/dist/types/theme/gradient/material.d.ts +1 -0
- package/dist/types/theme/gradient/model.d.ts +5 -0
- package/dist/types/theme/gradient/presets.d.ts +158 -0
- package/dist/types/theme/gradient/recipes.d.ts +14 -0
- package/dist/types/theme/gradient/tokens.d.ts +72 -0
- package/dist/types/theme/gradient/types.d.ts +117 -0
- package/dist/types/theme/gradient/utils.d.ts +10 -0
- package/dist/types/theme/gradient.d.ts +1 -0
- package/dist/types/theme/index.d.ts +12 -1
- package/dist/types/theme/palette.d.ts +13 -0
- package/dist/types/theme/scheme.d.ts +2 -0
- package/dist/types/theme/types.d.ts +11 -0
- package/dist/types/use/actionSurface.d.ts +1742 -20
- package/dist/types/use/check/booleanControl.d.ts +9 -9
- package/dist/types/use/check/optionGroup.d.ts +9 -7
- package/dist/types/use/check/types.d.ts +26 -26
- package/dist/types/use/color.d.ts +2 -2
- package/dist/types/use/colorResolver.d.ts +15 -5
- package/dist/types/use/form/context.d.ts +8 -0
- package/dist/types/use/form/control.d.ts +4 -0
- package/dist/types/use/form/props.d.ts +4 -4
- package/dist/types/use/form/textFieldControl.d.ts +1 -1
- package/dist/types/use/glass.d.ts +24 -0
- package/dist/types/use/gradient.d.ts +1759 -43
- package/dist/types/use/gradientGlow.d.ts +4 -4
- package/dist/types/use/gradientMaterial.d.ts +21 -0
- package/dist/types/use/gradientRuntime.d.ts +11 -0
- package/dist/types/use/gradientRuntimeRegistry.d.ts +8 -0
- package/dist/types/use/gradientSurface.d.ts +31 -4
- package/dist/types/use/index.d.ts +8 -0
- package/dist/types/use/input/props.d.ts +11 -11
- package/dist/types/use/material.d.ts +112 -0
- package/dist/types/use/materialSurface.d.ts +376 -0
- package/dist/types/use/surface.d.ts +67 -19
- package/dist/types/use/surfaceColor.d.ts +1 -1
- package/dist/types/use/textarea/props.d.ts +11 -11
- package/dist/types/use/variant.d.ts +1 -1
- package/dist/use.cjs +1 -1
- package/dist/use.mjs +42 -22
- package/dist/useSnackbar-BHQshEZ8.cjs +1 -0
- package/dist/useSnackbar-DeNHZH8v.js +908 -0
- package/package.json +11 -4
- package/dist/GLoading.vue_vue_type_style_index_0_lang-CPzo3WD3.js +0 -680
- package/dist/GLoading.vue_vue_type_style_index_0_lang-cokm-HBh.cjs +0 -1
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-BmbKqNgm.js +0 -6421
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-By_7hZOW.cjs +0 -4
- package/dist/camelToKebabCase-BAESShJ1.cjs +0 -1
- package/dist/camelToKebabCase-KgkZ7-1F.js +0 -28
- package/dist/default-BcPApP1Q.cjs +0 -318
- package/dist/mask-Bu8cjwwH.js +0 -817
- package/dist/mask-D1vJj5Hl.cjs +0 -1
- package/dist/propsFactory-DyyboUaC.cjs +0 -1
- package/dist/propsFactory-UhcvubZJ.js +0 -13
- package/dist/tagName-CYG1CUfd.js +0 -103
- package/dist/tagName-CbsvFHGg.cjs +0 -1
- package/dist/types/theme/changeTone.d.ts +0 -1
- package/dist/types/theme/colorPallete.d.ts +0 -2
- package/dist/types/theme/generateColors.d.ts +0 -1
- package/dist/types/theme/generateGradient.d.ts +0 -9
- package/dist/types/theme/getComplementaryColor.d.ts +0 -1
- package/dist/types/utils/color.d.ts +0 -3
- package/dist/types/utils/colors/normaliseColor.d.ts +0 -5
- package/dist/useSnackbar-2iJU4bdd.js +0 -769
- package/dist/useSnackbar-3QuH25xm.cjs +0 -1
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
"use strict";const p=require("./camelToKebabCase-BQDotaQm.cjs"),V=(t,e=0,r=1)=>Math.min(r,Math.max(e,t)),St=t=>{const e=t.slice(1),r=e.length===3||e.length===4?e.slice(0,3).split("").map(a=>a.repeat(2)).join(""):e.slice(0,6);return r.length!==6||!/^[\da-f]{6}$/i.test(r)?null:{r:parseInt(r.slice(0,2),16),g:parseInt(r.slice(2,4),16),b:parseInt(r.slice(4,6),16)}},wt=t=>{const e=t.match(/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*[\d.]+%?)?\s*\)$/i);return e?{r:V(Number(e[1]),0,255),g:V(Number(e[2]),0,255),b:V(Number(e[3]),0,255)}:null},D=t=>{if(typeof t=="number"){const r=t&16777215;return{r:r>>16&255,g:r>>8&255,b:r&255}}const e=t.trim();return e.startsWith("#")?St(e):e.toLowerCase().startsWith("rgb")?wt(e):null},vt=({r:t,g:e,b:r})=>`#${[t,e,r].map(a=>Math.round(a).toString(16).padStart(2,"0")).join("")}`,Mt=({r:t,g:e,b:r})=>`${Math.round(t)}, ${Math.round(e)}, ${Math.round(r)}`,kt=(t,e)=>{const r=D(t)??D(e);if(!r)throw new Error(`Invalid fallback color: ${e}`);return vt(r)},j=135,F="center",rt="farthest-corner",at=(t=j)=>typeof t=="number"?`${t}deg`:t,M=t=>typeof t=="number"?`${t}px`:t,_=t=>typeof t=="number"?`${t}ms`:t,v=(t,e=0,r=1)=>Math.min(r,Math.max(e,t)),C=(t,e)=>{if(e===void 0)return t;const r=D(t);return r?`rgb(${Mt(r).replace(/,/g,"")} / ${v(e)})`:t},z=({color:t,opacity:e,position:r})=>`${C(t,e)} ${r}%`,c=(t,e,r)=>({color:t,position:e}),nt=t=>{if(t.length<=1)return t;const e=t.map(a=>({...a,position:a.position/2})),r=[...t].reverse().map(a=>({...a,position:100-a.position/2}));return[...e,...r]},Ct=t=>`@keyframes ${t} {
|
|
2
|
+
0% {
|
|
3
|
+
background-position: 0% 50%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
50% {
|
|
7
|
+
background-position: 100% 50%;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
100% {
|
|
11
|
+
background-position: 0% 50%;
|
|
12
|
+
}
|
|
13
|
+
}`,Gt=t=>`@keyframes ${t} {
|
|
14
|
+
0%, 100% {
|
|
15
|
+
filter: saturate(1) brightness(1);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
50% {
|
|
19
|
+
filter: saturate(1.22) brightness(1.08);
|
|
20
|
+
}
|
|
21
|
+
}`,Tt=t=>`@keyframes ${t} {
|
|
22
|
+
0%, 100% {
|
|
23
|
+
filter: hue-rotate(0deg) saturate(1);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
50% {
|
|
27
|
+
filter: hue-rotate(28deg) saturate(1.18);
|
|
28
|
+
}
|
|
29
|
+
}`,Nt=t=>`@keyframes ${t} {
|
|
30
|
+
from {
|
|
31
|
+
transform: translate(-50%, -50%) rotate(0deg);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
to {
|
|
35
|
+
transform: translate(-50%, -50%) rotate(360deg);
|
|
36
|
+
}
|
|
37
|
+
}`,P=(t={})=>{const e=t.name??"g-gradient-shift",r=_(t.duration??6e3),a=t.easing??"ease-in-out",o=t.selector??".g-gradient-animated",n=t.preset??"shift";return{duration:r,easing:a,name:e,preset:n,selector:o}},R=(t={})=>{const{name:e,preset:r}=P(t);return r==="pulse"?Gt(e):r==="hue-rotate"?Tt(e):r==="rotate"?Nt(e):Ct(e)},ot=(t={})=>{const{duration:e,easing:r,name:a,preset:o}=P(t);return`${a} ${e} ${o==="rotate"?"linear":r} infinite`},it=(t={})=>{const{duration:e,easing:r,name:a,preset:o,selector:n}=P(t);return o==="rotate"?`${n} {
|
|
38
|
+
position: relative;
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
${n}::before {
|
|
43
|
+
content: '';
|
|
44
|
+
position: absolute;
|
|
45
|
+
top: 50%;
|
|
46
|
+
left: 50%;
|
|
47
|
+
width: 200%;
|
|
48
|
+
height: 200%;
|
|
49
|
+
min-width: 150vmax;
|
|
50
|
+
min-height: 150vmax;
|
|
51
|
+
background: inherit;
|
|
52
|
+
animation: ${a} ${e} linear infinite;
|
|
53
|
+
transform-origin: center;
|
|
54
|
+
}`:o==="pulse"||o==="hue-rotate"?`${n} {
|
|
55
|
+
animation: ${a} ${e} ${r} infinite;
|
|
56
|
+
}`:`${n} {
|
|
57
|
+
animation: ${a} ${e} ${r} infinite;
|
|
58
|
+
background-size: 220% 220%;
|
|
59
|
+
}`},st=(t={})=>{const e=R(t),r=it(t);return`${e}
|
|
60
|
+
${r}`},Ot=Object.freeze(Object.defineProperty({__proto__:null,getGradientAnimationOptions:P,toGradientAnimationCSS:st,toGradientAnimationKeyframes:R,toGradientAnimationStyles:it,toGradientAnimationValue:ot},Symbol.toStringTag,{value:"Module"})),At=[50,100,200,300,400,500,600,700,800,900],jt={50:90,100:80,200:70,300:60,400:50,500:40,600:35,700:30,800:20,900:10},_t=t=>{const e=kt(t,"#000000");return p.themeFromSourceColor(p.argbFromHex(e)).palettes.primary},B=t=>{const e=_t(t);return Object.fromEntries(At.map(r=>[r,p.hexFromArgb(e.tone(jt[r]))]))},ct=(t,e=j)=>`linear-gradient(${at(e)}, ${t.join(", ")})`,E=t=>{const e=t.stops.map(z).join(", ");if(t.type==="radial"){const r=t.shape??"ellipse",a=t.size??rt,o=t.position??F;return`radial-gradient(${r} ${a} at ${o}, ${e})`}if(t.type==="conic"){const r=at(t.direction),a=t.position??F,o=nt(t.stops).map(z).join(", ");return`conic-gradient(from ${r} at ${a}, ${o})`}return ct(t.stops.map(z),t.direction)},$=(t,e)=>{const r=p.Hct.fromInt(p.argbFromHex(t));return p.hexFromArgb(p.Hct.from(r.hue,r.chroma,e).toInt())},u=(t,e,r,a=1)=>{const o=p.Hct.fromInt(p.argbFromHex(t)),n=(o.hue+e+360)%360,i=Math.min(o.chroma*a,100);return p.hexFromArgb(p.Hct.from(n,i,r).toInt())},G=t=>{const e=p.Hct.fromInt(p.argbFromHex(t)),r=(e.hue+110)%360,a=Math.min(e.chroma*1.2,100),o=e.tone<50?65:Math.min(e.tone+10,75);return p.hexFromArgb(p.Hct.from(r,a,o).toInt())},Pt=t=>{const e=G(t);return[c($(e,95),0),c(e,25),c(t,50),c($(t,80),75),c($(t,20),100)]},Bt=t=>[c($(t,94),0),c($(t,72),28),c(t,55),c($(t,24),100)],Et=t=>[c($(G(t),88),0),c(t,50),c($(G(t),32),100)],It=t=>[c(u(t,148,82,.95),0),c(u(t,-148,70,1.05),28),c(t,56),c(u(t,150,34,1.08),100)],Vt=t=>[c(u(t,-34,72,.95),0),c(t,50),c(u(t,34,34,1.05),100)],zt=t=>[c(u(t,-120,78,.9),0),c(t,50),c(u(t,120,36,1.05),100)],Dt=t=>[c(u(t,-90,78,.92),0),c(t,32),c(u(t,90,62,1),58),c(u(t,180,34,1.08),100)],Ft=t=>[c(u(t,-28,82,.96),0),c(t,27),c(u(t,152,66,1.02),62),c(u(t,180,34,1.08),100)],Ht=t=>[c(u(t,-90,78,.94),0),c(t,30),c(u(t,90,62,1),62),c(u(t,180,36,1.08),100)],Rt=(t,e)=>{const r=(e==null?void 0:e[0])??$(t,84),a=(e==null?void 0:e[1])??G(t);return[c(r,0),c(t,48),c(a,100)]},dt={glare:Pt,monochrome:Bt,complementary:Et,"split-complementary":It,analogous:Vt,triadic:zt,tetradic:Dt,rectangle:Ft,square:Ht,duotone:Rt},lt=(t,e,r)=>dt[e](t,r),I=(t,e={})=>{const r=e.shade??500,a=e.recipe??"glare";return{type:e.type??"linear",stops:lt(t[r],a,e.colors),direction:e.direction??j,shape:e.shape??"ellipse",position:e.position??F,size:e.size??rt}},Lt=(t,e={})=>I(B(t),e),b=t=>t,gt=t=>t,A=gt({materialBorder:b({label:"Material border",description:"Default Gradient UI border material.",gradient:{recipe:"glare",type:"linear",direction:135},shadow:{layers:2,opacity:.22,blur:12,y:4,spread:-3},dropShadow:{layers:2,opacity:.32,blur:12,y:5},animation:{preset:"shift",duration:6400,easing:"ease-in-out"}}),materialAction:b({label:"Material action",description:"Compact action material for buttons, chips and controls.",gradient:{recipe:"glare",type:"linear",direction:135},shadow:{layers:2,opacity:.2,blur:10,y:3,spread:-2},dropShadow:{layers:2,opacity:.28,blur:10,y:4},animation:{preset:"shift",duration:6800,easing:"ease-in-out"}}),materialSurface:b({label:"Material surface",description:"Soft surface material for calm gradient backgrounds.",gradient:{recipe:"monochrome",type:"linear",direction:145},shadow:{layers:2,opacity:.18,blur:14,y:5,spread:-3},dropShadow:{layers:2,opacity:.22,blur:14,y:5},animation:{preset:"pulse",duration:7600,easing:"ease-in-out"}}),brandGlare:b({label:"Brand glare",description:"Classic Gradient UI glare with a vivid complementary highlight.",gradient:{recipe:"glare",type:"linear",direction:135},shadow:{layers:2,opacity:.24,blur:16,y:6,spread:-3},dropShadow:{layers:3,opacity:.38,blur:16,y:6},animation:{preset:"shift",duration:6e3,easing:"ease-in-out"}}),softMono:b({label:"Soft mono",description:"Quiet monochrome ramp for subtle surfaces.",gradient:{recipe:"monochrome",type:"linear",direction:145},shadow:{layers:2,opacity:.18,blur:18,y:7,spread:-4},dropShadow:{layers:2,opacity:.26,blur:16,y:6},animation:{preset:"pulse",duration:7200,easing:"ease-in-out"}}),neonDuo:b({label:"Neon duo",description:"Punchy duotone setup with stronger glow defaults.",gradient:{recipe:"duotone",type:"linear",direction:120},shadow:{layers:2,opacity:.32,blur:18,y:7,spread:-3},dropShadow:{layers:3,opacity:.52,blur:18,y:7},animation:{preset:"shift",duration:5200,easing:"ease-in-out"}}),orbitalConic:b({label:"Orbital conic",description:"Smooth mirrored conic gradient for badges and marks.",gradient:{recipe:"triadic",type:"conic",direction:35,position:"center"},shadow:{layers:2,opacity:.24,blur:16,y:6,spread:-3},dropShadow:{layers:3,opacity:.36,blur:16,y:6},animation:{preset:"rotate",duration:9e3}}),auroraRadial:b({label:"Aurora radial",description:"Radial analogous gradient with slow hue motion.",gradient:{recipe:"analogous",type:"radial",direction:0,position:"top left",shape:"circle"},shadow:{layers:2,opacity:.22,blur:18,y:7,spread:-4},dropShadow:{layers:3,opacity:.32,blur:18,y:7},animation:{preset:"hue-rotate",duration:8e3,easing:"ease-in-out"}})}),ht=(t,e=A)=>e[t]??A.brandGlare,mt=(t,e={})=>E(I(t,e)),Xt=(t,e={})=>mt(B(t),e),Yt=Object.freeze(Object.defineProperty({__proto__:null,createGradient:mt,createGradientFromColor:Xt,createGradientModel:I,createGradientModelFromColor:Lt,createRecipeStops:lt,defineGradientPreset:b,defineGradientPresetRegistry:gt,getGradientPreset:ht,gradientPresets:A,gradientRecipes:dt},Symbol.toStringTag,{value:"Module"})),Ut="http://www.w3.org/2000/svg",Wt={soft:{blobCount:5,blur:40,contrast:18,duration:12e3,opacity:.76,scale:1.05},liquid:{blobCount:6,blur:46,contrast:22,duration:9200,opacity:.82,scale:1.18},ripple:{blobCount:7,blur:34,contrast:20,duration:7200,opacity:.78,scale:.94}},T=(t={})=>{const e=Wt[t.preset??"soft"];return{blobCount:Math.max(2,Math.round(t.blobCount??e.blobCount)),blur:v(t.blur??e.blur,0,80),contrast:v(t.contrast??e.contrast,0,36),duration:t.duration??e.duration,id:t.id??"g-gradient-morph",opacity:v(t.opacity??e.opacity),scale:v(t.scale??e.scale,.4,2)}},Kt=(t,e)=>{var r,a;return((r=t.stops[e%t.stops.length])==null?void 0:r.color)??((a=t.stops[0])==null?void 0:a.color)??"currentColor"},qt=t=>{if(typeof t=="number")return t;const e=Number.parseFloat(t);return Number.isFinite(e)?e:9e3},Jt=(t,e)=>{const r=Math.sin((t+1)*12.9898+e*78.233)*43758.5453;return r-Math.floor(r)},f=(t,e,r,a)=>r+Jt(t,e)*(a-r),w=t=>Number(t.toFixed(3)),tt=[{animationName:"g-gradient-morph-drift",dx:20,dx2:8,dy:-8,dy2:16,originX:"50%",originY:"50%",scaleMid:1.16,scaleTo:1.04,x:6,y:58},{animationName:"g-gradient-morph-orbit",dx:-18,dx2:10,dy:18,dy2:-10,originX:"24%",originY:"68%",scaleMid:.96,scaleTo:1.12,x:44,y:20},{animationName:"g-gradient-morph-float",dx:-16,dx2:-8,dy:-12,dy2:18,originX:"50%",originY:"50%",scaleMid:1.2,scaleTo:1.08,x:74,y:58},{animationName:"g-gradient-morph-orbit",dx:12,dx2:-20,dy:14,dy2:6,originX:"70%",originY:"30%",scaleMid:1.04,scaleTo:1.18,x:88,y:25},{animationName:"g-gradient-morph-drift",dx:24,dx2:-12,dy:-16,dy2:-8,originX:"50%",originY:"50%",scaleMid:1.12,scaleTo:.98,x:30,y:78},{animationName:"g-gradient-morph-float",dx:-22,dx2:14,dy:10,dy2:-18,originX:"50%",originY:"50%",scaleMid:.94,scaleTo:1.1,x:104,y:82},{animationName:"g-gradient-morph-orbit",dx:14,dx2:-16,dy:-22,dy2:10,originX:"35%",originY:"35%",scaleMid:1.18,scaleTo:1.02,x:55,y:64},{animationName:"g-gradient-morph-drift",dx:-18,dx2:18,dy:-14,dy2:14,originX:"50%",originY:"50%",scaleMid:1.08,scaleTo:.96,x:18,y:24}],L=(t,e={})=>{const{blobCount:r,duration:a,scale:o}=T(e),n=qt(a);return Array.from({length:r},(i,s)=>{const l=tt[s%tt.length],d=f(s,1,.88,1.16),h=f(s,2,.86,1.24),g=f(s,3,.72,1),m=f(s,4,0,4),y=(34+s%4*9)*o*d;return{animationName:l.animationName,blur:w(m),color:Kt(t,s),delay:Math.round(s*-.19*n-f(s,5,0,900)),dx:w(l.dx*f(s,6,.84,1.18)),dx2:w(l.dx2*f(s,7,.82,1.22)),dy:w(l.dy*f(s,8,.84,1.18)),dy2:w(l.dy2*f(s,9,.82,1.22)),duration:Math.round(n*(1+s%3*.11)*h),opacity:w(g),originX:l.originX,originY:l.originY,rotateMid:Math.round(f(s,10,95,165)),rotateTo:Math.round(f(s,11,220,310)),scaleMid:l.scaleMid,scaleTo:l.scaleTo,size:w(y),x:l.x,y:l.y}})},X=(t={})=>`url(#${T(t).id}) blur(${T(t).blur}px)`,ut=(t={})=>{const{blur:e,contrast:r,id:a}=T(t),o=Math.max(2,Math.round(e*.25)),n=-(r*.45),i=r<=0?"":`
|
|
61
|
+
<feColorMatrix in="g-gradient-morph-blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 ${r} ${n}" result="g-gradient-morph-goo" />
|
|
62
|
+
<feBlend in="SourceGraphic" in2="g-gradient-morph-goo" />`;return`<svg xmlns="${Ut}" width="0" height="0" aria-hidden="true" focusable="false" style="position:absolute;overflow:hidden;inline-size:0;block-size:0;">
|
|
63
|
+
<filter id="${a}" x="-30%" y="-30%" width="160%" height="160%" color-interpolation-filters="sRGB">
|
|
64
|
+
<feGaussianBlur in="SourceGraphic" stdDeviation="${o}" result="g-gradient-morph-blur" />${i}
|
|
65
|
+
</filter>
|
|
66
|
+
</svg>`},Zt=(t,e={})=>{const r=e.selector??".g-gradient-morph",{opacity:a}=T(e),o=L(t,e);return`${r} {
|
|
67
|
+
position: relative;
|
|
68
|
+
overflow: hidden;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
${r}__blobs {
|
|
72
|
+
position: absolute;
|
|
73
|
+
inset: -18%;
|
|
74
|
+
opacity: ${a};
|
|
75
|
+
filter: ${X(e)};
|
|
76
|
+
mix-blend-mode: hard-light;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
${r}__blob {
|
|
80
|
+
position: absolute;
|
|
81
|
+
transform: translate(-50%, -50%);
|
|
82
|
+
transform-origin: var(--g-gradient-morph-origin-x) var(--g-gradient-morph-origin-y);
|
|
83
|
+
opacity: var(--g-gradient-morph-opacity);
|
|
84
|
+
filter: blur(var(--g-gradient-morph-blur));
|
|
85
|
+
border-radius: 999px;
|
|
86
|
+
background: radial-gradient(circle, var(--g-gradient-morph-blob-color) 0%, transparent 72%);
|
|
87
|
+
animation: var(--g-gradient-morph-animation) var(--g-gradient-morph-duration, 9000ms) ease-in-out infinite alternate;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
${o.map((n,i)=>`${r}__blob:nth-child(${i+1}) {
|
|
91
|
+
top: ${n.y}%;
|
|
92
|
+
left: ${n.x}%;
|
|
93
|
+
width: ${n.size}%;
|
|
94
|
+
aspect-ratio: 1;
|
|
95
|
+
--g-gradient-morph-blob-color: ${n.color};
|
|
96
|
+
--g-gradient-morph-x: ${n.dx}%;
|
|
97
|
+
--g-gradient-morph-x2: ${n.dx2}%;
|
|
98
|
+
--g-gradient-morph-y: ${n.dy}%;
|
|
99
|
+
--g-gradient-morph-y2: ${n.dy2}%;
|
|
100
|
+
--g-gradient-morph-origin-x: ${n.originX};
|
|
101
|
+
--g-gradient-morph-origin-y: ${n.originY};
|
|
102
|
+
--g-gradient-morph-animation: ${n.animationName};
|
|
103
|
+
--g-gradient-morph-blur: ${n.blur}px;
|
|
104
|
+
--g-gradient-morph-opacity: ${n.opacity};
|
|
105
|
+
--g-gradient-morph-rotate-mid: ${n.rotateMid}deg;
|
|
106
|
+
--g-gradient-morph-rotate-to: ${n.rotateTo}deg;
|
|
107
|
+
--g-gradient-morph-scale-mid: ${n.scaleMid};
|
|
108
|
+
--g-gradient-morph-scale: ${n.scaleTo};
|
|
109
|
+
animation-delay: ${n.delay}ms;
|
|
110
|
+
animation-duration: ${_(n.duration)};
|
|
111
|
+
}`).join(`
|
|
112
|
+
|
|
113
|
+
`)}
|
|
114
|
+
|
|
115
|
+
@keyframes g-gradient-morph-drift {
|
|
116
|
+
0% {
|
|
117
|
+
transform: translate(-50%, -50%) scale(0.92);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
42% {
|
|
121
|
+
transform: translate(calc(-50% + var(--g-gradient-morph-x)), calc(-50% + var(--g-gradient-morph-y))) scale(var(--g-gradient-morph-scale));
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
100% {
|
|
125
|
+
transform: translate(calc(-50% + var(--g-gradient-morph-x2)), calc(-50% + var(--g-gradient-morph-y2))) scale(var(--g-gradient-morph-scale-mid));
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@keyframes g-gradient-morph-float {
|
|
130
|
+
0% {
|
|
131
|
+
transform: translate(-50%, -50%) scale(1);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
50% {
|
|
135
|
+
transform: translate(calc(-50% + var(--g-gradient-morph-x)), calc(-50% + var(--g-gradient-morph-y))) scale(var(--g-gradient-morph-scale-mid));
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
100% {
|
|
139
|
+
transform: translate(calc(-50% + var(--g-gradient-morph-x2)), calc(-50% + var(--g-gradient-morph-y2))) scale(var(--g-gradient-morph-scale));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@keyframes g-gradient-morph-orbit {
|
|
144
|
+
0% {
|
|
145
|
+
transform: translate(-50%, -50%) rotate(0deg) scale(0.96);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
50% {
|
|
149
|
+
transform: translate(calc(-50% + var(--g-gradient-morph-x)), calc(-50% + var(--g-gradient-morph-y))) rotate(var(--g-gradient-morph-rotate-mid)) scale(var(--g-gradient-morph-scale-mid));
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
100% {
|
|
153
|
+
transform: translate(calc(-50% + var(--g-gradient-morph-x2)), calc(-50% + var(--g-gradient-morph-y2))) rotate(var(--g-gradient-morph-rotate-to)) scale(var(--g-gradient-morph-scale));
|
|
154
|
+
}
|
|
155
|
+
}`},pt=(t,e)=>{const r=t.stops.filter(n=>n.position>=25&&n.position<=85),a=t.stops.filter(n=>!r.includes(n));return[...r,...a].sort((n,i)=>Math.abs(n.position-50)-Math.abs(i.position-50)).slice(0,e)},Qt=(t,e)=>t*([1,.54,.3,.18][e]??.12),k=(t,e)=>{const r=String(t).match(/^(-?\d*\.?\d+)(.*)$/);return r?`${Math.round(Number(r[1])*e*1e3)/1e3}${r[2]||"px"}`:null},et=(t,e,r)=>k(t,1/e)??(r===0?M(t):"0px"),te=(t,e)=>k(t,1/Math.sqrt(e))??M(t),yt=(t,e={})=>{var x;const r=e.x??0,a=e.y??6,o=e.blur??14,n=e.spread??-3,i=e.opacity??.24,s=Math.max(1,Math.round(e.layers??2)),l=((x=pt(t,1)[0])==null?void 0:x.color)??"#000000",d=`${M(r)} ${M(a)} ${M(o)} ${M(n)} ${C(l,i)}`;if(s===1)return d;const h=k(r,.35)??"0px",g=k(a,.35)??"2px",m=k(o,.3)??"4px",y=k(n,.5)??"-2px",S=Math.min(.18,i*.65);return`${`${h} ${g} ${m} ${y} ${C("#000000",S)}`}, ${d}`},ft=(t,e={})=>{const r=e.x??0,a=e.y??6,o=e.blur??14,n=e.opacity??.42,i=Math.max(1,Math.round(e.layers??2)),s=te(o,i);return pt(t,i).map((l,d)=>{const h=et(r,i,d),g=et(a,i,d);return`drop-shadow(${h} ${g} ${s} ${C(l.color,Qt(n,d))})`}).join(" ")},ee=Object.freeze(Object.defineProperty({__proto__:null,createGradientMorphBlobs:L,toGradientBoxShadow:yt,toGradientDropShadow:ft,toGradientMorphCSS:Zt,toGradientMorphFilter:X,toGradientMorphFilterMarkup:ut},Symbol.toStringTag,{value:"Module"})),re=(t,e,r={})=>{const a=r.width??t.canvas.width,o=r.height??t.canvas.height,n=a/2,i=o/2,s=Math.hypot(a,o)/2,d=((typeof e.direction=="number"?e.direction:Number.parseFloat(e.direction)||j)-90)*Math.PI/180,h=a/2,g=o/2,m=Math.cos(d)*h,y=Math.sin(d)*g,S=e.type==="radial"?t.createRadialGradient(r.x0??n,r.y0??i,r.r0??0,r.x1??n,r.y1??i,r.r1??s):e.type==="conic"&&typeof t.createConicGradient=="function"?t.createConicGradient(r.startAngle??d,r.x0??n,r.y0??i):t.createLinearGradient(r.x0??n-m,r.y0??i-y,r.x1??n+m,r.y1??i+y),O=e.type==="conic"?nt(e.stops):e.stops;for(const x of O)S.addColorStop(x.position/100,C(x.color,x.opacity));return S},Y="http://www.w3.org/2000/svg",ae="http://www.w3.org/1999/xhtml",N=t=>t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">"),U=t=>{const e=t.opacity===void 0?"":` stop-opacity="${v(t.opacity)}"`;return`<stop offset="${t.position}%" stop-color="${t.color}"${e} />`},ne=(t,e)=>{var r,a,o;return{active:e.activeStroke??((r=t.stops[Math.max(0,Math.floor(t.stops.length/2))])==null?void 0:r.color)??((a=t.stops[0])==null?void 0:a.color)??"currentColor",background:e.backgroundStroke??((o=t.stops[0])==null?void 0:o.color)??e.activeStroke??"currentColor"}},oe=(t,e)=>{var n;const r=(n=t.match(/\bviewBox=(["'])(.*?)\1/i))==null?void 0:n[2];if(r)return r;const a=e.width??240,o=e.height??120;return`0 0 ${a} ${o}`},ie=t=>{var e;return((e=t.replace(/<\?xml[\s\S]*?\?>/gi,"").replace(/<!doctype[\s\S]*?>/gi,"").match(/<svg\b[^>]*>([\s\S]*?)<\/svg>/i))==null?void 0:e[1].trim())??t},se=t=>{const e=t.trim().split(/(?=M\s*[-+.\d])/).map(r=>r.trim()).filter(Boolean);return e.length>1?e:[t]},ce=t=>[...t.matchAll(/<path\b[^>]*\sd=(["'])([\s\S]*?)\1/gi)].flatMap(e=>se(e[2])),$t=t=>{var e;return Math.max(1,((e=t.match(/[LlHhVvCcSsQqTtAaZz]/g))==null?void 0:e.length)??0)},de=(t,e)=>{const a=.5+(1-$t(t)/e)*.22;return Math.round(a*1e3)/1e3},W=t=>{const[e="0",r="0",a="240",o="120"]=t.trim().split(/[\s,]+/);return{height:Number(o)||120,width:Number(a)||240,x:Number(e)||0,y:Number(r)||0}},le=(t,e,r)=>{if(r.viewBoxPadding===!1)return t;const a=W(t),o=Math.max(e*2,Math.min(a.width,a.height)*.02),n=r.viewBoxPadding??o;return[a.x-n,a.y-n,a.width+n*2,a.height+n*2].join(" ")},ge=t=>{const{height:e,width:r}=W(t);return{height:Number(e)||120,width:Number(r)||240}},he=(t,e,r)=>{if(r.normalizeStrokeWidth===!1)return t;const{height:a,width:o}=ge(e),n=r.strokeWidthBase??180;return t*(Math.min(o,a)/n)},K=(t,e={})=>{const r=e.id??"g-gradient",a=t.stops.map(U).join("");return t.type==="radial"?`<radialGradient id="${r}" cx="${e.cx??"50%"}" cy="${e.cy??"50%"}" r="${e.r??"75%"}">${a}</radialGradient>`:t.type==="conic"?`<pattern id="${r}" patternUnits="objectBoundingBox" width="1" height="1"><foreignObject x="0" y="0" width="100%" height="100%"><div xmlns="${ae}" style="width:100%;height:100%;background:${N(E(t))};"></div></foreignObject></pattern>`:`<linearGradient id="${r}" x1="${e.x1??"0%"}" y1="${e.y1??"0%"}" x2="${e.x2??"100%"}" y2="${e.y2??"100%"}">${a}</linearGradient>`},me=(t,e={})=>{const r=e.id??"g-gradient",a=e.width??240,o=e.height??120,n=e.rx??18;return`<svg xmlns="${Y}" viewBox="0 0 ${a} ${o}" role="img">
|
|
156
|
+
<defs>
|
|
157
|
+
${K(t,e)}
|
|
158
|
+
</defs>
|
|
159
|
+
<rect width="${a}" height="${o}" rx="${n}" fill="url(#${r})" />
|
|
160
|
+
</svg>`},ue=(t,e,r={})=>{const o=`${r.id??"g-gradient-source"}-stroke`,n=oe(t,r),i=ie(t),s=ce(t),l=he(r.strokeWidth??1.4,n,r),d=le(n,l,r),{width:h,x:g}=W(d),m=r.linecap??"round",y=_(r.duration??3600),S=r.repeatCount??"indefinite",O=r.sourceOpacity??.22,x=e.stops.map(U).join(""),xt=Math.max(...s.map($t));return`<svg xmlns="${Y}" viewBox="${N(d)}" role="img">
|
|
161
|
+
<defs>
|
|
162
|
+
<linearGradient id="${o}" gradientUnits="userSpaceOnUse" x1="${g}" y1="0" x2="${g+h}" y2="0">
|
|
163
|
+
${x}
|
|
164
|
+
</linearGradient>
|
|
165
|
+
</defs>
|
|
166
|
+
<g opacity="${v(O)}">
|
|
167
|
+
${i}
|
|
168
|
+
</g>
|
|
169
|
+
<g fill="none" stroke="url(#${o})" stroke-width="${l}" stroke-linecap="${m}" stroke-linejoin="round">
|
|
170
|
+
${s.map(Z=>{const Q=de(Z,xt);return`<path d="${N(Z)}" pathLength="100" stroke-dasharray="0 100" stroke-dashoffset="0">
|
|
171
|
+
<animate attributeName="stroke-dasharray" values="0 100;100 100;0 100" keyTimes="0;${Q};1" dur="${y}" repeatCount="${S}" calcMode="linear" />
|
|
172
|
+
<animate attributeName="stroke-dashoffset" values="0;0;-100" keyTimes="0;${Q};1" dur="${y}" repeatCount="${S}" calcMode="linear" />
|
|
173
|
+
</path>`}).join(`
|
|
174
|
+
`)}
|
|
175
|
+
</g>
|
|
176
|
+
</svg>`},pe=(t,e={})=>{const a=`${e.id??"g-gradient-path"}-stroke`,o=e.width??240,n=e.height??120,i=e.path??`M 20 ${n*.64} C ${o*.28} ${n*.18}, ${o*.58} ${n*.18}, ${o-20} ${n*.64}`,s=e.strokeWidth??12,l=e.linecap??"round",d=_(e.duration??2800),h=e.repeatCount??"indefinite",g=e.backgroundOpacity??.24,m=ne(t,e),y=t.stops.map(U).join("");return`<svg xmlns="${Y}" viewBox="0 0 ${o} ${n}" role="img">
|
|
177
|
+
<defs>
|
|
178
|
+
<linearGradient id="${a}" gradientUnits="userSpaceOnUse" x1="0" y1="0" x2="${o}" y2="0">
|
|
179
|
+
${y}
|
|
180
|
+
</linearGradient>
|
|
181
|
+
</defs>
|
|
182
|
+
<path d="${N(i)}" fill="none" stroke="${m.background}" stroke-width="${s}" stroke-linecap="${l}" opacity="${g}" />
|
|
183
|
+
<path d="${N(i)}" fill="none" stroke="${e.activeStroke?m.active:`url(#${a})`}" stroke-width="${s}" stroke-linecap="${l}" pathLength="100" stroke-dasharray="100 100" stroke-dashoffset="100">
|
|
184
|
+
<animate attributeName="stroke-dashoffset" values="100;0;-100" dur="${d}" repeatCount="${h}" />
|
|
185
|
+
</path>
|
|
186
|
+
</svg>`},ye=Object.freeze(Object.defineProperty({__proto__:null,createLinearGradient:ct,toCanvasGradient:re,toCssGradient:E,toSvgGradient:K,toSvgGradientMarkup:me,toSvgPathAnimationMarkup:pe,toSvgSourceAnimationMarkup:ue},Symbol.toStringTag,{value:"Module"})),fe=["glare","soft","mesh"],$e=t=>t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),be=t=>$e(t),xe=(t,e,r)=>`${t}-${e}`,q=t=>Object.entries(t).map(([e,r])=>`${e}: ${r};`).join(`
|
|
187
|
+
`),Se=t=>t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),we=t=>Object.entries(t).map(([e,r])=>`${Se(e)}: ${r};`).join(`
|
|
188
|
+
`),H=t=>t===null||typeof t!="object"?JSON.stringify(t):Array.isArray(t)?`[${t.map(H).join(",")}]`:`{${Object.entries(t).filter(([,e])=>e!==void 0).sort(([e],[r])=>e.localeCompare(r)).map(([e,r])=>`${JSON.stringify(e)}:${H(r)}`).join(",")}}`,ve=t=>{let e=5381;for(let r=0;r<t.length;r+=1)e=e*33^t.charCodeAt(r);return(e>>>0).toString(36)},Me=(t,e,r,a)=>{const o=q(e),n=we(r),i=[o,n].filter(Boolean).join(`
|
|
189
|
+
`);return[`.${t} {
|
|
190
|
+
${i}
|
|
191
|
+
}`,a].filter(Boolean).join(`
|
|
192
|
+
|
|
193
|
+
`)},ke=(t,e)=>t in e,bt=(t,e)=>ke(t,e)?ht(t,e):t==="soft"?{label:"Soft",description:"Quiet monochrome radial gradient.",gradient:{recipe:"monochrome",type:"radial",position:"center",shape:"ellipse"},shadow:{layers:2,opacity:.18,blur:18,y:7,spread:-4},dropShadow:{layers:2,opacity:.26,blur:16,y:6},animation:{preset:"pulse",duration:7200,easing:"ease-in-out"}}:t==="mesh"?null:{label:t,gradient:{recipe:t,type:"linear",direction:t==="glare"?135:145}},Ce=t=>{const e=[`radial-gradient(circle at 16% 18%, ${u(t,-42,72,1.05)} 0%, transparent 34%)`,`radial-gradient(circle at 86% 20%, ${G(t)} 0%, transparent 32%)`,`radial-gradient(circle at 50% 84%, ${u(t,56,64,1.08)} 0%, transparent 38%)`,`linear-gradient(135deg, ${$(t,94)}, ${$(t,28)})`];return{layers:e,value:e.join(", ")}},Ge=(t,e,r,a,o)=>{if(e==="mesh"){const l=Ce(t);return{cssVar:r,layers:l.layers,value:l.value}}const n=bt(e,o),i=B(t),s=I(i,{...n==null?void 0:n.gradient,...a});return{cssVar:r,model:s,stops:s.stops,svg:K(s,{id:r.replace(/^--/,"")}),value:E(s)}},Te=(t,e,r,a)=>{var i;if(!t)return{};const o=`${e.replace(/^--/,"")}-morph`,n={...a==null?void 0:a.morph,id:((i=a==null?void 0:a.morph)==null?void 0:i.id)??o};return{boxShadow:{cssVar:`${e}-shadow`,value:yt(t,(a==null?void 0:a.shadow)??(r==null?void 0:r.shadow))},dropShadow:{cssVar:`${e}-drop-shadow`,value:ft(t,(a==null?void 0:a.dropShadow)??(r==null?void 0:r.dropShadow))},morph:{cssVar:`${e}-morph`,svg:ut(n),value:X(n)}}},Ne=(t,e,r,a)=>{var n;const o={...r==null?void 0:r.animation,...a,name:`g-gradient-${t}-${(a==null?void 0:a.preset)??((n=r==null?void 0:r.animation)==null?void 0:n.preset)??"shift"}`,selector:`.g-gradient-${t}`};return{css:st(o),cssVar:`${e}-animation`,keyframes:R(o),name:o.name,value:ot(o)}},J=(t,e="glare",r={})=>{const a=r.registry??A,o=be(e),n=xe(r.prefix??"--g-gradient",o),i=bt(e,a),l=B(t)[500],d=Ge(l,e,n,r,a),h={[n]:d.value},g=r.effects?Te(d.model,n,i,{dropShadow:r.dropShadow,morph:r.morph,shadow:r.shadow}):void 0,m=r.animations?Ne(o,n,i,r.animation):void 0;return g!=null&&g.boxShadow&&(h[g.boxShadow.cssVar]=g.boxShadow.value),g!=null&&g.dropShadow&&(h[g.dropShadow.cssVar]=g.dropShadow.value),g!=null&&g.morph&&(h[g.morph.cssVar]=g.morph.value),m&&(h[m.cssVar]=m.value),{animation:m,cssText:q(h),cssVars:h,description:i==null?void 0:i.description,effects:g,gradient:d,keyframes:(m==null?void 0:m.keyframes)??"",label:(i==null?void 0:i.label)??o,name:o}},Oe=(t,e={})=>{const r=e.recipes??fe,a={},o={},n={},i={},s=[];for(const l of r){const d=J(t,l,{animations:e.animations,effects:e.effects,morph:e.morph,prefix:e.prefix,registry:e.registry});a[d.name]=d.gradient,Object.assign(i,d.cssVars),d.effects&&(o[d.name]=d.effects),d.animation&&(n[d.name]=d.animation,s.push(d.animation.keyframes))}return{animations:n,cssText:q(i),cssVars:i,effects:o,gradients:a,keyframes:s.join(`
|
|
194
|
+
`)}},Ae=(t,e={})=>{var g,m;const{className:r,id:a,recipe:o="glare",...n}=e,i=J(t,o,n),s=i.gradient.model&&e.effects&&e.morph?L(i.gradient.model,e.morph):void 0,l=a??`g-gradient-${i.name}-${ve(H({options:e,seed:t}))}`,d=r??l,h={backgroundImage:`var(${i.gradient.cssVar})`};return(g=i.effects)!=null&&g.boxShadow&&(h.boxShadow=`var(${i.effects.boxShadow.cssVar})`),(m=i.effects)!=null&&m.dropShadow&&(h.filter=`var(${i.effects.dropShadow.cssVar})`),i.animation&&(h.animation=`var(${i.animation.cssVar})`),{animation:i.animation,className:d,cssText:Me(d,i.cssVars,h,i.keyframes),cssVars:i.cssVars,effects:i.effects,gradient:i.gradient,id:l,keyframes:i.keyframes,morphBlobs:s,preset:i,style:h}},je=Object.freeze(Object.defineProperty({__proto__:null,createGradientMaterial:Ae,createGradientPreset:J,createGradientTokens:Oe},Symbol.toStringTag,{value:"Module"}));exports.core=Yt;exports.index=Ot;exports.index$1=ee;exports.index$2=ye;exports.material=je;
|