@react-email/tailwind 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -80,7 +80,7 @@ var Tailwind = ({ children, config }) => {
80
80
  if ((_a = domNode.attribs) == null ? void 0 : _a.class) {
81
81
  if (hasResponsiveStyles) {
82
82
  domNode.attribs.class = domNode.attribs.class.replace(
83
- /[:#\!\-[\]]+/g,
83
+ /[:#\!\-[\]\/\.%]+/g,
84
84
  "_"
85
85
  );
86
86
  } else {
@@ -113,8 +113,8 @@ function getMediaQueryCSS(css) {
113
113
  return `${start}${newcontent}${end}`;
114
114
  }
115
115
  );
116
- }).replace(/[.\!\#\w\d\\:\-\[\]]+\s*?{/g, (m) => {
117
- return m.replace(/[:#\!\-[\\\]]+/g, "_");
116
+ }).replace(/[.\!\#\w\d\\:\-\[\]\/\.%]+\s*?{/g, (m) => {
117
+ return m.replace(/(?<=.)[:#\!\-[\\\]\/\.%]+/g, "_");
118
118
  }).replace(/font-family(?<value>[^;\r\n]+)/g, (m, value) => {
119
119
  return `font-family${value.replace(/['"]+/g, "")}`;
120
120
  });
package/dist/index.mjs CHANGED
@@ -48,7 +48,7 @@ var Tailwind = ({ children, config }) => {
48
48
  if ((_a = domNode.attribs) == null ? void 0 : _a.class) {
49
49
  if (hasResponsiveStyles) {
50
50
  domNode.attribs.class = domNode.attribs.class.replace(
51
- /[:#\!\-[\]]+/g,
51
+ /[:#\!\-[\]\/\.%]+/g,
52
52
  "_"
53
53
  );
54
54
  } else {
@@ -81,8 +81,8 @@ function getMediaQueryCSS(css) {
81
81
  return `${start}${newcontent}${end}`;
82
82
  }
83
83
  );
84
- }).replace(/[.\!\#\w\d\\:\-\[\]]+\s*?{/g, (m) => {
85
- return m.replace(/[:#\!\-[\\\]]+/g, "_");
84
+ }).replace(/[.\!\#\w\d\\:\-\[\]\/\.%]+\s*?{/g, (m) => {
85
+ return m.replace(/(?<=.)[:#\!\-[\\\]\/\.%]+/g, "_");
86
86
  }).replace(/font-family(?<value>[^;\r\n]+)/g, (m, value) => {
87
87
  return `font-family${value.replace(/['"]+/g, "")}`;
88
88
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-email/tailwind",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "A React component to wrap emails with Tailwind CSS",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -37,7 +37,7 @@
37
37
  "html-react-parser": "3.0.9",
38
38
  "react": "18.2.0",
39
39
  "react-dom": "18.2.0",
40
- "tw-to-css": "0.0.10"
40
+ "tw-to-css": "0.0.11"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@testing-library/react": "14.0.0",