@react-email/body 0.1.0 → 0.1.1-tailwindv4.0

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.d.mts CHANGED
@@ -1,6 +1,8 @@
1
- import * as React from 'react';
1
+ import * as React from "react";
2
2
 
3
+ //#region src/body.d.ts
3
4
  type BodyProps = Readonly<React.HtmlHTMLAttributes<HTMLBodyElement>>;
4
5
  declare const Body: React.ForwardRefExoticComponent<Readonly<React.HtmlHTMLAttributes<HTMLBodyElement>> & React.RefAttributes<HTMLBodyElement>>;
5
-
6
- export { Body, type BodyProps };
6
+ //#endregion
7
+ export { Body, BodyProps };
8
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/body.tsx"],"sourcesContent":[],"mappings":";;;KAEY,SAAA,GAAY,SAAS,KAAA,CAAM,mBAAmB;cAE7C,MAAI,KAAA,CAAA,0BAAA,SAAA,KAAA,CAAA,mBAAA,oBAAA,KAAA,CAAA,cAAA"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
- import * as React from 'react';
1
+ import * as React from "react";
2
2
 
3
+ //#region src/body.d.ts
3
4
  type BodyProps = Readonly<React.HtmlHTMLAttributes<HTMLBodyElement>>;
4
5
  declare const Body: React.ForwardRefExoticComponent<Readonly<React.HtmlHTMLAttributes<HTMLBodyElement>> & React.RefAttributes<HTMLBodyElement>>;
5
-
6
- export { Body, type BodyProps };
6
+ //#endregion
7
+ export { Body, BodyProps };
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/body.tsx"],"sourcesContent":[],"mappings":";;;KAEY,SAAA,GAAY,SAAS,KAAA,CAAM,mBAAmB;cAE7C,MAAI,KAAA,CAAA,0BAAA,SAAA,KAAA,CAAA,mBAAA,oBAAA,KAAA,CAAA,cAAA"}
package/dist/index.js CHANGED
@@ -1,100 +1,56 @@
1
- "use strict";
1
+ //#region rolldown:runtime
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
- var __defProps = Object.defineProperties;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
6
  var __getProtoOf = Object.getPrototypeOf;
10
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
11
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
- var __spreadValues = (a, b) => {
14
- for (var prop in b || (b = {}))
15
- if (__hasOwnProp.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- if (__getOwnPropSymbols)
18
- for (var prop of __getOwnPropSymbols(b)) {
19
- if (__propIsEnum.call(b, prop))
20
- __defNormalProp(a, prop, b[prop]);
21
- }
22
- return a;
23
- };
24
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
- var __objRest = (source, exclude) => {
26
- var target = {};
27
- for (var prop in source)
28
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
- target[prop] = source[prop];
30
- if (source != null && __getOwnPropSymbols)
31
- for (var prop of __getOwnPropSymbols(source)) {
32
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
- target[prop] = source[prop];
34
- }
35
- return target;
36
- };
37
- var __export = (target, all) => {
38
- for (var name in all)
39
- __defProp(target, name, { get: all[name], enumerable: true });
40
- };
41
8
  var __copyProps = (to, from, except, desc) => {
42
- if (from && typeof from === "object" || typeof from === "function") {
43
- for (let key of __getOwnPropNames(from))
44
- if (!__hasOwnProp.call(to, key) && key !== except)
45
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
46
- }
47
- return to;
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
15
+ }
16
+ return to;
48
17
  };
49
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
- // If the importer is in node compatibility mode or this is not an ESM
51
- // file that has been converted to a CommonJS file using a Babel-
52
- // compatible transform (i.e. "__esModule" has not been set), then set
53
- // "default" to the CommonJS "module.exports" for node compatibility.
54
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
- mod
56
- ));
57
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
+ value: mod,
20
+ enumerable: true
21
+ }) : target, mod));
58
22
 
59
- // src/index.ts
60
- var index_exports = {};
61
- __export(index_exports, {
62
- Body: () => Body
63
- });
64
- module.exports = __toCommonJS(index_exports);
23
+ //#endregion
24
+ let react = require("react");
25
+ react = __toESM(react);
26
+ let react_jsx_runtime = require("react/jsx-runtime");
27
+ react_jsx_runtime = __toESM(react_jsx_runtime);
65
28
 
66
- // src/body.tsx
67
- var React = __toESM(require("react"));
68
- var import_jsx_runtime = require("react/jsx-runtime");
69
- var Body = React.forwardRef(
70
- (_a, ref) => {
71
- var _b = _a, { children, style } = _b, props = __objRest(_b, ["children", "style"]);
72
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
73
- "body",
74
- __spreadProps(__spreadValues({}, props), {
75
- style: {
76
- background: style == null ? void 0 : style.background,
77
- backgroundColor: style == null ? void 0 : style.backgroundColor
78
- },
79
- ref,
80
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
81
- "table",
82
- {
83
- border: 0,
84
- width: "100%",
85
- cellPadding: "0",
86
- cellSpacing: "0",
87
- role: "presentation",
88
- align: "center",
89
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { style, children }) }) })
90
- }
91
- )
92
- })
93
- );
94
- }
95
- );
96
- Body.displayName = "Body";
97
- // Annotate the CommonJS export names for ESM import in node:
98
- 0 && (module.exports = {
99
- Body
29
+ //#region src/body.tsx
30
+ const Body = react.forwardRef(({ children, style,...props }, ref) => {
31
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("body", {
32
+ ...props,
33
+ style: {
34
+ background: style?.background,
35
+ backgroundColor: style?.backgroundColor
36
+ },
37
+ ref,
38
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("table", {
39
+ border: 0,
40
+ width: "100%",
41
+ cellPadding: "0",
42
+ cellSpacing: "0",
43
+ role: "presentation",
44
+ align: "center",
45
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
46
+ style,
47
+ children
48
+ }) }) })
49
+ })
50
+ });
100
51
  });
