@aswin.dev/editor 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/README.md +3 -3
  2. package/dist/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-COL6Wm7p.js} +37 -37
  3. package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-DWGPVtvC.js} +68 -68
  4. package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-duUFSfDf.js} +22 -22
  5. package/dist/{BlockA11yBadge-CXDLqkcJ.js → BlockA11yBadge-Qs6HtXid.js} +12 -12
  6. package/dist/CloudEditor-CFldoCOb.js +1207 -0
  7. package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-Bw-lbt61.js} +21 -21
  8. package/dist/CommentsSidebar-BaD5F53-.js +436 -0
  9. package/dist/CountdownBlock-DaYGxKqo.js +92 -0
  10. package/dist/CountdownToolbar-Dg4F8MTk.js +210 -0
  11. package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-BSH7uNP_.js} +58 -58
  12. package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-Ba2pfF57.js} +2 -2
  13. package/dist/{ModuleBrowserModal-DrUFMTDx.js → ModuleBrowserModal-6phxZSKI.js} +80 -80
  14. package/dist/ModulePreviewCanvas-BW8L3eQX.js +108 -0
  15. package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-BpUzQOJt.js} +87 -87
  16. package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-DNSzAB-I.js} +182 -182
  17. package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-CrqPQdnk.js} +38 -38
  18. package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-zMQTpez7.js} +28 -28
  19. package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-Do-A5rYU.js} +45 -50
  20. package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-CS7o62zS.js} +75 -75
  21. package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-DGj_9V1u.js} +28 -28
  22. package/dist/{TitleEditor-fStSADI-.js → TitleEditor-C7IDnAoS.js} +68 -68
  23. package/dist/{TplModal-BwSfxIHf.js → TplModal-BAsVzcTb.js} +14 -14
  24. package/dist/{accessibility-e8JYu_zd.js → accessibility-BU09xZrQ.js} +1 -1
  25. package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-C6LDKvmd.js} +19 -5
  26. package/dist/bundle-stats.json +7 -7
  27. package/dist/{check-Da05j8yl.js → check-DJrpDKO_.js} +1 -1
  28. package/dist/{chevron-down-R2uY34iD.js → chevron-down-C5oBUhT8.js} +1 -1
  29. package/dist/chevron-right-BqCptpdp.js +10 -0
  30. package/dist/{circle-alert-DZuGWPX-.js → circle-alert-ZQQc98HC.js} +1 -1
  31. package/dist/{clock-CRp2sIub.js → clock-ik2pRJKG.js} +1 -1
  32. package/dist/{cloud-DEk_b4CR.js → cloud-6ZmAvF0j.js} +485 -427
  33. package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-ClREiSx3.js} +6 -6
  34. package/dist/{de-Brqvgr43.js → de-DWcgp-7T.js} +209 -1
  35. package/dist/{dist-BaQIYPsn.js → dist-BUzw1buG.js} +1 -1
  36. package/dist/{dist-DjviJBCi.js → dist-BZyY-SS4.js} +1 -1
  37. package/dist/{dist-D6uC2xhi.js → dist-BadNx4qo.js} +1 -1
  38. package/dist/{dist-aRzjfSRN.js → dist-BesOh2mk.js} +1 -1
  39. package/dist/{dist-D90y8dvT.js → dist-Bz3M4RXG.js} +3 -3
  40. package/dist/dist-C04s_fLA.js +563 -0
  41. package/dist/{dist-DDJIWTRY.js → dist-C3T2AKtB.js} +1 -1
  42. package/dist/{dist-BFawx6IS.js → dist-C9ckKEZL.js} +51 -51
  43. package/dist/{dist-us-RpCWN.js → dist-CBItRG-Z.js} +1 -1
  44. package/dist/{dist-wzMIGj-D.js → dist-COSzWQUs.js} +1 -1
  45. package/dist/dist-CivF9P8b.js +382 -0
  46. package/dist/{dist-Cp0zXPAD.js → dist-DtiDUrX-.js} +1 -1
  47. package/dist/{dist-KoBJjK1G.js → dist-Dzt5foyL.js} +1 -1
  48. package/dist/{en-WDVp87TE.js → en-Cxd4fhNm.js} +209 -1
  49. package/dist/{extensions-CUcl9Ok4.js → extensions-D__hOlV1.js} +106 -106
  50. package/dist/{image-up-MBZKKg9p.js → image-up-DT7gcJLN.js} +1 -1
  51. package/dist/index.d.ts +88 -11
  52. package/dist/{info-CJEC7piy.js → info-BSPGcsSM.js} +1 -1
  53. package/dist/keys-CvX8D-8C.js +10 -0
  54. package/dist/{loader-circle-DsY5Yg33.js → loader-circle-Balo8p3d.js} +1 -1
  55. package/dist/{message-circle-yElBbR2C.js → message-circle-B39qAHxs.js} +1 -1
  56. package/dist/pencil-BZJPNYWR.js +10 -0
  57. package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-DwDqGUM0.js} +1 -1
  58. package/dist/{scan-line-D0vcUekt.js → scan-line-CzfFJO1o.js} +1 -1
  59. package/dist/{send-DH4oDQqC.js → send-D2eSo4GH.js} +1 -1
  60. package/dist/{shield-check-CfJgs2Hd.js → shield-check-jkpgcC0-.js} +1 -1
  61. package/dist/{sparkles-CvRXGqFs.js → sparkles-Chm5CZfb.js} +1 -1
  62. package/dist/style.css +1 -1
  63. package/dist/styleConstants-34eUKPOZ.js +55 -0
  64. package/dist/styles-B4tjX5SP.js +5224 -0
  65. package/dist/templatical-editor.js +189 -126
  66. package/dist/{text-align-start-BT9VUDxK.js → text-align-start-CzBnJsW8.js} +1 -1
  67. package/dist/{trash-2-DbP2Y6t2.js → trash-2-CtK2apEH.js} +1 -1
  68. package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-KpDVNbpn.js} +1 -1
  69. package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-DOKSZql1.js} +2 -2
  70. package/dist/{useEditorCore-C6ost42Q.js → useEditorCore-wslttMH-.js} +2425 -2250
  71. package/dist/{useI18n-lb2DHDiu.js → useI18n-C2xQZ6K9.js} +2 -2
  72. package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-DX0XG5V9.js} +5 -5
  73. package/dist/{vue.runtime.esm-bundler-DpvJL-nX.js → vue.runtime.esm-bundler-CjauPXjj.js} +1 -1
  74. package/dist/{x-u2oVmjN_.js → x-BkaOMosX.js} +1 -1
  75. package/package.json +10 -10
  76. package/dist/CloudEditor-BCz1ZTYC.js +0 -1172
  77. package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
  78. package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
  79. package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
  80. package/dist/ModulePreviewCanvas-CHdOwV_4.js +0 -106
  81. package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js +0 -97
  82. package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js.map +0 -1
  83. package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js +0 -59
  84. package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js.map +0 -1
  85. package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js +0 -33
  86. package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js.map +0 -1
  87. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js +0 -1143
  88. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js.map +0 -1
  89. package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js +0 -51
  90. package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js.map +0 -1
  91. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js +0 -93
  92. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js.map +0 -1
  93. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
  94. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js.map +0 -1
  95. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js +0 -195
  96. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js.map +0 -1
  97. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js +0 -107
  98. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js.map +0 -1
  99. package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js +0 -423
  100. package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js.map +0 -1
  101. package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js +0 -544
  102. package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js.map +0 -1
  103. package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js +0 -106
  104. package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js.map +0 -1
  105. package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js +0 -119
  106. package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js.map +0 -1
  107. package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js +0 -171
  108. package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js.map +0 -1
  109. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js +0 -22
  110. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js.map +0 -1
  111. package/dist/cdn/chunks/de-Ce-LbJ2J.js +0 -89
  112. package/dist/cdn/chunks/de-Ce-LbJ2J.js.map +0 -1
  113. package/dist/cdn/chunks/de-D8CnZxV9.js +0 -523
  114. package/dist/cdn/chunks/de-D8CnZxV9.js.map +0 -1
  115. package/dist/cdn/chunks/de-RQrZR56a.js +0 -209
  116. package/dist/cdn/chunks/de-RQrZR56a.js.map +0 -1
  117. package/dist/cdn/chunks/draggable-Bcb86AsV.js +0 -11572
  118. package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +0 -1
  119. package/dist/cdn/chunks/emojiData-EMFlj6FJ.js +0 -19
  120. package/dist/cdn/chunks/emojiData-EMFlj6FJ.js.map +0 -1
  121. package/dist/cdn/chunks/en-8FHaQv4V.js +0 -523
  122. package/dist/cdn/chunks/en-8FHaQv4V.js.map +0 -1
  123. package/dist/cdn/chunks/en-Bl1ecfRF.js +0 -209
  124. package/dist/cdn/chunks/en-Bl1ecfRF.js.map +0 -1
  125. package/dist/cdn/chunks/en-DiCWK5fG.js +0 -89
  126. package/dist/cdn/chunks/en-DiCWK5fG.js.map +0 -1
  127. package/dist/cdn/chunks/extensions-DIxF31tA.js +0 -598
  128. package/dist/cdn/chunks/extensions-DIxF31tA.js.map +0 -1
  129. package/dist/cdn/chunks/features-DEMb13KS.js +0 -6814
  130. package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
  131. package/dist/cdn/chunks/icons-CsLTcirh.js +0 -700
  132. package/dist/cdn/chunks/icons-CsLTcirh.js.map +0 -1
  133. package/dist/cdn/chunks/liquid.browser-lQbkge2E.js +0 -3279
  134. package/dist/cdn/chunks/liquid.browser-lQbkge2E.js.map +0 -1
  135. package/dist/cdn/chunks/media-library-CVaNvhpM.js +0 -6014
  136. package/dist/cdn/chunks/media-library-CVaNvhpM.js.map +0 -1
  137. package/dist/cdn/chunks/pusher-CDbNlZBE.js +0 -2508
  138. package/dist/cdn/chunks/pusher-CDbNlZBE.js.map +0 -1
  139. package/dist/cdn/chunks/quality-BaBfc54_.js +0 -1456
  140. package/dist/cdn/chunks/quality-BaBfc54_.js.map +0 -1
  141. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js +0 -32
  142. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js.map +0 -1
  143. package/dist/cdn/chunks/renderer-CUxvx7ro.js +0 -548
  144. package/dist/cdn/chunks/renderer-CUxvx7ro.js.map +0 -1
  145. package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +0 -20
  146. package/dist/cdn/chunks/src-CRaqN-p8.js +0 -497
  147. package/dist/cdn/chunks/src-CRaqN-p8.js.map +0 -1
  148. package/dist/cdn/chunks/styleConstants-DP1VOca8.js +0 -57
  149. package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +0 -1
  150. package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
  151. package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
  152. package/dist/cdn/chunks/tiptap-ZhwKyFp7.js +0 -14654
  153. package/dist/cdn/chunks/tiptap-ZhwKyFp7.js.map +0 -1
  154. package/dist/cdn/editor.css +0 -2
  155. package/dist/cdn/editor.js +0 -250
  156. package/dist/cdn/editor.js.map +0 -1
  157. package/dist/dist-B1IR0bpH.js +0 -326
  158. package/dist/dist-DJmnUmW9.js +0 -362
  159. package/dist/keys-ciNfSSGj.js +0 -10
  160. package/dist/styleConstants-fWzlIIwN.js +0 -55
  161. package/dist/styles-DEXEkBvg.js +0 -3176
  162. /package/dist/{_plugin-vue_export-helper-B0hnzhyu.js → _plugin-vue_export-helper-BVAJ4lgT.js} +0 -0
  163. /package/dist/{de-DCaaCE5s.js → de-GOtR9DwW.js} +0 -0
  164. /package/dist/{dist-iLBdeBDR.js → dist-DXa1uAMh.js} +0 -0
  165. /package/dist/{emojiData-PQyVa4bU.js → emojiData-DrBuvEoP.js} +0 -0
  166. /package/dist/{en-DXCyK4-X.js → en-dFFQVzNn.js} +0 -0
  167. /package/dist/{formatRelativeTime-BOEf47hq.js → formatRelativeTime-BhhO8yCl.js} +0 -0
  168. /package/dist/{liquid.browser-CdMv1BTn.js → liquid.browser-BvCyLQII.js} +0 -0
  169. /package/dist/{readableTextColor-CY3SiRnt.js → readableTextColor-DVuzNX1y.js} +0 -0
@@ -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 };