@cedarjs/mailer-renderer-react-email 6.0.0-rc.241 → 6.0.0-rc.312

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/index.d.ts CHANGED
@@ -4,7 +4,7 @@ import { AbstractMailRenderer } from '@cedarjs/mailer-core';
4
4
  export type SupportedOutputFormats = 'both' | 'html' | 'text';
5
5
  export type RendererOptions = MailRendererOptions<SupportedOutputFormats> & Parameters<typeof reactEmailRender>[1];
6
6
  export declare class ReactEmailRenderer extends AbstractMailRenderer {
7
- render(template: Parameters<typeof reactEmailRender>[0], options: RendererOptions, _utilities?: MailUtilities): MailRenderedContent;
7
+ render(template: Parameters<typeof reactEmailRender>[0], options: RendererOptions, _utilities?: MailUtilities): Promise<MailRenderedContent>;
8
8
  internal(): Record<string, unknown>;
9
9
  }
10
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEhE,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACpB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAE3D,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;AAC7D,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC,sBAAsB,CAAC,GACvE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAA;AAExC,qBAAa,kBAAmB,SAAQ,oBAAoB;IAC1D,MAAM,CACJ,QAAQ,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAChD,OAAO,EAAE,eAAe,EACxB,UAAU,CAAC,EAAE,aAAa,GACzB,mBAAmB;IAuBtB,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAGpC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEhE,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACpB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAE3D,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;AAC7D,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC,sBAAsB,CAAC,GACvE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAA;AAExC,qBAAa,kBAAmB,SAAQ,oBAAoB;IACpD,MAAM,CACV,QAAQ,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAChD,OAAO,EAAE,eAAe,EACxB,UAAU,CAAC,EAAE,aAAa,GACzB,OAAO,CAAC,mBAAmB,CAAC;IA2B/B,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAGpC"}
package/dist/index.js CHANGED
@@ -1,20 +1,20 @@
1
1
  import { render as reactEmailRender } from "@react-email/render";
2
2
  import { AbstractMailRenderer } from "@cedarjs/mailer-core";
3
3
  class ReactEmailRenderer extends AbstractMailRenderer {
4
- render(template, options, _utilities) {
4
+ async render(template, options, _utilities) {
5
5
  const outputFormat = options.outputFormat ?? "both";
6
6
  const renderHTML = outputFormat === "both" || outputFormat === "html";
7
7
  const renderText = outputFormat === "both" || outputFormat === "text";
8
8
  return {
9
- html: renderHTML ? reactEmailRender(template, {
9
+ html: renderHTML ? await reactEmailRender(template, {
10
10
  pretty: true,
11
- plainText: false,
12
- ...options
11
+ ...options,
12
+ plainText: false
13
13
  }) : "",
14
- text: renderText ? reactEmailRender(template, {
14
+ text: renderText ? await reactEmailRender(template, {
15
15
  pretty: true,
16
- plainText: true,
17
- ...options
16
+ ...options,
17
+ plainText: true
18
18
  }) : ""
19
19
  };
20
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/mailer-renderer-react-email",
3
- "version": "6.0.0-rc.241",
3
+ "version": "6.0.0-rc.312",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cedarjs/cedar.git",
@@ -21,13 +21,19 @@
21
21
  "prepublishOnly": "NODE_ENV=production yarn build"
22
22
  },
23
23
  "dependencies": {
24
- "@cedarjs/mailer-core": "6.0.0-rc.241",
25
- "@react-email/render": "0.0.17"
24
+ "@cedarjs/mailer-core": "6.0.0-rc.312",
25
+ "@react-email/render": "2.1.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@cedarjs/framework-tools": "6.0.0-rc.241",
28
+ "@cedarjs/framework-tools": "6.0.0-rc.312",
29
+ "react": "18.3.1",
30
+ "react-dom": "18.3.1",
29
31
  "typescript": "5.9.3"
30
32
  },
33
+ "peerDependencies": {
34
+ "react": "18.3.1",
35
+ "react-dom": "18.3.1"
36
+ },
31
37
  "publishConfig": {
32
38
  "access": "public"
33
39
  },