52
+ Body.displayName = "Body";
53
+ Body.tailwindTreatAsElement = true;
54
+
55
+ //#endregion
56
+ exports.Body = Body;
package/dist/index.mjs CHANGED
@@ -1,66 +1,32 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __objRest = (source, exclude) => {
21
- var target = {};
22
- for (var prop in source)
23
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
- target[prop] = source[prop];
25
- if (source != null && __getOwnPropSymbols)
26
- for (var prop of __getOwnPropSymbols(source)) {
27
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
- target[prop] = source[prop];
29
- }
30
- return target;
31
- };
32
-
33
- // src/body.tsx
34
1
  import * as React from "react";
35
2
  import { jsx } from "react/jsx-runtime";
36
- var Body = React.forwardRef(
37
- (_a, ref) => {
38
- var _b = _a, { children, style } = _b, props = __objRest(_b, ["children", "style"]);
39
- return /* @__PURE__ */ jsx(
40
- "body",
41
- __spreadProps(__spreadValues({}, props), {
42
- style: {
43
- background: style == null ? void 0 : style.background,
44
- backgroundColor: style == null ? void 0 : style.backgroundColor
45
- },
46
- ref,
47
- children: /* @__PURE__ */ jsx(
48
- "table",
49
- {
50
- border: 0,
51
- width: "100%",
52
- cellPadding: "0",
53
- cellSpacing: "0",
54
- role: "presentation",
55
- align: "center",
56
- children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { style, children }) }) })
57
- }
58
- )
59
- })
60
- );
61
- }
62
- );
3
+
4
+ //#region src/body.tsx
5
+ const Body = React.forwardRef(({ children, style,...props }, ref) => {
6
+ return /* @__PURE__ */ jsx("body", {
7
+ ...props,
8
+ style: {
9
+ background: style?.background,
10
+ backgroundColor: style?.backgroundColor
11
+ },
12
+ ref,
13
+ children: /* @__PURE__ */ jsx("table", {
14
+ border: 0,
15
+ width: "100%",
16
+ cellPadding: "0",
17
+ cellSpacing: "0",
18
+ role: "presentation",
19
+ align: "center",
20
+ children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
21
+ style,
22
+ children
23
+ }) }) })
24
+ })
25
+ });
26
+ });
63
27
  Body.displayName = "Body";
64
- export {
65
- Body
66
- };
28
+ Body.tailwindTreatAsElement = true;
29
+
30
+ //#endregion
31
+ export { Body };
32
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/body.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport type BodyProps = Readonly<React.HtmlHTMLAttributes<HTMLBodyElement>>;\n\nexport const Body = React.forwardRef<HTMLBodyElement, BodyProps>(\n ({ children, style, ...props }, ref) => {\n return (\n <body\n {...props}\n style={{\n background: style?.background,\n backgroundColor: style?.backgroundColor,\n }}\n ref={ref}\n >\n <table\n border={0}\n width=\"100%\"\n cellPadding=\"0\"\n cellSpacing=\"0\"\n role=\"presentation\"\n align=\"center\"\n >\n <tbody>\n <tr>\n {/*\n Yahoo and AOL remove all styles of the body element while converting it to a div,\n so we need to apply them to to an inner cell.\n\n See https://github.com/resend/react-email/issues/662.\n */}\n <td style={style}>{children}</td>\n </tr>\n </tbody>\n </table>\n </body>\n );\n },\n);\n\nBody.displayName = 'Body';\n(Body as any).tailwindTreatAsElement = true;\n"],"mappings":";;;;AAIA,MAAa,OAAO,MAAM,YACvB,EAAE,UAAU,MAAO,GAAG,SAAS,QAAQ;AACtC,QACE,oBAAC;EACC,GAAI;EACJ,OAAO;GACL,YAAY,OAAO;GACnB,iBAAiB,OAAO;GACzB;EACI;YAEL,oBAAC;GACC,QAAQ;GACR,OAAM;GACN,aAAY;GACZ,aAAY;GACZ,MAAK;GACL,OAAM;aAEN,oBAAC,qBACC,oBAAC,kBAOC,oBAAC;IAAU;IAAQ;KAAc,GAC9B,GACC;IACF;GACH;EAGZ;AAED,KAAK,cAAc;AACnB,AAAC,KAAa,yBAAyB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-email/body",
3
- "version": "0.1.0",
3
+ "version": "0.1.1-tailwindv4.0",
4
4
  "description": "A React body component to wrap emails",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -27,15 +27,15 @@
27
27
  },
28
28
  "devDependencies": {
29
29
  "typescript": "5.8.3",
30
- "@react-email/render": "1.1.4",
30
+ "@react-email/render": "1.3.1",
31
31
  "tsconfig": "0.0.0"
32
32
  },
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
36
  "scripts": {
37
- "build": "tsup src/index.ts --format esm,cjs --dts --external react",
38
- "build:watch": "tsup src/index.ts --format esm,cjs --dts --external react --watch",
37
+ "build": "tsdown src/index.ts --format esm,cjs --dts --external react",
38
+ "build:watch": "tsdown src/index.ts --format esm,cjs --dts --external react --watch",
39
39
  "clean": "rm -rf dist",
40
40
  "test": "vitest run",
41
41
  "test:watch": "vitest"