@templatical/editor 0.16.4 → 0.16.5
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.
- package/dist/{AiFeatureMenu-BPCkrHAS.js → AiFeatureMenu-B1oEJebq.js} +1 -1
- package/dist/{CloudEditor-v8ARYaFW.js → CloudEditor-D6KNL6VU.js} +6 -6
- package/dist/{CollaboratorBar-BQzKZ2zo.js → CollaboratorBar-C_EhXQ5R.js} +1 -1
- package/dist/{ColorPicker-Cab6U2sH.js → ColorPicker-CppJgX_T.js} +57 -58
- package/dist/{CountdownToolbar-q3umZ7TZ.js → CountdownToolbar-D5GaA_lt.js} +2 -2
- package/dist/{MergeTagSuggestion-DrT3LiZ4.js → MergeTagSuggestion-jIpT_jmz.js} +7 -5
- package/dist/{ModuleBrowserModal-CzzChPmN.js → ModuleBrowserModal-CXy8Bbv9.js} +4 -4
- package/dist/{ModulePreviewCanvas-C0Q2n3FL.js → ModulePreviewCanvas-CJC9kyZN.js} +1 -1
- package/dist/{NumberWithSuffix-Bhm2ByHs.js → NumberWithSuffix-DNi-v4l1.js} +1 -1
- package/dist/{ParagraphEditor-BhsBi8p8.js → ParagraphEditor-nk5Vvr7M.js} +38 -39
- package/dist/{RichTextEditorContent-ef0fdj6e.js → RichTextEditorContent-DBaCrvH0.js} +13 -13
- package/dist/{SaveModuleDialog-BNN3dcxD.js → SaveModuleDialog-CYu5PhBz.js} +2 -2
- package/dist/{SnapshotHistory-tWvgMCe6.js → SnapshotHistory-B38ImqMO.js} +2 -2
- package/dist/{TestEmailModal-EdwEcsrD.js → TestEmailModal-DbstIzEf.js} +2 -2
- package/dist/{TitleEditor-DdvRepBq.js → TitleEditor-CmfkOHJT.js} +18 -18
- package/dist/{TplModal-Niu4Y96-.js → TplModal-BXnx3sLr.js} +4 -4
- package/dist/{blockTypeIcons-DHcYPMB8.js → blockTypeIcons-BVIEw0XJ.js} +1 -1
- package/dist/bundle-stats.json +7 -7
- package/dist/cdn/chunks/{AiFeatureMenu-AoUwsqor.js → AiFeatureMenu-CuIg4yrB.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-AoUwsqor.js.map → AiFeatureMenu-CuIg4yrB.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-DZU3CfEN.js → BlockIssueBadge-BHEl_Hs7.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-DZU3CfEN.js.map → BlockIssueBadge-BHEl_Hs7.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-BrZLF_m1.js → CloudEditor-1Ms0w691.js} +130 -130
- package/dist/cdn/chunks/{CloudEditor-BrZLF_m1.js.map → CloudEditor-1Ms0w691.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-BAC56ez6.js → CollaboratorBar-C0a5P64z.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-BAC56ez6.js.map → CollaboratorBar-C0a5P64z.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-DLEoT419.js → ColorPicker-bsMmT-_B.js} +144 -144
- package/dist/cdn/chunks/ColorPicker-bsMmT-_B.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-BOF9aTXF.js → CountdownBlock-8053oz4k.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-BOF9aTXF.js.map → CountdownBlock-8053oz4k.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-C9bQ5k4E.js → CountdownToolbar-DQ_zrorh.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-C9bQ5k4E.js.map → CountdownToolbar-DQ_zrorh.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CHwYahKK.js → IssuesPanel-CwQ376nf.js} +7 -7
- package/dist/cdn/chunks/{IssuesPanel-CHwYahKK.js.map → IssuesPanel-CwQ376nf.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-jesxS7An.js → MergeTagSuggestion-rpZ6Ol-i.js} +8 -6
- package/dist/cdn/chunks/MergeTagSuggestion-rpZ6Ol-i.js.map +1 -0
- package/dist/cdn/chunks/{ModuleBrowserModal-iSXXpAUk.js → ModuleBrowserModal-DUegB2Jk.js} +8 -8
- package/dist/cdn/chunks/{ModuleBrowserModal-iSXXpAUk.js.map → ModuleBrowserModal-DUegB2Jk.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-DIy0MZj2.js → ModulePreviewCanvas-f4h8r9Lh.js} +32 -32
- package/dist/cdn/chunks/{ModulePreviewCanvas-DIy0MZj2.js.map → ModulePreviewCanvas-f4h8r9Lh.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-vPdOG2lO.js → NumberWithSuffix-Bu_nHJuD.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-vPdOG2lO.js.map → NumberWithSuffix-Bu_nHJuD.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-D7znI_X1.js → ParagraphEditor-IpZsg8qo.js} +75 -75
- package/dist/cdn/chunks/ParagraphEditor-IpZsg8qo.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DVwGHbO6.js → RichTextEditorContent-DDnqZ9cB.js} +6 -6
- package/dist/cdn/chunks/{RichTextEditorContent-DVwGHbO6.js.map → RichTextEditorContent-DDnqZ9cB.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-D2_qPtE9.js → SaveModuleDialog-CVA5HPCi.js} +20 -20
- package/dist/cdn/chunks/{SaveModuleDialog-D2_qPtE9.js.map → SaveModuleDialog-CVA5HPCi.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CKjZ6Cgp.js → TitleEditor-DU8wm0Rh.js} +9 -9
- package/dist/cdn/chunks/TitleEditor-DU8wm0Rh.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-BKecgdgr.js → blockTypeIcons-Dm5Oosjp.js} +7 -7
- package/dist/cdn/chunks/{blockTypeIcons-BKecgdgr.js.map → blockTypeIcons-Dm5Oosjp.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-OZTN_skA.js → extensions-BGUoo2a5.js} +29 -29
- package/dist/cdn/chunks/{extensions-OZTN_skA.js.map → extensions-BGUoo2a5.js.map} +1 -1
- package/dist/cdn/chunks/{features-Bo7H8WNI.js → features-BSpDuFFR.js} +423 -404
- package/dist/cdn/chunks/features-BSpDuFFR.js.map +1 -0
- package/dist/cdn/chunks/{icons-BrNSrnyT.js → icons-k3XVoRvc.js} +2 -2
- package/dist/cdn/chunks/{icons-BrNSrnyT.js.map → icons-k3XVoRvc.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-Cec5DMR3.js → media-library-iDq3otm6.js} +451 -451
- package/dist/cdn/chunks/{media-library-Cec5DMR3.js.map → media-library-iDq3otm6.js.map} +1 -1
- package/dist/cdn/chunks/{quality-Dd2iYgRf.js → quality-Bb7vN32U.js} +512 -512
- package/dist/cdn/chunks/{quality-Dd2iYgRf.js.map → quality-Bb7vN32U.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-Br-qXdnQ.js → renderer-cOvtk8HM.js} +16 -16
- package/dist/cdn/chunks/{renderer-Br-qXdnQ.js.map → renderer-cOvtk8HM.js.map} +1 -1
- package/dist/cdn/chunks/{src-BH8PABpF.js → src-Ddp969zE.js} +6 -6
- package/dist/cdn/chunks/{src-BH8PABpF.js.map → src-Ddp969zE.js.map} +1 -1
- package/dist/cdn/chunks/{styles-nqo5BynI.js → styles-CW_gRVVR.js} +219 -219
- package/dist/cdn/chunks/styles-CW_gRVVR.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +46 -46
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{extensions-B2poxDIo.js → extensions-Cjd-VAII.js} +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/style.css +1 -1
- package/dist/{styles-DN4J7w-C.js → styles-DJfTblY7.js} +97 -97
- package/dist/templatical-editor.js +4 -4
- package/dist/{useEditorCore-DBq2689h.js → useEditorCore-DnOG2a_b.js} +681 -681
- package/dist/usePopoverPosition-B3Byo68F.js +281 -0
- package/package.json +7 -7
- package/dist/cdn/chunks/ColorPicker-DLEoT419.js.map +0 -1
- package/dist/cdn/chunks/MergeTagSuggestion-jesxS7An.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-D7znI_X1.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-CKjZ6Cgp.js.map +0 -1
- package/dist/cdn/chunks/features-Bo7H8WNI.js.map +0 -1
- package/dist/cdn/chunks/styles-nqo5BynI.js.map +0 -1
- package/dist/color-DhoxCSMv.js +0 -259
- package/dist/usePopoverRoot-C1j0D7cc.js +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockIssueBadge-
|
|
1
|
+
{"version":3,"file":"BlockIssueBadge-BHEl_Hs7.js","names":[],"sources":["../../../src/components/canvas/BlockIssueBadge.vue","../../../src/components/canvas/BlockIssueBadge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, inject } from \"vue\";\nimport { CircleAlert, TriangleAlert } from \"@lucide/vue\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { TEMPLATE_LINT_KEY } from \"../../keys\";\n\nconst props = defineProps<{ blockId: string }>();\nconst { t } = useI18n();\nconst lint = inject(TEMPLATE_LINT_KEY, null);\n\nconst blockIssues = computed(() =>\n (lint?.issues.value ?? []).filter((i) => i.blockId === props.blockId),\n);\n\nconst severity = computed<\"error\" | \"warning\" | null>(() => {\n if (blockIssues.value.some((i) => i.severity === \"error\")) return \"error\";\n if (blockIssues.value.some((i) => i.severity === \"warning\")) return \"warning\";\n return null;\n});\n\nconst tooltip = computed(() =>\n severity.value === \"error\" ? t.issues.badgeError : t.issues.badgeWarning,\n);\n</script>\n\n<template>\n <span\n v-if=\"severity\"\n class=\"tpl:absolute tpl:top-1 tpl:right-1 tpl:z-10 tpl:flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)] tpl:ring-1 tpl:ring-[var(--tpl-border)]\"\n :class=\"\n severity === 'error'\n ? 'tpl:text-[var(--tpl-danger)]'\n : 'tpl:text-[var(--tpl-warning)]'\n \"\n :title=\"tooltip\"\n :aria-label=\"tooltip\"\n role=\"img\"\n >\n <CircleAlert\n v-if=\"severity === 'error'\"\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n <TriangleAlert\n v-else\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n </span>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, inject } from \"vue\";\nimport { CircleAlert, TriangleAlert } from \"@lucide/vue\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { TEMPLATE_LINT_KEY } from \"../../keys\";\n\nconst props = defineProps<{ blockId: string }>();\nconst { t } = useI18n();\nconst lint = inject(TEMPLATE_LINT_KEY, null);\n\nconst blockIssues = computed(() =>\n (lint?.issues.value ?? []).filter((i) => i.blockId === props.blockId),\n);\n\nconst severity = computed<\"error\" | \"warning\" | null>(() => {\n if (blockIssues.value.some((i) => i.severity === \"error\")) return \"error\";\n if (blockIssues.value.some((i) => i.severity === \"warning\")) return \"warning\";\n return null;\n});\n\nconst tooltip = computed(() =>\n severity.value === \"error\" ? t.issues.badgeError : t.issues.badgeWarning,\n);\n</script>\n\n<template>\n <span\n v-if=\"severity\"\n class=\"tpl:absolute tpl:top-1 tpl:right-1 tpl:z-10 tpl:flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)] tpl:ring-1 tpl:ring-[var(--tpl-border)]\"\n :class=\"\n severity === 'error'\n ? 'tpl:text-[var(--tpl-danger)]'\n : 'tpl:text-[var(--tpl-warning)]'\n \"\n :title=\"tooltip\"\n :aria-label=\"tooltip\"\n role=\"img\"\n >\n <CircleAlert\n v-if=\"severity === 'error'\"\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n <TriangleAlert\n v-else\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n </span>\n</template>\n"],"mappings":";;;;;;;EAMA,IAAM,IAAQ,GACR,EAAE,SAAM,EAAQ,GAChB,IAAO,EAAO,GAAmB,IAAI,GAErC,IAAc,SACjB,GAAM,OAAO,SAAS,CAAC,EAAA,CAAG,QAAQ,MAAM,EAAE,YAAY,EAAM,OAAO,CACtE,GAEM,IAAW,QACX,EAAY,MAAM,MAAM,MAAM,EAAE,aAAa,OAAO,IAAU,UAC9D,EAAY,MAAM,MAAM,MAAM,EAAE,aAAa,SAAS,IAAU,YAC7D,IACR,GAEK,IAAU,QACd,EAAS,UAAU,UAAU,EAAE,OAAO,aAAa,EAAE,OAAO,YAC9D;mBAKU,EAAA,SAAA,EAAA,GADR,EA0BO,QAAA;;GAxBL,OAAK,EAAA,CAAC,yNACS,EAAA,UAAQ,UAAA,iCAAA,+BAAA,CAAA;GAKtB,OAAO,EAAA;GACP,cAAY,EAAA;GACb,MAAK;MAGG,EAAA,UAAQ,WAAA,EAAA,GADhB,EAME,EAAA,CAAA,GAAA;;GAJC,MAAM;GACN,gBAAc;GACf,MAAK;GACL,QAAO;cAET,EAME,EAAA,CAAA,GAAA;;GAJC,MAAM;GACN,gBAAc;GACf,MAAK;GACL,QAAO"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { $ as e, A as t, H as n, J as r, M as i, N as a, P as o, V as s, Z as c, _ as l, b as u, ct as d, f, g as p, h as m, it as h, j as g, l as _, m as v, n as y, ot as b, p as x, s as S, st as C, u as w, v as T, x as E, y as D, z as O } from "./draggable-D840DIZB.js";
|
|
2
|
-
import {
|
|
3
|
-
import { S as be, x as xe } from "./icons-
|
|
4
|
-
import { a as Se, c as Ce, d as we, f as Te, i as Ee, l as De, n as Oe, o as ke, r as Ae, s as je, t as Me, u as Ne } from "./styles-
|
|
5
|
-
import { d as Pe } from "./ColorPicker-
|
|
2
|
+
import { Bt as k, Ct as A, E as j, Ft as M, Jt as N, Kt as ee, Mt as P, Nn as F, Qn as I, Rt as L, S as R, Sn as z, St as B, Ut as te, Vt as ne, X as V, _ as H, b as U, c as re, ct as W, d as G, f as K, ft as q, g as ie, h as ae, ht as J, in as oe, jt as Y, k as X, l as Z, m as Q, nt as se, on as ce, ot as $, p as le, pn as ue, qt as de, s as fe, sn as pe, u as me, v as he, vt as ge, x as _e, y as ve, zn as ye } from "./features-BSpDuFFR.js";
|
|
3
|
+
import { S as be, x as xe } from "./icons-k3XVoRvc.js";
|
|
4
|
+
import { a as Se, c as Ce, d as we, f as Te, i as Ee, l as De, n as Oe, o as ke, r as Ae, s as je, t as Me, u as Ne } from "./styles-CW_gRVVR.js";
|
|
5
|
+
import { d as Pe } from "./ColorPicker-bsMmT-_B.js";
|
|
6
6
|
//#region src/cloud/composables/useSnapshotPreview.ts
|
|
7
7
|
function Fe(t) {
|
|
8
8
|
let { authManager: n, editor: i, history: a, conditionPreview: o, autoSave: s, onError: l } = t, u = e(null), d = c(null), p = c(null), m = !1;
|
|
@@ -11,7 +11,7 @@ function Fe(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 =
|
|
14
|
+
i.state.template?.id && !u.value && (u.value = K({
|
|
15
15
|
authManager: n,
|
|
16
16
|
templateId: i.state.template.id,
|
|
17
17
|
onRestore: b,
|
|
@@ -86,7 +86,7 @@ function Ie() {
|
|
|
86
86
|
function g(t) {
|
|
87
87
|
l.value = !1, e.value = e.value === t ? null : t;
|
|
88
88
|
}
|
|
89
|
-
return
|
|
89
|
+
return ue(u, () => {
|
|
90
90
|
l.value = !1;
|
|
91
91
|
}), {
|
|
92
92
|
activePanel: e,
|
|
@@ -109,9 +109,9 @@ function Ie() {
|
|
|
109
109
|
//#endregion
|
|
110
110
|
//#region src/cloud/composables/useCollabUndoWarning.ts
|
|
111
111
|
function Le(e) {
|
|
112
|
-
let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i = c(!1), a = c(!1), { start: o } =
|
|
112
|
+
let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i = c(!1), a = c(!1), { start: o } = z(() => {
|
|
113
113
|
a.value = !1;
|
|
114
|
-
},
|
|
114
|
+
}, I, { immediate: !1 });
|
|
115
115
|
function s() {
|
|
116
116
|
i.value || !t.value || n() === 0 || !r.value || (i.value = !0, a.value = !0, o());
|
|
117
117
|
}
|
|
@@ -123,7 +123,7 @@ function Le(e) {
|
|
|
123
123
|
//#endregion
|
|
124
124
|
//#region src/cloud/composables/useCloudFeatureFlags.ts
|
|
125
125
|
function Re(e) {
|
|
126
|
-
let { planConfigInstance: t, aiConfig: n, editor: r } = e, i = f(() => t.hasFeature("ai_generation") && n.hasAnyMenuFeature.value), a = f(() => t.hasFeature("test_email")), o = f(() => !!r.state.template?.id), s = f(() => t.hasFeature("white_label")), l = f(() => t.config.value?.limits.max_templates ?? null), u = f(() => t.config.value?.template_count ?? 0), d = c(!1), p = c("idle"), m = c(""), { start: h } =
|
|
126
|
+
let { planConfigInstance: t, aiConfig: n, editor: r } = e, i = f(() => t.hasFeature("ai_generation") && n.hasAnyMenuFeature.value), a = f(() => t.hasFeature("test_email")), o = f(() => !!r.state.template?.id), s = f(() => t.hasFeature("white_label")), l = f(() => t.config.value?.limits.max_templates ?? null), u = f(() => t.config.value?.template_count ?? 0), d = c(!1), p = c("idle"), m = c(""), { start: h } = z(() => {
|
|
127
127
|
p.value = "idle";
|
|
128
128
|
}, 3e3, { immediate: !1 });
|
|
129
129
|
return {
|
|
@@ -175,7 +175,7 @@ function ze(e) {
|
|
|
175
175
|
let t = f(e);
|
|
176
176
|
if (t) return s?.(t), null;
|
|
177
177
|
try {
|
|
178
|
-
let { MediaApiClient: t } = await import("./src-
|
|
178
|
+
let { MediaApiClient: t } = await import("./src-Ddp969zE.js");
|
|
179
179
|
return l(await new t(a).uploadMedia(e));
|
|
180
180
|
} catch (e) {
|
|
181
181
|
return s?.(e), null;
|
|
@@ -207,20 +207,20 @@ function Be(e) {
|
|
|
207
207
|
let { config: t, translations: n, fontsManager: r, emit: i, getCommentsSidebar: o } = e, s = c(!0), l = c(!1), u = c(null), d = !1, p = { value: null }, m = null, h = null, g = new j({
|
|
208
208
|
...t.auth,
|
|
209
209
|
onError: t.onError
|
|
210
|
-
}), _ =
|
|
210
|
+
}), _ = Z({
|
|
211
211
|
authManager: g,
|
|
212
212
|
onError: t.onError
|
|
213
|
-
}), v = c(/* @__PURE__ */ new Map()), y =
|
|
213
|
+
}), v = c(/* @__PURE__ */ new Map()), y = _e({
|
|
214
214
|
authManager: g,
|
|
215
215
|
defaultFontFamily: t.fonts?.defaultFont,
|
|
216
216
|
templateDefaults: t.templateDefaults,
|
|
217
217
|
onError: t.onError,
|
|
218
218
|
lockedBlocks: v
|
|
219
|
-
}), b =
|
|
219
|
+
}), b = Q({
|
|
220
220
|
authManager: g,
|
|
221
221
|
onError: t.onError
|
|
222
222
|
});
|
|
223
|
-
t.mcp?.enabled &&
|
|
223
|
+
t.mcp?.enabled && fe({
|
|
224
224
|
editor: y,
|
|
225
225
|
channel: b.channel,
|
|
226
226
|
onOperation: t.mcp.onOperation
|
|
@@ -238,7 +238,7 @@ function Be(e) {
|
|
|
238
238
|
}), O(() => x.lockedBlocks.value, (e) => {
|
|
239
239
|
v.value = e;
|
|
240
240
|
}, { immediate: !0 }), ae(y, x));
|
|
241
|
-
let S = f(() => !!t.collaboration?.enabled && _.hasFeature("collaboration")), C =
|
|
241
|
+
let S = f(() => !!t.collaboration?.enabled && _.hasFeature("collaboration")), C = X({
|
|
242
242
|
editor: y,
|
|
243
243
|
config: {
|
|
244
244
|
uiTheme: t.uiTheme,
|
|
@@ -286,11 +286,11 @@ function Be(e) {
|
|
|
286
286
|
onError: t.onError
|
|
287
287
|
});
|
|
288
288
|
m = T;
|
|
289
|
-
let E = Ie(), D =
|
|
289
|
+
let E = Ie(), D = U(t.ai), k = Re({
|
|
290
290
|
planConfigInstance: _,
|
|
291
291
|
aiConfig: D,
|
|
292
292
|
editor: y
|
|
293
|
-
}),
|
|
293
|
+
}), A = ze({
|
|
294
294
|
onRequestMedia: t.onRequestMedia,
|
|
295
295
|
mediaLibraryOpen: E.mediaLibraryOpen,
|
|
296
296
|
mediaLibraryAccept: E.mediaLibraryAccept,
|
|
@@ -298,23 +298,23 @@ function Be(e) {
|
|
|
298
298
|
getMediaConfig: () => _.config.value?.media ?? null,
|
|
299
299
|
onError: t.onError
|
|
300
300
|
});
|
|
301
|
-
|
|
301
|
+
se({
|
|
302
302
|
onBlockMove: y.moveBlock,
|
|
303
303
|
onBlockAdd: y.addBlock
|
|
304
304
|
});
|
|
305
|
-
let
|
|
305
|
+
let M = me({
|
|
306
306
|
authManager: g,
|
|
307
307
|
getFontsConfig: () => t.fonts,
|
|
308
308
|
canUseCustomFonts: () => _.hasFeature("custom_fonts")
|
|
309
|
-
}),
|
|
309
|
+
}), P = G({
|
|
310
310
|
authManager: g,
|
|
311
311
|
getTemplateId: () => y.state.template?.id ?? null,
|
|
312
312
|
save: () => y.save(),
|
|
313
|
-
exportHtml: (e) =>
|
|
313
|
+
exportHtml: (e) => M.exportHtml(e),
|
|
314
314
|
onError: t.onError,
|
|
315
315
|
isAuthReady: l,
|
|
316
316
|
onBeforeTestEmail: t.onBeforeTestEmail
|
|
317
|
-
}),
|
|
317
|
+
}), F = he({
|
|
318
318
|
authManager: g,
|
|
319
319
|
getTemplateId: () => y.state.template?.id ?? null,
|
|
320
320
|
getSocketId: () => b.getSocketId(),
|
|
@@ -323,14 +323,14 @@ function Be(e) {
|
|
|
323
323
|
isAuthReady: l,
|
|
324
324
|
hasCommentingFeature: () => t.commenting !== !1 && _.hasFeature("commenting")
|
|
325
325
|
});
|
|
326
|
-
|
|
327
|
-
comments:
|
|
326
|
+
H({
|
|
327
|
+
comments: F,
|
|
328
328
|
channel: b.channel
|
|
329
329
|
});
|
|
330
|
-
let
|
|
330
|
+
let I = le({
|
|
331
331
|
authManager: g,
|
|
332
332
|
onError: t.onError
|
|
333
|
-
}),
|
|
333
|
+
}), R = c(!1), z = c(null), B = c(!1), V = ve({
|
|
334
334
|
authManager: g,
|
|
335
335
|
getTemplateId: () => y.state.template?.id ?? null
|
|
336
336
|
});
|
|
@@ -339,40 +339,40 @@ function Be(e) {
|
|
|
339
339
|
o()?.filterByBlock(e);
|
|
340
340
|
});
|
|
341
341
|
}
|
|
342
|
-
a(
|
|
342
|
+
a(oe, A.handleRequestMedia), a(te, g), a(ne, D), a(N, F), a(ce, I), a(pe, V), a(ee, {
|
|
343
343
|
plan: _,
|
|
344
344
|
ai: D,
|
|
345
345
|
comments: {
|
|
346
|
-
getBlockCount: (e) =>
|
|
346
|
+
getBlockCount: (e) => F.commentCountByBlock.value.get(e) ?? 0,
|
|
347
347
|
openForBlock: W
|
|
348
348
|
},
|
|
349
349
|
savedModules: {
|
|
350
350
|
openSaveDialog: (e) => {
|
|
351
|
-
|
|
351
|
+
z.value = e ?? null, R.value = !0;
|
|
352
352
|
},
|
|
353
353
|
openBrowser: () => {
|
|
354
|
-
|
|
354
|
+
B.value = !0;
|
|
355
355
|
},
|
|
356
|
-
moduleCount: f(() =>
|
|
356
|
+
moduleCount: f(() => I.modules.value.length)
|
|
357
357
|
}
|
|
358
358
|
});
|
|
359
|
-
function
|
|
359
|
+
function K(e) {
|
|
360
360
|
_.hasFeature("theme_customization") && (C.themeOverrides.value = e);
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function q(e) {
|
|
363
363
|
y.setUiTheme(e);
|
|
364
364
|
}
|
|
365
|
-
async function
|
|
365
|
+
async function J() {
|
|
366
366
|
s.value = !0, u.value = null;
|
|
367
367
|
try {
|
|
368
368
|
if (await g.initialize(), d) return;
|
|
369
369
|
l.value = !0;
|
|
370
|
-
let e = await
|
|
370
|
+
let e = await re({ authManager: g });
|
|
371
371
|
if (d) return;
|
|
372
372
|
if (!e.api.ok) throw Error("Health check failed: API is not reachable");
|
|
373
373
|
if (!e.auth.ok) throw Error(`Health check failed: authentication error${e.auth.error ? ` - ${e.auth.error}` : ""}`);
|
|
374
|
-
if (e.websocket.ok ||
|
|
375
|
-
r.setCustomFontsEnabled(_.hasFeature("custom_fonts")), t.customBlocks?.length && _.hasFeature("custom_blocks") && C.registerCustomBlocks(t.customBlocks), t.theme && _.hasFeature("theme_customization") && (C.themeOverrides.value = t.theme), t.modules !== !1 && _.hasFeature("saved_modules") &&
|
|
374
|
+
if (e.websocket.ok || L.warn("WebSocket health check failed:", e.websocket.error ?? "unknown error", "-- real-time features will be disabled."), await _.fetchConfig(), d) return;
|
|
375
|
+
r.setCustomFontsEnabled(_.hasFeature("custom_fonts")), t.customBlocks?.length && _.hasFeature("custom_blocks") && C.registerCustomBlocks(t.customBlocks), t.theme && _.hasFeature("theme_customization") && (C.themeOverrides.value = t.theme), t.modules !== !1 && _.hasFeature("saved_modules") && I.loadModules(), i("ready");
|
|
376
376
|
} catch (e) {
|
|
377
377
|
if (d) return;
|
|
378
378
|
let n = e instanceof Error ? e : Error("Initialization failed", { cause: e });
|
|
@@ -381,7 +381,7 @@ function Be(e) {
|
|
|
381
381
|
d || (s.value = !1);
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function Y() {
|
|
385
385
|
d = !0, r.cleanupFontLinks(), b.disconnect(), C.destroy(), t.onUnmount?.();
|
|
386
386
|
}
|
|
387
387
|
return {
|
|
@@ -398,23 +398,23 @@ function Be(e) {
|
|
|
398
398
|
core: C,
|
|
399
399
|
aiConfig: D,
|
|
400
400
|
featureFlags: k,
|
|
401
|
-
mediaLib:
|
|
402
|
-
exporter:
|
|
403
|
-
testEmail:
|
|
404
|
-
commentsInstance:
|
|
405
|
-
savedModulesHeadless:
|
|
406
|
-
scoringInstance:
|
|
401
|
+
mediaLib: A,
|
|
402
|
+
exporter: M,
|
|
403
|
+
testEmail: P,
|
|
404
|
+
commentsInstance: F,
|
|
405
|
+
savedModulesHeadless: I,
|
|
406
|
+
scoringInstance: V,
|
|
407
407
|
panelState: E,
|
|
408
408
|
snapshotPreview: T,
|
|
409
409
|
collabWarning: w,
|
|
410
|
-
showSaveModuleDialog:
|
|
411
|
-
showModuleBrowserModal:
|
|
412
|
-
saveModulePreSelectedBlockId:
|
|
410
|
+
showSaveModuleDialog: R,
|
|
411
|
+
showModuleBrowserModal: B,
|
|
412
|
+
saveModulePreSelectedBlockId: z,
|
|
413
413
|
onSaveHook: p,
|
|
414
|
-
initialize:
|
|
415
|
-
destroy:
|
|
416
|
-
setThemeOverrides:
|
|
417
|
-
setUiTheme:
|
|
414
|
+
initialize: J,
|
|
415
|
+
destroy: Y,
|
|
416
|
+
setThemeOverrides: K,
|
|
417
|
+
setUiTheme: q,
|
|
418
418
|
openCommentsForBlock: W
|
|
419
419
|
};
|
|
420
420
|
}
|
|
@@ -422,7 +422,7 @@ function Be(e) {
|
|
|
422
422
|
//#region src/utils/preRenderCustomBlocks.ts
|
|
423
423
|
async function Ve(e, t) {
|
|
424
424
|
let n = async (e) => {
|
|
425
|
-
if (
|
|
425
|
+
if (ye(e)) {
|
|
426
426
|
let n = e;
|
|
427
427
|
try {
|
|
428
428
|
n.renderedHtml = await t.renderCustomBlock(n);
|
|
@@ -513,7 +513,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
513
513
|
},
|
|
514
514
|
emits: ["cancel", "confirm"],
|
|
515
515
|
setup(e, { emit: t }) {
|
|
516
|
-
let n = t, { t: r } =
|
|
516
|
+
let n = t, { t: r } = $();
|
|
517
517
|
return (t, a) => (i(), v(y, {
|
|
518
518
|
"enter-active-class": "tpl:transition-opacity tpl:duration-150",
|
|
519
519
|
"leave-active-class": "tpl:transition-opacity tpl:duration-150",
|
|
@@ -595,7 +595,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
595
595
|
},
|
|
596
596
|
emits: ["save"],
|
|
597
597
|
setup(e) {
|
|
598
|
-
let t = u(() => import("./CollaboratorBar-
|
|
598
|
+
let t = u(() => import("./CollaboratorBar-C0a5P64z.js")), n = u(() => import("./features-BSpDuFFR.js").then((e) => e.r)), r = u(() => import("./AiFeatureMenu-CuIg4yrB.js")), { t: a, format: o } = $();
|
|
599
599
|
return (c, l) => (i(), p("header", et, [
|
|
600
600
|
x("div", tt, [e.featureFlags.templateLimit.value === null ? m("", !0) : (i(), p("span", nt, d(h(o)(h(a).header.templatesUsed, {
|
|
601
601
|
used: e.featureFlags.templateCount.value,
|
|
@@ -640,10 +640,10 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
640
640
|
"aria-live": "assertive",
|
|
641
641
|
class: "tpl-tooltip tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]",
|
|
642
642
|
"data-tooltip": e.featureFlags.saveErrorMessage.value
|
|
643
|
-
}, [D(h(
|
|
643
|
+
}, [D(h(P), {
|
|
644
644
|
size: 12,
|
|
645
645
|
"stroke-width": 2.5
|
|
646
|
-
}), T(" " + d(h(a).header.saveFailed), 1)], 8, at)) : e.featureFlags.saveStatus.value === "saved" ? (i(), p("div", ot, [D(h(
|
|
646
|
+
}), T(" " + d(h(a).header.saveFailed), 1)], 8, at)) : e.featureFlags.saveStatus.value === "saved" ? (i(), p("div", ot, [D(h(M), {
|
|
647
647
|
size: 12,
|
|
648
648
|
"stroke-width": 2.5
|
|
649
649
|
}), T(" " + d(h(a).header.saved), 1)])) : e.editor.state.isDirty ? (i(), p("div", st, [l[4] ||= x("span", { class: "tpl-pulse tpl:size-1.5 tpl:rounded-full tpl:bg-[var(--tpl-primary)]" }, null, -1), T(" " + d(h(a).header.unsaved), 1)])) : m("", !0),
|
|
@@ -659,7 +659,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
659
659
|
}),
|
|
660
660
|
onClick: l[0] ||= (t) => e.panelState.commentsOpen.value = !e.panelState.commentsOpen.value
|
|
661
661
|
}, [
|
|
662
|
-
D(h(
|
|
662
|
+
D(h(B), {
|
|
663
663
|
size: 16,
|
|
664
664
|
"stroke-width": 2
|
|
665
665
|
}),
|
|
@@ -674,7 +674,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
674
674
|
"aria-expanded": e.panelState.aiMenuOpen.value,
|
|
675
675
|
class: b(["tpl-ai-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:whitespace-nowrap tpl:transition-all tpl:duration-200", e.panelState.aiButtonActive.value ? "tpl-ai-btn--active" : "tpl-ai-btn--idle"]),
|
|
676
676
|
onClick: l[1] ||= _((...t) => e.panelState.toggleAiMenu && e.panelState.toggleAiMenu(...t), ["stop"])
|
|
677
|
-
}, [D(h(
|
|
677
|
+
}, [D(h(J), {
|
|
678
678
|
size: 16,
|
|
679
679
|
"stroke-width": 2,
|
|
680
680
|
class: "tpl-ai-btn-icon"
|
|
@@ -702,12 +702,12 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
702
702
|
},
|
|
703
703
|
disabled: e.testEmail.isSending.value || !e.featureFlags.hasTemplateSaved.value,
|
|
704
704
|
onClick: l[2] ||= (t) => e.panelState.testEmailModalOpen.value = !0
|
|
705
|
-
}, [e.testEmail.isSending.value ? (i(), v(h(
|
|
705
|
+
}, [e.testEmail.isSending.value ? (i(), v(h(A), {
|
|
706
706
|
key: 1,
|
|
707
707
|
class: "tpl-spinner",
|
|
708
708
|
size: 16,
|
|
709
709
|
"stroke-width": 2
|
|
710
|
-
})) : (i(), v(h(
|
|
710
|
+
})) : (i(), v(h(ge), {
|
|
711
711
|
key: 0,
|
|
712
712
|
size: 16,
|
|
713
713
|
"stroke-width": 2
|
|
@@ -721,7 +721,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
721
721
|
},
|
|
722
722
|
disabled: e.isSaveDisabled,
|
|
723
723
|
onClick: l[3] ||= (e) => c.$emit("save")
|
|
724
|
-
}, [e.isSaving ? (i(), v(h(
|
|
724
|
+
}, [e.isSaving ? (i(), v(h(A), {
|
|
725
725
|
key: 1,
|
|
726
726
|
class: "tpl-spinner",
|
|
727
727
|
size: 16,
|
|
@@ -757,9 +757,9 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
757
757
|
"module-insert"
|
|
758
758
|
],
|
|
759
759
|
setup(e, { expose: t, emit: n }) {
|
|
760
|
-
let r = u(() => import("./features-
|
|
760
|
+
let r = u(() => import("./features-BSpDuFFR.js").then((e) => e.o)), a = u(() => import("./features-BSpDuFFR.js").then((e) => e.a)), o = u(() => import("./features-BSpDuFFR.js").then((e) => e.i)), s = u(() => import("./features-BSpDuFFR.js").then((e) => e.n)), l = u(() => import("./features-BSpDuFFR.js").then((e) => e.t)), d = u(() => import("./SaveModuleDialog-CVA5HPCi.js")), f = u(() => import("./ModuleBrowserModal-DUegB2Jk.js")), g = u(async () => {
|
|
761
761
|
try {
|
|
762
|
-
return (await import("./src-
|
|
762
|
+
return (await import("./src-Ddp969zE.js")).MediaLibraryModal;
|
|
763
763
|
} catch {
|
|
764
764
|
throw Error("[Templatical] Cloud media library requires the optional peer dependency '@templatical/media-library'. Please install it.");
|
|
765
765
|
}
|
|
@@ -863,7 +863,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
863
863
|
},
|
|
864
864
|
emits: ["retry"],
|
|
865
865
|
setup(e, { emit: t }) {
|
|
866
|
-
let n = t, { t: r } =
|
|
866
|
+
let n = t, { t: r } = $();
|
|
867
867
|
function a(e) {
|
|
868
868
|
return "isUnauthorized" in e && e.isUnauthorized ? r.error.authFailed : "isNotFound" in e && e.isNotFound ? r.error.templateNotFound : r.error.defaultMessage;
|
|
869
869
|
}
|
|
@@ -871,7 +871,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
871
871
|
return "isNotFound" in e && !!e.isNotFound;
|
|
872
872
|
}
|
|
873
873
|
return (t, s) => e.visible && e.error ? (i(), p("div", bt, [
|
|
874
|
-
x("div", xt, [D(h(
|
|
874
|
+
x("div", xt, [D(h(P), {
|
|
875
875
|
size: 32,
|
|
876
876
|
"stroke-width": 1.5,
|
|
877
877
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
@@ -892,8 +892,8 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
892
892
|
props: { visible: { type: Boolean } },
|
|
893
893
|
emits: ["cancel", "confirm"],
|
|
894
894
|
setup(e, { emit: t }) {
|
|
895
|
-
let n = t, { t: r } =
|
|
896
|
-
return (t, a) => e.visible ? (i(), p("div", Et, [x("div", Dt, [D(h(
|
|
895
|
+
let n = t, { t: r } = $();
|
|
896
|
+
return (t, a) => e.visible ? (i(), p("div", Et, [x("div", Dt, [D(h(Y), {
|
|
897
897
|
size: 18,
|
|
898
898
|
"stroke-width": 2,
|
|
899
899
|
class: "tpl:text-[var(--tpl-primary)]"
|
|
@@ -920,10 +920,10 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
920
920
|
__name: "CollabUndoToast",
|
|
921
921
|
props: { visible: { type: Boolean } },
|
|
922
922
|
setup(e) {
|
|
923
|
-
let { t } =
|
|
923
|
+
let { t } = k();
|
|
924
924
|
return (n, r) => e.visible ? (i(), p("div", At, d(h(t).history.collabWarning), 1)) : m("", !0);
|
|
925
925
|
}
|
|
926
|
-
}), Mt = ["data-tpl-theme"], Nt = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, Pt = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, Ft = ["aria-label"], It = /*#__PURE__*/
|
|
926
|
+
}), Mt = ["data-tpl-theme"], Nt = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, Pt = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, Ft = ["aria-label"], It = /*#__PURE__*/ W(/* @__PURE__ */ E({
|
|
927
927
|
__name: "CloudEditor",
|
|
928
928
|
props: {
|
|
929
929
|
config: {},
|
|
@@ -935,7 +935,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
935
935
|
emits: ["ready"],
|
|
936
936
|
setup(e, { expose: r, emit: o }) {
|
|
937
937
|
let l = e;
|
|
938
|
-
a(
|
|
938
|
+
a(de, l.cloudTranslations);
|
|
939
939
|
let u = o, f = c(null), w = c(null), E = Be({
|
|
940
940
|
config: l.config,
|
|
941
941
|
translations: l.translations,
|
|
@@ -944,54 +944,54 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
944
944
|
getCommentsSidebar: () => f.value ? { filterByBlock: f.value.filterCommentsByBlock } : null,
|
|
945
945
|
editorRoot: l.shadowRoot,
|
|
946
946
|
containerEl: w
|
|
947
|
-
}), { isInitializing: O, isAuthReady:
|
|
948
|
-
async function
|
|
947
|
+
}), { isInitializing: O, isAuthReady: k, initError: A, planConfigInstance: j, websocket: M, collaboration: N, isCollaborationEnabled: ee, editor: P, core: I, featureFlags: L, mediaLib: R, exporter: z, testEmail: B, commentsInstance: te, savedModulesHeadless: ne, panelState: H, snapshotPreview: U, collabWarning: re, showSaveModuleDialog: W, showModuleBrowserModal: G, saveModulePreSelectedBlockId: K, setThemeOverrides: q, setUiTheme: ie } = E, { showNotice: ae } = V(() => l.config.smallScreenNotice);
|
|
948
|
+
async function J(e) {
|
|
949
949
|
try {
|
|
950
|
-
await
|
|
950
|
+
await B.sendTestEmail(e), H.testEmailModalOpen.value = !1;
|
|
951
951
|
} catch {}
|
|
952
952
|
}
|
|
953
|
-
async function
|
|
953
|
+
async function oe() {
|
|
954
954
|
try {
|
|
955
|
-
await
|
|
955
|
+
await U.confirmRestoreSnapshot();
|
|
956
956
|
} catch {}
|
|
957
957
|
}
|
|
958
|
-
function
|
|
958
|
+
function Y(e, t) {
|
|
959
959
|
for (let n = 0; n < e.content.length; n++) {
|
|
960
960
|
let r = F(e.content[n]), i = t === void 0 ? void 0 : t + n;
|
|
961
961
|
P.addBlock(r, void 0, void 0, i);
|
|
962
962
|
}
|
|
963
|
-
|
|
963
|
+
G.value = !1;
|
|
964
964
|
}
|
|
965
|
-
let
|
|
965
|
+
let X = He({
|
|
966
966
|
config: l.config,
|
|
967
967
|
editor: P,
|
|
968
|
-
websocket:
|
|
969
|
-
planConfigInstance:
|
|
970
|
-
snapshotPreview:
|
|
968
|
+
websocket: M,
|
|
969
|
+
planConfigInstance: j,
|
|
970
|
+
snapshotPreview: U,
|
|
971
971
|
core: I,
|
|
972
972
|
exporter: z,
|
|
973
973
|
featureFlags: L,
|
|
974
974
|
isDestroyed: E.isDestroyed
|
|
975
|
-
}),
|
|
975
|
+
}), Z = Ue({
|
|
976
976
|
issues: I.templateLint ? I.templateLint.issues : c([]),
|
|
977
|
-
planConfig:
|
|
977
|
+
planConfig: j.config
|
|
978
978
|
});
|
|
979
|
-
async function
|
|
980
|
-
await
|
|
979
|
+
async function Q() {
|
|
980
|
+
await Z.tryRunSave(() => X.saveTemplate().catch((e) => l.config.onError?.(e)));
|
|
981
981
|
}
|
|
982
|
-
return E.onSaveHook.value =
|
|
982
|
+
return E.onSaveHook.value = Q, t(() => {
|
|
983
983
|
E.initialize();
|
|
984
984
|
}), g(() => {
|
|
985
985
|
E.destroy();
|
|
986
986
|
}), r({
|
|
987
987
|
getContent: () => P.content.value,
|
|
988
988
|
setContent: (e) => P.setContent(e),
|
|
989
|
-
setTheme:
|
|
990
|
-
setThemeOverrides:
|
|
991
|
-
create:
|
|
992
|
-
load:
|
|
993
|
-
save:
|
|
994
|
-
sendTestEmail:
|
|
989
|
+
setTheme: ie,
|
|
990
|
+
setThemeOverrides: q,
|
|
991
|
+
create: X.createTemplate,
|
|
992
|
+
load: X.loadTemplate,
|
|
993
|
+
save: X.saveTemplate,
|
|
994
|
+
sendTestEmail: B.sendTestEmail
|
|
995
995
|
}), (t, r) => (i(), p("div", {
|
|
996
996
|
ref_key: "rootEl",
|
|
997
997
|
ref: w,
|
|
@@ -1022,8 +1022,8 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1022
1022
|
"leave-to-class": "tpl:opacity-0"
|
|
1023
1023
|
}, {
|
|
1024
1024
|
default: s(() => [D(Tt, {
|
|
1025
|
-
error: h(
|
|
1026
|
-
visible: !!h(
|
|
1025
|
+
error: h(A),
|
|
1026
|
+
visible: !!h(A) && !h(O),
|
|
1027
1027
|
onRetry: h(E).initialize
|
|
1028
1028
|
}, null, 8, [
|
|
1029
1029
|
"error",
|
|
@@ -1036,16 +1036,16 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1036
1036
|
editor: h(P),
|
|
1037
1037
|
core: h(I),
|
|
1038
1038
|
"feature-flags": h(L),
|
|
1039
|
-
"panel-state": h(
|
|
1040
|
-
"snapshot-preview": h(
|
|
1041
|
-
"comments-instance": h(
|
|
1042
|
-
"test-email": h(
|
|
1043
|
-
websocket: h(
|
|
1044
|
-
collaboration: h(
|
|
1045
|
-
"is-collaboration-enabled": h(
|
|
1039
|
+
"panel-state": h(H),
|
|
1040
|
+
"snapshot-preview": h(U),
|
|
1041
|
+
"comments-instance": h(te),
|
|
1042
|
+
"test-email": h(B),
|
|
1043
|
+
websocket: h(M),
|
|
1044
|
+
collaboration: h(N),
|
|
1045
|
+
"is-collaboration-enabled": h(ee),
|
|
1046
1046
|
"is-saving": h(P).state.isSaving || h(L).isSaveExporting.value,
|
|
1047
1047
|
"is-save-disabled": h(P).state.isSaving || h(L).isSaveExporting.value || !h(P).state.isDirty,
|
|
1048
|
-
onSave:
|
|
1048
|
+
onSave: Q
|
|
1049
1049
|
}, null, 8, [
|
|
1050
1050
|
"editor",
|
|
1051
1051
|
"core",
|
|
@@ -1061,10 +1061,10 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1061
1061
|
"is-save-disabled"
|
|
1062
1062
|
]),
|
|
1063
1063
|
D($e, {
|
|
1064
|
-
open: h(
|
|
1065
|
-
issues: h(
|
|
1066
|
-
onCancel: h(
|
|
1067
|
-
onConfirm: h(
|
|
1064
|
+
open: h(Z).modalOpen.value,
|
|
1065
|
+
issues: h(Z).blockingIssues.value,
|
|
1066
|
+
onCancel: h(Z).cancel,
|
|
1067
|
+
onConfirm: h(Z).confirmAndSave
|
|
1068
1068
|
}, null, 8, [
|
|
1069
1069
|
"open",
|
|
1070
1070
|
"issues",
|
|
@@ -1072,9 +1072,9 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1072
1072
|
"onConfirm"
|
|
1073
1073
|
]),
|
|
1074
1074
|
D(kt, {
|
|
1075
|
-
visible: h(
|
|
1076
|
-
onCancel: h(
|
|
1077
|
-
onConfirm:
|
|
1075
|
+
visible: h(U).isPreviewingSnapshot.value,
|
|
1076
|
+
onCancel: h(U).cancelPreview,
|
|
1077
|
+
onConfirm: oe
|
|
1078
1078
|
}, null, 8, ["visible", "onCancel"]),
|
|
1079
1079
|
D(y, {
|
|
1080
1080
|
"enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
|
|
@@ -1089,7 +1089,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1089
1089
|
}),
|
|
1090
1090
|
n(D(De, null, null, 512), [[S, !h(P).state.previewMode]]),
|
|
1091
1091
|
x("div", {
|
|
1092
|
-
class: b(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [h(P).state.previewMode ? "tpl:left-0 tpl:right-0" : h(
|
|
1092
|
+
class: b(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [h(P).state.previewMode ? "tpl:left-0 tpl:right-0" : h(H).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]", h(U).isPreviewingSnapshot.value ? "tpl:top-[104px]" : "tpl:top-14"]]),
|
|
1093
1093
|
style: {
|
|
1094
1094
|
transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
1095
1095
|
"background-color": "var(--tpl-canvas-bg)"
|
|
@@ -1116,10 +1116,10 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1116
1116
|
"selected-block-id": h(P).state.selectedBlockId,
|
|
1117
1117
|
"dark-mode": h(P).state.darkMode,
|
|
1118
1118
|
"preview-mode": h(P).state.previewMode,
|
|
1119
|
-
"locked-blocks": h(
|
|
1119
|
+
"locked-blocks": h(N)?.lockedBlocks.value ?? void 0,
|
|
1120
1120
|
onSelectBlock: h(P).selectBlock,
|
|
1121
|
-
onOpenAiChat: r[1] ||= (e) => h(
|
|
1122
|
-
onOpenDesignReference: r[2] ||= (e) => h(
|
|
1121
|
+
onOpenAiChat: r[1] ||= (e) => h(H).aiChatOpen.value = !0,
|
|
1122
|
+
onOpenDesignReference: r[2] ||= (e) => h(H).designReferenceOpen.value = !0
|
|
1123
1123
|
}, null, 8, [
|
|
1124
1124
|
"viewport",
|
|
1125
1125
|
"content",
|
|
@@ -1131,7 +1131,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1131
1131
|
])])], 2),
|
|
1132
1132
|
e.config.branding !== !1 && !h(L).isWhiteLabeled.value ? (i(), v(Ae, {
|
|
1133
1133
|
key: 0,
|
|
1134
|
-
"position-class": [h(P).state.previewMode ? "tpl:left-0 tpl:right-0" : h(
|
|
1134
|
+
"position-class": [h(P).state.previewMode ? "tpl:left-0 tpl:right-0" : h(H).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]"]
|
|
1135
1135
|
}, null, 8, ["position-class"])) : m("", !0),
|
|
1136
1136
|
x("div", {
|
|
1137
1137
|
class: "tpl-sr-only",
|
|
@@ -1143,7 +1143,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1143
1143
|
n(D(Ce, {
|
|
1144
1144
|
"selected-block": h(P).selectedBlock.value,
|
|
1145
1145
|
settings: h(P).content.value.settings,
|
|
1146
|
-
"shifted-left": h(
|
|
1146
|
+
"shifted-left": h(H).rightPanelOpen.value,
|
|
1147
1147
|
onUpdateBlock: r[3] ||= (e) => h(P).updateBlock(h(P).selectedBlock.value.id, e),
|
|
1148
1148
|
onDeleteBlock: r[4] ||= (e) => h(I).blockActions.deleteBlock(h(P).selectedBlock.value.id),
|
|
1149
1149
|
onDuplicateBlock: r[5] ||= (e) => h(I).blockActions.duplicateBlock(h(P).selectedBlock.value),
|
|
@@ -1154,26 +1154,26 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1154
1154
|
"shifted-left",
|
|
1155
1155
|
"onUpdateSettings"
|
|
1156
1156
|
]), [[S, !h(P).state.previewMode]]),
|
|
1157
|
-
!h(O) && h(
|
|
1157
|
+
!h(O) && h(k) ? (i(), v(ht, {
|
|
1158
1158
|
key: 1,
|
|
1159
1159
|
ref_key: "cloudPanelsRef",
|
|
1160
1160
|
ref: f,
|
|
1161
1161
|
config: l.config,
|
|
1162
1162
|
editor: h(P),
|
|
1163
1163
|
core: h(I),
|
|
1164
|
-
"panel-state": h(
|
|
1165
|
-
"plan-config-instance": h(
|
|
1166
|
-
"test-email": h(
|
|
1164
|
+
"panel-state": h(H),
|
|
1165
|
+
"plan-config-instance": h(j),
|
|
1166
|
+
"test-email": h(B),
|
|
1167
1167
|
"media-lib": h(R),
|
|
1168
|
-
"saved-modules-headless": h(
|
|
1169
|
-
"show-save-module-dialog": h(
|
|
1170
|
-
"save-module-pre-selected-block-id": h(
|
|
1171
|
-
"show-module-browser-modal": h(
|
|
1172
|
-
"onUpdate:showSaveModuleDialog": r[6] ||= (e) =>
|
|
1173
|
-
"onUpdate:saveModulePreSelectedBlockId": r[7] ||= (e) =>
|
|
1174
|
-
"onUpdate:showModuleBrowserModal": r[8] ||= (e) =>
|
|
1175
|
-
onSendTestEmail:
|
|
1176
|
-
onModuleInsert:
|
|
1168
|
+
"saved-modules-headless": h(ne),
|
|
1169
|
+
"show-save-module-dialog": h(W),
|
|
1170
|
+
"save-module-pre-selected-block-id": h(K),
|
|
1171
|
+
"show-module-browser-modal": h(G),
|
|
1172
|
+
"onUpdate:showSaveModuleDialog": r[6] ||= (e) => W.value = e,
|
|
1173
|
+
"onUpdate:saveModulePreSelectedBlockId": r[7] ||= (e) => K.value = e,
|
|
1174
|
+
"onUpdate:showModuleBrowserModal": r[8] ||= (e) => G.value = e,
|
|
1175
|
+
onSendTestEmail: J,
|
|
1176
|
+
onModuleInsert: Y
|
|
1177
1177
|
}, null, 8, [
|
|
1178
1178
|
"config",
|
|
1179
1179
|
"editor",
|
|
@@ -1193,11 +1193,11 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1193
1193
|
}, null, 512),
|
|
1194
1194
|
D(Oe),
|
|
1195
1195
|
D(Me),
|
|
1196
|
-
h(
|
|
1196
|
+
h(ae) ? (i(), v(je, { key: 2 })) : m("", !0)
|
|
1197
1197
|
], 46, Mt));
|
|
1198
1198
|
}
|
|
1199
1199
|
}), [["__scopeId", "data-v-3fc6c906"]]);
|
|
1200
1200
|
//#endregion
|
|
1201
1201
|
export { It as default };
|
|
1202
1202
|
|
|
1203
|
-
//# sourceMappingURL=CloudEditor-
|
|
1203
|
+
//# sourceMappingURL=CloudEditor-1Ms0w691.js.map
|