react-email-studio 3.3.0 → 3.4.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 +10 -0
- package/dist/index.cjs +14 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +55 -53
- package/dist/index.d.ts +55 -53
- package/dist/index.js +14 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ All notable changes to this project are documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [3.4.0] - 2026-05-08
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **`ReactEmailEditor.jsonToHtml(json, opts?)`**: static method on the component for converting a saved design (object or JSON string) to a full HTML email document — same implementation as the standalone `jsonToHtml` export, no extra setup needed.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- **Empty cell drop affordance**: the "Drop here" strip is now a fixed **45px** tall row (top-level + nested columns) instead of a tall column, making compact layouts easier to scan and drop into.
|
|
17
|
+
|
|
8
18
|
## [3.1.1] - 2026-04-30
|
|
9
19
|
|
|
10
20
|
### Added
|
package/dist/index.cjs
CHANGED
|
@@ -31,7 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
EmailPreviewModal: () => PreviewModal,
|
|
34
|
-
ReactEmailEditor: () =>
|
|
34
|
+
ReactEmailEditor: () => ReactEmailEditor2,
|
|
35
35
|
base64ToUtf8: () => base64ToUtf8,
|
|
36
36
|
emailPreviewDevices: () => DEVICES,
|
|
37
37
|
extractHtmlForDesign: () => extractHtmlForDesign,
|
|
@@ -2244,7 +2244,7 @@ function layoutSplitChromeBorder(_C, preview) {
|
|
|
2244
2244
|
};
|
|
2245
2245
|
}
|
|
2246
2246
|
var CONTENT_BLOCK_HOVER_BORDER = "1px dotted rgba(148, 163, 184, 0.5)";
|
|
2247
|
-
var
|
|
2247
|
+
var DROP_HERE_HEIGHT_PX = 45;
|
|
2248
2248
|
function blockLinkCaptureHandler(preview, e) {
|
|
2249
2249
|
if (preview) return;
|
|
2250
2250
|
const t = e.target;
|
|
@@ -2604,7 +2604,7 @@ function NestedRowBlock({
|
|
|
2604
2604
|
style: {
|
|
2605
2605
|
flex: p.ratios?.[ici] ?? 1,
|
|
2606
2606
|
minWidth: 0,
|
|
2607
|
-
minHeight: preview ? void 0 :
|
|
2607
|
+
minHeight: preview ? void 0 : DROP_HERE_HEIGHT_PX,
|
|
2608
2608
|
display: "flex",
|
|
2609
2609
|
flexDirection: "column",
|
|
2610
2610
|
...layoutSplitChromeBorder(C, preview),
|
|
@@ -2834,10 +2834,9 @@ function Cell({
|
|
|
2834
2834
|
onDragLeave: handleDragLeave,
|
|
2835
2835
|
onDrop: handleDrop,
|
|
2836
2836
|
style: {
|
|
2837
|
-
flex: cellEmpty ? 1 : void 0,
|
|
2838
2837
|
display: "flex",
|
|
2839
2838
|
flexDirection: "column",
|
|
2840
|
-
minHeight: preview ? void 0 : cellEmpty ?
|
|
2839
|
+
minHeight: preview ? void 0 : cellEmpty ? DROP_HERE_HEIGHT_PX : 44,
|
|
2841
2840
|
borderRadius: 4,
|
|
2842
2841
|
...preview ? {} : insertAt !== null && !cellEmpty ? { border: `1px dotted ${C.accent}`, background: `${C.accent}0a` } : {},
|
|
2843
2842
|
background: insertAt !== null && !cellEmpty ? `${C.accent}0a` : "transparent",
|
|
@@ -2850,12 +2849,14 @@ function Cell({
|
|
|
2850
2849
|
"div",
|
|
2851
2850
|
{
|
|
2852
2851
|
style: {
|
|
2853
|
-
|
|
2852
|
+
height: DROP_HERE_HEIGHT_PX,
|
|
2853
|
+
minHeight: DROP_HERE_HEIGHT_PX,
|
|
2854
|
+
maxHeight: DROP_HERE_HEIGHT_PX,
|
|
2854
2855
|
display: "flex",
|
|
2855
2856
|
alignItems: "center",
|
|
2856
2857
|
justifyContent: "center",
|
|
2857
|
-
margin:
|
|
2858
|
-
borderRadius:
|
|
2858
|
+
margin: 0,
|
|
2859
|
+
borderRadius: 6,
|
|
2859
2860
|
boxSizing: "border-box",
|
|
2860
2861
|
textAlign: "center",
|
|
2861
2862
|
userSelect: "none",
|
|
@@ -2864,7 +2865,7 @@ function Cell({
|
|
|
2864
2865
|
background: insertAt !== null ? `${C.accent}14` : `${C.canvas}`,
|
|
2865
2866
|
boxShadow: insertAt !== null ? `inset 0 0 0 1px ${C.accent}22` : `inset 0 0 0 1px ${C.border}99`,
|
|
2866
2867
|
color: insertAt !== null ? C.accent2 : C.muted,
|
|
2867
|
-
fontSize:
|
|
2868
|
+
fontSize: 10,
|
|
2868
2869
|
fontWeight: insertAt !== null ? 700 : 500,
|
|
2869
2870
|
letterSpacing: "0.02em"
|
|
2870
2871
|
},
|
|
@@ -2959,7 +2960,7 @@ function LayoutRow({
|
|
|
2959
2960
|
id: editorId ? `${editorId}-col-${row.id}-${ci}` : void 0,
|
|
2960
2961
|
style: {
|
|
2961
2962
|
flex: row.ratios[ci] ?? 1,
|
|
2962
|
-
minHeight: preview ? 50 :
|
|
2963
|
+
minHeight: preview ? 50 : DROP_HERE_HEIGHT_PX,
|
|
2963
2964
|
display: "flex",
|
|
2964
2965
|
flexDirection: "column",
|
|
2965
2966
|
...backgroundLayerStyle(cS),
|
|
@@ -6495,8 +6496,8 @@ var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
|
6495
6496
|
var RIGHT_RAIL_DEFAULT_W = 328;
|
|
6496
6497
|
var RIGHT_RAIL_MIN_W = 260;
|
|
6497
6498
|
var RIGHT_RAIL_MAX_W = 720;
|
|
6498
|
-
var
|
|
6499
|
-
function
|
|
6499
|
+
var ReactEmailEditorComponent = (0, import_react8.forwardRef)(
|
|
6500
|
+
function ReactEmailEditor({
|
|
6500
6501
|
minHeight = "100vh",
|
|
6501
6502
|
editorId = "email-editor",
|
|
6502
6503
|
onLoad,
|
|
@@ -8148,6 +8149,7 @@ var ReactEmailEditor = (0, import_react8.forwardRef)(
|
|
|
8148
8149
|
);
|
|
8149
8150
|
}
|
|
8150
8151
|
);
|
|
8152
|
+
var ReactEmailEditor2 = Object.assign(ReactEmailEditorComponent, { jsonToHtml });
|
|
8151
8153
|
|
|
8152
8154
|
// src/lib/htmlToEmailDesign.ts
|
|
8153
8155
|
var pad = (n) => ({ top: n, right: n, bottom: n, left: n });
|