@stitches/core
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -1,2 +0,2 @@ | ||
stitches=(()=>{var e,t="borderStyles",n="borderWidths",i="colors",r="radii",o="shadows",l="sizes",s="space",a={gap:s,gridGap:s,columnGap:s,gridColumnGap:s,rowGap:s,gridRowGap:s,inset:s,insetBlock:s,insetBlockEnd:s,insetBlockStart:s,insetInline:s,insetInlineEnd:s,insetInlineStart:s,margin:s,marginTop:s,marginRight:s,marginBottom:s,marginLeft:s,marginBlock:s,marginBlockEnd:s,marginBlockStart:s,marginInline:s,marginInlineEnd:s,marginInlineStart:s,padding:s,paddingTop:s,paddingRight:s,paddingBottom:s,paddingLeft:s,paddingBlock:s,paddingBlockEnd:s,paddingBlockStart:s,paddingInline:s,paddingInlineEnd:s,paddingInlineStart:s,top:s,right:s,bottom:s,left:s,scrollMargin:s,scrollMarginTop:s,scrollMarginRight:s,scrollMarginBottom:s,scrollMarginLeft:s,scrollMarginX:s,scrollMarginY:s,scrollMarginBlock:s,scrollMarginBlockEnd:s,scrollMarginBlockStart:s,scrollMarginInline:s,scrollMarginInlineEnd:s,scrollMarginInlineStart:s,scrollPadding:s,scrollPaddingTop:s,scrollPaddingRight:s,scrollPaddingBottom:s,scrollPaddingLeft:s,scrollPaddingX:s,scrollPaddingY:s,scrollPaddingBlock:s,scrollPaddingBlockEnd:s,scrollPaddingBlockStart:s,scrollPaddingInline:s,scrollPaddingInlineEnd:s,scrollPaddingInlineStart:s,fontSize:"fontSizes",background:i,backgroundColor:i,backgroundImage:i,border:i,borderBlock:i,borderBlockEnd:i,borderBlockStart:i,borderBottom:i,borderBottomColor:i,borderColor:i,borderInline:i,borderInlineEnd:i,borderInlineStart:i,borderLeft:i,borderLeftColor:i,borderRight:i,borderRightColor:i,borderTop:i,borderTopColor:i,caretColor:i,color:i,columnRuleColor:i,fill:i,outline:i,outlineColor:i,stroke:i,textDecorationColor:i,fontFamily:"fonts",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",blockSize:l,minBlockSize:l,maxBlockSize:l,inlineSize:l,minInlineSize:l,maxInlineSize:l,width:l,minWidth:l,maxWidth:l,height:l,minHeight:l,maxHeight:l,flexBasis:l,gridTemplateColumns:l,gridTemplateRows:l,borderWidth:n,borderTopWidth:n,borderRightWidth:n,borderBottomWidth:n,borderLeftWidth:n,borderStyle:t,borderTopStyle:t,borderRightStyle:t,borderBottomStyle:t,borderLeftStyle:t,borderRadius:r,borderTopLeftRadius:r,borderTopRightRadius:r,borderBottomRightRadius:r,borderBottomLeftRadius:r,boxShadow:o,textShadow:o,transition:"transitions",zIndex:"zIndices"},c=(e,t)=>"function"==typeof t?{"()":Function.prototype.toString.call(t)}:t,d=()=>{const e=Object.create(null);return(t,n,...i)=>{const r=(e=>JSON.stringify(e,c))(t);return r in e?e[r]:e[r]=n(t,...i)}},g=Symbol.for("sxs.internal"),p=(e,t)=>Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)),u=e=>{for(const t in e)return!0;return!1},{hasOwnProperty:h}=Object.prototype,m=e=>e.includes("-")?e:e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),f=/\s+(?![^()]*\))/,b=e=>t=>e(..."string"==typeof t?String(t).split(f):[t]),S={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}),textSizeAdjust:e=>({WebkitTextSizeAdjust:e,textSizeAdjust: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})))},k=/([\d.]+)([^]*)/,x=(e,t)=>e.length?e.reduce(((e,n)=>(e.push(...t.map((e=>e.includes("&")?e.replace(/&/g,/[ +>|~]/.test(n)&&/&.*&/.test(e)?`:is(${n})`:n):n+" "+e))),e)),[]):t,y=(e,t)=>e in B&&"string"==typeof t?t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,((t,n,i,r)=>n+("stretch"===i?`-moz-available${r};${m(e)}:${n}-webkit-fill-available`:`-moz-fit-content${r};${m(e)}:${n}fit-content`)+r)):String(t),B={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},R=e=>e?e+"-":"",$=(e,t,n)=>e.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,((e,i,r,o,l)=>"$"==o==!!r?e:(i||"--"==o?"calc(":"")+"var(--"+("$"===o?R(t)+(l.includes("$")?"":R(n))+l.replace(/\$/g,"-"):l)+")"+(i||"--"==o?"*"+(i||"")+(r||"1")+")":""))),I=/\s*,\s*(?![^()]*\))/,z=Object.prototype.toString,j=(e,t,n,i,r)=>{let o,l,s;const a=(e,t,n)=>{let c,d;const g=e=>{for(c in e){const h=64===c.charCodeAt(0),f=h&&Array.isArray(e[c])?e[c]:[e[c]];for(d of f){const e="object"==typeof d&&d&&d.toString===z,f=/[A-Z]/.test(u=c)?u:u.replace(/-[^]/g,(e=>e[1].toUpperCase()));if(f in i.utils){const e=i.utils[f];if(e!==l){l=e,g(e(d)),l=null;continue}}else if(f in S){const e=S[f];if(e!==s){s=e,g(e(d)),s=null;continue}}if(h&&(p=c.slice(1)in i.media?"@media "+i.media[c.slice(1)]:c,c=p.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,((e,t,n,i,r,o)=>{const l=k.test(t),s=.0625*(l?-1:1),[a,c]=l?[i,t]:[t,i];return"("+("="===n[0]?"":">"===n[0]===l?"max-":"min-")+a+":"+("="!==n[0]&&1===n.length?c.replace(k,((e,t,i)=>Number(t)+s*(">"===n?1:-1)+i)):c)+(r?") and ("+(">"===r[0]?"min-":"max-")+a+":"+(1===r.length?o.replace(k,((e,t,n)=>Number(t)+s*(">"===r?-1:1)+n)):o):"")+")"}))),e){const e=h?n.concat(c):[...n],i=h?[...t]:x(t,c.split(I));void 0!==o&&r(W(...o)),o=void 0,a(d,i,e)}else void 0===o&&(o=[[],t,n]),c=h||36!==c.charCodeAt(0)?c:`--${R(i.prefix)}${c.slice(1).replace(/\$/g,"-")}`,d=e?d:"number"==typeof d?d&&f in v?String(d)+"px":String(d):$(y(f,null==d?"":d),i.prefix,i.themeMap[f]),o[0].push(`${h?`${c} `:`${m(c)}:`}${d}`)}}var p,u};g(e),void 0!==o&&r(W(...o)),o=void 0};a(e,t,n)},W=(e,t,n)=>`${n.map((e=>`${e}{`)).join("")}${t.length?`${t.join(",")}{`:""}${e.join(";")}${t.length?"}":""}${Array(n.length?n.length+1:0).join("}")}`,v={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},w=e=>String.fromCharCode(e+(e>25?39:97)),T=e=>(e=>{let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=w(t%52)+n;return w(t%52)+n})(((e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e})(5381,JSON.stringify(e))>>>0),E=d(),C=(e,t)=>E(e,(()=>(...n)=>{let i={type:null,composers:new Set};for(const t of n)if(null!=t)if(t[g]){null==i.type&&(i.type=t[g].type);for(const e of t[g].composers)i.composers.add(e)}else t.constructor!==Object||t.$$typeof?null==i.type&&(i.type=t):i.composers.add(M(t,e));return null==i.type&&(i.type="span"),i.composers.size||i.composers.add(["PJLV",{},[],[],{},[]]),P(e,i,t)})),M=({variants:e,compoundVariants:t,defaultVariants:n,...i},r)=>{const o=`${R(r.prefix)}c-${T(i)}`,l=[],s=[],a=Object.create(null),c=[];for(const e in n)a[e]=String(n[e]);if("object"==typeof e&&e)for(const t in e){d=a,g=t,h.call(d,g)||(a[t]="undefined");const n=e[t];for(const e in n){const i={[t]:String(e)};"undefined"===String(e)&&c.push(t);const r=n[e],o=[i,r,!u(r)];l.push(o)}}var d,g;if("object"==typeof t&&t)for(const e of t){let{css:t,...n}=e;t="object"==typeof t&&t||{};for(const e in n)n[e]=String(n[e]);const i=[n,t,!u(t)];s.push(i)}return[o,i,l,s,a,c]},P=(e,t,n)=>{const[i,r,o,l]=L(t.composers),s=`.${i}${r.length>1?`:where(.${r.slice(1).join(".")})`:""}`,a=a=>{a="object"==typeof a&&a||A;const{css:c,...d}=a,g={};for(const e in o)if(delete d[e],e in a){let t=a[e];"object"==typeof t&&t?g[e]={"@initial":o[e],...t}:(t=String(t),g[e]="undefined"!==t||l.has(e)?t:o[e])}else g[e]=o[e];const p=new Set([...r]);for(const[i,r,o,l]of t.composers){n.rules.styled.cache.has(i)||(n.rules.styled.cache.add(i),j(r,[`.${i}`],[],e,(e=>{n.rules.styled.apply(e)})));const t=O(o,g,e.media),s=O(l,g,e.media,!0);for(const r of t)if(void 0!==r)for(const[t,o]of r){const r=`${i}-${T(o)}-${t}`;p.add(r),n.rules.onevar.cache.has(r)||(n.rules.onevar.cache.add(r),j(o,[`.${r}`],[],e,(e=>{n.rules.onevar.apply(e)})))}for(const t of s)if(void 0!==t)for(const[r,o]of t){const t=`${i}-${T(o)}-${r}`;p.add(t),n.rules.allvar.cache.has(t)||(n.rules.allvar.cache.add(t),j(o,[`.${t}`],[],e,(e=>{n.rules.allvar.apply(e)})))}}if("object"==typeof c&&c){const t=`${i}-i${T(c)}-css`;p.add(t),n.rules.inline.cache.has(t)||(n.rules.inline.cache.add(t),j(c,[`.${t}`],[],e,(e=>{n.rules.inline.apply(e)})))}for(const e of String(a.className||"").trim().split(/\s+/))e&&p.add(e);const u=d.className=[...p].join(" ");return{type:t.type,className:u,selector:s,props:d,toString:()=>u}};return p(a,{className:i,selector:s,[g]:t,toString:()=>(n.rules.styled.cache.has(i)||a(),i)})},L=e=>{let t="";const n=[],i={},r=[];for(const[o,,,,l,s]of e){""===t&&(t=o),n.push(o),r.push(...s);for(const e in l){const t=l[e];(void 0===i[e]||"undefined"!==t||s.includes(t))&&(i[e]=t)}}return[t,n,i,new Set(r)]},O=(e,t,n,i)=>{const r=[];e:for(let[o,l,s]of e){if(s)continue;let e,a=0;for(e in o){const i=o[e];let r=t[e];if(r!==i){if("object"!=typeof r||!r)continue e;{let e,t=0;for(const o in r)i===String(r[o])&&("@initial"!==o&&(l={[o in n?n[o]:o]:l}),a+=t,e=!0),++t;if(!e)continue e}}}(r[a]=r[a]||[]).push([i?"cv":`${e}-${o[e]}`,l])}return r},A={},D=d(),H=(e,t)=>D(e,(()=>n=>{const i=T(n="object"==typeof n&&n||{}),r=()=>{if(!t.rules.global.cache.has(i)){if(t.rules.global.cache.add(i),"@import"in n){let e=[].indexOf.call(t.sheet.cssRules,t.rules.themed.group)-1;for(let i of[].concat(n["@import"]))i=i.includes('"')||i.includes("'")?i:`"${i}"`,t.sheet.insertRule(`@import ${i};`,e++);delete n["@import"]}j(n,[],[],e,(e=>{t.rules.global.apply(e)}))}return""};return p(r,{toString:r})})),N=d(),V=(e,t)=>N(e,(()=>n=>{const i=`${R(e.prefix)}k-${T(n)}`,r=()=>{if(!t.rules.global.cache.has(i)){t.rules.global.cache.add(i);const r=[];j(n,[],[],e,(e=>r.push(e)));const o=`@keyframes ${i}{${r.join("")}}`;t.rules.global.apply(o)}return i};return p(r,{get name(){return r()},toString:r})})),G=class{constructor(e,t,n,i){this.token=null==e?"":String(e),this.value=null==t?"":String(t),this.scale=null==n?"":String(n),this.prefix=null==i?"":String(i)}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+R(this.prefix)+R(this.scale)+this.token}toString(){return this.computedValue}},F=d(),J=(e,t)=>F(e,(()=>(n,i)=>{i="object"==typeof n&&n||Object(i);const r=`.${n=(n="string"==typeof n?n:"")||`${R(e.prefix)}t-${T(i)}`}`,o={},l=[];for(const t in i){o[t]={};for(const n in i[t]){const r=`--${R(e.prefix)}${t}-${n}`,s=$(String(i[t][n]),e.prefix,t);o[t][n]=new G(n,s,t,e.prefix),l.push(`${r}:${s}`)}}const s=()=>{if(l.length&&!t.rules.themed.cache.has(n)){t.rules.themed.cache.add(n);const r=`${i===e.theme?":root,":""}.${n}{${l.join(";")}}`;t.rules.themed.apply(r)}return n};return{...o,get className(){return s()},selector:r,toString:s}})),U=["themed","global","styled","onevar","allvar","inline"],Z=e=>{let t;const n=()=>{if(t){const{rules:e,sheet:n}=t;if(!n.deleteRule){for(;3===Object(Object(n.cssRules)[0]).type;)n.cssRules.splice(0,1);n.cssRules=[]}for(const t in e)delete e[t];n.ownerRule&&(n.ownerRule.textContent=n.ownerRule.textContent)}const i=Object(e).styleSheets||[];for(const e of i)if(!e.href||e.href.startsWith(location.origin)){for(let i=0,r=e.cssRules;r[i];++i){const o=Object(r[i]);if(1!==o.type)continue;const l=Object(r[i+1]);if(4!==l.type)continue;++i;const{cssText:s}=o;if(!s.startsWith("--sxs"))continue;const a=s.slice(14,-3).trim().split(/\s+/),c=U[a[0]];c&&(t||(t={sheet:e,reset:n,rules:{}}),t.rules[c]={group:l,index:i,cache:new Set(a)})}if(t)break}if(!t){const i=(e,t)=>({type:t,cssRules:[],insertRule(e,t){this.cssRules.splice(t,0,i(e,{import:3,undefined:1}[(e.toLowerCase().match(/^@([a-z]+)/)||[])[1]]||4))},get cssText(){return"@media{}"===e?`@media{${[].map.call(this.cssRules,(e=>e.cssText)).join("")}}`:e}});t={sheet:e?(e.head||e).appendChild(document.createElement("style")).sheet:i("","text/css"),rules:{},reset:n,toString(){const{cssRules:e}=t.sheet;return[].map.call(e,((n,i)=>{const{cssText:r}=n;let o="";if(r.startsWith("--sxs"))return"";if(e[i-1]&&(o=e[i-1].cssText).startsWith("--sxs")){if(!n.cssRules.length)return"";for(const e in t.rules)if(t.rules[e].group===n)return`--sxs{--sxs:${[...t.rules[e].cache].join(" ")}}${r}`;return n.cssRules.length?`${o}${r}`:""}return r})).join("")}}}const{sheet:r,rules:o}=t;if(!o.inline){const e=r.cssRules.length;r.insertRule("@media{}",e),r.insertRule("--sxs{--sxs:5}",e),o.inline={index:e,group:r.cssRules[e+1],cache:new Set([5])}}if(X(o.inline),!o.allvar){const e=o.inline.index;r.insertRule("@media{}",e),r.insertRule("--sxs{--sxs:4}",e),o.allvar={index:e,group:r.cssRules[e+1],cache:new Set([4])}}if(X(o.allvar),!o.onevar){const e=o.allvar.index;r.insertRule("@media{}",e),r.insertRule("--sxs{--sxs:3}",e),o.onevar={index:e,group:r.cssRules[e+1],cache:new Set([3])}}if(X(o.onevar),!o.styled){const e=o.onevar.index;r.insertRule("@media{}",e),r.insertRule("--sxs{--sxs:2}",e),o.styled={index:e,group:r.cssRules[e+1],cache:new Set([2])}}if(X(o.styled),!o.global){const e=o.styled.index;r.insertRule("@media{}",e),r.insertRule("--sxs{--sxs:1}",e),o.global={index:e,group:r.cssRules[e+1],cache:new Set([1])}}if(X(o.global),!o.themed){const e=o.global.index;r.insertRule("@media{}",e),r.insertRule("--sxs{--sxs:0}",e),o.themed={index:e,group:r.cssRules[e+1],cache:new Set([0])}}X(o.themed)};return n(),t},X=e=>{const t=e.group;let n=t.cssRules.length;e.apply=e=>{try{t.insertRule(e,n),++n}catch{}}},Y=d(),q=e=>{let t=!1;const n=Y(e,(e=>{t=!0;const n="prefix"in(e="object"==typeof e&&e||{})?String(e.prefix):"",i="object"==typeof e.media&&e.media||{},r="object"==typeof e.root?e.root||null:globalThis.document||null,o="object"==typeof e.theme&&e.theme||{},l={prefix:n,media:i,root:r,theme:o,themeMap:"object"==typeof e.themeMap&&e.themeMap||{...a},utils:"object"==typeof e.utils&&e.utils||{}},s=Z(r),c={css:C(l,s),globalCss:H(l,s),keyframes:V(l,s),createTheme:J(l,s),reset(){s.reset(),c.theme.toString()},theme:{},sheet:s,config:l,prefix:n,getCssText:s.toString,toString:s.toString};return String(c.theme=c.createTheme(o)),c}));return t||n.reset(),n},K=()=>e||(e=q());return{createStitches:q,createTheme:(...e)=>K().createTheme(...e),css:(...e)=>K().css(...e),defaultThemeMap:a,globalCss:(...e)=>K().globalCss(...e),keyframes:(...e)=>K().keyframes(...e)}})(); | ||
stitches=(()=>{var e,t="borderStyles",n="borderWidths",i="colors",r="radii",o="shadows",l="sizes",s="space",a={gap:s,gridGap:s,columnGap:s,gridColumnGap:s,rowGap:s,gridRowGap:s,inset:s,insetBlock:s,insetBlockEnd:s,insetBlockStart:s,insetInline:s,insetInlineEnd:s,insetInlineStart:s,margin:s,marginTop:s,marginRight:s,marginBottom:s,marginLeft:s,marginBlock:s,marginBlockEnd:s,marginBlockStart:s,marginInline:s,marginInlineEnd:s,marginInlineStart:s,padding:s,paddingTop:s,paddingRight:s,paddingBottom:s,paddingLeft:s,paddingBlock:s,paddingBlockEnd:s,paddingBlockStart:s,paddingInline:s,paddingInlineEnd:s,paddingInlineStart:s,top:s,right:s,bottom:s,left:s,scrollMargin:s,scrollMarginTop:s,scrollMarginRight:s,scrollMarginBottom:s,scrollMarginLeft:s,scrollMarginX:s,scrollMarginY:s,scrollMarginBlock:s,scrollMarginBlockEnd:s,scrollMarginBlockStart:s,scrollMarginInline:s,scrollMarginInlineEnd:s,scrollMarginInlineStart:s,scrollPadding:s,scrollPaddingTop:s,scrollPaddingRight:s,scrollPaddingBottom:s,scrollPaddingLeft:s,scrollPaddingX:s,scrollPaddingY:s,scrollPaddingBlock:s,scrollPaddingBlockEnd:s,scrollPaddingBlockStart:s,scrollPaddingInline:s,scrollPaddingInlineEnd:s,scrollPaddingInlineStart:s,fontSize:"fontSizes",background:i,backgroundColor:i,backgroundImage:i,borderImage:i,border:i,borderBlock:i,borderBlockEnd:i,borderBlockStart:i,borderBottom:i,borderBottomColor:i,borderColor:i,borderInline:i,borderInlineEnd:i,borderInlineStart:i,borderLeft:i,borderLeftColor:i,borderRight:i,borderRightColor:i,borderTop:i,borderTopColor:i,caretColor:i,color:i,columnRuleColor:i,fill:i,outline:i,outlineColor:i,stroke:i,textDecorationColor:i,fontFamily:"fonts",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",blockSize:l,minBlockSize:l,maxBlockSize:l,inlineSize:l,minInlineSize:l,maxInlineSize:l,width:l,minWidth:l,maxWidth:l,height:l,minHeight:l,maxHeight:l,flexBasis:l,gridTemplateColumns:l,gridTemplateRows:l,borderWidth:n,borderTopWidth:n,borderRightWidth:n,borderBottomWidth:n,borderLeftWidth:n,borderStyle:t,borderTopStyle:t,borderRightStyle:t,borderBottomStyle:t,borderLeftStyle:t,borderRadius:r,borderTopLeftRadius:r,borderTopRightRadius:r,borderBottomRightRadius:r,borderBottomLeftRadius:r,boxShadow:o,textShadow:o,transition:"transitions",zIndex:"zIndices"},c=(e,t)=>"function"==typeof t?{"()":Function.prototype.toString.call(t)}:t,d=()=>{const e=Object.create(null);return(t,n,...i)=>{const r=(e=>JSON.stringify(e,c))(t);return r in e?e[r]:e[r]=n(t,...i)}},g=Symbol.for("sxs.internal"),p=(e,t)=>Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)),u=e=>{for(const t in e)return!0;return!1},{hasOwnProperty:h}=Object.prototype,f=e=>e.includes("-")?e:e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),m=/\s+(?![^()]*\))/,b=e=>t=>e(..."string"==typeof t?String(t).split(m):[t]),S={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}),textSizeAdjust:e=>({WebkitTextSizeAdjust:e,textSizeAdjust: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})))},k=/([\d.]+)([^]*)/,x=(e,t)=>e.length?e.reduce(((e,n)=>(e.push(...t.map((e=>e.includes("&")?e.replace(/&/g,/[ +>|~]/.test(n)&&/&.*&/.test(e)?`:is(${n})`:n):n+" "+e))),e)),[]):t,y=(e,t)=>e in B&&"string"==typeof t?t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,((t,n,i,r)=>n+("stretch"===i?`-moz-available${r};${f(e)}:${n}-webkit-fill-available`:`-moz-fit-content${r};${f(e)}:${n}fit-content`)+r)):String(t),B={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},R=e=>e?e+"-":"",$=(e,t,n)=>e.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,((e,i,r,o,l)=>"$"==o==!!r?e:(i||"--"==o?"calc(":"")+"var(--"+("$"===o?R(t)+(l.includes("$")?"":R(n))+l.replace(/\$/g,"-"):l)+")"+(i||"--"==o?"*"+(i||"")+(r||"1")+")":""))),I=/\s*,\s*(?![^()]*\))/,z=Object.prototype.toString,j=(e,t,n,i,r)=>{let o,l,s;const a=(e,t,n)=>{let c,d;const g=e=>{for(c in e){const h=64===c.charCodeAt(0),m=h&&Array.isArray(e[c])?e[c]:[e[c]];for(d of m){const e="object"==typeof d&&d&&d.toString===z,m=/[A-Z]/.test(u=c)?u:u.replace(/-[^]/g,(e=>e[1].toUpperCase()));if(m in i.utils){const e=i.utils[m];if(e!==l){l=e,g(e(d)),l=null;continue}}else if(m in S){const e=S[m];if(e!==s){s=e,g(e(d)),s=null;continue}}if(h&&(p=c.slice(1)in i.media?"@media "+i.media[c.slice(1)]:c,c=p.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,((e,t,n,i,r,o)=>{const l=k.test(t),s=.0625*(l?-1:1),[a,c]=l?[i,t]:[t,i];return"("+("="===n[0]?"":">"===n[0]===l?"max-":"min-")+a+":"+("="!==n[0]&&1===n.length?c.replace(k,((e,t,i)=>Number(t)+s*(">"===n?1:-1)+i)):c)+(r?") and ("+(">"===r[0]?"min-":"max-")+a+":"+(1===r.length?o.replace(k,((e,t,n)=>Number(t)+s*(">"===r?-1:1)+n)):o):"")+")"}))),e){const e=h?n.concat(c):[...n],i=h?[...t]:x(t,c.split(I));void 0!==o&&r(W(...o)),o=void 0,a(d,i,e)}else void 0===o&&(o=[[],t,n]),c=h||36!==c.charCodeAt(0)?c:`--${R(i.prefix)}${c.slice(1).replace(/\$/g,"-")}`,d=e?d:"number"==typeof d?d&&m in v?String(d)+"px":String(d):$(y(m,null==d?"":d),i.prefix,i.themeMap[m]),o[0].push(`${h?`${c} `:`${f(c)}:`}${d}`)}}var p,u};g(e),void 0!==o&&r(W(...o)),o=void 0};a(e,t,n)},W=(e,t,n)=>`${n.map((e=>`${e}{`)).join("")}${t.length?`${t.join(",")}{`:""}${e.join(";")}${t.length?"}":""}${Array(n.length?n.length+1:0).join("}")}`,v={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},w=e=>String.fromCharCode(e+(e>25?39:97)),T=e=>(e=>{let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=w(t%52)+n;return w(t%52)+n})(((e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e})(5381,JSON.stringify(e))>>>0),E=d(),C=(e,t)=>E(e,(()=>(...n)=>{let i={type:null,composers:new Set};for(const t of n)if(null!=t)if(t[g]){null==i.type&&(i.type=t[g].type);for(const e of t[g].composers)i.composers.add(e)}else t.constructor!==Object||t.$$typeof?null==i.type&&(i.type=t):i.composers.add(M(t,e));return null==i.type&&(i.type="span"),i.composers.size||i.composers.add(["PJLV",{},[],[],{},[]]),P(e,i,t)})),M=({variants:e,compoundVariants:t,defaultVariants:n,...i},r)=>{const o=`${R(r.prefix)}c-${T(i)}`,l=[],s=[],a=Object.create(null),c=[];for(const e in n)a[e]=String(n[e]);if("object"==typeof e&&e)for(const t in e){d=a,g=t,h.call(d,g)||(a[t]="undefined");const n=e[t];for(const e in n){const i={[t]:String(e)};"undefined"===String(e)&&c.push(t);const r=n[e],o=[i,r,!u(r)];l.push(o)}}var d,g;if("object"==typeof t&&t)for(const e of t){let{css:t,...n}=e;t="object"==typeof t&&t||{};for(const e in n)n[e]=String(n[e]);const i=[n,t,!u(t)];s.push(i)}return[o,i,l,s,a,c]},P=(e,t,n)=>{const[i,r,o,l]=L(t.composers),s=`.${i}${r.length>1?`:where(.${r.slice(1).join(".")})`:""}`,a=a=>{a="object"==typeof a&&a||A;const{css:c,...d}=a,g={};for(const e in o)if(delete d[e],e in a){let t=a[e];"object"==typeof t&&t?g[e]={"@initial":o[e],...t}:(t=String(t),g[e]="undefined"!==t||l.has(e)?t:o[e])}else g[e]=o[e];const p=new Set([...r]);for(const[i,r,o,l]of t.composers){n.rules.styled.cache.has(i)||(n.rules.styled.cache.add(i),j(r,[`.${i}`],[],e,(e=>{n.rules.styled.apply(e)})));const t=O(o,g,e.media),s=O(l,g,e.media,!0);for(const r of t)if(void 0!==r)for(const[t,o]of r){const r=`${i}-${T(o)}-${t}`;p.add(r),n.rules.onevar.cache.has(r)||(n.rules.onevar.cache.add(r),j(o,[`.${r}`],[],e,(e=>{n.rules.onevar.apply(e)})))}for(const t of s)if(void 0!==t)for(const[r,o]of t){const t=`${i}-${T(o)}-${r}`;p.add(t),n.rules.allvar.cache.has(t)||(n.rules.allvar.cache.add(t),j(o,[`.${t}`],[],e,(e=>{n.rules.allvar.apply(e)})))}}if("object"==typeof c&&c){const t=`${i}-i${T(c)}-css`;p.add(t),n.rules.inline.cache.has(t)||(n.rules.inline.cache.add(t),j(c,[`.${t}`],[],e,(e=>{n.rules.inline.apply(e)})))}for(const e of String(a.className||"").trim().split(/\s+/))e&&p.add(e);const u=d.className=[...p].join(" ");return{type:t.type,className:u,selector:s,props:d,toString:()=>u}};return p(a,{className:i,selector:s,[g]:t,toString:()=>(n.rules.styled.cache.has(i)||a(),i)})},L=e=>{let t="";const n=[],i={},r=[];for(const[o,,,,l,s]of e){""===t&&(t=o),n.push(o),r.push(...s);for(const e in l){const t=l[e];(void 0===i[e]||"undefined"!==t||s.includes(t))&&(i[e]=t)}}return[t,n,i,new Set(r)]},O=(e,t,n,i)=>{const r=[];e:for(let[o,l,s]of e){if(s)continue;let e,a=0;for(e in o){const i=o[e];let r=t[e];if(r!==i){if("object"!=typeof r||!r)continue e;{let e,t=0;for(const o in r)i===String(r[o])&&("@initial"!==o&&(l={[o in n?n[o]:o]:l}),a+=t,e=!0),++t;if(!e)continue e}}}(r[a]=r[a]||[]).push([i?"cv":`${e}-${o[e]}`,l])}return r},A={},D=d(),H=(e,t)=>D(e,(()=>(...n)=>{const i=()=>{for(let i of n){i="object"==typeof i&&i||{};let n=T(i);if(!t.rules.global.cache.has(n)){if(t.rules.global.cache.add(n),"@import"in i){let e=[].indexOf.call(t.sheet.cssRules,t.rules.themed.group)-1;for(let n of[].concat(i["@import"]))n=n.includes('"')||n.includes("'")?n:`"${n}"`,t.sheet.insertRule(`@import ${n};`,e++);delete i["@import"]}j(i,[],[],e,(e=>{t.rules.global.apply(e)}))}}return""};return p(i,{toString:i})})),N=d(),V=(e,t)=>N(e,(()=>n=>{const i=`${R(e.prefix)}k-${T(n)}`,r=()=>{if(!t.rules.global.cache.has(i)){t.rules.global.cache.add(i);const r=[];j(n,[],[],e,(e=>r.push(e)));const o=`@keyframes ${i}{${r.join("")}}`;t.rules.global.apply(o)}return i};return p(r,{get name(){return r()},toString:r})})),G=class{constructor(e,t,n,i){this.token=null==e?"":String(e),this.value=null==t?"":String(t),this.scale=null==n?"":String(n),this.prefix=null==i?"":String(i)}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+R(this.prefix)+R(this.scale)+this.token}toString(){return this.computedValue}},F=d(),J=(e,t)=>F(e,(()=>(n,i)=>{i="object"==typeof n&&n||Object(i);const r=`.${n=(n="string"==typeof n?n:"")||`${R(e.prefix)}t-${T(i)}`}`,o={},l=[];for(const t in i){o[t]={};for(const n in i[t]){const r=`--${R(e.prefix)}${t}-${n}`,s=$(String(i[t][n]),e.prefix,t);o[t][n]=new G(n,s,t,e.prefix),l.push(`${r}:${s}`)}}const s=()=>{if(l.length&&!t.rules.themed.cache.has(n)){t.rules.themed.cache.add(n);const r=`${i===e.theme?":root,":""}.${n}{${l.join(";")}}`;t.rules.themed.apply(r)}return n};return{...o,get className(){return s()},selector:r,toString:s}})),U=["themed","global","styled","onevar","allvar","inline"],Z=e=>{let t;const n=()=>{if(t){const{rules:e,sheet:n}=t;if(!n.deleteRule){for(;3===Object(Object(n.cssRules)[0]).type;)n.cssRules.splice(0,1);n.cssRules=[]}for(const t in e)delete e[t];n.ownerRule&&(n.ownerRule.textContent=n.ownerRule.textContent)}const i=Object(e).styleSheets||[];for(const e of i)if(!e.href||e.href.startsWith(location.origin)){for(let i=0,r=e.cssRules;r[i];++i){const o=Object(r[i]);if(1!==o.type)continue;const l=Object(r[i+1]);if(4!==l.type)continue;++i;const{cssText:s}=o;if(!s.startsWith("--sxs"))continue;const a=s.slice(14,-3).trim().split(/\s+/),c=U[a[0]];c&&(t||(t={sheet:e,reset:n,rules:{}}),t.rules[c]={group:l,index:i,cache:new Set(a)})}if(t)break}if(!t){const i=(e,t)=>({type:t,cssRules:[],insertRule(e,t){this.cssRules.splice(t,0,i(e,{import:3,undefined:1}[(e.toLowerCase().match(/^@([a-z]+)/)||[])[1]]||4))},get cssText(){return"@media{}"===e?`@media{${[].map.call(this.cssRules,(e=>e.cssText)).join("")}}`:e}});t={sheet:e?(e.head||e).appendChild(document.createElement("style")).sheet:i("","text/css"),rules:{},reset:n,toString(){const{cssRules:e}=t.sheet;return[].map.call(e,((n,i)=>{const{cssText:r}=n;let o="";if(r.startsWith("--sxs"))return"";if(e[i-1]&&(o=e[i-1].cssText).startsWith("--sxs")){if(!n.cssRules.length)return"";for(const e in t.rules)if(t.rules[e].group===n)return`--sxs{--sxs:${[...t.rules[e].cache].join(" ")}}${r}`;return n.cssRules.length?`${o}${r}`:""}return r})).join("")}}}const{sheet:r,rules:o}=t;if(!o.inline){const e=r.cssRules.length;r.insertRule("@media{}",e),r.insertRule("--sxs{--sxs:5}",e),o.inline={index:e,group:r.cssRules[e+1],cache:new Set([5])}}if(X(o.inline),!o.allvar){const e=o.inline.index;r.insertRule("@media{}",e),r.insertRule("--sxs{--sxs:4}",e),o.allvar={index:e,group:r.cssRules[e+1],cache:new Set([4])}}if(X(o.allvar),!o.onevar){const e=o.allvar.index;r.insertRule("@media{}",e),r.insertRule("--sxs{--sxs:3}",e),o.onevar={index:e,group:r.cssRules[e+1],cache:new Set([3])}}if(X(o.onevar),!o.styled){const e=o.onevar.index;r.insertRule("@media{}",e),r.insertRule("--sxs{--sxs:2}",e),o.styled={index:e,group:r.cssRules[e+1],cache:new Set([2])}}if(X(o.styled),!o.global){const e=o.styled.index;r.insertRule("@media{}",e),r.insertRule("--sxs{--sxs:1}",e),o.global={index:e,group:r.cssRules[e+1],cache:new Set([1])}}if(X(o.global),!o.themed){const e=o.global.index;r.insertRule("@media{}",e),r.insertRule("--sxs{--sxs:0}",e),o.themed={index:e,group:r.cssRules[e+1],cache:new Set([0])}}X(o.themed)};return n(),t},X=e=>{const t=e.group;let n=t.cssRules.length;e.apply=e=>{try{t.insertRule(e,n),++n}catch{}}},Y=d(),q=e=>{let t=!1;const n=Y(e,(e=>{t=!0;const n="prefix"in(e="object"==typeof e&&e||{})?String(e.prefix):"",i="object"==typeof e.media&&e.media||{},r="object"==typeof e.root?e.root||null:globalThis.document||null,o="object"==typeof e.theme&&e.theme||{},l={prefix:n,media:i,root:r,theme:o,themeMap:"object"==typeof e.themeMap&&e.themeMap||{...a},utils:"object"==typeof e.utils&&e.utils||{}},s=Z(r),c={css:C(l,s),globalCss:H(l,s),keyframes:V(l,s),createTheme:J(l,s),reset(){s.reset(),c.theme.toString()},theme:{},sheet:s,config:l,prefix:n,getCssText:s.toString,toString:s.toString};return String(c.theme=c.createTheme(o)),c}));return t||n.reset(),n},K=()=>e||(e=q());return{createStitches:q,createTheme:(...e)=>K().createTheme(...e),css:(...e)=>K().css(...e),defaultThemeMap:a,globalCss:(...e)=>K().globalCss(...e),keyframes:(...e)=>K().keyframes(...e)}})(); | ||
//# sourceMappingUrl=index.map |
{ | ||
"name": "@stitches/core", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "The modern CSS-in-JS library", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -118,2 +118,3 @@ import type * as CSSUtil from './css-util' | ||
backgroundImage: 'colors' | ||
borderImage: 'colors' | ||
border: 'colors' | ||
@@ -120,0 +121,0 @@ borderBlock: 'colors' |
@@ -42,3 +42,3 @@ import type Stitches from './stitches' | ||
/** Returns a type that suggests variants from a component as possible prop values. */ | ||
export type VariantProps<Component> = StyledComponent.TransformProps<Component[StyledComponent.$$StyledComponentProps], Component[StyledComponent.$$StyledComponentMedia]> | ||
export type VariantProps<Component extends {[key: symbol | string]: any}> = StyledComponent.TransformProps<Component[StyledComponent.$$StyledComponentProps], Component[StyledComponent.$$StyledComponentMedia]> | ||
@@ -45,0 +45,0 @@ /** Map of CSS properties to token scales. */ |
@@ -31,20 +31,23 @@ import type * as CSSUtil from './css-util' | ||
<Prelude extends string>( | ||
style: { | ||
/** The **@import** CSS at-rule imports style rules from other style sheets. */ | ||
'@import'?: unknown | ||
/** The **@font-face** CSS at-rule specifies a custom font with which to display text. */ | ||
'@font-face'?: unknown | ||
} & { | ||
[K in Prelude]: K extends '@import' | ||
? string | ||
: K extends '@font-face' | ||
? CSSUtil.Native.AtRule.FontFace | CSSUtil.Native.AtRule.FontFace[] | ||
: K extends `@keyframes ${string}` | ||
? { | ||
[KeyFrame in string]: CSSUtil.CSS<Media, Theme, ThemeMap, Utils> | ||
} | ||
: K extends `@property ${string}` | ||
? CSSUtil.Native.AtRule.Property | ||
: CSSUtil.CSS<Media, Theme, ThemeMap, Utils> | ||
} | ||
...styles: ( | ||
& { | ||
/** The **@import** CSS at-rule imports style rules from other style sheets. */ | ||
'@import'?: unknown | ||
/** The **@font-face** CSS at-rule specifies a custom font with which to display text. */ | ||
'@font-face'?: unknown | ||
} | ||
& { | ||
[K in Prelude]: K extends '@import' | ||
? string | string[] | ||
: K extends '@font-face' | ||
? CSSUtil.Native.AtRule.FontFace | CSSUtil.Native.AtRule.FontFace[] | ||
: K extends `@keyframes ${string}` | ||
? { | ||
[KeyFrame in string]: CSSUtil.CSS<Media, Theme, ThemeMap, Utils> | ||
} | ||
: K extends `@property ${string}` | ||
? CSSUtil.Native.AtRule.Property | ||
: CSSUtil.CSS<Media, Theme, ThemeMap, Utils> | ||
} | ||
)[] | ||
): { | ||
@@ -102,7 +105,5 @@ (): string | ||
& ( | ||
Argument0 extends {} | ||
? ThemeTokens<Argument0, Prefix> | ||
: Argument1 extends {} | ||
Argument0 extends string | ||
? ThemeTokens<Argument1, Prefix> | ||
: {} | ||
: ThemeTokens<Argument0, Prefix> | ||
) | ||
@@ -177,3 +178,3 @@ } | ||
) | ||
} & { | ||
} & CSS & { | ||
[K2 in keyof Composers[K]]: K2 extends 'compoundVariants' | 'defaultVariants' | 'variants' | ||
@@ -180,0 +181,0 @@ ? unknown |
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
509896
10154