@kontakto/email-template-editor 2.11.0 → 2.13.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 React65, { 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, PinOutlined } 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__ */ React65.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__ */ React65.createElement(EmailMarkdown, { style: wStyle, markdown: text });
268
277
  }
269
- return /* @__PURE__ */ React62.createElement("div", { style: wStyle }, text);
278
+ return /* @__PURE__ */ React65.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__ */ React65.createElement("div", { style: sectionStyle }, /* @__PURE__ */ React65.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__ */ React65.createElement("div", { style: wrapperStyle }, /* @__PURE__ */ React65.createElement("a", { href: url, style: linkStyle, target: "_blank" }, /* @__PURE__ */ React65.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__ */ React65.createElement("span", null, text), /* @__PURE__ */ React65.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__ */ React65.createElement("div", { style: wStyle }, /* @__PURE__ */ React65.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__ */ React65.createElement("tbody", { style: { width: "100%" } }, /* @__PURE__ */ React65.createElement("tr", { style: { width: "100%" } }, /* @__PURE__ */ React65.createElement(TableCell, { index: 0, props: blockProps, columns }), /* @__PURE__ */ React65.createElement(TableCell, { index: 1, props: blockProps, columns }), /* @__PURE__ */ React65.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__ */ React65.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__ */ React65.createElement("div", { style: wStyle });
616
626
  }
617
- return /* @__PURE__ */ React62.createElement("div", { style: wStyle }, children);
627
+ return /* @__PURE__ */ React65.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__ */ React65.createElement("div", { style: st }, /* @__PURE__ */ React65.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__ */ React65.createElement("h1", __spreadValues({}, renderProps));
750
760
  case "h2":
751
- return /* @__PURE__ */ React62.createElement("h2", __spreadValues({}, renderProps));
761
+ return /* @__PURE__ */ React65.createElement("h2", __spreadValues({}, renderProps));
752
762
  case "h3":
753
- return /* @__PURE__ */ React62.createElement("h3", __spreadValues({}, renderProps));
763
+ return /* @__PURE__ */ React65.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__ */ React65.createElement("div", { style: cssStyle });
836
846
  }
837
- return /* @__PURE__ */ React62.createElement("div", { style: cssStyle, dangerouslySetInnerHTML: { __html: children } });
847
+ return /* @__PURE__ */ React65.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__ */ React65.createElement(
874
884
  "img",
875
885
  {
876
886
  alt: (_f = props == null ? void 0 : props.alt) != null ? _f : "",
@@ -890,11 +900,19 @@ function Image({ style, props }) {
890
900
  }
891
901
  );
892
902
  if (!linkHref) {
893
- return /* @__PURE__ */ React62.createElement("div", { style: sectionStyle }, imageElement);
903
+ return /* @__PURE__ */ React65.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__ */ React65.createElement("div", { style: sectionStyle }, /* @__PURE__ */ React65.createElement("a", { href: linkHref, style: { textDecoration: "none" }, target: "_blank" }, imageElement));
896
906
  }
897
907
  var image_default = Image;
908
+ var COLOR_SCHEMA8 = z.string().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional();
909
+ var PADDING_SCHEMA10 = z.object({
910
+ top: z.number(),
911
+ bottom: z.number(),
912
+ right: z.number(),
913
+ left: z.number()
914
+ }).optional().nullable();
915
+ var getPadding10 = (padding) => padding ? `${padding.top}px ${padding.right}px ${padding.bottom}px ${padding.left}px` : void 0;
898
916
  var FONT_FAMILY_SCHEMA5 = z.enum([
899
917
  "MODERN_SANS",
900
918
  "BOOK_SANS",
@@ -929,19 +947,115 @@ function getFontFamily5(fontFamily) {
929
947
  }
930
948
  return void 0;
931
949
  }
932
- var COLOR_SCHEMA8 = z.string().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional();
933
- var PADDING_SCHEMA10 = z.object({
950
+ var OtpPropsSchema = z.object({
951
+ props: z.object({
952
+ code: z.string().optional().nullable()
953
+ }).optional().nullable(),
954
+ style: z.object({
955
+ color: COLOR_SCHEMA8,
956
+ backgroundColor: COLOR_SCHEMA8,
957
+ borderColor: COLOR_SCHEMA8,
958
+ borderRadius: z.number().gte(0).optional().nullable(),
959
+ fontSize: z.number().gte(0).optional().nullable(),
960
+ fontFamily: FONT_FAMILY_SCHEMA5,
961
+ fontWeight: z.enum(["bold", "normal"]).optional().nullable(),
962
+ letterSpacing: z.number().optional().nullable(),
963
+ textAlign: z.enum(["left", "center", "right"]).optional().nullable(),
964
+ padding: PADDING_SCHEMA10
965
+ }).optional().nullable()
966
+ });
967
+ var OtpProps = OtpPropsSchema;
968
+ var OtpPropsDefaults = {
969
+ code: "123456"
970
+ };
971
+ function Otp({ props, style }) {
972
+ var _a, _b, _c, _d, _e, _f, _g;
973
+ const code = (_a = props == null ? void 0 : props.code) != null ? _a : OtpPropsDefaults.code;
974
+ const wrapperStyle = {
975
+ textAlign: (_b = style == null ? void 0 : style.textAlign) != null ? _b : "center",
976
+ padding: getPadding10(style == null ? void 0 : style.padding)
977
+ };
978
+ const codeStyle = {
979
+ display: "inline-block",
980
+ color: (_c = style == null ? void 0 : style.color) != null ? _c : "#000000",
981
+ backgroundColor: (_d = style == null ? void 0 : style.backgroundColor) != null ? _d : void 0,
982
+ border: (style == null ? void 0 : style.borderColor) ? `1px solid ${style.borderColor}` : void 0,
983
+ borderRadius: (style == null ? void 0 : style.borderRadius) != null ? `${style.borderRadius}px` : void 0,
984
+ fontFamily: (_e = getFontFamily5(style == null ? void 0 : style.fontFamily)) != null ? _e : '"Nimbus Mono PS", "Courier New", "Cutive Mono", monospace',
985
+ fontSize: (_f = style == null ? void 0 : style.fontSize) != null ? _f : 32,
986
+ fontWeight: (_g = style == null ? void 0 : style.fontWeight) != null ? _g : "bold",
987
+ letterSpacing: (style == null ? void 0 : style.letterSpacing) != null ? `${style.letterSpacing}px` : "4px",
988
+ padding: (style == null ? void 0 : style.backgroundColor) || (style == null ? void 0 : style.borderColor) ? "12px 20px" : void 0,
989
+ // Override any auto-link styling that email clients might inject if their
990
+ // data detectors mistakenly fire despite the suppressions below.
991
+ textDecoration: "none"
992
+ };
993
+ const dataDetectorAttrs = {
994
+ "x-apple-data-detectors": "false",
995
+ "data-detect-link": "false"
996
+ };
997
+ return /* @__PURE__ */ React65.createElement("div", __spreadValues({ style: wrapperStyle }, dataDetectorAttrs), /* @__PURE__ */ React65.createElement(
998
+ "a",
999
+ __spreadValues({
1000
+ href: "#",
1001
+ style: __spreadProps(__spreadValues({}, codeStyle), {
1002
+ color: codeStyle.color,
1003
+ textDecoration: "none",
1004
+ cursor: "default",
1005
+ pointerEvents: "none"
1006
+ })
1007
+ }, dataDetectorAttrs),
1008
+ code
1009
+ ));
1010
+ }
1011
+ var otp_default = Otp;
1012
+ var FONT_FAMILY_SCHEMA6 = z.enum([
1013
+ "MODERN_SANS",
1014
+ "BOOK_SANS",
1015
+ "ORGANIC_SANS",
1016
+ "GEOMETRIC_SANS",
1017
+ "HEAVY_SANS",
1018
+ "ROUNDED_SANS",
1019
+ "MODERN_SERIF",
1020
+ "BOOK_SERIF",
1021
+ "MONOSPACE"
1022
+ ]).nullable().optional();
1023
+ function getFontFamily6(fontFamily) {
1024
+ switch (fontFamily) {
1025
+ case "MODERN_SANS":
1026
+ return '"Helvetica Neue", "Arial Nova", "Nimbus Sans", Arial, sans-serif';
1027
+ case "BOOK_SANS":
1028
+ return 'Optima, Candara, "Noto Sans", source-sans-pro, sans-serif';
1029
+ case "ORGANIC_SANS":
1030
+ return 'Seravek, "Gill Sans Nova", Ubuntu, Calibri, "DejaVu Sans", source-sans-pro, sans-serif';
1031
+ case "GEOMETRIC_SANS":
1032
+ return 'Avenir, "Avenir Next LT Pro", Montserrat, Corbel, "URW Gothic", source-sans-pro, sans-serif';
1033
+ case "HEAVY_SANS":
1034
+ return 'Bahnschrift, "DIN Alternate", "Franklin Gothic Medium", "Nimbus Sans Narrow", sans-serif-condensed, sans-serif';
1035
+ case "ROUNDED_SANS":
1036
+ return 'ui-rounded, "Hiragino Maru Gothic ProN", Quicksand, Comfortaa, Manjari, "Arial Rounded MT Bold", Calibri, source-sans-pro, sans-serif';
1037
+ case "MODERN_SERIF":
1038
+ return 'Charter, "Bitstream Charter", "Sitka Text", Cambria, serif';
1039
+ case "BOOK_SERIF":
1040
+ return '"Iowan Old Style", "Palatino Linotype", "URW Palladio L", P052, serif';
1041
+ case "MONOSPACE":
1042
+ return '"Nimbus Mono PS", "Courier New", "Cutive Mono", monospace';
1043
+ }
1044
+ return void 0;
1045
+ }
1046
+ var COLOR_SCHEMA9 = z.string().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional();
1047
+ var PADDING_SCHEMA11 = z.object({
934
1048
  top: z.number(),
935
1049
  bottom: z.number(),
936
1050
  right: z.number(),
937
1051
  left: z.number()
938
1052
  }).optional().nullable();
939
- var getPadding10 = (padding) => padding ? `${padding.top}px ${padding.right}px ${padding.bottom}px ${padding.left}px` : void 0;
1053
+ var getPadding11 = (padding) => padding ? `${padding.top}px ${padding.right}px ${padding.bottom}px ${padding.left}px` : void 0;
940
1054
  var SignaturePropsSchema = z.object({
941
1055
  style: z.object({
942
- backgroundColor: COLOR_SCHEMA8,
943
- fontFamily: FONT_FAMILY_SCHEMA5,
944
- padding: PADDING_SCHEMA10
1056
+ backgroundColor: COLOR_SCHEMA9,
1057
+ fontFamily: FONT_FAMILY_SCHEMA6,
1058
+ padding: PADDING_SCHEMA11
945
1059
  }).optional().nullable(),
946
1060
  props: z.object({
947
1061
  greeting: z.string().optional().nullable(),
@@ -956,9 +1070,9 @@ var SignaturePropsSchema = z.object({
956
1070
  imageSize: z.number().optional().nullable(),
957
1071
  imageShape: z.enum(["circle", "square", "rounded"]).optional().nullable(),
958
1072
  layout: z.enum(["horizontal", "vertical"]).optional().nullable(),
959
- nameColor: COLOR_SCHEMA8,
960
- textColor: COLOR_SCHEMA8,
961
- linkColor: COLOR_SCHEMA8
1073
+ nameColor: COLOR_SCHEMA9,
1074
+ textColor: COLOR_SCHEMA9,
1075
+ linkColor: COLOR_SCHEMA9
962
1076
  }).optional().nullable()
963
1077
  });
964
1078
  var SignatureProps = SignaturePropsSchema;
@@ -1009,8 +1123,8 @@ function Signature({ style, props }) {
1009
1123
  const linkColor = (_o = props == null ? void 0 : props.linkColor) != null ? _o : SignaturePropsDefaults.linkColor;
1010
1124
  const wrapperStyle = {
1011
1125
  backgroundColor: (_p = style == null ? void 0 : style.backgroundColor) != null ? _p : void 0,
1012
- fontFamily: getFontFamily5(style == null ? void 0 : style.fontFamily),
1013
- padding: getPadding10(style == null ? void 0 : style.padding)
1126
+ fontFamily: getFontFamily6(style == null ? void 0 : style.fontFamily),
1127
+ padding: getPadding11(style == null ? void 0 : style.padding)
1014
1128
  };
1015
1129
  const greetingStyle = {
1016
1130
  fontSize: 14,
@@ -1038,7 +1152,7 @@ function Signature({ style, props }) {
1038
1152
  color: linkColor,
1039
1153
  textDecoration: "none"
1040
1154
  };
1041
- const imageElement = imageUrl ? /* @__PURE__ */ React62.createElement(
1155
+ const imageElement = imageUrl ? /* @__PURE__ */ React65.createElement(
1042
1156
  "img",
1043
1157
  {
1044
1158
  src: imageUrl,
@@ -1057,18 +1171,18 @@ function Signature({ style, props }) {
1057
1171
  }
1058
1172
  ) : null;
1059
1173
  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));
1174
+ if (email) contactParts.push(/* @__PURE__ */ React65.createElement("a", { key: "email", href: `mailto:${email}`, style: linkStyle }, email));
1175
+ if (phone) contactParts.push(/* @__PURE__ */ React65.createElement("a", { key: "phone", href: `tel:${phone}`, style: linkStyle }, phone));
1062
1176
  if (website) {
1063
1177
  const href = website.startsWith("http") ? website : `https://${website}`;
1064
- contactParts.push(/* @__PURE__ */ React62.createElement("a", { key: "website", href, style: linkStyle, target: "_blank" }, website));
1178
+ contactParts.push(/* @__PURE__ */ React65.createElement("a", { key: "website", href, style: linkStyle, target: "_blank" }, website));
1065
1179
  }
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;
1180
+ const textContent = /* @__PURE__ */ React65.createElement("div", null, name && /* @__PURE__ */ React65.createElement("p", { style: nameStyle }, name), title && /* @__PURE__ */ React65.createElement("p", { style: detailStyle }, title), company && /* @__PURE__ */ React65.createElement("p", { style: detailStyle }, company), address && /* @__PURE__ */ React65.createElement("p", { style: detailStyle }, address), contactParts.length > 0 && /* @__PURE__ */ React65.createElement("p", { style: __spreadProps(__spreadValues({}, detailStyle), { marginTop: 4 }) }, contactParts.map((part, i) => /* @__PURE__ */ React65.createElement(React65.Fragment, { key: i }, i > 0 && /* @__PURE__ */ React65.createElement("span", { style: detailStyle }, " \xB7 "), part))));
1181
+ const greetingElement = greeting ? /* @__PURE__ */ React65.createElement("p", { style: greetingStyle }, greeting) : null;
1068
1182
  if (layout === "vertical") {
1069
- return /* @__PURE__ */ React62.createElement("div", { style: wrapperStyle }, greetingElement, imageElement && /* @__PURE__ */ React62.createElement("div", { style: { marginBottom: 12 } }, imageElement), textContent);
1183
+ return /* @__PURE__ */ React65.createElement("div", { style: wrapperStyle }, greetingElement, imageElement && /* @__PURE__ */ React65.createElement("div", { style: { marginBottom: 12 } }, imageElement), textContent);
1070
1184
  }
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)))));
1185
+ return /* @__PURE__ */ React65.createElement("div", { style: wrapperStyle }, greetingElement, /* @__PURE__ */ React65.createElement("table", { cellPadding: "0", cellSpacing: "0", border: 0, role: "presentation" }, /* @__PURE__ */ React65.createElement("tbody", null, /* @__PURE__ */ React65.createElement("tr", null, imageElement && /* @__PURE__ */ React65.createElement("td", { style: { verticalAlign: "middle", paddingRight: 16 } }, imageElement), /* @__PURE__ */ React65.createElement("td", { style: { verticalAlign: "middle" } }, textContent)))));
1072
1186
  }
1073
1187
  var signature_default = Signature;
1074
1188
  var SpacerPropsSchema = z.object({
@@ -1085,13 +1199,13 @@ function Spacer({ props }) {
1085
1199
  const style = {
1086
1200
  height: (_a = props == null ? void 0 : props.height) != null ? _a : SpacerPropsDefaults.height
1087
1201
  };
1088
- return /* @__PURE__ */ React62.createElement("div", { style });
1202
+ return /* @__PURE__ */ React65.createElement("div", { style });
1089
1203
  }
1090
1204
  var spacer_default = Spacer;
1091
1205
  function buildBlockComponent(blocks) {
1092
1206
  return function BlockComponent({ type, data }) {
1093
1207
  const Component = blocks[type].Component;
1094
- return /* @__PURE__ */ React62.createElement(Component, __spreadValues({}, data));
1208
+ return /* @__PURE__ */ React65.createElement(Component, __spreadValues({}, data));
1095
1209
  };
1096
1210
  }
1097
1211
  function buildBlockConfigurationSchema(blocks) {
@@ -1160,9 +1274,9 @@ function ColumnsContainerReader({ style, props }) {
1160
1274
  const _a = props != null ? props : {}, { columns } = _a, restProps = __objRest(_a, ["columns"]);
1161
1275
  let cols = void 0;
1162
1276
  if (columns) {
1163
- cols = columns.map((col) => col.childrenIds.map((childId) => /* @__PURE__ */ React62.createElement(ReaderBlock, { key: childId, id: childId })));
1277
+ cols = columns.map((col) => col.childrenIds.map((childId) => /* @__PURE__ */ React65.createElement(ReaderBlock, { key: childId, id: childId })));
1164
1278
  }
1165
- return /* @__PURE__ */ React62.createElement(columns_container_default, { props: restProps, columns: cols, style });
1279
+ return /* @__PURE__ */ React65.createElement(columns_container_default, { props: restProps, columns: cols, style });
1166
1280
  }
1167
1281
  var ContainerPropsSchema2 = z.object({
1168
1282
  style: ContainerPropsSchema.shape.style,
@@ -1173,10 +1287,10 @@ var ContainerPropsSchema2 = z.object({
1173
1287
  function ContainerReader({ style, props }) {
1174
1288
  var _a;
1175
1289
  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 })));
1290
+ return /* @__PURE__ */ React65.createElement(container_default, { style }, childrenIds.map((childId) => /* @__PURE__ */ React65.createElement(ReaderBlock, { key: childId, id: childId })));
1177
1291
  }
1178
- var COLOR_SCHEMA9 = z.string().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional();
1179
- var FONT_FAMILY_SCHEMA6 = z.enum([
1292
+ var COLOR_SCHEMA10 = z.string().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional();
1293
+ var FONT_FAMILY_SCHEMA7 = z.enum([
1180
1294
  "MODERN_SANS",
1181
1295
  "BOOK_SANS",
1182
1296
  "ORGANIC_SANS",
@@ -1193,18 +1307,18 @@ var TemplateVariableSchema = z.object({
1193
1307
  sampleValue: z.string().optional().nullable()
1194
1308
  });
1195
1309
  var EmailLayoutPropsSchema = z.object({
1196
- backdropColor: COLOR_SCHEMA9,
1310
+ backdropColor: COLOR_SCHEMA10,
1197
1311
  backdropDisabled: z.boolean().optional().nullable(),
1198
- borderColor: COLOR_SCHEMA9,
1312
+ borderColor: COLOR_SCHEMA10,
1199
1313
  borderRadius: z.number().optional().nullable(),
1200
- canvasColor: COLOR_SCHEMA9,
1201
- textColor: COLOR_SCHEMA9,
1202
- fontFamily: FONT_FAMILY_SCHEMA6,
1314
+ canvasColor: COLOR_SCHEMA10,
1315
+ textColor: COLOR_SCHEMA10,
1316
+ fontFamily: FONT_FAMILY_SCHEMA7,
1203
1317
  childrenIds: z.array(z.string()).optional().nullable(),
1204
1318
  subject: z.string().optional().nullable(),
1205
1319
  variables: z.array(TemplateVariableSchema).optional().nullable()
1206
1320
  });
1207
- function getFontFamily6(fontFamily) {
1321
+ function getFontFamily7(fontFamily) {
1208
1322
  const f = fontFamily != null ? fontFamily : "MODERN_SANS";
1209
1323
  switch (f) {
1210
1324
  case "MODERN_SANS":
@@ -1238,7 +1352,7 @@ function EmailLayoutReader(props) {
1238
1352
  const childrenIds = (_a = props.childrenIds) != null ? _a : [];
1239
1353
  const baseStyle = {
1240
1354
  color: (_b = props.textColor) != null ? _b : "#262626",
1241
- fontFamily: getFontFamily6(props.fontFamily),
1355
+ fontFamily: getFontFamily7(props.fontFamily),
1242
1356
  fontSize: "16px",
1243
1357
  fontWeight: "400",
1244
1358
  letterSpacing: "0.15008px",
@@ -1246,9 +1360,9 @@ function EmailLayoutReader(props) {
1246
1360
  margin: "0"
1247
1361
  };
1248
1362
  if (props.backdropDisabled) {
1249
- return /* @__PURE__ */ React62.createElement("div", { style: baseStyle }, childrenIds.map((childId) => /* @__PURE__ */ React62.createElement(ReaderBlock, { key: childId, id: childId })));
1363
+ return /* @__PURE__ */ React65.createElement("div", { style: baseStyle }, childrenIds.map((childId) => /* @__PURE__ */ React65.createElement(ReaderBlock, { key: childId, id: childId })));
1250
1364
  }
1251
- return /* @__PURE__ */ React62.createElement(
1365
+ return /* @__PURE__ */ React65.createElement(
1252
1366
  "div",
1253
1367
  {
1254
1368
  style: __spreadProps(__spreadValues({}, baseStyle), {
@@ -1258,7 +1372,7 @@ function EmailLayoutReader(props) {
1258
1372
  width: "100%"
1259
1373
  })
1260
1374
  },
1261
- /* @__PURE__ */ React62.createElement(
1375
+ /* @__PURE__ */ React65.createElement(
1262
1376
  "table",
1263
1377
  {
1264
1378
  align: "center",
@@ -1276,7 +1390,7 @@ function EmailLayoutReader(props) {
1276
1390
  cellPadding: "0",
1277
1391
  border: 0
1278
1392
  },
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 })))))
1393
+ /* @__PURE__ */ React65.createElement("tbody", null, /* @__PURE__ */ React65.createElement("tr", { style: { width: "100%" } }, /* @__PURE__ */ React65.createElement("td", null, childrenIds.map((childId) => /* @__PURE__ */ React65.createElement(ReaderBlock, { key: childId, id: childId })))))
1280
1394
  )
1281
1395
  );
1282
1396
  }
@@ -1288,7 +1402,7 @@ function useReaderDocument() {
1288
1402
  }
1289
1403
  function ReaderBlock({ id }) {
1290
1404
  const document2 = useReaderDocument();
1291
- return document2[id] ? /* @__PURE__ */ React62.createElement(BaseReaderBlock, __spreadValues({}, document2[id])) : null;
1405
+ return document2[id] ? /* @__PURE__ */ React65.createElement(BaseReaderBlock, __spreadValues({}, document2[id])) : null;
1292
1406
  }
1293
1407
  var READER_DICTIONARY = buildBlockConfigurationDictionary({
1294
1408
  ColumnsContainer: {
@@ -1328,6 +1442,10 @@ var READER_DICTIONARY = buildBlockConfigurationDictionary({
1328
1442
  schema: ImagePropsSchema,
1329
1443
  Component: image_default
1330
1444
  },
1445
+ Otp: {
1446
+ schema: OtpPropsSchema,
1447
+ Component: otp_default
1448
+ },
1331
1449
  Spacer: {
1332
1450
  schema: SpacerPropsSchema,
1333
1451
  Component: spacer_default
@@ -1345,13 +1463,13 @@ var ReaderBlockSchema = buildBlockConfigurationSchema(READER_DICTIONARY);
1345
1463
  var ReaderDocumentSchema = z.record(z.string(), ReaderBlockSchema);
1346
1464
  var BaseReaderBlock = buildBlockComponent(READER_DICTIONARY);
1347
1465
  function Reader({ document: document2, rootBlockId }) {
1348
- return /* @__PURE__ */ React62.createElement(ReaderContext.Provider, { value: document2 }, /* @__PURE__ */ React62.createElement(ReaderBlock, { id: rootBlockId }));
1466
+ return /* @__PURE__ */ React65.createElement(ReaderContext.Provider, { value: document2 }, /* @__PURE__ */ React65.createElement(ReaderBlock, { id: rootBlockId }));
1349
1467
  }
1350
1468
 
1351
1469
  // src/email-builder/renderers/render-to-static-markup.tsx
1352
1470
  function renderToStaticMarkup(document2, { rootBlockId, variables }) {
1353
1471
  const html2 = "<!DOCTYPE html>" + renderToStaticMarkup$1(
1354
- /* @__PURE__ */ React62.createElement("html", null, /* @__PURE__ */ React62.createElement("body", null, /* @__PURE__ */ React62.createElement(Reader, { document: document2, rootBlockId })))
1472
+ /* @__PURE__ */ React65.createElement("html", null, /* @__PURE__ */ React65.createElement("body", null, /* @__PURE__ */ React65.createElement(Reader, { document: document2, rootBlockId })))
1355
1473
  );
1356
1474
  if (!variables) return html2;
1357
1475
  return evaluateHandlebars(html2, variables);
@@ -1398,6 +1516,9 @@ function renderBlock(document2, blockId, lines) {
1398
1516
  case "Html":
1399
1517
  renderHtml(data, lines);
1400
1518
  break;
1519
+ case "Otp":
1520
+ renderOtp(data, lines);
1521
+ break;
1401
1522
  case "Divider":
1402
1523
  lines.push("");
1403
1524
  lines.push("---");
@@ -1479,6 +1600,13 @@ function renderAvatar(data, lines) {
1479
1600
  lines.push("");
1480
1601
  }
1481
1602
  }
1603
+ function renderOtp(data, lines) {
1604
+ var _a, _b;
1605
+ const code = (_b = (_a = data == null ? void 0 : data.props) == null ? void 0 : _a.code) != null ? _b : "";
1606
+ if (!code) return;
1607
+ lines.push(code);
1608
+ lines.push("");
1609
+ }
1482
1610
  function renderHtml(data, lines) {
1483
1611
  var _a, _b;
1484
1612
  const contents = (_b = (_a = data == null ? void 0 : data.props) == null ? void 0 : _a.contents) != null ? _b : "";
@@ -2298,7 +2426,7 @@ var EmailEditorProvider = ({
2298
2426
  setCurrentTemplateTags
2299
2427
  ]
2300
2428
  );
2301
- return /* @__PURE__ */ React62.createElement(EmailEditorContext.Provider, { value }, children);
2429
+ return /* @__PURE__ */ React65.createElement(EmailEditorContext.Provider, { value }, children);
2302
2430
  };
2303
2431
  var useEmailEditor = () => {
2304
2432
  const context = useContext(EmailEditorContext);
@@ -2307,12 +2435,22 @@ var useEmailEditor = () => {
2307
2435
  }
2308
2436
  return context;
2309
2437
  };
2438
+ var EditorConfigContext = createContext({});
2439
+ function EditorConfigProvider({
2440
+ config,
2441
+ children
2442
+ }) {
2443
+ return /* @__PURE__ */ React65.createElement(EditorConfigContext.Provider, { value: config }, children);
2444
+ }
2445
+ function useEditorConfig() {
2446
+ return useContext(EditorConfigContext);
2447
+ }
2310
2448
  var ImageCallbacksContext = createContext({});
2311
2449
  function ImageCallbacksProvider({
2312
2450
  callbacks,
2313
2451
  children
2314
2452
  }) {
2315
- return /* @__PURE__ */ React62.createElement(ImageCallbacksContext.Provider, { value: callbacks }, children);
2453
+ return /* @__PURE__ */ React65.createElement(ImageCallbacksContext.Provider, { value: callbacks }, children);
2316
2454
  }
2317
2455
  function useImageCallbacks() {
2318
2456
  return useContext(ImageCallbacksContext);
@@ -2338,14 +2476,14 @@ var TITLE_KEYS = {
2338
2476
  function BaseSidebarPanel({ title, children }) {
2339
2477
  const key = TITLE_KEYS[title];
2340
2478
  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));
2479
+ return /* @__PURE__ */ React65.createElement(Box, { p: 2 }, /* @__PURE__ */ React65.createElement(Typography, { variant: "overline", color: "text.secondary", sx: { display: "block", mb: 2 } }, displayTitle), /* @__PURE__ */ React65.createElement(Stack, { spacing: 5, mb: 3 }, children));
2342
2480
  }
2343
2481
  function RadioGroupInput({ label, children, defaultValue, onChange }) {
2344
2482
  const [value, setValue] = useState(defaultValue);
2345
2483
  useEffect(() => {
2346
2484
  setValue(defaultValue);
2347
2485
  }, [defaultValue]);
2348
- return /* @__PURE__ */ React62.createElement(Stack, { alignItems: "flex-start" }, /* @__PURE__ */ React62.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React62.createElement(
2486
+ return /* @__PURE__ */ React65.createElement(Stack, { alignItems: "flex-start" }, /* @__PURE__ */ React65.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React65.createElement(
2349
2487
  ToggleButtonGroup,
2350
2488
  {
2351
2489
  exclusive: true,
@@ -2365,7 +2503,7 @@ function RadioGroupInput({ label, children, defaultValue, onChange }) {
2365
2503
  }
2366
2504
  function RawSliderInput(_a) {
2367
2505
  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(
2506
+ return /* @__PURE__ */ React65.createElement(Stack, { direction: "row", alignItems: "center", spacing: 2, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React65.createElement(Box, { sx: { minWidth: 24, lineHeight: 1, flexShrink: 0 } }, iconLabel), /* @__PURE__ */ React65.createElement(
2369
2507
  Slider,
2370
2508
  __spreadProps(__spreadValues({}, props), {
2371
2509
  value,
@@ -2376,14 +2514,14 @@ function RawSliderInput(_a) {
2376
2514
  setValue(value2);
2377
2515
  }
2378
2516
  })
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)));
2517
+ ), /* @__PURE__ */ React65.createElement(Box, { sx: { minWidth: 32, textAlign: "right", flexShrink: 0 } }, /* @__PURE__ */ React65.createElement(Typography, { variant: "body2", color: "text.secondary", sx: { lineHeight: 1 } }, value, units)));
2380
2518
  }
2381
2519
 
2382
2520
  // src/app/inspector-drawer/configuration-panel/input-panels/helpers/inputs/slider-input.tsx
2383
2521
  function SliderInput(_a) {
2384
2522
  var _b = _a, { label, defaultValue, onChange } = _b, props = __objRest(_b, ["label", "defaultValue", "onChange"]);
2385
2523
  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(
2524
+ return /* @__PURE__ */ React65.createElement(Stack, { spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React65.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React65.createElement(
2387
2525
  RawSliderInput,
2388
2526
  __spreadValues({
2389
2527
  value,
@@ -2400,7 +2538,7 @@ function TextInput({ helperText, label, placeholder, rows, InputProps: InputProp
2400
2538
  useEffect(() => {
2401
2539
  setValue(defaultValue);
2402
2540
  }, [defaultValue]);
2403
- return /* @__PURE__ */ React62.createElement(
2541
+ return /* @__PURE__ */ React65.createElement(
2404
2542
  TextField,
2405
2543
  {
2406
2544
  fullWidth: true,
@@ -2426,7 +2564,7 @@ var TILE_BUTTON = {
2426
2564
  };
2427
2565
  function Swatch({ paletteColors, value, onChange }) {
2428
2566
  const renderButton2 = (colorValue) => {
2429
- return /* @__PURE__ */ React62.createElement(
2567
+ return /* @__PURE__ */ React65.createElement(
2430
2568
  Button$1,
2431
2569
  {
2432
2570
  key: colorValue,
@@ -2445,7 +2583,7 @@ function Swatch({ paletteColors, value, onChange }) {
2445
2583
  }
2446
2584
  );
2447
2585
  };
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)));
2586
+ return /* @__PURE__ */ React65.createElement(Box, { width: "100%", sx: { display: "grid", gap: 1, gridTemplateColumns: "1fr 1fr 1fr 1fr 1fr 1fr" } }, paletteColors.map((c) => renderButton2(c)));
2449
2587
  }
2450
2588
 
2451
2589
  // src/app/inspector-drawer/configuration-panel/input-panels/helpers/inputs/color-input/picker.tsx
@@ -2512,7 +2650,9 @@ var SX = {
2512
2650
  }
2513
2651
  };
2514
2652
  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 })));
2653
+ const { favoriteColors } = useEditorConfig();
2654
+ const hasFavorites = favoriteColors && favoriteColors.length > 0;
2655
+ return /* @__PURE__ */ React65.createElement(Stack, { spacing: 1, sx: SX }, /* @__PURE__ */ React65.createElement(HexColorPicker, { color: value, onChange }), hasFavorites && /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(Swatch, { paletteColors: favoriteColors, value, onChange }), /* @__PURE__ */ React65.createElement(Divider$1, null)), /* @__PURE__ */ React65.createElement(Swatch, { paletteColors: DEFAULT_PRESET_COLORS, value, onChange }), /* @__PURE__ */ React65.createElement(Box, { pt: 1 }, /* @__PURE__ */ React65.createElement(HexColorInput, { prefixed: true, color: value, onChange })));
2516
2656
  }
2517
2657
 
2518
2658
  // src/app/inspector-drawer/configuration-panel/input-panels/helpers/inputs/color-input/base-color-input.tsx
@@ -2537,7 +2677,7 @@ function ColorInput({ label, defaultValue, onChange, nullable }) {
2537
2677
  if (typeof value !== "string" || value.trim().length === 0) {
2538
2678
  return null;
2539
2679
  }
2540
- return /* @__PURE__ */ React62.createElement(
2680
+ return /* @__PURE__ */ React65.createElement(
2541
2681
  ButtonBase,
2542
2682
  {
2543
2683
  onClick: () => {
@@ -2545,16 +2685,16 @@ function ColorInput({ label, defaultValue, onChange, nullable }) {
2545
2685
  onChange(null);
2546
2686
  }
2547
2687
  },
2548
- /* @__PURE__ */ React62.createElement(CloseOutlined, { fontSize: "small", sx: { color: "grey.600" } })
2688
+ /* @__PURE__ */ React65.createElement(CloseOutlined, { fontSize: "small", sx: { color: "grey.600" } })
2549
2689
  );
2550
2690
  };
2551
2691
  const renderOpenButton = () => {
2552
2692
  if (value) {
2553
- return /* @__PURE__ */ React62.createElement(ButtonBase, { onClick: handleClickOpen, sx: __spreadProps(__spreadValues({}, BUTTON_SX), { bgcolor: value }) });
2693
+ return /* @__PURE__ */ React65.createElement(ButtonBase, { onClick: handleClickOpen, sx: __spreadProps(__spreadValues({}, BUTTON_SX), { bgcolor: value }) });
2554
2694
  }
2555
- return /* @__PURE__ */ React62.createElement(ButtonBase, { onClick: handleClickOpen, sx: __spreadValues({}, BUTTON_SX) }, /* @__PURE__ */ React62.createElement(AddOutlined, { fontSize: "small" }));
2695
+ return /* @__PURE__ */ React65.createElement(ButtonBase, { onClick: handleClickOpen, sx: __spreadValues({}, BUTTON_SX) }, /* @__PURE__ */ React65.createElement(AddOutlined, { fontSize: "small" }));
2556
2696
  };
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(
2697
+ return /* @__PURE__ */ React65.createElement(Stack, { alignItems: "flex-start" }, /* @__PURE__ */ React65.createElement(InputLabel, { sx: { mb: 0.5 } }, label), /* @__PURE__ */ React65.createElement(Stack, { direction: "row", spacing: 1 }, renderOpenButton(), renderResetButton()), /* @__PURE__ */ React65.createElement(
2558
2698
  Menu,
2559
2699
  {
2560
2700
  anchorEl,
@@ -2564,7 +2704,7 @@ function ColorInput({ label, defaultValue, onChange, nullable }) {
2564
2704
  sx: { height: "auto", padding: 0 }
2565
2705
  }
2566
2706
  },
2567
- /* @__PURE__ */ React62.createElement(
2707
+ /* @__PURE__ */ React65.createElement(
2568
2708
  Picker,
2569
2709
  {
2570
2710
  value: value || "",
@@ -2579,10 +2719,10 @@ function ColorInput({ label, defaultValue, onChange, nullable }) {
2579
2719
 
2580
2720
  // src/app/inspector-drawer/configuration-panel/input-panels/helpers/inputs/color-input/index.tsx
2581
2721
  function ColorInput2(props) {
2582
- return /* @__PURE__ */ React62.createElement(ColorInput, __spreadProps(__spreadValues({}, props), { nullable: false }));
2722
+ return /* @__PURE__ */ React65.createElement(ColorInput, __spreadProps(__spreadValues({}, props), { nullable: false }));
2583
2723
  }
2584
2724
  function NullableColorInput(props) {
2585
- return /* @__PURE__ */ React62.createElement(ColorInput, __spreadProps(__spreadValues({}, props), { nullable: true }));
2725
+ return /* @__PURE__ */ React65.createElement(ColorInput, __spreadProps(__spreadValues({}, props), { nullable: true }));
2586
2726
  }
2587
2727
 
2588
2728
  // src/editor/blocks/helpers/font-family.ts
@@ -2640,7 +2780,7 @@ function NullableFontFamily({ label, onChange, defaultValue }) {
2640
2780
  useEffect(() => {
2641
2781
  setValue(defaultValue != null ? defaultValue : "inherit");
2642
2782
  }, [defaultValue]);
2643
- return /* @__PURE__ */ React62.createElement(
2783
+ return /* @__PURE__ */ React65.createElement(
2644
2784
  TextField,
2645
2785
  {
2646
2786
  select: true,
@@ -2653,8 +2793,8 @@ function NullableFontFamily({ label, onChange, defaultValue }) {
2653
2793
  onChange(v === null ? null : v);
2654
2794
  }
2655
2795
  },
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)))
2796
+ /* @__PURE__ */ React65.createElement(MenuItem, { value: "inherit" }, t("font-family.inherit", "Match email settings")),
2797
+ FONT_FAMILIES.map((option) => /* @__PURE__ */ React65.createElement(MenuItem, { key: option.key, value: option.key, sx: { fontFamily: option.value } }, t(`font-family.${option.key.toLowerCase()}`, option.label)))
2658
2798
  );
2659
2799
  }
2660
2800
  function FontSizeInput({ label, defaultValue, onChange }) {
@@ -2666,10 +2806,10 @@ function FontSizeInput({ label, defaultValue, onChange }) {
2666
2806
  setValue(value2);
2667
2807
  onChange(value2);
2668
2808
  };
2669
- return /* @__PURE__ */ React62.createElement(Stack, { spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React62.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React62.createElement(
2809
+ return /* @__PURE__ */ React65.createElement(Stack, { spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React65.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React65.createElement(
2670
2810
  RawSliderInput,
2671
2811
  {
2672
- iconLabel: /* @__PURE__ */ React62.createElement(TextFieldsOutlined, { sx: { fontSize: 16 } }),
2812
+ iconLabel: /* @__PURE__ */ React65.createElement(TextFieldsOutlined, { sx: { fontSize: 16 } }),
2673
2813
  value,
2674
2814
  setValue: handleChange,
2675
2815
  units: "px",
@@ -2684,7 +2824,7 @@ function FontWeightInput({ label, defaultValue, onChange }) {
2684
2824
  useEffect(() => {
2685
2825
  setValue(defaultValue);
2686
2826
  }, [defaultValue]);
2687
- return /* @__PURE__ */ React62.createElement(
2827
+ return /* @__PURE__ */ React65.createElement(
2688
2828
  RadioGroupInput,
2689
2829
  {
2690
2830
  label,
@@ -2694,8 +2834,8 @@ function FontWeightInput({ label, defaultValue, onChange }) {
2694
2834
  onChange(fontWeight);
2695
2835
  }
2696
2836
  },
2697
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "normal" }, t("font-weight.regular", "Regular")),
2698
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "bold" }, t("font-weight.bold", "Bold"))
2837
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "normal" }, t("font-weight.regular", "Regular")),
2838
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "bold" }, t("font-weight.bold", "Bold"))
2699
2839
  );
2700
2840
  }
2701
2841
  function LetterSpacingInput({ label, defaultValue, onChange }) {
@@ -2707,10 +2847,10 @@ function LetterSpacingInput({ label, defaultValue, onChange }) {
2707
2847
  setValue(v);
2708
2848
  onChange(v === 0 ? null : v);
2709
2849
  };
2710
- return /* @__PURE__ */ React62.createElement(Stack, { spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React62.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React62.createElement(
2850
+ return /* @__PURE__ */ React65.createElement(Stack, { spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React65.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React65.createElement(
2711
2851
  RawSliderInput,
2712
2852
  {
2713
- iconLabel: /* @__PURE__ */ React62.createElement(SpaceBarOutlined, { sx: { fontSize: 16 } }),
2853
+ iconLabel: /* @__PURE__ */ React65.createElement(SpaceBarOutlined, { sx: { fontSize: 16 } }),
2714
2854
  value,
2715
2855
  setValue: handleChange,
2716
2856
  units: "px",
@@ -2729,10 +2869,10 @@ function LineHeightInput({ label, defaultValue, onChange }) {
2729
2869
  setValue(v);
2730
2870
  onChange(v === 0 ? null : v);
2731
2871
  };
2732
- return /* @__PURE__ */ React62.createElement(Stack, { spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React62.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React62.createElement(
2872
+ return /* @__PURE__ */ React65.createElement(Stack, { spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React65.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React65.createElement(
2733
2873
  RawSliderInput,
2734
2874
  {
2735
- iconLabel: /* @__PURE__ */ React62.createElement(FormatLineSpacingOutlined, { sx: { fontSize: 16 } }),
2875
+ iconLabel: /* @__PURE__ */ React65.createElement(FormatLineSpacingOutlined, { sx: { fontSize: 16 } }),
2736
2876
  value,
2737
2877
  setValue: handleChange,
2738
2878
  units: "",
@@ -2761,10 +2901,10 @@ function PaddingInput({ label, defaultValue, onChange }) {
2761
2901
  setValue(v);
2762
2902
  onChange(v);
2763
2903
  }
2764
- return /* @__PURE__ */ React62.createElement(Stack, { spacing: 2, alignItems: "flex-start", pb: 1 }, /* @__PURE__ */ React62.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React62.createElement(
2904
+ return /* @__PURE__ */ React65.createElement(Stack, { spacing: 2, alignItems: "flex-start", pb: 1 }, /* @__PURE__ */ React65.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React65.createElement(
2765
2905
  RawSliderInput,
2766
2906
  {
2767
- iconLabel: /* @__PURE__ */ React62.createElement(AlignVerticalTopOutlined, { sx: { fontSize: 16 } }),
2907
+ iconLabel: /* @__PURE__ */ React65.createElement(AlignVerticalTopOutlined, { sx: { fontSize: 16 } }),
2768
2908
  value: value.top,
2769
2909
  setValue: (num) => handleChange("top", num),
2770
2910
  units: "px",
@@ -2773,10 +2913,10 @@ function PaddingInput({ label, defaultValue, onChange }) {
2773
2913
  max: 80,
2774
2914
  marks: true
2775
2915
  }
2776
- ), /* @__PURE__ */ React62.createElement(
2916
+ ), /* @__PURE__ */ React65.createElement(
2777
2917
  RawSliderInput,
2778
2918
  {
2779
- iconLabel: /* @__PURE__ */ React62.createElement(AlignVerticalBottomOutlined, { sx: { fontSize: 16 } }),
2919
+ iconLabel: /* @__PURE__ */ React65.createElement(AlignVerticalBottomOutlined, { sx: { fontSize: 16 } }),
2780
2920
  value: value.bottom,
2781
2921
  setValue: (num) => handleChange("bottom", num),
2782
2922
  units: "px",
@@ -2785,10 +2925,10 @@ function PaddingInput({ label, defaultValue, onChange }) {
2785
2925
  max: 80,
2786
2926
  marks: true
2787
2927
  }
2788
- ), /* @__PURE__ */ React62.createElement(
2928
+ ), /* @__PURE__ */ React65.createElement(
2789
2929
  RawSliderInput,
2790
2930
  {
2791
- iconLabel: /* @__PURE__ */ React62.createElement(AlignHorizontalLeftOutlined, { sx: { fontSize: 16 } }),
2931
+ iconLabel: /* @__PURE__ */ React65.createElement(AlignHorizontalLeftOutlined, { sx: { fontSize: 16 } }),
2792
2932
  value: value.left,
2793
2933
  setValue: (num) => handleChange("left", num),
2794
2934
  units: "px",
@@ -2797,10 +2937,10 @@ function PaddingInput({ label, defaultValue, onChange }) {
2797
2937
  max: 80,
2798
2938
  marks: true
2799
2939
  }
2800
- ), /* @__PURE__ */ React62.createElement(
2940
+ ), /* @__PURE__ */ React65.createElement(
2801
2941
  RawSliderInput,
2802
2942
  {
2803
- iconLabel: /* @__PURE__ */ React62.createElement(AlignHorizontalRightOutlined, { sx: { fontSize: 16 } }),
2943
+ iconLabel: /* @__PURE__ */ React65.createElement(AlignHorizontalRightOutlined, { sx: { fontSize: 16 } }),
2804
2944
  value: value.right,
2805
2945
  setValue: (num) => handleChange("right", num),
2806
2946
  units: "px",
@@ -2816,7 +2956,7 @@ function TextAlignInput({ label, defaultValue, onChange }) {
2816
2956
  useEffect(() => {
2817
2957
  setValue(defaultValue != null ? defaultValue : "left");
2818
2958
  }, [defaultValue]);
2819
- return /* @__PURE__ */ React62.createElement(
2959
+ return /* @__PURE__ */ React65.createElement(
2820
2960
  RadioGroupInput,
2821
2961
  {
2822
2962
  label,
@@ -2826,9 +2966,9 @@ function TextAlignInput({ label, defaultValue, onChange }) {
2826
2966
  onChange(value2);
2827
2967
  }
2828
2968
  },
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" }))
2969
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "left" }, /* @__PURE__ */ React65.createElement(FormatAlignLeftOutlined, { fontSize: "small" })),
2970
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "center" }, /* @__PURE__ */ React65.createElement(FormatAlignCenterOutlined, { fontSize: "small" })),
2971
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "right" }, /* @__PURE__ */ React65.createElement(FormatAlignRightOutlined, { fontSize: "small" }))
2832
2972
  );
2833
2973
  }
2834
2974
 
@@ -2841,14 +2981,14 @@ function SingleStylePropertyPanel({ name, value, onChange }) {
2841
2981
  };
2842
2982
  switch (name) {
2843
2983
  case "backgroundColor":
2844
- return /* @__PURE__ */ React62.createElement(NullableColorInput, { label: t("style.background-color", "Background color"), defaultValue, onChange: handleChange });
2984
+ return /* @__PURE__ */ React65.createElement(NullableColorInput, { label: t("style.background-color", "Background color"), defaultValue, onChange: handleChange });
2845
2985
  case "borderColor":
2846
- return /* @__PURE__ */ React62.createElement(NullableColorInput, { label: t("style.border-color", "Border color"), defaultValue, onChange: handleChange });
2986
+ return /* @__PURE__ */ React65.createElement(NullableColorInput, { label: t("style.border-color", "Border color"), defaultValue, onChange: handleChange });
2847
2987
  case "borderRadius":
2848
- return /* @__PURE__ */ React62.createElement(
2988
+ return /* @__PURE__ */ React65.createElement(
2849
2989
  SliderInput,
2850
2990
  {
2851
- iconLabel: /* @__PURE__ */ React62.createElement(RoundedCornerOutlined, null),
2991
+ iconLabel: /* @__PURE__ */ React65.createElement(RoundedCornerOutlined, null),
2852
2992
  units: "px",
2853
2993
  step: 4,
2854
2994
  marks: true,
@@ -2860,27 +3000,27 @@ function SingleStylePropertyPanel({ name, value, onChange }) {
2860
3000
  }
2861
3001
  );
2862
3002
  case "color":
2863
- return /* @__PURE__ */ React62.createElement(NullableColorInput, { label: t("style.text-color", "Text color"), defaultValue, onChange: handleChange });
3003
+ return /* @__PURE__ */ React65.createElement(NullableColorInput, { label: t("style.text-color", "Text color"), defaultValue, onChange: handleChange });
2864
3004
  case "fontFamily":
2865
- return /* @__PURE__ */ React62.createElement(NullableFontFamily, { label: t("style.font-family", "Font family"), defaultValue, onChange: handleChange });
3005
+ return /* @__PURE__ */ React65.createElement(NullableFontFamily, { label: t("style.font-family", "Font family"), defaultValue, onChange: handleChange });
2866
3006
  case "fontSize":
2867
- return /* @__PURE__ */ React62.createElement(FontSizeInput, { label: t("style.font-size", "Font size"), defaultValue, onChange: handleChange });
3007
+ return /* @__PURE__ */ React65.createElement(FontSizeInput, { label: t("style.font-size", "Font size"), defaultValue, onChange: handleChange });
2868
3008
  case "fontWeight":
2869
- return /* @__PURE__ */ React62.createElement(FontWeightInput, { label: t("style.font-weight", "Font weight"), defaultValue, onChange: handleChange });
3009
+ return /* @__PURE__ */ React65.createElement(FontWeightInput, { label: t("style.font-weight", "Font weight"), defaultValue, onChange: handleChange });
2870
3010
  case "lineHeight":
2871
- return /* @__PURE__ */ React62.createElement(LineHeightInput, { label: t("style.line-height", "Line height"), defaultValue, onChange: handleChange });
3011
+ return /* @__PURE__ */ React65.createElement(LineHeightInput, { label: t("style.line-height", "Line height"), defaultValue, onChange: handleChange });
2872
3012
  case "letterSpacing":
2873
- return /* @__PURE__ */ React62.createElement(LetterSpacingInput, { label: t("style.letter-spacing", "Letter spacing"), defaultValue, onChange: handleChange });
3013
+ return /* @__PURE__ */ React65.createElement(LetterSpacingInput, { label: t("style.letter-spacing", "Letter spacing"), defaultValue, onChange: handleChange });
2874
3014
  case "textAlign":
2875
- return /* @__PURE__ */ React62.createElement(TextAlignInput, { label: t("style.alignment", "Alignment"), defaultValue, onChange: handleChange });
3015
+ return /* @__PURE__ */ React65.createElement(TextAlignInput, { label: t("style.alignment", "Alignment"), defaultValue, onChange: handleChange });
2876
3016
  case "padding":
2877
- return /* @__PURE__ */ React62.createElement(PaddingInput, { label: t("style.padding", "Padding"), defaultValue, onChange: handleChange });
3017
+ return /* @__PURE__ */ React65.createElement(PaddingInput, { label: t("style.padding", "Padding"), defaultValue, onChange: handleChange });
2878
3018
  }
2879
3019
  }
2880
3020
 
2881
3021
  // src/app/inspector-drawer/configuration-panel/input-panels/helpers/style-inputs/multi-style-property-panel.tsx
2882
3022
  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 })));
3023
+ return /* @__PURE__ */ React65.createElement(React65.Fragment, null, names.map((name) => /* @__PURE__ */ React65.createElement(SingleStylePropertyPanel, { key: name, name, value: value || {}, onChange })));
2884
3024
  }
2885
3025
 
2886
3026
  // src/app/inspector-drawer/configuration-panel/input-panels/avatar-sidebar-panel.tsx
@@ -2900,11 +3040,11 @@ function AvatarSidebarPanel({ data, setData }) {
2900
3040
  const imageUrl = (_d = (_c = data.props) == null ? void 0 : _c.imageUrl) != null ? _d : AvatarPropsDefaults.imageUrl;
2901
3041
  const alt = (_f = (_e = data.props) == null ? void 0 : _e.alt) != null ? _f : AvatarPropsDefaults.alt;
2902
3042
  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(
3043
+ return /* @__PURE__ */ React65.createElement(BaseSidebarPanel, { title: "Avatar block" }, /* @__PURE__ */ React65.createElement(
2904
3044
  SliderInput,
2905
3045
  {
2906
3046
  label: t("field.size", "Size"),
2907
- iconLabel: /* @__PURE__ */ React62.createElement(AspectRatioOutlined, { sx: { color: "text.secondary" } }),
3047
+ iconLabel: /* @__PURE__ */ React65.createElement(AspectRatioOutlined, { sx: { color: "text.secondary" } }),
2908
3048
  units: "px",
2909
3049
  step: 3,
2910
3050
  min: 32,
@@ -2914,7 +3054,7 @@ function AvatarSidebarPanel({ data, setData }) {
2914
3054
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { size: size2 }) }));
2915
3055
  }
2916
3056
  }
2917
- ), /* @__PURE__ */ React62.createElement(
3057
+ ), /* @__PURE__ */ React65.createElement(
2918
3058
  RadioGroupInput,
2919
3059
  {
2920
3060
  label: t("avatar.shape", "Shape"),
@@ -2923,10 +3063,10 @@ function AvatarSidebarPanel({ data, setData }) {
2923
3063
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { shape: shape2 }) }));
2924
3064
  }
2925
3065
  },
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(
3066
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "circle" }, t("signature.shape.circle", "Circle")),
3067
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "square" }, t("signature.shape.square", "Square")),
3068
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "rounded" }, t("signature.shape.rounded", "Rounded"))
3069
+ ), /* @__PURE__ */ React65.createElement(
2930
3070
  TextInput,
2931
3071
  {
2932
3072
  label: t("signature.image-url", "Image URL"),
@@ -2935,7 +3075,7 @@ function AvatarSidebarPanel({ data, setData }) {
2935
3075
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { imageUrl: imageUrl2 }) }));
2936
3076
  }
2937
3077
  }
2938
- ), /* @__PURE__ */ React62.createElement(
3078
+ ), /* @__PURE__ */ React65.createElement(
2939
3079
  TextInput,
2940
3080
  {
2941
3081
  label: t("image.alt-text", "Alt text"),
@@ -2944,7 +3084,7 @@ function AvatarSidebarPanel({ data, setData }) {
2944
3084
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { alt: alt2 }) }));
2945
3085
  }
2946
3086
  }
2947
- ), /* @__PURE__ */ React62.createElement(
3087
+ ), /* @__PURE__ */ React65.createElement(
2948
3088
  MultiStylePropertyPanel,
2949
3089
  {
2950
3090
  names: ["textAlign", "padding"],
@@ -2972,65 +3112,65 @@ function ButtonSidebarPanel({ data, setData }) {
2972
3112
  const buttonStyle = (_j = (_i = data.props) == null ? void 0 : _i.buttonStyle) != null ? _j : ButtonPropsDefaults.buttonStyle;
2973
3113
  const buttonTextColor = (_l = (_k = data.props) == null ? void 0 : _k.buttonTextColor) != null ? _l : ButtonPropsDefaults.buttonTextColor;
2974
3114
  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(
3115
+ return /* @__PURE__ */ React65.createElement(BaseSidebarPanel, { title: "Button block" }, /* @__PURE__ */ React65.createElement(
2976
3116
  TextInput,
2977
3117
  {
2978
3118
  label: t("field.text", "Text"),
2979
3119
  defaultValue: text,
2980
3120
  onChange: (text2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { text: text2 }) }))
2981
3121
  }
2982
- ), /* @__PURE__ */ React62.createElement(
3122
+ ), /* @__PURE__ */ React65.createElement(
2983
3123
  TextInput,
2984
3124
  {
2985
3125
  label: t("field.url", "Url"),
2986
3126
  defaultValue: url,
2987
3127
  onChange: (url2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { url: url2 }) }))
2988
3128
  }
2989
- ), /* @__PURE__ */ React62.createElement(
3129
+ ), /* @__PURE__ */ React65.createElement(
2990
3130
  RadioGroupInput,
2991
3131
  {
2992
3132
  label: t("field.width", "Width"),
2993
3133
  defaultValue: fullWidth ? "FULL_WIDTH" : "AUTO",
2994
3134
  onChange: (v) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { fullWidth: v === "FULL_WIDTH" }) }))
2995
3135
  },
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(
3136
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "FULL_WIDTH" }, t("button.width.full", "Full")),
3137
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "AUTO" }, t("button.width.auto", "Auto"))
3138
+ ), /* @__PURE__ */ React65.createElement(
2999
3139
  RadioGroupInput,
3000
3140
  {
3001
3141
  label: t("field.size", "Size"),
3002
3142
  defaultValue: size,
3003
3143
  onChange: (size2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { size: size2 }) }))
3004
3144
  },
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(
3145
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "x-small" }, t("size.xs", "Xs")),
3146
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "small" }, t("size.sm", "Sm")),
3147
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "medium" }, t("size.md", "Md")),
3148
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "large" }, t("size.lg", "Lg"))
3149
+ ), /* @__PURE__ */ React65.createElement(
3010
3150
  RadioGroupInput,
3011
3151
  {
3012
3152
  label: t("field.style", "Style"),
3013
3153
  defaultValue: buttonStyle,
3014
3154
  onChange: (buttonStyle2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { buttonStyle: buttonStyle2 }) }))
3015
3155
  },
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(
3156
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "rectangle" }, t("button.style.rectangle", "Rectangle")),
3157
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "rounded" }, t("button.style.rounded", "Rounded")),
3158
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "pill" }, t("button.style.pill", "Pill"))
3159
+ ), /* @__PURE__ */ React65.createElement(
3020
3160
  ColorInput2,
3021
3161
  {
3022
3162
  label: t("style.text-color", "Text color"),
3023
3163
  defaultValue: buttonTextColor,
3024
3164
  onChange: (buttonTextColor2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { buttonTextColor: buttonTextColor2 }) }))
3025
3165
  }
3026
- ), /* @__PURE__ */ React62.createElement(
3166
+ ), /* @__PURE__ */ React65.createElement(
3027
3167
  ColorInput2,
3028
3168
  {
3029
3169
  label: t("button.color", "Button color"),
3030
3170
  defaultValue: buttonBackgroundColor,
3031
3171
  onChange: (buttonBackgroundColor2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { buttonBackgroundColor: buttonBackgroundColor2 }) }))
3032
3172
  }
3033
- ), /* @__PURE__ */ React62.createElement(
3173
+ ), /* @__PURE__ */ React65.createElement(
3034
3174
  MultiStylePropertyPanel,
3035
3175
  {
3036
3176
  names: [
@@ -3065,7 +3205,7 @@ function TextDimensionInput({ label, defaultValue, onChange }) {
3065
3205
  const value = parseInt(ev.target.value);
3066
3206
  onChange(isNaN(value) ? null : value);
3067
3207
  };
3068
- return /* @__PURE__ */ React62.createElement(
3208
+ return /* @__PURE__ */ React65.createElement(
3069
3209
  TextField,
3070
3210
  {
3071
3211
  fullWidth: true,
@@ -3076,7 +3216,7 @@ function TextDimensionInput({ label, defaultValue, onChange }) {
3076
3216
  placeholder: "auto",
3077
3217
  size: "small",
3078
3218
  InputProps: {
3079
- endAdornment: /* @__PURE__ */ React62.createElement(Typography, { variant: "body2", color: "text.secondary" }, "px")
3219
+ endAdornment: /* @__PURE__ */ React65.createElement(Typography, { variant: "body2", color: "text.secondary" }, "px")
3080
3220
  }
3081
3221
  }
3082
3222
  );
@@ -3098,7 +3238,7 @@ function ColumnWidthsInput({ defaultValue, onChange }) {
3098
3238
  };
3099
3239
  let column3 = null;
3100
3240
  {
3101
- column3 = /* @__PURE__ */ React62.createElement(
3241
+ column3 = /* @__PURE__ */ React65.createElement(
3102
3242
  TextDimensionInput,
3103
3243
  {
3104
3244
  label: "Column 3",
@@ -3109,7 +3249,7 @@ function ColumnWidthsInput({ defaultValue, onChange }) {
3109
3249
  }
3110
3250
  );
3111
3251
  }
3112
- return /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 1 }, /* @__PURE__ */ React62.createElement(
3252
+ return /* @__PURE__ */ React65.createElement(Stack, { direction: "row", spacing: 1 }, /* @__PURE__ */ React65.createElement(
3113
3253
  TextDimensionInput,
3114
3254
  {
3115
3255
  label: "Column 1",
@@ -3118,7 +3258,7 @@ function ColumnWidthsInput({ defaultValue, onChange }) {
3118
3258
  setIndexValue(0, v);
3119
3259
  }
3120
3260
  }
3121
- ), /* @__PURE__ */ React62.createElement(
3261
+ ), /* @__PURE__ */ React65.createElement(
3122
3262
  TextDimensionInput,
3123
3263
  {
3124
3264
  label: "Column 2",
@@ -3143,7 +3283,7 @@ function ColumnsContainerPanel({ data, setData }) {
3143
3283
  setErrors(res.error);
3144
3284
  }
3145
3285
  };
3146
- return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Columns block" }, /* @__PURE__ */ React62.createElement(
3286
+ return /* @__PURE__ */ React65.createElement(BaseSidebarPanel, { title: "Columns block" }, /* @__PURE__ */ React65.createElement(
3147
3287
  RadioGroupInput,
3148
3288
  {
3149
3289
  label: t("columns.count", "Number of columns"),
@@ -3152,9 +3292,9 @@ function ColumnsContainerPanel({ data, setData }) {
3152
3292
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { columnsCount: v === "2" ? 2 : 3 }) }));
3153
3293
  }
3154
3294
  },
3155
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "2" }, "2"),
3156
- /* @__PURE__ */ React62.createElement(ToggleButton, { value: "3" }, "3")
3157
- ), /* @__PURE__ */ React62.createElement(
3295
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "2" }, "2"),
3296
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "3" }, "3")
3297
+ ), /* @__PURE__ */ React65.createElement(
3158
3298
  ColumnWidthsInput,
3159
3299
  {
3160
3300
  defaultValue: (_b = data.props) == null ? void 0 : _b.fixedWidths,
@@ -3162,11 +3302,11 @@ function ColumnsContainerPanel({ data, setData }) {
3162
3302
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { fixedWidths }) }));
3163
3303
  }
3164
3304
  }
