@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,5 +1,5 @@
1
- import { E as e, q as t } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
2
- import { E as n } from "./keys-ciNfSSGj.js";
1
+ import { D as e, Y as t } from "./vue.runtime.esm-bundler-CjauPXjj.js";
2
+ import { O as n } from "./keys-CvX8D-8C.js";
3
3
  //#region src/composables/useI18n.ts
4
4
  function r(r) {
5
5
  let i = r ?? e(n, null);
@@ -1,9 +1,9 @@
1
- import { E as e, Q as t } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
2
- import { O as n, n as r, w as i } from "./dist-DJmnUmW9.js";
3
- import { S as a, b as o, v as s, y as c } from "./keys-ciNfSSGj.js";
1
+ import { D as e, et as t } from "./vue.runtime.esm-bundler-CjauPXjj.js";
2
+ import { N as n, i as r, k as i } from "./dist-Bmir0gYb.js";
3
+ import { C as a, b as o, x as s, y as c } from "./keys-CvX8D-8C.js";
4
4
  //#region src/composables/useMergeTag.ts
5
5
  function l() {
6
- let l = e(s, []), u = e(o, r.liquid), d = e(a, null), f = e(c, !0), p = t(!1);
6
+ let l = e(c, []), u = e(s, r.liquid), d = e(a, null), f = e(o, !0), p = t(!1);
7
7
  function m(e) {
8
8
  return n(e, u);
9
9
  }
@@ -5772,4 +5772,4 @@ function Df() {
5772
5772
  }
5773
5773
  process.env.NODE_ENV !== "production" && Df();
5774
5774
  //#endregion
5775
- export { Yt as $, Bc as A, n as At, oi as B, Q as C, j as Ct, wa as D, u as Dt, ii as E, r as Et, oa as F, dt as G, ti as H, $i as I, en as J, pr as K, ea as L, Vo as M, at as Mt, ri as N, ye as Nt, Er as O, s as Ot, ia as P, tn as Q, Ua as R, Ti as S, Ue as St, ai as T, Ge as Tt, pn as U, $r as V, ln as W, Kt as X, ft as Y, Jt as Z, Go as _, He as _t, lu as a, gn as at, X as b, w as bt, Nd as c, C as ct, q as d, ve as dt, nn as et, dc as f, E as ft, rs as g, me as gt, Ko as h, O as ht, bf as i, on as it, Wc as j, je as jt, Uc as k, c as kt, gf as l, Oe as lt, Xo as m, ct as mt, Sf as n, sn as nt, uf as o, S as ot, nu as p, o as pt, B as q, Ef as r, an as rt, sf as s, te as st, Dd as t, z as tt, mf as u, P as ut, ns as v, We as vt, Cs as w, M as wt, Hi as x, pe as xt, ts as y, N as yt, li as z };
5775
+ export { Jt as $, Uc as A, u as At, Ua as B, Ti as C, w as Ct, ii as D, M as Dt, ai as E, j as Et, ia as F, at as Ft, pn as G, oi as H, oa as I, ye as It, pr as J, ln as K, $i as L, Wc as M, c as Mt, Vo as N, n as Nt, wa as O, Ge as Ot, ri as P, je as Pt, Kt as Q, ea as R, Hi as S, N as St, Cs as T, Ue as Tt, $r as U, li as V, ti as W, en as X, B as Y, ft as Z, rs as _, ct as _t, lu as a, sn as at, ts as b, He as bt, sf as c, gn as ct, mf as d, C as dt, tn as et, q as f, Oe as ft, Ko as g, o as gt, Xo as h, E as ht, bf as i, dn as it, Bc as j, s as jt, Er as k, r as kt, Nd as l, S as lt, nu as m, ve as mt, Sf as n, nn as nt, wu as o, an as ot, dc as p, P as pt, dt as q, Ef as r, z as rt, uf as s, on as st, Dd as t, Yt as tt, gf as u, te as ut, Go as v, O as vt, Q as w, pe as wt, X as x, We as xt, ns as y, me as yt, Ei as z };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./createLucideIcon-C3pa2siy.js";
1
+ import { t as e } from "./createLucideIcon-ClREiSx3.js";
2
2
  var t = e("x", [["path", {
3
3
  d: "M18 6 6 18",
4
4
  key: "1bl5f8"
package/package.json CHANGED
@@ -1,13 +1,10 @@
1
1
  {
2
2
  "name": "@aswin.dev/editor",
3
3
  "description": "Vue 3 visual drag-and-drop email editor powered by Templatical",
4
- "version": "0.7.0",
4
+ "version": "0.7.2",
5
5
  "bugs": "https://github.com/templatical/sdk/issues",
6
6
  "devDependencies": {
7
7
  "@lucide/vue": "^1.11.0",
8
- "@templatical/core": "workspace:*",
9
- "@templatical/quality": "workspace:*",
10
- "@templatical/types": "workspace:*",
11
8
  "@tiptap/core": "^3.22.4",
12
9
  "@tiptap/extension-color": "^3.22.4",
13
10
  "@tiptap/extension-font-family": "^3.22.4",
@@ -35,7 +32,10 @@
35
32
  "vitest": "^4.1.5",
36
33
  "vue": "^3.5.33",
37
34
  "vue-tsc": "^3.2.7",
38
- "vuedraggable": "^4.1.0"
35
+ "vuedraggable": "^4.1.0",
36
+ "@aswin.dev/core": "0.7.2",
37
+ "@aswin.dev/types": "0.7.2",
38
+ "@aswin.dev/quality": "0.7.2"
39
39
  },
40
40
  "exports": {
41
41
  ".": {
@@ -63,18 +63,18 @@
63
63
  "license": "SEE LICENSE IN LICENSE",
64
64
  "module": "./dist/templatical-editor.js",
65
65
  "peerDependencies": {
66
- "@templatical/media-library": "workspace:*",
67
- "@templatical/quality": "workspace:*",
68
- "@templatical/renderer": "workspace:*"
66
+ "@aswin.dev/media-library": "0.7.2",
67
+ "@aswin.dev/quality": "0.7.2",
68
+ "@aswin.dev/renderer": "0.7.2"
69
69
  },
70
70
  "peerDependenciesMeta": {
71
- "@templatical/renderer": {
71
+ "@aswin.dev/renderer": {
72
72
  "optional": true
73
73
  },
74
- "@templatical/media-library": {
74
+ "@aswin.dev/media-library": {
75
75
  "optional": true
76
76
  },
77
- "@templatical/quality": {
77
+ "@aswin.dev/quality": {
78
78
  "optional": true
79
79
  }
80
80
  },
@@ -86,6 +86,8 @@
86
86
  "url": "git+https://github.com/templatical/sdk.git",
87
87
  "directory": "packages/editor"
88
88
  },
89
+ "type": "module",
90
+ "types": "./dist/index.d.ts",
89
91
  "scripts": {
90
92
  "build": "vite build",
91
93
  "build:all": "vite build && vite build --config vite.cdn.config.ts",
@@ -93,7 +95,5 @@
93
95
  "test": "vitest run",
94
96
  "typecheck": "vue-tsc --noEmit",
95
97
  "verify:pack": "node scripts/verify-pack.mjs"
96
- },
97
- "type": "module",
98
- "types": "./dist/index.d.ts"
99
- }
98
+ }
99
+ }
@@ -1,441 +0,0 @@
1
- import { Dt as e, H as t, M as n, Mt as r, O as i, Ot as a, P as o, Q as s, S as c, V as l, _ as u, b as d, d as f, g as p, h as m, it as h, m as g, p as _, s as v, t as y, y as ee, z as b } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
2
- import { O as x, i as te, m as ne, u as re } from "./keys-ciNfSSGj.js";
3
- import { t as ie } from "./useI18n-lb2DHDiu.js";
4
- import { t as S } from "./createLucideIcon-C3pa2siy.js";
5
- import { t as ae } from "./check-Da05j8yl.js";
6
- import { t as oe } from "./chevron-down-R2uY34iD.js";
7
- import { t as C } from "./loader-circle-DsY5Yg33.js";
8
- import { t as w } from "./message-circle-yElBbR2C.js";
9
- import { t as T } from "./send-DH4oDQqC.js";
10
- import { t as E } from "./trash-2-DbP2Y6t2.js";
11
- import { t as D } from "./x-u2oVmjN_.js";
12
- import { t as O } from "./_plugin-vue_export-helper-B0hnzhyu.js";
13
- import { n as se } from "./useCloudI18n-BuIwR6OE.js";
14
- import { t as ce } from "./formatRelativeTime-BOEf47hq.js";
15
- var le = S("chevron-up", [["path", {
16
- d: "m18 15-6-6-6 6",
17
- key: "153udz"
18
- }]]), ue = S("circle-check", [["circle", {
19
- cx: "12",
20
- cy: "12",
21
- r: "10",
22
- key: "1mglay"
23
- }], ["path", {
24
- d: "m9 12 2 2 4-4",
25
- key: "dzmm74"
26
- }]]), k = S("pencil", [["path", {
27
- 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",
28
- key: "1a8usu"
29
- }], ["path", {
30
- d: "m15 5 4 4",
31
- key: "1mk7zo"
32
- }]]), de = S("reply", [["path", {
33
- d: "M20 18v-2a4 4 0 0 0-4-4H4",
34
- key: "5vmcpk"
35
- }], ["path", {
36
- d: "m9 17-5-5 5-5",
37
- key: "nvlc11"
38
- }]]), fe = {
39
- key: 0,
40
- 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)]"
41
- }, pe = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, me = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, he = {
42
- key: 0,
43
- 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)]"
44
- }, ge = { class: "tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2" }, _e = { class: "tpl:flex-1 tpl:overflow-y-auto" }, ve = {
45
- key: 0,
46
- class: "tpl:flex tpl:h-full tpl:items-center tpl:justify-center"
47
- }, ye = {
48
- key: 1,
49
- class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:px-6 tpl:text-center"
50
- }, be = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, xe = {
51
- key: 2,
52
- class: "tpl:flex tpl:flex-col tpl:gap-3 tpl:p-3"
53
- }, Se = { class: "tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3" }, Ce = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, we = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, Te = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ee = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, De = {
54
- key: 0,
55
- class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
56
- }, Oe = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, ke = ["title", "onClick"], Ae = ["title", "onClick"], je = ["title", "onClick"], Me = {
57
- key: 0,
58
- class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-primary)]"
59
- }, Ne = {
60
- key: 0,
61
- 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)]"
62
- }, Pe = ["onClick"], Fe = {
63
- key: 2,
64
- class: "tpl:mt-2"
65
- }, Ie = ["onKeydown"], Le = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, Re = ["disabled", "onClick"], ze = {
66
- key: 3,
67
- class: "tpl:mt-1.5 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
68
- }, Be = {
69
- key: 4,
70
- 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)]"
71
- }, Ve = { class: "tpl:flex-1" }, He = ["onClick"], Ue = {
72
- key: 5,
73
- class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2"
74
- }, We = ["title", "onClick"], Ge = ["onClick"], Ke = {
75
- key: 0,
76
- class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
77
- }, qe = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Je = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, Ye = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Xe = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Ze = {
78
- key: 0,
79
- class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
80
- }, Qe = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, $e = ["title", "onClick"], et = ["title", "onClick"], tt = {
81
- key: 0,
82
- class: "tpl:mt-1.5"
83
- }, nt = ["onKeydown"], rt = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, it = ["disabled", "onClick"], at = {
84
- key: 1,
85
- class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
86
- }, ot = {
87
- key: 2,
88
- 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)]"
89
- }, st = { class: "tpl:flex-1" }, ct = ["onClick"], lt = {
90
- key: 0,
91
- class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
92
- }, ut = { class: "tpl:flex tpl:items-end tpl:gap-2" }, dt = ["placeholder", "onKeydown"], ft = { class: "tpl:flex tpl:shrink-0 tpl:flex-col tpl:gap-1" }, pt = ["disabled", "onClick"], mt = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, ht = {
93
- key: 0,
94
- 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)]"
95
- }, gt = {
96
- key: 1,
97
- 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)]"
98
- }, _t = ["placeholder", "disabled"], vt = ["disabled"], A = /* @__PURE__ */ O(/* @__PURE__ */ c({
99
- __name: "CommentsSidebar",
100
- props: { visible: { type: Boolean } },
101
- emits: ["close", "filterBlock"],
102
- setup(c, { expose: S, emit: O }) {
103
- let A = c, j = O, { format: M } = ie(), { t: N } = se(), P = x(ne, "CommentsSidebar"), yt = x(te, "CommentsSidebar"), F = x(re, "CommentsSidebar"), I = s("unresolved"), L = s(null), R = s(""), z = s(null), B = s(""), V = s(null), H = s(""), U = s(/* @__PURE__ */ new Set()), W = s(null), G = s(null), bt = _(() => yt.userConfig?.id ?? null), xt = _(() => {
104
- let e = /* @__PURE__ */ new Set();
105
- for (let t of P.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
- return e;
107
- });
108
- function St(e) {
109
- return e ? !xt.value.has(e) : !1;
110
- }
111
- let Ct = _(() => I.value !== "block" || !L.value ? !1 : !(P.savedBlockIds?.value.has(L.value) ?? !0)), K = _(() => {
112
- let e = F.comments.value;
113
- return I.value === "unresolved" ? e = e.filter((e) => !e.resolved_at) : I.value === "block" && L.value && (e = e.filter((e) => e.block_id === L.value)), e;
114
- });
115
- b(() => A.visible, (e) => {
116
- e && F.loadComments();
117
- }), b(() => P.state.selectedBlockId, (e) => {
118
- I.value === "block" && e && (L.value = e);
119
- });
120
- function q(e, t) {
121
- I.value = e, L.value = e === "block" ? t ?? null : null;
122
- }
123
- function wt(e) {
124
- q("block", e), j("filterBlock", e);
125
- }
126
- function Tt(e) {
127
- U.value.has(e) ? U.value.delete(e) : U.value.add(e);
128
- }
129
- function Et(e) {
130
- z.value = e, B.value = "", V.value = null, U.value.has(e) || U.value.add(e);
131
- }
132
- function Dt() {
133
- z.value = null, B.value = "";
134
- }
135
- function J(e) {
136
- V.value = e.id, H.value = e.body, z.value = null;
137
- }
138
- function Y() {
139
- V.value = null, H.value = "";
140
- }
141
- function X(e) {
142
- W.value = e;
143
- }
144
- function Ot() {
145
- W.value = null;
146
- }
147
- async function Z() {
148
- let e = R.value.trim();
149
- if (!e) return;
150
- let t = I.value === "block" ? L.value : void 0;
151
- await F.addComment(e, t ?? void 0), R.value = "";
152
- }
153
- async function kt(e) {
154
- let t = B.value.trim();
155
- if (!t) return;
156
- let n = F.comments.value.find((t) => t.id === e);
157
- await F.addComment(t, n?.block_id ?? void 0, e), z.value = null, B.value = "";
158
- }
159
- async function Q(e) {
160
- let t = H.value.trim();
161
- t && (await F.editComment(e, t), V.value = null, H.value = "");
162
- }
163
- async function At(e) {
164
- await F.removeComment(e), W.value = null;
165
- }
166
- async function jt(e) {
167
- await F.toggleResolve(e);
168
- }
169
- function $(e) {
170
- return e.author_identifier === bt.value;
171
- }
172
- function Mt(e) {
173
- return ce(e, N.snapshotHistory) ?? e;
174
- }
175
- function Nt(e) {
176
- e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Z());
177
- }
178
- function Pt(e, t) {
179
- e.key === "Enter" && !e.shiftKey && (e.preventDefault(), kt(t));
180
- }
181
- function Ft(e, t) {
182
- e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Q(t)), e.key === "Escape" && Y();
183
- }
184
- function It() {
185
- i(() => {
186
- G.value?.focus();
187
- });
188
- }
189
- return S({
190
- filterByBlock: wt,
191
- focusNewComment: It
192
- }), (i, s) => (n(), m(y, {
193
- "enter-active-class": "tpl-comments-slide-enter-active",
194
- "enter-from-class": "tpl:translate-x-full",
195
- "enter-to-class": "tpl:translate-x-0",
196
- "leave-active-class": "tpl-comments-slide-leave-active",
197
- "leave-from-class": "tpl:translate-x-0",
198
- "leave-to-class": "tpl:translate-x-full"
199
- }, {
200
- default: l(() => [c.visible ? (n(), u("div", fe, [
201
- g("div", pe, [g("div", me, [
202
- d(h(w), {
203
- size: 13,
204
- "stroke-width": 2
205
- }),
206
- g("span", null, r(h(N).comments.title), 1),
207
- h(F).unresolvedCount.value > 0 ? (n(), u("span", he, r(h(F).unresolvedCount.value), 1)) : p("", !0)
208
- ]), g("button", {
209
- class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
210
- onClick: s[0] ||= (e) => j("close")
211
- }, [d(h(D), {
212
- size: 14,
213
- "stroke-width": 2
214
- })])]),
215
- g("div", ge, [
216
- g("button", {
217
- 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", I.value === "unresolved" ? "tpl-comment-filter--active" : ""]),
218
- onClick: s[1] ||= (e) => q("unresolved")
219
- }, r(h(N).comments.filterUnresolved), 3),
220
- g("button", {
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", I.value === "all" ? "tpl-comment-filter--active" : ""]),
222
- onClick: s[2] ||= (e) => q("all")
223
- }, r(h(N).comments.filterAll), 3),
224
- h(P).state.selectedBlockId ? (n(), u("button", {
225
- key: 0,
226
- 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", I.value === "block" ? "tpl-comment-filter--active" : ""]),
227
- onClick: s[3] ||= (e) => q("block", h(P).state.selectedBlockId ?? void 0)
228
- }, r(h(N).comments.filterBlock), 3)) : p("", !0)
229
- ]),
230
- g("div", _e, [h(F).isLoading.value ? (n(), u("div", ve, [d(h(C), {
231
- class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
232
- size: 24,
233
- "stroke-width": 2
234
- })])) : K.value.length === 0 ? (n(), u("div", ye, [d(h(w), {
235
- size: 32,
236
- "stroke-width": 1.5,
237
- class: "tpl:text-[var(--tpl-text-dim)]"
238
- }), g("p", be, r(I.value === "all" ? h(N).comments.noCommentsHint : h(N).comments.noComments), 1)])) : (n(), u("div", xe, [(n(!0), u(f, null, o(K.value, (i) => (n(), u("div", {
239
- key: i.id,
240
- class: "tpl-comment-thread"
241
- }, [
242
- g("div", Se, [
243
- g("div", Ce, [g("div", we, [
244
- g("span", Te, r($(i) ? h(N).comments.ownedByYou : i.author_name), 1),
245
- g("span", Ee, r(Mt(i.created_at)), 1),
246
- i.updated_at === i.created_at ? p("", !0) : (n(), u("span", De, " (" + r(h(N).comments.edited) + ") ", 1))
247
- ]), g("div", Oe, [
248
- g("button", {
249
- class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
250
- title: i.resolved_at ? h(N).comments.unresolve : h(N).comments.resolve,
251
- onClick: (e) => jt(i.id)
252
- }, [d(h(ue), {
253
- size: 13,
254
- "stroke-width": 2,
255
- class: "tpl-resolve-icon",
256
- style: a({ color: i.resolved_at ? "var(--tpl-primary)" : void 0 })
257
- }, null, 8, ["style"])], 8, ke),
258
- $(i) ? (n(), u("button", {
259
- key: 0,
260
- class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
261
- title: h(N).comments.edit,
262
- onClick: (e) => J(i)
263
- }, [d(h(k), {
264
- size: 12,
265
- "stroke-width": 2
266
- })], 8, Ae)) : p("", !0),
267
- $(i) ? (n(), u("button", {
268
- key: 1,
269
- class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
270
- title: h(N).comments.delete,
271
- onClick: (e) => X(i.id)
272
- }, [d(h(E), {
273
- size: 12,
274
- "stroke-width": 2
275
- })], 8, je)) : p("", !0)
276
- ])]),
277
- d(y, { name: "tpl-resolve" }, {
278
- default: l(() => [i.resolved_at ? (n(), u("div", Me, [d(h(ae), {
279
- size: 10,
280
- "stroke-width": 2.5
281
- }), g("span", null, r(h(M)(h(N).comments.resolvedBy, { name: i.resolved_by_name ?? "" })), 1)])) : p("", !0)]),
282
- _: 2
283
- }, 1024),
284
- i.block_id && St(i.block_id) ? (n(), u("span", Ne, r(h(N).comments.missingBlock), 1)) : i.block_id ? (n(), u("button", {
285
- key: 1,
286
- 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(P).selectBlock(i.block_id ?? "")
288
- }, " Block ", 8, Pe)) : p("", !0),
289
- V.value === i.id ? (n(), u("div", Fe, [t(g("textarea", {
290
- "onUpdate:modelValue": s[4] ||= (e) => H.value = e,
291
- 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
- rows: "3",
293
- onKeydown: (e) => Ft(e, i.id)
294
- }, null, 40, Ie), [[v, H.value]]), g("div", Le, [g("button", {
295
- 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: !H.value.trim() || h(F).isSubmitting.value,
297
- onClick: (e) => Q(i.id)
298
- }, r(h(N).comments.save), 9, Re), g("button", {
299
- 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: s[5] ||= (e) => Y()
301
- }, r(h(N).comments.cancel), 1)])])) : (n(), u("p", ze, r(i.body), 1)),
302
- W.value === i.id ? (n(), u("div", Be, [
303
- g("span", Ve, r(h(N).comments.deleteConfirm), 1),
304
- g("button", {
305
- 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(i.id)
307
- }, r(h(N).comments.delete), 9, He),
308
- g("button", {
309
- class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
310
- onClick: s[6] ||= (e) => Ot()
311
- }, r(h(N).comments.cancel), 1)
312
- ])) : p("", !0),
313
- V.value !== i.id && W.value !== i.id ? (n(), u("div", Ue, [g("button", {
314
- class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
315
- title: h(N).comments.reply,
316
- onClick: (e) => Et(i.id)
317
- }, [d(h(de), {
318
- size: 13,
319
- "stroke-width": 2,
320
- class: "tpl:text-[var(--tpl-primary)]"
321
- })], 8, We), (i.replies?.length ?? 0) > 0 ? (n(), u("button", {
322
- key: 0,
323
- 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) => Tt(i.id)
325
- }, [U.value.has(i.id) ? (n(), m(h(le), {
326
- key: 0,
327
- size: 11,
328
- "stroke-width": 2
329
- })) : (n(), m(h(oe), {
330
- key: 1,
331
- size: 11,
332
- "stroke-width": 2
333
- })), ee(" " + r((i.replies?.length ?? 0) === 1 ? h(M)(h(N).comments.replyOne, { count: String(i.replies?.length ?? 0) }) : h(M)(h(N).comments.replyMany, { count: String(i.replies?.length ?? 0) })), 1)], 8, Ge)) : p("", !0)])) : p("", !0)
334
- ]),
335
- d(y, { name: "tpl-replies" }, {
336
- default: l(() => [U.value.has(i.id) && (i.replies?.length ?? 0) > 0 ? (n(), u("div", Ke, [(n(!0), u(f, null, o(i.replies, (a, o) => (n(), u("div", {
337
- key: a.id,
338
- class: e(["tpl-comment-reply-card tpl:relative tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-2.5", o < (i.replies?.length ?? 0) - 1 ? "tpl:mb-2" : ""])
339
- }, [
340
- g("div", qe, [g("div", Je, [
341
- g("span", Ye, r($(a) ? h(N).comments.ownedByYou : a.author_name), 1),
342
- g("span", Xe, r(Mt(a.created_at)), 1),
343
- a.updated_at === a.created_at ? p("", !0) : (n(), u("span", Ze, " (" + r(h(N).comments.edited) + ") ", 1))
344
- ]), g("div", Qe, [$(a) ? (n(), u("button", {
345
- key: 0,
346
- class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
347
- title: h(N).comments.edit,
348
- onClick: (e) => J(a)
349
- }, [d(h(k), {
350
- size: 11,
351
- "stroke-width": 2
352
- })], 8, $e)) : p("", !0), $(a) ? (n(), u("button", {
353
- key: 1,
354
- class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
355
- title: h(N).comments.delete,
356
- onClick: (e) => X(a.id)
357
- }, [d(h(E), {
358
- size: 11,
359
- "stroke-width": 2
360
- })], 8, et)) : p("", !0)])]),
361
- V.value === a.id ? (n(), u("div", tt, [t(g("textarea", {
362
- "onUpdate:modelValue": s[7] ||= (e) => H.value = e,
363
- 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
- rows: "2",
365
- onKeydown: (e) => Ft(e, a.id)
366
- }, null, 40, nt), [[v, H.value]]), g("div", rt, [g("button", {
367
- 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: !H.value.trim() || h(F).isSubmitting.value,
369
- onClick: (e) => Q(a.id)
370
- }, r(h(N).comments.save), 9, it), g("button", {
371
- 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: s[8] ||= (e) => Y()
373
- }, r(h(N).comments.cancel), 1)])])) : (n(), u("p", at, r(a.body), 1)),
374
- W.value === a.id ? (n(), u("div", ot, [
375
- g("span", st, r(h(N).comments.deleteConfirm), 1),
376
- g("button", {
377
- 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(a.id)
379
- }, r(h(N).comments.delete), 9, ct),
380
- g("button", {
381
- class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
382
- onClick: s[9] ||= (e) => Ot()
383
- }, r(h(N).comments.cancel), 1)
384
- ])) : p("", !0)
385
- ], 2))), 128))])) : p("", !0)]),
386
- _: 2
387
- }, 1024),
388
- d(y, { name: "tpl-replies" }, {
389
- default: l(() => [z.value === i.id ? (n(), u("div", lt, [g("div", ut, [t(g("textarea", {
390
- "onUpdate:modelValue": s[10] ||= (e) => B.value = e,
391
- 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(N).comments.replyPlaceholder,
393
- rows: "2",
394
- onKeydown: (e) => Pt(e, i.id)
395
- }, null, 40, dt), [[v, B.value]]), g("div", ft, [g("button", {
396
- 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: !B.value.trim() || h(F).isSubmitting.value,
398
- onClick: (e) => kt(i.id)
399
- }, [d(h(T), {
400
- size: 14,
401
- "stroke-width": 2
402
- })], 8, pt), g("button", {
403
- 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: s[11] ||= (e) => Dt()
405
- }, [d(h(D), {
406
- size: 14,
407
- "stroke-width": 2
408
- })])])])])) : p("", !0)]),
409
- _: 2
410
- }, 1024)
411
- ]))), 128))]))]),
412
- g("div", mt, [Ct.value ? (n(), u("div", ht, r(h(N).comments.saveTemplateFirst), 1)) : (n(), u("div", gt, [t(g("textarea", {
413
- ref_key: "newCommentInput",
414
- ref: G,
415
- "onUpdate:modelValue": s[12] ||= (e) => R.value = e,
416
- 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(N).comments.placeholder,
418
- disabled: h(F).isSubmitting.value,
419
- rows: "2",
420
- onKeydown: Nt
421
- }, null, 40, _t), [[v, R.value]]), g("button", {
422
- 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: !R.value.trim() || h(F).isSubmitting.value,
424
- onClick: Z
425
- }, [h(F).isSubmitting.value ? (n(), m(h(C), {
426
- key: 0,
427
- class: "tpl-spinner",
428
- size: 16,
429
- "stroke-width": 2
430
- })) : (n(), m(h(T), {
431
- key: 1,
432
- size: 16,
433
- "stroke-width": 2
434
- }))], 8, vt)]))])
435
- ])) : p("", !0)]),
436
- _: 1
437
- }));
438
- }
439
- }), [["__scopeId", "data-v-d204f573"]]);
440
- //#endregion
441
- export { A as default };
@@ -1,92 +0,0 @@
1
- import { r as e } from "./rolldown-runtime-BZGGJVDF.js";
2
- import { M as t, Mt as n, Ot as r, P as i, Q as a, S as o, _ as s, d as c, g as l, it as u, m as d, p as f } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
3
- import { o as p } from "./dist-B1IR0bpH.js";
4
- import { t as m } from "./useI18n-lb2DHDiu.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 = f(() => {
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 = f(() => b.value ? y.value >= b.value : !1), S = f(() => {
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 = f(() => {
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 = f(() => ({
57
- backgroundColor: o.block.backgroundColor,
58
- fontFamily: o.block.fontFamily || "inherit"
59
- })), T = f(() => ({
60
- fontSize: `${o.block.digitFontSize}px`,
61
- fontWeight: "bold",
62
- color: o.block.digitColor,
63
- lineHeight: "1.2"
64
- })), E = f(() => ({
65
- fontSize: `${o.block.labelFontSize}px`,
66
- color: o.block.labelColor,
67
- marginTop: "4px"
68
- })), D = f(() => ({
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 ? (t(), s("div", g, n(u(v).countdown.hidden), 1)) : x.value ? (t(), s("div", {
74
- key: 2,
75
- style: r(w.value),
76
- class: "tpl:py-4 tpl:text-center"
77
- }, [d("span", { style: r({
78
- fontSize: `${e.block.digitFontSize}px`,
79
- color: e.block.digitColor
80
- }) }, n(e.block.expiredMessage), 5)], 4)) : (t(), s("div", {
81
- key: 3,
82
- style: r(w.value),
83
- class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:py-4"
84
- }, [(t(!0), s(c, null, i(C.value, (i, a) => (t(), s(c, { key: i.label }, [a > 0 ? (t(), s("span", {
85
- key: 0,
86
- style: r(D.value),
87
- class: "tpl:self-start"
88
- }, n(e.block.separator), 5)) : l("", !0), d("div", _, [d("div", { style: r(T.value) }, n(i.value), 5), d("div", { style: r(E.value) }, n(i.label), 5)])], 64))), 128))], 4)) : (t(), s("div", h, n(u(v).countdown.setDate), 1));
89
- }
90
- }), y = /* @__PURE__ */ e({ default: () => b }), b = v;
91
- //#endregion
92
- export { y as n, b as t };