@dbx-tools/shared-email-template 0.9.129 → 0.9.132

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/README.md CHANGED
@@ -1,9 +1,10 @@
1
1
  # @dbx-tools/shared-email-template
2
2
 
3
- Universal React Email presentation shared by dbx-tools server and browser email
4
- surfaces.
3
+ Render the same React Email presentation in server-delivered messages and
4
+ browser previews. The package owns the branded document, card, body, and brand
5
+ mapping without depending on Databricks AppKit, SMTP, or DOM APIs.
5
6
 
6
- ## Quick Start
7
+ ## Quick start
7
8
 
8
9
  Render the same branded document in SMTP delivery and browser previews:
9
10
 
@@ -13,33 +14,29 @@ import { EmailDocument } from "@dbx-tools/shared-email-template";
13
14
  <EmailDocument subject="Incident update" body="## Resolved\nAll systems are healthy." />;
14
15
  ```
15
16
 
16
- Key features:
17
+ The exported components cover:
17
18
 
18
19
  - Responsive React Email document with email-safe inline styling.
19
20
  - Reusable message-body component for approval and compose previews.
20
- - Repository branding applied by default through `BrandContext`.
21
+ - dbx-tools branding applied by default through `BrandContext`.
21
22
  - Consumer brand overrides without coupling templates to AppKit or SMTP.
22
23
  - Rich content rendered consistently in the inbox and browser.
23
24
 
24
- ## Runtime Support
25
+ ## Runtime boundary
25
26
 
26
- The presentation layer has two consumers with incompatible dependency needs, so
27
- it lives on its own:
27
+ This package provides presentation only:
28
28
 
29
- - `@dbx-tools/email` is a Node/AppKit package: it depends on
30
- `@databricks/appkit` and `nodemailer`. Templates that lived there could not be
31
- imported by a browser bundle.
32
- - `@dbx-tools/shared-email` is a pure zod contract package consumed by
33
- non-AppKit callers such as `@dbx-tools/tunnel`. Templates that lived there
34
- would push React and `@react-email/components` onto every schema consumer.
35
- - `@dbx-tools/ui/email` is a React/DOM package. Templates that lived there would
36
- make the Node renderer depend on a DOM-typed package.
29
+ - [@dbx-tools/email](../../node/email) renders `EmailDocument` for SMTP and
30
+ local outbox delivery.
31
+ - [@dbx-tools/ui/email](../../ui/appkit) uses `EmailBody` and `EmailCard` for
32
+ approval, compose, and preview surfaces.
33
+ - [@dbx-tools/shared-email](../email) owns email wire schemas without taking a
34
+ React dependency.
37
35
 
38
- This package depends on neither AppKit nor SMTP nor the DOM, so any runtime that
39
- can render React can produce the same branded email — including callers outside
40
- AppKit entirely.
36
+ The package doesn't send messages, approve delivery, access AppKit request
37
+ identity, or require browser DOM APIs.
41
38
 
42
- ## Template Options
39
+ ## Configure the template
43
40
 
44
41
  ```tsx
45
42
  import { EmailDocument } from "@dbx-tools/shared-email-template";
@@ -52,7 +49,7 @@ Node runtimes should pass this component to `@react-email/render`.
52
49
 
53
50
  `heading` is optional. Ordinary mail leaves it unset so the MIME subject stays a
54
51
  transport subject and is not repeated as a body title. Pass a shorter heading when
55
- the subject carries notification-specific details — one-time-code mail uses this
52
+ the subject carries notification-specific details. One-time-code mail uses this
56
53
  to keep the code in notifications without repeating it inside the opened card:
57
54
 
58
55
  ```tsx
@@ -64,9 +61,10 @@ to keep the code in notifications without repeating it inside the opened card:
64
61
  />
65
62
  ```
66
63
 
67
- `preview` sets the preheader — the snippet a client shows beside the subject, and
68
- the body of the push notification a mobile mail app posts. It defaults to the
69
- subject; set it when the notification should say something the subject does not:
64
+ `preview` sets the preheader, which is the snippet a client shows beside the
65
+ subject and the body of the push notification a mobile mail app posts. It
66
+ defaults to the subject. Set it when the notification should say something the
67
+ subject does not:
70
68
 
71
69
  ```tsx
72
70
  <EmailDocument
@@ -76,11 +74,11 @@ subject; set it when the notification should say something the subject does not:
76
74
  />
77
75
  ```
78
76
 
79
- That pairing is what makes mobile one-time-code autofill work at all: a
80
- notification carries the sender, the subject, and this snippet, so a code found
81
- only in the body never reaches the autofill heuristics.
77
+ Mobile one-time-code autofill can read the code from the notification's sender,
78
+ subject, and preheader. A code that appears only in the message body doesn't
79
+ reach the autofill heuristics.
82
80
 
83
- ## Reuse The Body Preview
81
+ ## Reuse the body preview
84
82
 
85
83
  ```tsx
86
84
  import { EmailBody } from "@dbx-tools/shared-email-template";
@@ -90,7 +88,7 @@ import { EmailBody } from "@dbx-tools/shared-email-template";
90
88
 
91
89
  The body preview and complete document share typography and content styling. The
92
90
  full document adds the branded header band, optional heading, and footer.
93
- Envelope rows (`headers`) are opt-in for local outbox previews; delivered SMTP
91
+ Envelope rows (`headers`) are opt-in for local outbox previews. Delivered SMTP
94
92
  mail and browser approval chrome leave recipients and attachments outside the
95
93
  HTML body.
96
94
 
@@ -103,7 +101,7 @@ import { EmailCard } from "@dbx-tools/shared-email-template";
103
101
  <EmailCard subject={draft.subject} body={draft.body} />;
104
102
  ```
