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

create-emotion-styled

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-emotion-styled - npm Package Compare versions

Comparing version 9.2.3 to 9.2.5

dist/index.esm.js

2

dist/emotion.umd.min.js

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("prop-types")):"function"==typeof define&&define.amd?define(["prop-types"],t):e["create-emotion-styled"]=t(e.PropTypes)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t,r="__EMOTION_THEMING__",v=((t={})[r]=e.object,t);var o,n;var i=(o=RegExp.prototype.test.bind(/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|accept|acceptCharset|accessKey|action|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|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)|(on[A-Z].*)|((data|aria)-.*))$/),n={},function(e){return void 0===n[e]&&(n[e]=o(e)),n[e]}),k=function(e){return"theme"!==e&&"innerRef"!==e},b=function(){return!0},x=function(e,t){for(var r=2,o=arguments.length;r<o;r++){var n=arguments[r],i=void 0;for(i in n)e(i)&&(t[i]=n[i])}return t};function _(){void 0!==this.context[r]&&(this.unsubscribe=this.context[r].subscribe(function(e){this.setState({theme:e})}.bind(this)))}function S(){void 0!==this.unsubscribe&&this.context[r].unsubscribe(this.unsubscribe)}return function(h,g){var y=function(a,s){var l,c,p,d;void 0!==s&&(l=s.e,c=s.label,p=s.target,d=a.__emotion_forwardProp&&s.shouldForwardProp?function(e){return a.__emotion_forwardProp(e)&&s.shouldForwardProp(e)}:s.shouldForwardProp);var u=a.__emotion_real===a,m=void 0===l&&u&&a.__emotion_base||a;function f(){return"."+p}return"function"!=typeof d&&(d="string"==typeof m&&m.charAt(0)===m.charAt(0).toLowerCase()?i:k),function(){var e=arguments,n=u&&void 0!==a.__emotion_styles?a.__emotion_styles.slice(0):[];if(void 0!==c&&n.push("label:"+c+";"),void 0===l)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])}function i(){var e=this.props,t=this.state;this.mergedProps=x(b,{},e,{theme:null!==t&&t.theme||e.theme||{}});var r="",o=[];return e.className&&(r+=void 0===l?h.getRegisteredStyles(o,e.className):e.className+" "),r+=void 0===l?h.css.apply(this,n.concat(o)):l,void 0!==p&&(r+=" "+p),g.createElement(m,x(d,{},e,{className:r,ref:e.innerRef}))}var o=function(e){var t,r;function o(){return e.apply(this,arguments)||this}r=e,(t=o).prototype=Object.create(r.prototype),(t.prototype.constructor=t).__proto__=r;var n=o.prototype;return n.componentWillMount=_,n.componentWillUnmount=S,n.render=i,o}(g.Component);return o.displayName=void 0!==c?c:"Styled("+("string"==typeof m?m:m.displayName||m.name||"Component")+")",void 0!==a.defaultProps&&(o.defaultProps=a.defaultProps),o.contextTypes=v,o.__emotion_styles=n,o.__emotion_base=m,(o.__emotion_real=o).__emotion_forwardProp=d,Object.defineProperty(o,"toString",{enumerable:!1,value:f}),o.withComponent=function(e,t){return y(e,void 0!==t?x(b,{},s,t):s).apply(void 0,n)},o}};return y}});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("prop-types")):"function"==typeof define&&define.amd?define(["prop-types"],t):e.createEmotionStyled=t(null)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t,g="__EMOTION_THEMING__",y=((t={})[g]=e.object,t);var r,n;var i=(r=RegExp.prototype.test.bind(/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|accept|acceptCharset|accessKey|action|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|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)|(on[A-Z].*)|((data|aria)-.*))$/),n={},function(e){return void 0===n[e]&&(n[e]=r(e)),n[e]}),v=function(e){return"theme"!==e&&"innerRef"!==e},k=function(){return!0},b=function(e,t){for(var r=2,n=arguments.length;r<n;r++){var o=arguments[r],i=void 0;for(i in o)e(i)&&(t[i]=o[i])}return t};return function(m,f){var h=function(o,a){var s,l,c,p;void 0!==a&&(s=a.e,l=a.label,c=a.target,p=o.__emotion_forwardProp&&a.shouldForwardProp?function(e){return o.__emotion_forwardProp(e)&&a.shouldForwardProp(e)}:a.shouldForwardProp);var d=o.__emotion_real===o,u=void 0===s&&d&&o.__emotion_base||o;return"function"!=typeof p&&(p="string"==typeof u&&u.charAt(0)===u.charAt(0).toLowerCase()?i:v),function(){var e=arguments,i=d&&void 0!==o.__emotion_styles?o.__emotion_styles.slice(0):[];if(void 0!==l&&i.push("label:"+l+";"),void 0===s)if(null==e[0]||void 0===e[0].raw)i.push.apply(i,e);else{i.push(e[0][0]);for(var t=e.length,r=1;r<t;r++)i.push(e[r],e[0][r])}var n=function(e){var t,r;function n(){return e.apply(this,arguments)||this}r=e,(t=n).prototype=Object.create(r.prototype),(t.prototype.constructor=t).__proto__=r;var o=n.prototype;return o.componentWillMount=function(){void 0!==this.context[g]&&(this.unsubscribe=this.context[g].subscribe(function(e){this.setState({theme:e})}.bind(this)))},o.componentWillUnmount=function(){void 0!==this.unsubscribe&&this.context[g].unsubscribe(this.unsubscribe)},o.render=function(){var e=this.props,t=this.state;this.mergedProps=b(k,{},e,{theme:null!==t&&t.theme||e.theme||{}});var r="",n=[];return e.className&&(r+=void 0===s?m.getRegisteredStyles(n,e.className):e.className+" "),r+=void 0===s?m.css.apply(this,i.concat(n)):s,void 0!==c&&(r+=" "+c),f.createElement(u,b(p,{},e,{className:r,ref:e.innerRef}))},n}(f.Component);return n.displayName=void 0!==l?l:"Styled("+("string"==typeof u?u:u.displayName||u.name||"Component")+")",void 0!==o.defaultProps&&(n.defaultProps=o.defaultProps),n.contextTypes=y,n.__emotion_styles=i,n.__emotion_base=u,(n.__emotion_real=n).__emotion_forwardProp=p,Object.defineProperty(n,"toString",{enumerable:!1,value:function(){return"."+c}}),n.withComponent=function(e,t){return h(e,void 0!==t?b(k,{},a,t):a).apply(void 0,i)},n}};return h}});
//# sourceMappingURL=emotion.umd.min.js.map

