@templatical/media-library 0.15.1 → 0.16.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.
- package/dist/ca-DnghH5Xn.js +87 -0
- package/dist/cdn/chunks/ca-DnghH5Xn.js +89 -0
- package/dist/cdn/chunks/ca-DnghH5Xn.js.map +1 -0
- package/dist/cdn/chunks/es-Bcp-DbmC.js +89 -0
- package/dist/cdn/chunks/es-Bcp-DbmC.js.map +1 -0
- package/dist/cdn/media-library.js +37 -40
- package/dist/cdn/media-library.js.map +1 -1
- package/dist/es-Bcp-DbmC.js +87 -0
- package/dist/templatical-media-library.js +33 -36
- package/package.json +4 -4
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
//#region src/i18n/locales/es.ts
|
|
2
|
+
var e = { mediaLibrary: {
|
|
3
|
+
title: "Biblioteca multimedia",
|
|
4
|
+
searchPlaceholder: "Buscar archivos...",
|
|
5
|
+
allFiles: "Todos los archivos",
|
|
6
|
+
filterAll: "Todos los tipos",
|
|
7
|
+
filterImages: "Imágenes",
|
|
8
|
+
filterDocuments: "Documentos",
|
|
9
|
+
filterVideos: "Vídeos",
|
|
10
|
+
filterAudio: "Audio",
|
|
11
|
+
newFolder: "Nueva carpeta",
|
|
12
|
+
folderName: "Nombre de la carpeta",
|
|
13
|
+
noFiles: "No se han encontrado archivos",
|
|
14
|
+
dropOrClick: "Suelta los archivos aquí o haz clic para subirlos",
|
|
15
|
+
acceptedFormats: "Imágenes, PDF, vídeo, audio y documentos (máx. 10 MB)",
|
|
16
|
+
uploading: "Subiendo...",
|
|
17
|
+
uploadingProgress: "Subiendo {current} de {total}...",
|
|
18
|
+
selectImage: "Seleccionar imagen",
|
|
19
|
+
selectFile: "Seleccionar archivo",
|
|
20
|
+
deleteSelected: "Eliminar",
|
|
21
|
+
copyUrl: "Copiar URL",
|
|
22
|
+
copied: "¡Copiada!",
|
|
23
|
+
browseMedia: "Explorar la biblioteca multimedia",
|
|
24
|
+
renameFolder: "Cambiar nombre de la carpeta",
|
|
25
|
+
addSubfolder: "Añadir subcarpeta",
|
|
26
|
+
subfolderName: "Nombre de la subcarpeta",
|
|
27
|
+
sortNewest: "Más recientes primero",
|
|
28
|
+
sortOldest: "Más antiguos primero",
|
|
29
|
+
sortNameAsc: "Nombre de A a Z",
|
|
30
|
+
sortNameDesc: "Nombre de Z a A",
|
|
31
|
+
sortSizeAsc: "Más pequeños primero",
|
|
32
|
+
sortSizeDesc: "Más grandes primero",
|
|
33
|
+
moveSelected: "Mover",
|
|
34
|
+
moveToRoot: "Todos los archivos",
|
|
35
|
+
currentFolder: "(actual)",
|
|
36
|
+
confirmDelete: "¿Confirmar?",
|
|
37
|
+
renameFile: "Cambiar nombre",
|
|
38
|
+
editFile: "Editar archivo",
|
|
39
|
+
fileName: "Nombre del archivo",
|
|
40
|
+
altText: "Texto alternativo",
|
|
41
|
+
altTextPlaceholder: "Describe esta imagen para mejorar la accesibilidad",
|
|
42
|
+
saveChanges: "Guardar",
|
|
43
|
+
cancel: "Cancelar",
|
|
44
|
+
frequentlyUsed: "Usados frecuentemente",
|
|
45
|
+
deleteWarningTitle: "Eliminar archivo",
|
|
46
|
+
deleteWarningMessage: "¿Estás seguro? Esta acción es irreversible.",
|
|
47
|
+
deleteWarningUsageNote: "Los siguientes archivos se utilizan en plantillas. Si los eliminas, es posible que esas plantillas dejen de funcionar correctamente.",
|
|
48
|
+
deleteAnyway: "Eliminar",
|
|
49
|
+
usedInTemplates: "Usado en {count} plantilla(s)",
|
|
50
|
+
viewGrid: "Vista de cuadrícula",
|
|
51
|
+
viewList: "Vista de lista",
|
|
52
|
+
showFolders: "Mostrar carpetas",
|
|
53
|
+
hideFolders: "Ocultar carpetas",
|
|
54
|
+
importFromUrl: "Importar desde URL",
|
|
55
|
+
importUrlPlaceholder: "https://example.com/image.jpg",
|
|
56
|
+
import: "Importar",
|
|
57
|
+
importing: "Importando...",
|
|
58
|
+
importError: "No se ha podido importar desde la URL",
|
|
59
|
+
conversionLabel: "Tamaño",
|
|
60
|
+
conversionOriginal: "Original",
|
|
61
|
+
conversionSmall: "Pequeño (150 px)",
|
|
62
|
+
conversionMedium: "Mediano (600 px)",
|
|
63
|
+
conversionLarge: "Grande (1200 px)",
|
|
64
|
+
replaceFile: "Reemplazar archivo",
|
|
65
|
+
replaceWarningTitle: "Reemplazar archivo",
|
|
66
|
+
replaceWarningMessage: "Estás a punto de reemplazar este archivo. El archivo de reemplazo debe tener la misma extensión ({extension}).",
|
|
67
|
+
replaceWarningUsageNote: "Este archivo se utiliza en {count} plantilla(s). Al reemplazarlo, se actualizarán todas las referencias.",
|
|
68
|
+
replaceSelectFile: "Seleccionar archivo de reemplazo",
|
|
69
|
+
replace: "Reemplazar",
|
|
70
|
+
replacing: "Reemplazando...",
|
|
71
|
+
replaceError: "No se ha podido reemplazar el archivo",
|
|
72
|
+
saving: "Guardando...",
|
|
73
|
+
cropAspectRatio: "Relación de aspecto",
|
|
74
|
+
cropFree: "Libre",
|
|
75
|
+
cropSquare: "1:1",
|
|
76
|
+
cropLandscape43: "4:3",
|
|
77
|
+
cropLandscape169: "16:9",
|
|
78
|
+
cropOriginal: "Original",
|
|
79
|
+
cropMaxWidth: "Anchura máxima",
|
|
80
|
+
cropMaxHeight: "Altura máxima",
|
|
81
|
+
cropOutputSize: "Tamaño de salida",
|
|
82
|
+
cropPixels: "px",
|
|
83
|
+
cropOptional: "(opcional)",
|
|
84
|
+
storageTooltip: "{used} de {total} usados ({remaining} restantes)"
|
|
85
|
+
} };
|
|
86
|
+
//#endregion
|
|
87
|
+
export { e as default };
|
|
@@ -2994,53 +2994,50 @@ var Hr = {
|
|
|
2994
2994
|
}, D(a.value.mediaLibrary.selectFile), 9, Ai)) : u("", !0)])])])
|
|
2995
2995
|
]));
|
|
2996
2996
|
}
|
|
2997
|
-
}), Mi =
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
];
|
|
3007
|
-
function Pi(e) {
|
|
3008
|
-
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
2997
|
+
}), Mi = /* #__PURE__ */ Object.assign({
|
|
2998
|
+
"./locales/ca.ts": () => import("./ca-DnghH5Xn.js"),
|
|
2999
|
+
"./locales/de.ts": () => import("./de-ByQyu2jv.js"),
|
|
3000
|
+
"./locales/en.ts": () => import("./en-B-xajqfh.js"),
|
|
3001
|
+
"./locales/es.ts": () => import("./es-Bcp-DbmC.js"),
|
|
3002
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-C0Hzc26R.js")
|
|
3003
|
+
});
|
|
3004
|
+
function Ni(e) {
|
|
3005
|
+
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
3009
3006
|
}
|
|
3007
|
+
var Pi = Ni(Mi);
|
|
3010
3008
|
function Fi(e) {
|
|
3011
|
-
|
|
3012
|
-
return Ni.find((e) => Pi(e) === t);
|
|
3009
|
+
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
3013
3010
|
}
|
|
3014
3011
|
function Ii(e) {
|
|
3015
|
-
|
|
3012
|
+
let t = Fi(e);
|
|
3013
|
+
return Pi.find((e) => Fi(e) === t);
|
|
3016
3014
|
}
|
|
3017
3015
|
function Li(e) {
|
|
3018
|
-
return Fi(e)
|
|
3016
|
+
return Fi(e).split("-")[0];
|
|
3017
|
+
}
|
|
3018
|
+
function Ri(e) {
|
|
3019
|
+
return Ii(e) ?? Ii(Li(e)) ?? "en";
|
|
3019
3020
|
}
|
|
3020
|
-
async function
|
|
3021
|
-
let t =
|
|
3022
|
-
return (await
|
|
3023
|
-
"./locales/de.ts": () => import("./de-ByQyu2jv.js"),
|
|
3024
|
-
"./locales/en.ts": () => import("./en-B-xajqfh.js"),
|
|
3025
|
-
"./locales/pt-BR.ts": () => import("./pt-BR-C0Hzc26R.js")
|
|
3026
|
-
}), `./locales/${t}.ts`, 3)).default;
|
|
3021
|
+
async function zi(e) {
|
|
3022
|
+
let t = Mi[`./locales/${Ri(e)}.ts`];
|
|
3023
|
+
return (await t()).default;
|
|
3027
3024
|
}
|
|
3028
3025
|
//#endregion
|
|
3029
3026
|
//#region src/standalone/visual.ts
|
|
3030
|
-
var $ = null,
|
|
3031
|
-
async function
|
|
3027
|
+
var $ = null, Bi = w(null);
|
|
3028
|
+
async function Vi(e) {
|
|
3032
3029
|
let n = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
|
|
3033
3030
|
if (!n) throw Error(`Container element not found: ${e.container}`);
|
|
3034
3031
|
let i = r(e.auth, e.onError);
|
|
3035
3032
|
await i.initialize();
|
|
3036
|
-
let a = await new t(i).fetchConfig(), o = await
|
|
3037
|
-
return
|
|
3033
|
+
let a = await new t(i).fetchConfig(), o = await zi(e.locale ?? "en");
|
|
3034
|
+
return Ui(n, e.theme), $ && Hi(), new Promise((t, r) => {
|
|
3038
3035
|
try {
|
|
3039
3036
|
$ = c({ setup() {
|
|
3040
3037
|
let r = () => {
|
|
3041
3038
|
t({
|
|
3042
|
-
setTheme: (e) =>
|
|
3043
|
-
unmount:
|
|
3039
|
+
setTheme: (e) => Ui(n, e),
|
|
3040
|
+
unmount: Hi
|
|
3044
3041
|
});
|
|
3045
3042
|
};
|
|
3046
3043
|
return () => g(ji, {
|
|
@@ -3050,7 +3047,7 @@ async function Bi(e) {
|
|
|
3050
3047
|
translations: o,
|
|
3051
3048
|
onSelect: e.onSelect,
|
|
3052
3049
|
onError: e.onError,
|
|
3053
|
-
ref:
|
|
3050
|
+
ref: Bi,
|
|
3054
3051
|
onReady: r
|
|
3055
3052
|
});
|
|
3056
3053
|
} }), $.mount(n);
|
|
@@ -3059,15 +3056,15 @@ async function Bi(e) {
|
|
|
3059
3056
|
}
|
|
3060
3057
|
});
|
|
3061
3058
|
}
|
|
3062
|
-
function
|
|
3063
|
-
$ && ($.unmount(), $ = null,
|
|
3059
|
+
function Hi() {
|
|
3060
|
+
$ && ($.unmount(), $ = null, Bi.value = null);
|
|
3064
3061
|
}
|
|
3065
|
-
function
|
|
3062
|
+
function Ui(e, t) {
|
|
3066
3063
|
t && (t.primaryColor && e.style.setProperty("--tpl-primary", t.primaryColor), t.borderRadius !== void 0 && (e.style.setProperty("--tpl-radius", `${t.borderRadius}px`), e.style.setProperty("--tpl-radius-sm", `${Math.max(0, t.borderRadius - 3)}px`), e.style.setProperty("--tpl-radius-lg", `${t.borderRadius + 4}px`)));
|
|
3067
3064
|
}
|
|
3068
3065
|
typeof window < "u" && (window.TemplaticalMedia = {
|
|
3069
|
-
init:
|
|
3070
|
-
unmount:
|
|
3066
|
+
init: Vi,
|
|
3067
|
+
unmount: Hi
|
|
3071
3068
|
});
|
|
3072
3069
|
//#endregion
|
|
3073
|
-
export { de as MediaApiClient, Br as MediaLibraryModal,
|
|
3070
|
+
export { de as MediaApiClient, Br as MediaLibraryModal, Vi as init, Hi as unmount, Z as useI18n, Q as useMediaCategories, fe as useMediaLibrary, Vr as useMediaPicker };
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@templatical/media-library",
|
|
3
3
|
"description": "Media library management for Templatical email editor",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.16.0",
|
|
5
5
|
"bugs": "https://github.com/templatical/sdk/issues",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@lucide/vue": "^1.24.0",
|
|
8
8
|
"@vueuse/core": "^14.3.0",
|
|
9
9
|
"vue-advanced-cropper": "^2.8.9",
|
|
10
|
-
"@templatical/core": "0.
|
|
11
|
-
"@templatical/types": "0.
|
|
10
|
+
"@templatical/core": "0.16.0",
|
|
11
|
+
"@templatical/types": "0.16.0"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
14
|
+
"@vitejs/plugin-vue": "^6.0.8",
|
|
15
15
|
"@vue/test-utils": "^2.4.11",
|
|
16
16
|
"typescript": "^6.0.3",
|
|
17
17
|
"vite": "^8.1.4",
|