@kontakto/email-template-editor 2.11.0 → 2.12.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,6 +1,6 @@
1
1
  import DOMPurify from 'dompurify';
2
2
  import { marked, Renderer } from 'marked';
3
- import React62, { createContext, forwardRef, useRef, useEffect, useImperativeHandle, useMemo, useContext, useState, useCallback, useLayoutEffect, Fragment } from 'react';
3
+ import React63, { createContext, forwardRef, useRef, useEffect, useImperativeHandle, useMemo, useContext, useState, useCallback, useLayoutEffect, Fragment } from 'react';
4
4
  import { z } from 'zod';
5
5
  import { renderToStaticMarkup as renderToStaticMarkup$1 } from 'react-dom/server';
6
6
  import Handlebars from 'handlebars';
@@ -10,7 +10,7 @@ import { Stack, ThemeProvider, CssBaseline, useTheme, Drawer, Box, Tabs, Tab, Ty
10
10
  import { i18n } from '@lingui/core';
11
11
  import { create, useStore } from 'zustand';
12
12
  import { temporal } from 'zundo';
13
- import { AddOutlined, SearchOutlined, MonitorOutlined, PhoneIphoneOutlined, MoreVertOutlined, DriveFileRenameOutlineOutlined, ContentCopyOutlined, LibraryAddOutlined, FileUploadOutlined, FileDownloadOutlined, DeleteOutlined, InsertDriveFileOutlined, DescriptionOutlined, EditOutlined, PreviewOutlined, CodeOutlined, SubjectOutlined, DataObjectOutlined, UndoOutlined, RedoOutlined, LastPageOutlined, AppRegistrationOutlined, CloudUploadOutlined, SaveOutlined, SaveAsOutlined, GridOnOutlined, SquareOutlined, ViewColumnSharp, ExpandMore, ChevronRight, KeyboardArrowUp, KeyboardArrowDown, FirstPageOutlined, MenuOutlined, CheckOutlined, InputOutlined, DeleteOutline, RoundedCornerOutlined, AspectRatioOutlined, HeightOutlined, CollectionsOutlined, ErrorOutlineOutlined, VerticalAlignTopOutlined, VerticalAlignCenterOutlined, VerticalAlignBottomOutlined, SpaceBarOutlined, BusinessOutlined, ViewColumnOutlined, HtmlOutlined, Crop32Outlined, HorizontalRuleOutlined, ContactMailOutlined, AccountCircleOutlined, ImageOutlined, SmartButtonOutlined, NotesOutlined, HMobiledataOutlined, DashboardOutlined, CloseOutlined, AlignVerticalTopOutlined, AlignVerticalBottomOutlined, AlignHorizontalLeftOutlined, AlignHorizontalRightOutlined, FormatAlignLeftOutlined, FormatAlignCenterOutlined, FormatAlignRightOutlined, FormatLineSpacingOutlined, TextFieldsOutlined, FormatColorTextOutlined, FormatBoldOutlined, FormatItalicOutlined, FormatUnderlinedOutlined, FormatOverlineOutlined, LinkOutlined, ArrowUpwardOutlined, ArrowDownwardOutlined } from '@mui/icons-material';
13
+ import { AddOutlined, SearchOutlined, MonitorOutlined, PhoneIphoneOutlined, SendOutlined, MoreVertOutlined, DriveFileRenameOutlineOutlined, ContentCopyOutlined, LibraryAddOutlined, FileUploadOutlined, FileDownloadOutlined, DeleteOutlined, InsertDriveFileOutlined, DescriptionOutlined, EditOutlined, PreviewOutlined, CodeOutlined, SubjectOutlined, DataObjectOutlined, UndoOutlined, RedoOutlined, LastPageOutlined, AppRegistrationOutlined, CloudUploadOutlined, SaveOutlined, SaveAsOutlined, GridOnOutlined, SquareOutlined, ViewColumnSharp, ExpandMore, ChevronRight, KeyboardArrowUp, KeyboardArrowDown, FirstPageOutlined, MenuOutlined, CheckOutlined, InputOutlined, DeleteOutline, RoundedCornerOutlined, AspectRatioOutlined, HeightOutlined, CollectionsOutlined, ErrorOutlineOutlined, VerticalAlignTopOutlined, VerticalAlignCenterOutlined, VerticalAlignBottomOutlined, SpaceBarOutlined, BusinessOutlined, ViewColumnOutlined, HtmlOutlined, Crop32Outlined, HorizontalRuleOutlined, ContactMailOutlined, AccountCircleOutlined, ImageOutlined, SmartButtonOutlined, NotesOutlined, HMobiledataOutlined, DashboardOutlined, CloseOutlined, AlignVerticalTopOutlined, AlignVerticalBottomOutlined, AlignHorizontalLeftOutlined, AlignHorizontalRightOutlined, FormatAlignLeftOutlined, FormatAlignCenterOutlined, FormatAlignRightOutlined, FormatLineSpacingOutlined, TextFieldsOutlined, FormatColorTextOutlined, FormatBoldOutlined, FormatItalicOutlined, FormatUnderlinedOutlined, FormatOverlineOutlined, LinkOutlined, ArrowUpwardOutlined, ArrowDownwardOutlined, WidgetsOutlined } from '@mui/icons-material';
14
14
  import { HexColorPicker, HexColorInput } from 'react-colorful';
15
15
  import hljs from 'highlight.js';
16
16
  import jsonHighlighter from 'highlight.js/lib/languages/json';
@@ -152,6 +152,15 @@ ${body}</tbody>
152
152
  paragraph(text) {
153
153
  return `<p style="margin:0 0 1em 0">${text}</p>`;
154
154
  }
155
+ list(body, ordered, start) {
156
+ const tag = ordered ? "ol" : "ul";
157
+ const type = ordered ? "list-style-type:decimal" : "list-style-type:disc";
158
+ const startAttr = ordered && start !== 1 ? ` start="${start}"` : "";
159
+ return `<${tag} style="margin:0 0 1em 0;padding-left:1.5em;${type}"${startAttr}>${body}</${tag}>`;
160
+ }
161
+ listitem(text) {
162
+ return `<li style="margin-bottom:0.25em">${text}</li>`;
163
+ }
155
164
  };
