@templatical/editor 0.0.6 → 0.1.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/LICENSE +56 -0
- package/README.md +69 -0
- package/dist/{AiChatSidebar-CNhSl_ty.js → AiChatSidebar-DgAjDWO1.js} +68 -68
- package/dist/{AiFeatureMenu-BFVsjUJY.js → AiFeatureMenu-j6oaiRVi.js} +25 -25
- package/dist/{CloudEditor-Bz5Xkxej.js → CloudEditor-yCOkIkZ-.js} +428 -437
- package/dist/{CollaboratorBar-D2Gu5Xj2.js → CollaboratorBar-CWVdp2Y6.js} +23 -23
- package/dist/CommentsSidebar-CSPHhbQH.js +439 -0
- package/dist/CountdownBlock-DK6P_RaQ.js +92 -0
- package/dist/CountdownToolbar-Dv-Sz4ui.js +210 -0
- package/dist/{DesignReferenceSidebar-u2tKSQK0.js → DesignReferenceSidebar-D7zfvux6.js} +58 -58
- package/dist/LoadingTrack-Cdz2SSq9.js +10 -0
- package/dist/ModuleBrowserModal-BLYuCZht.js +205 -0
- package/dist/ModulePreviewCanvas-CHYqP6K3.js +106 -0
- package/dist/NumberWithSuffix-D-5-AZc3.js +424 -0
- package/dist/{ParagraphEditor-CYrzYJO5.js → ParagraphEditor-DivLBNWv.js} +237 -236
- package/dist/{RichTextEditorContent-BeqlWlWB.js → RichTextEditorContent-G1lXgVJR.js} +42 -42
- package/dist/{SaveModuleDialog-Kde6X13X.js → SaveModuleDialog-DGVfiOmE.js} +29 -29
- package/dist/{SnapshotHistory-B3EfIcLW.js → SnapshotHistory-DM__MqSu.js} +38 -38
- package/dist/{TemplateScoringPanel-D2vCRGgx.js → TemplateScoringPanel-CW13Tlol.js} +80 -80
- package/dist/{TestEmailModal-Egk0DFDf.js → TestEmailModal-B8bYqWCY.js} +28 -28
- package/dist/TitleEditor-4Jrp3C4m.js +167 -0
- package/dist/{TplModal-BCruYWks.js → TplModal-BkoIz0oz.js} +14 -14
- package/dist/{_plugin-vue_export-helper-5TQrnOhO.js → _plugin-vue_export-helper-OO6pH1Dh.js} +11 -11
- package/dist/{blockTypeIcons-rW4BUUNC.js → blockTypeIcons-4AS3CvXn.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-Dcbshcfu.js → AiFeatureMenu-BcHyzTQy.js} +4 -4
- package/dist/cdn/chunks/{AiFeatureMenu-Dcbshcfu.js.map → AiFeatureMenu-BcHyzTQy.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-Bca3RyBW.js → CloudEditor-TaEZq-YW.js} +179 -188
- package/dist/cdn/chunks/CloudEditor-TaEZq-YW.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-sToKJfHi.js → CollaboratorBar-DbC5-3If.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-sToKJfHi.js.map → CollaboratorBar-DbC5-3If.js.map} +1 -1
- package/dist/cdn/chunks/CountdownBlock-CfPmCQ7j.js +93 -0
- package/dist/cdn/chunks/CountdownBlock-CfPmCQ7j.js.map +1 -0
- package/dist/cdn/chunks/CountdownToolbar-CB0EVxwN.js +212 -0
- package/dist/cdn/chunks/CountdownToolbar-CB0EVxwN.js.map +1 -0
- package/dist/cdn/chunks/{ModuleBrowserModal-BNhwXbWw.js → ModuleBrowserModal-Df2fp9dj.js} +7 -7
- package/dist/cdn/chunks/{ModuleBrowserModal-BNhwXbWw.js.map → ModuleBrowserModal-Df2fp9dj.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-DylUylPU.js → ModulePreviewCanvas-Dw1OCpvV.js} +19 -19
- package/dist/cdn/chunks/{ModulePreviewCanvas-DylUylPU.js.map → ModulePreviewCanvas-Dw1OCpvV.js.map} +1 -1
- package/dist/cdn/chunks/NumberWithSuffix-BU6ycXyG.js +425 -0
- package/dist/cdn/chunks/NumberWithSuffix-BU6ycXyG.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-BBw90y_p.js → ParagraphEditor-BMRNg_BX.js} +37 -37
- package/dist/cdn/chunks/{ParagraphEditor-BBw90y_p.js.map → ParagraphEditor-BMRNg_BX.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DvyIO3nR.js → RichTextEditorContent-BKYY1YMZ.js} +5 -5
- package/dist/cdn/chunks/{RichTextEditorContent-DvyIO3nR.js.map → RichTextEditorContent-BKYY1YMZ.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-DvbSHvhF.js → SaveModuleDialog-D977Tg7t.js} +5 -5
- package/dist/cdn/chunks/{SaveModuleDialog-DvbSHvhF.js.map → SaveModuleDialog-D977Tg7t.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-tS3mgoVr.js → TitleEditor-q9IzNy38.js} +11 -11
- package/dist/cdn/chunks/{TitleEditor-tS3mgoVr.js.map → TitleEditor-q9IzNy38.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-DbnbyEQE.js → blockTypeIcons-L0fRc3qs.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-DbnbyEQE.js.map → blockTypeIcons-L0fRc3qs.js.map} +1 -1
- package/dist/cdn/chunks/{de-CgUR_S5I.js → de-3exf7MYE.js} +1 -1
- package/dist/cdn/chunks/{de-CgUR_S5I.js.map → de-3exf7MYE.js.map} +1 -1
- package/dist/cdn/chunks/{de-D8oDPhBD.js → de-C8LxVUsb.js} +1 -1
- package/dist/cdn/chunks/{de-D8oDPhBD.js.map → de-C8LxVUsb.js.map} +1 -1
- package/dist/cdn/chunks/{dist-BUmN5e4r.js → dist-D5g00M8N.js} +6 -2
- package/dist/cdn/chunks/dist-D5g00M8N.js.map +1 -0
- package/dist/cdn/chunks/{draggable-m78lz0gI.js → draggable-Bcb86AsV.js} +5 -5
- package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +1 -0
- package/dist/cdn/chunks/{emojiData-CNNgvDqx.js → emojiData-DUHzsh4j.js} +1 -1
- package/dist/cdn/chunks/{emojiData-CNNgvDqx.js.map → emojiData-DUHzsh4j.js.map} +1 -1
- package/dist/cdn/chunks/{en-HseRPPeK.js → en-BoEycuqw.js} +1 -1
- package/dist/cdn/chunks/{en-HseRPPeK.js.map → en-BoEycuqw.js.map} +1 -1
- package/dist/cdn/chunks/{en-BBmfBDqY.js → en-KNPUKxYp.js} +1 -1
- package/dist/cdn/chunks/{en-BBmfBDqY.js.map → en-KNPUKxYp.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-ClpY3m0W.js → extensions-BZ1POyiv.js} +11 -11
- package/dist/cdn/chunks/{extensions-ClpY3m0W.js.map → extensions-BZ1POyiv.js.map} +1 -1
- package/dist/cdn/chunks/{features-B5dGxWLi.js → features-Ccqmm6-M.js} +549 -627
- package/dist/cdn/chunks/features-Ccqmm6-M.js.map +1 -0
- package/dist/cdn/chunks/{icons-hflTyPmb.js → icons-x53__2GC.js} +8 -8
- package/dist/cdn/chunks/icons-x53__2GC.js.map +1 -0
- package/dist/cdn/chunks/{liquid.browser-BxyRVCKv.js → liquid.browser-CEMn-ZqL.js} +2 -2
- package/dist/cdn/chunks/liquid.browser-CEMn-ZqL.js.map +1 -0
- package/dist/cdn/chunks/{media-library-Dgy-V-JA.js → media-library-DUoQk-w7.js} +97 -97
- package/dist/cdn/chunks/media-library-DUoQk-w7.js.map +1 -0
- package/dist/cdn/chunks/{pusher-D-m2WSdL.js → pusher-DwSQn6BA.js} +2 -2
- package/dist/cdn/chunks/pusher-DwSQn6BA.js.map +1 -0
- package/dist/cdn/chunks/{src-TDwMmqm0.js → src-DskCIAr8.js} +8 -8
- package/dist/cdn/chunks/{src-TDwMmqm0.js.map → src-DskCIAr8.js.map} +1 -1
- package/dist/cdn/chunks/{styleConstants-DFe3I4Op.js → styleConstants-DP1VOca8.js} +1 -1
- package/dist/cdn/chunks/{styleConstants-DFe3I4Op.js.map → styleConstants-DP1VOca8.js.map} +1 -1
- package/dist/cdn/chunks/{styles-hCOCOR6K.js → styles-BIlpNe52.js} +622 -1238
- package/dist/cdn/chunks/styles-BIlpNe52.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-C28NLMX8.js → tiptap-hPC_BgDO.js} +850 -826
- package/dist/cdn/chunks/tiptap-hPC_BgDO.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +92 -97
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-B5S-C0bz.js → check-Bff5NzCh.js} +1 -1
- package/dist/{chevron-down-CjsV1T0W.js → chevron-down-Bbv4SJwx.js} +1 -1
- package/dist/{circle-alert-CVTmJHKW.js → circle-alert-Dpr8MgkR.js} +1 -1
- package/dist/{clock-CAjdSHBy.js → clock-raVPKfl4.js} +1 -1
- package/dist/{dist-DJrDTuRr.js → dist-BHgEdO-M.js} +1001 -983
- package/dist/dist-BibwE8Y0.js +5 -0
- package/dist/{dist-DPM-DFvh.js → dist-BnlZ_HwX.js} +340 -340
- package/dist/{dist-BTtKPcd2.js → dist-C9yhcxsf.js} +2 -2
- package/dist/{dist-COguaIvm.js → dist-CGffNO8z.js} +2 -2
- package/dist/dist-CfGpCUSx.js +5 -0
- package/dist/{dist-COOFiBFV.js → dist-Chd-H2S3.js} +5 -5
- package/dist/{dist-DfqLGwSF.js → dist-Cq0OFLMj.js} +2 -2
- package/dist/{dist-B4LTlrAn.js → dist-D42og5Sc.js} +191 -185
- package/dist/{dist-CBr-qhie.js → dist-Owxo48fF.js} +2 -2
- package/dist/{dist-Crqkuf-w.js → dist-UZ8UzVZ-.js} +15 -15
- package/dist/dist-n0PkFNGl.js +314 -0
- package/dist/{dist-DHYuVJ_7.js → dist-skgH9dyo.js} +2 -2
- package/dist/{extensions-C6xp_B7K.js → extensions-DQKaICBH.js} +81 -81
- package/dist/{image-up-vZa1Txr-.js → image-up-B1AEiHCh.js} +1 -1
- package/dist/index.d.ts +17 -6
- package/dist/{keys-C0MQRs8d.js → keys-CIw9mUI2.js} +1 -1
- package/dist/{liquid.browser-C02owkex.js → liquid.browser-Bm53dnK1.js} +1 -1
- package/dist/{loader-circle-DilFjHSk.js → loader-circle-BYeKJ3to.js} +1 -1
- package/dist/{message-circle-Dpcnc2oa.js → message-circle-PhNlI7e7.js} +1 -1
- package/dist/{refresh-cw-4r7rkHHX.js → refresh-cw-DhDYRBDd.js} +1 -1
- package/dist/{rolldown-runtime-gEudmnaM.js → rolldown-runtime-BZGGJVDF.js} +2 -5
- package/dist/{scan-line-684IxPQ0.js → scan-line-Bw8bauvt.js} +1 -1
- package/dist/{send-ChDw64yL.js → send-CJPSzbLO.js} +1 -1
- package/dist/{shield-check-9dhLdyST.js → shield-check-DdEvVYMH.js} +1 -1
- package/dist/{sparkles-Co9fkDcv.js → sparkles-DT_27AYs.js} +1 -1
- package/dist/style.css +2 -0
- package/dist/{styleConstants-RV3eYwkD.js → styleConstants-Dqz9z3aa.js} +6 -45
- package/dist/styles-tcwlvlEB.js +2942 -0
- package/dist/templatical-editor.js +114 -119
- package/dist/text-align-start-4Hx15GUf.js +43 -0
- package/dist/{trash-2-CZkMtjeC.js → trash-2-BY-xp5hg.js} +1 -1
- package/dist/{triangle-alert-Dvt51agD.js → triangle-alert-DG72vdb2.js} +1 -1
- package/dist/useEditorCore-DMH2QpUL.js +8946 -0
- package/dist/{useI18n-D6m7ZUgY.js → useI18n-B8CN2iWs.js} +4 -4
- package/dist/{useMergeTag-CSXcnFBc.js → useMergeTag-Dz_Dx2Jz.js} +3 -3
- package/dist/vue.runtime.esm-bundler-DryoQb-v.js +5775 -0
- package/dist/{x-CU2XZOkQ.js → x-D-7GkO6Z.js} +1 -1
- package/package.json +31 -15
- package/dist/CommentsSidebar-CTeEAZTj.js +0 -439
- package/dist/LoadingTrack--aUassFH.js +0 -10
- package/dist/ModuleBrowserModal-DNxODPlX.js +0 -205
- package/dist/ModulePreviewCanvas-DnGe1Y-2.js +0 -106
- package/dist/TitleEditor-DwUpo4gF.js +0 -167
- package/dist/cdn/chunks/CloudEditor-Bca3RyBW.js.map +0 -1
- package/dist/cdn/chunks/dist-BUmN5e4r.js.map +0 -1
- package/dist/cdn/chunks/draggable-m78lz0gI.js.map +0 -1
- package/dist/cdn/chunks/features-B5dGxWLi.js.map +0 -1
- package/dist/cdn/chunks/icons-hflTyPmb.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-BxyRVCKv.js.map +0 -1
- package/dist/cdn/chunks/media-library-Dgy-V-JA.js.map +0 -1
- package/dist/cdn/chunks/pusher-D-m2WSdL.js.map +0 -1
- package/dist/cdn/chunks/styles-hCOCOR6K.js.map +0 -1
- package/dist/cdn/chunks/tiptap-C28NLMX8.js.map +0 -1
- package/dist/dist-Ac4o1O4a.js +0 -314
- package/dist/dist-DEJZ9iAU.js +0 -5
- package/dist/dist-DmVOCJjI.js +0 -5
- package/dist/styles-nvxFh6L6.js +0 -3557
- package/dist/templatical-editor.css +0 -2
- package/dist/templatical-editor.umd.cjs +0 -178
- package/dist/useEditorCore-ColJh1ST.js +0 -5695
- /package/dist/cdn/chunks/{_rolldown_dynamic_import_helper-DMEI4TQ3.js → _rolldown_dynamic_import_helper-BRcA6nWq.js} +0 -0
- /package/dist/{de-Dh8ON-dm.js → de-CN0xu_Tp.js} +0 -0
- /package/dist/{emojiData-Qc8mH_zW.js → emojiData-CwKEDxVf.js} +0 -0
- /package/dist/{en-C7IShRSD.js → en-DXvHkaUF.js} +0 -0
- /package/dist/{formatRelativeTime-D8f6NR7i.js → formatRelativeTime-BSpx5DHC.js} +0 -0
- /package/dist/{readableTextColor-B809bF5J.js → readableTextColor-CYCxm1jQ.js} +0 -0
- /package/dist/{timeouts-CmBrLeZA.js → timeouts-BSGxjuUF.js} +0 -0
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@templatical/editor",
|
|
3
3
|
"description": "Vue 3 visual drag-and-drop email editor powered by Templatical",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.1.1",
|
|
5
|
+
"bugs": "https://github.com/templatical/sdk/issues",
|
|
5
6
|
"dependencies": {
|
|
6
7
|
"@lucide/vue": "^1.11.0",
|
|
7
|
-
"@templatical/core": "workspace:*",
|
|
8
|
-
"@templatical/types": "workspace:*",
|
|
9
8
|
"@tiptap/core": "^3.22.4",
|
|
10
9
|
"@tiptap/extension-color": "^3.22.4",
|
|
11
10
|
"@tiptap/extension-font-family": "^3.22.4",
|
|
@@ -21,12 +20,15 @@
|
|
|
21
20
|
"@vueuse/core": "^14.2.1",
|
|
22
21
|
"liquidjs": "^10.25.7",
|
|
23
22
|
"vanilla-colorful": "^0.7.2",
|
|
24
|
-
"vuedraggable": "^4.1.0"
|
|
23
|
+
"vuedraggable": "^4.1.0",
|
|
24
|
+
"@templatical/core": "0.1.1",
|
|
25
|
+
"@templatical/types": "0.1.1"
|
|
25
26
|
},
|
|
26
27
|
"devDependencies": {
|
|
27
28
|
"@vitejs/plugin-vue": "^6.0.6",
|
|
28
29
|
"@vue/test-utils": "^2.4.8",
|
|
29
30
|
"happy-dom": "^20.9.0",
|
|
31
|
+
"tailwindcss": "^4.2.4",
|
|
30
32
|
"typescript": "^6.0.3",
|
|
31
33
|
"vite": "^8.0.10",
|
|
32
34
|
"vite-plugin-dts": "^4.5.4",
|
|
@@ -37,22 +39,31 @@
|
|
|
37
39
|
"exports": {
|
|
38
40
|
".": {
|
|
39
41
|
"types": "./dist/index.d.ts",
|
|
40
|
-
"import": "./dist/templatical-editor.js"
|
|
41
|
-
"require": "./dist/templatical-editor.umd.cjs"
|
|
42
|
+
"import": "./dist/templatical-editor.js"
|
|
42
43
|
},
|
|
43
44
|
"./style.css": "./dist/style.css"
|
|
44
45
|
},
|
|
45
46
|
"files": [
|
|
46
47
|
"dist"
|
|
47
48
|
],
|
|
49
|
+
"homepage": "https://templatical.com",
|
|
50
|
+
"keywords": [
|
|
51
|
+
"drag-and-drop",
|
|
52
|
+
"email",
|
|
53
|
+
"email-builder",
|
|
54
|
+
"email-editor",
|
|
55
|
+
"email-template",
|
|
56
|
+
"mjml",
|
|
57
|
+
"templatical",
|
|
58
|
+
"tiptap",
|
|
59
|
+
"vue",
|
|
60
|
+
"wysiwyg"
|
|
61
|
+
],
|
|
48
62
|
"license": "SEE LICENSE IN LICENSE",
|
|
49
|
-
"main": "./dist/templatical-editor.umd.cjs",
|
|
50
63
|
"module": "./dist/templatical-editor.js",
|
|
51
64
|
"peerDependencies": {
|
|
52
|
-
"@templatical/media-library": "
|
|
53
|
-
"@templatical/renderer": "
|
|
54
|
-
"tailwindcss": "^4.2.4",
|
|
55
|
-
"vue": "^3.5.0"
|
|
65
|
+
"@templatical/media-library": "0.1.1",
|
|
66
|
+
"@templatical/renderer": "0.1.1"
|
|
56
67
|
},
|
|
57
68
|
"peerDependenciesMeta": {
|
|
58
69
|
"@templatical/renderer": {
|
|
@@ -65,13 +76,18 @@
|
|
|
65
76
|
"publishConfig": {
|
|
66
77
|
"access": "public"
|
|
67
78
|
},
|
|
79
|
+
"repository": {
|
|
80
|
+
"type": "git",
|
|
81
|
+
"url": "git+https://github.com/templatical/sdk.git",
|
|
82
|
+
"directory": "packages/editor"
|
|
83
|
+
},
|
|
84
|
+
"type": "module",
|
|
85
|
+
"types": "./dist/index.d.ts",
|
|
68
86
|
"scripts": {
|
|
69
87
|
"build": "vite build",
|
|
70
88
|
"build:all": "vite build && vite build --config vite.cdn.config.ts",
|
|
71
89
|
"build:cdn": "vite build --config vite.cdn.config.ts",
|
|
72
90
|
"test": "vitest run",
|
|
73
91
|
"typecheck": "vue-tsc --noEmit"
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
"types": "./dist/index.d.ts"
|
|
77
|
-
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -1,439 +0,0 @@
|
|
|
1
|
-
import { T as e, c as t, f as n, r } from "./keys-C0MQRs8d.js";
|
|
2
|
-
import { t as ee } from "./useI18n-D6m7ZUgY.js";
|
|
3
|
-
import { n as i, t as te } from "./_plugin-vue_export-helper-5TQrnOhO.js";
|
|
4
|
-
import { t as ne } from "./check-B5S-C0bz.js";
|
|
5
|
-
import { t as re } from "./chevron-down-CjsV1T0W.js";
|
|
6
|
-
import { t as a } from "./loader-circle-DilFjHSk.js";
|
|
7
|
-
import { t as o } from "./message-circle-Dpcnc2oa.js";
|
|
8
|
-
import { t as s } from "./send-ChDw64yL.js";
|
|
9
|
-
import { t as c } from "./trash-2-CZkMtjeC.js";
|
|
10
|
-
import { t as l } from "./x-CU2XZOkQ.js";
|
|
11
|
-
import { t as ie } from "./formatRelativeTime-D8f6NR7i.js";
|
|
12
|
-
import { Fragment as u, Transition as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createTextVNode as ae, createVNode as _, defineComponent as v, nextTick as oe, normalizeClass as y, normalizeStyle as se, openBlock as b, ref as x, renderList as S, toDisplayString as C, unref as w, vModelText as T, watch as ce, withCtx as E, withDirectives as D } from "vue";
|
|
13
|
-
var le = i("chevron-up", [["path", {
|
|
14
|
-
d: "m18 15-6-6-6 6",
|
|
15
|
-
key: "153udz"
|
|
16
|
-
}]]), ue = i("circle-check", [["circle", {
|
|
17
|
-
cx: "12",
|
|
18
|
-
cy: "12",
|
|
19
|
-
r: "10",
|
|
20
|
-
key: "1mglay"
|
|
21
|
-
}], ["path", {
|
|
22
|
-
d: "m9 12 2 2 4-4",
|
|
23
|
-
key: "dzmm74"
|
|
24
|
-
}]]), O = i("pencil", [["path", {
|
|
25
|
-
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",
|
|
26
|
-
key: "1a8usu"
|
|
27
|
-
}], ["path", {
|
|
28
|
-
d: "m15 5 4 4",
|
|
29
|
-
key: "1mk7zo"
|
|
30
|
-
}]]), de = i("reply", [["path", {
|
|
31
|
-
d: "M20 18v-2a4 4 0 0 0-4-4H4",
|
|
32
|
-
key: "5vmcpk"
|
|
33
|
-
}], ["path", {
|
|
34
|
-
d: "m9 17-5-5 5-5",
|
|
35
|
-
key: "nvlc11"
|
|
36
|
-
}]]), fe = {
|
|
37
|
-
key: 0,
|
|
38
|
-
class: "tpl-comments-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
39
|
-
}, 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 = {
|
|
40
|
-
key: 0,
|
|
41
|
-
class: "tpl:ml-1 tpl:inline-flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[10px] tpl:font-semibold tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]"
|
|
42
|
-
}, ge = { class: "tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2" }, _e = { class: "tpl:flex-1 tpl:overflow-y-auto" }, ve = {
|
|
43
|
-
key: 0,
|
|
44
|
-
class: "tpl:flex tpl:h-full tpl:items-center tpl:justify-center"
|
|
45
|
-
}, ye = {
|
|
46
|
-
key: 1,
|
|
47
|
-
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:px-6 tpl:text-center"
|
|
48
|
-
}, be = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, xe = {
|
|
49
|
-
key: 2,
|
|
50
|
-
class: "tpl:flex tpl:flex-col tpl:gap-3 tpl:p-3"
|
|
51
|
-
}, Se = { class: "tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3" }, Ce = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, we = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, Te = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ee = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, De = {
|
|
52
|
-
key: 0,
|
|
53
|
-
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
54
|
-
}, Oe = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, ke = ["title", "onClick"], Ae = ["title", "onClick"], je = ["title", "onClick"], Me = {
|
|
55
|
-
key: 0,
|
|
56
|
-
class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-primary)]"
|
|
57
|
-
}, Ne = {
|
|
58
|
-
key: 0,
|
|
59
|
-
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)]"
|
|
60
|
-
}, Pe = ["onClick"], Fe = {
|
|
61
|
-
key: 2,
|
|
62
|
-
class: "tpl:mt-2"
|
|
63
|
-
}, Ie = ["onKeydown"], Le = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, Re = ["disabled", "onClick"], ze = {
|
|
64
|
-
key: 3,
|
|
65
|
-
class: "tpl:mt-1.5 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
66
|
-
}, Be = {
|
|
67
|
-
key: 4,
|
|
68
|
-
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)]"
|
|
69
|
-
}, Ve = { class: "tpl:flex-1" }, He = ["onClick"], Ue = {
|
|
70
|
-
key: 5,
|
|
71
|
-
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2"
|
|
72
|
-
}, We = ["title", "onClick"], Ge = ["onClick"], Ke = {
|
|
73
|
-
key: 0,
|
|
74
|
-
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
75
|
-
}, qe = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Je = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, Ye = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Xe = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Ze = {
|
|
76
|
-
key: 0,
|
|
77
|
-
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
78
|
-
}, Qe = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, $e = ["title", "onClick"], et = ["title", "onClick"], tt = {
|
|
79
|
-
key: 0,
|
|
80
|
-
class: "tpl:mt-1.5"
|
|
81
|
-
}, nt = ["onKeydown"], rt = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, it = ["disabled", "onClick"], at = {
|
|
82
|
-
key: 1,
|
|
83
|
-
class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
84
|
-
}, ot = {
|
|
85
|
-
key: 2,
|
|
86
|
-
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)]"
|
|
87
|
-
}, st = { class: "tpl:flex-1" }, ct = ["onClick"], lt = {
|
|
88
|
-
key: 0,
|
|
89
|
-
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
90
|
-
}, ut = { class: "tpl:flex tpl:items-end tpl:gap-2" }, dt = ["placeholder", "onKeydown"], ft = { class: "tpl:flex tpl:shrink-0 tpl:flex-col tpl:gap-1" }, pt = ["disabled", "onClick"], mt = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, ht = {
|
|
91
|
-
key: 0,
|
|
92
|
-
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)]"
|
|
93
|
-
}, gt = {
|
|
94
|
-
key: 1,
|
|
95
|
-
class: "tpl-comments-input-wrapper tpl:flex tpl:min-h-[68px] tpl:items-end tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]"
|
|
96
|
-
}, _t = ["placeholder", "disabled"], vt = ["disabled"], k = /* @__PURE__ */ te(/* @__PURE__ */ v({
|
|
97
|
-
__name: "CommentsSidebar",
|
|
98
|
-
props: { visible: { type: Boolean } },
|
|
99
|
-
emits: ["close", "filterBlock"],
|
|
100
|
-
setup(i, { expose: te, emit: v }) {
|
|
101
|
-
let k = i, A = v, { t: j, format: M } = ee(), N = e(n, "CommentsSidebar"), yt = e(r, "CommentsSidebar"), P = e(t, "CommentsSidebar"), F = x("unresolved"), I = x(null), L = x(""), R = x(null), z = x(""), B = x(null), V = x(""), H = x(/* @__PURE__ */ new Set()), U = x(null), W = x(null), bt = f(() => yt.userConfig?.id ?? null), xt = f(() => {
|
|
102
|
-
let e = /* @__PURE__ */ new Set();
|
|
103
|
-
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);
|
|
104
|
-
return e;
|
|
105
|
-
});
|
|
106
|
-
function St(e) {
|
|
107
|
-
return e ? !xt.value.has(e) : !1;
|
|
108
|
-
}
|
|
109
|
-
let Ct = f(() => F.value !== "block" || !I.value ? !1 : !(N.savedBlockIds?.value.has(I.value) ?? !0)), G = f(() => {
|
|
110
|
-
let e = P.comments.value;
|
|
111
|
-
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;
|
|
112
|
-
});
|
|
113
|
-
ce(() => k.visible, (e) => {
|
|
114
|
-
e && P.loadComments();
|
|
115
|
-
}), ce(() => N.state.selectedBlockId, (e) => {
|
|
116
|
-
F.value === "block" && e && (I.value = e);
|
|
117
|
-
});
|
|
118
|
-
function K(e, t) {
|
|
119
|
-
F.value = e, I.value = e === "block" ? t ?? null : null;
|
|
120
|
-
}
|
|
121
|
-
function wt(e) {
|
|
122
|
-
K("block", e), A("filterBlock", e);
|
|
123
|
-
}
|
|
124
|
-
function Tt(e) {
|
|
125
|
-
H.value.has(e) ? H.value.delete(e) : H.value.add(e);
|
|
126
|
-
}
|
|
127
|
-
function Et(e) {
|
|
128
|
-
R.value = e, z.value = "", B.value = null, H.value.has(e) || H.value.add(e);
|
|
129
|
-
}
|
|
130
|
-
function Dt() {
|
|
131
|
-
R.value = null, z.value = "";
|
|
132
|
-
}
|
|
133
|
-
function q(e) {
|
|
134
|
-
B.value = e.id, V.value = e.body, R.value = null;
|
|
135
|
-
}
|
|
136
|
-
function J() {
|
|
137
|
-
B.value = null, V.value = "";
|
|
138
|
-
}
|
|
139
|
-
function Y(e) {
|
|
140
|
-
U.value = e;
|
|
141
|
-
}
|
|
142
|
-
function X() {
|
|
143
|
-
U.value = null;
|
|
144
|
-
}
|
|
145
|
-
async function Z() {
|
|
146
|
-
let e = L.value.trim();
|
|
147
|
-
if (!e) return;
|
|
148
|
-
let t = F.value === "block" ? I.value : void 0;
|
|
149
|
-
await P.addComment(e, t ?? void 0), L.value = "";
|
|
150
|
-
}
|
|
151
|
-
async function Ot(e) {
|
|
152
|
-
let t = z.value.trim();
|
|
153
|
-
if (!t) return;
|
|
154
|
-
let n = P.comments.value.find((t) => t.id === e);
|
|
155
|
-
await P.addComment(t, n?.block_id ?? void 0, e), R.value = null, z.value = "";
|
|
156
|
-
}
|
|
157
|
-
async function Q(e) {
|
|
158
|
-
let t = V.value.trim();
|
|
159
|
-
t && (await P.editComment(e, t), B.value = null, V.value = "");
|
|
160
|
-
}
|
|
161
|
-
async function kt(e) {
|
|
162
|
-
await P.removeComment(e), U.value = null;
|
|
163
|
-
}
|
|
164
|
-
async function At(e) {
|
|
165
|
-
await P.toggleResolve(e);
|
|
166
|
-
}
|
|
167
|
-
function $(e) {
|
|
168
|
-
return e.author_identifier === bt.value;
|
|
169
|
-
}
|
|
170
|
-
function jt(e) {
|
|
171
|
-
return ie(e, j.snapshotHistory) ?? e;
|
|
172
|
-
}
|
|
173
|
-
function Mt(e) {
|
|
174
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Z());
|
|
175
|
-
}
|
|
176
|
-
function Nt(e, t) {
|
|
177
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Ot(t));
|
|
178
|
-
}
|
|
179
|
-
function Pt(e, t) {
|
|
180
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Q(t)), e.key === "Escape" && J();
|
|
181
|
-
}
|
|
182
|
-
function Ft() {
|
|
183
|
-
oe(() => {
|
|
184
|
-
W.value?.focus();
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
return te({
|
|
188
|
-
filterByBlock: wt,
|
|
189
|
-
focusNewComment: Ft
|
|
190
|
-
}), (e, t) => (b(), p(d, {
|
|
191
|
-
"enter-active-class": "tpl-comments-slide-enter-active",
|
|
192
|
-
"enter-from-class": "tpl:translate-x-full",
|
|
193
|
-
"enter-to-class": "tpl:translate-x-0",
|
|
194
|
-
"leave-active-class": "tpl-comments-slide-leave-active",
|
|
195
|
-
"leave-from-class": "tpl:translate-x-0",
|
|
196
|
-
"leave-to-class": "tpl:translate-x-full"
|
|
197
|
-
}, {
|
|
198
|
-
default: E(() => [i.visible ? (b(), h("div", fe, [
|
|
199
|
-
g("div", pe, [g("div", me, [
|
|
200
|
-
_(w(o), {
|
|
201
|
-
size: 13,
|
|
202
|
-
"stroke-width": 2
|
|
203
|
-
}),
|
|
204
|
-
g("span", null, C(w(j).comments.title), 1),
|
|
205
|
-
w(P).unresolvedCount.value > 0 ? (b(), h("span", he, C(w(P).unresolvedCount.value), 1)) : m("", !0)
|
|
206
|
-
]), g("button", {
|
|
207
|
-
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
208
|
-
onClick: t[0] ||= (e) => A("close")
|
|
209
|
-
}, [_(w(l), {
|
|
210
|
-
size: 14,
|
|
211
|
-
"stroke-width": 2
|
|
212
|
-
})])]),
|
|
213
|
-
g("div", ge, [
|
|
214
|
-
g("button", {
|
|
215
|
-
class: y(["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" : ""]),
|
|
216
|
-
onClick: t[1] ||= (e) => K("unresolved")
|
|
217
|
-
}, C(w(j).comments.filterUnresolved), 3),
|
|
218
|
-
g("button", {
|
|
219
|
-
class: y(["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" : ""]),
|
|
220
|
-
onClick: t[2] ||= (e) => K("all")
|
|
221
|
-
}, C(w(j).comments.filterAll), 3),
|
|
222
|
-
w(N).state.selectedBlockId ? (b(), h("button", {
|
|
223
|
-
key: 0,
|
|
224
|
-
class: y(["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" : ""]),
|
|
225
|
-
onClick: t[3] ||= (e) => K("block", w(N).state.selectedBlockId ?? void 0)
|
|
226
|
-
}, C(w(j).comments.filterBlock), 3)) : m("", !0)
|
|
227
|
-
]),
|
|
228
|
-
g("div", _e, [w(P).isLoading.value ? (b(), h("div", ve, [_(w(a), {
|
|
229
|
-
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
230
|
-
size: 24,
|
|
231
|
-
"stroke-width": 2
|
|
232
|
-
})])) : G.value.length === 0 ? (b(), h("div", ye, [_(w(o), {
|
|
233
|
-
size: 32,
|
|
234
|
-
"stroke-width": 1.5,
|
|
235
|
-
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
236
|
-
}), g("p", be, C(F.value === "all" ? w(j).comments.noCommentsHint : w(j).comments.noComments), 1)])) : (b(), h("div", xe, [(b(!0), h(u, null, S(G.value, (e) => (b(), h("div", {
|
|
237
|
-
key: e.id,
|
|
238
|
-
class: "tpl-comment-thread"
|
|
239
|
-
}, [
|
|
240
|
-
g("div", Se, [
|
|
241
|
-
g("div", Ce, [g("div", we, [
|
|
242
|
-
g("span", Te, C($(e) ? w(j).comments.ownedByYou : e.author_name), 1),
|
|
243
|
-
g("span", Ee, C(jt(e.created_at)), 1),
|
|
244
|
-
e.updated_at === e.created_at ? m("", !0) : (b(), h("span", De, " (" + C(w(j).comments.edited) + ") ", 1))
|
|
245
|
-
]), g("div", Oe, [
|
|
246
|
-
g("button", {
|
|
247
|
-
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
248
|
-
title: e.resolved_at ? w(j).comments.unresolve : w(j).comments.resolve,
|
|
249
|
-
onClick: (t) => At(e.id)
|
|
250
|
-
}, [_(w(ue), {
|
|
251
|
-
size: 13,
|
|
252
|
-
"stroke-width": 2,
|
|
253
|
-
class: "tpl-resolve-icon",
|
|
254
|
-
style: se({ color: e.resolved_at ? "var(--tpl-primary)" : void 0 })
|
|
255
|
-
}, null, 8, ["style"])], 8, ke),
|
|
256
|
-
$(e) ? (b(), h("button", {
|
|
257
|
-
key: 0,
|
|
258
|
-
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
259
|
-
title: w(j).comments.edit,
|
|
260
|
-
onClick: (t) => q(e)
|
|
261
|
-
}, [_(w(O), {
|
|
262
|
-
size: 12,
|
|
263
|
-
"stroke-width": 2
|
|
264
|
-
})], 8, Ae)) : m("", !0),
|
|
265
|
-
$(e) ? (b(), h("button", {
|
|
266
|
-
key: 1,
|
|
267
|
-
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
268
|
-
title: w(j).comments.delete,
|
|
269
|
-
onClick: (t) => Y(e.id)
|
|
270
|
-
}, [_(w(c), {
|
|
271
|
-
size: 12,
|
|
272
|
-
"stroke-width": 2
|
|
273
|
-
})], 8, je)) : m("", !0)
|
|
274
|
-
])]),
|
|
275
|
-
_(d, { name: "tpl-resolve" }, {
|
|
276
|
-
default: E(() => [e.resolved_at ? (b(), h("div", Me, [_(w(ne), {
|
|
277
|
-
size: 10,
|
|
278
|
-
"stroke-width": 2.5
|
|
279
|
-
}), g("span", null, C(w(M)(w(j).comments.resolvedBy, { name: e.resolved_by_name ?? "" })), 1)])) : m("", !0)]),
|
|
280
|
-
_: 2
|
|
281
|
-
}, 1024),
|
|
282
|
-
e.block_id && St(e.block_id) ? (b(), h("span", Ne, C(w(j).comments.missingBlock), 1)) : e.block_id ? (b(), h("button", {
|
|
283
|
-
key: 1,
|
|
284
|
-
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)]",
|
|
285
|
-
onClick: (t) => w(N).selectBlock(e.block_id ?? "")
|
|
286
|
-
}, " Block ", 8, Pe)) : m("", !0),
|
|
287
|
-
B.value === e.id ? (b(), h("div", Fe, [D(g("textarea", {
|
|
288
|
-
"onUpdate:modelValue": t[4] ||= (e) => V.value = e,
|
|
289
|
-
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)]",
|
|
290
|
-
rows: "3",
|
|
291
|
-
onKeydown: (t) => Pt(t, e.id)
|
|
292
|
-
}, null, 40, Ie), [[T, V.value]]), g("div", Le, [g("button", {
|
|
293
|
-
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)]",
|
|
294
|
-
disabled: !V.value.trim() || w(P).isSubmitting.value,
|
|
295
|
-
onClick: (t) => Q(e.id)
|
|
296
|
-
}, C(w(j).comments.save), 9, Re), g("button", {
|
|
297
|
-
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)]",
|
|
298
|
-
onClick: t[5] ||= (e) => J()
|
|
299
|
-
}, C(w(j).comments.cancel), 1)])])) : (b(), h("p", ze, C(e.body), 1)),
|
|
300
|
-
U.value === e.id ? (b(), h("div", Be, [
|
|
301
|
-
g("span", Ve, C(w(j).comments.deleteConfirm), 1),
|
|
302
|
-
g("button", {
|
|
303
|
-
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)]",
|
|
304
|
-
onClick: (t) => kt(e.id)
|
|
305
|
-
}, C(w(j).comments.delete), 9, He),
|
|
306
|
-
g("button", {
|
|
307
|
-
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
308
|
-
onClick: t[6] ||= (e) => X()
|
|
309
|
-
}, C(w(j).comments.cancel), 1)
|
|
310
|
-
])) : m("", !0),
|
|
311
|
-
B.value !== e.id && U.value !== e.id ? (b(), h("div", Ue, [g("button", {
|
|
312
|
-
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
313
|
-
title: w(j).comments.reply,
|
|
314
|
-
onClick: (t) => Et(e.id)
|
|
315
|
-
}, [_(w(de), {
|
|
316
|
-
size: 13,
|
|
317
|
-
"stroke-width": 2,
|
|
318
|
-
class: "tpl:text-[var(--tpl-primary)]"
|
|
319
|
-
})], 8, We), (e.replies?.length ?? 0) > 0 ? (b(), h("button", {
|
|
320
|
-
key: 0,
|
|
321
|
-
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)]",
|
|
322
|
-
onClick: (t) => Tt(e.id)
|
|
323
|
-
}, [H.value.has(e.id) ? (b(), p(w(le), {
|
|
324
|
-
key: 0,
|
|
325
|
-
size: 11,
|
|
326
|
-
"stroke-width": 2
|
|
327
|
-
})) : (b(), p(w(re), {
|
|
328
|
-
key: 1,
|
|
329
|
-
size: 11,
|
|
330
|
-
"stroke-width": 2
|
|
331
|
-
})), ae(" " + C((e.replies?.length ?? 0) === 1 ? w(M)(w(j).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : w(M)(w(j).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8, Ge)) : m("", !0)])) : m("", !0)
|
|
332
|
-
]),
|
|
333
|
-
_(d, { name: "tpl-replies" }, {
|
|
334
|
-
default: E(() => [H.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (b(), h("div", Ke, [(b(!0), h(u, null, S(e.replies, (n, r) => (b(), h("div", {
|
|
335
|
-
key: n.id,
|
|
336
|
-
class: y(["tpl-comment-reply-card tpl:relative tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-2.5", r < (e.replies?.length ?? 0) - 1 ? "tpl:mb-2" : ""])
|
|
337
|
-
}, [
|
|
338
|
-
g("div", qe, [g("div", Je, [
|
|
339
|
-
g("span", Ye, C($(n) ? w(j).comments.ownedByYou : n.author_name), 1),
|
|
340
|
-
g("span", Xe, C(jt(n.created_at)), 1),
|
|
341
|
-
n.updated_at === n.created_at ? m("", !0) : (b(), h("span", Ze, " (" + C(w(j).comments.edited) + ") ", 1))
|
|
342
|
-
]), g("div", Qe, [$(n) ? (b(), h("button", {
|
|
343
|
-
key: 0,
|
|
344
|
-
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
345
|
-
title: w(j).comments.edit,
|
|
346
|
-
onClick: (e) => q(n)
|
|
347
|
-
}, [_(w(O), {
|
|
348
|
-
size: 11,
|
|
349
|
-
"stroke-width": 2
|
|
350
|
-
})], 8, $e)) : m("", !0), $(n) ? (b(), h("button", {
|
|
351
|
-
key: 1,
|
|
352
|
-
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
353
|
-
title: w(j).comments.delete,
|
|
354
|
-
onClick: (e) => Y(n.id)
|
|
355
|
-
}, [_(w(c), {
|
|
356
|
-
size: 11,
|
|
357
|
-
"stroke-width": 2
|
|
358
|
-
})], 8, et)) : m("", !0)])]),
|
|
359
|
-
B.value === n.id ? (b(), h("div", tt, [D(g("textarea", {
|
|
360
|
-
"onUpdate:modelValue": t[7] ||= (e) => V.value = e,
|
|
361
|
-
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)]",
|
|
362
|
-
rows: "2",
|
|
363
|
-
onKeydown: (e) => Pt(e, n.id)
|
|
364
|
-
}, null, 40, nt), [[T, V.value]]), g("div", rt, [g("button", {
|
|
365
|
-
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)]",
|
|
366
|
-
disabled: !V.value.trim() || w(P).isSubmitting.value,
|
|
367
|
-
onClick: (e) => Q(n.id)
|
|
368
|
-
}, C(w(j).comments.save), 9, it), g("button", {
|
|
369
|
-
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
370
|
-
onClick: t[8] ||= (e) => J()
|
|
371
|
-
}, C(w(j).comments.cancel), 1)])])) : (b(), h("p", at, C(n.body), 1)),
|
|
372
|
-
U.value === n.id ? (b(), h("div", ot, [
|
|
373
|
-
g("span", st, C(w(j).comments.deleteConfirm), 1),
|
|
374
|
-
g("button", {
|
|
375
|
-
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)]",
|
|
376
|
-
onClick: (e) => kt(n.id)
|
|
377
|
-
}, C(w(j).comments.delete), 9, ct),
|
|
378
|
-
g("button", {
|
|
379
|
-
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
380
|
-
onClick: t[9] ||= (e) => X()
|
|
381
|
-
}, C(w(j).comments.cancel), 1)
|
|
382
|
-
])) : m("", !0)
|
|
383
|
-
], 2))), 128))])) : m("", !0)]),
|
|
384
|
-
_: 2
|
|
385
|
-
}, 1024),
|
|
386
|
-
_(d, { name: "tpl-replies" }, {
|
|
387
|
-
default: E(() => [R.value === e.id ? (b(), h("div", lt, [g("div", ut, [D(g("textarea", {
|
|
388
|
-
"onUpdate:modelValue": t[10] ||= (e) => z.value = e,
|
|
389
|
-
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)]",
|
|
390
|
-
placeholder: w(j).comments.replyPlaceholder,
|
|
391
|
-
rows: "2",
|
|
392
|
-
onKeydown: (t) => Nt(t, e.id)
|
|
393
|
-
}, null, 40, dt), [[T, z.value]]), g("div", ft, [g("button", {
|
|
394
|
-
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)]",
|
|
395
|
-
disabled: !z.value.trim() || w(P).isSubmitting.value,
|
|
396
|
-
onClick: (t) => Ot(e.id)
|
|
397
|
-
}, [_(w(s), {
|
|
398
|
-
size: 14,
|
|
399
|
-
"stroke-width": 2
|
|
400
|
-
})], 8, pt), g("button", {
|
|
401
|
-
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)]",
|
|
402
|
-
onClick: t[11] ||= (e) => Dt()
|
|
403
|
-
}, [_(w(l), {
|
|
404
|
-
size: 14,
|
|
405
|
-
"stroke-width": 2
|
|
406
|
-
})])])])])) : m("", !0)]),
|
|
407
|
-
_: 2
|
|
408
|
-
}, 1024)
|
|
409
|
-
]))), 128))]))]),
|
|
410
|
-
g("div", mt, [Ct.value ? (b(), h("div", ht, C(w(j).comments.saveTemplateFirst), 1)) : (b(), h("div", gt, [D(g("textarea", {
|
|
411
|
-
ref_key: "newCommentInput",
|
|
412
|
-
ref: W,
|
|
413
|
-
"onUpdate:modelValue": t[12] ||= (e) => L.value = e,
|
|
414
|
-
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)]",
|
|
415
|
-
placeholder: w(j).comments.placeholder,
|
|
416
|
-
disabled: w(P).isSubmitting.value,
|
|
417
|
-
rows: "2",
|
|
418
|
-
onKeydown: Mt
|
|
419
|
-
}, null, 40, _t), [[T, L.value]]), g("button", {
|
|
420
|
-
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)]",
|
|
421
|
-
disabled: !L.value.trim() || w(P).isSubmitting.value,
|
|
422
|
-
onClick: Z
|
|
423
|
-
}, [w(P).isSubmitting.value ? (b(), p(w(a), {
|
|
424
|
-
key: 0,
|
|
425
|
-
class: "tpl-spinner",
|
|
426
|
-
size: 16,
|
|
427
|
-
"stroke-width": 2
|
|
428
|
-
})) : (b(), p(w(s), {
|
|
429
|
-
key: 1,
|
|
430
|
-
size: 16,
|
|
431
|
-
"stroke-width": 2
|
|
432
|
-
}))], 8, vt)]))])
|
|
433
|
-
])) : m("", !0)]),
|
|
434
|
-
_: 1
|
|
435
|
-
}));
|
|
436
|
-
}
|
|
437
|
-
}), [["__scopeId", "data-v-5e7fbab3"]]);
|
|
438
|
-
//#endregion
|
|
439
|
-
export { k as default };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./_plugin-vue_export-helper-5TQrnOhO.js";
|
|
2
|
-
import { createElementBlock as t, openBlock as n } from "vue";
|
|
3
|
-
//#region src/components/LoadingTrack.vue
|
|
4
|
-
var r = {}, i = { class: "tpl-loading-track" };
|
|
5
|
-
function a(e, r) {
|
|
6
|
-
return n(), t("div", i);
|
|
7
|
-
}
|
|
8
|
-
var o = /* @__PURE__ */ e(r, [["render", a], ["__scopeId", "data-v-1ed538ec"]]);
|
|
9
|
-
//#endregion
|
|
10
|
-
export { o as t };
|