@jjlmoya/utils-converters 1.1.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/package.json +61 -0
- package/src/category/i18n/en.ts +90 -0
- package/src/category/i18n/es.ts +90 -0
- package/src/category/i18n/fr.ts +90 -0
- package/src/category/index.ts +39 -0
- package/src/category/seo.astro +15 -0
- package/src/components/PreviewNavSidebar.astro +116 -0
- package/src/components/PreviewToolbar.astro +152 -0
- package/src/data.ts +34 -0
- package/src/env.d.ts +5 -0
- package/src/index.ts +39 -0
- package/src/layouts/PreviewLayout.astro +117 -0
- package/src/pages/[locale]/[slug].astro +148 -0
- package/src/pages/[locale].astro +271 -0
- package/src/pages/index.astro +4 -0
- package/src/shared/ImageConverter.astro +237 -0
- package/src/shared/logic/converter.ts +167 -0
- package/src/shared/style.css +258 -0
- package/src/tests/faq_count.test.ts +10 -0
- package/src/tests/mocks/astro_mock.js +2 -0
- package/src/tests/seo_length.test.ts +22 -0
- package/src/tests/tool_validation.test.ts +17 -0
- package/src/tool/avifAJpg/bibliography.astro +14 -0
- package/src/tool/avifAJpg/component.astro +8 -0
- package/src/tool/avifAJpg/i18n/en.ts +123 -0
- package/src/tool/avifAJpg/i18n/es.ts +123 -0
- package/src/tool/avifAJpg/i18n/fr.ts +118 -0
- package/src/tool/avifAJpg/index.ts +29 -0
- package/src/tool/avifAJpg/seo.astro +14 -0
- package/src/tool/avifAPng/bibliography.astro +14 -0
- package/src/tool/avifAPng/component.astro +8 -0
- package/src/tool/avifAPng/i18n/en.ts +118 -0
- package/src/tool/avifAPng/i18n/es.ts +123 -0
- package/src/tool/avifAPng/i18n/fr.ts +118 -0
- package/src/tool/avifAPng/index.ts +29 -0
- package/src/tool/avifAPng/seo.astro +14 -0
- package/src/tool/avifAWebp/bibliography.astro +14 -0
- package/src/tool/avifAWebp/component.astro +8 -0
- package/src/tool/avifAWebp/i18n/en.ts +118 -0
- package/src/tool/avifAWebp/i18n/es.ts +123 -0
- package/src/tool/avifAWebp/i18n/fr.ts +118 -0
- package/src/tool/avifAWebp/index.ts +29 -0
- package/src/tool/avifAWebp/seo.astro +14 -0
- package/src/tool/bmpAJpg/bibliography.astro +14 -0
- package/src/tool/bmpAJpg/component.astro +8 -0
- package/src/tool/bmpAJpg/i18n/en.ts +123 -0
- package/src/tool/bmpAJpg/i18n/es.ts +123 -0
- package/src/tool/bmpAJpg/i18n/fr.ts +118 -0
- package/src/tool/bmpAJpg/index.ts +29 -0
- package/src/tool/bmpAJpg/seo.astro +14 -0
- package/src/tool/bmpAPng/bibliography.astro +14 -0
- package/src/tool/bmpAPng/component.astro +8 -0
- package/src/tool/bmpAPng/i18n/en.ts +123 -0
- package/src/tool/bmpAPng/i18n/es.ts +123 -0
- package/src/tool/bmpAPng/i18n/fr.ts +118 -0
- package/src/tool/bmpAPng/index.ts +29 -0
- package/src/tool/bmpAPng/seo.astro +14 -0
- package/src/tool/bmpAWebp/bibliography.astro +14 -0
- package/src/tool/bmpAWebp/component.astro +8 -0
- package/src/tool/bmpAWebp/i18n/en.ts +118 -0
- package/src/tool/bmpAWebp/i18n/es.ts +123 -0
- package/src/tool/bmpAWebp/i18n/fr.ts +118 -0
- package/src/tool/bmpAWebp/index.ts +29 -0
- package/src/tool/bmpAWebp/seo.astro +14 -0
- package/src/tool/gifAJpg/bibliography.astro +14 -0
- package/src/tool/gifAJpg/component.astro +8 -0
- package/src/tool/gifAJpg/i18n/en.ts +123 -0
- package/src/tool/gifAJpg/i18n/es.ts +123 -0
- package/src/tool/gifAJpg/i18n/fr.ts +118 -0
- package/src/tool/gifAJpg/index.ts +29 -0
- package/src/tool/gifAJpg/seo.astro +14 -0
- package/src/tool/gifAPng/bibliography.astro +14 -0
- package/src/tool/gifAPng/component.astro +8 -0
- package/src/tool/gifAPng/i18n/en.ts +123 -0
- package/src/tool/gifAPng/i18n/es.ts +123 -0
- package/src/tool/gifAPng/i18n/fr.ts +118 -0
- package/src/tool/gifAPng/index.ts +29 -0
- package/src/tool/gifAPng/seo.astro +14 -0
- package/src/tool/gifAWebp/bibliography.astro +14 -0
- package/src/tool/gifAWebp/component.astro +8 -0
- package/src/tool/gifAWebp/i18n/en.ts +123 -0
- package/src/tool/gifAWebp/i18n/es.ts +123 -0
- package/src/tool/gifAWebp/i18n/fr.ts +118 -0
- package/src/tool/gifAWebp/index.ts +29 -0
- package/src/tool/gifAWebp/seo.astro +14 -0
- package/src/tool/imagenBase64/bibliography.astro +14 -0
- package/src/tool/imagenBase64/component.astro +159 -0
- package/src/tool/imagenBase64/i18n/en.ts +137 -0
- package/src/tool/imagenBase64/i18n/es.ts +137 -0
- package/src/tool/imagenBase64/i18n/fr.ts +132 -0
- package/src/tool/imagenBase64/index.ts +43 -0
- package/src/tool/imagenBase64/seo.astro +14 -0
- package/src/tool/imagenBase64/style.css +299 -0
- package/src/tool/jpgAIco/bibliography.astro +14 -0
- package/src/tool/jpgAIco/component.astro +8 -0
- package/src/tool/jpgAIco/i18n/en.ts +123 -0
- package/src/tool/jpgAIco/i18n/es.ts +123 -0
- package/src/tool/jpgAIco/i18n/fr.ts +118 -0
- package/src/tool/jpgAIco/index.ts +29 -0
- package/src/tool/jpgAIco/seo.astro +14 -0
- package/src/tool/jpgAPng/bibliography.astro +14 -0
- package/src/tool/jpgAPng/component.astro +8 -0
- package/src/tool/jpgAPng/i18n/en.ts +128 -0
- package/src/tool/jpgAPng/i18n/es.ts +128 -0
- package/src/tool/jpgAPng/i18n/fr.ts +123 -0
- package/src/tool/jpgAPng/index.ts +29 -0
- package/src/tool/jpgAPng/seo.astro +14 -0
- package/src/tool/jpgAWebp/bibliography.astro +14 -0
- package/src/tool/jpgAWebp/component.astro +8 -0
- package/src/tool/jpgAWebp/i18n/en.ts +118 -0
- package/src/tool/jpgAWebp/i18n/es.ts +123 -0
- package/src/tool/jpgAWebp/i18n/fr.ts +118 -0
- package/src/tool/jpgAWebp/index.ts +29 -0
- package/src/tool/jpgAWebp/seo.astro +14 -0
- package/src/tool/pngAIco/bibliography.astro +14 -0
- package/src/tool/pngAIco/component.astro +8 -0
- package/src/tool/pngAIco/i18n/en.ts +123 -0
- package/src/tool/pngAIco/i18n/es.ts +123 -0
- package/src/tool/pngAIco/i18n/fr.ts +118 -0
- package/src/tool/pngAIco/index.ts +29 -0
- package/src/tool/pngAIco/seo.astro +14 -0
- package/src/tool/pngAJpg/bibliography.astro +14 -0
- package/src/tool/pngAJpg/component.astro +8 -0
- package/src/tool/pngAJpg/i18n/en.ts +133 -0
- package/src/tool/pngAJpg/i18n/es.ts +201 -0
- package/src/tool/pngAJpg/i18n/fr.ts +128 -0
- package/src/tool/pngAJpg/index.ts +29 -0
- package/src/tool/pngAJpg/seo.astro +14 -0
- package/src/tool/pngAWebp/bibliography.astro +14 -0
- package/src/tool/pngAWebp/component.astro +8 -0
- package/src/tool/pngAWebp/i18n/en.ts +127 -0
- package/src/tool/pngAWebp/i18n/es.ts +132 -0
- package/src/tool/pngAWebp/i18n/fr.ts +122 -0
- package/src/tool/pngAWebp/index.ts +29 -0
- package/src/tool/pngAWebp/seo.astro +14 -0
- package/src/tool/svgAJpg/bibliography.astro +14 -0
- package/src/tool/svgAJpg/component.astro +8 -0
- package/src/tool/svgAJpg/i18n/en.ts +118 -0
- package/src/tool/svgAJpg/i18n/es.ts +123 -0
- package/src/tool/svgAJpg/i18n/fr.ts +118 -0
- package/src/tool/svgAJpg/index.ts +29 -0
- package/src/tool/svgAJpg/seo.astro +14 -0
- package/src/tool/svgAPng/bibliography.astro +14 -0
- package/src/tool/svgAPng/component.astro +8 -0
- package/src/tool/svgAPng/i18n/en.ts +123 -0
- package/src/tool/svgAPng/i18n/es.ts +128 -0
- package/src/tool/svgAPng/i18n/fr.ts +118 -0
- package/src/tool/svgAPng/index.ts +29 -0
- package/src/tool/svgAPng/seo.astro +14 -0
- package/src/tool/webpAIco/bibliography.astro +14 -0
- package/src/tool/webpAIco/component.astro +8 -0
- package/src/tool/webpAIco/i18n/en.ts +123 -0
- package/src/tool/webpAIco/i18n/es.ts +123 -0
- package/src/tool/webpAIco/i18n/fr.ts +118 -0
- package/src/tool/webpAIco/index.ts +29 -0
- package/src/tool/webpAIco/seo.astro +14 -0
- package/src/tool/webpAJpg/bibliography.astro +14 -0
- package/src/tool/webpAJpg/component.astro +8 -0
- package/src/tool/webpAJpg/i18n/en.ts +122 -0
- package/src/tool/webpAJpg/i18n/es.ts +127 -0
- package/src/tool/webpAJpg/i18n/fr.ts +122 -0
- package/src/tool/webpAJpg/index.ts +29 -0
- package/src/tool/webpAJpg/seo.astro +14 -0
- package/src/tool/webpAPng/bibliography.astro +14 -0
- package/src/tool/webpAPng/component.astro +8 -0
- package/src/tool/webpAPng/i18n/en.ts +127 -0
- package/src/tool/webpAPng/i18n/es.ts +132 -0
- package/src/tool/webpAPng/i18n/fr.ts +122 -0
- package/src/tool/webpAPng/index.ts +29 -0
- package/src/tool/webpAPng/seo.astro +14 -0
- package/src/tools.ts +70 -0
- package/src/types.ts +69 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import type { WithContext, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import type { ImageConverterUI } from '../../../shared/ImageConverter.astro';
|
|
3
|
+
import type { WebpAPngLocaleContent } from '../index';
|
|
4
|
+
|
|
5
|
+
const slug = 'convertisseur-webp-en-png';
|
|
6
|
+
const title = 'Convertir WebP en PNG en Ligne et Gratuitement - 100% Privé';
|
|
7
|
+
const description =
|
|
8
|
+
'Convertissez des images WebP en PNG dans votre navigateur. Préserve la transparence. Sans téléchargement vers des serveurs. Gratuit et 100% privé.';
|
|
9
|
+
|
|
10
|
+
const ui: ImageConverterUI = {
|
|
11
|
+
dragText: 'Faites glisser des fichiers WebP...',
|
|
12
|
+
convertText: 'Pour les convertir en PNG instantanément',
|
|
13
|
+
selectFiles: 'Sélectionner des fichiers',
|
|
14
|
+
processedFiles: 'Fichiers traités',
|
|
15
|
+
downloadAll: 'Tout télécharger (.zip)',
|
|
16
|
+
pending: 'En attente',
|
|
17
|
+
bibliographyTitle: 'Références Bibliographiques',
|
|
18
|
+
faqTitle: 'Questions Fréquentes',
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const faq: WebpAPngLocaleContent['faq'] = [
|
|
22
|
+
{
|
|
23
|
+
question: 'Pourquoi dois-je convertir mes fichiers WebP en PNG ?',
|
|
24
|
+
answer:
|
|
25
|
+
'Bien que plus légers, les fichiers WebP peuvent causer des incompatibilités dans les programmes d\'édition comme les anciennes versions de Photoshop. Le PNG assure une compatibilité universelle à 100%.',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
question: 'Les transparences sont-elles perdues lors de la conversion de WebP en PNG ?',
|
|
29
|
+
answer:
|
|
30
|
+
'Pas du tout. Contrairement à la conversion en JPG, le PNG prend en charge le canal alpha. Notre utilitaire préservera toutes les zones transparentes du fichier original.',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
question: 'Puis-je télécharger des fichiers confidentiels de mon entreprise ?',
|
|
34
|
+
answer:
|
|
35
|
+
'Vous pouvez et devriez le faire. Comme tout s\'exécute localement via JavaScript, les images de votre entreprise ne quitteront jamais votre ordinateur ni ne seront stockées sur des serveurs externes.',
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
const howTo: WebpAPngLocaleContent['howTo'] = [
|
|
40
|
+
{
|
|
41
|
+
name: 'Faites glisser vos WebP',
|
|
42
|
+
text: 'Déplacez et déposez vos fichiers WebP sur le panneau principal ou sélectionnez les images traditionnellement.',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'Conversion haute fidélité',
|
|
46
|
+
text: 'Votre navigateur redessinera l\'image pixel par pixel et générera une copie exacte en format PNG, en maintenant la gamme de couleurs originale.',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'Téléchargement individuel ou en masse',
|
|
50
|
+
text: 'Sauvegardez chaque fichier individuellement ou, si vous avez traité un lot, cliquez sur le bouton ZIP pour les télécharger tous ensemble.',
|
|
51
|
+
},
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
const bibliography: WebpAPngLocaleContent['bibliography'] = [
|
|
55
|
+
{
|
|
56
|
+
name: 'Documentation WebP API et bibliothèque',
|
|
57
|
+
url: 'https://developers.google.com/speed/webp/docs/api',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'Spécification HTML Canvas 2D Context',
|
|
61
|
+
url: 'https://html.spec.whatwg.org/multipage/canvas.html',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'Can I use: format d\'image WebP',
|
|
65
|
+
url: 'https://caniuse.com/webp',
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
|
|
69
|
+
const seo: WebpAPngLocaleContent['seo'] = [
|
|
70
|
+
{
|
|
71
|
+
type: 'title',
|
|
72
|
+
text: 'Convertisseur WebP vers PNG en Ligne Gratuit',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
type: 'paragraph',
|
|
76
|
+
html:
|
|
77
|
+
'WebP a été développé par Google comme alternative moderne au PNG et JPG, offrant une compression supérieure avec ou sans perte de qualité. Cependant, son adoption dans les outils d\'édition professionnels peut être limitée, rendant nécessaire la conversion WebP vers PNG pour garantir une compatibilité universelle.',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
type: 'paragraph',
|
|
81
|
+
html:
|
|
82
|
+
'Un avantage clé de la conversion WebP vers PNG est la préservation du canal alpha. Contrairement à la conversion en JPG où les fonds transparents sont remplis de blanc, le PNG maintient intégralement toutes les zones transparentes présentes dans le fichier WebP original.',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
type: 'tip',
|
|
86
|
+
html:
|
|
87
|
+
'Si votre fichier WebP a de la transparence et que vous devez l\'éditer dans Photoshop, convertissez toujours en PNG plutôt qu\'en JPG pour conserver le canal alpha.',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
type: 'paragraph',
|
|
91
|
+
html:
|
|
92
|
+
'Le format WebP peut réduire la taille des fichiers PNG jusqu\'à 26% et les fichiers JPG jusqu\'à 34%, selon la documentation officielle de Google.',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
type: 'paragraph',
|
|
96
|
+
html:
|
|
97
|
+
'Convertissez WebP en PNG avec une confidentialité et une qualité totales, en préservant les transparences. Gratuit, sans limites et traité localement dans votre navigateur.',
|
|
98
|
+
},
|
|
99
|
+
];
|
|
100
|
+
|
|
101
|
+
const appSchema: WithContext<SoftwareApplication> = {
|
|
102
|
+
'@context': 'https://schema.org',
|
|
103
|
+
'@type': 'SoftwareApplication',
|
|
104
|
+
name: title,
|
|
105
|
+
description,
|
|
106
|
+
applicationCategory: 'UtilitiesApplication',
|
|
107
|
+
operatingSystem: 'Web',
|
|
108
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
|
|
109
|
+
inLanguage: 'fr',
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export const content: WebpAPngLocaleContent = {
|
|
113
|
+
slug,
|
|
114
|
+
title,
|
|
115
|
+
description,
|
|
116
|
+
ui,
|
|
117
|
+
seo,
|
|
118
|
+
faq,
|
|
119
|
+
bibliography,
|
|
120
|
+
howTo,
|
|
121
|
+
schemas: [appSchema as any],
|
|
122
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ConvertersToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
|
|
2
|
+
import type { ImageConverterUI } from '../../shared/ImageConverter.astro';
|
|
3
|
+
import WebpAPngCalculator from './component.astro';
|
|
4
|
+
import WebpAPngSEO from './seo.astro';
|
|
5
|
+
import WebpAPngBibliography from './bibliography.astro';
|
|
6
|
+
|
|
7
|
+
export type WebpAPngLocaleContent = ToolLocaleContent<ImageConverterUI>;
|
|
8
|
+
|
|
9
|
+
export const webpAPng: ConvertersToolEntry<ImageConverterUI> = {
|
|
10
|
+
id: 'webp-a-png',
|
|
11
|
+
icons: {
|
|
12
|
+
bg: 'mdi:file-image',
|
|
13
|
+
fg: 'mdi:file-export',
|
|
14
|
+
},
|
|
15
|
+
i18n: {
|
|
16
|
+
es: () => import('./i18n/es').then((m) => m.content),
|
|
17
|
+
en: () => import('./i18n/en').then((m) => m.content),
|
|
18
|
+
fr: () => import('./i18n/fr').then((m) => m.content),
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { WebpAPngCalculator, WebpAPngSEO, WebpAPngBibliography };
|
|
23
|
+
|
|
24
|
+
export const WEBP_A_PNG_TOOL: ToolDefinition = {
|
|
25
|
+
entry: webpAPng,
|
|
26
|
+
Component: WebpAPngCalculator,
|
|
27
|
+
SEOComponent: WebpAPngSEO,
|
|
28
|
+
BibliographyComponent: WebpAPngBibliography,
|
|
29
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { SEORenderer } from '@jjlmoya/utils-shared';
|
|
3
|
+
import { webpAPng } from './index';
|
|
4
|
+
import type { KnownLocale } from '../../types';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
locale?: KnownLocale;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { locale = 'es' } = Astro.props;
|
|
11
|
+
const content = await webpAPng.i18n[locale]?.();
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
{content && <SEORenderer content={{ locale, sections: content.seo }} />}
|
package/src/tools.ts
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { PNG_A_JPG_TOOL } from './tool/pngAJpg';
|
|
2
|
+
import { JPG_A_PNG_TOOL } from './tool/jpgAPng';
|
|
3
|
+
import { WEBP_A_PNG_TOOL } from './tool/webpAPng';
|
|
4
|
+
import { WEBP_A_JPG_TOOL } from './tool/webpAJpg';
|
|
5
|
+
import { PNG_A_WEBP_TOOL } from './tool/pngAWebp';
|
|
6
|
+
import { JPG_A_WEBP_TOOL } from './tool/jpgAWebp';
|
|
7
|
+
import { SVG_A_PNG_TOOL } from './tool/svgAPng';
|
|
8
|
+
import { SVG_A_JPG_TOOL } from './tool/svgAJpg';
|
|
9
|
+
import { IMAGEN_BASE64_TOOL } from './tool/imagenBase64';
|
|
10
|
+
import { BMP_A_JPG_TOOL } from './tool/bmpAJpg';
|
|
11
|
+
import { BMP_A_PNG_TOOL } from './tool/bmpAPng';
|
|
12
|
+
import { BMP_A_WEBP_TOOL } from './tool/bmpAWebp';
|
|
13
|
+
import { AVIF_A_JPG_TOOL } from './tool/avifAJpg';
|
|
14
|
+
import { AVIF_A_PNG_TOOL } from './tool/avifAPng';
|
|
15
|
+
import { AVIF_A_WEBP_TOOL } from './tool/avifAWebp';
|
|
16
|
+
import { GIF_A_JPG_TOOL } from './tool/gifAJpg';
|
|
17
|
+
import { GIF_A_PNG_TOOL } from './tool/gifAPng';
|
|
18
|
+
import { GIF_A_WEBP_TOOL } from './tool/gifAWebp';
|
|
19
|
+
import { PNG_A_ICO_TOOL } from './tool/pngAIco';
|
|
20
|
+
import { JPG_A_ICO_TOOL } from './tool/jpgAIco';
|
|
21
|
+
import { WEBP_A_ICO_TOOL } from './tool/webpAIco';
|
|
22
|
+
import type { ToolDefinition } from './types';
|
|
23
|
+
|
|
24
|
+
export const ALL_TOOLS: ToolDefinition[] = [
|
|
25
|
+
PNG_A_JPG_TOOL,
|
|
26
|
+
JPG_A_PNG_TOOL,
|
|
27
|
+
WEBP_A_PNG_TOOL,
|
|
28
|
+
WEBP_A_JPG_TOOL,
|
|
29
|
+
PNG_A_WEBP_TOOL,
|
|
30
|
+
JPG_A_WEBP_TOOL,
|
|
31
|
+
SVG_A_PNG_TOOL,
|
|
32
|
+
SVG_A_JPG_TOOL,
|
|
33
|
+
IMAGEN_BASE64_TOOL,
|
|
34
|
+
BMP_A_JPG_TOOL,
|
|
35
|
+
BMP_A_PNG_TOOL,
|
|
36
|
+
BMP_A_WEBP_TOOL,
|
|
37
|
+
AVIF_A_JPG_TOOL,
|
|
38
|
+
AVIF_A_PNG_TOOL,
|
|
39
|
+
AVIF_A_WEBP_TOOL,
|
|
40
|
+
GIF_A_JPG_TOOL,
|
|
41
|
+
GIF_A_PNG_TOOL,
|
|
42
|
+
GIF_A_WEBP_TOOL,
|
|
43
|
+
PNG_A_ICO_TOOL,
|
|
44
|
+
JPG_A_ICO_TOOL,
|
|
45
|
+
WEBP_A_ICO_TOOL,
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
export {
|
|
49
|
+
PNG_A_JPG_TOOL,
|
|
50
|
+
JPG_A_PNG_TOOL,
|
|
51
|
+
WEBP_A_PNG_TOOL,
|
|
52
|
+
WEBP_A_JPG_TOOL,
|
|
53
|
+
PNG_A_WEBP_TOOL,
|
|
54
|
+
JPG_A_WEBP_TOOL,
|
|
55
|
+
SVG_A_PNG_TOOL,
|
|
56
|
+
SVG_A_JPG_TOOL,
|
|
57
|
+
IMAGEN_BASE64_TOOL,
|
|
58
|
+
BMP_A_JPG_TOOL,
|
|
59
|
+
BMP_A_PNG_TOOL,
|
|
60
|
+
BMP_A_WEBP_TOOL,
|
|
61
|
+
AVIF_A_JPG_TOOL,
|
|
62
|
+
AVIF_A_PNG_TOOL,
|
|
63
|
+
AVIF_A_WEBP_TOOL,
|
|
64
|
+
GIF_A_JPG_TOOL,
|
|
65
|
+
GIF_A_PNG_TOOL,
|
|
66
|
+
GIF_A_WEBP_TOOL,
|
|
67
|
+
PNG_A_ICO_TOOL,
|
|
68
|
+
JPG_A_ICO_TOOL,
|
|
69
|
+
WEBP_A_ICO_TOOL,
|
|
70
|
+
};
|
package/src/types.ts
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { SEOSection } from '@jjlmoya/utils-shared';
|
|
2
|
+
import type { WithContext, Thing } from 'schema-dts';
|
|
3
|
+
|
|
4
|
+
export type { SEOSection };
|
|
5
|
+
|
|
6
|
+
export type KnownLocale =
|
|
7
|
+
| 'ar' | 'da' | 'de' | 'en' | 'es' | 'fi'
|
|
8
|
+
| 'fr' | 'it' | 'ja' | 'ko' | 'nb' | 'nl'
|
|
9
|
+
| 'pl' | 'pt' | 'ru' | 'sv' | 'tr' | 'zh';
|
|
10
|
+
|
|
11
|
+
export interface FAQItem {
|
|
12
|
+
question: string;
|
|
13
|
+
answer: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface BibliographyEntry {
|
|
17
|
+
name: string;
|
|
18
|
+
url: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface HowToStep {
|
|
22
|
+
name: string;
|
|
23
|
+
text: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface ToolLocaleContent<TUI extends Record<string, string> = Record<string, string>> {
|
|
27
|
+
slug: string;
|
|
28
|
+
title: string;
|
|
29
|
+
description: string;
|
|
30
|
+
ui: TUI;
|
|
31
|
+
seo: SEOSection[];
|
|
32
|
+
faq: FAQItem[];
|
|
33
|
+
bibliography: BibliographyEntry[];
|
|
34
|
+
howTo: HowToStep[];
|
|
35
|
+
schemas: WithContext<Thing>[];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface CategoryLocaleContent {
|
|
39
|
+
slug: string;
|
|
40
|
+
title: string;
|
|
41
|
+
description: string;
|
|
42
|
+
seo: SEOSection[];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export type LocaleLoader<T> = () => Promise<T>;
|
|
46
|
+
|
|
47
|
+
export type LocaleMap<T> = Partial<Record<KnownLocale, LocaleLoader<T>>>;
|
|
48
|
+
|
|
49
|
+
export interface ConvertersToolEntry<TUI extends Record<string, string> = Record<string, string>> {
|
|
50
|
+
id: string;
|
|
51
|
+
icons: {
|
|
52
|
+
bg: string;
|
|
53
|
+
fg: string;
|
|
54
|
+
};
|
|
55
|
+
i18n: LocaleMap<ToolLocaleContent<TUI>>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface ConvertersCategoryEntry {
|
|
59
|
+
icon: string;
|
|
60
|
+
tools: ConvertersToolEntry[];
|
|
61
|
+
i18n: LocaleMap<CategoryLocaleContent>;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface ToolDefinition {
|
|
65
|
+
entry: ConvertersToolEntry;
|
|
66
|
+
Component: unknown;
|
|
67
|
+
SEOComponent: unknown;
|
|
68
|
+
BibliographyComponent: unknown;
|
|
69
|
+
}
|