@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
@@ -0,0 +1,210 @@
1
+ import { At as e, C as t, F as n, Ft as r, N as i, U as a, b as o, f as s, g as c, h as l, m as u, st as d, v as f, x as p } from "./vue.runtime.esm-bundler-CjauPXjj.js";
2
+ import { t as m } from "./useI18n-C2xQZ6K9.js";
3
+ import { f as h } from "./styleConstants-wWRbcuEK.js";
4
+ import { i as g, n as _, r as v, t as y } from "./NumberWithSuffix-Ca3vNY84.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__ */ t({
7
+ __name: "CheckboxItem",
8
+ props: {
9
+ modelValue: { type: Boolean },
10
+ label: {}
11
+ },
12
+ emits: ["update:modelValue"],
13
+ setup(e, { emit: t }) {
14
+ let n = t;
15
+ return (t, a) => (i(), f("label", b, [l("input", {
16
+ type: "checkbox",
17
+ class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
18
+ checked: e.modelValue,
19
+ onChange: a[0] ||= (e) => n("update:modelValue", e.target.checked)
20
+ }, null, 40, x), o(" " + r(e.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__ */ t({
27
+ __name: "CountdownToolbar",
28
+ props: {
29
+ block: {},
30
+ fontFamilies: {}
31
+ },
32
+ emits: ["update"],
33
+ setup(t, { emit: o }) {
34
+ let b = o, { 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 = u(() => 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 (o, u) => (i(), f(s, null, [
78
+ p(_, { label: d(x).countdown.targetDate }, {
79
+ default: a(() => [l("input", {
80
+ type: "datetime-local",
81
+ class: e(d(h)),
82
+ value: t.block.targetDate,
83
+ onInput: u[0] ||= (e) => B("targetDate", e.target.value)
84
+ }, null, 42, C)]),
85
+ _: 1
86
+ }, 8, ["label"]),
87
+ p(_, { label: d(x).countdown.timezone }, {
88
+ default: a(() => [l("select", {
89
+ class: e(d(h)),
90
+ value: t.block.timezone,
91
+ onChange: u[1] ||= (e) => B("timezone", e.target.value)
92
+ }, [(i(), f(s, null, n(I, (e) => l("option", {
93
+ key: e,
94
+ value: e
95
+ }, r(e), 9, T)), 64))], 42, w)]),
96
+ _: 1
97
+ }, 8, ["label"]),
98
+ p(_, { label: d(x).countdown.display }, {
99
+ default: a(() => [l("div", E, [(i(!0), f(s, null, n(z.value, (e) => (i(), c(S, {
100
+ key: e.unit,
101
+ "model-value": t.block[e.showKey],
102
+ label: d(x).countdown[e.translationKey],
103
+ "onUpdate:modelValue": (t) => B(e.showKey, t)
104
+ }, null, 8, [
105
+ "model-value",
106
+ "label",
107
+ "onUpdate:modelValue"
108
+ ]))), 128))])]),
109
+ _: 1
110
+ }, 8, ["label"]),
111
+ p(_, { label: d(x).countdown.separator }, {
112
+ default: a(() => [p(v, {
113
+ options: L,
114
+ "model-value": t.block.separator,
115
+ "onUpdate:modelValue": u[2] ||= (e) => B("separator", e)
116
+ }, null, 8, ["model-value"])]),
117
+ _: 1
118
+ }, 8, ["label"]),
119
+ p(_, { label: d(x).countdown.fontFamily }, {
120
+ default: a(() => [l("select", {
121
+ class: e(d(h)),
122
+ value: t.block.fontFamily || "",
123
+ onChange: u[3] ||= (e) => B("fontFamily", e.target.value || void 0)
124
+ }, [l("option", O, r(d(x).countdown.inheritFont), 1), (i(!0), f(s, null, n(t.fontFamilies, (e) => (i(), f("option", {
125
+ key: e.value,
126
+ value: e.value
127
+ }, r(e.label), 9, k))), 128))], 42, D)]),
128
+ _: 1
129
+ }, 8, ["label"]),
130
+ l("div", A, [p(_, { label: d(x).countdown.digitFontSize }, {
131
+ default: a(() => [p(y, {
132
+ "model-value": t.block.digitFontSize,
133
+ min: 12,
134
+ max: 72,
135
+ suffix: "px",
136
+ "onUpdate:modelValue": u[4] ||= (e) => B("digitFontSize", e)
137
+ }, null, 8, ["model-value"])]),
138
+ _: 1
139
+ }, 8, ["label"]), p(_, { label: d(x).countdown.labelFontSize }, {
140
+ default: a(() => [p(y, {
141
+ "model-value": t.block.labelFontSize,
142
+ min: 8,
143
+ max: 24,
144
+ suffix: "px",
145
+ "onUpdate:modelValue": u[5] ||= (e) => B("labelFontSize", e)
146
+ }, null, 8, ["model-value"])]),
147
+ _: 1
148
+ }, 8, ["label"])]),
149
+ l("div", j, [p(_, { label: d(x).countdown.digitColor }, {
150
+ default: a(() => [p(g, {
151
+ "model-value": t.block.digitColor,
152
+ "onUpdate:modelValue": u[6] ||= (e) => B("digitColor", e)
153
+ }, null, 8, ["model-value"])]),
154
+ _: 1
155
+ }, 8, ["label"]), p(_, { label: d(x).countdown.labelColor }, {
156
+ default: a(() => [p(g, {
157
+ "model-value": t.block.labelColor,
158
+ "onUpdate:modelValue": u[7] ||= (e) => B("labelColor", e)
159
+ }, null, 8, ["model-value"])]),
160
+ _: 1
161
+ }, 8, ["label"])]),
162
+ p(_, { label: d(x).countdown.background }, {
163
+ default: a(() => [p(g, {
164
+ "model-value": t.block.backgroundColor,
165
+ "onUpdate:modelValue": u[8] ||= (e) => B("backgroundColor", e)
166
+ }, null, 8, ["model-value"])]),
167
+ _: 1
168
+ }, 8, ["label"]),
169
+ p(_, { label: d(x).countdown.labels }, {
170
+ default: a(() => [l("div", M, [(i(!0), f(s, null, n(z.value, (n) => (i(), f("input", {
171
+ key: n.unit,
172
+ type: "text",
173
+ class: e(d(h)),
174
+ value: t.block[n.labelKey],
175
+ placeholder: d(x).countdown[n.translationKey],
176
+ onInput: (e) => B(n.labelKey, e.target.value)
177
+ }, null, 42, N))), 128))])]),
178
+ _: 1
179
+ }, 8, ["label"]),
180
+ p(_, { label: d(x).countdown.expiry }, {
181
+ default: a(() => [l("input", {
182
+ type: "text",
183
+ class: e(d(h)),
184
+ value: t.block.expiredMessage,
185
+ placeholder: d(x).countdown.expiredMessagePlaceholder,
186
+ onInput: u[9] ||= (e) => B("expiredMessage", e.target.value)
187
+ }, null, 42, P)]),
188
+ _: 1
189
+ }, 8, ["label"]),
190
+ p(_, { label: d(x).countdown.expiredImageUrl }, {
191
+ default: a(() => [l("input", {
192
+ type: "url",
193
+ class: e(d(h)),
194
+ value: t.block.expiredImageUrl,
195
+ placeholder: "https://...",
196
+ onInput: u[10] ||= (e) => B("expiredImageUrl", e.target.value)
197
+ }, null, 42, F)]),
198
+ _: 1
199
+ }, 8, ["label"]),
200
+ p(S, {
201
+ "model-value": t.block.hideOnExpiry,
202
+ label: d(x).countdown.hideOnExpiry,
203
+ class: "tpl:mb-3.5",
204
+ "onUpdate:modelValue": u[11] ||= (e) => B("hideOnExpiry", e)
205
+ }, null, 8, ["model-value", "label"])
206
+ ], 64));
207
+ }
208
+ });
209
+ //#endregion
210
+ export { I as default };
@@ -1,14 +1,14 @@
1
- import { Dt as e, H as t, M as n, Mt as r, Ot as i, Q as a, S as o, V as ee, _ as s, b as c, g as l, h as te, it as u, k as d, m as f, p as ne, s as re, t as ie, y as p, z as ae } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
1
+ import { A as e, At as t, C as n, Ft as r, N as i, U as ee, V as a, W as te, _ as o, b as s, c as ne, et as c, g as re, h as l, jt as u, m as ie, st as d, t as ae, v as f, x as p } from "./vue.runtime.esm-bundler-CjauPXjj.js";
2
2
  import "./timeouts-BSGxjuUF.js";
3
- import { O as m, i as oe, m as h } from "./keys-ciNfSSGj.js";
4
- import { t as g } from "./createLucideIcon-C3pa2siy.js";
5
- import { t as se } from "./circle-alert-DZuGWPX-.js";
6
- import { t as _ } from "./image-up-MBZKKg9p.js";
7
- import { t as v } from "./x-u2oVmjN_.js";
8
- import { t as ce } from "./LoadingTrack-B0CWFHXQ.js";
9
- import { t as y } from "./_plugin-vue_export-helper-B0hnzhyu.js";
10
- import { n as le } from "./useCloudI18n-BuIwR6OE.js";
11
- import { u as ue } from "./cloud-DEk_b4CR.js";
3
+ import { A as m, i as oe, m as h } from "./keys-CvX8D-8C.js";
4
+ import { t as g } from "./createLucideIcon-ClREiSx3.js";
5
+ import { t as se } from "./circle-alert-ZQQc98HC.js";
6
+ import { t as _ } from "./image-up-DT7gcJLN.js";
7
+ import { t as v } from "./x-CgIhNcT9.js";
8
+ import { t as ce } from "./LoadingTrack-BJ59h9ok.js";
9
+ import { t as y } from "./_plugin-vue_export-helper-Bwh4ceeO.js";
10
+ import { n as le } from "./useCloudI18n-BTTNBk5i.js";
11
+ import { u as ue } from "./cloud-DJG4tb4_.js";
12
12
  var de = g("file-image", [
13
13
  ["path", {
14
14
  d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
@@ -83,19 +83,19 @@ var de = g("file-image", [
83
83
  }, ge = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, _e = { class: "tpl:flex tpl:gap-2" }, ve = {
84
84
  key: 1,
85
85
  class: "tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
86
- }, ye = ["disabled"], be = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, z = /* @__PURE__ */ y(/* @__PURE__ */ o({
86
+ }, ye = ["disabled"], be = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, z = /* @__PURE__ */ y(/* @__PURE__ */ n({
87
87
  __name: "DesignReferenceSidebar",
88
88
  props: {
89
89
  visible: { type: Boolean },
90
90
  hasExistingBlocks: { type: Boolean }
91
91
  },
92
92
  emits: ["close", "apply"],
93
- setup(o, { emit: g }) {
94
- let y = o, z = g, { t: B } = le(), xe = m(h, "DesignReferenceSidebar"), V = ue({
93
+ setup(n, { emit: g }) {
94
+ let y = n, z = g, { t: B } = le(), xe = m(h, "DesignReferenceSidebar"), V = ue({
95
95
  authManager: m(oe, "DesignReferenceSidebar"),
96
96
  getTemplateId: () => xe.state.template?.id ?? null,
97
97
  onApply: (e) => z("apply", e)
98
- }), H = a(null), U = a("image"), W = a(null), G = a(""), K = a(null), q = a(!1), J = a(!1), Y = ne(() => V.isGenerating.value ? !1 : W.value !== null);
98
+ }), H = c(null), U = c("image"), W = c(null), G = c(""), K = c(null), q = c(!1), J = c(!1), Y = ie(() => V.isGenerating.value ? !1 : W.value !== null);
99
99
  function X(e) {
100
100
  U.value = e, Q();
101
101
  }
@@ -151,11 +151,11 @@ var de = g("file-image", [
151
151
  function Ee() {
152
152
  q.value = !1;
153
153
  }
154
- return ae(() => y.visible, (e) => {
154
+ return a(() => y.visible, (e) => {
155
155
  e || (q.value = !1);
156
- }), d(() => {
156
+ }), e(() => {
157
157
  K.value &&= (URL.revokeObjectURL(K.value), null);
158
- }), (a, d) => (n(), te(ie, {
158
+ }), (e, a) => (i(), re(ae, {
159
159
  "enter-active-class": "tpl-design-slide-enter-active",
160
160
  "enter-from-class": "tpl:translate-x-full",
161
161
  "enter-to-class": "tpl:translate-x-0",
@@ -163,74 +163,74 @@ var de = g("file-image", [
163
163
  "leave-from-class": "tpl:translate-x-0",
164
164
  "leave-to-class": "tpl:translate-x-full"
165
165
  }, {
166
- default: ee(() => [o.visible ? (n(), s("div", pe, [f("div", me, [f("div", he, [c(u(_), {
166
+ default: ee(() => [n.visible ? (i(), f("div", pe, [l("div", me, [l("div", he, [p(d(_), {
167
167
  size: 13,
168
168
  "stroke-width": 2
169
- }), f("span", null, r(u(B).designReference.title), 1)]), f("button", {
169
+ }), l("span", null, r(d(B).designReference.title), 1)]), l("button", {
170
170
  class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
171
- onClick: d[0] ||= (e) => z("close")
172
- }, [c(u(v), {
171
+ onClick: a[0] ||= (e) => z("close")
172
+ }, [p(d(v), {
173
173
  size: 14,
174
174
  "stroke-width": 2
175
- })])]), f("div", x, [u(V).isGenerating.value ? (n(), s("div", S, [f("div", C, [c(ce), f("p", w, r(u(B).designReference.generating), 1)])])) : (n(), s("div", T, [
176
- f("div", E, [f("button", {
175
+ })])]), l("div", x, [d(V).isGenerating.value ? (i(), f("div", S, [l("div", C, [p(ce), l("p", w, r(d(B).designReference.generating), 1)])])) : (i(), f("div", T, [
176
+ l("div", E, [l("button", {
177
177
  class: "tpl:flex tpl:flex-1 tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-2 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
178
- style: i({
178
+ style: u({
179
179
  backgroundColor: U.value === "image" ? "var(--tpl-bg)" : "transparent",
180
180
  color: U.value === "image" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
181
181
  boxShadow: U.value === "image" ? "var(--tpl-shadow)" : "none"
182
182
  }),
183
- onClick: d[1] ||= (e) => X("image")
184
- }, [c(u(de), {
183
+ onClick: a[1] ||= (e) => X("image")
184
+ }, [p(d(de), {
185
185
  size: 12,
186
186
  "stroke-width": 2
187
- }), p(" " + r(u(B).designReference.uploadImage), 1)], 4), f("button", {
187
+ }), s(" " + r(d(B).designReference.uploadImage), 1)], 4), l("button", {
188
188
  class: "tpl:flex tpl:flex-1 tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-2 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
189
- style: i({
189
+ style: u({
190
190
  backgroundColor: U.value === "pdf" ? "var(--tpl-bg)" : "transparent",
191
191
  color: U.value === "pdf" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
192
192
  boxShadow: U.value === "pdf" ? "var(--tpl-shadow)" : "none"
193
193
  }),
194
- onClick: d[2] ||= (e) => X("pdf")
195
- }, [c(u(b), {
194
+ onClick: a[2] ||= (e) => X("pdf")
195
+ }, [p(d(b), {
196
196
  size: 12,
197
197
  "stroke-width": 2
198
- }), p(" " + r(u(B).designReference.uploadPdf), 1)], 4)]),
199
- f("div", null, [W.value ? (n(), s("div", D, [f("div", O, [K.value ? (n(), s("img", {
198
+ }), s(" " + r(d(B).designReference.uploadPdf), 1)], 4)]),
199
+ l("div", null, [W.value ? (i(), f("div", D, [l("div", O, [K.value ? (i(), f("img", {
200
200
  key: 0,
201
201
  src: K.value,
202
202
  alt: W.value.name,
203
203
  class: "tpl:h-auto tpl:max-h-48 tpl:w-full tpl:object-contain"
204
- }, null, 8, k)) : (n(), s("div", A, [c(u(b), {
204
+ }, null, 8, k)) : (i(), f("div", A, [p(d(b), {
205
205
  size: 32,
206
206
  "stroke-width": 1.5,
207
207
  class: "tpl:text-[var(--tpl-text-dim)]"
208
- }), f("span", j, r(W.value.name), 1)])), f("button", {
208
+ }), l("span", j, r(W.value.name), 1)])), l("button", {
209
209
  class: "tpl:absolute tpl:top-2 tpl:right-2 tpl:rounded-full tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow)]",
210
210
  onClick: Q
211
- }, [c(u(v), {
211
+ }, [p(d(v), {
212
212
  size: 12,
213
213
  "stroke-width": 2
214
- })])])])) : (n(), s("div", {
214
+ })])])])) : (i(), f("div", {
215
215
  key: 1,
216
216
  class: "tpl-design-dropzone tpl:flex tpl:cursor-pointer tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border-2 tpl:border-dashed tpl:px-4 tpl:py-8 tpl:transition-colors tpl:duration-150",
217
- style: i({
217
+ style: u({
218
218
  borderColor: J.value ? "var(--tpl-primary)" : "var(--tpl-border-light)",
219
219
  backgroundColor: J.value ? "var(--tpl-primary-light)" : "var(--tpl-bg)"
220
220
  }),
221
- onClick: d[3] ||= (e) => H.value?.click(),
221
+ onClick: a[3] ||= (e) => H.value?.click(),
222
222
  onDragover: Ce,
223
223
  onDragleave: we,
224
224
  onDrop: Te
225
225
  }, [
226
- c(u(fe), {
226
+ p(d(fe), {
227
227
  size: 24,
228
228
  "stroke-width": 1.5,
229
229
  class: "tpl:text-[var(--tpl-text-dim)]"
230
230
  }),
231
- f("span", M, r(u(B).designReference.dropHint), 1),
232
- f("span", N, r(U.value === "image" ? u(B).designReference.acceptedImages : u(B).designReference.acceptedPdf), 1)
233
- ], 36)), f("input", {
231
+ l("span", M, r(d(B).designReference.dropHint), 1),
232
+ l("span", N, r(U.value === "image" ? d(B).designReference.acceptedImages : d(B).designReference.acceptedPdf), 1)
233
+ ], 36)), l("input", {
234
234
  ref_key: "fileInput",
235
235
  ref: H,
236
236
  type: "file",
@@ -238,39 +238,39 @@ var de = g("file-image", [
238
238
  accept: U.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
239
239
  onChange: Se
240
240
  }, null, 40, P)]),
241
- f("div", F, [f("label", I, r(u(B).designReference.promptLabel), 1), t(f("textarea", {
242
- "onUpdate:modelValue": d[4] ||= (e) => G.value = e,
243
- class: e(["tpl:min-h-[72px] tpl:w-full tpl:resize-none tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:font-sans tpl:text-sm tpl:outline-none tpl:transition-colors tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", ["tpl-design-prompt-input"]]),
244
- placeholder: u(B).designReference.promptPlaceholder,
241
+ l("div", F, [l("label", I, r(d(B).designReference.promptLabel), 1), te(l("textarea", {
242
+ "onUpdate:modelValue": a[4] ||= (e) => G.value = e,
243
+ class: t(["tpl:min-h-[72px] tpl:w-full tpl:resize-none tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:font-sans tpl:text-sm tpl:outline-none tpl:transition-colors tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", ["tpl-design-prompt-input"]]),
244
+ placeholder: d(B).designReference.promptPlaceholder,
245
245
  rows: "3"
246
- }, null, 8, L), [[re, G.value]])]),
247
- q.value ? (n(), s("div", R, [f("p", ge, r(u(B).designReference.replaceWarning), 1), f("div", _e, [f("button", {
246
+ }, null, 8, L), [[ne, G.value]])]),
247
+ q.value ? (i(), f("div", R, [l("p", ge, r(d(B).designReference.replaceWarning), 1), l("div", _e, [l("button", {
248
248
  class: "tpl:flex-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:text-[var(--tpl-text-muted)] tpl:border tpl:border-[var(--tpl-border)]",
249
249
  style: { "background-color": "transparent" },
250
250
  onClick: Ee
251
- }, r(u(B).designReference.replaceCancel), 1), f("button", {
251
+ }, r(d(B).designReference.replaceCancel), 1), l("button", {
252
252
  class: "tpl:flex-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
253
253
  onClick: $
254
- }, r(u(B).designReference.replaceConfirm), 1)])])) : l("", !0),
255
- u(V).error.value ? (n(), s("div", ve, [c(u(se), {
254
+ }, r(d(B).designReference.replaceConfirm), 1)])])) : o("", !0),
255
+ d(V).error.value ? (i(), f("div", ve, [p(d(se), {
256
256
  size: 14,
257
257
  "stroke-width": 2,
258
258
  class: "tpl:mt-0.5 tpl:shrink-0"
259
- }), f("span", null, r(u(B).designReference.error), 1)])) : l("", !0),
260
- q.value ? l("", !0) : (n(), s("button", {
259
+ }), l("span", null, r(d(B).designReference.error), 1)])) : o("", !0),
260
+ q.value ? o("", !0) : (i(), f("button", {
261
261
  key: 2,
262
262
  class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:font-medium 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)]",
263
263
  disabled: !Y.value,
264
264
  onClick: $
265
- }, [c(u(_), {
265
+ }, [p(d(_), {
266
266
  size: 16,
267
267
  "stroke-width": 2
268
- }), p(" " + r(u(B).designReference.generate), 1)], 8, ye)),
269
- f("p", be, r(u(B).aiMenu.disclaimer), 1)
270
- ]))])])) : l("", !0)]),
268
+ }), s(" " + r(d(B).designReference.generate), 1)], 8, ye)),
269
+ l("p", be, r(d(B).aiMenu.disclaimer), 1)
270
+ ]))])])) : o("", !0)]),
271
271
  _: 1
272
272
  }));
273
273
  }
274
- }), [["__scopeId", "data-v-bdbf8d0d"]]);
274
+ }), [["__scopeId", "data-v-b9358bf2"]]);
275
275
  //#endregion
276
276
  export { z as default };
@@ -1,5 +1,5 @@
1
- import { M as e, _ as t } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
2
- import { t as n } from "./_plugin-vue_export-helper-B0hnzhyu.js";
1
+ import { N as e, v as t } from "./vue.runtime.esm-bundler-CjauPXjj.js";
2
+ import { t as n } from "./_plugin-vue_export-helper-Bwh4ceeO.js";
3
3
  //#region src/components/LoadingTrack.vue
4
4
  var r = {}, i = { class: "tpl-loading-track" };
5
5
  function a(n, r) {
@@ -0,0 +1,206 @@
1
+ import { C as e, F as t, Ft as n, N as r, R as i, S as a, U as ee, V as o, W as s, _ as te, c as ne, d as c, et as l, f as u, g as d, h as f, jt as re, m as p, s as ie, st as m, v as h, x as g } from "./vue.runtime.esm-bundler-CjauPXjj.js";
2
+ import "./useEditorCore-BGnzcT7p.js";
3
+ import { A as _, T as ae, m as oe } from "./keys-CvX8D-8C.js";
4
+ import { t as se } from "./useI18n-C2xQZ6K9.js";
5
+ import { t as v } from "./createLucideIcon-ClREiSx3.js";
6
+ import { n as y, t as b } from "./blockTypeIcons-QkC6f5UE.js";
7
+ import { t as ce } from "./trash-2-CMWvQ5KX.js";
8
+ import { t as le } from "./x-CgIhNcT9.js";
9
+ import { n as ue } from "./useCloudI18n-BTTNBk5i.js";
10
+ import { t as de } from "./TplModal-CBq1J1pG.js";
11
+ var fe = v("search", [["path", {
12
+ d: "m21 21-4.34-4.34",
13
+ key: "14j7rj"
14
+ }], ["circle", {
15
+ cx: "11",
16
+ cy: "11",
17
+ r: "8",
18
+ key: "4ej97u"
19
+ }]]), pe = {
20
+ role: "dialog",
21
+ "aria-modal": "true",
22
+ "aria-labelledby": "tpl-module-browser-title",
23
+ 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)]",
24
+ style: {
25
+ "background-color": "var(--tpl-bg-elevated)",
26
+ "box-shadow": "var(--tpl-shadow-xl)",
27
+ "max-height": "90vh"
28
+ }
29
+ }, me = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-4 tpl:border-[var(--tpl-border)]" }, he = {
30
+ id: "tpl-module-browser-title",
31
+ class: "tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
32
+ }, x = ["aria-label"], S = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, C = { class: "tpl:flex tpl:w-[300px] tpl:shrink-0 tpl:flex-col tpl:overflow-hidden" }, w = { class: "tpl:px-4 tpl:pt-4 tpl:pb-3" }, T = { class: "tpl:relative" }, E = ["placeholder"], D = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:px-4 tpl:pb-4" }, O = {
33
+ key: 0,
34
+ class: "tpl:flex tpl:flex-col tpl:gap-1"
35
+ }, k = ["aria-pressed", "onClick"], A = { class: "tpl:flex tpl:items-center tpl:gap-2" }, j = { class: "tpl:flex-1 tpl:truncate tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, M = { 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)]" }, N = { class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1" }, P = {
36
+ key: 0,
37
+ class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
38
+ }, F = ["aria-label", "onClick"], I = [
39
+ "aria-label",
40
+ "title",
41
+ "onClick"
42
+ ], L = {
43
+ key: 1,
44
+ class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:py-12"
45
+ }, R = { class: "tpl:mt-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, ge = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden tpl:border-l tpl:border-[var(--tpl-border)]" }, _e = {
46
+ key: 0,
47
+ class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden"
48
+ }, ve = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, ye = {
49
+ key: 1,
50
+ class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:items-center tpl:justify-center tpl:px-4"
51
+ }, be = { class: "tpl:mt-2 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, xe = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3 tpl:border-[var(--tpl-border)]" }, Se = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ce = { class: "tpl:shrink-0 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, we = ["value"], Te = { class: "tpl:flex tpl:gap-2" }, Ee = ["disabled"], z = /* @__PURE__ */ e({
52
+ __name: "ModuleBrowserModal",
53
+ props: { visible: { type: Boolean } },
54
+ emits: ["close", "insert"],
55
+ setup(e, { emit: v }) {
56
+ let z = e, B = v, De = a(() => import("./ModulePreviewCanvas-D__YlOLS.js")), { t: Oe } = se(), { t: V } = ue(), H = _(ae, "ModuleBrowserModal"), U = _(oe, "ModuleBrowserModal"), W = l(""), G = l(null), K = l(null), q = l("end"), J = p(() => {
57
+ let e = H.modules.value;
58
+ if (!W.value) return e;
59
+ let t = W.value.toLowerCase();
60
+ return e.filter((e) => e.name.toLowerCase().includes(t));
61
+ }), Y = p(() => G.value ? H.modules.value.find((e) => e.id === G.value) ?? null : null), X = p(() => {
62
+ let e = [{
63
+ value: "beginning",
64
+ label: V.modules.insertAtBeginning
65
+ }], t = U.content.value.blocks;
66
+ for (let n = 0; n < t.length; n++) {
67
+ let r = t[n], i = r.type, a = Oe.blocks[i] ?? r.type;
68
+ e.push({
69
+ value: r.id,
70
+ label: V.modules.insertAfterBlock.replace("{block}", `${a} ${n + 1}`)
71
+ });
72
+ }
73
+ return e.push({
74
+ value: "end",
75
+ label: V.modules.insertAtEnd
76
+ }), e;
77
+ }), ke = p(() => {
78
+ if (q.value === "end") return;
79
+ if (q.value === "beginning") return 0;
80
+ let e = U.content.value.blocks.findIndex((e) => e.id === q.value);
81
+ if (e !== -1) return e + 1;
82
+ });
83
+ o(() => z.visible, (e) => {
84
+ if (e) {
85
+ W.value = "", G.value = null, K.value = null;
86
+ let e = U.state.selectedBlockId;
87
+ e ? q.value = U.content.value.blocks.findIndex((t) => t.id === e) === -1 ? "end" : e : q.value = "end";
88
+ }
89
+ });
90
+ function Ae(e) {
91
+ let t = [], n = /* @__PURE__ */ new Set();
92
+ for (let r of e.content) if (!n.has(r.type) && b[r.type] && (n.add(r.type), t.push({
93
+ type: r.type,
94
+ icon: b[r.type]
95
+ })), t.length >= 5) break;
96
+ return t;
97
+ }
98
+ function Z(e) {
99
+ let t = new Set(e.content.map((e) => e.type));
100
+ return Math.max(0, t.size - 5);
101
+ }
102
+ async function je(e) {
103
+ try {
104
+ await H.deleteModule(e), G.value === e && (G.value = null);
105
+ } finally {
106
+ K.value = null;
107
+ }
108
+ }
109
+ function Q() {
110
+ Y.value && B("insert", Y.value, ke.value);
111
+ }
112
+ function $() {
113
+ B("close");
114
+ }
115
+ function Me(e) {
116
+ e.key === "Escape" && $(), e.key === "Enter" && Y.value && (e.preventDefault(), Q());
117
+ }
118
+ return (a, o) => (r(), d(de, {
119
+ visible: e.visible,
120
+ onClose: $,
121
+ onKeydown: Me
122
+ }, {
123
+ default: ee(() => [f("div", pe, [
124
+ f("div", me, [f("h3", he, n(m(V).modules.browse), 1), f("button", {
125
+ "aria-label": m(V).modules.close,
126
+ 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)]",
127
+ onClick: $
128
+ }, [g(m(le), {
129
+ size: 16,
130
+ "stroke-width": 2
131
+ })], 8, x)]),
132
+ f("div", S, [f("div", C, [f("div", w, [f("div", T, [g(m(fe), {
133
+ size: 14,
134
+ "stroke-width": 2,
135
+ 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)]"
136
+ }), s(f("input", {
137
+ "onUpdate:modelValue": o[0] ||= (e) => W.value = e,
138
+ type: "text",
139
+ placeholder: m(V).modules.search,
140
+ 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)]"
141
+ }, null, 8, E), [[ne, W.value]])])]), f("div", D, [J.value.length > 0 ? (r(), h("div", O, [(r(!0), h(u, null, t(J.value, (e) => (r(), h("button", {
142
+ key: e.id,
143
+ type: "button",
144
+ "aria-pressed": G.value === e.id,
145
+ 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]",
146
+ style: re({
147
+ borderColor: G.value === e.id ? "var(--tpl-primary)" : "var(--tpl-border)",
148
+ backgroundColor: G.value === e.id ? "var(--tpl-primary-light)" : "transparent"
149
+ }),
150
+ onClick: (t) => G.value = e.id
151
+ }, [f("div", A, [f("span", j, n(e.name), 1), f("span", M, n(m(V).modules.blockCount.replace("{count}", String(e.content.length))), 1)]), f("div", N, [
152
+ (r(!0), h(u, null, t(Ae(e), (e) => (r(), d(i(e.icon), {
153
+ key: e.type,
154
+ size: 14,
155
+ "stroke-width": 1.5,
156
+ class: "tpl:text-[var(--tpl-text-dim)]"
157
+ }))), 128)),
158
+ Z(e) > 0 ? (r(), h("span", P, " +" + n(Z(e)), 1)) : te("", !0),
159
+ K.value === e.id ? (r(), h("button", {
160
+ key: 1,
161
+ "aria-label": m(V).modules.deleteConfirm,
162
+ 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)]",
163
+ style: { "background-color": "transparent" },
164
+ onClick: c((t) => je(e.id), ["stop"])
165
+ }, n(m(V).modules.deleteConfirm), 9, F)) : (r(), h("button", {
166
+ key: 2,
167
+ 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)]",
168
+ "aria-label": m(V).modules.delete,
169
+ title: m(V).modules.delete,
170
+ onClick: c((t) => K.value = e.id, ["stop"])
171
+ }, [g(m(ce), {
172
+ size: 12,
173
+ "stroke-width": 1.5
174
+ })], 8, I))
175
+ ])], 12, k))), 128))])) : (r(), h("div", L, [g(m(y), {
176
+ size: 32,
177
+ "stroke-width": 1,
178
+ class: "tpl:text-[var(--tpl-text-dim)]"
179
+ }), f("p", R, n(W.value ? m(V).modules.noModules : m(V).modules.noModulesHint), 1)]))])]), f("div", ge, [Y.value ? (r(), h("div", _e, [f("div", ve, [g(m(De), { blocks: Y.value.content }, null, 8, ["blocks"])])])) : (r(), h("div", ye, [g(m(y), {
180
+ size: 32,
181
+ "stroke-width": 1,
182
+ class: "tpl:text-[var(--tpl-text-dim)]"
183
+ }), f("p", be, n(m(V).modules.selectToPreview), 1)]))])]),
184
+ f("div", xe, [f("div", Se, [f("label", Ce, n(m(V).modules.insertPosition), 1), s(f("select", {
185
+ "onUpdate:modelValue": o[1] ||= (e) => q.value = e,
186
+ 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)]"
187
+ }, [(r(!0), h(u, null, t(X.value, (e) => (r(), h("option", {
188
+ key: e.value,
189
+ value: e.value
190
+ }, n(e.label), 9, we))), 128))], 512), [[ie, q.value]])]), f("div", Te, [f("button", {
191
+ type: "button",
192
+ 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)]",
193
+ onClick: $
194
+ }, n(m(V).modules.close), 1), f("button", {
195
+ type: "button",
196
+ 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)]",
197
+ disabled: !Y.value,
198
+ onClick: Q
199
+ }, n(m(V).modules.insert), 9, Ee)])])
200
+ ])]),
201
+ _: 1
202
+ }, 8, ["visible"]));
203
+ }
204
+ });
205
+ //#endregion
206
+ export { z as default };