156
165
  function renderMarkdownString(str) {
157
166
  const html2 = marked.parse(str, {
@@ -184,7 +193,7 @@ function renderInlineMarkdownString(str) {
184
193
  function EmailMarkdown(_a) {
185
194
  var _b = _a, { markdown } = _b, props = __objRest(_b, ["markdown"]);
186
195
  const data = useMemo(() => renderMarkdownString(markdown), [markdown]);
187
- return /* @__PURE__ */ React62.createElement("div", __spreadProps(__spreadValues({}, props), { dangerouslySetInnerHTML: { __html: data } }));
196
+ return /* @__PURE__ */ React63.createElement("div", __spreadProps(__spreadValues({}, props), { dangerouslySetInnerHTML: { __html: data } }));
188
197
  }
189
198
  var FONT_FAMILY_SCHEMA = z.enum([
190
199
  "MODERN_SANS",
@@ -264,9 +273,9 @@ function Text({ style, props }) {
264
273
  };
265
274
  const text = (_g = props == null ? void 0 : props.text) != null ? _g : TextPropsDefaults.text;
266
275
  if (props == null ? void 0 : props.markdown) {
267
- return /* @__PURE__ */ React62.createElement(EmailMarkdown, { style: wStyle, markdown: text });
276
+ return /* @__PURE__ */ React63.createElement(EmailMarkdown, { style: wStyle, markdown: text });
268
277
  }
269
- return /* @__PURE__ */ React62.createElement("div", { style: wStyle }, text);
278
+ return /* @__PURE__ */ React63.createElement("div", { style: wStyle }, text);
270
279
  }
271
280
  var PADDING_SCHEMA2 = z.object({
272
281
  top: z.number(),
@@ -315,7 +324,7 @@ function Avatar({ style, props }) {
315
324
  textAlign: (_e = style == null ? void 0 : style.textAlign) != null ? _e : void 0,
316
325
  padding: getPadding2(style == null ? void 0 : style.padding)
317
326
  };
318
- return /* @__PURE__ */ React62.createElement("div", { style: sectionStyle }, /* @__PURE__ */ React62.createElement(
327
+ return /* @__PURE__ */ React63.createElement("div", { style: sectionStyle }, /* @__PURE__ */ React63.createElement(
319
328
  "img",
320
329
  {
321
330
  alt,
@@ -467,14 +476,14 @@ function Button({ style, props }) {
467
476
  padding: `${padding[0]}px ${padding[1]}px`,
468
477
  textDecoration: "none"
469
478
  };
470
- return /* @__PURE__ */ React62.createElement("div", { style: wrapperStyle }, /* @__PURE__ */ React62.createElement("a", { href: url, style: linkStyle, target: "_blank" }, /* @__PURE__ */ React62.createElement(
479
+ return /* @__PURE__ */ React63.createElement("div", { style: wrapperStyle }, /* @__PURE__ */ React63.createElement("a", { href: url, style: linkStyle, target: "_blank" }, /* @__PURE__ */ React63.createElement(
471
480
  "span",
472
481
  {
473
482
  dangerouslySetInnerHTML: {
474
483
  __html: `<!--[if mso]><i style="letter-spacing: ${padding[1]}px;mso-font-width:-100%;mso-text-raise:${textRaise}" hidden>&nbsp;</i><![endif]-->`
475
484
  }
476
485
  }
477
- ), /* @__PURE__ */ React62.createElement("span", null, text), /* @__PURE__ */ React62.createElement(
486
+ ), /* @__PURE__ */ React63.createElement("span", null, text), /* @__PURE__ */ React63.createElement(
478
487
  "span",
479
488
  {
480
489
  dangerouslySetInnerHTML: {
@@ -523,7 +532,7 @@ function ColumnsContainer({ style, columns, props }) {
523
532
  contentAlignment: (_d = props == null ? void 0 : props.contentAlignment) != null ? _d : ColumnsContainerPropsDefaults.contentAlignment,
524
533
  fixedWidths: props == null ? void 0 : props.fixedWidths
525
534
  };
526
- return /* @__PURE__ */ React62.createElement("div", { style: wStyle }, /* @__PURE__ */ React62.createElement(
535
+ return /* @__PURE__ */ React63.createElement("div", { style: wStyle }, /* @__PURE__ */ React63.createElement(
527
536
  "table",
528
537
  {
529
538
  align: "center",
@@ -532,7 +541,7 @@ function ColumnsContainer({ style, columns, props }) {
532
541
  border: 0,
533
542
  style: { tableLayout: "fixed", borderCollapse: "collapse" }
534
543
  },
535
- /* @__PURE__ */ React62.createElement("tbody", { style: { width: "100%" } }, /* @__PURE__ */ React62.createElement("tr", { style: { width: "100%" } }, /* @__PURE__ */ React62.createElement(TableCell, { index: 0, props: blockProps, columns }), /* @__PURE__ */ React62.createElement(TableCell, { index: 1, props: blockProps, columns }), /* @__PURE__ */ React62.createElement(TableCell, { index: 2, props: blockProps, columns })))
544
+ /* @__PURE__ */ React63.createElement("tbody", { style: { width: "100%" } }, /* @__PURE__ */ React63.createElement("tr", { style: { width: "100%" } }, /* @__PURE__ */ React63.createElement(TableCell, { index: 0, props: blockProps, columns }), /* @__PURE__ */ React63.createElement(TableCell, { index: 1, props: blockProps, columns }), /* @__PURE__ */ React63.createElement(TableCell, { index: 2, props: blockProps, columns })))
536
545
  ));
537
546
  }
538
547
  function TableCell({ index, props, columns }) {
@@ -550,7 +559,7 @@ function TableCell({ index, props, columns }) {
550
559
  width: (_d = (_c = props.fixedWidths) == null ? void 0 : _c[index]) != null ? _d : void 0
551
560
  };
552
561
  const children = (_e = columns && columns[index]) != null ? _e : null;
553
- return /* @__PURE__ */ React62.createElement("td", { style }, children);
562
+ return /* @__PURE__ */ React63.createElement("td", { style }, children);
554
563
  }
555
564
  function getPaddingBefore(index, { columnsGap, columnsCount }) {
556
565
  if (index === 0) {
@@ -609,12 +618,13 @@ function Container({ style, children }) {
609
618
  backgroundColor: (_a = style == null ? void 0 : style.backgroundColor) != null ? _a : void 0,
610
619
  border: getBorder(style),
611
620
  borderRadius: (_b = style == null ? void 0 : style.borderRadius) != null ? _b : void 0,
621
+ overflow: (style == null ? void 0 : style.borderRadius) ? "hidden" : void 0,
612
622
  padding: getPadding5(style == null ? void 0 : style.padding)
613
623
  };
614
624
  if (!children) {
615
- return /* @__PURE__ */ React62.createElement("div", { style: wStyle });
625
+ return /* @__PURE__ */ React63.createElement("div", { style: wStyle });
616
626
  }
617
- return /* @__PURE__ */ React62.createElement("div", { style: wStyle }, children);
627
+ return /* @__PURE__ */ React63.createElement("div", { style: wStyle }, children);
618
628
  }
619
629
  var container_default = Container;
620
630
  var COLOR_SCHEMA5 = z.string().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional();
@@ -648,7 +658,7 @@ function Divider({ style, props }) {
648
658
  };
649
659
  const borderTopWidth = (_b = props == null ? void 0 : props.lineHeight) != null ? _b : DividerPropsDefaults.lineHeight;
650
660
  const borderTopColor = (_c = props == null ? void 0 : props.lineColor) != null ? _c : DividerPropsDefaults.lineColor;
651
- return /* @__PURE__ */ React62.createElement("div", { style: st }, /* @__PURE__ */ React62.createElement(
661
+ return /* @__PURE__ */ React63.createElement("div", { style: st }, /* @__PURE__ */ React63.createElement(
652
662
  "hr",
653
663
  {
654
664
  style: {
@@ -746,11 +756,11 @@ function Heading({ props, style }) {
746
756
  const renderProps = isMarkdown ? { style: hStyle, dangerouslySetInnerHTML: { __html: html2 != null ? html2 : "" } } : { style: hStyle, children: text };
747
757
  switch (level) {
748
758
  case "h1":
749
- return /* @__PURE__ */ React62.createElement("h1", __spreadValues({}, renderProps));
759
+ return /* @__PURE__ */ React63.createElement("h1", __spreadValues({}, renderProps));
750
760
  case "h2":
751
- return /* @__PURE__ */ React62.createElement("h2", __spreadValues({}, renderProps));
761
+ return /* @__PURE__ */ React63.createElement("h2", __spreadValues({}, renderProps));
752
762
  case "h3":
753
- return /* @__PURE__ */ React62.createElement("h3", __spreadValues({}, renderProps));
763
+ return /* @__PURE__ */ React63.createElement("h3", __spreadValues({}, renderProps));
754
764
  }
755
765
  }
756
766
  function getFontSize(level) {
@@ -832,9 +842,9 @@ function Html({ style, props }) {
832
842
  padding: getPadding8(style == null ? void 0 : style.padding)
833
843
  };
834
844
  if (!children) {
835
- return /* @__PURE__ */ React62.createElement("div", { style: cssStyle });
845
+ return /* @__PURE__ */ React63.createElement("div", { style: cssStyle });
836
846
  }
837
- return /* @__PURE__ */ React62.createElement("div", { style: cssStyle, dangerouslySetInnerHTML: { __html: children } });
847
+ return /* @__PURE__ */ React63.createElement("div", { style: cssStyle, dangerouslySetInnerHTML: { __html: children } });
838
848
  }
839
849
  var html_default = Html;
840
850
  var PADDING_SCHEMA9 = z.object({
@@ -870,7 +880,7 @@ function Image({ style, props }) {
870
880
  const linkHref = (_c = props == null ? void 0 : props.linkHref) != null ? _c : null;
871
881
  const width = (_d = props == null ? void 0 : props.width) != null ? _d : void 0;
872
882
  const height = (_e = props == null ? void 0 : props.height) != null ? _e : void 0;
873
- const imageElement = /* @__PURE__ */ React62.createElement(
883
+ const imageElement = /* @__PURE__ */ React63.createElement(
874
884
  "img",
875
885
  {
876
886
  alt: (_f = props == null ? void 0 : props.alt) != null ? _f : "",
@@ -890,9 +900,9 @@ function Image({ style, props }) {
890
900
  }
891
901
  );
892
902
  if (!linkHref) {
893
- return /* @__PURE__ */ React62.createElement("div", { style: sectionStyle }, imageElement);
903
+ return /* @__PURE__ */ React63.createElement("div", { style: sectionStyle }, imageElement);
894
904
  }
895
- return /* @__PURE__ */ React62.createElement("div", { style: sectionStyle }, /* @__PURE__ */ React62.createElement("a", { href: linkHref, style: { textDecoration: "none" }, target: "_blank" }, imageElement));
905
+ return /* @__PURE__ */ React63.createElement("div", { style: sectionStyle }, /* @__PURE__ */ React63.createElement("a", { href: linkHref, style: { textDecoration: "none" }, target: "_blank" }, imageElement));
896
906
  }
897
907
  var image_default = Image;
898
908
  var FONT_FAMILY_SCHEMA5 = z.enum([
@@ -1038,7 +1048,7 @@ function Signature({ style, props }) {
1038
1048
  color: linkColor,
1039
1049
  textDecoration: "none"
1040
1050
  };
1041
- const imageElement = imageUrl ? /* @__PURE__ */ React62.createElement(
1051
+ const imageElement = imageUrl ? /* @__PURE__ */ React63.createElement(
1042
1052
  "img",
1043
1053
  {
1044
1054
  src: imageUrl,
@@ -1057,18 +1067,18 @@ function Signature({ style, props }) {
1057
1067
  }
1058
1068
  ) : null;
1059
1069
  const contactParts = [];
1060
- if (email) contactParts.push(/* @__PURE__ */ React62.createElement("a", { key: "email", href: `mailto:${email}`, style: linkStyle }, email));
1061
- if (phone) contactParts.push(/* @__PURE__ */ React62.createElement("a", { key: "phone", href: `tel:${phone}`, style: linkStyle }, phone));
1070
+ if (email) contactParts.push(/* @__PURE__ */ React63.createElement("a", { key: "email", href: `mailto:${email}`, style: linkStyle }, email));
1071
+ if (phone) contactParts.push(/* @__PURE__ */ React63.createElement("a", { key: "phone", href: `tel:${phone}`, style: linkStyle }, phone));
1062
1072
  if (website) {
1063
1073
  const href = website.startsWith("http") ? website : `https://${website}`;
1064
- contactParts.push(/* @__PURE__ */ React62.createElement("a", { key: "website", href, style: linkStyle, target: "_blank" }, website));
1074
+ contactParts.push(/* @__PURE__ */ React63.createElement("a", { key: "website", href, style: linkStyle, target: "_blank" }, website));
1065
1075
  }
1066
- const textContent = /* @__PURE__ */ React62.createElement("div", null, name && /* @__PURE__ */ React62.createElement("p", { style: nameStyle }, name), title && /* @__PURE__ */ React62.createElement("p", { style: detailStyle }, title), company && /* @__PURE__ */ React62.createElement("p", { style: detailStyle }, company), address && /* @__PURE__ */ React62.createElement("p", { style: detailStyle }, address), contactParts.length > 0 && /* @__PURE__ */ React62.createElement("p", { style: __spreadProps(__spreadValues({}, detailStyle), { marginTop: 4 }) }, contactParts.map((part, i) => /* @__PURE__ */ React62.createElement(React62.Fragment, { key: i }, i > 0 && /* @__PURE__ */ React62.createElement("span", { style: detailStyle }, " \xB7 "), part))));
1067
- const greetingElement = greeting ? /* @__PURE__ */ React62.createElement("p", { style: greetingStyle }, greeting) : null;
1076
+ const textContent = /* @__PURE__ */ React63.createElement("div", null, name && /* @__PURE__ */ React63.createElement("p", { style: nameStyle }, name), title && /* @__PURE__ */ React63.createElement("p", { style: detailStyle }, title), company && /* @__PURE__ */ React63.createElement("p", { style: detailStyle }, company), address && /* @__PURE__ */ React63.createElement("p", { style: detailStyle }, address), contactParts.length > 0 && /* @__PURE__ */ React63.createElement("p", { style: __spreadProps(__spreadValues({}, detailStyle), { marginTop: 4 }) }, contactParts.map((part, i) => /* @__PURE__ */ React63.createElement(React63.Fragment, { key: i }, i > 0 && /* @__PURE__ */ React63.createElement("span", { style: detailStyle }, " \xB7 "), part))));
1077
+ const greetingElement = greeting ? /* @__PURE__ */ React63.createElement("p", { style: greetingStyle }, greeting) : null;
1068
1078
  if (layout === "vertical") {
1069
- return /* @__PURE__ */ React62.createElement("div", { style: wrapperStyle }, greetingElement, imageElement && /* @__PURE__ */ React62.createElement("div", { style: { marginBottom: 12 } }, imageElement), textContent);
1079
+ return /* @__PURE__ */ React63.createElement("div", { style: wrapperStyle }, greetingElement, imageElement && /* @__PURE__ */ React63.createElement("div", { style: { marginBottom: 12 } }, imageElement), textContent);
1070
1080
  }
1071
- return /* @__PURE__ */ React62.createElement("div", { style: wrapperStyle }, greetingElement, /* @__PURE__ */ React62.createElement("table", { cellPadding: "0", cellSpacing: "0", border: 0, role: "presentation" }, /* @__PURE__ */ React62.createElement("tbody", null, /* @__PURE__ */ React62.createElement("tr", null, imageElement && /* @__PURE__ */ React62.createElement("td", { style: { verticalAlign: "middle", paddingRight: 16 } }, imageElement), /* @__PURE__ */ React62.createElement("td", { style: { verticalAlign: "middle" } }, textContent)))));
1081
+ return /* @__PURE__ */ React63.createElement("div", { style: wrapperStyle }, greetingElement, /* @__PURE__ */ React63.createElement("table", { cellPadding: "0", cellSpacing: "0", border: 0, role: "presentation" }, /* @__PURE__ */ React63.createElement("tbody", null, /* @__PURE__ */ React63.createElement("tr", null, imageElement && /* @__PURE__ */ React63.createElement("td", { style: { verticalAlign: "middle", paddingRight: 16 } }, imageElement), /* @__PURE__ */ React63.createElement("td", { style: { verticalAlign: "middle" } }, textContent)))));
1072
1082
  }
1073
1083
  var signature_default = Signature;
1074
1084
  var SpacerPropsSchema = z.object({
@@ -1085,13 +1095,13 @@ function Spacer({ props }) {
1085
1095
  const style = {
1086
1096
  height: (_a = props == null ? void 0 : props.height) != null ? _a : SpacerPropsDefaults.height
1087
1097
  };
1088
- return /* @__PURE__ */ React62.createElement("div", { style });
1098
+ return /* @__PURE__ */ React63.createElement("div", { style });
1089
1099
  }
1090
1100
  var spacer_default = Spacer;
1091
1101
  function buildBlockComponent(blocks) {
1092
1102
  return function BlockComponent({ type, data }) {
1093
1103
  const Component = blocks[type].Component;
1094
- return /* @__PURE__ */ React62.createElement(Component, __spreadValues({}, data));
1104
+ return /* @__PURE__ */ React63.createElement(Component, __spreadValues({}, data));
1095
1105
  };
1096
1106
  }
1097
1107
  function buildBlockConfigurationSchema(blocks) {
@@ -1160,9 +1170,9 @@ function ColumnsContainerReader({ style, props }) {
1160
1170
  const _a = props != null ? props : {}, { columns } = _a, restProps = __objRest(_a, ["columns"]);
1161
1171
  let cols = void 0;
1162
1172
  if (columns) {
1163
- cols = columns.map((col) => col.childrenIds.map((childId) => /* @__PURE__ */ React62.createElement(ReaderBlock, { key: childId, id: childId })));
1173
+ cols = columns.map((col) => col.childrenIds.map((childId) => /* @__PURE__ */ React63.createElement(ReaderBlock, { key: childId, id: childId })));
1164
1174
  }
1165
- return /* @__PURE__ */ React62.createElement(columns_container_default, { props: restProps, columns: cols, style });
1175
+ return /* @__PURE__ */ React63.createElement(columns_container_default, { props: restProps, columns: cols, style });
1166
1176
  }
1167
1177
  var ContainerPropsSchema2 = z.object({
1168
1178
  style: ContainerPropsSchema.shape.style,
@@ -1173,7 +1183,7 @@ var ContainerPropsSchema2 = z.object({
1173
1183
  function ContainerReader({ style, props }) {
1174
1184
  var _a;
1175
1185
  const childrenIds = (_a = props == null ? void 0 : props.childrenIds) != null ? _a : [];
1176
- return /* @__PURE__ */ React62.createElement(container_default, { style }, childrenIds.map((childId) => /* @__PURE__ */ React62.createElement(ReaderBlock, { key: childId, id: childId })));
1186
+ return /* @__PURE__ */ React63.createElement(container_default, { style }, childrenIds.map((childId) => /* @__PURE__ */ React63.createElement(ReaderBlock, { key: childId, id: childId })));
1177
1187
  }
1178
1188
  var COLOR_SCHEMA9 = z.string().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional();
1179
1189
  var FONT_FAMILY_SCHEMA6 = z.enum([
@@ -1246,9 +1256,9 @@ function EmailLayoutReader(props) {
1246
1256
  margin: "0"
1247
1257
  };
1248
1258
  if (props.backdropDisabled) {
1249
- return /* @__PURE__ */ React62.createElement("div", { style: baseStyle }, childrenIds.map((childId) => /* @__PURE__ */ React62.createElement(ReaderBlock, { key: childId, id: childId })));
1259
+ return /* @__PURE__ */ React63.createElement("div", { style: baseStyle }, childrenIds.map((childId) => /* @__PURE__ */ React63.createElement(ReaderBlock, { key: childId, id: childId })));
1250
1260
  }
1251
- return /* @__PURE__ */ React62.createElement(
1261
+ return /* @__PURE__ */ React63.createElement(
1252
1262
  "div",
1253
1263
  {
1254
1264
  style: __spreadProps(__spreadValues({}, baseStyle), {
@@ -1258,7 +1268,7 @@ function EmailLayoutReader(props) {
1258
1268
  width: "100%"
1259
1269
  })
1260
1270
  },
1261
- /* @__PURE__ */ React62.createElement(
1271
+ /* @__PURE__ */ React63.createElement(
1262
1272
  "table",
1263
1273
  {
1264
1274
  align: "center",
@@ -1276,7 +1286,7 @@ function EmailLayoutReader(props) {
1276
1286
  cellPadding: "0",
1277
1287
  border: 0
1278
1288
  },
1279
- /* @__PURE__ */ React62.createElement("tbody", null, /* @__PURE__ */ React62.createElement("tr", { style: { width: "100%" } }, /* @__PURE__ */ React62.createElement("td", null, childrenIds.map((childId) => /* @__PURE__ */ React62.createElement(ReaderBlock, { key: childId, id: childId })))))
1289
+ /* @__PURE__ */ React63.createElement("tbody", null, /* @__PURE__ */ React63.createElement("tr", { style: { width: "100%" } }, /* @__PURE__ */ React63.createElement("td", null, childrenIds.map((childId) => /* @__PURE__ */ React63.createElement(ReaderBlock, { key: childId, id: childId })))))
1280
1290
  )
1281
1291
  );
1282
1292
  }
@@ -1288,7 +1298,7 @@ function useReaderDocument() {
1288
1298
  }
1289
1299
  function ReaderBlock({ id }) {
1290
1300
  const document2 = useReaderDocument();
1291
- return document2[id] ? /* @__PURE__ */ React62.createElement(BaseReaderBlock, __spreadValues({}, document2[id])) : null;
1301
+ return document2[id] ? /* @__PURE__ */ React63.createElement(BaseReaderBlock, __spreadValues({}, document2[id])) : null;
1292
1302
  }
1293
1303
  var READER_DICTIONARY = buildBlockConfigurationDictionary({
1294
1304
  ColumnsContainer: {
@@ -1345,13 +1355,13 @@ var ReaderBlockSchema = buildBlockConfigurationSchema(READER_DICTIONARY);
1345
1355
  var ReaderDocumentSchema = z.record(z.string(), ReaderBlockSchema);
1346
1356
  var BaseReaderBlock = buildBlockComponent(READER_DICTIONARY);
1347
1357
  function Reader({ document: document2, rootBlockId }) {
1348
- return /* @__PURE__ */ React62.createElement(ReaderContext.Provider, { value: document2 }, /* @__PURE__ */ React62.createElement(ReaderBlock, { id: rootBlockId }));
1358
+ return /* @__PURE__ */ React63.createElement(ReaderContext.Provider, { value: document2 }, /* @__PURE__ */ React63.createElement(ReaderBlock, { id: rootBlockId }));
1349
1359
  }
1350
1360
 
1351
1361
  // src/email-builder/renderers/render-to-static-markup.tsx
1352
1362
  function renderToStaticMarkup(document2, { rootBlockId, variables }) {
1353
1363
  const html2 = "<!DOCTYPE html>" + renderToStaticMarkup$1(
1354
- /* @__PURE__ */ React62.createElement("html", null, /* @__PURE__ */ React62.createElement("body", null, /* @__PURE__ */ React62.createElement(Reader, { document: document2, rootBlockId })))
1364
+ /* @__PURE__ */ React63.createElement("html", null, /* @__PURE__ */ React63.createElement("body", null, /* @__PURE__ */ React63.createElement(Reader, { document: document2, rootBlockId })))
1355
1365
  );
1356
1366
  if (!variables) return html2;
1357
1367
  return evaluateHandlebars(html2, variables);
@@ -2298,7 +2308,7 @@ var EmailEditorProvider = ({
2298
2308
  setCurrentTemplateTags
2299
2309
  ]
2300
2310
  );
2301
- return /* @__PURE__ */ React62.createElement(EmailEditorContext.Provider, { value }, children);
2311
+ return /* @__PURE__ */ React63.createElement(EmailEditorContext.Provider, { value }, children);
2302
2312
  };
2303
2313
  var useEmailEditor = () => {
2304
2314
  const context = useContext(EmailEditorContext);
@@ -2307,12 +2317,22 @@ var useEmailEditor = () => {
2307
2317
  }
2308
2318
  return context;
2309
2319
  };
2320
+ var EditorConfigContext = createContext({});
2321
+ function EditorConfigProvider({
2322
+ config,
2323
+ children
2324
+ }) {
2325
+ return /* @__PURE__ */ React63.createElement(EditorConfigContext.Provider, { value: config }, children);
2326
+ }
2327
+ function useEditorConfig() {
2328
+ return useContext(EditorConfigContext);
2329
+ }
2310
2330
  var ImageCallbacksContext = createContext({});
2311
2331
  function ImageCallbacksProvider({
2312
2332
  callbacks,
2313
2333
  children
2314
2334
  }) {
2315
- return /* @__PURE__ */ React62.createElement(ImageCallbacksContext.Provider, { value: callbacks }, children);
2335
+ return /* @__PURE__ */ React63.createElement(ImageCallbacksContext.Provider, { value: callbacks }, children);
2316
2336
  }
2317
2337
  function useImageCallbacks() {
2318
2338
  return useContext(ImageCallbacksContext);
@@ -2338,14 +2358,14 @@ var TITLE_KEYS = {
2338
2358
  function BaseSidebarPanel({ title, children }) {
2339
2359
  const key = TITLE_KEYS[title];
2340
2360
  const displayTitle = key ? t(key, title) : title;
2341
- return /* @__PURE__ */ React62.createElement(Box, { p: 2 }, /* @__PURE__ */ React62.createElement(Typography, { variant: "overline", color: "text.secondary", sx: { display: "block", mb: 2 } }, displayTitle), /* @__PURE__ */ React62.createElement(Stack, { spacing: 5, mb: 3 }, children));
2361
+ return /* @__PURE__ */ React63.createElement(Box, { p: 2 }, /* @__PURE__ */ React63.createElement(Typography, { variant: "overline", color: "text.secondary", sx: { display: "block", mb: 2 } }, displayTitle), /* @__PURE__ */ React63.createElement(Stack, { spacing: 5, mb: 3 }, children));
2342
2362
  }
2343
2363
  function RadioGroupInput({ label, children, defaultValue, onChange }) {
2344
2364
  const [value, setValue] = useState(defaultValue);
2345
2365
  useEffect(() => {
2346
2366
  setValue(defaultValue);
2347
2367
  }, [defaultValue]);
2348
- return /* @__PURE__ */ React62.createElement(Stack, { alignItems: "flex-start" }, /* @__PURE__ */ React62.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React62.createElement(
2368
+ return /* @__PURE__ */ React63.createElement(Stack, { alignItems: "flex-start" }, /* @__PURE__ */ React63.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React63.createElement(
2349
2369
  ToggleButtonGroup,
2350
2370
  {
2351
2371
  exclusive: true,
@@ -2365,7 +2385,7 @@ function RadioGroupInput({ label, children, defaultValue, onChange }) {
2365
2385
  }
2366
2386
  function RawSliderInput(_a) {
2367
2387
  var _b = _a, { iconLabel, value, setValue, units } = _b, props = __objRest(_b, ["iconLabel", "value", "setValue", "units"]);
2368
- return /* @__PURE__ */ React62.createElement(Stack, { direction: "row", alignItems: "center", spacing: 2, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React62.createElement(Box, { sx: { minWidth: 24, lineHeight: 1, flexShrink: 0 } }, iconLabel), /* @__PURE__ */ React62.createElement(
2388
+ return /* @__PURE__ */ React63.createElement(Stack, { direction: "row", alignItems: "center", spacing: 2, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React63.createElement(Box, { sx: { minWidth: 24, lineHeight: 1, flexShrink: 0 } }, iconLabel), /* @__PURE__ */ React63.createElement(
2369
2389
  Slider,
2370
2390
  __spreadProps(__spreadValues({}, props), {
2371
2391
  value,
@@ -2376,14 +2396,14 @@ function RawSliderInput(_a) {
2376
2396
  setValue(value2);
2377
2397
  }
2378
2398
  })
2379
- ), /* @__PURE__ */ React62.createElement(Box, { sx: { minWidth: 32, textAlign: "right", flexShrink: 0 } }, /* @__PURE__ */ React62.createElement(Typography, { variant: "body2", color: "text.secondary", sx: { lineHeight: 1 } }, value, units)));
2399
+ ), /* @__PURE__ */ React63.createElement(Box, { sx: { minWidth: 32, textAlign: "right", flexShrink: 0 } }, /* @__PURE__ */ React63.createElement(Typography, { variant: "body2", color: "text.secondary", sx: { lineHeight: 1 } }, value, units)));
2380
2400
  }
2381
2401
 
2382
2402
  // src/app/inspector-drawer/configuration-panel/input-panels/helpers/inputs/slider-input.tsx
2383
2403
  function SliderInput(_a) {
2384
2404
  var _b = _a, { label, defaultValue, onChange } = _b, props = __objRest(_b, ["label", "defaultValue", "onChange"]);
2385
2405
  const [value, setValue] = useState(defaultValue);
2386
- return /* @__PURE__ */ React62.createElement(Stack, { spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React62.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React62.createElement(
2406
+ return /* @__PURE__ */ React63.createElement(Stack, { spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React63.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React63.createElement(
2387
2407
  RawSliderInput,
2388
2408
  __spreadValues({
2389
2409
  value,
@@ -2400,7 +2420,7 @@ function TextInput({ helperText, label, placeholder, rows, InputProps: InputProp
2400
2420
  useEffect(() => {
2401
2421
  setValue(defaultValue);
2402
2422
  }, [defaultValue]);
2403
- return /* @__PURE__ */ React62.createElement(
2423
+ return /* @__PURE__ */ React63.createElement(
2404
2424
  TextField,
2405
2425
  {
2406
2426
  fullWidth: true,
@@ -2426,7 +2446,7 @@ var TILE_BUTTON = {
2426
2446
  };
2427
2447
  function Swatch({ paletteColors, value, onChange }) {
2428
2448
  const renderButton2 = (colorValue) => {
2429
- return /* @__PURE__ */ React62.createElement(
2449
+ return /* @__PURE__ */ React63.createElement(
2430
2450
  Button$1,
2431
2451
  {
2432
2452
  key: colorValue,
@@ -2445,7 +2465,7 @@ function Swatch({ paletteColors, value, onChange }) {
2445
2465
  }
2446
2466
  );
2447
2467
  };
2448
- return /* @__PURE__ */ React62.createElement(Box, { width: "100%", sx: { display: "grid", gap: 1, gridTemplateColumns: "1fr 1fr 1fr 1fr 1fr 1fr" } }, paletteColors.map((c) => renderButton2(c)));
2468
+ return /* @__PURE__ */ React63.createElement(Box, { width: "100%", sx: { display: "grid", gap: 1, gridTemplateColumns: "1fr 1fr 1fr 1fr 1fr 1fr" } }, paletteColors.map((c) => renderButton2(c)));
2449
2469
  }
2450
2470
 
2451
2471
  // src/app/inspector-drawer/configuration-panel/input-panels/helpers/inputs/color-input/picker.tsx
@@ -2512,7 +2532,9 @@ var SX = {
2512
2532
  }
2513
2533
  };
2514
2534
  function Picker({ value, onChange }) {
2515
- return /* @__PURE__ */ React62.createElement(Stack, { spacing: 1, sx: SX }, /* @__PURE__ */ React62.createElement(HexColorPicker, { color: value, onChange }), /* @__PURE__ */ React62.createElement(Swatch, { paletteColors: DEFAULT_PRESET_COLORS, value, onChange }), /* @__PURE__ */ React62.createElement(Box, { pt: 1 }, /* @__PURE__ */ React62.createElement(HexColorInput, { prefixed: true, color: value, onChange })));
2535
+ const { favoriteColors } = useEditorConfig();
2536
+ const hasFavorites = favoriteColors && favoriteColors.length > 0;
2537
+ return /* @__PURE__ */ React63.createElement(Stack, { spacing: 1, sx: SX }, /* @__PURE__ */ React63.createElement(HexColorPicker, { color: value, onChange }), hasFavorites && /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(Swatch, { paletteColors: favoriteColors, value, onChange }), /* @__PURE__ */ React63.createElement(Divider$1, null)), /* @__PURE__ */ React63.createElement(Swatch, { paletteColors: DEFAULT_PRESET_COLORS, value, onChange }), /* @__PURE__ */ React63.createElement(Box, { pt: 1 }, /* @__PURE__ */ React63.createElement(HexColorInput, { prefixed: true, color: value, onChange })));
2516
2538
  }
2517
2539
 
2518
2540
  // src/app/inspector-drawer/configuration-panel/input-panels/helpers/inputs/color-input/base-color-input.tsx
@@ -2537,7 +2559,7 @@ function ColorInput({ label, defaultValue, onChange, nullable }) {
2537
2559
  if (typeof value !== "string" || value.trim().length === 0) {
2538
2560
  return null;
2539
2561
  }
2540
- return /* @__PURE__ */ React62.createElement(
2562
+ return /* @__PURE__ */ React63.createElement(
2541
2563
  ButtonBase,
2542
2564
  {
2543
2565
  onClick: () => {
@@ -2545,16 +2567,16 @@ function ColorInput({ label, defaultValue, onChange, nullable }) {
2545
2567
  onChange(null);
2546
2568
  }
2547
2569
  },
2548
- /* @__PURE__ */ React62.createElement(CloseOutlined, { fontSize: "small", sx: { color: "grey.600" } })
2570
+ /* @__PURE__ */ React63.createElement(CloseOutlined, { fontSize: "small", sx: { color: "grey.600" } })
2549
2571
  );
2550
2572
  };
2551
2573
  const renderOpenButton = () => {
2552
2574
  if (value) {
2553
- return /* @__PURE__ */ React62.createElement(ButtonBase, { onClick: handleClickOpen, sx: __spreadProps(__spreadValues({}, BUTTON_SX), { bgcolor: value }) });
2575
+ return /* @__PURE__ */ React63.createElement(ButtonBase, { onClick: handleClickOpen, sx: __spreadProps(__spreadValues({}, BUTTON_SX), { bgcolor: value }) });
2554
2576
  }
2555
- return /* @__PURE__ */ React62.createElement(ButtonBase, { onClick: handleClickOpen, sx: __spreadValues({}, BUTTON_SX) }, /* @__PURE__ */ React62.createElement(AddOutlined, { fontSize: "small" }));
2577
+ return /* @__PURE__ */ React63.createElement(ButtonBase, { onClick: handleClickOpen, sx: __spreadValues({}, BUTTON_SX) }, /* @__PURE__ */ React63.createElement(AddOutlined, { fontSize: "small" }));
2556
2578
  };
2557
- return /* @__PURE__ */ React62.createElement(Stack, { alignItems: "flex-start" }, /* @__PURE__ */ React62.createElement(InputLabel, { sx: { mb: 0.5 } }, label), /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 1 }, renderOpenButton(), renderResetButton()), /* @__PURE__ */ React62.createElement(
2579
+ return /* @__PURE__ */ React63.createElement(Stack, { alignItems: "flex-start" }, /* @__PURE__ */ React63.createElement(InputLabel, { sx: { mb: 0.5 } }, label), /* @__PURE__ */ React63.createElement(Stack, { direction: "row", spacing: 1 }, renderOpenButton(), renderResetButton()), /* @__PURE__ */ React63.createElement(
2558
2580
  Menu,
2559
2581
  {
2560
2582
  anchorEl,
@@ -2564,7 +2586,7 @@ function ColorInput({ label, defaultValue, onChange, nullable }) {
2564
2586
  sx: { height: "auto", padding: 0 }
2565
2587
  }
2566
2588
  },
2567
- /* @__PURE__ */ React62.createElement(
2589
+ /* @__PURE__ */ React63.createElement(
2568
2590
  Picker,
2569
2591
  {
2570
2592
  value: value || "",
@@ -2579,10 +2601,10 @@ function ColorInput({ label, defaultValue, onChange, nullable }) {
2579
2601
 
2580
2602
  // src/app/inspector-drawer/configuration-panel/input-panels/helpers/inputs/color-input/index.tsx
2581
2603
  function ColorInput2(props) {
2582
- return /* @__PURE__ */ React62.createElement(ColorInput, __spreadProps(__spreadValues({}, props), { nullable: false }));
2604
+ return /* @__PURE__ */ React63.createElement(ColorInput, __spreadProps(__spreadValues({}, props), { nullable: false }));
2583
2605
  }
2584
2606
  function NullableColorInput(props) {
2585
- return /* @__PURE__ */ React62.createElement(ColorInput, __spreadProps(__spreadValues({}, props), { nullable: true }));
2607
+ return /* @__PURE__ */ React63.createElement(ColorInput, __spreadProps(__spreadValues({}, props), { nullable: true }));
2586
2608
  }
2587
2609
 
2588
2610
  // src/editor/blocks/helpers/font-family.ts
@@ -2640,7 +2662,7 @@ function NullableFontFamily({ label, onChange, defaultValue }) {
2640
2662
  useEffect(() => {
2641
2663
  setValue(defaultValue != null ? defaultValue : "inherit");
2642
2664
  }, [defaultValue]);
2643
- return /* @__PURE__ */ React62.createElement(
2665
+ return /* @__PURE__ */ React63.createElement(
2644
2666
  TextField,
2645
2667
  {
2646
2668
  select: true,
@@ -2653,8 +2675,8 @@ function NullableFontFamily({ label, onChange, defaultValue }) {
2653
2675
  onChange(v === null ? null : v);
2654
2676
  }
2655
2677
  },
2656
- /* @__PURE__ */ React62.createElement(MenuItem, { value: "inherit" }, t("font-family.inherit", "Match email settings")),
2657
- FONT_FAMILIES.map((option) => /* @__PURE__ */ React62.createElement(MenuItem, { key: option.key, value: option.key, sx: { fontFamily: option.value } }, t(`font-family.${option.key.toLowerCase()}`, option.label)))
2678
+ /* @__PURE__ */ React63.createElement(MenuItem, { value: "inherit" }, t("font-family.inherit", "Match email settings")),
2679
+ FONT_FAMILIES.map((option) => /* @__PURE__ */ React63.createElement(MenuItem, { key: option.key, value: option.key, sx: { fontFamily: option.value } }, t(`font-family.${option.key.toLowerCase()}`, option.label)))
2658
2680
  );
2659
2681
  }
2660
2682
  function FontSizeInput({ label, defaultValue, onChange }) {
@@ -2666,10 +2688,10 @@ function FontSizeInput({ label, defaultValue, onChange }) {
2666
2688
  setValue(value2);
2667
2689
  onChange(value2);
2668
2690
  };
2669
- return /* @__PURE__ */ React62.createElement(Stack, { spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React62.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React62.createElement(
2691
+ return /* @__PURE__ */ React63.createElement(Stack, { spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React63.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React63.createElement(
2670
2692
  RawSliderInput,
2671
2693
  {
2672
- iconLabel: /* @__PURE__ */ React62.createElement(TextFieldsOutlined, { sx: { fontSize: 16 } }),
2694
+ iconLabel: /* @__PURE__ */ React63.createElement(TextFieldsOutlined, { sx: { fontSize: 16 } }),
2673
2695
  value,
2674
2696
  setValue: handleChange,
2675
2697
  units: "px",
@@ -2684,7 +2706,7 @@ function FontWeightInput({ label, defaultValue, onChange }) {
2684
2706
  useEffect(() => {
2685
2707
  setValue(defaultValue);
2686
2708
  }, [defaultValue]);
2687
- return /* @__PURE__ */ React62.createElement(
2709
+ return /* @__PURE__ */ React63.createElement(
2688
2710
  RadioGroupInput,
2689
2711
  {
2690
2712
  label,
@@ -2694,8 +2716,8 @@ function FontWeightInput({ label, defaultValue, onChange }) {
2694
2716
  onChange(fontWeight);
2695
2717
  }
2696
2718
  },
2697
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "normal" }, t("font-weight.regular", "Regular")),
2698
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "bold" }, t("font-weight.bold", "Bold"))
2719
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "normal" }, t("font-weight.regular", "Regular")),
2720
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "bold" }, t("font-weight.bold", "Bold"))
2699
2721
  );
2700
2722
  }
2701
2723
  function LetterSpacingInput({ label, defaultValue, onChange }) {
@@ -2707,10 +2729,10 @@ function LetterSpacingInput({ label, defaultValue, onChange }) {
2707
2729
  setValue(v);
2708
2730
  onChange(v === 0 ? null : v);
2709
2731
  };
2710
- return /* @__PURE__ */ React62.createElement(Stack, { spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React62.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React62.createElement(
2732
+ return /* @__PURE__ */ React63.createElement(Stack, { spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React63.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React63.createElement(
2711
2733
  RawSliderInput,
2712
2734
  {
2713
- iconLabel: /* @__PURE__ */ React62.createElement(SpaceBarOutlined, { sx: { fontSize: 16 } }),
2735
+ iconLabel: /* @__PURE__ */ React63.createElement(SpaceBarOutlined, { sx: { fontSize: 16 } }),
2714
2736
  value,
2715
2737
  setValue: handleChange,
2716
2738
  units: "px",
@@ -2729,10 +2751,10 @@ function LineHeightInput({ label, defaultValue, onChange }) {
2729
2751
  setValue(v);
2730
2752
  onChange(v === 0 ? null : v);
2731
2753
  };
2732
- return /* @__PURE__ */ React62.createElement(Stack, { spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React62.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React62.createElement(
2754
+ return /* @__PURE__ */ React63.createElement(Stack, { spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React63.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React63.createElement(
2733
2755
  RawSliderInput,
2734
2756
  {
2735
- iconLabel: /* @__PURE__ */ React62.createElement(FormatLineSpacingOutlined, { sx: { fontSize: 16 } }),
2757
+ iconLabel: /* @__PURE__ */ React63.createElement(FormatLineSpacingOutlined, { sx: { fontSize: 16 } }),
2736
2758
  value,
2737
2759
  setValue: handleChange,
2738
2760
  units: "",
@@ -2761,10 +2783,10 @@ function PaddingInput({ label, defaultValue, onChange }) {
2761
2783
  setValue(v);
2762
2784
  onChange(v);
2763
2785
  }
2764
- return /* @__PURE__ */ React62.createElement(Stack, { spacing: 2, alignItems: "flex-start", pb: 1 }, /* @__PURE__ */ React62.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React62.createElement(
2786
+ return /* @__PURE__ */ React63.createElement(Stack, { spacing: 2, alignItems: "flex-start", pb: 1 }, /* @__PURE__ */ React63.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React63.createElement(
2765
2787
  RawSliderInput,
2766
2788
  {
2767
- iconLabel: /* @__PURE__ */ React62.createElement(AlignVerticalTopOutlined, { sx: { fontSize: 16 } }),
2789
+ iconLabel: /* @__PURE__ */ React63.createElement(AlignVerticalTopOutlined, { sx: { fontSize: 16 } }),
2768
2790
  value: value.top,
2769
2791
  setValue: (num) => handleChange("top", num),
2770
2792
  units: "px",
@@ -2773,10 +2795,10 @@ function PaddingInput({ label, defaultValue, onChange }) {
2773
2795
  max: 80,
2774
2796
  marks: true
2775
2797
  }
2776
- ), /* @__PURE__ */ React62.createElement(
2798
+ ), /* @__PURE__ */ React63.createElement(
2777
2799
  RawSliderInput,
2778
2800
  {
2779
- iconLabel: /* @__PURE__ */ React62.createElement(AlignVerticalBottomOutlined, { sx: { fontSize: 16 } }),
2801
+ iconLabel: /* @__PURE__ */ React63.createElement(AlignVerticalBottomOutlined, { sx: { fontSize: 16 } }),
2780
2802
  value: value.bottom,
2781
2803
  setValue: (num) => handleChange("bottom", num),
2782
2804
  units: "px",
@@ -2785,10 +2807,10 @@ function PaddingInput({ label, defaultValue, onChange }) {
2785
2807
  max: 80,
2786
2808
  marks: true
2787
2809
  }
2788
- ), /* @__PURE__ */ React62.createElement(
2810
+ ), /* @__PURE__ */ React63.createElement(
2789
2811
  RawSliderInput,
2790
2812
  {
2791
- iconLabel: /* @__PURE__ */ React62.createElement(AlignHorizontalLeftOutlined, { sx: { fontSize: 16 } }),
2813
+ iconLabel: /* @__PURE__ */ React63.createElement(AlignHorizontalLeftOutlined, { sx: { fontSize: 16 } }),
2792
2814
  value: value.left,
2793
2815
  setValue: (num) => handleChange("left", num),
2794
2816
  units: "px",
@@ -2797,10 +2819,10 @@ function PaddingInput({ label, defaultValue, onChange }) {
2797
2819
  max: 80,
2798
2820
  marks: true
2799
2821
  }
2800
- ), /* @__PURE__ */ React62.createElement(
2822
+ ), /* @__PURE__ */ React63.createElement(
2801
2823
  RawSliderInput,
2802
2824
  {
2803
- iconLabel: /* @__PURE__ */ React62.createElement(AlignHorizontalRightOutlined, { sx: { fontSize: 16 } }),
2825
+ iconLabel: /* @__PURE__ */ React63.createElement(AlignHorizontalRightOutlined, { sx: { fontSize: 16 } }),
2804
2826
  value: value.right,
2805
2827
  setValue: (num) => handleChange("right", num),
2806
2828
  units: "px",
@@ -2816,7 +2838,7 @@ function TextAlignInput({ label, defaultValue, onChange }) {
2816
2838
  useEffect(() => {
2817
2839
  setValue(defaultValue != null ? defaultValue : "left");
2818
2840
  }, [defaultValue]);
2819
- return /* @__PURE__ */ React62.createElement(
2841
+ return /* @__PURE__ */ React63.createElement(
2820
2842
  RadioGroupInput,
2821
2843
  {
2822
2844
  label,
@@ -2826,9 +2848,9 @@ function TextAlignInput({ label, defaultValue, onChange }) {
2826
2848
  onChange(value2);
2827
2849
  }
2828
2850
  },
2829
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "left" }, /* @__PURE__ */ React62.createElement(FormatAlignLeftOutlined, { fontSize: "small" })),
2830
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "center" }, /* @__PURE__ */ React62.createElement(FormatAlignCenterOutlined, { fontSize: "small" })),
2831
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "right" }, /* @__PURE__ */ React62.createElement(FormatAlignRightOutlined, { fontSize: "small" }))
2851
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "left" }, /* @__PURE__ */ React63.createElement(FormatAlignLeftOutlined, { fontSize: "small" })),
2852
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "center" }, /* @__PURE__ */ React63.createElement(FormatAlignCenterOutlined, { fontSize: "small" })),
2853
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "right" }, /* @__PURE__ */ React63.createElement(FormatAlignRightOutlined, { fontSize: "small" }))
2832
2854
  );
2833
2855
  }
2834
2856
 
@@ -2841,14 +2863,14 @@ function SingleStylePropertyPanel({ name, value, onChange }) {
2841
2863
  };
2842
2864
  switch (name) {
2843
2865
  case "backgroundColor":
2844
- return /* @__PURE__ */ React62.createElement(NullableColorInput, { label: t("style.background-color", "Background color"), defaultValue, onChange: handleChange });
2866
+ return /* @__PURE__ */ React63.createElement(NullableColorInput, { label: t("style.background-color", "Background color"), defaultValue, onChange: handleChange });
2845
2867
  case "borderColor":
2846
- return /* @__PURE__ */ React62.createElement(NullableColorInput, { label: t("style.border-color", "Border color"), defaultValue, onChange: handleChange });
2868
+ return /* @__PURE__ */ React63.createElement(NullableColorInput, { label: t("style.border-color", "Border color"), defaultValue, onChange: handleChange });
2847
2869
  case "borderRadius":
2848
- return /* @__PURE__ */ React62.createElement(
2870
+ return /* @__PURE__ */ React63.createElement(
2849
2871
  SliderInput,
2850
2872
  {
2851
- iconLabel: /* @__PURE__ */ React62.createElement(RoundedCornerOutlined, null),
2873
+ iconLabel: /* @__PURE__ */ React63.createElement(RoundedCornerOutlined, null),
2852
2874
  units: "px",
2853
2875
  step: 4,
2854
2876
  marks: true,
@@ -2860,27 +2882,27 @@ function SingleStylePropertyPanel({ name, value, onChange }) {
2860
2882
  }
2861
2883
  );
2862
2884
  case "color":
2863
- return /* @__PURE__ */ React62.createElement(NullableColorInput, { label: t("style.text-color", "Text color"), defaultValue, onChange: handleChange });
2885
+ return /* @__PURE__ */ React63.createElement(NullableColorInput, { label: t("style.text-color", "Text color"), defaultValue, onChange: handleChange });
2864
2886
  case "fontFamily":
2865
- return /* @__PURE__ */ React62.createElement(NullableFontFamily, { label: t("style.font-family", "Font family"), defaultValue, onChange: handleChange });
2887
+ return /* @__PURE__ */ React63.createElement(NullableFontFamily, { label: t("style.font-family", "Font family"), defaultValue, onChange: handleChange });
2866
2888
  case "fontSize":
2867
- return /* @__PURE__ */ React62.createElement(FontSizeInput, { label: t("style.font-size", "Font size"), defaultValue, onChange: handleChange });
2889
+ return /* @__PURE__ */ React63.createElement(FontSizeInput, { label: t("style.font-size", "Font size"), defaultValue, onChange: handleChange });
2868
2890
  case "fontWeight":
2869
- return /* @__PURE__ */ React62.createElement(FontWeightInput, { label: t("style.font-weight", "Font weight"), defaultValue, onChange: handleChange });
2891
+ return /* @__PURE__ */ React63.createElement(FontWeightInput, { label: t("style.font-weight", "Font weight"), defaultValue, onChange: handleChange });
2870
2892
  case "lineHeight":
2871
- return /* @__PURE__ */ React62.createElement(LineHeightInput, { label: t("style.line-height", "Line height"), defaultValue, onChange: handleChange });
2893
+ return /* @__PURE__ */ React63.createElement(LineHeightInput, { label: t("style.line-height", "Line height"), defaultValue, onChange: handleChange });
2872
2894
  case "letterSpacing":
2873
- return /* @__PURE__ */ React62.createElement(LetterSpacingInput, { label: t("style.letter-spacing", "Letter spacing"), defaultValue, onChange: handleChange });
2895
+ return /* @__PURE__ */ React63.createElement(LetterSpacingInput, { label: t("style.letter-spacing", "Letter spacing"), defaultValue, onChange: handleChange });
2874
2896
  case "textAlign":
2875
- return /* @__PURE__ */ React62.createElement(TextAlignInput, { label: t("style.alignment", "Alignment"), defaultValue, onChange: handleChange });
2897
+ return /* @__PURE__ */ React63.createElement(TextAlignInput, { label: t("style.alignment", "Alignment"), defaultValue, onChange: handleChange });
2876
2898
  case "padding":
2877
- return /* @__PURE__ */ React62.createElement(PaddingInput, { label: t("style.padding", "Padding"), defaultValue, onChange: handleChange });
2899
+ return /* @__PURE__ */ React63.createElement(PaddingInput, { label: t("style.padding", "Padding"), defaultValue, onChange: handleChange });
2878
2900
  }
2879
2901
  }
2880
2902
 
2881
2903
  // src/app/inspector-drawer/configuration-panel/input-panels/helpers/style-inputs/multi-style-property-panel.tsx
2882
2904
  function MultiStylePropertyPanel({ names, value, onChange }) {
2883
- return /* @__PURE__ */ React62.createElement(React62.Fragment, null, names.map((name) => /* @__PURE__ */ React62.createElement(SingleStylePropertyPanel, { key: name, name, value: value || {}, onChange })));
2905
+ return /* @__PURE__ */ React63.createElement(React63.Fragment, null, names.map((name) => /* @__PURE__ */ React63.createElement(SingleStylePropertyPanel, { key: name, name, value: value || {}, onChange })));
2884
2906
  }
2885
2907
 
2886
2908
  // src/app/inspector-drawer/configuration-panel/input-panels/avatar-sidebar-panel.tsx
@@ -2900,11 +2922,11 @@ function AvatarSidebarPanel({ data, setData }) {
2900
2922
  const imageUrl = (_d = (_c = data.props) == null ? void 0 : _c.imageUrl) != null ? _d : AvatarPropsDefaults.imageUrl;
2901
2923
  const alt = (_f = (_e = data.props) == null ? void 0 : _e.alt) != null ? _f : AvatarPropsDefaults.alt;
2902
2924
  const shape = (_h = (_g = data.props) == null ? void 0 : _g.shape) != null ? _h : AvatarPropsDefaults.shape;
2903
- return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Avatar block" }, /* @__PURE__ */ React62.createElement(
2925
+ return /* @__PURE__ */ React63.createElement(BaseSidebarPanel, { title: "Avatar block" }, /* @__PURE__ */ React63.createElement(
2904
2926
  SliderInput,
2905
2927
  {
2906
2928
  label: t("field.size", "Size"),
2907
- iconLabel: /* @__PURE__ */ React62.createElement(AspectRatioOutlined, { sx: { color: "text.secondary" } }),
2929
+ iconLabel: /* @__PURE__ */ React63.createElement(AspectRatioOutlined, { sx: { color: "text.secondary" } }),
2908
2930
  units: "px",
2909
2931
  step: 3,
2910
2932
  min: 32,
@@ -2914,7 +2936,7 @@ function AvatarSidebarPanel({ data, setData }) {
2914
2936
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { size: size2 }) }));
2915
2937
  }
2916
2938
  }
2917
- ), /* @__PURE__ */ React62.createElement(
2939
+ ), /* @__PURE__ */ React63.createElement(
2918
2940
  RadioGroupInput,
2919
2941
  {
2920
2942
  label: t("avatar.shape", "Shape"),
@@ -2923,10 +2945,10 @@ function AvatarSidebarPanel({ data, setData }) {
2923
2945
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { shape: shape2 }) }));
2924
2946
  }
2925
2947
  },
2926
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "circle" }, t("signature.shape.circle", "Circle")),
2927
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "square" }, t("signature.shape.square", "Square")),
2928
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "rounded" }, t("signature.shape.rounded", "Rounded"))
2929
- ), /* @__PURE__ */ React62.createElement(
2948
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "circle" }, t("signature.shape.circle", "Circle")),
2949
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "square" }, t("signature.shape.square", "Square")),
2950
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "rounded" }, t("signature.shape.rounded", "Rounded"))
2951
+ ), /* @__PURE__ */ React63.createElement(
2930
2952
  TextInput,
2931
2953
  {
2932
2954
  label: t("signature.image-url", "Image URL"),
@@ -2935,7 +2957,7 @@ function AvatarSidebarPanel({ data, setData }) {
2935
2957
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { imageUrl: imageUrl2 }) }));
2936
2958
  }
2937
2959
  }
2938
- ), /* @__PURE__ */ React62.createElement(
2960
+ ), /* @__PURE__ */ React63.createElement(
2939
2961
  TextInput,
2940
2962
  {
2941
2963
  label: t("image.alt-text", "Alt text"),
@@ -2944,7 +2966,7 @@ function AvatarSidebarPanel({ data, setData }) {
2944
2966
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { alt: alt2 }) }));
2945
2967
  }
2946
2968
  }
2947
- ), /* @__PURE__ */ React62.createElement(
2969
+ ), /* @__PURE__ */ React63.createElement(
2948
2970
  MultiStylePropertyPanel,
2949
2971
  {
2950
2972
  names: ["textAlign", "padding"],
@@ -2972,65 +2994,65 @@ function ButtonSidebarPanel({ data, setData }) {
2972
2994
  const buttonStyle = (_j = (_i = data.props) == null ? void 0 : _i.buttonStyle) != null ? _j : ButtonPropsDefaults.buttonStyle;
2973
2995
  const buttonTextColor = (_l = (_k = data.props) == null ? void 0 : _k.buttonTextColor) != null ? _l : ButtonPropsDefaults.buttonTextColor;
2974
2996
  const buttonBackgroundColor = (_n = (_m = data.props) == null ? void 0 : _m.buttonBackgroundColor) != null ? _n : ButtonPropsDefaults.buttonBackgroundColor;
2975
- return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Button block" }, /* @__PURE__ */ React62.createElement(
2997
+ return /* @__PURE__ */ React63.createElement(BaseSidebarPanel, { title: "Button block" }, /* @__PURE__ */ React63.createElement(
2976
2998
  TextInput,
2977
2999
  {
2978
3000
  label: t("field.text", "Text"),
2979
3001
  defaultValue: text,
2980
3002
  onChange: (text2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { text: text2 }) }))
2981
3003
  }
2982
- ), /* @__PURE__ */ React62.createElement(
3004
+ ), /* @__PURE__ */ React63.createElement(
2983
3005
  TextInput,
2984
3006
  {
2985
3007
  label: t("field.url", "Url"),
2986
3008
  defaultValue: url,
2987
3009
  onChange: (url2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { url: url2 }) }))
2988
3010
  }
2989
- ), /* @__PURE__ */ React62.createElement(
3011
+ ), /* @__PURE__ */ React63.createElement(
2990
3012
  RadioGroupInput,
2991
3013
  {
2992
3014
  label: t("field.width", "Width"),
2993
3015
  defaultValue: fullWidth ? "FULL_WIDTH" : "AUTO",
2994
3016
  onChange: (v) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { fullWidth: v === "FULL_WIDTH" }) }))
2995
3017
  },
2996
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "FULL_WIDTH" }, t("button.width.full", "Full")),
2997
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "AUTO" }, t("button.width.auto", "Auto"))
2998
- ), /* @__PURE__ */ React62.createElement(
3018
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "FULL_WIDTH" }, t("button.width.full", "Full")),
3019
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "AUTO" }, t("button.width.auto", "Auto"))
3020
+ ), /* @__PURE__ */ React63.createElement(
2999
3021
  RadioGroupInput,
3000
3022
  {
3001
3023
  label: t("field.size", "Size"),
3002
3024
  defaultValue: size,
3003
3025
  onChange: (size2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { size: size2 }) }))
3004
3026
  },
3005
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "x-small" }, t("size.xs", "Xs")),
3006
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "small" }, t("size.sm", "Sm")),
3007
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "medium" }, t("size.md", "Md")),
3008
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "large" }, t("size.lg", "Lg"))
3009
- ), /* @__PURE__ */ React62.createElement(
3027
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "x-small" }, t("size.xs", "Xs")),
3028
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "small" }, t("size.sm", "Sm")),
3029
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "medium" }, t("size.md", "Md")),
3030
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "large" }, t("size.lg", "Lg"))
3031
+ ), /* @__PURE__ */ React63.createElement(
3010
3032
  RadioGroupInput,
3011
3033
  {
3012
3034
  label: t("field.style", "Style"),
3013
3035
  defaultValue: buttonStyle,
3014
3036
  onChange: (buttonStyle2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { buttonStyle: buttonStyle2 }) }))
3015
3037
  },
3016
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "rectangle" }, t("button.style.rectangle", "Rectangle")),
3017
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "rounded" }, t("button.style.rounded", "Rounded")),
3018
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "pill" }, t("button.style.pill", "Pill"))
3019
- ), /* @__PURE__ */ React62.createElement(
3038
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "rectangle" }, t("button.style.rectangle", "Rectangle")),
3039
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "rounded" }, t("button.style.rounded", "Rounded")),
3040
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "pill" }, t("button.style.pill", "Pill"))
3041
+ ), /* @__PURE__ */ React63.createElement(
3020
3042
  ColorInput2,
3021
3043
  {
3022
3044
  label: t("style.text-color", "Text color"),
3023
3045
  defaultValue: buttonTextColor,
3024
3046
  onChange: (buttonTextColor2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { buttonTextColor: buttonTextColor2 }) }))
3025
3047
  }
3026
- ), /* @__PURE__ */ React62.createElement(
3048
+ ), /* @__PURE__ */ React63.createElement(
3027
3049
  ColorInput2,
3028
3050
  {
3029
3051
  label: t("button.color", "Button color"),
3030
3052
  defaultValue: buttonBackgroundColor,
3031
3053
  onChange: (buttonBackgroundColor2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { buttonBackgroundColor: buttonBackgroundColor2 }) }))
3032
3054
  }
3033
- ), /* @__PURE__ */ React62.createElement(
3055
+ ), /* @__PURE__ */ React63.createElement(
3034
3056
  MultiStylePropertyPanel,
3035
3057
  {
3036
3058
  names: [
@@ -3065,7 +3087,7 @@ function TextDimensionInput({ label, defaultValue, onChange }) {
3065
3087
  const value = parseInt(ev.target.value);
3066
3088
  onChange(isNaN(value) ? null : value);
3067
3089
  };
3068
- return /* @__PURE__ */ React62.createElement(
3090
+ return /* @__PURE__ */ React63.createElement(
3069
3091
  TextField,
3070
3092
  {
3071
3093
  fullWidth: true,
@@ -3076,7 +3098,7 @@ function TextDimensionInput({ label, defaultValue, onChange }) {
3076
3098
  placeholder: "auto",
3077
3099
  size: "small",
3078
3100
  InputProps: {
3079
- endAdornment: /* @__PURE__ */ React62.createElement(Typography, { variant: "body2", color: "text.secondary" }, "px")
3101
+ endAdornment: /* @__PURE__ */ React63.createElement(Typography, { variant: "body2", color: "text.secondary" }, "px")
3080
3102
  }
3081
3103
  }
3082
3104
  );
@@ -3098,7 +3120,7 @@ function ColumnWidthsInput({ defaultValue, onChange }) {
3098
3120
  };
3099
3121
  let column3 = null;
3100
3122
  {
3101
- column3 = /* @__PURE__ */ React62.createElement(
3123
+ column3 = /* @__PURE__ */ React63.createElement(
3102
3124
  TextDimensionInput,
3103
3125
  {
3104
3126
  label: "Column 3",
@@ -3109,7 +3131,7 @@ function ColumnWidthsInput({ defaultValue, onChange }) {
3109
3131
  }
3110
3132
  );
3111
3133
  }
3112
- return /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 1 }, /* @__PURE__ */ React62.createElement(
3134
+ return /* @__PURE__ */ React63.createElement(Stack, { direction: "row", spacing: 1 }, /* @__PURE__ */ React63.createElement(
3113
3135
  TextDimensionInput,
3114
3136
  {
3115
3137
  label: "Column 1",
@@ -3118,7 +3140,7 @@ function ColumnWidthsInput({ defaultValue, onChange }) {
3118
3140
  setIndexValue(0, v);
3119
3141
  }
3120
3142
  }
3121
- ), /* @__PURE__ */ React62.createElement(
3143
+ ), /* @__PURE__ */ React63.createElement(
3122
3144
  TextDimensionInput,
3123
3145
  {
3124
3146
  label: "Column 2",
@@ -3143,7 +3165,7 @@ function ColumnsContainerPanel({ data, setData }) {
3143
3165
  setErrors(res.error);
3144
3166
  }
3145
3167
  };
3146
- return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Columns block" }, /* @__PURE__ */ React62.createElement(
3168
+ return /* @__PURE__ */ React63.createElement(BaseSidebarPanel, { title: "Columns block" }, /* @__PURE__ */ React63.createElement(
3147
3169
  RadioGroupInput,
3148
3170
  {
3149
3171
  label: t("columns.count", "Number of columns"),
@@ -3152,9 +3174,9 @@ function ColumnsContainerPanel({ data, setData }) {
3152
3174
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { columnsCount: v === "2" ? 2 : 3 }) }));
3153
3175
  }
3154
3176
  },
3155
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "2" }, "2"),
3156
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "3" }, "3")
3157
- ), /* @__PURE__ */ React62.createElement(
3177
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "2" }, "2"),
3178
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "3" }, "3")
3179
+ ), /* @__PURE__ */ React63.createElement(
3158
3180
  ColumnWidthsInput,
3159
3181
  {
3160
3182
  defaultValue: (_b = data.props) == null ? void 0 : _b.fixedWidths,
@@ -3162,11 +3184,11 @@ function ColumnsContainerPanel({ data, setData }) {
3162
3184
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { fixedWidths }) }));
3163
3185
  }
3164
3186
  }
3165
- ), /* @__PURE__ */ React62.createElement(
3187
+ ), /* @__PURE__ */ React63.createElement(
3166
3188
  SliderInput,
3167
3189
  {
3168
3190
  label: t("columns.gap", "Columns gap"),
3169
- iconLabel: /* @__PURE__ */ React62.createElement(SpaceBarOutlined, { sx: { color: "text.secondary" } }),
3191
+ iconLabel: /* @__PURE__ */ React63.createElement(SpaceBarOutlined, { sx: { color: "text.secondary" } }),
3170
3192
  units: "px",
3171
3193
  step: 4,
3172
3194
  marks: true,
@@ -3175,7 +3197,7 @@ function ColumnsContainerPanel({ data, setData }) {
3175
3197
  defaultValue: (_d = (_c = data.props) == null ? void 0 : _c.columnsGap) != null ? _d : 0,
3176
3198
  onChange: (columnsGap) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { columnsGap }) }))
3177
3199
  }
3178
- ), /* @__PURE__ */ React62.createElement(
3200
+ ), /* @__PURE__ */ React63.createElement(
3179
3201
  RadioGroupInput,
3180
3202
  {
3181
3203
  label: t("style.alignment", "Alignment"),
@@ -3184,10 +3206,10 @@ function ColumnsContainerPanel({ data, setData }) {
3184
3206
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { contentAlignment }) }));
3185
3207
  }
3186
3208
  },
3187
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "top" }, /* @__PURE__ */ React62.createElement(VerticalAlignTopOutlined, { fontSize: "small" })),
3188
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "middle" }, /* @__PURE__ */ React62.createElement(VerticalAlignCenterOutlined, { fontSize: "small" })),
3189
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "bottom" }, /* @__PURE__ */ React62.createElement(VerticalAlignBottomOutlined, { fontSize: "small" }))
3190
- ), /* @__PURE__ */ React62.createElement(
3209
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "top" }, /* @__PURE__ */ React63.createElement(VerticalAlignTopOutlined, { fontSize: "small" })),
3210
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "middle" }, /* @__PURE__ */ React63.createElement(VerticalAlignCenterOutlined, { fontSize: "small" })),
3211
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "bottom" }, /* @__PURE__ */ React63.createElement(VerticalAlignBottomOutlined, { fontSize: "small" }))
3212
+ ), /* @__PURE__ */ React63.createElement(
3191
3213
  MultiStylePropertyPanel,
3192
3214
  {
3193
3215
  names: ["backgroundColor", "padding"],
@@ -3216,7 +3238,7 @@ function ContainerSidebarPanel({ data, setData }) {
3216
3238
  setErrors(res.error);
3217
3239
  }
3218
3240
  };
3219
- return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Container block" }, /* @__PURE__ */ React62.createElement(
3241
+ return /* @__PURE__ */ React63.createElement(BaseSidebarPanel, { title: "Container block" }, /* @__PURE__ */ React63.createElement(
3220
3242
  MultiStylePropertyPanel,
3221
3243
  {
3222
3244
  names: ["backgroundColor", "borderColor", "borderRadius", "padding"],
@@ -3239,18 +3261,18 @@ function DividerSidebarPanel({ data, setData }) {
3239
3261
  };
3240
3262
  const lineColor = (_b = (_a = data.props) == null ? void 0 : _a.lineColor) != null ? _b : DividerPropsDefaults.lineColor;
3241
3263
  const lineHeight = (_d = (_c = data.props) == null ? void 0 : _c.lineHeight) != null ? _d : DividerPropsDefaults.lineHeight;
3242
- return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Divider block" }, /* @__PURE__ */ React62.createElement(
3264
+ return /* @__PURE__ */ React63.createElement(BaseSidebarPanel, { title: "Divider block" }, /* @__PURE__ */ React63.createElement(
3243
3265
  ColorInput2,
3244
3266
  {
3245
3267
  label: t("divider.color", "Color"),
3246
3268
  defaultValue: lineColor,
3247
3269
  onChange: (lineColor2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { lineColor: lineColor2 }) }))
3248
3270
  }
3249
- ), /* @__PURE__ */ React62.createElement(
3271
+ ), /* @__PURE__ */ React63.createElement(
3250
3272
  SliderInput,
3251
3273
  {
3252
3274
  label: t("field.height", "Height"),
3253
- iconLabel: /* @__PURE__ */ React62.createElement(HeightOutlined, { sx: { color: "text.secondary" } }),
3275
+ iconLabel: /* @__PURE__ */ React63.createElement(HeightOutlined, { sx: { color: "text.secondary" } }),
3254
3276
  units: "px",
3255
3277
  step: 1,
3256
3278
  min: 1,
@@ -3258,7 +3280,7 @@ function DividerSidebarPanel({ data, setData }) {
3258
3280
  defaultValue: lineHeight,
3259
3281
  onChange: (lineHeight2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { lineHeight: lineHeight2 }) }))
3260
3282
  }
3261
- ), /* @__PURE__ */ React62.createElement(
3283
+ ), /* @__PURE__ */ React63.createElement(
3262
3284
  MultiStylePropertyPanel,
3263
3285
  {
3264
3286
  names: ["backgroundColor", "padding"],
@@ -3302,11 +3324,11 @@ function BooleanInput({ label, defaultValue, onChange }) {
3302
3324
  useEffect(() => {
3303
3325
  setValue(defaultValue);
3304
3326
  }, [defaultValue]);
3305
- return /* @__PURE__ */ React62.createElement(
3327
+ return /* @__PURE__ */ React63.createElement(
3306
3328
  FormControlLabel,
3307
3329
  {
3308
3330
  label,
3309
- control: /* @__PURE__ */ React62.createElement(
3331
+ control: /* @__PURE__ */ React63.createElement(
3310
3332
  Switch,
3311
3333
  {
3312
3334
  checked: value,
@@ -3334,38 +3356,38 @@ function EmailLayoutSidebarFields({ data, setData }) {
3334
3356
  }
3335
3357
  };
3336
3358
  const backdropDisabled = (_a = data.backdropDisabled) != null ? _a : false;
3337
- return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Global" }, /* @__PURE__ */ React62.createElement(
3359
+ return /* @__PURE__ */ React63.createElement(BaseSidebarPanel, { title: "Global" }, /* @__PURE__ */ React63.createElement(
3338
3360
  BooleanInput,
3339
3361
  {
3340
3362
  label: t("global.disable-backdrop", "Disable backdrop"),
3341
3363
  defaultValue: backdropDisabled,
3342
3364
  onChange: (backdropDisabled2) => updateData(__spreadProps(__spreadValues({}, data), { backdropDisabled: backdropDisabled2 }))
3343
3365
  }
3344
- ), !backdropDisabled && /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
3366
+ ), !backdropDisabled && /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(
3345
3367
  ColorInput2,
3346
3368
  {
3347
3369
  label: t("global.backdrop-color", "Backdrop color"),
3348
3370
  defaultValue: (_b = data.backdropColor) != null ? _b : "#F5F5F5",
3349
3371
  onChange: (backdropColor) => updateData(__spreadProps(__spreadValues({}, data), { backdropColor }))
3350
3372
  }
3351
- ), /* @__PURE__ */ React62.createElement(
3373
+ ), /* @__PURE__ */ React63.createElement(
3352
3374
  ColorInput2,
3353
3375
  {
3354
3376
  label: t("global.canvas-color", "Canvas color"),
3355
3377
  defaultValue: (_c = data.canvasColor) != null ? _c : "#FFFFFF",
3356
3378
  onChange: (canvasColor) => updateData(__spreadProps(__spreadValues({}, data), { canvasColor }))
3357
3379
  }
3358
- ), /* @__PURE__ */ React62.createElement(
3380
+ ), /* @__PURE__ */ React63.createElement(
3359
3381
  NullableColorInput,
3360
3382
  {
3361
3383
  label: t("global.canvas-border-color", "Canvas border color"),
3362
3384
  defaultValue: (_d = data.borderColor) != null ? _d : null,
3363
3385
  onChange: (borderColor) => updateData(__spreadProps(__spreadValues({}, data), { borderColor }))
3364
3386
  }
3365
- ), /* @__PURE__ */ React62.createElement(
3387
+ ), /* @__PURE__ */ React63.createElement(
3366
3388
  SliderInput,
3367
3389
  {
3368
- iconLabel: /* @__PURE__ */ React62.createElement(RoundedCornerOutlined, null),
3390
+ iconLabel: /* @__PURE__ */ React63.createElement(RoundedCornerOutlined, null),
3369
3391
  units: "px",
3370
3392
  step: 4,
3371
3393
  marks: true,
@@ -3375,14 +3397,14 @@ function EmailLayoutSidebarFields({ data, setData }) {
3375
3397
  defaultValue: (_e = data.borderRadius) != null ? _e : 0,
3376
3398
  onChange: (borderRadius) => updateData(__spreadProps(__spreadValues({}, data), { borderRadius }))
3377
3399
  }
3378
- )), /* @__PURE__ */ React62.createElement(
3400
+ )), /* @__PURE__ */ React63.createElement(
3379
3401
  NullableFontFamily,
3380
3402
  {
3381
3403
  label: t("style.font-family", "Font family"),
3382
3404
  defaultValue: "MODERN_SANS",
3383
3405
  onChange: (fontFamily) => updateData(__spreadProps(__spreadValues({}, data), { fontFamily }))
3384
3406
  }
3385
- ), /* @__PURE__ */ React62.createElement(
3407
+ ), /* @__PURE__ */ React63.createElement(
3386
3408
  ColorInput2,
3387
3409
  {
3388
3410
  label: t("style.text-color", "Text color"),
@@ -3403,7 +3425,7 @@ function HeadingSidebarPanel({ data, setData }) {
3403
3425
  setErrors(res.error);
3404
3426
  }
3405
3427
  };
3406
- return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Heading block" }, /* @__PURE__ */ React62.createElement(
3428
+ return /* @__PURE__ */ React63.createElement(BaseSidebarPanel, { title: "Heading block" }, /* @__PURE__ */ React63.createElement(
3407
3429
  TextInput,
3408
3430
  {
3409
3431
  label: t("field.content", "Content"),
@@ -3413,7 +3435,7 @@ function HeadingSidebarPanel({ data, setData }) {
3413
3435
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { text }) }));
3414
3436
  }
3415
3437
  }
3416
- ), /* @__PURE__ */ React62.createElement(
3438
+ ), /* @__PURE__ */ React63.createElement(
3417
3439
  RadioGroupInput,
3418
3440
  {
3419
3441
  label: t("field.level", "Level"),
@@ -3422,10 +3444,10 @@ function HeadingSidebarPanel({ data, setData }) {
3422
3444
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { level }) }));
3423
3445
  }
3424
3446
  },
3425
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "h1" }, "H1"),
3426
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "h2" }, "H2"),
3427
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "h3" }, "H3")
3428
- ), /* @__PURE__ */ React62.createElement(
3447
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "h1" }, "H1"),
3448
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "h2" }, "H2"),
3449
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "h3" }, "H3")
3450
+ ), /* @__PURE__ */ React63.createElement(
3429
3451
  MultiStylePropertyPanel,
3430
3452
  {
3431
3453
  names: [
@@ -3455,7 +3477,7 @@ function HtmlSidebarPanel({ data, setData }) {
3455
3477
  setErrors(res.error);
3456
3478
  }
3457
3479
  };
3458
- return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Html block" }, /* @__PURE__ */ React62.createElement(
3480
+ return /* @__PURE__ */ React63.createElement(BaseSidebarPanel, { title: "Html block" }, /* @__PURE__ */ React63.createElement(
3459
3481
  TextInput,
3460
3482
  {
3461
3483
  label: t("field.content", "Content"),
@@ -3463,7 +3485,7 @@ function HtmlSidebarPanel({ data, setData }) {
3463
3485
  defaultValue: (_b = (_a = data.props) == null ? void 0 : _a.contents) != null ? _b : "",
3464
3486
  onChange: (contents) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { contents }) }))
3465
3487
  }
3466
- ), /* @__PURE__ */ React62.createElement(
3488
+ ), /* @__PURE__ */ React63.createElement(
3467
3489
  MultiStylePropertyPanel,
3468
3490
  {
3469
3491
  names: ["color", "backgroundColor", "fontFamily", "fontSize", "textAlign", "padding"],
@@ -3520,7 +3542,7 @@ function ImageLibraryDialog({ open, onClose, onPick }) {
3520
3542
  setBusy(false);
3521
3543
  }
3522
3544
  });
