@jjlmoya/utils-home 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 (77) hide show
  1. package/package.json +62 -0
  2. package/src/category/i18n/en.ts +24 -0
  3. package/src/category/i18n/es.ts +24 -0
  4. package/src/category/i18n/fr.ts +24 -0
  5. package/src/category/index.ts +12 -0
  6. package/src/category/seo.astro +15 -0
  7. package/src/components/PreviewNavSidebar.astro +116 -0
  8. package/src/components/PreviewToolbar.astro +143 -0
  9. package/src/data.ts +11 -0
  10. package/src/env.d.ts +5 -0
  11. package/src/index.ts +26 -0
  12. package/src/layouts/PreviewLayout.astro +117 -0
  13. package/src/pages/[locale]/[slug].astro +146 -0
  14. package/src/pages/[locale].astro +251 -0
  15. package/src/pages/index.astro +4 -0
  16. package/src/tests/faq_count.test.ts +19 -0
  17. package/src/tests/locale_completeness.test.ts +42 -0
  18. package/src/tests/mocks/astro_mock.js +2 -0
  19. package/src/tests/no_h1_in_components.test.ts +48 -0
  20. package/src/tests/seo_length.test.ts +22 -0
  21. package/src/tests/tool_validation.test.ts +17 -0
  22. package/src/tool/dewPointCalculator/bibliography.astro +14 -0
  23. package/src/tool/dewPointCalculator/component.astro +443 -0
  24. package/src/tool/dewPointCalculator/i18n/en.ts +183 -0
  25. package/src/tool/dewPointCalculator/i18n/es.ts +183 -0
  26. package/src/tool/dewPointCalculator/i18n/fr.ts +183 -0
  27. package/src/tool/dewPointCalculator/index.ts +34 -0
  28. package/src/tool/dewPointCalculator/logic.ts +16 -0
  29. package/src/tool/dewPointCalculator/seo.astro +14 -0
  30. package/src/tool/dewPointCalculator/ui.ts +13 -0
  31. package/src/tool/ledSavingCalculator/bibliography.astro +14 -0
  32. package/src/tool/ledSavingCalculator/component.astro +520 -0
  33. package/src/tool/ledSavingCalculator/i18n/en.ts +217 -0
  34. package/src/tool/ledSavingCalculator/i18n/es.ts +217 -0
  35. package/src/tool/ledSavingCalculator/i18n/fr.ts +217 -0
  36. package/src/tool/ledSavingCalculator/index.ts +34 -0
  37. package/src/tool/ledSavingCalculator/logic.ts +31 -0
  38. package/src/tool/ledSavingCalculator/seo.astro +14 -0
  39. package/src/tool/ledSavingCalculator/ui.ts +32 -0
  40. package/src/tool/projectorCalculator/bibliography.astro +14 -0
  41. package/src/tool/projectorCalculator/component.astro +569 -0
  42. package/src/tool/projectorCalculator/i18n/en.ts +181 -0
  43. package/src/tool/projectorCalculator/i18n/es.ts +181 -0
  44. package/src/tool/projectorCalculator/i18n/fr.ts +181 -0
  45. package/src/tool/projectorCalculator/index.ts +34 -0
  46. package/src/tool/projectorCalculator/logic.ts +21 -0
  47. package/src/tool/projectorCalculator/seo.astro +14 -0
  48. package/src/tool/projectorCalculator/ui.ts +16 -0
  49. package/src/tool/qrGenerator/bibliography.astro +14 -0
  50. package/src/tool/qrGenerator/component.astro +499 -0
  51. package/src/tool/qrGenerator/i18n/en.ts +233 -0
  52. package/src/tool/qrGenerator/i18n/es.ts +233 -0
  53. package/src/tool/qrGenerator/i18n/fr.ts +233 -0
  54. package/src/tool/qrGenerator/index.ts +34 -0
  55. package/src/tool/qrGenerator/logic.ts +27 -0
  56. package/src/tool/qrGenerator/seo.astro +14 -0
  57. package/src/tool/qrGenerator/ui.ts +23 -0
  58. package/src/tool/solarCalculator/bibliography.astro +14 -0
  59. package/src/tool/solarCalculator/component.astro +532 -0
  60. package/src/tool/solarCalculator/i18n/en.ts +176 -0
  61. package/src/tool/solarCalculator/i18n/es.ts +176 -0
  62. package/src/tool/solarCalculator/i18n/fr.ts +176 -0
  63. package/src/tool/solarCalculator/index.ts +34 -0
  64. package/src/tool/solarCalculator/logic.ts +31 -0
  65. package/src/tool/solarCalculator/seo.astro +14 -0
  66. package/src/tool/solarCalculator/ui.ts +11 -0
  67. package/src/tool/tariffComparator/bibliography.astro +14 -0
  68. package/src/tool/tariffComparator/component.astro +595 -0
  69. package/src/tool/tariffComparator/i18n/en.ts +192 -0
  70. package/src/tool/tariffComparator/i18n/es.ts +192 -0
  71. package/src/tool/tariffComparator/i18n/fr.ts +192 -0
  72. package/src/tool/tariffComparator/index.ts +34 -0
  73. package/src/tool/tariffComparator/logic.ts +47 -0
  74. package/src/tool/tariffComparator/seo.astro +14 -0
  75. package/src/tool/tariffComparator/ui.ts +25 -0
  76. package/src/tools.ts +9 -0
  77. package/src/types.ts +72 -0
