@contentstudio/ui 0.2.14 → 0.2.15

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.
@@ -1,66 +0,0 @@
1
- "use strict";const U=(e,t=0,n=1)=>Ee(Te(t,e),n),ve=e=>{e._clipped=!1,e._unclipped=e.slice(0);for(let t=0;t<=3;t++)t<3?((e[t]<0||e[t]>255)&&(e._clipped=!0),e[t]=U(e[t],0,255)):t===3&&(e[t]=U(e[t],0,1));return e},He={};for(let e of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])He[`[object ${e}]`]=e.toLowerCase();function x(e){return He[Object.prototype.toString.call(e)]||"object"}const C=(e,t=null)=>e.length>=3?Array.prototype.slice.call(e):x(e[0])=="object"&&t?t.split("").filter(n=>e[0][n]!==void 0).map(n=>e[0][n]):e[0],oe=e=>{if(e.length<2)return null;const t=e.length-1;return x(e[t])=="string"?e[t].toLowerCase():null},{PI:fe,min:Ee,max:Te}=Math,z=fe*2,ue=fe/3,At=fe/180,Mt=180/fe,m={format:{},autodetect:[]};class l{constructor(...t){const n=this;if(x(t[0])==="object"&&t[0].constructor&&t[0].constructor===this.constructor)return t[0];let r=oe(t),s=!1;if(!r){s=!0,m.sorted||(m.autodetect=m.autodetect.sort((c,o)=>o.p-c.p),m.sorted=!0);for(let c of m.autodetect)if(r=c.test(...t),r)break}if(m.format[r]){const c=m.format[r].apply(null,s?t:t.slice(0,-1));n._rgb=ve(c)}else throw new Error("unknown format: "+t);n._rgb.length===3&&n._rgb.push(1)}toString(){return x(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const Pt="2.6.0",w=(...e)=>new w.Color(...e);w.Color=l;w.version=Pt;const jt=(...e)=>{e=C(e,"cmyk");const[t,n,r,s]=e,c=e.length>4?e[4]:1;return s===1?[0,0,0,c]:[t>=1?0:255*(1-t)*(1-s),n>=1?0:255*(1-n)*(1-s),r>=1?0:255*(1-r)*(1-s),c]},{max:Re}=Math,Ot=(...e)=>{let[t,n,r]=C(e,"rgb");t=t/255,n=n/255,r=r/255;const s=1-Re(t,Re(n,r)),c=s<1?1/(1-s):0,o=(1-t-s)*c,f=(1-n-s)*c,a=(1-r-s)*c;return[o,f,a,s]};l.prototype.cmyk=function(){return Ot(this._rgb)};w.cmyk=(...e)=>new l(...e,"cmyk");m.format.cmyk=jt;m.autodetect.push({p:2,test:(...e)=>{if(e=C(e,"cmyk"),x(e)==="array"&&e.length===4)return"cmyk"}});const le=e=>Math.round(e*100)/100,Rt=(...e)=>{const t=C(e,"hsla");let n=oe(e)||"lsa";return t[0]=le(t[0]||0),t[1]=le(t[1]*100)+"%",t[2]=le(t[2]*100)+"%",n==="hsla"||t.length>3&&t[3]<1?(t[3]=t.length>3?t[3]:1,n="hsla"):t.length=3,`${n}(${t.join(",")})`},Xe=(...e)=>{e=C(e,"rgba");let[t,n,r]=e;t/=255,n/=255,r/=255;const s=Ee(t,n,r),c=Te(t,n,r),o=(c+s)/2;let f,a;return c===s?(f=0,a=Number.NaN):f=o<.5?(c-s)/(c+s):(c-s)/(2-c-s),t==c?a=(n-r)/(c-s):n==c?a=2+(r-t)/(c-s):r==c&&(a=4+(t-n)/(c-s)),a*=60,a<0&&(a+=360),e.length>3&&e[3]!==void 0?[a,f,o,e[3]]:[a,f,o]},{round:ie}=Math,Bt=(...e)=>{const t=C(e,"rgba");let n=oe(e)||"rgb";return n.substr(0,3)=="hsl"?Rt(Xe(t),n):(t[0]=ie(t[0]),t[1]=ie(t[1]),t[2]=ie(t[2]),(n==="rgba"||t.length>3&&t[3]<1)&&(t[3]=t.length>3?t[3]:1,n="rgba"),`${n}(${t.slice(0,n==="rgb"?3:4).join(",")})`)},{round:de}=Math,Ne=(...e)=>{e=C(e,"hsl");const[t,n,r]=e;let s,c,o;if(n===0)s=c=o=r*255;else{const f=[0,0,0],a=[0,0,0],i=r<.5?r*(1+n):r+n-r*n,h=2*r-i,d=t/360;f[0]=d+1/3,f[1]=d,f[2]=d-1/3;for(let b=0;b<3;b++)f[b]<0&&(f[b]+=1),f[b]>1&&(f[b]-=1),6*f[b]<1?a[b]=h+(i-h)*6*f[b]:2*f[b]<1?a[b]=i:3*f[b]<2?a[b]=h+(i-h)*(2/3-f[b])*6:a[b]=h;[s,c,o]=[de(a[0]*255),de(a[1]*255),de(a[2]*255)]}return e.length>3?[s,c,o,e[3]]:[s,c,o,1]},Ue=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,Ve=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,Ze=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Je=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Ke=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,We=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,{round:Be}=Math,Ae=e=>{e=e.toLowerCase().trim();let t;if(m.format.named)try{return m.format.named(e)}catch{}if(t=e.match(Ue)){const n=t.slice(1,4);for(let r=0;r<3;r++)n[r]=+n[r];return n[3]=1,n}if(t=e.match(Ve)){const n=t.slice(1,5);for(let r=0;r<4;r++)n[r]=+n[r];return n}if(t=e.match(Ze)){const n=t.slice(1,4);for(let r=0;r<3;r++)n[r]=Be(n[r]*2.55);return n[3]=1,n}if(t=e.match(Je)){const n=t.slice(1,5);for(let r=0;r<3;r++)n[r]=Be(n[r]*2.55);return n[3]=+n[3],n}if(t=e.match(Ke)){const n=t.slice(1,4);n[1]*=.01,n[2]*=.01;const r=Ne(n);return r[3]=1,r}if(t=e.match(We)){const n=t.slice(1,4);n[1]*=.01,n[2]*=.01;const r=Ne(n);return r[3]=+t[4],r}};Ae.test=e=>Ue.test(e)||Ve.test(e)||Ze.test(e)||Je.test(e)||Ke.test(e)||We.test(e);l.prototype.css=function(e){return Bt(this._rgb,e)};w.css=(...e)=>new l(...e,"css");m.format.css=Ae;m.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&x(e)==="string"&&Ae.test(e))return"css"}});m.format.gl=(...e)=>{const t=C(e,"rgba");return t[0]*=255,t[1]*=255,t[2]*=255,t};w.gl=(...e)=>new l(...e,"gl");l.prototype.gl=function(){const e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};const{floor:Lt}=Math,St=(...e)=>{e=C(e,"hcg");let[t,n,r]=e,s,c,o;r=r*255;const f=n*255;if(n===0)s=c=o=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;const a=Lt(t),i=t-a,h=r*(1-n),d=h+f*(1-i),b=h+f*i,y=h+f;switch(a){case 0:[s,c,o]=[y,b,h];break;case 1:[s,c,o]=[d,y,h];break;case 2:[s,c,o]=[h,y,b];break;case 3:[s,c,o]=[h,d,y];break;case 4:[s,c,o]=[b,h,y];break;case 5:[s,c,o]=[y,h,d];break}}return[s,c,o,e.length>3?e[3]:1]},zt=(...e)=>{const[t,n,r]=C(e,"rgb"),s=Ee(t,n,r),c=Te(t,n,r),o=c-s,f=o*100/255,a=s/(255-o)*100;let i;return o===0?i=Number.NaN:(t===c&&(i=(n-r)/o),n===c&&(i=2+(r-t)/o),r===c&&(i=4+(t-n)/o),i*=60,i<0&&(i+=360)),[i,f,a]};l.prototype.hcg=function(){return zt(this._rgb)};w.hcg=(...e)=>new l(...e,"hcg");m.format.hcg=St;m.autodetect.push({p:1,test:(...e)=>{if(e=C(e,"hcg"),x(e)==="array"&&e.length===3)return"hcg"}});const Ft=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,qt=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Qe=e=>{if(e.match(Ft)){(e.length===4||e.length===7)&&(e=e.substr(1)),e.length===3&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const t=parseInt(e,16),n=t>>16,r=t>>8&255,s=t&255;return[n,r,s,1]}if(e.match(qt)){(e.length===5||e.length===9)&&(e=e.substr(1)),e.length===4&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);const t=parseInt(e,16),n=t>>24&255,r=t>>16&255,s=t>>8&255,c=Math.round((t&255)/255*100)/100;return[n,r,s,c]}throw new Error(`unknown hex color: ${e}`)},{round:ee}=Math,et=(...e)=>{let[t,n,r,s]=C(e,"rgba"),c=oe(e)||"auto";s===void 0&&(s=1),c==="auto"&&(c=s<1?"rgba":"rgb"),t=ee(t),n=ee(n),r=ee(r);let f="000000"+(t<<16|n<<8|r).toString(16);f=f.substr(f.length-6);let a="0"+ee(s*255).toString(16);switch(a=a.substr(a.length-2),c.toLowerCase()){case"rgba":return`#${f}${a}`;case"argb":return`#${a}${f}`;default:return`#${f}`}};l.prototype.hex=function(e){return et(this._rgb,e)};w.hex=(...e)=>new l(...e,"hex");m.format.hex=Qe;m.autodetect.push({p:4,test:(e,...t)=>{if(!t.length&&x(e)==="string"&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});const{cos:Y}=Math,It=(...e)=>{e=C(e,"hsi");let[t,n,r]=e,s,c,o;return isNaN(t)&&(t=0),isNaN(n)&&(n=0),t>360&&(t-=360),t<0&&(t+=360),t/=360,t<1/3?(o=(1-n)/3,s=(1+n*Y(z*t)/Y(ue-z*t))/3,c=1-(o+s)):t<2/3?(t-=1/3,s=(1-n)/3,c=(1+n*Y(z*t)/Y(ue-z*t))/3,o=1-(s+c)):(t-=2/3,c=(1-n)/3,o=(1+n*Y(z*t)/Y(ue-z*t))/3,s=1-(c+o)),s=U(r*s*3),c=U(r*c*3),o=U(r*o*3),[s*255,c*255,o*255,e.length>3?e[3]:1]},{min:Gt,sqrt:Dt,acos:Yt}=Math,Ht=(...e)=>{let[t,n,r]=C(e,"rgb");t/=255,n/=255,r/=255;let s;const c=Gt(t,n,r),o=(t+n+r)/3,f=o>0?1-c/o:0;return f===0?s=NaN:(s=(t-n+(t-r))/2,s/=Dt((t-n)*(t-n)+(t-r)*(n-r)),s=Yt(s),r>n&&(s=z-s),s/=z),[s*360,f,o]};l.prototype.hsi=function(){return Ht(this._rgb)};w.hsi=(...e)=>new l(...e,"hsi");m.format.hsi=It;m.autodetect.push({p:2,test:(...e)=>{if(e=C(e,"hsi"),x(e)==="array"&&e.length===3)return"hsi"}});l.prototype.hsl=function(){return Xe(this._rgb)};w.hsl=(...e)=>new l(...e,"hsl");m.format.hsl=Ne;m.autodetect.push({p:2,test:(...e)=>{if(e=C(e,"hsl"),x(e)==="array"&&e.length===3)return"hsl"}});const{floor:Xt}=Math,Ut=(...e)=>{e=C(e,"hsv");let[t,n,r]=e,s,c,o;if(r*=255,n===0)s=c=o=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;const f=Xt(t),a=t-f,i=r*(1-n),h=r*(1-n*a),d=r*(1-n*(1-a));switch(f){case 0:[s,c,o]=[r,d,i];break;case 1:[s,c,o]=[h,r,i];break;case 2:[s,c,o]=[i,r,d];break;case 3:[s,c,o]=[i,h,r];break;case 4:[s,c,o]=[d,i,r];break;case 5:[s,c,o]=[r,i,h];break}}return[s,c,o,e.length>3?e[3]:1]},{min:Vt,max:Zt}=Math,Jt=(...e)=>{e=C(e,"rgb");let[t,n,r]=e;const s=Vt(t,n,r),c=Zt(t,n,r),o=c-s;let f,a,i;return i=c/255,c===0?(f=Number.NaN,a=0):(a=o/c,t===c&&(f=(n-r)/o),n===c&&(f=2+(r-t)/o),r===c&&(f=4+(t-n)/o),f*=60,f<0&&(f+=360)),[f,a,i]};l.prototype.hsv=function(){return Jt(this._rgb)};w.hsv=(...e)=>new l(...e,"hsv");m.format.hsv=Ut;m.autodetect.push({p:2,test:(...e)=>{if(e=C(e,"hsv"),x(e)==="array"&&e.length===3)return"hsv"}});const O={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},{pow:Kt}=Math,tt=(...e)=>{e=C(e,"lab");const[t,n,r]=e;let s,c,o,f,a,i;return c=(t+16)/116,s=isNaN(n)?c:c+n/500,o=isNaN(r)?c:c-r/200,c=O.Yn*he(c),s=O.Xn*he(s),o=O.Zn*he(o),f=be(3.2404542*s-1.5371385*c-.4985314*o),a=be(-.969266*s+1.8760108*c+.041556*o),i=be(.0556434*s-.2040259*c+1.0572252*o),[f,a,i,e.length>3?e[3]:1]},be=e=>255*(e<=.00304?12.92*e:1.055*Kt(e,1/2.4)-.055),he=e=>e>O.t1?e*e*e:O.t2*(e-O.t0),{pow:nt}=Math,rt=(...e)=>{const[t,n,r]=C(e,"rgb"),[s,c,o]=Wt(t,n,r),f=116*c-16;return[f<0?0:f,500*(s-c),200*(c-o)]},ge=e=>(e/=255)<=.04045?e/12.92:nt((e+.055)/1.055,2.4),pe=e=>e>O.t3?nt(e,1/3):e/O.t2+O.t0,Wt=(e,t,n)=>{e=ge(e),t=ge(t),n=ge(n);const r=pe((.4124564*e+.3575761*t+.1804375*n)/O.Xn),s=pe((.2126729*e+.7151522*t+.072175*n)/O.Yn),c=pe((.0193339*e+.119192*t+.9503041*n)/O.Zn);return[r,s,c]};l.prototype.lab=function(){return rt(this._rgb)};w.lab=(...e)=>new l(...e,"lab");m.format.lab=tt;m.autodetect.push({p:2,test:(...e)=>{if(e=C(e,"lab"),x(e)==="array"&&e.length===3)return"lab"}});const{sin:Qt,cos:e0}=Math,st=(...e)=>{let[t,n,r]=C(e,"lch");return isNaN(r)&&(r=0),r=r*At,[t,e0(r)*n,Qt(r)*n]},ct=(...e)=>{e=C(e,"lch");const[t,n,r]=e,[s,c,o]=st(t,n,r),[f,a,i]=tt(s,c,o);return[f,a,i,e.length>3?e[3]:1]},t0=(...e)=>{const t=C(e,"hcl").reverse();return ct(...t)},{sqrt:n0,atan2:r0,round:s0}=Math,ot=(...e)=>{const[t,n,r]=C(e,"lab"),s=n0(n*n+r*r);let c=(r0(r,n)*Mt+360)%360;return s0(s*1e4)===0&&(c=Number.NaN),[t,s,c]},ft=(...e)=>{const[t,n,r]=C(e,"rgb"),[s,c,o]=rt(t,n,r);return ot(s,c,o)};l.prototype.lch=function(){return ft(this._rgb)};l.prototype.hcl=function(){return ft(this._rgb).reverse()};w.lch=(...e)=>new l(...e,"lch");w.hcl=(...e)=>new l(...e,"hcl");m.format.lch=ct;m.format.hcl=t0;["lch","hcl"].forEach(e=>m.autodetect.push({p:2,test:(...t)=>{if(t=C(t,e),x(t)==="array"&&t.length===3)return e}}));const V={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};l.prototype.name=function(){const e=et(this._rgb,"rgb");for(let t of Object.keys(V))if(V[t]===e)return t.toLowerCase();return e};m.format.named=e=>{if(e=e.toLowerCase(),V[e])return Qe(V[e]);throw new Error("unknown color name: "+e)};m.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&x(e)==="string"&&V[e.toLowerCase()])return"named"}});const c0=e=>{if(x(e)=="number"&&e>=0&&e<=16777215){const t=e>>16,n=e>>8&255,r=e&255;return[t,n,r,1]}throw new Error("unknown num color: "+e)},o0=(...e)=>{const[t,n,r]=C(e,"rgb");return(t<<16)+(n<<8)+r};l.prototype.num=function(){return o0(this._rgb)};w.num=(...e)=>new l(...e,"num");m.format.num=c0;m.autodetect.push({p:5,test:(...e)=>{if(e.length===1&&x(e[0])==="number"&&e[0]>=0&&e[0]<=16777215)return"num"}});const{round:at}=Math;l.prototype.rgb=function(e=!0){return e===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(at)};l.prototype.rgba=function(e=!0){return this._rgb.slice(0,4).map((t,n)=>n<3?e===!1?t:at(t):t)};w.rgb=(...e)=>new l(...e,"rgb");m.format.rgb=(...e)=>{const t=C(e,"rgba");return t[3]===void 0&&(t[3]=1),t};m.autodetect.push({p:3,test:(...e)=>{if(e=C(e,"rgba"),x(e)==="array"&&(e.length===3||e.length===4&&x(e[3])=="number"&&e[3]>=0&&e[3]<=1))return"rgb"}});const{log:te}=Math,ut=e=>{const t=e/100;let n,r,s;return t<66?(n=255,r=t<6?0:-155.25485562709179-.44596950469579133*(r=t-2)+104.49216199393888*te(r),s=t<20?0:-254.76935184120902+.8274096064007395*(s=t-10)+115.67994401066147*te(s)):(n=351.97690566805693+.114206453784165*(n=t-55)-40.25366309332127*te(n),r=325.4494125711974+.07943456536662342*(r=t-50)-28.0852963507957*te(r),s=255),[n,r,s,1]},{round:f0}=Math,a0=(...e)=>{const t=C(e,"rgb"),n=t[0],r=t[2];let s=1e3,c=4e4;const o=.4;let f;for(;c-s>o;){f=(c+s)*.5;const a=ut(f);a[2]/a[0]>=r/n?c=f:s=f}return f0(f)};l.prototype.temp=l.prototype.kelvin=l.prototype.temperature=function(){return a0(this._rgb)};w.temp=w.kelvin=w.temperature=(...e)=>new l(...e,"temp");m.format.temp=m.format.kelvin=m.format.temperature=ut;const{pow:re,sign:u0}=Math,lt=(...e)=>{e=C(e,"lab");const[t,n,r]=e,s=re(t+.3963377774*n+.2158037573*r,3),c=re(t-.1055613458*n-.0638541728*r,3),o=re(t-.0894841775*n-1.291485548*r,3);return[255*me(4.0767416621*s-3.3077115913*c+.2309699292*o),255*me(-1.2684380046*s+2.6097574011*c-.3413193965*o),255*me(-.0041960863*s-.7034186147*c+1.707614701*o),e.length>3?e[3]:1]};function me(e){const t=Math.abs(e);return t>.0031308?(u0(e)||1)*(1.055*re(t,1/2.4)-.055):e*12.92}const{cbrt:ye,pow:l0,sign:i0}=Math,it=(...e)=>{const[t,n,r]=C(e,"rgb"),[s,c,o]=[we(t/255),we(n/255),we(r/255)],f=ye(.4122214708*s+.5363325363*c+.0514459929*o),a=ye(.2119034982*s+.6806995451*c+.1073969566*o),i=ye(.0883024619*s+.2817188376*c+.6299787005*o);return[.2104542553*f+.793617785*a-.0040720468*i,1.9779984951*f-2.428592205*a+.4505937099*i,.0259040371*f+.7827717662*a-.808675766*i]};function we(e){const t=Math.abs(e);return t<.04045?e/12.92:(i0(e)||1)*l0((t+.055)/1.055,2.4)}l.prototype.oklab=function(){return it(this._rgb)};w.oklab=(...e)=>new l(...e,"oklab");m.format.oklab=lt;m.autodetect.push({p:3,test:(...e)=>{if(e=C(e,"oklab"),x(e)==="array"&&e.length===3)return"oklab"}});const d0=(...e)=>{e=C(e,"lch");const[t,n,r]=e,[s,c,o]=st(t,n,r),[f,a,i]=lt(s,c,o);return[f,a,i,e.length>3?e[3]:1]},b0=(...e)=>{const[t,n,r]=C(e,"rgb"),[s,c,o]=it(t,n,r);return ot(s,c,o)};l.prototype.oklch=function(){return b0(this._rgb)};w.oklch=(...e)=>new l(...e,"oklch");m.format.oklch=d0;m.autodetect.push({p:3,test:(...e)=>{if(e=C(e,"oklch"),x(e)==="array"&&e.length===3)return"oklch"}});l.prototype.alpha=function(e,t=!1){return e!==void 0&&x(e)==="number"?t?(this._rgb[3]=e,this):new l([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]};l.prototype.clipped=function(){return this._rgb._clipped||!1};l.prototype.darken=function(e=1){const t=this,n=t.lab();return n[0]-=O.Kn*e,new l(n,"lab").alpha(t.alpha(),!0)};l.prototype.brighten=function(e=1){return this.darken(-e)};l.prototype.darker=l.prototype.darken;l.prototype.brighter=l.prototype.brighten;l.prototype.get=function(e){const[t,n]=e.split("."),r=this[t]();if(n){const s=t.indexOf(n)-(t.substr(0,2)==="ok"?2:0);if(s>-1)return r[s];throw new Error(`unknown channel ${n} in mode ${t}`)}else return r};const{pow:h0}=Math,g0=1e-7,p0=20;l.prototype.luminance=function(e,t="rgb"){if(e!==void 0&&x(e)==="number"){if(e===0)return new l([0,0,0,this._rgb[3]],"rgb");if(e===1)return new l([255,255,255,this._rgb[3]],"rgb");let n=this.luminance(),r=p0;const s=(o,f)=>{const a=o.interpolate(f,.5,t),i=a.luminance();return Math.abs(e-i)<g0||!r--?a:i>e?s(o,a):s(a,f)},c=(n>e?s(new l([0,0,0]),this):s(this,new l([255,255,255]))).rgb();return new l([...c,this._rgb[3]])}return m0(...this._rgb.slice(0,3))};const m0=(e,t,n)=>(e=ke(e),t=ke(t),n=ke(n),.2126*e+.7152*t+.0722*n),ke=e=>(e/=255,e<=.03928?e/12.92:h0((e+.055)/1.055,2.4)),j={},K=(e,t,n=.5,...r)=>{let s=r[0]||"lrgb";if(!j[s]&&!r.length&&(s=Object.keys(j)[0]),!j[s])throw new Error(`interpolation mode ${s} is not defined`);return x(e)!=="object"&&(e=new l(e)),x(t)!=="object"&&(t=new l(t)),j[s](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};l.prototype.mix=l.prototype.interpolate=function(e,t=.5,...n){return K(this,e,t,...n)};l.prototype.premultiply=function(e=!1){const t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new l([t[0]*n,t[1]*n,t[2]*n,n],"rgb")};l.prototype.saturate=function(e=1){const t=this,n=t.lch();return n[1]+=O.Kn*e,n[1]<0&&(n[1]=0),new l(n,"lch").alpha(t.alpha(),!0)};l.prototype.desaturate=function(e=1){return this.saturate(-e)};l.prototype.set=function(e,t,n=!1){const[r,s]=e.split("."),c=this[r]();if(s){const o=r.indexOf(s)-(r.substr(0,2)==="ok"?2:0);if(o>-1){if(x(t)=="string")switch(t.charAt(0)){case"+":c[o]+=+t;break;case"-":c[o]+=+t;break;case"*":c[o]*=+t.substr(1);break;case"/":c[o]/=+t.substr(1);break;default:c[o]=+t}else if(x(t)==="number")c[o]=t;else throw new Error("unsupported value for Color.set");const f=new l(c,r);return n?(this._rgb=f._rgb,this):f}throw new Error(`unknown channel ${s} in mode ${r}`)}else return c};l.prototype.tint=function(e=.5,...t){return K(this,"white",e,...t)};l.prototype.shade=function(e=.5,...t){return K(this,"black",e,...t)};const y0=(e,t,n)=>{const r=e._rgb,s=t._rgb;return new l(r[0]+n*(s[0]-r[0]),r[1]+n*(s[1]-r[1]),r[2]+n*(s[2]-r[2]),"rgb")};j.rgb=y0;const{sqrt:_e,pow:H}=Math,w0=(e,t,n)=>{const[r,s,c]=e._rgb,[o,f,a]=t._rgb;return new l(_e(H(r,2)*(1-n)+H(o,2)*n),_e(H(s,2)*(1-n)+H(f,2)*n),_e(H(c,2)*(1-n)+H(a,2)*n),"rgb")};j.lrgb=w0;const k0=(e,t,n)=>{const r=e.lab(),s=t.lab();return new l(r[0]+n*(s[0]-r[0]),r[1]+n*(s[1]-r[1]),r[2]+n*(s[2]-r[2]),"lab")};j.lab=k0;const Z=(e,t,n,r)=>{let s,c;r==="hsl"?(s=e.hsl(),c=t.hsl()):r==="hsv"?(s=e.hsv(),c=t.hsv()):r==="hcg"?(s=e.hcg(),c=t.hcg()):r==="hsi"?(s=e.hsi(),c=t.hsi()):r==="lch"||r==="hcl"?(r="hcl",s=e.hcl(),c=t.hcl()):r==="oklch"&&(s=e.oklch().reverse(),c=t.oklch().reverse());let o,f,a,i,h,d;(r.substr(0,1)==="h"||r==="oklch")&&([o,a,h]=s,[f,i,d]=c);let b,y,E,A;return!isNaN(o)&&!isNaN(f)?(f>o&&f-o>180?A=f-(o+360):f<o&&o-f>180?A=f+360-o:A=f-o,y=o+n*A):isNaN(o)?isNaN(f)?y=Number.NaN:(y=f,(h==1||h==0)&&r!="hsv"&&(b=i)):(y=o,(d==1||d==0)&&r!="hsv"&&(b=a)),b===void 0&&(b=a+n*(i-a)),E=h+n*(d-h),r==="oklch"?new l([E,b,y],r):new l([y,b,E],r)},dt=(e,t,n)=>Z(e,t,n,"lch");j.lch=dt;j.hcl=dt;const _0=(e,t,n)=>{const r=e.num(),s=t.num();return new l(r+n*(s-r),"num")};j.num=_0;const $0=(e,t,n)=>Z(e,t,n,"hcg");j.hcg=$0;const x0=(e,t,n)=>Z(e,t,n,"hsi");j.hsi=x0;const C0=(e,t,n)=>Z(e,t,n,"hsl");j.hsl=C0;const N0=(e,t,n)=>Z(e,t,n,"hsv");j.hsv=N0;const v0=(e,t,n)=>{const r=e.oklab(),s=t.oklab();return new l(r[0]+n*(s[0]-r[0]),r[1]+n*(s[1]-r[1]),r[2]+n*(s[2]-r[2]),"oklab")};j.oklab=v0;const E0=(e,t,n)=>Z(e,t,n,"oklch");j.oklch=E0;const{pow:$e,sqrt:xe,PI:Ce,cos:Le,sin:Se,atan2:T0}=Math,A0=(e,t="lrgb",n=null)=>{const r=e.length;n||(n=Array.from(new Array(r)).map(()=>1));const s=r/n.reduce(function(d,b){return d+b});if(n.forEach((d,b)=>{n[b]*=s}),e=e.map(d=>new l(d)),t==="lrgb")return M0(e,n);const c=e.shift(),o=c.get(t),f=[];let a=0,i=0;for(let d=0;d<o.length;d++)if(o[d]=(o[d]||0)*n[0],f.push(isNaN(o[d])?0:n[0]),t.charAt(d)==="h"&&!isNaN(o[d])){const b=o[d]/180*Ce;a+=Le(b)*n[0],i+=Se(b)*n[0]}let h=c.alpha()*n[0];e.forEach((d,b)=>{const y=d.get(t);h+=d.alpha()*n[b+1];for(let E=0;E<o.length;E++)if(!isNaN(y[E]))if(f[E]+=n[b+1],t.charAt(E)==="h"){const A=y[E]/180*Ce;a+=Le(A)*n[b+1],i+=Se(A)*n[b+1]}else o[E]+=y[E]*n[b+1]});for(let d=0;d<o.length;d++)if(t.charAt(d)==="h"){let b=T0(i/f[d],a/f[d])/Ce*180;for(;b<0;)b+=360;for(;b>=360;)b-=360;o[d]=b}else o[d]=o[d]/f[d];return h/=r,new l(o,t).alpha(h>.99999?1:h,!0)},M0=(e,t)=>{const n=e.length,r=[0,0,0,0];for(let s=0;s<e.length;s++){const c=e[s],o=t[s]/n,f=c._rgb;r[0]+=$e(f[0],2)*o,r[1]+=$e(f[1],2)*o,r[2]+=$e(f[2],2)*o,r[3]+=f[3]*o}return r[0]=xe(r[0]),r[1]=xe(r[1]),r[2]=xe(r[2]),r[3]>.9999999&&(r[3]=1),new l(ve(r))},{pow:P0}=Math;function ce(e){let t="rgb",n=w("#ccc"),r=0,s=[0,1],c=[],o=[0,0],f=!1,a=[],i=!1,h=0,d=1,b=!1,y={},E=!0,A=1;const $=function(u){if(u=u||["#fff","#000"],u&&x(u)==="string"&&w.brewer&&w.brewer[u.toLowerCase()]&&(u=w.brewer[u.toLowerCase()]),x(u)==="array"){u.length===1&&(u=[u[0],u[0]]),u=u.slice(0);for(let g=0;g<u.length;g++)u[g]=w(u[g]);c.length=0;for(let g=0;g<u.length;g++)c.push(g/(u.length-1))}return B(),a=u},k=function(u){if(f!=null){const g=f.length-1;let _=0;for(;_<g&&u>=f[_];)_++;return _-1}return 0};let F=u=>u,q=u=>u;const R=function(u,g){let _,p;if(g==null&&(g=!1),isNaN(u)||u===null)return n;g?p=u:f&&f.length>2?p=k(u)/(f.length-2):d!==h?p=(u-h)/(d-h):p=1,p=q(p),g||(p=F(p)),A!==1&&(p=P0(p,A)),p=o[0]+p*(1-o[0]-o[1]),p=U(p,0,1);const T=Math.floor(p*1e4);if(E&&y[T])_=y[T];else{if(x(a)==="array")for(let N=0;N<c.length;N++){const M=c[N];if(p<=M){_=a[N];break}if(p>=M&&N===c.length-1){_=a[N];break}if(p>M&&p<c[N+1]){p=(p-M)/(c[N+1]-M),_=w.interpolate(a[N],a[N+1],p,t);break}}else x(a)==="function"&&(_=a(p));E&&(y[T]=_)}return _};var B=()=>y={};$(e);const v=function(u){const g=w(R(u));return i&&g[i]?g[i]():g};return v.classes=function(u){if(u!=null){if(x(u)==="array")f=u,s=[u[0],u[u.length-1]];else{const g=w.analyze(s);u===0?f=[g.min,g.max]:f=w.limits(g,"e",u)}return v}return f},v.domain=function(u){if(!arguments.length)return s;h=u[0],d=u[u.length-1],c=[];const g=a.length;if(u.length===g&&h!==d)for(let _ of Array.from(u))c.push((_-h)/(d-h));else{for(let _=0;_<g;_++)c.push(_/(g-1));if(u.length>2){const _=u.map((T,N)=>N/(u.length-1)),p=u.map(T=>(T-h)/(d-h));p.every((T,N)=>_[N]===T)||(q=T=>{if(T<=0||T>=1)return T;let N=0;for(;T>=p[N+1];)N++;const M=(T-p[N])/(p[N+1]-p[N]);return _[N]+M*(_[N+1]-_[N])})}}return s=[h,d],v},v.mode=function(u){return arguments.length?(t=u,B(),v):t},v.range=function(u,g){return $(u),v},v.out=function(u){return i=u,v},v.spread=function(u){return arguments.length?(r=u,v):r},v.correctLightness=function(u){return u==null&&(u=!0),b=u,B(),b?F=function(g){const _=R(0,!0).lab()[0],p=R(1,!0).lab()[0],T=_>p;let N=R(g,!0).lab()[0];const M=_+(p-_)*g;let D=N-M,J=0,W=1,Q=20;for(;Math.abs(D)>.01&&Q-- >0;)(function(){return T&&(D*=-1),D<0?(J=g,g+=(W-g)*.5):(W=g,g+=(J-g)*.5),N=R(g,!0).lab()[0],D=N-M})();return g}:F=g=>g,v},v.padding=function(u){return u!=null?(x(u)==="number"&&(u=[u,u]),o=u,v):o},v.colors=function(u,g){arguments.length<2&&(g="hex");let _=[];if(arguments.length===0)_=a.slice(0);else if(u===1)_=[v(.5)];else if(u>1){const p=s[0],T=s[1]-p;_=j0(0,u,!1).map(N=>v(p+N/(u-1)*T))}else{e=[];let p=[];if(f&&f.length>2)for(let T=1,N=f.length,M=1<=N;M?T<N:T>N;M?T++:T--)p.push((f[T-1]+f[T])*.5);else p=s;_=p.map(T=>v(T))}return w[g]&&(_=_.map(p=>p[g]())),_},v.cache=function(u){return u!=null?(E=u,v):E},v.gamma=function(u){return u!=null?(A=u,v):A},v.nodata=function(u){return u!=null?(n=w(u),v):n},v}function j0(e,t,n){let r=[],s=e<t,c=n?s?t+1:t-1:t;for(let o=e;s?o<c:o>c;s?o++:o--)r.push(o);return r}const O0=function(e){let t=[1,1];for(let n=1;n<e;n++){let r=[1];for(let s=1;s<=t.length;s++)r[s]=(t[s]||0)+t[s-1];t=r}return t},R0=function(e){let t,n,r,s;if(e=e.map(c=>new l(c)),e.length===2)[n,r]=e.map(c=>c.lab()),t=function(c){const o=[0,1,2].map(f=>n[f]+c*(r[f]-n[f]));return new l(o,"lab")};else if(e.length===3)[n,r,s]=e.map(c=>c.lab()),t=function(c){const o=[0,1,2].map(f=>(1-c)*(1-c)*n[f]+2*(1-c)*c*r[f]+c*c*s[f]);return new l(o,"lab")};else if(e.length===4){let c;[n,r,s,c]=e.map(o=>o.lab()),t=function(o){const f=[0,1,2].map(a=>(1-o)*(1-o)*(1-o)*n[a]+3*(1-o)*(1-o)*o*r[a]+3*(1-o)*o*o*s[a]+o*o*o*c[a]);return new l(f,"lab")}}else if(e.length>=5){let c,o,f;c=e.map(a=>a.lab()),f=e.length-1,o=O0(f),t=function(a){const i=1-a,h=[0,1,2].map(d=>c.reduce((b,y,E)=>b+o[E]*i**(f-E)*a**E*y[d],0));return new l(h,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return t},B0=e=>{const t=R0(e);return t.scale=()=>ce(t),t},L=(e,t,n)=>{if(!L[n])throw new Error("unknown blend mode "+n);return L[n](e,t)},I=e=>(t,n)=>{const r=w(n).rgb(),s=w(t).rgb();return w.rgb(e(r,s))},G=e=>(t,n)=>{const r=[];return r[0]=e(t[0],n[0]),r[1]=e(t[1],n[1]),r[2]=e(t[2],n[2]),r},L0=e=>e,S0=(e,t)=>e*t/255,z0=(e,t)=>e>t?t:e,F0=(e,t)=>e>t?e:t,q0=(e,t)=>255*(1-(1-e/255)*(1-t/255)),I0=(e,t)=>t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255)),G0=(e,t)=>255*(1-(1-t/255)/(e/255)),D0=(e,t)=>e===255?255:(e=255*(t/255)/(1-e/255),e>255?255:e);L.normal=I(G(L0));L.multiply=I(G(S0));L.screen=I(G(q0));L.overlay=I(G(I0));L.darken=I(G(z0));L.lighten=I(G(F0));L.dodge=I(G(D0));L.burn=I(G(G0));const{pow:Y0,sin:H0,cos:X0}=Math;function U0(e=300,t=-1.5,n=1,r=1,s=[0,1]){let c=0,o;x(s)==="array"?o=s[1]-s[0]:(o=0,s=[s,s]);const f=function(a){const i=z*((e+120)/360+t*a),h=Y0(s[0]+o*a,r),b=(c!==0?n[0]+a*c:n)*h*(1-h)/2,y=X0(i),E=H0(i),A=h+b*(-.14861*y+1.78277*E),$=h+b*(-.29227*y-.90649*E),k=h+b*(1.97294*y);return w(ve([A*255,$*255,k*255,1]))};return f.start=function(a){return a==null?e:(e=a,f)},f.rotations=function(a){return a==null?t:(t=a,f)},f.gamma=function(a){return a==null?r:(r=a,f)},f.hue=function(a){return a==null?n:(n=a,x(n)==="array"?(c=n[1]-n[0],c===0&&(n=n[1])):c=0,f)},f.lightness=function(a){return a==null?s:(x(a)==="array"?(s=a,o=a[1]-a[0]):(s=[a,a],o=0),f)},f.scale=()=>w.scale(f),f.hue(n),f}const V0="0123456789abcdef",{floor:Z0,random:J0}=Math,K0=()=>{let e="#";for(let t=0;t<6;t++)e+=V0.charAt(Z0(J0()*16));return new l(e,"hex")},{log:ze,pow:W0,floor:Q0,abs:en}=Math;function bt(e,t=null){const n={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return x(e)==="object"&&(e=Object.values(e)),e.forEach(r=>{t&&x(r)==="object"&&(r=r[t]),r!=null&&!isNaN(r)&&(n.values.push(r),n.sum+=r,r<n.min&&(n.min=r),r>n.max&&(n.max=r),n.count+=1)}),n.domain=[n.min,n.max],n.limits=(r,s)=>ht(n,r,s),n}function ht(e,t="equal",n=7){x(e)=="array"&&(e=bt(e));const{min:r,max:s}=e,c=e.values.sort((f,a)=>f-a);if(n===1)return[r,s];const o=[];if(t.substr(0,1)==="c"&&(o.push(r),o.push(s)),t.substr(0,1)==="e"){o.push(r);for(let f=1;f<n;f++)o.push(r+f/n*(s-r));o.push(s)}else if(t.substr(0,1)==="l"){if(r<=0)throw new Error("Logarithmic scales are only possible for values > 0");const f=Math.LOG10E*ze(r),a=Math.LOG10E*ze(s);o.push(r);for(let i=1;i<n;i++)o.push(W0(10,f+i/n*(a-f)));o.push(s)}else if(t.substr(0,1)==="q"){o.push(r);for(let f=1;f<n;f++){const a=(c.length-1)*f/n,i=Q0(a);if(i===a)o.push(c[i]);else{const h=a-i;o.push(c[i]*(1-h)+c[i+1]*h)}}o.push(s)}else if(t.substr(0,1)==="k"){let f;const a=c.length,i=new Array(a),h=new Array(n);let d=!0,b=0,y=null;y=[],y.push(r);for(let $=1;$<n;$++)y.push(r+$/n*(s-r));for(y.push(s);d;){for(let k=0;k<n;k++)h[k]=0;for(let k=0;k<a;k++){const F=c[k];let q=Number.MAX_VALUE,R;for(let B=0;B<n;B++){const v=en(y[B]-F);v<q&&(q=v,R=B),h[R]++,i[k]=R}}const $=new Array(n);for(let k=0;k<n;k++)$[k]=null;for(let k=0;k<a;k++)f=i[k],$[f]===null?$[f]=c[k]:$[f]+=c[k];for(let k=0;k<n;k++)$[k]*=1/h[k];d=!1;for(let k=0;k<n;k++)if($[k]!==y[k]){d=!0;break}y=$,b++,b>200&&(d=!1)}const E={};for(let $=0;$<n;$++)E[$]=[];for(let $=0;$<a;$++)f=i[$],E[f].push(c[$]);let A=[];for(let $=0;$<n;$++)A.push(E[$][0]),A.push(E[$][E[$].length-1]);A=A.sort(($,k)=>$-k),o.push(A[0]);for(let $=1;$<A.length;$+=2){const k=A[$];!isNaN(k)&&o.indexOf(k)===-1&&o.push(k)}}return o}const tn=(e,t)=>{e=new l(e),t=new l(t);const n=e.luminance(),r=t.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)},{sqrt:S,pow:P,min:nn,max:rn,atan2:Fe,abs:qe,cos:ne,sin:Ie,exp:sn,PI:Ge}=Math;function cn(e,t,n=1,r=1,s=1){var c=function(ae){return 360*ae/(2*Ge)},o=function(ae){return 2*Ge*ae/360};e=new l(e),t=new l(t);const[f,a,i]=Array.from(e.lab()),[h,d,b]=Array.from(t.lab()),y=(f+h)/2,E=S(P(a,2)+P(i,2)),A=S(P(d,2)+P(b,2)),$=(E+A)/2,k=.5*(1-S(P($,7)/(P($,7)+P(25,7)))),F=a*(1+k),q=d*(1+k),R=S(P(F,2)+P(i,2)),B=S(P(q,2)+P(b,2)),v=(R+B)/2,u=c(Fe(i,F)),g=c(Fe(b,q)),_=u>=0?u:u+360,p=g>=0?g:g+360,T=qe(_-p)>180?(_+p+360)/2:(_+p)/2,N=1-.17*ne(o(T-30))+.24*ne(o(2*T))+.32*ne(o(3*T+6))-.2*ne(o(4*T-63));let M=p-_;M=qe(M)<=180?M:p<=_?M+360:M-360,M=2*S(R*B)*Ie(o(M)/2);const D=h-f,J=B-R,W=1+.015*P(y-50,2)/S(20+P(y-50,2)),Q=1+.045*v,Oe=1+.015*v*N,vt=30*sn(-P((T-275)/25,2)),Et=-(2*S(P(v,7)/(P(v,7)+P(25,7))))*Ie(2*o(vt)),Tt=S(P(D/(n*W),2)+P(J/(r*Q),2)+P(M/(s*Oe),2)+Et*(J/(r*Q))*(M/(s*Oe)));return rn(0,nn(100,Tt))}function on(e,t,n="lab"){e=new l(e),t=new l(t);const r=e.get(n),s=t.get(n);let c=0;for(let o in r){const f=(r[o]||0)-(s[o]||0);c+=f*f}return Math.sqrt(c)}const fn=(...e)=>{try{return new l(...e),!0}catch{return!1}},an={cool(){return ce([w.hsl(180,1,.9),w.hsl(250,.7,.4)])},hot(){return ce(["#000","#f00","#ff0","#fff"]).mode("rgb")}},se={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]};for(let e of Object.keys(se))se[e.toLowerCase()]=se[e];Object.assign(w,{average:A0,bezier:B0,blend:L,cubehelix:U0,mix:K,interpolate:K,random:K0,scale:ce,analyze:bt,contrast:tn,deltaE:cn,distance:on,limits:ht,valid:fn,scales:an,input:m,colors:V,brewer:se});const gt=[50,100,200,250,300,400,450,500,550,575,600,700,800,900],un=[.96,.907,.805,.75,.697,.605,.567,.576,.529,.526,.523,.41,.318,.243],De=[.32,.16,.08,.06,.04,.02,0,0,.04,.06,.08,.16,.24,.32],Ye=gt.indexOf(500);function ln(e){let t=e.replace("#","");t.length===3&&(t=t.split("").map(r=>r+r).join(""));const n=parseInt(t,16);return[n>>16&255,n>>8&255,n&255]}function dn(e){const t=e;typeof t.clamp=="function"?e=t.clamp():typeof t.clip=="function"&&(e=t.clip());const[n,r,s]=ln(e.hex());return`${n} ${r} ${s}`}function pt(e){const t=w(e);return gt.reduce((n,r,s)=>{let c=t;if(s!==Ye){c=c.set("hsl.l",un[s]);const o=De[s]-De[Ye];c=o>=0?c.saturate(o):c.desaturate(-o)}return n[r]=dn(c),n},{})}const mt={primary:{50:"240 247 255",100:"189 211 254",200:"157 189 254",250:"134 166 254",300:"112 159 253",400:"85 141 253",450:"34 148 255",500:"42 112 252",550:"37 102 233",575:"36 92 220",600:"38 102 229",700:"30 80 179",800:"23 62 139",900:"18 47 106"},secondary:{50:"251 252 252",100:"248 248 248",200:"236 238 245",250:"236 236 236",300:"134 134 134",400:"110 110 110",450:"96 96 96",500:"74 74 74",550:"58 69 87",575:"60 69 73",600:"67 67 67",700:"53 53 53",800:"41 41 41",900:"31 31 31"},success:{50:"238 249 243",100:"203 236 218",200:"177 227 200",250:"160 221 188",300:"142 214 175",400:"120 206 160",450:"103 200 148",500:"86 194 136",550:"82 186 130",575:"80 182 127",600:"78 177 124",700:"61 138 97",800:"47 107 75",900:"36 81 57"},warning:{50:"255 244 234",100:"255 221 189",200:"255 205 157",250:"255 194 135",300:"255 182 113",400:"255 168 85",450:"255 157 64",500:"255 146 43",550:"244 140 41",575:"238 136 40",600:"232 133 39",700:"181 104 31",800:"140 80 24",900:"107 61 18"},danger:{50:"254 232 237",100:"252 182 200",200:"250 147 173",250:"248 98 135",300:"248 98 135",400:"247 67 112",450:"246 44 94",500:"245 20 76",550:"223 18 69",575:"208 16 63",600:"223 18 69",700:"174 14 54",800:"135 11 42",900:"103 8 32"},info:{50:"240 247 255",100:"189 211 254",200:"157 189 254",250:"134 166 254",300:"112 159 253",400:"85 141 253",450:"34 148 255",500:"42 112 252",550:"37 102 233",575:"36 92 220",600:"38 102 229",700:"30 80 179",800:"23 62 139",900:"18 47 106"},green:{50:"238 249 243",100:"203 236 218",200:"177 227 200",250:"160 221 188",300:"142 214 175",400:"120 206 160",450:"103 200 148",500:"86 194 136",550:"82 186 130",575:"80 182 127",600:"78 177 124",700:"61 138 97",800:"47 107 75",900:"36 81 57"},yellow:{50:"255 249 238",100:"255 237 202",200:"255 228 177",250:"255 216 141",300:"255 216 141",400:"255 209 119",450:"255 197 85",500:"255 197 85",550:"232 179 77",575:"224 172 74",600:"232 179 77",700:"181 140 60",800:"140 108 47",900:"107 83 36"},orange:{50:"255 247 237",100:"255 237 213",200:"254 215 170",250:"253 186 116",300:"251 146 60",400:"249 115 22",450:"234 88 12",500:"194 65 12",550:"154 52 18",575:"124 45 18",600:"154 52 18",700:"124 45 18",800:"154 52 18",900:"67 20 7"},red:{50:"254 232 237",100:"252 182 200",200:"250 147 173",250:"248 98 135",300:"248 98 135",400:"247 67 112",450:"246 44 94",500:"245 20 76",550:"223 18 69",575:"208 16 63",600:"223 18 69",700:"174 14 54",800:"135 11 42",900:"103 8 32"}},Me={primary:"#2a70fc",secondary:"#6b7280",success:"#56c288",warning:"#ff922b",danger:"#f5144c",info:"#3b82f6"};function Pe(e){const{primary:t="default",secondary:n="default",success:r="default",warning:s="default",danger:c="default",info:o="default",green:f="default",yellow:a="default",orange:i="default",red:h="default"}=e,d=(y,E)=>y==="default"?mt[E]:pt(y),b={primary:d(t,"primary"),secondary:d(n,"secondary"),success:d(r,"success"),warning:d(s,"warning"),danger:d(c,"danger"),info:d(o,"info")};return f!==r&&(b.green=d(f,"green")),a!==s&&(b.yellow=d(a,"yellow")),i&&(b.orange=d(i,"orange")),h!==c&&(b.red=d(h,"red")),b}function bn(e){const t=[];Object.keys(e).forEach(s=>{const c=e[s];c&&Object.entries(c).forEach(([o,f])=>{t.push(` --cstu-${s}-${o}: ${f};`)})});const n=`:root {
2
- ${t.join(`
3
- `)}
4
- }`;let r=document.getElementById("cstu-theme-vars");r||(r=document.createElement("style"),r.id="cstu-theme-vars",document.head.appendChild(r)),r.textContent=n}function yt(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}function hn(e){const t=[];return Object.entries(e).forEach(([n,r])=>{r&&!yt(r)&&t.push(`Invalid hex color for ${n}: ${r}`)}),{valid:t.length===0,errors:t}}function wt(e,t){const n={...e};return Object.entries(t).forEach(([r,s])=>{s!==void 0&&(n[r]=s)}),n}function kt(e){return wt(Me,e)}function X(e,t){return{name:e,theme:kt(t),metadata:{created:new Date().toISOString(),version:"1.0.0"}}}const je={default:X("Default",Me),purple:X("Purple",{primary:"#8B5CF6",secondary:"#6B7280",success:"#10B981",warning:"#F59E0B",danger:"#EF4444",info:"#3B82F6"}),emerald:X("Emerald",{primary:"#10B981",secondary:"#6B7280",success:"#059669",warning:"#D97706",danger:"#DC2626",info:"#0891B2"}),rose:X("Rose",{primary:"#F43F5E",secondary:"#6B7280",success:"#10B981",warning:"#F59E0B",danger:"#EF4444",info:"#3B82F6"}),amber:X("Amber",{primary:"#F59E0B",secondary:"#6B7280",success:"#10B981",warning:"#D97706",danger:"#EF4444",info:"#3B82F6"})};function gn(e){return je[e]||null}function pn(){return Object.values(je)}function mn(e){const t=[],n=[];return Object.entries(e).forEach(([r,s])=>{s&&typeof s=="string"&&(yn(s)||t.push(`Invalid hex color for ${r}: ${s}`))}),e.primary&&e.secondary,{isValid:t.length===0,errors:t,warnings:n}}function yn(e){return/^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i.test(e)}function _t(e){const t=Pe(e);return{colors:$t(t),safelist:xt(t),plugins:Ct()}}function $t(e){const t={};return Object.entries(e).forEach(([n,r])=>{t[n]={},Object.entries(r).forEach(([s,c])=>{t[n][s]=`rgb(${c} / <alpha-value>)`})}),t}function wn(){const e=t=>`rgb(var(${t}) / <alpha-value>)`;return{"cstu-primary":{50:e("--cstu-primary-50"),100:e("--cstu-primary-100"),200:e("--cstu-primary-200"),300:e("--cstu-primary-300"),400:e("--cstu-primary-400"),450:e("--cstu-primary-450"),500:e("--cstu-primary-500"),550:e("--cstu-primary-550"),600:e("--cstu-primary-600"),700:e("--cstu-primary-700"),800:e("--cstu-primary-800"),900:e("--cstu-primary-900")},"cstu-secondary":{50:e("--cstu-secondary-50"),100:e("--cstu-secondary-100"),200:e("--cstu-secondary-200"),250:e("--cstu-secondary-250"),300:e("--cstu-secondary-300"),400:e("--cstu-secondary-400"),500:e("--cstu-secondary-500"),550:e("--cstu-secondary-550"),575:e("--cstu-secondary-575"),600:e("--cstu-secondary-600"),700:e("--cstu-secondary-700"),800:e("--cstu-secondary-800"),900:e("--cstu-secondary-900")},"cstu-success":{50:e("--cstu-success-50"),100:e("--cstu-success-100"),200:e("--cstu-success-200"),250:e("--cstu-success-250"),300:e("--cstu-success-300"),400:e("--cstu-success-400"),450:e("--cstu-success-450"),500:e("--cstu-success-500"),550:e("--cstu-success-550"),575:e("--cstu-success-575"),600:e("--cstu-success-600"),700:e("--cstu-success-700"),800:e("--cstu-success-800"),900:e("--cstu-success-900")},"cstu-warning":{50:e("--cstu-warning-50"),100:e("--cstu-warning-100"),200:e("--cstu-warning-200"),250:e("--cstu-warning-250"),300:e("--cstu-warning-300"),400:e("--cstu-warning-400"),450:e("--cstu-warning-450"),500:e("--cstu-warning-500"),550:e("--cstu-warning-550"),575:e("--cstu-warning-575"),600:e("--cstu-warning-600"),700:e("--cstu-warning-700"),800:e("--cstu-warning-800"),900:e("--cstu-warning-900")},"cstu-danger":{50:e("--cstu-danger-50"),100:e("--cstu-danger-100"),200:e("--cstu-danger-200"),250:e("--cstu-danger-250"),300:e("--cstu-danger-300"),400:e("--cstu-danger-400"),450:e("--cstu-danger-450"),500:e("--cstu-danger-500"),550:e("--cstu-danger-550"),575:e("--cstu-danger-575"),600:e("--cstu-danger-600"),700:e("--cstu-danger-700"),800:e("--cstu-danger-800"),900:e("--cstu-danger-900")},"cstu-info":{50:e("--cstu-info-50"),100:e("--cstu-info-100"),200:e("--cstu-info-200"),250:e("--cstu-info-250"),300:e("--cstu-info-300"),400:e("--cstu-info-400"),450:e("--cstu-info-450"),500:e("--cstu-info-500"),550:e("--cstu-info-550"),575:e("--cstu-info-575"),600:e("--cstu-info-600"),700:e("--cstu-info-700"),800:e("--cstu-info-800"),900:e("--cstu-info-900")},"cstu-blue":{50:e("--cstu-blue-50"),100:e("--cstu-blue-100"),200:e("--cstu-blue-200"),300:e("--cstu-blue-300"),400:e("--cstu-blue-400"),450:e("--cstu-blue-450"),500:e("--cstu-blue-500"),550:e("--cstu-blue-550"),600:e("--cstu-blue-600"),700:e("--cstu-blue-700"),800:e("--cstu-blue-800"),900:e("--cstu-blue-900")},"cstu-gray":{50:e("--cstu-gray-50"),100:e("--cstu-gray-100"),200:e("--cstu-gray-200"),250:e("--cstu-gray-250"),300:e("--cstu-gray-300"),400:e("--cstu-gray-400"),500:e("--cstu-gray-500"),550:e("--cstu-gray-550"),575:e("--cstu-gray-575"),600:e("--cstu-gray-600"),700:e("--cstu-gray-700"),800:e("--cstu-gray-800"),900:e("--cstu-gray-900")},"cstu-sea-blue":{50:e("--cstu-sea-blue-50"),100:e("--cstu-sea-blue-100"),200:e("--cstu-sea-blue-200"),300:e("--cstu-sea-blue-300"),400:e("--cstu-sea-blue-400"),500:e("--cstu-sea-blue-500"),600:e("--cstu-sea-blue-600"),700:e("--cstu-sea-blue-700"),800:e("--cstu-sea-blue-800"),900:e("--cstu-sea-blue-900")},"cstu-purple":{50:e("--cstu-purple-50"),100:e("--cstu-purple-100"),200:e("--cstu-purple-200"),300:e("--cstu-purple-300"),400:e("--cstu-purple-400"),500:e("--cstu-purple-500"),600:e("--cstu-purple-600"),700:e("--cstu-purple-700"),800:e("--cstu-purple-800"),900:e("--cstu-purple-900")},"cstu-green":{50:e("--cstu-green-50"),100:e("--cstu-green-100"),200:e("--cstu-green-200"),300:e("--cstu-green-300"),400:e("--cstu-green-400"),500:e("--cstu-green-500"),600:e("--cstu-green-600"),700:e("--cstu-green-700"),800:e("--cstu-green-800"),900:e("--cstu-green-900")},"cstu-yellow":{50:e("--cstu-yellow-50"),100:e("--cstu-yellow-100"),200:e("--cstu-yellow-200"),300:e("--cstu-yellow-300"),400:e("--cstu-yellow-400"),500:e("--cstu-yellow-500"),600:e("--cstu-yellow-600"),700:e("--cstu-yellow-700"),800:e("--cstu-yellow-800"),900:e("--cstu-yellow-900")},"cstu-orange":{50:e("--cstu-orange-50"),100:e("--cstu-orange-100"),200:e("--cstu-orange-200"),300:e("--cstu-orange-300"),400:e("--cstu-orange-400"),500:e("--cstu-orange-500"),600:e("--cstu-orange-600"),700:e("--cstu-orange-700"),800:e("--cstu-orange-800"),900:e("--cstu-orange-900")},"cstu-red":{50:e("--cstu-red-50"),100:e("--cstu-red-100"),200:e("--cstu-red-200"),300:e("--cstu-red-300"),400:e("--cstu-red-400"),500:e("--cstu-red-500"),600:e("--cstu-red-600"),700:e("--cstu-red-700"),800:e("--cstu-red-800"),900:e("--cstu-red-900")}}}function xt(e){const t=[],n=Object.keys(e),r=n[0],s=Object.keys(e[r]||{}),c=["bg","text","border","ring","shadow","hover:bg","hover:text","hover:border","focus:bg","focus:text","focus:border","focus:ring","dark:bg","dark:text","dark:border"];return n.forEach(o=>{s.forEach(f=>{c.forEach(a=>{t.push(`${a}-${o}-${f}`)})})}),t}function Ct(e){return[`
5
- plugin(function({ addUtilities, theme }) {
6
- const colors = theme('colors')
7
- const utilities = {}
8
-
9
- // Generate cstu- prefixed utilities
10
- Object.entries(colors).forEach(([colorName, shades]) => {
11
- if (typeof shades === 'object') {
12
- Object.entries(shades).forEach(([shade, value]) => {
13
- utilities[\`.cstu-bg-\${colorName}-\${shade}\`] = {
14
- backgroundColor: value
15
- }
16
- utilities[\`.cstu-text-\${colorName}-\${shade}\`] = {
17
- color: value
18
- }
19
- utilities[\`.cstu-border-\${colorName}-\${shade}\`] = {
20
- borderColor: value
21
- }
22
- })
23
- }
24
- })
25
-
26
- addUtilities(utilities)
27
- })
28
- `]}function Nt(e,t={}){const n=_t(e);return{content:t.content||["./src/**/*.{js,ts,jsx,tsx,vue}"],darkMode:t.darkMode||"class",theme:{extend:{colors:n.colors,...t.extendTheme||{}}},plugins:[...t.plugins||[]],safelist:n.safelist}}function kn(e,t={}){const n=Nt(e,t);return`const withOpacity = (hex) => \`rgb(var(\${hex}) / <alpha-value>)\`
29
-
30
- /** @type {import('tailwindcss').Config} */
31
- module.exports = ${JSON.stringify(n,null,2)}
32
- `}function _n(e){const t=Pe(e);let n=`:root {
33
- `;return Object.entries(t).forEach(([r,s])=>{Object.entries(s).forEach(([c,o])=>{n+=` --cstu-${r}-${c}: ${o};
34
- `})}),n+=`}
35
- `,n+=`
36
- .dark {
37
- `,n+=`}
38
- `,n}function $n(e){return`import { ThemeProvider } from '@your-org/design-system'
39
- import { useTheme } from '@your-org/design-system'
40
-
41
- // Your custom theme
42
- const customTheme = ${JSON.stringify(e,null,2)}
43
-
44
- // In your main app file
45
- export default function App() {
46
- return (
47
- <ThemeProvider initialTheme={customTheme}>
48
- <YourApp />
49
- </ThemeProvider>
50
- )
51
- }
52
-
53
- // In your components
54
- export function MyComponent() {
55
- const { theme, setColors } = useTheme()
56
-
57
- // Access theme colors
58
- const primaryColor = theme.value.primary
59
-
60
- return (
61
- <div className="bg-primary-500 text-white">
62
- Your content here
63
- </div>
64
- )
65
- }
66
- `}exports.applyTheme=bn;exports.chroma=w;exports.createThemePreset=X;exports.defaultPalettes=mt;exports.defaultTheme=Me;exports.exportTailwindConfig=kn;exports.extendTheme=kt;exports.generateCSSCustomProperties=_n;exports.generateCstuColorConfig=wn;exports.generateFullTailwindConfig=Nt;exports.generateIntegrationCode=$n;exports.generatePalette=Pe;exports.generatePlugins=Ct;exports.generateSafelist=xt;exports.generateShades=pt;exports.generateTailwindColors=$t;exports.generateTailwindConfig=_t;exports.getThemePreset=gn;exports.getThemePresets=pn;exports.isValidHexColor=yt;exports.mergeThemes=wt;exports.themePresets=je;exports.validateTheme=mn;exports.validateThemeOptions=hn;
@@ -1,107 +0,0 @@
1
- declare type ColorName = 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'green' | 'yellow' | 'orange' | 'red';
2
-
3
- /**
4
- * Create a theme preset - a predefined theme configuration
5
- */
6
- export declare function createThemePreset(name: string, theme: Partial<ThemeOptions>): ThemePreset;
7
-
8
- /**
9
- * Export configuration as a string that can be written to tailwind.config.js
10
- */
11
- export declare function exportTailwindConfig(theme: ThemeOptions, options?: TailwindConfigOptions): string;
12
-
13
- /**
14
- * Extend the default theme with custom colors
15
- */
16
- export declare function extendTheme(customTheme: Partial<ThemeOptions>): ThemeOptions;
17
-
18
- /**
19
- * Generate complete CSTU color configuration for client-side usage
20
- * Returns static color config matching tailwind.config.js with cstu- prefix
21
- * Usage: cstu-bg-primary-500, cstu-text-danger-600, etc.
22
- */
23
- export declare function generateCstuColorConfig(): Record<string, Record<string, string>>;
24
-
25
- export declare function generatePalette(options: ThemeOptions): Palette;
26
-
27
- /**
28
- * Generate Tailwind safelist patterns for dynamic classes
29
- */
30
- export declare function generateSafelist(palette: Palette): string[];
31
-
32
- /**
33
- * Generate Tailwind color configuration from palette using direct RGB values
34
- */
35
- export declare function generateTailwindColors(palette: Palette): Record<string, Record<string, string>>;
36
-
37
- /**
38
- * Deep merge two theme objects, with the second theme taking precedence
39
- */
40
- export declare function mergeThemes(baseTheme: ThemeOptions, extendTheme: Partial<ThemeOptions>): ThemeOptions;
41
-
42
- /**
43
- * A mapping of color -> shade -> hex string
44
- */
45
- export declare type Palette = Record<ColorName, Record<Shade, string>>;
46
-
47
- export declare type Shade = 50 | 100 | 200 | 250 | 300 | 400 | 450 | 500 | 550 | 575 | 600 | 700 | 800 | 900;
48
-
49
- declare interface TailwindConfigOptions {
50
- content?: string[];
51
- darkMode?: 'media' | 'class';
52
- extendTheme?: Record<string, any>;
53
- plugins?: any[];
54
- }
55
-
56
- export declare interface ThemeOptions {
57
- /** Seed color to generate primary palette. Hex string */
58
- primary?: string;
59
- /** Seed color to generate secondary/gray palette */
60
- secondary?: string;
61
- /** Seed color to generate success palette */
62
- success?: string;
63
- /** Seed color to generate warning palette */
64
- warning?: string;
65
- /** Seed color to generate danger palette */
66
- danger?: string;
67
- /** Seed color to generate info palette */
68
- info?: string;
69
- /** Seed color to generate green palette (legacy) */
70
- green?: string;
71
- /** Seed color to generate yellow palette (legacy) */
72
- yellow?: string;
73
- /** Seed color to generate orange palette (legacy) */
74
- orange?: string;
75
- /** Seed color to generate red palette (legacy) */
76
- red?: string;
77
- }
78
-
79
- /**
80
- * Theme preset interface
81
- */
82
- export declare interface ThemePreset {
83
- name: string;
84
- theme: ThemeOptions;
85
- metadata: {
86
- created: string;
87
- version: string;
88
- description?: string;
89
- author?: string;
90
- };
91
- }
92
-
93
- /**
94
- * Theme validation result
95
- */
96
- export declare interface ThemeValidationResult {
97
- isValid: boolean;
98
- errors: string[];
99
- warnings: string[];
100
- }
101
-
102
- /**
103
- * Validate a theme configuration
104
- */
105
- export declare function validateTheme(theme: Partial<ThemeOptions>): ThemeValidationResult;
106
-
107
- export { }
package/dist/tailwind.js DELETED
@@ -1,12 +0,0 @@
1
- import { b as s, p as t, e as r, k as n, g as o, l as g, j as i, m as l, v as m } from "./tailwind-151a5d8c.js";
2
- export {
3
- s as createThemePreset,
4
- t as exportTailwindConfig,
5
- r as extendTheme,
6
- n as generateCstuColorConfig,
7
- o as generatePalette,
8
- g as generateSafelist,
9
- i as generateTailwindColors,
10
- l as mergeThemes,
11
- m as validateTheme
12
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./tailwind-e7334431.cjs");exports.createThemePreset=e.createThemePreset;exports.exportTailwindConfig=e.exportTailwindConfig;exports.extendTheme=e.extendTheme;exports.generateCstuColorConfig=e.generateCstuColorConfig;exports.generatePalette=e.generatePalette;exports.generateSafelist=e.generateSafelist;exports.generateTailwindColors=e.generateTailwindColors;exports.mergeThemes=e.mergeThemes;exports.validateTheme=e.validateTheme;