105
103
 
106
- ## Apply A Brand
104
+ ## Apply a brand
107
105
 
108
106
  ```ts
109
107
  import { brandUtils } from "@dbx-tools/shared-core";
@@ -115,11 +113,11 @@ const emailBrand = emailBrandFromContext(brandUtils.defaultBrandContext);
115
113
  Omitting `brand` uses the dbx-tools brand. A consumer may supply its own colors,
116
114
  font, name, tagline, website, and fetchable logo URL.
117
115
 
118
- ## Modules
116
+ ## Package exports
119
117
 
120
- - `.` - `EmailDocument`, `EmailCard`, `EmailBody`, brand types/defaults, and
118
+ - `.`: `EmailDocument`, `EmailCard`, `EmailBody`, brand types/defaults, and
121
119
  content normalization.
122
120
 
123
- Pair this package with [`@dbx-tools/shared-email`](../email) for wire schemas,
124
- [`@dbx-tools/email`](../../node/email) for delivery, and
125
- [`@dbx-tools/ui/email`](../../ui/appkit) for approval and compose UI.
121
+ Pair this package with [@dbx-tools/shared-email](../email) for wire schemas,
122
+ [@dbx-tools/email](../../node/email) for delivery, and
123
+ [@dbx-tools/ui/email](../../ui/appkit) for approval and compose UI.
package/index.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // Hand edits are overwritten on the next watch; this file is read-only.
4
4
 
5
5
  export const PACKAGE_IDENTIFIER = "@dbx-tools/shared-email-template";
6
- export const PACKAGE_VERSION = "0.9.129";
6
+ export const PACKAGE_VERSION = "0.9.132";
7
7
  export * as template from "./src/template.tsx";
8
8
  export { emailBrandFromContext, defaultEmailBrand, resolveEmailBrand, normalizeEmailMarkdown, EmailBody, EmailCard, EmailDocument } from "./src/template.tsx";
9
9
  export type { EmailBrand, ResolvedEmailBrand, EmailBodyProps, EmailDocumentProps } from "./src/template.tsx";
package/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export declare const PACKAGE_IDENTIFIER = "@dbx-tools/shared-email-template";
2
- export declare const PACKAGE_VERSION = "0.9.129";
2
+ export declare const PACKAGE_VERSION = "0.9.132";
3
3
  export * as template from "./src/template.tsx";
4
4
  export { emailBrandFromContext, defaultEmailBrand, resolveEmailBrand, normalizeEmailMarkdown, EmailBody, EmailCard, EmailDocument } from "./src/template.tsx";
5
5
  export type { EmailBrand, ResolvedEmailBrand, EmailBodyProps, EmailDocumentProps } from "./src/template.tsx";
package/lib/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  // Regenerated from the exporting modules in ./src.
3
3
  // Hand edits are overwritten on the next watch; this file is read-only.
4
4
  export const PACKAGE_IDENTIFIER = "@dbx-tools/shared-email-template";
5
- export const PACKAGE_VERSION = "0.9.129";
5
+ export const PACKAGE_VERSION = "0.9.132";
6
6
  export * as template from "./src/template.js";
7
7
  export { emailBrandFromContext, defaultEmailBrand, resolveEmailBrand, normalizeEmailMarkdown, EmailBody, EmailCard, EmailDocument } from "./src/template.js";
8
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSwyQ0FBMkM7QUFDM0MsbURBQW1EO0FBQ25ELHdFQUF3RTtBQUV4RSxNQUFNLENBQUMsTUFBTSxrQkFBa0IsR0FBRyxrQ0FBa0MsQ0FBQztBQUNyRSxNQUFNLENBQUMsTUFBTSxlQUFlLEdBQUcsU0FBUyxDQUFDO0FBQ3pDLE9BQU8sS0FBSyxRQUFR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ZUVtYWlsQnJhbmQsIG5vcm1hbGl6ZUVtYWlsTWFya2Rvd24sIEVtYWlsQm9keSwgRW1haWxDYXJkLCBFbWFpbERvY3VtZW50IH0gZnJvbSBcIi4vc3JjL3RlbXBsYXRlLnRzeFwiO1xuZXhwb3J0IHR5cGUgeyBFbWFpbEJyYW5kLCBSZXNvbHZlZEVtYWlsQnJhbmQsIEVtYWlsQm9keVByb3BzLCBFbWFpbERvY3VtZW50UHJvcHMgfSBmcm9tIFwiLi9zcmMvdGVtcGxhdGUudHN4XCI7XG4iXX0=
package/package.json CHANGED
@@ -23,7 +23,7 @@
23
23
  "typescript": "^5.9.3"
24
24
  },
25
25
  "dependencies": {
26
- "@dbx-tools/shared-core": "^0.9.129",
26
+ "@dbx-tools/shared-core": "^0.9.132",
27
27
  "@react-email/components": "^1.0.12",
28
28
  "react": "~19.2.4"
29
29
  },
@@ -49,7 +49,7 @@
49
49
  "./package.json": "./package.json"
50
50
  }
51
51
  },
52
- "version": "0.9.129",
52
+ "version": "0.9.132",
53
53
  "types": "./lib/index.d.ts",
54
54
  "dbxToolsConfig": {
55
55
  "tags": [