@templatical/media-library 0.51.1 → 0.52.1

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 (36) hide show
  1. package/dist/{MediaEditModal-Bo3nDMEl.js → MediaEditModal-QsfoCmDD.js} +3 -5
  2. package/dist/{ca-DyHL0z4N.js → ca-CAkEWrz7.js} +1 -2
  3. package/dist/cdn/chunks/{MediaEditModal-DiM9oy_B.js → MediaEditModal-BTUMw6iT.js} +6 -9
  4. package/dist/cdn/chunks/{MediaEditModal-DiM9oy_B.js.map → MediaEditModal-BTUMw6iT.js.map} +1 -1
  5. package/dist/cdn/chunks/{ca-DyHL0z4N.js → ca-CAkEWrz7.js} +2 -3
  6. package/dist/cdn/chunks/{ca-DyHL0z4N.js.map → ca-CAkEWrz7.js.map} +1 -1
  7. package/dist/cdn/chunks/{de-Dcy8LcNQ.js → de-CUcTOIHX.js} +2 -3
  8. package/dist/cdn/chunks/{de-Dcy8LcNQ.js.map → de-CUcTOIHX.js.map} +1 -1
  9. package/dist/cdn/chunks/{en-w2ihxIL6.js → en-AiQi3nze.js} +2 -3
  10. package/dist/cdn/chunks/{en-w2ihxIL6.js.map → en-AiQi3nze.js.map} +1 -1
  11. package/dist/cdn/chunks/{es-B43D0gmB.js → es-CejTsXsM.js} +2 -3
  12. package/dist/cdn/chunks/{es-B43D0gmB.js.map → es-CejTsXsM.js.map} +1 -1
  13. package/dist/cdn/chunks/{fr-DsxaRm09.js → fr-CZ4KBWjs.js} +2 -3
  14. package/dist/cdn/chunks/{fr-DsxaRm09.js.map → fr-CZ4KBWjs.js.map} +1 -1
  15. package/dist/cdn/chunks/{icons-CO_tphYO.js → icons-BFNFEvCT.js} +29 -36
  16. package/dist/cdn/chunks/{icons-CO_tphYO.js.map → icons-BFNFEvCT.js.map} +1 -1
  17. package/dist/cdn/chunks/{ja-DDI6z0aO.js → ja-B-LksFh0.js} +2 -3
  18. package/dist/cdn/chunks/{ja-DDI6z0aO.js.map → ja-B-LksFh0.js.map} +1 -1
  19. package/dist/cdn/chunks/{nl-CHa6u0cR.js → nl-syCBBR1S.js} +2 -3
  20. package/dist/cdn/chunks/{nl-CHa6u0cR.js.map → nl-syCBBR1S.js.map} +1 -1
  21. package/dist/cdn/chunks/{pt-BR-CZmeAVC3.js → pt-BR-Bre6oBOZ.js} +2 -3
  22. package/dist/cdn/chunks/{pt-BR-CZmeAVC3.js.map → pt-BR-Bre6oBOZ.js.map} +1 -1
  23. package/dist/cdn/chunks/{useFocusTrap-CKt31-bS.js → useFocusTrap-DUGdOl_O.js} +9 -15
  24. package/dist/cdn/chunks/{useFocusTrap-CKt31-bS.js.map → useFocusTrap-DUGdOl_O.js.map} +1 -1
  25. package/dist/cdn/media-library.js +196 -207
  26. package/dist/cdn/media-library.js.map +1 -1
  27. package/dist/{de-Dcy8LcNQ.js → de-CUcTOIHX.js} +1 -2
  28. package/dist/{en-w2ihxIL6.js → en-AiQi3nze.js} +1 -2
  29. package/dist/{es-B43D0gmB.js → es-CejTsXsM.js} +1 -2
  30. package/dist/{fr-DsxaRm09.js → fr-CZ4KBWjs.js} +1 -2
  31. package/dist/{ja-DDI6z0aO.js → ja-B-LksFh0.js} +1 -2
  32. package/dist/{nl-CHa6u0cR.js → nl-syCBBR1S.js} +1 -2
  33. package/dist/{pt-BR-CZmeAVC3.js → pt-BR-Bre6oBOZ.js} +1 -2
  34. package/dist/templatical-media-library.js +23 -36
  35. package/dist/{useFocusTrap-CIacOa9R.js → useFocusTrap-_3BWxnPs.js} +5 -9
  36. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- //#region src/i18n/locales/de.ts