@@ -0,0 +1,181 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { ProjectorCalculatorUI } from '../ui';
4
+
5
+ const slug = 'projector-throw-calculator';
6
+ const title = 'Projector Throw Distance Calculator';
7
+ const description =
8
+ 'Calculate the exact distance to install your projector based on your desired screen size and Throw Ratio. Visual tool with real-time simulation.';
9
+
10
+ const faqData = [
11
+ {
12
+ question: 'What is the Throw Ratio?',
13
+ answer:
14
+ 'A number that defines how large the image will be at a given distance. It is calculated by dividing the projection distance by the screen width. A ratio of 1.5 means that projecting from 1.5m gives you 1m of image width.',
15
+ },
16
+ {
17
+ question: 'How far should I place the projector for a 100-inch screen?',
18
+ answer:
19
+ "It depends entirely on your projector's Throw Ratio. With a standard ratio of 1.5:1 you would need about 3.3m. With a Short Throw projector you could achieve it in under 1m.",
20
+ },
21
+ {
22
+ question: "What's the difference between 16:9 and 4:3?",
23
+ answer:
24
+ '16:9 is the widescreen format for modern films and series. 4:3 is the classic format for presentations and retro projectors. Choosing the right one avoids excessive black bars.',
25
+ },
26
+ {
27
+ question: 'Does the height of the projector installation matter?',
28
+ answer:
29
+ 'Yes. Projectors have a vertical offset or keystone correction. Ideally mount it centred with the top or bottom edge of the screen to avoid image distortion.',
30
+ },
31
+ ];
32
+
33
+ const howToData = [
34
+ {
35
+ name: 'Check the Throw Ratio',
36
+ text: "Look on the box or manual for a number like 1.2:1 or 1.5-1.8:1.",
37
+ },
38
+ {
39
+ name: 'Define screen size',
40
+ text: 'Enter the diagonal inches you want to achieve, or the available wall width.',
41
+ },
42
+ {
43
+ name: 'Choose the format',
44
+ text: 'Select 16:9 for films and series, 4:3 for presentations, or 21:9 for cinemascope.',
45
+ },
46
+ {
47
+ name: 'Get the distance',
48
+ text: 'The calculator gives you the exact distance at which to mount the projector bracket.',
49
+ },
50
+ ];
51
+
52
+ const faqSchema: WithContext<FAQPage> = {
53
+ '@context': 'https://schema.org',
54
+ '@type': 'FAQPage',
55
+ mainEntity: faqData.map((item) => ({
56
+ '@type': 'Question',
57
+ name: item.question,
58
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
59
+ })),
60
+ };
61
+
62
+ const howToSchema: WithContext<HowTo> = {
63
+ '@context': 'https://schema.org',
64
+ '@type': 'HowTo',
65
+ name: title,
66
+ description,
67
+ step: howToData.map((step) => ({
68
+ '@type': 'HowToStep',
69
+ name: step.name,
70
+ text: step.text,
71
+ })),
72
+ };
73
+
74
+ const appSchema: WithContext<SoftwareApplication> = {
75
+ '@context': 'https://schema.org',
76
+ '@type': 'SoftwareApplication',
77
+ name: title,
78
+ description,
79
+ applicationCategory: 'UtilityApplication',
80
+ operatingSystem: 'All',
81
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
82
+ inLanguage: 'en',
83
+ };
84
+
85
+ export const content: ToolLocaleContent<ProjectorCalculatorUI> = {
86
+ slug,
87
+ title,
88
+ description,
89
+ faqTitle: 'Frequently Asked Questions',
90
+ faq: faqData,
91
+ bibliographyTitle: 'Bibliography',
92
+ bibliography: [
93
+ { name: 'Projector Central — Throw Distance Calculator', url: 'https://www.projectorcentral.com/projection-calculator-pro.cfm' },
94
+ { name: 'Epson — Projection Distance Guide', url: 'https://epson.com/' },
95
+ { name: 'BenQ — Knowledge Center', url: 'https://www.benq.com/en-us/knowledge-center/' },
96
+ ],
97
+ howTo: howToData,
98
+ schemas: [faqSchema, howToSchema, appSchema],
99
+ seo: [
100
+ {
101
+ type: 'title',
102
+ text: 'Master Projection Geometry',
103
+ level: 2,
104
+ },
105
+ {
106
+ type: 'paragraph',
107
+ html: 'Installing a projector by eye can ruin the experience. Too close and the image is tiny; too far and you lose brightness. The key is the <strong>Throw Ratio</strong>, a number that precisely defines the relationship between distance and image size.',
108
+ },
109
+ {
110
+ type: 'stats',
111
+ items: [
112
+ { value: 'TR × W', label: 'Distance Formula', icon: 'mdi:projector' },
113
+ { value: '< 0.4', label: 'Ultra Short Throw', icon: 'mdi:arrow-collapse-horizontal' },
114
+ { value: '> 2.0', label: 'Long Throw', icon: 'mdi:arrow-expand-horizontal' },
115
+ ],
116
+ columns: 3,
117
+ },
118
+ {
119
+ type: 'comparative',
120
+ items: [
121
+ {
122
+ title: 'What is the Throw Ratio?',
123
+ description: 'The ratio between the projection distance and the image width. A TR of 1.5 means you need 1.5m of distance per metre of screen width.',
124
+ icon: 'mdi:ruler',
125
+ points: ['TR < 1: Short Throw, ideal for small rooms', 'TR 1–2: Standard for living rooms and meeting rooms', 'TR > 2: Long Throw, for large auditoriums'],
126
+ },
127
+ {
128
+ title: 'Format and Aspect Ratio',
129
+ description: 'The format determines image proportions. Using the wrong format creates black bars that waste screen area and reduce perceived brightness.',
130
+ icon: 'mdi:aspect-ratio',
131
+ points: ['16:9 (1.78:1): HD/4K standard for cinema and series', '21:9 (2.35:1): cinemascope format for home cinema', '4:3 (1.33:1): for presentations and office projectors'],
132
+ },
133
+ ],
134
+ columns: 2,
135
+ },
136
+ {
137
+ type: 'title',
138
+ text: 'Professional Installation Tips',
139
+ level: 3,
140
+ },
141
+ {
142
+ type: 'paragraph',
143
+ html: '<strong>Lens Shift vs Keystone:</strong> If your projector has Lens Shift, always use it instead of digital Keystone. Keystone crops pixels and reduces effective resolution. A correct physical mounting eliminates the need for any correction.',
144
+ },
145
+ {
146
+ type: 'diagnostic',
147
+ variant: 'warning',
148
+ title: 'Ambient Light and Screen Gain',
149
+ icon: 'mdi:lightbulb-on',
150
+ badge: 'Pro Tip',
151
+ html: '<p>In rooms with ambient light, consider a high-gain screen (>1.0) to compensate for contrast loss. In dark rooms, a neutral (1.0) or negative-gain screen delivers better viewing angles and more uniform colours.</p>',
152
+ },
153
+ {
154
+ type: 'summary',
155
+ title: 'Installation Checklist',
156
+ items: [
157
+ "Note your projector's Throw Ratio before choosing the mounting location.",
158
+ 'Check the maximum image size allowed by the available space.',
159
+ 'Mount the projector centred vertically relative to the screen.',
160
+ 'Avoid digital Keystone: use Lens Shift or adjust the physical position.',
161
+ 'Ensure no direct light sources are pointing at the screen.',
162
+ ],
163
+ },
164
+ ],
165
+ ui: {
166
+ configTitle: 'Configuration',
167
+ configSubtitle: 'Define your screen and projector',
168
+ labelDiagonal: 'Screen Diagonal',
169
+ labelDiagonalUnit: 'Inches (")',
170
+ labelFormat: 'Format (Aspect Ratio)',
171
+ labelThrowRatio: 'Throw Ratio',
172
+ throwRatioHint: 'Check your projector manual. Example: 1.50 means that for 1m of image width, you need 1.5m of distance.',
173
+ ratio169Sub: 'TV / HD',
174
+ ratio219Sub: 'Cinema',
175
+ ratio43Sub: 'Retro',
176
+ labelWidth: 'Screen Width',
177
+ labelHeight: 'Screen Height',
178
+ labelDistance: 'Required Distance',
179
+ simulationBadge: 'Real-Time Simulation',
180
+ },
181
+ };
@@ -0,0 +1,181 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { ProjectorCalculatorUI } from '../ui';
4
+
5
+ const slug = 'calculadora-tiro-proyector';
6
+ const title = 'Calculadora Distancia Proyector — Tiro y Pantalla';
7
+ const description =
8
+ 'Calcula la distancia exacta para instalar tu proyector según el tamaño de pantalla deseado y el Throw Ratio. Herramienta visual con simulación en tiempo real.';
9
+
10
+ const faqData = [
11
+ {
12
+ question: '¿Qué es el Throw Ratio o relación de tiro?',
13
+ answer:
14
+ 'Es un número que define qué tan grande será la imagen a una distancia específica. Se calcula dividiendo la distancia de proyección por el ancho de la pantalla. Un ratio de 1.5 significa que si proyectas desde 1.5m, tendrás 1m de ancho de imagen.',
15
+ },
16
+ {
17
+ question: '¿A qué distancia debo poner el proyector para 100 pulgadas?',
18
+ answer:
19
+ 'Depende del Throw Ratio de tu proyector. Con un ratio estándar de 1.5:1 necesitarías unos 3.3m. Con un proyector de tiro corto (Short Throw) podrías lograrlo a menos de 1m.',
20
+ },
21
+ {
22
+ question: '¿Qué diferencia hay entre 16:9 y 4:3?',
23
+ answer:
24
+ '16:9 es el formato panorámico para películas y series modernas. 4:3 es el formato clásico para presentaciones y retroproyectores. Elegir el correcto evita bordes negros excesivos.',
25
+ },
26
+ {
27
+ question: '¿Importa la altura a la que instalo el proyector?',
28
+ answer:
29
+ 'Sí. Los proyectores tienen un desplazamiento vertical (offset) o corrección trapezoidal (keystone). Lo ideal es instalarlo centrado respecto al borde superior o inferior de la pantalla para evitar deformaciones.',
30
+ },
31
+ ];
32
+
33
+ const howToData = [
34
+ {
35
+ name: 'Consultar el Throw Ratio',
36
+ text: 'Busca en la caja o el manual de tu proyector un número como 1.2:1 o 1.5-1.8:1.',
37
+ },
38
+ {
39
+ name: 'Definir tamaño de pantalla',
40
+ text: 'Introduce el número de pulgadas de diagonal que quieres conseguir o el ancho disponible en tu pared.',
41
+ },
42
+ {
43
+ name: 'Elegir formato',
44
+ text: 'Selecciona 16:9 para ver películas y series, 4:3 para presentaciones, o 21:9 para cinemascope.',
45
+ },
46
+ {
47
+ name: 'Obtener la distancia',
48
+ text: 'La calculadora te dará la distancia exacta a la que instalar el soporte del proyector.',
49
+ },
50
+ ];
51
+
52
+ const faqSchema: WithContext<FAQPage> = {
53
+ '@context': 'https://schema.org',
54
+ '@type': 'FAQPage',
55
+ mainEntity: faqData.map((item) => ({
56
+ '@type': 'Question',
57
+ name: item.question,
58
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
59
+ })),
60
+ };
61
+
62
+ const howToSchema: WithContext<HowTo> = {
63
+ '@context': 'https://schema.org',
64
+ '@type': 'HowTo',
65
+ name: title,
66
+ description,
67
+ step: howToData.map((step) => ({
68
+ '@type': 'HowToStep',
69
+ name: step.name,
70
+ text: step.text,
71
+ })),
72
+ };
73
+
74
+ const appSchema: WithContext<SoftwareApplication> = {
75
+ '@context': 'https://schema.org',
76
+ '@type': 'SoftwareApplication',
77
+ name: title,
78
+ description,
79
+ applicationCategory: 'UtilityApplication',
80
+ operatingSystem: 'All',
81
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
82
+ inLanguage: 'es',
83
+ };
84
+
85
+ export const content: ToolLocaleContent<ProjectorCalculatorUI> = {
86
+ slug,
87
+ title,
88
+ description,
89
+ faqTitle: 'Preguntas Frecuentes',
90
+ faq: faqData,
91
+ bibliographyTitle: 'Bibliografía',
92
+ bibliography: [
93
+ { name: 'Projector Central — Throw Distance Calculator', url: 'https://www.projectorcentral.com/projection-calculator-pro.cfm' },
94
+ { name: 'Epson — Guía de Distancia de Proyección', url: 'https://epson.com/' },
95
+ { name: 'BenQ — Knowledge Center', url: 'https://www.benq.com/en-us/knowledge-center/' },
96
+ ],
97
+ howTo: howToData,
98
+ schemas: [faqSchema, howToSchema, appSchema],
99
+ seo: [
100
+ {
101
+ type: 'title',
102
+ text: 'Domina la Geometría de Proyección',
103
+ level: 2,
104
+ },
105
+ {
106
+ type: 'paragraph',
107
+ html: 'Instalar un proyector a ojo puede arruinar la experiencia. Demasiado cerca y la imagen es pequeña; demasiado lejos y perderás brillo. La clave está en el <strong>Throw Ratio</strong>, un número que define exactamente la relación entre distancia y tamaño de imagen.',
108
+ },
109
+ {
110
+ type: 'stats',
111
+ items: [
112
+ { value: 'TR × W', label: 'Fórmula de Distancia', icon: 'mdi:projector' },
113
+ { value: '< 0.4', label: 'Ultra Short Throw', icon: 'mdi:arrow-collapse-horizontal' },
114
+ { value: '> 2.0', label: 'Long Throw', icon: 'mdi:arrow-expand-horizontal' },
115
+ ],
116
+ columns: 3,
117
+ },
118
+ {
119
+ type: 'comparative',
120
+ items: [
121
+ {
122
+ title: '¿Qué es el Throw Ratio?',
123
+ description: 'Es la relación entre la distancia de proyección y el ancho de la imagen. Un TR de 1.5 significa que necesitas 1.5m de distancia por cada metro de ancho de pantalla.',
124
+ icon: 'mdi:ruler',
125
+ points: ['TR < 1: Short Throw, ideal para espacios pequeños', 'TR 1–2: Estándar para salones y salas de reuniones', 'TR > 2: Long Throw, para grandes auditorios'],
126
+ },
127
+ {
128
+ title: 'Formato y Relación de Aspecto',
129
+ description: 'El formato determina las proporciones de la imagen. Usar el formato incorrecto genera barras negras que desperdician parte de la pantalla y reducen el brillo percibido.',
130
+ icon: 'mdi:aspect-ratio',
131
+ points: ['16:9 (1.78:1): estándar HD/4K para cine y series', '21:9 (2.35:1): formato cinemascope para home cinema', '4:3 (1.33:1): para presentaciones y proyectores de oficina'],
132
+ },
133
+ ],
134
+ columns: 2,
135
+ },
136
+ {
137
+ type: 'title',
138
+ text: 'Instalación Profesional',
139
+ level: 3,
140
+ },
141
+ {
142
+ type: 'paragraph',
143
+ html: '<strong>Lens Shift vs Keystone:</strong> Si tu proyector tiene corrección de lente (Lens Shift), úsala siempre en lugar del Keystone digital. El Keystone recorta píxeles y reduce la resolución efectiva. Un correcto montaje elimina la necesidad de cualquier corrección.',
144
+ },
145
+ {
146
+ type: 'diagnostic',
147
+ variant: 'warning',
148
+ title: 'Luz Ambiente y Ganancia de Pantalla',
149
+ icon: 'mdi:lightbulb-on',
150
+ badge: 'Pro Tip',
151
+ html: '<p>En salas con luz ambiente, considera una pantalla de alta ganancia (>1.0) para compensar la pérdida de contraste. En salas oscuras, una pantalla neutra (1.0) o de ganancia negativa ofrece mejores ángulos de visión y colores más uniformes.</p>',
152
+ },
153
+ {
154
+ type: 'summary',
155
+ title: 'Checklist de Instalación',
156
+ items: [
157
+ 'Anota el Throw Ratio de tu proyector antes de elegir la ubicación.',
158
+ 'Verifica el tamaño máximo de imagen permitido por el espacio disponible.',
159
+ 'Instala el proyector centrado verticalmente respecto a la pantalla.',
160
+ 'Evita el Keystone digital: usa Lens Shift o ajusta la posición física.',
161
+ 'Comprueba que no haya fuentes de luz directas que apunten a la pantalla.',
162
+ ],
163
+ },
164
+ ],
165
+ ui: {
166
+ configTitle: 'Configuración',
167
+ configSubtitle: 'Define tu pantalla y proyector',
168
+ labelDiagonal: 'Diagonal de Pantalla',
169
+ labelDiagonalUnit: 'Pulgadas (")',
170
+ labelFormat: 'Formato (Relación de Aspecto)',
171
+ labelThrowRatio: 'Ratio de Tiro (Throw Ratio)',
172
+ throwRatioHint: 'Consulta el manual de tu proyector. Ejemplo: 1.50 significa que para 1m de ancho, necesitas 1.5m de distancia.',
173
+ ratio169Sub: 'TV / HD',
174
+ ratio219Sub: 'Cine',
175
+ ratio43Sub: 'Retro',
176
+ labelWidth: 'Ancho Pantalla',
177
+ labelHeight: 'Alto Pantalla',
178
+ labelDistance: 'Distancia Requerida',
179
+ simulationBadge: 'Simulación en Tiempo Real',
180
+ },
181
+ };
@@ -0,0 +1,181 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { ProjectorCalculatorUI } from '../ui';
4
+
5
+ const slug = 'calculateur-distance-projecteur';
6
+ const title = 'Calculateur de Distance de Projection';
7
+ const description =
8
+ "Calculez la distance exacte pour installer votre projecteur selon la taille d'écran souhaitée et le Throw Ratio. Outil visuel avec simulation en temps réel.";
9
+
10
+ const faqData = [
11
+ {
12
+ question: "Qu'est-ce que le Throw Ratio ?",
13
+ answer:
14
+ "Un nombre qui définit la taille de l'image à une distance donnée. Il se calcule en divisant la distance de projection par la largeur de l'écran. Un ratio de 1.5 signifie qu'en projetant depuis 1.5m, vous obtenez 1m de largeur d'image.",
15
+ },
16
+ {
17
+ question: 'À quelle distance placer le projecteur pour un écran de 100 pouces ?',
18
+ answer:
19
+ "Cela dépend entièrement du Throw Ratio de votre projecteur. Avec un ratio standard de 1.5:1, il vous faudrait environ 3.3m. Avec un projecteur Short Throw, vous pouvez y parvenir à moins d'1m.",
20
+ },
21
+ {
22
+ question: "Quelle est la différence entre 16:9 et 4:3 ?",
23
+ answer:
24
+ "16:9 est le format panoramique pour les films et séries modernes. 4:3 est le format classique pour les présentations et rétroprojecteurs. Choisir le bon format évite les bandes noires excessives.",
25
+ },
26
+ {
27
+ question: "La hauteur d'installation du projecteur est-elle importante ?",
28
+ answer:
29
+ "Oui. Les projecteurs disposent d'un décalage vertical (offset) ou d'une correction trapézoïdale (keystone). L'idéal est de le monter centré par rapport au bord supérieur ou inférieur de l'écran pour éviter les déformations.",
30
+ },
31
+ ];
32
+
33
+ const howToData = [
34
+ {
35
+ name: 'Consulter le Throw Ratio',
36
+ text: "Cherchez sur la boîte ou le manuel un nombre comme 1.2:1 ou 1.5-1.8:1.",
37
+ },
38
+ {
39
+ name: "Définir la taille d'écran",
40
+ text: "Entrez le nombre de pouces de diagonale souhaité ou la largeur disponible sur votre mur.",
41
+ },
42
+ {
43
+ name: 'Choisir le format',
44
+ text: 'Sélectionnez 16:9 pour les films et séries, 4:3 pour les présentations, ou 21:9 pour le format cinémascope.',
45
+ },
46
+ {
47
+ name: 'Obtenir la distance',
48
+ text: "La calculatrice vous donnera la distance exacte à laquelle monter le support du projecteur.",
49
+ },
50
+ ];
51
+
52
+ const faqSchema: WithContext<FAQPage> = {
53
+ '@context': 'https://schema.org',
54
+ '@type': 'FAQPage',
55
+ mainEntity: faqData.map((item) => ({
56
+ '@type': 'Question',
57
+ name: item.question,
58
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
59
+ })),
60
+ };
61
+
62
+ const howToSchema: WithContext<HowTo> = {
63
+ '@context': 'https://schema.org',
64
+ '@type': 'HowTo',
65
+ name: title,
66
+ description,
67
+ step: howToData.map((step) => ({
68
+ '@type': 'HowToStep',
69
+ name: step.name,
70
+ text: step.text,
71
+ })),
72
+ };
73
+
74
+ const appSchema: WithContext<SoftwareApplication> = {
75
+ '@context': 'https://schema.org',
76
+ '@type': 'SoftwareApplication',
77
+ name: title,
78
+ description,
79
+ applicationCategory: 'UtilityApplication',
80
+ operatingSystem: 'All',
81
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
82
+ inLanguage: 'fr',
83
+ };
84
+
85
+ export const content: ToolLocaleContent<ProjectorCalculatorUI> = {
86
+ slug,
87
+ title,
88
+ description,
89
+ faqTitle: 'Questions Fréquentes',
90
+ faq: faqData,
91
+ bibliographyTitle: 'Bibliographie',
92
+ bibliography: [
93
+ { name: 'Projector Central — Calculateur de Distance de Projection', url: 'https://www.projectorcentral.com/projection-calculator-pro.cfm' },
94
+ { name: 'Epson — Guide de Distance de Projection', url: 'https://epson.com/' },
95
+ { name: 'BenQ — Centre de Connaissances', url: 'https://www.benq.com/en-us/knowledge-center/' },
96
+ ],
97
+ howTo: howToData,
98
+ schemas: [faqSchema, howToSchema, appSchema],
99
+ seo: [
100
+ {
101
+ type: 'title',
102
+ text: 'Maîtriser la Géométrie de Projection',
103
+ level: 2,
104
+ },
105
+ {
106
+ type: 'paragraph',
107
+ html: "Installer un projecteur à l'œil peut gâcher l'expérience. Trop près et l'image est petite ; trop loin et vous perdez en luminosité. La clé est le <strong>Throw Ratio</strong>, un nombre qui définit précisément la relation entre distance et taille d'image.",
108
+ },
109
+ {
110
+ type: 'stats',
111
+ items: [
112
+ { value: 'TR × L', label: 'Formule de Distance', icon: 'mdi:projector' },
113
+ { value: '< 0.4', label: 'Ultra Short Throw', icon: 'mdi:arrow-collapse-horizontal' },
114
+ { value: '> 2.0', label: 'Long Throw', icon: 'mdi:arrow-expand-horizontal' },
115
+ ],
116
+ columns: 3,
117
+ },
118
+ {
119
+ type: 'comparative',
120
+ items: [
121
+ {
122
+ title: "Qu'est-ce que le Throw Ratio ?",
123
+ description: "Le rapport entre la distance de projection et la largeur de l'image. Un TR de 1.5 signifie qu'il faut 1.5m de distance par mètre de largeur d'écran.",
124
+ icon: 'mdi:ruler',
125
+ points: ['TR < 1 : Short Throw, idéal pour les petits espaces', 'TR 1–2 : Standard pour salons et salles de réunion', "TR > 2 : Long Throw, pour les grands auditoriums"],
126
+ },
127
+ {
128
+ title: "Format et Rapport d'Aspect",
129
+ description: "Le format détermine les proportions de l'image. Utiliser le mauvais format crée des bandes noires qui gaspillent la surface d'écran et réduisent la luminosité perçue.",
130
+ icon: 'mdi:aspect-ratio',
131
+ points: ["16:9 (1.78:1) : standard HD/4K pour cinéma et séries", '21:9 (2.35:1) : format cinémascope pour home cinema', "4:3 (1.33:1) : pour présentations et projecteurs de bureau"],
132
+ },
133
+ ],
134
+ columns: 2,
135
+ },
136
+ {
137
+ type: 'title',
138
+ text: "Conseils d'Installation Professionnelle",
139
+ level: 3,
140
+ },
141
+ {
142
+ type: 'paragraph',
143
+ html: "<strong>Lens Shift vs Keystone :</strong> Si votre projecteur dispose d'un Lens Shift, utilisez-le toujours plutôt que la correction Keystone numérique. Le Keystone rogne des pixels et réduit la résolution effective. Un montage physique correct élimine tout besoin de correction.",
144
+ },
145
+ {
146
+ type: 'diagnostic',
147
+ variant: 'warning',
148
+ title: "Lumière Ambiante et Gain d'Écran",
149
+ icon: 'mdi:lightbulb-on',
150
+ badge: 'Conseil Pro',
151
+ html: "<p>Dans les pièces avec lumière ambiante, envisagez un écran à gain élevé (>1.0) pour compenser la perte de contraste. Dans les salles sombres, un écran neutre (1.0) ou à gain négatif offre de meilleurs angles de vision et des couleurs plus uniformes.</p>",
152
+ },
153
+ {
154
+ type: 'summary',
155
+ title: "Checklist d'Installation",
156
+ items: [
157
+ "Notez le Throw Ratio de votre projecteur avant de choisir l'emplacement de montage.",
158
+ "Vérifiez la taille maximale d'image permise par l'espace disponible.",
159
+ "Montez le projecteur centré verticalement par rapport à l'écran.",
160
+ "Évitez le Keystone numérique : utilisez le Lens Shift ou ajustez la position physique.",
161
+ "Assurez-vous qu'aucune source lumineuse directe ne pointe vers l'écran.",
162
+ ],
163
+ },
164
+ ],
165
+ ui: {
166
+ configTitle: 'Configuration',
167
+ configSubtitle: 'Définissez votre écran et projecteur',
168
+ labelDiagonal: "Diagonale d'Écran",
169
+ labelDiagonalUnit: 'Pouces (")',
170
+ labelFormat: "Format (Rapport d'Aspect)",
171
+ labelThrowRatio: 'Throw Ratio',
172
+ throwRatioHint: "Consultez le manuel de votre projecteur. Exemple : 1.50 signifie que pour 1m de largeur d'image, vous avez besoin de 1.5m de distance.",
173
+ ratio169Sub: 'TV / HD',
174
+ ratio219Sub: 'Cinéma',
175
+ ratio43Sub: 'Rétro',
176
+ labelWidth: "Largeur d'Écran",
177
+ labelHeight: "Hauteur d'Écran",
178
+ labelDistance: 'Distance Requise',
179
+ simulationBadge: 'Simulation en Temps Réel',
180
+ },
181
+ };
@@ -0,0 +1,34 @@
1
+ import type { HomeToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
+ import ProjectorCalculatorComponent from './component.astro';
3
+ import ProjectorCalculatorSEO from './seo.astro';
4
+ import ProjectorCalculatorBibliography from './bibliography.astro';
5
+
6
+ import type { ProjectorCalculatorUI } from './ui';
7
+
8
+ export type ProjectorCalculatorLocaleContent = ToolLocaleContent<ProjectorCalculatorUI>;
9
+
10
+ import { content as es } from './i18n/es';
11
+ import { content as en } from './i18n/en';
12
+ import { content as fr } from './i18n/fr';
13
+
14
+ export const projectorCalculator: HomeToolEntry<ProjectorCalculatorUI> = {
15
+ id: 'projector-calculator',
16
+ icons: {
17
+ bg: 'mdi:projector',
18
+ fg: 'mdi:ruler',
19
+ },
20
+ i18n: {
21
+ es: async () => es,
22
+ en: async () => en,
23
+ fr: async () => fr,
24
+ },
25
+ };
26
+
27
+ export { ProjectorCalculatorComponent, ProjectorCalculatorSEO, ProjectorCalculatorBibliography };
28
+
29
+ export const PROJECTOR_CALCULATOR_TOOL: ToolDefinition = {
30
+ entry: projectorCalculator,
31
+ Component: ProjectorCalculatorComponent,
32
+ SEOComponent: ProjectorCalculatorSEO,
33
+ BibliographyComponent: ProjectorCalculatorBibliography,
34
+ };
@@ -0,0 +1,21 @@
1
+ export interface ProjectionResult {
2
+ widthCm: number;
3
+ heightCm: number;
4
+ distanceCm: number;
5
+ }
6
+
7
+ export function calculateProjection(
8
+ diagonalInches: number,
9
+ aspectRatio: number,
10
+ throwRatio: number
11
+ ): ProjectionResult {
12
+ const angle = Math.atan(1 / aspectRatio);
13
+ const widthCm = diagonalInches * Math.cos(angle) * 2.54;
14
+ const heightCm = diagonalInches * Math.sin(angle) * 2.54;
15
+ const distanceCm = widthCm * throwRatio;
16
+ return { widthCm, heightCm, distanceCm };
17
+ }
18
+
19
+ export function cmToM(cm: number): string {
20
+ return (cm / 100).toFixed(2);
21
+ }
@@ -0,0 +1,14 @@
1
+ ---
2
+ import { SEORenderer } from '@jjlmoya/utils-shared';
3
+ import { projectorCalculator } 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 projectorCalculator.i18n[locale]?.();
12
+ if (!content) return null;
13
+ ---
14
+ <SEORenderer content={{ locale: locale as string, sections: content.seo }} />
@@ -0,0 +1,16 @@
1
+ export interface ProjectorCalculatorUI extends Record<string, string> {
2
+ configTitle: string;
3
+ configSubtitle: string;
4
+ labelDiagonal: string;
5
+ labelDiagonalUnit: string;
6
+ labelFormat: string;
7
+ labelThrowRatio: string;
8
+ throwRatioHint: string;
9
+ ratio169Sub: string;
10
+ ratio219Sub: string;
11
+ ratio43Sub: string;
12
+ labelWidth: string;
13
+ labelHeight: string;
14
+ labelDistance: string;
15
+ simulationBadge: string;
16
+ }
@@ -0,0 +1,14 @@
1
+ ---
2
+ import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
3
+ import { qrGenerator } 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 qrGenerator.i18n[locale]?.();
12
+ ---
13
+
14
+ {content && <SharedBibliography links={content.bibliography} />}