@templatical/editor 0.19.0 → 0.21.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 (189) hide show
  1. package/README.md +1 -0
  2. package/dist/{AiChatSidebar-DAQTFuvi.js → AiChatSidebar-K_AehWc-.js} +9 -9
  3. package/dist/{AiFeatureMenu-aFSO20PR.js → AiFeatureMenu-CPdNpHpZ.js} +6 -6
  4. package/dist/{BlockIssueBadge-BQmq1bxn.js → BlockIssueBadge-Dmj9rVra.js} +4 -4
  5. package/dist/{CloudEditor-D0K-m1GA.js → CloudEditor-3a7mqMhe.js} +263 -315
  6. package/dist/{CollaboratorBar-CJO3l6Dt.js → CollaboratorBar-Ds0YZWzV.js} +3 -3
  7. package/dist/{ColorPicker-BsgpTJqK.js → ColorPicker-s9GHXjZs.js} +4 -4
  8. package/dist/CommentsSidebar-DvNEdugN.js +435 -0
  9. package/dist/{CountdownBlock-Bn5w7C-p.js → CountdownBlock-BUHYIAe9.js} +1 -1
  10. package/dist/{CountdownToolbar-PJI3ffi1.js → CountdownToolbar-DPRcv3Fu.js} +3 -4
  11. package/dist/{DesignReferenceSidebar-QfAV8XT9.js → DesignReferenceSidebar-DNmK3dxp.js} +8 -8
  12. package/dist/{IssuesPanel-CTjRgz8w.js → IssuesPanel-CEnEGFtd.js} +7 -7
  13. package/dist/{MergeTagSuggestion-DCuaSOPQ.js → MergeTagSuggestion-DMe4rqn0.js} +2 -2
  14. package/dist/NumberWithSuffix-CCPN_oCh.js +121 -0
  15. package/dist/{ParagraphEditor-Cf75UfSo.js → ParagraphEditor-CkwBirNl.js} +47 -47
  16. package/dist/{RichTextEditorContent-MdaLz6Q3.js → RichTextEditorContent-FbnWsh46.js} +6 -6
  17. package/dist/SaveBlockDialog-Cc5BSUBx.js +264 -0
  18. package/dist/SavedBlockPreviewCanvas-ubttfmKr.js +109 -0
  19. package/dist/SavedBlocksBrowserModal-LkY_U3lY.js +323 -0
  20. package/dist/SavedBlocksPanels-CET0zvH6.js +36 -0
  21. package/dist/SavedBlocksPickBar-poGS4PoI.js +52 -0
  22. package/dist/{SnapshotHistory-C_Y1LzAY.js → SnapshotHistory-BvF5IXn1.js} +8 -8
  23. package/dist/{TemplateScoringPanel-DikuKc6i.js → TemplateScoringPanel-ifGGGWs5.js} +14 -14
  24. package/dist/{TestEmailModal-BW8aTtzf.js → TestEmailModal-BRaM_eko.js} +4 -4
  25. package/dist/{TitleEditor-CCUkbRN0.js → TitleEditor-Bhgzh-iQ.js} +11 -11
  26. package/dist/{TplModal-DoOwUKlT.js → TplModal-BA-Zsg0O.js} +3 -3
  27. package/dist/{blockTypeIcons-BlPKjD7M.js → blockTypeIcons-B1-Yzp-a.js} +6 -6
  28. package/dist/bundle-stats.json +8 -8
  29. package/dist/{ca-DbWoy4rG.js → ca-BBgad6y5.js} +50 -3
  30. package/dist/cdn/chunks/{AiFeatureMenu-RwJiaPXZ.js → AiFeatureMenu--PdArSnv.js} +7 -7
  31. package/dist/cdn/chunks/{AiFeatureMenu-RwJiaPXZ.js.map → AiFeatureMenu--PdArSnv.js.map} +1 -1
  32. package/dist/cdn/chunks/{BlockIssueBadge-DM-TDKbr.js → BlockIssueBadge-DMSd0SIl.js} +4 -4
  33. package/dist/cdn/chunks/{BlockIssueBadge-DM-TDKbr.js.map → BlockIssueBadge-DMSd0SIl.js.map} +1 -1
  34. package/dist/cdn/chunks/{CloudEditor-Dufl354p.js → CloudEditor-DnTfI5GU.js} +273 -325
  35. package/dist/cdn/chunks/CloudEditor-DnTfI5GU.js.map +1 -0
  36. package/dist/cdn/chunks/{CollaboratorBar-xsU20iPl.js → CollaboratorBar-CBqd7ldq.js} +3 -3
  37. package/dist/cdn/chunks/{CollaboratorBar-xsU20iPl.js.map → CollaboratorBar-CBqd7ldq.js.map} +1 -1
  38. package/dist/cdn/chunks/{ColorPicker-y_obnw4o.js → ColorPicker-DCdWP8YB.js} +99 -99
  39. package/dist/cdn/chunks/ColorPicker-DCdWP8YB.js.map +1 -0
  40. package/dist/cdn/chunks/{CountdownBlock-sHsRMe1q.js → CountdownBlock-BDnWMAME.js} +2 -2
  41. package/dist/cdn/chunks/{CountdownBlock-sHsRMe1q.js.map → CountdownBlock-BDnWMAME.js.map} +1 -1
  42. package/dist/cdn/chunks/{CountdownToolbar-Ckc_jEi-.js → CountdownToolbar-BbLoo22S.js} +4 -5
  43. package/dist/cdn/chunks/{CountdownToolbar-Ckc_jEi-.js.map → CountdownToolbar-BbLoo22S.js.map} +1 -1
  44. package/dist/cdn/chunks/{IssuesPanel-DF5Ajuna.js → IssuesPanel-CfudrI3T.js} +7 -7
  45. package/dist/cdn/chunks/{IssuesPanel-DF5Ajuna.js.map → IssuesPanel-CfudrI3T.js.map} +1 -1
  46. package/dist/cdn/chunks/{MergeTagSuggestion-BmMmdcRg.js → MergeTagSuggestion-D7TsECll.js} +2 -2
  47. package/dist/cdn/chunks/{MergeTagSuggestion-BmMmdcRg.js.map → MergeTagSuggestion-D7TsECll.js.map} +1 -1
  48. package/dist/cdn/chunks/NumberWithSuffix-BmMx9_n_.js +123 -0
  49. package/dist/cdn/chunks/NumberWithSuffix-BmMx9_n_.js.map +1 -0
  50. package/dist/cdn/chunks/{ParagraphEditor-BkafKSju.js → ParagraphEditor-DPCUSXpx.js} +82 -82
  51. package/dist/cdn/chunks/{ParagraphEditor-BkafKSju.js.map → ParagraphEditor-DPCUSXpx.js.map} +1 -1
  52. package/dist/cdn/chunks/{RichTextEditorContent-BthhzOZS.js → RichTextEditorContent-B8dOiv_D.js} +5 -5
  53. package/dist/cdn/chunks/{RichTextEditorContent-BthhzOZS.js.map → RichTextEditorContent-B8dOiv_D.js.map} +1 -1
  54. package/dist/cdn/chunks/SaveBlockDialog-BY3SMnNV.js +259 -0
  55. package/dist/cdn/chunks/SaveBlockDialog-BY3SMnNV.js.map +1 -0
  56. package/dist/cdn/chunks/SavedBlockPreviewCanvas-LpaOcusq.js +110 -0
  57. package/dist/cdn/chunks/SavedBlockPreviewCanvas-LpaOcusq.js.map +1 -0
  58. package/dist/cdn/chunks/SavedBlocksBrowserModal-CfIcmyzF.js +318 -0
  59. package/dist/cdn/chunks/SavedBlocksBrowserModal-CfIcmyzF.js.map +1 -0
  60. package/dist/cdn/chunks/SavedBlocksPanels-kIowCfh_.js +38 -0
  61. package/dist/cdn/chunks/SavedBlocksPanels-kIowCfh_.js.map +1 -0
  62. package/dist/cdn/chunks/SavedBlocksPickBar-WSGe1GiZ.js +52 -0
  63. package/dist/cdn/chunks/SavedBlocksPickBar-WSGe1GiZ.js.map +1 -0
  64. package/dist/cdn/chunks/{TitleEditor-DLv9cXba.js → TitleEditor-iwd-O9sO.js} +11 -11
  65. package/dist/cdn/chunks/{TitleEditor-DLv9cXba.js.map → TitleEditor-iwd-O9sO.js.map} +1 -1
  66. package/dist/cdn/chunks/{blockTypeIcons-B0uibGX7.js → blockTypeIcons-BYz0fgLz.js} +7 -7
  67. package/dist/cdn/chunks/{blockTypeIcons-B0uibGX7.js.map → blockTypeIcons-BYz0fgLz.js.map} +1 -1
  68. package/dist/cdn/chunks/{ca-DbWoy4rG.js → ca-BBgad6y5.js} +51 -4
  69. package/dist/cdn/chunks/ca-BBgad6y5.js.map +1 -0
  70. package/dist/{de-CTYXVU9v.js → cdn/chunks/de-Bw6fB5JU.js} +2 -24
  71. package/dist/cdn/chunks/{de-CTYXVU9v.js.map → de-Bw6fB5JU.js.map} +1 -1
  72. package/dist/cdn/chunks/{de-CgGOnerg.js → de-D7WbpFBR.js} +50 -3
  73. package/dist/cdn/chunks/de-D7WbpFBR.js.map +1 -0
  74. package/dist/{en-DrUV9xth.js → cdn/chunks/en-BrZ0uGK2.js} +51 -2
  75. package/dist/cdn/chunks/en-BrZ0uGK2.js.map +1 -0
  76. package/dist/{en-BtmIaJeb.js → cdn/chunks/en-DAdHJz7h.js} +2 -24
  77. package/dist/cdn/chunks/{en-BtmIaJeb.js.map → en-DAdHJz7h.js.map} +1 -1
  78. package/dist/{es-DwbKjU7q.js → cdn/chunks/es-tLSLysPs.js} +51 -2
  79. package/dist/cdn/chunks/es-tLSLysPs.js.map +1 -0
  80. package/dist/cdn/chunks/{extensions-DLHvZ0UH.js → extensions-DeJh3E9b.js} +29 -29
  81. package/dist/cdn/chunks/{extensions-DLHvZ0UH.js.map → extensions-DeJh3E9b.js.map} +1 -1
  82. package/dist/cdn/chunks/{features-Cnfv4QAY.js → features-pLfGJWIB.js} +1802 -1603
  83. package/dist/cdn/chunks/features-pLfGJWIB.js.map +1 -0
  84. package/dist/cdn/chunks/{icons-DbcM69bb.js → icons-FLemooQz.js} +16 -16
  85. package/dist/cdn/chunks/{icons-DbcM69bb.js.map → icons-FLemooQz.js.map} +1 -1
  86. package/dist/cdn/chunks/{media-library-DpSMwHd4.js → media-library-mCCZieYO.js} +163 -163
  87. package/dist/cdn/chunks/{media-library-DpSMwHd4.js.map → media-library-mCCZieYO.js.map} +1 -1
  88. package/dist/cdn/chunks/{pt-BR-Bcc5Tjed.js → pt-BR-BWFokdTU.js} +50 -3
  89. package/dist/cdn/chunks/pt-BR-BWFokdTU.js.map +1 -0
  90. package/dist/{pt-BR-B2ZvFlRL.js → cdn/chunks/pt-BR-w2sGzHNX.js} +2 -24
  91. package/dist/cdn/chunks/{pt-BR-B2ZvFlRL.js.map → pt-BR-w2sGzHNX.js.map} +1 -1
  92. package/dist/cdn/chunks/{pusher-CIwiKF8H.js → pusher-R0v5p99W.js} +27 -22
  93. package/dist/cdn/chunks/pusher-R0v5p99W.js.map +1 -0
  94. package/dist/cdn/chunks/{quality-D9QqkRcU.js → quality-BRbHtAk1.js} +460 -460
  95. package/dist/cdn/chunks/{quality-D9QqkRcU.js.map → quality-BRbHtAk1.js.map} +1 -1
  96. package/dist/cdn/chunks/{renderer-BsLQZNXU.js → renderer-Yg1XhsBN.js} +18 -18
  97. package/dist/cdn/chunks/{renderer-BsLQZNXU.js.map → renderer-Yg1XhsBN.js.map} +1 -1
  98. package/dist/cdn/chunks/{src-zu1ehVNN.js → src-BDJeYiVE.js} +33 -33
  99. package/dist/cdn/chunks/{src-zu1ehVNN.js.map → src-BDJeYiVE.js.map} +1 -1
  100. package/dist/cdn/chunks/{styles-Dx-jXeCd.js → styles-Bp5Jsu9J.js} +1422 -1332
  101. package/dist/cdn/chunks/styles-Bp5Jsu9J.js.map +1 -0
  102. package/dist/cdn/chunks/{tiptap-C2indasq.js → tiptap-BMZ-OENR.js} +2012 -1863
  103. package/dist/cdn/chunks/tiptap-BMZ-OENR.js.map +1 -0
  104. package/dist/cdn/editor.css +1 -1
  105. package/dist/cdn/editor.js +123 -114
  106. package/dist/cdn/editor.js.map +1 -1
  107. package/dist/{check-Cg6Mc2pP.js → check-BpQDKiPz.js} +1 -1
  108. package/dist/{chevron-down-dClfxKrJ.js → chevron-down-j8GrdTyz.js} +1 -1
  109. package/dist/chevron-up-BACyVhyC.js +7 -0
  110. package/dist/{circle-alert-Bhzm-fNA.js → circle-alert-CgtE46ND.js} +1 -1
  111. package/dist/{clock-m7TwQw4b.js → clock-BzKLLW5L.js} +1 -1
  112. package/dist/{cloud-B-RebwxI.js → cloud-Du7mnkz2.js} +19 -47
  113. package/dist/{createLucideIcon-FSF4peHQ.js → createLucideIcon-JWHwTI6N.js} +2 -2
  114. package/dist/{cdn/chunks/de-CTYXVU9v.js → de-Bw6fB5JU.js} +0 -26
  115. package/dist/{de-CgGOnerg.js → de-D7WbpFBR.js} +49 -2
  116. package/dist/{dist-CgTKuIUN.js → dist-BEpCh2mG.js} +1158 -1125
  117. package/dist/{dist-Cx7IUM7J.js → dist-BgPYC_8-.js} +14 -6
  118. package/dist/{dist-BKKo5wPC.js → dist-BkM8A17N.js} +2 -2
  119. package/dist/{dist-CcX5sLpz.js → dist-BuNDAAVp.js} +361 -256
  120. package/dist/{dist-COSN3oDJ.js → dist-CBzCU-a-.js} +2 -2
  121. package/dist/{dist-YSCPD13F.js → dist-CDO52Rxy.js} +2 -2
  122. package/dist/{dist-Dk5AdwoQ.js → dist-CrjzhIxB.js} +2 -2
  123. package/dist/{dist-DXAZUjj3.js → dist-CtcgoC_R.js} +2 -2
  124. package/dist/{dist-D6M5FAY7.js → dist-CuXha2_7.js} +2 -2
  125. package/dist/dist-CweLDZrs.js +5 -0
  126. package/dist/dist-DOsdqAEZ.js +5 -0
  127. package/dist/{dist-8TKf-Jpg.js → dist-DYClLqy8.js} +6 -3
  128. package/dist/{cdn/chunks/en-DrUV9xth.js → en-BrZ0uGK2.js} +49 -4
  129. package/dist/{cdn/chunks/en-BtmIaJeb.js → en-DAdHJz7h.js} +0 -26
  130. package/dist/{cdn/chunks/es-DwbKjU7q.js → es-tLSLysPs.js} +49 -4
  131. package/dist/{extensions-BCA9pyer.js → extensions-ClY5Sh7S.js} +5 -5
  132. package/dist/{image-up-CDEgJqwA.js → image-up-CQdtq8ge.js} +1 -1
  133. package/dist/index.d.ts +81 -4
  134. package/dist/{info-BNP8yGsK.js → info-BUJBXoE6.js} +1 -1
  135. package/dist/{keys-DFaIbGR8.js → keys-CHPcp-Nz.js} +2 -2
  136. package/dist/{list-checks-jepi4iYr.js → list-checks-BGHaCSD5.js} +1 -1
  137. package/dist/{loader-circle-BT38qSm3.js → loader-circle-C-Z6kgI6.js} +1 -1
  138. package/dist/{message-circle-BAHcL9S-.js → message-circle-CEm5qckV.js} +1 -1
  139. package/dist/pencil-DdwmkKLb.js +10 -0
  140. package/dist/{pt-BR-Bcc5Tjed.js → pt-BR-BWFokdTU.js} +49 -2
  141. package/dist/{cdn/chunks/pt-BR-B2ZvFlRL.js → pt-BR-w2sGzHNX.js} +0 -26
  142. package/dist/{refresh-cw-as5Bmg4X.js → refresh-cw-maKlg0dl.js} +1 -1
  143. package/dist/{scan-line-IAMjPtRw.js → scan-line-BFgesTOY.js} +1 -1
  144. package/dist/{send-DvMay6bt.js → send-B70aQDrA.js} +1 -1
  145. package/dist/{shield-check-YYDhGroE.js → shield-check-B7x5OKt5.js} +1 -1
  146. package/dist/{sparkles-CCwQMMMZ.js → sparkles-DVlm1Ipp.js} +1 -1
  147. package/dist/style.css +1 -1
  148. package/dist/{styles-64uLkPJV.js → styles-DIDAJdkj.js} +1241 -1151
  149. package/dist/templatical-editor.js +134 -125
  150. package/dist/{text-align-start-BwsA6QzC.js → text-align-start-Vay3Kvo2.js} +1 -1
  151. package/dist/{trash-2-CRBDolnR.js → trash-2-DE8CmxAG.js} +1 -1
  152. package/dist/{triangle-alert-B2g0ALvq.js → triangle-alert-Djg6IG8N.js} +1 -1
  153. package/dist/{upload-y4gxiFp5.js → upload-BwwE0U6G.js} +1 -1
  154. package/dist/{useCloudI18n-PCDOC2kz.js → useCloudI18n-BmiygEM4.js} +1 -1
  155. package/dist/{useEditorCore-ea9OrrH3.js → useEditorCore-Bd9CA4L_.js} +1236 -1013
  156. package/dist/{useI18n-BNMzZTM5.js → useI18n-D2L9Mkik.js} +1 -1
  157. package/dist/{useMergeTag-DfEY0eK5.js → useMergeTag-BTdDq5DC.js} +1 -1
  158. package/dist/{usePopoverPosition-F9STHRIr.js → usePopoverPosition-BO2LNy5n.js} +1 -1
  159. package/dist/{x-Ctg_250T.js → x-CkD6A1iB.js} +1 -1
  160. package/package.json +23 -23
  161. package/dist/CommentsSidebar-BYMVucZh.js +0 -442
  162. package/dist/ModuleBrowserModal-BNalLx0k.js +0 -202
  163. package/dist/ModulePreviewCanvas-BwObwisa.js +0 -106
  164. package/dist/NumberWithSuffix-D3BKz66W.js +0 -89
  165. package/dist/SaveModuleDialog-MTjwiF9D.js +0 -125
  166. package/dist/ToggleSwitch-DUNuUPsZ.js +0 -37
  167. package/dist/cdn/chunks/CloudEditor-Dufl354p.js.map +0 -1
  168. package/dist/cdn/chunks/ColorPicker-y_obnw4o.js.map +0 -1
  169. package/dist/cdn/chunks/ModuleBrowserModal-DG4AVFjH.js +0 -198
  170. package/dist/cdn/chunks/ModuleBrowserModal-DG4AVFjH.js.map +0 -1
  171. package/dist/cdn/chunks/ModulePreviewCanvas-Bc_PcJuc.js +0 -107
  172. package/dist/cdn/chunks/ModulePreviewCanvas-Bc_PcJuc.js.map +0 -1
  173. package/dist/cdn/chunks/NumberWithSuffix-8fOO-LC_.js +0 -91
  174. package/dist/cdn/chunks/NumberWithSuffix-8fOO-LC_.js.map +0 -1
  175. package/dist/cdn/chunks/SaveModuleDialog-DhsfYf2n.js +0 -120
  176. package/dist/cdn/chunks/SaveModuleDialog-DhsfYf2n.js.map +0 -1
  177. package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js +0 -39
  178. package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js.map +0 -1
  179. package/dist/cdn/chunks/ca-DbWoy4rG.js.map +0 -1
  180. package/dist/cdn/chunks/de-CgGOnerg.js.map +0 -1
  181. package/dist/cdn/chunks/en-DrUV9xth.js.map +0 -1
  182. package/dist/cdn/chunks/es-DwbKjU7q.js.map +0 -1
  183. package/dist/cdn/chunks/features-Cnfv4QAY.js.map +0 -1
  184. package/dist/cdn/chunks/pt-BR-Bcc5Tjed.js.map +0 -1
  185. package/dist/cdn/chunks/pusher-CIwiKF8H.js.map +0 -1
  186. package/dist/cdn/chunks/styles-Dx-jXeCd.js.map +0 -1
  187. package/dist/cdn/chunks/tiptap-C2indasq.js.map +0 -1
  188. package/dist/dist-BDVm2MrW.js +0 -5
  189. package/dist/dist-DbekZDmJ.js +0 -5
