@templatical/editor 0.0.2 → 0.0.3

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 (59) hide show
  1. package/dist/{AiChatSidebar-XBj5Rw2l.js → AiChatSidebar-busJk9hm.js} +1 -1
  2. package/dist/{AiFeatureMenu-my1mZ9DL.js → AiFeatureMenu-DLGv_-pj.js} +3 -3
  3. package/dist/{CloudEditor-BVjgKwq3.js → CloudEditor-BDnHd6Um.js} +176 -197
  4. package/dist/{CollaboratorBar-BZq_Gv38.js → CollaboratorBar-Dv3l52vC.js} +2 -2
  5. package/dist/{CommentsSidebar-D9oxqO6l.js → CommentsSidebar-4tjp0VU5.js} +2 -2
  6. package/dist/{DesignReferenceSidebar-CyHq4SWt.js → DesignReferenceSidebar-CmwXvltV.js} +55 -54
  7. package/dist/{ModuleBrowserModal-Cus2Hdwl.js → ModuleBrowserModal-lrk3Fr0H.js} +6 -6
  8. package/dist/{ModulePreviewCanvas-DaByXKY_.js → ModulePreviewCanvas-BcBJLnwL.js} +3 -3
  9. package/dist/ParagraphEditor-DH8cSC6m.js +625 -0
  10. package/dist/{RichTextEditorContent-BRpjJ6SV.js → RichTextEditorContent-CQqodi7p.js} +3 -3
  11. package/dist/{SaveModuleDialog-BIZBQrd8.js → SaveModuleDialog-Bmzi72td.js} +4 -4
  12. package/dist/{SnapshotHistory-Ds1-QNbx.js → SnapshotHistory-AEgi9Xsn.js} +2 -2
  13. package/dist/{TemplateScoringPanel-C8XSk_Ys.js → TemplateScoringPanel-CTgMtc0-.js} +2 -2
  14. package/dist/{TestEmailModal-CCVfaFgV.js → TestEmailModal-Dpq1is9S.js} +3 -3
  15. package/dist/{TitleEditor-V4qaEULF.js → TitleEditor-CLcDdcWI.js} +7 -7
  16. package/dist/{TplModal-LT3FXlgs.js → TplModal-CGzRjR96.js} +2 -2
  17. package/dist/{blockTypeIcons-BujoY5Dl.js → blockTypeIcons-BpPTqcok.js} +1 -1
  18. package/dist/cdn/chunks/ParagraphEditor-CCtWbGDv.js +3 -0
  19. package/dist/cdn/chunks/ParagraphEditor-CCtWbGDv.js.map +1 -0
  20. package/dist/cdn/chunks/RichTextEditorContent-BUD9veXd.js +2 -0
  21. package/dist/cdn/chunks/RichTextEditorContent-BUD9veXd.js.map +1 -0
  22. package/dist/cdn/chunks/TitleEditor-e_UTyxjd.js +3 -0
  23. package/dist/cdn/chunks/TitleEditor-e_UTyxjd.js.map +1 -0
  24. package/dist/cdn/chunks/{extensions-BfjbWqOx.js → extensions-ea_ewKUl.js} +2 -2
  25. package/dist/cdn/chunks/{extensions-BfjbWqOx.js.map → extensions-ea_ewKUl.js.map} +1 -1
  26. package/dist/cdn/chunks/styleConstants-CNejCb-L.js +2 -0
  27. package/dist/cdn/chunks/{styleConstants-UTJ94gco.js.map → styleConstants-CNejCb-L.js.map} +1 -1
  28. package/dist/cdn/chunks/useEditorCore-CwuxQuvh.js +2 -0
  29. package/dist/cdn/chunks/useEditorCore-CwuxQuvh.js.map +1 -0
  30. package/dist/cdn/chunks/useMergeTag-DVOz1v9p.js +2 -0
  31. package/dist/cdn/chunks/useMergeTag-DVOz1v9p.js.map +1 -0
  32. package/dist/cdn/editor.js +1 -1
  33. package/dist/cdn/editor.js.map +1 -1
  34. package/dist/{dist-DNjZKe2Z.js → dist-DmpMJbmZ.js} +1 -1
  35. package/dist/{extensions-BA4NshZQ.js → extensions-CKM99njP.js} +3 -3
  36. package/dist/{i18n-ikyi28RU.js → i18n-CJsFtdbZ.js} +1 -1
  37. package/dist/keys-Dwa2PmdD.js +10 -0
  38. package/dist/{styleConstants-CgtFM9hQ.js → styleConstants-D4SOZGBV.js} +53 -2
  39. package/dist/{styles-hQgJKM4i.js → styles-DSw1VNU3.js} +592 -592
  40. package/dist/templatical-editor.css +1 -1
  41. package/dist/templatical-editor.js +5 -5
  42. package/dist/templatical-editor.umd.cjs +59 -59
  43. package/dist/{useEditorCore-DVp5qmtC.js → useEditorCore-Cc4RCwWq.js} +907 -903
  44. package/dist/{useI18n-DzH4KXDk.js → useI18n-DUirdXEX.js} +2 -2
  45. package/dist/{useMergeTag-D9zQVE-e.js → useMergeTag-DVnlvPYJ.js} +2 -2
  46. package/package.json +2 -2
  47. package/dist/ParagraphEditor-BSyk5B6S.js +0 -670
  48. package/dist/cdn/chunks/ParagraphEditor-BkJQO-ZW.js +0 -3
  49. package/dist/cdn/chunks/ParagraphEditor-BkJQO-ZW.js.map +0 -1
  50. package/dist/cdn/chunks/RichTextEditorContent-UGQorJm_.js +0 -2
  51. package/dist/cdn/chunks/RichTextEditorContent-UGQorJm_.js.map +0 -1
  52. package/dist/cdn/chunks/TitleEditor-CC3Adjai.js +0 -3
  53. package/dist/cdn/chunks/TitleEditor-CC3Adjai.js.map +0 -1
  54. package/dist/cdn/chunks/styleConstants-UTJ94gco.js +0 -2
  55. package/dist/cdn/chunks/useEditorCore-DRhPKq_z.js +0 -2
  56. package/dist/cdn/chunks/useEditorCore-DRhPKq_z.js.map +0 -1
  57. package/dist/cdn/chunks/useMergeTag-CBSlcqnk.js +0 -2
  58. package/dist/cdn/chunks/useMergeTag-CBSlcqnk.js.map +0 -1
  59. package/dist/keys-8B5MFafK.js +0 -4
@@ -1,19 +1,19 @@
1
- import { S as e, t } from "./useEditorCore-DVp5qmtC.js";
1
+ import { S as e, t } from "./useEditorCore-Cc4RCwWq.js";
2
2
  import { t as n } from "./timeouts-CmBrLeZA.js";
3
3
  import { s as r, t as i } from "./dist-CG-vEqSU.js";
4
- import { _ as a, b as o, c as s, r as c, s as l, t as u, y as d } from "./keys-8B5MFafK.js";
5
- import { t as f } from "./useI18n-DzH4KXDk.js";
4
+ import { _ as a, b as o, c as s, r as c, s as l, t as u, y as d } from "./keys-Dwa2PmdD.js";
5
+ import { t as f } from "./useI18n-DUirdXEX.js";
6
6
  import { n as p, t as m } from "./_plugin-vue_export-helper-B1-bu7yR.js";
7
7
  import { t as h } from "./check-B7kDuZmP.js";
8
8
  import { t as ee } from "./circle-alert-E2vYPs5r.js";
