@templatical/editor 0.21.2 → 0.23.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.
Files changed (145) hide show
  1. package/README.md +1 -1
  2. package/dist/{AiChatSidebar-K_AehWc-.js → AiChatSidebar-Bru6-ziQ.js} +1 -1
  3. package/dist/{AiFeatureMenu-CcqQDHzJ.js → AiFeatureMenu-CcqjRMFW.js} +1 -1
  4. package/dist/{SavedBlockPreviewCanvas-2-mzAnZE.js → BlockPreviewCanvas-MD9BGuXV.js} +36 -30
  5. package/dist/{CloudEditor-DOjGJwPe.js → CloudEditor-iK4vkpNm.js} +275 -279
  6. package/dist/{CollaboratorBar-Bj4NZiie.js → CollaboratorBar-C_1SF7Xf.js} +1 -1
  7. package/dist/{DesignReferenceSidebar-DNmK3dxp.js → DesignReferenceSidebar-BxPo0zyx.js} +1 -1
  8. package/dist/{MergeTagSuggestion-DMe4rqn0.js → MergeTagSuggestion-D9eCryMC.js} +2 -2
  9. package/dist/{ParagraphEditor--_zWfxps.js → ParagraphEditor-MKJYyWN9.js} +13 -13
  10. package/dist/{SaveBlockDialog-CYIEHABH.js → SaveBlockDialog-CFAJHP3v.js} +99 -98
  11. package/dist/{SavedBlocksBrowserModal-D5V5yF_3.js → SavedBlocksBrowserModal-C_-Xcm0Q.js} +4 -4
  12. package/dist/{SavedBlocksPanels-Dff38YXu.js → SavedBlocksPanels-CRf7zzFn.js} +1 -1
  13. package/dist/{SavedBlocksPickBar-rB6iyji6.js → SavedBlocksPickBar-C1FTJP-I.js} +1 -1
  14. package/dist/{SnapshotHistory-FtzDq8f0.js → SnapshotHistory-DWlQ3Eh0.js} +1 -1
  15. package/dist/TestEmailModal-D90-3Yex.js +162 -0
  16. package/dist/TestEmailPanel-B0u_Yd3X.js +33 -0
  17. package/dist/{TitleEditor-CPda5lh-.js → TitleEditor-DzsPxKv4.js} +5 -5
  18. package/dist/{TplModal-C7Koj5gM.js → TplModal-CykwWFhF.js} +1 -1
  19. package/dist/ViewportToggle-BjmbNoao.js +97 -0
  20. package/dist/{blockTypeIcons-CgwECCut.js → blockTypeIcons-CpKkI47V.js} +1 -1
  21. package/dist/bundle-stats.json +8 -8
  22. package/dist/{ca-BBgad6y5.js → ca-D47BxSGu.js} +14 -0
  23. package/dist/cdn/chunks/{AiChatSidebar-A1CuWGY0.js → AiChatSidebar-BMnsF8G6.js} +2 -2
  24. package/dist/cdn/chunks/{AiChatSidebar-A1CuWGY0.js.map → AiChatSidebar-BMnsF8G6.js.map} +1 -1
  25. package/dist/cdn/chunks/{AiFeatureMenu-Duwg413F.js → AiFeatureMenu-hWgWQg11.js} +2 -2
  26. package/dist/cdn/chunks/{AiFeatureMenu-Duwg413F.js.map → AiFeatureMenu-hWgWQg11.js.map} +1 -1
  27. package/dist/cdn/chunks/{SavedBlockPreviewCanvas-DZOMgNsz.js → BlockPreviewCanvas-eASrdFSN.js} +37 -31
  28. package/dist/cdn/chunks/BlockPreviewCanvas-eASrdFSN.js.map +1 -0
  29. package/dist/cdn/chunks/{CloudEditor-C0Y4RD4c.js → CloudEditor-S8zLHtKb.js} +253 -257
  30. package/dist/cdn/chunks/CloudEditor-S8zLHtKb.js.map +1 -0
  31. package/dist/cdn/chunks/{CollaboratorBar-BS3rJy6-.js → CollaboratorBar-mkJVAkSh.js} +2 -2
  32. package/dist/cdn/chunks/{CollaboratorBar-BS3rJy6-.js.map → CollaboratorBar-mkJVAkSh.js.map} +1 -1
  33. package/dist/cdn/chunks/{DesignReferenceSidebar-Dre99DTH.js → DesignReferenceSidebar-CM-k15pd.js} +2 -2
  34. package/dist/cdn/chunks/{DesignReferenceSidebar-Dre99DTH.js.map → DesignReferenceSidebar-CM-k15pd.js.map} +1 -1
  35. package/dist/cdn/chunks/{MergeTagSuggestion-D7TsECll.js → MergeTagSuggestion-BM349_QH.js} +2 -2
  36. package/dist/cdn/chunks/{MergeTagSuggestion-D7TsECll.js.map → MergeTagSuggestion-BM349_QH.js.map} +1 -1
  37. package/dist/cdn/chunks/{ParagraphEditor-CtaRa1vr.js → ParagraphEditor-J-1RLyi7.js} +14 -14
  38. package/dist/cdn/chunks/{ParagraphEditor-CtaRa1vr.js.map → ParagraphEditor-J-1RLyi7.js.map} +1 -1
  39. package/dist/cdn/chunks/{SaveBlockDialog-Bb3fdUEZ.js → SaveBlockDialog-Bi_Z3kuA.js} +100 -99
  40. package/dist/cdn/chunks/SaveBlockDialog-Bi_Z3kuA.js.map +1 -0
  41. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CeUWcPv0.js → SavedBlocksBrowserModal-CesYxFsH.js} +4 -4
  42. package/dist/cdn/chunks/SavedBlocksBrowserModal-CesYxFsH.js.map +1 -0
  43. package/dist/cdn/chunks/{SavedBlocksPanels-D-pA_wfk.js → SavedBlocksPanels-BsSpJwrW.js} +2 -2
  44. package/dist/cdn/chunks/{SavedBlocksPanels-D-pA_wfk.js.map → SavedBlocksPanels-BsSpJwrW.js.map} +1 -1
  45. package/dist/cdn/chunks/{SavedBlocksPickBar-1rf1KpqS.js → SavedBlocksPickBar-CduR1Cpb.js} +2 -2
  46. package/dist/cdn/chunks/{SavedBlocksPickBar-1rf1KpqS.js.map → SavedBlocksPickBar-CduR1Cpb.js.map} +1 -1
  47. package/dist/cdn/chunks/{SnapshotHistory-Bf1uovti.js → SnapshotHistory-DO-gzr3i.js} +2 -2
  48. package/dist/cdn/chunks/{SnapshotHistory-Bf1uovti.js.map → SnapshotHistory-DO-gzr3i.js.map} +1 -1
  49. package/dist/cdn/chunks/TestEmailModal-CCWEVrE2.js +162 -0
  50. package/dist/cdn/chunks/TestEmailModal-CCWEVrE2.js.map +1 -0
  51. package/dist/cdn/chunks/TestEmailPanel-048m0kxX.js +35 -0
  52. package/dist/cdn/chunks/TestEmailPanel-048m0kxX.js.map +1 -0
  53. package/dist/cdn/chunks/{TitleEditor-BJ7LFykI.js → TitleEditor-J1vgU_J6.js} +6 -6
  54. package/dist/cdn/chunks/{TitleEditor-BJ7LFykI.js.map → TitleEditor-J1vgU_J6.js.map} +1 -1
  55. package/dist/cdn/chunks/{TplModal-CH9RzKF7.js → TplModal-BN53d9Se.js} +2 -2
  56. package/dist/cdn/chunks/{TplModal-CH9RzKF7.js.map → TplModal-BN53d9Se.js.map} +1 -1
  57. package/dist/cdn/chunks/ViewportToggle-CFmF-N4i.js +66 -0
  58. package/dist/cdn/chunks/ViewportToggle-CFmF-N4i.js.map +1 -0
  59. package/dist/cdn/chunks/{ca-BBgad6y5.js → ca-D47BxSGu.js} +15 -1
  60. package/dist/cdn/chunks/{ca-BBgad6y5.js.map → ca-D47BxSGu.js.map} +1 -1
  61. package/dist/cdn/chunks/{cloud-BJlbXGTJ.js → cloud-F-aVi9hj.js} +45 -41
  62. package/dist/cdn/chunks/cloud-F-aVi9hj.js.map +1 -0
  63. package/dist/{de-D7WbpFBR.js → cdn/chunks/de-CnnxBwh7.js} +16 -0
  64. package/dist/cdn/chunks/{de-D7WbpFBR.js.map → de-CnnxBwh7.js.map} +1 -1
  65. package/dist/{de-Bw6fB5JU.js → cdn/chunks/de-uVoSP1xF.js} +2 -9
  66. package/dist/cdn/chunks/de-uVoSP1xF.js.map +1 -0
  67. package/dist/cdn/chunks/emailFrameWidth-BmFCN2dp.js +8 -0
  68. package/dist/cdn/chunks/emailFrameWidth-BmFCN2dp.js.map +1 -0
  69. package/dist/{en-BrZ0uGK2.js → cdn/chunks/en-5gW-bYy2.js} +16 -0
  70. package/dist/cdn/chunks/{en-BrZ0uGK2.js.map → en-5gW-bYy2.js.map} +1 -1
  71. package/dist/{en-DAdHJz7h.js → cdn/chunks/en-CjhsJxb-.js} +2 -9
  72. package/dist/cdn/chunks/en-CjhsJxb-.js.map +1 -0
  73. package/dist/{es-tLSLysPs.js → cdn/chunks/es-sQ9SdI0l.js} +16 -0
  74. package/dist/cdn/chunks/{es-tLSLysPs.js.map → es-sQ9SdI0l.js.map} +1 -1
  75. package/dist/cdn/chunks/{extensions-ZX2oarW6.js → extensions-C49c51P1.js} +3 -3
  76. package/dist/cdn/chunks/{extensions-ZX2oarW6.js.map → extensions-C49c51P1.js.map} +1 -1
  77. package/dist/cdn/chunks/fr-DBZ5w21C.js +624 -0
  78. package/dist/cdn/chunks/fr-DBZ5w21C.js.map +1 -0
  79. package/dist/cdn/chunks/fr-Dswns199.js +89 -0
  80. package/dist/cdn/chunks/fr-Dswns199.js.map +1 -0
  81. package/dist/cdn/chunks/nl-CbcPJlrL.js +89 -0
  82. package/dist/cdn/chunks/nl-CbcPJlrL.js.map +1 -0
  83. package/dist/cdn/chunks/nl-DOL7Fnfo.js +624 -0
  84. package/dist/cdn/chunks/nl-DOL7Fnfo.js.map +1 -0
  85. package/dist/{pt-BR-w2sGzHNX.js → cdn/chunks/pt-BR-CTzHTqJD.js} +2 -9
  86. package/dist/cdn/chunks/pt-BR-CTzHTqJD.js.map +1 -0
  87. package/dist/cdn/chunks/{pt-BR-BWFokdTU.js → pt-BR-DRCdHX1d.js} +15 -1
  88. package/dist/cdn/chunks/{pt-BR-BWFokdTU.js.map → pt-BR-DRCdHX1d.js.map} +1 -1
  89. package/dist/cdn/chunks/{src-D6F_3XkE.js → src-CzoMNRq4.js} +19 -17
  90. package/dist/cdn/chunks/{src-D6F_3XkE.js.map → src-CzoMNRq4.js.map} +1 -1
  91. package/dist/cdn/chunks/{src-BuC_IHzN.js → src-SluTVSz_.js} +2 -2
  92. package/dist/cdn/chunks/{src-BuC_IHzN.js.map → src-SluTVSz_.js.map} +1 -1
  93. package/dist/cdn/chunks/{styles-DMOEiSX9.js → styles-BbfU2w9R.js} +617 -585
  94. package/dist/cdn/chunks/styles-BbfU2w9R.js.map +1 -0
  95. package/dist/cdn/chunks/{tiptap-BMZ-OENR.js → tiptap-DUTbZTeR.js} +5 -5
  96. package/dist/cdn/chunks/{tiptap-BMZ-OENR.js.map → tiptap-DUTbZTeR.js.map} +1 -1
  97. package/dist/cdn/chunks/{useEditorCore-BA6mspzD.js → useEditorCore-CzMhD6Gd.js} +3 -3
  98. package/dist/cdn/chunks/{useEditorCore-BA6mspzD.js.map → useEditorCore-CzMhD6Gd.js.map} +1 -1
  99. package/dist/cdn/editor.css +1 -1
  100. package/dist/cdn/editor.js +164 -145
  101. package/dist/cdn/editor.js.map +1 -1
  102. package/dist/{cloud-Du7mnkz2.js → cloud-CeZPgo1V.js} +41 -39
  103. package/dist/{cdn/chunks/de-D7WbpFBR.js → de-CnnxBwh7.js} +14 -2
  104. package/dist/{cdn/chunks/de-Bw6fB5JU.js → de-uVoSP1xF.js} +0 -11
  105. package/dist/{dist-CDO52Rxy.js → dist-3DHaYEiT.js} +2 -2
  106. package/dist/{dist-BEpCh2mG.js → dist-3HenmYIg.js} +1 -1
  107. package/dist/{dist-CrjzhIxB.js → dist-BCnJcAQc.js} +2 -2
  108. package/dist/{dist-BgPYC_8-.js → dist-B_etKYyh.js} +5 -5
  109. package/dist/{dist-CBzCU-a-.js → dist-CL_CfQ3Q.js} +2 -2
  110. package/dist/dist-CcQLJeWV.js +5 -0
  111. package/dist/{dist-CuXha2_7.js → dist-CclnU_v0.js} +2 -2
  112. package/dist/{dist-BkM8A17N.js → dist-DKWoZJAV.js} +2 -2
  113. package/dist/{dist-DYClLqy8.js → dist-DOtLGnLr.js} +2 -2
  114. package/dist/dist-DerdmERj.js +5 -0
  115. package/dist/{dist-BuNDAAVp.js → dist-Ih7ejWzn.js} +2 -2
  116. package/dist/{dist-CtcgoC_R.js → dist-bivrM-nS.js} +2 -2
  117. package/dist/emailFrameWidth-BmFCN2dp.js +6 -0
  118. package/dist/{cdn/chunks/en-BrZ0uGK2.js → en-5gW-bYy2.js} +14 -2
  119. package/dist/{cdn/chunks/en-DAdHJz7h.js → en-CjhsJxb-.js} +0 -11
  120. package/dist/{cdn/chunks/es-tLSLysPs.js → es-sQ9SdI0l.js} +14 -2
  121. package/dist/{extensions-ClY5Sh7S.js → extensions-3870a_3R.js} +3 -3
  122. package/dist/fr-DBZ5w21C.js +622 -0
  123. package/dist/index.d.ts +74 -0
  124. package/dist/nl-DOL7Fnfo.js +622 -0
  125. package/dist/{cdn/chunks/pt-BR-w2sGzHNX.js → pt-BR-CTzHTqJD.js} +0 -11
  126. package/dist/{pt-BR-BWFokdTU.js → pt-BR-DRCdHX1d.js} +14 -0
  127. package/dist/style.css +1 -1
  128. package/dist/{styles-PcOPXvLO.js → styles-BWTIgN5L.js} +672 -673
  129. package/dist/templatical-editor.js +128 -108
  130. package/dist/{useEditorCore-CT1slufs.js → useEditorCore-CuMMIfiS.js} +2 -2
  131. package/package.json +20 -20
  132. package/dist/TestEmailModal-DL2O1H8M.js +0 -95
  133. package/dist/cdn/chunks/CloudEditor-C0Y4RD4c.js.map +0 -1
  134. package/dist/cdn/chunks/SaveBlockDialog-Bb3fdUEZ.js.map +0 -1
  135. package/dist/cdn/chunks/SavedBlockPreviewCanvas-DZOMgNsz.js.map +0 -1
  136. package/dist/cdn/chunks/SavedBlocksBrowserModal-CeUWcPv0.js.map +0 -1
  137. package/dist/cdn/chunks/TestEmailModal-BJTDxFHh.js +0 -96
  138. package/dist/cdn/chunks/TestEmailModal-BJTDxFHh.js.map +0 -1
  139. package/dist/cdn/chunks/cloud-BJlbXGTJ.js.map +0 -1
  140. package/dist/cdn/chunks/de-Bw6fB5JU.js.map +0 -1
  141. package/dist/cdn/chunks/en-DAdHJz7h.js.map +0 -1
  142. package/dist/cdn/chunks/pt-BR-w2sGzHNX.js.map +0 -1
  143. package/dist/cdn/chunks/styles-DMOEiSX9.js.map +0 -1
  144. package/dist/dist-CweLDZrs.js +0 -5
  145. package/dist/dist-DOsdqAEZ.js +0 -5
