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

@stitches/core

Package Overview
Dependencies
Maintainers
3
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stitches/core - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

2

dist/index.iife.js

@@ -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+(?![^()]*\))/,h=e=>t=>e(..."string"==typeof t?String(t).split(p):[t]),m=/([\d.]+)([^]*)/,u={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:h(((e,t)=>({marginBlockStart:e,marginBlockEnd:t||e}))),marginInline:h(((e,t)=>({marginInlineStart:e,marginInlineEnd:t||e}))),maxSize:h(((e,t)=>({maxBlockSize:e,maxInlineSize:t||e}))),minSize:h(((e,t)=>({minBlockSize:e,minInlineSize:t||e}))),paddingBlock:h(((e,t)=>({paddingBlockStart:e,paddingBlockEnd:t||e}))),paddingInline:h(((e,t)=>({paddingInlineStart:e,paddingInlineEnd:t||e})))},f=e=>{const{media:t,themeMap:n,utils:r}=e;let o,i,a,p;return h=>((e,t)=>{const n=new WeakSet,r=(e,o,i,a,d)=>{let g="";e:for(let p in e){const h=64===p.charCodeAt(0);for(const m of h?[].concat(e[p]):[e[p]]){if("function"==typeof t&&(p!==a||m!==d)){const n=t(p,m,e);if(null!==n){g+=n===Object(n)?r(n,o,i,p,m):null==n?"":n;continue e}}const h=64===p.charCodeAt(0);if(m!==Object(m)||"length"in m){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(m):[m])g+=(h?p+" ":s(p)+":")+String(e)+";"}else{n.has(o)&&(n.delete(o),g+="}");const e=Object(p),t=h?o:o.length?l(o,p.split(c)):p.split(c);g+=r(m,t,h?i.concat(e):i),n.has(e)&&(n.delete(e),g+="}"),n.has(t)&&(n.delete(t),g+="}")}}}return g};return r(e,[],[])})(h,((l,c)=>{const h=l.charCodeAt(0),f=64===h?l:/[A-Z]/.test(b=l)?b:b.replace(/-[^]/g,(e=>e[1].toUpperCase()));var b;const S=64===h?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=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===h?(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=m.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(m,((e,t,r)=>Number(t)+s*(">"===n?1:-1)+r)):c)+(o?") and ("+(">"===o[0]?"min-":"max-")+l+":"+(1===o.length?i.replace(m,((e,t,n)=>Number(t)+s*(">"===o?-1:1)+n)):i):"")+")"})):36===h?"-"+l.replace(/\$/g,"-"):l;const B=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!=B||S!=k?{[k]:B}:null}))},{from:b,isArray:S}=Array,{ownKeys:k}=Reflect,B=class extends Set{toString(){return b(this).join("")}get hasChanged(){const{size:e}=this;return()=>e<this.size}},y=B;B.prototype[e]=B.prototype.toString;var w="colors",I="sizes",C="space",x={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: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: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"},z=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},$=(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)},j=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}},W=class extends Array{toString(){return this.join("")}get hasChanged(){const e=String(this);return()=>e!==String(this)}},v=W;W.prototype[e]=W.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)))}},M=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",h={theme:i,media:o,prefix:d,themeMap:s,utils:l},m=f(h),u=new y,S=new y,B=new y,w=new y,I=new y([u,S,B,w]);let C="";const W=()=>{const e=b(I).join("");C!==e&&g(C=e)},M=(e,t)=>{t=e===Object(e)?e:Object(t),e="string"==typeof e?e:"";const n=z(t),o=(e=e||$(d,n)).replace(/^\w/,".$&"),i=e===d+p?"":m({[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 j(t[e][n],n,e)}return a(s,"className",{get className(){const{hasChanged:t}=S;return S.add(i),t()&&W(),e},selector:o})},O=(e,t="")=>{const n=new y,o=new y;for(const t in e)if(e[t]!==Object(e[t])||k(e[t]).length){const r=m({[t]:e[t]});("@import"===t?n:o).add(r)}const i=a(r(null),"name",{name:t}),s=a((()=>{let e=u.hasChanged,t=B.hasChanged;return n.forEach((e=>{u.add(e)})),o.forEach((e=>{B.add(e)})),(e()||t())&&W(),i}),"name",{get name(){return String(s())}});return s},P=e=>{const t=new y,n=new v,o=new y,i=new y([t,n,o]);let{variants:a,compoundVariants:s,defaultVariants:l,...c}=e;l=Object(l);const g=$(d,e),h="."+g,u=g===d+p?"":m({[h]: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+$("",e)+"--"+(1===a?i[0]+"-"+o[i[0]]:"c"+a),l=m({["."+r]:e});return(n[a-1]||(n[a-1]=new y)).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=$("-",e),r=g==="-"+n?"":m({[h+n]:e});t.add(g+n);const{hasChanged:i}=o;return r&&o.add(r),i()},className:g,defaultVariants:l,selector:h,variantProps:f}},T=M(":root",i),N=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)&&W();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 h=b(d);return l.className=h.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()&&W(),o.className},selector:o.selector})},config:h,global:O,keyframes:e=>{const t=$(d,e);return O({["@keyframes "+t]:e},t)},prefix:d,reset:()=>(u.clear(),S.clear(),B.clear(),w.clear(),T.className,N),theme:n(M,T),get cssText(){return C},getCssString:()=>C},"cssText",{});return N},O=()=>O.config||(O.config=M()),P=(...e)=>O().css(...e),T=(...e)=>O().global(...e),N=(...e)=>O().keyframes(...e);globalThis.stitches={createCss:M,css:P,defaultThemeMap:x,global:T,keyframes:N}})()
(()=>{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*(?![^()]*\))/,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)$/,m=/([+-])?((?:\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})))},k=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 h="";e:for(const m in e){const f=64===m.charCodeAt(0);for(const u of f&&c(e[m])?e[m]:[e[m]]){if(t&&(m!==a||u!==d)){const n=t(m,u,e);if(null!==n){h+="object"==typeof n&&n?r(n,o,i,m,u):null==n?"":n;continue e}}if("object"==typeof u&&u&&u.toString===g){n.has(o)&&(n.delete(o),h+="}");const e=Object(m),t=f?o:o.length?l(o,m.split(p)):m.split(p);h+=r(u,t,f?i.concat(e):i),n.has(e)&&(n.delete(e),h+="}"),n.has(t)&&(n.delete(t),h+="}")}else{for(let e=0;e<i.length;++e)n.has(i[e])||(n.add(i[e]),h+=i[e]+"{");o.length&&!n.has(o)&&(n.add(o),h+=o+"{"),h+=(f?m+" ":s(m)+":")+String(u)+";"}}}return h};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 k=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};${k}:${t}-webkit-fill-available`:`-moz-fit-content${r};${k}:${t}fit-content`)+r));if(e!=c)return{[l]:e}}let y=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&&h.test(k)?String(c)+"px":String(c).replace(m,((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||k!=y?{[y]:B}:null}))},{ownKeys:y}=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",z={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)},v=e=>e?"-"+e:"",$=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"-"+v(this.prefix)+v(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||z,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=k(o),p=new w,h=new w,m=new w,f=new w,u=new w([p,h,m,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 $(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}=h;return h.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])||y(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=m.hasChanged;return n.forEach((e=>{p.add(e)})),o.forEach((e=>{m.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 h=j(s,e),m="."+h,u=h===s+c?"":g({[m]:p});f.add(i);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(...l||[]);for(const e in k){const{css:t,...o}=k[e],i=y(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=h+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(h);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=h==="-"+n?"":g({[m+n]:e});t.add(h+n);const{hasChanged:i}=o;return r&&o.add(r),i()},className:h,defaultVariants:d,selector:m,variantProps:b}},C=B(":root",o.theme),v=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,h=!1;for(const e of s)h=e.apply(c,g,l)||h;n===Object(n)&&(p=o.inline(n,g)),(h||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 m=d(g);return c.className=m.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(),h.clear(),m.clear(),f.clear(),C.className,v),theme:n(B,C),get cssText(){return b},getCssString:()=>b},"cssText",{});return v},T=()=>T.config||(T.config=P()),N=(...e)=>T().css(...e),R=(...e)=>T().global(...e),O=(...e)=>T().keyframes(...e);globalThis.stitches={createCss:P,css:N,defaultThemeMap:z,global:R,keyframes:O}})()
//# sourceMappingUrl=index.map
{
"name": "@stitches/core",
"version": "0.1.4",
"version": "0.1.5",
"description": "The modern CSS-in-JS library",

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

],
"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

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