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

@smartface/contx

Package Overview
Dependencies
Maintainers
5
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smartface/contx - npm Package Compare versions

Comparing version 4.0.0 to 4.1.0

2

lib/styling/ThemeContext.d.ts

@@ -12,3 +12,3 @@ import Actor from '../core/Actor';

asStyler(): () => any;
asStyler(): (classNames?: string) => any;
}

@@ -15,0 +15,0 @@

@@ -136,2 +136,7 @@ "use strict";

var id = themeContext.getLastActorID();
var currentTheme = themesCollection.find(function (theme) { return theme.isDefault(); });
var styles = currentTheme.asStyler();
/**
* @param {object | null | string} action
*/
return function themeContextDispatch(action) {

@@ -143,5 +148,12 @@ if (action === null) {

}
else {
else if (typeof action === 'object' && typeof action.type === "string") {
themeContext.dispatch(action);
if (action.type === "changeTheme") {
currentTheme = themesCollection.find(function (theme) { return theme.isDefault(); });
styles = currentTheme.asStyler();
}
}
else if (typeof action === 'string' && currentTheme) {
return styles(action)();
}
};

@@ -148,0 +160,0 @@ };

{
"name": "@smartface/contx",
"version": "4.0.0",
"version": "4.1.0",
"description": "Context Manager",

@@ -48,3 +48,3 @@ "scripts": {

"jase": "^1.2.0",
"jsdoc": "^3.5.5",
"jsdoc": "^3.6.7",
"jsdoc-babel": "^0.3.0",

@@ -51,0 +51,0 @@ "jsdoc-to-markdown": "^3.0.2",

@@ -12,3 +12,3 @@ import Actor from '../core/Actor';

asStyler(): () => any;
asStyler(): (classNames?: string) => any;
}

@@ -15,0 +15,0 @@

@@ -130,3 +130,7 @@ import { INIT_CONTEXT_ACTION_TYPE } from "../core/constants";

const id = themeContext.getLastActorID();
let currentTheme = themesCollection.find(theme => theme.isDefault());
let styles = currentTheme.asStyler();
/**
* @param {object | null | string} action
*/
return function themeContextDispatch(action) {

@@ -137,4 +141,10 @@ if (action === null) {

}, id);
} else {
} else if(typeof action === 'object' && typeof action.type === "string") {
themeContext.dispatch(action);
if(action.type === "changeTheme") {
currentTheme = themesCollection.find(theme => theme.isDefault());
styles = currentTheme.asStyler();
}
} else if(typeof action === 'string' && currentTheme) {
return styles(action)();
}

@@ -141,0 +151,0 @@ };

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