@sudobility/ratelimit-components 1.0.7 → 1.0.10
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/components/UsageDashboard.d.ts.map +1 -1
- package/dist/index.esm.js +588 -564
- package/dist/index.umd.js +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -8
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(S,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("react/jsx-runtime"),require("react"),require("recharts")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","recharts"],s):(S=typeof globalThis<"u"?globalThis:S||self,s(S.RatelimitComponents={},S.ReactJSXRuntime,S.React,S.Recharts))})(this,(function(S,s,oe,I){"use strict";function me(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=me(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function ue(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=me(e))&&(o&&(o+=" "),o+=t);return o}const ge=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,pe=ue,_e=(e,t)=>r=>{var o;if(t?.variants==null)return pe(e,r?.class,r?.className);const{variants:n,defaultVariants:d}=t,a=Object.keys(n).map(m=>{const x=r?.[m],h=d?.[m];if(x===null)return null;const b=ge(x)||ge(h);return n[m][b]}),g=r&&Object.entries(r).reduce((m,x)=>{let[h,b]=x;return b===void 0||(m[h]=b),m},{}),c=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((m,x)=>{let{class:h,className:b,...y}=x;return Object.entries(y).every(L=>{let[N,v]=L;return Array.isArray(v)?v.includes({...d,...g}[N]):{...d,...g}[N]===v})?[...m,h,b]:m},[]);return pe(e,a,c,r?.class,r?.className)},$e=(e,t)=>{const r=new Array(e.length+t.length);for(let o=0;o<e.length;o++)r[o]=e[o];for(let o=0;o<t.length;o++)r[e.length+o]=t[o];return r},qe=(e,t)=>({classGroupId:e,validator:t}),be=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),X="-",fe=[],Be="arbitrary..",He=e=>{const t=Xe(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Ye(a);const g=a.split(X),c=g[0]===""&&g.length>1?1:0;return he(g,c,t)},getConflictingClassGroupIds:(a,g)=>{if(g){const c=o[a],m=r[a];return c?m?$e(m,c):c:m||fe}return r[a]||fe}}},he=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],d=r.nextPart.get(n);if(d){const m=he(e,t+1,d);if(m)return m}const a=r.validators;if(a===null)return;const g=t===0?e.join(X):e.slice(t).join(X),c=a.length;for(let m=0;m<c;m++){const x=a[m];if(x.validator(g))return x.classGroupId}},Ye=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),o=t.slice(0,r);return o?Be+o:void 0})(),Xe=e=>{const{theme:t,classGroups:r}=e;return Ke(r,t)},Ke=(e,t)=>{const r=be();for(const o in e){const n=e[o];se(n,r,o,t)}return r},se=(e,t,r,o)=>{const n=e.length;for(let d=0;d<n;d++){const a=e[d];Je(a,t,r,o)}},Je=(e,t,r,o)=>{if(typeof e=="string"){Qe(e,t,r);return}if(typeof e=="function"){Ze(e,t,r,o);return}Re(e,t,r,o)},Qe=(e,t,r)=>{const o=e===""?t:xe(t,e);o.classGroupId=r},Ze=(e,t,r,o)=>{if(er(e)){se(e(o),t,r,o);return}t.validators===null&&(t.validators=[]),t.validators.push(qe(r,e))},Re=(e,t,r,o)=>{const n=Object.entries(e),d=n.length;for(let a=0;a<d;a++){const[g,c]=n[a];se(c,xe(t,g),r,o)}},xe=(e,t)=>{let r=e;const o=t.split(X),n=o.length;for(let d=0;d<n;d++){const a=o[d];let g=r.nextPart.get(a);g||(g=be(),r.nextPart.set(a,g)),r=g}return r},er=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,rr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),o=Object.create(null);const n=(d,a)=>{r[d]=a,t++,t>e&&(t=0,o=r,r=Object.create(null))};return{get(d){let a=r[d];if(a!==void 0)return a;if((a=o[d])!==void 0)return n(d,a),a},set(d,a){d in r?r[d]=a:n(d,a)}}},ae="!",ye=":",tr=[],ke=(e,t,r,o,n)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:o,isExternal:n}),or=e=>{const{prefix:t,experimentalParseClassName:r}=e;let o=n=>{const d=[];let a=0,g=0,c=0,m;const x=n.length;for(let N=0;N<x;N++){const v=n[N];if(a===0&&g===0){if(v===ye){d.push(n.slice(c,N)),c=N+1;continue}if(v==="/"){m=N;continue}}v==="["?a++:v==="]"?a--:v==="("?g++:v===")"&&g--}const h=d.length===0?n:n.slice(c);let b=h,y=!1;h.endsWith(ae)?(b=h.slice(0,-1),y=!0):h.startsWith(ae)&&(b=h.slice(1),y=!0);const L=m&&m>c?m-c:void 0;return ke(d,y,b,L)};if(t){const n=t+ye,d=o;o=a=>a.startsWith(n)?d(a.slice(n.length)):ke(tr,!1,a,void 0,!0)}if(r){const n=o;o=d=>r({className:d,parseClassName:n})}return o},sr=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,o)=>{t.set(r,1e6+o)}),r=>{const o=[];let n=[];for(let d=0;d<r.length;d++){const a=r[d],g=a[0]==="[",c=t.has(a);g||c?(n.length>0&&(n.sort(),o.push(...n),n=[]),o.push(a)):n.push(a)}return n.length>0&&(n.sort(),o.push(...n)),o}},ar=e=>({cache:rr(e.cacheSize),parseClassName:or(e),sortModifiers:sr(e),...He(e)}),nr=/\s+/,lr=(e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n,sortModifiers:d}=t,a=[],g=e.trim().split(nr);let c="";for(let m=g.length-1;m>=0;m-=1){const x=g[m],{isExternal:h,modifiers:b,hasImportantModifier:y,baseClassName:L,maybePostfixModifierPosition:N}=r(x);if(h){c=x+(c.length>0?" "+c:c);continue}let v=!!N,V=o(v?L.substring(0,N):L);if(!V){if(!v){c=x+(c.length>0?" "+c:c);continue}if(V=o(L),!V){c=x+(c.length>0?" "+c:c);continue}v=!1}const Q=b.length===0?"":b.length===1?b[0]:d(b).join(":"),H=y?Q+ae:Q,F=H+V;if(a.indexOf(F)>-1)continue;a.push(F);const _=n(V,v);for(let O=0;O<_.length;++O){const Y=_[O];a.push(H+Y)}c=x+(c.length>0?" "+c:c)}return c},ir=(...e)=>{let t=0,r,o,n="";for(;t<e.length;)(r=e[t++])&&(o=we(r))&&(n&&(n+=" "),n+=o);return n},we=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=we(e[o]))&&(r&&(r+=" "),r+=t);return r},cr=(e,...t)=>{let r,o,n,d;const a=c=>{const m=t.reduce((x,h)=>h(x),e());return r=ar(m),o=r.cache.get,n=r.cache.set,d=g,g(c)},g=c=>{const m=o(c);if(m)return m;const x=lr(c,r);return n(c,x),x};return d=a,(...c)=>d(ir(...c))},dr=[],k=e=>{const t=r=>r[e]||dr;return t.isThemeGetter=!0,t},ve=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ne=/^\((?:(\w[\w-]*):)?(.+)\)$/i,mr=/^\d+\/\d+$/,ur=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,pr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,br=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,D=e=>mr.test(e),f=e=>!!e&&!Number.isNaN(Number(e)),j=e=>!!e&&Number.isInteger(Number(e)),ne=e=>e.endsWith("%")&&f(e.slice(0,-1)),A=e=>ur.test(e),hr=()=>!0,xr=e=>gr.test(e)&&!pr.test(e),Ce=()=>!1,yr=e=>br.test(e),kr=e=>fr.test(e),wr=e=>!l(e)&&!i(e),vr=e=>E(e,Me,Ce),l=e=>ve.test(e),G=e=>E(e,Te,xr),le=e=>E(e,Sr,f),Le=e=>E(e,Se,Ce),Nr=e=>E(e,Ae,kr),K=e=>E(e,Pe,yr),i=e=>Ne.test(e),q=e=>W(e,Te),Cr=e=>W(e,Ar),ze=e=>W(e,Se),Lr=e=>W(e,Me),zr=e=>W(e,Ae),J=e=>W(e,Pe,!0),E=(e,t,r)=>{const o=ve.exec(e);return o?o[1]?t(o[1]):r(o[2]):!1},W=(e,t,r=!1)=>{const o=Ne.exec(e);return o?o[1]?t(o[1]):r:!1},Se=e=>e==="position"||e==="percentage",Ae=e=>e==="image"||e==="url",Me=e=>e==="length"||e==="size"||e==="bg-size",Te=e=>e==="length",Sr=e=>e==="number",Ar=e=>e==="family-name",Pe=e=>e==="shadow",Mr=cr(()=>{const e=k("color"),t=k("font"),r=k("text"),o=k("font-weight"),n=k("tracking"),d=k("leading"),a=k("breakpoint"),g=k("container"),c=k("spacing"),m=k("radius"),x=k("shadow"),h=k("inset-shadow"),b=k("text-shadow"),y=k("drop-shadow"),L=k("blur"),N=k("perspective"),v=k("aspect"),V=k("ease"),Q=k("animate"),H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...F(),i,l],O=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto","contain","none"],p=()=>[i,l,c],T=()=>[D,"full","auto",...p()],Ge=()=>[j,"none","subgrid",i,l],Ve=()=>["auto",{span:["full",j,i,l]},j,i,l],Z=()=>[j,"auto",i,l],Oe=()=>["auto","min","max","fr",i,l],ie=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],$=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...p()],U=()=>[D,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...p()],u=()=>[e,i,l],Ue=()=>[...F(),ze,Le,{position:[i,l]}],De=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ee=()=>["auto","cover","contain",Lr,vr,{size:[i,l]}],ce=()=>[ne,q,G],C=()=>["","none","full",m,i,l],z=()=>["",f,q,G],R=()=>["solid","dashed","dotted","double"],We=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],w=()=>[f,ne,ze,Le],Fe=()=>["","none",L,i,l],ee=()=>["none",f,i,l],re=()=>["none",f,i,l],de=()=>[f,i,l],te=()=>[D,"full",...p()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[A],breakpoint:[A],color:[hr],container:[A],"drop-shadow":[A],ease:["in","out","in-out"],font:[wr],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[A],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[A],shadow:[A],spacing:["px",f],text:[A],"text-shadow":[A],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",D,l,i,v]}],container:["container"],columns:[{columns:[f,l,i,g]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:Y()}],"overscroll-x":[{"overscroll-x":Y()}],"overscroll-y":[{"overscroll-y":Y()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[j,"auto",i,l]}],basis:[{basis:[D,"full","auto",g,...p()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[f,D,"auto","initial","none",l]}],grow:[{grow:["",f,i,l]}],shrink:[{shrink:["",f,i,l]}],order:[{order:[j,"first","last","none",i,l]}],"grid-cols":[{"grid-cols":Ge()}],"col-start-end":[{col:Ve()}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":Ge()}],"row-start-end":[{row:Ve()}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Oe()}],"auto-rows":[{"auto-rows":Oe()}],gap:[{gap:p()}],"gap-x":[{"gap-x":p()}],"gap-y":[{"gap-y":p()}],"justify-content":[{justify:[...ie(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...ie()]}],"align-items":[{items:[...$(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...$(),{baseline:["","last"]}]}],"place-content":[{"place-content":ie()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:p()}],px:[{px:p()}],py:[{py:p()}],ps:[{ps:p()}],pe:[{pe:p()}],pt:[{pt:p()}],pr:[{pr:p()}],pb:[{pb:p()}],pl:[{pl:p()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":p()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":p()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[g,"screen",...U()]}],"min-w":[{"min-w":[g,"screen","none",...U()]}],"max-w":[{"max-w":[g,"screen","none","prose",{screen:[a]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",r,q,G]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,i,le]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ne,l]}],"font-family":[{font:[Cr,l,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,i,l]}],"line-clamp":[{"line-clamp":[f,"none",i,le]}],leading:[{leading:[d,...p()]}],"list-image":[{"list-image":["none",i,l]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",i,l]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:u()}],"text-color":[{text:u()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...R(),"wavy"]}],"text-decoration-thickness":[{decoration:[f,"from-font","auto",i,G]}],"text-decoration-color":[{decoration:u()}],"underline-offset":[{"underline-offset":[f,"auto",i,l]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:p()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",i,l]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",i,l]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Ue()}],"bg-repeat":[{bg:De()}],"bg-size":[{bg:Ee()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},j,i,l],radial:["",i,l],conic:[j,i,l]},zr,Nr]}],"bg-color":[{bg:u()}],"gradient-from-pos":[{from:ce()}],"gradient-via-pos":[{via:ce()}],"gradient-to-pos":[{to:ce()}],"gradient-from":[{from:u()}],"gradient-via":[{via:u()}],"gradient-to":[{to:u()}],rounded:[{rounded:C()}],"rounded-s":[{"rounded-s":C()}],"rounded-e":[{"rounded-e":C()}],"rounded-t":[{"rounded-t":C()}],"rounded-r":[{"rounded-r":C()}],"rounded-b":[{"rounded-b":C()}],"rounded-l":[{"rounded-l":C()}],"rounded-ss":[{"rounded-ss":C()}],"rounded-se":[{"rounded-se":C()}],"rounded-ee":[{"rounded-ee":C()}],"rounded-es":[{"rounded-es":C()}],"rounded-tl":[{"rounded-tl":C()}],"rounded-tr":[{"rounded-tr":C()}],"rounded-br":[{"rounded-br":C()}],"rounded-bl":[{"rounded-bl":C()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...R(),"hidden","none"]}],"divide-style":[{divide:[...R(),"hidden","none"]}],"border-color":[{border:u()}],"border-color-x":[{"border-x":u()}],"border-color-y":[{"border-y":u()}],"border-color-s":[{"border-s":u()}],"border-color-e":[{"border-e":u()}],"border-color-t":[{"border-t":u()}],"border-color-r":[{"border-r":u()}],"border-color-b":[{"border-b":u()}],"border-color-l":[{"border-l":u()}],"divide-color":[{divide:u()}],"outline-style":[{outline:[...R(),"none","hidden"]}],"outline-offset":[{"outline-offset":[f,i,l]}],"outline-w":[{outline:["",f,q,G]}],"outline-color":[{outline:u()}],shadow:[{shadow:["","none",x,J,K]}],"shadow-color":[{shadow:u()}],"inset-shadow":[{"inset-shadow":["none",h,J,K]}],"inset-shadow-color":[{"inset-shadow":u()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:u()}],"ring-offset-w":[{"ring-offset":[f,G]}],"ring-offset-color":[{"ring-offset":u()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":u()}],"text-shadow":[{"text-shadow":["none",b,J,K]}],"text-shadow-color":[{"text-shadow":u()}],opacity:[{opacity:[f,i,l]}],"mix-blend":[{"mix-blend":[...We(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":We()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[f]}],"mask-image-linear-from-pos":[{"mask-linear-from":w()}],"mask-image-linear-to-pos":[{"mask-linear-to":w()}],"mask-image-linear-from-color":[{"mask-linear-from":u()}],"mask-image-linear-to-color":[{"mask-linear-to":u()}],"mask-image-t-from-pos":[{"mask-t-from":w()}],"mask-image-t-to-pos":[{"mask-t-to":w()}],"mask-image-t-from-color":[{"mask-t-from":u()}],"mask-image-t-to-color":[{"mask-t-to":u()}],"mask-image-r-from-pos":[{"mask-r-from":w()}],"mask-image-r-to-pos":[{"mask-r-to":w()}],"mask-image-r-from-color":[{"mask-r-from":u()}],"mask-image-r-to-color":[{"mask-r-to":u()}],"mask-image-b-from-pos":[{"mask-b-from":w()}],"mask-image-b-to-pos":[{"mask-b-to":w()}],"mask-image-b-from-color":[{"mask-b-from":u()}],"mask-image-b-to-color":[{"mask-b-to":u()}],"mask-image-l-from-pos":[{"mask-l-from":w()}],"mask-image-l-to-pos":[{"mask-l-to":w()}],"mask-image-l-from-color":[{"mask-l-from":u()}],"mask-image-l-to-color":[{"mask-l-to":u()}],"mask-image-x-from-pos":[{"mask-x-from":w()}],"mask-image-x-to-pos":[{"mask-x-to":w()}],"mask-image-x-from-color":[{"mask-x-from":u()}],"mask-image-x-to-color":[{"mask-x-to":u()}],"mask-image-y-from-pos":[{"mask-y-from":w()}],"mask-image-y-to-pos":[{"mask-y-to":w()}],"mask-image-y-from-color":[{"mask-y-from":u()}],"mask-image-y-to-color":[{"mask-y-to":u()}],"mask-image-radial":[{"mask-radial":[i,l]}],"mask-image-radial-from-pos":[{"mask-radial-from":w()}],"mask-image-radial-to-pos":[{"mask-radial-to":w()}],"mask-image-radial-from-color":[{"mask-radial-from":u()}],"mask-image-radial-to-color":[{"mask-radial-to":u()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":F()}],"mask-image-conic-pos":[{"mask-conic":[f]}],"mask-image-conic-from-pos":[{"mask-conic-from":w()}],"mask-image-conic-to-pos":[{"mask-conic-to":w()}],"mask-image-conic-from-color":[{"mask-conic-from":u()}],"mask-image-conic-to-color":[{"mask-conic-to":u()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Ue()}],"mask-repeat":[{mask:De()}],"mask-size":[{mask:Ee()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",i,l]}],filter:[{filter:["","none",i,l]}],blur:[{blur:Fe()}],brightness:[{brightness:[f,i,l]}],contrast:[{contrast:[f,i,l]}],"drop-shadow":[{"drop-shadow":["","none",y,J,K]}],"drop-shadow-color":[{"drop-shadow":u()}],grayscale:[{grayscale:["",f,i,l]}],"hue-rotate":[{"hue-rotate":[f,i,l]}],invert:[{invert:["",f,i,l]}],saturate:[{saturate:[f,i,l]}],sepia:[{sepia:["",f,i,l]}],"backdrop-filter":[{"backdrop-filter":["","none",i,l]}],"backdrop-blur":[{"backdrop-blur":Fe()}],"backdrop-brightness":[{"backdrop-brightness":[f,i,l]}],"backdrop-contrast":[{"backdrop-contrast":[f,i,l]}],"backdrop-grayscale":[{"backdrop-grayscale":["",f,i,l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f,i,l]}],"backdrop-invert":[{"backdrop-invert":["",f,i,l]}],"backdrop-opacity":[{"backdrop-opacity":[f,i,l]}],"backdrop-saturate":[{"backdrop-saturate":[f,i,l]}],"backdrop-sepia":[{"backdrop-sepia":["",f,i,l]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":p()}],"border-spacing-x":[{"border-spacing-x":p()}],"border-spacing-y":[{"border-spacing-y":p()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",i,l]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[f,"initial",i,l]}],ease:[{ease:["linear","initial",V,i,l]}],delay:[{delay:[f,i,l]}],animate:[{animate:["none",Q,i,l]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,i,l]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:re()}],"scale-x":[{"scale-x":re()}],"scale-y":[{"scale-y":re()}],"scale-z":[{"scale-z":re()}],"scale-3d":["scale-3d"],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[i,l,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:te()}],"translate-x":[{"translate-x":te()}],"translate-y":[{"translate-y":te()}],"translate-z":[{"translate-z":te()}],"translate-none":["translate-none"],accent:[{accent:u()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:u()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",i,l]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":p()}],"scroll-mx":[{"scroll-mx":p()}],"scroll-my":[{"scroll-my":p()}],"scroll-ms":[{"scroll-ms":p()}],"scroll-me":[{"scroll-me":p()}],"scroll-mt":[{"scroll-mt":p()}],"scroll-mr":[{"scroll-mr":p()}],"scroll-mb":[{"scroll-mb":p()}],"scroll-ml":[{"scroll-ml":p()}],"scroll-p":[{"scroll-p":p()}],"scroll-px":[{"scroll-px":p()}],"scroll-py":[{"scroll-py":p()}],"scroll-ps":[{"scroll-ps":p()}],"scroll-pe":[{"scroll-pe":p()}],"scroll-pt":[{"scroll-pt":p()}],"scroll-pr":[{"scroll-pr":p()}],"scroll-pb":[{"scroll-pb":p()}],"scroll-pl":[{"scroll-pl":p()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",i,l]}],fill:[{fill:["none",...u()]}],"stroke-w":[{stroke:[f,q,G,le]}],stroke:[{stroke:["none",...u()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function M(...e){return Mr(ue(e))}const Tr=_e("h-full rounded-full transition-all duration-300",{variants:{color:{blue:"bg-blue-500",green:"bg-green-500",yellow:"bg-yellow-500",red:"bg-red-500",purple:"bg-purple-500"}},defaultVariants:{color:"blue"}});function Ie(e,t){return t===null||t===0?0:Math.min(100,e/t*100)}function Pr(e,t){if(t===null)return"green";const r=Ie(e,t);return r>=90?"red":r>=70?"yellow":"blue"}const Ir=({config:e,showPercentage:t=!0,showRemaining:r=!0,labels:o})=>{const{label:n,used:d,limit:a,color:g}=e,c=Ie(d,a),m=g??Pr(d,a),x=a!==null?Math.max(0,a-d):null,h=a===null;return s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:n}),s.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:[d.toLocaleString()," ",o.usedLabel,!h&&` / ${a.toLocaleString()} ${o.limitLabel}`,h&&` (${o.unlimitedLabel})`]})]}),!h&&s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"h-3 w-full rounded-full bg-gray-200 dark:bg-gray-700",children:s.jsx("div",{className:M(Tr({color:m})),style:{width:`${c}%`}})}),t&&s.jsxs("span",{className:"absolute right-0 top-4 text-xs text-gray-500 dark:text-gray-400",children:[c.toFixed(0),"%"]})]}),h&&s.jsx("div",{className:"h-3 w-full rounded-full bg-green-100 dark:bg-green-900/30",children:s.jsx("div",{className:"h-full w-full rounded-full bg-green-500/20"})}),r&&x!==null&&s.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:[x.toLocaleString()," ",o.remainingLabel]})]})},B={title:"Usage",usedLabel:"used",limitLabel:"limit",unlimitedLabel:"Unlimited",remainingLabel:"remaining"},jr=({usageBars:e,currentTierName:t,labels:r,onUpgradeClick:o,upgradeButtonLabel:n="Upgrade",className:d,showPercentage:a=!0,showRemaining:g=!0,onTrack:c,trackingLabel:m,componentName:x="UsageDashboard"})=>{const h={...B,...r},b=()=>{c?.({action:"upgrade_click",trackingLabel:m,componentName:x}),o?.()};return s.jsxs("div",{className:M("rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800",d),children:[s.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:h.title}),t&&s.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:t})]}),o&&s.jsx("button",{onClick:b,className:"rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800",children:n})]}),s.jsx("div",{className:"space-y-6",children:e.map((y,L)=>s.jsx(Ir,{config:y,showPercentage:a,showRemaining:g,labels:{usedLabel:h.usedLabel??B.usedLabel,limitLabel:h.limitLabel??B.limitLabel,unlimitedLabel:h.unlimitedLabel??B.unlimitedLabel,remainingLabel:h.remainingLabel??B.remainingLabel}},`${y.label}-${L}`))})]})},je={title:"Plan Comparison",tierHeader:"Plan",hourlyHeader:"Hourly",dailyHeader:"Daily",monthlyHeader:"Monthly",unlimitedLabel:"Unlimited",currentTierBadge:"Current"};function Gr(e){return e.toLocaleString()}const Vr=({tiers:e,labels:t,onTierSelect:r,className:o,formatNumber:n=Gr,onTrack:d,trackingLabel:a,componentName:g="TierComparisonTable"})=>{const c={...je,...t},m=b=>{d?.({action:"tier_select",trackingLabel:a,componentName:g}),r?.(b)},x=b=>b===null?c.unlimitedLabel??je.unlimitedLabel:n(b),h=b=>{const y=b===null;return s.jsx("span",{className:M("text-sm",y?"font-medium text-green-600 dark:text-green-400":"text-gray-700 dark:text-gray-300"),children:x(b)})};return s.jsxs("div",{className:M("rounded-lg border border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-800",o),children:[c.title&&s.jsx("div",{className:"border-b border-gray-200 px-6 py-4 dark:border-gray-700",children:s.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:c.title})}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-gray-200 bg-gray-50 dark:border-gray-700 dark:bg-gray-900/50",children:[s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400",children:c.tierHeader}),s.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400",children:c.hourlyHeader}),s.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400",children:c.dailyHeader}),s.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400",children:c.monthlyHeader})]})}),s.jsx("tbody",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:e.map(b=>s.jsxs("tr",{onClick:()=>m(b.id),className:M("transition-colors",b.isHighlighted&&"bg-blue-50 dark:bg-blue-900/20",b.isCurrent&&"bg-green-50 dark:bg-green-900/20",r&&"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700/50"),children:[s.jsx("td",{className:"whitespace-nowrap px-6 py-4",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:M("text-sm font-medium",b.isCurrent?"text-green-700 dark:text-green-400":b.isHighlighted?"text-blue-700 dark:text-blue-400":"text-gray-900 dark:text-white"),children:b.name}),b.isCurrent&&s.jsx("span",{className:"inline-flex items-center rounded-full bg-green-100 px-2 py-0.5 text-xs font-medium text-green-700 dark:bg-green-900/50 dark:text-green-400",children:c.currentTierBadge})]})}),s.jsx("td",{className:"whitespace-nowrap px-6 py-4 text-right",children:h(b.hourlyLimit)}),s.jsx("td",{className:"whitespace-nowrap px-6 py-4 text-right",children:h(b.dailyLimit)}),s.jsx("td",{className:"whitespace-nowrap px-6 py-4 text-right",children:h(b.monthlyLimit)})]},b.id))})]})})]})},Or={title:"Usage History",requestsLabel:"Requests",limitLabel:"Limit",periodLabel:"Period",noDataLabel:"No usage data available"};function Ur(e,t){const r=new Date(e);switch(t){case"hour":return r.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"});case"day":return r.toLocaleDateString(void 0,{month:"short",day:"numeric"});case"month":return r.toLocaleDateString(void 0,{month:"short",year:"numeric"});default:return e}}const Dr=({active:e,payload:t,label:r,labels:o,limit:n})=>{if(!e||!t||t.length===0)return null;const d=t[0].value;return s.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-3 shadow-lg dark:border-gray-700 dark:bg-gray-800",children:[s.jsx("p",{className:"mb-1 text-sm font-medium text-gray-900 dark:text-white",children:r}),s.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:[o.requestsLabel,":"," ",s.jsx("span",{className:"font-medium",children:d.toLocaleString()})]}),n!==null&&s.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:[o.limitLabel,":"," ",s.jsx("span",{className:"font-medium",children:n.toLocaleString()})]})]})},Er=({entries:e,periodType:t,labels:r,height:o=300,className:n,formatDate:d=Ur,barColor:a="#3b82f6",limitLineColor:g="#ef4444",showLimitLine:c=!0})=>{const m={...Or,...r},x=oe.useMemo(()=>e.map(y=>({name:d(y.periodStart,t),requests:y.requestCount,limit:y.limit})),[e,d,t]),h=oe.useMemo(()=>e.find(L=>L.limit!==null)?.limit??null,[e]),b=oe.useMemo(()=>{const y=Math.max(...e.map(N=>N.requestCount),0);return Math.max(y,h??0)*1.1},[e,h]);return e.length===0?s.jsx("div",{className:M("flex items-center justify-center rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800",n),style:{height:o},children:s.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:m.noDataLabel})}):s.jsxs("div",{className:M("rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800",n),children:[m.title&&s.jsx("h3",{className:"mb-4 text-lg font-semibold text-gray-900 dark:text-white",children:m.title}),s.jsx(I.ResponsiveContainer,{width:"100%",height:o,children:s.jsxs(I.LineChart,{data:x,margin:{top:20,right:30,left:20,bottom:5},children:[s.jsx(I.CartesianGrid,{strokeDasharray:"3 3",className:"stroke-gray-200 dark:stroke-gray-700"}),s.jsx(I.XAxis,{dataKey:"name",tick:{fontSize:12},className:"text-gray-600 dark:text-gray-400"}),s.jsx(I.YAxis,{domain:[0,b],tick:{fontSize:12},className:"text-gray-600 dark:text-gray-400",tickFormatter:y=>y.toLocaleString()}),s.jsx(I.Tooltip,{content:s.jsx(Dr,{labels:m,limit:h})}),s.jsx(I.Line,{type:"monotone",dataKey:"requests",stroke:a,strokeWidth:2,dot:{fill:a,strokeWidth:2,r:4},activeDot:{r:6,strokeWidth:2},name:m.requestsLabel}),c&&h!==null&&s.jsx(I.ReferenceLine,{y:h,stroke:g,strokeDasharray:"5 5",strokeWidth:2,label:{value:m.limitLabel,position:"right",fill:g,fontSize:12}})]})}),s.jsxs("div",{className:"mt-4 flex items-center justify-center gap-6",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"h-0.5 w-4 rounded",style:{backgroundColor:a}}),s.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:m.requestsLabel})]}),c&&h!==null&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"h-0.5 w-4",style:{backgroundColor:g,borderStyle:"dashed"}}),s.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:m.limitLabel})]})]})]})};S.TierComparisonTable=Vr,S.UsageDashboard=jr,S.UsageHistoryChart=Er,S.cn=M,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(S,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("react/jsx-runtime"),require("react"),require("recharts")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","recharts"],s):(S=typeof globalThis<"u"?globalThis:S||self,s(S.RatelimitComponents={},S.ReactJSXRuntime,S.React,S.Recharts))})(this,(function(S,s,oe,j){"use strict";function me(e){var o,t,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(o=0;o<n;o++)e[o]&&(t=me(e[o]))&&(r&&(r+=" "),r+=t)}else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function ue(){for(var e,o,t=0,r="",n=arguments.length;t<n;t++)(e=arguments[t])&&(o=me(e))&&(r&&(r+=" "),r+=o);return r}const ge=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,be=ue,Fe=(e,o)=>t=>{var r;if(o?.variants==null)return be(e,t?.class,t?.className);const{variants:n,defaultVariants:l}=o,a=Object.keys(n).map(m=>{const x=t?.[m],h=l?.[m];if(x===null)return null;const b=ge(x)||ge(h);return n[m][b]}),u=t&&Object.entries(t).reduce((m,x)=>{let[h,b]=x;return b===void 0||(m[h]=b),m},{}),d=o==null||(r=o.compoundVariants)===null||r===void 0?void 0:r.reduce((m,x)=>{let{class:h,className:b,...y}=x;return Object.entries(y).every(L=>{let[N,v]=L;return Array.isArray(v)?v.includes({...l,...u}[N]):{...l,...u}[N]===v})?[...m,h,b]:m},[]);return be(e,a,d,t?.class,t?.className)},_e=(e,o)=>{const t=new Array(e.length+o.length);for(let r=0;r<e.length;r++)t[r]=e[r];for(let r=0;r<o.length;r++)t[e.length+r]=o[r];return t},qe=(e,o)=>({classGroupId:e,validator:o}),pe=(e=new Map,o=null,t)=>({nextPart:e,validators:o,classGroupId:t}),X="-",fe=[],He="arbitrary..",Be=e=>{const o=Xe(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Ye(a);const u=a.split(X),d=u[0]===""&&u.length>1?1:0;return he(u,d,o)},getConflictingClassGroupIds:(a,u)=>{if(u){const d=r[a],m=t[a];return d?m?_e(m,d):d:m||fe}return t[a]||fe}}},he=(e,o,t)=>{if(e.length-o===0)return t.classGroupId;const n=e[o],l=t.nextPart.get(n);if(l){const m=he(e,o+1,l);if(m)return m}const a=t.validators;if(a===null)return;const u=o===0?e.join(X):e.slice(o).join(X),d=a.length;for(let m=0;m<d;m++){const x=a[m];if(x.validator(u))return x.classGroupId}},Ye=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const o=e.slice(1,-1),t=o.indexOf(":"),r=o.slice(0,t);return r?He+r:void 0})(),Xe=e=>{const{theme:o,classGroups:t}=e;return Ke(t,o)},Ke=(e,o)=>{const t=pe();for(const r in e){const n=e[r];se(n,t,r,o)}return t},se=(e,o,t,r)=>{const n=e.length;for(let l=0;l<n;l++){const a=e[l];Je(a,o,t,r)}},Je=(e,o,t,r)=>{if(typeof e=="string"){Qe(e,o,t);return}if(typeof e=="function"){Ze(e,o,t,r);return}Re(e,o,t,r)},Qe=(e,o,t)=>{const r=e===""?o:xe(o,e);r.classGroupId=t},Ze=(e,o,t,r)=>{if(et(e)){se(e(r),o,t,r);return}o.validators===null&&(o.validators=[]),o.validators.push(qe(t,e))},Re=(e,o,t,r)=>{const n=Object.entries(e),l=n.length;for(let a=0;a<l;a++){const[u,d]=n[a];se(d,xe(o,u),t,r)}},xe=(e,o)=>{let t=e;const r=o.split(X),n=r.length;for(let l=0;l<n;l++){const a=r[l];let u=t.nextPart.get(a);u||(u=pe(),t.nextPart.set(a,u)),t=u}return t},et=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,tt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let o=0,t=Object.create(null),r=Object.create(null);const n=(l,a)=>{t[l]=a,o++,o>e&&(o=0,r=t,t=Object.create(null))};return{get(l){let a=t[l];if(a!==void 0)return a;if((a=r[l])!==void 0)return n(l,a),a},set(l,a){l in t?t[l]=a:n(l,a)}}},ae="!",ye=":",rt=[],ke=(e,o,t,r,n)=>({modifiers:e,hasImportantModifier:o,baseClassName:t,maybePostfixModifierPosition:r,isExternal:n}),ot=e=>{const{prefix:o,experimentalParseClassName:t}=e;let r=n=>{const l=[];let a=0,u=0,d=0,m;const x=n.length;for(let N=0;N<x;N++){const v=n[N];if(a===0&&u===0){if(v===ye){l.push(n.slice(d,N)),d=N+1;continue}if(v==="/"){m=N;continue}}v==="["?a++:v==="]"?a--:v==="("?u++:v===")"&&u--}const h=l.length===0?n:n.slice(d);let b=h,y=!1;h.endsWith(ae)?(b=h.slice(0,-1),y=!0):h.startsWith(ae)&&(b=h.slice(1),y=!0);const L=m&&m>d?m-d:void 0;return ke(l,y,b,L)};if(o){const n=o+ye,l=r;r=a=>a.startsWith(n)?l(a.slice(n.length)):ke(rt,!1,a,void 0,!0)}if(t){const n=r;r=l=>t({className:l,parseClassName:n})}return r},st=e=>{const o=new Map;return e.orderSensitiveModifiers.forEach((t,r)=>{o.set(t,1e6+r)}),t=>{const r=[];let n=[];for(let l=0;l<t.length;l++){const a=t[l],u=a[0]==="[",d=o.has(a);u||d?(n.length>0&&(n.sort(),r.push(...n),n=[]),r.push(a)):n.push(a)}return n.length>0&&(n.sort(),r.push(...n)),r}},at=e=>({cache:tt(e.cacheSize),parseClassName:ot(e),sortModifiers:st(e),...Be(e)}),nt=/\s+/,lt=(e,o)=>{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:n,sortModifiers:l}=o,a=[],u=e.trim().split(nt);let d="";for(let m=u.length-1;m>=0;m-=1){const x=u[m],{isExternal:h,modifiers:b,hasImportantModifier:y,baseClassName:L,maybePostfixModifierPosition:N}=t(x);if(h){d=x+(d.length>0?" "+d:d);continue}let v=!!N,V=r(v?L.substring(0,N):L);if(!V){if(!v){d=x+(d.length>0?" "+d:d);continue}if(V=r(L),!V){d=x+(d.length>0?" "+d:d);continue}v=!1}const Q=b.length===0?"":b.length===1?b[0]:l(b).join(":"),B=y?Q+ae:Q,F=B+V;if(a.indexOf(F)>-1)continue;a.push(F);const _=n(V,v);for(let O=0;O<_.length;++O){const Y=_[O];a.push(B+Y)}d=x+(d.length>0?" "+d:d)}return d},it=(...e)=>{let o=0,t,r,n="";for(;o<e.length;)(t=e[o++])&&(r=we(t))&&(n&&(n+=" "),n+=r);return n},we=e=>{if(typeof e=="string")return e;let o,t="";for(let r=0;r<e.length;r++)e[r]&&(o=we(e[r]))&&(t&&(t+=" "),t+=o);return t},ct=(e,...o)=>{let t,r,n,l;const a=d=>{const m=o.reduce((x,h)=>h(x),e());return t=at(m),r=t.cache.get,n=t.cache.set,l=u,u(d)},u=d=>{const m=r(d);if(m)return m;const x=lt(d,t);return n(d,x),x};return l=a,(...d)=>l(it(...d))},dt=[],k=e=>{const o=t=>t[e]||dt;return o.isThemeGetter=!0,o},ve=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ne=/^\((?:(\w[\w-]*):)?(.+)\)$/i,mt=/^\d+\/\d+$/,ut=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,bt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,pt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ft=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$=e=>mt.test(e),f=e=>!!e&&!Number.isNaN(Number(e)),I=e=>!!e&&Number.isInteger(Number(e)),ne=e=>e.endsWith("%")&&f(e.slice(0,-1)),A=e=>ut.test(e),ht=()=>!0,xt=e=>gt.test(e)&&!bt.test(e),Ce=()=>!1,yt=e=>pt.test(e),kt=e=>ft.test(e),wt=e=>!i(e)&&!c(e),vt=e=>U(e,Me,Ce),i=e=>ve.test(e),G=e=>U(e,Te,xt),le=e=>U(e,St,f),Le=e=>U(e,Se,Ce),Nt=e=>U(e,Ae,kt),K=e=>U(e,Pe,yt),c=e=>Ne.test(e),H=e=>E(e,Te),Ct=e=>E(e,At),ze=e=>E(e,Se),Lt=e=>E(e,Me),zt=e=>E(e,Ae),J=e=>E(e,Pe,!0),U=(e,o,t)=>{const r=ve.exec(e);return r?r[1]?o(r[1]):t(r[2]):!1},E=(e,o,t=!1)=>{const r=Ne.exec(e);return r?r[1]?o(r[1]):t:!1},Se=e=>e==="position"||e==="percentage",Ae=e=>e==="image"||e==="url",Me=e=>e==="length"||e==="size"||e==="bg-size",Te=e=>e==="length",St=e=>e==="number",At=e=>e==="family-name",Pe=e=>e==="shadow",Mt=ct(()=>{const e=k("color"),o=k("font"),t=k("text"),r=k("font-weight"),n=k("tracking"),l=k("leading"),a=k("breakpoint"),u=k("container"),d=k("spacing"),m=k("radius"),x=k("shadow"),h=k("inset-shadow"),b=k("text-shadow"),y=k("drop-shadow"),L=k("blur"),N=k("perspective"),v=k("aspect"),V=k("ease"),Q=k("animate"),B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...F(),c,i],O=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto","contain","none"],p=()=>[c,i,d],T=()=>[$,"full","auto",...p()],Ge=()=>[I,"none","subgrid",c,i],Ve=()=>["auto",{span:["full",I,c,i]},I,c,i],Z=()=>[I,"auto",c,i],Oe=()=>["auto","min","max","fr",c,i],ie=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],q=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...p()],D=()=>[$,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...p()],g=()=>[e,c,i],De=()=>[...F(),ze,Le,{position:[c,i]}],$e=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ue=()=>["auto","cover","contain",Lt,vt,{size:[c,i]}],ce=()=>[ne,H,G],C=()=>["","none","full",m,c,i],z=()=>["",f,H,G],R=()=>["solid","dashed","dotted","double"],Ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],w=()=>[f,ne,ze,Le],We=()=>["","none",L,c,i],ee=()=>["none",f,c,i],te=()=>["none",f,c,i],de=()=>[f,c,i],re=()=>[$,"full",...p()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[A],breakpoint:[A],color:[ht],container:[A],"drop-shadow":[A],ease:["in","out","in-out"],font:[wt],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[A],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[A],shadow:[A],spacing:["px",f],text:[A],"text-shadow":[A],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",$,i,c,v]}],container:["container"],columns:[{columns:[f,i,c,u]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:Y()}],"overscroll-x":[{"overscroll-x":Y()}],"overscroll-y":[{"overscroll-y":Y()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[I,"auto",c,i]}],basis:[{basis:[$,"full","auto",u,...p()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[f,$,"auto","initial","none",i]}],grow:[{grow:["",f,c,i]}],shrink:[{shrink:["",f,c,i]}],order:[{order:[I,"first","last","none",c,i]}],"grid-cols":[{"grid-cols":Ge()}],"col-start-end":[{col:Ve()}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":Ge()}],"row-start-end":[{row:Ve()}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Oe()}],"auto-rows":[{"auto-rows":Oe()}],gap:[{gap:p()}],"gap-x":[{"gap-x":p()}],"gap-y":[{"gap-y":p()}],"justify-content":[{justify:[...ie(),"normal"]}],"justify-items":[{"justify-items":[...q(),"normal"]}],"justify-self":[{"justify-self":["auto",...q()]}],"align-content":[{content:["normal",...ie()]}],"align-items":[{items:[...q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...q(),{baseline:["","last"]}]}],"place-content":[{"place-content":ie()}],"place-items":[{"place-items":[...q(),"baseline"]}],"place-self":[{"place-self":["auto",...q()]}],p:[{p:p()}],px:[{px:p()}],py:[{py:p()}],ps:[{ps:p()}],pe:[{pe:p()}],pt:[{pt:p()}],pr:[{pr:p()}],pb:[{pb:p()}],pl:[{pl:p()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":p()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":p()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],w:[{w:[u,"screen",...D()]}],"min-w":[{"min-w":[u,"screen","none",...D()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[a]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",t,H,G]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,c,le]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ne,i]}],"font-family":[{font:[Ct,i,o]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,c,i]}],"line-clamp":[{"line-clamp":[f,"none",c,le]}],leading:[{leading:[l,...p()]}],"list-image":[{"list-image":["none",c,i]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",c,i]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:g()}],"text-color":[{text:g()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...R(),"wavy"]}],"text-decoration-thickness":[{decoration:[f,"from-font","auto",c,G]}],"text-decoration-color":[{decoration:g()}],"underline-offset":[{"underline-offset":[f,"auto",c,i]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:p()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",c,i]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",c,i]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:De()}],"bg-repeat":[{bg:$e()}],"bg-size":[{bg:Ue()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},I,c,i],radial:["",c,i],conic:[I,c,i]},zt,Nt]}],"bg-color":[{bg:g()}],"gradient-from-pos":[{from:ce()}],"gradient-via-pos":[{via:ce()}],"gradient-to-pos":[{to:ce()}],"gradient-from":[{from:g()}],"gradient-via":[{via:g()}],"gradient-to":[{to:g()}],rounded:[{rounded:C()}],"rounded-s":[{"rounded-s":C()}],"rounded-e":[{"rounded-e":C()}],"rounded-t":[{"rounded-t":C()}],"rounded-r":[{"rounded-r":C()}],"rounded-b":[{"rounded-b":C()}],"rounded-l":[{"rounded-l":C()}],"rounded-ss":[{"rounded-ss":C()}],"rounded-se":[{"rounded-se":C()}],"rounded-ee":[{"rounded-ee":C()}],"rounded-es":[{"rounded-es":C()}],"rounded-tl":[{"rounded-tl":C()}],"rounded-tr":[{"rounded-tr":C()}],"rounded-br":[{"rounded-br":C()}],"rounded-bl":[{"rounded-bl":C()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...R(),"hidden","none"]}],"divide-style":[{divide:[...R(),"hidden","none"]}],"border-color":[{border:g()}],"border-color-x":[{"border-x":g()}],"border-color-y":[{"border-y":g()}],"border-color-s":[{"border-s":g()}],"border-color-e":[{"border-e":g()}],"border-color-t":[{"border-t":g()}],"border-color-r":[{"border-r":g()}],"border-color-b":[{"border-b":g()}],"border-color-l":[{"border-l":g()}],"divide-color":[{divide:g()}],"outline-style":[{outline:[...R(),"none","hidden"]}],"outline-offset":[{"outline-offset":[f,c,i]}],"outline-w":[{outline:["",f,H,G]}],"outline-color":[{outline:g()}],shadow:[{shadow:["","none",x,J,K]}],"shadow-color":[{shadow:g()}],"inset-shadow":[{"inset-shadow":["none",h,J,K]}],"inset-shadow-color":[{"inset-shadow":g()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:g()}],"ring-offset-w":[{"ring-offset":[f,G]}],"ring-offset-color":[{"ring-offset":g()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":g()}],"text-shadow":[{"text-shadow":["none",b,J,K]}],"text-shadow-color":[{"text-shadow":g()}],opacity:[{opacity:[f,c,i]}],"mix-blend":[{"mix-blend":[...Ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ee()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[f]}],"mask-image-linear-from-pos":[{"mask-linear-from":w()}],"mask-image-linear-to-pos":[{"mask-linear-to":w()}],"mask-image-linear-from-color":[{"mask-linear-from":g()}],"mask-image-linear-to-color":[{"mask-linear-to":g()}],"mask-image-t-from-pos":[{"mask-t-from":w()}],"mask-image-t-to-pos":[{"mask-t-to":w()}],"mask-image-t-from-color":[{"mask-t-from":g()}],"mask-image-t-to-color":[{"mask-t-to":g()}],"mask-image-r-from-pos":[{"mask-r-from":w()}],"mask-image-r-to-pos":[{"mask-r-to":w()}],"mask-image-r-from-color":[{"mask-r-from":g()}],"mask-image-r-to-color":[{"mask-r-to":g()}],"mask-image-b-from-pos":[{"mask-b-from":w()}],"mask-image-b-to-pos":[{"mask-b-to":w()}],"mask-image-b-from-color":[{"mask-b-from":g()}],"mask-image-b-to-color":[{"mask-b-to":g()}],"mask-image-l-from-pos":[{"mask-l-from":w()}],"mask-image-l-to-pos":[{"mask-l-to":w()}],"mask-image-l-from-color":[{"mask-l-from":g()}],"mask-image-l-to-color":[{"mask-l-to":g()}],"mask-image-x-from-pos":[{"mask-x-from":w()}],"mask-image-x-to-pos":[{"mask-x-to":w()}],"mask-image-x-from-color":[{"mask-x-from":g()}],"mask-image-x-to-color":[{"mask-x-to":g()}],"mask-image-y-from-pos":[{"mask-y-from":w()}],"mask-image-y-to-pos":[{"mask-y-to":w()}],"mask-image-y-from-color":[{"mask-y-from":g()}],"mask-image-y-to-color":[{"mask-y-to":g()}],"mask-image-radial":[{"mask-radial":[c,i]}],"mask-image-radial-from-pos":[{"mask-radial-from":w()}],"mask-image-radial-to-pos":[{"mask-radial-to":w()}],"mask-image-radial-from-color":[{"mask-radial-from":g()}],"mask-image-radial-to-color":[{"mask-radial-to":g()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":F()}],"mask-image-conic-pos":[{"mask-conic":[f]}],"mask-image-conic-from-pos":[{"mask-conic-from":w()}],"mask-image-conic-to-pos":[{"mask-conic-to":w()}],"mask-image-conic-from-color":[{"mask-conic-from":g()}],"mask-image-conic-to-color":[{"mask-conic-to":g()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:De()}],"mask-repeat":[{mask:$e()}],"mask-size":[{mask:Ue()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",c,i]}],filter:[{filter:["","none",c,i]}],blur:[{blur:We()}],brightness:[{brightness:[f,c,i]}],contrast:[{contrast:[f,c,i]}],"drop-shadow":[{"drop-shadow":["","none",y,J,K]}],"drop-shadow-color":[{"drop-shadow":g()}],grayscale:[{grayscale:["",f,c,i]}],"hue-rotate":[{"hue-rotate":[f,c,i]}],invert:[{invert:["",f,c,i]}],saturate:[{saturate:[f,c,i]}],sepia:[{sepia:["",f,c,i]}],"backdrop-filter":[{"backdrop-filter":["","none",c,i]}],"backdrop-blur":[{"backdrop-blur":We()}],"backdrop-brightness":[{"backdrop-brightness":[f,c,i]}],"backdrop-contrast":[{"backdrop-contrast":[f,c,i]}],"backdrop-grayscale":[{"backdrop-grayscale":["",f,c,i]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f,c,i]}],"backdrop-invert":[{"backdrop-invert":["",f,c,i]}],"backdrop-opacity":[{"backdrop-opacity":[f,c,i]}],"backdrop-saturate":[{"backdrop-saturate":[f,c,i]}],"backdrop-sepia":[{"backdrop-sepia":["",f,c,i]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":p()}],"border-spacing-x":[{"border-spacing-x":p()}],"border-spacing-y":[{"border-spacing-y":p()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",c,i]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[f,"initial",c,i]}],ease:[{ease:["linear","initial",V,c,i]}],delay:[{delay:[f,c,i]}],animate:[{animate:["none",Q,c,i]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,c,i]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:te()}],"scale-x":[{"scale-x":te()}],"scale-y":[{"scale-y":te()}],"scale-z":[{"scale-z":te()}],"scale-3d":["scale-3d"],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[c,i,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":["translate-none"],accent:[{accent:g()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:g()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",c,i]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":p()}],"scroll-mx":[{"scroll-mx":p()}],"scroll-my":[{"scroll-my":p()}],"scroll-ms":[{"scroll-ms":p()}],"scroll-me":[{"scroll-me":p()}],"scroll-mt":[{"scroll-mt":p()}],"scroll-mr":[{"scroll-mr":p()}],"scroll-mb":[{"scroll-mb":p()}],"scroll-ml":[{"scroll-ml":p()}],"scroll-p":[{"scroll-p":p()}],"scroll-px":[{"scroll-px":p()}],"scroll-py":[{"scroll-py":p()}],"scroll-ps":[{"scroll-ps":p()}],"scroll-pe":[{"scroll-pe":p()}],"scroll-pt":[{"scroll-pt":p()}],"scroll-pr":[{"scroll-pr":p()}],"scroll-pb":[{"scroll-pb":p()}],"scroll-pl":[{"scroll-pl":p()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",c,i]}],fill:[{fill:["none",...g()]}],"stroke-w":[{stroke:[f,H,G,le]}],stroke:[{stroke:["none",...g()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function M(...e){return Mt(ue(e))}const Tt=Fe("h-full rounded-full transition-all duration-300",{variants:{color:{blue:"bg-blue-500",green:"bg-green-500",yellow:"bg-yellow-500",red:"bg-red-500",purple:"bg-purple-500"}},defaultVariants:{color:"blue"}});function je(e,o){return o===null||o===0?0:Math.min(100,e/o*100)}function Pt(e,o){if(o===null)return"green";const t=je(e,o);return t>=90?"red":t>=70?"yellow":"blue"}function jt(e){const o=new Date(e),t=new Date,r=o.getTime()-t.getTime();if(r<=0)return"now";const n=Math.floor(r/(1e3*60)),l=Math.floor(r/(1e3*60*60)),a=Math.floor(r/(1e3*60*60*24));if(n<60)return`${n}m`;if(l<24){const u=n%60;return u>0?`${l}h ${u}m`:`${l}h`}else{const u=l%24;return u>0?`${a}d ${u}h`:`${a}d`}}const It=({config:e,showPercentage:o=!0,showRemaining:t=!0,labels:r})=>{const{label:n,used:l,limit:a,color:u,resetsAt:d}=e,m=je(l,a),x=u??Pt(l,a),h=a!==null?Math.max(0,a-l):null,b=a===null;return s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:n}),s.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:[l.toLocaleString()," ",r.usedLabel,!b&&` / ${a.toLocaleString()} ${r.limitLabel}`,b&&` (${r.unlimitedLabel})`]})]}),!b&&s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"h-3 w-full rounded-full bg-gray-200 dark:bg-gray-700",children:s.jsx("div",{className:M(Tt({color:x})),style:{width:`${m}%`}})}),o&&s.jsxs("span",{className:"absolute right-0 top-4 text-xs text-gray-500 dark:text-gray-400",children:[m.toFixed(0),"%"]})]}),b&&s.jsx("div",{className:"h-3 w-full rounded-full bg-green-100 dark:bg-green-900/30",children:s.jsx("div",{className:"h-full w-full rounded-full bg-green-500/20"})}),s.jsxs("div",{className:"flex items-center justify-between text-xs text-gray-500 dark:text-gray-400",children:[t&&h!==null&&s.jsxs("span",{children:[h.toLocaleString()," ",r.remainingLabel]}),!t&&s.jsx("span",{}),d&&s.jsxs("span",{children:[r.resetsLabel," ",jt(d)]})]})]})},W={title:"Usage",usedLabel:"used",limitLabel:"limit",unlimitedLabel:"Unlimited",remainingLabel:"remaining",resetsLabel:"Resets in"},Gt=({usageBars:e,currentTierName:o,labels:t,onUpgradeClick:r,upgradeButtonLabel:n="Upgrade",className:l,showPercentage:a=!0,showRemaining:u=!0,onTrack:d,trackingLabel:m,componentName:x="UsageDashboard"})=>{const h={...W,...t},b=()=>{d?.({action:"upgrade_click",trackingLabel:m,componentName:x}),r?.()};return s.jsxs("div",{className:M("rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800",l),children:[s.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:h.title}),o&&s.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:o})]}),r&&s.jsx("button",{onClick:b,className:"rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800",children:n})]}),s.jsx("div",{className:"space-y-6",children:e.map((y,L)=>s.jsx(It,{config:y,showPercentage:a,showRemaining:u,labels:{usedLabel:h.usedLabel??W.usedLabel,limitLabel:h.limitLabel??W.limitLabel,unlimitedLabel:h.unlimitedLabel??W.unlimitedLabel,remainingLabel:h.remainingLabel??W.remainingLabel,resetsLabel:h.resetsLabel??W.resetsLabel}},`${y.label}-${L}`))})]})},Ie={title:"Plan Comparison",tierHeader:"Plan",hourlyHeader:"Hourly",dailyHeader:"Daily",monthlyHeader:"Monthly",unlimitedLabel:"Unlimited",currentTierBadge:"Current"};function Vt(e){return e.toLocaleString()}const Ot=({tiers:e,labels:o,onTierSelect:t,className:r,formatNumber:n=Vt,onTrack:l,trackingLabel:a,componentName:u="TierComparisonTable"})=>{const d={...Ie,...o},m=b=>{l?.({action:"tier_select",trackingLabel:a,componentName:u}),t?.(b)},x=b=>b===null?d.unlimitedLabel??Ie.unlimitedLabel:n(b),h=b=>{const y=b===null;return s.jsx("span",{className:M("text-sm",y?"font-medium text-green-600 dark:text-green-400":"text-gray-700 dark:text-gray-300"),children:x(b)})};return s.jsxs("div",{className:M("rounded-lg border border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-800",r),children:[d.title&&s.jsx("div",{className:"border-b border-gray-200 px-6 py-4 dark:border-gray-700",children:s.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:d.title})}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-gray-200 bg-gray-50 dark:border-gray-700 dark:bg-gray-900/50",children:[s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400",children:d.tierHeader}),s.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400",children:d.hourlyHeader}),s.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400",children:d.dailyHeader}),s.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400",children:d.monthlyHeader})]})}),s.jsx("tbody",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:e.map(b=>s.jsxs("tr",{onClick:()=>m(b.id),className:M("transition-colors",b.isHighlighted&&"bg-blue-50 dark:bg-blue-900/20",b.isCurrent&&"bg-green-50 dark:bg-green-900/20",t&&"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700/50"),children:[s.jsx("td",{className:"whitespace-nowrap px-6 py-4",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:M("text-sm font-medium",b.isCurrent?"text-green-700 dark:text-green-400":b.isHighlighted?"text-blue-700 dark:text-blue-400":"text-gray-900 dark:text-white"),children:b.name}),b.isCurrent&&s.jsx("span",{className:"inline-flex items-center rounded-full bg-green-100 px-2 py-0.5 text-xs font-medium text-green-700 dark:bg-green-900/50 dark:text-green-400",children:d.currentTierBadge})]})}),s.jsx("td",{className:"whitespace-nowrap px-6 py-4 text-right",children:h(b.hourlyLimit)}),s.jsx("td",{className:"whitespace-nowrap px-6 py-4 text-right",children:h(b.dailyLimit)}),s.jsx("td",{className:"whitespace-nowrap px-6 py-4 text-right",children:h(b.monthlyLimit)})]},b.id))})]})})]})},Dt={title:"Usage History",requestsLabel:"Requests",limitLabel:"Limit",periodLabel:"Period",noDataLabel:"No usage data available"};function $t(e,o){const t=new Date(e);switch(o){case"hour":return t.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"});case"day":return t.toLocaleDateString(void 0,{month:"short",day:"numeric"});case"month":return t.toLocaleDateString(void 0,{month:"short",year:"numeric"});default:return e}}const Ut=({active:e,payload:o,label:t,labels:r,limit:n})=>{if(!e||!o||o.length===0)return null;const l=o[0].value;return s.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-3 shadow-lg dark:border-gray-700 dark:bg-gray-800",children:[s.jsx("p",{className:"mb-1 text-sm font-medium text-gray-900 dark:text-white",children:t}),s.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:[r.requestsLabel,":"," ",s.jsx("span",{className:"font-medium",children:l.toLocaleString()})]}),n!==null&&s.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:[r.limitLabel,":"," ",s.jsx("span",{className:"font-medium",children:n.toLocaleString()})]})]})},Et=({entries:e,periodType:o,labels:t,height:r=300,className:n,formatDate:l=$t,barColor:a="#3b82f6",limitLineColor:u="#ef4444",showLimitLine:d=!0})=>{const m={...Dt,...t},x=oe.useMemo(()=>e.map(y=>({name:l(y.periodStart,o),requests:y.requestCount,limit:y.limit})),[e,l,o]),h=oe.useMemo(()=>e.find(L=>L.limit!==null)?.limit??null,[e]),b=oe.useMemo(()=>{const y=Math.max(...e.map(N=>N.requestCount),0);return Math.max(y,h??0)*1.1},[e,h]);return e.length===0?s.jsx("div",{className:M("flex items-center justify-center rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800",n),style:{height:r},children:s.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:m.noDataLabel})}):s.jsxs("div",{className:M("rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800",n),children:[m.title&&s.jsx("h3",{className:"mb-4 text-lg font-semibold text-gray-900 dark:text-white",children:m.title}),s.jsx(j.ResponsiveContainer,{width:"100%",height:r,children:s.jsxs(j.LineChart,{data:x,margin:{top:20,right:30,left:20,bottom:5},children:[s.jsx(j.CartesianGrid,{strokeDasharray:"3 3",className:"stroke-gray-200 dark:stroke-gray-700"}),s.jsx(j.XAxis,{dataKey:"name",tick:{fontSize:12},className:"text-gray-600 dark:text-gray-400"}),s.jsx(j.YAxis,{domain:[0,b],tick:{fontSize:12},className:"text-gray-600 dark:text-gray-400",tickFormatter:y=>y.toLocaleString()}),s.jsx(j.Tooltip,{content:s.jsx(Ut,{labels:m,limit:h})}),s.jsx(j.Line,{type:"monotone",dataKey:"requests",stroke:a,strokeWidth:2,dot:{fill:a,strokeWidth:2,r:4},activeDot:{r:6,strokeWidth:2},name:m.requestsLabel}),d&&h!==null&&s.jsx(j.ReferenceLine,{y:h,stroke:u,strokeDasharray:"5 5",strokeWidth:2,label:{value:m.limitLabel,position:"right",fill:u,fontSize:12}})]})}),s.jsxs("div",{className:"mt-4 flex items-center justify-center gap-6",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"h-0.5 w-4 rounded",style:{backgroundColor:a}}),s.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:m.requestsLabel})]}),d&&h!==null&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"h-0.5 w-4",style:{backgroundColor:u,borderStyle:"dashed"}}),s.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:m.limitLabel})]})]})]})};S.TierComparisonTable=Ot,S.UsageDashboard=Gt,S.UsageHistoryChart=Et,S.cn=M,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/types.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ export interface UsageBarConfig {
|
|
|
18
18
|
limit: number | null;
|
|
19
19
|
/** Optional color variant */
|
|
20
20
|
color?: UsageBarColor;
|
|
21
|
+
/** When this counter resets (ISO 8601 string) */
|
|
22
|
+
resetsAt?: string;
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
25
|
* Labels for UsageDashboard localization
|
|
@@ -33,6 +35,8 @@ export interface UsageDashboardLabels {
|
|
|
33
35
|
unlimitedLabel?: string;
|
|
34
36
|
/** Label for remaining count */
|
|
35
37
|
remainingLabel?: string;
|
|
38
|
+
/** Label prefix for reset time (e.g., "Resets") */
|
|
39
|
+
resetsLabel?: string;
|
|
36
40
|
}
|
|
37
41
|
/** Tracking data for UsageDashboard actions */
|
|
38
42
|
export interface UsageDashboardTrackingData {
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sudobility/ratelimit-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "Rate limit UI components for React",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"typescript"
|
|
36
36
|
],
|
|
37
37
|
"author": "John Q Huang",
|
|
38
|
-
"license": "
|
|
38
|
+
"license": "BUSL-1.1",
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@sudobility/components": "^
|
|
40
|
+
"@sudobility/components": "^5.0.7",
|
|
41
41
|
"@sudobility/design": "^1.1.18",
|
|
42
42
|
"react": "^18.0.0 || ^19.0.0",
|
|
43
43
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@eslint/js": "^9.38.0",
|
|
48
|
-
"@sudobility/components": "^
|
|
48
|
+
"@sudobility/components": "^5.0.7",
|
|
49
49
|
"@sudobility/design": "^1.1.18",
|
|
50
50
|
"ajv": "^8.17.1",
|
|
51
51
|
"@testing-library/dom": "^10.4.0",
|
|
@@ -65,15 +65,15 @@
|
|
|
65
65
|
"eslint-plugin-react-hooks": "^7.0.0",
|
|
66
66
|
"eslint-plugin-react-refresh": "^0.4.0",
|
|
67
67
|
"jsdom": "^24.0.0",
|
|
68
|
-
"prettier": "^3.
|
|
69
|
-
"react": "^19.
|
|
70
|
-
"react-dom": "^19.
|
|
68
|
+
"prettier": "^3.8.1",
|
|
69
|
+
"react": "^19.0.0",
|
|
70
|
+
"react-dom": "^19.0.0",
|
|
71
71
|
"recharts": "^2.15.0",
|
|
72
72
|
"tailwind-merge": "^3.3.1",
|
|
73
73
|
"typescript": "^5.9.3",
|
|
74
74
|
"vite": "^7.1.12",
|
|
75
75
|
"vite-plugin-dts": "^4.5.4",
|
|
76
|
-
"vitest": "^
|
|
76
|
+
"vitest": "^3.2.4"
|
|
77
77
|
},
|
|
78
78
|
"publishConfig": {
|
|
79
79
|
"access": "public"
|