@templatical/editor 0.12.1 → 0.14.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 (155) hide show
  1. package/dist/{AiChatSidebar-CXH7l1Ar.js → AiChatSidebar-J8iO_sX7.js} +16 -16
  2. package/dist/{AiFeatureMenu-BKbUUc1D.js → AiFeatureMenu-F2diEDgV.js} +10 -10
  3. package/dist/{BlockIssueBadge-C-EPqWsh.js → BlockIssueBadge-a-qlByxF.js} +5 -5
  4. package/dist/{CloudEditor-CB16QzKM.js → CloudEditor-CDjtwb4i.js} +284 -250
  5. package/dist/{CollaboratorBar-ACUA7lBJ.js → CollaboratorBar-B_EnJLtW.js} +4 -4
  6. package/dist/{CommentsSidebar-CpRLN40c.js → CommentsSidebar-DaP9BA_r.js} +18 -18
  7. package/dist/{CountdownBlock-C-6o19qS.js → CountdownBlock-DtAokAVw.js} +3 -3
  8. package/dist/{CountdownToolbar-Dol7Q0Pv.js → CountdownToolbar-Dtqgwy0g.js} +3 -3
  9. package/dist/{DesignReferenceSidebar-0dTsBW08.js → DesignReferenceSidebar-BHRlTqlT.js} +21 -33
  10. package/dist/{IssuesPanel-I0z6k6-H.js → IssuesPanel-u7ee3Wrl.js} +11 -11
  11. package/dist/{LoadingTrack-C7mGWPHS.js → LoadingTrack-CV3ID80N.js} +1 -1
  12. package/dist/ModuleBrowserModal-DOsdaS6s.js +201 -0
  13. package/dist/{ModulePreviewCanvas-CpaumPMS.js → ModulePreviewCanvas-Cx4MOJ0X.js} +21 -21
  14. package/dist/{NumberWithSuffix-Bp40ik4l.js → NumberWithSuffix-D2mW_DhT.js} +4 -4
  15. package/dist/{ParagraphEditor-BqRFV_Y-.js → ParagraphEditor-DMzkVnST.js} +156 -136
  16. package/dist/{RichTextEditorContent-Q5altsx1.js → RichTextEditorContent-CRCxCwKf.js} +7 -7
  17. package/dist/{SaveModuleDialog-DmfvH5D0.js → SaveModuleDialog-DuEKgumL.js} +8 -8
  18. package/dist/{SnapshotHistory-C052o-8U.js → SnapshotHistory-CVgiNJtE.js} +12 -12
  19. package/dist/{TemplateScoringPanel-CUs8XmIi.js → TemplateScoringPanel-lm0_9nYi.js} +26 -26
  20. package/dist/{TestEmailModal-BIIxRWUt.js → TestEmailModal-WBMdiW5S.js} +5 -5
  21. package/dist/{TitleEditor-FMh54Cx5.js → TitleEditor-eyT0h-Sa.js} +71 -55
  22. package/dist/{TplModal-utMtXzSO.js → TplModal-tjQ7OB0g.js} +4 -4
  23. package/dist/{blockTypeIcons-C6UGDmrC.js → blockTypeIcons-DdB3uTKD.js} +5 -5
  24. package/dist/bundle-stats.json +8 -8
  25. package/dist/cdn/chunks/{AiFeatureMenu-4NhCFeTh.js → AiFeatureMenu-D7rB2SBs.js} +9 -9
  26. package/dist/cdn/chunks/{AiFeatureMenu-4NhCFeTh.js.map → AiFeatureMenu-D7rB2SBs.js.map} +1 -1
  27. package/dist/cdn/chunks/{BlockIssueBadge-BYKThwhE.js → BlockIssueBadge-DHOe0pgx.js} +6 -6
  28. package/dist/cdn/chunks/{BlockIssueBadge-BYKThwhE.js.map → BlockIssueBadge-DHOe0pgx.js.map} +1 -1
  29. package/dist/cdn/chunks/{CloudEditor-DSeihOan.js → CloudEditor-DNed_Ym0.js} +273 -239
  30. package/dist/cdn/chunks/CloudEditor-DNed_Ym0.js.map +1 -0
  31. package/dist/cdn/chunks/{CollaboratorBar-Dn5gXNDt.js → CollaboratorBar-sj_9Lee3.js} +4 -4
  32. package/dist/cdn/chunks/{CollaboratorBar-Dn5gXNDt.js.map → CollaboratorBar-sj_9Lee3.js.map} +1 -1
  33. package/dist/cdn/chunks/{CountdownBlock-hYoJdVOt.js → CountdownBlock-C1Ikjpn4.js} +3 -3
  34. package/dist/cdn/chunks/{CountdownBlock-hYoJdVOt.js.map → CountdownBlock-C1Ikjpn4.js.map} +1 -1
  35. package/dist/cdn/chunks/{CountdownToolbar-BQn0Kj0X.js → CountdownToolbar-j1G_X8rB.js} +4 -4
  36. package/dist/cdn/chunks/CountdownToolbar-j1G_X8rB.js.map +1 -0
  37. package/dist/cdn/chunks/{IssuesPanel-_5fEnivU.js → IssuesPanel-CTOf3PsH.js} +11 -11
  38. package/dist/cdn/chunks/{IssuesPanel-_5fEnivU.js.map → IssuesPanel-CTOf3PsH.js.map} +1 -1
  39. package/dist/cdn/chunks/{ModuleBrowserModal-DtCksAeW.js → ModuleBrowserModal-DCh88-rr.js} +13 -10
  40. package/dist/cdn/chunks/{ModuleBrowserModal-DtCksAeW.js.map → ModuleBrowserModal-DCh88-rr.js.map} +1 -1
  41. package/dist/cdn/chunks/{ModulePreviewCanvas-CCOvabZd.js → ModulePreviewCanvas-DJqvTKmg.js} +19 -19
  42. package/dist/cdn/chunks/{ModulePreviewCanvas-CCOvabZd.js.map → ModulePreviewCanvas-DJqvTKmg.js.map} +1 -1
  43. package/dist/cdn/chunks/{NumberWithSuffix-cdWjAK6y.js → NumberWithSuffix-Bu45XWSl.js} +5 -5
  44. package/dist/cdn/chunks/{NumberWithSuffix-cdWjAK6y.js.map → NumberWithSuffix-Bu45XWSl.js.map} +1 -1
  45. package/dist/cdn/chunks/{ParagraphEditor-BnhnFOW1.js → ParagraphEditor-DwZqLJp2.js} +131 -111
  46. package/dist/cdn/chunks/ParagraphEditor-DwZqLJp2.js.map +1 -0
  47. package/dist/cdn/chunks/{RichTextEditorContent-DV2yknp8.js → RichTextEditorContent-CIuZ-2DV.js} +5 -5
  48. package/dist/cdn/chunks/{RichTextEditorContent-DV2yknp8.js.map → RichTextEditorContent-CIuZ-2DV.js.map} +1 -1
  49. package/dist/cdn/chunks/{SaveModuleDialog-CCX5U7VA.js → SaveModuleDialog-Bep0X2s_.js} +6 -6
  50. package/dist/cdn/chunks/{SaveModuleDialog-CCX5U7VA.js.map → SaveModuleDialog-Bep0X2s_.js.map} +1 -1
  51. package/dist/cdn/chunks/{TitleEditor-CQqklX0D.js → TitleEditor-DO1-h3RY.js} +62 -46
  52. package/dist/cdn/chunks/TitleEditor-DO1-h3RY.js.map +1 -0
  53. package/dist/cdn/chunks/blockTypeIcons-8o24HVJu.js +22 -0
  54. package/dist/cdn/chunks/{blockTypeIcons-CpGPHppB.js.map → blockTypeIcons-8o24HVJu.js.map} +1 -1
  55. package/dist/cdn/chunks/{de-BpseTWOA.js → de-LsV0u1tP.js} +20 -2
  56. package/dist/cdn/chunks/de-LsV0u1tP.js.map +1 -0
  57. package/dist/cdn/chunks/{draggable-Bci-fq8y.js → draggable-kPCz_3zM.js} +14 -5
  58. package/dist/cdn/chunks/{draggable-Bci-fq8y.js.map → draggable-kPCz_3zM.js.map} +1 -1
  59. package/dist/cdn/chunks/{en-VGIQ0WNq.js → en-Bb8X1bOs.js} +20 -2
  60. package/dist/cdn/chunks/en-Bb8X1bOs.js.map +1 -0
  61. package/dist/cdn/chunks/{extensions-Ds9GnMcd.js → extensions-iwBXnEwq.js} +21 -21
  62. package/dist/cdn/chunks/{extensions-Ds9GnMcd.js.map → extensions-iwBXnEwq.js.map} +1 -1
  63. package/dist/cdn/chunks/{features-DxWz_Enw.js → features-CkTMVylx.js} +996 -817
  64. package/dist/cdn/chunks/features-CkTMVylx.js.map +1 -0
  65. package/dist/cdn/chunks/{icons-BflGUmFY.js → icons-9zjCuoJx.js} +158 -152
  66. package/dist/cdn/chunks/icons-9zjCuoJx.js.map +1 -0
  67. package/dist/cdn/chunks/liquid.browser-DKKBzRQu.js.map +1 -1
  68. package/dist/cdn/chunks/{media-library-C479-QcE.js → media-library-DMRIPx4g.js} +373 -371
  69. package/dist/cdn/chunks/media-library-DMRIPx4g.js.map +1 -0
  70. package/dist/cdn/chunks/{pt-BR-zAqpLQbW.js → pt-BR-BwJY_cvb.js} +20 -2
  71. package/dist/cdn/chunks/pt-BR-BwJY_cvb.js.map +1 -0
  72. package/dist/cdn/chunks/{pusher-BICWUP2j.js → pusher-CdEqyLwF.js} +6 -3
  73. package/dist/cdn/chunks/{pusher-BICWUP2j.js.map → pusher-CdEqyLwF.js.map} +1 -1
  74. package/dist/cdn/chunks/quality-CyeUgs_c.js +2176 -0
  75. package/dist/cdn/chunks/{quality-BL_pEvFP.js.map → quality-CyeUgs_c.js.map} +1 -1
  76. package/dist/cdn/chunks/{renderer-C0vdAODQ.js → renderer-BIKUEKDD.js} +38 -29
  77. package/dist/cdn/chunks/{renderer-C0vdAODQ.js.map → renderer-BIKUEKDD.js.map} +1 -1
  78. package/dist/cdn/chunks/{src-DzvOWQ9S.js → src-pDy_imWG.js} +56 -56
  79. package/dist/cdn/chunks/{src-DzvOWQ9S.js.map → src-pDy_imWG.js.map} +1 -1
  80. package/dist/cdn/chunks/{styles-LfeoSNRA.js → styles-D4Bd3SCx.js} +1356 -905
  81. package/dist/cdn/chunks/styles-D4Bd3SCx.js.map +1 -0
  82. package/dist/cdn/chunks/{tiptap-CwScfbsM.js → tiptap-BlLFFU3M.js} +2233 -2213
  83. package/dist/cdn/chunks/tiptap-BlLFFU3M.js.map +1 -0
  84. package/dist/cdn/editor.css +1 -1
  85. package/dist/cdn/editor.js +101 -97
  86. package/dist/cdn/editor.js.map +1 -1
  87. package/dist/{check-BRzXxFHr.js → check-CYJwFmjy.js} +1 -1
  88. package/dist/{chevron-down-DmEgzmYT.js → chevron-down-C5l-DzAA.js} +1 -1
  89. package/dist/{circle-alert-BStvZr3O.js → circle-alert-wf5HUFZY.js} +1 -1
  90. package/dist/{clock-Blwp_1R6.js → clock-Bj0bQw-K.js} +1 -1
  91. package/dist/{cloud-_olro76D.js → cloud-CoFDm9YA.js} +1 -1
  92. package/dist/{createLucideIcon-CmPAC-gt.js → createLucideIcon-Bad2kKE0.js} +4 -4
  93. package/dist/{de-BpseTWOA.js → de-LsV0u1tP.js} +19 -1
  94. package/dist/{dist-BwgjpLfr.js → dist-34OcyoK1.js} +1 -1
  95. package/dist/{dist-Cz79qrLL.js → dist-B7w6xTU6.js} +1 -1
  96. package/dist/{dist-DULfKmTh.js → dist-BX3gGwL8.js} +5 -5
  97. package/dist/{dist-412xXefB.js → dist-Bn703mnA.js} +1 -1
  98. package/dist/{dist-u0iIJH3V.js → dist-CADDCv0o.js} +1 -1
  99. package/dist/{dist-BNEdeWub.js → dist-CGvz7vkq.js} +1 -1
  100. package/dist/{dist-BlG7k25W.js → dist-CLpPNKy9.js} +1 -1
  101. package/dist/{dist-BCQZZUE9.js → dist-ChMninLH.js} +1 -1
  102. package/dist/{dist-b7Ak-CuM.js → dist-CrQZ_af9.js} +1 -1
  103. package/dist/{dist-DhKTdU52.js → dist-CyjyYg52.js} +1426 -1406
  104. package/dist/{dist-D6x1cQeh.js → dist-Dd3ibRZm.js} +2 -2
  105. package/dist/{dist-DJ9aD8yA.js → dist-DuCzdgDA.js} +54 -5
  106. package/dist/{dist-o73iaGqy.js → dist-U5vfDdYI.js} +1 -1
  107. package/dist/{en-VGIQ0WNq.js → en-Bb8X1bOs.js} +19 -1
  108. package/dist/{extensions-XPlNAKIL.js → extensions-J439b7y7.js} +5 -5
  109. package/dist/{image-up-BFPbw_Zq.js → image-up-x8-WXfsx.js} +1 -1
  110. package/dist/index.d.ts +17 -0
  111. package/dist/{info-B_qLEBN2.js → info-RS_fGcGi.js} +1 -1
  112. package/dist/keys-DgYXDafq.js +10 -0
  113. package/dist/{list-checks-CGg7JxPm.js → list-checks-Bf7XdDyv.js} +1 -1
  114. package/dist/{loader-circle-CDF8eR_Q.js → loader-circle-CLZ0_FvW.js} +1 -1
  115. package/dist/{message-circle-C3cHsCJl.js → message-circle-B-1bN9ab.js} +1 -1
  116. package/dist/{pt-BR-zAqpLQbW.js → pt-BR-BwJY_cvb.js} +19 -1
  117. package/dist/{refresh-cw-Butml7Q4.js → refresh-cw-CWKWqJYG.js} +1 -1
  118. package/dist/scan-line-BtK5dEai.js +31 -0
  119. package/dist/{send-k7npFJNO.js → send-Cn1IUdzh.js} +1 -1
  120. package/dist/{shield-check-CV6GbmCu.js → shield-check-CrvMk4Ea.js} +1 -1
  121. package/dist/{sparkles-C965Xop4.js → sparkles-CgfjwvnG.js} +1 -1
  122. package/dist/style.css +1 -1
  123. package/dist/{styles-DSm9Ijxt.js → styles-BUwDOWd3.js} +1335 -882
  124. package/dist/templatical-editor.js +143 -139
  125. package/dist/{text-align-start-Bxnps8fH.js → text-align-start-C3r_Rnvy.js} +1 -1
  126. package/dist/{trash-2-DpGb7fIt.js → trash-2-CjERg4x9.js} +1 -1
  127. package/dist/{triangle-alert-BKYElAwz.js → triangle-alert-Chkny574.js} +1 -1
  128. package/dist/upload-e5kDRkPb.js +17 -0
  129. package/dist/{useAliveFlag-BinvbqQR.js → useAliveFlag-cUQj9rmB.js} +1 -1
  130. package/dist/{useCloudI18n-L3H2XvdW.js → useCloudI18n-CYJKqXtI.js} +2 -2
  131. package/dist/{useEditorCore-D7dQFRkw.js → useEditorCore-8JxXDOA4.js} +1075 -894
  132. package/dist/{useI18n-CTs_bP9d.js → useI18n-BWqM8i78.js} +2 -2
  133. package/dist/{useMergeTag-e3RSY-s3.js → useMergeTag-NHC4ylza.js} +3 -3
  134. package/dist/usePopoverRoot-B1sdY4es.js +8 -0
  135. package/dist/{vue.runtime.esm-bundler-B2k01iQh.js → vue.runtime.esm-bundler-BPa483TZ.js} +13 -4
  136. package/dist/{x-CGjkjdKK.js → x-DiPIbccg.js} +1 -1
  137. package/package.json +12 -12
  138. package/dist/ModuleBrowserModal-Bz9hSjMS.js +0 -198
  139. package/dist/cdn/chunks/CloudEditor-DSeihOan.js.map +0 -1
  140. package/dist/cdn/chunks/CountdownToolbar-BQn0Kj0X.js.map +0 -1
  141. package/dist/cdn/chunks/ParagraphEditor-BnhnFOW1.js.map +0 -1
  142. package/dist/cdn/chunks/TitleEditor-CQqklX0D.js.map +0 -1
  143. package/dist/cdn/chunks/blockTypeIcons-CpGPHppB.js +0 -22
  144. package/dist/cdn/chunks/de-BpseTWOA.js.map +0 -1
  145. package/dist/cdn/chunks/en-VGIQ0WNq.js.map +0 -1
  146. package/dist/cdn/chunks/features-DxWz_Enw.js.map +0 -1
  147. package/dist/cdn/chunks/icons-BflGUmFY.js.map +0 -1
  148. package/dist/cdn/chunks/media-library-C479-QcE.js.map +0 -1
  149. package/dist/cdn/chunks/pt-BR-zAqpLQbW.js.map +0 -1
  150. package/dist/cdn/chunks/quality-BL_pEvFP.js +0 -2176
  151. package/dist/cdn/chunks/styles-LfeoSNRA.js.map +0 -1
  152. package/dist/cdn/chunks/tiptap-CwScfbsM.js.map +0 -1
  153. package/dist/keys-mFiJ5N0_.js +0 -10
  154. package/dist/scan-line-XYEqim_E.js +0 -25
  155. package/dist/usePopoverRoot-DVh7NY1q.js +0 -8
