@templatical/editor 0.14.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/dist/{AiChatSidebar-J8iO_sX7.js → AiChatSidebar-BIKvYREk.js} +57 -56
  2. package/dist/{AiFeatureMenu-F2diEDgV.js → AiFeatureMenu-QbD82crt.js} +20 -20
  3. package/dist/{BlockIssueBadge-a-qlByxF.js → BlockIssueBadge-B3xVgMTh.js} +11 -11
  4. package/dist/{CloudEditor-CDjtwb4i.js → CloudEditor-DptuSf7A.js} +470 -468
  5. package/dist/{CollaboratorBar-B_EnJLtW.js → CollaboratorBar-DrA_K69w.js} +20 -20
  6. package/dist/{CommentsSidebar-DaP9BA_r.js → CommentsSidebar-D_tSGvTX.js} +154 -153
  7. package/dist/CountdownBlock-apiYUhkQ.js +92 -0
  8. package/dist/CountdownToolbar-CS0axcjz.js +210 -0
  9. package/dist/{DesignReferenceSidebar-BHRlTqlT.js → DesignReferenceSidebar-DWYK9nTk.js} +58 -57
  10. package/dist/{IssuesPanel-u7ee3Wrl.js → IssuesPanel-CR1MPaDE.js} +40 -40
  11. package/dist/{LoadingTrack-CV3ID80N.js → LoadingTrack-DsecR8Rw.js} +1 -1
  12. package/dist/MergeTagSuggestion-CH2SUxBo.js +1327 -0
  13. package/dist/{ModuleBrowserModal-DOsdaS6s.js → ModuleBrowserModal-D45rBj5C.js} +60 -59
  14. package/dist/{ModulePreviewCanvas-Cx4MOJ0X.js → ModulePreviewCanvas-BiQ6B2-l.js} +29 -29
  15. package/dist/{NumberWithSuffix-D2mW_DhT.js → NumberWithSuffix-CrA6quxx.js} +143 -142
  16. package/dist/{ParagraphEditor-DMzkVnST.js → ParagraphEditor-1NaUJpZO.js} +247 -246
  17. package/dist/{RichTextEditorContent-CRCxCwKf.js → RichTextEditorContent-BqLHIZY7.js} +45 -44
  18. package/dist/{SaveModuleDialog-DuEKgumL.js → SaveModuleDialog-B0sPOTgO.js} +38 -37
  19. package/dist/{SnapshotHistory-CVgiNJtE.js → SnapshotHistory-DslVzmSb.js} +34 -33
  20. package/dist/{TemplateScoringPanel-lm0_9nYi.js → TemplateScoringPanel-CZ62rGHz.js} +83 -82
  21. package/dist/{TestEmailModal-WBMdiW5S.js → TestEmailModal-DWGniJVu.js} +22 -21
  22. package/dist/{TitleEditor-eyT0h-Sa.js → TitleEditor-D4t_gZZJ.js} +44 -44
  23. package/dist/{TplModal-tjQ7OB0g.js → TplModal-Br2VG6cn.js} +14 -13
  24. package/dist/{blockTypeIcons-DdB3uTKD.js → blockTypeIcons-CXhCS5WV.js} +2 -2
  25. package/dist/bundle-stats.json +8 -8
  26. package/dist/cdn/chunks/{AiFeatureMenu-D7rB2SBs.js → AiFeatureMenu-3Slo_LGA.js} +5 -5
  27. package/dist/cdn/chunks/{AiFeatureMenu-D7rB2SBs.js.map → AiFeatureMenu-3Slo_LGA.js.map} +1 -1
  28. package/dist/cdn/chunks/{BlockIssueBadge-DHOe0pgx.js → BlockIssueBadge-BxwEiiF3.js} +3 -3
  29. package/dist/cdn/chunks/{BlockIssueBadge-DHOe0pgx.js.map → BlockIssueBadge-BxwEiiF3.js.map} +1 -1
  30. package/dist/cdn/chunks/{CloudEditor-DNed_Ym0.js → CloudEditor-DFIFWD9G.js} +89 -89
  31. package/dist/cdn/chunks/{CloudEditor-DNed_Ym0.js.map → CloudEditor-DFIFWD9G.js.map} +1 -1
  32. package/dist/cdn/chunks/{CollaboratorBar-sj_9Lee3.js → CollaboratorBar-Cu3vuN66.js} +4 -4
  33. package/dist/cdn/chunks/{CollaboratorBar-sj_9Lee3.js.map → CollaboratorBar-Cu3vuN66.js.map} +1 -1
  34. package/dist/cdn/chunks/{CountdownBlock-C1Ikjpn4.js → CountdownBlock-BEVAJQtQ.js} +3 -3
  35. package/dist/cdn/chunks/{CountdownBlock-C1Ikjpn4.js.map → CountdownBlock-BEVAJQtQ.js.map} +1 -1
  36. package/dist/cdn/chunks/{CountdownToolbar-j1G_X8rB.js → CountdownToolbar-CI2sQZv5.js} +4 -4
  37. package/dist/cdn/chunks/{CountdownToolbar-j1G_X8rB.js.map → CountdownToolbar-CI2sQZv5.js.map} +1 -1
  38. package/dist/cdn/chunks/{IssuesPanel-CTOf3PsH.js → IssuesPanel-BdeDoTcn.js} +4 -4
  39. package/dist/cdn/chunks/{IssuesPanel-CTOf3PsH.js.map → IssuesPanel-BdeDoTcn.js.map} +1 -1
  40. package/dist/cdn/chunks/MergeTagSuggestion-BsCAo4Co.js +213 -0
  41. package/dist/cdn/chunks/MergeTagSuggestion-BsCAo4Co.js.map +1 -0
  42. package/dist/cdn/chunks/{ModuleBrowserModal-DCh88-rr.js → ModuleBrowserModal-Dz-I5zfj.js} +6 -6
  43. package/dist/cdn/chunks/{ModuleBrowserModal-DCh88-rr.js.map → ModuleBrowserModal-Dz-I5zfj.js.map} +1 -1
  44. package/dist/cdn/chunks/{ModulePreviewCanvas-DJqvTKmg.js → ModulePreviewCanvas-BfinyuAN.js} +3 -3
  45. package/dist/cdn/chunks/{ModulePreviewCanvas-DJqvTKmg.js.map → ModulePreviewCanvas-BfinyuAN.js.map} +1 -1
  46. package/dist/cdn/chunks/{NumberWithSuffix-Bu45XWSl.js → NumberWithSuffix-CDjEa08X.js} +6 -6
  47. package/dist/cdn/chunks/{NumberWithSuffix-Bu45XWSl.js.map → NumberWithSuffix-CDjEa08X.js.map} +1 -1
  48. package/dist/cdn/chunks/{ParagraphEditor-DwZqLJp2.js → ParagraphEditor-B3fG0vge.js} +22 -22
  49. package/dist/cdn/chunks/{ParagraphEditor-DwZqLJp2.js.map → ParagraphEditor-B3fG0vge.js.map} +1 -1
  50. package/dist/cdn/chunks/{RichTextEditorContent-CIuZ-2DV.js → RichTextEditorContent-C6YPCp9j.js} +4 -4
  51. package/dist/cdn/chunks/{RichTextEditorContent-CIuZ-2DV.js.map → RichTextEditorContent-C6YPCp9j.js.map} +1 -1
  52. package/dist/cdn/chunks/{SaveModuleDialog-Bep0X2s_.js → SaveModuleDialog-C6UIIVAM.js} +3 -3
  53. package/dist/cdn/chunks/{SaveModuleDialog-Bep0X2s_.js.map → SaveModuleDialog-C6UIIVAM.js.map} +1 -1
  54. package/dist/cdn/chunks/{TitleEditor-DO1-h3RY.js → TitleEditor-BiZbLYF1.js} +10 -10
  55. package/dist/cdn/chunks/{TitleEditor-DO1-h3RY.js.map → TitleEditor-BiZbLYF1.js.map} +1 -1
  56. package/dist/cdn/chunks/{blockTypeIcons-8o24HVJu.js → blockTypeIcons-BernVG06.js} +3 -3
  57. package/dist/cdn/chunks/{blockTypeIcons-8o24HVJu.js.map → blockTypeIcons-BernVG06.js.map} +1 -1
  58. package/dist/cdn/chunks/{draggable-kPCz_3zM.js → draggable-kG-D5Xsm.js} +6 -6
  59. package/dist/cdn/chunks/draggable-kG-D5Xsm.js.map +1 -0
  60. package/dist/cdn/chunks/extensions-Drp8UDc6.js +421 -0
  61. package/dist/cdn/chunks/extensions-Drp8UDc6.js.map +1 -0
  62. package/dist/cdn/chunks/{features-CkTMVylx.js → features-Dpczf9Su.js} +884 -835
  63. package/dist/cdn/chunks/features-Dpczf9Su.js.map +1 -0
  64. package/dist/cdn/chunks/{icons-9zjCuoJx.js → icons-CuxnJiGQ.js} +26 -26
  65. package/dist/cdn/chunks/{icons-9zjCuoJx.js.map → icons-CuxnJiGQ.js.map} +1 -1
  66. package/dist/cdn/chunks/{liquid.browser-DKKBzRQu.js → liquid.browser-BJOEu6Cg.js} +693 -678
  67. package/dist/cdn/chunks/liquid.browser-BJOEu6Cg.js.map +1 -0
  68. package/dist/cdn/chunks/{media-library-DMRIPx4g.js → media-library-CiYl_BO7.js} +33 -33
  69. package/dist/cdn/chunks/{media-library-DMRIPx4g.js.map → media-library-CiYl_BO7.js.map} +1 -1
  70. package/dist/cdn/chunks/{pusher-CdEqyLwF.js → pusher-CIwiKF8H.js} +4 -4
  71. package/dist/cdn/chunks/{pusher-CdEqyLwF.js.map → pusher-CIwiKF8H.js.map} +1 -1
  72. package/dist/cdn/chunks/{quality-CyeUgs_c.js → quality-CNjGxBG0.js} +112 -112
  73. package/dist/cdn/chunks/{quality-CyeUgs_c.js.map → quality-CNjGxBG0.js.map} +1 -1
  74. package/dist/cdn/chunks/{renderer-BIKUEKDD.js → renderer-CFkg8h-K.js} +20 -20
  75. package/dist/cdn/chunks/renderer-CFkg8h-K.js.map +1 -0
  76. package/dist/cdn/chunks/{src-pDy_imWG.js → src-DRpKu4Dy.js} +5 -5
  77. package/dist/cdn/chunks/{src-pDy_imWG.js.map → src-DRpKu4Dy.js.map} +1 -1
  78. package/dist/cdn/chunks/{styles-D4Bd3SCx.js → styles-B7wryV0l.js} +1484 -1344
  79. package/dist/cdn/chunks/styles-B7wryV0l.js.map +1 -0
  80. package/dist/cdn/chunks/{tiptap-BlLFFU3M.js → tiptap-DF9PEiqH.js} +6859 -6823
  81. package/dist/cdn/chunks/tiptap-DF9PEiqH.js.map +1 -0
  82. package/dist/cdn/editor.css +1 -1
  83. package/dist/cdn/editor.js +35 -35
  84. package/dist/cdn/editor.js.map +1 -1
  85. package/dist/{check-CYJwFmjy.js → check-rl7ok6uJ.js} +1 -1
  86. package/dist/{chevron-down-C5l-DzAA.js → chevron-down-BKe__NOD.js} +1 -1
  87. package/dist/{circle-alert-wf5HUFZY.js → circle-alert-C8xmpMsK.js} +1 -1
  88. package/dist/{clock-Bj0bQw-K.js → clock-BW4JuDCN.js} +1 -1
  89. package/dist/{cloud-CoFDm9YA.js → cloud-BQusL53H.js} +208 -208
  90. package/dist/createLucideIcon-Dx-EjR9r.js +43 -0
  91. package/dist/{dist-CLpPNKy9.js → dist-B5Sov3sS.js} +7 -7
  92. package/dist/dist-BEWiuOMi.js +251 -0
  93. package/dist/{dist-CrQZ_af9.js → dist-BFmE-7hB.js} +2 -2
  94. package/dist/{dist-U5vfDdYI.js → dist-BMoa33wT.js} +2 -2
  95. package/dist/{dist-BctFrpeA.js → dist-BibU4HNl.js} +74 -65
  96. package/dist/{dist-Dd3ibRZm.js → dist-BsCGIDSt.js} +103 -102
  97. package/dist/dist-CNLKj9wa.js +5 -0
  98. package/dist/{dist-BX3gGwL8.js → dist-CNXDNYQn.js} +728 -694
  99. package/dist/{dist-Bn703mnA.js → dist-COG3IdPK.js} +3 -3
  100. package/dist/{dist-B7w6xTU6.js → dist-CQZxDvFw.js} +3 -3
  101. package/dist/{dist-34OcyoK1.js → dist-CRsjOQM-.js} +2 -2
  102. package/dist/dist-CTT6WYJ6.js +134 -0
  103. package/dist/dist-Cqa6aeAJ.js +5 -0
  104. package/dist/{dist-ChMninLH.js → dist-SXJJ2v41.js} +2 -2
  105. package/dist/{dist-CyjyYg52.js → dist-itdjZraK.js} +28 -23
  106. package/dist/extensions-DwaZAqm6.js +423 -0
  107. package/dist/{image-up-x8-WXfsx.js → image-up-BwBCmQ4P.js} +1 -1
  108. package/dist/{info-RS_fGcGi.js → info-TCn7uWR5.js} +1 -1
  109. package/dist/{keys-DgYXDafq.js → keys-Cv8-8GsD.js} +1 -1
  110. package/dist/{liquid.browser-CVjP5Mex.js → liquid.browser-DZLtv26k.js} +692 -677
  111. package/dist/{list-checks-Bf7XdDyv.js → list-checks-CSrOWNgq.js} +1 -1
  112. package/dist/{loader-circle-CLZ0_FvW.js → loader-circle-BLmicnPG.js} +1 -1
  113. package/dist/{message-circle-B-1bN9ab.js → message-circle-C9hHMQCI.js} +1 -1
  114. package/dist/{refresh-cw-CWKWqJYG.js → refresh-cw-D1JQ1LNa.js} +1 -1
  115. package/dist/runtime-dom.esm-bundler-BzuoCyNp.js +523 -0
  116. package/dist/{scan-line-BtK5dEai.js → scan-line-DgijVq9y.js} +1 -1
  117. package/dist/{send-Cn1IUdzh.js → send-DjPdq69F.js} +1 -1
  118. package/dist/{shield-check-CrvMk4Ea.js → shield-check-Bqluu8FS.js} +1 -1
  119. package/dist/{sparkles-CgfjwvnG.js → sparkles-M4azPVSP.js} +1 -1
  120. package/dist/style.css +1 -1
  121. package/dist/styles-D7fQ7f_1.js +4164 -0
  122. package/dist/templatical-editor.js +127 -126
  123. package/dist/{text-align-start-C3r_Rnvy.js → text-align-start-CMya5pCQ.js} +11 -11
  124. package/dist/{trash-2-CjERg4x9.js → trash-2-C-81rkLS.js} +1 -1
  125. package/dist/{triangle-alert-Chkny574.js → triangle-alert-BuRWnynk.js} +1 -1
  126. package/dist/{upload-e5kDRkPb.js → upload-CWBIoLd4.js} +1 -1
  127. package/dist/{useAliveFlag-cUQj9rmB.js → useAliveFlag-CECL_OUb.js} +1 -1
  128. package/dist/{useCloudI18n-CYJKqXtI.js → useCloudI18n-AKCy98qD.js} +2 -2
  129. package/dist/{useEditorCore-8JxXDOA4.js → useEditorCore-vcWLdnjN.js} +1406 -1364
  130. package/dist/{useI18n-BWqM8i78.js → useI18n-C-TDeJBt.js} +2 -2
  131. package/dist/{useMergeTag-NHC4ylza.js → useMergeTag-DSrBY0-2.js} +5 -5
  132. package/dist/usePopoverRoot-DKUDnr55.js +8 -0
  133. package/dist/{vue.runtime.esm-bundler-BPa483TZ.js → vue.runtime.esm-bundler-l0XAqiyv.js} +626 -1147
  134. package/dist/{x-DiPIbccg.js → x-CQSvXnGR.js} +1 -1
  135. package/package.json +26 -26
  136. package/dist/CountdownBlock-DtAokAVw.js +0 -92
  137. package/dist/CountdownToolbar-Dtqgwy0g.js +0 -210
  138. package/dist/cdn/chunks/draggable-kPCz_3zM.js.map +0 -1
  139. package/dist/cdn/chunks/extensions-iwBXnEwq.js +0 -605
  140. package/dist/cdn/chunks/extensions-iwBXnEwq.js.map +0 -1
  141. package/dist/cdn/chunks/features-CkTMVylx.js.map +0 -1
  142. package/dist/cdn/chunks/liquid.browser-DKKBzRQu.js.map +0 -1
  143. package/dist/cdn/chunks/renderer-BIKUEKDD.js.map +0 -1
  144. package/dist/cdn/chunks/styles-D4Bd3SCx.js.map +0 -1
  145. package/dist/cdn/chunks/tiptap-BlLFFU3M.js.map +0 -1
  146. package/dist/createLucideIcon-Bad2kKE0.js +0 -43
  147. package/dist/dist-CADDCv0o.js +0 -5
  148. package/dist/dist-CGvz7vkq.js +0 -5
  149. package/dist/dist-DuCzdgDA.js +0 -382
  150. package/dist/extensions-J439b7y7.js +0 -1720
  151. package/dist/styles-BUwDOWd3.js +0 -4022
  152. package/dist/usePopoverRoot-B1sdY4es.js +0 -8
