@cosmicdrift/kumiko-renderer-mail-html 0.365.0 → 0.366.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/feature.js +2 -2
- package/package.json +6 -6
package/dist/feature.js
CHANGED
|
@@ -20,8 +20,8 @@ import { mailHtmlRender } from "./render.js";
|
|
|
20
20
|
export function createRendererMailHtmlFeature(options = {}) {
|
|
21
21
|
return defineFeature("renderer-mail-html", (r) => {
|
|
22
22
|
r.describe('A `renderer-foundation` plugin that handles `RenderRequest { kind: "mail" }` and returns `{ subject, html, text, previewText? }` suitable for sending via `channel-email`. The mail template (`kind: "mail"`, document HTML, subject in `meta`) resolves through `template-resolver`\'s DB fallback, its body is compiled to Handlebars by template-resolver and rendered with escaping, then placed into an MJML layout (`kind: "mail-layout"`, slug `default` unless `meta.layoutSlug` says otherwise, an in-code structured layout with the tenant branding logo and accent color as last resort) that `mjml()` compiles to email-safe table HTML, with `html-to-text` producing the plain-text alternative. An optional `footer` resolver adds the platform imprint, privacy link and footer text below every structured layout, and an optional `brandSuffix` resolver adds a word after the tenant name in the brand row of the in-code layout. Mail meta `headerChip`, `tone` and `footerNote` add a chip beside the brand, the tone of the top line and chip, and a note above the site and unsubscribe links of the card. Seed an editable system layout with `seedSystemMailLayout(db)`. Requires `renderer-foundation` + `template-resolver`.');
|
|
23
|
-
r.requires("renderer-foundation");
|
|
24
|
-
r.requires("template-resolver");
|
|
23
|
+
r.requires({ features: ["renderer-foundation"] });
|
|
24
|
+
r.requires({ features: ["template-resolver"] });
|
|
25
25
|
r.useExtension("renderer", "mail-html", {
|
|
26
26
|
kinds: ["mail"],
|
|
27
27
|
render: (req, ctx) => mailHtmlRender(req, ctx, options),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-renderer-mail-html",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.366.0",
|
|
4
4
|
"description": "Renderer-Foundation plugin for branded HTML emails: mail-kind templates (document HTML + subject meta) rendered with isolated Handlebars into an MJML layout, plus plain text via html-to-text. Templates resolved from template-resolver.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@cosmicdrift/kumiko-bundled-features": "0.
|
|
23
|
-
"@cosmicdrift/kumiko-framework": "0.
|
|
24
|
-
"@cosmicdrift/kumiko-headless": "0.
|
|
25
|
-
"@cosmicdrift/kumiko-types": "0.
|
|
22
|
+
"@cosmicdrift/kumiko-bundled-features": "0.366.0",
|
|
23
|
+
"@cosmicdrift/kumiko-framework": "0.366.0",
|
|
24
|
+
"@cosmicdrift/kumiko-headless": "0.366.0",
|
|
25
|
+
"@cosmicdrift/kumiko-types": "0.366.0",
|
|
26
26
|
"handlebars": "^4.7.8",
|
|
27
27
|
"html-to-text": "^9.0.5",
|
|
28
28
|
"mjml": "^5.2.2"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@cosmicdrift/kumiko-testing": "0.
|
|
31
|
+
"@cosmicdrift/kumiko-testing": "0.366.0",
|
|
32
32
|
"@types/html-to-text": "^9.0.4",
|
|
33
33
|
"@types/mjml": "^5.0.0"
|
|
34
34
|
},
|