@templatical/editor 0.16.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-B-k_Sdas.js → AiChatSidebar-EaPCeDXr.js} +14 -14
- package/dist/{AiFeatureMenu-B5_IKOlI.js → AiFeatureMenu-Rb8G3EBo.js} +7 -7
- package/dist/{BlockIssueBadge-B3xVgMTh.js → BlockIssueBadge-CZYgn-qg.js} +5 -5
- package/dist/{CloudEditor-BUJk4vXS.js → CloudEditor-D88gLBXp.js} +24 -24
- package/dist/{CollaboratorBar-BAUQfXUk.js → CollaboratorBar-dxCD8jSi.js} +4 -4
- package/dist/ColorPicker-CAgMCX3A.js +442 -0
- package/dist/{CommentsSidebar-D_tSGvTX.js → CommentsSidebar-DDKiFsSq.js} +13 -13
- package/dist/{CountdownBlock-apiYUhkQ.js → CountdownBlock-173fiO5Z.js} +3 -3
- package/dist/{CountdownToolbar-CS0axcjz.js → CountdownToolbar-8XVTOuGX.js} +4 -4
- package/dist/{DesignReferenceSidebar-BYQcuaL4.js → DesignReferenceSidebar-D6TfC176.js} +11 -11
- package/dist/{IssuesPanel-CR1MPaDE.js → IssuesPanel-CQQipLQP.js} +8 -8
- package/dist/{LoadingTrack-DsecR8Rw.js → LoadingTrack-KIcREPlS.js} +1 -1
- package/dist/{MergeTagSuggestion-DLVykS0K.js → MergeTagSuggestion-DrT3LiZ4.js} +4 -4
- package/dist/{ModuleBrowserModal-BzDuagt5.js → ModuleBrowserModal-l4_RCC8m.js} +11 -11
- package/dist/{ModulePreviewCanvas-CK11BX4i.js → ModulePreviewCanvas-BqYAr4fz.js} +3 -3
- package/dist/NumberWithSuffix-Di-cDy_m.js +89 -0
- package/dist/{ParagraphEditor-fg9Ljy_Z.js → ParagraphEditor-DIQ1jmSP.js} +230 -195
- package/dist/{RichTextEditorContent-BqLHIZY7.js → RichTextEditorContent-DkTJ6KK8.js} +56 -45
- package/dist/{SaveModuleDialog-D27ufH5q.js → SaveModuleDialog-DPo3Raon.js} +8 -8
- package/dist/{SnapshotHistory-Cymqkk9_.js → SnapshotHistory-m7brKV7C.js} +10 -10
- package/dist/{TemplateScoringPanel-CZ62rGHz.js → TemplateScoringPanel-C8VOC6gn.js} +15 -15
- package/dist/{TestEmailModal-BIvdHidU.js → TestEmailModal-BE9sFEIl.js} +6 -6
- package/dist/{TitleEditor-D0a4NdOn.js → TitleEditor-BATN-k-Q.js} +38 -35
- package/dist/{TplModal-dYXt3vyd.js → TplModal-DHBcZ1gq.js} +5 -5
- package/dist/{blockTypeIcons-JSBvsa0M.js → blockTypeIcons-wRchKKx0.js} +7 -7
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-C58VqAgo.js → ca-B3eR47lE.js} +2 -1
- package/dist/cdn/chunks/{AiFeatureMenu-B6V5CzCc.js → AiFeatureMenu-W7VQFAwq.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-B6V5CzCc.js.map → AiFeatureMenu-W7VQFAwq.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-C6Xpl1KK.js → BlockIssueBadge-ww2vNIfJ.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-C6Xpl1KK.js.map → BlockIssueBadge-ww2vNIfJ.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-C-npgK-l.js → CloudEditor-BVSJ1kvB.js} +161 -161
- package/dist/cdn/chunks/{CloudEditor-C-npgK-l.js.map → CloudEditor-BVSJ1kvB.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-BSKXgw9D.js → CollaboratorBar-BFrAua9a.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-BSKXgw9D.js.map → CollaboratorBar-BFrAua9a.js.map} +1 -1
- package/dist/cdn/chunks/ColorPicker-DmxMDn-t.js +439 -0
- package/dist/cdn/chunks/ColorPicker-DmxMDn-t.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-Y-nycxv2.js → CountdownBlock-MC-mhtQD.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-Y-nycxv2.js.map → CountdownBlock-MC-mhtQD.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-9LqnhGyh.js → CountdownToolbar-dXyr7tz-.js} +5 -5
- package/dist/cdn/chunks/{CountdownToolbar-9LqnhGyh.js.map → CountdownToolbar-dXyr7tz-.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-BYfGf1rC.js → IssuesPanel-CTxSgViL.js} +8 -8
- package/dist/cdn/chunks/{IssuesPanel-BYfGf1rC.js.map → IssuesPanel-CTxSgViL.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-DQzKlLH7.js → MergeTagSuggestion-jesxS7An.js} +3 -3
- package/dist/cdn/chunks/{MergeTagSuggestion-DQzKlLH7.js.map → MergeTagSuggestion-jesxS7An.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-EzKgW5TG.js → ModuleBrowserModal-B5sCsrud.js} +9 -9
- package/dist/cdn/chunks/{ModuleBrowserModal-EzKgW5TG.js.map → ModuleBrowserModal-B5sCsrud.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-DxbSzXm8.js → ModulePreviewCanvas-DGTGo8kg.js} +11 -11
- package/dist/cdn/chunks/{ModulePreviewCanvas-DxbSzXm8.js.map → ModulePreviewCanvas-DGTGo8kg.js.map} +1 -1
- package/dist/cdn/chunks/NumberWithSuffix-tAHfui6k.js +91 -0
- package/dist/cdn/chunks/NumberWithSuffix-tAHfui6k.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-CJNgRMhw.js → ParagraphEditor-CB5FGRs3.js} +213 -179
- package/dist/cdn/chunks/ParagraphEditor-CB5FGRs3.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-Cebdzomd.js → RichTextEditorContent-CPelbtck.js} +53 -42
- package/dist/cdn/chunks/RichTextEditorContent-CPelbtck.js.map +1 -0
- package/dist/cdn/chunks/{SaveModuleDialog-Cufwqoln.js → SaveModuleDialog-7f9uUUEC.js} +6 -6
- package/dist/cdn/chunks/{SaveModuleDialog-Cufwqoln.js.map → SaveModuleDialog-7f9uUUEC.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-7BhmKL-_.js → TitleEditor-C0mYpgs4.js} +46 -43
- package/dist/cdn/chunks/TitleEditor-C0mYpgs4.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-d4Sb61H-.js → blockTypeIcons-BtxaUtlx.js} +5 -5
- package/dist/cdn/chunks/{blockTypeIcons-d4Sb61H-.js.map → blockTypeIcons-BtxaUtlx.js.map} +1 -1
- package/dist/cdn/chunks/{ca-C58VqAgo.js → ca-B3eR47lE.js} +3 -2
- package/dist/cdn/chunks/ca-B3eR47lE.js.map +1 -0
- package/dist/cdn/chunks/{de-C0sMmfic.js → de-Cy8FB-Ii.js} +3 -2
- package/dist/cdn/chunks/de-Cy8FB-Ii.js.map +1 -0
- package/dist/cdn/chunks/{draggable-kG-D5Xsm.js → draggable-D840DIZB.js} +52 -39
- package/dist/cdn/chunks/draggable-D840DIZB.js.map +1 -0
- package/dist/cdn/chunks/{en-CsGBTBOf.js → en-Bu-zS_5o.js} +3 -2
- package/dist/cdn/chunks/en-Bu-zS_5o.js.map +1 -0
- package/dist/cdn/chunks/{es-DgjbcPIu.js → es-CD3ZD6hK.js} +3 -2
- package/dist/cdn/chunks/es-CD3ZD6hK.js.map +1 -0
- package/dist/cdn/chunks/{extensions-BeAsz_mp.js → extensions-BJ7vaBol.js} +28 -28
- package/dist/cdn/chunks/{extensions-BeAsz_mp.js.map → extensions-BJ7vaBol.js.map} +1 -1
- package/dist/cdn/chunks/{features-DO71hPJr.js → features-CgbSSCgv.js} +589 -553
- package/dist/cdn/chunks/features-CgbSSCgv.js.map +1 -0
- package/dist/cdn/chunks/{icons-BfP1cRNb.js → icons-Dlx5MT1V.js} +2 -2
- package/dist/cdn/chunks/{icons-BfP1cRNb.js.map → icons-Dlx5MT1V.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-0S3e0i8G.js → media-library-BMlykZGq.js} +104 -104
- package/dist/cdn/chunks/{media-library-0S3e0i8G.js.map → media-library-BMlykZGq.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-DXaP5lMJ.js → pt-BR-CgICL-CQ.js} +3 -2
- package/dist/cdn/chunks/pt-BR-CgICL-CQ.js.map +1 -0
- package/dist/cdn/chunks/quality-DsVgXk_j.js +2180 -0
- package/dist/cdn/chunks/{quality-B6V4R_df.js.map → quality-DsVgXk_j.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-Dhn1J4H4.js → renderer-DPvEtVGO.js} +17 -17
- package/dist/cdn/chunks/{renderer-Dhn1J4H4.js.map → renderer-DPvEtVGO.js.map} +1 -1
- package/dist/cdn/chunks/{src-DoKjbqU2.js → src-CAdirukY.js} +5 -5
- package/dist/cdn/chunks/{src-DoKjbqU2.js.map → src-CAdirukY.js.map} +1 -1
- package/dist/cdn/chunks/{styles-CSqligXJ.js → styles-D7u4vCpH.js} +820 -820
- package/dist/cdn/chunks/{styles-CSqligXJ.js.map → styles-D7u4vCpH.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-DVHUKGZf.js → tiptap-zpXk5mN4.js} +1131 -1134
- package/dist/cdn/chunks/{tiptap-DVHUKGZf.js.map → tiptap-zpXk5mN4.js.map} +1 -1
- package/dist/cdn/editor.js +74 -74
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-rl7ok6uJ.js → check-D1zYtCPK.js} +1 -1
- package/dist/{chevron-down-BKe__NOD.js → chevron-down-ByXpufZD.js} +1 -1
- package/dist/{circle-alert-C8xmpMsK.js → circle-alert-CjcAORUw.js} +1 -1
- package/dist/{clock-BW4JuDCN.js → clock-5lWLadUn.js} +1 -1
- package/dist/{cloud-CFpaFRCV.js → cloud-BogxOeZu.js} +1 -1
- package/dist/{createLucideIcon-Dx-EjR9r.js → createLucideIcon-Bh9xOmlW.js} +3 -3
- package/dist/{de-C0sMmfic.js → de-Cy8FB-Ii.js} +2 -1
- package/dist/dist-BE9m_i60.js +5 -0
- package/dist/{dist-C5-0GG3g.js → dist-BPPeDw62.js} +2 -2
- package/dist/{dist-DEcNpSJi.js → dist-BReUTadj.js} +4 -4
- package/dist/dist-BXR1aBJV.js +5 -0
- package/dist/{dist-r_2rJCMg.js → dist-Bm07Z3Es.js} +2 -2
- package/dist/{dist-BEWiuOMi.js → dist-CFOQvhSC.js} +3 -3
- package/dist/{dist-Ci5GHd96.js → dist-CHLoeloJ.js} +2 -2
- package/dist/{dist-0VHbLR6h.js → dist-D1WmF8BF.js} +2 -2
- package/dist/{dist-DrlHbc8g.js → dist-D9g4CSnm.js} +1 -1
- package/dist/{dist-Drm7i-yw.js → dist-DGEaAAIb.js} +2 -2
- package/dist/{dist-CTT6WYJ6.js → dist-DYv_Pttj.js} +2 -2
- package/dist/{dist-Dsoq4knU.js → dist-DcKlLQ8d.js} +2 -2
- package/dist/{dist-D_-AsMP4.js → dist-DhY2di4U.js} +2 -2
- package/dist/{dist-FVawx7ou.js → dist-i_Z7t67A.js} +260 -263
- package/dist/{en-CsGBTBOf.js → en-Bu-zS_5o.js} +2 -1
- package/dist/{es-DgjbcPIu.js → es-CD3ZD6hK.js} +2 -1
- package/dist/{extensions-3jhgwhV-.js → extensions-B2poxDIo.js} +7 -7
- package/dist/{image-up-BwBCmQ4P.js → image-up-Bj_nes3f.js} +1 -1
- package/dist/{info-TCn7uWR5.js → info-BhSQCxBV.js} +1 -1
- package/dist/{keys-Cv8-8GsD.js → keys-BbDgCU6K.js} +1 -1
- package/dist/{list-checks-CSrOWNgq.js → list-checks-CgxyUg7i.js} +1 -1
- package/dist/{loader-circle-BLmicnPG.js → loader-circle-DFU0HPAa.js} +1 -1
- package/dist/{message-circle-C9hHMQCI.js → message-circle-BEBsCHnk.js} +1 -1
- package/dist/{pt-BR-DXaP5lMJ.js → pt-BR-CgICL-CQ.js} +2 -1
- package/dist/{refresh-cw-D1JQ1LNa.js → refresh-cw--lvWGy0_.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-BzuoCyNp.js → runtime-dom.esm-bundler-GdMI8WqG.js} +6 -7
- package/dist/{scan-line-DgijVq9y.js → scan-line-QgyDIgn_.js} +1 -1
- package/dist/{send-DjPdq69F.js → send-BMyisUim.js} +1 -1
- package/dist/{shield-check-Bqluu8FS.js → shield-check-C49M20le.js} +1 -1
- package/dist/{sparkles-M4azPVSP.js → sparkles-DV7Dman6.js} +1 -1
- package/dist/{styles-5sGbDIA2.js → styles-B-yhoJnH.js} +78 -78
- package/dist/templatical-editor.js +61 -61
- package/dist/{text-align-start-CMya5pCQ.js → text-align-start-BMU70uAm.js} +1 -1
- package/dist/{trash-2-C-81rkLS.js → trash-2-B6M659Ey.js} +1 -1
- package/dist/{triangle-alert-BuRWnynk.js → triangle-alert-D1lzx6ds.js} +1 -1
- package/dist/{upload-CWBIoLd4.js → upload-3A1oZtOR.js} +1 -1
- package/dist/{useAliveFlag-CECL_OUb.js → useAliveFlag-C43EhZFY.js} +1 -1
- package/dist/{useCloudI18n-AKCy98qD.js → useCloudI18n-WbfVWq5k.js} +2 -2
- package/dist/{useEditorCore-AQ0BN1ug.js → useEditorCore-CV1ct_17.js} +616 -580
- package/dist/{useI18n-C-TDeJBt.js → useI18n-eR1yVW0v.js} +2 -2
- package/dist/{useMergeTag-D0aZw7Q5.js → useMergeTag-C3GfSktg.js} +2 -2
- package/dist/usePopoverRoot-C1j0D7cc.js +8 -0
- package/dist/{vue.runtime.esm-bundler-l0XAqiyv.js → vue.runtime.esm-bundler-B0xoGkDv.js} +84 -70
- package/dist/{x-CQSvXnGR.js → x-CG_NV3nP.js} +1 -1
- package/package.json +22 -22
- package/dist/NumberWithSuffix-CrA6quxx.js +0 -445
- package/dist/cdn/chunks/NumberWithSuffix-Conp_Pki.js +0 -444
- package/dist/cdn/chunks/NumberWithSuffix-Conp_Pki.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-CJNgRMhw.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-Cebdzomd.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-7BhmKL-_.js.map +0 -1
- package/dist/cdn/chunks/ca-C58VqAgo.js.map +0 -1
- package/dist/cdn/chunks/de-C0sMmfic.js.map +0 -1
- package/dist/cdn/chunks/draggable-kG-D5Xsm.js.map +0 -1
- package/dist/cdn/chunks/en-CsGBTBOf.js.map +0 -1
- package/dist/cdn/chunks/es-DgjbcPIu.js.map +0 -1
- package/dist/cdn/chunks/features-DO71hPJr.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-DXaP5lMJ.js.map +0 -1
- package/dist/cdn/chunks/quality-B6V4R_df.js +0 -2180
- package/dist/cdn/chunks/styleConstants-lGobwiLH.js +0 -57
- package/dist/cdn/chunks/styleConstants-lGobwiLH.js.map +0 -1
- package/dist/dist-DR-6IpV6.js +0 -5
- package/dist/dist-DW8b0TO6.js +0 -5
- package/dist/styleConstants-lGobwiLH.js +0 -55
- package/dist/usePopoverRoot-DKUDnr55.js +0 -8
|
@@ -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-D840DIZB.js";
|
|
3
3
|
//#region src/constants/timeouts.ts
|
|
4
4
|
var ue = 3e4, de = 4e3, fe = 5e3, pe = {
|
|
5
5
|
1: 36,
|
|
@@ -827,7 +827,7 @@ function Ft(e) {
|
|
|
827
827
|
o = null, c() && !s && n() && r(JSON.parse(JSON.stringify(t.value)));
|
|
828
828
|
}, i));
|
|
829
829
|
}
|
|
830
|
-
let m =
|
|
830
|
+
let m = ee(t, () => {
|
|
831
831
|
c() && !s && n() && p();
|
|
832
832
|
}, { deep: !0 });
|
|
833
833
|
function h() {
|
|
@@ -910,7 +910,7 @@ function Rt(e, t) {
|
|
|
910
910
|
};
|
|
911
911
|
}
|
|
912
912
|
//#endregion
|
|
913
|
-
//#region ../../node_modules/.pnpm/@vueuse+shared@14.3.0_vue@3.5.
|
|
913
|
+
//#region ../../node_modules/.pnpm/@vueuse+shared@14.3.0_vue@3.5.40_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
|
|
914
914
|
function zt(e, t) {
|
|
915
915
|
return s() ? (l(e, t), !0) : !1;
|
|
916
916
|
}
|
|
@@ -1069,7 +1069,7 @@ function pn(e, t, n) {
|
|
|
1069
1069
|
});
|
|
1070
1070
|
}
|
|
1071
1071
|
//#endregion
|
|
1072
|
-
//#region ../../node_modules/.pnpm/@vueuse+core@14.3.0_vue@3.5.
|
|
1072
|
+
//#region ../../node_modules/.pnpm/@vueuse+core@14.3.0_vue@3.5.40_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
|
|
1073
1073
|
var mn = Ut ? window : void 0, hn = Ut ? window.document : void 0, gn = Ut ? window.navigator : void 0;
|
|
1074
1074
|
function K(e) {
|
|
1075
1075
|
let t = P(e);
|
|
@@ -1564,7 +1564,7 @@ function Cr(e) {
|
|
|
1564
1564
|
o || l();
|
|
1565
1565
|
async function l() {
|
|
1566
1566
|
try {
|
|
1567
|
-
let t = await import("./quality-
|
|
1567
|
+
let t = await import("./quality-DsVgXk_j.js").then((e) => e.t);
|
|
1568
1568
|
if (c) return;
|
|
1569
1569
|
a.value = { lintTemplate: t.lintTemplate }, r.value = !0, u(), s = fn(e.content, u, {
|
|
1570
1570
|
debounce: e.debounce ?? 500,
|
|
@@ -2048,7 +2048,7 @@ function Qr() {
|
|
|
2048
2048
|
return v(Zr, {});
|
|
2049
2049
|
}
|
|
2050
2050
|
//#endregion
|
|
2051
|
-
//#region ../../node_modules/.pnpm/@lucide+vue@1.24.0_vue@3.5.
|
|
2051
|
+
//#region ../../node_modules/.pnpm/@lucide+vue@1.24.0_vue@3.5.40_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/Icon.mjs
|
|
2052
2052
|
var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absolute-stroke-width": i, strokeWidth: o, "stroke-width": s, size: c, color: l, ...u }, { slots: d }) => {
|
|
2053
2053
|
let { size: f, color: p, strokeWidth: m = 2, absoluteStrokeWidth: h = !1, class: g = "" } = Qr(), _ = O(() => {
|
|
2054
2054
|
let e = Gr(r) || Gr(i) || r === !0 || i === !0 || h === !0, t = o || s || m || Xr["stroke-width"];
|
|
@@ -2929,22 +2929,53 @@ function fa(e, t, n) {
|
|
|
2929
2929
|
e.chain().focus().insertContentAt(a, [r, i]).setTextSelection(a + 1).run();
|
|
2930
2930
|
}
|
|
2931
2931
|
//#endregion
|
|
2932
|
-
//#region src/
|
|
2932
|
+
//#region src/utils/linkColorExtension.ts
|
|
2933
2933
|
function pa(e) {
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2934
|
+
if (!e) return null;
|
|
2935
|
+
let t = e.trim();
|
|
2936
|
+
return /^#[0-9a-f]{3,8}$/i.test(t) || /^(rgb|rgba|hsl|hsla)\(\s*[0-9.,%/\s]+\)$/i.test(t) || /^[a-z]+$/i.test(t) ? t : null;
|
|
2937
|
+
}
|
|
2938
|
+
function ma(e) {
|
|
2939
|
+
let t = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i.exec(e.trim());
|
|
2940
|
+
if (!t) return e;
|
|
2941
|
+
let n = (e) => Number(e).toString(16).padStart(2, "0");
|
|
2942
|
+
return `#${n(t[1])}${n(t[2])}${n(t[3])}`;
|
|
2943
|
+
}
|
|
2944
|
+
function ha(e) {
|
|
2945
|
+
return e.extend({ addAttributes() {
|
|
2946
|
+
return {
|
|
2947
|
+
...this.parent?.(),
|
|
2948
|
+
color: {
|
|
2949
|
+
default: null,
|
|
2950
|
+
parseHTML: (e) => pa(ma(e.style.color)),
|
|
2951
|
+
renderHTML: (e) => {
|
|
2952
|
+
let t = pa(e.color);
|
|
2953
|
+
return t ? { style: `color: ${t}` } : {};
|
|
2954
|
+
}
|
|
2955
|
+
}
|
|
2956
|
+
};
|
|
2957
|
+
} });
|
|
2958
|
+
}
|
|
2959
|
+
//#endregion
|
|
2960
|
+
//#region src/composables/useRichTextLinkDialog.ts
|
|
2961
|
+
function ga(e) {
|
|
2962
|
+
let t = C(!1), n = C(""), r = C(""), i = C(null);
|
|
2963
|
+
Qi(i, t);
|
|
2940
2964
|
function a() {
|
|
2965
|
+
let i = e.value?.getAttributes("link") ?? {};
|
|
2966
|
+
n.value = i.href || "", r.value = i.color || "", t.value = !0;
|
|
2967
|
+
}
|
|
2968
|
+
function o() {
|
|
2941
2969
|
if (n.value) {
|
|
2942
|
-
let t =
|
|
2943
|
-
t !== null
|
|
2970
|
+
let t = c(n.value);
|
|
2971
|
+
if (t !== null) {
|
|
2972
|
+
let n = pa(r.value), i = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
2973
|
+
n && typeof e.value?.commands.unsetColor == "function" && i?.unsetColor(), i?.run();
|
|
2974
|
+
}
|
|
2944
2975
|
}
|
|
2945
|
-
|
|
2976
|
+
u();
|
|
2946
2977
|
}
|
|
2947
|
-
let
|
|
2978
|
+
let s = /* @__PURE__ */ new Set([
|
|
2948
2979
|
"http",
|
|
2949
2980
|
"https",
|
|
2950
2981
|
"mailto",
|
|
@@ -2955,39 +2986,40 @@ function pa(e) {
|
|
|
2955
2986
|
"xmpp",
|
|
2956
2987
|
"cid"
|
|
2957
2988
|
]);
|
|
2958
|
-
function
|
|
2989
|
+
function c(e) {
|
|
2959
2990
|
let t = e.trim();
|
|
2960
2991
|
if (!t) return null;
|
|
2961
2992
|
if (t.startsWith("#")) return t;
|
|
2962
2993
|
let n = /^([a-z][a-z0-9+.-]*):/i.exec(t);
|
|
2963
|
-
return n ?
|
|
2964
|
-
}
|
|
2965
|
-
function c() {
|
|
2966
|
-
e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), l();
|
|
2994
|
+
return n ? s.has(n[1].toLowerCase()) ? t : null : `https://${t}`;
|
|
2967
2995
|
}
|
|
2968
2996
|
function l() {
|
|
2969
|
-
|
|
2997
|
+
e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), u();
|
|
2970
2998
|
}
|
|
2971
|
-
function u(
|
|
2972
|
-
|
|
2999
|
+
function u() {
|
|
3000
|
+
t.value = !1, n.value = "", r.value = "";
|
|
3001
|
+
}
|
|
3002
|
+
function d(e) {
|
|
3003
|
+
e.key === "Enter" ? (e.preventDefault(), o()) : e.key === "Escape" && u();
|
|
2973
3004
|
}
|
|
2974
3005
|
return {
|
|
2975
3006
|
showLinkDialog: t,
|
|
2976
3007
|
linkUrl: n,
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
3008
|
+
linkColor: r,
|
|
3009
|
+
linkDialogRef: i,
|
|
3010
|
+
openLinkDialog: a,
|
|
3011
|
+
insertLink: o,
|
|
3012
|
+
removeLink: l,
|
|
3013
|
+
closeLinkDialog: u,
|
|
3014
|
+
handleLinkKeydown: d
|
|
2983
3015
|
};
|
|
2984
3016
|
}
|
|
2985
3017
|
//#endregion
|
|
2986
3018
|
//#region src/composables/useRichTextEditor.ts
|
|
2987
|
-
function
|
|
2988
|
-
let t = v(zn, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } = na(), { canInsertLogicTag: l, isRequesting: d, requestLogicTag: f } = la(), p = v(Rn, null), m = (u(p) ? p.value : p)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", h = mt(s), g = n(null), { showLinkDialog: _, linkUrl: y,
|
|
2989
|
-
async function
|
|
2990
|
-
|
|
3019
|
+
function _a(e) {
|
|
3020
|
+
let t = v(zn, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } = na(), { canInsertLogicTag: l, isRequesting: d, requestLogicTag: f } = la(), p = v(Rn, null), m = (u(p) ? p.value : p)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", h = mt(s), g = n(null), { showLinkDialog: _, linkUrl: y, linkColor: b, linkDialogRef: x, openLinkDialog: S, insertLink: w, removeLink: ee, closeLinkDialog: T, handleLinkKeydown: E } = ga(g), { start: D, stop: te } = un(() => g.value?.commands.focus("end"), 0, { immediate: !1 }), ne = n(null), O = C(!0), k = C(null), A = !1;
|
|
3021
|
+
async function j() {
|
|
3022
|
+
k.value = null, O.value = !0;
|
|
2991
3023
|
try {
|
|
2992
3024
|
let { TiptapEditor: n, EC: i, extensions: a } = await e.loadExtensions({
|
|
2993
3025
|
mergeTags: r,
|
|
@@ -2996,8 +3028,8 @@ function ma(e) {
|
|
|
2996
3028
|
autocompleteEnabled: c,
|
|
2997
3029
|
suggestionEmptyText: m
|
|
2998
3030
|
});
|
|
2999
|
-
if (
|
|
3000
|
-
|
|
3031
|
+
if (A) return;
|
|
3032
|
+
ne.value = i;
|
|
3001
3033
|
let o = /* @__PURE__ */ new Map();
|
|
3002
3034
|
a.forEach((e, t) => o.set(e.name, t));
|
|
3003
3035
|
let l = new n({
|
|
@@ -3005,74 +3037,78 @@ function ma(e) {
|
|
|
3005
3037
|
content: e.blockContent(),
|
|
3006
3038
|
editable: !0,
|
|
3007
3039
|
onUpdate: ({ editor: n }) => {
|
|
3008
|
-
|
|
3040
|
+
A || t && t.updateBlock(e.blockId(), { content: n.getHTML() });
|
|
3009
3041
|
}
|
|
3010
3042
|
});
|
|
3011
|
-
if (
|
|
3043
|
+
if (A) {
|
|
3012
3044
|
l.destroy();
|
|
3013
3045
|
return;
|
|
3014
3046
|
}
|
|
3015
|
-
g.value = l,
|
|
3047
|
+
g.value = l, O.value = !1, D();
|
|
3016
3048
|
} catch (t) {
|
|
3017
|
-
if (
|
|
3018
|
-
jr.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t),
|
|
3049
|
+
if (A) return;
|
|
3050
|
+
jr.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), k.value = t instanceof Error ? t.message : "Failed to load editor", O.value = !1;
|
|
3019
3051
|
}
|
|
3020
3052
|
}
|
|
3021
|
-
function
|
|
3022
|
-
g.value?.destroy(), g.value = null,
|
|
3053
|
+
function M() {
|
|
3054
|
+
g.value?.destroy(), g.value = null, j();
|
|
3023
3055
|
}
|
|
3024
|
-
|
|
3025
|
-
let
|
|
3056
|
+
j();
|
|
3057
|
+
let N = H(() => e.blockContent(), (e) => {
|
|
3026
3058
|
g.value && g.value.getHTML() !== e && g.value.commands.setContent(e, { emitUpdate: !1 });
|
|
3027
3059
|
});
|
|
3028
|
-
function
|
|
3060
|
+
function ie(t) {
|
|
3029
3061
|
if (a.value || d.value) return;
|
|
3030
|
-
let n = t.composedPath().find((e) => e instanceof HTMLElement);
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3062
|
+
let n = t.composedPath(), r = n.find((e) => e instanceof HTMLElement);
|
|
3063
|
+
if (!r) return;
|
|
3064
|
+
e.onClickOutsideSideEffect?.(r);
|
|
3065
|
+
let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
3066
|
+
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || e.onDone();
|
|
3067
|
+
}
|
|
3068
|
+
q(document, "mousedown", ie), re(() => {
|
|
3069
|
+
A = !0, N(), te(), g.value?.destroy();
|
|
3035
3070
|
});
|
|
3036
|
-
async function
|
|
3071
|
+
async function P() {
|
|
3037
3072
|
let e = await o();
|
|
3038
|
-
|
|
3073
|
+
A || (e && g.value ? g.value.chain().focus().insertMergeTag({
|
|
3039
3074
|
label: e.label,
|
|
3040
3075
|
value: e.value
|
|
3041
3076
|
}).run() : g.value?.commands.focus());
|
|
3042
3077
|
}
|
|
3043
|
-
async function
|
|
3078
|
+
async function ae() {
|
|
3044
3079
|
let e = await f();
|
|
3045
|
-
|
|
3080
|
+
A || (e && g.value ? fa(g.value, e, s) : g.value?.commands.focus());
|
|
3046
3081
|
}
|
|
3047
3082
|
return {
|
|
3048
3083
|
editor: g,
|
|
3049
|
-
EditorContent:
|
|
3050
|
-
isLoading:
|
|
3051
|
-
initError:
|
|
3052
|
-
retry:
|
|
3084
|
+
EditorContent: ne,
|
|
3085
|
+
isLoading: O,
|
|
3086
|
+
initError: k,
|
|
3087
|
+
retry: M,
|
|
3053
3088
|
showLinkDialog: _,
|
|
3054
3089
|
linkUrl: y,
|
|
3055
|
-
|
|
3090
|
+
linkColor: b,
|
|
3091
|
+
linkDialogRef: x,
|
|
3056
3092
|
mergeTags: r,
|
|
3057
3093
|
canRequestMergeTag: i,
|
|
3058
3094
|
isRequestingMergeTag: a,
|
|
3059
3095
|
syntax: s,
|
|
3060
3096
|
canInsertLogicTag: l,
|
|
3061
3097
|
isRequestingLogicTag: d,
|
|
3062
|
-
openLinkDialog:
|
|
3063
|
-
insertLink:
|
|
3064
|
-
removeLink:
|
|
3098
|
+
openLinkDialog: S,
|
|
3099
|
+
insertLink: w,
|
|
3100
|
+
removeLink: ee,
|
|
3065
3101
|
closeLinkDialog: T,
|
|
3066
3102
|
handleLinkKeydown: E,
|
|
3067
|
-
handleAddMergeTag:
|
|
3068
|
-
handleAddLogicTag:
|
|
3103
|
+
handleAddMergeTag: P,
|
|
3104
|
+
handleAddLogicTag: ae
|
|
3069
3105
|
};
|
|
3070
3106
|
}
|
|
3071
3107
|
//#endregion
|
|
3072
3108
|
//#region src/composables/useSmallScreenNotice.ts
|
|
3073
|
-
var
|
|
3074
|
-
function
|
|
3075
|
-
let t = wn(
|
|
3109
|
+
var va = "(max-width: 767px)";
|
|
3110
|
+
function ya(e) {
|
|
3111
|
+
let t = wn(va);
|
|
3076
3112
|
return {
|
|
3077
3113
|
isSmallScreen: t,
|
|
3078
3114
|
showNotice: O(() => (P(e) ?? !0) && t.value)
|
|
@@ -3080,20 +3116,20 @@ function ga(e) {
|
|
|
3080
3116
|
}
|
|
3081
3117
|
//#endregion
|
|
3082
3118
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3083
|
-
var
|
|
3119
|
+
var ba = { class: "tpl:w-full" }, xa = {
|
|
3084
3120
|
key: 0,
|
|
3085
3121
|
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)]"
|
|
3086
|
-
},
|
|
3122
|
+
}, Sa = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ca = {
|
|
3087
3123
|
key: 1,
|
|
3088
3124
|
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)]"
|
|
3089
|
-
},
|
|
3125
|
+
}, wa = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ta = {
|
|
3090
3126
|
key: 2,
|
|
3091
3127
|
class: "tpl:relative"
|
|
3092
|
-
},
|
|
3128
|
+
}, Ea = ["innerHTML"], Da = {
|
|
3093
3129
|
key: 0,
|
|
3094
3130
|
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]",
|
|
3095
3131
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
3096
|
-
},
|
|
3132
|
+
}, Oa = /* @__PURE__ */ B({
|
|
3097
3133
|
__name: "CustomBlock",
|
|
3098
3134
|
props: {
|
|
3099
3135
|
block: {},
|
|
@@ -3127,10 +3163,10 @@ var _a = { class: "tpl:w-full" }, va = {
|
|
|
3127
3163
|
g();
|
|
3128
3164
|
}), H(() => n.block.fieldValues, () => {
|
|
3129
3165
|
_();
|
|
3130
|
-
}, { deep: !0 }), (e, t) => (f(), k("div",
|
|
3166
|
+
}, { deep: !0 }), (e, t) => (f(), k("div", ba, [u.value ? c.value ? (f(), k("div", Ca, [V(j(Ii), {
|
|
3131
3167
|
size: 24,
|
|
3132
3168
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
3133
|
-
}), I("span",
|
|
3169
|
+
}), I("span", wa, D(j(a).customBlocks.renderError), 1)])) : (f(), k("div", Ta, [I("div", { innerHTML: s.value }, null, 8, Ea), j(h) && j(m) ? (f(), k("div", Da, [j(d) ? (f(), N(Yi, {
|
|
3134
3170
|
key: 1,
|
|
3135
3171
|
class: "tpl:w-48"
|
|
3136
3172
|
})) : (f(), k("button", {
|
|
@@ -3142,12 +3178,12 @@ var _a = { class: "tpl:w-full" }, va = {
|
|
|
3142
3178
|
key: 0,
|
|
3143
3179
|
icon: l.value.icon,
|
|
3144
3180
|
size: 16
|
|
3145
|
-
}, null, 8, ["icon"])) : A("", !0), z(" " + D(l.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : A("", !0)])) : (f(), k("div",
|
|
3181
|
+
}, null, 8, ["icon"])) : A("", !0), z(" " + D(l.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : A("", !0)])) : (f(), k("div", xa, [V(j(Ti), {
|
|
3146
3182
|
size: 24,
|
|
3147
3183
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
3148
|
-
}), I("span",
|
|
3184
|
+
}), I("span", Sa, D(j(a).customBlocks.definitionNotFound), 1)]))]));
|
|
3149
3185
|
}
|
|
3150
|
-
}),
|
|
3186
|
+
}), ka = { class: "tpl:w-full" }, Aa = /* @__PURE__ */ B({
|
|
3151
3187
|
__name: "DividerBlock",
|
|
3152
3188
|
props: {
|
|
3153
3189
|
block: {},
|
|
@@ -3159,18 +3195,18 @@ var _a = { class: "tpl:w-full" }, va = {
|
|
|
3159
3195
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
3160
3196
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
3161
3197
|
}));
|
|
3162
|
-
return (e, t) => (f(), k("div",
|
|
3198
|
+
return (e, t) => (f(), k("div", ka, [I("hr", {
|
|
3163
3199
|
class: "tpl:m-0 tpl:border-none",
|
|
3164
3200
|
style: L(n.value)
|
|
3165
3201
|
}, null, 4)]));
|
|
3166
3202
|
}
|
|
3167
|
-
}),
|
|
3203
|
+
}), ja = { class: "tpl:w-full" }, Ma = { 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)]" }, Na = {
|
|
3168
3204
|
key: 0,
|
|
3169
3205
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
3170
|
-
},
|
|
3206
|
+
}, Pa = {
|
|
3171
3207
|
key: 1,
|
|
3172
3208
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
3173
|
-
},
|
|
3209
|
+
}, Fa = /* @__PURE__ */ B({
|
|
3174
3210
|
__name: "HtmlBlock",
|
|
3175
3211
|
props: {
|
|
3176
3212
|
block: {},
|
|
@@ -3178,15 +3214,15 @@ var _a = { class: "tpl:w-full" }, va = {
|
|
|
3178
3214
|
},
|
|
3179
3215
|
setup(e) {
|
|
3180
3216
|
let t = e, { t: n } = Y(), r = O(() => t.block.content.trim().length > 0);
|
|
3181
|
-
return (e, t) => (f(), k("div",
|
|
3217
|
+
return (e, t) => (f(), k("div", ja, [I("div", Ma, [V(j(ui), {
|
|
3182
3218
|
size: 24,
|
|
3183
3219
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
3184
|
-
}), r.value ? (f(), k("span",
|
|
3220
|
+
}), r.value ? (f(), k("span", Na, D(j(n).html.preview), 1)) : (f(), k("span", Pa, D(j(n).html.empty), 1))])]));
|
|
3185
3221
|
}
|
|
3186
3222
|
});
|
|
3187
3223
|
//#endregion
|
|
3188
3224
|
//#region src/composables/useAliveFlag.ts
|
|
3189
|
-
function
|
|
3225
|
+
function Ia() {
|
|
3190
3226
|
let e = { alive: !0 };
|
|
3191
3227
|
return re(() => {
|
|
3192
3228
|
e.alive = !1;
|
|
@@ -3194,13 +3230,13 @@ function Na() {
|
|
|
3194
3230
|
}
|
|
3195
3231
|
//#endregion
|
|
3196
3232
|
//#region src/composables/useImageDrop.ts
|
|
3197
|
-
var
|
|
3198
|
-
function
|
|
3233
|
+
var La = "image/";
|
|
3234
|
+
function Ra(e) {
|
|
3199
3235
|
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || P(r), { isOverDropZone: a } = Dn(t, {
|
|
3200
3236
|
preventDefaultForUnhandled: !0,
|
|
3201
3237
|
onDrop: (e) => {
|
|
3202
3238
|
if (!i()) return;
|
|
3203
|
-
let t = (e ?? []).filter((e) => e.type.startsWith(
|
|
3239
|
+
let t = (e ?? []).filter((e) => e.type.startsWith(La));
|
|
3204
3240
|
t.length > 0 && n([t[0]]);
|
|
3205
3241
|
}
|
|
3206
3242
|
});
|
|
@@ -3208,17 +3244,17 @@ function Fa(e) {
|
|
|
3208
3244
|
}
|
|
3209
3245
|
//#endregion
|
|
3210
3246
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3211
|
-
var
|
|
3247
|
+
var za = {
|
|
3212
3248
|
key: 0,
|
|
3213
3249
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
|
|
3214
3250
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
3215
|
-
},
|
|
3251
|
+
}, Ba = ["href"], Va = ["src", "alt"], Ha = ["src", "alt"], Ua = {
|
|
3216
3252
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3217
3253
|
style: { opacity: "0.7" }
|
|
3218
|
-
},
|
|
3254
|
+
}, Wa = ["href"], Ga = ["src", "alt"], Ka = ["src", "alt"], qa = {
|
|
3219
3255
|
key: 4,
|
|
3220
3256
|
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)]"
|
|
3221
|
-
},
|
|
3257
|
+
}, Ja = ["aria-label"], Ya = { key: 1 }, Xa = /* @__PURE__ */ B({
|
|
3222
3258
|
__name: "ImageBlock",
|
|
3223
3259
|
props: {
|
|
3224
3260
|
block: {},
|
|
@@ -3226,7 +3262,7 @@ var Ia = {
|
|
|
3226
3262
|
},
|
|
3227
3263
|
emits: ["update"],
|
|
3228
3264
|
setup(e, { emit: t }) {
|
|
3229
|
-
let n = e, r = t, { t: i } = Y(), { syntax: a } = na(), o = v(or, null), s = O(() => !!o), c =
|
|
3265
|
+
let n = e, r = t, { t: i } = Y(), { syntax: a } = na(), o = v(or, null), s = O(() => !!o), c = Ia();
|
|
3230
3266
|
async function l() {
|
|
3231
3267
|
let e = await o?.({ accept: ["images"] });
|
|
3232
3268
|
if (c.alive && e) {
|
|
@@ -3253,7 +3289,7 @@ var Ia = {
|
|
|
3253
3289
|
}
|
|
3254
3290
|
}
|
|
3255
3291
|
}
|
|
3256
|
-
let { isOver: h } =
|
|
3292
|
+
let { isOver: h } = Ra({
|
|
3257
3293
|
target: u,
|
|
3258
3294
|
enabled: p,
|
|
3259
3295
|
onFiles: m
|
|
@@ -3273,7 +3309,7 @@ var Ia = {
|
|
|
3273
3309
|
"data-testid": "image-drop-zone",
|
|
3274
3310
|
class: "tpl:relative tpl:w-full",
|
|
3275
3311
|
style: L(g.value)
|
|
3276
|
-
}, [p.value && (j(h) || d.value) ? (f(), k("div",
|
|
3312
|
+
}, [p.value && (j(h) || d.value) ? (f(), k("div", za, [d.value ? (f(), k(R, { key: 0 }, [V(j(xi), {
|
|
3277
3313
|
class: "tpl-spinner",
|
|
3278
3314
|
size: 20,
|
|
3279
3315
|
"stroke-width": 2
|
|
@@ -3292,13 +3328,13 @@ var Ia = {
|
|
|
3292
3328
|
src: e.block.placeholderUrl,
|
|
3293
3329
|
alt: e.block.alt || j(i).image.altTextPlaceholder,
|
|
3294
3330
|
style: L(_.value)
|
|
3295
|
-
}, null, 12,
|
|
3331
|
+
}, null, 12, Va)], 8, Ba)) : (f(), k("img", {
|
|
3296
3332
|
key: 1,
|
|
3297
3333
|
class: "tpl:border-0",
|
|
3298
3334
|
src: e.block.placeholderUrl,
|
|
3299
3335
|
alt: e.block.alt,
|
|
3300
3336
|
style: L(_.value)
|
|
3301
|
-
}, null, 12,
|
|
3337
|
+
}, null, 12, Ha))], 64)) : e.block.src && y.value ? (f(), k("div", {
|
|
3302
3338
|
key: 2,
|
|
3303
3339
|
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)]",
|
|
3304
3340
|
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, _.value])
|
|
@@ -3307,7 +3343,7 @@ var Ia = {
|
|
|
3307
3343
|
"stroke-width": 1.5,
|
|
3308
3344
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3309
3345
|
style: { opacity: "0.5" }
|
|
3310
|
-
}), I("span",
|
|
3346
|
+
}), I("span", Ua, [V(Vr, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (f(), k(R, { key: 3 }, [e.block.linkUrl ? (f(), k("a", {
|
|
3311
3347
|
key: 0,
|
|
3312
3348
|
href: e.block.linkUrl,
|
|
3313
3349
|
target: "_blank",
|
|
@@ -3319,13 +3355,13 @@ var Ia = {
|
|
|
3319
3355
|
src: e.block.src,
|
|
3320
3356
|
alt: e.block.alt || j(i).image.altTextPlaceholder,
|
|
3321
3357
|
style: L(_.value)
|
|
3322
|
-
}, null, 12,
|
|
3358
|
+
}, null, 12, Ga)], 8, Wa)) : (f(), k("img", {
|
|
3323
3359
|
key: 1,
|
|
3324
3360
|
class: "tpl:border-0",
|
|
3325
3361
|
src: e.block.src,
|
|
3326
3362
|
alt: e.block.alt,
|
|
3327
3363
|
style: L(_.value)
|
|
3328
|
-
}, null, 12,
|
|
3364
|
+
}, null, 12, Ka))], 64)) : (f(), k("div", qa, [s.value ? (f(), k("button", {
|
|
3329
3365
|
key: 0,
|
|
3330
3366
|
"aria-label": j(i).image.browseMedia,
|
|
3331
3367
|
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)]",
|
|
@@ -3333,12 +3369,12 @@ var Ia = {
|
|
|
3333
3369
|
}, [V(j(yi), {
|
|
3334
3370
|
size: 14,
|
|
3335
3371
|
"stroke-width": 1.5
|
|
3336
|
-
}), z(" " + D(j(i).image.browseMedia), 1)], 8,
|
|
3372
|
+
}), z(" " + D(j(i).image.browseMedia), 1)], 8, Ja)) : (f(), k("span", Ya, D(j(i).image.clickToAdd), 1))]))], 4));
|
|
3337
3373
|
}
|
|
3338
|
-
}),
|
|
3374
|
+
}), Za = { class: "tpl:w-full" }, Qa = ["href"], $a = {
|
|
3339
3375
|
key: 1,
|
|
3340
3376
|
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)]"
|
|
3341
|
-
},
|
|
3377
|
+
}, eo = /* @__PURE__ */ B({
|
|
3342
3378
|
__name: "MenuBlock",
|
|
3343
3379
|
props: {
|
|
3344
3380
|
block: {},
|
|
@@ -3357,7 +3393,7 @@ var Ia = {
|
|
|
3357
3393
|
function a(e) {
|
|
3358
3394
|
return e || t.block.linkColor || t.block.color;
|
|
3359
3395
|
}
|
|
3360
|
-
return (t, o) => (f(), k("div",
|
|
3396
|
+
return (t, o) => (f(), k("div", Za, [i.value ? (f(), k("div", {
|
|
3361
3397
|
key: 0,
|
|
3362
3398
|
style: L(r.value)
|
|
3363
3399
|
}, [(f(!0), k(R, null, h(e.block.items, (t, n) => (f(), k(R, { key: t.id }, [I("a", {
|
|
@@ -3369,15 +3405,15 @@ var Ia = {
|
|
|
3369
3405
|
textDecoration: t.underline ? "underline" : "none"
|
|
3370
3406
|
}),
|
|
3371
3407
|
onClick: o[0] ||= M(() => {}, ["prevent"])
|
|
3372
|
-
}, [V(Vr, { text: t.text || "..." }, null, 8, ["text"])], 12,
|
|
3408
|
+
}, [V(Vr, { text: t.text || "..." }, null, 8, ["text"])], 12, Qa), n < e.block.items.length - 1 ? (f(), k("span", {
|
|
3373
3409
|
key: 0,
|
|
3374
3410
|
style: L({
|
|
3375
3411
|
color: e.block.separatorColor,
|
|
3376
3412
|
padding: `0 ${e.block.spacing}px`
|
|
3377
3413
|
})
|
|
3378
|
-
}, D(e.block.separator), 5)) : A("", !0)], 64))), 128))], 4)) : (f(), k("div",
|
|
3414
|
+
}, D(e.block.separator), 5)) : A("", !0)], 64))), 128))], 4)) : (f(), k("div", $a, [V(j(Ci), { size: 16 }), I("span", null, D(j(n).menu.addLinks), 1)]))]));
|
|
3379
3415
|
}
|
|
3380
|
-
}),
|
|
3416
|
+
}), to = /* @__PURE__ */ new Set([
|
|
3381
3417
|
"http",
|
|
3382
3418
|
"https",
|
|
3383
3419
|
"mailto",
|
|
@@ -3387,7 +3423,7 @@ var Ia = {
|
|
|
3387
3423
|
"sms",
|
|
3388
3424
|
"xmpp",
|
|
3389
3425
|
"cid"
|
|
3390
|
-
]),
|
|
3426
|
+
]), no = /* @__PURE__ */ new Set([
|
|
3391
3427
|
"SCRIPT",
|
|
3392
3428
|
"STYLE",
|
|
3393
3429
|
"IFRAME",
|
|
@@ -3397,7 +3433,7 @@ var Ia = {
|
|
|
3397
3433
|
"META",
|
|
3398
3434
|
"BASE",
|
|
3399
3435
|
"FORM"
|
|
3400
|
-
]),
|
|
3436
|
+
]), ro = /* @__PURE__ */ new Set([
|
|
3401
3437
|
"href",
|
|
3402
3438
|
"xlink:href",
|
|
3403
3439
|
"formaction",
|
|
@@ -3406,16 +3442,16 @@ var Ia = {
|
|
|
3406
3442
|
"background",
|
|
3407
3443
|
"poster"
|
|
3408
3444
|
]);
|
|
3409
|
-
function
|
|
3445
|
+
function io(e, t) {
|
|
3410
3446
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
3411
3447
|
if (!n || n.startsWith("#")) return !0;
|
|
3412
3448
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
3413
3449
|
if (!r) return !0;
|
|
3414
3450
|
let i = r[1].toLowerCase();
|
|
3415
|
-
return
|
|
3451
|
+
return to.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
3416
3452
|
}
|
|
3417
|
-
function
|
|
3418
|
-
if (
|
|
3453
|
+
function ao(e) {
|
|
3454
|
+
if (no.has(e.tagName)) {
|
|
3419
3455
|
e.remove();
|
|
3420
3456
|
return;
|
|
3421
3457
|
}
|
|
@@ -3427,29 +3463,29 @@ function no(e) {
|
|
|
3427
3463
|
e.removeAttribute(n);
|
|
3428
3464
|
continue;
|
|
3429
3465
|
}
|
|
3430
|
-
if (
|
|
3431
|
-
|
|
3466
|
+
if (ro.has(t)) {
|
|
3467
|
+
io(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
3432
3468
|
continue;
|
|
3433
3469
|
}
|
|
3434
3470
|
if (t === "src") {
|
|
3435
|
-
|
|
3471
|
+
io(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
3436
3472
|
continue;
|
|
3437
3473
|
}
|
|
3438
3474
|
t === "srcdoc" && e.removeAttribute(n);
|
|
3439
3475
|
}
|
|
3440
3476
|
let n = Array.from(e.children);
|
|
3441
|
-
for (let e of n)
|
|
3477
|
+
for (let e of n) ao(e);
|
|
3442
3478
|
}
|
|
3443
|
-
function
|
|
3479
|
+
function oo(e) {
|
|
3444
3480
|
if (typeof DOMParser > "u") return e;
|
|
3445
3481
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
3446
|
-
for (let e of n)
|
|
3482
|
+
for (let e of n) ao(e);
|
|
3447
3483
|
return t.innerHTML;
|
|
3448
3484
|
}
|
|
3449
3485
|
//#endregion
|
|
3450
3486
|
//#region src/composables/useEditableTextBlock.ts
|
|
3451
|
-
function
|
|
3452
|
-
let t = v(Zn, []), { syntax: n } = na(), r = O(() =>
|
|
3487
|
+
function so(e) {
|
|
3488
|
+
let t = v(Zn, []), { syntax: n } = na(), r = O(() => oo(wt(bt(e(), t), n))), i = C(!1), a = C(null), { top: o, left: s } = kn(a), c = O(() => ({
|
|
3453
3489
|
top: o.value - 8,
|
|
3454
3490
|
left: s.value
|
|
3455
3491
|
}));
|
|
@@ -3470,14 +3506,14 @@ function io(e) {
|
|
|
3470
3506
|
}
|
|
3471
3507
|
//#endregion
|
|
3472
3508
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3473
|
-
var
|
|
3509
|
+
var co = ["innerHTML"], lo = /* @__PURE__ */ B({
|
|
3474
3510
|
__name: "ParagraphBlock",
|
|
3475
3511
|
props: {
|
|
3476
3512
|
block: {},
|
|
3477
3513
|
viewport: {}
|
|
3478
3514
|
},
|
|
3479
3515
|
setup(e) {
|
|
3480
|
-
let t = e, n =
|
|
3516
|
+
let t = e, n = T(() => import("./ParagraphEditor-CB5FGRs3.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = so(() => t.block.content);
|
|
3481
3517
|
return (t, l) => (f(), k("div", {
|
|
3482
3518
|
ref_key: "blockRef",
|
|
3483
3519
|
ref: i,
|
|
@@ -3496,46 +3532,46 @@ var ao = ["innerHTML"], oo = /* @__PURE__ */ B({
|
|
|
3496
3532
|
key: 1,
|
|
3497
3533
|
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",
|
|
3498
3534
|
innerHTML: j(o)
|
|
3499
|
-
}, null, 8,
|
|
3535
|
+
}, null, 8, co))], 544));
|
|
3500
3536
|
}
|
|
3501
3537
|
});
|
|
3502
3538
|
//#endregion
|
|
3503
3539
|
//#region src/utils/blockComponentResolver.ts
|
|
3504
|
-
function
|
|
3540
|
+
function uo(e, t, n) {
|
|
3505
3541
|
if (t) {
|
|
3506
3542
|
let n = t.getComponent(e);
|
|
3507
3543
|
if (n) return n;
|
|
3508
3544
|
}
|
|
3509
3545
|
return n[e.type] ?? null;
|
|
3510
3546
|
}
|
|
3511
|
-
function
|
|
3547
|
+
function fo(e) {
|
|
3512
3548
|
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
3513
3549
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
3514
3550
|
backgroundColor: n || "transparent"
|
|
3515
3551
|
};
|
|
3516
3552
|
return e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
|
|
3517
3553
|
}
|
|
3518
|
-
function
|
|
3554
|
+
function po(e) {
|
|
3519
3555
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
3520
3556
|
let t = e.wrapper, n = {};
|
|
3521
3557
|
return t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.padding && (n.padding = `${t.padding.top}px ${t.padding.right}px ${t.padding.bottom}px ${t.padding.left}px`), t.borderRadius && t.borderRadius > 0 && (n.borderRadius = `${t.borderRadius}px`), n;
|
|
3522
3558
|
}
|
|
3523
3559
|
//#endregion
|
|
3524
3560
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
3525
|
-
var
|
|
3561
|
+
var mo = ["data-block-id", "data-block-type"], ho = ["aria-label"], go = [
|
|
3526
3562
|
"aria-label",
|
|
3527
3563
|
"aria-pressed",
|
|
3528
3564
|
"title"
|
|
3529
|
-
],
|
|
3565
|
+
], _o = ["aria-label", "title"], vo = ["aria-label", "title"], yo = ["aria-label", "title"], bo = {
|
|
3530
3566
|
key: 1,
|
|
3531
3567
|
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"
|
|
3532
|
-
},
|
|
3568
|
+
}, xo = { 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)]" }, So = {
|
|
3533
3569
|
key: 2,
|
|
3534
3570
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
3535
|
-
},
|
|
3571
|
+
}, Co = ["aria-label", "title"], wo = {
|
|
3536
3572
|
key: 3,
|
|
3537
3573
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
3538
|
-
},
|
|
3574
|
+
}, To = ["aria-label"], Eo = /*#__PURE__*/ Gi(/* @__PURE__ */ B({
|
|
3539
3575
|
__name: "BlockWrapper",
|
|
3540
3576
|
props: {
|
|
3541
3577
|
block: {},
|
|
@@ -3545,7 +3581,7 @@ var uo = ["data-block-id", "data-block-type"], fo = ["aria-label"], po = [
|
|
|
3545
3581
|
},
|
|
3546
3582
|
emits: ["select"],
|
|
3547
3583
|
setup(e, { emit: t }) {
|
|
3548
|
-
let n =
|
|
3584
|
+
let n = T(() => import("./BlockIssueBadge-ww2vNIfJ.js")), r = e, i = t, { t: a, format: s } = Y(), c = v(ur, 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);
|
|
3549
3585
|
async function p() {
|
|
3550
3586
|
await m(), l.value?.focus();
|
|
3551
3587
|
}
|
|
@@ -3571,13 +3607,13 @@ var uo = ["data-block-id", "data-block-type"], fo = ["aria-label"], po = [
|
|
|
3571
3607
|
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 ? {
|
|
3572
3608
|
desktop: a.viewport.desktop,
|
|
3573
3609
|
mobile: a.viewport.mobile
|
|
3574
|
-
}[r.viewport] ?? r.viewport : ""), b = O(() => !!r.block.displayCondition), x = v(Vn, null), S = v(Hn, null), w = v(lr, {}),
|
|
3575
|
-
let e =
|
|
3610
|
+
}[r.viewport] ?? r.viewport : ""), b = O(() => !!r.block.displayCondition), x = v(Vn, null), S = v(Hn, null), w = v(lr, {}), ee = O(() => !!w.savedModules), E = O(() => w.comments?.getBlockCount(r.block.id) ?? 0), te = O(() => {
|
|
3611
|
+
let e = fo(r.block), t = {
|
|
3576
3612
|
padding: e.padding,
|
|
3577
3613
|
backgroundColor: e.backgroundColor
|
|
3578
3614
|
};
|
|
3579
3615
|
return e.borderRadius && (t.borderRadius = e.borderRadius), t;
|
|
3580
|
-
}), ne = O(() =>
|
|
3616
|
+
}), ne = O(() => po(r.block));
|
|
3581
3617
|
function re(e) {
|
|
3582
3618
|
r.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), i("select"));
|
|
3583
3619
|
}
|
|
@@ -3623,7 +3659,7 @@ var uo = ["data-block-id", "data-block-type"], fo = ["aria-label"], po = [
|
|
|
3623
3659
|
}, [V(j(_i), {
|
|
3624
3660
|
size: 14,
|
|
3625
3661
|
"stroke-width": 1.5
|
|
3626
|
-
})], 40,
|
|
3662
|
+
})], 40, go),
|
|
3627
3663
|
I("button", {
|
|
3628
3664
|
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",
|
|
3629
3665
|
"aria-label": j(a).blockActions.duplicate,
|
|
@@ -3632,8 +3668,8 @@ var uo = ["data-block-id", "data-block-type"], fo = ["aria-label"], po = [
|
|
|
3632
3668
|
}, [V(j(di), {
|
|
3633
3669
|
size: 14,
|
|
3634
3670
|
"stroke-width": 1.5
|
|
3635
|
-
})], 8,
|
|
3636
|
-
|
|
3671
|
+
})], 8, _o),
|
|
3672
|
+
ee.value ? (f(), k("button", {
|
|
3637
3673
|
key: 0,
|
|
3638
3674
|
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",
|
|
3639
3675
|
"aria-label": j(a).blockActions.saveAsModule,
|
|
@@ -3642,7 +3678,7 @@ var uo = ["data-block-id", "data-block-type"], fo = ["aria-label"], po = [
|
|
|
3642
3678
|
}, [V(j(ei), {
|
|
3643
3679
|
size: 14,
|
|
3644
3680
|
"stroke-width": 1.5
|
|
3645
|
-
})], 8,
|
|
3681
|
+
})], 8, vo)) : A("", !0),
|
|
3646
3682
|
I("button", {
|
|
3647
3683
|
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",
|
|
3648
3684
|
"aria-label": j(a).blockActions.delete,
|
|
@@ -3651,13 +3687,13 @@ var uo = ["data-block-id", "data-block-type"], fo = ["aria-label"], po = [
|
|
|
3651
3687
|
}, [V(j(Fi), {
|
|
3652
3688
|
size: 14,
|
|
3653
3689
|
"stroke-width": 1.5
|
|
3654
|
-
})], 8,
|
|
3655
|
-
], 8,
|
|
3656
|
-
g.value ? (f(), k("div",
|
|
3690
|
+
})], 8, yo)
|
|
3691
|
+
], 8, ho)) : A("", !0),
|
|
3692
|
+
g.value ? (f(), k("div", bo, [I("span", xo, [V(j(fi), {
|
|
3657
3693
|
size: 12,
|
|
3658
3694
|
"stroke-width": 1.5
|
|
3659
3695
|
}), z(" " + D(j(s)(j(a).blockActions.hiddenOnViewport, { viewport: y.value })), 1)])])) : A("", !0),
|
|
3660
|
-
b.value && !g.value ? (f(), k("div",
|
|
3696
|
+
b.value && !g.value ? (f(), k("div", So, [I("button", {
|
|
3661
3697
|
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)]",
|
|
3662
3698
|
"aria-label": j(a).blockActions.conditionToggle,
|
|
3663
3699
|
title: e.block.displayCondition?.label,
|
|
@@ -3665,15 +3701,15 @@ var uo = ["data-block-id", "data-block-type"], fo = ["aria-label"], po = [
|
|
|
3665
3701
|
}, [V(j(gi), {
|
|
3666
3702
|
size: 12,
|
|
3667
3703
|
"stroke-width": 2
|
|
3668
|
-
})], 8,
|
|
3669
|
-
|
|
3704
|
+
})], 8, Co)])) : A("", !0),
|
|
3705
|
+
E.value > 0 && !g.value ? (f(), k("div", wo, [I("button", {
|
|
3670
3706
|
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)]",
|
|
3671
|
-
"aria-label": j(s)(j(a).blockActions.comments, { count: String(
|
|
3707
|
+
"aria-label": j(s)(j(a).blockActions.comments, { count: String(E.value) }),
|
|
3672
3708
|
onClick: r[0] ||= M((t) => j(w).comments?.openForBlock(e.block.id), ["stop"])
|
|
3673
3709
|
}, [V(j(Si), {
|
|
3674
3710
|
size: 12,
|
|
3675
3711
|
"stroke-width": 2.5
|
|
3676
|
-
}), z(" " + D(
|
|
3712
|
+
}), z(" " + D(E.value), 1)], 8, To)])) : A("", !0),
|
|
3677
3713
|
ne.value ? (f(), k("div", {
|
|
3678
3714
|
key: 4,
|
|
3679
3715
|
class: "tpl-section-wrapper",
|
|
@@ -3686,31 +3722,31 @@ var uo = ["data-block-id", "data-block-type"], fo = ["aria-label"], po = [
|
|
|
3686
3722
|
class: "tpl-block-content",
|
|
3687
3723
|
style: L(te.value)
|
|
3688
3724
|
}, [o(t.$slots, "default", {}, void 0, !0)], 4))
|
|
3689
|
-
], 10,
|
|
3725
|
+
], 10, mo));
|
|
3690
3726
|
}
|
|
3691
3727
|
}), [["__scopeId", "data-v-7d9e7893"]]);
|
|
3692
3728
|
//#endregion
|
|
3693
3729
|
//#region src/utils/unwrapParagraph.ts
|
|
3694
|
-
function
|
|
3730
|
+
function Do(e) {
|
|
3695
3731
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
3696
3732
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
3697
3733
|
}
|
|
3698
3734
|
//#endregion
|
|
3699
3735
|
//#region src/components/blocks/TitleBlock.vue
|
|
3700
|
-
var
|
|
3736
|
+
var Oo = /* @__PURE__ */ B({
|
|
3701
3737
|
__name: "TitleBlock",
|
|
3702
3738
|
props: {
|
|
3703
3739
|
block: {},
|
|
3704
3740
|
viewport: {}
|
|
3705
3741
|
},
|
|
3706
3742
|
setup(e) {
|
|
3707
|
-
let t = e, n =
|
|
3743
|
+
let t = e, n = T(() => import("./TitleEditor-C0mYpgs4.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = so(() => t.block.content), l = O(() => {
|
|
3708
3744
|
let e = {
|
|
3709
3745
|
fontSize: `${pe[t.block.level]}px`,
|
|
3710
3746
|
textAlign: t.block.textAlign
|
|
3711
3747
|
};
|
|
3712
3748
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
3713
|
-
}), u = O(() => `h${t.block.level}`), p = O(() =>
|
|
3749
|
+
}), u = O(() => `h${t.block.level}`), p = O(() => Do(o.value));
|
|
3714
3750
|
return (t, o) => (f(), k("div", {
|
|
3715
3751
|
ref_key: "blockRef",
|
|
3716
3752
|
ref: i,
|
|
@@ -3736,16 +3772,16 @@ var To = /* @__PURE__ */ B({
|
|
|
3736
3772
|
});
|
|
3737
3773
|
//#endregion
|
|
3738
3774
|
//#region src/utils/sectionColumnDrop.ts
|
|
3739
|
-
function
|
|
3775
|
+
function ko(e) {
|
|
3740
3776
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
3741
3777
|
}
|
|
3742
3778
|
//#endregion
|
|
3743
3779
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3744
|
-
var
|
|
3780
|
+
var Ao = { class: "tpl:w-full" }, jo = { class: "tpl:flex tpl:gap-0" }, Mo = {
|
|
3745
3781
|
key: 0,
|
|
3746
3782
|
"data-testid": "section-drop-hint",
|
|
3747
3783
|
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)]"
|
|
3748
|
-
},
|
|
3784
|
+
}, No = /* @__PURE__ */ B({
|
|
3749
3785
|
__name: "SectionBlock",
|
|
3750
3786
|
props: {
|
|
3751
3787
|
block: {},
|
|
@@ -3753,12 +3789,12 @@ var Do = { class: "tpl:w-full" }, Oo = { class: "tpl:flex tpl:gap-0" }, ko = {
|
|
|
3753
3789
|
},
|
|
3754
3790
|
setup(e) {
|
|
3755
3791
|
let t = {
|
|
3756
|
-
title:
|
|
3757
|
-
paragraph:
|
|
3758
|
-
image:
|
|
3792
|
+
title: Oo,
|
|
3793
|
+
paragraph: lo,
|
|
3794
|
+
image: Xa,
|
|
3759
3795
|
button: Wr,
|
|
3760
|
-
divider:
|
|
3761
|
-
custom:
|
|
3796
|
+
divider: Aa,
|
|
3797
|
+
custom: Oa
|
|
3762
3798
|
}, n = e, { t: r } = Y(), i = J(zn, "SectionBlock"), a = v(Hn, null), o = v(qn, null), s = O(() => {
|
|
3763
3799
|
switch (n.block.columns) {
|
|
3764
3800
|
case "2": return ["50%", "50%"];
|
|
@@ -3785,7 +3821,7 @@ var Do = { class: "tpl:w-full" }, Oo = { class: "tpl:flex tpl:gap-0" }, ko = {
|
|
|
3785
3821
|
a[e] = r, i.updateBlock(n.block.id, { children: a });
|
|
3786
3822
|
}
|
|
3787
3823
|
function m(e) {
|
|
3788
|
-
return
|
|
3824
|
+
return uo(e, o, t);
|
|
3789
3825
|
}
|
|
3790
3826
|
function g(e, t) {
|
|
3791
3827
|
e.type === "custom" && i.updateBlock(e.id, {
|
|
@@ -3793,7 +3829,7 @@ var Do = { class: "tpl:w-full" }, Oo = { class: "tpl:flex tpl:gap-0" }, ko = {
|
|
|
3793
3829
|
dataSourceFetched: t.dataSourceFetched
|
|
3794
3830
|
});
|
|
3795
3831
|
}
|
|
3796
|
-
return (t, n) => (f(), k("div",
|
|
3832
|
+
return (t, n) => (f(), k("div", Ao, [I("div", jo, [(f(!0), k(R, null, h(l.value, (t, n) => (f(), k("div", {
|
|
3797
3833
|
key: n,
|
|
3798
3834
|
class: F(["tpl:relative tpl:min-h-[60px] tpl:rounded", u(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3799
3835
|
style: L({ width: s.value[n] })
|
|
@@ -3802,7 +3838,7 @@ var Do = { class: "tpl:w-full" }, Oo = { class: "tpl:flex tpl:gap-0" }, ko = {
|
|
|
3802
3838
|
group: {
|
|
3803
3839
|
name: "blocks",
|
|
3804
3840
|
pull: !0,
|
|
3805
|
-
put: (e, t, n) => j(
|
|
3841
|
+
put: (e, t, n) => j(ko)(n)
|
|
3806
3842
|
},
|
|
3807
3843
|
animation: 150,
|
|
3808
3844
|
"ghost-class": "tpl-ghost",
|
|
@@ -3815,7 +3851,7 @@ var Do = { class: "tpl:w-full" }, Oo = { class: "tpl:flex tpl:gap-0" }, ko = {
|
|
|
3815
3851
|
class: "tpl:min-h-[60px]",
|
|
3816
3852
|
"onUpdate:modelValue": (e) => p(n, e)
|
|
3817
3853
|
}, {
|
|
3818
|
-
default: b(() => [(f(!0), k(R, null, h(u(n), (t) => c((f(), k("div", { key: t.id }, [V(
|
|
3854
|
+
default: b(() => [(f(!0), k(R, null, h(u(n), (t) => c((f(), k("div", { key: t.id }, [V(Eo, {
|
|
3819
3855
|
block: t,
|
|
3820
3856
|
"is-selected": j(i).state.selectedBlockId === t.id,
|
|
3821
3857
|
viewport: e.viewport,
|
|
@@ -3846,13 +3882,13 @@ var Do = { class: "tpl:w-full" }, Oo = { class: "tpl:flex tpl:gap-0" }, ko = {
|
|
|
3846
3882
|
"model-value",
|
|
3847
3883
|
"group",
|
|
3848
3884
|
"onUpdate:modelValue"
|
|
3849
|
-
]), u(n).length === 0 ? (f(), k("div",
|
|
3885
|
+
]), u(n).length === 0 ? (f(), k("div", Mo, [I("span", null, D(j(r).section.dropHere), 1)])) : A("", !0)], 6))), 128))])]));
|
|
3850
3886
|
}
|
|
3851
|
-
}),
|
|
3887
|
+
}), Po = me, Fo = {
|
|
3852
3888
|
small: 24,
|
|
3853
3889
|
medium: 32,
|
|
3854
3890
|
large: 48
|
|
3855
|
-
},
|
|
3891
|
+
}, Io = [
|
|
3856
3892
|
"facebook",
|
|
3857
3893
|
"twitter",
|
|
3858
3894
|
"instagram",
|
|
@@ -3870,11 +3906,11 @@ var Do = { class: "tpl:w-full" }, Oo = { class: "tpl:flex tpl:gap-0" }, ko = {
|
|
|
3870
3906
|
"github",
|
|
3871
3907
|
"dribbble",
|
|
3872
3908
|
"behance"
|
|
3873
|
-
],
|
|
3909
|
+
], Lo = [
|
|
3874
3910
|
"width",
|
|
3875
3911
|
"height",
|
|
3876
3912
|
"fill"
|
|
3877
|
-
],
|
|
3913
|
+
], Ro = ["d"], zo = /* @__PURE__ */ B({
|
|
3878
3914
|
__name: "SocialIconSvg",
|
|
3879
3915
|
props: {
|
|
3880
3916
|
platform: {},
|
|
@@ -3882,7 +3918,7 @@ var Do = { class: "tpl:w-full" }, Oo = { class: "tpl:flex tpl:gap-0" }, ko = {
|
|
|
3882
3918
|
iconSize: {}
|
|
3883
3919
|
},
|
|
3884
3920
|
setup(e) {
|
|
3885
|
-
let t = e, n = O(() =>
|
|
3921
|
+
let t = e, n = O(() => Po[t.platform]), r = O(() => Fo[t.iconSize]), i = O(() => {
|
|
3886
3922
|
let e = {
|
|
3887
3923
|
display: "inline-flex",
|
|
3888
3924
|
alignItems: "center",
|
|
@@ -3926,12 +3962,12 @@ var Do = { class: "tpl:w-full" }, Oo = { class: "tpl:flex tpl:gap-0" }, ko = {
|
|
|
3926
3962
|
viewBox: "0 0 24 24",
|
|
3927
3963
|
fill: o.value,
|
|
3928
3964
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3929
|
-
}, [I("path", { d: n.value.path }, null, 8,
|
|
3965
|
+
}, [I("path", { d: n.value.path }, null, 8, Ro)], 8, Lo))], 4));
|
|
3930
3966
|
}
|
|
3931
|
-
}),
|
|
3967
|
+
}), Bo = { class: "tpl:w-full" }, Vo = ["href"], Ho = {
|
|
3932
3968
|
key: 1,
|
|
3933
3969
|
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)]"
|
|
3934
|
-
},
|
|
3970
|
+
}, Uo = /* @__PURE__ */ B({
|
|
3935
3971
|
__name: "SocialIconsBlock",
|
|
3936
3972
|
props: {
|
|
3937
3973
|
block: {},
|
|
@@ -3944,7 +3980,7 @@ var Do = { class: "tpl:w-full" }, Oo = { class: "tpl:flex tpl:gap-0" }, ko = {
|
|
|
3944
3980
|
gap: `${t.block.spacing}px`,
|
|
3945
3981
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
3946
3982
|
})), i = O(() => t.block.icons.length > 0);
|
|
3947
|
-
return (t, a) => (f(), k("div",
|
|
3983
|
+
return (t, a) => (f(), k("div", Bo, [i.value ? (f(), k("div", {
|
|
3948
3984
|
key: 0,
|
|
3949
3985
|
style: L(r.value)
|
|
3950
3986
|
}, [(f(!0), k(R, null, h(e.block.icons, (t) => (f(), k("a", {
|
|
@@ -3952,7 +3988,7 @@ var Do = { class: "tpl:w-full" }, Oo = { class: "tpl:flex tpl:gap-0" }, ko = {
|
|
|
3952
3988
|
href: t.url || "#",
|
|
3953
3989
|
class: "tpl:cursor-default",
|
|
3954
3990
|
onClick: a[0] ||= M(() => {}, ["prevent"])
|
|
3955
|
-
}, [V(
|
|
3991
|
+
}, [V(zo, {
|
|
3956
3992
|
platform: t.platform,
|
|
3957
3993
|
"icon-style": e.block.iconStyle,
|
|
3958
3994
|
"icon-size": e.block.iconSize
|
|
@@ -3960,16 +3996,16 @@ var Do = { class: "tpl:w-full" }, Oo = { class: "tpl:flex tpl:gap-0" }, ko = {
|
|
|
3960
3996
|
"platform",
|
|
3961
3997
|
"icon-style",
|
|
3962
3998
|
"icon-size"
|
|
3963
|
-
])], 8,
|
|
3999
|
+
])], 8, Vo))), 128))], 4)) : (f(), k("div", Ho, [V(j(Ai), { size: 16 }), I("span", null, D(j(n).social.addIcons), 1)]))]));
|
|
3964
4000
|
}
|
|
3965
|
-
}),
|
|
4001
|
+
}), Wo = { class: "tpl:w-full" }, Go = {
|
|
3966
4002
|
key: 0,
|
|
3967
4003
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3968
4004
|
style: {
|
|
3969
4005
|
"background-color": "var(--tpl-bg-hover)",
|
|
3970
4006
|
color: "var(--tpl-text-dim)"
|
|
3971
4007
|
}
|
|
3972
|
-
},
|
|
4008
|
+
}, Ko = /* @__PURE__ */ B({
|
|
3973
4009
|
__name: "SpacerBlock",
|
|
3974
4010
|
props: {
|
|
3975
4011
|
block: {},
|
|
@@ -3981,23 +4017,23 @@ var Do = { class: "tpl:w-full" }, Oo = { class: "tpl:flex tpl:gap-0" }, ko = {
|
|
|
3981
4017
|
minHeight: `${t.block.height}px`,
|
|
3982
4018
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3983
4019
|
}));
|
|
3984
|
-
return (t, i) => (f(), k("div",
|
|
4020
|
+
return (t, i) => (f(), k("div", Wo, [I("div", {
|
|
3985
4021
|
style: L(r.value),
|
|
3986
4022
|
class: F(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !j(n).state.previewMode }])
|
|
3987
|
-
}, [j(n).state.previewMode ? A("", !0) : (f(), k("span",
|
|
4023
|
+
}, [j(n).state.previewMode ? A("", !0) : (f(), k("span", Go, D(e.block.height) + "px ", 1))], 6)]));
|
|
3988
4024
|
}
|
|
3989
|
-
}),
|
|
4025
|
+
}), qo = { class: "tpl:w-full" }, Jo = { key: 0 }, Yo = [
|
|
3990
4026
|
"aria-label",
|
|
3991
4027
|
"data-placeholder",
|
|
3992
4028
|
"onBlur"
|
|
3993
|
-
],
|
|
4029
|
+
], Xo = [
|
|
3994
4030
|
"aria-label",
|
|
3995
4031
|
"data-placeholder",
|
|
3996
4032
|
"onBlur"
|
|
3997
|
-
],
|
|
4033
|
+
], Zo = {
|
|
3998
4034
|
key: 1,
|
|
3999
4035
|
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)]"
|
|
4000
|
-
},
|
|
4036
|
+
}, Qo = /*#__PURE__*/ Gi(/* @__PURE__ */ B({
|
|
4001
4037
|
__name: "TableBlock",
|
|
4002
4038
|
props: {
|
|
4003
4039
|
block: {},
|
|
@@ -4042,31 +4078,31 @@ var Do = { class: "tpl:w-full" }, Oo = { class: "tpl:flex tpl:gap-0" }, ko = {
|
|
|
4042
4078
|
} : n);
|
|
4043
4079
|
i.updateBlock(n.block.id, { rows: o });
|
|
4044
4080
|
}
|
|
4045
|
-
return (e, n) => (f(), k("div",
|
|
4081
|
+
return (e, n) => (f(), k("div", qo, [a.value ? (f(), k("table", {
|
|
4046
4082
|
key: 0,
|
|
4047
4083
|
style: L(o.value),
|
|
4048
4084
|
class: "tpl-table-editable"
|
|
4049
|
-
}, [u.value ? (f(), k("thead",
|
|
4085
|
+
}, [u.value ? (f(), k("thead", Jo, [I("tr", null, [(f(!0), k(R, null, h(u.value.cells, (e) => c((f(), k("th", {
|
|
4050
4086
|
key: e.id,
|
|
4051
4087
|
style: L(l.value),
|
|
4052
4088
|
"aria-label": j(r).table.cellPlaceholder,
|
|
4053
4089
|
contenteditable: "true",
|
|
4054
4090
|
"data-placeholder": j(r).table.cellPlaceholder,
|
|
4055
4091
|
onBlur: (t) => m(u.value.id, e.id, t),
|
|
4056
|
-
onKeydown: n[0] ||=
|
|
4092
|
+
onKeydown: n[0] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4057
4093
|
onClick: M(p, ["stop"])
|
|
4058
|
-
}, null, 44,
|
|
4094
|
+
}, null, 44, Yo)), [[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", {
|
|
4059
4095
|
key: i.id,
|
|
4060
4096
|
style: L(s.value),
|
|
4061
4097
|
"aria-label": j(r).table.cellPlaceholder,
|
|
4062
4098
|
contenteditable: "true",
|
|
4063
4099
|
"data-placeholder": j(r).table.cellPlaceholder,
|
|
4064
4100
|
onBlur: (t) => m(e.id, i.id, t),
|
|
4065
|
-
onKeydown: n[1] ||=
|
|
4101
|
+
onKeydown: n[1] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4066
4102
|
onClick: M(p, ["stop"])
|
|
4067
|
-
}, null, 44,
|
|
4103
|
+
}, null, 44, Xo)), [[t, i.content]])), 128))]))), 128))])], 4)) : (f(), k("div", Zo, [V(j(Pi), { size: 16 }), I("span", null, D(j(r).table.empty), 1)]))]));
|
|
4068
4104
|
}
|
|
4069
|
-
}), [["__scopeId", "data-v-963ac422"]]),
|
|
4105
|
+
}), [["__scopeId", "data-v-963ac422"]]), $o = /* @__PURE__ */ B({
|
|
4070
4106
|
__name: "VideoPlayButton",
|
|
4071
4107
|
props: { hoverEffect: {
|
|
4072
4108
|
type: Boolean,
|
|
@@ -4084,7 +4120,7 @@ var Do = { class: "tpl:w-full" }, Oo = { class: "tpl:flex tpl:gap-0" }, ko = {
|
|
|
4084
4120
|
});
|
|
4085
4121
|
//#endregion
|
|
4086
4122
|
//#region src/utils/videoThumbnail.ts
|
|
4087
|
-
function
|
|
4123
|
+
function es(e) {
|
|
4088
4124
|
if (!e) return {
|
|
4089
4125
|
platform: "unknown",
|
|
4090
4126
|
videoId: null,
|
|
@@ -4116,25 +4152,25 @@ function Zo(e) {
|
|
|
4116
4152
|
thumbnailUrl: null
|
|
4117
4153
|
};
|
|
4118
4154
|
}
|
|
4119
|
-
function
|
|
4120
|
-
return t ||
|
|
4155
|
+
function ts(e, t) {
|
|
4156
|
+
return t || es(e).thumbnailUrl;
|
|
4121
4157
|
}
|
|
4122
4158
|
//#endregion
|
|
4123
4159
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4124
|
-
var
|
|
4160
|
+
var ns = ["src", "alt"], rs = {
|
|
4125
4161
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
4126
4162
|
style: { opacity: "0.7" }
|
|
4127
|
-
},
|
|
4163
|
+
}, is = ["href"], as = ["src", "alt"], os = ["src", "alt"], ss = {
|
|
4128
4164
|
key: 3,
|
|
4129
4165
|
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)]"
|
|
4130
|
-
},
|
|
4166
|
+
}, cs = /* @__PURE__ */ B({
|
|
4131
4167
|
__name: "VideoBlock",
|
|
4132
4168
|
props: {
|
|
4133
4169
|
block: {},
|
|
4134
4170
|
viewport: {}
|
|
4135
4171
|
},
|
|
4136
4172
|
setup(e) {
|
|
4137
|
-
let t = e, { t: n } = Y(), { syntax: r } = na(), i = O(() => xt(t.block.url, r) || xt(t.block.thumbnailUrl, r)), a = O(() => i.value ? null :
|
|
4173
|
+
let t = e, { t: n } = Y(), { syntax: r } = na(), i = O(() => xt(t.block.url, r) || xt(t.block.thumbnailUrl, r)), a = O(() => i.value ? null : ts(t.block.url, t.block.thumbnailUrl)), o = O(() => ({ textAlign: t.block.align })), s = O(() => {
|
|
4138
4174
|
let e = t.block.align;
|
|
4139
4175
|
return {
|
|
4140
4176
|
maxWidth: "100%",
|
|
@@ -4155,7 +4191,7 @@ var $o = ["src", "alt"], es = {
|
|
|
4155
4191
|
class: "tpl:w-full tpl:border-0",
|
|
4156
4192
|
src: e.block.placeholderUrl,
|
|
4157
4193
|
alt: e.block.alt
|
|
4158
|
-
}, null, 8,
|
|
4194
|
+
}, null, 8, ns), V($o)], 4)) : i.value ? (f(), k("div", {
|
|
4159
4195
|
key: 1,
|
|
4160
4196
|
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)]",
|
|
4161
4197
|
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, s.value])
|
|
@@ -4164,7 +4200,7 @@ var $o = ["src", "alt"], es = {
|
|
|
4164
4200
|
"stroke-width": 1.5,
|
|
4165
4201
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4166
4202
|
style: { opacity: "0.5" }
|
|
4167
|
-
}), I("span",
|
|
4203
|
+
}), I("span", rs, [V(Vr, { text: c.value }, null, 8, ["text"])])], 4)) : a.value ? (f(), k(R, { key: 2 }, [e.block.url ? (f(), k("a", {
|
|
4168
4204
|
key: 0,
|
|
4169
4205
|
href: e.block.url,
|
|
4170
4206
|
target: "_blank",
|
|
@@ -4176,7 +4212,7 @@ var $o = ["src", "alt"], es = {
|
|
|
4176
4212
|
class: "tpl:w-full tpl:border-0",
|
|
4177
4213
|
src: a.value,
|
|
4178
4214
|
alt: e.block.alt
|
|
4179
|
-
}, null, 8,
|
|
4215
|
+
}, null, 8, as), V($o, { "hover-effect": "" })], 12, is)) : (f(), k("div", {
|
|
4180
4216
|
key: 1,
|
|
4181
4217
|
class: "tpl:relative tpl:inline-block",
|
|
4182
4218
|
style: L(s.value)
|
|
@@ -4184,28 +4220,28 @@ var $o = ["src", "alt"], es = {
|
|
|
4184
4220
|
class: "tpl:w-full tpl:border-0",
|
|
4185
4221
|
src: a.value,
|
|
4186
4222
|
alt: e.block.alt
|
|
4187
|
-
}, null, 8,
|
|
4223
|
+
}, null, 8, os), V($o)], 4))], 64)) : (f(), k("div", ss, [V(j(zi), {
|
|
4188
4224
|
size: 40,
|
|
4189
4225
|
"stroke-width": 1.5,
|
|
4190
4226
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4191
4227
|
}), I("span", null, D(j(n).video.addVideo), 1)]))], 4));
|
|
4192
4228
|
}
|
|
4193
|
-
}),
|
|
4194
|
-
section:
|
|
4195
|
-
title:
|
|
4196
|
-
paragraph:
|
|
4197
|
-
image:
|
|
4229
|
+
}), ls = {
|
|
4230
|
+
section: No,
|
|
4231
|
+
title: Oo,
|
|
4232
|
+
paragraph: lo,
|
|
4233
|
+
image: Xa,
|
|
4198
4234
|
button: Wr,
|
|
4199
|
-
divider:
|
|
4200
|
-
video:
|
|
4201
|
-
social:
|
|
4202
|
-
menu:
|
|
4203
|
-
table:
|
|
4204
|
-
spacer:
|
|
4205
|
-
html:
|
|
4206
|
-
countdown:
|
|
4235
|
+
divider: Aa,
|
|
4236
|
+
video: cs,
|
|
4237
|
+
social: Uo,
|
|
4238
|
+
menu: eo,
|
|
4239
|
+
table: Qo,
|
|
4240
|
+
spacer: Ko,
|
|
4241
|
+
html: Fa,
|
|
4242
|
+
countdown: T(() => import("./CountdownBlock-MC-mhtQD.js").then((e) => e.n))
|
|
4207
4243
|
};
|
|
4208
|
-
function
|
|
4244
|
+
function us(e) {
|
|
4209
4245
|
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = Y(r);
|
|
4210
4246
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
4211
4247
|
let { resolvedTheme: c } = Er(O(() => t.state.uiTheme)), u = C(n.theme ?? {}), { themeStyles: d } = Or({
|
|
@@ -4237,9 +4273,9 @@ function ss(e) {
|
|
|
4237
4273
|
t: a,
|
|
4238
4274
|
format: o
|
|
4239
4275
|
}), y = Mr();
|
|
4240
|
-
if (Lr(y,
|
|
4276
|
+
if (Lr(y, ls), n.customBlocks?.length) for (let e of n.customBlocks) y.registerCustom(e, Oa);
|
|
4241
4277
|
function b(e) {
|
|
4242
|
-
for (let t of e) y.registerCustom(t,
|
|
4278
|
+
for (let t of e) y.registerCustom(t, Oa);
|
|
4243
4279
|
}
|
|
4244
4280
|
let x = Ln();
|
|
4245
4281
|
if (s() && l(x.dispose), e.containerEl) {
|
|
@@ -4262,18 +4298,18 @@ function ss(e) {
|
|
|
4262
4298
|
q(document, "keydown", S);
|
|
4263
4299
|
let w = C(null);
|
|
4264
4300
|
p(fr, e.editorRoot ?? document), p(pr, w), p(Rn, r), p(zn, t), p(Bn, f), p(Vn, m), p(Hn, h), p(Un, i), p(Wn, d), p(Gn, c), p(Kn, n.blockDefaults), p(qn, y), p(Jn, n.customBlocks ?? []), p(Yn, n.paletteBlocks), p(Xn, Nr(t.content, y));
|
|
4265
|
-
let
|
|
4266
|
-
p(Zn, n.mergeTags?.tags ?? []), p(Qn,
|
|
4267
|
-
let
|
|
4301
|
+
let ee = gt(n.mergeTags?.syntax);
|
|
4302
|
+
p(Zn, n.mergeTags?.tags ?? []), p(Qn, ee), p($n, n.mergeTags?.onRequest ?? null), p(er, n.mergeTags?.autocomplete !== !1), p(tr, br()), p(nr, n.logicTags?.tags ?? []), p(rr, n.logicTags?.pairs ?? []), p(ar, n.logicTags?.onRequest ?? null), p(ir, xr()), p(or, n.onRequestMedia ?? null), p(sr, n.displayConditions?.conditions ?? []), p(cr, n.displayConditions?.allowCustom ?? !1), p(lr, e.capabilities ?? {}), p(ur, v);
|
|
4303
|
+
let T = Sr(n.lint) ? null : Cr({
|
|
4268
4304
|
content: t.content,
|
|
4269
4305
|
options: n.lint ?? {},
|
|
4270
4306
|
updateBlock: t.updateBlock,
|
|
4271
4307
|
updateSettings: t.updateSettings,
|
|
4272
4308
|
removeBlock: t.removeBlock
|
|
4273
4309
|
});
|
|
4274
|
-
p(dr,
|
|
4275
|
-
function
|
|
4276
|
-
_?.(),
|
|
4310
|
+
p(dr, T);
|
|
4311
|
+
function E() {
|
|
4312
|
+
_?.(), T?.destroy(), g?.destroy(), f.destroy();
|
|
4277
4313
|
}
|
|
4278
4314
|
return {
|
|
4279
4315
|
t: a,
|
|
@@ -4287,27 +4323,27 @@ function ss(e) {
|
|
|
4287
4323
|
themeOverrides: u,
|
|
4288
4324
|
registry: y,
|
|
4289
4325
|
keyboardReorder: v,
|
|
4290
|
-
templateLint:
|
|
4326
|
+
templateLint: T,
|
|
4291
4327
|
popoverRoot: w,
|
|
4292
4328
|
registerCustomBlocks: b,
|
|
4293
|
-
destroy:
|
|
4329
|
+
destroy: E
|
|
4294
4330
|
};
|
|
4295
4331
|
}
|
|
4296
4332
|
//#endregion
|
|
4297
4333
|
//#region src/composables/usePopoverRoot.ts
|
|
4298
|
-
function
|
|
4334
|
+
function ds() {
|
|
4299
4335
|
return v(pr, C(null));
|
|
4300
4336
|
}
|
|
4301
4337
|
//#endregion
|
|
4302
4338
|
//#region src/components/TplModal.vue?vue&type=script&setup=true&lang.ts
|
|
4303
|
-
var
|
|
4339
|
+
var fs = ["data-tpl-theme"], ps = /* @__PURE__ */ B({
|
|
4304
4340
|
__name: "TplModal",
|
|
4305
4341
|
props: { visible: { type: Boolean } },
|
|
4306
4342
|
emits: ["close", "keydown"],
|
|
4307
4343
|
setup(e, { emit: t }) {
|
|
4308
4344
|
let n = e, r = t, i = C(null);
|
|
4309
4345
|
Qi(i, O(() => n.visible));
|
|
4310
|
-
let a = v(Gn), s =
|
|
4346
|
+
let a = v(Gn), s = ds();
|
|
4311
4347
|
function c(e) {
|
|
4312
4348
|
e.key === "Escape" && r("close"), r("keydown", e);
|
|
4313
4349
|
}
|
|
@@ -4336,11 +4372,11 @@ var ls = ["data-tpl-theme"], us = /* @__PURE__ */ B({
|
|
|
4336
4372
|
}, [I("div", {
|
|
4337
4373
|
ref_key: "dialogRef",
|
|
4338
4374
|
ref: i
|
|
4339
|
-
}, [o(t.$slots, "default")], 512)], 40,
|
|
4375
|
+
}, [o(t.$slots, "default")], 512)], 40, fs)) : A("", !0)]),
|
|
4340
4376
|
_: 3
|
|
4341
4377
|
})], 8, ["to"])) : A("", !0);
|
|
4342
4378
|
}
|
|
4343
|
-
}),
|
|
4379
|
+
}), ms = class e {
|
|
4344
4380
|
static DEFAULT_BASE_URL = "https://templatical.com";
|
|
4345
4381
|
accessToken = null;
|
|
4346
4382
|
expiresAt = null;
|
|
@@ -4441,8 +4477,8 @@ var ls = ["data-tpl-theme"], us = /* @__PURE__ */ B({
|
|
|
4441
4477
|
return a.status === 401 && (a = await i(await this.refreshToken())), a;
|
|
4442
4478
|
}
|
|
4443
4479
|
};
|
|
4444
|
-
function
|
|
4445
|
-
return e.mode === "direct" ? new
|
|
4480
|
+
function hs(e, t) {
|
|
4481
|
+
return e.mode === "direct" ? new ms({
|
|
4446
4482
|
url: `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}/api/v1/auth/token`,
|
|
4447
4483
|
baseUrl: e.baseUrl,
|
|
4448
4484
|
requestOptions: {
|
|
@@ -4456,7 +4492,7 @@ function fs(e, t) {
|
|
|
4456
4492
|
}
|
|
4457
4493
|
},
|
|
4458
4494
|
onError: t
|
|
4459
|
-
}) : new
|
|
4495
|
+
}) : new ms({
|
|
4460
4496
|
url: e.url,
|
|
4461
4497
|
baseUrl: e.baseUrl,
|
|
4462
4498
|
requestOptions: e.requestOptions,
|
|
@@ -4468,16 +4504,16 @@ function fs(e, t) {
|
|
|
4468
4504
|
function Z(e, t) {
|
|
4469
4505
|
return e.replace(/\{(\w+)\}/g, (e, n) => encodeURIComponent(t[n] ?? ""));
|
|
4470
4506
|
}
|
|
4471
|
-
var
|
|
4507
|
+
var gs = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${gs}/templates/{template}`, _s = `${Q}/ai`, vs = `${gs}/media`, ys = `${vs}/folders`, bs = `${gs}/saved-modules`, $ = {
|
|
4472
4508
|
health: "/api/v1/health",
|
|
4473
|
-
"projects.config": `${
|
|
4474
|
-
"broadcasting.auth": `${
|
|
4475
|
-
"templates.store": `${
|
|
4509
|
+
"projects.config": `${gs}/config`,
|
|
4510
|
+
"broadcasting.auth": `${gs}/broadcasting/auth`,
|
|
4511
|
+
"templates.store": `${gs}/templates`,
|
|
4476
4512
|
"templates.show": `${Q}`,
|
|
4477
4513
|
"templates.update": `${Q}`,
|
|
4478
4514
|
"templates.destroy": `${Q}`,
|
|
4479
4515
|
"templates.export": `${Q}/export`,
|
|
4480
|
-
"templates.importFromBeefree": `${
|
|
4516
|
+
"templates.importFromBeefree": `${gs}/templates/import/from-beefree`,
|
|
4481
4517
|
"templates.sendTestEmail": `${Q}/send-test-email`,
|
|
4482
4518
|
"snapshots.index": `${Q}/snapshots`,
|
|
4483
4519
|
"snapshots.store": `${Q}/snapshots`,
|
|
@@ -4488,31 +4524,31 @@ var ps = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${ps}/templates/{te
|
|
|
4488
4524
|
"comments.update": `${Q}/comments/{comment}`,
|
|
4489
4525
|
"comments.destroy": `${Q}/comments/{comment}`,
|
|
4490
4526
|
"comments.resolve": `${Q}/comments/{comment}/resolve`,
|
|
4491
|
-
"ai.generate": `${
|
|
4492
|
-
"ai.conversationMessages": `${
|
|
4493
|
-
"ai.suggestions": `${
|
|
4494
|
-
"ai.rewriteText": `${
|
|
4495
|
-
"ai.score": `${
|
|
4496
|
-
"ai.fixFinding": `${
|
|
4497
|
-
"ai.generateFromDesign": `${
|
|
4498
|
-
"media.upload": `${
|
|
4499
|
-
"media.browse": `${
|
|
4500
|
-
"media.delete": `${
|
|
4501
|
-
"media.move": `${
|
|
4502
|
-
"media.update": `${
|
|
4503
|
-
"media.replace": `${
|
|
4504
|
-
"media.checkUsage": `${
|
|
4505
|
-
"media.frequentlyUsed": `${
|
|
4506
|
-
"media.importFromUrl": `${
|
|
4507
|
-
"folders.index": `${
|
|
4508
|
-
"folders.store": `${
|
|
4509
|
-
"folders.update": `${
|
|
4510
|
-
"folders.destroy": `${
|
|
4511
|
-
"savedModules.index": `${
|
|
4512
|
-
"savedModules.store": `${
|
|
4513
|
-
"savedModules.update": `${
|
|
4514
|
-
"savedModules.destroy": `${
|
|
4515
|
-
},
|
|
4527
|
+
"ai.generate": `${_s}/generate`,
|
|
4528
|
+
"ai.conversationMessages": `${_s}/conversation-messages`,
|
|
4529
|
+
"ai.suggestions": `${_s}/suggestions`,
|
|
4530
|
+
"ai.rewriteText": `${_s}/rewrite-text`,
|
|
4531
|
+
"ai.score": `${_s}/score`,
|
|
4532
|
+
"ai.fixFinding": `${_s}/fix-finding`,
|
|
4533
|
+
"ai.generateFromDesign": `${_s}/generate-from-design`,
|
|
4534
|
+
"media.upload": `${vs}/upload`,
|
|
4535
|
+
"media.browse": `${vs}/browse`,
|
|
4536
|
+
"media.delete": `${vs}/delete`,
|
|
4537
|
+
"media.move": `${vs}/move`,
|
|
4538
|
+
"media.update": `${vs}/{media}`,
|
|
4539
|
+
"media.replace": `${vs}/{media}/replace`,
|
|
4540
|
+
"media.checkUsage": `${vs}/check-usage`,
|
|
4541
|
+
"media.frequentlyUsed": `${vs}/frequently-used`,
|
|
4542
|
+
"media.importFromUrl": `${vs}/import-from-url`,
|
|
4543
|
+
"folders.index": `${ys}`,
|
|
4544
|
+
"folders.store": `${ys}`,
|
|
4545
|
+
"folders.update": `${ys}/{mediaFolder}`,
|
|
4546
|
+
"folders.destroy": `${ys}/{mediaFolder}`,
|
|
4547
|
+
"savedModules.index": `${bs}`,
|
|
4548
|
+
"savedModules.store": `${bs}`,
|
|
4549
|
+
"savedModules.update": `${bs}/{savedModule}`,
|
|
4550
|
+
"savedModules.destroy": `${bs}/{savedModule}`
|
|
4551
|
+
}, xs = class {
|
|
4516
4552
|
authManager;
|
|
4517
4553
|
constructor(e) {
|
|
4518
4554
|
this.authManager = e;
|
|
@@ -4698,14 +4734,14 @@ var ps = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${ps}/templates/{te
|
|
|
4698
4734
|
};
|
|
4699
4735
|
//#endregion
|
|
4700
4736
|
//#region ../core/src/cloud/websocket-client.ts
|
|
4701
|
-
function
|
|
4737
|
+
function Ss(e) {
|
|
4702
4738
|
return {
|
|
4703
4739
|
host: e.host,
|
|
4704
4740
|
port: e.port,
|
|
4705
4741
|
appKey: e.app_key
|
|
4706
4742
|
};
|
|
4707
4743
|
}
|
|
4708
|
-
var
|
|
4744
|
+
var Cs = class {
|
|
4709
4745
|
pusher = null;
|
|
4710
4746
|
authManager;
|
|
4711
4747
|
config;
|
|
@@ -4772,7 +4808,7 @@ var bs = class {
|
|
|
4772
4808
|
};
|
|
4773
4809
|
//#endregion
|
|
4774
4810
|
//#region ../core/src/cloud/mcp-operation-handler.ts
|
|
4775
|
-
function
|
|
4811
|
+
function ws(e, t) {
|
|
4776
4812
|
let { operation: n, data: r } = t;
|
|
4777
4813
|
switch (n) {
|
|
4778
4814
|
case "add_block":
|
|
@@ -4800,11 +4836,11 @@ function xs(e, t) {
|
|
|
4800
4836
|
}
|
|
4801
4837
|
//#endregion
|
|
4802
4838
|
//#region ../core/src/cloud/editor.ts
|
|
4803
|
-
function
|
|
4839
|
+
function Ts(e) {
|
|
4804
4840
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
4805
4841
|
}
|
|
4806
|
-
function
|
|
4807
|
-
let t = new
|
|
4842
|
+
function Es(e) {
|
|
4843
|
+
let t = new xs(e.authManager), n = S({
|
|
4808
4844
|
template: null,
|
|
4809
4845
|
content: We(e.defaultFontFamily, e.templateDefaults),
|
|
4810
4846
|
selectedBlockId: null,
|
|
@@ -4910,7 +4946,7 @@ function Cs(e) {
|
|
|
4910
4946
|
let l;
|
|
4911
4947
|
if (r) {
|
|
4912
4948
|
let e = o(n.content.blocks, r);
|
|
4913
|
-
if (!e || e.type !== "section" || i < 0 || i >=
|
|
4949
|
+
if (!e || e.type !== "section" || i < 0 || i >= Ts(e.columns)) return;
|
|
4914
4950
|
e.children[i] = e.children[i] || [], l = e.children[i];
|
|
4915
4951
|
} else l = n.content.blocks;
|
|
4916
4952
|
let [u] = a.blocks.splice(c, 1);
|
|
@@ -4951,17 +4987,17 @@ function Cs(e) {
|
|
|
4951
4987
|
n.isSaving = !1;
|
|
4952
4988
|
}
|
|
4953
4989
|
}
|
|
4954
|
-
async function
|
|
4990
|
+
async function ee() {
|
|
4955
4991
|
if (n.template?.id) try {
|
|
4956
4992
|
await t.createSnapshot(n.template.id, n.content);
|
|
4957
4993
|
} catch (t) {
|
|
4958
4994
|
throw e.onError?.(t), t;
|
|
4959
4995
|
}
|
|
4960
4996
|
}
|
|
4961
|
-
function
|
|
4997
|
+
function T() {
|
|
4962
4998
|
return n.template?.id !== void 0;
|
|
4963
4999
|
}
|
|
4964
|
-
function
|
|
5000
|
+
function E() {
|
|
4965
5001
|
n.isDirty = !0;
|
|
4966
5002
|
}
|
|
4967
5003
|
function D(e) {
|
|
@@ -4995,18 +5031,18 @@ function Cs(e) {
|
|
|
4995
5031
|
create: b,
|
|
4996
5032
|
load: C,
|
|
4997
5033
|
save: w,
|
|
4998
|
-
createSnapshot:
|
|
4999
|
-
hasTemplate:
|
|
5000
|
-
markDirty:
|
|
5034
|
+
createSnapshot: ee,
|
|
5035
|
+
hasTemplate: T,
|
|
5036
|
+
markDirty: E
|
|
5001
5037
|
};
|
|
5002
5038
|
}
|
|
5003
5039
|
//#endregion
|
|
5004
5040
|
//#region ../core/src/cloud/ai-chat.ts
|
|
5005
|
-
var
|
|
5006
|
-
function
|
|
5007
|
-
return `msg_${Date.now()}_${++
|
|
5041
|
+
var Ds = 0;
|
|
5042
|
+
function Os() {
|
|
5043
|
+
return `msg_${Date.now()}_${++Ds}`;
|
|
5008
5044
|
}
|
|
5009
|
-
function
|
|
5045
|
+
function ks(e) {
|
|
5010
5046
|
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);
|
|
5011
5047
|
function _(e, t) {
|
|
5012
5048
|
let n = a.value.findIndex((t) => t.id === e);
|
|
@@ -5100,14 +5136,14 @@ function Es(e) {
|
|
|
5100
5136
|
let v = n();
|
|
5101
5137
|
if (!v) throw Error("Template must be saved before using AI generation");
|
|
5102
5138
|
o.value = !0, c.value = null, l.value = null, h.value = [];
|
|
5103
|
-
let y =
|
|
5139
|
+
let y = Os();
|
|
5104
5140
|
a.value = [...a.value, {
|
|
5105
5141
|
id: y,
|
|
5106
5142
|
role: "user",
|
|
5107
5143
|
content: e,
|
|
5108
5144
|
timestamp: Date.now()
|
|
5109
5145
|
}];
|
|
5110
|
-
let b =
|
|
5146
|
+
let b = Os();
|
|
5111
5147
|
a.value = [...a.value, {
|
|
5112
5148
|
id: b,
|
|
5113
5149
|
role: "assistant",
|
|
@@ -5198,7 +5234,7 @@ function Es(e) {
|
|
|
5198
5234
|
}
|
|
5199
5235
|
//#endregion
|
|
5200
5236
|
//#region ../core/src/cloud/ai-config.ts
|
|
5201
|
-
function
|
|
5237
|
+
function As(e) {
|
|
5202
5238
|
function t(t) {
|
|
5203
5239
|
return e !== !1 && e?.[t] !== !1;
|
|
5204
5240
|
}
|
|
@@ -5209,7 +5245,7 @@ function Ds(e) {
|
|
|
5209
5245
|
}
|
|
5210
5246
|
//#endregion
|
|
5211
5247
|
//#region ../core/src/cloud/template-scoring.ts
|
|
5212
|
-
function
|
|
5248
|
+
function js(e) {
|
|
5213
5249
|
let { authManager: t, getTemplateId: n } = e, r = C(!1), i = C(null), a = C(null), o = C(null), s = C(""), c = C(null);
|
|
5214
5250
|
async function l(e, o) {
|
|
5215
5251
|
let s = n();
|
|
@@ -5354,7 +5390,7 @@ function Os(e) {
|
|
|
5354
5390
|
}
|
|
5355
5391
|
//#endregion
|
|
5356
5392
|
//#region ../core/src/cloud/design-reference.ts
|
|
5357
|
-
function
|
|
5393
|
+
function Ms(e) {
|
|
5358
5394
|
let { authManager: t, getTemplateId: n, onApply: r, onError: i } = e, a = C(!1), o = C(null);
|
|
5359
5395
|
async function s(e) {
|
|
5360
5396
|
let s = n();
|
|
@@ -5417,8 +5453,8 @@ function ks(e) {
|
|
|
5417
5453
|
}
|
|
5418
5454
|
//#endregion
|
|
5419
5455
|
//#region ../core/src/cloud/comments.ts
|
|
5420
|
-
function
|
|
5421
|
-
let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new
|
|
5456
|
+
function Ns(e) {
|
|
5457
|
+
let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new xs(t), c = C([]), l = C(!1), u = C(!1), d = O(() => (o?.() ?? !1) && t.userConfig !== null), f = O(() => {
|
|
5422
5458
|
let e = 0;
|
|
5423
5459
|
for (let t of c.value) e += 1 + (t.replies?.length ?? 0);
|
|
5424
5460
|
return e;
|
|
@@ -5544,17 +5580,17 @@ function As(e) {
|
|
|
5544
5580
|
u.value = !1;
|
|
5545
5581
|
}
|
|
5546
5582
|
}
|
|
5547
|
-
function
|
|
5583
|
+
function ee(e) {
|
|
5548
5584
|
if (e.parent_id) {
|
|
5549
5585
|
let t = v(e.parent_id);
|
|
5550
5586
|
t && (t.replies = [...t.replies ?? [], e]);
|
|
5551
5587
|
} else c.value = [...c.value, e];
|
|
5552
5588
|
_("created", e);
|
|
5553
5589
|
}
|
|
5554
|
-
function
|
|
5590
|
+
function T(e) {
|
|
5555
5591
|
D(e.id, e), _("updated", e);
|
|
5556
5592
|
}
|
|
5557
|
-
function
|
|
5593
|
+
function E(e, t) {
|
|
5558
5594
|
let n = v(e), r = n ? {
|
|
5559
5595
|
...n,
|
|
5560
5596
|
replies: [...n.replies ?? []]
|
|
@@ -5610,24 +5646,24 @@ function As(e) {
|
|
|
5610
5646
|
editComment: x,
|
|
5611
5647
|
removeComment: S,
|
|
5612
5648
|
toggleResolve: w,
|
|
5613
|
-
applyRemoteCreate:
|
|
5614
|
-
applyRemoteUpdate:
|
|
5615
|
-
applyRemoteDelete:
|
|
5649
|
+
applyRemoteCreate: ee,
|
|
5650
|
+
applyRemoteUpdate: T,
|
|
5651
|
+
applyRemoteDelete: E
|
|
5616
5652
|
};
|
|
5617
5653
|
}
|
|
5618
5654
|
//#endregion
|
|
5619
5655
|
//#region ../core/src/cloud/comment-listener.ts
|
|
5620
|
-
function
|
|
5656
|
+
function Ps(e) {
|
|
5621
5657
|
let { comments: t, channel: n } = e;
|
|
5622
5658
|
H(n, (e, n) => {
|
|
5623
5659
|
n && n.unbind("comment-broadcast"), e && e.bind("comment-broadcast", (e) => {
|
|
5624
|
-
|
|
5660
|
+
Fs(t, e);
|
|
5625
5661
|
});
|
|
5626
5662
|
}), l(() => {
|
|
5627
5663
|
n.value?.unbind("comment-broadcast");
|
|
5628
5664
|
});
|
|
5629
5665
|
}
|
|
5630
|
-
function
|
|
5666
|
+
function Fs(e, t) {
|
|
5631
5667
|
switch (t.action) {
|
|
5632
5668
|
case "comment_created":
|
|
5633
5669
|
e.applyRemoteCreate(t.comment);
|
|
@@ -5646,7 +5682,7 @@ function Ms(e, t) {
|
|
|
5646
5682
|
}
|
|
5647
5683
|
//#endregion
|
|
5648
5684
|
//#region ../core/src/cloud/collaboration.ts
|
|
5649
|
-
var
|
|
5685
|
+
var Is = [
|
|
5650
5686
|
"pusher:member_added",
|
|
5651
5687
|
"pusher:member_removed",
|
|
5652
5688
|
"client-block_locked",
|
|
@@ -5654,10 +5690,10 @@ var Ns = [
|
|
|
5654
5690
|
"client-operation",
|
|
5655
5691
|
"mcp-operation"
|
|
5656
5692
|
];
|
|
5657
|
-
function
|
|
5658
|
-
for (let t of
|
|
5693
|
+
function Ls(e) {
|
|
5694
|
+
for (let t of Is) e.unbind(t);
|
|
5659
5695
|
}
|
|
5660
|
-
var
|
|
5696
|
+
var Rs = [
|
|
5661
5697
|
"#3b82f6",
|
|
5662
5698
|
"#ef4444",
|
|
5663
5699
|
"#10b981",
|
|
@@ -5669,10 +5705,10 @@ var Fs = [
|
|
|
5669
5705
|
"#6366f1",
|
|
5670
5706
|
"#14b8a6"
|
|
5671
5707
|
];
|
|
5672
|
-
function
|
|
5708
|
+
function zs(e) {
|
|
5673
5709
|
let { authManager: t, editor: n, channel: r } = e, i = C([]), a = C(/* @__PURE__ */ new Map()), o = 0, s = !1, c = O(() => t.userConfig?.id ?? "");
|
|
5674
5710
|
function u() {
|
|
5675
|
-
let e =
|
|
5711
|
+
let e = Rs[o % Rs.length];
|
|
5676
5712
|
return o++, e;
|
|
5677
5713
|
}
|
|
5678
5714
|
function d(e) {
|
|
@@ -5714,7 +5750,7 @@ function Is(e) {
|
|
|
5714
5750
|
function h(e) {
|
|
5715
5751
|
s = !0;
|
|
5716
5752
|
try {
|
|
5717
|
-
|
|
5753
|
+
ws(n, e);
|
|
5718
5754
|
} finally {
|
|
5719
5755
|
s = !1;
|
|
5720
5756
|
}
|
|
@@ -5734,7 +5770,7 @@ function Is(e) {
|
|
|
5734
5770
|
return H(() => n.state.selectedBlockId, (e, t) => {
|
|
5735
5771
|
s || (t && v(t), e && _(e));
|
|
5736
5772
|
}), H(r, (t, n) => {
|
|
5737
|
-
if (n &&
|
|
5773
|
+
if (n && Ls(n), !t) {
|
|
5738
5774
|
i.value = [], a.value = /* @__PURE__ */ new Map(), o = 0;
|
|
5739
5775
|
return;
|
|
5740
5776
|
}
|
|
@@ -5766,7 +5802,7 @@ function Is(e) {
|
|
|
5766
5802
|
h(e);
|
|
5767
5803
|
});
|
|
5768
5804
|
}), l(() => {
|
|
5769
|
-
r.value &&
|
|
5805
|
+
r.value && Ls(r.value);
|
|
5770
5806
|
}), {
|
|
5771
5807
|
collaborators: i,
|
|
5772
5808
|
lockedBlocks: a,
|
|
@@ -5776,7 +5812,7 @@ function Is(e) {
|
|
|
5776
5812
|
}
|
|
5777
5813
|
//#endregion
|
|
5778
5814
|
//#region ../core/src/cloud/collaboration-broadcast.ts
|
|
5779
|
-
function
|
|
5815
|
+
function Bs(e, t) {
|
|
5780
5816
|
let n = e.addBlock, r = e.updateBlock, i = e.removeBlock, a = e.moveBlock, o = e.updateSettings, s = e.setContent;
|
|
5781
5817
|
e.addBlock = (e, r, i, a) => {
|
|
5782
5818
|
n(e, r, i, a), t._broadcastOperation({
|
|
@@ -5831,11 +5867,11 @@ function Ls(e, t) {
|
|
|
5831
5867
|
}
|
|
5832
5868
|
//#endregion
|
|
5833
5869
|
//#region ../core/src/cloud/web-socket.ts
|
|
5834
|
-
function
|
|
5870
|
+
function Vs(e) {
|
|
5835
5871
|
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = null, o = null;
|
|
5836
5872
|
async function s(e, s) {
|
|
5837
5873
|
if (a) return;
|
|
5838
|
-
a = new
|
|
5874
|
+
a = new Cs({
|
|
5839
5875
|
authManager: t,
|
|
5840
5876
|
config: s,
|
|
5841
5877
|
onError: n
|
|
@@ -5863,8 +5899,8 @@ function Rs(e) {
|
|
|
5863
5899
|
}
|
|
5864
5900
|
//#endregion
|
|
5865
5901
|
//#region ../core/src/cloud/saved-modules.ts
|
|
5866
|
-
function
|
|
5867
|
-
let t = new
|
|
5902
|
+
function Hs(e) {
|
|
5903
|
+
let t = new xs(e.authManager), n = C([]), r = C(!1);
|
|
5868
5904
|
async function i(i) {
|
|
5869
5905
|
r.value = !0;
|
|
5870
5906
|
try {
|
|
@@ -5912,8 +5948,8 @@ function zs(e) {
|
|
|
5912
5948
|
}
|
|
5913
5949
|
//#endregion
|
|
5914
5950
|
//#region ../core/src/cloud/snapshots.ts
|
|
5915
|
-
function
|
|
5916
|
-
let t = new
|
|
5951
|
+
function Us(e) {
|
|
5952
|
+
let t = new xs(e.authManager), n = C([]), r = C(!1), i = C(!1);
|
|
5917
5953
|
async function a() {
|
|
5918
5954
|
r.value = !0;
|
|
5919
5955
|
try {
|
|
@@ -5945,8 +5981,8 @@ function Bs(e) {
|
|
|
5945
5981
|
}
|
|
5946
5982
|
//#endregion
|
|
5947
5983
|
//#region ../core/src/cloud/test-email.ts
|
|
5948
|
-
function
|
|
5949
|
-
let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new
|
|
5984
|
+
function Ws(e) {
|
|
5985
|
+
let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new xs(t), l = C(!1), u = C(null), d = C(null);
|
|
5950
5986
|
o && H(o, (e) => {
|
|
5951
5987
|
e && (d.value = t.testEmailConfig);
|
|
5952
5988
|
}, { immediate: !0 });
|
|
@@ -5982,8 +6018,8 @@ function Vs(e) {
|
|
|
5982
6018
|
}
|
|
5983
6019
|
//#endregion
|
|
5984
6020
|
//#region ../core/src/cloud/export.ts
|
|
5985
|
-
function
|
|
5986
|
-
let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new
|
|
6021
|
+
function Gs(e) {
|
|
6022
|
+
let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new xs(t);
|
|
5987
6023
|
function a() {
|
|
5988
6024
|
let e = n?.();
|
|
5989
6025
|
return {
|
|
@@ -6009,8 +6045,8 @@ function Hs(e) {
|
|
|
6009
6045
|
}
|
|
6010
6046
|
//#endregion
|
|
6011
6047
|
//#region ../core/src/cloud/plan-config.ts
|
|
6012
|
-
function
|
|
6013
|
-
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new
|
|
6048
|
+
function Ks(e) {
|
|
6049
|
+
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new xs(t), o = O(() => r.value?.features ?? null);
|
|
6014
6050
|
function s(e) {
|
|
6015
6051
|
return r.value?.features[e] ?? !1;
|
|
6016
6052
|
}
|
|
@@ -6036,11 +6072,11 @@ function Us(e) {
|
|
|
6036
6072
|
}
|
|
6037
6073
|
//#endregion
|
|
6038
6074
|
//#region ../core/src/cloud/health-check.ts
|
|
6039
|
-
var
|
|
6040
|
-
function
|
|
6075
|
+
var qs = 5e3;
|
|
6076
|
+
function Js(e) {
|
|
6041
6077
|
return e.authManager ? e.authManager.resolveUrl($.health) : `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}${$.health}`;
|
|
6042
6078
|
}
|
|
6043
|
-
async function
|
|
6079
|
+
async function Ys(e, t) {
|
|
6044
6080
|
let n = performance.now();
|
|
6045
6081
|
try {
|
|
6046
6082
|
let r = t ? await t.authenticatedFetch($.health, {
|
|
@@ -6092,7 +6128,7 @@ async function Ks(e, t) {
|
|
|
6092
6128
|
};
|
|
6093
6129
|
}
|
|
6094
6130
|
}
|
|
6095
|
-
async function
|
|
6131
|
+
async function Xs(e) {
|
|
6096
6132
|
if (!e?.host || !e?.app_key) return {
|
|
6097
6133
|
ok: !1,
|
|
6098
6134
|
error: "WebSocket configuration not available"
|
|
@@ -6108,7 +6144,7 @@ async function qs(e) {
|
|
|
6108
6144
|
ok: !1,
|
|
6109
6145
|
error: "WebSocket connection timed out"
|
|
6110
6146
|
});
|
|
6111
|
-
},
|
|
6147
|
+
}, qs);
|
|
6112
6148
|
try {
|
|
6113
6149
|
n = new WebSocket(t);
|
|
6114
6150
|
} catch (t) {
|
|
@@ -6128,8 +6164,8 @@ async function qs(e) {
|
|
|
6128
6164
|
};
|
|
6129
6165
|
});
|
|
6130
6166
|
}
|
|
6131
|
-
async function
|
|
6132
|
-
let t = await
|
|
6167
|
+
async function Zs(e = {}) {
|
|
6168
|
+
let t = await Ys(Js(e), e.authManager), n = await Xs(t.wsConfig);
|
|
6133
6169
|
return {
|
|
6134
6170
|
api: t.api,
|
|
6135
6171
|
websocket: n,
|
|
@@ -6139,29 +6175,29 @@ async function Js(e = {}) {
|
|
|
6139
6175
|
}
|
|
6140
6176
|
//#endregion
|
|
6141
6177
|
//#region ../core/src/cloud/mcp-listener.ts
|
|
6142
|
-
function
|
|
6178
|
+
function Qs(e) {
|
|
6143
6179
|
let { editor: t, channel: n, onOperation: r } = e;
|
|
6144
6180
|
H(n, (e, n) => {
|
|
6145
6181
|
n && n.unbind("mcp-operation"), e && e.bind("mcp-operation", (e) => {
|
|
6146
|
-
|
|
6182
|
+
ws(t, e), r?.(e);
|
|
6147
6183
|
});
|
|
6148
6184
|
});
|
|
6149
6185
|
}
|
|
6150
6186
|
//#endregion
|
|
6151
6187
|
//#region src/cloud/components/AiChatSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
6152
|
-
var
|
|
6188
|
+
var $s = {
|
|
6153
6189
|
key: 0,
|
|
6154
6190
|
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)]"
|
|
6155
|
-
},
|
|
6191
|
+
}, ec = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, tc = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, nc = { class: "tpl:flex tpl:items-center tpl:gap-1" }, rc = ["title"], ic = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col" }, ac = {
|
|
6156
6192
|
key: 0,
|
|
6157
6193
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6158
|
-
},
|
|
6194
|
+
}, oc = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, sc = {
|
|
6159
6195
|
key: 1,
|
|
6160
6196
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6161
|
-
},
|
|
6197
|
+
}, cc = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, lc = {
|
|
6162
6198
|
key: 2,
|
|
6163
6199
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6164
|
-
},
|
|
6200
|
+
}, uc = {
|
|
6165
6201
|
key: 0,
|
|
6166
6202
|
class: "tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm",
|
|
6167
6203
|
style: {
|
|
@@ -6170,10 +6206,10 @@ var Xs = {
|
|
|
6170
6206
|
"max-width": "85%",
|
|
6171
6207
|
"box-shadow": "var(--tpl-shadow)"
|
|
6172
6208
|
}
|
|
6173
|
-
},
|
|
6209
|
+
}, dc = {
|
|
6174
6210
|
key: 1,
|
|
6175
6211
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6176
|
-
},
|
|
6212
|
+
}, fc = {
|
|
6177
6213
|
key: 1,
|
|
6178
6214
|
class: "tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
|
|
6179
6215
|
style: {
|
|
@@ -6182,21 +6218,21 @@ var Xs = {
|
|
|
6182
6218
|
color: "var(--tpl-text)",
|
|
6183
6219
|
"box-shadow": "var(--tpl-shadow)"
|
|
6184
6220
|
}
|
|
6185
|
-
},
|
|
6221
|
+
}, pc = {
|
|
6186
6222
|
key: 0,
|
|
6187
6223
|
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",
|
|
6188
6224
|
style: {
|
|
6189
6225
|
"background-color": "var(--tpl-danger-light)",
|
|
6190
6226
|
color: "var(--tpl-danger)"
|
|
6191
6227
|
}
|
|
6192
|
-
},
|
|
6228
|
+
}, mc = {
|
|
6193
6229
|
key: 1,
|
|
6194
6230
|
class: "tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3",
|
|
6195
6231
|
style: {
|
|
6196
6232
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n )",
|
|
6197
6233
|
"backdrop-filter": "blur(2px)"
|
|
6198
6234
|
}
|
|
6199
|
-
},
|
|
6235
|
+
}, hc = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, gc = ["onClick"], _c = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, vc = { 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)]" }, yc = ["placeholder", "disabled"], bc = ["disabled"], xc = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Sc = /*@__PURE__*/ B({
|
|
6200
6236
|
__name: "AiChatSidebar",
|
|
6201
6237
|
props: {
|
|
6202
6238
|
visible: { type: Boolean },
|
|
@@ -6204,7 +6240,7 @@ var Xs = {
|
|
|
6204
6240
|
},
|
|
6205
6241
|
emits: ["close"],
|
|
6206
6242
|
setup(e, { emit: t }) {
|
|
6207
|
-
let n = e, r = t, i = J(yr, "AiChatSidebar"), a = J(zn, "AiChatSidebar"), o = J(mr, "AiChatSidebar"), s = v(Zn, []), l =
|
|
6243
|
+
let n = e, r = t, i = J(yr, "AiChatSidebar"), a = J(zn, "AiChatSidebar"), o = J(mr, "AiChatSidebar"), s = v(Zn, []), l = Ia(), u = ks({
|
|
6208
6244
|
authManager: o,
|
|
6209
6245
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
6210
6246
|
onApply: n.onApply,
|
|
@@ -6230,18 +6266,18 @@ var Xs = {
|
|
|
6230
6266
|
(u.messages.value?.length ?? 0) === 0 && a.content.value.blocks.length === 0 && u.loadSuggestions(a.content.value, s);
|
|
6231
6267
|
}
|
|
6232
6268
|
});
|
|
6233
|
-
async function
|
|
6269
|
+
async function ee() {
|
|
6234
6270
|
let e = d.value.trim();
|
|
6235
6271
|
!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()));
|
|
6236
6272
|
}
|
|
6237
|
-
function
|
|
6273
|
+
function T(e) {
|
|
6238
6274
|
return e.replace(/```json[\s\S]*?```/g, "").replace(/```json[\s\S]*/g, "").trim();
|
|
6239
6275
|
}
|
|
6240
|
-
function
|
|
6241
|
-
y(), d.value = e,
|
|
6276
|
+
function E(e) {
|
|
6277
|
+
y(), d.value = e, ee();
|
|
6242
6278
|
}
|
|
6243
6279
|
function te(e) {
|
|
6244
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(),
|
|
6280
|
+
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), ee());
|
|
6245
6281
|
}
|
|
6246
6282
|
return (t, n) => (f(), N(ie, {
|
|
6247
6283
|
"enter-active-class": "tpl-ai-slide-enter-active",
|
|
@@ -6251,11 +6287,11 @@ var Xs = {
|
|
|
6251
6287
|
"leave-from-class": "tpl:translate-x-0",
|
|
6252
6288
|
"leave-to-class": "tpl:translate-x-full"
|
|
6253
6289
|
}, {
|
|
6254
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
6255
|
-
I("div",
|
|
6290
|
+
default: b(() => [e.visible ? (f(), k("div", $s, [
|
|
6291
|
+
I("div", ec, [I("div", tc, [V(j(Ni), {
|
|
6256
6292
|
size: 13,
|
|
6257
6293
|
"stroke-width": 2
|
|
6258
|
-
}), I("span", null, D(j(i).aiChat.title), 1)]), I("div",
|
|
6294
|
+
}), I("span", null, D(j(i).aiChat.title), 1)]), I("div", nc, [(j(u).messages.value?.length ?? 0) > 0 ? (f(), k("button", {
|
|
6259
6295
|
key: 0,
|
|
6260
6296
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6261
6297
|
title: j(i).aiChat.clear,
|
|
@@ -6263,30 +6299,30 @@ var Xs = {
|
|
|
6263
6299
|
}, [V(j(Fi), {
|
|
6264
6300
|
size: 14,
|
|
6265
6301
|
"stroke-width": 2
|
|
6266
|
-
})], 8,
|
|
6302
|
+
})], 8, rc)) : A("", !0), I("button", {
|
|
6267
6303
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6268
6304
|
onClick: n[1] ||= (e) => r("close")
|
|
6269
6305
|
}, [V(j(Bi), {
|
|
6270
6306
|
size: 14,
|
|
6271
6307
|
"stroke-width": 2
|
|
6272
6308
|
})])])]),
|
|
6273
|
-
I("div",
|
|
6309
|
+
I("div", ic, [
|
|
6274
6310
|
I("div", {
|
|
6275
6311
|
ref_key: "messagesContainer",
|
|
6276
6312
|
ref: p,
|
|
6277
6313
|
class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
|
|
6278
|
-
}, [j(u).isLoadingHistory.value ? (f(), k("div",
|
|
6314
|
+
}, [j(u).isLoadingHistory.value ? (f(), k("div", ac, [V(j(xi), {
|
|
6279
6315
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
6280
6316
|
size: 24,
|
|
6281
6317
|
"stroke-width": 2
|
|
6282
|
-
}), I("p",
|
|
6318
|
+
}), I("p", oc, D(j(i).aiChat.loadingHistory), 1)])) : (j(u).messages.value?.length ?? 0) === 0 ? (f(), k("div", sc, [V(j(Ni), {
|
|
6283
6319
|
size: 32,
|
|
6284
6320
|
"stroke-width": 1.5,
|
|
6285
6321
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6286
|
-
}), I("p",
|
|
6322
|
+
}), I("p", cc, D(j(i).aiChat.placeholder), 1)])) : (f(), k("div", lc, [(f(!0), k(R, null, h(j(u).messages.value, (e, t) => (f(), k("div", {
|
|
6287
6323
|
key: e.id,
|
|
6288
6324
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6289
|
-
}, [e.role === "user" ? (f(), k("div",
|
|
6325
|
+
}, [e.role === "user" ? (f(), k("div", uc, D(e.content), 1)) : (f(), k("div", dc, [!T(e.content) && j(u).isGenerating.value && t === (j(u).messages.value?.length ?? 0) - 1 ? (f(), N(Yi, { key: 0 })) : (f(), k("div", fc, D(T(e.content) || j(i).aiChat.applied), 1)), e.id === j(u).lastApplyMessageId.value && !j(u).isGenerating.value ? (f(), k("button", {
|
|
6290
6326
|
key: 2,
|
|
6291
6327
|
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",
|
|
6292
6328
|
style: {
|
|
@@ -6302,12 +6338,12 @@ var Xs = {
|
|
|
6302
6338
|
size: 12,
|
|
6303
6339
|
"stroke-width": 2
|
|
6304
6340
|
}), z(" " + D(j(i).aiChat.revert), 1)], 64))])) : A("", !0)]))]))), 128))]))], 512),
|
|
6305
|
-
j(u).error.value ? (f(), k("div",
|
|
6341
|
+
j(u).error.value ? (f(), k("div", pc, [V(j(si), {
|
|
6306
6342
|
size: 14,
|
|
6307
6343
|
"stroke-width": 2,
|
|
6308
6344
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
6309
6345
|
}), I("span", null, D(j(u).error.value === "ai_apply_failed" ? j(i).aiChat.applyFailed : j(i).aiChat.error), 1)])) : A("", !0),
|
|
6310
|
-
(j(u).suggestions.value?.length ?? 0) > 0 ? (f(), k("div",
|
|
6346
|
+
(j(u).suggestions.value?.length ?? 0) > 0 ? (f(), k("div", mc, [I("div", hc, [(f(!0), k(R, null, h(j(u).suggestions.value ?? [], (e, t) => (f(), k("button", {
|
|
6311
6347
|
key: t,
|
|
6312
6348
|
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"]),
|
|
6313
6349
|
style: {
|
|
@@ -6316,111 +6352,111 @@ var Xs = {
|
|
|
6316
6352
|
"background-color": "var(--tpl-bg)",
|
|
6317
6353
|
"box-shadow": "var(--tpl-shadow)"
|
|
6318
6354
|
},
|
|
6319
|
-
onClick: (t) =>
|
|
6320
|
-
}, D(e), 11,
|
|
6355
|
+
onClick: (t) => E(e)
|
|
6356
|
+
}, D(e), 11, gc))), 128))])])) : A("", !0)
|
|
6321
6357
|
]),
|
|
6322
|
-
I("div",
|
|
6358
|
+
I("div", _c, [I("div", vc, [c(I("textarea", {
|
|
6323
6359
|
"onUpdate:modelValue": n[3] ||= (e) => d.value = e,
|
|
6324
6360
|
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)]",
|
|
6325
6361
|
placeholder: j(i).aiChat.inputPlaceholder,
|
|
6326
6362
|
disabled: j(u).isGenerating.value,
|
|
6327
6363
|
rows: "3",
|
|
6328
6364
|
onKeydown: te
|
|
6329
|
-
}, null, 40,
|
|
6365
|
+
}, null, 40, yc), [[ae, d.value]]), I("button", {
|
|
6330
6366
|
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)]",
|
|
6331
6367
|
disabled: !d.value.trim() || j(u).isGenerating.value,
|
|
6332
|
-
onClick:
|
|
6368
|
+
onClick: ee
|
|
6333
6369
|
}, [V(j(ki), {
|
|
6334
6370
|
size: 16,
|
|
6335
6371
|
"stroke-width": 2
|
|
6336
|
-
})], 8,
|
|
6372
|
+
})], 8, bc)]), I("p", xc, D(j(i).aiMenu.disclaimer), 1)])
|
|
6337
6373
|
])) : A("", !0)]),
|
|
6338
6374
|
_: 1
|
|
6339
6375
|
}));
|
|
6340
6376
|
}
|
|
6341
|
-
}),
|
|
6342
|
-
function
|
|
6377
|
+
}), Cc = /* @__PURE__ */ e({ default: () => wc }), wc = /*#__PURE__*/ Gi(Sc, [["__scopeId", "data-v-a55e4bff"]]), Tc = 6e4, Ec = 36e5, Dc = 864e5;
|
|
6378
|
+
function Oc(e, t, n, r) {
|
|
6343
6379
|
let i = new Date(e).getTime();
|
|
6344
6380
|
if (Number.isNaN(i)) return null;
|
|
6345
6381
|
let a = Date.now() - i;
|
|
6346
6382
|
if (a < -6e4) return null;
|
|
6347
|
-
let o = Math.floor(a /
|
|
6383
|
+
let o = Math.floor(a / Tc), s = Math.floor(a / Ec), c = Math.floor(a / Dc);
|
|
6348
6384
|
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));
|
|
6349
6385
|
}
|
|
6350
6386
|
//#endregion
|
|
6351
6387
|
//#region src/cloud/components/CommentsSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
6352
|
-
var
|
|
6388
|
+
var kc = {
|
|
6353
6389
|
key: 0,
|
|
6354
6390
|
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)]"
|
|
6355
|
-
},
|
|
6391
|
+
}, Ac = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, jc = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, Mc = {
|
|
6356
6392
|
key: 0,
|
|
6357
6393
|
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)]"
|
|
6358
|
-
},
|
|
6394
|
+
}, Nc = { class: "tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2" }, Pc = { class: "tpl:flex-1 tpl:overflow-y-auto" }, Fc = {
|
|
6359
6395
|
key: 0,
|
|
6360
6396
|
class: "tpl:flex tpl:h-full tpl:items-center tpl:justify-center"
|
|
6361
|
-
},
|
|
6397
|
+
}, Ic = {
|
|
6362
6398
|
key: 1,
|
|
6363
6399
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:px-6 tpl:text-center"
|
|
6364
|
-
},
|
|
6400
|
+
}, Lc = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Rc = {
|
|
6365
6401
|
key: 2,
|
|
6366
6402
|
class: "tpl:flex tpl:flex-col tpl:gap-3 tpl:p-3"
|
|
6367
|
-
},
|
|
6403
|
+
}, zc = { class: "tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3" }, Bc = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Vc = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, Hc = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Uc = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Wc = {
|
|
6368
6404
|
key: 0,
|
|
6369
6405
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
6370
|
-
},
|
|
6406
|
+
}, Gc = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, Kc = ["title", "onClick"], qc = ["title", "onClick"], Jc = ["title", "onClick"], Yc = {
|
|
6371
6407
|
key: 0,
|
|
6372
6408
|
class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-primary)]"
|
|
6373
|
-
},
|
|
6409
|
+
}, Xc = {
|
|
6374
6410
|
key: 0,
|
|
6375
6411
|
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)]"
|
|
6376
|
-
},
|
|
6412
|
+
}, Zc = ["onClick"], Qc = {
|
|
6377
6413
|
key: 2,
|
|
6378
6414
|
class: "tpl:mt-2"
|
|
6379
|
-
},
|
|
6415
|
+
}, $c = ["onKeydown"], el = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, tl = ["disabled", "onClick"], nl = {
|
|
6380
6416
|
key: 3,
|
|
6381
6417
|
class: "tpl:mt-1.5 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
6382
|
-
},
|
|
6418
|
+
}, rl = {
|
|
6383
6419
|
key: 4,
|
|
6384
6420
|
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)]"
|
|
6385
|
-
},
|
|
6421
|
+
}, il = { class: "tpl:flex-1" }, al = ["onClick"], ol = {
|
|
6386
6422
|
key: 5,
|
|
6387
6423
|
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2"
|
|
6388
|
-
},
|
|
6424
|
+
}, sl = ["title", "onClick"], cl = ["onClick"], ll = {
|
|
6389
6425
|
key: 0,
|
|
6390
6426
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
6391
|
-
},
|
|
6427
|
+
}, ul = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, dl = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, fl = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, pl = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, ml = {
|
|
6392
6428
|
key: 0,
|
|
6393
6429
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
6394
|
-
},
|
|
6430
|
+
}, hl = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, gl = ["title", "onClick"], _l = ["title", "onClick"], vl = {
|
|
6395
6431
|
key: 0,
|
|
6396
6432
|
class: "tpl:mt-1.5"
|
|
6397
|
-
},
|
|
6433
|
+
}, yl = ["onKeydown"], bl = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, xl = ["disabled", "onClick"], Sl = {
|
|
6398
6434
|
key: 1,
|
|
6399
6435
|
class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
6400
|
-
},
|
|
6436
|
+
}, Cl = {
|
|
6401
6437
|
key: 2,
|
|
6402
6438
|
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)]"
|
|
6403
|
-
},
|
|
6439
|
+
}, wl = { class: "tpl:flex-1" }, Tl = ["onClick"], El = {
|
|
6404
6440
|
key: 0,
|
|
6405
6441
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
6406
|
-
},
|
|
6442
|
+
}, Dl = { class: "tpl:flex tpl:items-end tpl:gap-2" }, Ol = ["placeholder", "onKeydown"], kl = { class: "tpl:flex tpl:shrink-0 tpl:flex-col tpl:gap-1" }, Al = ["disabled", "onClick"], jl = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Ml = {
|
|
6407
6443
|
key: 0,
|
|
6408
6444
|
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)]"
|
|
6409
|
-
},
|
|
6445
|
+
}, Nl = {
|
|
6410
6446
|
key: 1,
|
|
6411
6447
|
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)]"
|
|
6412
|
-
},
|
|
6448
|
+
}, Pl = ["placeholder", "disabled"], Fl = ["disabled"], Il = /*@__PURE__*/ B({
|
|
6413
6449
|
__name: "CommentsSidebar",
|
|
6414
6450
|
props: { visible: { type: Boolean } },
|
|
6415
6451
|
emits: ["close", "filterBlock"],
|
|
6416
6452
|
setup(e, { expose: t, emit: n }) {
|
|
6417
|
-
let r = e, i = n, { format: a } = Y(), { t: o } = ta(), s = J(zn, "CommentsSidebar"), l = J(mr, "CommentsSidebar"), u = J(gr, "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),
|
|
6453
|
+
let r = e, i = n, { format: a } = Y(), { t: o } = ta(), s = J(zn, "CommentsSidebar"), l = J(mr, "CommentsSidebar"), u = J(gr, "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(() => {
|
|
6418
6454
|
let e = /* @__PURE__ */ new Set();
|
|
6419
6455
|
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);
|
|
6420
6456
|
return e;
|
|
6421
6457
|
});
|
|
6422
6458
|
function te(e) {
|
|
6423
|
-
return e ? !
|
|
6459
|
+
return e ? !E.value.has(e) : !1;
|
|
6424
6460
|
}
|
|
6425
6461
|
let ne = O(() => d.value !== "block" || !p.value ? !1 : !(s.savedBlockIds?.value.has(p.value) ?? !0)), re = O(() => {
|
|
6426
6462
|
let e = u.comments.value;
|
|
@@ -6479,10 +6515,10 @@ var Ec = {
|
|
|
6479
6515
|
await u.toggleResolve(e);
|
|
6480
6516
|
}
|
|
6481
6517
|
function _e(e) {
|
|
6482
|
-
return e.author_identifier ===
|
|
6518
|
+
return e.author_identifier === T.value;
|
|
6483
6519
|
}
|
|
6484
6520
|
function ve(e) {
|
|
6485
|
-
return
|
|
6521
|
+
return Oc(e, o.snapshotHistory) ?? e;
|
|
6486
6522
|
}
|
|
6487
6523
|
function ye(e) {
|
|
6488
6524
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), fe());
|
|
@@ -6495,7 +6531,7 @@ var Ec = {
|
|
|
6495
6531
|
}
|
|
6496
6532
|
function Se() {
|
|
6497
6533
|
m(() => {
|
|
6498
|
-
|
|
6534
|
+
ee.value?.focus();
|
|
6499
6535
|
});
|
|
6500
6536
|
}
|
|
6501
6537
|
return t({
|
|
@@ -6509,14 +6545,14 @@ var Ec = {
|
|
|
6509
6545
|
"leave-from-class": "tpl:translate-x-0",
|
|
6510
6546
|
"leave-to-class": "tpl:translate-x-full"
|
|
6511
6547
|
}, {
|
|
6512
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
6513
|
-
I("div",
|
|
6548
|
+
default: b(() => [e.visible ? (f(), k("div", kc, [
|
|
6549
|
+
I("div", Ac, [I("div", jc, [
|
|
6514
6550
|
V(j(Si), {
|
|
6515
6551
|
size: 13,
|
|
6516
6552
|
"stroke-width": 2
|
|
6517
6553
|
}),
|
|
6518
6554
|
I("span", null, D(j(o).comments.title), 1),
|
|
6519
|
-
j(u).unresolvedCount.value > 0 ? (f(), k("span",
|
|
6555
|
+
j(u).unresolvedCount.value > 0 ? (f(), k("span", Mc, D(j(u).unresolvedCount.value), 1)) : A("", !0)
|
|
6520
6556
|
]), I("button", {
|
|
6521
6557
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6522
6558
|
onClick: n[0] ||= (e) => i("close")
|
|
@@ -6524,7 +6560,7 @@ var Ec = {
|
|
|
6524
6560
|
size: 14,
|
|
6525
6561
|
"stroke-width": 2
|
|
6526
6562
|
})])]),
|
|
6527
|
-
I("div",
|
|
6563
|
+
I("div", Nc, [
|
|
6528
6564
|
I("button", {
|
|
6529
6565
|
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" : ""]),
|
|
6530
6566
|
onClick: n[1] ||= (e) => M("unresolved")
|
|
@@ -6539,24 +6575,24 @@ var Ec = {
|
|
|
6539
6575
|
onClick: n[3] ||= (e) => M("block", j(s).state.selectedBlockId ?? void 0)
|
|
6540
6576
|
}, D(j(o).comments.filterBlock), 3)) : A("", !0)
|
|
6541
6577
|
]),
|
|
6542
|
-
I("div",
|
|
6578
|
+
I("div", Pc, [j(u).isLoading.value ? (f(), k("div", Fc, [V(j(xi), {
|
|
6543
6579
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
6544
6580
|
size: 24,
|
|
6545
6581
|
"stroke-width": 2
|
|
6546
|
-
})])) : re.value.length === 0 ? (f(), k("div",
|
|
6582
|
+
})])) : re.value.length === 0 ? (f(), k("div", Ic, [V(j(Si), {
|
|
6547
6583
|
size: 32,
|
|
6548
6584
|
"stroke-width": 1.5,
|
|
6549
6585
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6550
|
-
}), I("p",
|
|
6586
|
+
}), I("p", Lc, D(d.value === "all" ? j(o).comments.noCommentsHint : j(o).comments.noComments), 1)])) : (f(), k("div", Rc, [(f(!0), k(R, null, h(re.value, (e) => (f(), k("div", {
|
|
6551
6587
|
key: e.id,
|
|
6552
6588
|
class: "tpl-comment-thread"
|
|
6553
6589
|
}, [
|
|
6554
|
-
I("div",
|
|
6555
|
-
I("div",
|
|
6556
|
-
I("span",
|
|
6557
|
-
I("span",
|
|
6558
|
-
e.updated_at === e.created_at ? A("", !0) : (f(), k("span",
|
|
6559
|
-
]), I("div",
|
|
6590
|
+
I("div", zc, [
|
|
6591
|
+
I("div", Bc, [I("div", Vc, [
|
|
6592
|
+
I("span", Hc, D(_e(e) ? j(o).comments.ownedByYou : e.author_name), 1),
|
|
6593
|
+
I("span", Uc, D(ve(e.created_at)), 1),
|
|
6594
|
+
e.updated_at === e.created_at ? A("", !0) : (f(), k("span", Wc, " (" + D(j(o).comments.edited) + ") ", 1))
|
|
6595
|
+
]), I("div", Gc, [
|
|
6560
6596
|
I("button", {
|
|
6561
6597
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6562
6598
|
title: e.resolved_at ? j(o).comments.unresolve : j(o).comments.resolve,
|
|
@@ -6566,7 +6602,7 @@ var Ec = {
|
|
|
6566
6602
|
"stroke-width": 2,
|
|
6567
6603
|
class: "tpl-resolve-icon",
|
|
6568
6604
|
style: L({ color: e.resolved_at ? "var(--tpl-primary)" : void 0 })
|
|
6569
|
-
}, null, 8, ["style"])], 8,
|
|
6605
|
+
}, null, 8, ["style"])], 8, Kc),
|
|
6570
6606
|
_e(e) ? (f(), k("button", {
|
|
6571
6607
|
key: 0,
|
|
6572
6608
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
@@ -6575,7 +6611,7 @@ var Ec = {
|
|
|
6575
6611
|
}, [V(j(wi), {
|
|
6576
6612
|
size: 12,
|
|
6577
6613
|
"stroke-width": 2
|
|
6578
|
-
})], 8,
|
|
6614
|
+
})], 8, qc)) : A("", !0),
|
|
6579
6615
|
_e(e) ? (f(), k("button", {
|
|
6580
6616
|
key: 1,
|
|
6581
6617
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
@@ -6584,45 +6620,45 @@ var Ec = {
|
|
|
6584
6620
|
}, [V(j(Fi), {
|
|
6585
6621
|
size: 12,
|
|
6586
6622
|
"stroke-width": 2
|
|
6587
|
-
})], 8,
|
|
6623
|
+
})], 8, Jc)) : A("", !0)
|
|
6588
6624
|
])]),
|
|
6589
6625
|
V(ie, { name: "tpl-resolve" }, {
|
|
6590
|
-
default: b(() => [e.resolved_at ? (f(), k("div",
|
|
6626
|
+
default: b(() => [e.resolved_at ? (f(), k("div", Yc, [V(j(ni), {
|
|
6591
6627
|
size: 10,
|
|
6592
6628
|
"stroke-width": 2.5
|
|
6593
6629
|
}), I("span", null, D(j(a)(j(o).comments.resolvedBy, { name: e.resolved_by_name ?? "" })), 1)])) : A("", !0)]),
|
|
6594
6630
|
_: 2
|
|
6595
6631
|
}, 1024),
|
|
6596
|
-
e.block_id && te(e.block_id) ? (f(), k("span",
|
|
6632
|
+
e.block_id && te(e.block_id) ? (f(), k("span", Xc, D(j(o).comments.missingBlock), 1)) : e.block_id ? (f(), k("button", {
|
|
6597
6633
|
key: 1,
|
|
6598
6634
|
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)]",
|
|
6599
6635
|
onClick: (t) => j(s).selectBlock(e.block_id ?? "")
|
|
6600
|
-
}, " Block ", 8,
|
|
6601
|
-
y.value === e.id ? (f(), k("div",
|
|
6636
|
+
}, " Block ", 8, Zc)) : A("", !0),
|
|
6637
|
+
y.value === e.id ? (f(), k("div", Qc, [c(I("textarea", {
|
|
6602
6638
|
"onUpdate:modelValue": n[4] ||= (e) => x.value = e,
|
|
6603
6639
|
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)]",
|
|
6604
6640
|
rows: "3",
|
|
6605
6641
|
onKeydown: (t) => xe(t, e.id)
|
|
6606
|
-
}, null, 40,
|
|
6642
|
+
}, null, 40, $c), [[ae, x.value]]), I("div", el, [I("button", {
|
|
6607
6643
|
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)]",
|
|
6608
6644
|
disabled: !x.value.trim() || j(u).isSubmitting.value,
|
|
6609
6645
|
onClick: (t) => me(e.id)
|
|
6610
|
-
}, D(j(o).comments.save), 9,
|
|
6646
|
+
}, D(j(o).comments.save), 9, tl), I("button", {
|
|
6611
6647
|
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)]",
|
|
6612
6648
|
onClick: n[5] ||= (e) => B()
|
|
6613
|
-
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p",
|
|
6614
|
-
w.value === e.id ? (f(), k("div",
|
|
6615
|
-
I("span",
|
|
6649
|
+
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p", nl, D(e.body), 1)),
|
|
6650
|
+
w.value === e.id ? (f(), k("div", rl, [
|
|
6651
|
+
I("span", il, D(j(o).comments.deleteConfirm), 1),
|
|
6616
6652
|
I("button", {
|
|
6617
6653
|
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)]",
|
|
6618
6654
|
onClick: (t) => he(e.id)
|
|
6619
|
-
}, D(j(o).comments.delete), 9,
|
|
6655
|
+
}, D(j(o).comments.delete), 9, al),
|
|
6620
6656
|
I("button", {
|
|
6621
6657
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6622
6658
|
onClick: n[6] ||= (e) => de()
|
|
6623
6659
|
}, D(j(o).comments.cancel), 1)
|
|
6624
6660
|
])) : A("", !0),
|
|
6625
|
-
y.value !== e.id && w.value !== e.id ? (f(), k("div",
|
|
6661
|
+
y.value !== e.id && w.value !== e.id ? (f(), k("div", ol, [I("button", {
|
|
6626
6662
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6627
6663
|
title: j(o).comments.reply,
|
|
6628
6664
|
onClick: (t) => se(e.id)
|
|
@@ -6630,7 +6666,7 @@ var Ec = {
|
|
|
6630
6666
|
size: 13,
|
|
6631
6667
|
"stroke-width": 2,
|
|
6632
6668
|
class: "tpl:text-[var(--tpl-primary)]"
|
|
6633
|
-
})], 8,
|
|
6669
|
+
})], 8, sl), (e.replies?.length ?? 0) > 0 ? (f(), k("button", {
|
|
6634
6670
|
key: 0,
|
|
6635
6671
|
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)]",
|
|
6636
6672
|
onClick: (t) => oe(e.id)
|
|
@@ -6642,18 +6678,18 @@ var Ec = {
|
|
|
6642
6678
|
key: 1,
|
|
6643
6679
|
size: 11,
|
|
6644
6680
|
"stroke-width": 2
|
|
6645
|
-
})), 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,
|
|
6681
|
+
})), 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, cl)) : A("", !0)])) : A("", !0)
|
|
6646
6682
|
]),
|
|
6647
6683
|
V(ie, { name: "tpl-replies" }, {
|
|
6648
|
-
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), k("div",
|
|
6684
|
+
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), k("div", ll, [(f(!0), k(R, null, h(e.replies, (t, r) => (f(), k("div", {
|
|
6649
6685
|
key: t.id,
|
|
6650
6686
|
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" : ""])
|
|
6651
6687
|
}, [
|
|
6652
|
-
I("div",
|
|
6653
|
-
I("span",
|
|
6654
|
-
I("span",
|
|
6655
|
-
t.updated_at === t.created_at ? A("", !0) : (f(), k("span",
|
|
6656
|
-
]), I("div",
|
|
6688
|
+
I("div", ul, [I("div", dl, [
|
|
6689
|
+
I("span", fl, D(_e(t) ? j(o).comments.ownedByYou : t.author_name), 1),
|
|
6690
|
+
I("span", pl, D(ve(t.created_at)), 1),
|
|
6691
|
+
t.updated_at === t.created_at ? A("", !0) : (f(), k("span", ml, " (" + D(j(o).comments.edited) + ") ", 1))
|
|
6692
|
+
]), I("div", hl, [_e(t) ? (f(), k("button", {
|
|
6657
6693
|
key: 0,
|
|
6658
6694
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6659
6695
|
title: j(o).comments.edit,
|
|
@@ -6661,7 +6697,7 @@ var Ec = {
|
|
|
6661
6697
|
}, [V(j(wi), {
|
|
6662
6698
|
size: 11,
|
|
6663
6699
|
"stroke-width": 2
|
|
6664
|
-
})], 8,
|
|
6700
|
+
})], 8, gl)) : A("", !0), _e(t) ? (f(), k("button", {
|
|
6665
6701
|
key: 1,
|
|
6666
6702
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6667
6703
|
title: j(o).comments.delete,
|
|
@@ -6669,26 +6705,26 @@ var Ec = {
|
|
|
6669
6705
|
}, [V(j(Fi), {
|
|
6670
6706
|
size: 11,
|
|
6671
6707
|
"stroke-width": 2
|
|
6672
|
-
})], 8,
|
|
6673
|
-
y.value === t.id ? (f(), k("div",
|
|
6708
|
+
})], 8, _l)) : A("", !0)])]),
|
|
6709
|
+
y.value === t.id ? (f(), k("div", vl, [c(I("textarea", {
|
|
6674
6710
|
"onUpdate:modelValue": n[7] ||= (e) => x.value = e,
|
|
6675
6711
|
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)]",
|
|
6676
6712
|
rows: "2",
|
|
6677
6713
|
onKeydown: (e) => xe(e, t.id)
|
|
6678
|
-
}, null, 40,
|
|
6714
|
+
}, null, 40, yl), [[ae, x.value]]), I("div", bl, [I("button", {
|
|
6679
6715
|
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)]",
|
|
6680
6716
|
disabled: !x.value.trim() || j(u).isSubmitting.value,
|
|
6681
6717
|
onClick: (e) => me(t.id)
|
|
6682
|
-
}, D(j(o).comments.save), 9,
|
|
6718
|
+
}, D(j(o).comments.save), 9, xl), I("button", {
|
|
6683
6719
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6684
6720
|
onClick: n[8] ||= (e) => B()
|
|
6685
|
-
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p",
|
|
6686
|
-
w.value === t.id ? (f(), k("div",
|
|
6687
|
-
I("span",
|
|
6721
|
+
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p", Sl, D(t.body), 1)),
|
|
6722
|
+
w.value === t.id ? (f(), k("div", Cl, [
|
|
6723
|
+
I("span", wl, D(j(o).comments.deleteConfirm), 1),
|
|
6688
6724
|
I("button", {
|
|
6689
6725
|
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)]",
|
|
6690
6726
|
onClick: (e) => he(t.id)
|
|
6691
|
-
}, D(j(o).comments.delete), 9,
|
|
6727
|
+
}, D(j(o).comments.delete), 9, Tl),
|
|
6692
6728
|
I("button", {
|
|
6693
6729
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6694
6730
|
onClick: n[9] ||= (e) => de()
|
|
@@ -6698,20 +6734,20 @@ var Ec = {
|
|
|
6698
6734
|
_: 2
|
|
6699
6735
|
}, 1024),
|
|
6700
6736
|
V(ie, { name: "tpl-replies" }, {
|
|
6701
|
-
default: b(() => [_.value === e.id ? (f(), k("div",
|
|
6737
|
+
default: b(() => [_.value === e.id ? (f(), k("div", El, [I("div", Dl, [c(I("textarea", {
|
|
6702
6738
|
"onUpdate:modelValue": n[10] ||= (e) => v.value = e,
|
|
6703
6739
|
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)]",
|
|
6704
6740
|
placeholder: j(o).comments.replyPlaceholder,
|
|
6705
6741
|
rows: "2",
|
|
6706
6742
|
onKeydown: (t) => be(t, e.id)
|
|
6707
|
-
}, null, 40,
|
|
6743
|
+
}, null, 40, Ol), [[ae, v.value]]), I("div", kl, [I("button", {
|
|
6708
6744
|
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)]",
|
|
6709
6745
|
disabled: !v.value.trim() || j(u).isSubmitting.value,
|
|
6710
6746
|
onClick: (t) => pe(e.id)
|
|
6711
6747
|
}, [V(j(ki), {
|
|
6712
6748
|
size: 14,
|
|
6713
6749
|
"stroke-width": 2
|
|
6714
|
-
})], 8,
|
|
6750
|
+
})], 8, Al), I("button", {
|
|
6715
6751
|
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)]",
|
|
6716
6752
|
onClick: n[11] ||= (e) => ce()
|
|
6717
6753
|
}, [V(j(Bi), {
|
|
@@ -6721,16 +6757,16 @@ var Ec = {
|
|
|
6721
6757
|
_: 2
|
|
6722
6758
|
}, 1024)
|
|
6723
6759
|
]))), 128))]))]),
|
|
6724
|
-
I("div",
|
|
6760
|
+
I("div", jl, [ne.value ? (f(), k("div", Ml, D(j(o).comments.saveTemplateFirst), 1)) : (f(), k("div", Nl, [c(I("textarea", {
|
|
6725
6761
|
ref_key: "newCommentInput",
|
|
6726
|
-
ref:
|
|
6762
|
+
ref: ee,
|
|
6727
6763
|
"onUpdate:modelValue": n[12] ||= (e) => g.value = e,
|
|
6728
6764
|
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)]",
|
|
6729
6765
|
placeholder: j(o).comments.placeholder,
|
|
6730
6766
|
disabled: j(u).isSubmitting.value,
|
|
6731
6767
|
rows: "2",
|
|
6732
6768
|
onKeydown: ye
|
|
6733
|
-
}, null, 40,
|
|
6769
|
+
}, null, 40, Pl), [[ae, g.value]]), I("button", {
|
|
6734
6770
|
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)]",
|
|
6735
6771
|
disabled: !g.value.trim() || j(u).isSubmitting.value,
|
|
6736
6772
|
onClick: fe
|
|
@@ -6743,33 +6779,33 @@ var Ec = {
|
|
|
6743
6779
|
key: 1,
|
|
6744
6780
|
size: 16,
|
|
6745
6781
|
"stroke-width": 2
|
|
6746
|
-
}))], 8,
|
|
6782
|
+
}))], 8, Fl)]))])
|
|
6747
6783
|
])) : A("", !0)]),
|
|
6748
6784
|
_: 1
|
|
6749
6785
|
}));
|
|
6750
6786
|
}
|
|
6751
|
-
}),
|
|
6787
|
+
}), Ll = /* @__PURE__ */ e({ default: () => Rl }), Rl = /*#__PURE__*/ Gi(Il, [["__scopeId", "data-v-d204f573"]]), zl = {
|
|
6752
6788
|
key: 0,
|
|
6753
6789
|
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)]"
|
|
6754
|
-
},
|
|
6790
|
+
}, Bl = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Vl = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, Hl = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Ul = {
|
|
6755
6791
|
key: 0,
|
|
6756
6792
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6757
|
-
},
|
|
6793
|
+
}, Wl = { class: "tpl:flex tpl:w-full tpl:flex-col tpl:items-center tpl:gap-3" }, Gl = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Kl = {
|
|
6758
6794
|
key: 1,
|
|
6759
6795
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6760
|
-
},
|
|
6796
|
+
}, ql = { class: "tpl:flex tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, Jl = {
|
|
6761
6797
|
key: 0,
|
|
6762
6798
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6763
|
-
},
|
|
6799
|
+
}, Yl = { class: "tpl:relative tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Xl = ["src", "alt"], Zl = {
|
|
6764
6800
|
key: 1,
|
|
6765
6801
|
class: "tpl:flex tpl:h-32 tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2"
|
|
6766
|
-
},
|
|
6802
|
+
}, Ql = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, $l = { class: "tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, eu = { class: "tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, tu = ["accept"], nu = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, ru = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, iu = ["placeholder"], au = {
|
|
6767
6803
|
key: 0,
|
|
6768
6804
|
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)]"
|
|
6769
|
-
},
|
|
6805
|
+
}, ou = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, su = { class: "tpl:flex tpl:gap-2" }, cu = {
|
|
6770
6806
|
key: 1,
|
|
6771
6807
|
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)]"
|
|
6772
|
-
},
|
|
6808
|
+
}, lu = ["disabled"], uu = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, du = /*@__PURE__*/ B({
|
|
6773
6809
|
__name: "DesignReferenceSidebar",
|
|
6774
6810
|
props: {
|
|
6775
6811
|
visible: { type: Boolean },
|
|
@@ -6777,7 +6813,7 @@ var Ec = {
|
|
|
6777
6813
|
},
|
|
6778
6814
|
emits: ["close", "apply"],
|
|
6779
6815
|
setup(e, { emit: t }) {
|
|
6780
|
-
let n = e, r = t, { t: i } = ta(), a = J(zn, "DesignReferenceSidebar"), o =
|
|
6816
|
+
let n = e, r = t, { t: i } = ta(), a = J(zn, "DesignReferenceSidebar"), o = Ms({
|
|
6781
6817
|
authManager: J(mr, "DesignReferenceSidebar"),
|
|
6782
6818
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
6783
6819
|
onApply: (e) => r("apply", e)
|
|
@@ -6819,12 +6855,12 @@ var Ec = {
|
|
|
6819
6855
|
function w() {
|
|
6820
6856
|
h.value = !1;
|
|
6821
6857
|
}
|
|
6822
|
-
function
|
|
6858
|
+
function ee(e) {
|
|
6823
6859
|
e.preventDefault(), h.value = !1;
|
|
6824
6860
|
let t = e.dataTransfer?.files?.[0];
|
|
6825
6861
|
t && y(t);
|
|
6826
6862
|
}
|
|
6827
|
-
function
|
|
6863
|
+
function T() {
|
|
6828
6864
|
if (!g.value) return;
|
|
6829
6865
|
if (n.hasExistingBlocks && !m.value) {
|
|
6830
6866
|
m.value = !0;
|
|
@@ -6834,7 +6870,7 @@ var Ec = {
|
|
|
6834
6870
|
let e = {};
|
|
6835
6871
|
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);
|
|
6836
6872
|
}
|
|
6837
|
-
function
|
|
6873
|
+
function E() {
|
|
6838
6874
|
m.value = !1;
|
|
6839
6875
|
}
|
|
6840
6876
|
return H(() => n.visible, (e) => {
|
|
@@ -6849,7 +6885,7 @@ var Ec = {
|
|
|
6849
6885
|
"leave-from-class": "tpl:translate-x-0",
|
|
6850
6886
|
"leave-to-class": "tpl:translate-x-full"
|
|
6851
6887
|
}, {
|
|
6852
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
6888
|
+
default: b(() => [e.visible ? (f(), k("div", zl, [I("div", Bl, [I("div", Vl, [V(j(vi), {
|
|
6853
6889
|
size: 13,
|
|
6854
6890
|
"stroke-width": 2
|
|
6855
6891
|
}), I("span", null, D(j(i).designReference.title), 1)]), I("button", {
|
|
@@ -6858,8 +6894,8 @@ var Ec = {
|
|
|
6858
6894
|
}, [V(j(Bi), {
|
|
6859
6895
|
size: 14,
|
|
6860
6896
|
"stroke-width": 2
|
|
6861
|
-
})])]), I("div",
|
|
6862
|
-
I("div",
|
|
6897
|
+
})])]), I("div", Hl, [j(o).isGenerating.value ? (f(), k("div", Ul, [I("div", Wl, [V(Yi), I("p", Gl, D(j(i).designReference.generating), 1)])])) : (f(), k("div", Kl, [
|
|
6898
|
+
I("div", ql, [I("button", {
|
|
6863
6899
|
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",
|
|
6864
6900
|
style: L({
|
|
6865
6901
|
backgroundColor: l.value === "image" ? "var(--tpl-bg)" : "transparent",
|
|
@@ -6882,16 +6918,16 @@ var Ec = {
|
|
|
6882
6918
|
size: 12,
|
|
6883
6919
|
"stroke-width": 2
|
|
6884
6920
|
}), z(" " + D(j(i).designReference.uploadPdf), 1)], 4)]),
|
|
6885
|
-
I("div", null, [u.value ? (f(), k("div",
|
|
6921
|
+
I("div", null, [u.value ? (f(), k("div", Jl, [I("div", Yl, [p.value ? (f(), k("img", {
|
|
6886
6922
|
key: 0,
|
|
6887
6923
|
src: p.value,
|
|
6888
6924
|
alt: u.value.name,
|
|
6889
6925
|
class: "tpl:h-auto tpl:max-h-48 tpl:w-full tpl:object-contain"
|
|
6890
|
-
}, null, 8,
|
|
6926
|
+
}, null, 8, Xl)) : (f(), k("div", Zl, [V(j(hi), {
|
|
6891
6927
|
size: 32,
|
|
6892
6928
|
"stroke-width": 1.5,
|
|
6893
6929
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6894
|
-
}), I("span",
|
|
6930
|
+
}), I("span", Ql, D(u.value.name), 1)])), I("button", {
|
|
6895
6931
|
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)]",
|
|
6896
6932
|
onClick: x
|
|
6897
6933
|
}, [V(j(Bi), {
|
|
@@ -6907,15 +6943,15 @@ var Ec = {
|
|
|
6907
6943
|
onClick: n[3] ||= (e) => s.value?.click(),
|
|
6908
6944
|
onDragover: S,
|
|
6909
6945
|
onDragleave: w,
|
|
6910
|
-
onDrop:
|
|
6946
|
+
onDrop: ee
|
|
6911
6947
|
}, [
|
|
6912
6948
|
V(j(Ri), {
|
|
6913
6949
|
size: 24,
|
|
6914
6950
|
"stroke-width": 1.5,
|
|
6915
6951
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6916
6952
|
}),
|
|
6917
|
-
I("span",
|
|
6918
|
-
I("span",
|
|
6953
|
+
I("span", $l, D(j(i).designReference.dropHint), 1),
|
|
6954
|
+
I("span", eu, D(l.value === "image" ? j(i).designReference.acceptedImages : j(i).designReference.acceptedPdf), 1)
|
|
6919
6955
|
], 36)), I("input", {
|
|
6920
6956
|
ref_key: "fileInput",
|
|
6921
6957
|
ref: s,
|
|
@@ -6923,22 +6959,22 @@ var Ec = {
|
|
|
6923
6959
|
class: "tpl:hidden",
|
|
6924
6960
|
accept: l.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
|
|
6925
6961
|
onChange: v
|
|
6926
|
-
}, null, 40,
|
|
6927
|
-
I("div",
|
|
6962
|
+
}, null, 40, tu)]),
|
|
6963
|
+
I("div", nu, [I("label", ru, D(j(i).designReference.promptLabel), 1), c(I("textarea", {
|
|
6928
6964
|
"onUpdate:modelValue": n[4] ||= (e) => d.value = e,
|
|
6929
6965
|
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"]]),
|
|
6930
6966
|
placeholder: j(i).designReference.promptPlaceholder,
|
|
6931
6967
|
rows: "3"
|
|
6932
|
-
}, null, 8,
|
|
6933
|
-
m.value ? (f(), k("div",
|
|
6968
|
+
}, null, 8, iu), [[ae, d.value]])]),
|
|
6969
|
+
m.value ? (f(), k("div", au, [I("p", ou, D(j(i).designReference.replaceWarning), 1), I("div", su, [I("button", {
|
|
6934
6970
|
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)]",
|
|
6935
6971
|
style: { "background-color": "transparent" },
|
|
6936
|
-
onClick:
|
|
6972
|
+
onClick: E
|
|
6937
6973
|
}, D(j(i).designReference.replaceCancel), 1), I("button", {
|
|
6938
6974
|
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)]",
|
|
6939
|
-
onClick:
|
|
6975
|
+
onClick: T
|
|
6940
6976
|
}, D(j(i).designReference.replaceConfirm), 1)])])) : A("", !0),
|
|
6941
|
-
j(o).error.value ? (f(), k("div",
|
|
6977
|
+
j(o).error.value ? (f(), k("div", cu, [V(j(si), {
|
|
6942
6978
|
size: 14,
|
|
6943
6979
|
"stroke-width": 2,
|
|
6944
6980
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
@@ -6947,36 +6983,36 @@ var Ec = {
|
|
|
6947
6983
|
key: 2,
|
|
6948
6984
|
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)]",
|
|
6949
6985
|
disabled: !g.value,
|
|
6950
|
-
onClick:
|
|
6986
|
+
onClick: T
|
|
6951
6987
|
}, [V(j(vi), {
|
|
6952
6988
|
size: 16,
|
|
6953
6989
|
"stroke-width": 2
|
|
6954
|
-
}), z(" " + D(j(i).designReference.generate), 1)], 8,
|
|
6955
|
-
I("p",
|
|
6990
|
+
}), z(" " + D(j(i).designReference.generate), 1)], 8, lu)),
|
|
6991
|
+
I("p", uu, D(j(i).aiMenu.disclaimer), 1)
|
|
6956
6992
|
]))])])) : A("", !0)]),
|
|
6957
6993
|
_: 1
|
|
6958
6994
|
}));
|
|
6959
6995
|
}
|
|
6960
|
-
}),
|
|
6996
|
+
}), fu = /* @__PURE__ */ e({ default: () => pu }), pu = /*#__PURE__*/ Gi(du, [["__scopeId", "data-v-bdbf8d0d"]]), mu = ["disabled", "title"], hu = ["title"], gu = {
|
|
6961
6997
|
key: 0,
|
|
6962
6998
|
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)]",
|
|
6963
6999
|
style: {
|
|
6964
7000
|
"backdrop-filter": "blur(8px)",
|
|
6965
7001
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
6966
7002
|
}
|
|
6967
|
-
},
|
|
7003
|
+
}, _u = { 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)]" }, vu = {
|
|
6968
7004
|
key: 0,
|
|
6969
7005
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8"
|
|
6970
|
-
},
|
|
7006
|
+
}, yu = {
|
|
6971
7007
|
key: 1,
|
|
6972
7008
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
6973
|
-
},
|
|
7009
|
+
}, bu = {
|
|
6974
7010
|
key: 2,
|
|
6975
7011
|
class: "tpl:max-h-64 tpl:overflow-y-auto"
|
|
6976
|
-
},
|
|
7012
|
+
}, xu = ["disabled", "onClick"], Su = { class: "tpl:flex tpl:flex-col tpl:gap-0.5" }, Cu = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, wu = {
|
|
6977
7013
|
key: 0,
|
|
6978
7014
|
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)]"
|
|
6979
|
-
},
|
|
7015
|
+
}, Tu = ["disabled", "title"], Eu = /*@__PURE__*/ B({
|
|
6980
7016
|
__name: "SnapshotHistory",
|
|
6981
7017
|
props: {
|
|
6982
7018
|
snapshots: {},
|
|
@@ -7004,7 +7040,7 @@ var Ec = {
|
|
|
7004
7040
|
t !== -1 && (c.value = t, r("navigate", n.snapshots[t])), o.value = !1;
|
|
7005
7041
|
}
|
|
7006
7042
|
function _(e) {
|
|
7007
|
-
let t =
|
|
7043
|
+
let t = Oc(e, a.snapshotHistory, i, 7);
|
|
7008
7044
|
return t === null ? new Date(e).toLocaleDateString(void 0, {
|
|
7009
7045
|
month: "short",
|
|
7010
7046
|
day: "numeric",
|
|
@@ -7027,7 +7063,7 @@ var Ec = {
|
|
|
7027
7063
|
}, [V(j(ii), {
|
|
7028
7064
|
size: 14,
|
|
7029
7065
|
"stroke-width": 2
|
|
7030
|
-
})], 8,
|
|
7066
|
+
})], 8, mu),
|
|
7031
7067
|
I("button", {
|
|
7032
7068
|
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)]",
|
|
7033
7069
|
title: j(a).snapshotHistory.tooltip,
|
|
@@ -7039,19 +7075,19 @@ var Ec = {
|
|
|
7039
7075
|
class: F(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-180": o.value }]),
|
|
7040
7076
|
size: 10,
|
|
7041
7077
|
"stroke-width": 2
|
|
7042
|
-
}, null, 8, ["class"])], 8,
|
|
7078
|
+
}, null, 8, ["class"])], 8, hu),
|
|
7043
7079
|
V(ie, { name: "tpl-dropdown" }, {
|
|
7044
|
-
default: b(() => [o.value ? (f(), k("div",
|
|
7080
|
+
default: b(() => [o.value ? (f(), k("div", gu, [I("div", _u, D(j(a).snapshotHistory.dropdownTitle), 1), e.isLoading ? (f(), k("div", vu, [V(j(xi), {
|
|
7045
7081
|
class: "tpl:animate-spin tpl:text-[var(--tpl-primary)]",
|
|
7046
7082
|
size: 20,
|
|
7047
7083
|
"stroke-width": 2
|
|
7048
|
-
})])) : e.snapshots.length === 0 ? (f(), k("div",
|
|
7084
|
+
})])) : e.snapshots.length === 0 ? (f(), k("div", yu, D(j(a).snapshotHistory.noSnapshots), 1)) : (f(), k("div", bu, [(f(!0), k(R, null, h(e.snapshots, (t) => (f(), k("button", {
|
|
7049
7085
|
key: t.id,
|
|
7050
7086
|
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)]",
|
|
7051
7087
|
style: { "background-color": "transparent" },
|
|
7052
7088
|
disabled: e.isRestoring,
|
|
7053
7089
|
onClick: (e) => g(t.id)
|
|
7054
|
-
}, [I("div",
|
|
7090
|
+
}, [I("div", Su, [I("div", Cu, [I("span", null, D(_(t.created_at)), 1), t.is_autosave ? (f(), k("span", wu, D(j(a).snapshotHistory.auto), 1)) : A("", !0)])])], 8, xu))), 128))]))])) : A("", !0)]),
|
|
7055
7091
|
_: 1
|
|
7056
7092
|
}),
|
|
7057
7093
|
I("button", {
|
|
@@ -7062,66 +7098,66 @@ var Ec = {
|
|
|
7062
7098
|
}, [V(j(ai), {
|
|
7063
7099
|
size: 14,
|
|
7064
7100
|
"stroke-width": 2
|
|
7065
|
-
})], 8,
|
|
7101
|
+
})], 8, Tu)
|
|
7066
7102
|
], 512));
|
|
7067
7103
|
}
|
|
7068
|
-
}),
|
|
7104
|
+
}), Du = /* @__PURE__ */ e({ default: () => Ou }), Ou = Eu;
|
|
7069
7105
|
//#endregion
|
|
7070
7106
|
//#region src/cloud/utils/scoringStyles.ts
|
|
7071
|
-
function
|
|
7107
|
+
function ku(e) {
|
|
7072
7108
|
return e >= 80 ? "var(--tpl-success)" : e >= 60 ? "var(--tpl-warning)" : "var(--tpl-danger)";
|
|
7073
7109
|
}
|
|
7074
|
-
function
|
|
7110
|
+
function Au(e) {
|
|
7075
7111
|
return e >= 80 ? "var(--tpl-success-light)" : e >= 60 ? "var(--tpl-warning-light)" : "var(--tpl-danger-light)";
|
|
7076
7112
|
}
|
|
7077
|
-
function
|
|
7113
|
+
function ju(e) {
|
|
7078
7114
|
return e === "high" ? "var(--tpl-danger)" : e === "medium" ? "var(--tpl-warning)" : "var(--tpl-text-muted)";
|
|
7079
7115
|
}
|
|
7080
|
-
function
|
|
7116
|
+
function Mu(e) {
|
|
7081
7117
|
return e === "high" ? "var(--tpl-danger-light)" : e === "medium" ? "var(--tpl-warning-light)" : "var(--tpl-bg-hover)";
|
|
7082
7118
|
}
|
|
7083
7119
|
//#endregion
|
|
7084
7120
|
//#region src/cloud/components/TemplateScoringPanel.vue?vue&type=script&setup=true&lang.ts
|
|
7085
|
-
var
|
|
7121
|
+
var Nu = {
|
|
7086
7122
|
key: 0,
|
|
7087
7123
|
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)]"
|
|
7088
|
-
},
|
|
7124
|
+
}, Pu = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Fu = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, Iu = { class: "tpl:flex tpl:items-center tpl:gap-1" }, Lu = ["title"], Ru = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, zu = {
|
|
7089
7125
|
key: 0,
|
|
7090
7126
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
7091
|
-
},
|
|
7127
|
+
}, Bu = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Vu = {
|
|
7092
7128
|
key: 1,
|
|
7093
7129
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
7094
|
-
},
|
|
7130
|
+
}, Hu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Uu = {
|
|
7095
7131
|
key: 2,
|
|
7096
7132
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
7097
|
-
},
|
|
7133
|
+
}, Wu = { class: "tpl:text-xs tpl:font-medium tpl:uppercase tpl:tracking-wider tpl:text-[var(--tpl-text-muted)]" }, Gu = {
|
|
7098
7134
|
key: 0,
|
|
7099
7135
|
class: "tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
7100
|
-
},
|
|
7136
|
+
}, Ku = {
|
|
7101
7137
|
key: 0,
|
|
7102
7138
|
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)]"
|
|
7103
|
-
},
|
|
7139
|
+
}, qu = ["onClick"], Ju = { class: "tpl:flex-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Yu = {
|
|
7104
7140
|
key: 0,
|
|
7105
7141
|
class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
|
|
7106
|
-
},
|
|
7142
|
+
}, Xu = {
|
|
7107
7143
|
key: 0,
|
|
7108
7144
|
class: "tpl:border-t tpl:border-[var(--tpl-border)]"
|
|
7109
|
-
},
|
|
7145
|
+
}, Zu = {
|
|
7110
7146
|
key: 0,
|
|
7111
7147
|
class: "tpl:px-3 tpl:py-3 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
7112
|
-
},
|
|
7148
|
+
}, Qu = { class: "tpl:flex tpl:items-start tpl:gap-2" }, $u = { class: "tpl:flex-1 tpl:min-w-0" }, ed = { class: "tpl:flex tpl:items-start tpl:gap-1.5" }, td = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, nd = {
|
|
7113
7149
|
key: 0,
|
|
7114
7150
|
class: "tpl:mt-1 tpl:text-[11px] tpl:leading-snug tpl:text-[var(--tpl-text-dim)]"
|
|
7115
|
-
},
|
|
7151
|
+
}, rd = {
|
|
7116
7152
|
key: 1,
|
|
7117
7153
|
class: "tpl:mt-2 tpl:flex tpl:justify-center"
|
|
7118
|
-
},
|
|
7154
|
+
}, id = ["disabled", "onClick"], ad = {
|
|
7119
7155
|
key: 0,
|
|
7120
7156
|
class: "tpl:mt-1.5 tpl:text-[11px] tpl:text-[var(--tpl-danger)]"
|
|
7121
|
-
},
|
|
7157
|
+
}, od = {
|
|
7122
7158
|
key: 3,
|
|
7123
7159
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
7124
|
-
},
|
|
7160
|
+
}, sd = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, cd = { 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)]" }, ld = /*@__PURE__*/ B({
|
|
7125
7161
|
__name: "TemplateScoringPanel",
|
|
7126
7162
|
props: { visible: { type: Boolean } },
|
|
7127
7163
|
emits: ["close"],
|
|
@@ -7172,10 +7208,10 @@ var Au = {
|
|
|
7172
7208
|
"leave-from-class": "tpl:translate-x-0",
|
|
7173
7209
|
"leave-to-class": "tpl:translate-x-full"
|
|
7174
7210
|
}, {
|
|
7175
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
7211
|
+
default: b(() => [e.visible ? (f(), k("div", Nu, [I("div", Pu, [I("div", Fu, [V(j(ji), {
|
|
7176
7212
|
size: 13,
|
|
7177
7213
|
"stroke-width": 2
|
|
7178
|
-
}), I("span", null, D(j(i).scoring.title), 1)]), I("div",
|
|
7214
|
+
}), I("span", null, D(j(i).scoring.title), 1)]), I("div", Iu, [j(o).scoringResult.value && !j(o).isScoring.value ? (f(), k("button", {
|
|
7179
7215
|
key: 0,
|
|
7180
7216
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
7181
7217
|
title: j(i).scoring.rescore,
|
|
@@ -7183,19 +7219,19 @@ var Au = {
|
|
|
7183
7219
|
}, [V(j(Di), {
|
|
7184
7220
|
size: 14,
|
|
7185
7221
|
"stroke-width": 2
|
|
7186
|
-
})], 8,
|
|
7222
|
+
})], 8, Lu)) : A("", !0), I("button", {
|
|
7187
7223
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
7188
7224
|
onClick: n[1] ||= (e) => r("close")
|
|
7189
7225
|
}, [V(j(Bi), {
|
|
7190
7226
|
size: 14,
|
|
7191
7227
|
"stroke-width": 2
|
|
7192
|
-
})])])]), I("div",
|
|
7228
|
+
})])])]), I("div", Ru, [j(o).isScoring.value ? (f(), k("div", zu, [I("p", Bu, D(j(i).scoring.scoring), 1), V(Yi, { class: "tpl:w-3/4" })])) : j(o).error.value && !j(o).scoringResult.value ? (f(), k("div", Vu, [
|
|
7193
7229
|
V(j(si), {
|
|
7194
7230
|
size: 32,
|
|
7195
7231
|
"stroke-width": 1.5,
|
|
7196
7232
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
7197
7233
|
}),
|
|
7198
|
-
I("p",
|
|
7234
|
+
I("p", Hu, D(j(i).scoring.error), 1),
|
|
7199
7235
|
I("button", {
|
|
7200
7236
|
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)]",
|
|
7201
7237
|
onClick: n[2] ||= (e) => m()
|
|
@@ -7203,19 +7239,19 @@ var Au = {
|
|
|
7203
7239
|
size: 12,
|
|
7204
7240
|
"stroke-width": 2
|
|
7205
7241
|
}), z(" " + D(j(i).scoring.rescore), 1)])
|
|
7206
|
-
])) : j(o).scoringResult.value ? (f(), k("div",
|
|
7242
|
+
])) : j(o).scoringResult.value ? (f(), k("div", Uu, [
|
|
7207
7243
|
I("div", {
|
|
7208
7244
|
class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:p-5",
|
|
7209
|
-
style: L({ backgroundColor: j(
|
|
7245
|
+
style: L({ backgroundColor: j(Au)(j(o).scoringResult.value.score) })
|
|
7210
7246
|
}, [
|
|
7211
7247
|
I("span", {
|
|
7212
7248
|
class: "tpl:text-4xl tpl:font-bold tpl:tabular-nums",
|
|
7213
|
-
style: L({ color: j(
|
|
7249
|
+
style: L({ color: j(ku)(j(o).scoringResult.value.score) })
|
|
7214
7250
|
}, D(j(o).scoringResult.value.score), 5),
|
|
7215
|
-
I("span",
|
|
7216
|
-
_() > 0 ? (f(), k("span",
|
|
7251
|
+
I("span", Wu, D(j(i).scoring.overallScore), 1),
|
|
7252
|
+
_() > 0 ? (f(), k("span", Gu, D(_()) + " " + D(j(i).scoring.findings), 1)) : A("", !0)
|
|
7217
7253
|
], 4),
|
|
7218
|
-
j(o).fixError.value ? (f(), k("div",
|
|
7254
|
+
j(o).fixError.value ? (f(), k("div", Ku, [V(j(si), {
|
|
7219
7255
|
size: 14,
|
|
7220
7256
|
"stroke-width": 2,
|
|
7221
7257
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
@@ -7230,40 +7266,40 @@ var Au = {
|
|
|
7230
7266
|
(f(), N(d(p[e]), {
|
|
7231
7267
|
size: 14,
|
|
7232
7268
|
"stroke-width": 2,
|
|
7233
|
-
style: L({ color: j(
|
|
7269
|
+
style: L({ color: j(ku)(j(o).scoringResult.value.categories[e].score) })
|
|
7234
7270
|
}, null, 8, ["style"])),
|
|
7235
|
-
I("span",
|
|
7271
|
+
I("span", Ju, D(j(i).scoring.categories[e]), 1),
|
|
7236
7272
|
I("span", {
|
|
7237
7273
|
class: "tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-semibold tpl:tabular-nums",
|
|
7238
7274
|
style: L({
|
|
7239
|
-
color: j(
|
|
7240
|
-
backgroundColor: j(
|
|
7275
|
+
color: j(ku)(j(o).scoringResult.value.categories[e].score),
|
|
7276
|
+
backgroundColor: j(Au)(j(o).scoringResult.value.categories[e].score)
|
|
7241
7277
|
})
|
|
7242
7278
|
}, D(j(o).scoringResult.value.categories[e].score), 5),
|
|
7243
|
-
j(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), k("span",
|
|
7279
|
+
j(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), k("span", Yu, D(j(o).scoringResult.value.categories[e].findings.length), 1)) : A("", !0),
|
|
7244
7280
|
V(j(ri), {
|
|
7245
7281
|
size: 12,
|
|
7246
7282
|
"stroke-width": 2,
|
|
7247
7283
|
class: F(["tpl:transition-transform tpl:duration-200 tpl:text-[var(--tpl-text-dim)]", c.value[e] ? "tpl:rotate-0" : "tpl:-rotate-90"])
|
|
7248
7284
|
}, null, 8, ["class"])
|
|
7249
|
-
], 8,
|
|
7285
|
+
], 8, qu), c.value[e] ? (f(), k("div", Xu, [j(o).scoringResult.value.categories[e].findings.length === 0 ? (f(), k("div", Zu, 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", {
|
|
7250
7286
|
key: e.id,
|
|
7251
7287
|
class: "tpl:border-t tpl:px-3 tpl:py-2.5 first:tpl:border-t-0 tpl:border-[var(--tpl-border-light)]"
|
|
7252
|
-
}, [I("div",
|
|
7288
|
+
}, [I("div", Qu, [(f(), N(d(j(e.severity === "high" ? si : e.severity === "medium" ? Ii : bi)), {
|
|
7253
7289
|
size: 13,
|
|
7254
7290
|
"stroke-width": 2,
|
|
7255
7291
|
class: "tpl:mt-0.5 tpl:shrink-0",
|
|
7256
|
-
style: L({ color: j(
|
|
7257
|
-
}, null, 8, ["style"])), I("div",
|
|
7258
|
-
I("div",
|
|
7292
|
+
style: L({ color: j(ju)(e.severity) })
|
|
7293
|
+
}, null, 8, ["style"])), I("div", $u, [
|
|
7294
|
+
I("div", ed, [I("span", {
|
|
7259
7295
|
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",
|
|
7260
7296
|
style: L({
|
|
7261
|
-
color: j(
|
|
7262
|
-
backgroundColor: j(
|
|
7297
|
+
color: j(ju)(e.severity),
|
|
7298
|
+
backgroundColor: j(Mu)(e.severity)
|
|
7263
7299
|
})
|
|
7264
|
-
}, D(j(i).scoring.severity[e.severity]), 5), I("span",
|
|
7265
|
-
e.suggestion ? (f(), k("p",
|
|
7266
|
-
e.blockId ? (f(), k("div",
|
|
7300
|
+
}, D(j(i).scoring.severity[e.severity]), 5), I("span", td, D(e.message), 1)]),
|
|
7301
|
+
e.suggestion ? (f(), k("p", nd, D(e.suggestion), 1)) : A("", !0),
|
|
7302
|
+
e.blockId ? (f(), k("div", rd, [I("button", {
|
|
7267
7303
|
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)]",
|
|
7268
7304
|
style: { "background-color": "transparent" },
|
|
7269
7305
|
disabled: j(o).fixingFindingId.value !== null,
|
|
@@ -7277,27 +7313,27 @@ var Au = {
|
|
|
7277
7313
|
key: 1,
|
|
7278
7314
|
size: 11,
|
|
7279
7315
|
"stroke-width": 2
|
|
7280
|
-
})), z(" " + D(j(o).fixingFindingId.value === e.id ? j(i).scoring.fixing : j(i).scoring.fix), 1)], 8,
|
|
7316
|
+
})), z(" " + D(j(o).fixingFindingId.value === e.id ? j(i).scoring.fixing : j(i).scoring.fix), 1)], 8, id), j(o).fixError.value ? (f(), k("p", ad, D(j(o).fixError.value), 1)) : A("", !0)])) : A("", !0)
|
|
7281
7317
|
])])]))), 128))])) : A("", !0)])), 64))
|
|
7282
|
-
])) : (f(), k("div",
|
|
7318
|
+
])) : (f(), k("div", od, [V(j(ji), {
|
|
7283
7319
|
size: 32,
|
|
7284
7320
|
"stroke-width": 1.5,
|
|
7285
7321
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
7286
|
-
}), I("p",
|
|
7322
|
+
}), I("p", sd, D(j(i).scoring.emptyState), 1)])), I("p", cd, D(j(i).aiMenu.disclaimer), 1)])])) : A("", !0)]),
|
|
7287
7323
|
_: 1
|
|
7288
7324
|
}));
|
|
7289
7325
|
}
|
|
7290
|
-
}),
|
|
7326
|
+
}), ud = /* @__PURE__ */ e({ default: () => dd }), dd = /*#__PURE__*/ Gi(ld, [["__scopeId", "data-v-c23c73d4"]]), fd = ["aria-busy"], pd = {
|
|
7291
7327
|
id: "tpl-test-email-title",
|
|
7292
7328
|
class: "tpl:mb-4 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
7293
|
-
},
|
|
7329
|
+
}, md = { class: "tpl:mb-3" }, hd = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, gd = ["value"], _d = ["disabled"], vd = ["value"], yd = {
|
|
7294
7330
|
key: 0,
|
|
7295
7331
|
role: "alert",
|
|
7296
7332
|
class: "tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
7297
|
-
},
|
|
7333
|
+
}, bd = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, xd = ["disabled"], Sd = ["disabled"], Cd = {
|
|
7298
7334
|
key: 0,
|
|
7299
7335
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
7300
|
-
},
|
|
7336
|
+
}, wd = { key: 1 }, Td = /*@__PURE__*/ B({
|
|
7301
7337
|
__name: "TestEmailModal",
|
|
7302
7338
|
props: {
|
|
7303
7339
|
visible: { type: Boolean },
|
|
@@ -7320,7 +7356,7 @@ var Au = {
|
|
|
7320
7356
|
function l(e) {
|
|
7321
7357
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), o()), e.key === "Escape" && s();
|
|
7322
7358
|
}
|
|
7323
|
-
return (t, n) => (f(), N(
|
|
7359
|
+
return (t, n) => (f(), N(ps, {
|
|
7324
7360
|
visible: e.visible,
|
|
7325
7361
|
onClose: s,
|
|
7326
7362
|
onKeydown: l
|
|
@@ -7336,14 +7372,14 @@ var Au = {
|
|
|
7336
7372
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
7337
7373
|
}
|
|
7338
7374
|
}, [
|
|
7339
|
-
I("h3",
|
|
7340
|
-
I("div",
|
|
7375
|
+
I("h3", pd, D(j(i).testEmail.title), 1),
|
|
7376
|
+
I("div", md, [I("label", hd, D(j(i).testEmail.recipientLabel), 1), e.allowedEmails.length === 1 ? (f(), k("input", {
|
|
7341
7377
|
key: 0,
|
|
7342
7378
|
type: "text",
|
|
7343
7379
|
value: a.value,
|
|
7344
7380
|
disabled: "",
|
|
7345
7381
|
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)]"
|
|
7346
|
-
}, null, 8,
|
|
7382
|
+
}, null, 8, gd)) : c((f(), k("select", {
|
|
7347
7383
|
key: 1,
|
|
7348
7384
|
"onUpdate:modelValue": n[0] ||= (e) => a.value = e,
|
|
7349
7385
|
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)]",
|
|
@@ -7351,29 +7387,29 @@ var Au = {
|
|
|
7351
7387
|
}, [(f(!0), k(R, null, h(e.allowedEmails, (e) => (f(), k("option", {
|
|
7352
7388
|
key: e,
|
|
7353
7389
|
value: e
|
|
7354
|
-
}, D(e), 9,
|
|
7355
|
-
e.error ? (f(), k("p",
|
|
7356
|
-
I("div",
|
|
7390
|
+
}, D(e), 9, vd))), 128))], 8, _d)), [[w, a.value]])]),
|
|
7391
|
+
e.error ? (f(), k("p", yd, D(e.error), 1)) : A("", !0),
|
|
7392
|
+
I("div", bd, [I("button", {
|
|
7357
7393
|
type: "button",
|
|
7358
7394
|
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 }]),
|
|
7359
7395
|
disabled: e.isSending,
|
|
7360
7396
|
onClick: s
|
|
7361
|
-
}, D(j(i).testEmail.cancel), 11,
|
|
7397
|
+
}, D(j(i).testEmail.cancel), 11, xd), I("button", {
|
|
7362
7398
|
type: "button",
|
|
7363
7399
|
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)]",
|
|
7364
7400
|
disabled: !a.value || e.isSending,
|
|
7365
7401
|
onClick: o
|
|
7366
|
-
}, [e.isSending ? (f(), k("span",
|
|
7402
|
+
}, [e.isSending ? (f(), k("span", Cd, [V(j(xi), {
|
|
7367
7403
|
class: "tpl:animate-spin",
|
|
7368
7404
|
size: 12,
|
|
7369
7405
|
"stroke-width": 2
|
|
7370
|
-
}), z(" " + D(j(i).testEmail.sending), 1)])) : (f(), k("span",
|
|
7371
|
-
], 8,
|
|
7406
|
+
}), z(" " + D(j(i).testEmail.sending), 1)])) : (f(), k("span", wd, D(j(i).testEmail.send), 1))], 8, Sd)])
|
|
7407
|
+
], 8, fd)]),
|
|
7372
7408
|
_: 1
|
|
7373
7409
|
}, 8, ["visible"]));
|
|
7374
7410
|
}
|
|
7375
|
-
}),
|
|
7411
|
+
}), Ed = /* @__PURE__ */ e({ default: () => Dd }), Dd = Td;
|
|
7376
7412
|
//#endregion
|
|
7377
|
-
export {
|
|
7413
|
+
export { ca as $, ir as $t, us as A, ut as An, si as At, uo as B, ve as Bn, cr as Bt, xs as C, dt as Cn, yi as Ct, hs as D, ht as Dn, di as Dt, ms as E, yt as En, fi as Et, Io as F, We as Fn, Wr as Ft, Ia as G, Ce as Gn, yr as Gt, eo as H, _e as Hn, Kn as Ht, No as I, ye as In, jr as It, Oa as J, xe as Jn, Jn as Jt, Fa as K, Ee as Kn, gr as Kt, Oo as L, De as Ln, wr as Lt, Qo as M, ct as Mn, ri as Mt, Ko as N, st as Nn, ni as Nt, ps as O, mt as On, ui as Ot, Uo as P, W as Pn, X as Pt, la as Q, ue as Qn, Un as Qt, Eo as R, be as Rn, Y as Rt, Ss as S, Ot as Sn, bi as St, Z as T, Ct as Tn, pi as Tt, Xa as U, he as Un, qn as Ut, lo as V, Te as Vn, mr as Vt, Ra as W, Se as Wn, lr as Wt, _a as X, de as Xn, sr as Xt, ya as Y, pe as Yn, Xn as Yt, ha as Z, fe as Zn, zn as Zt, Ps as _, on as _n, Di as _t, Ll as a, vr as an, Qi as at, As as b, un as bn, Si as bt, Zs as c, Rn as cn, Bi as ct, Ws as d, vn as dn, Fi as dt, tr as en, ia as et, Us as f, En as fn, Pi as ft, zs as g, An as gn, ki as gt, Bs as h, Nn as hn, Ai as ht, fu as i, _r as in, ta as it, cs as j, lt as jn, ai as jt, ds as k, St as kn, li as kt, Ks as l, Gn as ln, Ri as lt, Vs as m, q as mn, ji as mt, ud as n, or as nn, na as nt, Cc as o, dr as on, Gi as ot, Hs as p, Dn as pn, Ni as pt, Aa as q, ge as qn, Hn as qt, Du as r, Yn as rn, ea as rt, Qs as s, Wn as sn, Wi as st, Ed as t, Qn as tn, ra as tt, Gs as u, J as un, Ii as ut, Ns as v, an as vn, wi as vt, $ as w, xt as wn, vi as wt, Es as x, Lt as xn, xi as xt, js as y, ln as yn, Ci as yt, fo as z, we as zn, hr as zt };
|
|
7378
7414
|
|
|
7379
|
-
//# sourceMappingURL=features-
|
|
7415
|
+
//# sourceMappingURL=features-CgbSSCgv.js.map
|