Socket
Socket
Sign inDemoInstall

nuke-theme-provider

Package Overview
Dependencies
Maintainers
2
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuke-theme-provider - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

25

lib/theme.js

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

"use strict";
'use strict';

@@ -9,3 +9,3 @@ Object.defineProperty(exports, "__esModule", {

var _nukeCore = require("nuke-core");
var _nukeCore = require('nuke-core');

@@ -19,5 +19,4 @@ var _nukeCore2 = _interopRequireDefault(_nukeCore);

// Privates, ideally those should be symbols
var THEME_STYLE = "themeStyle";
var THEME_STYLE_CACHE = "themeCachedStyle";
var THEME_STYLE = 'themeStyle';
var THEME_STYLE_CACHE = 'themeCachedStyle';
var defaultTheme = void 0;

@@ -35,3 +34,3 @@

this[THEME_STYLE] = themeStyle;
this[THEME_STYLE]['Core'] = Object.assign(_nukeCore2.default, this[THEME_STYLE]['Core']);
this[THEME_STYLE].Core = Object.assign(_nukeCore2.default, this[THEME_STYLE].Core);

@@ -47,3 +46,3 @@ this[THEME_STYLE_CACHE] = {};

_createClass(Theme, [{
key: "createComponentStyle",
key: 'createComponentStyle',

@@ -72,7 +71,6 @@

return this[THEME_STYLE_CACHE][componentName];
}
}, {
key: "getComponentRelavantStyle",
key: 'getComponentRelavantStyle',
value: function getComponentRelavantStyle(componentName) {

@@ -85,7 +83,6 @@ // if (this[THEME_STYLE_CACHE][componentName]) {

// }
// this[THEME_STYLE_CACHE][componentName]['Core'] =
// this[THEME_STYLE_CACHE][componentName]['Core'] =
}
}], [{
key: "setDefaultThemeStyle",
key: 'setDefaultThemeStyle',
value: function setDefaultThemeStyle(style) {

@@ -101,3 +98,3 @@ defaultTheme = new Theme(style);

}, {
key: "getDefaultTheme",
key: 'getDefaultTheme',
value: function getDefaultTheme() {

@@ -116,2 +113,2 @@ if (!defaultTheme) {

exports.default = Theme;
module.exports = exports["default"];
module.exports = exports['default'];
{
"name": "nuke-theme-provider",
"version": "2.0.1",
"version": "2.0.2",
"description": "主题换肤",
"main": "lib/index",
"module": "src/index",
"files": [

@@ -14,3 +15,2 @@ "lib",

],
"module": "src/index",
"keywords": [

@@ -57,3 +57,9 @@ "nuke",

"nuke-env": "^2.x.x",
"rax-text": "^0.x.x"
"rax-text": "^0.x.x",
"eslint": "3.19.0",
"babel-eslint": "^7.2.3",
"eslint-config-ali": "2.0.0",
"eslint-plugin-import": "2.6.0",
"eslint-plugin-jsx-a11y": "6.0.2",
"eslint-plugin-react": "7.1.0"
},

@@ -60,0 +66,0 @@ "publishConfig": {

@@ -1,21 +0,15 @@

import Core from 'nuke-core';
// Privates, ideally those should be symbols
const THEME_STYLE = "themeStyle";
const THEME_STYLE_CACHE = "themeCachedStyle";
import Core from 'nuke-core';
const THEME_STYLE = 'themeStyle';
const THEME_STYLE_CACHE = 'themeCachedStyle';
let defaultTheme;
function mergeComponentAndThemeStyles() {}
const resolveStyle = (style, baseStyle) => resolveIncludes(style, baseStyle);
function mergeComponentAndThemeStyles(){
}
const resolveStyle = (style, baseStyle) =>
resolveIncludes(style, baseStyle);
export default class Theme {
constructor(themeStyle) {
this[THEME_STYLE] = themeStyle;
this[THEME_STYLE]['Core'] = Object.assign(Core, this[THEME_STYLE]['Core']);
this[THEME_STYLE].Core = Object.assign(Core, this[THEME_STYLE].Core);
this[THEME_STYLE_CACHE] = {};

@@ -37,3 +31,3 @@ }

if (!defaultTheme) {
defaultTheme = new Theme({Core:Core});
defaultTheme = new Theme({ Core });
}

@@ -65,7 +59,6 @@

return this[THEME_STYLE_CACHE][componentName];
}
getComponentRelavantStyle(componentName){
getComponentRelavantStyle(componentName) {
// if (this[THEME_STYLE_CACHE][componentName]) {

@@ -77,7 +70,4 @@ // return this[THEME_STYLE_CACHE][componentName];

// }
// this[THEME_STYLE_CACHE][componentName]['Core'] =
// this[THEME_STYLE_CACHE][componentName]['Core'] =
}
}
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