3165
- ), /* @__PURE__ */ React62.createElement(
3305
+ ), /* @__PURE__ */ React65.createElement(
3166
3306
  SliderInput,
3167
3307
  {
3168
3308
  label: t("columns.gap", "Columns gap"),
3169
- iconLabel: /* @__PURE__ */ React62.createElement(SpaceBarOutlined, { sx: { color: "text.secondary" } }),
3309
+ iconLabel: /* @__PURE__ */ React65.createElement(SpaceBarOutlined, { sx: { color: "text.secondary" } }),
3170
3310
  units: "px",
3171
3311
  step: 4,
3172
3312
  marks: true,
@@ -3175,7 +3315,7 @@ function ColumnsContainerPanel({ data, setData }) {
3175
3315
  defaultValue: (_d = (_c = data.props) == null ? void 0 : _c.columnsGap) != null ? _d : 0,
3176
3316
  onChange: (columnsGap) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { columnsGap }) }))
3177
3317
  }
3178
- ), /* @__PURE__ */ React62.createElement(
3318
+ ), /* @__PURE__ */ React65.createElement(
3179
3319
  RadioGroupInput,
3180
3320
  {
3181
3321
  label: t("style.alignment", "Alignment"),
@@ -3184,10 +3324,10 @@ function ColumnsContainerPanel({ data, setData }) {
3184
3324
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { contentAlignment }) }));
3185
3325
  }