3523
- return /* @__PURE__ */ React62.createElement(Dialog, { open, onClose, maxWidth: "md", fullWidth: true }, /* @__PURE__ */ React62.createElement(DialogTitle, null, "Image library"), /* @__PURE__ */ React62.createElement(DialogContent, { dividers: true }, /* @__PURE__ */ React62.createElement(
3545
+ return /* @__PURE__ */ React63.createElement(Dialog, { open, onClose, maxWidth: "md", fullWidth: true }, /* @__PURE__ */ React63.createElement(DialogTitle, null, "Image library"), /* @__PURE__ */ React63.createElement(DialogContent, { dividers: true }, /* @__PURE__ */ React63.createElement(
3524
3546
  TextField,
3525
3547
  {
3526
3548
  fullWidth: true,
@@ -3530,11 +3552,11 @@ function ImageLibraryDialog({ open, onClose, onPick }) {
3530
3552
  onChange: (e) => setQuery(e.target.value),
3531
3553
  autoFocus: true,
3532
3554
  InputProps: {
3533
- startAdornment: /* @__PURE__ */ React62.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React62.createElement(SearchOutlined, { fontSize: "small" }))
3555
+ startAdornment: /* @__PURE__ */ React63.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React63.createElement(SearchOutlined, { fontSize: "small" }))
3534
3556
  },
3535
3557
  sx: { mb: 2 }
3536
3558
  }
3537
- ), error && /* @__PURE__ */ React62.createElement(Alert, { severity: "error", sx: { mb: 2 } }, error), busy && !images && /* @__PURE__ */ React62.createElement(Stack, { alignItems: "center", sx: { py: 4 } }, /* @__PURE__ */ React62.createElement(CircularProgress, { size: 28 })), filtered && filtered.length === 0 && /* @__PURE__ */ React62.createElement(Typography, { variant: "body2", sx: { color: "text.secondary", textAlign: "center", py: 4 } }, query ? "No images match your search." : "No images in the library yet."), filtered && filtered.length > 0 && /* @__PURE__ */ React62.createElement(
3559
+ ), error && /* @__PURE__ */ React63.createElement(Alert, { severity: "error", sx: { mb: 2 } }, error), busy && !images && /* @__PURE__ */ React63.createElement(Stack, { alignItems: "center", sx: { py: 4 } }, /* @__PURE__ */ React63.createElement(CircularProgress, { size: 28 })), filtered && filtered.length === 0 && /* @__PURE__ */ React63.createElement(Typography, { variant: "body2", sx: { color: "text.secondary", textAlign: "center", py: 4 } }, query ? "No images match your search." : "No images in the library yet."), filtered && filtered.length > 0 && /* @__PURE__ */ React63.createElement(
3538
3560
  Box,
3539
3561
  {
3540
3562
  sx: {
@@ -3543,7 +3565,7 @@ function ImageLibraryDialog({ open, onClose, onPick }) {
3543
3565
  gap: 1.5
3544
3566
  }
3545
3567
  },
3546
- filtered.map((img) => /* @__PURE__ */ React62.createElement(
3568
+ filtered.map((img) => /* @__PURE__ */ React63.createElement(
3547
3569
  ImageTile,
3548
3570
  {
3549
3571
  key: img.url,
@@ -3552,7 +3574,7 @@ function ImageLibraryDialog({ open, onClose, onPick }) {
3552
3574
  onDelete: deleteImage ? () => handleDelete(img.url) : void 0
3553
3575
  }
3554
3576
  ))
3555
- )), /* @__PURE__ */ React62.createElement(DialogActions, null, /* @__PURE__ */ React62.createElement(Button$1, { onClick: onClose }, "Close")));
3577
+ )), /* @__PURE__ */ React63.createElement(DialogActions, null, /* @__PURE__ */ React63.createElement(Button$1, { onClick: onClose }, "Close")));
3556
3578
  }
3557
3579
  function ImageTile({
3558
3580
  image,
@@ -3562,7 +3584,7 @@ function ImageTile({
3562
3584
  var _a, _b;
3563
3585
  const src = (_a = image.thumbnailUrl) != null ? _a : image.url;
3564
3586
  const label = image.alt || image.url.split("/").pop() || "image";
3565
- return /* @__PURE__ */ React62.createElement(
3587
+ return /* @__PURE__ */ React63.createElement(
3566
3588
  Box,
3567
3589
  {
3568
3590
  sx: {
@@ -3578,7 +3600,7 @@ function ImageTile({
3578
3600
  },
3579
3601
  onClick: onPick
3580
3602
  },
3581
- /* @__PURE__ */ React62.createElement(
3603
+ /* @__PURE__ */ React63.createElement(
3582
3604
  Box,
3583
3605
  {
3584
3606
  component: "img",
@@ -3587,8 +3609,8 @@ function ImageTile({
3587
3609
  sx: { display: "block", width: "100%", aspectRatio: "1 / 1", objectFit: "cover", backgroundColor: "#f5f5f5" }
3588
3610
  }
3589
3611
  ),
3590
- /* @__PURE__ */ React62.createElement(Box, { sx: { p: 0.75, fontSize: 11, color: "text.secondary", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } }, label),
3591
- onDelete && /* @__PURE__ */ React62.createElement(Tooltip, { title: "Delete from library" }, /* @__PURE__ */ React62.createElement(
3612
+ /* @__PURE__ */ React63.createElement(Box, { sx: { p: 0.75, fontSize: 11, color: "text.secondary", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } }, label),
3613
+ onDelete && /* @__PURE__ */ React63.createElement(Tooltip, { title: "Delete from library" }, /* @__PURE__ */ React63.createElement(
3592
3614
  IconButton,
3593
3615
  {
3594
3616
  size: "small",
@@ -3608,7 +3630,7 @@ function ImageTile({
3608
3630
  },
3609
3631
  "aria-label": "Delete image"
3610
3632
  },
3611
- /* @__PURE__ */ React62.createElement(DeleteOutline, { fontSize: "small" })
3633
+ /* @__PURE__ */ React63.createElement(DeleteOutline, { fontSize: "small" })
3612
3634
  ))
3613
3635
  );
3614
3636
  }
@@ -3661,13 +3683,13 @@ function ImageSidebarPanel({ data, setData }) {
3661
3683
  });
3662
3684
  const url = (_b = (_a = data.props) == null ? void 0 : _a.url) != null ? _b : "";
3663
3685
  const showHttpWarning = isHttpUrl(url);
3664
- return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Image block" }, (uploadImage || loadImages) && /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 1 }, uploadImage && /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
3686
+ return /* @__PURE__ */ React63.createElement(BaseSidebarPanel, { title: "Image block" }, (uploadImage || loadImages) && /* @__PURE__ */ React63.createElement(Stack, { direction: "row", spacing: 1 }, uploadImage && /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(
3665
3687
  Button$1,
3666
3688
  {
3667
3689
  fullWidth: true,
3668
3690
  variant: "outlined",
3669
3691
  size: "small",
3670
- startIcon: uploading ? /* @__PURE__ */ React62.createElement(CircularProgress, { size: 14 }) : /* @__PURE__ */ React62.createElement(CloudUploadOutlined, { fontSize: "small" }),
3692
+ startIcon: uploading ? /* @__PURE__ */ React63.createElement(CircularProgress, { size: 14 }) : /* @__PURE__ */ React63.createElement(CloudUploadOutlined, { fontSize: "small" }),
3671
3693
  disabled: uploading,
3672
3694
  onClick: () => {
3673
3695
  var _a2;
@@ -3675,7 +3697,7 @@ function ImageSidebarPanel({ data, setData }) {
3675
3697
  }
3676
3698
  },
3677
3699
  uploading ? t("image.uploading", "Uploading\u2026") : t("image.upload", "Upload")
3678
- ), /* @__PURE__ */ React62.createElement(
3700
+ ), /* @__PURE__ */ React63.createElement(
3679
3701
  "input",
3680
3702
  {
3681
3703
  ref: fileInputRef,
@@ -3689,17 +3711,17 @@ function ImageSidebarPanel({ data, setData }) {
3689
3711
  if (file) yield handleFile(file);
3690
3712
  })
3691
3713
  }
3692
- )), loadImages && /* @__PURE__ */ React62.createElement(
3714
+ )), loadImages && /* @__PURE__ */ React63.createElement(
3693
3715
  Button$1,
3694
3716
  {
3695
3717
  fullWidth: true,
3696
3718
  variant: "outlined",
3697
3719
  size: "small",
3698
- startIcon: /* @__PURE__ */ React62.createElement(CollectionsOutlined, { fontSize: "small" }),
3720
+ startIcon: /* @__PURE__ */ React63.createElement(CollectionsOutlined, { fontSize: "small" }),
3699
3721
  onClick: () => setLibraryOpen(true)
3700
3722
  },
3701
3723
  t("image.library", "Library")
3702
- )), uploadError && /* @__PURE__ */ React62.createElement(Alert, { severity: "error", onClose: () => setUploadError(null), sx: { mt: 1 } }, uploadError), /* @__PURE__ */ React62.createElement(
3724
+ )), uploadError && /* @__PURE__ */ React63.createElement(Alert, { severity: "error", onClose: () => setUploadError(null), sx: { mt: 1 } }, uploadError), /* @__PURE__ */ React63.createElement(
3703
3725
  TextInput,
3704
3726
  {
3705
3727
  label: t("image.source-url", "Source URL"),
@@ -3709,14 +3731,14 @@ function ImageSidebarPanel({ data, setData }) {
3709
3731
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { url: next }) }));
3710
3732
  }
3711
3733
  }
3712
- ), showHttpWarning && /* @__PURE__ */ React62.createElement(Box, { sx: { mt: -1, mb: 1, display: "flex", alignItems: "flex-start", gap: 0.75 } }, /* @__PURE__ */ React62.createElement(ErrorOutlineOutlined, { fontSize: "small", sx: { color: "warning.main", mt: "2px" } }), /* @__PURE__ */ React62.createElement(Box, { sx: { fontSize: 12, color: "warning.dark" } }, t("image.http-warning", "Non-HTTPS URL: Gmail and other clients strip mixed content. Use https:// for reliable delivery."))), /* @__PURE__ */ React62.createElement(
3734
+ ), showHttpWarning && /* @__PURE__ */ React63.createElement(Box, { sx: { mt: -1, mb: 1, display: "flex", alignItems: "flex-start", gap: 0.75 } }, /* @__PURE__ */ React63.createElement(ErrorOutlineOutlined, { fontSize: "small", sx: { color: "warning.main", mt: "2px" } }), /* @__PURE__ */ React63.createElement(Box, { sx: { fontSize: 12, color: "warning.dark" } }, t("image.http-warning", "Non-HTTPS URL: Gmail and other clients strip mixed content. Use https:// for reliable delivery."))), /* @__PURE__ */ React63.createElement(
3713
3735
  TextInput,
3714
3736
  {
3715
3737
  label: t("image.alt-text", "Alt text"),
3716
3738
  defaultValue: (_d = (_c = data.props) == null ? void 0 : _c.alt) != null ? _d : "",
3717
3739
  onChange: (alt) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { alt }) }))
3718
3740
  }
3719
- ), /* @__PURE__ */ React62.createElement(
3741
+ ), /* @__PURE__ */ React63.createElement(
3720
3742
  TextInput,
3721
3743
  {
3722
3744
  label: t("image.link-href", "Click through URL"),
@@ -3726,38 +3748,38 @@ function ImageSidebarPanel({ data, setData }) {
3726
3748
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { linkHref }) }));
3727
3749
  }
3728
3750
  }
3729
- ), /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 2 }, /* @__PURE__ */ React62.createElement(
3751
+ ), /* @__PURE__ */ React63.createElement(Stack, { direction: "row", spacing: 2 }, /* @__PURE__ */ React63.createElement(
3730
3752
  TextDimensionInput,
3731
3753
  {
3732
3754
  label: t("field.width", "Width"),
3733
3755
  defaultValue: (_g = data.props) == null ? void 0 : _g.width,
3734
3756
  onChange: (width) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { width }) }))
3735
3757
  }
3736
- ), /* @__PURE__ */ React62.createElement(
3758
+ ), /* @__PURE__ */ React63.createElement(
3737
3759
  TextDimensionInput,
3738
3760
  {
3739
3761
  label: t("field.height", "Height"),
3740
3762
  defaultValue: (_h = data.props) == null ? void 0 : _h.height,
3741
3763
  onChange: (height) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { height }) }))
3742
3764
  }
3743
- )), /* @__PURE__ */ React62.createElement(
3765
+ )), /* @__PURE__ */ React63.createElement(
3744
3766
  RadioGroupInput,
3745
3767
  {
3746
3768
  label: t("style.alignment", "Alignment"),
3747
3769
  defaultValue: (_j = (_i = data.props) == null ? void 0 : _i.contentAlignment) != null ? _j : "middle",
3748
3770
  onChange: (contentAlignment) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { contentAlignment }) }))
3749
3771
  },
3750
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "top" }, /* @__PURE__ */ React62.createElement(VerticalAlignTopOutlined, { fontSize: "small" })),
3751
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "middle" }, /* @__PURE__ */ React62.createElement(VerticalAlignCenterOutlined, { fontSize: "small" })),
3752
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "bottom" }, /* @__PURE__ */ React62.createElement(VerticalAlignBottomOutlined, { fontSize: "small" }))
3753
- ), /* @__PURE__ */ React62.createElement(
3772
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "top" }, /* @__PURE__ */ React63.createElement(VerticalAlignTopOutlined, { fontSize: "small" })),
3773
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "middle" }, /* @__PURE__ */ React63.createElement(VerticalAlignCenterOutlined, { fontSize: "small" })),
3774
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "bottom" }, /* @__PURE__ */ React63.createElement(VerticalAlignBottomOutlined, { fontSize: "small" }))
3775
+ ), /* @__PURE__ */ React63.createElement(
3754
3776
  MultiStylePropertyPanel,
3755
3777
  {
3756
3778
  names: ["backgroundColor", "textAlign", "padding"],
3757
3779
  value: data.style,
3758
3780
  onChange: (style) => updateData(__spreadProps(__spreadValues({}, data), { style }))
3759
3781
  }
3760
- ), loadImages && /* @__PURE__ */ React62.createElement(
3782
+ ), loadImages && /* @__PURE__ */ React63.createElement(
3761
3783
  ImageLibraryDialog,
3762
3784
  {
3763
3785
  open: libraryOpen,
@@ -3796,74 +3818,74 @@ function SignatureSidebarPanel({ data, setData }) {
3796
3818
  const nameColor = (_z = (_y = data.props) == null ? void 0 : _y.nameColor) != null ? _z : SignaturePropsDefaults.nameColor;
3797
3819
  const textColor = (_B = (_A = data.props) == null ? void 0 : _A.textColor) != null ? _B : SignaturePropsDefaults.textColor;
3798
3820
  const linkColor = (_D = (_C = data.props) == null ? void 0 : _C.linkColor) != null ? _D : SignaturePropsDefaults.linkColor;
3799
- return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Signature block" }, /* @__PURE__ */ React62.createElement(
3821
+ return /* @__PURE__ */ React63.createElement(BaseSidebarPanel, { title: "Signature block" }, /* @__PURE__ */ React63.createElement(
3800
3822
  TextInput,
3801
3823
  {
3802
3824
  label: t("signature.greeting", "Greeting"),
3803
3825
  defaultValue: greeting,
3804
3826
  onChange: (greeting2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { greeting: greeting2 }) }))
3805
3827
  }
3806
- ), /* @__PURE__ */ React62.createElement(
3828
+ ), /* @__PURE__ */ React63.createElement(
3807
3829
  TextInput,
3808
3830
  {
3809
3831
  label: t("signature.name", "Name"),
3810
3832
  defaultValue: name,
3811
3833
  onChange: (name2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { name: name2 }) }))
3812
3834
  }
3813
- ), /* @__PURE__ */ React62.createElement(
3835
+ ), /* @__PURE__ */ React63.createElement(
3814
3836
  TextInput,
3815
3837
  {
3816
3838
  label: t("signature.title", "Title"),
3817
3839
  defaultValue: title,
3818
3840
  onChange: (title2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { title: title2 }) }))
3819
3841
  }
3820
- ), /* @__PURE__ */ React62.createElement(
3842
+ ), /* @__PURE__ */ React63.createElement(
3821
3843
  TextInput,
3822
3844
  {
3823
3845
  label: t("signature.company", "Company"),
3824
3846
  defaultValue: company,
3825
3847
  onChange: (company2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { company: company2 }) }))
3826
3848
  }
3827
- ), /* @__PURE__ */ React62.createElement(
3849
+ ), /* @__PURE__ */ React63.createElement(
3828
3850
  TextInput,
3829
3851
  {
3830
3852
  label: t("signature.address", "Address"),
3831
3853
  defaultValue: address,
3832
3854
  onChange: (address2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { address: address2 }) }))
3833
3855
  }
3834
- ), /* @__PURE__ */ React62.createElement(
3856
+ ), /* @__PURE__ */ React63.createElement(
3835
3857
  TextInput,
3836
3858
  {
3837
3859
  label: t("signature.email", "Email"),
3838
3860
  defaultValue: email,
3839
3861
  onChange: (email2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { email: email2 }) }))
3840
3862
  }
3841
- ), /* @__PURE__ */ React62.createElement(
3863
+ ), /* @__PURE__ */ React63.createElement(
3842
3864
  TextInput,
3843
3865
  {
3844
3866
  label: t("signature.phone", "Phone"),
3845
3867
  defaultValue: phone,
3846
3868
  onChange: (phone2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { phone: phone2 }) }))
3847
3869
  }
3848
- ), /* @__PURE__ */ React62.createElement(
3870
+ ), /* @__PURE__ */ React63.createElement(
3849
3871
  TextInput,
3850
3872
  {
3851
3873
  label: t("signature.website", "Website"),
3852
3874
  defaultValue: website,
3853
3875
  onChange: (website2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { website: website2 }) }))
3854
3876
  }
3855
- ), /* @__PURE__ */ React62.createElement(
3877
+ ), /* @__PURE__ */ React63.createElement(
3856
3878
  TextInput,
3857
3879
  {
3858
3880
  label: t("signature.image-url", "Image URL"),
3859
3881
  defaultValue: imageUrl,
3860
3882
  onChange: (imageUrl2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { imageUrl: imageUrl2 }) }))
3861
3883
  }
3862
- ), /* @__PURE__ */ React62.createElement(
3884
+ ), /* @__PURE__ */ React63.createElement(
3863
3885
  SliderInput,
3864
3886
  {
3865
3887
  label: t("signature.image-size", "Image size"),
3866
- iconLabel: /* @__PURE__ */ React62.createElement(AspectRatioOutlined, { sx: { color: "text.secondary" } }),
3888
+ iconLabel: /* @__PURE__ */ React63.createElement(AspectRatioOutlined, { sx: { color: "text.secondary" } }),
3867
3889
  units: "px",
3868
3890
  step: 4,
3869
3891
  min: 32,
@@ -3871,47 +3893,47 @@ function SignatureSidebarPanel({ data, setData }) {
3871
3893
  defaultValue: imageSize,
3872
3894
  onChange: (imageSize2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { imageSize: imageSize2 }) }))
3873
3895
  }
3874
- ), /* @__PURE__ */ React62.createElement(
3896
+ ), /* @__PURE__ */ React63.createElement(
3875
3897
  RadioGroupInput,
3876
3898
  {
3877
3899
  label: t("signature.image-shape", "Image shape"),
3878
3900
  defaultValue: imageShape,
3879
3901
  onChange: (imageShape2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { imageShape: imageShape2 }) }))
3880
3902
  },
3881
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "circle" }, t("signature.shape.circle", "Circle")),
3882
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "square" }, t("signature.shape.square", "Square")),
3883
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "rounded" }, t("signature.shape.rounded", "Rounded"))
3884
- ), /* @__PURE__ */ React62.createElement(
3903
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "circle" }, t("signature.shape.circle", "Circle")),
3904
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "square" }, t("signature.shape.square", "Square")),
3905
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "rounded" }, t("signature.shape.rounded", "Rounded"))
3906
+ ), /* @__PURE__ */ React63.createElement(
3885
3907
  RadioGroupInput,
3886
3908
  {
3887
3909
  label: t("signature.layout", "Layout"),
3888
3910
  defaultValue: layout,
3889
3911
  onChange: (layout2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { layout: layout2 }) }))
3890
3912
  },
3891
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "horizontal" }, t("signature.layout.horizontal", "Horizontal")),
3892
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "vertical" }, t("signature.layout.vertical", "Vertical"))
3893
- ), /* @__PURE__ */ React62.createElement(
3913
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "horizontal" }, t("signature.layout.horizontal", "Horizontal")),
3914
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "vertical" }, t("signature.layout.vertical", "Vertical"))
3915
+ ), /* @__PURE__ */ React63.createElement(
3894
3916
  ColorInput2,
3895
3917
  {
3896
3918
  label: t("signature.name-color", "Name color"),
3897
3919
  defaultValue: nameColor,
3898
3920
  onChange: (nameColor2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { nameColor: nameColor2 }) }))
3899
3921
  }
3900
- ), /* @__PURE__ */ React62.createElement(
3922
+ ), /* @__PURE__ */ React63.createElement(
3901
3923
  ColorInput2,
3902
3924
  {
3903
3925
  label: t("style.text-color", "Text color"),
3904
3926
  defaultValue: textColor,
3905
3927
  onChange: (textColor2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { textColor: textColor2 }) }))
3906
3928
  }
3907
- ), /* @__PURE__ */ React62.createElement(
3929
+ ), /* @__PURE__ */ React63.createElement(
3908
3930
  ColorInput2,
3909
3931
  {
3910
3932
  label: t("signature.link-color", "Link color"),
3911
3933
  defaultValue: linkColor,
3912
3934
  onChange: (linkColor2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { linkColor: linkColor2 }) }))
3913
3935
  }
3914
- ), /* @__PURE__ */ React62.createElement(
3936
+ ), /* @__PURE__ */ React63.createElement(
3915
3937
  MultiStylePropertyPanel,
3916
3938
  {
3917
3939
  names: ["backgroundColor", "fontFamily", "padding"],
@@ -3932,11 +3954,11 @@ function SpacerSidebarPanel({ data, setData }) {
3932
3954
  setErrors(res.error);
3933
3955
  }
3934
3956
  };
3935
- return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Spacer block" }, /* @__PURE__ */ React62.createElement(
3957
+ return /* @__PURE__ */ React63.createElement(BaseSidebarPanel, { title: "Spacer block" }, /* @__PURE__ */ React63.createElement(
3936
3958
  SliderInput,
3937
3959
  {
3938
3960
  label: t("field.height", "Height"),
3939
- iconLabel: /* @__PURE__ */ React62.createElement(HeightOutlined, { sx: { color: "text.secondary" } }),
3961
+ iconLabel: /* @__PURE__ */ React63.createElement(HeightOutlined, { sx: { color: "text.secondary" } }),
3940
3962
  units: "px",
3941
3963
  step: 4,
3942
3964
  min: 4,
@@ -3958,7 +3980,7 @@ function TextSidebarPanel({ data, setData }) {
3958
3980
  setErrors(res.error);
3959
3981
  }
3960
3982
  };
3961
- return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Text block" }, /* @__PURE__ */ React62.createElement(
3983
+ return /* @__PURE__ */ React63.createElement(BaseSidebarPanel, { title: "Text block" }, /* @__PURE__ */ React63.createElement(
3962
3984
  TextInput,
3963
3985
  {
3964
3986
  label: t("field.content", "Content"),
@@ -3966,14 +3988,14 @@ function TextSidebarPanel({ data, setData }) {
3966
3988
  defaultValue: (_b = (_a = data.props) == null ? void 0 : _a.text) != null ? _b : "",
3967
3989
  onChange: (text) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { text }) }))
3968
3990
  }
3969
- ), /* @__PURE__ */ React62.createElement(
3991
+ ), /* @__PURE__ */ React63.createElement(
3970
3992
  BooleanInput,
3971
3993
  {
3972
3994
  label: t("field.markdown", "Markdown"),
3973
3995
  defaultValue: (_d = (_c = data.props) == null ? void 0 : _c.markdown) != null ? _d : false,
3974
3996
  onChange: (markdown) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { markdown }) }))
3975
3997
  }
