@kontakto/email-template-editor 1.3.2 → 1.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/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import DOMPurify from 'dompurify';
2
2
  import { marked, Renderer } from 'marked';
3
- import React81, { createContext, forwardRef, useRef, useEffect, useImperativeHandle, useMemo, useContext, useState, useCallback, Fragment } from 'react';
3
+ import React82, { createContext, forwardRef, useRef, useEffect, useImperativeHandle, useMemo, useContext, useState, useCallback, Fragment } from 'react';
4
4
  import { z } from 'zod';
5
5
  import { renderToStaticMarkup as renderToStaticMarkup$1 } from 'react-dom/server';
6
6
  import { createTheme, alpha, lighten, darken } from '@mui/material/styles';
7
7
  import { MenuItem, Stack, ThemeProvider, CssBaseline, useTheme, Drawer, Box, Tabs, Tab, Typography, CircularProgress, Divider as Divider$1, ToggleButtonGroup, ToggleButton, Tooltip, Snackbar, Button as Button$1, IconButton, Dialog, DialogTitle, DialogContent, TextField, DialogActions, InputLabel, FormControlLabel, Switch, Menu, Slider, ButtonBase, Paper, Fade } from '@mui/material';
8
8
  import { create } from 'zustand';
9
- import { MonitorOutlined, PhoneIphoneOutlined, EditOutlined, PreviewOutlined, CodeOutlined, DataObjectOutlined, Add, SaveOutlined, LastPageOutlined, AppRegistrationOutlined, ContentCopyOutlined, DeleteOutlined, FirstPageOutlined, MenuOutlined, FileDownloadOutlined, RoundedCornerOutlined, HeightOutlined, VerticalAlignTopOutlined, VerticalAlignCenterOutlined, VerticalAlignBottomOutlined, SpaceBarOutlined, AspectRatioOutlined, AddOutlined, CloseOutlined, AlignVerticalTopOutlined, AlignVerticalBottomOutlined, AlignHorizontalLeftOutlined, AlignHorizontalRightOutlined, FormatAlignLeftOutlined, FormatAlignCenterOutlined, FormatAlignRightOutlined, TextFieldsOutlined, ArrowUpwardOutlined, ArrowDownwardOutlined, HMobiledataOutlined, NotesOutlined, SmartButtonOutlined, ImageOutlined, AccountCircleOutlined, HorizontalRuleOutlined, Crop32Outlined, HtmlOutlined, ViewColumnOutlined, LibraryAddOutlined } from '@mui/icons-material';
9
+ import { MonitorOutlined, PhoneIphoneOutlined, EditOutlined, PreviewOutlined, CodeOutlined, SubjectOutlined, DataObjectOutlined, Add, SaveOutlined, LastPageOutlined, AppRegistrationOutlined, ContentCopyOutlined, DeleteOutlined, FirstPageOutlined, MenuOutlined, FileDownloadOutlined, RoundedCornerOutlined, HeightOutlined, VerticalAlignTopOutlined, VerticalAlignCenterOutlined, VerticalAlignBottomOutlined, SpaceBarOutlined, AspectRatioOutlined, AddOutlined, CloseOutlined, AlignVerticalTopOutlined, AlignVerticalBottomOutlined, AlignHorizontalLeftOutlined, AlignHorizontalRightOutlined, FormatAlignLeftOutlined, FormatAlignCenterOutlined, FormatAlignRightOutlined, TextFieldsOutlined, ArrowUpwardOutlined, ArrowDownwardOutlined, HMobiledataOutlined, NotesOutlined, SmartButtonOutlined, ImageOutlined, AccountCircleOutlined, HorizontalRuleOutlined, Crop32Outlined, HtmlOutlined, ViewColumnOutlined, LibraryAddOutlined } from '@mui/icons-material';
10
10
  import { HexColorPicker, HexColorInput } from 'react-colorful';
11
11
  import hljs from 'highlight.js';
12
12
  import jsonHighlighter from 'highlight.js/lib/languages/json';
