@websolutespa/bom-mixer-emails 3.1.3 → 4.0.0-next.10

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/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # @websolutespa/bom-mixer-emails
2
2
 
3
+ ## 4.0.0-next.10
4
+
5
+ ## 4.0.0-next.9
6
+
7
+ ## 4.0.0-next.8
8
+
9
+ ### Patch Changes
10
+
11
+ - Cleanup: unused dependencies, peers and unreachable code removed.
12
+ - `payload-utils`: the `jsdom` peer accepts `^26.1.0 || ^30.1.3`, and `htmlToLexical` imports it on use, so routes that never convert html don't load it. jsdom 30 fails with `ERR_REQUIRE_ESM` on Vercel's Node runtime; projects can stay on jsdom 26 and drop a `jsdom` override.
13
+ - Peers that nothing imports are gone: `uuid` (search, seo, thron), `@payloadcms/ui` (seed), `react-error-boundary` (mixer-ui, mixer-emails), `@websolutespa/payload-utils` (live-preview).
14
+ - `bom-mixer-hooks` declares `@types/html-to-text`, which it got from the web apps before.
15
+ - `bom-mixer-llm` publishes only the default mocks.
16
+ - Source files that no export reached are removed: mixer-ui carousel, navbar/menubar, media-image-next, useThemeForm, lazy-loader-client; mixer-llm card and product cta, Background, scroller-lenis, cors, useBlock, useComponent.
17
+ - `bom-cli`: nodemon is a dev dependency (it was installed in every project); no theme or storybook apps.
18
+ - `bom-next`: `jose` and `transliteration` dropped with the unused mock and session code.
19
+ - `eslint-config` is the legacy ESLint 10 config; projects on oxlint and oxfmt use `@websolutespa/oxc`.
20
+
21
+ ## 4.0.0-next.7
22
+
23
+ ## 4.0.0-next.6
24
+
25
+ ## 4.0.0-next.0
26
+
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies
30
+ - @websolutespa/bom-core@4.0.0-next.0
31
+ - @websolutespa/bom-mixer-hooks@4.0.0-next.0
32
+
3
33
  ## 3.1.3
4
34
 
5
35
  ## 3.1.2
package/dist/index.js CHANGED
@@ -4,12 +4,12 @@ import { isDevelopment } from "@websolutespa/bom-core";
4
4
  //#region src/app.tsx
5
5
  const App = ({ Component, Layout, ...props }) => {
6
6
  const LayoutComponent = Component.Layout || Layout;
7
- return <LayoutProvider layout={props.layout}>
8
- <LabelProvider>
9
- <LayoutComponent {...props}>
10
- <Component {...props}></Component>
11
- </LayoutComponent>
12
- </LabelProvider>
7
+ return <LayoutProvider layout={props.layout}>
8
+ <LabelProvider>
9
+ <LayoutComponent {...props}>
10
+ <Component {...props}></Component>
11
+ </LayoutComponent>
12
+ </LabelProvider>
13
13
  </LayoutProvider>;
14
14
  };
