@templatical/editor 0.13.0 → 0.14.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 (153) hide show
  1. package/dist/{AiChatSidebar-B0-U5-sb.js → AiChatSidebar-J8iO_sX7.js} +14 -14
  2. package/dist/{AiFeatureMenu-DxDwLS8B.js → AiFeatureMenu-F2diEDgV.js} +10 -10
  3. package/dist/{BlockIssueBadge-C-EPqWsh.js → BlockIssueBadge-a-qlByxF.js} +5 -5
  4. package/dist/{CloudEditor-DaEfipBn.js → CloudEditor-CDjtwb4i.js} +236 -234
  5. package/dist/{CollaboratorBar-DgwjisX2.js → CollaboratorBar-B_EnJLtW.js} +4 -4
  6. package/dist/{CommentsSidebar-CpRLN40c.js → CommentsSidebar-DaP9BA_r.js} +18 -18
  7. package/dist/{CountdownBlock-DO9fziwf.js → CountdownBlock-DtAokAVw.js} +3 -3
  8. package/dist/{CountdownToolbar-BeII06yJ.js → CountdownToolbar-Dtqgwy0g.js} +3 -3
  9. package/dist/{DesignReferenceSidebar-BgPDbOsl.js → DesignReferenceSidebar-BHRlTqlT.js} +10 -10
  10. package/dist/{IssuesPanel-I0z6k6-H.js → IssuesPanel-u7ee3Wrl.js} +11 -11
  11. package/dist/{LoadingTrack-C7mGWPHS.js → LoadingTrack-CV3ID80N.js} +1 -1
  12. package/dist/ModuleBrowserModal-DOsdaS6s.js +201 -0
  13. package/dist/{ModulePreviewCanvas-Dni9kK4j.js → ModulePreviewCanvas-Cx4MOJ0X.js} +3 -3
  14. package/dist/{NumberWithSuffix-D3fdj0iO.js → NumberWithSuffix-D2mW_DhT.js} +4 -4
  15. package/dist/{ParagraphEditor-CZ-cmhX3.js → ParagraphEditor-DMzkVnST.js} +153 -133
  16. package/dist/{RichTextEditorContent-Q5altsx1.js → RichTextEditorContent-CRCxCwKf.js} +7 -7
  17. package/dist/{SaveModuleDialog-C38VqN2T.js → SaveModuleDialog-DuEKgumL.js} +8 -8
  18. package/dist/{SnapshotHistory-ByloTpwh.js → SnapshotHistory-CVgiNJtE.js} +12 -12
  19. package/dist/{TemplateScoringPanel-CUxiPtEf.js → TemplateScoringPanel-lm0_9nYi.js} +25 -25
  20. package/dist/{TestEmailModal-BvZBMBad.js → TestEmailModal-WBMdiW5S.js} +5 -5
  21. package/dist/{TitleEditor-DbNOcvhR.js → TitleEditor-eyT0h-Sa.js} +71 -55
  22. package/dist/{TplModal-BYb-X5Bj.js → TplModal-tjQ7OB0g.js} +4 -4
  23. package/dist/{blockTypeIcons-CyAom3iI.js → blockTypeIcons-DdB3uTKD.js} +5 -5
  24. package/dist/bundle-stats.json +6 -6
  25. package/dist/cdn/chunks/{AiFeatureMenu-BSoy-SoF.js → AiFeatureMenu-D7rB2SBs.js} +8 -8
  26. package/dist/cdn/chunks/{AiFeatureMenu-BSoy-SoF.js.map → AiFeatureMenu-D7rB2SBs.js.map} +1 -1
  27. package/dist/cdn/chunks/{BlockIssueBadge-BQDUuJxy.js → BlockIssueBadge-DHOe0pgx.js} +5 -5
  28. package/dist/cdn/chunks/{BlockIssueBadge-BQDUuJxy.js.map → BlockIssueBadge-DHOe0pgx.js.map} +1 -1
  29. package/dist/cdn/chunks/{CloudEditor-BZuzsQOZ.js → CloudEditor-DNed_Ym0.js} +208 -206
  30. package/dist/cdn/chunks/CloudEditor-DNed_Ym0.js.map +1 -0
  31. package/dist/cdn/chunks/{CollaboratorBar-DUpSrtDr.js → CollaboratorBar-sj_9Lee3.js} +4 -4
  32. package/dist/cdn/chunks/{CollaboratorBar-DUpSrtDr.js.map → CollaboratorBar-sj_9Lee3.js.map} +1 -1
  33. package/dist/cdn/chunks/{CountdownBlock-DChGTAsH.js → CountdownBlock-C1Ikjpn4.js} +3 -3
  34. package/dist/cdn/chunks/{CountdownBlock-DChGTAsH.js.map → CountdownBlock-C1Ikjpn4.js.map} +1 -1
  35. package/dist/cdn/chunks/{CountdownToolbar-C6gX2SJr.js → CountdownToolbar-j1G_X8rB.js} +4 -4
  36. package/dist/cdn/chunks/{CountdownToolbar-C6gX2SJr.js.map → CountdownToolbar-j1G_X8rB.js.map} +1 -1
  37. package/dist/cdn/chunks/{IssuesPanel-Bo1uhdSe.js → IssuesPanel-CTOf3PsH.js} +11 -11
  38. package/dist/cdn/chunks/{IssuesPanel-Bo1uhdSe.js.map → IssuesPanel-CTOf3PsH.js.map} +1 -1
  39. package/dist/cdn/chunks/{ModuleBrowserModal-a-tZRCcD.js → ModuleBrowserModal-DCh88-rr.js} +11 -8
  40. package/dist/cdn/chunks/{ModuleBrowserModal-a-tZRCcD.js.map → ModuleBrowserModal-DCh88-rr.js.map} +1 -1
  41. package/dist/cdn/chunks/{ModulePreviewCanvas-Bm6k0Op0.js → ModulePreviewCanvas-DJqvTKmg.js} +21 -21
  42. package/dist/cdn/chunks/{ModulePreviewCanvas-Bm6k0Op0.js.map → ModulePreviewCanvas-DJqvTKmg.js.map} +1 -1
  43. package/dist/cdn/chunks/{NumberWithSuffix-HTbuD3VJ.js → NumberWithSuffix-Bu45XWSl.js} +5 -5
  44. package/dist/cdn/chunks/{NumberWithSuffix-HTbuD3VJ.js.map → NumberWithSuffix-Bu45XWSl.js.map} +1 -1
  45. package/dist/cdn/chunks/{ParagraphEditor-pGrfSccu.js → ParagraphEditor-DwZqLJp2.js} +130 -110
  46. package/dist/cdn/chunks/ParagraphEditor-DwZqLJp2.js.map +1 -0
  47. package/dist/cdn/chunks/{RichTextEditorContent-D7XZix_1.js → RichTextEditorContent-CIuZ-2DV.js} +4 -4
  48. package/dist/cdn/chunks/{RichTextEditorContent-D7XZix_1.js.map → RichTextEditorContent-CIuZ-2DV.js.map} +1 -1
  49. package/dist/cdn/chunks/{SaveModuleDialog-C9PQ9x6j.js → SaveModuleDialog-Bep0X2s_.js} +6 -6
  50. package/dist/cdn/chunks/{SaveModuleDialog-C9PQ9x6j.js.map → SaveModuleDialog-Bep0X2s_.js.map} +1 -1
  51. package/dist/cdn/chunks/{TitleEditor-BvFbL16O.js → TitleEditor-DO1-h3RY.js} +62 -46
  52. package/dist/cdn/chunks/TitleEditor-DO1-h3RY.js.map +1 -0
  53. package/dist/cdn/chunks/blockTypeIcons-8o24HVJu.js +22 -0
  54. package/dist/cdn/chunks/{blockTypeIcons-Kd1MT0u8.js.map → blockTypeIcons-8o24HVJu.js.map} +1 -1
  55. package/dist/{de-C2wOXoxs.js → cdn/chunks/de-LsV0u1tP.js} +19 -1
  56. package/dist/cdn/chunks/de-LsV0u1tP.js.map +1 -0
  57. package/dist/cdn/chunks/{draggable-Bci-fq8y.js → draggable-kPCz_3zM.js} +14 -5
  58. package/dist/cdn/chunks/{draggable-Bci-fq8y.js.map → draggable-kPCz_3zM.js.map} +1 -1
  59. package/dist/cdn/chunks/{en-dR7zfNC3.js → en-Bb8X1bOs.js} +18 -2
  60. package/dist/cdn/chunks/en-Bb8X1bOs.js.map +1 -0
  61. package/dist/cdn/chunks/{extensions-CuUjSmuA.js → extensions-iwBXnEwq.js} +16 -16
  62. package/dist/cdn/chunks/{extensions-CuUjSmuA.js.map → extensions-iwBXnEwq.js.map} +1 -1
  63. package/dist/cdn/chunks/{features-DU6lA8l1.js → features-CkTMVylx.js} +940 -812
  64. package/dist/cdn/chunks/features-CkTMVylx.js.map +1 -0
  65. package/dist/cdn/chunks/{icons-BjHUZZyJ.js → icons-9zjCuoJx.js} +158 -152
  66. package/dist/cdn/chunks/icons-9zjCuoJx.js.map +1 -0
  67. package/dist/cdn/chunks/liquid.browser-DKKBzRQu.js.map +1 -1
  68. package/dist/cdn/chunks/{media-library-Byelliig.js → media-library-DMRIPx4g.js} +552 -550
  69. package/dist/cdn/chunks/{media-library-Byelliig.js.map → media-library-DMRIPx4g.js.map} +1 -1
  70. package/dist/cdn/chunks/{pt-BR-BZ86xqK6.js → pt-BR-BwJY_cvb.js} +18 -2
  71. package/dist/cdn/chunks/pt-BR-BwJY_cvb.js.map +1 -0
  72. package/dist/cdn/chunks/{pusher-BICWUP2j.js → pusher-CdEqyLwF.js} +6 -3
  73. package/dist/cdn/chunks/{pusher-BICWUP2j.js.map → pusher-CdEqyLwF.js.map} +1 -1
  74. package/dist/cdn/chunks/quality-CyeUgs_c.js +2176 -0
  75. package/dist/cdn/chunks/{quality-DNnYAntR.js.map → quality-CyeUgs_c.js.map} +1 -1
  76. package/dist/cdn/chunks/{renderer-CZKO-Tav.js → renderer-BIKUEKDD.js} +39 -30
  77. package/dist/cdn/chunks/{renderer-CZKO-Tav.js.map → renderer-BIKUEKDD.js.map} +1 -1
  78. package/dist/cdn/chunks/{src-DsqSXXjk.js → src-pDy_imWG.js} +11 -11
  79. package/dist/cdn/chunks/{src-DsqSXXjk.js.map → src-pDy_imWG.js.map} +1 -1
  80. package/dist/cdn/chunks/{styles-DiAdtiz9.js → styles-D4Bd3SCx.js} +1197 -822
  81. package/dist/cdn/chunks/styles-D4Bd3SCx.js.map +1 -0
  82. package/dist/cdn/chunks/{tiptap-CwScfbsM.js → tiptap-BlLFFU3M.js} +2233 -2213
  83. package/dist/cdn/chunks/tiptap-BlLFFU3M.js.map +1 -0
  84. package/dist/cdn/editor.css +1 -1
  85. package/dist/cdn/editor.js +117 -115
  86. package/dist/cdn/editor.js.map +1 -1
  87. package/dist/{check-BRzXxFHr.js → check-CYJwFmjy.js} +1 -1
  88. package/dist/{chevron-down-DmEgzmYT.js → chevron-down-C5l-DzAA.js} +1 -1
  89. package/dist/{circle-alert-BStvZr3O.js → circle-alert-wf5HUFZY.js} +1 -1
  90. package/dist/{clock-Blwp_1R6.js → clock-Bj0bQw-K.js} +1 -1
  91. package/dist/{cloud-_olro76D.js → cloud-CoFDm9YA.js} +1 -1
  92. package/dist/{createLucideIcon-CmPAC-gt.js → createLucideIcon-Bad2kKE0.js} +4 -4
  93. package/dist/{cdn/chunks/de-C2wOXoxs.js → de-LsV0u1tP.js} +17 -3
  94. package/dist/{dist-BwgjpLfr.js → dist-34OcyoK1.js} +1 -1
  95. package/dist/{dist-Cz79qrLL.js → dist-B7w6xTU6.js} +1 -1
  96. package/dist/{dist-DULfKmTh.js → dist-BX3gGwL8.js} +5 -5
  97. package/dist/{dist-412xXefB.js → dist-Bn703mnA.js} +1 -1
  98. package/dist/{dist-u0iIJH3V.js → dist-CADDCv0o.js} +1 -1
  99. package/dist/{dist-BNEdeWub.js → dist-CGvz7vkq.js} +1 -1
  100. package/dist/{dist-BlG7k25W.js → dist-CLpPNKy9.js} +1 -1
  101. package/dist/{dist-BCQZZUE9.js → dist-ChMninLH.js} +1 -1
  102. package/dist/{dist-b7Ak-CuM.js → dist-CrQZ_af9.js} +1 -1
  103. package/dist/{dist-DhKTdU52.js → dist-CyjyYg52.js} +1426 -1406
  104. package/dist/{dist-D6x1cQeh.js → dist-Dd3ibRZm.js} +2 -2
  105. package/dist/{dist-Cgry6fNv.js → dist-DuCzdgDA.js} +1 -1
  106. package/dist/{dist-o73iaGqy.js → dist-U5vfDdYI.js} +1 -1
  107. package/dist/{en-dR7zfNC3.js → en-Bb8X1bOs.js} +17 -1
  108. package/dist/{extensions-XPlNAKIL.js → extensions-J439b7y7.js} +5 -5
  109. package/dist/{image-up-BFPbw_Zq.js → image-up-x8-WXfsx.js} +1 -1
  110. package/dist/index.d.ts +17 -0
  111. package/dist/{info-B_qLEBN2.js → info-RS_fGcGi.js} +1 -1
  112. package/dist/keys-DgYXDafq.js +10 -0
  113. package/dist/{list-checks-CGg7JxPm.js → list-checks-Bf7XdDyv.js} +1 -1
  114. package/dist/{loader-circle-CDF8eR_Q.js → loader-circle-CLZ0_FvW.js} +1 -1
  115. package/dist/{message-circle-C3cHsCJl.js → message-circle-B-1bN9ab.js} +1 -1
  116. package/dist/{pt-BR-BZ86xqK6.js → pt-BR-BwJY_cvb.js} +17 -1
  117. package/dist/{refresh-cw-Butml7Q4.js → refresh-cw-CWKWqJYG.js} +1 -1
  118. package/dist/scan-line-BtK5dEai.js +31 -0
  119. package/dist/{send-k7npFJNO.js → send-Cn1IUdzh.js} +1 -1
  120. package/dist/{shield-check-CV6GbmCu.js → shield-check-CrvMk4Ea.js} +1 -1
  121. package/dist/{sparkles-C965Xop4.js → sparkles-CgfjwvnG.js} +1 -1
  122. package/dist/style.css +1 -1
  123. package/dist/{styles-D0RCAWhB.js → styles-BUwDOWd3.js} +1221 -846
  124. package/dist/templatical-editor.js +95 -93
  125. package/dist/{text-align-start-Bxnps8fH.js → text-align-start-C3r_Rnvy.js} +1 -1
  126. package/dist/{trash-2-DpGb7fIt.js → trash-2-CjERg4x9.js} +1 -1
  127. package/dist/{triangle-alert-BKYElAwz.js → triangle-alert-Chkny574.js} +1 -1
  128. package/dist/{upload-BF7sxd1_.js → upload-e5kDRkPb.js} +1 -1
  129. package/dist/{useAliveFlag-BinvbqQR.js → useAliveFlag-cUQj9rmB.js} +1 -1
  130. package/dist/{useCloudI18n-L3H2XvdW.js → useCloudI18n-CYJKqXtI.js} +2 -2
  131. package/dist/{useEditorCore-DKYZ7aKk.js → useEditorCore-8JxXDOA4.js} +1031 -903
  132. package/dist/{useI18n-CTs_bP9d.js → useI18n-BWqM8i78.js} +2 -2
  133. package/dist/{useMergeTag-e3RSY-s3.js → useMergeTag-NHC4ylza.js} +3 -3
  134. package/dist/usePopoverRoot-B1sdY4es.js +8 -0
  135. package/dist/{vue.runtime.esm-bundler-B2k01iQh.js → vue.runtime.esm-bundler-BPa483TZ.js} +13 -4
  136. package/dist/{x-CGjkjdKK.js → x-DiPIbccg.js} +1 -1
  137. package/package.json +12 -12
  138. package/dist/ModuleBrowserModal-DsZRr87F.js +0 -198
  139. package/dist/cdn/chunks/CloudEditor-BZuzsQOZ.js.map +0 -1
  140. package/dist/cdn/chunks/ParagraphEditor-pGrfSccu.js.map +0 -1
  141. package/dist/cdn/chunks/TitleEditor-BvFbL16O.js.map +0 -1
  142. package/dist/cdn/chunks/blockTypeIcons-Kd1MT0u8.js +0 -22
  143. package/dist/cdn/chunks/de-C2wOXoxs.js.map +0 -1
  144. package/dist/cdn/chunks/en-dR7zfNC3.js.map +0 -1
  145. package/dist/cdn/chunks/features-DU6lA8l1.js.map +0 -1
  146. package/dist/cdn/chunks/icons-BjHUZZyJ.js.map +0 -1
  147. package/dist/cdn/chunks/pt-BR-BZ86xqK6.js.map +0 -1
  148. package/dist/cdn/chunks/quality-DNnYAntR.js +0 -2176
  149. package/dist/cdn/chunks/styles-DiAdtiz9.js.map +0 -1
  150. package/dist/cdn/chunks/tiptap-CwScfbsM.js.map +0 -1
  151. package/dist/keys-mFiJ5N0_.js +0 -10
  152. package/dist/scan-line-XYEqim_E.js +0 -25
  153. package/dist/usePopoverRoot-DVh7NY1q.js +0 -8
