@templatical/media-library 0.8.1 → 0.8.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"pt-BR-Dff76tHu.js","names":[],"sources":["../../../src/i18n/locales/pt-BR.ts"],"sourcesContent":["const ptBR = {\n mediaLibrary: {\n title: \"Biblioteca de Mídia\",\n searchPlaceholder: \"Buscar arquivos...\",\n allFiles: \"Todos os Arquivos\",\n filterAll: \"Todos os Tipos\",\n filterImages: \"Imagens\",\n filterDocuments: \"Documentos\",\n filterVideos: \"Vídeos\",\n filterAudio: \"Áudio\",\n newFolder: \"Nova Pasta\",\n folderName: \"Nome da pasta\",\n noFiles: \"Nenhum arquivo encontrado\",\n dropOrClick: \"Solte arquivos aqui ou clique para enviar\",\n acceptedFormats: \"Imagens, PDF, Vídeo, Áudio, Documentos (máx. 10MB)\",\n uploading: \"Enviando...\",\n uploadingProgress: \"Enviando {current} de {total}...\",\n selectImage: \"Selecionar Imagem\",\n selectFile: \"Selecionar Arquivo\",\n deleteSelected: \"Excluir\",\n copyUrl: \"Copiar URL\",\n copied: \"Copiado!\",\n browseMedia: \"Explorar Biblioteca de Mídia\",\n renameFolder: \"Renomear pasta\",\n addSubfolder: \"Adicionar subpasta\",\n subfolderName: \"Nome da subpasta\",\n sortNewest: \"Mais Recentes\",\n sortOldest: \"Mais Antigos\",\n sortNameAsc: \"Nome A-Z\",\n sortNameDesc: \"Nome Z-A\",\n sortSizeAsc: \"Menores Primeiro\",\n sortSizeDesc: \"Maiores Primeiro\",\n moveSelected: \"Mover\",\n moveToRoot: \"Todos os Arquivos\",\n currentFolder: \"(atual)\",\n confirmDelete: \"Confirmar?\",\n renameFile: \"Renomear\",\n editFile: \"Editar Arquivo\",\n fileName: \"Nome do arquivo\",\n altText: \"Texto Alternativo\",\n altTextPlaceholder: \"Descreva esta imagem para acessibilidade\",\n saveChanges: \"Salvar\",\n cancel: \"Cancelar\",\n frequentlyUsed: \"Usados Frequentemente\",\n deleteWarningTitle: \"Excluir Arquivo\",\n deleteWarningMessage: \"Tem certeza? Esta ação é irreversível.\",\n deleteWarningUsageNote:\n \"Os arquivos a seguir estão sendo usados em templates. Excluí-los pode quebrar esses templates.\",\n deleteAnyway: \"Excluir\",\n usedInTemplates: \"Usado em {count} template(s)\",\n viewGrid: \"Visualização em grade\",\n viewList: \"Visualização em lista\",\n showFolders: \"Mostrar pastas\",\n hideFolders: \"Ocultar pastas\",\n importFromUrl: \"Importar de URL\",\n importUrlPlaceholder: \"https://exemplo.com/imagem.jpg\",\n import: \"Importar\",\n importing: \"Importando...\",\n importError: \"Falha ao importar da URL\",\n conversionLabel: \"Tamanho\",\n conversionOriginal: \"Original\",\n conversionSmall: \"Pequeno (150px)\",\n conversionMedium: \"Médio (600px)\",\n conversionLarge: \"Grande (1200px)\",\n replaceFile: \"Substituir Arquivo\",\n replaceWarningTitle: \"Substituir Arquivo\",\n replaceWarningMessage:\n \"Você está prestes a substituir este arquivo. O substituto deve ter a mesma extensão ({extension}).\",\n replaceWarningUsageNote:\n \"Este arquivo é usado em {count} template(s). Substituí-lo atualizará todas as referências.\",\n replaceSelectFile: \"Selecionar arquivo substituto\",\n replace: \"Substituir\",\n replacing: \"Substituindo...\",\n replaceError: \"Falha ao substituir arquivo\",\n saving: \"Salvando...\",\n cropAspectRatio: \"Proporção\",\n cropFree: \"Livre\",\n cropSquare: \"1:1\",\n cropLandscape43: \"4:3\",\n cropLandscape169: \"16:9\",\n cropOriginal: \"Original\",\n cropMaxWidth: \"Largura Máxima\",\n cropMaxHeight: \"Altura Máxima\",\n cropOutputSize: \"Tamanho de Saída\",\n cropPixels: \"px\",\n cropOptional: \"(opcional)\",\n storageTooltip: \"{used} de {total} usados ({remaining} restantes)\",\n },\n};\n\nexport default ptBR;\n"],"mappings":";AAAA,IAAM,IAAO,EACX,cAAc;CACZ,OAAO;CACP,mBAAmB;CACnB,UAAU;CACV,WAAW;CACX,cAAc;CACd,iBAAiB;CACjB,cAAc;CACd,aAAa;CACb,WAAW;CACX,YAAY;CACZ,SAAS;CACT,aAAa;CACb,iBAAiB;CACjB,WAAW;CACX,mBAAmB;CACnB,aAAa;CACb,YAAY;CACZ,gBAAgB;CAChB,SAAS;CACT,QAAQ;CACR,aAAa;CACb,cAAc;CACd,cAAc;CACd,eAAe;CACf,YAAY;CACZ,YAAY;CACZ,aAAa;CACb,cAAc;CACd,aAAa;CACb,cAAc;CACd,cAAc;CACd,YAAY;CACZ,eAAe;CACf,eAAe;CACf,YAAY;CACZ,UAAU;CACV,UAAU;CACV,SAAS;CACT,oBAAoB;CACpB,aAAa;CACb,QAAQ;CACR,gBAAgB;CAChB,oBAAoB;CACpB,sBAAsB;CACtB,wBACE;CACF,cAAc;CACd,iBAAiB;CACjB,UAAU;CACV,UAAU;CACV,aAAa;CACb,aAAa;CACb,eAAe;CACf,sBAAsB;CACtB,QAAQ;CACR,WAAW;CACX,aAAa;CACb,iBAAiB;CACjB,oBAAoB;CACpB,iBAAiB;CACjB,kBAAkB;CAClB,iBAAiB;CACjB,aAAa;CACb,qBAAqB;CACrB,uBACE;CACF,yBACE;CACF,mBAAmB;CACnB,SAAS;CACT,WAAW;CACX,cAAc;CACd,QAAQ;CACR,iBAAiB;CACjB,UAAU;CACV,YAAY;CACZ,iBAAiB;CACjB,kBAAkB;CAClB,cAAc;CACd,cAAc;CACd,eAAe;CACf,gBAAgB;CAChB,YAAY;CACZ,cAAc;CACd,gBAAgB;CACjB,EACF"}
1
+ {"version":3,"file":"pt-BR-Dff76tHu.js","names":[],"sources":["../../../src/i18n/locales/pt-BR.ts"],"sourcesContent":["const ptBR = {\n mediaLibrary: {\n title: \"Biblioteca de Mídia\",\n searchPlaceholder: \"Buscar arquivos...\",\n allFiles: \"Todos os Arquivos\",\n filterAll: \"Todos os Tipos\",\n filterImages: \"Imagens\",\n filterDocuments: \"Documentos\",\n filterVideos: \"Vídeos\",\n filterAudio: \"Áudio\",\n newFolder: \"Nova Pasta\",\n folderName: \"Nome da pasta\",\n noFiles: \"Nenhum arquivo encontrado\",\n dropOrClick: \"Solte arquivos aqui ou clique para enviar\",\n acceptedFormats: \"Imagens, PDF, Vídeo, Áudio, Documentos (máx. 10MB)\",\n uploading: \"Enviando...\",\n uploadingProgress: \"Enviando {current} de {total}...\",\n selectImage: \"Selecionar Imagem\",\n selectFile: \"Selecionar Arquivo\",\n deleteSelected: \"Excluir\",\n copyUrl: \"Copiar URL\",\n copied: \"Copiado!\",\n browseMedia: \"Explorar Biblioteca de Mídia\",\n renameFolder: \"Renomear pasta\",\n addSubfolder: \"Adicionar subpasta\",\n subfolderName: \"Nome da subpasta\",\n sortNewest: \"Mais Recentes\",\n sortOldest: \"Mais Antigos\",\n sortNameAsc: \"Nome A-Z\",\n sortNameDesc: \"Nome Z-A\",\n sortSizeAsc: \"Menores Primeiro\",\n sortSizeDesc: \"Maiores Primeiro\",\n moveSelected: \"Mover\",\n moveToRoot: \"Todos os Arquivos\",\n currentFolder: \"(atual)\",\n confirmDelete: \"Confirmar?\",\n renameFile: \"Renomear\",\n editFile: \"Editar Arquivo\",\n fileName: \"Nome do arquivo\",\n altText: \"Texto Alternativo\",\n altTextPlaceholder: \"Descreva esta imagem para acessibilidade\",\n saveChanges: \"Salvar\",\n cancel: \"Cancelar\",\n frequentlyUsed: \"Usados Frequentemente\",\n deleteWarningTitle: \"Excluir Arquivo\",\n deleteWarningMessage: \"Tem certeza? Esta ação é irreversível.\",\n deleteWarningUsageNote:\n \"Os arquivos a seguir estão sendo usados em templates. Excluí-los pode quebrar esses templates.\",\n deleteAnyway: \"Excluir\",\n usedInTemplates: \"Usado em {count} template(s)\",\n viewGrid: \"Visualização em grade\",\n viewList: \"Visualização em lista\",\n showFolders: \"Mostrar pastas\",\n hideFolders: \"Ocultar pastas\",\n importFromUrl: \"Importar de URL\",\n importUrlPlaceholder: \"https://exemplo.com/imagem.jpg\",\n import: \"Importar\",\n importing: \"Importando...\",\n importError: \"Falha ao importar da URL\",\n conversionLabel: \"Tamanho\",\n conversionOriginal: \"Original\",\n conversionSmall: \"Pequeno (150px)\",\n conversionMedium: \"Médio (600px)\",\n conversionLarge: \"Grande (1200px)\",\n replaceFile: \"Substituir Arquivo\",\n replaceWarningTitle: \"Substituir Arquivo\",\n replaceWarningMessage:\n \"Você está prestes a substituir este arquivo. O substituto deve ter a mesma extensão ({extension}).\",\n replaceWarningUsageNote:\n \"Este arquivo é usado em {count} template(s). Substituí-lo atualizará todas as referências.\",\n replaceSelectFile: \"Selecionar arquivo substituto\",\n replace: \"Substituir\",\n replacing: \"Substituindo...\",\n replaceError: \"Falha ao substituir arquivo\",\n saving: \"Salvando...\",\n cropAspectRatio: \"Proporção\",\n cropFree: \"Livre\",\n cropSquare: \"1:1\",\n cropLandscape43: \"4:3\",\n cropLandscape169: \"16:9\",\n cropOriginal: \"Original\",\n cropMaxWidth: \"Largura Máxima\",\n cropMaxHeight: \"Altura Máxima\",\n cropOutputSize: \"Tamanho de Saída\",\n cropPixels: \"px\",\n cropOptional: \"(opcional)\",\n storageTooltip: \"{used} de {total} usados ({remaining} restantes)\",\n },\n};\n\nexport default ptBR;\n"],"mappings":";AAAA,IAAM,IAAO,EACX,cAAc;CACZ,OAAO;CACP,mBAAmB;CACnB,UAAU;CACV,WAAW;CACX,cAAc;CACd,iBAAiB;CACjB,cAAc;CACd,aAAa;CACb,WAAW;CACX,YAAY;CACZ,SAAS;CACT,aAAa;CACb,iBAAiB;CACjB,WAAW;CACX,mBAAmB;CACnB,aAAa;CACb,YAAY;CACZ,gBAAgB;CAChB,SAAS;CACT,QAAQ;CACR,aAAa;CACb,cAAc;CACd,cAAc;CACd,eAAe;CACf,YAAY;CACZ,YAAY;CACZ,aAAa;CACb,cAAc;CACd,aAAa;CACb,cAAc;CACd,cAAc;CACd,YAAY;CACZ,eAAe;CACf,eAAe;CACf,YAAY;CACZ,UAAU;CACV,UAAU;CACV,SAAS;CACT,oBAAoB;CACpB,aAAa;CACb,QAAQ;CACR,gBAAgB;CAChB,oBAAoB;CACpB,sBAAsB;CACtB,wBACE;CACF,cAAc;CACd,iBAAiB;CACjB,UAAU;CACV,UAAU;CACV,aAAa;CACb,aAAa;CACb,eAAe;CACf,sBAAsB;CACtB,QAAQ;CACR,WAAW;CACX,aAAa;CACb,iBAAiB;CACjB,oBAAoB;CACpB,iBAAiB;CACjB,kBAAkB;CAClB,iBAAiB;CACjB,aAAa;CACb,qBAAqB;CACrB,uBACE;CACF,yBACE;CACF,mBAAmB;CACnB,SAAS;CACT,WAAW;CACX,cAAc;CACd,QAAQ;CACR,iBAAiB;CACjB,UAAU;CACV,YAAY;CACZ,iBAAiB;CACjB,kBAAkB;CAClB,cAAc;CACd,cAAc;CACd,eAAe;CACf,gBAAgB;CAChB,YAAY;CACZ,cAAc;CACd,gBAAgB;AAClB,EACF"}
@@ -1,6 +1,7 @@
1
- import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, M as p, N as m, O as h, P as g, Q as _, R as v, S as y, T as b, U as x, V as S, W as C, X as w, Y as T, Z as E, _ as D, a as O, at as k, b as ee, c as te, d as ne, et as re, f as A, g as ie, h as ae, i as oe, it as j, j as M, k as N, l as se, m as ce, n as le, nt as ue, o as de, ot as P, p as fe, q as F, r as pe, rt as I, s as me, st as L, t as he, tt as ge, u as _e, v as ve, w as R, x as ye, y as be, z } from "./chunks/icons-DY7nhIJb.js";
1
+ import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, M as p, N as m, O as h, P as g, Q as _, R as v, S as y, T as b, U as x, V as S, W as C, X as w, Y as T, Z as E, _ as D, a as O, at as k, b as ee, c as te, d as ne, et as re, f as A, g as ie, h as ae, i as oe, it as j, j as M, k as N, l as se, m as ce, n as le, nt as ue, o as de, ot as P, p as fe, q as F, r as pe, rt as I, s as me, st as L, t as he, tt as ge, u as _e, v as ve, w as R, x as ye, y as be, z } from "./chunks/icons-Ce4xb8NS.js";
2
2
  //#region ../types/src/config.ts