@@ -1,7 +1,7 @@
1
- import { A as e, M as t, b as n, d as r, f as i, h as a, l as o, m as s, ot as c, p as l, rt as u, st as d } from "./vue.runtime.esm-bundler-BPa483TZ.js";
2
- import "./useEditorCore-8JxXDOA4.js";
3
- import { t as f } from "./createLucideIcon-Bad2kKE0.js";
4
- import { n as p } from "./useCloudI18n-CYJKqXtI.js";
1
+ import { A as e, Dt as t, O as n, Ot as r, _ as i, c as a, d as o, l as s, nt as c, r as l, s as u, u as d } from "./vue.runtime.esm-bundler-l0XAqiyv.js";
2
+ import "./useEditorCore-vcWLdnjN.js";
3
+ import { t as f } from "./createLucideIcon-Dx-EjR9r.js";
4
+ import { n as p } from "./useCloudI18n-AKCy98qD.js";
5
5
  import { t as m } from "./readableTextColor-f8Kykfnh.js";
6
6
  var h = f("wifi-off", [
7
7
  ["path", {
@@ -52,43 +52,43 @@ var h = f("wifi-off", [
52
52
  ]), _ = { class: "tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2" }, v = ["title"], y = {
53
53
  key: 0,
54
54
  class: "tpl:flex tpl:items-center tpl:-space-x-1.5"
55
- }, b = ["title"], x = ["title"], S = 3, C = /* @__PURE__ */ n({
55
+ }, b = ["title"], x = ["title"], S = 3, C = /* @__PURE__ */ i({
56
56
  __name: "CollaboratorBar",
57
57
  props: {
58
58
  collaborators: {},
59
59
  isConnected: { type: Boolean }
60
60
  },
61
- setup(n) {
62
- let f = n, { t: C } = p(), w = r(() => f.collaborators.slice(0, S)), T = r(() => f.collaborators.slice(S)), E = r(() => T.value.length), D = r(() => T.value.map((e) => e.name).join("\n"));
61
+ setup(i) {
62
+ let f = i, { t: C } = p(), w = u(() => f.collaborators.slice(0, S)), T = u(() => f.collaborators.slice(S)), E = u(() => T.value.length), D = u(() => T.value.map((e) => e.name).join("\n"));
63
63
  function O(e) {
64
64
  let t = e.trim().split(/\s+/);
65
65
  return t.length >= 2 ? (t[0].charAt(0) + t[t.length - 1].charAt(0)).toUpperCase() : e.charAt(0).toUpperCase();
66
66
  }
67
- return (r, f) => (e(), a("div", _, [i("div", {
67
+ return (u, f) => (n(), o("div", _, [a("div", {
68
68
  class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-[11px]",
69
- style: c({ color: n.isConnected ? "var(--tpl-success)" : "var(--tpl-text-muted)" }),
70
- title: n.isConnected ? u(C).collaboration.connected : u(C).collaboration.disconnected
71
- }, [n.isConnected ? (e(), l(u(g), {
69
+ style: t({ color: i.isConnected ? "var(--tpl-success)" : "var(--tpl-text-muted)" }),
70
+ title: i.isConnected ? c(C).collaboration.connected : c(C).collaboration.disconnected
71
+ }, [i.isConnected ? (n(), s(c(g), {
72
72
  key: 0,
73
73
  size: 12,
74
74
  "stroke-width": 2
75
- })) : (e(), l(u(h), {
75
+ })) : (n(), s(c(h), {
76
76
  key: 1,
77
77
  size: 12,
78
78
  "stroke-width": 2
79
- }))], 12, v), n.collaborators.length > 0 ? (e(), a("div", y, [(e(!0), a(o, null, t(w.value, (t) => (e(), a("div", {
80
- key: t.id,
79
+ }))], 12, v), i.collaborators.length > 0 ? (n(), o("div", y, [(n(!0), o(l, null, e(w.value, (e) => (n(), o("div", {
80
+ key: e.id,
81
81
  class: "tpl-collaborator-avatar tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:text-[10px] tpl:font-bold tpl:transition-transform tpl:duration-150 tpl:hover:z-10 tpl:hover:scale-110 tpl:border-[var(--tpl-bg)]",
82
- style: c({
83
- backgroundColor: t.color,
84
- color: u(m)(t.color)
82
+ style: t({
83
+ backgroundColor: e.color,
84
+ color: c(m)(e.color)
85
85
  }),
86
- title: t.name
87
- }, d(O(t.name)), 13, b))), 128)), E.value > 0 ? (e(), a("div", {
86
+ title: e.name
87
+ }, r(O(e.name)), 13, b))), 128)), E.value > 0 ? (n(), o("div", {
88
88
  key: 0,
89
89
  class: "tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:text-[9px] tpl:font-bold tpl:border-[var(--tpl-bg)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]",
90
90
  title: D.value
91
- }, " +" + d(E.value), 9, x)) : s("", !0)])) : s("", !0)]));
91
+ }, " +" + r(E.value), 9, x)) : d("", !0)])) : d("", !0)]));
92
92
  }
93
93
  });
94
94
  //#endregion
@@ -1,16 +1,17 @@
1
- import { A as e, B as t, E as n, L as r, M as i, X as a, _ as ee, a as o, at as s, b as c, d as l, f as u, h as d, l as f, m as p, ot as te, p as m, rt as h, st as g, t as _, v, z as y } from "./vue.runtime.esm-bundler-BPa483TZ.js";
2
- import { L as b, l as ne, m as re, r as ie } from "./keys-DgYXDafq.js";
3
- import { t as ae } from "./useI18n-BWqM8i78.js";
4
- import { t as x } from "./createLucideIcon-Bad2kKE0.js";
5
- import { t as oe } from "./check-CYJwFmjy.js";
6
- import { t as se } from "./chevron-down-C5l-DzAA.js";
7
- import { t as S } from "./loader-circle-CLZ0_FvW.js";
8
- import { t as C } from "./message-circle-B-1bN9ab.js";
9
- import { t as w } from "./send-Cn1IUdzh.js";
10
- import { t as T } from "./trash-2-CjERg4x9.js";
11
- import { t as E } from "./x-DiPIbccg.js";
1
+ import { A as e, Dt as t, Et as n, I as r, O as i, Ot as a, R as o, Y as s, _ as c, c as l, d as u, h as d, l as f, m as ee, nt as p, r as m, s as h, u as g, w as te, z as _ } from "./vue.runtime.esm-bundler-l0XAqiyv.js";
2
+ import { a as v, t as y } from "./runtime-dom.esm-bundler-BzuoCyNp.js";
3
+ import { L as b, l as ne, m as re, r as ie } from "./keys-Cv8-8GsD.js";
4
+ import { t as ae } from "./useI18n-C-TDeJBt.js";
5
+ import { t as x } from "./createLucideIcon-Dx-EjR9r.js";
6
+ import { t as oe } from "./check-rl7ok6uJ.js";
7
+ import { t as se } from "./chevron-down-BKe__NOD.js";
8
+ import { t as S } from "./loader-circle-BLmicnPG.js";
9
+ import { t as C } from "./message-circle-C9hHMQCI.js";
10
+ import { t as w } from "./send-DjPdq69F.js";
11
+ import { t as T } from "./trash-2-C-81rkLS.js";
12
+ import { t as E } from "./x-CQSvXnGR.js";
12
13
  import { t as D } from "./_plugin-vue_export-helper-B3ysoDQm.js";
13
- import { n as ce } from "./useCloudI18n-CYJKqXtI.js";
14
+ import { n as ce } from "./useCloudI18n-AKCy98qD.js";
14
15
  import { t as le } from "./formatRelativeTime-CtUU-QZ8.js";
15
16
  var ue = x("chevron-up", [["path", {
16
17
  d: "m18 15-6-6-6 6",
@@ -100,7 +101,7 @@ var ue = x("chevron-up", [["path", {
100
101
  props: { visible: { type: Boolean } },
101
102
  emits: ["close", "filterBlock"],
102
103
  setup(c, { expose: x, emit: D }) {
103
- let k = c, A = D, { format: j } = ae(), { t: M } = ce(), N = b(re, "CommentsSidebar"), bt = b(ie, "CommentsSidebar"), P = b(ne, "CommentsSidebar"), F = a("unresolved"), I = a(null), L = a(""), R = a(null), z = a(""), B = a(null), V = a(""), H = a(/* @__PURE__ */ new Set()), U = a(null), W = a(null), xt = l(() => bt.userConfig?.id ?? null), St = l(() => {
104
+ let k = c, A = D, { format: j } = ae(), { t: M } = ce(), N = b(re, "CommentsSidebar"), bt = b(ie, "CommentsSidebar"), P = b(ne, "CommentsSidebar"), F = s("unresolved"), I = s(null), L = s(""), R = s(null), z = s(""), B = s(null), V = s(""), H = s(/* @__PURE__ */ new Set()), U = s(null), W = s(null), xt = h(() => bt.userConfig?.id ?? null), St = h(() => {
104
105
  let e = /* @__PURE__ */ new Set();
105
106
  for (let t of N.content.value.blocks) if (e.add(t.id), t.type === "section") for (let n of t.children) for (let t of n) e.add(t.id);
106
107
  return e;
@@ -108,7 +109,7 @@ var ue = x("chevron-up", [["path", {
108
109
  function Ct(e) {
109
110
  return e ? !St.value.has(e) : !1;
110
111
  }
111
- let wt = l(() => F.value !== "block" || !I.value ? !1 : !(N.savedBlockIds?.value.has(I.value) ?? !0)), G = l(() => {
112
+ let wt = h(() => F.value !== "block" || !I.value ? !1 : !(N.savedBlockIds?.value.has(I.value) ?? !0)), G = h(() => {
112
113
  let e = P.comments.value;
113
114
  return F.value === "unresolved" ? e = e.filter((e) => !e.resolved_at) : F.value === "block" && I.value && (e = e.filter((e) => e.block_id === I.value)), e;
114
115
  });
@@ -182,14 +183,14 @@ var ue = x("chevron-up", [["path", {
182
183
  e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Q(t)), e.key === "Escape" && J();
183
184
  }
184
185
  function It() {
185
- n(() => {
186
+ te(() => {
186
187
  W.value?.focus();
187
188
  });
188
189
  }
189
190
  return x({
190
191
  filterByBlock: Tt,
191
192
  focusNewComment: It
192
- }), (n, r) => (e(), m(_, {
193
+ }), (r, s) => (i(), f(y, {
193
194
  "enter-active-class": "tpl-comments-slide-enter-active",
194
195
  "enter-from-class": "tpl:translate-x-full",
195
196
  "enter-to-class": "tpl:translate-x-0",
@@ -197,242 +198,242 @@ var ue = x("chevron-up", [["path", {
197
198
  "leave-from-class": "tpl:translate-x-0",
198
199
  "leave-to-class": "tpl:translate-x-full"
199
200
  }, {
200
- default: y(() => [c.visible ? (e(), d("div", pe, [
201
- u("div", me, [u("div", he, [
202
- v(h(C), {
201
+ default: o(() => [c.visible ? (i(), u("div", pe, [
202
+ l("div", me, [l("div", he, [
203
+ d(p(C), {
203
204
  size: 13,
204
205
  "stroke-width": 2
205
206
  }),
206
- u("span", null, g(h(M).comments.title), 1),
207
- h(P).unresolvedCount.value > 0 ? (e(), d("span", ge, g(h(P).unresolvedCount.value), 1)) : p("", !0)
208
- ]), u("button", {
207
+ l("span", null, a(p(M).comments.title), 1),
208
+ p(P).unresolvedCount.value > 0 ? (i(), u("span", ge, a(p(P).unresolvedCount.value), 1)) : g("", !0)
209
+ ]), l("button", {
209
210
  class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
210
- onClick: r[0] ||= (e) => A("close")
211
- }, [v(h(E), {
211
+ onClick: s[0] ||= (e) => A("close")
212
+ }, [d(p(E), {
212
213
  size: 14,
213
214
  "stroke-width": 2
214
215
  })])]),
215
- u("div", _e, [
216
- u("button", {
217
- class: s(["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" : ""]),
218
- onClick: r[1] ||= (e) => K("unresolved")
219
- }, g(h(M).comments.filterUnresolved), 3),
220
- u("button", {
221
- class: s(["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" : ""]),
222
- onClick: r[2] ||= (e) => K("all")
223
- }, g(h(M).comments.filterAll), 3),
224
- h(N).state.selectedBlockId ? (e(), d("button", {
216
+ l("div", _e, [
217
+ l("button", {
218
+ class: n(["tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150", F.value === "unresolved" ? "tpl-comment-filter--active" : ""]),
219
+ onClick: s[1] ||= (e) => K("unresolved")
220
+ }, a(p(M).comments.filterUnresolved), 3),
221
+ l("button", {
222
+ class: n(["tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150", F.value === "all" ? "tpl-comment-filter--active" : ""]),
223
+ onClick: s[2] ||= (e) => K("all")
224
+ }, a(p(M).comments.filterAll), 3),
225
+ p(N).state.selectedBlockId ? (i(), u("button", {
225
226
  key: 0,
226
- class: s(["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" : ""]),
227
- onClick: r[3] ||= (e) => K("block", h(N).state.selectedBlockId ?? void 0)
228
- }, g(h(M).comments.filterBlock), 3)) : p("", !0)
227
+ class: n(["tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150", F.value === "block" ? "tpl-comment-filter--active" : ""]),
228
+ onClick: s[3] ||= (e) => K("block", p(N).state.selectedBlockId ?? void 0)
229
+ }, a(p(M).comments.filterBlock), 3)) : g("", !0)
229
230
  ]),
230
- u("div", ve, [h(P).isLoading.value ? (e(), d("div", ye, [v(h(S), {
231
+ l("div", ve, [p(P).isLoading.value ? (i(), u("div", ye, [d(p(S), {
231
232
  class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
232
233
  size: 24,
233
234
  "stroke-width": 2
234
- })])) : G.value.length === 0 ? (e(), d("div", be, [v(h(C), {
235
+ })])) : G.value.length === 0 ? (i(), u("div", be, [d(p(C), {
235
236
  size: 32,
236
237
  "stroke-width": 1.5,
237
238
  class: "tpl:text-[var(--tpl-text-dim)]"
238
- }), u("p", xe, g(F.value === "all" ? h(M).comments.noCommentsHint : h(M).comments.noComments), 1)])) : (e(), d("div", Se, [(e(!0), d(f, null, i(G.value, (n) => (e(), d("div", {
239
- key: n.id,
239
+ }), l("p", xe, a(F.value === "all" ? p(M).comments.noCommentsHint : p(M).comments.noComments), 1)])) : (i(), u("div", Se, [(i(!0), u(m, null, e(G.value, (r) => (i(), u("div", {
240
+ key: r.id,
240
241
  class: "tpl-comment-thread"
241
242
  }, [
242
- u("div", Ce, [
243
- u("div", we, [u("div", Te, [
244
- u("span", Ee, g($(n) ? h(M).comments.ownedByYou : n.author_name), 1),
245
- u("span", De, g(Mt(n.created_at)), 1),
246
- n.updated_at === n.created_at ? p("", !0) : (e(), d("span", Oe, " (" + g(h(M).comments.edited) + ") ", 1))
247
- ]), u("div", ke, [
248
- u("button", {
243
+ l("div", Ce, [
244
+ l("div", we, [l("div", Te, [
245
+ l("span", Ee, a($(r) ? p(M).comments.ownedByYou : r.author_name), 1),
246
+ l("span", De, a(Mt(r.created_at)), 1),
247
+ r.updated_at === r.created_at ? g("", !0) : (i(), u("span", Oe, " (" + a(p(M).comments.edited) + ") ", 1))
248
+ ]), l("div", ke, [
249
+ l("button", {
249
250
  class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
250
- title: n.resolved_at ? h(M).comments.unresolve : h(M).comments.resolve,
251
- onClick: (e) => jt(n.id)
252
- }, [v(h(de), {
251
+ title: r.resolved_at ? p(M).comments.unresolve : p(M).comments.resolve,
252
+ onClick: (e) => jt(r.id)
253
+ }, [d(p(de), {
253
254
  size: 13,
254
255
  "stroke-width": 2,
255
256
  class: "tpl-resolve-icon",
256
- style: te({ color: n.resolved_at ? "var(--tpl-primary)" : void 0 })
257
+ style: t({ color: r.resolved_at ? "var(--tpl-primary)" : void 0 })
257
258
  }, null, 8, ["style"])], 8, Ae),
258
- $(n) ? (e(), d("button", {
259
+ $(r) ? (i(), u("button", {
259
260
  key: 0,
260
261
  class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
261
- title: h(M).comments.edit,
262
- onClick: (e) => q(n)
263
- }, [v(h(O), {
262
+ title: p(M).comments.edit,
263
+ onClick: (e) => q(r)
264
+ }, [d(p(O), {
264
265
  size: 12,
265
266
  "stroke-width": 2
266
- })], 8, je)) : p("", !0),
267
- $(n) ? (e(), d("button", {
267
+ })], 8, je)) : g("", !0),
268
+ $(r) ? (i(), u("button", {
268
269
  key: 1,
269
270
  class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
270
- title: h(M).comments.delete,
271
- onClick: (e) => Y(n.id)
272
- }, [v(h(T), {
271
+ title: p(M).comments.delete,
272
+ onClick: (e) => Y(r.id)
273
+ }, [d(p(T), {
273
274
  size: 12,
274
275
  "stroke-width": 2
275
- })], 8, Me)) : p("", !0)
276
+ })], 8, Me)) : g("", !0)
276
277
  ])]),
277
- v(_, { name: "tpl-resolve" }, {
278
- default: y(() => [n.resolved_at ? (e(), d("div", Ne, [v(h(oe), {
278
+ d(y, { name: "tpl-resolve" }, {
279
+ default: o(() => [r.resolved_at ? (i(), u("div", Ne, [d(p(oe), {
279
280
  size: 10,
280
281
  "stroke-width": 2.5
281
- }), u("span", null, g(h(j)(h(M).comments.resolvedBy, { name: n.resolved_by_name ?? "" })), 1)])) : p("", !0)]),
282
+ }), l("span", null, a(p(j)(p(M).comments.resolvedBy, { name: r.resolved_by_name ?? "" })), 1)])) : g("", !0)]),
282
283
  _: 2
283
284
  }, 1024),
284
- n.block_id && Ct(n.block_id) ? (e(), d("span", Pe, g(h(M).comments.missingBlock), 1)) : n.block_id ? (e(), d("button", {
285
+ r.block_id && Ct(r.block_id) ? (i(), u("span", Pe, a(p(M).comments.missingBlock), 1)) : r.block_id ? (i(), u("button", {
285
286
  key: 1,
286
287
  class: "tpl:mt-1 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]",
287
- onClick: (e) => h(N).selectBlock(n.block_id ?? "")
288
- }, " Block ", 8, Fe)) : p("", !0),
289
- B.value === n.id ? (e(), d("div", Ie, [t(u("textarea", {
290
- "onUpdate:modelValue": r[4] ||= (e) => V.value = e,
288
+ onClick: (e) => p(N).selectBlock(r.block_id ?? "")
289
+ }, " Block ", 8, Fe)) : g("", !0),
290
+ B.value === r.id ? (i(), u("div", Ie, [_(l("textarea", {
291
+ "onUpdate:modelValue": s[4] ||= (e) => V.value = e,
291
292
  class: "tpl:w-full tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
292
293
  rows: "3",
293
- onKeydown: (e) => Ft(e, n.id)
294
- }, null, 40, Le), [[o, V.value]]), u("div", Re, [u("button", {
294
+ onKeydown: (e) => Ft(e, r.id)
295
+ }, null, 40, Le), [[v, V.value]]), l("div", Re, [l("button", {
295
296
  class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
296
- disabled: !V.value.trim() || h(P).isSubmitting.value,
297
- onClick: (e) => Q(n.id)
298
- }, g(h(M).comments.save), 9, ze), u("button", {
297
+ disabled: !V.value.trim() || p(P).isSubmitting.value,
298
+ onClick: (e) => Q(r.id)
299
+ }, a(p(M).comments.save), 9, ze), l("button", {
299
300
  class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
300
- onClick: r[5] ||= (e) => J()
301
- }, g(h(M).comments.cancel), 1)])])) : (e(), d("p", Be, g(n.body), 1)),
302
- U.value === n.id ? (e(), d("div", Ve, [
303
- u("span", He, g(h(M).comments.deleteConfirm), 1),
304
- u("button", {
301
+ onClick: s[5] ||= (e) => J()
302
+ }, a(p(M).comments.cancel), 1)])])) : (i(), u("p", Be, a(r.body), 1)),
303
+ U.value === r.id ? (i(), u("div", Ve, [
304
+ l("span", He, a(p(M).comments.deleteConfirm), 1),
305
+ l("button", {
305
306
  class: "tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-danger)] tpl:text-[var(--tpl-bg)]",
306
- onClick: (e) => At(n.id)
307
- }, g(h(M).comments.delete), 9, Ue),
308
- u("button", {
307
+ onClick: (e) => At(r.id)
308
+ }, a(p(M).comments.delete), 9, Ue),
309
+ l("button", {
309
310
  class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
310
- onClick: r[6] ||= (e) => X()
311
- }, g(h(M).comments.cancel), 1)
312
- ])) : p("", !0),
313
- B.value !== n.id && U.value !== n.id ? (e(), d("div", We, [u("button", {
311
+ onClick: s[6] ||= (e) => X()
312
+ }, a(p(M).comments.cancel), 1)
313
+ ])) : g("", !0),
314
+ B.value !== r.id && U.value !== r.id ? (i(), u("div", We, [l("button", {
314
315
  class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
315
- title: h(M).comments.reply,
316
- onClick: (e) => Dt(n.id)
317
- }, [v(h(fe), {
316
+ title: p(M).comments.reply,
317
+ onClick: (e) => Dt(r.id)
318
+ }, [d(p(fe), {
318
319
  size: 13,
319
320
  "stroke-width": 2,
320
321
  class: "tpl:text-[var(--tpl-primary)]"
321
- })], 8, Ge), (n.replies?.length ?? 0) > 0 ? (e(), d("button", {
322
+ })], 8, Ge), (r.replies?.length ?? 0) > 0 ? (i(), u("button", {
322
323
  key: 0,
323
324
  class: "tpl:flex tpl:items-center tpl:gap-0.5 tpl:text-[11px] tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
324
- onClick: (e) => Et(n.id)
325
- }, [H.value.has(n.id) ? (e(), m(h(ue), {
325
+ onClick: (e) => Et(r.id)
326
+ }, [H.value.has(r.id) ? (i(), f(p(ue), {
326
327
  key: 0,
327
328
  size: 11,
328
329
  "stroke-width": 2
329
- })) : (e(), m(h(se), {
330
+ })) : (i(), f(p(se), {
330
331
  key: 1,
331
332
  size: 11,
332
333
  "stroke-width": 2
333
- })), ee(" " + g((n.replies?.length ?? 0) === 1 ? h(j)(h(M).comments.replyOne, { count: String(n.replies?.length ?? 0) }) : h(j)(h(M).comments.replyMany, { count: String(n.replies?.length ?? 0) })), 1)], 8, Ke)) : p("", !0)])) : p("", !0)
334
+ })), ee(" " + a((r.replies?.length ?? 0) === 1 ? p(j)(p(M).comments.replyOne, { count: String(r.replies?.length ?? 0) }) : p(j)(p(M).comments.replyMany, { count: String(r.replies?.length ?? 0) })), 1)], 8, Ke)) : g("", !0)])) : g("", !0)
334
335
  ]),
335
- v(_, { name: "tpl-replies" }, {
336
- default: y(() => [H.value.has(n.id) && (n.replies?.length ?? 0) > 0 ? (e(), d("div", qe, [(e(!0), d(f, null, i(n.replies, (i, a) => (e(), d("div", {
337
- key: i.id,
338
- class: s(["tpl-comment-reply-card tpl:relative tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-2.5", a < (n.replies?.length ?? 0) - 1 ? "tpl:mb-2" : ""])
336
+ d(y, { name: "tpl-replies" }, {
337
+ default: o(() => [H.value.has(r.id) && (r.replies?.length ?? 0) > 0 ? (i(), u("div", qe, [(i(!0), u(m, null, e(r.replies, (e, t) => (i(), u("div", {
338
+ key: e.id,
339
+ class: n(["tpl-comment-reply-card tpl:relative tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-2.5", t < (r.replies?.length ?? 0) - 1 ? "tpl:mb-2" : ""])
339
340
  }, [
340
- u("div", Je, [u("div", Ye, [
341
- u("span", Xe, g($(i) ? h(M).comments.ownedByYou : i.author_name), 1),
342
- u("span", Ze, g(Mt(i.created_at)), 1),
343
- i.updated_at === i.created_at ? p("", !0) : (e(), d("span", Qe, " (" + g(h(M).comments.edited) + ") ", 1))
344
- ]), u("div", $e, [$(i) ? (e(), d("button", {
341
+ l("div", Je, [l("div", Ye, [
342
+ l("span", Xe, a($(e) ? p(M).comments.ownedByYou : e.author_name), 1),
343
+ l("span", Ze, a(Mt(e.created_at)), 1),
344
+ e.updated_at === e.created_at ? g("", !0) : (i(), u("span", Qe, " (" + a(p(M).comments.edited) + ") ", 1))
345
+ ]), l("div", $e, [$(e) ? (i(), u("button", {
345
346
  key: 0,
346
347
  class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
347
- title: h(M).comments.edit,
348
- onClick: (e) => q(i)
349
- }, [v(h(O), {
348
+ title: p(M).comments.edit,
349
+ onClick: (t) => q(e)
350
+ }, [d(p(O), {
350
351
  size: 11,
351
352
  "stroke-width": 2
352
- })], 8, et)) : p("", !0), $(i) ? (e(), d("button", {
353
+ })], 8, et)) : g("", !0), $(e) ? (i(), u("button", {
353
354
  key: 1,
354
355
  class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
355
- title: h(M).comments.delete,
356
- onClick: (e) => Y(i.id)
357
- }, [v(h(T), {
356
+ title: p(M).comments.delete,
357
+ onClick: (t) => Y(e.id)
358
+ }, [d(p(T), {
358
359
  size: 11,
359
360
  "stroke-width": 2
360
- })], 8, tt)) : p("", !0)])]),
361
- B.value === i.id ? (e(), d("div", nt, [t(u("textarea", {
362
- "onUpdate:modelValue": r[7] ||= (e) => V.value = e,
361
+ })], 8, tt)) : g("", !0)])]),
362
+ B.value === e.id ? (i(), u("div", nt, [_(l("textarea", {
363
+ "onUpdate:modelValue": s[7] ||= (e) => V.value = e,
363
364
  class: "tpl:w-full tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
364
365
  rows: "2",
365
- onKeydown: (e) => Ft(e, i.id)
366
- }, null, 40, rt), [[o, V.value]]), u("div", it, [u("button", {
366
+ onKeydown: (t) => Ft(t, e.id)
367
+ }, null, 40, rt), [[v, V.value]]), l("div", it, [l("button", {
367
368
  class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
368
- disabled: !V.value.trim() || h(P).isSubmitting.value,
369
- onClick: (e) => Q(i.id)
370
- }, g(h(M).comments.save), 9, at), u("button", {
369
+ disabled: !V.value.trim() || p(P).isSubmitting.value,
370
+ onClick: (t) => Q(e.id)
371
+ }, a(p(M).comments.save), 9, at), l("button", {
371
372
  class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
372
- onClick: r[8] ||= (e) => J()
373
- }, g(h(M).comments.cancel), 1)])])) : (e(), d("p", ot, g(i.body), 1)),
374
- U.value === i.id ? (e(), d("div", st, [
375
- u("span", ct, g(h(M).comments.deleteConfirm), 1),
376
- u("button", {
373
+ onClick: s[8] ||= (e) => J()
374
+ }, a(p(M).comments.cancel), 1)])])) : (i(), u("p", ot, a(e.body), 1)),
375
+ U.value === e.id ? (i(), u("div", st, [
376
+ l("span", ct, a(p(M).comments.deleteConfirm), 1),
377
+ l("button", {
377
378
  class: "tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-danger)] tpl:text-[var(--tpl-bg)]",
378
- onClick: (e) => At(i.id)
379
- }, g(h(M).comments.delete), 9, lt),
380
- u("button", {
379
+ onClick: (t) => At(e.id)
380
+ }, a(p(M).comments.delete), 9, lt),
381
+ l("button", {
381
382
  class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
382
- onClick: r[9] ||= (e) => X()
383
- }, g(h(M).comments.cancel), 1)
384
- ])) : p("", !0)
385
- ], 2))), 128))])) : p("", !0)]),
383
+ onClick: s[9] ||= (e) => X()
384
+ }, a(p(M).comments.cancel), 1)
385
+ ])) : g("", !0)
386
+ ], 2))), 128))])) : g("", !0)]),
386
387
  _: 2
387
388
  }, 1024),
388
- v(_, { name: "tpl-replies" }, {
389
- default: y(() => [R.value === n.id ? (e(), d("div", ut, [u("div", dt, [t(u("textarea", {
390
- "onUpdate:modelValue": r[10] ||= (e) => z.value = e,
389
+ d(y, { name: "tpl-replies" }, {
390
+ default: o(() => [R.value === r.id ? (i(), u("div", ut, [l("div", dt, [_(l("textarea", {
391
+ "onUpdate:modelValue": s[10] ||= (e) => z.value = e,
391
392
  class: "tpl:flex-1 tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
392
- placeholder: h(M).comments.replyPlaceholder,
393
+ placeholder: p(M).comments.replyPlaceholder,
393
394
  rows: "2",
394
- onKeydown: (e) => Pt(e, n.id)
395
- }, null, 40, ft), [[o, z.value]]), u("div", pt, [u("button", {
395
+ onKeydown: (e) => Pt(e, r.id)
396
+ }, null, 40, ft), [[v, z.value]]), l("div", pt, [l("button", {
396
397
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-colors tpl:duration-150 tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
397
- disabled: !z.value.trim() || h(P).isSubmitting.value,
398
- onClick: (e) => kt(n.id)
399
- }, [v(h(w), {
398
+ disabled: !z.value.trim() || p(P).isSubmitting.value,
399
+ onClick: (e) => kt(r.id)
400
+ }, [d(p(w), {
400
401
  size: 14,
401
402
  "stroke-width": 2
402
- })], 8, mt), u("button", {
403
+ })], 8, mt), l("button", {
403
404
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
404
- onClick: r[11] ||= (e) => Ot()
405
- }, [v(h(E), {
405
+ onClick: s[11] ||= (e) => Ot()
406
+ }, [d(p(E), {
406
407
  size: 14,
407
408
  "stroke-width": 2
408
- })])])])])) : p("", !0)]),
409
+ })])])])])) : g("", !0)]),
409
410
  _: 2
410
411
  }, 1024)
411
412
  ]))), 128))]))]),
412
- u("div", ht, [wt.value ? (e(), d("div", gt, g(h(M).comments.saveTemplateFirst), 1)) : (e(), d("div", _t, [t(u("textarea", {
413
+ l("div", ht, [wt.value ? (i(), u("div", gt, a(p(M).comments.saveTemplateFirst), 1)) : (i(), u("div", _t, [_(l("textarea", {
413
414
  ref_key: "newCommentInput",
414
415
  ref: W,
415
- "onUpdate:modelValue": r[12] ||= (e) => L.value = e,
416
+ "onUpdate:modelValue": s[12] ||= (e) => L.value = e,
416
417
  class: "tpl:max-h-24 tpl:min-h-[48px] tpl:flex-1 tpl:resize-none tpl:border-none tpl:bg-transparent tpl:font-sans tpl:text-xs tpl:outline-none tpl:text-[var(--tpl-text)]",
417
- placeholder: h(M).comments.placeholder,
418
- disabled: h(P).isSubmitting.value,
418
+ placeholder: p(M).comments.placeholder,
419
+ disabled: p(P).isSubmitting.value,
419
420
  rows: "2",
420
421
  onKeydown: Nt
421
- }, null, 40, vt), [[o, L.value]]), u("button", {
422
+ }, null, 40, vt), [[v, L.value]]), l("button", {
422
423
  class: "tpl-comments-send-btn tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:duration-150 tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
423
- disabled: !L.value.trim() || h(P).isSubmitting.value,
424
+ disabled: !L.value.trim() || p(P).isSubmitting.value,
424
425
  onClick: Z
425
- }, [h(P).isSubmitting.value ? (e(), m(h(S), {
426
+ }, [p(P).isSubmitting.value ? (i(), f(p(S), {
426
427
  key: 0,
427
428
  class: "tpl-spinner",
428
429
  size: 16,
429
430
  "stroke-width": 2
430
- })) : (e(), m(h(w), {
431
+ })) : (i(), f(p(w), {
431
432
  key: 1,
432
433
  size: 16,
433
434
  "stroke-width": 2
434
435
  }))], 8, yt)]))])
435
- ])) : p("", !0)]),
436
+ ])) : g("", !0)]),
436
437
  _: 1
437
438
  }));
438
439
  }
@@ -0,0 +1,92 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { A as t, Dt as n, O as r, Ot as i, Y as a, _ as o, c as s, d as c, nt as l, r as u, s as d, u as f } from "./vue.runtime.esm-bundler-l0XAqiyv.js";
3
+ import { p } from "./dist-CTT6WYJ6.js";
4
+ import { t as m } from "./useI18n-C-TDeJBt.js";
5
+ //#region src/components/blocks/CountdownBlock.vue?vue&type=script&setup=true&lang.ts
6
+ var h = {
7
+ key: 0,
8
+ class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8 tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
9
+ }, g = {
10
+ key: 1,
11
+ class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-4 tpl:text-xs tpl:text-[var(--tpl-text-dim)] tpl:opacity-50"
12
+ }, _ = { class: "tpl:text-center" }, v = /*@__PURE__*/ o({
13
+ __name: "CountdownBlock",
14
+ props: {
15
+ block: {},
16
+ viewport: {}
17
+ },
18
+ setup(e) {
19
+ let o = e, { t: v } = m(), y = a(Date.now());
20
+ p(() => {
21
+ y.value = Date.now();
22
+ }, 1e3);
23
+ let b = d(() => {
24
+ if (!o.block.targetDate) return null;
25
+ let e = new Date(o.block.targetDate);
26
+ return isNaN(e.getTime()) ? null : e.getTime();
27
+ }), x = d(() => b.value ? y.value >= b.value : !1), S = d(() => {
28
+ if (!b.value || x.value) return {
29
+ days: 0,
30
+ hours: 0,
31
+ minutes: 0,
32
+ seconds: 0
33
+ };
34
+ let e = b.value - y.value, t = Math.floor(e / 1e3);
35
+ return {
36
+ days: Math.floor(t / 86400),
37
+ hours: Math.floor(t % 86400 / 3600),
38
+ minutes: Math.floor(t % 3600 / 60),
39
+ seconds: t % 60
40
+ };
41
+ }), C = d(() => {
42
+ let e = [];
43
+ return o.block.showDays && e.push({
44
+ value: String(S.value.days).padStart(2, "0"),
45
+ label: o.block.labelDays
46
+ }), o.block.showHours && e.push({
47
+ value: String(S.value.hours).padStart(2, "0"),
48
+ label: o.block.labelHours
49
+ }), o.block.showMinutes && e.push({
50
+ value: String(S.value.minutes).padStart(2, "0"),
51
+ label: o.block.labelMinutes
52
+ }), o.block.showSeconds && e.push({
53
+ value: String(S.value.seconds).padStart(2, "0"),
54
+ label: o.block.labelSeconds
55
+ }), e;
56
+ }), w = d(() => ({
57
+ backgroundColor: o.block.backgroundColor,
58
+ fontFamily: o.block.fontFamily || "inherit"
59
+ })), T = d(() => ({
60
+ fontSize: `${o.block.digitFontSize}px`,
61
+ fontWeight: "bold",
62
+ color: o.block.digitColor,
63
+ lineHeight: "1.2"
64
+ })), E = d(() => ({
65
+ fontSize: `${o.block.labelFontSize}px`,
66
+ color: o.block.labelColor,
67
+ marginTop: "4px"
68
+ })), D = d(() => ({
69
+ fontSize: `${o.block.digitFontSize}px`,
70
+ color: o.block.digitColor,
71
+ fontFamily: o.block.fontFamily || "inherit"
72
+ }));
73
+ return (a, o) => e.block.targetDate ? x.value && e.block.hideOnExpiry ? (r(), c("div", g, i(l(v).countdown.hidden), 1)) : x.value ? (r(), c("div", {
74
+ key: 2,
75
+ style: n(w.value),
76
+ class: "tpl:py-4 tpl:text-center"
77
+ }, [s("span", { style: n({
78
+ fontSize: `${e.block.digitFontSize}px`,
79
+ color: e.block.digitColor
80
+ }) }, i(e.block.expiredMessage), 5)], 4)) : (r(), c("div", {
81
+ key: 3,
82
+ style: n(w.value),
83
+ class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:py-4"
84
+ }, [(r(!0), c(u, null, t(C.value, (t, a) => (r(), c(u, { key: t.label }, [a > 0 ? (r(), c("span", {
85
+ key: 0,
86
+ style: n(D.value),
87
+ class: "tpl:self-start"
88
+ }, i(e.block.separator), 5)) : f("", !0), s("div", _, [s("div", { style: n(T.value) }, i(t.value), 5), s("div", { style: n(E.value) }, i(t.label), 5)])], 64))), 128))], 4)) : (r(), c("div", h, i(l(v).countdown.setDate), 1));
89
+ }
90
+ }), y = /* @__PURE__ */ e({ default: () => b }), b = v;
91
+ //#endregion
92
+ export { y as n, b as t };