@templatical/editor 0.13.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/dist/{AiChatSidebar-B0-U5-sb.js → AiChatSidebar-BIKvYREk.js} +57 -56
  2. package/dist/{AiFeatureMenu-DxDwLS8B.js → AiFeatureMenu-QbD82crt.js} +23 -23
  3. package/dist/{BlockIssueBadge-C-EPqWsh.js → BlockIssueBadge-B3xVgMTh.js} +11 -11
  4. package/dist/CloudEditor-DptuSf7A.js +1234 -0
  5. package/dist/{CollaboratorBar-DgwjisX2.js → CollaboratorBar-DrA_K69w.js} +20 -20
  6. package/dist/{CommentsSidebar-CpRLN40c.js → CommentsSidebar-D_tSGvTX.js} +158 -157
  7. package/dist/CountdownBlock-apiYUhkQ.js +92 -0
  8. package/dist/CountdownToolbar-CS0axcjz.js +210 -0
  9. package/dist/{DesignReferenceSidebar-BgPDbOsl.js → DesignReferenceSidebar-DWYK9nTk.js} +58 -57
  10. package/dist/{IssuesPanel-I0z6k6-H.js → IssuesPanel-CR1MPaDE.js} +40 -40
  11. package/dist/{LoadingTrack-C7mGWPHS.js → LoadingTrack-DsecR8Rw.js} +1 -1
  12. package/dist/MergeTagSuggestion-CH2SUxBo.js +1327 -0
  13. package/dist/ModuleBrowserModal-D45rBj5C.js +202 -0
  14. package/dist/{ModulePreviewCanvas-Dni9kK4j.js → ModulePreviewCanvas-BiQ6B2-l.js} +29 -29
  15. package/dist/{NumberWithSuffix-D3fdj0iO.js → NumberWithSuffix-CrA6quxx.js} +143 -142
  16. package/dist/ParagraphEditor-1NaUJpZO.js +721 -0
  17. package/dist/{RichTextEditorContent-Q5altsx1.js → RichTextEditorContent-BqLHIZY7.js} +45 -44
  18. package/dist/{SaveModuleDialog-C38VqN2T.js → SaveModuleDialog-B0sPOTgO.js} +38 -37
  19. package/dist/{SnapshotHistory-ByloTpwh.js → SnapshotHistory-DslVzmSb.js} +34 -33
  20. package/dist/{TemplateScoringPanel-CUxiPtEf.js → TemplateScoringPanel-CZ62rGHz.js} +83 -82
  21. package/dist/{TestEmailModal-BvZBMBad.js → TestEmailModal-DWGniJVu.js} +22 -21
  22. package/dist/TitleEditor-D4t_gZZJ.js +193 -0
  23. package/dist/{TplModal-BYb-X5Bj.js → TplModal-Br2VG6cn.js} +14 -13
  24. package/dist/{blockTypeIcons-CyAom3iI.js → blockTypeIcons-CXhCS5WV.js} +5 -5
  25. package/dist/bundle-stats.json +8 -8
  26. package/dist/cdn/chunks/{AiFeatureMenu-BSoy-SoF.js → AiFeatureMenu-3Slo_LGA.js} +8 -8
  27. package/dist/cdn/chunks/{AiFeatureMenu-BSoy-SoF.js.map → AiFeatureMenu-3Slo_LGA.js.map} +1 -1
  28. package/dist/cdn/chunks/{BlockIssueBadge-BQDUuJxy.js → BlockIssueBadge-BxwEiiF3.js} +5 -5
  29. package/dist/cdn/chunks/{BlockIssueBadge-BQDUuJxy.js.map → BlockIssueBadge-BxwEiiF3.js.map} +1 -1
  30. package/dist/cdn/chunks/{CloudEditor-BZuzsQOZ.js → CloudEditor-DFIFWD9G.js} +163 -161
  31. package/dist/cdn/chunks/CloudEditor-DFIFWD9G.js.map +1 -0
  32. package/dist/cdn/chunks/{CollaboratorBar-DUpSrtDr.js → CollaboratorBar-Cu3vuN66.js} +4 -4
  33. package/dist/cdn/chunks/{CollaboratorBar-DUpSrtDr.js.map → CollaboratorBar-Cu3vuN66.js.map} +1 -1
  34. package/dist/cdn/chunks/{CountdownBlock-DChGTAsH.js → CountdownBlock-BEVAJQtQ.js} +3 -3
  35. package/dist/cdn/chunks/{CountdownBlock-DChGTAsH.js.map → CountdownBlock-BEVAJQtQ.js.map} +1 -1
  36. package/dist/cdn/chunks/{CountdownToolbar-C6gX2SJr.js → CountdownToolbar-CI2sQZv5.js} +4 -4
  37. package/dist/cdn/chunks/{CountdownToolbar-C6gX2SJr.js.map → CountdownToolbar-CI2sQZv5.js.map} +1 -1
  38. package/dist/cdn/chunks/{IssuesPanel-Bo1uhdSe.js → IssuesPanel-BdeDoTcn.js} +11 -11
  39. package/dist/cdn/chunks/{IssuesPanel-Bo1uhdSe.js.map → IssuesPanel-BdeDoTcn.js.map} +1 -1
  40. package/dist/cdn/chunks/MergeTagSuggestion-BsCAo4Co.js +213 -0
  41. package/dist/cdn/chunks/MergeTagSuggestion-BsCAo4Co.js.map +1 -0
  42. package/dist/cdn/chunks/{ModuleBrowserModal-a-tZRCcD.js → ModuleBrowserModal-Dz-I5zfj.js} +11 -8
  43. package/dist/cdn/chunks/{ModuleBrowserModal-a-tZRCcD.js.map → ModuleBrowserModal-Dz-I5zfj.js.map} +1 -1
  44. package/dist/cdn/chunks/{ModulePreviewCanvas-Bm6k0Op0.js → ModulePreviewCanvas-BfinyuAN.js} +21 -21
  45. package/dist/cdn/chunks/{ModulePreviewCanvas-Bm6k0Op0.js.map → ModulePreviewCanvas-BfinyuAN.js.map} +1 -1
  46. package/dist/cdn/chunks/{NumberWithSuffix-HTbuD3VJ.js → NumberWithSuffix-CDjEa08X.js} +4 -4
  47. package/dist/cdn/chunks/{NumberWithSuffix-HTbuD3VJ.js.map → NumberWithSuffix-CDjEa08X.js.map} +1 -1
  48. package/dist/cdn/chunks/{ParagraphEditor-pGrfSccu.js → ParagraphEditor-B3fG0vge.js} +130 -110
  49. package/dist/cdn/chunks/ParagraphEditor-B3fG0vge.js.map +1 -0
  50. package/dist/cdn/chunks/{RichTextEditorContent-D7XZix_1.js → RichTextEditorContent-C6YPCp9j.js} +4 -4
  51. package/dist/cdn/chunks/{RichTextEditorContent-D7XZix_1.js.map → RichTextEditorContent-C6YPCp9j.js.map} +1 -1
  52. package/dist/cdn/chunks/{SaveModuleDialog-C9PQ9x6j.js → SaveModuleDialog-C6UIIVAM.js} +6 -6
  53. package/dist/cdn/chunks/{SaveModuleDialog-C9PQ9x6j.js.map → SaveModuleDialog-C6UIIVAM.js.map} +1 -1
  54. package/dist/cdn/chunks/{TitleEditor-BvFbL16O.js → TitleEditor-BiZbLYF1.js} +62 -46
  55. package/dist/cdn/chunks/TitleEditor-BiZbLYF1.js.map +1 -0
  56. package/dist/cdn/chunks/blockTypeIcons-BernVG06.js +22 -0
  57. package/dist/cdn/chunks/{blockTypeIcons-Kd1MT0u8.js.map → blockTypeIcons-BernVG06.js.map} +1 -1
  58. package/dist/{de-C2wOXoxs.js → cdn/chunks/de-LsV0u1tP.js} +19 -1
  59. package/dist/cdn/chunks/de-LsV0u1tP.js.map +1 -0
  60. package/dist/cdn/chunks/{draggable-Bci-fq8y.js → draggable-kG-D5Xsm.js} +19 -10
  61. package/dist/cdn/chunks/draggable-kG-D5Xsm.js.map +1 -0
  62. package/dist/cdn/chunks/{en-dR7zfNC3.js → en-Bb8X1bOs.js} +18 -2
  63. package/dist/cdn/chunks/en-Bb8X1bOs.js.map +1 -0
  64. package/dist/cdn/chunks/extensions-Drp8UDc6.js +421 -0
  65. package/dist/cdn/chunks/extensions-Drp8UDc6.js.map +1 -0
  66. package/dist/cdn/chunks/{features-DU6lA8l1.js → features-Dpczf9Su.js} +1171 -994
  67. package/dist/cdn/chunks/features-Dpczf9Su.js.map +1 -0
  68. package/dist/cdn/chunks/{icons-BjHUZZyJ.js → icons-CuxnJiGQ.js} +170 -164
  69. package/dist/cdn/chunks/icons-CuxnJiGQ.js.map +1 -0
  70. package/dist/cdn/chunks/{liquid.browser-DKKBzRQu.js → liquid.browser-BJOEu6Cg.js} +693 -678
  71. package/dist/cdn/chunks/liquid.browser-BJOEu6Cg.js.map +1 -0
  72. package/dist/cdn/chunks/{media-library-Byelliig.js → media-library-CiYl_BO7.js} +556 -554
  73. package/dist/cdn/chunks/{media-library-Byelliig.js.map → media-library-CiYl_BO7.js.map} +1 -1
  74. package/dist/cdn/chunks/{pt-BR-BZ86xqK6.js → pt-BR-BwJY_cvb.js} +18 -2
  75. package/dist/cdn/chunks/pt-BR-BwJY_cvb.js.map +1 -0
  76. package/dist/cdn/chunks/{pusher-BICWUP2j.js → pusher-CIwiKF8H.js} +9 -6
  77. package/dist/cdn/chunks/{pusher-BICWUP2j.js.map → pusher-CIwiKF8H.js.map} +1 -1
  78. package/dist/cdn/chunks/quality-CNjGxBG0.js +2176 -0
  79. package/dist/cdn/chunks/{quality-DNnYAntR.js.map → quality-CNjGxBG0.js.map} +1 -1
  80. package/dist/cdn/chunks/{renderer-CZKO-Tav.js → renderer-CFkg8h-K.js} +40 -31
  81. package/dist/cdn/chunks/renderer-CFkg8h-K.js.map +1 -0
  82. package/dist/cdn/chunks/{src-DsqSXXjk.js → src-DRpKu4Dy.js} +11 -11
  83. package/dist/cdn/chunks/{src-DsqSXXjk.js.map → src-DRpKu4Dy.js.map} +1 -1
  84. package/dist/cdn/chunks/styles-B7wryV0l.js +3943 -0
  85. package/dist/cdn/chunks/styles-B7wryV0l.js.map +1 -0
  86. package/dist/cdn/chunks/{tiptap-CwScfbsM.js → tiptap-DF9PEiqH.js} +5429 -5373
  87. package/dist/cdn/chunks/tiptap-DF9PEiqH.js.map +1 -0
  88. package/dist/cdn/editor.css +1 -1
  89. package/dist/cdn/editor.js +117 -115
  90. package/dist/cdn/editor.js.map +1 -1
  91. package/dist/{check-BRzXxFHr.js → check-rl7ok6uJ.js} +1 -1
  92. package/dist/{chevron-down-DmEgzmYT.js → chevron-down-BKe__NOD.js} +1 -1
  93. package/dist/{circle-alert-BStvZr3O.js → circle-alert-C8xmpMsK.js} +1 -1
  94. package/dist/{clock-Blwp_1R6.js → clock-BW4JuDCN.js} +1 -1
  95. package/dist/{cloud-_olro76D.js → cloud-BQusL53H.js} +208 -208
  96. package/dist/createLucideIcon-Dx-EjR9r.js +43 -0
  97. package/dist/{cdn/chunks/de-C2wOXoxs.js → de-LsV0u1tP.js} +17 -3
  98. package/dist/{dist-BlG7k25W.js → dist-B5Sov3sS.js} +7 -7
  99. package/dist/dist-BEWiuOMi.js +251 -0
  100. package/dist/{dist-b7Ak-CuM.js → dist-BFmE-7hB.js} +2 -2
  101. package/dist/{dist-o73iaGqy.js → dist-BMoa33wT.js} +2 -2
  102. package/dist/{dist-BctFrpeA.js → dist-BibU4HNl.js} +74 -65
  103. package/dist/{dist-D6x1cQeh.js → dist-BsCGIDSt.js} +103 -102
  104. package/dist/dist-CNLKj9wa.js +5 -0
  105. package/dist/{dist-DULfKmTh.js → dist-CNXDNYQn.js} +729 -695
  106. package/dist/{dist-412xXefB.js → dist-COG3IdPK.js} +3 -3
  107. package/dist/{dist-Cz79qrLL.js → dist-CQZxDvFw.js} +3 -3
  108. package/dist/{dist-BwgjpLfr.js → dist-CRsjOQM-.js} +2 -2
  109. package/dist/dist-CTT6WYJ6.js +134 -0
  110. package/dist/dist-Cqa6aeAJ.js +5 -0
  111. package/dist/{dist-BCQZZUE9.js → dist-SXJJ2v41.js} +2 -2
  112. package/dist/{dist-DhKTdU52.js → dist-itdjZraK.js} +1445 -1420
  113. package/dist/{en-dR7zfNC3.js → en-Bb8X1bOs.js} +17 -1
  114. package/dist/extensions-DwaZAqm6.js +423 -0
  115. package/dist/{image-up-BFPbw_Zq.js → image-up-BwBCmQ4P.js} +1 -1
  116. package/dist/index.d.ts +17 -0
  117. package/dist/{info-B_qLEBN2.js → info-TCn7uWR5.js} +1 -1
  118. package/dist/keys-Cv8-8GsD.js +10 -0
  119. package/dist/{liquid.browser-CVjP5Mex.js → liquid.browser-DZLtv26k.js} +692 -677
  120. package/dist/{list-checks-CGg7JxPm.js → list-checks-CSrOWNgq.js} +1 -1
  121. package/dist/{loader-circle-CDF8eR_Q.js → loader-circle-BLmicnPG.js} +1 -1
  122. package/dist/{message-circle-C3cHsCJl.js → message-circle-C9hHMQCI.js} +1 -1
  123. package/dist/{pt-BR-BZ86xqK6.js → pt-BR-BwJY_cvb.js} +17 -1
  124. package/dist/{refresh-cw-Butml7Q4.js → refresh-cw-D1JQ1LNa.js} +1 -1
  125. package/dist/runtime-dom.esm-bundler-BzuoCyNp.js +523 -0
  126. package/dist/scan-line-DgijVq9y.js +31 -0
  127. package/dist/{send-k7npFJNO.js → send-DjPdq69F.js} +1 -1
  128. package/dist/{shield-check-CV6GbmCu.js → shield-check-Bqluu8FS.js} +1 -1
  129. package/dist/{sparkles-C965Xop4.js → sparkles-M4azPVSP.js} +1 -1
  130. package/dist/style.css +1 -1
  131. package/dist/styles-D7fQ7f_1.js +4164 -0
  132. package/dist/templatical-editor.js +155 -152
  133. package/dist/{text-align-start-Bxnps8fH.js → text-align-start-CMya5pCQ.js} +11 -11
  134. package/dist/{trash-2-DpGb7fIt.js → trash-2-C-81rkLS.js} +1 -1
  135. package/dist/{triangle-alert-BKYElAwz.js → triangle-alert-BuRWnynk.js} +1 -1
  136. package/dist/{upload-BF7sxd1_.js → upload-CWBIoLd4.js} +1 -1
  137. package/dist/{useAliveFlag-BinvbqQR.js → useAliveFlag-CECL_OUb.js} +1 -1
  138. package/dist/{useCloudI18n-L3H2XvdW.js → useCloudI18n-AKCy98qD.js} +2 -2
  139. package/dist/{useEditorCore-DKYZ7aKk.js → useEditorCore-vcWLdnjN.js} +1480 -1310
  140. package/dist/{useI18n-CTs_bP9d.js → useI18n-C-TDeJBt.js} +2 -2
  141. package/dist/{useMergeTag-e3RSY-s3.js → useMergeTag-DSrBY0-2.js} +6 -6
  142. package/dist/usePopoverRoot-DKUDnr55.js +8 -0
  143. package/dist/{vue.runtime.esm-bundler-B2k01iQh.js → vue.runtime.esm-bundler-l0XAqiyv.js} +639 -1151
  144. package/dist/{x-CGjkjdKK.js → x-CQSvXnGR.js} +1 -1
  145. package/package.json +27 -27
  146. package/dist/CloudEditor-DaEfipBn.js +0 -1230
  147. package/dist/CountdownBlock-DO9fziwf.js +0 -92
  148. package/dist/CountdownToolbar-BeII06yJ.js +0 -210
  149. package/dist/ModuleBrowserModal-DsZRr87F.js +0 -198
  150. package/dist/ParagraphEditor-CZ-cmhX3.js +0 -700
  151. package/dist/TitleEditor-DbNOcvhR.js +0 -177
  152. package/dist/cdn/chunks/CloudEditor-BZuzsQOZ.js.map +0 -1
  153. package/dist/cdn/chunks/ParagraphEditor-pGrfSccu.js.map +0 -1
  154. package/dist/cdn/chunks/TitleEditor-BvFbL16O.js.map +0 -1
  155. package/dist/cdn/chunks/blockTypeIcons-Kd1MT0u8.js +0 -22
  156. package/dist/cdn/chunks/de-C2wOXoxs.js.map +0 -1
  157. package/dist/cdn/chunks/draggable-Bci-fq8y.js.map +0 -1
  158. package/dist/cdn/chunks/en-dR7zfNC3.js.map +0 -1
  159. package/dist/cdn/chunks/extensions-CuUjSmuA.js +0 -605
  160. package/dist/cdn/chunks/extensions-CuUjSmuA.js.map +0 -1
  161. package/dist/cdn/chunks/features-DU6lA8l1.js.map +0 -1
  162. package/dist/cdn/chunks/icons-BjHUZZyJ.js.map +0 -1
  163. package/dist/cdn/chunks/liquid.browser-DKKBzRQu.js.map +0 -1
  164. package/dist/cdn/chunks/pt-BR-BZ86xqK6.js.map +0 -1
  165. package/dist/cdn/chunks/quality-DNnYAntR.js +0 -2176
  166. package/dist/cdn/chunks/renderer-CZKO-Tav.js.map +0 -1
  167. package/dist/cdn/chunks/styles-DiAdtiz9.js +0 -3428
  168. package/dist/cdn/chunks/styles-DiAdtiz9.js.map +0 -1
  169. package/dist/cdn/chunks/tiptap-CwScfbsM.js.map +0 -1
  170. package/dist/createLucideIcon-CmPAC-gt.js +0 -43
  171. package/dist/dist-BNEdeWub.js +0 -5
  172. package/dist/dist-Cgry6fNv.js +0 -382
  173. package/dist/dist-u0iIJH3V.js +0 -5
  174. package/dist/extensions-XPlNAKIL.js +0 -1720
  175. package/dist/keys-mFiJ5N0_.js +0 -10
  176. package/dist/scan-line-XYEqim_E.js +0 -25
  177. package/dist/styles-D0RCAWhB.js +0 -3647
  178. package/dist/usePopoverRoot-DVh7NY1q.js +0 -8