@@ -159,7 +159,7 @@ function renderMarkdownString(str) {
159
159
  function EmailMarkdown(_a) {
160
160
  var _b = _a, { markdown } = _b, props = __objRest(_b, ["markdown"]);
161
161
  const data = useMemo(() => renderMarkdownString(markdown), [markdown]);
162
- return /* @__PURE__ */ React81.createElement("div", __spreadProps(__spreadValues({}, props), { dangerouslySetInnerHTML: { __html: data } }));
162
+ return /* @__PURE__ */ React82.createElement("div", __spreadProps(__spreadValues({}, props), { dangerouslySetInnerHTML: { __html: data } }));
163
163
  }
164
164
  var FONT_FAMILY_SCHEMA = z.enum([
165
165
  "MODERN_SANS",
@@ -235,9 +235,9 @@ function Text({ style, props }) {
235
235
  };
236
236
  const text = (_f = props == null ? void 0 : props.text) != null ? _f : TextPropsDefaults.text;
237
237
  if (props == null ? void 0 : props.markdown) {
238
- return /* @__PURE__ */ React81.createElement(EmailMarkdown, { style: wStyle, markdown: text });
238
+ return /* @__PURE__ */ React82.createElement(EmailMarkdown, { style: wStyle, markdown: text });
239
239
  }
240
- return /* @__PURE__ */ React81.createElement("div", { style: wStyle }, text);
240
+ return /* @__PURE__ */ React82.createElement("div", { style: wStyle }, text);
241
241
  }
242
242
  var PADDING_SCHEMA2 = z.object({
243
243
  top: z.number(),
@@ -286,7 +286,7 @@ function Avatar({ style, props }) {
286
286
  textAlign: (_e = style == null ? void 0 : style.textAlign) != null ? _e : void 0,
287
287
  padding: getPadding2(style == null ? void 0 : style.padding)
288
288
  };
289
- return /* @__PURE__ */ React81.createElement("div", { style: sectionStyle }, /* @__PURE__ */ React81.createElement(
289
+ return /* @__PURE__ */ React82.createElement("div", { style: sectionStyle }, /* @__PURE__ */ React82.createElement(
290
290
  "img",
291
291
  {
292
292
  alt,
@@ -434,14 +434,14 @@ function Button({ style, props }) {
434
434
  padding: `${padding[0]}px ${padding[1]}px`,
435
435
  textDecoration: "none"
436
436
  };
437
- return /* @__PURE__ */ React81.createElement("div", { style: wrapperStyle }, /* @__PURE__ */ React81.createElement("a", { href: url, style: linkStyle, target: "_blank" }, /* @__PURE__ */ React81.createElement(
437
+ return /* @__PURE__ */ React82.createElement("div", { style: wrapperStyle }, /* @__PURE__ */ React82.createElement("a", { href: url, style: linkStyle, target: "_blank" }, /* @__PURE__ */ React82.createElement(
438
438
  "span",
439
439
  {
440
440
  dangerouslySetInnerHTML: {
441
441
  __html: `<!--[if mso]><i style="letter-spacing: ${padding[1]}px;mso-font-width:-100%;mso-text-raise:${textRaise}" hidden>&nbsp;</i><![endif]-->`
442
442
  }
443
443
  }
444
- ), /* @__PURE__ */ React81.createElement("span", null, text), /* @__PURE__ */ React81.createElement(
444
+ ), /* @__PURE__ */ React82.createElement("span", null, text), /* @__PURE__ */ React82.createElement(
445
445
  "span",
446
446
  {
447
447
  dangerouslySetInnerHTML: {
@@ -490,7 +490,7 @@ function ColumnsContainer({ style, columns, props }) {
490
490
  contentAlignment: (_d = props == null ? void 0 : props.contentAlignment) != null ? _d : ColumnsContainerPropsDefaults.contentAlignment,
491
491
  fixedWidths: props == null ? void 0 : props.fixedWidths
492
492
  };
493
- return /* @__PURE__ */ React81.createElement("div", { style: wStyle }, /* @__PURE__ */ React81.createElement(
493
+ return /* @__PURE__ */ React82.createElement("div", { style: wStyle }, /* @__PURE__ */ React82.createElement(
494
494
  "table",
495
495
  {
496
496
  align: "center",
@@ -499,7 +499,7 @@ function ColumnsContainer({ style, columns, props }) {
499
499
  border: 0,
500
500
  style: { tableLayout: "fixed", borderCollapse: "collapse" }
501
501
  },
502
- /* @__PURE__ */ React81.createElement("tbody", { style: { width: "100%" } }, /* @__PURE__ */ React81.createElement("tr", { style: { width: "100%" } }, /* @__PURE__ */ React81.createElement(TableCell, { index: 0, props: blockProps, columns }), /* @__PURE__ */ React81.createElement(TableCell, { index: 1, props: blockProps, columns }), /* @__PURE__ */ React81.createElement(TableCell, { index: 2, props: blockProps, columns })))
502
+ /* @__PURE__ */ React82.createElement("tbody", { style: { width: "100%" } }, /* @__PURE__ */ React82.createElement("tr", { style: { width: "100%" } }, /* @__PURE__ */ React82.createElement(TableCell, { index: 0, props: blockProps, columns }), /* @__PURE__ */ React82.createElement(TableCell, { index: 1, props: blockProps, columns }), /* @__PURE__ */ React82.createElement(TableCell, { index: 2, props: blockProps, columns })))
503
503
  ));
504
504
  }
505
505
  function TableCell({ index, props, columns }) {
@@ -517,7 +517,7 @@ function TableCell({ index, props, columns }) {
517
517
  width: (_d = (_c = props.fixedWidths) == null ? void 0 : _c[index]) != null ? _d : void 0
518
518
  };
519
519
  const children = (_e = columns && columns[index]) != null ? _e : null;
520
- return /* @__PURE__ */ React81.createElement("td", { style }, children);
520
+ return /* @__PURE__ */ React82.createElement("td", { style }, children);
521
521
  }
522
522
  function getPaddingBefore(index, { columnsGap, columnsCount }) {
523
523
  if (index === 0) {
@@ -579,9 +579,9 @@ function Container({ style, children }) {
579
579
  padding: getPadding5(style == null ? void 0 : style.padding)
580
580
  };
581
581
  if (!children) {
582
- return /* @__PURE__ */ React81.createElement("div", { style: wStyle });
582
+ return /* @__PURE__ */ React82.createElement("div", { style: wStyle });
583
583
  }
584
- return /* @__PURE__ */ React81.createElement("div", { style: wStyle }, children);
584
+ return /* @__PURE__ */ React82.createElement("div", { style: wStyle }, children);
585
585
  }
586
586
  var container_default = Container;
587
587
  var COLOR_SCHEMA5 = z.string().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional();
@@ -615,7 +615,7 @@ function Divider({ style, props }) {
615
615
  };
616
616
  const borderTopWidth = (_b = props == null ? void 0 : props.lineHeight) != null ? _b : DividerPropsDefaults.lineHeight;
617
617
  const borderTopColor = (_c = props == null ? void 0 : props.lineColor) != null ? _c : DividerPropsDefaults.lineColor;
618
- return /* @__PURE__ */ React81.createElement("div", { style: st }, /* @__PURE__ */ React81.createElement(
618
+ return /* @__PURE__ */ React82.createElement("div", { style: st }, /* @__PURE__ */ React82.createElement(
619
619
  "hr",
620
620
  {
621
621
  style: {
@@ -705,11 +705,11 @@ function Heading({ props, style }) {
705
705
  };
706
706
  switch (level) {
707
707
  case "h1":
708
- return /* @__PURE__ */ React81.createElement("h1", { style: hStyle }, text);
708
+ return /* @__PURE__ */ React82.createElement("h1", { style: hStyle }, text);
709
709
  case "h2":
710
- return /* @__PURE__ */ React81.createElement("h2", { style: hStyle }, text);
710
+ return /* @__PURE__ */ React82.createElement("h2", { style: hStyle }, text);
711
711
  case "h3":
712
- return /* @__PURE__ */ React81.createElement("h3", { style: hStyle }, text);
712
+ return /* @__PURE__ */ React82.createElement("h3", { style: hStyle }, text);
713
713
  }
714
714
  }
715
715
  function getFontSize(level) {
@@ -791,9 +791,9 @@ function Html({ style, props }) {
791
791
  padding: getPadding8(style == null ? void 0 : style.padding)
792
792
  };
793
793
  if (!children) {
794
- return /* @__PURE__ */ React81.createElement("div", { style: cssStyle });
794
+ return /* @__PURE__ */ React82.createElement("div", { style: cssStyle });
795
795
  }
796
- return /* @__PURE__ */ React81.createElement("div", { style: cssStyle, dangerouslySetInnerHTML: { __html: children } });
796
+ return /* @__PURE__ */ React82.createElement("div", { style: cssStyle, dangerouslySetInnerHTML: { __html: children } });
797
797
  }
798
798
  var html_default = Html;
799
799
  var PADDING_SCHEMA9 = z.object({
@@ -829,7 +829,7 @@ function Image({ style, props }) {
829
829
  const linkHref = (_c = props == null ? void 0 : props.linkHref) != null ? _c : null;
830
830
  const width = (_d = props == null ? void 0 : props.width) != null ? _d : void 0;
831
831
  const height = (_e = props == null ? void 0 : props.height) != null ? _e : void 0;
832
- const imageElement = /* @__PURE__ */ React81.createElement(
832
+ const imageElement = /* @__PURE__ */ React82.createElement(
833
833
  "img",
834
834
  {
835
835
  alt: (_f = props == null ? void 0 : props.alt) != null ? _f : "",
@@ -849,9 +849,9 @@ function Image({ style, props }) {
849
849
  }
850
850
  );
851
851
  if (!linkHref) {
852
- return /* @__PURE__ */ React81.createElement("div", { style: sectionStyle }, imageElement);
852
+ return /* @__PURE__ */ React82.createElement("div", { style: sectionStyle }, imageElement);
853
853
  }
854
- return /* @__PURE__ */ React81.createElement("div", { style: sectionStyle }, /* @__PURE__ */ React81.createElement("a", { href: linkHref, style: { textDecoration: "none" }, target: "_blank" }, imageElement));
854
+ return /* @__PURE__ */ React82.createElement("div", { style: sectionStyle }, /* @__PURE__ */ React82.createElement("a", { href: linkHref, style: { textDecoration: "none" }, target: "_blank" }, imageElement));
855
855
  }
856
856
  var image_default = Image;
857
857
  var SpacerPropsSchema = z.object({
@@ -868,13 +868,13 @@ function Spacer({ props }) {
868
868
  const style = {
869
869
  height: (_a = props == null ? void 0 : props.height) != null ? _a : SpacerPropsDefaults.height
870
870
  };
871
- return /* @__PURE__ */ React81.createElement("div", { style });
871
+ return /* @__PURE__ */ React82.createElement("div", { style });
872
872
  }
873
873
  var spacer_default = Spacer;
874
874
  function buildBlockComponent(blocks) {
875
875
  return function BlockComponent({ type, data }) {
876
876
  const Component = blocks[type].Component;
877
- return /* @__PURE__ */ React81.createElement(Component, __spreadValues({}, data));
877
+ return /* @__PURE__ */ React82.createElement(Component, __spreadValues({}, data));
878
878
  };
879
879
  }
880
880
  function buildBlockConfigurationSchema(blocks) {
@@ -911,9 +911,9 @@ function ColumnsContainerReader({ style, props }) {
911
911
  const _a = props != null ? props : {}, { columns } = _a, restProps = __objRest(_a, ["columns"]);
912
912
  let cols = void 0;
913
913
  if (columns) {
914
- cols = columns.map((col) => col.childrenIds.map((childId) => /* @__PURE__ */ React81.createElement(ReaderBlock, { key: childId, id: childId })));
914
+ cols = columns.map((col) => col.childrenIds.map((childId) => /* @__PURE__ */ React82.createElement(ReaderBlock, { key: childId, id: childId })));
915
915
  }
916
- return /* @__PURE__ */ React81.createElement(columns_container_default, { props: restProps, columns: cols, style });
916
+ return /* @__PURE__ */ React82.createElement(columns_container_default, { props: restProps, columns: cols, style });
917
917
  }
918
918
  var ContainerPropsSchema2 = z.object({
919
919
  style: ContainerPropsSchema.shape.style,
@@ -924,7 +924,7 @@ var ContainerPropsSchema2 = z.object({
924
924
  function ContainerReader({ style, props }) {
925
925
  var _a;
926
926
  const childrenIds = (_a = props == null ? void 0 : props.childrenIds) != null ? _a : [];
927
- return /* @__PURE__ */ React81.createElement(container_default, { style }, childrenIds.map((childId) => /* @__PURE__ */ React81.createElement(ReaderBlock, { key: childId, id: childId })));
927
+ return /* @__PURE__ */ React82.createElement(container_default, { style }, childrenIds.map((childId) => /* @__PURE__ */ React82.createElement(ReaderBlock, { key: childId, id: childId })));
928
928
  }
929
929
  var COLOR_SCHEMA8 = z.string().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional();
930
930
  var FONT_FAMILY_SCHEMA5 = z.enum([
@@ -979,7 +979,7 @@ function getBorder2({ borderColor }) {
979
979
  function EmailLayoutReader(props) {
980
980
  var _a, _b, _c, _d, _e;
981
981
  const childrenIds = (_a = props.childrenIds) != null ? _a : [];
982
- return /* @__PURE__ */ React81.createElement(
982
+ return /* @__PURE__ */ React82.createElement(
983
983
  "div",
984
984
  {
985
985
  style: {
@@ -996,7 +996,7 @@ function EmailLayoutReader(props) {
996
996
  width: "100%"
997
997
  }
998
998
  },
999
- /* @__PURE__ */ React81.createElement(
999
+ /* @__PURE__ */ React82.createElement(
1000
1000
  "table",
1001
1001
  {
1002
1002
  align: "center",
@@ -1013,7 +1013,7 @@ function EmailLayoutReader(props) {
1013
1013
  cellPadding: "0",
1014
1014
  border: 0
1015
1015
  },
1016
- /* @__PURE__ */ React81.createElement("tbody", null, /* @__PURE__ */ React81.createElement("tr", { style: { width: "100%" } }, /* @__PURE__ */ React81.createElement("td", null, childrenIds.map((childId) => /* @__PURE__ */ React81.createElement(ReaderBlock, { key: childId, id: childId })))))
1016
+ /* @__PURE__ */ React82.createElement("tbody", null, /* @__PURE__ */ React82.createElement("tr", { style: { width: "100%" } }, /* @__PURE__ */ React82.createElement("td", null, childrenIds.map((childId) => /* @__PURE__ */ React82.createElement(ReaderBlock, { key: childId, id: childId })))))
1017
1017
  )
1018
1018
  );
1019
1019
  }
@@ -1025,7 +1025,7 @@ function useReaderDocument() {
1025
1025
  }
1026
1026
  function ReaderBlock({ id }) {
1027
1027
  const document2 = useReaderDocument();
1028
- return document2[id] ? /* @__PURE__ */ React81.createElement(BaseReaderBlock, __spreadValues({}, document2[id])) : null;
1028
+ return document2[id] ? /* @__PURE__ */ React82.createElement(BaseReaderBlock, __spreadValues({}, document2[id])) : null;
1029
1029
  }
1030
1030
  var READER_DICTIONARY = buildBlockConfigurationDictionary({
1031
1031
  ColumnsContainer: {
@@ -1078,15 +1078,149 @@ var ReaderBlockSchema = buildBlockConfigurationSchema(READER_DICTIONARY);
1078
1078
  var ReaderDocumentSchema = z.record(z.string(), ReaderBlockSchema);
1079
1079
  var BaseReaderBlock = buildBlockComponent(READER_DICTIONARY);
1080
1080
  function Reader({ document: document2, rootBlockId }) {
1081
- return /* @__PURE__ */ React81.createElement(ReaderContext.Provider, { value: document2 }, /* @__PURE__ */ React81.createElement(ReaderBlock, { id: rootBlockId }));
1081
+ return /* @__PURE__ */ React82.createElement(ReaderContext.Provider, { value: document2 }, /* @__PURE__ */ React82.createElement(ReaderBlock, { id: rootBlockId }));
1082
1082
  }
1083
1083
 
1084
1084
  // src/email-builder/renderers/render-to-static-markup.tsx
1085
1085
  function renderToStaticMarkup(document2, { rootBlockId }) {
1086
1086
  return "<!DOCTYPE html>" + renderToStaticMarkup$1(
1087
- /* @__PURE__ */ React81.createElement("html", null, /* @__PURE__ */ React81.createElement("body", null, /* @__PURE__ */ React81.createElement(Reader, { document: document2, rootBlockId })))
1087
+ /* @__PURE__ */ React82.createElement("html", null, /* @__PURE__ */ React82.createElement("body", null, /* @__PURE__ */ React82.createElement(Reader, { document: document2, rootBlockId })))
1088
1088
  );
1089
1089
  }
1090
+
1091
+ // src/email-builder/renderers/render-to-text.ts
1092
+ function renderToText(document2, { rootBlockId }) {
1093
+ const lines = [];
1094
+ renderBlock(document2, rootBlockId, lines);
1095
+ return lines.join("\n").replace(/\n{3,}/g, "\n\n").trim() + "\n";
1096
+ }
1097
+ function renderBlock(document2, blockId, lines) {
1098
+ var _a;
1099
+ const block = document2[blockId];
1100
+ if (!block) return;
1101
+ const { type, data } = block;
1102
+ switch (type) {
1103
+ case "EmailLayout":
1104
+ renderChildren(document2, data == null ? void 0 : data.childrenIds, lines);
1105
+ break;
1106
+ case "Container":
1107
+ renderChildren(document2, (_a = data == null ? void 0 : data.props) == null ? void 0 : _a.childrenIds, lines);
1108
+ break;
1109
+ case "ColumnsContainer":
1110
+ renderColumnsContainer(document2, data, lines);
1111
+ break;
1112
+ case "Text":
1113
+ renderText(data, lines);
1114
+ break;
1115
+ case "Heading":
1116
+ renderHeading(data, lines);
1117
+ break;
1118
+ case "Button":
1119
+ renderButton(data, lines);
1120
+ break;
1121
+ case "Image":
1122
+ renderImage(data, lines);
1123
+ break;
1124
+ case "Avatar":
1125
+ renderAvatar(data, lines);
1126
+ break;
1127
+ case "Html":
1128
+ renderHtml(data, lines);
1129
+ break;
1130
+ case "Divider":
1131
+ lines.push("");
1132
+ lines.push("---");
1133
+ lines.push("");
1134
+ break;
1135
+ case "Spacer":
1136
+ lines.push("");
1137
+ break;
1138
+ }
1139
+ }
1140
+ function renderChildren(document2, childrenIds, lines) {
1141
+ if (!childrenIds) return;
1142
+ for (const childId of childrenIds) {
1143
+ renderBlock(document2, childId, lines);
1144
+ }
1145
+ }
1146
+ function renderColumnsContainer(document2, data, lines) {
1147
+ var _a, _b;
1148
+ const columns = (_a = data == null ? void 0 : data.props) == null ? void 0 : _a.columns;
1149
+ if (!columns) return;
1150
+ for (const col of columns) {
1151
+ if ((_b = col == null ? void 0 : col.childrenIds) == null ? void 0 : _b.length) {
1152
+ renderChildren(document2, col.childrenIds, lines);
1153
+ }
1154
+ }
1155
+ }
1156
+ function renderText(data, lines) {
1157
+ var _a, _b, _c;
1158
+ const text = (_b = (_a = data == null ? void 0 : data.props) == null ? void 0 : _a.text) != null ? _b : "";
1159
+ if (!text) return;
1160
+ if ((_c = data == null ? void 0 : data.props) == null ? void 0 : _c.markdown) {
1161
+ lines.push(text);
1162
+ } else {
1163
+ lines.push(text);
1164
+ }
1165
+ lines.push("");
1166
+ }
1167
+ function renderHeading(data, lines) {
1168
+ var _a, _b, _c, _d;
1169
+ const text = (_b = (_a = data == null ? void 0 : data.props) == null ? void 0 : _a.text) != null ? _b : "";
1170
+ if (!text) return;
1171
+ const level = (_d = (_c = data == null ? void 0 : data.props) == null ? void 0 : _c.level) != null ? _d : "h2";
1172
+ const prefix = level === "h1" ? "# " : level === "h2" ? "## " : "### ";
1173
+ lines.push(prefix + text);
1174
+ lines.push("");
1175
+ }
1176
+ function renderButton(data, lines) {
1177
+ var _a, _b, _c, _d;
1178
+ const text = (_b = (_a = data == null ? void 0 : data.props) == null ? void 0 : _a.text) != null ? _b : "";
1179
+ const url = (_d = (_c = data == null ? void 0 : data.props) == null ? void 0 : _c.url) != null ? _d : "";
1180
+ if (text && url) {
1181
+ lines.push(`${text}: ${url}`);
1182
+ } else if (text) {
1183
+ lines.push(text);
1184
+ } else if (url) {
1185
+ lines.push(url);
1186
+ }
1187
+ lines.push("");
1188
+ }
1189
+ function renderImage(data, lines) {
1190
+ var _a, _b, _c, _d, _e, _f;
1191
+ const alt = (_b = (_a = data == null ? void 0 : data.props) == null ? void 0 : _a.alt) != null ? _b : "";
1192
+ const url = (_d = (_c = data == null ? void 0 : data.props) == null ? void 0 : _c.url) != null ? _d : "";
1193
+ const linkHref = (_f = (_e = data == null ? void 0 : data.props) == null ? void 0 : _e.linkHref) != null ? _f : "";
1194
+ if (alt && linkHref) {
1195
+ lines.push(`[${alt}] ${linkHref}`);
1196
+ } else if (alt) {
1197
+ lines.push(`[${alt}]`);
1198
+ } else if (url) {
1199
+ lines.push(`[Image: ${url}]`);
1200
+ }
1201
+ lines.push("");
1202
+ }
1203
+ function renderAvatar(data, lines) {
1204
+ var _a, _b;
1205
+ const alt = (_b = (_a = data == null ? void 0 : data.props) == null ? void 0 : _a.alt) != null ? _b : "";
1206
+ if (alt) {
1207
+ lines.push(`[${alt}]`);
1208
+ lines.push("");
1209
+ }
1210
+ }
1211
+ function renderHtml(data, lines) {
1212
+ var _a, _b;
1213
+ const contents = (_b = (_a = data == null ? void 0 : data.props) == null ? void 0 : _a.contents) != null ? _b : "";
1214
+ if (!contents) return;
1215
+ const text = stripHtml(contents);
1216
+ if (text) {
1217
+ lines.push(text);
1218
+ lines.push("");
1219
+ }
1220
+ }
1221
+ function stripHtml(html2) {
1222
+ return html2.replace(/<br\s*\/?>/gi, "\n").replace(/<\/(p|div|h[1-6]|li|tr|blockquote)>/gi, "\n").replace(/<hr\s*\/?>/gi, "\n---\n").replace(/<[^>]+>/g, "").replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&nbsp;/g, " ").split("\n").map((line) => line.trim()).join("\n").replace(/\n{3,}/g, "\n\n").trim();
1223
+ }
1090
1224
  var BRAND_NAVY = "#212443";
1091
1225
  var BRAND_BLUE = "#0079CC";
1092
1226
  var BRAND_GREEN = "#1F8466";
@@ -1737,7 +1871,7 @@ var EmailEditorProvider = ({
1737
1871
  registerSaveListener,
1738
1872
  setCurrentTemplate
1739
1873
  }), [currentTemplateId, currentTemplateName, saveTemplate, loadTemplate, registerSaveListener, setCurrentTemplate]);
1740
- return /* @__PURE__ */ React81.createElement(EmailEditorContext.Provider, { value }, children);
1874
+ return /* @__PURE__ */ React82.createElement(EmailEditorContext.Provider, { value }, children);
1741
1875
  };
1742
1876
  var useEmailEditor = () => {
1743
1877
  const context = useContext(EmailEditorContext);
@@ -1747,14 +1881,14 @@ var useEmailEditor = () => {
1747
1881
  return context;
1748
1882
  };
1749
1883
  function BaseSidebarPanel({ title, children }) {
1750
- return /* @__PURE__ */ React81.createElement(Box, { p: 2 }, /* @__PURE__ */ React81.createElement(Typography, { variant: "overline", color: "text.secondary", sx: { display: "block", mb: 2 } }, title), /* @__PURE__ */ React81.createElement(Stack, { spacing: 5, mb: 3 }, children));
1884
+ return /* @__PURE__ */ React82.createElement(Box, { p: 2 }, /* @__PURE__ */ React82.createElement(Typography, { variant: "overline", color: "text.secondary", sx: { display: "block", mb: 2 } }, title), /* @__PURE__ */ React82.createElement(Stack, { spacing: 5, mb: 3 }, children));
1751
1885
  }
1752
1886
  function RadioGroupInput({ label, children, defaultValue, onChange }) {
1753
1887
  const [value, setValue] = useState(defaultValue);
1754
1888
  useEffect(() => {
1755
1889
  setValue(defaultValue);
1756
1890
  }, [defaultValue]);
1757
- return /* @__PURE__ */ React81.createElement(Stack, { alignItems: "flex-start" }, /* @__PURE__ */ React81.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React81.createElement(
1891
+ return /* @__PURE__ */ React82.createElement(Stack, { alignItems: "flex-start" }, /* @__PURE__ */ React82.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React82.createElement(
1758
1892
  ToggleButtonGroup,
1759
1893
  {
1760
1894
  exclusive: true,
@@ -1774,7 +1908,7 @@ function RadioGroupInput({ label, children, defaultValue, onChange }) {
1774
1908
  }
1775
1909
  function RawSliderInput(_a) {
1776
1910
  var _b = _a, { iconLabel, value, setValue, units } = _b, props = __objRest(_b, ["iconLabel", "value", "setValue", "units"]);
1777
- return /* @__PURE__ */ React81.createElement(Stack, { direction: "row", alignItems: "center", spacing: 2, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React81.createElement(Box, { sx: { minWidth: 24, lineHeight: 1, flexShrink: 0 } }, iconLabel), /* @__PURE__ */ React81.createElement(
1911
+ return /* @__PURE__ */ React82.createElement(Stack, { direction: "row", alignItems: "center", spacing: 2, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React82.createElement(Box, { sx: { minWidth: 24, lineHeight: 1, flexShrink: 0 } }, iconLabel), /* @__PURE__ */ React82.createElement(
1778
1912
  Slider,
1779
1913
  __spreadProps(__spreadValues({}, props), {
1780
1914
  value,
@@ -1785,14 +1919,14 @@ function RawSliderInput(_a) {
1785
1919
  setValue(value2);
1786
1920
  }
1787
1921
  })
1788
- ), /* @__PURE__ */ React81.createElement(Box, { sx: { minWidth: 32, textAlign: "right", flexShrink: 0 } }, /* @__PURE__ */ React81.createElement(Typography, { variant: "body2", color: "text.secondary", sx: { lineHeight: 1 } }, value, units)));
1922
+ ), /* @__PURE__ */ React82.createElement(Box, { sx: { minWidth: 32, textAlign: "right", flexShrink: 0 } }, /* @__PURE__ */ React82.createElement(Typography, { variant: "body2", color: "text.secondary", sx: { lineHeight: 1 } }, value, units)));
1789
1923
  }
1790
1924
 
1791
1925
  // src/app/inspector-drawer/configuration-panel/input-panels/helpers/inputs/slider-input.tsx
1792
1926
  function SliderInput(_a) {
1793
1927
  var _b = _a, { label, defaultValue, onChange } = _b, props = __objRest(_b, ["label", "defaultValue", "onChange"]);
1794
1928
  const [value, setValue] = useState(defaultValue);
1795
- return /* @__PURE__ */ React81.createElement(Stack, { spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React81.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React81.createElement(
1929
+ return /* @__PURE__ */ React82.createElement(Stack, { spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React82.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React82.createElement(
1796
1930
  RawSliderInput,
1797
1931
  __spreadValues({
1798
1932
  value,
@@ -1809,7 +1943,7 @@ function TextInput({ helperText, label, placeholder, rows, InputProps: InputProp
1809
1943
  useEffect(() => {
1810
1944
  setValue(defaultValue);
1811
1945
  }, [defaultValue]);
1812
- return /* @__PURE__ */ React81.createElement(
1946
+ return /* @__PURE__ */ React82.createElement(
1813
1947
  TextField,
1814
1948
  {
1815
1949
  fullWidth: true,
@@ -1834,8 +1968,8 @@ var TILE_BUTTON = {
1834
1968
  height: 24
1835
1969
  };
1836
1970
  function Swatch({ paletteColors, value, onChange }) {
1837
- const renderButton = (colorValue) => {
1838
- return /* @__PURE__ */ React81.createElement(
1971
+ const renderButton2 = (colorValue) => {
1972
+ return /* @__PURE__ */ React82.createElement(
1839
1973
  Button$1,
1840
1974
  {
1841
1975
  key: colorValue,
@@ -1854,7 +1988,7 @@ function Swatch({ paletteColors, value, onChange }) {
1854
1988
  }
1855
1989
  );
1856
1990
  };
1857
- return /* @__PURE__ */ React81.createElement(Box, { width: "100%", sx: { display: "grid", gap: 1, gridTemplateColumns: "1fr 1fr 1fr 1fr 1fr 1fr" } }, paletteColors.map((c) => renderButton(c)));
1991
+ return /* @__PURE__ */ React82.createElement(Box, { width: "100%", sx: { display: "grid", gap: 1, gridTemplateColumns: "1fr 1fr 1fr 1fr 1fr 1fr" } }, paletteColors.map((c) => renderButton2(c)));
1858
1992
  }
1859
1993
 
1860
1994
  // src/app/inspector-drawer/configuration-panel/input-panels/helpers/inputs/color-input/picker.tsx
@@ -1921,7 +2055,7 @@ var SX = {
1921
2055
  }
1922
2056
  };
1923
2057
  function Picker({ value, onChange }) {
1924
- return /* @__PURE__ */ React81.createElement(Stack, { spacing: 1, sx: SX }, /* @__PURE__ */ React81.createElement(HexColorPicker, { color: value, onChange }), /* @__PURE__ */ React81.createElement(Swatch, { paletteColors: DEFAULT_PRESET_COLORS, value, onChange }), /* @__PURE__ */ React81.createElement(Box, { pt: 1 }, /* @__PURE__ */ React81.createElement(HexColorInput, { prefixed: true, color: value, onChange })));
2058
+ return /* @__PURE__ */ React82.createElement(Stack, { spacing: 1, sx: SX }, /* @__PURE__ */ React82.createElement(HexColorPicker, { color: value, onChange }), /* @__PURE__ */ React82.createElement(Swatch, { paletteColors: DEFAULT_PRESET_COLORS, value, onChange }), /* @__PURE__ */ React82.createElement(Box, { pt: 1 }, /* @__PURE__ */ React82.createElement(HexColorInput, { prefixed: true, color: value, onChange })));
1925
2059
  }
1926
2060
 
1927
2061
  // src/app/inspector-drawer/configuration-panel/input-panels/helpers/inputs/color-input/base-color-input.tsx
@@ -1946,7 +2080,7 @@ function ColorInput({ label, defaultValue, onChange, nullable }) {
1946
2080
  if (typeof value !== "string" || value.trim().length === 0) {
1947
2081
  return null;
1948
2082
  }
1949
- return /* @__PURE__ */ React81.createElement(
2083
+ return /* @__PURE__ */ React82.createElement(
1950
2084
  ButtonBase,
1951
2085
  {
1952
2086
  onClick: () => {
@@ -1954,16 +2088,16 @@ function ColorInput({ label, defaultValue, onChange, nullable }) {
1954
2088
  onChange(null);
1955
2089
  }
1956
2090
  },
1957
- /* @__PURE__ */ React81.createElement(CloseOutlined, { fontSize: "small", sx: { color: "grey.600" } })
2091
+ /* @__PURE__ */ React82.createElement(CloseOutlined, { fontSize: "small", sx: { color: "grey.600" } })
1958
2092
  );
1959
2093
  };
1960
2094
  const renderOpenButton = () => {
1961
2095
  if (value) {
1962
- return /* @__PURE__ */ React81.createElement(ButtonBase, { onClick: handleClickOpen, sx: __spreadProps(__spreadValues({}, BUTTON_SX), { bgcolor: value }) });
2096
+ return /* @__PURE__ */ React82.createElement(ButtonBase, { onClick: handleClickOpen, sx: __spreadProps(__spreadValues({}, BUTTON_SX), { bgcolor: value }) });
1963
2097
  }
1964
- return /* @__PURE__ */ React81.createElement(ButtonBase, { onClick: handleClickOpen, sx: __spreadValues({}, BUTTON_SX) }, /* @__PURE__ */ React81.createElement(AddOutlined, { fontSize: "small" }));
2098
+ return /* @__PURE__ */ React82.createElement(ButtonBase, { onClick: handleClickOpen, sx: __spreadValues({}, BUTTON_SX) }, /* @__PURE__ */ React82.createElement(AddOutlined, { fontSize: "small" }));
1965
2099
  };
1966
- return /* @__PURE__ */ React81.createElement(Stack, { alignItems: "flex-start" }, /* @__PURE__ */ React81.createElement(InputLabel, { sx: { mb: 0.5 } }, label), /* @__PURE__ */ React81.createElement(Stack, { direction: "row", spacing: 1 }, renderOpenButton(), renderResetButton()), /* @__PURE__ */ React81.createElement(
2100
+ return /* @__PURE__ */ React82.createElement(Stack, { alignItems: "flex-start" }, /* @__PURE__ */ React82.createElement(InputLabel, { sx: { mb: 0.5 } }, label), /* @__PURE__ */ React82.createElement(Stack, { direction: "row", spacing: 1 }, renderOpenButton(), renderResetButton()), /* @__PURE__ */ React82.createElement(
1967
2101
  Menu,
1968
2102
  {
1969
2103
  anchorEl,
@@ -1973,7 +2107,7 @@ function ColorInput({ label, defaultValue, onChange, nullable }) {
1973
2107
  sx: { height: "auto", padding: 0 }
1974
2108
  }
1975
2109
  },
1976
- /* @__PURE__ */ React81.createElement(
2110
+ /* @__PURE__ */ React82.createElement(
1977
2111
  Picker,
1978
2112
  {
1979
2113
  value: value || "",
@@ -1988,10 +2122,10 @@ function ColorInput({ label, defaultValue, onChange, nullable }) {
1988
2122
 
1989
2123
  // src/app/inspector-drawer/configuration-panel/input-panels/helpers/inputs/color-input/index.tsx
1990
2124
  function ColorInput2(props) {
1991
- return /* @__PURE__ */ React81.createElement(ColorInput, __spreadProps(__spreadValues({}, props), { nullable: false }));
2125
+ return /* @__PURE__ */ React82.createElement(ColorInput, __spreadProps(__spreadValues({}, props), { nullable: false }));
1992
2126
  }
1993
2127
  function NullableColorInput(props) {
1994
- return /* @__PURE__ */ React81.createElement(ColorInput, __spreadProps(__spreadValues({}, props), { nullable: true }));
2128
+ return /* @__PURE__ */ React82.createElement(ColorInput, __spreadProps(__spreadValues({}, props), { nullable: true }));
1995
2129
  }
1996
2130
 
1997
2131
  // src/editor/blocks/helpers/font-family.ts
@@ -2044,13 +2178,13 @@ var FONT_FAMILIES = [
2044
2178
  ];
2045
2179
 
2046
2180
  // src/app/inspector-drawer/configuration-panel/input-panels/helpers/inputs/font-family.tsx
2047
- var OPTIONS = FONT_FAMILIES.map((option) => /* @__PURE__ */ React81.createElement(MenuItem, { key: option.key, value: option.key, sx: { fontFamily: option.value } }, option.label));
2181
+ var OPTIONS = FONT_FAMILIES.map((option) => /* @__PURE__ */ React82.createElement(MenuItem, { key: option.key, value: option.key, sx: { fontFamily: option.value } }, option.label));
2048
2182
  function NullableFontFamily({ label, onChange, defaultValue }) {
2049
2183
  const [value, setValue] = useState(defaultValue != null ? defaultValue : "inherit");
2050
2184
  useEffect(() => {
2051
2185
  setValue(defaultValue != null ? defaultValue : "inherit");
2052
2186
  }, [defaultValue]);
2053
- return /* @__PURE__ */ React81.createElement(
2187
+ return /* @__PURE__ */ React82.createElement(
2054
2188
  TextField,
2055
2189
  {
2056
2190
  select: true,
@@ -2063,7 +2197,7 @@ function NullableFontFamily({ label, onChange, defaultValue }) {
2063
2197
  onChange(v === null ? null : v);
2064
2198
  }
2065
2199
  },
2066
- /* @__PURE__ */ React81.createElement(MenuItem, { value: "inherit" }, "Match email settings"),
2200
+ /* @__PURE__ */ React82.createElement(MenuItem, { value: "inherit" }, "Match email settings"),
2067
2201
  OPTIONS
2068
2202
  );
2069
2203
  }
@@ -2076,10 +2210,10 @@ function FontSizeInput({ label, defaultValue, onChange }) {
2076
2210
  setValue(value2);
2077
2211
  onChange(value2);
2078
2212
  };
2079
- return /* @__PURE__ */ React81.createElement(Stack, { spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React81.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React81.createElement(
2213
+ return /* @__PURE__ */ React82.createElement(Stack, { spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React82.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React82.createElement(
2080
2214
  RawSliderInput,
2081
2215
  {
2082
- iconLabel: /* @__PURE__ */ React81.createElement(TextFieldsOutlined, { sx: { fontSize: 16 } }),
2216
+ iconLabel: /* @__PURE__ */ React82.createElement(TextFieldsOutlined, { sx: { fontSize: 16 } }),
2083
2217
  value,
2084
2218
  setValue: handleChange,
2085
2219
  units: "px",
@@ -2094,7 +2228,7 @@ function FontWeightInput({ label, defaultValue, onChange }) {
2094
2228
  useEffect(() => {
2095
2229
  setValue(defaultValue);
2096
2230
  }, [defaultValue]);
2097
- return /* @__PURE__ */ React81.createElement(
2231
+ return /* @__PURE__ */ React82.createElement(
2098
2232
  RadioGroupInput,
2099
2233
  {
2100
2234
  label,
@@ -2104,8 +2238,8 @@ function FontWeightInput({ label, defaultValue, onChange }) {
2104
2238
  onChange(fontWeight);
2105
2239
  }
2106
2240
  },
2107
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "normal" }, "Regular"),
2108
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "bold" }, "Bold")
2241
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "normal" }, "Regular"),
2242
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "bold" }, "Bold")
2109
2243
  );
2110
2244
  }
2111
2245
  function PaddingInput({ label, defaultValue, onChange }) {
@@ -2127,10 +2261,10 @@ function PaddingInput({ label, defaultValue, onChange }) {
2127
2261
  setValue(v);
2128
2262
  onChange(v);
2129
2263
  }
2130
- return /* @__PURE__ */ React81.createElement(Stack, { spacing: 2, alignItems: "flex-start", pb: 1 }, /* @__PURE__ */ React81.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React81.createElement(
2264
+ return /* @__PURE__ */ React82.createElement(Stack, { spacing: 2, alignItems: "flex-start", pb: 1 }, /* @__PURE__ */ React82.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React82.createElement(
2131
2265
  RawSliderInput,
2132
2266
  {
2133
- iconLabel: /* @__PURE__ */ React81.createElement(AlignVerticalTopOutlined, { sx: { fontSize: 16 } }),
2267
+ iconLabel: /* @__PURE__ */ React82.createElement(AlignVerticalTopOutlined, { sx: { fontSize: 16 } }),
2134
2268
  value: value.top,
2135
2269
  setValue: (num) => handleChange("top", num),
2136
2270
  units: "px",
@@ -2139,10 +2273,10 @@ function PaddingInput({ label, defaultValue, onChange }) {
2139
2273
  max: 80,
2140
2274
  marks: true
2141
2275
  }
2142
- ), /* @__PURE__ */ React81.createElement(
2276
+ ), /* @__PURE__ */ React82.createElement(
2143
2277
  RawSliderInput,
2144
2278
  {
2145
- iconLabel: /* @__PURE__ */ React81.createElement(AlignVerticalBottomOutlined, { sx: { fontSize: 16 } }),
2279
+ iconLabel: /* @__PURE__ */ React82.createElement(AlignVerticalBottomOutlined, { sx: { fontSize: 16 } }),
2146
2280
  value: value.bottom,
2147
2281
  setValue: (num) => handleChange("bottom", num),
2148
2282
  units: "px",
@@ -2151,10 +2285,10 @@ function PaddingInput({ label, defaultValue, onChange }) {
2151
2285
  max: 80,
2152
2286
  marks: true
2153
2287
  }
2154
- ), /* @__PURE__ */ React81.createElement(
2288
+ ), /* @__PURE__ */ React82.createElement(
2155
2289
  RawSliderInput,
2156
2290
  {
2157
- iconLabel: /* @__PURE__ */ React81.createElement(AlignHorizontalLeftOutlined, { sx: { fontSize: 16 } }),
2291
+ iconLabel: /* @__PURE__ */ React82.createElement(AlignHorizontalLeftOutlined, { sx: { fontSize: 16 } }),
2158
2292
  value: value.left,
2159
2293
  setValue: (num) => handleChange("left", num),
2160
2294
  units: "px",
@@ -2163,10 +2297,10 @@ function PaddingInput({ label, defaultValue, onChange }) {
2163
2297
  max: 80,
2164
2298
  marks: true
2165
2299
  }
2166
- ), /* @__PURE__ */ React81.createElement(
2300
+ ), /* @__PURE__ */ React82.createElement(
2167
2301
  RawSliderInput,
2168
2302
  {
2169
- iconLabel: /* @__PURE__ */ React81.createElement(AlignHorizontalRightOutlined, { sx: { fontSize: 16 } }),
2303
+ iconLabel: /* @__PURE__ */ React82.createElement(AlignHorizontalRightOutlined, { sx: { fontSize: 16 } }),
2170
2304
  value: value.right,
2171
2305
  setValue: (num) => handleChange("right", num),
2172
2306
  units: "px",
@@ -2182,7 +2316,7 @@ function TextAlignInput({ label, defaultValue, onChange }) {
2182
2316
  useEffect(() => {
2183
2317
  setValue(defaultValue != null ? defaultValue : "left");
2184
2318
  }, [defaultValue]);
2185
- return /* @__PURE__ */ React81.createElement(
2319
+ return /* @__PURE__ */ React82.createElement(
2186
2320
  RadioGroupInput,
2187
2321
  {
2188
2322
  label,
@@ -2192,9 +2326,9 @@ function TextAlignInput({ label, defaultValue, onChange }) {
2192
2326
  onChange(value2);
2193
2327
  }
2194
2328
  },
2195
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "left" }, /* @__PURE__ */ React81.createElement(FormatAlignLeftOutlined, { fontSize: "small" })),
2196
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "center" }, /* @__PURE__ */ React81.createElement(FormatAlignCenterOutlined, { fontSize: "small" })),
2197
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "right" }, /* @__PURE__ */ React81.createElement(FormatAlignRightOutlined, { fontSize: "small" }))
2329
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "left" }, /* @__PURE__ */ React82.createElement(FormatAlignLeftOutlined, { fontSize: "small" })),
2330
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "center" }, /* @__PURE__ */ React82.createElement(FormatAlignCenterOutlined, { fontSize: "small" })),
2331
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "right" }, /* @__PURE__ */ React82.createElement(FormatAlignRightOutlined, { fontSize: "small" }))
2198
2332
  );
2199
2333
  }
2200
2334
 
@@ -2207,14 +2341,14 @@ function SingleStylePropertyPanel({ name, value, onChange }) {
2207
2341
  };
2208
2342
  switch (name) {
2209
2343
  case "backgroundColor":
2210
- return /* @__PURE__ */ React81.createElement(NullableColorInput, { label: "Background color", defaultValue, onChange: handleChange });
2344
+ return /* @__PURE__ */ React82.createElement(NullableColorInput, { label: "Background color", defaultValue, onChange: handleChange });
2211
2345
  case "borderColor":
2212
- return /* @__PURE__ */ React81.createElement(NullableColorInput, { label: "Border color", defaultValue, onChange: handleChange });
2346
+ return /* @__PURE__ */ React82.createElement(NullableColorInput, { label: "Border color", defaultValue, onChange: handleChange });
2213
2347
  case "borderRadius":
2214
- return /* @__PURE__ */ React81.createElement(
2348
+ return /* @__PURE__ */ React82.createElement(
2215
2349
  SliderInput,
2216
2350
  {
2217
- iconLabel: /* @__PURE__ */ React81.createElement(RoundedCornerOutlined, null),
2351
+ iconLabel: /* @__PURE__ */ React82.createElement(RoundedCornerOutlined, null),
2218
2352
  units: "px",
2219
2353
  step: 4,
2220
2354
  marks: true,
@@ -2226,23 +2360,23 @@ function SingleStylePropertyPanel({ name, value, onChange }) {
2226
2360
  }
2227
2361
  );
2228
2362
  case "color":
2229
- return /* @__PURE__ */ React81.createElement(NullableColorInput, { label: "Text color", defaultValue, onChange: handleChange });
2363
+ return /* @__PURE__ */ React82.createElement(NullableColorInput, { label: "Text color", defaultValue, onChange: handleChange });
2230
2364
  case "fontFamily":
2231
- return /* @__PURE__ */ React81.createElement(NullableFontFamily, { label: "Font family", defaultValue, onChange: handleChange });
2365
+ return /* @__PURE__ */ React82.createElement(NullableFontFamily, { label: "Font family", defaultValue, onChange: handleChange });
2232
2366
  case "fontSize":
2233
- return /* @__PURE__ */ React81.createElement(FontSizeInput, { label: "Font size", defaultValue, onChange: handleChange });
2367
+ return /* @__PURE__ */ React82.createElement(FontSizeInput, { label: "Font size", defaultValue, onChange: handleChange });
2234
2368
  case "fontWeight":
2235
- return /* @__PURE__ */ React81.createElement(FontWeightInput, { label: "Font weight", defaultValue, onChange: handleChange });
2369
+ return /* @__PURE__ */ React82.createElement(FontWeightInput, { label: "Font weight", defaultValue, onChange: handleChange });
2236
2370
  case "textAlign":
2237
- return /* @__PURE__ */ React81.createElement(TextAlignInput, { label: "Alignment", defaultValue, onChange: handleChange });
2371
+ return /* @__PURE__ */ React82.createElement(TextAlignInput, { label: "Alignment", defaultValue, onChange: handleChange });
2238
2372
  case "padding":
2239
- return /* @__PURE__ */ React81.createElement(PaddingInput, { label: "Padding", defaultValue, onChange: handleChange });
2373
+ return /* @__PURE__ */ React82.createElement(PaddingInput, { label: "Padding", defaultValue, onChange: handleChange });
2240
2374
  }
2241
2375
  }
2242
2376
 
2243
2377
  // src/app/inspector-drawer/configuration-panel/input-panels/helpers/style-inputs/multi-style-property-panel.tsx
2244
2378
  function MultiStylePropertyPanel({ names, value, onChange }) {
2245
- return /* @__PURE__ */ React81.createElement(React81.Fragment, null, names.map((name) => /* @__PURE__ */ React81.createElement(SingleStylePropertyPanel, { key: name, name, value: value || {}, onChange })));
2379
+ return /* @__PURE__ */ React82.createElement(React82.Fragment, null, names.map((name) => /* @__PURE__ */ React82.createElement(SingleStylePropertyPanel, { key: name, name, value: value || {}, onChange })));
2246
2380
  }
2247
2381
 
2248
2382
  // src/app/inspector-drawer/configuration-panel/input-panels/avatar-sidebar-panel.tsx
@@ -2262,11 +2396,11 @@ function AvatarSidebarPanel({ data, setData }) {
2262
2396
  const imageUrl = (_d = (_c = data.props) == null ? void 0 : _c.imageUrl) != null ? _d : AvatarPropsDefaults.imageUrl;
2263
2397
  const alt = (_f = (_e = data.props) == null ? void 0 : _e.alt) != null ? _f : AvatarPropsDefaults.alt;
2264
2398
  const shape = (_h = (_g = data.props) == null ? void 0 : _g.shape) != null ? _h : AvatarPropsDefaults.shape;
2265
- return /* @__PURE__ */ React81.createElement(BaseSidebarPanel, { title: "Avatar block" }, /* @__PURE__ */ React81.createElement(
2399
+ return /* @__PURE__ */ React82.createElement(BaseSidebarPanel, { title: "Avatar block" }, /* @__PURE__ */ React82.createElement(
2266
2400
  SliderInput,
2267
2401
  {
2268
2402
  label: "Size",
2269
- iconLabel: /* @__PURE__ */ React81.createElement(AspectRatioOutlined, { sx: { color: "text.secondary" } }),
2403
+ iconLabel: /* @__PURE__ */ React82.createElement(AspectRatioOutlined, { sx: { color: "text.secondary" } }),
2270
2404
  units: "px",
2271
2405
  step: 3,
2272
2406
  min: 32,
@@ -2276,7 +2410,7 @@ function AvatarSidebarPanel({ data, setData }) {
2276
2410
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { size: size2 }) }));
2277
2411
  }
2278
2412
  }
2279
- ), /* @__PURE__ */ React81.createElement(
2413
+ ), /* @__PURE__ */ React82.createElement(
2280
2414
  RadioGroupInput,
2281
2415
  {
2282
2416
  label: "Shape",
@@ -2285,10 +2419,10 @@ function AvatarSidebarPanel({ data, setData }) {
2285
2419
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { shape: shape2 }) }));
2286
2420
  }
2287
2421
  },
2288
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "circle" }, "Circle"),
2289
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "square" }, "Square"),
2290
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "rounded" }, "Rounded")
2291
- ), /* @__PURE__ */ React81.createElement(
2422
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "circle" }, "Circle"),
2423
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "square" }, "Square"),
2424
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "rounded" }, "Rounded")
2425
+ ), /* @__PURE__ */ React82.createElement(
2292
2426
  TextInput,
2293
2427
  {
2294
2428
  label: "Image URL",
@@ -2297,7 +2431,7 @@ function AvatarSidebarPanel({ data, setData }) {
2297
2431
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { imageUrl: imageUrl2 }) }));
2298
2432
  }
2299
2433
  }
2300
- ), /* @__PURE__ */ React81.createElement(
2434
+ ), /* @__PURE__ */ React82.createElement(
2301
2435
  TextInput,
2302
2436
  {
2303
2437
  label: "Alt text",
@@ -2306,7 +2440,7 @@ function AvatarSidebarPanel({ data, setData }) {
2306
2440
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { alt: alt2 }) }));
2307
2441
  }
2308
2442
  }
2309
- ), /* @__PURE__ */ React81.createElement(
2443
+ ), /* @__PURE__ */ React82.createElement(
2310
2444
  MultiStylePropertyPanel,
2311
2445
  {
2312
2446
  names: ["textAlign", "padding"],
@@ -2334,65 +2468,65 @@ function ButtonSidebarPanel({ data, setData }) {
2334
2468
  const buttonStyle = (_j = (_i = data.props) == null ? void 0 : _i.buttonStyle) != null ? _j : ButtonPropsDefaults.buttonStyle;
2335
2469
  const buttonTextColor = (_l = (_k = data.props) == null ? void 0 : _k.buttonTextColor) != null ? _l : ButtonPropsDefaults.buttonTextColor;
2336
2470
  const buttonBackgroundColor = (_n = (_m = data.props) == null ? void 0 : _m.buttonBackgroundColor) != null ? _n : ButtonPropsDefaults.buttonBackgroundColor;
2337
- return /* @__PURE__ */ React81.createElement(BaseSidebarPanel, { title: "Button block" }, /* @__PURE__ */ React81.createElement(
2471
+ return /* @__PURE__ */ React82.createElement(BaseSidebarPanel, { title: "Button block" }, /* @__PURE__ */ React82.createElement(
2338
2472
  TextInput,
2339
2473
  {
2340
2474
  label: "Text",
2341
2475
  defaultValue: text,
2342
2476
  onChange: (text2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { text: text2 }) }))
2343
2477
  }
2344
- ), /* @__PURE__ */ React81.createElement(
2478
+ ), /* @__PURE__ */ React82.createElement(
2345
2479
  TextInput,
2346
2480
  {
2347
2481
  label: "Url",
2348
2482
  defaultValue: url,
2349
2483
  onChange: (url2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { url: url2 }) }))
2350
2484
  }
2351
- ), /* @__PURE__ */ React81.createElement(
2485
+ ), /* @__PURE__ */ React82.createElement(
2352
2486
  RadioGroupInput,
2353
2487
  {
2354
2488
  label: "Width",
2355
2489
  defaultValue: fullWidth ? "FULL_WIDTH" : "AUTO",
2356
2490
  onChange: (v) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { fullWidth: v === "FULL_WIDTH" }) }))
2357
2491
  },
2358
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "FULL_WIDTH" }, "Full"),
2359
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "AUTO" }, "Auto")
2360
- ), /* @__PURE__ */ React81.createElement(
2492
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "FULL_WIDTH" }, "Full"),
2493
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "AUTO" }, "Auto")
2494
+ ), /* @__PURE__ */ React82.createElement(
2361
2495
  RadioGroupInput,
2362
2496
  {
2363
2497
  label: "Size",
2364
2498
  defaultValue: size,
2365
2499
  onChange: (size2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { size: size2 }) }))
2366
2500
  },
2367
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "x-small" }, "Xs"),
2368
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "small" }, "Sm"),
2369
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "medium" }, "Md"),
2370
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "large" }, "Lg")
2371
- ), /* @__PURE__ */ React81.createElement(
2501
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "x-small" }, "Xs"),
2502
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "small" }, "Sm"),
2503
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "medium" }, "Md"),
2504
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "large" }, "Lg")
2505
+ ), /* @__PURE__ */ React82.createElement(
2372
2506
  RadioGroupInput,
2373
2507
  {
2374
2508
  label: "Style",
2375
2509
  defaultValue: buttonStyle,
2376
2510
  onChange: (buttonStyle2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { buttonStyle: buttonStyle2 }) }))
2377
2511
  },
2378
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "rectangle" }, "Rectangle"),
2379
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "rounded" }, "Rounded"),
2380
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "pill" }, "Pill")
2381
- ), /* @__PURE__ */ React81.createElement(
2512
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "rectangle" }, "Rectangle"),
2513
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "rounded" }, "Rounded"),
2514
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "pill" }, "Pill")
2515
+ ), /* @__PURE__ */ React82.createElement(
2382
2516
  ColorInput2,
2383
2517
  {
2384
2518
  label: "Text color",
2385
2519
  defaultValue: buttonTextColor,
2386
2520
  onChange: (buttonTextColor2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { buttonTextColor: buttonTextColor2 }) }))
2387
2521
  }
2388
- ), /* @__PURE__ */ React81.createElement(
2522
+ ), /* @__PURE__ */ React82.createElement(
2389
2523
  ColorInput2,
2390
2524
  {
2391
2525
  label: "Button color",
2392
2526
  defaultValue: buttonBackgroundColor,
2393
2527
  onChange: (buttonBackgroundColor2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { buttonBackgroundColor: buttonBackgroundColor2 }) }))
2394
2528
  }
2395
- ), /* @__PURE__ */ React81.createElement(
2529
+ ), /* @__PURE__ */ React82.createElement(
2396
2530
  MultiStylePropertyPanel,
2397
2531
  {
2398
2532
  names: ["backgroundColor", "fontFamily", "fontSize", "fontWeight", "textAlign", "padding"],
@@ -2418,7 +2552,7 @@ function TextDimensionInput({ label, defaultValue, onChange }) {
2418
2552
  const value = parseInt(ev.target.value);
2419
2553
  onChange(isNaN(value) ? null : value);
2420
2554
  };
2421
- return /* @__PURE__ */ React81.createElement(
2555
+ return /* @__PURE__ */ React82.createElement(
2422
2556
  TextField,
2423
2557
  {
2424
2558
  fullWidth: true,
@@ -2429,7 +2563,7 @@ function TextDimensionInput({ label, defaultValue, onChange }) {
2429
2563
  placeholder: "auto",
2430
2564
  size: "small",
2431
2565
  InputProps: {
2432
- endAdornment: /* @__PURE__ */ React81.createElement(Typography, { variant: "body2", color: "text.secondary" }, "px")
2566
+ endAdornment: /* @__PURE__ */ React82.createElement(Typography, { variant: "body2", color: "text.secondary" }, "px")
2433
2567
  }
2434
2568
  }
2435
2569
  );
@@ -2451,7 +2585,7 @@ function ColumnWidthsInput({ defaultValue, onChange }) {
2451
2585
  };
2452
2586
  let column3 = null;
2453
2587
  {
2454
- column3 = /* @__PURE__ */ React81.createElement(
2588
+ column3 = /* @__PURE__ */ React82.createElement(
2455
2589
  TextDimensionInput,
2456
2590
  {
2457
2591
  label: "Column 3",
@@ -2462,7 +2596,7 @@ function ColumnWidthsInput({ defaultValue, onChange }) {
2462
2596
  }
2463
2597
  );
2464
2598
  }
2465
- return /* @__PURE__ */ React81.createElement(Stack, { direction: "row", spacing: 1 }, /* @__PURE__ */ React81.createElement(
2599
+ return /* @__PURE__ */ React82.createElement(Stack, { direction: "row", spacing: 1 }, /* @__PURE__ */ React82.createElement(
2466
2600
  TextDimensionInput,
2467
2601
  {
2468
2602
  label: "Column 1",
@@ -2471,7 +2605,7 @@ function ColumnWidthsInput({ defaultValue, onChange }) {
2471
2605
  setIndexValue(0, v);
2472
2606
  }
2473
2607
  }
2474
- ), /* @__PURE__ */ React81.createElement(
2608
+ ), /* @__PURE__ */ React82.createElement(
2475
2609
  TextDimensionInput,
2476
2610
  {
2477
2611
  label: "Column 2",
@@ -2496,7 +2630,7 @@ function ColumnsContainerPanel({ data, setData }) {
2496
2630
  setErrors(res.error);
2497
2631
  }
2498
2632
  };
2499
- return /* @__PURE__ */ React81.createElement(BaseSidebarPanel, { title: "Columns block" }, /* @__PURE__ */ React81.createElement(
2633
+ return /* @__PURE__ */ React82.createElement(BaseSidebarPanel, { title: "Columns block" }, /* @__PURE__ */ React82.createElement(
2500
2634
  RadioGroupInput,
2501
2635
  {
2502
2636
  label: "Number of columns",
@@ -2505,9 +2639,9 @@ function ColumnsContainerPanel({ data, setData }) {
2505
2639
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { columnsCount: v === "2" ? 2 : 3 }) }));
2506
2640
  }
2507
2641
  },
2508
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "2" }, "2"),
2509
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "3" }, "3")
2510
- ), /* @__PURE__ */ React81.createElement(
2642
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "2" }, "2"),
2643
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "3" }, "3")
2644
+ ), /* @__PURE__ */ React82.createElement(
2511
2645
  ColumnWidthsInput,
2512
2646
  {
2513
2647
  defaultValue: (_b = data.props) == null ? void 0 : _b.fixedWidths,
@@ -2515,11 +2649,11 @@ function ColumnsContainerPanel({ data, setData }) {
2515
2649
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { fixedWidths }) }));
2516
2650
  }
2517
2651
  }