3186
3326
  },
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(
3327
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "top" }, /* @__PURE__ */ React65.createElement(VerticalAlignTopOutlined, { fontSize: "small" })),
3328
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "middle" }, /* @__PURE__ */ React65.createElement(VerticalAlignCenterOutlined, { fontSize: "small" })),
3329
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "bottom" }, /* @__PURE__ */ React65.createElement(VerticalAlignBottomOutlined, { fontSize: "small" }))
3330
+ ), /* @__PURE__ */ React65.createElement(
3191
3331
  MultiStylePropertyPanel,
3192
3332
  {
3193
3333
  names: ["backgroundColor", "padding"],
@@ -3216,7 +3356,7 @@ function ContainerSidebarPanel({ data, setData }) {
3216
3356
  setErrors(res.error);
3217
3357
  }
3218
3358
  };
3219
- return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Container block" }, /* @__PURE__ */ React62.createElement(
3359
+ return /* @__PURE__ */ React65.createElement(BaseSidebarPanel, { title: "Container block" }, /* @__PURE__ */ React65.createElement(
3220
3360
  MultiStylePropertyPanel,
3221
3361
  {
3222
3362
  names: ["backgroundColor", "borderColor", "borderRadius", "padding"],
@@ -3239,18 +3379,18 @@ function DividerSidebarPanel({ data, setData }) {
3239
3379
  };
3240
3380
  const lineColor = (_b = (_a = data.props) == null ? void 0 : _a.lineColor) != null ? _b : DividerPropsDefaults.lineColor;
3241
3381
  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(
3382
+ return /* @__PURE__ */ React65.createElement(BaseSidebarPanel, { title: "Divider block" }, /* @__PURE__ */ React65.createElement(
3243
3383
  ColorInput2,
3244
3384
  {
3245
3385
  label: t("divider.color", "Color"),
3246
3386
  defaultValue: lineColor,
3247
3387
  onChange: (lineColor2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { lineColor: lineColor2 }) }))
3248
3388
  }
3249
- ), /* @__PURE__ */ React62.createElement(
3389
+ ), /* @__PURE__ */ React65.createElement(
3250
3390
  SliderInput,
3251
3391
  {
3252
3392
  label: t("field.height", "Height"),
3253
- iconLabel: /* @__PURE__ */ React62.createElement(HeightOutlined, { sx: { color: "text.secondary" } }),
3393
+ iconLabel: /* @__PURE__ */ React65.createElement(HeightOutlined, { sx: { color: "text.secondary" } }),
3254
3394
  units: "px",
3255
3395
  step: 1,
3256
3396
  min: 1,
@@ -3258,7 +3398,7 @@ function DividerSidebarPanel({ data, setData }) {
3258
3398
  defaultValue: lineHeight,
3259
3399
  onChange: (lineHeight2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { lineHeight: lineHeight2 }) }))
3260
3400
  }
3261
- ), /* @__PURE__ */ React62.createElement(
3401
+ ), /* @__PURE__ */ React65.createElement(
3262
3402
  MultiStylePropertyPanel,
3263
3403
  {
3264
3404
  names: ["backgroundColor", "padding"],
@@ -3267,8 +3407,8 @@ function DividerSidebarPanel({ data, setData }) {
3267
3407
  }
3268
3408
  ));
3269
3409
  }
3270
- var COLOR_SCHEMA10 = z.string().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional();
3271
- var FONT_FAMILY_SCHEMA7 = z.enum([
3410
+ var COLOR_SCHEMA11 = z.string().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional();
3411
+ var FONT_FAMILY_SCHEMA8 = z.enum([
3272
3412
  "MODERN_SANS",
3273
3413
  "BOOK_SANS",
3274
3414
  "ORGANIC_SANS",
@@ -3285,13 +3425,13 @@ var TemplateVariableSchema2 = z.object({
3285
3425
  sampleValue: z.string().optional().nullable()
3286
3426
  });
3287
3427
  var EmailLayoutPropsSchema2 = z.object({
3288
- backdropColor: COLOR_SCHEMA10,
3428
+ backdropColor: COLOR_SCHEMA11,
3289
3429
  backdropDisabled: z.boolean().optional().nullable(),
3290
- borderColor: COLOR_SCHEMA10,
3430
+ borderColor: COLOR_SCHEMA11,
3291
3431
  borderRadius: z.number().optional().nullable(),
3292
- canvasColor: COLOR_SCHEMA10,
3293
- textColor: COLOR_SCHEMA10,
3294
- fontFamily: FONT_FAMILY_SCHEMA7,
3432
+ canvasColor: COLOR_SCHEMA11,
3433
+ textColor: COLOR_SCHEMA11,
3434
+ fontFamily: FONT_FAMILY_SCHEMA8,
3295
3435
  childrenIds: z.array(z.string()).optional().nullable(),
3296
3436
  subject: z.string().optional().nullable(),
3297
3437
  variables: z.array(TemplateVariableSchema2).optional().nullable()
@@ -3302,11 +3442,11 @@ function BooleanInput({ label, defaultValue, onChange }) {
3302
3442
  useEffect(() => {
3303
3443
  setValue(defaultValue);
3304
3444
  }, [defaultValue]);
3305
- return /* @__PURE__ */ React62.createElement(
3445
+ return /* @__PURE__ */ React65.createElement(
3306
3446
  FormControlLabel,
3307
3447
  {
3308
3448
  label,
3309
- control: /* @__PURE__ */ React62.createElement(
3449
+ control: /* @__PURE__ */ React65.createElement(
3310
3450
  Switch,
3311
3451
  {
3312
3452
  checked: value,
@@ -3334,38 +3474,38 @@ function EmailLayoutSidebarFields({ data, setData }) {
3334
3474
  }
3335
3475
  };
3336
3476
  const backdropDisabled = (_a = data.backdropDisabled) != null ? _a : false;
3337
- return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Global" }, /* @__PURE__ */ React62.createElement(
3477
+ return /* @__PURE__ */ React65.createElement(BaseSidebarPanel, { title: "Global" }, /* @__PURE__ */ React65.createElement(
3338
3478
  BooleanInput,
3339
3479
  {
3340
3480
  label: t("global.disable-backdrop", "Disable backdrop"),
3341
3481
  defaultValue: backdropDisabled,
3342
3482
  onChange: (backdropDisabled2) => updateData(__spreadProps(__spreadValues({}, data), { backdropDisabled: backdropDisabled2 }))
3343
3483
  }
3344
- ), !backdropDisabled && /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
3484
+ ), !backdropDisabled && /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(
3345
3485
  ColorInput2,
3346
3486
  {
3347
3487
  label: t("global.backdrop-color", "Backdrop color"),
3348
3488
  defaultValue: (_b = data.backdropColor) != null ? _b : "#F5F5F5",
3349
3489
  onChange: (backdropColor) => updateData(__spreadProps(__spreadValues({}, data), { backdropColor }))
3350
3490
  }
3351
- ), /* @__PURE__ */ React62.createElement(
3491
+ ), /* @__PURE__ */ React65.createElement(
3352
3492
  ColorInput2,
3353
3493
  {
3354
3494
  label: t("global.canvas-color", "Canvas color"),
3355
3495
  defaultValue: (_c = data.canvasColor) != null ? _c : "#FFFFFF",
3356
3496
  onChange: (canvasColor) => updateData(__spreadProps(__spreadValues({}, data), { canvasColor }))
3357
3497
  }
3358
- ), /* @__PURE__ */ React62.createElement(
3498
+ ), /* @__PURE__ */ React65.createElement(
3359
3499
  NullableColorInput,
3360
3500
  {
3361
3501
  label: t("global.canvas-border-color", "Canvas border color"),
3362
3502
  defaultValue: (_d = data.borderColor) != null ? _d : null,
3363
3503
  onChange: (borderColor) => updateData(__spreadProps(__spreadValues({}, data), { borderColor }))
3364
3504
  }
3365
- ), /* @__PURE__ */ React62.createElement(
3505
+ ), /* @__PURE__ */ React65.createElement(
3366
3506
  SliderInput,
3367
3507
  {
3368
- iconLabel: /* @__PURE__ */ React62.createElement(RoundedCornerOutlined, null),
3508
+ iconLabel: /* @__PURE__ */ React65.createElement(RoundedCornerOutlined, null),
3369
3509
  units: "px",
3370
3510
  step: 4,
3371
3511
  marks: true,
@@ -3375,14 +3515,14 @@ function EmailLayoutSidebarFields({ data, setData }) {
3375
3515
  defaultValue: (_e = data.borderRadius) != null ? _e : 0,
3376
3516
  onChange: (borderRadius) => updateData(__spreadProps(__spreadValues({}, data), { borderRadius }))
3377
3517
  }
3378
- )), /* @__PURE__ */ React62.createElement(
3518
+ )), /* @__PURE__ */ React65.createElement(
3379
3519
  NullableFontFamily,
3380
3520
  {
3381
3521
  label: t("style.font-family", "Font family"),
3382
3522
  defaultValue: "MODERN_SANS",
3383
3523
  onChange: (fontFamily) => updateData(__spreadProps(__spreadValues({}, data), { fontFamily }))
3384
3524
  }
3385
- ), /* @__PURE__ */ React62.createElement(
3525
+ ), /* @__PURE__ */ React65.createElement(
3386
3526
  ColorInput2,
3387
3527
  {
3388
3528
  label: t("style.text-color", "Text color"),
@@ -3403,7 +3543,7 @@ function HeadingSidebarPanel({ data, setData }) {
3403
3543
  setErrors(res.error);
3404
3544
  }
3405
3545
  };
3406
- return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Heading block" }, /* @__PURE__ */ React62.createElement(
3546
+ return /* @__PURE__ */ React65.createElement(BaseSidebarPanel, { title: "Heading block" }, /* @__PURE__ */ React65.createElement(
3407
3547
  TextInput,
3408
3548
  {
3409
3549
  label: t("field.content", "Content"),
@@ -3413,7 +3553,7 @@ function HeadingSidebarPanel({ data, setData }) {
3413
3553
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { text }) }));
3414
3554
  }
3415
3555
  }
3416
- ), /* @__PURE__ */ React62.createElement(
3556
+ ), /* @__PURE__ */ React65.createElement(
3417
3557
  RadioGroupInput,
3418
3558
  {
3419
3559
  label: t("field.level", "Level"),
@@ -3422,10 +3562,10 @@ function HeadingSidebarPanel({ data, setData }) {
3422
3562
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { level }) }));
3423
3563
  }
3424
3564
  },
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(
3565
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "h1" }, "H1"),
3566
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "h2" }, "H2"),
3567
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "h3" }, "H3")
3568
+ ), /* @__PURE__ */ React65.createElement(
3429
3569
  MultiStylePropertyPanel,
3430
3570
  {
3431
3571
  names: [
@@ -3455,7 +3595,7 @@ function HtmlSidebarPanel({ data, setData }) {
3455
3595
  setErrors(res.error);
3456
3596
  }
3457
3597
  };
3458
- return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Html block" }, /* @__PURE__ */ React62.createElement(
3598
+ return /* @__PURE__ */ React65.createElement(BaseSidebarPanel, { title: "Html block" }, /* @__PURE__ */ React65.createElement(
3459
3599
  TextInput,
3460
3600
  {
3461
3601
  label: t("field.content", "Content"),
@@ -3463,7 +3603,7 @@ function HtmlSidebarPanel({ data, setData }) {
3463
3603
  defaultValue: (_b = (_a = data.props) == null ? void 0 : _a.contents) != null ? _b : "",
3464
3604
  onChange: (contents) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { contents }) }))
3465
3605
  }
3466
- ), /* @__PURE__ */ React62.createElement(
3606
+ ), /* @__PURE__ */ React65.createElement(
3467
3607
  MultiStylePropertyPanel,
3468
3608
  {
3469
3609
  names: ["color", "backgroundColor", "fontFamily", "fontSize", "textAlign", "padding"],
@@ -3520,7 +3660,7 @@ function ImageLibraryDialog({ open, onClose, onPick }) {
3520
3660
  setBusy(false);
3521
3661
  }
3522
3662
  });
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(
3663
+ return /* @__PURE__ */ React65.createElement(Dialog, { open, onClose, maxWidth: "md", fullWidth: true }, /* @__PURE__ */ React65.createElement(DialogTitle, null, "Image library"), /* @__PURE__ */ React65.createElement(DialogContent, { dividers: true }, /* @__PURE__ */ React65.createElement(
3524
3664
  TextField,
3525
3665
  {
3526
3666
  fullWidth: true,
@@ -3530,11 +3670,11 @@ function ImageLibraryDialog({ open, onClose, onPick }) {
3530
3670
  onChange: (e) => setQuery(e.target.value),
3531
3671
  autoFocus: true,
3532
3672
  InputProps: {
3533
- startAdornment: /* @__PURE__ */ React62.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React62.createElement(SearchOutlined, { fontSize: "small" }))
3673
+ startAdornment: /* @__PURE__ */ React65.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React65.createElement(SearchOutlined, { fontSize: "small" }))
3534
3674
  },
3535
3675
  sx: { mb: 2 }
3536
3676
  }
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(
3677
+ ), error && /* @__PURE__ */ React65.createElement(Alert, { severity: "error", sx: { mb: 2 } }, error), busy && !images && /* @__PURE__ */ React65.createElement(Stack, { alignItems: "center", sx: { py: 4 } }, /* @__PURE__ */ React65.createElement(CircularProgress, { size: 28 })), filtered && filtered.length === 0 && /* @__PURE__ */ React65.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__ */ React65.createElement(
3538
3678
  Box,
3539
3679
  {
3540
3680
  sx: {
@@ -3543,7 +3683,7 @@ function ImageLibraryDialog({ open, onClose, onPick }) {
3543
3683
  gap: 1.5
3544
3684
  }
3545
3685
  },
3546
- filtered.map((img) => /* @__PURE__ */ React62.createElement(
3686
+ filtered.map((img) => /* @__PURE__ */ React65.createElement(
3547
3687
  ImageTile,
3548
3688
  {
3549
3689
  key: img.url,
@@ -3552,7 +3692,7 @@ function ImageLibraryDialog({ open, onClose, onPick }) {
3552
3692
  onDelete: deleteImage ? () => handleDelete(img.url) : void 0
3553
3693
  }
3554
3694
  ))
3555
- )), /* @__PURE__ */ React62.createElement(DialogActions, null, /* @__PURE__ */ React62.createElement(Button$1, { onClick: onClose }, "Close")));
3695
+ )), /* @__PURE__ */ React65.createElement(DialogActions, null, /* @__PURE__ */ React65.createElement(Button$1, { onClick: onClose }, "Close")));
3556
3696
  }
3557
3697
  function ImageTile({
3558
3698
  image,
@@ -3562,7 +3702,7 @@ function ImageTile({
3562
3702
  var _a, _b;
3563
3703
  const src = (_a = image.thumbnailUrl) != null ? _a : image.url;
3564
3704
  const label = image.alt || image.url.split("/").pop() || "image";
3565
- return /* @__PURE__ */ React62.createElement(
3705
+ return /* @__PURE__ */ React65.createElement(
3566
3706
  Box,
3567
3707
  {
3568
3708
  sx: {
@@ -3578,7 +3718,7 @@ function ImageTile({
3578
3718
  },
3579
3719
  onClick: onPick
3580
3720
  },
3581
- /* @__PURE__ */ React62.createElement(
3721
+ /* @__PURE__ */ React65.createElement(
3582
3722
  Box,
3583
3723
  {
3584
3724
  component: "img",
@@ -3587,8 +3727,8 @@ function ImageTile({
3587
3727
  sx: { display: "block", width: "100%", aspectRatio: "1 / 1", objectFit: "cover", backgroundColor: "#f5f5f5" }
3588
3728
  }
3589
3729
  ),
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(
3730
+ /* @__PURE__ */ React65.createElement(Box, { sx: { p: 0.75, fontSize: 11, color: "text.secondary", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } }, label),
3731
+ onDelete && /* @__PURE__ */ React65.createElement(Tooltip, { title: "Delete from library" }, /* @__PURE__ */ React65.createElement(
3592
3732
  IconButton,
3593
3733
  {
3594
3734
  size: "small",
@@ -3608,7 +3748,7 @@ function ImageTile({
3608
3748
  },
3609
3749
  "aria-label": "Delete image"
3610
3750
  },
3611
- /* @__PURE__ */ React62.createElement(DeleteOutline, { fontSize: "small" })
3751
+ /* @__PURE__ */ React65.createElement(DeleteOutline, { fontSize: "small" })
3612
3752
  ))
3613
3753
  );
3614
3754
  }
@@ -3661,13 +3801,13 @@ function ImageSidebarPanel({ data, setData }) {
3661
3801
  });
3662
3802
  const url = (_b = (_a = data.props) == null ? void 0 : _a.url) != null ? _b : "";
3663
3803
  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(
3804
+ return /* @__PURE__ */ React65.createElement(BaseSidebarPanel, { title: "Image block" }, (uploadImage || loadImages) && /* @__PURE__ */ React65.createElement(Stack, { direction: "row", spacing: 1 }, uploadImage && /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(
3665
3805
  Button$1,
3666
3806
  {
3667
3807
  fullWidth: true,
3668
3808
  variant: "outlined",
3669
3809
  size: "small",
3670
- startIcon: uploading ? /* @__PURE__ */ React62.createElement(CircularProgress, { size: 14 }) : /* @__PURE__ */ React62.createElement(CloudUploadOutlined, { fontSize: "small" }),
3810
+ startIcon: uploading ? /* @__PURE__ */ React65.createElement(CircularProgress, { size: 14 }) : /* @__PURE__ */ React65.createElement(CloudUploadOutlined, { fontSize: "small" }),
3671
3811
  disabled: uploading,
3672
3812
  onClick: () => {
3673
3813
  var _a2;
@@ -3675,7 +3815,7 @@ function ImageSidebarPanel({ data, setData }) {
3675
3815
  }
3676
3816
  },
3677
3817
  uploading ? t("image.uploading", "Uploading\u2026") : t("image.upload", "Upload")
3678
- ), /* @__PURE__ */ React62.createElement(
3818
+ ), /* @__PURE__ */ React65.createElement(
3679
3819
  "input",
3680
3820
  {
3681
3821
  ref: fileInputRef,
@@ -3689,17 +3829,17 @@ function ImageSidebarPanel({ data, setData }) {
3689
3829
  if (file) yield handleFile(file);
3690
3830
  })
3691
3831
  }
3692
- )), loadImages && /* @__PURE__ */ React62.createElement(
3832
+ )), loadImages && /* @__PURE__ */ React65.createElement(
3693
3833
  Button$1,
3694
3834
  {
3695
3835
  fullWidth: true,
3696
3836
  variant: "outlined",
3697
3837
  size: "small",
3698
- startIcon: /* @__PURE__ */ React62.createElement(CollectionsOutlined, { fontSize: "small" }),
3838
+ startIcon: /* @__PURE__ */ React65.createElement(CollectionsOutlined, { fontSize: "small" }),
3699
3839
  onClick: () => setLibraryOpen(true)
3700
3840
  },
3701
3841
  t("image.library", "Library")
3702
- )), uploadError && /* @__PURE__ */ React62.createElement(Alert, { severity: "error", onClose: () => setUploadError(null), sx: { mt: 1 } }, uploadError), /* @__PURE__ */ React62.createElement(
3842
+ )), uploadError && /* @__PURE__ */ React65.createElement(Alert, { severity: "error", onClose: () => setUploadError(null), sx: { mt: 1 } }, uploadError), /* @__PURE__ */ React65.createElement(
3703
3843
  TextInput,
3704
3844
  {
3705
3845
  label: t("image.source-url", "Source URL"),
@@ -3709,14 +3849,14 @@ function ImageSidebarPanel({ data, setData }) {
3709
3849
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { url: next }) }));
3710
3850
  }
3711
3851
  }
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(
3852
+ ), showHttpWarning && /* @__PURE__ */ React65.createElement(Box, { sx: { mt: -1, mb: 1, display: "flex", alignItems: "flex-start", gap: 0.75 } }, /* @__PURE__ */ React65.createElement(ErrorOutlineOutlined, { fontSize: "small", sx: { color: "warning.main", mt: "2px" } }), /* @__PURE__ */ React65.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__ */ React65.createElement(
3713
3853
  TextInput,
3714
3854
  {
3715
3855
  label: t("image.alt-text", "Alt text"),
3716
3856
  defaultValue: (_d = (_c = data.props) == null ? void 0 : _c.alt) != null ? _d : "",
3717
3857
  onChange: (alt) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { alt }) }))
3718
3858
  }
3719
- ), /* @__PURE__ */ React62.createElement(
3859
+ ), /* @__PURE__ */ React65.createElement(
3720
3860
  TextInput,
3721
3861
  {
3722
3862
  label: t("image.link-href", "Click through URL"),
@@ -3726,38 +3866,38 @@ function ImageSidebarPanel({ data, setData }) {
3726
3866
  updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { linkHref }) }));
3727
3867
  }
3728
3868
  }
3729
- ), /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 2 }, /* @__PURE__ */ React62.createElement(
3869
+ ), /* @__PURE__ */ React65.createElement(Stack, { direction: "row", spacing: 2 }, /* @__PURE__ */ React65.createElement(
3730
3870
  TextDimensionInput,
3731
3871
  {
3732
3872
  label: t("field.width", "Width"),
3733
3873
  defaultValue: (_g = data.props) == null ? void 0 : _g.width,
3734
3874
  onChange: (width) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { width }) }))
3735
3875
  }
3736
- ), /* @__PURE__ */ React62.createElement(
3876
+ ), /* @__PURE__ */ React65.createElement(
3737
3877
  TextDimensionInput,
3738
3878
  {
3739
3879
  label: t("field.height", "Height"),
3740
3880
  defaultValue: (_h = data.props) == null ? void 0 : _h.height,
3741
3881
  onChange: (height) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { height }) }))
3742
3882
  }
3743
- )), /* @__PURE__ */ React62.createElement(
3883
+ )), /* @__PURE__ */ React65.createElement(
3744
3884
  RadioGroupInput,
3745
3885
  {
3746
3886
  label: t("style.alignment", "Alignment"),
3747
3887
  defaultValue: (_j = (_i = data.props) == null ? void 0 : _i.contentAlignment) != null ? _j : "middle",
3748
3888
  onChange: (contentAlignment) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { contentAlignment }) }))
3749
3889
  },
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(
3890
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "top" }, /* @__PURE__ */ React65.createElement(VerticalAlignTopOutlined, { fontSize: "small" })),
3891
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "middle" }, /* @__PURE__ */ React65.createElement(VerticalAlignCenterOutlined, { fontSize: "small" })),
3892
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "bottom" }, /* @__PURE__ */ React65.createElement(VerticalAlignBottomOutlined, { fontSize: "small" }))
3893
+ ), /* @__PURE__ */ React65.createElement(
3754
3894
  MultiStylePropertyPanel,
3755
3895
  {
3756
3896
  names: ["backgroundColor", "textAlign", "padding"],
3757
3897
  value: data.style,
3758
3898
  onChange: (style) => updateData(__spreadProps(__spreadValues({}, data), { style }))
3759
3899
  }
3760
- ), loadImages && /* @__PURE__ */ React62.createElement(
3900
+ ), loadImages && /* @__PURE__ */ React65.createElement(
3761
3901
  ImageLibraryDialog,
3762
3902
  {
3763
3903
  open: libraryOpen,
@@ -3769,6 +3909,46 @@ function ImageSidebarPanel({ data, setData }) {
3769
3909
  }
3770
3910
  ));
3771
3911
  }
3912
+ function OtpSidebarPanel({ data, setData }) {
3913
+ var _a, _b;
3914
+ const [, setErrors] = useState(null);
3915
+ const updateData = (d) => {
3916
+ const res = OtpPropsSchema.safeParse(d);
3917
+ if (res.success) {
3918
+ setData(res.data);
3919
+ setErrors(null);
3920
+ } else {
3921
+ setErrors(res.error);
3922
+ }
3923
+ };
3924
+ return /* @__PURE__ */ React65.createElement(BaseSidebarPanel, { title: t("otp.title", "OTP / Code block") }, /* @__PURE__ */ React65.createElement(
3925
+ TextInput,
3926
+ {
3927
+ label: t("otp.code", "Code"),
3928
+ rows: 1,
3929
+ defaultValue: (_b = (_a = data.props) == null ? void 0 : _a.code) != null ? _b : OtpPropsDefaults.code,
3930
+ onChange: (code) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { code }) }))
3931
+ }
3932
+ ), /* @__PURE__ */ React65.createElement(
3933
+ MultiStylePropertyPanel,
3934
+ {
3935
+ names: [
3936
+ "color",
3937
+ "backgroundColor",
3938
+ "borderColor",
3939
+ "borderRadius",
3940
+ "fontFamily",
3941
+ "fontSize",
3942
+ "fontWeight",
3943
+ "letterSpacing",
3944
+ "textAlign",
3945
+ "padding"
3946
+ ],
3947
+ value: data.style,
3948
+ onChange: (style) => updateData(__spreadProps(__spreadValues({}, data), { style }))
3949
+ }
3950
+ ));
3951
+ }
3772
3952
  function SignatureSidebarPanel({ data, setData }) {
3773
3953
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D;
3774
3954
  const [, setErrors] = useState(null);
@@ -3796,74 +3976,74 @@ function SignatureSidebarPanel({ data, setData }) {
3796
3976
  const nameColor = (_z = (_y = data.props) == null ? void 0 : _y.nameColor) != null ? _z : SignaturePropsDefaults.nameColor;
3797
3977
  const textColor = (_B = (_A = data.props) == null ? void 0 : _A.textColor) != null ? _B : SignaturePropsDefaults.textColor;
3798
3978
  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(
3979
+ return /* @__PURE__ */ React65.createElement(BaseSidebarPanel, { title: "Signature block" }, /* @__PURE__ */ React65.createElement(
3800
3980
  TextInput,
3801
3981
  {
3802
3982
  label: t("signature.greeting", "Greeting"),
3803
3983
  defaultValue: greeting,
3804
3984
  onChange: (greeting2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { greeting: greeting2 }) }))
3805
3985
  }
3806
- ), /* @__PURE__ */ React62.createElement(
3986
+ ), /* @__PURE__ */ React65.createElement(
3807
3987
  TextInput,
3808
3988
  {
3809
3989
  label: t("signature.name", "Name"),
3810
3990
  defaultValue: name,
3811
3991
  onChange: (name2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { name: name2 }) }))
3812
3992
  }
3813
- ), /* @__PURE__ */ React62.createElement(
3993
+ ), /* @__PURE__ */ React65.createElement(
3814
3994
  TextInput,
3815
3995
  {
3816
3996
  label: t("signature.title", "Title"),
3817
3997
  defaultValue: title,
3818
3998
  onChange: (title2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { title: title2 }) }))
3819
3999
  }
3820
- ), /* @__PURE__ */ React62.createElement(
4000
+ ), /* @__PURE__ */ React65.createElement(
3821
4001
  TextInput,
3822
4002
  {
3823
4003
  label: t("signature.company", "Company"),
3824
4004
  defaultValue: company,
3825
4005
  onChange: (company2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { company: company2 }) }))
3826
4006
  }
3827
- ), /* @__PURE__ */ React62.createElement(
4007
+ ), /* @__PURE__ */ React65.createElement(
3828
4008
  TextInput,
3829
4009
  {
3830
4010
  label: t("signature.address", "Address"),
3831
4011
  defaultValue: address,
3832
4012
  onChange: (address2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { address: address2 }) }))
3833
4013
  }
3834
- ), /* @__PURE__ */ React62.createElement(
4014
+ ), /* @__PURE__ */ React65.createElement(
3835
4015
  TextInput,
3836
4016
  {
3837
4017
  label: t("signature.email", "Email"),
3838
4018
  defaultValue: email,
3839
4019
  onChange: (email2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { email: email2 }) }))
3840
4020
  }
3841
- ), /* @__PURE__ */ React62.createElement(
4021
+ ), /* @__PURE__ */ React65.createElement(
3842
4022
  TextInput,
3843
4023
  {
3844
4024
  label: t("signature.phone", "Phone"),
3845
4025
  defaultValue: phone,
3846
4026
  onChange: (phone2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { phone: phone2 }) }))
3847
4027
  }
3848
- ), /* @__PURE__ */ React62.createElement(
4028
+ ), /* @__PURE__ */ React65.createElement(
3849
4029
  TextInput,
3850
4030
  {
3851
4031
  label: t("signature.website", "Website"),
3852
4032
  defaultValue: website,
3853
4033
  onChange: (website2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { website: website2 }) }))
3854
4034
  }
3855
- ), /* @__PURE__ */ React62.createElement(
4035
+ ), /* @__PURE__ */ React65.createElement(
3856
4036
  TextInput,
3857
4037
  {
3858
4038
  label: t("signature.image-url", "Image URL"),
3859
4039
  defaultValue: imageUrl,
3860
4040
  onChange: (imageUrl2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { imageUrl: imageUrl2 }) }))
3861
4041
  }
3862
- ), /* @__PURE__ */ React62.createElement(
4042
+ ), /* @__PURE__ */ React65.createElement(
3863
4043
  SliderInput,
3864
4044
  {
3865
4045
  label: t("signature.image-size", "Image size"),
3866
- iconLabel: /* @__PURE__ */ React62.createElement(AspectRatioOutlined, { sx: { color: "text.secondary" } }),
4046
+ iconLabel: /* @__PURE__ */ React65.createElement(AspectRatioOutlined, { sx: { color: "text.secondary" } }),
3867
4047
  units: "px",
3868
4048
  step: 4,
3869
4049
  min: 32,
@@ -3871,47 +4051,47 @@ function SignatureSidebarPanel({ data, setData }) {
3871
4051
  defaultValue: imageSize,
3872
4052
  onChange: (imageSize2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { imageSize: imageSize2 }) }))
3873
4053
  }
3874
- ), /* @__PURE__ */ React62.createElement(
4054
+ ), /* @__PURE__ */ React65.createElement(
3875
4055
  RadioGroupInput,
3876
4056
  {
3877
4057
  label: t("signature.image-shape", "Image shape"),
3878
4058
  defaultValue: imageShape,
3879
4059
  onChange: (imageShape2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { imageShape: imageShape2 }) }))
3880
4060
  },
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(
4061
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "circle" }, t("signature.shape.circle", "Circle")),
4062
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "square" }, t("signature.shape.square", "Square")),
4063
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "rounded" }, t("signature.shape.rounded", "Rounded"))
4064
+ ), /* @__PURE__ */ React65.createElement(
3885
4065
  RadioGroupInput,
3886
4066
  {
3887
4067
  label: t("signature.layout", "Layout"),
3888
4068
  defaultValue: layout,
3889
4069
  onChange: (layout2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { layout: layout2 }) }))
3890
4070
  },
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(
4071
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "horizontal" }, t("signature.layout.horizontal", "Horizontal")),
4072
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "vertical" }, t("signature.layout.vertical", "Vertical"))
4073
+ ), /* @__PURE__ */ React65.createElement(
3894
4074
  ColorInput2,
3895
4075
  {
3896
4076
  label: t("signature.name-color", "Name color"),
3897
4077
  defaultValue: nameColor,
3898
4078
  onChange: (nameColor2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { nameColor: nameColor2 }) }))
3899
4079
  }
3900
- ), /* @__PURE__ */ React62.createElement(
4080
+ ), /* @__PURE__ */ React65.createElement(
3901
4081
  ColorInput2,
3902
4082
  {
3903
4083
  label: t("style.text-color", "Text color"),
3904
4084
  defaultValue: textColor,
3905
4085
  onChange: (textColor2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { textColor: textColor2 }) }))
3906
4086
  }
3907
- ), /* @__PURE__ */ React62.createElement(
4087
+ ), /* @__PURE__ */ React65.createElement(
3908
4088
  ColorInput2,
3909
4089
  {
3910
4090
  label: t("signature.link-color", "Link color"),
3911
4091
  defaultValue: linkColor,
3912
4092
  onChange: (linkColor2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { linkColor: linkColor2 }) }))
3913
4093
  }