@@ -1,92 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { A as t, M as n, X as r, b as i, d as a, f as o, h as s, l as c, m as l, ot as u, rt as d, st as f } from "./vue.runtime.esm-bundler-B2k01iQh.js";
3
- import { c as p } from "./dist-Cgry6fNv.js";
4
- import { t as m } from "./useI18n-CTs_bP9d.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__*/ i({
13
- __name: "CountdownBlock",
14
- props: {
15
- block: {},
16
- viewport: {}
17
- },
18
- setup(e) {
19
- let i = e, { t: v } = m(), y = r(Date.now());
20
- p(() => {
21
- y.value = Date.now();
22
- }, 1e3);
23
- let b = a(() => {
24
- if (!i.block.targetDate) return null;
25
- let e = new Date(i.block.targetDate);
26
- return isNaN(e.getTime()) ? null : e.getTime();
27
- }), x = a(() => b.value ? y.value >= b.value : !1), S = a(() => {
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 = a(() => {
42
- let e = [];
43
- return i.block.showDays && e.push({
44
- value: String(S.value.days).padStart(2, "0"),
45
- label: i.block.labelDays
46
- }), i.block.showHours && e.push({
47
- value: String(S.value.hours).padStart(2, "0"),
48
- label: i.block.labelHours
49
- }), i.block.showMinutes && e.push({
50
- value: String(S.value.minutes).padStart(2, "0"),
51
- label: i.block.labelMinutes
52
- }), i.block.showSeconds && e.push({
53
- value: String(S.value.seconds).padStart(2, "0"),
54
- label: i.block.labelSeconds
55
- }), e;
56
- }), w = a(() => ({
57
- backgroundColor: i.block.backgroundColor,
58
- fontFamily: i.block.fontFamily || "inherit"
59
- })), T = a(() => ({
60
- fontSize: `${i.block.digitFontSize}px`,
61
- fontWeight: "bold",
62
- color: i.block.digitColor,
63
- lineHeight: "1.2"
64
- })), E = a(() => ({
65
- fontSize: `${i.block.labelFontSize}px`,
66
- color: i.block.labelColor,
67
- marginTop: "4px"
68
- })), D = a(() => ({
69
- fontSize: `${i.block.digitFontSize}px`,
70
- color: i.block.digitColor,
71
- fontFamily: i.block.fontFamily || "inherit"
72
- }));
73
- return (r, i) => e.block.targetDate ? x.value && e.block.hideOnExpiry ? (t(), s("div", g, f(d(v).countdown.hidden), 1)) : x.value ? (t(), s("div", {
74
- key: 2,
75
- style: u(w.value),
76
- class: "tpl:py-4 tpl:text-center"
77
- }, [o("span", { style: u({
78
- fontSize: `${e.block.digitFontSize}px`,
79
- color: e.block.digitColor
80
- }) }, f(e.block.expiredMessage), 5)], 4)) : (t(), s("div", {
81
- key: 3,
82
- style: u(w.value),
83
- class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:py-4"
84
- }, [(t(!0), s(c, null, n(C.value, (n, r) => (t(), s(c, { key: n.label }, [r > 0 ? (t(), s("span", {
85
- key: 0,
86
- style: u(D.value),
87
- class: "tpl:self-start"
88
- }, f(e.block.separator), 5)) : l("", !0), o("div", _, [o("div", { style: u(T.value) }, f(n.value), 5), o("div", { style: u(E.value) }, f(n.label), 5)])], 64))), 128))], 4)) : (t(), s("div", h, f(d(v).countdown.setDate), 1));
89
- }
90
- }), y = /* @__PURE__ */ e({ default: () => b }), b = v;
91
- //#endregion
92
- export { y as n, b as t };
@@ -1,210 +0,0 @@
1
- import { A as e, M as t, _ as n, at as r, b as i, d as a, f as o, h as s, l as c, p as l, rt as u, st as d, v as f, z as p } from "./vue.runtime.esm-bundler-B2k01iQh.js";
2
- import { t as m } from "./useI18n-CTs_bP9d.js";
3
- import { f as h } from "./styleConstants-lGobwiLH.js";
4
- import { i as g, n as _, r as v, t as y } from "./NumberWithSuffix-D3fdj0iO.js";
5
- //#region src/components/toolbar/CheckboxItem.vue?vue&type=script&setup=true&lang.ts
6
- var b = { class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text)]" }, x = ["checked"], S = /* @__PURE__ */ i({
7
- __name: "CheckboxItem",
8
- props: {
9
- modelValue: { type: Boolean },
10
- label: {}
11
- },
12
- emits: ["update:modelValue"],
13
- setup(t, { emit: r }) {
14
- let i = r;
15
- return (r, a) => (e(), s("label", b, [o("input", {
16
- type: "checkbox",
17
- class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
18
- checked: t.modelValue,
19
- onChange: a[0] ||= (e) => i("update:modelValue", e.target.checked)
20
- }, null, 40, x), n(" " + d(t.label), 1)]));
21
- }
22
- }), C = ["value"], w = ["value"], T = ["value"], E = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-2" }, D = ["value"], O = { value: "" }, k = ["value"], A = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, j = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, M = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-2" }, N = [
23
- "value",
24
- "placeholder",
25
- "onInput"
26
- ], P = ["value", "placeholder"], F = ["value"], I = /* @__PURE__ */ i({
27
- __name: "CountdownToolbar",
28
- props: {
29
- block: {},
30
- fontFamilies: {}
31
- },
32
- emits: ["update"],
33
- setup(n, { emit: i }) {
34
- let b = i, { t: x } = m(), I = [
35
- "UTC",
36
- "America/New_York",
37
- "America/Chicago",
38
- "America/Denver",
39
- "America/Los_Angeles",
40
- "Europe/London",
41
- "Europe/Berlin",
42
- "Europe/Paris",
43
- "Europe/Moscow",
44
- "Asia/Dubai",
45
- "Asia/Kolkata",
46
- "Asia/Shanghai",
47
- "Asia/Tokyo",
48
- "Australia/Sydney",
49
- "Pacific/Auckland"
50
- ], L = [
51
- {
52
- value: ":",
53
- label: ":"
54
- },
55
- {
56
- value: "-",
57
- label: "-"
58
- },
59
- {
60
- value: " ",
61
- label: "␣"
62
- }
63
- ], R = [
64
- "Days",
65
- "Hours",
66
- "Minutes",
67
- "Seconds"
68
- ], z = a(() => R.map((e) => ({
69
- unit: e,
70
- showKey: `show${e}`,
71
- labelKey: `label${e}`,
72
- translationKey: e.toLowerCase()
73
- })));
74
- function B(e, t) {
75
- b("update", { [e]: t });
76
- }
77
- return (i, a) => (e(), s(c, null, [
78
- f(_, { label: u(x).countdown.targetDate }, {
79
- default: p(() => [o("input", {
80
- type: "datetime-local",
81
- class: r(u(h)),
82
- value: n.block.targetDate,
83
- onInput: a[0] ||= (e) => B("targetDate", e.target.value)
84
- }, null, 42, C)]),
85
- _: 1
86
- }, 8, ["label"]),
87
- f(_, { label: u(x).countdown.timezone }, {
88
- default: p(() => [o("select", {
89
- class: r(u(h)),
90
- value: n.block.timezone,
91
- onChange: a[1] ||= (e) => B("timezone", e.target.value)
92
- }, [(e(), s(c, null, t(I, (e) => o("option", {
93
- key: e,
94
- value: e
95
- }, d(e), 9, T)), 64))], 42, w)]),
96
- _: 1
97
- }, 8, ["label"]),
98
- f(_, { label: u(x).countdown.display }, {
99
- default: p(() => [o("div", E, [(e(!0), s(c, null, t(z.value, (t) => (e(), l(S, {
100
- key: t.unit,
101
- "model-value": n.block[t.showKey],
102
- label: u(x).countdown[t.translationKey],
103
- "onUpdate:modelValue": (e) => B(t.showKey, e)
104
- }, null, 8, [
105
- "model-value",
106
- "label",
107
- "onUpdate:modelValue"
108
- ]))), 128))])]),
109
- _: 1
110
- }, 8, ["label"]),
111
- f(_, { label: u(x).countdown.separator }, {
112
- default: p(() => [f(v, {
113
- options: L,
114
- "model-value": n.block.separator,
115
- "onUpdate:modelValue": a[2] ||= (e) => B("separator", e)
116
- }, null, 8, ["model-value"])]),
117
- _: 1
118
- }, 8, ["label"]),
119
- f(_, { label: u(x).countdown.fontFamily }, {
120
- default: p(() => [o("select", {
121
- class: r(u(h)),
122
- value: n.block.fontFamily || "",
123
- onChange: a[3] ||= (e) => B("fontFamily", e.target.value || void 0)
124
- }, [o("option", O, d(u(x).countdown.inheritFont), 1), (e(!0), s(c, null, t(n.fontFamilies, (t) => (e(), s("option", {
125
- key: t.value,
126
- value: t.value
127
- }, d(t.label), 9, k))), 128))], 42, D)]),
128
- _: 1
129
- }, 8, ["label"]),
130
- o("div", A, [f(_, { label: u(x).countdown.digitFontSize }, {
131
- default: p(() => [f(y, {
132
- "model-value": n.block.digitFontSize,
133
- min: 12,
134
- max: 72,
135
- suffix: "px",
136
- "onUpdate:modelValue": a[4] ||= (e) => B("digitFontSize", e)
137
- }, null, 8, ["model-value"])]),
138
- _: 1
139
- }, 8, ["label"]), f(_, { label: u(x).countdown.labelFontSize }, {
140
- default: p(() => [f(y, {
141
- "model-value": n.block.labelFontSize,
142
- min: 8,
143
- max: 24,
144
- suffix: "px",
145
- "onUpdate:modelValue": a[5] ||= (e) => B("labelFontSize", e)
146
- }, null, 8, ["model-value"])]),
147
- _: 1
148
- }, 8, ["label"])]),
149
- o("div", j, [f(_, { label: u(x).countdown.digitColor }, {
150
- default: p(() => [f(g, {
151
- "model-value": n.block.digitColor,
152
- "onUpdate:modelValue": a[6] ||= (e) => B("digitColor", e)
153
- }, null, 8, ["model-value"])]),
154
- _: 1
155
- }, 8, ["label"]), f(_, { label: u(x).countdown.labelColor }, {
156
- default: p(() => [f(g, {
157
- "model-value": n.block.labelColor,
158
- "onUpdate:modelValue": a[7] ||= (e) => B("labelColor", e)
159
- }, null, 8, ["model-value"])]),
160
- _: 1
161
- }, 8, ["label"])]),
162
- f(_, { label: u(x).countdown.background }, {
163
- default: p(() => [f(g, {
164
- "model-value": n.block.backgroundColor,
165
- "onUpdate:modelValue": a[8] ||= (e) => B("backgroundColor", e)
166
- }, null, 8, ["model-value"])]),
167
- _: 1
168
- }, 8, ["label"]),
169
- f(_, { label: u(x).countdown.labels }, {
170
- default: p(() => [o("div", M, [(e(!0), s(c, null, t(z.value, (t) => (e(), s("input", {
171
- key: t.unit,
172
- type: "text",
173
- class: r(u(h)),
174
- value: n.block[t.labelKey],
175
- placeholder: u(x).countdown[t.translationKey],
176
- onInput: (e) => B(t.labelKey, e.target.value)
177
- }, null, 42, N))), 128))])]),
178
- _: 1
179
- }, 8, ["label"]),
180
- f(_, { label: u(x).countdown.expiry }, {
181
- default: p(() => [o("input", {
182
- type: "text",
183
- class: r(u(h)),
184
- value: n.block.expiredMessage,
185
- placeholder: u(x).countdown.expiredMessagePlaceholder,
186
- onInput: a[9] ||= (e) => B("expiredMessage", e.target.value)
187
- }, null, 42, P)]),
188
- _: 1
189
- }, 8, ["label"]),
190
- f(_, { label: u(x).countdown.expiredImageUrl }, {
191
- default: p(() => [o("input", {
192
- type: "url",
193
- class: r(u(h)),
194
- value: n.block.expiredImageUrl,
195
- placeholder: "https://...",
196
- onInput: a[10] ||= (e) => B("expiredImageUrl", e.target.value)
197
- }, null, 42, F)]),
198
- _: 1
199
- }, 8, ["label"]),
200
- f(S, {
201
- "model-value": n.block.hideOnExpiry,
202
- label: u(x).countdown.hideOnExpiry,
203
- class: "tpl:mb-3.5",
204
- "onUpdate:modelValue": a[11] ||= (e) => B("hideOnExpiry", e)
205
- }, null, 8, ["model-value", "label"])
206
- ], 64));
207
- }
208
- });
209
- //#endregion
210
- export { I as default };
@@ -1,198 +0,0 @@
1
- import { A as e, B as t, F as n, L as r, M as i, X as a, a as ee, b as o, c as s, d as c, f as l, h as u, i as te, l as d, m as ne, ot as re, p as f, rt as p, st as m, v as h, y as ie, z as ae } from "./vue.runtime.esm-bundler-B2k01iQh.js";
2
- import "./useEditorCore-DKYZ7aKk.js";
3
- import { D as oe, N as g, m as se } from "./keys-mFiJ5N0_.js";
4
- import { t as ce } from "./useI18n-CTs_bP9d.js";
5
- import { n as le, r as _, t as v } from "./blockTypeIcons-CyAom3iI.js";
6
- import { t as ue } from "./trash-2-DpGb7fIt.js";
7
- import { t as de } from "./x-CGjkjdKK.js";
8
- import { n as fe } from "./useCloudI18n-L3H2XvdW.js";
9
- import { t as pe } from "./TplModal-BYb-X5Bj.js";
10
- //#region src/cloud/components/ModuleBrowserModal.vue?vue&type=script&setup=true&lang.ts
11
- var me = {
12
- role: "dialog",
13
- "aria-modal": "true",
14
- "aria-labelledby": "tpl-module-browser-title",
15
- class: "tpl-scale-in tpl:mx-4 tpl:flex tpl:w-full tpl:max-w-[1000px] tpl:flex-col tpl:rounded-[var(--tpl-radius-lg)]",
16
- style: {
17
- "background-color": "var(--tpl-bg-elevated)",
18
- "box-shadow": "var(--tpl-shadow-xl)",
19
- "max-height": "90vh"
20
- }
21
- }, he = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-4 tpl:border-[var(--tpl-border)]" }, y = {
22
- id: "tpl-module-browser-title",
23
- class: "tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
24
- }, b = ["aria-label"], x = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, S = { class: "tpl:flex tpl:w-[300px] tpl:shrink-0 tpl:flex-col tpl:overflow-hidden" }, C = { class: "tpl:px-4 tpl:pt-4 tpl:pb-3" }, w = { class: "tpl:relative" }, T = ["placeholder"], E = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:px-4 tpl:pb-4" }, D = {
25
- key: 0,
26
- class: "tpl:flex tpl:flex-col tpl:gap-1"
27
- }, O = ["aria-pressed", "onClick"], k = { class: "tpl:flex tpl:items-center tpl:gap-2" }, A = { class: "tpl:flex-1 tpl:truncate tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, j = { class: "tpl:shrink-0 tpl:rounded-full tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]" }, M = { class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1" }, N = {
28
- key: 0,
29
- class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
30
- }, P = ["aria-label", "onClick"], F = [
31
- "aria-label",
32
- "title",
33
- "onClick"
34
- ], I = {
35
- key: 1,
36
- class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:py-12"
37
- }, L = { class: "tpl:mt-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, R = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden tpl:border-l tpl:border-[var(--tpl-border)]" }, ge = {
38
- key: 0,
39
- class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden"
40
- }, _e = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, ve = {
41
- key: 1,
42
- class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:items-center tpl:justify-center tpl:px-4"
43
- }, ye = { class: "tpl:mt-2 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, be = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3 tpl:border-[var(--tpl-border)]" }, xe = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Se = { class: "tpl:shrink-0 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, Ce = ["value"], we = { class: "tpl:flex tpl:gap-2" }, Te = ["disabled"], z = /* @__PURE__ */ o({
44
- __name: "ModuleBrowserModal",
45
- props: { visible: { type: Boolean } },
46
- emits: ["close", "insert"],
47
- setup(o, { emit: z }) {
48
- let Ee = o, B = z, De = ie(() => import("./ModulePreviewCanvas-Dni9kK4j.js")), { t: Oe } = ce(), { t: V } = fe(), H = g(oe, "ModuleBrowserModal"), U = g(se, "ModuleBrowserModal"), W = a(""), G = a(null), K = a(null), q = a("end"), J = c(() => {
49
- let e = H.modules.value;
50
- if (!W.value) return e;
51
- let t = W.value.toLowerCase();
52
- return e.filter((e) => e.name.toLowerCase().includes(t));
53
- }), Y = c(() => G.value ? H.modules.value.find((e) => e.id === G.value) ?? null : null), X = c(() => {
54
- let e = [{
55
- value: "beginning",
56
- label: V.modules.insertAtBeginning
57
- }], t = U.content.value.blocks;
58
- for (let n = 0; n < t.length; n++) {
59
- let r = t[n], i = r.type, a = Oe.blocks[i] ?? r.type;
60
- e.push({
61
- value: r.id,
62
- label: V.modules.insertAfterBlock.replace("{block}", `${a} ${n + 1}`)
63
- });
64
- }
65
- return e.push({
66
- value: "end",
67
- label: V.modules.insertAtEnd
68
- }), e;
69
- }), ke = c(() => {
70
- if (q.value === "end") return;
71
- if (q.value === "beginning") return 0;
72
- let e = U.content.value.blocks.findIndex((e) => e.id === q.value);
73
- if (e !== -1) return e + 1;
74
- });
75
- r(() => Ee.visible, (e) => {
76
- if (e) {
77
- W.value = "", G.value = null, K.value = null;
78
- let e = U.state.selectedBlockId;
79
- e ? q.value = U.content.value.blocks.findIndex((t) => t.id === e) === -1 ? "end" : e : q.value = "end";
80
- }
81
- });
82
- function Ae(e) {
83
- let t = [], n = /* @__PURE__ */ new Set();
84
- for (let r of e.content) if (!n.has(r.type) && v[r.type] && (n.add(r.type), t.push({
85
- type: r.type,
86
- icon: v[r.type]
87
- })), t.length >= 5) break;
88
- return t;
89
- }
90
- function Z(e) {
91
- let t = new Set(e.content.map((e) => e.type));
92
- return Math.max(0, t.size - 5);
93
- }
94
- async function je(e) {
95
- try {
96
- await H.deleteModule(e), G.value === e && (G.value = null);
97
- } finally {
98
- K.value = null;
99
- }
100
- }
101
- function Q() {
102
- Y.value && B("insert", Y.value, ke.value);
103
- }
104
- function $() {
105
- B("close");
106
- }
107
- function Me(e) {
108
- e.key === "Escape" && $(), e.key === "Enter" && Y.value && (e.preventDefault(), Q());
109
- }
110
- return (r, a) => (e(), f(pe, {
111
- visible: o.visible,
112
- onClose: $,
113
- onKeydown: Me
114
- }, {
115
- default: ae(() => [l("div", me, [
116
- l("div", he, [l("h3", y, m(p(V).modules.browse), 1), l("button", {
117
- "aria-label": p(V).modules.close,
118
- class: "tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:p-1 tpl:transition-colors tpl:duration-100 tpl:text-[var(--tpl-text-dim)]",
119
- onClick: $
120
- }, [h(p(de), {
121
- size: 16,
122
- "stroke-width": 2
123
- })], 8, b)]),
124
- l("div", x, [l("div", S, [l("div", C, [l("div", w, [h(p(le), {
125
- size: 14,
126
- "stroke-width": 2,
127
- class: "tpl:pointer-events-none tpl:absolute tpl:left-3 tpl:top-1/2 tpl:-translate-y-1/2 tpl:text-[var(--tpl-text-dim)]"
128
- }), t(l("input", {
129
- "onUpdate:modelValue": a[0] ||= (e) => W.value = e,
130
- type: "text",
131
- placeholder: p(V).modules.search,
132
- class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:pl-9 tpl:pr-3 tpl:text-sm tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
133
- }, null, 8, T), [[ee, W.value]])])]), l("div", E, [J.value.length > 0 ? (e(), u("div", D, [(e(!0), u(d, null, i(J.value, (t) => (e(), u("button", {
134
- key: t.id,
135
- type: "button",
136
- "aria-pressed": G.value === t.id,
137
- class: "tpl:group/card tpl:w-full tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-md)] tpl:border tpl:bg-transparent tpl:px-3 tpl:py-2 tpl:text-left tpl:transition-all tpl:duration-[120ms]",
138
- style: re({
139
- borderColor: G.value === t.id ? "var(--tpl-primary)" : "var(--tpl-border)",
140
- backgroundColor: G.value === t.id ? "var(--tpl-primary-light)" : "transparent"
141
- }),
142
- onClick: (e) => G.value = t.id
143
- }, [l("div", k, [l("span", A, m(t.name), 1), l("span", j, m(p(V).modules.blockCount.replace("{count}", String(t.content.length))), 1)]), l("div", M, [
144
- (e(!0), u(d, null, i(Ae(t), (t) => (e(), f(n(t.icon), {
145
- key: t.type,
146
- size: 14,
147
- "stroke-width": 1.5,
148
- class: "tpl:text-[var(--tpl-text-dim)]"
149
- }))), 128)),
150
- Z(t) > 0 ? (e(), u("span", N, " +" + m(Z(t)), 1)) : ne("", !0),
151
- K.value === t.id ? (e(), u("button", {
152
- key: 1,
153
- "aria-label": p(V).modules.deleteConfirm,
154
- class: "tpl:ml-auto tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:transition-colors tpl:duration-100 tpl:border-[var(--tpl-danger)] tpl:text-[var(--tpl-danger)]",
155
- style: { "background-color": "transparent" },
156
- onClick: s((e) => je(t.id), ["stop"])
157
- }, m(p(V).modules.deleteConfirm), 9, P)) : (e(), u("button", {
158
- key: 2,
159
- class: "tpl-module-delete-btn tpl:ml-auto tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:p-0.5 tpl:transition-colors tpl:duration-100 tpl:text-[var(--tpl-text-dim)]",
160
- "aria-label": p(V).modules.delete,
161
- title: p(V).modules.delete,
162
- onClick: s((e) => K.value = t.id, ["stop"])
163
- }, [h(p(ue), {
164
- size: 12,
165
- "stroke-width": 1.5
166
- })], 8, F))
167
- ])], 12, O))), 128))])) : (e(), u("div", I, [h(p(_), {
168
- size: 32,
169
- "stroke-width": 1,
170
- class: "tpl:text-[var(--tpl-text-dim)]"
171
- }), l("p", L, m(W.value ? p(V).modules.noModules : p(V).modules.noModulesHint), 1)]))])]), l("div", R, [Y.value ? (e(), u("div", ge, [l("div", _e, [h(p(De), { blocks: Y.value.content }, null, 8, ["blocks"])])])) : (e(), u("div", ve, [h(p(_), {
172
- size: 32,
173
- "stroke-width": 1,
174
- class: "tpl:text-[var(--tpl-text-dim)]"
175
- }), l("p", ye, m(p(V).modules.selectToPreview), 1)]))])]),
176
- l("div", be, [l("div", xe, [l("label", Se, m(p(V).modules.insertPosition), 1), t(l("select", {
177
- "onUpdate:modelValue": a[1] ||= (e) => q.value = e,
178
- class: "tpl:h-7 tpl:max-w-[220px] tpl:rounded-md tpl:border tpl:px-2 tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
179
- }, [(e(!0), u(d, null, i(X.value, (t) => (e(), u("option", {
180
- key: t.value,
181
- value: t.value
182
- }, m(t.label), 9, Ce))), 128))], 512), [[te, q.value]])]), l("div", we, [l("button", {
183
- type: "button",
184
- class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]",
185
- onClick: $
186
- }, m(p(V).modules.close), 1), l("button", {
187
- type: "button",
188
- class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
189
- disabled: !Y.value,
190
- onClick: Q
191
- }, m(p(V).modules.insert), 9, Te)])])
192
- ])]),
193
- _: 1
194
- }, 8, ["visible"]));
195
- }
196
- });
197
- //#endregion
198
- export { z as default };