@templatical/editor 0.19.0 → 0.20.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 (103) hide show
  1. package/dist/{AiChatSidebar-DAQTFuvi.js → AiChatSidebar-ChrE6pUq.js} +7 -7
  2. package/dist/{AiFeatureMenu-aFSO20PR.js → AiFeatureMenu-DkQ9HhQ6.js} +4 -4
  3. package/dist/{BlockIssueBadge-BQmq1bxn.js → BlockIssueBadge-B4QjePax.js} +2 -2
  4. package/dist/{CloudEditor-D0K-m1GA.js → CloudEditor-CfX-aMiV.js} +15 -15
  5. package/dist/{CollaboratorBar-CJO3l6Dt.js → CollaboratorBar-DTibhQ1j.js} +2 -2
  6. package/dist/{ColorPicker-BsgpTJqK.js → ColorPicker-4vDYhdGe.js} +1 -1
  7. package/dist/{CommentsSidebar-BYMVucZh.js → CommentsSidebar-D-o5Stlg.js} +8 -8
  8. package/dist/{CountdownToolbar-PJI3ffi1.js → CountdownToolbar-D7yQqnA2.js} +2 -2
  9. package/dist/{DesignReferenceSidebar-QfAV8XT9.js → DesignReferenceSidebar-DnO6ZdwS.js} +5 -5
  10. package/dist/{IssuesPanel-CTjRgz8w.js → IssuesPanel-X_vkNGrs.js} +5 -5
  11. package/dist/{ModuleBrowserModal-BNalLx0k.js → ModuleBrowserModal-AJt--JPh.js} +6 -6
  12. package/dist/{ModulePreviewCanvas-BwObwisa.js → ModulePreviewCanvas-BKYOcVCh.js} +1 -1
  13. package/dist/{NumberWithSuffix-D3BKz66W.js → NumberWithSuffix-Bf3rNxza.js} +1 -1
  14. package/dist/{ParagraphEditor-Cf75UfSo.js → ParagraphEditor-C5ixOIYb.js} +7 -7
  15. package/dist/{RichTextEditorContent-MdaLz6Q3.js → RichTextEditorContent-DwhDnMsG.js} +3 -3
  16. package/dist/{SaveModuleDialog-MTjwiF9D.js → SaveModuleDialog-B4QX9eiv.js} +3 -3
  17. package/dist/{SnapshotHistory-C_Y1LzAY.js → SnapshotHistory-DaVueFv6.js} +5 -5
  18. package/dist/{TemplateScoringPanel-DikuKc6i.js → TemplateScoringPanel-B0UHoTLx.js} +10 -10
  19. package/dist/{TestEmailModal-BW8aTtzf.js → TestEmailModal-BkauxF7j.js} +3 -3
  20. package/dist/{TitleEditor-CCUkbRN0.js → TitleEditor-n6WDVDjW.js} +4 -4
  21. package/dist/{TplModal-DoOwUKlT.js → TplModal-BDDyvT-C.js} +1 -1
  22. package/dist/{blockTypeIcons-BlPKjD7M.js → blockTypeIcons-4D0aFXNg.js} +2 -2
  23. package/dist/bundle-stats.json +5 -5
  24. package/dist/cdn/chunks/{AiFeatureMenu-RwJiaPXZ.js → AiFeatureMenu-CIBHAGSz.js} +2 -2
  25. package/dist/cdn/chunks/{AiFeatureMenu-RwJiaPXZ.js.map → AiFeatureMenu-CIBHAGSz.js.map} +1 -1
  26. package/dist/cdn/chunks/{BlockIssueBadge-DM-TDKbr.js → BlockIssueBadge-CxMiLo3p.js} +4 -4
  27. package/dist/cdn/chunks/{BlockIssueBadge-DM-TDKbr.js.map → BlockIssueBadge-CxMiLo3p.js.map} +1 -1
  28. package/dist/cdn/chunks/{CloudEditor-Dufl354p.js → CloudEditor-CEa3Xgqh.js} +131 -131
  29. package/dist/cdn/chunks/{CloudEditor-Dufl354p.js.map → CloudEditor-CEa3Xgqh.js.map} +1 -1
  30. package/dist/cdn/chunks/{CollaboratorBar-xsU20iPl.js → CollaboratorBar-Bk1gD02G.js} +3 -3
  31. package/dist/cdn/chunks/{CollaboratorBar-xsU20iPl.js.map → CollaboratorBar-Bk1gD02G.js.map} +1 -1
  32. package/dist/cdn/chunks/{ColorPicker-y_obnw4o.js → ColorPicker-ll8pynws.js} +179 -179
  33. package/dist/cdn/chunks/ColorPicker-ll8pynws.js.map +1 -0
  34. package/dist/cdn/chunks/{CountdownBlock-sHsRMe1q.js → CountdownBlock-eGUE7hhw.js} +4 -4
  35. package/dist/cdn/chunks/{CountdownBlock-sHsRMe1q.js.map → CountdownBlock-eGUE7hhw.js.map} +1 -1
  36. package/dist/cdn/chunks/{CountdownToolbar-Ckc_jEi-.js → CountdownToolbar-C1bkSjUR.js} +4 -4
  37. package/dist/cdn/chunks/{CountdownToolbar-Ckc_jEi-.js.map → CountdownToolbar-C1bkSjUR.js.map} +1 -1
  38. package/dist/cdn/chunks/{IssuesPanel-DF5Ajuna.js → IssuesPanel-Csasylf_.js} +5 -5
  39. package/dist/cdn/chunks/{IssuesPanel-DF5Ajuna.js.map → IssuesPanel-Csasylf_.js.map} +1 -1
  40. package/dist/cdn/chunks/{ModuleBrowserModal-DG4AVFjH.js → ModuleBrowserModal-DznWWtBI.js} +7 -7
  41. package/dist/cdn/chunks/{ModuleBrowserModal-DG4AVFjH.js.map → ModuleBrowserModal-DznWWtBI.js.map} +1 -1
  42. package/dist/cdn/chunks/{ModulePreviewCanvas-Bc_PcJuc.js → ModulePreviewCanvas-D-h7fr87.js} +20 -20
  43. package/dist/cdn/chunks/{ModulePreviewCanvas-Bc_PcJuc.js.map → ModulePreviewCanvas-D-h7fr87.js.map} +1 -1
  44. package/dist/cdn/chunks/{NumberWithSuffix-8fOO-LC_.js → NumberWithSuffix-Dt-0odUN.js} +2 -2
  45. package/dist/cdn/chunks/{NumberWithSuffix-8fOO-LC_.js.map → NumberWithSuffix-Dt-0odUN.js.map} +1 -1
  46. package/dist/cdn/chunks/{ParagraphEditor-BkafKSju.js → ParagraphEditor-v0_XEL-v.js} +18 -18
  47. package/dist/cdn/chunks/{ParagraphEditor-BkafKSju.js.map → ParagraphEditor-v0_XEL-v.js.map} +1 -1
  48. package/dist/cdn/chunks/{RichTextEditorContent-BthhzOZS.js → RichTextEditorContent-NQExNsaV.js} +4 -4
  49. package/dist/cdn/chunks/{RichTextEditorContent-BthhzOZS.js.map → RichTextEditorContent-NQExNsaV.js.map} +1 -1
  50. package/dist/cdn/chunks/{SaveModuleDialog-DhsfYf2n.js → SaveModuleDialog-BpFhTi-k.js} +5 -5
  51. package/dist/cdn/chunks/{SaveModuleDialog-DhsfYf2n.js.map → SaveModuleDialog-BpFhTi-k.js.map} +1 -1
  52. package/dist/cdn/chunks/{TitleEditor-DLv9cXba.js → TitleEditor-CS-_MzYs.js} +8 -8
  53. package/dist/cdn/chunks/{TitleEditor-DLv9cXba.js.map → TitleEditor-CS-_MzYs.js.map} +1 -1
  54. package/dist/cdn/chunks/{blockTypeIcons-B0uibGX7.js → blockTypeIcons-B0Hjh42a.js} +3 -3
  55. package/dist/cdn/chunks/{blockTypeIcons-B0uibGX7.js.map → blockTypeIcons-B0Hjh42a.js.map} +1 -1
  56. package/dist/cdn/chunks/{extensions-DLHvZ0UH.js → extensions-Di3hdIRT.js} +22 -22
  57. package/dist/cdn/chunks/{extensions-DLHvZ0UH.js.map → extensions-Di3hdIRT.js.map} +1 -1
  58. package/dist/cdn/chunks/{features-Cnfv4QAY.js → features-CLIZ7Q-Y.js} +1490 -1447
  59. package/dist/cdn/chunks/features-CLIZ7Q-Y.js.map +1 -0
  60. package/dist/cdn/chunks/{icons-DbcM69bb.js → icons-GX40Qm2W.js} +2 -2
  61. package/dist/cdn/chunks/{icons-DbcM69bb.js.map → icons-GX40Qm2W.js.map} +1 -1
  62. package/dist/cdn/chunks/{media-library-DpSMwHd4.js → media-library-yYAkAagU.js} +80 -80
  63. package/dist/cdn/chunks/{media-library-DpSMwHd4.js.map → media-library-yYAkAagU.js.map} +1 -1
  64. package/dist/cdn/chunks/{pusher-CIwiKF8H.js → pusher-R0v5p99W.js} +27 -22
  65. package/dist/cdn/chunks/pusher-R0v5p99W.js.map +1 -0
  66. package/dist/cdn/chunks/quality-DffYv9j5.js +2180 -0
  67. package/dist/cdn/chunks/{quality-D9QqkRcU.js.map → quality-DffYv9j5.js.map} +1 -1
  68. package/dist/cdn/chunks/{renderer-BsLQZNXU.js → renderer-DpBGiXOg.js} +13 -13
  69. package/dist/cdn/chunks/{renderer-BsLQZNXU.js.map → renderer-DpBGiXOg.js.map} +1 -1
  70. package/dist/cdn/chunks/{src-zu1ehVNN.js → src-9K6uFiuK.js} +4 -4
  71. package/dist/cdn/chunks/{src-zu1ehVNN.js.map → src-9K6uFiuK.js.map} +1 -1
  72. package/dist/cdn/chunks/{styles-Dx-jXeCd.js → styles-DHSmjlpX.js} +837 -833
  73. package/dist/cdn/chunks/styles-DHSmjlpX.js.map +1 -0
  74. package/dist/cdn/editor.js +11 -11
  75. package/dist/{check-Cg6Mc2pP.js → check-Bl4J_tYV.js} +1 -1
  76. package/dist/{chevron-down-dClfxKrJ.js → chevron-down-COEcl2iP.js} +1 -1
  77. package/dist/{circle-alert-Bhzm-fNA.js → circle-alert-CvHi5etc.js} +1 -1
  78. package/dist/{clock-m7TwQw4b.js → clock-CZZw62e8.js} +1 -1
  79. package/dist/{createLucideIcon-FSF4peHQ.js → createLucideIcon-_peTZQtY.js} +2 -2
  80. package/dist/{image-up-CDEgJqwA.js → image-up-D26rNdfX.js} +1 -1
  81. package/dist/{info-BNP8yGsK.js → info-CE3JSTqk.js} +1 -1
  82. package/dist/{list-checks-jepi4iYr.js → list-checks-BQsLrtBB.js} +1 -1
  83. package/dist/{loader-circle-BT38qSm3.js → loader-circle-s9Rh5lLd.js} +1 -1
  84. package/dist/{message-circle-BAHcL9S-.js → message-circle-CI62d690.js} +1 -1
  85. package/dist/{refresh-cw-as5Bmg4X.js → refresh-cw-DlYfl65Y.js} +1 -1
  86. package/dist/{scan-line-IAMjPtRw.js → scan-line-CHadrYVb.js} +1 -1
  87. package/dist/{send-DvMay6bt.js → send-CbP40otC.js} +1 -1
  88. package/dist/{shield-check-YYDhGroE.js → shield-check-Bnj9aRoJ.js} +1 -1
  89. package/dist/{sparkles-CCwQMMMZ.js → sparkles-CncWT57a.js} +1 -1
  90. package/dist/{styles-64uLkPJV.js → styles-DkF_-uX8.js} +658 -654
  91. package/dist/templatical-editor.js +4 -4
  92. package/dist/{text-align-start-BwsA6QzC.js → text-align-start-B458vzYw.js} +1 -1
  93. package/dist/{trash-2-CRBDolnR.js → trash-2-DO0yjSU1.js} +1 -1
  94. package/dist/{triangle-alert-B2g0ALvq.js → triangle-alert-C18_ima6.js} +1 -1
  95. package/dist/{upload-y4gxiFp5.js → upload-DsCd2zTR.js} +1 -1
  96. package/dist/{useEditorCore-ea9OrrH3.js → useEditorCore-kKUemYY6.js} +910 -867
  97. package/dist/{x-Ctg_250T.js → x-BCFQuE_q.js} +1 -1
  98. package/package.json +10 -10
  99. package/dist/cdn/chunks/ColorPicker-y_obnw4o.js.map +0 -1
  100. package/dist/cdn/chunks/features-Cnfv4QAY.js.map +0 -1
  101. package/dist/cdn/chunks/pusher-CIwiKF8H.js.map +0 -1
  102. package/dist/cdn/chunks/quality-D9QqkRcU.js +0 -2180
  103. package/dist/cdn/chunks/styles-Dx-jXeCd.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { D as e, F as t, H as n, I as r, K as i, L as a, M as o, N as s, P as c, T as l, V as u, Z as d, c as f, ct as p, d as m, f as h, g, h as _, it as v, l as y, m as b, n as x, o as S, ot as C, p as w, s as T, st as E, tt as D, u as O, v as k, x as A, y as j, z as ee } from "./draggable-D840DIZB.js";
