@templatical/editor 0.6.7 → 0.7.1

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 (108) hide show
  1. package/README.md +26 -1
  2. package/dist/{AccessibilityPanel-B2MT0M58.js → AccessibilityPanel-D-PqmHdH.js} +2 -2
  3. package/dist/{AiChatSidebar-w5ek3Z76.js → AiChatSidebar-BwLECwsO.js} +1 -1
  4. package/dist/{AiFeatureMenu-ChlAWywJ.js → AiFeatureMenu-CVHKharv.js} +3 -3
  5. package/dist/{BlockA11yBadge-C0S6kPC4.js → BlockA11yBadge-BFIw0h1m.js} +2 -2
  6. package/dist/{CloudEditor-DYYaScFe.js → CloudEditor-S7AzuNwC.js} +30 -21
  7. package/dist/{CollaboratorBar-Bo8vtPId.js → CollaboratorBar-VZKOv_Zn.js} +2 -2
  8. package/dist/{CommentsSidebar-BQROg36f.js → CommentsSidebar-BiRtaXYD.js} +3 -3
  9. package/dist/{CountdownBlock-Bxqe7zwL.js → CountdownBlock-Cq8A8WrM.js} +1 -1
  10. package/dist/{CountdownToolbar-CpFAnjSo.js → CountdownToolbar-CojjlZet.js} +2 -2
  11. package/dist/{DesignReferenceSidebar-CfqpcWX6.js → DesignReferenceSidebar-Ci9HIGbf.js} +2 -2
  12. package/dist/ModuleBrowserModal-D7IYx1Nh.js +206 -0
  13. package/dist/{ModulePreviewCanvas-Cw9GeGus.js → ModulePreviewCanvas-I-uMcK5G.js} +2 -2
  14. package/dist/{NumberWithSuffix-Dw8dN1Pt.js → NumberWithSuffix-CLTBb2Rj.js} +1 -1
  15. package/dist/{ParagraphEditor-DjDiUzmv.js → ParagraphEditor-BRQTNDFO.js} +156 -151
  16. package/dist/{RichTextEditorContent-CK3Om7ES.js → RichTextEditorContent-C3QSg7gd.js} +32 -28
  17. package/dist/{SaveModuleDialog-CSUPmfRP.js → SaveModuleDialog-DGGGNZfm.js} +6 -6
  18. package/dist/{SnapshotHistory-DwX2fj6N.js → SnapshotHistory-C97Iw6xw.js} +3 -3
  19. package/dist/{TemplateScoringPanel-BIAeCAEP.js → TemplateScoringPanel-V79yrEPC.js} +3 -3
  20. package/dist/{TestEmailModal-CIlBvWWn.js → TestEmailModal-B7S8H-VG.js} +3 -3
  21. package/dist/{TitleEditor-BCV5k6wj.js → TitleEditor-DhFTYzrw.js} +65 -60
  22. package/dist/{TplModal-C3Hq9b58.js → TplModal-BgABm6ju.js} +21 -17
  23. package/dist/{blockTypeIcons-iUurP50H.js → blockTypeIcons-BSf-3RJ-.js} +1 -1
  24. package/dist/bundle-stats.json +7 -7
  25. package/dist/cdn/chunks/{AccessibilityPanel-DnNB30b0.js → AccessibilityPanel-kgNBRaZV.js} +28 -28
  26. package/dist/cdn/chunks/{AccessibilityPanel-DnNB30b0.js.map → AccessibilityPanel-kgNBRaZV.js.map} +1 -1
  27. package/dist/cdn/chunks/{AiFeatureMenu-BKBh_ueF.js → AiFeatureMenu-CRkzwdMg.js} +15 -15
  28. package/dist/cdn/chunks/{AiFeatureMenu-BKBh_ueF.js.map → AiFeatureMenu-CRkzwdMg.js.map} +1 -1
  29. package/dist/cdn/chunks/{BlockA11yBadge-CnBu14Fj.js → BlockA11yBadge-BfuH2Hrg.js} +9 -9
  30. package/dist/cdn/chunks/{BlockA11yBadge-CnBu14Fj.js.map → BlockA11yBadge-BfuH2Hrg.js.map} +1 -1
  31. package/dist/cdn/chunks/{CloudEditor-CmR17piA.js → CloudEditor-BGiN3M_f.js} +252 -243
  32. package/dist/cdn/chunks/CloudEditor-BGiN3M_f.js.map +1 -0
  33. package/dist/cdn/chunks/{CollaboratorBar-BejZaFtY.js → CollaboratorBar-CMl3lAZU.js} +15 -15
  34. package/dist/cdn/chunks/{CollaboratorBar-BejZaFtY.js.map → CollaboratorBar-CMl3lAZU.js.map} +1 -1
  35. package/dist/cdn/chunks/{CountdownBlock-CjvUEHhE.js → CountdownBlock-D1RoaOgF.js} +18 -18
  36. package/dist/cdn/chunks/{CountdownBlock-CjvUEHhE.js.map → CountdownBlock-D1RoaOgF.js.map} +1 -1
  37. package/dist/cdn/chunks/{CountdownToolbar-Caokkqsg.js → CountdownToolbar-DltwuOer.js} +42 -42
  38. package/dist/cdn/chunks/{CountdownToolbar-Caokkqsg.js.map → CountdownToolbar-DltwuOer.js.map} +1 -1
  39. package/dist/cdn/chunks/{ModuleBrowserModal-Tb9a7L-K.js → ModuleBrowserModal-3uu2mXR9.js} +36 -36
  40. package/dist/cdn/chunks/{ModuleBrowserModal-Tb9a7L-K.js.map → ModuleBrowserModal-3uu2mXR9.js.map} +1 -1
  41. package/dist/cdn/chunks/{ModulePreviewCanvas-JWIEv5oS.js → ModulePreviewCanvas-K9CQFr7p.js} +37 -37
  42. package/dist/cdn/chunks/{ModulePreviewCanvas-JWIEv5oS.js.map → ModulePreviewCanvas-K9CQFr7p.js.map} +1 -1
  43. package/dist/cdn/chunks/{NumberWithSuffix-DrV8eumz.js → NumberWithSuffix-BIFgtqGs.js} +74 -74
  44. package/dist/cdn/chunks/{NumberWithSuffix-DrV8eumz.js.map → NumberWithSuffix-BIFgtqGs.js.map} +1 -1
  45. package/dist/cdn/chunks/{ParagraphEditor-CSfShBAO.js → ParagraphEditor-DlpZX_x4.js} +180 -176
  46. package/dist/cdn/chunks/ParagraphEditor-DlpZX_x4.js.map +1 -0
  47. package/dist/cdn/chunks/{RichTextEditorContent-DgqZzl8n.js → RichTextEditorContent-CPGT8h-O.js} +40 -37
  48. package/dist/cdn/chunks/RichTextEditorContent-CPGT8h-O.js.map +1 -0
  49. package/dist/cdn/chunks/{SaveModuleDialog-CxTwrIgx.js → SaveModuleDialog-_uaJscj1.js} +24 -24
  50. package/dist/cdn/chunks/{SaveModuleDialog-CxTwrIgx.js.map → SaveModuleDialog-_uaJscj1.js.map} +1 -1
  51. package/dist/cdn/chunks/TitleEditor-Kerz6US8.js +175 -0
  52. package/dist/cdn/chunks/TitleEditor-Kerz6US8.js.map +1 -0
  53. package/dist/cdn/chunks/{blockTypeIcons-DMt-2qR6.js → blockTypeIcons-BeOhGtoo.js} +7 -7
  54. package/dist/cdn/chunks/{blockTypeIcons-DMt-2qR6.js.map → blockTypeIcons-BeOhGtoo.js.map} +1 -1
  55. package/dist/cdn/chunks/{draggable-CNhyCGIO.js → draggable-P6QWzy4g.js} +1182 -1171
  56. package/dist/cdn/chunks/{draggable-CNhyCGIO.js.map → draggable-P6QWzy4g.js.map} +1 -1
  57. package/dist/cdn/chunks/{extensions-CUvwrffu.js → extensions-BZYkPlKr.js} +107 -108
  58. package/dist/cdn/chunks/extensions-BZYkPlKr.js.map +1 -0
  59. package/dist/cdn/chunks/{features-U3nzKc-R.js → features-DzIN-Nua.js} +925 -896
  60. package/dist/cdn/chunks/features-DzIN-Nua.js.map +1 -0
  61. package/dist/cdn/chunks/{icons-QcjADKIW.js → icons-Nvr6w13E.js} +2 -2
  62. package/dist/cdn/chunks/{icons-QcjADKIW.js.map → icons-Nvr6w13E.js.map} +1 -1
  63. package/dist/cdn/chunks/{media-library-Zcd_GInj.js → media-library-BzT7BoGU.js} +1189 -1183
  64. package/dist/cdn/chunks/media-library-BzT7BoGU.js.map +1 -0
  65. package/dist/cdn/chunks/{quality-8eo6DM3p.js → quality-C328caFm.js} +45 -45
  66. package/dist/cdn/chunks/{quality-8eo6DM3p.js.map → quality-C328caFm.js.map} +1 -1
  67. package/dist/cdn/chunks/renderer-eDlxzlJI.js +501 -0
  68. package/dist/cdn/chunks/renderer-eDlxzlJI.js.map +1 -0
  69. package/dist/cdn/chunks/{src-CthVYW_o.js → src-DKNTQJVO.js} +144 -144
  70. package/dist/cdn/chunks/{src-CthVYW_o.js.map → src-DKNTQJVO.js.map} +1 -1
  71. package/dist/cdn/chunks/{styles-CV5w3kjq.js → styles-lcwmaOou.js} +969 -958
  72. package/dist/cdn/chunks/styles-lcwmaOou.js.map +1 -0
  73. package/dist/cdn/chunks/{tiptap-IyIsncxY.js → tiptap-BwTCLVWl.js} +7 -7
  74. package/dist/cdn/chunks/{tiptap-IyIsncxY.js.map → tiptap-BwTCLVWl.js.map} +1 -1
  75. package/dist/cdn/editor.css +1 -1
  76. package/dist/cdn/editor.js +197 -146
  77. package/dist/cdn/editor.js.map +1 -1
  78. package/dist/{extensions-BF39Siqk.js → extensions-D-J02CiP.js} +50 -51
  79. package/dist/index.d.ts +51 -6
  80. package/dist/{keys-Bqs_0du9.js → keys-B5SJtPWf.js} +3 -3
  81. package/dist/style.css +1 -1
  82. package/dist/{styles-BgmKdc2x.js → styles-DeNciUTX.js} +586 -575
  83. package/dist/templatical-editor.js +182 -131
  84. package/dist/{useCloudI18n-CL_AwWwi.js → useCloudI18n-ByEMykjO.js} +1 -1
  85. package/dist/{useEditorCore-CnXrv71D.js → useEditorCore-uCU9Ny0M.js} +637 -619
  86. package/dist/{useI18n-CgmQftNf.js → useI18n-PEB8ioi_.js} +1 -1
  87. package/dist/{useMergeTag-vpwrZ9eQ.js → useMergeTag-C47xwU7X.js} +2 -2
  88. package/dist/usePopoverRoot-BxJrqnMD.js +8 -0
  89. package/package.json +7 -7
  90. package/dist/ModuleBrowserModal-CKhsaPnA.js +0 -206
  91. package/dist/cdn/chunks/CloudEditor-CmR17piA.js.map +0 -1
  92. package/dist/cdn/chunks/ParagraphEditor-CSfShBAO.js.map +0 -1
  93. package/dist/cdn/chunks/RichTextEditorContent-DgqZzl8n.js.map +0 -1
  94. package/dist/cdn/chunks/TitleEditor-DlqV7ODD.js +0 -171
  95. package/dist/cdn/chunks/TitleEditor-DlqV7ODD.js.map +0 -1
  96. package/dist/cdn/chunks/extensions-CUvwrffu.js.map +0 -1
  97. package/dist/cdn/chunks/features-U3nzKc-R.js.map +0 -1
  98. package/dist/cdn/chunks/media-library-Zcd_GInj.js.map +0 -1
  99. package/dist/cdn/chunks/renderer-eHJyPiJH.js +0 -548
  100. package/dist/cdn/chunks/renderer-eHJyPiJH.js.map +0 -1
  101. package/dist/cdn/chunks/styles-CV5w3kjq.js.map +0 -1
  102. /package/dist/{de-DcVOh9Fp.js → de-BhIWu_bO.js} +0 -0
  103. /package/dist/{de-DCaaCE5s.js → de-Di4MEjjx.js} +0 -0
  104. /package/dist/{emojiData-PQyVa4bU.js → emojiData-DX3E0XT-.js} +0 -0
  105. /package/dist/{en-DXCyK4-X.js → en-BSuzi-Pd.js} +0 -0
  106. /package/dist/{en-TZVJ_f6v.js → en-D7HRbYah.js} +0 -0
  107. /package/dist/{pt-BR-Vq7D7c11.js → pt-BR-CCVBRais.js} +0 -0
  108. /package/dist/{pt-BR-BMGasLBa.js → pt-BR-K32lt6YP.js} +0 -0