3914
- ), /* @__PURE__ */ React62.createElement(
4094
+ ), /* @__PURE__ */ React65.createElement(
3915
4095
  MultiStylePropertyPanel,
3916
4096
  {
3917
4097
  names: ["backgroundColor", "fontFamily", "padding"],
@@ -3932,11 +4112,11 @@ function SpacerSidebarPanel({ data, setData }) {
3932
4112
  setErrors(res.error);
3933
4113
  }
3934
4114
  };
3935
- return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Spacer block" }, /* @__PURE__ */ React62.createElement(
4115
+ return /* @__PURE__ */ React65.createElement(BaseSidebarPanel, { title: "Spacer block" }, /* @__PURE__ */ React65.createElement(
3936
4116
  SliderInput,
3937
4117
  {
3938
4118
  label: t("field.height", "Height"),
3939
- iconLabel: /* @__PURE__ */ React62.createElement(HeightOutlined, { sx: { color: "text.secondary" } }),
4119
+ iconLabel: /* @__PURE__ */ React65.createElement(HeightOutlined, { sx: { color: "text.secondary" } }),
3940
4120
  units: "px",
3941
4121
  step: 4,
3942
4122
  min: 4,
@@ -3958,7 +4138,7 @@ function TextSidebarPanel({ data, setData }) {
3958
4138
  setErrors(res.error);
3959
4139
  }
3960
4140
  };
3961
- return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Text block" }, /* @__PURE__ */ React62.createElement(
4141
+ return /* @__PURE__ */ React65.createElement(BaseSidebarPanel, { title: "Text block" }, /* @__PURE__ */ React65.createElement(
3962
4142
  TextInput,
3963
4143
  {
3964
4144
  label: t("field.content", "Content"),
@@ -3966,14 +4146,14 @@ function TextSidebarPanel({ data, setData }) {
3966
4146
  defaultValue: (_b = (_a = data.props) == null ? void 0 : _a.text) != null ? _b : "",
3967
4147
  onChange: (text) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { text }) }))
3968
4148
  }
3969
- ), /* @__PURE__ */ React62.createElement(
4149
+ ), /* @__PURE__ */ React65.createElement(
3970
4150
  BooleanInput,
3971
4151
  {
3972
4152
  label: t("field.markdown", "Markdown"),
3973
4153
  defaultValue: (_d = (_c = data.props) == null ? void 0 : _c.markdown) != null ? _d : false,
3974
4154
  onChange: (markdown) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { markdown }) }))
3975
4155
  }
