react-emotion
Advanced tools
Comparing version 9.2.12 to 10.0.0-beta.0
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("prop-types"),require("react")):"function"==typeof define&&define.amd?define(["exports","prop-types","react"],t):t(e.reactEmotion={},null,e.React)}(this,function(e,t,r){"use strict";function A(e){function E(e,t,r){var a=t.trim().split(u),i=(t=a).length,n=e.length;switch(n){case 0:case 1:var o=0;for(e=0===n?"":e[0]+" ";o<i;++o)t[o]=l(e,t[o],r).trim();break;default:var s=o=0;for(t=[];o<i;++o)for(var c=0;c<n;++c)t[s++]=l(e[c]+" ",a[o],r).trim()}return t}function l(e,t,r){var a=t.charCodeAt(0);switch(a<33&&(a=(t=t.trim()).charCodeAt(0)),a){case 38:return t.replace(i,"$1"+e.trim());case 58:return e.trim()+t.replace(i,"$1"+e.trim());default:if(0<1*r&&0<t.indexOf("\f"))return t.replace(i,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function R(e,t,r,a){var i=e+";",n=2*t+3*r+4*a;if(944===n){e=i.indexOf(":",9)+1;var o=i.substring(e,i.length-1).trim();return o=i.substring(0,e).trim()+o+";",1===U||2===U&&T(o,1)?"-webkit-"+o+o:o}if(0===U||2===U&&!T(i,1))return i;switch(n){case 1015:return 97===i.charCodeAt(10)?"-webkit-"+i+i:i;case 951:return 116===i.charCodeAt(3)?"-webkit-"+i+i:i;case 963:return 110===i.charCodeAt(5)?"-webkit-"+i+i:i;case 1009:if(100!==i.charCodeAt(4))break;case 969:case 942:return"-webkit-"+i+i;case 978:return"-webkit-"+i+"-moz-"+i+i;case 1019:case 983:return"-webkit-"+i+"-moz-"+i+"-ms-"+i+i;case 883:if(45===i.charCodeAt(8))return"-webkit-"+i+i;if(0<i.indexOf("image-set(",11))return i.replace(m,"$1-webkit-$2")+i;break;case 932:if(45===i.charCodeAt(4))switch(i.charCodeAt(5)){case 103:return"-webkit-box-"+i.replace("-grow","")+"-webkit-"+i+"-ms-"+i.replace("grow","positive")+i;case 115:return"-webkit-"+i+"-ms-"+i.replace("shrink","negative")+i;case 98:return"-webkit-"+i+"-ms-"+i.replace("basis","preferred-size")+i}return"-webkit-"+i+"-ms-"+i+i;case 964:return"-webkit-"+i+"-ms-flex-"+i+i;case 1023:if(99!==i.charCodeAt(8))break;return"-webkit-box-pack"+(o=i.substring(i.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+i+"-ms-flex-pack"+o+i;case 1005:return c.test(i)?i.replace(s,":-webkit-")+i.replace(s,":-moz-")+i:i;case 1e3:switch(t=(o=i.substring(13).trim()).indexOf("-")+1,o.charCodeAt(0)+o.charCodeAt(t)){case 226:o=i.replace(h,"tb");break;case 232:o=i.replace(h,"tb-rl");break;case 220:o=i.replace(h,"lr");break;default:return i}return"-webkit-"+i+"-ms-"+o+i;case 1017:if(-1===i.indexOf("sticky",9))break;case 975:switch(t=(i=e).length-10,n=(o=(33===i.charCodeAt(t)?i.substring(0,t):i).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|o.charCodeAt(7))){case 203:if(o.charCodeAt(8)<111)break;case 115:i=i.replace(o,"-webkit-"+o)+";"+i;break;case 207:case 102:i=i.replace(o,"-webkit-"+(102<n?"inline-":"")+"box")+";"+i.replace(o,"-webkit-"+o)+";"+i.replace(o,"-ms-"+o+"box")+";"+i}return i+";";case 938:if(45===i.charCodeAt(5))switch(i.charCodeAt(6)){case 105:return o=i.replace("-items",""),"-webkit-"+i+"-webkit-box-"+o+"-ms-flex-"+o+i;case 115:return"-webkit-"+i+"-ms-flex-item-"+i.replace(p,"")+i;default:return"-webkit-"+i+"-ms-flex-line-pack"+i.replace("align-content","").replace(p,"")+i}break;case 973:case 989:if(45!==i.charCodeAt(3)||122===i.charCodeAt(4))break;case 931:case 953:if(!0===g.test(e))return 115===(o=e.substring(e.indexOf(":")+1)).charCodeAt(0)?R(e.replace("stretch","fill-available"),t,r,a).replace(":fill-available",":stretch"):i.replace(o,"-webkit-"+o)+i.replace(o,"-moz-"+o.replace("fill-",""))+i;break;case 962:if(i="-webkit-"+i+(102===i.charCodeAt(5)?"-ms-"+i:"")+i,211===r+a&&105===i.charCodeAt(13)&&0<i.indexOf("transform",10))return i.substring(0,i.indexOf(";",27)+1).replace(d,"$1-webkit-$2")+i}return i}function T(e,t){var r=e.indexOf(1===t?":":"{"),a=e.substring(0,3!==t?r:10);return r=e.substring(r+1,e.length-1),o(2!==t?a:a.replace(n,"$1"),r,t)}function P(e,t){var r=R(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return r!==t+";"?r.replace(a," or ($1)").substring(4):"("+t+")"}function j(e,t,r,a,i,n,o,s,c,l){for(var d,u=0,h=t;u<G;++u)switch(d=b[u].call(f,e,h,r,a,i,n,o,s,c,l)){case void 0:case!1:case!0:case null:break;default:h=d}if(h!==t)return h}function t(e){return void 0!==(e=e.prefix)&&(o=null,e?"function"!=typeof e?U=1:(U=2,o=e):U=0),t}function f(e,t){var r=e;if(r.charCodeAt(0)<33&&(r=r.trim()),r=[r],0<G){var a=j(-1,t,r,r,H,F,0,0,0,0);void 0!==a&&"string"==typeof a&&(t=a)}var i=function e(t,r,a,i,n){for(var o,s,c,l,d,u=0,h=0,f=0,p=0,g=0,m=0,b=c=o=0,k=0,v=0,y=0,w=0,x=a.length,A=x-1,C="",_="",S="",O="";k<x;){if(s=a.charCodeAt(k),k===A&&0!==h+p+f+u&&(0!==h&&(s=47===h?10:47),p=f=u=0,x++,A++),0===h+p+f+u){if(k===A&&(0<v&&(C=C.replace(M,"")),0<C.trim().length)){switch(s){case 32:case 9:case 59:case 13:case 10:break;default:C+=a.charAt(k)}s=59}switch(s){case 123:for(o=(C=C.trim()).charCodeAt(0),c=1,w=++k;k<x;){switch(s=a.charCodeAt(k)){case 123:c++;break;case 125:c--;break;case 47:switch(s=a.charCodeAt(k+1)){case 42:case 47:e:{for(b=k+1;b<A;++b)switch(a.charCodeAt(b)){case 47:if(42===s&&42===a.charCodeAt(b-1)&&k+2!==b){k=b+1;break e}break;case 10:if(47===s){k=b+1;break e}}k=b}}break;case 91:s++;case 40:s++;case 34:case 39:for(;k++<A&&a.charCodeAt(k)!==s;);}if(0===c)break;k++}switch(c=a.substring(w,k),0===o&&(o=(C=C.replace(z,"").trim()).charCodeAt(0)),o){case 64:switch(0<v&&(C=C.replace(M,"")),s=C.charCodeAt(1)){case 100:case 109:case 115:case 45:v=r;break;default:v=D}if(w=(c=e(r,v,c,s,n+1)).length,0<G&&(d=j(3,c,v=E(D,C,y),r,H,F,w,s,n,i),C=v.join(""),void 0!==d&&0===(w=(c=d.trim()).length)&&(s=0,c="")),0<w)switch(s){case 115:C=C.replace($,P);case 100:case 109:case 45:c=C+"{"+c+"}";break;case 107:c=(C=C.replace(N,"$1 $2"))+"{"+c+"}",c=1===U||2===U&&T("@"+c,3)?"@-webkit-"+c+"@"+c:"@"+c;break;default:c=C+c,112===i&&(_+=c,c="")}else c="";break;default:c=e(r,E(r,C,y),c,i,n+1)}S+=c,c=y=v=b=o=0,C="",s=a.charCodeAt(++k);break;case 125:case 59:if(1<(w=(C=(0<v?C.replace(M,""):C).trim()).length))switch(0===b&&(o=C.charCodeAt(0),45===o||96<o&&o<123)&&(w=(C=C.replace(" ",":")).length),0<G&&void 0!==(d=j(1,C,r,t,H,F,_.length,i,n,i))&&0===(w=(C=d.trim()).length)&&(C="\0\0"),o=C.charCodeAt(0),s=C.charCodeAt(1),o){case 0:break;case 64:if(105===s||99===s){O+=C+a.charAt(k);break}default:58!==C.charCodeAt(w-1)&&(_+=R(C,o,s,C.charCodeAt(2)))}y=v=b=o=0,C="",s=a.charCodeAt(++k)}}switch(s){case 13:case 10:47===h?h=0:0===1+o&&107!==i&&0<C.length&&(v=1,C+="\0"),0<G*q&&j(0,C,r,t,H,F,_.length,i,n,i),F=1,H++;break;case 59:case 125:if(0===h+p+f+u){F++;break}default:switch(F++,l=a.charAt(k),s){case 9:case 32:if(0===p+u+h)switch(g){case 44:case 58:case 9:case 32:l="";break;default:32!==s&&(l=" ")}break;case 0:l="\\0";break;case 12:l="\\f";break;case 11:l="\\v";break;case 38:0===p+h+u&&(v=y=1,l="\f"+l);break;case 108:if(0===p+h+u+W&&0<b)switch(k-b){case 2:112===g&&58===a.charCodeAt(k-3)&&(W=g);case 8:111===m&&(W=m)}break;case 58:0===p+h+u&&(b=k);break;case 44:0===h+f+p+u&&(v=1,l+="\r");break;case 34:case 39:0===h&&(p=p===s?0:0===p?s:p);break;case 91:0===p+h+f&&u++;break;case 93:0===p+h+f&&u--;break;case 41:0===p+h+u&&f--;break;case 40:if(0===p+h+u){if(0===o)switch(2*g+3*m){case 533:break;default:o=1}f++}break;case 64:0===h+f+p+u+b+c&&(c=1);break;case 42:case 47:if(!(0<p+u+f))switch(h){case 0:switch(2*s+3*a.charCodeAt(k+1)){case 235:h=47;break;case 220:w=k,h=42}break;case 42:47===s&&42===g&&w+2!==k&&(33===a.charCodeAt(w+2)&&(_+=a.substring(w,k+1)),l="",h=0)}}0===h&&(C+=l)}m=g,g=s,k++}if(0<(w=_.length)){if(v=r,0<G&&void 0!==(d=j(2,_,v,t,H,F,w,i,n,i))&&0===(_=d).length)return O+_+S;if(_=v.join(",")+"{"+_+"}",0!=U*W){switch(2!==U||T(_,2)||(W=0),W){case 111:_=_.replace(L,":-moz-$1")+_;break;case 112:_=_.replace(I,"::-webkit-input-$1")+_.replace(I,"::-moz-$1")+_.replace(I,":-ms-input-$1")+_}W=0}}return O+_+S}(D,r,t,0,0);return 0<G&&(void 0!==(a=j(-2,i,r,r,H,F,i.length,0,0,0))&&(i=a)),"",W=0,F=H=1,i}var z=/^\0+/g,M=/[\0\r\f]/g,s=/: */g,c=/zoo|gra/,d=/([,: ])(transform)/g,u=/,\r+?/g,i=/([\t\r\n ])*\f?&/g,N=/@(k\w+)\s*(\S*)\s*/,I=/::(place)/g,L=/:(read-only)/g,h=/[svh]\w+-[tblr]{2}/,$=/\(\s*(.*)\s*\)/g,a=/([\s\S]*?);/g,p=/-self|flex-/g,n=/[^]*?(:[rp][el]a[\w-]+)[^]*/,g=/stretch|:\s*\w+\-(?:conte|avail)/,m=/([^-])(image-set\()/,F=1,H=1,W=0,U=1,D=[],b=[],G=0,o=null,q=0;return f.use=function e(t){switch(t){case void 0:case null:G=b.length=0;break;default:switch(t.constructor){case Array:for(var r=0,a=t.length;r<a;++r)e(t[r]);break;case Function:b[G++]=t;break;case Boolean:q=0|!!t}}return e},f.set=t,void 0!==e&&t(e),f}t=t&&t.hasOwnProperty("default")?t.default:t,r=r&&r.hasOwnProperty("default")?r.default:r;var a,C=(function(e,t){e.exports=function(d){var u="/*|*/";function h(e){if(e)try{d(e+"}")}catch(e){}}return function(e,t,r,a,i,n,o,s,c,l){switch(e){case 1:if(0===c&&64===t.charCodeAt(0))return d(t+";"),"";break;case 2:if(0===s)return t+u;break;case 3:switch(s){case 102:case 112:return d(r[0]+t),"";default:return t+(0===l?u:"")}case-2:t.split("/*|*/}").forEach(h)}}}}(a={exports:{}},a.exports),a.exports);function i(t){var r={};return function(e){return void 0===r[e]&&(r[e]=t(e)),r[e]}}var n={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=/[A-Z]|^ms/g,_=i(function(e){return e.replace(o,"-$&").toLowerCase()}),S=function(e,t){return null==t||"boolean"==typeof t?"":1===n[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:t+"px"},O="undefined"!=typeof document;function s(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),(void 0!==e.container?e.container:document.head).appendChild(t),t}var E=function(){function e(e){this.isSpeedy=!0,this.tags=[],this.ctr=0,this.opts=e}var t=e.prototype;return t.inject=function(){if(this.injected)throw new Error("already injected!");this.tags[0]=s(this.opts),this.injected=!0},t.speedy=function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e},t.insert=function(e,t){if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(this.tags[this.tags.length-1]);try{r.insertRule(e,r.cssRules.length)}catch(e){}}else{var a=s(this.opts);this.tags.push(a),a.appendChild(document.createTextNode(e+(t||"")))}this.ctr++,this.ctr%65e3==0&&this.tags.push(s(this.opts))},t.flush=function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0,this.injected=!1},e}();var c=function(e,t){if(void 0!==e.__SECRET_EMOTION__)return e.__SECRET_EMOTION__;void 0===t&&(t={});var r,a,i=t.key||"css",n=C(function(e){r+=e,O&&s.insert(e,l)});void 0!==t.prefix&&(a={prefix:t.prefix});var o={registered:{},inserted:{},nonce:t.nonce,key:i},s=new E(t);O&&s.inject();var c=new A(a);c.use(t.stylisPlugins)(n);var l="";function d(e,t){if(null==e)return"";switch(typeof e){case"boolean":return"";case"function":if(void 0!==e.__emotion_styles){var r=e.toString();return r}return d.call(this,void 0===this?e():e(this.mergedProps,this.context),t);case"object":return function(e){if(f.has(e))return f.get(e);var r="";return Array.isArray(e)?e.forEach(function(e){r+=d.call(this,e,!1)},this):Object.keys(e).forEach(function(t){"object"!=typeof e[t]?void 0!==o.registered[e[t]]?r+=t+"{"+o.registered[e[t]]+"}":r+=_(t)+":"+S(t,e[t])+";":Array.isArray(e[t])&&"string"==typeof e[t][0]&&void 0===o.registered[e[t][0]]?e[t].forEach(function(e){r+=_(t)+":"+S(t,e)+";"}):r+=t+"{"+d.call(this,e[t],!1)+"}"},this),f.set(e,r),r}.call(this,e);default:var a=o.registered[e];return!1===t&&void 0!==a?a:e}}var u,h,f=new WeakMap,p=/label:\s*([^\s;\n{]+)\s*;/g,g=function(r){var e,a=!0,i="",n="";null==r||void 0===r.raw?i+=d.call(this,r,a=!1):i+=r[0];for(var t=arguments.length,o=new Array(1<t?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];return o.forEach(function(e,t){i+=d.call(this,e,46===i.charCodeAt(i.length-1)),!0===a&&void 0!==r[t+1]&&(i+=r[t+1])},this),i=(h=i).replace(p,function(e,t){return n+="-"+t,""}),u=function(e){for(var t,r=e.length,a=r^r,i=0;4<=r;)t=1540483477*(65535&(t=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+((1540483477*(t>>>16)&65535)<<16),a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),r-=4,++i;switch(r){case 3:a^=(255&e.charCodeAt(i+2))<<16;case 2:a^=(255&e.charCodeAt(i+1))<<8;case 1:a=1540483477*(65535&(a^=255&e.charCodeAt(i)))+((1540483477*(a>>>16)&65535)<<16)}return a=1540483477*(65535&(a^=a>>>13))+((1540483477*(a>>>16)&65535)<<16),((a^=a>>>15)>>>0).toString(36)}(i+(e=n))+e,i};function m(e,t){void 0===o.inserted[u]&&(r="",c(e,t),o.inserted[u]=r)}var b=function(){var e=g.apply(this,arguments),t=i+"-"+u;return void 0===o.registered[t]&&(o.registered[t]=h),m("."+t,e),t};function k(t,e){var r="";return e.split(" ").forEach(function(e){void 0!==o.registered[e]?t.push(e):r+=e+" "}),r}function v(e,t){var r=[],a=k(r,e);return r.length<2?e:a+b(r,t)}function y(e){o.inserted[e]=!0}if(O){var w=document.querySelectorAll("[data-emotion-"+i+"]");Array.prototype.forEach.call(w,function(e){s.tags[0].parentNode.insertBefore(e,s.tags[0]),e.getAttribute("data-emotion-"+i).split(" ").forEach(y)})}var x={flush:function(){O&&(s.flush(),s.inject()),o.inserted={},o.registered={}},hydrate:function(e){e.forEach(y)},cx:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return v(function e(t){for(var r=t.length,a=0,i="";a<r;a++){var n=t[a];if(null!=n){var o=void 0;switch(typeof n){case"boolean":break;case"function":o=e([n()]);break;case"object":if(Array.isArray(n))o=e(n);else for(var s in o="",n)n[s]&&s&&(o&&(o+=" "),o+=s);break;default:o=n}o&&(i&&(i+=" "),i+=o)}}return i}(t))},merge:v,getRegisteredStyles:k,injectGlobal:function(){m("",g.apply(this,arguments))},keyframes:function(){var e=g.apply(this,arguments),t="animation-"+u;return m("","@keyframes "+t+"{"+e+"}"),t},css:b,sheet:s,caches:o};return e.__SECRET_EMOTION__=x}("undefined"!=typeof global?global:{}),l=c.flush,d=c.hydrate,u=c.cx,h=c.merge,f=c.getRegisteredStyles,p=c.injectGlobal,g=c.keyframes,m=c.css,b=c.sheet,k=c.caches,v=Object.freeze({flush:l,hydrate:d,cx:u,merge:h,getRegisteredStyles:f,injectGlobal:p,keyframes:g,css:m,sheet:b,caches:k});var y,w="__EMOTION_THEMING__",x=((y={})[w]=t.object,y),R=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|default|defer|dir|disabled|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|itemProp|itemScope|itemType|itemID|itemRef|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class)|(on[A-Z].*)|((data|aria|x)-.*))$/i;var T=i(R.test.bind(R)),P=function(e){return"theme"!==e&&"innerRef"!==e},j=function(){return!0},z=function(e,t){for(var r=2,a=arguments.length;r<a;r++){var i=arguments[r],n=void 0;for(n in i)e(n)&&(t[n]=i[n])}return t};var M,N,I,L=(M=v,N=r,I=function(i,o){var s,c,l,d;void 0!==o&&(s=o.e,c=o.label,l=o.target,d=i.__emotion_forwardProp&&o.shouldForwardProp?function(e){return i.__emotion_forwardProp(e)&&o.shouldForwardProp(e)}:o.shouldForwardProp);var u=i.__emotion_real===i,h=void 0===s&&u&&i.__emotion_base||i;return"function"!=typeof d&&(d="string"==typeof h&&h.charAt(0)===h.charAt(0).toLowerCase()?T:P),function(){var e=arguments,n=u&&void 0!==i.__emotion_styles?i.__emotion_styles.slice(0):[];if(void 0!==c&&n.push("label:"+c+";"),void 0===s)if(null==e[0]||void 0===e[0].raw)n.push.apply(n,e);else{n.push(e[0][0]);for(var t=e.length,r=1;r<t;r++)n.push(e[r],e[0][r])}var a=function(e){var t,r;function a(){return e.apply(this,arguments)||this}r=e,(t=a).prototype=Object.create(r.prototype),(t.prototype.constructor=t).__proto__=r;var i=a.prototype;return i.componentWillMount=function(){void 0!==this.context[w]&&(this.unsubscribe=this.context[w].subscribe(function(e){this.setState({theme:e})}.bind(this)))},i.componentWillUnmount=function(){void 0!==this.unsubscribe&&this.context[w].unsubscribe(this.unsubscribe)},i.render=function(){var e=this.props,t=this.state;this.mergedProps=z(j,{},e,{theme:null!==t&&t.theme||e.theme||{}});var r="",a=[];return e.className&&(r+=void 0===s?M.getRegisteredStyles(a,e.className):e.className+" "),r+=void 0===s?M.css.apply(this,n.concat(a)):s,void 0!==l&&(r+=" "+l),N.createElement(h,z(d,{},e,{className:r,ref:e.innerRef}))},a}(N.Component);return a.displayName=void 0!==c?c:"Styled("+("string"==typeof h?h:h.displayName||h.name||"Component")+")",void 0!==i.defaultProps&&(a.defaultProps=i.defaultProps),a.contextTypes=x,a.__emotion_styles=n,a.__emotion_base=h,(a.__emotion_real=a).__emotion_forwardProp=d,Object.defineProperty(a,"toString",{value:function(){return"."+l}}),a.withComponent=function(e,t){return I(e,void 0!==t?z(j,{},o,t):o).apply(void 0,n)},a}});e.default=L,e.flush=l,e.hydrate=d,e.cx=u,e.merge=h,e.getRegisteredStyles=f,e.injectGlobal=p,e.keyframes=g,e.css=m,e.sheet=b,e.caches=k,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react"),require("@emotion/core")):"function"==typeof define&&define.amd?define(["react","@emotion/core"],t):e.reactEmotion=t(e.React,e.emotionCore)}(this,function(k,c){"use strict";function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function e(t){var r={};return function(e){return void 0===r[e]&&(r[e]=t(e)),r[e]}}var t=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|default|defer|dir|disabled|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|itemProp|itemScope|itemType|itemID|itemRef|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(on[A-Z].*)|((data|aria|x)-.*))$/,r=e(t.test.bind(t)),n=function(e){return"theme"!==e&&"innerRef"!==e};var o={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},i=/[A-Z]|^ms/g,a=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=e(function(e){return e.replace(i,"-$&").toLowerCase()}),u=function(e,t){if(null==t||"boolean"==typeof t)return"";switch(e){case"animation":case"animationName":t=t.replace(a,function(e,t,r){return w={name:t,styles:r,next:w},t})}return 1!==o[e]&&45!==e.charCodeAt(1)&&"number"==typeof t&&0!==t?t+"px":t};function b(e,t,r,n){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return w={name:r.name,styles:r.styles,next:w},r.name;if(void 0!==r.styles){var o=r.next;if(void 0!==o)for(;void 0!==o;)w={name:o.name,styles:o.styles,next:w},o=o.next;return r.styles}return function(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=b(e,t,r[o],!1);else for(var i in r){var a=r[i];if("object"!=typeof a)void 0!==t[a]?n+=i+"{"+t[a]+"}":n+=l(i)+":"+u(i,a)+";";else if(Array.isArray(a)&&"string"==typeof a[0]&&void 0===t[a[0]])for(var s=0;s<a.length;s++)n+=l(i)+":"+u(i,a[s])+";";else n+=i+"{"+b(e,t,a,!1)+"}"}return n}(e,t,r);case"function":if(void 0!==e)return b(e,t,r(e),n);default:var i=t[r];return void 0===i||n?r:i}}var w,C=/label:\s*([^\s;\n{]+)\s*;/g,_="";return function o(i,a){var s,g,y;void 0!==a&&(s=a.label,y=a.target,g=i.__emotion_forwardProp&&a.shouldForwardProp?function(e){return i.__emotion_forwardProp(e)&&a.shouldForwardProp(e)}:a.shouldForwardProp);var l=i.__emotion_real===i,v=l&&i.__emotion_base||i,x="string"==typeof v;return"function"!=typeof g&&(g=x&&96<v.charCodeAt(0)?r:n),function(){var e=arguments,h=l&&void 0!==i.__emotion_styles?i.__emotion_styles.slice(0):[];if(void 0!==s&&1===e.length&&0===h.length&&void 0!==e[0].styles)h.push({name:e[0].name,label:s,styles:e[0].styles,map:e[0].map});else if(void 0!==s&&h.push("label:"+s+";"),null==e[0]||void 0===e[0].raw)h.push.apply(h,e);else{h.push(e[0][0]);for(var t=e.length,r=1;r<t;r++)h.push(e[r],e[0][r])}var n=c.withEmotionCache(function(p,f,m){return k.createElement(c.ThemeContext.Consumer,null,function(e){var t,r,n,o,i="",a=[],s=p;if(null==p.theme){for(var l in s={},p)s[l]=p[l];s.theme=e}"string"==typeof p.className&&(i+=(t=f.registered,r=a,n=p.className,o="",n.split(" ").forEach(function(e){void 0!==t[e]?r.push(t[e]):o+=e+" "}),o));var c=function(e,t,r){if(1===t.length&&"object"==typeof t[0]&&null!==t[0]&&void 0!==t[0].styles)return t[0];var n=!0;_="",w=void 0;var o=t[0];if(null==o||void 0===o.raw){var i=b(r,e,o,n=!1);_+=i}else _+=o[0];for(var a=1;a<t.length;a++){var s=b(r,e,t[a],46===_.charCodeAt(_.length-1));_+=s,n&&(_+=o[a])}C.lastIndex=0;for(var l,c="";null!==(l=C.exec(_));)c+="-"+l[1];return{name:function(e){for(var t,r=e.length,n=r^r,o=0;4<=r;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),n=1540483477*(65535&n)+((1540483477*(n>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),r-=4,++o;switch(r){case 3:n^=(255&e.charCodeAt(o+2))<<16;case 2:n^=(255&e.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(o)))+((1540483477*(n>>>16)&65535)<<16)}return n=1540483477*(65535&(n^=n>>>13))+((1540483477*(n>>>16)&65535)<<16),((n^=n>>>15)>>>0).toString(36)}(_)+c,styles:_,next:w}}(f.registered,h.concat(a),s);!function(e,t,r){var n=e.key+"-"+t.name;if(!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles),void 0===e.inserted[t.name]){var o=t;do{var i=e.stylis("."+n,o.styles);e.inserted[o.name]=!0,i.forEach(e.sheet.insert,e.sheet),o=o.next}while(void 0!==o)}}(f,c,x),i+=f.key+"-"+c.name,void 0!==y&&(i+=" "+y);var d={};for(var u in p)g(u)&&(d[u]=p[u]);return d.className=i,d.ref=m||p.innerRef,k.createElement(v,d)})});return n.displayName=void 0!==s?s:"Styled("+("string"==typeof v?v:v.displayName||v.name||"Component")+")",n.defaultProps=i.defaultProps,(n.__emotion_real=n).__emotion_base=v,n.__emotion_styles=h,n.__emotion_forwardProp=g,Object.defineProperty(n,"toString",{value:function(){return"."+y}}),n.withComponent=function(e,t){return o(e,void 0!==t?d({},a||{},t):a).apply(void 0,h)},n}}}); | ||
//# sourceMappingURL=emotion.umd.min.js.map |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var React = _interopDefault(require('react')); | ||
var emotion = require('emotion'); | ||
var createEmotionStyled = _interopDefault(require('create-emotion-styled')); | ||
var index = createEmotionStyled(emotion, React); | ||
Object.keys(emotion).forEach(function (key) { exports[key] = emotion[key]; }); | ||
exports.default = index; | ||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./index.cjs.prod.js'); | ||
} else { | ||
module.exports = require('./index.cjs.dev.js'); | ||
} |
@@ -1,8 +0,1 @@ | ||
import React from 'react'; | ||
import * as emotion from 'emotion'; | ||
export * from 'emotion'; | ||
import createEmotionStyled from 'create-emotion-styled'; | ||
var index = createEmotionStyled(emotion, React); | ||
export default index; | ||
export { default } from '@emotion/styled-base'; |
@@ -1,1 +0,4 @@ | ||
module.exports = require('babel-plugin-emotion').macros.styled | ||
module.exports = require('babel-plugin-emotion').macros.createStyledMacro({ | ||
importPath: '@emotion/styled-base', | ||
isWeb: true | ||
}) |
{ | ||
"name": "react-emotion", | ||
"version": "9.2.12", | ||
"version": "10.0.0-beta.0", | ||
"description": "The Next Generation of CSS-in-JS, for React projects.", | ||
@@ -18,13 +18,12 @@ "main": "dist/index.cjs.js", | ||
"dependencies": { | ||
"babel-plugin-emotion": "^9.2.11", | ||
"create-emotion-styled": "^9.2.8" | ||
"@emotion/styled-base": "^10.0.0-beta.0", | ||
"babel-plugin-emotion": "^10.0.0-beta.0" | ||
}, | ||
"peerDependencies": { | ||
"emotion": "^9.1.3", | ||
"react": "15.x || 16.x" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "16.0.16", | ||
"@types/react": "16.3.18", | ||
"dtslint": "^0.3.0", | ||
"emotion": "^9.2.12" | ||
"emotion": "^10.0.0-beta.0" | ||
}, | ||
@@ -46,3 +45,9 @@ "author": "Kye Hohenberger", | ||
"umd:main": "./dist/emotion.umd.min.js", | ||
"gitHead": "7c582301317cd9c0038a13a118456e798ffcadf8" | ||
"publishConfig": { | ||
"tag": "next" | ||
}, | ||
"browser": { | ||
"./dist/index.cjs.js": "./dist/index.browser.cjs.js", | ||
"./dist/index.esm.js": "./dist/index.browser.esm.js" | ||
} | ||
} |
// @flow | ||
import React from 'react' | ||
import * as emotion from 'emotion' | ||
import createEmotionStyled from 'create-emotion-styled' | ||
export default createEmotionStyled(emotion, React) | ||
export * from 'emotion' | ||
export { default } from '@emotion/styled-base' |
// Definitions by: Junyoung Clare Jang <https://github.com/Ailrun> | ||
// TypeScript Version: 2.3 | ||
// TypeScript Version: 2.8 | ||
import { | ||
CreateStyled, | ||
Interpolation, | ||
StyledComponent, | ||
StyledOptions, | ||
Themed, | ||
} from 'create-emotion-styled'; | ||
import styled from '@emotion/styled-base' | ||
export * from 'emotion'; | ||
export type ThemedReactEmotionInterface<Theme extends object> = CreateStyled<Theme>; | ||
export { | ||
CreateStyled, | ||
CreateStyledComponentBase, | ||
CreateStyledComponentExtrinsic, | ||
CreateStyledComponentIntrinsic, | ||
Interpolation, | ||
StyledComponent, | ||
StyledOptions, | ||
Themed, | ||
}; | ||
WithTheme | ||
} from '@emotion/styled-base' | ||
declare const styled: CreateStyled; | ||
export default styled; | ||
export default styled |
{ | ||
"extends": "dtslint/dtslint.json", | ||
"rules": { | ||
"no-relative-import-in-test": false | ||
"array-type": [true, "generic"], | ||
"semicolon": false, | ||
"whitespace": [ | ||
true, | ||
"check-branch", | ||
"check-decl", | ||
"check-operator", | ||
"check-module", | ||
"check-rest-spread", | ||
"check-type", | ||
"check-typecast", | ||
"check-type-operator", | ||
"check-preblock" | ||
] | ||
} | ||
} |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
3
17
47917
260
2
2
+ Added@emotion/cache@10.0.29(transitive)
+ Added@emotion/core@10.3.1(transitive)
+ Added@emotion/css@10.0.27(transitive)
+ Added@emotion/hash@0.8.0(transitive)
+ Added@emotion/is-prop-valid@0.8.8(transitive)
+ Added@emotion/memoize@0.7.4(transitive)
+ Added@emotion/serialize@0.11.16(transitive)
+ Added@emotion/sheet@0.9.4(transitive)
+ Added@emotion/styled-base@10.3.0(transitive)
+ Added@emotion/stylis@0.8.5(transitive)
+ Added@emotion/unitless@0.7.5(transitive)
+ Added@emotion/utils@0.11.3(transitive)
+ Added@emotion/weak-memoize@0.2.5(transitive)
+ Addedbabel-plugin-emotion@10.2.2(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
- Removedcreate-emotion-styled@^9.2.8
- Removed@emotion/babel-utils@0.6.10(transitive)
- Removed@emotion/hash@0.6.6(transitive)
- Removed@emotion/is-prop-valid@0.6.8(transitive)
- Removed@emotion/memoize@0.6.6(transitive)
- Removed@emotion/serialize@0.9.1(transitive)
- Removed@emotion/stylis@0.7.1(transitive)
- Removed@emotion/unitless@0.6.7(transitive)
- Removed@emotion/utils@0.8.2(transitive)
- Removedabbrev@1.1.1(transitive)
- Removedbabel-plugin-emotion@9.2.11(transitive)
- Removedcreate-emotion@9.2.12(transitive)
- Removedcreate-emotion-styled@9.2.8(transitive)
- Removedemotion@9.2.12(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removednopt@1.0.10(transitive)
- Removedsource-map@0.7.4(transitive)
- Removedstylis@3.5.4(transitive)
- Removedstylis-rule-sheet@0.0.10(transitive)
- Removedtouch@2.0.2(transitive)