@@ -52,32 +52,2 @@ 'use strict';

function _componentWillMount() {
if (this.context[channel] !== undefined) {
this.unsubscribe = this.context[channel].subscribe(setTheme.bind(this));
}
}
function _componentWillUnmount() {
if (this.unsubscribe !== undefined) {
this.context[channel].unsubscribe(this.unsubscribe);
}
}
function _get$1(target, property) {
switch (property) {
// react-hot-loader tries to access this stuff
case '__proto__':
case 'name':
case 'prototype':
case 'displayName':
{
return target[property];
}
default:
{
throw new Error("You're trying to use the styled shorthand without babel-plugin-emotion." + ("\nPlease install and setup babel-plugin-emotion or use the function call syntax(`styled('" + property + "')` instead of `styled." + property + "`)"));
}
}
}
function createEmotionStyled(emotion, view) {

@@ -96,7 +66,2 @@ var _createStyled = function createStyled(tag, options) {

function _ref(propName) {
return tag.__emotion_forwardProp(propName) && // $FlowFixMe
options.shouldForwardProp(propName);
}
if (options !== undefined) {

@@ -106,3 +71,6 @@ staticClassName = options.e;

stableClassName = options.target;
shouldForwardProp = tag.__emotion_forwardProp && options.shouldForwardProp ? _ref : options.shouldForwardProp;
shouldForwardProp = tag.__emotion_forwardProp && options.shouldForwardProp ? function (propName) {
return tag.__emotion_forwardProp(propName) && // $FlowFixMe
options.shouldForwardProp(propName);
} : options.shouldForwardProp;
}

@@ -117,11 +85,2 @@

function _value() {
if (process.env.NODE_ENV !== 'production' && stableClassName === undefined) {
return 'NO_COMPONENT_SELECTOR';
} // $FlowFixMe
return "." + stableClassName;
}
return function () {

@@ -149,36 +108,2 @@ var args = arguments;

function _render() {
var props = this.props,
state = this.state;
this.mergedProps = pickAssign(testAlwaysTrue, {}, props, {
theme: state !== null && state.theme || props.theme || {}
});
var className = '';
var classInterpolations = [];
if (props.className) {
if (staticClassName === undefined) {
className += emotion.getRegisteredStyles(classInterpolations, props.className);
} else {
className += props.className + " ";
}
}
if (staticClassName === undefined) {
className += emotion.css.apply(this, styles.concat(classInterpolations));
} else {
className += staticClassName;
}
if (stableClassName !== undefined) {
className += " " + stableClassName;
}
return view.createElement(baseTag, // $FlowFixMe
pickAssign(shouldForwardProp, {}, props, {
className: className,
ref: props.innerRef
}));
}
var Styled =

@@ -194,5 +119,49 @@ /*#__PURE__*/

var _proto = Styled.prototype;
_proto.componentWillMount = _componentWillMount;
_proto.componentWillUnmount = _componentWillUnmount;
_proto.render = _render;
_proto.componentWillMount = function componentWillMount() {
if (this.context[channel] !== undefined) {
this.unsubscribe = this.context[channel].subscribe(setTheme.bind(this));
}
};
_proto.componentWillUnmount = function componentWillUnmount() {
if (this.unsubscribe !== undefined) {
this.context[channel].unsubscribe(this.unsubscribe);
}
};
_proto.render = function render() {
var props = this.props,
state = this.state;
this.mergedProps = pickAssign(testAlwaysTrue, {}, props, {
theme: state !== null && state.theme || props.theme || {}
});
var className = '';
var classInterpolations = [];
if (props.className) {
if (staticClassName === undefined) {
className += emotion.getRegisteredStyles(classInterpolations, props.className);
} else {
className += props.className + " ";
}
}
if (staticClassName === undefined) {
className += emotion.css.apply(this, styles.concat(classInterpolations));
} else {
className += staticClassName;
}
if (stableClassName !== undefined) {
className += " " + stableClassName;
}
return view.createElement(baseTag, // $FlowFixMe
pickAssign(shouldForwardProp, {}, props, {
className: className,
ref: props.innerRef
}));
};
return Styled;

@@ -215,3 +184,10 @@ }(view.Component);

enumerable: false,
value: _value
value: function value() {
if (process.env.NODE_ENV !== 'production' && stableClassName === undefined) {
return 'NO_COMPONENT_SELECTOR';
} // $FlowFixMe
return "." + stableClassName;
}
});

