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

styletron-engine-atomic

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

styletron-engine-atomic - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

dist-tests/browser.js

34

dist/browser.es2015.es.js

@@ -273,2 +273,28 @@ import prefixAll from 'inline-style-prefixer/static';

// strict
/* eslint-disable no-console */
const validAnimationState = /^(from|to|\+?(\d*\.)?\d+%)(\s*,\s*(from|to|\+?(\d*\.)?\d+%))*$/;
function validateKeyframesObject(keyframes) {
let valid = true;
for (const animationState in keyframes) {
const value = keyframes[animationState];
if (!validAnimationState.test(animationState)) {
valid = false;
console.warn(`Warning: property "${animationState}" in keyframes object ${JSON.stringify(keyframes)} is not a valid. Must be "from", "to", or a percentage.`);
}
if (typeof value !== "object") {
valid = false;
console.warn(`Warning: value for "${animationState}" property in keyframes object ${JSON.stringify(keyframes)} must be an object. Instead it was a ${typeof value}.`);
}
if (!valid) {
console.warn(`Warning: object used as value for "animationName" style is invalid:`, keyframes);
}
}
}
// strict
function atomicSelector(id, pseudo) {

@@ -284,6 +310,10 @@ let selector = `.${id}`;

function keyframesToBlock(keyframes) {
if (process.env.NODE_ENV !== "production") {
validateKeyframesObject(keyframes);
}
let result = "";
for (const thing in keyframes) {
result += `${thing}{${declarationsToBlock(keyframes[thing])}}`;
for (const animationState in keyframes) {
result += `${animationState}{${declarationsToBlock(keyframes[animationState])}}`;
}

@@ -290,0 +320,0 @@

@@ -273,2 +273,28 @@ import prefixAll from 'inline-style-prefixer/static';

// strict
/* eslint-disable no-console */
const validAnimationState = /^(from|to|\+?(\d*\.)?\d+%)(\s*,\s*(from|to|\+?(\d*\.)?\d+%))*$/;
function validateKeyframesObject(keyframes) {
let valid = true;
for (const animationState in keyframes) {
const value = keyframes[animationState];
if (!validAnimationState.test(animationState)) {
valid = false;
console.warn(`Warning: property "${animationState}" in keyframes object ${JSON.stringify(keyframes)} is not a valid. Must be "from", "to", or a percentage.`);
}
if (typeof value !== "object") {
valid = false;
console.warn(`Warning: value for "${animationState}" property in keyframes object ${JSON.stringify(keyframes)} must be an object. Instead it was a ${typeof value}.`);
}
if (!valid) {
console.warn(`Warning: object used as value for "animationName" style is invalid:`, keyframes);
}
}
}
// strict
function atomicSelector(id, pseudo) {

@@ -284,6 +310,10 @@ let selector = `.${id}`;

function keyframesToBlock(keyframes) {
if (process.env.NODE_ENV !== "production") {
validateKeyframesObject(keyframes);
}
let result = "";
for (const thing in keyframes) {
result += `${thing}{${declarationsToBlock(keyframes[thing])}}`;
for (const animationState in keyframes) {
result += `${animationState}{${declarationsToBlock(keyframes[animationState])}}`;
}

@@ -290,0 +320,0 @@

@@ -305,3 +305,31 @@ import prefixAll from 'inline-style-prefixer/static';

function _typeof$1(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
// strict
/* eslint-disable no-console */
var validAnimationState = /^(from|to|\+?(\d*\.)?\d+%)(\s*,\s*(from|to|\+?(\d*\.)?\d+%))*$/;
function validateKeyframesObject(keyframes) {
var valid = true;
for (var animationState in keyframes) {
var value = keyframes[animationState];
if (!validAnimationState.test(animationState)) {
valid = false;
console.warn("Warning: property \"" + animationState + "\" in keyframes object " + JSON.stringify(keyframes) + " is not a valid. Must be \"from\", \"to\", or a percentage.");
}
if (_typeof$1(value) !== "object") {
valid = false;
console.warn("Warning: value for \"" + animationState + "\" property in keyframes object " + JSON.stringify(keyframes) + " must be an object. Instead it was a " + _typeof$1(value) + ".");
}
if (!valid) {
console.warn("Warning: object used as value for \"animationName\" style is invalid:", keyframes);
}
}
}
// strict
function atomicSelector(id, pseudo) {

@@ -317,6 +345,10 @@ var selector = "." + id;

function keyframesToBlock(keyframes) {
if (process.env.NODE_ENV !== "production") {
validateKeyframesObject(keyframes);
}
var result = "";
for (var thing in keyframes) {
result += thing + "{" + declarationsToBlock(keyframes[thing]) + "}";
for (var animationState in keyframes) {
result += animationState + "{" + declarationsToBlock(keyframes[animationState]) + "}";
}

@@ -323,0 +355,0 @@

@@ -311,3 +311,31 @@ 'use strict';

function _typeof$1(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
// strict
/* eslint-disable no-console */
var validAnimationState = /^(from|to|\+?(\d*\.)?\d+%)(\s*,\s*(from|to|\+?(\d*\.)?\d+%))*$/;
function validateKeyframesObject(keyframes) {
var valid = true;
for (var animationState in keyframes) {
var value = keyframes[animationState];
if (!validAnimationState.test(animationState)) {
valid = false;
console.warn("Warning: property \"" + animationState + "\" in keyframes object " + JSON.stringify(keyframes) + " is not a valid. Must be \"from\", \"to\", or a percentage.");
}
if (_typeof$1(value) !== "object") {
valid = false;
console.warn("Warning: value for \"" + animationState + "\" property in keyframes object " + JSON.stringify(keyframes) + " must be an object. Instead it was a " + _typeof$1(value) + ".");
}
if (!valid) {
console.warn("Warning: object used as value for \"animationName\" style is invalid:", keyframes);
}
}
}
// strict
function atomicSelector(id, pseudo) {

@@ -323,6 +351,10 @@ var selector = "." + id;

function keyframesToBlock(keyframes) {
if (process.env.NODE_ENV !== "production") {
validateKeyframesObject(keyframes);
}
var result = "";
for (var thing in keyframes) {
result += thing + "{" + declarationsToBlock(keyframes[thing]) + "}";
for (var animationState in keyframes) {
result += animationState + "{" + declarationsToBlock(keyframes[animationState]) + "}";
}

@@ -329,0 +361,0 @@

@@ -273,2 +273,28 @@ import prefixAll from 'inline-style-prefixer/static';

// strict
/* eslint-disable no-console */
const validAnimationState = /^(from|to|\+?(\d*\.)?\d+%)(\s*,\s*(from|to|\+?(\d*\.)?\d+%))*$/;
function validateKeyframesObject(keyframes) {
let valid = true;
for (const animationState in keyframes) {
const value = keyframes[animationState];
if (!validAnimationState.test(animationState)) {
valid = false;
console.warn(`Warning: property "${animationState}" in keyframes object ${JSON.stringify(keyframes)} is not a valid. Must be "from", "to", or a percentage.`);
}
if (typeof value !== "object") {
valid = false;
console.warn(`Warning: value for "${animationState}" property in keyframes object ${JSON.stringify(keyframes)} must be an object. Instead it was a ${typeof value}.`);
}
if (!valid) {
console.warn(`Warning: object used as value for "animationName" style is invalid:`, keyframes);
}
}
}
// strict
function atomicSelector(id, pseudo) {

@@ -284,6 +310,10 @@ let selector = `.${id}`;

function keyframesToBlock(keyframes) {
if (process.env.NODE_ENV !== "production") {
validateKeyframesObject(keyframes);
}
let result = "";
for (const thing in keyframes) {
result += `${thing}{${declarationsToBlock(keyframes[thing])}}`;
for (const animationState in keyframes) {
result += `${animationState}{${declarationsToBlock(keyframes[animationState])}}`;
}

@@ -290,0 +320,0 @@

@@ -279,2 +279,28 @@ 'use strict';

// strict
/* eslint-disable no-console */
const validAnimationState = /^(from|to|\+?(\d*\.)?\d+%)(\s*,\s*(from|to|\+?(\d*\.)?\d+%))*$/;
function validateKeyframesObject(keyframes) {
let valid = true;
for (const animationState in keyframes) {
const value = keyframes[animationState];
if (!validAnimationState.test(animationState)) {
valid = false;
console.warn(`Warning: property "${animationState}" in keyframes object ${JSON.stringify(keyframes)} is not a valid. Must be "from", "to", or a percentage.`);
}
if (typeof value !== "object") {
valid = false;
console.warn(`Warning: value for "${animationState}" property in keyframes object ${JSON.stringify(keyframes)} must be an object. Instead it was a ${typeof value}.`);
}
if (!valid) {
console.warn(`Warning: object used as value for "animationName" style is invalid:`, keyframes);
}
}
}
// strict
function atomicSelector(id, pseudo) {

@@ -290,6 +316,10 @@ let selector = `.${id}`;

function keyframesToBlock(keyframes) {
if (process.env.NODE_ENV !== "production") {
validateKeyframesObject(keyframes);
}
let result = "";
for (const thing in keyframes) {
result += `${thing}{${declarationsToBlock(keyframes[thing])}}`;
for (const animationState in keyframes) {
result += `${animationState}{${declarationsToBlock(keyframes[animationState])}}`;
}

@@ -296,0 +326,0 @@

6

package.json
{
"name": "styletron-engine-atomic",
"version": "1.0.8",
"version": "1.0.9",
"description": "Universal, high-performance JavaScript styles",

@@ -34,7 +34,7 @@ "author": "Ryan Tsao <ryan.j.tsao@gmail.com>",

"inline-style-prefixer": "^4.0.0",
"styletron-standard": "^1.0.6"
"styletron-standard": "^1.0.7"
},
"devDependencies": {
"create-universal-package": "3.2.4",
"tape": "4.8.0",
"tape": "4.9.1",
"unitest": "^2.1.1"

@@ -41,0 +41,0 @@ },

// @flow strict
declare var __DEV__: boolean;
import hyphenate from "./hyphenate-style-name.js";
import validateKeyframesObject from "./validate-keyframes-object.js";

@@ -13,6 +16,11 @@ export function atomicSelector(id: string, pseudo: string): string {

export function keyframesToBlock(keyframes: Object): string {
export function keyframesToBlock(keyframes: {[string]: Object}): string {
if (__DEV__) {
validateKeyframesObject(keyframes);
}
let result = "";
for (const thing in keyframes) {
result += `${thing}{${declarationsToBlock(keyframes[thing])}}`;
for (const animationState in keyframes) {
result += `${animationState}{${declarationsToBlock(
keyframes[animationState],
)}}`;
}

@@ -19,0 +27,0 @@ return result;

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

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