@react-email/container
Advanced tools
| {"version":3,"file":"index.d.mts","names":[],"sources":["../src/container.tsx"],"sourcesContent":[],"mappings":";;;KAEY,cAAA,GAAiB,SAAS,KAAA,CAAM;cAE/B,WAAS,KAAA,CAAA,0BAAA,SAAA,KAAA,KAAA,CAAA,kBAAA,KAAA,CAAA,oBAAA,mBAAA,6BAAA,KAAA,CAAA,cAAA"} |
| {"version":3,"file":"index.d.ts","names":[],"sources":["../src/container.tsx"],"sourcesContent":[],"mappings":";;;KAEY,cAAA,GAAiB,SAAS,KAAA,CAAM;cAE/B,WAAS,KAAA,CAAA,0BAAA,SAAA,KAAA,KAAA,CAAA,kBAAA,KAAA,CAAA,oBAAA,mBAAA,6BAAA,KAAA,CAAA,cAAA"} |
| {"version":3,"file":"index.mjs","names":[],"sources":["../src/container.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport type ContainerProps = Readonly<React.ComponentPropsWithoutRef<'table'>>;\n\nexport const Container = React.forwardRef<HTMLTableElement, ContainerProps>(\n ({ children, style, ...props }, ref) => {\n return (\n <table\n align=\"center\"\n width=\"100%\"\n {...props}\n border={0}\n cellPadding=\"0\"\n cellSpacing=\"0\"\n ref={ref}\n role=\"presentation\"\n style={{ maxWidth: '37.5em', ...style }}\n >\n <tbody>\n <tr style={{ width: '100%' }}>\n <td>{children}</td>\n </tr>\n </tbody>\n </table>\n );\n },\n);\n\nContainer.displayName = 'Container';\n(Container as any).tailwindTreatAsElement = true;\n"],"mappings":";;;;AAIA,MAAa,YAAY,MAAM,YAC5B,EAAE,UAAU,MAAO,GAAG,SAAS,QAAQ;AACtC,QACE,oBAAC;EACC,OAAM;EACN,OAAM;EACN,GAAI;EACJ,QAAQ;EACR,aAAY;EACZ,aAAY;EACP;EACL,MAAK;EACL,OAAO;GAAE,UAAU;GAAU,GAAG;GAAO;YAEvC,oBAAC,qBACC,oBAAC;GAAG,OAAO,EAAE,OAAO,QAAQ;aAC1B,oBAAC,QAAI,WAAc;IAChB,GACC;GACF;EAGb;AAED,UAAU,cAAc;AACxB,AAAC,UAAkB,yBAAyB"} |
+6
-4
@@ -1,6 +0,8 @@ | ||
| import * as React from 'react'; | ||
| import * as React from "react"; | ||
| type ContainerProps = Readonly<React.ComponentPropsWithoutRef<"table">>; | ||
| //#region src/container.d.ts | ||
| type ContainerProps = Readonly<React.ComponentPropsWithoutRef<'table'>>; | ||
| declare const Container: React.ForwardRefExoticComponent<Readonly<Omit<React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "ref">> & React.RefAttributes<HTMLTableElement>>; | ||
| export { Container, type ContainerProps }; | ||
| //#endregion | ||
| export { Container, ContainerProps }; | ||
| //# sourceMappingURL=index.d.mts.map |
+6
-4
@@ -1,6 +0,8 @@ | ||
| import * as React from 'react'; | ||
| import * as React from "react"; | ||
| type ContainerProps = Readonly<React.ComponentPropsWithoutRef<"table">>; | ||
| //#region src/container.d.ts | ||
| type ContainerProps = Readonly<React.ComponentPropsWithoutRef<'table'>>; | ||
| declare const Container: React.ForwardRefExoticComponent<Readonly<Omit<React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "ref">> & React.RefAttributes<HTMLTableElement>>; | ||
| export { Container, type ContainerProps }; | ||
| //#endregion | ||
| export { Container, ContainerProps }; | ||
| //# sourceMappingURL=index.d.ts.map |
+43
-82
@@ -1,93 +0,54 @@ | ||
| "use strict"; | ||
| //#region rolldown:runtime | ||
| var __create = Object.create; | ||
| var __defProp = Object.defineProperty; | ||
| var __defProps = Object.defineProperties; | ||
| var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
| var __getOwnPropDescs = Object.getOwnPropertyDescriptors; | ||
| var __getOwnPropNames = Object.getOwnPropertyNames; | ||
| var __getOwnPropSymbols = Object.getOwnPropertySymbols; | ||
| var __getProtoOf = Object.getPrototypeOf; | ||
| var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
| var __propIsEnum = Object.prototype.propertyIsEnumerable; | ||
| var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; | ||
| var __spreadValues = (a, b) => { | ||
| for (var prop in b || (b = {})) | ||
| if (__hasOwnProp.call(b, prop)) | ||
| __defNormalProp(a, prop, b[prop]); | ||
| if (__getOwnPropSymbols) | ||
| for (var prop of __getOwnPropSymbols(b)) { | ||
| if (__propIsEnum.call(b, prop)) | ||
| __defNormalProp(a, prop, b[prop]); | ||
| } | ||
| return a; | ||
| }; | ||
| var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); | ||
| var __objRest = (source, exclude) => { | ||
| var target = {}; | ||
| for (var prop in source) | ||
| if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) | ||
| target[prop] = source[prop]; | ||
| if (source != null && __getOwnPropSymbols) | ||
| for (var prop of __getOwnPropSymbols(source)) { | ||
| if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) | ||
| target[prop] = source[prop]; | ||
| } | ||
| return target; | ||
| }; | ||
| var __export = (target, all) => { | ||
| for (var name in all) | ||
| __defProp(target, name, { get: all[name], enumerable: true }); | ||
| }; | ||
| var __copyProps = (to, from, except, desc) => { | ||
| if (from && typeof from === "object" || typeof from === "function") { | ||
| for (let key of __getOwnPropNames(from)) | ||
| if (!__hasOwnProp.call(to, key) && key !== except) | ||
| __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | ||
| } | ||
| return to; | ||
| if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { | ||
| key = keys[i]; | ||
| if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { | ||
| get: ((k) => from[k]).bind(null, key), | ||
| enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable | ||
| }); | ||
| } | ||
| return to; | ||
| }; | ||
| var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | ||
| // If the importer is in node compatibility mode or this is not an ESM | ||
| // file that has been converted to a CommonJS file using a Babel- | ||
| // compatible transform (i.e. "__esModule" has not been set), then set | ||
| // "default" to the CommonJS "module.exports" for node compatibility. | ||
| isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | ||
| mod | ||
| )); | ||
| var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
| var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { | ||
| value: mod, | ||
| enumerable: true | ||
| }) : target, mod)); | ||
| // src/index.ts | ||
| var src_exports = {}; | ||
| __export(src_exports, { | ||
| Container: () => Container | ||
| //#endregion | ||
| let react = require("react"); | ||
| react = __toESM(react); | ||
| let react_jsx_runtime = require("react/jsx-runtime"); | ||
| react_jsx_runtime = __toESM(react_jsx_runtime); | ||
| //#region src/container.tsx | ||
| const Container = react.forwardRef(({ children, style,...props }, ref) => { | ||
| return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("table", { | ||
| align: "center", | ||
| width: "100%", | ||
| ...props, | ||
| border: 0, | ||
| cellPadding: "0", | ||
| cellSpacing: "0", | ||
| ref, | ||
| role: "presentation", | ||
| style: { | ||
| maxWidth: "37.5em", | ||
| ...style | ||
| }, | ||
| children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", { | ||
| style: { width: "100%" }, | ||
| children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children }) | ||
| }) }) | ||
| }); | ||
| }); | ||
| module.exports = __toCommonJS(src_exports); | ||
| Container.displayName = "Container"; | ||
| Container.tailwindTreatAsElement = true; | ||
| // src/container.tsx | ||
| var React = __toESM(require("react")); | ||
| var import_jsx_runtime = require("react/jsx-runtime"); | ||
| var Container = React.forwardRef( | ||
| (_a, ref) => { | ||
| var _b = _a, { children, style } = _b, props = __objRest(_b, ["children", "style"]); | ||
| return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( | ||
| "table", | ||
| __spreadProps(__spreadValues({ | ||
| align: "center", | ||
| width: "100%" | ||
| }, props), { | ||
| border: 0, | ||
| cellPadding: "0", | ||
| cellSpacing: "0", | ||
| ref, | ||
| role: "presentation", | ||
| style: __spreadValues({ maxWidth: "37.5em" }, style), | ||
| children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { style: { width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children }) }) }) | ||
| }) | ||
| ); | ||
| } | ||
| ); | ||
| Container.displayName = "Container"; | ||
| // Annotate the CommonJS export names for ESM import in node: | ||
| 0 && (module.exports = { | ||
| Container | ||
| }); | ||
| //#endregion | ||
| exports.Container = Container; |
+27
-56
@@ -1,59 +0,30 @@ | ||
| var __defProp = Object.defineProperty; | ||
| var __defProps = Object.defineProperties; | ||
| var __getOwnPropDescs = Object.getOwnPropertyDescriptors; | ||
| var __getOwnPropSymbols = Object.getOwnPropertySymbols; | ||
| var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
| var __propIsEnum = Object.prototype.propertyIsEnumerable; | ||
| var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; | ||
| var __spreadValues = (a, b) => { | ||
| for (var prop in b || (b = {})) | ||
| if (__hasOwnProp.call(b, prop)) | ||
| __defNormalProp(a, prop, b[prop]); | ||
| if (__getOwnPropSymbols) | ||
| for (var prop of __getOwnPropSymbols(b)) { | ||
| if (__propIsEnum.call(b, prop)) | ||
| __defNormalProp(a, prop, b[prop]); | ||
| } | ||
| return a; | ||
| }; | ||
| var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); | ||
| var __objRest = (source, exclude) => { | ||
| var target = {}; | ||
| for (var prop in source) | ||
| if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) | ||
| target[prop] = source[prop]; | ||
| if (source != null && __getOwnPropSymbols) | ||
| for (var prop of __getOwnPropSymbols(source)) { | ||
| if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) | ||
| target[prop] = source[prop]; | ||
| } | ||
| return target; | ||
| }; | ||
| // src/container.tsx | ||
| import * as React from "react"; | ||
| import { jsx } from "react/jsx-runtime"; | ||
| var Container = React.forwardRef( | ||
| (_a, ref) => { | ||
| var _b = _a, { children, style } = _b, props = __objRest(_b, ["children", "style"]); | ||
| return /* @__PURE__ */ jsx( | ||
| "table", | ||
| __spreadProps(__spreadValues({ | ||
| align: "center", | ||
| width: "100%" | ||
| }, props), { | ||
| border: 0, | ||
| cellPadding: "0", | ||
| cellSpacing: "0", | ||
| ref, | ||
| role: "presentation", | ||
| style: __spreadValues({ maxWidth: "37.5em" }, style), | ||
| children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsx("tr", { style: { width: "100%" }, children: /* @__PURE__ */ jsx("td", { children }) }) }) | ||
| }) | ||
| ); | ||
| } | ||
| ); | ||
| //#region src/container.tsx | ||
| const Container = React.forwardRef(({ children, style,...props }, ref) => { | ||
| return /* @__PURE__ */ jsx("table", { | ||
| align: "center", | ||
| width: "100%", | ||
| ...props, | ||
| border: 0, | ||
| cellPadding: "0", | ||
| cellSpacing: "0", | ||
| ref, | ||
| role: "presentation", | ||
| style: { | ||
| maxWidth: "37.5em", | ||
| ...style | ||
| }, | ||
| children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsx("tr", { | ||
| style: { width: "100%" }, | ||
| children: /* @__PURE__ */ jsx("td", { children }) | ||
| }) }) | ||
| }); | ||
| }); | ||
| Container.displayName = "Container"; | ||
| export { | ||
| Container | ||
| }; | ||
| Container.tailwindTreatAsElement = true; | ||
| //#endregion | ||
| export { Container }; | ||
| //# sourceMappingURL=index.mjs.map |
+8
-10
| { | ||
| "name": "@react-email/container", | ||
| "version": "0.0.15", | ||
| "version": "0.0.16-tailwindv4.0", | ||
| "description": "A layout component that centers all the email content", | ||
@@ -41,6 +41,5 @@ "sideEffects": false, | ||
| "devDependencies": { | ||
| "typescript": "5.1.6", | ||
| "@react-email/render": "1.0.3", | ||
| "tsconfig": "0.0.0", | ||
| "eslint-config-custom": "0.0.0" | ||
| "typescript": "5.8.3", | ||
| "@react-email/render": "1.3.1", | ||
| "tsconfig": "0.0.0" | ||
| }, | ||
@@ -51,9 +50,8 @@ "publishConfig": { | ||
| "scripts": { | ||
| "build": "tsup src/index.ts --format esm,cjs --dts --external react", | ||
| "build": "tsdown src/index.ts --format esm,cjs --dts --external react", | ||
| "build:watch": "tsdown src/index.ts --format esm,cjs --dts --external react --watch", | ||
| "clean": "rm -rf dist", | ||
| "dev": "tsup src/index.ts --format esm,cjs --dts --external react --watch", | ||
| "lint": "eslint .", | ||
| "test:watch": "vitest", | ||
| "test": "vitest run" | ||
| "test": "vitest run", | ||
| "test:watch": "vitest" | ||
| } | ||
| } |
+3
-4
@@ -7,7 +7,6 @@  | ||
| <div align="center"> | ||
| <a href="https://react.email">Website</a> | ||
| <a href="https://react.email">Website</a> | ||
| <span> · </span> | ||
| <a href="https://github.com/resend/react-email">GitHub</a> | ||
| <span> · </span> | ||
| <a href="https://react.email/discord">Discord</a> | ||
| <a href="https://github.com/resend/react-email">GitHub</a> | ||
| </div> | ||
@@ -14,0 +13,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
3
-25%10
42.86%8451
-15.15%83
-45.75%51
-1.92%1
Infinity%