react-email-studio 3.0.0 → 3.2.0
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 +27 -0
- package/README.md +5 -1
- package/TUTORIAL.md +1 -2
- package/dist/index.cjs +209 -134
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -4
- package/dist/index.d.ts +0 -4
- package/dist/index.js +215 -140
- package/dist/index.js.map +1 -1
- package/package.json +63 -62
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [3.1.1] - 2026-04-30
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Loading state for `loadJson`**: `ReactEmailEditor` shows a full-workspace overlay (spinner + localized “Loading design…”) while a design JSON is applied, including invalid-parse early exit.
|
|
13
|
+
- **Lossless studio JSON**: document `settings._reactEmailStudio.editorSettings` stores a snapshot of editor settings; each row may include `_reactEmailStudio.row` (row fields without `cells`) for presets, ratios, `columnStyles`, etc.
|
|
14
|
+
- **i18n**: `loadingDesign` string in `en`, `fr`, `de`, `es`.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **Settings round-trip**: exported document `rtl` / `responsive` now follow `pageRtl` / `pageResponsive` so normalization no longer overwrites them from stale canonical defaults.
|
|
19
|
+
- **Social blocks**: canonical `content.networks` includes URLs from `socialUrls` even when not listed in `networks`; import supports `networks` as an array plus `content.socialUrls`; `styles.padding` is exported/imported; legacy flat-merge skips `socialUrls` where appropriate.
|
|
20
|
+
- **Nested layout `columnStyles`**: importing a layout whose `props.cells` is hydrated no longer drops `columnStyles` that exist only on `content` (merge after hydrate).
|
|
21
|
+
- **Nested layout inspector**: `LayoutRowEditor` background-step UI (row + per-column) re-syncs when `bgColor` / `bgImage` / `bgGradient` / `columnStyles` change, not only when `row.id` changes.
|
|
22
|
+
- **Block palette (click)**: new blocks go to the focused column, a focused nested column, column 0 of a row selected in the rails, or **first row / first column** by default (instead of always column 0 of the last row).
|
|
23
|
+
|
|
24
|
+
### Notes for integrators
|
|
25
|
+
|
|
26
|
+
- Prefer **`loadJson` / `exportJson`** (or `designToEmailDocument` + `normalizeEmailDesignInput`) for full fidelity; blocks may include a `props` object alongside `content` / `styles` for editor-only fields.
|
|
27
|
+
- **`jsonToHtml`** nested layouts already receive `columnStyles` when present on hydrated blocks.
|
package/README.md
CHANGED
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/react-email-studio)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
|
+
## Release notes
|
|
9
|
+
|
|
10
|
+
Version history and migration hints: **[CHANGELOG.md](./CHANGELOG.md)** (also included in the published npm tarball under `node_modules/react-email-studio/CHANGELOG.md`).
|
|
11
|
+
|
|
8
12
|
---
|
|
9
13
|
|
|
10
14
|
## Features
|
|
@@ -13,7 +17,7 @@
|
|
|
13
17
|
- **Page & content** backgrounds (solid, gradient, image), responsive preview
|
|
14
18
|
- **Undo / redo**, zoom, device preview modal
|
|
15
19
|
- **Internationalized** UI strings (`en`, `fr`, `de`, `es`)
|
|
16
|
-
- **
|
|
20
|
+
- **Template placeholders** (e.g. `{{first_name}}`) can be typed directly in HTML / text blocks
|
|
17
21
|
- Tree-shakeable ESM + CJS, TypeScript types
|
|
18
22
|
|
|
19
23
|
---
|
package/TUTORIAL.md
CHANGED
|
@@ -134,7 +134,7 @@ Adjust the import path to match your structure.
|
|
|
134
134
|
| Prop | Type | Description |
|
|
135
135
|
|------|------|-------------|
|
|
136
136
|
| `ref` | `ReactEmailEditorRef` | Imperative API: `loadJson`, `exportJson` (see below). |
|
|
137
|
-
| `options` | `ReactEmailEditorOptions` | Editor chrome, locale,
|
|
137
|
+
| `options` | `ReactEmailEditorOptions` | Editor chrome, locale, feature flags, etc. (see §6). |
|
|
138
138
|
| `onUpload` | `(file: File) => Promise<string>` | Required for good image/video UX; return public URL string. |
|
|
139
139
|
| `onLoad` / `onReady` | `(api: ReactEmailEditorRef) => void` | Fired once with the same API object; use to call `loadJson` with server data. |
|
|
140
140
|
| `hideTemplates` | `boolean` | Hide built-in templates UI; use when you only load via `loadJson`. |
|
|
@@ -163,7 +163,6 @@ Adjust the import path to match your structure.
|
|
|
163
163
|
| **`customCSS`** | Extra `<style>` content for generated HTML (preview / export parity). |
|
|
164
164
|
| **`appearance`** | `theme`, `colors`, `customThemes` — chrome theming. |
|
|
165
165
|
| **`locale`** | `"en"` \| `"fr"` \| `"de"` \| `"es"` for UI strings. |
|
|
166
|
-
| **`mergeTags`** | `{ name: string; value: string }[]` for rich-text insertion. |
|
|
167
166
|
| **`features.autoSave`** | `{ enabled?: boolean; interval?: number }` — UI autosave hint. |
|
|
168
167
|
| **`tools`** | `{ [blockType: string]: { enabled?: boolean } }` — toggle blocks. |
|
|
169
168
|
| **`blockLibrary`** | `groupHeadings`, `paletteGroupLabels` — library copy overrides. |
|