3976
- ), /* @__PURE__ */ React62.createElement(
3998
+ ), /* @__PURE__ */ React63.createElement(
3977
3999
  MultiStylePropertyPanel,
3978
4000
  {
3979
4001
  names: [
@@ -3995,7 +4017,7 @@ function TextSidebarPanel({ data, setData }) {
3995
4017
 
3996
4018
  // src/app/inspector-drawer/configuration-panel/index.tsx
3997
4019
  function renderMessage(val) {
3998
- return /* @__PURE__ */ React62.createElement(Box, { sx: { m: 3, p: 1, border: "1px dashed", borderColor: "divider" } }, /* @__PURE__ */ React62.createElement(Typography, { color: "text.secondary" }, val));
4020
+ return /* @__PURE__ */ React63.createElement(Box, { sx: { m: 3, p: 1, border: "1px dashed", borderColor: "divider" } }, /* @__PURE__ */ React63.createElement(Typography, { color: "text.secondary" }, val));
3999
4021
  }
4000
4022
  function ConfigurationPanel() {
4001
4023
  const document2 = useDocument();
@@ -4011,55 +4033,55 @@ function ConfigurationPanel() {
4011
4033
  const { data, type } = block;
4012
4034
  switch (type) {
4013
4035
  case "Avatar":
4014
- return /* @__PURE__ */ React62.createElement(AvatarSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4036
+ return /* @__PURE__ */ React63.createElement(AvatarSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4015
4037
  case "Button":
4016
- return /* @__PURE__ */ React62.createElement(ButtonSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4038
+ return /* @__PURE__ */ React63.createElement(ButtonSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4017
4039
  case "ColumnsContainer":
4018
- return /* @__PURE__ */ React62.createElement(ColumnsContainerPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4040
+ return /* @__PURE__ */ React63.createElement(ColumnsContainerPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4019
4041
  case "Container":
4020
- return /* @__PURE__ */ React62.createElement(ContainerSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4042
+ return /* @__PURE__ */ React63.createElement(ContainerSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4021
4043
  case "Divider":
4022
- return /* @__PURE__ */ React62.createElement(DividerSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4044
+ return /* @__PURE__ */ React63.createElement(DividerSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4023
4045
  case "Heading":
4024
- return /* @__PURE__ */ React62.createElement(HeadingSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4046
+ return /* @__PURE__ */ React63.createElement(HeadingSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4025
4047
  case "Html":
4026
- return /* @__PURE__ */ React62.createElement(HtmlSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4048
+ return /* @__PURE__ */ React63.createElement(HtmlSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4027
4049
  case "Image":
4028
- return /* @__PURE__ */ React62.createElement(ImageSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4050
+ return /* @__PURE__ */ React63.createElement(ImageSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4029
4051
  case "EmailLayout":
4030
- return /* @__PURE__ */ React62.createElement(EmailLayoutSidebarFields, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4052
+ return /* @__PURE__ */ React63.createElement(EmailLayoutSidebarFields, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4031
4053
  case "Spacer":
4032
- return /* @__PURE__ */ React62.createElement(SpacerSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4054
+ return /* @__PURE__ */ React63.createElement(SpacerSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4033
4055
  case "Signature":
4034
- return /* @__PURE__ */ React62.createElement(SignatureSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4056
+ return /* @__PURE__ */ React63.createElement(SignatureSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4035
4057
  case "Text":
4036
- return /* @__PURE__ */ React62.createElement(TextSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4058
+ return /* @__PURE__ */ React63.createElement(TextSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4037
4059
  default:
4038
- return /* @__PURE__ */ React62.createElement("pre", null, JSON.stringify(block, null, " "));
4060
+ return /* @__PURE__ */ React63.createElement("pre", null, JSON.stringify(block, null, " "));
4039
4061
  }
4040
4062
  }
4041
4063
  function StylesPanel() {
4042
4064
  const block = useDocument().root;
4043
4065
  if (!block) {
4044
- return /* @__PURE__ */ React62.createElement("p", null, "Block not found");
4066
+ return /* @__PURE__ */ React63.createElement("p", null, "Block not found");
4045
4067
  }
4046
4068
  const { data, type } = block;
4047
4069
  if (type !== "EmailLayout") {
4048
4070
  throw new Error('Expected "root" element to be of type EmailLayout');
4049
4071
  }
4050
- return /* @__PURE__ */ React62.createElement(EmailLayoutSidebarFields, { key: "root", data, setData: (data2) => setDocument({ root: { type, data: data2 } }) });
4072
+ return /* @__PURE__ */ React63.createElement(EmailLayoutSidebarFields, { key: "root", data, setData: (data2) => setDocument({ root: { type, data: data2 } }) });
4051
4073
  }
4052
4074
  function TemplateDownloadButton() {
4053
4075
  const doc = useDocument();
4054
4076
  const href = useMemo(() => {
4055
4077
  return `data:text/plain,${encodeURIComponent(JSON.stringify(doc, null, " "))}`;
4056
4078
  }, [doc]);
4057
- return /* @__PURE__ */ React62.createElement(
4079
+ return /* @__PURE__ */ React63.createElement(
4058
4080
  Button$1,
4059
4081
  {
4060
4082
  variant: "outlined",
4061
4083
  color: "primary",
4062
- startIcon: /* @__PURE__ */ React62.createElement(FileDownloadOutlined, null),
4084
+ startIcon: /* @__PURE__ */ React63.createElement(FileDownloadOutlined, null),
4063
4085
  href,
4064
4086
  download: "emailTemplate.json",
4065
4087
  fullWidth: true
@@ -4101,7 +4123,7 @@ function TemplatePanel({
4101
4123
  window.alert(t("settings.copied", "Template copied successfully!"));
4102
4124
  }
4103
4125
  };
4104
- const workspaceToggle = /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Editor appearance" }, /* @__PURE__ */ React62.createElement(Stack, { spacing: 1 }, /* @__PURE__ */ React62.createElement(Typography, { variant: "caption", sx: { color: "text.secondary" } }, t("settings.workspace-background", "Workspace background")), /* @__PURE__ */ React62.createElement(
4126
+ const workspaceToggle = /* @__PURE__ */ React63.createElement(BaseSidebarPanel, { title: "Editor appearance" }, /* @__PURE__ */ React63.createElement(Stack, { spacing: 1 }, /* @__PURE__ */ React63.createElement(Typography, { variant: "caption", sx: { color: "text.secondary" } }, t("settings.workspace-background", "Workspace background")), /* @__PURE__ */ React63.createElement(
4105
4127
  ToggleButtonGroup,
4106
4128
  {
4107
4129
  value: workspaceBackground,
@@ -4109,13 +4131,13 @@ function TemplatePanel({
4109
4131
  size: "small",
4110
4132
  onChange: (_, v) => v && setWorkspaceBackground(v)
4111
4133
  },
4112
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "checkerboard", sx: { textTransform: "none", gap: 0.75 } }, /* @__PURE__ */ React62.createElement(GridOnOutlined, { fontSize: "small" }), t("settings.checkerboard", "Checkerboard")),
4113
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "solid", sx: { textTransform: "none", gap: 0.75 } }, /* @__PURE__ */ React62.createElement(SquareOutlined, { fontSize: "small" }), t("settings.solid", "Solid"))
4114
- ), /* @__PURE__ */ React62.createElement(Typography, { variant: "caption", sx: { color: "text.disabled" } }, t("settings.editor-only-hint", "Editor-only \u2014 never reaches the rendered email."))));
4134
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "checkerboard", sx: { textTransform: "none", gap: 0.75 } }, /* @__PURE__ */ React63.createElement(GridOnOutlined, { fontSize: "small" }), t("settings.checkerboard", "Checkerboard")),
4135
+ /* @__PURE__ */ React63.createElement(ToggleButton, { value: "solid", sx: { textTransform: "none", gap: 0.75 } }, /* @__PURE__ */ React63.createElement(SquareOutlined, { fontSize: "small" }), t("settings.solid", "Solid"))
4136
+ ), /* @__PURE__ */ React63.createElement(Typography, { variant: "caption", sx: { color: "text.disabled" } }, t("settings.editor-only-hint", "Editor-only \u2014 never reaches the rendered email."))));
4115
4137
  if (!currentTemplateId) {
4116
- return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Template" }, t("settings.no-template", "No template selected")), workspaceToggle);
4138
+ return /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(BaseSidebarPanel, { title: "Template" }, t("settings.no-template", "No template selected")), workspaceToggle);
4117
4139
  }
4118
- return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Details" }, /* @__PURE__ */ React62.createElement(
4140
+ return /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(BaseSidebarPanel, { title: "Details" }, /* @__PURE__ */ React63.createElement(
4119
4141
  DetailsEditor,
4120
4142
  {
4121
4143
  templateId: currentTemplateId,
@@ -4129,7 +4151,7 @@ function TemplatePanel({
4129
4151
  setCurrentTemplateTags(tags);
4130
4152
  })
4131
4153
  }
4132
- )), /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Template" }, /* @__PURE__ */ React62.createElement(Stack, { spacing: 2 }, !persistenceEnabled && /* @__PURE__ */ React62.createElement(
4154
+ )), /* @__PURE__ */ React63.createElement(BaseSidebarPanel, { title: "Template" }, /* @__PURE__ */ React63.createElement(Stack, { spacing: 2 }, !persistenceEnabled && /* @__PURE__ */ React63.createElement(
4133
4155
  Typography,
4134
4156
  {
4135
4157
  variant: "body2",
@@ -4142,29 +4164,29 @@ function TemplatePanel({
4142
4164
  }
4143
4165
  },
4144
4166
  t("settings.save-disabled", "Save functionality is disabled. To enable saving, provide the necessary callback functions.")
4145
- ), persistenceEnabled && /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
4167
+ ), persistenceEnabled && /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(
4146
4168
  Button$1,
4147
4169
  {
4148
4170
  variant: "outlined",
4149
4171
  color: "primary",
4150
- startIcon: /* @__PURE__ */ React62.createElement(ContentCopyOutlined, null),
4172
+ startIcon: /* @__PURE__ */ React63.createElement(ContentCopyOutlined, null),
4151
4173
  onClick: handleCopyToSamples,
4152
4174
  fullWidth: true,
4153
4175
  disabled: !copyTemplate
4154
4176
  },
4155
4177
  t("settings.save-as-sample", "Save as Sample Template")
4156
- ), /* @__PURE__ */ React62.createElement(
4178
+ ), /* @__PURE__ */ React63.createElement(
4157
4179
  Button$1,
4158
4180
  {
4159
4181
  variant: "outlined",
4160
4182
  color: "error",
4161
- startIcon: /* @__PURE__ */ React62.createElement(DeleteOutlined, null),
4183
+ startIcon: /* @__PURE__ */ React63.createElement(DeleteOutlined, null),
4162
4184
  onClick: handleDelete,
4163
4185
  fullWidth: true,
4164
4186
  disabled: !deleteTemplate
4165
4187
  },
4166
4188
  t("settings.delete", "Delete Template")
4167
- )))), persistenceEnabled && /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Export" }, /* @__PURE__ */ React62.createElement(Stack, { spacing: 2 }, /* @__PURE__ */ React62.createElement(TemplateDownloadButton, null))), workspaceToggle);
4189
+ )))), persistenceEnabled && /* @__PURE__ */ React63.createElement(BaseSidebarPanel, { title: "Export" }, /* @__PURE__ */ React63.createElement(Stack, { spacing: 2 }, /* @__PURE__ */ React63.createElement(TemplateDownloadButton, null))), workspaceToggle);
4168
4190
  }
4169
4191
  function DetailsEditor({ templateId, currentName, currentTags, canEdit, onSave }) {
4170
4192
  const [name, setName] = useState(currentName);
@@ -4201,7 +4223,7 @@ function DetailsEditor({ templateId, currentName, currentTags, canEdit, onSave }
4201
4223
  setSaving(false);
4202
4224
  }
4203
4225
  });
4204
- return /* @__PURE__ */ React62.createElement(Stack, { spacing: 1.5 }, /* @__PURE__ */ React62.createElement(
4226
+ return /* @__PURE__ */ React63.createElement(Stack, { spacing: 1.5 }, /* @__PURE__ */ React63.createElement(
4205
4227
  TextField,
4206
4228
  {
4207
4229
  size: "small",
@@ -4211,7 +4233,7 @@ function DetailsEditor({ templateId, currentName, currentTags, canEdit, onSave }
4211
4233
  disabled: !canEdit || saving,
4212
4234
  fullWidth: true
4213
4235
  }
4214
- ), /* @__PURE__ */ React62.createElement(Box, null, /* @__PURE__ */ React62.createElement(Typography, { variant: "caption", sx: { color: "text.secondary", display: "block", mb: 0.5 } }, t("rename.tags", "Tags")), tags.length > 0 ? /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 0.5, sx: { flexWrap: "wrap", gap: 0.5, mb: 1 } }, tags.map((tag) => /* @__PURE__ */ React62.createElement(
4236
+ ), /* @__PURE__ */ React63.createElement(Box, null, /* @__PURE__ */ React63.createElement(Typography, { variant: "caption", sx: { color: "text.secondary", display: "block", mb: 0.5 } }, t("rename.tags", "Tags")), tags.length > 0 ? /* @__PURE__ */ React63.createElement(Stack, { direction: "row", spacing: 0.5, sx: { flexWrap: "wrap", gap: 0.5, mb: 1 } }, tags.map((tag) => /* @__PURE__ */ React63.createElement(
4215
4237
  Chip,
4216
4238
  {
4217
4239
  key: tag,
@@ -4219,7 +4241,7 @@ function DetailsEditor({ templateId, currentName, currentTags, canEdit, onSave }
4219
4241
  size: "small",
4220
4242
  onDelete: canEdit && !saving ? () => removeTag(tag) : void 0
4221
4243
  }
4222
- ))) : /* @__PURE__ */ React62.createElement(Typography, { variant: "caption", sx: { color: "text.disabled", display: "block", mb: 1 } }, t("rename.no-tags", "No tags yet.")), /* @__PURE__ */ React62.createElement(
4244
+ ))) : /* @__PURE__ */ React63.createElement(Typography, { variant: "caption", sx: { color: "text.disabled", display: "block", mb: 1 } }, t("rename.no-tags", "No tags yet.")), /* @__PURE__ */ React63.createElement(
4223
4245
  TextField,
4224
4246
  {
4225
4247
  size: "small",
@@ -4238,20 +4260,20 @@ function DetailsEditor({ templateId, currentName, currentTags, canEdit, onSave }
4238
4260
  }
4239
4261
  },
4240
4262
  InputProps: {
4241
- endAdornment: /* @__PURE__ */ React62.createElement(InputAdornment, { position: "end" }, /* @__PURE__ */ React62.createElement(
4263
+ endAdornment: /* @__PURE__ */ React63.createElement(InputAdornment, { position: "end" }, /* @__PURE__ */ React63.createElement(
4242
4264
  Button$1,
4243
4265
  {
4244
4266
  size: "small",
4245
4267
  onClick: addTag,
4246
4268
  disabled: !canEdit || saving || !tagInput.trim(),
4247
- startIcon: /* @__PURE__ */ React62.createElement(AddOutlined, { fontSize: "small" }),
4269
+ startIcon: /* @__PURE__ */ React63.createElement(AddOutlined, { fontSize: "small" }),
4248
4270
  sx: { textTransform: "none" }
4249
4271
  },
4250
4272
  t("common.add", "Add")
4251
4273
  ))
4252
4274
  }
4253
4275
  }
4254
- )), /* @__PURE__ */ React62.createElement(Tooltip, { title: canEdit ? "" : t("settings.no-rename-cb", "Wire a renameTemplate callback to enable editing from here"), placement: "top" }, /* @__PURE__ */ React62.createElement("span", null, /* @__PURE__ */ React62.createElement(
4276
+ )), /* @__PURE__ */ React63.createElement(Tooltip, { title: canEdit ? "" : t("settings.no-rename-cb", "Wire a renameTemplate callback to enable editing from here"), placement: "top" }, /* @__PURE__ */ React63.createElement("span", null, /* @__PURE__ */ React63.createElement(
4255
4277
  Button$1,
4256
4278
  {
4257
4279
  variant: "contained",
@@ -4259,7 +4281,7 @@ function DetailsEditor({ templateId, currentName, currentTags, canEdit, onSave }
4259
4281
  fullWidth: true,
4260
4282
  onClick: handleSave,
4261
4283
  disabled: !canEdit || saving || !dirty || !name.trim(),
4262
- startIcon: justSaved ? /* @__PURE__ */ React62.createElement(CheckOutlined, { fontSize: "small" }) : null
4284
+ startIcon: justSaved ? /* @__PURE__ */ React63.createElement(CheckOutlined, { fontSize: "small" }) : null
4263
4285
  },
4264
4286
  saving ? t("common.saving", "Saving\u2026") : justSaved ? t("settings.saved", "Saved") : t("settings.save-details", "Save details")
4265
4287
  ))));
@@ -4436,7 +4458,7 @@ function VariablesPanel() {
4436
4458
  const lastFocused = useLastFocusedEditable();
4437
4459
  const root = document2.root;
4438
4460
  if (!root || root.type !== "EmailLayout") {
4439
- return /* @__PURE__ */ React62.createElement(Box, { p: 2 }, /* @__PURE__ */ React62.createElement(Alert, { severity: "info" }, t("variables.open-template", "Open a template to manage variables.")));
4461
+ return /* @__PURE__ */ React63.createElement(Box, { p: 2 }, /* @__PURE__ */ React63.createElement(Alert, { severity: "info" }, t("variables.open-template", "Open a template to manage variables.")));
4440
4462
  }
4441
4463
  const data = root.data;
4442
4464
  const variables = ((_a = data.variables) != null ? _a : []).map((v) => {
@@ -4531,10 +4553,10 @@ function VariablesPanel() {
4531
4553
  } catch (e) {
4532
4554
  }
4533
4555
  });
4534
- return /* @__PURE__ */ React62.createElement(Box, { p: 2 }, /* @__PURE__ */ React62.createElement(Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", sx: { mb: 1 } }, /* @__PURE__ */ React62.createElement(Typography, { variant: "subtitle1", sx: { fontWeight: 600 } }, t("variables.title", "Variables")), /* @__PURE__ */ React62.createElement(Tooltip, { title: t("variables.add", "Add variable") }, /* @__PURE__ */ React62.createElement(IconButton, { size: "small", onClick: add, "aria-label": t("variables.add", "Add variable") }, /* @__PURE__ */ React62.createElement(AddOutlined, { fontSize: "small" })))), /* @__PURE__ */ React62.createElement(Typography, { variant: "caption", sx: { color: "text.secondary", display: "block", mb: 2 } }, t(
4556
+ return /* @__PURE__ */ React63.createElement(Box, { p: 2 }, /* @__PURE__ */ React63.createElement(Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", sx: { mb: 1 } }, /* @__PURE__ */ React63.createElement(Typography, { variant: "subtitle1", sx: { fontWeight: 600 } }, t("variables.title", "Variables")), /* @__PURE__ */ React63.createElement(Tooltip, { title: t("variables.add", "Add variable") }, /* @__PURE__ */ React63.createElement(IconButton, { size: "small", onClick: add, "aria-label": t("variables.add", "Add variable") }, /* @__PURE__ */ React63.createElement(AddOutlined, { fontSize: "small" })))), /* @__PURE__ */ React63.createElement(Typography, { variant: "caption", sx: { color: "text.secondary", display: "block", mb: 2 } }, t(
4535
4557
  "variables.intro",
4536
4558
  "Declared variables travel with the template. Reference them in subject and body as {{name}}. In Preview mode, tokens render with the sample values below."
4537
- )), undeclared.length > 0 && /* @__PURE__ */ React62.createElement(Alert, { severity: "warning", sx: { mb: 2 } }, /* @__PURE__ */ React62.createElement(AlertTitle, { sx: { fontSize: 13 } }, t("variables.undeclared", "Undeclared in body")), /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 0.5, useFlexGap: true, flexWrap: "wrap" }, undeclared.map((name) => /* @__PURE__ */ React62.createElement(
4559
+ )), undeclared.length > 0 && /* @__PURE__ */ React63.createElement(Alert, { severity: "warning", sx: { mb: 2 } }, /* @__PURE__ */ React63.createElement(AlertTitle, { sx: { fontSize: 13 } }, t("variables.undeclared", "Undeclared in body")), /* @__PURE__ */ React63.createElement(Stack, { direction: "row", spacing: 0.5, useFlexGap: true, flexWrap: "wrap" }, undeclared.map((name) => /* @__PURE__ */ React63.createElement(
4538
4560
  Chip,
4539
4561
  {
4540
4562
  key: name,
@@ -4542,12 +4564,12 @@ function VariablesPanel() {
4542
4564
  label: name,
4543
4565
  onClick: () => addFromToken(name),
4544
4566
  onDelete: () => addFromToken(name),
4545
- deleteIcon: /* @__PURE__ */ React62.createElement(AddOutlined, null),
4567
+ deleteIcon: /* @__PURE__ */ React63.createElement(AddOutlined, null),
4546
4568
  sx: { fontFamily: "monospace" }
4547
4569
  }
4548
- ))), /* @__PURE__ */ React62.createElement(Typography, { variant: "caption", sx: { color: "text.secondary", display: "block", mt: 0.5 } }, t("variables.click-to-declare", "Click a token to declare it."))), variables.length === 0 ? /* @__PURE__ */ React62.createElement(Typography, { variant: "body2", sx: { color: "text.secondary" } }, t("variables.none", "No variables declared. Click + to add one.")) : /* @__PURE__ */ React62.createElement(Stack, { spacing: 2 }, variables.map((v, i) => {
4570
+ ))), /* @__PURE__ */ React63.createElement(Typography, { variant: "caption", sx: { color: "text.secondary", display: "block", mt: 0.5 } }, t("variables.click-to-declare", "Click a token to declare it."))), variables.length === 0 ? /* @__PURE__ */ React63.createElement(Typography, { variant: "body2", sx: { color: "text.secondary" } }, t("variables.none", "No variables declared. Click + to add one.")) : /* @__PURE__ */ React63.createElement(Stack, { spacing: 2 }, variables.map((v, i) => {
4549
4571
  var _a2;
4550
- return /* @__PURE__ */ React62.createElement(
4572
+ return /* @__PURE__ */ React63.createElement(
4551
4573
  VariableRow,
4552
4574
  {
4553
4575
  key: i,
@@ -4598,7 +4620,7 @@ function VariableRow({
4598
4620
  onCommitRename(draftName.trim());
4599
4621
  }
4600
4622
  };
4601
- return /* @__PURE__ */ React62.createElement(Stack, { spacing: 0.75, sx: { pb: 1, borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React62.createElement(
4623
+ return /* @__PURE__ */ React63.createElement(Stack, { spacing: 0.75, sx: { pb: 1, borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React63.createElement(Stack, { direction: "row", spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React63.createElement(
4602
4624
  TextField,
4603
4625
  {
4604
4626
  label: t("rename.name-label", "Name"),
@@ -4623,7 +4645,7 @@ function VariableRow({
4623
4645
  error: Boolean(nameError),
4624
4646
  helperText: nameError != null ? nameError : " "
4625
4647
  }
4626
- ), /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 0.25, sx: { mt: 0.5 } }, /* @__PURE__ */ React62.createElement(Tooltip, { title: t("variables.copy-token", "Copy {{name}} token") }, /* @__PURE__ */ React62.createElement("span", null, /* @__PURE__ */ React62.createElement(
4648
+ ), /* @__PURE__ */ React63.createElement(Stack, { direction: "row", spacing: 0.25, sx: { mt: 0.5 } }, /* @__PURE__ */ React63.createElement(Tooltip, { title: t("variables.copy-token", "Copy {{name}} token") }, /* @__PURE__ */ React63.createElement("span", null, /* @__PURE__ */ React63.createElement(
4627
4649
  IconButton,
4628
4650
  {
4629
4651
  size: "small",
@@ -4631,8 +4653,8 @@ function VariableRow({
4631
4653
  disabled: !hasName,
4632
4654
  "aria-label": t("variables.copy-token", "Copy {{name}} token")
4633
4655
  },
4634
- /* @__PURE__ */ React62.createElement(ContentCopyOutlined, { fontSize: "small" })
4635
- ))), /* @__PURE__ */ React62.createElement(Tooltip, { title: canInsert ? t("variables.insert-at-cursor", "Insert at cursor") : t("variables.focus-first", "Focus a text field first") }, /* @__PURE__ */ React62.createElement("span", null, /* @__PURE__ */ React62.createElement(
4656
+ /* @__PURE__ */ React63.createElement(ContentCopyOutlined, { fontSize: "small" })
4657
+ ))), /* @__PURE__ */ React63.createElement(Tooltip, { title: canInsert ? t("variables.insert-at-cursor", "Insert at cursor") : t("variables.focus-first", "Focus a text field first") }, /* @__PURE__ */ React63.createElement("span", null, /* @__PURE__ */ React63.createElement(
4636
4658
  IconButton,
4637
4659
  {
4638
4660
  size: "small",
@@ -4640,16 +4662,16 @@ function VariableRow({
4640
4662
  disabled: !hasName || !canInsert,
4641
4663
  "aria-label": t("variables.insert-at-cursor", "Insert at cursor")
4642
4664
  },
4643
- /* @__PURE__ */ React62.createElement(InputOutlined, { fontSize: "small" })
4644
- ))), /* @__PURE__ */ React62.createElement(Tooltip, { title: t("variables.remove", "Remove") }, /* @__PURE__ */ React62.createElement(
4665
+ /* @__PURE__ */ React63.createElement(InputOutlined, { fontSize: "small" })
4666
+ ))), /* @__PURE__ */ React63.createElement(Tooltip, { title: t("variables.remove", "Remove") }, /* @__PURE__ */ React63.createElement(
4645
4667
  IconButton,
4646
4668
  {
4647
4669
  size: "small",
4648
4670
  onClick: onRemove,
4649
4671
  "aria-label": t("variables.remove", "Remove")
4650
4672
  },
4651
- /* @__PURE__ */ React62.createElement(DeleteOutline, { fontSize: "small" })
4652
- )))), /* @__PURE__ */ React62.createElement(
4673
+ /* @__PURE__ */ React63.createElement(DeleteOutline, { fontSize: "small" })
4674
+ )))), /* @__PURE__ */ React63.createElement(
4653
4675
  TextField,
4654
4676
  {
4655
4677
  label: t("variables.description", "Description"),
@@ -4659,7 +4681,7 @@ function VariableRow({
4659
4681
  onChange: (e) => onChangeDescription(e.target.value),
4660
4682
  placeholder: t("variables.optional", "Optional")
4661
4683
  }
4662
- ), /* @__PURE__ */ React62.createElement(
4684
+ ), /* @__PURE__ */ React63.createElement(
4663
4685
  TextField,
4664
4686
  {
4665
4687
  label: t("variables.sample-value", "Sample value"),
@@ -4669,7 +4691,7 @@ function VariableRow({
4669
4691
  onChange: (e) => onChangeSampleValue(e.target.value),
4670
4692
  placeholder: t("variables.sample-hint", "Shown in Preview mode"),
4671
4693
  InputProps: {
4672
- startAdornment: /* @__PURE__ */ React62.createElement(
4694
+ startAdornment: /* @__PURE__ */ React63.createElement(
4673
4695
  DataObjectOutlined,
4674
4696
  {
4675
4697
  fontSize: "small",
@@ -4678,7 +4700,7 @@ function VariableRow({
4678
4700
  )
4679
4701
  }
4680
4702
  }
4681
- ), /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 0.5, sx: { pt: 0.25 } }, hasName && (unused ? /* @__PURE__ */ React62.createElement(Chip, { size: "small", color: "warning", variant: "outlined", label: t("variables.unused", "Unused in body") }) : /* @__PURE__ */ React62.createElement(
4703
+ ), /* @__PURE__ */ React63.createElement(Stack, { direction: "row", spacing: 0.5, sx: { pt: 0.25 } }, hasName && (unused ? /* @__PURE__ */ React63.createElement(Chip, { size: "small", color: "warning", variant: "outlined", label: t("variables.unused", "Unused in body") }) : /* @__PURE__ */ React63.createElement(
4682
4704
  Chip,
4683
4705
  {
4684
4706
  size: "small",
@@ -4703,13 +4725,13 @@ function InspectorDrawer({
4703
4725
  const renderCurrentSidebarPanel = () => {
4704
4726
  switch (selectedSidebarTab) {
4705
4727
  case "block-configuration":
4706
- return /* @__PURE__ */ React62.createElement(ConfigurationPanel, null);
4728
+ return /* @__PURE__ */ React63.createElement(ConfigurationPanel, null);
4707
4729
  case "styles":
4708
- return /* @__PURE__ */ React62.createElement(StylesPanel, null);
4730
+ return /* @__PURE__ */ React63.createElement(StylesPanel, null);
4709
4731
  case "variables":
4710
- return /* @__PURE__ */ React62.createElement(VariablesPanel, null);
4732
+ return /* @__PURE__ */ React63.createElement(VariablesPanel, null);
4711
4733
  case "template-settings":
4712
- return /* @__PURE__ */ React62.createElement(
4734
+ return /* @__PURE__ */ React63.createElement(
4713
4735
  TemplatePanel,
4714
4736
  {
4715
4737
  deleteTemplate,
@@ -4719,7 +4741,7 @@ function InspectorDrawer({
4719
4741
  );
4720
4742
  }
4721
4743
  };
4722
- return /* @__PURE__ */ React62.createElement(
4744
+ return /* @__PURE__ */ React63.createElement(
4723
4745
  Drawer,
4724
4746
  {
4725
4747
  variant: "persistent",
@@ -4741,7 +4763,7 @@ function InspectorDrawer({
4741
4763
  width: inspectorDrawerOpen ? INSPECTOR_DRAWER_WIDTH : 0
4742
4764
  }
4743
4765
  },
4744
- /* @__PURE__ */ React62.createElement(Box, { sx: { width: INSPECTOR_DRAWER_WIDTH, height: 49, borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React62.createElement(Box, { px: 1 }, /* @__PURE__ */ React62.createElement(
4766
+ /* @__PURE__ */ React63.createElement(Box, { sx: { width: INSPECTOR_DRAWER_WIDTH, height: 49, borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React63.createElement(Box, { px: 1 }, /* @__PURE__ */ React63.createElement(
4745
4767
  Tabs,
4746
4768
  {
4747
4769
  value: selectedSidebarTab,
@@ -4749,12 +4771,12 @@ function InspectorDrawer({
4749
4771
  variant: "fullWidth",
4750
4772
  sx: { "& .MuiTab-root": { minWidth: 0, px: 1, fontSize: 13 } }
4751
4773
  },
4752
- /* @__PURE__ */ React62.createElement(Tab, { value: "styles", label: t("inspector.tab.styles", "Styles") }),
4753
- /* @__PURE__ */ React62.createElement(Tab, { value: "block-configuration", label: t("inspector.tab.inspect", "Inspect") }),
4754
- /* @__PURE__ */ React62.createElement(Tab, { value: "variables", label: t("inspector.tab.variables", "Variables") }),
4755
- /* @__PURE__ */ React62.createElement(Tab, { value: "template-settings", label: t("inspector.tab.settings", "Settings") })
4774
+ /* @__PURE__ */ React63.createElement(Tab, { value: "styles", label: t("inspector.tab.styles", "Styles") }),
4775
+ /* @__PURE__ */ React63.createElement(Tab, { value: "block-configuration", label: t("inspector.tab.inspect", "Inspect") }),
4776
+ /* @__PURE__ */ React63.createElement(Tab, { value: "variables", label: t("inspector.tab.variables", "Variables") }),
4777
+ /* @__PURE__ */ React63.createElement(Tab, { value: "template-settings", label: t("inspector.tab.settings", "Settings") })
4756
4778
  ))),
4757
- /* @__PURE__ */ React62.createElement(Box, { sx: { width: INSPECTOR_DRAWER_WIDTH, height: "calc(100% - 49px)", overflow: "auto" } }, renderCurrentSidebarPanel())
4779
+ /* @__PURE__ */ React63.createElement(Box, { sx: { width: INSPECTOR_DRAWER_WIDTH, height: "calc(100% - 49px)", overflow: "auto" } }, renderCurrentSidebarPanel())
4758
4780
  );
4759
4781
  }
4760
4782
  var SnackbarContext = createContext(null);
@@ -4775,7 +4797,7 @@ function SnackbarProvider({ children }) {
4775
4797
  const handleClose = () => {
4776
4798
  setMessage(null);
4777
4799
  };
4778
- return /* @__PURE__ */ React62.createElement(SnackbarContext.Provider, { value: { showMessage } }, children, /* @__PURE__ */ React62.createElement(
4800
+ return /* @__PURE__ */ React63.createElement(SnackbarContext.Provider, { value: { showMessage } }, children, /* @__PURE__ */ React63.createElement(
4779
4801
  Snackbar,
4780
4802
  {
4781
4803
  anchorOrigin: { vertical: "top", horizontal: "center" },
@@ -4852,7 +4874,7 @@ function TemplateRow({
4852
4874
  const hasActions = Boolean(
4853
4875
  onDuplicate || onRename || onDelete || onPromote || onDemote || onDuplicateAsTemplate
4854
4876
  );
4855
- return /* @__PURE__ */ React62.createElement(
4877
+ return /* @__PURE__ */ React63.createElement(
4856
4878
  Box,
4857
4879
  {
4858
4880
  role: "button",
@@ -4878,7 +4900,7 @@ function TemplateRow({
4878
4900
  "&:focus-visible": { outline: "2px solid", outlineColor: "primary.main" }
4879
4901
  }
4880
4902
  },
4881
- /* @__PURE__ */ React62.createElement(Stack, { direction: "row", alignItems: "flex-start", spacing: 1 }, /* @__PURE__ */ React62.createElement(Box, { sx: { flexGrow: 1, minWidth: 0, pr: hasActions ? 3 : 0 } }, /* @__PURE__ */ React62.createElement(Stack, { direction: "row", alignItems: "baseline", spacing: 1, sx: { minWidth: 0 } }, /* @__PURE__ */ React62.createElement(
4903
+ /* @__PURE__ */ React63.createElement(Stack, { direction: "row", alignItems: "flex-start", spacing: 1 }, /* @__PURE__ */ React63.createElement(Box, { sx: { flexGrow: 1, minWidth: 0, pr: hasActions ? 3 : 0 } }, /* @__PURE__ */ React63.createElement(Stack, { direction: "row", alignItems: "baseline", spacing: 1, sx: { minWidth: 0 } }, /* @__PURE__ */ React63.createElement(
4882
4904
  Typography,
4883
4905
  {
4884
4906
  variant: "body2",
@@ -4892,14 +4914,14 @@ function TemplateRow({
4892
4914
  title: template.slug
4893
4915
  },
4894
4916
  template.slug
4895
- ), updated && !hasActions && /* @__PURE__ */ React62.createElement(
4917
+ ), updated && !hasActions && /* @__PURE__ */ React63.createElement(
4896
4918
  Typography,
4897
4919
  {
4898
4920
  variant: "caption",
4899
4921
  sx: { color: "text.secondary", flexShrink: 0, fontSize: "0.7rem" }
4900
4922
  },
4901
4923
  updated
4902
- )), template.description && /* @__PURE__ */ React62.createElement(
4924
+ )), template.description && /* @__PURE__ */ React63.createElement(
4903
4925
  Typography,
4904
4926
  {
4905
4927
  variant: "caption",
@@ -4913,7 +4935,7 @@ function TemplateRow({
4913
4935
  }
4914
4936
  },
4915
4937
  template.description
4916
- ), template.tags && template.tags.length > 0 && /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 0.5, sx: { mt: 0.5, flexWrap: "wrap", gap: 0.5 } }, template.tags.map((tag) => /* @__PURE__ */ React62.createElement(
4938
+ ), template.tags && template.tags.length > 0 && /* @__PURE__ */ React63.createElement(Stack, { direction: "row", spacing: 0.5, sx: { mt: 0.5, flexWrap: "wrap", gap: 0.5 } }, template.tags.map((tag) => /* @__PURE__ */ React63.createElement(
4917
4939
  Chip,
4918
4940
  {
4919
4941
  key: tag,
@@ -4922,7 +4944,7 @@ function TemplateRow({
4922
4944
  sx: { height: 18, fontSize: "0.65rem", "& .MuiChip-label": { px: 0.75 } }
4923
4945
  }
4924
4946
  ))))),
4925
- hasActions && /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(Tooltip, { title: t("row.more", "More") }, /* @__PURE__ */ React62.createElement(
4947
+ hasActions && /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(Tooltip, { title: t("row.more", "More") }, /* @__PURE__ */ React63.createElement(
4926
4948
  IconButton,
4927
4949
  {
4928
4950
  size: "small",
@@ -4938,8 +4960,8 @@ function TemplateRow({
4938
4960
  transition: "opacity 120ms"
4939
4961
  }
4940
4962
  },
4941
- /* @__PURE__ */ React62.createElement(MoreVertOutlined, { fontSize: "small" })
4942
- )), /* @__PURE__ */ React62.createElement(
4963
+ /* @__PURE__ */ React63.createElement(MoreVertOutlined, { fontSize: "small" })
4964
+ )), /* @__PURE__ */ React63.createElement(
4943
4965
  Menu,
4944
4966
  {
4945
4967
  anchorEl: menuAnchor,
@@ -4950,14 +4972,14 @@ function TemplateRow({
4950
4972
  transformOrigin: { vertical: "top", horizontal: "right" },
4951
4973
  slotProps: { paper: { sx: { minWidth: 200 } } }
4952
4974
  },
4953
- onRename && /* @__PURE__ */ React62.createElement(MenuItem, { onClick: runAction(onRename) }, /* @__PURE__ */ React62.createElement(ListItemIcon, null, /* @__PURE__ */ React62.createElement(DriveFileRenameOutlineOutlined, { fontSize: "small" })), /* @__PURE__ */ React62.createElement(ListItemText, null, t("row.edit-details", "Edit name & tags\u2026"))),
4954
- onDuplicate && /* @__PURE__ */ React62.createElement(MenuItem, { onClick: runAction(onDuplicate) }, /* @__PURE__ */ React62.createElement(ListItemIcon, null, /* @__PURE__ */ React62.createElement(ContentCopyOutlined, { fontSize: "small" })), /* @__PURE__ */ React62.createElement(ListItemText, null, t("row.duplicate", "Duplicate"))),
4955
- onDuplicateAsTemplate && /* @__PURE__ */ React62.createElement(MenuItem, { onClick: runAction(onDuplicateAsTemplate) }, /* @__PURE__ */ React62.createElement(ListItemIcon, null, /* @__PURE__ */ React62.createElement(LibraryAddOutlined, { fontSize: "small" })), /* @__PURE__ */ React62.createElement(ListItemText, null, t("row.duplicate-as-template", "Duplicate as template"))),
4956
- onPromote && /* @__PURE__ */ React62.createElement(MenuItem, { onClick: runAction(onPromote) }, /* @__PURE__ */ React62.createElement(ListItemIcon, null, /* @__PURE__ */ React62.createElement(FileUploadOutlined, { fontSize: "small" })), /* @__PURE__ */ React62.createElement(ListItemText, null, t("row.promote", "Promote to sample"))),
4957
- onDemote && /* @__PURE__ */ React62.createElement(MenuItem, { onClick: runAction(onDemote) }, /* @__PURE__ */ React62.createElement(ListItemIcon, null, /* @__PURE__ */ React62.createElement(FileDownloadOutlined, { fontSize: "small" })), /* @__PURE__ */ React62.createElement(ListItemText, null, t("row.demote", "Demote to template"))),
4975
+ onRename && /* @__PURE__ */ React63.createElement(MenuItem, { onClick: runAction(onRename) }, /* @__PURE__ */ React63.createElement(ListItemIcon, null, /* @__PURE__ */ React63.createElement(DriveFileRenameOutlineOutlined, { fontSize: "small" })), /* @__PURE__ */ React63.createElement(ListItemText, null, t("row.edit-details", "Edit name & tags\u2026"))),
4976
+ onDuplicate && /* @__PURE__ */ React63.createElement(MenuItem, { onClick: runAction(onDuplicate) }, /* @__PURE__ */ React63.createElement(ListItemIcon, null, /* @__PURE__ */ React63.createElement(ContentCopyOutlined, { fontSize: "small" })), /* @__PURE__ */ React63.createElement(ListItemText, null, t("row.duplicate", "Duplicate"))),
4977
+ onDuplicateAsTemplate && /* @__PURE__ */ React63.createElement(MenuItem, { onClick: runAction(onDuplicateAsTemplate) }, /* @__PURE__ */ React63.createElement(ListItemIcon, null, /* @__PURE__ */ React63.createElement(LibraryAddOutlined, { fontSize: "small" })), /* @__PURE__ */ React63.createElement(ListItemText, null, t("row.duplicate-as-template", "Duplicate as template"))),
4978
+ onPromote && /* @__PURE__ */ React63.createElement(MenuItem, { onClick: runAction(onPromote) }, /* @__PURE__ */ React63.createElement(ListItemIcon, null, /* @__PURE__ */ React63.createElement(FileUploadOutlined, { fontSize: "small" })), /* @__PURE__ */ React63.createElement(ListItemText, null, t("row.promote", "Promote to sample"))),
4979
+ onDemote && /* @__PURE__ */ React63.createElement(MenuItem, { onClick: runAction(onDemote) }, /* @__PURE__ */ React63.createElement(ListItemIcon, null, /* @__PURE__ */ React63.createElement(FileDownloadOutlined, { fontSize: "small" })), /* @__PURE__ */ React63.createElement(ListItemText, null, t("row.demote", "Demote to template"))),
4958
4980
  onDelete && [
4959
- /* @__PURE__ */ React62.createElement(Divider$1, { key: "divider" }),
4960
- /* @__PURE__ */ React62.createElement(MenuItem, { key: "delete", onClick: runAction(onDelete), sx: { color: "error.main" } }, /* @__PURE__ */ React62.createElement(ListItemIcon, { sx: { color: "error.main" } }, /* @__PURE__ */ React62.createElement(DeleteOutlined, { fontSize: "small" })), /* @__PURE__ */ React62.createElement(ListItemText, null, t("tune.delete", "Delete")))
4981
+ /* @__PURE__ */ React63.createElement(Divider$1, { key: "divider" }),
4982
+ /* @__PURE__ */ React63.createElement(MenuItem, { key: "delete", onClick: runAction(onDelete), sx: { color: "error.main" } }, /* @__PURE__ */ React63.createElement(ListItemIcon, { sx: { color: "error.main" } }, /* @__PURE__ */ React63.createElement(DeleteOutlined, { fontSize: "small" })), /* @__PURE__ */ React63.createElement(ListItemText, null, t("tune.delete", "Delete")))
4961
4983
  ]
4962
4984
  ))
4963
4985
  );
@@ -5072,31 +5094,31 @@ var PREVIEW_MAX = 36;
5072
5094
  function iconForType(type) {
5073
5095
  switch (type) {
5074
5096
  case "EmailLayout":
5075
- return /* @__PURE__ */ React62.createElement(DashboardOutlined, { fontSize: "small" });
5097
+ return /* @__PURE__ */ React63.createElement(DashboardOutlined, { fontSize: "small" });
5076
5098
  case "Heading":
5077
- return /* @__PURE__ */ React62.createElement(HMobiledataOutlined, { fontSize: "small" });
5099
+ return /* @__PURE__ */ React63.createElement(HMobiledataOutlined, { fontSize: "small" });
5078
5100
  case "Text":
5079
- return /* @__PURE__ */ React62.createElement(NotesOutlined, { fontSize: "small" });
5101
+ return /* @__PURE__ */ React63.createElement(NotesOutlined, { fontSize: "small" });
5080
5102
  case "Button":
5081
- return /* @__PURE__ */ React62.createElement(SmartButtonOutlined, { fontSize: "small" });
5103
+ return /* @__PURE__ */ React63.createElement(SmartButtonOutlined, { fontSize: "small" });
5082
5104
  case "Image":
5083
- return /* @__PURE__ */ React62.createElement(ImageOutlined, { fontSize: "small" });
5105
+ return /* @__PURE__ */ React63.createElement(ImageOutlined, { fontSize: "small" });
5084
5106
  case "Avatar":
5085
- return /* @__PURE__ */ React62.createElement(AccountCircleOutlined, { fontSize: "small" });
5107
+ return /* @__PURE__ */ React63.createElement(AccountCircleOutlined, { fontSize: "small" });
5086
5108
  case "Signature":
5087
- return /* @__PURE__ */ React62.createElement(ContactMailOutlined, { fontSize: "small" });
5109
+ return /* @__PURE__ */ React63.createElement(ContactMailOutlined, { fontSize: "small" });
5088
5110
  case "Divider":
5089
- return /* @__PURE__ */ React62.createElement(HorizontalRuleOutlined, { fontSize: "small" });
5111
+ return /* @__PURE__ */ React63.createElement(HorizontalRuleOutlined, { fontSize: "small" });
5090
5112
  case "Spacer":
5091
- return /* @__PURE__ */ React62.createElement(Crop32Outlined, { fontSize: "small" });
5113
+ return /* @__PURE__ */ React63.createElement(Crop32Outlined, { fontSize: "small" });
5092
5114
  case "Html":
5093
- return /* @__PURE__ */ React62.createElement(HtmlOutlined, { fontSize: "small" });
5115
+ return /* @__PURE__ */ React63.createElement(HtmlOutlined, { fontSize: "small" });
5094
5116
  case "Container":
5095
- return /* @__PURE__ */ React62.createElement(LibraryAddOutlined, { fontSize: "small" });
5117
+ return /* @__PURE__ */ React63.createElement(LibraryAddOutlined, { fontSize: "small" });
5096
5118
  case "ColumnsContainer":
5097
- return /* @__PURE__ */ React62.createElement(ViewColumnOutlined, { fontSize: "small" });
5119
+ return /* @__PURE__ */ React63.createElement(ViewColumnOutlined, { fontSize: "small" });
5098
5120
  default:
5099
- return /* @__PURE__ */ React62.createElement(BusinessOutlined, { fontSize: "small" });
5121
+ return /* @__PURE__ */ React63.createElement(BusinessOutlined, { fontSize: "small" });
5100
5122
  }
5101
5123
  }
5102
5124
  function previewText(text) {
@@ -5174,7 +5196,7 @@ function buildNode(id, doc, ctx) {
5174
5196
  id: `${id}::col${colIdx}`,
5175
5197
  label: `Column ${colIdx + 1}`,
5176
5198
  preview: colChildren.length === 1 ? "1 child" : `${colChildren.length} children`,
5177
- icon: /* @__PURE__ */ React62.createElement(ViewColumnSharp, { fontSize: "small", sx: { opacity: 0.6 } }),
5199
+ icon: /* @__PURE__ */ React63.createElement(ViewColumnSharp, { fontSize: "small", sx: { opacity: 0.6 } }),
5178
5200
  children: colChildren,
5179
5201
  containerChildrenRef: parentForCol
5180
5202
  });
@@ -5236,7 +5258,7 @@ function OutlinePanel() {
5236
5258
  setSelectedBlockId(payload.sourceId);
5237
5259
  }
5238
5260
  };
5239
- return /* @__PURE__ */ React62.createElement(Box, null, /* @__PURE__ */ React62.createElement(Typography, { variant: "subtitle2", component: "h2", sx: { fontWeight: "bold", mb: 0.5, px: 0.5 } }, t("outline.title", "Outline")), /* @__PURE__ */ React62.createElement(Typography, { variant: "caption", sx: { display: "block", color: "text.secondary", px: 0.5, mb: 1 } }, t("outline.hint", "Click a row to select. Drag a row to reorder or move it into a container.")), tree ? /* @__PURE__ */ React62.createElement(
5261
+ return /* @__PURE__ */ React63.createElement(Box, null, /* @__PURE__ */ React63.createElement(Typography, { variant: "subtitle2", component: "h2", sx: { fontWeight: "bold", mb: 0.5, px: 0.5 } }, t("outline.title", "Outline")), /* @__PURE__ */ React63.createElement(Typography, { variant: "caption", sx: { display: "block", color: "text.secondary", px: 0.5, mb: 1 } }, t("outline.hint", "Click a row to select. Drag a row to reorder or move it into a container.")), tree ? /* @__PURE__ */ React63.createElement(
5240
5262
  OutlineRow,
5241
5263
  {
5242
5264
  node: tree,
@@ -5247,7 +5269,7 @@ function OutlinePanel() {
5247
5269
  setDragging,
5248
5270
  performMove
5249
5271
  }
5250
- ) : /* @__PURE__ */ React62.createElement(Typography, { variant: "body2", sx: { color: "text.secondary", px: 0.5 } }, "Nothing to outline."));
5272
+ ) : /* @__PURE__ */ React63.createElement(Typography, { variant: "body2", sx: { color: "text.secondary", px: 0.5 } }, "Nothing to outline."));
5251
5273
  }
5252
5274
  function OutlineRow({
5253
5275
  node,
@@ -5333,7 +5355,7 @@ function OutlineRow({
5333
5355
  const patch = buildMovePatch(document2, node.id, node.parent, node.parent, nextIndex + (delta > 0 ? 1 : 0));
5334
5356
  if (patch) setDocument(patch);
5335
5357
  };
5336
- return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(Box, { sx: { position: "relative" } }, dropPos === "before" && /* @__PURE__ */ React62.createElement(DropLine, { depth }), /* @__PURE__ */ React62.createElement(
5358
+ return /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(Box, { sx: { position: "relative" } }, dropPos === "before" && /* @__PURE__ */ React63.createElement(DropLine, { depth }), /* @__PURE__ */ React63.createElement(
5337
5359
  Stack,
5338
5360
  {
5339
5361
  direction: "row",
@@ -5366,7 +5388,7 @@ function OutlineRow({
5366
5388
  userSelect: "none"
5367
5389
  }
5368
5390
  },
5369
- hasChildren ? /* @__PURE__ */ React62.createElement(
5391
+ hasChildren ? /* @__PURE__ */ React63.createElement(
5370
5392
  Box,
5371
5393
  {
5372
5394
  role: "button",
@@ -5377,9 +5399,9 @@ function OutlineRow({
5377
5399
  },
5378
5400
  sx: { display: "flex", alignItems: "center", cursor: "pointer" }
5379
5401
  },
5380
- expanded ? /* @__PURE__ */ React62.createElement(ExpandMore, { fontSize: "small" }) : /* @__PURE__ */ React62.createElement(ChevronRight, { fontSize: "small" })
5381
- ) : /* @__PURE__ */ React62.createElement(Box, { sx: { width: 20 } }),
5382
- /* @__PURE__ */ React62.createElement(
5402
+ expanded ? /* @__PURE__ */ React63.createElement(ExpandMore, { fontSize: "small" }) : /* @__PURE__ */ React63.createElement(ChevronRight, { fontSize: "small" })
5403
+ ) : /* @__PURE__ */ React63.createElement(Box, { sx: { width: 20 } }),
5404
+ /* @__PURE__ */ React63.createElement(
5383
5405
  Box,
5384
5406
  {
5385
5407
  sx: {
@@ -5391,7 +5413,7 @@ function OutlineRow({
5391
5413
  },
5392
5414
  node.icon
5393
5415
  ),
5394
- /* @__PURE__ */ React62.createElement(
5416
+ /* @__PURE__ */ React63.createElement(
5395
5417
  Typography,
5396
5418
  {
5397
5419
  variant: "body2",
@@ -5403,7 +5425,7 @@ function OutlineRow({
5403
5425
  },
5404
5426
  node.label
5405
5427
  ),
5406
- node.preview && /* @__PURE__ */ React62.createElement(
5428
+ node.preview && /* @__PURE__ */ React63.createElement(
5407
5429
  Typography,
5408
5430
  {
5409
5431
  variant: "body2",
@@ -5419,7 +5441,7 @@ function OutlineRow({
5419
5441
  "\u2014 ",
5420
5442
  node.preview
5421
5443
  ),
5422
- canMove && /* @__PURE__ */ React62.createElement(
5444
+ canMove && /* @__PURE__ */ React63.createElement(
5423
5445
  Box,
5424
5446
  {
5425
5447
  className: "outline-move-btns",
@@ -5430,7 +5452,7 @@ function OutlineRow({
5430
5452
  transition: "opacity 120ms"
5431
5453
  }
5432
5454
  },
5433
- /* @__PURE__ */ React62.createElement(Tooltip, { title: "Move up" }, /* @__PURE__ */ React62.createElement("span", null, /* @__PURE__ */ React62.createElement(
5455
+ /* @__PURE__ */ React63.createElement(Tooltip, { title: "Move up" }, /* @__PURE__ */ React63.createElement("span", null, /* @__PURE__ */ React63.createElement(
5434
5456
  IconButton,
5435
5457
  {
5436
5458
  size: "small",
@@ -5442,9 +5464,9 @@ function OutlineRow({
5442
5464
  "aria-label": `Move ${node.label} up`,
5443
5465
  sx: { p: 0.25 }
5444
5466
  },
5445
- /* @__PURE__ */ React62.createElement(KeyboardArrowUp, { fontSize: "small" })
5467
+ /* @__PURE__ */ React63.createElement(KeyboardArrowUp, { fontSize: "small" })
5446
5468
  ))),
5447
- /* @__PURE__ */ React62.createElement(Tooltip, { title: "Move down" }, /* @__PURE__ */ React62.createElement("span", null, /* @__PURE__ */ React62.createElement(
5469
+ /* @__PURE__ */ React63.createElement(Tooltip, { title: "Move down" }, /* @__PURE__ */ React63.createElement("span", null, /* @__PURE__ */ React63.createElement(
5448
5470
  IconButton,
5449
5471
  {
5450
5472
  size: "small",
@@ -5456,10 +5478,10 @@ function OutlineRow({
5456
5478
  "aria-label": `Move ${node.label} down`,
5457
5479
  sx: { p: 0.25 }
5458
5480
  },
5459
- /* @__PURE__ */ React62.createElement(KeyboardArrowDown, { fontSize: "small" })
5481
+ /* @__PURE__ */ React63.createElement(KeyboardArrowDown, { fontSize: "small" })
5460
5482
  )))
5461
5483
  )
5462
- ), dropPos === "after" && /* @__PURE__ */ React62.createElement(DropLine, { depth })), hasChildren && expanded && /* @__PURE__ */ React62.createElement(Box, null, node.children.map((child) => /* @__PURE__ */ React62.createElement(
5484
+ ), dropPos === "after" && /* @__PURE__ */ React63.createElement(DropLine, { depth })), hasChildren && expanded && /* @__PURE__ */ React63.createElement(Box, null, node.children.map((child) => /* @__PURE__ */ React63.createElement(
5463
5485
  OutlineRow,
5464
5486
  {
5465
5487
  key: child.id,
@@ -5474,7 +5496,7 @@ function OutlineRow({
5474
5496
  ))));
5475
5497
  }
5476
5498
  function DropLine({ depth }) {
5477
- return /* @__PURE__ */ React62.createElement(
5499
+ return /* @__PURE__ */ React63.createElement(
5478
5500
  Box,
5479
5501
  {
5480
5502
  sx: {
@@ -5482,7 +5504,7 @@ function DropLine({ depth }) {
5482
5504
  height: 0
5483
5505
  }
5484
5506
  },
5485
- /* @__PURE__ */ React62.createElement(
5507
+ /* @__PURE__ */ React63.createElement(
5486
5508
  Box,
5487
5509
  {
5488
5510
  sx: {
@@ -5543,7 +5565,7 @@ function NewTemplatePickerDialog({
5543
5565
  }
5544
5566
  });
5545
5567
  const pickable = samples.filter((s) => s.id !== "empty-email");
5546
- return /* @__PURE__ */ React62.createElement(Dialog, { open, onClose: busy ? void 0 : onClose, maxWidth: "sm", fullWidth: true }, /* @__PURE__ */ React62.createElement(DialogTitle, null, kind === "sample" ? t("picker.title-sample", "New sample") : t("picker.title-template", "New template")), /* @__PURE__ */ React62.createElement(DialogContent, { dividers: true }, /* @__PURE__ */ React62.createElement(Typography, { variant: "subtitle2", sx: { mb: 1 } }, t("picker.start-from", "Start from")), /* @__PURE__ */ React62.createElement(
5568
+ return /* @__PURE__ */ React63.createElement(Dialog, { open, onClose: busy ? void 0 : onClose, maxWidth: "sm", fullWidth: true }, /* @__PURE__ */ React63.createElement(DialogTitle, null, kind === "sample" ? t("picker.title-sample", "New sample") : t("picker.title-template", "New template")), /* @__PURE__ */ React63.createElement(DialogContent, { dividers: true }, /* @__PURE__ */ React63.createElement(Typography, { variant: "subtitle2", sx: { mb: 1 } }, t("picker.start-from", "Start from")), /* @__PURE__ */ React63.createElement(
5547
5569
  List,
5548
5570
  {
5549
5571
  dense: true,
@@ -5557,24 +5579,24 @@ function NewTemplatePickerDialog({
5557
5579
  overflowY: "auto"
5558
5580
  }
5559
5581
  },
5560
- /* @__PURE__ */ React62.createElement(
5582
+ /* @__PURE__ */ React63.createElement(
5561
5583
  ListItemButton,
5562
5584
  {
5563
5585
  selected: selectedStarter === null,
5564
5586
  onClick: () => setSelectedStarter(null)
5565
5587
  },
5566
- /* @__PURE__ */ React62.createElement(Box, { sx: { display: "flex", alignItems: "center", gap: 1.5, flex: 1 } }, /* @__PURE__ */ React62.createElement(InsertDriveFileOutlined, { fontSize: "small", sx: { color: "text.secondary" } }), /* @__PURE__ */ React62.createElement(ListItemText, { primary: t("picker.blank-title", "Blank"), secondary: t("picker.blank-desc", "Start from an empty email") }))
5588
+ /* @__PURE__ */ React63.createElement(Box, { sx: { display: "flex", alignItems: "center", gap: 1.5, flex: 1 } }, /* @__PURE__ */ React63.createElement(InsertDriveFileOutlined, { fontSize: "small", sx: { color: "text.secondary" } }), /* @__PURE__ */ React63.createElement(ListItemText, { primary: t("picker.blank-title", "Blank"), secondary: t("picker.blank-desc", "Start from an empty email") }))
5567
5589
  ),
5568
- pickable.map((s) => /* @__PURE__ */ React62.createElement(
5590
+ pickable.map((s) => /* @__PURE__ */ React63.createElement(
5569
5591
  ListItemButton,
5570
5592
  {
5571
5593
  key: s.id,
5572
5594
  selected: selectedStarter === s.id,
5573
5595
  onClick: () => setSelectedStarter(s.id)
5574
5596
  },
5575
- /* @__PURE__ */ React62.createElement(Box, { sx: { display: "flex", alignItems: "center", gap: 1.5, flex: 1 } }, /* @__PURE__ */ React62.createElement(DescriptionOutlined, { fontSize: "small", sx: { color: "text.secondary" } }), /* @__PURE__ */ React62.createElement(ListItemText, { primary: s.slug, secondary: s.description }))
5597
+ /* @__PURE__ */ React63.createElement(Box, { sx: { display: "flex", alignItems: "center", gap: 1.5, flex: 1 } }, /* @__PURE__ */ React63.createElement(DescriptionOutlined, { fontSize: "small", sx: { color: "text.secondary" } }), /* @__PURE__ */ React63.createElement(ListItemText, { primary: s.slug, secondary: s.description }))
5576
5598
  ))
5577
- ), /* @__PURE__ */ React62.createElement(
5599
+ ), /* @__PURE__ */ React63.createElement(
5578
5600
  TextField,
5579
5601
  {
5580
5602
  autoFocus: true,
@@ -5594,7 +5616,7 @@ function NewTemplatePickerDialog({
5594
5616
  helperText: error != null ? error : " ",
5595
5617
  disabled: busy
5596
5618
  }
5597
- )), /* @__PURE__ */ React62.createElement(DialogActions, null, /* @__PURE__ */ React62.createElement(Button$1, { onClick: onClose, disabled: busy }, t("common.cancel", "Cancel")), /* @__PURE__ */ React62.createElement(Button$1, { variant: "contained", onClick: handleCreate, disabled: busy }, busy ? t("picker.creating", "Creating\u2026") : kind === "sample" ? t("picker.create-sample", "Create sample") : t("picker.create-template", "Create template"))));
5619
+ )), /* @__PURE__ */ React63.createElement(DialogActions, null, /* @__PURE__ */ React63.createElement(Button$1, { onClick: onClose, disabled: busy }, t("common.cancel", "Cancel")), /* @__PURE__ */ React63.createElement(Button$1, { variant: "contained", onClick: handleCreate, disabled: busy }, busy ? t("picker.creating", "Creating\u2026") : kind === "sample" ? t("picker.create-sample", "Create sample") : t("picker.create-template", "Create template"))));
5598
5620
  }
5599
5621
  function RenameDialog({
5600
5622
  open,
@@ -5656,7 +5678,7 @@ function RenameDialog({
5656
5678
  setSubmitting(false);
5657
5679
  }
5658
5680
  });
5659
- return /* @__PURE__ */ React62.createElement(Dialog, { open, onClose: submitting ? void 0 : onClose, maxWidth: "sm", fullWidth: true }, /* @__PURE__ */ React62.createElement(DialogTitle, null, t("rename.title", "Edit details")), /* @__PURE__ */ React62.createElement(DialogContent, null, /* @__PURE__ */ React62.createElement(
5681
+ return /* @__PURE__ */ React63.createElement(Dialog, { open, onClose: submitting ? void 0 : onClose, maxWidth: "sm", fullWidth: true }, /* @__PURE__ */ React63.createElement(DialogTitle, null, t("rename.title", "Edit details")), /* @__PURE__ */ React63.createElement(DialogContent, null, /* @__PURE__ */ React63.createElement(
5660
5682
  TextField,
5661
5683
  {
5662
5684
  autoFocus: true,
@@ -5676,7 +5698,7 @@ function RenameDialog({
5676
5698
  if (e.key === "Enter" && !submitting) handleSubmit();
5677
5699
  }
5678
5700
  }
5679
- ), /* @__PURE__ */ React62.createElement(Typography, { variant: "caption", sx: { color: "text.secondary", display: "block", mt: 1, mb: 0.5 } }, t("rename.tags", "Tags")), tags.length > 0 ? /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 0.5, sx: { flexWrap: "wrap", gap: 0.5, mb: 1 } }, tags.map((tag) => /* @__PURE__ */ React62.createElement(
5701
+ ), /* @__PURE__ */ React63.createElement(Typography, { variant: "caption", sx: { color: "text.secondary", display: "block", mt: 1, mb: 0.5 } }, t("rename.tags", "Tags")), tags.length > 0 ? /* @__PURE__ */ React63.createElement(Stack, { direction: "row", spacing: 0.5, sx: { flexWrap: "wrap", gap: 0.5, mb: 1 } }, tags.map((tag) => /* @__PURE__ */ React63.createElement(
5680
5702
  Chip,
5681
5703
  {
5682
5704
  key: tag,
@@ -5684,7 +5706,7 @@ function RenameDialog({
5684
5706
  size: "small",
5685
5707
  onDelete: submitting ? void 0 : () => removeTag(tag)
5686
5708
  }
5687
- ))) : /* @__PURE__ */ React62.createElement(Typography, { variant: "caption", sx: { color: "text.disabled", display: "block", mb: 1 } }, t("rename.no-tags", "No tags yet.")), /* @__PURE__ */ React62.createElement(
5709
+ ))) : /* @__PURE__ */ React63.createElement(Typography, { variant: "caption", sx: { color: "text.disabled", display: "block", mb: 1 } }, t("rename.no-tags", "No tags yet.")), /* @__PURE__ */ React63.createElement(
5688
5710
  TextField,
5689
5711
  {
5690
5712
  size: "small",
@@ -5703,20 +5725,20 @@ function RenameDialog({
5703
5725
  }
5704
5726
  },
5705
5727
  InputProps: {
5706
- endAdornment: /* @__PURE__ */ React62.createElement(InputAdornment, { position: "end" }, /* @__PURE__ */ React62.createElement(
5728
+ endAdornment: /* @__PURE__ */ React63.createElement(InputAdornment, { position: "end" }, /* @__PURE__ */ React63.createElement(
5707
5729
  Button$1,
5708
5730
  {
5709
5731
  size: "small",
5710
5732
  onClick: addTag,
5711
5733
  disabled: !tagInput.trim() || submitting,
5712
- startIcon: /* @__PURE__ */ React62.createElement(AddOutlined, { fontSize: "small" }),
5734
+ startIcon: /* @__PURE__ */ React63.createElement(AddOutlined, { fontSize: "small" }),
5713
5735
  sx: { textTransform: "none" }
5714
5736
  },
5715
5737
  t("common.add", "Add")
5716
5738
  ))
5717
5739
  }
5718
5740
  }
5719
- ), /* @__PURE__ */ React62.createElement(Box, { sx: { minHeight: 8 } })), /* @__PURE__ */ React62.createElement(DialogActions, null, /* @__PURE__ */ React62.createElement(Button$1, { onClick: onClose, disabled: submitting }, t("common.cancel", "Cancel")), /* @__PURE__ */ React62.createElement(
5741
+ ), /* @__PURE__ */ React63.createElement(Box, { sx: { minHeight: 8 } })), /* @__PURE__ */ React63.createElement(DialogActions, null, /* @__PURE__ */ React63.createElement(Button$1, { onClick: onClose, disabled: submitting }, t("common.cancel", "Cancel")), /* @__PURE__ */ React63.createElement(
5720
5742
  Button$1,
5721
5743
  {
5722
5744
  onClick: handleSubmit,
@@ -5786,7 +5808,7 @@ function SaveTemplateDialog({
5786
5808
  setInternalError("");
5787
5809
  onClose();
5788
5810
  };
5789
- return /* @__PURE__ */ React62.createElement(
5811
+ return /* @__PURE__ */ React63.createElement(
5790
5812
  Dialog,
5791
5813
  {
5792
5814
  open,
@@ -5794,8 +5816,8 @@ function SaveTemplateDialog({
5794
5816
  maxWidth: "sm",
5795
5817
  fullWidth: true
5796
5818
  },
5797
- /* @__PURE__ */ React62.createElement(DialogTitle, null, mode === "new" ? t("save-dialog.title-new", "Create a new template") : t("save-dialog.title", "Save as a new template")),
5798
- /* @__PURE__ */ React62.createElement(DialogContent, null, /* @__PURE__ */ React62.createElement(Box, { sx: { pt: 1 } }, /* @__PURE__ */ React62.createElement(
5819
+ /* @__PURE__ */ React63.createElement(DialogTitle, null, mode === "new" ? t("save-dialog.title-new", "Create a new template") : t("save-dialog.title", "Save as a new template")),
5820
+ /* @__PURE__ */ React63.createElement(DialogContent, null, /* @__PURE__ */ React63.createElement(Box, { sx: { pt: 1 } }, /* @__PURE__ */ React63.createElement(
5799
5821
  TextField,
5800
5822
  {
5801
5823
  autoFocus: true,
@@ -5818,7 +5840,7 @@ function SaveTemplateDialog({
5818
5840
  disabled: isSubmitting
5819
5841
  }
5820
5842
  ))),
5821
- /* @__PURE__ */ React62.createElement(DialogActions, null, /* @__PURE__ */ React62.createElement(Button$1, { onClick: handleCancel, disabled: isSubmitting }, t("common.cancel", "Cancel")), /* @__PURE__ */ React62.createElement(
5843
+ /* @__PURE__ */ React63.createElement(DialogActions, null, /* @__PURE__ */ React63.createElement(Button$1, { onClick: handleCancel, disabled: isSubmitting }, t("common.cancel", "Cancel")), /* @__PURE__ */ React63.createElement(
5822
5844
  Button$1,
5823
5845
  {
5824
5846
  onClick: handleSave,
@@ -6139,7 +6161,7 @@ function SamplesDrawer({
6139
6161
  return null;
6140
6162
  }
6141
6163
  const existingSlugs = templates.map((t2) => t2.slug);
6142
- return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
6164
+ return /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(
6143
6165
  Drawer,
6144
6166
  {
6145
6167
  variant: "persistent",
@@ -6154,7 +6176,7 @@ function SamplesDrawer({
6154
6176
  transitionDuration: { enter: enterDuration, exit: exitDuration },
6155
6177
  sx: { width: samplesDrawerOpen ? SAMPLES_DRAWER_WIDTH : 0 }
6156
6178
  },
6157
- /* @__PURE__ */ React62.createElement(
6179
+ /* @__PURE__ */ React63.createElement(
6158
6180
  Stack,
6159
6181
  {
6160
6182
  py: 1,
@@ -6164,16 +6186,16 @@ function SamplesDrawer({
6164
6186
  spacing: 1.5,
6165
6187
  sx: { overflowY: "auto" }
6166
6188
  },
6167
- /* @__PURE__ */ React62.createElement(Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", sx: { pt: 1 } }, /* @__PURE__ */ React62.createElement(Typography, { variant: "h6", component: "h1" }, /* @__PURE__ */ React62.createElement(Trans, { id: "drawer.library" }, "Library")), saveAs && (activeLeftTab === "templates" || activeLeftTab === "samples") && /* @__PURE__ */ React62.createElement(Tooltip, { title: activeLeftTab === "samples" ? t("drawer.new-sample", "New sample") : t("drawer.new-template", "New template") }, /* @__PURE__ */ React62.createElement(
6189
+ /* @__PURE__ */ React63.createElement(Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", sx: { pt: 1 } }, /* @__PURE__ */ React63.createElement(Typography, { variant: "h6", component: "h1" }, /* @__PURE__ */ React63.createElement(Trans, { id: "drawer.library" }, "Library")), saveAs && (activeLeftTab === "templates" || activeLeftTab === "samples") && /* @__PURE__ */ React63.createElement(Tooltip, { title: activeLeftTab === "samples" ? t("drawer.new-sample", "New sample") : t("drawer.new-template", "New template") }, /* @__PURE__ */ React63.createElement(
6168
6190
  IconButton,
6169
6191
  {
6170
6192
  size: "small",
6171
6193
  onClick: () => openNewPicker(activeLeftTab === "samples" ? "sample" : "template"),
6172
6194
  "aria-label": activeLeftTab === "samples" ? t("drawer.new-sample", "New sample") : t("drawer.new-template", "New template")
6173
6195
  },
6174
- /* @__PURE__ */ React62.createElement(AddOutlined, { fontSize: "small" })
6196
+ /* @__PURE__ */ React63.createElement(AddOutlined, { fontSize: "small" })
6175
6197
  ))),
6176
- /* @__PURE__ */ React62.createElement(
6198
+ /* @__PURE__ */ React63.createElement(
6177
6199
  Tabs,
6178
6200
  {
6179
6201
  value: activeLeftTab,
@@ -6181,11 +6203,11 @@ function SamplesDrawer({
6181
6203
  variant: "fullWidth",
6182
6204
  sx: { minHeight: 36, "& .MuiTab-root": { minHeight: 36, minWidth: 0, px: 1, fontSize: 13 } }
6183
6205
  },
6184
- /* @__PURE__ */ React62.createElement(Tab, { value: "templates", label: t("drawer.tab.templates", "Templates"), disabled: !loadTemplates }),
6185
- /* @__PURE__ */ React62.createElement(Tab, { value: "samples", label: t("drawer.tab.samples", "Samples") }),
6186
- /* @__PURE__ */ React62.createElement(Tab, { value: "outline", label: t("drawer.tab.outline", "Outline") })
6206
+ /* @__PURE__ */ React63.createElement(Tab, { value: "templates", label: t("drawer.tab.templates", "Templates"), disabled: !loadTemplates }),
6207
+ /* @__PURE__ */ React63.createElement(Tab, { value: "samples", label: t("drawer.tab.samples", "Samples") }),
6208
+ /* @__PURE__ */ React63.createElement(Tab, { value: "outline", label: t("drawer.tab.outline", "Outline") })
6187
6209
  ),
6188
- activeLeftTab === "outline" ? /* @__PURE__ */ React62.createElement(OutlinePanel, null) : /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
6210
+ activeLeftTab === "outline" ? /* @__PURE__ */ React63.createElement(OutlinePanel, null) : /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(
6189
6211
  TextField,
6190
6212
  {
6191
6213
  size: "small",
@@ -6193,10 +6215,10 @@ function SamplesDrawer({
6193
6215
  value: search,
6194
6216
  onChange: (e) => setSearch(e.target.value),
6195
6217
  InputProps: {
6196
- startAdornment: /* @__PURE__ */ React62.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React62.createElement(SearchOutlined, { fontSize: "small" }))
6218
+ startAdornment: /* @__PURE__ */ React63.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React63.createElement(SearchOutlined, { fontSize: "small" }))
6197
6219
  }
6198
6220
  }
6199
- ), /* @__PURE__ */ React62.createElement(
6221
+ ), /* @__PURE__ */ React63.createElement(
6200
6222
  TextField,
6201
6223
  {
6202
6224
  select: true,
@@ -6205,8 +6227,8 @@ function SamplesDrawer({
6205
6227
  value: sortKey,
6206
6228
  onChange: (e) => setSortKey(e.target.value)
6207
6229
  },
6208
- SORT_OPTIONS.map((opt) => /* @__PURE__ */ React62.createElement(MenuItem, { key: opt.value, value: opt.value }, t(opt.labelKey, opt.fallback)))
6209
- ), allTags.length > 0 && /* @__PURE__ */ React62.createElement(Stack, { direction: "row", sx: { flexWrap: "wrap", gap: 0.5 } }, /* @__PURE__ */ React62.createElement(
6230
+ SORT_OPTIONS.map((opt) => /* @__PURE__ */ React63.createElement(MenuItem, { key: opt.value, value: opt.value }, t(opt.labelKey, opt.fallback)))
6231
+ ), allTags.length > 0 && /* @__PURE__ */ React63.createElement(Stack, { direction: "row", sx: { flexWrap: "wrap", gap: 0.5 } }, /* @__PURE__ */ React63.createElement(
6210
6232
  Chip,
6211
6233
  {
6212
6234
  label: t("drawer.tag.all", "All"),
@@ -6216,7 +6238,7 @@ function SamplesDrawer({
6216
6238
  variant: activeTags.length === 0 ? "filled" : "outlined",
6217
6239
  onClick: () => setActiveTags([])
6218
6240
  }
6219
- ), allTags.map((tag) => /* @__PURE__ */ React62.createElement(
6241
+ ), allTags.map((tag) => /* @__PURE__ */ React63.createElement(
6220
6242
  Chip,
6221
6243
  {
6222
6244
  key: tag,
@@ -6227,7 +6249,7 @@ function SamplesDrawer({
6227
6249
  variant: activeTags.includes(tag) ? "filled" : "outlined",
6228
6250
  onClick: () => toggleTag(tag)
6229
6251
  }
6230
- ))), activeLeftTab === "templates" ? /* @__PURE__ */ React62.createElement(Box, null, loadingTemplates ? /* @__PURE__ */ React62.createElement(Stack, { alignItems: "center", width: "100%", py: 2 }, /* @__PURE__ */ React62.createElement(CircularProgress, { size: 24 })) : templatesError ? /* @__PURE__ */ React62.createElement(Alert, { severity: "error", sx: { my: 1 } }, templatesError) : filteredTemplates.length > 0 ? /* @__PURE__ */ React62.createElement(Stack, { spacing: 0.25, sx: { width: "100%" } }, filteredTemplates.map((template) => /* @__PURE__ */ React62.createElement(
6252
+ ))), activeLeftTab === "templates" ? /* @__PURE__ */ React63.createElement(Box, null, loadingTemplates ? /* @__PURE__ */ React63.createElement(Stack, { alignItems: "center", width: "100%", py: 2 }, /* @__PURE__ */ React63.createElement(CircularProgress, { size: 24 })) : templatesError ? /* @__PURE__ */ React63.createElement(Alert, { severity: "error", sx: { my: 1 } }, templatesError) : filteredTemplates.length > 0 ? /* @__PURE__ */ React63.createElement(Stack, { spacing: 0.25, sx: { width: "100%" } }, filteredTemplates.map((template) => /* @__PURE__ */ React63.createElement(
6231
6253
  TemplateRow,
6232
6254
  {
6233
6255
  key: template.id,
@@ -6239,7 +6261,7 @@ function SamplesDrawer({
6239
6261
  onDelete: deleteTemplate ? () => handleDelete(template) : void 0,
6240
6262
  onPromote: setTemplateKind ? () => handleSetKind(template, "sample") : void 0
6241
6263
  }
6242
- ))) : /* @__PURE__ */ React62.createElement(Typography, { variant: "body2", sx: { color: "text.secondary", py: 1 } }, templateRows.length === 0 ? t("drawer.no-templates", "No saved templates yet") : t("drawer.no-templates-match", "No templates match your filters"))) : /* @__PURE__ */ React62.createElement(Box, null, loadingSamples ? /* @__PURE__ */ React62.createElement(Stack, { alignItems: "center", width: "100%", py: 2 }, /* @__PURE__ */ React62.createElement(CircularProgress, { size: 24 })) : filteredSamples.length > 0 ? /* @__PURE__ */ React62.createElement(Stack, { spacing: 0.25, sx: { width: "100%" } }, filteredSamples.map((sample) => /* @__PURE__ */ React62.createElement(
6264
+ ))) : /* @__PURE__ */ React63.createElement(Typography, { variant: "body2", sx: { color: "text.secondary", py: 1 } }, templateRows.length === 0 ? t("drawer.no-templates", "No saved templates yet") : t("drawer.no-templates-match", "No templates match your filters"))) : /* @__PURE__ */ React63.createElement(Box, null, loadingSamples ? /* @__PURE__ */ React63.createElement(Stack, { alignItems: "center", width: "100%", py: 2 }, /* @__PURE__ */ React63.createElement(CircularProgress, { size: 24 })) : filteredSamples.length > 0 ? /* @__PURE__ */ React63.createElement(Stack, { spacing: 0.25, sx: { width: "100%" } }, filteredSamples.map((sample) => /* @__PURE__ */ React63.createElement(
6243
6265
  TemplateRow,
6244
6266
  {
6245
6267
  key: sample.id,
@@ -6251,9 +6273,9 @@ function SamplesDrawer({
6251
6273
  onDelete: deleteTemplate ? () => handleDelete(sample) : void 0,
6252
6274
  onDemote: setTemplateKind ? () => handleSetKind(sample, "template") : void 0
6253
6275
  }
6254
- ))) : /* @__PURE__ */ React62.createElement(Typography, { variant: "body2", sx: { color: "text.secondary", py: 1 } }, sampleRows.length === 0 ? t("drawer.no-samples", "No samples available") : t("drawer.no-samples-match", "No samples match your filters"))))
6276
+ ))) : /* @__PURE__ */ React63.createElement(Typography, { variant: "body2", sx: { color: "text.secondary", py: 1 } }, sampleRows.length === 0 ? t("drawer.no-samples", "No samples available") : t("drawer.no-samples-match", "No samples match your filters"))))
6255
6277
  )
6256
- ), renameTarget && /* @__PURE__ */ React62.createElement(
6278
+ ), renameTarget && /* @__PURE__ */ React63.createElement(
6257
6279
  RenameDialog,
6258
6280
  {
6259
6281
  open: !!renameTarget,
@@ -6263,7 +6285,7 @@ function SamplesDrawer({
6263
6285
  onClose: () => setRenameTarget(null),
6264
6286
  onSubmit: handleRenameSubmit
6265
6287
  }
6266
- ), /* @__PURE__ */ React62.createElement(
6288
+ ), /* @__PURE__ */ React63.createElement(
6267
6289
  SaveTemplateDialog,
6268
6290
  {
6269
6291
  open: !!pendingSaveAs,
@@ -6276,7 +6298,7 @@ function SamplesDrawer({
6276
6298
  defaultName: (_b = pendingSaveAs == null ? void 0 : pendingSaveAs.defaultName) != null ? _b : "New Template",
6277
6299
  error: newError
6278
6300
  }
6279
- ), /* @__PURE__ */ React62.createElement(
6301
+ ), /* @__PURE__ */ React63.createElement(
6280
6302
  NewTemplatePickerDialog,
6281
6303
  {
6282
6304
  open: pickerKind !== null,
@@ -6288,6 +6310,66 @@ function SamplesDrawer({
6288
6310
  }
6289
6311
  ));
6290
6312
  }
6313
+
6314
+ // src/editor/blocks/helpers/block-utils.ts
6315
+ function generateId() {
6316
+ return `block-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`;
6317
+ }
6318
+ function rekeyBlocks(blocks, rootBlockId) {
6319
+ var _a, _b, _c;
6320
+ const idMap = {};
6321
+ for (const oldId of Object.keys(blocks)) {
6322
+ idMap[oldId] = generateId();
6323
+ }
6324
+ const remapIds = (ids) => ids == null ? void 0 : ids.map((id) => {
6325
+ var _a2;
6326
+ return (_a2 = idMap[id]) != null ? _a2 : id;
6327
+ });
6328
+ const newBlocks = {};
6329
+ for (const [oldId, block] of Object.entries(blocks)) {
6330
+ const b = block;
6331
+ const newId = idMap[oldId];
6332
+ if (b.type === "Container") {
6333
+ newBlocks[newId] = __spreadProps(__spreadValues({}, b), {
6334
+ data: __spreadProps(__spreadValues({}, b.data), {
6335
+ props: __spreadProps(__spreadValues({}, b.data.props), { childrenIds: remapIds((_a = b.data.props) == null ? void 0 : _a.childrenIds) })
6336
+ })
6337
+ });
6338
+ } else if (b.type === "ColumnsContainer") {
6339
+ newBlocks[newId] = __spreadProps(__spreadValues({}, b), {
6340
+ data: __spreadProps(__spreadValues({}, b.data), {
6341
+ props: __spreadProps(__spreadValues({}, b.data.props), {
6342
+ columns: (_c = (_b = b.data.props) == null ? void 0 : _b.columns) == null ? void 0 : _c.map((c) => __spreadProps(__spreadValues({}, c), {
6343
+ childrenIds: remapIds(c.childrenIds)
6344
+ }))
6345
+ })
6346
+ })
6347
+ });
6348
+ } else {
6349
+ newBlocks[newId] = b;
6350
+ }
6351
+ }
6352
+ return { blocks: newBlocks, newRootId: idMap[rootBlockId] };
6353
+ }
6354
+ function collectBlock(blockId, document2) {
6355
+ var _a, _b, _c, _d, _e;
6356
+ const block = document2[blockId];
6357
+ if (!block) return {};
6358
+ const result = { [blockId]: block };
6359
+ if (block.type === "Container") {
6360
+ for (const childId of (_b = (_a = block.data.props) == null ? void 0 : _a.childrenIds) != null ? _b : []) {
6361
+ Object.assign(result, collectBlock(childId, document2));
6362
+ }
6363
+ }
6364
+ if (block.type === "ColumnsContainer") {
6365
+ for (const col of (_d = (_c = block.data.props) == null ? void 0 : _c.columns) != null ? _d : []) {
6366
+ for (const childId of (_e = col.childrenIds) != null ? _e : []) {
6367
+ Object.assign(result, collectBlock(childId, document2));
6368
+ }
6369
+ }
6370
+ }
6371
+ return result;
6372
+ }
6291
6373
  var BUTTON_SX2 = { p: 1.5, display: "flex", flexDirection: "column" };
6292
6374
  var ICON_SX = {
6293
6375
  mb: 0.75,
@@ -6300,7 +6382,7 @@ var ICON_SX = {
6300
6382
  borderColor: "cadet.300"
6301
6383
  };
6302
6384
  function BlockTypeButton({ label, icon, onClick }) {
6303
- return /* @__PURE__ */ React62.createElement(
6385
+ return /* @__PURE__ */ React63.createElement(
6304
6386
  Button$1,
6305
6387
  {
6306
6388
  sx: BUTTON_SX2,
@@ -6309,14 +6391,14 @@ function BlockTypeButton({ label, icon, onClick }) {
6309
6391
  onClick();
6310
6392
  }
6311
6393
  },
6312
- /* @__PURE__ */ React62.createElement(Box, { sx: ICON_SX }, icon),
6313
- /* @__PURE__ */ React62.createElement(Typography, { variant: "body2" }, label)
6394
+ /* @__PURE__ */ React63.createElement(Box, { sx: ICON_SX }, icon),
6395
+ /* @__PURE__ */ React63.createElement(Typography, { variant: "body2" }, label)
6314
6396
  );
6315
6397
  }
6316
6398
  var BUTTONS = [
6317
6399
  {
6318
6400
  label: "Heading",
6319
- icon: /* @__PURE__ */ React62.createElement(HMobiledataOutlined, null),
6401
+ icon: /* @__PURE__ */ React63.createElement(HMobiledataOutlined, null),
6320
6402
  block: () => ({
6321
6403
  type: "Heading",
6322
6404
  data: {
@@ -6329,7 +6411,7 @@ var BUTTONS = [
6329
6411
  },
6330
6412
  {
6331
6413
  label: "Text",
6332
- icon: /* @__PURE__ */ React62.createElement(NotesOutlined, null),
6414
+ icon: /* @__PURE__ */ React63.createElement(NotesOutlined, null),
6333
6415
  block: () => ({
6334
6416
  type: "Text",
6335
6417
  data: {
@@ -6343,7 +6425,7 @@ var BUTTONS = [
6343
6425
  },
6344
6426
  {
6345
6427
  label: "Button",
6346
- icon: /* @__PURE__ */ React62.createElement(SmartButtonOutlined, null),
6428
+ icon: /* @__PURE__ */ React63.createElement(SmartButtonOutlined, null),
6347
6429
  block: () => ({
6348
6430
  type: "Button",
6349
6431
  data: {
@@ -6357,7 +6439,7 @@ var BUTTONS = [
6357
6439
  },
6358
6440
  {
6359
6441
  label: "Image",
6360
- icon: /* @__PURE__ */ React62.createElement(ImageOutlined, null),
6442
+ icon: /* @__PURE__ */ React63.createElement(ImageOutlined, null),
6361
6443
  block: () => ({
6362
6444
  type: "Image",
6363
6445
  data: {
@@ -6373,7 +6455,7 @@ var BUTTONS = [
6373
6455
  },
6374
6456
  {
6375
6457
  label: "Avatar",
6376
- icon: /* @__PURE__ */ React62.createElement(AccountCircleOutlined, null),
6458
+ icon: /* @__PURE__ */ React63.createElement(AccountCircleOutlined, null),
6377
6459
  block: () => ({
6378
6460
  type: "Avatar",
6379
6461
  data: {
@@ -6387,7 +6469,7 @@ var BUTTONS = [
6387
6469
  },
6388
6470
  {
6389
6471
  label: "Personal Signature",
6390
- icon: /* @__PURE__ */ React62.createElement(ContactMailOutlined, null),
6472
+ icon: /* @__PURE__ */ React63.createElement(ContactMailOutlined, null),
6391
6473
  block: () => ({
6392
6474
  type: "Signature",
6393
6475
  data: {
@@ -6409,7 +6491,7 @@ var BUTTONS = [
6409
6491
  },
6410
6492
  {
6411
6493
  label: "Company Signature",
6412
- icon: /* @__PURE__ */ React62.createElement(BusinessOutlined, null),
6494
+ icon: /* @__PURE__ */ React63.createElement(BusinessOutlined, null),
6413
6495
  block: () => ({
6414
6496
  type: "Signature",
6415
6497
  data: {
@@ -6429,7 +6511,7 @@ var BUTTONS = [
6429
6511
  },
6430
6512
  {
6431
6513
  label: "Divider",
6432
- icon: /* @__PURE__ */ React62.createElement(HorizontalRuleOutlined, null),
6514
+ icon: /* @__PURE__ */ React63.createElement(HorizontalRuleOutlined, null),
6433
6515
  block: () => ({
6434
6516
  type: "Divider",
6435
6517
  data: {
@@ -6442,7 +6524,7 @@ var BUTTONS = [
6442
6524
  },
6443
6525
  {
6444
6526
  label: "Spacer",
6445
- icon: /* @__PURE__ */ React62.createElement(Crop32Outlined, null),
6527
+ icon: /* @__PURE__ */ React63.createElement(Crop32Outlined, null),
6446
6528
  block: () => ({
6447
6529
  type: "Spacer",
6448
6530
  data: {}
@@ -6450,7 +6532,7 @@ var BUTTONS = [
6450
6532
  },
6451
6533
  {
6452
6534
  label: "Html",
6453
- icon: /* @__PURE__ */ React62.createElement(HtmlOutlined, null),
6535
+ icon: /* @__PURE__ */ React63.createElement(HtmlOutlined, null),
6454
6536
  block: () => ({
6455
6537
  type: "Html",
6456
6538
  data: {
@@ -6465,7 +6547,7 @@ var BUTTONS = [
6465
6547
  },
6466
6548
  {
6467
6549
  label: "Columns",
6468
- icon: /* @__PURE__ */ React62.createElement(ViewColumnOutlined, null),
6550
+ icon: /* @__PURE__ */ React63.createElement(ViewColumnOutlined, null),
6469
6551
  block: () => ({
6470
6552
  type: "ColumnsContainer",
6471
6553
  data: {
@@ -6480,7 +6562,7 @@ var BUTTONS = [
6480
6562
  },
6481
6563
  {
6482
6564
  label: "Container",
6483
- icon: /* @__PURE__ */ React62.createElement(LibraryAddOutlined, null),
6565
+ icon: /* @__PURE__ */ React63.createElement(LibraryAddOutlined, null),
6484
6566
  block: () => ({
6485
6567
  type: "Container",
6486
6568
  data: {
@@ -6508,6 +6590,7 @@ var LABEL_KEYS = {
6508
6590
  Container: "block-add.container"
6509
6591
  };
6510
6592
  function BlocksMenu({ anchorEl, setAnchorEl, onSelect }) {
6593
+ const { customBlocks } = useEditorConfig();
6511
6594
  const onClose = () => {
6512
6595
  setAnchorEl(null);
6513
6596
  };
@@ -6515,10 +6598,26 @@ function BlocksMenu({ anchorEl, setAnchorEl, onSelect }) {
6515
6598
  onSelect(block);
6516
6599
  setAnchorEl(null);
6517
6600
  };
6601
+ const onCustomBlockClick = (customBlock) => {
6602
+ const { blocks: rekeyed, newRootId } = rekeyBlocks(customBlock.blocks, customBlock.rootBlockId);
6603
+ const rootBlock = rekeyed[newRootId];
6604
+ const extraBlocks = {};
6605
+ for (const [id, block] of Object.entries(rekeyed)) {
6606
+ if (id !== newRootId) {
6607
+ extraBlocks[id] = block;
6608
+ }
6609
+ }
6610
+ if (Object.keys(extraBlocks).length > 0) {
6611
+ setDocument(extraBlocks);
6612
+ }
6613
+ onSelect(rootBlock);
6614
+ setAnchorEl(null);
6615
+ };
6518
6616
  if (anchorEl === null) {
6519
6617
  return null;
6520
6618
  }
6521
- return /* @__PURE__ */ React62.createElement(
6619
+ const hasCustomBlocks = customBlocks && customBlocks.length > 0;
6620
+ return /* @__PURE__ */ React63.createElement(
6522
6621
  Menu,
6523
6622
  {
6524
6623
  open: true,
@@ -6527,7 +6626,7 @@ function BlocksMenu({ anchorEl, setAnchorEl, onSelect }) {
6527
6626
  anchorOrigin: { vertical: "bottom", horizontal: "center" },
6528
6627
  transformOrigin: { vertical: "top", horizontal: "center" }
6529
6628
  },
6530
- /* @__PURE__ */ React62.createElement(Box, { sx: { p: 1, display: "grid", gridTemplateColumns: "1fr 1fr 1fr 1fr" } }, BUTTONS.map((k, i) => /* @__PURE__ */ React62.createElement(
6629
+ /* @__PURE__ */ React63.createElement(Box, { sx: { p: 1, display: "grid", gridTemplateColumns: "1fr 1fr 1fr 1fr" } }, BUTTONS.map((k, i) => /* @__PURE__ */ React63.createElement(
6531
6630
  BlockTypeButton,
6532
6631
  {
6533
6632
  key: i,
@@ -6535,7 +6634,19 @@ function BlocksMenu({ anchorEl, setAnchorEl, onSelect }) {
6535
6634
  icon: k.icon,
6536
6635
  onClick: () => onClick(k.block())
6537
6636
  }
6538
- )))
6637
+ ))),
6638
+ hasCustomBlocks && /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(Divider$1, { sx: { my: 1 } }), /* @__PURE__ */ React63.createElement(Typography, { variant: "caption", sx: { px: 2, py: 0.5, color: "text.secondary" } }, t("block-add.custom-blocks", "Custom blocks")), /* @__PURE__ */ React63.createElement(Box, { sx: { p: 1, display: "grid", gridTemplateColumns: "1fr 1fr 1fr 1fr" } }, customBlocks.map((cb, i) => {
6639
+ var _a;
6640
+ return /* @__PURE__ */ React63.createElement(
6641
+ BlockTypeButton,
6642
+ {
6643
+ key: `custom-${i}`,
6644
+ label: cb.label,
6645
+ icon: (_a = cb.icon) != null ? _a : /* @__PURE__ */ React63.createElement(WidgetsOutlined, null),
6646
+ onClick: () => onCustomBlockClick(cb)
6647
+ }
6648
+ );
6649
+ })))
6539
6650
  );
6540
6651
  }
6541
6652
  function DividerButton({ buttonElement, onClick }) {
@@ -6562,7 +6673,7 @@ function DividerButton({ buttonElement, onClick }) {
6562
6673
  window.removeEventListener("mousemove", listener);
6563
6674
  };
6564
6675
  }, [buttonElement, setVisible]);
6565
- return /* @__PURE__ */ React62.createElement(Fade, { in: visible }, /* @__PURE__ */ React62.createElement(
6676
+ return /* @__PURE__ */ React63.createElement(Fade, { in: visible }, /* @__PURE__ */ React63.createElement(
6566
6677
  IconButton,
6567
6678
  {
6568
6679
  size: "small",
@@ -6585,11 +6696,11 @@ function DividerButton({ buttonElement, onClick }) {
6585
6696
  onClick();
6586
6697
  }
6587
6698
  },
6588
- /* @__PURE__ */ React62.createElement(AddOutlined, { fontSize: "small" })
6699
+ /* @__PURE__ */ React63.createElement(AddOutlined, { fontSize: "small" })
6589
6700
  ));
6590
6701
  }
6591
6702
  function PlaceholderButton({ onClick }) {
6592
- return /* @__PURE__ */ React62.createElement(
6703
+ return /* @__PURE__ */ React63.createElement(
6593
6704
  ButtonBase,
6594
6705
  {
6595
6706
  onClick: (ev) => {
@@ -6605,7 +6716,7 @@ function PlaceholderButton({ onClick }) {
6605
6716
  bgcolor: "rgba(0,0,0, 0.05)"
6606
6717
  }
6607
6718
  },
6608
- /* @__PURE__ */ React62.createElement(
6719
+ /* @__PURE__ */ React63.createElement(
6609
6720
  AddOutlined,
6610
6721
  {
6611
6722
  sx: {
@@ -6629,31 +6740,31 @@ function AddBlockButton({ onSelect, placeholder }) {
6629
6740
  };
6630
6741
  const renderButton2 = () => {
6631
6742
  if (placeholder) {
6632
- return /* @__PURE__ */ React62.createElement(PlaceholderButton, { onClick: handleButtonClick });
6743
+ return /* @__PURE__ */ React63.createElement(PlaceholderButton, { onClick: handleButtonClick });
6633
6744
  } else {
6634
- return /* @__PURE__ */ React62.createElement(DividerButton, { buttonElement, onClick: handleButtonClick });
6745
+ return /* @__PURE__ */ React63.createElement(DividerButton, { buttonElement, onClick: handleButtonClick });
6635
6746
  }
6636
6747
  };
6637
- return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement("div", { ref: setButtonElement, style: { position: "relative" } }, renderButton2()), /* @__PURE__ */ React62.createElement(BlocksMenu, { anchorEl: menuAnchorEl, setAnchorEl: setMenuAnchorEl, onSelect }));
6748
+ return /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement("div", { ref: setButtonElement, style: { position: "relative" } }, renderButton2()), /* @__PURE__ */ React63.createElement(BlocksMenu, { anchorEl: menuAnchorEl, setAnchorEl: setMenuAnchorEl, onSelect }));
6638
6749
  }
6639
6750
  var BlockParentContext = createContext(null);
6640
6751
  function BlockParentProvider({
6641
6752
  info,
6642
6753
  children
6643
6754
  }) {
6644
- return /* @__PURE__ */ React62.createElement(BlockParentContext.Provider, { value: info }, children);
6755
+ return /* @__PURE__ */ React63.createElement(BlockParentContext.Provider, { value: info }, children);
6645
6756
  }
6646
6757
  function useBlockParent() {
6647
6758
  return useContext(BlockParentContext);
6648
6759
  }
6649
6760
 
6650
6761
  // src/editor/blocks/helpers/editor-children-ids/index.tsx
6651
- function generateId() {
6762
+ function generateId2() {
6652
6763
  return `block-${Date.now()}`;
6653
6764
  }
6654
6765
  function EditorChildrenIds({ childrenIds, onChange, parentRef }) {
6655
6766
  const appendBlock = (block) => {
6656
- const blockId = generateId();
6767
+ const blockId = generateId2();
6657
6768
  return onChange({
6658
6769
  blockId,
6659
6770
  block,
@@ -6661,7 +6772,7 @@ function EditorChildrenIds({ childrenIds, onChange, parentRef }) {
6661
6772
  });
6662
6773
  };
6663
6774
  const insertBlock = (block, index) => {
6664
- const blockId = generateId();
6775
+ const blockId = generateId2();
6665
6776
  const newChildrenIds = [...childrenIds || []];
6666
6777
  newChildrenIds.splice(index, 0, blockId);
6667
6778
  return onChange({
@@ -6671,9 +6782,9 @@ function EditorChildrenIds({ childrenIds, onChange, parentRef }) {
6671
6782
  });
6672
6783
  };
6673
6784
  if (!childrenIds || childrenIds.length === 0) {
6674
- return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(AddBlockButton, { placeholder: true, onSelect: appendBlock }), parentRef && /* @__PURE__ */ React62.createElement(CanvasDropZone, { parentRef, targetIndex: 0, placeholder: true }));
6785
+ return /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(AddBlockButton, { placeholder: true, onSelect: appendBlock }), parentRef && /* @__PURE__ */ React63.createElement(CanvasDropZone, { parentRef, targetIndex: 0, placeholder: true }));
6675
6786
  }
6676
- return /* @__PURE__ */ React62.createElement(React62.Fragment, null, childrenIds.map((childId, i) => /* @__PURE__ */ React62.createElement(Fragment, { key: childId }, /* @__PURE__ */ React62.createElement(AddBlockButton, { onSelect: (block) => insertBlock(block, i) }), parentRef && /* @__PURE__ */ React62.createElement(CanvasDropZone, { parentRef, targetIndex: i }), parentRef ? /* @__PURE__ */ React62.createElement(BlockParentProvider, { info: { parent: parentRef, indexInParent: i } }, /* @__PURE__ */ React62.createElement(EditorBlock, { id: childId })) : /* @__PURE__ */ React62.createElement(EditorBlock, { id: childId }))), /* @__PURE__ */ React62.createElement(AddBlockButton, { onSelect: appendBlock }), parentRef && /* @__PURE__ */ React62.createElement(CanvasDropZone, { parentRef, targetIndex: childrenIds.length }));
6787
+ return /* @__PURE__ */ React63.createElement(React63.Fragment, null, childrenIds.map((childId, i) => /* @__PURE__ */ React63.createElement(Fragment, { key: childId }, /* @__PURE__ */ React63.createElement(AddBlockButton, { onSelect: (block) => insertBlock(block, i) }), parentRef && /* @__PURE__ */ React63.createElement(CanvasDropZone, { parentRef, targetIndex: i }), parentRef ? /* @__PURE__ */ React63.createElement(BlockParentProvider, { info: { parent: parentRef, indexInParent: i } }, /* @__PURE__ */ React63.createElement(EditorBlock, { id: childId })) : /* @__PURE__ */ React63.createElement(EditorBlock, { id: childId }))), /* @__PURE__ */ React63.createElement(AddBlockButton, { onSelect: appendBlock }), parentRef && /* @__PURE__ */ React63.createElement(CanvasDropZone, { parentRef, targetIndex: childrenIds.length }));
6677
6788
  }
6678
6789
  function CanvasDropZone({
6679
6790
  parentRef,
@@ -6710,7 +6821,7 @@ function CanvasDropZone({
6710
6821
  }
6711
6822
  setDraggingBlock(null);
6712
6823
  };
6713
- return /* @__PURE__ */ React62.createElement(
6824
+ return /* @__PURE__ */ React63.createElement(
6714
6825
  Box,
6715
6826
  {
6716
6827
  onDragOver: handleDragOver,
@@ -6753,13 +6864,13 @@ function ColumnsContainerEditor({ style, props }) {
6753
6864
  });
6754
6865
  setSelectedBlockId(blockId);
6755
6866
  };
6756
- return /* @__PURE__ */ React62.createElement(
6867
+ return /* @__PURE__ */ React63.createElement(
6757
6868
  columns_container_default,
6758
6869
  {
6759
6870
  props: restProps,
6760
6871
  style,
6761
6872
  columns: [
6762
- /* @__PURE__ */ React62.createElement(
6873
+ /* @__PURE__ */ React63.createElement(
6763
6874
  EditorChildrenIds,
6764
6875
  {
6765
6876
  childrenIds: (_b = columns == null ? void 0 : columns[0]) == null ? void 0 : _b.childrenIds,
@@ -6767,7 +6878,7 @@ function ColumnsContainerEditor({ style, props }) {
6767
6878
  onChange: (change) => updateColumn(0, change)
6768
6879
  }
6769
6880
  ),
6770
- /* @__PURE__ */ React62.createElement(
6881
+ /* @__PURE__ */ React63.createElement(
6771
6882
  EditorChildrenIds,
6772
6883
  {
6773
6884
  childrenIds: (_c = columns == null ? void 0 : columns[1]) == null ? void 0 : _c.childrenIds,
@@ -6775,7 +6886,7 @@ function ColumnsContainerEditor({ style, props }) {
6775
6886
  onChange: (change) => updateColumn(1, change)
6776
6887
  }
6777
6888
  ),
6778
- /* @__PURE__ */ React62.createElement(
6889
+ /* @__PURE__ */ React63.createElement(
6779
6890
  EditorChildrenIds,
6780
6891
  {
6781
6892
  childrenIds: (_d = columns == null ? void 0 : columns[2]) == null ? void 0 : _d.childrenIds,
@@ -6792,7 +6903,7 @@ function ContainerEditor({ style, props }) {
6792
6903
  const childrenIds = (_a = props == null ? void 0 : props.childrenIds) != null ? _a : [];
6793
6904
  const document2 = useDocument();
6794
6905
  const currentBlockId = useCurrentBlockId();
6795
- return /* @__PURE__ */ React62.createElement(container_default, { style }, /* @__PURE__ */ React62.createElement(
6906
+ return /* @__PURE__ */ React63.createElement(container_default, { style }, /* @__PURE__ */ React63.createElement(
6796
6907
  EditorChildrenIds,
6797
6908
  {
6798
6909
  childrenIds,
@@ -6812,64 +6923,6 @@ function ContainerEditor({ style, props }) {
6812
6923
  }
6813
6924
  ));
6814
6925
  }
6815
- function generateId2() {
6816
- return `block-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`;
6817
- }
6818
- function rekeyBlocks(blocks, rootBlockId) {
6819
- var _a, _b, _c;
6820
- const idMap = {};
6821
- for (const oldId of Object.keys(blocks)) {
6822
- idMap[oldId] = generateId2();
6823
- }
6824
- const remapIds = (ids) => ids == null ? void 0 : ids.map((id) => {
6825
- var _a2;
6826
- return (_a2 = idMap[id]) != null ? _a2 : id;
6827
- });
6828
- const newBlocks = {};
6829
- for (const [oldId, block] of Object.entries(blocks)) {
6830
- const b = block;
6831
- const newId = idMap[oldId];
6832
- if (b.type === "Container") {
6833
- newBlocks[newId] = __spreadProps(__spreadValues({}, b), {
6834
- data: __spreadProps(__spreadValues({}, b.data), {
6835
- props: __spreadProps(__spreadValues({}, b.data.props), { childrenIds: remapIds((_a = b.data.props) == null ? void 0 : _a.childrenIds) })
6836
- })
6837
- });
6838
- } else if (b.type === "ColumnsContainer") {
6839
- newBlocks[newId] = __spreadProps(__spreadValues({}, b), {
6840
- data: __spreadProps(__spreadValues({}, b.data), {
6841
- props: __spreadProps(__spreadValues({}, b.data.props), {
6842
- columns: (_c = (_b = b.data.props) == null ? void 0 : _b.columns) == null ? void 0 : _c.map((c) => __spreadProps(__spreadValues({}, c), {
6843
- childrenIds: remapIds(c.childrenIds)
6844
- }))
6845
- })
6846
- })
6847
- });
6848
- } else {
6849
- newBlocks[newId] = b;
6850
- }
6851
- }
6852
- return { blocks: newBlocks, newRootId: idMap[rootBlockId] };
6853
- }
6854
- function collectBlock(blockId, document2) {
6855
- var _a, _b, _c, _d, _e;
6856
- const block = document2[blockId];
6857
- if (!block) return {};
6858
- const result = { [blockId]: block };
6859
- if (block.type === "Container") {
6860
- for (const childId of (_b = (_a = block.data.props) == null ? void 0 : _a.childrenIds) != null ? _b : []) {
6861
- Object.assign(result, collectBlock(childId, document2));
6862
- }
6863
- }
6864
- if (block.type === "ColumnsContainer") {
6865
- for (const col of (_d = (_c = block.data.props) == null ? void 0 : _c.columns) != null ? _d : []) {
6866
- for (const childId of (_e = col.childrenIds) != null ? _e : []) {
6867
- Object.assign(result, collectBlock(childId, document2));
6868
- }
6869
- }
6870
- }
6871
- return result;
6872
- }
6873
6926
  function getFontFamily7(fontFamily) {
6874
6927
  const f = fontFamily != null ? fontFamily : "MODERN_SANS";
6875
6928
  switch (f) {
@@ -6993,7 +7046,7 @@ function EmailLayoutEditor(props) {
6993
7046
  lineHeight: "1.5",
6994
7047
  margin: "0"
6995
7048
  };
6996
- const editorChildren = /* @__PURE__ */ React62.createElement(
7049
+ const editorChildren = /* @__PURE__ */ React63.createElement(
6997
7050
  EditorChildrenIds,
6998
7051
  {
6999
7052
  childrenIds,
@@ -7020,7 +7073,7 @@ function EmailLayoutEditor(props) {
7020
7073
  boxShadow: "0 1px 2px rgba(33, 36, 67, 0.05), 0 8px 24px rgba(33, 36, 67, 0.08)"
7021
7074
  };
7022
7075
  if (props.backdropDisabled) {
7023
- return /* @__PURE__ */ React62.createElement(
7076
+ return /* @__PURE__ */ React63.createElement(
7024
7077
  "div",
7025
7078
  {
7026
7079
  onClick: () => {
@@ -7032,7 +7085,7 @@ function EmailLayoutEditor(props) {
7032
7085
  minHeight: "100%"
7033
7086
  })
7034
7087
  },
7035
- /* @__PURE__ */ React62.createElement(
7088
+ /* @__PURE__ */ React63.createElement(
7036
7089
  "div",
7037
7090
  {
7038
7091
  style: __spreadProps(__spreadValues({}, cardStyle), {
@@ -7040,11 +7093,11 @@ function EmailLayoutEditor(props) {
7040
7093
  padding: "32px"
7041
7094
  })
7042
7095
  },
7043
- /* @__PURE__ */ React62.createElement("div", { style: { maxWidth: "600px", margin: "0 auto" } }, editorChildren)
7096
+ /* @__PURE__ */ React63.createElement("div", { style: { maxWidth: "600px", margin: "0 auto" } }, editorChildren)
7044
7097
  )
7045
7098
  );
7046
7099
  }
7047
- return /* @__PURE__ */ React62.createElement(
7100
+ return /* @__PURE__ */ React63.createElement(
7048
7101
  "div",
7049
7102
  {
7050
7103
  onClick: () => {
@@ -7056,7 +7109,7 @@ function EmailLayoutEditor(props) {
7056
7109
  minHeight: "100%"
7057
7110
  })
7058
7111
  },
7059
- /* @__PURE__ */ React62.createElement(
7112
+ /* @__PURE__ */ React63.createElement(
7060
7113
  "div",
7061
7114
  {
7062
7115
  style: __spreadProps(__spreadValues({}, cardStyle), {
@@ -7064,7 +7117,7 @@ function EmailLayoutEditor(props) {
7064
7117
  padding: "32px 0"
7065
7118
  })
7066
7119
  },
7067
- /* @__PURE__ */ React62.createElement(
7120
+ /* @__PURE__ */ React63.createElement(
7068
7121
  "table",
7069
7122
  {
7070
7123
  align: "center",
@@ -7088,7 +7141,7 @@ function EmailLayoutEditor(props) {
7088
7141
  cellPadding: "0",
7089
7142
  border: 0
7090
7143
  },
7091
- /* @__PURE__ */ React62.createElement("tbody", null, /* @__PURE__ */ React62.createElement("tr", { style: { width: "100%" } }, /* @__PURE__ */ React62.createElement("td", null, editorChildren)))
7144
+ /* @__PURE__ */ React63.createElement("tbody", null, /* @__PURE__ */ React63.createElement("tr", { style: { width: "100%" } }, /* @__PURE__ */ React63.createElement("td", null, editorChildren)))
7092
7145
  )
7093
7146
  )
7094
7147
  );
@@ -7248,7 +7301,7 @@ function TuneMenu({ blockId }) {
7248
7301
  resetDocument(nDocument);
7249
7302
  setSelectedBlockId(blockId);
7250
7303
  };
7251
- return /* @__PURE__ */ React62.createElement(Paper, { sx, onClick: (ev) => ev.stopPropagation() }, /* @__PURE__ */ React62.createElement(Stack, null, /* @__PURE__ */ React62.createElement(Tooltip, { title: t("tune.move-up", "Move up"), placement: "left-start" }, /* @__PURE__ */ React62.createElement(IconButton, { "aria-label": t("tune.move-up", "Move up"), onClick: () => handleMoveClick("up"), sx: { color: "text.primary" } }, /* @__PURE__ */ React62.createElement(ArrowUpwardOutlined, { fontSize: "small" }))), /* @__PURE__ */ React62.createElement(Tooltip, { title: t("tune.move-down", "Move down"), placement: "left-start" }, /* @__PURE__ */ React62.createElement(IconButton, { "aria-label": t("tune.move-down", "Move down"), onClick: () => handleMoveClick("down"), sx: { color: "text.primary" } }, /* @__PURE__ */ React62.createElement(ArrowDownwardOutlined, { fontSize: "small" }))), /* @__PURE__ */ React62.createElement(Tooltip, { title: t("tune.copy", "Copy block"), placement: "left-start" }, /* @__PURE__ */ React62.createElement(IconButton, { "aria-label": t("tune.copy", "Copy block"), onClick: handleCopyClick, sx: { color: "text.primary" } }, /* @__PURE__ */ React62.createElement(ContentCopyOutlined, { fontSize: "small" }))), /* @__PURE__ */ React62.createElement(Tooltip, { title: t("tune.delete", "Delete"), placement: "left-start" }, /* @__PURE__ */ React62.createElement(IconButton, { "aria-label": t("tune.delete", "Delete"), onClick: handleDeleteClick, sx: { color: "text.primary" } }, /* @__PURE__ */ React62.createElement(DeleteOutlined, { fontSize: "small" })))));
7304
+ return /* @__PURE__ */ React63.createElement(Paper, { sx, onClick: (ev) => ev.stopPropagation() }, /* @__PURE__ */ React63.createElement(Stack, null, /* @__PURE__ */ React63.createElement(Tooltip, { title: t("tune.move-up", "Move up"), placement: "left-start" }, /* @__PURE__ */ React63.createElement(IconButton, { "aria-label": t("tune.move-up", "Move up"), onClick: () => handleMoveClick("up"), sx: { color: "text.primary" } }, /* @__PURE__ */ React63.createElement(ArrowUpwardOutlined, { fontSize: "small" }))), /* @__PURE__ */ React63.createElement(Tooltip, { title: t("tune.move-down", "Move down"), placement: "left-start" }, /* @__PURE__ */ React63.createElement(IconButton, { "aria-label": t("tune.move-down", "Move down"), onClick: () => handleMoveClick("down"), sx: { color: "text.primary" } }, /* @__PURE__ */ React63.createElement(ArrowDownwardOutlined, { fontSize: "small" }))), /* @__PURE__ */ React63.createElement(Tooltip, { title: t("tune.copy", "Copy block"), placement: "left-start" }, /* @__PURE__ */ React63.createElement(IconButton, { "aria-label": t("tune.copy", "Copy block"), onClick: handleCopyClick, sx: { color: "text.primary" } }, /* @__PURE__ */ React63.createElement(ContentCopyOutlined, { fontSize: "small" }))), /* @__PURE__ */ React63.createElement(Tooltip, { title: t("tune.delete", "Delete"), placement: "left-start" }, /* @__PURE__ */ React63.createElement(IconButton, { "aria-label": t("tune.delete", "Delete"), onClick: handleDeleteClick, sx: { color: "text.primary" } }, /* @__PURE__ */ React63.createElement(DeleteOutlined, { fontSize: "small" })))));
7252
7305
  }
7253
7306
 
7254
7307
  // src/editor/blocks/helpers/block-wrappers/editor-block-wrapper.tsx
@@ -7270,7 +7323,7 @@ function EditorBlockWrapper({ children }) {
7270
7323
  if (selectedBlockId !== blockId) {
7271
7324
  return null;
7272
7325
  }
7273
- return /* @__PURE__ */ React62.createElement(TuneMenu, { blockId });
7326
+ return /* @__PURE__ */ React63.createElement(TuneMenu, { blockId });
7274
7327
  };
7275
7328
  const draggable = Boolean(blockParent) && selectedBlockId !== blockId;
7276
7329
  const handleDragStart = (e) => {
@@ -7283,7 +7336,7 @@ function EditorBlockWrapper({ children }) {
7283
7336
  const handleDragEnd = () => {
7284
7337
  setDraggingBlock(null);
7285
7338
  };
7286
- return /* @__PURE__ */ React62.createElement(
7339
+ return /* @__PURE__ */ React63.createElement(
7287
7340
  Box,
7288
7341
  {
7289
7342
  draggable,
@@ -7428,7 +7481,7 @@ function ButtonEditor({ style, props }) {
7428
7481
  selectionEnd: (_b2 = el.selectionEnd) != null ? _b2 : el.value.length
7429
7482
  });
7430
7483
  };
7431
- return /* @__PURE__ */ React62.createElement("div", { style: wrapperStyle }, /* @__PURE__ */ React62.createElement(
7484
+ return /* @__PURE__ */ React63.createElement("div", { style: wrapperStyle }, /* @__PURE__ */ React63.createElement(
7432
7485
  "input",
7433
7486
  {
7434
7487
  type: "text",
@@ -7445,7 +7498,7 @@ function ButtonEditor({ style, props }) {
7445
7498
  }
7446
7499
  ));
7447
7500
  }
7448
- return /* @__PURE__ */ React62.createElement("div", { style: wrapperStyle }, /* @__PURE__ */ React62.createElement("span", { style: linkStyle }, /* @__PURE__ */ React62.createElement("span", null, text)));
7501
+ return /* @__PURE__ */ React63.createElement("div", { style: wrapperStyle }, /* @__PURE__ */ React63.createElement("span", { style: linkStyle }, /* @__PURE__ */ React63.createElement("span", null, text)));
7449
7502
  }
7450
7503
  function useMarkdownToolbar({ text, isSelected, commitText, trackSelection }) {
7451
7504
  const textareaRef = useRef(null);
@@ -7662,7 +7715,7 @@ function InlineFormattingToolbar({
7662
7715
  }
7663
7716
  }, [activePrompt]);
7664
7717
  const preventBlur = (e) => e.preventDefault();
7665
- return /* @__PURE__ */ React62.createElement(Popper, { open: visible, anchorEl, placement: "top-start", style: { zIndex: 1300 } }, /* @__PURE__ */ React62.createElement(Paper, { elevation: 4, sx: { px: 0.5, py: 0.25, mb: 0.5 }, onMouseDown: preventBlur }, activePrompt === "link" ? /* @__PURE__ */ React62.createElement(Stack, { direction: "row", alignItems: "center", spacing: 0.5, sx: { px: 0.5 } }, /* @__PURE__ */ React62.createElement(
7718
+ return /* @__PURE__ */ React63.createElement(Popper, { open: visible, anchorEl, placement: "top-start", style: { zIndex: 1300 } }, /* @__PURE__ */ React63.createElement(Paper, { elevation: 4, sx: { px: 0.5, py: 0.25, mb: 0.5 }, onMouseDown: preventBlur }, activePrompt === "link" ? /* @__PURE__ */ React63.createElement(Stack, { direction: "row", alignItems: "center", spacing: 0.5, sx: { px: 0.5 } }, /* @__PURE__ */ React63.createElement(
7666
7719
  TextField,
7667
7720
  {
7668
7721
  inputRef: urlRef,
@@ -7684,7 +7737,7 @@ function InlineFormattingToolbar({
7684
7737
  },
7685
7738
  sx: { width: 220 }
7686
7739
  }
7687
- )) : activePrompt === "color" ? /* @__PURE__ */ React62.createElement(Stack, { direction: "row", alignItems: "center", spacing: 0.5, sx: { px: 0.5, py: 0.25 } }, /* @__PURE__ */ React62.createElement(
7740
+ )) : activePrompt === "color" ? /* @__PURE__ */ React63.createElement(Stack, { direction: "row", alignItems: "center", spacing: 0.5, sx: { px: 0.5, py: 0.25 } }, /* @__PURE__ */ React63.createElement(
7688
7741
  "input",
7689
7742
  {
7690
7743
  ref: colorRef,
@@ -7697,7 +7750,7 @@ function InlineFormattingToolbar({
7697
7750
  },
7698
7751
  style: { width: 40, height: 28, border: "none", padding: 0, background: "transparent", cursor: "pointer" }
7699
7752
  }
7700
- ), /* @__PURE__ */ React62.createElement(IconButton, { size: "small", onClick: onPromptCancel, title: t("common.cancel", "Cancel") }, /* @__PURE__ */ React62.createElement(FormatColorTextOutlined, { fontSize: "small" }))) : activePrompt === "font" ? /* @__PURE__ */ React62.createElement(Stack, { direction: "row", alignItems: "center", spacing: 0.5, sx: { px: 0.5, py: 0.25 } }, /* @__PURE__ */ React62.createElement(
7753
+ ), /* @__PURE__ */ React63.createElement(IconButton, { size: "small", onClick: onPromptCancel, title: t("common.cancel", "Cancel") }, /* @__PURE__ */ React63.createElement(FormatColorTextOutlined, { fontSize: "small" }))) : activePrompt === "font" ? /* @__PURE__ */ React63.createElement(Stack, { direction: "row", alignItems: "center", spacing: 0.5, sx: { px: 0.5, py: 0.25 } }, /* @__PURE__ */ React63.createElement(
7701
7754
  Select,
7702
7755
  {
7703
7756
  value: font,
@@ -7710,8 +7763,8 @@ function InlineFormattingToolbar({
7710
7763
  variant: "standard",
7711
7764
  sx: { minWidth: 180, fontSize: 13 }
7712
7765
  },
7713
- FONT_OPTIONS.map((opt) => /* @__PURE__ */ React62.createElement(MenuItem, { key: opt.value, value: opt.value, sx: { fontFamily: opt.value } }, opt.label))
7714
- ), /* @__PURE__ */ React62.createElement(IconButton, { size: "small", onClick: onPromptCancel, title: t("common.cancel", "Cancel") }, /* @__PURE__ */ React62.createElement(TextFieldsOutlined, { fontSize: "small" }))) : /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 0.25 }, /* @__PURE__ */ React62.createElement(IconButton, { size: "small", onClick: onBold, title: t("toolbar.bold-shortcut", "Bold (Cmd+B)"), "aria-label": t("toolbar.bold", "Bold") }, /* @__PURE__ */ React62.createElement(FormatBoldOutlined, { fontSize: "small" })), /* @__PURE__ */ React62.createElement(IconButton, { size: "small", onClick: onItalic, title: t("toolbar.italic-shortcut", "Italic (Cmd+I)"), "aria-label": t("toolbar.italic", "Italic") }, /* @__PURE__ */ React62.createElement(FormatItalicOutlined, { fontSize: "small" })), /* @__PURE__ */ React62.createElement(IconButton, { size: "small", onClick: onUnderline, title: t("toolbar.underline-shortcut", "Underline (Cmd+U)"), "aria-label": t("toolbar.underline", "Underline") }, /* @__PURE__ */ React62.createElement(FormatUnderlinedOutlined, { fontSize: "small" })), /* @__PURE__ */ React62.createElement(IconButton, { size: "small", onClick: onOverline, title: t("toolbar.overline", "Overline"), "aria-label": t("toolbar.overline", "Overline") }, /* @__PURE__ */ React62.createElement(FormatOverlineOutlined, { fontSize: "small" })), /* @__PURE__ */ React62.createElement(IconButton, { size: "small", onClick: onColorRequest, title: t("toolbar.text-color", "Text color"), "aria-label": t("toolbar.text-color", "Text color") }, /* @__PURE__ */ React62.createElement(FormatColorTextOutlined, { fontSize: "small" })), /* @__PURE__ */ React62.createElement(IconButton, { size: "small", onClick: onFontRequest, title: t("toolbar.font-family", "Font family"), "aria-label": t("toolbar.font-family", "Font family") }, /* @__PURE__ */ React62.createElement(TextFieldsOutlined, { fontSize: "small" })), /* @__PURE__ */ React62.createElement(IconButton, { size: "small", onClick: onLinkRequest, title: t("toolbar.link-shortcut", "Link (Cmd+K)"), "aria-label": t("toolbar.link", "Link") }, /* @__PURE__ */ React62.createElement(LinkOutlined, { fontSize: "small" })))));
7766
+ FONT_OPTIONS.map((opt) => /* @__PURE__ */ React63.createElement(MenuItem, { key: opt.value, value: opt.value, sx: { fontFamily: opt.value } }, opt.label))
7767
+ ), /* @__PURE__ */ React63.createElement(IconButton, { size: "small", onClick: onPromptCancel, title: t("common.cancel", "Cancel") }, /* @__PURE__ */ React63.createElement(TextFieldsOutlined, { fontSize: "small" }))) : /* @__PURE__ */ React63.createElement(Stack, { direction: "row", spacing: 0.25 }, /* @__PURE__ */ React63.createElement(IconButton, { size: "small", onClick: onBold, title: t("toolbar.bold-shortcut", "Bold (Cmd+B)"), "aria-label": t("toolbar.bold", "Bold") }, /* @__PURE__ */ React63.createElement(FormatBoldOutlined, { fontSize: "small" })), /* @__PURE__ */ React63.createElement(IconButton, { size: "small", onClick: onItalic, title: t("toolbar.italic-shortcut", "Italic (Cmd+I)"), "aria-label": t("toolbar.italic", "Italic") }, /* @__PURE__ */ React63.createElement(FormatItalicOutlined, { fontSize: "small" })), /* @__PURE__ */ React63.createElement(IconButton, { size: "small", onClick: onUnderline, title: t("toolbar.underline-shortcut", "Underline (Cmd+U)"), "aria-label": t("toolbar.underline", "Underline") }, /* @__PURE__ */ React63.createElement(FormatUnderlinedOutlined, { fontSize: "small" })), /* @__PURE__ */ React63.createElement(IconButton, { size: "small", onClick: onOverline, title: t("toolbar.overline", "Overline"), "aria-label": t("toolbar.overline", "Overline") }, /* @__PURE__ */ React63.createElement(FormatOverlineOutlined, { fontSize: "small" })), /* @__PURE__ */ React63.createElement(IconButton, { size: "small", onClick: onColorRequest, title: t("toolbar.text-color", "Text color"), "aria-label": t("toolbar.text-color", "Text color") }, /* @__PURE__ */ React63.createElement(FormatColorTextOutlined, { fontSize: "small" })), /* @__PURE__ */ React63.createElement(IconButton, { size: "small", onClick: onFontRequest, title: t("toolbar.font-family", "Font family"), "aria-label": t("toolbar.font-family", "Font family") }, /* @__PURE__ */ React63.createElement(TextFieldsOutlined, { fontSize: "small" })), /* @__PURE__ */ React63.createElement(IconButton, { size: "small", onClick: onLinkRequest, title: t("toolbar.link-shortcut", "Link (Cmd+K)"), "aria-label": t("toolbar.link", "Link") }, /* @__PURE__ */ React63.createElement(LinkOutlined, { fontSize: "small" })))));
7715
7768
  }
7716
7769
 
7717
7770
  // src/editor/blocks/heading/heading-editor.tsx
@@ -7866,7 +7919,7 @@ function HeadingEditor({ style, props }) {
7866
7919
  if (textareaRef.current) adjustTextareaHeight(textareaRef.current);
7867
7920
  }, [localText, isSelected]);
7868
7921
  if (isSelected) {
7869
- return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
7922
+ return /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(
7870
7923
  "textarea",
7871
7924
  {
7872
7925
  ref: textareaRef,
@@ -7884,7 +7937,7 @@ function HeadingEditor({ style, props }) {
7884
7937
  rows: 1,
7885
7938
  onInput: (e) => adjustTextareaHeight(e.target)
7886
7939
  }
7887
- ), /* @__PURE__ */ React62.createElement(InlineFormattingToolbar, __spreadValues({ anchorEl: textareaRef.current }, toolbarProps)));
7940
+ ), /* @__PURE__ */ React63.createElement(InlineFormattingToolbar, __spreadValues({ anchorEl: textareaRef.current }, toolbarProps)));
7888
7941
  }
7889
7942
  const headingProps = isMarkdown ? {
7890
7943
  ref: displayRef,
@@ -7893,11 +7946,11 @@ function HeadingEditor({ style, props }) {
7893
7946
  } : { ref: displayRef, style: hStyle, children: textContent };
7894
7947
  switch (level) {
7895
7948
  case "h1":
7896
- return /* @__PURE__ */ React62.createElement("h1", __spreadValues({}, headingProps));
7949
+ return /* @__PURE__ */ React63.createElement("h1", __spreadValues({}, headingProps));
7897
7950
  case "h2":
7898
- return /* @__PURE__ */ React62.createElement("h2", __spreadValues({}, headingProps));
7951
+ return /* @__PURE__ */ React63.createElement("h2", __spreadValues({}, headingProps));
7899
7952
  case "h3":
7900
- return /* @__PURE__ */ React62.createElement("h3", __spreadValues({}, headingProps));
7953
+ return /* @__PURE__ */ React63.createElement("h3", __spreadValues({}, headingProps));
7901
7954
  }
7902
7955
  }
7903
7956
  function HtmlEditor({ style, props }) {
@@ -7962,7 +8015,7 @@ function HtmlEditor({ style, props }) {
7962
8015
  selectionEnd: (_b2 = el.selectionEnd) != null ? _b2 : el.value.length
7963
8016
  });
7964
8017
  };
7965
- return /* @__PURE__ */ React62.createElement("div", { style: cssStyle }, /* @__PURE__ */ React62.createElement(
8018
+ return /* @__PURE__ */ React63.createElement("div", { style: cssStyle }, /* @__PURE__ */ React63.createElement(
7966
8019
  "textarea",
7967
8020
  {
7968
8021
  value: localContents,
@@ -7982,9 +8035,9 @@ function HtmlEditor({ style, props }) {
7982
8035
  ));
7983
8036
  }
7984
8037
  if (!contents) {
7985
- return /* @__PURE__ */ React62.createElement("div", { style: cssStyle });
8038
+ return /* @__PURE__ */ React63.createElement("div", { style: cssStyle });
7986
8039
  }
7987
- return /* @__PURE__ */ React62.createElement("div", { style: cssStyle, dangerouslySetInnerHTML: { __html: contents } });
8040
+ return /* @__PURE__ */ React63.createElement("div", { style: cssStyle, dangerouslySetInnerHTML: { __html: contents } });
7988
8041
  }
7989
8042
  function getImageBorderRadius2(shape, size) {
7990
8043
  switch (shape) {
@@ -8099,7 +8152,7 @@ function SignatureEditor({ style, props }) {
8099
8152
  backgroundColor: (_p = style == null ? void 0 : style.backgroundColor) != null ? _p : void 0,
8100
8153
  padding: (style == null ? void 0 : style.padding) ? `${style.padding.top}px ${style.padding.right}px ${style.padding.bottom}px ${style.padding.left}px` : void 0
8101
8154
  };
8102
- const imageElement = imageUrl ? /* @__PURE__ */ React62.createElement(
8155
+ const imageElement = imageUrl ? /* @__PURE__ */ React63.createElement(
8103
8156
  "img",
8104
8157
  {
8105
8158
  src: imageUrl,
@@ -8117,7 +8170,7 @@ function SignatureEditor({ style, props }) {
8117
8170
  }
8118
8171
  }
8119
8172
  ) : null;
8120
- const greetingElement = isSelected ? /* @__PURE__ */ React62.createElement("div", { onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React62.createElement(
8173
+ const greetingElement = isSelected ? /* @__PURE__ */ React63.createElement("div", { onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React63.createElement(
8121
8174
  "input",
8122
8175
  {
8123
8176
  value: localGreeting,
@@ -8128,8 +8181,8 @@ function SignatureEditor({ style, props }) {
8128
8181
  placeholder: "Greeting (e.g. Best regards,)",
8129
8182
  style: __spreadValues(__spreadValues({}, inputBase), greetingStyle)
8130
8183
  }
8131
- )) : greeting ? /* @__PURE__ */ React62.createElement("p", { style: greetingStyle }, greeting) : null;
8132
- const textContent = isSelected ? /* @__PURE__ */ React62.createElement("div", { onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React62.createElement(
8184
+ )) : greeting ? /* @__PURE__ */ React63.createElement("p", { style: greetingStyle }, greeting) : null;
8185
+ const textContent = isSelected ? /* @__PURE__ */ React63.createElement("div", { onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React63.createElement(
8133
8186
  "input",
8134
8187
  {
8135
8188
  value: localName,
@@ -8140,7 +8193,7 @@ function SignatureEditor({ style, props }) {
8140
8193
  placeholder: "Name",
8141
8194
  style: __spreadValues(__spreadValues({}, inputBase), nameStyle)
8142
8195
  }
8143
- ), /* @__PURE__ */ React62.createElement(
8196
+ ), /* @__PURE__ */ React63.createElement(
8144
8197
  "input",
8145
8198
  {
8146
8199
  value: localTitle,
@@ -8151,7 +8204,7 @@ function SignatureEditor({ style, props }) {
8151
8204
  placeholder: "Title",
8152
8205
  style: __spreadValues(__spreadValues({}, inputBase), detailStyle)
8153
8206
  }
8154
- ), /* @__PURE__ */ React62.createElement(
8207
+ ), /* @__PURE__ */ React63.createElement(
8155
8208
  "input",
8156
8209
  {
8157
8210
  value: localCompany,
@@ -8162,7 +8215,7 @@ function SignatureEditor({ style, props }) {
8162
8215
  placeholder: "Company",
8163
8216
  style: __spreadValues(__spreadValues({}, inputBase), detailStyle)
8164
8217
  }
8165
- ), /* @__PURE__ */ React62.createElement(
8218
+ ), /* @__PURE__ */ React63.createElement(
8166
8219
  "input",
8167
8220
  {
8168
8221
  value: localAddress,
@@ -8173,7 +8226,7 @@ function SignatureEditor({ style, props }) {
8173
8226
  placeholder: "Address",
8174
8227
  style: __spreadValues(__spreadValues({}, inputBase), detailStyle)
8175
8228
  }
8176
- ), /* @__PURE__ */ React62.createElement(
8229
+ ), /* @__PURE__ */ React63.createElement(
8177
8230
  "input",
8178
8231
  {
8179
8232
  value: localEmail,
@@ -8184,7 +8237,7 @@ function SignatureEditor({ style, props }) {
8184
8237
  placeholder: "Email",
8185
8238
  style: __spreadProps(__spreadValues(__spreadValues({}, inputBase), linkStyle), { marginTop: 4, display: "block" })
8186
8239
  }
8187
- ), /* @__PURE__ */ React62.createElement(
8240
+ ), /* @__PURE__ */ React63.createElement(
8188
8241
  "input",
8189
8242
  {
8190
8243
  value: localPhone,
@@ -8195,7 +8248,7 @@ function SignatureEditor({ style, props }) {
8195
8248
  placeholder: "Phone",
8196
8249
  style: __spreadProps(__spreadValues(__spreadValues({}, inputBase), linkStyle), { display: "block" })
8197
8250
  }
8198
- ), /* @__PURE__ */ React62.createElement(
8251
+ ), /* @__PURE__ */ React63.createElement(
8199
8252
  "input",
8200
8253
  {
8201
8254
  value: localWebsite,
@@ -8206,11 +8259,11 @@ function SignatureEditor({ style, props }) {
8206
8259
  placeholder: "Website",
8207
8260
  style: __spreadProps(__spreadValues(__spreadValues({}, inputBase), linkStyle), { display: "block" })
8208
8261
  }
8209
- )) : /* @__PURE__ */ React62.createElement("div", null, name && /* @__PURE__ */ React62.createElement("p", { style: nameStyle }, name), title && /* @__PURE__ */ React62.createElement("p", { style: detailStyle }, title), company && /* @__PURE__ */ React62.createElement("p", { style: detailStyle }, company), address && /* @__PURE__ */ React62.createElement("p", { style: detailStyle }, address), (email || phone || website) && /* @__PURE__ */ React62.createElement("p", { style: __spreadProps(__spreadValues({}, detailStyle), { marginTop: 4 }) }, email && /* @__PURE__ */ React62.createElement("span", { style: linkStyle }, email), email && (phone || website) && /* @__PURE__ */ React62.createElement("span", { style: detailStyle }, " \xB7 "), phone && /* @__PURE__ */ React62.createElement("span", { style: linkStyle }, phone), phone && website && /* @__PURE__ */ React62.createElement("span", { style: detailStyle }, " \xB7 "), website && /* @__PURE__ */ React62.createElement("span", { style: linkStyle }, website)), !name && !title && !company && !email && !phone && !website && /* @__PURE__ */ React62.createElement("p", { style: detailStyle }, "Click to edit signature"));
8262
+ )) : /* @__PURE__ */ React63.createElement("div", null, name && /* @__PURE__ */ React63.createElement("p", { style: nameStyle }, name), title && /* @__PURE__ */ React63.createElement("p", { style: detailStyle }, title), company && /* @__PURE__ */ React63.createElement("p", { style: detailStyle }, company), address && /* @__PURE__ */ React63.createElement("p", { style: detailStyle }, address), (email || phone || website) && /* @__PURE__ */ React63.createElement("p", { style: __spreadProps(__spreadValues({}, detailStyle), { marginTop: 4 }) }, email && /* @__PURE__ */ React63.createElement("span", { style: linkStyle }, email), email && (phone || website) && /* @__PURE__ */ React63.createElement("span", { style: detailStyle }, " \xB7 "), phone && /* @__PURE__ */ React63.createElement("span", { style: linkStyle }, phone), phone && website && /* @__PURE__ */ React63.createElement("span", { style: detailStyle }, " \xB7 "), website && /* @__PURE__ */ React63.createElement("span", { style: linkStyle }, website)), !name && !title && !company && !email && !phone && !website && /* @__PURE__ */ React63.createElement("p", { style: detailStyle }, "Click to edit signature"));
8210
8263
  if (layout === "vertical") {
8211
- return /* @__PURE__ */ React62.createElement("div", { style: wrapperStyle }, greetingElement, imageElement && /* @__PURE__ */ React62.createElement("div", { style: { marginBottom: 12 } }, imageElement), textContent);
8264
+ return /* @__PURE__ */ React63.createElement("div", { style: wrapperStyle }, greetingElement, imageElement && /* @__PURE__ */ React63.createElement("div", { style: { marginBottom: 12 } }, imageElement), textContent);
8212
8265
  }
8213
- return /* @__PURE__ */ React62.createElement("div", { style: wrapperStyle }, greetingElement, /* @__PURE__ */ React62.createElement("table", { cellPadding: "0", cellSpacing: "0", border: 0, role: "presentation" }, /* @__PURE__ */ React62.createElement("tbody", null, /* @__PURE__ */ React62.createElement("tr", null, imageElement && /* @__PURE__ */ React62.createElement("td", { style: { verticalAlign: "middle", paddingRight: 16 } }, imageElement), /* @__PURE__ */ React62.createElement("td", { style: { verticalAlign: "middle" } }, textContent)))));
8266
+ return /* @__PURE__ */ React63.createElement("div", { style: wrapperStyle }, greetingElement, /* @__PURE__ */ React63.createElement("table", { cellPadding: "0", cellSpacing: "0", border: 0, role: "presentation" }, /* @__PURE__ */ React63.createElement("tbody", null, /* @__PURE__ */ React63.createElement("tr", null, imageElement && /* @__PURE__ */ React63.createElement("td", { style: { verticalAlign: "middle", paddingRight: 16 } }, imageElement), /* @__PURE__ */ React63.createElement("td", { style: { verticalAlign: "middle" } }, textContent)))));
8214
8267
  }
8215
8268
  function getFontFamily10(fontFamily) {
8216
8269
  switch (fontFamily) {
@@ -8354,7 +8407,7 @@ function TextEditor({ style, props }) {
8354
8407
  if (textareaRef.current) adjustTextareaHeight(textareaRef.current);
8355
8408
  }, [localText, isSelected]);
8356
8409
  if (isSelected) {
8357
- return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
8410
+ return /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(
8358
8411
  "textarea",
8359
8412
  {
8360
8413
  ref: textareaRef,
@@ -8372,10 +8425,10 @@ function TextEditor({ style, props }) {
8372
8425
  rows: 1,
8373
8426
  onInput: (e) => adjustTextareaHeight(e.target)
8374
8427
  }
8375
- ), /* @__PURE__ */ React62.createElement(InlineFormattingToolbar, __spreadValues({ anchorEl: textareaRef.current }, toolbarProps)));
8428
+ ), /* @__PURE__ */ React63.createElement(InlineFormattingToolbar, __spreadValues({ anchorEl: textareaRef.current }, toolbarProps)));
8376
8429
  }
8377
8430
  if (isMarkdown) {
8378
- return /* @__PURE__ */ React62.createElement(
8431
+ return /* @__PURE__ */ React63.createElement(
8379
8432
  "div",
8380
8433
  {
8381
8434
  ref: displayRef,
@@ -8384,34 +8437,34 @@ function TextEditor({ style, props }) {
8384
8437
  }
8385
8438
  );
8386
8439
  }
8387
- return /* @__PURE__ */ React62.createElement("div", { ref: displayRef, style: wStyle }, textContent);
8440
+ return /* @__PURE__ */ React63.createElement("div", { ref: displayRef, style: wStyle }, textContent);
8388
8441
  }
8389
8442
 
8390
8443
  // src/editor/core.tsx
8391
8444
  var EDITOR_DICTIONARY = buildBlockConfigurationDictionary({
8392
8445
  Avatar: {
8393
8446
  schema: AvatarPropsSchema,
8394
- Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(avatar_default, __spreadValues({}, props)))
8447
+ Component: (props) => /* @__PURE__ */ React63.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React63.createElement(avatar_default, __spreadValues({}, props)))
8395
8448
  },
8396
8449
  Button: {
8397
8450
  schema: ButtonPropsSchema,
8398
- Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(ButtonEditor, __spreadValues({}, props)))
8451
+ Component: (props) => /* @__PURE__ */ React63.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React63.createElement(ButtonEditor, __spreadValues({}, props)))
8399
8452
  },
8400
8453
  Container: {
8401
8454
  schema: container_props_schema_default,
8402
- Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(ContainerEditor, __spreadValues({}, props)))
8455
+ Component: (props) => /* @__PURE__ */ React63.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React63.createElement(ContainerEditor, __spreadValues({}, props)))
8403
8456
  },
8404
8457
  ColumnsContainer: {
8405
8458
  schema: columns_container_props_schema_default2,
8406
- Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(ColumnsContainerEditor, __spreadValues({}, props)))
8459
+ Component: (props) => /* @__PURE__ */ React63.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React63.createElement(ColumnsContainerEditor, __spreadValues({}, props)))
8407
8460
  },
8408
8461
  Heading: {
8409
8462
  schema: HeadingPropsSchema,
8410
- Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(HeadingEditor, __spreadValues({}, props)))
8463
+ Component: (props) => /* @__PURE__ */ React63.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React63.createElement(HeadingEditor, __spreadValues({}, props)))
8411
8464
  },
8412
8465
  Html: {
8413
8466
  schema: HtmlPropsSchema,
8414
- Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(HtmlEditor, __spreadValues({}, props)))
8467
+ Component: (props) => /* @__PURE__ */ React63.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React63.createElement(HtmlEditor, __spreadValues({}, props)))
8415
8468
  },
8416
8469
  Image: {
8417
8470
  schema: ImagePropsSchema,
@@ -8423,28 +8476,28 @@ var EDITOR_DICTIONARY = buildBlockConfigurationDictionary({
8423
8476
  linkHref: null
8424
8477
  })
8425
8478
  });
8426
- return /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(image_default, __spreadValues({}, props)));
8479
+ return /* @__PURE__ */ React63.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React63.createElement(image_default, __spreadValues({}, props)));
8427
8480
  }
8428
8481
  },
8429
8482
  Text: {
8430
8483
  schema: TextPropsSchema,
8431
- Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(TextEditor, __spreadValues({}, props)))
8484
+ Component: (props) => /* @__PURE__ */ React63.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React63.createElement(TextEditor, __spreadValues({}, props)))
8432
8485
  },
8433
8486
  EmailLayout: {
8434
8487
  schema: email_layout_props_schema_default,
8435
- Component: (p) => /* @__PURE__ */ React62.createElement(EmailLayoutEditor, __spreadValues({}, p))
8488
+ Component: (p) => /* @__PURE__ */ React63.createElement(EmailLayoutEditor, __spreadValues({}, p))
8436
8489
  },
8437
8490
  Spacer: {
8438
8491
  schema: SpacerPropsSchema,
8439
- Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(spacer_default, __spreadValues({}, props)))
8492
+ Component: (props) => /* @__PURE__ */ React63.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React63.createElement(spacer_default, __spreadValues({}, props)))
8440
8493
  },
8441
8494
  Divider: {
8442
8495
  schema: DividerPropsSchema,
8443
- Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(divider_default, __spreadValues({}, props)))
8496
+ Component: (props) => /* @__PURE__ */ React63.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React63.createElement(divider_default, __spreadValues({}, props)))
8444
8497
  },
8445
8498
  Signature: {
8446
8499
  schema: SignaturePropsSchema,
8447
- Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(SignatureEditor, __spreadValues({}, props)))
8500
+ Component: (props) => /* @__PURE__ */ React63.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React63.createElement(SignatureEditor, __spreadValues({}, props)))
8448
8501
  }
8449
8502
  });
8450
8503
  var EditorBlock2 = buildBlockComponent(EDITOR_DICTIONARY);
@@ -8460,7 +8513,7 @@ function EditorBlock({ id }) {
8460
8513
  if (!block) {
8461
8514
  throw new Error("Could not find block");
8462
8515
  }
8463
- return /* @__PURE__ */ React62.createElement(EditorBlockContext.Provider, { value: id }, /* @__PURE__ */ React62.createElement(EditorBlock2, __spreadValues({}, block)));
8516
+ return /* @__PURE__ */ React63.createElement(EditorBlockContext.Provider, { value: id }, /* @__PURE__ */ React63.createElement(EditorBlock2, __spreadValues({}, block)));
8464
8517
  }
8465
8518
  function ToggleInspectorPanelButton() {
8466
8519
  const inspectorDrawerOpen = useInspectorDrawerOpen();
@@ -8468,20 +8521,20 @@ function ToggleInspectorPanelButton() {
8468
8521
  toggleInspectorDrawerOpen();
8469
8522
  };
8470
8523
  if (inspectorDrawerOpen) {
8471
- return /* @__PURE__ */ React62.createElement(IconButton, { onClick: handleClick }, /* @__PURE__ */ React62.createElement(LastPageOutlined, { fontSize: "small" }));
8524
+ return /* @__PURE__ */ React63.createElement(IconButton, { onClick: handleClick }, /* @__PURE__ */ React63.createElement(LastPageOutlined, { fontSize: "small" }));
8472
8525
  }
8473
- return /* @__PURE__ */ React62.createElement(IconButton, { onClick: handleClick }, /* @__PURE__ */ React62.createElement(AppRegistrationOutlined, { fontSize: "small" }));
8526
+ return /* @__PURE__ */ React63.createElement(IconButton, { onClick: handleClick }, /* @__PURE__ */ React63.createElement(AppRegistrationOutlined, { fontSize: "small" }));
8474
8527
  }
8475
8528
  function useIcon() {
8476
8529
  const samplesDrawerOpen = useSamplesDrawerOpen();
8477
8530
  if (samplesDrawerOpen) {
8478
- return /* @__PURE__ */ React62.createElement(FirstPageOutlined, { fontSize: "small" });
8531
+ return /* @__PURE__ */ React63.createElement(FirstPageOutlined, { fontSize: "small" });
8479
8532
  }
8480
- return /* @__PURE__ */ React62.createElement(MenuOutlined, { fontSize: "small" });
8533
+ return /* @__PURE__ */ React63.createElement(MenuOutlined, { fontSize: "small" });
8481
8534
  }
8482
8535
  function ToggleSamplesPanelButton() {
8483
8536
  const icon = useIcon();
8484
- return /* @__PURE__ */ React62.createElement(IconButton, { onClick: toggleSamplesDrawerOpen }, icon);
8537
+ return /* @__PURE__ */ React63.createElement(IconButton, { onClick: toggleSamplesDrawerOpen }, icon);
8485
8538
  }
8486
8539
  function formatHtml(html2, spaces = 2) {
8487
8540
  try {
@@ -8543,7 +8596,7 @@ function HighlightedCodePanel({ type, value }) {
8543
8596
  if (code === null) {
8544
8597
  return null;
8545
8598
  }
8546
- return /* @__PURE__ */ React62.createElement(
8599
+ return /* @__PURE__ */ React63.createElement(
8547
8600
  "pre",
8548
8601
  {
8549
8602
  style: {
@@ -8569,17 +8622,17 @@ function HighlightedCodePanel({ type, value }) {
8569
8622
  function HtmlPanel() {
8570
8623
  const document2 = useDocument();
8571
8624
  const code = useMemo(() => renderToStaticMarkup(document2, { rootBlockId: "root" }), [document2]);
8572
- return /* @__PURE__ */ React62.createElement(HighlightedCodePanel, { type: "html", value: code });
8625
+ return /* @__PURE__ */ React63.createElement(HighlightedCodePanel, { type: "html", value: code });
8573
8626
  }
8574
8627
  function JsonPanel() {
8575
8628
  const document2 = useDocument();
8576
8629
  const code = useMemo(() => JSON.stringify(document2, null, " "), [document2]);
8577
- return /* @__PURE__ */ React62.createElement(HighlightedCodePanel, { type: "json", value: code });
8630
+ return /* @__PURE__ */ React63.createElement(HighlightedCodePanel, { type: "json", value: code });
8578
8631
  }
8579
8632
  function TextPanel() {
8580
8633
  const document2 = useDocument();
8581
8634
  const text = useMemo(() => renderToText(document2, { rootBlockId: "root" }), [document2]);
8582
- return /* @__PURE__ */ React62.createElement(
8635
+ return /* @__PURE__ */ React63.createElement(
8583
8636
  "pre",
8584
8637
  {
8585
8638
  style: {
@@ -8615,35 +8668,35 @@ function MainTabsGroup() {
8615
8668
  setSelectedMainTab("editor");
8616
8669
  }
8617
8670
  };
8618
- return /* @__PURE__ */ React62.createElement(Tabs, { value: selectedMainTab, onChange: handleChange }, /* @__PURE__ */ React62.createElement(
8671
+ return /* @__PURE__ */ React63.createElement(Tabs, { value: selectedMainTab, onChange: handleChange }, /* @__PURE__ */ React63.createElement(
8619
8672
  Tab,
8620
8673
  {
8621
8674
  value: "editor",
8622
- label: /* @__PURE__ */ React62.createElement(Tooltip, { title: t("tab.edit", "Edit") }, /* @__PURE__ */ React62.createElement(EditOutlined, { fontSize: "small" }))
8675
+ label: /* @__PURE__ */ React63.createElement(Tooltip, { title: t("tab.edit", "Edit") }, /* @__PURE__ */ React63.createElement(EditOutlined, { fontSize: "small" }))
8623
8676
  }
8624
- ), /* @__PURE__ */ React62.createElement(
8677
+ ), /* @__PURE__ */ React63.createElement(
8625
8678
  Tab,
8626
8679
  {
8627
8680
  value: "preview",
8628
- label: /* @__PURE__ */ React62.createElement(Tooltip, { title: t("tab.preview", "Preview") }, /* @__PURE__ */ React62.createElement(PreviewOutlined, { fontSize: "small" }))
8681
+ label: /* @__PURE__ */ React63.createElement(Tooltip, { title: t("tab.preview", "Preview") }, /* @__PURE__ */ React63.createElement(PreviewOutlined, { fontSize: "small" }))
8629
8682
  }
8630
- ), /* @__PURE__ */ React62.createElement(
8683
+ ), /* @__PURE__ */ React63.createElement(
8631
8684
  Tab,
8632
8685
  {
8633
8686
  value: "html",
8634
- label: /* @__PURE__ */ React62.createElement(Tooltip, { title: t("tab.html-output", "HTML output") }, /* @__PURE__ */ React62.createElement(CodeOutlined, { fontSize: "small" }))
8687
+ label: /* @__PURE__ */ React63.createElement(Tooltip, { title: t("tab.html-output", "HTML output") }, /* @__PURE__ */ React63.createElement(CodeOutlined, { fontSize: "small" }))
8635
8688
  }
8636
- ), /* @__PURE__ */ React62.createElement(
8689
+ ), /* @__PURE__ */ React63.createElement(
8637
8690
  Tab,
8638
8691
  {
8639
8692
  value: "text",
8640
- label: /* @__PURE__ */ React62.createElement(Tooltip, { title: t("tab.text-output", "Plain text output") }, /* @__PURE__ */ React62.createElement(SubjectOutlined, { fontSize: "small" }))
8693
+ label: /* @__PURE__ */ React63.createElement(Tooltip, { title: t("tab.text-output", "Plain text output") }, /* @__PURE__ */ React63.createElement(SubjectOutlined, { fontSize: "small" }))
8641
8694
  }
8642
- ), /* @__PURE__ */ React62.createElement(
8695
+ ), /* @__PURE__ */ React63.createElement(
8643
8696
  Tab,
8644
8697
  {
8645
8698
  value: "json",
8646
- label: /* @__PURE__ */ React62.createElement(Tooltip, { title: t("tab.json-output", "JSON output") }, /* @__PURE__ */ React62.createElement(DataObjectOutlined, { fontSize: "small" }))
8699
+ label: /* @__PURE__ */ React63.createElement(Tooltip, { title: t("tab.json-output", "JSON output") }, /* @__PURE__ */ React63.createElement(DataObjectOutlined, { fontSize: "small" }))
8647
8700
  }
8648
8701
  ));
8649
8702
  }
@@ -8698,7 +8751,7 @@ function SaveBar({ loadTemplates, saveAs }) {
8698
8751
  return false;
8699
8752
  }
8700
8753
  });
8701
- return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
8754
+ return /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(
8702
8755
  Box,
8703
8756
  {
8704
8757
  sx: {
@@ -8711,7 +8764,7 @@ function SaveBar({ loadTemplates, saveAs }) {
8711
8764
  pb: 3
8712
8765
  }
8713
8766
  },
8714
- /* @__PURE__ */ React62.createElement(
8767
+ /* @__PURE__ */ React63.createElement(
8715
8768
  Box,
8716
8769
  {
8717
8770
  sx: {
@@ -8726,7 +8779,7 @@ function SaveBar({ loadTemplates, saveAs }) {
8726
8779
  boxShadow: "0 2px 6px rgba(33, 36, 67, 0.06), 0 16px 40px rgba(33, 36, 67, 0.14)"
8727
8780
  }
8728
8781
  },
8729
- hasOpenRow && currentTemplateName && /* @__PURE__ */ React62.createElement(
8782
+ hasOpenRow && currentTemplateName && /* @__PURE__ */ React63.createElement(
8730
8783
  Box,
8731
8784
  {
8732
8785
  sx: {
@@ -8742,25 +8795,25 @@ function SaveBar({ loadTemplates, saveAs }) {
8742
8795
  title: currentTemplateName
8743
8796
  },
8744
8797
  isSample ? `${t("savebar.sample-prefix", "Sample")} \xB7 ` : "",
8745
- /* @__PURE__ */ React62.createElement(Box, { component: "span", sx: { color: "text.primary", fontWeight: 600 } }, currentTemplateName)
8798
+ /* @__PURE__ */ React63.createElement(Box, { component: "span", sx: { color: "text.primary", fontWeight: 600 } }, currentTemplateName)
8746
8799
  ),
8747
- /* @__PURE__ */ React62.createElement(Tooltip, { title: hasOpenRow ? isSample ? t("savebar.save-changes-to-sample", "Save changes to this sample") : t("savebar.save-changes", "Save changes") : t("savebar.save-as-new-template", "Save as a new template") }, /* @__PURE__ */ React62.createElement(
8800
+ /* @__PURE__ */ React63.createElement(Tooltip, { title: hasOpenRow ? isSample ? t("savebar.save-changes-to-sample", "Save changes to this sample") : t("savebar.save-changes", "Save changes") : t("savebar.save-as-new-template", "Save as a new template") }, /* @__PURE__ */ React63.createElement(
8748
8801
  Button$1,
8749
8802
  {
8750
8803
  variant: "contained",
8751
8804
  size: "large",
8752
- startIcon: /* @__PURE__ */ React62.createElement(SaveOutlined, null),
8805
+ startIcon: /* @__PURE__ */ React63.createElement(SaveOutlined, null),
8753
8806
  onClick: handlePrimary,
8754
8807
  sx: { borderRadius: 999, textTransform: "none", px: 2.5, fontSize: 15, fontWeight: 600 }
8755
8808
  },
8756
8809
  primaryLabel
8757
8810
  )),
8758
- hasOpenRow && saveAs && /* @__PURE__ */ React62.createElement(Tooltip, { title: t("savebar.save-as-new-template", "Save as a new template") }, /* @__PURE__ */ React62.createElement(
8811
+ hasOpenRow && saveAs && /* @__PURE__ */ React63.createElement(Tooltip, { title: t("savebar.save-as-new-template", "Save as a new template") }, /* @__PURE__ */ React63.createElement(
8759
8812
  Button$1,
8760
8813
  {
8761
8814
  variant: "outlined",
8762
8815
  size: "large",
8763
- startIcon: /* @__PURE__ */ React62.createElement(SaveAsOutlined, null),
8816
+ startIcon: /* @__PURE__ */ React63.createElement(SaveAsOutlined, null),
8764
8817
  onClick: () => {
8765
8818
  setNameError(null);
8766
8819
  setDialogMode("save-as");
@@ -8769,12 +8822,12 @@ function SaveBar({ loadTemplates, saveAs }) {
8769
8822
  },
8770
8823
  t("savebar.save-as", "Save as\u2026")
8771
8824
  )),
8772
- saveAs && /* @__PURE__ */ React62.createElement(Tooltip, { title: t("savebar.start-fresh", "Start a fresh template") }, /* @__PURE__ */ React62.createElement(
8825
+ saveAs && /* @__PURE__ */ React63.createElement(Tooltip, { title: t("savebar.start-fresh", "Start a fresh template") }, /* @__PURE__ */ React63.createElement(
8773
8826
  Button$1,
8774
8827
  {
8775
8828
  variant: "text",
8776
8829
  size: "large",
8777
- startIcon: /* @__PURE__ */ React62.createElement(AddOutlined, null),
8830
+ startIcon: /* @__PURE__ */ React63.createElement(AddOutlined, null),
8778
8831
  onClick: () => {
8779
8832
  setNameError(null);
8780
8833
  setDialogMode("new-blank");
@@ -8784,7 +8837,7 @@ function SaveBar({ loadTemplates, saveAs }) {
8784
8837
  t("savebar.new", "New")
8785
8838
  ))
8786
8839
  )
8787
- ), /* @__PURE__ */ React62.createElement(
8840
+ ), /* @__PURE__ */ React63.createElement(
8788
8841
  SaveTemplateDialog,
8789
8842
  {
8790
8843
  open: dialogMode !== null,
@@ -8838,7 +8891,7 @@ function UndoRedoButtons() {
8838
8891
  window.addEventListener("keydown", onKeyDown);
8839
8892
  return () => window.removeEventListener("keydown", onKeyDown);
8840
8893
  }, [mac]);
8841
- return /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 0.5, alignItems: "center" }, /* @__PURE__ */ React62.createElement(Tooltip, { title: `${t("undo.tooltip", "Undo")} (${undoHint})` }, /* @__PURE__ */ React62.createElement("span", null, /* @__PURE__ */ React62.createElement(
8894
+ return /* @__PURE__ */ React63.createElement(Stack, { direction: "row", spacing: 0.5, alignItems: "center" }, /* @__PURE__ */ React63.createElement(Tooltip, { title: `${t("undo.tooltip", "Undo")} (${undoHint})` }, /* @__PURE__ */ React63.createElement("span", null, /* @__PURE__ */ React63.createElement(
8842
8895
  IconButton,
8843
8896
  {
8844
8897
  size: "small",
@@ -8846,8 +8899,8 @@ function UndoRedoButtons() {
8846
8899
  disabled: !canUndo,
8847
8900
  "aria-label": t("undo.label", "Undo")
8848
8901
  },
8849
- /* @__PURE__ */ React62.createElement(UndoOutlined, { fontSize: "small" })
8850
- ))), /* @__PURE__ */ React62.createElement(Tooltip, { title: `${t("redo.tooltip", "Redo")} (${redoHint})` }, /* @__PURE__ */ React62.createElement("span", null, /* @__PURE__ */ React62.createElement(
8902
+ /* @__PURE__ */ React63.createElement(UndoOutlined, { fontSize: "small" })
8903
+ ))), /* @__PURE__ */ React63.createElement(Tooltip, { title: `${t("redo.tooltip", "Redo")} (${redoHint})` }, /* @__PURE__ */ React63.createElement("span", null, /* @__PURE__ */ React63.createElement(
8851
8904
  IconButton,
8852
8905
  {
8853
8906
  size: "small",
@@ -8855,7 +8908,7 @@ function UndoRedoButtons() {
8855
8908
  disabled: !canRedo,
8856
8909
  "aria-label": t("redo.label", "Redo")
8857
8910
  },
8858
- /* @__PURE__ */ React62.createElement(RedoOutlined, { fontSize: "small" })
8911
+ /* @__PURE__ */ React63.createElement(RedoOutlined, { fontSize: "small" })
8859
8912
  ))));
8860
8913
  }
8861
8914
  function SubjectInput() {
@@ -8881,7 +8934,7 @@ function SubjectInput() {
8881
8934
  selectionEnd: (_b = target.selectionEnd) != null ? _b : target.value.length
8882
8935
  });
8883
8936
  };
8884
- return /* @__PURE__ */ React62.createElement(
8937
+ return /* @__PURE__ */ React63.createElement(
8885
8938
  Box,
8886
8939
  {
8887
8940
  sx: {
@@ -8898,8 +8951,8 @@ function SubjectInput() {
8898
8951
  gap: 1.5
8899
8952
  }
8900
8953
  },
8901
- /* @__PURE__ */ React62.createElement(Box, { sx: { color: "text.secondary", fontSize: 13, fontWeight: 600, minWidth: 56 } }, t("subject.label", "Subject")),
8902
- /* @__PURE__ */ React62.createElement(
8954
+ /* @__PURE__ */ React63.createElement(Box, { sx: { color: "text.secondary", fontSize: 13, fontWeight: 600, minWidth: 56 } }, t("subject.label", "Subject")),
8955
+ /* @__PURE__ */ React63.createElement(
8903
8956
  InputBase,
8904
8957
  {
8905
8958
  fullWidth: true,
@@ -8925,7 +8978,7 @@ function SubjectPreview() {
8925
8978
  if (!subject) return null;
8926
8979
  const samples = buildSampleValueMap((_b = data.variables) != null ? _b : []);
8927
8980
  const rendered = substituteSampleValues(subject, samples);
8928
- return /* @__PURE__ */ React62.createElement(
8981
+ return /* @__PURE__ */ React63.createElement(
8929
8982
  Box,
8930
8983
  {
8931
8984
  sx: {
@@ -8942,8 +8995,8 @@ function SubjectPreview() {
8942
8995
  gap: 1.5
8943
8996
  }
8944
8997
  },
8945
- /* @__PURE__ */ React62.createElement(Box, { sx: { color: "text.secondary", fontSize: 13, fontWeight: 600, minWidth: 56 } }, t("subject.label", "Subject")),
8946
- /* @__PURE__ */ React62.createElement(Box, { sx: { fontSize: 14 } }, rendered)
8998
+ /* @__PURE__ */ React63.createElement(Box, { sx: { color: "text.secondary", fontSize: 13, fontWeight: 600, minWidth: 56 } }, t("subject.label", "Subject")),
8999
+ /* @__PURE__ */ React63.createElement(Box, { sx: { fontSize: 14 } }, rendered)
8947
9000
  );
8948
9001
  }
8949
9002
  function generateId3() {
@@ -9016,7 +9069,7 @@ function ImageDropPasteHandler({ enabled, children }) {
9016
9069
  window.addEventListener("paste", handlePaste);
9017
9070
  return () => window.removeEventListener("paste", handlePaste);
9018
9071
  }, [active, uploadImage]);
9019
- if (!active) return /* @__PURE__ */ React62.createElement(React62.Fragment, null, children);
9072
+ if (!active) return /* @__PURE__ */ React63.createElement(React63.Fragment, null, children);
9020
9073
  const onDragEnter = (e) => {
9021
9074
  var _a, _b;
9022
9075
  if (!Array.from((_b = (_a = e.dataTransfer) == null ? void 0 : _a.items) != null ? _b : []).some((i) => i.kind === "file")) return;
@@ -9049,7 +9102,7 @@ function ImageDropPasteHandler({ enabled, children }) {
9049
9102
  setUploading(false);
9050
9103
  }
9051
9104
  });
9052
- return /* @__PURE__ */ React62.createElement(
9105
+ return /* @__PURE__ */ React63.createElement(
9053
9106
  Box,
9054
9107
  {
9055
9108
  ref: wrapperRef,
@@ -9060,7 +9113,7 @@ function ImageDropPasteHandler({ enabled, children }) {
9060
9113
  sx: { position: "relative" }
9061
9114
  },
9062
9115
  children,
9063
- (dragging || uploading) && /* @__PURE__ */ React62.createElement(
9116
+ (dragging || uploading) && /* @__PURE__ */ React63.createElement(
9064
9117
  Box,
9065
9118
  {
9066
9119
  sx: {
@@ -9079,7 +9132,7 @@ function ImageDropPasteHandler({ enabled, children }) {
9079
9132
  zIndex: 10
9080
9133
  }
9081
9134
  },
9082
- /* @__PURE__ */ React62.createElement(Box, { sx: { display: "flex", alignItems: "center", gap: 1, fontWeight: 600, fontSize: 14 } }, /* @__PURE__ */ React62.createElement(CloudUploadOutlined, null), uploading ? "Uploading\u2026" : "Drop image to insert")
9135
+ /* @__PURE__ */ React63.createElement(Box, { sx: { display: "flex", alignItems: "center", gap: 1, fontWeight: 600, fontSize: 14 } }, /* @__PURE__ */ React63.createElement(CloudUploadOutlined, null), uploading ? "Uploading\u2026" : "Drop image to insert")
9083
9136
  )
9084
9137
  );
9085
9138
  }
@@ -9093,6 +9146,16 @@ function TemplatePanel2({ loadTemplates, saveAs, samplesDrawerEnabled = true })
9093
9146
  const selectedScreenSize = useSelectedScreenSize();
9094
9147
  const persistenceEnabled = usePersistenceEnabled();
9095
9148
  const workspaceBackground = useWorkspaceBackground();
9149
+ const { onTestSend } = useEditorConfig();
9150
+ const handleTestSend = () => {
9151
+ var _a;
9152
+ if (!onTestSend) return;
9153
+ const root = document2.root;
9154
+ const layoutData = root && root.type === "EmailLayout" ? root.data : void 0;
9155
+ const html2 = renderToStaticMarkup(document2, { rootBlockId: "root" });
9156
+ const text = renderToText(document2, { rootBlockId: "root" });
9157
+ onTestSend({ html: html2, text, subject: (_a = layoutData == null ? void 0 : layoutData.subject) != null ? _a : void 0 });
9158
+ };
9096
9159
  let mainBoxSx = {
9097
9160
  height: "100%"
9098
9161
  };
@@ -9119,7 +9182,7 @@ function TemplatePanel2({ loadTemplates, saveAs, samplesDrawerEnabled = true })
9119
9182
  var _a;
9120
9183
  switch (selectedMainTab) {
9121
9184
  case "editor":
9122
- return /* @__PURE__ */ React62.createElement(Box, { sx: mainBoxSx }, /* @__PURE__ */ React62.createElement(EditorBlock, { id: "root" }));
9185
+ return /* @__PURE__ */ React63.createElement(Box, { sx: mainBoxSx }, /* @__PURE__ */ React63.createElement(EditorBlock, { id: "root" }));
9123
9186
  case "preview": {
9124
9187
  const rootBlock = document2.root;
9125
9188
  const layoutData = rootBlock && rootBlock.type === "EmailLayout" ? rootBlock.data : void 0;
@@ -9127,18 +9190,18 @@ function TemplatePanel2({ loadTemplates, saveAs, samplesDrawerEnabled = true })
9127
9190
  (_a = layoutData == null ? void 0 : layoutData.variables) != null ? _a : []
9128
9191
  );
9129
9192
  const previewDoc = applySampleValuesToDocument(document2, samples);
9130
- return /* @__PURE__ */ React62.createElement(Box, { sx: mainBoxSx }, /* @__PURE__ */ React62.createElement(Reader, { document: previewDoc, rootBlockId: "root" }));
9193
+ return /* @__PURE__ */ React63.createElement(Box, { sx: mainBoxSx }, /* @__PURE__ */ React63.createElement(Reader, { document: previewDoc, rootBlockId: "root" }));
9131
9194
  }
9132
9195
  case "html":
9133
- return /* @__PURE__ */ React62.createElement(HtmlPanel, null);
9196
+ return /* @__PURE__ */ React63.createElement(HtmlPanel, null);
9134
9197
  case "text":
9135
- return /* @__PURE__ */ React62.createElement(TextPanel, null);
9198
+ return /* @__PURE__ */ React63.createElement(TextPanel, null);
9136
9199
  case "json":
9137
- return /* @__PURE__ */ React62.createElement(JsonPanel, null);
9200
+ return /* @__PURE__ */ React63.createElement(JsonPanel, null);
9138
9201
  }
9139
9202
  };
9140
9203
  const showSaveButtons = persistenceEnabled;
9141
- return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
9204
+ return /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(
9142
9205
  Stack,
9143
9206
  {
9144
9207
  sx: {
@@ -9155,10 +9218,10 @@ function TemplatePanel2({ loadTemplates, saveAs, samplesDrawerEnabled = true })
9155
9218
  justifyContent: "space-between",
9156
9219
  alignItems: "center"
9157
9220
  },
9158
- samplesDrawerEnabled && /* @__PURE__ */ React62.createElement(ToggleSamplesPanelButton, null),
9159
- /* @__PURE__ */ React62.createElement(Stack, { px: 2, direction: "row", gap: 2, width: "100%", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 2 }, /* @__PURE__ */ React62.createElement(MainTabsGroup, null)), /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 2, alignItems: "center" }, selectedMainTab === "editor" && /* @__PURE__ */ React62.createElement(UndoRedoButtons, null), /* @__PURE__ */ React62.createElement(ToggleButtonGroup, { value: selectedScreenSize, exclusive: true, size: "small", onChange: handleScreenSizeChange }, /* @__PURE__ */ React62.createElement(ToggleButton, { value: "desktop" }, /* @__PURE__ */ React62.createElement(Tooltip, { title: t("canvas.desktop-view", "Desktop view") }, /* @__PURE__ */ React62.createElement(MonitorOutlined, { fontSize: "small" }))), /* @__PURE__ */ React62.createElement(ToggleButton, { value: "mobile" }, /* @__PURE__ */ React62.createElement(Tooltip, { title: t("canvas.mobile-view", "Mobile view") }, /* @__PURE__ */ React62.createElement(PhoneIphoneOutlined, { fontSize: "small" })))))),
9160
- /* @__PURE__ */ React62.createElement(ToggleInspectorPanelButton, null)
9161
- ), selectedMainTab === "editor" && /* @__PURE__ */ React62.createElement(SubjectInput, null), selectedMainTab === "preview" && /* @__PURE__ */ React62.createElement(SubjectPreview, null), /* @__PURE__ */ React62.createElement(ImageDropPasteHandler, { enabled: selectedMainTab === "editor" }, /* @__PURE__ */ React62.createElement(
9221
+ samplesDrawerEnabled && /* @__PURE__ */ React63.createElement(ToggleSamplesPanelButton, null),
9222
+ /* @__PURE__ */ React63.createElement(Stack, { px: 2, direction: "row", gap: 2, width: "100%", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ React63.createElement(Stack, { direction: "row", spacing: 2 }, /* @__PURE__ */ React63.createElement(MainTabsGroup, null)), /* @__PURE__ */ React63.createElement(Stack, { direction: "row", spacing: 2, alignItems: "center" }, selectedMainTab === "editor" && /* @__PURE__ */ React63.createElement(UndoRedoButtons, null), /* @__PURE__ */ React63.createElement(ToggleButtonGroup, { value: selectedScreenSize, exclusive: true, size: "small", onChange: handleScreenSizeChange }, /* @__PURE__ */ React63.createElement(ToggleButton, { value: "desktop" }, /* @__PURE__ */ React63.createElement(Tooltip, { title: t("canvas.desktop-view", "Desktop view") }, /* @__PURE__ */ React63.createElement(MonitorOutlined, { fontSize: "small" }))), /* @__PURE__ */ React63.createElement(ToggleButton, { value: "mobile" }, /* @__PURE__ */ React63.createElement(Tooltip, { title: t("canvas.mobile-view", "Mobile view") }, /* @__PURE__ */ React63.createElement(PhoneIphoneOutlined, { fontSize: "small" })))), onTestSend && /* @__PURE__ */ React63.createElement(Tooltip, { title: t("canvas.send-test", "Send test") }, /* @__PURE__ */ React63.createElement(IconButton, { size: "small", onClick: handleTestSend }, /* @__PURE__ */ React63.createElement(SendOutlined, { fontSize: "small" }))))),
9223
+ /* @__PURE__ */ React63.createElement(ToggleInspectorPanelButton, null)
9224
+ ), selectedMainTab === "editor" && /* @__PURE__ */ React63.createElement(SubjectInput, null), selectedMainTab === "preview" && /* @__PURE__ */ React63.createElement(SubjectPreview, null), /* @__PURE__ */ React63.createElement(ImageDropPasteHandler, { enabled: selectedMainTab === "editor" }, /* @__PURE__ */ React63.createElement(
9162
9225
  Box,
9163
9226
  {
9164
9227
  sx: {
@@ -9174,8 +9237,8 @@ function TemplatePanel2({ loadTemplates, saveAs, samplesDrawerEnabled = true })
9174
9237
  background: selectedMainTab === "editor" ? workspaceBackground === "checkerboard" ? WORKSPACE_CHECKERBOARD : WORKSPACE_SOLID : void 0
9175
9238
  }
9176
9239
  },
9177
- /* @__PURE__ */ React62.createElement(Box, { sx: { flexGrow: 1 } }, renderMainPanel()),
9178
- showSaveButtons && selectedMainTab === "editor" && /* @__PURE__ */ React62.createElement(SaveBar, { loadTemplates, saveAs })
9240
+ /* @__PURE__ */ React63.createElement(Box, { sx: { flexGrow: 1 } }, renderMainPanel()),
9241
+ showSaveButtons && selectedMainTab === "editor" && /* @__PURE__ */ React63.createElement(SaveBar, { loadTemplates, saveAs })
9179
9242
  )));
9180
9243
  }
9181
9244
 
@@ -9257,7 +9320,7 @@ var EmailEditorInternal = forwardRef((props, ref) => {
9257
9320
  return getDocument();
9258
9321
  }
9259
9322
  }));
9260
- return /* @__PURE__ */ React62.createElement(Stack, { position: "relative", id: "drawer-container", sx: { minHeight } }, /* @__PURE__ */ React62.createElement(
9323
+ return /* @__PURE__ */ React63.createElement(Stack, { position: "relative", id: "drawer-container", sx: { minHeight } }, /* @__PURE__ */ React63.createElement(
9261
9324
  InspectorDrawer,
9262
9325
  {
9263
9326
  enterDuration: drawerEnterDuration,
@@ -9266,7 +9329,7 @@ var EmailEditorInternal = forwardRef((props, ref) => {
9266
9329
  copyTemplate,
9267
9330
  renameTemplate
9268
9331
  }
9269
- ), /* @__PURE__ */ React62.createElement(
9332
+ ), /* @__PURE__ */ React63.createElement(
9270
9333
  SamplesDrawer,
9271
9334
  {
9272
9335
  enterDuration: drawerEnterDuration,
@@ -9282,7 +9345,7 @@ var EmailEditorInternal = forwardRef((props, ref) => {
9282
9345
  setTemplateKind,
9283
9346
  saveAs
9284
9347
  }
9285
- ), /* @__PURE__ */ React62.createElement(
9348
+ ), /* @__PURE__ */ React63.createElement(
9286
9349
  Stack,
9287
9350
  {
9288
9351
  sx: {
@@ -9291,7 +9354,7 @@ var EmailEditorInternal = forwardRef((props, ref) => {
9291
9354
  transition: [marginLeftTransition, marginRightTransition].join(", ")
9292
9355
  }
9293
9356
  },
9294
- /* @__PURE__ */ React62.createElement(TemplatePanel2, { loadTemplates, saveAs, samplesDrawerEnabled })
9357
+ /* @__PURE__ */ React63.createElement(TemplatePanel2, { loadTemplates, saveAs, samplesDrawerEnabled })
9295
9358
  ));
9296
9359
  });
9297
9360
  var EmailEditor = forwardRef((props, ref) => {
@@ -9318,7 +9381,10 @@ var EmailEditor = forwardRef((props, ref) => {
9318
9381
  loadImages,
9319
9382
  deleteImage,
9320
9383
  theme,
9321
- locale
9384
+ locale,
9385
+ favoriteColors,
9386
+ customBlocks,
9387
+ onTestSend
9322
9388
  } = props;
9323
9389
  activateLocale(locale);
9324
9390
  const resolvedTemplate = useMemo(
@@ -9337,7 +9403,11 @@ var EmailEditor = forwardRef((props, ref) => {
9337
9403
  () => ({ uploadImage, loadImages, deleteImage }),
9338
9404
  [uploadImage, loadImages, deleteImage]
9339
9405
  );
9340
- return /* @__PURE__ */ React62.createElement(I18nProvider, { i18n }, /* @__PURE__ */ React62.createElement(ThemeProvider, { theme: theme || theme_default }, /* @__PURE__ */ React62.createElement(CssBaseline, null), /* @__PURE__ */ React62.createElement("div", { style: { height: "100%", overflow: "auto" } }, /* @__PURE__ */ React62.createElement(SnackbarProvider, null, /* @__PURE__ */ React62.createElement(ImageCallbacksProvider, { callbacks: imageCallbacks }, /* @__PURE__ */ React62.createElement(
9406
+ const editorConfig = useMemo(
9407
+ () => ({ favoriteColors, customBlocks, onTestSend }),
9408
+ [favoriteColors, customBlocks, onTestSend]
9409
+ );
9410
+ return /* @__PURE__ */ React63.createElement(I18nProvider, { i18n }, /* @__PURE__ */ React63.createElement(ThemeProvider, { theme: theme || theme_default }, /* @__PURE__ */ React63.createElement(CssBaseline, null), /* @__PURE__ */ React63.createElement("div", { style: { height: "100%", overflow: "auto" } }, /* @__PURE__ */ React63.createElement(SnackbarProvider, null, /* @__PURE__ */ React63.createElement(EditorConfigProvider, { config: editorConfig }, /* @__PURE__ */ React63.createElement(ImageCallbacksProvider, { callbacks: imageCallbacks }, /* @__PURE__ */ React63.createElement(
9341
9411
  EmailEditorProvider,
9342
9412
  {
9343
9413
  initialTemplate: resolvedTemplate,
@@ -9346,7 +9416,7 @@ var EmailEditor = forwardRef((props, ref) => {
9346
9416
  onSave,
9347
9417
  onChange
9348
9418
  },
9349
- /* @__PURE__ */ React62.createElement(
9419
+ /* @__PURE__ */ React63.createElement(
9350
9420
  EmailEditorInternal,
9351
9421
  {
9352
9422
  ref,
@@ -9365,7 +9435,7 @@ var EmailEditor = forwardRef((props, ref) => {
9365
9435
  onChange
9366
9436
  }
9367
9437
  )
9368
- ))))));
9438
+ )))))));
9369
9439
  });
9370
9440
  EmailEditor.displayName = "EmailEditor";
9371
9441
  EmailEditorInternal.displayName = "EmailEditorInternal";