9
- import { a as te, i as ne, n as re, o as ie, r as ae, s as oe, t as se } from "./styles-hQgJKM4i.js";
9
+ import { a as te, i as ne, n as re, o as ie, r as ae, s as oe, t as se } from "./styles-DSw1VNU3.js";
10
10
  import { t as ce } from "./clock-lWIIQA3C.js";
11
11
  import { t as le } from "./loader-circle-BTQQxC3l.js";
12
12
  import { t as ue } from "./message-circle-Blgm6V_h.js";
13
13
  import { t as de } from "./send-C0ltAQrv.js";
14
14
  import { t as fe } from "./sparkles-KhBCGlqB.js";
15
- import { s as pe } from "./styleConstants-CgtFM9hQ.js";
16
- import { Fragment as me, Transition as g, computed as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createStaticVNode as S, createTextVNode as C, createVNode as w, defineAsyncComponent as T, defineComponent as E, nextTick as he, normalizeClass as D, normalizeStyle as ge, onMounted as _e, onScopeDispose as ve, onUnmounted as ye, openBlock as O, provide as k, ref as A, renderList as be, shallowRef as xe, toDisplayString as j, unref as M, vShow as Se, watch as Ce, withCtx as N, withDirectives as we, withModifiers as Te } from "vue";
15
+ import { u as g } from "./styleConstants-D4SOZGBV.js";
16
+ import { Fragment as pe, Transition as _, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createStaticVNode as me, createTextVNode as C, createVNode as w, defineAsyncComponent as T, defineComponent as E, nextTick as he, normalizeClass as D, normalizeStyle as ge, onMounted as _e, onScopeDispose as ve, onUnmounted as ye, openBlock as O, provide as k, ref as A, renderList as be, shallowRef as xe, toDisplayString as j, unref as M, vShow as Se, watch as Ce, withCtx as N, withDirectives as we, withModifiers as Te } from "vue";
17
17
  import { cloneBlock as Ee, isCustomBlock as De } from "@templatical/types";
18
18
  import { AuthManager as Oe, performHealthCheck as ke, resolveWebSocketConfig as Ae, useAiConfig as je, useCollaboration as Me, useCollaborationBroadcast as Ne, useCommentListener as Pe, useComments as Fe, useEditor as Ie, useExport as Le, useMcpListener as Re, usePlanConfig as ze, useSavedModules as Be, useSnapshotHistory as Ve, useTemplateScoring as He, useTestEmail as Ue, useWebSocket as We } from "@templatical/core/cloud";
