@templatical/editor 0.14.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-J8iO_sX7.js → AiChatSidebar-BIKvYREk.js} +57 -56
- package/dist/{AiFeatureMenu-F2diEDgV.js → AiFeatureMenu-CU6kTMTf.js} +20 -20
- package/dist/{BlockIssueBadge-a-qlByxF.js → BlockIssueBadge-B3xVgMTh.js} +11 -11
- package/dist/{CloudEditor-CDjtwb4i.js → CloudEditor-DRPxvUEj.js} +470 -468
- package/dist/{CollaboratorBar-B_EnJLtW.js → CollaboratorBar-DMSjd3HZ.js} +20 -20
- package/dist/{CommentsSidebar-DaP9BA_r.js → CommentsSidebar-D_tSGvTX.js} +154 -153
- package/dist/CountdownBlock-apiYUhkQ.js +92 -0
- package/dist/CountdownToolbar-CS0axcjz.js +210 -0
- package/dist/{DesignReferenceSidebar-BHRlTqlT.js → DesignReferenceSidebar-DWYK9nTk.js} +58 -57
- package/dist/{IssuesPanel-u7ee3Wrl.js → IssuesPanel-CR1MPaDE.js} +40 -40
- package/dist/{LoadingTrack-CV3ID80N.js → LoadingTrack-DsecR8Rw.js} +1 -1
- package/dist/MergeTagSuggestion-CH2SUxBo.js +1327 -0
- package/dist/{ModuleBrowserModal-DOsdaS6s.js → ModuleBrowserModal-BOzleijA.js} +60 -59
- package/dist/{ModulePreviewCanvas-Cx4MOJ0X.js → ModulePreviewCanvas-Cg99Pbde.js} +29 -29
- package/dist/{NumberWithSuffix-D2mW_DhT.js → NumberWithSuffix-CrA6quxx.js} +143 -142
- package/dist/{ParagraphEditor-DMzkVnST.js → ParagraphEditor-8jnzoL0A.js} +250 -247
- package/dist/{RichTextEditorContent-CRCxCwKf.js → RichTextEditorContent-BqLHIZY7.js} +45 -44
- package/dist/{SaveModuleDialog-DuEKgumL.js → SaveModuleDialog-Cy2XyjYT.js} +38 -37
- package/dist/{SnapshotHistory-CVgiNJtE.js → SnapshotHistory-cfxmOsJu.js} +34 -33
- package/dist/{TemplateScoringPanel-lm0_9nYi.js → TemplateScoringPanel-CZ62rGHz.js} +83 -82
- package/dist/{TestEmailModal-WBMdiW5S.js → TestEmailModal-sr1MaMVX.js} +22 -21
- package/dist/{TitleEditor-eyT0h-Sa.js → TitleEditor-CvGTprIg.js} +46 -45
- package/dist/{TplModal-tjQ7OB0g.js → TplModal-BtKB-0Bx.js} +14 -13
- package/dist/{blockTypeIcons-DdB3uTKD.js → blockTypeIcons-BxEbbev5.js} +2 -2
- package/dist/bundle-stats.json +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-D7rB2SBs.js → AiFeatureMenu-fDUpv_-s.js} +5 -5
- package/dist/cdn/chunks/{AiFeatureMenu-D7rB2SBs.js.map → AiFeatureMenu-fDUpv_-s.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-DHOe0pgx.js → BlockIssueBadge-Byce0j0W.js} +3 -3
- package/dist/cdn/chunks/{BlockIssueBadge-DHOe0pgx.js.map → BlockIssueBadge-Byce0j0W.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-DNed_Ym0.js → CloudEditor-B4m8ldiE.js} +89 -89
- package/dist/cdn/chunks/{CloudEditor-DNed_Ym0.js.map → CloudEditor-B4m8ldiE.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-sj_9Lee3.js → CollaboratorBar-LnLmjxw_.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-sj_9Lee3.js.map → CollaboratorBar-LnLmjxw_.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-C1Ikjpn4.js → CountdownBlock-DxTuMRBM.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-C1Ikjpn4.js.map → CountdownBlock-DxTuMRBM.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-j1G_X8rB.js → CountdownToolbar-DUrVfQZH.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-j1G_X8rB.js.map → CountdownToolbar-DUrVfQZH.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CTOf3PsH.js → IssuesPanel-CHl90k4h.js} +4 -4
- package/dist/cdn/chunks/{IssuesPanel-CTOf3PsH.js.map → IssuesPanel-CHl90k4h.js.map} +1 -1
- package/dist/cdn/chunks/MergeTagSuggestion-BsCAo4Co.js +213 -0
- package/dist/cdn/chunks/MergeTagSuggestion-BsCAo4Co.js.map +1 -0
- package/dist/cdn/chunks/{ModuleBrowserModal-DCh88-rr.js → ModuleBrowserModal-DW0iQW0J.js} +6 -6
- package/dist/cdn/chunks/{ModuleBrowserModal-DCh88-rr.js.map → ModuleBrowserModal-DW0iQW0J.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-DJqvTKmg.js → ModulePreviewCanvas-Cxo8v8t1.js} +3 -3
- package/dist/cdn/chunks/{ModulePreviewCanvas-DJqvTKmg.js.map → ModulePreviewCanvas-Cxo8v8t1.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-Bu45XWSl.js → NumberWithSuffix-CnSRmUMK.js} +6 -6
- package/dist/cdn/chunks/{NumberWithSuffix-Bu45XWSl.js.map → NumberWithSuffix-CnSRmUMK.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-DwZqLJp2.js → ParagraphEditor-iG5cDjH0.js} +25 -23
- package/dist/cdn/chunks/{ParagraphEditor-DwZqLJp2.js.map → ParagraphEditor-iG5cDjH0.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-CIuZ-2DV.js → RichTextEditorContent-DQpgeGMj.js} +4 -4
- package/dist/cdn/chunks/{RichTextEditorContent-CIuZ-2DV.js.map → RichTextEditorContent-DQpgeGMj.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-Bep0X2s_.js → SaveModuleDialog-sJQXg2Mh.js} +3 -3
- package/dist/cdn/chunks/{SaveModuleDialog-Bep0X2s_.js.map → SaveModuleDialog-sJQXg2Mh.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-DO1-h3RY.js → TitleEditor-C8qIn9Oi.js} +12 -11
- package/dist/cdn/chunks/TitleEditor-C8qIn9Oi.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-8o24HVJu.js → blockTypeIcons-DySnOpPo.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-8o24HVJu.js.map → blockTypeIcons-DySnOpPo.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-kPCz_3zM.js → draggable-kG-D5Xsm.js} +6 -6
- package/dist/cdn/chunks/draggable-kG-D5Xsm.js.map +1 -0
- package/dist/cdn/chunks/extensions-C2pTX899.js +421 -0
- package/dist/cdn/chunks/extensions-C2pTX899.js.map +1 -0
- package/dist/cdn/chunks/{features-CkTMVylx.js → features-CHE3YjQE.js} +886 -837
- package/dist/cdn/chunks/features-CHE3YjQE.js.map +1 -0
- package/dist/cdn/chunks/{icons-9zjCuoJx.js → icons-M4uqBV-_.js} +26 -26
- package/dist/cdn/chunks/{icons-9zjCuoJx.js.map → icons-M4uqBV-_.js.map} +1 -1
- package/dist/cdn/chunks/{liquid.browser-DKKBzRQu.js → liquid.browser-BJOEu6Cg.js} +693 -678
- package/dist/cdn/chunks/liquid.browser-BJOEu6Cg.js.map +1 -0
- package/dist/cdn/chunks/{media-library-DMRIPx4g.js → media-library-Bqr15VN2.js} +33 -33
- package/dist/cdn/chunks/{media-library-DMRIPx4g.js.map → media-library-Bqr15VN2.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-CdEqyLwF.js → pusher-CIwiKF8H.js} +4 -4
- package/dist/cdn/chunks/{pusher-CdEqyLwF.js.map → pusher-CIwiKF8H.js.map} +1 -1
- package/dist/cdn/chunks/{quality-CyeUgs_c.js → quality-DJZ_fqc2.js} +112 -112
- package/dist/cdn/chunks/{quality-CyeUgs_c.js.map → quality-DJZ_fqc2.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-BIKUEKDD.js → renderer-CyzTR1Vq.js} +20 -20
- package/dist/cdn/chunks/renderer-CyzTR1Vq.js.map +1 -0
- package/dist/cdn/chunks/{src-pDy_imWG.js → src-q-SBgWx7.js} +5 -5
- package/dist/cdn/chunks/{src-pDy_imWG.js.map → src-q-SBgWx7.js.map} +1 -1
- package/dist/cdn/chunks/{styles-D4Bd3SCx.js → styles-PWISdaws.js} +1484 -1344
- package/dist/cdn/chunks/styles-PWISdaws.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-BlLFFU3M.js → tiptap-DF9PEiqH.js} +6859 -6823
- package/dist/cdn/chunks/tiptap-DF9PEiqH.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +35 -35
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-CYJwFmjy.js → check-rl7ok6uJ.js} +1 -1
- package/dist/{chevron-down-C5l-DzAA.js → chevron-down-BKe__NOD.js} +1 -1
- package/dist/{circle-alert-wf5HUFZY.js → circle-alert-C8xmpMsK.js} +1 -1
- package/dist/{clock-Bj0bQw-K.js → clock-BW4JuDCN.js} +1 -1
- package/dist/{cloud-CoFDm9YA.js → cloud-BQusL53H.js} +208 -208
- package/dist/createLucideIcon-Dx-EjR9r.js +43 -0
- package/dist/{dist-CLpPNKy9.js → dist-B5Sov3sS.js} +7 -7
- package/dist/dist-BEWiuOMi.js +251 -0
- package/dist/{dist-CrQZ_af9.js → dist-BFmE-7hB.js} +2 -2
- package/dist/{dist-U5vfDdYI.js → dist-BMoa33wT.js} +2 -2
- package/dist/{dist-BctFrpeA.js → dist-BibU4HNl.js} +74 -65
- package/dist/{dist-Dd3ibRZm.js → dist-BsCGIDSt.js} +103 -102
- package/dist/dist-CNLKj9wa.js +5 -0
- package/dist/{dist-BX3gGwL8.js → dist-CNXDNYQn.js} +728 -694
- package/dist/{dist-Bn703mnA.js → dist-COG3IdPK.js} +3 -3
- package/dist/{dist-B7w6xTU6.js → dist-CQZxDvFw.js} +3 -3
- package/dist/{dist-34OcyoK1.js → dist-CRsjOQM-.js} +2 -2
- package/dist/dist-CTT6WYJ6.js +134 -0
- package/dist/dist-Cqa6aeAJ.js +5 -0
- package/dist/{dist-ChMninLH.js → dist-SXJJ2v41.js} +2 -2
- package/dist/{dist-CyjyYg52.js → dist-itdjZraK.js} +28 -23
- package/dist/extensions-DwaZAqm6.js +423 -0
- package/dist/{image-up-x8-WXfsx.js → image-up-BwBCmQ4P.js} +1 -1
- package/dist/{info-RS_fGcGi.js → info-TCn7uWR5.js} +1 -1
- package/dist/{keys-DgYXDafq.js → keys-Cv8-8GsD.js} +1 -1
- package/dist/{liquid.browser-CVjP5Mex.js → liquid.browser-DZLtv26k.js} +692 -677
- package/dist/{list-checks-Bf7XdDyv.js → list-checks-CSrOWNgq.js} +1 -1
- package/dist/{loader-circle-CLZ0_FvW.js → loader-circle-BLmicnPG.js} +1 -1
- package/dist/{message-circle-B-1bN9ab.js → message-circle-C9hHMQCI.js} +1 -1
- package/dist/{refresh-cw-CWKWqJYG.js → refresh-cw-D1JQ1LNa.js} +1 -1
- package/dist/runtime-dom.esm-bundler-BzuoCyNp.js +523 -0
- package/dist/{scan-line-BtK5dEai.js → scan-line-DgijVq9y.js} +1 -1
- package/dist/{send-Cn1IUdzh.js → send-DjPdq69F.js} +1 -1
- package/dist/{shield-check-CrvMk4Ea.js → shield-check-Bqluu8FS.js} +1 -1
- package/dist/{sparkles-CgfjwvnG.js → sparkles-M4azPVSP.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/styles-B2OrgEnn.js +4164 -0
- package/dist/templatical-editor.js +127 -126
- package/dist/{text-align-start-C3r_Rnvy.js → text-align-start-CMya5pCQ.js} +11 -11
- package/dist/{trash-2-CjERg4x9.js → trash-2-C-81rkLS.js} +1 -1
- package/dist/{triangle-alert-Chkny574.js → triangle-alert-BuRWnynk.js} +1 -1
- package/dist/{upload-e5kDRkPb.js → upload-CWBIoLd4.js} +1 -1
- package/dist/{useAliveFlag-cUQj9rmB.js → useAliveFlag-CECL_OUb.js} +1 -1
- package/dist/{useCloudI18n-CYJKqXtI.js → useCloudI18n-AKCy98qD.js} +2 -2
- package/dist/{useEditorCore-8JxXDOA4.js → useEditorCore-DJeOXVxQ.js} +1407 -1365
- package/dist/{useI18n-BWqM8i78.js → useI18n-C-TDeJBt.js} +2 -2
- package/dist/{useMergeTag-NHC4ylza.js → useMergeTag-DSrBY0-2.js} +5 -5
- package/dist/usePopoverRoot-DKUDnr55.js +8 -0
- package/dist/{vue.runtime.esm-bundler-BPa483TZ.js → vue.runtime.esm-bundler-l0XAqiyv.js} +626 -1147
- package/dist/{x-DiPIbccg.js → x-CQSvXnGR.js} +1 -1
- package/package.json +26 -26
- package/dist/CountdownBlock-DtAokAVw.js +0 -92
- package/dist/CountdownToolbar-Dtqgwy0g.js +0 -210
- package/dist/cdn/chunks/TitleEditor-DO1-h3RY.js.map +0 -1
- package/dist/cdn/chunks/draggable-kPCz_3zM.js.map +0 -1
- package/dist/cdn/chunks/extensions-iwBXnEwq.js +0 -605
- package/dist/cdn/chunks/extensions-iwBXnEwq.js.map +0 -1
- package/dist/cdn/chunks/features-CkTMVylx.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-DKKBzRQu.js.map +0 -1
- package/dist/cdn/chunks/renderer-BIKUEKDD.js.map +0 -1
- package/dist/cdn/chunks/styles-D4Bd3SCx.js.map +0 -1
- package/dist/cdn/chunks/tiptap-BlLFFU3M.js.map +0 -1
- package/dist/createLucideIcon-Bad2kKE0.js +0 -43
- package/dist/dist-CADDCv0o.js +0 -5
- package/dist/dist-CGvz7vkq.js +0 -5
- package/dist/dist-DuCzdgDA.js +0 -382
- package/dist/extensions-J439b7y7.js +0 -1720
- package/dist/styles-BUwDOWd3.js +0 -4022
- package/dist/usePopoverRoot-B1sdY4es.js +0 -8
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import { A as e,
|
|
1
|
+
import { A as e, D as t, Dt as n, E as r, Et as i, I as a, K as o, O as s, Ot as c, R as l, Y as u, Z as d, _ as f, c as p, d as m, g as h, h as g, k as _, l as v, m as y, nt as b, p as x, r as S, s as C, u as w, z as T } from "./vue.runtime.esm-bundler-l0XAqiyv.js";
|
|
2
|
+
import { c as E, o as D, t as O } from "./runtime-dom.esm-bundler-BzuoCyNp.js";
|
|
2
3
|
import { t as k } from "./timeouts-Bmi_yePw.js";
|
|
3
|
-
import {
|
|
4
|
-
import { I as M, b as ee, t as N, w as P } from "./useEditorCore-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import {
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
4
|
+
import { O as A, a as j } from "./dist-BibU4HNl.js";
|
|
5
|
+
import { I as M, b as ee, t as N, w as P } from "./useEditorCore-DJeOXVxQ.js";
|
|
6
|
+
import { m as F } from "./dist-CTT6WYJ6.js";
|
|
7
|
+
import { t as I } from "./dist-BEWiuOMi.js";
|
|
8
|
+
import { D as L, M as R, c as z, j as te, l as ne, r as B, s as re, t as ie } from "./keys-Cv8-8GsD.js";
|
|
9
|
+
import { t as V } from "./useI18n-C-TDeJBt.js";
|
|
10
|
+
import { t as H } from "./createLucideIcon-Dx-EjR9r.js";
|
|
11
|
+
import { t as U } from "./check-rl7ok6uJ.js";
|
|
12
|
+
import { t as W } from "./circle-alert-C8xmpMsK.js";
|
|
13
|
+
import { a as G, c as ae, d as oe, f as K, i as q, l as se, n as ce, o as le, p as ue, r as de, s as fe, t as pe, u as me } from "./styles-B2OrgEnn.js";
|
|
14
|
+
import { t as he } from "./clock-BW4JuDCN.js";
|
|
15
|
+
import { t as J } from "./loader-circle-BLmicnPG.js";
|
|
16
|
+
import { t as ge } from "./message-circle-C9hHMQCI.js";
|
|
17
|
+
import { t as _e } from "./send-DjPdq69F.js";
|
|
18
|
+
import { t as Y } from "./sparkles-M4azPVSP.js";
|
|
19
|
+
import { t as X } from "./triangle-alert-BuRWnynk.js";
|
|
18
20
|
import { t as Z } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
19
|
-
import { n as Q } from "./useCloudI18n-
|
|
21
|
+
import { n as Q } from "./useCloudI18n-AKCy98qD.js";
|
|
20
22
|
import { d as $ } from "./styleConstants-lGobwiLH.js";
|
|
21
|
-
import { _ as ve, a as ye, c as be, d as xe, f as Se, g as Ce, h as we, l as Te, m as Ee, n as De, o as Oe, p as ke, r as Ae, s as je, t as Me, v as Ne, y as Pe } from "./cloud-
|
|
23
|
+
import { _ as ve, a as ye, c as be, d as xe, f as Se, g as Ce, h as we, l as Te, m as Ee, n as De, o as Oe, p as ke, r as Ae, s as je, t as Me, v as Ne, y as Pe } from "./cloud-BQusL53H.js";
|
|
22
24
|
var Fe = H("save", [
|
|
23
25
|
["path", {
|
|
24
26
|
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",
|
|
@@ -36,49 +38,49 @@ var Fe = H("save", [
|
|
|
36
38
|
//#endregion
|
|
37
39
|
//#region src/cloud/composables/useSnapshotPreview.ts
|
|
38
40
|
function Ie(e) {
|
|
39
|
-
let { authManager: t, editor: n, history: r, conditionPreview: i, autoSave:
|
|
40
|
-
|
|
41
|
+
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
|
+
o(() => {
|
|
41
43
|
p = !0;
|
|
42
44
|
});
|
|
43
|
-
let m =
|
|
45
|
+
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);
|
|
44
46
|
function v() {
|
|
45
|
-
n.state.template?.id && !
|
|
47
|
+
n.state.template?.id && !c.value && (c.value = Ce({
|
|
46
48
|
authManager: t,
|
|
47
49
|
templateId: n.state.template.id,
|
|
48
50
|
onRestore: y,
|
|
49
|
-
onError:
|
|
50
|
-
}),
|
|
51
|
+
onError: s
|
|
52
|
+
}), c.value.loadSnapshots());
|
|
51
53
|
}
|
|
52
54
|
function y(e) {
|
|
53
55
|
n.setContent(e.content, !1), r.clear(), i.reset();
|
|
54
56
|
}
|
|
55
57
|
async function b(e) {
|
|
56
58
|
if (!p) {
|
|
57
|
-
if (
|
|
58
|
-
|
|
59
|
+
if (l.value) {
|
|
60
|
+
l.value = e, n.setContent(e.content, !1);
|
|
59
61
|
return;
|
|
60
62
|
}
|
|
61
|
-
n.state.isDirty && n.hasTemplate() && (await n.createSnapshot(), p) || (f.value = structuredClone(n.content.value),
|
|
63
|
+
n.state.isDirty && n.hasTemplate() && (await n.createSnapshot(), p) || (f.value = structuredClone(n.content.value), a?.pause(), l.value = e, n.setContent(e.content, !1));
|
|
62
64
|
}
|
|
63
65
|
}
|
|
64
66
|
async function x() {
|
|
65
|
-
if (!(!
|
|
66
|
-
if (await
|
|
67
|
+
if (!(!l.value || !c.value)) try {
|
|
68
|
+
if (await c.value.restoreSnapshot(l.value.id), p || (await c.value.loadSnapshots(), p)) return;
|
|
67
69
|
} catch (e) {
|
|
68
70
|
throw !p && f.value && n.setContent(f.value, !1), e;
|
|
69
71
|
} finally {
|
|
70
|
-
p || (
|
|
72
|
+
p || (l.value = null, f.value = null, a?.resume());
|
|
71
73
|
}
|
|
72
74
|
}
|
|
73
|
-
function
|
|
74
|
-
!
|
|
75
|
+
function S() {
|
|
76
|
+
!l.value || !f.value || (n.setContent(f.value, !1), l.value = null, f.value = null, a?.resume());
|
|
75
77
|
}
|
|
76
78
|
async function w() {
|
|
77
|
-
p ||
|
|
79
|
+
p || c.value && await c.value.loadSnapshots();
|
|
78
80
|
}
|
|
79
81
|
return {
|
|
80
|
-
snapshotHistoryInstance:
|
|
81
|
-
previewingSnapshot:
|
|
82
|
+
snapshotHistoryInstance: c,
|
|
83
|
+
previewingSnapshot: l,
|
|
82
84
|
contentBeforePreview: f,
|
|
83
85
|
isPreviewingSnapshot: m,
|
|
84
86
|
snapshotHistorySnapshots: h,
|
|
@@ -88,37 +90,37 @@ function Ie(e) {
|
|
|
88
90
|
handleRestore: y,
|
|
89
91
|
handleSnapshotNavigate: b,
|
|
90
92
|
confirmRestoreSnapshot: x,
|
|
91
|
-
cancelPreview:
|
|
93
|
+
cancelPreview: S,
|
|
92
94
|
loadSnapshotHistory: w
|
|
93
95
|
};
|
|
94
96
|
}
|
|
95
97
|
//#endregion
|
|
96
98
|
//#region src/cloud/composables/useCloudPanelState.ts
|
|
97
99
|
function Le() {
|
|
98
|
-
let e =
|
|
100
|
+
let e = u(null), t = C({
|
|
99
101
|
get: () => e.value === "ai-chat",
|
|
100
102
|
set: (t) => e.value = t ? "ai-chat" : null
|
|
101
|
-
}), n =
|
|
103
|
+
}), n = C({
|
|
102
104
|
get: () => e.value === "scoring",
|
|
103
105
|
set: (t) => e.value = t ? "scoring" : null
|
|
104
|
-
}), r =
|
|
106
|
+
}), r = C({
|
|
105
107
|
get: () => e.value === "design-reference",
|
|
106
108
|
set: (t) => e.value = t ? "design-reference" : null
|
|
107
|
-
}), i =
|
|
109
|
+
}), i = C({
|
|
108
110
|
get: () => e.value === "comments",
|
|
109
111
|
set: (t) => e.value = t ? "comments" : null
|
|
110
|
-
}), a =
|
|
112
|
+
}), a = u(!1), o = u(!1), s = u(void 0), c = u(!1), l = u(null), d = C(() => e.value !== null), f = C(() => {
|
|
111
113
|
let t = e.value;
|
|
112
114
|
return t === "ai-chat" || t === "design-reference" || t === "scoring" ? t : null;
|
|
113
|
-
}),
|
|
114
|
-
function
|
|
115
|
-
|
|
115
|
+
}), p = C(() => c.value || e.value === "ai-chat" || e.value === "design-reference" || e.value === "scoring");
|
|
116
|
+
function m() {
|
|
117
|
+
c.value = !c.value;
|
|
116
118
|
}
|
|
117
|
-
function
|
|
118
|
-
|
|
119
|
+
function h(t) {
|
|
120
|
+
c.value = !1, e.value = e.value === t ? null : t;
|
|
119
121
|
}
|
|
120
|
-
return I(
|
|
121
|
-
|
|
122
|
+
return I(l, () => {
|
|
123
|
+
c.value = !1;
|
|
122
124
|
}), {
|
|
123
125
|
activePanel: e,
|
|
124
126
|
aiChatOpen: t,
|
|
@@ -126,61 +128,61 @@ function Le() {
|
|
|
126
128
|
designReferenceOpen: r,
|
|
127
129
|
commentsOpen: i,
|
|
128
130
|
testEmailModalOpen: a,
|
|
129
|
-
mediaLibraryOpen:
|
|
130
|
-
mediaLibraryAccept:
|
|
131
|
-
aiMenuOpen:
|
|
132
|
-
aiMenuRef:
|
|
133
|
-
rightPanelOpen:
|
|
134
|
-
activeAiFeature:
|
|
135
|
-
aiButtonActive:
|
|
136
|
-
toggleAiMenu:
|
|
137
|
-
handleAiFeatureSelect:
|
|
131
|
+
mediaLibraryOpen: o,
|
|
132
|
+
mediaLibraryAccept: s,
|
|
133
|
+
aiMenuOpen: c,
|
|
134
|
+
aiMenuRef: l,
|
|
135
|
+
rightPanelOpen: d,
|
|
136
|
+
activeAiFeature: f,
|
|
137
|
+
aiButtonActive: p,
|
|
138
|
+
toggleAiMenu: m,
|
|
139
|
+
handleAiFeatureSelect: h
|
|
138
140
|
};
|
|
139
141
|
}
|
|
140
142
|
//#endregion
|
|
141
143
|
//#region src/cloud/composables/useCollabUndoWarning.ts
|
|
142
144
|
function Re(e) {
|
|
143
|
-
let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i =
|
|
145
|
+
let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i = u(!1), a = u(!1), { start: o } = F(() => {
|
|
144
146
|
a.value = !1;
|
|
145
147
|
}, k, { immediate: !1 });
|
|
146
|
-
function
|
|
147
|
-
i.value || !t.value || n() === 0 || !r.value || (i.value = !0, a.value = !0,
|
|
148
|
+
function s() {
|
|
149
|
+
i.value || !t.value || n() === 0 || !r.value || (i.value = !0, a.value = !0, o());
|
|
148
150
|
}
|
|
149
151
|
return {
|
|
150
152
|
collabUndoWarningVisible: a,
|
|
151
|
-
showCollabUndoWarning:
|
|
153
|
+
showCollabUndoWarning: s
|
|
152
154
|
};
|
|
153
155
|
}
|
|
154
156
|
//#endregion
|
|
155
157
|
//#region src/cloud/composables/useCloudFeatureFlags.ts
|
|
156
158
|
function ze(e) {
|
|
157
|
-
let { planConfigInstance: t, aiConfig: n, editor: r } = e, i =
|
|
158
|
-
|
|
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
|
+
f.value = "idle";
|
|
159
161
|
}, 3e3, { immediate: !1 });
|
|
160
162
|
return {
|
|
161
163
|
canUseAiGeneration: i,
|
|
162
164
|
canSendTestEmail: a,
|
|
163
|
-
hasTemplateSaved:
|
|
164
|
-
isWhiteLabeled:
|
|
165
|
-
templateLimit:
|
|
166
|
-
templateCount:
|
|
167
|
-
isSaveExporting:
|
|
168
|
-
saveStatus:
|
|
169
|
-
saveErrorMessage:
|
|
170
|
-
startSaveStatusClear:
|
|
165
|
+
hasTemplateSaved: o,
|
|
166
|
+
isWhiteLabeled: s,
|
|
167
|
+
templateLimit: c,
|
|
168
|
+
templateCount: l,
|
|
169
|
+
isSaveExporting: d,
|
|
170
|
+
saveStatus: f,
|
|
171
|
+
saveErrorMessage: p,
|
|
172
|
+
startSaveStatusClear: m
|
|
171
173
|
};
|
|
172
174
|
}
|
|
173
175
|
//#endregion
|
|
174
176
|
//#region src/cloud/composables/useCloudMediaLibrary.ts
|
|
175
177
|
function Be(e) {
|
|
176
|
-
let { onRequestMedia: t, mediaLibraryOpen: n, mediaLibraryAccept: r, authManager: i, getMediaConfig: a, onError:
|
|
177
|
-
function
|
|
178
|
+
let { onRequestMedia: t, mediaLibraryOpen: n, mediaLibraryAccept: r, authManager: i, getMediaConfig: a, onError: s } = e, c = null;
|
|
179
|
+
function l(e) {
|
|
178
180
|
return {
|
|
179
181
|
url: e.url,
|
|
180
182
|
alt: e.alt_text || void 0
|
|
181
183
|
};
|
|
182
184
|
}
|
|
183
|
-
async function
|
|
185
|
+
async function u(e) {
|
|
184
186
|
let i = e?.accept ?? ["images"];
|
|
185
187
|
if (e?.files?.length) {
|
|
186
188
|
if (t) {
|
|
@@ -188,89 +190,89 @@ function Be(e) {
|
|
|
188
190
|
accept: i,
|
|
189
191
|
files: e.files
|
|
190
192
|
});
|
|
191
|
-
return n ?
|
|
193
|
+
return n ? l(n) : null;
|
|
192
194
|
}
|
|
193
|
-
return
|
|
195
|
+
return d(e.files[0]);
|
|
194
196
|
}
|
|
195
197
|
if (t) {
|
|
196
198
|
let e = await t({ accept: i });
|
|
197
|
-
return e ?
|
|
199
|
+
return e ? l(e) : null;
|
|
198
200
|
}
|
|
199
|
-
return
|
|
200
|
-
|
|
201
|
+
return c &&= (c(null), null), r.value = i, n.value = !0, new Promise((e) => {
|
|
202
|
+
c = (t) => {
|
|
201
203
|
e(t);
|
|
202
204
|
};
|
|
203
205
|
});
|
|
204
206
|
}
|
|
205
|
-
async function
|
|
206
|
-
let t =
|
|
207
|
-
if (t) return
|
|
207
|
+
async function d(e) {
|
|
208
|
+
let t = f(e);
|
|
209
|
+
if (t) return s?.(t), null;
|
|
208
210
|
try {
|
|
209
211
|
let { MediaApiClient: t } = await import("@templatical/media-library");
|
|
210
|
-
return
|
|
212
|
+
return l(await new t(i).uploadMedia(e));
|
|
211
213
|
} catch (e) {
|
|
212
|
-
return
|
|
214
|
+
return s?.(e), null;
|
|
213
215
|
}
|
|
214
216
|
}
|
|
215
|
-
function
|
|
217
|
+
function f(e) {
|
|
216
218
|
let t = a?.() ?? null;
|
|
217
219
|
if (!t) return null;
|
|
218
220
|
let n = t.categories?.images?.mime_types ?? [];
|
|
219
221
|
return n.length > 0 && !n.includes(e.type) ? /* @__PURE__ */ Error(`Unsupported image type: ${e.type || "unknown"}. Accepted: ${n.join(", ")}.`) : t.max_file_size > 0 && e.size > t.max_file_size ? /* @__PURE__ */ Error(`Image is too large (${e.size} bytes). Maximum allowed is ${t.max_file_size} bytes.`) : null;
|
|
220
222
|
}
|
|
221
|
-
function
|
|
222
|
-
n.value = !1,
|
|
223
|
+
function p(e) {
|
|
224
|
+
n.value = !1, c?.(l(e)), c = null;
|
|
223
225
|
}
|
|
224
|
-
function
|
|
225
|
-
n.value = !1,
|
|
226
|
+
function m() {
|
|
227
|
+
n.value = !1, c?.(null), c = null;
|
|
226
228
|
}
|
|
227
|
-
return
|
|
228
|
-
|
|
229
|
+
return o(() => {
|
|
230
|
+
c &&= (c(null), null);
|
|
229
231
|
}), {
|
|
230
|
-
handleRequestMedia:
|
|
231
|
-
handleMediaSelect:
|
|
232
|
-
handleMediaLibraryClose:
|
|
232
|
+
handleRequestMedia: u,
|
|
233
|
+
handleMediaSelect: p,
|
|
234
|
+
handleMediaLibraryClose: m
|
|
233
235
|
};
|
|
234
236
|
}
|
|
235
237
|
//#endregion
|
|
236
238
|
//#region src/cloud/composables/useCloudInitialization.ts
|
|
237
239
|
function Ve(e) {
|
|
238
|
-
let { config: t, translations:
|
|
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 Me({
|
|
239
241
|
...t.auth,
|
|
240
242
|
onError: t.onError
|
|
241
|
-
}),
|
|
242
|
-
authManager:
|
|
243
|
+
}), g = Ee({
|
|
244
|
+
authManager: h,
|
|
243
245
|
onError: t.onError
|
|
244
|
-
}),
|
|
245
|
-
authManager:
|
|
246
|
+
}), v = u(/* @__PURE__ */ new Map()), y = xe({
|
|
247
|
+
authManager: h,
|
|
246
248
|
defaultFontFamily: t.fonts?.defaultFont,
|
|
247
249
|
templateDefaults: t.templateDefaults,
|
|
248
250
|
onError: t.onError,
|
|
249
|
-
lockedBlocks:
|
|
250
|
-
}),
|
|
251
|
-
authManager:
|
|
251
|
+
lockedBlocks: v
|
|
252
|
+
}), b = Pe({
|
|
253
|
+
authManager: h,
|
|
252
254
|
onError: t.onError
|
|
253
255
|
});
|
|
254
256
|
t.mcp?.enabled && ke({
|
|
255
|
-
editor:
|
|
256
|
-
channel:
|
|
257
|
+
editor: y,
|
|
258
|
+
channel: b.channel,
|
|
257
259
|
onOperation: t.mcp.onOperation
|
|
258
260
|
});
|
|
259
|
-
let
|
|
260
|
-
t.collaboration?.enabled && (
|
|
261
|
-
authManager:
|
|
262
|
-
editor:
|
|
263
|
-
channel:
|
|
261
|
+
let x = null;
|
|
262
|
+
t.collaboration?.enabled && (x = Oe({
|
|
263
|
+
authManager: h,
|
|
264
|
+
editor: y,
|
|
265
|
+
channel: b.channel,
|
|
264
266
|
onError: t.onError,
|
|
265
267
|
onCollaboratorJoined: t.collaboration.onCollaboratorJoined,
|
|
266
268
|
onCollaboratorLeft: t.collaboration.onCollaboratorLeft,
|
|
267
269
|
onBlockLocked: t.collaboration.onBlockLocked,
|
|
268
270
|
onBlockUnlocked: t.collaboration.onBlockUnlocked
|
|
269
|
-
}),
|
|
270
|
-
|
|
271
|
-
}, { immediate: !0 }), je(
|
|
272
|
-
let
|
|
273
|
-
editor:
|
|
271
|
+
}), a(() => x.lockedBlocks.value, (e) => {
|
|
272
|
+
v.value = e;
|
|
273
|
+
}, { immediate: !0 }), je(y, x));
|
|
274
|
+
let S = C(() => !!t.collaboration?.enabled && g.hasFeature("collaboration")), w = N({
|
|
275
|
+
editor: y,
|
|
274
276
|
config: {
|
|
275
277
|
uiTheme: t.uiTheme,
|
|
276
278
|
theme: void 0,
|
|
@@ -283,95 +285,95 @@ function Ve(e) {
|
|
|
283
285
|
onRequestMedia: null,
|
|
284
286
|
lint: K(t),
|
|
285
287
|
onSave: () => {
|
|
286
|
-
|
|
288
|
+
f.value?.().catch((e) => {
|
|
287
289
|
t.onError?.(e);
|
|
288
290
|
});
|
|
289
291
|
}
|
|
290
292
|
},
|
|
291
|
-
translations:
|
|
292
|
-
fontsManager:
|
|
293
|
-
historyOptions:
|
|
293
|
+
translations: n,
|
|
294
|
+
fontsManager: r,
|
|
295
|
+
historyOptions: x ? { isRemoteOperation: () => x._isProcessingRemoteOperation() } : void 0,
|
|
294
296
|
autoSaveOptions: {
|
|
295
297
|
onChange: async () => {
|
|
296
|
-
|
|
298
|
+
y.hasTemplate() && (await y.createSnapshot(), p?.snapshotHistoryInstance.value?.loadSnapshots());
|
|
297
299
|
},
|
|
298
300
|
debounce: t.autoSaveDebounce ?? 5e3,
|
|
299
|
-
enabled: () => t.autoSave !== !1 &&
|
|
301
|
+
enabled: () => t.autoSave !== !1 && g.hasFeature("auto_save")
|
|
300
302
|
},
|
|
301
|
-
themeExtraStyles: () => ({ "--tpl-drop-text": `"${
|
|
302
|
-
keyboardOptions: { onBeforeUndo: () =>
|
|
303
|
+
themeExtraStyles: () => ({ "--tpl-drop-text": `"${n.canvas.dropHere}"` }),
|
|
304
|
+
keyboardOptions: { onBeforeUndo: () => m?.showCollabUndoWarning() },
|
|
303
305
|
editorRoot: e.editorRoot,
|
|
304
306
|
containerEl: e.containerEl
|
|
305
307
|
}), T = Re({
|
|
306
|
-
isCollaborationEnabled:
|
|
307
|
-
getCollaboratorCount: () =>
|
|
308
|
+
isCollaborationEnabled: S,
|
|
309
|
+
getCollaboratorCount: () => x?.collaborators.value.length ?? 0,
|
|
308
310
|
canUndo: w.history.canUndo
|
|
309
311
|
});
|
|
310
|
-
|
|
312
|
+
m = T;
|
|
311
313
|
let E = Ie({
|
|
312
|
-
authManager:
|
|
313
|
-
editor:
|
|
314
|
+
authManager: h,
|
|
315
|
+
editor: y,
|
|
314
316
|
history: w.history,
|
|
315
317
|
conditionPreview: w.conditionPreview,
|
|
316
318
|
autoSave: w.autoSave,
|
|
317
319
|
onError: t.onError
|
|
318
320
|
});
|
|
319
|
-
|
|
321
|
+
p = E;
|
|
320
322
|
let D = Le(), O = ye(t.ai), k = ze({
|
|
321
|
-
planConfigInstance:
|
|
323
|
+
planConfigInstance: g,
|
|
322
324
|
aiConfig: O,
|
|
323
|
-
editor:
|
|
325
|
+
editor: y
|
|
324
326
|
}), A = Be({
|
|
325
327
|
onRequestMedia: t.onRequestMedia,
|
|
326
328
|
mediaLibraryOpen: D.mediaLibraryOpen,
|
|
327
329
|
mediaLibraryAccept: D.mediaLibraryAccept,
|
|
328
|
-
authManager:
|
|
329
|
-
getMediaConfig: () =>
|
|
330
|
+
authManager: h,
|
|
331
|
+
getMediaConfig: () => g.config.value?.media ?? null,
|
|
330
332
|
onError: t.onError
|
|
331
333
|
});
|
|
332
334
|
P({
|
|
333
|
-
onBlockMove:
|
|
334
|
-
onBlockAdd:
|
|
335
|
+
onBlockMove: y.moveBlock,
|
|
336
|
+
onBlockAdd: y.addBlock
|
|
335
337
|
});
|
|
336
338
|
let j = Se({
|
|
337
|
-
authManager:
|
|
339
|
+
authManager: h,
|
|
338
340
|
getFontsConfig: () => t.fonts,
|
|
339
|
-
canUseCustomFonts: () =>
|
|
341
|
+
canUseCustomFonts: () => g.hasFeature("custom_fonts")
|
|
340
342
|
}), ee = Ne({
|
|
341
|
-
authManager:
|
|
342
|
-
getTemplateId: () =>
|
|
343
|
-
save: () =>
|
|
343
|
+
authManager: h,
|
|
344
|
+
getTemplateId: () => y.state.template?.id ?? null,
|
|
345
|
+
save: () => y.save(),
|
|
344
346
|
exportHtml: (e) => j.exportHtml(e),
|
|
345
347
|
onError: t.onError,
|
|
346
|
-
isAuthReady:
|
|
348
|
+
isAuthReady: c,
|
|
347
349
|
onBeforeTestEmail: t.onBeforeTestEmail
|
|
348
350
|
}), F = Te({
|
|
349
|
-
authManager:
|
|
350
|
-
getTemplateId: () =>
|
|
351
|
-
getSocketId: () =>
|
|
351
|
+
authManager: h,
|
|
352
|
+
getTemplateId: () => y.state.template?.id ?? null,
|
|
353
|
+
getSocketId: () => b.getSocketId(),
|
|
352
354
|
onComment: t.onComment,
|
|
353
355
|
onError: t.onError,
|
|
354
|
-
isAuthReady:
|
|
355
|
-
hasCommentingFeature: () => t.commenting !== !1 &&
|
|
356
|
+
isAuthReady: c,
|
|
357
|
+
hasCommentingFeature: () => t.commenting !== !1 && g.hasFeature("commenting")
|
|
356
358
|
});
|
|
357
359
|
be({
|
|
358
360
|
comments: F,
|
|
359
|
-
channel:
|
|
361
|
+
channel: b.channel
|
|
360
362
|
});
|
|
361
363
|
let I = we({
|
|
362
|
-
authManager:
|
|
364
|
+
authManager: h,
|
|
363
365
|
onError: t.onError
|
|
364
|
-
}), z =
|
|
365
|
-
authManager:
|
|
366
|
-
getTemplateId: () =>
|
|
366
|
+
}), z = u(!1), V = u(null), H = u(!1), U = ve({
|
|
367
|
+
authManager: h,
|
|
368
|
+
getTemplateId: () => y.state.template?.id ?? null
|
|
367
369
|
});
|
|
368
370
|
function W(e) {
|
|
369
371
|
D.commentsOpen.value = !0, queueMicrotask(() => {
|
|
370
|
-
|
|
372
|
+
o()?.filterByBlock(e);
|
|
371
373
|
});
|
|
372
374
|
}
|
|
373
|
-
|
|
374
|
-
plan:
|
|
375
|
+
_(L, A.handleRequestMedia), _(B, h), _(ie, O), _(ne, F), _(te, I), _(R, U), _(re, {
|
|
376
|
+
plan: g,
|
|
375
377
|
ai: O,
|
|
376
378
|
comments: {
|
|
377
379
|
getBlockCount: (e) => F.commentCountByBlock.value.get(e) ?? 0,
|
|
@@ -384,48 +386,48 @@ function Ve(e) {
|
|
|
384
386
|
openBrowser: () => {
|
|
385
387
|
H.value = !0;
|
|
386
388
|
},
|
|
387
|
-
moduleCount:
|
|
389
|
+
moduleCount: C(() => I.modules.value.length)
|
|
388
390
|
}
|
|
389
391
|
});
|
|
390
392
|
function G(e) {
|
|
391
|
-
|
|
393
|
+
g.hasFeature("theme_customization") && (w.themeOverrides.value = e);
|
|
392
394
|
}
|
|
393
395
|
function ae(e) {
|
|
394
|
-
|
|
396
|
+
y.setUiTheme(e);
|
|
395
397
|
}
|
|
396
398
|
async function oe() {
|
|
397
|
-
|
|
399
|
+
s.value = !0, l.value = null;
|
|
398
400
|
try {
|
|
399
|
-
if (await
|
|
400
|
-
|
|
401
|
-
let e = await De({ authManager:
|
|
402
|
-
if (
|
|
401
|
+
if (await h.initialize(), d) return;
|
|
402
|
+
c.value = !0;
|
|
403
|
+
let e = await De({ authManager: h });
|
|
404
|
+
if (d) return;
|
|
403
405
|
if (!e.api.ok) throw Error("Health check failed: API is not reachable");
|
|
404
406
|
if (!e.auth.ok) throw Error(`Health check failed: authentication error${e.auth.error ? ` - ${e.auth.error}` : ""}`);
|
|
405
|
-
if (e.websocket.ok || M.warn("WebSocket health check failed:", e.websocket.error ?? "unknown error", "-- real-time features will be disabled."), await
|
|
406
|
-
|
|
407
|
+
if (e.websocket.ok || M.warn("WebSocket health check failed:", e.websocket.error ?? "unknown error", "-- real-time features will be disabled."), await g.fetchConfig(), d) return;
|
|
408
|
+
r.setCustomFontsEnabled(g.hasFeature("custom_fonts")), t.customBlocks?.length && g.hasFeature("custom_blocks") && w.registerCustomBlocks(t.customBlocks), t.theme && g.hasFeature("theme_customization") && (w.themeOverrides.value = t.theme), t.modules !== !1 && g.hasFeature("saved_modules") && I.loadModules(), i("ready");
|
|
407
409
|
} catch (e) {
|
|
408
|
-
if (
|
|
410
|
+
if (d) return;
|
|
409
411
|
let n = e instanceof Error ? e : Error("Initialization failed", { cause: e });
|
|
410
|
-
|
|
412
|
+
l.value = n, t.onError?.(n);
|
|
411
413
|
} finally {
|
|
412
|
-
|
|
414
|
+
d || (s.value = !1);
|
|
413
415
|
}
|
|
414
416
|
}
|
|
415
417
|
function q() {
|
|
416
|
-
|
|
418
|
+
d = !0, r.cleanupFontLinks(), b.disconnect(), w.destroy(), t.onUnmount?.();
|
|
417
419
|
}
|
|
418
420
|
return {
|
|
419
|
-
isInitializing:
|
|
420
|
-
isAuthReady:
|
|
421
|
-
initError:
|
|
422
|
-
isDestroyed: () =>
|
|
423
|
-
authManager:
|
|
424
|
-
planConfigInstance:
|
|
425
|
-
websocket:
|
|
426
|
-
collaboration:
|
|
427
|
-
isCollaborationEnabled:
|
|
428
|
-
editor:
|
|
421
|
+
isInitializing: s,
|
|
422
|
+
isAuthReady: c,
|
|
423
|
+
initError: l,
|
|
424
|
+
isDestroyed: () => d,
|
|
425
|
+
authManager: h,
|
|
426
|
+
planConfigInstance: g,
|
|
427
|
+
websocket: b,
|
|
428
|
+
collaboration: x,
|
|
429
|
+
isCollaborationEnabled: S,
|
|
430
|
+
editor: y,
|
|
429
431
|
core: w,
|
|
430
432
|
aiConfig: O,
|
|
431
433
|
featureFlags: k,
|
|
@@ -441,7 +443,7 @@ function Ve(e) {
|
|
|
441
443
|
showSaveModuleDialog: z,
|
|
442
444
|
showModuleBrowserModal: H,
|
|
443
445
|
saveModulePreSelectedBlockId: V,
|
|
444
|
-
onSaveHook:
|
|
446
|
+
onSaveHook: f,
|
|
445
447
|
initialize: oe,
|
|
446
448
|
destroy: q,
|
|
447
449
|
setThemeOverrides: G,
|
|
@@ -514,29 +516,29 @@ function Ue(e) {
|
|
|
514
516
|
//#endregion
|
|
515
517
|
//#region src/cloud/composables/useCloudSaveGate.ts
|
|
516
518
|
function We(e) {
|
|
517
|
-
let t =
|
|
518
|
-
async function
|
|
519
|
+
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);
|
|
520
|
+
async function o(e) {
|
|
519
521
|
return a.value ? (n = e, t.value = !0, !1) : (await e(), !0);
|
|
520
522
|
}
|
|
521
|
-
async function
|
|
523
|
+
async function s() {
|
|
522
524
|
let e = n;
|
|
523
525
|
n = null, t.value = !1, e && await e();
|
|
524
526
|
}
|
|
525
|
-
function
|
|
527
|
+
function c() {
|
|
526
528
|
n = null, t.value = !1;
|
|
527
529
|
}
|
|
528
530
|
return {
|
|
529
531
|
shouldBlock: a,
|
|
530
532
|
blockingIssues: i,
|
|
531
533
|
modalOpen: t,
|
|
532
|
-
tryRunSave:
|
|
533
|
-
confirmAndSave:
|
|
534
|
-
cancel:
|
|
534
|
+
tryRunSave: o,
|
|
535
|
+
confirmAndSave: s,
|
|
536
|
+
cancel: c
|
|
535
537
|
};
|
|
536
538
|
}
|
|
537
539
|
//#endregion
|
|
538
540
|
//#region src/cloud/components/CloudSaveGateModal.vue?vue&type=script&setup=true&lang.ts
|
|
539
|
-
var Ge = ["aria-label"], Ke = { 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)]" }, qe = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Je = { class: "tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ye = { class: "tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Xe = { 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" }, Ze = { class: "tpl:text-xs tpl:text-[var(--tpl-text)]" }, Qe = { class: "tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, $e = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, et = /* @__PURE__ */
|
|
541
|
+
var Ge = ["aria-label"], Ke = { 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)]" }, qe = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Je = { class: "tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ye = { class: "tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Xe = { 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" }, Ze = { class: "tpl:text-xs tpl:text-[var(--tpl-text)]" }, Qe = { class: "tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, $e = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, et = /* @__PURE__ */ f({
|
|
540
542
|
__name: "CloudSaveGateModal",
|
|
541
543
|
props: {
|
|
542
544
|
open: { type: Boolean },
|
|
@@ -544,41 +546,41 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
544
546
|
},
|
|
545
547
|
emits: ["cancel", "confirm"],
|
|
546
548
|
setup(t, { emit: n }) {
|
|
547
|
-
let
|
|
548
|
-
return (n,
|
|
549
|
+
let r = n, { t: i } = Q();
|
|
550
|
+
return (n, a) => (s(), v(O, {
|
|
549
551
|
"enter-active-class": "tpl:transition-opacity tpl:duration-150",
|
|
550
552
|
"leave-active-class": "tpl:transition-opacity tpl:duration-150",
|
|
551
553
|
"enter-from-class": "tpl:opacity-0",
|
|
552
554
|
"leave-to-class": "tpl:opacity-0"
|
|
553
555
|
}, {
|
|
554
|
-
default:
|
|
556
|
+
default: l(() => [t.open ? (s(), m("div", {
|
|
555
557
|
key: 0,
|
|
556
558
|
role: "dialog",
|
|
557
559
|
"aria-modal": "true",
|
|
558
|
-
"aria-label":
|
|
560
|
+
"aria-label": b(i).saveGate.title,
|
|
559
561
|
class: "tpl:fixed tpl:inset-0 tpl:z-50 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/40 tpl:p-6",
|
|
560
|
-
onClick:
|
|
561
|
-
}, [
|
|
562
|
-
|
|
562
|
+
onClick: a[2] ||= E((e) => r("cancel"), ["self"])
|
|
563
|
+
}, [p("div", Ke, [
|
|
564
|
+
p("header", qe, [g(b(X), {
|
|
563
565
|
size: 18,
|
|
564
566
|
"stroke-width": 2,
|
|
565
567
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
566
|
-
}),
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
key: `${
|
|
568
|
+
}), p("h2", Je, c(b(i).saveGate.title), 1)]),
|
|
569
|
+
p("p", Ye, c(b(i).saveGate.body), 1),
|
|
570
|
+
p("ul", Xe, [(s(!0), m(S, null, e(t.issues, (e) => (s(), m("li", {
|
|
571
|
+
key: `${e.ruleId}-${e.blockId ?? "template"}`,
|
|
570
572
|
class: "tpl:flex tpl:flex-col tpl:gap-0.5 tpl:rounded tpl:px-2 tpl:py-1.5"
|
|
571
|
-
}, [
|
|
572
|
-
|
|
573
|
+
}, [p("span", Ze, c(e.message), 1), p("span", Qe, c(e.ruleId), 1)]))), 128))]),
|
|
574
|
+
p("footer", $e, [p("button", {
|
|
573
575
|
type: "button",
|
|
574
576
|
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)]",
|
|
575
|
-
onClick:
|
|
576
|
-
},
|
|
577
|
+
onClick: a[0] ||= (e) => r("cancel")
|
|
578
|
+
}, c(b(i).saveGate.cancel), 1), p("button", {
|
|
577
579
|
type: "button",
|
|
578
580
|
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",
|
|
579
|
-
onClick:
|
|
580
|
-
},
|
|
581
|
-
])], 8, Ge)) :
|
|
581
|
+
onClick: a[1] ||= (e) => r("confirm")
|
|
582
|
+
}, c(b(i).saveGate.confirm), 1)])
|
|
583
|
+
])], 8, Ge)) : w("", !0)]),
|
|
582
584
|
_: 1
|
|
583
585
|
}));
|
|
584
586
|
}
|
|
@@ -608,7 +610,7 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
608
610
|
}, dt = ["aria-expanded"], ft = {
|
|
609
611
|
key: 0,
|
|
610
612
|
class: "tpl:absolute tpl:right-0 tpl:top-full tpl:z-50 tpl:mt-1 tpl:origin-top-right"
|
|
611
|
-
}, pt = ["disabled"], mt = ["disabled"], ht = /* @__PURE__ */
|
|
613
|
+
}, pt = ["disabled"], mt = ["disabled"], ht = /* @__PURE__ */ f({
|
|
612
614
|
__name: "CloudHeader",
|
|
613
615
|
props: {
|
|
614
616
|
editor: {},
|
|
@@ -625,91 +627,91 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
625
627
|
isSaving: { type: Boolean }
|
|
626
628
|
},
|
|
627
629
|
emits: ["save"],
|
|
628
|
-
setup(
|
|
629
|
-
let
|
|
630
|
-
return (
|
|
631
|
-
|
|
632
|
-
used:
|
|
633
|
-
max:
|
|
630
|
+
setup(e) {
|
|
631
|
+
let t = h(() => import("./CollaboratorBar-DMSjd3HZ.js")), r = h(() => import("./SnapshotHistory-cfxmOsJu.js")), a = h(() => import("./AiFeatureMenu-CU6kTMTf.js")), { t: o, format: u } = Q();
|
|
632
|
+
return (d, f) => (s(), m("header", tt, [
|
|
633
|
+
p("div", nt, [e.featureFlags.templateLimit.value === null ? w("", !0) : (s(), m("span", rt, c(b(u)(b(o).header.templatesUsed, {
|
|
634
|
+
used: e.featureFlags.templateCount.value,
|
|
635
|
+
max: e.featureFlags.templateLimit.value
|
|
634
636
|
})), 1))]),
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
viewport:
|
|
638
|
-
onChange:
|
|
637
|
+
p("div", it, [
|
|
638
|
+
g(le, {
|
|
639
|
+
viewport: e.editor.state.viewport,
|
|
640
|
+
onChange: e.editor.setViewport
|
|
639
641
|
}, null, 8, ["viewport", "onChange"]),
|
|
640
|
-
|
|
641
|
-
"dark-mode":
|
|
642
|
-
onChange:
|
|
642
|
+
g(q, {
|
|
643
|
+
"dark-mode": e.editor.state.darkMode,
|
|
644
|
+
onChange: e.editor.setDarkMode
|
|
643
645
|
}, null, 8, ["dark-mode", "onChange"]),
|
|
644
|
-
|
|
645
|
-
"preview-mode":
|
|
646
|
-
onChange:
|
|
646
|
+
g(G, {
|
|
647
|
+
"preview-mode": e.editor.state.previewMode,
|
|
648
|
+
onChange: e.editor.setPreviewMode
|
|
647
649
|
}, null, 8, ["preview-mode", "onChange"]),
|
|
648
|
-
|
|
650
|
+
e.collaboration && e.isCollaborationEnabled ? (s(), v(b(t), {
|
|
649
651
|
key: 0,
|
|
650
|
-
collaborators:
|
|
651
|
-
"is-connected":
|
|
652
|
-
}, null, 8, ["collaborators", "is-connected"])) :
|
|
653
|
-
|
|
652
|
+
collaborators: e.collaboration.collaborators.value,
|
|
653
|
+
"is-connected": e.websocket.isConnected.value
|
|
654
|
+
}, null, 8, ["collaborators", "is-connected"])) : w("", !0),
|
|
655
|
+
e.snapshotPreview.snapshotHistoryInstance.value ? (s(), v(b(r), {
|
|
654
656
|
key: 1,
|
|
655
|
-
snapshots:
|
|
656
|
-
"is-loading":
|
|
657
|
-
"is-restoring":
|
|
658
|
-
onLoad:
|
|
659
|
-
onNavigate:
|
|
657
|
+
snapshots: e.snapshotPreview.snapshotHistorySnapshots.value,
|
|
658
|
+
"is-loading": e.snapshotPreview.snapshotHistoryIsLoading.value,
|
|
659
|
+
"is-restoring": e.snapshotPreview.snapshotHistoryIsRestoring.value,
|
|
660
|
+
onLoad: e.snapshotPreview.loadSnapshotHistory,
|
|
661
|
+
onNavigate: e.snapshotPreview.handleSnapshotNavigate
|
|
660
662
|
}, null, 8, [
|
|
661
663
|
"snapshots",
|
|
662
664
|
"is-loading",
|
|
663
665
|
"is-restoring",
|
|
664
666
|
"onLoad",
|
|
665
667
|
"onNavigate"
|
|
666
|
-
])) :
|
|
668
|
+
])) : w("", !0)
|
|
667
669
|
]),
|
|
668
|
-
|
|
669
|
-
|
|
670
|
+
p("div", at, [
|
|
671
|
+
e.featureFlags.saveStatus.value === "error" ? (s(), m("div", {
|
|
670
672
|
key: 0,
|
|
671
673
|
"aria-live": "assertive",
|
|
672
674
|
class: "tpl-tooltip tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]",
|
|
673
|
-
"data-tooltip":
|
|
674
|
-
}, [
|
|
675
|
+
"data-tooltip": e.featureFlags.saveErrorMessage.value
|
|
676
|
+
}, [g(b(W), {
|
|
675
677
|
size: 12,
|
|
676
678
|
"stroke-width": 2.5
|
|
677
|
-
}),
|
|
679
|
+
}), y(" " + c(b(o).header.saveFailed), 1)], 8, ot)) : e.featureFlags.saveStatus.value === "saved" ? (s(), m("div", st, [g(b(U), {
|
|
678
680
|
size: 12,
|
|
679
681
|
"stroke-width": 2.5
|
|
680
|
-
}),
|
|
681
|
-
|
|
682
|
+
}), y(" " + c(b(o).header.saved), 1)])) : e.editor.state.isDirty ? (s(), m("div", ct, [f[4] ||= p("span", { class: "tpl-pulse tpl:size-1.5 tpl:rounded-full tpl:bg-[var(--tpl-primary)]" }, null, -1), y(" " + c(b(o).header.unsaved), 1)])) : w("", !0),
|
|
683
|
+
e.commentsInstance.isEnabled.value && e.featureFlags.hasTemplateSaved.value ? (s(), m("button", {
|
|
682
684
|
key: 3,
|
|
683
|
-
"aria-label":
|
|
684
|
-
"aria-expanded":
|
|
685
|
-
class:
|
|
686
|
-
style:
|
|
687
|
-
backgroundColor:
|
|
688
|
-
color:
|
|
685
|
+
"aria-label": e.commentsInstance.unresolvedCount.value > 0 ? `${b(o).comments.button} (${e.commentsInstance.unresolvedCount.value})` : b(o).comments.button,
|
|
686
|
+
"aria-expanded": e.panelState.commentsOpen.value,
|
|
687
|
+
class: i(b($)),
|
|
688
|
+
style: n({
|
|
689
|
+
backgroundColor: e.panelState.commentsOpen.value ? "var(--tpl-primary)" : "transparent",
|
|
690
|
+
color: e.panelState.commentsOpen.value ? "var(--tpl-bg)" : "var(--tpl-primary)",
|
|
689
691
|
borderColor: "var(--tpl-primary)"
|
|
690
692
|
}),
|
|
691
|
-
onClick:
|
|
693
|
+
onClick: f[0] ||= (t) => e.panelState.commentsOpen.value = !e.panelState.commentsOpen.value
|
|
692
694
|
}, [
|
|
693
|
-
|
|
695
|
+
g(b(ge), {
|
|
694
696
|
size: 16,
|
|
695
697
|
"stroke-width": 2
|
|
696
698
|
}),
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
], 14, lt)) :
|
|
700
|
-
|
|
699
|
+
y(" " + c(b(o).comments.button) + " ", 1),
|
|
700
|
+
e.commentsInstance.unresolvedCount.value > 0 && !e.panelState.commentsOpen.value ? (s(), m("span", ut, c(e.commentsInstance.unresolvedCount.value), 1)) : w("", !0)
|
|
701
|
+
], 14, lt)) : w("", !0),
|
|
702
|
+
e.featureFlags.canUseAiGeneration.value && e.featureFlags.hasTemplateSaved.value ? (s(), m("div", {
|
|
701
703
|
key: 4,
|
|
702
|
-
ref: (
|
|
704
|
+
ref: (t) => e.panelState.aiMenuRef.value = t,
|
|
703
705
|
class: "tpl:relative"
|
|
704
|
-
}, [
|
|
705
|
-
"aria-expanded":
|
|
706
|
-
class:
|
|
707
|
-
onClick:
|
|
708
|
-
}, [
|
|
706
|
+
}, [p("button", {
|
|
707
|
+
"aria-expanded": e.panelState.aiMenuOpen.value,
|
|
708
|
+
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"]),
|
|
709
|
+
onClick: f[1] ||= E((...t) => e.panelState.toggleAiMenu && e.panelState.toggleAiMenu(...t), ["stop"])
|
|
710
|
+
}, [g(b(Y), {
|
|
709
711
|
size: 16,
|
|
710
712
|
"stroke-width": 2,
|
|
711
713
|
class: "tpl-ai-btn-icon"
|
|
712
|
-
}),
|
|
714
|
+
}), y(" " + c(b(o).aiChat.button), 1)], 10, dt), g(O, {
|
|
713
715
|
"enter-active-class": "tpl:transition-all tpl:duration-150 tpl:ease-out",
|
|
714
716
|
"enter-from-class": "tpl:scale-95 tpl:opacity-0",
|
|
715
717
|
"enter-to-class": "tpl:scale-100 tpl:opacity-100",
|
|
@@ -717,55 +719,55 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
717
719
|
"leave-from-class": "tpl:scale-100 tpl:opacity-100",
|
|
718
720
|
"leave-to-class": "tpl:scale-95 tpl:opacity-0"
|
|
719
721
|
}, {
|
|
720
|
-
default:
|
|
721
|
-
"active-feature":
|
|
722
|
-
onSelect:
|
|
723
|
-
}, null, 8, ["active-feature", "onSelect"])])) :
|
|
722
|
+
default: l(() => [e.panelState.aiMenuOpen.value ? (s(), m("div", ft, [g(b(a), {
|
|
723
|
+
"active-feature": e.panelState.activeAiFeature.value,
|
|
724
|
+
onSelect: e.panelState.handleAiFeatureSelect
|
|
725
|
+
}, null, 8, ["active-feature", "onSelect"])])) : w("", !0)]),
|
|
724
726
|
_: 1
|
|
725
|
-
})], 512)) :
|
|
726
|
-
|
|
727
|
+
})], 512)) : w("", !0),
|
|
728
|
+
e.testEmail.isEnabled.value && e.featureFlags.canSendTestEmail.value ? (s(), m("button", {
|
|
727
729
|
key: 5,
|
|
728
|
-
class:
|
|
730
|
+
class: i(b($)),
|
|
729
731
|
style: {
|
|
730
732
|
"background-color": "transparent",
|
|
731
733
|
color: "var(--tpl-primary)",
|
|
732
734
|
"border-color": "var(--tpl-primary)"
|
|
733
735
|
},
|
|
734
|
-
disabled:
|
|
735
|
-
onClick:
|
|
736
|
-
}, [
|
|
736
|
+
disabled: e.testEmail.isSending.value || !e.featureFlags.hasTemplateSaved.value,
|
|
737
|
+
onClick: f[2] ||= (t) => e.panelState.testEmailModalOpen.value = !0
|
|
738
|
+
}, [e.testEmail.isSending.value ? (s(), v(b(J), {
|
|
737
739
|
key: 1,
|
|
738
740
|
class: "tpl-spinner",
|
|
739
741
|
size: 16,
|
|
740
742
|
"stroke-width": 2
|
|
741
|
-
})) : (
|
|
743
|
+
})) : (s(), v(b(_e), {
|
|
742
744
|
key: 0,
|
|
743
745
|
size: 16,
|
|
744
746
|
"stroke-width": 2
|
|
745
|
-
})),
|
|
746
|
-
|
|
747
|
-
class:
|
|
747
|
+
})), y(" " + c(b(o).testEmail.button), 1)], 10, pt)) : w("", !0),
|
|
748
|
+
p("button", {
|
|
749
|
+
class: i(b($)),
|
|
748
750
|
style: {
|
|
749
751
|
"background-color": "transparent",
|
|
750
752
|
color: "var(--tpl-primary)",
|
|
751
753
|
"border-color": "var(--tpl-primary)"
|
|
752
754
|
},
|
|
753
|
-
disabled:
|
|
754
|
-
onClick:
|
|
755
|
-
}, [
|
|
755
|
+
disabled: e.isSaveDisabled,
|
|
756
|
+
onClick: f[3] ||= (e) => d.$emit("save")
|
|
757
|
+
}, [e.isSaving ? (s(), v(b(J), {
|
|
756
758
|
key: 1,
|
|
757
759
|
class: "tpl-spinner",
|
|
758
760
|
size: 16,
|
|
759
761
|
"stroke-width": 2
|
|
760
|
-
})) : (
|
|
762
|
+
})) : (s(), v(b(Fe), {
|
|
761
763
|
key: 0,
|
|
762
764
|
size: 16,
|
|
763
765
|
"stroke-width": 2
|
|
764
|
-
})),
|
|
766
|
+
})), y(" " + c(e.isSaving ? b(o).header.saving : b(o).header.save), 1)], 10, mt)
|
|
765
767
|
])
|
|
766
768
|
]));
|
|
767
769
|
}
|
|
768
|
-
}), gt = /* @__PURE__ */
|
|
770
|
+
}), gt = /* @__PURE__ */ f({
|
|
769
771
|
__name: "CloudPanels",
|
|
770
772
|
props: {
|
|
771
773
|
config: {},
|
|
@@ -787,80 +789,80 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
787
789
|
"send-test-email",
|
|
788
790
|
"module-insert"
|
|
789
791
|
],
|
|
790
|
-
setup(
|
|
791
|
-
let
|
|
792
|
+
setup(e, { expose: t, emit: n }) {
|
|
793
|
+
let r = h(() => import("./AiChatSidebar-BIKvYREk.js")), i = h(() => import("./CommentsSidebar-D_tSGvTX.js")), a = h(() => import("./DesignReferenceSidebar-DWYK9nTk.js")), o = h(() => import("./TemplateScoringPanel-CZ62rGHz.js")), c = h(() => import("./TestEmailModal-sr1MaMVX.js")), l = h(() => import("./SaveModuleDialog-Cy2XyjYT.js")), d = h(() => import("./ModuleBrowserModal-BOzleijA.js")), f = h(async () => {
|
|
792
794
|
try {
|
|
793
795
|
return (await import("@templatical/media-library")).MediaLibraryModal;
|
|
794
796
|
} catch {
|
|
795
797
|
throw Error("[Templatical] Cloud media library requires the optional peer dependency '@templatical/media-library'. Please install it.");
|
|
796
798
|
}
|
|
797
|
-
}), p =
|
|
798
|
-
function
|
|
799
|
+
}), p = n;
|
|
800
|
+
function _(e, t, n) {
|
|
799
801
|
t.history.record(), n.setContent(e), t.conditionPreview.reset();
|
|
800
802
|
}
|
|
801
|
-
function
|
|
803
|
+
function y(e, t) {
|
|
802
804
|
p("module-insert", e, t);
|
|
803
805
|
}
|
|
804
|
-
let
|
|
805
|
-
function
|
|
806
|
-
|
|
806
|
+
let x = u(null);
|
|
807
|
+
function C(e) {
|
|
808
|
+
x.value?.filterByBlock(e);
|
|
807
809
|
}
|
|
808
|
-
return
|
|
809
|
-
|
|
810
|
-
visible:
|
|
811
|
-
"on-apply": (
|
|
812
|
-
onClose:
|
|
810
|
+
return t({ filterCommentsByBlock: C }), (t, n) => (s(), m(S, null, [
|
|
811
|
+
g(b(r), {
|
|
812
|
+
visible: e.panelState.aiChatOpen.value,
|
|
813
|
+
"on-apply": (t) => _(t, e.core, e.editor),
|
|
814
|
+
onClose: n[0] ||= (t) => e.panelState.aiChatOpen.value = !1
|
|
813
815
|
}, null, 8, ["visible", "on-apply"]),
|
|
814
|
-
|
|
815
|
-
visible:
|
|
816
|
-
onClose:
|
|
816
|
+
g(b(o), {
|
|
817
|
+
visible: e.panelState.scoringPanelOpen.value,
|
|
818
|
+
onClose: n[1] ||= (t) => e.panelState.scoringPanelOpen.value = !1
|
|
817
819
|
}, null, 8, ["visible"]),
|
|
818
|
-
|
|
819
|
-
visible:
|
|
820
|
-
"has-existing-blocks":
|
|
821
|
-
onClose:
|
|
822
|
-
onApply:
|
|
820
|
+
g(b(a), {
|
|
821
|
+
visible: e.panelState.designReferenceOpen.value,
|
|
822
|
+
"has-existing-blocks": e.editor.content.value.blocks.length > 0,
|
|
823
|
+
onClose: n[2] ||= (t) => e.panelState.designReferenceOpen.value = !1,
|
|
824
|
+
onApply: n[3] ||= (t) => _(t, e.core, e.editor)
|
|
823
825
|
}, null, 8, ["visible", "has-existing-blocks"]),
|
|
824
|
-
|
|
826
|
+
g(b(i), {
|
|
825
827
|
ref_key: "commentsSidebar",
|
|
826
|
-
ref:
|
|
827
|
-
visible:
|
|
828
|
-
onClose:
|
|
828
|
+
ref: x,
|
|
829
|
+
visible: e.panelState.commentsOpen.value,
|
|
830
|
+
onClose: n[4] ||= (t) => e.panelState.commentsOpen.value = !1
|
|
829
831
|
}, null, 8, ["visible"]),
|
|
830
|
-
|
|
831
|
-
visible:
|
|
832
|
-
"allowed-emails":
|
|
833
|
-
"is-sending":
|
|
834
|
-
error:
|
|
835
|
-
onSend:
|
|
836
|
-
onClose:
|
|
832
|
+
g(b(c), {
|
|
833
|
+
visible: e.panelState.testEmailModalOpen.value,
|
|
834
|
+
"allowed-emails": e.testEmail.allowedEmails.value,
|
|
835
|
+
"is-sending": e.testEmail.isSending.value,
|
|
836
|
+
error: e.testEmail.error.value,
|
|
837
|
+
onSend: n[5] ||= (e) => p("send-test-email", e),
|
|
838
|
+
onClose: n[6] ||= (t) => e.panelState.testEmailModalOpen.value = !1
|
|
837
839
|
}, null, 8, [
|
|
838
840
|
"visible",
|
|
839
841
|
"allowed-emails",
|
|
840
842
|
"is-sending",
|
|
841
843
|
"error"
|
|
842
844
|
]),
|
|
843
|
-
|
|
845
|
+
e.planConfigInstance.hasFeature("saved_modules") && e.config.modules !== !1 ? (s(), v(b(l), {
|
|
844
846
|
key: 0,
|
|
845
|
-
visible:
|
|
846
|
-
"pre-selected-block-id":
|
|
847
|
-
onClose:
|
|
847
|
+
visible: e.showSaveModuleDialog,
|
|
848
|
+
"pre-selected-block-id": e.saveModulePreSelectedBlockId,
|
|
849
|
+
onClose: n[7] ||= (e) => {
|
|
848
850
|
p("update:showSaveModuleDialog", !1), p("update:saveModulePreSelectedBlockId", null);
|
|
849
851
|
},
|
|
850
|
-
onSaved:
|
|
851
|
-
}, null, 8, ["visible", "pre-selected-block-id"])) :
|
|
852
|
-
|
|
852
|
+
onSaved: n[8] ||= (t) => e.savedModulesHeadless.loadModules()
|
|
853
|
+
}, null, 8, ["visible", "pre-selected-block-id"])) : w("", !0),
|
|
854
|
+
e.planConfigInstance.hasFeature("saved_modules") && e.config.modules !== !1 ? (s(), v(b(d), {
|
|
853
855
|
key: 1,
|
|
854
|
-
visible:
|
|
855
|
-
onClose:
|
|
856
|
-
onInsert:
|
|
857
|
-
}, null, 8, ["visible"])) :
|
|
858
|
-
|
|
859
|
-
visible:
|
|
860
|
-
accept:
|
|
861
|
-
"popover-target":
|
|
862
|
-
onSelect:
|
|
863
|
-
onClose:
|
|
856
|
+
visible: e.showModuleBrowserModal,
|
|
857
|
+
onClose: n[9] ||= (e) => p("update:showModuleBrowserModal", !1),
|
|
858
|
+
onInsert: y
|
|
859
|
+
}, null, 8, ["visible"])) : w("", !0),
|
|
860
|
+
g(b(f), {
|
|
861
|
+
visible: e.panelState.mediaLibraryOpen.value,
|
|
862
|
+
accept: e.panelState.mediaLibraryAccept.value,
|
|
863
|
+
"popover-target": e.core.popoverRoot.value,
|
|
864
|
+
onSelect: e.mediaLib.handleMediaSelect,
|
|
865
|
+
onClose: e.mediaLib.handleMediaLibraryClose
|
|
864
866
|
}, null, 8, [
|
|
865
867
|
"visible",
|
|
866
868
|
"accept",
|
|
@@ -873,69 +875,69 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
873
875
|
}), _t = {
|
|
874
876
|
key: 0,
|
|
875
877
|
class: "tpl-loading tpl:absolute tpl:inset-0 tpl:z-overlay tpl:flex tpl:flex-col tpl:bg-[var(--tpl-bg)]"
|
|
876
|
-
}, vt = { class: "tpl:flex tpl:flex-1 tpl:overflow-hidden" }, yt = { 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)]" }, bt = /* @__PURE__ */
|
|
878
|
+
}, vt = { class: "tpl:flex tpl:flex-1 tpl:overflow-hidden" }, yt = { 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)]" }, bt = /* @__PURE__ */ f({
|
|
877
879
|
__name: "CloudLoadingOverlay",
|
|
878
880
|
props: { visible: { type: Boolean } },
|
|
879
881
|
setup(t) {
|
|
880
|
-
return (n,
|
|
882
|
+
return (n, r) => t.visible ? (s(), m("div", _t, [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", vt, [p("div", yt, [(s(), m(S, null, e(5, (e) => p("div", {
|
|
881
883
|
key: e,
|
|
882
884
|
class: "tpl-shimmer tpl:size-7 tpl:rounded-[var(--tpl-radius-sm)]"
|
|
883
|
-
})), 64))]),
|
|
885
|
+
})), 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);
|
|
884
886
|
}
|
|
885
887
|
}), xt = {
|
|
886
888
|
key: 0,
|
|
887
889
|
role: "alert",
|
|
888
890
|
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)]"
|
|
889
|
-
}, St = { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]" }, Ct = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center" }, wt = { class: "tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Tt = { class: "tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Et = /* @__PURE__ */
|
|
891
|
+
}, St = { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]" }, Ct = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center" }, wt = { class: "tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Tt = { class: "tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Et = /* @__PURE__ */ f({
|
|
890
892
|
__name: "CloudErrorOverlay",
|
|
891
893
|
props: {
|
|
892
894
|
error: {},
|
|
893
895
|
visible: { type: Boolean }
|
|
894
896
|
},
|
|
895
897
|
emits: ["retry"],
|
|
896
|
-
setup(
|
|
897
|
-
let
|
|
898
|
-
function
|
|
899
|
-
return "isUnauthorized" in e && e.isUnauthorized ?
|
|
898
|
+
setup(e, { emit: t }) {
|
|
899
|
+
let n = t, { t: r } = Q();
|
|
900
|
+
function i(e) {
|
|
901
|
+
return "isUnauthorized" in e && e.isUnauthorized ? r.error.authFailed : "isNotFound" in e && e.isNotFound ? r.error.templateNotFound : r.error.defaultMessage;
|
|
900
902
|
}
|
|
901
|
-
function
|
|
903
|
+
function a(e) {
|
|
902
904
|
return "isNotFound" in e && !!e.isNotFound;
|
|
903
905
|
}
|
|
904
|
-
return (
|
|
905
|
-
|
|
906
|
+
return (t, o) => e.visible && e.error ? (s(), m("div", xt, [
|
|
907
|
+
p("div", St, [g(b(W), {
|
|
906
908
|
size: 32,
|
|
907
909
|
"stroke-width": 1.5,
|
|
908
910
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
909
911
|
})]),
|
|
910
|
-
|
|
911
|
-
|
|
912
|
+
p("div", Ct, [p("h2", wt, c(b(r).error.title), 1), p("p", Tt, c(i(e.error)), 1)]),
|
|
913
|
+
a(e.error) ? w("", !0) : (s(), m("button", {
|
|
912
914
|
key: 0,
|
|
913
915
|
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)]",
|
|
914
|
-
onClick:
|
|
915
|
-
},
|
|
916
|
-
])) :
|
|
916
|
+
onClick: o[0] ||= (e) => n("retry")
|
|
917
|
+
}, c(b(r).error.retry), 1))
|
|
918
|
+
])) : w("", !0);
|
|
917
919
|
}
|
|
918
920
|
}), Dt = {
|
|
919
921
|
key: 0,
|
|
920
922
|
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)]"
|
|
921
|
-
}, Ot = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-text)]" }, kt = { class: "tpl:flex tpl:items-center tpl:gap-2" }, At = /* @__PURE__ */
|
|
923
|
+
}, Ot = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-text)]" }, kt = { class: "tpl:flex tpl:items-center tpl:gap-2" }, At = /* @__PURE__ */ f({
|
|
922
924
|
__name: "SnapshotPreviewBanner",
|
|
923
925
|
props: { visible: { type: Boolean } },
|
|
924
926
|
emits: ["cancel", "confirm"],
|
|
925
|
-
setup(
|
|
926
|
-
let
|
|
927
|
-
return (
|
|
927
|
+
setup(e, { emit: t }) {
|
|
928
|
+
let n = t, { t: r } = Q();
|
|
929
|
+
return (t, i) => e.visible ? (s(), m("div", Dt, [p("div", Ot, [g(b(he), {
|
|
928
930
|
size: 18,
|
|
929
931
|
"stroke-width": 2,
|
|
930
932
|
class: "tpl:text-[var(--tpl-primary)]"
|
|
931
|
-
}),
|
|
933
|
+
}), p("span", null, c(b(r).snapshotPreview.message), 1)]), p("div", kt, [p("button", {
|
|
932
934
|
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)]",
|
|
933
935
|
style: { "background-color": "transparent" },
|
|
934
|
-
onClick:
|
|
935
|
-
},
|
|
936
|
+
onClick: i[0] ||= (e) => n("cancel")
|
|
937
|
+
}, c(b(r).snapshotPreview.cancel), 1), p("button", {
|
|
936
938
|
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)]",
|
|
937
|
-
onClick:
|
|
938
|
-
},
|
|
939
|
+
onClick: i[1] ||= (e) => n("confirm")
|
|
940
|
+
}, c(b(r).snapshotPreview.restore), 1)])])) : w("", !0);
|
|
939
941
|
}
|
|
940
942
|
}), jt = {
|
|
941
943
|
key: 0,
|
|
@@ -947,14 +949,14 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
947
949
|
color: "var(--tpl-text)",
|
|
948
950
|
border: "1px solid var(--tpl-warning)"
|
|
949
951
|
}
|
|
950
|
-
}, Mt = /* @__PURE__ */
|
|
952
|
+
}, Mt = /* @__PURE__ */ f({
|
|
951
953
|
__name: "CollabUndoToast",
|
|
952
954
|
props: { visible: { type: Boolean } },
|
|
953
|
-
setup(
|
|
954
|
-
let { t
|
|
955
|
-
return (
|
|
955
|
+
setup(e) {
|
|
956
|
+
let { t } = V();
|
|
957
|
+
return (n, r) => e.visible ? (s(), m("div", jt, c(b(t).history.collabWarning), 1)) : w("", !0);
|
|
956
958
|
}
|
|
957
|
-
}), Nt = ["data-tpl-theme"], Pt = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, Ft = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, It = ["aria-label"], Lt = /*#__PURE__*/ Z(/* @__PURE__ */
|
|
959
|
+
}), Nt = ["data-tpl-theme"], Pt = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, Ft = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, It = ["aria-label"], Lt = /*#__PURE__*/ Z(/* @__PURE__ */ f({
|
|
958
960
|
__name: "CloudEditor",
|
|
959
961
|
props: {
|
|
960
962
|
config: {},
|
|
@@ -964,18 +966,18 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
964
966
|
shadowRoot: {}
|
|
965
967
|
},
|
|
966
968
|
emits: ["ready"],
|
|
967
|
-
setup(
|
|
968
|
-
let
|
|
969
|
-
|
|
970
|
-
let
|
|
971
|
-
config:
|
|
972
|
-
translations:
|
|
973
|
-
fontsManager:
|
|
974
|
-
emit:
|
|
975
|
-
getCommentsSidebar: () =>
|
|
976
|
-
editorRoot:
|
|
977
|
-
containerEl:
|
|
978
|
-
}), { isInitializing:
|
|
969
|
+
setup(e, { expose: a, emit: o }) {
|
|
970
|
+
let d = e;
|
|
971
|
+
_(z, d.cloudTranslations);
|
|
972
|
+
let f = o, h = u(null), x = u(null), S = Ve({
|
|
973
|
+
config: d.config,
|
|
974
|
+
translations: d.translations,
|
|
975
|
+
fontsManager: d.fontsManager,
|
|
976
|
+
emit: f,
|
|
977
|
+
getCommentsSidebar: () => h.value ? { filterByBlock: h.value.filterCommentsByBlock } : null,
|
|
978
|
+
editorRoot: d.shadowRoot,
|
|
979
|
+
containerEl: x
|
|
980
|
+
}), { isInitializing: C, isAuthReady: k, initError: A, planConfigInstance: M, websocket: N, collaboration: P, isCollaborationEnabled: F, editor: I, core: L, featureFlags: R, mediaLib: te, exporter: ne, testEmail: B, commentsInstance: re, savedModulesHeadless: ie, panelState: V, snapshotPreview: H, collabWarning: U, showSaveModuleDialog: W, showModuleBrowserModal: G, saveModulePreSelectedBlockId: K, setThemeOverrides: q, setUiTheme: le } = S, { showNotice: he } = ee(() => d.config.smallScreenNotice);
|
|
979
981
|
async function J(e) {
|
|
980
982
|
try {
|
|
981
983
|
await B.sendTestEmail(e), V.testEmailModalOpen.value = !1;
|
|
@@ -994,7 +996,7 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
994
996
|
G.value = !1;
|
|
995
997
|
}
|
|
996
998
|
let Y = Ue({
|
|
997
|
-
config:
|
|
999
|
+
config: d.config,
|
|
998
1000
|
editor: I,
|
|
999
1001
|
websocket: N,
|
|
1000
1002
|
planConfigInstance: M,
|
|
@@ -1004,17 +1006,17 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1004
1006
|
featureFlags: R,
|
|
1005
1007
|
isDestroyed: S.isDestroyed
|
|
1006
1008
|
}), X = We({
|
|
1007
|
-
issues: L.templateLint ? L.templateLint.issues :
|
|
1009
|
+
issues: L.templateLint ? L.templateLint.issues : u([]),
|
|
1008
1010
|
planConfig: M.config
|
|
1009
1011
|
});
|
|
1010
1012
|
async function Z() {
|
|
1011
|
-
await X.tryRunSave(() => Y.saveTemplate().catch((e) =>
|
|
1013
|
+
await X.tryRunSave(() => Y.saveTemplate().catch((e) => d.config.onError?.(e)));
|
|
1012
1014
|
}
|
|
1013
|
-
return S.onSaveHook.value = Z,
|
|
1015
|
+
return S.onSaveHook.value = Z, r(() => {
|
|
1014
1016
|
S.initialize();
|
|
1015
|
-
}),
|
|
1017
|
+
}), t(() => {
|
|
1016
1018
|
S.destroy();
|
|
1017
|
-
}),
|
|
1019
|
+
}), a({
|
|
1018
1020
|
getContent: () => I.content.value,
|
|
1019
1021
|
setContent: (e) => I.setContent(e),
|
|
1020
1022
|
setTheme: le,
|
|
@@ -1023,17 +1025,17 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1023
1025
|
load: Y.loadTemplate,
|
|
1024
1026
|
save: Y.saveTemplate,
|
|
1025
1027
|
sendTestEmail: B.sendTestEmail
|
|
1026
|
-
}), (
|
|
1028
|
+
}), (t, r) => (s(), m("div", {
|
|
1027
1029
|
ref_key: "rootEl",
|
|
1028
|
-
ref:
|
|
1029
|
-
class:
|
|
1030
|
-
"data-tpl-theme":
|
|
1031
|
-
style: b(
|
|
1032
|
-
onDragover:
|
|
1033
|
-
onDrop:
|
|
1030
|
+
ref: x,
|
|
1031
|
+
class: i(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": b(I).state.darkMode }]),
|
|
1032
|
+
"data-tpl-theme": b(L).resolvedTheme.value,
|
|
1033
|
+
style: n(b(L).themeStyles.value),
|
|
1034
|
+
onDragover: r[9] ||= E(() => {}, ["prevent"]),
|
|
1035
|
+
onDrop: r[10] ||= E(() => {}, ["prevent"])
|
|
1034
1036
|
}, [
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
+
g(me),
|
|
1038
|
+
g(O, {
|
|
1037
1039
|
"enter-active-class": "tpl:transition-opacity tpl:duration-200",
|
|
1038
1040
|
"enter-from-class": "tpl:opacity-100",
|
|
1039
1041
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -1041,10 +1043,10 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1041
1043
|
"leave-from-class": "tpl:opacity-100",
|
|
1042
1044
|
"leave-to-class": "tpl:opacity-0"
|
|
1043
1045
|
}, {
|
|
1044
|
-
default:
|
|
1046
|
+
default: l(() => [g(bt, { visible: b(C) || b(I).state.isLoading }, null, 8, ["visible"])]),
|
|
1045
1047
|
_: 1
|
|
1046
1048
|
}),
|
|
1047
|
-
|
|
1049
|
+
g(O, {
|
|
1048
1050
|
"enter-active-class": "tpl:transition-opacity tpl:duration-200",
|
|
1049
1051
|
"enter-from-class": "tpl:opacity-0",
|
|
1050
1052
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -1052,10 +1054,10 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1052
1054
|
"leave-from-class": "tpl:opacity-100",
|
|
1053
1055
|
"leave-to-class": "tpl:opacity-0"
|
|
1054
1056
|
}, {
|
|
1055
|
-
default:
|
|
1056
|
-
error:
|
|
1057
|
-
visible: !!
|
|
1058
|
-
onRetry:
|
|
1057
|
+
default: l(() => [g(Et, {
|
|
1058
|
+
error: b(A),
|
|
1059
|
+
visible: !!b(A) && !b(C),
|
|
1060
|
+
onRetry: b(S).initialize
|
|
1059
1061
|
}, null, 8, [
|
|
1060
1062
|
"error",
|
|
1061
1063
|
"visible",
|
|
@@ -1063,19 +1065,19 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1063
1065
|
])]),
|
|
1064
1066
|
_: 1
|
|
1065
1067
|
}),
|
|
1066
|
-
|
|
1067
|
-
editor:
|
|
1068
|
-
core:
|
|
1069
|
-
"feature-flags":
|
|
1070
|
-
"panel-state":
|
|
1071
|
-
"snapshot-preview":
|
|
1072
|
-
"comments-instance":
|
|
1073
|
-
"test-email":
|
|
1074
|
-
websocket:
|
|
1075
|
-
collaboration:
|
|
1076
|
-
"is-collaboration-enabled":
|
|
1077
|
-
"is-saving":
|
|
1078
|
-
"is-save-disabled":
|
|
1068
|
+
g(ht, {
|
|
1069
|
+
editor: b(I),
|
|
1070
|
+
core: b(L),
|
|
1071
|
+
"feature-flags": b(R),
|
|
1072
|
+
"panel-state": b(V),
|
|
1073
|
+
"snapshot-preview": b(H),
|
|
1074
|
+
"comments-instance": b(re),
|
|
1075
|
+
"test-email": b(B),
|
|
1076
|
+
websocket: b(N),
|
|
1077
|
+
collaboration: b(P),
|
|
1078
|
+
"is-collaboration-enabled": b(F),
|
|
1079
|
+
"is-saving": b(I).state.isSaving || b(R).isSaveExporting.value,
|
|
1080
|
+
"is-save-disabled": b(I).state.isSaving || b(R).isSaveExporting.value || !b(I).state.isDirty,
|
|
1079
1081
|
onSave: Z
|
|
1080
1082
|
}, null, 8, [
|
|
1081
1083
|
"editor",
|
|
@@ -1091,23 +1093,23 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1091
1093
|
"is-saving",
|
|
1092
1094
|
"is-save-disabled"
|
|
1093
1095
|
]),
|
|
1094
|
-
|
|
1095
|
-
open:
|
|
1096
|
-
issues:
|
|
1097
|
-
onCancel:
|
|
1098
|
-
onConfirm:
|
|
1096
|
+
g(et, {
|
|
1097
|
+
open: b(X).modalOpen.value,
|
|
1098
|
+
issues: b(X).blockingIssues.value,
|
|
1099
|
+
onCancel: b(X).cancel,
|
|
1100
|
+
onConfirm: b(X).confirmAndSave
|
|
1099
1101
|
}, null, 8, [
|
|
1100
1102
|
"open",
|
|
1101
1103
|
"issues",
|
|
1102
1104
|
"onCancel",
|
|
1103
1105
|
"onConfirm"
|
|
1104
1106
|
]),
|
|
1105
|
-
|
|
1106
|
-
visible:
|
|
1107
|
-
onCancel:
|
|
1107
|
+
g(At, {
|
|
1108
|
+
visible: b(H).isPreviewingSnapshot.value,
|
|
1109
|
+
onCancel: b(H).cancelPreview,
|
|
1108
1110
|
onConfirm: ge
|
|
1109
1111
|
}, null, 8, ["visible", "onCancel"]),
|
|
1110
|
-
|
|
1112
|
+
g(O, {
|
|
1111
1113
|
"enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
|
|
1112
1114
|
"enter-from-class": "tpl:translate-y-[-8px] tpl:opacity-0",
|
|
1113
1115
|
"enter-to-class": "tpl:translate-y-0 tpl:opacity-100",
|
|
@@ -1115,18 +1117,18 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1115
1117
|
"leave-from-class": "tpl:translate-y-0 tpl:opacity-100",
|
|
1116
1118
|
"leave-to-class": "tpl:translate-y-[-8px] tpl:opacity-0"
|
|
1117
1119
|
}, {
|
|
1118
|
-
default:
|
|
1120
|
+
default: l(() => [g(Mt, { visible: b(U).collabUndoWarningVisible.value }, null, 8, ["visible"])]),
|
|
1119
1121
|
_: 1
|
|
1120
1122
|
}),
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
class:
|
|
1123
|
+
T(g(se, null, null, 512), [[D, !b(I).state.previewMode]]),
|
|
1124
|
+
p("div", {
|
|
1125
|
+
class: i(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [b(I).state.previewMode ? "tpl:left-0 tpl:right-0" : b(V).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]", b(H).isPreviewingSnapshot.value ? "tpl:top-[104px]" : "tpl:top-14"]]),
|
|
1124
1126
|
style: {
|
|
1125
1127
|
transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
1126
1128
|
"background-color": "var(--tpl-canvas-bg)"
|
|
1127
1129
|
}
|
|
1128
|
-
}, [
|
|
1129
|
-
default:
|
|
1130
|
+
}, [p("div", Pt, [g(O, { name: "tpl-restore-btn" }, {
|
|
1131
|
+
default: l(() => [b(L).conditionPreview.hasHiddenBlocks.value ? (s(), m("button", {
|
|
1130
1132
|
key: 0,
|
|
1131
1133
|
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",
|
|
1132
1134
|
style: {
|
|
@@ -1135,22 +1137,22 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1135
1137
|
"border-color": "var(--tpl-warning)",
|
|
1136
1138
|
"backdrop-filter": "blur(8px)"
|
|
1137
1139
|
},
|
|
1138
|
-
onClick:
|
|
1139
|
-
}, [
|
|
1140
|
+
onClick: r[0] ||= (e) => b(L).conditionPreview.reset()
|
|
1141
|
+
}, [g(b(ue), {
|
|
1140
1142
|
size: 13,
|
|
1141
1143
|
"stroke-width": 2
|
|
1142
|
-
}),
|
|
1144
|
+
}), y(" " + c(b(L).t.blockSettings.restoreHiddenBlocks), 1)])) : w("", !0)]),
|
|
1143
1145
|
_: 1
|
|
1144
|
-
})]),
|
|
1145
|
-
viewport:
|
|
1146
|
-
content:
|
|
1147
|
-
"selected-block-id":
|
|
1148
|
-
"dark-mode":
|
|
1149
|
-
"preview-mode":
|
|
1150
|
-
"locked-blocks":
|
|
1151
|
-
onSelectBlock:
|
|
1152
|
-
onOpenAiChat:
|
|
1153
|
-
onOpenDesignReference:
|
|
1146
|
+
})]), p("main", Ft, [g(oe, {
|
|
1147
|
+
viewport: b(I).state.viewport,
|
|
1148
|
+
content: b(I).content.value,
|
|
1149
|
+
"selected-block-id": b(I).state.selectedBlockId,
|
|
1150
|
+
"dark-mode": b(I).state.darkMode,
|
|
1151
|
+
"preview-mode": b(I).state.previewMode,
|
|
1152
|
+
"locked-blocks": b(P)?.lockedBlocks.value ?? void 0,
|
|
1153
|
+
onSelectBlock: b(I).selectBlock,
|
|
1154
|
+
onOpenAiChat: r[1] ||= (e) => b(V).aiChatOpen.value = !0,
|
|
1155
|
+
onOpenDesignReference: r[2] ||= (e) => b(V).designReferenceOpen.value = !0
|
|
1154
1156
|
}, null, 8, [
|
|
1155
1157
|
"viewport",
|
|
1156
1158
|
"content",
|
|
@@ -1160,49 +1162,49 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1160
1162
|
"locked-blocks",
|
|
1161
1163
|
"onSelectBlock"
|
|
1162
1164
|
])])], 2),
|
|
1163
|
-
|
|
1165
|
+
e.config.branding !== !1 && !b(R).isWhiteLabeled.value ? (s(), v(de, {
|
|
1164
1166
|
key: 0,
|
|
1165
|
-
"position-class": [
|
|
1166
|
-
}, null, 8, ["position-class"])) :
|
|
1167
|
-
|
|
1167
|
+
"position-class": [b(I).state.previewMode ? "tpl:left-0 tpl:right-0" : b(V).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]"]
|
|
1168
|
+
}, null, 8, ["position-class"])) : w("", !0),
|
|
1169
|
+
p("div", {
|
|
1168
1170
|
class: "tpl-sr-only",
|
|
1169
1171
|
role: "status",
|
|
1170
1172
|
"aria-live": "polite",
|
|
1171
1173
|
"aria-atomic": "true",
|
|
1172
|
-
"aria-label":
|
|
1173
|
-
},
|
|
1174
|
-
|
|
1175
|
-
"selected-block":
|
|
1176
|
-
settings:
|
|
1177
|
-
"shifted-left":
|
|
1178
|
-
onUpdateBlock:
|
|
1179
|
-
onDeleteBlock:
|
|
1180
|
-
onDuplicateBlock:
|
|
1181
|
-
onUpdateSettings:
|
|
1174
|
+
"aria-label": b(L).t.landmarks.reorderAnnouncements
|
|
1175
|
+
}, c(b(L).keyboardReorder.announcement.value), 9, It),
|
|
1176
|
+
T(g(ae, {
|
|
1177
|
+
"selected-block": b(I).selectedBlock.value,
|
|
1178
|
+
settings: b(I).content.value.settings,
|
|
1179
|
+
"shifted-left": b(V).rightPanelOpen.value,
|
|
1180
|
+
onUpdateBlock: r[3] ||= (e) => b(I).updateBlock(b(I).selectedBlock.value.id, e),
|
|
1181
|
+
onDeleteBlock: r[4] ||= (e) => b(L).blockActions.deleteBlock(b(I).selectedBlock.value.id),
|
|
1182
|
+
onDuplicateBlock: r[5] ||= (e) => b(L).blockActions.duplicateBlock(b(I).selectedBlock.value),
|
|
1183
|
+
onUpdateSettings: b(I).updateSettings
|
|
1182
1184
|
}, null, 8, [
|
|
1183
1185
|
"selected-block",
|
|
1184
1186
|
"settings",
|
|
1185
1187
|
"shifted-left",
|
|
1186
1188
|
"onUpdateSettings"
|
|
1187
|
-
]), [[
|
|
1188
|
-
!C
|
|
1189
|
+
]), [[D, !b(I).state.previewMode]]),
|
|
1190
|
+
!b(C) && b(k) ? (s(), v(gt, {
|
|
1189
1191
|
key: 1,
|
|
1190
1192
|
ref_key: "cloudPanelsRef",
|
|
1191
|
-
ref:
|
|
1192
|
-
config:
|
|
1193
|
-
editor:
|
|
1194
|
-
core:
|
|
1195
|
-
"panel-state":
|
|
1196
|
-
"plan-config-instance":
|
|
1197
|
-
"test-email":
|
|
1198
|
-
"media-lib":
|
|
1199
|
-
"saved-modules-headless":
|
|
1200
|
-
"show-save-module-dialog":
|
|
1201
|
-
"save-module-pre-selected-block-id":
|
|
1202
|
-
"show-module-browser-modal":
|
|
1203
|
-
"onUpdate:showSaveModuleDialog":
|
|
1204
|
-
"onUpdate:saveModulePreSelectedBlockId":
|
|
1205
|
-
"onUpdate:showModuleBrowserModal":
|
|
1193
|
+
ref: h,
|
|
1194
|
+
config: d.config,
|
|
1195
|
+
editor: b(I),
|
|
1196
|
+
core: b(L),
|
|
1197
|
+
"panel-state": b(V),
|
|
1198
|
+
"plan-config-instance": b(M),
|
|
1199
|
+
"test-email": b(B),
|
|
1200
|
+
"media-lib": b(te),
|
|
1201
|
+
"saved-modules-headless": b(ie),
|
|
1202
|
+
"show-save-module-dialog": b(W),
|
|
1203
|
+
"save-module-pre-selected-block-id": b(K),
|
|
1204
|
+
"show-module-browser-modal": b(G),
|
|
1205
|
+
"onUpdate:showSaveModuleDialog": r[6] ||= (e) => W.value = e,
|
|
1206
|
+
"onUpdate:saveModulePreSelectedBlockId": r[7] ||= (e) => K.value = e,
|
|
1207
|
+
"onUpdate:showModuleBrowserModal": r[8] ||= (e) => G.value = e,
|
|
1206
1208
|
onSendTestEmail: J,
|
|
1207
1209
|
onModuleInsert: _e
|
|
1208
1210
|
}, null, 8, [
|
|
@@ -1217,14 +1219,14 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1217
1219
|
"show-save-module-dialog",
|
|
1218
1220
|
"save-module-pre-selected-block-id",
|
|
1219
1221
|
"show-module-browser-modal"
|
|
1220
|
-
])) :
|
|
1221
|
-
|
|
1222
|
-
ref: (e) =>
|
|
1222
|
+
])) : w("", !0),
|
|
1223
|
+
p("div", {
|
|
1224
|
+
ref: (e) => b(L).popoverRoot.value = e,
|
|
1223
1225
|
class: "tpl-popover-root"
|
|
1224
1226
|
}, null, 512),
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1227
|
+
g(ce),
|
|
1228
|
+
g(pe),
|
|
1229
|
+
b(he) ? (s(), v(fe, { key: 2 })) : w("", !0)
|
|
1228
1230
|
], 46, Nt));
|
|
1229
1231
|
}
|
|
1230
1232
|
}), [["__scopeId", "data-v-3fc6c906"]]);
|