@aswin.dev/editor 0.7.0 → 0.7.2

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 (182) hide show
  1. package/LICENSE +56 -0
  2. package/README.md +3 -3
  3. package/dist/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-EmQ19wiS.js} +37 -37
  4. package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-DeB0w_32.js} +67 -81
  5. package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-DoLD5Cde.js} +22 -22
  6. package/dist/{BlockA11yBadge-CXDLqkcJ.js → BlockA11yBadge-DkNbDvJA.js} +12 -12
  7. package/dist/CloudEditor-zo9PjjvY.js +1214 -0
  8. package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-BsXMY-8e.js} +21 -21
  9. package/dist/CommentsSidebar-DIWIa4rS.js +436 -0
  10. package/dist/CountdownBlock-BCi7-DAM.js +92 -0
  11. package/dist/CountdownToolbar-BuS8p5ju.js +210 -0
  12. package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-RDlnhL-6.js} +58 -58
  13. package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-BJ59h9ok.js} +2 -2
  14. package/dist/ModuleBrowserModal-b7HbpByz.js +206 -0
  15. package/dist/ModulePreviewCanvas-D__YlOLS.js +108 -0
  16. package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-Ca3vNY84.js} +87 -87
  17. package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-B1aYPO-6.js} +182 -182
  18. package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-BmEVMrkJ.js} +38 -38
  19. package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-ClovqI6h.js} +28 -28
  20. package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-DoqtH0cw.js} +45 -50
  21. package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-DQv2ZAiL.js} +75 -75
  22. package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-iIeYJYsj.js} +28 -28
  23. package/dist/{TitleEditor-fStSADI-.js → TitleEditor-CTDIwRF_.js} +68 -68
  24. package/dist/{TplModal-BwSfxIHf.js → TplModal-CBq1J1pG.js} +14 -14
  25. package/dist/{accessibility-e8JYu_zd.js → accessibility-BU09xZrQ.js} +1 -1
  26. package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-QkC6f5UE.js} +19 -5
  27. package/dist/bundle-stats.json +7 -7
  28. package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js → AccessibilityPanel-BeU8nz7A.js} +28 -28
  29. package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js.map → AccessibilityPanel-BeU8nz7A.js.map} +1 -1
  30. package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js → AiFeatureMenu-B2mhscyP.js} +21 -21
  31. package/dist/cdn/chunks/AiFeatureMenu-B2mhscyP.js.map +1 -0
  32. package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js → BlockA11yBadge-C4g77gF0.js} +11 -11
  33. package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js.map → BlockA11yBadge-C4g77gF0.js.map} +1 -1
  34. package/dist/{CloudEditor-BCz1ZTYC.js → cdn/chunks/CloudEditor-Btyr0b0_.js} +486 -475
  35. package/dist/cdn/chunks/CloudEditor-Btyr0b0_.js.map +1 -0
  36. package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js → CollaboratorBar-YBiIjiRh.js} +15 -15
  37. package/dist/cdn/chunks/CollaboratorBar-YBiIjiRh.js.map +1 -0
  38. package/dist/cdn/chunks/CountdownBlock-B06UZoWe.js +93 -0
  39. package/dist/cdn/chunks/CountdownBlock-B06UZoWe.js.map +1 -0
  40. package/dist/cdn/chunks/CountdownToolbar-C9XZr33O.js +212 -0
  41. package/dist/cdn/chunks/CountdownToolbar-C9XZr33O.js.map +1 -0
  42. package/dist/{ModuleBrowserModal-DrUFMTDx.js → cdn/chunks/ModuleBrowserModal-C2CDWKW6.js} +51 -62
  43. package/dist/cdn/chunks/ModuleBrowserModal-C2CDWKW6.js.map +1 -0
  44. package/dist/cdn/chunks/ModulePreviewCanvas-Drt8Evai.js +109 -0
  45. package/dist/cdn/chunks/ModulePreviewCanvas-Drt8Evai.js.map +1 -0
  46. package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js → NumberWithSuffix-Ty1bp9vB.js} +64 -64
  47. package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js.map → NumberWithSuffix-Ty1bp9vB.js.map} +1 -1
  48. package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js → ParagraphEditor-BA1WbHI7.js} +188 -188
  49. package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js.map → ParagraphEditor-BA1WbHI7.js.map} +1 -1
  50. package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js → RichTextEditorContent-BtWCA_Oc.js} +30 -30
  51. package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js.map → RichTextEditorContent-BtWCA_Oc.js.map} +1 -1
  52. package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js → SaveModuleDialog-AwL0tkCV.js} +21 -21
  53. package/dist/cdn/chunks/SaveModuleDialog-AwL0tkCV.js.map +1 -0
  54. package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js → TitleEditor-DbSyeixS.js} +65 -65
  55. package/dist/cdn/chunks/TitleEditor-DbSyeixS.js.map +1 -0
  56. package/dist/cdn/chunks/blockTypeIcons-pQIkxJzc.js +23 -0
  57. package/dist/cdn/chunks/blockTypeIcons-pQIkxJzc.js.map +1 -0
  58. package/dist/cdn/chunks/{de-D8CnZxV9.js → de-_tooy3Q8.js} +250 -2
  59. package/dist/cdn/chunks/de-_tooy3Q8.js.map +1 -0
  60. package/dist/cdn/chunks/{draggable-Bcb86AsV.js → draggable-C-1_gch3.js} +2 -2
  61. package/dist/cdn/chunks/{draggable-Bcb86AsV.js.map → draggable-C-1_gch3.js.map} +1 -1
  62. package/dist/cdn/chunks/{en-8FHaQv4V.js → en-CNqLoIm9.js} +250 -2
  63. package/dist/cdn/chunks/en-CNqLoIm9.js.map +1 -0
  64. package/dist/cdn/chunks/{extensions-DIxF31tA.js → extensions-BVKQw_sp.js} +107 -107
  65. package/dist/cdn/chunks/extensions-BVKQw_sp.js.map +1 -0
  66. package/dist/cdn/chunks/{features-DEMb13KS.js → features-DIBEo4xl.js} +3388 -2289
  67. package/dist/cdn/chunks/features-DIBEo4xl.js.map +1 -0
  68. package/dist/cdn/chunks/{icons-CsLTcirh.js → icons-C1Gg-ov-.js} +346 -54
  69. package/dist/cdn/chunks/icons-C1Gg-ov-.js.map +1 -0
  70. package/dist/cdn/chunks/{media-library-CVaNvhpM.js → media-library-BTF_Ko70.js} +985 -985
  71. package/dist/cdn/chunks/media-library-BTF_Ko70.js.map +1 -0
  72. package/dist/cdn/chunks/{quality-BaBfc54_.js → quality-C5AmotmP.js} +312 -312
  73. package/dist/cdn/chunks/quality-C5AmotmP.js.map +1 -0
  74. package/dist/cdn/chunks/{renderer-CUxvx7ro.js → renderer-D0L44Vlp.js} +236 -142
  75. package/dist/cdn/chunks/renderer-D0L44Vlp.js.map +1 -0
  76. package/dist/cdn/chunks/{src-CRaqN-p8.js → src-RKexlYjA.js} +161 -161
  77. package/dist/cdn/chunks/src-RKexlYjA.js.map +1 -0
  78. package/dist/cdn/chunks/styleConstants-PgmvNBzQ.js +57 -0
  79. package/dist/cdn/chunks/styleConstants-PgmvNBzQ.js.map +1 -0
  80. package/dist/cdn/chunks/styles-CQR6ed13.js +4976 -0
  81. package/dist/cdn/chunks/styles-CQR6ed13.js.map +1 -0
  82. package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js → tiptap-CDzAbF2j.js} +43 -43
  83. package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js.map → tiptap-CDzAbF2j.js.map} +1 -1
  84. package/dist/cdn/editor.css +1 -1
  85. package/dist/cdn/editor.js +211 -123
  86. package/dist/cdn/editor.js.map +1 -1
  87. package/dist/{check-Da05j8yl.js → check-DJrpDKO_.js} +1 -1
  88. package/dist/{chevron-down-R2uY34iD.js → chevron-down-C5oBUhT8.js} +1 -1
  89. package/dist/chevron-right-BqCptpdp.js +10 -0
  90. package/dist/{circle-alert-DZuGWPX-.js → circle-alert-ZQQc98HC.js} +1 -1
  91. package/dist/{clock-CRp2sIub.js → clock-ik2pRJKG.js} +1 -1
  92. package/dist/{cloud-DEk_b4CR.js → cloud-DJG4tb4_.js} +485 -427
  93. package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-ClREiSx3.js} +6 -6
  94. package/dist/{de-Brqvgr43.js → de-2LEvILeZ.js} +249 -1
  95. package/dist/{dist-Cp0zXPAD.js → dist-BHAeXaUY.js} +1 -1
  96. package/dist/{dist-BaQIYPsn.js → dist-BSJvAvH3.js} +1 -1
  97. package/dist/{dist-wzMIGj-D.js → dist-BeFnymxK.js} +1 -1
  98. package/dist/dist-Bmir0gYb.js +1167 -0
  99. package/dist/{dist-DDJIWTRY.js → dist-BvPgo-UK.js} +1 -1
  100. package/dist/{dist-BFawx6IS.js → dist-CPVBKMmd.js} +51 -51
  101. package/dist/dist-CivF9P8b.js +382 -0
  102. package/dist/{dist-D6uC2xhi.js → dist-Df4ie7vZ.js} +1 -1
  103. package/dist/{dist-us-RpCWN.js → dist-DxOoemkW.js} +1 -1
  104. package/dist/{dist-KoBJjK1G.js → dist-HEQ52gTJ.js} +1 -1
  105. package/dist/{dist-DjviJBCi.js → dist-b-XUqAoF.js} +1 -1
  106. package/dist/{dist-D90y8dvT.js → dist-kZfaVUpW.js} +3 -3
  107. package/dist/{dist-aRzjfSRN.js → dist-wfAedlzi.js} +1 -1
  108. package/dist/{en-WDVp87TE.js → en-D2RU2Poj.js} +249 -1
  109. package/dist/{extensions-CUcl9Ok4.js → extensions-BQ1xXx3d.js} +103 -103
  110. package/dist/{image-up-MBZKKg9p.js → image-up-DT7gcJLN.js} +1 -1
  111. package/dist/index.d.ts +102 -14
  112. package/dist/{info-CJEC7piy.js → info-BSPGcsSM.js} +1 -1
  113. package/dist/keys-CvX8D-8C.js +10 -0
  114. package/dist/{loader-circle-DsY5Yg33.js → loader-circle-Balo8p3d.js} +1 -1
  115. package/dist/{message-circle-yElBbR2C.js → message-circle-B39qAHxs.js} +1 -1
  116. package/dist/pencil-BZJPNYWR.js +10 -0
  117. package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-DwDqGUM0.js} +1 -1
  118. package/dist/{scan-line-D0vcUekt.js → scan-line-DlghmhNf.js} +1 -1
  119. package/dist/{send-DH4oDQqC.js → send-DDdhIRj8.js} +1 -1
  120. package/dist/{shield-check-CfJgs2Hd.js → shield-check-OSQ-JVTX.js} +1 -1
  121. package/dist/{sparkles-CvRXGqFs.js → sparkles-BN4a-CoF.js} +1 -1
  122. package/dist/style.css +1 -1
  123. package/dist/styleConstants-wWRbcuEK.js +55 -0
  124. package/dist/styles-CavWjvol.js +5487 -0
  125. package/dist/templatical-editor.js +211 -119
  126. package/dist/{text-align-start-BT9VUDxK.js → text-align-start-D1weisjS.js} +1 -1
  127. package/dist/{trash-2-DbP2Y6t2.js → trash-2-CMWvQ5KX.js} +1 -1
  128. package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-DyidRNX_.js} +1 -1
  129. package/dist/undo-2-Cg8I7obC.js +16 -0
  130. package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-BTTNBk5i.js} +2 -2
  131. package/dist/{useEditorCore-C6ost42Q.js → useEditorCore-BGnzcT7p.js} +2424 -2249
  132. package/dist/{useI18n-lb2DHDiu.js → useI18n-C2xQZ6K9.js} +2 -2
  133. package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-CfuZq2fF.js} +4 -4
  134. package/dist/{vue.runtime.esm-bundler-DpvJL-nX.js → vue.runtime.esm-bundler-CjauPXjj.js} +1 -1
  135. package/dist/{x-u2oVmjN_.js → x-CgIhNcT9.js} +1 -1
  136. package/package.json +15 -15
  137. package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
  138. package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
  139. package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
  140. package/dist/ModulePreviewCanvas-CHdOwV_4.js +0 -106
  141. package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js.map +0 -1
  142. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js +0 -1143
  143. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js.map +0 -1
  144. package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js.map +0 -1
  145. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js +0 -93
  146. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js.map +0 -1
  147. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
  148. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js.map +0 -1
  149. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js +0 -195
  150. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js.map +0 -1
  151. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js +0 -107
  152. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js.map +0 -1
  153. package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js.map +0 -1
  154. package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js.map +0 -1
  155. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js +0 -22
  156. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js.map +0 -1
  157. package/dist/cdn/chunks/de-D8CnZxV9.js.map +0 -1
  158. package/dist/cdn/chunks/en-8FHaQv4V.js.map +0 -1
  159. package/dist/cdn/chunks/extensions-DIxF31tA.js.map +0 -1
  160. package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
  161. package/dist/cdn/chunks/icons-CsLTcirh.js.map +0 -1
  162. package/dist/cdn/chunks/media-library-CVaNvhpM.js.map +0 -1
  163. package/dist/cdn/chunks/quality-BaBfc54_.js.map +0 -1
  164. package/dist/cdn/chunks/renderer-CUxvx7ro.js.map +0 -1
  165. package/dist/cdn/chunks/src-CRaqN-p8.js.map +0 -1
  166. package/dist/cdn/chunks/styleConstants-DP1VOca8.js +0 -57
  167. package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +0 -1
  168. package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
  169. package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
  170. package/dist/dist-B1IR0bpH.js +0 -326
  171. package/dist/dist-DJmnUmW9.js +0 -362
  172. package/dist/keys-ciNfSSGj.js +0 -10
  173. package/dist/styleConstants-fWzlIIwN.js +0 -55
  174. package/dist/styles-DEXEkBvg.js +0 -3176
  175. /package/dist/{_plugin-vue_export-helper-B0hnzhyu.js → _plugin-vue_export-helper-Bwh4ceeO.js} +0 -0
  176. /package/dist/{de-DCaaCE5s.js → de-D2npYjrZ.js} +0 -0
  177. /package/dist/{dist-iLBdeBDR.js → dist-DvHLtWVP.js} +0 -0
  178. /package/dist/{emojiData-PQyVa4bU.js → emojiData-DvQBBzmO.js} +0 -0
  179. /package/dist/{en-DXCyK4-X.js → en-ib-4h3_o.js} +0 -0
  180. /package/dist/{formatRelativeTime-BOEf47hq.js → formatRelativeTime-CFDZnEIs.js} +0 -0
  181. /package/dist/{liquid.browser-CdMv1BTn.js → liquid.browser-7Rv0QDiO.js} +0 -0
  182. /package/dist/{readableTextColor-CY3SiRnt.js → readableTextColor-C_9OpzBw.js} +0 -0
