@stitches/react
Advanced tools
Comparing version 0.1.0-canary.18 to 0.1.0-canary.19
@@ -1,2 +0,2 @@ | ||
(()=>{var{toPrimitive:e}=Symbol,t=Symbol.for("sxs.composers"),{assign:r,create:n,defineProperties:o,getOwnPropertyDescriptors:s}=Object,i=(t,n,i)=>r(o(t,s(i)),{[e]:()=>t[n],toString:()=>t[n]}),{from:l,isArray:a}=Array,{ownKeys:c}=Reflect,d=class extends Set{toString(){return l(this).join("")}get hasChanged(){const{size:e}=this;return()=>e<this.size}},g=d;d.prototype[e]=d.prototype.toString;var p=(e,t)=>e.reduce(((e,r)=>(e.push(...t.map((e=>/[ +>|~]/.test(r)&&/&[^]*&/.test(e)?e.replace(/&/g,`:is(${r})`):/&/.test(e)?e.replace(/&/g,r):e.replace(/^/,r+" ")))),e)),[]),f=e=>e!==Object(e)||!(e.constructor===Object||null==e.constructor),h=/(-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)$/,u=/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,m=e=>/^\$/.test(e)?"-"+e.replace(/\$/g,"-"):e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),b=(e,t,r)=>h.test(e)&&Number(t)?String(t)+"px":String(t).replace(u,((t,n,o,s,i)=>"$"==s==!!o?t:(n||"--"==s?"calc(":"")+"var("+("$"===s?"--"+(!/\$/.test(i)&&e in r?r[e]+"-":"")+i.replace(/\$/g,"-"):s+i)+")"+(n||"--"==s?"*"+(n||"")+(o||"1")+")":""))),S=e=>{const{conditions:t,themeMap:r,utils:n}=e,o=Symbol.for("sxs.isOpen"),s=/\s*,\s*(?![^()]*\))/;return i=>{let l="";const c=[];let d,g;const h=(i,u)=>{const{when:S,...y}=i;S&&(y.when=S);for(let S of Reflect.ownKeys(y)){let w=y[S];const k=64==S.charCodeAt(0);w=k&&a(w)?w:[w];e:for(let a of w)if(f(a)){for(const e of c)e[o]||(l+=e,l+="{",e[o]=!0);if(u.length&&!u[o]&&(l+=u.join(", "),l+="{",u[o]=!0),S in n&&(S!=g||i!=d)){const t=n[S](e)(a);if(void 0!==t){t===Object(t)&&(g=S,h(d=t,u));continue e}}const t=k?S:m(S),s=k?a:b(S,a,r);l+=t+(k?" ":":")+s+";"}else{const e=(e,t,r)=>{const n=e?c.push(Object(t)):c.length;if(u.length&&u[o]&&(l+="}",u[o]=!1),h(r,e?u:u.length?p(u,t.split(s)):t.split(s)),e&&n)for(const e of c.splice(n-1))e[o]&&(l+="}",e[o]=!1)};if("when"===S)for(const r in a)e(!0,r in t?t[r]:r,a[r]);else e(k,S,a)}}u.length&&u[o]&&(l+="}",u[o]=!1)};return h(Object(i),[]),l}},y="colors",w="sizes",k="space",B={gap:k,gridGap:k,columnGap:k,gridColumnGap:k,rowGap:k,gridRowGap:k,inset:k,insetBlock:k,insetBlockEnd:k,insetBlockStart:k,insetInline:k,insetInlineEnd:k,insetInlineStart:k,margin:k,marginTop:k,marginRight:k,marginBottom:k,marginLeft:k,marginBlock:k,marginBlockEnd:k,marginBlockStart:k,marginInline:k,marginInlineEnd:k,marginInlineStart:k,padding:k,paddingTop:k,paddingRight:k,paddingBottom:k,paddingLeft:k,paddingBlock:k,paddingBlockEnd:k,paddingBlockStart:k,paddingInline:k,paddingInlineEnd:k,paddingInlineStart:k,top:k,right:k,bottom:k,left:k,scrollMargin:k,scrollMarginTop:k,scrollMarginRight:k,scrollMarginBottom:k,scrollMarginLeft:k,scrollMarginX:k,scrollMarginY:k,scrollMarginBlock:k,scrollMarginBlockEnd:k,scrollMarginBlockStart:k,scrollMarginInline:k,scrollMarginInlineEnd:k,scrollMarginInlineStart:k,scrollPadding:k,scrollPaddingTop:k,scrollPaddingRight:k,scrollPaddingBottom:k,scrollPaddingLeft:k,scrollPaddingX:k,scrollPaddingY:k,scrollPaddingBlock:k,scrollPaddingBlockEnd:k,scrollPaddingBlockStart:k,scrollPaddingInline:k,scrollPaddingInlineEnd:k,scrollPaddingInlineStart:k,fontSize:"fontSizes",background:y,backgroundColor:y,backgroundImage:y,border:y,borderBlock:y,borderBlockEnd:y,borderBlockStart:y,borderBottom:y,borderBottomColor:y,borderColor:y,borderInline:y,borderInlineEnd:y,borderInlineStart:y,borderLeft:y,borderLeftColor:y,borderRight:y,borderRightColor:y,borderTop:y,borderTopColor:y,caretColor:y,color:y,columnRuleColor:y,fill:y,outlineColor:y,stroke:y,textDecorationColor:y,fontFamily:"fonts",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",blockSize:w,minBlockSize:w,maxBlockSize:w,inlineSize:w,minInlineSize:w,maxInlineSize:w,width:w,minWidth:w,maxWidth:w,height:w,minHeight:w,maxHeight:w,flexBasis:w,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"},j=e=>{const t={};for(const r in e)for(const n in e[r])t["$"+r+"-"+n]=String(e[r][n]).replace(/\$[$\w-]+/g,(e=>/[^]\$/.test(e)?e:"$"+r+e));return t},O=(e,t)=>{for(var r=JSON.stringify(t),n=r.length,o=9;n;)o=Math.imul(o^r.charCodeAt(--n),9**9);return e+(o^o>>>9).toString(36).slice(-5)},C=class{constructor(e,t,r){this.value=e,this.token=t,this.scale=r}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+this.scale+"-"+this.token}toString(){return this.computedValue}},x=class extends Array{toString(){return this.join("")}get hasChanged(){const e=String(this);return()=>e!==String(this)}},I=x;x.prototype[e]=x.prototype.toString;var v=e=>{const t="append"===e.insertMethod;let n=null,o=null;return e=>{"object"==typeof document&&(n||(n=document.head||document.documentElement),o||(o=document.getElementById("stitches")||r(document.createElement("style"),{id:"stitches"})),o.parentNode||n[t?"append":"prepend"](o),o.textContent=e)}},$=e=>{e=Object(e);const o=r({initial:"@media all"},e.conditions),s=Object(e.theme),a=Object(e.themeMap||B),d=Object(e.utils),p=new Set([].concat(e.passthru||["as","className"])),f=e.prefix||"sx",h=("function"==typeof e.insertMethod?e.insertMethod:v)(e),u="03kze",m={theme:s,conditions:o,prefix:f,themeMap:a,utils:d},b=S(m),y=new g,w=new g,k=new g,x=new g,$=new g([y,w,k,x]);let M="";const N=()=>{const e=l($).join("");M!==e&&h(M=e)},P=(e,t)=>{t=e===Object(e)?e:Object(t),e="string"==typeof e?e:"";const r=j(t),o=(e=e||O(f,r)).replace(/^\w/,".$&"),s=e===f+u?"":b({[o]:r}),l=i(n(null),"className",{className:e,selector:o});for(const e in t){l[e]=n(null);for(const r in t[e])l[e][r]=new C(t[e][r],r,e)}return i(l,"className",{get className(){const{hasChanged:t}=w;return w.add(s),t()&&N(),e},selector:o})},E=(e,t="")=>{const r=new g,o=new g;for(const t in e)if(e[t]!==Object(e[t])||c(e[t]).length){const n=b({[t]:e[t]});("@import"===t?r:o).add(n)}const s=i(n(null),"name",{name:t}),l=i((()=>{let e=y.hasChanged,t=k.hasChanged;return r.forEach((e=>{y.add(e)})),o.forEach((e=>{k.add(e)})),(e()||t())&&N(),s}),"name",{get name(){return String(l())}});return l},R=e=>{const t=new g,r=new I,s=new g,i=new g([t,r,s]);let{variants:l,compoundVariants:a,defaultVariants:d,...p}=e;d=Object(d);const h=O(f,e),m="."+h,S=h===f+u?"":b({[m]:p});x.add(i);const y=n(null),w=[],k=[];for(const e in l)for(const t in l[e]){const r=l[e][t];k.push({[e]:t,css:r})}k.push(...a||[]);for(const e in k){const{css:t,...s}=k[e],i=c(s),l=i.length;for(const e of i)y[e]=y[e]||n(null),y[e][s[e]]=!0;const a=(e,n)=>{e={...e};for(const t in n)void 0!==e[t]||Object(y[t])[e[t]]||(e[t]=n[t]);const a=new Set;if(i.length&&i.every((t=>{const r=e[t],n=String(s[t]);if(n===String(r))return!0;if(r===Object(r))for(const e in r)if(n==String(r[e]))return a.add(e),!0}))){let e=Object(t);for(const t of a)e={[t in o?o[t]:t]:e};const n=h+O("",e)+"--"+(1===l?i[0]+"-"+s[i[0]]:"c"+l),c=b({["."+n]:e});return(r[l-1]||(r[l-1]=new g)).add(c),n}};w.push(a)}return{apply(e,n,o){const s=t.hasChanged,l=r.hasChanged;if(t.add(S),e){n.add(h);for(const t of w){const r=t(e,o);r&&n.add(r)}}if(s()||l())return x.add(i),!0},inline(e,t){const r=O("-",e),n=h==="-"+r?"":b({[m+r]:e});t.add(h+r);const{hasChanged:o}=s;return n&&s.add(n),o()},className:h,defaultVariants:d,selector:m,variantProps:y}},z=P(":root",s),W=i({css:(...e)=>{let o,s=[],a=n(null);for(const n of e)if(n===Object(n))if(t in n)for(const e of n[t])s.push(e),r(a,e.defaultVariants);else s.push(o=R(n)),r(a,o.defaultVariants);return o=o||R({}),i((e=>{const{css:r,...c}=Object(e),d=new Set;let g,f=!1;for(const e of s)f=e.apply(c,d,a)||f;r===Object(r)&&(g=o.inline(r,d)),(f||g)&&N();for(const e in o.variantProps)p.has(e)||delete c[e];"className"in c&&String(c.className).split(/\s+/).forEach(d.add,d);const h=l(d);return c.className=h.join(" "),i(n(null),"className",{get[t](){return s},className:c.className,props:c,selector:o.selector})}),"className",{get[t](){return s},get className(){return o.apply()&&N(),o.className},selector:o.selector})},config:m,global:E,keyframes:e=>{const t=O(f,e);return E({["@keyframes "+t]:e},t)},prefix:f,reset:()=>(y.clear(),w.clear(),k.clear(),x.clear(),z.className,W),theme:r(P,z),get cssText(){return M},getCssString:()=>M},"cssText",{});return W},M=Symbol.for("react.element"),N=Symbol.for("react.forward_ref"),P=e=>{const n=$(e);return r(n,{styled:new Proxy(((...e)=>{const r=e.map((e=>Object(e).type?e.type:e)).find((e=>e))||"span",o=n.css(...e.filter((e=>t in Object(e)||e&&"object"==typeof e&&!e.$$typeof)));return Object.setPrototypeOf({render(e,t){const{props:{as:n=r,...s},...i}=o(e);return{constructor:void 0,$$typeof:M,props:s,ref:t,type:n,__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:r},Object(r))}),{get:(e,t)=>t in e?"function"==typeof e[t]?e[t].bind(e):e[t]:e.bind(null,t)})}).reset()},E=()=>E.config||(E.config=P()),R=(...e)=>E().css(...e),z=(...e)=>E().global(...e),W=(...e)=>E().keyframes(...e),T=(...e)=>E().styled(...e);globalThis.stitches=P;stitches.createCss=P;stitches.css=R;stitches.defaultThemeMap=B;stitches.global=z;stitches.keyframes=W;stitches.styled=T})() | ||
(()=>{var{toPrimitive:e}=Symbol,t=Symbol.for("sxs.composers"),{assign:r,create:n,defineProperties:o,getOwnPropertyDescriptors:s}=Object,i=(t,n,i)=>r(o(t,s(i)),{[e]:()=>t[n],toString:()=>t[n]}),{from:l,isArray:a}=Array,{ownKeys:c}=Reflect,d=class extends Set{toString(){return l(this).join("")}get hasChanged(){const{size:e}=this;return()=>e<this.size}},g=d;d.prototype[e]=d.prototype.toString;var p=(e,t)=>e.reduce(((e,r)=>(e.push(...t.map((e=>/[ +>|~]/.test(r)&&/&[^]*&/.test(e)?e.replace(/&/g,`:is(${r})`):/&/.test(e)?e.replace(/&/g,r):e.replace(/^/,r+" ")))),e)),[]),f=e=>e!==Object(e)||!(e.constructor===Object||null==e.constructor),h=/(-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)$/,u=/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,m=e=>e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),b=e=>/^\$/.test(e)?"-"+e.replace(/\$/g,"-"):m(e),S=(e,t,r)=>h.test(m(e))&&Number(t)?String(t)+"px":String(t).replace(u,((t,n,o,s,i)=>"$"==s==!!o?t:(n||"--"==s?"calc(":"")+"var("+("$"===s?"--"+(!/\$/.test(i)&&e in r?r[e]+"-":"")+i.replace(/\$/g,"-"):s+i)+")"+(n||"--"==s?"*"+(n||"")+(o||"1")+")":""))),y=e=>{const{conditions:t,themeMap:r,utils:n}=e,o=Symbol.for("sxs.isOpen"),s=/\s*,\s*(?![^()]*\))/;return i=>{let l="";const c=[];let d,g;const h=(i,u)=>{const{when:m,...y}=i;m&&(y.when=m);for(let m of Reflect.ownKeys(y)){let w=y[m];const k=64==m.charCodeAt(0);w=k&&a(w)?w:[w];e:for(let a of w)if(f(a)){for(const e of c)e[o]||(l+=e,l+="{",e[o]=!0);if(u.length&&!u[o]&&(l+=u.join(", "),l+="{",u[o]=!0),m in n&&(m!=g||i!=d)){const t=n[m](e)(a);if(void 0!==t){t===Object(t)&&(g=m,h(d=t,u));continue e}}const t=k?m:b(m),s=k?a:S(m,a,r);l+=t+(k?" ":":")+s+";"}else{const e=(e,t,r)=>{const n=e?c.push(Object(t)):c.length;if(u.length&&u[o]&&(l+="}",u[o]=!1),h(r,e?u:u.length?p(u,t.split(s)):t.split(s)),e&&n)for(const e of c.splice(n-1))e[o]&&(l+="}",e[o]=!1)};if("when"===m)for(const r in a)e(!0,r in t?t[r]:r,a[r]);else e(k,m,a)}}u.length&&u[o]&&(l+="}",u[o]=!1)};return h(Object(i),[]),l}},w="colors",k="sizes",B="space",j={gap:B,gridGap:B,columnGap:B,gridColumnGap:B,rowGap:B,gridRowGap:B,inset:B,insetBlock:B,insetBlockEnd:B,insetBlockStart:B,insetInline:B,insetInlineEnd:B,insetInlineStart:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,marginBlock:B,marginBlockEnd:B,marginBlockStart:B,marginInline:B,marginInlineEnd:B,marginInlineStart:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,paddingBlock:B,paddingBlockEnd:B,paddingBlockStart:B,paddingInline:B,paddingInlineEnd:B,paddingInlineStart:B,top:B,right:B,bottom:B,left:B,scrollMargin:B,scrollMarginTop:B,scrollMarginRight:B,scrollMarginBottom:B,scrollMarginLeft:B,scrollMarginX:B,scrollMarginY:B,scrollMarginBlock:B,scrollMarginBlockEnd:B,scrollMarginBlockStart:B,scrollMarginInline:B,scrollMarginInlineEnd:B,scrollMarginInlineStart:B,scrollPadding:B,scrollPaddingTop:B,scrollPaddingRight:B,scrollPaddingBottom:B,scrollPaddingLeft:B,scrollPaddingX:B,scrollPaddingY:B,scrollPaddingBlock:B,scrollPaddingBlockEnd:B,scrollPaddingBlockStart:B,scrollPaddingInline:B,scrollPaddingInlineEnd:B,scrollPaddingInlineStart:B,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:k,minBlockSize:k,maxBlockSize:k,inlineSize:k,minInlineSize:k,maxInlineSize:k,width:k,minWidth:k,maxWidth:k,height:k,minHeight:k,maxHeight:k,flexBasis:k,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"},O=e=>{const t={};for(const r in e)for(const n in e[r])t["$"+r+"-"+n]=String(e[r][n]).replace(/\$[$\w-]+/g,(e=>/[^]\$/.test(e)?e:"$"+r+e));return t},C=(e,t)=>{for(var r=JSON.stringify(t),n=r.length,o=9;n;)o=Math.imul(o^r.charCodeAt(--n),9**9);return e+(o^o>>>9).toString(36).slice(-5)},x=class{constructor(e,t,r){this.value=e,this.token=t,this.scale=r}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+this.scale+"-"+this.token}toString(){return this.computedValue}},I=class extends Array{toString(){return this.join("")}get hasChanged(){const e=String(this);return()=>e!==String(this)}},v=I;I.prototype[e]=I.prototype.toString;var $=e=>{const t="append"===e.insertMethod;let n=null,o=null;return e=>{"object"==typeof document&&(n||(n=document.head||document.documentElement),o||(o=document.getElementById("stitches")||r(document.createElement("style"),{id:"stitches"})),o.parentNode||n[t?"append":"prepend"](o),o.textContent=e)}},M=e=>{e=Object(e);const o=r({initial:"@media all"},e.conditions),s=Object(e.theme),a=Object(e.themeMap||j),d=Object(e.utils),p=new Set([].concat(e.passthru||["as","className"])),f=e.prefix||"sx",h=("function"==typeof e.insertMethod?e.insertMethod:$)(e),u="03kze",m={theme:s,conditions:o,prefix:f,themeMap:a,utils:d},b=y(m),S=new g,w=new g,k=new g,B=new g,I=new g([S,w,k,B]);let M="";const N=()=>{const e=l(I).join("");M!==e&&h(M=e)},P=(e,t)=>{t=e===Object(e)?e:Object(t),e="string"==typeof e?e:"";const r=O(t),o=(e=e||C(f,r)).replace(/^\w/,".$&"),s=e===f+u?"":b({[o]:r}),l=i(n(null),"className",{className:e,selector:o});for(const e in t){l[e]=n(null);for(const r in t[e])l[e][r]=new x(t[e][r],r,e)}return i(l,"className",{get className(){const{hasChanged:t}=w;return w.add(s),t()&&N(),e},selector:o})},E=(e,t="")=>{const r=new g,o=new g;for(const t in e)if(e[t]!==Object(e[t])||c(e[t]).length){const n=b({[t]:e[t]});("@import"===t?r:o).add(n)}const s=i(n(null),"name",{name:t}),l=i((()=>{let e=S.hasChanged,t=k.hasChanged;return r.forEach((e=>{S.add(e)})),o.forEach((e=>{k.add(e)})),(e()||t())&&N(),s}),"name",{get name(){return String(l())}});return l},R=e=>{const t=new g,r=new v,s=new g,i=new g([t,r,s]);let{variants:l,compoundVariants:a,defaultVariants:d,...p}=e;d=Object(d);const h=C(f,e),m="."+h,S=h===f+u?"":b({[m]:p});B.add(i);const y=n(null),w=[],k=[];for(const e in l)for(const t in l[e]){const r=l[e][t];k.push({[e]:t,css:r})}k.push(...a||[]);for(const e in k){const{css:t,...s}=k[e],i=c(s),l=i.length;for(const e of i)y[e]=y[e]||n(null),y[e][s[e]]=!0;const a=(e,n)=>{e={...e};for(const t in n)void 0!==e[t]||Object(y[t])[e[t]]||(e[t]=n[t]);const a=new Set;if(i.length&&i.every((t=>{const r=e[t],n=String(s[t]);if(n===String(r))return!0;if(r===Object(r))for(const e in r)if(n==String(r[e]))return a.add(e),!0}))){let e=Object(t);for(const t of a)e={[t in o?o[t]:t]:e};const n=h+C("",e)+"--"+(1===l?i[0]+"-"+s[i[0]]:"c"+l),c=b({["."+n]:e});return(r[l-1]||(r[l-1]=new g)).add(c),n}};w.push(a)}return{apply(e,n,o){const s=t.hasChanged,l=r.hasChanged;if(t.add(S),e){n.add(h);for(const t of w){const r=t(e,o);r&&n.add(r)}}if(s()||l())return B.add(i),!0},inline(e,t){const r=C("-",e),n=h==="-"+r?"":b({[m+r]:e});t.add(h+r);const{hasChanged:o}=s;return n&&s.add(n),o()},className:h,defaultVariants:d,selector:m,variantProps:y}},z=P(":root",s),W=i({css:(...e)=>{let o,s=[],a=n(null);for(const n of e)if(n===Object(n))if(t in n)for(const e of n[t])s.push(e),r(a,e.defaultVariants);else s.push(o=R(n)),r(a,o.defaultVariants);return o=o||R({}),i((e=>{const{css:r,...c}=Object(e),d=new Set;let g,f=!1;for(const e of s)f=e.apply(c,d,a)||f;r===Object(r)&&(g=o.inline(r,d)),(f||g)&&N();for(const e in o.variantProps)p.has(e)||delete c[e];"className"in c&&String(c.className).split(/\s+/).forEach(d.add,d);const h=l(d);return c.className=h.join(" "),i(n(null),"className",{get[t](){return s},className:c.className,props:c,selector:o.selector})}),"className",{get[t](){return s},get className(){return o.apply()&&N(),o.className},selector:o.selector})},config:m,global:E,keyframes:e=>{const t=C(f,e);return E({["@keyframes "+t]:e},t)},prefix:f,reset:()=>(S.clear(),w.clear(),k.clear(),B.clear(),z.className,W),theme:r(P,z),get cssText(){return M},getCssString:()=>M},"cssText",{});return W},N=Symbol.for("react.element"),P=Symbol.for("react.forward_ref"),E=e=>{const n=M(e);return r(n,{styled:new Proxy(((...e)=>{const r=e.map((e=>Object(e).type?e.type:e)).find((e=>e))||"span",o=n.css(...e.filter((e=>t in Object(e)||e&&"object"==typeof e&&!e.$$typeof)));return Object.setPrototypeOf({render(e,t){const{props:{as:n=r,...s},...i}=o(e);return{constructor:void 0,$$typeof:N,props:s,ref:t,type:n,__v:0}},$$typeof:P,[t]:o[t],[Symbol.toPrimitive]:()=>o.selector,toString:()=>o.selector,get className(){return o.className},get selector(){return o.selector},type:r},Object(r))}),{get:(e,t)=>t in e?"function"==typeof e[t]?e[t].bind(e):e[t]:e.bind(null,t)})}).reset()},R=()=>R.config||(R.config=E()),z=(...e)=>R().css(...e),W=(...e)=>R().global(...e),T=(...e)=>R().keyframes(...e),L=(...e)=>R().styled(...e);globalThis.stitches=E;stitches.createCss=E;stitches.css=z;stitches.defaultThemeMap=j;stitches.global=W;stitches.keyframes=T;stitches.styled=L})() | ||
//# sourceMappingUrl=index.map |
{ | ||
"name": "@stitches/react", | ||
"version": "0.1.0-canary.18", | ||
"version": "0.1.0-canary.19", | ||
"description": "The modern CSS-in-JS library", | ||
@@ -28,3 +28,3 @@ "type": "module", | ||
"dependencies": { | ||
"@stitches/core": "^0.1.0-canary.18" | ||
"@stitches/core": "^0.1.0-canary.19" | ||
}, | ||
@@ -82,3 +82,3 @@ "devDependencies": { | ||
], | ||
"gitHead": "c614dd87fae1485cef5b5a9488a52f6372495504" | ||
"gitHead": "a89841da7a1d119b4e2120d6c0893c0f9368c021" | ||
} |
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
100671