@stitches/react
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -1,2 +0,2 @@ | ||
var{toPrimitive:e}=Symbol,t=Symbol.for("sxs.composers"),{assign:n,create:r,defineProperties:o,getOwnPropertyDescriptors:i}=Object,s=(t,r,s)=>n(o(t,i(s)),{[e]:()=>t[r],toString:()=>t[r]}),a=e=>e.includes("-")?e:e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),l=(e,t)=>e.reduce(((e,n)=>(e.push(...t.map((e=>e.includes("&")?e.replace(/&/g,/[ +>|~]/.test(n)&&/&[^]*&/.test(e)?`:is(${n})`:n):n+" "+e))),e)),[]),c=/\s*,\s*(?![^()]*\))/,d=/(-columns|(^|[^e]-)padding|[^t]-spacing|l-align|rows|(^|(^border|[dkmnptx]|le|ne)-)width|^border|tom|[ek]-start|(o|[^e]-du)ration|us|(^|[^tv]-)left|(^|-)top|tance|rgin|e-offset|(er|g|n|t)-block|(^|[^tv]-)right|basis|[gnt]-inline|gap|(^|[^e]-)height|ness|(^|[^p]-)inset|[ek]-end|elay|tline|ve|dent|-rotate|n-rule|(c|ck|d|ne|t)-size)$/,g=/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,p=/\s+(?![^()]*\))/,m=e=>t=>e(..."string"==typeof t?String(t).split(p):[t]),h=/([\d.]+)([^]*)/,u={appearance:e=>({WebkitAppearance:e,appearance:e}),backfaceVisibility:e=>({WebkitBackfaceVisibility:e,backfaceVisibility:e}),backgroundClip:e=>({WebkitBackgroundClip:e,backgroundClip:e}),clipPath:e=>({WebkitClipPath:e,clipPath:e}),content:e=>({content:/^([^]*["'][^]*|[A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(e)?e:`"${e}"`}),hyphens:e=>({WebkitHyphens:e,hyphens:e}),maskImage:e=>({WebkitMaskImage:e,maskImage:e}),tabSize:e=>({MozTabSize:e,tabSize:e}),userSelect:e=>({WebkitUserSelect:e,userSelect:e}),marginBlock:m(((e,t)=>({marginBlockStart:e,marginBlockEnd:t||e}))),marginInline:m(((e,t)=>({marginInlineStart:e,marginInlineEnd:t||e}))),maxSize:m(((e,t)=>({maxBlockSize:e,maxInlineSize:t||e}))),minSize:m(((e,t)=>({minBlockSize:e,minInlineSize:t||e}))),paddingBlock:m(((e,t)=>({paddingBlockStart:e,paddingBlockEnd:t||e}))),paddingInline:m(((e,t)=>({paddingInlineStart:e,paddingInlineEnd:t||e})))},f=e=>{const{media:t,themeMap:n,utils:r}=e;let o,i,s,p;return m=>((e,t)=>{const n=new WeakSet;let r,o;const i=(e,s,d)=>{let g="";e:for(let p in e){const m=64===p.charCodeAt(0);for(const h of m?[].concat(e[p]):[e[p]]){if("function"==typeof t&&(p!==r||h!==o)){const n=t(p,h,e);if(null!==n){r=p,o=h,g+=n===Object(n)?i(n,s,d):null==n?"":n;continue e}}const m=64===p.charCodeAt(0);if(h!==Object(h)||"length"in h){for(let e=0;e<d.length;++e)n.has(d[e])||(n.add(d[e]),g+=d[e]+"{");s.length&&!n.has(s)&&(n.add(s),g+=s+"{");for(const e of/^@import/i.test(p)?[].concat(h):[h])g+=(m?p+" ":a(p)+":")+String(e)+";"}else{n.has(s)&&(n.delete(s),g+="}");const e=Object(p),t=m?s:s.length?l(s,p.split(c)):p.split(c);g+=i(h,t,m?d.concat(e):d),n.has(e)&&(n.delete(e),g+="}"),n.has(t)&&(n.delete(t),g+="}")}}}return g};return i(e,[],[])})(m,((l,c)=>{const m=l.charCodeAt(0),f=64===m?l:/[A-Z]/.test(b=l)?b:b.replace(/-[^]/g,(e=>e[1].toUpperCase()));var b;const S=64===m?l:a(l);if("function"==typeof r[l]&&(r[l]!=s||c!=p))return s=r[l],p=c,s(e)(p);if(p=c,"function"==typeof u[f]&&(u[f]!=o||c!=i))return o=u[f],i=c,o(i);let y=64===m?(l.slice(1)in t?"@media "+t[l.slice(1)]:l).replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,((e,t,n,r,o,i)=>{const s=h.test(t),a=.0625*(s?-1:1),[l,c]=s?[r,t]:[t,r];return"("+("="===n[0]?"":">"===n[0]===s?"max-":"min-")+l+":"+("="!==n[0]&&1===n.length?c.replace(h,((e,t,r)=>Number(t)+a*(">"===n?1:-1)+r)):c)+(o?") and ("+(">"===o[0]?"min-":"max-")+l+":"+(1===o.length?i.replace(h,((e,t,n)=>Number(t)+a*(">"===o?-1:1)+n)):i):"")+")"})):36===m?"-"+l.replace(/\$/g,"-"):l;const k=c===Object(c)?c:c&&"number"==typeof c&&d.test(S)?String(c)+"px":String(c).replace(g,((e,t,r,o,i)=>"$"==o==!!r?e:(t||"--"==o?"calc(":"")+"var("+("$"===o?"--"+(i.includes("$")?"":f in n?n[f]+"-":"")+i.replace(/\$/g,"-"):o+i)+")"+(t||"--"==o?"*"+(t||"")+(r||"1")+")":"")));return c!=k||S!=y?{[y]:k}:null}))},{from:b,isArray:S}=Array,{ownKeys:y}=Reflect,k=class extends Set{toString(){return b(this).join("")}get hasChanged(){const{size:e}=this;return()=>e<this.size}},B=k;k.prototype[e]=k.prototype.toString;var w="colors",C="sizes",I="space",j={gap:I,gridGap:I,columnGap:I,gridColumnGap:I,rowGap:I,gridRowGap:I,inset:I,insetBlock:I,insetBlockEnd:I,insetBlockStart:I,insetInline:I,insetInlineEnd:I,insetInlineStart:I,margin:I,marginTop:I,marginRight:I,marginBottom:I,marginLeft:I,marginBlock:I,marginBlockEnd:I,marginBlockStart:I,marginInline:I,marginInlineEnd:I,marginInlineStart:I,padding:I,paddingTop:I,paddingRight:I,paddingBottom:I,paddingLeft:I,paddingBlock:I,paddingBlockEnd:I,paddingBlockStart:I,paddingInline:I,paddingInlineEnd:I,paddingInlineStart:I,top:I,right:I,bottom:I,left:I,scrollMargin:I,scrollMarginTop:I,scrollMarginRight:I,scrollMarginBottom:I,scrollMarginLeft:I,scrollMarginX:I,scrollMarginY:I,scrollMarginBlock:I,scrollMarginBlockEnd:I,scrollMarginBlockStart:I,scrollMarginInline:I,scrollMarginInlineEnd:I,scrollMarginInlineStart:I,scrollPadding:I,scrollPaddingTop:I,scrollPaddingRight:I,scrollPaddingBottom:I,scrollPaddingLeft:I,scrollPaddingX:I,scrollPaddingY:I,scrollPaddingBlock:I,scrollPaddingBlockEnd:I,scrollPaddingBlockStart:I,scrollPaddingInline:I,scrollPaddingInlineEnd:I,scrollPaddingInlineStart:I,fontSize:"fontSizes",background:w,backgroundColor:w,backgroundImage:w,border:w,borderBlock:w,borderBlockEnd:w,borderBlockStart:w,borderBottom:w,borderBottomColor:w,borderColor:w,borderInline:w,borderInlineEnd:w,borderInlineStart:w,borderLeft:w,borderLeftColor:w,borderRight:w,borderRightColor:w,borderTop:w,borderTopColor:w,caretColor:w,color:w,columnRuleColor:w,fill:w,outlineColor:w,stroke:w,textDecorationColor:w,fontFamily:"fonts",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",blockSize:C,minBlockSize:C,maxBlockSize:C,inlineSize:C,minInlineSize:C,maxInlineSize:C,width:C,minWidth:C,maxWidth:C,height:C,minHeight:C,maxHeight:C,flexBasis:C,gridTemplateColumns:C,gridTemplateRows:C,borderWidth:"borderWidths",borderTopWidth:"borderWidths",borderRightWidth:"borderWidths",borderBottomWidth:"borderWidths",borderLeftWidth:"borderWidths",borderStyle:"borderStyles",borderTopStyle:"borderStyles",borderRightStyle:"borderStyles",borderBottomStyle:"borderStyles",borderLeftStyle:"borderStyles",borderRadius:"radii",borderTopLeftRadius:"radii",borderTopRightRadius:"radii",borderBottomRightRadius:"radii",borderBottomLeftRadius:"radii",boxShadow:"shadows",textShadow:"shadows",transition:"transitions",zIndex:"zIndices"},x=e=>{const t={};for(const n in e)for(const r in e[n])t["$"+n+"-"+r]=String(e[n][r]).replace(/\$[$\w-]+/g,(e=>/[^]\$/.test(e)?e:"$"+n+e));return t},z=(e,t)=>{for(var n=JSON.stringify(t),r=n.length,o=9;r;)o=Math.imul(o^n.charCodeAt(--r),9**9);return e+(o^o>>>9).toString(36).slice(-5)},O=class{constructor(e,t,n){this.value=e,this.token=t,this.scale=n}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+this.scale+"-"+this.token}toString(){return this.computedValue}},v=class extends Array{toString(){return this.join("")}get hasChanged(){const e=String(this);return()=>e!==String(this)}},E=v;v.prototype[e]=v.prototype.toString;var M=e=>{const t="append"===e.insertionMethod;let r=null,o=null,i="";return e=>{"object"==typeof document&&(r||(r=document.head||document.documentElement),o||(o=document.getElementById("stitches")||n(document.createElement("style"),{id:"stitches"})),o.parentNode||r[t?"append":"prepend"](o),i=i||o.textContent,e.split("}").every((e=>i.includes(e)))||(o.textContent=i=e))}},P=e=>{e=Object(e);const o=n({initial:"all"},e.media),i=Object(e.theme),a=Object(e.themeMap||j),l=Object(e.utils),c=new Set([].concat(e.passthru||["as","className"])),d=e.prefix||"sx",g=("function"==typeof e.insertionMethod?e.insertionMethod:M)(e),p="03kze",m={theme:i,media:o,prefix:d,themeMap:a,utils:l},h=f(m),u=new B,S=new B,k=new B,w=new B,C=new B([u,S,k,w]);let I="";const v=()=>{const e=b(C).join("");I!==e&&g(I=e)},P=(e,t)=>{t=e===Object(e)?e:Object(t),e="string"==typeof e?e:"";const n=x(t),o=(e=e||z(d,n)).replace(/^\w/,".$&"),i=e===d+p?"":h({[o]:n}),a=s(r(null),"className",{className:e,selector:o});for(const e in t){a[e]=r(null);for(const n in t[e])a[e][n]=new O(t[e][n],n,e)}return s(a,"className",{get className(){const{hasChanged:t}=S;return S.add(i),t()&&v(),e},selector:o})},$=(e,t="")=>{const n=new B,o=new B;for(const t in e)if(e[t]!==Object(e[t])||y(e[t]).length){const r=h({[t]:e[t]});("@import"===t?n:o).add(r)}const i=s(r(null),"name",{name:t}),a=s((()=>{let e=u.hasChanged,t=k.hasChanged;return n.forEach((e=>{u.add(e)})),o.forEach((e=>{k.add(e)})),(e()||t())&&v(),i}),"name",{get name(){return String(a())}});return a},N=e=>{const t=new B,n=new E,o=new B,i=new B([t,n,o]);let{variants:s,compoundVariants:a,defaultVariants:l,...c}=e;l=Object(l);const g=z(d,e),m="."+g,u=g===d+p?"":h({[m]:c});w.add(i);const f=r(null),b=[],S=[];for(const e in s)for(const t in s[e]){const n=s[e][t];S.push({[e]:t,css:n})}S.push(...a||[]);for(const e in S){const{css:t,...o}=S[e],i=y(o),s=i.length;for(const e of i)f[e]=f[e]||r(null),f[e][o[e]]=!0;const a=(e,r)=>{e={...e};for(const t in r)void 0!==e[t]||Object(f[t])[e[t]]||(e[t]=r[t]);const a=new Set;if(i.length&&i.every((t=>{const n=e[t],r=String(o[t]);if(r===String(n))return!0;if(n===Object(n))for(const e in n)if(r==String(n[e])&&64===e.charCodeAt(0))return a.add(e),!0}))){let e=Object(t);for(const t of a)e={[t]:e};const r=g+z("",e)+"--"+(1===s?i[0]+"-"+o[i[0]]:"c"+s),l=h({["."+r]:e});return(n[s-1]||(n[s-1]=new B)).add(l),r}};b.push(a)}return{apply(e,r,o){const s=t.hasChanged,a=n.hasChanged;if(t.add(u),e){r.add(g);for(const t of b){const n=t(e,o);n&&r.add(n)}}if(s()||a())return w.add(i),!0},inline(e,t){const n=z("-",e),r=g==="-"+n?"":h({[m+n]:e});t.add(g+n);const{hasChanged:i}=o;return r&&o.add(r),i()},className:g,defaultVariants:l,selector:m,variantProps:f}},W=P(":root",i),R=s({css:(...e)=>{let o,i=[],a=r(null);for(const r of e)if(r===Object(r))if(t in r)for(const e of r[t])i.push(e),n(a,e.defaultVariants);else i.push(o=N(r)),n(a,o.defaultVariants);return o=o||N({}),s((e=>{const{css:n,...l}=Object(e),d=new Set;let g,p=!1;for(const e of i)p=e.apply(l,d,a)||p;n===Object(n)&&(g=o.inline(n,d)),(p||g)&&v();for(const e in o.variantProps)c.has(e)||delete l[e];"className"in l&&String(l.className).split(/\s+/).forEach(d.add,d);const m=b(d);return l.className=m.join(" "),s(r(null),"className",{get[t](){return i},className:l.className,props:l,selector:o.selector})}),"className",{get[t](){return i},get className(){return o.apply()&&v(),o.className},selector:o.selector})},config:m,global:$,keyframes:e=>{const t=z(d,e);return $({["@keyframes "+t]:e},t)},prefix:d,reset:()=>(u.clear(),S.clear(),k.clear(),w.clear(),W.className,R),theme:n(P,W),get cssText(){return I},getCssString:()=>I},"cssText",{});return R},$=Symbol.for("react.element"),N=Symbol.for("react.forward_ref"),W=e=>{const r=P(e);return n(r,{styled:(...e)=>{const n=e.map((e=>Object(e).type?e.type:e)).find((e=>e))||"span",o=r.css(...e.filter((e=>t in Object(e)||e&&"object"==typeof e&&!e.$$typeof)));return Object.setPrototypeOf({render(e,t){const{props:{as:r=n,...i},...s}=o(e);return{constructor:void 0,$$typeof:$,props:i,ref:t,type:r,__v:0}},$$typeof:N,[t]:o[t],[Symbol.toPrimitive]:()=>o.selector,toString:()=>o.selector,get className(){return o.className},get selector(){return o.selector},type:n},Object(n))}})},R=()=>R.config||(R.config=W()),T=(...e)=>R().css(...e),A=(...e)=>R().global(...e),L=(...e)=>R().keyframes(...e),V=(...e)=>R().styled(...e);globalThis.stitches={createCss:W,css:T,default:W,defaultThemeMap:j,global:A,keyframes:L,styled:V} | ||
(()=>{var{toPrimitive:e}=Symbol,t=Symbol.for("sxs.composers"),{assign:n,create:r,defineProperties:o,getOwnPropertyDescriptors:i}=Object,a=(t,r,a)=>n(o(t,i(a)),{[e]:()=>t[r],toString:()=>t[r]}),s=e=>e.includes("-")?e:e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),l=(e,t)=>e.reduce(((e,n)=>(e.push(...t.map((e=>e.includes("&")?e.replace(/&/g,/[ +>|~]/.test(n)&&/&[^]*&/.test(e)?`:is(${n})`:n):n+" "+e))),e)),[]),c=/\s*,\s*(?![^()]*\))/,d=/(-columns|(^|[^e]-)padding|[^t]-spacing|l-align|rows|(^|(^border|[dkmnptx]|le|ne)-)width|^border|tom|[ek]-start|(o|[^e]-du)ration|us|(^|[^tv]-)left|(^|-)top|tance|rgin|e-offset|(er|g|n|t)-block|(^|[^tv]-)right|basis|[gnt]-inline|gap|(^|[^e]-)height|ness|(^|[^p]-)inset|[ek]-end|elay|tline|ve|dent|-rotate|n-rule|(c|ck|d|ne|t)-size)$/,g=/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,p=/\s+(?![^()]*\))/,m=e=>t=>e(..."string"==typeof t?String(t).split(p):[t]),h=/([\d.]+)([^]*)/,u={appearance:e=>({WebkitAppearance:e,appearance:e}),backfaceVisibility:e=>({WebkitBackfaceVisibility:e,backfaceVisibility:e}),backgroundClip:e=>({WebkitBackgroundClip:e,backgroundClip:e}),clipPath:e=>({WebkitClipPath:e,clipPath:e}),content:e=>({content:/^([^]*["'][^]*|[A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(e)?e:`"${e}"`}),hyphens:e=>({WebkitHyphens:e,hyphens:e}),maskImage:e=>({WebkitMaskImage:e,maskImage:e}),tabSize:e=>({MozTabSize:e,tabSize:e}),userSelect:e=>({WebkitUserSelect:e,userSelect:e}),marginBlock:m(((e,t)=>({marginBlockStart:e,marginBlockEnd:t||e}))),marginInline:m(((e,t)=>({marginInlineStart:e,marginInlineEnd:t||e}))),maxSize:m(((e,t)=>({maxBlockSize:e,maxInlineSize:t||e}))),minSize:m(((e,t)=>({minBlockSize:e,minInlineSize:t||e}))),paddingBlock:m(((e,t)=>({paddingBlockStart:e,paddingBlockEnd:t||e}))),paddingInline:m(((e,t)=>({paddingInlineStart:e,paddingInlineEnd:t||e})))},f=e=>{const{media:t,themeMap:n,utils:r}=e;let o,i,a,p;return m=>((e,t)=>{const n=new WeakSet;let r,o;const i=(e,a,d)=>{let g="";e:for(let p in e){const m=64===p.charCodeAt(0);for(const h of m?[].concat(e[p]):[e[p]]){if("function"==typeof t&&(p!==r||h!==o)){const n=t(p,h,e);if(null!==n){r=p,o=h,g+=n===Object(n)?i(n,a,d):null==n?"":n;continue e}}const m=64===p.charCodeAt(0);if(h!==Object(h)||"length"in h){for(let e=0;e<d.length;++e)n.has(d[e])||(n.add(d[e]),g+=d[e]+"{");a.length&&!n.has(a)&&(n.add(a),g+=a+"{");for(const e of/^@import/i.test(p)?[].concat(h):[h])g+=(m?p+" ":s(p)+":")+String(e)+";"}else{n.has(a)&&(n.delete(a),g+="}");const e=Object(p),t=m?a:a.length?l(a,p.split(c)):p.split(c);g+=i(h,t,m?d.concat(e):d),n.has(e)&&(n.delete(e),g+="}"),n.has(t)&&(n.delete(t),g+="}")}}}return g};return i(e,[],[])})(m,((l,c)=>{const m=l.charCodeAt(0),f=64===m?l:/[A-Z]/.test(b=l)?b:b.replace(/-[^]/g,(e=>e[1].toUpperCase()));var b;const S=64===m?l:s(l);if("function"==typeof r[l]){if(r[l]!=a||c!=p)return a=r[l],p=c,a(e)(p)}else if("function"==typeof u[f]&&(u[f]!=a||c!=p))return a=u[f],p=c,a(p);if(p=c,o!=f&&i!=c&&/^((min|max)?((Block|Inline)Size|Height|Width)|height|width)$/.test(f)){o=f,i=c;const e=i.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,((e,t,n,r)=>t+("stretch"===n?`-moz-available${r};${S}:${t}-webkit-fill-available`:`-moz-fit-content${r};${S}:${t}fit-content`)+r));if(e!=c)return{[l]:e}}let k=64===m?(l.slice(1)in t?"@media "+t[l.slice(1)]:l).replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,((e,t,n,r,o,i)=>{const a=h.test(t),s=.0625*(a?-1:1),[l,c]=a?[r,t]:[t,r];return"("+("="===n[0]?"":">"===n[0]===a?"max-":"min-")+l+":"+("="!==n[0]&&1===n.length?c.replace(h,((e,t,r)=>Number(t)+s*(">"===n?1:-1)+r)):c)+(o?") and ("+(">"===o[0]?"min-":"max-")+l+":"+(1===o.length?i.replace(h,((e,t,n)=>Number(t)+s*(">"===o?-1:1)+n)):i):"")+")"})):36===m?"-"+l.replace(/\$/g,"-"):l;const y=c===Object(c)?c:c&&"number"==typeof c&&d.test(S)?String(c)+"px":String(c).replace(g,((e,t,r,o,i)=>"$"==o==!!r?e:(t||"--"==o?"calc(":"")+"var("+("$"===o?"--"+(i.includes("$")?"":f in n?n[f]+"-":"")+i.replace(/\$/g,"-"):o+i)+")"+(t||"--"==o?"*"+(t||"")+(r||"1")+")":"")));return c!=y||S!=k?{[k]:y}:null}))},{from:b,isArray:S}=Array,{ownKeys:k}=Reflect,y=class extends Set{toString(){return b(this).join("")}get hasChanged(){const{size:e}=this;return()=>e<this.size}},B=y;y.prototype[e]=y.prototype.toString;var w="colors",C="sizes",I="space",x={gap:I,gridGap:I,columnGap:I,gridColumnGap:I,rowGap:I,gridRowGap:I,inset:I,insetBlock:I,insetBlockEnd:I,insetBlockStart:I,insetInline:I,insetInlineEnd:I,insetInlineStart:I,margin:I,marginTop:I,marginRight:I,marginBottom:I,marginLeft:I,marginBlock:I,marginBlockEnd:I,marginBlockStart:I,marginInline:I,marginInlineEnd:I,marginInlineStart:I,padding:I,paddingTop:I,paddingRight:I,paddingBottom:I,paddingLeft:I,paddingBlock:I,paddingBlockEnd:I,paddingBlockStart:I,paddingInline:I,paddingInlineEnd:I,paddingInlineStart:I,top:I,right:I,bottom:I,left:I,scrollMargin:I,scrollMarginTop:I,scrollMarginRight:I,scrollMarginBottom:I,scrollMarginLeft:I,scrollMarginX:I,scrollMarginY:I,scrollMarginBlock:I,scrollMarginBlockEnd:I,scrollMarginBlockStart:I,scrollMarginInline:I,scrollMarginInlineEnd:I,scrollMarginInlineStart:I,scrollPadding:I,scrollPaddingTop:I,scrollPaddingRight:I,scrollPaddingBottom:I,scrollPaddingLeft:I,scrollPaddingX:I,scrollPaddingY:I,scrollPaddingBlock:I,scrollPaddingBlockEnd:I,scrollPaddingBlockStart:I,scrollPaddingInline:I,scrollPaddingInlineEnd:I,scrollPaddingInlineStart:I,fontSize:"fontSizes",background:w,backgroundColor:w,backgroundImage:w,border:w,borderBlock:w,borderBlockEnd:w,borderBlockStart:w,borderBottom:w,borderBottomColor:w,borderColor:w,borderInline:w,borderInlineEnd:w,borderInlineStart:w,borderLeft:w,borderLeftColor:w,borderRight:w,borderRightColor:w,borderTop:w,borderTopColor:w,caretColor:w,color:w,columnRuleColor:w,fill:w,outline:w,outlineColor:w,stroke:w,textDecorationColor:w,fontFamily:"fonts",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",blockSize:C,minBlockSize:C,maxBlockSize:C,inlineSize:C,minInlineSize:C,maxInlineSize:C,width:C,minWidth:C,maxWidth:C,height:C,minHeight:C,maxHeight:C,flexBasis:C,gridTemplateColumns:C,gridTemplateRows:C,borderWidth:"borderWidths",borderTopWidth:"borderWidths",borderRightWidth:"borderWidths",borderBottomWidth:"borderWidths",borderLeftWidth:"borderWidths",borderStyle:"borderStyles",borderTopStyle:"borderStyles",borderRightStyle:"borderStyles",borderBottomStyle:"borderStyles",borderLeftStyle:"borderStyles",borderRadius:"radii",borderTopLeftRadius:"radii",borderTopRightRadius:"radii",borderBottomRightRadius:"radii",borderBottomLeftRadius:"radii",boxShadow:"shadows",textShadow:"shadows",transition:"transitions",zIndex:"zIndices"},$=e=>{const t={};for(const n in e)for(const r in e[n])t["$"+n+"-"+r]=String(e[n][r]).replace(/\$[$\w-]+/g,(e=>/[^]\$/.test(e)?e:"$"+n+e));return t},j=(e,t)=>{for(var n=JSON.stringify(t),r=n.length,o=9;r;)o=Math.imul(o^n.charCodeAt(--r),9**9);return e+(o^o>>>9).toString(36).slice(-5)},z=class{constructor(e,t,n){this.value=e,this.token=t,this.scale=n}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+this.scale+"-"+this.token}toString(){return this.computedValue}},O=class extends Array{toString(){return this.join("")}get hasChanged(){const e=String(this);return()=>e!==String(this)}},v=O;O.prototype[e]=O.prototype.toString;var E=e=>{let t=null,r=null,o=null;const i="append"===e.insertionMethod;return e=>{if("object"==typeof document){cancelAnimationFrame(o);const a=(e=>(t||(t=document.head||document.documentElement),r||(r=document.getElementById("stitches")||n(document.createElement("style"),{id:"stitches",textContent:e})),r.parentNode||t[i?"append":"prepend"](r),r.textContent))();a?a!==e&&"complete"==document.readyState&&(o=requestAnimationFrame((()=>r.textContent=e))):r.textContent=e}}},M=Symbol.for("react.element"),P=Symbol.for("react.forward_ref"),W=e=>{const o=(e=>{e=Object(e);const o=n({initial:"all"},e.media),i=Object(e.theme),s=Object(e.themeMap||x),l=Object(e.utils),c=new Set([].concat(e.passthru||["as","className"])),d=e.prefix||"sx",g=("function"==typeof e.insertionMethod?e.insertionMethod:E)(e),p="03kze",m={theme:i,media:o,prefix:d,themeMap:s,utils:l},h=f(m),u=new B,S=new B,y=new B,w=new B,C=new B([u,S,y,w]);let I="";const O=()=>{const e=b(C).join("");I!==e&&g(I=e)},M=(e,t)=>{t=e===Object(e)?e:Object(t),e="string"==typeof e?e:"";const n=$(t),o=(e=e||j(d,n)).replace(/^\w/,".$&"),i=e===d+p?"":h({[o]:n}),s=a(r(null),"className",{className:e,selector:o});for(const e in t){s[e]=r(null);for(const n in t[e])s[e][n]=new z(t[e][n],n,e)}return a(s,"className",{get className(){const{hasChanged:t}=S;return S.add(i),t()&&O(),e},selector:o})},P=(e,t="")=>{const n=new B,o=new B;for(const t in e)if(e[t]!==Object(e[t])||k(e[t]).length){const r=h({[t]:e[t]});("@import"===t?n:o).add(r)}const i=a(r(null),"name",{name:t}),s=a((()=>{let e=u.hasChanged,t=y.hasChanged;return n.forEach((e=>{u.add(e)})),o.forEach((e=>{y.add(e)})),(e()||t())&&O(),i}),"name",{get name(){return String(s())}});return s},W=e=>{const t=new B,n=new v,o=new B,i=new B([t,n,o]);let{variants:a,compoundVariants:s,defaultVariants:l,...c}=e;l=Object(l);const g=j(d,e),m="."+g,u=g===d+p?"":h({[m]:c});w.add(i);const f=r(null),b=[],S=[];for(const e in a)for(const t in a[e]){const n=a[e][t];S.push({[e]:t,css:n})}S.push(...s||[]);for(const e in S){const{css:t,...o}=S[e],i=k(o),a=i.length;for(const e of i)f[e]=f[e]||r(null),f[e][o[e]]=!0;const s=(e,r)=>{e={...e};for(const t in r)void 0!==e[t]||Object(f[t])[e[t]]||(e[t]=r[t]);const s=new Set;if(i.length&&i.every((t=>{const n=e[t],r=String(o[t]);if(r===String(n))return!0;if(n===Object(n))for(const e in n)if(r==String(n[e])&&64===e.charCodeAt(0))return s.add(e),!0}))){let e=Object(t);for(const t of s)e={[t]:e};const r=g+j("",e)+"--"+(1===a?i[0]+"-"+o[i[0]]:"c"+a),l=h({["."+r]:e});return(n[a-1]||(n[a-1]=new B)).add(l),r}};b.push(s)}return{apply(e,r,o){const a=t.hasChanged,s=n.hasChanged;if(t.add(u),e){r.add(g);for(const t of b){const n=t(e,o);n&&r.add(n)}}if(a()||s())return w.add(i),!0},inline(e,t){const n=j("-",e),r=g==="-"+n?"":h({[m+n]:e});t.add(g+n);const{hasChanged:i}=o;return r&&o.add(r),i()},className:g,defaultVariants:l,selector:m,variantProps:f}},N=M(":root",i),R=a({css:(...e)=>{let o,i=[],s=r(null);for(const r of e)if(r===Object(r))if(t in r)for(const e of r[t])i.push(e),n(s,e.defaultVariants);else i.push(o=W(r)),n(s,o.defaultVariants);return o=o||W({}),a((e=>{const{css:n,...l}=Object(e),d=new Set;let g,p=!1;for(const e of i)p=e.apply(l,d,s)||p;n===Object(n)&&(g=o.inline(n,d)),(p||g)&&O();for(const e in o.variantProps)c.has(e)||delete l[e];"className"in l&&String(l.className).split(/\s+/).forEach(d.add,d);const m=b(d);return l.className=m.join(" "),a(r(null),"className",{get[t](){return i},className:l.className,props:l,selector:o.selector})}),"className",{get[t](){return i},get className(){return o.apply()&&O(),o.className},selector:o.selector})},config:m,global:P,keyframes:e=>{const t=j(d,e);return P({["@keyframes "+t]:e},t)},prefix:d,reset:()=>(u.clear(),S.clear(),y.clear(),w.clear(),N.className,R),theme:n(M,N),get cssText(){return I},getCssString:()=>I},"cssText",{});return R})(e);return n(o,{styled:(...e)=>{const n=e.map((e=>Object(e).type?e.type:e)).find((e=>e))||"span",r=o.css(...e.filter((e=>t in Object(e)||e&&"object"==typeof e&&!e.$$typeof)));return Object.setPrototypeOf({render(e,t){const{props:{as:o=n,...i},...a}=r(e);return{constructor:void 0,$$typeof:M,props:i,ref:t,type:o,__v:0}},$$typeof:P,[t]:r[t],[Symbol.toPrimitive]:()=>r.selector,toString:()=>r.selector,get className(){return r.className},get selector(){return r.selector},type:n},Object(n))}})},N=()=>N.config||(N.config=W()),R=(...e)=>N().css(...e),T=(...e)=>N().global(...e),A=(...e)=>N().keyframes(...e),L=(...e)=>N().styled(...e);globalThis.stitches={createCss:W,css:R,default:W,defaultThemeMap:x,global:T,keyframes:A,styled:L}})() | ||
//# sourceMappingUrl=index.map |
{ | ||
"name": "@stitches/react", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "The modern CSS-in-JS library", | ||
@@ -27,3 +27,3 @@ "type": "module", | ||
"dependencies": { | ||
"@stitches/core": "^0.1.0" | ||
"@stitches/core": "^0.1.1" | ||
}, | ||
@@ -81,3 +81,3 @@ "devDependencies": { | ||
], | ||
"gitHead": "d86f1ddd2c71aab8feb36e3d97e996cbd73b9733" | ||
"gitHead": "bb85b2106de7e0d7ad954079dcc111640d3f0339" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
104656
399
Updated@stitches/core@^0.1.1