Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stitches/react

Package Overview
Dependencies
Maintainers
3
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stitches/react - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

2

dist/index.iife.js

@@ -1,2 +0,2 @@

(()=>{var{toPrimitive:e}=Symbol,t=Symbol.for("sxs.composers"),{assign:n,create:r,defineProperties:i,getOwnPropertyDescriptors:o}=Object,a=(t,r,a)=>n(i(t,o(a)),{[e]:()=>t[r],toString:()=>t[r]}),l=e=>e.includes("-")?e:e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),s=(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)),[]),{isArray:d}=Array,{from:c}=Array,{prototype:{toString:g}}=Object,p=/\s*,\s*(?![^()]*\))/,m=/([\d.]+)([^]*)/,h={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},u={animationDelay:1,animationDuration:1,backgroundSize:1,blockSize:1,border:1,borderBlock:1,borderBlockEnd:1,borderBlockEndWidth:1,borderBlockStart:1,borderBlockStartWidth:1,borderBlockWidth:1,borderBottom:1,borderBottomLeftRadius:1,borderBottomRightRadius:1,borderBottomWidth:1,borderEndEndRadius:1,borderEndStartRadius:1,borderInlineEnd:1,borderInlineEndWidth:1,borderInlineStart:1,borderInlineStartWidth:1,borderInlineWidth:1,borderLeft:1,borderLeftWidth:1,borderRadius:1,borderRight:1,borderRightWidth:1,borderSpacing:1,borderStartEndRadius:1,borderStartStartRadius:1,borderTop:1,borderTopLeftRadius:1,borderTopRightRadius:1,borderTopWidth:1,borderWidth:1,bottom:1,columnGap:1,columnRule:1,columnRuleWidth:1,columnWidth:1,containIntrinsicSize:1,flexBasis:1,fontSize:1,gap:1,gridAutoColumns:1,gridAutoRows:1,gridTemplateColumns:1,gridTemplateRows:1,height:1,inlineSize:1,inset:1,insetBlock:1,insetBlockEnd:1,insetBlockStart:1,insetInline:1,insetInlineEnd:1,insetInlineStart:1,left:1,letterSpacing:1,margin:1,marginBlock:1,marginBlockEnd:1,marginBlockStart:1,marginBottom:1,marginInline:1,marginInlineEnd:1,marginInlineStart:1,marginLeft:1,marginRight:1,marginTop:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,offsetDistance:1,offsetRotate:1,outline:1,outlineOffset:1,outlineWidth:1,overflowClipMargin:1,padding:1,paddingBlock:1,paddingBlockEnd:1,paddingBlockStart:1,paddingBottom:1,paddingInline:1,paddingInlineEnd:1,paddingInlineStart:1,paddingLeft:1,paddingRight:1,paddingTop:1,perspective:1,right:1,rowGap:1,scrollMargin:1,scrollMarginBlock:1,scrollMarginBlockEnd:1,scrollMarginBlockStart:1,scrollMarginBottom:1,scrollMarginInline:1,scrollMarginInlineEnd:1,scrollMarginInlineStart:1,scrollMarginLeft:1,scrollMarginRight:1,scrollMarginTop:1,scrollPadding:1,scrollPaddingBlock:1,scrollPaddingBlockEnd:1,scrollPaddingBlockStart:1,scrollPaddingBottom:1,scrollPaddingInline:1,scrollPaddingInlineEnd:1,scrollPaddingInlineStart:1,scrollPaddingLeft:1,scrollPaddingRight:1,scrollPaddingTop:1,shapeMargin:1,textDecoration:1,textDecorationThickness:1,textIndent:1,textUnderlineOffset:1,top:1,transitionDelay:1,transitionDuration:1,verticalAlign:1,width:1,wordSpacing:1},f=/\s+(?![^()]*\))/,b=e=>t=>e(..."string"==typeof t?String(t).split(f):[t]),S=JSON.stringify,k={appearance:e=>({WebkitAppearance:e,appearance:e}),backfaceVisibility:e=>({WebkitBackfaceVisibility:e,backfaceVisibility:e}),backdropFilter:e=>({WebkitBackdropFilter:e,backdropFilter:e}),backgroundClip:e=>({WebkitBackgroundClip:e,backgroundClip:e}),boxDecorationBreak:e=>({WebkitBoxDecorationBreak:e,boxDecorationBreak:e}),clipPath:e=>({WebkitClipPath:e,clipPath:e}),content:e=>({content:e.includes('"')||e.includes("'")||/^([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:b(((e,t)=>({marginBlockStart:e,marginBlockEnd:t||e}))),marginInline:b(((e,t)=>({marginInlineStart:e,marginInlineEnd:t||e}))),maxSize:b(((e,t)=>({maxBlockSize:e,maxInlineSize:t||e}))),minSize:b(((e,t)=>({minBlockSize:e,minInlineSize:t||e}))),paddingBlock:b(((e,t)=>({paddingBlockStart:e,paddingBlockEnd:t||e}))),paddingInline:b(((e,t)=>({paddingInlineStart:e,paddingInlineEnd:t||e})))},B=e=>{let t,n,r,i;const o={},a="sx"===e.prefix?"":"--"+e.prefix;return c=>{const f=S(c);return f in o?o[f]:o[f]=((e,t)=>{const n=new WeakSet,r=(e,i,o,a,c)=>{let m="";e:for(const h in e){const u=64===h.charCodeAt(0);for(const f of u&&d(e[h])?e[h]:[e[h]]){if(t&&(h!==a||f!==c)){const n=t(h,f,e);if(null!==n){m+="object"==typeof n&&n?r(n,i,o,h,f):null==n?"":n;continue e}}if("object"==typeof f&&f&&f.toString===g){n.has(i)&&(n.delete(i),m+="}");const e=Object(h),t=u?i:i.length?s(i,h.split(p)):h.split(p);m+=r(f,t,u?o.concat(e):o),n.has(e)&&(n.delete(e),m+="}"),n.has(t)&&(n.delete(t),m+="}")}else{for(let e=0;e<o.length;++e)n.has(o[e])||(n.add(o[e]),m+=o[e]+"{");i.length&&!n.has(i)&&(n.add(i),m+=i+"{"),m+=(u?h+" ":l(h)+":")+String(f)+";"}}}return m};return r(e,[],[])})(c,((o,s)=>{const d=o.charCodeAt(0),c=64===d?o:/[A-Z]/.test(g=o)?g:g.replace(/-[^]/g,(e=>e[1].toUpperCase()));var g;const p=64===d?o:l(o);if("function"==typeof e.utils[o]){if(e.utils[o]!=r||s!=i)return r=e.utils[o],i=s,r(e)(i)}else if("function"==typeof k[c]&&(k[c]!=r||s!=i))return r=k[c],i=s,r(i);if(i=s,t!=c&&n!=s&&p in h){t=c,n=s;const e=((e,t)=>t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,((t,n,r,i)=>n+("stretch"===r?`-moz-available${i};${e}:${n}-webkit-fill-available`:`-moz-fit-content${i};${e}:${n}fit-content`)+i)))(p,String(n));if(e!=s)return{[o]:e}}let f=64===d?(o.slice(1)in e.media?"@media "+e.media[o.slice(1)]:o).replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,((e,t,n,r,i,o)=>{const a=m.test(t),l=.0625*(a?-1:1),[s,d]=a?[r,t]:[t,r];return"("+("="===n[0]?"":">"===n[0]===a?"max-":"min-")+s+":"+("="!==n[0]&&1===n.length?d.replace(m,((e,t,r)=>Number(t)+l*(">"===n?1:-1)+r)):d)+(i?") and ("+(">"===i[0]?"min-":"max-")+s+":"+(1===i.length?o.replace(m,((e,t,n)=>Number(t)+l*(">"===i?-1:1)+n)):o):"")+")"})):36===d?a+o.replace(/\$/g,"-"):o;const b="object"==typeof s&&s?s:"number"==typeof s&&s&&c in u?String(s)+"px":((e,t,n)=>t.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,((t,r,i,o,a)=>"$"==o==!!i?t:(r||"--"==o?"calc(":"")+"var("+("$"===o?"--"+n.prefix+"-"+(a.includes("$")?"":e in n.themeMap?n.themeMap[e]+"-":"")+a.replace(/\$/g,"-"):o+a)+")"+(r||"--"==o?"*"+(r||"")+(i||"1")+")":""))))(c,String(s),e);return s!=b||p!=f?{[f]:b}:null}))}},{ownKeys:y}=Reflect,I=class extends Set{toString(){return c(this).join("")}get hasChanged(){const{size:e}=this;return()=>e<this.size}},x=I;I.prototype[e]=I.prototype.toString;var w="colors",z="sizes",W="space",E={gap:W,gridGap:W,columnGap:W,gridColumnGap:W,rowGap:W,gridRowGap:W,inset:W,insetBlock:W,insetBlockEnd:W,insetBlockStart:W,insetInline:W,insetInlineEnd:W,insetInlineStart:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,marginBlock:W,marginBlockEnd:W,marginBlockStart:W,marginInline:W,marginInlineEnd:W,marginInlineStart:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,paddingBlock:W,paddingBlockEnd:W,paddingBlockStart:W,paddingInline:W,paddingInlineEnd:W,paddingInlineStart:W,top:W,right:W,bottom:W,left:W,scrollMargin:W,scrollMarginTop:W,scrollMarginRight:W,scrollMarginBottom:W,scrollMarginLeft:W,scrollMarginX:W,scrollMarginY:W,scrollMarginBlock:W,scrollMarginBlockEnd:W,scrollMarginBlockStart:W,scrollMarginInline:W,scrollMarginInlineEnd:W,scrollMarginInlineStart:W,scrollPadding:W,scrollPaddingTop:W,scrollPaddingRight:W,scrollPaddingBottom:W,scrollPaddingLeft:W,scrollPaddingX:W,scrollPaddingY:W,scrollPaddingBlock:W,scrollPaddingBlockEnd:W,scrollPaddingBlockStart:W,scrollPaddingInline:W,scrollPaddingInlineEnd:W,scrollPaddingInlineStart:W,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:z,minBlockSize:z,maxBlockSize:z,inlineSize:z,minInlineSize:z,maxInlineSize:z,width:z,minWidth:z,maxWidth:z,height:z,minHeight:z,maxHeight:z,flexBasis:z,gridTemplateColumns:z,gridTemplateRows:z,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"},R=(e,t)=>{for(var n=JSON.stringify(t),r=n.length,i=9;r;)i=Math.imul(i^n.charCodeAt(--r),9**9);return e+(i^i>>>9).toString(36).slice(-5)},M=e=>e?"-"+e:"",C=class{constructor(e,t,n="",r=""){this.value=e,this.token=t,this.scale=n,this.prefix=r}get computedValue(){return"var("+this.variable+")"}get variable(){return"-"+M(this.prefix)+M(this.scale)+"-"+this.token}toString(){return this.computedValue}},P=class extends Array{toString(){return this.join("")}get hasChanged(){const e=String(this);return()=>e!==String(this)}},T=P;P.prototype[e]=P.prototype.toString;var j=e=>{let t,r,i,o,a,l=!1;const s="append"===e.insertionMethod?"append":"prepend";return e=>{"object"==typeof document&&(t||(t=document.head||document.documentElement),r||(r=document.getElementById("stitches")||n(document.createElement("style"),{id:"stitches",textContent:e})),i||(i=r.firstChild||new Text,l=!i.data),o||(o=r.insertBefore(new Text,i)),r.isConnected||t[s](r),o.data=e,!l&&e&&(clearTimeout(a),a=setTimeout((()=>{i.remove(),l=!0}),250)))}},v=e=>{e="object"==typeof e&&e||{};const i={};i.media=n({initial:"all"},e.media),i.theme="object"==typeof e.theme&&e.theme||{},i.themeMap="object"==typeof e.themeMap&&e.themeMap||E,i.utils="object"==typeof e.utils&&e.utils||{};const o=new Set(e.passthru?[...e.passthru,"as","className"]:["as","className"]),l=i.prefix=e.prefix||"sx";i.insertionMethod=e.insertionMethod||"prepend";const s=("function"==typeof i.insertionMethod?i.insertionMethod:j)(i),d="03kze",g=B(i),p=new x,m=new x,h=new x,u=new x,f=new x([p,m,h,u]);let b="";const S=()=>{const e=c(f).join("");b!==e&&s(b=e)},k=(e,t)=>{t="object"==typeof e&&e||Object(t);const n="root"!==(e="string"==typeof e?e:""),i=(n?".":":root,.")+(e=n&&e||R(l,t)),o=a(r(null),"className",{className:e,selector:i}),s={},c=s[i]={};for(const e in t){o[e]=r(null);for(const n in t[e]){let r=String(t[e][n]);r.includes("$")&&(r=r.replace(/\$([$\w-]+)/g,((t,n)=>n.includes("$")?t:"$"+e+t)));const i=o[e][n]=new C(r,n,e,l);c[i.variable]=i.value}}const p=e===l+d?"":g(s);return a(o,"className",{get className(){const{hasChanged:t}=m;return m.add(p),t()&&S(),e},selector:i})},I=(e,t="")=>{const n=new x,i=new x;for(const t in e)if(e[t]!==Object(e[t])||y(e[t]).length){const r=g({[t]:e[t]});("@import"===t?n:i).add(r)}const o=a(r(null),"name",{name:t}),l=a((()=>{let e=p.hasChanged,t=h.hasChanged;return n.forEach((e=>{p.add(e)})),i.forEach((e=>{h.add(e)})),(e()||t())&&S(),o}),"name",{get name(){return String(l())}});return l},w=e=>{const t=new x,n=new T,i=new x,o=new x([t,n,i]);let{variants:a,compoundVariants:s,defaultVariants:c,...p}=e;c=Object(c);const m=R(l,e),h="."+m,f=m===l+d?"":g({[h]:p});u.add(o);const b=r(null),S=[],k=[];for(const e in a)for(const t in a[e]){const n=a[e][t];k.push({[e]:t,css:n})}k.push(...s||[]);for(const e in k){const{css:t,...i}=k[e],o=y(i),a=o.length;for(const e of o)b[e]=b[e]||r(null),b[e][i[e]]=!0;const l=(e,r)=>{e={...e};for(const t in r)void 0!==e[t]||Object(b[t])[e[t]]||(e[t]=r[t]);const l=new Set;if(o.length&&o.every((t=>{const n=e[t],r=String(i[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 l.add(e),!0}))){let e=Object(t);for(const t of l)e={[t]:e};const r=m+R("",e)+"--"+(1===a?o[0]+"-"+i[o[0]]:"c"+a),s=g({["."+r]:e});return(n[a-1]||(n[a-1]=new x)).add(s),r}};S.push(l)}return{apply(e,r,i){const a=t.hasChanged,l=n.hasChanged;if(t.add(f),e){r.add(m);for(const t of S){const n=t(e,i);n&&r.add(n)}}if(a()||l())return u.add(o),!0},inline(e,t){const n=R("-",e),r=m==="-"+n?"":g({[h+n]:e});t.add(m+n);const{hasChanged:o}=i;return r&&i.add(r),o()},className:m,defaultVariants:c,selector:h,variantProps:b}},z=k("root",i.theme),W=a({css:(...e)=>{let i,l=[],s=r(null);for(const r of e)if(r===Object(r))if(t in r)for(const e of r[t])l.push(e),n(s,e.defaultVariants);else l.push(i=w(r)),n(s,i.defaultVariants);return i||l.push(i=w({})),a((e=>{const{css:n,...d}=Object(e),g=new Set;let p,m=!1;for(const e of l)m=e.apply(d,g,s)||m;n===Object(n)&&(p=i.inline(n,g)),(m||p)&&S();for(const e in i.variantProps)o.has(e)||delete d[e];void 0!==d.className&&String(d.className).split(/\s+/).forEach(g.add,g);const h=c(g);return d.className=h.join(" "),a(r(null),"className",{get[t](){return l},className:d.className,props:d,selector:i.selector})}),"className",{get[t](){return l},get className(){return i.apply()&&S(),i.className},selector:i.selector})},config:i,global:I,keyframes:e=>{const t=R(l,e);return I({["@keyframes "+t]:e},t)},prefix:l,reset:()=>(p.clear(),m.clear(),h.clear(),u.clear(),z.className,W),theme:n(k,z),get cssText(){return b},getCssString:()=>b},"cssText",{});return W},$=Symbol.for("react.element"),N=Symbol.for("react.forward_ref"),O=e=>{const r=v(e);return n(r,{styled:(...e)=>{const n=e.map((e=>Object(e).type?e.type:e)).find((e=>e))||"span",i=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,...o},...a}=i(e);return{constructor:void 0,$$typeof:$,props:o,ref:t,type:r,__v:0}},$$typeof:N,[t]:i[t],[Symbol.toPrimitive]:()=>i.selector,toString:()=>i.selector,get className(){return i.className},get selector(){return i.selector},type:n},Object(n))}})},L=()=>L.config||(L.config=O()),A=(...e)=>L().css(...e),D=(...e)=>L().global(...e),V=(...e)=>L().keyframes(...e),H=(...e)=>L().styled(...e);globalThis.stitches={createCss:O,css:A,default:O,defaultThemeMap:E,global:D,keyframes:V,styled:H}})()
(()=>{var{toPrimitive:e}=Symbol,t=Symbol.for("sxs.composers"),{assign:n,create:r,defineProperties:i,getOwnPropertyDescriptors:o}=Object,a=(t,r,a)=>n(i(t,o(a)),{[e]:()=>t[r],toString:()=>t[r]}),l=e=>e.includes("-")?e:e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),s=(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)),[]),{isArray:d}=Array,{from:c}=Array,{prototype:{toString:g}}=Object,p=/\s*,\s*(?![^()]*\))/,m=/([\d.]+)([^]*)/,h={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},u={animationDelay:1,animationDuration:1,backgroundSize:1,blockSize:1,border:1,borderBlock:1,borderBlockEnd:1,borderBlockEndWidth:1,borderBlockStart:1,borderBlockStartWidth:1,borderBlockWidth:1,borderBottom:1,borderBottomLeftRadius:1,borderBottomRightRadius:1,borderBottomWidth:1,borderEndEndRadius:1,borderEndStartRadius:1,borderInlineEnd:1,borderInlineEndWidth:1,borderInlineStart:1,borderInlineStartWidth:1,borderInlineWidth:1,borderLeft:1,borderLeftWidth:1,borderRadius:1,borderRight:1,borderRightWidth:1,borderSpacing:1,borderStartEndRadius:1,borderStartStartRadius:1,borderTop:1,borderTopLeftRadius:1,borderTopRightRadius:1,borderTopWidth:1,borderWidth:1,bottom:1,columnGap:1,columnRule:1,columnRuleWidth:1,columnWidth:1,containIntrinsicSize:1,flexBasis:1,fontSize:1,gap:1,gridAutoColumns:1,gridAutoRows:1,gridTemplateColumns:1,gridTemplateRows:1,height:1,inlineSize:1,inset:1,insetBlock:1,insetBlockEnd:1,insetBlockStart:1,insetInline:1,insetInlineEnd:1,insetInlineStart:1,left:1,letterSpacing:1,margin:1,marginBlock:1,marginBlockEnd:1,marginBlockStart:1,marginBottom:1,marginInline:1,marginInlineEnd:1,marginInlineStart:1,marginLeft:1,marginRight:1,marginTop:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,offsetDistance:1,offsetRotate:1,outline:1,outlineOffset:1,outlineWidth:1,overflowClipMargin:1,padding:1,paddingBlock:1,paddingBlockEnd:1,paddingBlockStart:1,paddingBottom:1,paddingInline:1,paddingInlineEnd:1,paddingInlineStart:1,paddingLeft:1,paddingRight:1,paddingTop:1,perspective:1,right:1,rowGap:1,scrollMargin:1,scrollMarginBlock:1,scrollMarginBlockEnd:1,scrollMarginBlockStart:1,scrollMarginBottom:1,scrollMarginInline:1,scrollMarginInlineEnd:1,scrollMarginInlineStart:1,scrollMarginLeft:1,scrollMarginRight:1,scrollMarginTop:1,scrollPadding:1,scrollPaddingBlock:1,scrollPaddingBlockEnd:1,scrollPaddingBlockStart:1,scrollPaddingBottom:1,scrollPaddingInline:1,scrollPaddingInlineEnd:1,scrollPaddingInlineStart:1,scrollPaddingLeft:1,scrollPaddingRight:1,scrollPaddingTop:1,shapeMargin:1,textDecoration:1,textDecorationThickness:1,textIndent:1,textUnderlineOffset:1,top:1,transitionDelay:1,transitionDuration:1,verticalAlign:1,width:1,wordSpacing:1},f=/\s+(?![^()]*\))/,b=e=>t=>e(..."string"==typeof t?String(t).split(f):[t]),S=JSON.stringify,k={appearance:e=>({WebkitAppearance:e,appearance:e}),backfaceVisibility:e=>({WebkitBackfaceVisibility:e,backfaceVisibility:e}),backdropFilter:e=>({WebkitBackdropFilter:e,backdropFilter:e}),backgroundClip:e=>({WebkitBackgroundClip:e,backgroundClip:e}),boxDecorationBreak:e=>({WebkitBoxDecorationBreak:e,boxDecorationBreak:e}),clipPath:e=>({WebkitClipPath:e,clipPath:e}),content:e=>({content:e.includes('"')||e.includes("'")||/^([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:b(((e,t)=>({marginBlockStart:e,marginBlockEnd:t||e}))),marginInline:b(((e,t)=>({marginInlineStart:e,marginInlineEnd:t||e}))),maxSize:b(((e,t)=>({maxBlockSize:e,maxInlineSize:t||e}))),minSize:b(((e,t)=>({minBlockSize:e,minInlineSize:t||e}))),paddingBlock:b(((e,t)=>({paddingBlockStart:e,paddingBlockEnd:t||e}))),paddingInline:b(((e,t)=>({paddingInlineStart:e,paddingInlineEnd:t||e})))},B=e=>{let t,n,r,i;const o={};return a=>{const c=S(a);return c in o?o[c]:o[c]=((e,t)=>{const n=new WeakSet,r=(e,i,o,a,c)=>{let m="";e:for(const h in e){const u=64===h.charCodeAt(0);for(const f of u&&d(e[h])?e[h]:[e[h]]){if(t&&(h!==a||f!==c)){const n=t(h,f,e);if(null!==n){m+="object"==typeof n&&n?r(n,i,o,h,f):null==n?"":n;continue e}}if("object"==typeof f&&f&&f.toString===g){n.has(i)&&(n.delete(i),m+="}");const e=Object(h),t=u?i:i.length?s(i,h.split(p)):h.split(p);m+=r(f,t,u?o.concat(e):o),n.has(e)&&(n.delete(e),m+="}"),n.has(t)&&(n.delete(t),m+="}")}else{for(let e=0;e<o.length;++e)n.has(o[e])||(n.add(o[e]),m+=o[e]+"{");i.length&&!n.has(i)&&(n.add(i),m+=i+"{"),m+=(u?h+" ":l(h)+":")+String(f)+";"}}}return m};return r(e,[],[])})(a,((o,a)=>{const s=o.charCodeAt(0),d=64===s?o:/[A-Z]/.test(c=o)?c:c.replace(/-[^]/g,(e=>e[1].toUpperCase()));var c;const g=64===s?o:l(o);if("function"==typeof e.utils[o]){if(e.utils[o]!=r||a!=i)return r=e.utils[o],i=a,r(e)(i)}else if("function"==typeof k[d]&&(k[d]!=r||a!=i))return r=k[d],i=a,r(i);if(i=a,t!=d&&n!=a&&g in h){t=d,n=a;const e=((e,t)=>t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,((t,n,r,i)=>n+("stretch"===r?`-moz-available${i};${e}:${n}-webkit-fill-available`:`-moz-fit-content${i};${e}:${n}fit-content`)+i)))(g,String(n));if(e!=a)return{[o]:e}}let p=64===s?(o.slice(1)in e.media?"@media "+e.media[o.slice(1)]:o).replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,((e,t,n,r,i,o)=>{const a=m.test(t),l=.0625*(a?-1:1),[s,d]=a?[r,t]:[t,r];return"("+("="===n[0]?"":">"===n[0]===a?"max-":"min-")+s+":"+("="!==n[0]&&1===n.length?d.replace(m,((e,t,r)=>Number(t)+l*(">"===n?1:-1)+r)):d)+(i?") and ("+(">"===i[0]?"min-":"max-")+s+":"+(1===i.length?o.replace(m,((e,t,n)=>Number(t)+l*(">"===i?-1:1)+n)):o):"")+")"})):36===s?("sx"===e.prefix?"-":"--"+e.prefix)+o.replace(/\$/g,"-"):o;const f="object"==typeof a&&a?a:"number"==typeof a&&a&&d in u?String(a)+"px":((e,t,n)=>t.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,((t,r,i,o,a)=>"$"==o==!!i?t:(r||"--"==o?"calc(":"")+"var("+("$"===o?("sx"===n.prefix?"-":"--"+n.prefix)+"-"+(a.includes("$")?"":e in n.themeMap?n.themeMap[e]+"-":"")+a.replace(/\$/g,"-"):o+a)+")"+(r||"--"==o?"*"+(r||"")+(i||"1")+")":""))))(d,String(a),e);return a!=f||g!=p?{[p]:f}:null}))}},{ownKeys:y}=Reflect,I=class extends Set{toString(){return c(this).join("")}get hasChanged(){const{size:e}=this;return()=>e<this.size}},x=I;I.prototype[e]=I.prototype.toString;var w="colors",z="sizes",W="space",E={gap:W,gridGap:W,columnGap:W,gridColumnGap:W,rowGap:W,gridRowGap:W,inset:W,insetBlock:W,insetBlockEnd:W,insetBlockStart:W,insetInline:W,insetInlineEnd:W,insetInlineStart:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,marginBlock:W,marginBlockEnd:W,marginBlockStart:W,marginInline:W,marginInlineEnd:W,marginInlineStart:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,paddingBlock:W,paddingBlockEnd:W,paddingBlockStart:W,paddingInline:W,paddingInlineEnd:W,paddingInlineStart:W,top:W,right:W,bottom:W,left:W,scrollMargin:W,scrollMarginTop:W,scrollMarginRight:W,scrollMarginBottom:W,scrollMarginLeft:W,scrollMarginX:W,scrollMarginY:W,scrollMarginBlock:W,scrollMarginBlockEnd:W,scrollMarginBlockStart:W,scrollMarginInline:W,scrollMarginInlineEnd:W,scrollMarginInlineStart:W,scrollPadding:W,scrollPaddingTop:W,scrollPaddingRight:W,scrollPaddingBottom:W,scrollPaddingLeft:W,scrollPaddingX:W,scrollPaddingY:W,scrollPaddingBlock:W,scrollPaddingBlockEnd:W,scrollPaddingBlockStart:W,scrollPaddingInline:W,scrollPaddingInlineEnd:W,scrollPaddingInlineStart:W,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:z,minBlockSize:z,maxBlockSize:z,inlineSize:z,minInlineSize:z,maxInlineSize:z,width:z,minWidth:z,maxWidth:z,height:z,minHeight:z,maxHeight:z,flexBasis:z,gridTemplateColumns:z,gridTemplateRows:z,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"},R=(e,t)=>{for(var n=JSON.stringify(t),r=n.length,i=9;r;)i=Math.imul(i^n.charCodeAt(--r),9**9);return e+(i^i>>>9).toString(36).slice(-5)},M=e=>e?"-"+e:"",C=class{constructor(e,t,n="",r=""){this.value=e,this.token=t,this.scale=n,this.prefix=r}get computedValue(){return"var("+this.variable+")"}get variable(){return"-"+M(this.prefix)+M(this.scale)+"-"+this.token}toString(){return this.computedValue}},P=class extends Array{toString(){return this.join("")}get hasChanged(){const e=String(this);return()=>e!==String(this)}},T=P;P.prototype[e]=P.prototype.toString;var j=e=>{let t,r,i,o,a,l=!1;const s="append"===e.insertionMethod?"append":"prepend";return e=>{"object"==typeof document&&(t||(t=document.head||document.documentElement),r||(r=document.getElementById("stitches")||n(document.createElement("style"),{id:"stitches",textContent:e})),i||(i=r.firstChild||new Text,l=!i.data),o||(o=r.insertBefore(new Text,i)),r.isConnected||t[s](r),o.data=e,!l&&e&&(clearTimeout(a),a=setTimeout((()=>{i.remove(),l=!0}),250)))}},v=e=>{e="object"==typeof e&&e||{};const i={};i.media=n({initial:"all"},e.media),i.theme="object"==typeof e.theme&&e.theme||{},i.themeMap="object"==typeof e.themeMap&&e.themeMap||E,i.utils="object"==typeof e.utils&&e.utils||{};const o=new Set(e.passthru?[...e.passthru,"as","className"]:["as","className"]),l=i.prefix=e.prefix||"sx";i.insertionMethod=e.insertionMethod||"prepend";const s=("function"==typeof i.insertionMethod?i.insertionMethod:j)(i),d="03kze",g=B(i),p=new x,m=new x,h=new x,u=new x,f=new x([p,m,h,u]);let b="";const S=()=>{const e=c(f).join("");b!==e&&s(b=e)},k=(e,t)=>{t="object"==typeof e&&e||Object(t);const n="root"!==(e="string"==typeof e?e:""),i=(n?".":":root,.")+(e=n&&e||R(l,t)),o=a(r(null),"className",{className:e,selector:i}),s={},c=s[i]={};for(const e in t){o[e]=r(null);for(const n in t[e]){let r=String(t[e][n]);r.includes("$")&&(r=r.replace(/\$([$\w-]+)/g,((t,n)=>n.includes("$")?t:"$"+e+t)));const i=o[e][n]=new C(r,n,e,"sx"===l?"":l);c[i.variable]=i.value}}const p=e===l+d?"":g(s);return a(o,"className",{get className(){const{hasChanged:t}=m;return m.add(p),t()&&S(),e},selector:i})},I=(e,t="")=>{const n=new x,i=new x;for(const t in e)if(e[t]!==Object(e[t])||y(e[t]).length){const r=g({[t]:e[t]});("@import"===t?n:i).add(r)}const o=a(r(null),"name",{name:t}),l=a((()=>{let e=p.hasChanged,t=h.hasChanged;return n.forEach((e=>{p.add(e)})),i.forEach((e=>{h.add(e)})),(e()||t())&&S(),o}),"name",{get name(){return String(l())}});return l},w=e=>{const t=new x,n=new T,i=new x,o=new x([t,n,i]);let{variants:a,compoundVariants:s,defaultVariants:c,...p}=e;c=Object(c);const m=R(l,e),h="."+m,f=m===l+d?"":g({[h]:p});u.add(o);const b=r(null),S=[],k=[];for(const e in a)for(const t in a[e]){const n=a[e][t];k.push({[e]:t,css:n})}k.push(...s||[]);for(const e in k){const{css:t,...i}=k[e],o=y(i),a=o.length;for(const e of o)b[e]=b[e]||r(null),b[e][i[e]]=!0;const l=(e,r)=>{e={...e};for(const t in r)void 0!==e[t]||Object(b[t])[e[t]]||(e[t]=r[t]);const l=new Set;if(o.length&&o.every((t=>{const n=e[t],r=String(i[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 l.add(e),!0}))){let e=Object(t);for(const t of l)e={[t]:e};const r=m+R("",e)+"--"+(1===a?o[0]+"-"+i[o[0]]:"c"+a),s=g({["."+r]:e});return(n[a-1]||(n[a-1]=new x)).add(s),r}};S.push(l)}return{apply(e,r,i){const a=t.hasChanged,l=n.hasChanged;if(t.add(f),e){r.add(m);for(const t of S){const n=t(e,i);n&&r.add(n)}}if(a()||l())return u.add(o),!0},inline(e,t){const n=R("-",e),r=m==="-"+n?"":g({[h+n]:e});t.add(m+n);const{hasChanged:o}=i;return r&&i.add(r),o()},className:m,defaultVariants:c,selector:h,variantProps:b}},z=k("root",i.theme),W=a({css:(...e)=>{let i,l=[],s=r(null);for(const r of e)if(r===Object(r))if(t in r)for(const e of r[t])l.push(e),n(s,e.defaultVariants);else l.push(i=w(r)),n(s,i.defaultVariants);return i||l.push(i=w({})),a((e=>{const{css:n,...d}=Object(e),g=new Set;let p,m=!1;for(const e of l)m=e.apply(d,g,s)||m;n===Object(n)&&(p=i.inline(n,g)),(m||p)&&S();for(const e in i.variantProps)o.has(e)||delete d[e];void 0!==d.className&&String(d.className).split(/\s+/).forEach(g.add,g);const h=c(g);return d.className=h.join(" "),a(r(null),"className",{get[t](){return l},className:d.className,props:d,selector:i.selector})}),"className",{get[t](){return l},get className(){return i.apply()&&S(),i.className},selector:i.selector})},config:i,global:I,keyframes:e=>{const t=R(l,e);return I({["@keyframes "+t]:e},t)},prefix:l,reset:()=>(p.clear(),m.clear(),h.clear(),u.clear(),z.className,W),theme:n(k,z),get cssText(){return b},getCssString:()=>b},"cssText",{});return W},$=Symbol.for("react.element"),N=Symbol.for("react.forward_ref"),O=e=>{const r=v(e);return n(r,{styled:(...e)=>{const n=e.map((e=>Object(e).type?e.type:e)).find((e=>e))||"span",i=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,...o},...a}=i(e);return{constructor:void 0,$$typeof:$,props:o,ref:t,type:r,__v:0}},$$typeof:N,[t]:i[t],[Symbol.toPrimitive]:()=>i.selector,toString:()=>i.selector,get className(){return i.className},get selector(){return i.selector},type:n},Object(n))}})},L=()=>L.config||(L.config=O()),A=(...e)=>L().css(...e),D=(...e)=>L().global(...e),V=(...e)=>L().keyframes(...e),H=(...e)=>L().styled(...e);globalThis.stitches={createCss:O,css:A,default:O,defaultThemeMap:E,global:D,keyframes:V,styled:H}})()
//# sourceMappingUrl=index.map
{
"name": "@stitches/react",
"version": "0.1.8",
"version": "0.1.9",
"description": "The modern CSS-in-JS library",

@@ -32,3 +32,3 @@ "type": "module",

"dependencies": {
"@stitches/core": "^0.1.8"
"@stitches/core": "^0.1.9"
},

@@ -86,3 +86,3 @@ "devDependencies": {

],
"gitHead": "aba0fccf739946e8773e4a8f30d3291aa3fccc5f"
"gitHead": "0a355a07ffbdf966f22c1339a2ec1a13ccc63132"
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc