@jjlmoya/utils-finance 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 (133) hide show
  1. package/package.json +64 -0
  2. package/src/category/i18n/en.ts +159 -0
  3. package/src/category/i18n/es.ts +159 -0
  4. package/src/category/i18n/fr.ts +159 -0
  5. package/src/category/index.ts +24 -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 +32 -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 +39 -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/schemas_fulfillment.test.ts +23 -0
  21. package/src/tests/seo_length.test.ts +23 -0
  22. package/src/tests/title_quality.test.ts +55 -0
  23. package/src/tests/tool_validation.test.ts +17 -0
  24. package/src/tool/compoundInterest/bibliography.astro +14 -0
  25. package/src/tool/compoundInterest/component.astro +697 -0
  26. package/src/tool/compoundInterest/i18n/en.ts +212 -0
  27. package/src/tool/compoundInterest/i18n/es.ts +212 -0
  28. package/src/tool/compoundInterest/i18n/fr.ts +212 -0
  29. package/src/tool/compoundInterest/index.ts +34 -0
  30. package/src/tool/compoundInterest/logic.ts +40 -0
  31. package/src/tool/compoundInterest/seo.astro +14 -0
  32. package/src/tool/compoundInterest/ui.ts +19 -0
  33. package/src/tool/courtFeeCalculator/bibliography.astro +14 -0
  34. package/src/tool/courtFeeCalculator/component.astro +427 -0
  35. package/src/tool/courtFeeCalculator/i18n/en.ts +268 -0
  36. package/src/tool/courtFeeCalculator/i18n/es.ts +268 -0
  37. package/src/tool/courtFeeCalculator/i18n/fr.ts +268 -0
  38. package/src/tool/courtFeeCalculator/index.ts +33 -0
  39. package/src/tool/courtFeeCalculator/logic.ts +86 -0
  40. package/src/tool/courtFeeCalculator/seo.astro +14 -0
  41. package/src/tool/courtFeeCalculator/ui.ts +31 -0
  42. package/src/tool/debtSnowball/bibliography.astro +14 -0
  43. package/src/tool/debtSnowball/component.astro +1052 -0
  44. package/src/tool/debtSnowball/i18n/en.ts +288 -0
  45. package/src/tool/debtSnowball/i18n/es.ts +288 -0
  46. package/src/tool/debtSnowball/i18n/fr.ts +288 -0
  47. package/src/tool/debtSnowball/index.ts +37 -0
  48. package/src/tool/debtSnowball/logic.ts +156 -0
  49. package/src/tool/debtSnowball/seo.astro +14 -0
  50. package/src/tool/debtSnowball/ui.ts +49 -0
  51. package/src/tool/fireCalculator/bibliography.astro +14 -0
  52. package/src/tool/fireCalculator/component.astro +689 -0
  53. package/src/tool/fireCalculator/i18n/en.ts +261 -0
  54. package/src/tool/fireCalculator/i18n/es.ts +261 -0
  55. package/src/tool/fireCalculator/i18n/fr.ts +261 -0
  56. package/src/tool/fireCalculator/index.ts +33 -0
  57. package/src/tool/fireCalculator/logic.ts +108 -0
  58. package/src/tool/fireCalculator/seo.astro +14 -0
  59. package/src/tool/fireCalculator/ui.ts +33 -0
  60. package/src/tool/ibanBicSwiftConverter/bibliography.astro +14 -0
  61. package/src/tool/ibanBicSwiftConverter/component.astro +581 -0
  62. package/src/tool/ibanBicSwiftConverter/i18n/en.ts +167 -0
  63. package/src/tool/ibanBicSwiftConverter/i18n/es.ts +216 -0
  64. package/src/tool/ibanBicSwiftConverter/i18n/fr.ts +167 -0
  65. package/src/tool/ibanBicSwiftConverter/index.ts +33 -0
  66. package/src/tool/ibanBicSwiftConverter/logic.ts +101 -0
  67. package/src/tool/ibanBicSwiftConverter/seo.astro +14 -0
  68. package/src/tool/ibanBicSwiftConverter/ui.ts +17 -0
  69. package/src/tool/inflation/bibliography.astro +14 -0
  70. package/src/tool/inflation/component.astro +400 -0
  71. package/src/tool/inflation/i18n/en.ts +301 -0
  72. package/src/tool/inflation/i18n/es.ts +301 -0
  73. package/src/tool/inflation/i18n/fr.ts +301 -0
  74. package/src/tool/inflation/index.ts +34 -0
  75. package/src/tool/inflation/logic.ts +92 -0
  76. package/src/tool/inflation/seo.astro +14 -0
  77. package/src/tool/inflation/ui.ts +17 -0
  78. package/src/tool/lateInterest/bibliography.astro +14 -0
  79. package/src/tool/lateInterest/component.astro +655 -0
  80. package/src/tool/lateInterest/i18n/en.ts +255 -0
  81. package/src/tool/lateInterest/i18n/es.ts +224 -0
  82. package/src/tool/lateInterest/i18n/fr.ts +224 -0
  83. package/src/tool/lateInterest/index.ts +34 -0
  84. package/src/tool/lateInterest/logic.ts +89 -0
  85. package/src/tool/lateInterest/seo.astro +14 -0
  86. package/src/tool/lateInterest/ui.ts +33 -0
  87. package/src/tool/legalInterestRate/bibliography.astro +14 -0
  88. package/src/tool/legalInterestRate/component.astro +650 -0
  89. package/src/tool/legalInterestRate/i18n/en.ts +159 -0
  90. package/src/tool/legalInterestRate/i18n/es.ts +159 -0
  91. package/src/tool/legalInterestRate/i18n/fr.ts +159 -0
  92. package/src/tool/legalInterestRate/index.ts +33 -0
  93. package/src/tool/legalInterestRate/logic.ts +29 -0
  94. package/src/tool/legalInterestRate/seo.astro +14 -0
  95. package/src/tool/legalInterestRate/ui.ts +23 -0
  96. package/src/tool/lotteryOptimizer/bibliography.astro +14 -0
  97. package/src/tool/lotteryOptimizer/component.astro +863 -0
  98. package/src/tool/lotteryOptimizer/i18n/en.ts +188 -0
  99. package/src/tool/lotteryOptimizer/i18n/es.ts +281 -0
  100. package/src/tool/lotteryOptimizer/i18n/fr.ts +188 -0
  101. package/src/tool/lotteryOptimizer/index.ts +33 -0
  102. package/src/tool/lotteryOptimizer/logic.ts +133 -0
  103. package/src/tool/lotteryOptimizer/seo.astro +14 -0
  104. package/src/tool/lotteryOptimizer/ui.ts +33 -0
  105. package/src/tool/mortgage/bibliography.astro +14 -0
  106. package/src/tool/mortgage/component.astro +1030 -0
  107. package/src/tool/mortgage/i18n/en.ts +227 -0
  108. package/src/tool/mortgage/i18n/es.ts +227 -0
  109. package/src/tool/mortgage/i18n/fr.ts +227 -0
  110. package/src/tool/mortgage/index.ts +34 -0
  111. package/src/tool/mortgage/logic.ts +118 -0
  112. package/src/tool/mortgage/seo.astro +14 -0
  113. package/src/tool/mortgage/ui.ts +35 -0
  114. package/src/tool/percentageCalculator/bibliography.astro +14 -0
  115. package/src/tool/percentageCalculator/component.astro +640 -0
  116. package/src/tool/percentageCalculator/i18n/en.ts +233 -0
  117. package/src/tool/percentageCalculator/i18n/es.ts +233 -0
  118. package/src/tool/percentageCalculator/i18n/fr.ts +233 -0
  119. package/src/tool/percentageCalculator/index.ts +34 -0
  120. package/src/tool/percentageCalculator/logic.ts +48 -0
  121. package/src/tool/percentageCalculator/seo.astro +14 -0
  122. package/src/tool/percentageCalculator/ui.ts +30 -0
  123. package/src/tool/rentIncreaseCalculator/bibliography.astro +14 -0
  124. package/src/tool/rentIncreaseCalculator/component.astro +587 -0
  125. package/src/tool/rentIncreaseCalculator/i18n/en.ts +159 -0
  126. package/src/tool/rentIncreaseCalculator/i18n/es.ts +220 -0
  127. package/src/tool/rentIncreaseCalculator/i18n/fr.ts +159 -0
  128. package/src/tool/rentIncreaseCalculator/index.ts +33 -0
  129. package/src/tool/rentIncreaseCalculator/logic.ts +43 -0
  130. package/src/tool/rentIncreaseCalculator/seo.astro +14 -0
  131. package/src/tool/rentIncreaseCalculator/ui.ts +19 -0
  132. package/src/tools.ts +16 -0
  133. package/src/types.ts +74 -0
