@templatical/editor 0.39.2 → 0.39.4
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-pOxCZWz9.js → AiChatSidebar-5qqrS6uy.js} +69 -63
- package/dist/{AiFeatureMenu-Bljk6Qjv.js → AiFeatureMenu-BBO_Ojlp.js} +1 -1
- package/dist/{BlockPreviewCanvas-DXGjUECG.js → BlockPreviewCanvas-BMC16_QU.js} +1 -1
- package/dist/{CloudHeaderExtras-DaocwNmy.js → CloudHeaderExtras-Cg6uF-yQ.js} +1 -1
- package/dist/{CloudPanels-CyZAnSJY.js → CloudPanels-D1Gg4qrG.js} +80 -66
- package/dist/{CollaboratorBar-C7Zca3g1.js → CollaboratorBar-Cmn0LccS.js} +3 -3
- package/dist/{CommentsPanel-CNOb7YCm.js → CommentsPanel-twNhYUqZ.js} +1 -1
- package/dist/{CommentsSidebar-VmwjU9va.js → CommentsSidebar-DDO0Qx8U.js} +122 -112
- package/dist/{CountdownToolbar-C2kfS6Oy.js → CountdownToolbar-nvHxu8Gu.js} +1 -1
- package/dist/DesignReferenceSidebar-C8ohNhOd.js +280 -0
- package/dist/{IssuesPanel-DL2Xr14_.js → IssuesPanel-Ck0EGoV5.js} +4 -4
- package/dist/{LoadingTrack-C2jKCU2d.js → LoadingTrack-C1Epulqq.js} +1 -1
- package/dist/{MediaEditModal-D4GEq2md.js → MediaEditModal-BFWmufJK.js} +3 -3
- package/dist/{MediaPanels-sapgKtxu.js → MediaPanels-BmDda5rY.js} +1 -1
- package/dist/{ParagraphEditor-DkkPSexG.js → ParagraphEditor-D6FRxr8Y.js} +2 -2
- package/dist/{RestoreVersionDialog-BgueZnZr.js → RestoreVersionDialog--b0qfNaK.js} +1 -1
- package/dist/{SaveBlockDialog-BuTuVlLr.js → SaveBlockDialog-C0BdEGeL.js} +6 -6
- package/dist/{SavedBlocksBrowserModal-Srhix8BB.js → SavedBlocksBrowserModal-BzDgXtr4.js} +8 -8
- package/dist/{SavedBlocksPanels-B2iScCS-.js → SavedBlocksPanels-DN-bDZzy.js} +1 -1
- package/dist/SavedBlocksPickBar-pEi9Et8Q.js +53 -0
- package/dist/{TemplateScoringPanel-C2Rdlyn6.js → TemplateScoringPanel-B1wcfE0w.js} +62 -56
- package/dist/{TestEmailModal-DJ5q_u4N.js → TestEmailModal-maM8SLBV.js} +6 -6
- package/dist/{TestEmailPanel-CP24UGst.js → TestEmailPanel-8iAZYpCK.js} +1 -1
- package/dist/{TitleEditor-QBBOXtxx.js → TitleEditor-L26QXwna.js} +1 -1
- package/dist/{Toolbar-COD2TW20.js → Toolbar-B2kDLFhn.js} +314 -314
- package/dist/{TplModal-C8xGjC1l.js → TplModal-DVMS_nAn.js} +1 -1
- package/dist/{VersionHistoryPanels-BrK6na4A.js → VersionHistoryPanels-D8f8KvKX.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-YlPDhElv.js → ca-Bqeygp1_.js} +1 -0
- package/dist/cdn/chunks/{AiChatSidebar-CjSEoK4x.js → AiChatSidebar-ctfIU4i0.js} +67 -61
- package/dist/cdn/chunks/AiChatSidebar-ctfIU4i0.js.map +1 -0
- package/dist/cdn/chunks/{AiFeatureMenu-l0K5TOSn.js → AiFeatureMenu-ByygdH_9.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-l0K5TOSn.js.map → AiFeatureMenu-ByygdH_9.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-lQrAdgG3.js → BlockPreviewCanvas-DeS7Sa--.js} +2 -2
- package/dist/cdn/chunks/{BlockPreviewCanvas-lQrAdgG3.js.map → BlockPreviewCanvas-DeS7Sa--.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-CXNe7Q-4.js → CloudHeaderExtras-BxsMpvVr.js} +2 -2
- package/dist/cdn/chunks/{CloudHeaderExtras-CXNe7Q-4.js.map → CloudHeaderExtras-BxsMpvVr.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-bHhh9AUA.js → CloudPanels-DmxmqAS_.js} +78 -64
- package/dist/cdn/chunks/CloudPanels-DmxmqAS_.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-DgqcaGGI.js → CollaboratorBar-B8ttqAqX.js} +4 -4
- package/dist/cdn/chunks/CollaboratorBar-B8ttqAqX.js.map +1 -0
- package/dist/cdn/chunks/{CommentsPanel-Cy4TlTHC.js → CommentsPanel-C8ibhaiK.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-Cy4TlTHC.js.map → CommentsPanel-C8ibhaiK.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-C7oAP3Mx.js → CommentsSidebar-CybWfZ3V.js} +118 -108
- package/dist/cdn/chunks/CommentsSidebar-CybWfZ3V.js.map +1 -0
- package/dist/cdn/chunks/{CountdownToolbar-CN9h4nlC.js → CountdownToolbar-DRESXiVD.js} +2 -2
- package/dist/cdn/chunks/{CountdownToolbar-CN9h4nlC.js.map → CountdownToolbar-DRESXiVD.js.map} +1 -1
- package/dist/cdn/chunks/DesignReferenceSidebar-CtaoY-hl.js +230 -0
- package/dist/cdn/chunks/DesignReferenceSidebar-CtaoY-hl.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-DdFk-Blf.js → IssuesPanel-C6RlIxoi.js} +5 -5
- package/dist/cdn/chunks/IssuesPanel-C6RlIxoi.js.map +1 -0
- package/dist/cdn/chunks/{LoadingTrack-Ba5xh5HD.js → LoadingTrack-_7DH_5aw.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-Ba5xh5HD.js.map → LoadingTrack-_7DH_5aw.js.map} +1 -1
- package/dist/cdn/chunks/{MediaEditModal-BBZRcYKe.js → MediaEditModal-CZBZviu2.js} +4 -4
- package/dist/cdn/chunks/MediaEditModal-CZBZviu2.js.map +1 -0
- package/dist/cdn/chunks/{MediaPanels-CSBCsFwT.js → MediaPanels-Bq5b-XJM.js} +2 -2
- package/dist/cdn/chunks/{MediaPanels-CSBCsFwT.js.map → MediaPanels-Bq5b-XJM.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-DO4RzP8l.js → ParagraphEditor-R2ph_UOo.js} +3 -3
- package/dist/cdn/chunks/ParagraphEditor-R2ph_UOo.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-CzZ_sFnz.js → RestoreVersionDialog-C-dwbb7T.js} +2 -2
- package/dist/cdn/chunks/{RestoreVersionDialog-CzZ_sFnz.js.map → RestoreVersionDialog-C-dwbb7T.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-LgxYrXyx.js → SaveBlockDialog-C_BPjVv6.js} +7 -7
- package/dist/cdn/chunks/SaveBlockDialog-C_BPjVv6.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CdeSsTpb.js → SavedBlocksBrowserModal-CrrGEfFb.js} +9 -9
- package/dist/cdn/chunks/SavedBlocksBrowserModal-CrrGEfFb.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksPanels-B5hakNJj.js → SavedBlocksPanels-DfTaMPAr.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-B5hakNJj.js.map → SavedBlocksPanels-DfTaMPAr.js.map} +1 -1
- package/dist/cdn/chunks/SavedBlocksPickBar-DziwHYSu.js +55 -0
- package/dist/cdn/chunks/SavedBlocksPickBar-DziwHYSu.js.map +1 -0
- package/dist/cdn/chunks/{TemplateScoringPanel--JxR6CsQ.js → TemplateScoringPanel-CR6RG6dZ.js} +95 -89
- package/dist/cdn/chunks/TemplateScoringPanel-CR6RG6dZ.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-BAuDxJtD.js → TestEmailModal-DId9Og-N.js} +7 -7
- package/dist/cdn/chunks/TestEmailModal-DId9Og-N.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel-GUGZisLp.js → TestEmailPanel-B8LwXmeX.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-GUGZisLp.js.map → TestEmailPanel-B8LwXmeX.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-uKu33Nwr.js → TitleEditor-C7KMzX1e.js} +2 -2
- package/dist/cdn/chunks/{TitleEditor-uKu33Nwr.js.map → TitleEditor-C7KMzX1e.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-dxDYwN5E.js → Toolbar-DqFhWxgW.js} +310 -310
- package/dist/cdn/chunks/Toolbar-DqFhWxgW.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-DuwS2ifK.js → TplModal-BKqDFLq3.js} +2 -2
- package/dist/cdn/chunks/{TplModal-DuwS2ifK.js.map → TplModal-BKqDFLq3.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-GeR6MStB.js → VersionHistoryPanels-DcCFFDK6.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-GeR6MStB.js.map → VersionHistoryPanels-DcCFFDK6.js.map} +1 -1
- package/dist/cdn/chunks/{ca-YlPDhElv.js → ca-Bqeygp1_.js} +2 -1
- package/dist/cdn/chunks/{ca-YlPDhElv.js.map → ca-Bqeygp1_.js.map} +1 -1
- package/dist/cdn/chunks/{de-CONjnzrF.js → de-CY6SlqBx.js} +2 -1
- package/dist/cdn/chunks/{de-CONjnzrF.js.map → de-CY6SlqBx.js.map} +1 -1
- package/dist/{de-BytZwgn6.js → cdn/chunks/de-mMY5yQJu.js} +5 -0
- package/dist/cdn/chunks/de-mMY5yQJu.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-C-yBlj2C.js → editor-modal-zxvWz8R6.js} +4 -3
- package/dist/cdn/chunks/editor-modal-zxvWz8R6.js.map +1 -0
- package/dist/cdn/chunks/{en-BAMooiOF.js → en-8V-2kDcp.js} +2 -1
- package/dist/cdn/chunks/{en-BAMooiOF.js.map → en-8V-2kDcp.js.map} +1 -1
- package/dist/cdn/chunks/en-BcQ9ovQu.js +2 -0
- package/dist/{en-DyOSV0lY.js → cdn/chunks/en-ChVeGQBY.js} +5 -0
- package/dist/cdn/chunks/en-ChVeGQBY.js.map +1 -0
- package/dist/cdn/chunks/{es-I47lHs2m.js → es-Cmn1rT3l.js} +2 -1
- package/dist/cdn/chunks/{es-I47lHs2m.js.map → es-Cmn1rT3l.js.map} +1 -1
- package/dist/cdn/chunks/{fr-B8MIKjT4.js → fr-2yDa4zXM.js} +2 -1
- package/dist/cdn/chunks/{fr-B8MIKjT4.js.map → fr-2yDa4zXM.js.map} +1 -1
- package/dist/cdn/chunks/{nl-CBLxcb-0.js → nl-Bzk2zRI8.js} +2 -1
- package/dist/cdn/chunks/{nl-CBLxcb-0.js.map → nl-Bzk2zRI8.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-C1WLSGDh.js → pt-BR-CoCwRUi0.js} +4 -1
- package/dist/cdn/chunks/pt-BR-CoCwRUi0.js.map +1 -0
- package/dist/cdn/chunks/{pt-BR-CMSRfX7t.js → pt-BR-DqtSCTUi.js} +2 -1
- package/dist/cdn/chunks/{pt-BR-CMSRfX7t.js.map → pt-BR-DqtSCTUi.js.map} +1 -1
- package/dist/cdn/chunks/{src-O5Sp_qJ7.js → src-CqYYKcCI.js} +2 -2
- package/dist/cdn/chunks/{src-O5Sp_qJ7.js.map → src-CqYYKcCI.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-BHmIp1hW.js → useEditorCore-CXYI14ux.js} +14 -14
- package/dist/cdn/chunks/{useEditorCore-BHmIp1hW.js.map → useEditorCore-CXYI14ux.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +15 -15
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{de-CONjnzrF.js → de-CY6SlqBx.js} +1 -0
- package/dist/{cdn/chunks/de-BytZwgn6.js → de-mMY5yQJu.js} +3 -2
- package/dist/{editor-modal-oD1qNz_P.js → editor-modal-Czq1I8oC.js} +3 -2
- package/dist/{en-BAMooiOF.js → en-8V-2kDcp.js} +1 -0
- package/dist/{cdn/chunks/en-DyOSV0lY.js → en-ChVeGQBY.js} +3 -2
- package/dist/en-DQqmtndQ.js +2 -0
- package/dist/{es-I47lHs2m.js → es-Cmn1rT3l.js} +1 -0
- package/dist/{fr-B8MIKjT4.js → fr-2yDa4zXM.js} +1 -0
- package/dist/{nl-CBLxcb-0.js → nl-Bzk2zRI8.js} +1 -0
- package/dist/{pt-BR-C1WLSGDh.js → pt-BR-CoCwRUi0.js} +3 -0
- package/dist/{pt-BR-CMSRfX7t.js → pt-BR-DqtSCTUi.js} +1 -0
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +14 -14
- package/dist/{useEditorCore-C5APBjjV.js → useEditorCore-BUVbQgwb.js} +13 -13
- package/package.json +7 -7
- package/dist/DesignReferenceSidebar-QC4gEUWp.js +0 -273
- package/dist/SavedBlocksPickBar-cI7bDQQi.js +0 -52
- package/dist/cdn/chunks/AiChatSidebar-CjSEoK4x.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-bHhh9AUA.js.map +0 -1
- package/dist/cdn/chunks/CollaboratorBar-DgqcaGGI.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-C7oAP3Mx.js.map +0 -1
- package/dist/cdn/chunks/DesignReferenceSidebar-Bjo0M-AY.js +0 -223
- package/dist/cdn/chunks/DesignReferenceSidebar-Bjo0M-AY.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-DdFk-Blf.js.map +0 -1
- package/dist/cdn/chunks/MediaEditModal-BBZRcYKe.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-DO4RzP8l.js.map +0 -1
- package/dist/cdn/chunks/SaveBlockDialog-LgxYrXyx.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-CdeSsTpb.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksPickBar-Cl6PLwwV.js +0 -54
- package/dist/cdn/chunks/SavedBlocksPickBar-Cl6PLwwV.js.map +0 -1
- package/dist/cdn/chunks/TemplateScoringPanel--JxR6CsQ.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-BAuDxJtD.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-dxDYwN5E.js.map +0 -1
- package/dist/cdn/chunks/de-BytZwgn6.js.map +0 -1
- package/dist/cdn/chunks/editor-modal-C-yBlj2C.js.map +0 -1
- package/dist/cdn/chunks/en-DYtFUE2l.js +0 -2
- package/dist/cdn/chunks/en-DyOSV0lY.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-C1WLSGDh.js.map +0 -1
- package/dist/en-CM5fTFSo.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { F as e, N as t, S as n, at as r, f as i, g as a, h as o, lt as s, m as c, p as l, u, ut as d } from "./draggable-IB4x6w2O.js";
|
|
2
|
-
import "./useEditorCore-
|
|
2
|
+
import "./useEditorCore-CXYI14ux.js";
|
|
3
3
|
import { a as f, i as p } from "./icons-BKkJ-5xF.js";
|
|
4
4
|
import { n as m } from "./useCloudI18n-C09JcFS0.js";
|
|
5
5
|
import { t as h } from "./readableTextColor-f8Kykfnh.js";
|
|
@@ -20,7 +20,7 @@ var g = { class: "tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2" }, _
|
|
|
20
20
|
return t.length >= 2 ? (t[0].charAt(0) + t[t.length - 1].charAt(0)).toUpperCase() : e.charAt(0).toUpperCase();
|
|
21
21
|
}
|
|
22
22
|
return (i, m) => (t(), a("div", g, [l("div", {
|
|
23
|
-
class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-
|
|
23
|
+
class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-xs",
|
|
24
24
|
style: s({ color: n.isConnected ? "var(--tpl-success)" : "var(--tpl-text-muted)" }),
|
|
25
25
|
title: n.isConnected ? r(C).collaboration.connected : r(C).collaboration.disconnected
|
|
26
26
|
}, [n.isConnected ? (t(), c(r(p), {
|
|
@@ -41,7 +41,7 @@ var g = { class: "tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2" }, _
|
|
|
41
41
|
title: e.name
|
|
42
42
|
}, d(O(e.name)), 13, y))), 128)), E.value > 0 ? (t(), a("div", {
|
|
43
43
|
key: 0,
|
|
44
|
-
class: "tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:text-[
|
|
44
|
+
class: "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:border-[var(--tpl-bg)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]",
|
|
45
45
|
title: D.value
|
|
46
46
|
}, " +" + d(E.value), 9, b)) : o("", !0)])) : o("", !0)]));
|
|
47
47
|
}
|
|
@@ -49,4 +49,4 @@ var g = { class: "tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2" }, _
|
|
|
49
49
|
//#endregion
|
|
50
50
|
export { S as default };
|
|
51
51
|
|
|
52
|
-
//# sourceMappingURL=CollaboratorBar-
|
|
52
|
+
//# sourceMappingURL=CollaboratorBar-B8ttqAqX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollaboratorBar-B8ttqAqX.js","names":[],"sources":["../../../src/cloud/components/CollaboratorBar.vue","../../../src/cloud/components/CollaboratorBar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Collaborator } from \"@templatical/types\";\nimport { useCloudI18nStrict } from \"../../composables\";\nimport { Wifi, WifiOff } from \"@lucide/vue\";\nimport { computed } from \"vue\";\nimport { readableTextColor } from \"../../utils/readableTextColor\";\n\nconst props = defineProps<{\n collaborators: Collaborator[];\n isConnected: boolean;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n\nconst maxVisible = 3;\n\nconst visibleCollaborators = computed(() =>\n props.collaborators.slice(0, maxVisible),\n);\n\nconst overflowCollaborators = computed(() =>\n props.collaborators.slice(maxVisible),\n);\n\nconst overflowCount = computed(() => overflowCollaborators.value.length);\n\nconst overflowNames = computed(() =>\n overflowCollaborators.value.map((c) => c.name).join(\"\\n\"),\n);\n\nfunction getInitials(name: string): string {\n const parts = name.trim().split(/\\s+/);\n if (parts.length >= 2) {\n return (\n parts[0].charAt(0) + parts[parts.length - 1].charAt(0)\n ).toUpperCase();\n }\n return name.charAt(0).toUpperCase();\n}\n</script>\n\n<template>\n <div class=\"tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2\">\n <!-- Connection indicator -->\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1 tpl:text-xs\"\n :style=\"{\n color: isConnected ? 'var(--tpl-success)' : 'var(--tpl-text-muted)',\n }\"\n :title=\"\n isConnected\n ? cloudT.collaboration.connected\n : cloudT.collaboration.disconnected\n \"\n >\n <Wifi v-if=\"isConnected\" :size=\"12\" :stroke-width=\"2\" />\n <WifiOff v-else :size=\"12\" :stroke-width=\"2\" />\n </div>\n\n <!-- Avatar stack -->\n <div\n v-if=\"collaborators.length > 0\"\n class=\"tpl:flex tpl:items-center tpl:-space-x-1.5\"\n >\n <div\n v-for=\"collaborator in visibleCollaborators\"\n :key=\"collaborator.id\"\n 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:hover:z-10 tpl:hover:scale-110 tpl:border-[var(--tpl-bg)]\"\n :style=\"{\n backgroundColor: collaborator.color,\n color: readableTextColor(collaborator.color),\n }\"\n :title=\"collaborator.name\"\n >\n {{ getInitials(collaborator.name) }}\n </div>\n <div\n v-if=\"overflowCount > 0\"\n class=\"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:border-[var(--tpl-bg)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]\"\n :title=\"overflowNames\"\n >\n +{{ overflowCount }}\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport type { Collaborator } from \"@templatical/types\";\nimport { useCloudI18nStrict } from \"../../composables\";\nimport { Wifi, WifiOff } from \"@lucide/vue\";\nimport { computed } from \"vue\";\nimport { readableTextColor } from \"../../utils/readableTextColor\";\n\nconst props = defineProps<{\n collaborators: Collaborator[];\n isConnected: boolean;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n\nconst maxVisible = 3;\n\nconst visibleCollaborators = computed(() =>\n props.collaborators.slice(0, maxVisible),\n);\n\nconst overflowCollaborators = computed(() =>\n props.collaborators.slice(maxVisible),\n);\n\nconst overflowCount = computed(() => overflowCollaborators.value.length);\n\nconst overflowNames = computed(() =>\n overflowCollaborators.value.map((c) => c.name).join(\"\\n\"),\n);\n\nfunction getInitials(name: string): string {\n const parts = name.trim().split(/\\s+/);\n if (parts.length >= 2) {\n return (\n parts[0].charAt(0) + parts[parts.length - 1].charAt(0)\n ).toUpperCase();\n }\n return name.charAt(0).toUpperCase();\n}\n</script>\n\n<template>\n <div class=\"tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2\">\n <!-- Connection indicator -->\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1 tpl:text-xs\"\n :style=\"{\n color: isConnected ? 'var(--tpl-success)' : 'var(--tpl-text-muted)',\n }\"\n :title=\"\n isConnected\n ? cloudT.collaboration.connected\n : cloudT.collaboration.disconnected\n \"\n >\n <Wifi v-if=\"isConnected\" :size=\"12\" :stroke-width=\"2\" />\n <WifiOff v-else :size=\"12\" :stroke-width=\"2\" />\n </div>\n\n <!-- Avatar stack -->\n <div\n v-if=\"collaborators.length > 0\"\n class=\"tpl:flex tpl:items-center tpl:-space-x-1.5\"\n >\n <div\n v-for=\"collaborator in visibleCollaborators\"\n :key=\"collaborator.id\"\n 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:hover:z-10 tpl:hover:scale-110 tpl:border-[var(--tpl-bg)]\"\n :style=\"{\n backgroundColor: collaborator.color,\n color: readableTextColor(collaborator.color),\n }\"\n :title=\"collaborator.name\"\n >\n {{ getInitials(collaborator.name) }}\n </div>\n <div\n v-if=\"overflowCount > 0\"\n class=\"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:border-[var(--tpl-bg)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]\"\n :title=\"overflowNames\"\n >\n +{{ overflowCount }}\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;iCAcM,IAAa;;;;;;;EAPnB,IAAM,IAAQ,GAKR,EAAE,GAAG,MAAW,EAAmB,GAInC,IAAuB,QAC3B,EAAM,cAAc,MAAM,GAAG,CAAU,CACzC,GAEM,IAAwB,QAC5B,EAAM,cAAc,MAAM,CAAU,CACtC,GAEM,IAAgB,QAAe,EAAsB,MAAM,MAAM,GAEjE,IAAgB,QACpB,EAAsB,MAAM,KAAK,MAAM,EAAE,IAAI,CAAC,CAAC,KAAK,IAAI,CAC1D;EAEA,SAAS,EAAY,GAAsB;GACzC,IAAM,IAAQ,EAAK,KAAK,CAAC,CAAC,MAAM,KAAK;GAMrC,OALI,EAAM,UAAU,KAEhB,EAAM,EAAE,CAAC,OAAO,CAAC,IAAI,EAAM,EAAM,SAAS,EAAE,CAAC,OAAO,CAAC,EAAA,CACrD,YAAY,IAET,EAAK,OAAO,CAAC,CAAC,CAAC,YAAY;EACpC;oBAIE,EAAA,GAAA,EA0CM,OA1CN,GA0CM,CAxCJ,EAaM,OAAA;GAZJ,OAAM;GACL,OAAK,EAAA,EAAmB,OAAA,EAAA,cAAW,uBAAA,wBAAA,CAAA;GAGnC,OAAgB,EAAA,cAAwB,EAAA,CAAA,CAAM,CAAC,cAAc,YAAsB,EAAA,CAAA,CAAM,CAAC,cAAc;EAM7F,GAAA,CAAA,EAAA,eAAZ,EAAA,GAAA,EAAwD,EAAA,CAAA,GAAA;;GAA9B,MAAM;GAAK,gBAAc;EACnD,CAAA,MAAA,EAAA,GAAA,EAA+C,EAAA,CAAA,GAAA;;GAA9B,MAAM;GAAK,gBAAc;EAKpC,CAAA,EAAA,GAAA,IAAA,CAAA,GAAA,EAAA,cAAc,SAAM,KAD5B,EAAA,GAAA,EAuBM,OAvBN,GAuBM,EAnBJ,EAAA,EAAA,GAAA,EAWM,GAAA,MAAA,EAVmB,EAAA,QAAhB,OADT,EAAA,GAAA,EAWM,OAAA;GATH,KAAK,EAAa;GACnB,OAAM;GACL,OAAK,EAAA;IAA+B,iBAAA,EAAa;IAAwB,OAAA,EAAA,CAAA,CAAiB,CAAC,EAAa,KAAK;;GAI7G,OAAO,EAAa;EAElB,GAAA,EAAA,EAAY,EAAa,IAAI,CAAA,GAAA,IAAA,CAAA,EAG1B,GAAA,GAAA,IAAA,EAAA,QAAa,KADrB,EAAA,GAAA,EAMM,OAAA;;GAJJ,OAAM;GACL,OAAO,EAAA;EACT,GAAA,OACE,EAAG,EAAA,KAAa,GAAA,GAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,CAAA"}
|
|
@@ -5,7 +5,7 @@ var o = /* @__PURE__ */ t({
|
|
|
5
5
|
__name: "CommentsPanel",
|
|
6
6
|
props: { feature: {} },
|
|
7
7
|
setup(t) {
|
|
8
|
-
let o = a(() => import("./CommentsSidebar-
|
|
8
|
+
let o = a(() => import("./CommentsSidebar-CybWfZ3V.js"));
|
|
9
9
|
return (a, s) => t.feature.isOpen.value ? (e(), i(n(o), {
|
|
10
10
|
key: 0,
|
|
11
11
|
visible: t.feature.isOpen.value,
|
|
@@ -17,4 +17,4 @@ var o = /* @__PURE__ */ t({
|
|
|
17
17
|
//#endregion
|
|
18
18
|
export { o as default };
|
|
19
19
|
|
|
20
|
-
//# sourceMappingURL=CommentsPanel-
|
|
20
|
+
//# sourceMappingURL=CommentsPanel-C8ibhaiK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommentsPanel-
|
|
1
|
+
{"version":3,"file":"CommentsPanel-C8ibhaiK.js","names":[],"sources":["../../../src/components/CommentsPanel.vue","../../../src/components/CommentsPanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Mount point for the comments sidebar, shared by both entry points.\n *\n * The sidebar is `defineAsyncComponent` behind a `v-if` on its open state, so its\n * chunk is fetched only when the user actually opens the panel. `Editor.vue` in\n * turn lazy-loads *this* wrapper and renders it only when a `CommentsProvider` and\n * a `user` are configured, so a consumer with neither downloads none of it —\n * the `TestEmailPanel` / `SavedBlocksPanels` shape.\n *\n * Never static-import `CommentsSidebar` into `Editor.vue`: that collapses the\n * whole panel into the main entry for every consumer. Guarded by\n * `tests/cdn-chunk-granularity.test.ts`.\n */\nimport { defineAsyncComponent } from \"vue\";\nimport type { UseCommentsFeatureReturn } from \"../composables/useCommentsFeature\";\n\ndefineProps<{\n feature: UseCommentsFeatureReturn;\n}>();\n\nconst CommentsSidebar = defineAsyncComponent(\n () => import(\"./CommentsSidebar.vue\"),\n);\n</script>\n\n<template>\n <CommentsSidebar\n v-if=\"feature.isOpen.value\"\n :visible=\"feature.isOpen.value\"\n :feature=\"feature\"\n @close=\"feature.close()\"\n />\n</template>\n","<script setup lang=\"ts\">\n/**\n * Mount point for the comments sidebar, shared by both entry points.\n *\n * The sidebar is `defineAsyncComponent` behind a `v-if` on its open state, so its\n * chunk is fetched only when the user actually opens the panel. `Editor.vue` in\n * turn lazy-loads *this* wrapper and renders it only when a `CommentsProvider` and\n * a `user` are configured, so a consumer with neither downloads none of it —\n * the `TestEmailPanel` / `SavedBlocksPanels` shape.\n *\n * Never static-import `CommentsSidebar` into `Editor.vue`: that collapses the\n * whole panel into the main entry for every consumer. Guarded by\n * `tests/cdn-chunk-granularity.test.ts`.\n */\nimport { defineAsyncComponent } from \"vue\";\nimport type { UseCommentsFeatureReturn } from \"../composables/useCommentsFeature\";\n\ndefineProps<{\n feature: UseCommentsFeatureReturn;\n}>();\n\nconst CommentsSidebar = defineAsyncComponent(\n () => import(\"./CommentsSidebar.vue\"),\n);\n</script>\n\n<template>\n <CommentsSidebar\n v-if=\"feature.isOpen.value\"\n :visible=\"feature.isOpen.value\"\n :feature=\"feature\"\n @close=\"feature.close()\"\n />\n</template>\n"],"mappings":";;;;;;;EAqBA,IAAM,IAAkB,QAChB,OAAO,gCACf;mBAKU,EAAA,QAAQ,OAAO,SADvB,EAAA,GAAA,EAKE,EAAA,CAAA,GAAA;;GAHC,SAAS,EAAA,QAAQ,OAAO;GACxB,SAAS,EAAA;GACT,SAAK,AAAA,EAAA,QAAA,MAAE,EAAA,QAAQ,MAAK"}
|
|
@@ -5,71 +5,67 @@ import { It as oe, K as y, L as se, Lt as ce, M as b, Nt as le, d as x, it as S,
|
|
|
5
5
|
import { t as T } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
6
6
|
import { t as de } from "./formatRelativeTime-CtUU-QZ8.js";
|
|
7
7
|
//#region src/components/CommentsSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var fe = {
|
|
9
|
-
key: 0,
|
|
10
|
-
"data-testid": "comments-sidebar",
|
|
11
|
-
class: "tpl-comments-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
12
|
-
}, pe = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, me = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, he = {
|
|
8
|
+
var fe = ["aria-label"], pe = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, me = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, he = {
|
|
13
9
|
key: 0,
|
|
14
10
|
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-on-primary)]"
|
|
15
|
-
}, ge = { class: "tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2" },
|
|
11
|
+
}, ge = ["aria-label"], _e = { class: "tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2" }, ve = ["aria-pressed"], ye = ["aria-pressed"], be = ["aria-pressed"], xe = { class: "tpl:flex-1 tpl:overflow-y-auto" }, Se = {
|
|
16
12
|
key: 0,
|
|
17
13
|
class: "tpl:flex tpl:h-full tpl:items-center tpl:justify-center"
|
|
18
|
-
},
|
|
14
|
+
}, Ce = {
|
|
19
15
|
key: 1,
|
|
20
16
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:px-6 tpl:text-center"
|
|
21
|
-
},
|
|
17
|
+
}, we = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Te = {
|
|
22
18
|
key: 2,
|
|
23
19
|
class: "tpl:flex tpl:flex-col tpl:gap-3 tpl:p-3"
|
|
24
|
-
},
|
|
20
|
+
}, Ee = { class: "tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3" }, De = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Oe = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, ke = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ae = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, je = {
|
|
25
21
|
key: 0,
|
|
26
22
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
27
|
-
},
|
|
23
|
+
}, Me = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, Ne = ["title", "onClick"], Pe = ["title", "onClick"], Fe = ["title", "onClick"], Ie = {
|
|
28
24
|
key: 0,
|
|
29
25
|
class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-primary)]"
|
|
30
|
-
},
|
|
26
|
+
}, Le = {
|
|
31
27
|
key: 0,
|
|
32
28
|
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)]"
|
|
33
|
-
},
|
|
29
|
+
}, Re = ["onClick"], ze = {
|
|
34
30
|
key: 2,
|
|
35
31
|
class: "tpl:mt-2"
|
|
36
|
-
},
|
|
32
|
+
}, Be = ["onKeydown"], Ve = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, He = ["disabled", "onClick"], Ue = {
|
|
37
33
|
key: 3,
|
|
38
34
|
class: "tpl:mt-1.5 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
39
|
-
},
|
|
35
|
+
}, We = {
|
|
40
36
|
key: 4,
|
|
41
37
|
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)]"
|
|
42
|
-
},
|
|
38
|
+
}, Ge = { class: "tpl:flex-1" }, Ke = ["onClick"], qe = {
|
|
43
39
|
key: 5,
|
|
44
40
|
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2"
|
|
45
|
-
},
|
|
41
|
+
}, Je = ["title", "onClick"], Ye = ["onClick"], Xe = {
|
|
46
42
|
key: 0,
|
|
47
43
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
48
|
-
},
|
|
44
|
+
}, Ze = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Qe = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, $e = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, et = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, tt = {
|
|
49
45
|
key: 0,
|
|
50
46
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
51
|
-
},
|
|
47
|
+
}, nt = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, rt = ["title", "onClick"], it = ["title", "onClick"], at = {
|
|
52
48
|
key: 0,
|
|
53
49
|
class: "tpl:mt-1.5"
|
|
54
|
-
},
|
|
50
|
+
}, ot = ["onKeydown"], st = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, ct = ["disabled", "onClick"], lt = {
|
|
55
51
|
key: 1,
|
|
56
52
|
class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
57
|
-
},
|
|
53
|
+
}, ut = {
|
|
58
54
|
key: 2,
|
|
59
55
|
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)]"
|
|
60
|
-
},
|
|
56
|
+
}, dt = { class: "tpl:flex-1" }, ft = ["onClick"], pt = {
|
|
61
57
|
key: 0,
|
|
62
58
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
63
|
-
},
|
|
59
|
+
}, mt = { class: "tpl-comments-input-wrapper tpl-focus-ring-host 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)]" }, ht = ["placeholder", "onKeydown"], gt = ["disabled", "onClick"], _t = {
|
|
64
60
|
key: 0,
|
|
65
61
|
class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]"
|
|
66
|
-
},
|
|
62
|
+
}, vt = {
|
|
67
63
|
key: 0,
|
|
68
64
|
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)]"
|
|
69
|
-
},
|
|
65
|
+
}, yt = {
|
|
70
66
|
key: 1,
|
|
71
67
|
class: "tpl-comments-input-wrapper tpl-focus-ring-host 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)]"
|
|
72
|
-
},
|
|
68
|
+
}, bt = ["placeholder", "disabled"], xt = ["disabled"], E = /*#__PURE__*/ T(/* @__PURE__ */ a({
|
|
73
69
|
__name: "CommentsSidebar",
|
|
74
70
|
props: {
|
|
75
71
|
visible: { type: Boolean },
|
|
@@ -77,19 +73,19 @@ var fe = {
|
|
|
77
73
|
},
|
|
78
74
|
emits: ["close"],
|
|
79
75
|
setup(a, { expose: T, emit: E }) {
|
|
80
|
-
let D = a,
|
|
76
|
+
let D = a, St = E, { t: O, format: k } = ae(), A = re(ie, "CommentsSidebar"), j = u(() => D.feature.headless), M = i("unresolved"), N = i(""), P = i(null), F = i(""), I = i(null), L = i(""), R = i(/* @__PURE__ */ new Set()), z = i(null), B = i(null), V = u(() => D.feature.filterBlockId.value);
|
|
81
77
|
e(V, (e) => {
|
|
82
78
|
e && (M.value = "block");
|
|
83
79
|
}, { immediate: !0 });
|
|
84
|
-
let
|
|
80
|
+
let Ct = u(() => j.value.isLoading.value && j.value.comments.value.length === 0), wt = u(() => {
|
|
85
81
|
let e = /* @__PURE__ */ new Set();
|
|
86
82
|
for (let t of A.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);
|
|
87
83
|
return e;
|
|
88
84
|
});
|
|
89
|
-
function
|
|
90
|
-
return e ? !
|
|
85
|
+
function Tt(e) {
|
|
86
|
+
return e ? !wt.value.has(e) : !1;
|
|
91
87
|
}
|
|
92
|
-
let
|
|
88
|
+
let Et = u(() => M.value !== "block" || !V.value ? !1 : D.feature.capability.isBlockSaved(V.value) === !1), H = u(() => {
|
|
93
89
|
let e = j.value.comments.value;
|
|
94
90
|
return M.value === "unresolved" ? e = e.filter((e) => !e.resolvedAt) : M.value === "block" && V.value && (e = e.filter((e) => e.blockId === V.value)), e;
|
|
95
91
|
});
|
|
@@ -99,16 +95,16 @@ var fe = {
|
|
|
99
95
|
function U(e, t) {
|
|
100
96
|
M.value = e, D.feature.filterBlockId.value = e === "block" ? t ?? null : null;
|
|
101
97
|
}
|
|
102
|
-
function
|
|
98
|
+
function Dt(e) {
|
|
103
99
|
U("block", e);
|
|
104
100
|
}
|
|
105
|
-
function
|
|
101
|
+
function Ot(e) {
|
|
106
102
|
R.value.has(e) ? R.value.delete(e) : R.value.add(e);
|
|
107
103
|
}
|
|
108
|
-
function
|
|
104
|
+
function kt(e) {
|
|
109
105
|
P.value = e, F.value = "", I.value = null, R.value.has(e) || R.value.add(e);
|
|
110
106
|
}
|
|
111
|
-
function
|
|
107
|
+
function At() {
|
|
112
108
|
P.value = null, F.value = "";
|
|
113
109
|
}
|
|
114
110
|
function W(e) {
|
|
@@ -158,7 +154,7 @@ var fe = {
|
|
|
158
154
|
} catch {}
|
|
159
155
|
z.value = null;
|
|
160
156
|
}
|
|
161
|
-
async function
|
|
157
|
+
async function jt(e) {
|
|
162
158
|
try {
|
|
163
159
|
await j.value.setResolved(e.id, !e.resolvedAt);
|
|
164
160
|
} catch {}
|
|
@@ -166,29 +162,29 @@ var fe = {
|
|
|
166
162
|
function Q(e) {
|
|
167
163
|
return j.value.canUpdate.value && j.value.isOwn(e);
|
|
168
164
|
}
|
|
169
|
-
function
|
|
165
|
+
function Mt(e) {
|
|
170
166
|
return j.value.canDelete.value && j.value.isOwn(e);
|
|
171
167
|
}
|
|
172
|
-
function
|
|
168
|
+
function Nt(e) {
|
|
173
169
|
return de(e, O.time) ?? e;
|
|
174
170
|
}
|
|
175
|
-
function
|
|
171
|
+
function Pt(e) {
|
|
176
172
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), J());
|
|
177
173
|
}
|
|
178
|
-
function
|
|
174
|
+
function Ft(e, t) {
|
|
179
175
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Y(t));
|
|
180
176
|
}
|
|
181
177
|
function $(e, t) {
|
|
182
178
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), X(t)), e.key === "Escape" && G();
|
|
183
179
|
}
|
|
184
|
-
function
|
|
180
|
+
function It() {
|
|
185
181
|
ee(() => {
|
|
186
182
|
B.value?.focus();
|
|
187
183
|
});
|
|
188
184
|
}
|
|
189
185
|
return T({
|
|
190
|
-
filterByBlock:
|
|
191
|
-
focusNewComment:
|
|
186
|
+
filterByBlock: Dt,
|
|
187
|
+
focusNewComment: It
|
|
192
188
|
}), (e, i) => (r(), p(m, {
|
|
193
189
|
"enter-active-class": "tpl-comments-slide-enter-active",
|
|
194
190
|
"enter-from-class": "tpl:translate-x-full",
|
|
@@ -197,7 +193,13 @@ var fe = {
|
|
|
197
193
|
"leave-from-class": "tpl:translate-x-0",
|
|
198
194
|
"leave-to-class": "tpl:translate-x-full"
|
|
199
195
|
}, {
|
|
200
|
-
default: n(() => [a.visible ? (r(), d("div",
|
|
196
|
+
default: n(() => [a.visible ? (r(), d("div", {
|
|
197
|
+
key: 0,
|
|
198
|
+
role: "complementary",
|
|
199
|
+
"aria-label": s(O).comments.title,
|
|
200
|
+
"data-testid": "comments-sidebar",
|
|
201
|
+
class: "tpl-comments-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
202
|
+
}, [
|
|
201
203
|
g("div", pe, [g("div", me, [
|
|
202
204
|
c(s(w), {
|
|
203
205
|
size: 13,
|
|
@@ -206,60 +208,68 @@ var fe = {
|
|
|
206
208
|
g("span", null, v(s(O).comments.title), 1),
|
|
207
209
|
a.feature.unresolvedCount.value > 0 ? (r(), d("span", he, v(a.feature.unresolvedCount.value), 1)) : f("", !0)
|
|
208
210
|
]), g("button", {
|
|
211
|
+
type: "button",
|
|
209
212
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-muted)]",
|
|
210
|
-
|
|
213
|
+
"aria-label": s(O).comments.close,
|
|
214
|
+
onClick: i[0] ||= (e) => St("close")
|
|
211
215
|
}, [c(s(C), {
|
|
212
216
|
size: 14,
|
|
213
217
|
"stroke-width": 2
|
|
214
|
-
})])]),
|
|
215
|
-
g("div",
|
|
218
|
+
})], 8, ge)]),
|
|
219
|
+
g("div", _e, [
|
|
216
220
|
g("button", {
|
|
221
|
+
type: "button",
|
|
217
222
|
class: l(["tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors", M.value === "unresolved" ? "tpl-comment-filter--active" : ""]),
|
|
223
|
+
"aria-pressed": M.value === "unresolved",
|
|
218
224
|
"data-testid": "comments-filter-unresolved",
|
|
219
225
|
onClick: i[1] ||= (e) => U("unresolved")
|
|
220
|
-
}, v(s(O).comments.filterUnresolved),
|
|
226
|
+
}, v(s(O).comments.filterUnresolved), 11, ve),
|
|
221
227
|
g("button", {
|
|
228
|
+
type: "button",
|
|
222
229
|
class: l(["tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors", M.value === "all" ? "tpl-comment-filter--active" : ""]),
|
|
230
|
+
"aria-pressed": M.value === "all",
|
|
223
231
|
"data-testid": "comments-filter-all",
|
|
224
232
|
onClick: i[2] ||= (e) => U("all")
|
|
225
|
-
}, v(s(O).comments.filterAll),
|
|
233
|
+
}, v(s(O).comments.filterAll), 11, ye),
|
|
226
234
|
s(A).state.selectedBlockId ? (r(), d("button", {
|
|
227
235
|
key: 0,
|
|
236
|
+
type: "button",
|
|
228
237
|
class: l(["tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors", M.value === "block" ? "tpl-comment-filter--active" : ""]),
|
|
238
|
+
"aria-pressed": M.value === "block",
|
|
229
239
|
onClick: i[3] ||= (e) => U("block", s(A).state.selectedBlockId ?? void 0)
|
|
230
|
-
}, v(s(O).comments.filterBlock),
|
|
240
|
+
}, v(s(O).comments.filterBlock), 11, be)) : f("", !0)
|
|
231
241
|
]),
|
|
232
|
-
g("div",
|
|
242
|
+
g("div", xe, [Ct.value ? (r(), d("div", Se, [c(s(S), {
|
|
233
243
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
234
244
|
size: 24,
|
|
235
245
|
"stroke-width": 2
|
|
236
|
-
})])) : H.value.length === 0 ? (r(), d("div",
|
|
246
|
+
})])) : H.value.length === 0 ? (r(), d("div", Ce, [c(s(w), {
|
|
237
247
|
size: 32,
|
|
238
248
|
"stroke-width": 1.5,
|
|
239
249
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
240
|
-
}), g("p",
|
|
250
|
+
}), g("p", we, v(M.value === "all" ? s(O).comments.noCommentsHint : s(O).comments.noComments), 1)])) : (r(), d("div", Te, [(r(!0), d(_, null, t(H.value, (e) => (r(), d("div", {
|
|
241
251
|
key: e.id,
|
|
242
252
|
class: "tpl-comment-thread",
|
|
243
253
|
"data-testid": "comment-thread"
|
|
244
254
|
}, [
|
|
245
|
-
g("div",
|
|
246
|
-
g("div",
|
|
247
|
-
g("span",
|
|
248
|
-
g("span",
|
|
249
|
-
e.updatedAt ? (r(), d("span",
|
|
250
|
-
]), g("div",
|
|
255
|
+
g("div", Ee, [
|
|
256
|
+
g("div", De, [g("div", Oe, [
|
|
257
|
+
g("span", ke, v(j.value.isOwn(e) ? s(O).comments.ownedByYou : e.author.name), 1),
|
|
258
|
+
g("span", Ae, v(Nt(e.createdAt)), 1),
|
|
259
|
+
e.updatedAt ? (r(), d("span", je, " (" + v(s(O).comments.edited) + ") ", 1)) : f("", !0)
|
|
260
|
+
]), g("div", Me, [
|
|
251
261
|
j.value.canResolve.value ? (r(), d("button", {
|
|
252
262
|
key: 0,
|
|
253
263
|
"data-testid": "comment-resolve",
|
|
254
264
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors",
|
|
255
265
|
title: e.resolvedAt ? s(O).comments.unresolve : s(O).comments.resolve,
|
|
256
|
-
onClick: (t) =>
|
|
266
|
+
onClick: (t) => jt(e)
|
|
257
267
|
}, [c(s(ue), {
|
|
258
268
|
size: 13,
|
|
259
269
|
"stroke-width": 2,
|
|
260
270
|
class: "tpl-resolve-icon",
|
|
261
271
|
style: te({ color: e.resolvedAt ? "var(--tpl-primary)" : void 0 })
|
|
262
|
-
}, null, 8, ["style"])], 8,
|
|
272
|
+
}, null, 8, ["style"])], 8, Ne)) : f("", !0),
|
|
263
273
|
Q(e) ? (r(), d("button", {
|
|
264
274
|
key: 1,
|
|
265
275
|
"data-testid": "comment-edit",
|
|
@@ -269,8 +279,8 @@ var fe = {
|
|
|
269
279
|
}, [c(s(y), {
|
|
270
280
|
size: 12,
|
|
271
281
|
"stroke-width": 2
|
|
272
|
-
})], 8,
|
|
273
|
-
|
|
282
|
+
})], 8, Pe)) : f("", !0),
|
|
283
|
+
Mt(e) ? (r(), d("button", {
|
|
274
284
|
key: 2,
|
|
275
285
|
"data-testid": "comment-delete",
|
|
276
286
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors",
|
|
@@ -279,59 +289,59 @@ var fe = {
|
|
|
279
289
|
}, [c(s(x), {
|
|
280
290
|
size: 12,
|
|
281
291
|
"stroke-width": 2
|
|
282
|
-
})], 8,
|
|
292
|
+
})], 8, Fe)) : f("", !0)
|
|
283
293
|
])]),
|
|
284
294
|
c(m, { name: "tpl-resolve" }, {
|
|
285
|
-
default: n(() => [e.resolvedAt ? (r(), d("div",
|
|
295
|
+
default: n(() => [e.resolvedAt ? (r(), d("div", Ie, [c(s(ce), {
|
|
286
296
|
size: 10,
|
|
287
297
|
"stroke-width": 2.5
|
|
288
298
|
}), g("span", null, v(s(k)(s(O).comments.resolvedBy, { name: e.resolvedBy?.name ?? "" })), 1)])) : f("", !0)]),
|
|
289
299
|
_: 2
|
|
290
300
|
}, 1024),
|
|
291
|
-
e.blockId &&
|
|
301
|
+
e.blockId && Tt(e.blockId) ? (r(), d("span", Le, v(s(O).comments.missingBlock), 1)) : e.blockId ? (r(), d("button", {
|
|
292
302
|
key: 1,
|
|
293
303
|
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:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]",
|
|
294
304
|
onClick: (t) => s(A).selectBlock(e.blockId ?? "")
|
|
295
|
-
}, v(s(O).comments.jumpToBlock), 9,
|
|
296
|
-
I.value === e.id ? (r(), d("div",
|
|
305
|
+
}, v(s(O).comments.jumpToBlock), 9, Re)) : f("", !0),
|
|
306
|
+
I.value === e.id ? (r(), d("div", ze, [o(g("textarea", {
|
|
297
307
|
"onUpdate:modelValue": i[4] ||= (e) => L.value = e,
|
|
298
|
-
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)]",
|
|
308
|
+
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)] tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)]",
|
|
299
309
|
rows: "3",
|
|
300
310
|
onKeydown: (t) => $(t, e.id)
|
|
301
|
-
}, null, 40,
|
|
311
|
+
}, null, 40, Be), [[h, L.value]]), g("div", Ve, [g("button", {
|
|
302
312
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-on-primary)]",
|
|
303
313
|
disabled: !L.value.trim() || j.value.isSubmitting.value,
|
|
304
314
|
onClick: (t) => X(e.id)
|
|
305
|
-
}, v(s(O).comments.save), 9,
|
|
315
|
+
}, v(s(O).comments.save), 9, He), g("button", {
|
|
306
316
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:text-[var(--tpl-text-muted)]",
|
|
307
317
|
onClick: i[5] ||= (e) => G()
|
|
308
|
-
}, v(s(O).comments.cancel), 1)])])) : (r(), d("p",
|
|
309
|
-
z.value === e.id ? (r(), d("div",
|
|
310
|
-
g("span",
|
|
318
|
+
}, v(s(O).comments.cancel), 1)])])) : (r(), d("p", Ue, v(e.body), 1)),
|
|
319
|
+
z.value === e.id ? (r(), d("div", We, [
|
|
320
|
+
g("span", Ge, v(s(O).comments.deleteConfirm), 1),
|
|
311
321
|
g("button", {
|
|
312
322
|
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)]",
|
|
313
323
|
"data-testid": "comment-delete-confirm",
|
|
314
324
|
onClick: (t) => Z(e.id)
|
|
315
|
-
}, v(s(O).comments.delete), 9,
|
|
325
|
+
}, v(s(O).comments.delete), 9, Ke),
|
|
316
326
|
g("button", {
|
|
317
327
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
318
328
|
onClick: i[6] ||= (e) => q()
|
|
319
329
|
}, v(s(O).comments.cancel), 1)
|
|
320
330
|
])) : f("", !0),
|
|
321
|
-
I.value !== e.id && z.value !== e.id ? (r(), d("div",
|
|
331
|
+
I.value !== e.id && z.value !== e.id ? (r(), d("div", qe, [j.value.canCreate.value ? (r(), d("button", {
|
|
322
332
|
key: 0,
|
|
323
333
|
"data-testid": "comment-reply",
|
|
324
334
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors",
|
|
325
335
|
title: s(O).comments.reply,
|
|
326
|
-
onClick: (t) =>
|
|
336
|
+
onClick: (t) => kt(e.id)
|
|
327
337
|
}, [c(s(se), {
|
|
328
338
|
size: 13,
|
|
329
339
|
"stroke-width": 2,
|
|
330
340
|
class: "tpl:text-[var(--tpl-primary)]"
|
|
331
|
-
})], 8,
|
|
341
|
+
})], 8, Je)) : f("", !0), (e.replies?.length ?? 0) > 0 ? (r(), d("button", {
|
|
332
342
|
key: 1,
|
|
333
|
-
class: "tpl:flex tpl:items-center tpl:gap-0.5 tpl:text-
|
|
334
|
-
onClick: (t) =>
|
|
343
|
+
class: "tpl:flex tpl:items-center tpl:gap-0.5 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:text-[var(--tpl-text-muted)]",
|
|
344
|
+
onClick: (t) => Ot(e.id)
|
|
335
345
|
}, [R.value.has(e.id) ? (r(), p(s(le), {
|
|
336
346
|
key: 0,
|
|
337
347
|
size: 11,
|
|
@@ -340,18 +350,18 @@ var fe = {
|
|
|
340
350
|
key: 1,
|
|
341
351
|
size: 11,
|
|
342
352
|
"stroke-width": 2
|
|
343
|
-
})), ne(" " + v((e.replies?.length ?? 0) === 1 ? s(k)(s(O).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : s(k)(s(O).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8,
|
|
353
|
+
})), ne(" " + v((e.replies?.length ?? 0) === 1 ? s(k)(s(O).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : s(k)(s(O).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8, Ye)) : f("", !0)])) : f("", !0)
|
|
344
354
|
]),
|
|
345
355
|
c(m, { name: "tpl-replies" }, {
|
|
346
|
-
default: n(() => [R.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (r(), d("div",
|
|
356
|
+
default: n(() => [R.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (r(), d("div", Xe, [(r(!0), d(_, null, t(e.replies, (t, n) => (r(), d("div", {
|
|
347
357
|
key: t.id,
|
|
348
358
|
class: l(["tpl-comment-reply-card tpl:relative tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-2.5", n < (e.replies?.length ?? 0) - 1 ? "tpl:mb-2" : ""])
|
|
349
359
|
}, [
|
|
350
|
-
g("div",
|
|
351
|
-
g("span",
|
|
352
|
-
g("span",
|
|
353
|
-
t.updatedAt ? (r(), d("span",
|
|
354
|
-
]), g("div",
|
|
360
|
+
g("div", Ze, [g("div", Qe, [
|
|
361
|
+
g("span", $e, v(j.value.isOwn(t) ? s(O).comments.ownedByYou : t.author.name), 1),
|
|
362
|
+
g("span", et, v(Nt(t.createdAt)), 1),
|
|
363
|
+
t.updatedAt ? (r(), d("span", tt, " (" + v(s(O).comments.edited) + ") ", 1)) : f("", !0)
|
|
364
|
+
]), g("div", nt, [Q(t) ? (r(), d("button", {
|
|
355
365
|
key: 0,
|
|
356
366
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors",
|
|
357
367
|
title: s(O).comments.edit,
|
|
@@ -359,7 +369,7 @@ var fe = {
|
|
|
359
369
|
}, [c(s(y), {
|
|
360
370
|
size: 11,
|
|
361
371
|
"stroke-width": 2
|
|
362
|
-
})], 8,
|
|
372
|
+
})], 8, rt)) : f("", !0), Mt(t) ? (r(), d("button", {
|
|
363
373
|
key: 1,
|
|
364
374
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors",
|
|
365
375
|
title: s(O).comments.delete,
|
|
@@ -367,27 +377,27 @@ var fe = {
|
|
|
367
377
|
}, [c(s(x), {
|
|
368
378
|
size: 11,
|
|
369
379
|
"stroke-width": 2
|
|
370
|
-
})], 8,
|
|
371
|
-
I.value === t.id ? (r(), d("div",
|
|
380
|
+
})], 8, it)) : f("", !0)])]),
|
|
381
|
+
I.value === t.id ? (r(), d("div", at, [o(g("textarea", {
|
|
372
382
|
"onUpdate:modelValue": i[7] ||= (e) => L.value = e,
|
|
373
|
-
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)]",
|
|
383
|
+
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)] tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)]",
|
|
374
384
|
rows: "2",
|
|
375
385
|
onKeydown: (e) => $(e, t.id)
|
|
376
|
-
}, null, 40,
|
|
386
|
+
}, null, 40, ot), [[h, L.value]]), g("div", st, [g("button", {
|
|
377
387
|
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-on-primary)]",
|
|
378
388
|
disabled: !L.value.trim() || j.value.isSubmitting.value,
|
|
379
389
|
onClick: (e) => X(t.id)
|
|
380
|
-
}, v(s(O).comments.save), 9,
|
|
390
|
+
}, v(s(O).comments.save), 9, ct), g("button", {
|
|
381
391
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
382
392
|
onClick: i[8] ||= (e) => G()
|
|
383
|
-
}, v(s(O).comments.cancel), 1)])])) : (r(), d("p",
|
|
384
|
-
z.value === t.id ? (r(), d("div",
|
|
385
|
-
g("span",
|
|
393
|
+
}, v(s(O).comments.cancel), 1)])])) : (r(), d("p", lt, v(t.body), 1)),
|
|
394
|
+
z.value === t.id ? (r(), d("div", ut, [
|
|
395
|
+
g("span", dt, v(s(O).comments.deleteConfirm), 1),
|
|
386
396
|
g("button", {
|
|
387
397
|
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)]",
|
|
388
398
|
"data-testid": "comment-delete-confirm",
|
|
389
399
|
onClick: (e) => Z(t.id)
|
|
390
|
-
}, v(s(O).comments.delete), 9,
|
|
400
|
+
}, v(s(O).comments.delete), 9, ft),
|
|
391
401
|
g("button", {
|
|
392
402
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
393
403
|
onClick: i[9] ||= (e) => q()
|
|
@@ -397,14 +407,14 @@ var fe = {
|
|
|
397
407
|
_: 2
|
|
398
408
|
}, 1024),
|
|
399
409
|
c(m, { name: "tpl-replies" }, {
|
|
400
|
-
default: n(() => [P.value === e.id ? (r(), d("div",
|
|
410
|
+
default: n(() => [P.value === e.id ? (r(), d("div", pt, [g("div", mt, [
|
|
401
411
|
o(g("textarea", {
|
|
402
412
|
"onUpdate:modelValue": i[10] ||= (e) => F.value = e,
|
|
403
413
|
class: "tpl:max-h-24 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)]",
|
|
404
414
|
placeholder: s(O).comments.replyPlaceholder,
|
|
405
415
|
rows: "2",
|
|
406
|
-
onKeydown: (t) =>
|
|
407
|
-
}, null, 40,
|
|
416
|
+
onKeydown: (t) => Ft(t, e.id)
|
|
417
|
+
}, null, 40, ht), [[h, F.value]]),
|
|
408
418
|
g("button", {
|
|
409
419
|
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:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
|
|
410
420
|
disabled: !F.value.trim() || j.value.isSubmitting.value,
|
|
@@ -412,10 +422,10 @@ var fe = {
|
|
|
412
422
|
}, [c(s(b), {
|
|
413
423
|
size: 14,
|
|
414
424
|
"stroke-width": 2
|
|
415
|
-
})], 8,
|
|
425
|
+
})], 8, gt),
|
|
416
426
|
g("button", {
|
|
417
427
|
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:text-[var(--tpl-text-muted)]",
|
|
418
|
-
onClick: i[11] ||= (e) =>
|
|
428
|
+
onClick: i[11] ||= (e) => At()
|
|
419
429
|
}, [c(s(C), {
|
|
420
430
|
size: 14,
|
|
421
431
|
"stroke-width": 2
|
|
@@ -424,7 +434,7 @@ var fe = {
|
|
|
424
434
|
_: 2
|
|
425
435
|
}, 1024)
|
|
426
436
|
]))), 128))]))]),
|
|
427
|
-
j.value.canCreate.value ? (r(), d("div",
|
|
437
|
+
j.value.canCreate.value ? (r(), d("div", _t, [Et.value ? (r(), d("div", vt, v(s(O).comments.saveTemplateFirst), 1)) : (r(), d("div", yt, [o(g("textarea", {
|
|
428
438
|
ref_key: "newCommentInput",
|
|
429
439
|
ref: B,
|
|
430
440
|
"onUpdate:modelValue": i[12] ||= (e) => N.value = e,
|
|
@@ -433,8 +443,8 @@ var fe = {
|
|
|
433
443
|
placeholder: s(O).comments.placeholder,
|
|
434
444
|
disabled: j.value.isSubmitting.value,
|
|
435
445
|
rows: "2",
|
|
436
|
-
onKeydown:
|
|
437
|
-
}, null, 40,
|
|
446
|
+
onKeydown: Pt
|
|
447
|
+
}, null, 40, bt), [[h, N.value]]), g("button", {
|
|
438
448
|
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:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
|
|
439
449
|
"data-testid": "comments-send",
|
|
440
450
|
disabled: !N.value.trim() || j.value.isSubmitting.value,
|
|
@@ -448,13 +458,13 @@ var fe = {
|
|
|
448
458
|
key: 1,
|
|
449
459
|
size: 16,
|
|
450
460
|
"stroke-width": 2
|
|
451
|
-
}))], 8,
|
|
452
|
-
])) : f("", !0)]),
|
|
461
|
+
}))], 8, xt)]))])) : f("", !0)
|
|
462
|
+
], 8, fe)) : f("", !0)]),
|
|
453
463
|
_: 1
|
|
454
464
|
}));
|
|
455
465
|
}
|
|
456
|
-
}), [["__scopeId", "data-v-
|
|
466
|
+
}), [["__scopeId", "data-v-32af5912"]]);
|
|
457
467
|
//#endregion
|
|
458
468
|
export { E as default };
|
|
459
469
|
|
|
460
|
-
//# sourceMappingURL=CommentsSidebar-
|
|
470
|
+
//# sourceMappingURL=CommentsSidebar-CybWfZ3V.js.map
|