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

cf-style-container

Package Overview
Dependencies
Maintainers
23
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cf-style-container - npm Package Compare versions

Comparing version 8.1.4 to 9.0.0

38

CHANGELOG.md

@@ -6,2 +6,26 @@ # Change Log

<a name="9.0.0"></a>
# [9.0.0](http://stash.cfops.it:7999/www/cf-ux/compare/cf-style-container@8.1.4...cf-style-container@9.0.0) (2018-05-08)
### Bug Fixes
* **all:** UI-585: update snaps ([599bbce](http://stash.cfops.it:7999/www/cf-ux/commits/599bbce))
* **cf-style-container:** UI-585: remove 'seamless-immutable' dependency ([5a45c7d](http://stash.cfops.it:7999/www/cf-ux/commits/5a45c7d))
### Features
* **all:** UI-585: ([00a5bf1](http://stash.cfops.it:7999/www/cf-ux/commits/00a5bf1))
* **all:** UI-585: update color usage to access theme.colors ([3f76f3b](http://stash.cfops.it:7999/www/cf-ux/commits/3f76f3b))
* **cf-style-const:** UI-585: added deprecation warnings to theme ([ce5a85c](http://stash.cfops.it:7999/www/cf-ux/commits/ce5a85c))
### BREAKING CHANGES
* **all:** update snapshots
<a name="8.1.4"></a>

@@ -15,3 +39,3 @@ ## [8.1.4](http://stash.cfops.it:7999/www/cf-ux/compare/cf-style-container@8.1.3...cf-style-container@8.1.4) (2018-05-04)

<a name="8.1.3"></a>
<a name="8.1.3"></a>
## [8.1.3](http://stash.cfops.it:7999/www/cf-ux/compare/cf-style-container@8.1.2...cf-style-container@8.1.3) (2018-05-02)

@@ -24,3 +48,3 @@

<a name="8.1.2"></a>
<a name="8.1.2"></a>
## [8.1.2](http://stash.cfops.it:7999/www/cf-ux/compare/cf-style-container@8.1.1...cf-style-container@8.1.2) (2018-05-01)

@@ -33,3 +57,3 @@

<a name="8.1.1"></a>
<a name="8.1.1"></a>
## [8.1.1](http://stash.cfops.it:7999/www/cf-ux/compare/cf-style-container@8.1.0...cf-style-container@8.1.1) (2018-04-24)

@@ -45,3 +69,3 @@

<a name="8.1.0"></a>
<a name="8.1.0"></a>
# [8.1.0](http://stash.cfops.it:7999/www/cf-ux/compare/cf-style-container@8.0.6...cf-style-container@8.1.0) (2018-04-24)

@@ -64,3 +88,3 @@

<a name="8.0.6"></a>
<a name="8.0.6"></a>
## [8.0.6](http://stash.cfops.it:7999/www/cf-ux/compare/cf-style-container@8.0.5...cf-style-container@8.0.6) (2018-04-11)

@@ -76,3 +100,3 @@

<a name="8.0.5"></a>
<a name="8.0.5"></a>
## [8.0.5](http://stash.cfops.it:7999/www/cf-ux/compare/cf-style-container@8.0.4...cf-style-container@8.0.5) (2018-03-28)

@@ -85,3 +109,3 @@

<a name="8.0.4"></a>
<a name="8.0.4"></a>
## [8.0.4](http://stash.cfops.it:7999/www/cf-ux/compare/cf-style-container@8.0.2...cf-style-container@8.0.4) (2018-03-28)

@@ -88,0 +112,0 @@

6

es/createStyledComponent.js

@@ -229,8 +229,8 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

return acc[part];
}, theme.color);
}, theme.colors);
} catch (e) {
return val;
}
} else if (typeof theme.color[val] === 'string') {
return theme.color[val];
} else if (typeof theme.colors[val] === 'string') {
return theme.colors[val];
}

@@ -237,0 +237,0 @@ return val;

@@ -1,5 +0,1 @@

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
import { static as Immutable } from 'seamless-immutable';
var mergeThemes = function mergeThemes(baseTheme) {

@@ -10,14 +6,15 @@ for (var _len = arguments.length, themes = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {

return themes ? themes.reduce(function (acc, theme) {
if (typeof theme === 'function') {
return Immutable.merge(acc, Immutable(theme(baseTheme)), {
deep: true
});
} else if ((typeof theme === 'undefined' ? 'undefined' : _typeof(theme)) === 'object') {
return Immutable.merge(acc, Immutable(theme), { deep: true });
}
throw new Error('theme must be either a function or an object');
}, Immutable(baseTheme)) : Immutable(baseTheme);
if (themes) {
return themes.reduce(function (acc, theme) {
if (typeof theme === 'function') {
theme = theme(baseTheme);
}
return Object.assign({}, acc, theme);
}, baseTheme);
}
return baseTheme;
};
export default mergeThemes;

@@ -146,8 +146,8 @@ 'use strict';

try {
return val.split('.').reduce((acc, part) => acc[part], _cfStyleConst.variables.color);
return val.split('.').reduce((acc, part) => acc[part], _cfStyleConst.variables.colors);
} catch (e) {
return val;
}
} else if (typeof _cfStyleConst.variables.color[val] === 'string') {
return _cfStyleConst.variables.color[val];
} else if (typeof _cfStyleConst.variables.colors[val] === 'string') {
return _cfStyleConst.variables.colors[val];
}

@@ -154,0 +154,0 @@ return val;

@@ -6,16 +6,16 @@ 'use strict';

});
const mergeThemes = (baseTheme, ...themes) => {
if (themes) {
return themes.reduce((acc, theme) => {
if (typeof theme === 'function') {
theme = theme(baseTheme);
}
var _seamlessImmutable = require('seamless-immutable');
const mergeThemes = (baseTheme, ...themes) => themes ? themes.reduce((acc, theme) => {
if (typeof theme === 'function') {
return _seamlessImmutable.static.merge(acc, (0, _seamlessImmutable.static)(theme(baseTheme)), {
deep: true
});
} else if (typeof theme === 'object') {
return _seamlessImmutable.static.merge(acc, (0, _seamlessImmutable.static)(theme), { deep: true });
return Object.assign({}, acc, theme);
}, baseTheme);
}
throw new Error('theme must be either a function or an object');
}, (0, _seamlessImmutable.static)(baseTheme)) : (0, _seamlessImmutable.static)(baseTheme);
return baseTheme;
};
exports.default = mergeThemes;
{
"name": "cf-style-container",
"description": "Cloudflare Style Container",
"version": "8.1.4",
"version": "9.0.0",
"main": "lib/index.js",

@@ -14,3 +14,3 @@ "module": "es/index.js",

"dependencies": {
"cf-style-const": "^3.2.2",
"cf-style-const": "^3.3.0",
"fela": "^6.0.5",

@@ -21,3 +21,2 @@ "fela-utils": "^7.0.5",

"react-fela": "^6.1.0",
"seamless-immutable": "^7.1.3",
"underscore.string": "^3.3.4"

@@ -24,0 +23,0 @@ },

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