@templatical/editor 0.6.7 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -1
- package/dist/{AccessibilityPanel-B2MT0M58.js → AccessibilityPanel-D-PqmHdH.js} +2 -2
- package/dist/{AiChatSidebar-w5ek3Z76.js → AiChatSidebar-BwLECwsO.js} +1 -1
- package/dist/{AiFeatureMenu-ChlAWywJ.js → AiFeatureMenu-CVHKharv.js} +3 -3
- package/dist/{BlockA11yBadge-C0S6kPC4.js → BlockA11yBadge-BFIw0h1m.js} +2 -2
- package/dist/{CloudEditor-DYYaScFe.js → CloudEditor-DdZatjUe.js} +30 -21
- package/dist/{CollaboratorBar-Bo8vtPId.js → CollaboratorBar-VZKOv_Zn.js} +2 -2
- package/dist/{CommentsSidebar-BQROg36f.js → CommentsSidebar-BiRtaXYD.js} +3 -3
- package/dist/{CountdownBlock-Bxqe7zwL.js → CountdownBlock-Cq8A8WrM.js} +1 -1
- package/dist/{CountdownToolbar-CpFAnjSo.js → CountdownToolbar-CojjlZet.js} +2 -2
- package/dist/{DesignReferenceSidebar-CfqpcWX6.js → DesignReferenceSidebar-Ci9HIGbf.js} +2 -2
- package/dist/ModuleBrowserModal-D7IYx1Nh.js +206 -0
- package/dist/{ModulePreviewCanvas-Cw9GeGus.js → ModulePreviewCanvas-I-uMcK5G.js} +2 -2
- package/dist/{NumberWithSuffix-Dw8dN1Pt.js → NumberWithSuffix-CLTBb2Rj.js} +1 -1
- package/dist/{ParagraphEditor-DjDiUzmv.js → ParagraphEditor-BRQTNDFO.js} +156 -151
- package/dist/{RichTextEditorContent-CK3Om7ES.js → RichTextEditorContent-C3QSg7gd.js} +32 -28
- package/dist/{SaveModuleDialog-CSUPmfRP.js → SaveModuleDialog-DGGGNZfm.js} +6 -6
- package/dist/{SnapshotHistory-DwX2fj6N.js → SnapshotHistory-C97Iw6xw.js} +3 -3
- package/dist/{TemplateScoringPanel-BIAeCAEP.js → TemplateScoringPanel-V79yrEPC.js} +3 -3
- package/dist/{TestEmailModal-CIlBvWWn.js → TestEmailModal-B7S8H-VG.js} +3 -3
- package/dist/{TitleEditor-BCV5k6wj.js → TitleEditor-DhFTYzrw.js} +65 -60
- package/dist/{TplModal-C3Hq9b58.js → TplModal-BgABm6ju.js} +21 -17
- package/dist/{blockTypeIcons-iUurP50H.js → blockTypeIcons-BSf-3RJ-.js} +1 -1
- package/dist/bundle-stats.json +7 -7
- package/dist/cdn/chunks/{AccessibilityPanel-DnNB30b0.js → AccessibilityPanel-kgNBRaZV.js} +28 -28
- package/dist/cdn/chunks/{AccessibilityPanel-DnNB30b0.js.map → AccessibilityPanel-kgNBRaZV.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-BKBh_ueF.js → AiFeatureMenu-CRkzwdMg.js} +15 -15
- package/dist/cdn/chunks/{AiFeatureMenu-BKBh_ueF.js.map → AiFeatureMenu-CRkzwdMg.js.map} +1 -1
- package/dist/cdn/chunks/{BlockA11yBadge-CnBu14Fj.js → BlockA11yBadge-BfuH2Hrg.js} +9 -9
- package/dist/cdn/chunks/{BlockA11yBadge-CnBu14Fj.js.map → BlockA11yBadge-BfuH2Hrg.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-CmR17piA.js → CloudEditor-h5JXI8WQ.js} +252 -243
- package/dist/cdn/chunks/CloudEditor-h5JXI8WQ.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-BejZaFtY.js → CollaboratorBar-CMl3lAZU.js} +15 -15
- package/dist/cdn/chunks/{CollaboratorBar-BejZaFtY.js.map → CollaboratorBar-CMl3lAZU.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-CjvUEHhE.js → CountdownBlock-D1RoaOgF.js} +18 -18
- package/dist/cdn/chunks/{CountdownBlock-CjvUEHhE.js.map → CountdownBlock-D1RoaOgF.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-Caokkqsg.js → CountdownToolbar-DltwuOer.js} +42 -42
- package/dist/cdn/chunks/{CountdownToolbar-Caokkqsg.js.map → CountdownToolbar-DltwuOer.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-Tb9a7L-K.js → ModuleBrowserModal-3uu2mXR9.js} +36 -36
- package/dist/cdn/chunks/{ModuleBrowserModal-Tb9a7L-K.js.map → ModuleBrowserModal-3uu2mXR9.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-JWIEv5oS.js → ModulePreviewCanvas-K9CQFr7p.js} +37 -37
- package/dist/cdn/chunks/{ModulePreviewCanvas-JWIEv5oS.js.map → ModulePreviewCanvas-K9CQFr7p.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-DrV8eumz.js → NumberWithSuffix-BIFgtqGs.js} +74 -74
- package/dist/cdn/chunks/{NumberWithSuffix-DrV8eumz.js.map → NumberWithSuffix-BIFgtqGs.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-CSfShBAO.js → ParagraphEditor-DlpZX_x4.js} +180 -176
- package/dist/cdn/chunks/ParagraphEditor-DlpZX_x4.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DgqZzl8n.js → RichTextEditorContent-CPGT8h-O.js} +40 -37
- package/dist/cdn/chunks/RichTextEditorContent-CPGT8h-O.js.map +1 -0
- package/dist/cdn/chunks/{SaveModuleDialog-CxTwrIgx.js → SaveModuleDialog-_uaJscj1.js} +24 -24
- package/dist/cdn/chunks/{SaveModuleDialog-CxTwrIgx.js.map → SaveModuleDialog-_uaJscj1.js.map} +1 -1
- package/dist/cdn/chunks/TitleEditor-Kerz6US8.js +175 -0
- package/dist/cdn/chunks/TitleEditor-Kerz6US8.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-DMt-2qR6.js → blockTypeIcons-BeOhGtoo.js} +7 -7
- package/dist/cdn/chunks/{blockTypeIcons-DMt-2qR6.js.map → blockTypeIcons-BeOhGtoo.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-CNhyCGIO.js → draggable-P6QWzy4g.js} +1182 -1171
- package/dist/cdn/chunks/{draggable-CNhyCGIO.js.map → draggable-P6QWzy4g.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-CUvwrffu.js → extensions-BZYkPlKr.js} +107 -108
- package/dist/cdn/chunks/extensions-BZYkPlKr.js.map +1 -0
- package/dist/cdn/chunks/{features-U3nzKc-R.js → features-DzIN-Nua.js} +925 -896
- package/dist/cdn/chunks/features-DzIN-Nua.js.map +1 -0
- package/dist/cdn/chunks/{icons-QcjADKIW.js → icons-Nvr6w13E.js} +2 -2
- package/dist/cdn/chunks/{icons-QcjADKIW.js.map → icons-Nvr6w13E.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-Zcd_GInj.js → media-library-BzT7BoGU.js} +1189 -1183
- package/dist/cdn/chunks/media-library-BzT7BoGU.js.map +1 -0
- package/dist/cdn/chunks/{quality-8eo6DM3p.js → quality-C328caFm.js} +45 -45
- package/dist/cdn/chunks/{quality-8eo6DM3p.js.map → quality-C328caFm.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-eHJyPiJH.js → renderer-DYpHh_uV.js} +20 -20
- package/dist/cdn/chunks/{renderer-eHJyPiJH.js.map → renderer-DYpHh_uV.js.map} +1 -1
- package/dist/cdn/chunks/{src-CthVYW_o.js → src-DKNTQJVO.js} +144 -144
- package/dist/cdn/chunks/{src-CthVYW_o.js.map → src-DKNTQJVO.js.map} +1 -1
- package/dist/cdn/chunks/{styles-CV5w3kjq.js → styles-DaTht5d7.js} +924 -899
- package/dist/cdn/chunks/styles-DaTht5d7.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-IyIsncxY.js → tiptap-BwTCLVWl.js} +7 -7
- package/dist/cdn/chunks/{tiptap-IyIsncxY.js.map → tiptap-BwTCLVWl.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +197 -146
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{extensions-BF39Siqk.js → extensions-D-J02CiP.js} +50 -51
- package/dist/index.d.ts +56 -11
- package/dist/{keys-Bqs_0du9.js → keys-B5SJtPWf.js} +3 -3
- package/dist/style.css +1 -1
- package/dist/{styles-BgmKdc2x.js → styles-D_fEz49o.js} +497 -472
- package/dist/templatical-editor.js +182 -131
- package/dist/{useCloudI18n-CL_AwWwi.js → useCloudI18n-ByEMykjO.js} +1 -1
- package/dist/{useEditorCore-CnXrv71D.js → useEditorCore-uCU9Ny0M.js} +637 -619
- package/dist/{useI18n-CgmQftNf.js → useI18n-PEB8ioi_.js} +1 -1
- package/dist/{useMergeTag-vpwrZ9eQ.js → useMergeTag-C47xwU7X.js} +2 -2
- package/dist/usePopoverRoot-BxJrqnMD.js +8 -0
- package/package.json +7 -7
- package/dist/ModuleBrowserModal-CKhsaPnA.js +0 -206
- package/dist/cdn/chunks/CloudEditor-CmR17piA.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-CSfShBAO.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-DgqZzl8n.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-DlqV7ODD.js +0 -171
- package/dist/cdn/chunks/TitleEditor-DlqV7ODD.js.map +0 -1
- package/dist/cdn/chunks/extensions-CUvwrffu.js.map +0 -1
- package/dist/cdn/chunks/features-U3nzKc-R.js.map +0 -1
- package/dist/cdn/chunks/media-library-Zcd_GInj.js.map +0 -1
- package/dist/cdn/chunks/styles-CV5w3kjq.js.map +0 -1
- /package/dist/{de-DcVOh9Fp.js → de-BhIWu_bO.js} +0 -0
- /package/dist/{de-DCaaCE5s.js → de-Di4MEjjx.js} +0 -0
- /package/dist/{emojiData-PQyVa4bU.js → emojiData-DX3E0XT-.js} +0 -0
- /package/dist/{en-DXCyK4-X.js → en-BSuzi-Pd.js} +0 -0
- /package/dist/{en-TZVJ_f6v.js → en-D7HRbYah.js} +0 -0
- /package/dist/{pt-BR-Vq7D7c11.js → pt-BR-CCVBRais.js} +0 -0
- /package/dist/{pt-BR-BMGasLBa.js → pt-BR-K32lt6YP.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as e, r as t } from "./rolldown-runtime-C266TIVP.js";
|
|
2
|
-
import { $ as n, A as r, B as i, C as a, F as o, G as s, H as c, J as l, K as u, L as d, M as f, N as p, O as m, P as h, Q as g, S as _, T as v, U as y, V as b, X as x, Y as S, Z as C, a as w, at as T, b as E, c as D, d as
|
|
2
|
+
import { $ as n, A as r, B as i, C as a, F as o, G as s, H as c, J as l, K as u, L as d, M as f, N as p, O as m, P as h, Q as g, S as _, T as v, U as y, V as b, X as x, Y as S, Z as C, a as w, at as T, b as E, c as ee, ct as D, d as te, et as ne, f as O, g as k, h as A, it as j, k as re, l as M, m as N, n as ie, nt as P, o as ae, ot as F, p as I, rt as oe, s as se, st as L, t as ce, u as R, v as z, w as le, x as B, y as V, z as H } from "./draggable-P6QWzy4g.js";
|
|
3
3
|
//#region src/constants/timeouts.ts
|
|
4
4
|
var ue = 3e4, de = 4e3, fe = 5e3, pe = {
|
|
5
5
|
1: 36,
|
|
@@ -658,7 +658,7 @@ function Ot(e) {
|
|
|
658
658
|
o = null, c() && !s && n() && r(JSON.parse(JSON.stringify(t.value)));
|
|
659
659
|
}, i));
|
|
660
660
|
}
|
|
661
|
-
let m =
|
|
661
|
+
let m = T(t, () => {
|
|
662
662
|
c() && !s && n() && p();
|
|
663
663
|
}, { deep: !0 });
|
|
664
664
|
function h() {
|
|
@@ -791,7 +791,7 @@ function Kt(e, t = {}) {
|
|
|
791
791
|
clearTimeout(e), i(), i = Bt;
|
|
792
792
|
}, o;
|
|
793
793
|
return (s) => {
|
|
794
|
-
let c =
|
|
794
|
+
let c = P(e), l = P(t.maxWait);
|
|
795
795
|
return n && a(n), c <= 0 || l !== void 0 && l <= 0 ? (r &&= (a(r), void 0), Promise.resolve(s())) : new Promise((e, u) => {
|
|
796
796
|
i = t.rejectOnCancel ? u : e, o = s, l && !r && (r = setTimeout(() => {
|
|
797
797
|
n && a(n), r = void 0, e(o());
|
|
@@ -839,7 +839,7 @@ function en(e, t = 1e3, r = {}) {
|
|
|
839
839
|
s.value = !1, c();
|
|
840
840
|
}
|
|
841
841
|
function d() {
|
|
842
|
-
let n =
|
|
842
|
+
let n = P(t);
|
|
843
843
|
n <= 0 || (s.value = !0, a && e(), c(), s.value && (o = setInterval(e, n)));
|
|
844
844
|
}
|
|
845
845
|
return i && It && d(), (u(t) || typeof t == "function") && Mt(H(t, () => {
|
|
@@ -861,7 +861,7 @@ function tn(e, t, r = {}) {
|
|
|
861
861
|
function u(...n) {
|
|
862
862
|
a && e(), c(), o.value = !0, s = setTimeout(() => {
|
|
863
863
|
o.value = !1, s = void 0, e(...n);
|
|
864
|
-
},
|
|
864
|
+
}, P(t));
|
|
865
865
|
}
|
|
866
866
|
return i && (o.value = !0, It && u()), Mt(l), {
|
|
867
867
|
isPending: g(o),
|
|
@@ -874,8 +874,8 @@ function nn(e = !1, t = {}) {
|
|
|
874
874
|
function s(e) {
|
|
875
875
|
if (arguments.length) return o.value = e, o.value;
|
|
876
876
|
{
|
|
877
|
-
let e =
|
|
878
|
-
return o.value = o.value === e ?
|
|
877
|
+
let e = P(r);
|
|
878
|
+
return o.value = o.value === e ? P(i) : e, o.value;
|
|
879
879
|
}
|
|
880
880
|
}
|
|
881
881
|
return a ? s : [o, s];
|
|
@@ -897,19 +897,19 @@ function an(e, t, n) {
|
|
|
897
897
|
//#region ../../node_modules/.pnpm/@vueuse+core@14.2.1_vue@3.5.33_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
|
|
898
898
|
var on = It ? window : void 0, sn = It ? window.document : void 0, cn = It ? window.navigator : void 0;
|
|
899
899
|
function K(e) {
|
|
900
|
-
let t =
|
|
900
|
+
let t = P(e);
|
|
901
901
|
return t?.$el ?? t;
|
|
902
902
|
}
|
|
903
903
|
function q(...e) {
|
|
904
904
|
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n = O(() => {
|
|
905
|
-
let t = Yt(
|
|
905
|
+
let t = Yt(P(e[0])).filter((e) => e != null);
|
|
906
906
|
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
907
907
|
});
|
|
908
908
|
return an(() => [
|
|
909
909
|
n.value?.map((e) => K(e)) ?? [on].filter((e) => e != null),
|
|
910
|
-
Yt(
|
|
911
|
-
Yt(
|
|
912
|
-
|
|
910
|
+
Yt(P(n.value ? e[1] : e[0])),
|
|
911
|
+
Yt(j(n.value ? e[2] : e[1])),
|
|
912
|
+
P(n.value ? e[3] : e[2])
|
|
913
913
|
], ([e, n, r, i], a, o) => {
|
|
914
914
|
if (!e?.length || !n?.length || !r?.length) return;
|
|
915
915
|
let s = zt(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
|
|
@@ -931,7 +931,7 @@ function un(e, t, n = {}) {
|
|
|
931
931
|
let e = { passive: !0 };
|
|
932
932
|
Array.from(r.document.body.children).forEach((t) => t.addEventListener("click", Bt, e)), r.document.documentElement.addEventListener("click", Bt, e);
|
|
933
933
|
}
|
|
934
|
-
let c = !0, l = (e) =>
|
|
934
|
+
let c = !0, l = (e) => P(i).some((t) => {
|
|
935
935
|
if (typeof t == "string") return Array.from(r.document.querySelectorAll(t)).some((t) => t === e.target || e.composedPath().includes(t));
|
|
936
936
|
{
|
|
937
937
|
let n = K(t);
|
|
@@ -939,11 +939,11 @@ function un(e, t, n = {}) {
|
|
|
939
939
|
}
|
|
940
940
|
});
|
|
941
941
|
function u(e) {
|
|
942
|
-
let t =
|
|
942
|
+
let t = P(e);
|
|
943
943
|
return t && t.$.subTree.shapeFlag === 16;
|
|
944
944
|
}
|
|
945
945
|
function d(e, t) {
|
|
946
|
-
let n =
|
|
946
|
+
let n = P(e), r = n.$.subTree && n.$.subTree.children;
|
|
947
947
|
return r == null || !Array.isArray(r) ? !1 : r.some((e) => e.el === t.target || t.composedPath().includes(e.el));
|
|
948
948
|
}
|
|
949
949
|
let f = (n) => {
|
|
@@ -999,7 +999,7 @@ function pn(e, t, n = {}) {
|
|
|
999
999
|
let { window: r = on, ...i } = n, a, o = /* @__PURE__ */ fn(() => r && "MutationObserver" in r), s = () => {
|
|
1000
1000
|
a &&= (a.disconnect(), void 0);
|
|
1001
1001
|
}, c = H(O(() => {
|
|
1002
|
-
let t = Yt(
|
|
1002
|
+
let t = Yt(P(e)).map(K).filter(Lt);
|
|
1003
1003
|
return new Set(t);
|
|
1004
1004
|
}), (e) => {
|
|
1005
1005
|
s(), o.value && e.size && (a = new MutationObserver(t), e.forEach((e) => a.observe(e, i)));
|
|
@@ -1025,13 +1025,13 @@ function gn(e, t = {}) {
|
|
|
1025
1025
|
let { window: r = on, ssrWidth: a = /* @__PURE__ */ hn() } = t, o = /* @__PURE__ */ fn(() => r && "matchMedia" in r && typeof r.matchMedia == "function"), s = n(typeof a == "number"), c = n(), l = n(!1);
|
|
1026
1026
|
return i(() => {
|
|
1027
1027
|
if (s.value) {
|
|
1028
|
-
s.value = !o.value, l.value =
|
|
1028
|
+
s.value = !o.value, l.value = P(e).split(",").some((e) => {
|
|
1029
1029
|
let t = e.includes("not all"), n = e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), r = e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), i = !!(n || r);
|
|
1030
1030
|
return n && i && (i = a >= Jt(n[1])), r && i && (i = a <= Jt(r[1])), t ? !i : i;
|
|
1031
1031
|
});
|
|
1032
1032
|
return;
|
|
1033
1033
|
}
|
|
1034
|
-
o.value && (c.value = r.matchMedia(
|
|
1034
|
+
o.value && (c.value = r.matchMedia(P(e)), l.value = c.value.matches);
|
|
1035
1035
|
}), q(c, "change", (e) => {
|
|
1036
1036
|
l.value = e.matches;
|
|
1037
1037
|
}, { passive: !0 }), O(() => l.value);
|
|
@@ -1050,7 +1050,7 @@ function _n(e, t = {}) {
|
|
|
1050
1050
|
} finally {
|
|
1051
1051
|
l();
|
|
1052
1052
|
}
|
|
1053
|
-
if (r) return
|
|
1053
|
+
if (r) return ne(o.value);
|
|
1054
1054
|
}
|
|
1055
1055
|
});
|
|
1056
1056
|
return u(), r ? {
|
|
@@ -1071,7 +1071,7 @@ function vn(e = {}) {
|
|
|
1071
1071
|
e && (d.value = _());
|
|
1072
1072
|
}
|
|
1073
1073
|
u.value && r && q(["copy", "cut"], m, { passive: !0 });
|
|
1074
|
-
async function h(e =
|
|
1074
|
+
async function h(e = P(i)) {
|
|
1075
1075
|
if (u.value && e != null) {
|
|
1076
1076
|
let n = !(s.value && v(l.value));
|
|
1077
1077
|
if (!n) try {
|
|
@@ -1107,7 +1107,7 @@ function yn(e, t = {}) {
|
|
|
1107
1107
|
let t = Array.from(e.dataTransfer?.files ?? []);
|
|
1108
1108
|
return t.length === 0 ? null : s ? t : [t[0]];
|
|
1109
1109
|
}, u = (e) => {
|
|
1110
|
-
let t =
|
|
1110
|
+
let t = j(n.dataTypes);
|
|
1111
1111
|
return typeof t == "function" ? t(e) : t?.length ? e.length === 0 ? !1 : e.every((e) => t.some((t) => e.includes(t))) : !0;
|
|
1112
1112
|
}, d = (e) => n.checkValidity ? n.checkValidity(e) : u(Array.from(e ?? []).map((e) => e.type)) && (s || e.length <= 1), f = () => /^(?:(?!chrome|android).)*safari/i.test(navigator.userAgent) && !("chrome" in window), p = (e, t) => {
|
|
1113
1113
|
let s = e.dataTransfer?.items;
|
|
@@ -1149,7 +1149,7 @@ function bn(e, t, n = {}) {
|
|
|
1149
1149
|
let { window: r = on, ...i } = n, a, o = /* @__PURE__ */ fn(() => r && "ResizeObserver" in r), s = () => {
|
|
1150
1150
|
a &&= (a.disconnect(), void 0);
|
|
1151
1151
|
}, c = H(O(() => {
|
|
1152
|
-
let t =
|
|
1152
|
+
let t = P(e);
|
|
1153
1153
|
return Array.isArray(t) ? t.map((e) => K(e)) : [K(t)];
|
|
1154
1154
|
}), (e) => {
|
|
1155
1155
|
if (s(), o.value && r) {
|
|
@@ -1199,10 +1199,10 @@ function xn(e, t = {}) {
|
|
|
1199
1199
|
};
|
|
1200
1200
|
}
|
|
1201
1201
|
function Sn(e, t, r = {}) {
|
|
1202
|
-
let { root: i, rootMargin: a, threshold: o = 0, window: s = on, immediate: c = !0 } = r, l = /* @__PURE__ */ fn(() => s && "IntersectionObserver" in s), u = O(() => Yt(
|
|
1202
|
+
let { root: i, rootMargin: a, threshold: o = 0, window: s = on, immediate: c = !0 } = r, l = /* @__PURE__ */ fn(() => s && "IntersectionObserver" in s), u = O(() => Yt(P(e)).map(K).filter(Lt)), d = Bt, f = n(c), p = l.value ? H(() => [
|
|
1203
1203
|
u.value,
|
|
1204
1204
|
K(i),
|
|
1205
|
-
|
|
1205
|
+
P(a),
|
|
1206
1206
|
f.value
|
|
1207
1207
|
], ([e, n, r]) => {
|
|
1208
1208
|
if (d(), !f.value || !e.length) return;
|
|
@@ -1257,7 +1257,7 @@ function Tn(e = {}) {
|
|
|
1257
1257
|
n.value = null, c.value && c.value.value && (c.value.value = "", a(null));
|
|
1258
1258
|
}, u = (e) => {
|
|
1259
1259
|
let t = c.value;
|
|
1260
|
-
t && (t.multiple =
|
|
1260
|
+
t && (t.multiple = P(e.multiple), t.accept = P(e.accept), t.webkitdirectory = P(e.directory), Vt(e, "capture") && (t.capture = P(e.capture)));
|
|
1261
1261
|
};
|
|
1262
1262
|
return i(() => {
|
|
1263
1263
|
u(e);
|
|
@@ -1271,7 +1271,7 @@ function Tn(e = {}) {
|
|
|
1271
1271
|
...e,
|
|
1272
1272
|
...t
|
|
1273
1273
|
};
|
|
1274
|
-
u(r),
|
|
1274
|
+
u(r), P(r.reset) && l(), n.click();
|
|
1275
1275
|
},
|
|
1276
1276
|
reset: l,
|
|
1277
1277
|
onCancel: o,
|
|
@@ -1280,7 +1280,7 @@ function Tn(e = {}) {
|
|
|
1280
1280
|
}
|
|
1281
1281
|
//#endregion
|
|
1282
1282
|
//#region src/keys.ts
|
|
1283
|
-
var En = Symbol("translations"), Dn = Symbol("editor"), On = Symbol("history"), kn = Symbol("blockActions"), An = Symbol("conditionPreview"), jn = Symbol("fontsManager"), Mn = Symbol("themeStyles"), Nn = Symbol("tplUiTheme"), Pn = Symbol("blockDefaults"), Fn = Symbol("blockRegistry"), In = Symbol("customBlockDefinitions"), Ln = Symbol("mergeTags"), Rn = Symbol("mergeTagSyntax"), zn = Symbol("onRequestMergeTag"), Bn = Symbol("mergeTagAutocomplete"), Vn = Symbol("onRequestMedia"), Hn = Symbol("displayConditions"), Un = Symbol("allowCustomConditions"), Wn = Symbol("capabilities"), Gn = Symbol("keyboardReorder"), Kn = Symbol("accessibilityLint"), qn = Symbol("
|
|
1283
|
+
var En = Symbol("translations"), Dn = Symbol("editor"), On = Symbol("history"), kn = Symbol("blockActions"), An = Symbol("conditionPreview"), jn = Symbol("fontsManager"), Mn = Symbol("themeStyles"), Nn = Symbol("tplUiTheme"), Pn = Symbol("blockDefaults"), Fn = Symbol("blockRegistry"), In = Symbol("customBlockDefinitions"), Ln = Symbol("mergeTags"), Rn = Symbol("mergeTagSyntax"), zn = Symbol("onRequestMergeTag"), Bn = Symbol("mergeTagAutocomplete"), Vn = Symbol("onRequestMedia"), Hn = Symbol("displayConditions"), Un = Symbol("allowCustomConditions"), Wn = Symbol("capabilities"), Gn = Symbol("keyboardReorder"), Kn = Symbol("accessibilityLint"), qn = Symbol("editorRoot"), Jn = Symbol("popoverRoot"), Yn = Symbol("authManager"), Xn = Symbol("aiConfig"), Zn = Symbol("comments"), Qn = Symbol("savedModulesHeadless"), $n = Symbol("scoring"), er = Symbol("cloudTranslations");
|
|
1284
1284
|
function J(e, t) {
|
|
1285
1285
|
let n = v(e, null);
|
|
1286
1286
|
if (n == null) throw Error(`${t} requires a provider for ${e.description ?? "unknown key"}. Ensure it is a descendant of Editor or CloudEditor.`);
|
|
@@ -1288,12 +1288,12 @@ function J(e, t) {
|
|
|
1288
1288
|
}
|
|
1289
1289
|
//#endregion
|
|
1290
1290
|
//#region src/composables/useAccessibilityLint.ts
|
|
1291
|
-
function
|
|
1291
|
+
function tr(e) {
|
|
1292
1292
|
let t = C([]), r = C(!1), i = C(!1), a = n(null), o = e.options.disabled === !0, s = null, c = !1;
|
|
1293
1293
|
o || l();
|
|
1294
1294
|
async function l() {
|
|
1295
1295
|
try {
|
|
1296
|
-
let t = await import("./quality-
|
|
1296
|
+
let t = await import("./quality-C328caFm.js").then((e) => e.t);
|
|
1297
1297
|
if (c) return;
|
|
1298
1298
|
a.value = t.lintAccessibility, r.value = !0, u(), s = rn(e.content, u, {
|
|
1299
1299
|
debounce: e.debounce ?? 500,
|
|
@@ -1343,12 +1343,12 @@ function Y(e) {
|
|
|
1343
1343
|
}
|
|
1344
1344
|
//#endregion
|
|
1345
1345
|
//#region src/utils/blockTypeLabels.ts
|
|
1346
|
-
function
|
|
1346
|
+
function nr(e, t) {
|
|
1347
1347
|
return t.blocks[e] ?? e;
|
|
1348
1348
|
}
|
|
1349
1349
|
//#endregion
|
|
1350
1350
|
//#region src/composables/useKeyboardReorder.ts
|
|
1351
|
-
function
|
|
1351
|
+
function rr(e, t) {
|
|
1352
1352
|
let n = C(null), r = C(""), i = null;
|
|
1353
1353
|
function a(t) {
|
|
1354
1354
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -1375,7 +1375,7 @@ function tr(e, t) {
|
|
|
1375
1375
|
let r = a(n);
|
|
1376
1376
|
if (!r) return "";
|
|
1377
1377
|
let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
|
|
1378
|
-
return i ?
|
|
1378
|
+
return i ? nr(i.type, t.t) : "";
|
|
1379
1379
|
}
|
|
1380
1380
|
function s(t, n) {
|
|
1381
1381
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -1444,13 +1444,13 @@ function tr(e, t) {
|
|
|
1444
1444
|
}
|
|
1445
1445
|
//#endregion
|
|
1446
1446
|
//#region src/composables/useUiTheme.ts
|
|
1447
|
-
function
|
|
1447
|
+
function ir(e) {
|
|
1448
1448
|
let t = gn("(prefers-color-scheme: dark)");
|
|
1449
1449
|
return { resolvedTheme: O(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
1450
1450
|
}
|
|
1451
1451
|
//#endregion
|
|
1452
1452
|
//#region src/composables/useThemeStyles.ts
|
|
1453
|
-
var
|
|
1453
|
+
var ar = {
|
|
1454
1454
|
bg: "--tpl-bg",
|
|
1455
1455
|
bgElevated: "--tpl-bg-elevated",
|
|
1456
1456
|
bgHover: "--tpl-bg-hover",
|
|
@@ -1474,10 +1474,10 @@ var rr = {
|
|
|
1474
1474
|
dangerLight: "--tpl-danger-light",
|
|
1475
1475
|
canvasBg: "--tpl-canvas-bg"
|
|
1476
1476
|
};
|
|
1477
|
-
function
|
|
1477
|
+
function or({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
1478
1478
|
return { themeStyles: O(() => {
|
|
1479
1479
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
1480
|
-
if (a) for (let [e, t] of Object.entries(
|
|
1480
|
+
if (a) for (let [e, t] of Object.entries(ar)) {
|
|
1481
1481
|
let n = a[e];
|
|
1482
1482
|
n && (r[t] = n);
|
|
1483
1483
|
}
|
|
@@ -1486,30 +1486,30 @@ function ir({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
1486
1486
|
}
|
|
1487
1487
|
//#endregion
|
|
1488
1488
|
//#region src/utils/logger.ts
|
|
1489
|
-
var
|
|
1490
|
-
function
|
|
1489
|
+
var sr = "[Templatical]";
|
|
1490
|
+
function cr() {
|
|
1491
1491
|
return typeof process < "u" && !0;
|
|
1492
1492
|
}
|
|
1493
|
-
var
|
|
1493
|
+
var lr = {
|
|
1494
1494
|
warn(...e) {
|
|
1495
|
-
console.warn(
|
|
1495
|
+
console.warn(sr, ...e);
|
|
1496
1496
|
},
|
|
1497
1497
|
error(...e) {
|
|
1498
|
-
console.error(
|
|
1498
|
+
console.error(sr, ...e);
|
|
1499
1499
|
},
|
|
1500
1500
|
debug(...e) {
|
|
1501
|
-
|
|
1501
|
+
cr() || console.debug(sr, ...e);
|
|
1502
1502
|
},
|
|
1503
1503
|
info(...e) {
|
|
1504
|
-
|
|
1504
|
+
cr() || console.info(sr, ...e);
|
|
1505
1505
|
}
|
|
1506
1506
|
};
|
|
1507
1507
|
//#endregion
|
|
1508
1508
|
//#region src/composables/useBlockRegistry.ts
|
|
1509
|
-
function
|
|
1509
|
+
function ur() {
|
|
1510
1510
|
let e = n(/* @__PURE__ */ new Map());
|
|
1511
1511
|
function t(t, n) {
|
|
1512
|
-
e.value.set(t, n),
|
|
1512
|
+
e.value.set(t, n), oe(e);
|
|
1513
1513
|
}
|
|
1514
1514
|
function r(t, n) {
|
|
1515
1515
|
let r = `custom:${t.type}`;
|
|
@@ -1524,7 +1524,7 @@ function cr() {
|
|
|
1524
1524
|
isCustom: !0
|
|
1525
1525
|
},
|
|
1526
1526
|
definition: t
|
|
1527
|
-
}),
|
|
1527
|
+
}), oe(e);
|
|
1528
1528
|
}
|
|
1529
1529
|
function i(t) {
|
|
1530
1530
|
if (t.type === "custom") {
|
|
@@ -1558,7 +1558,7 @@ function cr() {
|
|
|
1558
1558
|
strictFilters: !1
|
|
1559
1559
|
}).parseAndRender(t.template, e.fieldValues);
|
|
1560
1560
|
} catch (t) {
|
|
1561
|
-
return
|
|
1561
|
+
return lr.error(`Failed to render custom block "${e.customType}":`, t), c(`Render error: ${e.customType}`);
|
|
1562
1562
|
}
|
|
1563
1563
|
}
|
|
1564
1564
|
function u(t) {
|
|
@@ -1577,7 +1577,7 @@ function cr() {
|
|
|
1577
1577
|
}
|
|
1578
1578
|
//#endregion
|
|
1579
1579
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
1580
|
-
var
|
|
1580
|
+
var dr = [
|
|
1581
1581
|
{
|
|
1582
1582
|
type: "section",
|
|
1583
1583
|
label: "Section",
|
|
@@ -1644,8 +1644,8 @@ var lr = [
|
|
|
1644
1644
|
createBlock: it
|
|
1645
1645
|
}
|
|
1646
1646
|
];
|
|
1647
|
-
function
|
|
1648
|
-
for (let n of
|
|
1647
|
+
function fr(e, t) {
|
|
1648
|
+
for (let n of dr) {
|
|
1649
1649
|
let r = t[n.type];
|
|
1650
1650
|
r && e.registerBuiltIn(n.type, {
|
|
1651
1651
|
component: r,
|
|
@@ -1660,18 +1660,23 @@ function ur(e, t) {
|
|
|
1660
1660
|
}
|
|
1661
1661
|
//#endregion
|
|
1662
1662
|
//#region src/utils/keyboardShortcuts.ts
|
|
1663
|
-
function
|
|
1664
|
-
let t
|
|
1665
|
-
|
|
1663
|
+
function pr(e) {
|
|
1664
|
+
for (let t of e.composedPath()) {
|
|
1665
|
+
if (!(t instanceof HTMLElement)) continue;
|
|
1666
|
+
if (t.isContentEditable) return !0;
|
|
1667
|
+
let e = t.tagName;
|
|
1668
|
+
if (e === "INPUT" || e === "TEXTAREA" || e === "SELECT") return !0;
|
|
1669
|
+
}
|
|
1670
|
+
return !1;
|
|
1666
1671
|
}
|
|
1667
|
-
function
|
|
1672
|
+
function mr(e, t) {
|
|
1668
1673
|
let n = e.metaKey || e.ctrlKey;
|
|
1669
1674
|
if (n && e.key.toLowerCase() === "s") {
|
|
1670
1675
|
e.preventDefault(), t.onSave?.();
|
|
1671
1676
|
return;
|
|
1672
1677
|
}
|
|
1673
1678
|
if (n && e.key.toLowerCase() === "z") {
|
|
1674
|
-
if (
|
|
1679
|
+
if (pr(e)) return;
|
|
1675
1680
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
1676
1681
|
return;
|
|
1677
1682
|
}
|
|
@@ -1679,11 +1684,11 @@ function fr(e, t) {
|
|
|
1679
1684
|
t.selectBlock(null);
|
|
1680
1685
|
return;
|
|
1681
1686
|
}
|
|
1682
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1687
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !pr(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1683
1688
|
}
|
|
1684
1689
|
//#endregion
|
|
1685
1690
|
//#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1686
|
-
var
|
|
1691
|
+
var hr = { class: "tpl:text-center" }, gr = ["href"], _r = /* @__PURE__ */ B({
|
|
1687
1692
|
__name: "ButtonBlock",
|
|
1688
1693
|
props: {
|
|
1689
1694
|
block: {},
|
|
@@ -1704,17 +1709,17 @@ var pr = { class: "tpl:text-center" }, mr = ["href"], hr = /* @__PURE__ */ B({
|
|
|
1704
1709
|
};
|
|
1705
1710
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
1706
1711
|
});
|
|
1707
|
-
return (t, r) => (f(), k("div",
|
|
1712
|
+
return (t, r) => (f(), k("div", hr, [I("a", {
|
|
1708
1713
|
href: e.block.url || "#",
|
|
1709
|
-
style:
|
|
1714
|
+
style: L(n.value),
|
|
1710
1715
|
class: "tpl:cursor-default",
|
|
1711
|
-
onClick: r[0] ||=
|
|
1712
|
-
},
|
|
1716
|
+
onClick: r[0] ||= M(() => {}, ["prevent"])
|
|
1717
|
+
}, D(e.block.text), 13, gr)]));
|
|
1713
1718
|
}
|
|
1714
|
-
}),
|
|
1715
|
-
let t =
|
|
1719
|
+
}), vr = (e) => e === "", yr = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), br = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), xr = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), Sr = (e) => {
|
|
1720
|
+
let t = xr(e);
|
|
1716
1721
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
1717
|
-
},
|
|
1722
|
+
}, Cr = {
|
|
1718
1723
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1719
1724
|
width: 24,
|
|
1720
1725
|
height: 24,
|
|
@@ -1724,35 +1729,35 @@ var pr = { class: "tpl:text-center" }, mr = ["href"], hr = /* @__PURE__ */ B({
|
|
|
1724
1729
|
"stroke-width": 2,
|
|
1725
1730
|
"stroke-linecap": "round",
|
|
1726
1731
|
"stroke-linejoin": "round"
|
|
1727
|
-
},
|
|
1728
|
-
function
|
|
1729
|
-
return v(
|
|
1732
|
+
}, wr = Symbol("lucide-icons");
|
|
1733
|
+
function Tr() {
|
|
1734
|
+
return v(wr, {});
|
|
1730
1735
|
}
|
|
1731
1736
|
//#endregion
|
|
1732
1737
|
//#region ../../node_modules/.pnpm/@lucide+vue@1.14.0_vue@3.5.33_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/Icon.mjs
|
|
1733
|
-
var
|
|
1734
|
-
let { size: d, color: f, strokeWidth: p = 2, absoluteStrokeWidth: m = !1, class: h = "" } =
|
|
1735
|
-
let e =
|
|
1736
|
-
return e ? Number(t) * 24 / Number(s ?? d ??
|
|
1738
|
+
var Er = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": o, size: s, color: c, ...l }, { slots: u }) => {
|
|
1739
|
+
let { size: d, color: f, strokeWidth: p = 2, absoluteStrokeWidth: m = !1, class: h = "" } = Tr(), g = O(() => {
|
|
1740
|
+
let e = vr(n) || vr(r) || n === !0 || r === !0 || m === !0, t = i || o || p || Cr["stroke-width"];
|
|
1741
|
+
return e ? Number(t) * 24 / Number(s ?? d ?? Cr.width) : t;
|
|
1737
1742
|
});
|
|
1738
1743
|
return a("svg", {
|
|
1739
|
-
...
|
|
1744
|
+
...Cr,
|
|
1740
1745
|
...l,
|
|
1741
|
-
width: s ?? d ??
|
|
1742
|
-
height: s ?? d ??
|
|
1743
|
-
stroke: c ?? f ??
|
|
1746
|
+
width: s ?? d ?? Cr.width,
|
|
1747
|
+
height: s ?? d ?? Cr.height,
|
|
1748
|
+
stroke: c ?? f ?? Cr.stroke,
|
|
1744
1749
|
"stroke-width": g.value,
|
|
1745
|
-
class:
|
|
1750
|
+
class: yr("lucide", h, ...e ? [`lucide-${br(Sr(e))}-icon`, `lucide-${br(e)}`] : ["lucide-icon"])
|
|
1746
1751
|
}, [...t.map((e) => a(...e)), ...u.default ? [u.default()] : []]);
|
|
1747
|
-
}, X = (e, t) => (n, { slots: r, attrs: i }) => a(
|
|
1752
|
+
}, X = (e, t) => (n, { slots: r, attrs: i }) => a(Er, {
|
|
1748
1753
|
...i,
|
|
1749
1754
|
...n,
|
|
1750
1755
|
iconNode: t,
|
|
1751
1756
|
name: e
|
|
1752
|
-
}, r),
|
|
1757
|
+
}, r), Dr = X("bookmark", [["path", {
|
|
1753
1758
|
d: "M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",
|
|
1754
1759
|
key: "oz39mx"
|
|
1755
|
-
}]]),
|
|
1760
|
+
}]]), Or = X("box", [
|
|
1756
1761
|
["path", {
|
|
1757
1762
|
d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",
|
|
1758
1763
|
key: "hh9hay"
|
|
@@ -1765,22 +1770,22 @@ var wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1765
1770
|
d: "M12 22V12",
|
|
1766
1771
|
key: "d0xqtd"
|
|
1767
1772
|
}]
|
|
1768
|
-
]),
|
|
1773
|
+
]), kr = X("check", [["path", {
|
|
1769
1774
|
d: "M20 6 9 17l-5-5",
|
|
1770
1775
|
key: "1gmf2c"
|
|
1771
|
-
}]]),
|
|
1776
|
+
}]]), Ar = X("chevron-down", [["path", {
|
|
1772
1777
|
d: "m6 9 6 6 6-6",
|
|
1773
1778
|
key: "qrunsl"
|
|
1774
|
-
}]]),
|
|
1779
|
+
}]]), jr = X("chevron-left", [["path", {
|
|
1775
1780
|
d: "m15 18-6-6 6-6",
|
|
1776
1781
|
key: "1wnfg3"
|
|
1777
|
-
}]]),
|
|
1782
|
+
}]]), Mr = X("chevron-right", [["path", {
|
|
1778
1783
|
d: "m9 18 6-6-6-6",
|
|
1779
1784
|
key: "mthhwq"
|
|
1780
|
-
}]]),
|
|
1785
|
+
}]]), Nr = X("chevron-up", [["path", {
|
|
1781
1786
|
d: "m18 15-6-6-6 6",
|
|
1782
1787
|
key: "153udz"
|
|
1783
|
-
}]]),
|
|
1788
|
+
}]]), Pr = X("circle-alert", [
|
|
1784
1789
|
["circle", {
|
|
1785
1790
|
cx: "12",
|
|
1786
1791
|
cy: "12",
|
|
@@ -1801,7 +1806,7 @@ var wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1801
1806
|
y2: "16",
|
|
1802
1807
|
key: "4dfq90"
|
|
1803
1808
|
}]
|
|
1804
|
-
]),
|
|
1809
|
+
]), Fr = X("circle-check", [["circle", {
|
|
1805
1810
|
cx: "12",
|
|
1806
1811
|
cy: "12",
|
|
1807
1812
|
r: "10",
|
|
@@ -1809,7 +1814,7 @@ var wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1809
1814
|
}], ["path", {
|
|
1810
1815
|
d: "m9 12 2 2 4-4",
|
|
1811
1816
|
key: "dzmm74"
|
|
1812
|
-
}]]),
|
|
1817
|
+
}]]), Ir = X("clock", [["circle", {
|
|
1813
1818
|
cx: "12",
|
|
1814
1819
|
cy: "12",
|
|
1815
1820
|
r: "10",
|
|
@@ -1817,13 +1822,13 @@ var wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1817
1822
|
}], ["path", {
|
|
1818
1823
|
d: "M12 6v6l4 2",
|
|
1819
1824
|
key: "mmk7yg"
|
|
1820
|
-
}]]),
|
|
1825
|
+
}]]), Lr = X("code", [["path", {
|
|
1821
1826
|
d: "m16 18 6-6-6-6",
|
|
1822
1827
|
key: "eg8j8"
|
|
1823
1828
|
}], ["path", {
|
|
1824
1829
|
d: "m8 6-6 6 6 6",
|
|
1825
1830
|
key: "ppft3o"
|
|
1826
|
-
}]]),
|
|
1831
|
+
}]]), Rr = X("copy", [["rect", {
|
|
1827
1832
|
width: "14",
|
|
1828
1833
|
height: "14",
|
|
1829
1834
|
x: "8",
|
|
@@ -1834,7 +1839,7 @@ var wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1834
1839
|
}], ["path", {
|
|
1835
1840
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
1836
1841
|
key: "zix9uf"
|
|
1837
|
-
}]]),
|
|
1842
|
+
}]]), zr = X("eye-off", [
|
|
1838
1843
|
["path", {
|
|
1839
1844
|
d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
|
|
1840
1845
|
key: "ct8e1f"
|
|
@@ -1851,7 +1856,7 @@ var wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1851
1856
|
d: "m2 2 20 20",
|
|
1852
1857
|
key: "1ooewy"
|
|
1853
1858
|
}]
|
|
1854
|
-
]),
|
|
1859
|
+
]), Br = X("eye", [["path", {
|
|
1855
1860
|
d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
|
|
1856
1861
|
key: "1nclc0"
|
|
1857
1862
|
}], ["circle", {
|
|
@@ -1859,7 +1864,7 @@ var wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1859
1864
|
cy: "12",
|
|
1860
1865
|
r: "3",
|
|
1861
1866
|
key: "1v7zrd"
|
|
1862
|
-
}]]),
|
|
1867
|
+
}]]), Vr = X("file-image", [
|
|
1863
1868
|
["path", {
|
|
1864
1869
|
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
1865
1870
|
key: "1oefj6"
|
|
@@ -1878,7 +1883,7 @@ var wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1878
1883
|
d: "m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",
|
|
1879
1884
|
key: "wt3hpn"
|
|
1880
1885
|
}]
|
|
1881
|
-
]),
|
|
1886
|
+
]), Hr = X("file-text", [
|
|
1882
1887
|
["path", {
|
|
1883
1888
|
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
1884
1889
|
key: "1oefj6"
|
|
@@ -1899,10 +1904,10 @@ var wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1899
1904
|
d: "M16 17H8",
|
|
1900
1905
|
key: "z1uh3a"
|
|
1901
1906
|
}]
|
|
1902
|
-
]),
|
|
1907
|
+
]), Ur = X("funnel", [["path", {
|
|
1903
1908
|
d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
|
|
1904
1909
|
key: "sc7q7i"
|
|
1905
|
-
}]]),
|
|
1910
|
+
}]]), Wr = X("grip-vertical", [
|
|
1906
1911
|
["circle", {
|
|
1907
1912
|
cx: "9",
|
|
1908
1913
|
cy: "12",
|
|
@@ -1939,7 +1944,7 @@ var wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1939
1944
|
r: "1",
|
|
1940
1945
|
key: "f4zoj3"
|
|
1941
1946
|
}]
|
|
1942
|
-
]),
|
|
1947
|
+
]), Gr = X("image-up", [
|
|
1943
1948
|
["path", {
|
|
1944
1949
|
d: "M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21",
|
|
1945
1950
|
key: "9csbqa"
|
|
@@ -1958,7 +1963,7 @@ var wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1958
1963
|
r: "2",
|
|
1959
1964
|
key: "af1f0g"
|
|
1960
1965
|
}]
|
|
1961
|
-
]),
|
|
1966
|
+
]), Kr = X("image", [
|
|
1962
1967
|
["rect", {
|
|
1963
1968
|
width: "18",
|
|
1964
1969
|
height: "18",
|
|
@@ -1978,7 +1983,7 @@ var wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1978
1983
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
1979
1984
|
key: "1xmnt7"
|
|
1980
1985
|
}]
|
|
1981
|
-
]),
|
|
1986
|
+
]), qr = X("info", [
|
|
1982
1987
|
["circle", {
|
|
1983
1988
|
cx: "12",
|
|
1984
1989
|
cy: "12",
|
|
@@ -1993,31 +1998,31 @@ var wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1993
1998
|
d: "M12 8h.01",
|
|
1994
1999
|
key: "e9boi3"
|
|
1995
2000
|
}]
|
|
1996
|
-
]),
|
|
2001
|
+
]), Jr = X("loader-circle", [["path", {
|
|
1997
2002
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
1998
2003
|
key: "13zald"
|
|
1999
|
-
}]]),
|
|
2004
|
+
}]]), Yr = X("message-circle", [["path", {
|
|
2000
2005
|
d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",
|
|
2001
2006
|
key: "1sd12s"
|
|
2002
|
-
}]]),
|
|
2007
|
+
}]]), Xr = X("navigation", [["polygon", {
|
|
2003
2008
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
2004
2009
|
key: "1ltx0t"
|
|
2005
|
-
}]]),
|
|
2010
|
+
}]]), Zr = X("pencil", [["path", {
|
|
2006
2011
|
d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
|
|
2007
2012
|
key: "1a8usu"
|
|
2008
2013
|
}], ["path", {
|
|
2009
2014
|
d: "m15 5 4 4",
|
|
2010
2015
|
key: "1mk7zo"
|
|
2011
|
-
}]]),
|
|
2016
|
+
}]]), Qr = X("puzzle", [["path", {
|
|
2012
2017
|
d: "M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",
|
|
2013
2018
|
key: "w46dr5"
|
|
2014
|
-
}]]),
|
|
2019
|
+
}]]), $r = X("redo-2", [["path", {
|
|
2015
2020
|
d: "m15 14 5-5-5-5",
|
|
2016
2021
|
key: "12vg1m"
|
|
2017
2022
|
}], ["path", {
|
|
2018
2023
|
d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",
|
|
2019
2024
|
key: "6uklza"
|
|
2020
|
-
}]]),
|
|
2025
|
+
}]]), ei = X("refresh-cw", [
|
|
2021
2026
|
["path", {
|
|
2022
2027
|
d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",
|
|
2023
2028
|
key: "v9h5vc"
|
|
@@ -2034,19 +2039,19 @@ var wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2034
2039
|
d: "M8 16H3v5",
|
|
2035
2040
|
key: "1cv678"
|
|
2036
2041
|
}]
|
|
2037
|
-
]),
|
|
2042
|
+
]), ti = X("reply", [["path", {
|
|
2038
2043
|
d: "M20 18v-2a4 4 0 0 0-4-4H4",
|
|
2039
2044
|
key: "5vmcpk"
|
|
2040
2045
|
}], ["path", {
|
|
2041
2046
|
d: "m9 17-5-5 5-5",
|
|
2042
2047
|
key: "nvlc11"
|
|
2043
|
-
}]]),
|
|
2048
|
+
}]]), ni = X("send", [["path", {
|
|
2044
2049
|
d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",
|
|
2045
2050
|
key: "1ffxy3"
|
|
2046
2051
|
}], ["path", {
|
|
2047
2052
|
d: "m21.854 2.147-10.94 10.939",
|
|
2048
2053
|
key: "12cjpa"
|
|
2049
|
-
}]]),
|
|
2054
|
+
}]]), ri = X("share-2", [
|
|
2050
2055
|
["circle", {
|
|
2051
2056
|
cx: "18",
|
|
2052
2057
|
cy: "5",
|
|
@@ -2079,13 +2084,13 @@ var wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2079
2084
|
y2: "10.49",
|
|
2080
2085
|
key: "1n3mei"
|
|
2081
2086
|
}]
|
|
2082
|
-
]),
|
|
2087
|
+
]), ii = X("shield-check", [["path", {
|
|
2083
2088
|
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
2084
2089
|
key: "oel41y"
|
|
2085
2090
|
}], ["path", {
|
|
2086
2091
|
d: "m9 12 2 2 4-4",
|
|
2087
2092
|
key: "dzmm74"
|
|
2088
|
-
}]]),
|
|
2093
|
+
}]]), ai = X("shield-x", [
|
|
2089
2094
|
["path", {
|
|
2090
2095
|
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
2091
2096
|
key: "oel41y"
|
|
@@ -2098,7 +2103,7 @@ var wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2098
2103
|
d: "m9.5 9.5 5 5",
|
|
2099
2104
|
key: "18nt4w"
|
|
2100
2105
|
}]
|
|
2101
|
-
]),
|
|
2106
|
+
]), oi = X("sparkles", [
|
|
2102
2107
|
["path", {
|
|
2103
2108
|
d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
|
|
2104
2109
|
key: "1s2grr"
|
|
@@ -2117,7 +2122,7 @@ var wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2117
2122
|
r: "2",
|
|
2118
2123
|
key: "6kqj1y"
|
|
2119
2124
|
}]
|
|
2120
|
-
]),
|
|
2125
|
+
]), si = X("table", [
|
|
2121
2126
|
["path", {
|
|
2122
2127
|
d: "M12 3v18",
|
|
2123
2128
|
key: "108xh3"
|
|
@@ -2138,7 +2143,7 @@ var wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2138
2143
|
d: "M3 15h18",
|
|
2139
2144
|
key: "5xshup"
|
|
2140
2145
|
}]
|
|
2141
|
-
]),
|
|
2146
|
+
]), ci = X("trash-2", [
|
|
2142
2147
|
["path", {
|
|
2143
2148
|
d: "M10 11v6",
|
|
2144
2149
|
key: "nco0om"
|
|
@@ -2159,7 +2164,7 @@ var wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2159
2164
|
d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
|
|
2160
2165
|
key: "e791ji"
|
|
2161
2166
|
}]
|
|
2162
|
-
]),
|
|
2167
|
+
]), li = X("triangle-alert", [
|
|
2163
2168
|
["path", {
|
|
2164
2169
|
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
2165
2170
|
key: "wmoenq"
|
|
@@ -2172,13 +2177,13 @@ var wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2172
2177
|
d: "M12 17h.01",
|
|
2173
2178
|
key: "p32p05"
|
|
2174
2179
|
}]
|
|
2175
|
-
]),
|
|
2180
|
+
]), ui = X("undo-2", [["path", {
|
|
2176
2181
|
d: "M9 14 4 9l5-5",
|
|
2177
2182
|
key: "102s5s"
|
|
2178
2183
|
}], ["path", {
|
|
2179
2184
|
d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",
|
|
2180
2185
|
key: "f3b9sd"
|
|
2181
|
-
}]]),
|
|
2186
|
+
}]]), di = X("upload", [
|
|
2182
2187
|
["path", {
|
|
2183
2188
|
d: "M12 3v12",
|
|
2184
2189
|
key: "1x0j5s"
|
|
@@ -2191,7 +2196,7 @@ var wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2191
2196
|
d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",
|
|
2192
2197
|
key: "ih7n3h"
|
|
2193
2198
|
}]
|
|
2194
|
-
]),
|
|
2199
|
+
]), fi = X("video", [["path", {
|
|
2195
2200
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
2196
2201
|
key: "ftymec"
|
|
2197
2202
|
}], ["rect", {
|
|
@@ -2201,20 +2206,20 @@ var wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2201
2206
|
height: "12",
|
|
2202
2207
|
rx: "2",
|
|
2203
2208
|
key: "158x01"
|
|
2204
|
-
}]]),
|
|
2209
|
+
}]]), pi = X("x", [["path", {
|
|
2205
2210
|
d: "M18 6 6 18",
|
|
2206
2211
|
key: "1bl5f8"
|
|
2207
2212
|
}], ["path", {
|
|
2208
2213
|
d: "m6 6 12 12",
|
|
2209
2214
|
key: "d8bk6v"
|
|
2210
|
-
}]]),
|
|
2215
|
+
}]]), mi = X("zap", [["path", {
|
|
2211
2216
|
d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",
|
|
2212
2217
|
key: "1xq2db"
|
|
2213
|
-
}]]),
|
|
2218
|
+
}]]), hi = ["innerHTML"], gi = [
|
|
2214
2219
|
"src",
|
|
2215
2220
|
"width",
|
|
2216
2221
|
"height"
|
|
2217
|
-
],
|
|
2222
|
+
], _i = /* @__PURE__ */ B({
|
|
2218
2223
|
__name: "CustomBlockIcon",
|
|
2219
2224
|
props: {
|
|
2220
2225
|
icon: {},
|
|
@@ -2225,78 +2230,86 @@ var wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2225
2230
|
return (t, a) => r.value ? (f(), k("span", {
|
|
2226
2231
|
key: 0,
|
|
2227
2232
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
2228
|
-
style:
|
|
2233
|
+
style: L({
|
|
2229
2234
|
width: `${n.value}px`,
|
|
2230
2235
|
height: `${n.value}px`
|
|
2231
2236
|
}),
|
|
2232
2237
|
innerHTML: e.icon
|
|
2233
|
-
}, null, 12,
|
|
2238
|
+
}, null, 12, hi)) : i.value ? (f(), k("img", {
|
|
2234
2239
|
key: 1,
|
|
2235
2240
|
src: e.icon,
|
|
2236
2241
|
width: n.value,
|
|
2237
2242
|
height: n.value,
|
|
2238
2243
|
class: "tpl:inline-block",
|
|
2239
2244
|
alt: ""
|
|
2240
|
-
}, null, 8,
|
|
2245
|
+
}, null, 8, gi)) : (f(), N(j(Or), {
|
|
2241
2246
|
key: 2,
|
|
2242
2247
|
size: n.value,
|
|
2243
2248
|
"stroke-width": 1.5
|
|
2244
2249
|
}, null, 8, ["size"]));
|
|
2245
2250
|
}
|
|
2246
|
-
}),
|
|
2251
|
+
}), vi = (e, t) => {
|
|
2247
2252
|
let n = e.__vccOpts || e;
|
|
2248
2253
|
for (let [e, r] of t) n[e] = r;
|
|
2249
2254
|
return n;
|
|
2250
|
-
},
|
|
2251
|
-
function
|
|
2252
|
-
return f(), k("div",
|
|
2255
|
+
}, yi = {}, bi = { class: "tpl-loading-track" };
|
|
2256
|
+
function xi(e, t) {
|
|
2257
|
+
return f(), k("div", bi);
|
|
2253
2258
|
}
|
|
2254
|
-
var
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
+
var Si = /* @__PURE__ */ vi(yi, [["render", xi], ["__scopeId", "data-v-1ed538ec"]]);
|
|
2260
|
+
//#endregion
|
|
2261
|
+
//#region src/composables/useEditorRoot.ts
|
|
2262
|
+
function Ci() {
|
|
2263
|
+
return v(qn, document) ?? document;
|
|
2264
|
+
}
|
|
2265
|
+
//#endregion
|
|
2266
|
+
//#region src/composables/useFocusTrap.ts
|
|
2267
|
+
var wi = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
2268
|
+
function Ti(e, t) {
|
|
2269
|
+
let n = Ci(), r = null, i = null, a = null;
|
|
2270
|
+
function o() {
|
|
2271
|
+
return e.value ? Array.from(e.value.querySelectorAll(wi)).filter((e) => e.offsetParent !== null) : [];
|
|
2259
2272
|
}
|
|
2260
|
-
function
|
|
2273
|
+
function s(e) {
|
|
2261
2274
|
if (e.key !== "Tab") return;
|
|
2262
|
-
let t =
|
|
2275
|
+
let t = o();
|
|
2263
2276
|
if (t.length === 0) return;
|
|
2264
|
-
let
|
|
2265
|
-
e.shiftKey ?
|
|
2277
|
+
let r = t[0], i = t[t.length - 1];
|
|
2278
|
+
e.shiftKey ? n.activeElement === r && (e.preventDefault(), i.focus()) : n.activeElement === i && (e.preventDefault(), r.focus());
|
|
2266
2279
|
}
|
|
2267
|
-
function
|
|
2268
|
-
let t =
|
|
2269
|
-
t &&
|
|
2270
|
-
|
|
2271
|
-
let t =
|
|
2280
|
+
function c() {
|
|
2281
|
+
let t = i !== null || a !== null;
|
|
2282
|
+
t && u({ restoreFocus: !1 }), t || (r = n.activeElement), a = requestAnimationFrame(() => {
|
|
2283
|
+
a = null;
|
|
2284
|
+
let t = o();
|
|
2272
2285
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
2273
|
-
}),
|
|
2286
|
+
}), i = q(e, "keydown", s);
|
|
2274
2287
|
}
|
|
2275
|
-
function
|
|
2288
|
+
function u(e = {}) {
|
|
2276
2289
|
let t = e.restoreFocus !== !1;
|
|
2277
|
-
|
|
2290
|
+
a !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(a), a = null), i?.(), i = null, t && r && r.focus && (r.focus(), r = null);
|
|
2278
2291
|
}
|
|
2279
|
-
let
|
|
2280
|
-
e && t ?
|
|
2292
|
+
let d = H([t, e], ([e, t]) => {
|
|
2293
|
+
e && t ? c() : u();
|
|
2281
2294
|
}, { flush: "post" });
|
|
2282
2295
|
l(() => {
|
|
2283
|
-
|
|
2296
|
+
d(), u();
|
|
2284
2297
|
});
|
|
2285
2298
|
}
|
|
2286
2299
|
//#endregion
|
|
2287
2300
|
//#region src/composables/useCloudI18n.ts
|
|
2288
|
-
function
|
|
2301
|
+
function Ei(e, t) {
|
|
2289
2302
|
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
|
|
2290
2303
|
}
|
|
2291
|
-
function
|
|
2292
|
-
let t = e ?? v(
|
|
2304
|
+
function Di(e) {
|
|
2305
|
+
let t = e ?? v(er, null);
|
|
2293
2306
|
return {
|
|
2294
2307
|
t: t ? u(t) ? t.value : t : null,
|
|
2295
|
-
format:
|
|
2308
|
+
format: Ei
|
|
2296
2309
|
};
|
|
2297
2310
|
}
|
|
2298
|
-
function
|
|
2299
|
-
let { t, format: n } =
|
|
2311
|
+
function Oi(e) {
|
|
2312
|
+
let { t, format: n } = Di(e);
|
|
2300
2313
|
if (!t) throw Error("useCloudI18nStrict() requires a cloud translations provider. Ensure the component is a descendant of CloudEditor.");
|
|
2301
2314
|
return {
|
|
2302
2315
|
t,
|
|
@@ -2305,7 +2318,7 @@ function Ti(e) {
|
|
|
2305
2318
|
}
|
|
2306
2319
|
//#endregion
|
|
2307
2320
|
//#region src/composables/useMergeTag.ts
|
|
2308
|
-
function
|
|
2321
|
+
function ki() {
|
|
2309
2322
|
let e = v(Ln, []), t = v(Rn, lt.liquid), n = v(zn, null), r = v(Bn, !0), i = C(!1);
|
|
2310
2323
|
function a(e) {
|
|
2311
2324
|
return mt(e, t);
|
|
@@ -2335,7 +2348,7 @@ function Ei() {
|
|
|
2335
2348
|
}
|
|
2336
2349
|
//#endregion
|
|
2337
2350
|
//#region src/composables/useEmoji.ts
|
|
2338
|
-
function
|
|
2351
|
+
function Ai() {
|
|
2339
2352
|
let [e, t] = nn(!1), r = n([]), i = !1;
|
|
2340
2353
|
l(() => {
|
|
2341
2354
|
i = !0;
|
|
@@ -2361,7 +2374,7 @@ function Di() {
|
|
|
2361
2374
|
}
|
|
2362
2375
|
//#endregion
|
|
2363
2376
|
//#region src/composables/useDragDrop.ts
|
|
2364
|
-
function
|
|
2377
|
+
function ji(e) {
|
|
2365
2378
|
let { onBlockMove: t, onBlockAdd: n } = e, r = C(!1), i = C(null), a = C(null);
|
|
2366
2379
|
function o(e) {
|
|
2367
2380
|
r.value = !0, i.value = e;
|
|
@@ -2411,7 +2424,7 @@ function Oi(e) {
|
|
|
2411
2424
|
}
|
|
2412
2425
|
//#endregion
|
|
2413
2426
|
//#region src/composables/useFonts.ts
|
|
2414
|
-
var
|
|
2427
|
+
var Mi = [
|
|
2415
2428
|
{
|
|
2416
2429
|
value: "Arial",
|
|
2417
2430
|
label: "Arial"
|
|
@@ -2440,7 +2453,7 @@ var ki = [
|
|
|
2440
2453
|
value: "Courier New",
|
|
2441
2454
|
label: "Courier New"
|
|
2442
2455
|
}
|
|
2443
|
-
],
|
|
2456
|
+
], Ni = {
|
|
2444
2457
|
arial: "Arial, sans-serif",
|
|
2445
2458
|
helvetica: "Helvetica, sans-serif",
|
|
2446
2459
|
georgia: "Georgia, serif",
|
|
@@ -2448,14 +2461,14 @@ var ki = [
|
|
|
2448
2461
|
verdana: "Verdana, sans-serif",
|
|
2449
2462
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
2450
2463
|
"courier new": "'Courier New', monospace"
|
|
2451
|
-
},
|
|
2452
|
-
function
|
|
2453
|
-
let t = C(e?.customFonts ?? []), n = C(!0), r = C(!1), i = O(() => e?.defaultFallback ??
|
|
2464
|
+
}, Pi = "Arial, sans-serif";
|
|
2465
|
+
function Fi(e) {
|
|
2466
|
+
let t = C(e?.customFonts ?? []), n = C(!0), r = C(!1), i = O(() => e?.defaultFallback ?? Pi);
|
|
2454
2467
|
function a(e) {
|
|
2455
2468
|
n.value = e;
|
|
2456
2469
|
}
|
|
2457
2470
|
let o = O(() => {
|
|
2458
|
-
let e = [...
|
|
2471
|
+
let e = [...Mi];
|
|
2459
2472
|
if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
|
|
2460
2473
|
let r = t.value.map((e) => ({
|
|
2461
2474
|
value: e.name,
|
|
@@ -2468,23 +2481,23 @@ function Mi(e) {
|
|
|
2468
2481
|
return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
2469
2482
|
}
|
|
2470
2483
|
function u(e) {
|
|
2471
|
-
return
|
|
2484
|
+
return Mi.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
2472
2485
|
}
|
|
2473
2486
|
function d() {
|
|
2474
2487
|
if (e?.defaultFont) {
|
|
2475
|
-
if (!n.value && !u(e.defaultFont)) return
|
|
2488
|
+
if (!n.value && !u(e.defaultFont)) return Pi;
|
|
2476
2489
|
if (c(e.defaultFont)) {
|
|
2477
2490
|
let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
2478
2491
|
if (t) return t.value;
|
|
2479
2492
|
}
|
|
2480
2493
|
}
|
|
2481
|
-
return
|
|
2494
|
+
return Pi;
|
|
2482
2495
|
}
|
|
2483
2496
|
let f = O(() => d());
|
|
2484
2497
|
function p(e) {
|
|
2485
2498
|
if (!e) return i.value;
|
|
2486
2499
|
let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
|
|
2487
|
-
return n ? `'${n.name}', ${n.fallback ?? i.value}` :
|
|
2500
|
+
return n ? `'${n.name}', ${n.fallback ?? i.value}` : Ni[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
2488
2501
|
}
|
|
2489
2502
|
let m = [];
|
|
2490
2503
|
async function h() {
|
|
@@ -2500,7 +2513,7 @@ function Mi(e) {
|
|
|
2500
2513
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
2501
2514
|
});
|
|
2502
2515
|
} catch (t) {
|
|
2503
|
-
|
|
2516
|
+
lr.warn(`Failed to load custom font "${e.name}":`, t);
|
|
2504
2517
|
}
|
|
2505
2518
|
});
|
|
2506
2519
|
await Promise.allSettled(e), r.value = !0;
|
|
@@ -2525,9 +2538,9 @@ function Mi(e) {
|
|
|
2525
2538
|
}
|
|
2526
2539
|
//#endregion
|
|
2527
2540
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
2528
|
-
function
|
|
2541
|
+
function Ii(e) {
|
|
2529
2542
|
let t = C(!1), n = C(""), r = C(null);
|
|
2530
|
-
|
|
2543
|
+
Ti(r, t);
|
|
2531
2544
|
function i() {
|
|
2532
2545
|
n.value = e.value?.getAttributes("link").href || "", t.value = !0;
|
|
2533
2546
|
}
|
|
@@ -2563,10 +2576,10 @@ function Ni(e) {
|
|
|
2563
2576
|
}
|
|
2564
2577
|
//#endregion
|
|
2565
2578
|
//#region src/composables/useRichTextEditor.ts
|
|
2566
|
-
function
|
|
2567
|
-
let t = v(Dn, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } =
|
|
2568
|
-
async function
|
|
2569
|
-
|
|
2579
|
+
function Li(e) {
|
|
2580
|
+
let t = v(Dn, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } = ki(), l = v(En, null), d = (u(l) ? l.value : l)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", f = dt(s), p = n(null), { showLinkDialog: m, linkUrl: h, linkDialogRef: g, openLinkDialog: _, insertLink: y, removeLink: b, closeLinkDialog: x, handleLinkKeydown: S } = Ii(p), { start: w, stop: T } = tn(() => p.value?.commands.focus("end"), 0, { immediate: !1 }), E = n(null), ee = C(!0), D = C(null), te = !1;
|
|
2581
|
+
async function ne() {
|
|
2582
|
+
D.value = null, ee.value = !0;
|
|
2570
2583
|
try {
|
|
2571
2584
|
let { TiptapEditor: n, EC: i, extensions: a } = await e.loadExtensions({
|
|
2572
2585
|
mergeTags: r,
|
|
@@ -2591,26 +2604,26 @@ function Pi(e) {
|
|
|
2591
2604
|
l.destroy();
|
|
2592
2605
|
return;
|
|
2593
2606
|
}
|
|
2594
|
-
p.value = l,
|
|
2607
|
+
p.value = l, ee.value = !1, w();
|
|
2595
2608
|
} catch (t) {
|
|
2596
2609
|
if (te) return;
|
|
2597
|
-
|
|
2610
|
+
lr.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), D.value = t instanceof Error ? t.message : "Failed to load editor", ee.value = !1;
|
|
2598
2611
|
}
|
|
2599
2612
|
}
|
|
2600
|
-
function
|
|
2601
|
-
p.value?.destroy(), p.value = null,
|
|
2613
|
+
function O() {
|
|
2614
|
+
p.value?.destroy(), p.value = null, ne();
|
|
2602
2615
|
}
|
|
2603
|
-
|
|
2604
|
-
let
|
|
2616
|
+
ne();
|
|
2617
|
+
let k = H(() => e.blockContent(), (e) => {
|
|
2605
2618
|
p.value && p.value.getHTML() !== e && p.value.commands.setContent(e, { emitUpdate: !1 });
|
|
2606
2619
|
});
|
|
2607
|
-
function
|
|
2620
|
+
function A(t) {
|
|
2608
2621
|
if (a.value) return;
|
|
2609
|
-
let n = t.
|
|
2610
|
-
e.onClickOutsideSideEffect?.(n), !(n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog")) && e.onDone();
|
|
2622
|
+
let n = t.composedPath().find((e) => e instanceof HTMLElement);
|
|
2623
|
+
n && (e.onClickOutsideSideEffect?.(n), !(n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog")) && e.onDone());
|
|
2611
2624
|
}
|
|
2612
|
-
q(document, "mousedown",
|
|
2613
|
-
te = !0,
|
|
2625
|
+
q(document, "mousedown", A), re(() => {
|
|
2626
|
+
te = !0, k(), T(), p.value?.destroy();
|
|
2614
2627
|
});
|
|
2615
2628
|
async function j() {
|
|
2616
2629
|
let e = await o();
|
|
@@ -2622,9 +2635,9 @@ function Pi(e) {
|
|
|
2622
2635
|
return {
|
|
2623
2636
|
editor: p,
|
|
2624
2637
|
EditorContent: E,
|
|
2625
|
-
isLoading:
|
|
2626
|
-
initError:
|
|
2627
|
-
retry:
|
|
2638
|
+
isLoading: ee,
|
|
2639
|
+
initError: D,
|
|
2640
|
+
retry: O,
|
|
2628
2641
|
showLinkDialog: m,
|
|
2629
2642
|
linkUrl: h,
|
|
2630
2643
|
linkDialogRef: g,
|
|
@@ -2642,20 +2655,20 @@ function Pi(e) {
|
|
|
2642
2655
|
}
|
|
2643
2656
|
//#endregion
|
|
2644
2657
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2645
|
-
var
|
|
2658
|
+
var Ri = { class: "tpl:w-full" }, zi = {
|
|
2646
2659
|
key: 0,
|
|
2647
2660
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
|
|
2648
|
-
},
|
|
2661
|
+
}, Bi = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Vi = {
|
|
2649
2662
|
key: 1,
|
|
2650
2663
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
|
|
2651
|
-
},
|
|
2664
|
+
}, Hi = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ui = {
|
|
2652
2665
|
key: 2,
|
|
2653
2666
|
class: "tpl:relative"
|
|
2654
|
-
},
|
|
2667
|
+
}, Wi = ["innerHTML"], Gi = {
|
|
2655
2668
|
key: 0,
|
|
2656
2669
|
class: "tpl:absolute tpl:inset-0 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:rounded tpl:backdrop-blur-[2px]",
|
|
2657
2670
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
2658
|
-
},
|
|
2671
|
+
}, Ki = /* @__PURE__ */ B({
|
|
2659
2672
|
__name: "CustomBlock",
|
|
2660
2673
|
props: {
|
|
2661
2674
|
block: {},
|
|
@@ -2689,27 +2702,27 @@ var Fi = { class: "tpl:w-full" }, Ii = {
|
|
|
2689
2702
|
g();
|
|
2690
2703
|
}), H(() => n.block.fieldValues, () => {
|
|
2691
2704
|
_();
|
|
2692
|
-
}, { deep: !0 }), (e, t) => (f(), k("div",
|
|
2705
|
+
}, { deep: !0 }), (e, t) => (f(), k("div", Ri, [u.value ? c.value ? (f(), k("div", Vi, [V(j(li), {
|
|
2693
2706
|
size: 24,
|
|
2694
2707
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
2695
|
-
}),
|
|
2708
|
+
}), I("span", Hi, D(j(a).customBlocks.renderError), 1)])) : (f(), k("div", Ui, [I("div", { innerHTML: s.value }, null, 8, Wi), j(h) && j(m) ? (f(), k("div", Gi, [j(d) ? (f(), N(Si, {
|
|
2696
2709
|
key: 1,
|
|
2697
2710
|
class: "tpl:w-48"
|
|
2698
2711
|
})) : (f(), k("button", {
|
|
2699
2712
|
key: 0,
|
|
2700
2713
|
type: "button",
|
|
2701
2714
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-sm tpl:transition-all tpl:duration-150 hover:tpl:border-[var(--tpl-primary)] hover:tpl:shadow-md tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
2702
|
-
onClick: t[0] ||=
|
|
2703
|
-
}, [l.value?.icon ? (f(),
|
|
2715
|
+
onClick: t[0] ||= M((...e) => j(p) && j(p)(...e), ["stop"])
|
|
2716
|
+
}, [l.value?.icon ? (f(), N(_i, {
|
|
2704
2717
|
key: 0,
|
|
2705
2718
|
icon: l.value.icon,
|
|
2706
2719
|
size: 16
|
|
2707
|
-
}, null, 8, ["icon"])) : A("", !0), z(" " +
|
|
2720
|
+
}, null, 8, ["icon"])) : A("", !0), z(" " + D(l.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : A("", !0)])) : (f(), k("div", zi, [V(j(Qr), {
|
|
2708
2721
|
size: 24,
|
|
2709
2722
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
2710
|
-
}),
|
|
2723
|
+
}), I("span", Bi, D(j(a).customBlocks.definitionNotFound), 1)]))]));
|
|
2711
2724
|
}
|
|
2712
|
-
}),
|
|
2725
|
+
}), qi = { class: "tpl:w-full" }, Ji = /* @__PURE__ */ B({
|
|
2713
2726
|
__name: "DividerBlock",
|
|
2714
2727
|
props: {
|
|
2715
2728
|
block: {},
|
|
@@ -2721,18 +2734,18 @@ var Fi = { class: "tpl:w-full" }, Ii = {
|
|
|
2721
2734
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
2722
2735
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
2723
2736
|
}));
|
|
2724
|
-
return (e, t) => (f(), k("div",
|
|
2737
|
+
return (e, t) => (f(), k("div", qi, [I("hr", {
|
|
2725
2738
|
class: "tpl:m-0 tpl:border-none",
|
|
2726
|
-
style:
|
|
2739
|
+
style: L(n.value)
|
|
2727
2740
|
}, null, 4)]));
|
|
2728
2741
|
}
|
|
2729
|
-
}),
|
|
2742
|
+
}), Yi = { class: "tpl:w-full" }, Xi = { class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]" }, Zi = {
|
|
2730
2743
|
key: 0,
|
|
2731
2744
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
2732
|
-
},
|
|
2745
|
+
}, Qi = {
|
|
2733
2746
|
key: 1,
|
|
2734
2747
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
2735
|
-
},
|
|
2748
|
+
}, $i = /* @__PURE__ */ B({
|
|
2736
2749
|
__name: "HtmlBlock",
|
|
2737
2750
|
props: {
|
|
2738
2751
|
block: {},
|
|
@@ -2740,18 +2753,18 @@ var Fi = { class: "tpl:w-full" }, Ii = {
|
|
|
2740
2753
|
},
|
|
2741
2754
|
setup(e) {
|
|
2742
2755
|
let t = e, { t: n } = Y(), r = O(() => t.block.content.trim().length > 0);
|
|
2743
|
-
return (e, t) => (f(), k("div",
|
|
2756
|
+
return (e, t) => (f(), k("div", Yi, [I("div", Xi, [V(j(Lr), {
|
|
2744
2757
|
size: 24,
|
|
2745
2758
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
2746
|
-
}), r.value ? (f(), k("span",
|
|
2759
|
+
}), r.value ? (f(), k("span", Zi, D(j(n).html.preview), 1)) : (f(), k("span", Qi, D(j(n).html.empty), 1))])]));
|
|
2747
2760
|
}
|
|
2748
|
-
}),
|
|
2761
|
+
}), ea = ["href"], ta = ["src", "alt"], na = ["src", "alt"], ra = {
|
|
2749
2762
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2750
2763
|
style: { opacity: "0.7" }
|
|
2751
|
-
},
|
|
2764
|
+
}, ia = ["href"], aa = ["src", "alt"], oa = ["src", "alt"], sa = {
|
|
2752
2765
|
key: 3,
|
|
2753
2766
|
class: "tpl:flex tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
2754
|
-
},
|
|
2767
|
+
}, ca = ["aria-label"], la = { key: 1 }, ua = /* @__PURE__ */ B({
|
|
2755
2768
|
__name: "ImageBlock",
|
|
2756
2769
|
props: {
|
|
2757
2770
|
block: {},
|
|
@@ -2759,7 +2772,7 @@ var Fi = { class: "tpl:w-full" }, Ii = {
|
|
|
2759
2772
|
},
|
|
2760
2773
|
emits: ["update"],
|
|
2761
2774
|
setup(e, { emit: t }) {
|
|
2762
|
-
let n = e, r = t, { t: i } = Y(), { syntax: a } =
|
|
2775
|
+
let n = e, r = t, { t: i } = Y(), { syntax: a } = ki(), o = v(Vn, null), s = O(() => !!o);
|
|
2763
2776
|
async function c() {
|
|
2764
2777
|
let e = await o?.({ accept: ["images"] });
|
|
2765
2778
|
if (e) {
|
|
@@ -2776,66 +2789,66 @@ var Fi = { class: "tpl:w-full" }, Ii = {
|
|
|
2776
2789
|
})), d = O(() => _t(n.block.src, a));
|
|
2777
2790
|
return (t, n) => (f(), k("div", {
|
|
2778
2791
|
class: "tpl:w-full",
|
|
2779
|
-
style:
|
|
2792
|
+
style: L(l.value)
|
|
2780
2793
|
}, [e.block.src && d.value && e.block.placeholderUrl ? (f(), k(R, { key: 0 }, [e.block.linkUrl ? (f(), k("a", {
|
|
2781
2794
|
key: 0,
|
|
2782
2795
|
href: e.block.linkUrl,
|
|
2783
2796
|
target: "_blank",
|
|
2784
2797
|
rel: "noopener noreferrer",
|
|
2785
|
-
onClick: n[0] ||=
|
|
2786
|
-
}, [
|
|
2798
|
+
onClick: n[0] ||= M(() => {}, ["prevent"])
|
|
2799
|
+
}, [I("img", {
|
|
2787
2800
|
class: "tpl:border-0",
|
|
2788
2801
|
loading: "lazy",
|
|
2789
2802
|
src: e.block.placeholderUrl,
|
|
2790
|
-
alt: e.block.alt ||
|
|
2791
|
-
style:
|
|
2792
|
-
}, null, 12,
|
|
2803
|
+
alt: e.block.alt || j(i).image.altTextPlaceholder,
|
|
2804
|
+
style: L(u.value)
|
|
2805
|
+
}, null, 12, ta)], 8, ea)) : (f(), k("img", {
|
|
2793
2806
|
key: 1,
|
|
2794
2807
|
class: "tpl:border-0",
|
|
2795
2808
|
src: e.block.placeholderUrl,
|
|
2796
2809
|
alt: e.block.alt,
|
|
2797
|
-
style:
|
|
2798
|
-
}, null, 12,
|
|
2810
|
+
style: L(u.value)
|
|
2811
|
+
}, null, 12, na))], 64)) : e.block.src && d.value ? (f(), k("div", {
|
|
2799
2812
|
key: 1,
|
|
2800
2813
|
class: "tpl:!flex tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
2801
|
-
style:
|
|
2802
|
-
}, [V(
|
|
2814
|
+
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
2815
|
+
}, [V(j(Kr), {
|
|
2803
2816
|
size: 32,
|
|
2804
2817
|
"stroke-width": 1.5,
|
|
2805
2818
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2806
2819
|
style: { opacity: "0.5" }
|
|
2807
|
-
}),
|
|
2820
|
+
}), I("span", ra, D(e.block.src), 1)], 4)) : e.block.src ? (f(), k(R, { key: 2 }, [e.block.linkUrl ? (f(), k("a", {
|
|
2808
2821
|
key: 0,
|
|
2809
2822
|
href: e.block.linkUrl,
|
|
2810
2823
|
target: "_blank",
|
|
2811
2824
|
rel: "noopener noreferrer",
|
|
2812
|
-
onClick: n[1] ||=
|
|
2813
|
-
}, [
|
|
2825
|
+
onClick: n[1] ||= M(() => {}, ["prevent"])
|
|
2826
|
+
}, [I("img", {
|
|
2814
2827
|
class: "tpl:border-0",
|
|
2815
2828
|
loading: "lazy",
|
|
2816
2829
|
src: e.block.src,
|
|
2817
|
-
alt: e.block.alt ||
|
|
2818
|
-
style:
|
|
2819
|
-
}, null, 12,
|
|
2830
|
+
alt: e.block.alt || j(i).image.altTextPlaceholder,
|
|
2831
|
+
style: L(u.value)
|
|
2832
|
+
}, null, 12, aa)], 8, ia)) : (f(), k("img", {
|
|
2820
2833
|
key: 1,
|
|
2821
2834
|
class: "tpl:border-0",
|
|
2822
2835
|
src: e.block.src,
|
|
2823
2836
|
alt: e.block.alt,
|
|
2824
|
-
style:
|
|
2825
|
-
}, null, 12,
|
|
2837
|
+
style: L(u.value)
|
|
2838
|
+
}, null, 12, oa))], 64)) : (f(), k("div", sa, [s.value ? (f(), k("button", {
|
|
2826
2839
|
key: 0,
|
|
2827
|
-
"aria-label":
|
|
2840
|
+
"aria-label": j(i).image.browseMedia,
|
|
2828
2841
|
class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
2829
|
-
onClick:
|
|
2830
|
-
}, [V(
|
|
2842
|
+
onClick: M(c, ["stop"])
|
|
2843
|
+
}, [V(j(Kr), {
|
|
2831
2844
|
size: 14,
|
|
2832
2845
|
"stroke-width": 1.5
|
|
2833
|
-
}), z(" " +
|
|
2846
|
+
}), z(" " + D(j(i).image.browseMedia), 1)], 8, ca)) : (f(), k("span", la, D(j(i).image.clickToAdd), 1))]))], 4));
|
|
2834
2847
|
}
|
|
2835
|
-
}),
|
|
2848
|
+
}), da = { class: "tpl:w-full" }, fa = ["href"], pa = {
|
|
2836
2849
|
key: 1,
|
|
2837
2850
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
2838
|
-
},
|
|
2851
|
+
}, ma = /* @__PURE__ */ B({
|
|
2839
2852
|
__name: "MenuBlock",
|
|
2840
2853
|
props: {
|
|
2841
2854
|
block: {},
|
|
@@ -2854,31 +2867,31 @@ var Fi = { class: "tpl:w-full" }, Ii = {
|
|
|
2854
2867
|
function a(e) {
|
|
2855
2868
|
return e || t.block.linkColor || t.block.color;
|
|
2856
2869
|
}
|
|
2857
|
-
return (t, o) => (f(), k("div",
|
|
2870
|
+
return (t, o) => (f(), k("div", da, [i.value ? (f(), k("div", {
|
|
2858
2871
|
key: 0,
|
|
2859
|
-
style:
|
|
2860
|
-
}, [(f(!0), k(R, null, h(e.block.items, (t, n) => (f(), k(R, { key: t.id }, [
|
|
2872
|
+
style: L(r.value)
|
|
2873
|
+
}, [(f(!0), k(R, null, h(e.block.items, (t, n) => (f(), k(R, { key: t.id }, [I("a", {
|
|
2861
2874
|
href: t.url || "#",
|
|
2862
2875
|
class: "tpl:cursor-default tpl:no-underline",
|
|
2863
|
-
style:
|
|
2876
|
+
style: L({
|
|
2864
2877
|
color: a(t.color),
|
|
2865
2878
|
fontWeight: t.bold ? "bold" : "normal",
|
|
2866
2879
|
textDecoration: t.underline ? "underline" : "none"
|
|
2867
2880
|
}),
|
|
2868
|
-
onClick: o[0] ||=
|
|
2869
|
-
},
|
|
2881
|
+
onClick: o[0] ||= M(() => {}, ["prevent"])
|
|
2882
|
+
}, D(t.text || "..."), 13, fa), n < e.block.items.length - 1 ? (f(), k("span", {
|
|
2870
2883
|
key: 0,
|
|
2871
|
-
style:
|
|
2884
|
+
style: L({
|
|
2872
2885
|
color: e.block.separatorColor,
|
|
2873
2886
|
padding: `0 ${e.block.spacing}px`
|
|
2874
2887
|
})
|
|
2875
|
-
},
|
|
2888
|
+
}, D(e.block.separator), 5)) : A("", !0)], 64))), 128))], 4)) : (f(), k("div", pa, [V(j(Xr), { size: 16 }), I("span", null, D(j(n).menu.addLinks), 1)]))]));
|
|
2876
2889
|
}
|
|
2877
2890
|
});
|
|
2878
2891
|
//#endregion
|
|
2879
2892
|
//#region src/composables/useEditableTextBlock.ts
|
|
2880
|
-
function
|
|
2881
|
-
let t = v(Ln, []), { syntax: n } =
|
|
2893
|
+
function ha(e) {
|
|
2894
|
+
let t = v(Ln, []), { syntax: n } = ki(), r = O(() => bt(gt(e(), t), n)), i = C(!1), a = C(null), { top: o, left: s } = xn(a), c = O(() => ({
|
|
2882
2895
|
top: o.value - 8,
|
|
2883
2896
|
left: s.value
|
|
2884
2897
|
}));
|
|
@@ -2899,24 +2912,24 @@ function fa(e) {
|
|
|
2899
2912
|
}
|
|
2900
2913
|
//#endregion
|
|
2901
2914
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2902
|
-
var
|
|
2915
|
+
var ga = ["innerHTML"], _a = /* @__PURE__ */ B({
|
|
2903
2916
|
__name: "ParagraphBlock",
|
|
2904
2917
|
props: {
|
|
2905
2918
|
block: {},
|
|
2906
2919
|
viewport: {}
|
|
2907
2920
|
},
|
|
2908
2921
|
setup(e) {
|
|
2909
|
-
let t = e, n = E(() => import("./ParagraphEditor-
|
|
2922
|
+
let t = e, n = E(() => import("./ParagraphEditor-DlpZX_x4.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = ha(() => t.block.content);
|
|
2910
2923
|
return (t, l) => (f(), k("div", {
|
|
2911
2924
|
ref_key: "blockRef",
|
|
2912
2925
|
ref: i,
|
|
2913
2926
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
2914
|
-
onDblclick: l[0] ||= (...e) =>
|
|
2915
|
-
}, [
|
|
2927
|
+
onDblclick: l[0] ||= (...e) => j(s) && j(s)(...e)
|
|
2928
|
+
}, [j(r) ? (f(), N(j(n), {
|
|
2916
2929
|
key: 0,
|
|
2917
2930
|
block: e.block,
|
|
2918
|
-
"toolbar-position":
|
|
2919
|
-
onDone:
|
|
2931
|
+
"toolbar-position": j(a),
|
|
2932
|
+
onDone: j(c)
|
|
2920
2933
|
}, null, 8, [
|
|
2921
2934
|
"block",
|
|
2922
2935
|
"toolbar-position",
|
|
@@ -2924,20 +2937,20 @@ var pa = ["innerHTML"], ma = /* @__PURE__ */ B({
|
|
|
2924
2937
|
])) : (f(), k("div", {
|
|
2925
2938
|
key: 1,
|
|
2926
2939
|
class: "tpl-text-content tpl:outline-none [&_a]:tpl:underline [&_li]:tpl:my-1 [&_ol]:tpl:my-2 [&_ol]:tpl:pl-6 [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0 [&_s]:tpl:line-through [&_sub]:tpl:align-sub [&_sub]:tpl:text-[0.75em] [&_sup]:tpl:align-super [&_sup]:tpl:text-[0.75em] [&_ul]:tpl:my-2 [&_ul]:tpl:pl-6",
|
|
2927
|
-
innerHTML:
|
|
2928
|
-
}, null, 8,
|
|
2940
|
+
innerHTML: j(o)
|
|
2941
|
+
}, null, 8, ga))], 544));
|
|
2929
2942
|
}
|
|
2930
2943
|
});
|
|
2931
2944
|
//#endregion
|
|
2932
2945
|
//#region src/utils/blockComponentResolver.ts
|
|
2933
|
-
function
|
|
2946
|
+
function va(e, t, n) {
|
|
2934
2947
|
if (t) {
|
|
2935
2948
|
let n = t.getComponent(e);
|
|
2936
2949
|
if (n) return n;
|
|
2937
2950
|
}
|
|
2938
2951
|
return n[e.type] ?? null;
|
|
2939
2952
|
}
|
|
2940
|
-
function
|
|
2953
|
+
function ya(e) {
|
|
2941
2954
|
let { padding: t, margin: n, backgroundColor: r } = e.styles;
|
|
2942
2955
|
return {
|
|
2943
2956
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
@@ -2947,20 +2960,20 @@ function ga(e) {
|
|
|
2947
2960
|
}
|
|
2948
2961
|
//#endregion
|
|
2949
2962
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
2950
|
-
var
|
|
2963
|
+
var ba = ["data-block-id", "data-block-type"], xa = ["aria-label"], Sa = [
|
|
2951
2964
|
"aria-label",
|
|
2952
2965
|
"aria-pressed",
|
|
2953
2966
|
"title"
|
|
2954
|
-
],
|
|
2967
|
+
], Ca = ["aria-label", "title"], wa = ["aria-label", "title"], Ta = ["aria-label", "title"], Ea = {
|
|
2955
2968
|
key: 1,
|
|
2956
2969
|
class: "tpl-block-hidden-overlay tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[5] tpl:flex tpl:items-center tpl:justify-center tpl:rounded-sm"
|
|
2957
|
-
},
|
|
2970
|
+
}, Da = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, Oa = {
|
|
2958
2971
|
key: 2,
|
|
2959
2972
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2960
|
-
},
|
|
2973
|
+
}, ka = ["aria-label", "title"], Aa = {
|
|
2961
2974
|
key: 3,
|
|
2962
2975
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
2963
|
-
},
|
|
2976
|
+
}, ja = ["aria-label"], Ma = /* @__PURE__ */ vi(/* @__PURE__ */ B({
|
|
2964
2977
|
__name: "BlockWrapper",
|
|
2965
2978
|
props: {
|
|
2966
2979
|
block: {},
|
|
@@ -2970,7 +2983,7 @@ var _a = ["data-block-id", "data-block-type"], va = ["aria-label"], ya = [
|
|
|
2970
2983
|
},
|
|
2971
2984
|
emits: ["select"],
|
|
2972
2985
|
setup(e, { emit: t }) {
|
|
2973
|
-
let n = E(() => import("./BlockA11yBadge-
|
|
2986
|
+
let n = E(() => import("./BlockA11yBadge-BfuH2Hrg.js")), r = e, i = t, { t: a, format: s } = Y(), c = v(Gn, null), l = C(null), u = O(() => c?.liftedBlockId.value === r.block.id), d = O(() => u.value ? s(a.blockActions.dragLifted, { block: r.block.type }) : a.blockActions.drag);
|
|
2974
2987
|
async function p() {
|
|
2975
2988
|
await m(), l.value?.focus();
|
|
2976
2989
|
}
|
|
@@ -2997,7 +3010,7 @@ var _a = ["data-block-id", "data-block-type"], va = ["aria-label"], ya = [
|
|
|
2997
3010
|
desktop: a.viewport.desktop,
|
|
2998
3011
|
tablet: a.viewport.tablet,
|
|
2999
3012
|
mobile: a.viewport.mobile
|
|
3000
|
-
}[r.viewport] ?? r.viewport : ""), y = O(() => !!r.block.displayCondition), b = v(kn, null), x = v(An, null), S = v(Wn, {}), w = O(() => !!S.savedModules),
|
|
3013
|
+
}[r.viewport] ?? r.viewport : ""), y = O(() => !!r.block.displayCondition), b = v(kn, null), x = v(An, null), S = v(Wn, {}), w = O(() => !!S.savedModules), T = O(() => S.comments?.getBlockCount(r.block.id) ?? 0), ee = O(() => ya(r.block));
|
|
3001
3014
|
function te(e) {
|
|
3002
3015
|
r.previewMode || (e.stopPropagation(), i("select"));
|
|
3003
3016
|
}
|
|
@@ -3007,148 +3020,148 @@ var _a = ["data-block-id", "data-block-type"], va = ["aria-label"], ya = [
|
|
|
3007
3020
|
function re() {
|
|
3008
3021
|
b?.duplicateBlock(r.block);
|
|
3009
3022
|
}
|
|
3010
|
-
function
|
|
3023
|
+
function N() {
|
|
3011
3024
|
S.savedModules?.openSaveDialog(r.block.id);
|
|
3012
3025
|
}
|
|
3013
3026
|
function ie() {
|
|
3014
3027
|
x?.toggleBlock(r.block.id);
|
|
3015
3028
|
}
|
|
3016
3029
|
return (t, r) => (f(), k("div", {
|
|
3017
|
-
class:
|
|
3030
|
+
class: F(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow tpl:duration-150", {
|
|
3018
3031
|
"tpl-block--selected": e.isSelected,
|
|
3019
3032
|
"tpl-block--idle": !e.isSelected,
|
|
3020
3033
|
"tpl-block--lifted": u.value
|
|
3021
3034
|
}]),
|
|
3022
|
-
style:
|
|
3035
|
+
style: L(ee.value),
|
|
3023
3036
|
"data-block-id": e.block.id,
|
|
3024
3037
|
"data-block-type": e.block.type,
|
|
3025
3038
|
draggable: "false",
|
|
3026
3039
|
onClick: te
|
|
3027
3040
|
}, [
|
|
3028
|
-
V(
|
|
3041
|
+
V(j(n), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
3029
3042
|
e.isSelected ? (f(), k("div", {
|
|
3030
3043
|
key: 0,
|
|
3031
3044
|
role: "toolbar",
|
|
3032
|
-
"aria-label":
|
|
3045
|
+
"aria-label": j(a).blockActions.drag,
|
|
3033
3046
|
class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:-right-2 tpl:top-1/2 tpl:z-10 tpl:flex tpl:-translate-y-1/2 tpl:translate-x-full tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
3034
3047
|
}, [
|
|
3035
|
-
|
|
3048
|
+
I("button", {
|
|
3036
3049
|
ref_key: "dragButtonRef",
|
|
3037
3050
|
ref: l,
|
|
3038
3051
|
class: "tpl-block-btn tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-grab tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150 tpl:active:cursor-grabbing",
|
|
3039
3052
|
"aria-label": d.value,
|
|
3040
3053
|
"aria-pressed": u.value,
|
|
3041
3054
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
3042
|
-
title:
|
|
3055
|
+
title: j(a).blockActions.drag,
|
|
3043
3056
|
onKeydown: h
|
|
3044
|
-
}, [V(
|
|
3057
|
+
}, [V(j(Wr), {
|
|
3045
3058
|
size: 14,
|
|
3046
3059
|
"stroke-width": 1.5
|
|
3047
|
-
})], 40,
|
|
3048
|
-
|
|
3060
|
+
})], 40, Sa),
|
|
3061
|
+
I("button", {
|
|
3049
3062
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
|
|
3050
|
-
"aria-label":
|
|
3051
|
-
title:
|
|
3052
|
-
onClick:
|
|
3053
|
-
}, [V(
|
|
3063
|
+
"aria-label": j(a).blockActions.duplicate,
|
|
3064
|
+
title: j(a).blockActions.duplicate,
|
|
3065
|
+
onClick: M(re, ["stop"])
|
|
3066
|
+
}, [V(j(Rr), {
|
|
3054
3067
|
size: 14,
|
|
3055
3068
|
"stroke-width": 1.5
|
|
3056
|
-
})], 8,
|
|
3069
|
+
})], 8, Ca),
|
|
3057
3070
|
w.value ? (f(), k("button", {
|
|
3058
3071
|
key: 0,
|
|
3059
3072
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
|
|
3060
|
-
"aria-label":
|
|
3061
|
-
title:
|
|
3062
|
-
onClick:
|
|
3063
|
-
}, [V(
|
|
3073
|
+
"aria-label": j(a).blockActions.saveAsModule,
|
|
3074
|
+
title: j(a).blockActions.saveAsModule,
|
|
3075
|
+
onClick: M(N, ["stop"])
|
|
3076
|
+
}, [V(j(Dr), {
|
|
3064
3077
|
size: 14,
|
|
3065
3078
|
"stroke-width": 1.5
|
|
3066
|
-
})], 8,
|
|
3067
|
-
|
|
3079
|
+
})], 8, wa)) : A("", !0),
|
|
3080
|
+
I("button", {
|
|
3068
3081
|
class: "tpl-block-action-btn tpl-block-delete-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
|
|
3069
|
-
"aria-label":
|
|
3070
|
-
title:
|
|
3071
|
-
onClick:
|
|
3072
|
-
}, [V(
|
|
3082
|
+
"aria-label": j(a).blockActions.delete,
|
|
3083
|
+
title: j(a).blockActions.delete,
|
|
3084
|
+
onClick: M(ne, ["stop"])
|
|
3085
|
+
}, [V(j(ci), {
|
|
3073
3086
|
size: 14,
|
|
3074
3087
|
"stroke-width": 1.5
|
|
3075
|
-
})], 8,
|
|
3076
|
-
], 8,
|
|
3077
|
-
g.value ? (f(), k("div",
|
|
3088
|
+
})], 8, Ta)
|
|
3089
|
+
], 8, xa)) : A("", !0),
|
|
3090
|
+
g.value ? (f(), k("div", Ea, [I("span", Da, [V(j(zr), {
|
|
3078
3091
|
size: 12,
|
|
3079
3092
|
"stroke-width": 1.5
|
|
3080
|
-
}), z(" " +
|
|
3081
|
-
y.value && !g.value ? (f(), k("div",
|
|
3093
|
+
}), z(" " + D(j(s)(j(a).blockActions.hiddenOnViewport, { viewport: _.value })), 1)])])) : A("", !0),
|
|
3094
|
+
y.value && !g.value ? (f(), k("div", Oa, [I("button", {
|
|
3082
3095
|
class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
3083
|
-
"aria-label":
|
|
3096
|
+
"aria-label": j(a).blockActions.conditionToggle,
|
|
3084
3097
|
title: e.block.displayCondition?.label,
|
|
3085
|
-
onClick:
|
|
3086
|
-
}, [V(
|
|
3098
|
+
onClick: M(ie, ["stop"])
|
|
3099
|
+
}, [V(j(Ur), {
|
|
3087
3100
|
size: 12,
|
|
3088
3101
|
"stroke-width": 2
|
|
3089
|
-
})], 8,
|
|
3090
|
-
|
|
3102
|
+
})], 8, ka)])) : A("", !0),
|
|
3103
|
+
T.value > 0 && !g.value ? (f(), k("div", Aa, [I("button", {
|
|
3091
3104
|
class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]",
|
|
3092
|
-
"aria-label":
|
|
3093
|
-
onClick: r[0] ||=
|
|
3094
|
-
}, [V(
|
|
3105
|
+
"aria-label": j(s)(j(a).blockActions.comments, { count: String(T.value) }),
|
|
3106
|
+
onClick: r[0] ||= M((t) => j(S).comments?.openForBlock(e.block.id), ["stop"])
|
|
3107
|
+
}, [V(j(Yr), {
|
|
3095
3108
|
size: 12,
|
|
3096
3109
|
"stroke-width": 2.5
|
|
3097
|
-
}), z(" " +
|
|
3110
|
+
}), z(" " + D(T.value), 1)], 8, ja)])) : A("", !0),
|
|
3098
3111
|
o(t.$slots, "default", {}, void 0, !0)
|
|
3099
|
-
], 14,
|
|
3112
|
+
], 14, ba));
|
|
3100
3113
|
}
|
|
3101
3114
|
}), [["__scopeId", "data-v-850614e7"]]);
|
|
3102
3115
|
//#endregion
|
|
3103
3116
|
//#region src/utils/unwrapParagraph.ts
|
|
3104
|
-
function
|
|
3117
|
+
function Na(e) {
|
|
3105
3118
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
3106
3119
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
3107
3120
|
}
|
|
3108
3121
|
//#endregion
|
|
3109
3122
|
//#region src/components/blocks/TitleBlock.vue
|
|
3110
|
-
var
|
|
3123
|
+
var Pa = /* @__PURE__ */ B({
|
|
3111
3124
|
__name: "TitleBlock",
|
|
3112
3125
|
props: {
|
|
3113
3126
|
block: {},
|
|
3114
3127
|
viewport: {}
|
|
3115
3128
|
},
|
|
3116
3129
|
setup(e) {
|
|
3117
|
-
let t = e, n = E(() => import("./TitleEditor-
|
|
3130
|
+
let t = e, n = E(() => import("./TitleEditor-Kerz6US8.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = ha(() => t.block.content), l = O(() => {
|
|
3118
3131
|
let e = {
|
|
3119
3132
|
fontSize: `${pe[t.block.level]}px`,
|
|
3120
3133
|
color: t.block.color,
|
|
3121
3134
|
textAlign: t.block.textAlign
|
|
3122
3135
|
};
|
|
3123
3136
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
3124
|
-
}), u = O(() => `h${t.block.level}`), p = O(() =>
|
|
3137
|
+
}), u = O(() => `h${t.block.level}`), p = O(() => Na(o.value));
|
|
3125
3138
|
return (t, o) => (f(), k("div", {
|
|
3126
3139
|
ref_key: "blockRef",
|
|
3127
3140
|
ref: i,
|
|
3128
3141
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
3129
|
-
style:
|
|
3130
|
-
onDblclick: o[0] ||= (...e) =>
|
|
3131
|
-
}, [
|
|
3142
|
+
style: L(l.value),
|
|
3143
|
+
onDblclick: o[0] ||= (...e) => j(s) && j(s)(...e)
|
|
3144
|
+
}, [j(r) ? (f(), N(j(n), {
|
|
3132
3145
|
key: 0,
|
|
3133
3146
|
block: e.block,
|
|
3134
|
-
"toolbar-position":
|
|
3135
|
-
onDone:
|
|
3147
|
+
"toolbar-position": j(a),
|
|
3148
|
+
onDone: j(c)
|
|
3136
3149
|
}, null, 8, [
|
|
3137
3150
|
"block",
|
|
3138
3151
|
"toolbar-position",
|
|
3139
3152
|
"onDone"
|
|
3140
|
-
])) : (f(),
|
|
3153
|
+
])) : (f(), N(d(u.value), {
|
|
3141
3154
|
key: 1,
|
|
3142
3155
|
class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-tight tpl:outline-none [&_a]:tpl:underline [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0",
|
|
3143
3156
|
style: { color: "inherit" },
|
|
3144
3157
|
innerHTML: p.value
|
|
3145
3158
|
}, null, 8, ["innerHTML"]))], 36));
|
|
3146
3159
|
}
|
|
3147
|
-
}),
|
|
3160
|
+
}), Fa = { class: "tpl:w-full" }, Ia = { class: "tpl:flex tpl:gap-0" }, La = {
|
|
3148
3161
|
key: 0,
|
|
3149
3162
|
"data-testid": "section-drop-hint",
|
|
3150
3163
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
3151
|
-
},
|
|
3164
|
+
}, Ra = /* @__PURE__ */ B({
|
|
3152
3165
|
__name: "SectionBlock",
|
|
3153
3166
|
props: {
|
|
3154
3167
|
block: {},
|
|
@@ -3156,12 +3169,12 @@ var ja = /* @__PURE__ */ B({
|
|
|
3156
3169
|
},
|
|
3157
3170
|
setup(e) {
|
|
3158
3171
|
let t = {
|
|
3159
|
-
title:
|
|
3160
|
-
paragraph:
|
|
3161
|
-
image:
|
|
3162
|
-
button:
|
|
3163
|
-
divider:
|
|
3164
|
-
custom:
|
|
3172
|
+
title: Pa,
|
|
3173
|
+
paragraph: _a,
|
|
3174
|
+
image: ua,
|
|
3175
|
+
button: _r,
|
|
3176
|
+
divider: Ji,
|
|
3177
|
+
custom: Ki
|
|
3165
3178
|
}, n = e, { t: r } = Y(), i = J(Dn, "SectionBlock"), a = v(An, null), o = v(Fn, null), s = O(() => {
|
|
3166
3179
|
switch (n.block.columns) {
|
|
3167
3180
|
case "2": return ["50%", "50%"];
|
|
@@ -3188,7 +3201,7 @@ var ja = /* @__PURE__ */ B({
|
|
|
3188
3201
|
r[e] = t, i.updateBlock(n.block.id, { children: r });
|
|
3189
3202
|
}
|
|
3190
3203
|
function m(e) {
|
|
3191
|
-
return
|
|
3204
|
+
return va(e, o, t);
|
|
3192
3205
|
}
|
|
3193
3206
|
function g(e, t) {
|
|
3194
3207
|
e.type === "custom" && i.updateBlock(e.id, {
|
|
@@ -3196,11 +3209,11 @@ var ja = /* @__PURE__ */ B({
|
|
|
3196
3209
|
dataSourceFetched: t.dataSourceFetched
|
|
3197
3210
|
});
|
|
3198
3211
|
}
|
|
3199
|
-
return (t, n) => (f(), k("div",
|
|
3212
|
+
return (t, n) => (f(), k("div", Fa, [I("div", Ia, [(f(!0), k(R, null, h(l.value, (t, n) => (f(), k("div", {
|
|
3200
3213
|
key: n,
|
|
3201
|
-
class:
|
|
3202
|
-
style:
|
|
3203
|
-
}, [V(
|
|
3214
|
+
class: F(["tpl:relative tpl:min-h-[60px] tpl:rounded", u(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3215
|
+
style: L({ width: s.value[n] })
|
|
3216
|
+
}, [V(j(ce), {
|
|
3204
3217
|
"model-value": u(n),
|
|
3205
3218
|
group: {
|
|
3206
3219
|
name: "blocks",
|
|
@@ -3209,17 +3222,19 @@ var ja = /* @__PURE__ */ B({
|
|
|
3209
3222
|
},
|
|
3210
3223
|
animation: 150,
|
|
3211
3224
|
"ghost-class": "tpl-ghost",
|
|
3225
|
+
"invert-swap": !0,
|
|
3226
|
+
"inverted-swap-threshold": .65,
|
|
3212
3227
|
"empty-insert-threshold": 20,
|
|
3213
3228
|
class: "tpl:min-h-[60px]",
|
|
3214
3229
|
"onUpdate:modelValue": (e) => p(n, e)
|
|
3215
3230
|
}, {
|
|
3216
|
-
default: b(() => [(f(!0), k(R, null, h(u(n), (t) => c((f(), k("div", { key: t.id }, [V(
|
|
3231
|
+
default: b(() => [(f(!0), k(R, null, h(u(n), (t) => c((f(), k("div", { key: t.id }, [V(Ma, {
|
|
3217
3232
|
block: t,
|
|
3218
|
-
"is-selected":
|
|
3233
|
+
"is-selected": j(i).state.selectedBlockId === t.id,
|
|
3219
3234
|
viewport: e.viewport,
|
|
3220
|
-
onSelect: (e) =>
|
|
3235
|
+
onSelect: (e) => j(i).selectBlock(t.id)
|
|
3221
3236
|
}, {
|
|
3222
|
-
default: b(() => [(f(),
|
|
3237
|
+
default: b(() => [(f(), N(d(m(t)), {
|
|
3223
3238
|
block: t,
|
|
3224
3239
|
viewport: e.viewport,
|
|
3225
3240
|
onFetchData: (e) => g(t, e)
|
|
@@ -3234,15 +3249,15 @@ var ja = /* @__PURE__ */ B({
|
|
|
3234
3249
|
"is-selected",
|
|
3235
3250
|
"viewport",
|
|
3236
3251
|
"onSelect"
|
|
3237
|
-
])])), [[se, !
|
|
3252
|
+
])])), [[se, !j(a)?.isHidden(t.id)]])), 128))]),
|
|
3238
3253
|
_: 2
|
|
3239
3254
|
}, 1032, [
|
|
3240
3255
|
"model-value",
|
|
3241
3256
|
"group",
|
|
3242
3257
|
"onUpdate:modelValue"
|
|
3243
|
-
]), u(n).length === 0 ? (f(), k("div",
|
|
3258
|
+
]), u(n).length === 0 ? (f(), k("div", La, [I("span", null, D(j(r).section.dropHere), 1)])) : A("", !0)], 6))), 128))])]));
|
|
3244
3259
|
}
|
|
3245
|
-
}),
|
|
3260
|
+
}), za = {
|
|
3246
3261
|
facebook: {
|
|
3247
3262
|
name: "Facebook",
|
|
3248
3263
|
color: "#1877F2",
|
|
@@ -3323,11 +3338,11 @@ var ja = /* @__PURE__ */ B({
|
|
|
3323
3338
|
color: "#1769FF",
|
|
3324
3339
|
path: "M22 7h-7V5h7v2zm1.726 10c-.442 1.297-2.029 3-5.101 3-3.074 0-5.564-1.729-5.564-5.675 0-3.91 2.325-5.92 5.466-5.92 3.082 0 4.964 1.782 5.375 4.426.078.506.109 1.188.095 2.14H15.97c.13 3.211 3.483 3.312 4.588 2.029h3.168zm-7.686-4h4.965c-.105-1.547-1.136-2.219-2.477-2.219-1.466 0-2.277.768-2.488 2.219zm-9.574 6.988H0V5.021h6.953c5.476.081 5.58 5.444 2.72 6.906 3.461 1.26 3.577 8.061-3.207 8.061zM3 11h3.584c2.508 0 2.906-3-.312-3H3v3zm3.391 3H3v3.016h3.341c3.055 0 2.868-3.016.05-3.016z"
|
|
3325
3340
|
}
|
|
3326
|
-
},
|
|
3341
|
+
}, Ba = {
|
|
3327
3342
|
small: 24,
|
|
3328
3343
|
medium: 32,
|
|
3329
3344
|
large: 48
|
|
3330
|
-
},
|
|
3345
|
+
}, Va = [
|
|
3331
3346
|
"facebook",
|
|
3332
3347
|
"twitter",
|
|
3333
3348
|
"instagram",
|
|
@@ -3344,11 +3359,11 @@ var ja = /* @__PURE__ */ B({
|
|
|
3344
3359
|
"github",
|
|
3345
3360
|
"dribbble",
|
|
3346
3361
|
"behance"
|
|
3347
|
-
],
|
|
3362
|
+
], Ha = [
|
|
3348
3363
|
"width",
|
|
3349
3364
|
"height",
|
|
3350
3365
|
"fill"
|
|
3351
|
-
],
|
|
3366
|
+
], Ua = ["d"], Wa = /* @__PURE__ */ B({
|
|
3352
3367
|
__name: "SocialIconSvg",
|
|
3353
3368
|
props: {
|
|
3354
3369
|
platform: {},
|
|
@@ -3356,7 +3371,7 @@ var ja = /* @__PURE__ */ B({
|
|
|
3356
3371
|
iconSize: {}
|
|
3357
3372
|
},
|
|
3358
3373
|
setup(e) {
|
|
3359
|
-
let t = e, n = O(() =>
|
|
3374
|
+
let t = e, n = O(() => za[t.platform]), r = O(() => Ba[t.iconSize]), i = O(() => {
|
|
3360
3375
|
let e = {
|
|
3361
3376
|
display: "inline-flex",
|
|
3362
3377
|
alignItems: "center",
|
|
@@ -3394,18 +3409,18 @@ var ja = /* @__PURE__ */ B({
|
|
|
3394
3409
|
default: return e;
|
|
3395
3410
|
}
|
|
3396
3411
|
}), a = O(() => Math.floor(r.value * .6)), o = O(() => t.iconStyle === "outlined" ? n.value.color : "#ffffff");
|
|
3397
|
-
return (e, t) => (f(), k("span", { style:
|
|
3412
|
+
return (e, t) => (f(), k("span", { style: L(i.value) }, [(f(), k("svg", {
|
|
3398
3413
|
width: a.value,
|
|
3399
3414
|
height: a.value,
|
|
3400
3415
|
viewBox: "0 0 24 24",
|
|
3401
3416
|
fill: o.value,
|
|
3402
3417
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3403
|
-
}, [
|
|
3418
|
+
}, [I("path", { d: n.value.path }, null, 8, Ua)], 8, Ha))], 4));
|
|
3404
3419
|
}
|
|
3405
|
-
}),
|
|
3420
|
+
}), Ga = { class: "tpl:w-full" }, Ka = ["href"], qa = {
|
|
3406
3421
|
key: 1,
|
|
3407
3422
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
3408
|
-
},
|
|
3423
|
+
}, Ja = /* @__PURE__ */ B({
|
|
3409
3424
|
__name: "SocialIconsBlock",
|
|
3410
3425
|
props: {
|
|
3411
3426
|
block: {},
|
|
@@ -3418,15 +3433,15 @@ var ja = /* @__PURE__ */ B({
|
|
|
3418
3433
|
gap: `${t.block.spacing}px`,
|
|
3419
3434
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
3420
3435
|
})), i = O(() => t.block.icons.length > 0);
|
|
3421
|
-
return (t, a) => (f(), k("div",
|
|
3436
|
+
return (t, a) => (f(), k("div", Ga, [i.value ? (f(), k("div", {
|
|
3422
3437
|
key: 0,
|
|
3423
|
-
style:
|
|
3438
|
+
style: L(r.value)
|
|
3424
3439
|
}, [(f(!0), k(R, null, h(e.block.icons, (t) => (f(), k("a", {
|
|
3425
3440
|
key: t.id,
|
|
3426
3441
|
href: t.url || "#",
|
|
3427
3442
|
class: "tpl:cursor-default",
|
|
3428
|
-
onClick: a[0] ||=
|
|
3429
|
-
}, [V(
|
|
3443
|
+
onClick: a[0] ||= M(() => {}, ["prevent"])
|
|
3444
|
+
}, [V(Wa, {
|
|
3430
3445
|
platform: t.platform,
|
|
3431
3446
|
"icon-style": e.block.iconStyle,
|
|
3432
3447
|
"icon-size": e.block.iconSize
|
|
@@ -3434,16 +3449,16 @@ var ja = /* @__PURE__ */ B({
|
|
|
3434
3449
|
"platform",
|
|
3435
3450
|
"icon-style",
|
|
3436
3451
|
"icon-size"
|
|
3437
|
-
])], 8,
|
|
3452
|
+
])], 8, Ka))), 128))], 4)) : (f(), k("div", qa, [V(j(ri), { size: 16 }), I("span", null, D(j(n).social.addIcons), 1)]))]));
|
|
3438
3453
|
}
|
|
3439
|
-
}),
|
|
3454
|
+
}), Ya = { class: "tpl:w-full" }, Xa = {
|
|
3440
3455
|
key: 0,
|
|
3441
3456
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3442
3457
|
style: {
|
|
3443
3458
|
"background-color": "var(--tpl-bg-hover)",
|
|
3444
3459
|
color: "var(--tpl-text-dim)"
|
|
3445
3460
|
}
|
|
3446
|
-
},
|
|
3461
|
+
}, Za = /* @__PURE__ */ B({
|
|
3447
3462
|
__name: "SpacerBlock",
|
|
3448
3463
|
props: {
|
|
3449
3464
|
block: {},
|
|
@@ -3455,23 +3470,23 @@ var ja = /* @__PURE__ */ B({
|
|
|
3455
3470
|
minHeight: `${t.block.height}px`,
|
|
3456
3471
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3457
3472
|
}));
|
|
3458
|
-
return (t, i) => (f(), k("div",
|
|
3459
|
-
style:
|
|
3460
|
-
class:
|
|
3461
|
-
}, [
|
|
3473
|
+
return (t, i) => (f(), k("div", Ya, [I("div", {
|
|
3474
|
+
style: L(r.value),
|
|
3475
|
+
class: F(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !j(n).state.previewMode }])
|
|
3476
|
+
}, [j(n).state.previewMode ? A("", !0) : (f(), k("span", Xa, D(e.block.height) + "px ", 1))], 6)]));
|
|
3462
3477
|
}
|
|
3463
|
-
}),
|
|
3478
|
+
}), Qa = { class: "tpl:w-full" }, $a = { key: 0 }, eo = [
|
|
3464
3479
|
"aria-label",
|
|
3465
3480
|
"data-placeholder",
|
|
3466
3481
|
"onBlur"
|
|
3467
|
-
],
|
|
3482
|
+
], to = [
|
|
3468
3483
|
"aria-label",
|
|
3469
3484
|
"data-placeholder",
|
|
3470
3485
|
"onBlur"
|
|
3471
|
-
],
|
|
3486
|
+
], no = {
|
|
3472
3487
|
key: 1,
|
|
3473
3488
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
3474
|
-
},
|
|
3489
|
+
}, ro = /* @__PURE__ */ vi(/* @__PURE__ */ B({
|
|
3475
3490
|
__name: "TableBlock",
|
|
3476
3491
|
props: {
|
|
3477
3492
|
block: {},
|
|
@@ -3514,49 +3529,49 @@ var ja = /* @__PURE__ */ B({
|
|
|
3514
3529
|
} : n);
|
|
3515
3530
|
i.updateBlock(n.block.id, { rows: o });
|
|
3516
3531
|
}
|
|
3517
|
-
return (e, n) => (f(), k("div",
|
|
3532
|
+
return (e, n) => (f(), k("div", Qa, [a.value ? (f(), k("table", {
|
|
3518
3533
|
key: 0,
|
|
3519
|
-
style:
|
|
3534
|
+
style: L(o.value),
|
|
3520
3535
|
class: "tpl-table-editable"
|
|
3521
|
-
}, [u.value ? (f(), k("thead",
|
|
3536
|
+
}, [u.value ? (f(), k("thead", $a, [I("tr", null, [(f(!0), k(R, null, h(u.value.cells, (e) => c((f(), k("th", {
|
|
3522
3537
|
key: e.id,
|
|
3523
|
-
style:
|
|
3524
|
-
"aria-label":
|
|
3538
|
+
style: L(l.value),
|
|
3539
|
+
"aria-label": j(r).table.cellPlaceholder,
|
|
3525
3540
|
contenteditable: "true",
|
|
3526
|
-
"data-placeholder":
|
|
3541
|
+
"data-placeholder": j(r).table.cellPlaceholder,
|
|
3527
3542
|
onBlur: (t) => m(u.value.id, e.id, t),
|
|
3528
|
-
onKeydown: n[0] ||=
|
|
3529
|
-
onClick:
|
|
3530
|
-
}, null, 44,
|
|
3543
|
+
onKeydown: n[0] ||= ee(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3544
|
+
onClick: M(p, ["stop"])
|
|
3545
|
+
}, null, 44, eo)), [[t, e.content]])), 128))])])) : A("", !0), I("tbody", null, [(f(!0), k(R, null, h(d.value, (e) => (f(), k("tr", { key: e.id }, [(f(!0), k(R, null, h(e.cells, (i) => c((f(), k("td", {
|
|
3531
3546
|
key: i.id,
|
|
3532
|
-
style:
|
|
3533
|
-
"aria-label":
|
|
3547
|
+
style: L(s.value),
|
|
3548
|
+
"aria-label": j(r).table.cellPlaceholder,
|
|
3534
3549
|
contenteditable: "true",
|
|
3535
|
-
"data-placeholder":
|
|
3550
|
+
"data-placeholder": j(r).table.cellPlaceholder,
|
|
3536
3551
|
onBlur: (t) => m(e.id, i.id, t),
|
|
3537
|
-
onKeydown: n[1] ||=
|
|
3538
|
-
onClick:
|
|
3539
|
-
}, null, 44,
|
|
3552
|
+
onKeydown: n[1] ||= ee(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3553
|
+
onClick: M(p, ["stop"])
|
|
3554
|
+
}, null, 44, to)), [[t, i.content]])), 128))]))), 128))])], 4)) : (f(), k("div", no, [V(j(si), { size: 16 }), I("span", null, D(j(r).table.empty), 1)]))]));
|
|
3540
3555
|
}
|
|
3541
|
-
}), [["__scopeId", "data-v-4f49860b"]]),
|
|
3556
|
+
}), [["__scopeId", "data-v-4f49860b"]]), io = /* @__PURE__ */ B({
|
|
3542
3557
|
__name: "VideoPlayButton",
|
|
3543
3558
|
props: { hoverEffect: {
|
|
3544
3559
|
type: Boolean,
|
|
3545
3560
|
default: !1
|
|
3546
3561
|
} },
|
|
3547
3562
|
setup(e) {
|
|
3548
|
-
return (t, n) => (f(), k("div", { class:
|
|
3563
|
+
return (t, n) => (f(), k("div", { class: F(["tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/30", e.hoverEffect && "tpl:transition-opacity tpl:group-hover:bg-black/40"]) }, [...n[0] ||= [I("div", { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-white/90 tpl:shadow-lg" }, [I("svg", {
|
|
3549
3564
|
class: "tpl:ml-1 tpl:text-[var(--tpl-danger)]",
|
|
3550
3565
|
width: "28",
|
|
3551
3566
|
height: "28",
|
|
3552
3567
|
viewBox: "0 0 24 24",
|
|
3553
3568
|
fill: "currentColor"
|
|
3554
|
-
}, [
|
|
3569
|
+
}, [I("polygon", { points: "5,3 19,12 5,21" })])], -1)]], 2));
|
|
3555
3570
|
}
|
|
3556
3571
|
});
|
|
3557
3572
|
//#endregion
|
|
3558
3573
|
//#region src/utils/videoThumbnail.ts
|
|
3559
|
-
function
|
|
3574
|
+
function ao(e) {
|
|
3560
3575
|
if (!e) return {
|
|
3561
3576
|
platform: "unknown",
|
|
3562
3577
|
videoId: null,
|
|
@@ -3588,25 +3603,25 @@ function no(e) {
|
|
|
3588
3603
|
thumbnailUrl: null
|
|
3589
3604
|
};
|
|
3590
3605
|
}
|
|
3591
|
-
function
|
|
3592
|
-
return t ||
|
|
3606
|
+
function oo(e, t) {
|
|
3607
|
+
return t || ao(e).thumbnailUrl;
|
|
3593
3608
|
}
|
|
3594
3609
|
//#endregion
|
|
3595
3610
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3596
|
-
var
|
|
3611
|
+
var so = ["src", "alt"], co = {
|
|
3597
3612
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3598
3613
|
style: { opacity: "0.7" }
|
|
3599
|
-
},
|
|
3614
|
+
}, lo = ["href"], uo = ["src", "alt"], fo = ["src", "alt"], po = {
|
|
3600
3615
|
key: 3,
|
|
3601
3616
|
class: "tpl:flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
3602
|
-
},
|
|
3617
|
+
}, mo = /* @__PURE__ */ B({
|
|
3603
3618
|
__name: "VideoBlock",
|
|
3604
3619
|
props: {
|
|
3605
3620
|
block: {},
|
|
3606
3621
|
viewport: {}
|
|
3607
3622
|
},
|
|
3608
3623
|
setup(e) {
|
|
3609
|
-
let t = e, { t: n } = Y(), { syntax: r } =
|
|
3624
|
+
let t = e, { t: n } = Y(), { syntax: r } = ki(), i = O(() => _t(t.block.url, r) || _t(t.block.thumbnailUrl, r)), a = O(() => i.value ? null : oo(t.block.url, t.block.thumbnailUrl)), o = O(() => ({ textAlign: t.block.align })), s = O(() => ({
|
|
3610
3625
|
maxWidth: "100%",
|
|
3611
3626
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
3612
3627
|
display: "block",
|
|
@@ -3615,69 +3630,69 @@ var io = ["src", "alt"], ao = {
|
|
|
3615
3630
|
})), c = O(() => _t(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
3616
3631
|
return (t, r) => (f(), k("div", {
|
|
3617
3632
|
class: "tpl:w-full",
|
|
3618
|
-
style:
|
|
3633
|
+
style: L(o.value)
|
|
3619
3634
|
}, [i.value && e.block.placeholderUrl ? (f(), k("div", {
|
|
3620
3635
|
key: 0,
|
|
3621
3636
|
class: "tpl:relative tpl:inline-block",
|
|
3622
|
-
style:
|
|
3623
|
-
}, [
|
|
3637
|
+
style: L(s.value)
|
|
3638
|
+
}, [I("img", {
|
|
3624
3639
|
class: "tpl:w-full tpl:border-0",
|
|
3625
3640
|
src: e.block.placeholderUrl,
|
|
3626
3641
|
alt: e.block.alt
|
|
3627
|
-
}, null, 8,
|
|
3642
|
+
}, null, 8, so), V(io)], 4)) : i.value ? (f(), k("div", {
|
|
3628
3643
|
key: 1,
|
|
3629
3644
|
class: "tpl:relative tpl:!flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
3630
|
-
style:
|
|
3631
|
-
}, [V(
|
|
3645
|
+
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, s.value])
|
|
3646
|
+
}, [V(j(fi), {
|
|
3632
3647
|
size: 36,
|
|
3633
3648
|
"stroke-width": 1.5,
|
|
3634
3649
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3635
3650
|
style: { opacity: "0.5" }
|
|
3636
|
-
}),
|
|
3651
|
+
}), I("span", co, D(c.value), 1)], 4)) : a.value ? (f(), k(R, { key: 2 }, [e.block.url ? (f(), k("a", {
|
|
3637
3652
|
key: 0,
|
|
3638
3653
|
href: e.block.url,
|
|
3639
3654
|
target: "_blank",
|
|
3640
3655
|
rel: "noopener noreferrer",
|
|
3641
3656
|
class: "tpl:group tpl:relative tpl:inline-block",
|
|
3642
|
-
style:
|
|
3643
|
-
onClick: r[0] ||=
|
|
3644
|
-
}, [
|
|
3657
|
+
style: L(s.value),
|
|
3658
|
+
onClick: r[0] ||= M(() => {}, ["prevent"])
|
|
3659
|
+
}, [I("img", {
|
|
3645
3660
|
class: "tpl:w-full tpl:border-0",
|
|
3646
3661
|
src: a.value,
|
|
3647
3662
|
alt: e.block.alt
|
|
3648
|
-
}, null, 8,
|
|
3663
|
+
}, null, 8, uo), V(io, { "hover-effect": "" })], 12, lo)) : (f(), k("div", {
|
|
3649
3664
|
key: 1,
|
|
3650
3665
|
class: "tpl:relative tpl:inline-block",
|
|
3651
|
-
style:
|
|
3652
|
-
}, [
|
|
3666
|
+
style: L(s.value)
|
|
3667
|
+
}, [I("img", {
|
|
3653
3668
|
class: "tpl:w-full tpl:border-0",
|
|
3654
3669
|
src: a.value,
|
|
3655
3670
|
alt: e.block.alt
|
|
3656
|
-
}, null, 8,
|
|
3671
|
+
}, null, 8, fo), V(io)], 4))], 64)) : (f(), k("div", po, [V(j(fi), {
|
|
3657
3672
|
size: 40,
|
|
3658
3673
|
"stroke-width": 1.5,
|
|
3659
3674
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3660
|
-
}),
|
|
3661
|
-
}
|
|
3662
|
-
}),
|
|
3663
|
-
section:
|
|
3664
|
-
title:
|
|
3665
|
-
paragraph:
|
|
3666
|
-
image:
|
|
3667
|
-
button:
|
|
3668
|
-
divider:
|
|
3669
|
-
video:
|
|
3670
|
-
social:
|
|
3671
|
-
menu:
|
|
3672
|
-
table:
|
|
3673
|
-
spacer:
|
|
3674
|
-
html:
|
|
3675
|
-
countdown: E(() => import("./CountdownBlock-
|
|
3675
|
+
}), I("span", null, D(j(n).video.addVideo), 1)]))], 4));
|
|
3676
|
+
}
|
|
3677
|
+
}), ho = {
|
|
3678
|
+
section: Ra,
|
|
3679
|
+
title: Pa,
|
|
3680
|
+
paragraph: _a,
|
|
3681
|
+
image: ua,
|
|
3682
|
+
button: _r,
|
|
3683
|
+
divider: Ji,
|
|
3684
|
+
video: mo,
|
|
3685
|
+
social: Ja,
|
|
3686
|
+
menu: ma,
|
|
3687
|
+
table: ro,
|
|
3688
|
+
spacer: Za,
|
|
3689
|
+
html: $i,
|
|
3690
|
+
countdown: E(() => import("./CountdownBlock-D1RoaOgF.js").then((e) => e.n))
|
|
3676
3691
|
};
|
|
3677
|
-
function
|
|
3692
|
+
function go(e) {
|
|
3678
3693
|
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = Y(r);
|
|
3679
3694
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
3680
|
-
let { resolvedTheme: s } =
|
|
3695
|
+
let { resolvedTheme: s } = ir(O(() => t.state.uiTheme)), c = C(n.theme ?? {}), { themeStyles: l } = or({
|
|
3681
3696
|
themeOverrides: c,
|
|
3682
3697
|
resolvedTheme: s,
|
|
3683
3698
|
extraStyles: e.themeExtraStyles
|
|
@@ -3701,16 +3716,16 @@ function po(e) {
|
|
|
3701
3716
|
m && (h = H(u.isNavigating, (e) => {
|
|
3702
3717
|
e ? m.pause() : m.resume();
|
|
3703
3718
|
}));
|
|
3704
|
-
let g =
|
|
3719
|
+
let g = rr(t, {
|
|
3705
3720
|
t: a,
|
|
3706
3721
|
format: o
|
|
3707
|
-
}), _ =
|
|
3708
|
-
if (
|
|
3722
|
+
}), _ = ur();
|
|
3723
|
+
if (fr(_, ho), n.customBlocks?.length) for (let e of n.customBlocks) _.registerCustom(e, Ki);
|
|
3709
3724
|
function v(e) {
|
|
3710
|
-
for (let t of e) _.registerCustom(t,
|
|
3725
|
+
for (let t of e) _.registerCustom(t, Ki);
|
|
3711
3726
|
}
|
|
3712
3727
|
function y(r) {
|
|
3713
|
-
|
|
3728
|
+
mr(r, {
|
|
3714
3729
|
history: u,
|
|
3715
3730
|
selectBlock: (e) => t.selectBlock(e),
|
|
3716
3731
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
@@ -3719,18 +3734,20 @@ function po(e) {
|
|
|
3719
3734
|
onBeforeUndo: e.keyboardOptions?.onBeforeUndo
|
|
3720
3735
|
});
|
|
3721
3736
|
}
|
|
3722
|
-
q(document, "keydown", y)
|
|
3723
|
-
let b =
|
|
3724
|
-
p(
|
|
3725
|
-
let x = n.
|
|
3737
|
+
q(document, "keydown", y);
|
|
3738
|
+
let b = C(null);
|
|
3739
|
+
p(qn, e.editorRoot ?? document), p(Jn, b), p(En, r), p(Dn, t), p(On, u), p(kn, d), p(An, f), p(jn, i), p(Mn, l), p(Nn, s), p(Pn, n.blockDefaults), p(Fn, _), p(In, n.customBlocks ?? []);
|
|
3740
|
+
let x = ft(n.mergeTags?.syntax);
|
|
3741
|
+
p(Ln, n.mergeTags?.tags ?? []), p(Rn, x), p(zn, n.mergeTags?.onRequest ?? null), p(Bn, n.mergeTags?.autocomplete !== !1), p(Vn, n.onRequestMedia ?? null), p(Hn, n.displayConditions?.conditions ?? []), p(Un, n.displayConditions?.allowCustom ?? !1), p(Wn, e.capabilities ?? {}), p(Gn, g);
|
|
3742
|
+
let S = n.accessibility?.disabled === !0 ? null : tr({
|
|
3726
3743
|
content: t.content,
|
|
3727
3744
|
options: n.accessibility ?? {},
|
|
3728
3745
|
updateBlock: t.updateBlock,
|
|
3729
3746
|
updateSettings: t.updateSettings
|
|
3730
3747
|
});
|
|
3731
|
-
p(Kn,
|
|
3732
|
-
function
|
|
3733
|
-
h?.(),
|
|
3748
|
+
p(Kn, S);
|
|
3749
|
+
function w() {
|
|
3750
|
+
h?.(), S?.destroy(), m?.destroy(), u.destroy();
|
|
3734
3751
|
}
|
|
3735
3752
|
return {
|
|
3736
3753
|
t: a,
|
|
@@ -3744,14 +3761,15 @@ function po(e) {
|
|
|
3744
3761
|
themeOverrides: c,
|
|
3745
3762
|
registry: _,
|
|
3746
3763
|
keyboardReorder: g,
|
|
3747
|
-
accessibilityLint:
|
|
3764
|
+
accessibilityLint: S,
|
|
3765
|
+
popoverRoot: b,
|
|
3748
3766
|
registerCustomBlocks: v,
|
|
3749
|
-
destroy:
|
|
3767
|
+
destroy: w
|
|
3750
3768
|
};
|
|
3751
3769
|
}
|
|
3752
3770
|
//#endregion
|
|
3753
3771
|
//#region ../core/src/cloud/auth.ts
|
|
3754
|
-
var
|
|
3772
|
+
var _o = class e {
|
|
3755
3773
|
static DEFAULT_BASE_URL = "https://templatical.com";
|
|
3756
3774
|
accessToken = null;
|
|
3757
3775
|
expiresAt = null;
|
|
@@ -3852,8 +3870,8 @@ var mo = class e {
|
|
|
3852
3870
|
return a.status === 401 && (a = await i(await this.refreshToken())), a;
|
|
3853
3871
|
}
|
|
3854
3872
|
};
|
|
3855
|
-
function
|
|
3856
|
-
return e.mode === "direct" ? new
|
|
3873
|
+
function vo(e, t) {
|
|
3874
|
+
return e.mode === "direct" ? new _o({
|
|
3857
3875
|
url: `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}/api/v1/auth/token`,
|
|
3858
3876
|
baseUrl: e.baseUrl,
|
|
3859
3877
|
requestOptions: {
|
|
@@ -3867,7 +3885,7 @@ function ho(e, t) {
|
|
|
3867
3885
|
}
|
|
3868
3886
|
},
|
|
3869
3887
|
onError: t
|
|
3870
|
-
}) : new
|
|
3888
|
+
}) : new _o({
|
|
3871
3889
|
url: e.url,
|
|
3872
3890
|
baseUrl: e.baseUrl,
|
|
3873
3891
|
requestOptions: e.requestOptions,
|
|
@@ -3879,16 +3897,16 @@ function ho(e, t) {
|
|
|
3879
3897
|
function Z(e, t) {
|
|
3880
3898
|
return e.replace(/\{(\w+)\}/g, (e, n) => encodeURIComponent(t[n] ?? ""));
|
|
3881
3899
|
}
|
|
3882
|
-
var
|
|
3900
|
+
var yo = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${yo}/templates/{template}`, bo = `${Q}/ai`, xo = `${yo}/media`, So = `${xo}/folders`, Co = `${yo}/saved-modules`, $ = {
|
|
3883
3901
|
health: "/api/v1/health",
|
|
3884
|
-
"projects.config": `${
|
|
3885
|
-
"broadcasting.auth": `${
|
|
3886
|
-
"templates.store": `${
|
|
3902
|
+
"projects.config": `${yo}/config`,
|
|
3903
|
+
"broadcasting.auth": `${yo}/broadcasting/auth`,
|
|
3904
|
+
"templates.store": `${yo}/templates`,
|
|
3887
3905
|
"templates.show": `${Q}`,
|
|
3888
3906
|
"templates.update": `${Q}`,
|
|
3889
3907
|
"templates.destroy": `${Q}`,
|
|
3890
3908
|
"templates.export": `${Q}/export`,
|
|
3891
|
-
"templates.importFromBeefree": `${
|
|
3909
|
+
"templates.importFromBeefree": `${yo}/templates/import/from-beefree`,
|
|
3892
3910
|
"templates.sendTestEmail": `${Q}/send-test-email`,
|
|
3893
3911
|
"snapshots.index": `${Q}/snapshots`,
|
|
3894
3912
|
"snapshots.store": `${Q}/snapshots`,
|
|
@@ -3899,31 +3917,31 @@ var go = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${go}/templates/{te
|
|
|
3899
3917
|
"comments.update": `${Q}/comments/{comment}`,
|
|
3900
3918
|
"comments.destroy": `${Q}/comments/{comment}`,
|
|
3901
3919
|
"comments.resolve": `${Q}/comments/{comment}/resolve`,
|
|
3902
|
-
"ai.generate": `${
|
|
3903
|
-
"ai.conversationMessages": `${
|
|
3904
|
-
"ai.suggestions": `${
|
|
3905
|
-
"ai.rewriteText": `${
|
|
3906
|
-
"ai.score": `${
|
|
3907
|
-
"ai.fixFinding": `${
|
|
3908
|
-
"ai.generateFromDesign": `${
|
|
3909
|
-
"media.upload": `${
|
|
3910
|
-
"media.browse": `${
|
|
3911
|
-
"media.delete": `${
|
|
3912
|
-
"media.move": `${
|
|
3913
|
-
"media.update": `${
|
|
3914
|
-
"media.replace": `${
|
|
3915
|
-
"media.checkUsage": `${
|
|
3916
|
-
"media.frequentlyUsed": `${
|
|
3917
|
-
"media.importFromUrl": `${
|
|
3918
|
-
"folders.index": `${
|
|
3919
|
-
"folders.store": `${
|
|
3920
|
-
"folders.update": `${
|
|
3921
|
-
"folders.destroy": `${
|
|
3922
|
-
"savedModules.index": `${
|
|
3923
|
-
"savedModules.store": `${
|
|
3924
|
-
"savedModules.update": `${
|
|
3925
|
-
"savedModules.destroy": `${
|
|
3926
|
-
},
|
|
3920
|
+
"ai.generate": `${bo}/generate`,
|
|
3921
|
+
"ai.conversationMessages": `${bo}/conversation-messages`,
|
|
3922
|
+
"ai.suggestions": `${bo}/suggestions`,
|
|
3923
|
+
"ai.rewriteText": `${bo}/rewrite-text`,
|
|
3924
|
+
"ai.score": `${bo}/score`,
|
|
3925
|
+
"ai.fixFinding": `${bo}/fix-finding`,
|
|
3926
|
+
"ai.generateFromDesign": `${bo}/generate-from-design`,
|
|
3927
|
+
"media.upload": `${xo}/upload`,
|
|
3928
|
+
"media.browse": `${xo}/browse`,
|
|
3929
|
+
"media.delete": `${xo}/delete`,
|
|
3930
|
+
"media.move": `${xo}/move`,
|
|
3931
|
+
"media.update": `${xo}/{media}`,
|
|
3932
|
+
"media.replace": `${xo}/{media}/replace`,
|
|
3933
|
+
"media.checkUsage": `${xo}/check-usage`,
|
|
3934
|
+
"media.frequentlyUsed": `${xo}/frequently-used`,
|
|
3935
|
+
"media.importFromUrl": `${xo}/import-from-url`,
|
|
3936
|
+
"folders.index": `${So}`,
|
|
3937
|
+
"folders.store": `${So}`,
|
|
3938
|
+
"folders.update": `${So}/{mediaFolder}`,
|
|
3939
|
+
"folders.destroy": `${So}/{mediaFolder}`,
|
|
3940
|
+
"savedModules.index": `${Co}`,
|
|
3941
|
+
"savedModules.store": `${Co}`,
|
|
3942
|
+
"savedModules.update": `${Co}/{savedModule}`,
|
|
3943
|
+
"savedModules.destroy": `${Co}/{savedModule}`
|
|
3944
|
+
}, wo = class {
|
|
3927
3945
|
constructor(e) {
|
|
3928
3946
|
this.authManager = e;
|
|
3929
3947
|
}
|
|
@@ -4108,14 +4126,14 @@ var go = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${go}/templates/{te
|
|
|
4108
4126
|
};
|
|
4109
4127
|
//#endregion
|
|
4110
4128
|
//#region ../core/src/cloud/websocket-client.ts
|
|
4111
|
-
function
|
|
4129
|
+
function To(e) {
|
|
4112
4130
|
return {
|
|
4113
4131
|
host: e.host,
|
|
4114
4132
|
port: e.port,
|
|
4115
4133
|
appKey: e.app_key
|
|
4116
4134
|
};
|
|
4117
4135
|
}
|
|
4118
|
-
var
|
|
4136
|
+
var Eo = class {
|
|
4119
4137
|
pusher = null;
|
|
4120
4138
|
authManager;
|
|
4121
4139
|
config;
|
|
@@ -4182,7 +4200,7 @@ var Co = class {
|
|
|
4182
4200
|
};
|
|
4183
4201
|
//#endregion
|
|
4184
4202
|
//#region ../core/src/cloud/mcp-operation-handler.ts
|
|
4185
|
-
function
|
|
4203
|
+
function Do(e, t) {
|
|
4186
4204
|
let { operation: n, data: r } = t;
|
|
4187
4205
|
switch (n) {
|
|
4188
4206
|
case "add_block":
|
|
@@ -4210,8 +4228,8 @@ function wo(e, t) {
|
|
|
4210
4228
|
}
|
|
4211
4229
|
//#endregion
|
|
4212
4230
|
//#region ../core/src/cloud/editor.ts
|
|
4213
|
-
function
|
|
4214
|
-
let t = new
|
|
4231
|
+
function Oo(e) {
|
|
4232
|
+
let t = new wo(e.authManager), n = S({
|
|
4215
4233
|
template: null,
|
|
4216
4234
|
content: Ue(e.defaultFontFamily, e.templateDefaults),
|
|
4217
4235
|
selectedBlockId: null,
|
|
@@ -4366,7 +4384,7 @@ function To(e) {
|
|
|
4366
4384
|
function E() {
|
|
4367
4385
|
return n.template?.id !== void 0;
|
|
4368
4386
|
}
|
|
4369
|
-
function
|
|
4387
|
+
function ee() {
|
|
4370
4388
|
n.isDirty = !0;
|
|
4371
4389
|
}
|
|
4372
4390
|
return {
|
|
@@ -4391,16 +4409,16 @@ function To(e) {
|
|
|
4391
4409
|
save: w,
|
|
4392
4410
|
createSnapshot: T,
|
|
4393
4411
|
hasTemplate: E,
|
|
4394
|
-
markDirty:
|
|
4412
|
+
markDirty: ee
|
|
4395
4413
|
};
|
|
4396
4414
|
}
|
|
4397
4415
|
//#endregion
|
|
4398
4416
|
//#region ../core/src/cloud/ai-chat.ts
|
|
4399
|
-
var
|
|
4400
|
-
function
|
|
4401
|
-
return `msg_${Date.now()}_${++
|
|
4417
|
+
var ko = 0;
|
|
4418
|
+
function Ao() {
|
|
4419
|
+
return `msg_${Date.now()}_${++ko}`;
|
|
4402
4420
|
}
|
|
4403
|
-
function
|
|
4421
|
+
function jo(e) {
|
|
4404
4422
|
let { authManager: t, getTemplateId: n, onApply: r, onError: i } = e, a = C([]), o = C(!1), s = C(!1), c = C(null), l = C(null), u = C(null), d = C(null), f = C(null), p = C(null), m = C(!1), h = C([]), g = C(!1);
|
|
4405
4423
|
function _(e, t) {
|
|
4406
4424
|
let n = a.value.findIndex((t) => t.id === e);
|
|
@@ -4494,14 +4512,14 @@ function Oo(e) {
|
|
|
4494
4512
|
let v = n();
|
|
4495
4513
|
if (!v) throw Error("Template must be saved before using AI generation");
|
|
4496
4514
|
o.value = !0, c.value = null, l.value = null, h.value = [];
|
|
4497
|
-
let y =
|
|
4515
|
+
let y = Ao();
|
|
4498
4516
|
a.value = [...a.value, {
|
|
4499
4517
|
id: y,
|
|
4500
4518
|
role: "user",
|
|
4501
4519
|
content: e,
|
|
4502
4520
|
timestamp: Date.now()
|
|
4503
4521
|
}];
|
|
4504
|
-
let b =
|
|
4522
|
+
let b = Ao();
|
|
4505
4523
|
a.value = [...a.value, {
|
|
4506
4524
|
id: b,
|
|
4507
4525
|
role: "assistant",
|
|
@@ -4592,7 +4610,7 @@ function Oo(e) {
|
|
|
4592
4610
|
}
|
|
4593
4611
|
//#endregion
|
|
4594
4612
|
//#region ../core/src/cloud/ai-config.ts
|
|
4595
|
-
function
|
|
4613
|
+
function Mo(e) {
|
|
4596
4614
|
function t(t) {
|
|
4597
4615
|
return e === !1 ? !1 : e?.[t] !== !1;
|
|
4598
4616
|
}
|
|
@@ -4603,7 +4621,7 @@ function ko(e) {
|
|
|
4603
4621
|
}
|
|
4604
4622
|
//#endregion
|
|
4605
4623
|
//#region ../core/src/cloud/template-scoring.ts
|
|
4606
|
-
function
|
|
4624
|
+
function No(e) {
|
|
4607
4625
|
let { authManager: t, getTemplateId: n } = e, r = C(!1), i = C(null), a = C(null), o = C(null), s = C(""), c = C(null);
|
|
4608
4626
|
async function l(e, o) {
|
|
4609
4627
|
let s = n();
|
|
@@ -4748,7 +4766,7 @@ function Ao(e) {
|
|
|
4748
4766
|
}
|
|
4749
4767
|
//#endregion
|
|
4750
4768
|
//#region ../core/src/cloud/design-reference.ts
|
|
4751
|
-
function
|
|
4769
|
+
function Po(e) {
|
|
4752
4770
|
let { authManager: t, getTemplateId: n, onApply: r, onError: i } = e, a = C(!1), o = C(null);
|
|
4753
4771
|
async function s(e) {
|
|
4754
4772
|
let s = n();
|
|
@@ -4811,8 +4829,8 @@ function jo(e) {
|
|
|
4811
4829
|
}
|
|
4812
4830
|
//#endregion
|
|
4813
4831
|
//#region ../core/src/cloud/comments.ts
|
|
4814
|
-
function
|
|
4815
|
-
let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new
|
|
4832
|
+
function Fo(e) {
|
|
4833
|
+
let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new wo(t), c = C([]), l = C(!1), u = C(!1), d = O(() => (o?.() ?? !1) && t.userConfig !== null), f = O(() => {
|
|
4816
4834
|
let e = 0;
|
|
4817
4835
|
for (let t of c.value) e += 1 + (t.replies?.length ?? 0);
|
|
4818
4836
|
return e;
|
|
@@ -4893,7 +4911,7 @@ function Mo(e) {
|
|
|
4893
4911
|
body: t,
|
|
4894
4912
|
...h()
|
|
4895
4913
|
}, g());
|
|
4896
|
-
return
|
|
4914
|
+
return D(e, n), _("updated", n), n;
|
|
4897
4915
|
} catch (e) {
|
|
4898
4916
|
let t = e instanceof Error ? e : Error("Failed to update comment", { cause: e });
|
|
4899
4917
|
return a?.(t), null;
|
|
@@ -4930,7 +4948,7 @@ function Mo(e) {
|
|
|
4930
4948
|
u.value = !0;
|
|
4931
4949
|
try {
|
|
4932
4950
|
let n = await s.resolveComment(t, e, h(), g());
|
|
4933
|
-
return
|
|
4951
|
+
return D(e, n), _(n.resolved_at ? "resolved" : "unresolved", n), n;
|
|
4934
4952
|
} catch (e) {
|
|
4935
4953
|
let t = e instanceof Error ? e : Error("Failed to toggle comment resolution", { cause: e });
|
|
4936
4954
|
return a?.(t), null;
|
|
@@ -4946,9 +4964,9 @@ function Mo(e) {
|
|
|
4946
4964
|
_("created", e);
|
|
4947
4965
|
}
|
|
4948
4966
|
function E(e) {
|
|
4949
|
-
|
|
4967
|
+
D(e.id, e), _("updated", e);
|
|
4950
4968
|
}
|
|
4951
|
-
function
|
|
4969
|
+
function ee(e, t) {
|
|
4952
4970
|
let n = v(e), r = n ? {
|
|
4953
4971
|
...n,
|
|
4954
4972
|
replies: [...n.replies ?? []]
|
|
@@ -4959,7 +4977,7 @@ function Mo(e) {
|
|
|
4959
4977
|
} else c.value = c.value.filter((t) => t.id !== e);
|
|
4960
4978
|
r && _("deleted", r);
|
|
4961
4979
|
}
|
|
4962
|
-
function
|
|
4980
|
+
function D(e, t) {
|
|
4963
4981
|
for (let n = 0; n < c.value.length; n++) {
|
|
4964
4982
|
if (c.value[n].id === e) {
|
|
4965
4983
|
c.value = [
|
|
@@ -5006,22 +5024,22 @@ function Mo(e) {
|
|
|
5006
5024
|
toggleResolve: w,
|
|
5007
5025
|
applyRemoteCreate: T,
|
|
5008
5026
|
applyRemoteUpdate: E,
|
|
5009
|
-
applyRemoteDelete:
|
|
5027
|
+
applyRemoteDelete: ee
|
|
5010
5028
|
};
|
|
5011
5029
|
}
|
|
5012
5030
|
//#endregion
|
|
5013
5031
|
//#region ../core/src/cloud/comment-listener.ts
|
|
5014
|
-
function
|
|
5032
|
+
function Io(e) {
|
|
5015
5033
|
let { comments: t, channel: n } = e;
|
|
5016
5034
|
H(n, (e, n) => {
|
|
5017
5035
|
n && n.unbind("comment-broadcast"), e && e.bind("comment-broadcast", (e) => {
|
|
5018
|
-
|
|
5036
|
+
Lo(t, e);
|
|
5019
5037
|
});
|
|
5020
5038
|
}), l(() => {
|
|
5021
5039
|
n.value?.unbind("comment-broadcast");
|
|
5022
5040
|
});
|
|
5023
5041
|
}
|
|
5024
|
-
function
|
|
5042
|
+
function Lo(e, t) {
|
|
5025
5043
|
switch (t.action) {
|
|
5026
5044
|
case "comment_created":
|
|
5027
5045
|
e.applyRemoteCreate(t.comment);
|
|
@@ -5040,7 +5058,7 @@ function Po(e, t) {
|
|
|
5040
5058
|
}
|
|
5041
5059
|
//#endregion
|
|
5042
5060
|
//#region ../core/src/cloud/collaboration.ts
|
|
5043
|
-
var
|
|
5061
|
+
var Ro = [
|
|
5044
5062
|
"pusher:member_added",
|
|
5045
5063
|
"pusher:member_removed",
|
|
5046
5064
|
"client-block_locked",
|
|
@@ -5048,10 +5066,10 @@ var Fo = [
|
|
|
5048
5066
|
"client-operation",
|
|
5049
5067
|
"mcp-operation"
|
|
5050
5068
|
];
|
|
5051
|
-
function
|
|
5052
|
-
for (let t of
|
|
5069
|
+
function zo(e) {
|
|
5070
|
+
for (let t of Ro) e.unbind(t);
|
|
5053
5071
|
}
|
|
5054
|
-
var
|
|
5072
|
+
var Bo = [
|
|
5055
5073
|
"#3b82f6",
|
|
5056
5074
|
"#ef4444",
|
|
5057
5075
|
"#10b981",
|
|
@@ -5063,10 +5081,10 @@ var Lo = [
|
|
|
5063
5081
|
"#6366f1",
|
|
5064
5082
|
"#14b8a6"
|
|
5065
5083
|
];
|
|
5066
|
-
function
|
|
5084
|
+
function Vo(e) {
|
|
5067
5085
|
let { authManager: t, editor: n, channel: r } = e, i = C([]), a = C(/* @__PURE__ */ new Map()), o = 0, s = !1, c = O(() => t.userConfig?.id ?? "");
|
|
5068
5086
|
function u() {
|
|
5069
|
-
let e =
|
|
5087
|
+
let e = Bo[o % Bo.length];
|
|
5070
5088
|
return o++, e;
|
|
5071
5089
|
}
|
|
5072
5090
|
function d(e) {
|
|
@@ -5108,7 +5126,7 @@ function Ro(e) {
|
|
|
5108
5126
|
function h(e) {
|
|
5109
5127
|
s = !0;
|
|
5110
5128
|
try {
|
|
5111
|
-
|
|
5129
|
+
Do(n, e);
|
|
5112
5130
|
} finally {
|
|
5113
5131
|
s = !1;
|
|
5114
5132
|
}
|
|
@@ -5128,7 +5146,7 @@ function Ro(e) {
|
|
|
5128
5146
|
return H(() => n.state.selectedBlockId, (e, t) => {
|
|
5129
5147
|
s || (t && v(t), e && _(e));
|
|
5130
5148
|
}), H(r, (t, n) => {
|
|
5131
|
-
if (n &&
|
|
5149
|
+
if (n && zo(n), !t) {
|
|
5132
5150
|
i.value = [], a.value = /* @__PURE__ */ new Map(), o = 0;
|
|
5133
5151
|
return;
|
|
5134
5152
|
}
|
|
@@ -5160,7 +5178,7 @@ function Ro(e) {
|
|
|
5160
5178
|
h(e);
|
|
5161
5179
|
});
|
|
5162
5180
|
}), l(() => {
|
|
5163
|
-
r.value &&
|
|
5181
|
+
r.value && zo(r.value);
|
|
5164
5182
|
}), {
|
|
5165
5183
|
collaborators: i,
|
|
5166
5184
|
lockedBlocks: a,
|
|
@@ -5170,7 +5188,7 @@ function Ro(e) {
|
|
|
5170
5188
|
}
|
|
5171
5189
|
//#endregion
|
|
5172
5190
|
//#region ../core/src/cloud/collaboration-broadcast.ts
|
|
5173
|
-
function
|
|
5191
|
+
function Ho(e, t) {
|
|
5174
5192
|
let n = e.addBlock, r = e.updateBlock, i = e.removeBlock, a = e.moveBlock, o = e.updateSettings, s = e.setContent;
|
|
5175
5193
|
e.addBlock = (e, r, i) => {
|
|
5176
5194
|
n(e, r, i), t._broadcastOperation({
|
|
@@ -5224,11 +5242,11 @@ function zo(e, t) {
|
|
|
5224
5242
|
}
|
|
5225
5243
|
//#endregion
|
|
5226
5244
|
//#region ../core/src/cloud/web-socket.ts
|
|
5227
|
-
function
|
|
5245
|
+
function Uo(e) {
|
|
5228
5246
|
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = null, o = null;
|
|
5229
5247
|
async function s(e, s) {
|
|
5230
5248
|
if (a) return;
|
|
5231
|
-
a = new
|
|
5249
|
+
a = new Eo({
|
|
5232
5250
|
authManager: t,
|
|
5233
5251
|
config: s,
|
|
5234
5252
|
onError: n
|
|
@@ -5256,8 +5274,8 @@ function Bo(e) {
|
|
|
5256
5274
|
}
|
|
5257
5275
|
//#endregion
|
|
5258
5276
|
//#region ../core/src/cloud/saved-modules.ts
|
|
5259
|
-
function
|
|
5260
|
-
let t = new
|
|
5277
|
+
function Wo(e) {
|
|
5278
|
+
let t = new wo(e.authManager), n = C([]), r = C(!1);
|
|
5261
5279
|
async function i(i) {
|
|
5262
5280
|
r.value = !0;
|
|
5263
5281
|
try {
|
|
@@ -5305,8 +5323,8 @@ function Vo(e) {
|
|
|
5305
5323
|
}
|
|
5306
5324
|
//#endregion
|
|
5307
5325
|
//#region ../core/src/cloud/snapshots.ts
|
|
5308
|
-
function
|
|
5309
|
-
let t = new
|
|
5326
|
+
function Go(e) {
|
|
5327
|
+
let t = new wo(e.authManager), n = C([]), r = C(!1), i = C(!1);
|
|
5310
5328
|
async function a() {
|
|
5311
5329
|
r.value = !0;
|
|
5312
5330
|
try {
|
|
@@ -5338,8 +5356,8 @@ function Ho(e) {
|
|
|
5338
5356
|
}
|
|
5339
5357
|
//#endregion
|
|
5340
5358
|
//#region ../core/src/cloud/test-email.ts
|
|
5341
|
-
function
|
|
5342
|
-
let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new
|
|
5359
|
+
function Ko(e) {
|
|
5360
|
+
let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new wo(t), l = C(!1), u = C(null), d = C(null);
|
|
5343
5361
|
o && H(o, (e) => {
|
|
5344
5362
|
e && (d.value = t.testEmailConfig);
|
|
5345
5363
|
}, { immediate: !0 });
|
|
@@ -5375,8 +5393,8 @@ function Uo(e) {
|
|
|
5375
5393
|
}
|
|
5376
5394
|
//#endregion
|
|
5377
5395
|
//#region ../core/src/cloud/export.ts
|
|
5378
|
-
function
|
|
5379
|
-
let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new
|
|
5396
|
+
function qo(e) {
|
|
5397
|
+
let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new wo(t);
|
|
5380
5398
|
function a() {
|
|
5381
5399
|
let e = n?.();
|
|
5382
5400
|
return {
|
|
@@ -5402,8 +5420,8 @@ function Wo(e) {
|
|
|
5402
5420
|
}
|
|
5403
5421
|
//#endregion
|
|
5404
5422
|
//#region ../core/src/cloud/plan-config.ts
|
|
5405
|
-
function
|
|
5406
|
-
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new
|
|
5423
|
+
function Jo(e) {
|
|
5424
|
+
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new wo(t), o = O(() => r.value?.features ?? null);
|
|
5407
5425
|
function s(e) {
|
|
5408
5426
|
return r.value?.features[e] ?? !1;
|
|
5409
5427
|
}
|
|
@@ -5429,11 +5447,11 @@ function Go(e) {
|
|
|
5429
5447
|
}
|
|
5430
5448
|
//#endregion
|
|
5431
5449
|
//#region ../core/src/cloud/health-check.ts
|
|
5432
|
-
var
|
|
5433
|
-
function
|
|
5450
|
+
var Yo = 5e3;
|
|
5451
|
+
function Xo(e) {
|
|
5434
5452
|
return e.authManager ? e.authManager.resolveUrl($.health) : `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}${$.health}`;
|
|
5435
5453
|
}
|
|
5436
|
-
async function
|
|
5454
|
+
async function Zo(e, t) {
|
|
5437
5455
|
let n = performance.now();
|
|
5438
5456
|
try {
|
|
5439
5457
|
let r = t ? await t.authenticatedFetch($.health, {
|
|
@@ -5485,7 +5503,7 @@ async function Jo(e, t) {
|
|
|
5485
5503
|
};
|
|
5486
5504
|
}
|
|
5487
5505
|
}
|
|
5488
|
-
async function
|
|
5506
|
+
async function Qo(e) {
|
|
5489
5507
|
if (!e?.host || !e?.app_key) return {
|
|
5490
5508
|
ok: !1,
|
|
5491
5509
|
error: "WebSocket configuration not available"
|
|
@@ -5501,7 +5519,7 @@ async function Yo(e) {
|
|
|
5501
5519
|
ok: !1,
|
|
5502
5520
|
error: "WebSocket connection timed out"
|
|
5503
5521
|
});
|
|
5504
|
-
},
|
|
5522
|
+
}, Yo);
|
|
5505
5523
|
try {
|
|
5506
5524
|
n = new WebSocket(t);
|
|
5507
5525
|
} catch (t) {
|
|
@@ -5521,8 +5539,8 @@ async function Yo(e) {
|
|
|
5521
5539
|
};
|
|
5522
5540
|
});
|
|
5523
5541
|
}
|
|
5524
|
-
async function
|
|
5525
|
-
let t = await
|
|
5542
|
+
async function $o(e = {}) {
|
|
5543
|
+
let t = await Zo(Xo(e), e.authManager), n = await Qo(t.wsConfig);
|
|
5526
5544
|
return {
|
|
5527
5545
|
api: t.api,
|
|
5528
5546
|
websocket: n,
|
|
@@ -5532,17 +5550,17 @@ async function Xo(e = {}) {
|
|
|
5532
5550
|
}
|
|
5533
5551
|
//#endregion
|
|
5534
5552
|
//#region ../core/src/cloud/mcp-listener.ts
|
|
5535
|
-
function
|
|
5553
|
+
function es(e) {
|
|
5536
5554
|
let { editor: t, channel: n, onOperation: r } = e;
|
|
5537
5555
|
H(n, (e, n) => {
|
|
5538
5556
|
n && n.unbind("mcp-operation"), e && e.bind("mcp-operation", (e) => {
|
|
5539
|
-
|
|
5557
|
+
Do(t, e), r?.(e);
|
|
5540
5558
|
});
|
|
5541
5559
|
});
|
|
5542
5560
|
}
|
|
5543
5561
|
//#endregion
|
|
5544
5562
|
//#region src/composables/useAliveFlag.ts
|
|
5545
|
-
function
|
|
5563
|
+
function ts() {
|
|
5546
5564
|
let e = { alive: !0 };
|
|
5547
5565
|
return re(() => {
|
|
5548
5566
|
e.alive = !1;
|
|
@@ -5550,19 +5568,19 @@ function Qo() {
|
|
|
5550
5568
|
}
|
|
5551
5569
|
//#endregion
|
|
5552
5570
|
//#region src/cloud/components/AiChatSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
5553
|
-
var
|
|
5571
|
+
var ns = {
|
|
5554
5572
|
key: 0,
|
|
5555
5573
|
class: "tpl-ai-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
5556
|
-
},
|
|
5574
|
+
}, rs = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, is = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, as = { class: "tpl:flex tpl:items-center tpl:gap-1" }, os = ["title"], ss = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col" }, cs = {
|
|
5557
5575
|
key: 0,
|
|
5558
5576
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
5559
|
-
},
|
|
5577
|
+
}, ls = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, us = {
|
|
5560
5578
|
key: 1,
|
|
5561
5579
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
5562
|
-
},
|
|
5580
|
+
}, ds = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, fs = {
|
|
5563
5581
|
key: 2,
|
|
5564
5582
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
5565
|
-
},
|
|
5583
|
+
}, ps = {
|
|
5566
5584
|
key: 0,
|
|
5567
5585
|
class: "tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm",
|
|
5568
5586
|
style: {
|
|
@@ -5571,10 +5589,10 @@ var $o = {
|
|
|
5571
5589
|
"max-width": "85%",
|
|
5572
5590
|
"box-shadow": "var(--tpl-shadow)"
|
|
5573
5591
|
}
|
|
5574
|
-
},
|
|
5592
|
+
}, ms = {
|
|
5575
5593
|
key: 1,
|
|
5576
5594
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
5577
|
-
},
|
|
5595
|
+
}, hs = {
|
|
5578
5596
|
key: 1,
|
|
5579
5597
|
class: "tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
|
|
5580
5598
|
style: {
|
|
@@ -5583,21 +5601,21 @@ var $o = {
|
|
|
5583
5601
|
color: "var(--tpl-text)",
|
|
5584
5602
|
"box-shadow": "var(--tpl-shadow)"
|
|
5585
5603
|
}
|
|
5586
|
-
},
|
|
5604
|
+
}, gs = {
|
|
5587
5605
|
key: 0,
|
|
5588
5606
|
class: "tpl:mx-3 tpl:mb-2 tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs",
|
|
5589
5607
|
style: {
|
|
5590
5608
|
"background-color": "var(--tpl-danger-light)",
|
|
5591
5609
|
color: "var(--tpl-danger)"
|
|
5592
5610
|
}
|
|
5593
|
-
},
|
|
5611
|
+
}, _s = {
|
|
5594
5612
|
key: 1,
|
|
5595
5613
|
class: "tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3",
|
|
5596
5614
|
style: {
|
|
5597
5615
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n )",
|
|
5598
5616
|
"backdrop-filter": "blur(2px)"
|
|
5599
5617
|
}
|
|
5600
|
-
},
|
|
5618
|
+
}, vs = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, ys = ["onClick"], bs = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, xs = { class: "tpl-ai-input-wrapper tpl:flex tpl:items-end tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Ss = ["placeholder", "disabled"], Cs = ["disabled"], ws = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Ts = /* @__PURE__ */ B({
|
|
5601
5619
|
__name: "AiChatSidebar",
|
|
5602
5620
|
props: {
|
|
5603
5621
|
visible: { type: Boolean },
|
|
@@ -5605,7 +5623,7 @@ var $o = {
|
|
|
5605
5623
|
},
|
|
5606
5624
|
emits: ["close"],
|
|
5607
5625
|
setup(e, { emit: t }) {
|
|
5608
|
-
let n = e, r = t, i = J(
|
|
5626
|
+
let n = e, r = t, i = J(er, "AiChatSidebar"), a = J(Dn, "AiChatSidebar"), o = J(Yn, "AiChatSidebar"), s = v(Ln, []), l = ts(), u = jo({
|
|
5609
5627
|
authManager: o,
|
|
5610
5628
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
5611
5629
|
onApply: n.onApply,
|
|
@@ -5631,20 +5649,20 @@ var $o = {
|
|
|
5631
5649
|
(u.messages.value?.length ?? 0) === 0 && a.content.value.blocks.length === 0 && u.loadSuggestions(a.content.value, s);
|
|
5632
5650
|
}
|
|
5633
5651
|
});
|
|
5634
|
-
async function
|
|
5652
|
+
async function T() {
|
|
5635
5653
|
let e = d.value.trim();
|
|
5636
5654
|
!e || u.isGenerating.value || (d.value = "", u.error.value = null, u.failedPrompt.value = null, w(), await u.sendPrompt(e, a.content.value, s), l.alive && (u.failedPrompt.value && (d.value = u.failedPrompt.value), w()));
|
|
5637
5655
|
}
|
|
5638
|
-
function
|
|
5656
|
+
function E(e) {
|
|
5639
5657
|
return e.replace(/```json[\s\S]*?```/g, "").replace(/```json[\s\S]*/g, "").trim();
|
|
5640
5658
|
}
|
|
5641
5659
|
function ee(e) {
|
|
5642
|
-
y(), d.value = e,
|
|
5660
|
+
y(), d.value = e, T();
|
|
5643
5661
|
}
|
|
5644
5662
|
function te(e) {
|
|
5645
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(),
|
|
5663
|
+
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), T());
|
|
5646
5664
|
}
|
|
5647
|
-
return (t, n) => (f(),
|
|
5665
|
+
return (t, n) => (f(), N(ie, {
|
|
5648
5666
|
"enter-active-class": "tpl-ai-slide-enter-active",
|
|
5649
5667
|
"enter-from-class": "tpl:translate-x-full",
|
|
5650
5668
|
"enter-to-class": "tpl:translate-x-0",
|
|
@@ -5652,42 +5670,42 @@ var $o = {
|
|
|
5652
5670
|
"leave-from-class": "tpl:translate-x-0",
|
|
5653
5671
|
"leave-to-class": "tpl:translate-x-full"
|
|
5654
5672
|
}, {
|
|
5655
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
5656
|
-
|
|
5673
|
+
default: b(() => [e.visible ? (f(), k("div", ns, [
|
|
5674
|
+
I("div", rs, [I("div", is, [V(j(oi), {
|
|
5657
5675
|
size: 13,
|
|
5658
5676
|
"stroke-width": 2
|
|
5659
|
-
}),
|
|
5677
|
+
}), I("span", null, D(j(i).aiChat.title), 1)]), I("div", as, [(j(u).messages.value?.length ?? 0) > 0 ? (f(), k("button", {
|
|
5660
5678
|
key: 0,
|
|
5661
5679
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
5662
|
-
title:
|
|
5663
|
-
onClick: n[0] ||= (e) =>
|
|
5664
|
-
}, [V(
|
|
5680
|
+
title: j(i).aiChat.clear,
|
|
5681
|
+
onClick: n[0] ||= (e) => j(u).clearChat()
|
|
5682
|
+
}, [V(j(ci), {
|
|
5665
5683
|
size: 14,
|
|
5666
5684
|
"stroke-width": 2
|
|
5667
|
-
})], 8,
|
|
5685
|
+
})], 8, os)) : A("", !0), I("button", {
|
|
5668
5686
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
5669
5687
|
onClick: n[1] ||= (e) => r("close")
|
|
5670
|
-
}, [V(
|
|
5688
|
+
}, [V(j(pi), {
|
|
5671
5689
|
size: 14,
|
|
5672
5690
|
"stroke-width": 2
|
|
5673
5691
|
})])])]),
|
|
5674
|
-
|
|
5675
|
-
|
|
5692
|
+
I("div", ss, [
|
|
5693
|
+
I("div", {
|
|
5676
5694
|
ref_key: "messagesContainer",
|
|
5677
5695
|
ref: p,
|
|
5678
5696
|
class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
|
|
5679
|
-
}, [
|
|
5697
|
+
}, [j(u).isLoadingHistory.value ? (f(), k("div", cs, [V(j(Jr), {
|
|
5680
5698
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
5681
5699
|
size: 24,
|
|
5682
5700
|
"stroke-width": 2
|
|
5683
|
-
}),
|
|
5701
|
+
}), I("p", ls, D(j(i).aiChat.loadingHistory), 1)])) : (j(u).messages.value?.length ?? 0) === 0 ? (f(), k("div", us, [V(j(oi), {
|
|
5684
5702
|
size: 32,
|
|
5685
5703
|
"stroke-width": 1.5,
|
|
5686
5704
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
5687
|
-
}),
|
|
5705
|
+
}), I("p", ds, D(j(i).aiChat.placeholder), 1)])) : (f(), k("div", fs, [(f(!0), k(R, null, h(j(u).messages.value, (e, t) => (f(), k("div", {
|
|
5688
5706
|
key: e.id,
|
|
5689
5707
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
5690
|
-
}, [e.role === "user" ? (f(), k("div",
|
|
5708
|
+
}, [e.role === "user" ? (f(), k("div", ps, D(e.content), 1)) : (f(), k("div", ms, [!E(e.content) && j(u).isGenerating.value && t === (j(u).messages.value?.length ?? 0) - 1 ? (f(), N(Si, { key: 0 })) : (f(), k("div", hs, D(E(e.content) || j(i).aiChat.applied), 1)), e.id === j(u).lastApplyMessageId.value && !j(u).isGenerating.value ? (f(), k("button", {
|
|
5691
5709
|
key: 2,
|
|
5692
5710
|
class: "tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:self-start tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
5693
5711
|
style: {
|
|
@@ -5695,22 +5713,22 @@ var $o = {
|
|
|
5695
5713
|
color: "var(--tpl-text-muted)",
|
|
5696
5714
|
"background-color": "transparent"
|
|
5697
5715
|
},
|
|
5698
|
-
onClick: n[2] ||= (e) =>
|
|
5699
|
-
}, [
|
|
5716
|
+
onClick: n[2] ||= (e) => j(u).toggleLastRevert()
|
|
5717
|
+
}, [j(u).isLastChangeReverted.value ? (f(), k(R, { key: 0 }, [V(j($r), {
|
|
5700
5718
|
size: 12,
|
|
5701
5719
|
"stroke-width": 2
|
|
5702
|
-
}), z(" " +
|
|
5720
|
+
}), z(" " + D(j(i).aiChat.reapply), 1)], 64)) : (f(), k(R, { key: 1 }, [V(j(ui), {
|
|
5703
5721
|
size: 12,
|
|
5704
5722
|
"stroke-width": 2
|
|
5705
|
-
}), z(" " +
|
|
5706
|
-
|
|
5723
|
+
}), z(" " + D(j(i).aiChat.revert), 1)], 64))])) : A("", !0)]))]))), 128))]))], 512),
|
|
5724
|
+
j(u).error.value ? (f(), k("div", gs, [V(j(Pr), {
|
|
5707
5725
|
size: 14,
|
|
5708
5726
|
"stroke-width": 2,
|
|
5709
5727
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
5710
|
-
}),
|
|
5711
|
-
(
|
|
5728
|
+
}), I("span", null, D(j(u).error.value === "ai_apply_failed" ? j(i).aiChat.applyFailed : j(i).aiChat.error), 1)])) : A("", !0),
|
|
5729
|
+
(j(u).suggestions.value?.length ?? 0) > 0 ? (f(), k("div", _s, [I("div", vs, [(f(!0), k(R, null, h(j(u).suggestions.value ?? [], (e, t) => (f(), k("button", {
|
|
5712
5730
|
key: t,
|
|
5713
|
-
class:
|
|
5731
|
+
class: F(["tpl-suggestion-btn tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:leading-snug tpl:transition-all tpl:duration-300 tpl:ease-out", (j(u).suggestions.value?.length ?? 0) - 1 - t < _.value ? "tpl:translate-y-0 tpl:opacity-100" : "tpl:pointer-events-none tpl:-translate-y-2 tpl:opacity-0"]),
|
|
5714
5732
|
style: {
|
|
5715
5733
|
"border-color": "var(--tpl-border)",
|
|
5716
5734
|
color: "var(--tpl-primary)",
|
|
@@ -5718,104 +5736,104 @@ var $o = {
|
|
|
5718
5736
|
"box-shadow": "var(--tpl-shadow)"
|
|
5719
5737
|
},
|
|
5720
5738
|
onClick: (t) => ee(e)
|
|
5721
|
-
},
|
|
5739
|
+
}, D(e), 11, ys))), 128))])])) : A("", !0)
|
|
5722
5740
|
]),
|
|
5723
|
-
|
|
5741
|
+
I("div", bs, [I("div", xs, [c(I("textarea", {
|
|
5724
5742
|
"onUpdate:modelValue": n[3] ||= (e) => d.value = e,
|
|
5725
5743
|
class: "tpl:max-h-32 tpl:min-h-[64px] tpl:flex-1 tpl:resize-none tpl:border-none tpl:bg-transparent tpl:font-sans tpl:text-sm tpl:outline-none tpl:text-[var(--tpl-text)]",
|
|
5726
|
-
placeholder:
|
|
5727
|
-
disabled:
|
|
5744
|
+
placeholder: j(i).aiChat.inputPlaceholder,
|
|
5745
|
+
disabled: j(u).isGenerating.value,
|
|
5728
5746
|
rows: "3",
|
|
5729
5747
|
onKeydown: te
|
|
5730
|
-
}, null, 40,
|
|
5748
|
+
}, null, 40, Ss), [[ae, d.value]]), I("button", {
|
|
5731
5749
|
class: "tpl-ai-send-btn tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:duration-150 tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
|
|
5732
|
-
disabled: !d.value.trim() ||
|
|
5733
|
-
onClick:
|
|
5734
|
-
}, [V(
|
|
5750
|
+
disabled: !d.value.trim() || j(u).isGenerating.value,
|
|
5751
|
+
onClick: T
|
|
5752
|
+
}, [V(j(ni), {
|
|
5735
5753
|
size: 16,
|
|
5736
5754
|
"stroke-width": 2
|
|
5737
|
-
})], 8,
|
|
5755
|
+
})], 8, Cs)]), I("p", ws, D(j(i).aiMenu.disclaimer), 1)])
|
|
5738
5756
|
])) : A("", !0)]),
|
|
5739
5757
|
_: 1
|
|
5740
5758
|
}));
|
|
5741
5759
|
}
|
|
5742
|
-
}),
|
|
5743
|
-
function
|
|
5760
|
+
}), Es = /* @__PURE__ */ e({ default: () => Ds }), Ds = /* @__PURE__ */ vi(Ts, [["__scopeId", "data-v-a55e4bff"]]), Os = 6e4, ks = 36e5, As = 864e5;
|
|
5761
|
+
function js(e, t, n, r) {
|
|
5744
5762
|
let i = new Date(e).getTime();
|
|
5745
5763
|
if (Number.isNaN(i)) return null;
|
|
5746
5764
|
let a = Date.now() - i;
|
|
5747
|
-
if (a < -
|
|
5748
|
-
let o = Math.floor(a /
|
|
5765
|
+
if (a < -Os) return null;
|
|
5766
|
+
let o = Math.floor(a / Os), s = Math.floor(a / ks), c = Math.floor(a / As);
|
|
5749
5767
|
return o < 1 ? t.justNow : o < 60 ? n ? n(t.minutesAgo, { minutes: o }) : t.minutesAgo.replace("{minutes}", String(o)) : s < 24 ? n ? n(t.hoursAgo, { hours: s }) : t.hoursAgo.replace("{hours}", String(s)) : r !== void 0 && c >= r ? null : n ? n(t.daysAgo, { days: c }) : t.daysAgo.replace("{days}", String(c));
|
|
5750
5768
|
}
|
|
5751
5769
|
//#endregion
|
|
5752
5770
|
//#region src/cloud/components/CommentsSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
5753
|
-
var
|
|
5771
|
+
var Ms = {
|
|
5754
5772
|
key: 0,
|
|
5755
5773
|
class: "tpl-comments-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
5756
|
-
},
|
|
5774
|
+
}, Ns = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Ps = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, Fs = {
|
|
5757
5775
|
key: 0,
|
|
5758
5776
|
class: "tpl:ml-1 tpl:inline-flex tpl:size-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)]"
|
|
5759
|
-
},
|
|
5777
|
+
}, Is = { class: "tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2" }, Ls = { class: "tpl:flex-1 tpl:overflow-y-auto" }, Rs = {
|
|
5760
5778
|
key: 0,
|
|
5761
5779
|
class: "tpl:flex tpl:h-full tpl:items-center tpl:justify-center"
|
|
5762
|
-
},
|
|
5780
|
+
}, zs = {
|
|
5763
5781
|
key: 1,
|
|
5764
5782
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:px-6 tpl:text-center"
|
|
5765
|
-
},
|
|
5783
|
+
}, Bs = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Vs = {
|
|
5766
5784
|
key: 2,
|
|
5767
5785
|
class: "tpl:flex tpl:flex-col tpl:gap-3 tpl:p-3"
|
|
5768
|
-
},
|
|
5786
|
+
}, Hs = { class: "tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3" }, Us = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Ws = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, Gs = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ks = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, qs = {
|
|
5769
5787
|
key: 0,
|
|
5770
5788
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
5771
|
-
},
|
|
5789
|
+
}, Js = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, Ys = ["title", "onClick"], Xs = ["title", "onClick"], Zs = ["title", "onClick"], Qs = {
|
|
5772
5790
|
key: 0,
|
|
5773
5791
|
class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-primary)]"
|
|
5774
|
-
},
|
|
5792
|
+
}, $s = {
|
|
5775
5793
|
key: 0,
|
|
5776
5794
|
class: "tpl:mt-1 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-warning-light)] tpl:text-[var(--tpl-warning)]"
|
|
5777
|
-
},
|
|
5795
|
+
}, ec = ["onClick"], tc = {
|
|
5778
5796
|
key: 2,
|
|
5779
5797
|
class: "tpl:mt-2"
|
|
5780
|
-
},
|
|
5798
|
+
}, nc = ["onKeydown"], rc = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, ic = ["disabled", "onClick"], ac = {
|
|
5781
5799
|
key: 3,
|
|
5782
5800
|
class: "tpl:mt-1.5 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
5783
|
-
},
|
|
5801
|
+
}, oc = {
|
|
5784
5802
|
key: 4,
|
|
5785
5803
|
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
|
|
5786
|
-
},
|
|
5804
|
+
}, sc = { class: "tpl:flex-1" }, cc = ["onClick"], lc = {
|
|
5787
5805
|
key: 5,
|
|
5788
5806
|
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2"
|
|
5789
|
-
},
|
|
5807
|
+
}, uc = ["title", "onClick"], dc = ["onClick"], fc = {
|
|
5790
5808
|
key: 0,
|
|
5791
5809
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
5792
|
-
},
|
|
5810
|
+
}, pc = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, mc = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, hc = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, gc = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, _c = {
|
|
5793
5811
|
key: 0,
|
|
5794
5812
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
5795
|
-
},
|
|
5813
|
+
}, vc = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, yc = ["title", "onClick"], bc = ["title", "onClick"], xc = {
|
|
5796
5814
|
key: 0,
|
|
5797
5815
|
class: "tpl:mt-1.5"
|
|
5798
|
-
},
|
|
5816
|
+
}, Sc = ["onKeydown"], Cc = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, wc = ["disabled", "onClick"], Tc = {
|
|
5799
5817
|
key: 1,
|
|
5800
5818
|
class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
5801
|
-
},
|
|
5819
|
+
}, Ec = {
|
|
5802
5820
|
key: 2,
|
|
5803
5821
|
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
|
|
5804
|
-
},
|
|
5822
|
+
}, Dc = { class: "tpl:flex-1" }, Oc = ["onClick"], kc = {
|
|
5805
5823
|
key: 0,
|
|
5806
5824
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
5807
|
-
},
|
|
5825
|
+
}, Ac = { class: "tpl:flex tpl:items-end tpl:gap-2" }, jc = ["placeholder", "onKeydown"], Mc = { class: "tpl:flex tpl:shrink-0 tpl:flex-col tpl:gap-1" }, Nc = ["disabled", "onClick"], Pc = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Fc = {
|
|
5808
5826
|
key: 0,
|
|
5809
5827
|
class: "tpl:flex tpl:min-h-[68px] tpl:items-center tpl:rounded-md tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-warning-light)] tpl:text-[var(--tpl-warning)]"
|
|
5810
|
-
},
|
|
5828
|
+
}, Ic = {
|
|
5811
5829
|
key: 1,
|
|
5812
5830
|
class: "tpl-comments-input-wrapper tpl:flex tpl:min-h-[68px] tpl:items-end tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]"
|
|
5813
|
-
},
|
|
5831
|
+
}, Lc = ["placeholder", "disabled"], Rc = ["disabled"], zc = /* @__PURE__ */ B({
|
|
5814
5832
|
__name: "CommentsSidebar",
|
|
5815
5833
|
props: { visible: { type: Boolean } },
|
|
5816
5834
|
emits: ["close", "filterBlock"],
|
|
5817
5835
|
setup(e, { expose: t, emit: n }) {
|
|
5818
|
-
let r = e, i = n, { format: a } = Y(), { t: o } =
|
|
5836
|
+
let r = e, i = n, { format: a } = Y(), { t: o } = Oi(), s = J(Dn, "CommentsSidebar"), l = J(Yn, "CommentsSidebar"), u = J(Zn, "CommentsSidebar"), d = C("unresolved"), p = C(null), g = C(""), _ = C(null), v = C(""), y = C(null), x = C(""), S = C(/* @__PURE__ */ new Set()), w = C(null), T = C(null), E = O(() => l.userConfig?.id ?? null), ee = O(() => {
|
|
5819
5837
|
let e = /* @__PURE__ */ new Set();
|
|
5820
5838
|
for (let t of s.content.value.blocks) if (e.add(t.id), t.type === "section") for (let n of t.children) for (let t of n) e.add(t.id);
|
|
5821
5839
|
return e;
|
|
@@ -5832,19 +5850,19 @@ var ks = {
|
|
|
5832
5850
|
}), H(() => s.state.selectedBlockId, (e) => {
|
|
5833
5851
|
d.value === "block" && e && (p.value = e);
|
|
5834
5852
|
});
|
|
5835
|
-
function
|
|
5853
|
+
function M(e, t) {
|
|
5836
5854
|
d.value = e, p.value = e === "block" ? t ?? null : null;
|
|
5837
5855
|
}
|
|
5838
|
-
function
|
|
5839
|
-
|
|
5856
|
+
function P(e) {
|
|
5857
|
+
M("block", e), i("filterBlock", e);
|
|
5840
5858
|
}
|
|
5841
|
-
function
|
|
5859
|
+
function oe(e) {
|
|
5842
5860
|
S.value.has(e) ? S.value.delete(e) : S.value.add(e);
|
|
5843
5861
|
}
|
|
5844
|
-
function
|
|
5862
|
+
function se(e) {
|
|
5845
5863
|
_.value = e, v.value = "", y.value = null, S.value.has(e) || S.value.add(e);
|
|
5846
5864
|
}
|
|
5847
|
-
function
|
|
5865
|
+
function ce() {
|
|
5848
5866
|
_.value = null, v.value = "";
|
|
5849
5867
|
}
|
|
5850
5868
|
function le(e) {
|
|
@@ -5880,10 +5898,10 @@ var ks = {
|
|
|
5880
5898
|
await u.toggleResolve(e);
|
|
5881
5899
|
}
|
|
5882
5900
|
function _e(e) {
|
|
5883
|
-
return e.author_identifier ===
|
|
5901
|
+
return e.author_identifier === E.value;
|
|
5884
5902
|
}
|
|
5885
5903
|
function ve(e) {
|
|
5886
|
-
return
|
|
5904
|
+
return js(e, o.snapshotHistory) ?? e;
|
|
5887
5905
|
}
|
|
5888
5906
|
function ye(e) {
|
|
5889
5907
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), fe());
|
|
@@ -5896,13 +5914,13 @@ var ks = {
|
|
|
5896
5914
|
}
|
|
5897
5915
|
function Se() {
|
|
5898
5916
|
m(() => {
|
|
5899
|
-
|
|
5917
|
+
T.value?.focus();
|
|
5900
5918
|
});
|
|
5901
5919
|
}
|
|
5902
5920
|
return t({
|
|
5903
|
-
filterByBlock:
|
|
5921
|
+
filterByBlock: P,
|
|
5904
5922
|
focusNewComment: Se
|
|
5905
|
-
}), (t, n) => (f(),
|
|
5923
|
+
}), (t, n) => (f(), N(ie, {
|
|
5906
5924
|
"enter-active-class": "tpl-comments-slide-enter-active",
|
|
5907
5925
|
"enter-from-class": "tpl:translate-x-full",
|
|
5908
5926
|
"enter-to-class": "tpl:translate-x-0",
|
|
@@ -5910,267 +5928,267 @@ var ks = {
|
|
|
5910
5928
|
"leave-from-class": "tpl:translate-x-0",
|
|
5911
5929
|
"leave-to-class": "tpl:translate-x-full"
|
|
5912
5930
|
}, {
|
|
5913
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
5914
|
-
|
|
5915
|
-
V(
|
|
5931
|
+
default: b(() => [e.visible ? (f(), k("div", Ms, [
|
|
5932
|
+
I("div", Ns, [I("div", Ps, [
|
|
5933
|
+
V(j(Yr), {
|
|
5916
5934
|
size: 13,
|
|
5917
5935
|
"stroke-width": 2
|
|
5918
5936
|
}),
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
]),
|
|
5937
|
+
I("span", null, D(j(o).comments.title), 1),
|
|
5938
|
+
j(u).unresolvedCount.value > 0 ? (f(), k("span", Fs, D(j(u).unresolvedCount.value), 1)) : A("", !0)
|
|
5939
|
+
]), I("button", {
|
|
5922
5940
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
5923
5941
|
onClick: n[0] ||= (e) => i("close")
|
|
5924
|
-
}, [V(
|
|
5942
|
+
}, [V(j(pi), {
|
|
5925
5943
|
size: 14,
|
|
5926
5944
|
"stroke-width": 2
|
|
5927
5945
|
})])]),
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
class:
|
|
5931
|
-
onClick: n[1] ||= (e) =>
|
|
5932
|
-
},
|
|
5933
|
-
|
|
5934
|
-
class:
|
|
5935
|
-
onClick: n[2] ||= (e) =>
|
|
5936
|
-
},
|
|
5937
|
-
|
|
5946
|
+
I("div", Is, [
|
|
5947
|
+
I("button", {
|
|
5948
|
+
class: F(["tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150", d.value === "unresolved" ? "tpl-comment-filter--active" : ""]),
|
|
5949
|
+
onClick: n[1] ||= (e) => M("unresolved")
|
|
5950
|
+
}, D(j(o).comments.filterUnresolved), 3),
|
|
5951
|
+
I("button", {
|
|
5952
|
+
class: F(["tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150", d.value === "all" ? "tpl-comment-filter--active" : ""]),
|
|
5953
|
+
onClick: n[2] ||= (e) => M("all")
|
|
5954
|
+
}, D(j(o).comments.filterAll), 3),
|
|
5955
|
+
j(s).state.selectedBlockId ? (f(), k("button", {
|
|
5938
5956
|
key: 0,
|
|
5939
|
-
class:
|
|
5940
|
-
onClick: n[3] ||= (e) =>
|
|
5941
|
-
},
|
|
5957
|
+
class: F(["tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150", d.value === "block" ? "tpl-comment-filter--active" : ""]),
|
|
5958
|
+
onClick: n[3] ||= (e) => M("block", j(s).state.selectedBlockId ?? void 0)
|
|
5959
|
+
}, D(j(o).comments.filterBlock), 3)) : A("", !0)
|
|
5942
5960
|
]),
|
|
5943
|
-
|
|
5961
|
+
I("div", Ls, [j(u).isLoading.value ? (f(), k("div", Rs, [V(j(Jr), {
|
|
5944
5962
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
5945
5963
|
size: 24,
|
|
5946
5964
|
"stroke-width": 2
|
|
5947
|
-
})])) : re.value.length === 0 ? (f(), k("div",
|
|
5965
|
+
})])) : re.value.length === 0 ? (f(), k("div", zs, [V(j(Yr), {
|
|
5948
5966
|
size: 32,
|
|
5949
5967
|
"stroke-width": 1.5,
|
|
5950
5968
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
5951
|
-
}),
|
|
5969
|
+
}), I("p", Bs, D(d.value === "all" ? j(o).comments.noCommentsHint : j(o).comments.noComments), 1)])) : (f(), k("div", Vs, [(f(!0), k(R, null, h(re.value, (e) => (f(), k("div", {
|
|
5952
5970
|
key: e.id,
|
|
5953
5971
|
class: "tpl-comment-thread"
|
|
5954
5972
|
}, [
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
e.updated_at === e.created_at ? A("", !0) : (f(), k("span",
|
|
5960
|
-
]),
|
|
5961
|
-
|
|
5973
|
+
I("div", Hs, [
|
|
5974
|
+
I("div", Us, [I("div", Ws, [
|
|
5975
|
+
I("span", Gs, D(_e(e) ? j(o).comments.ownedByYou : e.author_name), 1),
|
|
5976
|
+
I("span", Ks, D(ve(e.created_at)), 1),
|
|
5977
|
+
e.updated_at === e.created_at ? A("", !0) : (f(), k("span", qs, " (" + D(j(o).comments.edited) + ") ", 1))
|
|
5978
|
+
]), I("div", Js, [
|
|
5979
|
+
I("button", {
|
|
5962
5980
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
5963
|
-
title: e.resolved_at ?
|
|
5981
|
+
title: e.resolved_at ? j(o).comments.unresolve : j(o).comments.resolve,
|
|
5964
5982
|
onClick: (t) => ge(e.id)
|
|
5965
|
-
}, [V(
|
|
5983
|
+
}, [V(j(Fr), {
|
|
5966
5984
|
size: 13,
|
|
5967
5985
|
"stroke-width": 2,
|
|
5968
5986
|
class: "tpl-resolve-icon",
|
|
5969
|
-
style:
|
|
5970
|
-
}, null, 8, ["style"])], 8,
|
|
5987
|
+
style: L({ color: e.resolved_at ? "var(--tpl-primary)" : void 0 })
|
|
5988
|
+
}, null, 8, ["style"])], 8, Ys),
|
|
5971
5989
|
_e(e) ? (f(), k("button", {
|
|
5972
5990
|
key: 0,
|
|
5973
5991
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
5974
|
-
title:
|
|
5992
|
+
title: j(o).comments.edit,
|
|
5975
5993
|
onClick: (t) => le(e)
|
|
5976
|
-
}, [V(
|
|
5994
|
+
}, [V(j(Zr), {
|
|
5977
5995
|
size: 12,
|
|
5978
5996
|
"stroke-width": 2
|
|
5979
|
-
})], 8,
|
|
5997
|
+
})], 8, Xs)) : A("", !0),
|
|
5980
5998
|
_e(e) ? (f(), k("button", {
|
|
5981
5999
|
key: 1,
|
|
5982
6000
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
5983
|
-
title:
|
|
6001
|
+
title: j(o).comments.delete,
|
|
5984
6002
|
onClick: (t) => ue(e.id)
|
|
5985
|
-
}, [V(
|
|
6003
|
+
}, [V(j(ci), {
|
|
5986
6004
|
size: 12,
|
|
5987
6005
|
"stroke-width": 2
|
|
5988
|
-
})], 8,
|
|
6006
|
+
})], 8, Zs)) : A("", !0)
|
|
5989
6007
|
])]),
|
|
5990
6008
|
V(ie, { name: "tpl-resolve" }, {
|
|
5991
|
-
default: b(() => [e.resolved_at ? (f(), k("div",
|
|
6009
|
+
default: b(() => [e.resolved_at ? (f(), k("div", Qs, [V(j(kr), {
|
|
5992
6010
|
size: 10,
|
|
5993
6011
|
"stroke-width": 2.5
|
|
5994
|
-
}),
|
|
6012
|
+
}), I("span", null, D(j(a)(j(o).comments.resolvedBy, { name: e.resolved_by_name ?? "" })), 1)])) : A("", !0)]),
|
|
5995
6013
|
_: 2
|
|
5996
6014
|
}, 1024),
|
|
5997
|
-
e.block_id && te(e.block_id) ? (f(), k("span",
|
|
6015
|
+
e.block_id && te(e.block_id) ? (f(), k("span", $s, D(j(o).comments.missingBlock), 1)) : e.block_id ? (f(), k("button", {
|
|
5998
6016
|
key: 1,
|
|
5999
6017
|
class: "tpl:mt-1 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]",
|
|
6000
|
-
onClick: (t) =>
|
|
6001
|
-
}, " Block ", 8,
|
|
6002
|
-
y.value === e.id ? (f(), k("div",
|
|
6018
|
+
onClick: (t) => j(s).selectBlock(e.block_id ?? "")
|
|
6019
|
+
}, " Block ", 8, ec)) : A("", !0),
|
|
6020
|
+
y.value === e.id ? (f(), k("div", tc, [c(I("textarea", {
|
|
6003
6021
|
"onUpdate:modelValue": n[4] ||= (e) => x.value = e,
|
|
6004
6022
|
class: "tpl:w-full tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
|
|
6005
6023
|
rows: "3",
|
|
6006
6024
|
onKeydown: (t) => xe(t, e.id)
|
|
6007
|
-
}, null, 40,
|
|
6025
|
+
}, null, 40, nc), [[ae, x.value]]), I("div", rc, [I("button", {
|
|
6008
6026
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
6009
|
-
disabled: !x.value.trim() ||
|
|
6027
|
+
disabled: !x.value.trim() || j(u).isSubmitting.value,
|
|
6010
6028
|
onClick: (t) => me(e.id)
|
|
6011
|
-
},
|
|
6029
|
+
}, D(j(o).comments.save), 9, ic), I("button", {
|
|
6012
6030
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6013
6031
|
onClick: n[5] ||= (e) => B()
|
|
6014
|
-
},
|
|
6015
|
-
w.value === e.id ? (f(), k("div",
|
|
6016
|
-
|
|
6017
|
-
|
|
6032
|
+
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p", ac, D(e.body), 1)),
|
|
6033
|
+
w.value === e.id ? (f(), k("div", oc, [
|
|
6034
|
+
I("span", sc, D(j(o).comments.deleteConfirm), 1),
|
|
6035
|
+
I("button", {
|
|
6018
6036
|
class: "tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-danger)] tpl:text-[var(--tpl-bg)]",
|
|
6019
6037
|
onClick: (t) => he(e.id)
|
|
6020
|
-
},
|
|
6021
|
-
|
|
6038
|
+
}, D(j(o).comments.delete), 9, cc),
|
|
6039
|
+
I("button", {
|
|
6022
6040
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6023
6041
|
onClick: n[6] ||= (e) => de()
|
|
6024
|
-
},
|
|
6042
|
+
}, D(j(o).comments.cancel), 1)
|
|
6025
6043
|
])) : A("", !0),
|
|
6026
|
-
y.value !== e.id && w.value !== e.id ? (f(), k("div",
|
|
6044
|
+
y.value !== e.id && w.value !== e.id ? (f(), k("div", lc, [I("button", {
|
|
6027
6045
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6028
|
-
title:
|
|
6029
|
-
onClick: (t) =>
|
|
6030
|
-
}, [V(
|
|
6046
|
+
title: j(o).comments.reply,
|
|
6047
|
+
onClick: (t) => se(e.id)
|
|
6048
|
+
}, [V(j(ti), {
|
|
6031
6049
|
size: 13,
|
|
6032
6050
|
"stroke-width": 2,
|
|
6033
6051
|
class: "tpl:text-[var(--tpl-primary)]"
|
|
6034
|
-
})], 8,
|
|
6052
|
+
})], 8, uc), (e.replies?.length ?? 0) > 0 ? (f(), k("button", {
|
|
6035
6053
|
key: 0,
|
|
6036
6054
|
class: "tpl:flex tpl:items-center tpl:gap-0.5 tpl:text-[11px] tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6037
|
-
onClick: (t) =>
|
|
6038
|
-
}, [S.value.has(e.id) ? (f(),
|
|
6055
|
+
onClick: (t) => oe(e.id)
|
|
6056
|
+
}, [S.value.has(e.id) ? (f(), N(j(Nr), {
|
|
6039
6057
|
key: 0,
|
|
6040
6058
|
size: 11,
|
|
6041
6059
|
"stroke-width": 2
|
|
6042
|
-
})) : (f(),
|
|
6060
|
+
})) : (f(), N(j(Ar), {
|
|
6043
6061
|
key: 1,
|
|
6044
6062
|
size: 11,
|
|
6045
6063
|
"stroke-width": 2
|
|
6046
|
-
})), z(" " +
|
|
6064
|
+
})), z(" " + D((e.replies?.length ?? 0) === 1 ? j(a)(j(o).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : j(a)(j(o).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8, dc)) : A("", !0)])) : A("", !0)
|
|
6047
6065
|
]),
|
|
6048
6066
|
V(ie, { name: "tpl-replies" }, {
|
|
6049
|
-
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), k("div",
|
|
6067
|
+
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), k("div", fc, [(f(!0), k(R, null, h(e.replies, (t, r) => (f(), k("div", {
|
|
6050
6068
|
key: t.id,
|
|
6051
|
-
class:
|
|
6069
|
+
class: F(["tpl-comment-reply-card tpl:relative tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-2.5", r < (e.replies?.length ?? 0) - 1 ? "tpl:mb-2" : ""])
|
|
6052
6070
|
}, [
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
t.updated_at === t.created_at ? A("", !0) : (f(), k("span",
|
|
6057
|
-
]),
|
|
6071
|
+
I("div", pc, [I("div", mc, [
|
|
6072
|
+
I("span", hc, D(_e(t) ? j(o).comments.ownedByYou : t.author_name), 1),
|
|
6073
|
+
I("span", gc, D(ve(t.created_at)), 1),
|
|
6074
|
+
t.updated_at === t.created_at ? A("", !0) : (f(), k("span", _c, " (" + D(j(o).comments.edited) + ") ", 1))
|
|
6075
|
+
]), I("div", vc, [_e(t) ? (f(), k("button", {
|
|
6058
6076
|
key: 0,
|
|
6059
6077
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6060
|
-
title:
|
|
6078
|
+
title: j(o).comments.edit,
|
|
6061
6079
|
onClick: (e) => le(t)
|
|
6062
|
-
}, [V(
|
|
6080
|
+
}, [V(j(Zr), {
|
|
6063
6081
|
size: 11,
|
|
6064
6082
|
"stroke-width": 2
|
|
6065
|
-
})], 8,
|
|
6083
|
+
})], 8, yc)) : A("", !0), _e(t) ? (f(), k("button", {
|
|
6066
6084
|
key: 1,
|
|
6067
6085
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6068
|
-
title:
|
|
6086
|
+
title: j(o).comments.delete,
|
|
6069
6087
|
onClick: (e) => ue(t.id)
|
|
6070
|
-
}, [V(
|
|
6088
|
+
}, [V(j(ci), {
|
|
6071
6089
|
size: 11,
|
|
6072
6090
|
"stroke-width": 2
|
|
6073
|
-
})], 8,
|
|
6074
|
-
y.value === t.id ? (f(), k("div",
|
|
6091
|
+
})], 8, bc)) : A("", !0)])]),
|
|
6092
|
+
y.value === t.id ? (f(), k("div", xc, [c(I("textarea", {
|
|
6075
6093
|
"onUpdate:modelValue": n[7] ||= (e) => x.value = e,
|
|
6076
6094
|
class: "tpl:w-full tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
|
|
6077
6095
|
rows: "2",
|
|
6078
6096
|
onKeydown: (e) => xe(e, t.id)
|
|
6079
|
-
}, null, 40,
|
|
6097
|
+
}, null, 40, Sc), [[ae, x.value]]), I("div", Cc, [I("button", {
|
|
6080
6098
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
6081
|
-
disabled: !x.value.trim() ||
|
|
6099
|
+
disabled: !x.value.trim() || j(u).isSubmitting.value,
|
|
6082
6100
|
onClick: (e) => me(t.id)
|
|
6083
|
-
},
|
|
6101
|
+
}, D(j(o).comments.save), 9, wc), I("button", {
|
|
6084
6102
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6085
6103
|
onClick: n[8] ||= (e) => B()
|
|
6086
|
-
},
|
|
6087
|
-
w.value === t.id ? (f(), k("div",
|
|
6088
|
-
|
|
6089
|
-
|
|
6104
|
+
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p", Tc, D(t.body), 1)),
|
|
6105
|
+
w.value === t.id ? (f(), k("div", Ec, [
|
|
6106
|
+
I("span", Dc, D(j(o).comments.deleteConfirm), 1),
|
|
6107
|
+
I("button", {
|
|
6090
6108
|
class: "tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-danger)] tpl:text-[var(--tpl-bg)]",
|
|
6091
6109
|
onClick: (e) => he(t.id)
|
|
6092
|
-
},
|
|
6093
|
-
|
|
6110
|
+
}, D(j(o).comments.delete), 9, Oc),
|
|
6111
|
+
I("button", {
|
|
6094
6112
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6095
6113
|
onClick: n[9] ||= (e) => de()
|
|
6096
|
-
},
|
|
6114
|
+
}, D(j(o).comments.cancel), 1)
|
|
6097
6115
|
])) : A("", !0)
|
|
6098
6116
|
], 2))), 128))])) : A("", !0)]),
|
|
6099
6117
|
_: 2
|
|
6100
6118
|
}, 1024),
|
|
6101
6119
|
V(ie, { name: "tpl-replies" }, {
|
|
6102
|
-
default: b(() => [_.value === e.id ? (f(), k("div",
|
|
6120
|
+
default: b(() => [_.value === e.id ? (f(), k("div", kc, [I("div", Ac, [c(I("textarea", {
|
|
6103
6121
|
"onUpdate:modelValue": n[10] ||= (e) => v.value = e,
|
|
6104
6122
|
class: "tpl:flex-1 tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
|
|
6105
|
-
placeholder:
|
|
6123
|
+
placeholder: j(o).comments.replyPlaceholder,
|
|
6106
6124
|
rows: "2",
|
|
6107
6125
|
onKeydown: (t) => be(t, e.id)
|
|
6108
|
-
}, null, 40,
|
|
6126
|
+
}, null, 40, jc), [[ae, v.value]]), I("div", Mc, [I("button", {
|
|
6109
6127
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-colors tpl:duration-150 tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
|
|
6110
|
-
disabled: !v.value.trim() ||
|
|
6128
|
+
disabled: !v.value.trim() || j(u).isSubmitting.value,
|
|
6111
6129
|
onClick: (t) => pe(e.id)
|
|
6112
|
-
}, [V(
|
|
6130
|
+
}, [V(j(ni), {
|
|
6113
6131
|
size: 14,
|
|
6114
6132
|
"stroke-width": 2
|
|
6115
|
-
})], 8,
|
|
6133
|
+
})], 8, Nc), I("button", {
|
|
6116
6134
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6117
|
-
onClick: n[11] ||= (e) =>
|
|
6118
|
-
}, [V(
|
|
6135
|
+
onClick: n[11] ||= (e) => ce()
|
|
6136
|
+
}, [V(j(pi), {
|
|
6119
6137
|
size: 14,
|
|
6120
6138
|
"stroke-width": 2
|
|
6121
6139
|
})])])])])) : A("", !0)]),
|
|
6122
6140
|
_: 2
|
|
6123
6141
|
}, 1024)
|
|
6124
6142
|
]))), 128))]))]),
|
|
6125
|
-
|
|
6143
|
+
I("div", Pc, [ne.value ? (f(), k("div", Fc, D(j(o).comments.saveTemplateFirst), 1)) : (f(), k("div", Ic, [c(I("textarea", {
|
|
6126
6144
|
ref_key: "newCommentInput",
|
|
6127
|
-
ref:
|
|
6145
|
+
ref: T,
|
|
6128
6146
|
"onUpdate:modelValue": n[12] ||= (e) => g.value = e,
|
|
6129
6147
|
class: "tpl:max-h-24 tpl:min-h-[48px] tpl:flex-1 tpl:resize-none tpl:border-none tpl:bg-transparent tpl:font-sans tpl:text-xs tpl:outline-none tpl:text-[var(--tpl-text)]",
|
|
6130
|
-
placeholder:
|
|
6131
|
-
disabled:
|
|
6148
|
+
placeholder: j(o).comments.placeholder,
|
|
6149
|
+
disabled: j(u).isSubmitting.value,
|
|
6132
6150
|
rows: "2",
|
|
6133
6151
|
onKeydown: ye
|
|
6134
|
-
}, null, 40,
|
|
6152
|
+
}, null, 40, Lc), [[ae, g.value]]), I("button", {
|
|
6135
6153
|
class: "tpl-comments-send-btn tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:duration-150 tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
|
|
6136
|
-
disabled: !g.value.trim() ||
|
|
6154
|
+
disabled: !g.value.trim() || j(u).isSubmitting.value,
|
|
6137
6155
|
onClick: fe
|
|
6138
|
-
}, [
|
|
6156
|
+
}, [j(u).isSubmitting.value ? (f(), N(j(Jr), {
|
|
6139
6157
|
key: 0,
|
|
6140
6158
|
class: "tpl-spinner",
|
|
6141
6159
|
size: 16,
|
|
6142
6160
|
"stroke-width": 2
|
|
6143
|
-
})) : (f(),
|
|
6161
|
+
})) : (f(), N(j(ni), {
|
|
6144
6162
|
key: 1,
|
|
6145
6163
|
size: 16,
|
|
6146
6164
|
"stroke-width": 2
|
|
6147
|
-
}))], 8,
|
|
6165
|
+
}))], 8, Rc)]))])
|
|
6148
6166
|
])) : A("", !0)]),
|
|
6149
6167
|
_: 1
|
|
6150
6168
|
}));
|
|
6151
6169
|
}
|
|
6152
|
-
}),
|
|
6170
|
+
}), Bc = /* @__PURE__ */ e({ default: () => Vc }), Vc = /* @__PURE__ */ vi(zc, [["__scopeId", "data-v-d204f573"]]), Hc = {
|
|
6153
6171
|
key: 0,
|
|
6154
6172
|
class: "tpl-design-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
6155
|
-
},
|
|
6173
|
+
}, Uc = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Wc = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, Gc = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Kc = {
|
|
6156
6174
|
key: 0,
|
|
6157
6175
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6158
|
-
},
|
|
6176
|
+
}, qc = { class: "tpl:flex tpl:w-full tpl:flex-col tpl:items-center tpl:gap-3" }, Jc = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Yc = {
|
|
6159
6177
|
key: 1,
|
|
6160
6178
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6161
|
-
},
|
|
6179
|
+
}, Xc = { class: "tpl:flex tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, Zc = {
|
|
6162
6180
|
key: 0,
|
|
6163
6181
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6164
|
-
},
|
|
6182
|
+
}, Qc = { class: "tpl:relative tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, $c = ["src", "alt"], el = {
|
|
6165
6183
|
key: 1,
|
|
6166
6184
|
class: "tpl:flex tpl:h-32 tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2"
|
|
6167
|
-
},
|
|
6185
|
+
}, tl = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, nl = { class: "tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, rl = { class: "tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, il = ["accept"], al = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, ol = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, sl = ["placeholder"], cl = {
|
|
6168
6186
|
key: 0,
|
|
6169
6187
|
class: "tpl:flex tpl:flex-col tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:px-3 tpl:py-3 tpl:bg-[var(--tpl-warning-light)] tpl:border tpl:border-[var(--tpl-warning)]"
|
|
6170
|
-
},
|
|
6188
|
+
}, ll = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, ul = { class: "tpl:flex tpl:gap-2" }, dl = {
|
|
6171
6189
|
key: 1,
|
|
6172
6190
|
class: "tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
|
|
6173
|
-
},
|
|
6191
|
+
}, fl = ["disabled"], pl = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, ml = /* @__PURE__ */ B({
|
|
6174
6192
|
__name: "DesignReferenceSidebar",
|
|
6175
6193
|
props: {
|
|
6176
6194
|
visible: { type: Boolean },
|
|
@@ -6178,8 +6196,8 @@ var ks = {
|
|
|
6178
6196
|
},
|
|
6179
6197
|
emits: ["close", "apply"],
|
|
6180
6198
|
setup(e, { emit: t }) {
|
|
6181
|
-
let n = e, r = t, { t: i } =
|
|
6182
|
-
authManager: J(
|
|
6199
|
+
let n = e, r = t, { t: i } = Oi(), a = J(Dn, "DesignReferenceSidebar"), o = Po({
|
|
6200
|
+
authManager: J(Yn, "DesignReferenceSidebar"),
|
|
6183
6201
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
6184
6202
|
onApply: (e) => r("apply", e)
|
|
6185
6203
|
}), s = C(null), l = C("image"), u = C(null), d = C(""), p = C(null), m = C(!1), h = C(!1), g = O(() => o.isGenerating.value ? !1 : u.value !== null);
|
|
@@ -6220,12 +6238,12 @@ var ks = {
|
|
|
6220
6238
|
function w() {
|
|
6221
6239
|
h.value = !1;
|
|
6222
6240
|
}
|
|
6223
|
-
function
|
|
6241
|
+
function T(e) {
|
|
6224
6242
|
e.preventDefault(), h.value = !1;
|
|
6225
6243
|
let t = e.dataTransfer?.files?.[0];
|
|
6226
6244
|
t && y(t);
|
|
6227
6245
|
}
|
|
6228
|
-
function
|
|
6246
|
+
function E() {
|
|
6229
6247
|
if (!g.value) return;
|
|
6230
6248
|
if (n.hasExistingBlocks && !m.value) {
|
|
6231
6249
|
m.value = !0;
|
|
@@ -6242,7 +6260,7 @@ var ks = {
|
|
|
6242
6260
|
e || (m.value = !1);
|
|
6243
6261
|
}), re(() => {
|
|
6244
6262
|
p.value &&= (URL.revokeObjectURL(p.value), null);
|
|
6245
|
-
}), (t, n) => (f(),
|
|
6263
|
+
}), (t, n) => (f(), N(ie, {
|
|
6246
6264
|
"enter-active-class": "tpl-design-slide-enter-active",
|
|
6247
6265
|
"enter-from-class": "tpl:translate-x-full",
|
|
6248
6266
|
"enter-to-class": "tpl:translate-x-0",
|
|
@@ -6250,126 +6268,137 @@ var ks = {
|
|
|
6250
6268
|
"leave-from-class": "tpl:translate-x-0",
|
|
6251
6269
|
"leave-to-class": "tpl:translate-x-full"
|
|
6252
6270
|
}, {
|
|
6253
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
6271
|
+
default: b(() => [e.visible ? (f(), k("div", Hc, [I("div", Uc, [I("div", Wc, [V(j(Gr), {
|
|
6254
6272
|
size: 13,
|
|
6255
6273
|
"stroke-width": 2
|
|
6256
|
-
}),
|
|
6274
|
+
}), I("span", null, D(j(i).designReference.title), 1)]), I("button", {
|
|
6257
6275
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6258
6276
|
onClick: n[0] ||= (e) => r("close")
|
|
6259
|
-
}, [V(
|
|
6277
|
+
}, [V(j(pi), {
|
|
6260
6278
|
size: 14,
|
|
6261
6279
|
"stroke-width": 2
|
|
6262
|
-
})])]),
|
|
6263
|
-
|
|
6280
|
+
})])]), I("div", Gc, [j(o).isGenerating.value ? (f(), k("div", Kc, [I("div", qc, [V(Si), I("p", Jc, D(j(i).designReference.generating), 1)])])) : (f(), k("div", Yc, [
|
|
6281
|
+
I("div", Xc, [I("button", {
|
|
6264
6282
|
class: "tpl:flex tpl:flex-1 tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-2 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
6265
|
-
style:
|
|
6283
|
+
style: L({
|
|
6266
6284
|
backgroundColor: l.value === "image" ? "var(--tpl-bg)" : "transparent",
|
|
6267
6285
|
color: l.value === "image" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
6268
6286
|
boxShadow: l.value === "image" ? "var(--tpl-shadow)" : "none"
|
|
6269
6287
|
}),
|
|
6270
6288
|
onClick: n[1] ||= (e) => _("image")
|
|
6271
|
-
}, [V(
|
|
6289
|
+
}, [V(j(Vr), {
|
|
6272
6290
|
size: 12,
|
|
6273
6291
|
"stroke-width": 2
|
|
6274
|
-
}), z(" " +
|
|
6292
|
+
}), z(" " + D(j(i).designReference.uploadImage), 1)], 4), I("button", {
|
|
6275
6293
|
class: "tpl:flex tpl:flex-1 tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-2 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
6276
|
-
style:
|
|
6294
|
+
style: L({
|
|
6277
6295
|
backgroundColor: l.value === "pdf" ? "var(--tpl-bg)" : "transparent",
|
|
6278
6296
|
color: l.value === "pdf" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
6279
6297
|
boxShadow: l.value === "pdf" ? "var(--tpl-shadow)" : "none"
|
|
6280
6298
|
}),
|
|
6281
6299
|
onClick: n[2] ||= (e) => _("pdf")
|
|
6282
|
-
}, [V(
|
|
6300
|
+
}, [V(j(Hr), {
|
|
6283
6301
|
size: 12,
|
|
6284
6302
|
"stroke-width": 2
|
|
6285
|
-
}), z(" " +
|
|
6286
|
-
|
|
6303
|
+
}), z(" " + D(j(i).designReference.uploadPdf), 1)], 4)]),
|
|
6304
|
+
I("div", null, [u.value ? (f(), k("div", Zc, [I("div", Qc, [p.value ? (f(), k("img", {
|
|
6287
6305
|
key: 0,
|
|
6288
6306
|
src: p.value,
|
|
6289
6307
|
alt: u.value.name,
|
|
6290
6308
|
class: "tpl:h-auto tpl:max-h-48 tpl:w-full tpl:object-contain"
|
|
6291
|
-
}, null, 8,
|
|
6309
|
+
}, null, 8, $c)) : (f(), k("div", el, [V(j(Hr), {
|
|
6292
6310
|
size: 32,
|
|
6293
6311
|
"stroke-width": 1.5,
|
|
6294
6312
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6295
|
-
}),
|
|
6313
|
+
}), I("span", tl, D(u.value.name), 1)])), I("button", {
|
|
6296
6314
|
class: "tpl:absolute tpl:top-2 tpl:right-2 tpl:rounded-full tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow)]",
|
|
6297
6315
|
onClick: x
|
|
6298
|
-
}, [V(
|
|
6316
|
+
}, [V(j(pi), {
|
|
6299
6317
|
size: 12,
|
|
6300
6318
|
"stroke-width": 2
|
|
6301
6319
|
})])])])) : (f(), k("div", {
|
|
6302
6320
|
key: 1,
|
|
6303
6321
|
class: "tpl-design-dropzone tpl:flex tpl:cursor-pointer tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border-2 tpl:border-dashed tpl:px-4 tpl:py-8 tpl:transition-colors tpl:duration-150",
|
|
6304
|
-
style:
|
|
6322
|
+
style: L({
|
|
6305
6323
|
borderColor: h.value ? "var(--tpl-primary)" : "var(--tpl-border-light)",
|
|
6306
6324
|
backgroundColor: h.value ? "var(--tpl-primary-light)" : "var(--tpl-bg)"
|
|
6307
6325
|
}),
|
|
6308
6326
|
onClick: n[3] ||= (e) => s.value?.click(),
|
|
6309
6327
|
onDragover: S,
|
|
6310
6328
|
onDragleave: w,
|
|
6311
|
-
onDrop:
|
|
6329
|
+
onDrop: T
|
|
6312
6330
|
}, [
|
|
6313
|
-
V(
|
|
6331
|
+
V(j(di), {
|
|
6314
6332
|
size: 24,
|
|
6315
6333
|
"stroke-width": 1.5,
|
|
6316
6334
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6317
6335
|
}),
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
], 36)),
|
|
6336
|
+
I("span", nl, D(j(i).designReference.dropHint), 1),
|
|
6337
|
+
I("span", rl, D(l.value === "image" ? j(i).designReference.acceptedImages : j(i).designReference.acceptedPdf), 1)
|
|
6338
|
+
], 36)), I("input", {
|
|
6321
6339
|
ref_key: "fileInput",
|
|
6322
6340
|
ref: s,
|
|
6323
6341
|
type: "file",
|
|
6324
6342
|
class: "tpl:hidden",
|
|
6325
6343
|
accept: l.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
|
|
6326
6344
|
onChange: v
|
|
6327
|
-
}, null, 40,
|
|
6328
|
-
|
|
6345
|
+
}, null, 40, il)]),
|
|
6346
|
+
I("div", al, [I("label", ol, D(j(i).designReference.promptLabel), 1), c(I("textarea", {
|
|
6329
6347
|
"onUpdate:modelValue": n[4] ||= (e) => d.value = e,
|
|
6330
|
-
class:
|
|
6331
|
-
placeholder:
|
|
6348
|
+
class: F(["tpl:min-h-[72px] tpl:w-full tpl:resize-none tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:font-sans tpl:text-sm tpl:outline-none tpl:transition-colors tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", ["tpl-design-prompt-input"]]),
|
|
6349
|
+
placeholder: j(i).designReference.promptPlaceholder,
|
|
6332
6350
|
rows: "3"
|
|
6333
|
-
}, null, 8,
|
|
6334
|
-
m.value ? (f(), k("div",
|
|
6351
|
+
}, null, 8, sl), [[ae, d.value]])]),
|
|
6352
|
+
m.value ? (f(), k("div", cl, [I("p", ll, D(j(i).designReference.replaceWarning), 1), I("div", ul, [I("button", {
|
|
6335
6353
|
class: "tpl:flex-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:text-[var(--tpl-text-muted)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
6336
6354
|
style: { "background-color": "transparent" },
|
|
6337
6355
|
onClick: ee
|
|
6338
|
-
},
|
|
6356
|
+
}, D(j(i).designReference.replaceCancel), 1), I("button", {
|
|
6339
6357
|
class: "tpl:flex-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
6340
|
-
onClick:
|
|
6341
|
-
},
|
|
6342
|
-
|
|
6358
|
+
onClick: E
|
|
6359
|
+
}, D(j(i).designReference.replaceConfirm), 1)])])) : A("", !0),
|
|
6360
|
+
j(o).error.value ? (f(), k("div", dl, [V(j(Pr), {
|
|
6343
6361
|
size: 14,
|
|
6344
6362
|
"stroke-width": 2,
|
|
6345
6363
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
6346
|
-
}),
|
|
6364
|
+
}), I("span", null, D(j(i).designReference.error), 1)])) : A("", !0),
|
|
6347
6365
|
m.value ? A("", !0) : (f(), k("button", {
|
|
6348
6366
|
key: 2,
|
|
6349
6367
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
6350
6368
|
disabled: !g.value,
|
|
6351
|
-
onClick:
|
|
6352
|
-
}, [V(
|
|
6369
|
+
onClick: E
|
|
6370
|
+
}, [V(j(Gr), {
|
|
6353
6371
|
size: 16,
|
|
6354
6372
|
"stroke-width": 2
|
|
6355
|
-
}), z(" " +
|
|
6356
|
-
|
|
6373
|
+
}), z(" " + D(j(i).designReference.generate), 1)], 8, fl)),
|
|
6374
|
+
I("p", pl, D(j(i).aiMenu.disclaimer), 1)
|
|
6357
6375
|
]))])])) : A("", !0)]),
|
|
6358
6376
|
_: 1
|
|
6359
6377
|
}));
|
|
6360
6378
|
}
|
|
6361
|
-
}),
|
|
6379
|
+
}), hl = /* @__PURE__ */ e({ default: () => gl }), gl = /* @__PURE__ */ vi(ml, [["__scopeId", "data-v-bdbf8d0d"]]);
|
|
6380
|
+
//#endregion
|
|
6381
|
+
//#region src/composables/usePopoverRoot.ts
|
|
6382
|
+
function _l() {
|
|
6383
|
+
return v(Jn, C(null));
|
|
6384
|
+
}
|
|
6385
|
+
//#endregion
|
|
6386
|
+
//#region src/cloud/components/TplModal.vue?vue&type=script&setup=true&lang.ts
|
|
6387
|
+
var vl = ["data-tpl-theme"], yl = /* @__PURE__ */ B({
|
|
6362
6388
|
__name: "TplModal",
|
|
6363
6389
|
props: { visible: { type: Boolean } },
|
|
6364
6390
|
emits: ["close", "keydown"],
|
|
6365
6391
|
setup(e, { emit: t }) {
|
|
6366
6392
|
let n = e, r = t, i = C(null);
|
|
6367
|
-
|
|
6368
|
-
let a = v(Nn);
|
|
6369
|
-
function
|
|
6393
|
+
Ti(i, O(() => n.visible));
|
|
6394
|
+
let a = v(Nn), s = _l();
|
|
6395
|
+
function c(e) {
|
|
6370
6396
|
e.key === "Escape" && r("close"), r("keydown", e);
|
|
6371
6397
|
}
|
|
6372
|
-
return (t, n) => (f(),
|
|
6398
|
+
return (t, n) => j(s) ? (f(), N(te, {
|
|
6399
|
+
key: 0,
|
|
6400
|
+
to: j(s)
|
|
6401
|
+
}, [V(ie, {
|
|
6373
6402
|
"enter-active-class": "tpl:transition tpl:duration-150",
|
|
6374
6403
|
"enter-from-class": "tpl:opacity-0",
|
|
6375
6404
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -6379,42 +6408,42 @@ var ks = {
|
|
|
6379
6408
|
}, {
|
|
6380
6409
|
default: b(() => [e.visible ? (f(), k("div", {
|
|
6381
6410
|
key: 0,
|
|
6382
|
-
"data-tpl-theme":
|
|
6411
|
+
"data-tpl-theme": j(a),
|
|
6383
6412
|
class: "tpl tpl:fixed tpl:inset-0 tpl:z-modal tpl:flex tpl:items-center tpl:justify-center",
|
|
6384
6413
|
style: {
|
|
6385
6414
|
"background-color": "var(--tpl-overlay)",
|
|
6386
6415
|
"backdrop-filter": "blur(8px)",
|
|
6387
6416
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
6388
6417
|
},
|
|
6389
|
-
onClick: n[0] ||=
|
|
6390
|
-
onKeydown:
|
|
6391
|
-
}, [
|
|
6418
|
+
onClick: n[0] ||= M((e) => r("close"), ["self"]),
|
|
6419
|
+
onKeydown: c
|
|
6420
|
+
}, [I("div", {
|
|
6392
6421
|
ref_key: "dialogRef",
|
|
6393
6422
|
ref: i
|
|
6394
|
-
}, [o(t.$slots, "default")], 512)], 40,
|
|
6423
|
+
}, [o(t.$slots, "default")], 512)], 40, vl)) : A("", !0)]),
|
|
6395
6424
|
_: 3
|
|
6396
|
-
})]));
|
|
6425
|
+
})], 8, ["to"])) : A("", !0);
|
|
6397
6426
|
}
|
|
6398
|
-
}),
|
|
6427
|
+
}), bl = ["disabled", "title"], xl = ["title"], Sl = {
|
|
6399
6428
|
key: 0,
|
|
6400
6429
|
class: "tpl-scale-in tpl:absolute tpl:top-full tpl:left-1/2 tpl:z-50 tpl:mt-2 tpl:w-72 tpl:-translate-x-1/2 tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg-elevated)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]",
|
|
6401
6430
|
style: {
|
|
6402
6431
|
"backdrop-filter": "blur(8px)",
|
|
6403
6432
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
6404
6433
|
}
|
|
6405
|
-
},
|
|
6434
|
+
}, Cl = { class: "tpl:border-b tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)] tpl:border-[var(--tpl-border)]" }, wl = {
|
|
6406
6435
|
key: 0,
|
|
6407
6436
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8"
|
|
6408
|
-
},
|
|
6437
|
+
}, Tl = {
|
|
6409
6438
|
key: 1,
|
|
6410
6439
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
6411
|
-
},
|
|
6440
|
+
}, El = {
|
|
6412
6441
|
key: 2,
|
|
6413
6442
|
class: "tpl:max-h-64 tpl:overflow-y-auto"
|
|
6414
|
-
},
|
|
6443
|
+
}, Dl = ["disabled", "onClick"], Ol = { class: "tpl:flex tpl:flex-col tpl:gap-0.5" }, kl = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Al = {
|
|
6415
6444
|
key: 0,
|
|
6416
6445
|
class: "tpl:rounded tpl:px-1 tpl:py-0.5 tpl:text-[10px] tpl:font-normal tpl:bg-[var(--tpl-bg-active)] tpl:text-[var(--tpl-text-muted)]"
|
|
6417
|
-
},
|
|
6446
|
+
}, jl = ["disabled", "title"], Ml = /* @__PURE__ */ B({
|
|
6418
6447
|
__name: "SnapshotHistory",
|
|
6419
6448
|
props: {
|
|
6420
6449
|
snapshots: {},
|
|
@@ -6423,7 +6452,7 @@ var ks = {
|
|
|
6423
6452
|
},
|
|
6424
6453
|
emits: ["load", "navigate"],
|
|
6425
6454
|
setup(e, { emit: t }) {
|
|
6426
|
-
let n = e, r = t, { format: i } = Y(), { t: a } =
|
|
6455
|
+
let n = e, r = t, { format: i } = Y(), { t: a } = Oi(), o = C(!1), s = C(null), c = C(-1);
|
|
6427
6456
|
H(() => n.snapshots.length, () => {
|
|
6428
6457
|
c.value = -1;
|
|
6429
6458
|
});
|
|
@@ -6442,7 +6471,7 @@ var ks = {
|
|
|
6442
6471
|
t !== -1 && (c.value = t, r("navigate", n.snapshots[t])), o.value = !1;
|
|
6443
6472
|
}
|
|
6444
6473
|
function _(e) {
|
|
6445
|
-
let t =
|
|
6474
|
+
let t = js(e, a.snapshotHistory, i, 7);
|
|
6446
6475
|
return t === null ? new Date(e).toLocaleDateString(void 0, {
|
|
6447
6476
|
month: "short",
|
|
6448
6477
|
day: "numeric",
|
|
@@ -6457,114 +6486,114 @@ var ks = {
|
|
|
6457
6486
|
ref: s,
|
|
6458
6487
|
class: "tpl:relative tpl:flex tpl:items-center tpl:gap-0.5"
|
|
6459
6488
|
}, [
|
|
6460
|
-
|
|
6489
|
+
I("button", {
|
|
6461
6490
|
class: "tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:duration-150 hover:tpl:bg-[var(--tpl-bg-hover)] disabled:tpl:cursor-not-allowed disabled:tpl:opacity-30 disabled:hover:tpl:bg-transparent tpl:text-[var(--tpl-text-muted)]",
|
|
6462
6491
|
disabled: !u.value,
|
|
6463
|
-
title:
|
|
6464
|
-
onClick:
|
|
6465
|
-
}, [V(
|
|
6492
|
+
title: j(a).snapshotHistory.olderSnapshot,
|
|
6493
|
+
onClick: M(p, ["stop"])
|
|
6494
|
+
}, [V(j(jr), {
|
|
6466
6495
|
size: 14,
|
|
6467
6496
|
"stroke-width": 2
|
|
6468
|
-
})], 8,
|
|
6469
|
-
|
|
6497
|
+
})], 8, bl),
|
|
6498
|
+
I("button", {
|
|
6470
6499
|
class: "tpl:flex tpl:h-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-1.5 tpl:transition-colors tpl:duration-150 hover:tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]",
|
|
6471
|
-
title:
|
|
6472
|
-
onClick:
|
|
6473
|
-
}, [V(
|
|
6500
|
+
title: j(a).snapshotHistory.tooltip,
|
|
6501
|
+
onClick: M(m, ["stop"])
|
|
6502
|
+
}, [V(j(Ir), {
|
|
6474
6503
|
size: 16,
|
|
6475
6504
|
"stroke-width": 1.5
|
|
6476
|
-
}), V(
|
|
6477
|
-
class:
|
|
6505
|
+
}), V(j(Ar), {
|
|
6506
|
+
class: F(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-180": o.value }]),
|
|
6478
6507
|
size: 10,
|
|
6479
6508
|
"stroke-width": 2
|
|
6480
|
-
}, null, 8, ["class"])], 8,
|
|
6509
|
+
}, null, 8, ["class"])], 8, xl),
|
|
6481
6510
|
V(ie, { name: "tpl-dropdown" }, {
|
|
6482
|
-
default: b(() => [o.value ? (f(), k("div",
|
|
6511
|
+
default: b(() => [o.value ? (f(), k("div", Sl, [I("div", Cl, D(j(a).snapshotHistory.dropdownTitle), 1), e.isLoading ? (f(), k("div", wl, [V(j(Jr), {
|
|
6483
6512
|
class: "tpl:animate-spin tpl:text-[var(--tpl-primary)]",
|
|
6484
6513
|
size: 20,
|
|
6485
6514
|
"stroke-width": 2
|
|
6486
|
-
})])) : e.snapshots.length === 0 ? (f(), k("div",
|
|
6515
|
+
})])) : e.snapshots.length === 0 ? (f(), k("div", Tl, D(j(a).snapshotHistory.noSnapshots), 1)) : (f(), k("div", El, [(f(!0), k(R, null, h(e.snapshots, (t) => (f(), k("button", {
|
|
6487
6516
|
key: t.id,
|
|
6488
6517
|
class: "tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:border-b tpl:border-b-[var(--tpl-border-light)] tpl:border-l-2 tpl:border-l-transparent tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-all tpl:duration-150 last:tpl:border-b-0 hover:tpl:border-l-[var(--tpl-primary)] hover:tpl:bg-[var(--tpl-bg-hover)]",
|
|
6489
6518
|
style: { "background-color": "transparent" },
|
|
6490
6519
|
disabled: e.isRestoring,
|
|
6491
6520
|
onClick: (e) => g(t.id)
|
|
6492
|
-
}, [
|
|
6521
|
+
}, [I("div", Ol, [I("div", kl, [I("span", null, D(_(t.created_at)), 1), t.is_autosave ? (f(), k("span", Al, D(j(a).snapshotHistory.auto), 1)) : A("", !0)])])], 8, Dl))), 128))]))])) : A("", !0)]),
|
|
6493
6522
|
_: 1
|
|
6494
6523
|
}),
|
|
6495
|
-
|
|
6524
|
+
I("button", {
|
|
6496
6525
|
class: "tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:duration-150 hover:tpl:bg-[var(--tpl-bg-hover)] disabled:tpl:cursor-not-allowed disabled:tpl:opacity-30 disabled:hover:tpl:bg-transparent tpl:text-[var(--tpl-text-muted)]",
|
|
6497
6526
|
disabled: !l.value,
|
|
6498
|
-
title:
|
|
6499
|
-
onClick:
|
|
6500
|
-
}, [V(
|
|
6527
|
+
title: j(a).snapshotHistory.newerSnapshot,
|
|
6528
|
+
onClick: M(d, ["stop"])
|
|
6529
|
+
}, [V(j(Mr), {
|
|
6501
6530
|
size: 14,
|
|
6502
6531
|
"stroke-width": 2
|
|
6503
|
-
})], 8,
|
|
6532
|
+
})], 8, jl)
|
|
6504
6533
|
], 512));
|
|
6505
6534
|
}
|
|
6506
|
-
}),
|
|
6535
|
+
}), Nl = /* @__PURE__ */ e({ default: () => Pl }), Pl = Ml;
|
|
6507
6536
|
//#endregion
|
|
6508
6537
|
//#region src/cloud/utils/scoringStyles.ts
|
|
6509
|
-
function
|
|
6538
|
+
function Fl(e) {
|
|
6510
6539
|
return e >= 80 ? "var(--tpl-success)" : e >= 60 ? "var(--tpl-warning)" : "var(--tpl-danger)";
|
|
6511
6540
|
}
|
|
6512
|
-
function
|
|
6541
|
+
function Il(e) {
|
|
6513
6542
|
return e >= 80 ? "var(--tpl-success-light)" : e >= 60 ? "var(--tpl-warning-light)" : "var(--tpl-danger-light)";
|
|
6514
6543
|
}
|
|
6515
|
-
function
|
|
6544
|
+
function Ll(e) {
|
|
6516
6545
|
return e === "high" ? "var(--tpl-danger)" : e === "medium" ? "var(--tpl-warning)" : "var(--tpl-text-muted)";
|
|
6517
6546
|
}
|
|
6518
|
-
function
|
|
6547
|
+
function Rl(e) {
|
|
6519
6548
|
return e === "high" ? "var(--tpl-danger-light)" : e === "medium" ? "var(--tpl-warning-light)" : "var(--tpl-bg-hover)";
|
|
6520
6549
|
}
|
|
6521
6550
|
//#endregion
|
|
6522
6551
|
//#region src/cloud/components/TemplateScoringPanel.vue?vue&type=script&setup=true&lang.ts
|
|
6523
|
-
var
|
|
6552
|
+
var zl = {
|
|
6524
6553
|
key: 0,
|
|
6525
6554
|
class: "tpl-scoring-panel tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
6526
|
-
},
|
|
6555
|
+
}, Bl = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Vl = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, Hl = { class: "tpl:flex tpl:items-center tpl:gap-1" }, Ul = ["title"], Wl = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Gl = {
|
|
6527
6556
|
key: 0,
|
|
6528
6557
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6529
|
-
},
|
|
6558
|
+
}, Kl = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ql = {
|
|
6530
6559
|
key: 1,
|
|
6531
6560
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6532
|
-
},
|
|
6561
|
+
}, Jl = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Yl = {
|
|
6533
6562
|
key: 2,
|
|
6534
6563
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6535
|
-
},
|
|
6564
|
+
}, Xl = { class: "tpl:text-xs tpl:font-medium tpl:uppercase tpl:tracking-wider tpl:text-[var(--tpl-text-muted)]" }, Zl = {
|
|
6536
6565
|
key: 0,
|
|
6537
6566
|
class: "tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
6538
|
-
},
|
|
6567
|
+
}, Ql = {
|
|
6539
6568
|
key: 0,
|
|
6540
6569
|
class: "tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
|
|
6541
|
-
},
|
|
6570
|
+
}, $l = ["onClick"], eu = { class: "tpl:flex-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, tu = {
|
|
6542
6571
|
key: 0,
|
|
6543
6572
|
class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
|
|
6544
|
-
},
|
|
6573
|
+
}, nu = {
|
|
6545
6574
|
key: 0,
|
|
6546
6575
|
class: "tpl:border-t tpl:border-[var(--tpl-border)]"
|
|
6547
|
-
},
|
|
6576
|
+
}, ru = {
|
|
6548
6577
|
key: 0,
|
|
6549
6578
|
class: "tpl:px-3 tpl:py-3 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
6550
|
-
},
|
|
6579
|
+
}, iu = { class: "tpl:flex tpl:items-start tpl:gap-2" }, au = { class: "tpl:flex-1 tpl:min-w-0" }, ou = { class: "tpl:flex tpl:items-start tpl:gap-1.5" }, su = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, cu = {
|
|
6551
6580
|
key: 0,
|
|
6552
6581
|
class: "tpl:mt-1 tpl:text-[11px] tpl:leading-snug tpl:text-[var(--tpl-text-dim)]"
|
|
6553
|
-
},
|
|
6582
|
+
}, lu = {
|
|
6554
6583
|
key: 1,
|
|
6555
6584
|
class: "tpl:mt-2 tpl:flex tpl:justify-center"
|
|
6556
|
-
},
|
|
6585
|
+
}, uu = ["disabled", "onClick"], du = {
|
|
6557
6586
|
key: 0,
|
|
6558
6587
|
class: "tpl:mt-1.5 tpl:text-[11px] tpl:text-[var(--tpl-danger)]"
|
|
6559
|
-
},
|
|
6588
|
+
}, fu = {
|
|
6560
6589
|
key: 3,
|
|
6561
6590
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6562
|
-
},
|
|
6591
|
+
}, pu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, mu = { class: "tpl:m-0 tpl:px-4 tpl:pb-2 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, hu = /* @__PURE__ */ B({
|
|
6563
6592
|
__name: "TemplateScoringPanel",
|
|
6564
6593
|
props: { visible: { type: Boolean } },
|
|
6565
6594
|
emits: ["close"],
|
|
6566
6595
|
setup(e, { emit: t }) {
|
|
6567
|
-
let n = e, r = t, { t: i } =
|
|
6596
|
+
let n = e, r = t, { t: i } = Oi(), a = J(Dn, "TemplateScoringPanel"), o = J($n, "TemplateScoringPanel"), s = v(Ln, []), c = C({
|
|
6568
6597
|
spam: !0,
|
|
6569
6598
|
readability: !0,
|
|
6570
6599
|
accessibility: !0,
|
|
@@ -6579,10 +6608,10 @@ var Fl = {
|
|
|
6579
6608
|
"accessibility",
|
|
6580
6609
|
"bestPractices"
|
|
6581
6610
|
], p = {
|
|
6582
|
-
spam:
|
|
6583
|
-
readability:
|
|
6584
|
-
accessibility:
|
|
6585
|
-
bestPractices:
|
|
6611
|
+
spam: ai,
|
|
6612
|
+
readability: Br,
|
|
6613
|
+
accessibility: oi,
|
|
6614
|
+
bestPractices: mi
|
|
6586
6615
|
};
|
|
6587
6616
|
function m() {
|
|
6588
6617
|
o.score(a.content.value, s);
|
|
@@ -6602,7 +6631,7 @@ var Fl = {
|
|
|
6602
6631
|
function _() {
|
|
6603
6632
|
return o.scoringResult.value ? u.reduce((e, t) => e + (o.scoringResult.value?.categories[t]?.findings.length ?? 0), 0) : 0;
|
|
6604
6633
|
}
|
|
6605
|
-
return (t, n) => (f(),
|
|
6634
|
+
return (t, n) => (f(), N(ie, {
|
|
6606
6635
|
"enter-active-class": "tpl-scoring-slide-enter-active",
|
|
6607
6636
|
"enter-from-class": "tpl:translate-x-full",
|
|
6608
6637
|
"enter-to-class": "tpl:translate-x-0",
|
|
@@ -6610,132 +6639,132 @@ var Fl = {
|
|
|
6610
6639
|
"leave-from-class": "tpl:translate-x-0",
|
|
6611
6640
|
"leave-to-class": "tpl:translate-x-full"
|
|
6612
6641
|
}, {
|
|
6613
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
6642
|
+
default: b(() => [e.visible ? (f(), k("div", zl, [I("div", Bl, [I("div", Vl, [V(j(ii), {
|
|
6614
6643
|
size: 13,
|
|
6615
6644
|
"stroke-width": 2
|
|
6616
|
-
}),
|
|
6645
|
+
}), I("span", null, D(j(i).scoring.title), 1)]), I("div", Hl, [j(o).scoringResult.value && !j(o).isScoring.value ? (f(), k("button", {
|
|
6617
6646
|
key: 0,
|
|
6618
6647
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6619
|
-
title:
|
|
6648
|
+
title: j(i).scoring.rescore,
|
|
6620
6649
|
onClick: n[0] ||= (e) => m()
|
|
6621
|
-
}, [V(
|
|
6650
|
+
}, [V(j(ei), {
|
|
6622
6651
|
size: 14,
|
|
6623
6652
|
"stroke-width": 2
|
|
6624
|
-
})], 8,
|
|
6653
|
+
})], 8, Ul)) : A("", !0), I("button", {
|
|
6625
6654
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6626
6655
|
onClick: n[1] ||= (e) => r("close")
|
|
6627
|
-
}, [V(
|
|
6656
|
+
}, [V(j(pi), {
|
|
6628
6657
|
size: 14,
|
|
6629
6658
|
"stroke-width": 2
|
|
6630
|
-
})])])]),
|
|
6631
|
-
V(
|
|
6659
|
+
})])])]), I("div", Wl, [j(o).isScoring.value ? (f(), k("div", Gl, [I("p", Kl, D(j(i).scoring.scoring), 1), V(Si, { class: "tpl:w-3/4" })])) : j(o).error.value && !j(o).scoringResult.value ? (f(), k("div", ql, [
|
|
6660
|
+
V(j(Pr), {
|
|
6632
6661
|
size: 32,
|
|
6633
6662
|
"stroke-width": 1.5,
|
|
6634
6663
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
6635
6664
|
}),
|
|
6636
|
-
|
|
6637
|
-
|
|
6665
|
+
I("p", Jl, D(j(i).scoring.error), 1),
|
|
6666
|
+
I("button", {
|
|
6638
6667
|
class: "tpl:mt-2 tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-muted)]",
|
|
6639
6668
|
onClick: n[2] ||= (e) => m()
|
|
6640
|
-
}, [V(
|
|
6669
|
+
}, [V(j(ei), {
|
|
6641
6670
|
size: 12,
|
|
6642
6671
|
"stroke-width": 2
|
|
6643
|
-
}), z(" " +
|
|
6644
|
-
])) :
|
|
6645
|
-
|
|
6672
|
+
}), z(" " + D(j(i).scoring.rescore), 1)])
|
|
6673
|
+
])) : j(o).scoringResult.value ? (f(), k("div", Yl, [
|
|
6674
|
+
I("div", {
|
|
6646
6675
|
class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:p-5",
|
|
6647
|
-
style:
|
|
6676
|
+
style: L({ backgroundColor: j(Il)(j(o).scoringResult.value.score) })
|
|
6648
6677
|
}, [
|
|
6649
|
-
|
|
6678
|
+
I("span", {
|
|
6650
6679
|
class: "tpl:text-4xl tpl:font-bold tpl:tabular-nums",
|
|
6651
|
-
style:
|
|
6652
|
-
},
|
|
6653
|
-
|
|
6654
|
-
_() > 0 ? (f(), k("span",
|
|
6680
|
+
style: L({ color: j(Fl)(j(o).scoringResult.value.score) })
|
|
6681
|
+
}, D(j(o).scoringResult.value.score), 5),
|
|
6682
|
+
I("span", Xl, D(j(i).scoring.overallScore), 1),
|
|
6683
|
+
_() > 0 ? (f(), k("span", Zl, D(_()) + " " + D(j(i).scoring.findings), 1)) : A("", !0)
|
|
6655
6684
|
], 4),
|
|
6656
|
-
|
|
6685
|
+
j(o).fixError.value ? (f(), k("div", Ql, [V(j(Pr), {
|
|
6657
6686
|
size: 14,
|
|
6658
6687
|
"stroke-width": 2,
|
|
6659
6688
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
6660
|
-
}),
|
|
6661
|
-
(f(), k(R, null, h(u, (e) =>
|
|
6689
|
+
}), I("span", null, D(j(i).scoring.fixError), 1)])) : A("", !0),
|
|
6690
|
+
(f(), k(R, null, h(u, (e) => I("div", {
|
|
6662
6691
|
key: e,
|
|
6663
6692
|
class: "tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
6664
|
-
}, [
|
|
6693
|
+
}, [I("button", {
|
|
6665
6694
|
class: "tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:gap-2.5 tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-colors tpl:duration-100 tpl:bg-[var(--tpl-bg)]",
|
|
6666
6695
|
onClick: (t) => l(e)
|
|
6667
6696
|
}, [
|
|
6668
|
-
(f(),
|
|
6697
|
+
(f(), N(d(p[e]), {
|
|
6669
6698
|
size: 14,
|
|
6670
6699
|
"stroke-width": 2,
|
|
6671
|
-
style:
|
|
6700
|
+
style: L({ color: j(Fl)(j(o).scoringResult.value.categories[e].score) })
|
|
6672
6701
|
}, null, 8, ["style"])),
|
|
6673
|
-
|
|
6674
|
-
|
|
6702
|
+
I("span", eu, D(j(i).scoring.categories[e]), 1),
|
|
6703
|
+
I("span", {
|
|
6675
6704
|
class: "tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-semibold tpl:tabular-nums",
|
|
6676
|
-
style:
|
|
6677
|
-
color:
|
|
6678
|
-
backgroundColor:
|
|
6705
|
+
style: L({
|
|
6706
|
+
color: j(Fl)(j(o).scoringResult.value.categories[e].score),
|
|
6707
|
+
backgroundColor: j(Il)(j(o).scoringResult.value.categories[e].score)
|
|
6679
6708
|
})
|
|
6680
|
-
},
|
|
6681
|
-
|
|
6682
|
-
V(
|
|
6709
|
+
}, D(j(o).scoringResult.value.categories[e].score), 5),
|
|
6710
|
+
j(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), k("span", tu, D(j(o).scoringResult.value.categories[e].findings.length), 1)) : A("", !0),
|
|
6711
|
+
V(j(Ar), {
|
|
6683
6712
|
size: 12,
|
|
6684
6713
|
"stroke-width": 2,
|
|
6685
|
-
class:
|
|
6714
|
+
class: F(["tpl:transition-transform tpl:duration-200 tpl:text-[var(--tpl-text-dim)]", c.value[e] ? "tpl:rotate-0" : "tpl:-rotate-90"])
|
|
6686
6715
|
}, null, 8, ["class"])
|
|
6687
|
-
], 8,
|
|
6716
|
+
], 8, $l), c.value[e] ? (f(), k("div", nu, [j(o).scoringResult.value.categories[e].findings.length === 0 ? (f(), k("div", ru, D(j(i).scoring.noFindings), 1)) : A("", !0), (f(!0), k(R, null, h(j(o).scoringResult.value.categories[e].findings, (e) => (f(), k("div", {
|
|
6688
6717
|
key: e.id,
|
|
6689
6718
|
class: "tpl:border-t tpl:px-3 tpl:py-2.5 first:tpl:border-t-0 tpl:border-[var(--tpl-border-light)]"
|
|
6690
|
-
}, [
|
|
6719
|
+
}, [I("div", iu, [(f(), N(d(j(e.severity === "high" ? Pr : e.severity === "medium" ? li : qr)), {
|
|
6691
6720
|
size: 13,
|
|
6692
6721
|
"stroke-width": 2,
|
|
6693
6722
|
class: "tpl:mt-0.5 tpl:shrink-0",
|
|
6694
|
-
style:
|
|
6695
|
-
}, null, 8, ["style"])),
|
|
6696
|
-
|
|
6723
|
+
style: L({ color: j(Ll)(e.severity) })
|
|
6724
|
+
}, null, 8, ["style"])), I("div", au, [
|
|
6725
|
+
I("div", ou, [I("span", {
|
|
6697
6726
|
class: "tpl:mt-0.5 tpl:shrink-0 tpl:rounded tpl:px-1 tpl:py-px tpl:text-[10px] tpl:font-medium tpl:leading-tight",
|
|
6698
|
-
style:
|
|
6699
|
-
color:
|
|
6700
|
-
backgroundColor:
|
|
6727
|
+
style: L({
|
|
6728
|
+
color: j(Ll)(e.severity),
|
|
6729
|
+
backgroundColor: j(Rl)(e.severity)
|
|
6701
6730
|
})
|
|
6702
|
-
},
|
|
6703
|
-
e.suggestion ? (f(), k("p",
|
|
6704
|
-
e.blockId ? (f(), k("div",
|
|
6731
|
+
}, D(j(i).scoring.severity[e.severity]), 5), I("span", su, D(e.message), 1)]),
|
|
6732
|
+
e.suggestion ? (f(), k("p", cu, D(e.suggestion), 1)) : A("", !0),
|
|
6733
|
+
e.blockId ? (f(), k("div", lu, [I("button", {
|
|
6705
6734
|
class: "tpl-scoring-fix-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded tpl:border tpl:px-3 tpl:py-1.5 tpl:text-[11px] tpl:font-medium tpl:transition-all tpl:duration-150 tpl:disabled:opacity-50 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)]",
|
|
6706
6735
|
style: { "background-color": "transparent" },
|
|
6707
|
-
disabled:
|
|
6736
|
+
disabled: j(o).fixingFindingId.value !== null,
|
|
6708
6737
|
onClick: (t) => g(e)
|
|
6709
|
-
}, [
|
|
6738
|
+
}, [j(o).fixingFindingId.value === e.id ? (f(), N(j(Jr), {
|
|
6710
6739
|
key: 0,
|
|
6711
6740
|
class: "tpl-spinner",
|
|
6712
6741
|
size: 11,
|
|
6713
6742
|
"stroke-width": 2
|
|
6714
|
-
})) : (f(),
|
|
6743
|
+
})) : (f(), N(j(oi), {
|
|
6715
6744
|
key: 1,
|
|
6716
6745
|
size: 11,
|
|
6717
6746
|
"stroke-width": 2
|
|
6718
|
-
})), z(" " +
|
|
6747
|
+
})), z(" " + D(j(o).fixingFindingId.value === e.id ? j(i).scoring.fixing : j(i).scoring.fix), 1)], 8, uu), j(o).fixError.value ? (f(), k("p", du, D(j(o).fixError.value), 1)) : A("", !0)])) : A("", !0)
|
|
6719
6748
|
])])]))), 128))])) : A("", !0)])), 64))
|
|
6720
|
-
])) : (f(), k("div",
|
|
6749
|
+
])) : (f(), k("div", fu, [V(j(ii), {
|
|
6721
6750
|
size: 32,
|
|
6722
6751
|
"stroke-width": 1.5,
|
|
6723
6752
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6724
|
-
}),
|
|
6753
|
+
}), I("p", pu, D(j(i).scoring.emptyState), 1)])), I("p", mu, D(j(i).aiMenu.disclaimer), 1)])])) : A("", !0)]),
|
|
6725
6754
|
_: 1
|
|
6726
6755
|
}));
|
|
6727
6756
|
}
|
|
6728
|
-
}),
|
|
6757
|
+
}), gu = /* @__PURE__ */ e({ default: () => _u }), _u = /* @__PURE__ */ vi(hu, [["__scopeId", "data-v-3a059e8d"]]), vu = ["aria-busy"], yu = {
|
|
6729
6758
|
id: "tpl-test-email-title",
|
|
6730
6759
|
class: "tpl:mb-4 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
6731
|
-
},
|
|
6760
|
+
}, bu = { class: "tpl:mb-3" }, xu = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Su = ["value"], Cu = ["disabled"], wu = ["value"], Tu = {
|
|
6732
6761
|
key: 0,
|
|
6733
6762
|
role: "alert",
|
|
6734
6763
|
class: "tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
6735
|
-
},
|
|
6764
|
+
}, Eu = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Du = ["disabled"], Ou = ["disabled"], ku = {
|
|
6736
6765
|
key: 0,
|
|
6737
6766
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
6738
|
-
},
|
|
6767
|
+
}, Au = { key: 1 }, ju = /* @__PURE__ */ B({
|
|
6739
6768
|
__name: "TestEmailModal",
|
|
6740
6769
|
props: {
|
|
6741
6770
|
visible: { type: Boolean },
|
|
@@ -6745,7 +6774,7 @@ var Fl = {
|
|
|
6745
6774
|
},
|
|
6746
6775
|
emits: ["send", "close"],
|
|
6747
6776
|
setup(e, { emit: t }) {
|
|
6748
|
-
let n = e, r = t, { t: i } =
|
|
6777
|
+
let n = e, r = t, { t: i } = Oi(), a = C("");
|
|
6749
6778
|
H(() => n.visible, (e) => {
|
|
6750
6779
|
e && (a.value = n.allowedEmails[0] ?? "");
|
|
6751
6780
|
});
|
|
@@ -6758,12 +6787,12 @@ var Fl = {
|
|
|
6758
6787
|
function l(e) {
|
|
6759
6788
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), o()), e.key === "Escape" && s();
|
|
6760
6789
|
}
|
|
6761
|
-
return (t, n) => (f(),
|
|
6790
|
+
return (t, n) => (f(), N(yl, {
|
|
6762
6791
|
visible: e.visible,
|
|
6763
6792
|
onClose: s,
|
|
6764
6793
|
onKeydown: l
|
|
6765
6794
|
}, {
|
|
6766
|
-
default: b(() => [
|
|
6795
|
+
default: b(() => [I("div", {
|
|
6767
6796
|
role: "dialog",
|
|
6768
6797
|
"aria-modal": "true",
|
|
6769
6798
|
"aria-busy": e.isSending,
|
|
@@ -6774,14 +6803,14 @@ var Fl = {
|
|
|
6774
6803
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
6775
6804
|
}
|
|
6776
6805
|
}, [
|
|
6777
|
-
|
|
6778
|
-
|
|
6806
|
+
I("h3", yu, D(j(i).testEmail.title), 1),
|
|
6807
|
+
I("div", bu, [I("label", xu, D(j(i).testEmail.recipientLabel), 1), e.allowedEmails.length === 1 ? (f(), k("input", {
|
|
6779
6808
|
key: 0,
|
|
6780
6809
|
type: "text",
|
|
6781
6810
|
value: a.value,
|
|
6782
6811
|
disabled: "",
|
|
6783
6812
|
class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:opacity-70 tpl:shadow-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
|
|
6784
|
-
}, null, 8,
|
|
6813
|
+
}, null, 8, Su)) : c((f(), k("select", {
|
|
6785
6814
|
key: 1,
|
|
6786
6815
|
"onUpdate:modelValue": n[0] ||= (e) => a.value = e,
|
|
6787
6816
|
class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:shadow-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
|
|
@@ -6789,29 +6818,29 @@ var Fl = {
|
|
|
6789
6818
|
}, [(f(!0), k(R, null, h(e.allowedEmails, (e) => (f(), k("option", {
|
|
6790
6819
|
key: e,
|
|
6791
6820
|
value: e
|
|
6792
|
-
},
|
|
6793
|
-
e.error ? (f(), k("p",
|
|
6794
|
-
|
|
6821
|
+
}, D(e), 9, wu))), 128))], 8, Cu)), [[w, a.value]])]),
|
|
6822
|
+
e.error ? (f(), k("p", Tu, D(e.error), 1)) : A("", !0),
|
|
6823
|
+
I("div", Eu, [I("button", {
|
|
6795
6824
|
type: "button",
|
|
6796
|
-
class:
|
|
6825
|
+
class: F(["tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", { "tpl:cursor-not-allowed tpl:opacity-50": e.isSending }]),
|
|
6797
6826
|
disabled: e.isSending,
|
|
6798
6827
|
onClick: s
|
|
6799
|
-
},
|
|
6828
|
+
}, D(j(i).testEmail.cancel), 11, Du), I("button", {
|
|
6800
6829
|
type: "button",
|
|
6801
6830
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
6802
6831
|
disabled: !a.value || e.isSending,
|
|
6803
6832
|
onClick: o
|
|
6804
|
-
}, [e.isSending ? (f(), k("span",
|
|
6833
|
+
}, [e.isSending ? (f(), k("span", ku, [V(j(Jr), {
|
|
6805
6834
|
class: "tpl:animate-spin",
|
|
6806
6835
|
size: 12,
|
|
6807
6836
|
"stroke-width": 2
|
|
6808
|
-
}), z(" " +
|
|
6809
|
-
], 8,
|
|
6837
|
+
}), z(" " + D(j(i).testEmail.sending), 1)])) : (f(), k("span", Au, D(j(i).testEmail.send), 1))], 8, Ou)])
|
|
6838
|
+
], 8, vu)]),
|
|
6810
6839
|
_: 1
|
|
6811
6840
|
}, 8, ["visible"]));
|
|
6812
6841
|
}
|
|
6813
|
-
}),
|
|
6842
|
+
}), Mu = /* @__PURE__ */ e({ default: () => Nu }), Nu = ju;
|
|
6814
6843
|
//#endregion
|
|
6815
|
-
export {
|
|
6844
|
+
export { Di as $, Mn as $t, go as A, xe as An, X as At, ya as B, Fn as Bt, Oo as C, Ee as Cn, Rr as Ct, Z as D, we as Dn, Mr as Dt, $ as E, _e as En, Pr as Et, za as F, pe as Fn, Kn as Ft, $i as G, In as Gt, _a as H, er as Ht, Va as I, de as In, Xn as It, Li as J, jn as Jt, Ji as K, Hn as Kt, Ra as L, fe as Ln, Un as Lt, ro as M, Te as Mn, lr as Mt, Za as N, he as Nn, nr as Nt, _o as O, ge as On, Ar as Ot, Ja as P, be as Pn, Y as Pt, ki as Q, $n as Qt, Pa as R, ue as Rn, Yn as Rt, Mo as S, ve as Sn, zr as St, wo as T, Ce as Tn, Ir as Tt, ma as U, Zn as Ut, va as V, Wn as Vt, ua as W, An as Wt, ji as X, Vn as Xt, Fi as Y, Rn as Yt, Ai as Z, Qn as Zt, Ho as _, vt as _n, Jr as _t, _l as a, q as an, di as at, Fo as b, ot as bn, Gr as bt, Es as c, Zt as cn, si as ct, Jo as d, At as dn, ri as dt, Nn as en, Oi as et, qo as f, St as fn, ni as ft, Uo as g, ht as gn, Yr as gt, Wo as h, yt as hn, Xr as ht, yl as i, yn as in, pi as it, mo as j, Se as jn, _r as jt, vo as k, me as kn, kr as kt, es as l, en as ln, oi as lt, Go as m, _t as mn, Zr as mt, gu as n, un as nn, vi as nt, hl as o, Tn as on, li as ot, Ko as p, lt as pn, ei as pt, Ki as q, Dn as qt, Nl as r, vn as rn, _i as rt, Bc as s, Sn as sn, ci as st, Mu as t, J as tn, Ti as tt, $o as u, tn as un, ii as ut, Vo as v, ct as vn, qr as vt, To as w, ye as wn, Lr as wt, No as x, W as xn, Br as xt, Io as y, st as yn, Kr as yt, Ma as z, Pn as zt };
|
|
6816
6845
|
|
|
6817
|
-
//# sourceMappingURL=features-
|
|
6846
|
+
//# sourceMappingURL=features-DzIN-Nua.js.map
|