2518
- ), /* @__PURE__ */ React81.createElement(
2652
+ ), /* @__PURE__ */ React82.createElement(
2519
2653
  SliderInput,
2520
2654
  {
2521
2655
  label: "Columns gap",
2522
- iconLabel: /* @__PURE__ */ React81.createElement(SpaceBarOutlined, { sx: { color: "text.secondary" } }),
2656
+ iconLabel: /* @__PURE__ */ React82.createElement(SpaceBarOutlined, { sx: { color: "text.secondary" } }),
2523
2657
  units: "px",
2524
2658
  step: 4,
2525
2659
  marks: true,
@@ -2528,7 +2662,7 @@ function ColumnsContainerPanel({ data, setData }) {
2528
2662
  defaultValue: (_d = (_c = data.props) == null ? void 0 : _c.columnsGap) != null ? _d : 0,
2529
2663
  onChange: (columnsGap) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { columnsGap }) }))
2530
2664
  }
2531
- ), /* @__PURE__ */ React81.createElement(
2665
+ ), /* @__PURE__ */ React82.createElement(
2532
2666
  RadioGroupInput,
2533
2667
  {
2534
2668
  label: "Alignment",
@@ -2537,10 +2671,10 @@ function ColumnsContainerPanel({ data, setData }) {
2537
2671
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { contentAlignment }) }));
2538
2672
  }