@@ -1,7 +1,7 @@
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, at as u, b as d, f, g as p, h as m, j as h, l as g, m as _, n as v, ot as y, p as b, rt 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-CNhyCGIO.js";
2
- import { $ as k, Bt as A, C as j, D as M, Fn as N, Ft as P, Ht as F, Lt as ee, Nt as I, Ot as L, S as te, Sn as R, Tt as z, Vt as B, Xt as V, Y as ne, Yt as H, Zt as U, _ as W, _n as G, at as K, b as re, c as ie, ct as q, d as J, dt as Y, f as X, g as ae, gt as Z, h as oe, ht as se, jt as ce, k as le, l as ue, ln as Q, m as de, p as fe, tn as pe, tt as me, u as he, v as ge, wt as _e, x as ve, y as ye } from "./features-U3nzKc-R.js";
3
- import { C as be, S as xe } from "./icons-QcjADKIW.js";
4
- import { a as Se, c as Ce, i as we, n as Te, o as Ee, r as De, s as Oe, t as ke } from "./styles-CV5w3kjq.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-P6QWzy4g.js";
2
+ import { A as k, C as A, Cn as j, Et as M, Ht as N, In as P, It as F, Mt as I, O as L, Pt as R, Qt as z, Rt as ee, S as te, Tt as B, Ut as V, Vt as H, X as U, Xt as W, Zt as G, _ as K, _t as q, b as ne, d as re, et as J, f as Y, ft as X, g as ie, gt as Z, h as ae, kt as Q, l as oe, lt as se, m as ce, nn as le, nt as ue, ot as de, p as fe, u as pe, un as me, v as he, vn as ge, w as _e, x as ve, y as ye } from "./features-DzIN-Nua.js";
3
+ import { C as be, S as xe } from "./icons-Nvr6w13E.js";
4
+ import { a as Se, c as Ce, i as we, n as Te, o as Ee, r as De, s as Oe, t as ke } from "./styles-lcwmaOou.js";
5
5
  import { d as $ } from "./styleConstants-DP1VOca8.js";
6
6
  //#region src/cloud/composables/useSnapshotPreview.ts
