@react-email/tailwind 0.0.17-canary.0 → 0.0.18

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
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Fl=require("react/jsx-runtime"),H3=require("react");function q3(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,a.get?a:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const Us=q3(H3);function G3(t){let e=t;const n=[];for(const a of t.matchAll(/@media\s*\(.*\)\s*{\s*\..*\s*{[\s\S]*?}\s*}/gm)){const[d]=a;e=e.replace(d,""),n.push(d)}return[e,n]}function*Fg(t){for(const[e,n,a]of t.matchAll(/\s*\.([\S]+)\s*{([^}]*)}/gm))yield{value:e,selector:n,content:a}}const z3=t=>{if(typeof t=="string")return t;if(typeof t=="object")return JSON.stringify(t)},Kc=t=>{if(typeof t=="string"||typeof t=="number")return String(t);if(Array.isArray(t))return t.map(Kc).join("");if(Us.isValidElement(t)){const{type:e,props:n}=t;if(typeof e=="function"||e.render){const l=(typeof e=="object"?e.render:e)(n);return Kc(l)}let a=Object.keys(n||{}).filter(r=>r!=="children").map(r=>`${r}="${z3(n[r])}"`).join(" ");a=a.trim().length>0?` ${a}`:"";const d=n&&"children"in n?n.children:"",u=d?Kc(d):"";return typeof t.type=="symbol"?u:`<${t.type.toString()}${a}>${u}</${t.type.toString()}>`}return""};var Mt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ed(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function yw(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function a(){return this instanceof a?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(a){var d=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(n,a,d.get?d:{enumerable:!0,get:function(){return t[a]}})}),n}var $e={},bw={},pu={};pu.byteLength=X3;pu.toByteArray=Q3;pu.fromByteArray=tO;var Zi=[],ri=[],K3=typeof Uint8Array<"u"?Uint8Array:Array,Rp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Qa=0,Y3=Rp.length;Qa<Y3;++Qa)Zi[Qa]=Rp[Qa],ri[Rp.charCodeAt(Qa)]=Qa;ri[45]=62;ri[95]=63;function gw(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var a=n===e?0:4-n%4;return[n,a]}function X3(t){var e=gw(t),n=e[0],a=e[1];return(n+a)*3/4-a}function J3(t,e,n){return(e+n)*3/4-n}function Q3(t){var e,n=gw(t),a=n[0],d=n[1],u=new K3(J3(t,a,d)),r=0,l=d>0?a-4:a,s;for(s=0;s<l;s+=4)e=ri[t.charCodeAt(s)]<<18|ri[t.charCodeAt(s+1)]<<12|ri[t.charCodeAt(s+2)]<<6|ri[t.charCodeAt(s+3)],u[r++]=e>>16&255,u[r++]=e>>8&255,u[r++]=e&255;return d===2&&(e=ri[t.charCodeAt(s)]<<2|ri[t.charCodeAt(s+1)]>>4,u[r++]=e&255),d===1&&(e=ri[t.charCodeAt(s)]<<10|ri[t.charCodeAt(s+1)]<<4|ri[t.charCodeAt(s+2)]>>2,u[r++]=e>>8&255,u[r++]=e&255),u}function Z3(t){return Zi[t>>18&63]+Zi[t>>12&63]+Zi[t>>6&63]+Zi[t&63]}function eO(t,e,n){for(var a,d=[],u=e;u<n;u+=3)a=(t[u]<<16&16711680)+(t[u+1]<<8&65280)+(t[u+2]&255),d.push(Z3(a));return d.join("")}function tO(t){for(var e,n=t.length,a=n%3,d=[],u=16383,r=0,l=n-a;r<l;r+=u)d.push(eO(t,r,r+u>l?l:r+u));return a===1?(e=t[n-1],d.push(Zi[e>>2]+Zi[e<<4&63]+"==")):a===2&&(e=(t[n-2]<<8)+t[n-1],d.push(Zi[e>>10]+Zi[e>>4&63]+Zi[e<<2&63]+"=")),d.join("")}var td={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */td.read=function(t,e,n,a,d){var u,r,l=d*8-a-1,s=(1<<l)-1,f=s>>1,c=-7,i=n?d-1:0,o=n?-1:1,m=t[e+i];for(i+=o,u=m&(1<<-c)-1,m>>=-c,c+=l;c>0;u=u*256+t[e+i],i+=o,c-=8);for(r=u&(1<<-c)-1,u>>=-c,c+=a;c>0;r=r*256+t[e+i],i+=o,c-=8);if(u===0)u=1-f;else{if(u===s)return r?NaN:(m?-1:1)*(1/0);r=r+Math.pow(2,a),u=u-f}return(m?-1:1)*r*Math.pow(2,u-a)};td.write=function(t,e,n,a,d,u){var r,l,s,f=u*8-d-1,c=(1<<f)-1,i=c>>1,o=d===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=a?0:u-1,h=a?1:-1,y=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,r=c):(r=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-r))<1&&(r--,s*=2),r+i>=1?e+=o/s:e+=o*Math.pow(2,1-i),e*s>=2&&(r++,s/=2),r+i>=c?(l=0,r=c):r+i>=1?(l=(e*s-1)*Math.pow(2,d),r=r+i):(l=e*Math.pow(2,i-1)*Math.pow(2,d),r=0));d>=8;t[n+m]=l&255,m+=h,l/=256,d-=8);for(r=r<<d|l,f+=d;f>0;t[n+m]=r&255,m+=h,r/=256,f-=8);t[n+m-h]|=y*128};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Fl=require("react/jsx-runtime"),H3=require("react");function q3(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,a.get?a:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const Us=q3(H3);function G3(t){let e=t;const n=[];for(const a of t.matchAll(/@media\s*[^{]*\{(?:[^{}]*\{[^{}]*\})*[^{}]*\}/gm)){const[d]=a;e=e.replace(d,""),n.push(d)}return[e,n]}function*Fg(t){for(const[e,n,a]of t.matchAll(/\s*\.([\S]+)\s*{([^}]*)}/gm))yield{value:e,selector:n,content:a}}const z3=t=>{if(typeof t=="string")return t;if(typeof t=="object")return JSON.stringify(t)},Kc=t=>{if(typeof t=="string"||typeof t=="number")return String(t);if(Array.isArray(t))return t.map(Kc).join("");if(Us.isValidElement(t)){const{type:e,props:n}=t;if(typeof e=="function"||e.render){const l=(typeof e=="object"?e.render:e)(n);return Kc(l)}let a=Object.keys(n||{}).filter(r=>r!=="children").map(r=>`${r}="${z3(n[r])}"`).join(" ");a=a.trim().length>0?` ${a}`:"";const d=n&&"children"in n?n.children:"",u=d?Kc(d):"";return typeof t.type=="symbol"?u:`<${t.type.toString()}${a}>${u}</${t.type.toString()}>`}return""};var Mt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ed(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function yw(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function a(){return this instanceof a?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(a){var d=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(n,a,d.get?d:{enumerable:!0,get:function(){return t[a]}})}),n}var $e={},bw={},pu={};pu.byteLength=X3;pu.toByteArray=Q3;pu.fromByteArray=tO;var Zi=[],ri=[],K3=typeof Uint8Array<"u"?Uint8Array:Array,Rp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Qa=0,Y3=Rp.length;Qa<Y3;++Qa)Zi[Qa]=Rp[Qa],ri[Rp.charCodeAt(Qa)]=Qa;ri[45]=62;ri[95]=63;function gw(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var a=n===e?0:4-n%4;return[n,a]}function X3(t){var e=gw(t),n=e[0],a=e[1];return(n+a)*3/4-a}function J3(t,e,n){return(e+n)*3/4-n}function Q3(t){var e,n=gw(t),a=n[0],d=n[1],u=new K3(J3(t,a,d)),r=0,l=d>0?a-4:a,s;for(s=0;s<l;s+=4)e=ri[t.charCodeAt(s)]<<18|ri[t.charCodeAt(s+1)]<<12|ri[t.charCodeAt(s+2)]<<6|ri[t.charCodeAt(s+3)],u[r++]=e>>16&255,u[r++]=e>>8&255,u[r++]=e&255;return d===2&&(e=ri[t.charCodeAt(s)]<<2|ri[t.charCodeAt(s+1)]>>4,u[r++]=e&255),d===1&&(e=ri[t.charCodeAt(s)]<<10|ri[t.charCodeAt(s+1)]<<4|ri[t.charCodeAt(s+2)]>>2,u[r++]=e>>8&255,u[r++]=e&255),u}function Z3(t){return Zi[t>>18&63]+Zi[t>>12&63]+Zi[t>>6&63]+Zi[t&63]}function eO(t,e,n){for(var a,d=[],u=e;u<n;u+=3)a=(t[u]<<16&16711680)+(t[u+1]<<8&65280)+(t[u+2]&255),d.push(Z3(a));return d.join("")}function tO(t){for(var e,n=t.length,a=n%3,d=[],u=16383,r=0,l=n-a;r<l;r+=u)d.push(eO(t,r,r+u>l?l:r+u));return a===1?(e=t[n-1],d.push(Zi[e>>2]+Zi[e<<4&63]+"==")):a===2&&(e=(t[n-2]<<8)+t[n-1],d.push(Zi[e>>10]+Zi[e>>4&63]+Zi[e<<2&63]+"=")),d.join("")}var td={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */td.read=function(t,e,n,a,d){var u,r,l=d*8-a-1,s=(1<<l)-1,f=s>>1,c=-7,i=n?d-1:0,o=n?-1:1,m=t[e+i];for(i+=o,u=m&(1<<-c)-1,m>>=-c,c+=l;c>0;u=u*256+t[e+i],i+=o,c-=8);for(r=u&(1<<-c)-1,u>>=-c,c+=a;c>0;r=r*256+t[e+i],i+=o,c-=8);if(u===0)u=1-f;else{if(u===s)return r?NaN:(m?-1:1)*(1/0);r=r+Math.pow(2,a),u=u-f}return(m?-1:1)*r*Math.pow(2,u-a)};td.write=function(t,e,n,a,d,u){var r,l,s,f=u*8-d-1,c=(1<<f)-1,i=c>>1,o=d===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=a?0:u-1,h=a?1:-1,y=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,r=c):(r=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-r))<1&&(r--,s*=2),r+i>=1?e+=o/s:e+=o*Math.pow(2,1-i),e*s>=2&&(r++,s/=2),r+i>=c?(l=0,r=c):r+i>=1?(l=(e*s-1)*Math.pow(2,d),r=r+i):(l=e*Math.pow(2,i-1)*Math.pow(2,d),r=0));d>=8;t[n+m]=l&255,m+=h,l/=256,d-=8);for(r=r<<d|l,f+=d;f>0;t[n+m]=r&255,m+=h,r/=256,f-=8);t[n+m-h]|=y*128};/*!
2
2
  * The buffer module from node.js, for the browser.
3
3
  *
4
4
  * @author Feross Aboukhadijeh <https://feross.org>
package/dist/index.mjs CHANGED
@@ -4,7 +4,7 @@ function q3(t) {
4
4
  let e = t;
5
5
  const n = [];
6
6
  for (const a of t.matchAll(
7
- /@media\s*\(.*\)\s*{\s*\..*\s*{[\s\S]*?}\s*}/gm
7
+ /@media\s*[^{]*\{(?:[^{}]*\{[^{}]*\})*[^{}]*\}/gm
8
8
  )) {
9
9
  const [d] = a;
10
10
  e = e.replace(d, ""), n.push(d);
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=separate-media-queries-from-css.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"separate-media-queries-from-css.spec.d.ts","sourceRoot":"","sources":["../../../../src/utils/css/media-queries/separate-media-queries-from-css.spec.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-email/tailwind",
3
- "version": "0.0.17-canary.0",
3
+ "version": "0.0.18",
4
4
  "description": "A React component to wrap emails with Tailwind CSS",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -55,11 +55,11 @@
55
55
  "vite": "5.0.13",
56
56
  "vite-plugin-dts": "3.6.3",
57
57
  "vite-plugin-node-polyfills": "0.17.0",
58
- "@react-email/head": "0.0.9-canary.0",
59
- "@react-email/hr": "0.0.8",
60
- "@react-email/html": "0.0.8",
61
58
  "@react-email/button": "^0.0.15",
62
59
  "@react-email/heading": "0.0.12",
60
+ "@react-email/head": "0.0.9",
61
+ "@react-email/hr": "0.0.8",
62
+ "@react-email/html": "0.0.8",
63
63
  "eslint-config-custom": "0.0.0",
64
64
  "tsconfig": "0.0.0"
65
65
  },