@@ -1,26 +1,27 @@
1
1
  import { $ as e, A as t, H as n, J as r, M as i, N as a, P as o, V as s, Z as c, _ as l, b as u, ct as d, f, g as p, h as m, it as h, j as g, l as _, m as v, n as y, ot as b, p as x, s as S, st as C, u as w, v as T, x as E, y as D, z as O } from "./draggable-D840DIZB.js";
2
2
  import { t as k } from "./timeouts-Bmi_yePw.js";
3
3
  import { F as A } from "./src-BKI1x1k7.js";
4
- import { T as j, b as M, j as N, t as P } from "./useEditorCore-BA6mspzD.js";
5
- import { _ as F } from "./dist-CiBEt0VR.js";
6
- import { t as I } from "./dist-CxTt8FRE.js";
7
- import { A as L, F as R, c as z, r as B, s as V, t as H, u as ee } from "./keys-D7kUmfpE.js";
8
- import { t as U } from "./useI18n-8Wd7G-cq.js";
9
- import { At as W, Dt as G, F as te, Ft as K, P as q, et as J, j as ne, rt as Y, u as re, w as ie } from "./icons-CYWw8Xfp.js";
4
+ import { T as j, b as M, j as ee, t as N } from "./useEditorCore-CzMhD6Gd.js";
5
+ import { _ as P } from "./dist-CiBEt0VR.js";
6
+ import { t as F } from "./dist-CxTt8FRE.js";
7
+ import { A as I, F as te, c as L, r as R, s as z, t as B, u as ne } from "./keys-D7kUmfpE.js";
8
+ import { t as V } from "./useI18n-8Wd7G-cq.js";
9
+ import { At as H, Dt as U, F as W, Ft as G, P as K, et as q, j as J, rt as Y, u as re, w as ie } from "./icons-CYWw8Xfp.js";
10
10
  import { t as ae } from "./_plugin-vue_export-helper-B3ysoDQm.js";
11
11
  import { n as X } from "./useCloudI18n-BjNENqkM.js";
12
- import { a as Z, c as oe, d as se, f as Q, i as ce, l as le, n as ue, o as de, p as fe, r as pe, s as me, t as he, u as ge } from "./styles-DMOEiSX9.js";
12
+ import { a as Z, c as oe, d as Q, f as se, i as ce, l as le, m as ue, n as de, o as fe, p as pe, r as me, s as he, t as ge, u as _e } from "./styles-BbfU2w9R.js";
13
13
  import { d as $ } from "./ColorPicker-DZSzZ5ZP.js";
14
- import { S as _e, _ as ve, a as ye, c as be, d as xe, f as Se, h as Ce, i as we, l as Te, m as Ee, n as De, o as Oe, r as ke, s as Ae, t as je, u as Me, v as Ne } from "./cloud-BJlbXGTJ.js";
14
+ import { t as ve } from "./ViewportToggle-CFmF-N4i.js";
15
+ import { C as ye, a as be, c as xe, d as Se, f as Ce, g as we, h as Te, i as Ee, l as De, n as Oe, o as ke, p as Ae, r as je, s as Me, t as Ne, u as Pe, v as Fe, y as Ie } from "./cloud-F-aVi9hj.js";
15
16
  //#region src/cloud/composables/useSnapshotPreview.ts
