@templatical/editor 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-K_AehWc-.js → AiChatSidebar-Bru6-ziQ.js} +1 -1
- package/dist/{SavedBlockPreviewCanvas-DXkGDYph.js → BlockPreviewCanvas-MD9BGuXV.js} +35 -29
- package/dist/{CloudEditor-BVH7D1Ka.js → CloudEditor-iK4vkpNm.js} +274 -278
- package/dist/{DesignReferenceSidebar-DNmK3dxp.js → DesignReferenceSidebar-BxPo0zyx.js} +1 -1
- package/dist/{SaveBlockDialog-B_5KBaXW.js → SaveBlockDialog-CFAJHP3v.js} +98 -97
- package/dist/{SavedBlocksBrowserModal-DoJBoYPk.js → SavedBlocksBrowserModal-C_-Xcm0Q.js} +1 -1
- package/dist/{SavedBlocksPanels-3Af5dMaf.js → SavedBlocksPanels-CRf7zzFn.js} +1 -1
- package/dist/TestEmailModal-D90-3Yex.js +162 -0
- package/dist/TestEmailPanel-B0u_Yd3X.js +33 -0
- package/dist/ViewportToggle-BjmbNoao.js +97 -0
- package/dist/bundle-stats.json +7 -7
- package/dist/{cdn/chunks/ca-BBgad6y5.js → ca-D47BxSGu.js} +14 -2
- package/dist/cdn/chunks/{AiChatSidebar-A1CuWGY0.js → AiChatSidebar-BMnsF8G6.js} +2 -2
- package/dist/cdn/chunks/{AiChatSidebar-A1CuWGY0.js.map → AiChatSidebar-BMnsF8G6.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlockPreviewCanvas-DgLOKtR_.js → BlockPreviewCanvas-eASrdFSN.js} +36 -30
- package/dist/cdn/chunks/BlockPreviewCanvas-eASrdFSN.js.map +1 -0
- package/dist/cdn/chunks/{CloudEditor-FCS53UcZ.js → CloudEditor-S8zLHtKb.js} +253 -257
- package/dist/cdn/chunks/CloudEditor-S8zLHtKb.js.map +1 -0
- package/dist/cdn/chunks/{DesignReferenceSidebar-Dre99DTH.js → DesignReferenceSidebar-CM-k15pd.js} +2 -2
- package/dist/cdn/chunks/{DesignReferenceSidebar-Dre99DTH.js.map → DesignReferenceSidebar-CM-k15pd.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-CSeD3gn9.js → SaveBlockDialog-Bi_Z3kuA.js} +100 -99
- package/dist/cdn/chunks/SaveBlockDialog-Bi_Z3kuA.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-B2x5WRPN.js → SavedBlocksBrowserModal-CesYxFsH.js} +2 -2
- package/dist/cdn/chunks/SavedBlocksBrowserModal-CesYxFsH.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksPanels-BzMTZxf2.js → SavedBlocksPanels-BsSpJwrW.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-BzMTZxf2.js.map → SavedBlocksPanels-BsSpJwrW.js.map} +1 -1
- package/dist/cdn/chunks/TestEmailModal-CCWEVrE2.js +162 -0
- package/dist/cdn/chunks/TestEmailModal-CCWEVrE2.js.map +1 -0
- package/dist/cdn/chunks/TestEmailPanel-048m0kxX.js +35 -0
- package/dist/cdn/chunks/TestEmailPanel-048m0kxX.js.map +1 -0
- package/dist/cdn/chunks/ViewportToggle-CFmF-N4i.js +66 -0
- package/dist/cdn/chunks/ViewportToggle-CFmF-N4i.js.map +1 -0
- package/dist/{ca-BBgad6y5.js → cdn/chunks/ca-D47BxSGu.js} +16 -0
- package/dist/cdn/chunks/{ca-BBgad6y5.js.map → ca-D47BxSGu.js.map} +1 -1
- package/dist/cdn/chunks/{cloud-BJlbXGTJ.js → cloud-F-aVi9hj.js} +45 -41
- package/dist/cdn/chunks/cloud-F-aVi9hj.js.map +1 -0
- package/dist/{de-D7WbpFBR.js → cdn/chunks/de-CnnxBwh7.js} +16 -0
- package/dist/cdn/chunks/{de-D7WbpFBR.js.map → de-CnnxBwh7.js.map} +1 -1
- package/dist/{de-Bw6fB5JU.js → cdn/chunks/de-uVoSP1xF.js} +2 -9
- package/dist/cdn/chunks/de-uVoSP1xF.js.map +1 -0
- package/dist/cdn/chunks/emailFrameWidth-BmFCN2dp.js +8 -0
- package/dist/cdn/chunks/emailFrameWidth-BmFCN2dp.js.map +1 -0
- package/dist/cdn/chunks/{en-BrZ0uGK2.js → en-5gW-bYy2.js} +15 -1
- package/dist/cdn/chunks/{en-BrZ0uGK2.js.map → en-5gW-bYy2.js.map} +1 -1
- package/dist/{en-DAdHJz7h.js → cdn/chunks/en-CjhsJxb-.js} +2 -9
- package/dist/cdn/chunks/en-CjhsJxb-.js.map +1 -0
- package/dist/{es-tLSLysPs.js → cdn/chunks/es-sQ9SdI0l.js} +16 -0
- package/dist/cdn/chunks/{es-tLSLysPs.js.map → es-sQ9SdI0l.js.map} +1 -1
- package/dist/cdn/chunks/{fr-BMWOPztQ.js → fr-DBZ5w21C.js} +15 -1
- package/dist/cdn/chunks/{fr-BMWOPztQ.js.map → fr-DBZ5w21C.js.map} +1 -1
- package/dist/{nl-Dhctu7JL.js → cdn/chunks/nl-DOL7Fnfo.js} +16 -0
- package/dist/cdn/chunks/{nl-Dhctu7JL.js.map → nl-DOL7Fnfo.js.map} +1 -1
- package/dist/{pt-BR-w2sGzHNX.js → cdn/chunks/pt-BR-CTzHTqJD.js} +2 -9
- package/dist/cdn/chunks/pt-BR-CTzHTqJD.js.map +1 -0
- package/dist/cdn/chunks/{pt-BR-BWFokdTU.js → pt-BR-DRCdHX1d.js} +15 -1
- package/dist/cdn/chunks/{pt-BR-BWFokdTU.js.map → pt-BR-DRCdHX1d.js.map} +1 -1
- package/dist/cdn/chunks/{src-ByWL5K1f.js → src-CzoMNRq4.js} +17 -17
- package/dist/cdn/chunks/{src-ByWL5K1f.js.map → src-CzoMNRq4.js.map} +1 -1
- package/dist/cdn/chunks/{src-MA8DWI8O.js → src-SluTVSz_.js} +2 -2
- package/dist/cdn/chunks/{src-MA8DWI8O.js.map → src-SluTVSz_.js.map} +1 -1
- package/dist/cdn/chunks/{styles-BkXzQ4-n.js → styles-BbfU2w9R.js} +616 -584
- package/dist/cdn/chunks/styles-BbfU2w9R.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +164 -147
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{cloud-Du7mnkz2.js → cloud-CeZPgo1V.js} +41 -39
- package/dist/{cdn/chunks/de-D7WbpFBR.js → de-CnnxBwh7.js} +14 -2
- package/dist/{cdn/chunks/de-Bw6fB5JU.js → de-uVoSP1xF.js} +0 -11
- package/dist/emailFrameWidth-BmFCN2dp.js +6 -0
- package/dist/{en-BrZ0uGK2.js → en-5gW-bYy2.js} +14 -0
- package/dist/{cdn/chunks/en-DAdHJz7h.js → en-CjhsJxb-.js} +0 -11
- package/dist/{cdn/chunks/es-tLSLysPs.js → es-sQ9SdI0l.js} +14 -2
- package/dist/{fr-BMWOPztQ.js → fr-DBZ5w21C.js} +14 -0
- package/dist/index.d.ts +74 -0
- package/dist/{cdn/chunks/nl-Dhctu7JL.js → nl-DOL7Fnfo.js} +14 -2
- package/dist/{cdn/chunks/pt-BR-w2sGzHNX.js → pt-BR-CTzHTqJD.js} +0 -11
- package/dist/{pt-BR-BWFokdTU.js → pt-BR-DRCdHX1d.js} +14 -0
- package/dist/style.css +1 -1
- package/dist/{styles-AxBd7CgB.js → styles-BWTIgN5L.js} +670 -671
- package/dist/templatical-editor.js +127 -109
- package/package.json +7 -7
- package/dist/TestEmailModal-DComAFpR.js +0 -95
- package/dist/cdn/chunks/CloudEditor-FCS53UcZ.js.map +0 -1
- package/dist/cdn/chunks/SaveBlockDialog-CSeD3gn9.js.map +0 -1
- package/dist/cdn/chunks/SavedBlockPreviewCanvas-DgLOKtR_.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-B2x5WRPN.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-DT37w7i_.js +0 -96
- package/dist/cdn/chunks/TestEmailModal-DT37w7i_.js.map +0 -1
- package/dist/cdn/chunks/cloud-BJlbXGTJ.js.map +0 -1
- package/dist/cdn/chunks/de-Bw6fB5JU.js.map +0 -1
- package/dist/cdn/chunks/en-DAdHJz7h.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-w2sGzHNX.js.map +0 -1
- package/dist/cdn/chunks/styles-BkXzQ4-n.js.map +0 -1
|
@@ -5,23 +5,24 @@ import { A } from "./dist-BJbqgyPn.js";
|
|
|
5
5
|
import { E as j, V as M, t as N, x as P } from "./useEditorCore-CuMMIfiS.js";
|
|
6
6
|
import { m as F } from "./dist-DYv_Pttj.js";
|
|
7
7
|
import { s as I } from "./usePopoverPosition-BO2LNy5n.js";
|
|
8
|
-
import { A as L, F as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { a as
|
|
8
|
+
import { A as L, F as ee, c as R, r as z, s as B, t as V, u as te } from "./keys-CHPcp-Nz.js";
|
|
9
|
+
import { t as H } from "./useI18n-D2L9Mkik.js";
|
|
10
|
+
import { t as U } from "./createLucideIcon-JWHwTI6N.js";
|
|
11
|
+
import { t as W } from "./check-BpQDKiPz.js";
|
|
12
|
+
import { t as G } from "./circle-alert-CgtE46ND.js";
|
|
13
|
+
import { a as K, c as ne, d as q, f as re, h as ie, i as J, l as ae, m as oe, n as se, o as ce, p as le, r as ue, s as de, t as fe, u as pe } from "./styles-BWTIgN5L.js";
|
|
14
14
|
import { t as me } from "./clock-BzKLLW5L.js";
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as
|
|
20
|
-
import { t as
|
|
15
|
+
import { t as Y } from "./loader-circle-C-Z6kgI6.js";
|
|
16
|
+
import { t as X } from "./message-circle-CEm5qckV.js";
|
|
17
|
+
import { t as Z } from "./ViewportToggle-BjmbNoao.js";
|
|
18
|
+
import { t as he } from "./send-B70aQDrA.js";
|
|
19
|
+
import { t as ge } from "./sparkles-DVlm1Ipp.js";
|
|
20
|
+
import { t as _e } from "./triangle-alert-Djg6IG8N.js";
|
|
21
|
+
import { t as ve } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
21
22
|
import { n as Q } from "./useCloudI18n-BmiygEM4.js";
|
|
22
23
|
import { d as $ } from "./ColorPicker-s9GHXjZs.js";
|
|
23
|
-
import { _ as
|
|
24
|
-
var
|
|
24
|
+
import { _ as ye, a as be, b as xe, c as Se, d as Ce, g as we, h as Te, i as Ee, l as De, m as Oe, n as ke, p as Ae, r as je, s as Me, t as Ne, u as Pe, v as Fe, y as Ie } from "./cloud-CeZPgo1V.js";
|
|
25
|
+
var Le = U("save", [
|
|
25
26
|
["path", {
|
|
26
27
|
d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",
|
|
27
28
|
key: "1c8476"
|
|
@@ -37,14 +38,14 @@ var Pe = W("save", [
|
|
|
37
38
|
]);
|
|
38
39
|
//#endregion
|
|
39
40
|
//#region src/cloud/composables/useSnapshotPreview.ts
|
|
40
|
-
function
|
|
41
|
+
function Re(e) {
|
|
41
42
|
let { authManager: t, editor: n, history: r, conditionPreview: i, autoSave: a, onError: s } = e, c = d(null), l = u(null), f = u(null), p = !1;
|
|
42
43
|
o(() => {
|
|
43
44
|
p = !0;
|
|
44
45
|
});
|
|
45
46
|
let m = C(() => l.value !== null), h = C(() => c.value?.snapshots.value ?? []), g = C(() => c.value?.isLoading.value ?? !1), _ = C(() => c.value?.isRestoring.value ?? !1);
|
|
46
47
|
function v() {
|
|
47
|
-
n.state.template?.id && !c.value && (c.value =
|
|
48
|
+
n.state.template?.id && !c.value && (c.value = ye({
|
|
48
49
|
authManager: t,
|
|
49
50
|
templateId: n.state.template.id,
|
|
50
51
|
onRestore: y,
|
|
@@ -96,7 +97,7 @@ function Fe(e) {
|
|
|
96
97
|
}
|
|
97
98
|
//#endregion
|
|
98
99
|
//#region src/cloud/composables/useCloudPanelState.ts
|
|
99
|
-
function
|
|
100
|
+
function ze() {
|
|
100
101
|
let e = u(null), t = C({
|
|
101
102
|
get: () => e.value === "ai-chat",
|
|
102
103
|
set: (t) => e.value = t ? "ai-chat" : null
|
|
@@ -109,39 +110,38 @@ function Ie() {
|
|
|
109
110
|
}), i = C({
|
|
110
111
|
get: () => e.value === "comments",
|
|
111
112
|
set: (t) => e.value = t ? "comments" : null
|
|
112
|
-
}), a = u(!1), o = u(
|
|
113
|
+
}), a = u(!1), o = u(void 0), s = u(!1), c = u(null), l = C(() => e.value !== null), d = C(() => {
|
|
113
114
|
let t = e.value;
|
|
114
115
|
return t === "ai-chat" || t === "design-reference" || t === "scoring" ? t : null;
|
|
115
|
-
}),
|
|
116
|
-
function
|
|
117
|
-
|
|
116
|
+
}), f = C(() => s.value || e.value === "ai-chat" || e.value === "design-reference" || e.value === "scoring");
|
|
117
|
+
function p() {
|
|
118
|
+
s.value = !s.value;
|
|
118
119
|
}
|
|
119
|
-
function
|
|
120
|
-
|
|
120
|
+
function m(t) {
|
|
121
|
+
s.value = !1, e.value = e.value === t ? null : t;
|
|
121
122
|
}
|
|
122
|
-
return I(
|
|
123
|
-
|
|
123
|
+
return I(c, () => {
|
|
124
|
+
s.value = !1;
|
|
124
125
|
}), {
|
|
125
126
|
activePanel: e,
|
|
126
127
|
aiChatOpen: t,
|
|
127
128
|
scoringPanelOpen: n,
|
|
128
129
|
designReferenceOpen: r,
|
|
129
130
|
commentsOpen: i,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
handleAiFeatureSelect: h
|
|
131
|
+
mediaLibraryOpen: a,
|
|
132
|
+
mediaLibraryAccept: o,
|
|
133
|
+
aiMenuOpen: s,
|
|
134
|
+
aiMenuRef: c,
|
|
135
|
+
rightPanelOpen: l,
|
|
136
|
+
activeAiFeature: d,
|
|
137
|
+
aiButtonActive: f,
|
|
138
|
+
toggleAiMenu: p,
|
|
139
|
+
handleAiFeatureSelect: m
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
142
|
//#endregion
|
|
143
143
|
//#region src/cloud/composables/useCollabUndoWarning.ts
|
|
144
|
-
function
|
|
144
|
+
function Be(e) {
|
|
145
145
|
let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i = u(!1), a = u(!1), { start: o } = F(() => {
|
|
146
146
|
a.value = !1;
|
|
147
147
|
}, k, { immediate: !1 });
|
|
@@ -155,7 +155,7 @@ function Le(e) {
|
|
|
155
155
|
}
|
|
156
156
|
//#endregion
|
|
157
157
|
//#region src/cloud/composables/useCloudFeatureFlags.ts
|
|
158
|
-
function
|
|
158
|
+
function Ve(e) {
|
|
159
159
|
let { planConfigInstance: t, aiConfig: n, editor: r } = e, i = C(() => t.hasFeature("ai_generation") && n.hasAnyMenuFeature.value), a = C(() => t.hasFeature("test_email")), o = C(() => !!r.state.template?.id), s = C(() => t.hasFeature("white_label")), c = C(() => t.config.value?.limits.max_templates ?? null), l = C(() => t.config.value?.template_count ?? 0), d = u(!1), f = u("idle"), p = u(""), { start: m } = F(() => {
|
|
160
160
|
f.value = "idle";
|
|
161
161
|
}, 3e3, { immediate: !1 });
|
|
@@ -174,7 +174,7 @@ function Re(e) {
|
|
|
174
174
|
}
|
|
175
175
|
//#endregion
|
|
176
176
|
//#region src/cloud/composables/useCloudMediaLibrary.ts
|
|
177
|
-
function
|
|
177
|
+
function He(e) {
|
|
178
178
|
let { onRequestMedia: t, mediaLibraryOpen: n, mediaLibraryAccept: r, authManager: i, getMediaConfig: a, onError: s } = e, c = null;
|
|
179
179
|
function l(e) {
|
|
180
180
|
return {
|
|
@@ -236,30 +236,30 @@ function ze(e) {
|
|
|
236
236
|
}
|
|
237
237
|
//#endregion
|
|
238
238
|
//#region src/cloud/composables/useCloudInitialization.ts
|
|
239
|
-
function
|
|
240
|
-
let { config: t, translations: n, fontsManager: r, emit: i, getCommentsSidebar: o } = e, s = u(!0), c = u(!1), l = u(null), d = !1, f = { value: null }, p = null, m = null, h = new
|
|
239
|
+
function Ue(e) {
|
|
240
|
+
let { config: t, translations: n, fontsManager: r, emit: i, getCommentsSidebar: o } = e, s = u(!0), c = u(!1), l = u(null), d = !1, f = { value: null }, p = null, m = null, h = new Ne({
|
|
241
241
|
...t.auth,
|
|
242
242
|
onError: t.onError
|
|
243
|
-
}), g =
|
|
243
|
+
}), g = we({
|
|
244
244
|
authManager: h,
|
|
245
245
|
onError: t.onError
|
|
246
|
-
}), v = u(/* @__PURE__ */ new Map()), y =
|
|
246
|
+
}), v = u(/* @__PURE__ */ new Map()), y = Ae({
|
|
247
247
|
authManager: h,
|
|
248
248
|
defaultFontFamily: t.fonts?.defaultFont,
|
|
249
249
|
templateDefaults: t.templateDefaults,
|
|
250
250
|
onError: t.onError,
|
|
251
251
|
lockedBlocks: v
|
|
252
|
-
}), b =
|
|
252
|
+
}), b = xe({
|
|
253
253
|
authManager: h,
|
|
254
254
|
onError: t.onError
|
|
255
255
|
});
|
|
256
|
-
t.mcp?.enabled &&
|
|
256
|
+
t.mcp?.enabled && Te({
|
|
257
257
|
editor: y,
|
|
258
258
|
channel: b.channel,
|
|
259
259
|
onOperation: t.mcp.onOperation
|
|
260
260
|
});
|
|
261
261
|
let x = null;
|
|
262
|
-
t.collaboration?.enabled && (x =
|
|
262
|
+
t.collaboration?.enabled && (x = Se({
|
|
263
263
|
authManager: h,
|
|
264
264
|
editor: y,
|
|
265
265
|
channel: b.channel,
|
|
@@ -270,7 +270,7 @@ function Be(e) {
|
|
|
270
270
|
onBlockUnlocked: t.collaboration.onBlockUnlocked
|
|
271
271
|
}), a(() => x.lockedBlocks.value, (e) => {
|
|
272
272
|
v.value = e;
|
|
273
|
-
}, { immediate: !0 }),
|
|
273
|
+
}, { immediate: !0 }), De(y, x));
|
|
274
274
|
let S = C(() => !!t.collaboration?.enabled && g.hasFeature("collaboration")), w = N({
|
|
275
275
|
editor: y,
|
|
276
276
|
config: {
|
|
@@ -286,7 +286,7 @@ function Be(e) {
|
|
|
286
286
|
logicTags: t.logicTags,
|
|
287
287
|
displayConditions: t.displayConditions,
|
|
288
288
|
onRequestMedia: null,
|
|
289
|
-
lint:
|
|
289
|
+
lint: q(t),
|
|
290
290
|
onSave: () => {
|
|
291
291
|
f.value?.().catch((e) => {
|
|
292
292
|
t.onError?.(e);
|
|
@@ -307,13 +307,13 @@ function Be(e) {
|
|
|
307
307
|
keyboardOptions: { onBeforeUndo: () => m?.showCollabUndoWarning() },
|
|
308
308
|
editorRoot: e.editorRoot,
|
|
309
309
|
containerEl: e.containerEl
|
|
310
|
-
}), T =
|
|
310
|
+
}), T = Be({
|
|
311
311
|
isCollaborationEnabled: S,
|
|
312
312
|
getCollaboratorCount: () => x?.collaborators.value.length ?? 0,
|
|
313
313
|
canUndo: w.history.canUndo
|
|
314
314
|
});
|
|
315
315
|
m = T;
|
|
316
|
-
let E =
|
|
316
|
+
let E = Re({
|
|
317
317
|
authManager: h,
|
|
318
318
|
editor: y,
|
|
319
319
|
history: w.history,
|
|
@@ -322,11 +322,11 @@ function Be(e) {
|
|
|
322
322
|
onError: t.onError
|
|
323
323
|
});
|
|
324
324
|
p = E;
|
|
325
|
-
let D =
|
|
325
|
+
let D = ze(), O = Me(t.ai), k = Ve({
|
|
326
326
|
planConfigInstance: g,
|
|
327
327
|
aiConfig: O,
|
|
328
328
|
editor: y
|
|
329
|
-
}), A =
|
|
329
|
+
}), A = He({
|
|
330
330
|
onRequestMedia: t.onRequestMedia,
|
|
331
331
|
mediaLibraryOpen: D.mediaLibraryOpen,
|
|
332
332
|
mediaLibraryAccept: D.mediaLibraryAccept,
|
|
@@ -338,19 +338,32 @@ function Be(e) {
|
|
|
338
338
|
onBlockMove: y.moveBlock,
|
|
339
339
|
onBlockAdd: y.addBlock
|
|
340
340
|
});
|
|
341
|
-
let P =
|
|
341
|
+
let P = Oe({
|
|
342
342
|
authManager: h,
|
|
343
343
|
getFontsConfig: () => t.fonts,
|
|
344
344
|
canUseCustomFonts: () => g.hasFeature("custom_fonts")
|
|
345
|
-
}), F =
|
|
345
|
+
}), F = Ie({
|
|
346
346
|
authManager: h,
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
347
|
+
isAuthReady: c
|
|
348
|
+
}), I = t.testEmail ?? null, R = re({
|
|
349
|
+
provider: I ?? je({
|
|
350
|
+
authManager: h,
|
|
351
|
+
getTemplateId: () => y.state.template?.id ?? null,
|
|
352
|
+
save: () => y.save(),
|
|
353
|
+
exportHtml: (e) => P.exportHtml(e),
|
|
354
|
+
allowedEmails: F.allowedEmails,
|
|
355
|
+
getSignature: F.getSignature,
|
|
356
|
+
onBeforeTestEmail: t.onBeforeTestEmail
|
|
357
|
+
}),
|
|
358
|
+
getContent: () => y.content.value,
|
|
359
|
+
renderMjml: () => le({
|
|
360
|
+
getContent: () => y.content.value,
|
|
361
|
+
renderCustomBlock: w.registry.renderCustomBlock,
|
|
362
|
+
getCustomBlockStylesheet: (e) => w.registry.getDefinition(e)?.stylesheet
|
|
363
|
+
}),
|
|
350
364
|
onError: t.onError,
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
}), I = je({
|
|
365
|
+
isAvailable: I ? () => !0 : () => F.isEnabled.value && k.canSendTestEmail.value && k.hasTemplateSaved.value
|
|
366
|
+
}), H = Ce({
|
|
354
367
|
authManager: h,
|
|
355
368
|
getTemplateId: () => y.state.template?.id ?? null,
|
|
356
369
|
getSocketId: () => b.getSocketId(),
|
|
@@ -359,45 +372,46 @@ function Be(e) {
|
|
|
359
372
|
isAuthReady: c,
|
|
360
373
|
hasCommentingFeature: () => t.commenting !== !1 && g.hasFeature("commenting")
|
|
361
374
|
});
|
|
362
|
-
|
|
363
|
-
comments:
|
|
375
|
+
Pe({
|
|
376
|
+
comments: H,
|
|
364
377
|
channel: b.channel
|
|
365
378
|
});
|
|
366
|
-
let
|
|
367
|
-
provider:
|
|
379
|
+
let U = typeof t.savedBlocks == "object" && t.savedBlocks !== null ? t.savedBlocks : null, W = oe({
|
|
380
|
+
provider: U ?? ke(h),
|
|
368
381
|
editor: y,
|
|
369
382
|
onError: t.onError,
|
|
370
|
-
isAvailable:
|
|
371
|
-
}),
|
|
383
|
+
isAvailable: U ? () => !0 : () => t.savedBlocks !== !1 && g.hasFeature("saved_modules")
|
|
384
|
+
}), G = Fe({
|
|
372
385
|
authManager: h,
|
|
373
386
|
getTemplateId: () => y.state.template?.id ?? null
|
|
374
387
|
});
|
|
375
|
-
function
|
|
388
|
+
function K(e) {
|
|
376
389
|
D.commentsOpen.value = !0, queueMicrotask(() => {
|
|
377
390
|
o()?.filterByBlock(e);
|
|
378
391
|
});
|
|
379
392
|
}
|
|
380
|
-
_(L, A.handleRequestMedia), _(
|
|
393
|
+
_(L, A.handleRequestMedia), _(z, h), _(V, O), _(te, H), _(ee, G), _(B, {
|
|
381
394
|
plan: g,
|
|
382
395
|
ai: O,
|
|
383
396
|
comments: {
|
|
384
|
-
getBlockCount: (e) =>
|
|
385
|
-
openForBlock:
|
|
397
|
+
getBlockCount: (e) => H.commentCountByBlock.value.get(e) ?? 0,
|
|
398
|
+
openForBlock: K
|
|
386
399
|
},
|
|
387
|
-
savedBlocks:
|
|
400
|
+
savedBlocks: W.capability,
|
|
401
|
+
testEmail: R.capability
|
|
388
402
|
});
|
|
389
|
-
function
|
|
403
|
+
function ne(e) {
|
|
390
404
|
g.hasFeature("theme_customization") && (w.themeOverrides.value = e);
|
|
391
405
|
}
|
|
392
|
-
function
|
|
406
|
+
function ie(e) {
|
|
393
407
|
y.setUiTheme(e);
|
|
394
408
|
}
|
|
395
|
-
async function
|
|
409
|
+
async function J() {
|
|
396
410
|
s.value = !0, l.value = null;
|
|
397
411
|
try {
|
|
398
412
|
if (await h.initialize(), d) return;
|
|
399
413
|
c.value = !0;
|
|
400
|
-
let e = await
|
|
414
|
+
let e = await Ee({ authManager: h });
|
|
401
415
|
if (d) return;
|
|
402
416
|
if (!e.api.ok) throw Error("Health check failed: API is not reachable");
|
|
403
417
|
if (!e.auth.ok) throw Error(`Health check failed: authentication error${e.auth.error ? ` - ${e.auth.error}` : ""}`);
|
|
@@ -411,7 +425,7 @@ function Be(e) {
|
|
|
411
425
|
d || (s.value = !1);
|
|
412
426
|
}
|
|
413
427
|
}
|
|
414
|
-
function
|
|
428
|
+
function ae() {
|
|
415
429
|
d = !0, r.cleanupFontLinks(), b.disconnect(), w.destroy(), t.onUnmount?.();
|
|
416
430
|
}
|
|
417
431
|
return {
|
|
@@ -430,24 +444,24 @@ function Be(e) {
|
|
|
430
444
|
featureFlags: k,
|
|
431
445
|
mediaLib: A,
|
|
432
446
|
exporter: P,
|
|
433
|
-
testEmail:
|
|
434
|
-
commentsInstance:
|
|
435
|
-
savedBlocks:
|
|
436
|
-
scoringInstance:
|
|
447
|
+
testEmail: R,
|
|
448
|
+
commentsInstance: H,
|
|
449
|
+
savedBlocks: W,
|
|
450
|
+
scoringInstance: G,
|
|
437
451
|
panelState: D,
|
|
438
452
|
snapshotPreview: E,
|
|
439
453
|
collabWarning: T,
|
|
440
454
|
onSaveHook: f,
|
|
441
|
-
initialize:
|
|
442
|
-
destroy:
|
|
443
|
-
setThemeOverrides:
|
|
444
|
-
setUiTheme:
|
|
445
|
-
openCommentsForBlock:
|
|
455
|
+
initialize: J,
|
|
456
|
+
destroy: ae,
|
|
457
|
+
setThemeOverrides: ne,
|
|
458
|
+
setUiTheme: ie,
|
|
459
|
+
openCommentsForBlock: K
|
|
446
460
|
};
|
|
447
461
|
}
|
|
448
462
|
//#endregion
|
|
449
463
|
//#region src/utils/preRenderCustomBlocks.ts
|
|
450
|
-
async function
|
|
464
|
+
async function We(e, t) {
|
|
451
465
|
let n = async (e) => {
|
|
452
466
|
if (A(e)) {
|
|
453
467
|
let n = e;
|
|
@@ -466,10 +480,10 @@ async function Ve(e, t) {
|
|
|
466
480
|
}
|
|
467
481
|
//#endregion
|
|
468
482
|
//#region src/cloud/composables/useCloudLifecycle.ts
|
|
469
|
-
function
|
|
483
|
+
function Ge(e) {
|
|
470
484
|
let { config: t, editor: n, websocket: r, planConfigInstance: i, snapshotPreview: a, core: o, exporter: s, featureFlags: c, isDestroyed: l } = e;
|
|
471
485
|
function u() {
|
|
472
|
-
return
|
|
486
|
+
return be(i.config.value.websocket);
|
|
473
487
|
}
|
|
474
488
|
async function d(e) {
|
|
475
489
|
let i = await n.create(e);
|
|
@@ -482,7 +496,7 @@ function He(e) {
|
|
|
482
496
|
async function p() {
|
|
483
497
|
c.isSaveExporting.value = !0, c.saveStatus.value = "idle";
|
|
484
498
|
try {
|
|
485
|
-
if (await
|
|
499
|
+
if (await We(n.content.value, o.registry), l()) throw Error("Component unmounted during save");
|
|
486
500
|
let e = await n.save();
|
|
487
501
|
if (l()) throw Error("Component unmounted during save");
|
|
488
502
|
a.initSnapshotHistory(), a.snapshotHistoryInstance.value?.loadSnapshots();
|
|
@@ -509,7 +523,7 @@ function He(e) {
|
|
|
509
523
|
}
|
|
510
524
|
//#endregion
|
|
511
525
|
//#region src/cloud/composables/useCloudSaveGate.ts
|
|
512
|
-
function
|
|
526
|
+
function Ke(e) {
|
|
513
527
|
let t = u(!1), n = null, r = C(() => e.planConfig.value?.accessibility?.blockOnError === !0), i = C(() => r.value ? e.issues.value.filter((e) => e.severity === "error") : []), a = C(() => i.value.length > 0);
|
|
514
528
|
async function o(e) {
|
|
515
529
|
return a.value ? (n = e, t.value = !0, !1) : (await e(), !0);
|
|
@@ -532,7 +546,7 @@ function Ue(e) {
|
|
|
532
546
|
}
|
|
533
547
|
//#endregion
|
|
534
548
|
//#region src/cloud/components/CloudSaveGateModal.vue?vue&type=script&setup=true&lang.ts
|
|
535
|
-
var
|
|
549
|
+
var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl:max-w-md tpl:flex-col tpl:gap-4 tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-5 tpl:shadow-[var(--tpl-shadow-md)]" }, Ye = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Xe = { class: "tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ze = { class: "tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Qe = { class: "tpl:m-0 tpl:flex tpl:max-h-64 tpl:list-none tpl:flex-col tpl:gap-1.5 tpl:overflow-y-auto tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-2" }, $e = { class: "tpl:text-xs tpl:text-[var(--tpl-text)]" }, et = { class: "tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, tt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, nt = /* @__PURE__ */ f({
|
|
536
550
|
__name: "CloudSaveGateModal",
|
|
537
551
|
props: {
|
|
538
552
|
open: { type: Boolean },
|
|
@@ -554,18 +568,18 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
554
568
|
"aria-label": b(i).saveGate.title,
|
|
555
569
|
class: "tpl:fixed tpl:inset-0 tpl:z-50 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/40 tpl:p-6",
|
|
556
570
|
onClick: a[2] ||= E((e) => r("cancel"), ["self"])
|
|
557
|
-
}, [p("div",
|
|
558
|
-
p("header",
|
|
571
|
+
}, [p("div", Je, [
|
|
572
|
+
p("header", Ye, [g(b(_e), {
|
|
559
573
|
size: 18,
|
|
560
574
|
"stroke-width": 2,
|
|
561
575
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
562
|
-
}), p("h2",
|
|
563
|
-
p("p",
|
|
564
|
-
p("ul",
|
|
576
|
+
}), p("h2", Xe, c(b(i).saveGate.title), 1)]),
|
|
577
|
+
p("p", Ze, c(b(i).saveGate.body), 1),
|
|
578
|
+
p("ul", Qe, [(s(!0), m(S, null, e(t.issues, (e) => (s(), m("li", {
|
|
565
579
|
key: `${e.ruleId}-${e.blockId ?? "template"}`,
|
|
566
580
|
class: "tpl:flex tpl:flex-col tpl:gap-0.5 tpl:rounded tpl:px-2 tpl:py-1.5"
|
|
567
|
-
}, [p("span",
|
|
568
|
-
p("footer",
|
|
581
|
+
}, [p("span", $e, c(e.message), 1), p("span", et, c(e.ruleId), 1)]))), 128))]),
|
|
582
|
+
p("footer", tt, [p("button", {
|
|
569
583
|
type: "button",
|
|
570
584
|
class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]",
|
|
571
585
|
onClick: a[0] ||= (e) => r("cancel")
|
|
@@ -574,11 +588,11 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
574
588
|
class: "tpl:rounded-md tpl:bg-[var(--tpl-danger)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-white",
|
|
575
589
|
onClick: a[1] ||= (e) => r("confirm")
|
|
576
590
|
}, c(b(i).saveGate.confirm), 1)])
|
|
577
|
-
])], 8,
|
|
591
|
+
])], 8, qe)) : w("", !0)]),
|
|
578
592
|
_: 1
|
|
579
593
|
}));
|
|
580
594
|
}
|
|
581
|
-
}),
|
|
595
|
+
}), rt = {
|
|
582
596
|
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",
|
|
583
597
|
style: {
|
|
584
598
|
"background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)",
|
|
@@ -587,24 +601,24 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
587
601
|
"box-shadow": "var(--tpl-shadow-md)",
|
|
588
602
|
"border-bottom": "1px solid var(--tpl-border)"
|
|
589
603
|
}
|
|
590
|
-
},
|
|
604
|
+
}, it = { class: "tpl-header-left tpl:flex tpl:min-w-[200px] tpl:items-center tpl:gap-3" }, at = {
|
|
591
605
|
key: 0,
|
|
592
606
|
class: "tpl:text-xs tpl:opacity-60 tpl:text-[var(--tpl-text-muted)]"
|
|
593
|
-
},
|
|
607
|
+
}, ot = { class: "tpl-header-center tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, st = { class: "tpl-header-right tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, ct = ["data-tooltip"], lt = {
|
|
594
608
|
key: 1,
|
|
595
609
|
"aria-live": "polite",
|
|
596
610
|
class: "tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-success)]"
|
|
597
|
-
},
|
|
611
|
+
}, ut = {
|
|
598
612
|
key: 2,
|
|
599
613
|
"aria-live": "polite",
|
|
600
614
|
class: "tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
601
|
-
},
|
|
615
|
+
}, dt = ["aria-label", "aria-expanded"], ft = {
|
|
602
616
|
key: 0,
|
|
603
617
|
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)]"
|
|
604
|
-
},
|
|
618
|
+
}, pt = ["aria-expanded"], mt = {
|
|
605
619
|
key: 0,
|
|
606
620
|
class: "tpl:absolute tpl:right-0 tpl:top-full tpl:z-50 tpl:mt-1 tpl:origin-top-right"
|
|
607
|
-
},
|
|
621
|
+
}, ht = ["disabled"], gt = ["disabled"], _t = /* @__PURE__ */ f({
|
|
608
622
|
__name: "CloudHeader",
|
|
609
623
|
props: {
|
|
610
624
|
editor: {},
|
|
@@ -622,22 +636,22 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
622
636
|
},
|
|
623
637
|
emits: ["save"],
|
|
624
638
|
setup(e) {
|
|
625
|
-
let t = h(() => import("./CollaboratorBar-C_1SF7Xf.js")), r = h(() => import("./SnapshotHistory-DWlQ3Eh0.js")), a = h(() => import("./AiFeatureMenu-CcqjRMFW.js")), { t: o,
|
|
626
|
-
return (
|
|
627
|
-
p("div",
|
|
639
|
+
let t = h(() => import("./CollaboratorBar-C_1SF7Xf.js")), r = h(() => import("./SnapshotHistory-DWlQ3Eh0.js")), a = h(() => import("./AiFeatureMenu-CcqjRMFW.js")), { t: o } = H(), { t: u, format: d } = Q();
|
|
640
|
+
return (f, h) => (s(), m("header", rt, [
|
|
641
|
+
p("div", it, [e.featureFlags.templateLimit.value === null ? w("", !0) : (s(), m("span", at, c(b(d)(b(u).header.templatesUsed, {
|
|
628
642
|
used: e.featureFlags.templateCount.value,
|
|
629
643
|
max: e.featureFlags.templateLimit.value
|
|
630
644
|
})), 1))]),
|
|
631
|
-
p("div",
|
|
632
|
-
g(
|
|
645
|
+
p("div", ot, [
|
|
646
|
+
g(Z, {
|
|
633
647
|
viewport: e.editor.state.viewport,
|
|
634
648
|
onChange: e.editor.setViewport
|
|
635
649
|
}, null, 8, ["viewport", "onChange"]),
|
|
636
|
-
g(
|
|
650
|
+
g(J, {
|
|
637
651
|
"dark-mode": e.editor.state.darkMode,
|
|
638
652
|
onChange: e.editor.setDarkMode
|
|
639
653
|
}, null, 8, ["dark-mode", "onChange"]),
|
|
640
|
-
g(
|
|
654
|
+
g(K, {
|
|
641
655
|
"preview-mode": e.editor.state.previewMode,
|
|
642
656
|
onChange: e.editor.setPreviewMode
|
|
643
657
|
}, null, 8, ["preview-mode", "onChange"]),
|
|
@@ -661,22 +675,22 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
661
675
|
"onNavigate"
|
|
662
676
|
])) : w("", !0)
|
|
663
677
|
]),
|
|
664
|
-
p("div",
|
|
678
|
+
p("div", st, [
|
|
665
679
|
e.featureFlags.saveStatus.value === "error" ? (s(), m("div", {
|
|
666
680
|
key: 0,
|
|
667
681
|
"aria-live": "assertive",
|
|
668
682
|
class: "tpl-tooltip tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]",
|
|
669
683
|
"data-tooltip": e.featureFlags.saveErrorMessage.value
|
|
670
|
-
}, [g(b(
|
|
684
|
+
}, [g(b(G), {
|
|
671
685
|
size: 12,
|
|
672
686
|
"stroke-width": 2.5
|
|
673
|
-
}), y(" " + c(b(
|
|
687
|
+
}), y(" " + c(b(u).header.saveFailed), 1)], 8, ct)) : e.featureFlags.saveStatus.value === "saved" ? (s(), m("div", lt, [g(b(W), {
|
|
674
688
|
size: 12,
|
|
675
689
|
"stroke-width": 2.5
|
|
676
|
-
}), y(" " + c(b(
|
|
690
|
+
}), y(" " + c(b(u).header.saved), 1)])) : e.editor.state.isDirty ? (s(), m("div", ut, [h[4] ||= p("span", { class: "tpl-pulse tpl:size-1.5 tpl:rounded-full tpl:bg-[var(--tpl-primary)]" }, null, -1), y(" " + c(b(u).header.unsaved), 1)])) : w("", !0),
|
|
677
691
|
e.commentsInstance.isEnabled.value && e.featureFlags.hasTemplateSaved.value ? (s(), m("button", {
|
|
678
692
|
key: 3,
|
|
679
|
-
"aria-label": e.commentsInstance.unresolvedCount.value > 0 ? `${b(
|
|
693
|
+
"aria-label": e.commentsInstance.unresolvedCount.value > 0 ? `${b(u).comments.button} (${e.commentsInstance.unresolvedCount.value})` : b(u).comments.button,
|
|
680
694
|
"aria-expanded": e.panelState.commentsOpen.value,
|
|
681
695
|
class: i(b($)),
|
|
682
696
|
style: n({
|
|
@@ -684,15 +698,15 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
684
698
|
color: e.panelState.commentsOpen.value ? "var(--tpl-bg)" : "var(--tpl-primary)",
|
|
685
699
|
borderColor: "var(--tpl-primary)"
|
|
686
700
|
}),
|
|
687
|
-
onClick:
|
|
701
|
+
onClick: h[0] ||= (t) => e.panelState.commentsOpen.value = !e.panelState.commentsOpen.value
|
|
688
702
|
}, [
|
|
689
|
-
g(b(
|
|
703
|
+
g(b(X), {
|
|
690
704
|
size: 16,
|
|
691
705
|
"stroke-width": 2
|
|
692
706
|
}),
|
|
693
|
-
y(" " + c(b(
|
|
694
|
-
e.commentsInstance.unresolvedCount.value > 0 && !e.panelState.commentsOpen.value ? (s(), m("span",
|
|
695
|
-
], 14,
|
|
707
|
+
y(" " + c(b(u).comments.button) + " ", 1),
|
|
708
|
+
e.commentsInstance.unresolvedCount.value > 0 && !e.panelState.commentsOpen.value ? (s(), m("span", ft, c(e.commentsInstance.unresolvedCount.value), 1)) : w("", !0)
|
|
709
|
+
], 14, dt)) : w("", !0),
|
|
696
710
|
e.featureFlags.canUseAiGeneration.value && e.featureFlags.hasTemplateSaved.value ? (s(), m("div", {
|
|
697
711
|
key: 4,
|
|
698
712
|
ref: (t) => e.panelState.aiMenuRef.value = t,
|
|
@@ -700,12 +714,12 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
700
714
|
}, [p("button", {
|
|
701
715
|
"aria-expanded": e.panelState.aiMenuOpen.value,
|
|
702
716
|
class: i(["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"]),
|
|
703
|
-
onClick:
|
|
704
|
-
}, [g(b(
|
|
717
|
+
onClick: h[1] ||= E((...t) => e.panelState.toggleAiMenu && e.panelState.toggleAiMenu(...t), ["stop"])
|
|
718
|
+
}, [g(b(ge), {
|
|
705
719
|
size: 16,
|
|
706
720
|
"stroke-width": 2,
|
|
707
721
|
class: "tpl-ai-btn-icon"
|
|
708
|
-
}), y(" " + c(b(
|
|
722
|
+
}), y(" " + c(b(u).aiChat.button), 1)], 10, pt), g(O, {
|
|
709
723
|
"enter-active-class": "tpl:transition-all tpl:duration-150 tpl:ease-out",
|
|
710
724
|
"enter-from-class": "tpl:scale-95 tpl:opacity-0",
|
|
711
725
|
"enter-to-class": "tpl:scale-100 tpl:opacity-100",
|
|
@@ -713,32 +727,33 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
713
727
|
"leave-from-class": "tpl:scale-100 tpl:opacity-100",
|
|
714
728
|
"leave-to-class": "tpl:scale-95 tpl:opacity-0"
|
|
715
729
|
}, {
|
|
716
|
-
default: l(() => [e.panelState.aiMenuOpen.value ? (s(), m("div",
|
|
730
|
+
default: l(() => [e.panelState.aiMenuOpen.value ? (s(), m("div", mt, [g(b(a), {
|
|
717
731
|
"active-feature": e.panelState.activeAiFeature.value,
|
|
718
732
|
onSelect: e.panelState.handleAiFeatureSelect
|
|
719
733
|
}, null, 8, ["active-feature", "onSelect"])])) : w("", !0)]),
|
|
720
734
|
_: 1
|
|
721
735
|
})], 512)) : w("", !0),
|
|
722
|
-
e.testEmail.
|
|
736
|
+
e.testEmail.isAvailable.value ? (s(), m("button", {
|
|
723
737
|
key: 5,
|
|
724
738
|
class: i(b($)),
|
|
739
|
+
"data-testid": "test-email-trigger",
|
|
725
740
|
style: {
|
|
726
741
|
"background-color": "transparent",
|
|
727
742
|
color: "var(--tpl-primary)",
|
|
728
743
|
"border-color": "var(--tpl-primary)"
|
|
729
744
|
},
|
|
730
|
-
disabled: e.testEmail.isSending.value
|
|
731
|
-
onClick:
|
|
732
|
-
}, [e.testEmail.isSending.value ? (s(), v(b(
|
|
745
|
+
disabled: e.testEmail.isSending.value,
|
|
746
|
+
onClick: h[2] ||= (t) => e.testEmail.open()
|
|
747
|
+
}, [e.testEmail.isSending.value ? (s(), v(b(Y), {
|
|
733
748
|
key: 1,
|
|
734
749
|
class: "tpl-spinner",
|
|
735
750
|
size: 16,
|
|
736
751
|
"stroke-width": 2
|
|
737
|
-
})) : (s(), v(b(
|
|
752
|
+
})) : (s(), v(b(he), {
|
|
738
753
|
key: 0,
|
|
739
754
|
size: 16,
|
|
740
755
|
"stroke-width": 2
|
|
741
|
-
})), y(" " + c(b(o).testEmail.button), 1)], 10,
|
|
756
|
+
})), y(" " + c(b(o).testEmail.button), 1)], 10, ht)) : w("", !0),
|
|
742
757
|
p("button", {
|
|
743
758
|
class: i(b($)),
|
|
744
759
|
style: {
|
|
@@ -747,21 +762,21 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
747
762
|
"border-color": "var(--tpl-primary)"
|
|
748
763
|
},
|
|
749
764
|
disabled: e.isSaveDisabled,
|
|
750
|
-
onClick:
|
|
751
|
-
}, [e.isSaving ? (s(), v(b(
|
|
765
|
+
onClick: h[3] ||= (e) => f.$emit("save")
|
|
766
|
+
}, [e.isSaving ? (s(), v(b(Y), {
|
|
752
767
|
key: 1,
|
|
753
768
|
class: "tpl-spinner",
|
|
754
769
|
size: 16,
|
|
755
770
|
"stroke-width": 2
|
|
756
|
-
})) : (s(), v(b(
|
|
771
|
+
})) : (s(), v(b(Le), {
|
|
757
772
|
key: 0,
|
|
758
773
|
size: 16,
|
|
759
774
|
"stroke-width": 2
|
|
760
|
-
})), y(" " + c(e.isSaving ? b(
|
|
775
|
+
})), y(" " + c(e.isSaving ? b(u).header.saving : b(u).header.save), 1)], 10, gt)
|
|
761
776
|
])
|
|
762
777
|
]));
|
|
763
778
|
}
|
|
764
|
-
}),
|
|
779
|
+
}), vt = /* @__PURE__ */ f({
|
|
765
780
|
__name: "CloudPanels",
|
|
766
781
|
props: {
|
|
767
782
|
config: {},
|
|
@@ -769,61 +784,46 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
769
784
|
core: {},
|
|
770
785
|
panelState: {},
|
|
771
786
|
planConfigInstance: {},
|
|
772
|
-
testEmail: {},
|
|
773
787
|
mediaLib: {}
|
|
774
788
|
},
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
let r = h(() => import("./AiChatSidebar-K_AehWc-.js")), i = h(() => import("./CommentsSidebar-DvNEdugN.js")), a = h(() => import("./DesignReferenceSidebar-DNmK3dxp.js")), o = h(() => import("./TemplateScoringPanel-ifGGGWs5.js")), c = h(() => import("./TestEmailModal-DComAFpR.js")), l = h(async () => {
|
|
789
|
+
setup(e, { expose: t }) {
|
|
790
|
+
let n = h(() => import("./AiChatSidebar-Bru6-ziQ.js")), r = h(() => import("./CommentsSidebar-DvNEdugN.js")), i = h(() => import("./DesignReferenceSidebar-BxPo0zyx.js")), a = h(() => import("./TemplateScoringPanel-ifGGGWs5.js")), o = h(async () => {
|
|
778
791
|
try {
|
|
779
792
|
return (await import("@templatical/media-library")).MediaLibraryModal;
|
|
780
793
|
} catch {
|
|
781
794
|
throw Error("[Templatical] Cloud media library requires the optional peer dependency '@templatical/media-library'. Please install it.");
|
|
782
795
|
}
|
|
783
|
-
})
|
|
784
|
-
function
|
|
796
|
+
});
|
|
797
|
+
function c(e, t, n) {
|
|
785
798
|
t.history.record(), n.setContent(e), t.conditionPreview.reset();
|
|
786
799
|
}
|
|
787
|
-
let
|
|
788
|
-
function
|
|
789
|
-
|
|
800
|
+
let l = u(null);
|
|
801
|
+
function d(e) {
|
|
802
|
+
l.value?.filterByBlock(e);
|
|
790
803
|
}
|
|
791
|
-
return t({ filterCommentsByBlock:
|
|
792
|
-
g(b(
|
|
804
|
+
return t({ filterCommentsByBlock: d }), (t, u) => (s(), m(S, null, [
|
|
805
|
+
g(b(n), {
|
|
793
806
|
visible: e.panelState.aiChatOpen.value,
|
|
794
|
-
"on-apply": (t) =>
|
|
795
|
-
onClose:
|
|
807
|
+
"on-apply": (t) => c(t, e.core, e.editor),
|
|
808
|
+
onClose: u[0] ||= (t) => e.panelState.aiChatOpen.value = !1
|
|
796
809
|
}, null, 8, ["visible", "on-apply"]),
|
|
797
|
-
g(b(
|
|
810
|
+
g(b(a), {
|
|
798
811
|
visible: e.panelState.scoringPanelOpen.value,
|
|
799
|
-
onClose:
|
|
812
|
+
onClose: u[1] ||= (t) => e.panelState.scoringPanelOpen.value = !1
|
|
800
813
|
}, null, 8, ["visible"]),
|
|
801
|
-
g(b(
|
|
814
|
+
g(b(i), {
|
|
802
815
|
visible: e.panelState.designReferenceOpen.value,
|
|
803
816
|
"has-existing-blocks": e.editor.content.value.blocks.length > 0,
|
|
804
|
-
onClose:
|
|
805
|
-
onApply:
|
|
817
|
+
onClose: u[2] ||= (t) => e.panelState.designReferenceOpen.value = !1,
|
|
818
|
+
onApply: u[3] ||= (t) => c(t, e.core, e.editor)
|
|
806
819
|
}, null, 8, ["visible", "has-existing-blocks"]),
|
|
807
|
-
g(b(
|
|
820
|
+
g(b(r), {
|
|
808
821
|
ref_key: "commentsSidebar",
|
|
809
|
-
ref:
|
|
822
|
+
ref: l,
|
|
810
823
|
visible: e.panelState.commentsOpen.value,
|
|
811
|
-
onClose:
|
|
824
|
+
onClose: u[4] ||= (t) => e.panelState.commentsOpen.value = !1
|
|
812
825
|
}, null, 8, ["visible"]),
|
|
813
|
-
g(b(
|
|
814
|
-
visible: e.panelState.testEmailModalOpen.value,
|
|
815
|
-
"allowed-emails": e.testEmail.allowedEmails.value,
|
|
816
|
-
"is-sending": e.testEmail.isSending.value,
|
|
817
|
-
error: e.testEmail.error.value,
|
|
818
|
-
onSend: n[5] ||= (e) => d("send-test-email", e),
|
|
819
|
-
onClose: n[6] ||= (t) => e.panelState.testEmailModalOpen.value = !1
|
|
820
|
-
}, null, 8, [
|
|
821
|
-
"visible",
|
|
822
|
-
"allowed-emails",
|
|
823
|
-
"is-sending",
|
|
824
|
-
"error"
|
|
825
|
-
]),
|
|
826
|
-
g(b(l), {
|
|
826
|
+
g(b(o), {
|
|
827
827
|
visible: e.panelState.mediaLibraryOpen.value,
|
|
828
828
|
accept: e.panelState.mediaLibraryAccept.value,
|
|
829
829
|
"popover-target": e.core.popoverRoot.value,
|
|
@@ -838,23 +838,23 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
838
838
|
])
|
|
839
839
|
], 64));
|
|
840
840
|
}
|
|
841
|
-
}),
|
|
841
|
+
}), yt = {
|
|
842
842
|
key: 0,
|
|
843
843
|
class: "tpl-loading tpl:absolute tpl:inset-0 tpl:z-overlay tpl:flex tpl:flex-col tpl:bg-[var(--tpl-bg)]"
|
|
844
|
-
},
|
|
844
|
+
}, bt = { class: "tpl:flex tpl:flex-1 tpl:overflow-hidden" }, xt = { 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)]" }, St = /* @__PURE__ */ f({
|
|
845
845
|
__name: "CloudLoadingOverlay",
|
|
846
846
|
props: { visible: { type: Boolean } },
|
|
847
847
|
setup(t) {
|
|
848
|
-
return (n, r) => t.visible ? (s(), m("div",
|
|
848
|
+
return (n, r) => t.visible ? (s(), m("div", yt, [r[1] ||= x("<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), p("div", bt, [p("div", xt, [(s(), m(S, null, e(5, (e) => p("div", {
|
|
849
849
|
key: e,
|
|
850
850
|
class: "tpl-shimmer tpl:size-7 tpl:rounded-[var(--tpl-radius-sm)]"
|
|
851
851
|
})), 64))]), r[0] ||= x("<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)])])) : w("", !0);
|
|
852
852
|
}
|
|
853
|
-
}),
|
|
853
|
+
}), Ct = {
|
|
854
854
|
key: 0,
|
|
855
855
|
role: "alert",
|
|
856
856
|
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)]"
|
|
857
|
-
},
|
|
857
|
+
}, wt = { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]" }, Tt = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center" }, Et = { class: "tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Dt = { class: "tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ot = /* @__PURE__ */ f({
|
|
858
858
|
__name: "CloudErrorOverlay",
|
|
859
859
|
props: {
|
|
860
860
|
error: {},
|
|
@@ -869,13 +869,13 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
869
869
|
function a(e) {
|
|
870
870
|
return "isNotFound" in e && !!e.isNotFound;
|
|
871
871
|
}
|
|
872
|
-
return (t, o) => e.visible && e.error ? (s(), m("div",
|
|
873
|
-
p("div",
|
|
872
|
+
return (t, o) => e.visible && e.error ? (s(), m("div", Ct, [
|
|
873
|
+
p("div", wt, [g(b(G), {
|
|
874
874
|
size: 32,
|
|
875
875
|
"stroke-width": 1.5,
|
|
876
876
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
877
877
|
})]),
|
|
878
|
-
p("div",
|
|
878
|
+
p("div", Tt, [p("h2", Et, c(b(r).error.title), 1), p("p", Dt, c(i(e.error)), 1)]),
|
|
879
879
|
a(e.error) ? w("", !0) : (s(), m("button", {
|
|
880
880
|
key: 0,
|
|
881
881
|
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)]",
|
|
@@ -883,20 +883,20 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
883
883
|
}, c(b(r).error.retry), 1))
|
|
884
884
|
])) : w("", !0);
|
|
885
885
|
}
|
|
886
|
-
}),
|
|
886
|
+
}), kt = {
|
|
887
887
|
key: 0,
|
|
888
888
|
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)]"
|
|
889
|
-
},
|
|
889
|
+
}, At = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-text)]" }, jt = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Mt = /* @__PURE__ */ f({
|
|
890
890
|
__name: "SnapshotPreviewBanner",
|
|
891
891
|
props: { visible: { type: Boolean } },
|
|
892
892
|
emits: ["cancel", "confirm"],
|
|
893
893
|
setup(e, { emit: t }) {
|
|
894
894
|
let n = t, { t: r } = Q();
|
|
895
|
-
return (t, i) => e.visible ? (s(), m("div",
|
|
895
|
+
return (t, i) => e.visible ? (s(), m("div", kt, [p("div", At, [g(b(me), {
|
|
896
896
|
size: 18,
|
|
897
897
|
"stroke-width": 2,
|
|
898
898
|
class: "tpl:text-[var(--tpl-primary)]"
|
|
899
|
-
}), p("span", null, c(b(r).snapshotPreview.message), 1)]), p("div",
|
|
899
|
+
}), p("span", null, c(b(r).snapshotPreview.message), 1)]), p("div", jt, [p("button", {
|
|
900
900
|
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)]",
|
|
901
901
|
style: { "background-color": "transparent" },
|
|
902
902
|
onClick: i[0] ||= (e) => n("cancel")
|
|
@@ -905,7 +905,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
905
905
|
onClick: i[1] ||= (e) => n("confirm")
|
|
906
906
|
}, c(b(r).snapshotPreview.restore), 1)])])) : w("", !0);
|
|
907
907
|
}
|
|
908
|
-
}),
|
|
908
|
+
}), Nt = {
|
|
909
909
|
key: 0,
|
|
910
910
|
role: "status",
|
|
911
911
|
"aria-live": "polite",
|
|
@@ -915,14 +915,14 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
915
915
|
color: "var(--tpl-text)",
|
|
916
916
|
border: "1px solid var(--tpl-warning)"
|
|
917
917
|
}
|
|
918
|
-
},
|
|
918
|
+
}, Pt = /* @__PURE__ */ f({
|
|
919
919
|
__name: "CollabUndoToast",
|
|
920
920
|
props: { visible: { type: Boolean } },
|
|
921
921
|
setup(e) {
|
|
922
|
-
let { t } =
|
|
923
|
-
return (n, r) => e.visible ? (s(), m("div",
|
|
922
|
+
let { t } = H();
|
|
923
|
+
return (n, r) => e.visible ? (s(), m("div", Nt, c(b(t).history.collabWarning), 1)) : w("", !0);
|
|
924
924
|
}
|
|
925
|
-
}),
|
|
925
|
+
}), Ft = ["data-tpl-theme"], It = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, Lt = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, Rt = ["aria-label"], zt = /*#__PURE__*/ ve(/* @__PURE__ */ f({
|
|
926
926
|
__name: "CloudEditor",
|
|
927
927
|
props: {
|
|
928
928
|
config: {},
|
|
@@ -933,67 +933,62 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
933
933
|
},
|
|
934
934
|
emits: ["ready"],
|
|
935
935
|
setup(e, { expose: a, emit: o }) {
|
|
936
|
-
let d = h(() => import("./SavedBlocksPanels-
|
|
937
|
-
_(
|
|
938
|
-
let
|
|
939
|
-
config:
|
|
940
|
-
translations:
|
|
941
|
-
fontsManager:
|
|
942
|
-
emit:
|
|
943
|
-
getCommentsSidebar: () =>
|
|
944
|
-
editorRoot:
|
|
945
|
-
containerEl:
|
|
946
|
-
}), { isInitializing:
|
|
947
|
-
async function me(
|
|
948
|
-
try {
|
|
949
|
-
await U.sendTestEmail(e), K.testEmailModalOpen.value = !1;
|
|
950
|
-
} catch {}
|
|
951
|
-
}
|
|
952
|
-
async function J() {
|
|
936
|
+
let d = h(() => import("./SavedBlocksPanels-CRf7zzFn.js")), f = h(() => import("./TestEmailPanel-B0u_Yd3X.js")), x = e;
|
|
937
|
+
_(R, x.cloudTranslations);
|
|
938
|
+
let S = o, C = u(null), k = u(null), A = Ue({
|
|
939
|
+
config: x.config,
|
|
940
|
+
translations: x.translations,
|
|
941
|
+
fontsManager: x.fontsManager,
|
|
942
|
+
emit: S,
|
|
943
|
+
getCommentsSidebar: () => C.value ? { filterByBlock: C.value.filterCommentsByBlock } : null,
|
|
944
|
+
editorRoot: x.shadowRoot,
|
|
945
|
+
containerEl: k
|
|
946
|
+
}), { isInitializing: j, isAuthReady: M, initError: N, planConfigInstance: F, websocket: I, collaboration: L, isCollaborationEnabled: ee, editor: z, core: B, featureFlags: V, mediaLib: te, exporter: H, testEmail: U, commentsInstance: W, savedBlocks: G, panelState: K, snapshotPreview: q, collabWarning: re, setThemeOverrides: J, setUiTheme: oe } = A, { showNotice: le } = P(() => x.config.smallScreenNotice);
|
|
947
|
+
async function me() {
|
|
953
948
|
try {
|
|
954
949
|
await q.confirmRestoreSnapshot();
|
|
955
950
|
} catch {}
|
|
956
951
|
}
|
|
957
|
-
let Y =
|
|
958
|
-
config:
|
|
959
|
-
editor:
|
|
960
|
-
websocket:
|
|
961
|
-
planConfigInstance:
|
|
952
|
+
let Y = Ge({
|
|
953
|
+
config: x.config,
|
|
954
|
+
editor: z,
|
|
955
|
+
websocket: I,
|
|
956
|
+
planConfigInstance: F,
|
|
962
957
|
snapshotPreview: q,
|
|
963
958
|
core: B,
|
|
964
|
-
exporter:
|
|
959
|
+
exporter: H,
|
|
965
960
|
featureFlags: V,
|
|
966
|
-
isDestroyed:
|
|
967
|
-
}), X =
|
|
961
|
+
isDestroyed: A.isDestroyed
|
|
962
|
+
}), X = Ke({
|
|
968
963
|
issues: B.templateLint ? B.templateLint.issues : u([]),
|
|
969
|
-
planConfig:
|
|
964
|
+
planConfig: F.config
|
|
970
965
|
});
|
|
971
966
|
async function Z() {
|
|
972
|
-
await X.tryRunSave(() => Y.saveTemplate().catch((e) =>
|
|
967
|
+
await X.tryRunSave(() => Y.saveTemplate().catch((e) => x.config.onError?.(e)));
|
|
973
968
|
}
|
|
974
|
-
return
|
|
975
|
-
|
|
969
|
+
return A.onSaveHook.value = Z, r(() => {
|
|
970
|
+
A.initialize();
|
|
976
971
|
}), t(() => {
|
|
977
|
-
|
|
972
|
+
A.destroy();
|
|
978
973
|
}), a({
|
|
979
|
-
getContent: () =>
|
|
980
|
-
setContent: (e) =>
|
|
981
|
-
setTheme:
|
|
982
|
-
setThemeOverrides:
|
|
974
|
+
getContent: () => z.content.value,
|
|
975
|
+
setContent: (e) => z.setContent(e),
|
|
976
|
+
setTheme: oe,
|
|
977
|
+
setThemeOverrides: J,
|
|
983
978
|
create: Y.createTemplate,
|
|
984
979
|
load: Y.loadTemplate,
|
|
985
980
|
save: Y.saveTemplate,
|
|
986
|
-
sendTestEmail: U.
|
|
981
|
+
sendTestEmail: (e) => U.send(e)
|
|
987
982
|
}), (t, r) => (s(), m("div", {
|
|
988
983
|
ref_key: "rootEl",
|
|
989
|
-
ref:
|
|
990
|
-
class: i(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": b(
|
|
984
|
+
ref: k,
|
|
985
|
+
class: i(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": b(z).state.darkMode }]),
|
|
991
986
|
"data-tpl-theme": b(B).resolvedTheme.value,
|
|
992
987
|
style: n(b(B).themeStyles.value),
|
|
993
988
|
onDragover: r[6] ||= E(() => {}, ["prevent"]),
|
|
994
989
|
onDrop: r[7] ||= E(() => {}, ["prevent"])
|
|
995
990
|
}, [
|
|
996
|
-
g(
|
|
991
|
+
g(ae),
|
|
997
992
|
g(O, {
|
|
998
993
|
"enter-active-class": "tpl:transition-opacity tpl:duration-200",
|
|
999
994
|
"enter-from-class": "tpl:opacity-100",
|
|
@@ -1002,7 +997,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1002
997
|
"leave-from-class": "tpl:opacity-100",
|
|
1003
998
|
"leave-to-class": "tpl:opacity-0"
|
|
1004
999
|
}, {
|
|
1005
|
-
default: l(() => [g(
|
|
1000
|
+
default: l(() => [g(St, { visible: b(j) || b(z).state.isLoading }, null, 8, ["visible"])]),
|
|
1006
1001
|
_: 1
|
|
1007
1002
|
}),
|
|
1008
1003
|
g(O, {
|
|
@@ -1013,10 +1008,10 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1013
1008
|
"leave-from-class": "tpl:opacity-100",
|
|
1014
1009
|
"leave-to-class": "tpl:opacity-0"
|
|
1015
1010
|
}, {
|
|
1016
|
-
default: l(() => [g(
|
|
1017
|
-
error: b(
|
|
1018
|
-
visible: !!b(
|
|
1019
|
-
onRetry: b(
|
|
1011
|
+
default: l(() => [g(Ot, {
|
|
1012
|
+
error: b(N),
|
|
1013
|
+
visible: !!b(N) && !b(j),
|
|
1014
|
+
onRetry: b(A).initialize
|
|
1020
1015
|
}, null, 8, [
|
|
1021
1016
|
"error",
|
|
1022
1017
|
"visible",
|
|
@@ -1024,19 +1019,19 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1024
1019
|
])]),
|
|
1025
1020
|
_: 1
|
|
1026
1021
|
}),
|
|
1027
|
-
g(
|
|
1028
|
-
editor: b(
|
|
1022
|
+
g(_t, {
|
|
1023
|
+
editor: b(z),
|
|
1029
1024
|
core: b(B),
|
|
1030
1025
|
"feature-flags": b(V),
|
|
1031
1026
|
"panel-state": b(K),
|
|
1032
1027
|
"snapshot-preview": b(q),
|
|
1033
1028
|
"comments-instance": b(W),
|
|
1034
1029
|
"test-email": b(U),
|
|
1035
|
-
websocket: b(
|
|
1036
|
-
collaboration: b(
|
|
1037
|
-
"is-collaboration-enabled": b(
|
|
1038
|
-
"is-saving": b(
|
|
1039
|
-
"is-save-disabled": b(
|
|
1030
|
+
websocket: b(I),
|
|
1031
|
+
collaboration: b(L),
|
|
1032
|
+
"is-collaboration-enabled": b(ee),
|
|
1033
|
+
"is-saving": b(z).state.isSaving || b(V).isSaveExporting.value,
|
|
1034
|
+
"is-save-disabled": b(z).state.isSaving || b(V).isSaveExporting.value || !b(z).state.isDirty,
|
|
1040
1035
|
onSave: Z
|
|
1041
1036
|
}, null, 8, [
|
|
1042
1037
|
"editor",
|
|
@@ -1052,7 +1047,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1052
1047
|
"is-saving",
|
|
1053
1048
|
"is-save-disabled"
|
|
1054
1049
|
]),
|
|
1055
|
-
g(
|
|
1050
|
+
g(nt, {
|
|
1056
1051
|
open: b(X).modalOpen.value,
|
|
1057
1052
|
issues: b(X).blockingIssues.value,
|
|
1058
1053
|
onCancel: b(X).cancel,
|
|
@@ -1063,10 +1058,10 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1063
1058
|
"onCancel",
|
|
1064
1059
|
"onConfirm"
|
|
1065
1060
|
]),
|
|
1066
|
-
g(
|
|
1061
|
+
g(Mt, {
|
|
1067
1062
|
visible: b(q).isPreviewingSnapshot.value,
|
|
1068
1063
|
onCancel: b(q).cancelPreview,
|
|
1069
|
-
onConfirm:
|
|
1064
|
+
onConfirm: me
|
|
1070
1065
|
}, null, 8, ["visible", "onCancel"]),
|
|
1071
1066
|
g(O, {
|
|
1072
1067
|
"enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
|
|
@@ -1076,17 +1071,17 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1076
1071
|
"leave-from-class": "tpl:translate-y-0 tpl:opacity-100",
|
|
1077
1072
|
"leave-to-class": "tpl:translate-y-[-8px] tpl:opacity-0"
|
|
1078
1073
|
}, {
|
|
1079
|
-
default: l(() => [g(
|
|
1074
|
+
default: l(() => [g(Pt, { visible: b(re).collabUndoWarningVisible.value }, null, 8, ["visible"])]),
|
|
1080
1075
|
_: 1
|
|
1081
1076
|
}),
|
|
1082
|
-
T(g(
|
|
1077
|
+
T(g(ne, null, null, 512), [[D, !b(z).state.previewMode]]),
|
|
1083
1078
|
p("div", {
|
|
1084
|
-
class: i(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [b(
|
|
1079
|
+
class: i(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [b(z).state.previewMode ? "tpl:left-0 tpl:right-0" : b(K).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]", b(q).isPreviewingSnapshot.value ? "tpl:top-[104px]" : "tpl:top-14"]]),
|
|
1085
1080
|
style: {
|
|
1086
1081
|
transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
1087
1082
|
"background-color": "var(--tpl-canvas-bg)"
|
|
1088
1083
|
}
|
|
1089
|
-
}, [p("div",
|
|
1084
|
+
}, [p("div", It, [g(O, { name: "tpl-restore-btn" }, {
|
|
1090
1085
|
default: l(() => [b(B).conditionPreview.hasHiddenBlocks.value ? (s(), m("button", {
|
|
1091
1086
|
key: 0,
|
|
1092
1087
|
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",
|
|
@@ -1097,19 +1092,19 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1097
1092
|
"backdrop-filter": "blur(8px)"
|
|
1098
1093
|
},
|
|
1099
1094
|
onClick: r[0] ||= (e) => b(B).conditionPreview.reset()
|
|
1100
|
-
}, [g(b(
|
|
1095
|
+
}, [g(b(ie), {
|
|
1101
1096
|
size: 13,
|
|
1102
1097
|
"stroke-width": 2
|
|
1103
1098
|
}), y(" " + c(b(B).t.blockSettings.restoreHiddenBlocks), 1)])) : w("", !0)]),
|
|
1104
1099
|
_: 1
|
|
1105
|
-
})]), p("main",
|
|
1106
|
-
viewport: b(
|
|
1107
|
-
content: b(
|
|
1108
|
-
"selected-block-id": b(
|
|
1109
|
-
"dark-mode": b(
|
|
1110
|
-
"preview-mode": b(
|
|
1111
|
-
"locked-blocks": b(
|
|
1112
|
-
onSelectBlock: b(
|
|
1100
|
+
})]), p("main", Lt, [g(pe, {
|
|
1101
|
+
viewport: b(z).state.viewport,
|
|
1102
|
+
content: b(z).content.value,
|
|
1103
|
+
"selected-block-id": b(z).state.selectedBlockId,
|
|
1104
|
+
"dark-mode": b(z).state.darkMode,
|
|
1105
|
+
"preview-mode": b(z).state.previewMode,
|
|
1106
|
+
"locked-blocks": b(L)?.lockedBlocks.value ?? void 0,
|
|
1107
|
+
onSelectBlock: b(z).selectBlock,
|
|
1113
1108
|
onOpenAiChat: r[1] ||= (e) => b(K).aiChatOpen.value = !0,
|
|
1114
1109
|
onOpenDesignReference: r[2] ||= (e) => b(K).designReferenceOpen.value = !0
|
|
1115
1110
|
}, null, 8, [
|
|
@@ -1123,7 +1118,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1123
1118
|
])])], 2),
|
|
1124
1119
|
e.config.branding !== !1 && !b(V).isWhiteLabeled.value ? (s(), v(ue, {
|
|
1125
1120
|
key: 0,
|
|
1126
|
-
"position-class": [b(
|
|
1121
|
+
"position-class": [b(z).state.previewMode ? "tpl:left-0 tpl:right-0" : b(K).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]"]
|
|
1127
1122
|
}, null, 8, ["position-class"])) : w("", !0),
|
|
1128
1123
|
p("div", {
|
|
1129
1124
|
class: "tpl-sr-only",
|
|
@@ -1131,55 +1126,56 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1131
1126
|
"aria-live": "polite",
|
|
1132
1127
|
"aria-atomic": "true",
|
|
1133
1128
|
"aria-label": b(B).t.landmarks.reorderAnnouncements
|
|
1134
|
-
}, c(b(B).keyboardReorder.announcement.value), 9,
|
|
1135
|
-
T(g(
|
|
1136
|
-
"selected-block": b(
|
|
1137
|
-
settings: b(
|
|
1129
|
+
}, c(b(B).keyboardReorder.announcement.value), 9, Rt),
|
|
1130
|
+
T(g(de, {
|
|
1131
|
+
"selected-block": b(z).selectedBlock.value,
|
|
1132
|
+
settings: b(z).content.value.settings,
|
|
1138
1133
|
"shifted-left": b(K).rightPanelOpen.value,
|
|
1139
|
-
onUpdateBlock: r[3] ||= (e) => b(
|
|
1140
|
-
onDeleteBlock: r[4] ||= (e) => b(B).blockActions.deleteBlock(b(
|
|
1141
|
-
onDuplicateBlock: r[5] ||= (e) => b(B).blockActions.duplicateBlock(b(
|
|
1142
|
-
onUpdateSettings: b(
|
|
1134
|
+
onUpdateBlock: r[3] ||= (e) => b(z).updateBlock(b(z).selectedBlock.value.id, e),
|
|
1135
|
+
onDeleteBlock: r[4] ||= (e) => b(B).blockActions.deleteBlock(b(z).selectedBlock.value.id),
|
|
1136
|
+
onDuplicateBlock: r[5] ||= (e) => b(B).blockActions.duplicateBlock(b(z).selectedBlock.value),
|
|
1137
|
+
onUpdateSettings: b(z).updateSettings
|
|
1143
1138
|
}, null, 8, [
|
|
1144
1139
|
"selected-block",
|
|
1145
1140
|
"settings",
|
|
1146
1141
|
"shifted-left",
|
|
1147
1142
|
"onUpdateSettings"
|
|
1148
|
-
]), [[D, !b(
|
|
1149
|
-
!b(
|
|
1143
|
+
]), [[D, !b(z).state.previewMode]]),
|
|
1144
|
+
!b(j) && b(M) ? (s(), v(vt, {
|
|
1150
1145
|
key: 1,
|
|
1151
1146
|
ref_key: "cloudPanelsRef",
|
|
1152
|
-
ref:
|
|
1153
|
-
config:
|
|
1154
|
-
editor: b(
|
|
1147
|
+
ref: C,
|
|
1148
|
+
config: x.config,
|
|
1149
|
+
editor: b(z),
|
|
1155
1150
|
core: b(B),
|
|
1156
1151
|
"panel-state": b(K),
|
|
1157
|
-
"plan-config-instance": b(
|
|
1158
|
-
"
|
|
1159
|
-
"media-lib": b(H),
|
|
1160
|
-
onSendTestEmail: me
|
|
1152
|
+
"plan-config-instance": b(F),
|
|
1153
|
+
"media-lib": b(te)
|
|
1161
1154
|
}, null, 8, [
|
|
1162
1155
|
"config",
|
|
1163
1156
|
"editor",
|
|
1164
1157
|
"core",
|
|
1165
1158
|
"panel-state",
|
|
1166
1159
|
"plan-config-instance",
|
|
1167
|
-
"test-email",
|
|
1168
1160
|
"media-lib"
|
|
1169
1161
|
])) : w("", !0),
|
|
1170
1162
|
b(G).isAvailable.value ? (s(), v(b(d), {
|
|
1171
1163
|
key: 2,
|
|
1172
1164
|
feature: b(G)
|
|
1173
1165
|
}, null, 8, ["feature"])) : w("", !0),
|
|
1166
|
+
b(U).isAvailable.value ? (s(), v(b(f), {
|
|
1167
|
+
key: 3,
|
|
1168
|
+
feature: b(U)
|
|
1169
|
+
}, null, 8, ["feature"])) : w("", !0),
|
|
1174
1170
|
p("div", {
|
|
1175
1171
|
ref: (e) => b(B).popoverRoot.value = e,
|
|
1176
1172
|
class: "tpl-popover-root"
|
|
1177
1173
|
}, null, 512),
|
|
1178
1174
|
g(se),
|
|
1179
1175
|
g(fe),
|
|
1180
|
-
b(le) ? (s(), v(
|
|
1181
|
-
], 46,
|
|
1176
|
+
b(le) ? (s(), v(ce, { key: 4 })) : w("", !0)
|
|
1177
|
+
], 46, Ft));
|
|
1182
1178
|
}
|
|
1183
|
-
}), [["__scopeId", "data-v-
|
|
1179
|
+
}), [["__scopeId", "data-v-d606cf3a"]]);
|
|
1184
1180
|
//#endregion
|
|
1185
|
-
export {
|
|
1181
|
+
export { zt as default };
|