@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.
Files changed (172) hide show
  1. package/package.json +61 -0
  2. package/src/category/i18n/en.ts +90 -0
  3. package/src/category/i18n/es.ts +90 -0
  4. package/src/category/i18n/fr.ts +90 -0
  5. package/src/category/index.ts +39 -0
  6. package/src/category/seo.astro +15 -0
  7. package/src/components/PreviewNavSidebar.astro +116 -0
  8. package/src/components/PreviewToolbar.astro +152 -0
  9. package/src/data.ts +34 -0
  10. package/src/env.d.ts +5 -0
  11. package/src/index.ts +39 -0
  12. package/src/layouts/PreviewLayout.astro +117 -0
  13. package/src/pages/[locale]/[slug].astro +148 -0
  14. package/src/pages/[locale].astro +271 -0
  15. package/src/pages/index.astro +4 -0
  16. package/src/shared/ImageConverter.astro +237 -0
  17. package/src/shared/logic/converter.ts +167 -0
  18. package/src/shared/style.css +258 -0
  19. package/src/tests/faq_count.test.ts +10 -0
  20. package/src/tests/mocks/astro_mock.js +2 -0
  21. package/src/tests/seo_length.test.ts +22 -0
  22. package/src/tests/tool_validation.test.ts +17 -0
  23. package/src/tool/avifAJpg/bibliography.astro +14 -0
  24. package/src/tool/avifAJpg/component.astro +8 -0
  25. package/src/tool/avifAJpg/i18n/en.ts +123 -0
  26. package/src/tool/avifAJpg/i18n/es.ts +123 -0
  27. package/src/tool/avifAJpg/i18n/fr.ts +118 -0
  28. package/src/tool/avifAJpg/index.ts +29 -0
  29. package/src/tool/avifAJpg/seo.astro +14 -0
  30. package/src/tool/avifAPng/bibliography.astro +14 -0
  31. package/src/tool/avifAPng/component.astro +8 -0
  32. package/src/tool/avifAPng/i18n/en.ts +118 -0
  33. package/src/tool/avifAPng/i18n/es.ts +123 -0
  34. package/src/tool/avifAPng/i18n/fr.ts +118 -0
  35. package/src/tool/avifAPng/index.ts +29 -0
  36. package/src/tool/avifAPng/seo.astro +14 -0
  37. package/src/tool/avifAWebp/bibliography.astro +14 -0
  38. package/src/tool/avifAWebp/component.astro +8 -0
  39. package/src/tool/avifAWebp/i18n/en.ts +118 -0
  40. package/src/tool/avifAWebp/i18n/es.ts +123 -0
  41. package/src/tool/avifAWebp/i18n/fr.ts +118 -0
  42. package/src/tool/avifAWebp/index.ts +29 -0
  43. package/src/tool/avifAWebp/seo.astro +14 -0
  44. package/src/tool/bmpAJpg/bibliography.astro +14 -0
  45. package/src/tool/bmpAJpg/component.astro +8 -0
  46. package/src/tool/bmpAJpg/i18n/en.ts +123 -0
  47. package/src/tool/bmpAJpg/i18n/es.ts +123 -0
  48. package/src/tool/bmpAJpg/i18n/fr.ts +118 -0
  49. package/src/tool/bmpAJpg/index.ts +29 -0
  50. package/src/tool/bmpAJpg/seo.astro +14 -0
  51. package/src/tool/bmpAPng/bibliography.astro +14 -0
  52. package/src/tool/bmpAPng/component.astro +8 -0
  53. package/src/tool/bmpAPng/i18n/en.ts +123 -0
  54. package/src/tool/bmpAPng/i18n/es.ts +123 -0
  55. package/src/tool/bmpAPng/i18n/fr.ts +118 -0
  56. package/src/tool/bmpAPng/index.ts +29 -0
  57. package/src/tool/bmpAPng/seo.astro +14 -0
  58. package/src/tool/bmpAWebp/bibliography.astro +14 -0
  59. package/src/tool/bmpAWebp/component.astro +8 -0
  60. package/src/tool/bmpAWebp/i18n/en.ts +118 -0
  61. package/src/tool/bmpAWebp/i18n/es.ts +123 -0
  62. package/src/tool/bmpAWebp/i18n/fr.ts +118 -0
  63. package/src/tool/bmpAWebp/index.ts +29 -0
  64. package/src/tool/bmpAWebp/seo.astro +14 -0
  65. package/src/tool/gifAJpg/bibliography.astro +14 -0
  66. package/src/tool/gifAJpg/component.astro +8 -0
  67. package/src/tool/gifAJpg/i18n/en.ts +123 -0
  68. package/src/tool/gifAJpg/i18n/es.ts +123 -0
  69. package/src/tool/gifAJpg/i18n/fr.ts +118 -0
  70. package/src/tool/gifAJpg/index.ts +29 -0
  71. package/src/tool/gifAJpg/seo.astro +14 -0
  72. package/src/tool/gifAPng/bibliography.astro +14 -0
  73. package/src/tool/gifAPng/component.astro +8 -0
  74. package/src/tool/gifAPng/i18n/en.ts +123 -0
  75. package/src/tool/gifAPng/i18n/es.ts +123 -0
  76. package/src/tool/gifAPng/i18n/fr.ts +118 -0
  77. package/src/tool/gifAPng/index.ts +29 -0
  78. package/src/tool/gifAPng/seo.astro +14 -0
  79. package/src/tool/gifAWebp/bibliography.astro +14 -0
  80. package/src/tool/gifAWebp/component.astro +8 -0
  81. package/src/tool/gifAWebp/i18n/en.ts +123 -0
  82. package/src/tool/gifAWebp/i18n/es.ts +123 -0
  83. package/src/tool/gifAWebp/i18n/fr.ts +118 -0
  84. package/src/tool/gifAWebp/index.ts +29 -0
  85. package/src/tool/gifAWebp/seo.astro +14 -0
  86. package/src/tool/imagenBase64/bibliography.astro +14 -0
  87. package/src/tool/imagenBase64/component.astro +159 -0
  88. package/src/tool/imagenBase64/i18n/en.ts +137 -0
  89. package/src/tool/imagenBase64/i18n/es.ts +137 -0
  90. package/src/tool/imagenBase64/i18n/fr.ts +132 -0
  91. package/src/tool/imagenBase64/index.ts +43 -0
  92. package/src/tool/imagenBase64/seo.astro +14 -0
  93. package/src/tool/imagenBase64/style.css +299 -0
  94. package/src/tool/jpgAIco/bibliography.astro +14 -0
  95. package/src/tool/jpgAIco/component.astro +8 -0
  96. package/src/tool/jpgAIco/i18n/en.ts +123 -0
  97. package/src/tool/jpgAIco/i18n/es.ts +123 -0
  98. package/src/tool/jpgAIco/i18n/fr.ts +118 -0
  99. package/src/tool/jpgAIco/index.ts +29 -0
  100. package/src/tool/jpgAIco/seo.astro +14 -0
  101. package/src/tool/jpgAPng/bibliography.astro +14 -0
  102. package/src/tool/jpgAPng/component.astro +8 -0
  103. package/src/tool/jpgAPng/i18n/en.ts +128 -0
  104. package/src/tool/jpgAPng/i18n/es.ts +128 -0
  105. package/src/tool/jpgAPng/i18n/fr.ts +123 -0
  106. package/src/tool/jpgAPng/index.ts +29 -0
  107. package/src/tool/jpgAPng/seo.astro +14 -0
  108. package/src/tool/jpgAWebp/bibliography.astro +14 -0
  109. package/src/tool/jpgAWebp/component.astro +8 -0
  110. package/src/tool/jpgAWebp/i18n/en.ts +118 -0
  111. package/src/tool/jpgAWebp/i18n/es.ts +123 -0
  112. package/src/tool/jpgAWebp/i18n/fr.ts +118 -0
  113. package/src/tool/jpgAWebp/index.ts +29 -0
  114. package/src/tool/jpgAWebp/seo.astro +14 -0
  115. package/src/tool/pngAIco/bibliography.astro +14 -0
  116. package/src/tool/pngAIco/component.astro +8 -0
  117. package/src/tool/pngAIco/i18n/en.ts +123 -0
  118. package/src/tool/pngAIco/i18n/es.ts +123 -0
  119. package/src/tool/pngAIco/i18n/fr.ts +118 -0
  120. package/src/tool/pngAIco/index.ts +29 -0
  121. package/src/tool/pngAIco/seo.astro +14 -0
  122. package/src/tool/pngAJpg/bibliography.astro +14 -0
  123. package/src/tool/pngAJpg/component.astro +8 -0
  124. package/src/tool/pngAJpg/i18n/en.ts +133 -0
  125. package/src/tool/pngAJpg/i18n/es.ts +201 -0
  126. package/src/tool/pngAJpg/i18n/fr.ts +128 -0
  127. package/src/tool/pngAJpg/index.ts +29 -0
  128. package/src/tool/pngAJpg/seo.astro +14 -0
  129. package/src/tool/pngAWebp/bibliography.astro +14 -0
  130. package/src/tool/pngAWebp/component.astro +8 -0
  131. package/src/tool/pngAWebp/i18n/en.ts +127 -0
  132. package/src/tool/pngAWebp/i18n/es.ts +132 -0
  133. package/src/tool/pngAWebp/i18n/fr.ts +122 -0
  134. package/src/tool/pngAWebp/index.ts +29 -0
  135. package/src/tool/pngAWebp/seo.astro +14 -0
  136. package/src/tool/svgAJpg/bibliography.astro +14 -0
  137. package/src/tool/svgAJpg/component.astro +8 -0
  138. package/src/tool/svgAJpg/i18n/en.ts +118 -0
  139. package/src/tool/svgAJpg/i18n/es.ts +123 -0
  140. package/src/tool/svgAJpg/i18n/fr.ts +118 -0
  141. package/src/tool/svgAJpg/index.ts +29 -0
  142. package/src/tool/svgAJpg/seo.astro +14 -0
  143. package/src/tool/svgAPng/bibliography.astro +14 -0
  144. package/src/tool/svgAPng/component.astro +8 -0
  145. package/src/tool/svgAPng/i18n/en.ts +123 -0
  146. package/src/tool/svgAPng/i18n/es.ts +128 -0
  147. package/src/tool/svgAPng/i18n/fr.ts +118 -0
  148. package/src/tool/svgAPng/index.ts +29 -0
  149. package/src/tool/svgAPng/seo.astro +14 -0
  150. package/src/tool/webpAIco/bibliography.astro +14 -0
  151. package/src/tool/webpAIco/component.astro +8 -0
  152. package/src/tool/webpAIco/i18n/en.ts +123 -0
  153. package/src/tool/webpAIco/i18n/es.ts +123 -0
  154. package/src/tool/webpAIco/i18n/fr.ts +118 -0
  155. package/src/tool/webpAIco/index.ts +29 -0
  156. package/src/tool/webpAIco/seo.astro +14 -0
  157. package/src/tool/webpAJpg/bibliography.astro +14 -0
  158. package/src/tool/webpAJpg/component.astro +8 -0
  159. package/src/tool/webpAJpg/i18n/en.ts +122 -0
  160. package/src/tool/webpAJpg/i18n/es.ts +127 -0
  161. package/src/tool/webpAJpg/i18n/fr.ts +122 -0
  162. package/src/tool/webpAJpg/index.ts +29 -0
  163. package/src/tool/webpAJpg/seo.astro +14 -0
  164. package/src/tool/webpAPng/bibliography.astro +14 -0
  165. package/src/tool/webpAPng/component.astro +8 -0
  166. package/src/tool/webpAPng/i18n/en.ts +127 -0
  167. package/src/tool/webpAPng/i18n/es.ts +132 -0
  168. package/src/tool/webpAPng/i18n/fr.ts +122 -0
  169. package/src/tool/webpAPng/index.ts +29 -0
  170. package/src/tool/webpAPng/seo.astro +14 -0
  171. package/src/tools.ts +70 -0
  172. package/src/types.ts +69 -0