16
- function Pe(t) {
17
+ function Le(t) {
17
18
  let { authManager: n, editor: i, history: a, conditionPreview: o, autoSave: s, onError: l } = t, u = e(null), d = c(null), p = c(null), m = !1;
18
19
  r(() => {
19
20
  m = !0;
20
21
  });
21
22
  let h = f(() => d.value !== null), g = f(() => u.value?.snapshots.value ?? []), _ = f(() => u.value?.isLoading.value ?? !1), v = f(() => u.value?.isRestoring.value ?? !1);
22
23
  function y() {
23
- i.state.template?.id && !u.value && (u.value = Oe({
24
+ i.state.template?.id && !u.value && (u.value = Me({
24
25
  authManager: n,
25
26
  templateId: i.state.template.id,
26
27
  onRestore: b,
@@ -72,7 +73,7 @@ function Pe(t) {
72
73
  }
73
74
  //#endregion
74
75
  //#region src/cloud/composables/useCloudPanelState.ts
75
- function Fe() {
76
+ function Re() {
76
77
  let e = c(null), t = f({
77
78
  get: () => e.value === "ai-chat",
78
79
  set: (t) => e.value = t ? "ai-chat" : null
@@ -85,40 +86,39 @@ function Fe() {
85
86
  }), i = f({
86
87
  get: () => e.value === "comments",
87
88
  set: (t) => e.value = t ? "comments" : null
88
- }), a = c(!1), o = c(!1), s = c(void 0), l = c(!1), u = c(null), d = f(() => e.value !== null), p = f(() => {
89
+ }), a = c(!1), o = c(void 0), s = c(!1), l = c(null), u = f(() => e.value !== null), d = f(() => {
89
90
  let t = e.value;
90
91
  return t === "ai-chat" || t === "design-reference" || t === "scoring" ? t : null;
91
- }), m = f(() => l.value || e.value === "ai-chat" || e.value === "design-reference" || e.value === "scoring");
92
- function h() {
93
- l.value = !l.value;
92
+ }), p = f(() => s.value || e.value === "ai-chat" || e.value === "design-reference" || e.value === "scoring");
93
+ function m() {
94
+ s.value = !s.value;
94
95
  }
95
- function g(t) {
96
- l.value = !1, e.value = e.value === t ? null : t;
96
+ function h(t) {
97
+ s.value = !1, e.value = e.value === t ? null : t;
97
98
  }
98
- return I(u, () => {
99
- l.value = !1;
99
+ return F(l, () => {
100
+ s.value = !1;
100
101
  }), {
101
102
  activePanel: e,
102
103
  aiChatOpen: t,
103
104
  scoringPanelOpen: n,
104
105
  designReferenceOpen: r,
105
106
  commentsOpen: i,
106
- testEmailModalOpen: a,
107
- mediaLibraryOpen: o,
108
- mediaLibraryAccept: s,
109
- aiMenuOpen: l,
110
- aiMenuRef: u,
111
- rightPanelOpen: d,
112
- activeAiFeature: p,
113
- aiButtonActive: m,
114
- toggleAiMenu: h,
115
- handleAiFeatureSelect: g
107
+ mediaLibraryOpen: a,
108
+ mediaLibraryAccept: o,
109
+ aiMenuOpen: s,
110
+ aiMenuRef: l,
111
+ rightPanelOpen: u,
112
+ activeAiFeature: d,
113
+ aiButtonActive: p,
114
+ toggleAiMenu: m,
115
+ handleAiFeatureSelect: h
116
116
  };
117
117
  }
118
118
  //#endregion
119
119
  //#region src/cloud/composables/useCollabUndoWarning.ts
120
- function Ie(e) {
121
- let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i = c(!1), a = c(!1), { start: o } = F(() => {
120
+ function ze(e) {
121
+ let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i = c(!1), a = c(!1), { start: o } = P(() => {
122
122
  a.value = !1;
123
123
  }, k, { immediate: !1 });
124
124
  function s() {
@@ -131,8 +131,8 @@ function Ie(e) {
131
131
  }
132
132
  //#endregion
133
133
  //#region src/cloud/composables/useCloudFeatureFlags.ts
134
- function Le(e) {
135
- let { planConfigInstance: t, aiConfig: n, editor: r } = e, i = f(() => t.hasFeature("ai_generation") && n.hasAnyMenuFeature.value), a = f(() => t.hasFeature("test_email")), o = f(() => !!r.state.template?.id), s = f(() => t.hasFeature("white_label")), l = f(() => t.config.value?.limits.max_templates ?? null), u = f(() => t.config.value?.template_count ?? 0), d = c(!1), p = c("idle"), m = c(""), { start: h } = F(() => {
134
+ function Be(e) {
135
+ let { planConfigInstance: t, aiConfig: n, editor: r } = e, i = f(() => t.hasFeature("ai_generation") && n.hasAnyMenuFeature.value), a = f(() => t.hasFeature("test_email")), o = f(() => !!r.state.template?.id), s = f(() => t.hasFeature("white_label")), l = f(() => t.config.value?.limits.max_templates ?? null), u = f(() => t.config.value?.template_count ?? 0), d = c(!1), p = c("idle"), m = c(""), { start: h } = P(() => {
136
136
  p.value = "idle";
137
137
  }, 3e3, { immediate: !1 });
138
138
  return {
@@ -150,7 +150,7 @@ function Le(e) {
150
150
  }
151
151
  //#endregion
152
152
  //#region src/cloud/composables/useCloudMediaLibrary.ts
153
- function Re(e) {
153
+ function Ve(e) {
154
154
  let { onRequestMedia: t, mediaLibraryOpen: n, mediaLibraryAccept: i, authManager: a, getMediaConfig: o, onError: s } = e, c = null;
155
155
  function l(e) {
156
156
  return {
@@ -184,7 +184,7 @@ function Re(e) {
184
184
  let t = f(e);
185
185
  if (t) return s?.(t), null;
186
186
  try {
187
- let { MediaApiClient: t } = await import("./src-D6F_3XkE.js");
187
+ let { MediaApiClient: t } = await import("./src-CzoMNRq4.js");
188
188
  return l(await new t(a).uploadMedia(e));
189
189
  } catch (e) {
190
190
  return s?.(e), null;
@@ -212,30 +212,30 @@ function Re(e) {
212
212
  }
213
213
  //#endregion
214
214
  //#region src/cloud/composables/useCloudInitialization.ts
215
- function ze(e) {
216
- let { config: t, translations: n, fontsManager: r, emit: i, getCommentsSidebar: o } = e, s = c(!0), l = c(!1), u = c(null), d = !1, p = { value: null }, m = null, h = null, g = new _e({
215
+ function He(e) {
216
+ let { config: t, translations: n, fontsManager: r, emit: i, getCommentsSidebar: o } = e, s = c(!0), l = c(!1), u = c(null), d = !1, p = { value: null }, m = null, h = null, g = new ye({
217
217
  ...t.auth,
218
218
  onError: t.onError
219
- }), _ = ke({
219
+ }), _ = je({
220
220
  authManager: g,
221
221
  onError: t.onError
222
- }), v = c(/* @__PURE__ */ new Map()), y = ve({
222
+ }), v = c(/* @__PURE__ */ new Map()), y = Fe({
223
223
  authManager: g,
224
224
  defaultFontFamily: t.fonts?.defaultFont,
225
225
  templateDefaults: t.templateDefaults,
226
226
  onError: t.onError,
227
227
  lockedBlocks: v
228
- }), b = be({
228
+ }), b = De({
229
229
  authManager: g,
230
230
  onError: t.onError
231
231
  });
232
- t.mcp?.enabled && je({
232
+ t.mcp?.enabled && Ne({
233
233
  editor: y,
234
234
  channel: b.channel,
235
235
  onOperation: t.mcp.onOperation
236
236
  });
237
237
  let x = null;
238
- t.collaboration?.enabled && (x = Me({
238
+ t.collaboration?.enabled && (x = Se({
239
239
  authManager: g,
240
240
  editor: y,
241
241
  channel: b.channel,
@@ -246,8 +246,8 @@ function ze(e) {
246
246
  onBlockUnlocked: t.collaboration.onBlockUnlocked
247
247
  }), O(() => x.lockedBlocks.value, (e) => {
248
248
  v.value = e;
249
- }, { immediate: !0 }), Te(y, x));
250
- let S = f(() => !!t.collaboration?.enabled && _.hasFeature("collaboration")), C = P({
249
+ }, { immediate: !0 }), Pe(y, x));
250
+ let S = f(() => !!t.collaboration?.enabled && _.hasFeature("collaboration")), C = N({
251
251
  editor: y,
252
252
  config: {
253
253
  uiTheme: t.uiTheme,
@@ -283,13 +283,13 @@ function ze(e) {
283
283
  keyboardOptions: { onBeforeUndo: () => h?.showCollabUndoWarning() },
284
284
  editorRoot: e.editorRoot,
285
285
  containerEl: e.containerEl
286
- }), w = Ie({
286
+ }), w = ze({
287
287
  isCollaborationEnabled: S,
288
288
  getCollaboratorCount: () => x?.collaborators.value.length ?? 0,
289
289
  canUndo: C.history.canUndo
290
290
  });
291
291
  h = w;
292
- let T = Pe({
292
+ let T = Le({
293
293
  authManager: g,
294
294
  editor: y,
295
295
  history: C.history,
@@ -298,11 +298,11 @@ function ze(e) {
298
298
  onError: t.onError
299
299
  });
300
300
  m = T;
301
- let E = Fe(), D = Ce(t.ai), k = Le({
301
+ let E = Re(), D = we(t.ai), k = Be({
302
302
  planConfigInstance: _,
303
303
  aiConfig: D,
304
304
  editor: y
305
- }), A = Re({
305
+ }), A = Ve({
306
306
  onRequestMedia: t.onRequestMedia,
307
307
  mediaLibraryOpen: E.mediaLibraryOpen,
308
308
  mediaLibraryAccept: E.mediaLibraryAccept,
@@ -314,19 +314,32 @@ function ze(e) {
314
314
  onBlockMove: y.moveBlock,
315
315
  onBlockAdd: y.addBlock
316
316
  });
317
- let M = we({
317
+ let M = Ee({
318
318
  authManager: g,
319
319
  getFontsConfig: () => t.fonts,
320
320
  canUseCustomFonts: () => _.hasFeature("custom_fonts")
321
- }), F = ye({
321
+ }), P = ke({
322
322
  authManager: g,
323
- getTemplateId: () => y.state.template?.id ?? null,
324
- save: () => y.save(),
325
- exportHtml: (e) => M.exportHtml(e),
323
+ isAuthReady: l
324
+ }), F = t.testEmail ?? null, L = se({
325
+ provider: F ?? be({
326
+ authManager: g,
327
+ getTemplateId: () => y.state.template?.id ?? null,
328
+ save: () => y.save(),
329
+ exportHtml: (e) => M.exportHtml(e),
330
+ allowedEmails: P.allowedEmails,
331
+ getSignature: P.getSignature,
332
+ onBeforeTestEmail: t.onBeforeTestEmail
333
+ }),
334
+ getContent: () => y.content.value,
335
+ renderMjml: () => pe({
336
+ getContent: () => y.content.value,
337
+ renderCustomBlock: C.registry.renderCustomBlock,
338
+ getCustomBlockStylesheet: (e) => C.registry.getDefinition(e)?.stylesheet
339
+ }),
326
340
  onError: t.onError,
327
- isAuthReady: l,
328
- onBeforeTestEmail: t.onBeforeTestEmail
329
- }), I = Se({
341
+ isAvailable: F ? () => !0 : () => P.isEnabled.value && k.canSendTestEmail.value && k.hasTemplateSaved.value
342
+ }), V = Ae({
330
343
  authManager: g,
331
344
  getTemplateId: () => y.state.template?.id ?? null,
332
345
  getSocketId: () => b.getSocketId(),
@@ -335,16 +348,16 @@ function ze(e) {
335
348
  isAuthReady: l,
336
349
  hasCommentingFeature: () => t.commenting !== !1 && _.hasFeature("commenting")
337
350
  });
338
- xe({
339
- comments: I,
351
+ Ce({
352
+ comments: V,
340
353
  channel: b.channel
341
354
  });
342
- let z = typeof t.savedBlocks == "object" && t.savedBlocks !== null ? t.savedBlocks : null, U = fe({
343
- provider: z ?? Ae(g),
355
+ let H = typeof t.savedBlocks == "object" && t.savedBlocks !== null ? t.savedBlocks : null, U = ue({
356
+ provider: H ?? xe(g),
344
357
  editor: y,
345
358
  onError: t.onError,
346
- isAvailable: z ? () => !0 : () => t.savedBlocks !== !1 && _.hasFeature("saved_modules")
347
- }), W = Ee({
359
+ isAvailable: H ? () => !0 : () => t.savedBlocks !== !1 && _.hasFeature("saved_modules")
360
+ }), W = Te({
348
361
  authManager: g,
349
362
  getTemplateId: () => y.state.template?.id ?? null
350
363
  });
@@ -353,31 +366,32 @@ function ze(e) {
353
366
  o()?.filterByBlock(e);
354
367
  });
355
368
  }
356
- a(L, A.handleRequestMedia), a(B, g), a(H, D), a(ee, I), a(R, W), a(V, {
369
+ a(I, A.handleRequestMedia), a(R, g), a(B, D), a(ne, V), a(te, W), a(z, {
357
370
  plan: _,
358
371
  ai: D,
359
372
  comments: {
360
- getBlockCount: (e) => I.commentCountByBlock.value.get(e) ?? 0,
373
+ getBlockCount: (e) => V.commentCountByBlock.value.get(e) ?? 0,
361
374
  openForBlock: G
362
375
  },
363
- savedBlocks: U.capability
376
+ savedBlocks: U.capability,
377
+ testEmail: L.capability
364
378
  });
365
- function te(e) {
379
+ function K(e) {
366
380
  _.hasFeature("theme_customization") && (C.themeOverrides.value = e);
367
381
  }
368
- function K(e) {
382
+ function q(e) {
369
383
  y.setUiTheme(e);
370
384
  }
371
- async function q() {
385
+ async function J() {
372
386
  s.value = !0, u.value = null;
373
387
  try {
374
388
  if (await g.initialize(), d) return;
375
389
  l.value = !0;
376
- let e = await De({ authManager: g });
390
+ let e = await Oe({ authManager: g });
377
391
  if (d) return;
378
392
  if (!e.api.ok) throw Error("Health check failed: API is not reachable");
379
393
  if (!e.auth.ok) throw Error(`Health check failed: authentication error${e.auth.error ? ` - ${e.auth.error}` : ""}`);
380
- if (e.websocket.ok || N.warn("WebSocket health check failed:", e.websocket.error ?? "unknown error", "-- real-time features will be disabled."), await _.fetchConfig(), d) return;
394
+ if (e.websocket.ok || ee.warn("WebSocket health check failed:", e.websocket.error ?? "unknown error", "-- real-time features will be disabled."), await _.fetchConfig(), d) return;
381
395
  r.setCustomFontsEnabled(_.hasFeature("custom_fonts")), t.customBlocks?.length && _.hasFeature("custom_blocks") && C.registerCustomBlocks(t.customBlocks), t.theme && _.hasFeature("theme_customization") && (C.themeOverrides.value = t.theme), i("ready");
382
396
  } catch (e) {
383
397
  if (d) return;
@@ -387,7 +401,7 @@ function ze(e) {
387
401
  d || (s.value = !1);
388
402
  }
389
403
  }
390
- function J() {
404
+ function Y() {
391
405
  d = !0, r.cleanupFontLinks(), b.disconnect(), C.destroy(), t.onUnmount?.();
392
406
  }
393
407
  return {
@@ -406,24 +420,24 @@ function ze(e) {
406
420
  featureFlags: k,
407
421
  mediaLib: A,
408
422
  exporter: M,
409
- testEmail: F,
410
- commentsInstance: I,
423
+ testEmail: L,
424
+ commentsInstance: V,
411
425
  savedBlocks: U,
412
426
  scoringInstance: W,
413
427
  panelState: E,
414
428
  snapshotPreview: T,
415
429
  collabWarning: w,
416
430
  onSaveHook: p,
417
- initialize: q,
418
- destroy: J,
419
- setThemeOverrides: te,
420
- setUiTheme: K,
431
+ initialize: J,
432
+ destroy: Y,
433
+ setThemeOverrides: K,
434
+ setUiTheme: q,
421
435
  openCommentsForBlock: G
422
436
  };
423
437
  }
424
438
  //#endregion
425
439
  //#region src/utils/preRenderCustomBlocks.ts
426
- async function Be(e, t) {
440
+ async function Ue(e, t) {
427
441
  let n = async (e) => {
428
442
  if (A(e)) {
429
443
  let n = e;
@@ -442,10 +456,10 @@ async function Be(e, t) {
442
456
  }
443
457
  //#endregion
444
458
  //#region src/cloud/composables/useCloudLifecycle.ts
445
- function Ve(e) {
459
+ function We(e) {
446
460
  let { config: t, editor: n, websocket: r, planConfigInstance: i, snapshotPreview: a, core: o, exporter: s, featureFlags: c, isDestroyed: l } = e;
447
461
  function u() {
448
- return Ne(i.config.value.websocket);
462
+ return Ie(i.config.value.websocket);
449
463
  }
450
464
  async function d(e) {
451
465
  let i = await n.create(e);
@@ -458,7 +472,7 @@ function Ve(e) {
458
472
  async function p() {
459
473
  c.isSaveExporting.value = !0, c.saveStatus.value = "idle";
460
474
  try {
461
- if (await Be(n.content.value, o.registry), l()) throw Error("Component unmounted during save");
475
+ if (await Ue(n.content.value, o.registry), l()) throw Error("Component unmounted during save");
462
476
  let e = await n.save();
463
477
  if (l()) throw Error("Component unmounted during save");
464
478
  a.initSnapshotHistory(), a.snapshotHistoryInstance.value?.loadSnapshots();
@@ -485,7 +499,7 @@ function Ve(e) {
485
499
  }
486
500
  //#endregion
487
501
  //#region src/cloud/composables/useCloudSaveGate.ts
488
- function He(e) {
502
+ function Ge(e) {
489
503
  let t = c(!1), n = null, r = f(() => e.planConfig.value?.accessibility?.blockOnError === !0), i = f(() => r.value ? e.issues.value.filter((e) => e.severity === "error") : []), a = f(() => i.value.length > 0);
490
504
  async function o(e) {
491
505
  return a.value ? (n = e, t.value = !0, !1) : (await e(), !0);
@@ -508,7 +522,7 @@ function He(e) {
508
522
  }
509
523
  //#endregion
510
524
  //#region src/cloud/components/CloudSaveGateModal.vue?vue&type=script&setup=true&lang.ts
511
- var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl:max-w-md tpl:flex-col tpl:gap-4 tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-5 tpl:shadow-[var(--tpl-shadow-md)]" }, Ge = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ke = { class: "tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]" }, qe = { class: "tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Je = { class: "tpl:m-0 tpl:flex tpl:max-h-64 tpl:list-none tpl:flex-col tpl:gap-1.5 tpl:overflow-y-auto tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-2" }, Ye = { class: "tpl:text-xs tpl:text-[var(--tpl-text)]" }, Xe = { class: "tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Ze = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Qe = /* @__PURE__ */ E({
525
+ var Ke = ["aria-label"], qe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl:max-w-md tpl:flex-col tpl:gap-4 tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-5 tpl:shadow-[var(--tpl-shadow-md)]" }, Je = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ye = { class: "tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Xe = { class: "tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ze = { class: "tpl:m-0 tpl:flex tpl:max-h-64 tpl:list-none tpl:flex-col tpl:gap-1.5 tpl:overflow-y-auto tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-2" }, Qe = { class: "tpl:text-xs tpl:text-[var(--tpl-text)]" }, $e = { class: "tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, et = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, tt = /* @__PURE__ */ E({
512
526
  __name: "CloudSaveGateModal",
513
527
  props: {
514
528
  open: { type: Boolean },
@@ -530,18 +544,18 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
530
544
  "aria-label": h(r).saveGate.title,
531
545
  class: "tpl:fixed tpl:inset-0 tpl:z-50 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/40 tpl:p-6",
532
546
  onClick: a[2] ||= _((e) => n("cancel"), ["self"])
533
- }, [x("div", We, [
534
- x("header", Ge, [D(h(re), {
547
+ }, [x("div", qe, [
548
+ x("header", Je, [D(h(re), {
535
549
  size: 18,
536
550
  "stroke-width": 2,
537
551
  class: "tpl:text-[var(--tpl-warning)]"
538
- }), x("h2", Ke, d(h(r).saveGate.title), 1)]),
539
- x("p", qe, d(h(r).saveGate.body), 1),
540
- x("ul", Je, [(i(!0), p(w, null, o(e.issues, (e) => (i(), p("li", {
552
+ }), x("h2", Ye, d(h(r).saveGate.title), 1)]),
553
+ x("p", Xe, d(h(r).saveGate.body), 1),
554
+ x("ul", Ze, [(i(!0), p(w, null, o(e.issues, (e) => (i(), p("li", {
541
555
  key: `${e.ruleId}-${e.blockId ?? "template"}`,
542
556
  class: "tpl:flex tpl:flex-col tpl:gap-0.5 tpl:rounded tpl:px-2 tpl:py-1.5"
543
- }, [x("span", Ye, d(e.message), 1), x("span", Xe, d(e.ruleId), 1)]))), 128))]),
544
- x("footer", Ze, [x("button", {
557
+ }, [x("span", Qe, d(e.message), 1), x("span", $e, d(e.ruleId), 1)]))), 128))]),
558
+ x("footer", et, [x("button", {
545
559
  type: "button",
546
560
  class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]",
547
561
  onClick: a[0] ||= (e) => n("cancel")
@@ -550,11 +564,11 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
550
564
  class: "tpl:rounded-md tpl:bg-[var(--tpl-danger)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-white",
551
565
  onClick: a[1] ||= (e) => n("confirm")
552
566
  }, d(h(r).saveGate.confirm), 1)])
553
- ])], 8, Ue)) : m("", !0)]),
567
+ ])], 8, Ke)) : m("", !0)]),
554
568
  _: 1
555
569
  }));
556
570
  }
557
- }), $e = {
571
+ }), nt = {
558
572
  class: "tpl-header tpl:absolute tpl:top-0 tpl:right-0 tpl:left-0 tpl:z-50 tpl:grid tpl:h-14 tpl:grid-cols-[1fr_auto_1fr] tpl:items-center tpl:px-4",
559
573
  style: {
560
574
  "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)",
@@ -563,24 +577,24 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
563
577
  "box-shadow": "var(--tpl-shadow-md)",
564
578
  "border-bottom": "1px solid var(--tpl-border)"
565
579
  }
566
- }, et = { class: "tpl-header-left tpl:flex tpl:min-w-[200px] tpl:items-center tpl:gap-3" }, tt = {
580
+ }, rt = { class: "tpl-header-left tpl:flex tpl:min-w-[200px] tpl:items-center tpl:gap-3" }, it = {
567
581
  key: 0,
568
582
  class: "tpl:text-xs tpl:opacity-60 tpl:text-[var(--tpl-text-muted)]"
569
- }, nt = { class: "tpl-header-center tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, rt = { class: "tpl-header-right tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, it = ["data-tooltip"], at = {
583
+ }, at = { class: "tpl-header-center tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, ot = { class: "tpl-header-right tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, st = ["data-tooltip"], ct = {
570
584
  key: 1,
571
585
  "aria-live": "polite",
572
586
  class: "tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-success)]"
573
- }, ot = {
587
+ }, lt = {
574
588
  key: 2,
575
589
  "aria-live": "polite",
576
590
  class: "tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
577
- }, st = ["aria-label", "aria-expanded"], ct = {
591
+ }, ut = ["aria-label", "aria-expanded"], dt = {
578
592
  key: 0,
579
593
  class: "tpl:inline-flex tpl:size-4.5 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[10px] tpl:font-semibold tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]"
580
- }, lt = ["aria-expanded"], ut = {
594
+ }, ft = ["aria-expanded"], pt = {
581
595
  key: 0,
582
596
  class: "tpl:absolute tpl:right-0 tpl:top-full tpl:z-50 tpl:mt-1 tpl:origin-top-right"
583
- }, dt = ["disabled"], ft = ["disabled"], pt = /* @__PURE__ */ E({
597
+ }, mt = ["disabled"], ht = ["disabled"], gt = /* @__PURE__ */ E({
584
598
  __name: "CloudHeader",
585
599
  props: {
586
600
  editor: {},
@@ -598,14 +612,14 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
598
612
  },
599
613
  emits: ["save"],
600
614
  setup(e) {
601
- let t = u(() => import("./CollaboratorBar-BS3rJy6-.js")), n = u(() => import("./SnapshotHistory-Bf1uovti.js")), r = u(() => import("./AiFeatureMenu-Duwg413F.js")), { t: a, format: o } = X();
602
- return (c, l) => (i(), p("header", $e, [
603
- x("div", et, [e.featureFlags.templateLimit.value === null ? m("", !0) : (i(), p("span", tt, d(h(o)(h(a).header.templatesUsed, {
615
+ let t = u(() => import("./CollaboratorBar-mkJVAkSh.js")), n = u(() => import("./SnapshotHistory-DO-gzr3i.js")), r = u(() => import("./AiFeatureMenu-hWgWQg11.js")), { t: a } = V(), { t: o, format: c } = X();
616
+ return (l, u) => (i(), p("header", nt, [
617
+ x("div", rt, [e.featureFlags.templateLimit.value === null ? m("", !0) : (i(), p("span", it, d(h(c)(h(o).header.templatesUsed, {
604
618
  used: e.featureFlags.templateCount.value,
605
619
  max: e.featureFlags.templateLimit.value
606
620
  })), 1))]),
607
- x("div", nt, [
608
- D(de, {
621
+ x("div", at, [
622
+ D(ve, {
609
623
  viewport: e.editor.state.viewport,
610
624
  onChange: e.editor.setViewport
611
625
  }, null, 8, ["viewport", "onChange"]),
@@ -637,22 +651,22 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
637
651
  "onNavigate"
638
652
  ])) : m("", !0)
639
653
  ]),
640
- x("div", rt, [
654
+ x("div", ot, [
641
655
  e.featureFlags.saveStatus.value === "error" ? (i(), p("div", {
642
656
  key: 0,
643
657
  "aria-live": "assertive",
644
658
  class: "tpl-tooltip tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]",
645
659
  "data-tooltip": e.featureFlags.saveErrorMessage.value
646
- }, [D(h(W), {
660
+ }, [D(h(H), {
647
661
  size: 12,
648
662
  "stroke-width": 2.5
649
- }), T(" " + d(h(a).header.saveFailed), 1)], 8, it)) : e.featureFlags.saveStatus.value === "saved" ? (i(), p("div", at, [D(h(K), {
663
+ }), T(" " + d(h(o).header.saveFailed), 1)], 8, st)) : e.featureFlags.saveStatus.value === "saved" ? (i(), p("div", ct, [D(h(G), {
650
664
  size: 12,
651
665
  "stroke-width": 2.5
652
- }), T(" " + d(h(a).header.saved), 1)])) : e.editor.state.isDirty ? (i(), p("div", ot, [l[4] ||= x("span", { class: "tpl-pulse tpl:size-1.5 tpl:rounded-full tpl:bg-[var(--tpl-primary)]" }, null, -1), T(" " + d(h(a).header.unsaved), 1)])) : m("", !0),
666
+ }), T(" " + d(h(o).header.saved), 1)])) : e.editor.state.isDirty ? (i(), p("div", lt, [u[4] ||= x("span", { class: "tpl-pulse tpl:size-1.5 tpl:rounded-full tpl:bg-[var(--tpl-primary)]" }, null, -1), T(" " + d(h(o).header.unsaved), 1)])) : m("", !0),
653
667
  e.commentsInstance.isEnabled.value && e.featureFlags.hasTemplateSaved.value ? (i(), p("button", {
654
668
  key: 3,
655
- "aria-label": e.commentsInstance.unresolvedCount.value > 0 ? `${h(a).comments.button} (${e.commentsInstance.unresolvedCount.value})` : h(a).comments.button,
669
+ "aria-label": e.commentsInstance.unresolvedCount.value > 0 ? `${h(o).comments.button} (${e.commentsInstance.unresolvedCount.value})` : h(o).comments.button,
656
670
  "aria-expanded": e.panelState.commentsOpen.value,
657
671
  class: b(h($)),
658
672
  style: C({
@@ -660,15 +674,15 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
660
674
  color: e.panelState.commentsOpen.value ? "var(--tpl-bg)" : "var(--tpl-primary)",
661
675
  borderColor: "var(--tpl-primary)"
662
676
  }),
663
- onClick: l[0] ||= (t) => e.panelState.commentsOpen.value = !e.panelState.commentsOpen.value
677
+ onClick: u[0] ||= (t) => e.panelState.commentsOpen.value = !e.panelState.commentsOpen.value
664
678
  }, [
665
- D(h(J), {
679
+ D(h(q), {
666
680
  size: 16,
667
681
  "stroke-width": 2
668
682
  }),
669
- T(" " + d(h(a).comments.button) + " ", 1),
670
- e.commentsInstance.unresolvedCount.value > 0 && !e.panelState.commentsOpen.value ? (i(), p("span", ct, d(e.commentsInstance.unresolvedCount.value), 1)) : m("", !0)
671
- ], 14, st)) : m("", !0),
683
+ T(" " + d(h(o).comments.button) + " ", 1),
684
+ e.commentsInstance.unresolvedCount.value > 0 && !e.panelState.commentsOpen.value ? (i(), p("span", dt, d(e.commentsInstance.unresolvedCount.value), 1)) : m("", !0)
685
+ ], 14, ut)) : m("", !0),
672
686
  e.featureFlags.canUseAiGeneration.value && e.featureFlags.hasTemplateSaved.value ? (i(), p("div", {
673
687
  key: 4,
674
688
  ref: (t) => e.panelState.aiMenuRef.value = t,
@@ -676,12 +690,12 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
676
690
  }, [x("button", {
677
691
  "aria-expanded": e.panelState.aiMenuOpen.value,
678
692
  class: b(["tpl-ai-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:whitespace-nowrap tpl:transition-all tpl:duration-200", e.panelState.aiButtonActive.value ? "tpl-ai-btn--active" : "tpl-ai-btn--idle"]),
679
- onClick: l[1] ||= _((...t) => e.panelState.toggleAiMenu && e.panelState.toggleAiMenu(...t), ["stop"])
693
+ onClick: u[1] ||= _((...t) => e.panelState.toggleAiMenu && e.panelState.toggleAiMenu(...t), ["stop"])
680
694
  }, [D(h(ie), {
681
695
  size: 16,
682
696
  "stroke-width": 2,
683
697
  class: "tpl-ai-btn-icon"
684
- }), T(" " + d(h(a).aiChat.button), 1)], 10, lt), D(y, {
698
+ }), T(" " + d(h(o).aiChat.button), 1)], 10, ft), D(y, {
685
699
  "enter-active-class": "tpl:transition-all tpl:duration-150 tpl:ease-out",
686
700
  "enter-from-class": "tpl:scale-95 tpl:opacity-0",
687
701
  "enter-to-class": "tpl:scale-100 tpl:opacity-100",
@@ -689,32 +703,33 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
689
703
  "leave-from-class": "tpl:scale-100 tpl:opacity-100",
690
704
  "leave-to-class": "tpl:scale-95 tpl:opacity-0"
691
705
  }, {
692
- default: s(() => [e.panelState.aiMenuOpen.value ? (i(), p("div", ut, [D(h(r), {
706
+ default: s(() => [e.panelState.aiMenuOpen.value ? (i(), p("div", pt, [D(h(r), {
693
707
  "active-feature": e.panelState.activeAiFeature.value,
694
708
  onSelect: e.panelState.handleAiFeatureSelect
695
709
  }, null, 8, ["active-feature", "onSelect"])])) : m("", !0)]),
696
710
  _: 1
697
711
  })], 512)) : m("", !0),
698
- e.testEmail.isEnabled.value && e.featureFlags.canSendTestEmail.value ? (i(), p("button", {
712
+ e.testEmail.isAvailable.value ? (i(), p("button", {
699
713
  key: 5,
700
714
  class: b(h($)),
715
+ "data-testid": "test-email-trigger",
701
716
  style: {
702
717
  "background-color": "transparent",
703
718
  color: "var(--tpl-primary)",
704
719
  "border-color": "var(--tpl-primary)"
705
720
  },
706
- disabled: e.testEmail.isSending.value || !e.featureFlags.hasTemplateSaved.value,
707
- onClick: l[2] ||= (t) => e.panelState.testEmailModalOpen.value = !0
721
+ disabled: e.testEmail.isSending.value,
722
+ onClick: u[2] ||= (t) => e.testEmail.open()
708
723
  }, [e.testEmail.isSending.value ? (i(), v(h(Y), {
709
724
  key: 1,
710
725
  class: "tpl-spinner",
711
726
  size: 16,
712
727
  "stroke-width": 2
713
- })) : (i(), v(h(ne), {
728
+ })) : (i(), v(h(J), {
714
729
  key: 0,
715
730
  size: 16,
716
731
  "stroke-width": 2
717
- })), T(" " + d(h(a).testEmail.button), 1)], 10, dt)) : m("", !0),
732
+ })), T(" " + d(h(a).testEmail.button), 1)], 10, mt)) : m("", !0),
718
733
  x("button", {
719
734
  class: b(h($)),
720
735
  style: {
@@ -723,21 +738,21 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
723
738
  "border-color": "var(--tpl-primary)"
724
739
  },
725
740
  disabled: e.isSaveDisabled,
726
- onClick: l[3] ||= (e) => c.$emit("save")
741
+ onClick: u[3] ||= (e) => l.$emit("save")
727
742
  }, [e.isSaving ? (i(), v(h(Y), {
728
743
  key: 1,
729
744
  class: "tpl-spinner",
730
745
  size: 16,
731
746
  "stroke-width": 2
732
- })) : (i(), v(h(q), {
747
+ })) : (i(), v(h(K), {
733
748
  key: 0,
734
749
  size: 16,
735
750
  "stroke-width": 2
736
- })), T(" " + d(e.isSaving ? h(a).header.saving : h(a).header.save), 1)], 10, ft)
751
+ })), T(" " + d(e.isSaving ? h(o).header.saving : h(o).header.save), 1)], 10, ht)
737
752
  ])
738
753
  ]));
739
754
  }
740
- }), mt = /* @__PURE__ */ E({
755
+ }), _t = /* @__PURE__ */ E({
741
756
  __name: "CloudPanels",
742
757
  props: {
743
758
  config: {},
@@ -745,61 +760,46 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
745
760
  core: {},
746
761
  panelState: {},
747
762
  planConfigInstance: {},
748
- testEmail: {},
749
763
  mediaLib: {}
750
764
  },
751
- emits: ["send-test-email"],
752
- setup(e, { expose: t, emit: n }) {
753
- let r = u(() => import("./AiChatSidebar-A1CuWGY0.js")), a = u(() => import("./CommentsSidebar-DHdRiGPX.js")), o = u(() => import("./DesignReferenceSidebar-Dre99DTH.js")), s = u(() => import("./TemplateScoringPanel-CTk8WwxU.js")), l = u(() => import("./TestEmailModal-BJTDxFHh.js")), d = u(async () => {
765
+ setup(e, { expose: t }) {
766
+ let n = u(() => import("./AiChatSidebar-BMnsF8G6.js")), r = u(() => import("./CommentsSidebar-DHdRiGPX.js")), a = u(() => import("./DesignReferenceSidebar-CM-k15pd.js")), o = u(() => import("./TemplateScoringPanel-CTk8WwxU.js")), s = u(async () => {
754
767
  try {
755
- return (await import("./src-D6F_3XkE.js")).MediaLibraryModal;
768
+ return (await import("./src-CzoMNRq4.js")).MediaLibraryModal;
756
769
  } catch {
757
770
  throw Error("[Templatical] Cloud media library requires the optional peer dependency '@templatical/media-library'. Please install it.");
758
771
  }
759
- }), f = n;
760
- function m(e, t, n) {
772
+ });
773
+ function l(e, t, n) {
761
774
  t.history.record(), n.setContent(e), t.conditionPreview.reset();
762
775
  }
763
- let g = c(null);
764
- function _(e) {
765
- g.value?.filterByBlock(e);
776
+ let d = c(null);
777
+ function f(e) {
778
+ d.value?.filterByBlock(e);
766
779
  }
767
- return t({ filterCommentsByBlock: _ }), (t, n) => (i(), p(w, null, [
768
- D(h(r), {
780
+ return t({ filterCommentsByBlock: f }), (t, c) => (i(), p(w, null, [
781
+ D(h(n), {
769
782
  visible: e.panelState.aiChatOpen.value,
770
- "on-apply": (t) => m(t, e.core, e.editor),
771
- onClose: n[0] ||= (t) => e.panelState.aiChatOpen.value = !1
783
+ "on-apply": (t) => l(t, e.core, e.editor),
784
+ onClose: c[0] ||= (t) => e.panelState.aiChatOpen.value = !1
772
785
  }, null, 8, ["visible", "on-apply"]),
773
- D(h(s), {
786
+ D(h(o), {
774
787
  visible: e.panelState.scoringPanelOpen.value,
775
- onClose: n[1] ||= (t) => e.panelState.scoringPanelOpen.value = !1
788
+ onClose: c[1] ||= (t) => e.panelState.scoringPanelOpen.value = !1
776
789
  }, null, 8, ["visible"]),
777
- D(h(o), {
790
+ D(h(a), {
778
791
  visible: e.panelState.designReferenceOpen.value,
779
792
  "has-existing-blocks": e.editor.content.value.blocks.length > 0,
780
- onClose: n[2] ||= (t) => e.panelState.designReferenceOpen.value = !1,
781
- onApply: n[3] ||= (t) => m(t, e.core, e.editor)
793
+ onClose: c[2] ||= (t) => e.panelState.designReferenceOpen.value = !1,
794
+ onApply: c[3] ||= (t) => l(t, e.core, e.editor)
782
795
  }, null, 8, ["visible", "has-existing-blocks"]),
783
- D(h(a), {
796
+ D(h(r), {
784
797
  ref_key: "commentsSidebar",
785
- ref: g,
798
+ ref: d,
786
799
  visible: e.panelState.commentsOpen.value,
787
- onClose: n[4] ||= (t) => e.panelState.commentsOpen.value = !1
800
+ onClose: c[4] ||= (t) => e.panelState.commentsOpen.value = !1
788
801
  }, null, 8, ["visible"]),
789
- D(h(l), {
790
- visible: e.panelState.testEmailModalOpen.value,
791
- "allowed-emails": e.testEmail.allowedEmails.value,
792
- "is-sending": e.testEmail.isSending.value,
793
- error: e.testEmail.error.value,
794
- onSend: n[5] ||= (e) => f("send-test-email", e),
795
- onClose: n[6] ||= (t) => e.panelState.testEmailModalOpen.value = !1
796
- }, null, 8, [
797
- "visible",
798
- "allowed-emails",
799
- "is-sending",
800
- "error"
801
- ]),
802
- D(h(d), {
802
+ D(h(s), {
803
803
  visible: e.panelState.mediaLibraryOpen.value,
804
804
  accept: e.panelState.mediaLibraryAccept.value,
805
805
  "popover-target": e.core.popoverRoot.value,
@@ -814,23 +814,23 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
814
814
  ])
815
815
  ], 64));
816
816
  }
817
- }), ht = {
817
+ }), vt = {
818
818
  key: 0,
819
819
  class: "tpl-loading tpl:absolute tpl:inset-0 tpl:z-overlay tpl:flex tpl:flex-col tpl:bg-[var(--tpl-bg)]"
820
- }, gt = { class: "tpl:flex tpl:flex-1 tpl:overflow-hidden" }, _t = { class: "tpl:flex tpl:w-12 tpl:shrink-0 tpl:flex-col tpl:items-center tpl:gap-4 tpl:py-5 tpl:border-r tpl:border-[var(--tpl-border)]" }, vt = /* @__PURE__ */ E({
820
+ }, yt = { class: "tpl:flex tpl:flex-1 tpl:overflow-hidden" }, bt = { class: "tpl:flex tpl:w-12 tpl:shrink-0 tpl:flex-col tpl:items-center tpl:gap-4 tpl:py-5 tpl:border-r tpl:border-[var(--tpl-border)]" }, xt = /* @__PURE__ */ E({
821
821
  __name: "CloudLoadingOverlay",
822
822
  props: { visible: { type: Boolean } },
823
823
  setup(e) {
824
- return (t, n) => e.visible ? (i(), p("div", ht, [n[1] ||= l("<div class=\"tpl:flex tpl:h-14 tpl:shrink-0 tpl:items-center tpl:justify-between tpl:px-4 tpl:border-b tpl:border-[var(--tpl-border)]\"><div class=\"tpl-shimmer tpl:h-5 tpl:w-28 tpl:rounded-[var(--tpl-radius-sm)]\"></div><div class=\"tpl:flex tpl:gap-3\"><div class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"></div><div class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"></div></div></div>", 1), x("div", gt, [x("div", _t, [(i(), p(w, null, o(5, (e) => x("div", {
824
+ return (t, n) => e.visible ? (i(), p("div", vt, [n[1] ||= l("<div class=\"tpl:flex tpl:h-14 tpl:shrink-0 tpl:items-center tpl:justify-between tpl:px-4 tpl:border-b tpl:border-[var(--tpl-border)]\"><div class=\"tpl-shimmer tpl:h-5 tpl:w-28 tpl:rounded-[var(--tpl-radius-sm)]\"></div><div class=\"tpl:flex tpl:gap-3\"><div class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"></div><div class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"></div></div></div>", 1), x("div", yt, [x("div", bt, [(i(), p(w, null, o(5, (e) => x("div", {
825
825
  key: e,
826
826
  class: "tpl-shimmer tpl:size-7 tpl:rounded-[var(--tpl-radius-sm)]"
827
827
  })), 64))]), n[0] ||= l("<div class=\"tpl:flex tpl:flex-1 tpl:items-start tpl:justify-center tpl:overflow-auto tpl:p-8 tpl:bg-[var(--tpl-canvas-bg)]\"><div class=\"tpl:w-full tpl:max-w-[600px] tpl:rounded-[var(--tpl-radius)] tpl:p-6 tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)]\"><div class=\"tpl:space-y-2 tpl:py-4\"><div class=\"tpl-shimmer tpl:h-3 tpl:w-3/4 tpl:rounded\"></div><div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div><div class=\"tpl-shimmer tpl:h-3 tpl:w-5/6 tpl:rounded\"></div></div><div class=\"tpl:py-4\"><div class=\"tpl-shimmer tpl:h-44 tpl:w-full tpl:rounded-[var(--tpl-radius-sm)]\"></div></div><div class=\"tpl:space-y-2 tpl:py-4\"><div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div><div class=\"tpl-shimmer tpl:h-3 tpl:w-2/3 tpl:rounded\"></div></div><div class=\"tpl:flex tpl:justify-center tpl:py-4\"><div class=\"tpl-shimmer tpl:h-10 tpl:w-36 tpl:rounded-[var(--tpl-radius-sm)]\"></div></div><div class=\"tpl:space-y-2 tpl:py-4\"><div class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/2 tpl:rounded\"></div><div class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/3 tpl:rounded\"></div></div></div></div><div class=\"tpl:flex tpl:w-[320px] tpl:shrink-0 tpl:flex-col tpl:gap-4 tpl:p-4 tpl:border-l tpl:border-[var(--tpl-border)]\"><div class=\"tpl-shimmer tpl:h-8 tpl:rounded-[var(--tpl-radius-sm)]\"></div><div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div><div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div></div>", 2)])])) : m("", !0);
828
828
  }
829
- }), yt = {
829
+ }), St = {
830
830
  key: 0,
831
831
  role: "alert",
832
832
  class: "tpl-error tpl:absolute tpl:inset-0 tpl:z-overlay tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-6 tpl:px-8 tpl:bg-[var(--tpl-bg)]"
833
- }, bt = { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]" }, xt = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center" }, St = { class: "tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ct = { class: "tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, wt = /* @__PURE__ */ E({
833
+ }, Ct = { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]" }, wt = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center" }, Tt = { class: "tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Et = { class: "tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Dt = /* @__PURE__ */ E({
834
834
  __name: "CloudErrorOverlay",
835
835
  props: {
836
836
  error: {},
@@ -845,13 +845,13 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
845
845
  function o(e) {
846
846
  return "isNotFound" in e && !!e.isNotFound;
847
847
  }
848
- return (t, s) => e.visible && e.error ? (i(), p("div", yt, [
849
- x("div", bt, [D(h(W), {
848
+ return (t, s) => e.visible && e.error ? (i(), p("div", St, [
849
+ x("div", Ct, [D(h(H), {
850
850
  size: 32,
851
851
  "stroke-width": 1.5,
852
852
  class: "tpl:text-[var(--tpl-danger)]"
853
853
  })]),
854
- x("div", xt, [x("h2", St, d(h(r).error.title), 1), x("p", Ct, d(a(e.error)), 1)]),
854
+ x("div", wt, [x("h2", Tt, d(h(r).error.title), 1), x("p", Et, d(a(e.error)), 1)]),
855
855
  o(e.error) ? m("", !0) : (i(), p("button", {
856
856
  key: 0,
857
857
  class: "tpl-btn tpl-btn-primary tpl:inline-flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
@@ -859,20 +859,20 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
859
859
  }, d(h(r).error.retry), 1))
860
860
  ])) : m("", !0);
861
861
  }
862
- }), Tt = {
862
+ }), Ot = {
863
863
  key: 0,
864
864
  class: "tpl-preview-banner tpl:absolute tpl:top-14 tpl:right-0 tpl:left-0 tpl:z-40 tpl:flex tpl:items-center tpl:justify-center tpl:gap-4 tpl:px-4 tpl:py-3 tpl:bg-[var(--tpl-primary-light)] tpl:border-b tpl:border-[var(--tpl-primary)]"
865
- }, Et = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-text)]" }, Dt = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ot = /* @__PURE__ */ E({
865
+ }, kt = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-text)]" }, At = { class: "tpl:flex tpl:items-center tpl:gap-2" }, jt = /* @__PURE__ */ E({
866
866
  __name: "SnapshotPreviewBanner",
867
867
  props: { visible: { type: Boolean } },
868
868
  emits: ["cancel", "confirm"],
869
869
  setup(e, { emit: t }) {
870
870
  let n = t, { t: r } = X();
871
- return (t, a) => e.visible ? (i(), p("div", Tt, [x("div", Et, [D(h(G), {
871
+ return (t, a) => e.visible ? (i(), p("div", Ot, [x("div", kt, [D(h(U), {
872
872
  size: 18,
873
873
  "stroke-width": 2,
874
874
  class: "tpl:text-[var(--tpl-primary)]"
875
- }), x("span", null, d(h(r).snapshotPreview.message), 1)]), x("div", Dt, [x("button", {
875
+ }), x("span", null, d(h(r).snapshotPreview.message), 1)]), x("div", At, [x("button", {
876
876
  class: "tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-150 tpl:text-[var(--tpl-text-muted)] tpl:border tpl:border-[var(--tpl-border)]",
877
877
  style: { "background-color": "transparent" },
878
878
  onClick: a[0] ||= (e) => n("cancel")
@@ -881,7 +881,7 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
881
881
  onClick: a[1] ||= (e) => n("confirm")
882
882
  }, d(h(r).snapshotPreview.restore), 1)])])) : m("", !0);
883
883
  }
884
- }), kt = {
884
+ }), Mt = {
885
885
  key: 0,
886
886
  role: "status",
887
887
  "aria-live": "polite",
@@ -891,14 +891,14 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
891
891
  color: "var(--tpl-text)",
892
892
  border: "1px solid var(--tpl-warning)"
893
893
  }
894
- }, At = /* @__PURE__ */ E({
894
+ }, Nt = /* @__PURE__ */ E({
895
895
  __name: "CollabUndoToast",
896
896
  props: { visible: { type: Boolean } },
897
897
  setup(e) {
898
- let { t } = U();
899
- return (n, r) => e.visible ? (i(), p("div", kt, d(h(t).history.collabWarning), 1)) : m("", !0);
898
+ let { t } = V();
899
+ return (n, r) => e.visible ? (i(), p("div", Mt, d(h(t).history.collabWarning), 1)) : m("", !0);
900
900
  }
901
- }), jt = ["data-tpl-theme"], Mt = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, Nt = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, Pt = ["aria-label"], Ft = /*#__PURE__*/ ae(/* @__PURE__ */ E({
901
+ }), Pt = ["data-tpl-theme"], Ft = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, It = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, Lt = ["aria-label"], Rt = /*#__PURE__*/ ae(/* @__PURE__ */ E({
902
902
  __name: "CloudEditor",
903
903
  props: {
904
904
  config: {},
@@ -909,67 +909,62 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
909
909
  },
910
910
  emits: ["ready"],
911
911
  setup(e, { expose: r, emit: o }) {
912
- let l = u(() => import("./SavedBlocksPanels-D-pA_wfk.js")), f = e;
913
- a(z, f.cloudTranslations);
914
- let w = o, E = c(null), O = c(null), k = ze({
915
- config: f.config,
916
- translations: f.translations,
917
- fontsManager: f.fontsManager,
918
- emit: w,
919
- getCommentsSidebar: () => E.value ? { filterByBlock: E.value.filterCommentsByBlock } : null,
920
- editorRoot: f.shadowRoot,
921
- containerEl: O
922
- }), { isInitializing: A, isAuthReady: j, initError: N, planConfigInstance: P, websocket: F, collaboration: I, isCollaborationEnabled: L, editor: R, core: B, featureFlags: V, mediaLib: H, exporter: ee, testEmail: U, commentsInstance: W, savedBlocks: G, panelState: K, snapshotPreview: q, collabWarning: J, setThemeOverrides: ne, setUiTheme: Y } = k, { showNotice: re } = M(() => f.config.smallScreenNotice);
923
- async function ie(e) {
924
- try {
925
- await U.sendTestEmail(e), K.testEmailModalOpen.value = !1;
926
- } catch {}
927
- }
912
+ let l = u(() => import("./SavedBlocksPanels-BsSpJwrW.js")), f = u(() => import("./TestEmailPanel-048m0kxX.js")), w = e;
913
+ a(L, w.cloudTranslations);
914
+ let E = o, O = c(null), k = c(null), A = He({
915
+ config: w.config,
916
+ translations: w.translations,
917
+ fontsManager: w.fontsManager,
918
+ emit: E,
919
+ getCommentsSidebar: () => O.value ? { filterByBlock: O.value.filterCommentsByBlock } : null,
920
+ editorRoot: w.shadowRoot,
921
+ containerEl: k
922
+ }), { isInitializing: j, isAuthReady: ee, initError: N, planConfigInstance: P, websocket: F, collaboration: I, isCollaborationEnabled: te, editor: R, core: z, featureFlags: B, mediaLib: ne, exporter: V, testEmail: H, commentsInstance: U, savedBlocks: G, panelState: K, snapshotPreview: q, collabWarning: J, setThemeOverrides: Y, setUiTheme: re } = A, { showNotice: ie } = M(() => w.config.smallScreenNotice);
928
923
  async function ae() {
929
924
  try {
930
925
  await q.confirmRestoreSnapshot();
931
926
  } catch {}
932
927
  }
933
- let X = Ve({
934
- config: f.config,
928
+ let X = We({
929
+ config: w.config,
935
930
  editor: R,
936
931
  websocket: F,
937
932
  planConfigInstance: P,
938
933
  snapshotPreview: q,
939
- core: B,
940
- exporter: ee,
941
- featureFlags: V,
942
- isDestroyed: k.isDestroyed
943
- }), Z = He({
944
- issues: B.templateLint ? B.templateLint.issues : c([]),
934
+ core: z,
935
+ exporter: V,
936
+ featureFlags: B,
937
+ isDestroyed: A.isDestroyed
938
+ }), Z = Ge({
939
+ issues: z.templateLint ? z.templateLint.issues : c([]),
945
940
  planConfig: P.config
946
941
  });
947
942
  async function Q() {
948
- await Z.tryRunSave(() => X.saveTemplate().catch((e) => f.config.onError?.(e)));
943
+ await Z.tryRunSave(() => X.saveTemplate().catch((e) => w.config.onError?.(e)));
949
944
  }
950
- return k.onSaveHook.value = Q, t(() => {
951
- k.initialize();
945
+ return A.onSaveHook.value = Q, t(() => {
946
+ A.initialize();
952
947
  }), g(() => {
953
- k.destroy();
948
+ A.destroy();
954
949
  }), r({
955
950
  getContent: () => R.content.value,
956
951
  setContent: (e) => R.setContent(e),
957
- setTheme: Y,
958
- setThemeOverrides: ne,
952
+ setTheme: re,
953
+ setThemeOverrides: Y,
959
954
  create: X.createTemplate,
960
955
  load: X.loadTemplate,
961
956
  save: X.saveTemplate,
962
- sendTestEmail: U.sendTestEmail
957
+ sendTestEmail: (e) => H.send(e)
963
958
  }), (t, r) => (i(), p("div", {
964
959
  ref_key: "rootEl",
965
- ref: O,
960
+ ref: k,
966
961
  class: b(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": h(R).state.darkMode }]),
967
- "data-tpl-theme": h(B).resolvedTheme.value,
968
- style: C(h(B).themeStyles.value),
962
+ "data-tpl-theme": h(z).resolvedTheme.value,
963
+ style: C(h(z).themeStyles.value),
969
964
  onDragover: r[6] ||= _(() => {}, ["prevent"]),
970
965
  onDrop: r[7] ||= _(() => {}, ["prevent"])
971
966
  }, [
972
- D(ge),
967
+ D(le),
973
968
  D(y, {
974
969
  "enter-active-class": "tpl:transition-opacity tpl:duration-200",
975
970
  "enter-from-class": "tpl:opacity-100",
@@ -978,7 +973,7 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
978
973
  "leave-from-class": "tpl:opacity-100",
979
974
  "leave-to-class": "tpl:opacity-0"
980
975
  }, {
981
- default: s(() => [D(vt, { visible: h(A) || h(R).state.isLoading }, null, 8, ["visible"])]),
976
+ default: s(() => [D(xt, { visible: h(j) || h(R).state.isLoading }, null, 8, ["visible"])]),
982
977
  _: 1
983
978
  }),
984
979
  D(y, {
@@ -989,10 +984,10 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
989
984
  "leave-from-class": "tpl:opacity-100",
990
985
  "leave-to-class": "tpl:opacity-0"
991
986
  }, {
992
- default: s(() => [D(wt, {
987
+ default: s(() => [D(Dt, {
993
988
  error: h(N),
994
- visible: !!h(N) && !h(A),
995
- onRetry: h(k).initialize
989
+ visible: !!h(N) && !h(j),
990
+ onRetry: h(A).initialize
996
991
  }, null, 8, [
997
992
  "error",
998
993
  "visible",
@@ -1000,19 +995,19 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1000
995
  ])]),
1001
996
  _: 1
1002
997
  }),
1003
- D(pt, {
998
+ D(gt, {
1004
999
  editor: h(R),
1005
- core: h(B),
1006
- "feature-flags": h(V),
1000
+ core: h(z),
1001
+ "feature-flags": h(B),
1007
1002
  "panel-state": h(K),
1008
1003
  "snapshot-preview": h(q),
1009
- "comments-instance": h(W),
1010
- "test-email": h(U),
1004
+ "comments-instance": h(U),
1005
+ "test-email": h(H),
1011
1006
  websocket: h(F),
1012
1007
  collaboration: h(I),
1013
- "is-collaboration-enabled": h(L),
1014
- "is-saving": h(R).state.isSaving || h(V).isSaveExporting.value,
1015
- "is-save-disabled": h(R).state.isSaving || h(V).isSaveExporting.value || !h(R).state.isDirty,
1008
+ "is-collaboration-enabled": h(te),
1009
+ "is-saving": h(R).state.isSaving || h(B).isSaveExporting.value,
1010
+ "is-save-disabled": h(R).state.isSaving || h(B).isSaveExporting.value || !h(R).state.isDirty,
1016
1011
  onSave: Q
1017
1012
  }, null, 8, [
1018
1013
  "editor",
@@ -1028,7 +1023,7 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1028
1023
  "is-saving",
1029
1024
  "is-save-disabled"
1030
1025
  ]),
1031
- D(Qe, {
1026
+ D(tt, {
1032
1027
  open: h(Z).modalOpen.value,
1033
1028
  issues: h(Z).blockingIssues.value,
1034
1029
  onCancel: h(Z).cancel,
@@ -1039,7 +1034,7 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1039
1034
  "onCancel",
1040
1035
  "onConfirm"
1041
1036
  ]),
1042
- D(Ot, {
1037
+ D(jt, {
1043
1038
  visible: h(q).isPreviewingSnapshot.value,
1044
1039
  onCancel: h(q).cancelPreview,
1045
1040
  onConfirm: ae
@@ -1052,18 +1047,18 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1052
1047
  "leave-from-class": "tpl:translate-y-0 tpl:opacity-100",
1053
1048
  "leave-to-class": "tpl:translate-y-[-8px] tpl:opacity-0"
1054
1049
  }, {
1055
- default: s(() => [D(At, { visible: h(J).collabUndoWarningVisible.value }, null, 8, ["visible"])]),
1050
+ default: s(() => [D(Nt, { visible: h(J).collabUndoWarningVisible.value }, null, 8, ["visible"])]),
1056
1051
  _: 1
1057
1052
  }),
1058
- n(D(le, null, null, 512), [[S, !h(R).state.previewMode]]),
1053
+ n(D(oe, null, null, 512), [[S, !h(R).state.previewMode]]),
1059
1054
  x("div", {
1060
1055
  class: b(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [h(R).state.previewMode ? "tpl:left-0 tpl:right-0" : h(K).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]", h(q).isPreviewingSnapshot.value ? "tpl:top-[104px]" : "tpl:top-14"]]),
1061
1056
  style: {
1062
1057
  transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",
1063
1058
  "background-color": "var(--tpl-canvas-bg)"
1064
1059
  }
1065
- }, [x("div", Mt, [D(y, { name: "tpl-restore-btn" }, {
1066
- default: s(() => [h(B).conditionPreview.hasHiddenBlocks.value ? (i(), p("button", {
1060
+ }, [x("div", Ft, [D(y, { name: "tpl-restore-btn" }, {
1061
+ default: s(() => [h(z).conditionPreview.hasHiddenBlocks.value ? (i(), p("button", {
1067
1062
  key: 0,
1068
1063
  class: "tpl:absolute tpl:left-1/2 tpl:top-2 tpl:-translate-x-1/2 tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-full tpl:border tpl:px-3.5 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:whitespace-nowrap tpl:shadow-md tpl:hover:opacity-80",
1069
1064
  style: {
@@ -1072,13 +1067,13 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1072
1067
  "border-color": "var(--tpl-warning)",
1073
1068
  "backdrop-filter": "blur(8px)"
1074
1069
  },
1075
- onClick: r[0] ||= (e) => h(B).conditionPreview.reset()
1076
- }, [D(h(te), {
1070
+ onClick: r[0] ||= (e) => h(z).conditionPreview.reset()
1071
+ }, [D(h(W), {
1077
1072
  size: 13,
1078
1073
  "stroke-width": 2
1079
- }), T(" " + d(h(B).t.blockSettings.restoreHiddenBlocks), 1)])) : m("", !0)]),
1074
+ }), T(" " + d(h(z).t.blockSettings.restoreHiddenBlocks), 1)])) : m("", !0)]),
1080
1075
  _: 1
1081
- })]), x("main", Nt, [D(se, {
1076
+ })]), x("main", It, [D(_e, {
1082
1077
  viewport: h(R).state.viewport,
1083
1078
  content: h(R).content.value,
1084
1079
  "selected-block-id": h(R).state.selectedBlockId,
@@ -1097,7 +1092,7 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1097
1092
  "locked-blocks",
1098
1093
  "onSelectBlock"
1099
1094
  ])])], 2),
1100
- e.config.branding !== !1 && !h(V).isWhiteLabeled.value ? (i(), v(pe, {
1095
+ e.config.branding !== !1 && !h(B).isWhiteLabeled.value ? (i(), v(me, {
1101
1096
  key: 0,
1102
1097
  "position-class": [h(R).state.previewMode ? "tpl:left-0 tpl:right-0" : h(K).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]"]
1103
1098
  }, null, 8, ["position-class"])) : m("", !0),
@@ -1106,15 +1101,15 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1106
1101
  role: "status",
1107
1102
  "aria-live": "polite",
1108
1103
  "aria-atomic": "true",
1109
- "aria-label": h(B).t.landmarks.reorderAnnouncements
1110
- }, d(h(B).keyboardReorder.announcement.value), 9, Pt),
1111
- n(D(oe, {
1104
+ "aria-label": h(z).t.landmarks.reorderAnnouncements
1105
+ }, d(h(z).keyboardReorder.announcement.value), 9, Lt),
1106
+ n(D(he, {
1112
1107
  "selected-block": h(R).selectedBlock.value,
1113
1108
  settings: h(R).content.value.settings,
1114
1109
  "shifted-left": h(K).rightPanelOpen.value,
1115
1110
  onUpdateBlock: r[3] ||= (e) => h(R).updateBlock(h(R).selectedBlock.value.id, e),
1116
- onDeleteBlock: r[4] ||= (e) => h(B).blockActions.deleteBlock(h(R).selectedBlock.value.id),
1117
- onDuplicateBlock: r[5] ||= (e) => h(B).blockActions.duplicateBlock(h(R).selectedBlock.value),
1111
+ onDeleteBlock: r[4] ||= (e) => h(z).blockActions.deleteBlock(h(R).selectedBlock.value.id),
1112
+ onDuplicateBlock: r[5] ||= (e) => h(z).blockActions.duplicateBlock(h(R).selectedBlock.value),
1118
1113
  onUpdateSettings: h(R).updateSettings
1119
1114
  }, null, 8, [
1120
1115
  "selected-block",
@@ -1122,42 +1117,43 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1122
1117
  "shifted-left",
1123
1118
  "onUpdateSettings"
1124
1119
  ]), [[S, !h(R).state.previewMode]]),
1125
- !h(A) && h(j) ? (i(), v(mt, {
1120
+ !h(j) && h(ee) ? (i(), v(_t, {
1126
1121
  key: 1,
1127
1122
  ref_key: "cloudPanelsRef",
1128
- ref: E,
1129
- config: f.config,
1123
+ ref: O,
1124
+ config: w.config,
1130
1125
  editor: h(R),
1131
- core: h(B),
1126
+ core: h(z),
1132
1127
  "panel-state": h(K),
1133
1128
  "plan-config-instance": h(P),
1134
- "test-email": h(U),
1135
- "media-lib": h(H),
1136
- onSendTestEmail: ie
1129
+ "media-lib": h(ne)
1137
1130
  }, null, 8, [
1138
1131
  "config",
1139
1132
  "editor",
1140
1133
  "core",
1141
1134
  "panel-state",
1142
1135
  "plan-config-instance",
1143
- "test-email",
1144
1136
  "media-lib"
1145
1137
  ])) : m("", !0),
1146
1138
  h(G).isAvailable.value ? (i(), v(h(l), {
1147
1139
  key: 2,
1148
1140
  feature: h(G)
1149
1141
  }, null, 8, ["feature"])) : m("", !0),
1142
+ h(H).isAvailable.value ? (i(), v(h(f), {
1143
+ key: 3,
1144
+ feature: h(H)
1145
+ }, null, 8, ["feature"])) : m("", !0),
1150
1146
  x("div", {
1151
- ref: (e) => h(B).popoverRoot.value = e,
1147
+ ref: (e) => h(z).popoverRoot.value = e,
1152
1148
  class: "tpl-popover-root"
1153
1149
  }, null, 512),
1154
- D(ue),
1155
- D(he),
1156
- h(re) ? (i(), v(me, { key: 3 })) : m("", !0)
1157
- ], 46, jt));
1150
+ D(de),
1151
+ D(ge),
1152
+ h(ie) ? (i(), v(fe, { key: 4 })) : m("", !0)
1153
+ ], 46, Pt));
1158
1154
  }
1159
- }), [["__scopeId", "data-v-04940787"]]);
1155
+ }), [["__scopeId", "data-v-d606cf3a"]]);
1160
1156
  //#endregion
1161
- export { Ft as default };
1157
+ export { Rt as default };
1162
1158
 
1163
- //# sourceMappingURL=CloudEditor-C0Y4RD4c.js.map
1159
+ //# sourceMappingURL=CloudEditor-S8zLHtKb.js.map