@templatical/media-library 0.44.2 → 0.45.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.
@@ -224,11 +224,8 @@ function he(e) {
224
224
  }
225
225
  async function Y() {
226
226
  let { storage: n } = t;
227
- if (typeof n != "function") {
228
- D.value = null;
229
- return;
230
- }
231
- try {
227
+ if (typeof n != "function") D.value = null;
228
+ else try {
232
229
  D.value = await n();
233
230
  } catch (t) {
234
231
  e.onError?.(t);
@@ -278,11 +275,8 @@ function he(e) {
278
275
  async function de(n) {
279
276
  T.value = n, C.value = null;
280
277
  let { checkUsage: r } = t;
281
- if (typeof r != "function") {
282
- E.value = null, w.value = !0;
283
- return;
284
- }
285
- try {
278
+ if (typeof r != "function") E.value = null, w.value = !0;
279
+ else try {
286
280
  let e = await r([n.id]);
287
281
  E.value = e[n.id] ?? null, w.value = !0;
288
282
  } catch (t) {
@@ -469,11 +463,7 @@ var ge = {
469
463
  u.value = !1, d.value = "";
470
464
  }
471
465
  function W() {
472
- if (p.value) {
473
- i("deleteFolder", r.folder.id), p.value = !1;
474
- return;
475
- }
476
- p.value = !0;
466
+ p.value ? (i("deleteFolder", r.folder.id), p.value = !1) : p.value = !0;
477
467
  }
478
468
  function te(e) {
479
469
  let t = e.relatedTarget;
@@ -1024,11 +1014,7 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
1024
1014
  return i.canReplace === !0 && e.canUpdate !== !1;
1025
1015
  }
1026
1016
  function x(e, t) {
1027
- if (t.metaKey || t.ctrlKey) {
1028
- a("toggle", e.id);
1029
- return;
1030
- }
1031
- a("select", e);
1017
+ t.metaKey || t.ctrlKey ? a("toggle", e.id) : a("select", e);
1032
1018
  }
1033
1019
  function S(e) {
1034
1020
  f(e) && a("confirm", e);
@@ -1994,7 +1980,7 @@ var fn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
1994
1980
  "ready"
1995
1981
  ],
1996
1982
  setup(t, { expose: n, emit: r }) {
1997
- let i = t, a = r, s = b(() => import("./MediaEditModal-CO_AVnsB.js")), c = f(() => i.translations), u = f(() => i.confirmTestId ?? "media-confirm"), p = {
1983
+ let i = t, a = r, s = b(() => import("./MediaEditModal-Bo3nDMEl.js")), c = f(() => i.translations), u = f(() => i.confirmTestId ?? "media-confirm"), p = {
1998
1984
  get maxFileSize() {
1999
1985
  return i.provider.maxFileSize;
2000
1986
  },
@@ -2472,13 +2458,7 @@ var ir = ["data-tpl-theme"], ar = /* @__PURE__ */ x({
2472
2458
  let b = k(null), x = k(null), S = f(() => i.visible && l.value !== null && !x.value?.nestedDialogOpen);
2473
2459
  c(b, S);
2474
2460
  function C(e) {
2475
- if (e.key === "Escape") {
2476
- if (x.value?.handleEscape()) {
2477
- e.preventDefault();
2478
- return;
2479
- }
2480
- o("close");
2481
- }
2461
+ e.key === "Escape" && (x.value?.handleEscape() ? e.preventDefault() : o("close"));
2482
2462
  }
2483
2463
  fe(document, "keydown", C);
2484
2464
  function T(e) {
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@templatical/media-library",
3
3
  "description": "Media library management for Templatical email editor",
4
- "version": "0.44.2",
4
+ "version": "0.45.0",
5
5
  "bugs": "https://github.com/templatical/sdk/issues",
6
6
  "dependencies": {
7
- "@lucide/vue": "^1.52.0",
8
- "@templatical/types": "0.44.2",
7
+ "@lucide/vue": "^1.55.0",
8
+ "@templatical/types": "0.45.0",
9
9
  "@vueuse/core": "^15.0.0",
10
10
  "vue-advanced-cropper": "^2.8.9"
11
11
  },
12
12
  "devDependencies": {
13
- "@vitejs/plugin-vue": "^6.0.9",
13
+ "@vitejs/plugin-vue": "^6.0.10",
14
14
  "@vue/test-utils": "^2.5.1",
15
15
  "tailwindcss": "^4.3.3",
16
16
  "typescript": "^6.0.3",
17
- "vite": "^8.3.3",
17
+ "vite": "^8.3.4",
18
18
  "vitest": "^5.0.3",
19
19
  "vue": "^3.5.43",
20
- "vue-tsc": "^3.3.12"
20
+ "vue-tsc": "^3.3.13"
21
21
  },
22
22
  "exports": {
23
23
  ".": {