@@ -230,3 +206,19 @@

_createStyled = new Proxy(_createStyled, {
get: _get$1
get: function get(target, property) {
switch (property) {
// react-hot-loader tries to access this stuff
case '__proto__':
case 'name':
case 'prototype':
case 'displayName':
{
return target[property];
}
default:
{
throw new Error("You're trying to use the styled shorthand without babel-plugin-emotion." + ("\nPlease install and setup babel-plugin-emotion or use the function call syntax(`styled('" + property + "')` instead of `styled." + property + "`)"));
}
}
}
});

@@ -233,0 +225,0 @@ }

{
"name": "create-emotion-styled",
"version": "9.2.3",
"version": "9.2.5",
"description": "The styled API for emotion",
"main": "dist/index.cjs.js",
"module": "dist/index.es.js",
"module": "dist/index.esm.js",
"types": "types/index.d.ts",

@@ -14,7 +14,3 @@ "files": [

"scripts": {
"build": "npm-run-all clean rollup",
"clean": "rimraf dist",
"test:typescript": "dtslint types",
"rollup": "rollup -c ../../rollup.config.js",
"watch": "rollup -c ../../rollup.config.js --watch"
"test:typescript": "dtslint types"
},

@@ -30,6 +26,3 @@ "dependencies": {

"dtslint": "^0.3.0",
"npm-run-all": "^4.0.2",
"prop-types": "^15.6.1",
"rimraf": "^2.6.1",
"rollup": "^0.60.1"
"prop-types": "^15.6.1"
},

@@ -49,3 +42,4 @@ "author": "Kye Hohenberger",

"url": "https://github.com/emotion-js/emotion/issues"
}
},
"umd:main": "./dist/emotion.umd.min.js"
}
// Definitions by: Junyoung Clare Jang <https://github.com/Ailrun>
// TypeScript Version: 2.3
import { Emotion, Interpolation as BaseInterpolation } from 'create-emotion';
import { Emotion, Interpolation as BaseInterpolation, CSSObject } from 'create-emotion';

@@ -6,0 +6,0 @@ export interface ArrayInterpolation<Props> extends Array<Interpolation<Props>> {}

// Definitions by: Junyoung Clare Jang <https://github.com/Ailrun>
// TypeScript Version: 2.3
import { ComponentClass, Ref, SFC } from 'react';
import { ComponentType, ComponentClass, Ref, SFC } from 'react';
import { ClassInterpolation } from 'create-emotion';

@@ -27,3 +27,3 @@

withComponent<IP extends object>(
component: ComponentClass<IP>,
component: ComponentClass<IP> | ComponentType<IP>,
options?: StyledOptions,

@@ -72,3 +72,3 @@ ): StyledOtherComponent<Props, IP, Theme>;

<IP extends object>(
component: ComponentClass<IP>,
component: ComponentClass<IP> | ComponentType<IP>,
options?: StyledOptions,

@@ -75,0 +75,0 @@ ): CreateStyledOtherComponent<IP, Theme>;

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