1
+ // src/i18n/locales/de.ts
2
2
  var e = { mediaLibrary: {
3
3
  title: "Medienbibliothek",
4
4
  searchPlaceholder: "Dateien suchen...",
@@ -92,5 +92,4 @@ var e = { mediaLibrary: {
92
92
  deleteFolderConfirm: "Löschen bestätigen",
93
93
  storageTooltip: "{used} von {total} verwendet ({remaining} verfügbar)"
94
94
  } };
95
- //#endregion
96
95
  export { e as default };
@@ -1,4 +1,4 @@
1
- //#region \0rolldown/runtime.js
1
+ // \0rolldown/runtime.js
2
2
  var e = Object.defineProperty, t = /* @__PURE__ */ ((t, n) => {
3
3
  let r = {};
4
4
  for (var i in t) e(r, i, {
@@ -99,5 +99,4 @@ var e = Object.defineProperty, t = /* @__PURE__ */ ((t, n) => {
99
99
  deleteFolderConfirm: "Confirm delete",
100
100
  storageTooltip: "{used} of {total} used ({remaining} remaining)"
101
101
  } };
102
- //#endregion
103
102
  export { t as n, n as t };
@@ -1,4 +1,4 @@
1
- //#region src/i18n/locales/es.ts
1
+ // src/i18n/locales/es.ts
2
2
  var e = { mediaLibrary: {
3
3
  title: "Biblioteca multimedia",
4
4
  searchPlaceholder: "Buscar archivos...",
@@ -92,5 +92,4 @@ var e = { mediaLibrary: {
92
92
  deleteFolderConfirm: "Confirmar eliminación",
93
93
  storageTooltip: "{used} de {total} usados ({remaining} restantes)"
94
94
  } };
95
- //#endregion
96
95
  export { e as default };
@@ -1,4 +1,4 @@
1
- //#region src/i18n/locales/fr.ts
1
+ // src/i18n/locales/fr.ts
2
2
  var e = { mediaLibrary: {
3
3
  title: "Médiathèque",
4
4
  searchPlaceholder: "Rechercher des fichiers...",
@@ -92,5 +92,4 @@ var e = { mediaLibrary: {
92
92
  deleteFolderConfirm: "Confirmer la suppression",
93
93
  storageTooltip: "{used} sur {total} utilisés ({remaining} restants)"
94
94
  } };
95
- //#endregion
96
95
  export { e as default };
@@ -1,4 +1,4 @@
1
- //#region src/i18n/locales/ja.ts
1
+ // src/i18n/locales/ja.ts
2
2
  var e = { mediaLibrary: {
3
3
  title: "メディアライブラリ",
4
4
  searchPlaceholder: "ファイルを検索...",
@@ -92,5 +92,4 @@ var e = { mediaLibrary: {
92
92
  deleteFolderConfirm: "フォルダーの削除を確認",
93
93
  storageTooltip: "{total} 中 {used} 使用(残り {remaining})"
94
94
  } };
95
- //#endregion
96
95
  export { e as default };
@@ -1,4 +1,4 @@
1
- //#region src/i18n/locales/nl.ts
1
+ // src/i18n/locales/nl.ts
2
2
  var e = { mediaLibrary: {
3
3
  title: "Mediabibliotheek",
4
4
  searchPlaceholder: "Bestanden zoeken...",
@@ -92,5 +92,4 @@ var e = { mediaLibrary: {
92
92
  deleteFolderConfirm: "Verwijderen bevestigen",
93
93
  storageTooltip: "{used} van {total} gebruikt ({remaining} resterend)"
94
94
  } };
95
- //#endregion
96
95
  export { e as default };
@@ -1,4 +1,4 @@
1
- //#region src/i18n/locales/pt-BR.ts
1
+ // src/i18n/locales/pt-BR.ts
2
2
  var e = { mediaLibrary: {
3
3
  title: "Biblioteca de Mídia",
4
4
  searchPlaceholder: "Buscar arquivos...",
@@ -92,5 +92,4 @@ var e = { mediaLibrary: {
92
92
  deleteFolderConfirm: "Confirmar exclusão",
93
93
  storageTooltip: "{used} de {total} usados ({remaining} restantes)"
94
94
  } };
95
- //#endregion
96
95
  export { e as default };
@@ -1,8 +1,8 @@
1
- import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./useFocusTrap-CIacOa9R.js";
1
+ import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./useFocusTrap-_3BWxnPs.js";
2
2
  import { Fragment as l, Teleport as u, Transition as d, computed as f, createApp as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as v, createVNode as y, defineAsyncComponent as b, defineComponent as x, h as S, inject as C, normalizeClass as w, normalizeStyle as T, onBeforeUnmount as E, openBlock as D, provide as O, ref as k, renderList as A, resolveComponent as j, toDisplayString as M, toRef as N, toValue as P, unref as F, vModelText as I, watch as L, withCtx as R, withDirectives as z, withKeys as B, withModifiers as V } from "vue";
3
3
  import { Check as H, ChevronRight as U, Copy as ee, File as W, Folder as G, Grid2x2 as te, Link as ne, List as re, LoaderCircle as K, PanelLeft as ie, Pencil as q, Plus as ae, RefreshCw as J, Search as oe, Star as se, Trash2 as Y, Upload as X, X as ce } from "@lucide/vue";
4
4
  import { onClickOutside as Z, useClipboard as le, useDebounceFn as ue, useDropZone as de, useEventListener as fe, useFileDialog as pe, useIntersectionObserver as me } from "@vueuse/core";
5
- //#region src/composable.ts
5
+ // src/composable.ts
6
6
  function he(e) {
7
7
  let { provider: t } = e, n = k([]), r = k([]), i = k(null), a = k("files"), o = k(""), s = k(null), c = k("newest"), l = k(!1), u = k(!1), d = k(!1), f = k(null), p = k(null), m = k(/* @__PURE__ */ new Set()), h = k(null), g = k([]), _ = k({}), v = k(!1), y = k([]), b = k(!1), x = k(null), S = k(!1), C = k(null), w = k(!1), T = k(null), E = k(null), D = k(null), O = 0;
8
8
  function A(t) {
@@ -369,8 +369,7 @@ function he(e) {
369
369
  loadStorage: Y
370
370
  };
371
371
  }
372
- //#endregion
373
- //#region src/components/media/MediaBreadcrumb.vue?vue&type=script&setup=true&lang.ts
372
+ // src/components/media/MediaBreadcrumb.vue?vue&type=script&setup=true&lang.ts
374
373
  var ge = {
375
374
  key: 0,
376
375
  class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-xs",
@@ -875,8 +874,7 @@ var ge = {
875
874
  }, M(i.value.label), 5)], 4));
876
875
  }
877
876
  });
878
- //#endregion
879
- //#region src/utils/formatAbsoluteDate.ts
877
+ // src/utils/formatAbsoluteDate.ts
880
878
  function Fe(e, t, n) {
881
879
  let r = new Date(e);
882
880
  if (Number.isNaN(r.getTime())) return "";
@@ -887,8 +885,7 @@ function Fe(e, t, n) {
887
885
  return r.toLocaleDateString(void 0, n);
888
886
  }
889
887
  }
890
- //#endregion
891
- //#region src/utils/formatFileSize.ts
888
+ // src/utils/formatFileSize.ts
892
889
  var Ie = [
893
890
  "B",
894
891
  "KB",
@@ -900,8 +897,7 @@ function Q(e) {
900
897
  for (; t >= 1024 && n < Ie.length - 1;) t /= 1024, n += 1;
901
898
  return `${Math.round(t * 10) / 10} ${Ie[n]}`;
902
899
  }
903
- //#endregion
904
- //#region src/components/media/MediaGrid.vue?vue&type=script&setup=true&lang.ts
900
+ // src/components/media/MediaGrid.vue?vue&type=script&setup=true&lang.ts
905
901
  var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
906
902
  key: 1,
907
903
  class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:py-16"
@@ -1580,8 +1576,7 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
1580
1576
  })], 8, ["to"]));
1581
1577
  }
1582
1578
  });
1583
- //#endregion
1584
- //#region src/utils/formatList.ts
1579
+ // src/utils/formatList.ts
1585
1580
  function Yt(e, t) {
1586
1581
  let n = {
1587
1582
  style: "narrow",
@@ -1594,8 +1589,7 @@ function Yt(e, t) {
1594
1589
  return new Intl.ListFormat(void 0, n).format(e);
1595
1590
  }
1596
1591
  }
1597
- //#endregion
1598
- //#region src/components/media/MediaUploadZone.vue?vue&type=script&setup=true&lang.ts
1592
+ // src/components/media/MediaUploadZone.vue?vue&type=script&setup=true&lang.ts
1599
1593
  var Xt = [
1600
1594
  "aria-label",
1601
1595
  "aria-describedby",
@@ -1771,8 +1765,7 @@ var Xt = [
1771
1765
  })], 40, rn));
1772
1766
  }
1773
1767
  });
