@templatical/editor 0.14.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-J8iO_sX7.js → AiChatSidebar-BIKvYREk.js} +57 -56
- package/dist/{AiFeatureMenu-F2diEDgV.js → AiFeatureMenu-CU6kTMTf.js} +20 -20
- package/dist/{BlockIssueBadge-a-qlByxF.js → BlockIssueBadge-B3xVgMTh.js} +11 -11
- package/dist/{CloudEditor-CDjtwb4i.js → CloudEditor-DRPxvUEj.js} +470 -468
- package/dist/{CollaboratorBar-B_EnJLtW.js → CollaboratorBar-DMSjd3HZ.js} +20 -20
- package/dist/{CommentsSidebar-DaP9BA_r.js → CommentsSidebar-D_tSGvTX.js} +154 -153
- package/dist/CountdownBlock-apiYUhkQ.js +92 -0
- package/dist/CountdownToolbar-CS0axcjz.js +210 -0
- package/dist/{DesignReferenceSidebar-BHRlTqlT.js → DesignReferenceSidebar-DWYK9nTk.js} +58 -57
- package/dist/{IssuesPanel-u7ee3Wrl.js → IssuesPanel-CR1MPaDE.js} +40 -40
- package/dist/{LoadingTrack-CV3ID80N.js → LoadingTrack-DsecR8Rw.js} +1 -1
- package/dist/MergeTagSuggestion-CH2SUxBo.js +1327 -0
- package/dist/{ModuleBrowserModal-DOsdaS6s.js → ModuleBrowserModal-BOzleijA.js} +60 -59
- package/dist/{ModulePreviewCanvas-Cx4MOJ0X.js → ModulePreviewCanvas-Cg99Pbde.js} +29 -29
- package/dist/{NumberWithSuffix-D2mW_DhT.js → NumberWithSuffix-CrA6quxx.js} +143 -142
- package/dist/{ParagraphEditor-DMzkVnST.js → ParagraphEditor-8jnzoL0A.js} +250 -247
- package/dist/{RichTextEditorContent-CRCxCwKf.js → RichTextEditorContent-BqLHIZY7.js} +45 -44
- package/dist/{SaveModuleDialog-DuEKgumL.js → SaveModuleDialog-Cy2XyjYT.js} +38 -37
- package/dist/{SnapshotHistory-CVgiNJtE.js → SnapshotHistory-cfxmOsJu.js} +34 -33
- package/dist/{TemplateScoringPanel-lm0_9nYi.js → TemplateScoringPanel-CZ62rGHz.js} +83 -82
- package/dist/{TestEmailModal-WBMdiW5S.js → TestEmailModal-sr1MaMVX.js} +22 -21
- package/dist/{TitleEditor-eyT0h-Sa.js → TitleEditor-CvGTprIg.js} +46 -45
- package/dist/{TplModal-tjQ7OB0g.js → TplModal-BtKB-0Bx.js} +14 -13
- package/dist/{blockTypeIcons-DdB3uTKD.js → blockTypeIcons-BxEbbev5.js} +2 -2
- package/dist/bundle-stats.json +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-D7rB2SBs.js → AiFeatureMenu-fDUpv_-s.js} +5 -5
- package/dist/cdn/chunks/{AiFeatureMenu-D7rB2SBs.js.map → AiFeatureMenu-fDUpv_-s.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-DHOe0pgx.js → BlockIssueBadge-Byce0j0W.js} +3 -3
- package/dist/cdn/chunks/{BlockIssueBadge-DHOe0pgx.js.map → BlockIssueBadge-Byce0j0W.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-DNed_Ym0.js → CloudEditor-B4m8ldiE.js} +89 -89
- package/dist/cdn/chunks/{CloudEditor-DNed_Ym0.js.map → CloudEditor-B4m8ldiE.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-sj_9Lee3.js → CollaboratorBar-LnLmjxw_.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-sj_9Lee3.js.map → CollaboratorBar-LnLmjxw_.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-C1Ikjpn4.js → CountdownBlock-DxTuMRBM.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-C1Ikjpn4.js.map → CountdownBlock-DxTuMRBM.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-j1G_X8rB.js → CountdownToolbar-DUrVfQZH.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-j1G_X8rB.js.map → CountdownToolbar-DUrVfQZH.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CTOf3PsH.js → IssuesPanel-CHl90k4h.js} +4 -4
- package/dist/cdn/chunks/{IssuesPanel-CTOf3PsH.js.map → IssuesPanel-CHl90k4h.js.map} +1 -1
- package/dist/cdn/chunks/MergeTagSuggestion-BsCAo4Co.js +213 -0
- package/dist/cdn/chunks/MergeTagSuggestion-BsCAo4Co.js.map +1 -0
- package/dist/cdn/chunks/{ModuleBrowserModal-DCh88-rr.js → ModuleBrowserModal-DW0iQW0J.js} +6 -6
- package/dist/cdn/chunks/{ModuleBrowserModal-DCh88-rr.js.map → ModuleBrowserModal-DW0iQW0J.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-DJqvTKmg.js → ModulePreviewCanvas-Cxo8v8t1.js} +3 -3
- package/dist/cdn/chunks/{ModulePreviewCanvas-DJqvTKmg.js.map → ModulePreviewCanvas-Cxo8v8t1.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-Bu45XWSl.js → NumberWithSuffix-CnSRmUMK.js} +6 -6
- package/dist/cdn/chunks/{NumberWithSuffix-Bu45XWSl.js.map → NumberWithSuffix-CnSRmUMK.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-DwZqLJp2.js → ParagraphEditor-iG5cDjH0.js} +25 -23
- package/dist/cdn/chunks/{ParagraphEditor-DwZqLJp2.js.map → ParagraphEditor-iG5cDjH0.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-CIuZ-2DV.js → RichTextEditorContent-DQpgeGMj.js} +4 -4
- package/dist/cdn/chunks/{RichTextEditorContent-CIuZ-2DV.js.map → RichTextEditorContent-DQpgeGMj.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-Bep0X2s_.js → SaveModuleDialog-sJQXg2Mh.js} +3 -3
- package/dist/cdn/chunks/{SaveModuleDialog-Bep0X2s_.js.map → SaveModuleDialog-sJQXg2Mh.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-DO1-h3RY.js → TitleEditor-C8qIn9Oi.js} +12 -11
- package/dist/cdn/chunks/TitleEditor-C8qIn9Oi.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-8o24HVJu.js → blockTypeIcons-DySnOpPo.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-8o24HVJu.js.map → blockTypeIcons-DySnOpPo.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-kPCz_3zM.js → draggable-kG-D5Xsm.js} +6 -6
- package/dist/cdn/chunks/draggable-kG-D5Xsm.js.map +1 -0
- package/dist/cdn/chunks/extensions-C2pTX899.js +421 -0
- package/dist/cdn/chunks/extensions-C2pTX899.js.map +1 -0
- package/dist/cdn/chunks/{features-CkTMVylx.js → features-CHE3YjQE.js} +886 -837
- package/dist/cdn/chunks/features-CHE3YjQE.js.map +1 -0
- package/dist/cdn/chunks/{icons-9zjCuoJx.js → icons-M4uqBV-_.js} +26 -26
- package/dist/cdn/chunks/{icons-9zjCuoJx.js.map → icons-M4uqBV-_.js.map} +1 -1
- package/dist/cdn/chunks/{liquid.browser-DKKBzRQu.js → liquid.browser-BJOEu6Cg.js} +693 -678
- package/dist/cdn/chunks/liquid.browser-BJOEu6Cg.js.map +1 -0
- package/dist/cdn/chunks/{media-library-DMRIPx4g.js → media-library-Bqr15VN2.js} +33 -33
- package/dist/cdn/chunks/{media-library-DMRIPx4g.js.map → media-library-Bqr15VN2.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-CdEqyLwF.js → pusher-CIwiKF8H.js} +4 -4
- package/dist/cdn/chunks/{pusher-CdEqyLwF.js.map → pusher-CIwiKF8H.js.map} +1 -1
- package/dist/cdn/chunks/{quality-CyeUgs_c.js → quality-DJZ_fqc2.js} +112 -112
- package/dist/cdn/chunks/{quality-CyeUgs_c.js.map → quality-DJZ_fqc2.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-BIKUEKDD.js → renderer-CyzTR1Vq.js} +20 -20
- package/dist/cdn/chunks/renderer-CyzTR1Vq.js.map +1 -0
- package/dist/cdn/chunks/{src-pDy_imWG.js → src-q-SBgWx7.js} +5 -5
- package/dist/cdn/chunks/{src-pDy_imWG.js.map → src-q-SBgWx7.js.map} +1 -1
- package/dist/cdn/chunks/{styles-D4Bd3SCx.js → styles-PWISdaws.js} +1484 -1344
- package/dist/cdn/chunks/styles-PWISdaws.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-BlLFFU3M.js → tiptap-DF9PEiqH.js} +6859 -6823
- package/dist/cdn/chunks/tiptap-DF9PEiqH.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +35 -35
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-CYJwFmjy.js → check-rl7ok6uJ.js} +1 -1
- package/dist/{chevron-down-C5l-DzAA.js → chevron-down-BKe__NOD.js} +1 -1
- package/dist/{circle-alert-wf5HUFZY.js → circle-alert-C8xmpMsK.js} +1 -1
- package/dist/{clock-Bj0bQw-K.js → clock-BW4JuDCN.js} +1 -1
- package/dist/{cloud-CoFDm9YA.js → cloud-BQusL53H.js} +208 -208
- package/dist/createLucideIcon-Dx-EjR9r.js +43 -0
- package/dist/{dist-CLpPNKy9.js → dist-B5Sov3sS.js} +7 -7
- package/dist/dist-BEWiuOMi.js +251 -0
- package/dist/{dist-CrQZ_af9.js → dist-BFmE-7hB.js} +2 -2
- package/dist/{dist-U5vfDdYI.js → dist-BMoa33wT.js} +2 -2
- package/dist/{dist-BctFrpeA.js → dist-BibU4HNl.js} +74 -65
- package/dist/{dist-Dd3ibRZm.js → dist-BsCGIDSt.js} +103 -102
- package/dist/dist-CNLKj9wa.js +5 -0
- package/dist/{dist-BX3gGwL8.js → dist-CNXDNYQn.js} +728 -694
- package/dist/{dist-Bn703mnA.js → dist-COG3IdPK.js} +3 -3
- package/dist/{dist-B7w6xTU6.js → dist-CQZxDvFw.js} +3 -3
- package/dist/{dist-34OcyoK1.js → dist-CRsjOQM-.js} +2 -2
- package/dist/dist-CTT6WYJ6.js +134 -0
- package/dist/dist-Cqa6aeAJ.js +5 -0
- package/dist/{dist-ChMninLH.js → dist-SXJJ2v41.js} +2 -2
- package/dist/{dist-CyjyYg52.js → dist-itdjZraK.js} +28 -23
- package/dist/extensions-DwaZAqm6.js +423 -0
- package/dist/{image-up-x8-WXfsx.js → image-up-BwBCmQ4P.js} +1 -1
- package/dist/{info-RS_fGcGi.js → info-TCn7uWR5.js} +1 -1
- package/dist/{keys-DgYXDafq.js → keys-Cv8-8GsD.js} +1 -1
- package/dist/{liquid.browser-CVjP5Mex.js → liquid.browser-DZLtv26k.js} +692 -677
- package/dist/{list-checks-Bf7XdDyv.js → list-checks-CSrOWNgq.js} +1 -1
- package/dist/{loader-circle-CLZ0_FvW.js → loader-circle-BLmicnPG.js} +1 -1
- package/dist/{message-circle-B-1bN9ab.js → message-circle-C9hHMQCI.js} +1 -1
- package/dist/{refresh-cw-CWKWqJYG.js → refresh-cw-D1JQ1LNa.js} +1 -1
- package/dist/runtime-dom.esm-bundler-BzuoCyNp.js +523 -0
- package/dist/{scan-line-BtK5dEai.js → scan-line-DgijVq9y.js} +1 -1
- package/dist/{send-Cn1IUdzh.js → send-DjPdq69F.js} +1 -1
- package/dist/{shield-check-CrvMk4Ea.js → shield-check-Bqluu8FS.js} +1 -1
- package/dist/{sparkles-CgfjwvnG.js → sparkles-M4azPVSP.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/styles-B2OrgEnn.js +4164 -0
- package/dist/templatical-editor.js +127 -126
- package/dist/{text-align-start-C3r_Rnvy.js → text-align-start-CMya5pCQ.js} +11 -11
- package/dist/{trash-2-CjERg4x9.js → trash-2-C-81rkLS.js} +1 -1
- package/dist/{triangle-alert-Chkny574.js → triangle-alert-BuRWnynk.js} +1 -1
- package/dist/{upload-e5kDRkPb.js → upload-CWBIoLd4.js} +1 -1
- package/dist/{useAliveFlag-cUQj9rmB.js → useAliveFlag-CECL_OUb.js} +1 -1
- package/dist/{useCloudI18n-CYJKqXtI.js → useCloudI18n-AKCy98qD.js} +2 -2
- package/dist/{useEditorCore-8JxXDOA4.js → useEditorCore-DJeOXVxQ.js} +1407 -1365
- package/dist/{useI18n-BWqM8i78.js → useI18n-C-TDeJBt.js} +2 -2
- package/dist/{useMergeTag-NHC4ylza.js → useMergeTag-DSrBY0-2.js} +5 -5
- package/dist/usePopoverRoot-DKUDnr55.js +8 -0
- package/dist/{vue.runtime.esm-bundler-BPa483TZ.js → vue.runtime.esm-bundler-l0XAqiyv.js} +626 -1147
- package/dist/{x-DiPIbccg.js → x-CQSvXnGR.js} +1 -1
- package/package.json +26 -26
- package/dist/CountdownBlock-DtAokAVw.js +0 -92
- package/dist/CountdownToolbar-Dtqgwy0g.js +0 -210
- package/dist/cdn/chunks/TitleEditor-DO1-h3RY.js.map +0 -1
- package/dist/cdn/chunks/draggable-kPCz_3zM.js.map +0 -1
- package/dist/cdn/chunks/extensions-iwBXnEwq.js +0 -605
- package/dist/cdn/chunks/extensions-iwBXnEwq.js.map +0 -1
- package/dist/cdn/chunks/features-CkTMVylx.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-DKKBzRQu.js.map +0 -1
- package/dist/cdn/chunks/renderer-BIKUEKDD.js.map +0 -1
- package/dist/cdn/chunks/styles-D4Bd3SCx.js.map +0 -1
- package/dist/cdn/chunks/tiptap-BlLFFU3M.js.map +0 -1
- package/dist/createLucideIcon-Bad2kKE0.js +0 -43
- package/dist/dist-CADDCv0o.js +0 -5
- package/dist/dist-CGvz7vkq.js +0 -5
- package/dist/dist-DuCzdgDA.js +0 -382
- package/dist/extensions-J439b7y7.js +0 -1720
- package/dist/styles-BUwDOWd3.js +0 -4022
- package/dist/usePopoverRoot-B1sdY4es.js +0 -8
|
@@ -1,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-DJeOXVxQ.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,16 +1,17 @@
|
|
|
1
|
-
import { A as e,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
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
16
|
var ue = x("chevron-up", [["path", {
|
|
16
17
|
d: "m18 15-6-6-6 6",
|
|
@@ -100,7 +101,7 @@ var ue = x("chevron-up", [["path", {
|
|
|
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("chevron-up", [["path", {
|
|
|
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("chevron-up", [["path", {
|
|
|
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("chevron-up", [["path", {
|
|
|
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
|
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { A as t, Dt as n, O as r, Ot as i, Y as a, _ as o, c as s, d as c, nt as l, r as u, s as d, u as f } from "./vue.runtime.esm-bundler-l0XAqiyv.js";
|
|
3
|
+
import { p } from "./dist-CTT6WYJ6.js";
|
|
4
|
+
import { t as m } from "./useI18n-C-TDeJBt.js";
|
|
5
|
+
//#region src/components/blocks/CountdownBlock.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var h = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8 tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
9
|
+
}, g = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-4 tpl:text-xs tpl:text-[var(--tpl-text-dim)] tpl:opacity-50"
|
|
12
|
+
}, _ = { class: "tpl:text-center" }, v = /*@__PURE__*/ o({
|
|
13
|
+
__name: "CountdownBlock",
|
|
14
|
+
props: {
|
|
15
|
+
block: {},
|
|
16
|
+
viewport: {}
|
|
17
|
+
},
|
|
18
|
+
setup(e) {
|
|
19
|
+
let o = e, { t: v } = m(), y = a(Date.now());
|
|
20
|
+
p(() => {
|
|
21
|
+
y.value = Date.now();
|
|
22
|
+
}, 1e3);
|
|
23
|
+
let b = d(() => {
|
|
24
|
+
if (!o.block.targetDate) return null;
|
|
25
|
+
let e = new Date(o.block.targetDate);
|
|
26
|
+
return isNaN(e.getTime()) ? null : e.getTime();
|
|
27
|
+
}), x = d(() => b.value ? y.value >= b.value : !1), S = d(() => {
|
|
28
|
+
if (!b.value || x.value) return {
|
|
29
|
+
days: 0,
|
|
30
|
+
hours: 0,
|
|
31
|
+
minutes: 0,
|
|
32
|
+
seconds: 0
|
|
33
|
+
};
|
|
34
|
+
let e = b.value - y.value, t = Math.floor(e / 1e3);
|
|
35
|
+
return {
|
|
36
|
+
days: Math.floor(t / 86400),
|
|
37
|
+
hours: Math.floor(t % 86400 / 3600),
|
|
38
|
+
minutes: Math.floor(t % 3600 / 60),
|
|
39
|
+
seconds: t % 60
|
|
40
|
+
};
|
|
41
|
+
}), C = d(() => {
|
|
42
|
+
let e = [];
|
|
43
|
+
return o.block.showDays && e.push({
|
|
44
|
+
value: String(S.value.days).padStart(2, "0"),
|
|
45
|
+
label: o.block.labelDays
|
|
46
|
+
}), o.block.showHours && e.push({
|
|
47
|
+
value: String(S.value.hours).padStart(2, "0"),
|
|
48
|
+
label: o.block.labelHours
|
|
49
|
+
}), o.block.showMinutes && e.push({
|
|
50
|
+
value: String(S.value.minutes).padStart(2, "0"),
|
|
51
|
+
label: o.block.labelMinutes
|
|
52
|
+
}), o.block.showSeconds && e.push({
|
|
53
|
+
value: String(S.value.seconds).padStart(2, "0"),
|
|
54
|
+
label: o.block.labelSeconds
|
|
55
|
+
}), e;
|
|
56
|
+
}), w = d(() => ({
|
|
57
|
+
backgroundColor: o.block.backgroundColor,
|
|
58
|
+
fontFamily: o.block.fontFamily || "inherit"
|
|
59
|
+
})), T = d(() => ({
|
|
60
|
+
fontSize: `${o.block.digitFontSize}px`,
|
|
61
|
+
fontWeight: "bold",
|
|
62
|
+
color: o.block.digitColor,
|
|
63
|
+
lineHeight: "1.2"
|
|
64
|
+
})), E = d(() => ({
|
|
65
|
+
fontSize: `${o.block.labelFontSize}px`,
|
|
66
|
+
color: o.block.labelColor,
|
|
67
|
+
marginTop: "4px"
|
|
68
|
+
})), D = d(() => ({
|
|
69
|
+
fontSize: `${o.block.digitFontSize}px`,
|
|
70
|
+
color: o.block.digitColor,
|
|
71
|
+
fontFamily: o.block.fontFamily || "inherit"
|
|
72
|
+
}));
|
|
73
|
+
return (a, o) => e.block.targetDate ? x.value && e.block.hideOnExpiry ? (r(), c("div", g, i(l(v).countdown.hidden), 1)) : x.value ? (r(), c("div", {
|
|
74
|
+
key: 2,
|
|
75
|
+
style: n(w.value),
|
|
76
|
+
class: "tpl:py-4 tpl:text-center"
|
|
77
|
+
}, [s("span", { style: n({
|
|
78
|
+
fontSize: `${e.block.digitFontSize}px`,
|
|
79
|
+
color: e.block.digitColor
|
|
80
|
+
}) }, i(e.block.expiredMessage), 5)], 4)) : (r(), c("div", {
|
|
81
|
+
key: 3,
|
|
82
|
+
style: n(w.value),
|
|
83
|
+
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:py-4"
|
|
84
|
+
}, [(r(!0), c(u, null, t(C.value, (t, a) => (r(), c(u, { key: t.label }, [a > 0 ? (r(), c("span", {
|
|
85
|
+
key: 0,
|
|
86
|
+
style: n(D.value),
|
|
87
|
+
class: "tpl:self-start"
|
|
88
|
+
}, i(e.block.separator), 5)) : f("", !0), s("div", _, [s("div", { style: n(T.value) }, i(t.value), 5), s("div", { style: n(E.value) }, i(t.label), 5)])], 64))), 128))], 4)) : (r(), c("div", h, i(l(v).countdown.setDate), 1));
|
|
89
|
+
}
|
|
90
|
+
}), y = /* @__PURE__ */ e({ default: () => b }), b = v;
|
|
91
|
+
//#endregion
|
|
92
|
+
export { y as n, b as t };
|