2
- import { Cn as te, Mt as ne, Ot as M, Pt as N, St as P, T as F, _n as re, bn as I, ft as L, gn as ie, lt as ae, st as oe, ut as se, vn as ce, vt as le, w as R, xn as ue, yn as de, yt as fe } from "./features-Cnfv4QAY.js";
3
- import { B as pe, K as me, L as he, T as ge, W as _e, k as ve, p as ye, q as be, y as xe } from "./icons-DbcM69bb.js";
2
+ import { Mt as te, Ot as ne, Pt as M, Sn as N, St as P, T as F, _n as re, bn as ie, ft as I, lt as ae, st as L, ut as oe, vn as se, vt as ce, w as R, wn as le, xn as ue, yn as de, yt as fe } from "./features-CLIZ7Q-Y.js";
3
+ import { B as pe, K as me, L as he, T as ge, W as _e, k as ve, p as ye, q as be, y as xe } from "./icons-GX40Qm2W.js";
4
4
  //#region ../media-library/src/api-client.ts
5
5
  var Se = class {
6
6
  authManager;
@@ -215,7 +215,7 @@ function Ce(e) {
215
215
  a.value = "files", i.value = e, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await k();
216
216
  }
217
217
  async function M() {
218
- a.value = "frequently-used", i.value = null, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await L();
218
+ a.value = "frequently-used", i.value = null, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await I();
219
219
  }
220
220
  async function N(r) {
221
221
  u.value = !0;
@@ -270,21 +270,21 @@ function Ce(e) {
270
270
  e.onError?.(t);
271
271
  }
272
272
  }
273
- async function I() {
273
+ async function ie() {
274
274
  if (h.value.size !== 0) try {
275
275
  await t.deleteMedia([...h.value]), n.value = n.value.filter((e) => !h.value.has(e.id)), _.value = _.value.filter((e) => !h.value.has(e.id)), h.value = /* @__PURE__ */ new Set(), g.value = null;
276
276
  } catch (t) {
277
277
  e.onError?.(t);
278
278
  }
279
279
  }
280
- async function L() {
280
+ async function I() {
281
281
  try {
282
282
  _.value = await t.getFrequentlyUsed();
283
283
  } catch (t) {
284
284
  e.onError?.(t);
285
285
  }
286
286
  }
287
- async function ie() {
287
+ async function ae() {
288
288
  if (h.value.size === 0) return !1;
289
289
  b.value = [...h.value];
290
290
  try {
@@ -296,7 +296,7 @@ function Ce(e) {
296
296
  return e.onError?.(t), !1;
297
297
  }
298
298
  }
299
- async function ae() {
299
+ async function L() {
300
300
  if (y.value = !1, b.value.length !== 0) try {
301
301
  await t.deleteMedia(b.value), n.value = n.value.filter((e) => !b.value.includes(e.id)), _.value = _.value.filter((e) => !b.value.includes(e.id)), h.value = /* @__PURE__ */ new Set(), g.value = null, b.value = [], v.value = {};
302
302
  } catch (t) {
@@ -321,10 +321,10 @@ function Ce(e) {
321
321
  let t = new Set(h.value);
322
322
  t.has(e) ? t.delete(e) : t.add(e), h.value = t;
323
323
  }
324
- function le() {
324
+ function R() {
325
325
  h.value = /* @__PURE__ */ new Set(), g.value = null;
326
326
  }
327
- function R(e) {
327
+ function le(e) {
328
328
  g.value = e, h.value = /* @__PURE__ */ new Set([e.id]);
329
329
  }
330
330
  async function ue() {
@@ -427,21 +427,21 @@ function Ce(e) {
427
427
  uploadFiles: P,
428
428
  moveSelected: F,
429
429
  updateFile: re,
430
- deleteSelected: I,
430
+ deleteSelected: ie,
431
431
  isImportingFromUrl: x,
432
432
  importFromUrlError: S,
433
433
  importFromUrl: se,
434
434
  toggleSelection: ce,
435
- clearSelection: le,
436
- selectItem: R,
435
+ clearSelection: R,
436
+ selectItem: le,
437
437
  loadFolders: ue,
438
438
  createFolder: de,
439
439
  renameFolder: pe,
440
440
  deleteFolder: me,
441
441
  findFolderInTree: fe,
442
- loadFrequentlyUsed: L,
443
- checkUsageBeforeDelete: ie,
444
- confirmDelete: ae,
442
+ loadFrequentlyUsed: I,
443
+ checkUsageBeforeDelete: ae,
444
+ confirmDelete: L,
445
445
  cancelDelete: oe,
446
446
  isReplacing: C,
447
447
  replaceError: w,
@@ -499,7 +499,7 @@ var we = {
499
499
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
500
500
  style: { color: "var(--tpl-primary)" },
501
501
  onClick: t[0] ||= (e) => r("navigate", null)
502
- }, p(v(i).mediaLibrary.allFiles), 1), (o(!0), g(O, null, c(a.value, (e, t) => (o(), g(O, { key: e.id }, [j(v(ne), {
502
+ }, p(v(i).mediaLibrary.allFiles), 1), (o(!0), g(O, null, c(a.value, (e, t) => (o(), g(O, { key: e.id }, [j(v(te), {
503
503
  size: 12,
504
504
  "stroke-width": 2
505
505
  }), t < a.value.length - 1 ? (o(), g("button", {
@@ -4132,7 +4132,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4132
4132
  }, nr = {
4133
4133
  class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
4134
4134
  style: { color: "var(--tpl-text-muted)" }
4135
- }, rr = ["placeholder"], ir = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2 tpl:p-5 tpl:pt-4" }, ar = ["disabled"], or = /*#__PURE__*/ oe(/* @__PURE__ */ A({
4135
+ }, rr = ["placeholder"], ir = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2 tpl:p-5 tpl:pt-4" }, ar = ["disabled"], or = /*#__PURE__*/ L(/* @__PURE__ */ A({
4136
4136
  __name: "MediaEditModal",
4137
4137
  props: {
4138
4138
  visible: { type: Boolean },
@@ -4140,23 +4140,23 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4140
4140
  },
4141
4141
  emits: ["save", "close"],
4142
4142
  setup(e, { emit: t }) {
4143
- let r = e, i = t, { t: a } = z(), s = l("tplUiTheme"), f = l(Pe, d(null)), T = a.mediaLibrary, { isImageMimeType: D } = Oe(), A = d(""), te = d(""), ne = d(null), M = d("free"), N = d(void 0), P = d(void 0), F = d(""), re = d(""), I = d(void 0), L = d(null), ie = d(!1), ae = d(!1), oe = d(!1), se = h(() => r.item ? [
4143
+ let r = e, i = t, { t: a } = z(), s = l("tplUiTheme"), f = l(Pe, d(null)), T = a.mediaLibrary, { isImageMimeType: D } = Oe(), A = d(""), te = d(""), ne = d(null), M = d("free"), N = d(void 0), P = d(void 0), F = d(""), re = d(""), ie = d(void 0), I = d(null), ae = d(!1), L = d(!1), oe = d(!1), se = h(() => r.item ? [
4144
4144
  "image/jpeg",
4145
4145
  "image/png",
4146
4146
  "image/webp",
4147
4147
  "image/gif"
4148
- ].includes(r.item.mime_type) : !1), ce = h(() => M.value === "original" ? I.value : ke[M.value]), le = h(() => L.value ? Ne(L.value.width, L.value.height, N.value, P.value) : null);
4148
+ ].includes(r.item.mime_type) : !1), ce = h(() => M.value === "original" ? ie.value : ke[M.value]), R = h(() => I.value ? Ne(I.value.width, I.value.height, N.value, P.value) : null);
4149
4149
  ee(() => r.visible, (e) => {
4150
- e && r.item && (A.value = r.item.filename, te.value = r.item.alt_text || "", M.value = "free", N.value = void 0, P.value = void 0, F.value = "", re.value = "", I.value = void 0, L.value = null, ie.value = !1, oe.value = !1, r.item.width && r.item.height && (I.value = r.item.width / r.item.height));
4150
+ e && r.item && (A.value = r.item.filename, te.value = r.item.alt_text || "", M.value = "free", N.value = void 0, P.value = void 0, F.value = "", re.value = "", ie.value = void 0, I.value = null, ae.value = !1, oe.value = !1, r.item.width && r.item.height && (ie.value = r.item.width / r.item.height));
4151
4151
  });
4152
- function R(e) {
4153
- e.coordinates && (L.value = {
4152
+ function le(e) {
4153
+ e.coordinates && (I.value = {
4154
4154
  width: Math.round(e.coordinates.width),
4155
4155
  height: Math.round(e.coordinates.height)
4156
4156
  }, oe.value = !0);
4157
4157
  }
4158
4158
  function ue() {
4159
- ie.value = !0, !I.value && r.item?.width && r.item?.height && (I.value = r.item.width / r.item.height);
4159
+ ae.value = !0, !ie.value && r.item?.width && r.item?.height && (ie.value = r.item.width / r.item.height);
4160
4160
  }
4161
4161
  function de(e) {
4162
4162
  let t = e.target.value;
@@ -4168,10 +4168,10 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4168
4168
  }
4169
4169
  async function pe() {
4170
4170
  let e = A.value.trim();
4171
- if (!e || !r.item || ae.value) return;
4171
+ if (!e || !r.item || L.value) return;
4172
4172
  let t = D(r.item.mime_type), n;
4173
4173
  if (se.value && ne.value && oe.value) {
4174
- ae.value = !0;
4174
+ L.value = !0;
4175
4175
  try {
4176
4176
  let { canvas: e } = ne.value.getResult();
4177
4177
  if (e) {
@@ -4179,15 +4179,15 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4179
4179
  n = { file: await Me(t, r.item.filename, i) };
4180
4180
  }
4181
4181
  } catch {
4182
- ae.value = !1;
4182
+ L.value = !1;
4183
4183
  return;
4184
4184
  }
4185
- ae.value = !1;
4185
+ L.value = !1;
4186
4186
  }
4187
4187
  i("save", r.item.id, e, t ? te.value : void 0, n), i("close");
4188
4188
  }
4189
4189
  function me(e) {
4190
- e.key === "Enter" && !ae.value && (e.preventDefault(), pe()), e.key === "Escape" && i("close");
4190
+ e.key === "Enter" && !L.value && (e.preventDefault(), pe()), e.key === "Escape" && i("close");
4191
4191
  }
4192
4192
  return (t, r) => (o(), b(m, { to: v(f) || "body" }, [j(x, {
4193
4193
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
@@ -4217,7 +4217,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4217
4217
  "stencil-props": { aspectRatio: ce.value },
4218
4218
  class: "tpl:h-full tpl:w-full",
4219
4219
  "background-class": "tpl-cropper-background",
4220
- onChange: R,
4220
+ onChange: le,
4221
4221
  onReady: ue
4222
4222
  }, null, 8, ["src", "stencil-props"])]), w("div", Nn, [
4223
4223
  w("div", null, [w("label", Pn, p(v(a).mediaLibrary.cropAspectRatio), 1), w("div", Fn, [(o(), g(O, null, c([
@@ -4247,7 +4247,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4247
4247
  "background-color": "var(--tpl-bg)",
4248
4248
  color: "var(--tpl-text)"
4249
4249
  },
4250
- placeholder: L.value?.width?.toString() || "",
4250
+ placeholder: I.value?.width?.toString() || "",
4251
4251
  onInput: de
4252
4252
  }, null, 40, Hn), w("span", Un, p(v(a).mediaLibrary.cropPixels), 1)])]), w("div", Wn, [w("label", Gn, [k(p(v(a).mediaLibrary.cropMaxHeight) + " ", 1), w("span", Kn, p(v(a).mediaLibrary.cropOptional), 1)]), w("div", qn, [w("input", {
4253
4253
  value: re.value,
@@ -4259,10 +4259,10 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4259
4259
  "background-color": "var(--tpl-bg)",
4260
4260
  color: "var(--tpl-text)"
4261
4261
  },
4262
- placeholder: L.value?.height?.toString() || "",
4262
+ placeholder: I.value?.height?.toString() || "",
4263
4263
  onInput: fe
4264
4264
  }, null, 40, Jn), w("span", Yn, p(v(a).mediaLibrary.cropPixels), 1)])])]),
4265
- le.value ? (o(), g("div", Xn, [w("span", null, p(v(a).mediaLibrary.cropOutputSize) + ": ", 1), w("span", Zn, p(le.value.width) + " x " + p(le.value.height) + " " + p(v(a).mediaLibrary.cropPixels), 1)])) : _("", !0)
4265
+ R.value ? (o(), g("div", Xn, [w("span", null, p(v(a).mediaLibrary.cropOutputSize) + ": ", 1), w("span", Zn, p(R.value.width) + " x " + p(R.value.height) + " " + p(v(a).mediaLibrary.cropPixels), 1)])) : _("", !0)
4266
4266
  ])])) : _("", !0),
4267
4267
  w("div", Qn, [w("label", $n, p(v(a).mediaLibrary.fileName), 1), n(w("input", {
4268
4268
  "onUpdate:modelValue": r[0] ||= (e) => A.value = e,
@@ -4298,9 +4298,9 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4298
4298
  }, p(v(a).mediaLibrary.cancel), 1), w("button", {
4299
4299
  class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-white tpl:transition-all tpl:duration-150 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
4300
4300
  style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
4301
- disabled: ae.value,
4301
+ disabled: L.value,
4302
4302
  onClick: pe
4303
- }, p(ae.value ? v(a).mediaLibrary.saving : v(a).mediaLibrary.saveChanges), 9, ar)])
4303
+ }, p(L.value ? v(a).mediaLibrary.saving : v(a).mediaLibrary.saveChanges), 9, ar)])
4304
4304
  ], 2)], 40, Dn)) : _("", !0)]),
4305
4305
  _: 1
4306
4306
  })], 8, ["to"]));
@@ -4328,7 +4328,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4328
4328
  "deleteFolder"
4329
4329
  ],
4330
4330
  setup(e, { emit: t }) {
4331
- let i = e, a = t, { t: s } = z(), l = d(!1), u = d(!1), m = d(""), x = d(!1), T = d(""), D = h(() => (i.folder.children?.length ?? 0) > 0), k = h(() => i.depth < mr - 1), A = h(() => i.currentFolderId === i.folder.id), ee = h(() => !i.currentFolderId || !i.folder.children ? !1 : M(i.folder.children, i.currentFolderId)), te = h(() => l.value || ee.value);
4331
+ let i = e, a = t, { t: s } = z(), l = d(!1), u = d(!1), m = d(""), x = d(!1), T = d(""), D = h(() => (i.folder.children?.length ?? 0) > 0), k = h(() => i.depth < mr - 1), A = h(() => i.currentFolderId === i.folder.id), ee = h(() => !i.currentFolderId || !i.folder.children ? !1 : M(i.folder.children, i.currentFolderId)), ne = h(() => l.value || ee.value);
4332
4332
  function M(e, t) {
4333
4333
  for (let n of e) if (n.id === t || n.children && M(n.children, t)) return !0;
4334
4334
  return !1;
@@ -4346,13 +4346,13 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4346
4346
  function re() {
4347
4347
  u.value = !1, m.value = "";
4348
4348
  }
4349
- function I() {
4349
+ function ie() {
4350
4350
  x.value = !0, T.value = "", l.value = !0;
4351
4351
  }
4352
- function ie() {
4352
+ function ae() {
4353
4353
  T.value.trim() && a("createFolder", T.value.trim(), i.folder.id), x.value = !1, T.value = "";
4354
4354
  }
4355
- function ae() {
4355
+ function L() {
4356
4356
  x.value = !1, T.value = "";
4357
4357
  }
4358
4358
  return (t, i) => {
@@ -4369,8 +4369,8 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4369
4369
  key: 0,
4370
4370
  class: "tpl:flex tpl:size-4 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4371
4371
  onClick: y(N, ["stop"])
4372
- }, [j(v(ne), {
4373
- class: C(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": te.value }]),
4372
+ }, [j(v(te), {
4373
+ class: C(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": ne.value }]),
4374
4374
  size: 10,
4375
4375
  "stroke-width": 2
4376
4376
  }, null, 8, ["class"])])) : (o(), g("span", sr)),
@@ -4402,7 +4402,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4402
4402
  key: 0,
4403
4403
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4404
4404
  title: v(s).mediaLibrary.addSubfolder,
4405
- onClick: y(I, ["stop"])
4405
+ onClick: y(ie, ["stop"])
4406
4406
  }, [j(v(ge), {
4407
4407
  size: 12,
4408
4408
  "stroke-width": 2
@@ -4418,13 +4418,13 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4418
4418
  w("button", {
4419
4419
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4420
4420
  onClick: i[3] ||= y((t) => a("deleteFolder", e.folder.id), ["stop"])
4421
- }, [j(v(L), {
4421
+ }, [j(v(I), {
4422
4422
  size: 12,
4423
4423
  "stroke-width": 2,
4424
4424
  style: { color: "var(--tpl-danger)" }
4425
4425
  })])
4426
4426
  ]))
4427
- ], 4), te.value ? (o(), g("div", fr, [(o(!0), g(O, null, c(e.folder.children, (t) => (o(), b(l, {
4427
+ ], 4), ne.value ? (o(), g("div", fr, [(o(!0), g(O, null, c(e.folder.children, (t) => (o(), b(l, {
4428
4428
  key: t.id,
4429
4429
  folder: t,
4430
4430
  "current-folder-id": e.currentFolderId,
@@ -4452,8 +4452,8 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4452
4452
  },
4453
4453
  placeholder: v(s).mediaLibrary.subfolderName,
4454
4454
  autofocus: "",
4455
- onKeydown: [f(ie, ["enter"]), f(ae, ["escape"])],
4456
- onBlur: ie
4455
+ onKeydown: [f(ae, ["enter"]), f(L, ["escape"])],
4456
+ onBlur: ae
4457
4457
  }, null, 40, pr), [[S, T.value]])], 4)) : _("", !0)])) : _("", !0)]);
4458
4458
  };
4459
4459
  }
@@ -4758,7 +4758,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4758
4758
  }, Yr = {
4759
4759
  key: 4,
4760
4760
  class: "tpl:flex tpl:justify-center tpl:py-4"
4761
- }, Xr = /*#__PURE__*/ oe(/* @__PURE__ */ A({
4761
+ }, Xr = /*#__PURE__*/ L(/* @__PURE__ */ A({
4762
4762
  __name: "MediaGrid",
4763
4763
  props: {
4764
4764
  items: {},
@@ -4784,7 +4784,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4784
4784
  r("select", e);
4785
4785
  }
4786
4786
  let { t: u } = z(), f = d(null);
4787
- ue(f, ([{ isIntersecting: e }]) => {
4787
+ N(f, ([{ isIntersecting: e }]) => {
4788
4788
  e && n.hasMore && !n.isLoading && r("loadMore");
4789
4789
  }, { threshold: .1 });
4790
4790
  function m(e) {
@@ -4837,11 +4837,11 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4837
4837
  style: { color: "var(--tpl-text-muted)" },
4838
4838
  title: v(u).mediaLibrary.replaceFile,
4839
4839
  onClick: y((e) => r("replace", t), ["stop"])
4840
- }, [j(v(le), {
4840
+ }, [j(v(ce), {
4841
4841
  size: 12,
4842
4842
  "stroke-width": 2
4843
4843
  })], 8, qr)]),
4844
- e.selectedIds.has(t.id) ? (o(), g("div", Jr, [j(v(N), {
4844
+ e.selectedIds.has(t.id) ? (o(), g("div", Jr, [j(v(M), {
4845
4845
  size: 12,
4846
4846
  "stroke-width": 3
4847
4847
  })])) : _("", !0)
@@ -4882,11 +4882,11 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4882
4882
  style: { "background-color": "rgba(0, 0, 0, 0.6)" },
4883
4883
  title: v(u).mediaLibrary.replaceFile,
4884
4884
  onClick: y((e) => r("replace", t), ["stop"])
4885
- }, [j(v(le), {
4885
+ }, [j(v(ce), {
4886
4886
  size: 11,
4887
4887
  "stroke-width": 2
4888
4888
  })], 8, Fr)]),
4889
- e.selectedIds.has(t.id) ? (o(), g("div", Ir, [j(v(N), {
4889
+ e.selectedIds.has(t.id) ? (o(), g("div", Ir, [j(v(M), {
4890
4890
  size: 12,
4891
4891
  "stroke-width": 3
4892
4892
  })])) : _("", !0)
@@ -5016,7 +5016,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5016
5016
  }), r.children?.length && n.push(...a(r.children, t + 1));
5017
5017
  return n;
5018
5018
  }
5019
- return ie(i, () => {
5019
+ return re(i, () => {
5020
5020
  n("close");
5021
5021
  }), (t, s) => (o(), g("div", {
5022
5022
  ref_key: "pickerRef",
@@ -5071,7 +5071,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5071
5071
  }, xi = {
5072
5072
  class: "tpl:block tpl:text-[10px]",
5073
5073
  style: { color: "var(--tpl-text-muted)" }
5074
- }, Si = ["value"], Ci = ["value"], wi = /*#__PURE__*/ oe(/* @__PURE__ */ A({
5074
+ }, Si = ["value"], Ci = ["value"], wi = /*#__PURE__*/ L(/* @__PURE__ */ A({
5075
5075
  __name: "MediaPreviewPanel",
5076
5076
  props: {
5077
5077
  item: {},
@@ -5324,9 +5324,9 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5324
5324
  let t = u(e);
5325
5325
  t.length && n("upload", t);
5326
5326
  }
5327
- let { isOverDropZone: m } = ce(l, { onDrop: (e) => {
5327
+ let { isOverDropZone: m } = de(l, { onDrop: (e) => {
5328
5328
  e?.length && f(e);
5329
- } }), { open: h, onChange: _ } = I({
5329
+ } }), { open: h, onChange: _ } = ue({
5330
5330
  accept: s.value,
5331
5331
  multiple: !0
5332
5332
  });
@@ -5350,7 +5350,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5350
5350
  current: e.uploadProgress.current,
5351
5351
  total: e.uploadProgress.total
5352
5352
  }) : v(r).mediaLibrary.uploading), 1)])) : (o(), g(O, { key: 1 }, [
5353
- j(v(se), {
5353
+ j(v(oe), {
5354
5354
  class: "tpl:mb-2",
5355
5355
  size: 24,
5356
5356
  "stroke-width": 1.5,
@@ -5481,13 +5481,13 @@ function Xi(e) {
5481
5481
  }), ee(() => t.previewItem.value?.id, () => {
5482
5482
  c.value = "original";
5483
5483
  });
5484
- let b = te((e) => {
5484
+ let b = le((e) => {
5485
5485
  t.search(e);
5486
5486
  }, 300);
5487
5487
  function x(e) {
5488
5488
  s.value = e, b(e);
5489
5489
  }
5490
- let { copy: S, copied: C } = re({
5490
+ let { copy: S, copied: C } = se({
5491
5491
  copiedDuring: 2e3,
5492
5492
  legacy: !0
5493
5493
  });
@@ -5515,19 +5515,19 @@ function Xi(e) {
5515
5515
  async function j(e) {
5516
5516
  await t.importFromUrl(e) && (u.value = !1);
5517
5517
  }
5518
- async function ne(e) {
5518
+ async function te(e) {
5519
5519
  f.value = !1, await t.moveSelected(e);
5520
5520
  }
5521
- async function M() {
5521
+ async function ne() {
5522
5522
  await t.checkUsageBeforeDelete();
5523
5523
  }
5524
- function N(e) {
5524
+ function M(e) {
5525
5525
  t.checkUsageBeforeReplace(e);
5526
5526
  }
5527
- async function P(e) {
5527
+ async function N(e) {
5528
5528
  await t.replaceFile(e);
5529
5529
  }
5530
- function F() {
5530
+ function P() {
5531
5531
  t.clearSelection(), t.cancelDelete(), t.cancelReplace(), s.value = "", t.categoryFilter.value = null, t.sortOption.value = "newest", t.viewMode.value = "files", l.value = null, u.value = !1, c.value = "original";
5532
5532
  }
5533
5533
  return {
@@ -5554,11 +5554,11 @@ function Xi(e) {
5554
5554
  handleEditItem: k,
5555
5555
  handleEditSave: A,
5556
5556
  handleImportFromUrl: j,
5557
- handleMoveToFolder: ne,
5558
- handleDeleteClick: M,
5559
- handleReplaceItem: N,
5560
- handleReplaceFile: P,
5561
- resetUI: F
5557
+ handleMoveToFolder: te,
5558
+ handleDeleteClick: ne,
5559
+ handleReplaceItem: M,
5560
+ handleReplaceFile: N,
5561
+ resetUI: P
5562
5562
  };
5563
5563
  }
5564
5564
  //#endregion
@@ -5640,7 +5640,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5640
5640
  setup(e, { emit: t }) {
5641
5641
  let n = e, r = t, { t: i } = z(), a = l("tplUiTheme");
5642
5642
  s(Pe, D(() => n.popoverTarget ?? null));
5643
- let d = l("authManager"), f = l("projectId"), S = h(() => f.value), T = l("planConfig"), A = h(() => T.hasFeature("media_folders")), te = h(() => T.hasFeature("import_from_url")), ne = h(() => T.config.value?.storage.used_bytes ?? 0), P = h(() => T.config.value?.storage.limit_bytes ?? 0), { isAcceptedMimeType: F, availableCategories: re } = Oe(), I = Ce({
5643
+ let d = l("authManager"), f = l("projectId"), S = h(() => f.value), T = l("planConfig"), A = h(() => T.hasFeature("media_folders")), te = h(() => T.hasFeature("import_from_url")), N = h(() => T.config.value?.storage.used_bytes ?? 0), P = h(() => T.config.value?.storage.limit_bytes ?? 0), { isAcceptedMimeType: F, availableCategories: re } = Oe(), I = Ce({
5644
5644
  projectId: S.value,
5645
5645
  authManager: d
5646
5646
  }), L = Xi({
@@ -5651,15 +5651,15 @@ var Zi = ["data-tpl-theme"], Qi = {
5651
5651
  ee(() => n.visible, (e) => {
5652
5652
  e ? (I.loadItems(), I.loadFrequentlyUsed()) : L.resetUI();
5653
5653
  });
5654
- function ie(e) {
5654
+ function oe(e) {
5655
5655
  e.key === "Escape" && r("close");
5656
5656
  }
5657
- de(document, "keydown", ie);
5658
- function oe() {
5657
+ ie(document, "keydown", oe);
5658
+ function se() {
5659
5659
  return I.previewItem.value ? !n.accept?.length || F(I.previewItem.value.mime_type, n.accept) : !1;
5660
5660
  }
5661
- function se() {
5662
- if (oe()) {
5661
+ function ce() {
5662
+ if (se()) {
5663
5663
  let e = I.previewItem.value;
5664
5664
  r("select", {
5665
5665
  ...e,
@@ -5683,7 +5683,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5683
5683
  }, [w("div", Qi, [
5684
5684
  w("div", $i, [w("h2", ea, p(v(i).mediaLibrary.title), 1), w("div", ta, [
5685
5685
  j(Yi, {
5686
- "used-bytes": ne.value,
5686
+ "used-bytes": N.value,
5687
5687
  "limit-bytes": P.value,
5688
5688
  size: 22
5689
5689
  }, null, 8, ["used-bytes", "limit-bytes"]),
@@ -5972,11 +5972,11 @@ var Zi = ["data-tpl-theme"], Qi = {
5972
5972
  backgroundColor: "var(--tpl-bg)"
5973
5973
  }),
5974
5974
  onClick: n[14] ||= (e) => v(L).copy(v(L).selectedUrl.value)
5975
- }, [v(L).copied.value ? (o(), b(v(N), {
5975
+ }, [v(L).copied.value ? (o(), b(v(M), {
5976
5976
  key: 1,
5977
5977
  size: 12,
5978
5978
  "stroke-width": 2
5979
- })) : (o(), b(v(M), {
5979
+ })) : (o(), b(v(ne), {
5980
5980
  key: 0,
5981
5981
  size: 12,
5982
5982
  "stroke-width": 2
@@ -6013,8 +6013,8 @@ var Zi = ["data-tpl-theme"], Qi = {
6013
6013
  "background-color": "var(--tpl-primary)",
6014
6014
  color: "var(--tpl-bg)"
6015
6015
  },
6016
- disabled: !oe(),
6017
- onClick: se
6016
+ disabled: !se(),
6017
+ onClick: ce
6018
6018
  }, p(e.accept?.length ? v(i).mediaLibrary.selectImage : v(i).mediaLibrary.selectFile), 9, Ba)])])])
6019
6019
  ])], 8, Zi)) : _("", !0)]),
6020
6020
  _: 1
@@ -6024,4 +6024,4 @@ var Zi = ["data-tpl-theme"], Qi = {
6024
6024
  //#endregion
6025
6025
  export { zi as a, ci as c, or as d, Oe as f, Se as g, Ce as h, Wi as i, Xr as l, z as m, Xi as n, wi as o, De as p, Yi as r, pi as s, Va as t, yr as u };
6026
6026
 
6027
- //# sourceMappingURL=media-library-DpSMwHd4.js.map
6027
+ //# sourceMappingURL=media-library-yYAkAagU.js.map