1774
- //#endregion
1775
- //#region src/utils/treeFolders.ts
1768
+ // src/utils/treeFolders.ts
1776
1769
  function un(e) {
1777
1770
  let t = /* @__PURE__ */ new Map();
1778
1771
  for (let n of e) t.set(n.id, {
@@ -1786,8 +1779,7 @@ function un(e) {
1786
1779
  }
1787
1780
  return n;
1788
1781
  }
1789
- //#endregion
1790
- //#region src/composables/useMediaLibraryUI.ts
1782
+ // src/composables/useMediaLibraryUI.ts
1791
1783
  function dn(e) {
1792
1784
  let { library: t, translations: n } = e;
1793
1785
  function r() {
@@ -1885,8 +1877,7 @@ function dn(e) {
1885
1877
  resetUI: F
1886
1878
  };
1887
1879
  }
1888
- //#endregion
1889
- //#region src/components/MediaLibraryChrome.vue?vue&type=script&setup=true&lang.ts
1880
+ // src/components/MediaLibraryChrome.vue?vue&type=script&setup=true&lang.ts
1890
1881
  var fn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl:overflow-hidden" }, pn = {
1891
1882
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-3.5",
1892
1883
  style: { "border-color": "var(--tpl-border)" }
@@ -1980,7 +1971,7 @@ var fn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
1980
1971
  "ready"
1981
1972
  ],
1982
1973
  setup(t, { expose: n, emit: r }) {
1983
- let i = t, a = r, s = b(() => import("./MediaEditModal-Bo3nDMEl.js")), c = f(() => i.translations), u = f(() => i.confirmTestId ?? "media-confirm"), p = {
1974
+ let i = t, a = r, s = b(() => import("./MediaEditModal-QsfoCmDD.js")), c = f(() => i.translations), u = f(() => i.confirmTestId ?? "media-confirm"), p = {
1984
1975
  get maxFileSize() {
1985
1976
  return i.provider.maxFileSize;
1986
1977
  },
@@ -2401,14 +2392,14 @@ var fn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2401
2392
  ]));
2402
2393
  }
2403
2394
  }), Xn = /* #__PURE__ */ Object.assign({
2404
- "./locales/ca.ts": () => import("./ca-DyHL0z4N.js"),
2405
- "./locales/de.ts": () => import("./de-Dcy8LcNQ.js"),
2406
- "./locales/en.ts": () => import("./en-w2ihxIL6.js").then((e) => e.n),
2407
- "./locales/es.ts": () => import("./es-B43D0gmB.js"),
2408
- "./locales/fr.ts": () => import("./fr-DsxaRm09.js"),
2409
- "./locales/ja.ts": () => import("./ja-DDI6z0aO.js"),
2410
- "./locales/nl.ts": () => import("./nl-CHa6u0cR.js"),
2411
- "./locales/pt-BR.ts": () => import("./pt-BR-CZmeAVC3.js")
2395
+ "./locales/ca.ts": () => import("./ca-CAkEWrz7.js"),
2396
+ "./locales/de.ts": () => import("./de-CUcTOIHX.js"),
2397
+ "./locales/en.ts": () => import("./en-AiQi3nze.js").then((e) => e.n),
2398
+ "./locales/es.ts": () => import("./es-CejTsXsM.js"),
2399
+ "./locales/fr.ts": () => import("./fr-CZ4KBWjs.js"),
2400
+ "./locales/ja.ts": () => import("./ja-B-LksFh0.js"),
2401
+ "./locales/nl.ts": () => import("./nl-syCBBR1S.js"),
2402
+ "./locales/pt-BR.ts": () => import("./pt-BR-Bre6oBOZ.js")
2412
2403
  });
