@gradeui/ui 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +24 -3
package/dist/index.d.mts
CHANGED
|
@@ -26,13 +26,13 @@ declare const AccordionTrigger: React$1.ForwardRefExoticComponent<Omit<Accordion
|
|
|
26
26
|
declare const AccordionContent: React$1.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
27
27
|
|
|
28
28
|
declare const Alert: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
29
|
-
variant?: "
|
|
29
|
+
variant?: "destructive" | "success" | "warning" | "info" | "highlight" | "default" | null | undefined;
|
|
30
30
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLDivElement>>;
|
|
31
31
|
declare const AlertTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
32
32
|
declare const AlertDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
33
33
|
|
|
34
34
|
declare const badgeVariants: (props?: ({
|
|
35
|
-
variant?: "
|
|
35
|
+
variant?: "secondary" | "destructive" | "success" | "warning" | "info" | "highlight" | "default" | "outline" | "success-soft" | "warning-soft" | "destructive-soft" | "info-soft" | "highlight-soft" | "success-outline" | "warning-outline" | "destructive-outline" | "info-outline" | null | undefined;
|
|
36
36
|
rounded?: "default" | "full" | null | undefined;
|
|
37
37
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
38
38
|
interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
@@ -40,8 +40,8 @@ interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProp
|
|
|
40
40
|
declare function Badge({ className, variant, rounded, ...props }: BadgeProps): React$1.JSX.Element;
|
|
41
41
|
|
|
42
42
|
declare const buttonVariants: (props?: ({
|
|
43
|
-
variant?: "link" | "
|
|
44
|
-
size?: "
|
|
43
|
+
variant?: "link" | "secondary" | "destructive" | "default" | "outline" | "ghost" | null | undefined;
|
|
44
|
+
size?: "lg" | "sm" | "default" | "icon" | null | undefined;
|
|
45
45
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
46
46
|
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
47
47
|
asChild?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -26,13 +26,13 @@ declare const AccordionTrigger: React$1.ForwardRefExoticComponent<Omit<Accordion
|
|
|
26
26
|
declare const AccordionContent: React$1.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
27
27
|
|
|
28
28
|
declare const Alert: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
29
|
-
variant?: "
|
|
29
|
+
variant?: "destructive" | "success" | "warning" | "info" | "highlight" | "default" | null | undefined;
|
|
30
30
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLDivElement>>;
|
|
31
31
|
declare const AlertTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
32
32
|
declare const AlertDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
33
33
|
|
|
34
34
|
declare const badgeVariants: (props?: ({
|
|
35
|
-
variant?: "
|
|
35
|
+
variant?: "secondary" | "destructive" | "success" | "warning" | "info" | "highlight" | "default" | "outline" | "success-soft" | "warning-soft" | "destructive-soft" | "info-soft" | "highlight-soft" | "success-outline" | "warning-outline" | "destructive-outline" | "info-outline" | null | undefined;
|
|
36
36
|
rounded?: "default" | "full" | null | undefined;
|
|
37
37
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
38
38
|
interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
@@ -40,8 +40,8 @@ interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProp
|
|
|
40
40
|
declare function Badge({ className, variant, rounded, ...props }: BadgeProps): React$1.JSX.Element;
|
|
41
41
|
|
|
42
42
|
declare const buttonVariants: (props?: ({
|
|
43
|
-
variant?: "link" | "
|
|
44
|
-
size?: "
|
|
43
|
+
variant?: "link" | "secondary" | "destructive" | "default" | "outline" | "ghost" | null | undefined;
|
|
44
|
+
size?: "lg" | "sm" | "default" | "icon" | null | undefined;
|
|
45
45
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
46
46
|
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
47
47
|
asChild?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
}
|
|
200
200
|
`,Fe=class extends Error{log;source;constructor(t,r){super(`Fragment shader failed to compile:
|
|
201
201
|
${t.trim()}`),this.name="ShaderCompileError",this.log=t,this.source=r;}};function $n(e,t){let r=e.getContext(),o=r.createShader(r.FRAGMENT_SHADER);if(!o)throw new Error("Unable to allocate fragment shader");r.shaderSource(o,t),r.compileShader(o);let n=r.getShaderParameter(o,r.COMPILE_STATUS),i=r.getShaderInfoLog(o)||"";if(r.deleteShader(o),!n)throw new Fe(i,t)}function qt(e){return ({renderer:t,width:r,height:o,palette:n})=>{let i=`${Zo}
|
|
202
|
-
${e}`;$n(t,i);let d=new I__namespace.Scene,l=new I__namespace.OrthographicCamera(-1,1,1,-1,0,1),s={uTime:{value:0},uResolution:{value:new I__namespace.Vector2(r,o)},uMouse:{value:new I__namespace.Vector2(.5,.5)},uPrimary:{value:new I__namespace.Color(n.primary)},uSecondary:{value:new I__namespace.Color(n.secondary)},uAccent:{value:new I__namespace.Color(n.accent)},uBackground:{value:new I__namespace.Color(n.background)}},p=new I__namespace.ShaderMaterial({uniforms:s,vertexShader:Gn,fragmentShader:i,depthTest:false,depthWrite:false}),c=new I__namespace.PlaneGeometry(2,2),u=new I__namespace.Mesh(c,p);return d.add(u),{scene:d,camera:l,update:h=>{s.uTime.value=h;},resize:(h,T)=>{s.uResolution.value.set(h,T);},setPalette:h=>{s.uPrimary.value.set(h.primary),s.uSecondary.value.set(h.secondary),s.uAccent.value.set(h.accent),s.uBackground.value.set(h.background);},setMouse:(h,T)=>{s.uMouse.value.set(h,T);},dispose:()=>{c.dispose(),p.dispose();}}}}var Qe={primary:"#ff5fb9",secondary:"#9fe8ff",accent:"#ffc857",background:"#0a0a14"};function bt(e,t,r){if(typeof document>"u")return r;let o=document.createElement("span");if(o.style.color="",o.style.color=e,o.style.color==="")return r;o.style.display="none",t.appendChild(o);let n=getComputedStyle(o).color;return t.removeChild(o),n||r}function Jo(e,t){return {primary:bt(e.primary,t,Qe.primary),secondary:bt(e.secondary,t,Qe.secondary),accent:bt(e.accent,t,Qe.accent),background:bt(e.background,t,Qe.background)}}var xt=y__namespace.forwardRef(({preset:e,fragmentShader:t,onShaderError:r,postPreset:o,palette:n,createScene:i,controls:d=false,autoPlay:l=true,pauseOffscreen:s=true,aspect:p="video",radius:c="lg",border:u=false,poster:g,label:h,className:T,style:f,maxDpr:m},w)=>{let N=y__namespace.useRef(null),[E,M]=y__namespace.useState(l),[K,J]=y__namespace.useState(false),ye=Me(),Mt=y__namespace.useMemo(()=>({...Qe,...n}),[n]),Et=y__namespace.useMemo(()=>i||(t?qt(t):e&&Ye[e]?Ye[e]:null),[i,t,e]),sr=y__namespace.useMemo(()=>{if(o)return o;if(e){let A=Ze[e];if(A?.defaultPostPreset)return A.defaultPostPreset}return vt},[o,e]);y__namespace.useEffect(()=>{let A=N.current;if(!A||!Et)return;let nt=A.clientWidth||1,it=A.clientHeight||1,Lt=Jo(Mt,A),$=new I__namespace.WebGLRenderer({antialias:true,alpha:false,powerPreference:"high-performance"}),ma=m??Math.min(window.devicePixelRatio||1,2);$.setPixelRatio(ma),$.setSize(nt,it),$.setClearColor(new I__namespace.Color(Lt.background),1),$.domElement.dataset.gdsPart="shader-canvas",$.domElement.style.width="100%",$.domElement.style.height="100%",$.domElement.style.display="block",A.appendChild($.domElement);let pe;try{pe=Et({renderer:$,width:nt,height:it,palette:Lt});}catch(D){if(D instanceof Fe)r?.(D),pe=Ye.space({renderer:$,width:nt,height:it,palette:Lt});else throw $.dispose(),$.domElement.parentElement===A&&A.removeChild($.domElement),D}let ua=Je[sr]??Je[vt],st=Wo({renderer:$,scene:pe.scene,camera:pe.camera,preset:ua,width:nt,height:it}),dr=new I__namespace.Clock,cr=0,$e=l&&!ye,lr=true,pr=()=>{if(cr=requestAnimationFrame(pr),!$e||s&&!lr)return;let D=dr.getDelta(),te=dr.getElapsedTime();pe.update?.(te,D),st.composer.render(D);};pr(),$e&&J(true);let mr=new ResizeObserver(([D])=>{let te=Math.max(1,Math.floor(D.contentRect.width)),Be=Math.max(1,Math.floor(D.contentRect.height));$.setSize(te,Be),st.resize(te,Be),pe.resize?.(te,Be);});mr.observe(A);let ur=new IntersectionObserver(([D])=>{lr=D.isIntersecting;},{threshold:.05});ur.observe(A);let fr=new MutationObserver(()=>{if(!N.current)return;let D=Jo(Mt,N.current);$.setClearColor(new I__namespace.Color(D.background),1),pe.setPalette?.(D);});fr.observe(document.documentElement,{attributes:true,attributeFilter:["class","style","data-theme","data-gds-theme","data-grade-mode"]});let gr=pe,dt=gr.setMouse?D=>{let te=A.getBoundingClientRect(),Be=(D.clientX-te.left)/te.width,fa=1-(D.clientY-te.top)/te.height;gr.setMouse(Be,fa);}:null;return dt&&A.addEventListener("pointermove",dt),Ht.current={toggle:()=>{$e=!$e,M($e);},setPalette:D=>{$.setClearColor(new I__namespace.Color(D.background),1),pe.setPalette?.(D);},setPostPreset:D=>{let te=Je[D];te&&st.setPreset(te);}},()=>{cancelAnimationFrame(cr),mr.disconnect(),ur.disconnect(),fr.disconnect(),dt&&A.removeEventListener("pointermove",dt),st.dispose(),pe.dispose?.(),$.dispose(),$.domElement.parentElement===A&&A.removeChild($.domElement),Ht.current=null;}},[Et,sr,Mt,l,ye,s,m,r]);let Ht=y__namespace.useRef(null),pa=()=>Ht.current?.toggle();return y__namespace.createElement(ue,{ref:A=>{N.current=A,typeof w=="function"?w(A):w&&(w.current=A);},aspect:p,radius:c,border:u,"aria-label":h,className:T,style:f,"data-gds-part":"three-scene"},!K&&g&&y__namespace.createElement("img",{src:g,alt:"",className:"absolute inset-0 w-full h-full object-cover","data-gds-part":"scene-poster"}),d&&y__namespace.createElement("div",{"data-gds-part":"scene-controls",className:a("absolute inset-0 flex items-end justify-end p-2","opacity-0 hover:opacity-100 transition-opacity","bg-gradient-to-t from-black/30 to-transparent")},y__namespace.createElement(X,{size:"icon",variant:"secondary",onClick:pa},E?y__namespace.createElement(lucideReact.Pause,{className:"h-4 w-4"}):y__namespace.createElement(lucideReact.Play,{className:"h-4 w-4"}))))});xt.displayName="ThreeScene";var Rt=y__namespace.forwardRef(({preset:e,live:t="hover",postPreset:r,palette:o,className:n,aspect:i="video",radius:d="lg",label:l,hideLabel:s=false,onClick:p},c)=>{let u=Ze[e],[g,h]=y__namespace.useState(false),T=t==="always"||t==="hover"&&g;return y__namespace.createElement("div",{ref:c,"data-gds-part":"picker-card","data-gds-preset":e,onMouseEnter:()=>h(true),onMouseLeave:()=>h(false),onClick:p,className:a("group cursor-pointer flex flex-col gap-2",n)},T?y__namespace.createElement(xt,{preset:e,postPreset:r,palette:o,aspect:i,radius:d,autoPlay:true,controls:false,pauseOffscreen:true,poster:u?.poster,maxDpr:1}):y__namespace.createElement(ue,{aspect:i,radius:d,"data-gds-part":"preset-poster",className:"bg-gradient-to-br from-muted to-muted/50"},u?.poster?y__namespace.createElement("img",{src:u.poster,alt:u.label,className:"w-full h-full object-cover"}):y__namespace.createElement("div",{className:"absolute inset-0 flex items-center justify-center text-xs text-muted-foreground"},u?.label??e)),!s&&y__namespace.createElement("div",{className:"flex items-baseline justify-between text-xs"},y__namespace.createElement("span",{className:"font-medium text-foreground","data-gds-part":"preset-label"},l??u?.label??e),u?.tags?.[0]&&y__namespace.createElement("span",{className:"text-muted-foreground"},u.tags[0])))});Rt.displayName="ShaderPresetPreview";function Kn({value:e,onChange:t,filterTags:r,live:o="hover",postPreset:n,palette:i,columns:d=3,className:l}){let s=y__namespace.useMemo(()=>r?.length?Xe.filter(c=>r.some(u=>c.tags.includes(u))):Xe,[r]);return y__namespace.createElement("div",{"data-gds-part":"preset-grid",role:"radiogroup",className:a("grid grid-cols-2 gap-3",d===2?"md:grid-cols-2":d===4?"md:grid-cols-4":"md:grid-cols-3",l)},s.map(c=>{let u=e===c.id;return y__namespace.createElement("div",{key:c.id,className:"relative",role:"radio","aria-checked":u},y__namespace.createElement(Rt,{preset:c.id,postPreset:n,palette:i,live:o,onClick:()=>t?.(c.id),className:a("transition-all",u&&"ring-2 ring-primary ring-offset-2 ring-offset-background rounded-lg")}),u&&y__namespace.createElement("div",{"data-gds-part":"picker-selected-badge",className:"absolute top-2 right-2 rounded-full bg-primary text-primary-foreground p-1 shadow-sm"},y__namespace.createElement(lucideReact.Check,{className:"h-3.5 w-3.5"})))}))}function jn({children:e}){let t=y.useRef(null);return y.useEffect(()=>{let r=new Wn__default.default({duration:1.2,easing:n=>Math.min(1,1.001-Math.pow(2,-10*n)),orientation:"vertical",gestureOrientation:"vertical",smoothWheel:true});t.current=r;function o(n){r.raf(n),requestAnimationFrame(o);}return requestAnimationFrame(o),()=>{r.destroy(),t.current=null;}},[]),React.createElement(React.Fragment,null,e)}var Pe=[50,100,200,300,400,500,600,700,800,900,950],Qo=[.985,.955,.895,.82,.72,.61,.51,.415,.325,.245,.17],qn=[.015,.04,.075,.11,.14,.17,.17,.15,.12,.08,.04];function Tt({hue:e,chromaScale:t=1}){let r=(e%360+360)%360,o={};for(let n=0;n<Pe.length;n++){let i=Qo[n],d=qn[n]*t;o[Pe[n]]=`${i.toFixed(4)} ${d.toFixed(4)} ${r.toFixed(2)}`;}return o}function ea(){let e={};for(let t=0;t<Pe.length;t++){let r=Qo[t];e[Pe[t]]=`${r.toFixed(4)} 0 0`;}return e}var Yt={light:{destructive:"0.560 0.220 27.0",destructiveFg:"0.990 0.005 27.0",success:"0.610 0.180 145.0",warning:"0.720 0.180 60.0",info:"0.580 0.200 240.0",highlight:"0.860 0.180 95.0"},dark:{destructive:"0.680 0.220 27.0",destructiveFg:"0.990 0.005 27.0",success:"0.720 0.180 145.0",warning:"0.800 0.180 60.0",info:"0.700 0.200 240.0",highlight:"0.880 0.180 95.0"}},et="1 0 0",ta="0 0 0";function Oe(e,t){let[,r,o]=e.split(/\s+/).map(c=>c.trim()),n=Number(r),i=o;if(t==="light"){let u=Math.min(n*.22,.045),g=.38,h=n;return {soft:`${.965.toFixed(3)} ${u.toFixed(3)} ${i}`,deep:`${g.toFixed(3)} ${h.toFixed(3)} ${i}`}}let d=.22,l=Math.min(n*.45,.075),s=.82,p=n*.9;return {soft:`${d.toFixed(3)} ${l.toFixed(3)} ${i}`,deep:`${s.toFixed(3)} ${p.toFixed(3)} ${i}`}}var wt={geist:"var(--font-geist), system-ui, sans-serif",inter:"var(--font-inter), system-ui, sans-serif",manrope:"var(--font-manrope), system-ui, sans-serif",figtree:"var(--font-figtree), system-ui, sans-serif",dmSans:"var(--font-dm-sans), system-ui, sans-serif",lexend:"var(--font-lexend), system-ui, sans-serif",outfit:"var(--font-outfit), system-ui, sans-serif",plusJakarta:"var(--font-plus-jakarta), system-ui, sans-serif",spaceGrotesk:"var(--font-space-grotesk), system-ui, sans-serif",fraunces:"var(--font-fraunces), Georgia, serif",instrumentSerif:"var(--font-instrument-serif), Georgia, serif",sourceSerif:"var(--font-source-serif), Georgia, serif",jetbrainsMono:"var(--font-jetbrains-mono), ui-monospace, monospace",geistMono:"var(--font-geist-mono), ui-monospace, monospace",ibmPlexMono:"var(--font-ibm-plex-mono), ui-monospace, monospace",system:"system-ui, -apple-system, sans-serif",serif:"Georgia, 'Times New Roman', serif",mono:"ui-monospace, Menlo, monospace"};var Yn=["superLight","light","dark","superDark"],Xn={muted:.6,default:1,vibrant:1.3};function Zn(e,t,r){let o=t.primary*r,n=t.accent*r,i=(o+n)/2*.8,d=l=>(l%360+360)%360;return {1:`0.600 ${(.17*o).toFixed(4)} ${e.primary.toFixed(2)}`,2:`0.640 ${(.17*i).toFixed(4)} ${d(e.primary+140).toFixed(2)}`,3:`0.580 ${(.17*i).toFixed(4)} ${d(e.primary+220).toFixed(2)}`,4:`0.510 0.0250 ${e.neutral.toFixed(2)}`,5:`0.620 ${(.17*n).toFixed(4)} ${e.accent.toFixed(2)}`}}var v=e=>({source:"neutral",step:e}),ie=e=>({source:"primary",step:e}),Se=e=>({source:"accent",step:e}),tt=e=>({source:"pure",value:e}),Jn={superLight:{background:v(50),foreground:v(800),card:tt(et),cardForeground:v(800),popover:tt(et),popoverForeground:v(800),primary:ie(600),primaryForeground:ie(50),secondary:v(100),secondaryForeground:v(700),muted:v(100),mutedForeground:v(500),accent:Se(600),accentForeground:Se(50),border:v(200),input:v(200),ring:ie(500)},light:{background:v(50),foreground:v(950),card:tt(et),cardForeground:v(950),popover:tt(et),popoverForeground:v(950),primary:ie(500),primaryForeground:ie(50),secondary:v(100),secondaryForeground:v(700),muted:v(100),mutedForeground:v(500),accent:Se(500),accentForeground:Se(50),border:v(200),input:v(200),ring:ie(500)},dark:{background:v(950),foreground:v(50),card:v(900),cardForeground:v(50),popover:v(900),popoverForeground:v(50),primary:ie(400),primaryForeground:ie(950),secondary:v(800),secondaryForeground:v(200),muted:v(800),mutedForeground:v(400),accent:Se(400),accentForeground:Se(950),border:v(800),input:v(800),ring:ie(400)},superDark:{background:tt(ta),foreground:v(100),card:v(950),cardForeground:v(100),popover:v(950),popoverForeground:v(100),primary:ie(300),primaryForeground:ie(950),secondary:v(900),secondaryForeground:v(300),muted:v(900),mutedForeground:v(500),accent:Se(300),accentForeground:Se(950),border:v(900),input:v(900),ring:ie(300)}};function Y(e,t){return e.source==="pure"?e.value:t[e.source][e.step]}function Qn(e,t){let r=Jn[t],o=t==="superLight"||t==="light",n=o?Yt.light:Yt.dark;return {background:Y(r.background,e),foreground:Y(r.foreground,e),card:Y(r.card,e),cardForeground:Y(r.cardForeground,e),popover:Y(r.popover,e),popoverForeground:Y(r.popoverForeground,e),primary:Y(r.primary,e),primaryForeground:Y(r.primaryForeground,e),secondary:Y(r.secondary,e),secondaryForeground:Y(r.secondaryForeground,e),muted:Y(r.muted,e),mutedForeground:Y(r.mutedForeground,e),accent:Y(r.accent,e),accentForeground:Y(r.accentForeground,e),border:Y(r.border,e),input:Y(r.input,e),ring:Y(r.ring,e),destructive:n.destructive,destructiveForeground:n.destructiveFg,success:n.success,warning:n.warning,info:n.info,highlight:n.highlight,...(()=>{let i=o?"light":"dark",d=Oe(n.destructive,i),l=Oe(n.success,i),s=Oe(n.warning,i),p=Oe(n.info,i),c=Oe(n.highlight,i);return {destructiveSoft:d.soft,destructiveDeep:d.deep,successSoft:l.soft,successDeep:l.deep,warningSoft:s.soft,warningDeep:s.deep,infoSoft:p.soft,infoDeep:p.deep,highlightSoft:c.soft,highlightDeep:c.deep}})()}}var he={display:3.75,h1:2.5,h2:2,h3:1.5,h4:1.25,h5:1.125,h6:1,body:1,bodySm:.875},ei={compact:.85,default:1,spacious:1.18};function ti(e){let t=ei[e.scale],r=o=>`${(o*t).toFixed(3)}rem`;return {fontSans:wt[e.body],fontMono:wt[e.mono],fontDisplay:wt[e.display],headingWeight:e.headingWeight??600,bodyWeight:e.bodyWeight??400,headingTracking:e.headingTracking??"-0.01em",scale:{display:r(he.display),h1:r(he.h1),h2:r(he.h2),h3:r(he.h3),h4:r(he.h4),h5:r(he.h5),h6:r(he.h6),body:r(he.body),bodySm:r(he.bodySm)}}}var ri={sharp:0,subtle:.25,soft:.5,round:.875,pill:1.25};function oi(e){let t=ri[e.style],r=o=>`${o.toFixed(3)}rem`;return {base:r(t),sm:r(Math.max(0,t-.25)),md:r(t),lg:r(t+.25),xl:r(t+.5),"2xl":r(t+1),full:"9999px"}}var ai={tight:.85,default:1,roomy:1.2};function ni(e){return {baseUnit:"1rem",densityFactor:ai[e.density]}}var ii={none:{sm:"none",md:"none",lg:"none",xl:"none","2xl":"none",inner:"none"},subtle:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.03)",md:"0 2px 4px -1px rgb(0 0 0 / 0.04), 0 1px 2px -1px rgb(0 0 0 / 0.03)",lg:"0 6px 14px -2px rgb(0 0 0 / 0.05)",xl:"0 12px 24px -4px rgb(0 0 0 / 0.06)","2xl":"0 24px 48px -12px rgb(0 0 0 / 0.12)",inner:"inset 0 1px 2px 0 rgb(0 0 0 / 0.03)"},default:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"},dramatic:{sm:"0 2px 4px 0 rgb(0 0 0 / 0.12)",md:"0 8px 16px -2px rgb(0 0 0 / 0.18), 0 4px 8px -4px rgb(0 0 0 / 0.12)",lg:"0 20px 32px -4px rgb(0 0 0 / 0.22), 0 8px 16px -8px rgb(0 0 0 / 0.18)",xl:"0 32px 48px -6px rgb(0 0 0 / 0.28), 0 12px 24px -10px rgb(0 0 0 / 0.22)","2xl":"0 48px 80px -16px rgb(0 0 0 / 0.45)",inner:"inset 0 4px 8px 0 rgb(0 0 0 / 0.1)"}};function si(e){let t=e?.shadows??"default",r=e?.motionIntensity??1,o=n=>`${Math.round(n*r)}ms`;return {shadows:ii[t],motion:{fast:o(150),base:o(200),slow:o(300),slower:o(500)},borderWidth:e?.borderWidth??"1px"}}function Ee(e){let t=Xn[e.intensity??"default"],r=e.neutralPureGray??false,o=(e.chroma?.neutral??.08)*t,n=(e.chroma?.primary??1)*t,i=(e.chroma?.accent??1)*t,d=r?ea():Tt({hue:e.hues.neutral,chromaScale:o}),l=Tt({hue:e.hues.primary,chromaScale:n}),s=Tt({hue:e.hues.accent,chromaScale:i}),p={neutral:d,primary:l,accent:s},c=Zn(e.hues,{primary:n,accent:i},t),u=Object.fromEntries(Yn.map(w=>[w,Qn(p,w)])),g=ti(e.typography),h=oi(e.radius),T=ni(e.spacing),f=si(e.effects),m={buttonShape:e.components?.buttonShape??"default",inputStyle:e.components?.inputStyle??"outlined",cardStyle:e.components?.cardStyle??"flat"};return {id:e.id,name:e.name,description:e.description,tagline:e.tagline,input:e,ramps:p,colors:u,chart:c,typography:g,radius:h,spacing:T,effects:f,components:m}}var rt={id:"calm",name:"Calm",description:"Warm neutrals, terracotta primary, serif typography.",tagline:"Signature",hues:{neutral:40,primary:20,accent:40},chroma:{neutral:.15,primary:.75,accent:.8},intensity:"muted",typography:{display:"fraunces",body:"fraunces",mono:"jetbrainsMono",scale:"default",headingWeight:600,headingTracking:"-0.02em"},spacing:{density:"roomy"},radius:{style:"round"},effects:{shadows:"subtle",motionIntensity:1.25},components:{buttonShape:"pill",inputStyle:"outlined",cardStyle:"outlined"}},Xt={id:"energy",name:"Energy",description:"Teal + indigo \u2014 punchy, cool-tone, modern sans.",tagline:"Alternate",hues:{neutral:175,primary:175,accent:235},chroma:{neutral:.08,primary:1,accent:1},intensity:"vibrant",typography:{display:"geist",body:"geist",mono:"geistMono",scale:"default",headingWeight:600},spacing:{density:"default"},radius:{style:"soft"},effects:{shadows:"default",motionIntensity:1},components:{buttonShape:"default",inputStyle:"outlined",cardStyle:"flat"}},Pt=[rt,Xt];function di(e){return {"--background":e.background,"--foreground":e.foreground,"--card":e.card,"--card-foreground":e.cardForeground,"--popover":e.popover,"--popover-foreground":e.popoverForeground,"--primary":e.primary,"--primary-foreground":e.primaryForeground,"--secondary":e.secondary,"--secondary-foreground":e.secondaryForeground,"--muted":e.muted,"--muted-foreground":e.mutedForeground,"--accent":e.accent,"--accent-foreground":e.accentForeground,"--destructive":e.destructive,"--destructive-foreground":e.destructiveForeground,"--border":e.border,"--input":e.input,"--ring":e.ring,"--success":e.success,"--warning":e.warning,"--info":e.info,"--highlight":e.highlight,"--destructive-soft":e.destructiveSoft,"--destructive-deep":e.destructiveDeep,"--success-soft":e.successSoft,"--success-deep":e.successDeep,"--warning-soft":e.warningSoft,"--warning-deep":e.warningDeep,"--info-soft":e.infoSoft,"--info-deep":e.infoDeep,"--highlight-soft":e.highlightSoft,"--highlight-deep":e.highlightDeep}}function Jt(e,t){let r=e.colors[t];return {...di(r),...Zt("neutral",e.ramps.neutral),...Zt("primary",e.ramps.primary),...Zt("accent",e.ramps.accent),"--chart-1":e.chart[1],"--chart-2":e.chart[2],"--chart-3":e.chart[3],"--chart-4":e.chart[4],"--chart-5":e.chart[5],"--font-sans":e.typography.fontSans,"--font-mono":e.typography.fontMono,"--font-display":e.typography.fontDisplay,"--font-heading-weight":String(e.typography.headingWeight),"--font-body-weight":String(e.typography.bodyWeight),"--font-heading-tracking":e.typography.headingTracking,"--text-display":e.typography.scale.display,"--text-h1":e.typography.scale.h1,"--text-h2":e.typography.scale.h2,"--text-h3":e.typography.scale.h3,"--text-h4":e.typography.scale.h4,"--text-h5":e.typography.scale.h5,"--text-h6":e.typography.scale.h6,"--text-body":e.typography.scale.body,"--text-body-sm":e.typography.scale.bodySm,"--radius":e.radius.base,"--rds-radius-sm":e.radius.sm,"--rds-radius-md":e.radius.md,"--rds-radius-lg":e.radius.lg,"--rds-radius-xl":e.radius.xl,"--rds-radius-2xl":e.radius["2xl"],"--rds-radius-full":e.radius.full,"--rds-density":String(e.spacing.densityFactor),"--rds-shadow-sm":e.effects.shadows.sm,"--rds-shadow-md":e.effects.shadows.md,"--rds-shadow-lg":e.effects.shadows.lg,"--rds-shadow-xl":e.effects.shadows.xl,"--rds-shadow-2xl":e.effects.shadows["2xl"],"--rds-shadow-inner":e.effects.shadows.inner,"--rds-transition-fast":e.effects.motion.fast,"--rds-transition-base":e.effects.motion.base,"--rds-transition-slow":e.effects.motion.slow,"--rds-transition-slower":e.effects.motion.slower,"--rds-border-width":e.effects.borderWidth}}function Zt(e,t){let r={};for(let o of Pe)r[`--ramp-${e}-${o}`]=t[o];return r}function St(e,t){if(typeof document>"u")return;let r=document.documentElement,o=Jt(e,t);for(let[n,i]of Object.entries(o))r.style.setProperty(n,i);r.setAttribute("data-ramp-theme",e.id),r.setAttribute("data-mode",t),r.setAttribute("data-button-shape",e.components.buttonShape??"default"),r.setAttribute("data-input-style",e.components.inputStyle??"outlined"),r.setAttribute("data-card-style",e.components.cardStyle??"flat");}function ot(e){if(typeof document>"u")return "";let t=document.createElement("span");t.style.color=`oklch(${e})`,t.style.position="absolute",t.style.visibility="hidden",document.body.appendChild(t);let r=getComputedStyle(t).color;document.body.removeChild(t);let o=r.match(/\d+/g);if(!o||o.length<3)return "";let[n,i,d]=o.slice(0,3).map(Number);return "#"+[n,i,d].map(l=>Math.max(0,Math.min(255,l)).toString(16).padStart(2,"0")).join("").toUpperCase()}function ci(e){let t=e.trim().split(/\s+/);if(t.length<3)return {oklch:e,hex:""};let[r,o,n]=t.map(Number),i=`${r.toFixed(3)} ${o.toFixed(3)} ${Math.round(n)}`,d=ot(e);return {oklch:i,hex:d}}function Qt(e,t,r){let o=[`### ${e} ramp (hue ${Math.round(r)}\xB0)`,"","| Step | OKLCH | Hex |","|------|-------|-----|"];for(let n of Pe){let{oklch:i,hex:d}=ci(t[n]);o.push(`| ${n} | \`${i}\` | \`${d||"\u2014"}\` |`);}return o.join(`
|
|
202
|
+
${e}`;$n(t,i);let d=new I__namespace.Scene,l=new I__namespace.OrthographicCamera(-1,1,1,-1,0,1),s={uTime:{value:0},uResolution:{value:new I__namespace.Vector2(r,o)},uMouse:{value:new I__namespace.Vector2(.5,.5)},uPrimary:{value:new I__namespace.Color(n.primary)},uSecondary:{value:new I__namespace.Color(n.secondary)},uAccent:{value:new I__namespace.Color(n.accent)},uBackground:{value:new I__namespace.Color(n.background)}},p=new I__namespace.ShaderMaterial({uniforms:s,vertexShader:Gn,fragmentShader:i,depthTest:false,depthWrite:false}),c=new I__namespace.PlaneGeometry(2,2),u=new I__namespace.Mesh(c,p);return d.add(u),{scene:d,camera:l,update:h=>{s.uTime.value=h;},resize:(h,T)=>{s.uResolution.value.set(h,T);},setPalette:h=>{s.uPrimary.value.set(h.primary),s.uSecondary.value.set(h.secondary),s.uAccent.value.set(h.accent),s.uBackground.value.set(h.background);},setMouse:(h,T)=>{s.uMouse.value.set(h,T);},dispose:()=>{c.dispose(),p.dispose();}}}}var Qe={primary:"#ff5fb9",secondary:"#9fe8ff",accent:"#ffc857",background:"#0a0a14"};function bt(e,t,r){if(typeof document>"u")return r;let o=document.createElement("span");if(o.style.color="",o.style.color=e,o.style.color==="")return r;o.style.display="none",t.appendChild(o);let n=getComputedStyle(o).color;if(t.removeChild(o),!n)return r;if(n.startsWith("rgb"))return n;try{let i=document.createElement("canvas");i.width=1,i.height=1;let d=i.getContext("2d");if(!d)return n;d.clearRect(0,0,1,1),d.fillStyle=n,d.fillRect(0,0,1,1);let[l,s,p]=d.getImageData(0,0,1,1).data;return `rgb(${l}, ${s}, ${p})`}catch{return n}}function Jo(e,t){return {primary:bt(e.primary,t,Qe.primary),secondary:bt(e.secondary,t,Qe.secondary),accent:bt(e.accent,t,Qe.accent),background:bt(e.background,t,Qe.background)}}var xt=y__namespace.forwardRef(({preset:e,fragmentShader:t,onShaderError:r,postPreset:o,palette:n,createScene:i,controls:d=false,autoPlay:l=true,pauseOffscreen:s=true,aspect:p="video",radius:c="lg",border:u=false,poster:g,label:h,className:T,style:f,maxDpr:m},w)=>{let N=y__namespace.useRef(null),[E,M]=y__namespace.useState(l),[K,J]=y__namespace.useState(false),ye=Me(),Mt=y__namespace.useMemo(()=>({...Qe,...n}),[n]),Et=y__namespace.useMemo(()=>i||(t?qt(t):e&&Ye[e]?Ye[e]:null),[i,t,e]),sr=y__namespace.useMemo(()=>{if(o)return o;if(e){let A=Ze[e];if(A?.defaultPostPreset)return A.defaultPostPreset}return vt},[o,e]);y__namespace.useEffect(()=>{let A=N.current;if(!A||!Et)return;let nt=A.clientWidth||1,it=A.clientHeight||1,Lt=Jo(Mt,A),$=new I__namespace.WebGLRenderer({antialias:true,alpha:false,powerPreference:"high-performance"}),ma=m??Math.min(window.devicePixelRatio||1,2);$.setPixelRatio(ma),$.setSize(nt,it),$.setClearColor(new I__namespace.Color(Lt.background),1),$.domElement.dataset.gdsPart="shader-canvas",$.domElement.style.width="100%",$.domElement.style.height="100%",$.domElement.style.display="block",A.appendChild($.domElement);let pe;try{pe=Et({renderer:$,width:nt,height:it,palette:Lt});}catch(D){if(D instanceof Fe)r?.(D),pe=Ye.space({renderer:$,width:nt,height:it,palette:Lt});else throw $.dispose(),$.domElement.parentElement===A&&A.removeChild($.domElement),D}let ua=Je[sr]??Je[vt],st=Wo({renderer:$,scene:pe.scene,camera:pe.camera,preset:ua,width:nt,height:it}),dr=new I__namespace.Clock,cr=0,$e=l&&!ye,lr=true,pr=()=>{if(cr=requestAnimationFrame(pr),!$e||s&&!lr)return;let D=dr.getDelta(),te=dr.getElapsedTime();pe.update?.(te,D),st.composer.render(D);};pr(),$e&&J(true);let mr=new ResizeObserver(([D])=>{let te=Math.max(1,Math.floor(D.contentRect.width)),Be=Math.max(1,Math.floor(D.contentRect.height));$.setSize(te,Be),st.resize(te,Be),pe.resize?.(te,Be);});mr.observe(A);let ur=new IntersectionObserver(([D])=>{lr=D.isIntersecting;},{threshold:.05});ur.observe(A);let fr=new MutationObserver(()=>{if(!N.current)return;let D=Jo(Mt,N.current);$.setClearColor(new I__namespace.Color(D.background),1),pe.setPalette?.(D);});fr.observe(document.documentElement,{attributes:true,attributeFilter:["class","style","data-theme","data-gds-theme","data-grade-mode"]});let gr=pe,dt=gr.setMouse?D=>{let te=A.getBoundingClientRect(),Be=(D.clientX-te.left)/te.width,fa=1-(D.clientY-te.top)/te.height;gr.setMouse(Be,fa);}:null;return dt&&A.addEventListener("pointermove",dt),Ht.current={toggle:()=>{$e=!$e,M($e);},setPalette:D=>{$.setClearColor(new I__namespace.Color(D.background),1),pe.setPalette?.(D);},setPostPreset:D=>{let te=Je[D];te&&st.setPreset(te);}},()=>{cancelAnimationFrame(cr),mr.disconnect(),ur.disconnect(),fr.disconnect(),dt&&A.removeEventListener("pointermove",dt),st.dispose(),pe.dispose?.(),$.dispose(),$.domElement.parentElement===A&&A.removeChild($.domElement),Ht.current=null;}},[Et,sr,Mt,l,ye,s,m,r]);let Ht=y__namespace.useRef(null),pa=()=>Ht.current?.toggle();return y__namespace.createElement(ue,{ref:A=>{N.current=A,typeof w=="function"?w(A):w&&(w.current=A);},aspect:p,radius:c,border:u,"aria-label":h,className:T,style:f,"data-gds-part":"three-scene"},!K&&g&&y__namespace.createElement("img",{src:g,alt:"",className:"absolute inset-0 w-full h-full object-cover","data-gds-part":"scene-poster"}),d&&y__namespace.createElement("div",{"data-gds-part":"scene-controls",className:a("absolute inset-0 flex items-end justify-end p-2","opacity-0 hover:opacity-100 transition-opacity","bg-gradient-to-t from-black/30 to-transparent")},y__namespace.createElement(X,{size:"icon",variant:"secondary",onClick:pa},E?y__namespace.createElement(lucideReact.Pause,{className:"h-4 w-4"}):y__namespace.createElement(lucideReact.Play,{className:"h-4 w-4"}))))});xt.displayName="ThreeScene";var Rt=y__namespace.forwardRef(({preset:e,live:t="hover",postPreset:r,palette:o,className:n,aspect:i="video",radius:d="lg",label:l,hideLabel:s=false,onClick:p},c)=>{let u=Ze[e],[g,h]=y__namespace.useState(false),T=t==="always"||t==="hover"&&g;return y__namespace.createElement("div",{ref:c,"data-gds-part":"picker-card","data-gds-preset":e,onMouseEnter:()=>h(true),onMouseLeave:()=>h(false),onClick:p,className:a("group cursor-pointer flex flex-col gap-2",n)},T?y__namespace.createElement(xt,{preset:e,postPreset:r,palette:o,aspect:i,radius:d,autoPlay:true,controls:false,pauseOffscreen:true,poster:u?.poster,maxDpr:1}):y__namespace.createElement(ue,{aspect:i,radius:d,"data-gds-part":"preset-poster",className:"bg-gradient-to-br from-muted to-muted/50"},u?.poster?y__namespace.createElement("img",{src:u.poster,alt:u.label,className:"w-full h-full object-cover"}):y__namespace.createElement("div",{className:"absolute inset-0 flex items-center justify-center text-xs text-muted-foreground"},u?.label??e)),!s&&y__namespace.createElement("div",{className:"flex items-baseline justify-between text-xs"},y__namespace.createElement("span",{className:"font-medium text-foreground","data-gds-part":"preset-label"},l??u?.label??e),u?.tags?.[0]&&y__namespace.createElement("span",{className:"text-muted-foreground"},u.tags[0])))});Rt.displayName="ShaderPresetPreview";function Kn({value:e,onChange:t,filterTags:r,live:o="hover",postPreset:n,palette:i,columns:d=3,className:l}){let s=y__namespace.useMemo(()=>r?.length?Xe.filter(c=>r.some(u=>c.tags.includes(u))):Xe,[r]);return y__namespace.createElement("div",{"data-gds-part":"preset-grid",role:"radiogroup",className:a("grid grid-cols-2 gap-3",d===2?"md:grid-cols-2":d===4?"md:grid-cols-4":"md:grid-cols-3",l)},s.map(c=>{let u=e===c.id;return y__namespace.createElement("div",{key:c.id,className:"relative",role:"radio","aria-checked":u},y__namespace.createElement(Rt,{preset:c.id,postPreset:n,palette:i,live:o,onClick:()=>t?.(c.id),className:a("transition-all",u&&"ring-2 ring-primary ring-offset-2 ring-offset-background rounded-lg")}),u&&y__namespace.createElement("div",{"data-gds-part":"picker-selected-badge",className:"absolute top-2 right-2 rounded-full bg-primary text-primary-foreground p-1 shadow-sm"},y__namespace.createElement(lucideReact.Check,{className:"h-3.5 w-3.5"})))}))}function jn({children:e}){let t=y.useRef(null);return y.useEffect(()=>{let r=new Wn__default.default({duration:1.2,easing:n=>Math.min(1,1.001-Math.pow(2,-10*n)),orientation:"vertical",gestureOrientation:"vertical",smoothWheel:true});t.current=r;function o(n){r.raf(n),requestAnimationFrame(o);}return requestAnimationFrame(o),()=>{r.destroy(),t.current=null;}},[]),React.createElement(React.Fragment,null,e)}var Pe=[50,100,200,300,400,500,600,700,800,900,950],Qo=[.985,.955,.895,.82,.72,.61,.51,.415,.325,.245,.17],qn=[.015,.04,.075,.11,.14,.17,.17,.15,.12,.08,.04];function Tt({hue:e,chromaScale:t=1}){let r=(e%360+360)%360,o={};for(let n=0;n<Pe.length;n++){let i=Qo[n],d=qn[n]*t;o[Pe[n]]=`${i.toFixed(4)} ${d.toFixed(4)} ${r.toFixed(2)}`;}return o}function ea(){let e={};for(let t=0;t<Pe.length;t++){let r=Qo[t];e[Pe[t]]=`${r.toFixed(4)} 0 0`;}return e}var Yt={light:{destructive:"0.560 0.220 27.0",destructiveFg:"0.990 0.005 27.0",success:"0.610 0.180 145.0",warning:"0.720 0.180 60.0",info:"0.580 0.200 240.0",highlight:"0.860 0.180 95.0"},dark:{destructive:"0.680 0.220 27.0",destructiveFg:"0.990 0.005 27.0",success:"0.720 0.180 145.0",warning:"0.800 0.180 60.0",info:"0.700 0.200 240.0",highlight:"0.880 0.180 95.0"}},et="1 0 0",ta="0 0 0";function Oe(e,t){let[,r,o]=e.split(/\s+/).map(c=>c.trim()),n=Number(r),i=o;if(t==="light"){let u=Math.min(n*.22,.045),g=.38,h=n;return {soft:`${.965.toFixed(3)} ${u.toFixed(3)} ${i}`,deep:`${g.toFixed(3)} ${h.toFixed(3)} ${i}`}}let d=.22,l=Math.min(n*.45,.075),s=.82,p=n*.9;return {soft:`${d.toFixed(3)} ${l.toFixed(3)} ${i}`,deep:`${s.toFixed(3)} ${p.toFixed(3)} ${i}`}}var wt={geist:"var(--font-geist), system-ui, sans-serif",inter:"var(--font-inter), system-ui, sans-serif",manrope:"var(--font-manrope), system-ui, sans-serif",figtree:"var(--font-figtree), system-ui, sans-serif",dmSans:"var(--font-dm-sans), system-ui, sans-serif",lexend:"var(--font-lexend), system-ui, sans-serif",outfit:"var(--font-outfit), system-ui, sans-serif",plusJakarta:"var(--font-plus-jakarta), system-ui, sans-serif",spaceGrotesk:"var(--font-space-grotesk), system-ui, sans-serif",fraunces:"var(--font-fraunces), Georgia, serif",instrumentSerif:"var(--font-instrument-serif), Georgia, serif",sourceSerif:"var(--font-source-serif), Georgia, serif",jetbrainsMono:"var(--font-jetbrains-mono), ui-monospace, monospace",geistMono:"var(--font-geist-mono), ui-monospace, monospace",ibmPlexMono:"var(--font-ibm-plex-mono), ui-monospace, monospace",system:"system-ui, -apple-system, sans-serif",serif:"Georgia, 'Times New Roman', serif",mono:"ui-monospace, Menlo, monospace"};var Yn=["superLight","light","dark","superDark"],Xn={muted:.6,default:1,vibrant:1.3};function Zn(e,t,r){let o=t.primary*r,n=t.accent*r,i=(o+n)/2*.8,d=l=>(l%360+360)%360;return {1:`0.600 ${(.17*o).toFixed(4)} ${e.primary.toFixed(2)}`,2:`0.640 ${(.17*i).toFixed(4)} ${d(e.primary+140).toFixed(2)}`,3:`0.580 ${(.17*i).toFixed(4)} ${d(e.primary+220).toFixed(2)}`,4:`0.510 0.0250 ${e.neutral.toFixed(2)}`,5:`0.620 ${(.17*n).toFixed(4)} ${e.accent.toFixed(2)}`}}var v=e=>({source:"neutral",step:e}),ie=e=>({source:"primary",step:e}),Se=e=>({source:"accent",step:e}),tt=e=>({source:"pure",value:e}),Jn={superLight:{background:v(50),foreground:v(800),card:tt(et),cardForeground:v(800),popover:tt(et),popoverForeground:v(800),primary:ie(600),primaryForeground:ie(50),secondary:v(100),secondaryForeground:v(700),muted:v(100),mutedForeground:v(500),accent:Se(600),accentForeground:Se(50),border:v(200),input:v(200),ring:ie(500)},light:{background:v(50),foreground:v(950),card:tt(et),cardForeground:v(950),popover:tt(et),popoverForeground:v(950),primary:ie(500),primaryForeground:ie(50),secondary:v(100),secondaryForeground:v(700),muted:v(100),mutedForeground:v(500),accent:Se(500),accentForeground:Se(50),border:v(200),input:v(200),ring:ie(500)},dark:{background:v(950),foreground:v(50),card:v(900),cardForeground:v(50),popover:v(900),popoverForeground:v(50),primary:ie(400),primaryForeground:ie(950),secondary:v(800),secondaryForeground:v(200),muted:v(800),mutedForeground:v(400),accent:Se(400),accentForeground:Se(950),border:v(800),input:v(800),ring:ie(400)},superDark:{background:tt(ta),foreground:v(100),card:v(950),cardForeground:v(100),popover:v(950),popoverForeground:v(100),primary:ie(300),primaryForeground:ie(950),secondary:v(900),secondaryForeground:v(300),muted:v(900),mutedForeground:v(500),accent:Se(300),accentForeground:Se(950),border:v(900),input:v(900),ring:ie(300)}};function Y(e,t){return e.source==="pure"?e.value:t[e.source][e.step]}function Qn(e,t){let r=Jn[t],o=t==="superLight"||t==="light",n=o?Yt.light:Yt.dark;return {background:Y(r.background,e),foreground:Y(r.foreground,e),card:Y(r.card,e),cardForeground:Y(r.cardForeground,e),popover:Y(r.popover,e),popoverForeground:Y(r.popoverForeground,e),primary:Y(r.primary,e),primaryForeground:Y(r.primaryForeground,e),secondary:Y(r.secondary,e),secondaryForeground:Y(r.secondaryForeground,e),muted:Y(r.muted,e),mutedForeground:Y(r.mutedForeground,e),accent:Y(r.accent,e),accentForeground:Y(r.accentForeground,e),border:Y(r.border,e),input:Y(r.input,e),ring:Y(r.ring,e),destructive:n.destructive,destructiveForeground:n.destructiveFg,success:n.success,warning:n.warning,info:n.info,highlight:n.highlight,...(()=>{let i=o?"light":"dark",d=Oe(n.destructive,i),l=Oe(n.success,i),s=Oe(n.warning,i),p=Oe(n.info,i),c=Oe(n.highlight,i);return {destructiveSoft:d.soft,destructiveDeep:d.deep,successSoft:l.soft,successDeep:l.deep,warningSoft:s.soft,warningDeep:s.deep,infoSoft:p.soft,infoDeep:p.deep,highlightSoft:c.soft,highlightDeep:c.deep}})()}}var he={display:3.75,h1:2.5,h2:2,h3:1.5,h4:1.25,h5:1.125,h6:1,body:1,bodySm:.875},ei={compact:.85,default:1,spacious:1.18};function ti(e){let t=ei[e.scale],r=o=>`${(o*t).toFixed(3)}rem`;return {fontSans:wt[e.body],fontMono:wt[e.mono],fontDisplay:wt[e.display],headingWeight:e.headingWeight??600,bodyWeight:e.bodyWeight??400,headingTracking:e.headingTracking??"-0.01em",scale:{display:r(he.display),h1:r(he.h1),h2:r(he.h2),h3:r(he.h3),h4:r(he.h4),h5:r(he.h5),h6:r(he.h6),body:r(he.body),bodySm:r(he.bodySm)}}}var ri={sharp:0,subtle:.25,soft:.5,round:.875,pill:1.25};function oi(e){let t=ri[e.style],r=o=>`${o.toFixed(3)}rem`;return {base:r(t),sm:r(Math.max(0,t-.25)),md:r(t),lg:r(t+.25),xl:r(t+.5),"2xl":r(t+1),full:"9999px"}}var ai={tight:.85,default:1,roomy:1.2};function ni(e){return {baseUnit:"1rem",densityFactor:ai[e.density]}}var ii={none:{sm:"none",md:"none",lg:"none",xl:"none","2xl":"none",inner:"none"},subtle:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.03)",md:"0 2px 4px -1px rgb(0 0 0 / 0.04), 0 1px 2px -1px rgb(0 0 0 / 0.03)",lg:"0 6px 14px -2px rgb(0 0 0 / 0.05)",xl:"0 12px 24px -4px rgb(0 0 0 / 0.06)","2xl":"0 24px 48px -12px rgb(0 0 0 / 0.12)",inner:"inset 0 1px 2px 0 rgb(0 0 0 / 0.03)"},default:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"},dramatic:{sm:"0 2px 4px 0 rgb(0 0 0 / 0.12)",md:"0 8px 16px -2px rgb(0 0 0 / 0.18), 0 4px 8px -4px rgb(0 0 0 / 0.12)",lg:"0 20px 32px -4px rgb(0 0 0 / 0.22), 0 8px 16px -8px rgb(0 0 0 / 0.18)",xl:"0 32px 48px -6px rgb(0 0 0 / 0.28), 0 12px 24px -10px rgb(0 0 0 / 0.22)","2xl":"0 48px 80px -16px rgb(0 0 0 / 0.45)",inner:"inset 0 4px 8px 0 rgb(0 0 0 / 0.1)"}};function si(e){let t=e?.shadows??"default",r=e?.motionIntensity??1,o=n=>`${Math.round(n*r)}ms`;return {shadows:ii[t],motion:{fast:o(150),base:o(200),slow:o(300),slower:o(500)},borderWidth:e?.borderWidth??"1px"}}function Ee(e){let t=Xn[e.intensity??"default"],r=e.neutralPureGray??false,o=(e.chroma?.neutral??.08)*t,n=(e.chroma?.primary??1)*t,i=(e.chroma?.accent??1)*t,d=r?ea():Tt({hue:e.hues.neutral,chromaScale:o}),l=Tt({hue:e.hues.primary,chromaScale:n}),s=Tt({hue:e.hues.accent,chromaScale:i}),p={neutral:d,primary:l,accent:s},c=Zn(e.hues,{primary:n,accent:i},t),u=Object.fromEntries(Yn.map(w=>[w,Qn(p,w)])),g=ti(e.typography),h=oi(e.radius),T=ni(e.spacing),f=si(e.effects),m={buttonShape:e.components?.buttonShape??"default",inputStyle:e.components?.inputStyle??"outlined",cardStyle:e.components?.cardStyle??"flat"};return {id:e.id,name:e.name,description:e.description,tagline:e.tagline,input:e,ramps:p,colors:u,chart:c,typography:g,radius:h,spacing:T,effects:f,components:m}}var rt={id:"calm",name:"Calm",description:"Warm neutrals, terracotta primary, serif typography.",tagline:"Signature",hues:{neutral:40,primary:20,accent:40},chroma:{neutral:.15,primary:.75,accent:.8},intensity:"muted",typography:{display:"fraunces",body:"fraunces",mono:"jetbrainsMono",scale:"default",headingWeight:600,headingTracking:"-0.02em"},spacing:{density:"roomy"},radius:{style:"round"},effects:{shadows:"subtle",motionIntensity:1.25},components:{buttonShape:"pill",inputStyle:"outlined",cardStyle:"outlined"}},Xt={id:"energy",name:"Energy",description:"Teal + indigo \u2014 punchy, cool-tone, modern sans.",tagline:"Alternate",hues:{neutral:175,primary:175,accent:235},chroma:{neutral:.08,primary:1,accent:1},intensity:"vibrant",typography:{display:"geist",body:"geist",mono:"geistMono",scale:"default",headingWeight:600},spacing:{density:"default"},radius:{style:"soft"},effects:{shadows:"default",motionIntensity:1},components:{buttonShape:"default",inputStyle:"outlined",cardStyle:"flat"}},Pt=[rt,Xt];function di(e){return {"--background":e.background,"--foreground":e.foreground,"--card":e.card,"--card-foreground":e.cardForeground,"--popover":e.popover,"--popover-foreground":e.popoverForeground,"--primary":e.primary,"--primary-foreground":e.primaryForeground,"--secondary":e.secondary,"--secondary-foreground":e.secondaryForeground,"--muted":e.muted,"--muted-foreground":e.mutedForeground,"--accent":e.accent,"--accent-foreground":e.accentForeground,"--destructive":e.destructive,"--destructive-foreground":e.destructiveForeground,"--border":e.border,"--input":e.input,"--ring":e.ring,"--success":e.success,"--warning":e.warning,"--info":e.info,"--highlight":e.highlight,"--destructive-soft":e.destructiveSoft,"--destructive-deep":e.destructiveDeep,"--success-soft":e.successSoft,"--success-deep":e.successDeep,"--warning-soft":e.warningSoft,"--warning-deep":e.warningDeep,"--info-soft":e.infoSoft,"--info-deep":e.infoDeep,"--highlight-soft":e.highlightSoft,"--highlight-deep":e.highlightDeep}}function Jt(e,t){let r=e.colors[t];return {...di(r),...Zt("neutral",e.ramps.neutral),...Zt("primary",e.ramps.primary),...Zt("accent",e.ramps.accent),"--chart-1":e.chart[1],"--chart-2":e.chart[2],"--chart-3":e.chart[3],"--chart-4":e.chart[4],"--chart-5":e.chart[5],"--font-sans":e.typography.fontSans,"--font-mono":e.typography.fontMono,"--font-display":e.typography.fontDisplay,"--font-heading-weight":String(e.typography.headingWeight),"--font-body-weight":String(e.typography.bodyWeight),"--font-heading-tracking":e.typography.headingTracking,"--text-display":e.typography.scale.display,"--text-h1":e.typography.scale.h1,"--text-h2":e.typography.scale.h2,"--text-h3":e.typography.scale.h3,"--text-h4":e.typography.scale.h4,"--text-h5":e.typography.scale.h5,"--text-h6":e.typography.scale.h6,"--text-body":e.typography.scale.body,"--text-body-sm":e.typography.scale.bodySm,"--radius":e.radius.base,"--rds-radius-sm":e.radius.sm,"--rds-radius-md":e.radius.md,"--rds-radius-lg":e.radius.lg,"--rds-radius-xl":e.radius.xl,"--rds-radius-2xl":e.radius["2xl"],"--rds-radius-full":e.radius.full,"--rds-density":String(e.spacing.densityFactor),"--rds-shadow-sm":e.effects.shadows.sm,"--rds-shadow-md":e.effects.shadows.md,"--rds-shadow-lg":e.effects.shadows.lg,"--rds-shadow-xl":e.effects.shadows.xl,"--rds-shadow-2xl":e.effects.shadows["2xl"],"--rds-shadow-inner":e.effects.shadows.inner,"--rds-transition-fast":e.effects.motion.fast,"--rds-transition-base":e.effects.motion.base,"--rds-transition-slow":e.effects.motion.slow,"--rds-transition-slower":e.effects.motion.slower,"--rds-border-width":e.effects.borderWidth}}function Zt(e,t){let r={};for(let o of Pe)r[`--ramp-${e}-${o}`]=t[o];return r}function St(e,t){if(typeof document>"u")return;let r=document.documentElement,o=Jt(e,t);for(let[n,i]of Object.entries(o))r.style.setProperty(n,i);r.setAttribute("data-ramp-theme",e.id),r.setAttribute("data-mode",t),r.setAttribute("data-button-shape",e.components.buttonShape??"default"),r.setAttribute("data-input-style",e.components.inputStyle??"outlined"),r.setAttribute("data-card-style",e.components.cardStyle??"flat");}function ot(e){if(typeof document>"u")return "";let t=document.createElement("span");t.style.color=`oklch(${e})`,t.style.position="absolute",t.style.visibility="hidden",document.body.appendChild(t);let r=getComputedStyle(t).color;document.body.removeChild(t);let o=r.match(/\d+/g);if(!o||o.length<3)return "";let[n,i,d]=o.slice(0,3).map(Number);return "#"+[n,i,d].map(l=>Math.max(0,Math.min(255,l)).toString(16).padStart(2,"0")).join("").toUpperCase()}function ci(e){let t=e.trim().split(/\s+/);if(t.length<3)return {oklch:e,hex:""};let[r,o,n]=t.map(Number),i=`${r.toFixed(3)} ${o.toFixed(3)} ${Math.round(n)}`,d=ot(e);return {oklch:i,hex:d}}function Qt(e,t,r){let o=[`### ${e} ramp (hue ${Math.round(r)}\xB0)`,"","| Step | OKLCH | Hex |","|------|-------|-----|"];for(let n of Pe){let{oklch:i,hex:d}=ci(t[n]);o.push(`| ${n} | \`${i}\` | \`${d||"\u2014"}\` |`);}return o.join(`
|
|
203
203
|
`)}function ra(e,t){let r=[`### ${e}`,"","| Token | Usage | Light (hex) | Dark (hex) |","|-------|-------|-------------|------------|"];for(let o of t){let n=ot(o.light)||"\u2014",i=ot(o.dark)||"\u2014";r.push(`| \`--${o.token}\` | ${o.usage} | \`${n}\` (\`${o.light}\`) | \`${i}\` (\`${o.dark}\`) |`);}return r.join(`
|
|
204
204
|
`)}function oa(e){return JSON.stringify(e.input,null,2)}function aa(e){let{input:t,ramps:r,colors:o,chart:n,typography:i,radius:d,spacing:l,effects:s,components:p}=e,c=t.intensity??"default",u=f=>({token:f,usage:li[f]??"",light:o.light[f],dark:o.dark[f]}),g=["background","foreground","card","cardForeground","popover","popoverForeground","primary","primaryForeground","secondary","secondaryForeground","muted","mutedForeground","accent","accentForeground","border","input","ring"].map(u),h=["destructive","destructiveForeground","success","warning","info","highlight"].map(u),T=[1,2,3,4,5].map(f=>{let m=n[f];return {slot:f,triplet:m,hex:ot(m)||"\u2014"}});return `# ${e.name} \u2014 Grade Design System Theme
|
|
205
205
|
|