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

@stylable/runtime

Package Overview
Dependencies
Maintainers
5
Versions
195
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stylable/runtime - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

20

cjs/css-runtime-stylesheet.js

@@ -59,11 +59,13 @@ "use strict";

var item = arguments[i];
if (typeof item === 'string') {
classNames.push(item);
}
else if (i >= 1) {
for (var stateName in item) {
var stateValue = item[stateName];
var stateClass = createStateClass(stateName, stateValue);
if (stateClass) {
classNames.push(stateClass);
if (item) {
if (typeof item === 'string') {
classNames[classNames.length] = item;
}
else if (i === 1) {
for (var stateName in item) {
var stateValue = item[stateName];
var stateClass = createStateClass(stateName, stateValue);
if (stateClass) {
classNames[classNames.length] = stateClass;
}
}

@@ -70,0 +72,0 @@ }

@@ -22,3 +22,3 @@ export declare type StateValue = boolean | number | string;

cssStates: (stateMap: StateMap) => string;
style: (context: string, stateOrClass: string | StateMap, ...classes: string[]) => string;
style: (context: string, stateOrClass: string | StateMap | undefined, ...classes: Array<string | undefined>) => string;
}

@@ -25,0 +25,0 @@ export interface NodeRenderer<I, O extends Element> {

{
"name": "@stylable/runtime",
"version": "2.0.0",
"version": "2.0.1",
"description": "Stylable runtime DOM integration",

@@ -34,3 +34,3 @@ "main": "cjs/index.js",

"license": "BSD-3-Clause",
"gitHead": "feb73fcd4e1045b44b095f589638892859d3ffd7"
"gitHead": "29404c70e6801fedf67b9982ef1632750a798b57"
}

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

/* runtime version: 2.0.0 */
/* runtime version: 2.0.1 */
function StylableRuntime(exports){

@@ -226,11 +226,13 @@ exports = exports || {};

var item = arguments[i];
if (typeof item === 'string') {
classNames.push(item);
}
else if (i >= 1) {
for (var stateName in item) {
var stateValue = item[stateName];
var stateClass = createStateClass(stateName, stateValue);
if (stateClass) {
classNames.push(stateClass);
if (item) {
if (typeof item === 'string') {
classNames[classNames.length] = item;
}
else if (i === 1) {
for (var stateName in item) {
var stateValue = item[stateName];
var stateClass = createStateClass(stateName, stateValue);
if (stateClass) {
classNames[classNames.length] = stateClass;
}
}

@@ -237,0 +239,0 @@ }

@@ -86,10 +86,12 @@ import { RuntimeRenderer } from './css-runtime-renderer';

if (typeof item === 'string') {
classNames.push(item);
} else if (i >= 1) {
for (const stateName in item) {
const stateValue = item[stateName];
const stateClass = createStateClass(stateName, stateValue);
if (stateClass) {
classNames.push(stateClass);
if (item) {
if (typeof item === 'string') {
classNames[classNames.length] = item;
} else if (i === 1) {
for (const stateName in item) {
const stateValue = item[stateName];
const stateClass = createStateClass(stateName, stateValue);
if (stateClass) {
classNames[classNames.length] = stateClass;
}
}

@@ -96,0 +98,0 @@ }

@@ -27,3 +27,7 @@ export type StateValue = boolean | number | string;

cssStates: (stateMap: StateMap) => string;
style: (context: string, stateOrClass: string | StateMap, ...classes: string[]) => string;
style: (
context: string,
stateOrClass: string | StateMap | undefined,
...classes: Array<string | undefined>
) => string;
}

@@ -30,0 +34,0 @@

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