@react-email/section
Advanced tools
| {"version":3,"file":"index.d.mts","names":[],"sources":["../src/section.tsx"],"sourcesContent":[],"mappings":";;;KAEY,YAAA,GAAe,SAAS,KAAA,CAAM;cAE7B,SAAO,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/section.tsx"],"sourcesContent":[],"mappings":";;;KAEY,YAAA,GAAe,SAAS,KAAA,CAAM;cAE7B,SAAO,KAAA,CAAA,0BAAA,SAAA,KAAA,KAAA,CAAA,kBAAA,KAAA,CAAA,oBAAA,mBAAA,6BAAA,KAAA,CAAA,cAAA"} |
| {"version":3,"file":"index.mjs","names":[],"sources":["../src/section.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport type SectionProps = Readonly<React.ComponentPropsWithoutRef<'table'>>;\n\nexport const Section = React.forwardRef<HTMLTableElement, SectionProps>(\n ({ children, style, ...props }, ref) => {\n return (\n <table\n align=\"center\"\n width=\"100%\"\n border={0}\n cellPadding=\"0\"\n cellSpacing=\"0\"\n role=\"presentation\"\n {...props}\n ref={ref}\n style={style}\n >\n <tbody>\n <tr>\n <td>{children}</td>\n </tr>\n </tbody>\n </table>\n );\n },\n);\n\nSection.displayName = 'Section';\n"],"mappings":";;;;AAIA,MAAa,UAAU,MAAM,YAC1B,EAAE,UAAU,MAAO,GAAG,SAAS,QAAQ;AACtC,QACE,oBAAC;EACC,OAAM;EACN,OAAM;EACN,QAAQ;EACR,aAAY;EACZ,aAAY;EACZ,MAAK;EACL,GAAI;EACC;EACE;YAEP,oBAAC,qBACC,oBAAC,kBACC,oBAAC,QAAI,WAAc,GAChB,GACC;GACF;EAGb;AAED,QAAQ,cAAc"} |
+6
-4
@@ -1,6 +0,8 @@ | ||
| import * as React from 'react'; | ||
| import * as React from "react"; | ||
| type SectionProps = Readonly<React.ComponentPropsWithoutRef<"table">>; | ||
| //#region src/section.d.ts | ||
| type SectionProps = Readonly<React.ComponentPropsWithoutRef<'table'>>; | ||
| declare const Section: React.ForwardRefExoticComponent<Readonly<Omit<React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "ref">> & React.RefAttributes<HTMLTableElement>>; | ||
| export { Section, type SectionProps }; | ||
| //#endregion | ||
| export { Section, SectionProps }; | ||
| //# sourceMappingURL=index.d.mts.map |
+6
-4
@@ -1,6 +0,8 @@ | ||
| import * as React from 'react'; | ||
| import * as React from "react"; | ||
| type SectionProps = Readonly<React.ComponentPropsWithoutRef<"table">>; | ||
| //#region src/section.d.ts | ||
| type SectionProps = Readonly<React.ComponentPropsWithoutRef<'table'>>; | ||
| declare const Section: React.ForwardRefExoticComponent<Readonly<Omit<React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "ref">> & React.RefAttributes<HTMLTableElement>>; | ||
| export { Section, type SectionProps }; | ||
| //#endregion | ||
| export { Section, SectionProps }; | ||
| //# sourceMappingURL=index.d.ts.map |
+36
-82
@@ -1,93 +0,47 @@ | ||
| "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, { | ||
| Section: () => Section | ||
| //#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/section.tsx | ||
| const Section = react.forwardRef(({ children, style,...props }, ref) => { | ||
| return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("table", { | ||
| align: "center", | ||
| width: "100%", | ||
| border: 0, | ||
| cellPadding: "0", | ||
| cellSpacing: "0", | ||
| role: "presentation", | ||
| ...props, | ||
| ref, | ||
| style, | ||
| children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children }) }) }) | ||
| }); | ||
| }); | ||
| module.exports = __toCommonJS(src_exports); | ||
| Section.displayName = "Section"; | ||
| // src/section.tsx | ||
| var React = __toESM(require("react")); | ||
| var import_jsx_runtime = require("react/jsx-runtime"); | ||
| var Section = 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%", | ||
| border: 0, | ||
| cellPadding: "0", | ||
| cellSpacing: "0", | ||
| role: "presentation" | ||
| }, props), { | ||
| ref, | ||
| style, | ||
| children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children }) }) }) | ||
| }) | ||
| ); | ||
| } | ||
| ); | ||
| Section.displayName = "Section"; | ||
| // Annotate the CommonJS export names for ESM import in node: | ||
| 0 && (module.exports = { | ||
| Section | ||
| }); | ||
| //#endregion | ||
| exports.Section = Section; |
+20
-56
@@ -1,59 +0,23 @@ | ||
| 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/section.tsx | ||
| import * as React from "react"; | ||
| import { jsx } from "react/jsx-runtime"; | ||
| var Section = 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%", | ||
| border: 0, | ||
| cellPadding: "0", | ||
| cellSpacing: "0", | ||
| role: "presentation" | ||
| }, props), { | ||
| ref, | ||
| style, | ||
| children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { children }) }) }) | ||
| }) | ||
| ); | ||
| } | ||
| ); | ||
| //#region src/section.tsx | ||
| const Section = React.forwardRef(({ children, style,...props }, ref) => { | ||
| return /* @__PURE__ */ jsx("table", { | ||
| align: "center", | ||
| width: "100%", | ||
| border: 0, | ||
| cellPadding: "0", | ||
| cellSpacing: "0", | ||
| role: "presentation", | ||
| ...props, | ||
| ref, | ||
| style, | ||
| children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { children }) }) }) | ||
| }); | ||
| }); | ||
| Section.displayName = "Section"; | ||
| export { | ||
| Section | ||
| }; | ||
| //#endregion | ||
| export { Section }; | ||
| //# sourceMappingURL=index.mjs.map |
+8
-10
| { | ||
| "name": "@react-email/section", | ||
| "version": "0.0.16", | ||
| "version": "0.0.17", | ||
| "description": "Display a section that can be formatted using columns", | ||
@@ -35,3 +35,3 @@ "sideEffects": false, | ||
| "engines": { | ||
| "node": ">=18.0.0" | ||
| "node": ">=20.0.0" | ||
| }, | ||
@@ -42,5 +42,4 @@ "peerDependencies": { | ||
| "devDependencies": { | ||
| "typescript": "5.1.6", | ||
| "@react-email/render": "1.0.3", | ||
| "eslint-config-custom": "0.0.0", | ||
| "typescript": "5.8.3", | ||
| "@react-email/render": "2.0.1", | ||
| "tsconfig": "0.0.0" | ||
@@ -52,9 +51,8 @@ }, | ||
| "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 @@ |
3
-25%10
42.86%10257
-15.03%69
-54.9%72
-1.37%