@@ -1,5 +1,5 @@
1
1
  import { W as e, x as t } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
2
- import { R as n } from "./keys-DFaIbGR8.js";
2
+ import { R as n } from "./keys-CHPcp-Nz.js";
3
3
  //#region src/composables/useI18n.ts
4
4
  function r(r) {
5
5
  let i = r ?? t(n, null);
@@ -1,6 +1,6 @@
1
1
  import { Y as e, x as t } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
2
2
  import { D as n, M as r, a as i } from "./dist-BJbqgyPn.js";
3
- import { D as a, E as o, O as s, T as c, j as l } from "./keys-DFaIbGR8.js";
3
+ import { D as a, E as o, O as s, T as c, j as l } from "./keys-CHPcp-Nz.js";
4
4
  //#region src/composables/useMergeTag.ts
5
5
  function u() {
6
6
  let u = t(c, []), d = t(s, i.liquid), f = t(l, null), p = t(o, !0), m = t(a, null), h = e(!1);
@@ -1,6 +1,6 @@
1
1
  import { E as e, I as t, L as n, Y as r, Z as i, b as a, et as o, nt as s, s as c, v as l, x as u } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
2
2
  import { _ as d, a as f, d as p, i as m, l as h, n as g, o as _, r as v, s as y, t as b, u as x } from "./dist-DYv_Pttj.js";
3
- import { N as S } from "./keys-DFaIbGR8.js";
3
+ import { N as S } from "./keys-CHPcp-Nz.js";
4
4
  //#region ../../node_modules/.pnpm/@vueuse+core@14.3.0_vue@3.5.40_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
5
5
  var C = g ? window : void 0;
6
6
  g && window.document, g && window.navigator, g && window.location;
@@ -1,4 +1,4 @@
1
- import { t as e } from "./createLucideIcon-FSF4peHQ.js";
1
+ import { t as e } from "./createLucideIcon-JWHwTI6N.js";
2
2
  var t = e("x", [["path", {
3
3
  d: "M18 6 6 18",
4
4
  key: "1bl5f8"
package/package.json CHANGED
@@ -1,28 +1,28 @@
1
1
  {
2
2
  "name": "@templatical/editor",
3
3
  "description": "Vue 3 visual drag-and-drop email editor powered by Templatical",
4
- "version": "0.19.0",
4
+ "version": "0.21.0",
5
5
  "bugs": "https://github.com/templatical/sdk/issues",
6
6
  "devDependencies": {
7
- "@lucide/vue": "^1.25.0",
8
- "@tiptap/core": "^3.28.0",
9
- "@tiptap/extension-color": "^3.28.0",
10
- "@tiptap/extension-font-family": "^3.28.0",
11
- "@tiptap/extension-highlight": "^3.28.0",
12
- "@tiptap/extension-link": "^3.28.0",
13
- "@tiptap/extension-subscript": "^3.28.0",
14
- "@tiptap/extension-superscript": "^3.28.0",
15
- "@tiptap/extension-text-align": "^3.28.0",
16
- "@tiptap/extension-text-style": "^3.28.0",
17
- "@tiptap/extension-underline": "^3.28.0",
18
- "@tiptap/starter-kit": "^3.28.0",
19
- "@tiptap/suggestion": "^3.28.0",
20
- "@tiptap/vue-3": "^3.28.0",
7
+ "@lucide/vue": "^1.27.0",
8
+ "@tiptap/core": "^3.29.0",
9
+ "@tiptap/extension-color": "^3.29.0",
10
+ "@tiptap/extension-font-family": "^3.29.0",
11
+ "@tiptap/extension-highlight": "^3.29.0",
12
+ "@tiptap/extension-link": "^3.29.0",
13
+ "@tiptap/extension-subscript": "^3.29.0",
14
+ "@tiptap/extension-superscript": "^3.29.0",
15
+ "@tiptap/extension-text-align": "^3.29.0",
16
+ "@tiptap/extension-text-style": "^3.29.0",
17
+ "@tiptap/extension-underline": "^3.29.0",
18
+ "@tiptap/starter-kit": "^3.29.0",
19
+ "@tiptap/suggestion": "^3.29.0",
20
+ "@tiptap/vue-3": "^3.29.0",
21
21
  "@vitejs/plugin-vue": "^6.0.8",
22
22
  "@vue/test-utils": "^2.4.11",
23
23
  "@vueuse/core": "^14.3.0",
24
24
  "es-module-lexer": "^2.3.1",
25
- "happy-dom": "^20.11.0",
25
+ "happy-dom": "^20.11.1",
26
26
  "liquidjs": "^10.27.2",
27
27
  "tailwindcss": "^4.3.3",
28
28
  "typescript": "^6.0.3",
@@ -31,10 +31,10 @@
31
31
  "vitest": "^4.1.10",
32
32
  "vue": "^3.5.40",
33
33
  "vue-draggable-plus": "^0.6.1",
34
- "vue-tsc": "^3.3.7",
35
- "@templatical/core": "0.19.0",
36
- "@templatical/quality": "0.19.0",
37
- "@templatical/types": "0.19.0"
34
+ "vue-tsc": "^3.3.8",
35
+ "@templatical/core": "0.21.0",
36
+ "@templatical/quality": "0.21.0",
37
+ "@templatical/types": "0.21.0"
38
38
  },
39
39
  "exports": {
40
40
  ".": {
@@ -62,9 +62,9 @@
62
62
  "license": "SEE LICENSE IN LICENSE",
63
63
  "module": "./dist/templatical-editor.js",
64
64
  "peerDependencies": {
65
- "@templatical/media-library": "0.19.0",
66
- "@templatical/quality": "0.19.0",
67
- "@templatical/renderer": "0.19.0"
65
+ "@templatical/media-library": "0.21.0",
66
+ "@templatical/quality": "0.21.0",
67
+ "@templatical/renderer": "0.21.0"
68
68
  },
69
69
  "peerDependenciesMeta": {
70
70
  "@templatical/renderer": {
@@ -1,442 +0,0 @@
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-B0xoGkDv.js";
2
- import { a as v, t as y } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
3
- import { B as b, h as ne, r as re, u as ie } from "./keys-DFaIbGR8.js";
4
- import { t as ae } from "./useI18n-BNMzZTM5.js";
5
- import { t as x } from "./createLucideIcon-FSF4peHQ.js";
6
- import { t as oe } from "./check-Cg6Mc2pP.js";
7
- import { t as se } from "./chevron-down-dClfxKrJ.js";
8
- import { t as S } from "./loader-circle-BT38qSm3.js";
9
- import { t as C } from "./message-circle-BAHcL9S-.js";
10
- import { t as w } from "./send-DvMay6bt.js";
11
- import { t as T } from "./trash-2-CRBDolnR.js";
12
- import { t as E } from "./x-Ctg_250T.js";
13
- import { t as D } from "./_plugin-vue_export-helper-B3ysoDQm.js";
14
- import { n as ce } from "./useCloudI18n-PCDOC2kz.js";
15
- import { t as le } from "./formatRelativeTime-CtUU-QZ8.js";
16
- var ue = x("chevron-up", [["path", {
17
- d: "m18 15-6-6-6 6",
18
- key: "153udz"
19
- }]]), de = x("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
- }]]), O = x("pencil", [["path", {
28
- 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",
29
- key: "1a8usu"
30
- }], ["path", {
31
- d: "m15 5 4 4",
32
- key: "1mk7zo"
33
- }]]), fe = x("reply", [["path", {
34
- d: "M20 18v-2a4 4 0 0 0-4-4H4",
35
- key: "5vmcpk"
36
- }], ["path", {
37
- d: "m9 17-5-5 5-5",
38
- key: "nvlc11"
39
- }]]), pe = {
40
- key: 0,
41
- 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)]"
42
- }, me = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, he = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, ge = {
43
- key: 0,
44
- 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)]"
45
- }, _e = { class: "tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2" }, ve = { class: "tpl:flex-1 tpl:overflow-y-auto" }, ye = {
46
- key: 0,
47
- class: "tpl:flex tpl:h-full tpl:items-center tpl:justify-center"
48
- }, be = {
49
- key: 1,
50
- class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:px-6 tpl:text-center"
51
- }, xe = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Se = {
52
- key: 2,
53
- class: "tpl:flex tpl:flex-col tpl:gap-3 tpl:p-3"
54
- }, Ce = { class: "tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3" }, we = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Te = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, Ee = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, De = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Oe = {
55
- key: 0,
56
- class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
57
- }, ke = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, Ae = ["title", "onClick"], je = ["title", "onClick"], Me = ["title", "onClick"], Ne = {
58
- key: 0,
59
- class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-primary)]"
60
- }, Pe = {
61
- key: 0,
62
- 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)]"
63
- }, Fe = ["onClick"], Ie = {
64
- key: 2,
65
- class: "tpl:mt-2"
66
- }, Le = ["onKeydown"], Re = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, ze = ["disabled", "onClick"], Be = {
67
- key: 3,
68
- class: "tpl:mt-1.5 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
69
- }, Ve = {
70
- key: 4,
71
- 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)]"
72
- }, He = { class: "tpl:flex-1" }, Ue = ["onClick"], We = {
73
- key: 5,
74
- class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2"
75
- }, Ge = ["title", "onClick"], Ke = ["onClick"], qe = {
76
- key: 0,
77
- class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
78
- }, Je = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Ye = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, Xe = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ze = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Qe = {
79
- key: 0,
80
- class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
81
- }, $e = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, et = ["title", "onClick"], tt = ["title", "onClick"], nt = {
82
- key: 0,
83
- class: "tpl:mt-1.5"
84
- }, rt = ["onKeydown"], it = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, at = ["disabled", "onClick"], ot = {
85
- key: 1,
86
- class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
87
- }, st = {
88
- key: 2,
89
- 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)]"
90
- }, ct = { class: "tpl:flex-1" }, lt = ["onClick"], ut = {
91
- key: 0,
92
- class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
93
- }, dt = { class: "tpl:flex tpl:items-end tpl:gap-2" }, ft = ["placeholder", "onKeydown"], pt = { class: "tpl:flex tpl:shrink-0 tpl:flex-col tpl:gap-1" }, mt = ["disabled", "onClick"], ht = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, gt = {
94
- key: 0,
95
- 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)]"
96
- }, _t = {
97
- key: 1,
98
- 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)]"
99
- }, vt = ["placeholder", "disabled"], yt = ["disabled"], k = /*#__PURE__*/ D(/* @__PURE__ */ c({
100
- __name: "CommentsSidebar",
101
- props: { visible: { type: Boolean } },
102
- emits: ["close", "filterBlock"],
103
- setup(c, { expose: x, emit: D }) {
104
- let k = c, A = D, { format: j } = ae(), { t: M } = ce(), N = b(ne, "CommentsSidebar"), bt = b(re, "CommentsSidebar"), P = b(ie, "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(() => {
105
- let e = /* @__PURE__ */ new Set();
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);
107
- return e;
108
- });
109
- function Ct(e) {
110
- return e ? !St.value.has(e) : !1;
111
- }
112
- let wt = h(() => F.value !== "block" || !I.value ? !1 : !(N.savedBlockIds?.value.has(I.value) ?? !0)), G = h(() => {
113
- let e = P.comments.value;
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;
115
- });
116
- r(() => k.visible, (e) => {
117
- e && P.loadComments();
118
- }), r(() => N.state.selectedBlockId, (e) => {
119
- F.value === "block" && e && (I.value = e);
120
- });
121
- function K(e, t) {
122
- F.value = e, I.value = e === "block" ? t ?? null : null;
123
- }
124
- function Tt(e) {
125
- K("block", e), A("filterBlock", e);
126
- }
127
- function Et(e) {
128
- H.value.has(e) ? H.value.delete(e) : H.value.add(e);
129
- }
130
- function Dt(e) {
131
- R.value = e, z.value = "", B.value = null, H.value.has(e) || H.value.add(e);
132
- }
133
- function Ot() {
134
- R.value = null, z.value = "";
135
- }
136
- function q(e) {
137
- B.value = e.id, V.value = e.body, R.value = null;
138
- }
139
- function J() {
140
- B.value = null, V.value = "";
141
- }
142
- function Y(e) {
143
- U.value = e;
144
- }
145
- function X() {
146
- U.value = null;
147
- }
148
- async function Z() {
149
- let e = L.value.trim();
150
- if (!e) return;
151
- let t = F.value === "block" ? I.value : void 0;
152
- await P.addComment(e, t ?? void 0), L.value = "";
153
- }
154
- async function kt(e) {
155
- let t = z.value.trim();
156
- if (!t) return;
157
- let n = P.comments.value.find((t) => t.id === e);
158
- await P.addComment(t, n?.block_id ?? void 0, e), R.value = null, z.value = "";
159
- }
160
- async function Q(e) {
161
- let t = V.value.trim();
162
- t && (await P.editComment(e, t), B.value = null, V.value = "");
163
- }
164
- async function At(e) {
165
- await P.removeComment(e), U.value = null;
166
- }
167
- async function jt(e) {
168
- await P.toggleResolve(e);
169
- }
170
- function $(e) {
171
- return e.author_identifier === xt.value;
172
- }
173
- function Mt(e) {
174
- return le(e, M.snapshotHistory) ?? e;
175
- }
176
- function Nt(e) {
177
- e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Z());
178
- }
179
- function Pt(e, t) {
180
- e.key === "Enter" && !e.shiftKey && (e.preventDefault(), kt(t));
181
- }
182
- function Ft(e, t) {
183
- e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Q(t)), e.key === "Escape" && J();
184
- }
185
- function It() {
186
- te(() => {
187
- W.value?.focus();
188
- });
189
- }
190
- return x({
191
- filterByBlock: Tt,
192
- focusNewComment: It
193
- }), (r, s) => (i(), f(y, {
194
- "enter-active-class": "tpl-comments-slide-enter-active",
195
- "enter-from-class": "tpl:translate-x-full",
196
- "enter-to-class": "tpl:translate-x-0",
197
- "leave-active-class": "tpl-comments-slide-leave-active",
198
- "leave-from-class": "tpl:translate-x-0",
199
- "leave-to-class": "tpl:translate-x-full"
200
- }, {
201
- default: o(() => [c.visible ? (i(), u("div", pe, [
202
- l("div", me, [l("div", he, [
203
- d(p(C), {
204
- size: 13,
205
- "stroke-width": 2
206
- }),
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", {
210
- class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
211
- onClick: s[0] ||= (e) => A("close")
212
- }, [d(p(E), {
213
- size: 14,
214
- "stroke-width": 2
215
- })])]),
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", {
226
- key: 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)
230
- ]),
231
- l("div", ve, [p(P).isLoading.value ? (i(), u("div", ye, [d(p(S), {
232
- class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
233
- size: 24,
234
- "stroke-width": 2
235
- })])) : G.value.length === 0 ? (i(), u("div", be, [d(p(C), {
236
- size: 32,
237
- "stroke-width": 1.5,
238
- class: "tpl:text-[var(--tpl-text-dim)]"
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,
241
- class: "tpl-comment-thread"
242
- }, [
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", {
250
- class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
251
- title: r.resolved_at ? p(M).comments.unresolve : p(M).comments.resolve,
252
- onClick: (e) => jt(r.id)
253
- }, [d(p(de), {
254
- size: 13,
255
- "stroke-width": 2,
256
- class: "tpl-resolve-icon",
257
- style: t({ color: r.resolved_at ? "var(--tpl-primary)" : void 0 })
258
- }, null, 8, ["style"])], 8, Ae),
259
- $(r) ? (i(), u("button", {
260
- key: 0,
261
- class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
262
- title: p(M).comments.edit,
263
- onClick: (e) => q(r)
264
- }, [d(p(O), {
265
- size: 12,
266
- "stroke-width": 2
267
- })], 8, je)) : g("", !0),
268
- $(r) ? (i(), u("button", {
269
- key: 1,
270
- class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
271
- title: p(M).comments.delete,
272
- onClick: (e) => Y(r.id)
273
- }, [d(p(T), {
274
- size: 12,
275
- "stroke-width": 2
276
- })], 8, Me)) : g("", !0)
277
- ])]),
278
- d(y, { name: "tpl-resolve" }, {
279
- default: o(() => [r.resolved_at ? (i(), u("div", Ne, [d(p(oe), {
280
- size: 10,
281
- "stroke-width": 2.5
282
- }), l("span", null, a(p(j)(p(M).comments.resolvedBy, { name: r.resolved_by_name ?? "" })), 1)])) : g("", !0)]),
283
- _: 2
284
- }, 1024),
285
- r.block_id && Ct(r.block_id) ? (i(), u("span", Pe, a(p(M).comments.missingBlock), 1)) : r.block_id ? (i(), u("button", {
286
- key: 1,
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)]",
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,
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)]",
293
- rows: "3",
294
- onKeydown: (e) => Ft(e, r.id)
295
- }, null, 40, Le), [[v, V.value]]), l("div", Re, [l("button", {
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)]",
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", {
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)]",
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", {
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)]",
307
- onClick: (e) => At(r.id)
308
- }, a(p(M).comments.delete), 9, Ue),
309
- l("button", {
310
- class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
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", {
315
- class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
316
- title: p(M).comments.reply,
317
- onClick: (e) => Dt(r.id)
318
- }, [d(p(fe), {
319
- size: 13,
320
- "stroke-width": 2,
321
- class: "tpl:text-[var(--tpl-primary)]"
322
- })], 8, Ge), (r.replies?.length ?? 0) > 0 ? (i(), u("button", {
323
- key: 0,
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)]",
325
- onClick: (e) => Et(r.id)
326
- }, [H.value.has(r.id) ? (i(), f(p(ue), {
327
- key: 0,
328
- size: 11,
329
- "stroke-width": 2
330
- })) : (i(), f(p(se), {
331
- key: 1,
332
- size: 11,
333
- "stroke-width": 2
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)
335
- ]),
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" : ""])
340
- }, [
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", {
346
- key: 0,
347
- class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
348
- title: p(M).comments.edit,
349
- onClick: (t) => q(e)
350
- }, [d(p(O), {
351
- size: 11,
352
- "stroke-width": 2
353
- })], 8, et)) : g("", !0), $(e) ? (i(), u("button", {
354
- key: 1,
355
- class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
356
- title: p(M).comments.delete,
357
- onClick: (t) => Y(e.id)
358
- }, [d(p(T), {
359
- size: 11,
360
- "stroke-width": 2
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,
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)]",
365
- rows: "2",
366
- onKeydown: (t) => Ft(t, e.id)
367
- }, null, 40, rt), [[v, V.value]]), l("div", it, [l("button", {
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)]",
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", {
372
- class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
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", {
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)]",
379
- onClick: (t) => At(e.id)
380
- }, a(p(M).comments.delete), 9, lt),
381
- l("button", {
382
- class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
383
- onClick: s[9] ||= (e) => X()
384
- }, a(p(M).comments.cancel), 1)
385
- ])) : g("", !0)
386
- ], 2))), 128))])) : g("", !0)]),
387
- _: 2
388
- }, 1024),
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,
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)]",
393
- placeholder: p(M).comments.replyPlaceholder,
394
- rows: "2",
395
- onKeydown: (e) => Pt(e, r.id)
396
- }, null, 40, ft), [[v, z.value]]), l("div", pt, [l("button", {
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)]",
398
- disabled: !z.value.trim() || p(P).isSubmitting.value,
399
- onClick: (e) => kt(r.id)
400
- }, [d(p(w), {
401
- size: 14,
402
- "stroke-width": 2
403
- })], 8, mt), l("button", {
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)]",
405
- onClick: s[11] ||= (e) => Ot()
406
- }, [d(p(E), {
407
- size: 14,
408
- "stroke-width": 2
409
- })])])])])) : g("", !0)]),
410
- _: 2
411
- }, 1024)
412
- ]))), 128))]))]),
413
- l("div", ht, [wt.value ? (i(), u("div", gt, a(p(M).comments.saveTemplateFirst), 1)) : (i(), u("div", _t, [_(l("textarea", {
414
- ref_key: "newCommentInput",
415
- ref: W,
416
- "onUpdate:modelValue": s[12] ||= (e) => L.value = e,
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)]",
418
- placeholder: p(M).comments.placeholder,
419
- disabled: p(P).isSubmitting.value,
420
- rows: "2",
421
- onKeydown: Nt
422
- }, null, 40, vt), [[v, L.value]]), l("button", {
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)]",
424
- disabled: !L.value.trim() || p(P).isSubmitting.value,
425
- onClick: Z
426
- }, [p(P).isSubmitting.value ? (i(), f(p(S), {
427
- key: 0,
428
- class: "tpl-spinner",
429
- size: 16,
430
- "stroke-width": 2
431
- })) : (i(), f(p(w), {
432
- key: 1,
433
- size: 16,
434
- "stroke-width": 2
435
- }))], 8, yt)]))])
436
- ])) : g("", !0)]),
437
- _: 1
438
- }));
439
- }
440
- }), [["__scopeId", "data-v-d204f573"]]);
441
- //#endregion
442
- export { k as default };