@@ -1,5 +1,5 @@
1
- import { G as e, w as t } from "./vue.runtime.esm-bundler-B2k01iQh.js";
2
- import { j as n } from "./keys-mFiJ5N0_.js";
1
+ import { G as e, w as t } from "./vue.runtime.esm-bundler-BPa483TZ.js";
2
+ import { F as n } from "./keys-DgYXDafq.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
- import { X as e, w as t } from "./vue.runtime.esm-bundler-B2k01iQh.js";
1
+ import { X as e, w as t } from "./vue.runtime.esm-bundler-BPa483TZ.js";
2
2
  import { T as n, k as r, r as i } from "./dist-BctFrpeA.js";
3
- import { S as a, b as o, w as s, x as c, y as l } from "./keys-mFiJ5N0_.js";
3
+ import { C as a, O as o, S as s, T as c, w as l } from "./keys-DgYXDafq.js";
4
4
  //#region src/composables/useMergeTag.ts
5
5
  function u() {
6
- let u = t(l, []), d = t(a, i.liquid), f = t(s, null), p = t(o, !0), m = t(c, null), h = e(!1);
6
+ let u = t(s, []), d = t(c, i.liquid), f = t(o, null), p = t(a, !0), m = t(l, null), h = e(!1);
7
7
  function g(e) {
8
8
  return r(e, d);
9
9
  }
@@ -0,0 +1,8 @@
1
+ import { X as e, w as t } from "./vue.runtime.esm-bundler-BPa483TZ.js";
2
+ import { A as n } from "./keys-DgYXDafq.js";
3
+ //#region src/composables/usePopoverRoot.ts
4
+ function r() {
5
+ return t(n, e(null));
6
+ }
7
+ //#endregion
8
+ export { r as t };
@@ -1478,7 +1478,13 @@ var Gr = /* @__PURE__ */ new WeakMap(), Kr = /* @__PURE__ */ Symbol("_vte"), qr
1478
1478
  r ? (o !== "svg" && Xr(r) ? o = "svg" : o !== "mathml" && Zr(r) && (o = "mathml"), i && i.isCE && (i.ce._teleportTargets || (i.ce._teleportTargets = /* @__PURE__ */ new Set())).add(r), n || (b(e, r, a), ri(e, !1))) : process.env.NODE_ENV !== "production" && !n && B("Invalid Teleport target on mount:", r, `(${typeof r})`);
1479
1479
  }, S = (e) => {
1480
1480
  let t = () => {
1481
- Gr.get(e) === t && (Gr.delete(e), Jr(e.props) && (b(e, _(e.el) || n, e.anchor), ri(e, !0)), x(e));
1481
+ if (Gr.get(e) === t) {
1482
+ if (Gr.delete(e), Jr(e.props)) {
1483
+ let t = _(e.el) || n;
1484
+ b(e, t, e.anchor), ri(e, !0);
1485
+ }
1486
+ x(e);
1487
+ }
1482
1488
  };
1483
1489
  Gr.set(e, t), J(t, a);
1484
1490
  };
