esender-email-editor 1.3.0 → 1.3.1
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 +21 -9
- package/dist/index.cjs +6 -6
- package/dist/index.js +6 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -11,10 +11,23 @@ A drag-and-drop **MJML email editor** for React 18 + Ant Design 5. The editor re
|
|
|
11
11
|
The package is published on the public **npm registry**.
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
npm install esender-email-editor
|
|
14
|
+
npm install esender-email-editor
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
>
|
|
17
|
+
> A transitive runtime dep (`react-giphy-searchbox`, used by the Gif block) still declares an ancient `react@16.x` peer. To keep npm install clean without `--legacy-peer-deps`, add the following `overrides` block to your **host app's** `package.json`. It pins the stale peer to your real React version — runtime is unaffected.
|
|
18
|
+
>
|
|
19
|
+
> ```json
|
|
20
|
+
> {
|
|
21
|
+
> "overrides": {
|
|
22
|
+
> "react-giphy-searchbox": {
|
|
23
|
+
> "react": "$react",
|
|
24
|
+
> "react-dom": "$react-dom"
|
|
25
|
+
> }
|
|
26
|
+
> }
|
|
27
|
+
> }
|
|
28
|
+
> ```
|
|
29
|
+
>
|
|
30
|
+
> Yarn users: use `"resolutions"` with the same shape. pnpm users: use `"pnpm.overrides"`.
|
|
18
31
|
|
|
19
32
|
## Peer dependencies
|
|
20
33
|
|
|
@@ -25,12 +38,13 @@ npm install \
|
|
|
25
38
|
react@^18 react-dom@^18 \
|
|
26
39
|
antd@^5 @ant-design/icons@^5 @ant-design/pro-components@^2 \
|
|
27
40
|
@reduxjs/toolkit@^2 react-redux@^9 redux-persist@^6 \
|
|
28
|
-
mjml-browser@^4 cheerio@1.0.0-rc.12 \
|
|
29
41
|
lodash@^4 axios@^1 swr@^2 \
|
|
30
42
|
framer-motion@^12 html2canvas@^1 \
|
|
31
43
|
styled-components@^6 use-sync-external-store@^1
|
|
32
44
|
```
|
|
33
45
|
|
|
46
|
+
> `mjml-browser` and `cheerio` are **bundled inside the published package** — you do **not** install them.
|
|
47
|
+
|
|
34
48
|
### Supported version ranges
|
|
35
49
|
|
|
36
50
|
| Package | Declared range | Notes |
|
|
@@ -42,7 +56,6 @@ npm install \
|
|
|
42
56
|
| `@reduxjs/toolkit` | `>=2.0.0 <3.0.0` | |
|
|
43
57
|
| `react-redux` | `>=8.0.0 <10.0.0` | v8 and v9 both work under React 18. |
|
|
44
58
|
| `redux-persist` | `>=6.0.0 <7.0.0` | |
|
|
45
|
-
| `mjml-browser` | `>=4.15.0 <6.0.0` | v5 still requires `cheerio`. |
|
|
46
59
|
| `lodash` | `>=4.17.0 <5.0.0` | |
|
|
47
60
|
| `axios` | `>=1.0.0 <2.0.0` | |
|
|
48
61
|
| `swr` | `>=2.0.0 <3.0.0` | |
|
|
@@ -50,7 +63,8 @@ npm install \
|
|
|
50
63
|
| `html2canvas` | `>=1.0.0 <2.0.0` | |
|
|
51
64
|
| `styled-components` | `>=5.0.0 <7.0.0` | v5 and v6 both work. |
|
|
52
65
|
| `use-sync-external-store` | `>=1.0.0 <2.0.0` | |
|
|
53
|
-
| `
|
|
66
|
+
| `mjml-browser` | bundled | Shipped inside `dist/`; host does not install. |
|
|
67
|
+
| `cheerio` | bundled | Shipped inside `dist/` alongside `mjml-browser`; host does not install. |
|
|
54
68
|
|
|
55
69
|
### The non-negotiables
|
|
56
70
|
|
|
@@ -58,8 +72,7 @@ npm install \
|
|
|
58
72
|
|---|---|
|
|
59
73
|
| **React must be 18.x** (not 19) | antd v5 only officially supports React 16–18. Under React 19 you will see `[antd: compatible]` warnings and cascading hook bugs in dropdown / tooltip / message. |
|
|
60
74
|
| **Single React copy** in `node_modules` | Two copies of React → `Invalid hook call`. Run `npm ls react` — it must show exactly one version. For Vite hosts use `resolve.dedupe`. |
|
|
61
|
-
|
|
|
62
|
-
| **`@ant-design/icons` stays on v5** | `@ant-design/pro-components` resolves icons v5. Installing v6 forces `--legacy-peer-deps` everywhere and can cause runtime mismatches. |
|
|
75
|
+
| **`@ant-design/icons` stays on v5** | `@ant-design/pro-components` resolves icons v5. Installing v6 can cause runtime mismatches. |
|
|
63
76
|
|
|
64
77
|
## Quick start
|
|
65
78
|
|
|
@@ -217,7 +230,6 @@ export default defineConfig({
|
|
|
217
230
|
optimizeDeps: {
|
|
218
231
|
include: [
|
|
219
232
|
'esender-email-editor',
|
|
220
|
-
'mjml-browser', 'cheerio',
|
|
221
233
|
'antd', '@ant-design/icons', '@ant-design/pro-components',
|
|
222
234
|
'react-is', 'react-redux',
|
|
223
235
|
'use-sync-external-store',
|
|
@@ -277,7 +289,7 @@ import Package, {
|
|
|
277
289
|
| Symptom | Cause / fix |
|
|
278
290
|
|---|---|
|
|
279
291
|
| `Invalid hook call` | Two copies of React are loaded. Run `npm ls react` — must show one version. Vite: add `resolve.dedupe`. |
|
|
280
|
-
| Canvas shows
|
|
292
|
+
| Canvas shows "Failed to render preview" | You're on an outdated version of the package. Update — current builds bundle `mjml-browser` + `cheerio` so this no longer requires a host install. |
|
|
281
293
|
| Vite: `'classnames' does not provide an export named 'default'` | Vite hasn't pre-bundled antd's CJS transitive deps. Add the `optimizeDeps.include` list above, delete `node_modules/.vite`, and restart with `vite --force`. |
|
|
282
294
|
| antd `[antd: compatible] React is 16 ~ 18` warning + broken dropdowns / tooltips | You are on React 19. Downgrade to React 18.3.1. |
|
|
283
295
|
| Editor shows "Editor unavailable" forever | License verify failed. Check the `/license/verify` network response, confirm `apiKey`, watch `onLicenseError`. |
|