3976
- ), /* @__PURE__ */ React62.createElement(
4156
+ ), /* @__PURE__ */ React65.createElement(
3977
4157
  MultiStylePropertyPanel,
3978
4158
  {
3979
4159
  names: [
@@ -3995,7 +4175,7 @@ function TextSidebarPanel({ data, setData }) {
3995
4175
 
3996
4176
  // src/app/inspector-drawer/configuration-panel/index.tsx
3997
4177
  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));
4178
+ return /* @__PURE__ */ React65.createElement(Box, { sx: { m: 3, p: 1, border: "1px dashed", borderColor: "divider" } }, /* @__PURE__ */ React65.createElement(Typography, { color: "text.secondary" }, val));
3999
4179
  }
4000
4180
  function ConfigurationPanel() {
4001
4181
  const document2 = useDocument();
@@ -4011,55 +4191,57 @@ function ConfigurationPanel() {
4011
4191
  const { data, type } = block;
4012
4192
  switch (type) {
4013
4193
  case "Avatar":
4014
- return /* @__PURE__ */ React62.createElement(AvatarSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4194
+ return /* @__PURE__ */ React65.createElement(AvatarSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4015
4195
  case "Button":
4016
- return /* @__PURE__ */ React62.createElement(ButtonSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4196
+ return /* @__PURE__ */ React65.createElement(ButtonSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4017
4197
  case "ColumnsContainer":
4018
- return /* @__PURE__ */ React62.createElement(ColumnsContainerPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4198
+ return /* @__PURE__ */ React65.createElement(ColumnsContainerPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4019
4199
  case "Container":
4020
- return /* @__PURE__ */ React62.createElement(ContainerSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4200
+ return /* @__PURE__ */ React65.createElement(ContainerSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4021
4201
  case "Divider":
4022
- return /* @__PURE__ */ React62.createElement(DividerSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4202
+ return /* @__PURE__ */ React65.createElement(DividerSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4023
4203
  case "Heading":
4024
- return /* @__PURE__ */ React62.createElement(HeadingSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4204
+ return /* @__PURE__ */ React65.createElement(HeadingSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4025
4205
  case "Html":
4026
- return /* @__PURE__ */ React62.createElement(HtmlSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4206
+ return /* @__PURE__ */ React65.createElement(HtmlSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4027
4207
  case "Image":
4028
- return /* @__PURE__ */ React62.createElement(ImageSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4208
+ return /* @__PURE__ */ React65.createElement(ImageSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4029
4209
  case "EmailLayout":
4030
- return /* @__PURE__ */ React62.createElement(EmailLayoutSidebarFields, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4210
+ return /* @__PURE__ */ React65.createElement(EmailLayoutSidebarFields, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4211
+ case "Otp":
4212
+ return /* @__PURE__ */ React65.createElement(OtpSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4031
4213
  case "Spacer":
4032
- return /* @__PURE__ */ React62.createElement(SpacerSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4214
+ return /* @__PURE__ */ React65.createElement(SpacerSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4033
4215
  case "Signature":
4034
- return /* @__PURE__ */ React62.createElement(SignatureSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4216
+ return /* @__PURE__ */ React65.createElement(SignatureSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4035
4217
  case "Text":
4036
- return /* @__PURE__ */ React62.createElement(TextSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4218
+ return /* @__PURE__ */ React65.createElement(TextSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
4037
4219
  default:
4038
- return /* @__PURE__ */ React62.createElement("pre", null, JSON.stringify(block, null, " "));
4220
+ return /* @__PURE__ */ React65.createElement("pre", null, JSON.stringify(block, null, " "));
4039
4221
  }
4040
4222
  }
4041
4223
  function StylesPanel() {
4042
4224
  const block = useDocument().root;
4043
4225
  if (!block) {
4044
- return /* @__PURE__ */ React62.createElement("p", null, "Block not found");
4226
+ return /* @__PURE__ */ React65.createElement("p", null, "Block not found");
4045
4227
  }
4046
4228
  const { data, type } = block;
4047
4229
  if (type !== "EmailLayout") {
4048
4230
  throw new Error('Expected "root" element to be of type EmailLayout');
4049
4231
  }
4050
- return /* @__PURE__ */ React62.createElement(EmailLayoutSidebarFields, { key: "root", data, setData: (data2) => setDocument({ root: { type, data: data2 } }) });
4232
+ return /* @__PURE__ */ React65.createElement(EmailLayoutSidebarFields, { key: "root", data, setData: (data2) => setDocument({ root: { type, data: data2 } }) });
4051
4233
  }
4052
4234
  function TemplateDownloadButton() {
4053
4235
  const doc = useDocument();
4054
4236
  const href = useMemo(() => {
4055
4237
  return `data:text/plain,${encodeURIComponent(JSON.stringify(doc, null, " "))}`;
4056
4238
  }, [doc]);
4057
- return /* @__PURE__ */ React62.createElement(
4239
+ return /* @__PURE__ */ React65.createElement(
4058
4240
  Button$1,
4059
4241
  {
4060
4242
  variant: "outlined",
4061
4243
  color: "primary",
4062
- startIcon: /* @__PURE__ */ React62.createElement(FileDownloadOutlined, null),
4244
+ startIcon: /* @__PURE__ */ React65.createElement(FileDownloadOutlined, null),
4063
4245
  href,
4064
4246
  download: "emailTemplate.json",
4065
4247
  fullWidth: true
@@ -4101,7 +4283,7 @@ function TemplatePanel({
4101
4283
  window.alert(t("settings.copied", "Template copied successfully!"));
4102
4284
  }
4103
4285
  };
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(
4286
+ const workspaceToggle = /* @__PURE__ */ React65.createElement(BaseSidebarPanel, { title: "Editor appearance" }, /* @__PURE__ */ React65.createElement(Stack, { spacing: 1 }, /* @__PURE__ */ React65.createElement(Typography, { variant: "caption", sx: { color: "text.secondary" } }, t("settings.workspace-background", "Workspace background")), /* @__PURE__ */ React65.createElement(
4105
4287
  ToggleButtonGroup,
4106
4288
  {
4107
4289
  value: workspaceBackground,
@@ -4109,13 +4291,13 @@ function TemplatePanel({
4109
4291
  size: "small",
4110
4292
  onChange: (_, v) => v && setWorkspaceBackground(v)
4111
4293
  },
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."))));
4294
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "checkerboard", sx: { textTransform: "none", gap: 0.75 } }, /* @__PURE__ */ React65.createElement(GridOnOutlined, { fontSize: "small" }), t("settings.checkerboard", "Checkerboard")),
4295
+ /* @__PURE__ */ React65.createElement(ToggleButton, { value: "solid", sx: { textTransform: "none", gap: 0.75 } }, /* @__PURE__ */ React65.createElement(SquareOutlined, { fontSize: "small" }), t("settings.solid", "Solid"))
4296
+ ), /* @__PURE__ */ React65.createElement(Typography, { variant: "caption", sx: { color: "text.disabled" } }, t("settings.editor-only-hint", "Editor-only \u2014 never reaches the rendered email."))));
4115
4297
  if (!currentTemplateId) {
4116
- return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Template" }, t("settings.no-template", "No template selected")), workspaceToggle);
4298
+ return /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(BaseSidebarPanel, { title: "Template" }, t("settings.no-template", "No template selected")), workspaceToggle);
4117
4299
  }
4118
- return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Details" }, /* @__PURE__ */ React62.createElement(
4300
+ return /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(BaseSidebarPanel, { title: "Details" }, /* @__PURE__ */ React65.createElement(
4119
4301
  DetailsEditor,
4120
4302
  {
4121
4303
  templateId: currentTemplateId,
@@ -4129,7 +4311,7 @@ function TemplatePanel({
4129
4311
  setCurrentTemplateTags(tags);
4130
4312
  })
4131
4313
  }
4132
- )), /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Template" }, /* @__PURE__ */ React62.createElement(Stack, { spacing: 2 }, !persistenceEnabled && /* @__PURE__ */ React62.createElement(
4314
+ )), /* @__PURE__ */ React65.createElement(BaseSidebarPanel, { title: "Template" }, /* @__PURE__ */ React65.createElement(Stack, { spacing: 2 }, !persistenceEnabled && /* @__PURE__ */ React65.createElement(
4133
4315
  Typography,
4134
4316
  {
4135
4317
  variant: "body2",
@@ -4142,29 +4324,29 @@ function TemplatePanel({
4142
4324
  }
4143
4325
  },
4144
4326
  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(
4327
+ ), persistenceEnabled && /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(
4146
4328
  Button$1,
4147
4329
  {
4148
4330
  variant: "outlined",
4149
4331
  color: "primary",
4150
- startIcon: /* @__PURE__ */ React62.createElement(ContentCopyOutlined, null),
4332
+ startIcon: /* @__PURE__ */ React65.createElement(ContentCopyOutlined, null),
4151
4333
  onClick: handleCopyToSamples,
4152
4334
  fullWidth: true,
4153
4335
  disabled: !copyTemplate
4154
4336
  },
4155
4337
  t("settings.save-as-sample", "Save as Sample Template")
4156
- ), /* @__PURE__ */ React62.createElement(
4338
+ ), /* @__PURE__ */ React65.createElement(
4157
4339
  Button$1,
4158
4340
  {
4159
4341
  variant: "outlined",
4160
4342
  color: "error",
4161
- startIcon: /* @__PURE__ */ React62.createElement(DeleteOutlined, null),
4343
+ startIcon: /* @__PURE__ */ React65.createElement(DeleteOutlined, null),
4162
4344
  onClick: handleDelete,
4163
4345
  fullWidth: true,
4164
4346
  disabled: !deleteTemplate
4165
4347
  },
4166
4348
  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);
4349
+ )))), persistenceEnabled && /* @__PURE__ */ React65.createElement(BaseSidebarPanel, { title: "Export" }, /* @__PURE__ */ React65.createElement(Stack, { spacing: 2 }, /* @__PURE__ */ React65.createElement(TemplateDownloadButton, null))), workspaceToggle);
4168
4350
  }
4169
4351
  function DetailsEditor({ templateId, currentName, currentTags, canEdit, onSave }) {
4170
4352
  const [name, setName] = useState(currentName);
@@ -4201,7 +4383,7 @@ function DetailsEditor({ templateId, currentName, currentTags, canEdit, onSave }
4201
4383
  setSaving(false);
4202
4384
  }
4203
4385
  });
4204
- return /* @__PURE__ */ React62.createElement(Stack, { spacing: 1.5 }, /* @__PURE__ */ React62.createElement(
4386
+ return /* @__PURE__ */ React65.createElement(Stack, { spacing: 1.5 }, /* @__PURE__ */ React65.createElement(
4205
4387
  TextField,
4206
4388
  {
4207
4389
  size: "small",
@@ -4211,7 +4393,7 @@ function DetailsEditor({ templateId, currentName, currentTags, canEdit, onSave }
4211
4393
  disabled: !canEdit || saving,
4212
4394
  fullWidth: true
4213
4395
  }
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(
4396
+ ), /* @__PURE__ */ React65.createElement(Box, null, /* @__PURE__ */ React65.createElement(Typography, { variant: "caption", sx: { color: "text.secondary", display: "block", mb: 0.5 } }, t("rename.tags", "Tags")), tags.length > 0 ? /* @__PURE__ */ React65.createElement(Stack, { direction: "row", spacing: 0.5, sx: { flexWrap: "wrap", gap: 0.5, mb: 1 } }, tags.map((tag) => /* @__PURE__ */ React65.createElement(
4215
4397
  Chip,
4216
4398
  {
4217
4399
  key: tag,
@@ -4219,7 +4401,7 @@ function DetailsEditor({ templateId, currentName, currentTags, canEdit, onSave }
4219
4401
  size: "small",
4220
4402
  onDelete: canEdit && !saving ? () => removeTag(tag) : void 0
4221
4403
  }
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(
4404
+ ))) : /* @__PURE__ */ React65.createElement(Typography, { variant: "caption", sx: { color: "text.disabled", display: "block", mb: 1 } }, t("rename.no-tags", "No tags yet.")), /* @__PURE__ */ React65.createElement(
4223
4405
  TextField,
4224
4406
  {
4225
4407
  size: "small",
@@ -4238,20 +4420,20 @@ function DetailsEditor({ templateId, currentName, currentTags, canEdit, onSave }
4238
4420
  }
4239
4421
  },
4240
4422
  InputProps: {
4241
- endAdornment: /* @__PURE__ */ React62.createElement(InputAdornment, { position: "end" }, /* @__PURE__ */ React62.createElement(
4423
+ endAdornment: /* @__PURE__ */ React65.createElement(InputAdornment, { position: "end" }, /* @__PURE__ */ React65.createElement(
4242
4424
  Button$1,
4243
4425
  {
4244
4426
  size: "small",
4245
4427
  onClick: addTag,
4246
4428
  disabled: !canEdit || saving || !tagInput.trim(),
4247
- startIcon: /* @__PURE__ */ React62.createElement(AddOutlined, { fontSize: "small" }),
4429
+ startIcon: /* @__PURE__ */ React65.createElement(AddOutlined, { fontSize: "small" }),
4248
4430
  sx: { textTransform: "none" }
4249
4431
  },
4250
4432
  t("common.add", "Add")
4251
4433
  ))
4252
4434
  }
4253
4435
  }
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(
4436
+ )), /* @__PURE__ */ React65.createElement(Tooltip, { title: canEdit ? "" : t("settings.no-rename-cb", "Wire a renameTemplate callback to enable editing from here"), placement: "top" }, /* @__PURE__ */ React65.createElement("span", null, /* @__PURE__ */ React65.createElement(
4255
4437
  Button$1,
4256
4438
  {
4257
4439
  variant: "contained",
@@ -4259,7 +4441,7 @@ function DetailsEditor({ templateId, currentName, currentTags, canEdit, onSave }
4259
4441
  fullWidth: true,
4260
4442
  onClick: handleSave,
4261
4443
  disabled: !canEdit || saving || !dirty || !name.trim(),
4262
- startIcon: justSaved ? /* @__PURE__ */ React62.createElement(CheckOutlined, { fontSize: "small" }) : null
4444
+ startIcon: justSaved ? /* @__PURE__ */ React65.createElement(CheckOutlined, { fontSize: "small" }) : null
4263
4445
  },
4264
4446
  saving ? t("common.saving", "Saving\u2026") : justSaved ? t("settings.saved", "Saved") : t("settings.save-details", "Save details")
4265
4447
  ))));
@@ -4436,7 +4618,7 @@ function VariablesPanel() {
4436
4618
  const lastFocused = useLastFocusedEditable();
4437
4619
  const root = document2.root;
4438
4620
  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.")));
4621
+ return /* @__PURE__ */ React65.createElement(Box, { p: 2 }, /* @__PURE__ */ React65.createElement(Alert, { severity: "info" }, t("variables.open-template", "Open a template to manage variables.")));
4440
4622
  }
4441
4623
  const data = root.data;
4442
4624
  const variables = ((_a = data.variables) != null ? _a : []).map((v) => {
@@ -4531,10 +4713,10 @@ function VariablesPanel() {
4531
4713
  } catch (e) {
4532
4714
  }
4533
4715
  });
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(
4716
+ return /* @__PURE__ */ React65.createElement(Box, { p: 2 }, /* @__PURE__ */ React65.createElement(Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", sx: { mb: 1 } }, /* @__PURE__ */ React65.createElement(Typography, { variant: "subtitle1", sx: { fontWeight: 600 } }, t("variables.title", "Variables")), /* @__PURE__ */ React65.createElement(Tooltip, { title: t("variables.add", "Add variable") }, /* @__PURE__ */ React65.createElement(IconButton, { size: "small", onClick: add, "aria-label": t("variables.add", "Add variable") }, /* @__PURE__ */ React65.createElement(AddOutlined, { fontSize: "small" })))), /* @__PURE__ */ React65.createElement(Typography, { variant: "caption", sx: { color: "text.secondary", display: "block", mb: 2 } }, t(
4535
4717
  "variables.intro",
4536
4718
  "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(
4719
+ )), undeclared.length > 0 && /* @__PURE__ */ React65.createElement(Alert, { severity: "warning", sx: { mb: 2 } }, /* @__PURE__ */ React65.createElement(AlertTitle, { sx: { fontSize: 13 } }, t("variables.undeclared", "Undeclared in body")), /* @__PURE__ */ React65.createElement(Stack, { direction: "row", spacing: 0.5, useFlexGap: true, flexWrap: "wrap" }, undeclared.map((name) => /* @__PURE__ */ React65.createElement(
4538
4720
  Chip,
4539
4721
  {
4540
4722
  key: name,
@@ -4542,12 +4724,12 @@ function VariablesPanel() {
4542
4724
  label: name,
4543
4725
  onClick: () => addFromToken(name),
4544
4726
  onDelete: () => addFromToken(name),
4545
- deleteIcon: /* @__PURE__ */ React62.createElement(AddOutlined, null),
4727
+ deleteIcon: /* @__PURE__ */ React65.createElement(AddOutlined, null),
4546
4728
  sx: { fontFamily: "monospace" }
4547
4729
  }
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) => {
4730
+ ))), /* @__PURE__ */ React65.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__ */ React65.createElement(Typography, { variant: "body2", sx: { color: "text.secondary" } }, t("variables.none", "No variables declared. Click + to add one.")) : /* @__PURE__ */ React65.createElement(Stack, { spacing: 2 }, variables.map((v, i) => {
4549
4731
  var _a2;
4550
- return /* @__PURE__ */ React62.createElement(
4732
+ return /* @__PURE__ */ React65.createElement(
4551
4733
  VariableRow,
4552
4734
  {
4553
4735
  key: i,
@@ -4598,7 +4780,7 @@ function VariableRow({
4598
4780
  onCommitRename(draftName.trim());
4599
4781
  }
4600
4782
  };
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(
4783
+ return /* @__PURE__ */ React65.createElement(Stack, { spacing: 0.75, sx: { pb: 1, borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React65.createElement(Stack, { direction: "row", spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React65.createElement(
4602
4784
  TextField,
4603
4785
  {
4604
4786
  label: t("rename.name-label", "Name"),
@@ -4623,7 +4805,7 @@ function VariableRow({
4623
4805
  error: Boolean(nameError),
4624
4806
  helperText: nameError != null ? nameError : " "
4625
4807
  }
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(
4808
+ ), /* @__PURE__ */ React65.createElement(Stack, { direction: "row", spacing: 0.25, sx: { mt: 0.5 } }, /* @__PURE__ */ React65.createElement(Tooltip, { title: t("variables.copy-token", "Copy {{name}} token") }, /* @__PURE__ */ React65.createElement("span", null, /* @__PURE__ */ React65.createElement(
4627
4809
  IconButton,
4628
4810
  {
4629
4811
  size: "small",
@@ -4631,8 +4813,8 @@ function VariableRow({
4631
4813
  disabled: !hasName,
4632
4814
  "aria-label": t("variables.copy-token", "Copy {{name}} token")
4633
4815
  },
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(
4816
+ /* @__PURE__ */ React65.createElement(ContentCopyOutlined, { fontSize: "small" })
4817
+ ))), /* @__PURE__ */ React65.createElement(Tooltip, { title: canInsert ? t("variables.insert-at-cursor", "Insert at cursor") : t("variables.focus-first", "Focus a text field first") }, /* @__PURE__ */ React65.createElement("span", null, /* @__PURE__ */ React65.createElement(
4636
4818
  IconButton,
4637
4819
  {
4638
4820
  size: "small",
@@ -4640,16 +4822,16 @@ function VariableRow({
4640
4822
  disabled: !hasName || !canInsert,
4641
4823
  "aria-label": t("variables.insert-at-cursor", "Insert at cursor")
4642
4824
  },
4643
- /* @__PURE__ */ React62.createElement(InputOutlined, { fontSize: "small" })
4644
- ))), /* @__PURE__ */ React62.createElement(Tooltip, { title: t("variables.remove", "Remove") }, /* @__PURE__ */ React62.createElement(
4825
+ /* @__PURE__ */ React65.createElement(InputOutlined, { fontSize: "small" })
4826
+ ))), /* @__PURE__ */ React65.createElement(Tooltip, { title: t("variables.remove", "Remove") }, /* @__PURE__ */ React65.createElement(
4645
4827
  IconButton,
4646
4828
  {
4647
4829
  size: "small",
4648
4830
  onClick: onRemove,
4649
4831
  "aria-label": t("variables.remove", "Remove")
4650
4832
  },
4651
- /* @__PURE__ */ React62.createElement(DeleteOutline, { fontSize: "small" })
4652
- )))), /* @__PURE__ */ React62.createElement(
4833
+ /* @__PURE__ */ React65.createElement(DeleteOutline, { fontSize: "small" })
4834
+ )))), /* @__PURE__ */ React65.createElement(
4653
4835
  TextField,
4654
4836
  {
4655
4837
  label: t("variables.description", "Description"),
@@ -4659,7 +4841,7 @@ function VariableRow({
4659
4841
  onChange: (e) => onChangeDescription(e.target.value),
4660
4842
  placeholder: t("variables.optional", "Optional")
4661
4843
  }
4662
- ), /* @__PURE__ */ React62.createElement(
4844
+ ), /* @__PURE__ */ React65.createElement(
4663
4845
  TextField,
4664
4846
  {
4665
4847
  label: t("variables.sample-value", "Sample value"),
@@ -4669,7 +4851,7 @@ function VariableRow({
4669
4851
  onChange: (e) => onChangeSampleValue(e.target.value),
4670
4852
  placeholder: t("variables.sample-hint", "Shown in Preview mode"),
4671
4853
  InputProps: {
4672
- startAdornment: /* @__PURE__ */ React62.createElement(
4854
+ startAdornment: /* @__PURE__ */ React65.createElement(
4673
4855
  DataObjectOutlined,
4674
4856
  {
4675
4857
  fontSize: "small",
@@ -4678,7 +4860,7 @@ function VariableRow({
4678
4860
  )
4679
4861
  }
4680
4862
  }
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(
4863
+ ), /* @__PURE__ */ React65.createElement(Stack, { direction: "row", spacing: 0.5, sx: { pt: 0.25 } }, hasName && (unused ? /* @__PURE__ */ React65.createElement(Chip, { size: "small", color: "warning", variant: "outlined", label: t("variables.unused", "Unused in body") }) : /* @__PURE__ */ React65.createElement(
4682
4864
  Chip,
4683
4865
  {
4684
4866
  size: "small",
@@ -4703,13 +4885,13 @@ function InspectorDrawer({
4703
4885
  const renderCurrentSidebarPanel = () => {
4704
4886
  switch (selectedSidebarTab) {
4705
4887
  case "block-configuration":
4706
- return /* @__PURE__ */ React62.createElement(ConfigurationPanel, null);
4888
+ return /* @__PURE__ */ React65.createElement(ConfigurationPanel, null);
4707
4889
  case "styles":
4708
- return /* @__PURE__ */ React62.createElement(StylesPanel, null);
4890
+ return /* @__PURE__ */ React65.createElement(StylesPanel, null);
4709
4891
  case "variables":
4710
- return /* @__PURE__ */ React62.createElement(VariablesPanel, null);
4892
+ return /* @__PURE__ */ React65.createElement(VariablesPanel, null);
4711
4893
  case "template-settings":
4712
- return /* @__PURE__ */ React62.createElement(
4894
+ return /* @__PURE__ */ React65.createElement(
4713
4895
  TemplatePanel,
4714
4896
  {
4715
4897
  deleteTemplate,
@@ -4719,7 +4901,7 @@ function InspectorDrawer({
4719
4901
  );
4720
4902
  }
4721
4903
  };
4722
- return /* @__PURE__ */ React62.createElement(
4904
+ return /* @__PURE__ */ React65.createElement(
4723
4905
  Drawer,
4724
4906
  {
4725
4907
  variant: "persistent",
@@ -4741,7 +4923,7 @@ function InspectorDrawer({
4741
4923
  width: inspectorDrawerOpen ? INSPECTOR_DRAWER_WIDTH : 0
4742
4924
  }
4743
4925
  },
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(
4926
+ /* @__PURE__ */ React65.createElement(Box, { sx: { width: INSPECTOR_DRAWER_WIDTH, height: 49, borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React65.createElement(Box, { px: 1 }, /* @__PURE__ */ React65.createElement(
4745
4927
  Tabs,
4746
4928
  {
4747
4929
  value: selectedSidebarTab,
@@ -4749,12 +4931,12 @@ function InspectorDrawer({
4749
4931
  variant: "fullWidth",
4750
4932
  sx: { "& .MuiTab-root": { minWidth: 0, px: 1, fontSize: 13 } }
4751
4933
  },
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") })
4934
+ /* @__PURE__ */ React65.createElement(Tab, { value: "styles", label: t("inspector.tab.styles", "Styles") }),
4935
+ /* @__PURE__ */ React65.createElement(Tab, { value: "block-configuration", label: t("inspector.tab.inspect", "Inspect") }),
4936
+ /* @__PURE__ */ React65.createElement(Tab, { value: "variables", label: t("inspector.tab.variables", "Variables") }),
4937
+ /* @__PURE__ */ React65.createElement(Tab, { value: "template-settings", label: t("inspector.tab.settings", "Settings") })
4756
4938
  ))),
4757
- /* @__PURE__ */ React62.createElement(Box, { sx: { width: INSPECTOR_DRAWER_WIDTH, height: "calc(100% - 49px)", overflow: "auto" } }, renderCurrentSidebarPanel())
4939
+ /* @__PURE__ */ React65.createElement(Box, { sx: { width: INSPECTOR_DRAWER_WIDTH, height: "calc(100% - 49px)", overflow: "auto" } }, renderCurrentSidebarPanel())
4758
4940
  );
4759
4941
  }
4760
4942
  var SnackbarContext = createContext(null);
@@ -4775,7 +4957,7 @@ function SnackbarProvider({ children }) {
4775
4957
  const handleClose = () => {
4776
4958
  setMessage(null);
4777
4959
  };
4778
- return /* @__PURE__ */ React62.createElement(SnackbarContext.Provider, { value: { showMessage } }, children, /* @__PURE__ */ React62.createElement(
4960
+ return /* @__PURE__ */ React65.createElement(SnackbarContext.Provider, { value: { showMessage } }, children, /* @__PURE__ */ React65.createElement(
4779
4961
  Snackbar,
4780
4962
  {
4781
4963
  anchorOrigin: { vertical: "top", horizontal: "center" },
@@ -4852,7 +5034,7 @@ function TemplateRow({
4852
5034
  const hasActions = Boolean(
4853
5035
  onDuplicate || onRename || onDelete || onPromote || onDemote || onDuplicateAsTemplate
4854
5036
  );
4855
- return /* @__PURE__ */ React62.createElement(
5037
+ return /* @__PURE__ */ React65.createElement(
4856
5038
  Box,
4857
5039
  {
4858
5040
  role: "button",
@@ -4878,7 +5060,7 @@ function TemplateRow({
4878
5060
  "&:focus-visible": { outline: "2px solid", outlineColor: "primary.main" }
4879
5061
  }
4880
5062
  },
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(
5063
+ /* @__PURE__ */ React65.createElement(Stack, { direction: "row", alignItems: "flex-start", spacing: 1 }, /* @__PURE__ */ React65.createElement(Box, { sx: { flexGrow: 1, minWidth: 0, pr: hasActions ? 3 : 0 } }, /* @__PURE__ */ React65.createElement(Stack, { direction: "row", alignItems: "baseline", spacing: 1, sx: { minWidth: 0 } }, /* @__PURE__ */ React65.createElement(
4882
5064
  Typography,
4883
5065
  {
4884
5066
  variant: "body2",
@@ -4892,14 +5074,14 @@ function TemplateRow({
4892
5074
  title: template.slug
4893
5075
  },
4894
5076
  template.slug
4895
- ), updated && !hasActions && /* @__PURE__ */ React62.createElement(
5077
+ ), updated && !hasActions && /* @__PURE__ */ React65.createElement(
4896
5078
  Typography,
4897
5079
  {
4898
5080
  variant: "caption",
4899
5081
  sx: { color: "text.secondary", flexShrink: 0, fontSize: "0.7rem" }
4900
5082
  },
4901
5083
  updated
4902
- )), template.description && /* @__PURE__ */ React62.createElement(
5084
+ )), template.description && /* @__PURE__ */ React65.createElement(
4903
5085
  Typography,
4904
5086
  {
4905
5087
  variant: "caption",
@@ -4913,7 +5095,7 @@ function TemplateRow({
4913
5095
  }
4914
5096
  },
4915
5097
  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(
5098
+ ), template.tags && template.tags.length > 0 && /* @__PURE__ */ React65.createElement(Stack, { direction: "row", spacing: 0.5, sx: { mt: 0.5, flexWrap: "wrap", gap: 0.5 } }, template.tags.map((tag) => /* @__PURE__ */ React65.createElement(
4917
5099
  Chip,
4918
5100
  {
4919
5101
  key: tag,
@@ -4922,7 +5104,7 @@ function TemplateRow({
4922
5104
  sx: { height: 18, fontSize: "0.65rem", "& .MuiChip-label": { px: 0.75 } }
4923
5105
  }
4924
5106
  ))))),
4925
- hasActions && /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(Tooltip, { title: t("row.more", "More") }, /* @__PURE__ */ React62.createElement(
5107
+ hasActions && /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(Tooltip, { title: t("row.more", "More") }, /* @__PURE__ */ React65.createElement(
4926
5108
  IconButton,
4927
5109
  {
4928
5110
  size: "small",
@@ -4938,8 +5120,8 @@ function TemplateRow({
4938
5120
  transition: "opacity 120ms"
4939
5121
  }
4940
5122
  },
4941
- /* @__PURE__ */ React62.createElement(MoreVertOutlined, { fontSize: "small" })
4942
- )), /* @__PURE__ */ React62.createElement(
5123
+ /* @__PURE__ */ React65.createElement(MoreVertOutlined, { fontSize: "small" })
5124
+ )), /* @__PURE__ */ React65.createElement(
4943
5125
  Menu,
4944
5126
  {
4945
5127
  anchorEl: menuAnchor,
@@ -4950,14 +5132,14 @@ function TemplateRow({
4950
5132
  transformOrigin: { vertical: "top", horizontal: "right" },
4951
5133
  slotProps: { paper: { sx: { minWidth: 200 } } }
4952
5134
  },
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"))),
5135
+ onRename && /* @__PURE__ */ React65.createElement(MenuItem, { onClick: runAction(onRename) }, /* @__PURE__ */ React65.createElement(ListItemIcon, null, /* @__PURE__ */ React65.createElement(DriveFileRenameOutlineOutlined, { fontSize: "small" })), /* @__PURE__ */ React65.createElement(ListItemText, null, t("row.edit-details", "Edit name & tags\u2026"))),
5136
+ onDuplicate && /* @__PURE__ */ React65.createElement(MenuItem, { onClick: runAction(onDuplicate) }, /* @__PURE__ */ React65.createElement(ListItemIcon, null, /* @__PURE__ */ React65.createElement(ContentCopyOutlined, { fontSize: "small" })), /* @__PURE__ */ React65.createElement(ListItemText, null, t("row.duplicate", "Duplicate"))),
5137
+ onDuplicateAsTemplate && /* @__PURE__ */ React65.createElement(MenuItem, { onClick: runAction(onDuplicateAsTemplate) }, /* @__PURE__ */ React65.createElement(ListItemIcon, null, /* @__PURE__ */ React65.createElement(LibraryAddOutlined, { fontSize: "small" })), /* @__PURE__ */ React65.createElement(ListItemText, null, t("row.duplicate-as-template", "Duplicate as template"))),
5138
+ onPromote && /* @__PURE__ */ React65.createElement(MenuItem, { onClick: runAction(onPromote) }, /* @__PURE__ */ React65.createElement(ListItemIcon, null, /* @__PURE__ */ React65.createElement(FileUploadOutlined, { fontSize: "small" })), /* @__PURE__ */ React65.createElement(ListItemText, null, t("row.promote", "Promote to sample"))),
5139
+ onDemote && /* @__PURE__ */ React65.createElement(MenuItem, { onClick: runAction(onDemote) }, /* @__PURE__ */ React65.createElement(ListItemIcon, null, /* @__PURE__ */ React65.createElement(FileDownloadOutlined, { fontSize: "small" })), /* @__PURE__ */ React65.createElement(ListItemText, null, t("row.demote", "Demote to template"))),
4958
5140
  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")))
5141
+ /* @__PURE__ */ React65.createElement(Divider$1, { key: "divider" }),
5142
+ /* @__PURE__ */ React65.createElement(MenuItem, { key: "delete", onClick: runAction(onDelete), sx: { color: "error.main" } }, /* @__PURE__ */ React65.createElement(ListItemIcon, { sx: { color: "error.main" } }, /* @__PURE__ */ React65.createElement(DeleteOutlined, { fontSize: "small" })), /* @__PURE__ */ React65.createElement(ListItemText, null, t("tune.delete", "Delete")))
4961
5143
  ]
4962
5144
  ))
4963
5145
  );
@@ -5072,31 +5254,31 @@ var PREVIEW_MAX = 36;
5072
5254
  function iconForType(type) {
5073
5255
  switch (type) {
5074
5256
  case "EmailLayout":
5075
- return /* @__PURE__ */ React62.createElement(DashboardOutlined, { fontSize: "small" });
5257
+ return /* @__PURE__ */ React65.createElement(DashboardOutlined, { fontSize: "small" });
5076
5258
  case "Heading":
5077
- return /* @__PURE__ */ React62.createElement(HMobiledataOutlined, { fontSize: "small" });
5259
+ return /* @__PURE__ */ React65.createElement(HMobiledataOutlined, { fontSize: "small" });
5078
5260
  case "Text":
5079
- return /* @__PURE__ */ React62.createElement(NotesOutlined, { fontSize: "small" });
5261
+ return /* @__PURE__ */ React65.createElement(NotesOutlined, { fontSize: "small" });
5080
5262
  case "Button":
5081
- return /* @__PURE__ */ React62.createElement(SmartButtonOutlined, { fontSize: "small" });
5263
+ return /* @__PURE__ */ React65.createElement(SmartButtonOutlined, { fontSize: "small" });
5082
5264
  case "Image":
5083
- return /* @__PURE__ */ React62.createElement(ImageOutlined, { fontSize: "small" });
5265
+ return /* @__PURE__ */ React65.createElement(ImageOutlined, { fontSize: "small" });
5084
5266
  case "Avatar":
5085
- return /* @__PURE__ */ React62.createElement(AccountCircleOutlined, { fontSize: "small" });
5267
+ return /* @__PURE__ */ React65.createElement(AccountCircleOutlined, { fontSize: "small" });
5086
5268
  case "Signature":
5087
- return /* @__PURE__ */ React62.createElement(ContactMailOutlined, { fontSize: "small" });
5269
+ return /* @__PURE__ */ React65.createElement(ContactMailOutlined, { fontSize: "small" });
5088
5270
  case "Divider":
5089
- return /* @__PURE__ */ React62.createElement(HorizontalRuleOutlined, { fontSize: "small" });
5271
+ return /* @__PURE__ */ React65.createElement(HorizontalRuleOutlined, { fontSize: "small" });
5090
5272
  case "Spacer":
5091
- return /* @__PURE__ */ React62.createElement(Crop32Outlined, { fontSize: "small" });
5273
+ return /* @__PURE__ */ React65.createElement(Crop32Outlined, { fontSize: "small" });
5092
5274
  case "Html":
5093
- return /* @__PURE__ */ React62.createElement(HtmlOutlined, { fontSize: "small" });
5275
+ return /* @__PURE__ */ React65.createElement(HtmlOutlined, { fontSize: "small" });
5094
5276
  case "Container":
5095
- return /* @__PURE__ */ React62.createElement(LibraryAddOutlined, { fontSize: "small" });
5277
+ return /* @__PURE__ */ React65.createElement(LibraryAddOutlined, { fontSize: "small" });
5096
5278
  case "ColumnsContainer":
5097
- return /* @__PURE__ */ React62.createElement(ViewColumnOutlined, { fontSize: "small" });
5279
+ return /* @__PURE__ */ React65.createElement(ViewColumnOutlined, { fontSize: "small" });
5098
5280
  default:
5099
- return /* @__PURE__ */ React62.createElement(BusinessOutlined, { fontSize: "small" });
5281
+ return /* @__PURE__ */ React65.createElement(BusinessOutlined, { fontSize: "small" });
5100
5282
  }
5101
5283
  }
5102
5284
  function previewText(text) {
@@ -5174,7 +5356,7 @@ function buildNode(id, doc, ctx) {
5174
5356
  id: `${id}::col${colIdx}`,
5175
5357
  label: `Column ${colIdx + 1}`,
5176
5358
  preview: colChildren.length === 1 ? "1 child" : `${colChildren.length} children`,
5177
- icon: /* @__PURE__ */ React62.createElement(ViewColumnSharp, { fontSize: "small", sx: { opacity: 0.6 } }),
5359
+ icon: /* @__PURE__ */ React65.createElement(ViewColumnSharp, { fontSize: "small", sx: { opacity: 0.6 } }),
5178
5360
  children: colChildren,
5179
5361
  containerChildrenRef: parentForCol
5180
5362
  });
@@ -5236,7 +5418,7 @@ function OutlinePanel() {
5236
5418
  setSelectedBlockId(payload.sourceId);
5237
5419
  }
5238
5420
  };
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(
5421
+ return /* @__PURE__ */ React65.createElement(Box, null, /* @__PURE__ */ React65.createElement(Typography, { variant: "subtitle2", component: "h2", sx: { fontWeight: "bold", mb: 0.5, px: 0.5 } }, t("outline.title", "Outline")), /* @__PURE__ */ React65.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__ */ React65.createElement(
5240
5422
  OutlineRow,
5241
5423
  {
5242
5424
  node: tree,
@@ -5247,7 +5429,7 @@ function OutlinePanel() {
5247
5429
  setDragging,
5248
5430
  performMove
5249
5431
  }
5250
- ) : /* @__PURE__ */ React62.createElement(Typography, { variant: "body2", sx: { color: "text.secondary", px: 0.5 } }, "Nothing to outline."));
5432
+ ) : /* @__PURE__ */ React65.createElement(Typography, { variant: "body2", sx: { color: "text.secondary", px: 0.5 } }, "Nothing to outline."));
5251
5433
  }
5252
5434
  function OutlineRow({
5253
5435
  node,
@@ -5333,7 +5515,7 @@ function OutlineRow({
5333
5515
  const patch = buildMovePatch(document2, node.id, node.parent, node.parent, nextIndex + (delta > 0 ? 1 : 0));
5334
5516
  if (patch) setDocument(patch);
5335
5517
  };
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(
5518
+ return /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(Box, { sx: { position: "relative" } }, dropPos === "before" && /* @__PURE__ */ React65.createElement(DropLine, { depth }), /* @__PURE__ */ React65.createElement(
5337
5519
  Stack,
5338
5520
  {
5339
5521
  direction: "row",
@@ -5366,7 +5548,7 @@ function OutlineRow({
5366
5548
  userSelect: "none"
5367
5549
  }
5368
5550
  },
5369
- hasChildren ? /* @__PURE__ */ React62.createElement(
5551
+ hasChildren ? /* @__PURE__ */ React65.createElement(
5370
5552
  Box,
5371
5553
  {
5372
5554
  role: "button",
@@ -5377,9 +5559,9 @@ function OutlineRow({
5377
5559
  },
5378
5560
  sx: { display: "flex", alignItems: "center", cursor: "pointer" }
5379
5561
  },
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(
5562
+ expanded ? /* @__PURE__ */ React65.createElement(ExpandMore, { fontSize: "small" }) : /* @__PURE__ */ React65.createElement(ChevronRight, { fontSize: "small" })
5563
+ ) : /* @__PURE__ */ React65.createElement(Box, { sx: { width: 20 } }),
5564
+ /* @__PURE__ */ React65.createElement(
5383
5565
  Box,
5384
5566
  {
5385
5567
  sx: {
@@ -5391,7 +5573,7 @@ function OutlineRow({
5391
5573
  },
5392
5574
  node.icon
5393
5575
  ),
5394
- /* @__PURE__ */ React62.createElement(
5576
+ /* @__PURE__ */ React65.createElement(
5395
5577
  Typography,
5396
5578
  {
5397
5579
  variant: "body2",
@@ -5403,7 +5585,7 @@ function OutlineRow({
5403
5585
  },
5404
5586
  node.label
5405
5587
  ),
5406
- node.preview && /* @__PURE__ */ React62.createElement(
5588
+ node.preview && /* @__PURE__ */ React65.createElement(
5407
5589
  Typography,
5408
5590
  {
5409
5591
  variant: "body2",
@@ -5419,7 +5601,7 @@ function OutlineRow({
5419
5601
  "\u2014 ",
5420
5602
  node.preview
5421
5603
  ),
5422
- canMove && /* @__PURE__ */ React62.createElement(
5604
+ canMove && /* @__PURE__ */ React65.createElement(
5423
5605
  Box,
5424
5606
  {
5425
5607
  className: "outline-move-btns",
@@ -5430,7 +5612,7 @@ function OutlineRow({
5430
5612
  transition: "opacity 120ms"
5431
5613
  }
5432
5614
  },
5433
- /* @__PURE__ */ React62.createElement(Tooltip, { title: "Move up" }, /* @__PURE__ */ React62.createElement("span", null, /* @__PURE__ */ React62.createElement(
5615
+ /* @__PURE__ */ React65.createElement(Tooltip, { title: "Move up" }, /* @__PURE__ */ React65.createElement("span", null, /* @__PURE__ */ React65.createElement(
5434
5616
  IconButton,
5435
5617
  {
5436
5618
  size: "small",
@@ -5442,9 +5624,9 @@ function OutlineRow({
5442
5624
  "aria-label": `Move ${node.label} up`,
5443
5625
  sx: { p: 0.25 }
5444
5626
  },
5445
- /* @__PURE__ */ React62.createElement(KeyboardArrowUp, { fontSize: "small" })
5627
+ /* @__PURE__ */ React65.createElement(KeyboardArrowUp, { fontSize: "small" })
5446
5628
  ))),
5447
- /* @__PURE__ */ React62.createElement(Tooltip, { title: "Move down" }, /* @__PURE__ */ React62.createElement("span", null, /* @__PURE__ */ React62.createElement(
5629
+ /* @__PURE__ */ React65.createElement(Tooltip, { title: "Move down" }, /* @__PURE__ */ React65.createElement("span", null, /* @__PURE__ */ React65.createElement(
5448
5630
  IconButton,
5449
5631
  {
5450
5632
  size: "small",
@@ -5456,10 +5638,10 @@ function OutlineRow({
5456
5638
  "aria-label": `Move ${node.label} down`,
5457
5639
  sx: { p: 0.25 }
5458
5640
  },
5459
- /* @__PURE__ */ React62.createElement(KeyboardArrowDown, { fontSize: "small" })
5641
+ /* @__PURE__ */ React65.createElement(KeyboardArrowDown, { fontSize: "small" })
5460
5642
  )))
5461
5643
  )
5462
- ), dropPos === "after" && /* @__PURE__ */ React62.createElement(DropLine, { depth })), hasChildren && expanded && /* @__PURE__ */ React62.createElement(Box, null, node.children.map((child) => /* @__PURE__ */ React62.createElement(
5644
+ ), dropPos === "after" && /* @__PURE__ */ React65.createElement(DropLine, { depth })), hasChildren && expanded && /* @__PURE__ */ React65.createElement(Box, null, node.children.map((child) => /* @__PURE__ */ React65.createElement(
5463
5645
  OutlineRow,
5464
5646
  {
5465
5647
  key: child.id,
@@ -5474,7 +5656,7 @@ function OutlineRow({
5474
5656
  ))));
5475
5657
  }
5476
5658
  function DropLine({ depth }) {
5477
- return /* @__PURE__ */ React62.createElement(
5659
+ return /* @__PURE__ */ React65.createElement(
5478
5660
  Box,
5479
5661
  {
5480
5662
  sx: {
@@ -5482,7 +5664,7 @@ function DropLine({ depth }) {
5482
5664
  height: 0
5483
5665
  }
5484
5666
  },
5485
- /* @__PURE__ */ React62.createElement(
5667
+ /* @__PURE__ */ React65.createElement(
5486
5668
  Box,
5487
5669
  {
5488
5670
  sx: {
@@ -5543,7 +5725,7 @@ function NewTemplatePickerDialog({
5543
5725
  }
5544
5726
  });
5545
5727
  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(
5728
+ return /* @__PURE__ */ React65.createElement(Dialog, { open, onClose: busy ? void 0 : onClose, maxWidth: "sm", fullWidth: true }, /* @__PURE__ */ React65.createElement(DialogTitle, null, kind === "sample" ? t("picker.title-sample", "New sample") : t("picker.title-template", "New template")), /* @__PURE__ */ React65.createElement(DialogContent, { dividers: true }, /* @__PURE__ */ React65.createElement(Typography, { variant: "subtitle2", sx: { mb: 1 } }, t("picker.start-from", "Start from")), /* @__PURE__ */ React65.createElement(
5547
5729
  List,
5548
5730
  {
5549
5731
  dense: true,
@@ -5557,24 +5739,24 @@ function NewTemplatePickerDialog({
5557
5739
  overflowY: "auto"
5558
5740
  }
5559
5741
  },
5560
- /* @__PURE__ */ React62.createElement(
5742
+ /* @__PURE__ */ React65.createElement(
5561
5743
  ListItemButton,
5562
5744
  {
5563
5745
  selected: selectedStarter === null,
5564
5746
  onClick: () => setSelectedStarter(null)
5565
5747
  },
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") }))
5748
+ /* @__PURE__ */ React65.createElement(Box, { sx: { display: "flex", alignItems: "center", gap: 1.5, flex: 1 } }, /* @__PURE__ */ React65.createElement(InsertDriveFileOutlined, { fontSize: "small", sx: { color: "text.secondary" } }), /* @__PURE__ */ React65.createElement(ListItemText, { primary: t("picker.blank-title", "Blank"), secondary: t("picker.blank-desc", "Start from an empty email") }))
5567
5749
  ),
5568
- pickable.map((s) => /* @__PURE__ */ React62.createElement(
5750
+ pickable.map((s) => /* @__PURE__ */ React65.createElement(
5569
5751
  ListItemButton,
5570
5752
  {
5571
5753
  key: s.id,
5572
5754
  selected: selectedStarter === s.id,
5573
5755
  onClick: () => setSelectedStarter(s.id)
5574
5756
  },
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 }))
5757
+ /* @__PURE__ */ React65.createElement(Box, { sx: { display: "flex", alignItems: "center", gap: 1.5, flex: 1 } }, /* @__PURE__ */ React65.createElement(DescriptionOutlined, { fontSize: "small", sx: { color: "text.secondary" } }), /* @__PURE__ */ React65.createElement(ListItemText, { primary: s.slug, secondary: s.description }))
5576
5758
  ))
5577
- ), /* @__PURE__ */ React62.createElement(
5759
+ ), /* @__PURE__ */ React65.createElement(
5578
5760
  TextField,
5579
5761
  {
5580
5762
  autoFocus: true,
@@ -5594,7 +5776,7 @@ function NewTemplatePickerDialog({
5594
5776
  helperText: error != null ? error : " ",
5595
5777
  disabled: busy
5596
5778
  }
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"))));
5779
+ )), /* @__PURE__ */ React65.createElement(DialogActions, null, /* @__PURE__ */ React65.createElement(Button$1, { onClick: onClose, disabled: busy }, t("common.cancel", "Cancel")), /* @__PURE__ */ React65.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
5780
  }
5599
5781
  function RenameDialog({
5600
5782
  open,
@@ -5656,7 +5838,7 @@ function RenameDialog({
5656
5838
  setSubmitting(false);
5657
5839
  }
5658
5840
  });
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(
5841
+ return /* @__PURE__ */ React65.createElement(Dialog, { open, onClose: submitting ? void 0 : onClose, maxWidth: "sm", fullWidth: true }, /* @__PURE__ */ React65.createElement(DialogTitle, null, t("rename.title", "Edit details")), /* @__PURE__ */ React65.createElement(DialogContent, null, /* @__PURE__ */ React65.createElement(
5660
5842
  TextField,
5661
5843
  {
5662
5844
  autoFocus: true,
@@ -5676,7 +5858,7 @@ function RenameDialog({
5676
5858
  if (e.key === "Enter" && !submitting) handleSubmit();
5677
5859
  }
5678
5860
  }
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(
5861
+ ), /* @__PURE__ */ React65.createElement(Typography, { variant: "caption", sx: { color: "text.secondary", display: "block", mt: 1, mb: 0.5 } }, t("rename.tags", "Tags")), tags.length > 0 ? /* @__PURE__ */ React65.createElement(Stack, { direction: "row", spacing: 0.5, sx: { flexWrap: "wrap", gap: 0.5, mb: 1 } }, tags.map((tag) => /* @__PURE__ */ React65.createElement(
5680
5862
  Chip,
5681
5863
  {
5682
5864
  key: tag,
@@ -5684,7 +5866,7 @@ function RenameDialog({
5684
5866
  size: "small",
5685
5867
  onDelete: submitting ? void 0 : () => removeTag(tag)
5686
5868
  }
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(
5869
+ ))) : /* @__PURE__ */ React65.createElement(Typography, { variant: "caption", sx: { color: "text.disabled", display: "block", mb: 1 } }, t("rename.no-tags", "No tags yet.")), /* @__PURE__ */ React65.createElement(
5688
5870
  TextField,
5689
5871
  {
5690
5872
  size: "small",
@@ -5703,20 +5885,20 @@ function RenameDialog({
5703
5885
  }
5704
5886
  },
5705
5887
  InputProps: {
5706
- endAdornment: /* @__PURE__ */ React62.createElement(InputAdornment, { position: "end" }, /* @__PURE__ */ React62.createElement(
5888
+ endAdornment: /* @__PURE__ */ React65.createElement(InputAdornment, { position: "end" }, /* @__PURE__ */ React65.createElement(
5707
5889
  Button$1,
5708
5890
  {
5709
5891
  size: "small",
5710
5892
  onClick: addTag,
5711
5893
  disabled: !tagInput.trim() || submitting,
5712
- startIcon: /* @__PURE__ */ React62.createElement(AddOutlined, { fontSize: "small" }),
5894
+ startIcon: /* @__PURE__ */ React65.createElement(AddOutlined, { fontSize: "small" }),
5713
5895
  sx: { textTransform: "none" }
5714
5896
  },
5715
5897
  t("common.add", "Add")
5716
5898
  ))
5717
5899
  }
5718
5900
  }
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(
5901
+ ), /* @__PURE__ */ React65.createElement(Box, { sx: { minHeight: 8 } })), /* @__PURE__ */ React65.createElement(DialogActions, null, /* @__PURE__ */ React65.createElement(Button$1, { onClick: onClose, disabled: submitting }, t("common.cancel", "Cancel")), /* @__PURE__ */ React65.createElement(
5720
5902
  Button$1,
5721
5903
  {
5722
5904
  onClick: handleSubmit,
@@ -5786,7 +5968,7 @@ function SaveTemplateDialog({
5786
5968
  setInternalError("");
5787
5969
  onClose();
5788
5970
  };
5789
- return /* @__PURE__ */ React62.createElement(
5971
+ return /* @__PURE__ */ React65.createElement(
5790
5972
  Dialog,
5791
5973
  {
5792
5974
  open,
@@ -5794,8 +5976,8 @@ function SaveTemplateDialog({
5794
5976
  maxWidth: "sm",
5795
5977
  fullWidth: true
5796
5978
  },
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(
5979
+ /* @__PURE__ */ React65.createElement(DialogTitle, null, mode === "new" ? t("save-dialog.title-new", "Create a new template") : t("save-dialog.title", "Save as a new template")),
5980
+ /* @__PURE__ */ React65.createElement(DialogContent, null, /* @__PURE__ */ React65.createElement(Box, { sx: { pt: 1 } }, /* @__PURE__ */ React65.createElement(
5799
5981
  TextField,
5800
5982
  {
5801
5983
  autoFocus: true,
@@ -5818,7 +6000,7 @@ function SaveTemplateDialog({
5818
6000
  disabled: isSubmitting
5819
6001
  }
5820
6002
  ))),
5821
- /* @__PURE__ */ React62.createElement(DialogActions, null, /* @__PURE__ */ React62.createElement(Button$1, { onClick: handleCancel, disabled: isSubmitting }, t("common.cancel", "Cancel")), /* @__PURE__ */ React62.createElement(
6003
+ /* @__PURE__ */ React65.createElement(DialogActions, null, /* @__PURE__ */ React65.createElement(Button$1, { onClick: handleCancel, disabled: isSubmitting }, t("common.cancel", "Cancel")), /* @__PURE__ */ React65.createElement(
5822
6004
  Button$1,
5823
6005
  {
5824
6006
  onClick: handleSave,
@@ -6139,7 +6321,7 @@ function SamplesDrawer({
6139
6321
  return null;
6140
6322
  }
6141
6323
  const existingSlugs = templates.map((t2) => t2.slug);
6142
- return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
6324
+ return /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(
6143
6325
  Drawer,
6144
6326
  {
6145
6327
  variant: "persistent",
@@ -6154,7 +6336,7 @@ function SamplesDrawer({
6154
6336
  transitionDuration: { enter: enterDuration, exit: exitDuration },
6155
6337
  sx: { width: samplesDrawerOpen ? SAMPLES_DRAWER_WIDTH : 0 }
6156
6338
  },
6157
- /* @__PURE__ */ React62.createElement(
6339
+ /* @__PURE__ */ React65.createElement(
6158
6340
  Stack,
6159
6341
  {
6160
6342
  py: 1,
@@ -6164,16 +6346,16 @@ function SamplesDrawer({
6164
6346
  spacing: 1.5,
6165
6347
  sx: { overflowY: "auto" }
6166
6348
  },
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(
6349
+ /* @__PURE__ */ React65.createElement(Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", sx: { pt: 1 } }, /* @__PURE__ */ React65.createElement(Typography, { variant: "h6", component: "h1" }, /* @__PURE__ */ React65.createElement(Trans, { id: "drawer.library" }, "Library")), saveAs && (activeLeftTab === "templates" || activeLeftTab === "samples") && /* @__PURE__ */ React65.createElement(Tooltip, { title: activeLeftTab === "samples" ? t("drawer.new-sample", "New sample") : t("drawer.new-template", "New template") }, /* @__PURE__ */ React65.createElement(
6168
6350
  IconButton,
6169
6351
  {
6170
6352
  size: "small",
6171
6353
  onClick: () => openNewPicker(activeLeftTab === "samples" ? "sample" : "template"),
6172
6354
  "aria-label": activeLeftTab === "samples" ? t("drawer.new-sample", "New sample") : t("drawer.new-template", "New template")
6173
6355
  },
6174
- /* @__PURE__ */ React62.createElement(AddOutlined, { fontSize: "small" })
6356
+ /* @__PURE__ */ React65.createElement(AddOutlined, { fontSize: "small" })
6175
6357
  ))),
6176
- /* @__PURE__ */ React62.createElement(
6358
+ /* @__PURE__ */ React65.createElement(
6177
6359
  Tabs,
6178
6360
  {
6179
6361
  value: activeLeftTab,
@@ -6181,11 +6363,11 @@ function SamplesDrawer({
6181
6363
  variant: "fullWidth",
6182
6364
  sx: { minHeight: 36, "& .MuiTab-root": { minHeight: 36, minWidth: 0, px: 1, fontSize: 13 } }
6183
6365
  },
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") })
6366
+ /* @__PURE__ */ React65.createElement(Tab, { value: "templates", label: t("drawer.tab.templates", "Templates"), disabled: !loadTemplates }),
6367
+ /* @__PURE__ */ React65.createElement(Tab, { value: "samples", label: t("drawer.tab.samples", "Samples") }),
6368
+ /* @__PURE__ */ React65.createElement(Tab, { value: "outline", label: t("drawer.tab.outline", "Outline") })
6187
6369
  ),
6188
- activeLeftTab === "outline" ? /* @__PURE__ */ React62.createElement(OutlinePanel, null) : /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
6370
+ activeLeftTab === "outline" ? /* @__PURE__ */ React65.createElement(OutlinePanel, null) : /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(
6189
6371
  TextField,
6190
6372
  {
6191
6373
  size: "small",
@@ -6193,10 +6375,10 @@ function SamplesDrawer({
6193
6375
  value: search,
6194
6376
  onChange: (e) => setSearch(e.target.value),
6195
6377
  InputProps: {
6196
- startAdornment: /* @__PURE__ */ React62.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React62.createElement(SearchOutlined, { fontSize: "small" }))
6378
+ startAdornment: /* @__PURE__ */ React65.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React65.createElement(SearchOutlined, { fontSize: "small" }))
6197
6379
  }
6198
6380
  }
6199
- ), /* @__PURE__ */ React62.createElement(
6381
+ ), /* @__PURE__ */ React65.createElement(
6200
6382
  TextField,
6201
6383
  {
6202
6384
  select: true,
@@ -6205,8 +6387,8 @@ function SamplesDrawer({
6205
6387
  value: sortKey,
6206
6388
  onChange: (e) => setSortKey(e.target.value)
6207
6389
  },
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(
6390
+ SORT_OPTIONS.map((opt) => /* @__PURE__ */ React65.createElement(MenuItem, { key: opt.value, value: opt.value }, t(opt.labelKey, opt.fallback)))
6391
+ ), allTags.length > 0 && /* @__PURE__ */ React65.createElement(Stack, { direction: "row", sx: { flexWrap: "wrap", gap: 0.5 } }, /* @__PURE__ */ React65.createElement(
6210
6392
  Chip,
6211
6393
  {
6212
6394
  label: t("drawer.tag.all", "All"),
@@ -6216,7 +6398,7 @@ function SamplesDrawer({
6216
6398
  variant: activeTags.length === 0 ? "filled" : "outlined",
6217
6399
  onClick: () => setActiveTags([])
6218
6400
  }
6219
- ), allTags.map((tag) => /* @__PURE__ */ React62.createElement(
6401
+ ), allTags.map((tag) => /* @__PURE__ */ React65.createElement(
6220
6402
  Chip,
6221
6403
  {
6222
6404
  key: tag,
@@ -6227,7 +6409,7 @@ function SamplesDrawer({
6227
6409
  variant: activeTags.includes(tag) ? "filled" : "outlined",
6228
6410
  onClick: () => toggleTag(tag)
6229
6411
  }
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(
6412
+ ))), activeLeftTab === "templates" ? /* @__PURE__ */ React65.createElement(Box, null, loadingTemplates ? /* @__PURE__ */ React65.createElement(Stack, { alignItems: "center", width: "100%", py: 2 }, /* @__PURE__ */ React65.createElement(CircularProgress, { size: 24 })) : templatesError ? /* @__PURE__ */ React65.createElement(Alert, { severity: "error", sx: { my: 1 } }, templatesError) : filteredTemplates.length > 0 ? /* @__PURE__ */ React65.createElement(Stack, { spacing: 0.25, sx: { width: "100%" } }, filteredTemplates.map((template) => /* @__PURE__ */ React65.createElement(
6231
6413
  TemplateRow,
6232
6414
  {
6233
6415
  key: template.id,
@@ -6239,7 +6421,7 @@ function SamplesDrawer({
6239
6421
  onDelete: deleteTemplate ? () => handleDelete(template) : void 0,
6240
6422
  onPromote: setTemplateKind ? () => handleSetKind(template, "sample") : void 0
6241
6423
  }
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(
6424
+ ))) : /* @__PURE__ */ React65.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__ */ React65.createElement(Box, null, loadingSamples ? /* @__PURE__ */ React65.createElement(Stack, { alignItems: "center", width: "100%", py: 2 }, /* @__PURE__ */ React65.createElement(CircularProgress, { size: 24 })) : filteredSamples.length > 0 ? /* @__PURE__ */ React65.createElement(Stack, { spacing: 0.25, sx: { width: "100%" } }, filteredSamples.map((sample) => /* @__PURE__ */ React65.createElement(
6243
6425
  TemplateRow,
6244
6426
  {
6245
6427
  key: sample.id,
@@ -6251,9 +6433,9 @@ function SamplesDrawer({
6251
6433
  onDelete: deleteTemplate ? () => handleDelete(sample) : void 0,
6252
6434
  onDemote: setTemplateKind ? () => handleSetKind(sample, "template") : void 0
6253
6435
  }
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"))))
6436
+ ))) : /* @__PURE__ */ React65.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
6437
  )
6256
- ), renameTarget && /* @__PURE__ */ React62.createElement(
6438
+ ), renameTarget && /* @__PURE__ */ React65.createElement(
6257
6439
  RenameDialog,
6258
6440
  {
6259
6441
  open: !!renameTarget,
@@ -6263,7 +6445,7 @@ function SamplesDrawer({
6263
6445
  onClose: () => setRenameTarget(null),
6264
6446
  onSubmit: handleRenameSubmit
6265
6447
  }
6266
- ), /* @__PURE__ */ React62.createElement(
6448
+ ), /* @__PURE__ */ React65.createElement(
6267
6449
  SaveTemplateDialog,
6268
6450
  {
6269
6451
  open: !!pendingSaveAs,
@@ -6276,7 +6458,7 @@ function SamplesDrawer({
6276
6458
  defaultName: (_b = pendingSaveAs == null ? void 0 : pendingSaveAs.defaultName) != null ? _b : "New Template",
6277
6459
  error: newError
6278
6460
  }
6279
- ), /* @__PURE__ */ React62.createElement(
6461
+ ), /* @__PURE__ */ React65.createElement(
6280
6462
  NewTemplatePickerDialog,
6281
6463
  {
6282
6464
  open: pickerKind !== null,
@@ -6288,6 +6470,66 @@ function SamplesDrawer({
6288
6470
  }
6289
6471
  ));
6290
6472
  }
6473
+
6474
+ // src/editor/blocks/helpers/block-utils.ts
6475
+ function generateId() {
6476
+ return `block-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`;
6477
+ }
6478
+ function rekeyBlocks(blocks, rootBlockId) {
6479
+ var _a, _b, _c;
6480
+ const idMap = {};
6481
+ for (const oldId of Object.keys(blocks)) {
6482
+ idMap[oldId] = generateId();
6483
+ }
6484
+ const remapIds = (ids) => ids == null ? void 0 : ids.map((id) => {
6485
+ var _a2;
6486
+ return (_a2 = idMap[id]) != null ? _a2 : id;
6487
+ });
6488
+ const newBlocks = {};
6489
+ for (const [oldId, block] of Object.entries(blocks)) {
6490
+ const b = block;
6491
+ const newId = idMap[oldId];
6492
+ if (b.type === "Container") {
6493
+ newBlocks[newId] = __spreadProps(__spreadValues({}, b), {
6494
+ data: __spreadProps(__spreadValues({}, b.data), {
6495
+ props: __spreadProps(__spreadValues({}, b.data.props), { childrenIds: remapIds((_a = b.data.props) == null ? void 0 : _a.childrenIds) })
6496
+ })
6497
+ });
6498
+ } else if (b.type === "ColumnsContainer") {
6499
+ newBlocks[newId] = __spreadProps(__spreadValues({}, b), {
6500
+ data: __spreadProps(__spreadValues({}, b.data), {
6501
+ props: __spreadProps(__spreadValues({}, b.data.props), {
6502
+ columns: (_c = (_b = b.data.props) == null ? void 0 : _b.columns) == null ? void 0 : _c.map((c) => __spreadProps(__spreadValues({}, c), {
6503
+ childrenIds: remapIds(c.childrenIds)
6504
+ }))
6505
+ })
6506
+ })
6507
+ });
6508
+ } else {
6509
+ newBlocks[newId] = b;
6510
+ }
6511
+ }
6512
+ return { blocks: newBlocks, newRootId: idMap[rootBlockId] };
6513
+ }
6514
+ function collectBlock(blockId, document2) {
6515
+ var _a, _b, _c, _d, _e;
6516
+ const block = document2[blockId];
6517
+ if (!block) return {};
6518
+ const result = { [blockId]: block };
6519
+ if (block.type === "Container") {
6520
+ for (const childId of (_b = (_a = block.data.props) == null ? void 0 : _a.childrenIds) != null ? _b : []) {
6521
+ Object.assign(result, collectBlock(childId, document2));
6522
+ }
6523
+ }
6524
+ if (block.type === "ColumnsContainer") {
6525
+ for (const col of (_d = (_c = block.data.props) == null ? void 0 : _c.columns) != null ? _d : []) {
6526
+ for (const childId of (_e = col.childrenIds) != null ? _e : []) {
6527
+ Object.assign(result, collectBlock(childId, document2));
6528
+ }
6529
+ }
6530
+ }
6531
+ return result;
6532
+ }
6291
6533
  var BUTTON_SX2 = { p: 1.5, display: "flex", flexDirection: "column" };
6292
6534
  var ICON_SX = {
6293
6535
  mb: 0.75,
@@ -6300,7 +6542,7 @@ var ICON_SX = {
6300
6542
  borderColor: "cadet.300"
6301
6543
  };
6302
6544
  function BlockTypeButton({ label, icon, onClick }) {
6303
- return /* @__PURE__ */ React62.createElement(
6545
+ return /* @__PURE__ */ React65.createElement(
6304
6546
  Button$1,
6305
6547
  {
6306
6548
  sx: BUTTON_SX2,
@@ -6309,14 +6551,14 @@ function BlockTypeButton({ label, icon, onClick }) {
6309
6551
  onClick();
6310
6552
  }
6311
6553
  },
6312
- /* @__PURE__ */ React62.createElement(Box, { sx: ICON_SX }, icon),
6313
- /* @__PURE__ */ React62.createElement(Typography, { variant: "body2" }, label)
6554
+ /* @__PURE__ */ React65.createElement(Box, { sx: ICON_SX }, icon),
6555
+ /* @__PURE__ */ React65.createElement(Typography, { variant: "body2" }, label)
6314
6556
  );
6315
6557
  }
6316
6558
  var BUTTONS = [
6317
6559
  {
6318
6560
  label: "Heading",
6319
- icon: /* @__PURE__ */ React62.createElement(HMobiledataOutlined, null),
6561
+ icon: /* @__PURE__ */ React65.createElement(HMobiledataOutlined, null),
6320
6562
  block: () => ({
6321
6563
  type: "Heading",
6322
6564
  data: {
@@ -6329,7 +6571,7 @@ var BUTTONS = [
6329
6571
  },
6330
6572
  {
6331
6573
  label: "Text",
6332
- icon: /* @__PURE__ */ React62.createElement(NotesOutlined, null),
6574
+ icon: /* @__PURE__ */ React65.createElement(NotesOutlined, null),
6333
6575
  block: () => ({
6334
6576
  type: "Text",
6335
6577
  data: {
@@ -6341,9 +6583,28 @@ var BUTTONS = [
6341
6583
  }
6342
6584
  })
6343
6585
  },
6586
+ {
6587
+ label: "OTP / Code",
6588
+ icon: /* @__PURE__ */ React65.createElement(PinOutlined, null),
6589
+ block: () => ({
6590
+ type: "Otp",
6591
+ data: {
6592
+ props: { code: t("default.otp", "123456") },
6593
+ style: {
6594
+ padding: { top: 16, bottom: 16, left: 24, right: 24 },
6595
+ textAlign: "center",
6596
+ letterSpacing: 8,
6597
+ fontSize: 32,
6598
+ fontWeight: "bold",
6599
+ backgroundColor: "#F4F4F4",
6600
+ borderRadius: 8
6601
+ }
6602
+ }
6603
+ })
6604
+ },
6344
6605
  {
6345
6606
  label: "Button",
6346
- icon: /* @__PURE__ */ React62.createElement(SmartButtonOutlined, null),
6607
+ icon: /* @__PURE__ */ React65.createElement(SmartButtonOutlined, null),
6347
6608
  block: () => ({
6348
6609
  type: "Button",
6349
6610
  data: {
@@ -6357,7 +6618,7 @@ var BUTTONS = [
6357
6618
  },
6358
6619
  {
6359
6620
  label: "Image",
6360
- icon: /* @__PURE__ */ React62.createElement(ImageOutlined, null),
6621
+ icon: /* @__PURE__ */ React65.createElement(ImageOutlined, null),
6361
6622
  block: () => ({
6362
6623
  type: "Image",
6363
6624
  data: {
@@ -6373,7 +6634,7 @@ var BUTTONS = [
6373
6634
  },
6374
6635
  {
6375
6636
  label: "Avatar",
6376
- icon: /* @__PURE__ */ React62.createElement(AccountCircleOutlined, null),
6637
+ icon: /* @__PURE__ */ React65.createElement(AccountCircleOutlined, null),
6377
6638
  block: () => ({
6378
6639
  type: "Avatar",
6379
6640
  data: {
@@ -6387,7 +6648,7 @@ var BUTTONS = [
6387
6648
  },
6388
6649
  {
6389
6650
  label: "Personal Signature",
6390
- icon: /* @__PURE__ */ React62.createElement(ContactMailOutlined, null),
6651
+ icon: /* @__PURE__ */ React65.createElement(ContactMailOutlined, null),
6391
6652
  block: () => ({
6392
6653
  type: "Signature",
6393
6654
  data: {
@@ -6409,7 +6670,7 @@ var BUTTONS = [
6409
6670
  },
6410
6671
  {
6411
6672
  label: "Company Signature",
6412
- icon: /* @__PURE__ */ React62.createElement(BusinessOutlined, null),
6673
+ icon: /* @__PURE__ */ React65.createElement(BusinessOutlined, null),
6413
6674
  block: () => ({
6414
6675
  type: "Signature",
6415
6676
  data: {
@@ -6429,7 +6690,7 @@ var BUTTONS = [
6429
6690
  },
6430
6691
  {
6431
6692
  label: "Divider",
6432
- icon: /* @__PURE__ */ React62.createElement(HorizontalRuleOutlined, null),
6693
+ icon: /* @__PURE__ */ React65.createElement(HorizontalRuleOutlined, null),
6433
6694
  block: () => ({
6434
6695
  type: "Divider",
6435
6696
  data: {
@@ -6442,7 +6703,7 @@ var BUTTONS = [
6442
6703
  },
6443
6704
  {
6444
6705
  label: "Spacer",
6445
- icon: /* @__PURE__ */ React62.createElement(Crop32Outlined, null),
6706
+ icon: /* @__PURE__ */ React65.createElement(Crop32Outlined, null),
6446
6707
  block: () => ({
6447
6708
  type: "Spacer",
6448
6709
  data: {}
@@ -6450,7 +6711,7 @@ var BUTTONS = [
6450
6711
  },
6451
6712
  {
6452
6713
  label: "Html",
6453
- icon: /* @__PURE__ */ React62.createElement(HtmlOutlined, null),
6714
+ icon: /* @__PURE__ */ React65.createElement(HtmlOutlined, null),
6454
6715
  block: () => ({
6455
6716
  type: "Html",
6456
6717
  data: {
@@ -6465,7 +6726,7 @@ var BUTTONS = [
6465
6726
  },
6466
6727
  {
6467
6728
  label: "Columns",
6468
- icon: /* @__PURE__ */ React62.createElement(ViewColumnOutlined, null),
6729
+ icon: /* @__PURE__ */ React65.createElement(ViewColumnOutlined, null),
6469
6730
  block: () => ({
6470
6731
  type: "ColumnsContainer",
6471
6732
  data: {
@@ -6480,7 +6741,7 @@ var BUTTONS = [
6480
6741
  },
6481
6742
  {
6482
6743
  label: "Container",
6483
- icon: /* @__PURE__ */ React62.createElement(LibraryAddOutlined, null),
6744
+ icon: /* @__PURE__ */ React65.createElement(LibraryAddOutlined, null),
6484
6745
  block: () => ({
6485
6746
  type: "Container",
6486
6747
  data: {
@@ -6508,6 +6769,7 @@ var LABEL_KEYS = {
6508
6769
  Container: "block-add.container"
6509
6770
  };
6510
6771
  function BlocksMenu({ anchorEl, setAnchorEl, onSelect }) {
6772
+ const { customBlocks } = useEditorConfig();
6511
6773
  const onClose = () => {
6512
6774
  setAnchorEl(null);
6513
6775
  };
@@ -6515,10 +6777,26 @@ function BlocksMenu({ anchorEl, setAnchorEl, onSelect }) {
6515
6777
  onSelect(block);
6516
6778
  setAnchorEl(null);
6517
6779
  };
6780
+ const onCustomBlockClick = (customBlock) => {
6781
+ const { blocks: rekeyed, newRootId } = rekeyBlocks(customBlock.blocks, customBlock.rootBlockId);
6782
+ const rootBlock = rekeyed[newRootId];
6783
+ const extraBlocks = {};
6784
+ for (const [id, block] of Object.entries(rekeyed)) {
6785
+ if (id !== newRootId) {
6786
+ extraBlocks[id] = block;
6787
+ }
6788
+ }
6789
+ if (Object.keys(extraBlocks).length > 0) {
6790
+ setDocument(extraBlocks);
6791
+ }
6792
+ onSelect(rootBlock);
6793
+ setAnchorEl(null);
6794
+ };
6518
6795
  if (anchorEl === null) {
6519
6796
  return null;
6520
6797
  }
6521
- return /* @__PURE__ */ React62.createElement(
6798
+ const hasCustomBlocks = customBlocks && customBlocks.length > 0;
6799
+ return /* @__PURE__ */ React65.createElement(
6522
6800
  Menu,
6523
6801
  {
6524
6802
  open: true,
@@ -6527,7 +6805,7 @@ function BlocksMenu({ anchorEl, setAnchorEl, onSelect }) {
6527
6805
  anchorOrigin: { vertical: "bottom", horizontal: "center" },
6528
6806
  transformOrigin: { vertical: "top", horizontal: "center" }
6529
6807
  },
6530
- /* @__PURE__ */ React62.createElement(Box, { sx: { p: 1, display: "grid", gridTemplateColumns: "1fr 1fr 1fr 1fr" } }, BUTTONS.map((k, i) => /* @__PURE__ */ React62.createElement(
6808
+ /* @__PURE__ */ React65.createElement(Box, { sx: { p: 1, display: "grid", gridTemplateColumns: "1fr 1fr 1fr 1fr" } }, BUTTONS.map((k, i) => /* @__PURE__ */ React65.createElement(
6531
6809
  BlockTypeButton,
6532
6810
  {
6533
6811
  key: i,
@@ -6535,7 +6813,19 @@ function BlocksMenu({ anchorEl, setAnchorEl, onSelect }) {
6535
6813
  icon: k.icon,
6536
6814
  onClick: () => onClick(k.block())
6537
6815
  }
6538
- )))
6816
+ ))),
6817
+ hasCustomBlocks && /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(Divider$1, { sx: { my: 1 } }), /* @__PURE__ */ React65.createElement(Typography, { variant: "caption", sx: { px: 2, py: 0.5, color: "text.secondary" } }, t("block-add.custom-blocks", "Custom blocks")), /* @__PURE__ */ React65.createElement(Box, { sx: { p: 1, display: "grid", gridTemplateColumns: "1fr 1fr 1fr 1fr" } }, customBlocks.map((cb, i) => {
6818
+ var _a;
6819
+ return /* @__PURE__ */ React65.createElement(
6820
+ BlockTypeButton,
6821
+ {
6822
+ key: `custom-${i}`,
6823
+ label: cb.label,
6824
+ icon: (_a = cb.icon) != null ? _a : /* @__PURE__ */ React65.createElement(WidgetsOutlined, null),
6825
+ onClick: () => onCustomBlockClick(cb)
6826
+ }
6827
+ );
6828
+ })))
6539
6829
  );
6540
6830
  }
6541
6831
  function DividerButton({ buttonElement, onClick }) {
@@ -6562,7 +6852,7 @@ function DividerButton({ buttonElement, onClick }) {
6562
6852
  window.removeEventListener("mousemove", listener);
6563
6853
  };
6564
6854
  }, [buttonElement, setVisible]);
6565
- return /* @__PURE__ */ React62.createElement(Fade, { in: visible }, /* @__PURE__ */ React62.createElement(
6855
+ return /* @__PURE__ */ React65.createElement(Fade, { in: visible }, /* @__PURE__ */ React65.createElement(
6566
6856
  IconButton,
6567
6857
  {
6568
6858
  size: "small",
@@ -6585,11 +6875,11 @@ function DividerButton({ buttonElement, onClick }) {
6585
6875
  onClick();
6586
6876
  }
6587
6877
  },
6588
- /* @__PURE__ */ React62.createElement(AddOutlined, { fontSize: "small" })
6878
+ /* @__PURE__ */ React65.createElement(AddOutlined, { fontSize: "small" })
6589
6879
  ));
6590
6880
  }
6591
6881
  function PlaceholderButton({ onClick }) {
6592
- return /* @__PURE__ */ React62.createElement(
6882
+ return /* @__PURE__ */ React65.createElement(
6593
6883
  ButtonBase,
6594
6884
  {
6595
6885
  onClick: (ev) => {
@@ -6605,7 +6895,7 @@ function PlaceholderButton({ onClick }) {
6605
6895
  bgcolor: "rgba(0,0,0, 0.05)"
6606
6896
  }
6607
6897
  },
6608
- /* @__PURE__ */ React62.createElement(
6898
+ /* @__PURE__ */ React65.createElement(
6609
6899
  AddOutlined,
6610
6900
  {
6611
6901
  sx: {
@@ -6629,31 +6919,31 @@ function AddBlockButton({ onSelect, placeholder }) {
6629
6919
  };
6630
6920
  const renderButton2 = () => {
6631
6921
  if (placeholder) {
6632
- return /* @__PURE__ */ React62.createElement(PlaceholderButton, { onClick: handleButtonClick });
6922
+ return /* @__PURE__ */ React65.createElement(PlaceholderButton, { onClick: handleButtonClick });
6633
6923
  } else {
6634
- return /* @__PURE__ */ React62.createElement(DividerButton, { buttonElement, onClick: handleButtonClick });
6924
+ return /* @__PURE__ */ React65.createElement(DividerButton, { buttonElement, onClick: handleButtonClick });
6635
6925
  }
6636
6926
  };
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 }));
6927
+ return /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement("div", { ref: setButtonElement, style: { position: "relative" } }, renderButton2()), /* @__PURE__ */ React65.createElement(BlocksMenu, { anchorEl: menuAnchorEl, setAnchorEl: setMenuAnchorEl, onSelect }));
6638
6928
  }
6639
6929
  var BlockParentContext = createContext(null);
6640
6930
  function BlockParentProvider({
6641
6931
  info,
6642
6932
  children
6643
6933
  }) {
6644
- return /* @__PURE__ */ React62.createElement(BlockParentContext.Provider, { value: info }, children);
6934
+ return /* @__PURE__ */ React65.createElement(BlockParentContext.Provider, { value: info }, children);
6645
6935
  }
6646
6936
  function useBlockParent() {
6647
6937
  return useContext(BlockParentContext);
6648
6938
  }
6649
6939
 
6650
6940
  // src/editor/blocks/helpers/editor-children-ids/index.tsx
6651
- function generateId() {
6941
+ function generateId2() {
6652
6942
  return `block-${Date.now()}`;
6653
6943
  }
6654
6944
  function EditorChildrenIds({ childrenIds, onChange, parentRef }) {
6655
6945
  const appendBlock = (block) => {
6656
- const blockId = generateId();
6946
+ const blockId = generateId2();
6657
6947
  return onChange({
6658
6948
  blockId,
6659
6949
  block,
@@ -6661,7 +6951,7 @@ function EditorChildrenIds({ childrenIds, onChange, parentRef }) {
6661
6951
  });
6662
6952
  };
6663
6953
  const insertBlock = (block, index) => {
6664
- const blockId = generateId();
6954
+ const blockId = generateId2();
6665
6955
  const newChildrenIds = [...childrenIds || []];
6666
6956
  newChildrenIds.splice(index, 0, blockId);
6667
6957
  return onChange({
@@ -6671,9 +6961,9 @@ function EditorChildrenIds({ childrenIds, onChange, parentRef }) {
6671
6961
  });
6672
6962
  };
6673
6963
  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 }));
6964
+ return /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(AddBlockButton, { placeholder: true, onSelect: appendBlock }), parentRef && /* @__PURE__ */ React65.createElement(CanvasDropZone, { parentRef, targetIndex: 0, placeholder: true }));
6675
6965
  }
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 }));
6966
+ return /* @__PURE__ */ React65.createElement(React65.Fragment, null, childrenIds.map((childId, i) => /* @__PURE__ */ React65.createElement(Fragment, { key: childId }, /* @__PURE__ */ React65.createElement(AddBlockButton, { onSelect: (block) => insertBlock(block, i) }), parentRef && /* @__PURE__ */ React65.createElement(CanvasDropZone, { parentRef, targetIndex: i }), parentRef ? /* @__PURE__ */ React65.createElement(BlockParentProvider, { info: { parent: parentRef, indexInParent: i } }, /* @__PURE__ */ React65.createElement(EditorBlock, { id: childId })) : /* @__PURE__ */ React65.createElement(EditorBlock, { id: childId }))), /* @__PURE__ */ React65.createElement(AddBlockButton, { onSelect: appendBlock }), parentRef && /* @__PURE__ */ React65.createElement(CanvasDropZone, { parentRef, targetIndex: childrenIds.length }));
6677
6967
  }
6678
6968
  function CanvasDropZone({
6679
6969
  parentRef,
@@ -6710,7 +7000,7 @@ function CanvasDropZone({
6710
7000
  }
6711
7001
  setDraggingBlock(null);
6712
7002
  };
6713
- return /* @__PURE__ */ React62.createElement(
7003
+ return /* @__PURE__ */ React65.createElement(
6714
7004
  Box,
6715
7005
  {
6716
7006
  onDragOver: handleDragOver,
@@ -6753,13 +7043,13 @@ function ColumnsContainerEditor({ style, props }) {
6753
7043
  });
6754
7044
  setSelectedBlockId(blockId);
6755
7045
  };
6756
- return /* @__PURE__ */ React62.createElement(
7046
+ return /* @__PURE__ */ React65.createElement(
6757
7047
  columns_container_default,
6758
7048
  {
6759
7049
  props: restProps,
6760
7050
  style,
6761
7051
  columns: [
6762
- /* @__PURE__ */ React62.createElement(
7052
+ /* @__PURE__ */ React65.createElement(
6763
7053
  EditorChildrenIds,
6764
7054
  {
6765
7055
  childrenIds: (_b = columns == null ? void 0 : columns[0]) == null ? void 0 : _b.childrenIds,
@@ -6767,7 +7057,7 @@ function ColumnsContainerEditor({ style, props }) {
6767
7057
  onChange: (change) => updateColumn(0, change)
6768
7058
  }
6769
7059
  ),
6770
- /* @__PURE__ */ React62.createElement(
7060
+ /* @__PURE__ */ React65.createElement(
6771
7061
  EditorChildrenIds,
6772
7062
  {
6773
7063
  childrenIds: (_c = columns == null ? void 0 : columns[1]) == null ? void 0 : _c.childrenIds,
@@ -6775,7 +7065,7 @@ function ColumnsContainerEditor({ style, props }) {
6775
7065
  onChange: (change) => updateColumn(1, change)
6776
7066
  }
6777
7067
  ),
6778
- /* @__PURE__ */ React62.createElement(
7068
+ /* @__PURE__ */ React65.createElement(
6779
7069
  EditorChildrenIds,
6780
7070
  {
6781
7071
  childrenIds: (_d = columns == null ? void 0 : columns[2]) == null ? void 0 : _d.childrenIds,
@@ -6792,7 +7082,7 @@ function ContainerEditor({ style, props }) {
6792
7082
  const childrenIds = (_a = props == null ? void 0 : props.childrenIds) != null ? _a : [];
6793
7083
  const document2 = useDocument();
6794
7084
  const currentBlockId = useCurrentBlockId();
6795
- return /* @__PURE__ */ React62.createElement(container_default, { style }, /* @__PURE__ */ React62.createElement(
7085
+ return /* @__PURE__ */ React65.createElement(container_default, { style }, /* @__PURE__ */ React65.createElement(
6796
7086
  EditorChildrenIds,
6797
7087
  {
6798
7088
  childrenIds,
@@ -6812,65 +7102,7 @@ function ContainerEditor({ style, props }) {
6812
7102
  }
6813
7103
  ));
6814
7104
  }
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
- function getFontFamily7(fontFamily) {
7105
+ function getFontFamily8(fontFamily) {
6874
7106
  const f = fontFamily != null ? fontFamily : "MODERN_SANS";
6875
7107
  switch (f) {
6876
7108
  case "MODERN_SANS":
@@ -6986,14 +7218,14 @@ function EmailLayoutEditor(props) {
6986
7218
  }, [handleDelete, handleCopy, handlePaste]);
6987
7219
  const baseStyle = {
6988
7220
  color: (_b = props.textColor) != null ? _b : "#262626",
6989
- fontFamily: getFontFamily7(props.fontFamily),
7221
+ fontFamily: getFontFamily8(props.fontFamily),
6990
7222
  fontSize: "16px",
6991
7223
  fontWeight: "400",
6992
7224
  letterSpacing: "0.15008px",
6993
7225
  lineHeight: "1.5",
6994
7226
  margin: "0"
6995
7227
  };
6996
- const editorChildren = /* @__PURE__ */ React62.createElement(
7228
+ const editorChildren = /* @__PURE__ */ React65.createElement(
6997
7229
  EditorChildrenIds,
6998
7230
  {
6999
7231
  childrenIds,
@@ -7020,7 +7252,7 @@ function EmailLayoutEditor(props) {
7020
7252
  boxShadow: "0 1px 2px rgba(33, 36, 67, 0.05), 0 8px 24px rgba(33, 36, 67, 0.08)"
7021
7253
  };
7022
7254
  if (props.backdropDisabled) {
7023
- return /* @__PURE__ */ React62.createElement(
7255
+ return /* @__PURE__ */ React65.createElement(
7024
7256
  "div",
7025
7257
  {
7026
7258
  onClick: () => {
@@ -7032,7 +7264,7 @@ function EmailLayoutEditor(props) {
7032
7264
  minHeight: "100%"
7033
7265
  })
7034
7266
  },
7035
- /* @__PURE__ */ React62.createElement(
7267
+ /* @__PURE__ */ React65.createElement(
7036
7268
  "div",
7037
7269
  {
7038
7270
  style: __spreadProps(__spreadValues({}, cardStyle), {
@@ -7040,11 +7272,11 @@ function EmailLayoutEditor(props) {
7040
7272
  padding: "32px"
7041
7273
  })
7042
7274
  },
7043
- /* @__PURE__ */ React62.createElement("div", { style: { maxWidth: "600px", margin: "0 auto" } }, editorChildren)
7275
+ /* @__PURE__ */ React65.createElement("div", { style: { maxWidth: "600px", margin: "0 auto" } }, editorChildren)
7044
7276
  )
7045
7277
  );
7046
7278
  }
7047
- return /* @__PURE__ */ React62.createElement(
7279
+ return /* @__PURE__ */ React65.createElement(
7048
7280
  "div",
7049
7281
  {
7050
7282
  onClick: () => {
@@ -7056,7 +7288,7 @@ function EmailLayoutEditor(props) {
7056
7288
  minHeight: "100%"
7057
7289
  })
7058
7290
  },
7059
- /* @__PURE__ */ React62.createElement(
7291
+ /* @__PURE__ */ React65.createElement(
7060
7292
  "div",
7061
7293
  {
7062
7294
  style: __spreadProps(__spreadValues({}, cardStyle), {
@@ -7064,7 +7296,7 @@ function EmailLayoutEditor(props) {
7064
7296
  padding: "32px 0"
7065
7297
  })
7066
7298
  },
7067
- /* @__PURE__ */ React62.createElement(
7299
+ /* @__PURE__ */ React65.createElement(
7068
7300
  "table",
7069
7301
  {
7070
7302
  align: "center",
@@ -7088,7 +7320,7 @@ function EmailLayoutEditor(props) {
7088
7320
  cellPadding: "0",
7089
7321
  border: 0
7090
7322
  },
7091
- /* @__PURE__ */ React62.createElement("tbody", null, /* @__PURE__ */ React62.createElement("tr", { style: { width: "100%" } }, /* @__PURE__ */ React62.createElement("td", null, editorChildren)))
7323
+ /* @__PURE__ */ React65.createElement("tbody", null, /* @__PURE__ */ React65.createElement("tr", { style: { width: "100%" } }, /* @__PURE__ */ React65.createElement("td", null, editorChildren)))
7092
7324
  )
7093
7325
  )
7094
7326
  );
@@ -7248,7 +7480,7 @@ function TuneMenu({ blockId }) {
7248
7480
  resetDocument(nDocument);
7249
7481
  setSelectedBlockId(blockId);
7250
7482
  };
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" })))));
7483
+ return /* @__PURE__ */ React65.createElement(Paper, { sx, onClick: (ev) => ev.stopPropagation() }, /* @__PURE__ */ React65.createElement(Stack, null, /* @__PURE__ */ React65.createElement(Tooltip, { title: t("tune.move-up", "Move up"), placement: "left-start" }, /* @__PURE__ */ React65.createElement(IconButton, { "aria-label": t("tune.move-up", "Move up"), onClick: () => handleMoveClick("up"), sx: { color: "text.primary" } }, /* @__PURE__ */ React65.createElement(ArrowUpwardOutlined, { fontSize: "small" }))), /* @__PURE__ */ React65.createElement(Tooltip, { title: t("tune.move-down", "Move down"), placement: "left-start" }, /* @__PURE__ */ React65.createElement(IconButton, { "aria-label": t("tune.move-down", "Move down"), onClick: () => handleMoveClick("down"), sx: { color: "text.primary" } }, /* @__PURE__ */ React65.createElement(ArrowDownwardOutlined, { fontSize: "small" }))), /* @__PURE__ */ React65.createElement(Tooltip, { title: t("tune.copy", "Copy block"), placement: "left-start" }, /* @__PURE__ */ React65.createElement(IconButton, { "aria-label": t("tune.copy", "Copy block"), onClick: handleCopyClick, sx: { color: "text.primary" } }, /* @__PURE__ */ React65.createElement(ContentCopyOutlined, { fontSize: "small" }))), /* @__PURE__ */ React65.createElement(Tooltip, { title: t("tune.delete", "Delete"), placement: "left-start" }, /* @__PURE__ */ React65.createElement(IconButton, { "aria-label": t("tune.delete", "Delete"), onClick: handleDeleteClick, sx: { color: "text.primary" } }, /* @__PURE__ */ React65.createElement(DeleteOutlined, { fontSize: "small" })))));
7252
7484
  }
7253
7485
 
7254
7486
  // src/editor/blocks/helpers/block-wrappers/editor-block-wrapper.tsx
@@ -7270,7 +7502,7 @@ function EditorBlockWrapper({ children }) {
7270
7502
  if (selectedBlockId !== blockId) {
7271
7503
  return null;
7272
7504
  }
7273
- return /* @__PURE__ */ React62.createElement(TuneMenu, { blockId });
7505
+ return /* @__PURE__ */ React65.createElement(TuneMenu, { blockId });
7274
7506
  };
7275
7507
  const draggable = Boolean(blockParent) && selectedBlockId !== blockId;
7276
7508
  const handleDragStart = (e) => {
@@ -7283,7 +7515,7 @@ function EditorBlockWrapper({ children }) {
7283
7515
  const handleDragEnd = () => {
7284
7516
  setDraggingBlock(null);
7285
7517
  };
7286
- return /* @__PURE__ */ React62.createElement(
7518
+ return /* @__PURE__ */ React65.createElement(
7287
7519
  Box,
7288
7520
  {
7289
7521
  draggable,
@@ -7313,7 +7545,7 @@ function EditorBlockWrapper({ children }) {
7313
7545
  children
7314
7546
  );
7315
7547
  }
7316
- function getFontFamily8(fontFamily) {
7548
+ function getFontFamily9(fontFamily) {
7317
7549
  switch (fontFamily) {
7318
7550
  case "MODERN_SANS":
7319
7551
  return '"Helvetica Neue", "Arial Nova", "Nimbus Sans", Arial, sans-serif';
@@ -7336,7 +7568,7 @@ function getFontFamily8(fontFamily) {
7336
7568
  }
7337
7569
  return void 0;
7338
7570
  }
7339
- var getPadding11 = (padding) => padding ? `${padding.top}px ${padding.right}px ${padding.bottom}px ${padding.left}px` : void 0;
7571
+ var getPadding12 = (padding) => padding ? `${padding.top}px ${padding.right}px ${padding.bottom}px ${padding.left}px` : void 0;
7340
7572
  function getRoundedCorners2(props) {
7341
7573
  var _a;
7342
7574
  const buttonStyle = (_a = props == null ? void 0 : props.buttonStyle) != null ? _a : ButtonPropsDefaults.buttonStyle;
@@ -7382,12 +7614,12 @@ function ButtonEditor({ style, props }) {
7382
7614
  const wrapperStyle = {
7383
7615
  backgroundColor: (_e = style == null ? void 0 : style.backgroundColor) != null ? _e : void 0,
7384
7616
  textAlign: (_f = style == null ? void 0 : style.textAlign) != null ? _f : void 0,
7385
- padding: getPadding11(style == null ? void 0 : style.padding)
7617
+ padding: getPadding12(style == null ? void 0 : style.padding)
7386
7618
  };
7387
7619
  const linkStyle = {
7388
7620
  color: buttonTextColor,
7389
7621
  fontSize: (_g = style == null ? void 0 : style.fontSize) != null ? _g : 16,
7390
- fontFamily: getFontFamily8(style == null ? void 0 : style.fontFamily),
7622
+ fontFamily: getFontFamily9(style == null ? void 0 : style.fontFamily),
7391
7623
  fontWeight: (_h = style == null ? void 0 : style.fontWeight) != null ? _h : "bold",
7392
7624
  backgroundColor: buttonBackgroundColor,
7393
7625
  borderRadius: getRoundedCorners2(props),
@@ -7428,7 +7660,7 @@ function ButtonEditor({ style, props }) {
7428
7660
  selectionEnd: (_b2 = el.selectionEnd) != null ? _b2 : el.value.length
7429
7661
  });
7430
7662
  };
7431
- return /* @__PURE__ */ React62.createElement("div", { style: wrapperStyle }, /* @__PURE__ */ React62.createElement(
7663
+ return /* @__PURE__ */ React65.createElement("div", { style: wrapperStyle }, /* @__PURE__ */ React65.createElement(
7432
7664
  "input",
7433
7665
  {
7434
7666
  type: "text",
@@ -7445,7 +7677,7 @@ function ButtonEditor({ style, props }) {
7445
7677
  }
7446
7678
  ));
7447
7679
  }
7448
- return /* @__PURE__ */ React62.createElement("div", { style: wrapperStyle }, /* @__PURE__ */ React62.createElement("span", { style: linkStyle }, /* @__PURE__ */ React62.createElement("span", null, text)));
7680
+ return /* @__PURE__ */ React65.createElement("div", { style: wrapperStyle }, /* @__PURE__ */ React65.createElement("span", { style: linkStyle }, /* @__PURE__ */ React65.createElement("span", null, text)));
7449
7681
  }
7450
7682
  function useMarkdownToolbar({ text, isSelected, commitText, trackSelection }) {
7451
7683
  const textareaRef = useRef(null);
@@ -7662,7 +7894,7 @@ function InlineFormattingToolbar({
7662
7894
  }
7663
7895
  }, [activePrompt]);
7664
7896
  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(
7897
+ return /* @__PURE__ */ React65.createElement(Popper, { open: visible, anchorEl, placement: "top-start", style: { zIndex: 1300 } }, /* @__PURE__ */ React65.createElement(Paper, { elevation: 4, sx: { px: 0.5, py: 0.25, mb: 0.5 }, onMouseDown: preventBlur }, activePrompt === "link" ? /* @__PURE__ */ React65.createElement(Stack, { direction: "row", alignItems: "center", spacing: 0.5, sx: { px: 0.5 } }, /* @__PURE__ */ React65.createElement(
7666
7898
  TextField,
7667
7899
  {
7668
7900
  inputRef: urlRef,
@@ -7684,7 +7916,7 @@ function InlineFormattingToolbar({
7684
7916
  },
7685
7917
  sx: { width: 220 }
7686
7918
  }
7687
- )) : activePrompt === "color" ? /* @__PURE__ */ React62.createElement(Stack, { direction: "row", alignItems: "center", spacing: 0.5, sx: { px: 0.5, py: 0.25 } }, /* @__PURE__ */ React62.createElement(
7919
+ )) : activePrompt === "color" ? /* @__PURE__ */ React65.createElement(Stack, { direction: "row", alignItems: "center", spacing: 0.5, sx: { px: 0.5, py: 0.25 } }, /* @__PURE__ */ React65.createElement(
7688
7920
  "input",
7689
7921
  {
7690
7922
  ref: colorRef,
@@ -7697,7 +7929,7 @@ function InlineFormattingToolbar({
7697
7929
  },
7698
7930
  style: { width: 40, height: 28, border: "none", padding: 0, background: "transparent", cursor: "pointer" }
7699
7931
  }
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(
7932
+ ), /* @__PURE__ */ React65.createElement(IconButton, { size: "small", onClick: onPromptCancel, title: t("common.cancel", "Cancel") }, /* @__PURE__ */ React65.createElement(FormatColorTextOutlined, { fontSize: "small" }))) : activePrompt === "font" ? /* @__PURE__ */ React65.createElement(Stack, { direction: "row", alignItems: "center", spacing: 0.5, sx: { px: 0.5, py: 0.25 } }, /* @__PURE__ */ React65.createElement(
7701
7933
  Select,
7702
7934
  {
7703
7935
  value: font,
@@ -7710,12 +7942,12 @@ function InlineFormattingToolbar({
7710
7942
  variant: "standard",
7711
7943
  sx: { minWidth: 180, fontSize: 13 }
7712
7944
  },
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" })))));
7945
+ FONT_OPTIONS.map((opt) => /* @__PURE__ */ React65.createElement(MenuItem, { key: opt.value, value: opt.value, sx: { fontFamily: opt.value } }, opt.label))
7946
+ ), /* @__PURE__ */ React65.createElement(IconButton, { size: "small", onClick: onPromptCancel, title: t("common.cancel", "Cancel") }, /* @__PURE__ */ React65.createElement(TextFieldsOutlined, { fontSize: "small" }))) : /* @__PURE__ */ React65.createElement(Stack, { direction: "row", spacing: 0.25 }, /* @__PURE__ */ React65.createElement(IconButton, { size: "small", onClick: onBold, title: t("toolbar.bold-shortcut", "Bold (Cmd+B)"), "aria-label": t("toolbar.bold", "Bold") }, /* @__PURE__ */ React65.createElement(FormatBoldOutlined, { fontSize: "small" })), /* @__PURE__ */ React65.createElement(IconButton, { size: "small", onClick: onItalic, title: t("toolbar.italic-shortcut", "Italic (Cmd+I)"), "aria-label": t("toolbar.italic", "Italic") }, /* @__PURE__ */ React65.createElement(FormatItalicOutlined, { fontSize: "small" })), /* @__PURE__ */ React65.createElement(IconButton, { size: "small", onClick: onUnderline, title: t("toolbar.underline-shortcut", "Underline (Cmd+U)"), "aria-label": t("toolbar.underline", "Underline") }, /* @__PURE__ */ React65.createElement(FormatUnderlinedOutlined, { fontSize: "small" })), /* @__PURE__ */ React65.createElement(IconButton, { size: "small", onClick: onOverline, title: t("toolbar.overline", "Overline"), "aria-label": t("toolbar.overline", "Overline") }, /* @__PURE__ */ React65.createElement(FormatOverlineOutlined, { fontSize: "small" })), /* @__PURE__ */ React65.createElement(IconButton, { size: "small", onClick: onColorRequest, title: t("toolbar.text-color", "Text color"), "aria-label": t("toolbar.text-color", "Text color") }, /* @__PURE__ */ React65.createElement(FormatColorTextOutlined, { fontSize: "small" })), /* @__PURE__ */ React65.createElement(IconButton, { size: "small", onClick: onFontRequest, title: t("toolbar.font-family", "Font family"), "aria-label": t("toolbar.font-family", "Font family") }, /* @__PURE__ */ React65.createElement(TextFieldsOutlined, { fontSize: "small" })), /* @__PURE__ */ React65.createElement(IconButton, { size: "small", onClick: onLinkRequest, title: t("toolbar.link-shortcut", "Link (Cmd+K)"), "aria-label": t("toolbar.link", "Link") }, /* @__PURE__ */ React65.createElement(LinkOutlined, { fontSize: "small" })))));
7715
7947
  }
7716
7948
 
7717
7949
  // src/editor/blocks/heading/heading-editor.tsx
7718
- function getFontFamily9(fontFamily) {
7950
+ function getFontFamily10(fontFamily) {
7719
7951
  switch (fontFamily) {
7720
7952
  case "MODERN_SANS":
7721
7953
  return '"Helvetica Neue", "Arial Nova", "Nimbus Sans", Arial, sans-serif';
@@ -7742,7 +7974,7 @@ function getFontFamily9(fontFamily) {
7742
7974
  }
7743
7975
  return void 0;
7744
7976
  }
7745
- function getPadding12(padding) {
7977
+ function getPadding13(padding) {
7746
7978
  if (!padding) return void 0;
7747
7979
  if (typeof padding === "object" && !Array.isArray(padding) && "top" in padding && "right" in padding && "bottom" in padding && "left" in padding) {
7748
7980
  return `${padding.top}px ${padding.right}px ${padding.bottom}px ${padding.left}px`;
@@ -7787,11 +8019,11 @@ function HeadingEditor({ style, props }) {
7787
8019
  const [localText, setLocalText] = useState(textContent);
7788
8020
  const isMarkdown = (_c = props == null ? void 0 : props.markdown) != null ? _c : false;
7789
8021
  const rootBlock = document2.root;
7790
- const rootFontFamily = rootBlock && rootBlock.type === "EmailLayout" ? getFontFamily9(rootBlock.data.fontFamily) : '"Helvetica Neue", Arial, sans-serif';
8022
+ const rootFontFamily = rootBlock && rootBlock.type === "EmailLayout" ? getFontFamily10(rootBlock.data.fontFamily) : '"Helvetica Neue", Arial, sans-serif';
7791
8023
  useEffect(() => {
7792
8024
  setLocalText(textContent);
7793
8025
  }, [textContent]);
7794
- const fontFamily = getFontFamily9(style == null ? void 0 : style.fontFamily) || rootFontFamily;
8026
+ const fontFamily = getFontFamily10(style == null ? void 0 : style.fontFamily) || rootFontFamily;
7795
8027
  const hStyle = {
7796
8028
  color: (_d = style == null ? void 0 : style.color) != null ? _d : void 0,
7797
8029
  backgroundColor: (_e = style == null ? void 0 : style.backgroundColor) != null ? _e : void 0,
@@ -7802,7 +8034,7 @@ function HeadingEditor({ style, props }) {
7802
8034
  margin: 0,
7803
8035
  fontFamily,
7804
8036
  fontSize: getFontSize2(level),
7805
- padding: getPadding12(style == null ? void 0 : style.padding),
8037
+ padding: getPadding13(style == null ? void 0 : style.padding),
7806
8038
  width: "100%",
7807
8039
  minHeight: "1em"
7808
8040
  };
@@ -7866,7 +8098,7 @@ function HeadingEditor({ style, props }) {
7866
8098
  if (textareaRef.current) adjustTextareaHeight(textareaRef.current);
7867
8099
  }, [localText, isSelected]);
7868
8100
  if (isSelected) {
7869
- return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
8101
+ return /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(
7870
8102
  "textarea",
7871
8103
  {
7872
8104
  ref: textareaRef,
@@ -7884,7 +8116,7 @@ function HeadingEditor({ style, props }) {
7884
8116
  rows: 1,
7885
8117
  onInput: (e) => adjustTextareaHeight(e.target)
7886
8118
  }
7887
- ), /* @__PURE__ */ React62.createElement(InlineFormattingToolbar, __spreadValues({ anchorEl: textareaRef.current }, toolbarProps)));
8119
+ ), /* @__PURE__ */ React65.createElement(InlineFormattingToolbar, __spreadValues({ anchorEl: textareaRef.current }, toolbarProps)));
7888
8120
  }
7889
8121
  const headingProps = isMarkdown ? {
7890
8122
  ref: displayRef,
@@ -7893,11 +8125,11 @@ function HeadingEditor({ style, props }) {
7893
8125
  } : { ref: displayRef, style: hStyle, children: textContent };
7894
8126
  switch (level) {
7895
8127
  case "h1":
7896
- return /* @__PURE__ */ React62.createElement("h1", __spreadValues({}, headingProps));
8128
+ return /* @__PURE__ */ React65.createElement("h1", __spreadValues({}, headingProps));
7897
8129
  case "h2":
7898
- return /* @__PURE__ */ React62.createElement("h2", __spreadValues({}, headingProps));
8130
+ return /* @__PURE__ */ React65.createElement("h2", __spreadValues({}, headingProps));
7899
8131
  case "h3":
7900
- return /* @__PURE__ */ React62.createElement("h3", __spreadValues({}, headingProps));
8132
+ return /* @__PURE__ */ React65.createElement("h3", __spreadValues({}, headingProps));
7901
8133
  }
7902
8134
  }
7903
8135
  function HtmlEditor({ style, props }) {
@@ -7962,7 +8194,7 @@ function HtmlEditor({ style, props }) {
7962
8194
  selectionEnd: (_b2 = el.selectionEnd) != null ? _b2 : el.value.length
7963
8195
  });
7964
8196
  };
7965
- return /* @__PURE__ */ React62.createElement("div", { style: cssStyle }, /* @__PURE__ */ React62.createElement(
8197
+ return /* @__PURE__ */ React65.createElement("div", { style: cssStyle }, /* @__PURE__ */ React65.createElement(
7966
8198
  "textarea",
7967
8199
  {
7968
8200
  value: localContents,
@@ -7982,9 +8214,72 @@ function HtmlEditor({ style, props }) {
7982
8214
  ));
7983
8215
  }
7984
8216
  if (!contents) {
7985
- return /* @__PURE__ */ React62.createElement("div", { style: cssStyle });
8217
+ return /* @__PURE__ */ React65.createElement("div", { style: cssStyle });
8218
+ }
8219
+ return /* @__PURE__ */ React65.createElement("div", { style: cssStyle, dangerouslySetInnerHTML: { __html: contents } });
8220
+ }
8221
+ function OtpEditor({ props, style }) {
8222
+ var _a, _b, _c, _d, _e, _f;
8223
+ const blockId = useCurrentBlockId();
8224
+ const selectedBlockId = useSelectedBlockId();
8225
+ const isSelected = selectedBlockId === blockId;
8226
+ const code = (_a = props == null ? void 0 : props.code) != null ? _a : OtpPropsDefaults.code;
8227
+ const [localCode, setLocalCode] = useState(code);
8228
+ const inputRef = useRef(null);
8229
+ useEffect(() => {
8230
+ setLocalCode(code);
8231
+ }, [code]);
8232
+ useEffect(() => {
8233
+ if (isSelected && inputRef.current) {
8234
+ inputRef.current.focus();
8235
+ inputRef.current.select();
8236
+ }
8237
+ }, [isSelected]);
8238
+ if (!isSelected) {
8239
+ return /* @__PURE__ */ React65.createElement(otp_default, { props, style });
7986
8240
  }
7987
- return /* @__PURE__ */ React62.createElement("div", { style: cssStyle, dangerouslySetInnerHTML: { __html: contents } });
8241
+ const commit = (newCode) => {
8242
+ setLocalCode(newCode);
8243
+ setDocument({
8244
+ [blockId]: {
8245
+ type: "Otp",
8246
+ data: {
8247
+ style,
8248
+ props: __spreadProps(__spreadValues({}, props), { code: newCode })
8249
+ }
8250
+ }
8251
+ });
8252
+ };
8253
+ const wrapperStyle = {
8254
+ textAlign: (_b = style == null ? void 0 : style.textAlign) != null ? _b : "center",
8255
+ 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
8256
+ };
8257
+ const inputStyle = {
8258
+ display: "inline-block",
8259
+ color: (_c = style == null ? void 0 : style.color) != null ? _c : "#000000",
8260
+ backgroundColor: (_d = style == null ? void 0 : style.backgroundColor) != null ? _d : "transparent",
8261
+ border: (style == null ? void 0 : style.borderColor) ? `1px solid ${style.borderColor}` : "1px dashed #999",
8262
+ borderRadius: (style == null ? void 0 : style.borderRadius) != null ? `${style.borderRadius}px` : 4,
8263
+ fontFamily: '"Nimbus Mono PS", "Courier New", "Cutive Mono", monospace',
8264
+ fontSize: (_e = style == null ? void 0 : style.fontSize) != null ? _e : 32,
8265
+ fontWeight: (_f = style == null ? void 0 : style.fontWeight) != null ? _f : "bold",
8266
+ letterSpacing: (style == null ? void 0 : style.letterSpacing) != null ? `${style.letterSpacing}px` : "4px",
8267
+ textAlign: "center",
8268
+ padding: "12px 20px",
8269
+ outline: "none",
8270
+ minWidth: 120
8271
+ };
8272
+ return /* @__PURE__ */ React65.createElement("div", { style: wrapperStyle }, /* @__PURE__ */ React65.createElement(
8273
+ "input",
8274
+ {
8275
+ ref: inputRef,
8276
+ type: "text",
8277
+ value: localCode,
8278
+ onChange: (e) => commit(e.target.value),
8279
+ style: inputStyle,
8280
+ onClick: (e) => e.stopPropagation()
8281
+ }
8282
+ ));
7988
8283
  }
7989
8284
  function getImageBorderRadius2(shape, size) {
7990
8285
  switch (shape) {
@@ -8099,7 +8394,7 @@ function SignatureEditor({ style, props }) {
8099
8394
  backgroundColor: (_p = style == null ? void 0 : style.backgroundColor) != null ? _p : void 0,
8100
8395
  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
8396
  };
8102
- const imageElement = imageUrl ? /* @__PURE__ */ React62.createElement(
8397
+ const imageElement = imageUrl ? /* @__PURE__ */ React65.createElement(
8103
8398
  "img",
8104
8399
  {
8105
8400
  src: imageUrl,
@@ -8117,7 +8412,7 @@ function SignatureEditor({ style, props }) {
8117
8412
  }
8118
8413
  }
8119
8414
  ) : null;
8120
- const greetingElement = isSelected ? /* @__PURE__ */ React62.createElement("div", { onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React62.createElement(
8415
+ const greetingElement = isSelected ? /* @__PURE__ */ React65.createElement("div", { onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React65.createElement(
8121
8416
  "input",
8122
8417
  {
8123
8418
  value: localGreeting,
@@ -8128,8 +8423,8 @@ function SignatureEditor({ style, props }) {
8128
8423
  placeholder: "Greeting (e.g. Best regards,)",
8129
8424
  style: __spreadValues(__spreadValues({}, inputBase), greetingStyle)
8130
8425
  }
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(
8426
+ )) : greeting ? /* @__PURE__ */ React65.createElement("p", { style: greetingStyle }, greeting) : null;
8427
+ const textContent = isSelected ? /* @__PURE__ */ React65.createElement("div", { onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React65.createElement(
8133
8428
  "input",
8134
8429
  {
8135
8430
  value: localName,
@@ -8140,7 +8435,7 @@ function SignatureEditor({ style, props }) {
8140
8435
  placeholder: "Name",
8141
8436
  style: __spreadValues(__spreadValues({}, inputBase), nameStyle)
8142
8437
  }
8143
- ), /* @__PURE__ */ React62.createElement(
8438
+ ), /* @__PURE__ */ React65.createElement(
8144
8439
  "input",
8145
8440
  {
8146
8441
  value: localTitle,
@@ -8151,7 +8446,7 @@ function SignatureEditor({ style, props }) {
8151
8446
  placeholder: "Title",
8152
8447
  style: __spreadValues(__spreadValues({}, inputBase), detailStyle)
8153
8448
  }
8154
- ), /* @__PURE__ */ React62.createElement(
8449
+ ), /* @__PURE__ */ React65.createElement(
8155
8450
  "input",
8156
8451
  {
8157
8452
  value: localCompany,
@@ -8162,7 +8457,7 @@ function SignatureEditor({ style, props }) {
8162
8457
  placeholder: "Company",
8163
8458
  style: __spreadValues(__spreadValues({}, inputBase), detailStyle)
8164
8459
  }
8165
- ), /* @__PURE__ */ React62.createElement(
8460
+ ), /* @__PURE__ */ React65.createElement(
8166
8461
  "input",
8167
8462
  {
8168
8463
  value: localAddress,
@@ -8173,7 +8468,7 @@ function SignatureEditor({ style, props }) {
8173
8468
  placeholder: "Address",
8174
8469
  style: __spreadValues(__spreadValues({}, inputBase), detailStyle)
8175
8470
  }
8176
- ), /* @__PURE__ */ React62.createElement(
8471
+ ), /* @__PURE__ */ React65.createElement(
8177
8472
  "input",
8178
8473
  {
8179
8474
  value: localEmail,
@@ -8184,7 +8479,7 @@ function SignatureEditor({ style, props }) {
8184
8479
  placeholder: "Email",
8185
8480
  style: __spreadProps(__spreadValues(__spreadValues({}, inputBase), linkStyle), { marginTop: 4, display: "block" })
8186
8481
  }
8187
- ), /* @__PURE__ */ React62.createElement(
8482
+ ), /* @__PURE__ */ React65.createElement(
8188
8483
  "input",
8189
8484
  {
8190
8485
  value: localPhone,
@@ -8195,7 +8490,7 @@ function SignatureEditor({ style, props }) {
8195
8490
  placeholder: "Phone",
8196
8491
  style: __spreadProps(__spreadValues(__spreadValues({}, inputBase), linkStyle), { display: "block" })
8197
8492
  }
8198
- ), /* @__PURE__ */ React62.createElement(
8493
+ ), /* @__PURE__ */ React65.createElement(
8199
8494
  "input",
8200
8495
  {
8201
8496
  value: localWebsite,
@@ -8206,13 +8501,13 @@ function SignatureEditor({ style, props }) {
8206
8501
  placeholder: "Website",
8207
8502
  style: __spreadProps(__spreadValues(__spreadValues({}, inputBase), linkStyle), { display: "block" })
8208
8503
  }
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"));
8504
+ )) : /* @__PURE__ */ React65.createElement("div", null, name && /* @__PURE__ */ React65.createElement("p", { style: nameStyle }, name), title && /* @__PURE__ */ React65.createElement("p", { style: detailStyle }, title), company && /* @__PURE__ */ React65.createElement("p", { style: detailStyle }, company), address && /* @__PURE__ */ React65.createElement("p", { style: detailStyle }, address), (email || phone || website) && /* @__PURE__ */ React65.createElement("p", { style: __spreadProps(__spreadValues({}, detailStyle), { marginTop: 4 }) }, email && /* @__PURE__ */ React65.createElement("span", { style: linkStyle }, email), email && (phone || website) && /* @__PURE__ */ React65.createElement("span", { style: detailStyle }, " \xB7 "), phone && /* @__PURE__ */ React65.createElement("span", { style: linkStyle }, phone), phone && website && /* @__PURE__ */ React65.createElement("span", { style: detailStyle }, " \xB7 "), website && /* @__PURE__ */ React65.createElement("span", { style: linkStyle }, website)), !name && !title && !company && !email && !phone && !website && /* @__PURE__ */ React65.createElement("p", { style: detailStyle }, "Click to edit signature"));
8210
8505
  if (layout === "vertical") {
8211
- return /* @__PURE__ */ React62.createElement("div", { style: wrapperStyle }, greetingElement, imageElement && /* @__PURE__ */ React62.createElement("div", { style: { marginBottom: 12 } }, imageElement), textContent);
8506
+ return /* @__PURE__ */ React65.createElement("div", { style: wrapperStyle }, greetingElement, imageElement && /* @__PURE__ */ React65.createElement("div", { style: { marginBottom: 12 } }, imageElement), textContent);
8212
8507
  }
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)))));
8508
+ return /* @__PURE__ */ React65.createElement("div", { style: wrapperStyle }, greetingElement, /* @__PURE__ */ React65.createElement("table", { cellPadding: "0", cellSpacing: "0", border: 0, role: "presentation" }, /* @__PURE__ */ React65.createElement("tbody", null, /* @__PURE__ */ React65.createElement("tr", null, imageElement && /* @__PURE__ */ React65.createElement("td", { style: { verticalAlign: "middle", paddingRight: 16 } }, imageElement), /* @__PURE__ */ React65.createElement("td", { style: { verticalAlign: "middle" } }, textContent)))));
8214
8509
  }
8215
- function getFontFamily10(fontFamily) {
8510
+ function getFontFamily11(fontFamily) {
8216
8511
  switch (fontFamily) {
8217
8512
  case "MODERN_SANS":
8218
8513
  return '"Helvetica Neue", "Arial Nova", "Nimbus Sans", Arial, sans-serif';
@@ -8239,7 +8534,7 @@ function getFontFamily10(fontFamily) {
8239
8534
  }
8240
8535
  return void 0;
8241
8536
  }
8242
- function getPadding13(padding) {
8537
+ function getPadding14(padding) {
8243
8538
  if (!padding) return void 0;
8244
8539
  if (typeof padding === "object" && !Array.isArray(padding) && "top" in padding && "right" in padding && "bottom" in padding && "left" in padding) {
8245
8540
  return `${padding.top}px ${padding.right}px ${padding.bottom}px ${padding.left}px`;
@@ -8273,11 +8568,11 @@ function TextEditor({ style, props }) {
8273
8568
  const [localText, setLocalText] = useState(textContent);
8274
8569
  const isMarkdown = (_b = props == null ? void 0 : props.markdown) != null ? _b : false;
8275
8570
  const rootBlock = document2.root;
8276
- const rootFontFamily = rootBlock && rootBlock.type === "EmailLayout" ? getFontFamily10(rootBlock.data.fontFamily) : '"Helvetica Neue", Arial, sans-serif';
8571
+ const rootFontFamily = rootBlock && rootBlock.type === "EmailLayout" ? getFontFamily11(rootBlock.data.fontFamily) : '"Helvetica Neue", Arial, sans-serif';
8277
8572
  useEffect(() => {
8278
8573
  setLocalText(textContent);
8279
8574
  }, [textContent]);
8280
- const fontFamily = getFontFamily10(style == null ? void 0 : style.fontFamily) || rootFontFamily;
8575
+ const fontFamily = getFontFamily11(style == null ? void 0 : style.fontFamily) || rootFontFamily;
8281
8576
  const wStyle = {
8282
8577
  color: (_c = style == null ? void 0 : style.color) != null ? _c : void 0,
8283
8578
  backgroundColor: (_d = style == null ? void 0 : style.backgroundColor) != null ? _d : void 0,
@@ -8287,7 +8582,7 @@ function TextEditor({ style, props }) {
8287
8582
  lineHeight: (_g = style == null ? void 0 : style.lineHeight) != null ? _g : void 0,
8288
8583
  letterSpacing: (style == null ? void 0 : style.letterSpacing) != null ? `${style.letterSpacing}px` : void 0,
8289
8584
  textAlign: (_h = style == null ? void 0 : style.textAlign) != null ? _h : void 0,
8290
- padding: getPadding13(style == null ? void 0 : style.padding),
8585
+ padding: getPadding14(style == null ? void 0 : style.padding),
8291
8586
  width: "100%",
8292
8587
  minHeight: "1em"
8293
8588
  };
@@ -8354,7 +8649,7 @@ function TextEditor({ style, props }) {
8354
8649
  if (textareaRef.current) adjustTextareaHeight(textareaRef.current);
8355
8650
  }, [localText, isSelected]);
8356
8651
  if (isSelected) {
8357
- return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
8652
+ return /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(
8358
8653
  "textarea",
8359
8654
  {
8360
8655
  ref: textareaRef,
@@ -8372,10 +8667,10 @@ function TextEditor({ style, props }) {
8372
8667
  rows: 1,
8373
8668
  onInput: (e) => adjustTextareaHeight(e.target)
8374
8669
  }
8375
- ), /* @__PURE__ */ React62.createElement(InlineFormattingToolbar, __spreadValues({ anchorEl: textareaRef.current }, toolbarProps)));
8670
+ ), /* @__PURE__ */ React65.createElement(InlineFormattingToolbar, __spreadValues({ anchorEl: textareaRef.current }, toolbarProps)));
8376
8671
  }
8377
8672
  if (isMarkdown) {
8378
- return /* @__PURE__ */ React62.createElement(
8673
+ return /* @__PURE__ */ React65.createElement(
8379
8674
  "div",
8380
8675
  {
8381
8676
  ref: displayRef,
@@ -8384,34 +8679,34 @@ function TextEditor({ style, props }) {
8384
8679
  }
8385
8680
  );
8386
8681
  }
8387
- return /* @__PURE__ */ React62.createElement("div", { ref: displayRef, style: wStyle }, textContent);
8682
+ return /* @__PURE__ */ React65.createElement("div", { ref: displayRef, style: wStyle }, textContent);
8388
8683
  }
8389
8684
 
8390
8685
  // src/editor/core.tsx
8391
8686
  var EDITOR_DICTIONARY = buildBlockConfigurationDictionary({
8392
8687
  Avatar: {
8393
8688
  schema: AvatarPropsSchema,
8394
- Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(avatar_default, __spreadValues({}, props)))
8689
+ Component: (props) => /* @__PURE__ */ React65.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React65.createElement(avatar_default, __spreadValues({}, props)))
8395
8690
  },
8396
8691
  Button: {
8397
8692
  schema: ButtonPropsSchema,
8398
- Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(ButtonEditor, __spreadValues({}, props)))
8693
+ Component: (props) => /* @__PURE__ */ React65.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React65.createElement(ButtonEditor, __spreadValues({}, props)))
8399
8694
  },
8400
8695
  Container: {
8401
8696
  schema: container_props_schema_default,
8402
- Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(ContainerEditor, __spreadValues({}, props)))
8697
+ Component: (props) => /* @__PURE__ */ React65.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React65.createElement(ContainerEditor, __spreadValues({}, props)))
8403
8698
  },
8404
8699
  ColumnsContainer: {
8405
8700
  schema: columns_container_props_schema_default2,
8406
- Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(ColumnsContainerEditor, __spreadValues({}, props)))
8701
+ Component: (props) => /* @__PURE__ */ React65.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React65.createElement(ColumnsContainerEditor, __spreadValues({}, props)))
8407
8702
  },
8408
8703
  Heading: {
8409
8704
  schema: HeadingPropsSchema,
8410
- Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(HeadingEditor, __spreadValues({}, props)))
8705
+ Component: (props) => /* @__PURE__ */ React65.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React65.createElement(HeadingEditor, __spreadValues({}, props)))
8411
8706
  },
8412
8707
  Html: {
8413
8708
  schema: HtmlPropsSchema,
8414
- Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(HtmlEditor, __spreadValues({}, props)))
8709
+ Component: (props) => /* @__PURE__ */ React65.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React65.createElement(HtmlEditor, __spreadValues({}, props)))
8415
8710
  },
8416
8711
  Image: {
8417
8712
  schema: ImagePropsSchema,
@@ -8423,28 +8718,32 @@ var EDITOR_DICTIONARY = buildBlockConfigurationDictionary({
8423
8718
  linkHref: null
8424
8719
  })
8425
8720
  });
8426
- return /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(image_default, __spreadValues({}, props)));
8721
+ return /* @__PURE__ */ React65.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React65.createElement(image_default, __spreadValues({}, props)));
8427
8722
  }
8428
8723
  },
8724
+ Otp: {
8725
+ schema: OtpPropsSchema,
8726
+ Component: (props) => /* @__PURE__ */ React65.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React65.createElement(OtpEditor, __spreadValues({}, props)))
8727
+ },
8429
8728
  Text: {
8430
8729
  schema: TextPropsSchema,
8431
- Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(TextEditor, __spreadValues({}, props)))
8730
+ Component: (props) => /* @__PURE__ */ React65.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React65.createElement(TextEditor, __spreadValues({}, props)))
8432
8731
  },
8433
8732
  EmailLayout: {
8434
8733
  schema: email_layout_props_schema_default,
8435
- Component: (p) => /* @__PURE__ */ React62.createElement(EmailLayoutEditor, __spreadValues({}, p))
8734
+ Component: (p) => /* @__PURE__ */ React65.createElement(EmailLayoutEditor, __spreadValues({}, p))
8436
8735
  },
8437
8736
  Spacer: {
8438
8737
  schema: SpacerPropsSchema,
8439
- Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(spacer_default, __spreadValues({}, props)))
8738
+ Component: (props) => /* @__PURE__ */ React65.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React65.createElement(spacer_default, __spreadValues({}, props)))
8440
8739
  },
8441
8740
  Divider: {
8442
8741
  schema: DividerPropsSchema,
8443
- Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(divider_default, __spreadValues({}, props)))
8742
+ Component: (props) => /* @__PURE__ */ React65.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React65.createElement(divider_default, __spreadValues({}, props)))
8444
8743
  },
8445
8744
  Signature: {
8446
8745
  schema: SignaturePropsSchema,
8447
- Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(SignatureEditor, __spreadValues({}, props)))
8746
+ Component: (props) => /* @__PURE__ */ React65.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React65.createElement(SignatureEditor, __spreadValues({}, props)))
8448
8747
  }
8449
8748
  });
8450
8749
  var EditorBlock2 = buildBlockComponent(EDITOR_DICTIONARY);
@@ -8460,7 +8759,7 @@ function EditorBlock({ id }) {
8460
8759
  if (!block) {
8461
8760
  throw new Error("Could not find block");
8462
8761
  }
8463
- return /* @__PURE__ */ React62.createElement(EditorBlockContext.Provider, { value: id }, /* @__PURE__ */ React62.createElement(EditorBlock2, __spreadValues({}, block)));
8762
+ return /* @__PURE__ */ React65.createElement(EditorBlockContext.Provider, { value: id }, /* @__PURE__ */ React65.createElement(EditorBlock2, __spreadValues({}, block)));
8464
8763
  }
8465
8764
  function ToggleInspectorPanelButton() {
8466
8765
  const inspectorDrawerOpen = useInspectorDrawerOpen();
@@ -8468,20 +8767,20 @@ function ToggleInspectorPanelButton() {
8468
8767
  toggleInspectorDrawerOpen();
8469
8768
  };
8470
8769
  if (inspectorDrawerOpen) {
8471
- return /* @__PURE__ */ React62.createElement(IconButton, { onClick: handleClick }, /* @__PURE__ */ React62.createElement(LastPageOutlined, { fontSize: "small" }));
8770
+ return /* @__PURE__ */ React65.createElement(IconButton, { onClick: handleClick }, /* @__PURE__ */ React65.createElement(LastPageOutlined, { fontSize: "small" }));
8472
8771
  }
8473
- return /* @__PURE__ */ React62.createElement(IconButton, { onClick: handleClick }, /* @__PURE__ */ React62.createElement(AppRegistrationOutlined, { fontSize: "small" }));
8772
+ return /* @__PURE__ */ React65.createElement(IconButton, { onClick: handleClick }, /* @__PURE__ */ React65.createElement(AppRegistrationOutlined, { fontSize: "small" }));
8474
8773
  }
8475
8774
  function useIcon() {
8476
8775
  const samplesDrawerOpen = useSamplesDrawerOpen();
8477
8776
  if (samplesDrawerOpen) {
8478
- return /* @__PURE__ */ React62.createElement(FirstPageOutlined, { fontSize: "small" });
8777
+ return /* @__PURE__ */ React65.createElement(FirstPageOutlined, { fontSize: "small" });
8479
8778
  }
8480
- return /* @__PURE__ */ React62.createElement(MenuOutlined, { fontSize: "small" });
8779
+ return /* @__PURE__ */ React65.createElement(MenuOutlined, { fontSize: "small" });
8481
8780
  }
8482
8781
  function ToggleSamplesPanelButton() {
8483
8782
  const icon = useIcon();
8484
- return /* @__PURE__ */ React62.createElement(IconButton, { onClick: toggleSamplesDrawerOpen }, icon);
8783
+ return /* @__PURE__ */ React65.createElement(IconButton, { onClick: toggleSamplesDrawerOpen }, icon);
8485
8784
  }
8486
8785
  function formatHtml(html2, spaces = 2) {
8487
8786
  try {
@@ -8543,7 +8842,7 @@ function HighlightedCodePanel({ type, value }) {
8543
8842
  if (code === null) {
8544
8843
  return null;
8545
8844
  }
8546
- return /* @__PURE__ */ React62.createElement(
8845
+ return /* @__PURE__ */ React65.createElement(
8547
8846
  "pre",
8548
8847
  {
8549
8848
  style: {
@@ -8569,17 +8868,17 @@ function HighlightedCodePanel({ type, value }) {
8569
8868
  function HtmlPanel() {
8570
8869
  const document2 = useDocument();
8571
8870
  const code = useMemo(() => renderToStaticMarkup(document2, { rootBlockId: "root" }), [document2]);
8572
- return /* @__PURE__ */ React62.createElement(HighlightedCodePanel, { type: "html", value: code });
8871
+ return /* @__PURE__ */ React65.createElement(HighlightedCodePanel, { type: "html", value: code });
8573
8872
  }
8574
8873
  function JsonPanel() {
8575
8874
  const document2 = useDocument();
8576
8875
  const code = useMemo(() => JSON.stringify(document2, null, " "), [document2]);
8577
- return /* @__PURE__ */ React62.createElement(HighlightedCodePanel, { type: "json", value: code });
8876
+ return /* @__PURE__ */ React65.createElement(HighlightedCodePanel, { type: "json", value: code });
8578
8877
  }
8579
8878
  function TextPanel() {
8580
8879
  const document2 = useDocument();
8581
8880
  const text = useMemo(() => renderToText(document2, { rootBlockId: "root" }), [document2]);
8582
- return /* @__PURE__ */ React62.createElement(
8881
+ return /* @__PURE__ */ React65.createElement(
8583
8882
  "pre",
8584
8883
  {
8585
8884
  style: {
@@ -8615,35 +8914,35 @@ function MainTabsGroup() {
8615
8914
  setSelectedMainTab("editor");
8616
8915
  }
8617
8916
  };
8618
- return /* @__PURE__ */ React62.createElement(Tabs, { value: selectedMainTab, onChange: handleChange }, /* @__PURE__ */ React62.createElement(
8917
+ return /* @__PURE__ */ React65.createElement(Tabs, { value: selectedMainTab, onChange: handleChange }, /* @__PURE__ */ React65.createElement(
8619
8918
  Tab,
8620
8919
  {
8621
8920
  value: "editor",
8622
- label: /* @__PURE__ */ React62.createElement(Tooltip, { title: t("tab.edit", "Edit") }, /* @__PURE__ */ React62.createElement(EditOutlined, { fontSize: "small" }))
8921
+ label: /* @__PURE__ */ React65.createElement(Tooltip, { title: t("tab.edit", "Edit") }, /* @__PURE__ */ React65.createElement(EditOutlined, { fontSize: "small" }))
8623
8922
  }
8624
- ), /* @__PURE__ */ React62.createElement(
8923
+ ), /* @__PURE__ */ React65.createElement(
8625
8924
  Tab,
8626
8925
  {
8627
8926
  value: "preview",
8628
- label: /* @__PURE__ */ React62.createElement(Tooltip, { title: t("tab.preview", "Preview") }, /* @__PURE__ */ React62.createElement(PreviewOutlined, { fontSize: "small" }))
8927
+ label: /* @__PURE__ */ React65.createElement(Tooltip, { title: t("tab.preview", "Preview") }, /* @__PURE__ */ React65.createElement(PreviewOutlined, { fontSize: "small" }))
8629
8928
  }
8630
- ), /* @__PURE__ */ React62.createElement(
8929
+ ), /* @__PURE__ */ React65.createElement(
8631
8930
  Tab,
8632
8931
  {
8633
8932
  value: "html",
8634
- label: /* @__PURE__ */ React62.createElement(Tooltip, { title: t("tab.html-output", "HTML output") }, /* @__PURE__ */ React62.createElement(CodeOutlined, { fontSize: "small" }))
8933
+ label: /* @__PURE__ */ React65.createElement(Tooltip, { title: t("tab.html-output", "HTML output") }, /* @__PURE__ */ React65.createElement(CodeOutlined, { fontSize: "small" }))
8635
8934
  }
8636
- ), /* @__PURE__ */ React62.createElement(
8935
+ ), /* @__PURE__ */ React65.createElement(
8637
8936
  Tab,
8638
8937
  {
8639
8938
  value: "text",
8640
- label: /* @__PURE__ */ React62.createElement(Tooltip, { title: t("tab.text-output", "Plain text output") }, /* @__PURE__ */ React62.createElement(SubjectOutlined, { fontSize: "small" }))
8939
+ label: /* @__PURE__ */ React65.createElement(Tooltip, { title: t("tab.text-output", "Plain text output") }, /* @__PURE__ */ React65.createElement(SubjectOutlined, { fontSize: "small" }))
8641
8940
  }
8642
- ), /* @__PURE__ */ React62.createElement(
8941
+ ), /* @__PURE__ */ React65.createElement(
8643
8942
  Tab,
8644
8943
  {
8645
8944
  value: "json",
8646
- label: /* @__PURE__ */ React62.createElement(Tooltip, { title: t("tab.json-output", "JSON output") }, /* @__PURE__ */ React62.createElement(DataObjectOutlined, { fontSize: "small" }))
8945
+ label: /* @__PURE__ */ React65.createElement(Tooltip, { title: t("tab.json-output", "JSON output") }, /* @__PURE__ */ React65.createElement(DataObjectOutlined, { fontSize: "small" }))
8647
8946
  }
8648
8947
  ));
8649
8948
  }
@@ -8698,7 +8997,7 @@ function SaveBar({ loadTemplates, saveAs }) {
8698
8997
  return false;
8699
8998
  }
8700
8999
  });
8701
- return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
9000
+ return /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(
8702
9001
  Box,
8703
9002
  {
8704
9003
  sx: {
@@ -8711,7 +9010,7 @@ function SaveBar({ loadTemplates, saveAs }) {
8711
9010
  pb: 3
8712
9011
  }
8713
9012
  },
8714
- /* @__PURE__ */ React62.createElement(
9013
+ /* @__PURE__ */ React65.createElement(
8715
9014
  Box,
8716
9015
  {
8717
9016
  sx: {
@@ -8726,7 +9025,7 @@ function SaveBar({ loadTemplates, saveAs }) {
8726
9025
  boxShadow: "0 2px 6px rgba(33, 36, 67, 0.06), 0 16px 40px rgba(33, 36, 67, 0.14)"
8727
9026
  }
8728
9027
  },
8729
- hasOpenRow && currentTemplateName && /* @__PURE__ */ React62.createElement(
9028
+ hasOpenRow && currentTemplateName && /* @__PURE__ */ React65.createElement(
8730
9029
  Box,
8731
9030
  {
8732
9031
  sx: {
@@ -8742,25 +9041,25 @@ function SaveBar({ loadTemplates, saveAs }) {
8742
9041
  title: currentTemplateName
8743
9042
  },
8744
9043
  isSample ? `${t("savebar.sample-prefix", "Sample")} \xB7 ` : "",
8745
- /* @__PURE__ */ React62.createElement(Box, { component: "span", sx: { color: "text.primary", fontWeight: 600 } }, currentTemplateName)
9044
+ /* @__PURE__ */ React65.createElement(Box, { component: "span", sx: { color: "text.primary", fontWeight: 600 } }, currentTemplateName)
8746
9045
  ),
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(
9046
+ /* @__PURE__ */ React65.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__ */ React65.createElement(
8748
9047
  Button$1,
8749
9048
  {
8750
9049
  variant: "contained",
8751
9050
  size: "large",
8752
- startIcon: /* @__PURE__ */ React62.createElement(SaveOutlined, null),
9051
+ startIcon: /* @__PURE__ */ React65.createElement(SaveOutlined, null),
8753
9052
  onClick: handlePrimary,
8754
9053
  sx: { borderRadius: 999, textTransform: "none", px: 2.5, fontSize: 15, fontWeight: 600 }
8755
9054
  },
8756
9055
  primaryLabel
8757
9056
  )),
8758
- hasOpenRow && saveAs && /* @__PURE__ */ React62.createElement(Tooltip, { title: t("savebar.save-as-new-template", "Save as a new template") }, /* @__PURE__ */ React62.createElement(
9057
+ hasOpenRow && saveAs && /* @__PURE__ */ React65.createElement(Tooltip, { title: t("savebar.save-as-new-template", "Save as a new template") }, /* @__PURE__ */ React65.createElement(
8759
9058
  Button$1,
8760
9059
  {
8761
9060
  variant: "outlined",
8762
9061
  size: "large",
8763
- startIcon: /* @__PURE__ */ React62.createElement(SaveAsOutlined, null),
9062
+ startIcon: /* @__PURE__ */ React65.createElement(SaveAsOutlined, null),
8764
9063
  onClick: () => {
8765
9064
  setNameError(null);
8766
9065
  setDialogMode("save-as");
@@ -8769,12 +9068,12 @@ function SaveBar({ loadTemplates, saveAs }) {
8769
9068
  },
8770
9069
  t("savebar.save-as", "Save as\u2026")
8771
9070
  )),
8772
- saveAs && /* @__PURE__ */ React62.createElement(Tooltip, { title: t("savebar.start-fresh", "Start a fresh template") }, /* @__PURE__ */ React62.createElement(
9071
+ saveAs && /* @__PURE__ */ React65.createElement(Tooltip, { title: t("savebar.start-fresh", "Start a fresh template") }, /* @__PURE__ */ React65.createElement(
8773
9072
  Button$1,
8774
9073
  {
8775
9074
  variant: "text",
8776
9075
  size: "large",
8777
- startIcon: /* @__PURE__ */ React62.createElement(AddOutlined, null),
9076
+ startIcon: /* @__PURE__ */ React65.createElement(AddOutlined, null),
8778
9077
  onClick: () => {
8779
9078
  setNameError(null);
8780
9079
  setDialogMode("new-blank");
@@ -8784,7 +9083,7 @@ function SaveBar({ loadTemplates, saveAs }) {
8784
9083
  t("savebar.new", "New")
8785
9084
  ))
8786
9085
  )
8787
- ), /* @__PURE__ */ React62.createElement(
9086
+ ), /* @__PURE__ */ React65.createElement(
8788
9087
  SaveTemplateDialog,
8789
9088
  {
8790
9089
  open: dialogMode !== null,
@@ -8838,7 +9137,7 @@ function UndoRedoButtons() {
8838
9137
  window.addEventListener("keydown", onKeyDown);
8839
9138
  return () => window.removeEventListener("keydown", onKeyDown);
8840
9139
  }, [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(
9140
+ return /* @__PURE__ */ React65.createElement(Stack, { direction: "row", spacing: 0.5, alignItems: "center" }, /* @__PURE__ */ React65.createElement(Tooltip, { title: `${t("undo.tooltip", "Undo")} (${undoHint})` }, /* @__PURE__ */ React65.createElement("span", null, /* @__PURE__ */ React65.createElement(
8842
9141
  IconButton,
8843
9142
  {
8844
9143
  size: "small",
@@ -8846,8 +9145,8 @@ function UndoRedoButtons() {
8846
9145
  disabled: !canUndo,
8847
9146
  "aria-label": t("undo.label", "Undo")
8848
9147
  },
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(
9148
+ /* @__PURE__ */ React65.createElement(UndoOutlined, { fontSize: "small" })
9149
+ ))), /* @__PURE__ */ React65.createElement(Tooltip, { title: `${t("redo.tooltip", "Redo")} (${redoHint})` }, /* @__PURE__ */ React65.createElement("span", null, /* @__PURE__ */ React65.createElement(
8851
9150
  IconButton,
8852
9151
  {
8853
9152
  size: "small",
@@ -8855,7 +9154,7 @@ function UndoRedoButtons() {
8855
9154
  disabled: !canRedo,
8856
9155
  "aria-label": t("redo.label", "Redo")
8857
9156
  },
8858
- /* @__PURE__ */ React62.createElement(RedoOutlined, { fontSize: "small" })
9157
+ /* @__PURE__ */ React65.createElement(RedoOutlined, { fontSize: "small" })
8859
9158
  ))));
8860
9159
  }
8861
9160
  function SubjectInput() {
@@ -8881,7 +9180,7 @@ function SubjectInput() {
8881
9180
  selectionEnd: (_b = target.selectionEnd) != null ? _b : target.value.length
8882
9181
  });
8883
9182
  };
8884
- return /* @__PURE__ */ React62.createElement(
9183
+ return /* @__PURE__ */ React65.createElement(
8885
9184
  Box,
8886
9185
  {
8887
9186
  sx: {
@@ -8898,8 +9197,8 @@ function SubjectInput() {
8898
9197
  gap: 1.5
8899
9198
  }
8900
9199
  },
8901
- /* @__PURE__ */ React62.createElement(Box, { sx: { color: "text.secondary", fontSize: 13, fontWeight: 600, minWidth: 56 } }, t("subject.label", "Subject")),
8902
- /* @__PURE__ */ React62.createElement(
9200
+ /* @__PURE__ */ React65.createElement(Box, { sx: { color: "text.secondary", fontSize: 13, fontWeight: 600, minWidth: 56 } }, t("subject.label", "Subject")),
9201
+ /* @__PURE__ */ React65.createElement(
8903
9202
  InputBase,
8904
9203
  {
8905
9204
  fullWidth: true,
@@ -8925,7 +9224,7 @@ function SubjectPreview() {
8925
9224
  if (!subject) return null;
8926
9225
  const samples = buildSampleValueMap((_b = data.variables) != null ? _b : []);
8927
9226
  const rendered = substituteSampleValues(subject, samples);
8928
- return /* @__PURE__ */ React62.createElement(
9227
+ return /* @__PURE__ */ React65.createElement(
8929
9228
  Box,
8930
9229
  {
8931
9230
  sx: {
@@ -8942,8 +9241,8 @@ function SubjectPreview() {
8942
9241
  gap: 1.5
8943
9242
  }
8944
9243
  },
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)
9244
+ /* @__PURE__ */ React65.createElement(Box, { sx: { color: "text.secondary", fontSize: 13, fontWeight: 600, minWidth: 56 } }, t("subject.label", "Subject")),
9245
+ /* @__PURE__ */ React65.createElement(Box, { sx: { fontSize: 14 } }, rendered)
8947
9246
  );
8948
9247
  }
8949
9248
  function generateId3() {
@@ -9016,7 +9315,7 @@ function ImageDropPasteHandler({ enabled, children }) {
9016
9315
  window.addEventListener("paste", handlePaste);
9017
9316
  return () => window.removeEventListener("paste", handlePaste);
9018
9317
  }, [active, uploadImage]);
9019
- if (!active) return /* @__PURE__ */ React62.createElement(React62.Fragment, null, children);
9318
+ if (!active) return /* @__PURE__ */ React65.createElement(React65.Fragment, null, children);
9020
9319
  const onDragEnter = (e) => {
9021
9320
  var _a, _b;
9022
9321
  if (!Array.from((_b = (_a = e.dataTransfer) == null ? void 0 : _a.items) != null ? _b : []).some((i) => i.kind === "file")) return;
@@ -9049,7 +9348,7 @@ function ImageDropPasteHandler({ enabled, children }) {
9049
9348
  setUploading(false);
9050
9349
  }
9051
9350
  });
9052
- return /* @__PURE__ */ React62.createElement(
9351
+ return /* @__PURE__ */ React65.createElement(
9053
9352
  Box,
9054
9353
  {
9055
9354
  ref: wrapperRef,
@@ -9060,7 +9359,7 @@ function ImageDropPasteHandler({ enabled, children }) {
9060
9359
  sx: { position: "relative" }
9061
9360
  },
9062
9361
  children,
9063
- (dragging || uploading) && /* @__PURE__ */ React62.createElement(
9362
+ (dragging || uploading) && /* @__PURE__ */ React65.createElement(
9064
9363
  Box,
9065
9364
  {
9066
9365
  sx: {
@@ -9079,7 +9378,7 @@ function ImageDropPasteHandler({ enabled, children }) {
9079
9378
  zIndex: 10
9080
9379
  }
9081
9380
  },
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")
9381
+ /* @__PURE__ */ React65.createElement(Box, { sx: { display: "flex", alignItems: "center", gap: 1, fontWeight: 600, fontSize: 14 } }, /* @__PURE__ */ React65.createElement(CloudUploadOutlined, null), uploading ? "Uploading\u2026" : "Drop image to insert")
9083
9382
  )
9084
9383
  );
9085
9384
  }
@@ -9093,6 +9392,16 @@ function TemplatePanel2({ loadTemplates, saveAs, samplesDrawerEnabled = true })
9093
9392
  const selectedScreenSize = useSelectedScreenSize();
9094
9393
  const persistenceEnabled = usePersistenceEnabled();
9095
9394
  const workspaceBackground = useWorkspaceBackground();
9395
+ const { onTestSend } = useEditorConfig();
9396
+ const handleTestSend = () => {
9397
+ var _a;
9398
+ if (!onTestSend) return;
9399
+ const root = document2.root;
9400
+ const layoutData = root && root.type === "EmailLayout" ? root.data : void 0;
9401
+ const html2 = renderToStaticMarkup(document2, { rootBlockId: "root" });
9402
+ const text = renderToText(document2, { rootBlockId: "root" });
9403
+ onTestSend({ html: html2, text, subject: (_a = layoutData == null ? void 0 : layoutData.subject) != null ? _a : void 0 });
9404
+ };
9096
9405
  let mainBoxSx = {
9097
9406
  height: "100%"
9098
9407
  };
@@ -9119,7 +9428,7 @@ function TemplatePanel2({ loadTemplates, saveAs, samplesDrawerEnabled = true })
9119
9428
  var _a;
9120
9429
  switch (selectedMainTab) {
9121
9430
  case "editor":
9122
- return /* @__PURE__ */ React62.createElement(Box, { sx: mainBoxSx }, /* @__PURE__ */ React62.createElement(EditorBlock, { id: "root" }));
9431
+ return /* @__PURE__ */ React65.createElement(Box, { sx: mainBoxSx }, /* @__PURE__ */ React65.createElement(EditorBlock, { id: "root" }));
9123
9432
  case "preview": {
9124
9433
  const rootBlock = document2.root;
9125
9434
  const layoutData = rootBlock && rootBlock.type === "EmailLayout" ? rootBlock.data : void 0;
@@ -9127,18 +9436,18 @@ function TemplatePanel2({ loadTemplates, saveAs, samplesDrawerEnabled = true })
9127
9436
  (_a = layoutData == null ? void 0 : layoutData.variables) != null ? _a : []
9128
9437
  );
9129
9438
  const previewDoc = applySampleValuesToDocument(document2, samples);
9130
- return /* @__PURE__ */ React62.createElement(Box, { sx: mainBoxSx }, /* @__PURE__ */ React62.createElement(Reader, { document: previewDoc, rootBlockId: "root" }));
9439
+ return /* @__PURE__ */ React65.createElement(Box, { sx: mainBoxSx }, /* @__PURE__ */ React65.createElement(Reader, { document: previewDoc, rootBlockId: "root" }));
9131
9440
  }
9132
9441
  case "html":
9133
- return /* @__PURE__ */ React62.createElement(HtmlPanel, null);
9442
+ return /* @__PURE__ */ React65.createElement(HtmlPanel, null);
9134
9443
  case "text":
9135
- return /* @__PURE__ */ React62.createElement(TextPanel, null);
9444
+ return /* @__PURE__ */ React65.createElement(TextPanel, null);
9136
9445
  case "json":
9137
- return /* @__PURE__ */ React62.createElement(JsonPanel, null);
9446
+ return /* @__PURE__ */ React65.createElement(JsonPanel, null);
9138
9447
  }
9139
9448
  };
9140
9449
  const showSaveButtons = persistenceEnabled;
9141
- return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
9450
+ return /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(
9142
9451
  Stack,
9143
9452
  {
9144
9453
  sx: {
@@ -9155,10 +9464,10 @@ function TemplatePanel2({ loadTemplates, saveAs, samplesDrawerEnabled = true })
9155
9464
  justifyContent: "space-between",
9156
9465
  alignItems: "center"
9157
9466
  },
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(
9467
+ samplesDrawerEnabled && /* @__PURE__ */ React65.createElement(ToggleSamplesPanelButton, null),
9468
+ /* @__PURE__ */ React65.createElement(Stack, { px: 2, direction: "row", gap: 2, width: "100%", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ React65.createElement(Stack, { direction: "row", spacing: 2 }, /* @__PURE__ */ React65.createElement(MainTabsGroup, null)), /* @__PURE__ */ React65.createElement(Stack, { direction: "row", spacing: 2, alignItems: "center" }, selectedMainTab === "editor" && /* @__PURE__ */ React65.createElement(UndoRedoButtons, null), /* @__PURE__ */ React65.createElement(ToggleButtonGroup, { value: selectedScreenSize, exclusive: true, size: "small", onChange: handleScreenSizeChange }, /* @__PURE__ */ React65.createElement(ToggleButton, { value: "desktop" }, /* @__PURE__ */ React65.createElement(Tooltip, { title: t("canvas.desktop-view", "Desktop view") }, /* @__PURE__ */ React65.createElement(MonitorOutlined, { fontSize: "small" }))), /* @__PURE__ */ React65.createElement(ToggleButton, { value: "mobile" }, /* @__PURE__ */ React65.createElement(Tooltip, { title: t("canvas.mobile-view", "Mobile view") }, /* @__PURE__ */ React65.createElement(PhoneIphoneOutlined, { fontSize: "small" })))), onTestSend && /* @__PURE__ */ React65.createElement(Tooltip, { title: t("canvas.send-test", "Send test") }, /* @__PURE__ */ React65.createElement(IconButton, { size: "small", onClick: handleTestSend }, /* @__PURE__ */ React65.createElement(SendOutlined, { fontSize: "small" }))))),
9469
+ /* @__PURE__ */ React65.createElement(ToggleInspectorPanelButton, null)
9470
+ ), selectedMainTab === "editor" && /* @__PURE__ */ React65.createElement(SubjectInput, null), selectedMainTab === "preview" && /* @__PURE__ */ React65.createElement(SubjectPreview, null), /* @__PURE__ */ React65.createElement(ImageDropPasteHandler, { enabled: selectedMainTab === "editor" }, /* @__PURE__ */ React65.createElement(
9162
9471
  Box,
9163
9472
  {
9164
9473
  sx: {
@@ -9174,8 +9483,8 @@ function TemplatePanel2({ loadTemplates, saveAs, samplesDrawerEnabled = true })
9174
9483
  background: selectedMainTab === "editor" ? workspaceBackground === "checkerboard" ? WORKSPACE_CHECKERBOARD : WORKSPACE_SOLID : void 0
9175
9484
  }
9176
9485
  },
9177
- /* @__PURE__ */ React62.createElement(Box, { sx: { flexGrow: 1 } }, renderMainPanel()),
9178
- showSaveButtons && selectedMainTab === "editor" && /* @__PURE__ */ React62.createElement(SaveBar, { loadTemplates, saveAs })
9486
+ /* @__PURE__ */ React65.createElement(Box, { sx: { flexGrow: 1 } }, renderMainPanel()),
9487
+ showSaveButtons && selectedMainTab === "editor" && /* @__PURE__ */ React65.createElement(SaveBar, { loadTemplates, saveAs })
9179
9488
  )));
9180
9489
  }
9181
9490
 
@@ -9257,7 +9566,7 @@ var EmailEditorInternal = forwardRef((props, ref) => {
9257
9566
  return getDocument();
9258
9567
  }
9259
9568
  }));
9260
- return /* @__PURE__ */ React62.createElement(Stack, { position: "relative", id: "drawer-container", sx: { minHeight } }, /* @__PURE__ */ React62.createElement(
9569
+ return /* @__PURE__ */ React65.createElement(Stack, { position: "relative", id: "drawer-container", sx: { minHeight } }, /* @__PURE__ */ React65.createElement(
9261
9570
  InspectorDrawer,
9262
9571
  {
9263
9572
  enterDuration: drawerEnterDuration,
@@ -9266,7 +9575,7 @@ var EmailEditorInternal = forwardRef((props, ref) => {
9266
9575
  copyTemplate,
9267
9576
  renameTemplate
9268
9577
  }
9269
- ), /* @__PURE__ */ React62.createElement(
9578
+ ), /* @__PURE__ */ React65.createElement(
9270
9579
  SamplesDrawer,
9271
9580
  {
9272
9581
  enterDuration: drawerEnterDuration,
@@ -9282,7 +9591,7 @@ var EmailEditorInternal = forwardRef((props, ref) => {
9282
9591
  setTemplateKind,
9283
9592
  saveAs
9284
9593
  }
9285
- ), /* @__PURE__ */ React62.createElement(
9594
+ ), /* @__PURE__ */ React65.createElement(
9286
9595
  Stack,
9287
9596
  {
9288
9597
  sx: {
@@ -9291,7 +9600,7 @@ var EmailEditorInternal = forwardRef((props, ref) => {
9291
9600
  transition: [marginLeftTransition, marginRightTransition].join(", ")
9292
9601
  }
9293
9602
  },
9294
- /* @__PURE__ */ React62.createElement(TemplatePanel2, { loadTemplates, saveAs, samplesDrawerEnabled })
9603
+ /* @__PURE__ */ React65.createElement(TemplatePanel2, { loadTemplates, saveAs, samplesDrawerEnabled })
9295
9604
  ));
9296
9605
  });
9297
9606
  var EmailEditor = forwardRef((props, ref) => {
@@ -9318,7 +9627,10 @@ var EmailEditor = forwardRef((props, ref) => {
9318
9627
  loadImages,
9319
9628
  deleteImage,
9320
9629
  theme,
9321
- locale
9630
+ locale,
9631
+ favoriteColors,
9632
+ customBlocks,
9633
+ onTestSend
9322
9634
  } = props;
9323
9635
  activateLocale(locale);
9324
9636
  const resolvedTemplate = useMemo(
@@ -9337,7 +9649,11 @@ var EmailEditor = forwardRef((props, ref) => {
9337
9649
  () => ({ uploadImage, loadImages, deleteImage }),
9338
9650
  [uploadImage, loadImages, deleteImage]
9339
9651
  );
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(
9652
+ const editorConfig = useMemo(
9653
+ () => ({ favoriteColors, customBlocks, onTestSend }),
9654
+ [favoriteColors, customBlocks, onTestSend]
9655
+ );
9656
+ return /* @__PURE__ */ React65.createElement(I18nProvider, { i18n }, /* @__PURE__ */ React65.createElement(ThemeProvider, { theme: theme || theme_default }, /* @__PURE__ */ React65.createElement(CssBaseline, null), /* @__PURE__ */ React65.createElement("div", { style: { height: "100%", overflow: "auto" } }, /* @__PURE__ */ React65.createElement(SnackbarProvider, null, /* @__PURE__ */ React65.createElement(EditorConfigProvider, { config: editorConfig }, /* @__PURE__ */ React65.createElement(ImageCallbacksProvider, { callbacks: imageCallbacks }, /* @__PURE__ */ React65.createElement(
9341
9657
  EmailEditorProvider,
9342
9658
  {
9343
9659
  initialTemplate: resolvedTemplate,
@@ -9346,7 +9662,7 @@ var EmailEditor = forwardRef((props, ref) => {
9346
9662
  onSave,
9347
9663
  onChange
9348
9664
  },
9349
- /* @__PURE__ */ React62.createElement(
9665
+ /* @__PURE__ */ React65.createElement(
9350
9666
  EmailEditorInternal,
9351
9667
  {
9352
9668
  ref,
@@ -9365,11 +9681,11 @@ var EmailEditor = forwardRef((props, ref) => {
9365
9681
  onChange
9366
9682
  }
9367
9683
  )
9368
- ))))));
9684
+ )))))));
9369
9685
  });
9370
9686
  EmailEditor.displayName = "EmailEditor";
9371
9687
  EmailEditorInternal.displayName = "EmailEditorInternal";
9372
9688
 
9373
- export { avatar_default as Avatar, AvatarProps, AvatarPropsDefaults, AvatarPropsSchema, BlockConfiguration, button_default as Button, ButtonProps, ButtonPropsDefaults, ButtonPropsSchema, columns_container_default as ColumnsContainer, ColumnsContainerProps, ColumnsContainerPropsSchema, ColumnsContainerReader, container_default as Container, ContainerProps, ContainerPropsSchema, ContainerReader, divider_default as Divider, DividerProps, DividerPropsDefaults, DividerPropsSchema, DocumentBlocksDictionary, EmailEditor, EmailEditorProvider, EmailLayoutPropsSchema, EmailLayoutReader, EmailMarkdown, heading_default as Heading, HeadingProps, HeadingPropsDefaults, HeadingPropsSchema, html_default as Html, HtmlProps, HtmlPropsSchema, image_default as Image, ImageProps, ImagePropsSchema, Reader, ReaderBlock, ReaderBlockSchema, ReaderDocumentSchema, SUPPORTED_LOCALES, signature_default as Signature, SignatureProps, SignaturePropsDefaults, SignaturePropsSchema, spacer_default as Spacer, SpacerProps, SpacerPropsDefaults, SpacerPropsSchema, TemplateVariableSchema, Text, TextProps, TextPropsDefaults, TextPropsSchema, buildBlockComponent, buildBlockConfigurationDictionary, buildBlockConfigurationSchema, editorHandlebars, evaluateHandlebars, htmlToEditorConfig, renderToStaticMarkup, renderToText, theme_default as theme, useEmailEditor };
9689
+ export { avatar_default as Avatar, AvatarProps, AvatarPropsDefaults, AvatarPropsSchema, BlockConfiguration, button_default as Button, ButtonProps, ButtonPropsDefaults, ButtonPropsSchema, columns_container_default as ColumnsContainer, ColumnsContainerProps, ColumnsContainerPropsSchema, ColumnsContainerReader, container_default as Container, ContainerProps, ContainerPropsSchema, ContainerReader, divider_default as Divider, DividerProps, DividerPropsDefaults, DividerPropsSchema, DocumentBlocksDictionary, EmailEditor, EmailEditorProvider, EmailLayoutPropsSchema, EmailLayoutReader, EmailMarkdown, heading_default as Heading, HeadingProps, HeadingPropsDefaults, HeadingPropsSchema, html_default as Html, HtmlProps, HtmlPropsSchema, image_default as Image, ImageProps, ImagePropsSchema, otp_default as Otp, OtpProps, OtpPropsDefaults, OtpPropsSchema, Reader, ReaderBlock, ReaderBlockSchema, ReaderDocumentSchema, SUPPORTED_LOCALES, signature_default as Signature, SignatureProps, SignaturePropsDefaults, SignaturePropsSchema, spacer_default as Spacer, SpacerProps, SpacerPropsDefaults, SpacerPropsSchema, TemplateVariableSchema, Text, TextProps, TextPropsDefaults, TextPropsSchema, buildBlockComponent, buildBlockConfigurationDictionary, buildBlockConfigurationSchema, editorHandlebars, evaluateHandlebars, htmlToEditorConfig, renderToStaticMarkup, renderToText, theme_default as theme, useEmailEditor };
9374
9690
  //# sourceMappingURL=index.js.map
9375
9691
  //# sourceMappingURL=index.js.map