3
3
  var xe = class extends Error {
4
+ statusCode;
4
5
  constructor(e, t) {
5
6
  super(e), this.statusCode = t, this.name = "SdkError";
6
7
  }
@@ -186,6 +187,7 @@ var we = "/api/v1/projects/{project}/tenants/{tenant}", V = `${we}/templates/{te
186
187
  "savedModules.update": `${Oe}/{savedModule}`,
187
188
  "savedModules.destroy": `${Oe}/{savedModule}`
188
189
  }, ke = class {
190
+ authManager;
189
191
  constructor(e) {
190
192
  this.authManager = e;
191
193
  }
@@ -512,7 +514,7 @@ function Be(e, t, n, r) {
512
514
  //#region src/keys.ts
513
515
  var Ve = Symbol("templaticalMediaPopoverTarget");
514
516
  //#endregion
515
- //#region ../../node_modules/.pnpm/vue-advanced-cropper@2.8.9_vue@3.5.33_typescript@6.0.3_/node_modules/vue-advanced-cropper/dist/index.esm-bundler.js
517
+ //#region ../../node_modules/.pnpm/vue-advanced-cropper@2.8.9_vue@3.5.34_typescript@6.0.3_/node_modules/vue-advanced-cropper/dist/index.esm-bundler.js
516
518
  function He(e, t) {
517
519
  var n = Object.keys(e);
518
520
  if (Object.getOwnPropertySymbols) {
@@ -4633,7 +4635,7 @@ var Ln = ["data-tpl-theme"], Rn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, zn
4633
4635
  }
4634
4636
  });
4635
4637
  //#endregion
4636
- //#region ../../node_modules/.pnpm/@vueuse+shared@14.2.1_vue@3.5.33_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
4638
+ //#region ../../node_modules/.pnpm/@vueuse+shared@14.3.0_vue@3.5.34_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
4637
4639
  function Pr(e, t) {
4638
4640
  return T() ? (E(e, t), !0) : !1;
4639
4641
  }
@@ -4656,7 +4658,7 @@ function Fr() {
4656
4658
  }
4657
4659
  var Ir = typeof window < "u" && typeof document < "u";
4658
4660
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
4659
- var Lr = (e) => e != null, Rr = Object.prototype.toString, zr = (e) => Rr.call(e) === "[object Object]", Br = () => {}, Vr = (e, t) => Object.prototype.hasOwnProperty.call(e, t), Hr = /* @__PURE__ */ Ur();
4661
+ var Lr = (e) => e != null, Rr = Object.prototype.toString, zr = (e) => Rr.call(e) === "[object Object]", Br = () => {}, Vr = (e, t) => Object.hasOwn(e, t), Hr = /* @__PURE__ */ Ur();
4660
4662
  function Ur() {
4661
4663
  var e, t;
4662
4664
  return Ir && !!(!((e = window) == null || (e = e.navigator) == null) && e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window) == null || (t = t.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
@@ -4730,7 +4732,7 @@ function Xr(e, t, n) {
4730
4732
  });
4731
4733
  }
4732
4734
  //#endregion
4733
- //#region ../../node_modules/.pnpm/@vueuse+core@14.2.1_vue@3.5.33_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
4735
+ //#region ../../node_modules/.pnpm/@vueuse+core@14.3.0_vue@3.5.34_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
4734
4736
  var Zr = Ir ? window : void 0, Qr = Ir ? window.document : void 0, $r = Ir ? window.navigator : void 0;
4735
4737
  function ei(e) {
4736
4738
  let t = I(e);
@@ -4806,8 +4808,9 @@ function ri(e, t, n = {}) {
4806
4808
  }, { passive: !0 }),
4807
4809
  o && ti(r, "blur", (n) => {
4808
4810
  setTimeout(() => {
4809
- let i = ei(e);
4810
- r.document.activeElement?.tagName === "IFRAME" && !i?.contains(r.document.activeElement) && t(n);
4811
+ let i = ei(e), a = r.document.activeElement;
4812
+ for (; a?.shadowRoot;) a = a.shadowRoot.activeElement;
4813
+ a?.tagName === "IFRAME" && !i?.contains(r.document.activeElement) && t(n);
4811
4814
  }, 0);
4812
4815
  }, { passive: !0 })
4813
4816
  ].filter(Boolean), h = () => m.forEach((e) => e());
@@ -4855,44 +4858,56 @@ function oi(e, t = {}) {
4855
4858
  } : s;
4856
4859
  }
4857
4860
  function si(e = {}) {
4858
- let { navigator: t = $r, read: n = !1, source: r, copiedDuring: i = 1500, legacy: o = !1 } = e, s = /* @__PURE__ */ ai(() => t && "clipboard" in t), c = oi("clipboard-read"), l = oi("clipboard-write"), u = a(() => s.value || o), d = ge(""), f = ge(!1), p = Yr(() => f.value = !1, i, { immediate: !1 });
4859
- async function m() {
4860
- let e = !(s.value && y(c.value));
4861
+ let { navigator: t = $r, read: n = !1, source: r, copiedDuring: i = 1500, legacy: o = !1 } = e, s = /* @__PURE__ */ ai(() => t && "clipboard" in t), c = oi("clipboard-read"), l = oi("clipboard-write"), u = a(() => s.value || o), d = ge(""), f = ge(!1), p = ge(!1), m = Yr(() => f.value = !1, i, { immediate: !1 }), h = 0;
4862
+ async function g() {
4863
+ let e = !(s.value && x(c.value));
4861
4864
  if (!e) try {
4862
4865
  d.value = await t.clipboard.readText();
4863
4866
  } catch {
4864
4867
  e = !0;
4865
4868
  }
4866
- e && (d.value = v());
4867
- }
4868
- u.value && n && ti(["copy", "cut"], m, { passive: !0 });
4869
- async function h(e = I(r)) {
4870
- if (u.value && e != null) {
4871
- let n = !(s.value && y(l.value));
4872
- if (!n) try {
4873
- await t.clipboard.writeText(e);
4869
+ e && (d.value = b());
4870
+ }
4871
+ u.value && n && ti(["copy", "cut"], g, { passive: !0 });
4872
+ async function _(e) {
4873
+ let n = e ?? I(r);
4874
+ if (u.value && n != null) {
4875
+ p.value = !0;
4876
+ let e = !(s.value && x(l.value));
4877
+ if (!e) try {
4878
+ let e = v(n);
4879
+ await t.clipboard.write([e]);
4874
4880
  } catch {
4875
- n = !0;
4881
+ e = !0;
4882
+ }
4883
+ if (e) if (typeof n == "string") d.value = n, y(n);
4884
+ else {
4885
+ let e = ++h, t = await n();
4886
+ t != null && e === h && (d.value = t, y(t));
4876
4887
  }
4877
- n && g(e), d.value = e, f.value = !0, p.start();
4888
+ f.value = !0, m.start(), p.value = !1;
4878
4889
  }
4879
4890
  }
4880
- function g(e) {
4891
+ function v(e) {
4892
+ return typeof e == "string" ? (d.value = e, new ClipboardItem({ "text/plain": e })) : new ClipboardItem({ "text/plain": e().then((e = "") => (d.value = e, new Blob([e], { type: "text/plain" }))) });
4893
+ }
4894
+ function y(e) {
4881
4895
  let t = document.createElement("textarea");
4882
4896
  t.value = e, t.style.position = "absolute", t.style.opacity = "0", t.setAttribute("readonly", ""), document.body.appendChild(t), t.select(), document.execCommand("copy"), t.remove();
4883
4897
  }
4884
- function v() {
4898
+ function b() {
4885
4899
  var e, t;
4886
4900
  return ((e = document) == null || (t = e.getSelection) == null || (t = t.call(e)) == null ? void 0 : t.toString()) ?? "";
4887
4901
  }
4888
- function y(e) {
4902
+ function x(e) {
4889
4903
  return e === "granted" || e === "prompt";
4890
4904
  }
4891
4905
  return {
4906
+ copyPending: re(p),
4892
4907
  isSupported: u,
4893
- text: _(d),
4894
- copied: _(f),
4895
- copy: h
4908
+ text: re(d),
4909
+ copied: re(f),
4910
+ copy: _
4896
4911
  };
4897
4912
  }
4898
4913
  function ci(e, t = {}) {
@@ -5756,6 +5771,7 @@ var pi = { class: "tpl:p-4" }, mi = {
5756
5771
  })], 32));
5757
5772
  }
5758
5773
  }), Va = class {
5774
+ authManager;
5759
5775
  constructor(e) {
5760
5776
  this.authManager = e;
5761
5777
  }