@templatical/editor 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-B0-U5-sb.js → AiChatSidebar-BIKvYREk.js} +57 -56
- package/dist/{AiFeatureMenu-DxDwLS8B.js → AiFeatureMenu-QbD82crt.js} +23 -23
- package/dist/{BlockIssueBadge-C-EPqWsh.js → BlockIssueBadge-B3xVgMTh.js} +11 -11
- package/dist/CloudEditor-DptuSf7A.js +1234 -0
- package/dist/{CollaboratorBar-DgwjisX2.js → CollaboratorBar-DrA_K69w.js} +20 -20
- package/dist/{CommentsSidebar-CpRLN40c.js → CommentsSidebar-D_tSGvTX.js} +158 -157
- package/dist/CountdownBlock-apiYUhkQ.js +92 -0
- package/dist/CountdownToolbar-CS0axcjz.js +210 -0
- package/dist/{DesignReferenceSidebar-BgPDbOsl.js → DesignReferenceSidebar-DWYK9nTk.js} +58 -57
- package/dist/{IssuesPanel-I0z6k6-H.js → IssuesPanel-CR1MPaDE.js} +40 -40
- package/dist/{LoadingTrack-C7mGWPHS.js → LoadingTrack-DsecR8Rw.js} +1 -1
- package/dist/MergeTagSuggestion-CH2SUxBo.js +1327 -0
- package/dist/ModuleBrowserModal-D45rBj5C.js +202 -0
- package/dist/{ModulePreviewCanvas-Dni9kK4j.js → ModulePreviewCanvas-BiQ6B2-l.js} +29 -29
- package/dist/{NumberWithSuffix-D3fdj0iO.js → NumberWithSuffix-CrA6quxx.js} +143 -142
- package/dist/ParagraphEditor-1NaUJpZO.js +721 -0
- package/dist/{RichTextEditorContent-Q5altsx1.js → RichTextEditorContent-BqLHIZY7.js} +45 -44
- package/dist/{SaveModuleDialog-C38VqN2T.js → SaveModuleDialog-B0sPOTgO.js} +38 -37
- package/dist/{SnapshotHistory-ByloTpwh.js → SnapshotHistory-DslVzmSb.js} +34 -33
- package/dist/{TemplateScoringPanel-CUxiPtEf.js → TemplateScoringPanel-CZ62rGHz.js} +83 -82
- package/dist/{TestEmailModal-BvZBMBad.js → TestEmailModal-DWGniJVu.js} +22 -21
- package/dist/TitleEditor-D4t_gZZJ.js +193 -0
- package/dist/{TplModal-BYb-X5Bj.js → TplModal-Br2VG6cn.js} +14 -13
- package/dist/{blockTypeIcons-CyAom3iI.js → blockTypeIcons-CXhCS5WV.js} +5 -5
- package/dist/bundle-stats.json +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-BSoy-SoF.js → AiFeatureMenu-3Slo_LGA.js} +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-BSoy-SoF.js.map → AiFeatureMenu-3Slo_LGA.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BQDUuJxy.js → BlockIssueBadge-BxwEiiF3.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-BQDUuJxy.js.map → BlockIssueBadge-BxwEiiF3.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-BZuzsQOZ.js → CloudEditor-DFIFWD9G.js} +163 -161
- package/dist/cdn/chunks/CloudEditor-DFIFWD9G.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-DUpSrtDr.js → CollaboratorBar-Cu3vuN66.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-DUpSrtDr.js.map → CollaboratorBar-Cu3vuN66.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-DChGTAsH.js → CountdownBlock-BEVAJQtQ.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-DChGTAsH.js.map → CountdownBlock-BEVAJQtQ.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-C6gX2SJr.js → CountdownToolbar-CI2sQZv5.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-C6gX2SJr.js.map → CountdownToolbar-CI2sQZv5.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-Bo1uhdSe.js → IssuesPanel-BdeDoTcn.js} +11 -11
- package/dist/cdn/chunks/{IssuesPanel-Bo1uhdSe.js.map → IssuesPanel-BdeDoTcn.js.map} +1 -1
- package/dist/cdn/chunks/MergeTagSuggestion-BsCAo4Co.js +213 -0
- package/dist/cdn/chunks/MergeTagSuggestion-BsCAo4Co.js.map +1 -0
- package/dist/cdn/chunks/{ModuleBrowserModal-a-tZRCcD.js → ModuleBrowserModal-Dz-I5zfj.js} +11 -8
- package/dist/cdn/chunks/{ModuleBrowserModal-a-tZRCcD.js.map → ModuleBrowserModal-Dz-I5zfj.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-Bm6k0Op0.js → ModulePreviewCanvas-BfinyuAN.js} +21 -21
- package/dist/cdn/chunks/{ModulePreviewCanvas-Bm6k0Op0.js.map → ModulePreviewCanvas-BfinyuAN.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-HTbuD3VJ.js → NumberWithSuffix-CDjEa08X.js} +4 -4
- package/dist/cdn/chunks/{NumberWithSuffix-HTbuD3VJ.js.map → NumberWithSuffix-CDjEa08X.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-pGrfSccu.js → ParagraphEditor-B3fG0vge.js} +130 -110
- package/dist/cdn/chunks/ParagraphEditor-B3fG0vge.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-D7XZix_1.js → RichTextEditorContent-C6YPCp9j.js} +4 -4
- package/dist/cdn/chunks/{RichTextEditorContent-D7XZix_1.js.map → RichTextEditorContent-C6YPCp9j.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-C9PQ9x6j.js → SaveModuleDialog-C6UIIVAM.js} +6 -6
- package/dist/cdn/chunks/{SaveModuleDialog-C9PQ9x6j.js.map → SaveModuleDialog-C6UIIVAM.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-BvFbL16O.js → TitleEditor-BiZbLYF1.js} +62 -46
- package/dist/cdn/chunks/TitleEditor-BiZbLYF1.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-BernVG06.js +22 -0
- package/dist/cdn/chunks/{blockTypeIcons-Kd1MT0u8.js.map → blockTypeIcons-BernVG06.js.map} +1 -1
- package/dist/{de-C2wOXoxs.js → cdn/chunks/de-LsV0u1tP.js} +19 -1
- package/dist/cdn/chunks/de-LsV0u1tP.js.map +1 -0
- package/dist/cdn/chunks/{draggable-Bci-fq8y.js → draggable-kG-D5Xsm.js} +19 -10
- package/dist/cdn/chunks/draggable-kG-D5Xsm.js.map +1 -0
- package/dist/cdn/chunks/{en-dR7zfNC3.js → en-Bb8X1bOs.js} +18 -2
- package/dist/cdn/chunks/en-Bb8X1bOs.js.map +1 -0
- package/dist/cdn/chunks/extensions-Drp8UDc6.js +421 -0
- package/dist/cdn/chunks/extensions-Drp8UDc6.js.map +1 -0
- package/dist/cdn/chunks/{features-DU6lA8l1.js → features-Dpczf9Su.js} +1171 -994
- package/dist/cdn/chunks/features-Dpczf9Su.js.map +1 -0
- package/dist/cdn/chunks/{icons-BjHUZZyJ.js → icons-CuxnJiGQ.js} +170 -164
- package/dist/cdn/chunks/icons-CuxnJiGQ.js.map +1 -0
- package/dist/cdn/chunks/{liquid.browser-DKKBzRQu.js → liquid.browser-BJOEu6Cg.js} +693 -678
- package/dist/cdn/chunks/liquid.browser-BJOEu6Cg.js.map +1 -0
- package/dist/cdn/chunks/{media-library-Byelliig.js → media-library-CiYl_BO7.js} +556 -554
- package/dist/cdn/chunks/{media-library-Byelliig.js.map → media-library-CiYl_BO7.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-BZ86xqK6.js → pt-BR-BwJY_cvb.js} +18 -2
- package/dist/cdn/chunks/pt-BR-BwJY_cvb.js.map +1 -0
- package/dist/cdn/chunks/{pusher-BICWUP2j.js → pusher-CIwiKF8H.js} +9 -6
- package/dist/cdn/chunks/{pusher-BICWUP2j.js.map → pusher-CIwiKF8H.js.map} +1 -1
- package/dist/cdn/chunks/quality-CNjGxBG0.js +2176 -0
- package/dist/cdn/chunks/{quality-DNnYAntR.js.map → quality-CNjGxBG0.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-CZKO-Tav.js → renderer-CFkg8h-K.js} +40 -31
- package/dist/cdn/chunks/renderer-CFkg8h-K.js.map +1 -0
- package/dist/cdn/chunks/{src-DsqSXXjk.js → src-DRpKu4Dy.js} +11 -11
- package/dist/cdn/chunks/{src-DsqSXXjk.js.map → src-DRpKu4Dy.js.map} +1 -1
- package/dist/cdn/chunks/styles-B7wryV0l.js +3943 -0
- package/dist/cdn/chunks/styles-B7wryV0l.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-CwScfbsM.js → tiptap-DF9PEiqH.js} +5429 -5373
- package/dist/cdn/chunks/tiptap-DF9PEiqH.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +117 -115
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-BRzXxFHr.js → check-rl7ok6uJ.js} +1 -1
- package/dist/{chevron-down-DmEgzmYT.js → chevron-down-BKe__NOD.js} +1 -1
- package/dist/{circle-alert-BStvZr3O.js → circle-alert-C8xmpMsK.js} +1 -1
- package/dist/{clock-Blwp_1R6.js → clock-BW4JuDCN.js} +1 -1
- package/dist/{cloud-_olro76D.js → cloud-BQusL53H.js} +208 -208
- package/dist/createLucideIcon-Dx-EjR9r.js +43 -0
- package/dist/{cdn/chunks/de-C2wOXoxs.js → de-LsV0u1tP.js} +17 -3
- package/dist/{dist-BlG7k25W.js → dist-B5Sov3sS.js} +7 -7
- package/dist/dist-BEWiuOMi.js +251 -0
- package/dist/{dist-b7Ak-CuM.js → dist-BFmE-7hB.js} +2 -2
- package/dist/{dist-o73iaGqy.js → dist-BMoa33wT.js} +2 -2
- package/dist/{dist-BctFrpeA.js → dist-BibU4HNl.js} +74 -65
- package/dist/{dist-D6x1cQeh.js → dist-BsCGIDSt.js} +103 -102
- package/dist/dist-CNLKj9wa.js +5 -0
- package/dist/{dist-DULfKmTh.js → dist-CNXDNYQn.js} +729 -695
- package/dist/{dist-412xXefB.js → dist-COG3IdPK.js} +3 -3
- package/dist/{dist-Cz79qrLL.js → dist-CQZxDvFw.js} +3 -3
- package/dist/{dist-BwgjpLfr.js → dist-CRsjOQM-.js} +2 -2
- package/dist/dist-CTT6WYJ6.js +134 -0
- package/dist/dist-Cqa6aeAJ.js +5 -0
- package/dist/{dist-BCQZZUE9.js → dist-SXJJ2v41.js} +2 -2
- package/dist/{dist-DhKTdU52.js → dist-itdjZraK.js} +1445 -1420
- package/dist/{en-dR7zfNC3.js → en-Bb8X1bOs.js} +17 -1
- package/dist/extensions-DwaZAqm6.js +423 -0
- package/dist/{image-up-BFPbw_Zq.js → image-up-BwBCmQ4P.js} +1 -1
- package/dist/index.d.ts +17 -0
- package/dist/{info-B_qLEBN2.js → info-TCn7uWR5.js} +1 -1
- package/dist/keys-Cv8-8GsD.js +10 -0
- package/dist/{liquid.browser-CVjP5Mex.js → liquid.browser-DZLtv26k.js} +692 -677
- package/dist/{list-checks-CGg7JxPm.js → list-checks-CSrOWNgq.js} +1 -1
- package/dist/{loader-circle-CDF8eR_Q.js → loader-circle-BLmicnPG.js} +1 -1
- package/dist/{message-circle-C3cHsCJl.js → message-circle-C9hHMQCI.js} +1 -1
- package/dist/{pt-BR-BZ86xqK6.js → pt-BR-BwJY_cvb.js} +17 -1
- package/dist/{refresh-cw-Butml7Q4.js → refresh-cw-D1JQ1LNa.js} +1 -1
- package/dist/runtime-dom.esm-bundler-BzuoCyNp.js +523 -0
- package/dist/scan-line-DgijVq9y.js +31 -0
- package/dist/{send-k7npFJNO.js → send-DjPdq69F.js} +1 -1
- package/dist/{shield-check-CV6GbmCu.js → shield-check-Bqluu8FS.js} +1 -1
- package/dist/{sparkles-C965Xop4.js → sparkles-M4azPVSP.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/styles-D7fQ7f_1.js +4164 -0
- package/dist/templatical-editor.js +155 -152
- package/dist/{text-align-start-Bxnps8fH.js → text-align-start-CMya5pCQ.js} +11 -11
- package/dist/{trash-2-DpGb7fIt.js → trash-2-C-81rkLS.js} +1 -1
- package/dist/{triangle-alert-BKYElAwz.js → triangle-alert-BuRWnynk.js} +1 -1
- package/dist/{upload-BF7sxd1_.js → upload-CWBIoLd4.js} +1 -1
- package/dist/{useAliveFlag-BinvbqQR.js → useAliveFlag-CECL_OUb.js} +1 -1
- package/dist/{useCloudI18n-L3H2XvdW.js → useCloudI18n-AKCy98qD.js} +2 -2
- package/dist/{useEditorCore-DKYZ7aKk.js → useEditorCore-vcWLdnjN.js} +1480 -1310
- package/dist/{useI18n-CTs_bP9d.js → useI18n-C-TDeJBt.js} +2 -2
- package/dist/{useMergeTag-e3RSY-s3.js → useMergeTag-DSrBY0-2.js} +6 -6
- package/dist/usePopoverRoot-DKUDnr55.js +8 -0
- package/dist/{vue.runtime.esm-bundler-B2k01iQh.js → vue.runtime.esm-bundler-l0XAqiyv.js} +639 -1151
- package/dist/{x-CGjkjdKK.js → x-CQSvXnGR.js} +1 -1
- package/package.json +27 -27
- package/dist/CloudEditor-DaEfipBn.js +0 -1230
- package/dist/CountdownBlock-DO9fziwf.js +0 -92
- package/dist/CountdownToolbar-BeII06yJ.js +0 -210
- package/dist/ModuleBrowserModal-DsZRr87F.js +0 -198
- package/dist/ParagraphEditor-CZ-cmhX3.js +0 -700
- package/dist/TitleEditor-DbNOcvhR.js +0 -177
- package/dist/cdn/chunks/CloudEditor-BZuzsQOZ.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-pGrfSccu.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-BvFbL16O.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-Kd1MT0u8.js +0 -22
- package/dist/cdn/chunks/de-C2wOXoxs.js.map +0 -1
- package/dist/cdn/chunks/draggable-Bci-fq8y.js.map +0 -1
- package/dist/cdn/chunks/en-dR7zfNC3.js.map +0 -1
- package/dist/cdn/chunks/extensions-CuUjSmuA.js +0 -605
- package/dist/cdn/chunks/extensions-CuUjSmuA.js.map +0 -1
- package/dist/cdn/chunks/features-DU6lA8l1.js.map +0 -1
- package/dist/cdn/chunks/icons-BjHUZZyJ.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-DKKBzRQu.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-BZ86xqK6.js.map +0 -1
- package/dist/cdn/chunks/quality-DNnYAntR.js +0 -2176
- package/dist/cdn/chunks/renderer-CZKO-Tav.js.map +0 -1
- package/dist/cdn/chunks/styles-DiAdtiz9.js +0 -3428
- package/dist/cdn/chunks/styles-DiAdtiz9.js.map +0 -1
- package/dist/cdn/chunks/tiptap-CwScfbsM.js.map +0 -1
- package/dist/createLucideIcon-CmPAC-gt.js +0 -43
- package/dist/dist-BNEdeWub.js +0 -5
- package/dist/dist-Cgry6fNv.js +0 -382
- package/dist/dist-u0iIJH3V.js +0 -5
- package/dist/extensions-XPlNAKIL.js +0 -1720
- package/dist/keys-mFiJ5N0_.js +0 -10
- package/dist/scan-line-XYEqim_E.js +0 -25
- package/dist/styles-D0RCAWhB.js +0 -3647
- package/dist/usePopoverRoot-DVh7NY1q.js +0 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as e,
|
|
2
|
-
import "./useEditorCore-
|
|
3
|
-
import { t as f } from "./createLucideIcon-
|
|
4
|
-
import { n as p } from "./useCloudI18n-
|
|
1
|
+
import { A as e, Dt as t, O as n, Ot as r, _ as i, c as a, d as o, l as s, nt as c, r as l, s as u, u as d } from "./vue.runtime.esm-bundler-l0XAqiyv.js";
|
|
2
|
+
import "./useEditorCore-vcWLdnjN.js";
|
|
3
|
+
import { t as f } from "./createLucideIcon-Dx-EjR9r.js";
|
|
4
|
+
import { n as p } from "./useCloudI18n-AKCy98qD.js";
|
|
5
5
|
import { t as m } from "./readableTextColor-f8Kykfnh.js";
|
|
6
6
|
var h = f("wifi-off", [
|
|
7
7
|
["path", {
|
|
@@ -52,43 +52,43 @@ var h = f("wifi-off", [
|
|
|
52
52
|
]), _ = { class: "tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2" }, v = ["title"], y = {
|
|
53
53
|
key: 0,
|
|
54
54
|
class: "tpl:flex tpl:items-center tpl:-space-x-1.5"
|
|
55
|
-
}, b = ["title"], x = ["title"], S = 3, C = /* @__PURE__ */
|
|
55
|
+
}, b = ["title"], x = ["title"], S = 3, C = /* @__PURE__ */ i({
|
|
56
56
|
__name: "CollaboratorBar",
|
|
57
57
|
props: {
|
|
58
58
|
collaborators: {},
|
|
59
59
|
isConnected: { type: Boolean }
|
|
60
60
|
},
|
|
61
|
-
setup(
|
|
62
|
-
let f =
|
|
61
|
+
setup(i) {
|
|
62
|
+
let f = i, { t: C } = p(), w = u(() => f.collaborators.slice(0, S)), T = u(() => f.collaborators.slice(S)), E = u(() => T.value.length), D = u(() => T.value.map((e) => e.name).join("\n"));
|
|
63
63
|
function O(e) {
|
|
64
64
|
let t = e.trim().split(/\s+/);
|
|
65
65
|
return t.length >= 2 ? (t[0].charAt(0) + t[t.length - 1].charAt(0)).toUpperCase() : e.charAt(0).toUpperCase();
|
|
66
66
|
}
|
|
67
|
-
return (
|
|
67
|
+
return (u, f) => (n(), o("div", _, [a("div", {
|
|
68
68
|
class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-[11px]",
|
|
69
|
-
style:
|
|
70
|
-
title:
|
|
71
|
-
}, [
|
|
69
|
+
style: t({ color: i.isConnected ? "var(--tpl-success)" : "var(--tpl-text-muted)" }),
|
|
70
|
+
title: i.isConnected ? c(C).collaboration.connected : c(C).collaboration.disconnected
|
|
71
|
+
}, [i.isConnected ? (n(), s(c(g), {
|
|
72
72
|
key: 0,
|
|
73
73
|
size: 12,
|
|
74
74
|
"stroke-width": 2
|
|
75
|
-
})) : (
|
|
75
|
+
})) : (n(), s(c(h), {
|
|
76
76
|
key: 1,
|
|
77
77
|
size: 12,
|
|
78
78
|
"stroke-width": 2
|
|
79
|
-
}))], 12, v),
|
|
80
|
-
key:
|
|
79
|
+
}))], 12, v), i.collaborators.length > 0 ? (n(), o("div", y, [(n(!0), o(l, null, e(w.value, (e) => (n(), o("div", {
|
|
80
|
+
key: e.id,
|
|
81
81
|
class: "tpl-collaborator-avatar tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:text-[10px] tpl:font-bold tpl:transition-transform tpl:duration-150 tpl:hover:z-10 tpl:hover:scale-110 tpl:border-[var(--tpl-bg)]",
|
|
82
|
-
style:
|
|
83
|
-
backgroundColor:
|
|
84
|
-
color:
|
|
82
|
+
style: t({
|
|
83
|
+
backgroundColor: e.color,
|
|
84
|
+
color: c(m)(e.color)
|
|
85
85
|
}),
|
|
86
|
-
title:
|
|
87
|
-
},
|
|
86
|
+
title: e.name
|
|
87
|
+
}, r(O(e.name)), 13, b))), 128)), E.value > 0 ? (n(), o("div", {
|
|
88
88
|
key: 0,
|
|
89
89
|
class: "tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:text-[9px] tpl:font-bold tpl:border-[var(--tpl-bg)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]",
|
|
90
90
|
title: D.value
|
|
91
|
-
}, " +" +
|
|
91
|
+
}, " +" + r(E.value), 9, x)) : d("", !0)])) : d("", !0)]));
|
|
92
92
|
}
|
|
93
93
|
});
|
|
94
94
|
//#endregion
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import { A as e,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as oe } from "./check-
|
|
7
|
-
import { t as se } from "./chevron-down-
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
1
|
+
import { A as e, Dt as t, Et as n, I as r, O as i, Ot as a, R as o, Y as s, _ as c, c as l, d as u, h as d, l as f, m as ee, nt as p, r as m, s as h, u as g, w as te, z as _ } from "./vue.runtime.esm-bundler-l0XAqiyv.js";
|
|
2
|
+
import { a as v, t as y } from "./runtime-dom.esm-bundler-BzuoCyNp.js";
|
|
3
|
+
import { L as b, l as ne, m as re, r as ie } from "./keys-Cv8-8GsD.js";
|
|
4
|
+
import { t as ae } from "./useI18n-C-TDeJBt.js";
|
|
5
|
+
import { t as x } from "./createLucideIcon-Dx-EjR9r.js";
|
|
6
|
+
import { t as oe } from "./check-rl7ok6uJ.js";
|
|
7
|
+
import { t as se } from "./chevron-down-BKe__NOD.js";
|
|
8
|
+
import { t as S } from "./loader-circle-BLmicnPG.js";
|
|
9
|
+
import { t as C } from "./message-circle-C9hHMQCI.js";
|
|
10
|
+
import { t as w } from "./send-DjPdq69F.js";
|
|
11
|
+
import { t as T } from "./trash-2-C-81rkLS.js";
|
|
12
|
+
import { t as E } from "./x-CQSvXnGR.js";
|
|
12
13
|
import { t as D } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
13
|
-
import { n as ce } from "./useCloudI18n-
|
|
14
|
+
import { n as ce } from "./useCloudI18n-AKCy98qD.js";
|
|
14
15
|
import { t as le } from "./formatRelativeTime-CtUU-QZ8.js";
|
|
15
|
-
var ue = x("
|
|
16
|
+
var ue = x("chevron-up", [["path", {
|
|
17
|
+
d: "m18 15-6-6-6 6",
|
|
18
|
+
key: "153udz"
|
|
19
|
+
}]]), de = x("circle-check", [["circle", {
|
|
16
20
|
cx: "12",
|
|
17
21
|
cy: "12",
|
|
18
22
|
r: "10",
|
|
@@ -20,9 +24,6 @@ var ue = x("circle-check", [["circle", {
|
|
|
20
24
|
}], ["path", {
|
|
21
25
|
d: "m9 12 2 2 4-4",
|
|
22
26
|
key: "dzmm74"
|
|
23
|
-
}]]), de = x("chevron-up", [["path", {
|
|
24
|
-
d: "m18 15-6-6-6 6",
|
|
25
|
-
key: "153udz"
|
|
26
27
|
}]]), O = x("pencil", [["path", {
|
|
27
28
|
d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
|
|
28
29
|
key: "1a8usu"
|
|
@@ -100,7 +101,7 @@ var ue = x("circle-check", [["circle", {
|
|
|
100
101
|
props: { visible: { type: Boolean } },
|
|
101
102
|
emits: ["close", "filterBlock"],
|
|
102
103
|
setup(c, { expose: x, emit: D }) {
|
|
103
|
-
let k = c, A = D, { format: j } = ae(), { t: M } = ce(), N = b(re, "CommentsSidebar"), bt = b(ie, "CommentsSidebar"), P = b(ne, "CommentsSidebar"), F =
|
|
104
|
+
let k = c, A = D, { format: j } = ae(), { t: M } = ce(), N = b(re, "CommentsSidebar"), bt = b(ie, "CommentsSidebar"), P = b(ne, "CommentsSidebar"), F = s("unresolved"), I = s(null), L = s(""), R = s(null), z = s(""), B = s(null), V = s(""), H = s(/* @__PURE__ */ new Set()), U = s(null), W = s(null), xt = h(() => bt.userConfig?.id ?? null), St = h(() => {
|
|
104
105
|
let e = /* @__PURE__ */ new Set();
|
|
105
106
|
for (let t of N.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);
|
|
106
107
|
return e;
|
|
@@ -108,7 +109,7 @@ var ue = x("circle-check", [["circle", {
|
|
|
108
109
|
function Ct(e) {
|
|
109
110
|
return e ? !St.value.has(e) : !1;
|
|
110
111
|
}
|
|
111
|
-
let wt =
|
|
112
|
+
let wt = h(() => F.value !== "block" || !I.value ? !1 : !(N.savedBlockIds?.value.has(I.value) ?? !0)), G = h(() => {
|
|
112
113
|
let e = P.comments.value;
|
|
113
114
|
return F.value === "unresolved" ? e = e.filter((e) => !e.resolved_at) : F.value === "block" && I.value && (e = e.filter((e) => e.block_id === I.value)), e;
|
|
114
115
|
});
|
|
@@ -182,14 +183,14 @@ var ue = x("circle-check", [["circle", {
|
|
|
182
183
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Q(t)), e.key === "Escape" && J();
|
|
183
184
|
}
|
|
184
185
|
function It() {
|
|
185
|
-
|
|
186
|
+
te(() => {
|
|
186
187
|
W.value?.focus();
|
|
187
188
|
});
|
|
188
189
|
}
|
|
189
190
|
return x({
|
|
190
191
|
filterByBlock: Tt,
|
|
191
192
|
focusNewComment: It
|
|
192
|
-
}), (
|
|
193
|
+
}), (r, s) => (i(), f(y, {
|
|
193
194
|
"enter-active-class": "tpl-comments-slide-enter-active",
|
|
194
195
|
"enter-from-class": "tpl:translate-x-full",
|
|
195
196
|
"enter-to-class": "tpl:translate-x-0",
|
|
@@ -197,242 +198,242 @@ var ue = x("circle-check", [["circle", {
|
|
|
197
198
|
"leave-from-class": "tpl:translate-x-0",
|
|
198
199
|
"leave-to-class": "tpl:translate-x-full"
|
|
199
200
|
}, {
|
|
200
|
-
default:
|
|
201
|
-
|
|
202
|
-
|
|
201
|
+
default: o(() => [c.visible ? (i(), u("div", pe, [
|
|
202
|
+
l("div", me, [l("div", he, [
|
|
203
|
+
d(p(C), {
|
|
203
204
|
size: 13,
|
|
204
205
|
"stroke-width": 2
|
|
205
206
|
}),
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
]),
|
|
207
|
+
l("span", null, a(p(M).comments.title), 1),
|
|
208
|
+
p(P).unresolvedCount.value > 0 ? (i(), u("span", ge, a(p(P).unresolvedCount.value), 1)) : g("", !0)
|
|
209
|
+
]), l("button", {
|
|
209
210
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
210
|
-
onClick:
|
|
211
|
-
}, [
|
|
211
|
+
onClick: s[0] ||= (e) => A("close")
|
|
212
|
+
}, [d(p(E), {
|
|
212
213
|
size: 14,
|
|
213
214
|
"stroke-width": 2
|
|
214
215
|
})])]),
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
class:
|
|
218
|
-
onClick:
|
|
219
|
-
},
|
|
220
|
-
|
|
221
|
-
class:
|
|
222
|
-
onClick:
|
|
223
|
-
},
|
|
224
|
-
|
|
216
|
+
l("div", _e, [
|
|
217
|
+
l("button", {
|
|
218
|
+
class: n(["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", F.value === "unresolved" ? "tpl-comment-filter--active" : ""]),
|
|
219
|
+
onClick: s[1] ||= (e) => K("unresolved")
|
|
220
|
+
}, a(p(M).comments.filterUnresolved), 3),
|
|
221
|
+
l("button", {
|
|
222
|
+
class: n(["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", F.value === "all" ? "tpl-comment-filter--active" : ""]),
|
|
223
|
+
onClick: s[2] ||= (e) => K("all")
|
|
224
|
+
}, a(p(M).comments.filterAll), 3),
|
|
225
|
+
p(N).state.selectedBlockId ? (i(), u("button", {
|
|
225
226
|
key: 0,
|
|
226
|
-
class:
|
|
227
|
-
onClick:
|
|
228
|
-
},
|
|
227
|
+
class: n(["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", F.value === "block" ? "tpl-comment-filter--active" : ""]),
|
|
228
|
+
onClick: s[3] ||= (e) => K("block", p(N).state.selectedBlockId ?? void 0)
|
|
229
|
+
}, a(p(M).comments.filterBlock), 3)) : g("", !0)
|
|
229
230
|
]),
|
|
230
|
-
|
|
231
|
+
l("div", ve, [p(P).isLoading.value ? (i(), u("div", ye, [d(p(S), {
|
|
231
232
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
232
233
|
size: 24,
|
|
233
234
|
"stroke-width": 2
|
|
234
|
-
})])) : G.value.length === 0 ? (
|
|
235
|
+
})])) : G.value.length === 0 ? (i(), u("div", be, [d(p(C), {
|
|
235
236
|
size: 32,
|
|
236
237
|
"stroke-width": 1.5,
|
|
237
238
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
238
|
-
}),
|
|
239
|
-
key:
|
|
239
|
+
}), l("p", xe, a(F.value === "all" ? p(M).comments.noCommentsHint : p(M).comments.noComments), 1)])) : (i(), u("div", Se, [(i(!0), u(m, null, e(G.value, (r) => (i(), u("div", {
|
|
240
|
+
key: r.id,
|
|
240
241
|
class: "tpl-comment-thread"
|
|
241
242
|
}, [
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
]),
|
|
248
|
-
|
|
243
|
+
l("div", Ce, [
|
|
244
|
+
l("div", we, [l("div", Te, [
|
|
245
|
+
l("span", Ee, a($(r) ? p(M).comments.ownedByYou : r.author_name), 1),
|
|
246
|
+
l("span", De, a(Mt(r.created_at)), 1),
|
|
247
|
+
r.updated_at === r.created_at ? g("", !0) : (i(), u("span", Oe, " (" + a(p(M).comments.edited) + ") ", 1))
|
|
248
|
+
]), l("div", ke, [
|
|
249
|
+
l("button", {
|
|
249
250
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
250
|
-
title:
|
|
251
|
-
onClick: (e) => jt(
|
|
252
|
-
}, [
|
|
251
|
+
title: r.resolved_at ? p(M).comments.unresolve : p(M).comments.resolve,
|
|
252
|
+
onClick: (e) => jt(r.id)
|
|
253
|
+
}, [d(p(de), {
|
|
253
254
|
size: 13,
|
|
254
255
|
"stroke-width": 2,
|
|
255
256
|
class: "tpl-resolve-icon",
|
|
256
|
-
style:
|
|
257
|
+
style: t({ color: r.resolved_at ? "var(--tpl-primary)" : void 0 })
|
|
257
258
|
}, null, 8, ["style"])], 8, Ae),
|
|
258
|
-
$(
|
|
259
|
+
$(r) ? (i(), u("button", {
|
|
259
260
|
key: 0,
|
|
260
261
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
261
|
-
title:
|
|
262
|
-
onClick: (e) => q(
|
|
263
|
-
}, [
|
|
262
|
+
title: p(M).comments.edit,
|
|
263
|
+
onClick: (e) => q(r)
|
|
264
|
+
}, [d(p(O), {
|
|
264
265
|
size: 12,
|
|
265
266
|
"stroke-width": 2
|
|
266
|
-
})], 8, je)) :
|
|
267
|
-
$(
|
|
267
|
+
})], 8, je)) : g("", !0),
|
|
268
|
+
$(r) ? (i(), u("button", {
|
|
268
269
|
key: 1,
|
|
269
270
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
270
|
-
title:
|
|
271
|
-
onClick: (e) => Y(
|
|
272
|
-
}, [
|
|
271
|
+
title: p(M).comments.delete,
|
|
272
|
+
onClick: (e) => Y(r.id)
|
|
273
|
+
}, [d(p(T), {
|
|
273
274
|
size: 12,
|
|
274
275
|
"stroke-width": 2
|
|
275
|
-
})], 8, Me)) :
|
|
276
|
+
})], 8, Me)) : g("", !0)
|
|
276
277
|
])]),
|
|
277
|
-
|
|
278
|
-
default:
|
|
278
|
+
d(y, { name: "tpl-resolve" }, {
|
|
279
|
+
default: o(() => [r.resolved_at ? (i(), u("div", Ne, [d(p(oe), {
|
|
279
280
|
size: 10,
|
|
280
281
|
"stroke-width": 2.5
|
|
281
|
-
}),
|
|
282
|
+
}), l("span", null, a(p(j)(p(M).comments.resolvedBy, { name: r.resolved_by_name ?? "" })), 1)])) : g("", !0)]),
|
|
282
283
|
_: 2
|
|
283
284
|
}, 1024),
|
|
284
|
-
|
|
285
|
+
r.block_id && Ct(r.block_id) ? (i(), u("span", Pe, a(p(M).comments.missingBlock), 1)) : r.block_id ? (i(), u("button", {
|
|
285
286
|
key: 1,
|
|
286
287
|
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)]",
|
|
287
|
-
onClick: (e) =>
|
|
288
|
-
}, " Block ", 8, Fe)) :
|
|
289
|
-
B.value ===
|
|
290
|
-
"onUpdate:modelValue":
|
|
288
|
+
onClick: (e) => p(N).selectBlock(r.block_id ?? "")
|
|
289
|
+
}, " Block ", 8, Fe)) : g("", !0),
|
|
290
|
+
B.value === r.id ? (i(), u("div", Ie, [_(l("textarea", {
|
|
291
|
+
"onUpdate:modelValue": s[4] ||= (e) => V.value = e,
|
|
291
292
|
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)]",
|
|
292
293
|
rows: "3",
|
|
293
|
-
onKeydown: (e) => Ft(e,
|
|
294
|
-
}, null, 40, Le), [[
|
|
294
|
+
onKeydown: (e) => Ft(e, r.id)
|
|
295
|
+
}, null, 40, Le), [[v, V.value]]), l("div", Re, [l("button", {
|
|
295
296
|
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)]",
|
|
296
|
-
disabled: !V.value.trim() ||
|
|
297
|
-
onClick: (e) => Q(
|
|
298
|
-
},
|
|
297
|
+
disabled: !V.value.trim() || p(P).isSubmitting.value,
|
|
298
|
+
onClick: (e) => Q(r.id)
|
|
299
|
+
}, a(p(M).comments.save), 9, ze), l("button", {
|
|
299
300
|
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)]",
|
|
300
|
-
onClick:
|
|
301
|
-
},
|
|
302
|
-
U.value ===
|
|
303
|
-
|
|
304
|
-
|
|
301
|
+
onClick: s[5] ||= (e) => J()
|
|
302
|
+
}, a(p(M).comments.cancel), 1)])])) : (i(), u("p", Be, a(r.body), 1)),
|
|
303
|
+
U.value === r.id ? (i(), u("div", Ve, [
|
|
304
|
+
l("span", He, a(p(M).comments.deleteConfirm), 1),
|
|
305
|
+
l("button", {
|
|
305
306
|
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)]",
|
|
306
|
-
onClick: (e) => At(
|
|
307
|
-
},
|
|
308
|
-
|
|
307
|
+
onClick: (e) => At(r.id)
|
|
308
|
+
}, a(p(M).comments.delete), 9, Ue),
|
|
309
|
+
l("button", {
|
|
309
310
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
310
|
-
onClick:
|
|
311
|
-
},
|
|
312
|
-
])) :
|
|
313
|
-
B.value !==
|
|
311
|
+
onClick: s[6] ||= (e) => X()
|
|
312
|
+
}, a(p(M).comments.cancel), 1)
|
|
313
|
+
])) : g("", !0),
|
|
314
|
+
B.value !== r.id && U.value !== r.id ? (i(), u("div", We, [l("button", {
|
|
314
315
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
315
|
-
title:
|
|
316
|
-
onClick: (e) => Dt(
|
|
317
|
-
}, [
|
|
316
|
+
title: p(M).comments.reply,
|
|
317
|
+
onClick: (e) => Dt(r.id)
|
|
318
|
+
}, [d(p(fe), {
|
|
318
319
|
size: 13,
|
|
319
320
|
"stroke-width": 2,
|
|
320
321
|
class: "tpl:text-[var(--tpl-primary)]"
|
|
321
|
-
})], 8, Ge), (
|
|
322
|
+
})], 8, Ge), (r.replies?.length ?? 0) > 0 ? (i(), u("button", {
|
|
322
323
|
key: 0,
|
|
323
324
|
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)]",
|
|
324
|
-
onClick: (e) => Et(
|
|
325
|
-
}, [H.value.has(
|
|
325
|
+
onClick: (e) => Et(r.id)
|
|
326
|
+
}, [H.value.has(r.id) ? (i(), f(p(ue), {
|
|
326
327
|
key: 0,
|
|
327
328
|
size: 11,
|
|
328
329
|
"stroke-width": 2
|
|
329
|
-
})) : (
|
|
330
|
+
})) : (i(), f(p(se), {
|
|
330
331
|
key: 1,
|
|
331
332
|
size: 11,
|
|
332
333
|
"stroke-width": 2
|
|
333
|
-
})), ee(" " +
|
|
334
|
+
})), ee(" " + a((r.replies?.length ?? 0) === 1 ? p(j)(p(M).comments.replyOne, { count: String(r.replies?.length ?? 0) }) : p(j)(p(M).comments.replyMany, { count: String(r.replies?.length ?? 0) })), 1)], 8, Ke)) : g("", !0)])) : g("", !0)
|
|
334
335
|
]),
|
|
335
|
-
|
|
336
|
-
default:
|
|
337
|
-
key:
|
|
338
|
-
class:
|
|
336
|
+
d(y, { name: "tpl-replies" }, {
|
|
337
|
+
default: o(() => [H.value.has(r.id) && (r.replies?.length ?? 0) > 0 ? (i(), u("div", qe, [(i(!0), u(m, null, e(r.replies, (e, t) => (i(), u("div", {
|
|
338
|
+
key: e.id,
|
|
339
|
+
class: n(["tpl-comment-reply-card tpl:relative tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-2.5", t < (r.replies?.length ?? 0) - 1 ? "tpl:mb-2" : ""])
|
|
339
340
|
}, [
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
]),
|
|
341
|
+
l("div", Je, [l("div", Ye, [
|
|
342
|
+
l("span", Xe, a($(e) ? p(M).comments.ownedByYou : e.author_name), 1),
|
|
343
|
+
l("span", Ze, a(Mt(e.created_at)), 1),
|
|
344
|
+
e.updated_at === e.created_at ? g("", !0) : (i(), u("span", Qe, " (" + a(p(M).comments.edited) + ") ", 1))
|
|
345
|
+
]), l("div", $e, [$(e) ? (i(), u("button", {
|
|
345
346
|
key: 0,
|
|
346
347
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
347
|
-
title:
|
|
348
|
-
onClick: (
|
|
349
|
-
}, [
|
|
348
|
+
title: p(M).comments.edit,
|
|
349
|
+
onClick: (t) => q(e)
|
|
350
|
+
}, [d(p(O), {
|
|
350
351
|
size: 11,
|
|
351
352
|
"stroke-width": 2
|
|
352
|
-
})], 8, et)) :
|
|
353
|
+
})], 8, et)) : g("", !0), $(e) ? (i(), u("button", {
|
|
353
354
|
key: 1,
|
|
354
355
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
355
|
-
title:
|
|
356
|
-
onClick: (
|
|
357
|
-
}, [
|
|
356
|
+
title: p(M).comments.delete,
|
|
357
|
+
onClick: (t) => Y(e.id)
|
|
358
|
+
}, [d(p(T), {
|
|
358
359
|
size: 11,
|
|
359
360
|
"stroke-width": 2
|
|
360
|
-
})], 8, tt)) :
|
|
361
|
-
B.value ===
|
|
362
|
-
"onUpdate:modelValue":
|
|
361
|
+
})], 8, tt)) : g("", !0)])]),
|
|
362
|
+
B.value === e.id ? (i(), u("div", nt, [_(l("textarea", {
|
|
363
|
+
"onUpdate:modelValue": s[7] ||= (e) => V.value = e,
|
|
363
364
|
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)]",
|
|
364
365
|
rows: "2",
|
|
365
|
-
onKeydown: (
|
|
366
|
-
}, null, 40, rt), [[
|
|
366
|
+
onKeydown: (t) => Ft(t, e.id)
|
|
367
|
+
}, null, 40, rt), [[v, V.value]]), l("div", it, [l("button", {
|
|
367
368
|
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)]",
|
|
368
|
-
disabled: !V.value.trim() ||
|
|
369
|
-
onClick: (
|
|
370
|
-
},
|
|
369
|
+
disabled: !V.value.trim() || p(P).isSubmitting.value,
|
|
370
|
+
onClick: (t) => Q(e.id)
|
|
371
|
+
}, a(p(M).comments.save), 9, at), l("button", {
|
|
371
372
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
372
|
-
onClick:
|
|
373
|
-
},
|
|
374
|
-
U.value ===
|
|
375
|
-
|
|
376
|
-
|
|
373
|
+
onClick: s[8] ||= (e) => J()
|
|
374
|
+
}, a(p(M).comments.cancel), 1)])])) : (i(), u("p", ot, a(e.body), 1)),
|
|
375
|
+
U.value === e.id ? (i(), u("div", st, [
|
|
376
|
+
l("span", ct, a(p(M).comments.deleteConfirm), 1),
|
|
377
|
+
l("button", {
|
|
377
378
|
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)]",
|
|
378
|
-
onClick: (
|
|
379
|
-
},
|
|
380
|
-
|
|
379
|
+
onClick: (t) => At(e.id)
|
|
380
|
+
}, a(p(M).comments.delete), 9, lt),
|
|
381
|
+
l("button", {
|
|
381
382
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
382
|
-
onClick:
|
|
383
|
-
},
|
|
384
|
-
])) :
|
|
385
|
-
], 2))), 128))])) :
|
|
383
|
+
onClick: s[9] ||= (e) => X()
|
|
384
|
+
}, a(p(M).comments.cancel), 1)
|
|
385
|
+
])) : g("", !0)
|
|
386
|
+
], 2))), 128))])) : g("", !0)]),
|
|
386
387
|
_: 2
|
|
387
388
|
}, 1024),
|
|
388
|
-
|
|
389
|
-
default:
|
|
390
|
-
"onUpdate:modelValue":
|
|
389
|
+
d(y, { name: "tpl-replies" }, {
|
|
390
|
+
default: o(() => [R.value === r.id ? (i(), u("div", ut, [l("div", dt, [_(l("textarea", {
|
|
391
|
+
"onUpdate:modelValue": s[10] ||= (e) => z.value = e,
|
|
391
392
|
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)]",
|
|
392
|
-
placeholder:
|
|
393
|
+
placeholder: p(M).comments.replyPlaceholder,
|
|
393
394
|
rows: "2",
|
|
394
|
-
onKeydown: (e) => Pt(e,
|
|
395
|
-
}, null, 40, ft), [[
|
|
395
|
+
onKeydown: (e) => Pt(e, r.id)
|
|
396
|
+
}, null, 40, ft), [[v, z.value]]), l("div", pt, [l("button", {
|
|
396
397
|
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)]",
|
|
397
|
-
disabled: !z.value.trim() ||
|
|
398
|
-
onClick: (e) => kt(
|
|
399
|
-
}, [
|
|
398
|
+
disabled: !z.value.trim() || p(P).isSubmitting.value,
|
|
399
|
+
onClick: (e) => kt(r.id)
|
|
400
|
+
}, [d(p(w), {
|
|
400
401
|
size: 14,
|
|
401
402
|
"stroke-width": 2
|
|
402
|
-
})], 8, mt),
|
|
403
|
+
})], 8, mt), l("button", {
|
|
403
404
|
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)]",
|
|
404
|
-
onClick:
|
|
405
|
-
}, [
|
|
405
|
+
onClick: s[11] ||= (e) => Ot()
|
|
406
|
+
}, [d(p(E), {
|
|
406
407
|
size: 14,
|
|
407
408
|
"stroke-width": 2
|
|
408
|
-
})])])])])) :
|
|
409
|
+
})])])])])) : g("", !0)]),
|
|
409
410
|
_: 2
|
|
410
411
|
}, 1024)
|
|
411
412
|
]))), 128))]))]),
|
|
412
|
-
|
|
413
|
+
l("div", ht, [wt.value ? (i(), u("div", gt, a(p(M).comments.saveTemplateFirst), 1)) : (i(), u("div", _t, [_(l("textarea", {
|
|
413
414
|
ref_key: "newCommentInput",
|
|
414
415
|
ref: W,
|
|
415
|
-
"onUpdate:modelValue":
|
|
416
|
+
"onUpdate:modelValue": s[12] ||= (e) => L.value = e,
|
|
416
417
|
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)]",
|
|
417
|
-
placeholder:
|
|
418
|
-
disabled:
|
|
418
|
+
placeholder: p(M).comments.placeholder,
|
|
419
|
+
disabled: p(P).isSubmitting.value,
|
|
419
420
|
rows: "2",
|
|
420
421
|
onKeydown: Nt
|
|
421
|
-
}, null, 40, vt), [[
|
|
422
|
+
}, null, 40, vt), [[v, L.value]]), l("button", {
|
|
422
423
|
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)]",
|
|
423
|
-
disabled: !L.value.trim() ||
|
|
424
|
+
disabled: !L.value.trim() || p(P).isSubmitting.value,
|
|
424
425
|
onClick: Z
|
|
425
|
-
}, [
|
|
426
|
+
}, [p(P).isSubmitting.value ? (i(), f(p(S), {
|
|
426
427
|
key: 0,
|
|
427
428
|
class: "tpl-spinner",
|
|
428
429
|
size: 16,
|
|
429
430
|
"stroke-width": 2
|
|
430
|
-
})) : (
|
|
431
|
+
})) : (i(), f(p(w), {
|
|
431
432
|
key: 1,
|
|
432
433
|
size: 16,
|
|
433
434
|
"stroke-width": 2
|
|
434
435
|
}))], 8, yt)]))])
|
|
435
|
-
])) :
|
|
436
|
+
])) : g("", !0)]),
|
|
436
437
|
_: 1
|
|
437
438
|
}));
|
|
438
439
|
}
|