@aswin.dev/editor 0.7.1 → 0.7.2

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 (144) hide show
  1. package/LICENSE +56 -0
  2. package/dist/{AccessibilityPanel-COL6Wm7p.js → AccessibilityPanel-EmQ19wiS.js} +1 -1
  3. package/dist/{AiChatSidebar-DWGPVtvC.js → AiChatSidebar-DeB0w_32.js} +38 -52
  4. package/dist/{AiFeatureMenu-duUFSfDf.js → AiFeatureMenu-DoLD5Cde.js} +5 -5
  5. package/dist/{BlockA11yBadge-Qs6HtXid.js → BlockA11yBadge-DkNbDvJA.js} +1 -1
  6. package/dist/{CloudEditor-CFldoCOb.js → CloudEditor-zo9PjjvY.js} +255 -248
  7. package/dist/{CollaboratorBar-Bw-lbt61.js → CollaboratorBar-BsXMY-8e.js} +3 -3
  8. package/dist/{CommentsSidebar-BaD5F53-.js → CommentsSidebar-DIWIa4rS.js} +6 -6
  9. package/dist/{CountdownToolbar-Dg4F8MTk.js → CountdownToolbar-BuS8p5ju.js} +2 -2
  10. package/dist/{DesignReferenceSidebar-BSH7uNP_.js → DesignReferenceSidebar-RDlnhL-6.js} +5 -5
  11. package/dist/{LoadingTrack-Ba2pfF57.js → LoadingTrack-BJ59h9ok.js} +1 -1
  12. package/dist/{ModuleBrowserModal-6phxZSKI.js → ModuleBrowserModal-b7HbpByz.js} +7 -7
  13. package/dist/{ModulePreviewCanvas-BW8L3eQX.js → ModulePreviewCanvas-D__YlOLS.js} +1 -1
  14. package/dist/{NumberWithSuffix-BpUzQOJt.js → NumberWithSuffix-Ca3vNY84.js} +1 -1
  15. package/dist/{ParagraphEditor-DNSzAB-I.js → ParagraphEditor-B1aYPO-6.js} +18 -18
  16. package/dist/{RichTextEditorContent-CrqPQdnk.js → RichTextEditorContent-BmEVMrkJ.js} +1 -1
  17. package/dist/{SaveModuleDialog-zMQTpez7.js → SaveModuleDialog-ClovqI6h.js} +3 -3
  18. package/dist/{SnapshotHistory-Do-A5rYU.js → SnapshotHistory-DoqtH0cw.js} +3 -3
  19. package/dist/{TemplateScoringPanel-CS7o62zS.js → TemplateScoringPanel-DQv2ZAiL.js} +7 -7
  20. package/dist/{TestEmailModal-DGj_9V1u.js → TestEmailModal-iIeYJYsj.js} +3 -3
  21. package/dist/{TitleEditor-C7IDnAoS.js → TitleEditor-CTDIwRF_.js} +7 -7
  22. package/dist/{TplModal-BAsVzcTb.js → TplModal-CBq1J1pG.js} +1 -1
  23. package/dist/{blockTypeIcons-C6LDKvmd.js → blockTypeIcons-QkC6f5UE.js} +1 -1
  24. package/dist/bundle-stats.json +7 -7
  25. package/dist/cdn/chunks/AccessibilityPanel-BeU8nz7A.js +97 -0
  26. package/dist/cdn/chunks/AccessibilityPanel-BeU8nz7A.js.map +1 -0
  27. package/dist/cdn/chunks/AiFeatureMenu-B2mhscyP.js +59 -0
  28. package/dist/cdn/chunks/AiFeatureMenu-B2mhscyP.js.map +1 -0
  29. package/dist/cdn/chunks/BlockA11yBadge-C4g77gF0.js +33 -0
  30. package/dist/cdn/chunks/BlockA11yBadge-C4g77gF0.js.map +1 -0
  31. package/dist/cdn/chunks/CloudEditor-Btyr0b0_.js +1183 -0
  32. package/dist/cdn/chunks/CloudEditor-Btyr0b0_.js.map +1 -0
  33. package/dist/cdn/chunks/CollaboratorBar-YBiIjiRh.js +51 -0
  34. package/dist/cdn/chunks/CollaboratorBar-YBiIjiRh.js.map +1 -0
  35. package/dist/cdn/chunks/CountdownBlock-B06UZoWe.js +93 -0
  36. package/dist/cdn/chunks/CountdownBlock-B06UZoWe.js.map +1 -0
  37. package/dist/cdn/chunks/CountdownToolbar-C9XZr33O.js +212 -0
  38. package/dist/cdn/chunks/CountdownToolbar-C9XZr33O.js.map +1 -0
  39. package/dist/cdn/chunks/ModuleBrowserModal-C2CDWKW6.js +195 -0
  40. package/dist/cdn/chunks/ModuleBrowserModal-C2CDWKW6.js.map +1 -0
  41. package/dist/cdn/chunks/ModulePreviewCanvas-Drt8Evai.js +109 -0
  42. package/dist/cdn/chunks/ModulePreviewCanvas-Drt8Evai.js.map +1 -0
  43. package/dist/cdn/chunks/NumberWithSuffix-Ty1bp9vB.js +423 -0
  44. package/dist/cdn/chunks/NumberWithSuffix-Ty1bp9vB.js.map +1 -0
  45. package/dist/cdn/chunks/ParagraphEditor-BA1WbHI7.js +544 -0
  46. package/dist/cdn/chunks/ParagraphEditor-BA1WbHI7.js.map +1 -0
  47. package/dist/cdn/chunks/RichTextEditorContent-BtWCA_Oc.js +106 -0
  48. package/dist/cdn/chunks/RichTextEditorContent-BtWCA_Oc.js.map +1 -0
  49. package/dist/cdn/chunks/SaveModuleDialog-AwL0tkCV.js +119 -0
  50. package/dist/cdn/chunks/SaveModuleDialog-AwL0tkCV.js.map +1 -0
  51. package/dist/cdn/chunks/TitleEditor-DbSyeixS.js +171 -0
  52. package/dist/cdn/chunks/TitleEditor-DbSyeixS.js.map +1 -0
  53. package/dist/cdn/chunks/blockTypeIcons-pQIkxJzc.js +23 -0
  54. package/dist/cdn/chunks/blockTypeIcons-pQIkxJzc.js.map +1 -0
  55. package/dist/cdn/chunks/de-Ce-LbJ2J.js +89 -0
  56. package/dist/cdn/chunks/de-Ce-LbJ2J.js.map +1 -0
  57. package/dist/cdn/chunks/de-RQrZR56a.js +209 -0
  58. package/dist/cdn/chunks/de-RQrZR56a.js.map +1 -0
  59. package/dist/cdn/chunks/de-_tooy3Q8.js +771 -0
  60. package/dist/cdn/chunks/de-_tooy3Q8.js.map +1 -0
  61. package/dist/cdn/chunks/draggable-C-1_gch3.js +11572 -0
  62. package/dist/cdn/chunks/draggable-C-1_gch3.js.map +1 -0
  63. package/dist/cdn/chunks/emojiData-EMFlj6FJ.js +19 -0
  64. package/dist/cdn/chunks/emojiData-EMFlj6FJ.js.map +1 -0
  65. package/dist/cdn/chunks/en-Bl1ecfRF.js +209 -0
  66. package/dist/cdn/chunks/en-Bl1ecfRF.js.map +1 -0
  67. package/dist/cdn/chunks/en-CNqLoIm9.js +771 -0
  68. package/dist/cdn/chunks/en-CNqLoIm9.js.map +1 -0
  69. package/dist/cdn/chunks/en-DiCWK5fG.js +89 -0
  70. package/dist/cdn/chunks/en-DiCWK5fG.js.map +1 -0
  71. package/dist/cdn/chunks/extensions-BVKQw_sp.js +598 -0
  72. package/dist/cdn/chunks/extensions-BVKQw_sp.js.map +1 -0
  73. package/dist/cdn/chunks/features-DIBEo4xl.js +7913 -0
  74. package/dist/cdn/chunks/features-DIBEo4xl.js.map +1 -0
  75. package/dist/cdn/chunks/icons-C1Gg-ov-.js +992 -0
  76. package/dist/cdn/chunks/icons-C1Gg-ov-.js.map +1 -0
  77. package/dist/cdn/chunks/liquid.browser-lQbkge2E.js +3279 -0
  78. package/dist/cdn/chunks/liquid.browser-lQbkge2E.js.map +1 -0
  79. package/dist/cdn/chunks/media-library-BTF_Ko70.js +6014 -0
  80. package/dist/cdn/chunks/media-library-BTF_Ko70.js.map +1 -0
  81. package/dist/cdn/chunks/pusher-CDbNlZBE.js +2508 -0
  82. package/dist/cdn/chunks/pusher-CDbNlZBE.js.map +1 -0
  83. package/dist/cdn/chunks/quality-C5AmotmP.js +1456 -0
  84. package/dist/cdn/chunks/quality-C5AmotmP.js.map +1 -0
  85. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js +32 -0
  86. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js.map +1 -0
  87. package/dist/cdn/chunks/renderer-D0L44Vlp.js +642 -0
  88. package/dist/cdn/chunks/renderer-D0L44Vlp.js.map +1 -0
  89. package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +20 -0
  90. package/dist/cdn/chunks/src-RKexlYjA.js +497 -0
  91. package/dist/cdn/chunks/src-RKexlYjA.js.map +1 -0
  92. package/dist/cdn/chunks/styleConstants-PgmvNBzQ.js +57 -0
  93. package/dist/cdn/chunks/styleConstants-PgmvNBzQ.js.map +1 -0
  94. package/dist/cdn/chunks/styles-CQR6ed13.js +4976 -0
  95. package/dist/cdn/chunks/styles-CQR6ed13.js.map +1 -0
  96. package/dist/cdn/chunks/tiptap-CDzAbF2j.js +14654 -0
  97. package/dist/cdn/chunks/tiptap-CDzAbF2j.js.map +1 -0
  98. package/dist/cdn/editor.css +2 -0
  99. package/dist/cdn/editor.js +338 -0
  100. package/dist/cdn/editor.js.map +1 -0
  101. package/dist/{cloud-6ZmAvF0j.js → cloud-DJG4tb4_.js} +1 -1
  102. package/dist/{de-DWcgp-7T.js → de-2LEvILeZ.js} +40 -0
  103. package/dist/{dist-DtiDUrX-.js → dist-BHAeXaUY.js} +1 -1
  104. package/dist/{dist-BUzw1buG.js → dist-BSJvAvH3.js} +1 -1
  105. package/dist/{dist-COSzWQUs.js → dist-BeFnymxK.js} +1 -1
  106. package/dist/dist-Bmir0gYb.js +1167 -0
  107. package/dist/{dist-C3T2AKtB.js → dist-BvPgo-UK.js} +1 -1
  108. package/dist/{dist-C9ckKEZL.js → dist-CPVBKMmd.js} +1 -1
  109. package/dist/{dist-BadNx4qo.js → dist-Df4ie7vZ.js} +1 -1
  110. package/dist/{dist-CBItRG-Z.js → dist-DxOoemkW.js} +1 -1
  111. package/dist/{dist-Dzt5foyL.js → dist-HEQ52gTJ.js} +1 -1
  112. package/dist/{dist-BZyY-SS4.js → dist-b-XUqAoF.js} +1 -1
  113. package/dist/{dist-Bz3M4RXG.js → dist-kZfaVUpW.js} +3 -3
  114. package/dist/{dist-BesOh2mk.js → dist-wfAedlzi.js} +1 -1
  115. package/dist/{en-Cxd4fhNm.js → en-D2RU2Poj.js} +40 -0
  116. package/dist/{extensions-D__hOlV1.js → extensions-BQ1xXx3d.js} +21 -21
  117. package/dist/index.d.ts +17 -6
  118. package/dist/style.css +1 -1
  119. package/dist/{styles-B4tjX5SP.js → styles-CavWjvol.js} +1573 -1310
  120. package/dist/templatical-editor.js +161 -132
  121. package/dist/undo-2-Cg8I7obC.js +16 -0
  122. package/dist/{useEditorCore-wslttMH-.js → useEditorCore-BGnzcT7p.js} +37 -37
  123. package/dist/{useMergeTag-DX0XG5V9.js → useMergeTag-CfuZq2fF.js} +3 -3
  124. package/package.json +12 -12
  125. package/dist/dist-C04s_fLA.js +0 -563
  126. /package/dist/{CountdownBlock-DaYGxKqo.js → CountdownBlock-BCi7-DAM.js} +0 -0
  127. /package/dist/{_plugin-vue_export-helper-BVAJ4lgT.js → _plugin-vue_export-helper-Bwh4ceeO.js} +0 -0
  128. /package/dist/{de-GOtR9DwW.js → de-D2npYjrZ.js} +0 -0
  129. /package/dist/{dist-DXa1uAMh.js → dist-DvHLtWVP.js} +0 -0
  130. /package/dist/{emojiData-DrBuvEoP.js → emojiData-DvQBBzmO.js} +0 -0
  131. /package/dist/{en-dFFQVzNn.js → en-ib-4h3_o.js} +0 -0
  132. /package/dist/{formatRelativeTime-BhhO8yCl.js → formatRelativeTime-CFDZnEIs.js} +0 -0
  133. /package/dist/{liquid.browser-BvCyLQII.js → liquid.browser-7Rv0QDiO.js} +0 -0
  134. /package/dist/{readableTextColor-DVuzNX1y.js → readableTextColor-C_9OpzBw.js} +0 -0
  135. /package/dist/{scan-line-CzfFJO1o.js → scan-line-DlghmhNf.js} +0 -0
  136. /package/dist/{send-D2eSo4GH.js → send-DDdhIRj8.js} +0 -0
  137. /package/dist/{shield-check-jkpgcC0-.js → shield-check-OSQ-JVTX.js} +0 -0
  138. /package/dist/{sparkles-Chm5CZfb.js → sparkles-BN4a-CoF.js} +0 -0
  139. /package/dist/{styleConstants-34eUKPOZ.js → styleConstants-wWRbcuEK.js} +0 -0
  140. /package/dist/{text-align-start-CzBnJsW8.js → text-align-start-D1weisjS.js} +0 -0
  141. /package/dist/{trash-2-CtK2apEH.js → trash-2-CMWvQ5KX.js} +0 -0
  142. /package/dist/{triangle-alert-KpDVNbpn.js → triangle-alert-DyidRNX_.js} +0 -0
  143. /package/dist/{useCloudI18n-DOKSZql1.js → useCloudI18n-BTTNBk5i.js} +0 -0
  144. /package/dist/{x-BkaOMosX.js → x-CgIhNcT9.js} +0 -0