2539
2673
  },
2540
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "top" }, /* @__PURE__ */ React81.createElement(VerticalAlignTopOutlined, { fontSize: "small" })),
2541
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "middle" }, /* @__PURE__ */ React81.createElement(VerticalAlignCenterOutlined, { fontSize: "small" })),
2542
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "bottom" }, /* @__PURE__ */ React81.createElement(VerticalAlignBottomOutlined, { fontSize: "small" }))
2543
- ), /* @__PURE__ */ React81.createElement(
2674
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "top" }, /* @__PURE__ */ React82.createElement(VerticalAlignTopOutlined, { fontSize: "small" })),
2675
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "middle" }, /* @__PURE__ */ React82.createElement(VerticalAlignCenterOutlined, { fontSize: "small" })),
2676
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "bottom" }, /* @__PURE__ */ React82.createElement(VerticalAlignBottomOutlined, { fontSize: "small" }))
2677
+ ), /* @__PURE__ */ React82.createElement(
2544
2678
  MultiStylePropertyPanel,
2545
2679
  {
2546
2680
  names: ["backgroundColor", "padding"],
@@ -2569,7 +2703,7 @@ function ContainerSidebarPanel({ data, setData }) {
2569
2703
  setErrors(res.error);
2570
2704
  }
2571
2705
  };
2572
- return /* @__PURE__ */ React81.createElement(BaseSidebarPanel, { title: "Container block" }, /* @__PURE__ */ React81.createElement(
2706
+ return /* @__PURE__ */ React82.createElement(BaseSidebarPanel, { title: "Container block" }, /* @__PURE__ */ React82.createElement(
2573
2707
  MultiStylePropertyPanel,
2574
2708
  {
2575
2709
  names: ["backgroundColor", "borderColor", "borderRadius", "padding"],
@@ -2592,18 +2726,18 @@ function DividerSidebarPanel({ data, setData }) {
2592
2726
  };
2593
2727
  const lineColor = (_b = (_a = data.props) == null ? void 0 : _a.lineColor) != null ? _b : DividerPropsDefaults.lineColor;
2594
2728
  const lineHeight = (_d = (_c = data.props) == null ? void 0 : _c.lineHeight) != null ? _d : DividerPropsDefaults.lineHeight;
2595
- return /* @__PURE__ */ React81.createElement(BaseSidebarPanel, { title: "Divider block" }, /* @__PURE__ */ React81.createElement(
2729
+ return /* @__PURE__ */ React82.createElement(BaseSidebarPanel, { title: "Divider block" }, /* @__PURE__ */ React82.createElement(
2596
2730
  ColorInput2,
2597
2731
  {
2598
2732
  label: "Color",
2599
2733
  defaultValue: lineColor,
2600
2734
  onChange: (lineColor2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { lineColor: lineColor2 }) }))
2601
2735
  }
2602
- ), /* @__PURE__ */ React81.createElement(
2736
+ ), /* @__PURE__ */ React82.createElement(
2603
2737
  SliderInput,
2604
2738
  {
2605
2739
  label: "Height",
2606
- iconLabel: /* @__PURE__ */ React81.createElement(HeightOutlined, { sx: { color: "text.secondary" } }),
2740
+ iconLabel: /* @__PURE__ */ React82.createElement(HeightOutlined, { sx: { color: "text.secondary" } }),
2607
2741
  units: "px",
2608
2742
  step: 1,
2609
2743
  min: 1,
@@ -2611,7 +2745,7 @@ function DividerSidebarPanel({ data, setData }) {
2611
2745
  defaultValue: lineHeight,
2612
2746
  onChange: (lineHeight2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { lineHeight: lineHeight2 }) }))
2613
2747
  }
2614
- ), /* @__PURE__ */ React81.createElement(
2748
+ ), /* @__PURE__ */ React82.createElement(
2615
2749
  MultiStylePropertyPanel,
2616
2750
  {
2617
2751
  names: ["backgroundColor", "padding"],
@@ -2656,31 +2790,31 @@ function EmailLayoutSidebarFields({ data, setData }) {
2656
2790
  setErrors(res.error);
2657
2791
  }
2658
2792
  };
2659
- return /* @__PURE__ */ React81.createElement(BaseSidebarPanel, { title: "Global" }, /* @__PURE__ */ React81.createElement(
2793
+ return /* @__PURE__ */ React82.createElement(BaseSidebarPanel, { title: "Global" }, /* @__PURE__ */ React82.createElement(
2660
2794
  ColorInput2,
2661
2795
  {
2662
2796
  label: "Backdrop color",
2663
2797
  defaultValue: (_a = data.backdropColor) != null ? _a : "#F5F5F5",
2664
2798
  onChange: (backdropColor) => updateData(__spreadProps(__spreadValues({}, data), { backdropColor }))
2665
2799
  }
2666
- ), /* @__PURE__ */ React81.createElement(
2800
+ ), /* @__PURE__ */ React82.createElement(
2667
2801
  ColorInput2,
2668
2802
  {
2669
2803
  label: "Canvas color",
2670
2804
  defaultValue: (_b = data.canvasColor) != null ? _b : "#FFFFFF",
2671
2805
  onChange: (canvasColor) => updateData(__spreadProps(__spreadValues({}, data), { canvasColor }))
2672
2806
  }
2673
- ), /* @__PURE__ */ React81.createElement(
2807
+ ), /* @__PURE__ */ React82.createElement(
2674
2808
  NullableColorInput,
2675
2809
  {
2676
2810
  label: "Canvas border color",
2677
2811
  defaultValue: (_c = data.borderColor) != null ? _c : null,
2678
2812
  onChange: (borderColor) => updateData(__spreadProps(__spreadValues({}, data), { borderColor }))
2679
2813
  }
2680
- ), /* @__PURE__ */ React81.createElement(
2814
+ ), /* @__PURE__ */ React82.createElement(
2681
2815
  SliderInput,
2682
2816
  {
2683
- iconLabel: /* @__PURE__ */ React81.createElement(RoundedCornerOutlined, null),
2817
+ iconLabel: /* @__PURE__ */ React82.createElement(RoundedCornerOutlined, null),
2684
2818
  units: "px",
2685
2819
  step: 4,
2686
2820
  marks: true,
@@ -2690,14 +2824,14 @@ function EmailLayoutSidebarFields({ data, setData }) {
2690
2824
  defaultValue: (_d = data.borderRadius) != null ? _d : 0,
2691
2825
  onChange: (borderRadius) => updateData(__spreadProps(__spreadValues({}, data), { borderRadius }))
2692
2826
  }
2693
- ), /* @__PURE__ */ React81.createElement(
2827
+ ), /* @__PURE__ */ React82.createElement(
2694
2828
  NullableFontFamily,
2695
2829
  {
2696
2830
  label: "Font family",
2697
2831
  defaultValue: "MODERN_SANS",
2698
2832
  onChange: (fontFamily) => updateData(__spreadProps(__spreadValues({}, data), { fontFamily }))
2699
2833
  }
2700
- ), /* @__PURE__ */ React81.createElement(
2834
+ ), /* @__PURE__ */ React82.createElement(
2701
2835
  ColorInput2,
2702
2836
  {
2703
2837
  label: "Text color",
@@ -2718,7 +2852,7 @@ function HeadingSidebarPanel({ data, setData }) {
2718
2852
  setErrors(res.error);
2719
2853
  }
2720
2854
  };
2721
- return /* @__PURE__ */ React81.createElement(BaseSidebarPanel, { title: "Heading block" }, /* @__PURE__ */ React81.createElement(
2855
+ return /* @__PURE__ */ React82.createElement(BaseSidebarPanel, { title: "Heading block" }, /* @__PURE__ */ React82.createElement(
2722
2856
  TextInput,
2723
2857
  {
2724
2858
  label: "Content",
@@ -2728,7 +2862,7 @@ function HeadingSidebarPanel({ data, setData }) {
2728
2862
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { text }) }));
2729
2863
  }
2730
2864
  }
2731
- ), /* @__PURE__ */ React81.createElement(
2865
+ ), /* @__PURE__ */ React82.createElement(
2732
2866
  RadioGroupInput,
2733
2867
  {
2734
2868
  label: "Level",
@@ -2737,10 +2871,10 @@ function HeadingSidebarPanel({ data, setData }) {
2737
2871
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { level }) }));
2738
2872
  }
2739
2873
  },
2740
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "h1" }, "H1"),
2741
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "h2" }, "H2"),
2742
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "h3" }, "H3")
2743
- ), /* @__PURE__ */ React81.createElement(
2874
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "h1" }, "H1"),
2875
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "h2" }, "H2"),
2876
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "h3" }, "H3")
2877
+ ), /* @__PURE__ */ React82.createElement(
2744
2878
  MultiStylePropertyPanel,
2745
2879
  {
2746
2880
  names: ["color", "backgroundColor", "fontFamily", "fontWeight", "textAlign", "padding"],
@@ -2761,7 +2895,7 @@ function HtmlSidebarPanel({ data, setData }) {
2761
2895
  setErrors(res.error);
2762
2896
  }
2763
2897
  };
2764
- return /* @__PURE__ */ React81.createElement(BaseSidebarPanel, { title: "Html block" }, /* @__PURE__ */ React81.createElement(
2898
+ return /* @__PURE__ */ React82.createElement(BaseSidebarPanel, { title: "Html block" }, /* @__PURE__ */ React82.createElement(
2765
2899
  TextInput,
2766
2900
  {
2767
2901
  label: "Content",
@@ -2769,7 +2903,7 @@ function HtmlSidebarPanel({ data, setData }) {
2769
2903
  defaultValue: (_b = (_a = data.props) == null ? void 0 : _a.contents) != null ? _b : "",
2770
2904
  onChange: (contents) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { contents }) }))
2771
2905
  }
2772
- ), /* @__PURE__ */ React81.createElement(
2906
+ ), /* @__PURE__ */ React82.createElement(
2773
2907
  MultiStylePropertyPanel,
2774
2908
  {
2775
2909
  names: ["color", "backgroundColor", "fontFamily", "fontSize", "textAlign", "padding"],
@@ -2790,7 +2924,7 @@ function ImageSidebarPanel({ data, setData }) {
2790
2924
  setErrors(res.error);
2791
2925
  }
2792
2926
  };
2793
- return /* @__PURE__ */ React81.createElement(BaseSidebarPanel, { title: "Image block" }, /* @__PURE__ */ React81.createElement(
2927
+ return /* @__PURE__ */ React82.createElement(BaseSidebarPanel, { title: "Image block" }, /* @__PURE__ */ React82.createElement(
2794
2928
  TextInput,
2795
2929
  {
2796
2930
  label: "Source URL",
@@ -2800,14 +2934,14 @@ function ImageSidebarPanel({ data, setData }) {
2800
2934
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { url }) }));
2801
2935
  }
2802
2936
  }
2803
- ), /* @__PURE__ */ React81.createElement(
2937
+ ), /* @__PURE__ */ React82.createElement(
2804
2938
  TextInput,
2805
2939
  {
2806
2940
  label: "Alt text",
2807
2941
  defaultValue: (_d = (_c = data.props) == null ? void 0 : _c.alt) != null ? _d : "",
2808
2942
  onChange: (alt) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { alt }) }))
2809
2943
  }
2810
- ), /* @__PURE__ */ React81.createElement(
2944
+ ), /* @__PURE__ */ React82.createElement(
2811
2945
  TextInput,
2812
2946
  {
2813
2947
  label: "Click through URL",
@@ -2817,31 +2951,31 @@ function ImageSidebarPanel({ data, setData }) {
2817
2951
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { linkHref }) }));
2818
2952
  }
2819
2953
  }
