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

electrum-store

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electrum-store - npm Package Compare versions

Comparing version 0.1.1 to 0.2.1

src/store/themes/color-manipulator.js

2

package.json
{
"name": "electrum-store",
"version": "0.1.1",
"version": "0.2.1",
"description": "Electrum store provides a store implementation tailored for Electrum.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

'use strict';
import {Colors, Spacing, Timing} from './themes/default';
import {
paletteBuilder,
shapesBuilder,
transitionsBuilder,
typoBuilder
} from './themes/default';
/******************************************************************************/

@@ -10,13 +19,17 @@

class Theme {
constructor (name, key, typo, palette, colors, transitions, spacing, shapes) {
constructor (name, key, colors, palette, shapes, spacing, timing, transitions, typo) {
if (key !== secretKey) {
throw new Error ('Do not call Theme constructor directly; use Theme.create instead');
}
if (!typo.font) {
throw new Error ('Typo has no default font');
}
this._name = name;
this._typo = typo;
this._colors = colors;
this._palette = palette;
this._colors = colors;
this._shapes = shapes;
this._spacing = spacing;
this._timing = timing;
this._transitions = transitions;
this._spacing = spacing;
this._shapes = shapes;
this._typo = typo;
}

@@ -28,4 +41,4 @@

get typo () {
return this._typo;
get colors () {
return this._colors;
}

@@ -37,6 +50,14 @@

get colors () {
return this._colors;
get shapes () {
return this._shapes;
}
get spacing () {
return this._spacing;
}
get timing () {
return this._timing;
}
get transitions () {

@@ -46,12 +67,24 @@ return this._transitions;

get spacing () {
return this._spacing;
get typo () {
return this._typo;
}
get shapes () {
return this._shapes;
}
static create (name) {
if ((typeof name !== 'string') ||
(name.length === 0)) {
throw new Error ('name must be a valid string');
}
const Palette = paletteBuilder (Colors);
const Shapes = shapesBuilder (Spacing);
const Transitions = transitionsBuilder (Timing);
const Typo = typoBuilder (Spacing);
static create (name) {
return new Theme (name, secretKey, {}, {}, {}, {}, {}, {});
return new Theme (name, secretKey,
Colors,
Palette,
Shapes,
Spacing,
Timing,
Transitions,
Typo);
}

@@ -58,0 +91,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