19
19
  var Ge = p("save", [
@@ -33,7 +33,7 @@ var Ge = p("save", [
33
33
  //#endregion
34
34
  //#region src/cloud/composables/useSnapshotPreview.ts
35
35
  function Ke(e) {
36
- let { authManager: t, editor: n, history: r, conditionPreview: i, autoSave: a, onError: o } = e, s = xe(null), c = A(null), l = A(null), u = _(() => c.value !== null), d = _(() => s.value?.snapshots.value ?? []), f = _(() => s.value?.isLoading.value ?? !1), p = _(() => s.value?.isRestoring.value ?? !1);
36
+ let { authManager: t, editor: n, history: r, conditionPreview: i, autoSave: a, onError: o } = e, s = xe(null), c = A(null), l = A(null), u = v(() => c.value !== null), d = v(() => s.value?.snapshots.value ?? []), f = v(() => s.value?.isLoading.value ?? !1), p = v(() => s.value?.isRestoring.value ?? !1);
37
37
  function m() {
38
38
  n.state.template?.id && !s.value && (s.value = Ve({
39
39
  authManager: t,
@@ -84,22 +84,22 @@ function Ke(e) {
84
84
  //#endregion
85
85
  //#region src/cloud/composables/useCloudPanelState.ts
86
86
  function qe() {
87
- let e = A(null), t = _({
87
+ let e = A(null), t = v({
88
88
  get: () => e.value === "ai-chat",
89
89
  set: (t) => e.value = t ? "ai-chat" : null
90
- }), n = _({
90
+ }), n = v({
91
91
  get: () => e.value === "scoring",
92
92
  set: (t) => e.value = t ? "scoring" : null
93
- }), r = _({
93
+ }), r = v({
94
94
  get: () => e.value === "design-reference",
95
95
  set: (t) => e.value = t ? "design-reference" : null
96
- }), a = _({
96
+ }), a = v({
97
97
  get: () => e.value === "comments",
98
98
  set: (t) => e.value = t ? "comments" : null
99
- }), o = A(!1), s = A(!1), c = A(void 0), l = A(!1), u = A(null), d = _(() => e.value !== null), f = _(() => {
99
+ }), o = A(!1), s = A(!1), c = A(void 0), l = A(!1), u = A(null), d = v(() => e.value !== null), f = v(() => {
100
100
  let t = e.value;
101
101
  return t === "ai-chat" || t === "design-reference" || t === "scoring" ? t : null;
102
- }), p = _(() => l.value || e.value === "ai-chat" || e.value === "design-reference" || e.value === "scoring");
102
+ }), p = v(() => l.value || e.value === "ai-chat" || e.value === "design-reference" || e.value === "scoring");
103
103
  function m() {
104
104
  l.value = !l.value;
105
105
  }
@@ -143,7 +143,7 @@ function Je(e) {
143
143
  //#endregion
144
144
  //#region src/cloud/composables/useCloudFeatureFlags.ts
145
145
  function Ye(e) {
146
- let { planConfigInstance: t, aiConfig: n, editor: i } = e, a = _(() => t.hasFeature("ai_generation") && n.hasAnyMenuFeature.value), o = _(() => t.hasFeature("test_email")), s = _(() => !!i.state.template?.id), c = _(() => t.hasFeature("white_label")), l = _(() => t.config.value?.limits.max_templates ?? null), u = _(() => t.config.value?.template_count ?? 0), d = A(!1), f = A("idle"), p = A(""), { start: m } = r(() => {
146
+ let { planConfigInstance: t, aiConfig: n, editor: i } = e, a = v(() => t.hasFeature("ai_generation") && n.hasAnyMenuFeature.value), o = v(() => t.hasFeature("test_email")), s = v(() => !!i.state.template?.id), c = v(() => t.hasFeature("white_label")), l = v(() => t.config.value?.limits.max_templates ?? null), u = v(() => t.config.value?.template_count ?? 0), d = A(!1), f = A("idle"), p = A(""), { start: m } = r(() => {
147
147
  f.value = "idle";
148
148
  }, 3e3, { immediate: !1 });
149
149
  return {
@@ -195,51 +195,24 @@ function Xe(e) {
195
195
  };
196
196
  }
197
197
  //#endregion
198
- //#region src/cloud/composables/useSavedModules.ts
199
- function Ze(e) {
200
- let t = A(!1), n = A(null), r = A(!1);
201
- function i(e) {
202
- n.value = e ?? null, t.value = !0;
203
- }
204
- function a() {
205
- t.value = !1, n.value = null;
206
- }
207
- function o() {
208
- r.value = !0;
209
- }
210
- function s() {
211
- r.value = !1;
212
- }
213
- return {
214
- headless: e,
215
- showSaveDialog: t,
216
- preSelectedBlockId: n,
217
- openSaveDialog: i,
218
- closeSaveDialog: a,
219
- showBrowserModal: r,
220
- openBrowserModal: o,
221
- closeBrowserModal: s
222
- };
223
- }
224
- //#endregion
225
198
  //#region src/cloud/components/CloudLoadingOverlay.vue?vue&type=script&setup=true&lang.ts
226
- var Qe = {
199
+ var Ze = {
227
200
  key: 0,
228
201
  class: "tpl-loading tpl:absolute tpl:inset-0 tpl:z-overlay tpl:flex tpl:flex-col tpl:bg-[var(--tpl-bg)]"
229
- }, P = { class: "tpl:flex tpl:flex-1 tpl:overflow-hidden" }, $e = { 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)]" }, et = /* @__PURE__ */ E({
202
+ }, P = { class: "tpl:flex tpl:flex-1 tpl:overflow-hidden" }, Qe = { 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)]" }, $e = /* @__PURE__ */ E({
230
203
  __name: "CloudLoadingOverlay",
231
204
  props: { visible: { type: Boolean } },
232
205
  setup(e) {
233
- return (t, n) => e.visible ? (O(), b("div", Qe, [n[1] ||= S("<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", P, [x("div", $e, [(O(), b(me, null, be(5, (e) => x("div", {
206
+ return (t, n) => e.visible ? (O(), x("div", Ze, [n[1] ||= me("<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), S("div", P, [S("div", Qe, [(O(), x(pe, null, be(5, (e) => S("div", {
234
207
  key: e,
235
208
  class: "tpl-shimmer tpl:size-7 tpl:rounded-[var(--tpl-radius-sm)]"
236
- })), 64))]), n[0] ||= S("<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)])])) : y("", !0);
209
+ })), 64))]), n[0] ||= me("<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)])])) : b("", !0);
237
210
  }
238
211
  }), F = {
239
212
  key: 0,
240
213
  role: "alert",
241
214
  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)]"
242
- }, I = { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]" }, L = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center" }, R = { class: "tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]" }, z = { class: "tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, tt = /* @__PURE__ */ E({
215
+ }, I = { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]" }, L = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center" }, R = { class: "tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]" }, z = { class: "tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, et = /* @__PURE__ */ E({
243
216
  __name: "CloudErrorOverlay",
244
217
  props: {
245
218
  error: {},
@@ -254,41 +227,41 @@ var Qe = {
254
227
  function a(e) {
255
228
  return "isNotFound" in e && !!e.isNotFound;
256
229
  }
257
- return (t, o) => e.visible && e.error ? (O(), b("div", F, [
258
- x("div", I, [w(M(ee), {
230
+ return (t, o) => e.visible && e.error ? (O(), x("div", F, [
231
+ S("div", I, [w(M(ee), {
259
232
  size: 32,
260
233
  "stroke-width": 1.5,
261
234
  class: "tpl:text-[var(--tpl-danger)]"
262
235
  })]),
263
- x("div", L, [x("h2", R, j(M(r).error.title), 1), x("p", z, j(i(e.error)), 1)]),
264
- a(e.error) ? y("", !0) : (O(), b("button", {
236
+ S("div", L, [S("h2", R, j(M(r).error.title), 1), S("p", z, j(i(e.error)), 1)]),
237
+ a(e.error) ? b("", !0) : (O(), x("button", {
265
238
  key: 0,
266
239
  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)]",
267
240
  onClick: o[0] ||= (e) => n("retry")
268
241
  }, j(M(r).error.retry), 1))
269
- ])) : y("", !0);
242
+ ])) : b("", !0);
270
243
  }
271
244
  }), B = {
272
245
  key: 0,
273
246
  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)]"
274
- }, V = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-text)]" }, H = { class: "tpl:flex tpl:items-center tpl:gap-2" }, nt = /* @__PURE__ */ E({
247
+ }, V = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-text)]" }, H = { class: "tpl:flex tpl:items-center tpl:gap-2" }, tt = /* @__PURE__ */ E({
275
248
  __name: "SnapshotPreviewBanner",
276
249
  props: { visible: { type: Boolean } },
277
250
  emits: ["cancel", "confirm"],
278
251
  setup(e, { emit: t }) {
279
252
  let n = t, { t: r } = f();
280
- return (t, i) => e.visible ? (O(), b("div", B, [x("div", V, [w(M(ce), {
253
+ return (t, i) => e.visible ? (O(), x("div", B, [S("div", V, [w(M(ce), {
281
254
  size: 18,
282
255
  "stroke-width": 2,
283
256
  class: "tpl:text-[var(--tpl-primary)]"
284
- }), x("span", null, j(M(r).snapshotPreview.message), 1)]), x("div", H, [x("button", {
257
+ }), S("span", null, j(M(r).snapshotPreview.message), 1)]), S("div", H, [S("button", {
285
258
  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)]",
286
259
  style: { "background-color": "transparent" },
287
260
  onClick: i[0] ||= (e) => n("cancel")
288
- }, j(M(r).snapshotPreview.cancel), 1), x("button", {
261
+ }, j(M(r).snapshotPreview.cancel), 1), S("button", {
289
262
  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)]",
290
263
  onClick: i[1] ||= (e) => n("confirm")
291
- }, j(M(r).snapshotPreview.restore), 1)])])) : y("", !0);
264
+ }, j(M(r).snapshotPreview.restore), 1)])])) : b("", !0);
292
265
  }
293
266
  }), U = {
294
267
  key: 0,
@@ -300,14 +273,14 @@ var Qe = {
300
273
  color: "var(--tpl-text)",
301
274
  border: "1px solid var(--tpl-warning)"
302
275
  }
303
- }, rt = /* @__PURE__ */ E({
276
+ }, nt = /* @__PURE__ */ E({
304
277
  __name: "CollabUndoToast",
305
278
  props: { visible: { type: Boolean } },
306
279
  setup(e) {
307
280
  let { t } = f();
308
- return (n, r) => e.visible ? (O(), b("div", U, j(M(t).history.collabWarning), 1)) : y("", !0);
281
+ return (n, r) => e.visible ? (O(), x("div", U, j(M(t).history.collabWarning), 1)) : b("", !0);
309
282
  }
310
- }), it = ["data-tpl-theme"], at = {
283
+ }), rt = ["data-tpl-theme"], it = {
311
284
  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",
312
285
  style: {
313
286
  "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)",
@@ -316,34 +289,34 @@ var Qe = {
316
289
  "box-shadow": "var(--tpl-shadow-md)",
317
290
  "border-bottom": "1px solid var(--tpl-border)"
318
291
  }
319
- }, ot = { class: "tpl-header-left tpl:flex tpl:min-w-[200px] tpl:items-center tpl:gap-3" }, st = {
292
+ }, at = { class: "tpl-header-left tpl:flex tpl:min-w-[200px] tpl:items-center tpl:gap-3" }, ot = {
320
293
  key: 0,
321
294
  class: "tpl-logo tpl:flex tpl:items-center tpl:gap-2.5 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
322
- }, ct = ["src"], lt = { style: { "letter-spacing": "-0.01em" } }, ut = {
295
+ }, st = ["src"], ct = { style: { "letter-spacing": "-0.01em" } }, lt = {
323
296
  key: 1,
324
297
  class: "tpl:text-xs tpl:opacity-60 tpl:text-[var(--tpl-text-muted)]"
325
- }, dt = { class: "tpl-header-center tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, ft = { class: "tpl-header-right tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, pt = ["data-tooltip"], mt = {
298
+ }, ut = { class: "tpl-header-center tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, dt = { class: "tpl-header-right tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, ft = ["data-tooltip"], pt = {
326
299
  key: 1,
327
300
  "aria-live": "polite",
328
301
  class: "tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-success)]"
329
- }, ht = {
302
+ }, mt = {
330
303
  key: 2,
331
304
  "aria-live": "polite",
332
305
  class: "tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
333
- }, gt = ["aria-label", "aria-expanded"], _t = {
306
+ }, ht = ["aria-label", "aria-expanded"], gt = {
334
307
  key: 0,
335
308
  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)]"
336
- }, vt = ["aria-expanded"], yt = {
309
+ }, _t = ["aria-expanded"], vt = {
337
310
  key: 0,
338
311
  class: "tpl:absolute tpl:right-0 tpl:top-full tpl:z-50 tpl:mt-1 tpl:origin-top-right"
339
- }, bt = ["disabled"], xt = ["disabled"], St = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, Ct = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, wt = {
312
+ }, yt = ["disabled"], bt = ["disabled"], xt = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, St = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, Ct = {
340
313
  class: "tpl:pointer-events-auto tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-tl-lg tpl:p-1",
341
314
  style: {
342
315
  "background-color": "color-mix(\n in srgb,\n var(--tpl-canvas-bg) 85%,\n transparent\n )",
343
316
  "backdrop-filter": "blur(8px)",
344
317
  "-webkit-backdrop-filter": "blur(8px)"
345
318
  }
346
- }, Tt = {
319
+ }, wt = {
347
320
  href: "https://github.com/templatical/sdk",
348
321
  target: "_blank",
349
322
  rel: "noopener noreferrer",
@@ -358,7 +331,7 @@ var Qe = {
358
331
  },
359
332
  emits: ["ready"],
360
333
  setup(n, { expose: r, emit: i }) {
361
- let f = T(() => import("./AiChatSidebar-XBj5Rw2l.js")), p = T(() => import("./CommentsSidebar-D9oxqO6l.js")), m = T(() => import("./DesignReferenceSidebar-CyHq4SWt.js")), ce = T(() => import("./TemplateScoringPanel-C8XSk_Ys.js")), S = T(() => import("./TestEmailModal-CCVfaFgV.js")), E = T(() => import("./SaveModuleDialog-BIZBQrd8.js")), ve = T(() => import("./ModuleBrowserModal-Cus2Hdwl.js")), be = T(() => import("./SnapshotHistory-Ds1-QNbx.js")), xe = T(() => import("./CollaboratorBar-BZq_Gv38.js")), Ve = T(() => import("./AiFeatureMenu-my1mZ9DL.js")), Qe = T(async () => (await import("@templatical/media-library")).MediaLibraryModal), P = n, $e = i, F = A(!0), I = A(!1), L = A(null), R = !1, z = new Oe({
334
+ let f = T(() => import("./AiChatSidebar-busJk9hm.js")), p = T(() => import("./CommentsSidebar-4tjp0VU5.js")), m = T(() => import("./DesignReferenceSidebar-CmwXvltV.js")), ce = T(() => import("./TemplateScoringPanel-CTgMtc0-.js")), me = T(() => import("./TestEmailModal-Dpq1is9S.js")), E = T(() => import("./SaveModuleDialog-Bmzi72td.js")), ve = T(() => import("./ModuleBrowserModal-lrk3Fr0H.js")), be = T(() => import("./SnapshotHistory-AEgi9Xsn.js")), xe = T(() => import("./CollaboratorBar-Dv3l52vC.js")), Ve = T(() => import("./AiFeatureMenu-DLGv_-pj.js")), Ze = T(async () => (await import("@templatical/media-library")).MediaLibraryModal), P = n, Qe = i, F = A(!0), I = A(!1), L = A(null), R = !1, z = new Oe({
362
335
  ...P.config.auth,
363
336
  onError: P.config.onError
364
337
  }), B = ze({
@@ -392,7 +365,7 @@ var Qe = {
392
365
  }), Ce(() => W.lockedBlocks.value, (e) => {
393
366
  V.value = e;
394
367
  }, { immediate: !0 }), Ne(H, W));
395
- let Et = _(() => !!P.config.collaboration?.enabled && B.hasFeature("collaboration")), Dt = null, Ot = null, G = t({
368
+ let Tt = v(() => !!P.config.collaboration?.enabled && B.hasFeature("collaboration")), Et = null, Dt = null, G = t({
396
369
  editor: H,
397
370
  config: {
398
371
  uiTheme: P.config.uiTheme,
@@ -403,7 +376,7 @@ var Qe = {
403
376
  displayConditions: P.config.displayConditions,
404
377
  onRequestMedia: null,
405
378
  onSave: () => {
406
- Wt().catch((e) => {
379
+ $().catch((e) => {
407
380
  P.config.onError?.(e);
408
381
  });
409
382
  }
@@ -413,19 +386,19 @@ var Qe = {
413
386
  historyOptions: W ? { isRemoteOperation: () => W._isProcessingRemoteOperation() } : void 0,
414
387
  autoSaveOptions: {
415
388
  onChange: async () => {
416
- H.hasTemplate() && (await H.createSnapshot(), Dt?.snapshotHistoryInstance.value?.loadSnapshots());
389
+ H.hasTemplate() && (await H.createSnapshot(), Et?.snapshotHistoryInstance.value?.loadSnapshots());
417
390
  },
418
391
  debounce: P.config.autoSaveDebounce ?? 5e3,
419
392
  enabled: () => P.config.autoSave !== !1 && B.hasFeature("auto_save")
420
393
  },
421
394
  themeExtraStyles: () => ({ "--tpl-drop-text": `"${P.translations.canvas.dropHere}"` }),
422
- keyboardOptions: { onBeforeUndo: () => Ot?.showCollabUndoWarning() }
423
- }), kt = Je({
424
- isCollaborationEnabled: Et,
395
+ keyboardOptions: { onBeforeUndo: () => Dt?.showCollabUndoWarning() }
396
+ }), Ot = Je({
397
+ isCollaborationEnabled: Tt,
425
398
  getCollaboratorCount: () => W?.collaborators.value.length ?? 0,
426
399
  canUndo: G.history.canUndo
427
400
  });
428
- Ot = kt;
401
+ Dt = Ot;
429
402
  let K = Ke({
430
403
  authManager: z,
431
404
  editor: H,
@@ -434,12 +407,12 @@ var Qe = {
434
407
  autoSave: G.autoSave,
435
408
  onError: P.config.onError
436
409
  });
437
- Dt = K;
438
- let q = qe(), At = je(P.config.ai), J = Ye({
410
+ Et = K;
411
+ let q = qe(), kt = je(P.config.ai), J = Ye({
439
412
  planConfigInstance: B,
440
- aiConfig: At,
413
+ aiConfig: kt,
441
414
  editor: H
442
- }), Y = Xe({
415
+ }), At = Xe({
443
416
  onRequestMedia: P.config.onRequestMedia,
444
417
  mediaLibraryOpen: q.mediaLibraryOpen,
445
418
  mediaLibraryAccept: q.mediaLibraryAccept
@@ -452,7 +425,7 @@ var Qe = {
452
425
  authManager: z,
453
426
  getFontsConfig: () => P.config.fonts,
454
427
  canUseCustomFonts: () => B.hasFeature("custom_fonts")
455
- }), X = Ue({
428
+ }), Y = Ue({
456
429
  authManager: z,
457
430
  getTemplateId: () => H.state.template?.id ?? null,
458
431
  save: () => H.save(),
@@ -460,7 +433,7 @@ var Qe = {
460
433
  onError: P.config.onError,
461
434
  isAuthReady: I,
462
435
  onBeforeTestEmail: P.config.onBeforeTestEmail
463
- }), Z = Fe({
436
+ }), X = Fe({
464
437
  authManager: z,
465
438
  getTemplateId: () => H.state.template?.id ?? null,
466
439
  getSocketId: () => U.getSocketId(),
@@ -470,54 +443,58 @@ var Qe = {
470
443
  hasCommentingFeature: () => P.config.commenting !== !1 && B.hasFeature("commenting")
471
444
  });
472
445
  Pe({
473
- comments: Z,
446
+ comments: X,
474
447
  channel: U.channel
475
448
  });
476
- let Q = Be({
449
+ let Z = Be({
477
450
  authManager: z,
478
451
  onError: P.config.onError
479
- }), $ = Ze(Q), Mt = He({
452
+ }), Mt = A(!1), Nt = A(null), Q = A(!1), Pt = He({
480
453
  authManager: z,
481
454
  getTemplateId: () => H.state.template?.id ?? null
482
455
  });
483
- k(a, Y.handleRequestMedia), k(c, z), k(u, At), k(s, Z), k(d, Q), k(o, Mt), k(l, {
456
+ k(a, At.handleRequestMedia), k(c, z), k(u, kt), k(s, X), k(d, Z), k(o, Pt), k(l, {
484
457
  plan: B,
485
- ai: At,
458
+ ai: kt,
486
459
  comments: {
487
- getBlockCount: (e) => Z.commentCountByBlock.value.get(e) ?? 0,
488
- openForBlock: It
460
+ getBlockCount: (e) => X.commentCountByBlock.value.get(e) ?? 0,
461
+ openForBlock: Rt
489
462
  },
490
463
  savedModules: {
491
- openSaveDialog: (e) => $.openSaveDialog(e),
492
- openBrowser: () => $.openBrowserModal(),
493
- moduleCount: _(() => Q.modules.value.length)
464
+ openSaveDialog: (e) => {
465
+ Nt.value = e ?? null, Mt.value = !0;
466
+ },
467
+ openBrowser: () => {
468
+ Q.value = !0;
469
+ },
470
+ moduleCount: v(() => Z.modules.value.length)
494
471
  }
495
472
  });
496
- function Nt(e) {
473
+ function Ft(e) {
497
474
  B.hasFeature("theme_customization") && (G.themeOverrides.value = e);
498
475
  }
499
- function Pt(e) {
476
+ function It(e) {
500
477
  H.setUiTheme(e);
501
478
  }
502
- let Ft = A(null);
503
- function It(e) {
479
+ let Lt = A(null);
480
+ function Rt(e) {
504
481
  q.commentsOpen.value = !0, he(() => {
505
- Ft.value?.filterByBlock(e);
482
+ Lt.value?.filterByBlock(e);
506
483
  });
507
484
  }
508
- async function Lt(e) {
485
+ async function zt(e) {
509
486
  try {
510
- await X.sendTestEmail(e), q.testEmailModalOpen.value = !1;
487
+ await Y.sendTestEmail(e), q.testEmailModalOpen.value = !1;
511
488
  } catch {}
512
489
  }
513
- function Rt(e, t) {
490
+ function Bt(e, t) {
514
491
  for (let n = 0; n < e.content.length; n++) {
515
492
  let r = Ee(e.content[n]), i = t === void 0 ? void 0 : t + n;
516
493
  H.addBlock(r, void 0, void 0, i);
517
494
  }
518
- $.closeBrowserModal();
495
+ Q.value = !1;
519
496
  }
520
- async function zt(e) {
497
+ async function Vt(e) {
521
498
  let t = async (e) => {
522
499
  if (De(e)) {
523
500
  let t = e;
@@ -534,7 +511,7 @@ var Qe = {
534
511
  };
535
512
  for (let n of e.blocks) await t(n);
536
513
  }
537
- async function Bt() {
514
+ async function Ht() {
538
515
  F.value = !0, L.value = null;
539
516
  try {
540
517
  if (await z.initialize(), R) return;
@@ -544,7 +521,7 @@ var Qe = {
544
521
  if (!e.api.ok) throw Error("Health check failed: API is not reachable");
545
522
  if (!e.auth.ok) throw Error(`Health check failed: authentication error${e.auth.error ? ` - ${e.auth.error}` : ""}`);
546
523
  if (e.websocket.ok || console.warn("[Templatical] WebSocket health check failed:", e.websocket.error ?? "unknown error", "-- real-time features will be disabled."), await B.fetchConfig(), R) return;
547
- P.fontsManager.setCustomFontsEnabled(B.hasFeature("custom_fonts")), P.config.customBlocks?.length && B.hasFeature("custom_blocks") && G.registerCustomBlocks(P.config.customBlocks), P.config.theme && B.hasFeature("theme_customization") && (G.themeOverrides.value = P.config.theme), P.config.modules !== !1 && B.hasFeature("saved_modules") && Q.loadModules(), $e("ready");
524
+ P.fontsManager.setCustomFontsEnabled(B.hasFeature("custom_fonts")), P.config.customBlocks?.length && B.hasFeature("custom_blocks") && G.registerCustomBlocks(P.config.customBlocks), P.config.theme && B.hasFeature("theme_customization") && (G.themeOverrides.value = P.config.theme), P.config.modules !== !1 && B.hasFeature("saved_modules") && Z.loadModules(), Qe("ready");
548
525
  } catch (e) {
549
526
  if (R) return;
550
527
  let t = e instanceof Error ? e : Error("Initialization failed", { cause: e });
@@ -553,21 +530,21 @@ var Qe = {
553
530
  R || (F.value = !1);
554
531
  }
555
532
  }
556
- function Vt() {
533
+ function Ut() {
557
534
  return Ae(B.config.value.websocket);
558
535
  }
559
- async function Ht(e) {
536
+ async function Wt(e) {
560
537
  let t = await H.create(e);
561
- return R ? t : (P.config.onCreate?.(t), K.initSnapshotHistory(), U.connect(t.id, Vt()), t);
538
+ return R ? t : (P.config.onCreate?.(t), K.initSnapshotHistory(), U.connect(t.id, Ut()), t);
562
539
  }
563
- async function Ut(e) {
540
+ async function Gt(e) {
564
541
  let t = await H.load(e);
565
- return R ? t : (P.config.onLoad?.(t), K.initSnapshotHistory(), U.connect(t.id, Vt()), t);
542
+ return R ? t : (P.config.onLoad?.(t), K.initSnapshotHistory(), U.connect(t.id, Ut()), t);
566
543
  }
567
- async function Wt() {
544
+ async function $() {
568
545
  J.isSaveExporting.value = !0, J.saveStatus.value = "idle";
569
546
  try {
570
- if (await zt(H.content.value), R) throw Error("Component unmounted during save");
547
+ if (await Vt(H.content.value), R) throw Error("Component unmounted during save");
571
548
  let e = await H.save();
572
549
  if (R) throw Error("Component unmounted during save");
573
550
  K.initSnapshotHistory(), K.snapshotHistoryInstance.value && K.snapshotHistoryInstance.value.loadSnapshots();
@@ -587,24 +564,24 @@ var Qe = {
587
564
  }
588
565
  }
589
566
  return _e(() => {
590
- Bt();
567
+ Ht();
591
568
  }), ye(() => {
592
569
  R = !0, P.fontsManager.cleanupFontLinks(), U.disconnect(), G.destroy(), P.config.onUnmount?.();
593
570
  }), r({
594
571
  getContent: () => H.content.value,
595
572
  setContent: (e) => H.setContent(e),
596
- setTheme: Pt,
597
- setThemeOverrides: Nt,
598
- create: Ht,
599
- load: Ut,
600
- save: Wt,
601
- sendTestEmail: X.sendTestEmail
602
- }), (e, t) => (O(), b("div", {
573
+ setTheme: It,
574
+ setThemeOverrides: Ft,
575
+ create: Wt,
576
+ load: Gt,
577
+ save: $,
578
+ sendTestEmail: Y.sendTestEmail
579
+ }), (e, t) => (O(), x("div", {
603
580
  class: D(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": M(H).state.darkMode }]),
604
581
  "data-tpl-theme": M(G).resolvedTheme.value,
605
582
  style: ge(M(G).themeStyles.value)
606
583
  }, [
607
- w(g, {
584
+ w(_, {
608
585
  "enter-active-class": "tpl:transition-opacity tpl:duration-200",
609
586
  "enter-from-class": "tpl:opacity-100",
610
587
  "enter-to-class": "tpl:opacity-100",
@@ -612,10 +589,10 @@ var Qe = {
612
589
  "leave-from-class": "tpl:opacity-100",
613
590
  "leave-to-class": "tpl:opacity-0"
614
591
  }, {
615
- default: N(() => [w(et, { visible: F.value || M(H).state.isLoading }, null, 8, ["visible"])]),
592
+ default: N(() => [w($e, { visible: F.value || M(H).state.isLoading }, null, 8, ["visible"])]),
616
593
  _: 1
617
594
  }),
618
- w(g, {
595
+ w(_, {
619
596
  "enter-active-class": "tpl:transition-opacity tpl:duration-200",
620
597
  "enter-from-class": "tpl:opacity-0",
621
598
  "enter-to-class": "tpl:opacity-100",
@@ -623,25 +600,25 @@ var Qe = {
623
600
  "leave-from-class": "tpl:opacity-100",
624
601
  "leave-to-class": "tpl:opacity-0"
625
602
  }, {
626
- default: N(() => [w(tt, {
603
+ default: N(() => [w(et, {
627
604
  error: L.value,
628
605
  visible: !!L.value && !F.value,
629
- onRetry: Bt
606
+ onRetry: Ht
630
607
  }, null, 8, ["error", "visible"])]),
631
608
  _: 1
632
609
  }),
633
- x("header", at, [
634
- x("div", ot, [M(J).isWhiteLabeled.value ? y("", !0) : (O(), b("div", st, [x("img", {
610
+ S("header", it, [
611
+ S("div", at, [M(J).isWhiteLabeled.value ? b("", !0) : (O(), x("div", ot, [S("img", {
635
612
  src: M(z).resolveUrl("/logo.svg"),
636
613
  alt: "Templatical",
637
614
  width: "24",
638
615
  height: "24",
639
616
  class: "tpl:shrink-0"
640
- }, null, 8, ct), x("span", lt, j(M(G).t.header.title), 1)])), M(J).templateLimit.value === null ? y("", !0) : (O(), b("span", ut, j(M(G).format(M(G).t.header.templatesUsed, {
617
+ }, null, 8, st), S("span", ct, j(M(G).t.header.title), 1)])), M(J).templateLimit.value === null ? b("", !0) : (O(), x("span", lt, j(M(G).format(M(G).t.header.templatesUsed, {
641
618
  used: M(J).templateCount.value,
642
619
  max: M(J).templateLimit.value
643
620
  })), 1))]),
644
- x("div", dt, [
621
+ S("div", ut, [
645
622
  w(ae, {
646
623
  viewport: M(H).state.viewport,
647
624
  onChange: M(H).setViewport
@@ -654,12 +631,12 @@ var Qe = {
654
631
  "preview-mode": M(H).state.previewMode,
655
632
  onChange: M(H).setPreviewMode
656
633
  }, null, 8, ["preview-mode", "onChange"]),
657
- M(W) && Et.value ? (O(), v(M(xe), {
634
+ M(W) && Tt.value ? (O(), y(M(xe), {
658
635
  key: 0,
659
636
  collaborators: M(W).collaborators.value,
660
637
  "is-connected": M(U).isConnected.value
661
- }, null, 8, ["collaborators", "is-connected"])) : y("", !0),
662
- M(K).snapshotHistoryInstance.value ? (O(), v(M(be), {
638
+ }, null, 8, ["collaborators", "is-connected"])) : b("", !0),
639
+ M(K).snapshotHistoryInstance.value ? (O(), y(M(be), {
663
640
  key: 1,
664
641
  snapshots: M(K).snapshotHistorySnapshots.value,
665
642
  "is-loading": M(K).snapshotHistoryIsLoading.value,
@@ -672,10 +649,10 @@ var Qe = {
672
649
  "is-restoring",
673
650
  "onLoad",
674
651
  "onNavigate"
675
- ])) : y("", !0)
652
+ ])) : b("", !0)
676
653
  ]),
677
- x("div", ft, [
678
- M(J).saveStatus.value === "error" ? (O(), b("div", {
654
+ S("div", dt, [
655
+ M(J).saveStatus.value === "error" ? (O(), x("div", {
679
656
  key: 0,
680
657
  "aria-live": "assertive",
681
658
  class: "tpl-tooltip tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]",
@@ -683,15 +660,15 @@ var Qe = {
683
660
  }, [w(M(ee), {
684
661
  size: 12,
685
662
  "stroke-width": 2.5
686
- }), C(" " + j(M(G).t.header.saveFailed), 1)], 8, pt)) : M(J).saveStatus.value === "saved" ? (O(), b("div", mt, [w(M(h), {
663
+ }), C(" " + j(M(G).t.header.saveFailed), 1)], 8, ft)) : M(J).saveStatus.value === "saved" ? (O(), x("div", pt, [w(M(h), {
687
664
  size: 12,
688
665
  "stroke-width": 2.5
689
- }), C(" " + j(M(G).t.header.saved), 1)])) : M(H).state.isDirty ? (O(), b("div", ht, [t[19] ||= x("span", { class: "tpl-pulse tpl:size-1.5 tpl:rounded-full tpl:bg-[var(--tpl-primary)]" }, null, -1), C(" " + j(M(G).t.header.unsaved), 1)])) : y("", !0),
690
- M(Z).isEnabled.value && M(J).hasTemplateSaved.value ? (O(), b("button", {
666
+ }), C(" " + j(M(G).t.header.saved), 1)])) : M(H).state.isDirty ? (O(), x("div", mt, [t[19] ||= S("span", { class: "tpl-pulse tpl:size-1.5 tpl:rounded-full tpl:bg-[var(--tpl-primary)]" }, null, -1), C(" " + j(M(G).t.header.unsaved), 1)])) : b("", !0),
667
+ M(X).isEnabled.value && M(J).hasTemplateSaved.value ? (O(), x("button", {
691
668
  key: 3,
692
- "aria-label": M(Z).unresolvedCount.value > 0 ? `${M(G).t.comments.button} (${M(Z).unresolvedCount.value})` : M(G).t.comments.button,
669
+ "aria-label": M(X).unresolvedCount.value > 0 ? `${M(G).t.comments.button} (${M(X).unresolvedCount.value})` : M(G).t.comments.button,
693
670
  "aria-expanded": M(q).commentsOpen.value,
694
- class: D(M(pe)),
671
+ class: D(M(g)),
695
672
  style: ge({
696
673
  backgroundColor: M(q).commentsOpen.value ? "var(--tpl-primary)" : "transparent",
697
674
  color: M(q).commentsOpen.value ? "var(--tpl-bg)" : "var(--tpl-primary)",
@@ -704,13 +681,13 @@ var Qe = {
704
681
  "stroke-width": 2
705
682
  }),
706
683
  C(" " + j(M(G).t.comments.button) + " ", 1),
707
- M(Z).unresolvedCount.value > 0 && !M(q).commentsOpen.value ? (O(), b("span", _t, j(M(Z).unresolvedCount.value), 1)) : y("", !0)
708
- ], 14, gt)) : y("", !0),
709
- M(J).canUseAiGeneration.value && M(J).hasTemplateSaved.value ? (O(), b("div", {
684
+ M(X).unresolvedCount.value > 0 && !M(q).commentsOpen.value ? (O(), x("span", gt, j(M(X).unresolvedCount.value), 1)) : b("", !0)
685
+ ], 14, ht)) : b("", !0),
686
+ M(J).canUseAiGeneration.value && M(J).hasTemplateSaved.value ? (O(), x("div", {
710
687
  key: 4,
711
688
  ref: (e) => M(q).aiMenuRef.value = e,
712
689
  class: "tpl:relative"
713
- }, [x("button", {
690
+ }, [S("button", {
714
691
  "aria-expanded": M(q).aiMenuOpen.value,
715
692
  class: D(["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", M(q).aiButtonActive.value ? "tpl-ai-btn--active" : "tpl-ai-btn--idle"]),
716
693
  onClick: t[1] ||= Te((...e) => M(q).toggleAiMenu && M(q).toggleAiMenu(...e), ["stop"])
@@ -718,7 +695,7 @@ var Qe = {
718
695
  size: 16,
719
696
  "stroke-width": 2,
720
697
  class: "tpl-ai-btn-icon"
721
- }), C(" " + j(M(G).t.aiChat.button), 1)], 10, vt), w(g, {
698
+ }), C(" " + j(M(G).t.aiChat.button), 1)], 10, _t), w(_, {
722
699
  "enter-active-class": "tpl:transition-all tpl:duration-150 tpl:ease-out",
723
700
  "enter-from-class": "tpl:scale-95 tpl:opacity-0",
724
701
  "enter-to-class": "tpl:scale-100 tpl:opacity-100",
@@ -726,54 +703,54 @@ var Qe = {
726
703
  "leave-from-class": "tpl:scale-100 tpl:opacity-100",
727
704
  "leave-to-class": "tpl:scale-95 tpl:opacity-0"
728
705
  }, {
729
- default: N(() => [M(q).aiMenuOpen.value ? (O(), b("div", yt, [w(M(Ve), {
706
+ default: N(() => [M(q).aiMenuOpen.value ? (O(), x("div", vt, [w(M(Ve), {
730
707
  "active-feature": M(q).activeAiFeature.value,
731
708
  onSelect: M(q).handleAiFeatureSelect
732
- }, null, 8, ["active-feature", "onSelect"])])) : y("", !0)]),
709
+ }, null, 8, ["active-feature", "onSelect"])])) : b("", !0)]),
733
710
  _: 1
734
- })], 512)) : y("", !0),
735
- M(X).isEnabled.value && M(J).canSendTestEmail.value ? (O(), b("button", {
711
+ })], 512)) : b("", !0),
712
+ M(Y).isEnabled.value && M(J).canSendTestEmail.value ? (O(), x("button", {
736
713
  key: 5,
737
- class: D(M(pe)),
714
+ class: D(M(g)),
738
715
  style: {
739
716
  "background-color": "transparent",
740
717
  color: "var(--tpl-primary)",
741
718
  "border-color": "var(--tpl-primary)"
742
719
  },
743
- disabled: M(X).isSending.value || !M(J).hasTemplateSaved.value,
720
+ disabled: M(Y).isSending.value || !M(J).hasTemplateSaved.value,
744
721
  onClick: t[2] ||= (e) => M(q).testEmailModalOpen.value = !0
745
- }, [M(X).isSending.value ? (O(), v(M(le), {
722
+ }, [M(Y).isSending.value ? (O(), y(M(le), {
746
723
  key: 1,
747
724
  class: "tpl-spinner",
748
725
  size: 16,
749
726
  "stroke-width": 2
750
- })) : (O(), v(M(de), {
727
+ })) : (O(), y(M(de), {
751
728
  key: 0,
752
729
  size: 16,
753
730
  "stroke-width": 2
754
- })), C(" " + j(M(G).t.testEmail.button), 1)], 10, bt)) : y("", !0),
755
- x("button", {
756
- class: D(M(pe)),
731
+ })), C(" " + j(M(G).t.testEmail.button), 1)], 10, yt)) : b("", !0),
732
+ S("button", {
733
+ class: D(M(g)),
757
734
  style: {
758
735
  "background-color": "transparent",
759
736
  color: "var(--tpl-primary)",
760
737
  "border-color": "var(--tpl-primary)"
761
738
  },
762
739
  disabled: M(H).state.isSaving || M(J).isSaveExporting.value || !M(H).state.isDirty,
763
- onClick: t[3] ||= (e) => Wt().catch((e) => P.config.onError?.(e))
764
- }, [!M(H).state.isSaving && !M(J).isSaveExporting.value ? (O(), v(M(Ge), {
740
+ onClick: t[3] ||= (e) => $().catch((e) => P.config.onError?.(e))
741
+ }, [!M(H).state.isSaving && !M(J).isSaveExporting.value ? (O(), y(M(Ge), {
765
742
  key: 0,
766
743
  size: 16,
767
744
  "stroke-width": 2
768
- })) : (O(), v(M(le), {
745
+ })) : (O(), y(M(le), {
769
746
  key: 1,
770
747
  class: "tpl-spinner",
771
748
  size: 16,
772
749
  "stroke-width": 2
773
- })), C(" " + j(M(H).state.isSaving || M(J).isSaveExporting.value ? M(G).t.header.saving : M(G).t.header.save), 1)], 10, xt)
750
+ })), C(" " + j(M(H).state.isSaving || M(J).isSaveExporting.value ? M(G).t.header.saving : M(G).t.header.save), 1)], 10, bt)
774
751
  ])
775
752
  ]),
776
- w(nt, {
753
+ w(tt, {
777
754
  visible: M(K).isPreviewingSnapshot.value,
778
755
  onCancel: M(K).cancelPreview,
779
756
  onConfirm: M(K).confirmRestoreSnapshot
@@ -782,7 +759,7 @@ var Qe = {
782
759
  "onCancel",
783
760
  "onConfirm"
784
761
  ]),
785
- w(g, {
762
+ w(_, {
786
763
  "enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
787
764
  "enter-from-class": "tpl:translate-y-[-8px] tpl:opacity-0",
788
765
  "enter-to-class": "tpl:translate-y-0 tpl:opacity-100",
@@ -790,18 +767,18 @@ var Qe = {
790
767
  "leave-from-class": "tpl:translate-y-0 tpl:opacity-100",
791
768
  "leave-to-class": "tpl:translate-y-[-8px] tpl:opacity-0"
792
769
  }, {
793
- default: N(() => [w(rt, { visible: M(kt).collabUndoWarningVisible.value }, null, 8, ["visible"])]),
770
+ default: N(() => [w(nt, { visible: M(Ot).collabUndoWarningVisible.value }, null, 8, ["visible"])]),
794
771
  _: 1
795
772
  }),
796
773
  we(w(te, null, null, 512), [[Se, !M(H).state.previewMode]]),
797
- x("div", {
774
+ S("div", {
798
775
  class: D(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto tpl:transition-all tpl:duration-300", [M(H).state.previewMode ? "tpl:left-0 tpl:right-0" : M(q).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]", M(K).isPreviewingSnapshot.value ? "tpl:top-[104px]" : "tpl:top-14"]]),
799
776
  style: {
800
777
  "transition-timing-function": "cubic-bezier(0.34, 1.56, 0.64, 1)",
801
778
  "background-color": "var(--tpl-canvas-bg)"
802
779
  }
803
- }, [x("div", St, [w(g, { name: "tpl-restore-btn" }, {
804
- default: N(() => [M(G).conditionPreview.hasHiddenBlocks.value ? (O(), b("button", {
780
+ }, [S("div", xt, [w(_, { name: "tpl-restore-btn" }, {
781
+ default: N(() => [M(G).conditionPreview.hasHiddenBlocks.value ? (O(), x("button", {
805
782
  key: 0,
806
783
  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",
807
784
  style: {
@@ -814,9 +791,9 @@ var Qe = {
814
791
  }, [w(M(oe), {
815
792
  size: 13,
816
793
  "stroke-width": 2
817
- }), C(" " + j(M(G).t.blockSettings.restoreHiddenBlocks), 1)])) : y("", !0)]),
794
+ }), C(" " + j(M(G).t.blockSettings.restoreHiddenBlocks), 1)])) : b("", !0)]),
818
795
  _: 1
819
- })]), x("main", Ct, [w(ie, {
796
+ })]), S("main", St, [w(ie, {
820
797
  viewport: M(H).state.viewport,
821
798
  content: M(H).content.value,
822
799
  "selected-block-id": M(H).state.selectedBlockId,
@@ -835,25 +812,25 @@ var Qe = {
835
812
  "locked-blocks",
836
813
  "onSelectBlock"
837
814
  ])])], 2),
838
- M(J).isWhiteLabeled.value ? y("", !0) : (O(), b("footer", {
815
+ M(J).isWhiteLabeled.value ? b("", !0) : (O(), x("footer", {
839
816
  key: 0,
840
817
  class: D(["tpl:pointer-events-none tpl:absolute tpl:bottom-0 tpl:z-50 tpl:flex tpl:h-8 tpl:items-center tpl:justify-end tpl:pr-4 tpl:text-[9px] tpl:opacity-90 tpl:transition-all tpl:duration-300 tpl:text-[var(--tpl-text-dim)]", [M(H).state.previewMode ? "tpl:left-0 tpl:right-0" : M(q).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]"]])
841
- }, [x("div", wt, [
842
- x("span", null, j(M(G).t.footer.poweredBy), 1),
843
- t[20] ||= x("a", {
818
+ }, [S("div", Ct, [
819
+ S("span", null, j(M(G).t.footer.poweredBy), 1),
820
+ t[20] ||= S("a", {
844
821
  href: "https://templatical.com",
845
822
  target: "_blank",
846
823
  rel: "noopener noreferrer",
847
824
  class: "tpl:inline-flex tpl:items-center tpl:gap-1 tpl:font-medium tpl:transition-colors tpl:duration-150 hover:tpl:opacity-80 tpl:text-[var(--tpl-text-muted)]",
848
825
  style: { "text-decoration": "none" }
849
- }, [x("img", {
826
+ }, [S("img", {
850
827
  width: "14",
851
828
  height: "14",
852
829
  src: "https://templatical.com/logo.svg",
853
830
  alt: ""
854
831
  }), C(" Templatical ")], -1),
855
- t[21] ||= x("span", { class: "tpl:text-[var(--tpl-border)]" }, "·", -1),
856
- x("a", Tt, j(M(G).t.footer.openSource), 1)
832
+ t[21] ||= S("span", { class: "tpl:text-[var(--tpl-border)]" }, "·", -1),
833
+ S("a", wt, j(M(G).t.footer.openSource), 1)
857
834
  ])], 2)),
858
835
  we(w(ne, {
859
836
  "selected-block": M(H).selectedBlock.value,
@@ -869,7 +846,7 @@ var Qe = {
869
846
  "shifted-left",
870
847
  "onUpdateSettings"
871
848
  ]), [[Se, !M(H).state.previewMode]]),
872
- !F.value && I.value ? (O(), b(me, { key: 1 }, [
849
+ !F.value && I.value ? (O(), x(pe, { key: 1 }, [
873
850
  w(M(f), {
874
851
  visible: M(q).aiChatOpen.value,
875
852
  "on-apply": (e) => {
@@ -891,16 +868,16 @@ var Qe = {
891
868
  }, null, 8, ["visible", "has-existing-blocks"]),
892
869
  w(M(p), {
893
870
  ref_key: "commentsSidebarRef",
894
- ref: Ft,
871
+ ref: Lt,
895
872
  visible: M(q).commentsOpen.value,
896
873
  onClose: t[14] ||= (e) => M(q).commentsOpen.value = !1
897
874
  }, null, 8, ["visible"]),
898
- w(M(S), {
875
+ w(M(me), {
899
876
  visible: M(q).testEmailModalOpen.value,
900
- "allowed-emails": M(X).allowedEmails.value,
901
- "is-sending": M(X).isSending.value,
902
- error: M(X).error.value,
903
- onSend: Lt,
877
+ "allowed-emails": M(Y).allowedEmails.value,
878
+ "is-sending": M(Y).isSending.value,
879
+ error: M(Y).error.value,
880
+ onSend: zt,
904
881
  onClose: t[15] ||= (e) => M(q).testEmailModalOpen.value = !1
905
882
  }, null, 8, [
906
883
  "visible",
@@ -908,33 +885,35 @@ var Qe = {
908
885
  "is-sending",
909
886
  "error"
910
887
  ]),
911
- M(B).hasFeature("saved_modules") && P.config.modules !== !1 ? (O(), v(M(E), {
888
+ M(B).hasFeature("saved_modules") && P.config.modules !== !1 ? (O(), y(M(E), {
912
889
  key: 0,
913
- visible: M($).showSaveDialog.value ?? !1,
914
- "pre-selected-block-id": M($).preSelectedBlockId.value ?? null,
915
- onClose: t[16] ||= (e) => M($).closeSaveDialog(),
916
- onSaved: t[17] ||= (e) => M(Q).loadModules()
917
- }, null, 8, ["visible", "pre-selected-block-id"])) : y("", !0),
918
- M(B).hasFeature("saved_modules") && P.config.modules !== !1 ? (O(), v(M(ve), {
890
+ visible: Mt.value,
891
+ "pre-selected-block-id": Nt.value,
892
+ onClose: t[16] ||= (e) => {
893
+ Mt.value = !1, Nt.value = null;
894
+ },
895
+ onSaved: t[17] ||= (e) => M(Z).loadModules()
896
+ }, null, 8, ["visible", "pre-selected-block-id"])) : b("", !0),
897
+ M(B).hasFeature("saved_modules") && P.config.modules !== !1 ? (O(), y(M(ve), {
919
898
  key: 1,
920
- visible: M($).showBrowserModal.value ?? !1,
921
- onClose: t[18] ||= (e) => M($).closeBrowserModal(),
922
- onInsert: Rt
923
- }, null, 8, ["visible"])) : y("", !0),
924
- w(M(Qe), {
899
+ visible: Q.value,
900
+ onClose: t[18] ||= (e) => Q.value = !1,
901
+ onInsert: Bt
902
+ }, null, 8, ["visible"])) : b("", !0),
903
+ w(M(Ze), {
925
904
  visible: M(q).mediaLibraryOpen.value,
926
905
  accept: M(q).mediaLibraryAccept.value,
927
- onSelect: M(Y).handleMediaSelect,
928
- onClose: M(Y).handleMediaLibraryClose
906
+ onSelect: M(At).handleMediaSelect,
907
+ onClose: M(At).handleMediaLibraryClose
929
908
  }, null, 8, [
930
909
  "visible",
931
910
  "accept",
932
911
  "onSelect",
933
912
  "onClose"
934
913
  ])
935
- ], 64)) : y("", !0)
936
- ], 14, it));
914
+ ], 64)) : b("", !0)
915
+ ], 14, rt));
937
916
  }
938
- }), [["__scopeId", "data-v-59c9499b"]]);
917
+ }), [["__scopeId", "data-v-55f76577"]]);
939
918
  //#endregion
940
919
  export { W as default };