Socket
Socket
Sign inDemoInstall

@theme-ui/css

Package Overview
Dependencies
Maintainers
2
Versions
427
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@theme-ui/css - npm Package Compare versions

Comparing version 0.3.1 to 0.4.0-alpha.0

.rts2_cache_cjs/rpt2_91c0de2dedef285e0b777accec4edc4295067cb2/code/cache/2add3cb81933e00ccafd5fe5a432f2bd0479f129

30

dist/index.esm.js

@@ -1,10 +0,10 @@

var get = function (obj, key, def, p, undef) {
key = key && key.split ? key.split('.') : [key];
function get(obj, key, def, p, undef) {
var path = key && typeof key === 'string' ? key.split('.') : [key];
for (p = 0; p < key.length; p++) {
obj = obj ? obj[key[p]] : undef;
for (p = 0; p < path.length; p++) {
obj = obj ? obj[path[p]] : undef;
}
return obj === undef ? def : obj;
};
}
var defaultBreakpoints = [40, 52, 64].map(function (n) { return n + 'em'; });

@@ -121,3 +121,3 @@ var defaultTheme = {

if (typeof n === 'string') { return '-' + n; }
return n * -1;
return Number(n) * -1;
};

@@ -134,3 +134,3 @@

var next = {};
var breakpoints = get(theme, 'breakpoints', defaultBreakpoints);
var breakpoints = theme && theme.breakpoints || defaultBreakpoints;
var mediaQueries = [null ].concat( breakpoints.map(function (n) { return ("@media screen and (min-width: " + n + ")"); }));

@@ -164,7 +164,10 @@

var css = function (args) { return function (props) {
var css = function (args) {
if ( args === void 0 ) args = {};
return function (props) {
if ( props === void 0 ) props = {};
var theme = Object.assign({}, defaultTheme,
(props.theme || props));
('theme' in props ? props.theme : props));
var result = {};

@@ -190,4 +193,4 @@ var obj = typeof args === 'function' ? args(theme) : args;

var prop = get(aliases, key, key);
var scaleName = get(scales, prop);
var prop = key in aliases ? aliases[key] : key;
var scaleName = prop in scales ? scales[prop] : undefined;
var scale = get(theme, scaleName, get(theme, prop, {}));

@@ -209,5 +212,6 @@ var transform = get(transforms, prop, get);

return result;
}; };
};
};
export { get, css };
export { get, multiples, scales, css };
//# sourceMappingURL=index.esm.js.map

@@ -1,10 +0,10 @@

var get = function (obj, key, def, p, undef) {
key = key && key.split ? key.split('.') : [key];
function get(obj, key, def, p, undef) {
var path = key && typeof key === 'string' ? key.split('.') : [key];
for (p = 0; p < key.length; p++) {
obj = obj ? obj[key[p]] : undef;
for (p = 0; p < path.length; p++) {
obj = obj ? obj[path[p]] : undef;
}
return obj === undef ? def : obj;
};
}
var defaultBreakpoints = [40, 52, 64].map(function (n) { return n + 'em'; });

@@ -121,3 +121,3 @@ var defaultTheme = {

if (typeof n === 'string') { return '-' + n; }
return n * -1;
return Number(n) * -1;
};

@@ -134,3 +134,3 @@

var next = {};
var breakpoints = get(theme, 'breakpoints', defaultBreakpoints);
var breakpoints = theme && theme.breakpoints || defaultBreakpoints;
var mediaQueries = [null ].concat( breakpoints.map(function (n) { return ("@media screen and (min-width: " + n + ")"); }));

@@ -164,7 +164,10 @@

var css = function (args) { return function (props) {
var css = function (args) {
if ( args === void 0 ) args = {};
return function (props) {
if ( props === void 0 ) props = {};
var theme = Object.assign({}, defaultTheme,
(props.theme || props));
('theme' in props ? props.theme : props));
var result = {};

@@ -190,4 +193,4 @@ var obj = typeof args === 'function' ? args(theme) : args;

var prop = get(aliases, key, key);
var scaleName = get(scales, prop);
var prop = key in aliases ? aliases[key] : key;
var scaleName = prop in scales ? scales[prop] : undefined;
var scale = get(theme, scaleName, get(theme, prop, {}));

@@ -209,6 +212,9 @@ var transform = get(transforms, prop, get);

return result;
}; };
};
};
exports.get = get;
exports.multiples = multiples;
exports.scales = scales;
exports.css = css;
//# sourceMappingURL=index.js.map

@@ -6,11 +6,11 @@ (function (global, factory) {

}(this, (function (exports) {
var get = function (obj, key, def, p, undef) {
key = key && key.split ? key.split('.') : [key];
function get(obj, key, def, p, undef) {
var path = key && typeof key === 'string' ? key.split('.') : [key];
for (p = 0; p < key.length; p++) {
obj = obj ? obj[key[p]] : undef;
for (p = 0; p < path.length; p++) {
obj = obj ? obj[path[p]] : undef;
}
return obj === undef ? def : obj;
};
}
var defaultBreakpoints = [40, 52, 64].map(function (n) { return n + 'em'; });

@@ -127,3 +127,3 @@ var defaultTheme = {

if (typeof n === 'string') { return '-' + n; }
return n * -1;
return Number(n) * -1;
};

@@ -140,3 +140,3 @@

var next = {};
var breakpoints = get(theme, 'breakpoints', defaultBreakpoints);
var breakpoints = theme && theme.breakpoints || defaultBreakpoints;
var mediaQueries = [null ].concat( breakpoints.map(function (n) { return ("@media screen and (min-width: " + n + ")"); }));

@@ -170,7 +170,10 @@

var css = function (args) { return function (props) {
var css = function (args) {
if ( args === void 0 ) args = {};
return function (props) {
if ( props === void 0 ) props = {};
var theme = Object.assign({}, defaultTheme,
(props.theme || props));
('theme' in props ? props.theme : props));
var result = {};

@@ -196,4 +199,4 @@ var obj = typeof args === 'function' ? args(theme) : args;

var prop = get(aliases, key, key);
var scaleName = get(scales, prop);
var prop = key in aliases ? aliases[key] : key;
var scaleName = prop in scales ? scales[prop] : undefined;
var scale = get(theme, scaleName, get(theme, prop, {}));

@@ -215,5 +218,8 @@ var transform = get(transforms, prop, get);

return result;
}; };
};
};
exports.get = get;
exports.multiples = multiples;
exports.scales = scales;
exports.css = css;

@@ -220,0 +226,0 @@

{
"name": "@theme-ui/css",
"version": "0.3.1",
"version": "0.4.0-alpha.0",
"source": "src/index.ts",
"main": "dist/index.js",
"module": "dist/index.esm.js",
"types": "dist/index.d.ts",
"sideEffects": false,

@@ -16,3 +18,6 @@ "scripts": {

},
"gitHead": "f6380fc356ce97e64bf50ba60e0bc6f38a25dabe"
"dependencies": {
"csstype": "^2.5.7"
},
"gitHead": "fbdd88ea280c0d9880d39a114cb6d19f0d4da2ca"
}

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