15
15
  //#endregion
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/app.tsx","../src/render.tsx"],"sourcesContent":["import { LabelProvider, LayoutProvider } from '@websolutespa/bom-mixer-hooks';\nimport { IEmailAppComponent } from './types';\n\nexport const App: IEmailAppComponent = ({ Component, Layout, ...props }) => {\n const LayoutComponent = Component.Layout || Layout;\n return (\n <LayoutProvider layout={props.layout}>\n <LabelProvider>\n <LayoutComponent {...props}>\n <Component {...props}></Component>\n </LayoutComponent>\n </LabelProvider>\n </LayoutProvider>\n );\n};\n","import { render } from '@react-email/render';\r\nimport { isDevelopment } from '@websolutespa/bom-core';\r\nimport { App } from './app';\r\nimport { IEmailAppProps } from './types';\r\n\r\nexport async function renderEmail<T>(props: IEmailAppProps<T>): Promise<string> {\r\n // console.log('renderEmail.props', props);\r\n const renderOptions = { pretty: isDevelopment };\r\n // console.log('renderEmail.renderOptions', renderOptions);\r\n try {\r\n const html = await render((<App {...props} />), renderOptions);\r\n // console.log('renderEmail', 'html', html);\r\n return html;\r\n } catch (error) {\r\n console.log(error);\r\n return 'An error occurred';\r\n }\r\n}\r\n"],"mappings":";;;;AAGA,MAAa,OAA2B,EAAE,WAAW,QAAQ,GAAG,YAAY;CAC1E,MAAM,kBAAkB,UAAU,UAAU;AAC5C,QACE,CAAC,eAAe,QAAQ,MAAM,QAAQ;MACpC,CAAC,cAAc;QACb,CAAC,oBAAoB,OAAO;UAC1B,CAAC,cAAc,OAAO,EAAE,UAAU;QACpC,EAAE,gBAAgB;MACpB,EAAE,cAAc;IAClB,EAAE;;;;ACPN,eAAsB,YAAe,OAA2C;CAE9E,MAAM,gBAAgB,EAAE,QAAQ,eAAe;AAE/C,KAAI;AAGF,SAFa,MAAM,OAAQ,CAAC,QAAQ,WAAY,cAAc;UAGvD,OAAO;AACd,UAAQ,IAAI,MAAM;AAClB,SAAO"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/app.tsx","../src/render.tsx"],"sourcesContent":["import { LabelProvider, LayoutProvider } from '@websolutespa/bom-mixer-hooks';\r\nimport { IEmailAppComponent } from './types';\r\n\r\nexport const App: IEmailAppComponent = ({ Component, Layout, ...props }) => {\r\n const LayoutComponent = Component.Layout || Layout;\r\n return (\r\n <LayoutProvider layout={props.layout}>\r\n <LabelProvider>\r\n <LayoutComponent {...props}>\r\n <Component {...props}></Component>\r\n </LayoutComponent>\r\n </LabelProvider>\r\n </LayoutProvider>\r\n );\r\n};\r\n","import { render } from '@react-email/render';\r\nimport { isDevelopment } from '@websolutespa/bom-core';\r\nimport { App } from './app';\r\nimport { IEmailAppProps } from './types';\r\n\r\nexport async function renderEmail<T>(props: IEmailAppProps<T>): Promise<string> {\r\n // console.log('renderEmail.props', props);\r\n const renderOptions = { pretty: isDevelopment };\r\n // console.log('renderEmail.renderOptions', renderOptions);\r\n try {\r\n const html = await render(<App {...props} />, renderOptions);\r\n // console.log('renderEmail', 'html', html);\r\n return html;\r\n } catch (error) {\r\n console.log(error);\r\n return 'An error occurred';\r\n }\r\n}\r\n"],"mappings":";;;;AAGA,MAAa,OAA2B,EAAE,WAAW,QAAQ,GAAG,YAAY;CAC1E,MAAM,kBAAkB,UAAU,UAAU;AAC5C,QACE,CAAC,eAAe,QAAQ,MAAM,QAAQ;MACpC,CAAC,cAAc;QACb,CAAC,oBAAoB,OAAO;UAC1B,CAAC,cAAc,OAAO,EAAE,UAAU;QACpC,EAAE,gBAAgB;MACpB,EAAE,cAAc;IAClB,EAAE;;;;ACPN,eAAsB,YAAe,OAA2C;CAE9E,MAAM,gBAAgB,EAAE,QAAQ,eAAe;AAE/C,KAAI;AAGF,SAFa,MAAM,OAAO,CAAC,QAAQ,WAAW,cAAc;UAGrD,OAAO;AACd,UAAQ,IAAI,MAAM;AAClB,SAAO"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@websolutespa/bom-mixer-emails",
3
- "version": "3.1.3",
3
+ "version": "4.0.0-next.10",
4
4
  "description": "Mixer Emails module of the BOM Repository",
5
5
  "keywords": [
6
6
  "bom",
@@ -12,38 +12,28 @@
12
12
  "type": "git",
13
13
  "url": "git://github.com/websolutespa/bom.git"
14
14
  },
15
- "scripts": {
16
- "lint": "eslint .",
17
- "test": "vitest run",
18
- "test-watch": "vitest",
19
- "coverage:integration": "npm run test -- --coverage.enabled --coverage.provider=istanbul --coverage.all",
20
- "coverage": "run-s -c --silent coverage:*",
21
- "compile": "tsdown",
22
- "prepack": "bom prepack",
23
- "postpack": "bom postpack",
24
- "types": "tsc --noemit"
25
- },
26
- "dependencies": {},
27
15
  "peerDependencies": {
28
16
  "@react-email/components": "^1.0.12",
29
17
  "@react-email/render": "^2.1.1",
30
- "@websolutespa/bom-core": "^3.0.1",
31
- "@websolutespa/bom-mixer-hooks": "^3.0.1",
18
+ "@websolutespa/bom-core": "^4.0.0-next.1",
19
+ "@websolutespa/bom-mixer-hooks": "^4.0.0-next.0",
32
20
  "react": "^19.2.1",
33
21
  "react-dom": "^19.2.1"
34
22
  },
35
23
  "devDependencies": {
36
24
  "@react-email/components": "1.0.12",
37
25
  "@react-email/render": "2.1.1",
26
+ "@types/node": "24.19.2",
38
27
  "@types/react": "19.2.18",
39
28
  "@types/react-dom": "19.2.7",
40
29
  "@vitest/coverage-istanbul": "5.0.5",
41
- "@websolutespa/bom-cli": "^3.1.3",
42
- "@websolutespa/eslint-config": "^3.1.3",
43
- "@websolutespa/test": "^3.1.3",
44
- "@websolutespa/tsconfig": "^3.1.3",
45
- "eslint": "10.13.0",
30
+ "@websolutespa/bom-cli": "^4.0.0-next.10",
31
+ "@websolutespa/oxc": "^4.0.0-next.10",
32
+ "@websolutespa/test": "^4.0.0-next.10",
33
+ "@websolutespa/tsconfig": "^4.0.0-next.10",
46
34
  "npm-run-all": "4.1.5",
35
+ "oxlint": "1.89.0",
36
+ "oxlint-tsgolint": "7.0.2005",
47
37
  "react": "19.2.9",
48
38
  "react-dom": "19.2.9",
49
39
  "tsdown": "0.21.0",
@@ -87,5 +77,14 @@
87
77
  "default": "./dist/index.js"
88
78
  }
89
79
  },
