@dextinity/mail-react 11.0.0-canary-20261123082921 → 11.0.0-canary-20261123111640

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.
@@ -1,9 +1,8 @@
1
1
  import { renderToMjml } from "@faire/mjml-react/utils/renderToMjml.js";
2
2
  import mjml2html from "mjml-browser";
3
- import { addBodyTargetingId } from "../utils/addBodyTargetingId.js";
4
3
  import { replaceQuoteEntitiesInCssAttributes } from "../utils/replaceQuoteEntitiesInCssAttributes.js";
5
4
  export async function renderMailHtml(element, options) {
6
5
  const mjmlString = replaceQuoteEntitiesInCssAttributes(renderToMjml(element));
7
6
  const { html, errors: mjmlWarnings } = await mjml2html(mjmlString, { validationLevel: "soft", ...options });
8
- return { html: addBodyTargetingId(html), mjmlWarnings };
7
+ return { html, mjmlWarnings };
9
8
  }
@@ -17,7 +17,7 @@ import { ThemeProvider } from "../../theme/ThemeProvider.js";
17
17
  */
18
18
  export function MjmlMailRoot({ theme: themeProp, attributes, head, config, children }) {
19
19
  const theme = themeProp ?? createTheme();
20
- const content = (_jsx(ThemeProvider, { theme: theme, children: _jsxs(Mjml, { children: [_jsxs(MjmlHead, { children: [_jsxs(MjmlAttributes, { children: [_jsx(MjmlAll, { padding: "0", fontFamily: theme.text.fontFamily }), attributes] }), _jsx(MjmlBreakpoint, { width: `${theme.breakpoints.mobile.value}px` }), _jsx(Styles, {}), head] }), _jsx(MjmlBody, { width: theme.sizes.bodyWidth, backgroundColor: theme.colors.background.body, children: children })] }) }));
20
+ const content = (_jsx(ThemeProvider, { theme: theme, children: _jsxs(Mjml, { children: [_jsxs(MjmlHead, { children: [_jsxs(MjmlAttributes, { children: [_jsx(MjmlAll, { padding: "0", fontFamily: theme.text.fontFamily }), attributes] }), _jsx(MjmlBreakpoint, { width: `${theme.breakpoints.mobile.value}px` }), _jsx(Styles, {}), head] }), _jsx(MjmlBody, { id: "body", width: theme.sizes.bodyWidth, backgroundColor: theme.colors.background.body, children: children })] }) }));
21
21
  if (config) {
22
22
  return _jsx(ConfigProvider, { config: config, children: content });
23
23
  }
@@ -1,6 +1,5 @@
1
1
  import { renderToMjml } from "@faire/mjml-react/utils/renderToMjml.js";
2
2
  import mjml2html from "mjml";
3
- import { addBodyTargetingId } from "../utils/addBodyTargetingId.js";
4
3
  import { replaceQuoteEntitiesInCssAttributes } from "../utils/replaceQuoteEntitiesInCssAttributes.js";
5
4
  export async function renderMailHtml(element, options) {
6
5
  const mjmlString = replaceQuoteEntitiesInCssAttributes(renderToMjml(element));
@@ -9,5 +8,5 @@ export async function renderMailHtml(element, options) {
9
8
  ...options,
10
9
  ignoreIncludes: options?.ignoreIncludes ?? true,
11
10
  });
12
- return { html: addBodyTargetingId(html), mjmlWarnings };
11
+ return { html, mjmlWarnings };
13
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dextinity/mail-react",
3
- "version": "11.0.0-canary-20261123082921",
3
+ "version": "11.0.0-canary-20261123111640",
4
4
  "description": "Utilities for building HTML emails with React",
5
5
  "license": "BSD-2-Clause",
6
6
  "type": "module",
@@ -28,8 +28,8 @@
28
28
  "redraft": "^0.10.2"
29
29
  },
30
30
  "devDependencies": {
31
- "@dextinity/cli": "11.0.0-canary-20261123082921",
32
- "@dextinity/eslint-config": "11.0.0-canary-20261123082921",
31
+ "@dextinity/cli": "11.0.0-canary-20261123111640",
32
+ "@dextinity/eslint-config": "11.0.0-canary-20261123111640",
33
33
  "@storybook/addon-docs": "^10.6.7",
34
34
  "@storybook/addon-mcp": "10.6.7",
35
35
  "@storybook/addon-vitest": "10.6.7",
@@ -1 +0,0 @@
1
- export declare function addBodyTargetingId(html: string): string;
@@ -1,4 +0,0 @@
1
- // TODO Replace with `id` on `mj-body` once the package moves to MJML 5.
2
- export function addBodyTargetingId(html) {
3
- return html.replace(/<body(?=[\s>])/, '<body id="body"');
4
- }