@jjlmoya/utils-home 1.3.0 → 1.5.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.
@@ -0,0 +1,286 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { HeatingComparatorUI } from '../ui';
4
+
5
+ const slug = 'comparateur-consommation-chauffage';
6
+ const title = 'Comparateur Gaz vs. Aérothermie vs. Air: Économies et Consommation';
7
+ const description =
8
+ 'Calculez combien vous économisez en remplaçant votre chaudière à gaz par une pompe à chaleur aérothermique ou une clim. Comparaison réelle de consommation et efficacité.';
9
+
10
+ const faqData = [
11
+ {
12
+ question: 'Qu\'est-ce qui est moins cher, l\'aérothermie ou le gaz naturel ?',
13
+ answer:
14
+ 'Au niveau opérationnel mensuel, l\'aérothermie est nettement moins chère que le gaz naturel. Grâce à son efficacité de 400% (COP de 4), le coût par kWh de chaleur fournie est généralement 30% à 50% inférieur à celui du gaz, malgré un prix du kWh électrique plus élevé.',
15
+ },
16
+ {
17
+ question: 'Quelle est la différence entre l\'aérothermie et une pompe à chaleur normale ?',
18
+ answer:
19
+ 'Techniquement, les deux sont des pompes à chaleur. La principale différence réside dans le milieu auquel elles fournissent la chaleur : l\'aérothermie est généralement "air-eau", tandis que la pompe à chaleur conventionnelle est "air-air".',
20
+ },
21
+ {
22
+ question: 'Peut-on installer l\'aérothermie dans un appartement avec d\'anciens radiateurs ?',
23
+ answer:
24
+ 'Oui, il est possible d\'installer l\'aérothermie avec des radiateurs conventionnels en utilisant des équipements "haute température". Cependant, pour obtenir un maximum d\'économies, l\'idéal est de la combiner avec un plancher chauffant.',
25
+ },
26
+ {
27
+ question: 'Combien d\'années faut-il pour amortir un équipement d\'aérothermie ?',
28
+ answer:
29
+ 'Selon la consommation du logement et l\'existence de subventions, le délai d\'amortissement se situe généralement entre 5 et 8 ans. Si l\'on dispose de panneaux solaires, cette période peut être considérablement réduite.',
30
+ },
31
+ ];
32
+
33
+ const howToData = [
34
+ {
35
+ name: 'Surface de la maison',
36
+ text: 'Entrez les mètres carrés utiles de votre logement pour estimer la demande thermique annuelle.',
37
+ },
38
+ {
39
+ name: 'Prix de l\'énergie',
40
+ text: 'Ajustez les prix du Gaz et de l\'Électricité selon votre facture réelle pour plus de précision.',
41
+ },
42
+ {
43
+ name: 'Voir les résultats',
44
+ text: 'Comparez les trois systèmes côte à côte et découvrez le gagnant en efficacité et coût annuel.',
45
+ },
46
+ ];
47
+
48
+ const faqSchema: WithContext<FAQPage> = {
49
+ '@context': 'https://schema.org',
50
+ '@type': 'FAQPage',
51
+ mainEntity: faqData.map((item) => ({
52
+ '@type': 'Question',
53
+ name: item.question,
54
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
55
+ })),
56
+ };
57
+
58
+ const howToSchema: WithContext<HowTo> = {
59
+ '@context': 'https://schema.org',
60
+ '@type': 'HowTo',
61
+ name: title,
62
+ description,
63
+ step: howToData.map((step) => ({
64
+ '@type': 'HowToStep',
65
+ name: step.name,
66
+ text: step.text,
67
+ })),
68
+ };
69
+
70
+ const appSchema: WithContext<SoftwareApplication> = {
71
+ '@context': 'https://schema.org',
72
+ '@type': 'SoftwareApplication',
73
+ name: title,
74
+ description,
75
+ applicationCategory: 'UtilityApplication',
76
+ operatingSystem: 'All',
77
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
78
+ inLanguage: 'fr',
79
+ };
80
+
81
+ export const content: ToolLocaleContent<HeatingComparatorUI> = {
82
+ slug,
83
+ title,
84
+ description,
85
+ faqTitle: 'Questions Fréquentes',
86
+ faq: faqData,
87
+ bibliographyTitle: 'Bibliographie',
88
+ bibliography: [
89
+ {
90
+ name: 'ADEME: La pompe à chaleur',
91
+ url: 'https://librairie.ademe.fr/chaleur-climatisation-et-ventilation/1429-pompe-a-chaleur.html',
92
+ },
93
+ {
94
+ name: 'Service-Public: Chauffage et climatisation',
95
+ url: 'https://www.service-public.fr/particuliers/vosdroits/F1710',
96
+ },
97
+ ],
98
+ howTo: howToData,
99
+ schemas: [faqSchema, howToSchema, appSchema],
100
+ seo: [
101
+ {
102
+ type: 'summary',
103
+ title: 'Clés pour choisir votre chauffage',
104
+ items: [
105
+ 'L\'<strong>aérothermie</strong> est jusqu\'à 400% plus efficace que le gaz.',
106
+ 'L\'<strong>isolation</strong> réduit votre facture plus que n\'importe quelle chaudière.',
107
+ 'L\'<strong>amortissement</strong> des systèmes électriques est d\'environ 6-8 ans.',
108
+ 'Combinez avec des <strong>panneaux solaires</strong> pour un chauffage presque gratuit.',
109
+ ],
110
+ },
111
+ {
112
+ type: 'title',
113
+ text: 'Comparaison de consommation : Gaz vs Aérothermie vs Air climatisé',
114
+ level: 2,
115
+ },
116
+ {
117
+ type: 'paragraph',
118
+ html: 'Choisir le bon système de climatisation pour votre maison est l\'une des décisions financières et de confort plus importantes. Dans un contexte de prix de l\'énergie volatils, savoir quel système est le plus efficace est essentiel.',
119
+ },
120
+ {
121
+ type: 'paragraph',
122
+ html: 'Historiquement, le gaz naturel a été le roi incontesté. Cependant, l\'émergence de l\'<strong>aérothermie</strong> et l\'amélioration des <strong>pompes à chaleur (air-air)</strong> ont changé la donne.',
123
+ },
124
+ {
125
+ type: 'stats',
126
+ items: [
127
+ {
128
+ label: 'Efficacité Aérothermie',
129
+ value: '400%',
130
+ icon: 'mdi:lightning-bolt',
131
+ trend: { value: 'meilleur', positive: true },
132
+ },
133
+ {
134
+ label: 'Économie annuelle moy.',
135
+ value: '450€',
136
+ icon: 'mdi:piggy-bank',
137
+ trend: { value: 'estimé', positive: true },
138
+ },
139
+ {
140
+ label: 'Vie de l\'équipement',
141
+ value: '20 ans',
142
+ icon: 'mdi:calendar-check',
143
+ trend: { value: 'standard', positive: true },
144
+ },
145
+ ],
146
+ columns: 3,
147
+ },
148
+ {
149
+ type: 'title',
150
+ text: '1. Chaudière à gaz naturel : la norme traditionnelle',
151
+ level: 3,
152
+ },
153
+ {
154
+ type: 'paragraph',
155
+ html: 'Le chauffage au gaz naturel utilise une chaudière qui brûle du combustible pour chauffer l\'eau circulaient dans des radiateurs.',
156
+ },
157
+ {
158
+ type: 'list',
159
+ items: [
160
+ '<strong>Rendement :</strong> Les chaudières modernes ont un rendement proche de 100%.',
161
+ '<strong>Avantages :</strong> Installation répandue, chaleur rapide.',
162
+ '<strong>Inconvénients :</strong> Dépendance aux énergies fossiles et émissions de CO2.',
163
+ ],
164
+ },
165
+ {
166
+ type: 'title',
167
+ text: '2. Aérothermie : Efficacité extrême (Air-Eau)',
168
+ level: 3,
169
+ },
170
+ {
171
+ type: 'paragraph',
172
+ html: 'Les pompes à chaleur aérothermiques extraient l\'énergie thermique de l\'air extérieur et la transfèrent à l\'intérieur.',
173
+ },
174
+ {
175
+ type: 'list',
176
+ items: [
177
+ '<strong>Efficacité (COP) :</strong> Un système aérothermique a généralement un COP moyen de 4.',
178
+ '<strong>Avantages :</strong> Durabilité totale avec panneaux solaires.',
179
+ '<strong>Inconvénients :</strong> Investissement initial élevé.',
180
+ ],
181
+ },
182
+ {
183
+ type: 'tip',
184
+ title: 'Conseil d\'économie',
185
+ html: 'L\'aérothermie brille particulièrement lorsqu\'elle est combinée avec un plancher chauffant.',
186
+ },
187
+ {
188
+ type: 'proscons',
189
+ title: 'Aérothermie vs Gaz Naturel',
190
+ proTitle: 'Pourquoi l\'Aérothermie ?',
191
+ conTitle: 'Pourquoi le Gaz ?',
192
+ items: [
193
+ { pro: 'Efficacité imbattable (COP 4+)', con: 'Installation moins chère' },
194
+ { pro: 'Indépendance fossile', con: 'Chauffage instantané' },
195
+ { pro: 'Froid et Chaud', con: 'Compatibilité anciens radiateurs' },
196
+ { pro: 'Idéal avec solaire', con: 'Pas d\'unités extérieures complexes' },
197
+ ],
198
+ },
199
+ {
200
+ type: 'title',
201
+ text: '3. Pompe à chaleur Air-Air (Climatisation Split)',
202
+ level: 3,
203
+ },
204
+ {
205
+ type: 'paragraph',
206
+ html: 'Communément appelé "split". Son efficacité (SCOP) se situe généralement entre 3 et 3,5.',
207
+ },
208
+ {
209
+ type: 'title',
210
+ text: 'Comprendre la formule de calcul',
211
+ level: 2,
212
+ },
213
+ {
214
+ type: 'paragraph',
215
+ html: 'Pour comparer ces systèmes, nous utilisons la formule suivante :',
216
+ },
217
+ {
218
+ type: 'code',
219
+ code: 'Coût annuel = (Demande thermique / Efficacité système) × Prix énergie',
220
+ ariaLabel: 'Formule de calcul du coût annuel',
221
+ },
222
+ {
223
+ type: 'paragraph',
224
+ html: 'Où :',
225
+ },
226
+ {
227
+ type: 'list',
228
+ items: [
229
+ '<strong>Demande :</strong> Les kWh nécessaires par an.',
230
+ '<strong>Efficacité :</strong> 0,95 (Gaz), 4,0 (Aéro), 3,2 (Air).',
231
+ '<strong>Prix :</strong> Le coût par kWh.',
232
+ ],
233
+ },
234
+ {
235
+ type: 'card',
236
+ title: 'Exemple réel : Logement de 100m²',
237
+ icon: 'mdi:home-analytics',
238
+ html: '<p>Pour 7 000 kWh/an :</p><ul><li><strong>Gaz :</strong> 589 €/an</li><li><strong>Aéro :</strong> 315 €/an</li><li><strong>Air :</strong> 393 €/an</li></ul>',
239
+ },
240
+ {
241
+ type: 'title',
242
+ text: 'Conclusion : L\'avenir est électrique',
243
+ level: 2,
244
+ },
245
+ {
246
+ type: 'paragraph',
247
+ html: 'La tendance européenne est claire : la décarbonation. Le gaz naturel a une date d\'expiration.',
248
+ },
249
+ {
250
+ type: 'paragraph',
251
+ html: 'Utilisez notre calculateur pour comparer vos factures.',
252
+ },
253
+ ],
254
+ ui: {
255
+ titleVivienda: '1. Données du logement',
256
+ helperVivienda: 'Configurez votre maison',
257
+ labelM2: 'Surface Totale',
258
+ helperM2: 'Mètres carrés.',
259
+ labelAislamiento: 'Niveau d\'Isolation',
260
+ helperAislamiento: 'Qualité de l\'isolation.',
261
+ optExcelent: 'Excellente (Neuf / Passivhaus)',
262
+ optMedium: 'Moyenne (Double vitrage)',
263
+ optPoor: 'Faible (Ancienne)',
264
+ titleCoste: '2. Coût de l\'énergie',
265
+ descCoste: 'Prix par kWh sur votre facture.',
266
+ labelGasPrice: 'Coût du Gaz',
267
+ helperGasPrice: 'Prix par kWh consommé.',
268
+ labelElecPrice: 'Coût de l\'Électricité',
269
+ helperElecPrice: 'Prix par kWh consommé.',
270
+ titleComparison: '3. Comparaison Annuelle',
271
+ descComparison: 'Estimation basée sur la performance technique.',
272
+ systemGas: 'Chaudière à Gaz',
273
+ systemAero: 'Aérothermie',
274
+ systemAir: 'Pompe à Chaleur (Split)',
275
+ labelAnnualCost: 'Dépenses Chauffage',
276
+ labelEfficiency: 'Efficacité',
277
+ labelSource: 'Source',
278
+ labelEnergy: 'Énergie',
279
+ labelInstallation: 'Installation',
280
+ valGasSource: 'Gaz Naturel',
281
+ valAeroEnergy: 'Renouvelable + Élec',
282
+ valAirInstall: 'Air-Air',
283
+ winnerBadge: 'Plus Efficace',
284
+ unitCurrency: '€',
285
+ },
286
+ };
@@ -0,0 +1,30 @@
1
+ import type { HomeToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
+ import HeatingComparatorComponent from './component.astro';
3
+ import HeatingComparatorSEO from './seo.astro';
4
+ import HeatingComparatorBibliography from './bibliography.astro';
5
+
6
+ import type { HeatingComparatorUI } from './ui';
7
+
8
+ export type HeatingComparatorLocaleContent = ToolLocaleContent<HeatingComparatorUI>;
9
+
10
+ export const heatingComparator: HomeToolEntry<HeatingComparatorUI> = {
11
+ id: 'heating-comparator',
12
+ icons: {
13
+ bg: 'mdi:home-thermometer',
14
+ fg: 'mdi:heating-coil',
15
+ },
16
+ i18n: {
17
+ es: async () => (await import('./i18n/es')).content,
18
+ en: async () => (await import('./i18n/en')).content,
19
+ fr: async () => (await import('./i18n/fr')).content,
20
+ },
21
+ };
22
+
23
+ export { HeatingComparatorComponent, HeatingComparatorSEO, HeatingComparatorBibliography };
24
+
25
+ export const HEATING_COMPARATOR_TOOL: ToolDefinition = {
26
+ entry: heatingComparator,
27
+ Component: HeatingComparatorComponent,
28
+ SEOComponent: HeatingComparatorSEO,
29
+ BibliographyComponent: HeatingComparatorBibliography,
30
+ };
@@ -0,0 +1,15 @@
1
+ ---
2
+ import { SEORenderer, FAQSection } from '@jjlmoya/utils-shared';
3
+ import { heatingComparator } 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 heatingComparator.i18n[locale]?.();
12
+ if (!content) return null;
13
+ ---
14
+ <SEORenderer content={{ locale: locale as string, sections: content.seo }} />
15
+ <FAQSection items={content.faq} />
@@ -0,0 +1,32 @@
1
+ export interface HeatingComparatorUI extends Record<string, string> {
2
+ titleVivienda: string;
3
+ helperVivienda: string;
4
+ labelM2: string;
5
+ helperM2: string;
6
+ labelAislamiento: string;
7
+ helperAislamiento: string;
8
+ optExcelent: string;
9
+ optMedium: string;
10
+ optPoor: string;
11
+ titleCoste: string;
12
+ descCoste: string;
13
+ labelGasPrice: string;
14
+ helperGasPrice: string;
15
+ labelElecPrice: string;
16
+ helperElecPrice: string;
17
+ titleComparison: string;
18
+ descComparison: string;
19
+ systemGas: string;
20
+ systemAero: string;
21
+ systemAir: string;
22
+ labelAnnualCost: string;
23
+ labelEfficiency: string;
24
+ labelSource: string;
25
+ labelEnergy: string;
26
+ labelInstallation: string;
27
+ valGasSource: string;
28
+ valAeroEnergy: string;
29
+ valAirInstall: string;
30
+ winnerBadge: string;
31
+ unitCurrency: string;
32
+ }
package/src/tools.ts CHANGED
@@ -5,5 +5,14 @@ import { PROJECTOR_CALCULATOR_TOOL } from './tool/projectorCalculator/index';
5
5
  import { DEW_POINT_CALCULATOR_TOOL } from './tool/dewPointCalculator/index';
6
6
  import { LED_SAVING_CALCULATOR_TOOL } from './tool/ledSavingCalculator/index';
7
7
  import { TARIFF_COMPARATOR_TOOL } from './tool/tariffComparator/index';
8
+ import { HEATING_COMPARATOR_TOOL } from './tool/heatingComparator/index';
8
9
 
9
- export const ALL_TOOLS: ToolDefinition[] = [QR_GENERATOR_TOOL, SOLAR_CALCULATOR_TOOL, PROJECTOR_CALCULATOR_TOOL, DEW_POINT_CALCULATOR_TOOL, LED_SAVING_CALCULATOR_TOOL, TARIFF_COMPARATOR_TOOL];
10
+ export const ALL_TOOLS: ToolDefinition[] = [
11
+ QR_GENERATOR_TOOL,
12
+ SOLAR_CALCULATOR_TOOL,
13
+ PROJECTOR_CALCULATOR_TOOL,
14
+ DEW_POINT_CALCULATOR_TOOL,
15
+ LED_SAVING_CALCULATOR_TOOL,
16
+ TARIFF_COMPARATOR_TOOL,
17
+ HEATING_COMPARATOR_TOOL,
18
+ ];