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

@emotion/serialize

Package Overview
Dependencies
Maintainers
2
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@emotion/serialize - npm Package Compare versions

Comparing version 0.11.8 to 0.11.9

10

CHANGELOG.md
# @emotion/serialize
## 0.11.9
### Patch Changes
- [c257d2a3](https://github.com/emotion-js/emotion/commit/c257d2a3) [#1420](https://github.com/emotion-js/emotion/pull/1420) Thanks [@Andarist](https://github.com/Andarist)! - Fix for opaque keyframes object being used as value for animation & animationName in object styles
## 0.11.8

@@ -7,3 +13,3 @@

- [c0eb604d](https://github.com/emotion-js/emotion/commit/c0eb604d) [#1419](https://github.com/emotion-js/emotion/pulls/1419) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Update build tool
- [c0eb604d](https://github.com/emotion-js/emotion/commit/c0eb604d) [#1419](https://github.com/emotion-js/emotion/pull/1419) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Update build tool

@@ -14,2 +20,2 @@ ## 0.11.7

- [757bd86d](https://github.com/emotion-js/emotion/commit/757bd86d) [#1378](https://github.com/emotion-js/emotion/pulls/1378) Thanks [@Andarist](https://github.com/Andarist)! - Fixed issue with camelCased custom properties not being handled correctly in object styles
- [757bd86d](https://github.com/emotion-js/emotion/commit/757bd86d) [#1378](https://github.com/emotion-js/emotion/pull/1378) Thanks [@Andarist](https://github.com/Andarist)! - Fixed issue with camelCased custom properties not being handled correctly in object styles

18

dist/serialize.browser.cjs.js

@@ -32,3 +32,3 @@ 'use strict';

if (typeof value === 'string') {
value = value.replace(animationRegex, function (match, p1, p2) {
return value.replace(animationRegex, function (match, p1, p2) {
cursor = {

@@ -198,3 +198,17 @@ name: p1,

} else {
string += _key + "{" + handleInterpolation(mergedProps, registered, value, false) + "}";
var interpolated = handleInterpolation(mergedProps, registered, value, false);
switch (_key) {
case 'animation':
case 'animationName':
{
string += processStyleName(_key) + ":" + interpolated + ";";
break;
}
default:
{
string += _key + "{" + interpolated + "}";
}
}
}

@@ -201,0 +215,0 @@ }

@@ -26,3 +26,3 @@ import hashString from '@emotion/hash';

if (typeof value === 'string') {
value = value.replace(animationRegex, function (match, p1, p2) {
return value.replace(animationRegex, function (match, p1, p2) {
cursor = {

@@ -192,3 +192,17 @@ name: p1,

} else {
string += _key + "{" + handleInterpolation(mergedProps, registered, value, false) + "}";
var interpolated = handleInterpolation(mergedProps, registered, value, false);
switch (_key) {
case 'animation':
case 'animationName':
{
string += processStyleName(_key) + ":" + interpolated + ";";
break;
}
default:
{
string += _key + "{" + interpolated + "}";
}
}
}

@@ -195,0 +209,0 @@ }

@@ -32,3 +32,3 @@ 'use strict';

if (typeof value === 'string') {
value = value.replace(animationRegex, function (match, p1, p2) {
return value.replace(animationRegex, function (match, p1, p2) {
cursor = {

@@ -198,3 +198,17 @@ name: p1,

} else {
string += _key + "{" + handleInterpolation(mergedProps, registered, value, false) + "}";
var interpolated = handleInterpolation(mergedProps, registered, value, false);
switch (_key) {
case 'animation':
case 'animationName':
{
string += processStyleName(_key) + ":" + interpolated + ";";
break;
}
default:
{
string += _key + "{" + interpolated + "}";
}
}
}

@@ -201,0 +215,0 @@ }

@@ -20,3 +20,3 @@ "use strict";

case "animationName":
"string" == typeof value && (value = value.replace(animationRegex, function(match, p1, p2) {
if ("string" == typeof value) return value.replace(animationRegex, function(match, p1, p2) {
return cursor = {

@@ -27,3 +27,3 @@ name: p1,

}, p1;
}));
});
}

@@ -74,3 +74,14 @@ return 1 === unitless[key] || isCustomProperty(key) || "number" != typeof value || 0 === value ? value : value + "px";

var value = obj[_key];
if ("object" != typeof value) null != registered && void 0 !== registered[value] ? string += _key + "{" + registered[value] + "}" : string += processStyleName(_key) + ":" + processStyleValue(_key, value) + ";"; else if (!Array.isArray(value) || "string" != typeof value[0] || null != registered && void 0 !== registered[value[0]]) string += _key + "{" + handleInterpolation(mergedProps, registered, value, !1) + "}"; else for (var _i = 0; _i < value.length; _i++) string += processStyleName(_key) + ":" + processStyleValue(_key, value[_i]) + ";";
if ("object" != typeof value) null != registered && void 0 !== registered[value] ? string += _key + "{" + registered[value] + "}" : string += processStyleName(_key) + ":" + processStyleValue(_key, value) + ";"; else if (!Array.isArray(value) || "string" != typeof value[0] || null != registered && void 0 !== registered[value[0]]) {
var interpolated = handleInterpolation(mergedProps, registered, value, !1);
switch (_key) {
case "animation":
case "animationName":
string += processStyleName(_key) + ":" + interpolated + ";";
break;
default:
string += _key + "{" + interpolated + "}";
}
} else for (var _i = 0; _i < value.length; _i++) string += processStyleName(_key) + ":" + processStyleValue(_key, value[_i]) + ";";
}

@@ -77,0 +88,0 @@ return string;

@@ -26,3 +26,3 @@ import hashString from '@emotion/hash';

if (typeof value === 'string') {
value = value.replace(animationRegex, function (match, p1, p2) {
return value.replace(animationRegex, function (match, p1, p2) {
cursor = {

@@ -192,3 +192,17 @@ name: p1,

} else {
string += _key + "{" + handleInterpolation(mergedProps, registered, value, false) + "}";
var interpolated = handleInterpolation(mergedProps, registered, value, false);
switch (_key) {
case 'animation':
case 'animationName':
{
string += processStyleName(_key) + ":" + interpolated + ";";
break;
}
default:
{
string += _key + "{" + interpolated + "}";
}
}
}

@@ -195,0 +209,0 @@ }

{
"name": "@emotion/serialize",
"version": "0.11.8",
"version": "0.11.9",
"description": "serialization utils for emotion",

@@ -5,0 +5,0 @@ "main": "dist/serialize.cjs.js",

@@ -35,3 +35,3 @@ // @flow

if (typeof value === 'string') {
value = value.replace(animationRegex, (match, p1, p2) => {
return value.replace(animationRegex, (match, p1, p2) => {
cursor = {

@@ -268,3 +268,3 @@ name: p1,

} else {
string += `${key}{${handleInterpolation(
const interpolated = handleInterpolation(
mergedProps,

@@ -274,3 +274,13 @@ registered,

false
)}}`
)
switch (key) {
case 'animation':
case 'animationName': {
string += `${processStyleName(key)}:${interpolated};`
break
}
default: {
string += `${key}{${interpolated}}`
}
}
}

@@ -277,0 +287,0 @@ }

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