@templatical/editor 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-BUKj9n02.js → AiChatSidebar-D30WPhbv.js} +2 -2
- package/dist/{AiFeatureMenu-Co14YVJt.js → AiFeatureMenu-B5CJX5zr.js} +3 -3
- package/dist/{BlockIssueBadge-DThKKeub.js → BlockIssueBadge-CkB4Yyz2.js} +2 -2
- package/dist/{CloudEditor-CAtw_sFC.js → CloudEditor-nT-R769W.js} +128 -127
- package/dist/{CollaboratorBar-Bc6q0gB9.js → CollaboratorBar-CwhlXODK.js} +2 -2
- package/dist/{CommentsSidebar-DiH4R4F0.js → CommentsSidebar-gpZMMI5w.js} +3 -3
- package/dist/{CountdownBlock-BTPefclD.js → CountdownBlock-BNvuXucv.js} +1 -1
- package/dist/{CountdownToolbar-Dvr2icg-.js → CountdownToolbar-Dl82DAmI.js} +2 -2
- package/dist/{DesignReferenceSidebar-BP32MgpS.js → DesignReferenceSidebar-Bs5AMxVd.js} +3 -3
- package/dist/{IssuesPanel-B1LT91IX.js → IssuesPanel-CqQa2BtU.js} +2 -2
- package/dist/{ModuleBrowserModal-CWegFoOA.js → ModuleBrowserModal-BWWgF0LC.js} +7 -7
- package/dist/{ModulePreviewCanvas-D9WUSSRT.js → ModulePreviewCanvas-D7Tk5HOt.js} +2 -2
- package/dist/{NumberWithSuffix-CxUBW_V2.js → NumberWithSuffix-DVy5HxMi.js} +1 -1
- package/dist/{ParagraphEditor-DrAz2yot.js → ParagraphEditor-DVSGdMOo.js} +7 -7
- package/dist/{RichTextEditorContent-gR169m1-.js → RichTextEditorContent-DN-fRjMa.js} +3 -3
- package/dist/{SaveModuleDialog-DWidA0c9.js → SaveModuleDialog-CkEYkyVD.js} +5 -5
- package/dist/{SnapshotHistory-CIo2Jaw-.js → SnapshotHistory-Nx9wrlbF.js} +3 -3
- package/dist/{TemplateScoringPanel-seBvvn8O.js → TemplateScoringPanel-BG9M-29t.js} +2 -2
- package/dist/{TestEmailModal-BuCuWp3N.js → TestEmailModal-CRjtEs6S.js} +3 -3
- package/dist/{TitleEditor-BmW0uMl7.js → TitleEditor-CvtV4pCA.js} +6 -6
- package/dist/{TplModal-YFpBaiLj.js → TplModal-BudEYVcJ.js} +3 -3
- package/dist/{blockTypeIcons-DCkHXPhx.js → blockTypeIcons-Dd-UvfnC.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-Dayzk2H7.js → AiFeatureMenu-DKOv8VnB.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-Dayzk2H7.js.map → AiFeatureMenu-DKOv8VnB.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-D_US2wqo.js → BlockIssueBadge-DpiSTwM7.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-D_US2wqo.js.map → BlockIssueBadge-DpiSTwM7.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-CyJItWsK.js → CloudEditor-xc_uOEgn.js} +169 -168
- package/dist/cdn/chunks/{CloudEditor-CyJItWsK.js.map → CloudEditor-xc_uOEgn.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-C4CFs5EJ.js → CollaboratorBar-VWfPri_h.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-C4CFs5EJ.js.map → CollaboratorBar-VWfPri_h.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-D6lCXhZA.js → CountdownBlock-BKsCWboK.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-D6lCXhZA.js.map → CountdownBlock-BKsCWboK.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-BsGUxoRv.js → CountdownToolbar-BLtECDNb.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-BsGUxoRv.js.map → CountdownToolbar-BLtECDNb.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-DeHTmRDz.js → IssuesPanel-BW2piyvs.js} +8 -8
- package/dist/cdn/chunks/{IssuesPanel-DeHTmRDz.js.map → IssuesPanel-BW2piyvs.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-Cgjz4xAz.js → ModuleBrowserModal-TLlKpvjX.js} +8 -8
- package/dist/cdn/chunks/{ModuleBrowserModal-Cgjz4xAz.js.map → ModuleBrowserModal-TLlKpvjX.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-CeS9PsAA.js → ModulePreviewCanvas-wu7y-vrh.js} +2 -2
- package/dist/cdn/chunks/{ModulePreviewCanvas-CeS9PsAA.js.map → ModulePreviewCanvas-wu7y-vrh.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-Bp-idLCc.js → NumberWithSuffix-DxoUtTMr.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-Bp-idLCc.js.map → NumberWithSuffix-DxoUtTMr.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-fM9aFu8T.js → ParagraphEditor-DvxIO2LN.js} +33 -33
- package/dist/cdn/chunks/{ParagraphEditor-fM9aFu8T.js.map → ParagraphEditor-DvxIO2LN.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DwNPE5H5.js → RichTextEditorContent-Dm9GXJmo.js} +3 -3
- package/dist/cdn/chunks/{RichTextEditorContent-DwNPE5H5.js.map → RichTextEditorContent-Dm9GXJmo.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-BrtDXzIz.js → SaveModuleDialog-BRAdVcYM.js} +4 -4
- package/dist/cdn/chunks/{SaveModuleDialog-BrtDXzIz.js.map → SaveModuleDialog-BRAdVcYM.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-D0rSnye0.js → TitleEditor-D3gPRd0x.js} +8 -8
- package/dist/cdn/chunks/{TitleEditor-D0rSnye0.js.map → TitleEditor-D3gPRd0x.js.map} +1 -1
- package/dist/cdn/chunks/blockTypeIcons-C2cm4RjU.js +22 -0
- package/dist/cdn/chunks/{blockTypeIcons-YOEe5mDE.js.map → blockTypeIcons-C2cm4RjU.js.map} +1 -1
- package/dist/{de-CATfXDKV.js → cdn/chunks/de-DIAGP7yH.js} +2 -6
- package/dist/cdn/chunks/de-DIAGP7yH.js.map +1 -0
- package/dist/{en-CwCAgYL5.js → cdn/chunks/en-nqIW8Q9W.js} +2 -6
- package/dist/cdn/chunks/en-nqIW8Q9W.js.map +1 -0
- package/dist/cdn/chunks/{extensions-GYsbQFPr.js → extensions-SS1ywPUR.js} +21 -21
- package/dist/cdn/chunks/{extensions-GYsbQFPr.js.map → extensions-SS1ywPUR.js.map} +1 -1
- package/dist/cdn/chunks/{features-D-2kVhHY.js → features-CwZTdcbt.js} +988 -967
- package/dist/cdn/chunks/features-CwZTdcbt.js.map +1 -0
- package/dist/cdn/chunks/{icons-fZoyKV_s.js → icons-CbNEr1kc.js} +11 -25
- package/dist/cdn/chunks/icons-CbNEr1kc.js.map +1 -0
- package/dist/cdn/chunks/{media-library-CO2WOETY.js → media-library-BRpHZOl7.js} +76 -76
- package/dist/cdn/chunks/{media-library-CO2WOETY.js.map → media-library-BRpHZOl7.js.map} +1 -1
- package/dist/{pt-BR-D3Mg7AKe.js → cdn/chunks/pt-BR-DCNnLLx9.js} +2 -6
- package/dist/cdn/chunks/pt-BR-DCNnLLx9.js.map +1 -0
- package/dist/cdn/chunks/{quality-BxPiS-wv.js → quality-BqJqIPRU.js} +494 -484
- package/dist/cdn/chunks/quality-BqJqIPRU.js.map +1 -0
- package/dist/cdn/chunks/{renderer-7z2t_bYQ.js → renderer-CGVYkdUi.js} +99 -82
- package/dist/cdn/chunks/renderer-CGVYkdUi.js.map +1 -0
- package/dist/cdn/chunks/{src-ftxPuuQh.js → src-CvzfrFlT.js} +8 -8
- package/dist/cdn/chunks/{src-ftxPuuQh.js.map → src-CvzfrFlT.js.map} +1 -1
- package/dist/cdn/chunks/{styles-o0HIrw9F.js → styles-2P5yvfsS.js} +1186 -1213
- package/dist/cdn/chunks/styles-2P5yvfsS.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +109 -100
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{cloud-VxYMtfXC.js → cloud-BBC7bv8q.js} +1 -1
- package/dist/{cdn/chunks/de-CATfXDKV.js → de-DIAGP7yH.js} +0 -8
- package/dist/{dist-CIV3Brg-.js → dist-GAmhYvUK.js} +3 -5
- package/dist/{cdn/chunks/en-CwCAgYL5.js → en-nqIW8Q9W.js} +0 -8
- package/dist/{extensions-Mj2-D8uK.js → extensions-C87ZSllQ.js} +3 -3
- package/dist/index.d.ts +8 -0
- package/dist/keys-Vt3XipJl.js +10 -0
- package/dist/{cdn/chunks/pt-BR-D3Mg7AKe.js → pt-BR-DCNnLLx9.js} +0 -8
- package/dist/style.css +1 -1
- package/dist/{styles-CJtcKmsx.js → styles-DOjWbqA9.js} +1149 -1190
- package/dist/templatical-editor.js +116 -107
- package/dist/{useCloudI18n-DKWJg6rJ.js → useCloudI18n-sRfoQCZY.js} +1 -1
- package/dist/{useEditorCore-CEkf_VWX.js → useEditorCore-DxApq2hZ.js} +713 -690
- package/dist/{useI18n-Besvmtxy.js → useI18n-lF6hYgZu.js} +1 -1
- package/dist/{useMergeTag-WNzaCpXR.js → useMergeTag-CZVI7Xe5.js} +3 -3
- package/dist/{usePopoverRoot-CKt956u-.js → usePopoverRoot-p2BanBI7.js} +1 -1
- package/package.json +8 -8
- package/dist/cdn/chunks/blockTypeIcons-YOEe5mDE.js +0 -22
- package/dist/cdn/chunks/de-CATfXDKV.js.map +0 -1
- package/dist/cdn/chunks/en-CwCAgYL5.js.map +0 -1
- package/dist/cdn/chunks/features-D-2kVhHY.js.map +0 -1
- package/dist/cdn/chunks/icons-fZoyKV_s.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-D3Mg7AKe.js.map +0 -1
- package/dist/cdn/chunks/quality-BxPiS-wv.js.map +0 -1
- package/dist/cdn/chunks/renderer-7z2t_bYQ.js.map +0 -1
- package/dist/cdn/chunks/styles-o0HIrw9F.js.map +0 -1
- package/dist/keys-BiQlvx51.js +0 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as e, r as t } from "./rolldown-runtime-Dqa2HsxW.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
|
|
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 ee, b as T, c as E, 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-BwWMFq33.js";
|
|
3
3
|
//#region src/constants/timeouts.ts
|
|
4
4
|
var ue = 3e4, de = 4e3, fe = 5e3, pe = {
|
|
5
5
|
1: 36,
|
|
@@ -170,10 +170,7 @@ function We(e = 0) {
|
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
172
|
function G(e = 10) {
|
|
173
|
-
return {
|
|
174
|
-
padding: We(e),
|
|
175
|
-
margin: We(0)
|
|
176
|
-
};
|
|
173
|
+
return { padding: We(e) };
|
|
177
174
|
}
|
|
178
175
|
function Ge(e = {}) {
|
|
179
176
|
return U({
|
|
@@ -298,12 +295,13 @@ function at(e) {
|
|
|
298
295
|
function ot(e) {
|
|
299
296
|
let t = {};
|
|
300
297
|
for (let n of e.fields) t[n.key] = at(n);
|
|
298
|
+
let n = U(G(), e.defaultStyles);
|
|
301
299
|
return {
|
|
302
300
|
id: W(),
|
|
303
301
|
type: "custom",
|
|
304
302
|
customType: e.type,
|
|
305
303
|
fieldValues: t,
|
|
306
|
-
styles:
|
|
304
|
+
styles: n,
|
|
307
305
|
...e.dataSource ? { dataSourceFetched: !1 } : {}
|
|
308
306
|
};
|
|
309
307
|
}
|
|
@@ -745,7 +743,7 @@ function jt(e) {
|
|
|
745
743
|
o = null, c() && !s && n() && r(JSON.parse(JSON.stringify(t.value)));
|
|
746
744
|
}, i));
|
|
747
745
|
}
|
|
748
|
-
let m =
|
|
746
|
+
let m = ee(t, () => {
|
|
749
747
|
c() && !s && n() && p();
|
|
750
748
|
}, { deep: !0 });
|
|
751
749
|
function h() {
|
|
@@ -878,7 +876,7 @@ function Yt(e, t = {}) {
|
|
|
878
876
|
clearTimeout(e), i(), i = Ut;
|
|
879
877
|
}, o;
|
|
880
878
|
return (s) => {
|
|
881
|
-
let c =
|
|
879
|
+
let c = P(e), l = P(t.maxWait);
|
|
882
880
|
return n && a(n), c <= 0 || l !== void 0 && l <= 0 ? (r &&= (a(r), void 0), Promise.resolve(s())) : new Promise((e, u) => {
|
|
883
881
|
i = t.rejectOnCancel ? u : e, o = s, l && !r && (r = setTimeout(() => {
|
|
884
882
|
n && a(n), r = void 0, e(o());
|
|
@@ -911,7 +909,7 @@ function en(e, t = 200, n = {}) {
|
|
|
911
909
|
return qt(Yt(t, n), e);
|
|
912
910
|
}
|
|
913
911
|
function tn(e, t = 200, n = {}) {
|
|
914
|
-
let r = C(
|
|
912
|
+
let r = C(P(e)), i = en(() => {
|
|
915
913
|
r.value = e.value;
|
|
916
914
|
}, t, n);
|
|
917
915
|
return H(e, () => i()), g(r);
|
|
@@ -932,7 +930,7 @@ function an(e, t = 1e3, r = {}) {
|
|
|
932
930
|
s.value = !1, c();
|
|
933
931
|
}
|
|
934
932
|
function d() {
|
|
935
|
-
let n =
|
|
933
|
+
let n = P(t);
|
|
936
934
|
n <= 0 || (s.value = !0, a && e(), c(), s.value && (o = setInterval(e, n)));
|
|
937
935
|
}
|
|
938
936
|
return i && zt && d(), (u(t) || typeof t == "function") && Ft(H(t, () => {
|
|
@@ -954,7 +952,7 @@ function on(e, t, r = {}) {
|
|
|
954
952
|
function u(...n) {
|
|
955
953
|
a && e(), c(), o.value = !0, s = setTimeout(() => {
|
|
956
954
|
o.value = !1, s = void 0, e(...n);
|
|
957
|
-
},
|
|
955
|
+
}, P(t));
|
|
958
956
|
}
|
|
959
957
|
return i && (o.value = !0, zt && u()), Ft(l), {
|
|
960
958
|
isPending: g(o),
|
|
@@ -967,8 +965,8 @@ function sn(e = !1, t = {}) {
|
|
|
967
965
|
function s(e) {
|
|
968
966
|
if (arguments.length) return o.value = e, o.value;
|
|
969
967
|
{
|
|
970
|
-
let e =
|
|
971
|
-
return o.value = o.value === e ?
|
|
968
|
+
let e = P(r);
|
|
969
|
+
return o.value = o.value === e ? P(i) : e, o.value;
|
|
972
970
|
}
|
|
973
971
|
}
|
|
974
972
|
return a ? s : [o, s];
|
|
@@ -990,19 +988,19 @@ function ln(e, t, n) {
|
|
|
990
988
|
//#region ../../node_modules/.pnpm/@vueuse+core@14.3.0_vue@3.5.34_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
|
|
991
989
|
var un = zt ? window : void 0, dn = zt ? window.document : void 0, fn = zt ? window.navigator : void 0;
|
|
992
990
|
function K(e) {
|
|
993
|
-
let t =
|
|
991
|
+
let t = P(e);
|
|
994
992
|
return t?.$el ?? t;
|
|
995
993
|
}
|
|
996
994
|
function q(...e) {
|
|
997
|
-
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n =
|
|
998
|
-
let t = Qt(
|
|
995
|
+
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n = O(() => {
|
|
996
|
+
let t = Qt(P(e[0])).filter((e) => e != null);
|
|
999
997
|
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
1000
998
|
});
|
|
1001
999
|
return ln(() => [
|
|
1002
1000
|
n.value?.map((e) => K(e)) ?? [un].filter((e) => e != null),
|
|
1003
|
-
Qt(
|
|
1004
|
-
Qt(
|
|
1005
|
-
|
|
1001
|
+
Qt(P(n.value ? e[1] : e[0])),
|
|
1002
|
+
Qt(j(n.value ? e[2] : e[1])),
|
|
1003
|
+
P(n.value ? e[3] : e[2])
|
|
1006
1004
|
], ([e, n, r, i], a, o) => {
|
|
1007
1005
|
if (!e?.length || !n?.length || !r?.length) return;
|
|
1008
1006
|
let s = Ht(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
|
|
@@ -1024,7 +1022,7 @@ function mn(e, t, n = {}) {
|
|
|
1024
1022
|
let e = { passive: !0 };
|
|
1025
1023
|
Array.from(r.document.body.children).forEach((t) => t.addEventListener("click", Ut, e)), r.document.documentElement.addEventListener("click", Ut, e);
|
|
1026
1024
|
}
|
|
1027
|
-
let c = !0, l = (e) =>
|
|
1025
|
+
let c = !0, l = (e) => P(i).some((t) => {
|
|
1028
1026
|
if (typeof t == "string") return Array.from(r.document.querySelectorAll(t)).some((t) => t === e.target || e.composedPath().includes(t));
|
|
1029
1027
|
{
|
|
1030
1028
|
let n = K(t);
|
|
@@ -1032,11 +1030,11 @@ function mn(e, t, n = {}) {
|
|
|
1032
1030
|
}
|
|
1033
1031
|
});
|
|
1034
1032
|
function u(e) {
|
|
1035
|
-
let t =
|
|
1033
|
+
let t = P(e);
|
|
1036
1034
|
return t && t.$.subTree.shapeFlag === 16;
|
|
1037
1035
|
}
|
|
1038
1036
|
function d(e, t) {
|
|
1039
|
-
let n =
|
|
1037
|
+
let n = P(e), r = n.$.subTree && n.$.subTree.children;
|
|
1040
1038
|
return r == null || !Array.isArray(r) ? !1 : r.some((e) => e.el === t.target || t.composedPath().includes(e.el));
|
|
1041
1039
|
}
|
|
1042
1040
|
let f = (n) => {
|
|
@@ -1087,13 +1085,13 @@ function hn() {
|
|
|
1087
1085
|
}
|
|
1088
1086
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1089
1087
|
function gn(e) {
|
|
1090
|
-
return hn(),
|
|
1088
|
+
return hn(), O(() => !!e());
|
|
1091
1089
|
}
|
|
1092
1090
|
function _n(e, t, n = {}) {
|
|
1093
1091
|
let { window: r = un, ...i } = n, a, o = /* @__PURE__ */ gn(() => r && "MutationObserver" in r), s = () => {
|
|
1094
1092
|
a &&= (a.disconnect(), void 0);
|
|
1095
|
-
}, c = H(
|
|
1096
|
-
let t = Qt(
|
|
1093
|
+
}, c = H(O(() => {
|
|
1094
|
+
let t = Qt(P(e)).map(K).filter(Bt);
|
|
1097
1095
|
return new Set(t);
|
|
1098
1096
|
}), (e) => {
|
|
1099
1097
|
s(), o.value && e.size && (a = new MutationObserver(t), e.forEach((e) => a.observe(e, i)));
|
|
@@ -1119,16 +1117,16 @@ function bn(e, t = {}) {
|
|
|
1119
1117
|
let { window: r = un, ssrWidth: a = /* @__PURE__ */ yn() } = t, o = /* @__PURE__ */ gn(() => r && "matchMedia" in r && typeof r.matchMedia == "function"), s = n(typeof a == "number"), c = n(), l = n(!1);
|
|
1120
1118
|
return i(() => {
|
|
1121
1119
|
if (s.value) {
|
|
1122
|
-
s.value = !o.value, l.value =
|
|
1120
|
+
s.value = !o.value, l.value = P(e).split(",").some((e) => {
|
|
1123
1121
|
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);
|
|
1124
1122
|
return n && i && (i = a >= Zt(n[1])), r && i && (i = a <= Zt(r[1])), t ? !i : i;
|
|
1125
1123
|
});
|
|
1126
1124
|
return;
|
|
1127
1125
|
}
|
|
1128
|
-
o.value && (c.value = r.matchMedia(
|
|
1126
|
+
o.value && (c.value = r.matchMedia(P(e)), l.value = c.value.matches);
|
|
1129
1127
|
}), q(c, "change", (e) => {
|
|
1130
1128
|
l.value = e.matches;
|
|
1131
|
-
}, { passive: !0 }),
|
|
1129
|
+
}, { passive: !0 }), O(() => l.value);
|
|
1132
1130
|
}
|
|
1133
1131
|
function xn(e, t = {}) {
|
|
1134
1132
|
let { controls: r = !1, navigator: i = fn } = t, a = /* @__PURE__ */ gn(() => i && "permissions" in i), o = n(), s = typeof e == "string" ? { name: e } : e, c = n(), l = () => {
|
|
@@ -1144,7 +1142,7 @@ function xn(e, t = {}) {
|
|
|
1144
1142
|
} finally {
|
|
1145
1143
|
l();
|
|
1146
1144
|
}
|
|
1147
|
-
if (r) return
|
|
1145
|
+
if (r) return ne(o.value);
|
|
1148
1146
|
}
|
|
1149
1147
|
});
|
|
1150
1148
|
return u(), r ? {
|
|
@@ -1154,7 +1152,7 @@ function xn(e, t = {}) {
|
|
|
1154
1152
|
} : c;
|
|
1155
1153
|
}
|
|
1156
1154
|
function Sn(e = {}) {
|
|
1157
|
-
let { navigator: t = fn, read: r = !1, source: i, copiedDuring: a = 1500, legacy: o = !1 } = e, s = /* @__PURE__ */ gn(() => t && "clipboard" in t), c = xn("clipboard-read"), l = xn("clipboard-write"), u =
|
|
1155
|
+
let { navigator: t = fn, read: r = !1, source: i, copiedDuring: a = 1500, legacy: o = !1 } = e, s = /* @__PURE__ */ gn(() => t && "clipboard" in t), c = xn("clipboard-read"), l = xn("clipboard-write"), u = O(() => s.value || o), d = n(""), f = n(!1), p = n(!1), m = on(() => f.value = !1, a, { immediate: !1 }), h = 0;
|
|
1158
1156
|
async function _() {
|
|
1159
1157
|
let e = !(s.value && S(c.value));
|
|
1160
1158
|
if (!e) try {
|
|
@@ -1166,7 +1164,7 @@ function Sn(e = {}) {
|
|
|
1166
1164
|
}
|
|
1167
1165
|
u.value && r && q(["copy", "cut"], _, { passive: !0 });
|
|
1168
1166
|
async function v(e) {
|
|
1169
|
-
let n = e ??
|
|
1167
|
+
let n = e ?? P(i);
|
|
1170
1168
|
if (u.value && n != null) {
|
|
1171
1169
|
p.value = !0;
|
|
1172
1170
|
let e = !(s.value && S(l.value));
|
|
@@ -1213,7 +1211,7 @@ function Cn(e, t = {}) {
|
|
|
1213
1211
|
let t = Array.from(e.dataTransfer?.files ?? []);
|
|
1214
1212
|
return t.length === 0 ? null : s ? t : [t[0]];
|
|
1215
1213
|
}, u = (e) => {
|
|
1216
|
-
let t =
|
|
1214
|
+
let t = j(n.dataTypes);
|
|
1217
1215
|
return typeof t == "function" ? t(e) : t?.length ? e.length === 0 ? !1 : e.every((e) => t.some((t) => e.includes(t))) : !0;
|
|
1218
1216
|
}, 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) => {
|
|
1219
1217
|
let s = e.dataTransfer?.items;
|
|
@@ -1254,8 +1252,8 @@ function Cn(e, t = {}) {
|
|
|
1254
1252
|
function wn(e, t, n = {}) {
|
|
1255
1253
|
let { window: r = un, ...i } = n, a, o = /* @__PURE__ */ gn(() => r && "ResizeObserver" in r), s = () => {
|
|
1256
1254
|
a &&= (a.disconnect(), void 0);
|
|
1257
|
-
}, c = H(
|
|
1258
|
-
let t =
|
|
1255
|
+
}, c = H(O(() => {
|
|
1256
|
+
let t = P(e);
|
|
1259
1257
|
return Array.isArray(t) ? t.map((e) => K(e)) : [K(t)];
|
|
1260
1258
|
}), (e) => {
|
|
1261
1259
|
if (s(), o.value && r) {
|
|
@@ -1305,10 +1303,10 @@ function Tn(e, t = {}) {
|
|
|
1305
1303
|
};
|
|
1306
1304
|
}
|
|
1307
1305
|
function En(e, t, r = {}) {
|
|
1308
|
-
let { root: i, rootMargin: a, threshold: o = 0, window: s = un, immediate: c = !0 } = r, l = /* @__PURE__ */ gn(() => s && "IntersectionObserver" in s), u =
|
|
1306
|
+
let { root: i, rootMargin: a, threshold: o = 0, window: s = un, immediate: c = !0 } = r, l = /* @__PURE__ */ gn(() => s && "IntersectionObserver" in s), u = O(() => Qt(P(e)).map(K).filter(Bt)), d = Ut, f = n(c), p = l.value ? H(() => [
|
|
1309
1307
|
u.value,
|
|
1310
1308
|
K(i),
|
|
1311
|
-
|
|
1309
|
+
P(a),
|
|
1312
1310
|
f.value
|
|
1313
1311
|
], ([e, n, r]) => {
|
|
1314
1312
|
if (d(), !f.value || !e.length) return;
|
|
@@ -1352,7 +1350,7 @@ function On(e) {
|
|
|
1352
1350
|
return t.files;
|
|
1353
1351
|
}
|
|
1354
1352
|
function kn(e = {}) {
|
|
1355
|
-
let { document: t = dn } = e, n = C(On(e.initialFiles)), { on: r, trigger: a } = It(), { on: o, trigger: s } = It(), c =
|
|
1353
|
+
let { document: t = dn } = e, n = C(On(e.initialFiles)), { on: r, trigger: a } = It(), { on: o, trigger: s } = It(), c = O(() => {
|
|
1356
1354
|
let r = K(e.input) ?? (t ? t.createElement("input") : void 0);
|
|
1357
1355
|
return r && (r.type = "file", r.onchange = (e) => {
|
|
1358
1356
|
n.value = e.target.files, a(n.value);
|
|
@@ -1363,7 +1361,7 @@ function kn(e = {}) {
|
|
|
1363
1361
|
n.value = null, c.value && c.value.value && (c.value.value = "", a(null));
|
|
1364
1362
|
}, u = (e) => {
|
|
1365
1363
|
let t = c.value;
|
|
1366
|
-
t && (t.multiple =
|
|
1364
|
+
t && (t.multiple = P(e.multiple), t.accept = P(e.accept), t.webkitdirectory = P(e.directory), Wt(e, "capture") && (t.capture = P(e.capture)));
|
|
1367
1365
|
};
|
|
1368
1366
|
return i(() => {
|
|
1369
1367
|
u(e);
|
|
@@ -1377,7 +1375,7 @@ function kn(e = {}) {
|
|
|
1377
1375
|
...e,
|
|
1378
1376
|
...t
|
|
1379
1377
|
};
|
|
1380
|
-
u(r),
|
|
1378
|
+
u(r), P(r.reset) && l(), n.click();
|
|
1381
1379
|
},
|
|
1382
1380
|
reset: l,
|
|
1383
1381
|
onCancel: o,
|
|
@@ -1405,7 +1403,7 @@ function Nn() {
|
|
|
1405
1403
|
}
|
|
1406
1404
|
//#endregion
|
|
1407
1405
|
//#region src/keys.ts
|
|
1408
|
-
var Pn = Symbol("translations"), Fn = Symbol("editor"), In = Symbol("history"), Ln = Symbol("blockActions"), Rn = Symbol("conditionPreview"), zn = Symbol("fontsManager"), Bn = Symbol("themeStyles"), Vn = Symbol("tplUiTheme"), Hn = Symbol("blockDefaults"), Un = Symbol("blockRegistry"), Wn = Symbol("customBlockDefinitions"), Gn = Symbol("
|
|
1406
|
+
var Pn = Symbol("translations"), Fn = Symbol("editor"), In = Symbol("history"), Ln = Symbol("blockActions"), Rn = Symbol("conditionPreview"), zn = Symbol("fontsManager"), Bn = Symbol("themeStyles"), Vn = Symbol("tplUiTheme"), Hn = Symbol("blockDefaults"), Un = Symbol("blockRegistry"), Wn = Symbol("customBlockDefinitions"), Gn = Symbol("customBlockStylesheets"), Kn = Symbol("mergeTags"), qn = Symbol("mergeTagSyntax"), Jn = Symbol("onRequestMergeTag"), Yn = Symbol("mergeTagAutocomplete"), Xn = Symbol("mergeTagPicker"), Zn = Symbol("onRequestMedia"), Qn = Symbol("displayConditions"), $n = Symbol("allowCustomConditions"), er = Symbol("capabilities"), tr = Symbol("keyboardReorder"), nr = Symbol("templateLint"), rr = Symbol("editorRoot"), ir = Symbol("popoverRoot"), ar = Symbol("authManager"), or = Symbol("aiConfig"), sr = Symbol("comments"), cr = Symbol("savedModulesHeadless"), lr = Symbol("scoring"), ur = Symbol("cloudTranslations");
|
|
1409
1407
|
function J(e, t) {
|
|
1410
1408
|
let n = v(e, null);
|
|
1411
1409
|
if (n == null) throw Error(`${t} requires a provider for ${e.description ?? "unknown key"}. Ensure it is a descendant of Editor or CloudEditor.`);
|
|
@@ -1413,7 +1411,7 @@ function J(e, t) {
|
|
|
1413
1411
|
}
|
|
1414
1412
|
//#endregion
|
|
1415
1413
|
//#region src/composables/useMergeTagPicker.ts
|
|
1416
|
-
function
|
|
1414
|
+
function dr() {
|
|
1417
1415
|
let e = C(!1), t = C([]), n = null;
|
|
1418
1416
|
function r(r) {
|
|
1419
1417
|
if (n) {
|
|
@@ -1443,21 +1441,17 @@ function ur() {
|
|
|
1443
1441
|
}
|
|
1444
1442
|
//#endregion
|
|
1445
1443
|
//#region src/composables/useTemplateLint.ts
|
|
1446
|
-
function
|
|
1444
|
+
function fr(e) {
|
|
1447
1445
|
return e ? e.disabled === !0 ? !0 : e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
1448
1446
|
}
|
|
1449
|
-
function
|
|
1450
|
-
let t = C([]), r = C(!1), i = C(!1), a = n(null), o =
|
|
1447
|
+
function pr(e) {
|
|
1448
|
+
let t = C([]), r = C(!1), i = C(!1), a = n(null), o = fr(e.options), s = null, c = !1;
|
|
1451
1449
|
o || l();
|
|
1452
1450
|
async function l() {
|
|
1453
1451
|
try {
|
|
1454
|
-
let t = await import("./quality-
|
|
1452
|
+
let t = await import("./quality-BqJqIPRU.js").then((e) => e.t);
|
|
1455
1453
|
if (c) return;
|
|
1456
|
-
a.value = {
|
|
1457
|
-
lintAccessibility: t.lintAccessibility,
|
|
1458
|
-
lintStructure: t.lintStructure,
|
|
1459
|
-
lintLinks: t.lintLinks
|
|
1460
|
-
}, r.value = !0, u(), s = cn(e.content, u, {
|
|
1454
|
+
a.value = { lintTemplate: t.lintTemplate }, r.value = !0, u(), s = cn(e.content, u, {
|
|
1461
1455
|
debounce: e.debounce ?? 500,
|
|
1462
1456
|
deep: !0
|
|
1463
1457
|
});
|
|
@@ -1467,13 +1461,7 @@ function fr(e) {
|
|
|
1467
1461
|
}
|
|
1468
1462
|
}
|
|
1469
1463
|
function u() {
|
|
1470
|
-
|
|
1471
|
-
let n = a.value.lintAccessibility(e.content.value, e.options), r = a.value.lintStructure(e.content.value, e.options), i = a.value.lintLinks(e.content.value, e.options);
|
|
1472
|
-
t.value = [
|
|
1473
|
-
...n,
|
|
1474
|
-
...r,
|
|
1475
|
-
...i
|
|
1476
|
-
];
|
|
1464
|
+
a.value && (t.value = a.value.lintTemplate(e.content.value, e.options));
|
|
1477
1465
|
}
|
|
1478
1466
|
let d = H(() => e.options, () => {
|
|
1479
1467
|
a.value && u();
|
|
@@ -1512,12 +1500,12 @@ function Y(e) {
|
|
|
1512
1500
|
}
|
|
1513
1501
|
//#endregion
|
|
1514
1502
|
//#region src/utils/blockTypeLabels.ts
|
|
1515
|
-
function
|
|
1503
|
+
function mr(e, t) {
|
|
1516
1504
|
return t.blocks[e] ?? e;
|
|
1517
1505
|
}
|
|
1518
1506
|
//#endregion
|
|
1519
1507
|
//#region src/composables/useKeyboardReorder.ts
|
|
1520
|
-
function
|
|
1508
|
+
function hr(e, t) {
|
|
1521
1509
|
let n = C(null), r = C(""), i = null;
|
|
1522
1510
|
function a(t) {
|
|
1523
1511
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -1544,7 +1532,7 @@ function mr(e, t) {
|
|
|
1544
1532
|
let r = a(n);
|
|
1545
1533
|
if (!r) return "";
|
|
1546
1534
|
let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
|
|
1547
|
-
return i ?
|
|
1535
|
+
return i ? mr(i.type, t.t) : "";
|
|
1548
1536
|
}
|
|
1549
1537
|
function s(t, n) {
|
|
1550
1538
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -1613,13 +1601,13 @@ function mr(e, t) {
|
|
|
1613
1601
|
}
|
|
1614
1602
|
//#endregion
|
|
1615
1603
|
//#region src/composables/useUiTheme.ts
|
|
1616
|
-
function
|
|
1604
|
+
function gr(e) {
|
|
1617
1605
|
let t = bn("(prefers-color-scheme: dark)");
|
|
1618
|
-
return { resolvedTheme:
|
|
1606
|
+
return { resolvedTheme: O(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
1619
1607
|
}
|
|
1620
1608
|
//#endregion
|
|
1621
1609
|
//#region src/composables/useThemeStyles.ts
|
|
1622
|
-
var
|
|
1610
|
+
var _r = {
|
|
1623
1611
|
bg: "--tpl-bg",
|
|
1624
1612
|
bgElevated: "--tpl-bg-elevated",
|
|
1625
1613
|
bgHover: "--tpl-bg-hover",
|
|
@@ -1643,10 +1631,10 @@ var gr = {
|
|
|
1643
1631
|
dangerLight: "--tpl-danger-light",
|
|
1644
1632
|
canvasBg: "--tpl-canvas-bg"
|
|
1645
1633
|
};
|
|
1646
|
-
function
|
|
1647
|
-
return { themeStyles:
|
|
1634
|
+
function vr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
1635
|
+
return { themeStyles: O(() => {
|
|
1648
1636
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
1649
|
-
if (a) for (let [e, t] of Object.entries(
|
|
1637
|
+
if (a) for (let [e, t] of Object.entries(_r)) {
|
|
1650
1638
|
let n = a[e];
|
|
1651
1639
|
n && (r[t] = n);
|
|
1652
1640
|
}
|
|
@@ -1655,27 +1643,27 @@ function _r({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
1655
1643
|
}
|
|
1656
1644
|
//#endregion
|
|
1657
1645
|
//#region src/utils/logger.ts
|
|
1658
|
-
var
|
|
1659
|
-
function
|
|
1646
|
+
var yr = "[Templatical]";
|
|
1647
|
+
function br() {
|
|
1660
1648
|
return typeof process < "u" && !0;
|
|
1661
1649
|
}
|
|
1662
|
-
var
|
|
1650
|
+
var xr = {
|
|
1663
1651
|
warn(...e) {
|
|
1664
|
-
console.warn(
|
|
1652
|
+
console.warn(yr, ...e);
|
|
1665
1653
|
},
|
|
1666
1654
|
error(...e) {
|
|
1667
|
-
console.error(
|
|
1655
|
+
console.error(yr, ...e);
|
|
1668
1656
|
},
|
|
1669
1657
|
debug(...e) {
|
|
1670
|
-
|
|
1658
|
+
br() || console.debug(yr, ...e);
|
|
1671
1659
|
},
|
|
1672
1660
|
info(...e) {
|
|
1673
|
-
|
|
1661
|
+
br() || console.info(yr, ...e);
|
|
1674
1662
|
}
|
|
1675
1663
|
};
|
|
1676
1664
|
//#endregion
|
|
1677
1665
|
//#region src/composables/useBlockRegistry.ts
|
|
1678
|
-
function
|
|
1666
|
+
function Sr() {
|
|
1679
1667
|
let e = n(/* @__PURE__ */ new Map());
|
|
1680
1668
|
function t(t, n) {
|
|
1681
1669
|
e.value.set(t, n), oe(e);
|
|
@@ -1727,7 +1715,7 @@ function xr() {
|
|
|
1727
1715
|
strictFilters: !1
|
|
1728
1716
|
}).parseAndRender(t.template, e.fieldValues);
|
|
1729
1717
|
} catch (t) {
|
|
1730
|
-
return
|
|
1718
|
+
return xr.error(`Failed to render custom block "${e.customType}":`, t), c(`Render error: ${e.customType}`);
|
|
1731
1719
|
}
|
|
1732
1720
|
}
|
|
1733
1721
|
function u(t) {
|
|
@@ -1745,8 +1733,41 @@ function xr() {
|
|
|
1745
1733
|
};
|
|
1746
1734
|
}
|
|
1747
1735
|
//#endregion
|
|
1736
|
+
//#region src/composables/useCustomBlockStylesheets.ts
|
|
1737
|
+
function Cr(e, t) {
|
|
1738
|
+
return O(() => {
|
|
1739
|
+
let n = wr(e.value.blocks);
|
|
1740
|
+
if (n.size === 0) return [];
|
|
1741
|
+
let r = /* @__PURE__ */ new Set(), i = [];
|
|
1742
|
+
for (let e of n) {
|
|
1743
|
+
let n = t.getDefinition(e)?.stylesheet;
|
|
1744
|
+
if (!n) continue;
|
|
1745
|
+
let a = n.trim();
|
|
1746
|
+
a === "" || r.has(a) || (r.add(a), i.push(a));
|
|
1747
|
+
}
|
|
1748
|
+
return i;
|
|
1749
|
+
});
|
|
1750
|
+
}
|
|
1751
|
+
function wr(e) {
|
|
1752
|
+
let t = /* @__PURE__ */ new Set();
|
|
1753
|
+
return Tr(e, t), t;
|
|
1754
|
+
}
|
|
1755
|
+
function Tr(e, t) {
|
|
1756
|
+
for (let n of e) {
|
|
1757
|
+
if (Ee(n)) {
|
|
1758
|
+
t.add(n.customType);
|
|
1759
|
+
continue;
|
|
1760
|
+
}
|
|
1761
|
+
if (n.type === "section") {
|
|
1762
|
+
let e = n.children;
|
|
1763
|
+
if (!e) continue;
|
|
1764
|
+
for (let n of e) Tr(n, t);
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
//#endregion
|
|
1748
1769
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
1749
|
-
var
|
|
1770
|
+
var Er = [
|
|
1750
1771
|
{
|
|
1751
1772
|
type: "section",
|
|
1752
1773
|
label: "Section",
|
|
@@ -1813,8 +1834,8 @@ var Sr = [
|
|
|
1813
1834
|
createBlock: it
|
|
1814
1835
|
}
|
|
1815
1836
|
];
|
|
1816
|
-
function
|
|
1817
|
-
for (let n of
|
|
1837
|
+
function Dr(e, t) {
|
|
1838
|
+
for (let n of Er) {
|
|
1818
1839
|
let r = t[n.type];
|
|
1819
1840
|
r && e.registerBuiltIn(n.type, {
|
|
1820
1841
|
component: r,
|
|
@@ -1829,7 +1850,7 @@ function Cr(e, t) {
|
|
|
1829
1850
|
}
|
|
1830
1851
|
//#endregion
|
|
1831
1852
|
//#region src/utils/keyboardShortcuts.ts
|
|
1832
|
-
function
|
|
1853
|
+
function Or(e) {
|
|
1833
1854
|
for (let t of e.composedPath()) {
|
|
1834
1855
|
if (!(t instanceof HTMLElement)) continue;
|
|
1835
1856
|
if (t.isContentEditable) return !0;
|
|
@@ -1838,14 +1859,14 @@ function wr(e) {
|
|
|
1838
1859
|
}
|
|
1839
1860
|
return !1;
|
|
1840
1861
|
}
|
|
1841
|
-
function
|
|
1862
|
+
function kr(e, t) {
|
|
1842
1863
|
let n = e.metaKey || e.ctrlKey;
|
|
1843
1864
|
if (n && e.key.toLowerCase() === "s") {
|
|
1844
1865
|
e.preventDefault(), t.onSave?.();
|
|
1845
1866
|
return;
|
|
1846
1867
|
}
|
|
1847
1868
|
if (n && e.key.toLowerCase() === "z") {
|
|
1848
|
-
if (
|
|
1869
|
+
if (Or(e)) return;
|
|
1849
1870
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
1850
1871
|
return;
|
|
1851
1872
|
}
|
|
@@ -1853,18 +1874,18 @@ function Tr(e, t) {
|
|
|
1853
1874
|
t.selectBlock(null);
|
|
1854
1875
|
return;
|
|
1855
1876
|
}
|
|
1856
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1877
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Or(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1857
1878
|
}
|
|
1858
1879
|
//#endregion
|
|
1859
1880
|
//#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1860
|
-
var
|
|
1881
|
+
var Ar = { class: "tpl:text-center" }, jr = ["href"], Mr = /* @__PURE__ */ B({
|
|
1861
1882
|
__name: "ButtonBlock",
|
|
1862
1883
|
props: {
|
|
1863
1884
|
block: {},
|
|
1864
1885
|
viewport: {}
|
|
1865
1886
|
},
|
|
1866
1887
|
setup(e) {
|
|
1867
|
-
let t = e, n =
|
|
1888
|
+
let t = e, n = O(() => {
|
|
1868
1889
|
let e = {
|
|
1869
1890
|
display: "inline-block",
|
|
1870
1891
|
padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
|
|
@@ -1878,17 +1899,17 @@ var Er = { class: "tpl:text-center" }, Dr = ["href"], Or = /* @__PURE__ */ B({
|
|
|
1878
1899
|
};
|
|
1879
1900
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
1880
1901
|
});
|
|
1881
|
-
return (t, r) => (f(),
|
|
1902
|
+
return (t, r) => (f(), k("div", Ar, [I("a", {
|
|
1882
1903
|
href: e.block.url || "#",
|
|
1883
1904
|
style: L(n.value),
|
|
1884
1905
|
class: "tpl:cursor-default",
|
|
1885
|
-
onClick: r[0] ||=
|
|
1886
|
-
},
|
|
1906
|
+
onClick: r[0] ||= M(() => {}, ["prevent"])
|
|
1907
|
+
}, D(e.block.text), 13, jr)]));
|
|
1887
1908
|
}
|
|
1888
|
-
}),
|
|
1889
|
-
let t =
|
|
1909
|
+
}), Nr = (e) => e === "", Pr = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), Fr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Ir = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), Lr = (e) => {
|
|
1910
|
+
let t = Ir(e);
|
|
1890
1911
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
1891
|
-
},
|
|
1912
|
+
}, Rr = {
|
|
1892
1913
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1893
1914
|
width: 24,
|
|
1894
1915
|
height: 24,
|
|
@@ -1898,35 +1919,35 @@ var Er = { class: "tpl:text-center" }, Dr = ["href"], Or = /* @__PURE__ */ B({
|
|
|
1898
1919
|
"stroke-width": 2,
|
|
1899
1920
|
"stroke-linecap": "round",
|
|
1900
1921
|
"stroke-linejoin": "round"
|
|
1901
|
-
},
|
|
1902
|
-
function
|
|
1903
|
-
return v(
|
|
1922
|
+
}, zr = Symbol("lucide-icons");
|
|
1923
|
+
function Br() {
|
|
1924
|
+
return v(zr, {});
|
|
1904
1925
|
}
|
|
1905
1926
|
//#endregion
|
|
1906
1927
|
//#region ../../node_modules/.pnpm/@lucide+vue@1.16.0_vue@3.5.34_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/Icon.mjs
|
|
1907
|
-
var
|
|
1908
|
-
let { size: d, color: f, strokeWidth: p = 2, absoluteStrokeWidth: m = !1, class: h = "" } =
|
|
1909
|
-
let e =
|
|
1910
|
-
return e ? Number(t) * 24 / Number(s ?? d ??
|
|
1928
|
+
var Vr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": o, size: s, color: c, ...l }, { slots: u }) => {
|
|
1929
|
+
let { size: d, color: f, strokeWidth: p = 2, absoluteStrokeWidth: m = !1, class: h = "" } = Br(), g = O(() => {
|
|
1930
|
+
let e = Nr(n) || Nr(r) || n === !0 || r === !0 || m === !0, t = i || o || p || Rr["stroke-width"];
|
|
1931
|
+
return e ? Number(t) * 24 / Number(s ?? d ?? Rr.width) : t;
|
|
1911
1932
|
});
|
|
1912
1933
|
return a("svg", {
|
|
1913
|
-
...
|
|
1934
|
+
...Rr,
|
|
1914
1935
|
...l,
|
|
1915
|
-
width: s ?? d ??
|
|
1916
|
-
height: s ?? d ??
|
|
1917
|
-
stroke: c ?? f ??
|
|
1936
|
+
width: s ?? d ?? Rr.width,
|
|
1937
|
+
height: s ?? d ?? Rr.height,
|
|
1938
|
+
stroke: c ?? f ?? Rr.stroke,
|
|
1918
1939
|
"stroke-width": g.value,
|
|
1919
|
-
class:
|
|
1940
|
+
class: Pr("lucide", h, ...e ? [`lucide-${Fr(Lr(e))}-icon`, `lucide-${Fr(e)}`] : ["lucide-icon"])
|
|
1920
1941
|
}, [...t.map((e) => a(...e)), ...u.default ? [u.default()] : []]);
|
|
1921
|
-
}, X = (e, t) => (n, { slots: r, attrs: i }) => a(
|
|
1942
|
+
}, X = (e, t) => (n, { slots: r, attrs: i }) => a(Vr, {
|
|
1922
1943
|
...i,
|
|
1923
1944
|
...n,
|
|
1924
1945
|
iconNode: t,
|
|
1925
1946
|
name: e
|
|
1926
|
-
}, r.default ? { default: r.default } : void 0),
|
|
1947
|
+
}, r.default ? { default: r.default } : void 0), Hr = X("bookmark", [["path", {
|
|
1927
1948
|
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",
|
|
1928
1949
|
key: "oz39mx"
|
|
1929
|
-
}]]),
|
|
1950
|
+
}]]), Ur = X("box", [
|
|
1930
1951
|
["path", {
|
|
1931
1952
|
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",
|
|
1932
1953
|
key: "hh9hay"
|
|
@@ -1939,22 +1960,22 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1939
1960
|
d: "M12 22V12",
|
|
1940
1961
|
key: "d0xqtd"
|
|
1941
1962
|
}]
|
|
1942
|
-
]),
|
|
1963
|
+
]), Wr = X("check", [["path", {
|
|
1943
1964
|
d: "M20 6 9 17l-5-5",
|
|
1944
1965
|
key: "1gmf2c"
|
|
1945
|
-
}]]),
|
|
1966
|
+
}]]), Gr = X("chevron-down", [["path", {
|
|
1946
1967
|
d: "m6 9 6 6 6-6",
|
|
1947
1968
|
key: "qrunsl"
|
|
1948
|
-
}]]),
|
|
1969
|
+
}]]), Kr = X("chevron-left", [["path", {
|
|
1949
1970
|
d: "m15 18-6-6 6-6",
|
|
1950
1971
|
key: "1wnfg3"
|
|
1951
|
-
}]]),
|
|
1972
|
+
}]]), qr = X("chevron-right", [["path", {
|
|
1952
1973
|
d: "m9 18 6-6-6-6",
|
|
1953
1974
|
key: "mthhwq"
|
|
1954
|
-
}]]),
|
|
1975
|
+
}]]), Jr = X("chevron-up", [["path", {
|
|
1955
1976
|
d: "m18 15-6-6-6 6",
|
|
1956
1977
|
key: "153udz"
|
|
1957
|
-
}]]),
|
|
1978
|
+
}]]), Yr = X("circle-alert", [
|
|
1958
1979
|
["circle", {
|
|
1959
1980
|
cx: "12",
|
|
1960
1981
|
cy: "12",
|
|
@@ -1975,7 +1996,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1975
1996
|
y2: "16",
|
|
1976
1997
|
key: "4dfq90"
|
|
1977
1998
|
}]
|
|
1978
|
-
]),
|
|
1999
|
+
]), Xr = X("circle-check", [["circle", {
|
|
1979
2000
|
cx: "12",
|
|
1980
2001
|
cy: "12",
|
|
1981
2002
|
r: "10",
|
|
@@ -1983,7 +2004,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1983
2004
|
}], ["path", {
|
|
1984
2005
|
d: "m9 12 2 2 4-4",
|
|
1985
2006
|
key: "dzmm74"
|
|
1986
|
-
}]]),
|
|
2007
|
+
}]]), Zr = X("clock", [["circle", {
|
|
1987
2008
|
cx: "12",
|
|
1988
2009
|
cy: "12",
|
|
1989
2010
|
r: "10",
|
|
@@ -1991,13 +2012,13 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1991
2012
|
}], ["path", {
|
|
1992
2013
|
d: "M12 6v6l4 2",
|
|
1993
2014
|
key: "mmk7yg"
|
|
1994
|
-
}]]),
|
|
2015
|
+
}]]), Qr = X("code", [["path", {
|
|
1995
2016
|
d: "m16 18 6-6-6-6",
|
|
1996
2017
|
key: "eg8j8"
|
|
1997
2018
|
}], ["path", {
|
|
1998
2019
|
d: "m8 6-6 6 6 6",
|
|
1999
2020
|
key: "ppft3o"
|
|
2000
|
-
}]]),
|
|
2021
|
+
}]]), $r = X("copy", [["rect", {
|
|
2001
2022
|
width: "14",
|
|
2002
2023
|
height: "14",
|
|
2003
2024
|
x: "8",
|
|
@@ -2008,7 +2029,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2008
2029
|
}], ["path", {
|
|
2009
2030
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
2010
2031
|
key: "zix9uf"
|
|
2011
|
-
}]]),
|
|
2032
|
+
}]]), ei = X("eye-off", [
|
|
2012
2033
|
["path", {
|
|
2013
2034
|
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",
|
|
2014
2035
|
key: "ct8e1f"
|
|
@@ -2025,7 +2046,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2025
2046
|
d: "m2 2 20 20",
|
|
2026
2047
|
key: "1ooewy"
|
|
2027
2048
|
}]
|
|
2028
|
-
]),
|
|
2049
|
+
]), ti = X("eye", [["path", {
|
|
2029
2050
|
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",
|
|
2030
2051
|
key: "1nclc0"
|
|
2031
2052
|
}], ["circle", {
|
|
@@ -2033,7 +2054,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2033
2054
|
cy: "12",
|
|
2034
2055
|
r: "3",
|
|
2035
2056
|
key: "1v7zrd"
|
|
2036
|
-
}]]),
|
|
2057
|
+
}]]), ni = X("file-image", [
|
|
2037
2058
|
["path", {
|
|
2038
2059
|
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",
|
|
2039
2060
|
key: "1oefj6"
|
|
@@ -2052,7 +2073,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2052
2073
|
d: "m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",
|
|
2053
2074
|
key: "wt3hpn"
|
|
2054
2075
|
}]
|
|
2055
|
-
]),
|
|
2076
|
+
]), ri = X("file-text", [
|
|
2056
2077
|
["path", {
|
|
2057
2078
|
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",
|
|
2058
2079
|
key: "1oefj6"
|
|
@@ -2073,10 +2094,10 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2073
2094
|
d: "M16 17H8",
|
|
2074
2095
|
key: "z1uh3a"
|
|
2075
2096
|
}]
|
|
2076
|
-
]),
|
|
2097
|
+
]), ii = X("funnel", [["path", {
|
|
2077
2098
|
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",
|
|
2078
2099
|
key: "sc7q7i"
|
|
2079
|
-
}]]),
|
|
2100
|
+
}]]), ai = X("grip-vertical", [
|
|
2080
2101
|
["circle", {
|
|
2081
2102
|
cx: "9",
|
|
2082
2103
|
cy: "12",
|
|
@@ -2113,7 +2134,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2113
2134
|
r: "1",
|
|
2114
2135
|
key: "f4zoj3"
|
|
2115
2136
|
}]
|
|
2116
|
-
]),
|
|
2137
|
+
]), oi = X("image-up", [
|
|
2117
2138
|
["path", {
|
|
2118
2139
|
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",
|
|
2119
2140
|
key: "9csbqa"
|
|
@@ -2132,7 +2153,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2132
2153
|
r: "2",
|
|
2133
2154
|
key: "af1f0g"
|
|
2134
2155
|
}]
|
|
2135
|
-
]),
|
|
2156
|
+
]), si = X("image", [
|
|
2136
2157
|
["rect", {
|
|
2137
2158
|
width: "18",
|
|
2138
2159
|
height: "18",
|
|
@@ -2152,7 +2173,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2152
2173
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
2153
2174
|
key: "1xmnt7"
|
|
2154
2175
|
}]
|
|
2155
|
-
]),
|
|
2176
|
+
]), ci = X("info", [
|
|
2156
2177
|
["circle", {
|
|
2157
2178
|
cx: "12",
|
|
2158
2179
|
cy: "12",
|
|
@@ -2167,31 +2188,31 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2167
2188
|
d: "M12 8h.01",
|
|
2168
2189
|
key: "e9boi3"
|
|
2169
2190
|
}]
|
|
2170
|
-
]),
|
|
2191
|
+
]), li = X("loader-circle", [["path", {
|
|
2171
2192
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
2172
2193
|
key: "13zald"
|
|
2173
|
-
}]]),
|
|
2194
|
+
}]]), ui = X("message-circle", [["path", {
|
|
2174
2195
|
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",
|
|
2175
2196
|
key: "1sd12s"
|
|
2176
|
-
}]]),
|
|
2197
|
+
}]]), di = X("navigation", [["polygon", {
|
|
2177
2198
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
2178
2199
|
key: "1ltx0t"
|
|
2179
|
-
}]]),
|
|
2200
|
+
}]]), fi = X("pencil", [["path", {
|
|
2180
2201
|
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",
|
|
2181
2202
|
key: "1a8usu"
|
|
2182
2203
|
}], ["path", {
|
|
2183
2204
|
d: "m15 5 4 4",
|
|
2184
2205
|
key: "1mk7zo"
|
|
2185
|
-
}]]),
|
|
2206
|
+
}]]), pi = X("puzzle", [["path", {
|
|
2186
2207
|
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",
|
|
2187
2208
|
key: "w46dr5"
|
|
2188
|
-
}]]),
|
|
2209
|
+
}]]), mi = X("redo-2", [["path", {
|
|
2189
2210
|
d: "m15 14 5-5-5-5",
|
|
2190
2211
|
key: "12vg1m"
|
|
2191
2212
|
}], ["path", {
|
|
2192
2213
|
d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",
|
|
2193
2214
|
key: "6uklza"
|
|
2194
|
-
}]]),
|
|
2215
|
+
}]]), hi = X("refresh-cw", [
|
|
2195
2216
|
["path", {
|
|
2196
2217
|
d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",
|
|
2197
2218
|
key: "v9h5vc"
|
|
@@ -2208,19 +2229,19 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2208
2229
|
d: "M8 16H3v5",
|
|
2209
2230
|
key: "1cv678"
|
|
2210
2231
|
}]
|
|
2211
|
-
]),
|
|
2232
|
+
]), gi = X("reply", [["path", {
|
|
2212
2233
|
d: "M20 18v-2a4 4 0 0 0-4-4H4",
|
|
2213
2234
|
key: "5vmcpk"
|
|
2214
2235
|
}], ["path", {
|
|
2215
2236
|
d: "m9 17-5-5 5-5",
|
|
2216
2237
|
key: "nvlc11"
|
|
2217
|
-
}]]),
|
|
2238
|
+
}]]), _i = X("send", [["path", {
|
|
2218
2239
|
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",
|
|
2219
2240
|
key: "1ffxy3"
|
|
2220
2241
|
}], ["path", {
|
|
2221
2242
|
d: "m21.854 2.147-10.94 10.939",
|
|
2222
2243
|
key: "12cjpa"
|
|
2223
|
-
}]]),
|
|
2244
|
+
}]]), vi = X("share-2", [
|
|
2224
2245
|
["circle", {
|
|
2225
2246
|
cx: "18",
|
|
2226
2247
|
cy: "5",
|
|
@@ -2253,13 +2274,13 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2253
2274
|
y2: "10.49",
|
|
2254
2275
|
key: "1n3mei"
|
|
2255
2276
|
}]
|
|
2256
|
-
]),
|
|
2277
|
+
]), yi = X("shield-check", [["path", {
|
|
2257
2278
|
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",
|
|
2258
2279
|
key: "oel41y"
|
|
2259
2280
|
}], ["path", {
|
|
2260
2281
|
d: "m9 12 2 2 4-4",
|
|
2261
2282
|
key: "dzmm74"
|
|
2262
|
-
}]]),
|
|
2283
|
+
}]]), bi = X("shield-x", [
|
|
2263
2284
|
["path", {
|
|
2264
2285
|
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",
|
|
2265
2286
|
key: "oel41y"
|
|
@@ -2272,7 +2293,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2272
2293
|
d: "m9.5 9.5 5 5",
|
|
2273
2294
|
key: "18nt4w"
|
|
2274
2295
|
}]
|
|
2275
|
-
]),
|
|
2296
|
+
]), xi = X("sparkles", [
|
|
2276
2297
|
["path", {
|
|
2277
2298
|
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",
|
|
2278
2299
|
key: "1s2grr"
|
|
@@ -2291,7 +2312,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2291
2312
|
r: "2",
|
|
2292
2313
|
key: "6kqj1y"
|
|
2293
2314
|
}]
|
|
2294
|
-
]),
|
|
2315
|
+
]), Si = X("table", [
|
|
2295
2316
|
["path", {
|
|
2296
2317
|
d: "M12 3v18",
|
|
2297
2318
|
key: "108xh3"
|
|
@@ -2312,7 +2333,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2312
2333
|
d: "M3 15h18",
|
|
2313
2334
|
key: "5xshup"
|
|
2314
2335
|
}]
|
|
2315
|
-
]),
|
|
2336
|
+
]), Ci = X("trash-2", [
|
|
2316
2337
|
["path", {
|
|
2317
2338
|
d: "M10 11v6",
|
|
2318
2339
|
key: "nco0om"
|
|
@@ -2333,7 +2354,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2333
2354
|
d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
|
|
2334
2355
|
key: "e791ji"
|
|
2335
2356
|
}]
|
|
2336
|
-
]),
|
|
2357
|
+
]), wi = X("triangle-alert", [
|
|
2337
2358
|
["path", {
|
|
2338
2359
|
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",
|
|
2339
2360
|
key: "wmoenq"
|
|
@@ -2346,13 +2367,13 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2346
2367
|
d: "M12 17h.01",
|
|
2347
2368
|
key: "p32p05"
|
|
2348
2369
|
}]
|
|
2349
|
-
]),
|
|
2370
|
+
]), Ti = X("undo-2", [["path", {
|
|
2350
2371
|
d: "M9 14 4 9l5-5",
|
|
2351
2372
|
key: "102s5s"
|
|
2352
2373
|
}], ["path", {
|
|
2353
2374
|
d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",
|
|
2354
2375
|
key: "f3b9sd"
|
|
2355
|
-
}]]),
|
|
2376
|
+
}]]), Ei = X("upload", [
|
|
2356
2377
|
["path", {
|
|
2357
2378
|
d: "M12 3v12",
|
|
2358
2379
|
key: "1x0j5s"
|
|
@@ -2365,7 +2386,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2365
2386
|
d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",
|
|
2366
2387
|
key: "ih7n3h"
|
|
2367
2388
|
}]
|
|
2368
|
-
]),
|
|
2389
|
+
]), Di = X("video", [["path", {
|
|
2369
2390
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
2370
2391
|
key: "ftymec"
|
|
2371
2392
|
}], ["rect", {
|
|
@@ -2375,28 +2396,28 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2375
2396
|
height: "12",
|
|
2376
2397
|
rx: "2",
|
|
2377
2398
|
key: "158x01"
|
|
2378
|
-
}]]),
|
|
2399
|
+
}]]), Oi = X("x", [["path", {
|
|
2379
2400
|
d: "M18 6 6 18",
|
|
2380
2401
|
key: "1bl5f8"
|
|
2381
2402
|
}], ["path", {
|
|
2382
2403
|
d: "m6 6 12 12",
|
|
2383
2404
|
key: "d8bk6v"
|
|
2384
|
-
}]]),
|
|
2405
|
+
}]]), ki = X("zap", [["path", {
|
|
2385
2406
|
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",
|
|
2386
2407
|
key: "1xq2db"
|
|
2387
|
-
}]]),
|
|
2408
|
+
}]]), Ai = ["innerHTML"], ji = [
|
|
2388
2409
|
"src",
|
|
2389
2410
|
"width",
|
|
2390
2411
|
"height"
|
|
2391
|
-
],
|
|
2412
|
+
], Mi = /* @__PURE__ */ B({
|
|
2392
2413
|
__name: "CustomBlockIcon",
|
|
2393
2414
|
props: {
|
|
2394
2415
|
icon: {},
|
|
2395
2416
|
size: {}
|
|
2396
2417
|
},
|
|
2397
2418
|
setup(e) {
|
|
2398
|
-
let t = e, n =
|
|
2399
|
-
return (t, a) => r.value ? (f(),
|
|
2419
|
+
let t = e, n = O(() => t.size ?? 20), r = O(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = O(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/")));
|
|
2420
|
+
return (t, a) => r.value ? (f(), k("span", {
|
|
2400
2421
|
key: 0,
|
|
2401
2422
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
2402
2423
|
style: L({
|
|
@@ -2404,40 +2425,40 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2404
2425
|
height: `${n.value}px`
|
|
2405
2426
|
}),
|
|
2406
2427
|
innerHTML: e.icon
|
|
2407
|
-
}, null, 12,
|
|
2428
|
+
}, null, 12, Ai)) : i.value ? (f(), k("img", {
|
|
2408
2429
|
key: 1,
|
|
2409
2430
|
src: e.icon,
|
|
2410
2431
|
width: n.value,
|
|
2411
2432
|
height: n.value,
|
|
2412
2433
|
class: "tpl:inline-block",
|
|
2413
2434
|
alt: ""
|
|
2414
|
-
}, null, 8,
|
|
2435
|
+
}, null, 8, ji)) : (f(), N(j(Ur), {
|
|
2415
2436
|
key: 2,
|
|
2416
2437
|
size: n.value,
|
|
2417
2438
|
"stroke-width": 1.5
|
|
2418
2439
|
}, null, 8, ["size"]));
|
|
2419
2440
|
}
|
|
2420
|
-
}),
|
|
2441
|
+
}), Ni = (e, t) => {
|
|
2421
2442
|
let n = e.__vccOpts || e;
|
|
2422
2443
|
for (let [e, r] of t) n[e] = r;
|
|
2423
2444
|
return n;
|
|
2424
|
-
},
|
|
2425
|
-
function
|
|
2426
|
-
return f(),
|
|
2445
|
+
}, Pi = {}, Fi = { class: "tpl-loading-track" };
|
|
2446
|
+
function Ii(e, t) {
|
|
2447
|
+
return f(), k("div", Fi);
|
|
2427
2448
|
}
|
|
2428
|
-
var
|
|
2449
|
+
var Li = /* @__PURE__ */ Ni(Pi, [["render", Ii], ["__scopeId", "data-v-1ed538ec"]]);
|
|
2429
2450
|
//#endregion
|
|
2430
2451
|
//#region src/composables/useEditorRoot.ts
|
|
2431
|
-
function
|
|
2432
|
-
return v(
|
|
2452
|
+
function Ri() {
|
|
2453
|
+
return v(rr, document) ?? document;
|
|
2433
2454
|
}
|
|
2434
2455
|
//#endregion
|
|
2435
2456
|
//#region src/composables/useFocusTrap.ts
|
|
2436
|
-
var
|
|
2437
|
-
function
|
|
2438
|
-
let n =
|
|
2457
|
+
var zi = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
2458
|
+
function Bi(e, t) {
|
|
2459
|
+
let n = Ri(), r = null, i = null, a = null;
|
|
2439
2460
|
function o() {
|
|
2440
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
2461
|
+
return e.value ? Array.from(e.value.querySelectorAll(zi)).filter((e) => e.offsetParent !== null) : [];
|
|
2441
2462
|
}
|
|
2442
2463
|
function s(e) {
|
|
2443
2464
|
if (e.key !== "Tab") return;
|
|
@@ -2467,18 +2488,18 @@ function Ii(e, t) {
|
|
|
2467
2488
|
}
|
|
2468
2489
|
//#endregion
|
|
2469
2490
|
//#region src/composables/useCloudI18n.ts
|
|
2470
|
-
function
|
|
2491
|
+
function Vi(e, t) {
|
|
2471
2492
|
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
|
|
2472
2493
|
}
|
|
2473
|
-
function
|
|
2474
|
-
let t = e ?? v(
|
|
2494
|
+
function Hi(e) {
|
|
2495
|
+
let t = e ?? v(ur, null);
|
|
2475
2496
|
return {
|
|
2476
2497
|
t: t ? u(t) ? t.value : t : null,
|
|
2477
|
-
format:
|
|
2498
|
+
format: Vi
|
|
2478
2499
|
};
|
|
2479
2500
|
}
|
|
2480
|
-
function
|
|
2481
|
-
let { t, format: n } =
|
|
2501
|
+
function Ui(e) {
|
|
2502
|
+
let { t, format: n } = Hi(e);
|
|
2482
2503
|
if (!t) throw Error("useCloudI18nStrict() requires a cloud translations provider. Ensure the component is a descendant of CloudEditor.");
|
|
2483
2504
|
return {
|
|
2484
2505
|
t,
|
|
@@ -2487,8 +2508,8 @@ function zi(e) {
|
|
|
2487
2508
|
}
|
|
2488
2509
|
//#endregion
|
|
2489
2510
|
//#region src/composables/useMergeTag.ts
|
|
2490
|
-
function
|
|
2491
|
-
let e = v(
|
|
2511
|
+
function Wi() {
|
|
2512
|
+
let e = v(Kn, []), t = v(qn, lt.liquid), n = v(Jn, null), r = v(Yn, !0), i = v(Xn, null), a = C(!1);
|
|
2492
2513
|
function o(e) {
|
|
2493
2514
|
return mt(e, t);
|
|
2494
2515
|
}
|
|
@@ -2527,7 +2548,7 @@ function Bi() {
|
|
|
2527
2548
|
}
|
|
2528
2549
|
//#endregion
|
|
2529
2550
|
//#region src/composables/useEmoji.ts
|
|
2530
|
-
function
|
|
2551
|
+
function Gi() {
|
|
2531
2552
|
let [e, t] = sn(!1), r = n([]), i = !1;
|
|
2532
2553
|
l(() => {
|
|
2533
2554
|
i = !0;
|
|
@@ -2553,7 +2574,7 @@ function Vi() {
|
|
|
2553
2574
|
}
|
|
2554
2575
|
//#endregion
|
|
2555
2576
|
//#region src/composables/useDragDrop.ts
|
|
2556
|
-
function
|
|
2577
|
+
function Ki(e) {
|
|
2557
2578
|
let { onBlockMove: t, onBlockAdd: n } = e, r = C(!1), i = C(null), a = C(null);
|
|
2558
2579
|
function o(e) {
|
|
2559
2580
|
r.value = !0, i.value = e;
|
|
@@ -2603,7 +2624,7 @@ function Hi(e) {
|
|
|
2603
2624
|
}
|
|
2604
2625
|
//#endregion
|
|
2605
2626
|
//#region src/composables/useFonts.ts
|
|
2606
|
-
var
|
|
2627
|
+
var qi = [
|
|
2607
2628
|
{
|
|
2608
2629
|
value: "Arial",
|
|
2609
2630
|
label: "Arial"
|
|
@@ -2632,7 +2653,7 @@ var Ui = [
|
|
|
2632
2653
|
value: "Courier New",
|
|
2633
2654
|
label: "Courier New"
|
|
2634
2655
|
}
|
|
2635
|
-
],
|
|
2656
|
+
], Ji = {
|
|
2636
2657
|
arial: "Arial, sans-serif",
|
|
2637
2658
|
helvetica: "Helvetica, sans-serif",
|
|
2638
2659
|
georgia: "Georgia, serif",
|
|
@@ -2640,14 +2661,14 @@ var Ui = [
|
|
|
2640
2661
|
verdana: "Verdana, sans-serif",
|
|
2641
2662
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
2642
2663
|
"courier new": "'Courier New', monospace"
|
|
2643
|
-
},
|
|
2644
|
-
function
|
|
2645
|
-
let t = C(e?.customFonts ?? []), n = C(!0), r = C(!1), i =
|
|
2664
|
+
}, Yi = "Arial, sans-serif";
|
|
2665
|
+
function Xi(e) {
|
|
2666
|
+
let t = C(e?.customFonts ?? []), n = C(!0), r = C(!1), i = O(() => e?.defaultFallback ?? Yi);
|
|
2646
2667
|
function a(e) {
|
|
2647
2668
|
n.value = e;
|
|
2648
2669
|
}
|
|
2649
|
-
let o =
|
|
2650
|
-
let e = [...
|
|
2670
|
+
let o = O(() => {
|
|
2671
|
+
let e = [...qi];
|
|
2651
2672
|
if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
|
|
2652
2673
|
let r = t.value.map((e) => ({
|
|
2653
2674
|
value: e.name,
|
|
@@ -2660,23 +2681,23 @@ function Ki(e) {
|
|
|
2660
2681
|
return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
2661
2682
|
}
|
|
2662
2683
|
function u(e) {
|
|
2663
|
-
return
|
|
2684
|
+
return qi.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
2664
2685
|
}
|
|
2665
2686
|
function d() {
|
|
2666
2687
|
if (e?.defaultFont) {
|
|
2667
|
-
if (!n.value && !u(e.defaultFont)) return
|
|
2688
|
+
if (!n.value && !u(e.defaultFont)) return Yi;
|
|
2668
2689
|
if (c(e.defaultFont)) {
|
|
2669
2690
|
let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
2670
2691
|
if (t) return t.value;
|
|
2671
2692
|
}
|
|
2672
2693
|
}
|
|
2673
|
-
return
|
|
2694
|
+
return Yi;
|
|
2674
2695
|
}
|
|
2675
|
-
let f =
|
|
2696
|
+
let f = O(() => d());
|
|
2676
2697
|
function p(e) {
|
|
2677
2698
|
if (!e) return i.value;
|
|
2678
2699
|
let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
|
|
2679
|
-
return n ? `'${n.name}', ${n.fallback ?? i.value}` :
|
|
2700
|
+
return n ? `'${n.name}', ${n.fallback ?? i.value}` : Ji[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
2680
2701
|
}
|
|
2681
2702
|
let m = [], h = !1;
|
|
2682
2703
|
async function g() {
|
|
@@ -2692,7 +2713,7 @@ function Ki(e) {
|
|
|
2692
2713
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
2693
2714
|
});
|
|
2694
2715
|
} catch (t) {
|
|
2695
|
-
|
|
2716
|
+
xr.warn(`Failed to load custom font "${e.name}":`, t);
|
|
2696
2717
|
}
|
|
2697
2718
|
});
|
|
2698
2719
|
await Promise.allSettled(e), !h && (r.value = !0);
|
|
@@ -2719,9 +2740,9 @@ function Ki(e) {
|
|
|
2719
2740
|
}
|
|
2720
2741
|
//#endregion
|
|
2721
2742
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
2722
|
-
function
|
|
2743
|
+
function Zi(e) {
|
|
2723
2744
|
let t = C(!1), n = C(""), r = C(null);
|
|
2724
|
-
|
|
2745
|
+
Bi(r, t);
|
|
2725
2746
|
function i() {
|
|
2726
2747
|
n.value = e.value?.getAttributes("link").href || "", t.value = !0;
|
|
2727
2748
|
}
|
|
@@ -2772,10 +2793,10 @@ function qi(e) {
|
|
|
2772
2793
|
}
|
|
2773
2794
|
//#endregion
|
|
2774
2795
|
//#region src/composables/useRichTextEditor.ts
|
|
2775
|
-
function
|
|
2776
|
-
let t = v(Fn, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } =
|
|
2777
|
-
async function
|
|
2778
|
-
|
|
2796
|
+
function Qi(e) {
|
|
2797
|
+
let t = v(Fn, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } = Wi(), l = v(Pn, 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 } = Zi(p), { start: w, stop: ee } = on(() => p.value?.commands.focus("end"), 0, { immediate: !1 }), T = n(null), E = C(!0), D = C(null), te = !1;
|
|
2798
|
+
async function ne() {
|
|
2799
|
+
D.value = null, E.value = !0;
|
|
2779
2800
|
try {
|
|
2780
2801
|
let { TiptapEditor: n, EC: i, extensions: a } = await e.loadExtensions({
|
|
2781
2802
|
mergeTags: r,
|
|
@@ -2784,8 +2805,8 @@ function Ji(e) {
|
|
|
2784
2805
|
autocompleteEnabled: c,
|
|
2785
2806
|
suggestionEmptyText: d
|
|
2786
2807
|
});
|
|
2787
|
-
if (
|
|
2788
|
-
|
|
2808
|
+
if (te) return;
|
|
2809
|
+
T.value = i;
|
|
2789
2810
|
let o = /* @__PURE__ */ new Map();
|
|
2790
2811
|
a.forEach((e, t) => o.set(e.name, t));
|
|
2791
2812
|
let l = new n({
|
|
@@ -2793,47 +2814,47 @@ function Ji(e) {
|
|
|
2793
2814
|
content: e.blockContent(),
|
|
2794
2815
|
editable: !0,
|
|
2795
2816
|
onUpdate: ({ editor: n }) => {
|
|
2796
|
-
|
|
2817
|
+
te || t && t.updateBlock(e.blockId(), { content: n.getHTML() });
|
|
2797
2818
|
}
|
|
2798
2819
|
});
|
|
2799
|
-
if (
|
|
2820
|
+
if (te) {
|
|
2800
2821
|
l.destroy();
|
|
2801
2822
|
return;
|
|
2802
2823
|
}
|
|
2803
|
-
p.value = l,
|
|
2824
|
+
p.value = l, E.value = !1, w();
|
|
2804
2825
|
} catch (t) {
|
|
2805
|
-
if (
|
|
2806
|
-
|
|
2826
|
+
if (te) return;
|
|
2827
|
+
xr.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), D.value = t instanceof Error ? t.message : "Failed to load editor", E.value = !1;
|
|
2807
2828
|
}
|
|
2808
2829
|
}
|
|
2809
|
-
function
|
|
2810
|
-
p.value?.destroy(), p.value = null,
|
|
2830
|
+
function O() {
|
|
2831
|
+
p.value?.destroy(), p.value = null, ne();
|
|
2811
2832
|
}
|
|
2812
|
-
|
|
2813
|
-
let
|
|
2833
|
+
ne();
|
|
2834
|
+
let k = H(() => e.blockContent(), (e) => {
|
|
2814
2835
|
p.value && p.value.getHTML() !== e && p.value.commands.setContent(e, { emitUpdate: !1 });
|
|
2815
2836
|
});
|
|
2816
|
-
function
|
|
2837
|
+
function A(t) {
|
|
2817
2838
|
if (a.value) return;
|
|
2818
2839
|
let n = t.composedPath().find((e) => e instanceof HTMLElement);
|
|
2819
2840
|
n && (e.onClickOutsideSideEffect?.(n), !(n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog")) && e.onDone());
|
|
2820
2841
|
}
|
|
2821
|
-
q(document, "mousedown",
|
|
2822
|
-
|
|
2842
|
+
q(document, "mousedown", A), re(() => {
|
|
2843
|
+
te = !0, k(), ee(), p.value?.destroy();
|
|
2823
2844
|
});
|
|
2824
|
-
async function
|
|
2845
|
+
async function j() {
|
|
2825
2846
|
let e = await o();
|
|
2826
|
-
|
|
2847
|
+
te || (e && p.value ? p.value.chain().focus().insertMergeTag({
|
|
2827
2848
|
label: e.label,
|
|
2828
2849
|
value: e.value
|
|
2829
2850
|
}).run() : p.value?.commands.focus());
|
|
2830
2851
|
}
|
|
2831
2852
|
return {
|
|
2832
2853
|
editor: p,
|
|
2833
|
-
EditorContent:
|
|
2834
|
-
isLoading:
|
|
2835
|
-
initError:
|
|
2836
|
-
retry:
|
|
2854
|
+
EditorContent: T,
|
|
2855
|
+
isLoading: E,
|
|
2856
|
+
initError: D,
|
|
2857
|
+
retry: O,
|
|
2837
2858
|
showLinkDialog: m,
|
|
2838
2859
|
linkUrl: h,
|
|
2839
2860
|
linkDialogRef: g,
|
|
@@ -2846,25 +2867,25 @@ function Ji(e) {
|
|
|
2846
2867
|
removeLink: b,
|
|
2847
2868
|
closeLinkDialog: x,
|
|
2848
2869
|
handleLinkKeydown: S,
|
|
2849
|
-
handleAddMergeTag:
|
|
2870
|
+
handleAddMergeTag: j
|
|
2850
2871
|
};
|
|
2851
2872
|
}
|
|
2852
2873
|
//#endregion
|
|
2853
2874
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2854
|
-
var
|
|
2875
|
+
var $i = { class: "tpl:w-full" }, ea = {
|
|
2855
2876
|
key: 0,
|
|
2856
2877
|
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)]"
|
|
2857
|
-
},
|
|
2878
|
+
}, ta = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, na = {
|
|
2858
2879
|
key: 1,
|
|
2859
2880
|
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)]"
|
|
2860
|
-
},
|
|
2881
|
+
}, ra = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ia = {
|
|
2861
2882
|
key: 2,
|
|
2862
2883
|
class: "tpl:relative"
|
|
2863
|
-
},
|
|
2884
|
+
}, aa = ["innerHTML"], oa = {
|
|
2864
2885
|
key: 0,
|
|
2865
2886
|
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]",
|
|
2866
2887
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
2867
|
-
},
|
|
2888
|
+
}, sa = /* @__PURE__ */ B({
|
|
2868
2889
|
__name: "CustomBlock",
|
|
2869
2890
|
props: {
|
|
2870
2891
|
block: {},
|
|
@@ -2872,9 +2893,9 @@ var Yi = { class: "tpl:w-full" }, Xi = {
|
|
|
2872
2893
|
},
|
|
2873
2894
|
emits: ["fetchData"],
|
|
2874
2895
|
setup(e, { emit: t }) {
|
|
2875
|
-
let n = e, i = t, { t: a } = Y(), o = v(Un, null), s = C(""), c = C(!1), l =
|
|
2896
|
+
let n = e, i = t, { t: a } = Y(), o = v(Un, null), s = C(""), c = C(!1), l = O(() => o?.getDefinition(n.block.customType)), u = O(() => !!l.value), { isFetching: d, fetch: p, needsFetch: m, hasDataSource: h } = Nt({
|
|
2876
2897
|
definition: l,
|
|
2877
|
-
block:
|
|
2898
|
+
block: O(() => n.block),
|
|
2878
2899
|
onUpdate: (e, t) => {
|
|
2879
2900
|
i("fetchData", {
|
|
2880
2901
|
fieldValues: e,
|
|
@@ -2898,80 +2919,80 @@ var Yi = { class: "tpl:w-full" }, Xi = {
|
|
|
2898
2919
|
g();
|
|
2899
2920
|
}), H(() => n.block.fieldValues, () => {
|
|
2900
2921
|
_();
|
|
2901
|
-
}, { deep: !0 }), (e, t) => (f(),
|
|
2922
|
+
}, { deep: !0 }), (e, t) => (f(), k("div", $i, [u.value ? c.value ? (f(), k("div", na, [V(j(wi), {
|
|
2902
2923
|
size: 24,
|
|
2903
2924
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
2904
|
-
}), I("span",
|
|
2925
|
+
}), I("span", ra, D(j(a).customBlocks.renderError), 1)])) : (f(), k("div", ia, [I("div", { innerHTML: s.value }, null, 8, aa), j(h) && j(m) ? (f(), k("div", oa, [j(d) ? (f(), N(Li, {
|
|
2905
2926
|
key: 1,
|
|
2906
2927
|
class: "tpl:w-48"
|
|
2907
|
-
})) : (f(),
|
|
2928
|
+
})) : (f(), k("button", {
|
|
2908
2929
|
key: 0,
|
|
2909
2930
|
type: "button",
|
|
2910
2931
|
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)]",
|
|
2911
|
-
onClick: t[0] ||=
|
|
2912
|
-
}, [l.value?.icon ? (f(),
|
|
2932
|
+
onClick: t[0] ||= M((...e) => j(p) && j(p)(...e), ["stop"])
|
|
2933
|
+
}, [l.value?.icon ? (f(), N(Mi, {
|
|
2913
2934
|
key: 0,
|
|
2914
2935
|
icon: l.value.icon,
|
|
2915
2936
|
size: 16
|
|
2916
|
-
}, null, 8, ["icon"])) :
|
|
2937
|
+
}, null, 8, ["icon"])) : A("", !0), z(" " + D(l.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : A("", !0)])) : (f(), k("div", ea, [V(j(pi), {
|
|
2917
2938
|
size: 24,
|
|
2918
2939
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
2919
|
-
}), I("span",
|
|
2940
|
+
}), I("span", ta, D(j(a).customBlocks.definitionNotFound), 1)]))]));
|
|
2920
2941
|
}
|
|
2921
|
-
}),
|
|
2942
|
+
}), ca = { class: "tpl:w-full" }, la = /* @__PURE__ */ B({
|
|
2922
2943
|
__name: "DividerBlock",
|
|
2923
2944
|
props: {
|
|
2924
2945
|
block: {},
|
|
2925
2946
|
viewport: {}
|
|
2926
2947
|
},
|
|
2927
2948
|
setup(e) {
|
|
2928
|
-
let t = e, n =
|
|
2949
|
+
let t = e, n = O(() => ({
|
|
2929
2950
|
borderTop: `${t.block.thickness}px ${t.block.lineStyle} ${t.block.color}`,
|
|
2930
2951
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
2931
2952
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
2932
2953
|
}));
|
|
2933
|
-
return (e, t) => (f(),
|
|
2954
|
+
return (e, t) => (f(), k("div", ca, [I("hr", {
|
|
2934
2955
|
class: "tpl:m-0 tpl:border-none",
|
|
2935
2956
|
style: L(n.value)
|
|
2936
2957
|
}, null, 4)]));
|
|
2937
2958
|
}
|
|
2938
|
-
}),
|
|
2959
|
+
}), ua = { class: "tpl:w-full" }, da = { 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)]" }, fa = {
|
|
2939
2960
|
key: 0,
|
|
2940
2961
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
2941
|
-
},
|
|
2962
|
+
}, pa = {
|
|
2942
2963
|
key: 1,
|
|
2943
2964
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
2944
|
-
},
|
|
2965
|
+
}, ma = /* @__PURE__ */ B({
|
|
2945
2966
|
__name: "HtmlBlock",
|
|
2946
2967
|
props: {
|
|
2947
2968
|
block: {},
|
|
2948
2969
|
viewport: {}
|
|
2949
2970
|
},
|
|
2950
2971
|
setup(e) {
|
|
2951
|
-
let t = e, { t: n } = Y(), r =
|
|
2952
|
-
return (e, t) => (f(),
|
|
2972
|
+
let t = e, { t: n } = Y(), r = O(() => t.block.content.trim().length > 0);
|
|
2973
|
+
return (e, t) => (f(), k("div", ua, [I("div", da, [V(j(Qr), {
|
|
2953
2974
|
size: 24,
|
|
2954
2975
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
2955
|
-
}), r.value ? (f(),
|
|
2976
|
+
}), r.value ? (f(), k("span", fa, D(j(n).html.preview), 1)) : (f(), k("span", pa, D(j(n).html.empty), 1))])]));
|
|
2956
2977
|
}
|
|
2957
2978
|
});
|
|
2958
2979
|
//#endregion
|
|
2959
2980
|
//#region src/composables/useAliveFlag.ts
|
|
2960
|
-
function
|
|
2981
|
+
function ha() {
|
|
2961
2982
|
let e = { alive: !0 };
|
|
2962
|
-
return
|
|
2983
|
+
return re(() => {
|
|
2963
2984
|
e.alive = !1;
|
|
2964
2985
|
}), e;
|
|
2965
2986
|
}
|
|
2966
2987
|
//#endregion
|
|
2967
2988
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2968
|
-
var
|
|
2989
|
+
var ga = ["href"], _a = ["src", "alt"], va = ["src", "alt"], ya = {
|
|
2969
2990
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2970
2991
|
style: { opacity: "0.7" }
|
|
2971
|
-
},
|
|
2992
|
+
}, ba = ["href"], xa = ["src", "alt"], Sa = ["src", "alt"], Ca = {
|
|
2972
2993
|
key: 3,
|
|
2973
2994
|
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)]"
|
|
2974
|
-
},
|
|
2995
|
+
}, wa = ["aria-label"], Ta = { key: 1 }, Ea = /* @__PURE__ */ B({
|
|
2975
2996
|
__name: "ImageBlock",
|
|
2976
2997
|
props: {
|
|
2977
2998
|
block: {},
|
|
@@ -2979,7 +3000,7 @@ var fa = ["href"], pa = ["src", "alt"], ma = ["src", "alt"], ha = {
|
|
|
2979
3000
|
},
|
|
2980
3001
|
emits: ["update"],
|
|
2981
3002
|
setup(e, { emit: t }) {
|
|
2982
|
-
let n = e, r = t, { t: i } = Y(), { syntax: a } =
|
|
3003
|
+
let n = e, r = t, { t: i } = Y(), { syntax: a } = Wi(), o = v(Zn, null), s = O(() => !!o), c = ha();
|
|
2983
3004
|
async function l() {
|
|
2984
3005
|
let e = await o?.({ accept: ["images"] });
|
|
2985
3006
|
if (c.alive && e) {
|
|
@@ -2987,7 +3008,7 @@ var fa = ["href"], pa = ["src", "alt"], ma = ["src", "alt"], ha = {
|
|
|
2987
3008
|
e.alt && (t.alt = e.alt), r("update", t);
|
|
2988
3009
|
}
|
|
2989
3010
|
}
|
|
2990
|
-
let u =
|
|
3011
|
+
let u = O(() => ({ textAlign: n.block.align })), d = O(() => {
|
|
2991
3012
|
let e = n.block.align;
|
|
2992
3013
|
return {
|
|
2993
3014
|
maxWidth: "100%",
|
|
@@ -2996,76 +3017,76 @@ var fa = ["href"], pa = ["src", "alt"], ma = ["src", "alt"], ha = {
|
|
|
2996
3017
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2997
3018
|
marginRight: e === "center" ? "auto" : void 0
|
|
2998
3019
|
};
|
|
2999
|
-
}), p =
|
|
3000
|
-
return (t, n) => (f(),
|
|
3020
|
+
}), p = O(() => _t(n.block.src, a));
|
|
3021
|
+
return (t, n) => (f(), k("div", {
|
|
3001
3022
|
class: "tpl:w-full",
|
|
3002
3023
|
style: L(u.value)
|
|
3003
|
-
}, [e.block.src && p.value && e.block.placeholderUrl ? (f(),
|
|
3024
|
+
}, [e.block.src && p.value && e.block.placeholderUrl ? (f(), k(R, { key: 0 }, [e.block.linkUrl ? (f(), k("a", {
|
|
3004
3025
|
key: 0,
|
|
3005
3026
|
href: e.block.linkUrl,
|
|
3006
3027
|
target: "_blank",
|
|
3007
3028
|
rel: "noopener noreferrer",
|
|
3008
|
-
onClick: n[0] ||=
|
|
3029
|
+
onClick: n[0] ||= M(() => {}, ["prevent"])
|
|
3009
3030
|
}, [I("img", {
|
|
3010
3031
|
class: "tpl:border-0",
|
|
3011
3032
|
loading: "lazy",
|
|
3012
3033
|
src: e.block.placeholderUrl,
|
|
3013
|
-
alt: e.block.alt ||
|
|
3034
|
+
alt: e.block.alt || j(i).image.altTextPlaceholder,
|
|
3014
3035
|
style: L(d.value)
|
|
3015
|
-
}, null, 12,
|
|
3036
|
+
}, null, 12, _a)], 8, ga)) : (f(), k("img", {
|
|
3016
3037
|
key: 1,
|
|
3017
3038
|
class: "tpl:border-0",
|
|
3018
3039
|
src: e.block.placeholderUrl,
|
|
3019
3040
|
alt: e.block.alt,
|
|
3020
3041
|
style: L(d.value)
|
|
3021
|
-
}, null, 12,
|
|
3042
|
+
}, null, 12, va))], 64)) : e.block.src && p.value ? (f(), k("div", {
|
|
3022
3043
|
key: 1,
|
|
3023
3044
|
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)]",
|
|
3024
3045
|
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, d.value])
|
|
3025
|
-
}, [V(
|
|
3046
|
+
}, [V(j(si), {
|
|
3026
3047
|
size: 32,
|
|
3027
3048
|
"stroke-width": 1.5,
|
|
3028
3049
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3029
3050
|
style: { opacity: "0.5" }
|
|
3030
|
-
}), I("span",
|
|
3051
|
+
}), I("span", ya, D(e.block.src), 1)], 4)) : e.block.src ? (f(), k(R, { key: 2 }, [e.block.linkUrl ? (f(), k("a", {
|
|
3031
3052
|
key: 0,
|
|
3032
3053
|
href: e.block.linkUrl,
|
|
3033
3054
|
target: "_blank",
|
|
3034
3055
|
rel: "noopener noreferrer",
|
|
3035
|
-
onClick: n[1] ||=
|
|
3056
|
+
onClick: n[1] ||= M(() => {}, ["prevent"])
|
|
3036
3057
|
}, [I("img", {
|
|
3037
3058
|
class: "tpl:border-0",
|
|
3038
3059
|
loading: "lazy",
|
|
3039
3060
|
src: e.block.src,
|
|
3040
|
-
alt: e.block.alt ||
|
|
3061
|
+
alt: e.block.alt || j(i).image.altTextPlaceholder,
|
|
3041
3062
|
style: L(d.value)
|
|
3042
|
-
}, null, 12,
|
|
3063
|
+
}, null, 12, xa)], 8, ba)) : (f(), k("img", {
|
|
3043
3064
|
key: 1,
|
|
3044
3065
|
class: "tpl:border-0",
|
|
3045
3066
|
src: e.block.src,
|
|
3046
3067
|
alt: e.block.alt,
|
|
3047
3068
|
style: L(d.value)
|
|
3048
|
-
}, null, 12,
|
|
3069
|
+
}, null, 12, Sa))], 64)) : (f(), k("div", Ca, [s.value ? (f(), k("button", {
|
|
3049
3070
|
key: 0,
|
|
3050
|
-
"aria-label":
|
|
3071
|
+
"aria-label": j(i).image.browseMedia,
|
|
3051
3072
|
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)]",
|
|
3052
|
-
onClick:
|
|
3053
|
-
}, [V(
|
|
3073
|
+
onClick: M(l, ["stop"])
|
|
3074
|
+
}, [V(j(si), {
|
|
3054
3075
|
size: 14,
|
|
3055
3076
|
"stroke-width": 1.5
|
|
3056
|
-
}), z(" " +
|
|
3077
|
+
}), z(" " + D(j(i).image.browseMedia), 1)], 8, wa)) : (f(), k("span", Ta, D(j(i).image.clickToAdd), 1))]))], 4));
|
|
3057
3078
|
}
|
|
3058
|
-
}),
|
|
3079
|
+
}), Da = { class: "tpl:w-full" }, Oa = ["href"], ka = {
|
|
3059
3080
|
key: 1,
|
|
3060
3081
|
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)]"
|
|
3061
|
-
},
|
|
3082
|
+
}, Aa = /* @__PURE__ */ B({
|
|
3062
3083
|
__name: "MenuBlock",
|
|
3063
3084
|
props: {
|
|
3064
3085
|
block: {},
|
|
3065
3086
|
viewport: {}
|
|
3066
3087
|
},
|
|
3067
3088
|
setup(e) {
|
|
3068
|
-
let t = e, { t: n } = Y(), r =
|
|
3089
|
+
let t = e, { t: n } = Y(), r = O(() => ({
|
|
3069
3090
|
display: "flex",
|
|
3070
3091
|
flexWrap: "wrap",
|
|
3071
3092
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -3073,14 +3094,14 @@ var fa = ["href"], pa = ["src", "alt"], ma = ["src", "alt"], ha = {
|
|
|
3073
3094
|
fontSize: `${t.block.fontSize}px`,
|
|
3074
3095
|
fontFamily: t.block.fontFamily || "inherit",
|
|
3075
3096
|
alignItems: "center"
|
|
3076
|
-
})), i =
|
|
3097
|
+
})), i = O(() => t.block.items.length > 0);
|
|
3077
3098
|
function a(e) {
|
|
3078
3099
|
return e || t.block.linkColor || t.block.color;
|
|
3079
3100
|
}
|
|
3080
|
-
return (t, o) => (f(),
|
|
3101
|
+
return (t, o) => (f(), k("div", Da, [i.value ? (f(), k("div", {
|
|
3081
3102
|
key: 0,
|
|
3082
3103
|
style: L(r.value)
|
|
3083
|
-
}, [(f(!0),
|
|
3104
|
+
}, [(f(!0), k(R, null, h(e.block.items, (t, n) => (f(), k(R, { key: t.id }, [I("a", {
|
|
3084
3105
|
href: t.url || "#",
|
|
3085
3106
|
class: "tpl:cursor-default tpl:no-underline",
|
|
3086
3107
|
style: L({
|
|
@@ -3088,16 +3109,16 @@ var fa = ["href"], pa = ["src", "alt"], ma = ["src", "alt"], ha = {
|
|
|
3088
3109
|
fontWeight: t.bold ? "bold" : "normal",
|
|
3089
3110
|
textDecoration: t.underline ? "underline" : "none"
|
|
3090
3111
|
}),
|
|
3091
|
-
onClick: o[0] ||=
|
|
3092
|
-
},
|
|
3112
|
+
onClick: o[0] ||= M(() => {}, ["prevent"])
|
|
3113
|
+
}, D(t.text || "..."), 13, Oa), n < e.block.items.length - 1 ? (f(), k("span", {
|
|
3093
3114
|
key: 0,
|
|
3094
3115
|
style: L({
|
|
3095
3116
|
color: e.block.separatorColor,
|
|
3096
3117
|
padding: `0 ${e.block.spacing}px`
|
|
3097
3118
|
})
|
|
3098
|
-
},
|
|
3119
|
+
}, D(e.block.separator), 5)) : A("", !0)], 64))), 128))], 4)) : (f(), k("div", ka, [V(j(di), { size: 16 }), I("span", null, D(j(n).menu.addLinks), 1)]))]));
|
|
3099
3120
|
}
|
|
3100
|
-
}),
|
|
3121
|
+
}), ja = new Set([
|
|
3101
3122
|
"http",
|
|
3102
3123
|
"https",
|
|
3103
3124
|
"mailto",
|
|
@@ -3107,7 +3128,7 @@ var fa = ["href"], pa = ["src", "alt"], ma = ["src", "alt"], ha = {
|
|
|
3107
3128
|
"sms",
|
|
3108
3129
|
"xmpp",
|
|
3109
3130
|
"cid"
|
|
3110
|
-
]),
|
|
3131
|
+
]), Ma = new Set([
|
|
3111
3132
|
"SCRIPT",
|
|
3112
3133
|
"STYLE",
|
|
3113
3134
|
"IFRAME",
|
|
@@ -3117,7 +3138,7 @@ var fa = ["href"], pa = ["src", "alt"], ma = ["src", "alt"], ha = {
|
|
|
3117
3138
|
"META",
|
|
3118
3139
|
"BASE",
|
|
3119
3140
|
"FORM"
|
|
3120
|
-
]),
|
|
3141
|
+
]), Na = new Set([
|
|
3121
3142
|
"href",
|
|
3122
3143
|
"xlink:href",
|
|
3123
3144
|
"formaction",
|
|
@@ -3126,16 +3147,16 @@ var fa = ["href"], pa = ["src", "alt"], ma = ["src", "alt"], ha = {
|
|
|
3126
3147
|
"background",
|
|
3127
3148
|
"poster"
|
|
3128
3149
|
]);
|
|
3129
|
-
function
|
|
3150
|
+
function Pa(e, t) {
|
|
3130
3151
|
let n = e.trim();
|
|
3131
3152
|
if (!n || n.startsWith("#")) return !0;
|
|
3132
3153
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
3133
3154
|
if (!r) return !0;
|
|
3134
3155
|
let i = r[1].toLowerCase();
|
|
3135
|
-
return
|
|
3156
|
+
return ja.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
3136
3157
|
}
|
|
3137
|
-
function
|
|
3138
|
-
if (
|
|
3158
|
+
function Fa(e) {
|
|
3159
|
+
if (Ma.has(e.tagName)) {
|
|
3139
3160
|
e.remove();
|
|
3140
3161
|
return;
|
|
3141
3162
|
}
|
|
@@ -3147,29 +3168,29 @@ function ja(e) {
|
|
|
3147
3168
|
e.removeAttribute(n);
|
|
3148
3169
|
continue;
|
|
3149
3170
|
}
|
|
3150
|
-
if (
|
|
3151
|
-
|
|
3171
|
+
if (Na.has(t)) {
|
|
3172
|
+
Pa(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
3152
3173
|
continue;
|
|
3153
3174
|
}
|
|
3154
3175
|
if (t === "src") {
|
|
3155
|
-
|
|
3176
|
+
Pa(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
3156
3177
|
continue;
|
|
3157
3178
|
}
|
|
3158
3179
|
t === "srcdoc" && e.removeAttribute(n);
|
|
3159
3180
|
}
|
|
3160
3181
|
let n = Array.from(e.children);
|
|
3161
|
-
for (let e of n)
|
|
3182
|
+
for (let e of n) Fa(e);
|
|
3162
3183
|
}
|
|
3163
|
-
function
|
|
3184
|
+
function Ia(e) {
|
|
3164
3185
|
if (typeof DOMParser > "u") return e;
|
|
3165
3186
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
3166
|
-
for (let e of n)
|
|
3187
|
+
for (let e of n) Fa(e);
|
|
3167
3188
|
return t.innerHTML;
|
|
3168
3189
|
}
|
|
3169
3190
|
//#endregion
|
|
3170
3191
|
//#region src/composables/useEditableTextBlock.ts
|
|
3171
|
-
function
|
|
3172
|
-
let t = v(
|
|
3192
|
+
function La(e) {
|
|
3193
|
+
let t = v(Kn, []), { syntax: n } = Wi(), r = O(() => Ia(bt(gt(e(), t), n))), i = C(!1), a = C(null), { top: o, left: s } = Tn(a), c = O(() => ({
|
|
3173
3194
|
top: o.value - 8,
|
|
3174
3195
|
left: s.value
|
|
3175
3196
|
}));
|
|
@@ -3190,68 +3211,67 @@ function Na(e) {
|
|
|
3190
3211
|
}
|
|
3191
3212
|
//#endregion
|
|
3192
3213
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3193
|
-
var
|
|
3214
|
+
var Ra = ["innerHTML"], za = /* @__PURE__ */ B({
|
|
3194
3215
|
__name: "ParagraphBlock",
|
|
3195
3216
|
props: {
|
|
3196
3217
|
block: {},
|
|
3197
3218
|
viewport: {}
|
|
3198
3219
|
},
|
|
3199
3220
|
setup(e) {
|
|
3200
|
-
let t = e, n =
|
|
3201
|
-
return (t, l) => (f(),
|
|
3221
|
+
let t = e, n = T(() => import("./ParagraphEditor-DvxIO2LN.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = La(() => t.block.content);
|
|
3222
|
+
return (t, l) => (f(), k("div", {
|
|
3202
3223
|
ref_key: "blockRef",
|
|
3203
3224
|
ref: i,
|
|
3204
3225
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
3205
|
-
onDblclick: l[0] ||= (...e) =>
|
|
3206
|
-
}, [
|
|
3226
|
+
onDblclick: l[0] ||= (...e) => j(s) && j(s)(...e)
|
|
3227
|
+
}, [j(r) ? (f(), N(j(n), {
|
|
3207
3228
|
key: 0,
|
|
3208
3229
|
block: e.block,
|
|
3209
|
-
"toolbar-position":
|
|
3210
|
-
onDone:
|
|
3230
|
+
"toolbar-position": j(a),
|
|
3231
|
+
onDone: j(c)
|
|
3211
3232
|
}, null, 8, [
|
|
3212
3233
|
"block",
|
|
3213
3234
|
"toolbar-position",
|
|
3214
3235
|
"onDone"
|
|
3215
|
-
])) : (f(),
|
|
3236
|
+
])) : (f(), k("div", {
|
|
3216
3237
|
key: 1,
|
|
3217
3238
|
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",
|
|
3218
|
-
innerHTML:
|
|
3219
|
-
}, null, 8,
|
|
3239
|
+
innerHTML: j(o)
|
|
3240
|
+
}, null, 8, Ra))], 544));
|
|
3220
3241
|
}
|
|
3221
3242
|
});
|
|
3222
3243
|
//#endregion
|
|
3223
3244
|
//#region src/utils/blockComponentResolver.ts
|
|
3224
|
-
function
|
|
3245
|
+
function Ba(e, t, n) {
|
|
3225
3246
|
if (t) {
|
|
3226
3247
|
let n = t.getComponent(e);
|
|
3227
3248
|
if (n) return n;
|
|
3228
3249
|
}
|
|
3229
3250
|
return n[e.type] ?? null;
|
|
3230
3251
|
}
|
|
3231
|
-
function
|
|
3232
|
-
let { padding: t,
|
|
3252
|
+
function Va(e) {
|
|
3253
|
+
let { padding: t, backgroundColor: n } = e.styles;
|
|
3233
3254
|
return {
|
|
3234
3255
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
3235
|
-
|
|
3236
|
-
backgroundColor: r || "transparent"
|
|
3256
|
+
backgroundColor: n || "transparent"
|
|
3237
3257
|
};
|
|
3238
3258
|
}
|
|
3239
3259
|
//#endregion
|
|
3240
3260
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
3241
|
-
var
|
|
3261
|
+
var Ha = ["data-block-id", "data-block-type"], Ua = ["aria-label"], Wa = [
|
|
3242
3262
|
"aria-label",
|
|
3243
3263
|
"aria-pressed",
|
|
3244
3264
|
"title"
|
|
3245
|
-
],
|
|
3265
|
+
], Ga = ["aria-label", "title"], Ka = ["aria-label", "title"], qa = ["aria-label", "title"], Ja = {
|
|
3246
3266
|
key: 1,
|
|
3247
3267
|
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"
|
|
3248
|
-
},
|
|
3268
|
+
}, Ya = { 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)]" }, Xa = {
|
|
3249
3269
|
key: 2,
|
|
3250
3270
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
3251
|
-
},
|
|
3271
|
+
}, Za = ["aria-label", "title"], Qa = {
|
|
3252
3272
|
key: 3,
|
|
3253
3273
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
3254
|
-
},
|
|
3274
|
+
}, $a = ["aria-label"], eo = /* @__PURE__ */ Ni(/* @__PURE__ */ B({
|
|
3255
3275
|
__name: "BlockWrapper",
|
|
3256
3276
|
props: {
|
|
3257
3277
|
block: {},
|
|
@@ -3261,7 +3281,7 @@ var Ra = ["data-block-id", "data-block-type"], za = ["aria-label"], Ba = [
|
|
|
3261
3281
|
},
|
|
3262
3282
|
emits: ["select"],
|
|
3263
3283
|
setup(e, { emit: t }) {
|
|
3264
|
-
let n =
|
|
3284
|
+
let n = T(() => import("./BlockIssueBadge-DpiSTwM7.js")), r = e, i = t, { t: a, format: s } = Y(), c = v(tr, 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);
|
|
3265
3285
|
async function p() {
|
|
3266
3286
|
await m(), l.value?.focus();
|
|
3267
3287
|
}
|
|
@@ -3284,48 +3304,47 @@ var Ra = ["data-block-id", "data-block-type"], za = ["aria-label"], Ba = [
|
|
|
3284
3304
|
}
|
|
3285
3305
|
}
|
|
3286
3306
|
}
|
|
3287
|
-
let g =
|
|
3307
|
+
let g = O(() => !r.viewport || !r.block.visibility ? !1 : r.block.visibility[r.viewport] === !1), _ = O(() => r.previewMode === !0 && g.value), y = O(() => r.viewport ? {
|
|
3288
3308
|
desktop: a.viewport.desktop,
|
|
3289
|
-
tablet: a.viewport.tablet,
|
|
3290
3309
|
mobile: a.viewport.mobile
|
|
3291
|
-
}[r.viewport] ?? r.viewport : ""),
|
|
3292
|
-
let e =
|
|
3310
|
+
}[r.viewport] ?? r.viewport : ""), b = O(() => !!r.block.displayCondition), x = v(Ln, null), S = v(Rn, null), w = v(er, {}), ee = O(() => !!w.savedModules), E = O(() => w.comments?.getBlockCount(r.block.id) ?? 0), te = O(() => {
|
|
3311
|
+
let e = Va(r.block);
|
|
3293
3312
|
return {
|
|
3294
3313
|
padding: e.padding,
|
|
3295
3314
|
backgroundColor: e.backgroundColor
|
|
3296
3315
|
};
|
|
3297
3316
|
});
|
|
3298
|
-
function
|
|
3317
|
+
function ne(e) {
|
|
3299
3318
|
r.previewMode || (e.stopPropagation(), i("select"));
|
|
3300
3319
|
}
|
|
3301
|
-
function
|
|
3302
|
-
|
|
3320
|
+
function re() {
|
|
3321
|
+
x?.deleteBlock(r.block.id);
|
|
3303
3322
|
}
|
|
3304
|
-
function
|
|
3305
|
-
|
|
3323
|
+
function N() {
|
|
3324
|
+
x?.duplicateBlock(r.block);
|
|
3306
3325
|
}
|
|
3307
|
-
function
|
|
3308
|
-
|
|
3326
|
+
function ie() {
|
|
3327
|
+
w.savedModules?.openSaveDialog(r.block.id);
|
|
3309
3328
|
}
|
|
3310
|
-
function
|
|
3311
|
-
|
|
3329
|
+
function P() {
|
|
3330
|
+
S?.toggleBlock(r.block.id);
|
|
3312
3331
|
}
|
|
3313
|
-
return (t, r) => (f(),
|
|
3314
|
-
|
|
3332
|
+
return (t, r) => _.value ? A("", !0) : (f(), k("div", {
|
|
3333
|
+
key: 0,
|
|
3334
|
+
class: F(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow tpl:duration-150", {
|
|
3315
3335
|
"tpl-block--selected": e.isSelected,
|
|
3316
3336
|
"tpl-block--idle": !e.isSelected,
|
|
3317
3337
|
"tpl-block--lifted": u.value
|
|
3318
3338
|
}]),
|
|
3319
|
-
style: L(D.value),
|
|
3320
3339
|
"data-block-id": e.block.id,
|
|
3321
3340
|
"data-block-type": e.block.type,
|
|
3322
|
-
onClick:
|
|
3341
|
+
onClick: ne
|
|
3323
3342
|
}, [
|
|
3324
|
-
V(
|
|
3325
|
-
e.isSelected ? (f(),
|
|
3343
|
+
V(j(n), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
3344
|
+
e.isSelected ? (f(), k("div", {
|
|
3326
3345
|
key: 0,
|
|
3327
3346
|
role: "toolbar",
|
|
3328
|
-
"aria-label":
|
|
3347
|
+
"aria-label": j(a).blockActions.drag,
|
|
3329
3348
|
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)]"
|
|
3330
3349
|
}, [
|
|
3331
3350
|
I("button", {
|
|
@@ -3335,119 +3354,119 @@ var Ra = ["data-block-id", "data-block-type"], za = ["aria-label"], Ba = [
|
|
|
3335
3354
|
"aria-label": d.value,
|
|
3336
3355
|
"aria-pressed": u.value,
|
|
3337
3356
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
3338
|
-
title:
|
|
3357
|
+
title: j(a).blockActions.drag,
|
|
3339
3358
|
onKeydown: h
|
|
3340
|
-
}, [V(
|
|
3359
|
+
}, [V(j(ai), {
|
|
3341
3360
|
size: 14,
|
|
3342
3361
|
"stroke-width": 1.5
|
|
3343
|
-
})], 40,
|
|
3362
|
+
})], 40, Wa),
|
|
3344
3363
|
I("button", {
|
|
3345
3364
|
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",
|
|
3346
|
-
"aria-label":
|
|
3347
|
-
title:
|
|
3348
|
-
onClick: N
|
|
3349
|
-
}, [V(
|
|
3365
|
+
"aria-label": j(a).blockActions.duplicate,
|
|
3366
|
+
title: j(a).blockActions.duplicate,
|
|
3367
|
+
onClick: M(N, ["stop"])
|
|
3368
|
+
}, [V(j($r), {
|
|
3350
3369
|
size: 14,
|
|
3351
3370
|
"stroke-width": 1.5
|
|
3352
|
-
})], 8,
|
|
3353
|
-
|
|
3371
|
+
})], 8, Ga),
|
|
3372
|
+
ee.value ? (f(), k("button", {
|
|
3354
3373
|
key: 0,
|
|
3355
3374
|
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",
|
|
3356
|
-
"aria-label":
|
|
3357
|
-
title:
|
|
3358
|
-
onClick:
|
|
3359
|
-
}, [V(
|
|
3375
|
+
"aria-label": j(a).blockActions.saveAsModule,
|
|
3376
|
+
title: j(a).blockActions.saveAsModule,
|
|
3377
|
+
onClick: M(ie, ["stop"])
|
|
3378
|
+
}, [V(j(Hr), {
|
|
3360
3379
|
size: 14,
|
|
3361
3380
|
"stroke-width": 1.5
|
|
3362
|
-
})], 8,
|
|
3381
|
+
})], 8, Ka)) : A("", !0),
|
|
3363
3382
|
I("button", {
|
|
3364
3383
|
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",
|
|
3365
|
-
"aria-label":
|
|
3366
|
-
title:
|
|
3367
|
-
onClick:
|
|
3368
|
-
}, [V(
|
|
3384
|
+
"aria-label": j(a).blockActions.delete,
|
|
3385
|
+
title: j(a).blockActions.delete,
|
|
3386
|
+
onClick: M(re, ["stop"])
|
|
3387
|
+
}, [V(j(Ci), {
|
|
3369
3388
|
size: 14,
|
|
3370
3389
|
"stroke-width": 1.5
|
|
3371
|
-
})], 8,
|
|
3372
|
-
], 8,
|
|
3373
|
-
g.value ? (f(),
|
|
3390
|
+
})], 8, qa)
|
|
3391
|
+
], 8, Ua)) : A("", !0),
|
|
3392
|
+
g.value ? (f(), k("div", Ja, [I("span", Ya, [V(j(ei), {
|
|
3374
3393
|
size: 12,
|
|
3375
3394
|
"stroke-width": 1.5
|
|
3376
|
-
}), z(" " +
|
|
3377
|
-
|
|
3395
|
+
}), z(" " + D(j(s)(j(a).blockActions.hiddenOnViewport, { viewport: y.value })), 1)])])) : A("", !0),
|
|
3396
|
+
b.value && !g.value ? (f(), k("div", Xa, [I("button", {
|
|
3378
3397
|
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)]",
|
|
3379
|
-
"aria-label":
|
|
3398
|
+
"aria-label": j(a).blockActions.conditionToggle,
|
|
3380
3399
|
title: e.block.displayCondition?.label,
|
|
3381
|
-
onClick:
|
|
3382
|
-
}, [V(
|
|
3400
|
+
onClick: M(P, ["stop"])
|
|
3401
|
+
}, [V(j(ii), {
|
|
3383
3402
|
size: 12,
|
|
3384
3403
|
"stroke-width": 2
|
|
3385
|
-
})], 8,
|
|
3386
|
-
|
|
3404
|
+
})], 8, Za)])) : A("", !0),
|
|
3405
|
+
E.value > 0 && !g.value ? (f(), k("div", Qa, [I("button", {
|
|
3387
3406
|
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)]",
|
|
3388
|
-
"aria-label":
|
|
3389
|
-
onClick: r[0] ||=
|
|
3390
|
-
}, [V(
|
|
3407
|
+
"aria-label": j(s)(j(a).blockActions.comments, { count: String(E.value) }),
|
|
3408
|
+
onClick: r[0] ||= M((t) => j(w).comments?.openForBlock(e.block.id), ["stop"])
|
|
3409
|
+
}, [V(j(ui), {
|
|
3391
3410
|
size: 12,
|
|
3392
3411
|
"stroke-width": 2.5
|
|
3393
|
-
}), z(" " +
|
|
3412
|
+
}), z(" " + D(E.value), 1)], 8, $a)])) : A("", !0),
|
|
3394
3413
|
I("div", {
|
|
3395
3414
|
class: "tpl-block-content",
|
|
3396
|
-
style: L(
|
|
3415
|
+
style: L(te.value)
|
|
3397
3416
|
}, [o(t.$slots, "default", {}, void 0, !0)], 4)
|
|
3398
|
-
],
|
|
3417
|
+
], 10, Ha));
|
|
3399
3418
|
}
|
|
3400
|
-
}), [["__scopeId", "data-v-
|
|
3419
|
+
}), [["__scopeId", "data-v-4a48371d"]]);
|
|
3401
3420
|
//#endregion
|
|
3402
3421
|
//#region src/utils/unwrapParagraph.ts
|
|
3403
|
-
function
|
|
3422
|
+
function to(e) {
|
|
3404
3423
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
3405
3424
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
3406
3425
|
}
|
|
3407
3426
|
//#endregion
|
|
3408
3427
|
//#region src/components/blocks/TitleBlock.vue
|
|
3409
|
-
var
|
|
3428
|
+
var no = /* @__PURE__ */ B({
|
|
3410
3429
|
__name: "TitleBlock",
|
|
3411
3430
|
props: {
|
|
3412
3431
|
block: {},
|
|
3413
3432
|
viewport: {}
|
|
3414
3433
|
},
|
|
3415
3434
|
setup(e) {
|
|
3416
|
-
let t = e, n =
|
|
3435
|
+
let t = e, n = T(() => import("./TitleEditor-D3gPRd0x.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = La(() => t.block.content), l = O(() => {
|
|
3417
3436
|
let e = {
|
|
3418
3437
|
fontSize: `${pe[t.block.level]}px`,
|
|
3419
3438
|
color: t.block.color,
|
|
3420
3439
|
textAlign: t.block.textAlign
|
|
3421
3440
|
};
|
|
3422
3441
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
3423
|
-
}), u =
|
|
3424
|
-
return (t, o) => (f(),
|
|
3442
|
+
}), u = O(() => `h${t.block.level}`), p = O(() => to(o.value));
|
|
3443
|
+
return (t, o) => (f(), k("div", {
|
|
3425
3444
|
ref_key: "blockRef",
|
|
3426
3445
|
ref: i,
|
|
3427
3446
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
3428
3447
|
style: L(l.value),
|
|
3429
|
-
onDblclick: o[0] ||= (...e) =>
|
|
3430
|
-
}, [
|
|
3448
|
+
onDblclick: o[0] ||= (...e) => j(s) && j(s)(...e)
|
|
3449
|
+
}, [j(r) ? (f(), N(j(n), {
|
|
3431
3450
|
key: 0,
|
|
3432
3451
|
block: e.block,
|
|
3433
|
-
"toolbar-position":
|
|
3434
|
-
onDone:
|
|
3452
|
+
"toolbar-position": j(a),
|
|
3453
|
+
onDone: j(c)
|
|
3435
3454
|
}, null, 8, [
|
|
3436
3455
|
"block",
|
|
3437
3456
|
"toolbar-position",
|
|
3438
3457
|
"onDone"
|
|
3439
|
-
])) : (f(),
|
|
3458
|
+
])) : (f(), N(d(u.value), {
|
|
3440
3459
|
key: 1,
|
|
3441
3460
|
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",
|
|
3442
3461
|
style: { color: "inherit" },
|
|
3443
3462
|
innerHTML: p.value
|
|
3444
3463
|
}, null, 8, ["innerHTML"]))], 36));
|
|
3445
3464
|
}
|
|
3446
|
-
}),
|
|
3465
|
+
}), ro = { class: "tpl:w-full" }, io = { class: "tpl:flex tpl:gap-0" }, ao = {
|
|
3447
3466
|
key: 0,
|
|
3448
3467
|
"data-testid": "section-drop-hint",
|
|
3449
3468
|
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)]"
|
|
3450
|
-
},
|
|
3469
|
+
}, oo = /* @__PURE__ */ B({
|
|
3451
3470
|
__name: "SectionBlock",
|
|
3452
3471
|
props: {
|
|
3453
3472
|
block: {},
|
|
@@ -3455,13 +3474,13 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3455
3474
|
},
|
|
3456
3475
|
setup(e) {
|
|
3457
3476
|
let t = {
|
|
3458
|
-
title:
|
|
3459
|
-
paragraph:
|
|
3460
|
-
image:
|
|
3461
|
-
button:
|
|
3462
|
-
divider:
|
|
3463
|
-
custom:
|
|
3464
|
-
}, n = e, { t: r } = Y(), i = J(Fn, "SectionBlock"), a = v(Rn, null), o = v(Un, null), s =
|
|
3477
|
+
title: no,
|
|
3478
|
+
paragraph: za,
|
|
3479
|
+
image: Ea,
|
|
3480
|
+
button: Mr,
|
|
3481
|
+
divider: la,
|
|
3482
|
+
custom: sa
|
|
3483
|
+
}, n = e, { t: r } = Y(), i = J(Fn, "SectionBlock"), a = v(Rn, null), o = v(Un, null), s = O(() => {
|
|
3465
3484
|
switch (n.block.columns) {
|
|
3466
3485
|
case "2": return ["50%", "50%"];
|
|
3467
3486
|
case "3": return [
|
|
@@ -3473,7 +3492,7 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3473
3492
|
case "2-1": return ["66.67%", "33.33%"];
|
|
3474
3493
|
default: return ["100%"];
|
|
3475
3494
|
}
|
|
3476
|
-
}), l =
|
|
3495
|
+
}), l = O(() => {
|
|
3477
3496
|
let e = s.value.length, t = [...n.block.children];
|
|
3478
3497
|
for (; t.length < e;) t.push([]);
|
|
3479
3498
|
return t.slice(0, e);
|
|
@@ -3487,7 +3506,7 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3487
3506
|
a[e] = r, i.updateBlock(n.block.id, { children: a });
|
|
3488
3507
|
}
|
|
3489
3508
|
function m(e) {
|
|
3490
|
-
return
|
|
3509
|
+
return Ba(e, o, t);
|
|
3491
3510
|
}
|
|
3492
3511
|
function g(e, t) {
|
|
3493
3512
|
e.type === "custom" && i.updateBlock(e.id, {
|
|
@@ -3495,11 +3514,11 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3495
3514
|
dataSourceFetched: t.dataSourceFetched
|
|
3496
3515
|
});
|
|
3497
3516
|
}
|
|
3498
|
-
return (t, n) => (f(),
|
|
3517
|
+
return (t, n) => (f(), k("div", ro, [I("div", io, [(f(!0), k(R, null, h(l.value, (t, n) => (f(), k("div", {
|
|
3499
3518
|
key: n,
|
|
3500
|
-
class:
|
|
3519
|
+
class: F(["tpl:relative tpl:min-h-[60px] tpl:rounded", u(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3501
3520
|
style: L({ width: s.value[n] })
|
|
3502
|
-
}, [V(
|
|
3521
|
+
}, [V(j(ce), {
|
|
3503
3522
|
"model-value": u(n),
|
|
3504
3523
|
group: {
|
|
3505
3524
|
name: "blocks",
|
|
@@ -3517,13 +3536,14 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3517
3536
|
class: "tpl:min-h-[60px]",
|
|
3518
3537
|
"onUpdate:modelValue": (e) => p(n, e)
|
|
3519
3538
|
}, {
|
|
3520
|
-
default: b(() => [(f(!0),
|
|
3539
|
+
default: b(() => [(f(!0), k(R, null, h(u(n), (t) => c((f(), k("div", { key: t.id }, [V(eo, {
|
|
3521
3540
|
block: t,
|
|
3522
|
-
"is-selected":
|
|
3541
|
+
"is-selected": j(i).state.selectedBlockId === t.id,
|
|
3523
3542
|
viewport: e.viewport,
|
|
3524
|
-
|
|
3543
|
+
"preview-mode": j(i).state.previewMode,
|
|
3544
|
+
onSelect: (e) => j(i).selectBlock(t.id)
|
|
3525
3545
|
}, {
|
|
3526
|
-
default: b(() => [(f(),
|
|
3546
|
+
default: b(() => [(f(), N(d(m(t)), {
|
|
3527
3547
|
block: t,
|
|
3528
3548
|
viewport: e.viewport,
|
|
3529
3549
|
onFetchData: (e) => g(t, e)
|
|
@@ -3537,16 +3557,17 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3537
3557
|
"block",
|
|
3538
3558
|
"is-selected",
|
|
3539
3559
|
"viewport",
|
|
3560
|
+
"preview-mode",
|
|
3540
3561
|
"onSelect"
|
|
3541
|
-
])])), [[se, !
|
|
3562
|
+
])])), [[se, !j(a)?.isHidden(t.id)]])), 128))]),
|
|
3542
3563
|
_: 2
|
|
3543
3564
|
}, 1032, [
|
|
3544
3565
|
"model-value",
|
|
3545
3566
|
"group",
|
|
3546
3567
|
"onUpdate:modelValue"
|
|
3547
|
-
]), u(n).length === 0 ? (f(),
|
|
3568
|
+
]), u(n).length === 0 ? (f(), k("div", ao, [I("span", null, D(j(r).section.dropHere), 1)])) : A("", !0)], 6))), 128))])]));
|
|
3548
3569
|
}
|
|
3549
|
-
}),
|
|
3570
|
+
}), so = {
|
|
3550
3571
|
facebook: {
|
|
3551
3572
|
name: "Facebook",
|
|
3552
3573
|
color: "#1877F2",
|
|
@@ -3627,11 +3648,11 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3627
3648
|
color: "#1769FF",
|
|
3628
3649
|
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"
|
|
3629
3650
|
}
|
|
3630
|
-
},
|
|
3651
|
+
}, co = {
|
|
3631
3652
|
small: 24,
|
|
3632
3653
|
medium: 32,
|
|
3633
3654
|
large: 48
|
|
3634
|
-
},
|
|
3655
|
+
}, lo = [
|
|
3635
3656
|
"facebook",
|
|
3636
3657
|
"twitter",
|
|
3637
3658
|
"instagram",
|
|
@@ -3648,11 +3669,11 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3648
3669
|
"github",
|
|
3649
3670
|
"dribbble",
|
|
3650
3671
|
"behance"
|
|
3651
|
-
],
|
|
3672
|
+
], uo = [
|
|
3652
3673
|
"width",
|
|
3653
3674
|
"height",
|
|
3654
3675
|
"fill"
|
|
3655
|
-
],
|
|
3676
|
+
], fo = ["d"], po = /* @__PURE__ */ B({
|
|
3656
3677
|
__name: "SocialIconSvg",
|
|
3657
3678
|
props: {
|
|
3658
3679
|
platform: {},
|
|
@@ -3660,7 +3681,7 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3660
3681
|
iconSize: {}
|
|
3661
3682
|
},
|
|
3662
3683
|
setup(e) {
|
|
3663
|
-
let t = e, n =
|
|
3684
|
+
let t = e, n = O(() => so[t.platform]), r = O(() => co[t.iconSize]), i = O(() => {
|
|
3664
3685
|
let e = {
|
|
3665
3686
|
display: "inline-flex",
|
|
3666
3687
|
alignItems: "center",
|
|
@@ -3697,40 +3718,40 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3697
3718
|
};
|
|
3698
3719
|
default: return e;
|
|
3699
3720
|
}
|
|
3700
|
-
}), a =
|
|
3701
|
-
return (e, t) => (f(),
|
|
3721
|
+
}), a = O(() => Math.floor(r.value * .6)), o = O(() => t.iconStyle === "outlined" ? n.value.color : "#ffffff");
|
|
3722
|
+
return (e, t) => (f(), k("span", { style: L(i.value) }, [(f(), k("svg", {
|
|
3702
3723
|
width: a.value,
|
|
3703
3724
|
height: a.value,
|
|
3704
3725
|
viewBox: "0 0 24 24",
|
|
3705
3726
|
fill: o.value,
|
|
3706
3727
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3707
|
-
}, [I("path", { d: n.value.path }, null, 8,
|
|
3728
|
+
}, [I("path", { d: n.value.path }, null, 8, fo)], 8, uo))], 4));
|
|
3708
3729
|
}
|
|
3709
|
-
}),
|
|
3730
|
+
}), mo = { class: "tpl:w-full" }, ho = ["href"], go = {
|
|
3710
3731
|
key: 1,
|
|
3711
3732
|
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)]"
|
|
3712
|
-
},
|
|
3733
|
+
}, _o = /* @__PURE__ */ B({
|
|
3713
3734
|
__name: "SocialIconsBlock",
|
|
3714
3735
|
props: {
|
|
3715
3736
|
block: {},
|
|
3716
3737
|
viewport: {}
|
|
3717
3738
|
},
|
|
3718
3739
|
setup(e) {
|
|
3719
|
-
let t = e, { t: n } = Y(), r =
|
|
3740
|
+
let t = e, { t: n } = Y(), r = O(() => ({
|
|
3720
3741
|
display: "flex",
|
|
3721
3742
|
flexWrap: "wrap",
|
|
3722
3743
|
gap: `${t.block.spacing}px`,
|
|
3723
3744
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
3724
|
-
})), i =
|
|
3725
|
-
return (t, a) => (f(),
|
|
3745
|
+
})), i = O(() => t.block.icons.length > 0);
|
|
3746
|
+
return (t, a) => (f(), k("div", mo, [i.value ? (f(), k("div", {
|
|
3726
3747
|
key: 0,
|
|
3727
3748
|
style: L(r.value)
|
|
3728
|
-
}, [(f(!0),
|
|
3749
|
+
}, [(f(!0), k(R, null, h(e.block.icons, (t) => (f(), k("a", {
|
|
3729
3750
|
key: t.id,
|
|
3730
3751
|
href: t.url || "#",
|
|
3731
3752
|
class: "tpl:cursor-default",
|
|
3732
|
-
onClick: a[0] ||=
|
|
3733
|
-
}, [V(
|
|
3753
|
+
onClick: a[0] ||= M(() => {}, ["prevent"])
|
|
3754
|
+
}, [V(po, {
|
|
3734
3755
|
platform: t.platform,
|
|
3735
3756
|
"icon-style": e.block.iconStyle,
|
|
3736
3757
|
"icon-size": e.block.iconSize
|
|
@@ -3738,44 +3759,44 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3738
3759
|
"platform",
|
|
3739
3760
|
"icon-style",
|
|
3740
3761
|
"icon-size"
|
|
3741
|
-
])], 8,
|
|
3762
|
+
])], 8, ho))), 128))], 4)) : (f(), k("div", go, [V(j(vi), { size: 16 }), I("span", null, D(j(n).social.addIcons), 1)]))]));
|
|
3742
3763
|
}
|
|
3743
|
-
}),
|
|
3764
|
+
}), vo = { class: "tpl:w-full" }, yo = {
|
|
3744
3765
|
key: 0,
|
|
3745
3766
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3746
3767
|
style: {
|
|
3747
3768
|
"background-color": "var(--tpl-bg-hover)",
|
|
3748
3769
|
color: "var(--tpl-text-dim)"
|
|
3749
3770
|
}
|
|
3750
|
-
},
|
|
3771
|
+
}, bo = /* @__PURE__ */ B({
|
|
3751
3772
|
__name: "SpacerBlock",
|
|
3752
3773
|
props: {
|
|
3753
3774
|
block: {},
|
|
3754
3775
|
viewport: {}
|
|
3755
3776
|
},
|
|
3756
3777
|
setup(e) {
|
|
3757
|
-
let t = e, n = J(Fn, "SpacerBlock"), r =
|
|
3778
|
+
let t = e, n = J(Fn, "SpacerBlock"), r = O(() => ({
|
|
3758
3779
|
height: `${t.block.height}px`,
|
|
3759
3780
|
minHeight: `${t.block.height}px`,
|
|
3760
3781
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3761
3782
|
}));
|
|
3762
|
-
return (t, i) => (f(),
|
|
3783
|
+
return (t, i) => (f(), k("div", vo, [I("div", {
|
|
3763
3784
|
style: L(r.value),
|
|
3764
|
-
class:
|
|
3765
|
-
}, [
|
|
3785
|
+
class: F(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !j(n).state.previewMode }])
|
|
3786
|
+
}, [j(n).state.previewMode ? A("", !0) : (f(), k("span", yo, D(e.block.height) + "px ", 1))], 6)]));
|
|
3766
3787
|
}
|
|
3767
|
-
}),
|
|
3788
|
+
}), xo = { class: "tpl:w-full" }, So = { key: 0 }, Co = [
|
|
3768
3789
|
"aria-label",
|
|
3769
3790
|
"data-placeholder",
|
|
3770
3791
|
"onBlur"
|
|
3771
|
-
],
|
|
3792
|
+
], wo = [
|
|
3772
3793
|
"aria-label",
|
|
3773
3794
|
"data-placeholder",
|
|
3774
3795
|
"onBlur"
|
|
3775
|
-
],
|
|
3796
|
+
], To = {
|
|
3776
3797
|
key: 1,
|
|
3777
3798
|
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)]"
|
|
3778
|
-
},
|
|
3799
|
+
}, Eo = /* @__PURE__ */ Ni(/* @__PURE__ */ B({
|
|
3779
3800
|
__name: "TableBlock",
|
|
3780
3801
|
props: {
|
|
3781
3802
|
block: {},
|
|
@@ -3789,22 +3810,22 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3789
3810
|
updated(e, t) {
|
|
3790
3811
|
t.value !== t.oldValue && e.ownerDocument.activeElement !== e && (e.textContent = t.value ?? "");
|
|
3791
3812
|
}
|
|
3792
|
-
}, n = e, { t: r } = Y(), i = J(Fn, "TableBlock"), a =
|
|
3813
|
+
}, n = e, { t: r } = Y(), i = J(Fn, "TableBlock"), a = O(() => n.block.rows.length > 0), o = O(() => ({
|
|
3793
3814
|
width: "100%",
|
|
3794
3815
|
borderCollapse: "collapse",
|
|
3795
3816
|
fontSize: `${n.block.fontSize}px`,
|
|
3796
3817
|
color: n.block.color,
|
|
3797
3818
|
textAlign: n.block.textAlign,
|
|
3798
3819
|
fontFamily: n.block.fontFamily || "inherit"
|
|
3799
|
-
})), s =
|
|
3820
|
+
})), s = O(() => ({
|
|
3800
3821
|
border: `${n.block.borderWidth}px solid ${n.block.borderColor}`,
|
|
3801
3822
|
padding: `${n.block.cellPadding}px`,
|
|
3802
3823
|
textAlign: n.block.textAlign
|
|
3803
|
-
})), l =
|
|
3824
|
+
})), l = O(() => ({
|
|
3804
3825
|
...s.value,
|
|
3805
3826
|
fontWeight: "bold",
|
|
3806
3827
|
backgroundColor: n.block.headerBackgroundColor || "transparent"
|
|
3807
|
-
})), u =
|
|
3828
|
+
})), u = O(() => n.block.hasHeaderRow && n.block.rows.length > 0 ? n.block.rows[0] : null), d = O(() => n.block.hasHeaderRow ? n.block.rows.slice(1) : n.block.rows);
|
|
3808
3829
|
function p() {
|
|
3809
3830
|
i.selectBlock(n.block.id);
|
|
3810
3831
|
}
|
|
@@ -3818,38 +3839,38 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3818
3839
|
} : n);
|
|
3819
3840
|
i.updateBlock(n.block.id, { rows: o });
|
|
3820
3841
|
}
|
|
3821
|
-
return (e, n) => (f(),
|
|
3842
|
+
return (e, n) => (f(), k("div", xo, [a.value ? (f(), k("table", {
|
|
3822
3843
|
key: 0,
|
|
3823
3844
|
style: L(o.value),
|
|
3824
3845
|
class: "tpl-table-editable"
|
|
3825
|
-
}, [u.value ? (f(),
|
|
3846
|
+
}, [u.value ? (f(), k("thead", So, [I("tr", null, [(f(!0), k(R, null, h(u.value.cells, (e) => c((f(), k("th", {
|
|
3826
3847
|
key: e.id,
|
|
3827
3848
|
style: L(l.value),
|
|
3828
|
-
"aria-label":
|
|
3849
|
+
"aria-label": j(r).table.cellPlaceholder,
|
|
3829
3850
|
contenteditable: "true",
|
|
3830
|
-
"data-placeholder":
|
|
3851
|
+
"data-placeholder": j(r).table.cellPlaceholder,
|
|
3831
3852
|
onBlur: (t) => m(u.value.id, e.id, t),
|
|
3832
|
-
onKeydown: n[0] ||=
|
|
3833
|
-
onClick:
|
|
3834
|
-
}, null, 44,
|
|
3853
|
+
onKeydown: n[0] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3854
|
+
onClick: M(p, ["stop"])
|
|
3855
|
+
}, null, 44, Co)), [[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", {
|
|
3835
3856
|
key: i.id,
|
|
3836
3857
|
style: L(s.value),
|
|
3837
|
-
"aria-label":
|
|
3858
|
+
"aria-label": j(r).table.cellPlaceholder,
|
|
3838
3859
|
contenteditable: "true",
|
|
3839
|
-
"data-placeholder":
|
|
3860
|
+
"data-placeholder": j(r).table.cellPlaceholder,
|
|
3840
3861
|
onBlur: (t) => m(e.id, i.id, t),
|
|
3841
|
-
onKeydown: n[1] ||=
|
|
3842
|
-
onClick:
|
|
3843
|
-
}, null, 44,
|
|
3862
|
+
onKeydown: n[1] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3863
|
+
onClick: M(p, ["stop"])
|
|
3864
|
+
}, null, 44, wo)), [[t, i.content]])), 128))]))), 128))])], 4)) : (f(), k("div", To, [V(j(Si), { size: 16 }), I("span", null, D(j(r).table.empty), 1)]))]));
|
|
3844
3865
|
}
|
|
3845
|
-
}), [["__scopeId", "data-v-4f49860b"]]),
|
|
3866
|
+
}), [["__scopeId", "data-v-4f49860b"]]), Do = /* @__PURE__ */ B({
|
|
3846
3867
|
__name: "VideoPlayButton",
|
|
3847
3868
|
props: { hoverEffect: {
|
|
3848
3869
|
type: Boolean,
|
|
3849
3870
|
default: !1
|
|
3850
3871
|
} },
|
|
3851
3872
|
setup(e) {
|
|
3852
|
-
return (t, n) => (f(),
|
|
3873
|
+
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", {
|
|
3853
3874
|
class: "tpl:ml-1 tpl:text-[var(--tpl-danger)]",
|
|
3854
3875
|
width: "28",
|
|
3855
3876
|
height: "28",
|
|
@@ -3860,7 +3881,7 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3860
3881
|
});
|
|
3861
3882
|
//#endregion
|
|
3862
3883
|
//#region src/utils/videoThumbnail.ts
|
|
3863
|
-
function
|
|
3884
|
+
function Oo(e) {
|
|
3864
3885
|
if (!e) return {
|
|
3865
3886
|
platform: "unknown",
|
|
3866
3887
|
videoId: null,
|
|
@@ -3892,25 +3913,25 @@ function wo(e) {
|
|
|
3892
3913
|
thumbnailUrl: null
|
|
3893
3914
|
};
|
|
3894
3915
|
}
|
|
3895
|
-
function
|
|
3896
|
-
return t ||
|
|
3916
|
+
function ko(e, t) {
|
|
3917
|
+
return t || Oo(e).thumbnailUrl;
|
|
3897
3918
|
}
|
|
3898
3919
|
//#endregion
|
|
3899
3920
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3900
|
-
var
|
|
3921
|
+
var Ao = ["src", "alt"], jo = {
|
|
3901
3922
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3902
3923
|
style: { opacity: "0.7" }
|
|
3903
|
-
},
|
|
3924
|
+
}, Mo = ["href"], No = ["src", "alt"], Po = ["src", "alt"], Fo = {
|
|
3904
3925
|
key: 3,
|
|
3905
3926
|
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)]"
|
|
3906
|
-
},
|
|
3927
|
+
}, Io = /* @__PURE__ */ B({
|
|
3907
3928
|
__name: "VideoBlock",
|
|
3908
3929
|
props: {
|
|
3909
3930
|
block: {},
|
|
3910
3931
|
viewport: {}
|
|
3911
3932
|
},
|
|
3912
3933
|
setup(e) {
|
|
3913
|
-
let t = e, { t: n } = Y(), { syntax: r } =
|
|
3934
|
+
let t = e, { t: n } = Y(), { syntax: r } = Wi(), i = O(() => _t(t.block.url, r) || _t(t.block.thumbnailUrl, r)), a = O(() => i.value ? null : ko(t.block.url, t.block.thumbnailUrl)), o = O(() => ({ textAlign: t.block.align })), s = O(() => {
|
|
3914
3935
|
let e = t.block.align;
|
|
3915
3936
|
return {
|
|
3916
3937
|
maxWidth: "100%",
|
|
@@ -3919,11 +3940,11 @@ var Eo = ["src", "alt"], Do = {
|
|
|
3919
3940
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
3920
3941
|
marginRight: e === "center" ? "auto" : void 0
|
|
3921
3942
|
};
|
|
3922
|
-
}), c =
|
|
3923
|
-
return (t, r) => (f(),
|
|
3943
|
+
}), c = O(() => _t(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
3944
|
+
return (t, r) => (f(), k("div", {
|
|
3924
3945
|
class: "tpl:w-full",
|
|
3925
3946
|
style: L(o.value)
|
|
3926
|
-
}, [i.value && e.block.placeholderUrl ? (f(),
|
|
3947
|
+
}, [i.value && e.block.placeholderUrl ? (f(), k("div", {
|
|
3927
3948
|
key: 0,
|
|
3928
3949
|
class: "tpl:relative tpl:inline-block",
|
|
3929
3950
|
style: L(s.value)
|
|
@@ -3931,28 +3952,28 @@ var Eo = ["src", "alt"], Do = {
|
|
|
3931
3952
|
class: "tpl:w-full tpl:border-0",
|
|
3932
3953
|
src: e.block.placeholderUrl,
|
|
3933
3954
|
alt: e.block.alt
|
|
3934
|
-
}, null, 8,
|
|
3955
|
+
}, null, 8, Ao), V(Do)], 4)) : i.value ? (f(), k("div", {
|
|
3935
3956
|
key: 1,
|
|
3936
3957
|
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)]",
|
|
3937
3958
|
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, s.value])
|
|
3938
|
-
}, [V(
|
|
3959
|
+
}, [V(j(Di), {
|
|
3939
3960
|
size: 36,
|
|
3940
3961
|
"stroke-width": 1.5,
|
|
3941
3962
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3942
3963
|
style: { opacity: "0.5" }
|
|
3943
|
-
}), I("span",
|
|
3964
|
+
}), I("span", jo, D(c.value), 1)], 4)) : a.value ? (f(), k(R, { key: 2 }, [e.block.url ? (f(), k("a", {
|
|
3944
3965
|
key: 0,
|
|
3945
3966
|
href: e.block.url,
|
|
3946
3967
|
target: "_blank",
|
|
3947
3968
|
rel: "noopener noreferrer",
|
|
3948
3969
|
class: "tpl:group tpl:relative tpl:inline-block",
|
|
3949
3970
|
style: L(s.value),
|
|
3950
|
-
onClick: r[0] ||=
|
|
3971
|
+
onClick: r[0] ||= M(() => {}, ["prevent"])
|
|
3951
3972
|
}, [I("img", {
|
|
3952
3973
|
class: "tpl:w-full tpl:border-0",
|
|
3953
3974
|
src: a.value,
|
|
3954
3975
|
alt: e.block.alt
|
|
3955
|
-
}, null, 8,
|
|
3976
|
+
}, null, 8, No), V(Do, { "hover-effect": "" })], 12, Mo)) : (f(), k("div", {
|
|
3956
3977
|
key: 1,
|
|
3957
3978
|
class: "tpl:relative tpl:inline-block",
|
|
3958
3979
|
style: L(s.value)
|
|
@@ -3960,31 +3981,31 @@ var Eo = ["src", "alt"], Do = {
|
|
|
3960
3981
|
class: "tpl:w-full tpl:border-0",
|
|
3961
3982
|
src: a.value,
|
|
3962
3983
|
alt: e.block.alt
|
|
3963
|
-
}, null, 8,
|
|
3984
|
+
}, null, 8, Po), V(Do)], 4))], 64)) : (f(), k("div", Fo, [V(j(Di), {
|
|
3964
3985
|
size: 40,
|
|
3965
3986
|
"stroke-width": 1.5,
|
|
3966
3987
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3967
|
-
}), I("span", null,
|
|
3968
|
-
}
|
|
3969
|
-
}),
|
|
3970
|
-
section:
|
|
3971
|
-
title:
|
|
3972
|
-
paragraph:
|
|
3973
|
-
image:
|
|
3974
|
-
button:
|
|
3975
|
-
divider:
|
|
3976
|
-
video:
|
|
3977
|
-
social:
|
|
3978
|
-
menu:
|
|
3979
|
-
table:
|
|
3980
|
-
spacer:
|
|
3981
|
-
html:
|
|
3982
|
-
countdown:
|
|
3988
|
+
}), I("span", null, D(j(n).video.addVideo), 1)]))], 4));
|
|
3989
|
+
}
|
|
3990
|
+
}), Lo = {
|
|
3991
|
+
section: oo,
|
|
3992
|
+
title: no,
|
|
3993
|
+
paragraph: za,
|
|
3994
|
+
image: Ea,
|
|
3995
|
+
button: Mr,
|
|
3996
|
+
divider: la,
|
|
3997
|
+
video: Io,
|
|
3998
|
+
social: _o,
|
|
3999
|
+
menu: Aa,
|
|
4000
|
+
table: Eo,
|
|
4001
|
+
spacer: bo,
|
|
4002
|
+
html: ma,
|
|
4003
|
+
countdown: T(() => import("./CountdownBlock-BKsCWboK.js").then((e) => e.n))
|
|
3983
4004
|
};
|
|
3984
|
-
function
|
|
4005
|
+
function Ro(e) {
|
|
3985
4006
|
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = Y(r);
|
|
3986
4007
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
3987
|
-
let { resolvedTheme: c } =
|
|
4008
|
+
let { resolvedTheme: c } = gr(O(() => t.state.uiTheme)), u = C(n.theme ?? {}), { themeStyles: d } = vr({
|
|
3988
4009
|
themeOverrides: u,
|
|
3989
4010
|
resolvedTheme: c,
|
|
3990
4011
|
extraStyles: e.themeExtraStyles
|
|
@@ -4009,13 +4030,13 @@ function Po(e) {
|
|
|
4009
4030
|
g && (_ = H(f.isNavigating, (e) => {
|
|
4010
4031
|
e ? g.pause() : g.resume();
|
|
4011
4032
|
}));
|
|
4012
|
-
let v =
|
|
4033
|
+
let v = hr(t, {
|
|
4013
4034
|
t: a,
|
|
4014
4035
|
format: o
|
|
4015
|
-
}), y =
|
|
4016
|
-
if (
|
|
4036
|
+
}), y = Sr();
|
|
4037
|
+
if (Dr(y, Lo), n.customBlocks?.length) for (let e of n.customBlocks) y.registerCustom(e, sa);
|
|
4017
4038
|
function b(e) {
|
|
4018
|
-
for (let t of e) y.registerCustom(t,
|
|
4039
|
+
for (let t of e) y.registerCustom(t, sa);
|
|
4019
4040
|
}
|
|
4020
4041
|
let x = Nn();
|
|
4021
4042
|
if (s() && l(x.dispose), e.containerEl) {
|
|
@@ -4026,7 +4047,7 @@ function Po(e) {
|
|
|
4026
4047
|
}, { capture: !0 });
|
|
4027
4048
|
}
|
|
4028
4049
|
function S(r) {
|
|
4029
|
-
x.isActive() &&
|
|
4050
|
+
x.isActive() && kr(r, {
|
|
4030
4051
|
history: f,
|
|
4031
4052
|
selectBlock: (e) => t.selectBlock(e),
|
|
4032
4053
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
@@ -4037,19 +4058,19 @@ function Po(e) {
|
|
|
4037
4058
|
}
|
|
4038
4059
|
q(document, "keydown", S);
|
|
4039
4060
|
let w = C(null);
|
|
4040
|
-
p(
|
|
4041
|
-
let
|
|
4042
|
-
p(
|
|
4043
|
-
let
|
|
4061
|
+
p(rr, e.editorRoot ?? document), p(ir, w), p(Pn, r), p(Fn, t), p(In, f), p(Ln, m), p(Rn, h), p(zn, i), p(Bn, d), p(Vn, c), p(Hn, n.blockDefaults), p(Un, y), p(Wn, n.customBlocks ?? []), p(Gn, Cr(t.content, y));
|
|
4062
|
+
let ee = ft(n.mergeTags?.syntax);
|
|
4063
|
+
p(Kn, n.mergeTags?.tags ?? []), p(qn, ee), p(Jn, n.mergeTags?.onRequest ?? null), p(Yn, n.mergeTags?.autocomplete !== !1), p(Xn, dr()), p(Zn, n.onRequestMedia ?? null), p(Qn, n.displayConditions?.conditions ?? []), p($n, n.displayConditions?.allowCustom ?? !1), p(er, e.capabilities ?? {}), p(tr, v);
|
|
4064
|
+
let T = fr(n.lint) ? null : pr({
|
|
4044
4065
|
content: t.content,
|
|
4045
4066
|
options: n.lint ?? {},
|
|
4046
4067
|
updateBlock: t.updateBlock,
|
|
4047
4068
|
updateSettings: t.updateSettings,
|
|
4048
4069
|
removeBlock: t.removeBlock
|
|
4049
4070
|
});
|
|
4050
|
-
p(
|
|
4051
|
-
function
|
|
4052
|
-
_?.(),
|
|
4071
|
+
p(nr, T);
|
|
4072
|
+
function E() {
|
|
4073
|
+
_?.(), T?.destroy(), g?.destroy(), f.destroy();
|
|
4053
4074
|
}
|
|
4054
4075
|
return {
|
|
4055
4076
|
t: a,
|
|
@@ -4063,34 +4084,34 @@ function Po(e) {
|
|
|
4063
4084
|
themeOverrides: u,
|
|
4064
4085
|
registry: y,
|
|
4065
4086
|
keyboardReorder: v,
|
|
4066
|
-
templateLint:
|
|
4087
|
+
templateLint: T,
|
|
4067
4088
|
popoverRoot: w,
|
|
4068
4089
|
registerCustomBlocks: b,
|
|
4069
|
-
destroy:
|
|
4090
|
+
destroy: E
|
|
4070
4091
|
};
|
|
4071
4092
|
}
|
|
4072
4093
|
//#endregion
|
|
4073
4094
|
//#region src/composables/usePopoverRoot.ts
|
|
4074
|
-
function
|
|
4075
|
-
return v(
|
|
4095
|
+
function zo() {
|
|
4096
|
+
return v(ir, C(null));
|
|
4076
4097
|
}
|
|
4077
4098
|
//#endregion
|
|
4078
4099
|
//#region src/components/TplModal.vue?vue&type=script&setup=true&lang.ts
|
|
4079
|
-
var
|
|
4100
|
+
var Bo = ["data-tpl-theme"], Vo = /* @__PURE__ */ B({
|
|
4080
4101
|
__name: "TplModal",
|
|
4081
4102
|
props: { visible: { type: Boolean } },
|
|
4082
4103
|
emits: ["close", "keydown"],
|
|
4083
4104
|
setup(e, { emit: t }) {
|
|
4084
4105
|
let n = e, r = t, i = C(null);
|
|
4085
|
-
|
|
4086
|
-
let a = v(Vn), s =
|
|
4106
|
+
Bi(i, O(() => n.visible));
|
|
4107
|
+
let a = v(Vn), s = zo();
|
|
4087
4108
|
function c(e) {
|
|
4088
4109
|
e.key === "Escape" && r("close"), r("keydown", e);
|
|
4089
4110
|
}
|
|
4090
|
-
return (t, n) =>
|
|
4111
|
+
return (t, n) => j(s) ? (f(), N(te, {
|
|
4091
4112
|
key: 0,
|
|
4092
|
-
to:
|
|
4093
|
-
}, [V(
|
|
4113
|
+
to: j(s)
|
|
4114
|
+
}, [V(ie, {
|
|
4094
4115
|
"enter-active-class": "tpl:transition tpl:duration-150",
|
|
4095
4116
|
"enter-from-class": "tpl:opacity-0",
|
|
4096
4117
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -4098,25 +4119,25 @@ var Io = ["data-tpl-theme"], Lo = /* @__PURE__ */ B({
|
|
|
4098
4119
|
"leave-from-class": "tpl:opacity-100",
|
|
4099
4120
|
"leave-to-class": "tpl:opacity-0"
|
|
4100
4121
|
}, {
|
|
4101
|
-
default: b(() => [e.visible ? (f(),
|
|
4122
|
+
default: b(() => [e.visible ? (f(), k("div", {
|
|
4102
4123
|
key: 0,
|
|
4103
|
-
"data-tpl-theme":
|
|
4124
|
+
"data-tpl-theme": j(a),
|
|
4104
4125
|
class: "tpl tpl:fixed tpl:inset-0 tpl:z-modal tpl:flex tpl:items-center tpl:justify-center",
|
|
4105
4126
|
style: {
|
|
4106
4127
|
"background-color": "var(--tpl-overlay)",
|
|
4107
4128
|
"backdrop-filter": "blur(8px)",
|
|
4108
4129
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
4109
4130
|
},
|
|
4110
|
-
onClick: n[0] ||=
|
|
4131
|
+
onClick: n[0] ||= M((e) => r("close"), ["self"]),
|
|
4111
4132
|
onKeydown: c
|
|
4112
4133
|
}, [I("div", {
|
|
4113
4134
|
ref_key: "dialogRef",
|
|
4114
4135
|
ref: i
|
|
4115
|
-
}, [o(t.$slots, "default")], 512)], 40,
|
|
4136
|
+
}, [o(t.$slots, "default")], 512)], 40, Bo)) : A("", !0)]),
|
|
4116
4137
|
_: 3
|
|
4117
|
-
})], 8, ["to"])) :
|
|
4138
|
+
})], 8, ["to"])) : A("", !0);
|
|
4118
4139
|
}
|
|
4119
|
-
}),
|
|
4140
|
+
}), Ho = class e {
|
|
4120
4141
|
static DEFAULT_BASE_URL = "https://templatical.com";
|
|
4121
4142
|
accessToken = null;
|
|
4122
4143
|
expiresAt = null;
|
|
@@ -4217,8 +4238,8 @@ var Io = ["data-tpl-theme"], Lo = /* @__PURE__ */ B({
|
|
|
4217
4238
|
return a.status === 401 && (a = await i(await this.refreshToken())), a;
|
|
4218
4239
|
}
|
|
4219
4240
|
};
|
|
4220
|
-
function
|
|
4221
|
-
return e.mode === "direct" ? new
|
|
4241
|
+
function Uo(e, t) {
|
|
4242
|
+
return e.mode === "direct" ? new Ho({
|
|
4222
4243
|
url: `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}/api/v1/auth/token`,
|
|
4223
4244
|
baseUrl: e.baseUrl,
|
|
4224
4245
|
requestOptions: {
|
|
@@ -4232,7 +4253,7 @@ function zo(e, t) {
|
|
|
4232
4253
|
}
|
|
4233
4254
|
},
|
|
4234
4255
|
onError: t
|
|
4235
|
-
}) : new
|
|
4256
|
+
}) : new Ho({
|
|
4236
4257
|
url: e.url,
|
|
4237
4258
|
baseUrl: e.baseUrl,
|
|
4238
4259
|
requestOptions: e.requestOptions,
|
|
@@ -4244,16 +4265,16 @@ function zo(e, t) {
|
|
|
4244
4265
|
function Z(e, t) {
|
|
4245
4266
|
return e.replace(/\{(\w+)\}/g, (e, n) => encodeURIComponent(t[n] ?? ""));
|
|
4246
4267
|
}
|
|
4247
|
-
var
|
|
4268
|
+
var Wo = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Wo}/templates/{template}`, Go = `${Q}/ai`, Ko = `${Wo}/media`, qo = `${Ko}/folders`, Jo = `${Wo}/saved-modules`, $ = {
|
|
4248
4269
|
health: "/api/v1/health",
|
|
4249
|
-
"projects.config": `${
|
|
4250
|
-
"broadcasting.auth": `${
|
|
4251
|
-
"templates.store": `${
|
|
4270
|
+
"projects.config": `${Wo}/config`,
|
|
4271
|
+
"broadcasting.auth": `${Wo}/broadcasting/auth`,
|
|
4272
|
+
"templates.store": `${Wo}/templates`,
|
|
4252
4273
|
"templates.show": `${Q}`,
|
|
4253
4274
|
"templates.update": `${Q}`,
|
|
4254
4275
|
"templates.destroy": `${Q}`,
|
|
4255
4276
|
"templates.export": `${Q}/export`,
|
|
4256
|
-
"templates.importFromBeefree": `${
|
|
4277
|
+
"templates.importFromBeefree": `${Wo}/templates/import/from-beefree`,
|
|
4257
4278
|
"templates.sendTestEmail": `${Q}/send-test-email`,
|
|
4258
4279
|
"snapshots.index": `${Q}/snapshots`,
|
|
4259
4280
|
"snapshots.store": `${Q}/snapshots`,
|
|
@@ -4264,31 +4285,31 @@ var Bo = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Bo}/templates/{te
|
|
|
4264
4285
|
"comments.update": `${Q}/comments/{comment}`,
|
|
4265
4286
|
"comments.destroy": `${Q}/comments/{comment}`,
|
|
4266
4287
|
"comments.resolve": `${Q}/comments/{comment}/resolve`,
|
|
4267
|
-
"ai.generate": `${
|
|
4268
|
-
"ai.conversationMessages": `${
|
|
4269
|
-
"ai.suggestions": `${
|
|
4270
|
-
"ai.rewriteText": `${
|
|
4271
|
-
"ai.score": `${
|
|
4272
|
-
"ai.fixFinding": `${
|
|
4273
|
-
"ai.generateFromDesign": `${
|
|
4274
|
-
"media.upload": `${
|
|
4275
|
-
"media.browse": `${
|
|
4276
|
-
"media.delete": `${
|
|
4277
|
-
"media.move": `${
|
|
4278
|
-
"media.update": `${
|
|
4279
|
-
"media.replace": `${
|
|
4280
|
-
"media.checkUsage": `${
|
|
4281
|
-
"media.frequentlyUsed": `${
|
|
4282
|
-
"media.importFromUrl": `${
|
|
4283
|
-
"folders.index": `${
|
|
4284
|
-
"folders.store": `${
|
|
4285
|
-
"folders.update": `${
|
|
4286
|
-
"folders.destroy": `${
|
|
4287
|
-
"savedModules.index": `${
|
|
4288
|
-
"savedModules.store": `${
|
|
4289
|
-
"savedModules.update": `${
|
|
4290
|
-
"savedModules.destroy": `${
|
|
4291
|
-
},
|
|
4288
|
+
"ai.generate": `${Go}/generate`,
|
|
4289
|
+
"ai.conversationMessages": `${Go}/conversation-messages`,
|
|
4290
|
+
"ai.suggestions": `${Go}/suggestions`,
|
|
4291
|
+
"ai.rewriteText": `${Go}/rewrite-text`,
|
|
4292
|
+
"ai.score": `${Go}/score`,
|
|
4293
|
+
"ai.fixFinding": `${Go}/fix-finding`,
|
|
4294
|
+
"ai.generateFromDesign": `${Go}/generate-from-design`,
|
|
4295
|
+
"media.upload": `${Ko}/upload`,
|
|
4296
|
+
"media.browse": `${Ko}/browse`,
|
|
4297
|
+
"media.delete": `${Ko}/delete`,
|
|
4298
|
+
"media.move": `${Ko}/move`,
|
|
4299
|
+
"media.update": `${Ko}/{media}`,
|
|
4300
|
+
"media.replace": `${Ko}/{media}/replace`,
|
|
4301
|
+
"media.checkUsage": `${Ko}/check-usage`,
|
|
4302
|
+
"media.frequentlyUsed": `${Ko}/frequently-used`,
|
|
4303
|
+
"media.importFromUrl": `${Ko}/import-from-url`,
|
|
4304
|
+
"folders.index": `${qo}`,
|
|
4305
|
+
"folders.store": `${qo}`,
|
|
4306
|
+
"folders.update": `${qo}/{mediaFolder}`,
|
|
4307
|
+
"folders.destroy": `${qo}/{mediaFolder}`,
|
|
4308
|
+
"savedModules.index": `${Jo}`,
|
|
4309
|
+
"savedModules.store": `${Jo}`,
|
|
4310
|
+
"savedModules.update": `${Jo}/{savedModule}`,
|
|
4311
|
+
"savedModules.destroy": `${Jo}/{savedModule}`
|
|
4312
|
+
}, Yo = class {
|
|
4292
4313
|
authManager;
|
|
4293
4314
|
constructor(e) {
|
|
4294
4315
|
this.authManager = e;
|
|
@@ -4474,14 +4495,14 @@ var Bo = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Bo}/templates/{te
|
|
|
4474
4495
|
};
|
|
4475
4496
|
//#endregion
|
|
4476
4497
|
//#region ../core/src/cloud/websocket-client.ts
|
|
4477
|
-
function
|
|
4498
|
+
function Xo(e) {
|
|
4478
4499
|
return {
|
|
4479
4500
|
host: e.host,
|
|
4480
4501
|
port: e.port,
|
|
4481
4502
|
appKey: e.app_key
|
|
4482
4503
|
};
|
|
4483
4504
|
}
|
|
4484
|
-
var
|
|
4505
|
+
var Zo = class {
|
|
4485
4506
|
pusher = null;
|
|
4486
4507
|
authManager;
|
|
4487
4508
|
config;
|
|
@@ -4548,7 +4569,7 @@ var qo = class {
|
|
|
4548
4569
|
};
|
|
4549
4570
|
//#endregion
|
|
4550
4571
|
//#region ../core/src/cloud/mcp-operation-handler.ts
|
|
4551
|
-
function
|
|
4572
|
+
function Qo(e, t) {
|
|
4552
4573
|
let { operation: n, data: r } = t;
|
|
4553
4574
|
switch (n) {
|
|
4554
4575
|
case "add_block":
|
|
@@ -4576,8 +4597,8 @@ function Jo(e, t) {
|
|
|
4576
4597
|
}
|
|
4577
4598
|
//#endregion
|
|
4578
4599
|
//#region ../core/src/cloud/editor.ts
|
|
4579
|
-
function
|
|
4580
|
-
let t = new
|
|
4600
|
+
function $o(e) {
|
|
4601
|
+
let t = new Yo(e.authManager), n = S({
|
|
4581
4602
|
template: null,
|
|
4582
4603
|
content: Ue(e.defaultFontFamily, e.templateDefaults),
|
|
4583
4604
|
selectedBlockId: null,
|
|
@@ -4588,12 +4609,12 @@ function Yo(e) {
|
|
|
4588
4609
|
isSaving: !1,
|
|
4589
4610
|
isLoading: !1,
|
|
4590
4611
|
uiTheme: "auto"
|
|
4591
|
-
}), r =
|
|
4612
|
+
}), r = O({
|
|
4592
4613
|
get: () => n.content,
|
|
4593
4614
|
set: (e) => {
|
|
4594
4615
|
n.content = e, n.isDirty = !0;
|
|
4595
4616
|
}
|
|
4596
|
-
}), i =
|
|
4617
|
+
}), i = O(() => n.selectedBlockId ? o(n.content.blocks, n.selectedBlockId) : null), a = O(() => {
|
|
4597
4618
|
let e = /* @__PURE__ */ new Set(), t = n.template?.content?.blocks;
|
|
4598
4619
|
if (!t) return e;
|
|
4599
4620
|
for (let n of t) if (e.add(n.id), n.type === "section") for (let t of n.children) for (let n of t) e.add(n.id);
|
|
@@ -4722,20 +4743,20 @@ function Yo(e) {
|
|
|
4722
4743
|
n.isSaving = !1;
|
|
4723
4744
|
}
|
|
4724
4745
|
}
|
|
4725
|
-
async function
|
|
4746
|
+
async function ee() {
|
|
4726
4747
|
if (n.template?.id) try {
|
|
4727
4748
|
await t.createSnapshot(n.template.id, n.content);
|
|
4728
4749
|
} catch (t) {
|
|
4729
4750
|
throw e.onError?.(t), t;
|
|
4730
4751
|
}
|
|
4731
4752
|
}
|
|
4732
|
-
function
|
|
4753
|
+
function T() {
|
|
4733
4754
|
return n.template?.id !== void 0;
|
|
4734
4755
|
}
|
|
4735
|
-
function
|
|
4756
|
+
function E() {
|
|
4736
4757
|
n.isDirty = !0;
|
|
4737
4758
|
}
|
|
4738
|
-
function
|
|
4759
|
+
function D(e) {
|
|
4739
4760
|
let t = s(n.content.blocks, e);
|
|
4740
4761
|
if (!t) return null;
|
|
4741
4762
|
let r = t.blocks.findIndex((t) => t.id === e);
|
|
@@ -4751,7 +4772,7 @@ function Yo(e) {
|
|
|
4751
4772
|
selectedBlock: i,
|
|
4752
4773
|
savedBlockIds: a,
|
|
4753
4774
|
isBlockLocked: c,
|
|
4754
|
-
findBlockLocation:
|
|
4775
|
+
findBlockLocation: D,
|
|
4755
4776
|
setContent: l,
|
|
4756
4777
|
selectBlock: u,
|
|
4757
4778
|
setViewport: d,
|
|
@@ -4766,18 +4787,18 @@ function Yo(e) {
|
|
|
4766
4787
|
create: b,
|
|
4767
4788
|
load: C,
|
|
4768
4789
|
save: w,
|
|
4769
|
-
createSnapshot:
|
|
4770
|
-
hasTemplate:
|
|
4771
|
-
markDirty:
|
|
4790
|
+
createSnapshot: ee,
|
|
4791
|
+
hasTemplate: T,
|
|
4792
|
+
markDirty: E
|
|
4772
4793
|
};
|
|
4773
4794
|
}
|
|
4774
4795
|
//#endregion
|
|
4775
4796
|
//#region ../core/src/cloud/ai-chat.ts
|
|
4776
|
-
var
|
|
4777
|
-
function
|
|
4778
|
-
return `msg_${Date.now()}_${++
|
|
4797
|
+
var es = 0;
|
|
4798
|
+
function ts() {
|
|
4799
|
+
return `msg_${Date.now()}_${++es}`;
|
|
4779
4800
|
}
|
|
4780
|
-
function
|
|
4801
|
+
function ns(e) {
|
|
4781
4802
|
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);
|
|
4782
4803
|
function _(e, t) {
|
|
4783
4804
|
let n = a.value.findIndex((t) => t.id === e);
|
|
@@ -4871,14 +4892,14 @@ function Qo(e) {
|
|
|
4871
4892
|
let v = n();
|
|
4872
4893
|
if (!v) throw Error("Template must be saved before using AI generation");
|
|
4873
4894
|
o.value = !0, c.value = null, l.value = null, h.value = [];
|
|
4874
|
-
let y =
|
|
4895
|
+
let y = ts();
|
|
4875
4896
|
a.value = [...a.value, {
|
|
4876
4897
|
id: y,
|
|
4877
4898
|
role: "user",
|
|
4878
4899
|
content: e,
|
|
4879
4900
|
timestamp: Date.now()
|
|
4880
4901
|
}];
|
|
4881
|
-
let b =
|
|
4902
|
+
let b = ts();
|
|
4882
4903
|
a.value = [...a.value, {
|
|
4883
4904
|
id: b,
|
|
4884
4905
|
role: "assistant",
|
|
@@ -4969,18 +4990,18 @@ function Qo(e) {
|
|
|
4969
4990
|
}
|
|
4970
4991
|
//#endregion
|
|
4971
4992
|
//#region ../core/src/cloud/ai-config.ts
|
|
4972
|
-
function
|
|
4993
|
+
function rs(e) {
|
|
4973
4994
|
function t(t) {
|
|
4974
4995
|
return e === !1 ? !1 : e?.[t] !== !1;
|
|
4975
4996
|
}
|
|
4976
4997
|
return {
|
|
4977
4998
|
isFeatureEnabled: t,
|
|
4978
|
-
hasAnyMenuFeature:
|
|
4999
|
+
hasAnyMenuFeature: O(() => t("chat") || t("scoring") || t("designToTemplate"))
|
|
4979
5000
|
};
|
|
4980
5001
|
}
|
|
4981
5002
|
//#endregion
|
|
4982
5003
|
//#region ../core/src/cloud/template-scoring.ts
|
|
4983
|
-
function
|
|
5004
|
+
function is(e) {
|
|
4984
5005
|
let { authManager: t, getTemplateId: n } = e, r = C(!1), i = C(null), a = C(null), o = C(null), s = C(""), c = C(null);
|
|
4985
5006
|
async function l(e, o) {
|
|
4986
5007
|
let s = n();
|
|
@@ -5125,7 +5146,7 @@ function es(e) {
|
|
|
5125
5146
|
}
|
|
5126
5147
|
//#endregion
|
|
5127
5148
|
//#region ../core/src/cloud/design-reference.ts
|
|
5128
|
-
function
|
|
5149
|
+
function as(e) {
|
|
5129
5150
|
let { authManager: t, getTemplateId: n, onApply: r, onError: i } = e, a = C(!1), o = C(null);
|
|
5130
5151
|
async function s(e) {
|
|
5131
5152
|
let s = n();
|
|
@@ -5188,12 +5209,12 @@ function ts(e) {
|
|
|
5188
5209
|
}
|
|
5189
5210
|
//#endregion
|
|
5190
5211
|
//#region ../core/src/cloud/comments.ts
|
|
5191
|
-
function
|
|
5192
|
-
let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new
|
|
5212
|
+
function os(e) {
|
|
5213
|
+
let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new Yo(t), c = C([]), l = C(!1), u = C(!1), d = O(() => (o?.() ?? !1) && t.userConfig !== null), f = O(() => {
|
|
5193
5214
|
let e = 0;
|
|
5194
5215
|
for (let t of c.value) e += 1 + (t.replies?.length ?? 0);
|
|
5195
5216
|
return e;
|
|
5196
|
-
}), p =
|
|
5217
|
+
}), p = O(() => c.value.filter((e) => !e.resolved_at).length), m = O(() => {
|
|
5197
5218
|
let e = /* @__PURE__ */ new Map();
|
|
5198
5219
|
for (let t of c.value) t.block_id && e.set(t.block_id, (e.get(t.block_id) ?? 0) + 1 + (t.replies?.length ?? 0));
|
|
5199
5220
|
return e;
|
|
@@ -5270,7 +5291,7 @@ function ns(e) {
|
|
|
5270
5291
|
body: t,
|
|
5271
5292
|
...h()
|
|
5272
5293
|
}, g());
|
|
5273
|
-
return
|
|
5294
|
+
return D(e, n), _("updated", n), n;
|
|
5274
5295
|
} catch (e) {
|
|
5275
5296
|
let t = e instanceof Error ? e : Error("Failed to update comment", { cause: e });
|
|
5276
5297
|
return a?.(t), null;
|
|
@@ -5307,7 +5328,7 @@ function ns(e) {
|
|
|
5307
5328
|
u.value = !0;
|
|
5308
5329
|
try {
|
|
5309
5330
|
let n = await s.resolveComment(t, e, h(), g());
|
|
5310
|
-
return
|
|
5331
|
+
return D(e, n), _(n.resolved_at ? "resolved" : "unresolved", n), n;
|
|
5311
5332
|
} catch (e) {
|
|
5312
5333
|
let t = e instanceof Error ? e : Error("Failed to toggle comment resolution", { cause: e });
|
|
5313
5334
|
return a?.(t), null;
|
|
@@ -5315,17 +5336,17 @@ function ns(e) {
|
|
|
5315
5336
|
u.value = !1;
|
|
5316
5337
|
}
|
|
5317
5338
|
}
|
|
5318
|
-
function
|
|
5339
|
+
function ee(e) {
|
|
5319
5340
|
if (e.parent_id) {
|
|
5320
5341
|
let t = v(e.parent_id);
|
|
5321
5342
|
t && (t.replies = [...t.replies ?? [], e]);
|
|
5322
5343
|
} else c.value = [...c.value, e];
|
|
5323
5344
|
_("created", e);
|
|
5324
5345
|
}
|
|
5325
|
-
function
|
|
5326
|
-
|
|
5346
|
+
function T(e) {
|
|
5347
|
+
D(e.id, e), _("updated", e);
|
|
5327
5348
|
}
|
|
5328
|
-
function
|
|
5349
|
+
function E(e, t) {
|
|
5329
5350
|
let n = v(e), r = n ? {
|
|
5330
5351
|
...n,
|
|
5331
5352
|
replies: [...n.replies ?? []]
|
|
@@ -5336,7 +5357,7 @@ function ns(e) {
|
|
|
5336
5357
|
} else c.value = c.value.filter((t) => t.id !== e);
|
|
5337
5358
|
r && _("deleted", r);
|
|
5338
5359
|
}
|
|
5339
|
-
function
|
|
5360
|
+
function D(e, t) {
|
|
5340
5361
|
for (let n = 0; n < c.value.length; n++) {
|
|
5341
5362
|
if (c.value[n].id === e) {
|
|
5342
5363
|
c.value = [
|
|
@@ -5381,24 +5402,24 @@ function ns(e) {
|
|
|
5381
5402
|
editComment: x,
|
|
5382
5403
|
removeComment: S,
|
|
5383
5404
|
toggleResolve: w,
|
|
5384
|
-
applyRemoteCreate:
|
|
5385
|
-
applyRemoteUpdate:
|
|
5386
|
-
applyRemoteDelete:
|
|
5405
|
+
applyRemoteCreate: ee,
|
|
5406
|
+
applyRemoteUpdate: T,
|
|
5407
|
+
applyRemoteDelete: E
|
|
5387
5408
|
};
|
|
5388
5409
|
}
|
|
5389
5410
|
//#endregion
|
|
5390
5411
|
//#region ../core/src/cloud/comment-listener.ts
|
|
5391
|
-
function
|
|
5412
|
+
function ss(e) {
|
|
5392
5413
|
let { comments: t, channel: n } = e;
|
|
5393
5414
|
H(n, (e, n) => {
|
|
5394
5415
|
n && n.unbind("comment-broadcast"), e && e.bind("comment-broadcast", (e) => {
|
|
5395
|
-
|
|
5416
|
+
cs(t, e);
|
|
5396
5417
|
});
|
|
5397
5418
|
}), l(() => {
|
|
5398
5419
|
n.value?.unbind("comment-broadcast");
|
|
5399
5420
|
});
|
|
5400
5421
|
}
|
|
5401
|
-
function
|
|
5422
|
+
function cs(e, t) {
|
|
5402
5423
|
switch (t.action) {
|
|
5403
5424
|
case "comment_created":
|
|
5404
5425
|
e.applyRemoteCreate(t.comment);
|
|
@@ -5417,7 +5438,7 @@ function is(e, t) {
|
|
|
5417
5438
|
}
|
|
5418
5439
|
//#endregion
|
|
5419
5440
|
//#region ../core/src/cloud/collaboration.ts
|
|
5420
|
-
var
|
|
5441
|
+
var ls = [
|
|
5421
5442
|
"pusher:member_added",
|
|
5422
5443
|
"pusher:member_removed",
|
|
5423
5444
|
"client-block_locked",
|
|
@@ -5425,10 +5446,10 @@ var as = [
|
|
|
5425
5446
|
"client-operation",
|
|
5426
5447
|
"mcp-operation"
|
|
5427
5448
|
];
|
|
5428
|
-
function
|
|
5429
|
-
for (let t of
|
|
5449
|
+
function us(e) {
|
|
5450
|
+
for (let t of ls) e.unbind(t);
|
|
5430
5451
|
}
|
|
5431
|
-
var
|
|
5452
|
+
var ds = [
|
|
5432
5453
|
"#3b82f6",
|
|
5433
5454
|
"#ef4444",
|
|
5434
5455
|
"#10b981",
|
|
@@ -5440,10 +5461,10 @@ var ss = [
|
|
|
5440
5461
|
"#6366f1",
|
|
5441
5462
|
"#14b8a6"
|
|
5442
5463
|
];
|
|
5443
|
-
function
|
|
5444
|
-
let { authManager: t, editor: n, channel: r } = e, i = C([]), a = C(/* @__PURE__ */ new Map()), o = 0, s = !1, c =
|
|
5464
|
+
function fs(e) {
|
|
5465
|
+
let { authManager: t, editor: n, channel: r } = e, i = C([]), a = C(/* @__PURE__ */ new Map()), o = 0, s = !1, c = O(() => t.userConfig?.id ?? "");
|
|
5445
5466
|
function u() {
|
|
5446
|
-
let e =
|
|
5467
|
+
let e = ds[o % ds.length];
|
|
5447
5468
|
return o++, e;
|
|
5448
5469
|
}
|
|
5449
5470
|
function d(e) {
|
|
@@ -5485,7 +5506,7 @@ function cs(e) {
|
|
|
5485
5506
|
function h(e) {
|
|
5486
5507
|
s = !0;
|
|
5487
5508
|
try {
|
|
5488
|
-
|
|
5509
|
+
Qo(n, e);
|
|
5489
5510
|
} finally {
|
|
5490
5511
|
s = !1;
|
|
5491
5512
|
}
|
|
@@ -5505,7 +5526,7 @@ function cs(e) {
|
|
|
5505
5526
|
return H(() => n.state.selectedBlockId, (e, t) => {
|
|
5506
5527
|
s || (t && v(t), e && _(e));
|
|
5507
5528
|
}), H(r, (t, n) => {
|
|
5508
|
-
if (n &&
|
|
5529
|
+
if (n && us(n), !t) {
|
|
5509
5530
|
i.value = [], a.value = /* @__PURE__ */ new Map(), o = 0;
|
|
5510
5531
|
return;
|
|
5511
5532
|
}
|
|
@@ -5537,7 +5558,7 @@ function cs(e) {
|
|
|
5537
5558
|
h(e);
|
|
5538
5559
|
});
|
|
5539
5560
|
}), l(() => {
|
|
5540
|
-
r.value &&
|
|
5561
|
+
r.value && us(r.value);
|
|
5541
5562
|
}), {
|
|
5542
5563
|
collaborators: i,
|
|
5543
5564
|
lockedBlocks: a,
|
|
@@ -5547,7 +5568,7 @@ function cs(e) {
|
|
|
5547
5568
|
}
|
|
5548
5569
|
//#endregion
|
|
5549
5570
|
//#region ../core/src/cloud/collaboration-broadcast.ts
|
|
5550
|
-
function
|
|
5571
|
+
function ps(e, t) {
|
|
5551
5572
|
let n = e.addBlock, r = e.updateBlock, i = e.removeBlock, a = e.moveBlock, o = e.updateSettings, s = e.setContent;
|
|
5552
5573
|
e.addBlock = (e, r, i) => {
|
|
5553
5574
|
n(e, r, i), t._broadcastOperation({
|
|
@@ -5601,11 +5622,11 @@ function ls(e, t) {
|
|
|
5601
5622
|
}
|
|
5602
5623
|
//#endregion
|
|
5603
5624
|
//#region ../core/src/cloud/web-socket.ts
|
|
5604
|
-
function
|
|
5625
|
+
function ms(e) {
|
|
5605
5626
|
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = null, o = null;
|
|
5606
5627
|
async function s(e, s) {
|
|
5607
5628
|
if (a) return;
|
|
5608
|
-
a = new
|
|
5629
|
+
a = new Zo({
|
|
5609
5630
|
authManager: t,
|
|
5610
5631
|
config: s,
|
|
5611
5632
|
onError: n
|
|
@@ -5633,8 +5654,8 @@ function us(e) {
|
|
|
5633
5654
|
}
|
|
5634
5655
|
//#endregion
|
|
5635
5656
|
//#region ../core/src/cloud/saved-modules.ts
|
|
5636
|
-
function
|
|
5637
|
-
let t = new
|
|
5657
|
+
function hs(e) {
|
|
5658
|
+
let t = new Yo(e.authManager), n = C([]), r = C(!1);
|
|
5638
5659
|
async function i(i) {
|
|
5639
5660
|
r.value = !0;
|
|
5640
5661
|
try {
|
|
@@ -5682,8 +5703,8 @@ function ds(e) {
|
|
|
5682
5703
|
}
|
|
5683
5704
|
//#endregion
|
|
5684
5705
|
//#region ../core/src/cloud/snapshots.ts
|
|
5685
|
-
function
|
|
5686
|
-
let t = new
|
|
5706
|
+
function gs(e) {
|
|
5707
|
+
let t = new Yo(e.authManager), n = C([]), r = C(!1), i = C(!1);
|
|
5687
5708
|
async function a() {
|
|
5688
5709
|
r.value = !0;
|
|
5689
5710
|
try {
|
|
@@ -5715,12 +5736,12 @@ function fs(e) {
|
|
|
5715
5736
|
}
|
|
5716
5737
|
//#endregion
|
|
5717
5738
|
//#region ../core/src/cloud/test-email.ts
|
|
5718
|
-
function
|
|
5719
|
-
let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new
|
|
5739
|
+
function _s(e) {
|
|
5740
|
+
let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new Yo(t), l = C(!1), u = C(null), d = C(null);
|
|
5720
5741
|
o && H(o, (e) => {
|
|
5721
5742
|
e && (d.value = t.testEmailConfig);
|
|
5722
5743
|
}, { immediate: !0 });
|
|
5723
|
-
let f =
|
|
5744
|
+
let f = O(() => d.value !== null), p = O(() => d.value?.allowedEmails ?? []);
|
|
5724
5745
|
async function m(e) {
|
|
5725
5746
|
if (!d.value) throw Error("Test email is not enabled for this project");
|
|
5726
5747
|
let t = n();
|
|
@@ -5752,8 +5773,8 @@ function ps(e) {
|
|
|
5752
5773
|
}
|
|
5753
5774
|
//#endregion
|
|
5754
5775
|
//#region ../core/src/cloud/export.ts
|
|
5755
|
-
function
|
|
5756
|
-
let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new
|
|
5776
|
+
function vs(e) {
|
|
5777
|
+
let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new Yo(t);
|
|
5757
5778
|
function a() {
|
|
5758
5779
|
let e = n?.();
|
|
5759
5780
|
return {
|
|
@@ -5779,8 +5800,8 @@ function ms(e) {
|
|
|
5779
5800
|
}
|
|
5780
5801
|
//#endregion
|
|
5781
5802
|
//#region ../core/src/cloud/plan-config.ts
|
|
5782
|
-
function
|
|
5783
|
-
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new
|
|
5803
|
+
function ys(e) {
|
|
5804
|
+
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new Yo(t), o = O(() => r.value?.features ?? null);
|
|
5784
5805
|
function s(e) {
|
|
5785
5806
|
return r.value?.features[e] ?? !1;
|
|
5786
5807
|
}
|
|
@@ -5806,11 +5827,11 @@ function hs(e) {
|
|
|
5806
5827
|
}
|
|
5807
5828
|
//#endregion
|
|
5808
5829
|
//#region ../core/src/cloud/health-check.ts
|
|
5809
|
-
var
|
|
5810
|
-
function
|
|
5830
|
+
var bs = 5e3;
|
|
5831
|
+
function xs(e) {
|
|
5811
5832
|
return e.authManager ? e.authManager.resolveUrl($.health) : `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}${$.health}`;
|
|
5812
5833
|
}
|
|
5813
|
-
async function
|
|
5834
|
+
async function Ss(e, t) {
|
|
5814
5835
|
let n = performance.now();
|
|
5815
5836
|
try {
|
|
5816
5837
|
let r = t ? await t.authenticatedFetch($.health, {
|
|
@@ -5862,7 +5883,7 @@ async function vs(e, t) {
|
|
|
5862
5883
|
};
|
|
5863
5884
|
}
|
|
5864
5885
|
}
|
|
5865
|
-
async function
|
|
5886
|
+
async function Cs(e) {
|
|
5866
5887
|
if (!e?.host || !e?.app_key) return {
|
|
5867
5888
|
ok: !1,
|
|
5868
5889
|
error: "WebSocket configuration not available"
|
|
@@ -5878,7 +5899,7 @@ async function ys(e) {
|
|
|
5878
5899
|
ok: !1,
|
|
5879
5900
|
error: "WebSocket connection timed out"
|
|
5880
5901
|
});
|
|
5881
|
-
},
|
|
5902
|
+
}, bs);
|
|
5882
5903
|
try {
|
|
5883
5904
|
n = new WebSocket(t);
|
|
5884
5905
|
} catch (t) {
|
|
@@ -5898,8 +5919,8 @@ async function ys(e) {
|
|
|
5898
5919
|
};
|
|
5899
5920
|
});
|
|
5900
5921
|
}
|
|
5901
|
-
async function
|
|
5902
|
-
let t = await
|
|
5922
|
+
async function ws(e = {}) {
|
|
5923
|
+
let t = await Ss(xs(e), e.authManager), n = await Cs(t.wsConfig);
|
|
5903
5924
|
return {
|
|
5904
5925
|
api: t.api,
|
|
5905
5926
|
websocket: n,
|
|
@@ -5909,29 +5930,29 @@ async function bs(e = {}) {
|
|
|
5909
5930
|
}
|
|
5910
5931
|
//#endregion
|
|
5911
5932
|
//#region ../core/src/cloud/mcp-listener.ts
|
|
5912
|
-
function
|
|
5933
|
+
function Ts(e) {
|
|
5913
5934
|
let { editor: t, channel: n, onOperation: r } = e;
|
|
5914
5935
|
H(n, (e, n) => {
|
|
5915
5936
|
n && n.unbind("mcp-operation"), e && e.bind("mcp-operation", (e) => {
|
|
5916
|
-
|
|
5937
|
+
Qo(t, e), r?.(e);
|
|
5917
5938
|
});
|
|
5918
5939
|
});
|
|
5919
5940
|
}
|
|
5920
5941
|
//#endregion
|
|
5921
5942
|
//#region src/cloud/components/AiChatSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
5922
|
-
var
|
|
5943
|
+
var Es = {
|
|
5923
5944
|
key: 0,
|
|
5924
5945
|
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)]"
|
|
5925
|
-
},
|
|
5946
|
+
}, Ds = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Os = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, ks = { class: "tpl:flex tpl:items-center tpl:gap-1" }, As = ["title"], js = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col" }, Ms = {
|
|
5926
5947
|
key: 0,
|
|
5927
5948
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
5928
|
-
},
|
|
5949
|
+
}, Ns = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ps = {
|
|
5929
5950
|
key: 1,
|
|
5930
5951
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
5931
|
-
},
|
|
5952
|
+
}, Fs = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Is = {
|
|
5932
5953
|
key: 2,
|
|
5933
5954
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
5934
|
-
},
|
|
5955
|
+
}, Ls = {
|
|
5935
5956
|
key: 0,
|
|
5936
5957
|
class: "tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm",
|
|
5937
5958
|
style: {
|
|
@@ -5940,10 +5961,10 @@ var Ss = {
|
|
|
5940
5961
|
"max-width": "85%",
|
|
5941
5962
|
"box-shadow": "var(--tpl-shadow)"
|
|
5942
5963
|
}
|
|
5943
|
-
},
|
|
5964
|
+
}, Rs = {
|
|
5944
5965
|
key: 1,
|
|
5945
5966
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
5946
|
-
},
|
|
5967
|
+
}, zs = {
|
|
5947
5968
|
key: 1,
|
|
5948
5969
|
class: "tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
|
|
5949
5970
|
style: {
|
|
@@ -5952,21 +5973,21 @@ var Ss = {
|
|
|
5952
5973
|
color: "var(--tpl-text)",
|
|
5953
5974
|
"box-shadow": "var(--tpl-shadow)"
|
|
5954
5975
|
}
|
|
5955
|
-
},
|
|
5976
|
+
}, Bs = {
|
|
5956
5977
|
key: 0,
|
|
5957
5978
|
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",
|
|
5958
5979
|
style: {
|
|
5959
5980
|
"background-color": "var(--tpl-danger-light)",
|
|
5960
5981
|
color: "var(--tpl-danger)"
|
|
5961
5982
|
}
|
|
5962
|
-
},
|
|
5983
|
+
}, Vs = {
|
|
5963
5984
|
key: 1,
|
|
5964
5985
|
class: "tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3",
|
|
5965
5986
|
style: {
|
|
5966
5987
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n )",
|
|
5967
5988
|
"backdrop-filter": "blur(2px)"
|
|
5968
5989
|
}
|
|
5969
|
-
},
|
|
5990
|
+
}, Hs = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, Us = ["onClick"], Ws = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Gs = { 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)]" }, Ks = ["placeholder", "disabled"], qs = ["disabled"], Js = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Ys = /* @__PURE__ */ B({
|
|
5970
5991
|
__name: "AiChatSidebar",
|
|
5971
5992
|
props: {
|
|
5972
5993
|
visible: { type: Boolean },
|
|
@@ -5974,7 +5995,7 @@ var Ss = {
|
|
|
5974
5995
|
},
|
|
5975
5996
|
emits: ["close"],
|
|
5976
5997
|
setup(e, { emit: t }) {
|
|
5977
|
-
let n = e, r = t, i = J(
|
|
5998
|
+
let n = e, r = t, i = J(ur, "AiChatSidebar"), a = J(Fn, "AiChatSidebar"), o = J(ar, "AiChatSidebar"), s = v(Kn, []), l = ha(), u = ns({
|
|
5978
5999
|
authManager: o,
|
|
5979
6000
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
5980
6001
|
onApply: n.onApply,
|
|
@@ -6000,20 +6021,20 @@ var Ss = {
|
|
|
6000
6021
|
(u.messages.value?.length ?? 0) === 0 && a.content.value.blocks.length === 0 && u.loadSuggestions(a.content.value, s);
|
|
6001
6022
|
}
|
|
6002
6023
|
});
|
|
6003
|
-
async function
|
|
6024
|
+
async function ee() {
|
|
6004
6025
|
let e = d.value.trim();
|
|
6005
6026
|
!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()));
|
|
6006
6027
|
}
|
|
6007
|
-
function
|
|
6028
|
+
function T(e) {
|
|
6008
6029
|
return e.replace(/```json[\s\S]*?```/g, "").replace(/```json[\s\S]*/g, "").trim();
|
|
6009
6030
|
}
|
|
6010
|
-
function
|
|
6011
|
-
y(), d.value = e,
|
|
6031
|
+
function E(e) {
|
|
6032
|
+
y(), d.value = e, ee();
|
|
6012
6033
|
}
|
|
6013
|
-
function
|
|
6014
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(),
|
|
6034
|
+
function te(e) {
|
|
6035
|
+
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), ee());
|
|
6015
6036
|
}
|
|
6016
|
-
return (t, n) => (f(),
|
|
6037
|
+
return (t, n) => (f(), N(ie, {
|
|
6017
6038
|
"enter-active-class": "tpl-ai-slide-enter-active",
|
|
6018
6039
|
"enter-from-class": "tpl:translate-x-full",
|
|
6019
6040
|
"enter-to-class": "tpl:translate-x-0",
|
|
@@ -6021,42 +6042,42 @@ var Ss = {
|
|
|
6021
6042
|
"leave-from-class": "tpl:translate-x-0",
|
|
6022
6043
|
"leave-to-class": "tpl:translate-x-full"
|
|
6023
6044
|
}, {
|
|
6024
|
-
default: b(() => [e.visible ? (f(),
|
|
6025
|
-
I("div",
|
|
6045
|
+
default: b(() => [e.visible ? (f(), k("div", Es, [
|
|
6046
|
+
I("div", Ds, [I("div", Os, [V(j(xi), {
|
|
6026
6047
|
size: 13,
|
|
6027
6048
|
"stroke-width": 2
|
|
6028
|
-
}), I("span", null,
|
|
6049
|
+
}), I("span", null, D(j(i).aiChat.title), 1)]), I("div", ks, [(j(u).messages.value?.length ?? 0) > 0 ? (f(), k("button", {
|
|
6029
6050
|
key: 0,
|
|
6030
6051
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6031
|
-
title:
|
|
6032
|
-
onClick: n[0] ||= (e) =>
|
|
6033
|
-
}, [V(
|
|
6052
|
+
title: j(i).aiChat.clear,
|
|
6053
|
+
onClick: n[0] ||= (e) => j(u).clearChat()
|
|
6054
|
+
}, [V(j(Ci), {
|
|
6034
6055
|
size: 14,
|
|
6035
6056
|
"stroke-width": 2
|
|
6036
|
-
})], 8,
|
|
6057
|
+
})], 8, As)) : A("", !0), I("button", {
|
|
6037
6058
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6038
6059
|
onClick: n[1] ||= (e) => r("close")
|
|
6039
|
-
}, [V(
|
|
6060
|
+
}, [V(j(Oi), {
|
|
6040
6061
|
size: 14,
|
|
6041
6062
|
"stroke-width": 2
|
|
6042
6063
|
})])])]),
|
|
6043
|
-
I("div",
|
|
6064
|
+
I("div", js, [
|
|
6044
6065
|
I("div", {
|
|
6045
6066
|
ref_key: "messagesContainer",
|
|
6046
6067
|
ref: p,
|
|
6047
6068
|
class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
|
|
6048
|
-
}, [
|
|
6069
|
+
}, [j(u).isLoadingHistory.value ? (f(), k("div", Ms, [V(j(li), {
|
|
6049
6070
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
6050
6071
|
size: 24,
|
|
6051
6072
|
"stroke-width": 2
|
|
6052
|
-
}), I("p",
|
|
6073
|
+
}), I("p", Ns, D(j(i).aiChat.loadingHistory), 1)])) : (j(u).messages.value?.length ?? 0) === 0 ? (f(), k("div", Ps, [V(j(xi), {
|
|
6053
6074
|
size: 32,
|
|
6054
6075
|
"stroke-width": 1.5,
|
|
6055
6076
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6056
|
-
}), I("p",
|
|
6077
|
+
}), I("p", Fs, D(j(i).aiChat.placeholder), 1)])) : (f(), k("div", Is, [(f(!0), k(R, null, h(j(u).messages.value, (e, t) => (f(), k("div", {
|
|
6057
6078
|
key: e.id,
|
|
6058
6079
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6059
|
-
}, [e.role === "user" ? (f(),
|
|
6080
|
+
}, [e.role === "user" ? (f(), k("div", Ls, D(e.content), 1)) : (f(), k("div", Rs, [!T(e.content) && j(u).isGenerating.value && t === (j(u).messages.value?.length ?? 0) - 1 ? (f(), N(Li, { key: 0 })) : (f(), k("div", zs, D(T(e.content) || j(i).aiChat.applied), 1)), e.id === j(u).lastApplyMessageId.value && !j(u).isGenerating.value ? (f(), k("button", {
|
|
6060
6081
|
key: 2,
|
|
6061
6082
|
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",
|
|
6062
6083
|
style: {
|
|
@@ -6064,135 +6085,135 @@ var Ss = {
|
|
|
6064
6085
|
color: "var(--tpl-text-muted)",
|
|
6065
6086
|
"background-color": "transparent"
|
|
6066
6087
|
},
|
|
6067
|
-
onClick: n[2] ||= (e) =>
|
|
6068
|
-
}, [
|
|
6088
|
+
onClick: n[2] ||= (e) => j(u).toggleLastRevert()
|
|
6089
|
+
}, [j(u).isLastChangeReverted.value ? (f(), k(R, { key: 0 }, [V(j(mi), {
|
|
6069
6090
|
size: 12,
|
|
6070
6091
|
"stroke-width": 2
|
|
6071
|
-
}), z(" " +
|
|
6092
|
+
}), z(" " + D(j(i).aiChat.reapply), 1)], 64)) : (f(), k(R, { key: 1 }, [V(j(Ti), {
|
|
6072
6093
|
size: 12,
|
|
6073
6094
|
"stroke-width": 2
|
|
6074
|
-
}), z(" " +
|
|
6075
|
-
|
|
6095
|
+
}), z(" " + D(j(i).aiChat.revert), 1)], 64))])) : A("", !0)]))]))), 128))]))], 512),
|
|
6096
|
+
j(u).error.value ? (f(), k("div", Bs, [V(j(Yr), {
|
|
6076
6097
|
size: 14,
|
|
6077
6098
|
"stroke-width": 2,
|
|
6078
6099
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
6079
|
-
}), I("span", null,
|
|
6080
|
-
(
|
|
6100
|
+
}), I("span", null, D(j(u).error.value === "ai_apply_failed" ? j(i).aiChat.applyFailed : j(i).aiChat.error), 1)])) : A("", !0),
|
|
6101
|
+
(j(u).suggestions.value?.length ?? 0) > 0 ? (f(), k("div", Vs, [I("div", Hs, [(f(!0), k(R, null, h(j(u).suggestions.value ?? [], (e, t) => (f(), k("button", {
|
|
6081
6102
|
key: t,
|
|
6082
|
-
class:
|
|
6103
|
+
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"]),
|
|
6083
6104
|
style: {
|
|
6084
6105
|
"border-color": "var(--tpl-border)",
|
|
6085
6106
|
color: "var(--tpl-primary)",
|
|
6086
6107
|
"background-color": "var(--tpl-bg)",
|
|
6087
6108
|
"box-shadow": "var(--tpl-shadow)"
|
|
6088
6109
|
},
|
|
6089
|
-
onClick: (t) =>
|
|
6090
|
-
},
|
|
6110
|
+
onClick: (t) => E(e)
|
|
6111
|
+
}, D(e), 11, Us))), 128))])])) : A("", !0)
|
|
6091
6112
|
]),
|
|
6092
|
-
I("div",
|
|
6113
|
+
I("div", Ws, [I("div", Gs, [c(I("textarea", {
|
|
6093
6114
|
"onUpdate:modelValue": n[3] ||= (e) => d.value = e,
|
|
6094
6115
|
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)]",
|
|
6095
|
-
placeholder:
|
|
6096
|
-
disabled:
|
|
6116
|
+
placeholder: j(i).aiChat.inputPlaceholder,
|
|
6117
|
+
disabled: j(u).isGenerating.value,
|
|
6097
6118
|
rows: "3",
|
|
6098
|
-
onKeydown:
|
|
6099
|
-
}, null, 40,
|
|
6119
|
+
onKeydown: te
|
|
6120
|
+
}, null, 40, Ks), [[ae, d.value]]), I("button", {
|
|
6100
6121
|
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)]",
|
|
6101
|
-
disabled: !d.value.trim() ||
|
|
6102
|
-
onClick:
|
|
6103
|
-
}, [V(
|
|
6122
|
+
disabled: !d.value.trim() || j(u).isGenerating.value,
|
|
6123
|
+
onClick: ee
|
|
6124
|
+
}, [V(j(_i), {
|
|
6104
6125
|
size: 16,
|
|
6105
6126
|
"stroke-width": 2
|
|
6106
|
-
})], 8,
|
|
6107
|
-
])) :
|
|
6127
|
+
})], 8, qs)]), I("p", Js, D(j(i).aiMenu.disclaimer), 1)])
|
|
6128
|
+
])) : A("", !0)]),
|
|
6108
6129
|
_: 1
|
|
6109
6130
|
}));
|
|
6110
6131
|
}
|
|
6111
|
-
}),
|
|
6112
|
-
function
|
|
6132
|
+
}), Xs = /* @__PURE__ */ e({ default: () => Zs }), Zs = /* @__PURE__ */ Ni(Ys, [["__scopeId", "data-v-a55e4bff"]]), Qs = 6e4, $s = 36e5, ec = 864e5;
|
|
6133
|
+
function tc(e, t, n, r) {
|
|
6113
6134
|
let i = new Date(e).getTime();
|
|
6114
6135
|
if (Number.isNaN(i)) return null;
|
|
6115
6136
|
let a = Date.now() - i;
|
|
6116
6137
|
if (a < -6e4) return null;
|
|
6117
|
-
let o = Math.floor(a /
|
|
6138
|
+
let o = Math.floor(a / Qs), s = Math.floor(a / $s), c = Math.floor(a / ec);
|
|
6118
6139
|
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));
|
|
6119
6140
|
}
|
|
6120
6141
|
//#endregion
|
|
6121
6142
|
//#region src/cloud/components/CommentsSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
6122
|
-
var
|
|
6143
|
+
var nc = {
|
|
6123
6144
|
key: 0,
|
|
6124
6145
|
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)]"
|
|
6125
|
-
},
|
|
6146
|
+
}, rc = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, ic = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, ac = {
|
|
6126
6147
|
key: 0,
|
|
6127
6148
|
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)]"
|
|
6128
|
-
},
|
|
6149
|
+
}, oc = { class: "tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2" }, sc = { class: "tpl:flex-1 tpl:overflow-y-auto" }, cc = {
|
|
6129
6150
|
key: 0,
|
|
6130
6151
|
class: "tpl:flex tpl:h-full tpl:items-center tpl:justify-center"
|
|
6131
|
-
},
|
|
6152
|
+
}, lc = {
|
|
6132
6153
|
key: 1,
|
|
6133
6154
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:px-6 tpl:text-center"
|
|
6134
|
-
},
|
|
6155
|
+
}, uc = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, dc = {
|
|
6135
6156
|
key: 2,
|
|
6136
6157
|
class: "tpl:flex tpl:flex-col tpl:gap-3 tpl:p-3"
|
|
6137
|
-
},
|
|
6158
|
+
}, fc = { class: "tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3" }, 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 = {
|
|
6138
6159
|
key: 0,
|
|
6139
6160
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
6140
|
-
},
|
|
6161
|
+
}, vc = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, yc = ["title", "onClick"], bc = ["title", "onClick"], xc = ["title", "onClick"], Sc = {
|
|
6141
6162
|
key: 0,
|
|
6142
6163
|
class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-primary)]"
|
|
6143
|
-
},
|
|
6164
|
+
}, Cc = {
|
|
6144
6165
|
key: 0,
|
|
6145
6166
|
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)]"
|
|
6146
|
-
},
|
|
6167
|
+
}, wc = ["onClick"], Tc = {
|
|
6147
6168
|
key: 2,
|
|
6148
6169
|
class: "tpl:mt-2"
|
|
6149
|
-
},
|
|
6170
|
+
}, Ec = ["onKeydown"], Dc = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, Oc = ["disabled", "onClick"], kc = {
|
|
6150
6171
|
key: 3,
|
|
6151
6172
|
class: "tpl:mt-1.5 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
6152
|
-
},
|
|
6173
|
+
}, Ac = {
|
|
6153
6174
|
key: 4,
|
|
6154
6175
|
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)]"
|
|
6155
|
-
},
|
|
6176
|
+
}, jc = { class: "tpl:flex-1" }, Mc = ["onClick"], Nc = {
|
|
6156
6177
|
key: 5,
|
|
6157
6178
|
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2"
|
|
6158
|
-
},
|
|
6179
|
+
}, Pc = ["title", "onClick"], Fc = ["onClick"], Ic = {
|
|
6159
6180
|
key: 0,
|
|
6160
6181
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
6161
|
-
},
|
|
6182
|
+
}, Lc = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Rc = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, zc = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Bc = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Vc = {
|
|
6162
6183
|
key: 0,
|
|
6163
6184
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
6164
|
-
},
|
|
6185
|
+
}, Hc = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, Uc = ["title", "onClick"], Wc = ["title", "onClick"], Gc = {
|
|
6165
6186
|
key: 0,
|
|
6166
6187
|
class: "tpl:mt-1.5"
|
|
6167
|
-
},
|
|
6188
|
+
}, Kc = ["onKeydown"], qc = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, Jc = ["disabled", "onClick"], Yc = {
|
|
6168
6189
|
key: 1,
|
|
6169
6190
|
class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
6170
|
-
},
|
|
6191
|
+
}, Xc = {
|
|
6171
6192
|
key: 2,
|
|
6172
6193
|
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)]"
|
|
6173
|
-
},
|
|
6194
|
+
}, Zc = { class: "tpl:flex-1" }, Qc = ["onClick"], $c = {
|
|
6174
6195
|
key: 0,
|
|
6175
6196
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
6176
|
-
},
|
|
6197
|
+
}, el = { class: "tpl:flex tpl:items-end tpl:gap-2" }, tl = ["placeholder", "onKeydown"], nl = { class: "tpl:flex tpl:shrink-0 tpl:flex-col tpl:gap-1" }, rl = ["disabled", "onClick"], il = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, al = {
|
|
6177
6198
|
key: 0,
|
|
6178
6199
|
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)]"
|
|
6179
|
-
},
|
|
6200
|
+
}, ol = {
|
|
6180
6201
|
key: 1,
|
|
6181
6202
|
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)]"
|
|
6182
|
-
},
|
|
6203
|
+
}, sl = ["placeholder", "disabled"], cl = ["disabled"], ll = /* @__PURE__ */ B({
|
|
6183
6204
|
__name: "CommentsSidebar",
|
|
6184
6205
|
props: { visible: { type: Boolean } },
|
|
6185
6206
|
emits: ["close", "filterBlock"],
|
|
6186
6207
|
setup(e, { expose: t, emit: n }) {
|
|
6187
|
-
let r = e, i = n, { format: a } = Y(), { t: o } =
|
|
6208
|
+
let r = e, i = n, { format: a } = Y(), { t: o } = Ui(), s = J(Fn, "CommentsSidebar"), l = J(ar, "CommentsSidebar"), u = J(sr, "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), ee = C(null), T = O(() => l.userConfig?.id ?? null), E = O(() => {
|
|
6188
6209
|
let e = /* @__PURE__ */ new Set();
|
|
6189
6210
|
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);
|
|
6190
6211
|
return e;
|
|
6191
6212
|
});
|
|
6192
|
-
function
|
|
6193
|
-
return e ? !
|
|
6213
|
+
function te(e) {
|
|
6214
|
+
return e ? !E.value.has(e) : !1;
|
|
6194
6215
|
}
|
|
6195
|
-
let
|
|
6216
|
+
let ne = O(() => d.value !== "block" || !p.value ? !1 : !(s.savedBlockIds?.value.has(p.value) ?? !0)), re = O(() => {
|
|
6196
6217
|
let e = u.comments.value;
|
|
6197
6218
|
return d.value === "unresolved" ? e = e.filter((e) => !e.resolved_at) : d.value === "block" && p.value && (e = e.filter((e) => e.block_id === p.value)), e;
|
|
6198
6219
|
});
|
|
@@ -6201,11 +6222,11 @@ var Qs = {
|
|
|
6201
6222
|
}), H(() => s.state.selectedBlockId, (e) => {
|
|
6202
6223
|
d.value === "block" && e && (p.value = e);
|
|
6203
6224
|
});
|
|
6204
|
-
function
|
|
6225
|
+
function M(e, t) {
|
|
6205
6226
|
d.value = e, p.value = e === "block" ? t ?? null : null;
|
|
6206
6227
|
}
|
|
6207
|
-
function
|
|
6208
|
-
|
|
6228
|
+
function P(e) {
|
|
6229
|
+
M("block", e), i("filterBlock", e);
|
|
6209
6230
|
}
|
|
6210
6231
|
function oe(e) {
|
|
6211
6232
|
S.value.has(e) ? S.value.delete(e) : S.value.add(e);
|
|
@@ -6249,10 +6270,10 @@ var Qs = {
|
|
|
6249
6270
|
await u.toggleResolve(e);
|
|
6250
6271
|
}
|
|
6251
6272
|
function _e(e) {
|
|
6252
|
-
return e.author_identifier ===
|
|
6273
|
+
return e.author_identifier === T.value;
|
|
6253
6274
|
}
|
|
6254
6275
|
function ve(e) {
|
|
6255
|
-
return
|
|
6276
|
+
return tc(e, o.snapshotHistory) ?? e;
|
|
6256
6277
|
}
|
|
6257
6278
|
function ye(e) {
|
|
6258
6279
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), fe());
|
|
@@ -6265,13 +6286,13 @@ var Qs = {
|
|
|
6265
6286
|
}
|
|
6266
6287
|
function Se() {
|
|
6267
6288
|
m(() => {
|
|
6268
|
-
|
|
6289
|
+
ee.value?.focus();
|
|
6269
6290
|
});
|
|
6270
6291
|
}
|
|
6271
6292
|
return t({
|
|
6272
|
-
filterByBlock:
|
|
6293
|
+
filterByBlock: P,
|
|
6273
6294
|
focusNewComment: Se
|
|
6274
|
-
}), (t, n) => (f(),
|
|
6295
|
+
}), (t, n) => (f(), N(ie, {
|
|
6275
6296
|
"enter-active-class": "tpl-comments-slide-enter-active",
|
|
6276
6297
|
"enter-from-class": "tpl:translate-x-full",
|
|
6277
6298
|
"enter-to-class": "tpl:translate-x-0",
|
|
@@ -6279,267 +6300,267 @@ var Qs = {
|
|
|
6279
6300
|
"leave-from-class": "tpl:translate-x-0",
|
|
6280
6301
|
"leave-to-class": "tpl:translate-x-full"
|
|
6281
6302
|
}, {
|
|
6282
|
-
default: b(() => [e.visible ? (f(),
|
|
6283
|
-
I("div",
|
|
6284
|
-
V(
|
|
6303
|
+
default: b(() => [e.visible ? (f(), k("div", nc, [
|
|
6304
|
+
I("div", rc, [I("div", ic, [
|
|
6305
|
+
V(j(ui), {
|
|
6285
6306
|
size: 13,
|
|
6286
6307
|
"stroke-width": 2
|
|
6287
6308
|
}),
|
|
6288
|
-
I("span", null,
|
|
6289
|
-
|
|
6309
|
+
I("span", null, D(j(o).comments.title), 1),
|
|
6310
|
+
j(u).unresolvedCount.value > 0 ? (f(), k("span", ac, D(j(u).unresolvedCount.value), 1)) : A("", !0)
|
|
6290
6311
|
]), I("button", {
|
|
6291
6312
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6292
6313
|
onClick: n[0] ||= (e) => i("close")
|
|
6293
|
-
}, [V(
|
|
6314
|
+
}, [V(j(Oi), {
|
|
6294
6315
|
size: 14,
|
|
6295
6316
|
"stroke-width": 2
|
|
6296
6317
|
})])]),
|
|
6297
|
-
I("div",
|
|
6318
|
+
I("div", oc, [
|
|
6298
6319
|
I("button", {
|
|
6299
|
-
class:
|
|
6300
|
-
onClick: n[1] ||= (e) =>
|
|
6301
|
-
},
|
|
6320
|
+
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" : ""]),
|
|
6321
|
+
onClick: n[1] ||= (e) => M("unresolved")
|
|
6322
|
+
}, D(j(o).comments.filterUnresolved), 3),
|
|
6302
6323
|
I("button", {
|
|
6303
|
-
class:
|
|
6304
|
-
onClick: n[2] ||= (e) =>
|
|
6305
|
-
},
|
|
6306
|
-
|
|
6324
|
+
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" : ""]),
|
|
6325
|
+
onClick: n[2] ||= (e) => M("all")
|
|
6326
|
+
}, D(j(o).comments.filterAll), 3),
|
|
6327
|
+
j(s).state.selectedBlockId ? (f(), k("button", {
|
|
6307
6328
|
key: 0,
|
|
6308
|
-
class:
|
|
6309
|
-
onClick: n[3] ||= (e) =>
|
|
6310
|
-
},
|
|
6329
|
+
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" : ""]),
|
|
6330
|
+
onClick: n[3] ||= (e) => M("block", j(s).state.selectedBlockId ?? void 0)
|
|
6331
|
+
}, D(j(o).comments.filterBlock), 3)) : A("", !0)
|
|
6311
6332
|
]),
|
|
6312
|
-
I("div",
|
|
6333
|
+
I("div", sc, [j(u).isLoading.value ? (f(), k("div", cc, [V(j(li), {
|
|
6313
6334
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
6314
6335
|
size: 24,
|
|
6315
6336
|
"stroke-width": 2
|
|
6316
|
-
})])) :
|
|
6337
|
+
})])) : re.value.length === 0 ? (f(), k("div", lc, [V(j(ui), {
|
|
6317
6338
|
size: 32,
|
|
6318
6339
|
"stroke-width": 1.5,
|
|
6319
6340
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6320
|
-
}), I("p",
|
|
6341
|
+
}), I("p", uc, D(d.value === "all" ? j(o).comments.noCommentsHint : j(o).comments.noComments), 1)])) : (f(), k("div", dc, [(f(!0), k(R, null, h(re.value, (e) => (f(), k("div", {
|
|
6321
6342
|
key: e.id,
|
|
6322
6343
|
class: "tpl-comment-thread"
|
|
6323
6344
|
}, [
|
|
6324
|
-
I("div",
|
|
6325
|
-
I("div",
|
|
6326
|
-
I("span",
|
|
6327
|
-
I("span",
|
|
6328
|
-
e.updated_at === e.created_at ?
|
|
6329
|
-
]), I("div",
|
|
6345
|
+
I("div", fc, [
|
|
6346
|
+
I("div", pc, [I("div", mc, [
|
|
6347
|
+
I("span", hc, D(_e(e) ? j(o).comments.ownedByYou : e.author_name), 1),
|
|
6348
|
+
I("span", gc, D(ve(e.created_at)), 1),
|
|
6349
|
+
e.updated_at === e.created_at ? A("", !0) : (f(), k("span", _c, " (" + D(j(o).comments.edited) + ") ", 1))
|
|
6350
|
+
]), I("div", vc, [
|
|
6330
6351
|
I("button", {
|
|
6331
6352
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6332
|
-
title: e.resolved_at ?
|
|
6353
|
+
title: e.resolved_at ? j(o).comments.unresolve : j(o).comments.resolve,
|
|
6333
6354
|
onClick: (t) => ge(e.id)
|
|
6334
|
-
}, [V(
|
|
6355
|
+
}, [V(j(Xr), {
|
|
6335
6356
|
size: 13,
|
|
6336
6357
|
"stroke-width": 2,
|
|
6337
6358
|
class: "tpl-resolve-icon",
|
|
6338
6359
|
style: L({ color: e.resolved_at ? "var(--tpl-primary)" : void 0 })
|
|
6339
|
-
}, null, 8, ["style"])], 8,
|
|
6340
|
-
_e(e) ? (f(),
|
|
6360
|
+
}, null, 8, ["style"])], 8, yc),
|
|
6361
|
+
_e(e) ? (f(), k("button", {
|
|
6341
6362
|
key: 0,
|
|
6342
6363
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6343
|
-
title:
|
|
6364
|
+
title: j(o).comments.edit,
|
|
6344
6365
|
onClick: (t) => le(e)
|
|
6345
|
-
}, [V(
|
|
6366
|
+
}, [V(j(fi), {
|
|
6346
6367
|
size: 12,
|
|
6347
6368
|
"stroke-width": 2
|
|
6348
|
-
})], 8,
|
|
6349
|
-
_e(e) ? (f(),
|
|
6369
|
+
})], 8, bc)) : A("", !0),
|
|
6370
|
+
_e(e) ? (f(), k("button", {
|
|
6350
6371
|
key: 1,
|
|
6351
6372
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6352
|
-
title:
|
|
6373
|
+
title: j(o).comments.delete,
|
|
6353
6374
|
onClick: (t) => ue(e.id)
|
|
6354
|
-
}, [V(
|
|
6375
|
+
}, [V(j(Ci), {
|
|
6355
6376
|
size: 12,
|
|
6356
6377
|
"stroke-width": 2
|
|
6357
|
-
})], 8,
|
|
6378
|
+
})], 8, xc)) : A("", !0)
|
|
6358
6379
|
])]),
|
|
6359
|
-
V(
|
|
6360
|
-
default: b(() => [e.resolved_at ? (f(),
|
|
6380
|
+
V(ie, { name: "tpl-resolve" }, {
|
|
6381
|
+
default: b(() => [e.resolved_at ? (f(), k("div", Sc, [V(j(Wr), {
|
|
6361
6382
|
size: 10,
|
|
6362
6383
|
"stroke-width": 2.5
|
|
6363
|
-
}), I("span", null,
|
|
6384
|
+
}), I("span", null, D(j(a)(j(o).comments.resolvedBy, { name: e.resolved_by_name ?? "" })), 1)])) : A("", !0)]),
|
|
6364
6385
|
_: 2
|
|
6365
6386
|
}, 1024),
|
|
6366
|
-
e.block_id &&
|
|
6387
|
+
e.block_id && te(e.block_id) ? (f(), k("span", Cc, D(j(o).comments.missingBlock), 1)) : e.block_id ? (f(), k("button", {
|
|
6367
6388
|
key: 1,
|
|
6368
6389
|
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)]",
|
|
6369
|
-
onClick: (t) =>
|
|
6370
|
-
}, " Block ", 8,
|
|
6371
|
-
y.value === e.id ? (f(),
|
|
6390
|
+
onClick: (t) => j(s).selectBlock(e.block_id ?? "")
|
|
6391
|
+
}, " Block ", 8, wc)) : A("", !0),
|
|
6392
|
+
y.value === e.id ? (f(), k("div", Tc, [c(I("textarea", {
|
|
6372
6393
|
"onUpdate:modelValue": n[4] ||= (e) => x.value = e,
|
|
6373
6394
|
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)]",
|
|
6374
6395
|
rows: "3",
|
|
6375
6396
|
onKeydown: (t) => xe(t, e.id)
|
|
6376
|
-
}, null, 40,
|
|
6397
|
+
}, null, 40, Ec), [[ae, x.value]]), I("div", Dc, [I("button", {
|
|
6377
6398
|
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)]",
|
|
6378
|
-
disabled: !x.value.trim() ||
|
|
6399
|
+
disabled: !x.value.trim() || j(u).isSubmitting.value,
|
|
6379
6400
|
onClick: (t) => me(e.id)
|
|
6380
|
-
},
|
|
6401
|
+
}, D(j(o).comments.save), 9, Oc), I("button", {
|
|
6381
6402
|
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)]",
|
|
6382
6403
|
onClick: n[5] ||= (e) => B()
|
|
6383
|
-
},
|
|
6384
|
-
w.value === e.id ? (f(),
|
|
6385
|
-
I("span",
|
|
6404
|
+
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p", kc, D(e.body), 1)),
|
|
6405
|
+
w.value === e.id ? (f(), k("div", Ac, [
|
|
6406
|
+
I("span", jc, D(j(o).comments.deleteConfirm), 1),
|
|
6386
6407
|
I("button", {
|
|
6387
6408
|
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)]",
|
|
6388
6409
|
onClick: (t) => he(e.id)
|
|
6389
|
-
},
|
|
6410
|
+
}, D(j(o).comments.delete), 9, Mc),
|
|
6390
6411
|
I("button", {
|
|
6391
6412
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6392
6413
|
onClick: n[6] ||= (e) => de()
|
|
6393
|
-
},
|
|
6394
|
-
])) :
|
|
6395
|
-
y.value !== e.id && w.value !== e.id ? (f(),
|
|
6414
|
+
}, D(j(o).comments.cancel), 1)
|
|
6415
|
+
])) : A("", !0),
|
|
6416
|
+
y.value !== e.id && w.value !== e.id ? (f(), k("div", Nc, [I("button", {
|
|
6396
6417
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6397
|
-
title:
|
|
6418
|
+
title: j(o).comments.reply,
|
|
6398
6419
|
onClick: (t) => se(e.id)
|
|
6399
|
-
}, [V(
|
|
6420
|
+
}, [V(j(gi), {
|
|
6400
6421
|
size: 13,
|
|
6401
6422
|
"stroke-width": 2,
|
|
6402
6423
|
class: "tpl:text-[var(--tpl-primary)]"
|
|
6403
|
-
})], 8,
|
|
6424
|
+
})], 8, Pc), (e.replies?.length ?? 0) > 0 ? (f(), k("button", {
|
|
6404
6425
|
key: 0,
|
|
6405
6426
|
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)]",
|
|
6406
6427
|
onClick: (t) => oe(e.id)
|
|
6407
|
-
}, [S.value.has(e.id) ? (f(),
|
|
6428
|
+
}, [S.value.has(e.id) ? (f(), N(j(Jr), {
|
|
6408
6429
|
key: 0,
|
|
6409
6430
|
size: 11,
|
|
6410
6431
|
"stroke-width": 2
|
|
6411
|
-
})) : (f(),
|
|
6432
|
+
})) : (f(), N(j(Gr), {
|
|
6412
6433
|
key: 1,
|
|
6413
6434
|
size: 11,
|
|
6414
6435
|
"stroke-width": 2
|
|
6415
|
-
})), z(" " +
|
|
6436
|
+
})), 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, Fc)) : A("", !0)])) : A("", !0)
|
|
6416
6437
|
]),
|
|
6417
|
-
V(
|
|
6418
|
-
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(),
|
|
6438
|
+
V(ie, { name: "tpl-replies" }, {
|
|
6439
|
+
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), k("div", Ic, [(f(!0), k(R, null, h(e.replies, (t, r) => (f(), k("div", {
|
|
6419
6440
|
key: t.id,
|
|
6420
|
-
class:
|
|
6441
|
+
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" : ""])
|
|
6421
6442
|
}, [
|
|
6422
|
-
I("div",
|
|
6423
|
-
I("span",
|
|
6424
|
-
I("span",
|
|
6425
|
-
t.updated_at === t.created_at ?
|
|
6426
|
-
]), I("div",
|
|
6443
|
+
I("div", Lc, [I("div", Rc, [
|
|
6444
|
+
I("span", zc, D(_e(t) ? j(o).comments.ownedByYou : t.author_name), 1),
|
|
6445
|
+
I("span", Bc, D(ve(t.created_at)), 1),
|
|
6446
|
+
t.updated_at === t.created_at ? A("", !0) : (f(), k("span", Vc, " (" + D(j(o).comments.edited) + ") ", 1))
|
|
6447
|
+
]), I("div", Hc, [_e(t) ? (f(), k("button", {
|
|
6427
6448
|
key: 0,
|
|
6428
6449
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6429
|
-
title:
|
|
6450
|
+
title: j(o).comments.edit,
|
|
6430
6451
|
onClick: (e) => le(t)
|
|
6431
|
-
}, [V(
|
|
6452
|
+
}, [V(j(fi), {
|
|
6432
6453
|
size: 11,
|
|
6433
6454
|
"stroke-width": 2
|
|
6434
|
-
})], 8,
|
|
6455
|
+
})], 8, Uc)) : A("", !0), _e(t) ? (f(), k("button", {
|
|
6435
6456
|
key: 1,
|
|
6436
6457
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6437
|
-
title:
|
|
6458
|
+
title: j(o).comments.delete,
|
|
6438
6459
|
onClick: (e) => ue(t.id)
|
|
6439
|
-
}, [V(
|
|
6460
|
+
}, [V(j(Ci), {
|
|
6440
6461
|
size: 11,
|
|
6441
6462
|
"stroke-width": 2
|
|
6442
|
-
})], 8,
|
|
6443
|
-
y.value === t.id ? (f(),
|
|
6463
|
+
})], 8, Wc)) : A("", !0)])]),
|
|
6464
|
+
y.value === t.id ? (f(), k("div", Gc, [c(I("textarea", {
|
|
6444
6465
|
"onUpdate:modelValue": n[7] ||= (e) => x.value = e,
|
|
6445
6466
|
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)]",
|
|
6446
6467
|
rows: "2",
|
|
6447
6468
|
onKeydown: (e) => xe(e, t.id)
|
|
6448
|
-
}, null, 40,
|
|
6469
|
+
}, null, 40, Kc), [[ae, x.value]]), I("div", qc, [I("button", {
|
|
6449
6470
|
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)]",
|
|
6450
|
-
disabled: !x.value.trim() ||
|
|
6471
|
+
disabled: !x.value.trim() || j(u).isSubmitting.value,
|
|
6451
6472
|
onClick: (e) => me(t.id)
|
|
6452
|
-
},
|
|
6473
|
+
}, D(j(o).comments.save), 9, Jc), I("button", {
|
|
6453
6474
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6454
6475
|
onClick: n[8] ||= (e) => B()
|
|
6455
|
-
},
|
|
6456
|
-
w.value === t.id ? (f(),
|
|
6457
|
-
I("span",
|
|
6476
|
+
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p", Yc, D(t.body), 1)),
|
|
6477
|
+
w.value === t.id ? (f(), k("div", Xc, [
|
|
6478
|
+
I("span", Zc, D(j(o).comments.deleteConfirm), 1),
|
|
6458
6479
|
I("button", {
|
|
6459
6480
|
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)]",
|
|
6460
6481
|
onClick: (e) => he(t.id)
|
|
6461
|
-
},
|
|
6482
|
+
}, D(j(o).comments.delete), 9, Qc),
|
|
6462
6483
|
I("button", {
|
|
6463
6484
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6464
6485
|
onClick: n[9] ||= (e) => de()
|
|
6465
|
-
},
|
|
6466
|
-
])) :
|
|
6467
|
-
], 2))), 128))])) :
|
|
6486
|
+
}, D(j(o).comments.cancel), 1)
|
|
6487
|
+
])) : A("", !0)
|
|
6488
|
+
], 2))), 128))])) : A("", !0)]),
|
|
6468
6489
|
_: 2
|
|
6469
6490
|
}, 1024),
|
|
6470
|
-
V(
|
|
6471
|
-
default: b(() => [_.value === e.id ? (f(),
|
|
6491
|
+
V(ie, { name: "tpl-replies" }, {
|
|
6492
|
+
default: b(() => [_.value === e.id ? (f(), k("div", $c, [I("div", el, [c(I("textarea", {
|
|
6472
6493
|
"onUpdate:modelValue": n[10] ||= (e) => v.value = e,
|
|
6473
6494
|
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)]",
|
|
6474
|
-
placeholder:
|
|
6495
|
+
placeholder: j(o).comments.replyPlaceholder,
|
|
6475
6496
|
rows: "2",
|
|
6476
6497
|
onKeydown: (t) => be(t, e.id)
|
|
6477
|
-
}, null, 40,
|
|
6498
|
+
}, null, 40, tl), [[ae, v.value]]), I("div", nl, [I("button", {
|
|
6478
6499
|
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)]",
|
|
6479
|
-
disabled: !v.value.trim() ||
|
|
6500
|
+
disabled: !v.value.trim() || j(u).isSubmitting.value,
|
|
6480
6501
|
onClick: (t) => pe(e.id)
|
|
6481
|
-
}, [V(
|
|
6502
|
+
}, [V(j(_i), {
|
|
6482
6503
|
size: 14,
|
|
6483
6504
|
"stroke-width": 2
|
|
6484
|
-
})], 8,
|
|
6505
|
+
})], 8, rl), I("button", {
|
|
6485
6506
|
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)]",
|
|
6486
6507
|
onClick: n[11] ||= (e) => ce()
|
|
6487
|
-
}, [V(
|
|
6508
|
+
}, [V(j(Oi), {
|
|
6488
6509
|
size: 14,
|
|
6489
6510
|
"stroke-width": 2
|
|
6490
|
-
})])])])])) :
|
|
6511
|
+
})])])])])) : A("", !0)]),
|
|
6491
6512
|
_: 2
|
|
6492
6513
|
}, 1024)
|
|
6493
6514
|
]))), 128))]))]),
|
|
6494
|
-
I("div",
|
|
6515
|
+
I("div", il, [ne.value ? (f(), k("div", al, D(j(o).comments.saveTemplateFirst), 1)) : (f(), k("div", ol, [c(I("textarea", {
|
|
6495
6516
|
ref_key: "newCommentInput",
|
|
6496
|
-
ref:
|
|
6517
|
+
ref: ee,
|
|
6497
6518
|
"onUpdate:modelValue": n[12] ||= (e) => g.value = e,
|
|
6498
6519
|
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)]",
|
|
6499
|
-
placeholder:
|
|
6500
|
-
disabled:
|
|
6520
|
+
placeholder: j(o).comments.placeholder,
|
|
6521
|
+
disabled: j(u).isSubmitting.value,
|
|
6501
6522
|
rows: "2",
|
|
6502
6523
|
onKeydown: ye
|
|
6503
|
-
}, null, 40,
|
|
6524
|
+
}, null, 40, sl), [[ae, g.value]]), I("button", {
|
|
6504
6525
|
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)]",
|
|
6505
|
-
disabled: !g.value.trim() ||
|
|
6526
|
+
disabled: !g.value.trim() || j(u).isSubmitting.value,
|
|
6506
6527
|
onClick: fe
|
|
6507
|
-
}, [
|
|
6528
|
+
}, [j(u).isSubmitting.value ? (f(), N(j(li), {
|
|
6508
6529
|
key: 0,
|
|
6509
6530
|
class: "tpl-spinner",
|
|
6510
6531
|
size: 16,
|
|
6511
6532
|
"stroke-width": 2
|
|
6512
|
-
})) : (f(),
|
|
6533
|
+
})) : (f(), N(j(_i), {
|
|
6513
6534
|
key: 1,
|
|
6514
6535
|
size: 16,
|
|
6515
6536
|
"stroke-width": 2
|
|
6516
|
-
}))], 8,
|
|
6517
|
-
])) :
|
|
6537
|
+
}))], 8, cl)]))])
|
|
6538
|
+
])) : A("", !0)]),
|
|
6518
6539
|
_: 1
|
|
6519
6540
|
}));
|
|
6520
6541
|
}
|
|
6521
|
-
}),
|
|
6542
|
+
}), ul = /* @__PURE__ */ e({ default: () => dl }), dl = /* @__PURE__ */ Ni(ll, [["__scopeId", "data-v-d204f573"]]), fl = {
|
|
6522
6543
|
key: 0,
|
|
6523
6544
|
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)]"
|
|
6524
|
-
},
|
|
6545
|
+
}, pl = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, ml = { 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-1 tpl:overflow-y-auto tpl:p-4" }, gl = {
|
|
6525
6546
|
key: 0,
|
|
6526
6547
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6527
|
-
},
|
|
6548
|
+
}, _l = { class: "tpl:flex tpl:w-full tpl:flex-col tpl:items-center tpl:gap-3" }, vl = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, yl = {
|
|
6528
6549
|
key: 1,
|
|
6529
6550
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6530
|
-
},
|
|
6551
|
+
}, bl = { class: "tpl:flex tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, xl = {
|
|
6531
6552
|
key: 0,
|
|
6532
6553
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6533
|
-
},
|
|
6554
|
+
}, Sl = { class: "tpl:relative tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Cl = ["src", "alt"], wl = {
|
|
6534
6555
|
key: 1,
|
|
6535
6556
|
class: "tpl:flex tpl:h-32 tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2"
|
|
6536
|
-
},
|
|
6557
|
+
}, Tl = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, El = { class: "tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Dl = { class: "tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Ol = ["accept"], kl = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, Al = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, jl = ["placeholder"], Ml = {
|
|
6537
6558
|
key: 0,
|
|
6538
6559
|
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)]"
|
|
6539
|
-
},
|
|
6560
|
+
}, Nl = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, Pl = { class: "tpl:flex tpl:gap-2" }, Fl = {
|
|
6540
6561
|
key: 1,
|
|
6541
6562
|
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)]"
|
|
6542
|
-
},
|
|
6563
|
+
}, Il = ["disabled"], Ll = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Rl = /* @__PURE__ */ B({
|
|
6543
6564
|
__name: "DesignReferenceSidebar",
|
|
6544
6565
|
props: {
|
|
6545
6566
|
visible: { type: Boolean },
|
|
@@ -6547,11 +6568,11 @@ var Qs = {
|
|
|
6547
6568
|
},
|
|
6548
6569
|
emits: ["close", "apply"],
|
|
6549
6570
|
setup(e, { emit: t }) {
|
|
6550
|
-
let n = e, r = t, { t: i } =
|
|
6551
|
-
authManager: J(
|
|
6571
|
+
let n = e, r = t, { t: i } = Ui(), a = J(Fn, "DesignReferenceSidebar"), o = as({
|
|
6572
|
+
authManager: J(ar, "DesignReferenceSidebar"),
|
|
6552
6573
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
6553
6574
|
onApply: (e) => r("apply", e)
|
|
6554
|
-
}), s = C(null), l = C("image"), u = C(null), d = C(""), p = C(null), m = C(!1), h = C(!1), g =
|
|
6575
|
+
}), 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);
|
|
6555
6576
|
function _(e) {
|
|
6556
6577
|
l.value = e, x();
|
|
6557
6578
|
}
|
|
@@ -6589,12 +6610,12 @@ var Qs = {
|
|
|
6589
6610
|
function w() {
|
|
6590
6611
|
h.value = !1;
|
|
6591
6612
|
}
|
|
6592
|
-
function
|
|
6613
|
+
function ee(e) {
|
|
6593
6614
|
e.preventDefault(), h.value = !1;
|
|
6594
6615
|
let t = e.dataTransfer?.files?.[0];
|
|
6595
6616
|
t && y(t);
|
|
6596
6617
|
}
|
|
6597
|
-
function
|
|
6618
|
+
function T() {
|
|
6598
6619
|
if (!g.value) return;
|
|
6599
6620
|
if (n.hasExistingBlocks && !m.value) {
|
|
6600
6621
|
m.value = !0;
|
|
@@ -6604,14 +6625,14 @@ var Qs = {
|
|
|
6604
6625
|
let e = {};
|
|
6605
6626
|
d.value.trim() && (e.prompt = d.value.trim()), l.value === "image" && u.value ? e.imageUpload = u.value : l.value === "pdf" && u.value && (e.pdfUpload = u.value), o.generate(e);
|
|
6606
6627
|
}
|
|
6607
|
-
function
|
|
6628
|
+
function E() {
|
|
6608
6629
|
m.value = !1;
|
|
6609
6630
|
}
|
|
6610
6631
|
return H(() => n.visible, (e) => {
|
|
6611
6632
|
e || (m.value = !1);
|
|
6612
|
-
}),
|
|
6633
|
+
}), re(() => {
|
|
6613
6634
|
p.value &&= (URL.revokeObjectURL(p.value), null);
|
|
6614
|
-
}), (t, n) => (f(),
|
|
6635
|
+
}), (t, n) => (f(), N(ie, {
|
|
6615
6636
|
"enter-active-class": "tpl-design-slide-enter-active",
|
|
6616
6637
|
"enter-from-class": "tpl:translate-x-full",
|
|
6617
6638
|
"enter-to-class": "tpl:translate-x-0",
|
|
@@ -6619,17 +6640,17 @@ var Qs = {
|
|
|
6619
6640
|
"leave-from-class": "tpl:translate-x-0",
|
|
6620
6641
|
"leave-to-class": "tpl:translate-x-full"
|
|
6621
6642
|
}, {
|
|
6622
|
-
default: b(() => [e.visible ? (f(),
|
|
6643
|
+
default: b(() => [e.visible ? (f(), k("div", fl, [I("div", pl, [I("div", ml, [V(j(oi), {
|
|
6623
6644
|
size: 13,
|
|
6624
6645
|
"stroke-width": 2
|
|
6625
|
-
}), I("span", null,
|
|
6646
|
+
}), I("span", null, D(j(i).designReference.title), 1)]), I("button", {
|
|
6626
6647
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6627
6648
|
onClick: n[0] ||= (e) => r("close")
|
|
6628
|
-
}, [V(
|
|
6649
|
+
}, [V(j(Oi), {
|
|
6629
6650
|
size: 14,
|
|
6630
6651
|
"stroke-width": 2
|
|
6631
|
-
})])]), I("div",
|
|
6632
|
-
I("div",
|
|
6652
|
+
})])]), I("div", hl, [j(o).isGenerating.value ? (f(), k("div", gl, [I("div", _l, [V(Li), I("p", vl, D(j(i).designReference.generating), 1)])])) : (f(), k("div", yl, [
|
|
6653
|
+
I("div", bl, [I("button", {
|
|
6633
6654
|
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",
|
|
6634
6655
|
style: L({
|
|
6635
6656
|
backgroundColor: l.value === "image" ? "var(--tpl-bg)" : "transparent",
|
|
@@ -6637,10 +6658,10 @@ var Qs = {
|
|
|
6637
6658
|
boxShadow: l.value === "image" ? "var(--tpl-shadow)" : "none"
|
|
6638
6659
|
}),
|
|
6639
6660
|
onClick: n[1] ||= (e) => _("image")
|
|
6640
|
-
}, [V(
|
|
6661
|
+
}, [V(j(ni), {
|
|
6641
6662
|
size: 12,
|
|
6642
6663
|
"stroke-width": 2
|
|
6643
|
-
}), z(" " +
|
|
6664
|
+
}), z(" " + D(j(i).designReference.uploadImage), 1)], 4), I("button", {
|
|
6644
6665
|
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",
|
|
6645
6666
|
style: L({
|
|
6646
6667
|
backgroundColor: l.value === "pdf" ? "var(--tpl-bg)" : "transparent",
|
|
@@ -6648,26 +6669,26 @@ var Qs = {
|
|
|
6648
6669
|
boxShadow: l.value === "pdf" ? "var(--tpl-shadow)" : "none"
|
|
6649
6670
|
}),
|
|
6650
6671
|
onClick: n[2] ||= (e) => _("pdf")
|
|
6651
|
-
}, [V(
|
|
6672
|
+
}, [V(j(ri), {
|
|
6652
6673
|
size: 12,
|
|
6653
6674
|
"stroke-width": 2
|
|
6654
|
-
}), z(" " +
|
|
6655
|
-
I("div", null, [u.value ? (f(),
|
|
6675
|
+
}), z(" " + D(j(i).designReference.uploadPdf), 1)], 4)]),
|
|
6676
|
+
I("div", null, [u.value ? (f(), k("div", xl, [I("div", Sl, [p.value ? (f(), k("img", {
|
|
6656
6677
|
key: 0,
|
|
6657
6678
|
src: p.value,
|
|
6658
6679
|
alt: u.value.name,
|
|
6659
6680
|
class: "tpl:h-auto tpl:max-h-48 tpl:w-full tpl:object-contain"
|
|
6660
|
-
}, null, 8,
|
|
6681
|
+
}, null, 8, Cl)) : (f(), k("div", wl, [V(j(ri), {
|
|
6661
6682
|
size: 32,
|
|
6662
6683
|
"stroke-width": 1.5,
|
|
6663
6684
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6664
|
-
}), I("span",
|
|
6685
|
+
}), I("span", Tl, D(u.value.name), 1)])), I("button", {
|
|
6665
6686
|
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)]",
|
|
6666
6687
|
onClick: x
|
|
6667
|
-
}, [V(
|
|
6688
|
+
}, [V(j(Oi), {
|
|
6668
6689
|
size: 12,
|
|
6669
6690
|
"stroke-width": 2
|
|
6670
|
-
})])])])) : (f(),
|
|
6691
|
+
})])])])) : (f(), k("div", {
|
|
6671
6692
|
key: 1,
|
|
6672
6693
|
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",
|
|
6673
6694
|
style: L({
|
|
@@ -6677,15 +6698,15 @@ var Qs = {
|
|
|
6677
6698
|
onClick: n[3] ||= (e) => s.value?.click(),
|
|
6678
6699
|
onDragover: S,
|
|
6679
6700
|
onDragleave: w,
|
|
6680
|
-
onDrop:
|
|
6701
|
+
onDrop: ee
|
|
6681
6702
|
}, [
|
|
6682
|
-
V(
|
|
6703
|
+
V(j(Ei), {
|
|
6683
6704
|
size: 24,
|
|
6684
6705
|
"stroke-width": 1.5,
|
|
6685
6706
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6686
6707
|
}),
|
|
6687
|
-
I("span",
|
|
6688
|
-
I("span",
|
|
6708
|
+
I("span", El, D(j(i).designReference.dropHint), 1),
|
|
6709
|
+
I("span", Dl, D(l.value === "image" ? j(i).designReference.acceptedImages : j(i).designReference.acceptedPdf), 1)
|
|
6689
6710
|
], 36)), I("input", {
|
|
6690
6711
|
ref_key: "fileInput",
|
|
6691
6712
|
ref: s,
|
|
@@ -6693,60 +6714,60 @@ var Qs = {
|
|
|
6693
6714
|
class: "tpl:hidden",
|
|
6694
6715
|
accept: l.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
|
|
6695
6716
|
onChange: v
|
|
6696
|
-
}, null, 40,
|
|
6697
|
-
I("div",
|
|
6717
|
+
}, null, 40, Ol)]),
|
|
6718
|
+
I("div", kl, [I("label", Al, D(j(i).designReference.promptLabel), 1), c(I("textarea", {
|
|
6698
6719
|
"onUpdate:modelValue": n[4] ||= (e) => d.value = e,
|
|
6699
|
-
class:
|
|
6700
|
-
placeholder:
|
|
6720
|
+
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"]]),
|
|
6721
|
+
placeholder: j(i).designReference.promptPlaceholder,
|
|
6701
6722
|
rows: "3"
|
|
6702
|
-
}, null, 8,
|
|
6703
|
-
m.value ? (f(),
|
|
6723
|
+
}, null, 8, jl), [[ae, d.value]])]),
|
|
6724
|
+
m.value ? (f(), k("div", Ml, [I("p", Nl, D(j(i).designReference.replaceWarning), 1), I("div", Pl, [I("button", {
|
|
6704
6725
|
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)]",
|
|
6705
6726
|
style: { "background-color": "transparent" },
|
|
6706
|
-
onClick: D
|
|
6707
|
-
}, O(M(i).designReference.replaceCancel), 1), I("button", {
|
|
6708
|
-
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)]",
|
|
6709
6727
|
onClick: E
|
|
6710
|
-
},
|
|
6711
|
-
|
|
6728
|
+
}, D(j(i).designReference.replaceCancel), 1), I("button", {
|
|
6729
|
+
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)]",
|
|
6730
|
+
onClick: T
|
|
6731
|
+
}, D(j(i).designReference.replaceConfirm), 1)])])) : A("", !0),
|
|
6732
|
+
j(o).error.value ? (f(), k("div", Fl, [V(j(Yr), {
|
|
6712
6733
|
size: 14,
|
|
6713
6734
|
"stroke-width": 2,
|
|
6714
6735
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
6715
|
-
}), I("span", null,
|
|
6716
|
-
m.value ?
|
|
6736
|
+
}), I("span", null, D(j(i).designReference.error), 1)])) : A("", !0),
|
|
6737
|
+
m.value ? A("", !0) : (f(), k("button", {
|
|
6717
6738
|
key: 2,
|
|
6718
6739
|
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)]",
|
|
6719
6740
|
disabled: !g.value,
|
|
6720
|
-
onClick:
|
|
6721
|
-
}, [V(
|
|
6741
|
+
onClick: T
|
|
6742
|
+
}, [V(j(oi), {
|
|
6722
6743
|
size: 16,
|
|
6723
6744
|
"stroke-width": 2
|
|
6724
|
-
}), z(" " +
|
|
6725
|
-
I("p",
|
|
6726
|
-
]))])])) :
|
|
6745
|
+
}), z(" " + D(j(i).designReference.generate), 1)], 8, Il)),
|
|
6746
|
+
I("p", Ll, D(j(i).aiMenu.disclaimer), 1)
|
|
6747
|
+
]))])])) : A("", !0)]),
|
|
6727
6748
|
_: 1
|
|
6728
6749
|
}));
|
|
6729
6750
|
}
|
|
6730
|
-
}),
|
|
6751
|
+
}), zl = /* @__PURE__ */ e({ default: () => Bl }), Bl = /* @__PURE__ */ Ni(Rl, [["__scopeId", "data-v-bdbf8d0d"]]), Vl = ["disabled", "title"], Hl = ["title"], Ul = {
|
|
6731
6752
|
key: 0,
|
|
6732
6753
|
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)]",
|
|
6733
6754
|
style: {
|
|
6734
6755
|
"backdrop-filter": "blur(8px)",
|
|
6735
6756
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
6736
6757
|
}
|
|
6737
|
-
},
|
|
6758
|
+
}, Wl = { 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)]" }, Gl = {
|
|
6738
6759
|
key: 0,
|
|
6739
6760
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8"
|
|
6740
|
-
},
|
|
6761
|
+
}, Kl = {
|
|
6741
6762
|
key: 1,
|
|
6742
6763
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
6743
|
-
},
|
|
6764
|
+
}, ql = {
|
|
6744
6765
|
key: 2,
|
|
6745
6766
|
class: "tpl:max-h-64 tpl:overflow-y-auto"
|
|
6746
|
-
},
|
|
6767
|
+
}, Jl = ["disabled", "onClick"], Yl = { class: "tpl:flex tpl:flex-col tpl:gap-0.5" }, Xl = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Zl = {
|
|
6747
6768
|
key: 0,
|
|
6748
6769
|
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)]"
|
|
6749
|
-
},
|
|
6770
|
+
}, Ql = ["disabled", "title"], $l = /* @__PURE__ */ B({
|
|
6750
6771
|
__name: "SnapshotHistory",
|
|
6751
6772
|
props: {
|
|
6752
6773
|
snapshots: {},
|
|
@@ -6755,11 +6776,11 @@ var Qs = {
|
|
|
6755
6776
|
},
|
|
6756
6777
|
emits: ["load", "navigate"],
|
|
6757
6778
|
setup(e, { emit: t }) {
|
|
6758
|
-
let n = e, r = t, { format: i } = Y(), { t: a } =
|
|
6779
|
+
let n = e, r = t, { format: i } = Y(), { t: a } = Ui(), o = C(!1), s = C(null), c = C(-1);
|
|
6759
6780
|
H(() => n.snapshots.length, () => {
|
|
6760
6781
|
c.value = -1;
|
|
6761
6782
|
});
|
|
6762
|
-
let l =
|
|
6783
|
+
let l = O(() => c.value > 0 && n.snapshots.length > 0 && !n.isRestoring), u = O(() => c.value < n.snapshots.length - 1 && n.snapshots.length > 0 && !n.isRestoring);
|
|
6763
6784
|
function d() {
|
|
6764
6785
|
l.value && (c.value--, r("navigate", n.snapshots[c.value]));
|
|
6765
6786
|
}
|
|
@@ -6774,7 +6795,7 @@ var Qs = {
|
|
|
6774
6795
|
t !== -1 && (c.value = t, r("navigate", n.snapshots[t])), o.value = !1;
|
|
6775
6796
|
}
|
|
6776
6797
|
function _(e) {
|
|
6777
|
-
let t =
|
|
6798
|
+
let t = tc(e, a.snapshotHistory, i, 7);
|
|
6778
6799
|
return t === null ? new Date(e).toLocaleDateString(void 0, {
|
|
6779
6800
|
month: "short",
|
|
6780
6801
|
day: "numeric",
|
|
@@ -6784,7 +6805,7 @@ var Qs = {
|
|
|
6784
6805
|
}
|
|
6785
6806
|
return mn(s, () => {
|
|
6786
6807
|
o.value = !1;
|
|
6787
|
-
}), (t, n) => (f(),
|
|
6808
|
+
}), (t, n) => (f(), k("div", {
|
|
6788
6809
|
ref_key: "dropdownRef",
|
|
6789
6810
|
ref: s,
|
|
6790
6811
|
class: "tpl:relative tpl:flex tpl:items-center tpl:gap-0.5"
|
|
@@ -6792,111 +6813,111 @@ var Qs = {
|
|
|
6792
6813
|
I("button", {
|
|
6793
6814
|
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)]",
|
|
6794
6815
|
disabled: !u.value,
|
|
6795
|
-
title:
|
|
6796
|
-
onClick:
|
|
6797
|
-
}, [V(
|
|
6816
|
+
title: j(a).snapshotHistory.olderSnapshot,
|
|
6817
|
+
onClick: M(p, ["stop"])
|
|
6818
|
+
}, [V(j(Kr), {
|
|
6798
6819
|
size: 14,
|
|
6799
6820
|
"stroke-width": 2
|
|
6800
|
-
})], 8,
|
|
6821
|
+
})], 8, Vl),
|
|
6801
6822
|
I("button", {
|
|
6802
6823
|
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)]",
|
|
6803
|
-
title:
|
|
6804
|
-
onClick:
|
|
6805
|
-
}, [V(
|
|
6824
|
+
title: j(a).snapshotHistory.tooltip,
|
|
6825
|
+
onClick: M(m, ["stop"])
|
|
6826
|
+
}, [V(j(Zr), {
|
|
6806
6827
|
size: 16,
|
|
6807
6828
|
"stroke-width": 1.5
|
|
6808
|
-
}), V(
|
|
6809
|
-
class:
|
|
6829
|
+
}), V(j(Gr), {
|
|
6830
|
+
class: F(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-180": o.value }]),
|
|
6810
6831
|
size: 10,
|
|
6811
6832
|
"stroke-width": 2
|
|
6812
|
-
}, null, 8, ["class"])], 8,
|
|
6813
|
-
V(
|
|
6814
|
-
default: b(() => [o.value ? (f(),
|
|
6833
|
+
}, null, 8, ["class"])], 8, Hl),
|
|
6834
|
+
V(ie, { name: "tpl-dropdown" }, {
|
|
6835
|
+
default: b(() => [o.value ? (f(), k("div", Ul, [I("div", Wl, D(j(a).snapshotHistory.dropdownTitle), 1), e.isLoading ? (f(), k("div", Gl, [V(j(li), {
|
|
6815
6836
|
class: "tpl:animate-spin tpl:text-[var(--tpl-primary)]",
|
|
6816
6837
|
size: 20,
|
|
6817
6838
|
"stroke-width": 2
|
|
6818
|
-
})])) : e.snapshots.length === 0 ? (f(),
|
|
6839
|
+
})])) : e.snapshots.length === 0 ? (f(), k("div", Kl, D(j(a).snapshotHistory.noSnapshots), 1)) : (f(), k("div", ql, [(f(!0), k(R, null, h(e.snapshots, (t) => (f(), k("button", {
|
|
6819
6840
|
key: t.id,
|
|
6820
6841
|
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)]",
|
|
6821
6842
|
style: { "background-color": "transparent" },
|
|
6822
6843
|
disabled: e.isRestoring,
|
|
6823
6844
|
onClick: (e) => g(t.id)
|
|
6824
|
-
}, [I("div",
|
|
6845
|
+
}, [I("div", Yl, [I("div", Xl, [I("span", null, D(_(t.created_at)), 1), t.is_autosave ? (f(), k("span", Zl, D(j(a).snapshotHistory.auto), 1)) : A("", !0)])])], 8, Jl))), 128))]))])) : A("", !0)]),
|
|
6825
6846
|
_: 1
|
|
6826
6847
|
}),
|
|
6827
6848
|
I("button", {
|
|
6828
6849
|
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)]",
|
|
6829
6850
|
disabled: !l.value,
|
|
6830
|
-
title:
|
|
6831
|
-
onClick:
|
|
6832
|
-
}, [V(
|
|
6851
|
+
title: j(a).snapshotHistory.newerSnapshot,
|
|
6852
|
+
onClick: M(d, ["stop"])
|
|
6853
|
+
}, [V(j(qr), {
|
|
6833
6854
|
size: 14,
|
|
6834
6855
|
"stroke-width": 2
|
|
6835
|
-
})], 8,
|
|
6856
|
+
})], 8, Ql)
|
|
6836
6857
|
], 512));
|
|
6837
6858
|
}
|
|
6838
|
-
}),
|
|
6859
|
+
}), eu = /* @__PURE__ */ e({ default: () => tu }), tu = $l;
|
|
6839
6860
|
//#endregion
|
|
6840
6861
|
//#region src/cloud/utils/scoringStyles.ts
|
|
6841
|
-
function
|
|
6862
|
+
function nu(e) {
|
|
6842
6863
|
return e >= 80 ? "var(--tpl-success)" : e >= 60 ? "var(--tpl-warning)" : "var(--tpl-danger)";
|
|
6843
6864
|
}
|
|
6844
|
-
function
|
|
6865
|
+
function ru(e) {
|
|
6845
6866
|
return e >= 80 ? "var(--tpl-success-light)" : e >= 60 ? "var(--tpl-warning-light)" : "var(--tpl-danger-light)";
|
|
6846
6867
|
}
|
|
6847
|
-
function
|
|
6868
|
+
function iu(e) {
|
|
6848
6869
|
return e === "high" ? "var(--tpl-danger)" : e === "medium" ? "var(--tpl-warning)" : "var(--tpl-text-muted)";
|
|
6849
6870
|
}
|
|
6850
|
-
function
|
|
6871
|
+
function au(e) {
|
|
6851
6872
|
return e === "high" ? "var(--tpl-danger-light)" : e === "medium" ? "var(--tpl-warning-light)" : "var(--tpl-bg-hover)";
|
|
6852
6873
|
}
|
|
6853
6874
|
//#endregion
|
|
6854
6875
|
//#region src/cloud/components/TemplateScoringPanel.vue?vue&type=script&setup=true&lang.ts
|
|
6855
|
-
var
|
|
6876
|
+
var ou = {
|
|
6856
6877
|
key: 0,
|
|
6857
6878
|
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)]"
|
|
6858
|
-
},
|
|
6879
|
+
}, su = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, cu = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, lu = { class: "tpl:flex tpl:items-center tpl:gap-1" }, uu = ["title"], du = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, fu = {
|
|
6859
6880
|
key: 0,
|
|
6860
6881
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6861
|
-
},
|
|
6882
|
+
}, pu = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, mu = {
|
|
6862
6883
|
key: 1,
|
|
6863
6884
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6864
|
-
},
|
|
6885
|
+
}, hu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, gu = {
|
|
6865
6886
|
key: 2,
|
|
6866
6887
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6867
|
-
},
|
|
6888
|
+
}, _u = { class: "tpl:text-xs tpl:font-medium tpl:uppercase tpl:tracking-wider tpl:text-[var(--tpl-text-muted)]" }, vu = {
|
|
6868
6889
|
key: 0,
|
|
6869
6890
|
class: "tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
6870
|
-
},
|
|
6891
|
+
}, yu = {
|
|
6871
6892
|
key: 0,
|
|
6872
6893
|
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)]"
|
|
6873
|
-
},
|
|
6894
|
+
}, bu = ["onClick"], xu = { class: "tpl:flex-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Su = {
|
|
6874
6895
|
key: 0,
|
|
6875
6896
|
class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
|
|
6876
|
-
},
|
|
6897
|
+
}, Cu = {
|
|
6877
6898
|
key: 0,
|
|
6878
6899
|
class: "tpl:border-t tpl:border-[var(--tpl-border)]"
|
|
6879
|
-
},
|
|
6900
|
+
}, wu = {
|
|
6880
6901
|
key: 0,
|
|
6881
6902
|
class: "tpl:px-3 tpl:py-3 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
6882
|
-
},
|
|
6903
|
+
}, Tu = { class: "tpl:flex tpl:items-start tpl:gap-2" }, Eu = { class: "tpl:flex-1 tpl:min-w-0" }, Du = { class: "tpl:flex tpl:items-start tpl:gap-1.5" }, Ou = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, ku = {
|
|
6883
6904
|
key: 0,
|
|
6884
6905
|
class: "tpl:mt-1 tpl:text-[11px] tpl:leading-snug tpl:text-[var(--tpl-text-dim)]"
|
|
6885
|
-
},
|
|
6906
|
+
}, Au = {
|
|
6886
6907
|
key: 1,
|
|
6887
6908
|
class: "tpl:mt-2 tpl:flex tpl:justify-center"
|
|
6888
|
-
},
|
|
6909
|
+
}, ju = ["disabled", "onClick"], Mu = {
|
|
6889
6910
|
key: 0,
|
|
6890
6911
|
class: "tpl:mt-1.5 tpl:text-[11px] tpl:text-[var(--tpl-danger)]"
|
|
6891
|
-
},
|
|
6912
|
+
}, Nu = {
|
|
6892
6913
|
key: 3,
|
|
6893
6914
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6894
|
-
},
|
|
6915
|
+
}, Pu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Fu = { 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)]" }, Iu = /* @__PURE__ */ B({
|
|
6895
6916
|
__name: "TemplateScoringPanel",
|
|
6896
6917
|
props: { visible: { type: Boolean } },
|
|
6897
6918
|
emits: ["close"],
|
|
6898
6919
|
setup(e, { emit: t }) {
|
|
6899
|
-
let n = e, r = t, { t: i } =
|
|
6920
|
+
let n = e, r = t, { t: i } = Ui(), a = J(Fn, "TemplateScoringPanel"), o = J(lr, "TemplateScoringPanel"), s = v(Kn, []), c = C({
|
|
6900
6921
|
spam: !0,
|
|
6901
6922
|
readability: !0,
|
|
6902
6923
|
accessibility: !0,
|
|
@@ -6911,10 +6932,10 @@ var nu = {
|
|
|
6911
6932
|
"accessibility",
|
|
6912
6933
|
"bestPractices"
|
|
6913
6934
|
], p = {
|
|
6914
|
-
spam:
|
|
6915
|
-
readability:
|
|
6916
|
-
accessibility:
|
|
6917
|
-
bestPractices:
|
|
6935
|
+
spam: bi,
|
|
6936
|
+
readability: ti,
|
|
6937
|
+
accessibility: xi,
|
|
6938
|
+
bestPractices: ki
|
|
6918
6939
|
};
|
|
6919
6940
|
function m() {
|
|
6920
6941
|
o.score(a.content.value, s);
|
|
@@ -6934,7 +6955,7 @@ var nu = {
|
|
|
6934
6955
|
function _() {
|
|
6935
6956
|
return o.scoringResult.value ? u.reduce((e, t) => e + (o.scoringResult.value?.categories[t]?.findings.length ?? 0), 0) : 0;
|
|
6936
6957
|
}
|
|
6937
|
-
return (t, n) => (f(),
|
|
6958
|
+
return (t, n) => (f(), N(ie, {
|
|
6938
6959
|
"enter-active-class": "tpl-scoring-slide-enter-active",
|
|
6939
6960
|
"enter-from-class": "tpl:translate-x-full",
|
|
6940
6961
|
"enter-to-class": "tpl:translate-x-0",
|
|
@@ -6942,132 +6963,132 @@ var nu = {
|
|
|
6942
6963
|
"leave-from-class": "tpl:translate-x-0",
|
|
6943
6964
|
"leave-to-class": "tpl:translate-x-full"
|
|
6944
6965
|
}, {
|
|
6945
|
-
default: b(() => [e.visible ? (f(),
|
|
6966
|
+
default: b(() => [e.visible ? (f(), k("div", ou, [I("div", su, [I("div", cu, [V(j(yi), {
|
|
6946
6967
|
size: 13,
|
|
6947
6968
|
"stroke-width": 2
|
|
6948
|
-
}), I("span", null,
|
|
6969
|
+
}), I("span", null, D(j(i).scoring.title), 1)]), I("div", lu, [j(o).scoringResult.value && !j(o).isScoring.value ? (f(), k("button", {
|
|
6949
6970
|
key: 0,
|
|
6950
6971
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6951
|
-
title:
|
|
6972
|
+
title: j(i).scoring.rescore,
|
|
6952
6973
|
onClick: n[0] ||= (e) => m()
|
|
6953
|
-
}, [V(
|
|
6974
|
+
}, [V(j(hi), {
|
|
6954
6975
|
size: 14,
|
|
6955
6976
|
"stroke-width": 2
|
|
6956
|
-
})], 8,
|
|
6977
|
+
})], 8, uu)) : A("", !0), I("button", {
|
|
6957
6978
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6958
6979
|
onClick: n[1] ||= (e) => r("close")
|
|
6959
|
-
}, [V(
|
|
6980
|
+
}, [V(j(Oi), {
|
|
6960
6981
|
size: 14,
|
|
6961
6982
|
"stroke-width": 2
|
|
6962
|
-
})])])]), I("div",
|
|
6963
|
-
V(
|
|
6983
|
+
})])])]), I("div", du, [j(o).isScoring.value ? (f(), k("div", fu, [I("p", pu, D(j(i).scoring.scoring), 1), V(Li, { class: "tpl:w-3/4" })])) : j(o).error.value && !j(o).scoringResult.value ? (f(), k("div", mu, [
|
|
6984
|
+
V(j(Yr), {
|
|
6964
6985
|
size: 32,
|
|
6965
6986
|
"stroke-width": 1.5,
|
|
6966
6987
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
6967
6988
|
}),
|
|
6968
|
-
I("p",
|
|
6989
|
+
I("p", hu, D(j(i).scoring.error), 1),
|
|
6969
6990
|
I("button", {
|
|
6970
6991
|
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)]",
|
|
6971
6992
|
onClick: n[2] ||= (e) => m()
|
|
6972
|
-
}, [V(
|
|
6993
|
+
}, [V(j(hi), {
|
|
6973
6994
|
size: 12,
|
|
6974
6995
|
"stroke-width": 2
|
|
6975
|
-
}), z(" " +
|
|
6976
|
-
])) :
|
|
6996
|
+
}), z(" " + D(j(i).scoring.rescore), 1)])
|
|
6997
|
+
])) : j(o).scoringResult.value ? (f(), k("div", gu, [
|
|
6977
6998
|
I("div", {
|
|
6978
6999
|
class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:p-5",
|
|
6979
|
-
style: L({ backgroundColor:
|
|
7000
|
+
style: L({ backgroundColor: j(ru)(j(o).scoringResult.value.score) })
|
|
6980
7001
|
}, [
|
|
6981
7002
|
I("span", {
|
|
6982
7003
|
class: "tpl:text-4xl tpl:font-bold tpl:tabular-nums",
|
|
6983
|
-
style: L({ color:
|
|
6984
|
-
},
|
|
6985
|
-
I("span",
|
|
6986
|
-
_() > 0 ? (f(),
|
|
7004
|
+
style: L({ color: j(nu)(j(o).scoringResult.value.score) })
|
|
7005
|
+
}, D(j(o).scoringResult.value.score), 5),
|
|
7006
|
+
I("span", _u, D(j(i).scoring.overallScore), 1),
|
|
7007
|
+
_() > 0 ? (f(), k("span", vu, D(_()) + " " + D(j(i).scoring.findings), 1)) : A("", !0)
|
|
6987
7008
|
], 4),
|
|
6988
|
-
|
|
7009
|
+
j(o).fixError.value ? (f(), k("div", yu, [V(j(Yr), {
|
|
6989
7010
|
size: 14,
|
|
6990
7011
|
"stroke-width": 2,
|
|
6991
7012
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
6992
|
-
}), I("span", null,
|
|
6993
|
-
(f(),
|
|
7013
|
+
}), I("span", null, D(j(i).scoring.fixError), 1)])) : A("", !0),
|
|
7014
|
+
(f(), k(R, null, h(u, (e) => I("div", {
|
|
6994
7015
|
key: e,
|
|
6995
7016
|
class: "tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
6996
7017
|
}, [I("button", {
|
|
6997
7018
|
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)]",
|
|
6998
7019
|
onClick: (t) => l(e)
|
|
6999
7020
|
}, [
|
|
7000
|
-
(f(),
|
|
7021
|
+
(f(), N(d(p[e]), {
|
|
7001
7022
|
size: 14,
|
|
7002
7023
|
"stroke-width": 2,
|
|
7003
|
-
style: L({ color:
|
|
7024
|
+
style: L({ color: j(nu)(j(o).scoringResult.value.categories[e].score) })
|
|
7004
7025
|
}, null, 8, ["style"])),
|
|
7005
|
-
I("span",
|
|
7026
|
+
I("span", xu, D(j(i).scoring.categories[e]), 1),
|
|
7006
7027
|
I("span", {
|
|
7007
7028
|
class: "tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-semibold tpl:tabular-nums",
|
|
7008
7029
|
style: L({
|
|
7009
|
-
color:
|
|
7010
|
-
backgroundColor:
|
|
7030
|
+
color: j(nu)(j(o).scoringResult.value.categories[e].score),
|
|
7031
|
+
backgroundColor: j(ru)(j(o).scoringResult.value.categories[e].score)
|
|
7011
7032
|
})
|
|
7012
|
-
},
|
|
7013
|
-
|
|
7014
|
-
V(
|
|
7033
|
+
}, D(j(o).scoringResult.value.categories[e].score), 5),
|
|
7034
|
+
j(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), k("span", Su, D(j(o).scoringResult.value.categories[e].findings.length), 1)) : A("", !0),
|
|
7035
|
+
V(j(Gr), {
|
|
7015
7036
|
size: 12,
|
|
7016
7037
|
"stroke-width": 2,
|
|
7017
|
-
class:
|
|
7038
|
+
class: F(["tpl:transition-transform tpl:duration-200 tpl:text-[var(--tpl-text-dim)]", c.value[e] ? "tpl:rotate-0" : "tpl:-rotate-90"])
|
|
7018
7039
|
}, null, 8, ["class"])
|
|
7019
|
-
], 8,
|
|
7040
|
+
], 8, bu), c.value[e] ? (f(), k("div", Cu, [j(o).scoringResult.value.categories[e].findings.length === 0 ? (f(), k("div", wu, 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", {
|
|
7020
7041
|
key: e.id,
|
|
7021
7042
|
class: "tpl:border-t tpl:px-3 tpl:py-2.5 first:tpl:border-t-0 tpl:border-[var(--tpl-border-light)]"
|
|
7022
|
-
}, [I("div",
|
|
7043
|
+
}, [I("div", Tu, [(f(), N(d(j(e.severity === "high" ? Yr : e.severity === "medium" ? wi : ci)), {
|
|
7023
7044
|
size: 13,
|
|
7024
7045
|
"stroke-width": 2,
|
|
7025
7046
|
class: "tpl:mt-0.5 tpl:shrink-0",
|
|
7026
|
-
style: L({ color:
|
|
7027
|
-
}, null, 8, ["style"])), I("div",
|
|
7028
|
-
I("div",
|
|
7047
|
+
style: L({ color: j(iu)(e.severity) })
|
|
7048
|
+
}, null, 8, ["style"])), I("div", Eu, [
|
|
7049
|
+
I("div", Du, [I("span", {
|
|
7029
7050
|
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",
|
|
7030
7051
|
style: L({
|
|
7031
|
-
color:
|
|
7032
|
-
backgroundColor:
|
|
7052
|
+
color: j(iu)(e.severity),
|
|
7053
|
+
backgroundColor: j(au)(e.severity)
|
|
7033
7054
|
})
|
|
7034
|
-
},
|
|
7035
|
-
e.suggestion ? (f(),
|
|
7036
|
-
e.blockId ? (f(),
|
|
7055
|
+
}, D(j(i).scoring.severity[e.severity]), 5), I("span", Ou, D(e.message), 1)]),
|
|
7056
|
+
e.suggestion ? (f(), k("p", ku, D(e.suggestion), 1)) : A("", !0),
|
|
7057
|
+
e.blockId ? (f(), k("div", Au, [I("button", {
|
|
7037
7058
|
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)]",
|
|
7038
7059
|
style: { "background-color": "transparent" },
|
|
7039
|
-
disabled:
|
|
7060
|
+
disabled: j(o).fixingFindingId.value !== null,
|
|
7040
7061
|
onClick: (t) => g(e)
|
|
7041
|
-
}, [
|
|
7062
|
+
}, [j(o).fixingFindingId.value === e.id ? (f(), N(j(li), {
|
|
7042
7063
|
key: 0,
|
|
7043
7064
|
class: "tpl-spinner",
|
|
7044
7065
|
size: 11,
|
|
7045
7066
|
"stroke-width": 2
|
|
7046
|
-
})) : (f(),
|
|
7067
|
+
})) : (f(), N(j(xi), {
|
|
7047
7068
|
key: 1,
|
|
7048
7069
|
size: 11,
|
|
7049
7070
|
"stroke-width": 2
|
|
7050
|
-
})), z(" " +
|
|
7051
|
-
])])]))), 128))])) :
|
|
7052
|
-
])) : (f(),
|
|
7071
|
+
})), z(" " + D(j(o).fixingFindingId.value === e.id ? j(i).scoring.fixing : j(i).scoring.fix), 1)], 8, ju), j(o).fixError.value ? (f(), k("p", Mu, D(j(o).fixError.value), 1)) : A("", !0)])) : A("", !0)
|
|
7072
|
+
])])]))), 128))])) : A("", !0)])), 64))
|
|
7073
|
+
])) : (f(), k("div", Nu, [V(j(yi), {
|
|
7053
7074
|
size: 32,
|
|
7054
7075
|
"stroke-width": 1.5,
|
|
7055
7076
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
7056
|
-
}), I("p",
|
|
7077
|
+
}), I("p", Pu, D(j(i).scoring.emptyState), 1)])), I("p", Fu, D(j(i).aiMenu.disclaimer), 1)])])) : A("", !0)]),
|
|
7057
7078
|
_: 1
|
|
7058
7079
|
}));
|
|
7059
7080
|
}
|
|
7060
|
-
}),
|
|
7081
|
+
}), Lu = /* @__PURE__ */ e({ default: () => Ru }), Ru = /* @__PURE__ */ Ni(Iu, [["__scopeId", "data-v-3a059e8d"]]), zu = ["aria-busy"], Bu = {
|
|
7061
7082
|
id: "tpl-test-email-title",
|
|
7062
7083
|
class: "tpl:mb-4 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
7063
|
-
},
|
|
7084
|
+
}, Vu = { class: "tpl:mb-3" }, Hu = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Uu = ["value"], Wu = ["disabled"], Gu = ["value"], Ku = {
|
|
7064
7085
|
key: 0,
|
|
7065
7086
|
role: "alert",
|
|
7066
7087
|
class: "tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
7067
|
-
},
|
|
7088
|
+
}, qu = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Ju = ["disabled"], Yu = ["disabled"], Xu = {
|
|
7068
7089
|
key: 0,
|
|
7069
7090
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
7070
|
-
},
|
|
7091
|
+
}, Zu = { key: 1 }, Qu = /* @__PURE__ */ B({
|
|
7071
7092
|
__name: "TestEmailModal",
|
|
7072
7093
|
props: {
|
|
7073
7094
|
visible: { type: Boolean },
|
|
@@ -7077,7 +7098,7 @@ var nu = {
|
|
|
7077
7098
|
},
|
|
7078
7099
|
emits: ["send", "close"],
|
|
7079
7100
|
setup(e, { emit: t }) {
|
|
7080
|
-
let n = e, r = t, { t: i } =
|
|
7101
|
+
let n = e, r = t, { t: i } = Ui(), a = C("");
|
|
7081
7102
|
H(() => n.visible, (e) => {
|
|
7082
7103
|
e && (a.value = n.allowedEmails[0] ?? "");
|
|
7083
7104
|
});
|
|
@@ -7090,7 +7111,7 @@ var nu = {
|
|
|
7090
7111
|
function l(e) {
|
|
7091
7112
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), o()), e.key === "Escape" && s();
|
|
7092
7113
|
}
|
|
7093
|
-
return (t, n) => (f(),
|
|
7114
|
+
return (t, n) => (f(), N(Vo, {
|
|
7094
7115
|
visible: e.visible,
|
|
7095
7116
|
onClose: s,
|
|
7096
7117
|
onKeydown: l
|
|
@@ -7106,44 +7127,44 @@ var nu = {
|
|
|
7106
7127
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
7107
7128
|
}
|
|
7108
7129
|
}, [
|
|
7109
|
-
I("h3",
|
|
7110
|
-
I("div",
|
|
7130
|
+
I("h3", Bu, D(j(i).testEmail.title), 1),
|
|
7131
|
+
I("div", Vu, [I("label", Hu, D(j(i).testEmail.recipientLabel), 1), e.allowedEmails.length === 1 ? (f(), k("input", {
|
|
7111
7132
|
key: 0,
|
|
7112
7133
|
type: "text",
|
|
7113
7134
|
value: a.value,
|
|
7114
7135
|
disabled: "",
|
|
7115
7136
|
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)]"
|
|
7116
|
-
}, null, 8,
|
|
7137
|
+
}, null, 8, Uu)) : c((f(), k("select", {
|
|
7117
7138
|
key: 1,
|
|
7118
7139
|
"onUpdate:modelValue": n[0] ||= (e) => a.value = e,
|
|
7119
7140
|
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)]",
|
|
7120
7141
|
disabled: e.isSending
|
|
7121
|
-
}, [(f(!0),
|
|
7142
|
+
}, [(f(!0), k(R, null, h(e.allowedEmails, (e) => (f(), k("option", {
|
|
7122
7143
|
key: e,
|
|
7123
7144
|
value: e
|
|
7124
|
-
},
|
|
7125
|
-
e.error ? (f(),
|
|
7126
|
-
I("div",
|
|
7145
|
+
}, D(e), 9, Gu))), 128))], 8, Wu)), [[w, a.value]])]),
|
|
7146
|
+
e.error ? (f(), k("p", Ku, D(e.error), 1)) : A("", !0),
|
|
7147
|
+
I("div", qu, [I("button", {
|
|
7127
7148
|
type: "button",
|
|
7128
|
-
class:
|
|
7149
|
+
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 }]),
|
|
7129
7150
|
disabled: e.isSending,
|
|
7130
7151
|
onClick: s
|
|
7131
|
-
},
|
|
7152
|
+
}, D(j(i).testEmail.cancel), 11, Ju), I("button", {
|
|
7132
7153
|
type: "button",
|
|
7133
7154
|
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)]",
|
|
7134
7155
|
disabled: !a.value || e.isSending,
|
|
7135
7156
|
onClick: o
|
|
7136
|
-
}, [e.isSending ? (f(),
|
|
7157
|
+
}, [e.isSending ? (f(), k("span", Xu, [V(j(li), {
|
|
7137
7158
|
class: "tpl:animate-spin",
|
|
7138
7159
|
size: 12,
|
|
7139
7160
|
"stroke-width": 2
|
|
7140
|
-
}), z(" " +
|
|
7141
|
-
], 8,
|
|
7161
|
+
}), z(" " + D(j(i).testEmail.sending), 1)])) : (f(), k("span", Zu, D(j(i).testEmail.send), 1))], 8, Yu)])
|
|
7162
|
+
], 8, zu)]),
|
|
7142
7163
|
_: 1
|
|
7143
7164
|
}, 8, ["visible"]));
|
|
7144
7165
|
}
|
|
7145
|
-
}),
|
|
7166
|
+
}), $u = /* @__PURE__ */ e({ default: () => ed }), ed = Qu;
|
|
7146
7167
|
//#endregion
|
|
7147
|
-
export {
|
|
7168
|
+
export { Wi as $, cr as $t, Ro as A, _e as An, Wr as At, Va as B, de as Bn, Un as Bt, Yo as C, st as Cn, ei as Ct, Uo as D, Ee as Dn, Yr as Dt, Ho as E, ve as En, Zr as Et, so as F, Se as Fn, Y as Ft, ha as G, Wn as Gt, za as H, ue as Hn, ur as Ht, lo as I, Te as In, or as It, sa as J, Fn as Jt, ma as K, Gn as Kt, oo as L, he as Ln, $n as Lt, Eo as M, ge as Mn, Mr as Mt, bo as N, me as Nn, xr as Nt, Vo as O, ye as On, qr as Ot, _o as P, xe as Pn, mr as Pt, Gi as Q, Zn as Qt, no as R, be as Rn, ar as Rt, Xo as S, ct as Sn, ti as St, Z as T, W as Tn, Qr as Tt, Aa as U, sr as Ut, Ba as V, fe as Vn, er as Vt, Ea as W, Rn as Wt, Xi as X, Xn as Xt, Qi as Y, zn as Yt, Ki as Z, qn as Zt, ss as _, lt as _n, ui as _t, ul as a, mn as an, Oi as at, rs as b, ht as bn, si as bt, ws as c, q as cn, Ci as ct, _s as d, tn as dn, yi as dt, lr as en, Hi as et, gs as f, en as fn, vi as ft, fs as g, wt as gn, di as gt, ps as h, Nt as hn, fi as ht, zl as i, J as in, Mi as it, Io as j, we as jn, X as jt, zo as k, Ce as kn, Gr as kt, ys as l, kn as ln, Si as lt, ms as m, on as mn, hi as mt, Lu as n, Bn as nn, Bi as nt, Xs as o, Sn as on, Ei as ot, hs as p, an as pn, _i as pt, la as q, Qn as qt, eu as r, Vn as rn, Ni as rt, Ts as s, Cn as sn, wi as st, $u as t, nr as tn, Ui as tt, vs as u, En as un, xi as ut, os as v, _t as vn, li as vt, $ as w, ot as wn, $r as wt, $o as x, vt as xn, oi as xt, is as y, yt as yn, ci as yt, eo as z, pe as zn, Hn as zt };
|
|
7148
7169
|
|
|
7149
|
-
//# sourceMappingURL=features-
|
|
7170
|
+
//# sourceMappingURL=features-CwZTdcbt.js.map
|