@@ -0,0 +1,127 @@
1
+ import type { WithContext, SoftwareApplication } from 'schema-dts';
2
+ import type { ImageConverterUI } from '../../../shared/ImageConverter.astro';
3
+ import type { PngAWebpLocaleContent } from '../index';
4
+
5
+ const slug = 'png-to-webp-converter';
6
+ const title = 'Convert PNG to WebP Online and Free - High Quality';
7
+ const description =
8
+ 'Convert PNG images to WebP in your browser. Up to 40% less file size. Preserves transparency. No file uploads. Free and private.';
9
+
10
+ const ui: ImageConverterUI = {
11
+ dragText: 'Drag PNG files...',
12
+ convertText: 'To convert them to WebP instantly',
13
+ selectFiles: 'Select files',
14
+ processedFiles: 'Processed files',
15
+ downloadAll: 'Download All (.zip)',
16
+ pending: 'Pending',
17
+ bibliographyTitle: 'Bibliographic References',
18
+ faqTitle: 'Frequently Asked Questions',
19
+ };
20
+
21
+ const faq: PngAWebpLocaleContent['faq'] = [
22
+ {
23
+ question: 'Why convert PNG to WebP?',
24
+ answer:
25
+ 'WebP offers up to 40% better compression than PNG at the same quality, while also supporting Alpha transparency. It is the format recommended by Google PageSpeed Insights.',
26
+ },
27
+ {
28
+ question: 'Is transparency lost in the process?',
29
+ answer:
30
+ 'No. The technical implementation of WebP supports the alpha channel. The transparencies of the original PNG will be preserved in the new WebP file.',
31
+ },
32
+ {
33
+ question: 'Do my images go to any server?',
34
+ answer:
35
+ 'No. The code runs exclusively in your browser (Client-Side). We never see, record or save the images you convert.',
36
+ },
37
+ ];
38
+
39
+ const howTo: PngAWebpLocaleContent['howTo'] = [
40
+ {
41
+ name: 'Insert your PNGs',
42
+ text: 'Drop your large PNG files into the upload area or use the traditional interactive selector.',
43
+ },
44
+ {
45
+ name: 'Channel detection',
46
+ text: 'The local rendering engine will detect and export the pixel composition to the optimized WebP format.',
47
+ },
48
+ {
49
+ name: 'Direct Download',
50
+ text: 'Download your highly compressed WebP files individually or bundle them together using the ZIP package converter.',
51
+ },
52
+ ];
53
+
54
+ const bibliography: PngAWebpLocaleContent['bibliography'] = [
55
+ {
56
+ name: 'Google: WebP Implementation Details',
57
+ url: 'https://developers.google.com/speed/webp/',
58
+ },
59
+ {
60
+ name: 'W3C: Core Web Vitals Guidance',
61
+ url: 'https://web.dev/vitals/',
62
+ },
63
+ {
64
+ name: 'Mozilla Docs: Image Formats',
65
+ url: 'https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types',
66
+ },
67
+ ];
68
+
69
+ const seo: PngAWebpLocaleContent['seo'] = [
70
+ {
71
+ type: 'title',
72
+ text: 'Free Online PNG to WebP Converter',
73
+ },
74
+ {
75
+ type: 'paragraph',
76
+ html:
77
+ 'WebP has become Google\'s recommended standard for web images. When your page uses WebP images instead of PNG, Google PageSpeed Insights recognizes it as a positive optimization that can significantly improve your performance score and page load time.',
78
+ },
79
+ {
80
+ type: 'paragraph',
81
+ html:
82
+ 'A key technical feature of WebP is that it supports both lossy and lossless compression, and also supports the alpha channel for transparency. This means you can convert PNG to WebP without losing the transparent areas of your image, getting a significantly lighter file with the same visual quality.',
83
+ },
84
+ {
85
+ type: 'tip',
86
+ html:
87
+ 'Before uploading images to your website or blog, convert all your PNGs to WebP to improve load times and user experience, especially on slow mobile connections.',
88
+ },
89
+ {
90
+ type: 'paragraph',
91
+ html:
92
+ 'According to Google, lossless WebP images are 26% smaller than equivalent PNGs. Lossy WebP images are 25-34% smaller than comparable JPGs at the same visual quality.',
93
+ },
94
+ {
95
+ type: 'paragraph',
96
+ html:
97
+ 'The tool is completely free, with no file limits or registrations. All conversion happens locally, ensuring your original images remain private and secure on your device.',
98
+ },
99
+ {
100
+ type: 'paragraph',
101
+ html:
102
+ 'Convert PNG to WebP for free, with transparency support and without sending images to servers. Reduce image weight by up to 40% and improve web performance.',
103
+ },
104
+ ];
105
+
106
+ const appSchema: WithContext<SoftwareApplication> = {
107
+ '@context': 'https://schema.org',
108
+ '@type': 'SoftwareApplication',
109
+ name: title,
110
+ description,
111
+ applicationCategory: 'UtilitiesApplication',
112
+ operatingSystem: 'Web',
113
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
114
+ inLanguage: 'en',
115
+ };
116
+
117
+ export const content: PngAWebpLocaleContent = {
118
+ slug,
119
+ title,
120
+ description,
121
+ ui,
122
+ seo,
123
+ faq,
124
+ bibliography,
125
+ howTo,
126
+ schemas: [appSchema as any],
127
+ };
@@ -0,0 +1,132 @@
1
+ import type { WithContext, SoftwareApplication } from 'schema-dts';
2
+ import type { ImageConverterUI } from '../../../shared/ImageConverter.astro';
3
+ import type { PngAWebpLocaleContent } from '../index';
4
+
5
+ const slug = 'convertidor-png-a-webp';
6
+ const title = 'Convertir PNG a WebP Online y Gratis - Alta Calidad';
7
+ const description =
8
+ 'Convierte imágenes PNG a WebP en tu navegador. Hasta 40% menos peso. Conserva transparencias. Sin subir archivos. Gratis y privado.';
9
+
10
+ const ui: ImageConverterUI = {
11
+ dragText: 'Arrastra archivos PNG...',
12
+ convertText: 'Para convertirlos a WebP al instante',
13
+ selectFiles: 'Seleccionar archivos',
14
+ processedFiles: 'Archivos procesados',
15
+ downloadAll: 'Descargar Todo (.zip)',
16
+ pending: 'Pendiente',
17
+ bibliographyTitle: 'Referencias Bibliográficas',
18
+ faqTitle: 'Preguntas Frecuentes',
19
+ };
20
+
21
+ const faq: PngAWebpLocaleContent['faq'] = [
22
+ {
23
+ question: '¿Por qué convertir PNG a WebP?',
24
+ answer:
25
+ 'WebP ofrece una compresión hasta un 40% superior a PNG a igual calidad, soportando también transparencias Alpha. Es el formato recomendado por Google PageSpeed Insights.',
26
+ },
27
+ {
28
+ question: '¿Se pierde la transparencia en el proceso?',
29
+ answer:
30
+ 'No. La implementación técnica de WebP soporta el canal alfa. Las transparencias del PNG original se conservarán en el nuevo archivo WebP.',
31
+ },
32
+ {
33
+ question: '¿Mis imágenes van a algún servidor?',
34
+ answer:
35
+ 'No. El código se ejecuta únicamente en tu navegador (Client-Side). Nunca vemos, registramos ni guardamos las imágenes que conviertes.',
36
+ },
37
+ ];
38
+
39
+ const howTo: PngAWebpLocaleContent['howTo'] = [
40
+ {
41
+ name: 'Inserta tus PNG',
42
+ text: 'Arroja tus pesados archivos PNG al área de carga o utiliza el selector tradicional interactivo.',
43
+ },
44
+ {
45
+ name: 'Detección de canales',
46
+ text: 'El motor de renderizado local detectará y exportará la composición de píxeles al formato WebP optimizado.',
47
+ },
48
+ {
49
+ name: 'Descarga Directa',
50
+ text: 'Descarga individualmente tus WebP hiper-comprimidos o llévalos juntos usando el conversor a paquete ZIP.',
51
+ },
52
+ ];
53
+
54
+ const bibliography: PngAWebpLocaleContent['bibliography'] = [
55
+ {
56
+ name: 'Google: WebP Implementation Details',
57
+ url: 'https://developers.google.com/speed/webp/',
58
+ },
59
+ {
60
+ name: 'W3C: Core Web Vitals Guidance',
61
+ url: 'https://web.dev/vitals/',
62
+ },
63
+ {
64
+ name: 'Mozilla Docs: Image Formats',
65
+ url: 'https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types',
66
+ },
67
+ ];
68
+
69
+ const seo: PngAWebpLocaleContent['seo'] = [
70
+ {
71
+ type: 'title',
72
+ text: 'Convertidor PNG a WebP Online Gratuito',
73
+ },
74
+ {
75
+ type: 'paragraph',
76
+ html:
77
+ 'El formato WebP se ha convertido en el estándar recomendado por Google para imágenes web. Cuando tu página usa imágenes WebP en lugar de PNG, Google PageSpeed Insights lo reconoce como una optimización positiva que puede mejorar significativamente la puntuación de rendimiento y el tiempo de carga de la página.',
78
+ },
79
+ {
80
+ type: 'paragraph',
81
+ html:
82
+ 'Una característica técnica clave de WebP es que soporta tanto compresión con pérdida como sin pérdida, además de admitir el canal alfa para transparencias. Esto significa que puedes convertir PNG a WebP sin perder las áreas transparentes de tu imagen, obteniendo un archivo significativamente más ligero con la misma calidad visual y sin comprometer las transparencias.',
83
+ },
84
+ {
85
+ type: 'paragraph',
86
+ html:
87
+ 'Nuestro convertidor procesa todo en el lado del cliente. La imagen PNG se carga en el Canvas API de HTML5, se renderiza y se exporta como WebP mediante el método toDataURL del canvas con el tipo MIME correspondiente. No hay transferencia de datos a ningún servidor externo.',
88
+ },
89
+ {
90
+ type: 'tip',
91
+ html:
92
+ 'Antes de subir imágenes a tu sitio web o blog, convierte todos tus PNG a WebP para mejorar los tiempos de carga y la experiencia del usuario, especialmente en conexiones móviles lentas.',
93
+ },
94
+ {
95
+ type: 'paragraph',
96
+ html:
97
+ 'Según Google, las imágenes WebP sin pérdida son un 26% más pequeñas que los PNG equivalentes. Las imágenes WebP con pérdida son un 25-34% más pequeñas que los JPG comparables a la misma calidad visual.',
98
+ },
99
+ {
100
+ type: 'paragraph',
101
+ html:
102
+ 'La herramienta es completamente gratuita, sin límites de archivos ni registros. Toda la conversión ocurre localmente, garantizando que tus imágenes originales permanezcan privadas y seguras en tu dispositivo.',
103
+ },
104
+ {
105
+ type: 'paragraph',
106
+ html:
107
+ 'Convierte PNG a WebP gratuitamente, con soporte para transparencias y sin enviar imágenes a servidores. Reduce el peso de tus imágenes hasta un 40% y mejora el rendimiento web.',
108
+ },
109
+ ];
110
+
111
+ const appSchema: WithContext<SoftwareApplication> = {
112
+ '@context': 'https://schema.org',
113
+ '@type': 'SoftwareApplication',
114
+ name: title,
115
+ description,
116
+ applicationCategory: 'UtilitiesApplication',
117
+ operatingSystem: 'Web',
118
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
119
+ inLanguage: 'es',
120
+ };
121
+
122
+ export const content: PngAWebpLocaleContent = {
123
+ slug,
124
+ title,
125
+ description,
126
+ ui,
127
+ seo,
128
+ faq,
129
+ bibliography,
130
+ howTo,
131
+ schemas: [appSchema as any],
132
+ };
@@ -0,0 +1,122 @@
1
+ import type { WithContext, SoftwareApplication } from 'schema-dts';
2
+ import type { ImageConverterUI } from '../../../shared/ImageConverter.astro';
3
+ import type { PngAWebpLocaleContent } from '../index';
4
+
5
+ const slug = 'convertisseur-png-en-webp';
6
+ const title = 'Convertir PNG en WebP en Ligne et Gratuitement - Haute Qualité';
7
+ const description =
8
+ 'Convertissez des images PNG en WebP dans votre navigateur. Jusqu\'à 40% de taille en moins. Préserve la transparence. Sans téléchargement. Gratuit et privé.';
9
+
10
+ const ui: ImageConverterUI = {
11
+ dragText: 'Faites glisser des fichiers PNG...',
12
+ convertText: 'Pour les convertir en WebP 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: PngAWebpLocaleContent['faq'] = [
22
+ {
23
+ question: 'Pourquoi convertir PNG en WebP ?',
24
+ answer:
25
+ 'WebP offre une compression jusqu\'à 40% supérieure au PNG à qualité égale, tout en supportant également la transparence Alpha. C\'est le format recommandé par Google PageSpeed Insights.',
26
+ },
27
+ {
28
+ question: 'La transparence est-elle perdue dans le processus ?',
29
+ answer:
30
+ 'Non. L\'implémentation technique de WebP supporte le canal alpha. Les transparences du PNG original seront préservées dans le nouveau fichier WebP.',
31
+ },
32
+ {
33
+ question: 'Mes images vont-elles sur un serveur ?',
34
+ answer:
35
+ 'Non. Le code s\'exécute uniquement dans votre navigateur (côté client). Nous ne voyons, n\'enregistrons ni ne sauvegardons jamais les images que vous convertissez.',
36
+ },
37
+ ];
38
+
39
+ const howTo: PngAWebpLocaleContent['howTo'] = [
40
+ {
41
+ name: 'Insérez vos PNG',
42
+ text: 'Déposez vos gros fichiers PNG dans la zone de téléchargement ou utilisez le sélecteur interactif traditionnel.',
43
+ },
44
+ {
45
+ name: 'Détection des canaux',
46
+ text: 'Le moteur de rendu local détectera et exportera la composition de pixels au format WebP optimisé.',
47
+ },
48
+ {
49
+ name: 'Téléchargement direct',
50
+ text: 'Téléchargez vos fichiers WebP hautement compressés individuellement ou regroupez-les dans un package ZIP.',
51
+ },
52
+ ];
53
+
54
+ const bibliography: PngAWebpLocaleContent['bibliography'] = [
55
+ {
56
+ name: 'Google: Détails d\'implémentation WebP',
57
+ url: 'https://developers.google.com/speed/webp/',
58
+ },
59
+ {
60
+ name: 'W3C: Guidance Core Web Vitals',
61
+ url: 'https://web.dev/vitals/',
62
+ },
63
+ {
64
+ name: 'Mozilla Docs: Formats d\'image',
65
+ url: 'https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types',
66
+ },
67
+ ];
68
+
69
+ const seo: PngAWebpLocaleContent['seo'] = [
70
+ {
71
+ type: 'title',
72
+ text: 'Convertisseur PNG vers WebP en Ligne Gratuit',
73
+ },
74
+ {
75
+ type: 'paragraph',
76
+ html:
77
+ 'WebP est devenu le standard recommandé par Google pour les images web. Lorsque votre page utilise des images WebP au lieu de PNG, Google PageSpeed Insights le reconnaît comme une optimisation positive qui peut améliorer significativement votre score de performance et le temps de chargement de la page.',
78
+ },
79
+ {
80
+ type: 'paragraph',
81
+ html:
82
+ 'Une caractéristique technique clé de WebP est qu\'il supporte à la fois la compression avec et sans perte, et supporte également le canal alpha pour la transparence. Cela signifie que vous pouvez convertir PNG en WebP sans perdre les zones transparentes de votre image.',
83
+ },
84
+ {
85
+ type: 'tip',
86
+ html:
87
+ 'Avant de télécharger des images sur votre site web ou blog, convertissez tous vos PNG en WebP pour améliorer les temps de chargement et l\'expérience utilisateur, surtout sur les connexions mobiles lentes.',
88
+ },
89
+ {
90
+ type: 'paragraph',
91
+ html:
92
+ 'Selon Google, les images WebP sans perte sont 26% plus petites que les PNG équivalents. Les images WebP avec perte sont 25-34% plus petites que les JPG comparables à la même qualité visuelle.',
93
+ },
94
+ {
95
+ type: 'paragraph',
96
+ html:
97
+ 'Convertissez PNG en WebP gratuitement, avec support de transparence et sans envoyer d\'images aux serveurs. Réduisez le poids des images jusqu\'à 40% et améliorez les performances web.',
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: PngAWebpLocaleContent = {
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 PngAWebpCalculator from './component.astro';
4
+ import PngAWebpSEO from './seo.astro';
5
+ import PngAWebpBibliography from './bibliography.astro';
6
+
7
+ export type PngAWebpLocaleContent = ToolLocaleContent<ImageConverterUI>;
8
+
9
+ export const pngAWebp: ConvertersToolEntry<ImageConverterUI> = {
10
+ id: 'png-a-webp',
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 { PngAWebpCalculator, PngAWebpSEO, PngAWebpBibliography };
23
+
24
+ export const PNG_A_WEBP_TOOL: ToolDefinition = {
25
+ entry: pngAWebp,
26
+ Component: PngAWebpCalculator,
27
+ SEOComponent: PngAWebpSEO,
28
+ BibliographyComponent: PngAWebpBibliography,
29
+ };
@@ -0,0 +1,14 @@
1
+ ---
2
+ import { SEORenderer } from '@jjlmoya/utils-shared';
3
+ import { pngAWebp } 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 pngAWebp.i18n[locale]?.();
12
+ ---
13
+
14
+ {content && <SEORenderer content={{ locale, sections: content.seo }} />}
@@ -0,0 +1,14 @@
1
+ ---
2
+ import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
3
+ import { svgAJpg } 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 svgAJpg.i18n[locale]?.();
12
+ ---
13
+
14
+ {content && <SharedBibliography links={content.bibliography} title={content.ui.bibliographyTitle} />}
@@ -0,0 +1,8 @@
1
+ ---
2
+ import SharedImageConverter from '../../shared/ImageConverter.astro';
3
+ import type { ImageConverterUI } from '../../shared/ImageConverter.astro';
4
+
5
+ interface Props { ui: ImageConverterUI }
6
+ const { ui } = Astro.props;
7
+ ---
8
+ <SharedImageConverter from="svg" to="jpg" ui={ui} />
@@ -0,0 +1,118 @@
1
+ import type { WithContext, SoftwareApplication } from 'schema-dts';
2
+ import type { ImageConverterUI } from '../../../shared/ImageConverter.astro';
3
+ import type { SvgAJpgLocaleContent } from '../index';
4
+
5
+ const slug = 'svg-to-jpg-converter';
6
+ const title = 'Convert SVG to JPG Online and Free - High Resolution';
7
+ const description =
8
+ 'Convert SVG vector files to JPG in your browser. 2x high resolution rendering. No file uploads. Free and 100% private.';
9
+
10
+ const ui: ImageConverterUI = {
11
+ dragText: 'Drag SVG files...',
12
+ convertText: 'To convert them to JPG instantly',
13
+ selectFiles: 'Select files',
14
+ processedFiles: 'Processed files',
15
+ downloadAll: 'Download All (.zip)',
16
+ pending: 'Pending',
17
+ bibliographyTitle: 'Bibliographic References',
18
+ faqTitle: 'Frequently Asked Questions',
19
+ };
20
+
21
+ const faq: SvgAJpgLocaleContent['faq'] = [
22
+ {
23
+ question: 'Why convert SVG to JPG?',
24
+ answer:
25
+ 'JPG offers maximum compatibility across all types of devices; converting SVG to JPG is the best way to ensure everyone can view your design without rendering issues.',
26
+ },
27
+ {
28
+ question: 'What happens to the SVG transparency?',
29
+ answer:
30
+ 'When converting to JPG (which does not support transparency), an opaque white background will automatically be added to your vector composition.',
31
+ },
32
+ {
33
+ question: 'What resolution will the resulting JPG have?',
34
+ answer:
35
+ 'The tool renders the SVG at double scale (2x) to guarantee high resolution suitable for Retina screens and professional use.',
36
+ },
37
+ ];
38
+
39
+ const howTo: SvgAJpgLocaleContent['howTo'] = [
40
+ {
41
+ name: 'Insert your vector files',
42
+ text: 'Drop your SVG files in the upper area to prepare the export list.',
43
+ },
44
+ {
45
+ name: 'Rasterization to JPG',
46
+ text: 'The tool will convert the vectors to high-resolution pixels and generate your JPG instantly.',
47
+ },
48
+ {
49
+ name: 'Download the results',
50
+ text: 'Get your JPG files one by one or as a ZIP package.',
51
+ },
52
+ ];
53
+
54
+ const bibliography: SvgAJpgLocaleContent['bibliography'] = [
55
+ {
56
+ name: 'W3C SVG Specification',
57
+ url: 'https://www.w3.org/TR/SVG/',
58
+ },
59
+ {
60
+ name: 'JPEG Standard Overview',
61
+ url: 'https://jpeg.org/jpeg/',
62
+ },
63
+ ];
64
+
65
+ const seo: SvgAJpgLocaleContent['seo'] = [
66
+ {
67
+ type: 'title',
68
+ text: 'Free Online SVG to JPG Converter',
69
+ },
70
+ {
71
+ type: 'paragraph',
72
+ html:
73
+ 'While SVG is perfectly scalable and lightweight for web use, sometimes you need a JPG version of your vector graphic. JPG is the world\'s most compatible photographic format and can be opened without issues by any device, operating system or image viewing program.',
74
+ },
75
+ {
76
+ type: 'paragraph',
77
+ html:
78
+ 'Converting SVG to JPG involves a rasterization process: the vector graphic is converted into a pixel grid. During this process, SVG transparencies are merged with a solid white background, since JPG does not support the alpha channel. Our converter performs this rasterization at double resolution (2x) to produce crisp JPGs suitable for any use.',
79
+ },
80
+ {
81
+ type: 'tip',
82
+ html:
83
+ 'If your SVG has text or custom fonts, make sure they are embedded or converted to paths before converting. System fonts may not be available in the rendering engine.',
84
+ },
85
+ {
86
+ type: 'paragraph',
87
+ html:
88
+ 'A 100KB SVG converted to JPG at 2x can produce a file between 50KB and 500KB depending on the complexity of the design and colors used.',
89
+ },
90
+ {
91
+ type: 'paragraph',
92
+ html:
93
+ 'Convert SVG to high-resolution JPG for free and privately. 2x rendering for maximum sharpness, automatic white background for full JPG compatibility.',
94
+ },
95
+ ];
96
+
97
+ const appSchema: WithContext<SoftwareApplication> = {
98
+ '@context': 'https://schema.org',
99
+ '@type': 'SoftwareApplication',
100
+ name: title,
101
+ description,
102
+ applicationCategory: 'UtilitiesApplication',
103
+ operatingSystem: 'Web',
104
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
105
+ inLanguage: 'en',
106
+ };
107
+
108
+ export const content: SvgAJpgLocaleContent = {
109
+ slug,
110
+ title,
111
+ description,
112
+ ui,
113
+ seo,
114
+ faq,
115
+ bibliography,
116
+ howTo,
117
+ schemas: [appSchema as any],
118
+ };