@templatical/editor 0.0.3 → 0.0.4
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-busJk9hm.js → AiChatSidebar-CjfhTZwo.js} +1 -1
- package/dist/{AiFeatureMenu-DLGv_-pj.js → AiFeatureMenu-K44aZa_P.js} +3 -3
- package/dist/CloudEditor-DFyuRxUV.js +926 -0
- package/dist/{CollaboratorBar-Dv3l52vC.js → CollaboratorBar-BuCEcdbB.js} +25 -21
- package/dist/{CommentsSidebar-4tjp0VU5.js → CommentsSidebar-2lcqMfIP.js} +2 -2
- package/dist/{DesignReferenceSidebar-CmwXvltV.js → DesignReferenceSidebar-CNMu4Zrx.js} +2 -2
- package/dist/{ModuleBrowserModal-lrk3Fr0H.js → ModuleBrowserModal-CvQ0xyQf.js} +6 -6
- package/dist/{ModulePreviewCanvas-BcBJLnwL.js → ModulePreviewCanvas-Be2B3Y07.js} +2 -2
- package/dist/ParagraphEditor-CcMPnbDr.js +652 -0
- package/dist/{RichTextEditorContent-CQqodi7p.js → RichTextEditorContent-CHJlh7HJ.js} +8 -4
- package/dist/{SaveModuleDialog-Bmzi72td.js → SaveModuleDialog-BaaeH5Xm.js} +5 -5
- package/dist/{SnapshotHistory-AEgi9Xsn.js → SnapshotHistory-BPfjiuu1.js} +2 -2
- package/dist/{TemplateScoringPanel-CTgMtc0-.js → TemplateScoringPanel-D58A23Vq.js} +3 -3
- package/dist/{TestEmailModal-Dpq1is9S.js → TestEmailModal-DIAlB3e_.js} +3 -3
- package/dist/{TitleEditor-CLcDdcWI.js → TitleEditor-D9DPjQkX.js} +7 -7
- package/dist/{TplModal-CGzRjR96.js → TplModal-CmTSvCY-.js} +2 -2
- package/dist/{blockTypeIcons-BpPTqcok.js → blockTypeIcons-D1RTWOkx.js} +1 -1
- package/dist/cdn/chunks/AiChatSidebar-CmPTbTFG.js +2 -0
- package/dist/cdn/chunks/AiFeatureMenu-lxVm1RjH.js +59 -0
- package/dist/cdn/chunks/AiFeatureMenu-lxVm1RjH.js.map +1 -0
- package/dist/cdn/chunks/CloudEditor-Bmp5IlWi.js +900 -0
- package/dist/cdn/chunks/CloudEditor-Bmp5IlWi.js.map +1 -0
- package/dist/cdn/chunks/CollaboratorBar-D2PKtlOw.js +51 -0
- package/dist/cdn/chunks/CollaboratorBar-D2PKtlOw.js.map +1 -0
- package/dist/cdn/chunks/CommentsSidebar-BOelj4Ca.js +2 -0
- package/dist/cdn/chunks/DesignReferenceSidebar-Bf6rg0A7.js +2 -0
- package/dist/cdn/chunks/ModuleBrowserModal-CxDXzkKS.js +195 -0
- package/dist/cdn/chunks/ModuleBrowserModal-CxDXzkKS.js.map +1 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-DEfHampA.js +107 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-DEfHampA.js.map +1 -0
- package/dist/cdn/chunks/ParagraphEditor-DHdu6lb3.js +503 -0
- package/dist/cdn/chunks/ParagraphEditor-DHdu6lb3.js.map +1 -0
- package/dist/cdn/chunks/RichTextEditorContent-DWUzizsC.js +106 -0
- package/dist/cdn/chunks/RichTextEditorContent-DWUzizsC.js.map +1 -0
- package/dist/cdn/chunks/SaveModuleDialog-DVna2xUl.js +119 -0
- package/dist/cdn/chunks/SaveModuleDialog-DVna2xUl.js.map +1 -0
- package/dist/cdn/chunks/SnapshotHistory-BFF2SsTN.js +2 -0
- package/dist/cdn/chunks/TemplateScoringPanel-gi8wc_m7.js +2 -0
- package/dist/cdn/chunks/TestEmailModal-Qtd6aC-6.js +2 -0
- package/dist/cdn/chunks/TitleEditor-DDf_OcHS.js +166 -0
- package/dist/cdn/chunks/TitleEditor-DDf_OcHS.js.map +1 -0
- package/dist/cdn/chunks/_rolldown_dynamic_import_helper-DMEI4TQ3.js +9 -0
- package/dist/cdn/chunks/blockTypeIcons-BnobReQm.js +22 -0
- package/dist/cdn/chunks/blockTypeIcons-BnobReQm.js.map +1 -0
- package/dist/cdn/chunks/de-BB3dgVOc.js +700 -0
- package/dist/cdn/chunks/de-BB3dgVOc.js.map +1 -0
- package/dist/cdn/chunks/de-BvYD17KT.js +89 -0
- package/dist/cdn/chunks/de-BvYD17KT.js.map +1 -0
- package/dist/cdn/chunks/dist-B6AUkMyh.js +2 -0
- package/dist/cdn/chunks/dist-B878xb_62.js +457 -0
- package/dist/cdn/chunks/dist-B878xb_62.js.map +1 -0
- package/dist/cdn/chunks/dist-Bf1Op9A1.js +2 -0
- package/dist/cdn/chunks/dist-BkETaOfw.js +2 -0
- package/dist/cdn/chunks/dist-CJcMnY7o.js +2 -0
- package/dist/cdn/chunks/dist-CWsl6S1K.js +2 -0
- package/dist/cdn/chunks/dist-CllLxIMQ.js +2 -0
- package/dist/cdn/chunks/dist-Cs0wFwdw.js +2 -0
- package/dist/cdn/chunks/dist-DLWHlekl.js +2 -0
- package/dist/cdn/chunks/dist-DS3_HVpX.js +2 -0
- package/dist/cdn/chunks/dist-DTXopj1a.js +2 -0
- package/dist/cdn/chunks/dist-DnwLoNLm.js +2 -0
- package/dist/cdn/chunks/draggable-BQNU47zu.js +11544 -0
- package/dist/cdn/chunks/{draggable-ClUwYCFL.js.map → draggable-BQNU47zu.js.map} +1 -1
- package/dist/cdn/chunks/emojiData-BVEJHcNH.js +19 -0
- package/dist/cdn/chunks/{emojiData-6fVLNqeH.js.map → emojiData-BVEJHcNH.js.map} +1 -1
- package/dist/cdn/chunks/en-CpotcOPr.js +89 -0
- package/dist/cdn/chunks/en-CpotcOPr.js.map +1 -0
- package/dist/cdn/chunks/en-DeDcpnoS.js +700 -0
- package/dist/cdn/chunks/en-DeDcpnoS.js.map +1 -0
- package/dist/cdn/chunks/extensions-B_kcV0tK.js +419 -0
- package/dist/cdn/chunks/{extensions-ea_ewKUl.js.map → extensions-B_kcV0tK.js.map} +1 -1
- package/dist/cdn/chunks/features-ofOGnSC0.js +6700 -0
- package/dist/cdn/chunks/features-ofOGnSC0.js.map +1 -0
- package/dist/cdn/chunks/icons-bIb7PBOE.js +653 -0
- package/dist/cdn/chunks/icons-bIb7PBOE.js.map +1 -0
- package/dist/cdn/chunks/liquid.browser-C1VIYISn.js +3272 -0
- package/dist/cdn/chunks/liquid.browser-C1VIYISn.js.map +1 -0
- package/dist/cdn/chunks/media-library-BIYzV2Y2.js +6005 -0
- package/dist/cdn/chunks/media-library-BIYzV2Y2.js.map +1 -0
- package/dist/cdn/chunks/pusher-DJPhQnE8.js +2505 -0
- package/dist/cdn/chunks/pusher-DJPhQnE8.js.map +1 -0
- package/dist/cdn/chunks/readableTextColor-Cd_cgWO_.js +32 -0
- package/dist/cdn/chunks/readableTextColor-Cd_cgWO_.js.map +1 -0
- package/dist/cdn/chunks/rolldown-runtime-DPITmOBR.js +20 -0
- package/dist/cdn/chunks/src-BuW9oYtm.js +494 -0
- package/dist/cdn/chunks/src-BuW9oYtm.js.map +1 -0
- package/dist/cdn/chunks/styleConstants-1KwsBMxJ.js +57 -0
- package/dist/cdn/chunks/{styleConstants-CNejCb-L.js.map → styleConstants-1KwsBMxJ.js.map} +1 -1
- package/dist/cdn/chunks/styles-DQFExz-T.js +3222 -0
- package/dist/cdn/chunks/styles-DQFExz-T.js.map +1 -0
- package/dist/cdn/chunks/tiptap-DplY-S-k.js +14208 -0
- package/dist/cdn/chunks/{tiptap-Cya4P9CN.js.map → tiptap-DplY-S-k.js.map} +1 -1
- package/dist/cdn/editor.css +2 -1
- package/dist/cdn/editor.js +260 -1
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{de-B4Ob4vCo.js → de-D7TLGIPA.js} +20 -4
- package/dist/{dist-DmpMJbmZ.js → dist-BkIys9zn.js} +1 -1
- package/dist/{en-YXsspZJG.js → en-DvtiEMwP.js} +20 -4
- package/dist/{extensions-CKM99njP.js → extensions-DEjfEFhD.js} +3 -3
- package/dist/{keys-Dwa2PmdD.js → keys-C0MQRs8d.js} +3 -3
- package/dist/readableTextColor-LDlmVEUv.js +30 -0
- package/dist/{styles-DSw1VNU3.js → styles-CgLaxDfu.js} +1096 -1074
- package/dist/templatical-editor.css +1 -1
- package/dist/templatical-editor.js +113 -89
- package/dist/templatical-editor.umd.cjs +59 -59
- package/dist/{useEditorCore-Cc4RCwWq.js → useEditorCore-CjwRMl7K.js} +1152 -1014
- package/dist/{useI18n-DUirdXEX.js → useI18n-D6m7ZUgY.js} +1 -1
- package/dist/{useMergeTag-DVnlvPYJ.js → useMergeTag-BZ3X0bNr.js} +1 -1
- package/package.json +2 -2
- package/dist/CloudEditor-BDnHd6Um.js +0 -919
- package/dist/ParagraphEditor-DH8cSC6m.js +0 -625
- package/dist/cdn/chunks/ParagraphEditor-CCtWbGDv.js +0 -3
- package/dist/cdn/chunks/ParagraphEditor-CCtWbGDv.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-BUD9veXd.js +0 -2
- package/dist/cdn/chunks/RichTextEditorContent-BUD9veXd.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-e_UTyxjd.js +0 -3
- package/dist/cdn/chunks/TitleEditor-e_UTyxjd.js.map +0 -1
- package/dist/cdn/chunks/dist-0UheN8rK.js +0 -1
- package/dist/cdn/chunks/dist-55mmbGQ9.js +0 -1
- package/dist/cdn/chunks/dist-B31mxKyP.js +0 -1
- package/dist/cdn/chunks/dist-B5JI9nIg.js +0 -1
- package/dist/cdn/chunks/dist-B93vLKhU.js +0 -1
- package/dist/cdn/chunks/dist-BDt3FJvj.js +0 -1
- package/dist/cdn/chunks/dist-BJRuFHmi.js +0 -1
- package/dist/cdn/chunks/dist-BKSzrf0L.js +0 -1
- package/dist/cdn/chunks/dist-BL8c5gYQ.js +0 -1
- package/dist/cdn/chunks/dist-CYThWMP5.js +0 -1
- package/dist/cdn/chunks/dist-DxZbPJYt.js +0 -1
- package/dist/cdn/chunks/draggable-ClUwYCFL.js +0 -17
- package/dist/cdn/chunks/emojiData-6fVLNqeH.js +0 -2
- package/dist/cdn/chunks/extensions-ea_ewKUl.js +0 -2
- package/dist/cdn/chunks/icons-vmLJTaJk.js +0 -2
- package/dist/cdn/chunks/icons-vmLJTaJk.js.map +0 -1
- package/dist/cdn/chunks/rolldown-runtime-BakkzWXw.js +0 -1
- package/dist/cdn/chunks/styleConstants-CNejCb-L.js +0 -2
- package/dist/cdn/chunks/tiptap-Cya4P9CN.js +0 -145
- package/dist/cdn/chunks/useEditorCore-CwuxQuvh.js +0 -2
- package/dist/cdn/chunks/useEditorCore-CwuxQuvh.js.map +0 -1
- package/dist/cdn/chunks/useMergeTag-DVOz1v9p.js +0 -2
- package/dist/cdn/chunks/useMergeTag-DVOz1v9p.js.map +0 -1
- package/dist/i18n-CJsFtdbZ.js +0 -23
|
@@ -0,0 +1,900 @@
|
|
|
1
|
+
import { $ as e, B as t, F as n, H as r, M as i, N as a, P as o, S as s, U as c, X as l, _ as u, at as d, b as f, c as p, ct as m, d as h, g, h as _, j as ee, k as te, lt as v, m as y, n as b, p as x, st as S, tt as ne, u as re, v as C, x as w, y as T } from "./draggable-BQNU47zu.js";
|
|
2
|
+
import { $ as ie, At as E, C as ae, D as oe, Lt as se, Nt as ce, Pn as le, Rt as ue, S as de, St as fe, Tt as pe, Xt as me, Y as he, Yt as ge, _ as _e, at as ve, b as ye, c as be, cn as D, ct as xe, d as Se, f as Ce, ft as we, g as Te, gn as Ee, h as De, jt as Oe, k as ke, l as Ae, m as je, p as Me, pt as Ne, qt as Pe, tn as Fe, u as Ie, v as Le, x as Re, xn as ze, xt as O, y as Be } from "./features-ofOGnSC0.js";
|
|
3
|
+
import { S as Ve, x as He } from "./icons-bIb7PBOE.js";
|
|
4
|
+
import { a as Ue, i as We, n as Ge, o as Ke, r as qe, t as Je } from "./styles-DQFExz-T.js";
|
|
5
|
+
import { u as k } from "./styleConstants-1KwsBMxJ.js";
|
|
6
|
+
//#region src/cloud/composables/useSnapshotPreview.ts
|
|
7
|
+
function Ye(t) {
|
|
8
|
+
let { authManager: n, editor: r, history: i, conditionPreview: a, autoSave: o, onError: s } = t, c = ne(null), l = e(null), u = e(null), d = x(() => l.value !== null), f = x(() => c.value?.snapshots.value ?? []), p = x(() => c.value?.isLoading.value ?? !1), m = x(() => c.value?.isRestoring.value ?? !1);
|
|
9
|
+
function h() {
|
|
10
|
+
r.state.template?.id && !c.value && (c.value = Me({
|
|
11
|
+
authManager: n,
|
|
12
|
+
templateId: r.state.template.id,
|
|
13
|
+
onRestore: g,
|
|
14
|
+
onError: s
|
|
15
|
+
}), c.value.loadSnapshots());
|
|
16
|
+
}
|
|
17
|
+
function g(e) {
|
|
18
|
+
r.setContent(e.content, !1), i.clear(), a.reset();
|
|
19
|
+
}
|
|
20
|
+
async function _(e) {
|
|
21
|
+
if (l.value) {
|
|
22
|
+
l.value = e, r.setContent(e.content, !1);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
r.state.isDirty && r.hasTemplate() && await r.createSnapshot(), u.value = structuredClone(r.content.value), o?.pause(), l.value = e, r.setContent(e.content, !1);
|
|
26
|
+
}
|
|
27
|
+
async function ee() {
|
|
28
|
+
if (!(!l.value || !c.value)) try {
|
|
29
|
+
await c.value.restoreSnapshot(l.value.id), await c.value.loadSnapshots();
|
|
30
|
+
} finally {
|
|
31
|
+
l.value = null, u.value = null, o?.resume();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function te() {
|
|
35
|
+
!l.value || !u.value || (r.setContent(u.value, !1), l.value = null, u.value = null, o?.resume());
|
|
36
|
+
}
|
|
37
|
+
async function v() {
|
|
38
|
+
c.value && await c.value.loadSnapshots();
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
snapshotHistoryInstance: c,
|
|
42
|
+
previewingSnapshot: l,
|
|
43
|
+
contentBeforePreview: u,
|
|
44
|
+
isPreviewingSnapshot: d,
|
|
45
|
+
snapshotHistorySnapshots: f,
|
|
46
|
+
snapshotHistoryIsLoading: p,
|
|
47
|
+
snapshotHistoryIsRestoring: m,
|
|
48
|
+
initSnapshotHistory: h,
|
|
49
|
+
handleRestore: g,
|
|
50
|
+
handleSnapshotNavigate: _,
|
|
51
|
+
confirmRestoreSnapshot: ee,
|
|
52
|
+
cancelPreview: te,
|
|
53
|
+
loadSnapshotHistory: v
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/cloud/composables/useCloudPanelState.ts
|
|
58
|
+
function Xe() {
|
|
59
|
+
let t = e(null), n = x({
|
|
60
|
+
get: () => t.value === "ai-chat",
|
|
61
|
+
set: (e) => t.value = e ? "ai-chat" : null
|
|
62
|
+
}), r = x({
|
|
63
|
+
get: () => t.value === "scoring",
|
|
64
|
+
set: (e) => t.value = e ? "scoring" : null
|
|
65
|
+
}), i = x({
|
|
66
|
+
get: () => t.value === "design-reference",
|
|
67
|
+
set: (e) => t.value = e ? "design-reference" : null
|
|
68
|
+
}), a = x({
|
|
69
|
+
get: () => t.value === "comments",
|
|
70
|
+
set: (e) => t.value = e ? "comments" : null
|
|
71
|
+
}), o = e(!1), s = e(!1), c = e(void 0), l = e(!1), u = e(null), d = x(() => t.value !== null), f = x(() => {
|
|
72
|
+
let e = t.value;
|
|
73
|
+
return e === "ai-chat" || e === "design-reference" || e === "scoring" ? e : null;
|
|
74
|
+
}), p = x(() => l.value || t.value === "ai-chat" || t.value === "design-reference" || t.value === "scoring");
|
|
75
|
+
function m() {
|
|
76
|
+
l.value = !l.value;
|
|
77
|
+
}
|
|
78
|
+
function h(e) {
|
|
79
|
+
l.value = !1, t.value = t.value === e ? null : e;
|
|
80
|
+
}
|
|
81
|
+
return Fe(u, () => {
|
|
82
|
+
l.value = !1;
|
|
83
|
+
}), {
|
|
84
|
+
activePanel: t,
|
|
85
|
+
aiChatOpen: n,
|
|
86
|
+
scoringPanelOpen: r,
|
|
87
|
+
designReferenceOpen: i,
|
|
88
|
+
commentsOpen: a,
|
|
89
|
+
testEmailModalOpen: o,
|
|
90
|
+
mediaLibraryOpen: s,
|
|
91
|
+
mediaLibraryAccept: c,
|
|
92
|
+
aiMenuOpen: l,
|
|
93
|
+
aiMenuRef: u,
|
|
94
|
+
rightPanelOpen: d,
|
|
95
|
+
activeAiFeature: f,
|
|
96
|
+
aiButtonActive: p,
|
|
97
|
+
toggleAiMenu: m,
|
|
98
|
+
handleAiFeatureSelect: h
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region src/cloud/composables/useCollabUndoWarning.ts
|
|
103
|
+
function Ze(t) {
|
|
104
|
+
let { isCollaborationEnabled: n, getCollaboratorCount: r, canUndo: i } = t, a = e(!1), o = e(!1), { start: s } = D(() => {
|
|
105
|
+
o.value = !1;
|
|
106
|
+
}, le, { immediate: !1 });
|
|
107
|
+
function c() {
|
|
108
|
+
a.value || !n.value || r() === 0 || !i.value || (a.value = !0, o.value = !0, s());
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
collabUndoWarningVisible: o,
|
|
112
|
+
showCollabUndoWarning: c
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
//#endregion
|
|
116
|
+
//#region src/cloud/composables/useCloudFeatureFlags.ts
|
|
117
|
+
function Qe(t) {
|
|
118
|
+
let { planConfigInstance: n, aiConfig: r, editor: i } = t, a = x(() => n.hasFeature("ai_generation") && r.hasAnyMenuFeature.value), o = x(() => n.hasFeature("test_email")), s = x(() => !!i.state.template?.id), c = x(() => n.hasFeature("white_label")), l = x(() => n.config.value?.limits.max_templates ?? null), u = x(() => n.config.value?.template_count ?? 0), d = e(!1), f = e("idle"), p = e(""), { start: m } = D(() => {
|
|
119
|
+
f.value = "idle";
|
|
120
|
+
}, 3e3, { immediate: !1 });
|
|
121
|
+
return {
|
|
122
|
+
canUseAiGeneration: a,
|
|
123
|
+
canSendTestEmail: o,
|
|
124
|
+
hasTemplateSaved: s,
|
|
125
|
+
isWhiteLabeled: c,
|
|
126
|
+
templateLimit: l,
|
|
127
|
+
templateCount: u,
|
|
128
|
+
isSaveExporting: d,
|
|
129
|
+
saveStatus: f,
|
|
130
|
+
saveErrorMessage: p,
|
|
131
|
+
startSaveStatusClear: m
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region src/cloud/composables/useCloudMediaLibrary.ts
|
|
136
|
+
function $e(e) {
|
|
137
|
+
let { onRequestMedia: t, mediaLibraryOpen: n, mediaLibraryAccept: r } = e, i = null;
|
|
138
|
+
async function a() {
|
|
139
|
+
if (t) {
|
|
140
|
+
let e = await t({ accept: ["images"] });
|
|
141
|
+
return e ? {
|
|
142
|
+
url: e.url,
|
|
143
|
+
alt: e.alt_text || void 0
|
|
144
|
+
} : null;
|
|
145
|
+
}
|
|
146
|
+
return r.value = ["images"], n.value = !0, new Promise((e) => {
|
|
147
|
+
i = (t) => {
|
|
148
|
+
e(t);
|
|
149
|
+
};
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
function o(e) {
|
|
153
|
+
n.value = !1, i?.({
|
|
154
|
+
url: e.url,
|
|
155
|
+
alt: e.alt_text || void 0
|
|
156
|
+
}), i = null;
|
|
157
|
+
}
|
|
158
|
+
function s() {
|
|
159
|
+
n.value = !1, i?.(null), i = null;
|
|
160
|
+
}
|
|
161
|
+
return l(() => {
|
|
162
|
+
i &&= (i(null), null);
|
|
163
|
+
}), {
|
|
164
|
+
handleRequestMedia: a,
|
|
165
|
+
handleMediaSelect: o,
|
|
166
|
+
handleMediaLibraryClose: s
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
//#endregion
|
|
170
|
+
//#region src/cloud/components/CloudLoadingOverlay.vue?vue&type=script&setup=true&lang.ts
|
|
171
|
+
var et = {
|
|
172
|
+
key: 0,
|
|
173
|
+
class: "tpl-loading tpl:absolute tpl:inset-0 tpl:z-overlay tpl:flex tpl:flex-col tpl:bg-[var(--tpl-bg)]"
|
|
174
|
+
}, tt = { class: "tpl:flex tpl:flex-1 tpl:overflow-hidden" }, A = { 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)]" }, nt = /* @__PURE__ */ s({
|
|
175
|
+
__name: "CloudLoadingOverlay",
|
|
176
|
+
props: { visible: { type: Boolean } },
|
|
177
|
+
setup(e) {
|
|
178
|
+
return (t, r) => e.visible ? (a(), u("div", et, [r[1] ||= C("<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), y("div", tt, [y("div", A, [(a(), u(h, null, n(5, (e) => y("div", {
|
|
179
|
+
key: e,
|
|
180
|
+
class: "tpl-shimmer tpl:size-7 tpl:rounded-[var(--tpl-radius-sm)]"
|
|
181
|
+
})), 64))]), r[0] ||= C("<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)])])) : g("", !0);
|
|
182
|
+
}
|
|
183
|
+
}), rt = {
|
|
184
|
+
key: 0,
|
|
185
|
+
role: "alert",
|
|
186
|
+
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)]"
|
|
187
|
+
}, j = { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]" }, M = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center" }, N = { class: "tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]" }, P = { class: "tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, it = /* @__PURE__ */ s({
|
|
188
|
+
__name: "CloudErrorOverlay",
|
|
189
|
+
props: {
|
|
190
|
+
error: {},
|
|
191
|
+
visible: { type: Boolean }
|
|
192
|
+
},
|
|
193
|
+
emits: ["retry"],
|
|
194
|
+
setup(e, { emit: t }) {
|
|
195
|
+
let n = t, { t: r } = E();
|
|
196
|
+
function i(e) {
|
|
197
|
+
return "isUnauthorized" in e && e.isUnauthorized ? r.error.authFailed : "isNotFound" in e && e.isNotFound ? r.error.templateNotFound : r.error.defaultMessage;
|
|
198
|
+
}
|
|
199
|
+
function o(e) {
|
|
200
|
+
return "isNotFound" in e && !!e.isNotFound;
|
|
201
|
+
}
|
|
202
|
+
return (t, s) => e.visible && e.error ? (a(), u("div", rt, [
|
|
203
|
+
y("div", j, [f(d(fe), {
|
|
204
|
+
size: 32,
|
|
205
|
+
"stroke-width": 1.5,
|
|
206
|
+
class: "tpl:text-[var(--tpl-danger)]"
|
|
207
|
+
})]),
|
|
208
|
+
y("div", M, [y("h2", N, v(d(r).error.title), 1), y("p", P, v(i(e.error)), 1)]),
|
|
209
|
+
o(e.error) ? g("", !0) : (a(), u("button", {
|
|
210
|
+
key: 0,
|
|
211
|
+
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)]",
|
|
212
|
+
onClick: s[0] ||= (e) => n("retry")
|
|
213
|
+
}, v(d(r).error.retry), 1))
|
|
214
|
+
])) : g("", !0);
|
|
215
|
+
}
|
|
216
|
+
}), F = {
|
|
217
|
+
key: 0,
|
|
218
|
+
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)]"
|
|
219
|
+
}, I = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-text)]" }, L = { class: "tpl:flex tpl:items-center tpl:gap-2" }, at = /* @__PURE__ */ s({
|
|
220
|
+
__name: "SnapshotPreviewBanner",
|
|
221
|
+
props: { visible: { type: Boolean } },
|
|
222
|
+
emits: ["cancel", "confirm"],
|
|
223
|
+
setup(e, { emit: t }) {
|
|
224
|
+
let n = t, { t: r } = E();
|
|
225
|
+
return (t, i) => e.visible ? (a(), u("div", F, [y("div", I, [f(d(O), {
|
|
226
|
+
size: 18,
|
|
227
|
+
"stroke-width": 2,
|
|
228
|
+
class: "tpl:text-[var(--tpl-primary)]"
|
|
229
|
+
}), y("span", null, v(d(r).snapshotPreview.message), 1)]), y("div", L, [y("button", {
|
|
230
|
+
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)]",
|
|
231
|
+
style: { "background-color": "transparent" },
|
|
232
|
+
onClick: i[0] ||= (e) => n("cancel")
|
|
233
|
+
}, v(d(r).snapshotPreview.cancel), 1), y("button", {
|
|
234
|
+
class: "tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
235
|
+
onClick: i[1] ||= (e) => n("confirm")
|
|
236
|
+
}, v(d(r).snapshotPreview.restore), 1)])])) : g("", !0);
|
|
237
|
+
}
|
|
238
|
+
}), R = {
|
|
239
|
+
key: 0,
|
|
240
|
+
role: "status",
|
|
241
|
+
"aria-live": "polite",
|
|
242
|
+
class: "tpl:absolute tpl:top-16 tpl:left-1/2 tpl:z-toast tpl:-translate-x-1/2 tpl:rounded-[var(--tpl-radius)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:shadow-lg",
|
|
243
|
+
style: {
|
|
244
|
+
"background-color": "var(--tpl-warning-light)",
|
|
245
|
+
color: "var(--tpl-text)",
|
|
246
|
+
border: "1px solid var(--tpl-warning)"
|
|
247
|
+
}
|
|
248
|
+
}, ot = /* @__PURE__ */ s({
|
|
249
|
+
__name: "CollabUndoToast",
|
|
250
|
+
props: { visible: { type: Boolean } },
|
|
251
|
+
setup(e) {
|
|
252
|
+
let { t } = E();
|
|
253
|
+
return (n, r) => e.visible ? (a(), u("div", R, v(d(t).history.collabWarning), 1)) : g("", !0);
|
|
254
|
+
}
|
|
255
|
+
}), st = ["data-tpl-theme"], ct = {
|
|
256
|
+
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",
|
|
257
|
+
style: {
|
|
258
|
+
"background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)",
|
|
259
|
+
"backdrop-filter": "blur(12px)",
|
|
260
|
+
"-webkit-backdrop-filter": "blur(12px)",
|
|
261
|
+
"box-shadow": "var(--tpl-shadow-md)",
|
|
262
|
+
"border-bottom": "1px solid var(--tpl-border)"
|
|
263
|
+
}
|
|
264
|
+
}, lt = { class: "tpl-header-left tpl:flex tpl:min-w-[200px] tpl:items-center tpl:gap-3" }, ut = {
|
|
265
|
+
key: 0,
|
|
266
|
+
class: "tpl-logo tpl:flex tpl:items-center tpl:gap-2.5 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
267
|
+
}, dt = ["src"], ft = { style: { "letter-spacing": "-0.01em" } }, pt = {
|
|
268
|
+
key: 1,
|
|
269
|
+
class: "tpl:text-xs tpl:opacity-60 tpl:text-[var(--tpl-text-muted)]"
|
|
270
|
+
}, mt = { class: "tpl-header-center tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, ht = { class: "tpl-header-right tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, gt = ["data-tooltip"], _t = {
|
|
271
|
+
key: 1,
|
|
272
|
+
"aria-live": "polite",
|
|
273
|
+
class: "tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-success)]"
|
|
274
|
+
}, vt = {
|
|
275
|
+
key: 2,
|
|
276
|
+
"aria-live": "polite",
|
|
277
|
+
class: "tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
278
|
+
}, yt = ["aria-label", "aria-expanded"], bt = {
|
|
279
|
+
key: 0,
|
|
280
|
+
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)]"
|
|
281
|
+
}, xt = ["aria-expanded"], St = {
|
|
282
|
+
key: 0,
|
|
283
|
+
class: "tpl:absolute tpl:right-0 tpl:top-full tpl:z-50 tpl:mt-1 tpl:origin-top-right"
|
|
284
|
+
}, Ct = ["disabled"], wt = ["disabled"], Tt = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, Et = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, Dt = {
|
|
285
|
+
class: "tpl:pointer-events-auto tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-tl-lg tpl:p-1",
|
|
286
|
+
style: {
|
|
287
|
+
"background-color": "color-mix(\n in srgb,\n var(--tpl-canvas-bg) 85%,\n transparent\n )",
|
|
288
|
+
"backdrop-filter": "blur(8px)",
|
|
289
|
+
"-webkit-backdrop-filter": "blur(8px)"
|
|
290
|
+
}
|
|
291
|
+
}, Ot = {
|
|
292
|
+
href: "https://github.com/templatical/sdk",
|
|
293
|
+
target: "_blank",
|
|
294
|
+
rel: "noopener noreferrer",
|
|
295
|
+
class: "tpl:transition-colors tpl:duration-150 hover:tpl:opacity-80 tpl:text-[var(--tpl-text-dim)]",
|
|
296
|
+
style: { "text-decoration": "none" }
|
|
297
|
+
}, kt = ["aria-label"], z = /* @__PURE__ */ ie(/* @__PURE__ */ s({
|
|
298
|
+
__name: "CloudEditor",
|
|
299
|
+
props: {
|
|
300
|
+
config: {},
|
|
301
|
+
translations: {},
|
|
302
|
+
fontsManager: {}
|
|
303
|
+
},
|
|
304
|
+
emits: ["ready"],
|
|
305
|
+
setup(n, { expose: s, emit: l }) {
|
|
306
|
+
let ne = w(() => import("./AiChatSidebar-CmPTbTFG.js")), C = w(() => import("./CommentsSidebar-BOelj4Ca.js")), ie = w(() => import("./DesignReferenceSidebar-Bf6rg0A7.js")), E = w(() => import("./TemplateScoringPanel-gi8wc_m7.js")), le = w(() => import("./TestEmailModal-Qtd6aC-6.js")), D = w(() => import("./SaveModuleDialog-DVna2xUl.js")), Me = w(() => import("./ModuleBrowserModal-CxDXzkKS.js")), Fe = w(() => import("./SnapshotHistory-BFF2SsTN.js")), O = w(() => import("./CollaboratorBar-D2PKtlOw.js")), et = w(() => import("./AiFeatureMenu-lxVm1RjH.js")), tt = w(async () => (await import("./src-BuW9oYtm.js")).MediaLibraryModal), A = n, rt = l, j = e(!0), M = e(!1), N = e(null), P = !1, F = new oe({
|
|
307
|
+
...A.config.auth,
|
|
308
|
+
onError: A.config.onError
|
|
309
|
+
}), I = Ie({
|
|
310
|
+
authManager: F,
|
|
311
|
+
onError: A.config.onError
|
|
312
|
+
}), L = e(/* @__PURE__ */ new Map()), R = de({
|
|
313
|
+
authManager: F,
|
|
314
|
+
defaultFontFamily: A.config.fonts?.defaultFont,
|
|
315
|
+
templateDefaults: A.config.templateDefaults,
|
|
316
|
+
onError: A.config.onError,
|
|
317
|
+
lockedBlocks: L
|
|
318
|
+
}), z = De({
|
|
319
|
+
authManager: F,
|
|
320
|
+
onError: A.config.onError
|
|
321
|
+
});
|
|
322
|
+
A.config.mcp?.enabled && be({
|
|
323
|
+
editor: R,
|
|
324
|
+
channel: z.channel,
|
|
325
|
+
onOperation: A.config.mcp.onOperation
|
|
326
|
+
});
|
|
327
|
+
let B = null;
|
|
328
|
+
A.config.collaboration?.enabled && (B = _e({
|
|
329
|
+
authManager: F,
|
|
330
|
+
editor: R,
|
|
331
|
+
channel: z.channel,
|
|
332
|
+
onError: A.config.onError,
|
|
333
|
+
onCollaboratorJoined: A.config.collaboration.onCollaboratorJoined,
|
|
334
|
+
onCollaboratorLeft: A.config.collaboration.onCollaboratorLeft,
|
|
335
|
+
onBlockLocked: A.config.collaboration.onBlockLocked,
|
|
336
|
+
onBlockUnlocked: A.config.collaboration.onBlockUnlocked
|
|
337
|
+
}), t(() => B.lockedBlocks.value, (e) => {
|
|
338
|
+
L.value = e;
|
|
339
|
+
}, { immediate: !0 }), Te(R, B));
|
|
340
|
+
let At = x(() => !!A.config.collaboration?.enabled && I.hasFeature("collaboration")), jt = null, Mt = null, V = ke({
|
|
341
|
+
editor: R,
|
|
342
|
+
config: {
|
|
343
|
+
uiTheme: A.config.uiTheme,
|
|
344
|
+
theme: void 0,
|
|
345
|
+
blockDefaults: A.config.blockDefaults,
|
|
346
|
+
customBlocks: [],
|
|
347
|
+
mergeTags: A.config.mergeTags,
|
|
348
|
+
displayConditions: A.config.displayConditions,
|
|
349
|
+
onRequestMedia: null,
|
|
350
|
+
onSave: () => {
|
|
351
|
+
$().catch((e) => {
|
|
352
|
+
A.config.onError?.(e);
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
translations: A.translations,
|
|
357
|
+
fontsManager: A.fontsManager,
|
|
358
|
+
historyOptions: B ? { isRemoteOperation: () => B._isProcessingRemoteOperation() } : void 0,
|
|
359
|
+
autoSaveOptions: {
|
|
360
|
+
onChange: async () => {
|
|
361
|
+
R.hasTemplate() && (await R.createSnapshot(), jt?.snapshotHistoryInstance.value?.loadSnapshots());
|
|
362
|
+
},
|
|
363
|
+
debounce: A.config.autoSaveDebounce ?? 5e3,
|
|
364
|
+
enabled: () => A.config.autoSave !== !1 && I.hasFeature("auto_save")
|
|
365
|
+
},
|
|
366
|
+
themeExtraStyles: () => ({ "--tpl-drop-text": `"${A.translations.canvas.dropHere}"` }),
|
|
367
|
+
keyboardOptions: { onBeforeUndo: () => Mt?.showCollabUndoWarning() }
|
|
368
|
+
}), Nt = Ze({
|
|
369
|
+
isCollaborationEnabled: At,
|
|
370
|
+
getCollaboratorCount: () => B?.collaborators.value.length ?? 0,
|
|
371
|
+
canUndo: V.history.canUndo
|
|
372
|
+
});
|
|
373
|
+
Mt = Nt;
|
|
374
|
+
let H = Ye({
|
|
375
|
+
authManager: F,
|
|
376
|
+
editor: R,
|
|
377
|
+
history: V.history,
|
|
378
|
+
conditionPreview: V.conditionPreview,
|
|
379
|
+
autoSave: V.autoSave,
|
|
380
|
+
onError: A.config.onError
|
|
381
|
+
});
|
|
382
|
+
jt = H;
|
|
383
|
+
let U = Xe(), W = Re(A.config.ai), G = Qe({
|
|
384
|
+
planConfigInstance: I,
|
|
385
|
+
aiConfig: W,
|
|
386
|
+
editor: R
|
|
387
|
+
}), K = $e({
|
|
388
|
+
onRequestMedia: A.config.onRequestMedia,
|
|
389
|
+
mediaLibraryOpen: U.mediaLibraryOpen,
|
|
390
|
+
mediaLibraryAccept: U.mediaLibraryAccept
|
|
391
|
+
});
|
|
392
|
+
he({
|
|
393
|
+
onBlockMove: R.moveBlock,
|
|
394
|
+
onBlockAdd: R.addBlock
|
|
395
|
+
});
|
|
396
|
+
let Pt = Se({
|
|
397
|
+
authManager: F,
|
|
398
|
+
getFontsConfig: () => A.config.fonts,
|
|
399
|
+
canUseCustomFonts: () => I.hasFeature("custom_fonts")
|
|
400
|
+
}), q = Ce({
|
|
401
|
+
authManager: F,
|
|
402
|
+
getTemplateId: () => R.state.template?.id ?? null,
|
|
403
|
+
save: () => R.save(),
|
|
404
|
+
exportHtml: (e) => Pt.exportHtml(e),
|
|
405
|
+
onError: A.config.onError,
|
|
406
|
+
isAuthReady: M,
|
|
407
|
+
onBeforeTestEmail: A.config.onBeforeTestEmail
|
|
408
|
+
}), J = Be({
|
|
409
|
+
authManager: F,
|
|
410
|
+
getTemplateId: () => R.state.template?.id ?? null,
|
|
411
|
+
getSocketId: () => z.getSocketId(),
|
|
412
|
+
onComment: A.config.onComment,
|
|
413
|
+
onError: A.config.onError,
|
|
414
|
+
isAuthReady: M,
|
|
415
|
+
hasCommentingFeature: () => A.config.commenting !== !1 && I.hasFeature("commenting")
|
|
416
|
+
});
|
|
417
|
+
Le({
|
|
418
|
+
comments: J,
|
|
419
|
+
channel: z.channel
|
|
420
|
+
});
|
|
421
|
+
let Y = je({
|
|
422
|
+
authManager: F,
|
|
423
|
+
onError: A.config.onError
|
|
424
|
+
}), X = e(!1), Z = e(null), Q = e(!1), Ft = ye({
|
|
425
|
+
authManager: F,
|
|
426
|
+
getTemplateId: () => R.state.template?.id ?? null
|
|
427
|
+
});
|
|
428
|
+
o(Pe, K.handleRequestMedia), o(ce, F), o(Oe, W), o(ue, J), o(ge, Y), o(me, Ft), o(se, {
|
|
429
|
+
plan: I,
|
|
430
|
+
ai: W,
|
|
431
|
+
comments: {
|
|
432
|
+
getBlockCount: (e) => J.commentCountByBlock.value.get(e) ?? 0,
|
|
433
|
+
openForBlock: zt
|
|
434
|
+
},
|
|
435
|
+
savedModules: {
|
|
436
|
+
openSaveDialog: (e) => {
|
|
437
|
+
Z.value = e ?? null, X.value = !0;
|
|
438
|
+
},
|
|
439
|
+
openBrowser: () => {
|
|
440
|
+
Q.value = !0;
|
|
441
|
+
},
|
|
442
|
+
moduleCount: x(() => Y.modules.value.length)
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
function It(e) {
|
|
446
|
+
I.hasFeature("theme_customization") && (V.themeOverrides.value = e);
|
|
447
|
+
}
|
|
448
|
+
function Lt(e) {
|
|
449
|
+
R.setUiTheme(e);
|
|
450
|
+
}
|
|
451
|
+
let Rt = e(null);
|
|
452
|
+
function zt(e) {
|
|
453
|
+
U.commentsOpen.value = !0, te(() => {
|
|
454
|
+
Rt.value?.filterByBlock(e);
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
async function Bt(e) {
|
|
458
|
+
try {
|
|
459
|
+
await q.sendTestEmail(e), U.testEmailModalOpen.value = !1;
|
|
460
|
+
} catch {}
|
|
461
|
+
}
|
|
462
|
+
function Vt(e, t) {
|
|
463
|
+
for (let n = 0; n < e.content.length; n++) {
|
|
464
|
+
let r = Ee(e.content[n]), i = t === void 0 ? void 0 : t + n;
|
|
465
|
+
R.addBlock(r, void 0, void 0, i);
|
|
466
|
+
}
|
|
467
|
+
Q.value = !1;
|
|
468
|
+
}
|
|
469
|
+
async function Ht(e) {
|
|
470
|
+
let t = async (e) => {
|
|
471
|
+
if (ze(e)) {
|
|
472
|
+
let t = e;
|
|
473
|
+
try {
|
|
474
|
+
t.renderedHtml = await V.registry.renderCustomBlock(t);
|
|
475
|
+
} catch {
|
|
476
|
+
t.renderedHtml = `<!-- Custom block render error: ${t.customType} -->`;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
if (e.type === "section" && "children" in e) {
|
|
480
|
+
let n = e;
|
|
481
|
+
for (let e of n.children) for (let n of e) await t(n);
|
|
482
|
+
}
|
|
483
|
+
};
|
|
484
|
+
for (let n of e.blocks) await t(n);
|
|
485
|
+
}
|
|
486
|
+
async function Ut() {
|
|
487
|
+
j.value = !0, N.value = null;
|
|
488
|
+
try {
|
|
489
|
+
if (await F.initialize(), P) return;
|
|
490
|
+
M.value = !0;
|
|
491
|
+
let e = await Ae({ authManager: F });
|
|
492
|
+
if (P) return;
|
|
493
|
+
if (!e.api.ok) throw Error("Health check failed: API is not reachable");
|
|
494
|
+
if (!e.auth.ok) throw Error(`Health check failed: authentication error${e.auth.error ? ` - ${e.auth.error}` : ""}`);
|
|
495
|
+
if (e.websocket.ok || console.warn("[Templatical] WebSocket health check failed:", e.websocket.error ?? "unknown error", "-- real-time features will be disabled."), await I.fetchConfig(), P) return;
|
|
496
|
+
A.fontsManager.setCustomFontsEnabled(I.hasFeature("custom_fonts")), A.config.customBlocks?.length && I.hasFeature("custom_blocks") && V.registerCustomBlocks(A.config.customBlocks), A.config.theme && I.hasFeature("theme_customization") && (V.themeOverrides.value = A.config.theme), A.config.modules !== !1 && I.hasFeature("saved_modules") && Y.loadModules(), rt("ready");
|
|
497
|
+
} catch (e) {
|
|
498
|
+
if (P) return;
|
|
499
|
+
let t = e instanceof Error ? e : Error("Initialization failed", { cause: e });
|
|
500
|
+
N.value = t, A.config.onError?.(t);
|
|
501
|
+
} finally {
|
|
502
|
+
P || (j.value = !1);
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
function Wt() {
|
|
506
|
+
return ae(I.config.value.websocket);
|
|
507
|
+
}
|
|
508
|
+
async function Gt(e) {
|
|
509
|
+
let t = await R.create(e);
|
|
510
|
+
return P ? t : (A.config.onCreate?.(t), H.initSnapshotHistory(), z.connect(t.id, Wt()), t);
|
|
511
|
+
}
|
|
512
|
+
async function Kt(e) {
|
|
513
|
+
let t = await R.load(e);
|
|
514
|
+
return P ? t : (A.config.onLoad?.(t), H.initSnapshotHistory(), z.connect(t.id, Wt()), t);
|
|
515
|
+
}
|
|
516
|
+
async function $() {
|
|
517
|
+
G.isSaveExporting.value = !0, G.saveStatus.value = "idle";
|
|
518
|
+
try {
|
|
519
|
+
if (await Ht(R.content.value), P) throw Error("Component unmounted during save");
|
|
520
|
+
let e = await R.save();
|
|
521
|
+
if (P) throw Error("Component unmounted during save");
|
|
522
|
+
H.initSnapshotHistory(), H.snapshotHistoryInstance.value && H.snapshotHistoryInstance.value.loadSnapshots();
|
|
523
|
+
let t = await Pt.exportHtml(e.id);
|
|
524
|
+
if (P) throw Error("Component unmounted during save");
|
|
525
|
+
let n = {
|
|
526
|
+
templateId: e.id,
|
|
527
|
+
html: t.html,
|
|
528
|
+
mjml: t.mjml,
|
|
529
|
+
content: e.content
|
|
530
|
+
};
|
|
531
|
+
return A.config.onSave?.(n), G.saveStatus.value = "saved", G.startSaveStatusClear(), n;
|
|
532
|
+
} catch (e) {
|
|
533
|
+
throw P || (G.saveStatus.value = "error", G.saveErrorMessage.value = e instanceof Error ? e.message : "Save failed"), e;
|
|
534
|
+
} finally {
|
|
535
|
+
P || (G.isSaveExporting.value = !1);
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
return ee(() => {
|
|
539
|
+
Ut();
|
|
540
|
+
}), i(() => {
|
|
541
|
+
P = !0, A.fontsManager.cleanupFontLinks(), z.disconnect(), V.destroy(), A.config.onUnmount?.();
|
|
542
|
+
}), s({
|
|
543
|
+
getContent: () => R.content.value,
|
|
544
|
+
setContent: (e) => R.setContent(e),
|
|
545
|
+
setTheme: Lt,
|
|
546
|
+
setThemeOverrides: It,
|
|
547
|
+
create: Gt,
|
|
548
|
+
load: Kt,
|
|
549
|
+
save: $,
|
|
550
|
+
sendTestEmail: q.sendTestEmail
|
|
551
|
+
}), (e, t) => (a(), u("div", {
|
|
552
|
+
class: S(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": d(R).state.darkMode }]),
|
|
553
|
+
"data-tpl-theme": d(V).resolvedTheme.value,
|
|
554
|
+
style: m(d(V).themeStyles.value)
|
|
555
|
+
}, [
|
|
556
|
+
f(b, {
|
|
557
|
+
"enter-active-class": "tpl:transition-opacity tpl:duration-200",
|
|
558
|
+
"enter-from-class": "tpl:opacity-100",
|
|
559
|
+
"enter-to-class": "tpl:opacity-100",
|
|
560
|
+
"leave-active-class": "tpl:transition-opacity tpl:duration-300",
|
|
561
|
+
"leave-from-class": "tpl:opacity-100",
|
|
562
|
+
"leave-to-class": "tpl:opacity-0"
|
|
563
|
+
}, {
|
|
564
|
+
default: r(() => [f(nt, { visible: j.value || d(R).state.isLoading }, null, 8, ["visible"])]),
|
|
565
|
+
_: 1
|
|
566
|
+
}),
|
|
567
|
+
f(b, {
|
|
568
|
+
"enter-active-class": "tpl:transition-opacity tpl:duration-200",
|
|
569
|
+
"enter-from-class": "tpl:opacity-0",
|
|
570
|
+
"enter-to-class": "tpl:opacity-100",
|
|
571
|
+
"leave-active-class": "tpl:transition-opacity tpl:duration-300",
|
|
572
|
+
"leave-from-class": "tpl:opacity-100",
|
|
573
|
+
"leave-to-class": "tpl:opacity-0"
|
|
574
|
+
}, {
|
|
575
|
+
default: r(() => [f(it, {
|
|
576
|
+
error: N.value,
|
|
577
|
+
visible: !!N.value && !j.value,
|
|
578
|
+
onRetry: Ut
|
|
579
|
+
}, null, 8, ["error", "visible"])]),
|
|
580
|
+
_: 1
|
|
581
|
+
}),
|
|
582
|
+
y("header", ct, [
|
|
583
|
+
y("div", lt, [d(G).isWhiteLabeled.value ? g("", !0) : (a(), u("div", ut, [y("img", {
|
|
584
|
+
src: d(F).resolveUrl("/logo.svg"),
|
|
585
|
+
alt: "Templatical",
|
|
586
|
+
width: "24",
|
|
587
|
+
height: "24",
|
|
588
|
+
class: "tpl:shrink-0"
|
|
589
|
+
}, null, 8, dt), y("span", ft, v(d(V).t.header.title), 1)])), d(G).templateLimit.value === null ? g("", !0) : (a(), u("span", pt, v(d(V).format(d(V).t.header.templatesUsed, {
|
|
590
|
+
used: d(G).templateCount.value,
|
|
591
|
+
max: d(G).templateLimit.value
|
|
592
|
+
})), 1))]),
|
|
593
|
+
y("div", mt, [
|
|
594
|
+
f(qe, {
|
|
595
|
+
viewport: d(R).state.viewport,
|
|
596
|
+
onChange: d(R).setViewport
|
|
597
|
+
}, null, 8, ["viewport", "onChange"]),
|
|
598
|
+
f(Je, {
|
|
599
|
+
"dark-mode": d(R).state.darkMode,
|
|
600
|
+
onChange: d(R).setDarkMode
|
|
601
|
+
}, null, 8, ["dark-mode", "onChange"]),
|
|
602
|
+
f(Ge, {
|
|
603
|
+
"preview-mode": d(R).state.previewMode,
|
|
604
|
+
onChange: d(R).setPreviewMode
|
|
605
|
+
}, null, 8, ["preview-mode", "onChange"]),
|
|
606
|
+
d(B) && At.value ? (a(), _(d(O), {
|
|
607
|
+
key: 0,
|
|
608
|
+
collaborators: d(B).collaborators.value,
|
|
609
|
+
"is-connected": d(z).isConnected.value
|
|
610
|
+
}, null, 8, ["collaborators", "is-connected"])) : g("", !0),
|
|
611
|
+
d(H).snapshotHistoryInstance.value ? (a(), _(d(Fe), {
|
|
612
|
+
key: 1,
|
|
613
|
+
snapshots: d(H).snapshotHistorySnapshots.value,
|
|
614
|
+
"is-loading": d(H).snapshotHistoryIsLoading.value,
|
|
615
|
+
"is-restoring": d(H).snapshotHistoryIsRestoring.value,
|
|
616
|
+
onLoad: d(H).loadSnapshotHistory,
|
|
617
|
+
onNavigate: d(H).handleSnapshotNavigate
|
|
618
|
+
}, null, 8, [
|
|
619
|
+
"snapshots",
|
|
620
|
+
"is-loading",
|
|
621
|
+
"is-restoring",
|
|
622
|
+
"onLoad",
|
|
623
|
+
"onNavigate"
|
|
624
|
+
])) : g("", !0)
|
|
625
|
+
]),
|
|
626
|
+
y("div", ht, [
|
|
627
|
+
d(G).saveStatus.value === "error" ? (a(), u("div", {
|
|
628
|
+
key: 0,
|
|
629
|
+
"aria-live": "assertive",
|
|
630
|
+
class: "tpl-tooltip tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]",
|
|
631
|
+
"data-tooltip": d(G).saveErrorMessage.value
|
|
632
|
+
}, [f(d(fe), {
|
|
633
|
+
size: 12,
|
|
634
|
+
"stroke-width": 2.5
|
|
635
|
+
}), T(" " + v(d(V).t.header.saveFailed), 1)], 8, gt)) : d(G).saveStatus.value === "saved" ? (a(), u("div", _t, [f(d(pe), {
|
|
636
|
+
size: 12,
|
|
637
|
+
"stroke-width": 2.5
|
|
638
|
+
}), T(" " + v(d(V).t.header.saved), 1)])) : d(R).state.isDirty ? (a(), u("div", vt, [t[19] ||= y("span", { class: "tpl-pulse tpl:size-1.5 tpl:rounded-full tpl:bg-[var(--tpl-primary)]" }, null, -1), T(" " + v(d(V).t.header.unsaved), 1)])) : g("", !0),
|
|
639
|
+
d(J).isEnabled.value && d(G).hasTemplateSaved.value ? (a(), u("button", {
|
|
640
|
+
key: 3,
|
|
641
|
+
"aria-label": d(J).unresolvedCount.value > 0 ? `${d(V).t.comments.button} (${d(J).unresolvedCount.value})` : d(V).t.comments.button,
|
|
642
|
+
"aria-expanded": d(U).commentsOpen.value,
|
|
643
|
+
class: S(d(k)),
|
|
644
|
+
style: m({
|
|
645
|
+
backgroundColor: d(U).commentsOpen.value ? "var(--tpl-primary)" : "transparent",
|
|
646
|
+
color: d(U).commentsOpen.value ? "var(--tpl-bg)" : "var(--tpl-primary)",
|
|
647
|
+
borderColor: "var(--tpl-primary)"
|
|
648
|
+
}),
|
|
649
|
+
onClick: t[0] ||= (e) => d(U).commentsOpen.value = !d(U).commentsOpen.value
|
|
650
|
+
}, [
|
|
651
|
+
f(d(we), {
|
|
652
|
+
size: 16,
|
|
653
|
+
"stroke-width": 2
|
|
654
|
+
}),
|
|
655
|
+
T(" " + v(d(V).t.comments.button) + " ", 1),
|
|
656
|
+
d(J).unresolvedCount.value > 0 && !d(U).commentsOpen.value ? (a(), u("span", bt, v(d(J).unresolvedCount.value), 1)) : g("", !0)
|
|
657
|
+
], 14, yt)) : g("", !0),
|
|
658
|
+
d(G).canUseAiGeneration.value && d(G).hasTemplateSaved.value ? (a(), u("div", {
|
|
659
|
+
key: 4,
|
|
660
|
+
ref: (e) => d(U).aiMenuRef.value = e,
|
|
661
|
+
class: "tpl:relative"
|
|
662
|
+
}, [y("button", {
|
|
663
|
+
"aria-expanded": d(U).aiMenuOpen.value,
|
|
664
|
+
class: S(["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", d(U).aiButtonActive.value ? "tpl-ai-btn--active" : "tpl-ai-btn--idle"]),
|
|
665
|
+
onClick: t[1] ||= re((...e) => d(U).toggleAiMenu && d(U).toggleAiMenu(...e), ["stop"])
|
|
666
|
+
}, [f(d(ve), {
|
|
667
|
+
size: 16,
|
|
668
|
+
"stroke-width": 2,
|
|
669
|
+
class: "tpl-ai-btn-icon"
|
|
670
|
+
}), T(" " + v(d(V).t.aiChat.button), 1)], 10, xt), f(b, {
|
|
671
|
+
"enter-active-class": "tpl:transition-all tpl:duration-150 tpl:ease-out",
|
|
672
|
+
"enter-from-class": "tpl:scale-95 tpl:opacity-0",
|
|
673
|
+
"enter-to-class": "tpl:scale-100 tpl:opacity-100",
|
|
674
|
+
"leave-active-class": "tpl:transition-all tpl:duration-100 tpl:ease-in",
|
|
675
|
+
"leave-from-class": "tpl:scale-100 tpl:opacity-100",
|
|
676
|
+
"leave-to-class": "tpl:scale-95 tpl:opacity-0"
|
|
677
|
+
}, {
|
|
678
|
+
default: r(() => [d(U).aiMenuOpen.value ? (a(), u("div", St, [f(d(et), {
|
|
679
|
+
"active-feature": d(U).activeAiFeature.value,
|
|
680
|
+
onSelect: d(U).handleAiFeatureSelect
|
|
681
|
+
}, null, 8, ["active-feature", "onSelect"])])) : g("", !0)]),
|
|
682
|
+
_: 1
|
|
683
|
+
})], 512)) : g("", !0),
|
|
684
|
+
d(q).isEnabled.value && d(G).canSendTestEmail.value ? (a(), u("button", {
|
|
685
|
+
key: 5,
|
|
686
|
+
class: S(d(k)),
|
|
687
|
+
style: {
|
|
688
|
+
"background-color": "transparent",
|
|
689
|
+
color: "var(--tpl-primary)",
|
|
690
|
+
"border-color": "var(--tpl-primary)"
|
|
691
|
+
},
|
|
692
|
+
disabled: d(q).isSending.value || !d(G).hasTemplateSaved.value,
|
|
693
|
+
onClick: t[2] ||= (e) => d(U).testEmailModalOpen.value = !0
|
|
694
|
+
}, [d(q).isSending.value ? (a(), _(d(Ne), {
|
|
695
|
+
key: 1,
|
|
696
|
+
class: "tpl-spinner",
|
|
697
|
+
size: 16,
|
|
698
|
+
"stroke-width": 2
|
|
699
|
+
})) : (a(), _(d(xe), {
|
|
700
|
+
key: 0,
|
|
701
|
+
size: 16,
|
|
702
|
+
"stroke-width": 2
|
|
703
|
+
})), T(" " + v(d(V).t.testEmail.button), 1)], 10, Ct)) : g("", !0),
|
|
704
|
+
y("button", {
|
|
705
|
+
class: S(d(k)),
|
|
706
|
+
style: {
|
|
707
|
+
"background-color": "transparent",
|
|
708
|
+
color: "var(--tpl-primary)",
|
|
709
|
+
"border-color": "var(--tpl-primary)"
|
|
710
|
+
},
|
|
711
|
+
disabled: d(R).state.isSaving || d(G).isSaveExporting.value || !d(R).state.isDirty,
|
|
712
|
+
onClick: t[3] ||= (e) => $().catch((e) => A.config.onError?.(e))
|
|
713
|
+
}, [!d(R).state.isSaving && !d(G).isSaveExporting.value ? (a(), _(d(He), {
|
|
714
|
+
key: 0,
|
|
715
|
+
size: 16,
|
|
716
|
+
"stroke-width": 2
|
|
717
|
+
})) : (a(), _(d(Ne), {
|
|
718
|
+
key: 1,
|
|
719
|
+
class: "tpl-spinner",
|
|
720
|
+
size: 16,
|
|
721
|
+
"stroke-width": 2
|
|
722
|
+
})), T(" " + v(d(R).state.isSaving || d(G).isSaveExporting.value ? d(V).t.header.saving : d(V).t.header.save), 1)], 10, wt)
|
|
723
|
+
])
|
|
724
|
+
]),
|
|
725
|
+
f(at, {
|
|
726
|
+
visible: d(H).isPreviewingSnapshot.value,
|
|
727
|
+
onCancel: d(H).cancelPreview,
|
|
728
|
+
onConfirm: d(H).confirmRestoreSnapshot
|
|
729
|
+
}, null, 8, [
|
|
730
|
+
"visible",
|
|
731
|
+
"onCancel",
|
|
732
|
+
"onConfirm"
|
|
733
|
+
]),
|
|
734
|
+
f(b, {
|
|
735
|
+
"enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
|
|
736
|
+
"enter-from-class": "tpl:translate-y-[-8px] tpl:opacity-0",
|
|
737
|
+
"enter-to-class": "tpl:translate-y-0 tpl:opacity-100",
|
|
738
|
+
"leave-active-class": "tpl:transition-all tpl:duration-300 tpl:ease-in",
|
|
739
|
+
"leave-from-class": "tpl:translate-y-0 tpl:opacity-100",
|
|
740
|
+
"leave-to-class": "tpl:translate-y-[-8px] tpl:opacity-0"
|
|
741
|
+
}, {
|
|
742
|
+
default: r(() => [f(ot, { visible: d(Nt).collabUndoWarningVisible.value }, null, 8, ["visible"])]),
|
|
743
|
+
_: 1
|
|
744
|
+
}),
|
|
745
|
+
c(f(Ue, null, null, 512), [[p, !d(R).state.previewMode]]),
|
|
746
|
+
y("div", {
|
|
747
|
+
class: S(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [d(R).state.previewMode ? "tpl:left-0 tpl:right-0" : d(U).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]", d(H).isPreviewingSnapshot.value ? "tpl:top-[104px]" : "tpl:top-14"]]),
|
|
748
|
+
style: {
|
|
749
|
+
transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
750
|
+
"background-color": "var(--tpl-canvas-bg)"
|
|
751
|
+
}
|
|
752
|
+
}, [y("div", Tt, [f(b, { name: "tpl-restore-btn" }, {
|
|
753
|
+
default: r(() => [d(V).conditionPreview.hasHiddenBlocks.value ? (a(), u("button", {
|
|
754
|
+
key: 0,
|
|
755
|
+
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",
|
|
756
|
+
style: {
|
|
757
|
+
"background-color": "var(--tpl-warning-light)",
|
|
758
|
+
color: "var(--tpl-warning)",
|
|
759
|
+
"border-color": "var(--tpl-warning)",
|
|
760
|
+
"backdrop-filter": "blur(8px)"
|
|
761
|
+
},
|
|
762
|
+
onClick: t[4] ||= (e) => d(V).conditionPreview.reset()
|
|
763
|
+
}, [f(d(Ve), {
|
|
764
|
+
size: 13,
|
|
765
|
+
"stroke-width": 2
|
|
766
|
+
}), T(" " + v(d(V).t.blockSettings.restoreHiddenBlocks), 1)])) : g("", !0)]),
|
|
767
|
+
_: 1
|
|
768
|
+
})]), y("main", Et, [f(Ke, {
|
|
769
|
+
viewport: d(R).state.viewport,
|
|
770
|
+
content: d(R).content.value,
|
|
771
|
+
"selected-block-id": d(R).state.selectedBlockId,
|
|
772
|
+
"dark-mode": d(R).state.darkMode,
|
|
773
|
+
"preview-mode": d(R).state.previewMode,
|
|
774
|
+
"locked-blocks": d(B)?.lockedBlocks.value ?? void 0,
|
|
775
|
+
onSelectBlock: d(R).selectBlock,
|
|
776
|
+
onOpenAiChat: t[5] ||= (e) => d(U).aiChatOpen.value = !0,
|
|
777
|
+
onOpenDesignReference: t[6] ||= (e) => d(U).designReferenceOpen.value = !0
|
|
778
|
+
}, null, 8, [
|
|
779
|
+
"viewport",
|
|
780
|
+
"content",
|
|
781
|
+
"selected-block-id",
|
|
782
|
+
"dark-mode",
|
|
783
|
+
"preview-mode",
|
|
784
|
+
"locked-blocks",
|
|
785
|
+
"onSelectBlock"
|
|
786
|
+
])])], 2),
|
|
787
|
+
d(G).isWhiteLabeled.value ? g("", !0) : (a(), u("footer", {
|
|
788
|
+
key: 0,
|
|
789
|
+
class: S(["tpl:pointer-events-none tpl:absolute tpl:bottom-0 tpl:z-50 tpl:flex tpl:h-8 tpl:items-center tpl:justify-end tpl:pr-4 tpl:text-[9px] tpl:opacity-90 tpl:transition-all tpl:duration-300 tpl:text-[var(--tpl-text-dim)]", [d(R).state.previewMode ? "tpl:left-0 tpl:right-0" : d(U).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]"]])
|
|
790
|
+
}, [y("div", Dt, [
|
|
791
|
+
y("span", null, v(d(V).t.footer.poweredBy), 1),
|
|
792
|
+
t[20] ||= y("a", {
|
|
793
|
+
href: "https://templatical.com",
|
|
794
|
+
target: "_blank",
|
|
795
|
+
rel: "noopener noreferrer",
|
|
796
|
+
class: "tpl:inline-flex tpl:items-center tpl:gap-1 tpl:font-medium tpl:transition-colors tpl:duration-150 hover:tpl:opacity-80 tpl:text-[var(--tpl-text-muted)]",
|
|
797
|
+
style: { "text-decoration": "none" }
|
|
798
|
+
}, [y("img", {
|
|
799
|
+
width: "14",
|
|
800
|
+
height: "14",
|
|
801
|
+
src: "https://templatical.com/logo.svg",
|
|
802
|
+
alt: ""
|
|
803
|
+
}), T(" Templatical ")], -1),
|
|
804
|
+
t[21] ||= y("span", { class: "tpl:text-[var(--tpl-border)]" }, "·", -1),
|
|
805
|
+
y("a", Ot, v(d(V).t.footer.openSource), 1)
|
|
806
|
+
])], 2)),
|
|
807
|
+
y("div", {
|
|
808
|
+
class: "tpl-sr-only",
|
|
809
|
+
role: "status",
|
|
810
|
+
"aria-live": "polite",
|
|
811
|
+
"aria-atomic": "true",
|
|
812
|
+
"aria-label": d(V).t.landmarks.reorderAnnouncements
|
|
813
|
+
}, v(d(V).keyboardReorder.announcement.value), 9, kt),
|
|
814
|
+
c(f(We, {
|
|
815
|
+
"selected-block": d(R).selectedBlock.value,
|
|
816
|
+
settings: d(R).content.value.settings,
|
|
817
|
+
"shifted-left": d(U).rightPanelOpen.value,
|
|
818
|
+
onUpdateBlock: t[7] ||= (e) => d(R).updateBlock(d(R).selectedBlock.value.id, e),
|
|
819
|
+
onDeleteBlock: t[8] ||= (e) => d(V).blockActions.deleteBlock(d(R).selectedBlock.value.id),
|
|
820
|
+
onDuplicateBlock: t[9] ||= (e) => d(V).blockActions.duplicateBlock(d(R).selectedBlock.value),
|
|
821
|
+
onUpdateSettings: d(R).updateSettings
|
|
822
|
+
}, null, 8, [
|
|
823
|
+
"selected-block",
|
|
824
|
+
"settings",
|
|
825
|
+
"shifted-left",
|
|
826
|
+
"onUpdateSettings"
|
|
827
|
+
]), [[p, !d(R).state.previewMode]]),
|
|
828
|
+
!j.value && M.value ? (a(), u(h, { key: 1 }, [
|
|
829
|
+
f(d(ne), {
|
|
830
|
+
visible: d(U).aiChatOpen.value,
|
|
831
|
+
"on-apply": (e) => {
|
|
832
|
+
d(V).history.record(), d(R).setContent(e), d(V).conditionPreview.reset();
|
|
833
|
+
},
|
|
834
|
+
onClose: t[10] ||= (e) => d(U).aiChatOpen.value = !1
|
|
835
|
+
}, null, 8, ["visible", "on-apply"]),
|
|
836
|
+
f(d(E), {
|
|
837
|
+
visible: d(U).scoringPanelOpen.value,
|
|
838
|
+
onClose: t[11] ||= (e) => d(U).scoringPanelOpen.value = !1
|
|
839
|
+
}, null, 8, ["visible"]),
|
|
840
|
+
f(d(ie), {
|
|
841
|
+
visible: d(U).designReferenceOpen.value,
|
|
842
|
+
"has-existing-blocks": d(R).content.value.blocks.length > 0,
|
|
843
|
+
onClose: t[12] ||= (e) => d(U).designReferenceOpen.value = !1,
|
|
844
|
+
onApply: t[13] ||= (e) => {
|
|
845
|
+
d(V).history.record(), d(R).setContent(e), d(V).conditionPreview.reset();
|
|
846
|
+
}
|
|
847
|
+
}, null, 8, ["visible", "has-existing-blocks"]),
|
|
848
|
+
f(d(C), {
|
|
849
|
+
ref_key: "commentsSidebarRef",
|
|
850
|
+
ref: Rt,
|
|
851
|
+
visible: d(U).commentsOpen.value,
|
|
852
|
+
onClose: t[14] ||= (e) => d(U).commentsOpen.value = !1
|
|
853
|
+
}, null, 8, ["visible"]),
|
|
854
|
+
f(d(le), {
|
|
855
|
+
visible: d(U).testEmailModalOpen.value,
|
|
856
|
+
"allowed-emails": d(q).allowedEmails.value,
|
|
857
|
+
"is-sending": d(q).isSending.value,
|
|
858
|
+
error: d(q).error.value,
|
|
859
|
+
onSend: Bt,
|
|
860
|
+
onClose: t[15] ||= (e) => d(U).testEmailModalOpen.value = !1
|
|
861
|
+
}, null, 8, [
|
|
862
|
+
"visible",
|
|
863
|
+
"allowed-emails",
|
|
864
|
+
"is-sending",
|
|
865
|
+
"error"
|
|
866
|
+
]),
|
|
867
|
+
d(I).hasFeature("saved_modules") && A.config.modules !== !1 ? (a(), _(d(D), {
|
|
868
|
+
key: 0,
|
|
869
|
+
visible: X.value,
|
|
870
|
+
"pre-selected-block-id": Z.value,
|
|
871
|
+
onClose: t[16] ||= (e) => {
|
|
872
|
+
X.value = !1, Z.value = null;
|
|
873
|
+
},
|
|
874
|
+
onSaved: t[17] ||= (e) => d(Y).loadModules()
|
|
875
|
+
}, null, 8, ["visible", "pre-selected-block-id"])) : g("", !0),
|
|
876
|
+
d(I).hasFeature("saved_modules") && A.config.modules !== !1 ? (a(), _(d(Me), {
|
|
877
|
+
key: 1,
|
|
878
|
+
visible: Q.value,
|
|
879
|
+
onClose: t[18] ||= (e) => Q.value = !1,
|
|
880
|
+
onInsert: Vt
|
|
881
|
+
}, null, 8, ["visible"])) : g("", !0),
|
|
882
|
+
f(d(tt), {
|
|
883
|
+
visible: d(U).mediaLibraryOpen.value,
|
|
884
|
+
accept: d(U).mediaLibraryAccept.value,
|
|
885
|
+
onSelect: d(K).handleMediaSelect,
|
|
886
|
+
onClose: d(K).handleMediaLibraryClose
|
|
887
|
+
}, null, 8, [
|
|
888
|
+
"visible",
|
|
889
|
+
"accept",
|
|
890
|
+
"onSelect",
|
|
891
|
+
"onClose"
|
|
892
|
+
])
|
|
893
|
+
], 64)) : g("", !0)
|
|
894
|
+
], 14, st));
|
|
895
|
+
}
|
|
896
|
+
}), [["__scopeId", "data-v-855e7645"]]);
|
|
897
|
+
//#endregion
|
|
898
|
+
export { z as default };
|
|
899
|
+
|
|
900
|
+
//# sourceMappingURL=CloudEditor-Bmp5IlWi.js.map
|