@react-email/tailwind 0.0.13-canary.2 → 0.0.13-canary.3

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
@@ -82194,6 +82194,15 @@ var escapeClassName = (className) => {
82194
82194
  );
82195
82195
  };
82196
82196
 
82197
+ // src/utils/use-rgb-non-spaced-syntax.ts
82198
+ var useRgbNonSpacedSyntax = (css) => {
82199
+ const regex = /rgb\(\s*(\d+)\s*(\d+)\s*(\d+)(?:\s*\/\s*([\d%.]+))?\s*\)/gm;
82200
+ return css.replaceAll(regex, (_match, r, g, b, a) => {
82201
+ const alpha = a === "1" || typeof a === "undefined" ? "" : `,${a}`;
82202
+ return `rgb(${r},${g},${b}${alpha})`;
82203
+ });
82204
+ };
82205
+
82197
82206
  // src/tailwind.tsx
82198
82207
  var import_jsx_runtime = require("react/jsx-runtime");
82199
82208
  function processElement(element, nonMediaQueryTailwindStylesPerClass) {
@@ -82267,7 +82276,9 @@ function processHead(headElement, responsiveStyles) {
82267
82276
  var Tailwind = ({ children, config }) => {
82268
82277
  let headStyles = [];
82269
82278
  const markupWithTailwindClasses = (0, import_server.renderToStaticMarkup)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children }));
82270
- const markupCSS = getCssForMarkup(markupWithTailwindClasses, config);
82279
+ const markupCSS = useRgbNonSpacedSyntax(
82280
+ getCssForMarkup(markupWithTailwindClasses, config)
82281
+ );
82271
82282
  const nonMediaQueryCSS = markupCSS.replaceAll(
82272
82283
  /@media\s*\(.*\)\s*{\s*\.(.*)\s*{[\s\S]*}\s*}/gm,
82273
82284
  (mediaQuery, _className) => {
package/dist/index.mjs CHANGED
@@ -82193,6 +82193,15 @@ var escapeClassName = (className) => {
82193
82193
  );
82194
82194
  };
82195
82195
 
82196
+ // src/utils/use-rgb-non-spaced-syntax.ts
82197
+ var useRgbNonSpacedSyntax = (css) => {
82198
+ const regex = /rgb\(\s*(\d+)\s*(\d+)\s*(\d+)(?:\s*\/\s*([\d%.]+))?\s*\)/gm;
82199
+ return css.replaceAll(regex, (_match, r, g, b, a) => {
82200
+ const alpha = a === "1" || typeof a === "undefined" ? "" : `,${a}`;
82201
+ return `rgb(${r},${g},${b}${alpha})`;
82202
+ });
82203
+ };
82204
+
82196
82205
  // src/tailwind.tsx
82197
82206
  import { Fragment, jsx } from "react/jsx-runtime";
82198
82207
  function processElement(element, nonMediaQueryTailwindStylesPerClass) {
@@ -82266,7 +82275,9 @@ function processHead(headElement, responsiveStyles) {
82266
82275
  var Tailwind = ({ children, config }) => {
82267
82276
  let headStyles = [];
82268
82277
  const markupWithTailwindClasses = renderToStaticMarkup(/* @__PURE__ */ jsx(Fragment, { children }));
82269
- const markupCSS = getCssForMarkup(markupWithTailwindClasses, config);
82278
+ const markupCSS = useRgbNonSpacedSyntax(
82279
+ getCssForMarkup(markupWithTailwindClasses, config)
82280
+ );
82270
82281
  const nonMediaQueryCSS = markupCSS.replaceAll(
82271
82282
  /@media\s*\(.*\)\s*{\s*\.(.*)\s*{[\s\S]*}\s*}/gm,
82272
82283
  (mediaQuery, _className) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-email/tailwind",
3
- "version": "0.0.13-canary.2",
3
+ "version": "0.0.13-canary.3",
4
4
  "description": "A React component to wrap emails with Tailwind CSS",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -53,10 +53,10 @@
53
53
  "tailwindcss": "3.3.2",
54
54
  "tsup": "7.2.0",
55
55
  "typescript": "5.1.6",
56
- "@react-email/head": "0.0.6",
57
56
  "@react-email/html": "0.0.6",
58
- "eslint-config-custom": "0.0.0",
57
+ "@react-email/head": "0.0.6",
59
58
  "tsconfig": "0.0.0",
59
+ "eslint-config-custom": "0.0.0",
60
60
  "@react-email/hr": "0.0.6"
61
61
  },
62
62
  "publishConfig": {