7
7
  function Ae(t) {
@@ -11,7 +11,7 @@ function Ae(t) {
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 = fe({
14
+ i.state.template?.id && !u.value && (u.value = ce({
15
15
  authManager: n,
16
16
  templateId: i.state.template.id,
17
17
  onRestore: b,
@@ -84,7 +84,7 @@ function je() {
84
84
  function g(t) {
85
85
  l.value = !1, e.value = e.value === t ? null : t;
86
86
  }
87
- return pe(u, () => {
87
+ return le(u, () => {
88
88
  l.value = !1;
89
89
  }), {
90
90
  activePanel: e,
@@ -107,9 +107,9 @@ function je() {
107
107
  //#endregion
108
108
  //#region src/cloud/composables/useCollabUndoWarning.ts
109
109
  function Me(e) {
110
- let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i = c(!1), a = c(!1), { start: o } = Q(() => {
110
+ let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i = c(!1), a = c(!1), { start: o } = me(() => {
111
111
  a.value = !1;
112
- }, N, { immediate: !1 });
112
+ }, P, { immediate: !1 });
113
113
  function s() {
114
114
  i.value || !t.value || n() === 0 || !r.value || (i.value = !0, a.value = !0, o());
115
115
  }
@@ -121,7 +121,7 @@ function Me(e) {
121
121
  //#endregion
122
122
  //#region src/cloud/composables/useCloudFeatureFlags.ts
123
123
  function Ne(e) {
124
- 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 } = Q(() => {
124
+ 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 } = me(() => {
125
125
  p.value = "idle";
126
126
  }, 3e3, { immediate: !1 });
127
127
  return {
@@ -175,29 +175,29 @@ function Pe(e) {
175
175
  //#endregion
176
176
  //#region src/cloud/composables/useCloudInitialization.ts
177
177
  function Fe(e) {
178
- 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 M({
178
+ 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 L({
179
179
  ...t.auth,
180
180
  onError: t.onError
181
- }), _ = he({
181
+ }), _ = re({
182
182
  authManager: g,
183
183
  onError: t.onError
184
- }), v = c(/* @__PURE__ */ new Map()), y = te({
184
+ }), v = c(/* @__PURE__ */ new Map()), y = A({
185
185
  authManager: g,
186
186
  defaultFontFamily: t.fonts?.defaultFont,
187
187
  templateDefaults: t.templateDefaults,
188
188
  onError: t.onError,
189
189
  lockedBlocks: v
190
- }), b = oe({
190
+ }), b = ie({
191
191
  authManager: g,
192
192
  onError: t.onError
193
193
  });
194
- t.mcp?.enabled && ie({
194
+ t.mcp?.enabled && oe({
195
195
  editor: y,
196
196
  channel: b.channel,
197
197
  onOperation: t.mcp.onOperation
198
198
  });
199
199
  let x = null;
200
- t.collaboration?.enabled && (x = W({
200
+ t.collaboration?.enabled && (x = he({
201
201
  authManager: g,
202
202
  editor: y,
203
203
  channel: b.channel,
@@ -208,8 +208,8 @@ function Fe(e) {
208
208
  onBlockUnlocked: t.collaboration.onBlockUnlocked
209
209
  }), O(() => x.lockedBlocks.value, (e) => {
210
210
  v.value = e;
211
- }, { immediate: !0 }), ae(y, x));
212
- let S = f(() => !!t.collaboration?.enabled && _.hasFeature("collaboration")), C = le({
211
+ }, { immediate: !0 }), K(y, x));
212
+ let S = f(() => !!t.collaboration?.enabled && _.hasFeature("collaboration")), C = k({
213
213
  editor: y,
214
214
  config: {
215
215
  uiTheme: t.uiTheme,
@@ -237,7 +237,8 @@ function Fe(e) {
237
237
  enabled: () => t.autoSave !== !1 && _.hasFeature("auto_save")
238
238
  },
239
239
  themeExtraStyles: () => ({ "--tpl-drop-text": `"${n.canvas.dropHere}"` }),
240
- keyboardOptions: { onBeforeUndo: () => h?.showCollabUndoWarning() }
240
+ keyboardOptions: { onBeforeUndo: () => h?.showCollabUndoWarning() },
241
+ editorRoot: e.editorRoot
241
242
  }), w = Me({
242
243
  isCollaborationEnabled: S,
243
244
  getCollaboratorCount: () => x?.collaborators.value.length ?? 0,
@@ -253,24 +254,24 @@ function Fe(e) {
253
254
  onError: t.onError
254
255
  });
255
256
  m = T;
256
- let E = je(), D = ve(t.ai), k = Ne({
257
+ let E = je(), D = te(t.ai), j = Ne({
257
258
  planConfigInstance: _,
258
259
  aiConfig: D,
259
260
  editor: y
260
- }), j = Pe({
261
+ }), M = Pe({
261
262
  onRequestMedia: t.onRequestMedia,
262
263
  mediaLibraryOpen: E.mediaLibraryOpen,
263
264
  mediaLibraryAccept: E.mediaLibraryAccept
264
265
  });
265
- ne({
266
+ U({
266
267
  onBlockMove: y.moveBlock,
267
268
  onBlockAdd: y.addBlock
268
269
  });
269
- let N = J({
270
+ let N = Y({
270
271
  authManager: g,
271
272
  getFontsConfig: () => t.fonts,
272
273
  canUseCustomFonts: () => _.hasFeature("custom_fonts")
273
- }), I = X({
274
+ }), P = fe({
274
275
  authManager: g,
275
276
  getTemplateId: () => y.state.template?.id ?? null,
276
277
  save: () => y.save(),
@@ -278,7 +279,7 @@ function Fe(e) {
278
279
  onError: t.onError,
279
280
  isAuthReady: l,
280
281
  onBeforeTestEmail: t.onBeforeTestEmail
281
- }), L = ye({
282
+ }), R = ne({
282
283
  authManager: g,
283
284
  getTemplateId: () => y.state.template?.id ?? null,
284
285
  getSocketId: () => b.getSocketId(),
@@ -287,56 +288,56 @@ function Fe(e) {
287
288
  isAuthReady: l,
288
289
  hasCommentingFeature: () => t.commenting !== !1 && _.hasFeature("commenting")
289
290
  });
290
- ge({
291
- comments: L,
291
+ ye({
292
+ comments: R,
292
293
  channel: b.channel
293
294
  });
294
- let R = de({
295
+ let B = ae({
295
296
  authManager: g,
296
297
  onError: t.onError
297
- }), z = c(!1), B = c(null), G = c(!1), K = re({
298
+ }), q = c(!1), J = c(null), X = c(!1), Z = ve({
298
299
  authManager: g,
299
300
  getTemplateId: () => y.state.template?.id ?? null
300
301
  });
301
- function q(e) {
302
+ function Q(e) {
302
303
  E.commentsOpen.value = !0, queueMicrotask(() => {
303
304
  o()?.filterByBlock(e);
304
305
  });
305
306
  }
306
- a(H, j.handleRequestMedia), a(ee, g), a(P, D), a(F, L), a(V, R), a(U, K), a(A, {
307
+ a(W, M.handleRequestMedia), a(ee, g), a(F, D), a(V, R), a(G, B), a(z, Z), a(H, {
307
308
  plan: _,
308
309
  ai: D,
309
310
  comments: {
310
- getBlockCount: (e) => L.commentCountByBlock.value.get(e) ?? 0,
311
- openForBlock: q
311
+ getBlockCount: (e) => R.commentCountByBlock.value.get(e) ?? 0,
312
+ openForBlock: Q
312
313
  },
313
314
  savedModules: {
314
315
  openSaveDialog: (e) => {
315
- B.value = e ?? null, z.value = !0;
316
+ J.value = e ?? null, q.value = !0;
316
317
  },
317
318
  openBrowser: () => {
318
- G.value = !0;
319
+ X.value = !0;
319
320
  },
320
- moduleCount: f(() => R.modules.value.length)
321
+ moduleCount: f(() => B.modules.value.length)
321
322
  }
322
323
  });
323
- function Y(e) {
324
+ function se(e) {
324
325
  _.hasFeature("theme_customization") && (C.themeOverrides.value = e);
325
326
  }
326
- function Z(e) {
327
+ function ce(e) {
327
328
  y.setUiTheme(e);
328
329
  }
329
- async function se() {
330
+ async function le() {
330
331
  s.value = !0, u.value = null;
331
332
  try {
332
333
  if (await g.initialize(), d) return;
333
334
  l.value = !0;
334
- let e = await ue({ authManager: g });
335
+ let e = await pe({ authManager: g });
335
336
  if (d) return;
336
337
  if (!e.api.ok) throw Error("Health check failed: API is not reachable");
337
338
  if (!e.auth.ok) throw Error(`Health check failed: authentication error${e.auth.error ? ` - ${e.auth.error}` : ""}`);
338
- if (e.websocket.ok || ce.warn("WebSocket health check failed:", e.websocket.error ?? "unknown error", "-- real-time features will be disabled."), await _.fetchConfig(), d) return;
339
- 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") && R.loadModules(), i("ready");
339
+ if (e.websocket.ok || I.warn("WebSocket health check failed:", e.websocket.error ?? "unknown error", "-- real-time features will be disabled."), await _.fetchConfig(), d) return;
340
+ 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") && B.loadModules(), i("ready");
340
341
  } catch (e) {
341
342
  if (d) return;
342
343
  let n = e instanceof Error ? e : Error("Initialization failed", { cause: e });
@@ -345,7 +346,7 @@ function Fe(e) {
345
346
  d || (s.value = !1);
346
347
  }
347
348
  }
348
- function Q() {
349
+ function ue() {
349
350
  d = !0, r.cleanupFontLinks(), b.disconnect(), C.destroy(), t.onUnmount?.();
350
351
  }
351
352
  return {
@@ -361,32 +362,32 @@ function Fe(e) {
361
362
  editor: y,
362
363
  core: C,
363
364
  aiConfig: D,
364
- featureFlags: k,
365
- mediaLib: j,
365
+ featureFlags: j,
366
+ mediaLib: M,
366
367
  exporter: N,
367
- testEmail: I,
368
- commentsInstance: L,
369
- savedModulesHeadless: R,
370
- scoringInstance: K,
368
+ testEmail: P,
369
+ commentsInstance: R,
370
+ savedModulesHeadless: B,
371
+ scoringInstance: Z,
371
372
  panelState: E,
372
373
  snapshotPreview: T,
373
374
  collabWarning: w,
374
- showSaveModuleDialog: z,
375
- showModuleBrowserModal: G,
376
- saveModulePreSelectedBlockId: B,
375
+ showSaveModuleDialog: q,
376
+ showModuleBrowserModal: X,
377
+ saveModulePreSelectedBlockId: J,
377
378
  onSaveHook: p,
378
- initialize: se,
379
- destroy: Q,
380
- setThemeOverrides: Y,
381
- setUiTheme: Z,
382
- openCommentsForBlock: q
379
+ initialize: le,
380
+ destroy: ue,
381
+ setThemeOverrides: se,
382
+ setUiTheme: ce,
383
+ openCommentsForBlock: Q
383
384
  };
384
385
  }
385
386
  //#endregion
386
387
  //#region src/utils/preRenderCustomBlocks.ts
387
388
  async function Ie(e, t) {
388
389
  let n = async (e) => {
389
- if (R(e)) {
390
+ if (j(e)) {
390
391
  let n = e;
391
392
  try {
392
393
  n.renderedHtml = await t.renderCustomBlock(n);
@@ -406,7 +407,7 @@ async function Ie(e, t) {
406
407
  function Le(e) {
407
408
  let { config: t, editor: n, websocket: r, planConfigInstance: i, snapshotPreview: a, core: o, exporter: s, featureFlags: c, isDestroyed: l } = e;
408
409
  function u() {
409
- return j(i.config.value.websocket);
410
+ return _e(i.config.value.websocket);
410
411
  }
411
412
  async function d(e) {
412
413
  let i = await n.create(e);
@@ -477,8 +478,8 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
477
478
  },
478
479
  emits: ["cancel", "confirm"],
479
480
  setup(e, { emit: t }) {
480
- let n = t, { t: r } = k();
481
- return (t, a) => (i(), _(v, {
481
+ let n = t, { t: r } = J();
482
+ return (t, a) => (i(), v(y, {
482
483
  "enter-active-class": "tpl:transition-opacity tpl:duration-150",
483
484
  "leave-active-class": "tpl:transition-opacity tpl:duration-150",
484
485
  "enter-from-class": "tpl:opacity-0",
@@ -488,29 +489,29 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
488
489
  key: 0,
489
490
  role: "dialog",
490
491
  "aria-modal": "true",
491
- "aria-label": x(r).saveGate.title,
492
+ "aria-label": h(r).saveGate.title,
492
493
  class: "tpl:fixed tpl:inset-0 tpl:z-50 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/40 tpl:p-6",
493
- onClick: a[2] ||= g((e) => n("cancel"), ["self"])
494
- }, [b("div", Be, [
495
- b("header", Ve, [D(x(K), {
494
+ onClick: a[2] ||= _((e) => n("cancel"), ["self"])
495
+ }, [x("div", Be, [
496
+ x("header", Ve, [D(h(de), {
496
497
  size: 18,
497
498
  "stroke-width": 2,
498
499
  class: "tpl:text-[var(--tpl-warning)]"
499
- }), b("h2", He, C(x(r).saveGate.title), 1)]),
500
- b("p", Ue, C(x(r).saveGate.body), 1),
501
- b("ul", We, [(i(!0), p(w, null, o(e.issues, (e) => (i(), p("li", {
500
+ }), x("h2", He, d(h(r).saveGate.title), 1)]),
501
+ x("p", Ue, d(h(r).saveGate.body), 1),
502
+ x("ul", We, [(i(!0), p(w, null, o(e.issues, (e) => (i(), p("li", {
502
503
  key: `${e.ruleId}-${e.blockId ?? "template"}`,
503
504
  class: "tpl:flex tpl:flex-col tpl:gap-0.5 tpl:rounded tpl:px-2 tpl:py-1.5"
504
- }, [b("span", Ge, C(e.message), 1), b("span", Ke, C(e.ruleId), 1)]))), 128))]),
505
- b("footer", qe, [b("button", {
505
+ }, [x("span", Ge, d(e.message), 1), x("span", Ke, d(e.ruleId), 1)]))), 128))]),
506
+ x("footer", qe, [x("button", {
506
507
  type: "button",
507
508
  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)]",
508
509
  onClick: a[0] ||= (e) => n("cancel")
509
- }, C(x(r).saveGate.cancel), 1), b("button", {
510
+ }, d(h(r).saveGate.cancel), 1), x("button", {
510
511
  type: "button",
511
512
  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",
512
513
  onClick: a[1] ||= (e) => n("confirm")
513
- }, C(x(r).saveGate.confirm), 1)])
514
+ }, d(h(r).saveGate.confirm), 1)])
514
515
  ])], 8, ze)) : m("", !0)]),
515
516
  _: 1
516
517
  }));
@@ -559,13 +560,13 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
559
560
  },
560
561
  emits: ["save"],
561
562
  setup(e) {
562
- let t = d(() => import("./CollaboratorBar-BejZaFtY.js")), n = d(() => import("./features-U3nzKc-R.js").then((e) => e.r)), r = d(() => import("./AiFeatureMenu-BKBh_ueF.js")), { t: a, format: o } = k();
563
+ let t = u(() => import("./CollaboratorBar-CMl3lAZU.js")), n = u(() => import("./features-DzIN-Nua.js").then((e) => e.r)), r = u(() => import("./AiFeatureMenu-CRkzwdMg.js")), { t: a, format: o } = J();
563
564
  return (c, l) => (i(), p("header", Ye, [
564
- b("div", Xe, [e.featureFlags.templateLimit.value === null ? m("", !0) : (i(), p("span", Ze, C(x(o)(x(a).header.templatesUsed, {
565
+ x("div", Xe, [e.featureFlags.templateLimit.value === null ? m("", !0) : (i(), p("span", Ze, d(h(o)(h(a).header.templatesUsed, {
565
566
  used: e.featureFlags.templateCount.value,
566
567
  max: e.featureFlags.templateLimit.value
567
568
  })), 1))]),
568
- b("div", Qe, [
569
+ x("div", Qe, [
569
570
  D(we, {
570
571
  viewport: e.editor.state.viewport,
571
572
  onChange: e.editor.setViewport
@@ -578,12 +579,12 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
578
579
  "preview-mode": e.editor.state.previewMode,
579
580
  onChange: e.editor.setPreviewMode
580
581
  }, null, 8, ["preview-mode", "onChange"]),
581
- e.collaboration && e.isCollaborationEnabled ? (i(), _(x(t), {
582
+ e.collaboration && e.isCollaborationEnabled ? (i(), v(h(t), {
582
583
  key: 0,
583
584
  collaborators: e.collaboration.collaborators.value,
584
585
  "is-connected": e.websocket.isConnected.value
585
586
  }, null, 8, ["collaborators", "is-connected"])) : m("", !0),
586
- e.snapshotPreview.snapshotHistoryInstance.value ? (i(), _(x(n), {
587
+ e.snapshotPreview.snapshotHistoryInstance.value ? (i(), v(h(n), {
587
588
  key: 1,
588
589
  snapshots: e.snapshotPreview.snapshotHistorySnapshots.value,
589
590
  "is-loading": e.snapshotPreview.snapshotHistoryIsLoading.value,
@@ -598,51 +599,51 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
598
599
  "onNavigate"
599
600
  ])) : m("", !0)
600
601
  ]),
601
- b("div", $e, [
602
+ x("div", $e, [
602
603
  e.featureFlags.saveStatus.value === "error" ? (i(), p("div", {
603
604
  key: 0,
604
605
  "aria-live": "assertive",
605
606
  class: "tpl-tooltip tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]",
606
607
  "data-tooltip": e.featureFlags.saveErrorMessage.value
607
- }, [D(x(z), {
608
+ }, [D(h(M), {
608
609
  size: 12,
609
610
  "stroke-width": 2.5
610
- }), T(" " + C(x(a).header.saveFailed), 1)], 8, et)) : e.featureFlags.saveStatus.value === "saved" ? (i(), p("div", tt, [D(x(L), {
611
+ }), T(" " + d(h(a).header.saveFailed), 1)], 8, et)) : e.featureFlags.saveStatus.value === "saved" ? (i(), p("div", tt, [D(h(Q), {
611
612
  size: 12,
612
613
  "stroke-width": 2.5
613
- }), T(" " + C(x(a).header.saved), 1)])) : e.editor.state.isDirty ? (i(), p("div", nt, [l[4] ||= b("span", { class: "tpl-pulse tpl:size-1.5 tpl:rounded-full tpl:bg-[var(--tpl-primary)]" }, null, -1), T(" " + C(x(a).header.unsaved), 1)])) : m("", !0),
614
+ }), T(" " + d(h(a).header.saved), 1)])) : e.editor.state.isDirty ? (i(), p("div", nt, [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),
614
615
  e.commentsInstance.isEnabled.value && e.featureFlags.hasTemplateSaved.value ? (i(), p("button", {
615
616
  key: 3,
616
- "aria-label": e.commentsInstance.unresolvedCount.value > 0 ? `${x(a).comments.button} (${e.commentsInstance.unresolvedCount.value})` : x(a).comments.button,
617
+ "aria-label": e.commentsInstance.unresolvedCount.value > 0 ? `${h(a).comments.button} (${e.commentsInstance.unresolvedCount.value})` : h(a).comments.button,
617
618
  "aria-expanded": e.panelState.commentsOpen.value,
618
- class: u(x($)),
619
- style: y({
619
+ class: b(h($)),
620
+ style: C({
620
621
  backgroundColor: e.panelState.commentsOpen.value ? "var(--tpl-primary)" : "transparent",
621
622
  color: e.panelState.commentsOpen.value ? "var(--tpl-bg)" : "var(--tpl-primary)",
622
623
  borderColor: "var(--tpl-primary)"
623
624
  }),
624
625
  onClick: l[0] ||= (t) => e.panelState.commentsOpen.value = !e.panelState.commentsOpen.value
625
626
  }, [
626
- D(x(se), {
627
+ D(h(Z), {
627
628
  size: 16,
628
629
  "stroke-width": 2
629
630
  }),
630
- T(" " + C(x(a).comments.button) + " ", 1),
631
- e.commentsInstance.unresolvedCount.value > 0 && !e.panelState.commentsOpen.value ? (i(), p("span", it, C(e.commentsInstance.unresolvedCount.value), 1)) : m("", !0)
631
+ T(" " + d(h(a).comments.button) + " ", 1),
632
+ e.commentsInstance.unresolvedCount.value > 0 && !e.panelState.commentsOpen.value ? (i(), p("span", it, d(e.commentsInstance.unresolvedCount.value), 1)) : m("", !0)
632
633
  ], 14, rt)) : m("", !0),
633
634
  e.featureFlags.canUseAiGeneration.value && e.featureFlags.hasTemplateSaved.value ? (i(), p("div", {
634
635
  key: 4,
635
636
  ref: (t) => e.panelState.aiMenuRef.value = t,
636
637
  class: "tpl:relative"
637
- }, [b("button", {
638
+ }, [x("button", {
638
639
  "aria-expanded": e.panelState.aiMenuOpen.value,
639
- class: u(["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"]),
640
- onClick: l[1] ||= g((...t) => e.panelState.toggleAiMenu && e.panelState.toggleAiMenu(...t), ["stop"])
641
- }, [D(x(q), {
640
+ 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"]),
641
+ onClick: l[1] ||= _((...t) => e.panelState.toggleAiMenu && e.panelState.toggleAiMenu(...t), ["stop"])
642
+ }, [D(h(se), {
642
643
  size: 16,
643
644
  "stroke-width": 2,
644
645
  class: "tpl-ai-btn-icon"
645
- }), T(" " + C(x(a).aiChat.button), 1)], 10, at), D(v, {
646
+ }), T(" " + d(h(a).aiChat.button), 1)], 10, at), D(y, {
646
647
  "enter-active-class": "tpl:transition-all tpl:duration-150 tpl:ease-out",
647
648
  "enter-from-class": "tpl:scale-95 tpl:opacity-0",
648
649
  "enter-to-class": "tpl:scale-100 tpl:opacity-100",
@@ -650,7 +651,7 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
650
651
  "leave-from-class": "tpl:scale-100 tpl:opacity-100",
651
652
  "leave-to-class": "tpl:scale-95 tpl:opacity-0"
652
653
  }, {
653
- default: s(() => [e.panelState.aiMenuOpen.value ? (i(), p("div", ot, [D(x(r), {
654
+ default: s(() => [e.panelState.aiMenuOpen.value ? (i(), p("div", ot, [D(h(r), {
654
655
  "active-feature": e.panelState.activeAiFeature.value,
655
656
  onSelect: e.panelState.handleAiFeatureSelect
656
657
  }, null, 8, ["active-feature", "onSelect"])])) : m("", !0)]),
@@ -658,7 +659,7 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
658
659
  })], 512)) : m("", !0),
659
660
  e.testEmail.isEnabled.value && e.featureFlags.canSendTestEmail.value ? (i(), p("button", {
660
661
  key: 5,
661
- class: u(x($)),
662
+ class: b(h($)),
662
663
  style: {
663
664
  "background-color": "transparent",
664
665
  color: "var(--tpl-primary)",
@@ -666,18 +667,18 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
666
667
  },
667
668
  disabled: e.testEmail.isSending.value || !e.featureFlags.hasTemplateSaved.value,
668
669
  onClick: l[2] ||= (t) => e.panelState.testEmailModalOpen.value = !0
669
- }, [e.testEmail.isSending.value ? (i(), _(x(Z), {
670
+ }, [e.testEmail.isSending.value ? (i(), v(h(q), {
670
671
  key: 1,
671
672
  class: "tpl-spinner",
672
673
  size: 16,
673
674
  "stroke-width": 2
674
- })) : (i(), _(x(Y), {
675
+ })) : (i(), v(h(X), {
675
676
  key: 0,
676
677
  size: 16,
677
678
  "stroke-width": 2
678
- })), T(" " + C(x(a).testEmail.button), 1)], 10, st)) : m("", !0),
679
- b("button", {
680
- class: u(x($)),
679
+ })), T(" " + d(h(a).testEmail.button), 1)], 10, st)) : m("", !0),
680
+ x("button", {
681
+ class: b(h($)),
681
682
  style: {
682
683
  "background-color": "transparent",
683
684
  color: "var(--tpl-primary)",
@@ -685,16 +686,16 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
685
686
  },
686
687
  disabled: e.isSaveDisabled,
687
688
  onClick: l[3] ||= (e) => c.$emit("save")
688
- }, [e.isSaving ? (i(), _(x(Z), {
689
+ }, [e.isSaving ? (i(), v(h(q), {
689
690
  key: 1,
690
691
  class: "tpl-spinner",
691
692
  size: 16,
692
693
  "stroke-width": 2
693
- })) : (i(), _(x(xe), {
694
+ })) : (i(), v(h(xe), {
694
695
  key: 0,
695
696
  size: 16,
696
697
  "stroke-width": 2
697
- })), T(" " + C(e.isSaving ? x(a).header.saving : x(a).header.save), 1)], 10, ct)
698
+ })), T(" " + d(e.isSaving ? h(a).header.saving : h(a).header.save), 1)], 10, ct)
698
699
  ])
699
700
  ]));
700
701
  }
@@ -721,51 +722,51 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
721
722
  "module-insert"
722
723
  ],
723
724
  setup(e, { expose: t, emit: n }) {
724
- let r = d(() => import("./features-U3nzKc-R.js").then((e) => e.s)), a = d(() => import("./features-U3nzKc-R.js").then((e) => e.o)), o = d(() => import("./features-U3nzKc-R.js").then((e) => e.a)), s = d(() => import("./features-U3nzKc-R.js").then((e) => e.n)), l = d(() => import("./features-U3nzKc-R.js").then((e) => e.t)), u = d(() => import("./SaveModuleDialog-CxTwrIgx.js")), f = d(() => import("./ModuleBrowserModal-Tb9a7L-K.js")), h = d(async () => {
725
+ let r = u(() => import("./features-DzIN-Nua.js").then((e) => e.c)), a = u(() => import("./features-DzIN-Nua.js").then((e) => e.s)), o = u(() => import("./features-DzIN-Nua.js").then((e) => e.o)), s = u(() => import("./features-DzIN-Nua.js").then((e) => e.n)), l = u(() => import("./features-DzIN-Nua.js").then((e) => e.t)), d = u(() => import("./SaveModuleDialog-_uaJscj1.js")), f = u(() => import("./ModuleBrowserModal-3uu2mXR9.js")), g = u(async () => {
725
726
  try {
726
- return (await import("./src-CthVYW_o.js")).MediaLibraryModal;
727
+ return (await import("./src-DKNTQJVO.js")).MediaLibraryModal;
727
728
  } catch {
728
729
  throw Error("[Templatical] Cloud media library requires the optional peer dependency '@templatical/media-library'. Please install it.");
729
730
  }
730
- }), g = n;
731
- function v(e, t, n) {
731
+ }), _ = n;
732
+ function y(e, t, n) {
732
733
  t.history.record(), n.setContent(e), t.conditionPreview.reset();
733
734
  }
734
- function y(e, t) {
735
- g("module-insert", e, t);
735
+ function b(e, t) {
736
+ _("module-insert", e, t);
736
737
  }
737
- let b = c(null);
738
+ let x = c(null);
738
739
  function S(e) {
739
- b.value?.filterByBlock(e);
740
+ x.value?.filterByBlock(e);
740
741
  }
741
742
  return t({ filterCommentsByBlock: S }), (t, n) => (i(), p(w, null, [
742
- D(x(r), {
743
+ D(h(r), {
743
744
  visible: e.panelState.aiChatOpen.value,
744
- "on-apply": (t) => v(t, e.core, e.editor),
745
+ "on-apply": (t) => y(t, e.core, e.editor),
745
746
  onClose: n[0] ||= (t) => e.panelState.aiChatOpen.value = !1
746
747
  }, null, 8, ["visible", "on-apply"]),
747
- D(x(s), {
748
+ D(h(s), {
748
749
  visible: e.panelState.scoringPanelOpen.value,
749
750
  onClose: n[1] ||= (t) => e.panelState.scoringPanelOpen.value = !1
750
751
  }, null, 8, ["visible"]),
751
- D(x(o), {
752
+ D(h(o), {
752
753
  visible: e.panelState.designReferenceOpen.value,
753
754
  "has-existing-blocks": e.editor.content.value.blocks.length > 0,
754
755
  onClose: n[2] ||= (t) => e.panelState.designReferenceOpen.value = !1,
755
- onApply: n[3] ||= (t) => v(t, e.core, e.editor)
756
+ onApply: n[3] ||= (t) => y(t, e.core, e.editor)
756
757
  }, null, 8, ["visible", "has-existing-blocks"]),
757
- D(x(a), {
758
+ D(h(a), {
758
759
  ref_key: "commentsSidebar",
759
- ref: b,
760
+ ref: x,
760
761
  visible: e.panelState.commentsOpen.value,
761
762
  onClose: n[4] ||= (t) => e.panelState.commentsOpen.value = !1
762
763
  }, null, 8, ["visible"]),
763
- D(x(l), {
764
+ D(h(l), {
764
765
  visible: e.panelState.testEmailModalOpen.value,
765
766
  "allowed-emails": e.testEmail.allowedEmails.value,
766
767
  "is-sending": e.testEmail.isSending.value,
767
768
  error: e.testEmail.error.value,
768
- onSend: n[5] ||= (e) => g("send-test-email", e),
769
+ onSend: n[5] ||= (e) => _("send-test-email", e),
769
770
  onClose: n[6] ||= (t) => e.panelState.testEmailModalOpen.value = !1
770
771
  }, null, 8, [
771
772
  "visible",
@@ -773,29 +774,31 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
773
774
  "is-sending",
774
775
  "error"
775
776
  ]),
776
- e.planConfigInstance.hasFeature("saved_modules") && e.config.modules !== !1 ? (i(), _(x(u), {
777
+ e.planConfigInstance.hasFeature("saved_modules") && e.config.modules !== !1 ? (i(), v(h(d), {
777
778
  key: 0,
778
779
  visible: e.showSaveModuleDialog,
779
780
  "pre-selected-block-id": e.saveModulePreSelectedBlockId,
780
781
  onClose: n[7] ||= (e) => {
781
- g("update:showSaveModuleDialog", !1), g("update:saveModulePreSelectedBlockId", null);
782
+ _("update:showSaveModuleDialog", !1), _("update:saveModulePreSelectedBlockId", null);
782
783
  },
783
784
  onSaved: n[8] ||= (t) => e.savedModulesHeadless.loadModules()
784
785
  }, null, 8, ["visible", "pre-selected-block-id"])) : m("", !0),
785
- e.planConfigInstance.hasFeature("saved_modules") && e.config.modules !== !1 ? (i(), _(x(f), {
786
+ e.planConfigInstance.hasFeature("saved_modules") && e.config.modules !== !1 ? (i(), v(h(f), {
786
787
  key: 1,
787
788
  visible: e.showModuleBrowserModal,
788
- onClose: n[9] ||= (e) => g("update:showModuleBrowserModal", !1),
789
- onInsert: y
789
+ onClose: n[9] ||= (e) => _("update:showModuleBrowserModal", !1),
790
+ onInsert: b
790
791
  }, null, 8, ["visible"])) : m("", !0),
791
- D(x(h), {
792
+ D(h(g), {
792
793
  visible: e.panelState.mediaLibraryOpen.value,
793
794
  accept: e.panelState.mediaLibraryAccept.value,
795
+ "popover-target": e.core.popoverRoot.value,
794
796
  onSelect: e.mediaLib.handleMediaSelect,
795
797
  onClose: e.mediaLib.handleMediaLibraryClose
796
798
  }, null, 8, [
797
799
  "visible",
798
800
  "accept",
801
+ "popover-target",
799
802
  "onSelect",
800
803
  "onClose"
801
804
  ])
@@ -808,7 +811,7 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
808
811
  __name: "CloudLoadingOverlay",
809
812
  props: { visible: { type: Boolean } },
810
813
  setup(e) {
811
- return (t, n) => e.visible ? (i(), p("div", dt, [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), b("div", ft, [b("div", pt, [(i(), p(w, null, o(5, (e) => b("div", {
814
+ return (t, n) => e.visible ? (i(), p("div", dt, [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", ft, [x("div", pt, [(i(), p(w, null, o(5, (e) => x("div", {
812
815
  key: e,
813
816
  class: "tpl-shimmer tpl:size-7 tpl:rounded-[var(--tpl-radius-sm)]"
814
817
  })), 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);
@@ -825,7 +828,7 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
825
828
  },
826
829
  emits: ["retry"],
827
830
  setup(e, { emit: t }) {
828
- let n = t, { t: r } = k();
831
+ let n = t, { t: r } = J();
829
832
  function a(e) {
830
833
  return "isUnauthorized" in e && e.isUnauthorized ? r.error.authFailed : "isNotFound" in e && e.isNotFound ? r.error.templateNotFound : r.error.defaultMessage;
831
834
  }
@@ -833,17 +836,17 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
833
836
  return "isNotFound" in e && !!e.isNotFound;
834
837
  }
835
838
  return (t, s) => e.visible && e.error ? (i(), p("div", ht, [
836
- b("div", gt, [D(x(z), {
839
+ x("div", gt, [D(h(M), {
837
840
  size: 32,
838
841
  "stroke-width": 1.5,
839
842
  class: "tpl:text-[var(--tpl-danger)]"
840
843
  })]),
841
- b("div", _t, [b("h2", vt, C(x(r).error.title), 1), b("p", yt, C(a(e.error)), 1)]),
844
+ x("div", _t, [x("h2", vt, d(h(r).error.title), 1), x("p", yt, d(a(e.error)), 1)]),
842
845
  o(e.error) ? m("", !0) : (i(), p("button", {
843
846
  key: 0,
844
847
  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)]",
845
848
  onClick: s[0] ||= (e) => n("retry")
846
- }, C(x(r).error.retry), 1))
849
+ }, d(h(r).error.retry), 1))
847
850
  ])) : m("", !0);
848
851
  }
849
852
  }), xt = {
@@ -854,19 +857,19 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
854
857
  props: { visible: { type: Boolean } },
855
858
  emits: ["cancel", "confirm"],
856
859
  setup(e, { emit: t }) {
857
- let n = t, { t: r } = k();
858
- return (t, a) => e.visible ? (i(), p("div", xt, [b("div", St, [D(x(_e), {
860
+ let n = t, { t: r } = J();
861
+ return (t, a) => e.visible ? (i(), p("div", xt, [x("div", St, [D(h(B), {
859
862
  size: 18,
860
863
  "stroke-width": 2,
861
864
  class: "tpl:text-[var(--tpl-primary)]"
862
- }), b("span", null, C(x(r).snapshotPreview.message), 1)]), b("div", Ct, [b("button", {
865
+ }), x("span", null, d(h(r).snapshotPreview.message), 1)]), x("div", Ct, [x("button", {
863
866
  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)]",
864
867
  style: { "background-color": "transparent" },
865
868
  onClick: a[0] ||= (e) => n("cancel")
866
- }, C(x(r).snapshotPreview.cancel), 1), b("button", {
869
+ }, d(h(r).snapshotPreview.cancel), 1), x("button", {
867
870
  class: "tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
868
871
  onClick: a[1] ||= (e) => n("confirm")
869
- }, C(x(r).snapshotPreview.restore), 1)])])) : m("", !0);
872
+ }, d(h(r).snapshotPreview.restore), 1)])])) : m("", !0);
870
873
  }
871
874
  }), Tt = {
872
875
  key: 0,
@@ -882,76 +885,78 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
882
885
  __name: "CollabUndoToast",
883
886
  props: { visible: { type: Boolean } },
884
887
  setup(e) {
885
- let { t } = I();
886
- return (n, r) => e.visible ? (i(), p("div", Tt, C(x(t).history.collabWarning), 1)) : m("", !0);
888
+ let { t } = R();
889
+ return (n, r) => e.visible ? (i(), p("div", Tt, d(h(t).history.collabWarning), 1)) : m("", !0);
887
890
  }
888
- }), Dt = ["data-tpl-theme"], Ot = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, kt = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, At = ["aria-label"], jt = /* @__PURE__ */ me(/* @__PURE__ */ E({
891
+ }), Dt = ["data-tpl-theme"], Ot = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, kt = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, At = ["aria-label"], jt = /* @__PURE__ */ ue(/* @__PURE__ */ E({
889
892
  __name: "CloudEditor",
890
893
  props: {
891
894
  config: {},
892
895
  translations: {},
893
896
  cloudTranslations: {},
894
- fontsManager: {}
897
+ fontsManager: {},
898
+ shadowRoot: {}
895
899
  },
896
900
  emits: ["ready"],
897
901
  setup(e, { expose: r, emit: o }) {
898
902
  let l = e;
899
- a(B, l.cloudTranslations);
900
- let d = o, f = c(null), g = Fe({
903
+ a(N, l.cloudTranslations);
904
+ let u = o, f = c(null), _ = Fe({
901
905
  config: l.config,
902
906
  translations: l.translations,
903
907
  fontsManager: l.fontsManager,
904
- emit: d,
905
- getCommentsSidebar: () => f.value ? { filterByBlock: f.value.filterCommentsByBlock } : null
906
- }), { isInitializing: w, isAuthReady: E, initError: O, planConfigInstance: k, websocket: A, collaboration: j, isCollaborationEnabled: M, editor: N, core: P, featureFlags: F, mediaLib: ee, exporter: I, testEmail: L, commentsInstance: te, savedModulesHeadless: R, panelState: z, snapshotPreview: V, collabWarning: ne, showSaveModuleDialog: H, showModuleBrowserModal: U, saveModulePreSelectedBlockId: W, setThemeOverrides: K, setUiTheme: re } = g;
907
- async function ie(e) {
908
+ emit: u,
909
+ getCommentsSidebar: () => f.value ? { filterByBlock: f.value.filterCommentsByBlock } : null,
910
+ editorRoot: l.shadowRoot
911
+ }), { isInitializing: w, isAuthReady: E, initError: O, planConfigInstance: k, websocket: A, collaboration: j, isCollaborationEnabled: M, editor: P, core: F, featureFlags: I, mediaLib: L, exporter: R, testEmail: z, commentsInstance: ee, savedModulesHeadless: te, panelState: B, snapshotPreview: V, collabWarning: H, showSaveModuleDialog: U, showModuleBrowserModal: W, saveModulePreSelectedBlockId: G, setThemeOverrides: K, setUiTheme: q } = _;
912
+ async function ne(e) {
908
913
  try {
909
- await L.sendTestEmail(e), z.testEmailModalOpen.value = !1;
914
+ await z.sendTestEmail(e), B.testEmailModalOpen.value = !1;
910
915
  } catch {}
911
916
  }
912
- function q(e, t) {
917
+ function re(e, t) {
913
918
  for (let n = 0; n < e.content.length; n++) {
914
- let r = G(e.content[n]), i = t === void 0 ? void 0 : t + n;
915
- N.addBlock(r, void 0, void 0, i);
919
+ let r = ge(e.content[n]), i = t === void 0 ? void 0 : t + n;
920
+ P.addBlock(r, void 0, void 0, i);
916
921
  }
917
- U.value = !1;
922
+ W.value = !1;
918
923
  }
919
924
  let J = Le({
920
925
  config: l.config,
921
- editor: N,
926
+ editor: P,
922
927
  websocket: A,
923
928
  planConfigInstance: k,
924
929
  snapshotPreview: V,
925
- core: P,
926
- exporter: I,
927
- featureFlags: F,
928
- isDestroyed: g.isDestroyed
930
+ core: F,
931
+ exporter: R,
932
+ featureFlags: I,
933
+ isDestroyed: _.isDestroyed
929
934
  }), Y = Re({
930
- issues: P.accessibilityLint ? P.accessibilityLint.issues : c([]),
935
+ issues: F.accessibilityLint ? F.accessibilityLint.issues : c([]),
931
936
  planConfig: k.config
932
937
  });
933
938
  async function X() {
934
939
  await Y.tryRunSave(() => J.saveTemplate().catch((e) => l.config.onError?.(e)));
935
940
  }
936
- return g.onSaveHook.value = X, t(() => {
937
- g.initialize();
938
- }), h(() => {
939
- g.destroy();
941
+ return _.onSaveHook.value = X, t(() => {
942
+ _.initialize();
943
+ }), g(() => {
944
+ _.destroy();
940
945
  }), r({
941
- getContent: () => N.content.value,
942
- setContent: (e) => N.setContent(e),
943
- setTheme: re,
946
+ getContent: () => P.content.value,
947
+ setContent: (e) => P.setContent(e),
948
+ setTheme: q,
944
949
  setThemeOverrides: K,
945
950
  create: J.createTemplate,
946
951
  load: J.loadTemplate,
947
952
  save: J.saveTemplate,
948
- sendTestEmail: L.sendTestEmail
953
+ sendTestEmail: z.sendTestEmail
949
954
  }), (t, r) => (i(), p("div", {
950
- class: u(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": x(N).state.darkMode }]),
951
- "data-tpl-theme": x(P).resolvedTheme.value,
952
- style: y(x(P).themeStyles.value)
955
+ class: b(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": h(P).state.darkMode }]),
956
+ "data-tpl-theme": h(F).resolvedTheme.value,
957
+ style: C(h(F).themeStyles.value)
953
958
  }, [
954
- D(v, {
959
+ D(y, {
955
960
  "enter-active-class": "tpl:transition-opacity tpl:duration-200",
956
961
  "enter-from-class": "tpl:opacity-100",
957
962
  "enter-to-class": "tpl:opacity-100",
@@ -959,10 +964,10 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
959
964
  "leave-from-class": "tpl:opacity-100",
960
965
  "leave-to-class": "tpl:opacity-0"
961
966
  }, {
962
- default: s(() => [D(mt, { visible: x(w) || x(N).state.isLoading }, null, 8, ["visible"])]),
967
+ default: s(() => [D(mt, { visible: h(w) || h(P).state.isLoading }, null, 8, ["visible"])]),
963
968
  _: 1
964
969
  }),
965
- D(v, {
970
+ D(y, {
966
971
  "enter-active-class": "tpl:transition-opacity tpl:duration-200",
967
972
  "enter-from-class": "tpl:opacity-0",
968
973
  "enter-to-class": "tpl:opacity-100",
@@ -971,9 +976,9 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
971
976
  "leave-to-class": "tpl:opacity-0"
972
977
  }, {
973
978
  default: s(() => [D(bt, {
974
- error: x(O),
975
- visible: !!x(O) && !x(w),
976
- onRetry: x(g).initialize
979
+ error: h(O),
980
+ visible: !!h(O) && !h(w),
981
+ onRetry: h(_).initialize
977
982
  }, null, 8, [
978
983
  "error",
979
984
  "visible",
@@ -982,18 +987,18 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
982
987
  _: 1
983
988
  }),
984
989
  D(lt, {
985
- editor: x(N),
986
- core: x(P),
987
- "feature-flags": x(F),
988
- "panel-state": x(z),
989
- "snapshot-preview": x(V),
990
- "comments-instance": x(te),
991
- "test-email": x(L),
992
- websocket: x(A),
993
- collaboration: x(j),
994
- "is-collaboration-enabled": x(M),
995
- "is-saving": x(N).state.isSaving || x(F).isSaveExporting.value,
996
- "is-save-disabled": x(N).state.isSaving || x(F).isSaveExporting.value || !x(N).state.isDirty,
990
+ editor: h(P),
991
+ core: h(F),
992
+ "feature-flags": h(I),
993
+ "panel-state": h(B),
994
+ "snapshot-preview": h(V),
995
+ "comments-instance": h(ee),
996
+ "test-email": h(z),
997
+ websocket: h(A),
998
+ collaboration: h(j),
999
+ "is-collaboration-enabled": h(M),
1000
+ "is-saving": h(P).state.isSaving || h(I).isSaveExporting.value,
1001
+ "is-save-disabled": h(P).state.isSaving || h(I).isSaveExporting.value || !h(P).state.isDirty,
997
1002
  onSave: X
998
1003
  }, null, 8, [
999
1004
  "editor",
@@ -1010,10 +1015,10 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1010
1015
  "is-save-disabled"
1011
1016
  ]),
1012
1017
  D(Je, {
1013
- open: x(Y).modalOpen.value,
1014
- issues: x(Y).blockingIssues.value,
1015
- onCancel: x(Y).cancel,
1016
- onConfirm: x(Y).confirmAndSave
1018
+ open: h(Y).modalOpen.value,
1019
+ issues: h(Y).blockingIssues.value,
1020
+ onCancel: h(Y).cancel,
1021
+ onConfirm: h(Y).confirmAndSave
1017
1022
  }, null, 8, [
1018
1023
  "open",
1019
1024
  "issues",
@@ -1021,15 +1026,15 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1021
1026
  "onConfirm"
1022
1027
  ]),
1023
1028
  D(wt, {
1024
- visible: x(V).isPreviewingSnapshot.value,
1025
- onCancel: x(V).cancelPreview,
1026
- onConfirm: x(V).confirmRestoreSnapshot
1029
+ visible: h(V).isPreviewingSnapshot.value,
1030
+ onCancel: h(V).cancelPreview,
1031
+ onConfirm: h(V).confirmRestoreSnapshot
1027
1032
  }, null, 8, [
1028
1033
  "visible",
1029
1034
  "onCancel",
1030
1035
  "onConfirm"
1031
1036
  ]),
1032
- D(v, {
1037
+ D(y, {
1033
1038
  "enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
1034
1039
  "enter-from-class": "tpl:translate-y-[-8px] tpl:opacity-0",
1035
1040
  "enter-to-class": "tpl:translate-y-0 tpl:opacity-100",
@@ -1037,18 +1042,18 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1037
1042
  "leave-from-class": "tpl:translate-y-0 tpl:opacity-100",
1038
1043
  "leave-to-class": "tpl:translate-y-[-8px] tpl:opacity-0"
1039
1044
  }, {
1040
- default: s(() => [D(Et, { visible: x(ne).collabUndoWarningVisible.value }, null, 8, ["visible"])]),
1045
+ default: s(() => [D(Et, { visible: h(H).collabUndoWarningVisible.value }, null, 8, ["visible"])]),
1041
1046
  _: 1
1042
1047
  }),
1043
- n(D(Ee, null, null, 512), [[S, !x(N).state.previewMode]]),
1044
- b("div", {
1045
- class: u(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [x(N).state.previewMode ? "tpl:left-0 tpl:right-0" : x(z).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]", x(V).isPreviewingSnapshot.value ? "tpl:top-[104px]" : "tpl:top-14"]]),
1048
+ n(D(Ee, null, null, 512), [[S, !h(P).state.previewMode]]),
1049
+ x("div", {
1050
+ class: b(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [h(P).state.previewMode ? "tpl:left-0 tpl:right-0" : h(B).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]", h(V).isPreviewingSnapshot.value ? "tpl:top-[104px]" : "tpl:top-14"]]),
1046
1051
  style: {
1047
1052
  transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",
1048
1053
  "background-color": "var(--tpl-canvas-bg)"
1049
1054
  }
1050
- }, [b("div", Ot, [D(v, { name: "tpl-restore-btn" }, {
1051
- default: s(() => [x(P).conditionPreview.hasHiddenBlocks.value ? (i(), p("button", {
1055
+ }, [x("div", Ot, [D(y, { name: "tpl-restore-btn" }, {
1056
+ default: s(() => [h(F).conditionPreview.hasHiddenBlocks.value ? (i(), p("button", {
1052
1057
  key: 0,
1053
1058
  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",
1054
1059
  style: {
@@ -1057,22 +1062,22 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1057
1062
  "border-color": "var(--tpl-warning)",
1058
1063
  "backdrop-filter": "blur(8px)"
1059
1064
  },
1060
- onClick: r[0] ||= (e) => x(P).conditionPreview.reset()
1061
- }, [D(x(be), {
1065
+ onClick: r[0] ||= (e) => h(F).conditionPreview.reset()
1066
+ }, [D(h(be), {
1062
1067
  size: 13,
1063
1068
  "stroke-width": 2
1064
- }), T(" " + C(x(P).t.blockSettings.restoreHiddenBlocks), 1)])) : m("", !0)]),
1069
+ }), T(" " + d(h(F).t.blockSettings.restoreHiddenBlocks), 1)])) : m("", !0)]),
1065
1070
  _: 1
1066
- })]), b("main", kt, [D(Oe, {
1067
- viewport: x(N).state.viewport,
1068
- content: x(N).content.value,
1069
- "selected-block-id": x(N).state.selectedBlockId,
1070
- "dark-mode": x(N).state.darkMode,
1071
- "preview-mode": x(N).state.previewMode,
1072
- "locked-blocks": x(j)?.lockedBlocks.value ?? void 0,
1073
- onSelectBlock: x(N).selectBlock,
1074
- onOpenAiChat: r[1] ||= (e) => x(z).aiChatOpen.value = !0,
1075
- onOpenDesignReference: r[2] ||= (e) => x(z).designReferenceOpen.value = !0
1071
+ })]), x("main", kt, [D(Oe, {
1072
+ viewport: h(P).state.viewport,
1073
+ content: h(P).content.value,
1074
+ "selected-block-id": h(P).state.selectedBlockId,
1075
+ "dark-mode": h(P).state.darkMode,
1076
+ "preview-mode": h(P).state.previewMode,
1077
+ "locked-blocks": h(j)?.lockedBlocks.value ?? void 0,
1078
+ onSelectBlock: h(P).selectBlock,
1079
+ onOpenAiChat: r[1] ||= (e) => h(B).aiChatOpen.value = !0,
1080
+ onOpenDesignReference: r[2] ||= (e) => h(B).designReferenceOpen.value = !0
1076
1081
  }, null, 8, [
1077
1082
  "viewport",
1078
1083
  "content",
@@ -1082,51 +1087,51 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1082
1087
  "locked-blocks",
1083
1088
  "onSelectBlock"
1084
1089
  ])])], 2),
1085
- e.config.branding !== !1 && !x(F).isWhiteLabeled.value ? (i(), _(ke, {
1090
+ e.config.branding !== !1 && !h(I).isWhiteLabeled.value ? (i(), v(ke, {
1086
1091
  key: 0,
1087
- "position-class": [x(N).state.previewMode ? "tpl:left-0 tpl:right-0" : x(z).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]"]
1092
+ "position-class": [h(P).state.previewMode ? "tpl:left-0 tpl:right-0" : h(B).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]"]
1088
1093
  }, null, 8, ["position-class"])) : m("", !0),
1089
- b("div", {
1094
+ x("div", {
1090
1095
  class: "tpl-sr-only",
1091
1096
  role: "status",
1092
1097
  "aria-live": "polite",
1093
1098
  "aria-atomic": "true",
1094
- "aria-label": x(P).t.landmarks.reorderAnnouncements
1095
- }, C(x(P).keyboardReorder.announcement.value), 9, At),
1099
+ "aria-label": h(F).t.landmarks.reorderAnnouncements
1100
+ }, d(h(F).keyboardReorder.announcement.value), 9, At),
1096
1101
  n(D(Se, {
1097
- "selected-block": x(N).selectedBlock.value,
1098
- settings: x(N).content.value.settings,
1099
- "shifted-left": x(z).rightPanelOpen.value,
1100
- onUpdateBlock: r[3] ||= (e) => x(N).updateBlock(x(N).selectedBlock.value.id, e),
1101
- onDeleteBlock: r[4] ||= (e) => x(P).blockActions.deleteBlock(x(N).selectedBlock.value.id),
1102
- onDuplicateBlock: r[5] ||= (e) => x(P).blockActions.duplicateBlock(x(N).selectedBlock.value),
1103
- onUpdateSettings: x(N).updateSettings
1102
+ "selected-block": h(P).selectedBlock.value,
1103
+ settings: h(P).content.value.settings,
1104
+ "shifted-left": h(B).rightPanelOpen.value,
1105
+ onUpdateBlock: r[3] ||= (e) => h(P).updateBlock(h(P).selectedBlock.value.id, e),
1106
+ onDeleteBlock: r[4] ||= (e) => h(F).blockActions.deleteBlock(h(P).selectedBlock.value.id),
1107
+ onDuplicateBlock: r[5] ||= (e) => h(F).blockActions.duplicateBlock(h(P).selectedBlock.value),
1108
+ onUpdateSettings: h(P).updateSettings
1104
1109
  }, null, 8, [
1105
1110
  "selected-block",
1106
1111
  "settings",
1107
1112
  "shifted-left",
1108
1113
  "onUpdateSettings"
1109
- ]), [[S, !x(N).state.previewMode]]),
1110
- !x(w) && x(E) ? (i(), _(ut, {
1114
+ ]), [[S, !h(P).state.previewMode]]),
1115
+ !h(w) && h(E) ? (i(), v(ut, {
1111
1116
  key: 1,
1112
1117
  ref_key: "cloudPanelsRef",
1113
1118
  ref: f,
1114
1119
  config: l.config,
1115
- editor: x(N),
1116
- core: x(P),
1117
- "panel-state": x(z),
1118
- "plan-config-instance": x(k),
1119
- "test-email": x(L),
1120
- "media-lib": x(ee),
1121
- "saved-modules-headless": x(R),
1122
- "show-save-module-dialog": x(H),
1123
- "save-module-pre-selected-block-id": x(W),
1124
- "show-module-browser-modal": x(U),
1125
- "onUpdate:showSaveModuleDialog": r[6] ||= (e) => H.value = e,
1126
- "onUpdate:saveModulePreSelectedBlockId": r[7] ||= (e) => W.value = e,
1127
- "onUpdate:showModuleBrowserModal": r[8] ||= (e) => U.value = e,
1128
- onSendTestEmail: ie,
1129
- onModuleInsert: q
1120
+ editor: h(P),
1121
+ core: h(F),
1122
+ "panel-state": h(B),
1123
+ "plan-config-instance": h(k),
1124
+ "test-email": h(z),
1125
+ "media-lib": h(L),
1126
+ "saved-modules-headless": h(te),
1127
+ "show-save-module-dialog": h(U),
1128
+ "save-module-pre-selected-block-id": h(G),
1129
+ "show-module-browser-modal": h(W),
1130
+ "onUpdate:showSaveModuleDialog": r[6] ||= (e) => U.value = e,
1131
+ "onUpdate:saveModulePreSelectedBlockId": r[7] ||= (e) => G.value = e,
1132
+ "onUpdate:showModuleBrowserModal": r[8] ||= (e) => W.value = e,
1133
+ onSendTestEmail: ne,
1134
+ onModuleInsert: re
1130
1135
  }, null, 8, [
1131
1136
  "config",
1132
1137
  "editor",
@@ -1139,11 +1144,15 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1139
1144
  "show-save-module-dialog",
1140
1145
  "save-module-pre-selected-block-id",
1141
1146
  "show-module-browser-modal"
1142
- ])) : m("", !0)
1147
+ ])) : m("", !0),
1148
+ x("div", {
1149
+ ref: (e) => h(F).popoverRoot.value = e,
1150
+ class: "tpl-popover-root"
1151
+ }, null, 512)
1143
1152
  ], 14, Dt));
1144
1153
  }
1145
- }), [["__scopeId", "data-v-b332971f"]]);
1154
+ }), [["__scopeId", "data-v-c00ce9ab"]]);
1146
1155
  //#endregion
1147
1156
  export { jt as default };
1148
1157
 
1149
- //# sourceMappingURL=CloudEditor-CmR17piA.js.map
1158
+ //# sourceMappingURL=CloudEditor-BGiN3M_f.js.map