New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@aesthetic/system

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aesthetic/system - npm Package Compare versions

Comparing version 0.5.2 to 0.5.3

dts/constants.d.ts

47

esm/index.js

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

function _extends() { _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 _extends.apply(this, arguments); }
import { deepMerge, objectLoop, hyphenate, isObject } from '@aesthetic/utils';
function _extends() {
_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 _extends.apply(this, arguments);
}
var Theme = function () {

@@ -210,9 +194,9 @@ function Theme(options, tokens, design, parentTemplates) {

var _proto = Design.prototype;
var _proto2 = Design.prototype;
_proto.createTheme = function createTheme(options, tokens) {
_proto2.createTheme = function createTheme(options, tokens) {
return new Theme(options, tokens, this);
};
_proto.extend = function extend(name, tokens, mixins) {
_proto2.extend = function extend(name, tokens, mixins) {
return new Design(name, deepMerge(this.tokens, tokens), _extends({}, this.mixins, mixins));

@@ -232,14 +216,14 @@ };

var _proto = ThemeRegistry.prototype;
var _proto3 = ThemeRegistry.prototype;
_proto.getDarkTheme = function getDarkTheme() {
_proto3.getDarkTheme = function getDarkTheme() {
return this.getTheme(this.darkTheme);
};
_proto.getLightTheme = function getLightTheme() {
_proto3.getLightTheme = function getLightTheme() {
return this.getTheme(this.lightTheme);
};
_proto.getPreferredTheme = function getPreferredTheme() {
var _this = this;
_proto3.getPreferredTheme = function getPreferredTheme() {
var _this4 = this;

@@ -269,3 +253,3 @@ var prefersDarkScheme = matchMedia('(prefers-color-scheme: dark)').matches;

return contrastCheckOrder.some(function (contrast) {
possibleTheme = _this.query({
possibleTheme = _this4.query({
contrast: contrast,

@@ -287,3 +271,3 @@ scheme: scheme

_proto.getTheme = function getTheme(name) {
_proto3.getTheme = function getTheme(name) {
if ("production" !== process.env.NODE_ENV) {

@@ -306,3 +290,3 @@ if (!name) {

_proto.query = function query(params) {
_proto3.query = function query(params) {
return Object.values(this.themes).find(function (theme) {

@@ -325,3 +309,3 @@ var conditions = [];

_proto.register = function register(name, theme, isDefault) {
_proto3.register = function register(name, theme, isDefault) {
if (isDefault === void 0) {

@@ -369,3 +353,3 @@ isDefault = false;

_proto.reset = function reset() {
_proto3.reset = function reset() {
this.darkTheme = '';

@@ -381,1 +365,2 @@ this.lightTheme = '';

export { DEPTHS, Design, SHADE_RANGES, Theme, ThemeRegistry };
//# sourceMappingURL=index.js.map

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

import { Design } from './index';
import { Design } from './index.js';
var design = new Design('test-design', {

@@ -780,3 +779,3 @@ border: {

});
export { darkTheme, design, lightTheme };
//# sourceMappingURL=test.js.map
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function _extends() { _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 _extends.apply(this, arguments); }
Object.defineProperty(exports, '__esModule', {
value: true
});
var utils = require('@aesthetic/utils');
function _extends() {
_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 _extends.apply(this, arguments);
}
var Theme = function () {

@@ -214,9 +200,9 @@ function Theme(options, tokens, design, parentTemplates) {

var _proto = Design.prototype;
var _proto2 = Design.prototype;
_proto.createTheme = function createTheme(options, tokens) {
_proto2.createTheme = function createTheme(options, tokens) {
return new Theme(options, tokens, this);
};
_proto.extend = function extend(name, tokens, mixins) {
_proto2.extend = function extend(name, tokens, mixins) {
return new Design(name, utils.deepMerge(this.tokens, tokens), _extends({}, this.mixins, mixins));

@@ -236,14 +222,14 @@ };

var _proto = ThemeRegistry.prototype;
var _proto3 = ThemeRegistry.prototype;
_proto.getDarkTheme = function getDarkTheme() {
_proto3.getDarkTheme = function getDarkTheme() {
return this.getTheme(this.darkTheme);
};
_proto.getLightTheme = function getLightTheme() {
_proto3.getLightTheme = function getLightTheme() {
return this.getTheme(this.lightTheme);
};
_proto.getPreferredTheme = function getPreferredTheme() {
var _this = this;
_proto3.getPreferredTheme = function getPreferredTheme() {
var _this4 = this;

@@ -273,3 +259,3 @@ var prefersDarkScheme = matchMedia('(prefers-color-scheme: dark)').matches;

return contrastCheckOrder.some(function (contrast) {
possibleTheme = _this.query({
possibleTheme = _this4.query({
contrast: contrast,

@@ -291,3 +277,3 @@ scheme: scheme

_proto.getTheme = function getTheme(name) {
_proto3.getTheme = function getTheme(name) {
if ("production" !== process.env.NODE_ENV) {

@@ -310,3 +296,3 @@ if (!name) {

_proto.query = function query(params) {
_proto3.query = function query(params) {
return Object.values(this.themes).find(function (theme) {

@@ -329,3 +315,3 @@ var conditions = [];

_proto.register = function register(name, theme, isDefault) {
_proto3.register = function register(name, theme, isDefault) {
if (isDefault === void 0) {

@@ -373,3 +359,3 @@ isDefault = false;

_proto.reset = function reset() {
_proto3.reset = function reset() {
this.darkTheme = '';

@@ -389,1 +375,2 @@ this.lightTheme = '';

exports.ThemeRegistry = ThemeRegistry;
//# sourceMappingURL=index.js.map
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
Object.defineProperty(exports, '__esModule', {
value: true
});
var index = require('./index');
var index_ts = require('./index.js');
var design = new index.Design('test-design', {
var design = new index_ts.Design('test-design', {
border: {

@@ -784,5 +786,5 @@ sm: {

});
exports.darkTheme = darkTheme;
exports.design = design;
exports.lightTheme = lightTheme;
//# sourceMappingURL=test.js.map
{
"name": "@aesthetic/system",
"version": "0.5.2",
"version": "0.5.3",
"description": "Web based building blocks for the Aesthetic design system.",

@@ -15,3 +15,3 @@ "keywords": [

"module": "./esm/index.js",
"types": "./lib/index.d.ts",
"types": "./dts/index.d.ts",
"sideEffects": false,

@@ -26,6 +26,13 @@ "publishConfig": {

"dependencies": {
"@aesthetic/types": "^0.3.1",
"@aesthetic/utils": "^0.5.1"
"@aesthetic/types": "^0.3.2",
"@aesthetic/utils": "^0.5.2"
},
"gitHead": "72edb2d4813718308179a03f66794c59baace701"
"packemon": {
"inputs": {
"index": "src/index.ts",
"test": "src/test.ts"
},
"platform": "browser"
},
"gitHead": "7aa8110c7c8c49a6feb263abc8f3390c1c59125c"
}

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

export * from './lib/test';
export * from './dts/test';
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