2820
- ), /* @__PURE__ */ React81.createElement(Stack, { direction: "row", spacing: 2 }, /* @__PURE__ */ React81.createElement(
2954
+ ), /* @__PURE__ */ React82.createElement(Stack, { direction: "row", spacing: 2 }, /* @__PURE__ */ React82.createElement(
2821
2955
  TextDimensionInput,
2822
2956
  {
2823
2957
  label: "Width",
2824
2958
  defaultValue: (_g = data.props) == null ? void 0 : _g.width,
2825
2959
  onChange: (width) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { width }) }))
2826
2960
  }
2827
- ), /* @__PURE__ */ React81.createElement(
2961
+ ), /* @__PURE__ */ React82.createElement(
2828
2962
  TextDimensionInput,
2829
2963
  {
2830
2964
  label: "Height",
2831
2965
  defaultValue: (_h = data.props) == null ? void 0 : _h.height,
2832
2966
  onChange: (height) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { height }) }))
2833
2967
  }
2834
- )), /* @__PURE__ */ React81.createElement(
2968
+ )), /* @__PURE__ */ React82.createElement(
2835
2969
  RadioGroupInput,
2836
2970
  {
2837
2971
  label: "Alignment",
2838
2972
  defaultValue: (_j = (_i = data.props) == null ? void 0 : _i.contentAlignment) != null ? _j : "middle",
2839
2973
  onChange: (contentAlignment) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { contentAlignment }) }))
2840
2974
  },