@@ -2876,7 +2882,10 @@ function jo(e, i) {
2876
2882
  }
2877
2883
  }
2878
2884
  }, E = (e, t, n, r, i, a, o, s, c = 0) => {
2879
- for (let l = c; l < e.length; l++) v(null, e[l] = s ? ps(e[l]) : fs(e[l]), t, n, r, i, a, o, s);
2885
+ for (let l = c; l < e.length; l++) {
2886
+ let c = e[l] = s ? ps(e[l]) : fs(e[l]);
2887
+ v(null, c, t, n, r, i, a, o, s);
2888
+ }
2880
2889
  }, re = (e, n, r, i, a, o, s) => {
2881
2890
  let l = n.el = e.el;
2882
2891
  process.env.NODE_ENV !== "production" && (l.__vnode = n);
@@ -2899,8 +2908,8 @@ function jo(e, i) {
2899
2908
  }, i);
2900
2909
  }, D = (e, t, n, r, i, a, o) => {
2901
2910
  for (let s = 0; s < t.length; s++) {
2902
- let c = e[s], l = t[s];
2903
- v(c, l, c.el && (c.type === Y || !$o(c, l) || c.shapeFlag & 198) ? m(c.el) : n, null, r, i, a, o, !0);
2911
+ let c = e[s], l = t[s], u = c.el && (c.type === Y || !$o(c, l) || c.shapeFlag & 198) ? m(c.el) : n;
2912
+ v(c, l, u, null, r, i, a, o, !0);
2904
2913
  }
2905
2914
  }, ie = (e, n, r, i, a) => {
2906
2915
  if (n !== r) {
@@ -1,4 +1,4 @@
1
- import { t as e } from "./createLucideIcon-CmPAC-gt.js";
1
+ import { t as e } from "./createLucideIcon-Bad2kKE0.js";
2
2
  var t = e("x", [["path", {
3
3
  d: "M18 6 6 18",
4
4
  key: "1bl5f8"
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@templatical/editor",
3
3
  "description": "Vue 3 visual drag-and-drop email editor powered by Templatical",
4
- "version": "0.13.0",
4
+ "version": "0.14.0",
5
5
  "bugs": "https://github.com/templatical/sdk/issues",
6
6
  "devDependencies": {
7
- "@lucide/vue": "^1.21.0",
7
+ "@lucide/vue": "^1.23.0",
8
8
  "@tiptap/core": "^3.27.1",
9
9
  "@tiptap/extension-color": "^3.27.1",
10
10
  "@tiptap/extension-font-family": "^3.27.1",
@@ -21,20 +21,20 @@
21
21
  "@vitejs/plugin-vue": "^6.0.7",
22
22
  "@vue/test-utils": "^2.4.11",
23
23
  "@vueuse/core": "^14.3.0",
24
- "es-module-lexer": "^2.1.0",
24
+ "es-module-lexer": "^2.3.0",
25
25
  "happy-dom": "^20.10.6",
26
26
  "liquidjs": "^10.27.1",
27
- "tailwindcss": "^4.3.1",
27
+ "tailwindcss": "^4.3.2",
28
28
  "typescript": "^6.0.3",
29
29
  "vanilla-colorful": "^0.7.2",
30
- "vite": "^8.1.0",
30
+ "vite": "^8.1.3",
31
31
  "vitest": "^4.1.9",
32
32
  "vue": "^3.5.39",
33
33
  "vue-draggable-plus": "^0.6.1",
34
- "vue-tsc": "^3.3.5",
35
- "@templatical/core": "0.13.0",
36
- "@templatical/quality": "0.13.0",
37
- "@templatical/types": "0.13.0"
34
+ "vue-tsc": "^3.3.6",
35
+ "@templatical/core": "0.14.0",
36
+ "@templatical/quality": "0.14.0",
37
+ "@templatical/types": "0.14.0"
38
38
  },
39
39
  "exports": {
40
40
  ".": {
@@ -62,9 +62,9 @@
62
62
  "license": "SEE LICENSE IN LICENSE",
63
63
  "module": "./dist/templatical-editor.js",
64
64
  "peerDependencies": {
65
- "@templatical/media-library": "0.13.0",
66
- "@templatical/quality": "0.13.0",
67
- "@templatical/renderer": "0.13.0"
65
+ "@templatical/media-library": "0.14.0",
66
+ "@templatical/quality": "0.14.0",
67
+ "@templatical/renderer": "0.14.0"
68
68
  },
69
69
  "peerDependenciesMeta": {
70
70
  "@templatical/renderer": {
@@ -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 };