@templatical/editor 0.6.7 → 0.7.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 (106) hide show
  1. package/README.md +26 -1
  2. package/dist/{AccessibilityPanel-B2MT0M58.js → AccessibilityPanel-D-PqmHdH.js} +2 -2
  3. package/dist/{AiChatSidebar-w5ek3Z76.js → AiChatSidebar-BwLECwsO.js} +1 -1
  4. package/dist/{AiFeatureMenu-ChlAWywJ.js → AiFeatureMenu-CVHKharv.js} +3 -3
  5. package/dist/{BlockA11yBadge-C0S6kPC4.js → BlockA11yBadge-BFIw0h1m.js} +2 -2
  6. package/dist/{CloudEditor-DYYaScFe.js → CloudEditor-DdZatjUe.js} +30 -21
  7. package/dist/{CollaboratorBar-Bo8vtPId.js → CollaboratorBar-VZKOv_Zn.js} +2 -2
  8. package/dist/{CommentsSidebar-BQROg36f.js → CommentsSidebar-BiRtaXYD.js} +3 -3
  9. package/dist/{CountdownBlock-Bxqe7zwL.js → CountdownBlock-Cq8A8WrM.js} +1 -1
  10. package/dist/{CountdownToolbar-CpFAnjSo.js → CountdownToolbar-CojjlZet.js} +2 -2
  11. package/dist/{DesignReferenceSidebar-CfqpcWX6.js → DesignReferenceSidebar-Ci9HIGbf.js} +2 -2
  12. package/dist/ModuleBrowserModal-D7IYx1Nh.js +206 -0
  13. package/dist/{ModulePreviewCanvas-Cw9GeGus.js → ModulePreviewCanvas-I-uMcK5G.js} +2 -2
  14. package/dist/{NumberWithSuffix-Dw8dN1Pt.js → NumberWithSuffix-CLTBb2Rj.js} +1 -1
  15. package/dist/{ParagraphEditor-DjDiUzmv.js → ParagraphEditor-BRQTNDFO.js} +156 -151
  16. package/dist/{RichTextEditorContent-CK3Om7ES.js → RichTextEditorContent-C3QSg7gd.js} +32 -28
  17. package/dist/{SaveModuleDialog-CSUPmfRP.js → SaveModuleDialog-DGGGNZfm.js} +6 -6
  18. package/dist/{SnapshotHistory-DwX2fj6N.js → SnapshotHistory-C97Iw6xw.js} +3 -3
  19. package/dist/{TemplateScoringPanel-BIAeCAEP.js → TemplateScoringPanel-V79yrEPC.js} +3 -3
  20. package/dist/{TestEmailModal-CIlBvWWn.js → TestEmailModal-B7S8H-VG.js} +3 -3
  21. package/dist/{TitleEditor-BCV5k6wj.js → TitleEditor-DhFTYzrw.js} +65 -60
  22. package/dist/{TplModal-C3Hq9b58.js → TplModal-BgABm6ju.js} +21 -17
  23. package/dist/{blockTypeIcons-iUurP50H.js → blockTypeIcons-BSf-3RJ-.js} +1 -1
  24. package/dist/bundle-stats.json +7 -7
  25. package/dist/cdn/chunks/{AccessibilityPanel-DnNB30b0.js → AccessibilityPanel-kgNBRaZV.js} +28 -28
  26. package/dist/cdn/chunks/{AccessibilityPanel-DnNB30b0.js.map → AccessibilityPanel-kgNBRaZV.js.map} +1 -1
  27. package/dist/cdn/chunks/{AiFeatureMenu-BKBh_ueF.js → AiFeatureMenu-CRkzwdMg.js} +15 -15
  28. package/dist/cdn/chunks/{AiFeatureMenu-BKBh_ueF.js.map → AiFeatureMenu-CRkzwdMg.js.map} +1 -1
  29. package/dist/cdn/chunks/{BlockA11yBadge-CnBu14Fj.js → BlockA11yBadge-BfuH2Hrg.js} +9 -9
  30. package/dist/cdn/chunks/{BlockA11yBadge-CnBu14Fj.js.map → BlockA11yBadge-BfuH2Hrg.js.map} +1 -1
  31. package/dist/cdn/chunks/{CloudEditor-CmR17piA.js → CloudEditor-h5JXI8WQ.js} +252 -243
  32. package/dist/cdn/chunks/CloudEditor-h5JXI8WQ.js.map +1 -0
  33. package/dist/cdn/chunks/{CollaboratorBar-BejZaFtY.js → CollaboratorBar-CMl3lAZU.js} +15 -15
  34. package/dist/cdn/chunks/{CollaboratorBar-BejZaFtY.js.map → CollaboratorBar-CMl3lAZU.js.map} +1 -1
  35. package/dist/cdn/chunks/{CountdownBlock-CjvUEHhE.js → CountdownBlock-D1RoaOgF.js} +18 -18
  36. package/dist/cdn/chunks/{CountdownBlock-CjvUEHhE.js.map → CountdownBlock-D1RoaOgF.js.map} +1 -1
  37. package/dist/cdn/chunks/{CountdownToolbar-Caokkqsg.js → CountdownToolbar-DltwuOer.js} +42 -42
  38. package/dist/cdn/chunks/{CountdownToolbar-Caokkqsg.js.map → CountdownToolbar-DltwuOer.js.map} +1 -1
  39. package/dist/cdn/chunks/{ModuleBrowserModal-Tb9a7L-K.js → ModuleBrowserModal-3uu2mXR9.js} +36 -36
  40. package/dist/cdn/chunks/{ModuleBrowserModal-Tb9a7L-K.js.map → ModuleBrowserModal-3uu2mXR9.js.map} +1 -1
  41. package/dist/cdn/chunks/{ModulePreviewCanvas-JWIEv5oS.js → ModulePreviewCanvas-K9CQFr7p.js} +37 -37
  42. package/dist/cdn/chunks/{ModulePreviewCanvas-JWIEv5oS.js.map → ModulePreviewCanvas-K9CQFr7p.js.map} +1 -1
  43. package/dist/cdn/chunks/{NumberWithSuffix-DrV8eumz.js → NumberWithSuffix-BIFgtqGs.js} +74 -74
  44. package/dist/cdn/chunks/{NumberWithSuffix-DrV8eumz.js.map → NumberWithSuffix-BIFgtqGs.js.map} +1 -1
  45. package/dist/cdn/chunks/{ParagraphEditor-CSfShBAO.js → ParagraphEditor-DlpZX_x4.js} +180 -176
  46. package/dist/cdn/chunks/ParagraphEditor-DlpZX_x4.js.map +1 -0
  47. package/dist/cdn/chunks/{RichTextEditorContent-DgqZzl8n.js → RichTextEditorContent-CPGT8h-O.js} +40 -37
  48. package/dist/cdn/chunks/RichTextEditorContent-CPGT8h-O.js.map +1 -0
  49. package/dist/cdn/chunks/{SaveModuleDialog-CxTwrIgx.js → SaveModuleDialog-_uaJscj1.js} +24 -24
  50. package/dist/cdn/chunks/{SaveModuleDialog-CxTwrIgx.js.map → SaveModuleDialog-_uaJscj1.js.map} +1 -1
  51. package/dist/cdn/chunks/TitleEditor-Kerz6US8.js +175 -0
  52. package/dist/cdn/chunks/TitleEditor-Kerz6US8.js.map +1 -0
  53. package/dist/cdn/chunks/{blockTypeIcons-DMt-2qR6.js → blockTypeIcons-BeOhGtoo.js} +7 -7
  54. package/dist/cdn/chunks/{blockTypeIcons-DMt-2qR6.js.map → blockTypeIcons-BeOhGtoo.js.map} +1 -1
  55. package/dist/cdn/chunks/{draggable-CNhyCGIO.js → draggable-P6QWzy4g.js} +1182 -1171
  56. package/dist/cdn/chunks/{draggable-CNhyCGIO.js.map → draggable-P6QWzy4g.js.map} +1 -1
  57. package/dist/cdn/chunks/{extensions-CUvwrffu.js → extensions-BZYkPlKr.js} +107 -108
  58. package/dist/cdn/chunks/extensions-BZYkPlKr.js.map +1 -0
  59. package/dist/cdn/chunks/{features-U3nzKc-R.js → features-DzIN-Nua.js} +925 -896
  60. package/dist/cdn/chunks/features-DzIN-Nua.js.map +1 -0
  61. package/dist/cdn/chunks/{icons-QcjADKIW.js → icons-Nvr6w13E.js} +2 -2
  62. package/dist/cdn/chunks/{icons-QcjADKIW.js.map → icons-Nvr6w13E.js.map} +1 -1
  63. package/dist/cdn/chunks/{media-library-Zcd_GInj.js → media-library-BzT7BoGU.js} +1189 -1183
  64. package/dist/cdn/chunks/media-library-BzT7BoGU.js.map +1 -0
  65. package/dist/cdn/chunks/{quality-8eo6DM3p.js → quality-C328caFm.js} +45 -45
  66. package/dist/cdn/chunks/{quality-8eo6DM3p.js.map → quality-C328caFm.js.map} +1 -1
  67. package/dist/cdn/chunks/{renderer-eHJyPiJH.js → renderer-DYpHh_uV.js} +20 -20
  68. package/dist/cdn/chunks/{renderer-eHJyPiJH.js.map → renderer-DYpHh_uV.js.map} +1 -1
  69. package/dist/cdn/chunks/{src-CthVYW_o.js → src-DKNTQJVO.js} +144 -144
  70. package/dist/cdn/chunks/{src-CthVYW_o.js.map → src-DKNTQJVO.js.map} +1 -1
  71. package/dist/cdn/chunks/{styles-CV5w3kjq.js → styles-DaTht5d7.js} +924 -899
  72. package/dist/cdn/chunks/styles-DaTht5d7.js.map +1 -0
  73. package/dist/cdn/chunks/{tiptap-IyIsncxY.js → tiptap-BwTCLVWl.js} +7 -7
  74. package/dist/cdn/chunks/{tiptap-IyIsncxY.js.map → tiptap-BwTCLVWl.js.map} +1 -1
  75. package/dist/cdn/editor.css +1 -1
  76. package/dist/cdn/editor.js +197 -146
  77. package/dist/cdn/editor.js.map +1 -1
  78. package/dist/{extensions-BF39Siqk.js → extensions-D-J02CiP.js} +50 -51
  79. package/dist/index.d.ts +56 -11
  80. package/dist/{keys-Bqs_0du9.js → keys-B5SJtPWf.js} +3 -3
  81. package/dist/style.css +1 -1
  82. package/dist/{styles-BgmKdc2x.js → styles-D_fEz49o.js} +497 -472
  83. package/dist/templatical-editor.js +182 -131
  84. package/dist/{useCloudI18n-CL_AwWwi.js → useCloudI18n-ByEMykjO.js} +1 -1
  85. package/dist/{useEditorCore-CnXrv71D.js → useEditorCore-uCU9Ny0M.js} +637 -619
  86. package/dist/{useI18n-CgmQftNf.js → useI18n-PEB8ioi_.js} +1 -1
  87. package/dist/{useMergeTag-vpwrZ9eQ.js → useMergeTag-C47xwU7X.js} +2 -2
  88. package/dist/usePopoverRoot-BxJrqnMD.js +8 -0
  89. package/package.json +7 -7
  90. package/dist/ModuleBrowserModal-CKhsaPnA.js +0 -206
  91. package/dist/cdn/chunks/CloudEditor-CmR17piA.js.map +0 -1
  92. package/dist/cdn/chunks/ParagraphEditor-CSfShBAO.js.map +0 -1
  93. package/dist/cdn/chunks/RichTextEditorContent-DgqZzl8n.js.map +0 -1
  94. package/dist/cdn/chunks/TitleEditor-DlqV7ODD.js +0 -171
  95. package/dist/cdn/chunks/TitleEditor-DlqV7ODD.js.map +0 -1
  96. package/dist/cdn/chunks/extensions-CUvwrffu.js.map +0 -1
  97. package/dist/cdn/chunks/features-U3nzKc-R.js.map +0 -1
  98. package/dist/cdn/chunks/media-library-Zcd_GInj.js.map +0 -1
  99. package/dist/cdn/chunks/styles-CV5w3kjq.js.map +0 -1
  100. /package/dist/{de-DcVOh9Fp.js → de-BhIWu_bO.js} +0 -0
  101. /package/dist/{de-DCaaCE5s.js → de-Di4MEjjx.js} +0 -0
  102. /package/dist/{emojiData-PQyVa4bU.js → emojiData-DX3E0XT-.js} +0 -0
  103. /package/dist/{en-DXCyK4-X.js → en-BSuzi-Pd.js} +0 -0
  104. /package/dist/{en-TZVJ_f6v.js → en-D7HRbYah.js} +0 -0
  105. /package/dist/{pt-BR-Vq7D7c11.js → pt-BR-CCVBRais.js} +0 -0
  106. /package/dist/{pt-BR-BMGasLBa.js → pt-BR-K32lt6YP.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { G as e, w as t } from "./vue.runtime.esm-bundler-Bxqkjqhc.js";
2
- import { E as n } from "./keys-Bqs_0du9.js";
2
+ import { O as n } from "./keys-B5SJtPWf.js";
3
3
  //#region src/composables/useI18n.ts
4
4
  function r(r) {
5
5
  let i = r ?? t(n, null);
@@ -1,9 +1,9 @@
1
1
  import { X as e, w as t } from "./vue.runtime.esm-bundler-Bxqkjqhc.js";
2
2
  import { O as n, n as r, w as i } from "./dist-DJmnUmW9.js";
3
- import { S as a, b as o, v as s, y as c } from "./keys-Bqs_0du9.js";
3
+ import { C as a, b as o, x as s, y as c } from "./keys-B5SJtPWf.js";
4
4
  //#region src/composables/useMergeTag.ts
5
5
  function l() {
6
- let l = t(s, []), u = t(o, r.liquid), d = t(a, null), f = t(c, !0), p = e(!1);
6
+ let l = t(c, []), u = t(s, r.liquid), d = t(a, null), f = t(o, !0), p = e(!1);
7
7
  function m(e) {
8
8
  return n(e, u);
9
9
  }
@@ -0,0 +1,8 @@
1
+ import { X as e, w as t } from "./vue.runtime.esm-bundler-Bxqkjqhc.js";
2
+ import { w as n } from "./keys-B5SJtPWf.js";
3
+ //#region src/composables/usePopoverRoot.ts
4
+ function r() {
5
+ return t(n, e(null));
6
+ }
7
+ //#endregion
8
+ export { r as t };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@templatical/editor",
3
3
  "description": "Vue 3 visual drag-and-drop email editor powered by Templatical",
4
- "version": "0.6.7",
4
+ "version": "0.7.0",
5
5
  "bugs": "https://github.com/templatical/sdk/issues",
6
6
  "devDependencies": {
7
7
  "@lucide/vue": "^1.11.0",
@@ -33,9 +33,9 @@
33
33
  "vue": "^3.5.33",
34
34
  "vue-draggable-plus": "^0.6.0",
35
35
  "vue-tsc": "^3.2.7",
36
- "@templatical/core": "0.6.7",
37
- "@templatical/quality": "0.6.7",
38
- "@templatical/types": "0.6.7"
36
+ "@templatical/core": "0.7.0",
37
+ "@templatical/quality": "0.7.0",
38
+ "@templatical/types": "0.7.0"
39
39
  },
40
40
  "exports": {
41
41
  ".": {
@@ -63,9 +63,9 @@
63
63
  "license": "SEE LICENSE IN LICENSE",
64
64
  "module": "./dist/templatical-editor.js",
65
65
  "peerDependencies": {
66
- "@templatical/media-library": "0.6.7",
67
- "@templatical/quality": "0.6.7",
68
- "@templatical/renderer": "0.6.7"
66
+ "@templatical/media-library": "0.7.0",
67
+ "@templatical/quality": "0.7.0",
68
+ "@templatical/renderer": "0.7.0"
69
69
  },
70
70
  "peerDependenciesMeta": {
71
71
  "@templatical/renderer": {
@@ -1,206 +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-Bxqkjqhc.js";
2
- import "./useEditorCore-CnXrv71D.js";
3
- import { C as oe, O as g, m as se } from "./keys-Bqs_0du9.js";
4
- import { t as ce } from "./useI18n-CgmQftNf.js";
5
- import { t as _ } from "./createLucideIcon-Di4mqmGn.js";
6
- import { n as v, t as y } from "./blockTypeIcons-iUurP50H.js";
7
- import { t as le } from "./trash-2-424iqbpN.js";
8
- import { t as ue } from "./x-Dlaenqta.js";
9
- import { n as de } from "./useCloudI18n-CL_AwWwi.js";
10
- import { t as fe } from "./TplModal-C3Hq9b58.js";
11
- var pe = _("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
- }]]), me = {
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
- }, he = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-4 tpl:border-[var(--tpl-border)]" }, b = {
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__ */ o({
52
- __name: "ModuleBrowserModal",
53
- props: { visible: { type: Boolean } },
54
- emits: ["close", "insert"],
55
- setup(o, { emit: _ }) {
56
- let z = o, B = _, De = ie(() => import("./ModulePreviewCanvas-Cw9GeGus.js")), { t: Oe } = ce(), { t: V } = de(), H = g(oe, "ModuleBrowserModal"), U = g(se, "ModuleBrowserModal"), W = a(""), G = a(null), K = a(null), q = a("end"), J = c(() => {
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 = c(() => G.value ? H.modules.value.find((e) => e.id === G.value) ?? null : null), X = c(() => {
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 = c(() => {
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
- r(() => 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) && y[r.type] && (n.add(r.type), t.push({
93
- type: r.type,
94
- icon: y[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 (r, a) => (e(), f(fe, {
119
- visible: o.visible,
120
- onClose: $,
121
- onKeydown: Me
122
- }, {
123
- default: ae(() => [l("div", me, [
124
- l("div", he, [l("h3", b, m(p(V).modules.browse), 1), l("button", {
125
- "aria-label": p(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
- }, [h(p(ue), {
129
- size: 16,
130
- "stroke-width": 2
131
- })], 8, x)]),
132
- l("div", S, [l("div", C, [l("div", w, [l("div", T, [h(p(pe), {
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
- }), t(l("input", {
137
- "onUpdate:modelValue": a[0] ||= (e) => W.value = e,
138
- type: "text",
139
- placeholder: p(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), [[ee, W.value]])])]), l("div", D, [J.value.length > 0 ? (e(), u("div", O, [(e(!0), u(d, null, i(J.value, (t) => (e(), u("button", {
142
- key: t.id,
143
- type: "button",
144
- "aria-pressed": G.value === t.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 === t.id ? "var(--tpl-primary)" : "var(--tpl-border)",
148
- backgroundColor: G.value === t.id ? "var(--tpl-primary-light)" : "transparent"
149
- }),
150
- onClick: (e) => G.value = t.id
151
- }, [l("div", A, [l("span", j, m(t.name), 1), l("span", M, m(p(V).modules.blockCount.replace("{count}", String(t.content.length))), 1)]), l("div", N, [
152
- (e(!0), u(d, null, i(Ae(t), (t) => (e(), f(n(t.icon), {
153
- key: t.type,
154
- size: 14,
155
- "stroke-width": 1.5,
156
- class: "tpl:text-[var(--tpl-text-dim)]"
157
- }))), 128)),
158
- Z(t) > 0 ? (e(), u("span", P, " +" + m(Z(t)), 1)) : ne("", !0),
159
- K.value === t.id ? (e(), u("button", {
160
- key: 1,
161
- "aria-label": p(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: s((e) => je(t.id), ["stop"])
165
- }, m(p(V).modules.deleteConfirm), 9, F)) : (e(), u("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": p(V).modules.delete,
169
- title: p(V).modules.delete,
170
- onClick: s((e) => K.value = t.id, ["stop"])
171
- }, [h(p(le), {
172
- size: 12,
173
- "stroke-width": 1.5
174
- })], 8, I))
175
- ])], 12, k))), 128))])) : (e(), u("div", L, [h(p(v), {
176
- size: 32,
177
- "stroke-width": 1,
178
- class: "tpl:text-[var(--tpl-text-dim)]"
179
- }), l("p", R, m(W.value ? p(V).modules.noModules : p(V).modules.noModulesHint), 1)]))])]), l("div", ge, [Y.value ? (e(), u("div", _e, [l("div", ve, [h(p(De), { blocks: Y.value.content }, null, 8, ["blocks"])])])) : (e(), u("div", ye, [h(p(v), {
180
- size: 32,
181
- "stroke-width": 1,
182
- class: "tpl:text-[var(--tpl-text-dim)]"
183
- }), l("p", be, m(p(V).modules.selectToPreview), 1)]))])]),
184
- l("div", xe, [l("div", Se, [l("label", Ce, m(p(V).modules.insertPosition), 1), t(l("select", {
185
- "onUpdate:modelValue": a[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
- }, [(e(!0), u(d, null, i(X.value, (t) => (e(), u("option", {
188
- key: t.value,
189
- value: t.value
190
- }, m(t.label), 9, we))), 128))], 512), [[te, q.value]])]), l("div", Te, [l("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
- }, m(p(V).modules.close), 1), l("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
- }, m(p(V).modules.insert), 9, Ee)])])
200
- ])]),
201
- _: 1
202
- }, 8, ["visible"]));
203
- }
204
- });
205
- //#endregion
206
- export { z as default };