@stitches/react
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -1,2 +0,2 @@ | ||
(()=>{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.]+)([^]*)/,f={appearance:e=>({WebkitAppearance:e,appearance:e}),backfaceVisibility:e=>({WebkitBackfaceVisibility:e,backfaceVisibility:e}),backgroundClip:e=>({WebkitBackgroundClip:e,backgroundClip:e}),boxDecorationBreak:e=>({WebkitBoxDecorationBreak:e,boxDecorationBreak: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})))},u=e=>{const{media:t,themeMap:n,utils:r}=e;let o,i,a,p;return m=>((e,t)=>{const n=new WeakSet,r=(e,o,i,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!==a||h!==d)){const n=t(p,h,e);if(null!==n){g+=n===Object(n)?r(n,o,i,p,h):null==n?"":n;continue e}}const m=64===p.charCodeAt(0);if(h!==Object(h)||"length"in h){for(let e=0;e<i.length;++e)n.has(i[e])||(n.add(i[e]),g+=i[e]+"{");o.length&&!n.has(o)&&(n.add(o),g+=o+"{");for(const e of/^@import/i.test(p)?[].concat(h):[h])g+=(m?p+" ":s(p)+":")+String(e)+";"}else{n.has(o)&&(n.delete(o),g+="}");const e=Object(p),t=m?o:o.length?l(o,p.split(c)):p.split(c);g+=r(h,t,m?i.concat(e):i),n.has(e)&&(n.delete(e),g+="}"),n.has(t)&&(n.delete(t),g+="}")}}}return g};return r(e,[],[])})(m,((l,c)=>{const m=l.charCodeAt(0),u=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 f[u]&&(f[u]!=a||c!=p))return a=f[u],p=c,a(p);if(p=c,o!=u&&i!=c&&/^((min|max)?((Block|Inline)Size|Height|Width)|height|width)$/.test(u)){o=u,i=c;const e=String(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("$")?"":u in n?n[u]+"-":"")+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}},v=class extends Array{toString(){return this.join("")}get hasChanged(){const e=String(this);return()=>e!==String(this)}},O=v;v.prototype[e]=v.prototype.toString;var W=e=>{let t,r,o,i,a,s=!1;const l="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})),o||(o=r.firstChild||new Text,s=!o.data),i||(i=r.insertBefore(new Text,o)),r.isConnected||t[l](r),i.data=e,!s&&e&&(clearTimeout(a),a=setTimeout((()=>{o.remove(),s=!0}),250)))}},E=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:W)(e),p="03kze",m={theme:i,media:o,prefix:d,themeMap:s,utils:l},h=u(m),f=new B,S=new B,y=new B,w=new B,C=new B([f,S,y,w]);let I="";const v=()=>{const e=b(C).join("");I!==e&&g(I=e)},E=(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()&&v(),e},selector:o})},M=(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=f.hasChanged,t=y.hasChanged;return n.forEach((e=>{f.add(e)})),o.forEach((e=>{y.add(e)})),(e()||t())&&v(),i}),"name",{get name(){return String(s())}});return s},P=e=>{const t=new B,n=new O,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,f=g===d+p?"":h({[m]:c});w.add(i);const u=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)u[e]=u[e]||r(null),u[e][o[e]]=!0;const s=(e,r)=>{e={...e};for(const t in r)void 0!==e[t]||Object(u[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(f),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:u}},N=E(":root",i),T=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=P(r)),n(s,o.defaultVariants);return o=o||P({}),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)&&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(" "),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()&&v(),o.className},selector:o.selector})},config:m,global:M,keyframes:e=>{const t=j(d,e);return M({["@keyframes "+t]:e},t)},prefix:d,reset:()=>(f.clear(),S.clear(),y.clear(),w.clear(),N.className,T),theme:n(E,N),get cssText(){return I},getCssString:()=>I},"cssText",{});return T},M=Symbol.for("react.element"),P=Symbol.for("react.forward_ref"),N=e=>{const r=E(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},...a}=o(e);return{constructor:void 0,$$typeof:M,props:i,ref:t,type:r,__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:n},Object(n))}})},T=()=>T.config||(T.config=N()),R=(...e)=>T().css(...e),A=(...e)=>T().global(...e),L=(...e)=>T().keyframes(...e),V=(...e)=>T().styled(...e);globalThis.stitches={createCss:N,css:R,default:N,defaultThemeMap:x,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)),[]),{isArray:c}=Array,{from:d}=Array,{prototype:{toString:g}}=Object,p=/\s*,\s*(?![^()]*\))/,m=/(-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)$/,h=/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,f=/\s+(?![^()]*\))/,u=e=>t=>e(..."string"==typeof t?String(t).split(f):[t]),b=/([\d.]+)([^]*)/,S={appearance:e=>({WebkitAppearance:e,appearance:e}),backfaceVisibility:e=>({WebkitBackfaceVisibility:e,backfaceVisibility:e}),backgroundClip:e=>({WebkitBackgroundClip:e,backgroundClip:e}),boxDecorationBreak:e=>({WebkitBoxDecorationBreak:e,boxDecorationBreak: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:u(((e,t)=>({marginBlockStart:e,marginBlockEnd:t||e}))),marginInline:u(((e,t)=>({marginInlineStart:e,marginInlineEnd:t||e}))),maxSize:u(((e,t)=>({maxBlockSize:e,maxInlineSize:t||e}))),minSize:u(((e,t)=>({minBlockSize:e,minInlineSize:t||e}))),paddingBlock:u(((e,t)=>({paddingBlockStart:e,paddingBlockEnd:t||e}))),paddingInline:u(((e,t)=>({paddingInlineStart:e,paddingInlineEnd:t||e})))},y=e=>{const{media:t,prefix:n,themeMap:r,utils:o}=e;let i,a,d,f;return u=>((e,t)=>{const n=new WeakSet,r=(e,o,i,a,d)=>{let m="";e:for(const h in e){const f=64===h.charCodeAt(0);for(const u of f&&c(e[h])?e[h]:[e[h]]){if(t&&(h!==a||u!==d)){const n=t(h,u,e);if(null!==n){m+="object"==typeof n&&n?r(n,o,i,h,u):null==n?"":n;continue e}}if("object"==typeof u&&u&&u.toString===g){n.has(o)&&(n.delete(o),m+="}");const e=Object(h),t=f?o:o.length?l(o,h.split(p)):h.split(p);m+=r(u,t,f?i.concat(e):i),n.has(e)&&(n.delete(e),m+="}"),n.has(t)&&(n.delete(t),m+="}")}else{for(let e=0;e<i.length;++e)n.has(i[e])||(n.add(i[e]),m+=i[e]+"{");o.length&&!n.has(o)&&(n.add(o),m+=o+"{"),m+=(f?h+" ":s(h)+":")+String(u)+";"}}}return m};return r(e,[],[])})(u,((l,c)=>{const g=l.charCodeAt(0),p=64===g?l:/[A-Z]/.test(u=l)?u:u.replace(/-[^]/g,(e=>e[1].toUpperCase()));var u;const y=64===g?l:s(l);if("function"==typeof o[l]){if(o[l]!=d||c!=f)return d=o[l],f=c,d(e)(f)}else if("function"==typeof S[p]&&(S[p]!=d||c!=f))return d=S[p],f=c,d(f);if(f=c,i!=p&&a!=c&&/^((min|max)?((Block|Inline)Size|Height|Width)|height|width)$/.test(p)){i=p,a=c;const e=String(a).replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,((e,t,n,r)=>t+("stretch"===n?`-moz-available${r};${y}:${t}-webkit-fill-available`:`-moz-fit-content${r};${y}:${t}fit-content`)+r));if(e!=c)return{[l]:e}}let k=64===g?(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=b.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(b,((e,t,r)=>Number(t)+s*(">"===n?1:-1)+r)):c)+(o?") and ("+(">"===o[0]?"min-":"max-")+l+":"+(1===o.length?i.replace(b,((e,t,n)=>Number(t)+s*(">"===o?-1:1)+n)):i):"")+")"})):36===g?"--"+n+l.replace(/\$/g,"-"):l;const B="object"==typeof c&&c?c:c&&"number"==typeof c&&m.test(y)?String(c)+"px":String(c).replace(h,((e,t,o,i,a)=>"$"==i==!!o?e:(t||"--"==i?"calc(":"")+"var("+("$"===i?"--"+n+"-"+(a.includes("$")?"":p in r?r[p]+"-":"")+a.replace(/\$/g,"-"):i+a)+")"+(t||"--"==i?"*"+(t||"")+(o||"1")+")":"")));return c!=B||y!=k?{[k]:B}:null}))},{ownKeys:k}=Reflect,B=class extends Set{toString(){return d(this).join("")}get hasChanged(){const{size:e}=this;return()=>e<this.size}},w=B;B.prototype[e]=B.prototype.toString;var x="colors",I="sizes",C="space",$={gap:C,gridGap:C,columnGap:C,gridColumnGap:C,rowGap:C,gridRowGap:C,inset:C,insetBlock:C,insetBlockEnd:C,insetBlockStart:C,insetInline:C,insetInlineEnd:C,insetInlineStart:C,margin:C,marginTop:C,marginRight:C,marginBottom:C,marginLeft:C,marginBlock:C,marginBlockEnd:C,marginBlockStart:C,marginInline:C,marginInlineEnd:C,marginInlineStart:C,padding:C,paddingTop:C,paddingRight:C,paddingBottom:C,paddingLeft:C,paddingBlock:C,paddingBlockEnd:C,paddingBlockStart:C,paddingInline:C,paddingInlineEnd:C,paddingInlineStart:C,top:C,right:C,bottom:C,left:C,scrollMargin:C,scrollMarginTop:C,scrollMarginRight:C,scrollMarginBottom:C,scrollMarginLeft:C,scrollMarginX:C,scrollMarginY:C,scrollMarginBlock:C,scrollMarginBlockEnd:C,scrollMarginBlockStart:C,scrollMarginInline:C,scrollMarginInlineEnd:C,scrollMarginInlineStart:C,scrollPadding:C,scrollPaddingTop:C,scrollPaddingRight:C,scrollPaddingBottom:C,scrollPaddingLeft:C,scrollPaddingX:C,scrollPaddingY:C,scrollPaddingBlock:C,scrollPaddingBlockEnd:C,scrollPaddingBlockStart:C,scrollPaddingInline:C,scrollPaddingInlineEnd:C,scrollPaddingInlineStart:C,fontSize:"fontSizes",background:x,backgroundColor:x,backgroundImage:x,border:x,borderBlock:x,borderBlockEnd:x,borderBlockStart:x,borderBottom:x,borderBottomColor:x,borderColor:x,borderInline:x,borderInlineEnd:x,borderInlineStart:x,borderLeft:x,borderLeftColor:x,borderRight:x,borderRightColor:x,borderTop:x,borderTopColor:x,caretColor:x,color:x,columnRuleColor:x,fill:x,outline:x,outlineColor:x,stroke:x,textDecorationColor:x,fontFamily:"fonts",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",blockSize:I,minBlockSize:I,maxBlockSize:I,inlineSize:I,minInlineSize:I,maxInlineSize:I,width:I,minWidth:I,maxWidth:I,height:I,minHeight:I,maxHeight:I,flexBasis:I,gridTemplateColumns:I,gridTemplateRows:I,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,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=e=>e?"-"+e:"",v=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"-"+z(this.prefix)+z(this.scale)+"-"+this.token}toString(){return this.computedValue}},M=class extends Array{toString(){return this.join("")}get hasChanged(){const e=String(this);return()=>e!==String(this)}},W=M;M.prototype[e]=M.prototype.toString;var E=e=>{let t,r,o,i,a,s=!1;const l="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})),o||(o=r.firstChild||new Text,s=!o.data),i||(i=r.insertBefore(new Text,o)),r.isConnected||t[l](r),i.data=e,!s&&e&&(clearTimeout(a),a=setTimeout((()=>{o.remove(),s=!0}),250)))}},P=e=>{const o={};e=o.config="object"==typeof e&&e||{},o.media=n({initial:"all"},e.media),o.theme="object"==typeof e.theme&&e.theme||{},o.themeMap="object"==typeof e.themeMap&&e.themeMap||$,o.utils="object"==typeof e.utils&&e.utils||{};const i=new Set([].concat(e.passthru||["as","className"])),s=o.prefix=e.prefix||"sx",l=("function"==typeof e.insertionMethod?e.insertionMethod:E)(o),c="03kze",g=y(o),p=new w,m=new w,h=new w,f=new w,u=new w([p,m,h,f]);let b="";const S=()=>{const e=d(u).join("");b!==e&&l(b=e)},B=(e,t)=>{t="object"==typeof e&&e||Object(t);const n=(e=(e="string"==typeof e?e:"")||j(s,t)).replace(/^\w/,".$&"),o=a(r(null),"className",{className:e,selector:n}),i={},l=i[n]={};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 v(r,n,e,s);l[i.variable]=i.value}}const d=e===s+c?"":g(i);return a(o,"className",{get className(){const{hasChanged:t}=m;return m.add(d),t()&&S(),e},selector:n})},x=(e,t="")=>{const n=new w,o=new w;for(const t in e)if(e[t]!==Object(e[t])||k(e[t]).length){const r=g({[t]:e[t]});("@import"===t?n:o).add(r)}const i=a(r(null),"name",{name:t}),s=a((()=>{let e=p.hasChanged,t=h.hasChanged;return n.forEach((e=>{p.add(e)})),o.forEach((e=>{h.add(e)})),(e()||t())&&S(),i}),"name",{get name(){return String(s())}});return s},I=e=>{const t=new w,n=new W,o=new w,i=new w([t,n,o]);let{variants:a,compoundVariants:l,defaultVariants:d,...p}=e;d=Object(d);const m=j(s,e),h="."+m,u=m===s+c?"":g({[h]:p});f.add(i);const b=r(null),S=[],y=[];for(const e in a)for(const t in a[e]){const n=a[e][t];y.push({[e]:t,css:n})}y.push(...l||[]);for(const e in y){const{css:t,...o}=y[e],i=k(o),a=i.length;for(const e of i)b[e]=b[e]||r(null),b[e][o[e]]=!0;const s=(e,r)=>{e={...e};for(const t in r)void 0!==e[t]||Object(b[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=m+j("",e)+"--"+(1===a?i[0]+"-"+o[i[0]]:"c"+a),l=g({["."+r]:e});return(n[a-1]||(n[a-1]=new w)).add(l),r}};S.push(s)}return{apply(e,r,o){const a=t.hasChanged,s=n.hasChanged;if(t.add(u),e){r.add(m);for(const t of S){const n=t(e,o);n&&r.add(n)}}if(a()||s())return f.add(i),!0},inline(e,t){const n=j("-",e),r=m==="-"+n?"":g({[h+n]:e});t.add(m+n);const{hasChanged:i}=o;return r&&o.add(r),i()},className:m,defaultVariants:d,selector:h,variantProps:b}},C=B(":root",o.theme),z=a({css:(...e)=>{let o,s=[],l=r(null);for(const r of e)if(r===Object(r))if(t in r)for(const e of r[t])s.push(e),n(l,e.defaultVariants);else s.push(o=I(r)),n(l,o.defaultVariants);return o||s.push(o=I({})),a((e=>{const{css:n,...c}=Object(e),g=new Set;let p,m=!1;for(const e of s)m=e.apply(c,g,l)||m;n===Object(n)&&(p=o.inline(n,g)),(m||p)&&S();for(const e in o.variantProps)i.has(e)||delete c[e];"string"==typeof c.className&&c.className.split(/\s+/).forEach(g.add,g);const h=d(g);return c.className=h.join(" "),a(r(null),"className",{get[t](){return s},className:c.className,props:c,selector:o.selector})}),"className",{get[t](){return s},get className(){return o.apply()&&S(),o.className},selector:o.selector})},config:o,global:x,keyframes:e=>{const t=j(s,e);return x({["@keyframes "+t]:e},t)},prefix:s,reset:()=>(p.clear(),m.clear(),h.clear(),f.clear(),C.className,z),theme:n(B,C),get cssText(){return b},getCssString:()=>b},"cssText",{});return z},N=Symbol.for("react.element"),T=Symbol.for("react.forward_ref"),O=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},...a}=o(e);return{constructor:void 0,$$typeof:N,props:i,ref:t,type:r,__v:0}},$$typeof:T,[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=O()),A=(...e)=>R().css(...e),L=(...e)=>R().global(...e),V=(...e)=>R().keyframes(...e),H=(...e)=>R().styled(...e);globalThis.stitches={createCss:O,css:A,default:O,defaultThemeMap:$,global:L,keyframes:V,styled:H}})() | ||
//# sourceMappingUrl=index.map |
{ | ||
"name": "@stitches/react", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "The modern CSS-in-JS library", | ||
@@ -32,3 +32,3 @@ "type": "module", | ||
"dependencies": { | ||
"@stitches/core": "^0.1.4" | ||
"@stitches/core": "^0.1.5" | ||
}, | ||
@@ -86,3 +86,3 @@ "devDependencies": { | ||
], | ||
"gitHead": "cd7f6e8c5783d0122df87298acbd38043ed2c625" | ||
"gitHead": "969def5aea830339d9d019985bfaa6f997a6e596" | ||
} |
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
106481
402
Updated@stitches/core@^0.1.5