@@ -1,25 +1,25 @@
1
1
  import { At as e, C as t, F as n, Ft as r, M as i, N as a, P as o, S as s, U as c, V as l, W as u, Z as d, _ as f, b as p, d as m, et as h, f as g, g as _, h as v, j as y, jt as b, l as x, m as S, nt as C, st as w, t as T, v as E, x as D, y as O } from "./vue.runtime.esm-bundler-CjauPXjj.js";
2
2
  import { t as k } from "./timeouts-BSGxjuUF.js";
3
- import { A, f as j, o as ee, r as M } from "./dist-C04s_fLA.js";
4
- import { C as te, F as ne, L as N, t as P } from "./useEditorCore-wslttMH-.js";
5
- import { l as F, t as I } from "./dist-CivF9P8b.js";
6
- import { E as re, S as L, T as R, c as z, i as ie, l as ae, n as oe, u as B, w as se } from "./keys-CvX8D-8C.js";
7
- import { t as V } from "./useI18n-C2xQZ6K9.js";
8
- import { t as ce } from "./createLucideIcon-ClREiSx3.js";
9
- import { a as le, c as H, d as ue, f as de, h as fe, i as pe, l as U, m as me, n as he, p as ge, r as _e, s as ve, t as ye, u as W } from "./styles-B4tjX5SP.js";
10
- import { t as G } from "./check-DJrpDKO_.js";
11
- import { t as K } from "./circle-alert-ZQQc98HC.js";
12
- import { t as be } from "./clock-ik2pRJKG.js";
13
- import { t as xe } from "./loader-circle-Balo8p3d.js";
14
- import { t as q } from "./message-circle-B39qAHxs.js";
15
- import { t as J } from "./send-D2eSo4GH.js";
16
- import { t as Se } from "./sparkles-Chm5CZfb.js";
17
- import { t as Y } from "./triangle-alert-KpDVNbpn.js";
18
- import { t as Ce } from "./_plugin-vue_export-helper-BVAJ4lgT.js";
19
- import { n as X } from "./useCloudI18n-DOKSZql1.js";
20
- import { d as Z } from "./styleConstants-34eUKPOZ.js";
21
- import { _ as we, a as Te, c as Q, d as Ee, f as $, g as De, h as Oe, l as ke, m as Ae, n as je, o as Me, p as Ne, r as Pe, s as Fe, t as Ie, v as Le, y as Re } from "./cloud-6ZmAvF0j.js";
22
- var ze = ce("save", [
3
+ import { f as A, j, o as ee, r as M } from "./dist-Bmir0gYb.js";
4
+ import { C as N, F as te, L as P, t as F } from "./useEditorCore-BGnzcT7p.js";
5
+ import { l as I, t as L } from "./dist-CivF9P8b.js";
6
+ import { E as ne, S as R, T as z, c as B, i as re, l as ie, n as ae, u as V, w as oe } from "./keys-CvX8D-8C.js";
7
+ import { t as H } from "./useI18n-C2xQZ6K9.js";
8
+ import { t as se } from "./createLucideIcon-ClREiSx3.js";
9
+ import { a as ce, c as U, d as W, f as le, g as ue, h as G, i as de, l as fe, m as pe, n as me, p as he, r as ge, s as _e, t as ve, u as K } from "./styles-CavWjvol.js";
10
+ import { t as ye } from "./check-DJrpDKO_.js";
11
+ import { t as be } from "./circle-alert-ZQQc98HC.js";
12
+ import { t as xe } from "./clock-ik2pRJKG.js";
13
+ import { t as q } from "./loader-circle-Balo8p3d.js";
14
+ import { t as J } from "./message-circle-B39qAHxs.js";
15
+ import { t as Se } from "./send-DDdhIRj8.js";
16
+ import { t as Y } from "./sparkles-BN4a-CoF.js";
17
+ import { t as Ce } from "./triangle-alert-DyidRNX_.js";
18
+ import { t as we } from "./_plugin-vue_export-helper-Bwh4ceeO.js";
19
+ import { n as X } from "./useCloudI18n-BTTNBk5i.js";
20
+ import { d as Z } from "./styleConstants-wWRbcuEK.js";
21
+ import { _ as Te, a as Q, c as Ee, d as $, f as De, g as Oe, h as ke, l as Ae, m as je, n as Me, o as Ne, p as Pe, r as Fe, s as Ie, t as Le, v as Re, y as ze } from "./cloud-DJG4tb4_.js";
22
+ var Be = se("save", [
23
23
  ["path", {
24
24
  d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",
25
25
  key: "1c8476"
@@ -35,14 +35,14 @@ var ze = ce("save", [
35
35
  ]);
36
36
  //#endregion
37
37
  //#region src/cloud/composables/useSnapshotPreview.ts
38
- function Be(e) {
38
+ function Ve(e) {
39
39
  let { authManager: t, editor: n, history: r, conditionPreview: i, autoSave: a, onError: o } = e, s = C(null), c = h(null), l = h(null), u = !1;
40
40
  d(() => {
41
41
  u = !0;
42
42
  });
43
43
  let f = S(() => c.value !== null), p = S(() => s.value?.snapshots.value ?? []), m = S(() => s.value?.isLoading.value ?? !1), g = S(() => s.value?.isRestoring.value ?? !1);
44
44
  function _() {
45
- n.state.template?.id && !s.value && (s.value = De({
45
+ n.state.template?.id && !s.value && (s.value = Oe({
46
46
  authManager: t,
47
47
  templateId: n.state.template.id,
48
48
  onRestore: v,
@@ -92,7 +92,7 @@ function Be(e) {
92
92
  }
93
93
  //#endregion
94
94
  //#region src/cloud/composables/useCloudPanelState.ts
95
- function Ve() {
95
+ function He() {
96
96
  let e = h(null), t = S({
97
97
  get: () => e.value === "ai-chat",
98
98
  set: (t) => e.value = t ? "ai-chat" : null
@@ -115,7 +115,7 @@ function Ve() {
115
115
  function m(t) {
116
116
  c.value = !1, e.value = e.value === t ? null : t;
117
117
  }
118
- return I(l, () => {
118
+ return L(l, () => {
119
119
  c.value = !1;
120
120
  }), {
121
121
  activePanel: e,
@@ -137,8 +137,8 @@ function Ve() {
137
137
  }
138
138
  //#endregion
139
139
  //#region src/cloud/composables/useCollabUndoWarning.ts
140
- function He(e) {
141
- let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i = h(!1), a = h(!1), { start: o } = F(() => {
140
+ function Ue(e) {
141
+ let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i = h(!1), a = h(!1), { start: o } = I(() => {
142
142
  a.value = !1;
143
143
  }, k, { immediate: !1 });
144
144
  function s() {
@@ -151,8 +151,8 @@ function He(e) {
151
151
  }
152
152
  //#endregion
153
153
  //#region src/cloud/composables/useCloudFeatureFlags.ts
154
- function Ue(e) {
155
- let { planConfigInstance: t, aiConfig: n, editor: r } = e, i = S(() => t.hasFeature("ai_generation") && n.hasAnyMenuFeature.value), a = S(() => t.hasFeature("test_email")), o = S(() => !!r.state.template?.id), s = S(() => t.hasFeature("white_label")), c = S(() => t.config.value?.limits.max_templates ?? null), l = S(() => t.config.value?.template_count ?? 0), u = h(!1), d = h("idle"), f = h(""), { start: p } = F(() => {
154
+ function We(e) {
155
+ let { planConfigInstance: t, aiConfig: n, editor: r } = e, i = S(() => t.hasFeature("ai_generation") && n.hasAnyMenuFeature.value), a = S(() => t.hasFeature("test_email")), o = S(() => !!r.state.template?.id), s = S(() => t.hasFeature("white_label")), c = S(() => t.config.value?.limits.max_templates ?? null), l = S(() => t.config.value?.template_count ?? 0), u = h(!1), d = h("idle"), f = h(""), { start: p } = I(() => {
156
156
  d.value = "idle";
157
157
  }, 3e3, { immediate: !1 });
158
158
  return {
@@ -170,7 +170,7 @@ function Ue(e) {
170
170
  }
171
171
  //#endregion
172
172
  //#region src/cloud/composables/useCloudMediaLibrary.ts
173
- function We(e) {
173
+ function Ge(e) {
174
174
  let { onRequestMedia: t, mediaLibraryOpen: n, mediaLibraryAccept: r } = e, i = null;
175
175
  async function a() {
176
176
  if (t) {
@@ -205,30 +205,30 @@ function We(e) {
205
205
  }
206
206
  //#endregion
207
207
  //#region src/cloud/composables/useCloudInitialization.ts
208
- function Ge(e) {
209
- let { config: t, translations: n, fontsManager: r, emit: i, getCommentsSidebar: a } = e, s = h(!0), c = h(!1), u = h(null), d = !1, f = { value: null }, p = null, m = null, g = new Ie({
208
+ function Ke(e) {
209
+ let { config: t, translations: n, fontsManager: r, emit: i, getCommentsSidebar: a } = e, s = h(!0), c = h(!1), u = h(null), d = !1, f = { value: null }, p = null, m = null, g = new Le({
210
210
  ...t.auth,
211
211
  onError: t.onError
212
- }), _ = Ae({
212
+ }), _ = je({
213
213
  authManager: g,
214
214
  onError: t.onError
215
- }), v = h(/* @__PURE__ */ new Map()), y = Ee({
215
+ }), v = h(/* @__PURE__ */ new Map()), y = $({
216
216
  authManager: g,
217
217
  defaultFontFamily: t.fonts?.defaultFont,
218
218
  templateDefaults: t.templateDefaults,
219
219
  onError: t.onError,
220
220
  lockedBlocks: v
221
- }), b = Re({
221
+ }), b = ze({
222
222
  authManager: g,
223
223
  onError: t.onError
224
224
  });
225
- t.mcp?.enabled && Ne({
225
+ t.mcp?.enabled && Pe({
226
226
  editor: y,
227
227
  channel: b.channel,
228
228
  onOperation: t.mcp.onOperation
229
229
  });
230
230
  let x = null;
231
- t.collaboration?.enabled && (x = Me({
231
+ t.collaboration?.enabled && (x = Ne({
232
232
  authManager: g,
233
233
  editor: y,
234
234
  channel: b.channel,
@@ -239,8 +239,8 @@ function Ge(e) {
239
239
  onBlockUnlocked: t.collaboration.onBlockUnlocked
240
240
  }), l(() => x.lockedBlocks.value, (e) => {
241
241
  v.value = e;
242
- }, { immediate: !0 }), Fe(y, x));
243
- let C = S(() => !!t.collaboration?.enabled && _.hasFeature("collaboration")), w = P({
242
+ }, { immediate: !0 }), Ie(y, x));
243
+ let C = S(() => !!t.collaboration?.enabled && _.hasFeature("collaboration")), w = F({
244
244
  editor: y,
245
245
  config: {
246
246
  uiTheme: t.uiTheme,
@@ -251,7 +251,7 @@ function Ge(e) {
251
251
  displayConditions: t.displayConditions,
252
252
  onRequestMedia: null,
253
253
  editorType: t.editorType,
254
- accessibility: me(t),
254
+ accessibility: G(t),
255
255
  onSave: () => {
256
256
  f.value?.().catch((e) => {
257
257
  t.onError?.(e);
@@ -270,13 +270,13 @@ function Ge(e) {
270
270
  },
271
271
  themeExtraStyles: () => ({ "--tpl-drop-text": `"${n.canvas.dropHere}"` }),
272
272
  keyboardOptions: { onBeforeUndo: () => m?.showCollabUndoWarning() }
273
- }), T = He({
273
+ }), T = Ue({
274
274
  isCollaborationEnabled: C,
275
275
  getCollaboratorCount: () => x?.collaborators.value.length ?? 0,
276
276
  canUndo: w.history.canUndo
277
277
  });
278
278
  m = T;
279
- let E = Be({
279
+ let E = Ve({
280
280
  authManager: g,
281
281
  editor: y,
282
282
  history: w.history,
@@ -285,24 +285,24 @@ function Ge(e) {
285
285
  onError: t.onError
286
286
  });
287
287
  p = E;
288
- let D = Ve(), O = Te(t.ai), k = Ue({
288
+ let D = He(), O = Q(t.ai), k = We({
289
289
  planConfigInstance: _,
290
290
  aiConfig: O,
291
291
  editor: y
292
- }), A = We({
292
+ }), A = Ge({
293
293
  onRequestMedia: t.onRequestMedia,
294
294
  mediaLibraryOpen: D.mediaLibraryOpen,
295
295
  mediaLibraryAccept: D.mediaLibraryAccept
296
296
  });
297
- te({
297
+ N({
298
298
  onBlockMove: y.moveBlock,
299
299
  onBlockAdd: y.addBlock
300
300
  });
301
- let j = $({
301
+ let j = De({
302
302
  authManager: g,
303
303
  getFontsConfig: () => t.fonts,
304
304
  canUseCustomFonts: () => _.hasFeature("custom_fonts")
305
- }), ee = Le({
305
+ }), ee = Re({
306
306
  authManager: g,
307
307
  getTemplateId: () => y.state.template?.id ?? null,
308
308
  save: () => y.save(),
@@ -310,7 +310,7 @@ function Ge(e) {
310
310
  onError: t.onError,
311
311
  isAuthReady: c,
312
312
  onBeforeTestEmail: t.onBeforeTestEmail
313
- }), M = ke({
313
+ }), M = Ae({
314
314
  authManager: g,
315
315
  getTemplateId: () => y.state.template?.id ?? null,
316
316
  getSocketId: () => b.getSocketId(),
@@ -319,56 +319,56 @@ function Ge(e) {
319
319
  isAuthReady: c,
320
320
  hasCommentingFeature: () => t.commenting !== !1 && _.hasFeature("commenting")
321
321
  });
322
- Q({
322
+ Ee({
323
323
  comments: M,
324
324
  channel: b.channel
325
325
  });
326
- let N = Oe({
326
+ let P = ke({
327
327
  authManager: g,
328
328
  onError: t.onError
329
- }), F = h(!1), I = h(null), ae = h(!1), se = we({
329
+ }), I = h(!1), L = h(null), ie = h(!1), oe = Te({
330
330
  authManager: g,
331
331
  getTemplateId: () => y.state.template?.id ?? null
332
332
  });
333
- function V(e) {
333
+ function H(e) {
334
334
  D.commentsOpen.value = !0, queueMicrotask(() => {
335
335
  a()?.filterByBlock(e);
336
336
  });
337
337
  }
338
- o(L, A.handleRequestMedia), o(ie, g), o(oe, O), o(B, M), o(R, N), o(re, se), o(z, {
338
+ o(R, A.handleRequestMedia), o(re, g), o(ae, O), o(V, M), o(z, P), o(ne, oe), o(B, {
339
339
  plan: _,
340
340
  ai: O,
341
341
  comments: {
342
342
  getBlockCount: (e) => M.commentCountByBlock.value.get(e) ?? 0,
343
- openForBlock: V
343
+ openForBlock: H
344
344
  },
345
345
  savedModules: {
346
346
  openSaveDialog: (e) => {
347
- I.value = e ?? null, F.value = !0;
347
+ L.value = e ?? null, I.value = !0;
348
348
  },
349
349
  openBrowser: () => {
350
- ae.value = !0;
350
+ ie.value = !0;
351
351
  },
352
- moduleCount: S(() => N.modules.value.length)
352
+ moduleCount: S(() => P.modules.value.length)
353
353
  }
354
354
  });
355
- function ce(e) {
355
+ function se(e) {
356
356
  _.hasFeature("theme_customization") && (w.themeOverrides.value = e);
357
357
  }
358
- function le(e) {
358
+ function ce(e) {
359
359
  y.setUiTheme(e);
360
360
  }
361
- async function H() {
361
+ async function U() {
362
362
  s.value = !0, u.value = null;
363
363
  try {
364
364
  if (await g.initialize(), d) return;
365
365
  c.value = !0;
366
- let e = await je({ authManager: g });
366
+ let e = await Me({ authManager: g });
367
367
  if (d) return;
368
368
  if (!e.api.ok) throw Error("Health check failed: API is not reachable");
369
369
  if (!e.auth.ok) throw Error(`Health check failed: authentication error${e.auth.error ? ` - ${e.auth.error}` : ""}`);
370
- if (e.websocket.ok || ne.warn("WebSocket health check failed:", e.websocket.error ?? "unknown error", "-- real-time features will be disabled."), await _.fetchConfig(), d) return;
371
- r.setCustomFontsEnabled(_.hasFeature("custom_fonts")), t.customBlocks?.length && _.hasFeature("custom_blocks") && w.registerCustomBlocks(t.customBlocks), t.theme && _.hasFeature("theme_customization") && (w.themeOverrides.value = t.theme), t.modules !== !1 && _.hasFeature("saved_modules") && N.loadModules(), i("ready");
370
+ if (e.websocket.ok || te.warn("WebSocket health check failed:", e.websocket.error ?? "unknown error", "-- real-time features will be disabled."), await _.fetchConfig(), d) return;
371
+ r.setCustomFontsEnabled(_.hasFeature("custom_fonts")), t.customBlocks?.length && _.hasFeature("custom_blocks") && w.registerCustomBlocks(t.customBlocks), t.theme && _.hasFeature("theme_customization") && (w.themeOverrides.value = t.theme), t.modules !== !1 && _.hasFeature("saved_modules") && P.loadModules(), i("ready");
372
372
  } catch (e) {
373
373
  if (d) return;
374
374
  let n = e instanceof Error ? e : Error("Initialization failed", { cause: e });
@@ -377,7 +377,7 @@ function Ge(e) {
377
377
  d || (s.value = !1);
378
378
  }
379
379
  }
380
- function ue() {
380
+ function W() {
381
381
  d = !0, r.cleanupFontLinks(), b.disconnect(), w.destroy(), t.onUnmount?.();
382
382
  }
383
383
  return {
@@ -398,27 +398,27 @@ function Ge(e) {
398
398
  exporter: j,
399
399
  testEmail: ee,
400
400
  commentsInstance: M,
401
- savedModulesHeadless: N,
402
- scoringInstance: se,
401
+ savedModulesHeadless: P,
402
+ scoringInstance: oe,
403
403
  panelState: D,
404
404
  snapshotPreview: E,
405
405
  collabWarning: T,
406
- showSaveModuleDialog: F,
407
- showModuleBrowserModal: ae,
408
- saveModulePreSelectedBlockId: I,
406
+ showSaveModuleDialog: I,
407
+ showModuleBrowserModal: ie,
408
+ saveModulePreSelectedBlockId: L,
409
409
  onSaveHook: f,
410
- initialize: H,
411
- destroy: ue,
412
- setThemeOverrides: ce,
413
- setUiTheme: le,
414
- openCommentsForBlock: V
410
+ initialize: U,
411
+ destroy: W,
412
+ setThemeOverrides: se,
413
+ setUiTheme: ce,
414
+ openCommentsForBlock: H
415
415
  };
416
416
  }
417
417
  //#endregion
418
418
  //#region src/utils/preRenderCustomBlocks.ts
419
- async function Ke(e, t) {
419
+ async function qe(e, t) {
420
420
  let n = async (e) => {
421
- if (A(e)) {
421
+ if (j(e)) {
422
422
  let n = e;
423
423
  try {
424
424
  n.renderedHtml = await t.renderCustomBlock(n);
@@ -435,10 +435,10 @@ async function Ke(e, t) {
435
435
  }
436
436
  //#endregion
437
437
  //#region src/cloud/composables/useCloudLifecycle.ts
438
- function qe(e) {
438
+ function Je(e) {
439
439
  let { config: t, editor: n, websocket: r, planConfigInstance: i, snapshotPreview: a, core: o, exporter: s, featureFlags: c, isDestroyed: l } = e;
440
440
  function u() {
441
- return Pe(i.config.value.websocket);
441
+ return Fe(i.config.value.websocket);
442
442
  }
443
443
  async function d(e) {
444
444
  let i = await n.create(e);
@@ -451,7 +451,7 @@ function qe(e) {
451
451
  async function p() {
452
452
  c.isSaveExporting.value = !0, c.saveStatus.value = "idle";
453
453
  try {
454
- if (await Ke(n.content.value, o.registry), l()) throw Error("Component unmounted during save");
454
+ if (await qe(n.content.value, o.registry), l()) throw Error("Component unmounted during save");
455
455
  let e = await n.save();
456
456
  if (l()) throw Error("Component unmounted during save");
457
457
  a.initSnapshotHistory(), a.snapshotHistoryInstance.value?.loadSnapshots();
@@ -478,7 +478,7 @@ function qe(e) {
478
478
  }
479
479
  //#endregion
480
480
  //#region src/cloud/composables/useCloudSaveGate.ts
481
- function Je(e) {
481
+ function Ye(e) {
482
482
  let t = h(!1), n = null, r = S(() => e.planConfig.value?.accessibility?.blockOnError === !0), i = S(() => r.value ? e.issues.value.filter((e) => e.severity === "error") : []), a = S(() => i.value.length > 0);
483
483
  async function o(e) {
484
484
  return a.value ? (n = e, t.value = !0, !1) : (await e(), !0);
@@ -501,7 +501,7 @@ function Je(e) {
501
501
  }
502
502
  //#endregion
503
503
  //#region src/cloud/components/CloudSaveGateModal.vue?vue&type=script&setup=true&lang.ts
504
- var Ye = ["aria-label"], Xe = { 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)]" }, Ze = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Qe = { class: "tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]" }, $e = { class: "tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, et = { 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" }, tt = { class: "tpl:text-xs tpl:text-[var(--tpl-text)]" }, nt = { class: "tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, rt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, it = /* @__PURE__ */ t({
504
+ var Xe = ["aria-label"], Ze = { 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)]" }, Qe = { class: "tpl:flex tpl:items-center tpl:gap-2" }, $e = { class: "tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]" }, et = { class: "tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, tt = { 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" }, nt = { class: "tpl:text-xs tpl:text-[var(--tpl-text)]" }, rt = { class: "tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, it = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, at = /* @__PURE__ */ t({
505
505
  __name: "CloudSaveGateModal",
506
506
  props: {
507
507
  open: { type: Boolean },
@@ -523,18 +523,18 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
523
523
  "aria-label": w(o).saveGate.title,
524
524
  class: "tpl:fixed tpl:inset-0 tpl:z-50 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/40 tpl:p-6",
525
525
  onClick: s[2] ||= m((e) => i("cancel"), ["self"])
526
- }, [v("div", Xe, [
527
- v("header", Ze, [D(w(Y), {
526
+ }, [v("div", Ze, [
527
+ v("header", Qe, [D(w(Ce), {
528
528
  size: 18,
529
529
  "stroke-width": 2,
530
530
  class: "tpl:text-[var(--tpl-warning)]"
531
- }), v("h2", Qe, r(w(o).saveGate.title), 1)]),
532
- v("p", $e, r(w(o).saveGate.body), 1),
533
- v("ul", et, [(a(!0), E(g, null, n(e.issues, (e) => (a(), E("li", {
531
+ }), v("h2", $e, r(w(o).saveGate.title), 1)]),
532
+ v("p", et, r(w(o).saveGate.body), 1),
533
+ v("ul", tt, [(a(!0), E(g, null, n(e.issues, (e) => (a(), E("li", {
534
534
  key: `${e.ruleId}-${e.blockId ?? "template"}`,
535
535
  class: "tpl:flex tpl:flex-col tpl:gap-0.5 tpl:rounded tpl:px-2 tpl:py-1.5"
536
- }, [v("span", tt, r(e.message), 1), v("span", nt, r(e.ruleId), 1)]))), 128))]),
537
- v("footer", rt, [v("button", {
536
+ }, [v("span", nt, r(e.message), 1), v("span", rt, r(e.ruleId), 1)]))), 128))]),
537
+ v("footer", it, [v("button", {
538
538
  type: "button",
539
539
  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)]",
540
540
  onClick: s[0] ||= (e) => i("cancel")
@@ -543,11 +543,11 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
543
543
  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",
544
544
  onClick: s[1] ||= (e) => i("confirm")
545
545
  }, r(w(o).saveGate.confirm), 1)])
546
- ])], 8, Ye)) : f("", !0)]),
546
+ ])], 8, Xe)) : f("", !0)]),
547
547
  _: 1
548
548
  }));
549
549
  }
550
- }), at = {
550
+ }), ot = {
551
551
  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",
552
552
  style: {
553
553
  "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)",
@@ -556,28 +556,28 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
556
556
  "box-shadow": "var(--tpl-shadow-md)",
557
557
  "border-bottom": "1px solid var(--tpl-border)"
558
558
  }
559
- }, ot = { class: "tpl-header-left tpl:flex tpl:min-w-[200px] tpl:items-center tpl:gap-3" }, st = {
559
+ }, st = { class: "tpl-header-left tpl:flex tpl:min-w-[200px] tpl:items-center tpl:gap-3" }, ct = {
560
560
  key: 0,
561
561
  class: "tpl:text-xs tpl:opacity-60 tpl:text-[var(--tpl-text-muted)]"
562
- }, ct = { class: "tpl-header-center tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, lt = { class: "tpl-header-right tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, ut = ["data-tooltip"], dt = {
562
+ }, lt = { class: "tpl-header-center tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, ut = { class: "tpl-header-right tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, dt = ["data-tooltip"], ft = {
563
563
  key: 1,
564
564
  "aria-live": "polite",
565
565
  class: "tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-success)]"
566
- }, ft = {
566
+ }, pt = {
567
567
  key: 2,
568
568
  "aria-live": "polite",
569
569
  class: "tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
570
- }, pt = ["aria-label", "aria-expanded"], mt = {
570
+ }, mt = ["aria-label", "aria-expanded"], ht = {
571
571
  key: 0,
572
572
  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)]"
573
- }, ht = ["aria-expanded"], gt = {
573
+ }, gt = ["aria-expanded"], _t = {
574
574
  key: 0,
575
575
  class: "tpl:absolute tpl:right-0 tpl:top-full tpl:z-50 tpl:mt-1 tpl:origin-top-right"
576
- }, _t = ["disabled"], vt = ["disabled"], yt = /* @__PURE__ */ t({
576
+ }, vt = ["disabled"], yt = ["disabled"], bt = /* @__PURE__ */ t({
577
577
  __name: "CloudHeader",
578
578
  props: {
579
579
  editor: {},
580
- core: {},
580
+ onBeforeHistoryUndo: { type: Function },
581
581
  featureFlags: {},
582
582
  panelState: {},
583
583
  snapshotPreview: {},
@@ -591,22 +591,23 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
591
591
  },
592
592
  emits: ["save"],
593
593
  setup(t) {
594
- let n = s(() => import("./CollaboratorBar-Bw-lbt61.js")), i = s(() => import("./SnapshotHistory-Do-A5rYU.js")), o = s(() => import("./AiFeatureMenu-duUFSfDf.js")), { t: l, format: u } = X();
595
- return (s, d) => (a(), E("header", at, [
596
- v("div", ot, [t.featureFlags.templateLimit.value === null ? f("", !0) : (a(), E("span", st, r(w(u)(w(l).header.templatesUsed, {
594
+ let n = s(() => import("./CollaboratorBar-BsXMY-8e.js")), i = s(() => import("./SnapshotHistory-DoqtH0cw.js")), o = s(() => import("./AiFeatureMenu-DoLD5Cde.js")), { t: l, format: u } = X();
595
+ return (s, d) => (a(), E("header", ot, [
596
+ v("div", st, [t.featureFlags.templateLimit.value === null ? f("", !0) : (a(), E("span", ct, r(w(u)(w(l).header.templatesUsed, {
597
597
  used: t.featureFlags.templateCount.value,
598
598
  max: t.featureFlags.templateLimit.value
599
599
  })), 1))]),
600
- v("div", ct, [
601
- D(W, {
600
+ v("div", lt, [
601
+ D(W, { "on-before-undo": t.onBeforeHistoryUndo }, null, 8, ["on-before-undo"]),
602
+ D(K, {
602
603
  viewport: t.editor.state.viewport,
603
604
  onChange: t.editor.setViewport
604
605
  }, null, 8, ["viewport", "onChange"]),
605
- D(H, {
606
+ D(U, {
606
607
  "dark-mode": t.editor.state.darkMode,
607
608
  onChange: t.editor.setDarkMode
608
609
  }, null, 8, ["dark-mode", "onChange"]),
609
- D(U, {
610
+ D(fe, {
610
611
  "preview-mode": t.editor.state.previewMode,
611
612
  onChange: t.editor.setPreviewMode
612
613
  }, null, 8, ["preview-mode", "onChange"]),
@@ -630,19 +631,19 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
630
631
  "onNavigate"
631
632
  ])) : f("", !0)
632
633
  ]),
633
- v("div", lt, [
634
+ v("div", ut, [
634
635
  t.featureFlags.saveStatus.value === "error" ? (a(), E("div", {
635
636
  key: 0,
636
637
  "aria-live": "assertive",
637
638
  class: "tpl-tooltip tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]",
638
639
  "data-tooltip": t.featureFlags.saveErrorMessage.value
639
- }, [D(w(K), {
640
+ }, [D(w(be), {
640
641
  size: 12,
641
642
  "stroke-width": 2.5
642
- }), p(" " + r(w(l).header.saveFailed), 1)], 8, ut)) : t.featureFlags.saveStatus.value === "saved" ? (a(), E("div", dt, [D(w(G), {
643
+ }), p(" " + r(w(l).header.saveFailed), 1)], 8, dt)) : t.featureFlags.saveStatus.value === "saved" ? (a(), E("div", ft, [D(w(ye), {
643
644
  size: 12,
644
645
  "stroke-width": 2.5
645
- }), p(" " + r(w(l).header.saved), 1)])) : t.editor.state.isDirty ? (a(), E("div", ft, [d[4] ||= v("span", { class: "tpl-pulse tpl:size-1.5 tpl:rounded-full tpl:bg-[var(--tpl-primary)]" }, null, -1), p(" " + r(w(l).header.unsaved), 1)])) : f("", !0),
646
+ }), p(" " + r(w(l).header.saved), 1)])) : t.editor.state.isDirty ? (a(), E("div", pt, [d[4] ||= v("span", { class: "tpl-pulse tpl:size-1.5 tpl:rounded-full tpl:bg-[var(--tpl-primary)]" }, null, -1), p(" " + r(w(l).header.unsaved), 1)])) : f("", !0),
646
647
  t.commentsInstance.isEnabled.value && t.featureFlags.hasTemplateSaved.value ? (a(), E("button", {
647
648
  key: 3,
648
649
  "aria-label": t.commentsInstance.unresolvedCount.value > 0 ? `${w(l).comments.button} (${t.commentsInstance.unresolvedCount.value})` : w(l).comments.button,
@@ -655,13 +656,13 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
655
656
  }),
656
657
  onClick: d[0] ||= (e) => t.panelState.commentsOpen.value = !t.panelState.commentsOpen.value
657
658
  }, [
658
- D(w(q), {
659
+ D(w(J), {
659
660
  size: 16,
660
661
  "stroke-width": 2
661
662
  }),
662
663
  p(" " + r(w(l).comments.button) + " ", 1),
663
- t.commentsInstance.unresolvedCount.value > 0 && !t.panelState.commentsOpen.value ? (a(), E("span", mt, r(t.commentsInstance.unresolvedCount.value), 1)) : f("", !0)
664
- ], 14, pt)) : f("", !0),
664
+ t.commentsInstance.unresolvedCount.value > 0 && !t.panelState.commentsOpen.value ? (a(), E("span", ht, r(t.commentsInstance.unresolvedCount.value), 1)) : f("", !0)
665
+ ], 14, mt)) : f("", !0),
665
666
  t.featureFlags.canUseAiGeneration.value && t.featureFlags.hasTemplateSaved.value ? (a(), E("div", {
666
667
  key: 4,
667
668
  ref: (e) => t.panelState.aiMenuRef.value = e,
@@ -670,11 +671,11 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
670
671
  "aria-expanded": t.panelState.aiMenuOpen.value,
671
672
  class: e(["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", t.panelState.aiButtonActive.value ? "tpl-ai-btn--active" : "tpl-ai-btn--idle"]),
672
673
  onClick: d[1] ||= m((...e) => t.panelState.toggleAiMenu && t.panelState.toggleAiMenu(...e), ["stop"])
673
- }, [D(w(Se), {
674
+ }, [D(w(Y), {
674
675
  size: 16,
675
676
  "stroke-width": 2,
676
677
  class: "tpl-ai-btn-icon"
677
- }), p(" " + r(w(l).aiChat.button), 1)], 10, ht), D(T, {
678
+ }), p(" " + r(w(l).aiChat.button), 1)], 10, gt), D(T, {
678
679
  "enter-active-class": "tpl:transition-all tpl:duration-150 tpl:ease-out",
679
680
  "enter-from-class": "tpl:scale-95 tpl:opacity-0",
680
681
  "enter-to-class": "tpl:scale-100 tpl:opacity-100",
@@ -682,7 +683,7 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
682
683
  "leave-from-class": "tpl:scale-100 tpl:opacity-100",
683
684
  "leave-to-class": "tpl:scale-95 tpl:opacity-0"
684
685
  }, {
685
- default: c(() => [t.panelState.aiMenuOpen.value ? (a(), E("div", gt, [D(w(o), {
686
+ default: c(() => [t.panelState.aiMenuOpen.value ? (a(), E("div", _t, [D(w(o), {
686
687
  "active-feature": t.panelState.activeAiFeature.value,
687
688
  onSelect: t.panelState.handleAiFeatureSelect
688
689
  }, null, 8, ["active-feature", "onSelect"])])) : f("", !0)]),
@@ -698,16 +699,16 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
698
699
  },
699
700
  disabled: t.testEmail.isSending.value || !t.featureFlags.hasTemplateSaved.value,
700
701
  onClick: d[2] ||= (e) => t.panelState.testEmailModalOpen.value = !0
701
- }, [t.testEmail.isSending.value ? (a(), _(w(xe), {
702
+ }, [t.testEmail.isSending.value ? (a(), _(w(q), {
702
703
  key: 1,
703
704
  class: "tpl-spinner",
704
705
  size: 16,
705
706
  "stroke-width": 2
706
- })) : (a(), _(w(J), {
707
+ })) : (a(), _(w(Se), {
707
708
  key: 0,
708
709
  size: 16,
709
710
  "stroke-width": 2
710
- })), p(" " + r(w(l).testEmail.button), 1)], 10, _t)) : f("", !0),
711
+ })), p(" " + r(w(l).testEmail.button), 1)], 10, vt)) : f("", !0),
711
712
  v("button", {
712
713
  class: e(w(Z)),
713
714
  style: {
@@ -717,20 +718,20 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
717
718
  },
718
719
  disabled: t.isSaveDisabled,
719
720
  onClick: d[3] ||= (e) => s.$emit("save")
720
- }, [t.isSaving ? (a(), _(w(xe), {
721
+ }, [t.isSaving ? (a(), _(w(q), {
721
722
  key: 1,
722
723
  class: "tpl-spinner",
723
724
  size: 16,
724
725
  "stroke-width": 2
725
- })) : (a(), _(w(ze), {
726
+ })) : (a(), _(w(Be), {
726
727
  key: 0,
727
728
  size: 16,
728
729
  "stroke-width": 2
729
- })), p(" " + r(t.isSaving ? w(l).header.saving : w(l).header.save), 1)], 10, vt)
730
+ })), p(" " + r(t.isSaving ? w(l).header.saving : w(l).header.save), 1)], 10, yt)
730
731
  ])
731
732
  ]));
732
733
  }
733
- }), bt = /* @__PURE__ */ t({
734
+ }), xt = /* @__PURE__ */ t({
734
735
  __name: "CloudPanels",
735
736
  props: {
736
737
  config: {},
@@ -753,7 +754,7 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
753
754
  "module-insert"
754
755
  ],
755
756
  setup(e, { expose: t, emit: n }) {
756
- let r = s(() => import("./AiChatSidebar-DWGPVtvC.js")), i = s(() => import("./CommentsSidebar-BaD5F53-.js")), o = s(() => import("./DesignReferenceSidebar-BSH7uNP_.js")), c = s(() => import("./TemplateScoringPanel-CS7o62zS.js")), l = s(() => import("./TestEmailModal-DGj_9V1u.js")), u = s(() => import("./SaveModuleDialog-zMQTpez7.js")), d = s(() => import("./ModuleBrowserModal-6phxZSKI.js")), p = s(async () => (await import("@aswin.dev/media-library")).MediaLibraryModal), m = n;
757
+ let r = s(() => import("./AiChatSidebar-DeB0w_32.js")), i = s(() => import("./CommentsSidebar-DIWIa4rS.js")), o = s(() => import("./DesignReferenceSidebar-RDlnhL-6.js")), c = s(() => import("./TemplateScoringPanel-DQv2ZAiL.js")), l = s(() => import("./TestEmailModal-iIeYJYsj.js")), u = s(() => import("./SaveModuleDialog-ClovqI6h.js")), d = s(() => import("./ModuleBrowserModal-b7HbpByz.js")), p = s(async () => (await import("@aswin.dev/media-library")).MediaLibraryModal), m = n;
757
758
  function v(e, t, n) {
758
759
  t.history.record(), n.setContent(e), t.conditionPreview.reset();
759
760
  }
@@ -827,23 +828,23 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
827
828
  ])
828
829
  ], 64));
829
830
  }
830
- }), xt = {
831
+ }), St = {
831
832
  key: 0,
832
833
  class: "tpl-loading tpl:absolute tpl:inset-0 tpl:z-overlay tpl:flex tpl:flex-col tpl:bg-[var(--tpl-bg)]"
833
- }, St = { class: "tpl:flex tpl:flex-1 tpl:overflow-hidden" }, Ct = { 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)]" }, wt = /* @__PURE__ */ t({
834
+ }, Ct = { class: "tpl:flex tpl:flex-1 tpl:overflow-hidden" }, wt = { 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)]" }, Tt = /* @__PURE__ */ t({
834
835
  __name: "CloudLoadingOverlay",
835
836
  props: { visible: { type: Boolean } },
836
837
  setup(e) {
837
- return (t, r) => e.visible ? (a(), E("div", xt, [r[1] ||= O("<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), v("div", St, [v("div", Ct, [(a(), E(g, null, n(5, (e) => v("div", {
838
+ return (t, r) => e.visible ? (a(), E("div", St, [r[1] ||= O("<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), v("div", Ct, [v("div", wt, [(a(), E(g, null, n(5, (e) => v("div", {
838
839
  key: e,
839
840
  class: "tpl-shimmer tpl:size-7 tpl:rounded-[var(--tpl-radius-sm)]"
840
841
  })), 64))]), r[0] ||= O("<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)])])) : f("", !0);
841
842
  }
842
- }), Tt = {
843
+ }), Et = {
843
844
  key: 0,
844
845
  role: "alert",
845
846
  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)]"
846
- }, Et = { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]" }, Dt = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center" }, Ot = { class: "tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]" }, kt = { class: "tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, At = /* @__PURE__ */ t({
847
+ }, Dt = { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]" }, Ot = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center" }, kt = { class: "tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]" }, At = { class: "tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, jt = /* @__PURE__ */ t({
847
848
  __name: "CloudErrorOverlay",
848
849
  props: {
849
850
  error: {},
@@ -858,13 +859,13 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
858
859
  function s(e) {
859
860
  return "isNotFound" in e && !!e.isNotFound;
860
861
  }
861
- return (t, c) => e.visible && e.error ? (a(), E("div", Tt, [
862
- v("div", Et, [D(w(K), {
862
+ return (t, c) => e.visible && e.error ? (a(), E("div", Et, [
863
+ v("div", Dt, [D(w(be), {
863
864
  size: 32,
864
865
  "stroke-width": 1.5,
865
866
  class: "tpl:text-[var(--tpl-danger)]"
866
867
  })]),
867
- v("div", Dt, [v("h2", Ot, r(w(i).error.title), 1), v("p", kt, r(o(e.error)), 1)]),
868
+ v("div", Ot, [v("h2", kt, r(w(i).error.title), 1), v("p", At, r(o(e.error)), 1)]),
868
869
  s(e.error) ? f("", !0) : (a(), E("button", {
869
870
  key: 0,
870
871
  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)]",
@@ -872,20 +873,20 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
872
873
  }, r(w(i).error.retry), 1))
873
874
  ])) : f("", !0);
874
875
  }
875
- }), jt = {
876
+ }), Mt = {
876
877
  key: 0,
877
878
  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)]"
878
- }, Mt = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-text)]" }, Nt = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Pt = /* @__PURE__ */ t({
879
+ }, Nt = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-text)]" }, Pt = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ft = /* @__PURE__ */ t({
879
880
  __name: "SnapshotPreviewBanner",
880
881
  props: { visible: { type: Boolean } },
881
882
  emits: ["cancel", "confirm"],
882
883
  setup(e, { emit: t }) {
883
884
  let n = t, { t: i } = X();
884
- return (t, o) => e.visible ? (a(), E("div", jt, [v("div", Mt, [D(w(be), {
885
+ return (t, o) => e.visible ? (a(), E("div", Mt, [v("div", Nt, [D(w(xe), {
885
886
  size: 18,
886
887
  "stroke-width": 2,
887
888
  class: "tpl:text-[var(--tpl-primary)]"
888
- }), v("span", null, r(w(i).snapshotPreview.message), 1)]), v("div", Nt, [v("button", {
889
+ }), v("span", null, r(w(i).snapshotPreview.message), 1)]), v("div", Pt, [v("button", {
889
890
  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)]",
890
891
  style: { "background-color": "transparent" },
891
892
  onClick: o[0] ||= (e) => n("cancel")
@@ -894,7 +895,7 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
894
895
  onClick: o[1] ||= (e) => n("confirm")
895
896
  }, r(w(i).snapshotPreview.restore), 1)])])) : f("", !0);
896
897
  }
897
- }), Ft = {
898
+ }), It = {
898
899
  key: 0,
899
900
  role: "status",
900
901
  "aria-live": "polite",
@@ -904,14 +905,14 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
904
905
  color: "var(--tpl-text)",
905
906
  border: "1px solid var(--tpl-warning)"
906
907
  }
907
- }, It = /* @__PURE__ */ t({
908
+ }, Lt = /* @__PURE__ */ t({
908
909
  __name: "CollabUndoToast",
909
910
  props: { visible: { type: Boolean } },
910
911
  setup(e) {
911
- let { t } = V();
912
- return (n, i) => e.visible ? (a(), E("div", Ft, r(w(t).history.collabWarning), 1)) : f("", !0);
912
+ let { t } = H();
913
+ return (n, i) => e.visible ? (a(), E("div", It, r(w(t).history.collabWarning), 1)) : f("", !0);
913
914
  }
914
- }), Lt = ["data-tpl-theme"], Rt = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, zt = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, Bt = ["aria-label"], Vt = /* @__PURE__ */ Ce(/* @__PURE__ */ t({
915
+ }), Rt = ["data-tpl-theme"], zt = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, Bt = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, Vt = ["aria-label"], Ht = /* @__PURE__ */ we(/* @__PURE__ */ t({
915
916
  __name: "CloudEditor",
916
917
  props: {
917
918
  config: {},
@@ -922,57 +923,57 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
922
923
  emits: ["ready"],
923
924
  setup(t, { expose: n, emit: s }) {
924
925
  let d = t;
925
- o(ae, d.cloudTranslations);
926
- let m = s, C = h(null), O = h(null), k = Ge({
926
+ o(ie, d.cloudTranslations);
927
+ let m = s, C = h(null), O = h(null), k = Ke({
927
928
  config: d.config,
928
929
  translations: d.translations,
929
930
  fontsManager: d.fontsManager,
930
931
  emit: m,
931
932
  getCommentsSidebar: () => C.value ? { filterByBlock: C.value.filterCommentsByBlock } : null
932
- }), { isInitializing: A, isAuthReady: te, initError: ne, planConfigInstance: P, websocket: F, collaboration: I, isCollaborationEnabled: re, editor: L, core: R, featureFlags: z, mediaLib: ie, exporter: oe, testEmail: B, commentsInstance: V, savedModulesHeadless: ce, panelState: H, snapshotPreview: U, collabWarning: me, showSaveModuleDialog: W, showModuleBrowserModal: G, saveModulePreSelectedBlockId: K, setThemeOverrides: be, setUiTheme: xe } = k, q = h("blocks");
933
- o(se, q);
934
- let J = S(() => N(d.config.editorType) === "popup"), Se = S(() => J.value && q.value === "displayRules"), Y = S(() => J.value && q.value === "schedule"), Ce = S(() => q.value === "design"), X = S(() => J.value && (Se.value || Y.value || Ce.value)), Z = S(() => Se.value || Y.value);
935
- l(() => [te.value, L.content.value.settings.popup], ([e]) => {
936
- if (!e || !J.value || L.content.value.settings.popup) return;
937
- let t = j();
938
- L.updateSettings({
933
+ }), { isInitializing: j, isAuthReady: N, initError: te, planConfigInstance: F, websocket: I, collaboration: L, isCollaborationEnabled: ne, editor: R, core: z, featureFlags: B, mediaLib: re, exporter: ae, testEmail: V, commentsInstance: H, savedModulesHeadless: se, panelState: U, snapshotPreview: W, collabWarning: G, showSaveModuleDialog: fe, showModuleBrowserModal: K, saveModulePreSelectedBlockId: ye, setThemeOverrides: be, setUiTheme: xe } = k, q = h("blocks");
934
+ o(oe, q);
935
+ let J = S(() => P(d.config.editorType) === "popup"), Se = S(() => J.value && q.value === "displayRules"), Y = S(() => J.value && q.value === "schedule"), Ce = S(() => q.value === "design"), we = S(() => J.value && (Se.value || Y.value || Ce.value)), X = S(() => Se.value || Y.value);
936
+ l(() => [N.value, R.content.value.settings.popup], ([e]) => {
937
+ if (!e || !J.value || R.content.value.settings.popup) return;
938
+ let t = A();
939
+ R.updateSettings({
939
940
  popup: t,
940
941
  width: M[t.design.sizePreset]
941
942
  });
942
943
  }, { immediate: !0 });
943
- async function we(e) {
944
+ async function Z(e) {
944
945
  try {
945
- await B.sendTestEmail(e), H.testEmailModalOpen.value = !1;
946
+ await V.sendTestEmail(e), U.testEmailModalOpen.value = !1;
946
947
  } catch {}
947
948
  }
948
949
  function Te(e, t) {
949
950
  for (let n = 0; n < e.content.length; n++) {
950
951
  let r = ee(e.content[n]), i = t === void 0 ? void 0 : t + n;
951
- L.addBlock(r, void 0, void 0, i);
952
+ R.addBlock(r, void 0, void 0, i);
952
953
  }
953
- G.value = !1;
954
+ K.value = !1;
954
955
  }
955
- let Q = qe({
956
+ let Q = Je({
956
957
  config: d.config,
957
- editor: L,
958
- websocket: F,
959
- planConfigInstance: P,
960
- snapshotPreview: U,
961
- core: R,
962
- exporter: oe,
963
- featureFlags: z,
958
+ editor: R,
959
+ websocket: I,
960
+ planConfigInstance: F,
961
+ snapshotPreview: W,
962
+ core: z,
963
+ exporter: ae,
964
+ featureFlags: B,
964
965
  isDestroyed: k.isDestroyed
965
966
  }), Ee = S(() => {
966
- if (L.state.previewMode) return ["tpl:left-0", "tpl:right-0"];
967
- let e = H.rightPanelOpen.value ? "tpl:right-[680px]" : "tpl:right-[320px]";
967
+ if (R.state.previewMode) return ["tpl:left-0", "tpl:right-0"];
968
+ let e = U.rightPanelOpen.value ? "tpl:right-[680px]" : "tpl:right-[320px]";
968
969
  if (!J.value) return ["tpl:left-12", e];
969
970
  let t;
970
971
  t = q.value === "blocks" ? "tpl:left-[272px]" : Ce.value ? "tpl:left-[392px]" : "tpl:left-[72px]";
971
- let n = X.value ? "tpl:right-0" : e;
972
+ let n = we.value ? "tpl:right-0" : e;
972
973
  return [t, n];
973
- }), $ = Je({
974
- issues: R.accessibilityLint ? R.accessibilityLint.issues : h([]),
975
- planConfig: P.config
974
+ }), $ = Ye({
975
+ issues: z.accessibilityLint ? z.accessibilityLint.issues : h([]),
976
+ planConfig: F.config
976
977
  });
977
978
  async function De() {
978
979
  await $.tryRunSave(() => Q.saveTemplate().catch((e) => d.config.onError?.(e)));
@@ -982,22 +983,28 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
982
983
  }), i(() => {
983
984
  k.destroy();
984
985
  }), n({
985
- getContent: () => L.content.value,
986
- setContent: (e) => L.setContent(e),
986
+ getContent: () => R.content.value,
987
+ setContent: (e) => R.setContent(e),
987
988
  setTheme: xe,
988
989
  setThemeOverrides: be,
990
+ undo: () => {
991
+ G.showCollabUndoWarning(), z.history.undo();
992
+ },
993
+ redo: () => z.history.redo(),
994
+ canUndo: () => z.history.canUndo.value,
995
+ canRedo: () => z.history.canRedo.value,
989
996
  create: Q.createTemplate,
990
997
  load: Q.loadTemplate,
991
998
  save: Q.saveTemplate,
992
- sendTestEmail: B.sendTestEmail,
999
+ sendTestEmail: V.sendTestEmail,
993
1000
  startTour: (e) => O.value?.start(e),
994
1001
  dismissTour: () => O.value?.dismiss(),
995
- resetTourDismissed: () => pe(d.config.tour),
996
- isTourDismissed: () => d.config.tour ? le(d.config.tour) : !0
1002
+ resetTourDismissed: () => de(d.config.tour),
1003
+ isTourDismissed: () => d.config.tour ? ce(d.config.tour) : !0
997
1004
  }), (n, i) => (a(), E("div", {
998
- class: e(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": w(L).state.darkMode }]),
999
- "data-tpl-theme": w(R).resolvedTheme.value,
1000
- style: b(w(R).themeStyles.value)
1005
+ class: e(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": w(R).state.darkMode }]),
1006
+ "data-tpl-theme": w(z).resolvedTheme.value,
1007
+ style: b(w(z).themeStyles.value)
1001
1008
  }, [
1002
1009
  D(T, {
1003
1010
  "enter-active-class": "tpl:transition-opacity tpl:duration-200",
@@ -1007,7 +1014,7 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1007
1014
  "leave-from-class": "tpl:opacity-100",
1008
1015
  "leave-to-class": "tpl:opacity-0"
1009
1016
  }, {
1010
- default: c(() => [D(wt, { visible: w(A) || w(L).state.isLoading }, null, 8, ["visible"])]),
1017
+ default: c(() => [D(Tt, { visible: w(j) || w(R).state.isLoading }, null, 8, ["visible"])]),
1011
1018
  _: 1
1012
1019
  }),
1013
1020
  D(T, {
@@ -1018,9 +1025,9 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1018
1025
  "leave-from-class": "tpl:opacity-100",
1019
1026
  "leave-to-class": "tpl:opacity-0"
1020
1027
  }, {
1021
- default: c(() => [D(At, {
1022
- error: w(ne),
1023
- visible: !!w(ne) && !w(A),
1028
+ default: c(() => [D(jt, {
1029
+ error: w(te),
1030
+ visible: !!w(te) && !w(j),
1024
1031
  onRetry: w(k).initialize
1025
1032
  }, null, 8, [
1026
1033
  "error",
@@ -1029,23 +1036,23 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1029
1036
  ])]),
1030
1037
  _: 1
1031
1038
  }),
1032
- D(yt, {
1033
- editor: w(L),
1034
- core: w(R),
1035
- "feature-flags": w(z),
1036
- "panel-state": w(H),
1037
- "snapshot-preview": w(U),
1038
- "comments-instance": w(V),
1039
- "test-email": w(B),
1040
- websocket: w(F),
1041
- collaboration: w(I),
1042
- "is-collaboration-enabled": w(re),
1043
- "is-saving": w(L).state.isSaving || w(z).isSaveExporting.value,
1044
- "is-save-disabled": w(L).state.isSaving || w(z).isSaveExporting.value || !w(L).state.isDirty,
1039
+ D(bt, {
1040
+ editor: w(R),
1041
+ "on-before-history-undo": w(G).showCollabUndoWarning,
1042
+ "feature-flags": w(B),
1043
+ "panel-state": w(U),
1044
+ "snapshot-preview": w(W),
1045
+ "comments-instance": w(H),
1046
+ "test-email": w(V),
1047
+ websocket: w(I),
1048
+ collaboration: w(L),
1049
+ "is-collaboration-enabled": w(ne),
1050
+ "is-saving": w(R).state.isSaving || w(B).isSaveExporting.value,
1051
+ "is-save-disabled": w(R).state.isSaving || w(B).isSaveExporting.value || !w(R).state.isDirty,
1045
1052
  onSave: De
1046
1053
  }, null, 8, [
1047
1054
  "editor",
1048
- "core",
1055
+ "on-before-history-undo",
1049
1056
  "feature-flags",
1050
1057
  "panel-state",
1051
1058
  "snapshot-preview",
@@ -1057,7 +1064,7 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1057
1064
  "is-saving",
1058
1065
  "is-save-disabled"
1059
1066
  ]),
1060
- D(it, {
1067
+ D(at, {
1061
1068
  open: w($).modalOpen.value,
1062
1069
  issues: w($).blockingIssues.value,
1063
1070
  onCancel: w($).cancel,
@@ -1068,10 +1075,10 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1068
1075
  "onCancel",
1069
1076
  "onConfirm"
1070
1077
  ]),
1071
- D(Pt, {
1072
- visible: w(U).isPreviewingSnapshot.value,
1073
- onCancel: w(U).cancelPreview,
1074
- onConfirm: w(U).confirmRestoreSnapshot
1078
+ D(Ft, {
1079
+ visible: w(W).isPreviewingSnapshot.value,
1080
+ onCancel: w(W).cancelPreview,
1081
+ onConfirm: w(W).confirmRestoreSnapshot
1075
1082
  }, null, 8, [
1076
1083
  "visible",
1077
1084
  "onCancel",
@@ -1085,21 +1092,21 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1085
1092
  "leave-from-class": "tpl:translate-y-0 tpl:opacity-100",
1086
1093
  "leave-to-class": "tpl:translate-y-[-8px] tpl:opacity-0"
1087
1094
  }, {
1088
- default: c(() => [D(It, { visible: w(me).collabUndoWarningVisible.value }, null, 8, ["visible"])]),
1095
+ default: c(() => [D(Lt, { visible: w(G).collabUndoWarningVisible.value }, null, 8, ["visible"])]),
1089
1096
  _: 1
1090
1097
  }),
1091
- u(D(de, null, null, 512), [[x, !w(L).state.previewMode]]),
1098
+ u(D(he, null, null, 512), [[x, !w(R).state.previewMode]]),
1092
1099
  v("div", {
1093
- class: e(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [...Ee.value, w(U).isPreviewingSnapshot.value ? "tpl:top-[104px]" : "tpl:top-14"]]),
1100
+ class: e(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [...Ee.value, w(W).isPreviewingSnapshot.value ? "tpl:top-[104px]" : "tpl:top-14"]]),
1094
1101
  style: b({
1095
1102
  transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",
1096
- backgroundColor: Z.value ? "var(--tpl-bg)" : "var(--tpl-canvas-bg)"
1103
+ backgroundColor: X.value ? "var(--tpl-bg)" : "var(--tpl-canvas-bg)"
1097
1104
  })
1098
- }, [J.value && q.value === "displayRules" ? (a(), _(he, { key: 0 })) : J.value && q.value === "schedule" ? (a(), _(ye, {
1105
+ }, [J.value && q.value === "displayRules" ? (a(), _(me, { key: 0 })) : J.value && q.value === "schedule" ? (a(), _(ve, {
1099
1106
  key: 1,
1100
1107
  layout: "standalone"
1101
- })) : (a(), E(g, { key: 2 }, [v("div", Rt, [D(T, { name: "tpl-restore-btn" }, {
1102
- default: c(() => [w(R).conditionPreview.hasHiddenBlocks.value ? (a(), E("button", {
1108
+ })) : (a(), E(g, { key: 2 }, [v("div", zt, [D(T, { name: "tpl-restore-btn" }, {
1109
+ default: c(() => [w(z).conditionPreview.hasHiddenBlocks.value ? (a(), E("button", {
1103
1110
  key: 0,
1104
1111
  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",
1105
1112
  style: {
@@ -1108,23 +1115,23 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1108
1115
  "border-color": "var(--tpl-warning)",
1109
1116
  "backdrop-filter": "blur(8px)"
1110
1117
  },
1111
- onClick: i[0] ||= (e) => w(R).conditionPreview.reset()
1112
- }, [D(w(fe), {
1118
+ onClick: i[0] ||= (e) => w(z).conditionPreview.reset()
1119
+ }, [D(w(ue), {
1113
1120
  size: 13,
1114
1121
  "stroke-width": 2
1115
- }), p(" " + r(w(R).t.blockSettings.restoreHiddenBlocks), 1)])) : f("", !0)]),
1122
+ }), p(" " + r(w(z).t.blockSettings.restoreHiddenBlocks), 1)])) : f("", !0)]),
1116
1123
  _: 1
1117
- })]), v("main", zt, [D(ge, {
1118
- viewport: w(L).state.viewport,
1119
- content: w(L).content.value,
1120
- "selected-block-id": w(L).state.selectedBlockId,
1121
- "dark-mode": w(L).state.darkMode,
1122
- "preview-mode": w(L).state.previewMode,
1124
+ })]), v("main", Bt, [D(pe, {
1125
+ viewport: w(R).state.viewport,
1126
+ content: w(R).content.value,
1127
+ "selected-block-id": w(R).state.selectedBlockId,
1128
+ "dark-mode": w(R).state.darkMode,
1129
+ "preview-mode": w(R).state.previewMode,
1123
1130
  "multi-page-canvas": t.config.multiPageCanvas ?? !1,
1124
- "locked-blocks": w(I)?.lockedBlocks.value ?? void 0,
1125
- onSelectBlock: w(L).selectBlock,
1126
- onOpenAiChat: i[1] ||= (e) => w(H).aiChatOpen.value = !0,
1127
- onOpenDesignReference: i[2] ||= (e) => w(H).designReferenceOpen.value = !0
1131
+ "locked-blocks": w(L)?.lockedBlocks.value ?? void 0,
1132
+ onSelectBlock: w(R).selectBlock,
1133
+ onOpenAiChat: i[1] ||= (e) => w(U).aiChatOpen.value = !0,
1134
+ onOpenDesignReference: i[2] ||= (e) => w(U).designReferenceOpen.value = !0
1128
1135
  }, null, 8, [
1129
1136
  "viewport",
1130
1137
  "content",
@@ -1135,7 +1142,7 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1135
1142
  "locked-blocks",
1136
1143
  "onSelectBlock"
1137
1144
  ])])], 64))], 6),
1138
- t.config.branding !== !1 && !w(z).isWhiteLabeled.value ? (a(), _(ve, {
1145
+ t.config.branding !== !1 && !w(B).isWhiteLabeled.value ? (a(), _(_e, {
1139
1146
  key: 0,
1140
1147
  "position-class": Ee.value
1141
1148
  }, null, 8, ["position-class"])) : f("", !0),
@@ -1144,41 +1151,41 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1144
1151
  role: "status",
1145
1152
  "aria-live": "polite",
1146
1153
  "aria-atomic": "true",
1147
- "aria-label": w(R).t.landmarks.reorderAnnouncements
1148
- }, r(w(R).keyboardReorder.announcement.value), 9, Bt),
1149
- u(D(ue, {
1150
- "selected-block": w(L).selectedBlock.value,
1151
- settings: w(L).content.value.settings,
1152
- "shifted-left": w(H).rightPanelOpen.value,
1153
- onUpdateBlock: i[3] ||= (e) => w(L).updateBlock(w(L).selectedBlock.value.id, e),
1154
- onDeleteBlock: i[4] ||= (e) => w(R).blockActions.deleteBlock(w(L).selectedBlock.value.id),
1155
- onDuplicateBlock: i[5] ||= (e) => w(R).blockActions.duplicateBlock(w(L).selectedBlock.value),
1156
- onUpdateSettings: w(L).updateSettings
1154
+ "aria-label": w(z).t.landmarks.reorderAnnouncements
1155
+ }, r(w(z).keyboardReorder.announcement.value), 9, Vt),
1156
+ u(D(le, {
1157
+ "selected-block": w(R).selectedBlock.value,
1158
+ settings: w(R).content.value.settings,
1159
+ "shifted-left": w(U).rightPanelOpen.value,
1160
+ onUpdateBlock: i[3] ||= (e) => w(R).updateBlock(w(R).selectedBlock.value.id, e),
1161
+ onDeleteBlock: i[4] ||= (e) => w(z).blockActions.deleteBlock(w(R).selectedBlock.value.id),
1162
+ onDuplicateBlock: i[5] ||= (e) => w(z).blockActions.duplicateBlock(w(R).selectedBlock.value),
1163
+ onUpdateSettings: w(R).updateSettings
1157
1164
  }, null, 8, [
1158
1165
  "selected-block",
1159
1166
  "settings",
1160
1167
  "shifted-left",
1161
1168
  "onUpdateSettings"
1162
- ]), [[x, !w(L).state.previewMode && !X.value]]),
1163
- !w(A) && w(te) ? (a(), _(bt, {
1169
+ ]), [[x, !w(R).state.previewMode && !we.value]]),
1170
+ !w(j) && w(N) ? (a(), _(xt, {
1164
1171
  key: 1,
1165
1172
  ref_key: "cloudPanelsRef",
1166
1173
  ref: C,
1167
1174
  config: d.config,
1168
- editor: w(L),
1169
- core: w(R),
1170
- "panel-state": w(H),
1171
- "plan-config-instance": w(P),
1172
- "test-email": w(B),
1173
- "media-lib": w(ie),
1174
- "saved-modules-headless": w(ce),
1175
- "show-save-module-dialog": w(W),
1176
- "save-module-pre-selected-block-id": w(K),
1177
- "show-module-browser-modal": w(G),
1178
- "onUpdate:showSaveModuleDialog": i[6] ||= (e) => W.value = e,
1179
- "onUpdate:saveModulePreSelectedBlockId": i[7] ||= (e) => K.value = e,
1180
- "onUpdate:showModuleBrowserModal": i[8] ||= (e) => G.value = e,
1181
- onSendTestEmail: we,
1175
+ editor: w(R),
1176
+ core: w(z),
1177
+ "panel-state": w(U),
1178
+ "plan-config-instance": w(F),
1179
+ "test-email": w(V),
1180
+ "media-lib": w(re),
1181
+ "saved-modules-headless": w(se),
1182
+ "show-save-module-dialog": w(fe),
1183
+ "save-module-pre-selected-block-id": w(ye),
1184
+ "show-module-browser-modal": w(K),
1185
+ "onUpdate:showSaveModuleDialog": i[6] ||= (e) => fe.value = e,
1186
+ "onUpdate:saveModulePreSelectedBlockId": i[7] ||= (e) => ye.value = e,
1187
+ "onUpdate:showModuleBrowserModal": i[8] ||= (e) => K.value = e,
1188
+ onSendTestEmail: Z,
1182
1189
  onModuleInsert: Te
1183
1190
  }, null, 8, [
1184
1191
  "config",
@@ -1193,15 +1200,15 @@ var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1193
1200
  "save-module-pre-selected-block-id",
1194
1201
  "show-module-browser-modal"
1195
1202
  ])) : f("", !0),
1196
- t.config.tour ? (a(), _(_e, {
1203
+ t.config.tour ? (a(), _(ge, {
1197
1204
  key: 2,
1198
1205
  ref_key: "editorTourRef",
1199
1206
  ref: O,
1200
1207
  "tour-config": t.config.tour,
1201
- "dark-mode": w(L).state.darkMode
1208
+ "dark-mode": w(R).state.darkMode
1202
1209
  }, null, 8, ["tour-config", "dark-mode"])) : f("", !0)
1203
- ], 14, Lt));
1210
+ ], 14, Rt));
1204
1211
  }
1205
- }), [["__scopeId", "data-v-48b2d525"]]);
1212
+ }), [["__scopeId", "data-v-6985a9ad"]]);
1206
1213
  //#endregion
1207
- export { Vt as default };
1214
+ export { Ht as default };