2413
2404
  function Zn(e) {
2414
2405
  return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
@@ -2431,8 +2422,7 @@ async function rr(e) {
2431
2422
  let t = Xn[`./locales/${nr(e)}.ts`];
2432
2423
  return (await t()).default;
2433
2424
  }
2434
- //#endregion
2435
- //#region src/components/MediaLibraryModal.vue?vue&type=script&setup=true&lang.ts
2425
+ // src/components/MediaLibraryModal.vue?vue&type=script&setup=true&lang.ts
2436
2426
  var ir = ["data-tpl-theme"], ar = /* @__PURE__ */ x({
2437
2427
  __name: "MediaLibraryModal",
2438
2428
  props: {
@@ -2524,8 +2514,7 @@ var ir = ["data-tpl-theme"], ar = /* @__PURE__ */ x({
2524
2514
  })], 8, ["to"]));
2525
2515
  }
2526
2516
  });
2527
- //#endregion
2528
- //#region src/composables/useMediaPicker.ts
2517
+ // src/composables/useMediaPicker.ts
2529
2518
  function or() {
2530
2519
  let e = C("onRequestMedia"), t = k(!1), n = f(() => !!e);
2531
2520
  async function r(n) {
@@ -2543,8 +2532,7 @@ function or() {
2543
2532
  requestMedia: r
2544
2533
  };
2545
2534
  }
2546
- //#endregion
2547
- //#region src/standalone/MediaLibrary.vue
2535
+ // src/standalone/MediaLibrary.vue
2548
2536
  var sr = /* @__PURE__ */ x({
2549
2537
  __name: "MediaLibrary",
2550
2538
  props: {
@@ -2627,5 +2615,4 @@ typeof window < "u" && (window.TemplaticalMedia = {
2627
2615
  init: lr,
2628
2616
  unmount: ur
2629
2617
  });
2630
- //#endregion
2631
2618
  export { ar as MediaLibraryModal, lr as init, ur as unmount, n as useI18n, o as useMediaCategories, he as useMediaLibrary, or as useMediaPicker };
@@ -1,10 +1,9 @@
1
- import { t as e } from "./en-w2ihxIL6.js";
1
+ import { t as e } from "./en-AiQi3nze.js";
2
2
  import { computed as t, inject as n, isRef as r, onScopeDispose as i, watch as a } from "vue";
3
3
  import { useEventListener as o } from "@vueuse/core";
4
- //#region src/keys.ts
4
+ // src/keys.ts
5
5
  var s = Symbol("templaticalMediaLimits"), c = Symbol("templaticalMediaPopoverTarget"), l = Symbol("templaticalMediaTranslations"), u = Symbol("templaticalMediaUiTheme"), d = Symbol("templaticalMediaUiLocale");
6
- //#endregion
7
- //#region src/composables/useI18n.ts
6
+ // src/composables/useI18n.ts
8
7
  function f(t) {
9
8
  let i = t ?? n(l, null), a = (r(i) ? i.value : i) ?? e;
10
9
  function o(e, t) {
@@ -15,8 +14,7 @@ function f(t) {
15
14
  format: o
16
15
  };
17
16
  }
18
- //#endregion
19
- //#region src/composables/useMediaCategories.ts
17
+ // src/composables/useMediaCategories.ts
20
18
  var p = [
21
19
  "images",
22
20
  "documents",
@@ -65,8 +63,7 @@ function m(e) {
65
63
  getCategoryForMimeType: g
66
64
  };
67
65
  }
68
- //#endregion
69
- //#region \0plugin-vue:export-helper
66
+ // \0plugin-vue:export-helper
70
67
  var h = (e, t) => {
71
68
  let n = e.__vccOpts || e;
72
69
  for (let [e, r] of t) n[e] = r;
@@ -108,5 +105,4 @@ function _(e, t) {
108
105
  p(), f();
109
106
  });
110
107
  }
111
- //#endregion
112
108
  export { s as a, d as c, f as i, u as l, h as n, c as o, m as r, l as s, _ as t };
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@templatical/media-library",
3
3
  "description": "Media library management for Templatical email editor",
4
- "version": "0.51.1",
4
+ "version": "0.52.1",
5
5
  "bugs": "https://github.com/templatical/sdk/issues",
6
6
  "dependencies": {
7
- "@lucide/vue": "^1.61.0",
8
- "@templatical/types": "0.51.1",
7
+ "@lucide/vue": "^1.65.0",
8
+ "@templatical/types": "0.52.1",
9
9
  "@vueuse/core": "^15.0.0",
10
10
  "vue-advanced-cropper": "^2.8.9"
11
11
  },
@@ -17,7 +17,7 @@
17
17
  "vite": "^8.3.5",
18
18
  "vitest": "^5.0.5",
19
19
  "vue": "^3.5.44",
20
- "vue-tsc": "^3.3.13"
20
+ "vue-tsc": "^3.3.14"
21
21
  },
22
22
  "exports": {
23
23
  ".": {