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

@vanilla-extract/sprinkles

Package Overview
Dependencies
Maintainers
4
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vanilla-extract/sprinkles - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

6

CHANGELOG.md
# @vanilla-extract/sprinkles
## 0.3.1
### Patch Changes
- [#139](https://github.com/seek-oss/vanilla-extract/pull/139) [`152a1c7`](https://github.com/seek-oss/vanilla-extract/commit/152a1c7e3a29cc074f73c37d81428a75705057b9) Thanks [@mattcompiles](https://github.com/mattcompiles)! - Ignore undefined values in conditional objects
## 0.3.0

@@ -4,0 +10,0 @@

24

createAtomsFn/dist/vanilla-extract-sprinkles-createAtomsFn.cjs.dev.js

@@ -77,9 +77,11 @@ 'use strict';

if (process.env.NODE_ENV !== 'production') {
if (!atomicProperty.values[value].conditions[conditionName]) {
throw new Error();
if (value != null) {
if (process.env.NODE_ENV !== 'production') {
if (!atomicProperty.values[value].conditions[conditionName]) {
throw new Error();
}
}
classNames.push(atomicProperty.values[value].conditions[conditionName]);
}
classNames.push(atomicProperty.values[value].conditions[conditionName]);
}

@@ -142,8 +144,10 @@ }

if (!atomicProperty.values[value]) {
invalidPropValue(prop, value, atomicProperty.values);
}
if (value != null) {
if (!atomicProperty.values[value]) {
invalidPropValue(prop, value, atomicProperty.values);
}
if (!atomicProperty.values[value].conditions[conditionName]) {
throw new SprinklesError(`"${prop}" has no condition named ${format(conditionName)}. Possible values are ${Object.keys(atomicProperty.values[value].conditions).map(format).join(', ')}`);
if (!atomicProperty.values[value].conditions[conditionName]) {
throw new SprinklesError(`"${prop}" has no condition named ${format(conditionName)}. Possible values are ${Object.keys(atomicProperty.values[value].conditions).map(format).join(', ')}`);
}
}

@@ -150,0 +154,0 @@ }

@@ -69,5 +69,7 @@ 'use strict';

if ( "production" !== 'production') ;
if (value != null) {
if ( "production" !== 'production') ;
classNames.push(atomicProperty.values[value].conditions[conditionName]);
classNames.push(atomicProperty.values[value].conditions[conditionName]);
}
}

@@ -74,0 +76,0 @@ }

@@ -73,9 +73,11 @@ function createAtomsFn(...args) {

if (process.env.NODE_ENV !== 'production') {
if (!atomicProperty.values[value].conditions[conditionName]) {
throw new Error();
if (value != null) {
if (process.env.NODE_ENV !== 'production') {
if (!atomicProperty.values[value].conditions[conditionName]) {
throw new Error();
}
}
classNames.push(atomicProperty.values[value].conditions[conditionName]);
}
classNames.push(atomicProperty.values[value].conditions[conditionName]);
}

@@ -138,8 +140,10 @@ }

if (!atomicProperty.values[value]) {
invalidPropValue(prop, value, atomicProperty.values);
}
if (value != null) {
if (!atomicProperty.values[value]) {
invalidPropValue(prop, value, atomicProperty.values);
}
if (!atomicProperty.values[value].conditions[conditionName]) {
throw new SprinklesError(`"${prop}" has no condition named ${format(conditionName)}. Possible values are ${Object.keys(atomicProperty.values[value].conditions).map(format).join(', ')}`);
if (!atomicProperty.values[value].conditions[conditionName]) {
throw new SprinklesError(`"${prop}" has no condition named ${format(conditionName)}. Possible values are ${Object.keys(atomicProperty.values[value].conditions).map(format).join(', ')}`);
}
}

@@ -146,0 +150,0 @@ }

@@ -78,3 +78,5 @@ 'use strict';

for (const key in normalizedObject) {
mappedObject[key] = mapFn(normalizedObject[key], key);
if (normalizedObject[key] != null) {
mappedObject[key] = mapFn(normalizedObject[key], key);
}
}

@@ -81,0 +83,0 @@

@@ -78,3 +78,5 @@ 'use strict';

for (const key in normalizedObject) {
mappedObject[key] = mapFn(normalizedObject[key], key);
if (normalizedObject[key] != null) {
mappedObject[key] = mapFn(normalizedObject[key], key);
}
}

@@ -81,0 +83,0 @@

@@ -74,3 +74,5 @@ import { addRecipe } from '@vanilla-extract/css/recipe';

for (const key in normalizedObject) {
mappedObject[key] = mapFn(normalizedObject[key], key);
if (normalizedObject[key] != null) {
mappedObject[key] = mapFn(normalizedObject[key], key);
}
}

@@ -77,0 +79,0 @@

{
"name": "@vanilla-extract/sprinkles",
"version": "0.3.0",
"version": "0.3.1",
"description": "Zero-runtime atomic CSS framework for vanilla-extract",

@@ -5,0 +5,0 @@ "sideEffects": false,

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