90
- "source": "./src/index.ts"
80
+ "source": "./src/index.ts",
81
+ "scripts": {
82
+ "lint": "oxlint --type-aware",
83
+ "test": "vitest run",
84
+ "test-watch": "vitest",
85
+ "coverage:integration": "vitest run --coverage.enabled --coverage.provider=istanbul --coverage.all",
86
+ "coverage": "run-s -c --silent coverage:*",
87
+ "compile": "tsdown",
88
+ "types": "tsc --noemit"
89
+ }
91
90
  }
@@ -1,8 +1,8 @@
1
- import { describe, expect, it } from 'vitest';
2
-
3
- describe('Example', () => {
4
- it('passes', async () => {
5
- const value = 'test';
6
- expect(value).toEqual(value);
7
- });
8
- });
1
+ import { describe, expect, it } from 'vitest';
2
+
3
+ describe('Example', () => {
4
+ it('passes', async () => {
5
+ const value = 'test';
6
+ expect(value).toEqual(value);
7
+ });
8
+ });
@@ -10,9 +10,7 @@ const Layout: IEmailLayoutComponent = ({ children }) => (
10
10
  </Html>
11
11
  );
12
12
 
13
- const Component: IEmailComponent<{ name: string }> = ({ props }) => (
14
- <Text>Hello {props.name}</Text>
15
- );
13
+ const Component: IEmailComponent<{ name: string }> = ({ props }) => <Text>Hello {props.name}</Text>;
16
14
 