2841
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "top" }, /* @__PURE__ */ React81.createElement(VerticalAlignTopOutlined, { fontSize: "small" })),
2842
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "middle" }, /* @__PURE__ */ React81.createElement(VerticalAlignCenterOutlined, { fontSize: "small" })),
2843
- /* @__PURE__ */ React81.createElement(ToggleButton, { value: "bottom" }, /* @__PURE__ */ React81.createElement(VerticalAlignBottomOutlined, { fontSize: "small" }))
2844
- ), /* @__PURE__ */ React81.createElement(
2975
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "top" }, /* @__PURE__ */ React82.createElement(VerticalAlignTopOutlined, { fontSize: "small" })),
2976
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "middle" }, /* @__PURE__ */ React82.createElement(VerticalAlignCenterOutlined, { fontSize: "small" })),
2977
+ /* @__PURE__ */ React82.createElement(ToggleButton, { value: "bottom" }, /* @__PURE__ */ React82.createElement(VerticalAlignBottomOutlined, { fontSize: "small" }))
2978
+ ), /* @__PURE__ */ React82.createElement(
2845
2979
  MultiStylePropertyPanel,
2846
2980
  {
2847
2981
  names: ["backgroundColor", "textAlign", "padding"],
@@ -2862,11 +2996,11 @@ function SpacerSidebarPanel({ data, setData }) {
2862
2996
  setErrors(res.error);
2863
2997
  }
2864
2998
  };
2865
- return /* @__PURE__ */ React81.createElement(BaseSidebarPanel, { title: "Spacer block" }, /* @__PURE__ */ React81.createElement(
2999
+ return /* @__PURE__ */ React82.createElement(BaseSidebarPanel, { title: "Spacer block" }, /* @__PURE__ */ React82.createElement(
2866
3000
  SliderInput,
2867
3001
  {
2868
3002
  label: "Height",
2869
- iconLabel: /* @__PURE__ */ React81.createElement(HeightOutlined, { sx: { color: "text.secondary" } }),
3003
+ iconLabel: /* @__PURE__ */ React82.createElement(HeightOutlined, { sx: { color: "text.secondary" } }),
2870
3004
  units: "px",
2871
3005
  step: 4,
2872
3006
  min: 4,
@@ -2881,11 +3015,11 @@ function BooleanInput({ label, defaultValue, onChange }) {
2881
3015
  useEffect(() => {
2882
3016
  setValue(defaultValue);
2883
3017
  }, [defaultValue]);
2884
- return /* @__PURE__ */ React81.createElement(
3018
+ return /* @__PURE__ */ React82.createElement(
2885
3019
  FormControlLabel,
2886
3020
  {
2887
3021
  label,
2888
- control: /* @__PURE__ */ React81.createElement(
3022
+ control: /* @__PURE__ */ React82.createElement(
2889
3023
  Switch,
2890
3024
  {
2891
3025
  checked: value,
@@ -2912,7 +3046,7 @@ function TextSidebarPanel({ data, setData }) {
2912
3046
  setErrors(res.error);
2913
3047
  }
2914
3048
  };
2915
- return /* @__PURE__ */ React81.createElement(BaseSidebarPanel, { title: "Text block" }, /* @__PURE__ */ React81.createElement(
3049
+ return /* @__PURE__ */ React82.createElement(BaseSidebarPanel, { title: "Text block" }, /* @__PURE__ */ React82.createElement(
2916
3050
  TextInput,
2917
3051
  {
2918
3052
  label: "Content",
@@ -2920,14 +3054,14 @@ function TextSidebarPanel({ data, setData }) {
2920
3054
  defaultValue: (_b = (_a = data.props) == null ? void 0 : _a.text) != null ? _b : "",
2921
3055
  onChange: (text) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { text }) }))
2922
3056
  }
2923
- ), /* @__PURE__ */ React81.createElement(
3057
+ ), /* @__PURE__ */ React82.createElement(
2924
3058
  BooleanInput,
2925
3059
  {
2926
3060
  label: "Markdown",
2927
3061
  defaultValue: (_d = (_c = data.props) == null ? void 0 : _c.markdown) != null ? _d : false,
2928
3062
  onChange: (markdown) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { markdown }) }))
2929
3063
  }
2930
- ), /* @__PURE__ */ React81.createElement(
3064
+ ), /* @__PURE__ */ React82.createElement(
2931
3065
  MultiStylePropertyPanel,
2932
3066
  {
2933
3067
  names: ["color", "backgroundColor", "fontFamily", "fontSize", "fontWeight", "textAlign", "padding"],
@@ -2939,7 +3073,7 @@ function TextSidebarPanel({ data, setData }) {
2939
3073
 
2940
3074
  // src/app/inspector-drawer/configuration-panel/index.tsx
2941
3075
  function renderMessage(val) {
2942
- return /* @__PURE__ */ React81.createElement(Box, { sx: { m: 3, p: 1, border: "1px dashed", borderColor: "divider" } }, /* @__PURE__ */ React81.createElement(Typography, { color: "text.secondary" }, val));
3076
+ return /* @__PURE__ */ React82.createElement(Box, { sx: { m: 3, p: 1, border: "1px dashed", borderColor: "divider" } }, /* @__PURE__ */ React82.createElement(Typography, { color: "text.secondary" }, val));
2943
3077
  }
2944
3078
  function ConfigurationPanel() {
2945
3079
  const document2 = useDocument();
@@ -2955,53 +3089,53 @@ function ConfigurationPanel() {
2955
3089
  const { data, type } = block;
2956
3090
  switch (type) {
2957
3091
  case "Avatar":
2958
- return /* @__PURE__ */ React81.createElement(AvatarSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
3092
+ return /* @__PURE__ */ React82.createElement(AvatarSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
2959
3093
  case "Button":
2960
- return /* @__PURE__ */ React81.createElement(ButtonSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
3094
+ return /* @__PURE__ */ React82.createElement(ButtonSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
2961
3095
  case "ColumnsContainer":
2962
- return /* @__PURE__ */ React81.createElement(ColumnsContainerPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
3096
+ return /* @__PURE__ */ React82.createElement(ColumnsContainerPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
2963
3097
  case "Container":
2964
- return /* @__PURE__ */ React81.createElement(ContainerSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
3098
+ return /* @__PURE__ */ React82.createElement(ContainerSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
2965
3099
  case "Divider":
2966
- return /* @__PURE__ */ React81.createElement(DividerSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
3100
+ return /* @__PURE__ */ React82.createElement(DividerSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
2967
3101
  case "Heading":
2968
- return /* @__PURE__ */ React81.createElement(HeadingSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
3102
+ return /* @__PURE__ */ React82.createElement(HeadingSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
2969
3103
  case "Html":
2970
- return /* @__PURE__ */ React81.createElement(HtmlSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
3104
+ return /* @__PURE__ */ React82.createElement(HtmlSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
2971
3105
  case "Image":
2972
- return /* @__PURE__ */ React81.createElement(ImageSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
3106
+ return /* @__PURE__ */ React82.createElement(ImageSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
2973
3107
  case "EmailLayout":
2974
- return /* @__PURE__ */ React81.createElement(EmailLayoutSidebarFields, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
3108
+ return /* @__PURE__ */ React82.createElement(EmailLayoutSidebarFields, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
2975
3109
  case "Spacer":
2976
- return /* @__PURE__ */ React81.createElement(SpacerSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
3110
+ return /* @__PURE__ */ React82.createElement(SpacerSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
2977
3111
  case "Text":
2978
- return /* @__PURE__ */ React81.createElement(TextSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
3112
+ return /* @__PURE__ */ React82.createElement(TextSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
2979
3113
  default:
2980
- return /* @__PURE__ */ React81.createElement("pre", null, JSON.stringify(block, null, " "));
3114
+ return /* @__PURE__ */ React82.createElement("pre", null, JSON.stringify(block, null, " "));
2981
3115
  }
2982
3116
  }
2983
3117
  function StylesPanel() {
2984
3118
  const block = useDocument().root;
2985
3119
  if (!block) {
2986
- return /* @__PURE__ */ React81.createElement("p", null, "Block not found");
3120
+ return /* @__PURE__ */ React82.createElement("p", null, "Block not found");
2987
3121
  }
2988
3122
  const { data, type } = block;
2989
3123
  if (type !== "EmailLayout") {
2990
3124
  throw new Error('Expected "root" element to be of type EmailLayout');
2991
3125
  }
2992
- return /* @__PURE__ */ React81.createElement(EmailLayoutSidebarFields, { key: "root", data, setData: (data2) => setDocument({ root: { type, data: data2 } }) });
3126
+ return /* @__PURE__ */ React82.createElement(EmailLayoutSidebarFields, { key: "root", data, setData: (data2) => setDocument({ root: { type, data: data2 } }) });
2993
3127
  }
2994
3128
  function TemplateDownloadButton() {
2995
3129
  const doc = useDocument();
2996
3130
  const href = useMemo(() => {
2997
3131
  return `data:text/plain,${encodeURIComponent(JSON.stringify(doc, null, " "))}`;
2998
3132
  }, [doc]);
2999
- return /* @__PURE__ */ React81.createElement(
3133
+ return /* @__PURE__ */ React82.createElement(
3000
3134
  Button$1,
3001
3135
  {
3002
3136
  variant: "outlined",
3003
3137
  color: "primary",
3004
- startIcon: /* @__PURE__ */ React81.createElement(FileDownloadOutlined, null),
3138
+ startIcon: /* @__PURE__ */ React82.createElement(FileDownloadOutlined, null),
3005
3139
  href,
3006
3140
  download: "emailTemplate.json",
3007
3141
  fullWidth: true
@@ -3033,9 +3167,9 @@ function TemplatePanel({ deleteTemplate, copyTemplate }) {
3033
3167
  }
3034
3168
  };
3035
3169
  if (!currentTemplateId) {
3036
- return /* @__PURE__ */ React81.createElement(BaseSidebarPanel, { title: "Template" }, "No template selected");
3170
+ return /* @__PURE__ */ React82.createElement(BaseSidebarPanel, { title: "Template" }, "No template selected");
3037
3171
  }
3038
- return /* @__PURE__ */ React81.createElement(React81.Fragment, null, /* @__PURE__ */ React81.createElement(BaseSidebarPanel, { title: "Template" }, /* @__PURE__ */ React81.createElement(Stack, { spacing: 2 }, !persistenceEnabled && /* @__PURE__ */ React81.createElement(
3172
+ return /* @__PURE__ */ React82.createElement(React82.Fragment, null, /* @__PURE__ */ React82.createElement(BaseSidebarPanel, { title: "Template" }, /* @__PURE__ */ React82.createElement(Stack, { spacing: 2 }, !persistenceEnabled && /* @__PURE__ */ React82.createElement(
3039
3173
  Typography,
3040
3174
  {
3041
3175
  variant: "body2",
@@ -3048,29 +3182,29 @@ function TemplatePanel({ deleteTemplate, copyTemplate }) {
3048
3182
  }
3049
3183
  },
3050
3184
  "Save functionality is disabled. To enable saving, provide the necessary callback functions."
3051
- ), persistenceEnabled && /* @__PURE__ */ React81.createElement(React81.Fragment, null, /* @__PURE__ */ React81.createElement(
3185
+ ), persistenceEnabled && /* @__PURE__ */ React82.createElement(React82.Fragment, null, /* @__PURE__ */ React82.createElement(
3052
3186
  Button$1,
3053
3187
  {
3054
3188
  variant: "outlined",
3055
3189
  color: "primary",
3056
- startIcon: /* @__PURE__ */ React81.createElement(ContentCopyOutlined, null),
3190
+ startIcon: /* @__PURE__ */ React82.createElement(ContentCopyOutlined, null),
3057
3191
  onClick: handleCopyToSamples,
3058
3192
  fullWidth: true,
3059
3193
  disabled: !copyTemplate
3060
3194
  },
3061
3195
  "Save as Sample Template"
3062
- ), /* @__PURE__ */ React81.createElement(
3196
+ ), /* @__PURE__ */ React82.createElement(
3063
3197
  Button$1,
3064
3198
  {
3065
3199
  variant: "outlined",
3066
3200
  color: "error",
3067
- startIcon: /* @__PURE__ */ React81.createElement(DeleteOutlined, null),
3201
+ startIcon: /* @__PURE__ */ React82.createElement(DeleteOutlined, null),
3068
3202
  onClick: handleDelete,
3069
3203
  fullWidth: true,
3070
3204
  disabled: !deleteTemplate
3071
3205
  },
3072
3206
  "Delete Template"
3073
- )))), persistenceEnabled && /* @__PURE__ */ React81.createElement(BaseSidebarPanel, { title: "Export" }, /* @__PURE__ */ React81.createElement(Stack, { spacing: 2 }, /* @__PURE__ */ React81.createElement(TemplateDownloadButton, null))));
3207
+ )))), persistenceEnabled && /* @__PURE__ */ React82.createElement(BaseSidebarPanel, { title: "Export" }, /* @__PURE__ */ React82.createElement(Stack, { spacing: 2 }, /* @__PURE__ */ React82.createElement(TemplateDownloadButton, null))));
3074
3208
  }
3075
3209
 
3076
3210
  // src/app/inspector-drawer/index.tsx
@@ -3087,11 +3221,11 @@ function InspectorDrawer({
3087
3221
  const renderCurrentSidebarPanel = () => {
3088
3222
  switch (selectedSidebarTab) {
3089
3223
  case "block-configuration":
3090
- return /* @__PURE__ */ React81.createElement(ConfigurationPanel, null);
3224
+ return /* @__PURE__ */ React82.createElement(ConfigurationPanel, null);
3091
3225
  case "styles":
3092
- return /* @__PURE__ */ React81.createElement(StylesPanel, null);
3226
+ return /* @__PURE__ */ React82.createElement(StylesPanel, null);
3093
3227
  case "template-settings":
3094
- return /* @__PURE__ */ React81.createElement(
3228
+ return /* @__PURE__ */ React82.createElement(
3095
3229
  TemplatePanel,
3096
3230
  {
3097
3231
  deleteTemplate,
@@ -3100,7 +3234,7 @@ function InspectorDrawer({
3100
3234
  );
3101
3235
  }
3102
3236
  };
3103
- return /* @__PURE__ */ React81.createElement(
3237
+ return /* @__PURE__ */ React82.createElement(
3104
3238
  Drawer,
3105
3239
  {
3106
3240
  variant: "persistent",
@@ -3122,8 +3256,8 @@ function InspectorDrawer({
3122
3256
  width: inspectorDrawerOpen ? INSPECTOR_DRAWER_WIDTH : 0
3123
3257
  }
3124
3258
  },
3125
- /* @__PURE__ */ React81.createElement(Box, { sx: { width: INSPECTOR_DRAWER_WIDTH, height: 49, borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React81.createElement(Box, { px: 2 }, /* @__PURE__ */ React81.createElement(Tabs, { value: selectedSidebarTab, onChange: (_, v) => setSidebarTab(v) }, /* @__PURE__ */ React81.createElement(Tab, { value: "styles", label: "Styles" }), /* @__PURE__ */ React81.createElement(Tab, { value: "block-configuration", label: "Inspect" }), /* @__PURE__ */ React81.createElement(Tab, { value: "template-settings", label: "Settings" })))),
3126
- /* @__PURE__ */ React81.createElement(Box, { sx: { width: INSPECTOR_DRAWER_WIDTH, height: "calc(100% - 49px)", overflow: "auto" } }, renderCurrentSidebarPanel())
3259
+ /* @__PURE__ */ React82.createElement(Box, { sx: { width: INSPECTOR_DRAWER_WIDTH, height: 49, borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React82.createElement(Box, { px: 2 }, /* @__PURE__ */ React82.createElement(Tabs, { value: selectedSidebarTab, onChange: (_, v) => setSidebarTab(v) }, /* @__PURE__ */ React82.createElement(Tab, { value: "styles", label: "Styles" }), /* @__PURE__ */ React82.createElement(Tab, { value: "block-configuration", label: "Inspect" }), /* @__PURE__ */ React82.createElement(Tab, { value: "template-settings", label: "Settings" })))),
3260
+ /* @__PURE__ */ React82.createElement(Box, { sx: { width: INSPECTOR_DRAWER_WIDTH, height: "calc(100% - 49px)", overflow: "auto" } }, renderCurrentSidebarPanel())
3127
3261
  );
3128
3262
  }
3129
3263
  function SidebarButton({
@@ -3145,7 +3279,7 @@ function SidebarButton({
3145
3279
  console.error("Error loading template:", error);
3146
3280
  }
3147
3281
  });
3148
- return /* @__PURE__ */ React81.createElement(Button$1, { size: "small", onClick: handleClick, sx: sx2 }, children);
3282
+ return /* @__PURE__ */ React82.createElement(Button$1, { size: "small", onClick: handleClick, sx: sx2 }, children);
3149
3283
  }
3150
3284
 
3151
3285
  // sample-templates/empty-email-message.ts
@@ -3234,7 +3368,7 @@ function SamplesDrawer({
3234
3368
  if (!enabled) {
3235
3369
  return null;
3236
3370
  }
3237
- return /* @__PURE__ */ React81.createElement(React81.Fragment, null, /* @__PURE__ */ React81.createElement(
3371
+ return /* @__PURE__ */ React82.createElement(React82.Fragment, null, /* @__PURE__ */ React82.createElement(
3238
3372
  Drawer,
3239
3373
  {
3240
3374
  variant: "persistent",
@@ -3256,7 +3390,7 @@ function SamplesDrawer({
3256
3390
  width: samplesDrawerOpen ? SAMPLES_DRAWER_WIDTH : 0
3257
3391
  }
3258
3392
  },
3259
- /* @__PURE__ */ React81.createElement(
3393
+ /* @__PURE__ */ React82.createElement(
3260
3394
  Stack,
3261
3395
  {
3262
3396
  spacing: 3,
@@ -3266,7 +3400,7 @@ function SamplesDrawer({
3266
3400
  justifyContent: "space-between",
3267
3401
  height: "100%"
3268
3402
  },
3269
- /* @__PURE__ */ React81.createElement(
3403
+ /* @__PURE__ */ React82.createElement(
3270
3404
  Stack,
3271
3405
  {
3272
3406
  spacing: 2,
@@ -3277,8 +3411,8 @@ function SamplesDrawer({
3277
3411
  }
3278
3412
  }
3279
3413
  },
3280
- /* @__PURE__ */ React81.createElement(Typography, { variant: "h6", component: "h1", sx: { p: 2 } }, "Templates"),
3281
- loadTemplates && /* @__PURE__ */ React81.createElement(React81.Fragment, null, /* @__PURE__ */ React81.createElement(
3414
+ /* @__PURE__ */ React82.createElement(Typography, { variant: "h6", component: "h1", sx: { p: 2 } }, "Templates"),
3415
+ loadTemplates && /* @__PURE__ */ React82.createElement(React82.Fragment, null, /* @__PURE__ */ React82.createElement(
3282
3416
  Typography,
3283
3417
  {
3284
3418
  variant: "subtitle2",
@@ -3286,7 +3420,7 @@ function SamplesDrawer({
3286
3420
  sx: { fontWeight: "bold", mt: 2 }
3287
3421
  },
3288
3422
  "Your Templates"
3289
- ), loadingTemplates ? /* @__PURE__ */ React81.createElement(Stack, { alignItems: "center", width: "100%", py: 1 }, /* @__PURE__ */ React81.createElement(CircularProgress, { size: 24 })) : templates.length > 0 ? /* @__PURE__ */ React81.createElement(Stack, { alignItems: "flex-start", width: "100%" }, templates.map((template) => /* @__PURE__ */ React81.createElement(
3423
+ ), loadingTemplates ? /* @__PURE__ */ React82.createElement(Stack, { alignItems: "center", width: "100%", py: 1 }, /* @__PURE__ */ React82.createElement(CircularProgress, { size: 24 })) : templates.length > 0 ? /* @__PURE__ */ React82.createElement(Stack, { alignItems: "flex-start", width: "100%" }, templates.map((template) => /* @__PURE__ */ React82.createElement(
3290
3424
  Box,
3291
3425
  {
3292
3426
  key: template.id,
@@ -3301,7 +3435,7 @@ function SamplesDrawer({
3301
3435
  }
3302
3436
  }
3303
3437
  },
3304
- /* @__PURE__ */ React81.createElement(
3438
+ /* @__PURE__ */ React82.createElement(
3305
3439
  SidebarButton,
3306
3440
  {
3307
3441
  templateId: template.id,
@@ -3310,15 +3444,15 @@ function SamplesDrawer({
3310
3444
  },
3311
3445
  template.name
3312
3446
  )
3313
- ))) : /* @__PURE__ */ React81.createElement(
3447
+ ))) : /* @__PURE__ */ React82.createElement(
3314
3448
  Typography,
3315
3449
  {
3316
3450
  variant: "body2",
3317
3451
  sx: { color: "text.secondary", py: 1 }
3318
3452
  },
3319
3453
  "No saved templates"
3320
- ), /* @__PURE__ */ React81.createElement(Divider$1, null)),
3321
- /* @__PURE__ */ React81.createElement(React81.Fragment, null, /* @__PURE__ */ React81.createElement(
3454
+ ), /* @__PURE__ */ React82.createElement(Divider$1, null)),
3455
+ /* @__PURE__ */ React82.createElement(React82.Fragment, null, /* @__PURE__ */ React82.createElement(
3322
3456
  Typography,
3323
3457
  {
3324
3458
  variant: "subtitle2",
@@ -3326,7 +3460,7 @@ function SamplesDrawer({
3326
3460
  sx: { fontWeight: "bold", mt: 1 }
3327
3461
  },
3328
3462
  "Sample Templates"
3329
- ), loadingSamples ? /* @__PURE__ */ React81.createElement(Stack, { alignItems: "center", width: "100%", py: 1 }, /* @__PURE__ */ React81.createElement(CircularProgress, { size: 24 })) : /* @__PURE__ */ React81.createElement(Stack, { alignItems: "flex-start" }, samples.map((sample) => /* @__PURE__ */ React81.createElement(
3463
+ ), loadingSamples ? /* @__PURE__ */ React82.createElement(Stack, { alignItems: "center", width: "100%", py: 1 }, /* @__PURE__ */ React82.createElement(CircularProgress, { size: 24 })) : /* @__PURE__ */ React82.createElement(Stack, { alignItems: "flex-start" }, samples.map((sample) => /* @__PURE__ */ React82.createElement(
3330
3464
  SidebarButton,
3331
3465
  {
3332
3466
  key: sample.id,
@@ -3351,7 +3485,7 @@ var ICON_SX = {
3351
3485
  borderColor: "cadet.300"
3352
3486
  };
3353
3487
  function BlockTypeButton({ label, icon, onClick }) {
3354
- return /* @__PURE__ */ React81.createElement(
3488
+ return /* @__PURE__ */ React82.createElement(
3355
3489
  Button$1,
3356
3490
  {
3357
3491
  sx: BUTTON_SX2,
@@ -3360,14 +3494,14 @@ function BlockTypeButton({ label, icon, onClick }) {
3360
3494
  onClick();
3361
3495
  }
3362
3496
  },
3363
- /* @__PURE__ */ React81.createElement(Box, { sx: ICON_SX }, icon),
3364
- /* @__PURE__ */ React81.createElement(Typography, { variant: "body2" }, label)
3497
+ /* @__PURE__ */ React82.createElement(Box, { sx: ICON_SX }, icon),
3498
+ /* @__PURE__ */ React82.createElement(Typography, { variant: "body2" }, label)
3365
3499
  );
3366
3500
  }
3367
3501
  var BUTTONS = [
3368
3502
  {
3369
3503
  label: "Heading",
3370
- icon: /* @__PURE__ */ React81.createElement(HMobiledataOutlined, null),
3504
+ icon: /* @__PURE__ */ React82.createElement(HMobiledataOutlined, null),
3371
3505
  block: () => ({
3372
3506
  type: "Heading",
3373
3507
  data: {
@@ -3380,7 +3514,7 @@ var BUTTONS = [
3380
3514
  },
3381
3515
  {
3382
3516
  label: "Text",
3383
- icon: /* @__PURE__ */ React81.createElement(NotesOutlined, null),
3517
+ icon: /* @__PURE__ */ React82.createElement(NotesOutlined, null),
3384
3518
  block: () => ({
3385
3519
  type: "Text",
3386
3520
  data: {
@@ -3394,7 +3528,7 @@ var BUTTONS = [
3394
3528
  },
3395
3529
  {
3396
3530
  label: "Button",
3397
- icon: /* @__PURE__ */ React81.createElement(SmartButtonOutlined, null),
3531
+ icon: /* @__PURE__ */ React82.createElement(SmartButtonOutlined, null),
3398
3532
  block: () => ({
3399
3533
  type: "Button",
3400
3534
  data: {
@@ -3408,7 +3542,7 @@ var BUTTONS = [
3408
3542
  },
3409
3543
  {
3410
3544
  label: "Image",
3411
- icon: /* @__PURE__ */ React81.createElement(ImageOutlined, null),
3545
+ icon: /* @__PURE__ */ React82.createElement(ImageOutlined, null),
3412
3546
  block: () => ({
3413
3547
  type: "Image",
3414
3548
  data: {
@@ -3424,7 +3558,7 @@ var BUTTONS = [
3424
3558
  },
3425
3559
  {
3426
3560
  label: "Avatar",
3427
- icon: /* @__PURE__ */ React81.createElement(AccountCircleOutlined, null),
3561
+ icon: /* @__PURE__ */ React82.createElement(AccountCircleOutlined, null),
3428
3562
  block: () => ({
3429
3563
  type: "Avatar",
3430
3564
  data: {
@@ -3438,7 +3572,7 @@ var BUTTONS = [
3438
3572
  },
3439
3573
  {
3440
3574
  label: "Divider",
3441
- icon: /* @__PURE__ */ React81.createElement(HorizontalRuleOutlined, null),
3575
+ icon: /* @__PURE__ */ React82.createElement(HorizontalRuleOutlined, null),
3442
3576
  block: () => ({
3443
3577
  type: "Divider",
3444
3578
  data: {
@@ -3451,7 +3585,7 @@ var BUTTONS = [
3451
3585
  },
3452
3586
  {
3453
3587
  label: "Spacer",
3454
- icon: /* @__PURE__ */ React81.createElement(Crop32Outlined, null),
3588
+ icon: /* @__PURE__ */ React82.createElement(Crop32Outlined, null),
3455
3589
  block: () => ({
3456
3590
  type: "Spacer",
3457
3591
  data: {}
@@ -3459,7 +3593,7 @@ var BUTTONS = [
3459
3593
  },
3460
3594
  {
3461
3595
  label: "Html",
3462
- icon: /* @__PURE__ */ React81.createElement(HtmlOutlined, null),
3596
+ icon: /* @__PURE__ */ React82.createElement(HtmlOutlined, null),
3463
3597
  block: () => ({
3464
3598
  type: "Html",
3465
3599
  data: {
@@ -3474,7 +3608,7 @@ var BUTTONS = [
3474
3608
  },
3475
3609
  {
3476
3610
  label: "Columns",
3477
- icon: /* @__PURE__ */ React81.createElement(ViewColumnOutlined, null),
3611
+ icon: /* @__PURE__ */ React82.createElement(ViewColumnOutlined, null),
3478
3612
  block: () => ({
3479
3613
  type: "ColumnsContainer",
3480
3614
  data: {
@@ -3489,7 +3623,7 @@ var BUTTONS = [
3489
3623
  },
3490
3624
  {
3491
3625
  label: "Container",
3492
- icon: /* @__PURE__ */ React81.createElement(LibraryAddOutlined, null),
3626
+ icon: /* @__PURE__ */ React82.createElement(LibraryAddOutlined, null),
3493
3627
  block: () => ({
3494
3628
  type: "Container",
3495
3629
  data: {
@@ -3513,7 +3647,7 @@ function BlocksMenu({ anchorEl, setAnchorEl, onSelect }) {
3513
3647
  if (anchorEl === null) {
3514
3648
  return null;
3515
3649
  }
3516
- return /* @__PURE__ */ React81.createElement(
3650
+ return /* @__PURE__ */ React82.createElement(
3517
3651
  Menu,
3518
3652
  {
3519
3653
  open: true,
@@ -3522,7 +3656,7 @@ function BlocksMenu({ anchorEl, setAnchorEl, onSelect }) {
3522
3656
  anchorOrigin: { vertical: "bottom", horizontal: "center" },
3523
3657
  transformOrigin: { vertical: "top", horizontal: "center" }
3524
3658
  },
3525
- /* @__PURE__ */ React81.createElement(Box, { sx: { p: 1, display: "grid", gridTemplateColumns: "1fr 1fr 1fr 1fr" } }, BUTTONS.map((k, i) => /* @__PURE__ */ React81.createElement(BlockTypeButton, { key: i, label: k.label, icon: k.icon, onClick: () => onClick(k.block()) })))
3659
+ /* @__PURE__ */ React82.createElement(Box, { sx: { p: 1, display: "grid", gridTemplateColumns: "1fr 1fr 1fr 1fr" } }, BUTTONS.map((k, i) => /* @__PURE__ */ React82.createElement(BlockTypeButton, { key: i, label: k.label, icon: k.icon, onClick: () => onClick(k.block()) })))
3526
3660
  );
3527
3661
  }
3528
3662
  function DividerButton({ buttonElement, onClick }) {
@@ -3549,7 +3683,7 @@ function DividerButton({ buttonElement, onClick }) {
3549
3683
  window.removeEventListener("mousemove", listener);
3550
3684
  };
3551
3685
  }, [buttonElement, setVisible]);
3552
- return /* @__PURE__ */ React81.createElement(Fade, { in: visible }, /* @__PURE__ */ React81.createElement(
3686
+ return /* @__PURE__ */ React82.createElement(Fade, { in: visible }, /* @__PURE__ */ React82.createElement(
3553
3687
  IconButton,
3554
3688
  {
3555
3689
  size: "small",
@@ -3572,11 +3706,11 @@ function DividerButton({ buttonElement, onClick }) {
3572
3706
  onClick();
3573
3707
  }
3574
3708
  },
3575
- /* @__PURE__ */ React81.createElement(AddOutlined, { fontSize: "small" })
3709
+ /* @__PURE__ */ React82.createElement(AddOutlined, { fontSize: "small" })
3576
3710
  ));
3577
3711
  }
3578
3712
  function PlaceholderButton({ onClick }) {
3579
- return /* @__PURE__ */ React81.createElement(
3713
+ return /* @__PURE__ */ React82.createElement(
3580
3714
  ButtonBase,
3581
3715
  {
3582
3716
  onClick: (ev) => {
@@ -3592,7 +3726,7 @@ function PlaceholderButton({ onClick }) {
3592
3726
  bgcolor: "rgba(0,0,0, 0.05)"
3593
3727
  }
3594
3728
  },
3595
- /* @__PURE__ */ React81.createElement(
3729
+ /* @__PURE__ */ React82.createElement(
3596
3730
  AddOutlined,
3597
3731
  {
3598
3732
  sx: {
@@ -3614,14 +3748,14 @@ function AddBlockButton({ onSelect, placeholder }) {
3614
3748
  const handleButtonClick = () => {
3615
3749
  setMenuAnchorEl(buttonElement);
3616
3750
  };
3617
- const renderButton = () => {
3751
+ const renderButton2 = () => {
3618
3752
  if (placeholder) {
3619
- return /* @__PURE__ */ React81.createElement(PlaceholderButton, { onClick: handleButtonClick });
3753
+ return /* @__PURE__ */ React82.createElement(PlaceholderButton, { onClick: handleButtonClick });
3620
3754
  } else {
3621
- return /* @__PURE__ */ React81.createElement(DividerButton, { buttonElement, onClick: handleButtonClick });
3755
+ return /* @__PURE__ */ React82.createElement(DividerButton, { buttonElement, onClick: handleButtonClick });
3622
3756
  }
3623
3757
  };
3624
- return /* @__PURE__ */ React81.createElement(React81.Fragment, null, /* @__PURE__ */ React81.createElement("div", { ref: setButtonElement, style: { position: "relative" } }, renderButton()), /* @__PURE__ */ React81.createElement(BlocksMenu, { anchorEl: menuAnchorEl, setAnchorEl: setMenuAnchorEl, onSelect }));
3758
+ return /* @__PURE__ */ React82.createElement(React82.Fragment, null, /* @__PURE__ */ React82.createElement("div", { ref: setButtonElement, style: { position: "relative" } }, renderButton2()), /* @__PURE__ */ React82.createElement(BlocksMenu, { anchorEl: menuAnchorEl, setAnchorEl: setMenuAnchorEl, onSelect }));
3625
3759
  }
3626
3760
 
3627
3761
  // src/editor/blocks/helpers/editor-children-ids/index.tsx
@@ -3648,9 +3782,9 @@ function EditorChildrenIds({ childrenIds, onChange }) {
3648
3782
  });
3649
3783
  };
3650
3784
  if (!childrenIds || childrenIds.length === 0) {
3651
- return /* @__PURE__ */ React81.createElement(AddBlockButton, { placeholder: true, onSelect: appendBlock });
3785
+ return /* @__PURE__ */ React82.createElement(AddBlockButton, { placeholder: true, onSelect: appendBlock });
3652
3786
  }
3653
- return /* @__PURE__ */ React81.createElement(React81.Fragment, null, childrenIds.map((childId, i) => /* @__PURE__ */ React81.createElement(Fragment, { key: childId }, /* @__PURE__ */ React81.createElement(AddBlockButton, { onSelect: (block) => insertBlock(block, i) }), /* @__PURE__ */ React81.createElement(EditorBlock, { id: childId }))), /* @__PURE__ */ React81.createElement(AddBlockButton, { onSelect: appendBlock }));
3787
+ return /* @__PURE__ */ React82.createElement(React82.Fragment, null, childrenIds.map((childId, i) => /* @__PURE__ */ React82.createElement(Fragment, { key: childId }, /* @__PURE__ */ React82.createElement(AddBlockButton, { onSelect: (block) => insertBlock(block, i) }), /* @__PURE__ */ React82.createElement(EditorBlock, { id: childId }))), /* @__PURE__ */ React82.createElement(AddBlockButton, { onSelect: appendBlock }));
3654
3788
  }
3655
3789
 
3656
3790
  // src/editor/blocks/columns-container/columns-container-editor.tsx
@@ -3677,15 +3811,15 @@ function ColumnsContainerEditor({ style, props }) {
3677
3811
  });
3678
3812
  setSelectedBlockId(blockId);
3679
3813
  };
3680
- return /* @__PURE__ */ React81.createElement(
3814
+ return /* @__PURE__ */ React82.createElement(
3681
3815
  columns_container_default,
3682
3816
  {
3683
3817
  props: restProps,
3684
3818
  style,
3685
3819
  columns: [
3686
- /* @__PURE__ */ React81.createElement(EditorChildrenIds, { childrenIds: (_b = columns == null ? void 0 : columns[0]) == null ? void 0 : _b.childrenIds, onChange: (change) => updateColumn(0, change) }),
3687
- /* @__PURE__ */ React81.createElement(EditorChildrenIds, { childrenIds: (_c = columns == null ? void 0 : columns[1]) == null ? void 0 : _c.childrenIds, onChange: (change) => updateColumn(1, change) }),
3688
- /* @__PURE__ */ React81.createElement(EditorChildrenIds, { childrenIds: (_d = columns == null ? void 0 : columns[2]) == null ? void 0 : _d.childrenIds, onChange: (change) => updateColumn(2, change) })
3820
+ /* @__PURE__ */ React82.createElement(EditorChildrenIds, { childrenIds: (_b = columns == null ? void 0 : columns[0]) == null ? void 0 : _b.childrenIds, onChange: (change) => updateColumn(0, change) }),
3821
+ /* @__PURE__ */ React82.createElement(EditorChildrenIds, { childrenIds: (_c = columns == null ? void 0 : columns[1]) == null ? void 0 : _c.childrenIds, onChange: (change) => updateColumn(1, change) }),
3822
+ /* @__PURE__ */ React82.createElement(EditorChildrenIds, { childrenIds: (_d = columns == null ? void 0 : columns[2]) == null ? void 0 : _d.childrenIds, onChange: (change) => updateColumn(2, change) })
3689
3823
  ]
3690
3824
  }
3691
3825
  );
@@ -3695,7 +3829,7 @@ function ContainerEditor({ style, props }) {
3695
3829
  const childrenIds = (_a = props == null ? void 0 : props.childrenIds) != null ? _a : [];
3696
3830
  const document2 = useDocument();
3697
3831
  const currentBlockId = useCurrentBlockId();
3698
- return /* @__PURE__ */ React81.createElement(container_default, { style }, /* @__PURE__ */ React81.createElement(
3832
+ return /* @__PURE__ */ React82.createElement(container_default, { style }, /* @__PURE__ */ React82.createElement(
3699
3833
  EditorChildrenIds,
3700
3834
  {
3701
3835
  childrenIds,
@@ -3742,7 +3876,7 @@ function EmailLayoutEditor(props) {
3742
3876
  const childrenIds = (_a = props.childrenIds) != null ? _a : [];
3743
3877
  const document2 = useDocument();
3744
3878
  const currentBlockId = useCurrentBlockId();
3745
- return /* @__PURE__ */ React81.createElement(
3879
+ return /* @__PURE__ */ React82.createElement(
3746
3880
  "div",
3747
3881
  {
3748
3882
  onClick: () => {
@@ -3762,7 +3896,7 @@ function EmailLayoutEditor(props) {
3762
3896
  minHeight: "100%"
3763
3897
  }
3764
3898
  },
3765
- /* @__PURE__ */ React81.createElement(
3899
+ /* @__PURE__ */ React82.createElement(
3766
3900
  "table",
3767
3901
  {
3768
3902
  align: "center",
@@ -3785,7 +3919,7 @@ function EmailLayoutEditor(props) {
3785
3919
  cellPadding: "0",
3786
3920
  border: 0
3787
3921
  },
3788
- /* @__PURE__ */ React81.createElement("tbody", null, /* @__PURE__ */ React81.createElement("tr", { style: { width: "100%" } }, /* @__PURE__ */ React81.createElement("td", null, /* @__PURE__ */ React81.createElement(
3922
+ /* @__PURE__ */ React82.createElement("tbody", null, /* @__PURE__ */ React82.createElement("tr", { style: { width: "100%" } }, /* @__PURE__ */ React82.createElement("td", null, /* @__PURE__ */ React82.createElement(
3789
3923
  EditorChildrenIds,
3790
3924
  {
3791
3925
  childrenIds,
@@ -3929,7 +4063,7 @@ function TuneMenu({ blockId }) {
3929
4063
  resetDocument(nDocument);
3930
4064
  setSelectedBlockId(blockId);
3931
4065
  };
3932
- return /* @__PURE__ */ React81.createElement(Paper, { sx, onClick: (ev) => ev.stopPropagation() }, /* @__PURE__ */ React81.createElement(Stack, null, /* @__PURE__ */ React81.createElement(Tooltip, { title: "Move up", placement: "left-start" }, /* @__PURE__ */ React81.createElement(IconButton, { onClick: () => handleMoveClick("up"), sx: { color: "text.primary" } }, /* @__PURE__ */ React81.createElement(ArrowUpwardOutlined, { fontSize: "small" }))), /* @__PURE__ */ React81.createElement(Tooltip, { title: "Move down", placement: "left-start" }, /* @__PURE__ */ React81.createElement(IconButton, { onClick: () => handleMoveClick("down"), sx: { color: "text.primary" } }, /* @__PURE__ */ React81.createElement(ArrowDownwardOutlined, { fontSize: "small" }))), /* @__PURE__ */ React81.createElement(Tooltip, { title: "Delete", placement: "left-start" }, /* @__PURE__ */ React81.createElement(IconButton, { onClick: handleDeleteClick, sx: { color: "text.primary" } }, /* @__PURE__ */ React81.createElement(DeleteOutlined, { fontSize: "small" })))));
4066
+ return /* @__PURE__ */ React82.createElement(Paper, { sx, onClick: (ev) => ev.stopPropagation() }, /* @__PURE__ */ React82.createElement(Stack, null, /* @__PURE__ */ React82.createElement(Tooltip, { title: "Move up", placement: "left-start" }, /* @__PURE__ */ React82.createElement(IconButton, { onClick: () => handleMoveClick("up"), sx: { color: "text.primary" } }, /* @__PURE__ */ React82.createElement(ArrowUpwardOutlined, { fontSize: "small" }))), /* @__PURE__ */ React82.createElement(Tooltip, { title: "Move down", placement: "left-start" }, /* @__PURE__ */ React82.createElement(IconButton, { onClick: () => handleMoveClick("down"), sx: { color: "text.primary" } }, /* @__PURE__ */ React82.createElement(ArrowDownwardOutlined, { fontSize: "small" }))), /* @__PURE__ */ React82.createElement(Tooltip, { title: "Delete", placement: "left-start" }, /* @__PURE__ */ React82.createElement(IconButton, { onClick: handleDeleteClick, sx: { color: "text.primary" } }, /* @__PURE__ */ React82.createElement(DeleteOutlined, { fontSize: "small" })))));
3933
4067
  }
3934
4068
 
3935
4069
  // src/editor/blocks/helpers/block-wrappers/editor-block-wrapper.tsx
@@ -3947,9 +4081,9 @@ function EditorBlockWrapper({ children }) {
3947
4081
  if (selectedBlockId !== blockId) {
3948
4082
  return null;
3949
4083
  }
3950
- return /* @__PURE__ */ React81.createElement(TuneMenu, { blockId });
4084
+ return /* @__PURE__ */ React82.createElement(TuneMenu, { blockId });
3951
4085
  };
3952
- return /* @__PURE__ */ React81.createElement(
4086
+ return /* @__PURE__ */ React82.createElement(
3953
4087
  Box,
3954
4088
  {
3955
4089
  sx: {
@@ -4096,7 +4230,7 @@ function HeadingEditor({ style, props }) {
4096
4230
  }
4097
4231
  };
4098
4232
  if (isSelected) {
4099
- return /* @__PURE__ */ React81.createElement(
4233
+ return /* @__PURE__ */ React82.createElement(
4100
4234
  "textarea",
4101
4235
  {
4102
4236
  value: localText,
@@ -4111,11 +4245,11 @@ function HeadingEditor({ style, props }) {
4111
4245
  }
4112
4246
  switch (level) {
4113
4247
  case "h1":
4114
- return /* @__PURE__ */ React81.createElement("h1", { style: hStyle }, textContent);
4248
+ return /* @__PURE__ */ React82.createElement("h1", { style: hStyle }, textContent);
4115
4249
  case "h2":
4116
- return /* @__PURE__ */ React81.createElement("h2", { style: hStyle }, textContent);
4250
+ return /* @__PURE__ */ React82.createElement("h2", { style: hStyle }, textContent);
4117
4251
  case "h3":
4118
- return /* @__PURE__ */ React81.createElement("h3", { style: hStyle }, textContent);
4252
+ return /* @__PURE__ */ React82.createElement("h3", { style: hStyle }, textContent);
4119
4253
  }
4120
4254
  }
4121
4255
  function getFontFamily8(fontFamily) {
@@ -4231,7 +4365,7 @@ function TextEditor({ style, props }) {
4231
4365
  }
4232
4366
  };
4233
4367
  if (isSelected && !isMarkdown) {
4234
- return /* @__PURE__ */ React81.createElement(
4368
+ return /* @__PURE__ */ React82.createElement(
4235
4369
  "textarea",
4236
4370
  {
4237
4371
  value: localText,
@@ -4245,36 +4379,36 @@ function TextEditor({ style, props }) {
4245
4379
  );
4246
4380
  }
4247
4381
  if (isMarkdown) {
4248
- return /* @__PURE__ */ React81.createElement(EmailMarkdown, { style: wStyle, markdown: textContent });
4382
+ return /* @__PURE__ */ React82.createElement(EmailMarkdown, { style: wStyle, markdown: textContent });
4249
4383
  }
4250
- return /* @__PURE__ */ React81.createElement("div", { style: wStyle }, textContent);
4384
+ return /* @__PURE__ */ React82.createElement("div", { style: wStyle }, textContent);
4251
4385
  }
4252
4386
 
4253
4387
  // src/editor/core.tsx
4254
4388
  var EDITOR_DICTIONARY = buildBlockConfigurationDictionary({
4255
4389
  Avatar: {
4256
4390
  schema: AvatarPropsSchema,
4257
- Component: (props) => /* @__PURE__ */ React81.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React81.createElement(avatar_default, __spreadValues({}, props)))
4391
+ Component: (props) => /* @__PURE__ */ React82.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React82.createElement(avatar_default, __spreadValues({}, props)))
4258
4392
  },
4259
4393
  Button: {
4260
4394
  schema: ButtonPropsSchema,
4261
- Component: (props) => /* @__PURE__ */ React81.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React81.createElement(button_default, __spreadValues({}, props)))
4395
+ Component: (props) => /* @__PURE__ */ React82.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React82.createElement(button_default, __spreadValues({}, props)))
4262
4396
  },
4263
4397
  Container: {
4264
4398
  schema: container_props_schema_default,
4265
- Component: (props) => /* @__PURE__ */ React81.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React81.createElement(ContainerEditor, __spreadValues({}, props)))
4399
+ Component: (props) => /* @__PURE__ */ React82.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React82.createElement(ContainerEditor, __spreadValues({}, props)))
4266
4400
  },
4267
4401
  ColumnsContainer: {
4268
4402
  schema: columns_container_props_schema_default2,
4269
- Component: (props) => /* @__PURE__ */ React81.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React81.createElement(ColumnsContainerEditor, __spreadValues({}, props)))
4403
+ Component: (props) => /* @__PURE__ */ React82.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React82.createElement(ColumnsContainerEditor, __spreadValues({}, props)))
4270
4404
  },
4271
4405
  Heading: {
4272
4406
  schema: HeadingPropsSchema,
4273
- Component: (props) => /* @__PURE__ */ React81.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React81.createElement(HeadingEditor, __spreadValues({}, props)))
4407
+ Component: (props) => /* @__PURE__ */ React82.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React82.createElement(HeadingEditor, __spreadValues({}, props)))
4274
4408
  },
4275
4409
  Html: {
4276
4410
  schema: HtmlPropsSchema,
4277
- Component: (props) => /* @__PURE__ */ React81.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React81.createElement(html_default, __spreadValues({}, props)))
4411
+ Component: (props) => /* @__PURE__ */ React82.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React82.createElement(html_default, __spreadValues({}, props)))
4278
4412
  },
4279
4413
  Image: {
4280
4414
  schema: ImagePropsSchema,
@@ -4285,24 +4419,24 @@ var EDITOR_DICTIONARY = buildBlockConfigurationDictionary({
4285
4419
  url: (_b = (_a = data.props) == null ? void 0 : _a.url) != null ? _b : "https://placehold.co/600x400@2x/F8F8F8/CCC?text=Your%20image"
4286
4420
  })
4287
4421
  });
4288
- return /* @__PURE__ */ React81.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React81.createElement(image_default, __spreadValues({}, props)));
4422
+ return /* @__PURE__ */ React82.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React82.createElement(image_default, __spreadValues({}, props)));
4289
4423
  }
4290
4424
  },
4291
4425
  Text: {
4292
4426
  schema: TextPropsSchema,
4293
- Component: (props) => /* @__PURE__ */ React81.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React81.createElement(TextEditor, __spreadValues({}, props)))
4427
+ Component: (props) => /* @__PURE__ */ React82.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React82.createElement(TextEditor, __spreadValues({}, props)))
4294
4428
  },
4295
4429
  EmailLayout: {
4296
4430
  schema: email_layout_props_schema_default,
4297
- Component: (p) => /* @__PURE__ */ React81.createElement(EmailLayoutEditor, __spreadValues({}, p))
4431
+ Component: (p) => /* @__PURE__ */ React82.createElement(EmailLayoutEditor, __spreadValues({}, p))
4298
4432
  },
4299
4433
  Spacer: {
4300
4434
  schema: SpacerPropsSchema,
4301
- Component: (props) => /* @__PURE__ */ React81.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React81.createElement(spacer_default, __spreadValues({}, props)))
4435
+ Component: (props) => /* @__PURE__ */ React82.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React82.createElement(spacer_default, __spreadValues({}, props)))
4302
4436
  },
4303
4437
  Divider: {
4304
4438
  schema: DividerPropsSchema,
4305
- Component: (props) => /* @__PURE__ */ React81.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React81.createElement(divider_default, __spreadValues({}, props)))
4439
+ Component: (props) => /* @__PURE__ */ React82.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React82.createElement(divider_default, __spreadValues({}, props)))
4306
4440
  }
4307
4441
  });
4308
4442
  var EditorBlock2 = buildBlockComponent(EDITOR_DICTIONARY);
@@ -4318,7 +4452,7 @@ function EditorBlock({ id }) {
4318
4452
  if (!block) {
4319
4453
  throw new Error("Could not find block");
4320
4454
  }
4321
- return /* @__PURE__ */ React81.createElement(EditorBlockContext.Provider, { value: id }, /* @__PURE__ */ React81.createElement(EditorBlock2, __spreadValues({}, block)));
4455
+ return /* @__PURE__ */ React82.createElement(EditorBlockContext.Provider, { value: id }, /* @__PURE__ */ React82.createElement(EditorBlock2, __spreadValues({}, block)));
4322
4456
  }
4323
4457
  function ToggleInspectorPanelButton() {
4324
4458
  const inspectorDrawerOpen = useInspectorDrawerOpen();
@@ -4326,20 +4460,20 @@ function ToggleInspectorPanelButton() {
4326
4460
  toggleInspectorDrawerOpen();
4327
4461
  };
4328
4462
  if (inspectorDrawerOpen) {
4329
- return /* @__PURE__ */ React81.createElement(IconButton, { onClick: handleClick }, /* @__PURE__ */ React81.createElement(LastPageOutlined, { fontSize: "small" }));
4463
+ return /* @__PURE__ */ React82.createElement(IconButton, { onClick: handleClick }, /* @__PURE__ */ React82.createElement(LastPageOutlined, { fontSize: "small" }));
4330
4464
  }
4331
- return /* @__PURE__ */ React81.createElement(IconButton, { onClick: handleClick }, /* @__PURE__ */ React81.createElement(AppRegistrationOutlined, { fontSize: "small" }));
4465
+ return /* @__PURE__ */ React82.createElement(IconButton, { onClick: handleClick }, /* @__PURE__ */ React82.createElement(AppRegistrationOutlined, { fontSize: "small" }));
4332
4466
  }
4333
4467
  function useIcon() {
4334
4468
  const samplesDrawerOpen = useSamplesDrawerOpen();
4335
4469
  if (samplesDrawerOpen) {
4336
- return /* @__PURE__ */ React81.createElement(FirstPageOutlined, { fontSize: "small" });
4470
+ return /* @__PURE__ */ React82.createElement(FirstPageOutlined, { fontSize: "small" });
4337
4471
  }
4338
- return /* @__PURE__ */ React81.createElement(MenuOutlined, { fontSize: "small" });
4472
+ return /* @__PURE__ */ React82.createElement(MenuOutlined, { fontSize: "small" });
4339
4473
  }
4340
4474
  function ToggleSamplesPanelButton() {
4341
4475
  const icon = useIcon();
4342
- return /* @__PURE__ */ React81.createElement(IconButton, { onClick: toggleSamplesDrawerOpen }, icon);
4476
+ return /* @__PURE__ */ React82.createElement(IconButton, { onClick: toggleSamplesDrawerOpen }, icon);
4343
4477
  }
4344
4478
  function formatHtml(html2, spaces = 2) {
4345
4479
  try {
@@ -4401,7 +4535,7 @@ function HighlightedCodePanel({ type, value }) {
4401
4535
  if (code === null) {
4402
4536
  return null;
4403
4537
  }
4404
- return /* @__PURE__ */ React81.createElement(
4538
+ return /* @__PURE__ */ React82.createElement(
4405
4539
  "pre",
4406
4540
  {
4407
4541
  style: {
@@ -4427,12 +4561,36 @@ function HighlightedCodePanel({ type, value }) {
4427
4561
  function HtmlPanel() {
4428
4562
  const document2 = useDocument();
4429
4563
  const code = useMemo(() => renderToStaticMarkup(document2, { rootBlockId: "root" }), [document2]);
4430
- return /* @__PURE__ */ React81.createElement(HighlightedCodePanel, { type: "html", value: code });
4564
+ return /* @__PURE__ */ React82.createElement(HighlightedCodePanel, { type: "html", value: code });
4431
4565
  }
4432
4566
  function JsonPanel() {
4433
4567
  const document2 = useDocument();
4434
4568
  const code = useMemo(() => JSON.stringify(document2, null, " "), [document2]);
4435
- return /* @__PURE__ */ React81.createElement(HighlightedCodePanel, { type: "json", value: code });
4569
+ return /* @__PURE__ */ React82.createElement(HighlightedCodePanel, { type: "json", value: code });
4570
+ }
4571
+ function TextPanel() {
4572
+ const document2 = useDocument();
4573
+ const text = useMemo(() => renderToText(document2, { rootBlockId: "root" }), [document2]);
4574
+ return /* @__PURE__ */ React82.createElement(
4575
+ "pre",
4576
+ {
4577
+ style: {
4578
+ margin: 0,
4579
+ padding: 16,
4580
+ overflowX: "auto",
4581
+ whiteSpace: "pre-wrap",
4582
+ fontSize: "13px",
4583
+ fontFamily: "monospace",
4584
+ lineHeight: "1.5"
4585
+ },
4586
+ onClick: (ev) => {
4587
+ const s = window.getSelection();
4588
+ if (s === null) return;
4589
+ s.selectAllChildren(ev.currentTarget);
4590
+ }
4591
+ },
4592
+ text
4593
+ );
4436
4594
  }
4437
4595
  function MainTabsGroup() {
4438
4596
  const selectedMainTab = useSelectedMainTab();
@@ -4442,35 +4600,42 @@ function MainTabsGroup() {
4442
4600
  case "preview":
4443
4601
  case "editor":
4444
4602
  case "html":
4603
+ case "text":
4445
4604
  setSelectedMainTab(v);
4446
4605
  return;
4447
4606
  default:
4448
4607
  setSelectedMainTab("editor");
4449
4608
  }
4450
4609
  };
4451
- return /* @__PURE__ */ React81.createElement(Tabs, { value: selectedMainTab, onChange: handleChange }, /* @__PURE__ */ React81.createElement(
4610
+ return /* @__PURE__ */ React82.createElement(Tabs, { value: selectedMainTab, onChange: handleChange }, /* @__PURE__ */ React82.createElement(
4452
4611
  Tab,
4453
4612
  {
4454
4613
  value: "editor",
4455
- label: /* @__PURE__ */ React81.createElement(Tooltip, { title: "Edit" }, /* @__PURE__ */ React81.createElement(EditOutlined, { fontSize: "small" }))
4614
+ label: /* @__PURE__ */ React82.createElement(Tooltip, { title: "Edit" }, /* @__PURE__ */ React82.createElement(EditOutlined, { fontSize: "small" }))
4456
4615
  }
4457
- ), /* @__PURE__ */ React81.createElement(
4616
+ ), /* @__PURE__ */ React82.createElement(
4458
4617
  Tab,
4459
4618
  {
4460
4619
  value: "preview",
4461
- label: /* @__PURE__ */ React81.createElement(Tooltip, { title: "Preview" }, /* @__PURE__ */ React81.createElement(PreviewOutlined, { fontSize: "small" }))
4620
+ label: /* @__PURE__ */ React82.createElement(Tooltip, { title: "Preview" }, /* @__PURE__ */ React82.createElement(PreviewOutlined, { fontSize: "small" }))
4462
4621
  }
4463
- ), /* @__PURE__ */ React81.createElement(
4622
+ ), /* @__PURE__ */ React82.createElement(
4464
4623
  Tab,
4465
4624
  {
4466
4625
  value: "html",
4467
- label: /* @__PURE__ */ React81.createElement(Tooltip, { title: "HTML output" }, /* @__PURE__ */ React81.createElement(CodeOutlined, { fontSize: "small" }))
4626
+ label: /* @__PURE__ */ React82.createElement(Tooltip, { title: "HTML output" }, /* @__PURE__ */ React82.createElement(CodeOutlined, { fontSize: "small" }))
4627
+ }
4628
+ ), /* @__PURE__ */ React82.createElement(
4629
+ Tab,
4630
+ {
4631
+ value: "text",
4632
+ label: /* @__PURE__ */ React82.createElement(Tooltip, { title: "Plain text output" }, /* @__PURE__ */ React82.createElement(SubjectOutlined, { fontSize: "small" }))
4468
4633
  }
4469
- ), /* @__PURE__ */ React81.createElement(
4634
+ ), /* @__PURE__ */ React82.createElement(
4470
4635
  Tab,
4471
4636
  {
4472
4637
  value: "json",
4473
- label: /* @__PURE__ */ React81.createElement(Tooltip, { title: "JSON output" }, /* @__PURE__ */ React81.createElement(DataObjectOutlined, { fontSize: "small" }))
4638
+ label: /* @__PURE__ */ React82.createElement(Tooltip, { title: "JSON output" }, /* @__PURE__ */ React82.createElement(DataObjectOutlined, { fontSize: "small" }))
4474
4639
  }
4475
4640
  ));
4476
4641
  }
@@ -4492,7 +4657,7 @@ function SnackbarProvider({ children }) {
4492
4657
  const handleClose = () => {
4493
4658
  setMessage(null);
4494
4659
  };
4495
- return /* @__PURE__ */ React81.createElement(SnackbarContext.Provider, { value: { showMessage } }, children, /* @__PURE__ */ React81.createElement(
4660
+ return /* @__PURE__ */ React82.createElement(SnackbarContext.Provider, { value: { showMessage } }, children, /* @__PURE__ */ React82.createElement(
4496
4661
  Snackbar,
4497
4662
  {
4498
4663
  anchorOrigin: { vertical: "top", horizontal: "center" },
@@ -4568,7 +4733,7 @@ function SaveTemplateDialog({
4568
4733
  setInternalError("");
4569
4734
  onClose();
4570
4735
  };
4571
- return /* @__PURE__ */ React81.createElement(
4736
+ return /* @__PURE__ */ React82.createElement(
4572
4737
  Dialog,
4573
4738
  {
4574
4739
  open,
@@ -4576,8 +4741,8 @@ function SaveTemplateDialog({
4576
4741
  maxWidth: "sm",
4577
4742
  fullWidth: true
4578
4743
  },
4579
- /* @__PURE__ */ React81.createElement(DialogTitle, null, "Save Email Template"),
4580
- /* @__PURE__ */ React81.createElement(DialogContent, null, /* @__PURE__ */ React81.createElement(Box, { sx: { pt: 1 } }, /* @__PURE__ */ React81.createElement(
4744
+ /* @__PURE__ */ React82.createElement(DialogTitle, null, "Save Email Template"),
4745
+ /* @__PURE__ */ React82.createElement(DialogContent, null, /* @__PURE__ */ React82.createElement(Box, { sx: { pt: 1 } }, /* @__PURE__ */ React82.createElement(
4581
4746
  TextField,
4582
4747
  {
4583
4748
  autoFocus: true,
@@ -4599,7 +4764,7 @@ function SaveTemplateDialog({
4599
4764
  disabled: isSubmitting
4600
4765
  }
4601
4766
  ))),
4602
- /* @__PURE__ */ React81.createElement(DialogActions, null, /* @__PURE__ */ React81.createElement(Button$1, { onClick: handleCancel, disabled: isSubmitting }, "Cancel"), /* @__PURE__ */ React81.createElement(
4767
+ /* @__PURE__ */ React82.createElement(DialogActions, null, /* @__PURE__ */ React82.createElement(Button$1, { onClick: handleCancel, disabled: isSubmitting }, "Cancel"), /* @__PURE__ */ React82.createElement(
4603
4768
  Button$1,
4604
4769
  {
4605
4770
  onClick: handleSave,
@@ -4654,7 +4819,7 @@ function SaveButton({ loadTemplates, saveAs }) {
4654
4819
  return false;
4655
4820
  }
4656
4821
  });
4657
- return /* @__PURE__ */ React81.createElement(React81.Fragment, null, /* @__PURE__ */ React81.createElement(
4822
+ return /* @__PURE__ */ React82.createElement(React82.Fragment, null, /* @__PURE__ */ React82.createElement(
4658
4823
  IconButton,
4659
4824
  {
4660
4825
  onClick: handleSave,
@@ -4665,8 +4830,8 @@ function SaveButton({ loadTemplates, saveAs }) {
4665
4830
  }
4666
4831
  }
4667
4832
  },
4668
- /* @__PURE__ */ React81.createElement(Tooltip, { title: "Save template" }, /* @__PURE__ */ React81.createElement(SaveOutlined, { fontSize: "small" }))
4669
- ), /* @__PURE__ */ React81.createElement(
4833
+ /* @__PURE__ */ React82.createElement(Tooltip, { title: "Save template" }, /* @__PURE__ */ React82.createElement(SaveOutlined, { fontSize: "small" }))
4834
+ ), /* @__PURE__ */ React82.createElement(
4670
4835
  SaveTemplateDialog,
4671
4836
  {
4672
4837
  open: saveDialogOpen,
@@ -4736,7 +4901,7 @@ function NewTemplateButton({ loadTemplates, saveAs }) {
4736
4901
  }
4737
4902
  return false;
4738
4903
  });
4739
- return /* @__PURE__ */ React81.createElement(React81.Fragment, null, /* @__PURE__ */ React81.createElement(
4904
+ return /* @__PURE__ */ React82.createElement(React82.Fragment, null, /* @__PURE__ */ React82.createElement(
4740
4905
  IconButton,
4741
4906
  {
4742
4907
  onClick: handleNewTemplate,
@@ -4747,8 +4912,8 @@ function NewTemplateButton({ loadTemplates, saveAs }) {
4747
4912
  }
4748
4913
  }
4749
4914
  },
4750
- /* @__PURE__ */ React81.createElement(Tooltip, { title: "New template" }, /* @__PURE__ */ React81.createElement(Add, { fontSize: "small" }))
4751
- ), /* @__PURE__ */ React81.createElement(
4915
+ /* @__PURE__ */ React82.createElement(Tooltip, { title: "New template" }, /* @__PURE__ */ React82.createElement(Add, { fontSize: "small" }))
4916
+ ), /* @__PURE__ */ React82.createElement(
4752
4917
  SaveTemplateDialog,
4753
4918
  {
4754
4919
  open: saveDialogOpen,
@@ -4795,17 +4960,19 @@ function TemplatePanel2({ loadTemplates, saveAs }) {
4795
4960
  const renderMainPanel = () => {
4796
4961
  switch (selectedMainTab) {
4797
4962
  case "editor":
4798
- return /* @__PURE__ */ React81.createElement(Box, { sx: mainBoxSx }, /* @__PURE__ */ React81.createElement(EditorBlock, { id: "root" }));
4963
+ return /* @__PURE__ */ React82.createElement(Box, { sx: mainBoxSx }, /* @__PURE__ */ React82.createElement(EditorBlock, { id: "root" }));
4799
4964
  case "preview":
4800
- return /* @__PURE__ */ React81.createElement(Box, { sx: mainBoxSx }, /* @__PURE__ */ React81.createElement(Reader, { document: document2, rootBlockId: "root" }));
4965
+ return /* @__PURE__ */ React82.createElement(Box, { sx: mainBoxSx }, /* @__PURE__ */ React82.createElement(Reader, { document: document2, rootBlockId: "root" }));
4801
4966
  case "html":
4802
- return /* @__PURE__ */ React81.createElement(HtmlPanel, null);
4967
+ return /* @__PURE__ */ React82.createElement(HtmlPanel, null);
4968
+ case "text":
4969
+ return /* @__PURE__ */ React82.createElement(TextPanel, null);
4803
4970
  case "json":
4804
- return /* @__PURE__ */ React81.createElement(JsonPanel, null);
4971
+ return /* @__PURE__ */ React82.createElement(JsonPanel, null);
4805
4972
  }
4806
4973
  };
4807
4974
  const showSaveButtons = persistenceEnabled;
4808
- return /* @__PURE__ */ React81.createElement(React81.Fragment, null, /* @__PURE__ */ React81.createElement(
4975
+ return /* @__PURE__ */ React82.createElement(React82.Fragment, null, /* @__PURE__ */ React82.createElement(
4809
4976
  Stack,
4810
4977
  {
4811
4978
  sx: {
@@ -4822,10 +4989,10 @@ function TemplatePanel2({ loadTemplates, saveAs }) {
4822
4989
  justifyContent: "space-between",
4823
4990
  alignItems: "center"
4824
4991
  },
4825
- /* @__PURE__ */ React81.createElement(ToggleSamplesPanelButton, null),
4826
- /* @__PURE__ */ React81.createElement(Stack, { px: 2, direction: "row", gap: 2, width: "100%", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ React81.createElement(Stack, { direction: "row", spacing: 2 }, /* @__PURE__ */ React81.createElement(MainTabsGroup, null)), /* @__PURE__ */ React81.createElement(Stack, { direction: "row", spacing: 2 }, /* @__PURE__ */ React81.createElement(ToggleButtonGroup, { value: selectedScreenSize, exclusive: true, size: "small", onChange: handleScreenSizeChange }, /* @__PURE__ */ React81.createElement(ToggleButton, { value: "desktop" }, /* @__PURE__ */ React81.createElement(Tooltip, { title: "Desktop view" }, /* @__PURE__ */ React81.createElement(MonitorOutlined, { fontSize: "small" }))), /* @__PURE__ */ React81.createElement(ToggleButton, { value: "mobile" }, /* @__PURE__ */ React81.createElement(Tooltip, { title: "Mobile view" }, /* @__PURE__ */ React81.createElement(PhoneIphoneOutlined, { fontSize: "small" })))), showSaveButtons && /* @__PURE__ */ React81.createElement(React81.Fragment, null, /* @__PURE__ */ React81.createElement(NewTemplateButton, { loadTemplates, saveAs }), /* @__PURE__ */ React81.createElement(SaveButton, { loadTemplates, saveAs })))),
4827
- /* @__PURE__ */ React81.createElement(ToggleInspectorPanelButton, null)
4828
- ), /* @__PURE__ */ React81.createElement(Box, { sx: {
4992
+ /* @__PURE__ */ React82.createElement(ToggleSamplesPanelButton, null),
4993
+ /* @__PURE__ */ React82.createElement(Stack, { px: 2, direction: "row", gap: 2, width: "100%", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ React82.createElement(Stack, { direction: "row", spacing: 2 }, /* @__PURE__ */ React82.createElement(MainTabsGroup, null)), /* @__PURE__ */ React82.createElement(Stack, { direction: "row", spacing: 2 }, /* @__PURE__ */ React82.createElement(ToggleButtonGroup, { value: selectedScreenSize, exclusive: true, size: "small", onChange: handleScreenSizeChange }, /* @__PURE__ */ React82.createElement(ToggleButton, { value: "desktop" }, /* @__PURE__ */ React82.createElement(Tooltip, { title: "Desktop view" }, /* @__PURE__ */ React82.createElement(MonitorOutlined, { fontSize: "small" }))), /* @__PURE__ */ React82.createElement(ToggleButton, { value: "mobile" }, /* @__PURE__ */ React82.createElement(Tooltip, { title: "Mobile view" }, /* @__PURE__ */ React82.createElement(PhoneIphoneOutlined, { fontSize: "small" })))), showSaveButtons && /* @__PURE__ */ React82.createElement(React82.Fragment, null, /* @__PURE__ */ React82.createElement(NewTemplateButton, { loadTemplates, saveAs }), /* @__PURE__ */ React82.createElement(SaveButton, { loadTemplates, saveAs })))),
4994
+ /* @__PURE__ */ React82.createElement(ToggleInspectorPanelButton, null)
4995
+ ), /* @__PURE__ */ React82.createElement(Box, { sx: {
4829
4996
  paddingBottom: "50px",
4830
4997
  minWidth: 370
4831
4998
  } }, renderMainPanel()));
@@ -4907,7 +5074,7 @@ var EmailEditorInternal = forwardRef((props, ref) => {
4907
5074
  return getDocument();
4908
5075
  }
4909
5076
  }));
4910
- return /* @__PURE__ */ React81.createElement(Stack, { position: "relative", id: "drawer-container", sx: { minHeight } }, /* @__PURE__ */ React81.createElement(
5077
+ return /* @__PURE__ */ React82.createElement(Stack, { position: "relative", id: "drawer-container", sx: { minHeight } }, /* @__PURE__ */ React82.createElement(
4911
5078
  InspectorDrawer,
4912
5079
  {
4913
5080
  enterDuration: drawerEnterDuration,
@@ -4915,7 +5082,7 @@ var EmailEditorInternal = forwardRef((props, ref) => {
4915
5082
  deleteTemplate,
4916
5083
  copyTemplate
4917
5084
  }
4918
- ), /* @__PURE__ */ React81.createElement(
5085
+ ), /* @__PURE__ */ React82.createElement(
4919
5086
  SamplesDrawer,
4920
5087
  {
4921
5088
  enterDuration: drawerEnterDuration,
@@ -4927,7 +5094,7 @@ var EmailEditorInternal = forwardRef((props, ref) => {
4927
5094
  currentTemplateId,
4928
5095
  deleteTemplate
4929
5096
  }
4930
- ), /* @__PURE__ */ React81.createElement(
5097
+ ), /* @__PURE__ */ React82.createElement(
4931
5098
  Stack,
4932
5099
  {
4933
5100
  sx: {
@@ -4936,7 +5103,7 @@ var EmailEditorInternal = forwardRef((props, ref) => {
4936
5103
  transition: [marginLeftTransition, marginRightTransition].join(", ")
4937
5104
  }
4938
5105
  },
4939
- /* @__PURE__ */ React81.createElement(TemplatePanel2, { loadTemplates, saveAs })
5106
+ /* @__PURE__ */ React82.createElement(TemplatePanel2, { loadTemplates, saveAs })
4940
5107
  ));
4941
5108
  });
4942
5109
  var EmailEditor = forwardRef((props, ref) => {
@@ -4964,16 +5131,14 @@ var EmailEditor = forwardRef((props, ref) => {
4964
5131
  [initialTemplateProp]
4965
5132
  );
4966
5133
  const prevTemplateRef = useRef(void 0);
4967
- useEffect(() => {
4968
- if (resolvedTemplate && resolvedTemplate !== prevTemplateRef.current) {
4969
- prevTemplateRef.current = resolvedTemplate;
4970
- resetDocument(resolvedTemplate);
4971
- }
4972
- }, [resolvedTemplate]);
5134
+ if (resolvedTemplate && resolvedTemplate !== prevTemplateRef.current) {
5135
+ prevTemplateRef.current = resolvedTemplate;
5136
+ resetDocument(resolvedTemplate);
5137
+ }
4973
5138
  useEffect(() => {
4974
5139
  setPersistenceEnabled(persistenceEnabled);
4975
5140
  }, [persistenceEnabled]);
4976
- return /* @__PURE__ */ React81.createElement(ThemeProvider, { theme: theme || theme_default }, /* @__PURE__ */ React81.createElement(CssBaseline, null), /* @__PURE__ */ React81.createElement("div", { style: { height: "100%", overflow: "auto" } }, /* @__PURE__ */ React81.createElement(SnackbarProvider, null, /* @__PURE__ */ React81.createElement(
5141
+ return /* @__PURE__ */ React82.createElement(ThemeProvider, { theme: theme || theme_default }, /* @__PURE__ */ React82.createElement(CssBaseline, null), /* @__PURE__ */ React82.createElement("div", { style: { height: "100%", overflow: "auto" } }, /* @__PURE__ */ React82.createElement(SnackbarProvider, null, /* @__PURE__ */ React82.createElement(
4977
5142
  EmailEditorProvider,
4978
5143
  {
4979
5144
  initialTemplate: resolvedTemplate,
@@ -4982,7 +5147,7 @@ var EmailEditor = forwardRef((props, ref) => {
4982
5147
  onSave,
4983
5148
  onChange
4984
5149
  },
4985
- /* @__PURE__ */ React81.createElement(
5150
+ /* @__PURE__ */ React82.createElement(
4986
5151
  EmailEditorInternal,
4987
5152
  {
4988
5153
  ref,
@@ -5004,6 +5169,6 @@ var EmailEditor = forwardRef((props, ref) => {
5004
5169
  EmailEditor.displayName = "EmailEditor";
5005
5170
  EmailEditorInternal.displayName = "EmailEditorInternal";
5006
5171
 
5007
- export { avatar_default as Avatar, AvatarProps, AvatarPropsDefaults, AvatarPropsSchema, BlockConfiguration, button_default as Button, ButtonProps, ButtonPropsDefaults, ButtonPropsSchema, columns_container_default as ColumnsContainer, ColumnsContainerProps, ColumnsContainerPropsSchema, ColumnsContainerReader, container_default as Container, ContainerProps, ContainerPropsSchema, ContainerReader, divider_default as Divider, DividerProps, DividerPropsDefaults, DividerPropsSchema, DocumentBlocksDictionary, EmailEditor, EmailEditorProvider, EmailLayoutPropsSchema, EmailLayoutReader, EmailMarkdown, heading_default as Heading, HeadingProps, HeadingPropsDefaults, HeadingPropsSchema, html_default as Html, HtmlProps, HtmlPropsSchema, image_default as Image, ImageProps, ImagePropsSchema, Reader, ReaderBlock, ReaderBlockSchema, ReaderDocumentSchema, spacer_default as Spacer, SpacerProps, SpacerPropsDefaults, SpacerPropsSchema, Text, TextProps, TextPropsDefaults, TextPropsSchema, buildBlockComponent, buildBlockConfigurationDictionary, buildBlockConfigurationSchema, htmlToEditorConfig, renderToStaticMarkup, theme_default as theme, useEmailEditor };
5172
+ export { avatar_default as Avatar, AvatarProps, AvatarPropsDefaults, AvatarPropsSchema, BlockConfiguration, button_default as Button, ButtonProps, ButtonPropsDefaults, ButtonPropsSchema, columns_container_default as ColumnsContainer, ColumnsContainerProps, ColumnsContainerPropsSchema, ColumnsContainerReader, container_default as Container, ContainerProps, ContainerPropsSchema, ContainerReader, divider_default as Divider, DividerProps, DividerPropsDefaults, DividerPropsSchema, DocumentBlocksDictionary, EmailEditor, EmailEditorProvider, EmailLayoutPropsSchema, EmailLayoutReader, EmailMarkdown, heading_default as Heading, HeadingProps, HeadingPropsDefaults, HeadingPropsSchema, html_default as Html, HtmlProps, HtmlPropsSchema, image_default as Image, ImageProps, ImagePropsSchema, Reader, ReaderBlock, ReaderBlockSchema, ReaderDocumentSchema, spacer_default as Spacer, SpacerProps, SpacerPropsDefaults, SpacerPropsSchema, Text, TextProps, TextPropsDefaults, TextPropsSchema, buildBlockComponent, buildBlockConfigurationDictionary, buildBlockConfigurationSchema, htmlToEditorConfig, renderToStaticMarkup, renderToText, theme_default as theme, useEmailEditor };
5008
5173
  //# sourceMappingURL=index.js.map
5009
5174
  //# sourceMappingURL=index.js.map