@@ -1,17 +1,17 @@
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-Bci-fq8y.js";
2
- import { A as k, An as A, At as j, Ct as M, Dt as N, E as P, Et as F, Ft as I, Ht as L, It as R, J as z, Nt as ee, Ot as B, Qt as te, Rt as ne, S as V, Un as H, Ut as U, Vt as W, Z as G, _ as K, b as re, c as ie, d as ae, dt as q, en as oe, f as J, g as Y, h as X, hn as Z, ht as se, kt as ce, l as le, m as ue, on as de, p as fe, rt as pe, s as me, tn as he, tt as Q, u as ge, v as _e, wn as ve, x as ye, y as be } from "./features-DxWz_Enw.js";
3
- import { _ as xe, v as Se } from "./icons-BflGUmFY.js";
4
- import { a as Ce, c as we, d as Te, i as Ee, l as De, n as Oe, o as ke, r as Ae, s as je, t as Me, u as Ne } from "./styles-LfeoSNRA.js";
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-kPCz_3zM.js";
2
+ import { $ as ee, A as k, Bt as A, Dn as te, E as j, Ft as ne, Gt as re, Kn as M, Lt as N, Mt as P, Nn as F, Ot as I, Rt as L, S as R, Ut as ie, Wt as z, Y as B, _ as V, at as H, b as ae, bt as U, c as W, d as G, f as K, ft as q, g as oe, h as se, ht as J, in as ce, kt as Y, l as X, ln as Z, lt as le, m as ue, p as de, rn as fe, rt as Q, s as pe, tn as me, u as he, v as ge, vn as _e, x as ve, y as ye, yt as be } from "./features-CkTMVylx.js";
3
+ import { S as xe, x as Se } from "./icons-9zjCuoJx.js";
4
+ import { a as Ce, c as we, d as Te, f as Ee, i as De, l as Oe, n as ke, o as Ae, r as je, s as Me, t as Ne, u as Pe } from "./styles-D4Bd3SCx.js";
5
5
  import { d as $ } from "./styleConstants-lGobwiLH.js";