@@ -0,0 +1,159 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { RentIncreaseUI } from '../ui';
4
+
5
+ const slug = 'rent-increase-calculator';
6
+ const title = 'Spain Rent Increase Calculator IPC 2026 with 3% Legal Cap';
7
+ const description = 'Calculate your rent increase based on IPC or the legal 3% limit from Spain\'s Housing Law. Free tool for Spanish tenants and landlords.';
8
+
9
+ const faqData = [
10
+ {
11
+ question: 'What is the maximum rent increase allowed in 2024 and 2025?',
12
+ answer: 'According to Spain\'s Law 12/2023 on the Right to Housing, the maximum annual rent increase for primary residences in 2024 and 2025 is limited to 3% by law. This limit applies even if the IPC (Consumer Price Index) is higher.',
13
+ },
14
+ {
15
+ question: 'Is it mandatory to raise the rent every year based on IPC?',
16
+ answer: 'No, it is not mandatory by law. For the rent to increase, the lease must include an explicit clause mentioning annual adjustments. If no such clause exists, the initial agreed price remains in effect for the duration of the contract.',
17
+ },
18
+ {
19
+ question: 'How much notice must a landlord give for a rent increase?',
20
+ answer: 'The landlord must notify the tenant in writing at least one month (30 days) before the new rent takes effect. If notice is given later, the increase only starts counting from the following month after notification.',
21
+ },
22
+ {
23
+ question: 'What happens if the IPC exceeds the 3% legal limit?',
24
+ answer: 'Even if the IPC published by Spain\'s INE (National Statistics Institute) is 5% or 6%, a landlord cannot legally demand more than a 3% increase for primary residences in 2026. Any attempt to charge more is legally challengeable.',
25
+ },
26
+ {
27
+ question: 'What types of contracts are not subject to the 3% limit?',
28
+ answer: 'The limit typically does not apply to commercial spaces, industrial warehouses, offices, or independent garage spaces. These are governed by what the parties freely agree upon in the contract.',
29
+ },
30
+ ];
31
+
32
+ const howToData = [
33
+ {
34
+ name: 'Enter your current rent',
35
+ text: 'Type the monthly amount you currently pay as shown on your rent receipt.',
36
+ },
37
+ {
38
+ name: 'Choose your calculation method',
39
+ text: 'Select the 3% Legal Cap (recommended for primary residences) or enter a custom percentage.',
40
+ },
41
+ {
42
+ name: 'View the results',
43
+ text: 'Get the estimated new rent, monthly increase, and annual extra cost at a glance.',
44
+ },
45
+ {
46
+ name: 'Copy the summary',
47
+ text: 'Generate a quick report to send to your landlord or save for your records.',
48
+ },
49
+ ];
50
+
51
+ const bibliographyData = [
52
+ {
53
+ name: 'Law 12/2023 on the Right to Housing (BOE.es)',
54
+ url: 'https://www.boe.es/buscar/act.php?id=BOE-A-2023-12203',
55
+ },
56
+ {
57
+ name: 'IPC Calculator by Spain\'s National Statistics Institute (INE)',
58
+ url: 'https://www.ine.es/varipc/index.do',
59
+ },
60
+ {
61
+ name: 'Urban Rental Law - Consolidated Text',
62
+ url: 'https://www.boe.es/buscar/act.php?id=BOE-A-1994-26017',
63
+ },
64
+ ];
65
+
66
+ const seoData = [
67
+ {
68
+ type: 'title',
69
+ text: 'Understanding the 3% Legal Cap on Rent Increases',
70
+ },
71
+ {
72
+ type: 'paragraph',
73
+ html: 'Spain\'s Law 12/2023 on the Right to Housing establishes a <strong>maximum 3% annual increase limit</strong> for primary residence rentals in 2024 and 2025. This tenant protection measure takes precedence over the Consumer Price Index (IPC) when it exceeds 3%.',
74
+ },
75
+ {
76
+ type: 'title',
77
+ text: 'When to Use Manual vs Legal Cap Calculation',
78
+ },
79
+ {
80
+ type: 'paragraph',
81
+ html: 'Use this calculator in two ways: apply the <strong>3% legal cap</strong> (recommended for primary residences) or enter a <strong>custom percentage</strong> if calculating increases for commercial properties or periods before 2024.',
82
+ },
83
+ {
84
+ type: 'title',
85
+ text: 'What Makes a Rent Increase Legal',
86
+ },
87
+ {
88
+ type: 'paragraph',
89
+ html: '<strong>For a rent increase to be valid:</strong> The lease must include an annual adjustment clause. The landlord must give written notice at least 30 days in advance. The increase cannot exceed 3% for primary residences (2026). Tenants can challenge non-compliance with these requirements.',
90
+ },
91
+ ];
92
+
93
+ const faqSchema: WithContext<FAQPage> = {
94
+ '@context': 'https://schema.org',
95
+ '@type': 'FAQPage',
96
+ mainEntity: faqData.map((item) => ({
97
+ '@type': 'Question',
98
+ name: item.question,
99
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
100
+ })),
101
+ };
102
+
103
+ const howToSchema: WithContext<HowTo> = {
104
+ '@context': 'https://schema.org',
105
+ '@type': 'HowTo',
106
+ name: title,
107
+ description,
108
+ step: howToData.map((step, i) => ({
109
+ '@type': 'HowToStep',
110
+ position: i + 1,
111
+ name: step.name,
112
+ text: step.text,
113
+ })),
114
+ };
115
+
116
+ const appSchema: WithContext<SoftwareApplication> = {
117
+ '@context': 'https://schema.org',
118
+ '@type': 'SoftwareApplication',
119
+ name: title,
120
+ description,
121
+ applicationCategory: 'FinanceApplication',
122
+ offers: {
123
+ '@type': 'Offer',
124
+ price: '0',
125
+ priceCurrency: 'USD',
126
+ },
127
+ };
128
+
129
+ export const content: ToolLocaleContent<RentIncreaseUI> = {
130
+ slug,
131
+ title,
132
+ description,
133
+ faqTitle: 'Frequently Asked Questions',
134
+ bibliographyTitle: 'Sources and References',
135
+ ui: {
136
+ labelTitle: 'Rent Increase Calculator',
137
+ labelDescription: 'Adjust your rent based on IPC or apply the legal 3% cap safely and quickly.',
138
+ labelCurrentRent: 'Current Rent',
139
+ labelCurrentRentPlaceholder: 'E.g. 800',
140
+ labelIncrementType: 'Calculation Method',
141
+ labelLegalLimit: 'Housing Law Cap (3%)',
142
+ labelManualIncrement: 'Manual Percentage (%)',
143
+ labelManualPercentagePlaceholder: 'E.g. 2.5',
144
+ labelNewRentEstimate: 'Estimated New Rent',
145
+ labelMonthlyIncrease: 'Monthly Increase',
146
+ labelYearlyExtra: 'Annual Extra Cost',
147
+ labelLegalBadge: 'Limited to 3% per Law 12/2023',
148
+ labelCopyButton: 'Copy for landlord',
149
+ labelCopySuccess: 'Copied!',
150
+ currencySymbol: '$',
151
+ currencyCode: 'USD',
152
+ currencyLocale: 'en-US',
153
+ },
154
+ faq: faqData,
155
+ howTo: howToData,
156
+ bibliography: bibliographyData,
157
+ seo: seoData,
158
+ schemas: [faqSchema, howToSchema, appSchema],
159
+ };
@@ -0,0 +1,220 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { RentIncreaseUI } from '../ui';
4
+
5
+ const slug = 'calculadora-subida-alquiler-ipc';
6
+ const title = 'Calculadora de Subida de Alquiler IPC 2026 Límite del 3%';
7
+ const description = 'Calcula gratis la actualización de tu renta con el IPC o el límite legal del 3% de la Ley de Vivienda. Guía completa para inquilinos y propietarios.';
8
+
9
+ const faqData = [
10
+ {
11
+ question: '¿Cuál es la subida máxima de alquiler permitida en 2024 y 2025?',
12
+ answer: 'Según la Ley 12/2023 por el Derecho a la Vivienda, para los años 2024 y 2025, el incremento máximo anual de la renta en contratos de vivienda habitual está limitado legalmente al 3%. Esta medida prevalece sobre el IPC si este último fuera superior.',
13
+ },
14
+ {
15
+ question: '¿Es obligatorio subir el alquiler todos los años con el IPC?',
16
+ answer: 'No es obligatorio por ley. Para que la renta suba, el contrato de arrendamiento debe incluir una cláusula explícita que mencione la actualización anual. Si no existe dicha cláusula, el precio pactado inicialmente debe mantenerse durante toda la vigencia del contrato.',
17
+ },
18
+ {
19
+ question: '¿Con cuánta antelación debe notificar el casero la subida de la renta?',
20
+ answer: 'El arrendador debe comunicar la subida por escrito al inquilino con al menos un mes de antelación (30 días) respecto a la fecha en que deba aplicarse la nueva renta. Si se avisa más tarde, el incremento solo empezará a contar desde el mes siguiente a la notificación.',
21
+ },
22
+ {
23
+ question: '¿Qué ocurre si el IPC es superior al límite legal del 3%?',
24
+ answer: 'Incluso si el IPC real publicado por el INE es del 5% o 6%, el propietario de una vivienda habitual no puede exigir legalmente una subida superior al 3% durante 2024 y 2025. Cualquier intento de cobrar de más es impugnable legalmente.',
25
+ },
26
+ {
27
+ question: '¿A qué tipos de contratos no se aplica el límite del 3%?',
28
+ answer: 'El límite no suele aplicarse a contratos de alquiler de locales comerciales, naves industriales, oficinas o plazas de garaje independientes. Estos se rigen prioritariamente por lo que hayan pactado libremente las partes en el contrato.',
29
+ },
30
+ ];
31
+
32
+ const howToData = [
33
+ {
34
+ name: 'Introduce tu alquiler actual',
35
+ text: 'Escribe la mensualidad que pagas actualmente en tu recibo de alquiler.',
36
+ },
37
+ {
38
+ name: 'Elige el modo de cálculo',
39
+ text: 'Selecciona el Tope Legal del 3% (recomendado) o introduce un porcentaje manual si lo prefieres.',
40
+ },
41
+ {
42
+ name: 'Consulta los resultados',
43
+ text: 'Obtendrás la nueva renta estimada, el incremento mensual y el sobrecoste anual de un vistazo.',
44
+ },
45
+ {
46
+ name: 'Copia el resumen',
47
+ text: 'Genera un informe rápido para enviárselo al propietario o guardarlo en tus notas.',
48
+ },
49
+ ];
50
+
51
+ const bibliographyData = [
52
+ {
53
+ name: 'Ley 12/2023 por el Derecho a la Vivienda (BOE.es)',
54
+ url: 'https://www.boe.es/buscar/act.php?id=BOE-A-2023-12203',
55
+ },
56
+ {
57
+ name: 'Calculadora de IPC del Instituto Nacional de Estadística (INE)',
58
+ url: 'https://www.ine.es/varipc/index.do',
59
+ },
60
+ {
61
+ name: 'Ley de Arrendamientos Urbanos - Texto Consolidado',
62
+ url: 'https://www.boe.es/buscar/act.php?id=BOE-A-1994-26017',
63
+ },
64
+ ];
65
+
66
+ const seoData = [
67
+ {
68
+ type: 'title',
69
+ text: 'Calculadora de Subida de Alquiler con IPC: Guía Completa y Límite del 3%',
70
+ level: 2,
71
+ },
72
+ {
73
+ type: 'paragraph',
74
+ html: 'La actualización de la renta es uno de los momentos más críticos en la relación entre arrendador y arrendatario. En España, el <strong>Índice de Precios de Consumo (IPC)</strong> ha sido tradicionalmente el termómetro utilizado para ajustar el precio del alquiler. Sin embargo, con la <strong>Ley 12/2023 por el Derecho a la Vivienda</strong>, se han introducido límites que todo inquilino y propietario debe conocer.',
75
+ },
76
+ {
77
+ type: 'title',
78
+ text: '¿Qué es el IPC y cómo afecta al alquiler?',
79
+ level: 3,
80
+ },
81
+ {
82
+ type: 'paragraph',
83
+ html: 'El IPC es un indicador que mide la variación de los precios de una cesta de bienes y servicios representativa del consumo de los hogares. Cuando un contrato de alquiler incluye una cláusula de actualización, el precio suele revisarse anualmente tomando como referencia la variación porcentual de este índice.',
84
+ },
85
+ {
86
+ type: 'paragraph',
87
+ html: '<strong>Es importante destacar que la subida no es automática</strong>. Para que la renta suba, el contrato debe especificar explícitamente que se actualizará conforme al IPC. Si no incluye esta cláusula, el precio debe permanecer invariable durante toda la vigencia del mismo.',
88
+ },
89
+ {
90
+ type: 'title',
91
+ text: 'El Límite del 3% en 2024 y 2025',
92
+ level: 3,
93
+ },
94
+ {
95
+ type: 'paragraph',
96
+ html: 'Debido a los altos niveles de inflación, el Gobierno introdujo medidas extraordinarias. Para los años <strong>2024 y 2025</strong>, el límite máximo permitido se ha fijado en el <strong>3%</strong>. Este límite legal prevalece sobre lo que diga el contrato.',
97
+ },
98
+ {
99
+ type: 'list',
100
+ items: [
101
+ '<strong>Grandes Tenedores:</strong> No pueden subir más del 3% bajo ninguna circunstancia.',
102
+ '<strong>Pequeños Tenedores:</strong> El incremento debe ser pactado. Si no hay acuerdo, no podrá superar el 3%.',
103
+ '<strong>Locales u Oficinas:</strong> No suelen estar sujetos a este límite, rigiéndose por lo pactado libremente.',
104
+ ],
105
+ },
106
+ {
107
+ type: 'title',
108
+ text: 'Cómo Calcular la Subida Paso a Paso',
109
+ level: 3,
110
+ },
111
+ {
112
+ type: 'paragraph',
113
+ html: '<strong>Nueva Renta = Mensualidad × (1 + Porcentaje / 100)</strong><br/><strong>Incremento = Mensualidad × (Porcentaje / 100)</strong>',
114
+ },
115
+ {
116
+ type: 'card',
117
+ icon: 'mdi:calculator',
118
+ title: 'Ejemplo Práctico',
119
+ html: '<p>Alquiler de 950€ actualizado al 3%:</p><ul><li>Cálculo: 950 × 0,03 = 28,50€</li><li>Nueva Renta: 978,50€</li><li>Coste Anual: 342€</li></ul>',
120
+ },
121
+ {
122
+ type: 'title',
123
+ text: 'Requisitos para una Subida Válida',
124
+ level: 3,
125
+ },
126
+ {
127
+ type: 'list',
128
+ items: [
129
+ '<strong>Anualidad Cumplida:</strong> Solo cuando se cumpla cada año. No a mitad de año.',
130
+ '<strong>Notificación Escrita:</strong> Con al menos 30 días de antelación (burofax o email certificado).',
131
+ '<strong>Certificación INE:</strong> Adjuntar datos oficiales del IPC.',
132
+ ],
133
+ },
134
+ {
135
+ type: 'tip',
136
+ title: 'Si el IPC es Negativo',
137
+ html: '<p>Si el IPC es negativo (deflación), el inquilino tiene derecho a una <strong>bajada de la renta</strong>, siempre que el contrato no lo prohíba explícitamente.</p>',
138
+ },
139
+ {
140
+ type: 'title',
141
+ text: 'Vivienda Habitual vs. Local Comercial',
142
+ level: 3,
143
+ },
144
+ {
145
+ type: 'list',
146
+ items: [
147
+ '<strong>Vivienda Habitual:</strong> Sujeta al límite del 3%.',
148
+ '<strong>Temporal/Habitaciones:</strong> Regulación más ambigua, por lo pactado.',
149
+ '<strong>Locales/Naves:</strong> Libertad de pactos. Sin límites legales.',
150
+ ],
151
+ },
152
+ ];
153
+
154
+ const faqSchema: WithContext<FAQPage> = {
155
+ '@context': 'https://schema.org',
156
+ '@type': 'FAQPage',
157
+ mainEntity: faqData.map((item) => ({
158
+ '@type': 'Question',
159
+ name: item.question,
160
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
161
+ })),
162
+ };
163
+
164
+ const howToSchema: WithContext<HowTo> = {
165
+ '@context': 'https://schema.org',
166
+ '@type': 'HowTo',
167
+ name: title,
168
+ description,
169
+ step: howToData.map((step, i) => ({
170
+ '@type': 'HowToStep',
171
+ position: i + 1,
172
+ name: step.name,
173
+ text: step.text,
174
+ })),
175
+ };
176
+
177
+ const appSchema: WithContext<SoftwareApplication> = {
178
+ '@context': 'https://schema.org',
179
+ '@type': 'SoftwareApplication',
180
+ name: title,
181
+ description,
182
+ applicationCategory: 'FinanceApplication',
183
+ offers: {
184
+ '@type': 'Offer',
185
+ price: '0',
186
+ priceCurrency: 'EUR',
187
+ },
188
+ };
189
+
190
+ export const content: ToolLocaleContent<RentIncreaseUI> = {
191
+ slug,
192
+ title,
193
+ description,
194
+ faqTitle: 'Preguntas Frecuentes',
195
+ bibliographyTitle: 'Fuentes y Referencias',
196
+ ui: {
197
+ labelTitle: 'Calculadora de Subida de Alquiler',
198
+ labelDescription: 'Ajusta tu renta conforme al IPC o aplica el límite legal del 3% de forma segura.',
199
+ labelCurrentRent: 'Alquiler Actual',
200
+ labelCurrentRentPlaceholder: 'Ej. 800',
201
+ labelIncrementType: 'Modo Actualización',
202
+ labelLegalLimit: 'Tope Ley Vivienda (3%)',
203
+ labelManualIncrement: 'Incremento Manual (%)',
204
+ labelManualPercentagePlaceholder: 'Ej. 2.5',
205
+ labelNewRentEstimate: 'Nueva Renta Estimada',
206
+ labelMonthlyIncrease: 'Incremento Mensual',
207
+ labelYearlyExtra: 'Sobrecoste Anual',
208
+ labelLegalBadge: 'Limitado al 3% según Ley 12/2023',
209
+ labelCopyButton: 'Copiar para el propietario',
210
+ labelCopySuccess: '¡Copiado!',
211
+ currencySymbol: '€',
212
+ currencyCode: 'EUR',
213
+ currencyLocale: 'es-ES',
214
+ },
215
+ faq: faqData,
216
+ howTo: howToData,
217
+ bibliography: bibliographyData,
218
+ seo: seoData,
219
+ schemas: [faqSchema, howToSchema, appSchema],
220
+ };
@@ -0,0 +1,159 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { RentIncreaseUI } from '../ui';
4
+
5
+ const slug = 'calculatrice-augmentation-loyer';
6
+ const title = 'Calculatrice d\'Augmentation de Loyer Espagne 2026 Plafond Légal 3%';
7
+ const description = 'Calculez gratuitement l\'augmentation de votre loyer en Espagne selon l\'IPC ou le plafond légal de 3% de la Loi sur le Droit au Logement.';
8
+
9
+ const faqData = [
10
+ {
11
+ question: 'Quel est le pourcentage maximum d\'augmentation de loyer autorisé en 2024 et 2025?',
12
+ answer: 'Selon la Loi 12/2023 sur le Droit au Logement, l\'augmentation annuelle maximale du loyer pour les résidences principales en 2024 et 2025 est limitée à 3% par la loi. Cette limite s\'applique même si l\'IPC (Indice des Prix à la Consommation) est supérieur.',
13
+ },
14
+ {
15
+ question: 'Est-il obligatoire d\'augmenter le loyer chaque année selon l\'IPC?',
16
+ answer: 'Non, ce n\'est pas obligatoire par la loi. Pour que le loyer augmente, le bail doit inclure une clause explicite mentionnant les ajustements annuels. Si aucune clause de ce type n\'existe, le prix initialement convenu reste en vigueur pendant la durée du contrat.',
17
+ },
18
+ {
19
+ question: 'Quel délai le propriétaire doit-il respecter pour notifier une augmentation?',
20
+ answer: 'Le propriétaire doit notifier le locataire par écrit au moins un mois (30 jours) avant la date d\'effet du nouveau loyer. Si la notification intervient plus tard, l\'augmentation ne s\'applique qu\'à partir du mois suivant la notification.',
21
+ },
22
+ {
23
+ question: 'Que se passe-t-il si l\'IPC dépasse le plafond légal de 3%?',
24
+ answer: 'Même si l\'IPC publié par l\'INE (Institut National de la Statistique) espagnol est de 5% ou 6%, le propriétaire d\'une résidence principale ne peut pas légalement exiger une augmentation supérieure à 3% en 2024-2025. Toute tentative de facturer plus est légalement contestable.',
25
+ },
26
+ {
27
+ question: 'À quels types de contrats le plafond de 3% ne s\'applique-t-il pas?',
28
+ answer: 'Le plafond ne s\'applique généralement pas aux locaux commerciaux, entrepôts industriels, bureaux ou places de parking indépendantes. Ceux-ci sont régis par ce que les parties conviennent librement dans le contrat.',
29
+ },
30
+ ];
31
+
32
+ const howToData = [
33
+ {
34
+ name: 'Entrez votre loyer actuel',
35
+ text: 'Saisissez le montant mensuel que vous payez actuellement selon votre reçu de loyer.',
36
+ },
37
+ {
38
+ name: 'Choisissez votre méthode de calcul',
39
+ text: 'Sélectionnez le plafond légal de 3% (recommandé pour les résidences principales) ou entrez un pourcentage personnalisé.',
40
+ },
41
+ {
42
+ name: 'Consultez les résultats',
43
+ text: 'Obtenez le nouveau loyer estimé, l\'augmentation mensuelle et le surcoût annuel en un coup d\'œil.',
44
+ },
45
+ {
46
+ name: 'Copiez le résumé',
47
+ text: 'Générez un rapport rapide à envoyer à votre propriétaire ou à conserver pour vos dossiers.',
48
+ },
49
+ ];
50
+
51
+ const bibliographyData = [
52
+ {
53
+ name: 'Loi 12/2023 sur le Droit au Logement (BOE.es)',
54
+ url: 'https://www.boe.es/buscar/act.php?id=BOE-A-2023-12203',
55
+ },
56
+ {
57
+ name: 'Calculatrice d\'IPC de l\'Institut National de la Statistique espagnol (INE)',
58
+ url: 'https://www.ine.es/varipc/index.do',
59
+ },
60
+ {
61
+ name: 'Loi sur les Baux Urbains - Texte Consolidé',
62
+ url: 'https://www.boe.es/buscar/act.php?id=BOE-A-1994-26017',
63
+ },
64
+ ];
65
+
66
+ const seoData = [
67
+ {
68
+ type: 'title',
69
+ text: 'Comprendre le Plafond Légal de 3% pour les Augmentations de Loyer',
70
+ },
71
+ {
72
+ type: 'paragraph',
73
+ html: 'La Loi 12/2023 sur le Droit au Logement en Espagne établit un <strong>plafond d\'augmentation annuel de 3%</strong> pour les loyers de résidences principales en 2024 et 2025. Cette mesure de protection des locataires prévaut sur l\'Indice des Prix à la Consommation (IPC) lorsqu\'il dépasse 3%.',
74
+ },
75
+ {
76
+ type: 'title',
77
+ text: 'Quand Utiliser le Calcul Manuel ou le Plafond Légal',
78
+ },
79
+ {
80
+ type: 'paragraph',
81
+ html: 'Utilisez cette calculatrice de deux façons: appliquez le <strong>plafond légal de 3%</strong> (recommandé pour les résidences principales) ou entrez un <strong>pourcentage personnalisé</strong> si vous calculez les augmentations pour les propriétés commerciales ou les périodes antérieures à 2024.',
82
+ },
83
+ {
84
+ type: 'title',
85
+ text: 'Que Doit Respecter une Augmentation de Loyer Valide',
86
+ },
87
+ {
88
+ type: 'paragraph',
89
+ html: '<strong>Pour qu\'une augmentation de loyer soit valide:</strong> Le bail doit inclure une clause d\'ajustement annuel. Le propriétaire doit donner un préavis écrit d\'au moins 30 jours. L\'augmentation ne peut pas dépasser 3% pour les résidences principales (2024-2025). Les locataires peuvent contester le non-respect de ces conditions.',
90
+ },
91
+ ];
92
+
93
+ const faqSchema: WithContext<FAQPage> = {
94
+ '@context': 'https://schema.org',
95
+ '@type': 'FAQPage',
96
+ mainEntity: faqData.map((item) => ({
97
+ '@type': 'Question',
98
+ name: item.question,
99
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
100
+ })),
101
+ };
102
+
103
+ const howToSchema: WithContext<HowTo> = {
104
+ '@context': 'https://schema.org',
105
+ '@type': 'HowTo',
106
+ name: title,
107
+ description,
108
+ step: howToData.map((step, i) => ({
109
+ '@type': 'HowToStep',
110
+ position: i + 1,
111
+ name: step.name,
112
+ text: step.text,
113
+ })),
114
+ };
115
+
116
+ const appSchema: WithContext<SoftwareApplication> = {
117
+ '@context': 'https://schema.org',
118
+ '@type': 'SoftwareApplication',
119
+ name: title,
120
+ description,
121
+ applicationCategory: 'FinanceApplication',
122
+ offers: {
123
+ '@type': 'Offer',
124
+ price: '0',
125
+ priceCurrency: 'EUR',
126
+ },
127
+ };
128
+
129
+ export const content: ToolLocaleContent<RentIncreaseUI> = {
130
+ slug,
131
+ title,
132
+ description,
133
+ faqTitle: 'Questions Fréquemment Posées',
134
+ bibliographyTitle: 'Sources et Références',
135
+ ui: {
136
+ labelTitle: 'Calculatrice d\'Augmentation de Loyer',
137
+ labelDescription: 'Ajustez votre loyer selon l\'IPC ou appliquez le plafond légal de 3% de manière sûre.',
138
+ labelCurrentRent: 'Loyer Actuel',
139
+ labelCurrentRentPlaceholder: 'Ex. 800',
140
+ labelIncrementType: 'Méthode de Calcul',
141
+ labelLegalLimit: 'Plafond Légal (3%)',
142
+ labelManualIncrement: 'Pourcentage Manuel (%)',
143
+ labelManualPercentagePlaceholder: 'Ex. 2.5',
144
+ labelNewRentEstimate: 'Nouveau Loyer Estimé',
145
+ labelMonthlyIncrease: 'Augmentation Mensuelle',
146
+ labelYearlyExtra: 'Surcoût Annuel',
147
+ labelLegalBadge: 'Limité à 3% selon la Loi 12/2023',
148
+ labelCopyButton: 'Copier pour le propriétaire',
149
+ labelCopySuccess: 'Copié!',
150
+ currencySymbol: '€',
151
+ currencyCode: 'EUR',
152
+ currencyLocale: 'fr-FR',
153
+ },
154
+ faq: faqData,
155
+ howTo: howToData,
156
+ bibliography: bibliographyData,
157
+ seo: seoData,
158
+ schemas: [faqSchema, howToSchema, appSchema],
159
+ };
@@ -0,0 +1,33 @@
1
+ import type { FinanceToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
+ import RentIncreaseComponent from './component.astro';
3
+ import RentIncreaseSEO from './seo.astro';
4
+ import RentIncreaseBibliography from './bibliography.astro';
5
+ import type { RentIncreaseUI } from './ui';
6
+
7
+ export type RentIncreaseLocaleContent = ToolLocaleContent<RentIncreaseUI>;
8
+
9
+ import { content as es } from './i18n/es';
10
+ import { content as en } from './i18n/en';
11
+ import { content as fr } from './i18n/fr';
12
+
13
+ export const rentIncrease: FinanceToolEntry<RentIncreaseUI> = {
14
+ id: 'calculadora-subida-alquiler-ipc',
15
+ icons: {
16
+ bg: 'mdi:home-outline',
17
+ fg: 'mdi:percent',
18
+ },
19
+ i18n: {
20
+ es: async () => es,
21
+ en: async () => en,
22
+ fr: async () => fr,
23
+ },
24
+ };
25
+
26
+ export { RentIncreaseComponent, RentIncreaseSEO, RentIncreaseBibliography };
27
+
28
+ export const RENT_INCREASE_TOOL: ToolDefinition = {
29
+ entry: rentIncrease,
30
+ Component: RentIncreaseComponent,
31
+ SEOComponent: RentIncreaseSEO,
32
+ BibliographyComponent: RentIncreaseBibliography,
33
+ };
@@ -0,0 +1,43 @@
1
+ export class RentIncreaseCalculator {
2
+ static calculate(currentRent: number, percentage: number) {
3
+ const monthlyIncrease = currentRent * (percentage / 100);
4
+ const newRent = currentRent + monthlyIncrease;
5
+ const yearlyIncrease = monthlyIncrease * 12;
6
+
7
+ return {
8
+ currentRent,
9
+ percentage,
10
+ monthlyIncrease,
11
+ newRent,
12
+ yearlyIncrease,
13
+ barRatio: currentRent > 0 ? (currentRent / newRent) * 100 : 0,
14
+ };
15
+ }
16
+
17
+ static validateInputs(currentRent: number, percentage: number): boolean {
18
+ return currentRent > 0 && percentage >= 0 && percentage <= 100;
19
+ }
20
+
21
+ static generateReport(
22
+ currentRent: number,
23
+ percentage: number,
24
+ isLegal: boolean,
25
+ formatFn: (val: number) => string
26
+ ): string {
27
+ const calc = this.calculate(currentRent, percentage);
28
+ const percentageLabel = isLegal ? "3% (Legal Limit)" : `${percentage}%`;
29
+
30
+ return `
31
+ RENT INCREASE UPDATE
32
+ ----------------------------------
33
+ Previous Rent: ${formatFn(calc.currentRent)}
34
+ Applied Percentage: ${percentageLabel}
35
+ ----------------------------------
36
+ MONTHLY INCREASE: +${formatFn(calc.monthlyIncrease)}
37
+ NEW MONTHLY RENT: ${formatFn(calc.newRent)}
38
+ ANNUAL EXTRA COST: +${formatFn(calc.yearlyIncrease)}
39
+
40
+ Calculated at jjlmoya.es
41
+ `.trim();
42
+ }
43
+ }
@@ -0,0 +1,14 @@
1
+ ---
2
+ import { SEORenderer } from '@jjlmoya/utils-shared';
3
+ import { rentIncrease } 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 rentIncrease.i18n[locale]?.();
12
+ if (!content) return null;
13
+ ---
14
+ <SEORenderer content={{ locale: locale as string, sections: content.seo }} />
@@ -0,0 +1,19 @@
1
+ export interface RentIncreaseUI {
2
+ labelTitle: string;
3
+ labelDescription: string;
4
+ labelCurrentRent: string;
5
+ labelCurrentRentPlaceholder: string;
6
+ labelIncrementType: string;
7
+ labelLegalLimit: string;
8
+ labelManualIncrement: string;
9
+ labelManualPercentagePlaceholder: string;
10
+ labelNewRentEstimate: string;
11
+ labelMonthlyIncrease: string;
12
+ labelYearlyExtra: string;
13
+ labelLegalBadge: string;
14
+ labelCopyButton: string;
15
+ labelCopySuccess: string;
16
+ currencySymbol: string;
17
+ currencyCode: string;
18
+ currencyLocale: string;
19
+ }
package/src/tools.ts ADDED
@@ -0,0 +1,16 @@
1
+ import type { ToolDefinition } from './types';
2
+ import { COMPOUND_INTEREST_TOOL } from './tool/compoundInterest';
3
+ import { MORTGAGE_TOOL } from './tool/mortgage';
4
+ import { INFLATION_TOOL } from './tool/inflation';
5
+ import { PERCENTAGE_CALCULATOR_TOOL } from './tool/percentageCalculator';
6
+ import { LATE_INTEREST_TOOL } from './tool/lateInterest';
7
+ import { IBAN_BIC_SWIFT_TOOL } from './tool/ibanBicSwiftConverter';
8
+ import { RENT_INCREASE_TOOL } from './tool/rentIncreaseCalculator';
9
+ import { LOTTERY_OPTIMIZER_TOOL } from './tool/lotteryOptimizer';
10
+ import { COURT_FEE_CALCULATOR_TOOL } from './tool/courtFeeCalculator';
11
+ import { LEGAL_INTEREST_RATE_TOOL } from './tool/legalInterestRate';
12
+ import { FIRE_CALCULATOR_TOOL } from './tool/fireCalculator';
13
+ import { DEBT_SNOWBALL_TOOL } from './tool/debtSnowball';
14
+
15
+ export const ALL_TOOLS: ToolDefinition[] = [COMPOUND_INTEREST_TOOL, MORTGAGE_TOOL, INFLATION_TOOL, PERCENTAGE_CALCULATOR_TOOL, LATE_INTEREST_TOOL, IBAN_BIC_SWIFT_TOOL, RENT_INCREASE_TOOL, LOTTERY_OPTIMIZER_TOOL, COURT_FEE_CALCULATOR_TOOL, LEGAL_INTEREST_RATE_TOOL, FIRE_CALCULATOR_TOOL, DEBT_SNOWBALL_TOOL];
16
+