17
15
  describe('renderEmail', () => {
18
16
  it('renders the component inside the layout as an html document', async () => {
package/src/app.tsx CHANGED
@@ -1,15 +1,15 @@
1
- import { LabelProvider, LayoutProvider } from '@websolutespa/bom-mixer-hooks';
2
- import { IEmailAppComponent } from './types';
3
-
4
- export const App: IEmailAppComponent = ({ Component, Layout, ...props }) => {
5
- const LayoutComponent = Component.Layout || Layout;
6
- return (
7
- <LayoutProvider layout={props.layout}>
8
- <LabelProvider>
9
- <LayoutComponent {...props}>
10
- <Component {...props}></Component>
11
- </LayoutComponent>
12
- </LabelProvider>
13
- </LayoutProvider>
14
- );
15
- };
1
+ import { LabelProvider, LayoutProvider } from '@websolutespa/bom-mixer-hooks';
2
+ import { IEmailAppComponent } from './types';
3
+
4
+ export const App: IEmailAppComponent = ({ Component, Layout, ...props }) => {
5
+ const LayoutComponent = Component.Layout || Layout;
6
+ return (
7
+ <LayoutProvider layout={props.layout}>
8
+ <LabelProvider>
9
+ <LayoutComponent {...props}>
10
+ <Component {...props}></Component>
11
+ </LayoutComponent>
12
+ </LabelProvider>
13
+ </LayoutProvider>
14
+ );
15
+ };
package/src/index.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  export * from './app';
2
2
  export * from './render';
3
3
  export * from './types';
4
-
package/src/render.tsx CHANGED
@@ -8,7 +8,7 @@ export async function renderEmail<T>(props: IEmailAppProps<T>): Promise<string>
8
8
  const renderOptions = { pretty: isDevelopment };
9
9
  // console.log('renderEmail.renderOptions', renderOptions);
10
10
  try {
11
- const html = await render((<App {...props} />), renderOptions);
11
+ const html = await render(<App {...props} />, renderOptions);
12
12
  // console.log('renderEmail', 'html', html);
13
13
  return html;
14
14
  } catch (error) {
package/src/types.ts CHANGED
@@ -1,30 +1,30 @@
1
- import { ILayout } from '@websolutespa/bom-core';
2
- import { FC, ReactNode } from 'react';
3
-
4
- export type IEmailSharedProps = {
5
- origin: string;
6
- layout: ILayout;
7
- optInUrl?: string;
8
- optOutUrl?: string;
9
- viewOnWebUrl?: string;
10
- preview?: string;
11
- };
12
-
13
- export type IEmailAppProps<T> = IEmailSharedProps & {
14
- Component: IEmailComponent<T>;
15
- Layout: IEmailLayoutComponent;
16
- props: T;
17
- };
18
-
19
- export type IEmailAppComponent<T = any> = FC<Readonly<IEmailAppProps<T>>>;
20
-
21
- export type IEmailLayoutProps<T> = IEmailSharedProps & {
22
- Component: IEmailComponent<T>;
23
- props: T;
24
- };
25
-
26
- export type IEmailLayoutComponent = FC<Readonly<IEmailSharedProps & { children: ReactNode }>>;
27
-
28
- export type IEmailComponent<T> = FC<Readonly<IEmailSharedProps & { props: T }>> & {
29
- Layout?: IEmailLayoutComponent;
30
- };
1
+ import { ILayout } from '@websolutespa/bom-core';
2
+ import { FC, ReactNode } from 'react';
3
+
4
+ export type IEmailSharedProps = {
5
+ origin: string;
6
+ layout: ILayout;
7
+ optInUrl?: string;
8
+ optOutUrl?: string;
9
+ viewOnWebUrl?: string;
10
+ preview?: string;
11
+ };
12
+
13
+ export type IEmailAppProps<T> = IEmailSharedProps & {
14
+ Component: IEmailComponent<T>;
15
+ Layout: IEmailLayoutComponent;
16
+ props: T;
17
+ };
18
+
19
+ export type IEmailAppComponent<T = any> = FC<Readonly<IEmailAppProps<T>>>;
20
+
21
+ export type IEmailLayoutProps<T> = IEmailSharedProps & {
22
+ Component: IEmailComponent<T>;
23
+ props: T;
24
+ };
25
+
26
+ export type IEmailLayoutComponent = FC<Readonly<IEmailSharedProps & { children: ReactNode }>>;
27
+
28
+ export type IEmailComponent<T> = FC<Readonly<IEmailSharedProps & { props: T }>> & {
29
+ Layout?: IEmailLayoutComponent;
30
+ };