6
6
  //#region src/cloud/composables/useSnapshotPreview.ts
7
- function Pe(t) {
7
+ function Fe(t) {
8
8
  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;
9
9
  r(() => {
10
10
  m = !0;
11
11
  });
12
12
  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);
13
13
  function y() {
14
- i.state.template?.id && !u.value && (u.value = J({
14
+ i.state.template?.id && !u.value && (u.value = K({
15
15
  authManager: n,
16
16
  templateId: i.state.template.id,
17
17
  onRestore: b,
@@ -63,7 +63,7 @@ function Pe(t) {
63
63
  }
64
64
  //#endregion
65
65
  //#region src/cloud/composables/useCloudPanelState.ts
66
- function Fe() {
66
+ function Ie() {
67
67
  let e = c(null), t = f({
68
68
  get: () => e.value === "ai-chat",
69
69
  set: (t) => e.value = t ? "ai-chat" : null
@@ -86,7 +86,7 @@ function Fe() {
86
86
  function g(t) {
87
87
  l.value = !1, e.value = e.value === t ? null : t;
88
88
  }
89
- return de(u, () => {
89
+ return Z(u, () => {
90
90
  l.value = !1;
91
91
  }), {
92
92
  activePanel: e,
@@ -108,10 +108,10 @@ function Fe() {
108
108
  }
109
109
  //#endregion
110
110
  //#region src/cloud/composables/useCollabUndoWarning.ts
111
- function Ie(e) {
112
- let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i = c(!1), a = c(!1), { start: o } = Z(() => {
111
+ function Le(e) {
112
+ let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i = c(!1), a = c(!1), { start: o } = _e(() => {
113
113
  a.value = !1;
114
- }, H, { immediate: !1 });
114
+ }, M, { immediate: !1 });
115
115
  function s() {
116
116
  i.value || !t.value || n() === 0 || !r.value || (i.value = !0, a.value = !0, o());
117
117
  }
@@ -122,8 +122,8 @@ function Ie(e) {
122
122
  }
123
123
  //#endregion
124
124
  //#region src/cloud/composables/useCloudFeatureFlags.ts
125
- function Le(e) {
126
- 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 } = Z(() => {
125
+ function Re(e) {
126
+ 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 } = _e(() => {
127
127
  p.value = "idle";
128
128
  }, 3e3, { immediate: !1 });
129
129
  return {
@@ -141,49 +141,76 @@ function Le(e) {
141
141
  }
142
142
  //#endregion
143
143
  //#region src/cloud/composables/useCloudMediaLibrary.ts
144
- function Re(e) {
145
- let { onRequestMedia: t, mediaLibraryOpen: n, mediaLibraryAccept: i } = e, a = null;
146
- async function o() {
144
+ function ze(e) {
145
+ let { onRequestMedia: t, mediaLibraryOpen: n, mediaLibraryAccept: i, authManager: a, getMediaConfig: o, onError: s } = e, c = null;
146
+ function l(e) {
147
+ return {
148
+ url: e.url,
149
+ alt: e.alt_text || void 0
150
+ };
151
+ }
152
+ async function u(e) {
153
+ let r = e?.accept ?? ["images"];
154
+ if (e?.files?.length) {
155
+ if (t) {
156
+ let n = await t({
157
+ accept: r,
158
+ files: e.files
159
+ });
160
+ return n ? l(n) : null;
161
+ }
162
+ return d(e.files[0]);
163
+ }
147
164
  if (t) {
148
- let e = await t({ accept: ["images"] });
149
- return e ? {
150
- url: e.url,
151
- alt: e.alt_text || void 0
152
- } : null;
165
+ let e = await t({ accept: r });
166
+ return e ? l(e) : null;
153
167
  }
154
- return a &&= (a(null), null), i.value = ["images"], n.value = !0, new Promise((e) => {
155
- a = (t) => {
168
+ return c &&= (c(null), null), i.value = r, n.value = !0, new Promise((e) => {
169
+ c = (t) => {
156
170
  e(t);
157
171
  };
158
172
  });
159
173
  }
160
- function s(e) {
161
- n.value = !1, a?.({
162
- url: e.url,
163
- alt: e.alt_text || void 0
164
- }), a = null;
174
+ async function d(e) {
175
+ let t = f(e);
176
+ if (t) return s?.(t), null;
177
+ try {
178
+ let { MediaApiClient: t } = await import("./src-pDy_imWG.js");
179
+ return l(await new t(a).uploadMedia(e));
180
+ } catch (e) {
181
+ return s?.(e), null;
182
+ }
183
+ }
184
+ function f(e) {
185
+ let t = o?.() ?? null;
186
+ if (!t) return null;
187
+ let n = t.categories?.images?.mime_types ?? [];
188
+ return n.length > 0 && !n.includes(e.type) ? /* @__PURE__ */ Error(`Unsupported image type: ${e.type || "unknown"}. Accepted: ${n.join(", ")}.`) : t.max_file_size > 0 && e.size > t.max_file_size ? /* @__PURE__ */ Error(`Image is too large (${e.size} bytes). Maximum allowed is ${t.max_file_size} bytes.`) : null;
165
189
  }
166
- function c() {
167
- n.value = !1, a?.(null), a = null;
190
+ function p(e) {
191
+ n.value = !1, c?.(l(e)), c = null;
192
+ }
193
+ function m() {
194
+ n.value = !1, c?.(null), c = null;
168
195
  }
169
196
  return r(() => {
170
- a &&= (a(null), null);
197
+ c &&= (c(null), null);
171
198
  }), {
172
- handleRequestMedia: o,
173
- handleMediaSelect: s,
174
- handleMediaLibraryClose: c
199
+ handleRequestMedia: u,
200
+ handleMediaSelect: p,
201
+ handleMediaLibraryClose: m
175
202
  };
176
203
  }
177
204
  //#endregion
178
205
  //#region src/cloud/composables/useCloudInitialization.ts
179
- function ze(e) {
180
- 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 P({
206
+ function Be(e) {
207
+ 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 j({
181
208
  ...t.auth,
182
209
  onError: t.onError
183
- }), _ = le({
210
+ }), _ = X({
184
211
  authManager: g,
185
212
  onError: t.onError
186
- }), v = c(/* @__PURE__ */ new Map()), y = ye({
213
+ }), v = c(/* @__PURE__ */ new Map()), y = ve({
187
214
  authManager: g,
188
215
  defaultFontFamily: t.fonts?.defaultFont,
189
216
  templateDefaults: t.templateDefaults,
@@ -193,13 +220,13 @@ function ze(e) {
193
220
  authManager: g,
194
221
  onError: t.onError
195
222
  });
196
- t.mcp?.enabled && me({
223
+ t.mcp?.enabled && pe({
197
224
  editor: y,
198
225
  channel: b.channel,
199
226
  onOperation: t.mcp.onOperation
200
227
  });
201
228
  let x = null;
202
- t.collaboration?.enabled && (x = Y({
229
+ t.collaboration?.enabled && (x = oe({
203
230
  authManager: g,
204
231
  editor: y,
205
232
  channel: b.channel,
@@ -210,7 +237,7 @@ function ze(e) {
210
237
  onBlockUnlocked: t.collaboration.onBlockUnlocked
211
238
  }), O(() => x.lockedBlocks.value, (e) => {
212
239
  v.value = e;
213
- }, { immediate: !0 }), X(y, x));
240
+ }, { immediate: !0 }), se(y, x));
214
241
  let S = f(() => !!t.collaboration?.enabled && _.hasFeature("collaboration")), C = k({
215
242
  editor: y,
216
243
  config: {
@@ -220,9 +247,10 @@ function ze(e) {
220
247
  customBlocks: [],
221
248
  paletteBlocks: t.paletteBlocks,
222
249
  mergeTags: t.mergeTags,
250
+ logicTags: t.logicTags,
223
251
  displayConditions: t.displayConditions,
224
252
  onRequestMedia: null,
225
- lint: Te(t),
253
+ lint: Ee(t),
226
254
  onSave: () => {
227
255
  p.value?.().catch((e) => {
228
256
  t.onError?.(e);
@@ -243,13 +271,13 @@ function ze(e) {
243
271
  keyboardOptions: { onBeforeUndo: () => h?.showCollabUndoWarning() },
244
272
  editorRoot: e.editorRoot,
245
273
  containerEl: e.containerEl
246
- }), w = Ie({
274
+ }), w = Le({
247
275
  isCollaborationEnabled: S,
248
276
  getCollaboratorCount: () => x?.collaborators.value.length ?? 0,
249
277
  canUndo: C.history.canUndo
250
278
  });
251
279
  h = w;
252
- let T = Pe({
280
+ let T = Fe({
253
281
  authManager: g,
254
282
  editor: y,
255
283
  history: C.history,
@@ -258,32 +286,35 @@ function ze(e) {
258
286
  onError: t.onError
259
287
  });
260
288
  m = T;
261
- let E = Fe(), D = re(t.ai), A = Le({
289
+ let E = Ie(), D = ae(t.ai), te = Re({
262
290
  planConfigInstance: _,
263
291
  aiConfig: D,
264
292
  editor: y
265
- }), j = Re({
293
+ }), M = ze({
266
294
  onRequestMedia: t.onRequestMedia,
267
295
  mediaLibraryOpen: E.mediaLibraryOpen,
268
- mediaLibraryAccept: E.mediaLibraryAccept
296
+ mediaLibraryAccept: E.mediaLibraryAccept,
297
+ authManager: g,
298
+ getMediaConfig: () => _.config.value?.media ?? null,
299
+ onError: t.onError
269
300
  });
270
- G({
301
+ ee({
271
302
  onBlockMove: y.moveBlock,
272
303
  onBlockAdd: y.addBlock
273
304
  });
274
- let M = ge({
305
+ let N = he({
275
306
  authManager: g,
276
307
  getFontsConfig: () => t.fonts,
277
308
  canUseCustomFonts: () => _.hasFeature("custom_fonts")
278
- }), N = ae({
309
+ }), P = G({
279
310
  authManager: g,
280
311
  getTemplateId: () => y.state.template?.id ?? null,
281
312
  save: () => y.save(),
282
- exportHtml: (e) => M.exportHtml(e),
313
+ exportHtml: (e) => N.exportHtml(e),
283
314
  onError: t.onError,
284
315
  isAuthReady: l,
285
316
  onBeforeTestEmail: t.onBeforeTestEmail
286
- }), F = _e({
317
+ }), F = ge({
287
318
  authManager: g,
288
319
  getTemplateId: () => y.state.template?.id ?? null,
289
320
  getSocketId: () => b.getSocketId(),
@@ -292,32 +323,32 @@ function ze(e) {
292
323
  isAuthReady: l,
293
324
  hasCommentingFeature: () => t.commenting !== !1 && _.hasFeature("commenting")
294
325
  });
295
- K({
326
+ V({
296
327
  comments: F,
297
328
  channel: b.channel
298
329
  });
299
- let I = fe({
330
+ let I = de({
300
331
  authManager: g,
301
332
  onError: t.onError
302
- }), L = c(!1), z = c(null), B = c(!1), V = be({
333
+ }), R = c(!1), z = c(null), B = c(!1), H = ye({
303
334
  authManager: g,
304
335
  getTemplateId: () => y.state.template?.id ?? null
305
336
  });
306
- function H(e) {
337
+ function U(e) {
307
338
  E.commentsOpen.value = !0, queueMicrotask(() => {
308
339
  o()?.filterByBlock(e);
309
340
  });
310
341
  }
311
- a(te, j.handleRequestMedia), a(ne, g), a(R, D), a(U, F), a(oe, I), a(he, V), a(W, {
342
+ a(me, M.handleRequestMedia), a(A, g), a(L, D), a(re, F), a(fe, I), a(ce, H), a(ie, {
312
343
  plan: _,
313
344
  ai: D,
314
345
  comments: {
315
346
  getBlockCount: (e) => F.commentCountByBlock.value.get(e) ?? 0,
316
- openForBlock: H
347
+ openForBlock: U
317
348
  },
318
349
  savedModules: {
319
350
  openSaveDialog: (e) => {
320
- z.value = e ?? null, L.value = !0;
351
+ z.value = e ?? null, R.value = !0;
321
352
  },
322
353
  openBrowser: () => {
323
354
  B.value = !0;
@@ -325,22 +356,22 @@ function ze(e) {
325
356
  moduleCount: f(() => I.modules.value.length)
326
357
  }
327
358
  });
328
- function q(e) {
359
+ function K(e) {
329
360
  _.hasFeature("theme_customization") && (C.themeOverrides.value = e);
330
361
  }
331
- function J(e) {
362
+ function q(e) {
332
363
  y.setUiTheme(e);
333
364
  }
334
- async function Z() {
365
+ async function J() {
335
366
  s.value = !0, u.value = null;
336
367
  try {
337
368
  if (await g.initialize(), d) return;
338
369
  l.value = !0;
339
- let e = await ie({ authManager: g });
370
+ let e = await W({ authManager: g });
340
371
  if (d) return;
341
372
  if (!e.api.ok) throw Error("Health check failed: API is not reachable");
342
373
  if (!e.auth.ok) throw Error(`Health check failed: authentication error${e.auth.error ? ` - ${e.auth.error}` : ""}`);
343
- 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;
374
+ 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;
344
375
  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), t.modules !== !1 && _.hasFeature("saved_modules") && I.loadModules(), i("ready");
345
376
  } catch (e) {
346
377
  if (d) return;
@@ -350,7 +381,7 @@ function ze(e) {
350
381
  d || (s.value = !1);
351
382
  }
352
383
  }
353
- function se() {
384
+ function Y() {
354
385
  d = !0, r.cleanupFontLinks(), b.disconnect(), C.destroy(), t.onUnmount?.();
355
386
  }
356
387
  return {
@@ -366,32 +397,32 @@ function ze(e) {
366
397
  editor: y,
367
398
  core: C,
368
399
  aiConfig: D,
369
- featureFlags: A,
370
- mediaLib: j,
371
- exporter: M,
372
- testEmail: N,
400
+ featureFlags: te,
401
+ mediaLib: M,
402
+ exporter: N,
403
+ testEmail: P,
373
404
  commentsInstance: F,
374
405
  savedModulesHeadless: I,
375
- scoringInstance: V,
406
+ scoringInstance: H,
376
407
  panelState: E,
377
408
  snapshotPreview: T,
378
409
  collabWarning: w,
379
- showSaveModuleDialog: L,
410
+ showSaveModuleDialog: R,
380
411
  showModuleBrowserModal: B,
381
412
  saveModulePreSelectedBlockId: z,
382
413
  onSaveHook: p,
383
- initialize: Z,
384
- destroy: se,
385
- setThemeOverrides: q,
386
- setUiTheme: J,
387
- openCommentsForBlock: H
414
+ initialize: J,
415
+ destroy: Y,
416
+ setThemeOverrides: K,
417
+ setUiTheme: q,
418
+ openCommentsForBlock: U
388
419
  };
389
420
  }
390
421
  //#endregion
391
422
  //#region src/utils/preRenderCustomBlocks.ts
392
- async function Be(e, t) {
423
+ async function Ve(e, t) {
393
424
  let n = async (e) => {
394
- if (A(e)) {
425
+ if (F(e)) {
395
426
  let n = e;
396
427
  try {
397
428
  n.renderedHtml = await t.renderCustomBlock(n);
@@ -408,10 +439,10 @@ async function Be(e, t) {
408
439
  }
409
440
  //#endregion
410
441
  //#region src/cloud/composables/useCloudLifecycle.ts
411
- function Ve(e) {
442
+ function He(e) {
412
443
  let { config: t, editor: n, websocket: r, planConfigInstance: i, snapshotPreview: a, core: o, exporter: s, featureFlags: c, isDestroyed: l } = e;
413
444
  function u() {
414
- return V(i.config.value.websocket);
445
+ return R(i.config.value.websocket);
415
446
  }
416
447
  async function d(e) {
417
448
  let i = await n.create(e);
@@ -424,7 +455,7 @@ function Ve(e) {
424
455
  async function p() {
425
456
  c.isSaveExporting.value = !0, c.saveStatus.value = "idle";
426
457
  try {
427
- if (await Be(n.content.value, o.registry), l()) throw Error("Component unmounted during save");
458
+ if (await Ve(n.content.value, o.registry), l()) throw Error("Component unmounted during save");
428
459
  let e = await n.save();
429
460
  if (l()) throw Error("Component unmounted during save");
430
461
  a.initSnapshotHistory(), a.snapshotHistoryInstance.value?.loadSnapshots();
@@ -451,7 +482,7 @@ function Ve(e) {
451
482
  }
452
483
  //#endregion
453
484
  //#region src/cloud/composables/useCloudSaveGate.ts
454
- function He(e) {
485
+ function Ue(e) {
455
486
  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);
456
487
  async function o(e) {
457
488
  return a.value ? (n = e, t.value = !0, !1) : (await e(), !0);
@@ -474,7 +505,7 @@ function He(e) {
474
505
  }
475
506
  //#endregion
476
507
  //#region src/cloud/components/CloudSaveGateModal.vue?vue&type=script&setup=true&lang.ts
477
- 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({
508
+ var We = ["aria-label"], Ge = { 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)]" }, Ke = { 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)]" }, Je = { class: "tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ye = { 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" }, Xe = { class: "tpl:text-xs tpl:text-[var(--tpl-text)]" }, Ze = { class: "tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Qe = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, $e = /* @__PURE__ */ E({
478
509
  __name: "CloudSaveGateModal",
479
510
  props: {
480
511
  open: { type: Boolean },
@@ -496,18 +527,18 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
496
527
  "aria-label": h(r).saveGate.title,
497
528
  class: "tpl:fixed tpl:inset-0 tpl:z-50 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/40 tpl:p-6",
498
529
  onClick: a[2] ||= _((e) => n("cancel"), ["self"])
499
- }, [x("div", We, [
500
- x("header", Ge, [D(h(N), {
530
+ }, [x("div", Ge, [
531
+ x("header", Ke, [D(h(le), {
501
532
  size: 18,
502
533
  "stroke-width": 2,
503
534
  class: "tpl:text-[var(--tpl-warning)]"
504
- }), x("h2", Ke, d(h(r).saveGate.title), 1)]),
505
- x("p", qe, d(h(r).saveGate.body), 1),
506
- x("ul", Je, [(i(!0), p(w, null, o(e.issues, (e) => (i(), p("li", {
535
+ }), x("h2", qe, d(h(r).saveGate.title), 1)]),
536
+ x("p", Je, d(h(r).saveGate.body), 1),
537
+ x("ul", Ye, [(i(!0), p(w, null, o(e.issues, (e) => (i(), p("li", {
507
538
  key: `${e.ruleId}-${e.blockId ?? "template"}`,
508
539
  class: "tpl:flex tpl:flex-col tpl:gap-0.5 tpl:rounded tpl:px-2 tpl:py-1.5"
509
- }, [x("span", Ye, d(e.message), 1), x("span", Xe, d(e.ruleId), 1)]))), 128))]),
510
- x("footer", Ze, [x("button", {
540
+ }, [x("span", Xe, d(e.message), 1), x("span", Ze, d(e.ruleId), 1)]))), 128))]),
541
+ x("footer", Qe, [x("button", {
511
542
  type: "button",
512
543
  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)]",
513
544
  onClick: a[0] ||= (e) => n("cancel")
@@ -516,11 +547,11 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
516
547
  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",
517
548
  onClick: a[1] ||= (e) => n("confirm")
518
549
  }, d(h(r).saveGate.confirm), 1)])
519
- ])], 8, Ue)) : m("", !0)]),
550
+ ])], 8, We)) : m("", !0)]),
520
551
  _: 1
521
552
  }));
522
553
  }
523
- }), $e = {
554
+ }), et = {
524
555
  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",
525
556
  style: {
526
557
  "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)",
@@ -529,24 +560,24 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
529
560
  "box-shadow": "var(--tpl-shadow-md)",
530
561
  "border-bottom": "1px solid var(--tpl-border)"
531
562
  }
532
- }, et = { class: "tpl-header-left tpl:flex tpl:min-w-[200px] tpl:items-center tpl:gap-3" }, tt = {
563
+ }, tt = { class: "tpl-header-left tpl:flex tpl:min-w-[200px] tpl:items-center tpl:gap-3" }, nt = {
533
564
  key: 0,
534
565
  class: "tpl:text-xs tpl:opacity-60 tpl:text-[var(--tpl-text-muted)]"
535
- }, 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 = {
566
+ }, rt = { class: "tpl-header-center tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, it = { class: "tpl-header-right tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, at = ["data-tooltip"], ot = {
536
567
  key: 1,
537
568
  "aria-live": "polite",
538
569
  class: "tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-success)]"
539
- }, ot = {
570
+ }, st = {
540
571
  key: 2,
541
572
  "aria-live": "polite",
542
573
  class: "tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
543
- }, st = ["aria-label", "aria-expanded"], ct = {
574
+ }, ct = ["aria-label", "aria-expanded"], lt = {
544
575
  key: 0,
545
576
  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)]"
546
- }, lt = ["aria-expanded"], ut = {
577
+ }, ut = ["aria-expanded"], dt = {
547
578
  key: 0,
548
579
  class: "tpl:absolute tpl:right-0 tpl:top-full tpl:z-50 tpl:mt-1 tpl:origin-top-right"
549
- }, dt = ["disabled"], ft = ["disabled"], pt = /* @__PURE__ */ E({
580
+ }, ft = ["disabled"], pt = ["disabled"], mt = /* @__PURE__ */ E({
550
581
  __name: "CloudHeader",
551
582
  props: {
552
583
  editor: {},
@@ -564,22 +595,22 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
564
595
  },
565
596
  emits: ["save"],
566
597
  setup(e) {
567
- let t = u(() => import("./CollaboratorBar-Dn5gXNDt.js")), n = u(() => import("./features-DxWz_Enw.js").then((e) => e.r)), r = u(() => import("./AiFeatureMenu-4NhCFeTh.js")), { t: a, format: o } = Q();
568
- return (c, l) => (i(), p("header", $e, [
569
- x("div", et, [e.featureFlags.templateLimit.value === null ? m("", !0) : (i(), p("span", tt, d(h(o)(h(a).header.templatesUsed, {
598
+ let t = u(() => import("./CollaboratorBar-sj_9Lee3.js")), n = u(() => import("./features-CkTMVylx.js").then((e) => e.r)), r = u(() => import("./AiFeatureMenu-D7rB2SBs.js")), { t: a, format: o } = Q();
599
+ return (c, l) => (i(), p("header", et, [
600
+ x("div", tt, [e.featureFlags.templateLimit.value === null ? m("", !0) : (i(), p("span", nt, d(h(o)(h(a).header.templatesUsed, {
570
601
  used: e.featureFlags.templateCount.value,
571
602
  max: e.featureFlags.templateLimit.value
572
603
  })), 1))]),
573
- x("div", nt, [
574
- D(Ce, {
604
+ x("div", rt, [
605
+ D(Ae, {
575
606
  viewport: e.editor.state.viewport,
576
607
  onChange: e.editor.setViewport
577
608
  }, null, 8, ["viewport", "onChange"]),
578
- D(Ae, {
609
+ D(De, {
579
610
  "dark-mode": e.editor.state.darkMode,
580
611
  onChange: e.editor.setDarkMode
581
612
  }, null, 8, ["dark-mode", "onChange"]),
582
- D(Ee, {
613
+ D(Ce, {
583
614
  "preview-mode": e.editor.state.previewMode,
584
615
  onChange: e.editor.setPreviewMode
585
616
  }, null, 8, ["preview-mode", "onChange"]),
@@ -603,19 +634,19 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
603
634
  "onNavigate"
604
635
  ])) : m("", !0)
605
636
  ]),
606
- x("div", rt, [
637
+ x("div", it, [
607
638
  e.featureFlags.saveStatus.value === "error" ? (i(), p("div", {
608
639
  key: 0,
609
640
  "aria-live": "assertive",
610
641
  class: "tpl-tooltip tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]",
611
642
  "data-tooltip": e.featureFlags.saveErrorMessage.value
612
- }, [D(h(j), {
643
+ }, [D(h(Y), {
613
644
  size: 12,
614
645
  "stroke-width": 2.5
615
- }), T(" " + d(h(a).header.saveFailed), 1)], 8, it)) : e.featureFlags.saveStatus.value === "saved" ? (i(), p("div", at, [D(h(F), {
646
+ }), T(" " + d(h(a).header.saveFailed), 1)], 8, at)) : e.featureFlags.saveStatus.value === "saved" ? (i(), p("div", ot, [D(h(P), {
616
647
  size: 12,
617
648
  "stroke-width": 2.5
618
- }), 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),
649
+ }), T(" " + d(h(a).header.saved), 1)])) : e.editor.state.isDirty ? (i(), p("div", st, [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),
619
650
  e.commentsInstance.isEnabled.value && e.featureFlags.hasTemplateSaved.value ? (i(), p("button", {
620
651
  key: 3,
621
652
  "aria-label": e.commentsInstance.unresolvedCount.value > 0 ? `${h(a).comments.button} (${e.commentsInstance.unresolvedCount.value})` : h(a).comments.button,
@@ -628,13 +659,13 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
628
659
  }),
629
660
  onClick: l[0] ||= (t) => e.panelState.commentsOpen.value = !e.panelState.commentsOpen.value
630
661
  }, [
631
- D(h(se), {
662
+ D(h(be), {
632
663
  size: 16,
633
664
  "stroke-width": 2
634
665
  }),
635
666
  T(" " + d(h(a).comments.button) + " ", 1),
636
- e.commentsInstance.unresolvedCount.value > 0 && !e.panelState.commentsOpen.value ? (i(), p("span", ct, d(e.commentsInstance.unresolvedCount.value), 1)) : m("", !0)
637
- ], 14, st)) : m("", !0),
667
+ e.commentsInstance.unresolvedCount.value > 0 && !e.panelState.commentsOpen.value ? (i(), p("span", lt, d(e.commentsInstance.unresolvedCount.value), 1)) : m("", !0)
668
+ ], 14, ct)) : m("", !0),
638
669
  e.featureFlags.canUseAiGeneration.value && e.featureFlags.hasTemplateSaved.value ? (i(), p("div", {
639
670
  key: 4,
640
671
  ref: (t) => e.panelState.aiMenuRef.value = t,
@@ -643,11 +674,11 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
643
674
  "aria-expanded": e.panelState.aiMenuOpen.value,
644
675
  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"]),
645
676
  onClick: l[1] ||= _((...t) => e.panelState.toggleAiMenu && e.panelState.toggleAiMenu(...t), ["stop"])
646
- }, [D(h(B), {
677
+ }, [D(h(q), {
647
678
  size: 16,
648
679
  "stroke-width": 2,
649
680
  class: "tpl-ai-btn-icon"
650
- }), T(" " + d(h(a).aiChat.button), 1)], 10, lt), D(y, {
681
+ }), T(" " + d(h(a).aiChat.button), 1)], 10, ut), D(y, {
651
682
  "enter-active-class": "tpl:transition-all tpl:duration-150 tpl:ease-out",
652
683
  "enter-from-class": "tpl:scale-95 tpl:opacity-0",
653
684
  "enter-to-class": "tpl:scale-100 tpl:opacity-100",
@@ -655,7 +686,7 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
655
686
  "leave-from-class": "tpl:scale-100 tpl:opacity-100",
656
687
  "leave-to-class": "tpl:scale-95 tpl:opacity-0"
657
688
  }, {
658
- default: s(() => [e.panelState.aiMenuOpen.value ? (i(), p("div", ut, [D(h(r), {
689
+ default: s(() => [e.panelState.aiMenuOpen.value ? (i(), p("div", dt, [D(h(r), {
659
690
  "active-feature": e.panelState.activeAiFeature.value,
660
691
  onSelect: e.panelState.handleAiFeatureSelect
661
692
  }, null, 8, ["active-feature", "onSelect"])])) : m("", !0)]),
@@ -671,16 +702,16 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
671
702
  },
672
703
  disabled: e.testEmail.isSending.value || !e.featureFlags.hasTemplateSaved.value,
673
704
  onClick: l[2] ||= (t) => e.panelState.testEmailModalOpen.value = !0
674
- }, [e.testEmail.isSending.value ? (i(), v(h(ce), {
705
+ }, [e.testEmail.isSending.value ? (i(), v(h(U), {
675
706
  key: 1,
676
707
  class: "tpl-spinner",
677
708
  size: 16,
678
709
  "stroke-width": 2
679
- })) : (i(), v(h(q), {
710
+ })) : (i(), v(h(J), {
680
711
  key: 0,
681
712
  size: 16,
682
713
  "stroke-width": 2
683
- })), T(" " + d(h(a).testEmail.button), 1)], 10, dt)) : m("", !0),
714
+ })), T(" " + d(h(a).testEmail.button), 1)], 10, ft)) : m("", !0),
684
715
  x("button", {
685
716
  class: b(h($)),
686
717
  style: {
@@ -690,20 +721,20 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
690
721
  },
691
722
  disabled: e.isSaveDisabled,
692
723
  onClick: l[3] ||= (e) => c.$emit("save")
693
- }, [e.isSaving ? (i(), v(h(ce), {
724
+ }, [e.isSaving ? (i(), v(h(U), {
694
725
  key: 1,
695
726
  class: "tpl-spinner",
696
727
  size: 16,
697
728
  "stroke-width": 2
698
- })) : (i(), v(h(xe), {
729
+ })) : (i(), v(h(Se), {
699
730
  key: 0,
700
731
  size: 16,
701
732
  "stroke-width": 2
702
- })), T(" " + d(e.isSaving ? h(a).header.saving : h(a).header.save), 1)], 10, ft)
733
+ })), T(" " + d(e.isSaving ? h(a).header.saving : h(a).header.save), 1)], 10, pt)
703
734
  ])
704
735
  ]));
705
736
  }
706
- }), mt = /* @__PURE__ */ E({
737
+ }), ht = /* @__PURE__ */ E({
707
738
  __name: "CloudPanels",
708
739
  props: {
709
740
  config: {},
@@ -726,9 +757,9 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
726
757
  "module-insert"
727
758
  ],
728
759
  setup(e, { expose: t, emit: n }) {
729
- let r = u(() => import("./features-DxWz_Enw.js").then((e) => e.o)), a = u(() => import("./features-DxWz_Enw.js").then((e) => e.a)), o = u(() => import("./features-DxWz_Enw.js").then((e) => e.i)), s = u(() => import("./features-DxWz_Enw.js").then((e) => e.n)), l = u(() => import("./features-DxWz_Enw.js").then((e) => e.t)), d = u(() => import("./SaveModuleDialog-CCX5U7VA.js")), f = u(() => import("./ModuleBrowserModal-DtCksAeW.js")), g = u(async () => {
760
+ let r = u(() => import("./features-CkTMVylx.js").then((e) => e.o)), a = u(() => import("./features-CkTMVylx.js").then((e) => e.a)), o = u(() => import("./features-CkTMVylx.js").then((e) => e.i)), s = u(() => import("./features-CkTMVylx.js").then((e) => e.n)), l = u(() => import("./features-CkTMVylx.js").then((e) => e.t)), d = u(() => import("./SaveModuleDialog-Bep0X2s_.js")), f = u(() => import("./ModuleBrowserModal-DCh88-rr.js")), g = u(async () => {
730
761
  try {
731
- return (await import("./src-DzvOWQ9S.js")).MediaLibraryModal;
762
+ return (await import("./src-pDy_imWG.js")).MediaLibraryModal;
732
763
  } catch {
733
764
  throw Error("[Templatical] Cloud media library requires the optional peer dependency '@templatical/media-library'. Please install it.");
734
765
  }
@@ -808,23 +839,23 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
808
839
  ])
809
840
  ], 64));
810
841
  }
811
- }), ht = {
842
+ }), gt = {
812
843
  key: 0,
813
844
  class: "tpl-loading tpl:absolute tpl:inset-0 tpl:z-overlay tpl:flex tpl:flex-col tpl:bg-[var(--tpl-bg)]"
814
- }, 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({
845
+ }, _t = { class: "tpl:flex tpl:flex-1 tpl:overflow-hidden" }, vt = { 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)]" }, yt = /* @__PURE__ */ E({
815
846
  __name: "CloudLoadingOverlay",
816
847
  props: { visible: { type: Boolean } },
817
848
  setup(e) {
818
- 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", {
849
+ return (t, n) => e.visible ? (i(), p("div", gt, [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", _t, [x("div", vt, [(i(), p(w, null, o(5, (e) => x("div", {
819
850
  key: e,
820
851
  class: "tpl-shimmer tpl:size-7 tpl:rounded-[var(--tpl-radius-sm)]"
821
852
  })), 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);
822
853
  }
823
- }), yt = {
854
+ }), bt = {
824
855
  key: 0,
825
856
  role: "alert",
826
857
  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)]"
827
- }, 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({
858
+ }, xt = { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]" }, St = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center" }, Ct = { class: "tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]" }, wt = { class: "tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Tt = /* @__PURE__ */ E({
828
859
  __name: "CloudErrorOverlay",
829
860
  props: {
830
861
  error: {},
@@ -839,13 +870,13 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
839
870
  function o(e) {
840
871
  return "isNotFound" in e && !!e.isNotFound;
841
872
  }
842
- return (t, s) => e.visible && e.error ? (i(), p("div", yt, [
843
- x("div", bt, [D(h(j), {
873
+ return (t, s) => e.visible && e.error ? (i(), p("div", bt, [
874
+ x("div", xt, [D(h(Y), {
844
875
  size: 32,
845
876
  "stroke-width": 1.5,
846
877
  class: "tpl:text-[var(--tpl-danger)]"
847
878
  })]),
848
- x("div", xt, [x("h2", St, d(h(r).error.title), 1), x("p", Ct, d(a(e.error)), 1)]),
879
+ x("div", St, [x("h2", Ct, d(h(r).error.title), 1), x("p", wt, d(a(e.error)), 1)]),
849
880
  o(e.error) ? m("", !0) : (i(), p("button", {
850
881
  key: 0,
851
882
  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)]",
@@ -853,20 +884,20 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
853
884
  }, d(h(r).error.retry), 1))
854
885
  ])) : m("", !0);
855
886
  }
856
- }), Tt = {
887
+ }), Et = {
857
888
  key: 0,
858
889
  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)]"
859
- }, 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({
890
+ }, Dt = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-text)]" }, Ot = { class: "tpl:flex tpl:items-center tpl:gap-2" }, kt = /* @__PURE__ */ E({
860
891
  __name: "SnapshotPreviewBanner",
861
892
  props: { visible: { type: Boolean } },
862
893
  emits: ["cancel", "confirm"],
863
894
  setup(e, { emit: t }) {
864
895
  let n = t, { t: r } = Q();
865
- return (t, a) => e.visible ? (i(), p("div", Tt, [x("div", Et, [D(h(M), {
896
+ return (t, a) => e.visible ? (i(), p("div", Et, [x("div", Dt, [D(h(I), {
866
897
  size: 18,
867
898
  "stroke-width": 2,
868
899
  class: "tpl:text-[var(--tpl-primary)]"
869
- }), x("span", null, d(h(r).snapshotPreview.message), 1)]), x("div", Dt, [x("button", {
900
+ }), x("span", null, d(h(r).snapshotPreview.message), 1)]), x("div", Ot, [x("button", {
870
901
  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)]",
871
902
  style: { "background-color": "transparent" },
872
903
  onClick: a[0] ||= (e) => n("cancel")
@@ -875,7 +906,7 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
875
906
  onClick: a[1] ||= (e) => n("confirm")
876
907
  }, d(h(r).snapshotPreview.restore), 1)])])) : m("", !0);
877
908
  }
878
- }), kt = {
909
+ }), At = {
879
910
  key: 0,
880
911
  role: "status",
881
912
  "aria-live": "polite",
@@ -885,14 +916,14 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
885
916
  color: "var(--tpl-text)",
886
917
  border: "1px solid var(--tpl-warning)"
887
918
  }
888
- }, At = /* @__PURE__ */ E({
919
+ }, jt = /* @__PURE__ */ E({
889
920
  __name: "CollabUndoToast",
890
921
  props: { visible: { type: Boolean } },
891
922
  setup(e) {
892
- let { t } = I();
893
- return (n, r) => e.visible ? (i(), p("div", kt, d(h(t).history.collabWarning), 1)) : m("", !0);
923
+ let { t } = N();
924
+ return (n, r) => e.visible ? (i(), p("div", At, d(h(t).history.collabWarning), 1)) : m("", !0);
894
925
  }
895
- }), 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__*/ pe(/* @__PURE__ */ E({
926
+ }), Mt = ["data-tpl-theme"], Nt = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, Pt = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, Ft = ["aria-label"], It = /*#__PURE__*/ H(/* @__PURE__ */ E({
896
927
  __name: "CloudEditor",
897
928
  props: {
898
929
  config: {},
@@ -904,71 +935,73 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
904
935
  emits: ["ready"],
905
936
  setup(e, { expose: r, emit: o }) {
906
937
  let l = e;
907
- a(L, l.cloudTranslations);
908
- let u = o, f = c(null), _ = c(null), w = ze({
938
+ a(z, l.cloudTranslations);
939
+ let u = o, f = c(null), w = c(null), E = Be({
909
940
  config: l.config,
910
941
  translations: l.translations,
911
942
  fontsManager: l.fontsManager,
912
943
  emit: u,
913
944
  getCommentsSidebar: () => f.value ? { filterByBlock: f.value.filterCommentsByBlock } : null,
914
945
  editorRoot: l.shadowRoot,
915
- containerEl: _
916
- }), { isInitializing: E, isAuthReady: O, initError: k, planConfigInstance: A, websocket: j, collaboration: M, isCollaborationEnabled: N, editor: P, core: F, featureFlags: I, mediaLib: R, exporter: ee, testEmail: B, commentsInstance: te, savedModulesHeadless: ne, panelState: V, snapshotPreview: H, collabWarning: U, showSaveModuleDialog: W, showModuleBrowserModal: G, saveModulePreSelectedBlockId: K, setThemeOverrides: re, setUiTheme: ie } = w, { showNotice: ae } = z(() => l.config.smallScreenNotice);
917
- async function q(e) {
946
+ containerEl: w
947
+ }), { isInitializing: O, isAuthReady: ee, initError: k, planConfigInstance: A, websocket: j, collaboration: ne, isCollaborationEnabled: re, editor: M, core: N, featureFlags: P, mediaLib: F, exporter: I, testEmail: L, commentsInstance: R, savedModulesHeadless: ie, panelState: V, snapshotPreview: H, collabWarning: ae, showSaveModuleDialog: U, showModuleBrowserModal: W, saveModulePreSelectedBlockId: G, setThemeOverrides: K, setUiTheme: q } = E, { showNotice: oe } = B(() => l.config.smallScreenNotice);
948
+ async function se(e) {
918
949
  try {
919
- await B.sendTestEmail(e), V.testEmailModalOpen.value = !1;
950
+ await L.sendTestEmail(e), V.testEmailModalOpen.value = !1;
920
951
  } catch {}
921
952
  }
922
- async function oe() {
953
+ async function J() {
923
954
  try {
924
955
  await H.confirmRestoreSnapshot();
925
956
  } catch {}
926
957
  }
927
- function J(e, t) {
958
+ function ce(e, t) {
928
959
  for (let n = 0; n < e.content.length; n++) {
929
- let r = ve(e.content[n]), i = t === void 0 ? void 0 : t + n;
930
- P.addBlock(r, void 0, void 0, i);
960
+ let r = te(e.content[n]), i = t === void 0 ? void 0 : t + n;
961
+ M.addBlock(r, void 0, void 0, i);
931
962
  }
932
- G.value = !1;
963
+ W.value = !1;
933
964
  }
934
- let Y = Ve({
965
+ let Y = He({
935
966
  config: l.config,
936
- editor: P,
967
+ editor: M,
937
968
  websocket: j,
938
969
  planConfigInstance: A,
939
970
  snapshotPreview: H,
940
- core: F,
941
- exporter: ee,
942
- featureFlags: I,
943
- isDestroyed: w.isDestroyed
944
- }), X = He({
945
- issues: F.templateLint ? F.templateLint.issues : c([]),
971
+ core: N,
972
+ exporter: I,
973
+ featureFlags: P,
974
+ isDestroyed: E.isDestroyed
975
+ }), X = Ue({
976
+ issues: N.templateLint ? N.templateLint.issues : c([]),
946
977
  planConfig: A.config
947
978
  });
948
979
  async function Z() {
949
980
  await X.tryRunSave(() => Y.saveTemplate().catch((e) => l.config.onError?.(e)));
950
981
  }
951
- return w.onSaveHook.value = Z, t(() => {
952
- w.initialize();
982
+ return E.onSaveHook.value = Z, t(() => {
983
+ E.initialize();
953
984
  }), g(() => {
954
- w.destroy();
985
+ E.destroy();
955
986
  }), r({
956
- getContent: () => P.content.value,
957
- setContent: (e) => P.setContent(e),
958
- setTheme: ie,
959
- setThemeOverrides: re,
987
+ getContent: () => M.content.value,
988
+ setContent: (e) => M.setContent(e),
989
+ setTheme: q,
990
+ setThemeOverrides: K,
960
991
  create: Y.createTemplate,
961
992
  load: Y.loadTemplate,
962
993
  save: Y.saveTemplate,
963
- sendTestEmail: B.sendTestEmail
994
+ sendTestEmail: L.sendTestEmail
964
995
  }), (t, r) => (i(), p("div", {
965
996
  ref_key: "rootEl",
966
- ref: _,
967
- class: b(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": h(P).state.darkMode }]),
968
- "data-tpl-theme": h(F).resolvedTheme.value,
969
- style: C(h(F).themeStyles.value)
997
+ ref: w,
998
+ class: b(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": h(M).state.darkMode }]),
999
+ "data-tpl-theme": h(N).resolvedTheme.value,
1000
+ style: C(h(N).themeStyles.value),
1001
+ onDragover: r[9] ||= _(() => {}, ["prevent"]),
1002
+ onDrop: r[10] ||= _(() => {}, ["prevent"])
970
1003
  }, [
971
- D(De),
1004
+ D(Pe),
972
1005
  D(y, {
973
1006
  "enter-active-class": "tpl:transition-opacity tpl:duration-200",
974
1007
  "enter-from-class": "tpl:opacity-100",
@@ -977,7 +1010,7 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
977
1010
  "leave-from-class": "tpl:opacity-100",
978
1011
  "leave-to-class": "tpl:opacity-0"
979
1012
  }, {
980
- default: s(() => [D(vt, { visible: h(E) || h(P).state.isLoading }, null, 8, ["visible"])]),
1013
+ default: s(() => [D(yt, { visible: h(O) || h(M).state.isLoading }, null, 8, ["visible"])]),
981
1014
  _: 1
982
1015
  }),
983
1016
  D(y, {
@@ -988,10 +1021,10 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
988
1021
  "leave-from-class": "tpl:opacity-100",
989
1022
  "leave-to-class": "tpl:opacity-0"
990
1023
  }, {
991
- default: s(() => [D(wt, {
1024
+ default: s(() => [D(Tt, {
992
1025
  error: h(k),
993
- visible: !!h(k) && !h(E),
994
- onRetry: h(w).initialize
1026
+ visible: !!h(k) && !h(O),
1027
+ onRetry: h(E).initialize
995
1028
  }, null, 8, [
996
1029
  "error",
997
1030
  "visible",
@@ -999,19 +1032,19 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
999
1032
  ])]),
1000
1033
  _: 1
1001
1034
  }),
1002
- D(pt, {
1003
- editor: h(P),
1004
- core: h(F),
1005
- "feature-flags": h(I),
1035
+ D(mt, {
1036
+ editor: h(M),
1037
+ core: h(N),
1038
+ "feature-flags": h(P),
1006
1039
  "panel-state": h(V),
1007
1040
  "snapshot-preview": h(H),
1008
- "comments-instance": h(te),
1009
- "test-email": h(B),
1041
+ "comments-instance": h(R),
1042
+ "test-email": h(L),
1010
1043
  websocket: h(j),
1011
- collaboration: h(M),
1012
- "is-collaboration-enabled": h(N),
1013
- "is-saving": h(P).state.isSaving || h(I).isSaveExporting.value,
1014
- "is-save-disabled": h(P).state.isSaving || h(I).isSaveExporting.value || !h(P).state.isDirty,
1044
+ collaboration: h(ne),
1045
+ "is-collaboration-enabled": h(re),
1046
+ "is-saving": h(M).state.isSaving || h(P).isSaveExporting.value,
1047
+ "is-save-disabled": h(M).state.isSaving || h(P).isSaveExporting.value || !h(M).state.isDirty,
1015
1048
  onSave: Z
1016
1049
  }, null, 8, [
1017
1050
  "editor",
@@ -1027,7 +1060,7 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1027
1060
  "is-saving",
1028
1061
  "is-save-disabled"
1029
1062
  ]),
1030
- D(Qe, {
1063
+ D($e, {
1031
1064
  open: h(X).modalOpen.value,
1032
1065
  issues: h(X).blockingIssues.value,
1033
1066
  onCancel: h(X).cancel,
@@ -1038,10 +1071,10 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1038
1071
  "onCancel",
1039
1072
  "onConfirm"
1040
1073
  ]),
1041
- D(Ot, {
1074
+ D(kt, {
1042
1075
  visible: h(H).isPreviewingSnapshot.value,
1043
1076
  onCancel: h(H).cancelPreview,
1044
- onConfirm: oe
1077
+ onConfirm: J
1045
1078
  }, null, 8, ["visible", "onCancel"]),
1046
1079
  D(y, {
1047
1080
  "enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
@@ -1051,18 +1084,18 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1051
1084
  "leave-from-class": "tpl:translate-y-0 tpl:opacity-100",
1052
1085
  "leave-to-class": "tpl:translate-y-[-8px] tpl:opacity-0"
1053
1086
  }, {
1054
- default: s(() => [D(At, { visible: h(U).collabUndoWarningVisible.value }, null, 8, ["visible"])]),
1087
+ default: s(() => [D(jt, { visible: h(ae).collabUndoWarningVisible.value }, null, 8, ["visible"])]),
1055
1088
  _: 1
1056
1089
  }),
1057
- n(D(we, null, null, 512), [[S, !h(P).state.previewMode]]),
1090
+ n(D(Oe, null, null, 512), [[S, !h(M).state.previewMode]]),
1058
1091
  x("div", {
1059
- class: b(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [h(P).state.previewMode ? "tpl:left-0 tpl:right-0" : h(V).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]", h(H).isPreviewingSnapshot.value ? "tpl:top-[104px]" : "tpl:top-14"]]),
1092
+ class: b(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [h(M).state.previewMode ? "tpl:left-0 tpl:right-0" : h(V).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]", h(H).isPreviewingSnapshot.value ? "tpl:top-[104px]" : "tpl:top-14"]]),
1060
1093
  style: {
1061
1094
  transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",
1062
1095
  "background-color": "var(--tpl-canvas-bg)"
1063
1096
  }
1064
- }, [x("div", Mt, [D(y, { name: "tpl-restore-btn" }, {
1065
- default: s(() => [h(F).conditionPreview.hasHiddenBlocks.value ? (i(), p("button", {
1097
+ }, [x("div", Nt, [D(y, { name: "tpl-restore-btn" }, {
1098
+ default: s(() => [h(N).conditionPreview.hasHiddenBlocks.value ? (i(), p("button", {
1066
1099
  key: 0,
1067
1100
  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",
1068
1101
  style: {
@@ -1071,20 +1104,20 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1071
1104
  "border-color": "var(--tpl-warning)",
1072
1105
  "backdrop-filter": "blur(8px)"
1073
1106
  },
1074
- onClick: r[0] ||= (e) => h(F).conditionPreview.reset()
1075
- }, [D(h(Se), {
1107
+ onClick: r[0] ||= (e) => h(N).conditionPreview.reset()
1108
+ }, [D(h(xe), {
1076
1109
  size: 13,
1077
1110
  "stroke-width": 2
1078
- }), T(" " + d(h(F).t.blockSettings.restoreHiddenBlocks), 1)])) : m("", !0)]),
1111
+ }), T(" " + d(h(N).t.blockSettings.restoreHiddenBlocks), 1)])) : m("", !0)]),
1079
1112
  _: 1
1080
- })]), x("main", Nt, [D(Ne, {
1081
- viewport: h(P).state.viewport,
1082
- content: h(P).content.value,
1083
- "selected-block-id": h(P).state.selectedBlockId,
1084
- "dark-mode": h(P).state.darkMode,
1085
- "preview-mode": h(P).state.previewMode,
1086
- "locked-blocks": h(M)?.lockedBlocks.value ?? void 0,
1087
- onSelectBlock: h(P).selectBlock,
1113
+ })]), x("main", Pt, [D(Te, {
1114
+ viewport: h(M).state.viewport,
1115
+ content: h(M).content.value,
1116
+ "selected-block-id": h(M).state.selectedBlockId,
1117
+ "dark-mode": h(M).state.darkMode,
1118
+ "preview-mode": h(M).state.previewMode,
1119
+ "locked-blocks": h(ne)?.lockedBlocks.value ?? void 0,
1120
+ onSelectBlock: h(M).selectBlock,
1088
1121
  onOpenAiChat: r[1] ||= (e) => h(V).aiChatOpen.value = !0,
1089
1122
  onOpenDesignReference: r[2] ||= (e) => h(V).designReferenceOpen.value = !0
1090
1123
  }, null, 8, [
@@ -1096,51 +1129,51 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1096
1129
  "locked-blocks",
1097
1130
  "onSelectBlock"
1098
1131
  ])])], 2),
1099
- e.config.branding !== !1 && !h(I).isWhiteLabeled.value ? (i(), v(Oe, {
1132
+ e.config.branding !== !1 && !h(P).isWhiteLabeled.value ? (i(), v(je, {
1100
1133
  key: 0,
1101
- "position-class": [h(P).state.previewMode ? "tpl:left-0 tpl:right-0" : h(V).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]"]
1134
+ "position-class": [h(M).state.previewMode ? "tpl:left-0 tpl:right-0" : h(V).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]"]
1102
1135
  }, null, 8, ["position-class"])) : m("", !0),
1103
1136
  x("div", {
1104
1137
  class: "tpl-sr-only",
1105
1138
  role: "status",
1106
1139
  "aria-live": "polite",
1107
1140
  "aria-atomic": "true",
1108
- "aria-label": h(F).t.landmarks.reorderAnnouncements
1109
- }, d(h(F).keyboardReorder.announcement.value), 9, Pt),
1110
- n(D(je, {
1111
- "selected-block": h(P).selectedBlock.value,
1112
- settings: h(P).content.value.settings,
1141
+ "aria-label": h(N).t.landmarks.reorderAnnouncements
1142
+ }, d(h(N).keyboardReorder.announcement.value), 9, Ft),
1143
+ n(D(we, {
1144
+ "selected-block": h(M).selectedBlock.value,
1145
+ settings: h(M).content.value.settings,
1113
1146
  "shifted-left": h(V).rightPanelOpen.value,
1114
- onUpdateBlock: r[3] ||= (e) => h(P).updateBlock(h(P).selectedBlock.value.id, e),
1115
- onDeleteBlock: r[4] ||= (e) => h(F).blockActions.deleteBlock(h(P).selectedBlock.value.id),
1116
- onDuplicateBlock: r[5] ||= (e) => h(F).blockActions.duplicateBlock(h(P).selectedBlock.value),
1117
- onUpdateSettings: h(P).updateSettings
1147
+ onUpdateBlock: r[3] ||= (e) => h(M).updateBlock(h(M).selectedBlock.value.id, e),
1148
+ onDeleteBlock: r[4] ||= (e) => h(N).blockActions.deleteBlock(h(M).selectedBlock.value.id),
1149
+ onDuplicateBlock: r[5] ||= (e) => h(N).blockActions.duplicateBlock(h(M).selectedBlock.value),
1150
+ onUpdateSettings: h(M).updateSettings
1118
1151
  }, null, 8, [
1119
1152
  "selected-block",
1120
1153
  "settings",
1121
1154
  "shifted-left",
1122
1155
  "onUpdateSettings"
1123
- ]), [[S, !h(P).state.previewMode]]),
1124
- !h(E) && h(O) ? (i(), v(mt, {
1156
+ ]), [[S, !h(M).state.previewMode]]),
1157
+ !h(O) && h(ee) ? (i(), v(ht, {
1125
1158
  key: 1,
1126
1159
  ref_key: "cloudPanelsRef",
1127
1160
  ref: f,
1128
1161
  config: l.config,
1129
- editor: h(P),
1130
- core: h(F),
1162
+ editor: h(M),
1163
+ core: h(N),
1131
1164
  "panel-state": h(V),
1132
1165
  "plan-config-instance": h(A),
1133
- "test-email": h(B),
1134
- "media-lib": h(R),
1135
- "saved-modules-headless": h(ne),
1136
- "show-save-module-dialog": h(W),
1137
- "save-module-pre-selected-block-id": h(K),
1138
- "show-module-browser-modal": h(G),
1139
- "onUpdate:showSaveModuleDialog": r[6] ||= (e) => W.value = e,
1140
- "onUpdate:saveModulePreSelectedBlockId": r[7] ||= (e) => K.value = e,
1141
- "onUpdate:showModuleBrowserModal": r[8] ||= (e) => G.value = e,
1142
- onSendTestEmail: q,
1143
- onModuleInsert: J
1166
+ "test-email": h(L),
1167
+ "media-lib": h(F),
1168
+ "saved-modules-headless": h(ie),
1169
+ "show-save-module-dialog": h(U),
1170
+ "save-module-pre-selected-block-id": h(G),
1171
+ "show-module-browser-modal": h(W),
1172
+ "onUpdate:showSaveModuleDialog": r[6] ||= (e) => U.value = e,
1173
+ "onUpdate:saveModulePreSelectedBlockId": r[7] ||= (e) => G.value = e,
1174
+ "onUpdate:showModuleBrowserModal": r[8] ||= (e) => W.value = e,
1175
+ onSendTestEmail: se,
1176
+ onModuleInsert: ce
1144
1177
  }, null, 8, [
1145
1178
  "config",
1146
1179
  "editor",
@@ -1155,15 +1188,16 @@ var Ue = ["aria-label"], We = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1155
1188
  "show-module-browser-modal"
1156
1189
  ])) : m("", !0),
1157
1190
  x("div", {
1158
- ref: (e) => h(F).popoverRoot.value = e,
1191
+ ref: (e) => h(N).popoverRoot.value = e,
1159
1192
  class: "tpl-popover-root"
1160
1193
  }, null, 512),
1161
- D(Me),
1162
- h(ae) ? (i(), v(ke, { key: 2 })) : m("", !0)
1163
- ], 14, jt));
1194
+ D(ke),
1195
+ D(Ne),
1196
+ h(oe) ? (i(), v(Me, { key: 2 })) : m("", !0)
1197
+ ], 46, Mt));
1164
1198
  }
1165
- }), [["__scopeId", "data-v-df1ba3f4"]]);
1199
+ }), [["__scopeId", "data-v-3fc6c906"]]);
1166
1200
  //#endregion
1167
- export { Ft as default };
1201
+ export { It as default };
1168
1202
 
1169
- //# sourceMappingURL=CloudEditor-DSeihOan.js.map
1203
+ //# sourceMappingURL=CloudEditor-DNed_Ym0.js.map