@@ -1,8 +1,8 @@
1
- import { M as e, Mt as t, Ot as n, P as r, S as i, _ as a, d as o, g as s, h as c, it as l, m as u, p as d } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
2
- import "./useEditorCore-C6ost42Q.js";
3
- import { t as f } from "./createLucideIcon-C3pa2siy.js";
4
- import { n as p } from "./useCloudI18n-BuIwR6OE.js";
5
- import { t as m } from "./readableTextColor-CY3SiRnt.js";
1
+ import { C as e, F as t, Ft as n, N as r, _ as i, f as a, g as o, h as s, jt as c, m as l, st as u, v as d } from "./vue.runtime.esm-bundler-CjauPXjj.js";
2
+ import "./useEditorCore-BGnzcT7p.js";
3
+ import { t as f } from "./createLucideIcon-ClREiSx3.js";
4
+ import { n as p } from "./useCloudI18n-BTTNBk5i.js";
5
+ import { t as m } from "./readableTextColor-C_9OpzBw.js";
6
6
  var h = f("wifi-off", [
7
7
  ["path", {
8
8
  d: "M12 20h.01",
@@ -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__ */ i({
55
+ }, b = ["title"], x = ["title"], S = 3, C = /* @__PURE__ */ e({
56
56
  __name: "CollaboratorBar",
57
57
  props: {
58
58
  collaborators: {},
59
59
  isConnected: { type: Boolean }
60
60
  },
61
- setup(i) {
62
- let f = i, { t: C } = p(), w = d(() => f.collaborators.slice(0, S)), T = d(() => f.collaborators.slice(S)), E = d(() => T.value.length), D = d(() => T.value.map((e) => e.name).join("\n"));
61
+ setup(e) {
62
+ let f = e, { t: C } = p(), w = l(() => f.collaborators.slice(0, S)), T = l(() => f.collaborators.slice(S)), E = l(() => T.value.length), D = l(() => 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 (d, f) => (e(), a("div", _, [u("div", {
67
+ return (l, f) => (r(), d("div", _, [s("div", {
68
68
  class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-[11px]",
69
- style: n({ color: i.isConnected ? "var(--tpl-success)" : "var(--tpl-text-muted)" }),
70
- title: i.isConnected ? l(C).collaboration.connected : l(C).collaboration.disconnected
71
- }, [i.isConnected ? (e(), c(l(g), {
69
+ style: c({ color: e.isConnected ? "var(--tpl-success)" : "var(--tpl-text-muted)" }),
70
+ title: e.isConnected ? u(C).collaboration.connected : u(C).collaboration.disconnected
71
+ }, [e.isConnected ? (r(), o(u(g), {
72
72
  key: 0,
73
73
  size: 12,
74
74
  "stroke-width": 2
75
- })) : (e(), c(l(h), {
75
+ })) : (r(), o(u(h), {
76
76
  key: 1,
77
77
  size: 12,
78
78
  "stroke-width": 2
79
- }))], 12, v), i.collaborators.length > 0 ? (e(), a("div", y, [(e(!0), a(o, null, r(w.value, (r) => (e(), a("div", {
80
- key: r.id,
79
+ }))], 12, v), e.collaborators.length > 0 ? (r(), d("div", y, [(r(!0), d(a, null, t(w.value, (e) => (r(), d("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: n({
83
- backgroundColor: r.color,
84
- color: l(m)(r.color)
82
+ style: c({
83
+ backgroundColor: e.color,
84
+ color: u(m)(e.color)
85
85
  }),
86
- title: r.name
87
- }, t(O(r.name)), 13, b))), 128)), E.value > 0 ? (e(), a("div", {
86
+ title: e.name
87
+ }, n(O(e.name)), 13, b))), 128)), E.value > 0 ? (r(), d("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
- }, " +" + t(E.value), 9, x)) : s("", !0)])) : s("", !0)]));
91
+ }, " +" + n(E.value), 9, x)) : i("", !0)])) : i("", !0)]));
92
92
  }
93
93
  });
94
94
  //#endregion
@@ -0,0 +1,436 @@
1
+ import { At as e, C as t, F as n, Ft as r, N as i, U as a, V as o, W as s, _ as c, b as ee, c as l, et as u, f as d, g as f, h as p, jt as te, k as ne, m, st as h, t as g, v as _, x as v } from "./vue.runtime.esm-bundler-CjauPXjj.js";
2
+ import { A as y, i as re, m as ie, u as ae } from "./keys-CvX8D-8C.js";
3
+ import { t as oe } from "./useI18n-C2xQZ6K9.js";
4
+ import { t as b } from "./createLucideIcon-ClREiSx3.js";
5
+ import { t as se } from "./check-DJrpDKO_.js";
6
+ import { t as ce } from "./chevron-down-C5oBUhT8.js";
7
+ import { t as x } from "./loader-circle-Balo8p3d.js";
8
+ import { t as S } from "./message-circle-B39qAHxs.js";
9
+ import { t as C } from "./pencil-BZJPNYWR.js";
10
+ import { t as w } from "./send-DDdhIRj8.js";
11
+ import { t as T } from "./trash-2-CMWvQ5KX.js";
12
+ import { t as E } from "./x-CgIhNcT9.js";
13
+ import { t as le } from "./_plugin-vue_export-helper-Bwh4ceeO.js";
14
+ import { n as ue } from "./useCloudI18n-BTTNBk5i.js";
15
+ import { t as de } from "./formatRelativeTime-CFDZnEIs.js";
16
+ var fe = b("chevron-up", [["path", {
17
+ d: "m18 15-6-6-6 6",
18
+ key: "153udz"
19
+ }]]), pe = b("circle-check", [["circle", {
20
+ cx: "12",
21
+ cy: "12",
22
+ r: "10",
23
+ key: "1mglay"
24
+ }], ["path", {
25
+ d: "m9 12 2 2 4-4",
26
+ key: "dzmm74"
27
+ }]]), me = b("reply", [["path", {
28
+ d: "M20 18v-2a4 4 0 0 0-4-4H4",
29
+ key: "5vmcpk"
30
+ }], ["path", {
31
+ d: "m9 17-5-5 5-5",
32
+ key: "nvlc11"
33
+ }]]), he = {
34
+ key: 0,
35
+ 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)]"
36
+ }, ge = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, _e = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, ve = {
37
+ key: 0,
38
+ 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)]"
39
+ }, ye = { class: "tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2" }, be = { class: "tpl:flex-1 tpl:overflow-y-auto" }, xe = {
40
+ key: 0,
41
+ class: "tpl:flex tpl:h-full tpl:items-center tpl:justify-center"
42
+ }, Se = {
43
+ key: 1,
44
+ class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:px-6 tpl:text-center"
45
+ }, Ce = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, we = {
46
+ key: 2,
47
+ class: "tpl:flex tpl:flex-col tpl:gap-3 tpl:p-3"
48
+ }, Te = { class: "tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3" }, Ee = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, De = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, Oe = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, ke = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Ae = {
49
+ key: 0,
50
+ class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
51
+ }, je = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, Me = ["title", "onClick"], Ne = ["title", "onClick"], Pe = ["title", "onClick"], Fe = {
52
+ key: 0,
53
+ class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-primary)]"
54
+ }, Ie = {
55
+ key: 0,
56
+ 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)]"
57
+ }, Le = ["onClick"], Re = {
58
+ key: 2,
59
+ class: "tpl:mt-2"
60
+ }, ze = ["onKeydown"], Be = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, Ve = ["disabled", "onClick"], He = {
61
+ key: 3,
62
+ class: "tpl:mt-1.5 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
63
+ }, Ue = {
64
+ key: 4,
65
+ 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)]"
66
+ }, We = { class: "tpl:flex-1" }, Ge = ["onClick"], Ke = {
67
+ key: 5,
68
+ class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2"
69
+ }, qe = ["title", "onClick"], Je = ["onClick"], Ye = {
70
+ key: 0,
71
+ class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
72
+ }, Xe = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Ze = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, Qe = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, $e = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, et = {
73
+ key: 0,
74
+ class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
75
+ }, tt = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, nt = ["title", "onClick"], rt = ["title", "onClick"], it = {
76
+ key: 0,
77
+ class: "tpl:mt-1.5"
78
+ }, at = ["onKeydown"], ot = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, st = ["disabled", "onClick"], ct = {
79
+ key: 1,
80
+ class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
81
+ }, lt = {
82
+ key: 2,
83
+ 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)]"
84
+ }, ut = { class: "tpl:flex-1" }, dt = ["onClick"], ft = {
85
+ key: 0,
86
+ class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
87
+ }, pt = { class: "tpl:flex tpl:items-end tpl:gap-2" }, mt = ["placeholder", "onKeydown"], ht = { class: "tpl:flex tpl:shrink-0 tpl:flex-col tpl:gap-1" }, gt = ["disabled", "onClick"], _t = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, vt = {
88
+ key: 0,
89
+ 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)]"
90
+ }, yt = {
91
+ key: 1,
92
+ 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)]"
93
+ }, bt = ["placeholder", "disabled"], xt = ["disabled"], D = /* @__PURE__ */ le(/* @__PURE__ */ t({
94
+ __name: "CommentsSidebar",
95
+ props: { visible: { type: Boolean } },
96
+ emits: ["close", "filterBlock"],
97
+ setup(t, { expose: b, emit: le }) {
98
+ let D = t, O = le, { format: k } = oe(), { t: A } = ue(), j = y(ie, "CommentsSidebar"), St = y(re, "CommentsSidebar"), M = y(ae, "CommentsSidebar"), N = u("unresolved"), P = u(null), F = u(""), I = u(null), L = u(""), R = u(null), z = u(""), B = u(/* @__PURE__ */ new Set()), V = u(null), H = u(null), Ct = m(() => St.userConfig?.id ?? null), wt = m(() => {
99
+ let e = /* @__PURE__ */ new Set();
100
+ for (let t of j.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);
101
+ return e;
102
+ });
103
+ function Tt(e) {
104
+ return e ? !wt.value.has(e) : !1;
105
+ }
106
+ let Et = m(() => N.value !== "block" || !P.value ? !1 : !(j.savedBlockIds?.value.has(P.value) ?? !0)), U = m(() => {
107
+ let e = M.comments.value;
108
+ return N.value === "unresolved" ? e = e.filter((e) => !e.resolved_at) : N.value === "block" && P.value && (e = e.filter((e) => e.block_id === P.value)), e;
109
+ });
110
+ o(() => D.visible, (e) => {
111
+ e && M.loadComments();
112
+ }), o(() => j.state.selectedBlockId, (e) => {
113
+ N.value === "block" && e && (P.value = e);
114
+ });
115
+ function W(e, t) {
116
+ N.value = e, P.value = e === "block" ? t ?? null : null;
117
+ }
118
+ function Dt(e) {
119
+ W("block", e), O("filterBlock", e);
120
+ }
121
+ function Ot(e) {
122
+ B.value.has(e) ? B.value.delete(e) : B.value.add(e);
123
+ }
124
+ function kt(e) {
125
+ I.value = e, L.value = "", R.value = null, B.value.has(e) || B.value.add(e);
126
+ }
127
+ function At() {
128
+ I.value = null, L.value = "";
129
+ }
130
+ function G(e) {
131
+ R.value = e.id, z.value = e.body, I.value = null;
132
+ }
133
+ function K() {
134
+ R.value = null, z.value = "";
135
+ }
136
+ function q(e) {
137
+ V.value = e;
138
+ }
139
+ function J() {
140
+ V.value = null;
141
+ }
142
+ async function Y() {
143
+ let e = F.value.trim();
144
+ if (!e) return;
145
+ let t = N.value === "block" ? P.value : void 0;
146
+ await M.addComment(e, t ?? void 0), F.value = "";
147
+ }
148
+ async function X(e) {
149
+ let t = L.value.trim();
150
+ if (!t) return;
151
+ let n = M.comments.value.find((t) => t.id === e);
152
+ await M.addComment(t, n?.block_id ?? void 0, e), I.value = null, L.value = "";
153
+ }
154
+ async function Z(e) {
155
+ let t = z.value.trim();
156
+ t && (await M.editComment(e, t), R.value = null, z.value = "");
157
+ }
158
+ async function jt(e) {
159
+ await M.removeComment(e), V.value = null;
160
+ }
161
+ async function Mt(e) {
162
+ await M.toggleResolve(e);
163
+ }
164
+ function Q(e) {
165
+ return e.author_identifier === Ct.value;
166
+ }
167
+ function Nt(e) {
168
+ return de(e, A.snapshotHistory) ?? e;
169
+ }
170
+ function Pt(e) {
171
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Y());
172
+ }
173
+ function Ft(e, t) {
174
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), X(t));
175
+ }
176
+ function $(e, t) {
177
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Z(t)), e.key === "Escape" && K();
178
+ }
179
+ function It() {
180
+ ne(() => {
181
+ H.value?.focus();
182
+ });
183
+ }
184
+ return b({
185
+ filterByBlock: Dt,
186
+ focusNewComment: It
187
+ }), (o, u) => (i(), f(g, {
188
+ "enter-active-class": "tpl-comments-slide-enter-active",
189
+ "enter-from-class": "tpl:translate-x-full",
190
+ "enter-to-class": "tpl:translate-x-0",
191
+ "leave-active-class": "tpl-comments-slide-leave-active",
192
+ "leave-from-class": "tpl:translate-x-0",
193
+ "leave-to-class": "tpl:translate-x-full"
194
+ }, {
195
+ default: a(() => [t.visible ? (i(), _("div", he, [
196
+ p("div", ge, [p("div", _e, [
197
+ v(h(S), {
198
+ size: 13,
199
+ "stroke-width": 2
200
+ }),
201
+ p("span", null, r(h(A).comments.title), 1),
202
+ h(M).unresolvedCount.value > 0 ? (i(), _("span", ve, r(h(M).unresolvedCount.value), 1)) : c("", !0)
203
+ ]), p("button", {
204
+ class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
205
+ onClick: u[0] ||= (e) => O("close")
206
+ }, [v(h(E), {
207
+ size: 14,
208
+ "stroke-width": 2
209
+ })])]),
210
+ p("div", ye, [
211
+ p("button", {
212
+ class: e(["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", N.value === "unresolved" ? "tpl-comment-filter--active" : ""]),
213
+ onClick: u[1] ||= (e) => W("unresolved")
214
+ }, r(h(A).comments.filterUnresolved), 3),
215
+ p("button", {
216
+ class: e(["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", N.value === "all" ? "tpl-comment-filter--active" : ""]),
217
+ onClick: u[2] ||= (e) => W("all")
218
+ }, r(h(A).comments.filterAll), 3),
219
+ h(j).state.selectedBlockId ? (i(), _("button", {
220
+ key: 0,
221
+ class: e(["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", N.value === "block" ? "tpl-comment-filter--active" : ""]),
222
+ onClick: u[3] ||= (e) => W("block", h(j).state.selectedBlockId ?? void 0)
223
+ }, r(h(A).comments.filterBlock), 3)) : c("", !0)
224
+ ]),
225
+ p("div", be, [h(M).isLoading.value ? (i(), _("div", xe, [v(h(x), {
226
+ class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
227
+ size: 24,
228
+ "stroke-width": 2
229
+ })])) : U.value.length === 0 ? (i(), _("div", Se, [v(h(S), {
230
+ size: 32,
231
+ "stroke-width": 1.5,
232
+ class: "tpl:text-[var(--tpl-text-dim)]"
233
+ }), p("p", Ce, r(N.value === "all" ? h(A).comments.noCommentsHint : h(A).comments.noComments), 1)])) : (i(), _("div", we, [(i(!0), _(d, null, n(U.value, (t) => (i(), _("div", {
234
+ key: t.id,
235
+ class: "tpl-comment-thread"
236
+ }, [
237
+ p("div", Te, [
238
+ p("div", Ee, [p("div", De, [
239
+ p("span", Oe, r(Q(t) ? h(A).comments.ownedByYou : t.author_name), 1),
240
+ p("span", ke, r(Nt(t.created_at)), 1),
241
+ t.updated_at === t.created_at ? c("", !0) : (i(), _("span", Ae, " (" + r(h(A).comments.edited) + ") ", 1))
242
+ ]), p("div", je, [
243
+ p("button", {
244
+ class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
245
+ title: t.resolved_at ? h(A).comments.unresolve : h(A).comments.resolve,
246
+ onClick: (e) => Mt(t.id)
247
+ }, [v(h(pe), {
248
+ size: 13,
249
+ "stroke-width": 2,
250
+ class: "tpl-resolve-icon",
251
+ style: te({ color: t.resolved_at ? "var(--tpl-primary)" : void 0 })
252
+ }, null, 8, ["style"])], 8, Me),
253
+ Q(t) ? (i(), _("button", {
254
+ key: 0,
255
+ class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
256
+ title: h(A).comments.edit,
257
+ onClick: (e) => G(t)
258
+ }, [v(h(C), {
259
+ size: 12,
260
+ "stroke-width": 2
261
+ })], 8, Ne)) : c("", !0),
262
+ Q(t) ? (i(), _("button", {
263
+ key: 1,
264
+ class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
265
+ title: h(A).comments.delete,
266
+ onClick: (e) => q(t.id)
267
+ }, [v(h(T), {
268
+ size: 12,
269
+ "stroke-width": 2
270
+ })], 8, Pe)) : c("", !0)
271
+ ])]),
272
+ v(g, { name: "tpl-resolve" }, {
273
+ default: a(() => [t.resolved_at ? (i(), _("div", Fe, [v(h(se), {
274
+ size: 10,
275
+ "stroke-width": 2.5
276
+ }), p("span", null, r(h(k)(h(A).comments.resolvedBy, { name: t.resolved_by_name ?? "" })), 1)])) : c("", !0)]),
277
+ _: 2
278
+ }, 1024),
279
+ t.block_id && Tt(t.block_id) ? (i(), _("span", Ie, r(h(A).comments.missingBlock), 1)) : t.block_id ? (i(), _("button", {
280
+ key: 1,
281
+ 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)]",
282
+ onClick: (e) => h(j).selectBlock(t.block_id ?? "")
283
+ }, " Block ", 8, Le)) : c("", !0),
284
+ R.value === t.id ? (i(), _("div", Re, [s(p("textarea", {
285
+ "onUpdate:modelValue": u[4] ||= (e) => z.value = e,
286
+ 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)]",
287
+ rows: "3",
288
+ onKeydown: (e) => $(e, t.id)
289
+ }, null, 40, ze), [[l, z.value]]), p("div", Be, [p("button", {
290
+ 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)]",
291
+ disabled: !z.value.trim() || h(M).isSubmitting.value,
292
+ onClick: (e) => Z(t.id)
293
+ }, r(h(A).comments.save), 9, Ve), p("button", {
294
+ 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)]",
295
+ onClick: u[5] ||= (e) => K()
296
+ }, r(h(A).comments.cancel), 1)])])) : (i(), _("p", He, r(t.body), 1)),
297
+ V.value === t.id ? (i(), _("div", Ue, [
298
+ p("span", We, r(h(A).comments.deleteConfirm), 1),
299
+ p("button", {
300
+ 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)]",
301
+ onClick: (e) => jt(t.id)
302
+ }, r(h(A).comments.delete), 9, Ge),
303
+ p("button", {
304
+ class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
305
+ onClick: u[6] ||= (e) => J()
306
+ }, r(h(A).comments.cancel), 1)
307
+ ])) : c("", !0),
308
+ R.value !== t.id && V.value !== t.id ? (i(), _("div", Ke, [p("button", {
309
+ class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
310
+ title: h(A).comments.reply,
311
+ onClick: (e) => kt(t.id)
312
+ }, [v(h(me), {
313
+ size: 13,
314
+ "stroke-width": 2,
315
+ class: "tpl:text-[var(--tpl-primary)]"
316
+ })], 8, qe), (t.replies?.length ?? 0) > 0 ? (i(), _("button", {
317
+ key: 0,
318
+ 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)]",
319
+ onClick: (e) => Ot(t.id)
320
+ }, [B.value.has(t.id) ? (i(), f(h(fe), {
321
+ key: 0,
322
+ size: 11,
323
+ "stroke-width": 2
324
+ })) : (i(), f(h(ce), {
325
+ key: 1,
326
+ size: 11,
327
+ "stroke-width": 2
328
+ })), ee(" " + r((t.replies?.length ?? 0) === 1 ? h(k)(h(A).comments.replyOne, { count: String(t.replies?.length ?? 0) }) : h(k)(h(A).comments.replyMany, { count: String(t.replies?.length ?? 0) })), 1)], 8, Je)) : c("", !0)])) : c("", !0)
329
+ ]),
330
+ v(g, { name: "tpl-replies" }, {
331
+ default: a(() => [B.value.has(t.id) && (t.replies?.length ?? 0) > 0 ? (i(), _("div", Ye, [(i(!0), _(d, null, n(t.replies, (n, a) => (i(), _("div", {
332
+ key: n.id,
333
+ class: e(["tpl-comment-reply-card tpl:relative tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-2.5", a < (t.replies?.length ?? 0) - 1 ? "tpl:mb-2" : ""])
334
+ }, [
335
+ p("div", Xe, [p("div", Ze, [
336
+ p("span", Qe, r(Q(n) ? h(A).comments.ownedByYou : n.author_name), 1),
337
+ p("span", $e, r(Nt(n.created_at)), 1),
338
+ n.updated_at === n.created_at ? c("", !0) : (i(), _("span", et, " (" + r(h(A).comments.edited) + ") ", 1))
339
+ ]), p("div", tt, [Q(n) ? (i(), _("button", {
340
+ key: 0,
341
+ class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
342
+ title: h(A).comments.edit,
343
+ onClick: (e) => G(n)
344
+ }, [v(h(C), {
345
+ size: 11,
346
+ "stroke-width": 2
347
+ })], 8, nt)) : c("", !0), Q(n) ? (i(), _("button", {
348
+ key: 1,
349
+ class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
350
+ title: h(A).comments.delete,
351
+ onClick: (e) => q(n.id)
352
+ }, [v(h(T), {
353
+ size: 11,
354
+ "stroke-width": 2
355
+ })], 8, rt)) : c("", !0)])]),
356
+ R.value === n.id ? (i(), _("div", it, [s(p("textarea", {
357
+ "onUpdate:modelValue": u[7] ||= (e) => z.value = e,
358
+ 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)]",
359
+ rows: "2",
360
+ onKeydown: (e) => $(e, n.id)
361
+ }, null, 40, at), [[l, z.value]]), p("div", ot, [p("button", {
362
+ 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)]",
363
+ disabled: !z.value.trim() || h(M).isSubmitting.value,
364
+ onClick: (e) => Z(n.id)
365
+ }, r(h(A).comments.save), 9, st), p("button", {
366
+ class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
367
+ onClick: u[8] ||= (e) => K()
368
+ }, r(h(A).comments.cancel), 1)])])) : (i(), _("p", ct, r(n.body), 1)),
369
+ V.value === n.id ? (i(), _("div", lt, [
370
+ p("span", ut, r(h(A).comments.deleteConfirm), 1),
371
+ p("button", {
372
+ 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)]",
373
+ onClick: (e) => jt(n.id)
374
+ }, r(h(A).comments.delete), 9, dt),
375
+ p("button", {
376
+ class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
377
+ onClick: u[9] ||= (e) => J()
378
+ }, r(h(A).comments.cancel), 1)
379
+ ])) : c("", !0)
380
+ ], 2))), 128))])) : c("", !0)]),
381
+ _: 2
382
+ }, 1024),
383
+ v(g, { name: "tpl-replies" }, {
384
+ default: a(() => [I.value === t.id ? (i(), _("div", ft, [p("div", pt, [s(p("textarea", {
385
+ "onUpdate:modelValue": u[10] ||= (e) => L.value = e,
386
+ 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)]",
387
+ placeholder: h(A).comments.replyPlaceholder,
388
+ rows: "2",
389
+ onKeydown: (e) => Ft(e, t.id)
390
+ }, null, 40, mt), [[l, L.value]]), p("div", ht, [p("button", {
391
+ 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)]",
392
+ disabled: !L.value.trim() || h(M).isSubmitting.value,
393
+ onClick: (e) => X(t.id)
394
+ }, [v(h(w), {
395
+ size: 14,
396
+ "stroke-width": 2
397
+ })], 8, gt), p("button", {
398
+ 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)]",
399
+ onClick: u[11] ||= (e) => At()
400
+ }, [v(h(E), {
401
+ size: 14,
402
+ "stroke-width": 2
403
+ })])])])])) : c("", !0)]),
404
+ _: 2
405
+ }, 1024)
406
+ ]))), 128))]))]),
407
+ p("div", _t, [Et.value ? (i(), _("div", vt, r(h(A).comments.saveTemplateFirst), 1)) : (i(), _("div", yt, [s(p("textarea", {
408
+ ref_key: "newCommentInput",
409
+ ref: H,
410
+ "onUpdate:modelValue": u[12] ||= (e) => F.value = e,
411
+ 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)]",
412
+ placeholder: h(A).comments.placeholder,
413
+ disabled: h(M).isSubmitting.value,
414
+ rows: "2",
415
+ onKeydown: Pt
416
+ }, null, 40, bt), [[l, F.value]]), p("button", {
417
+ 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)]",
418
+ disabled: !F.value.trim() || h(M).isSubmitting.value,
419
+ onClick: Y
420
+ }, [h(M).isSubmitting.value ? (i(), f(h(x), {
421
+ key: 0,
422
+ class: "tpl-spinner",
423
+ size: 16,
424
+ "stroke-width": 2
425
+ })) : (i(), f(h(w), {
426
+ key: 1,
427
+ size: 16,
428
+ "stroke-width": 2
429
+ }))], 8, xt)]))])
430
+ ])) : c("", !0)]),
431
+ _: 1
432
+ }));
433
+ }
434
+ }), [["__scopeId", "data-v-5f25dfd0"]]);
435
+ //#endregion
436
+ export { D as default };
@@ -0,0 +1,92 @@
1
+ import { r as e } from "./rolldown-runtime-BZGGJVDF.js";
2
+ import { C as t, F as n, Ft as r, N as i, _ as a, et as o, f as s, h as c, jt as l, m as u, st as d, v as f } from "./vue.runtime.esm-bundler-CjauPXjj.js";
3
+ import { c as p } from "./dist-CivF9P8b.js";
4
+ import { t as m } from "./useI18n-C2xQZ6K9.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__ */ t({
13
+ __name: "CountdownBlock",
14
+ props: {
15
+ block: {},
16
+ viewport: {}
17
+ },
18
+ setup(e) {
19
+ let t = e, { t: v } = m(), y = o(Date.now());
20
+ p(() => {
21
+ y.value = Date.now();
22
+ }, 1e3);
23
+ let b = u(() => {
24
+ if (!t.block.targetDate) return null;
25
+ let e = new Date(t.block.targetDate);
26
+ return isNaN(e.getTime()) ? null : e.getTime();
27
+ }), x = u(() => b.value ? y.value >= b.value : !1), S = u(() => {
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 = u(() => {
42
+ let e = [];
43
+ return t.block.showDays && e.push({
44
+ value: String(S.value.days).padStart(2, "0"),
45
+ label: t.block.labelDays
46
+ }), t.block.showHours && e.push({
47
+ value: String(S.value.hours).padStart(2, "0"),
48
+ label: t.block.labelHours
49
+ }), t.block.showMinutes && e.push({
50
+ value: String(S.value.minutes).padStart(2, "0"),
51
+ label: t.block.labelMinutes
52
+ }), t.block.showSeconds && e.push({
53
+ value: String(S.value.seconds).padStart(2, "0"),
54
+ label: t.block.labelSeconds
55
+ }), e;
56
+ }), w = u(() => ({
57
+ backgroundColor: t.block.backgroundColor,
58
+ fontFamily: t.block.fontFamily || "inherit"
59
+ })), T = u(() => ({
60
+ fontSize: `${t.block.digitFontSize}px`,
61
+ fontWeight: "bold",
62
+ color: t.block.digitColor,
63
+ lineHeight: "1.2"
64
+ })), E = u(() => ({
65
+ fontSize: `${t.block.labelFontSize}px`,
66
+ color: t.block.labelColor,
67
+ marginTop: "4px"
68
+ })), D = u(() => ({
69
+ fontSize: `${t.block.digitFontSize}px`,
70
+ color: t.block.digitColor,
71
+ fontFamily: t.block.fontFamily || "inherit"
72
+ }));
73
+ return (t, o) => e.block.targetDate ? x.value && e.block.hideOnExpiry ? (i(), f("div", g, r(d(v).countdown.hidden), 1)) : x.value ? (i(), f("div", {
74
+ key: 2,
75
+ style: l(w.value),
76
+ class: "tpl:py-4 tpl:text-center"
77
+ }, [c("span", { style: l({
78
+ fontSize: `${e.block.digitFontSize}px`,
79
+ color: e.block.digitColor
80
+ }) }, r(e.block.expiredMessage), 5)], 4)) : (i(), f("div", {
81
+ key: 3,
82
+ style: l(w.value),
83
+ class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:py-4"
84
+ }, [(i(!0), f(s, null, n(C.value, (t, n) => (i(), f(s, { key: t.label }, [n > 0 ? (i(), f("span", {
85
+ key: 0,
86
+ style: l(D.value),
87
+ class: "tpl:self-start"
88
+ }, r(e.block.separator), 5)) : a("", !0), c("div", _, [c("div", { style: l(T.value) }, r(t.value), 5), c("div", { style: l(E.value) }, r(t.label), 5)])], 64))), 128))], 4)) : (i(), f("div", h, r(d(v).countdown.setDate), 1));
89
+ }
90
+ }), y = /* @__PURE__ */ e({ default: () => b }), b = v;
91
+ //#endregion
92
+ export { y as n, b as t };