@m5kdev/email 0.8.7 → 0.8.8
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/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/src/components/BrandFooter.cjs +19 -0
- package/dist/src/components/BrandFooter.cjs.map +1 -0
- package/dist/src/components/BrandFooter.d.cts +12 -0
- package/dist/src/components/BrandHeader.cjs +25 -0
- package/dist/src/components/BrandHeader.cjs.map +1 -0
- package/dist/src/components/BrandHeader.d.cts +12 -0
- package/dist/src/components/CtaButton.cjs +19 -0
- package/dist/src/components/CtaButton.cjs.map +1 -0
- package/dist/src/components/CtaButton.d.cts +15 -0
- package/dist/src/components/EmailLayout.cjs +41 -0
- package/dist/src/components/EmailLayout.cjs.map +1 -0
- package/dist/src/components/EmailLayout.d.cts +18 -0
- package/dist/src/types.cjs +0 -0
- package/dist/src/types.d.cts +9 -0
- package/package.json +18 -6
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
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;
|
|
17
|
+
};
|
|
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));
|
|
22
|
+
//#endregion
|
|
23
|
+
exports.__toESM = __toESM;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("../../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
require("react");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
let _react_email_components = require("@react-email/components");
|
|
6
|
+
//#region src/components/BrandFooter.tsx
|
|
7
|
+
function BrandFooter({ brand }) {
|
|
8
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_react_email_components.Section, {
|
|
9
|
+
className: "py-4",
|
|
10
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_react_email_components.Text, {
|
|
11
|
+
className: "text-center text-sm text-gray-500 m-0",
|
|
12
|
+
children: `${brand.name} - ${brand.tagline}`
|
|
13
|
+
})
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
exports.BrandFooter = BrandFooter;
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=BrandFooter.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrandFooter.cjs","names":["Section","Text"],"sources":["../../../src/components/BrandFooter.tsx"],"sourcesContent":["import React from \"react\";\r\n\r\n// Ensure React is loaded for the classic JSX runtime used during email rendering.\r\nvoid React;\r\n\r\nimport { Section, Text } from \"@react-email/components\";\r\nimport type { Brand } from \"../types\";\r\n\r\nexport function BrandFooter({ brand }: { brand: Brand }) {\r\n return (\r\n <Section className=\"py-4\">\r\n <Text className=\"text-center text-sm text-gray-500 m-0\">{`${brand.name} - ${brand.tagline}`}</Text>\r\n </Section>\r\n );\r\n}\r\n"],"mappings":";;;;;;AAQA,SAAgB,YAAY,EAAE,SAA2B;AACvD,QACE,iBAAA,GAAA,kBAAA,KAACA,wBAAAA,SAAD;EAAS,WAAU;YACjB,iBAAA,GAAA,kBAAA,KAACC,wBAAAA,MAAD;GAAM,WAAU;aAAyC,GAAG,MAAM,KAAK,KAAK,MAAM;GAAiB,CAAA;EAC3F,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Brand } from "../types.cjs";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/BrandFooter.d.ts
|
|
5
|
+
declare function BrandFooter({
|
|
6
|
+
brand
|
|
7
|
+
}: {
|
|
8
|
+
brand: Brand;
|
|
9
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { BrandFooter };
|
|
12
|
+
//# sourceMappingURL=BrandFooter.d.cts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("../../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
require("react");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
let _react_email_components = require("@react-email/components");
|
|
6
|
+
//#region src/components/BrandHeader.tsx
|
|
7
|
+
function BrandHeader({ brand }) {
|
|
8
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_react_email_components.Container, {
|
|
9
|
+
className: "py-2",
|
|
10
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_react_email_components.Row, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_react_email_components.Column, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_react_email_components.Img, {
|
|
11
|
+
src: brand.logo,
|
|
12
|
+
alt: `${brand.name} Logo`,
|
|
13
|
+
width: "80",
|
|
14
|
+
height: "80",
|
|
15
|
+
className: "mx-auto"
|
|
16
|
+
}) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_react_email_components.Row, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_react_email_components.Column, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_react_email_components.Text, {
|
|
17
|
+
className: "text-2xl font-bold text-black text-center my-1",
|
|
18
|
+
children: brand.name
|
|
19
|
+
}) }) })]
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
exports.BrandHeader = BrandHeader;
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=BrandHeader.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrandHeader.cjs","names":["Container","Row","Column","Img","Text"],"sources":["../../../src/components/BrandHeader.tsx"],"sourcesContent":["import React from \"react\";\r\n\r\n// Ensure React is loaded for the classic JSX runtime used during email rendering.\r\nvoid React;\r\n\r\nimport { Column, Container, Img, Row, Text } from \"@react-email/components\";\r\nimport type { Brand } from \"../types\";\r\n\r\nexport function BrandHeader({ brand }: { brand: Brand }) {\r\n return (\r\n <Container className=\"py-2\">\r\n <Row>\r\n <Column>\r\n <Img\r\n src={brand.logo}\r\n alt={`${brand.name} Logo`}\r\n width=\"80\"\r\n height=\"80\"\r\n className=\"mx-auto\"\r\n />\r\n </Column>\r\n </Row>\r\n <Row>\r\n <Column>\r\n <Text className=\"text-2xl font-bold text-black text-center my-1\">{brand.name}</Text>\r\n </Column>\r\n </Row>\r\n </Container>\r\n );\r\n}\r\n"],"mappings":";;;;;;AAQA,SAAgB,YAAY,EAAE,SAA2B;AACvD,QACE,iBAAA,GAAA,kBAAA,MAACA,wBAAAA,WAAD;EAAW,WAAU;YAArB,CACE,iBAAA,GAAA,kBAAA,KAACC,wBAAAA,KAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,KAACC,wBAAAA,QAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,KAACC,wBAAAA,KAAD;GACE,KAAK,MAAM;GACX,KAAK,GAAG,MAAM,KAAK;GACnB,OAAM;GACN,QAAO;GACP,WAAU;GACV,CAAA,EACK,CAAA,EACL,CAAA,EACN,iBAAA,GAAA,kBAAA,KAACF,wBAAAA,KAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,KAACC,wBAAAA,QAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,KAACE,wBAAAA,MAAD;GAAM,WAAU;aAAkD,MAAM;GAAY,CAAA,EAC7E,CAAA,EACL,CAAA,CACI"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Brand } from "../types.cjs";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/BrandHeader.d.ts
|
|
5
|
+
declare function BrandHeader({
|
|
6
|
+
brand
|
|
7
|
+
}: {
|
|
8
|
+
brand: Brand;
|
|
9
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { BrandHeader };
|
|
12
|
+
//# sourceMappingURL=BrandHeader.d.cts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("../../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
require("react");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
let _react_email_components = require("@react-email/components");
|
|
6
|
+
//#region src/components/CtaButton.tsx
|
|
7
|
+
function CtaButton({ href, children }) {
|
|
8
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_react_email_components.Button, {
|
|
9
|
+
href,
|
|
10
|
+
className: "bg-black text-white px-6 py-3 rounded-md font-medium",
|
|
11
|
+
target: "_blank",
|
|
12
|
+
rel: "noopener noreferrer",
|
|
13
|
+
children
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
exports.CtaButton = CtaButton;
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=CtaButton.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CtaButton.cjs","names":["Button"],"sources":["../../../src/components/CtaButton.tsx"],"sourcesContent":["import React from \"react\";\r\n\r\n// Ensure React is loaded for the classic JSX runtime used during email rendering.\r\nvoid React;\r\n\r\nimport { Button } from \"@react-email/components\";\r\n\r\ninterface CtaButtonProps {\r\n readonly href: string;\r\n readonly children: React.ReactNode;\r\n}\r\n\r\nexport function CtaButton({ href, children }: CtaButtonProps) {\r\n return (\r\n <Button\r\n href={href}\r\n className=\"bg-black text-white px-6 py-3 rounded-md font-medium\"\r\n target=\"_blank\"\r\n rel=\"noopener noreferrer\"\r\n >\r\n {children}\r\n </Button>\r\n );\r\n}\r\n"],"mappings":";;;;;;AAYA,SAAgB,UAAU,EAAE,MAAM,YAA4B;AAC5D,QACE,iBAAA,GAAA,kBAAA,KAACA,wBAAAA,QAAD;EACQ;EACN,WAAU;EACV,QAAO;EACP,KAAI;EAEH;EACM,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/CtaButton.d.ts
|
|
5
|
+
interface CtaButtonProps {
|
|
6
|
+
readonly href: string;
|
|
7
|
+
readonly children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare function CtaButton({
|
|
10
|
+
href,
|
|
11
|
+
children
|
|
12
|
+
}: CtaButtonProps): _$react_jsx_runtime0.JSX.Element;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { CtaButton };
|
|
15
|
+
//# sourceMappingURL=CtaButton.d.cts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("../../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
const require_src_components_BrandFooter = require("./BrandFooter.cjs");
|
|
4
|
+
const require_src_components_BrandHeader = require("./BrandHeader.cjs");
|
|
5
|
+
require("react");
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
let _react_email_components = require("@react-email/components");
|
|
8
|
+
//#region src/components/EmailLayout.tsx
|
|
9
|
+
function EmailLayout({ previewText, brand, children }) {
|
|
10
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_react_email_components.Html, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_react_email_components.Head, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_react_email_components.Tailwind, {
|
|
11
|
+
config: {
|
|
12
|
+
presets: [_react_email_components.pixelBasedPreset],
|
|
13
|
+
theme: { extend: {
|
|
14
|
+
colors: {
|
|
15
|
+
brand: "#2250f4",
|
|
16
|
+
offwhite: "#fafbfb"
|
|
17
|
+
},
|
|
18
|
+
spacing: {
|
|
19
|
+
0: "0px",
|
|
20
|
+
20: "20px",
|
|
21
|
+
45: "45px"
|
|
22
|
+
}
|
|
23
|
+
} }
|
|
24
|
+
},
|
|
25
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_react_email_components.Preview, { children: previewText }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_react_email_components.Body, {
|
|
26
|
+
className: "bg-offwhite font-sans text-base",
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src_components_BrandHeader.BrandHeader, { brand }),
|
|
29
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_react_email_components.Container, {
|
|
30
|
+
className: "rounded-lg border border-gray-200 bg-white p-8",
|
|
31
|
+
children
|
|
32
|
+
}),
|
|
33
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src_components_BrandFooter.BrandFooter, { brand })
|
|
34
|
+
]
|
|
35
|
+
})]
|
|
36
|
+
})] });
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
exports.EmailLayout = EmailLayout;
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=EmailLayout.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmailLayout.cjs","names":["Html","Head","Tailwind","pixelBasedPreset","Preview","Body","BrandHeader","Container","BrandFooter"],"sources":["../../../src/components/EmailLayout.tsx"],"sourcesContent":["import React from \"react\";\r\n\r\n// Ensure React is loaded for the classic JSX runtime used during email rendering.\r\nvoid React;\r\n\r\nimport {\r\n Body,\r\n Container,\r\n Head,\r\n Html,\r\n Preview,\r\n pixelBasedPreset,\r\n Tailwind,\r\n} from \"@react-email/components\";\r\nimport type { Brand } from \"../types\";\r\nimport { BrandFooter } from \"./BrandFooter\";\r\nimport { BrandHeader } from \"./BrandHeader\";\r\n\r\ninterface EmailLayoutProps {\r\n readonly previewText: string;\r\n readonly brand: Brand;\r\n readonly children: React.ReactNode;\r\n}\r\n\r\nexport function EmailLayout({ previewText, brand, children }: EmailLayoutProps) {\r\n return (\r\n <Html>\r\n <Head />\r\n <Tailwind\r\n config={{\r\n presets: [pixelBasedPreset],\r\n theme: {\r\n extend: {\r\n colors: {\r\n brand: \"#2250f4\",\r\n offwhite: \"#fafbfb\",\r\n },\r\n spacing: {\r\n 0: \"0px\",\r\n 20: \"20px\",\r\n 45: \"45px\",\r\n },\r\n },\r\n },\r\n }}\r\n >\r\n <Preview>{previewText}</Preview>\r\n <Body className=\"bg-offwhite font-sans text-base\">\r\n <BrandHeader brand={brand} />\r\n <Container className=\"rounded-lg border border-gray-200 bg-white p-8\">\r\n {children}\r\n </Container>\r\n <BrandFooter brand={brand} />\r\n </Body>\r\n </Tailwind>\r\n </Html>\r\n );\r\n}\r\n"],"mappings":";;;;;;;;AAwBA,SAAgB,YAAY,EAAE,aAAa,OAAO,YAA8B;AAC9E,QACE,iBAAA,GAAA,kBAAA,MAACA,wBAAAA,MAAD,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,KAACC,wBAAAA,MAAD,EAAQ,CAAA,EACR,iBAAA,GAAA,kBAAA,MAACC,wBAAAA,UAAD;EACE,QAAQ;GACN,SAAS,CAACC,wBAAAA,iBAAiB;GAC3B,OAAO,EACL,QAAQ;IACN,QAAQ;KACN,OAAO;KACP,UAAU;KACX;IACD,SAAS;KACP,GAAG;KACH,IAAI;KACJ,IAAI;KACL;IACF,EACF;GACF;YAhBH,CAkBE,iBAAA,GAAA,kBAAA,KAACC,wBAAAA,SAAD,EAAA,UAAU,aAAsB,CAAA,EAChC,iBAAA,GAAA,kBAAA,MAACC,wBAAAA,MAAD;GAAM,WAAU;aAAhB;IACE,iBAAA,GAAA,kBAAA,KAACC,mCAAAA,aAAD,EAAoB,OAAS,CAAA;IAC7B,iBAAA,GAAA,kBAAA,KAACC,wBAAAA,WAAD;KAAW,WAAU;KAClB;KACS,CAAA;IACZ,iBAAA,GAAA,kBAAA,KAACC,mCAAAA,aAAD,EAAoB,OAAS,CAAA;IACxB;KACE;IACN,EAAA,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Brand } from "../types.cjs";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import React from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/EmailLayout.d.ts
|
|
6
|
+
interface EmailLayoutProps {
|
|
7
|
+
readonly previewText: string;
|
|
8
|
+
readonly brand: Brand;
|
|
9
|
+
readonly children: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
declare function EmailLayout({
|
|
12
|
+
previewText,
|
|
13
|
+
brand,
|
|
14
|
+
children
|
|
15
|
+
}: EmailLayoutProps): _$react_jsx_runtime0.JSX.Element;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { EmailLayout };
|
|
18
|
+
//# sourceMappingURL=EmailLayout.d.cts.map
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m5kdev/email",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.8",
|
|
4
4
|
"license": "GPL-3.0-only",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"tsx": "4.19.2",
|
|
20
20
|
"tsdown": "0.21.7",
|
|
21
21
|
"typescript": "5.9.2",
|
|
22
|
-
"@m5kdev/config": "0.8.
|
|
22
|
+
"@m5kdev/config": "0.8.8"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@react-email/components": "1.0.1",
|
|
@@ -28,12 +28,24 @@
|
|
|
28
28
|
},
|
|
29
29
|
"exports": {
|
|
30
30
|
"./components/*": {
|
|
31
|
-
"
|
|
32
|
-
|
|
31
|
+
"import": {
|
|
32
|
+
"types": "./dist/src/components/*.d.mts",
|
|
33
|
+
"default": "./dist/src/components/*.mjs"
|
|
34
|
+
},
|
|
35
|
+
"require": {
|
|
36
|
+
"types": "./dist/src/components/*.d.cts",
|
|
37
|
+
"default": "./dist/src/components/*.cjs"
|
|
38
|
+
}
|
|
33
39
|
},
|
|
34
40
|
"./types": {
|
|
35
|
-
"
|
|
36
|
-
|
|
41
|
+
"import": {
|
|
42
|
+
"types": "./dist/src/types.d.mts",
|
|
43
|
+
"default": "./dist/src/types.mjs"
|
|
44
|
+
},
|
|
45
|
+
"require": {
|
|
46
|
+
"types": "./dist/src/types.d.cts",
|
|
47
|
+
"default": "./dist/src/types.cjs"
|
|
48
|
+
}
|
|
37
49
|
}
|
|
38
50
|
},
|
|
39
51
|
"scripts": {
|