@jjlmoya/utils-finance 1.11.0 → 1.13.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 (53) hide show
  1. package/package.json +7 -4
  2. package/scripts/postinstall.mjs +27 -0
  3. package/src/category/index.ts +12 -12
  4. package/src/entries.ts +38 -0
  5. package/src/tool/compoundInterest/component.astro +0 -376
  6. package/src/tool/compoundInterest/compound-interest-calculator.css +79 -0
  7. package/src/tool/compoundInterest/entry.ts +30 -0
  8. package/src/tool/compoundInterest/index.ts +2 -32
  9. package/src/tool/courtFeeCalculator/component.astro +0 -237
  10. package/src/tool/courtFeeCalculator/entry.ts +29 -0
  11. package/src/tool/courtFeeCalculator/index.ts +2 -31
  12. package/src/tool/courtFeeCalculator/spanish-court-fees-calculator.css +235 -0
  13. package/src/tool/debtSnowball/component.astro +0 -636
  14. package/src/tool/debtSnowball/debt-snowball-calculator.css +634 -0
  15. package/src/tool/debtSnowball/entry.ts +31 -0
  16. package/src/tool/debtSnowball/index.ts +3 -33
  17. package/src/tool/fireCalculator/component.astro +0 -334
  18. package/src/tool/fireCalculator/entry.ts +29 -0
  19. package/src/tool/fireCalculator/four-percent-rule-fire-calculator.css +332 -0
  20. package/src/tool/fireCalculator/index.ts +2 -31
  21. package/src/tool/ibanBicSwiftConverter/component.astro +0 -414
  22. package/src/tool/ibanBicSwiftConverter/entry.ts +29 -0
  23. package/src/tool/ibanBicSwiftConverter/iban-to-bic-swift-converter.css +412 -0
  24. package/src/tool/ibanBicSwiftConverter/index.ts +2 -31
  25. package/src/tool/inflation/component.astro +0 -280
  26. package/src/tool/inflation/entry.ts +30 -0
  27. package/src/tool/inflation/index.ts +2 -32
  28. package/src/tool/inflation/inflation-calculator-spain.css +278 -0
  29. package/src/tool/lateInterest/component.astro +0 -400
  30. package/src/tool/lateInterest/entry.ts +30 -0
  31. package/src/tool/lateInterest/index.ts +2 -32
  32. package/src/tool/lateInterest/late-interest-calculator.css +398 -0
  33. package/src/tool/legalInterestRate/component.astro +0 -509
  34. package/src/tool/legalInterestRate/entry.ts +29 -0
  35. package/src/tool/legalInterestRate/index.ts +2 -31
  36. package/src/tool/legalInterestRate/legal-interest-on-money-spain.css +507 -0
  37. package/src/tool/lotteryOptimizer/component.astro +0 -561
  38. package/src/tool/lotteryOptimizer/entry.ts +29 -0
  39. package/src/tool/lotteryOptimizer/index.ts +2 -31
  40. package/src/tool/lotteryOptimizer/spain-lottery-optimizer.css +17 -0
  41. package/src/tool/mortgage/component.astro +0 -641
  42. package/src/tool/mortgage/entry.ts +30 -0
  43. package/src/tool/mortgage/index.ts +2 -32
  44. package/src/tool/mortgage/mortgage-calculator.css +639 -0
  45. package/src/tool/percentageCalculator/component.astro +0 -336
  46. package/src/tool/percentageCalculator/entry.ts +30 -0
  47. package/src/tool/percentageCalculator/index.ts +2 -32
  48. package/src/tool/percentageCalculator/percentage-calculator.css +289 -0
  49. package/src/tool/rentIncreaseCalculator/component.astro +0 -372
  50. package/src/tool/rentIncreaseCalculator/entry.ts +29 -0
  51. package/src/tool/rentIncreaseCalculator/index.ts +2 -31
  52. package/src/tool/rentIncreaseCalculator/rent-increase-calculator.css +370 -0
  53. package/src/tools.ts +1 -1
@@ -0,0 +1,30 @@
1
+ import type { FinanceToolEntry, ToolLocaleContent } from '../../types';
2
+
3
+ import type { InflationUI } from './ui';
4
+
5
+ export type InflationLocaleContent = ToolLocaleContent<InflationUI>;
6
+
7
+ export const inflation: FinanceToolEntry<InflationUI> = {
8
+ id: 'inflacion',
9
+ icons: {
10
+ bg: 'mdi:chart-timeline-variant',
11
+ fg: 'mdi:currency-eur-off',
12
+ },
13
+ i18n: {
14
+ de: () => import('./i18n/de').then((m) => m.content),
15
+ en: () => import('./i18n/en').then((m) => m.content),
16
+ es: () => import('./i18n/es').then((m) => m.content),
17
+ fr: () => import('./i18n/fr').then((m) => m.content),
18
+ id: () => import('./i18n/id').then((m) => m.content),
19
+ it: () => import('./i18n/it').then((m) => m.content),
20
+ ja: () => import('./i18n/ja').then((m) => m.content),
21
+ ko: () => import('./i18n/ko').then((m) => m.content),
22
+ nl: () => import('./i18n/nl').then((m) => m.content),
23
+ pl: () => import('./i18n/pl').then((m) => m.content),
24
+ pt: () => import('./i18n/pt').then((m) => m.content),
25
+ ru: () => import('./i18n/ru').then((m) => m.content),
26
+ sv: () => import('./i18n/sv').then((m) => m.content),
27
+ tr: () => import('./i18n/tr').then((m) => m.content),
28
+ zh: () => import('./i18n/zh').then((m) => m.content),
29
+ },
30
+ };
@@ -1,35 +1,5 @@
1
- import type { FinanceToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
-
3
- import type { InflationUI } from './ui';
4
-
5
- export type InflationLocaleContent = ToolLocaleContent<InflationUI>;
6
-
7
- export const inflation: FinanceToolEntry<InflationUI> = {
8
- id: 'inflacion',
9
- icons: {
10
- bg: 'mdi:chart-timeline-variant',
11
- fg: 'mdi:currency-eur-off',
12
- },
13
- i18n: {
14
- de: () => import('./i18n/de').then((m) => m.content),
15
- en: () => import('./i18n/en').then((m) => m.content),
16
- es: () => import('./i18n/es').then((m) => m.content),
17
- fr: () => import('./i18n/fr').then((m) => m.content),
18
- id: () => import('./i18n/id').then((m) => m.content),
19
- it: () => import('./i18n/it').then((m) => m.content),
20
- ja: () => import('./i18n/ja').then((m) => m.content),
21
- ko: () => import('./i18n/ko').then((m) => m.content),
22
- nl: () => import('./i18n/nl').then((m) => m.content),
23
- pl: () => import('./i18n/pl').then((m) => m.content),
24
- pt: () => import('./i18n/pt').then((m) => m.content),
25
- ru: () => import('./i18n/ru').then((m) => m.content),
26
- sv: () => import('./i18n/sv').then((m) => m.content),
27
- tr: () => import('./i18n/tr').then((m) => m.content),
28
- zh: () => import('./i18n/zh').then((m) => m.content),
29
- },
30
- };
31
-
32
-
1
+ import { inflation } from './entry';
2
+ export * from './entry';
33
3
  export const INFLATION_TOOL: ToolDefinition = {
34
4
  entry: inflation,
35
5
  Component: () => import('./component.astro'),
@@ -0,0 +1,278 @@
1
+ :root {
2
+ --inflation-color-primary: #f59e0b;
3
+ --inflation-color-primary-dark: #d97706;
4
+ --inflation-color-primary-light: #fcd34d;
5
+ --inflation-color-primary-extra-light: #fef3c7;
6
+ --inflation-color-danger: #ef4444;
7
+ --inflation-color-danger-light: #fee2e2;
8
+ --inflation-color-text-primary: #1f2937;
9
+ --inflation-color-text-secondary: #6b7280;
10
+ --inflation-color-text-light: #9ca3af;
11
+ --inflation-color-bg-primary: #fff;
12
+ --inflation-color-bg-secondary: #f9fafb;
13
+ --inflation-color-border: #e5e7eb;
14
+ }
15
+
16
+ .theme-dark,
17
+ [data-theme='dark'] {
18
+ --inflation-color-primary: #fbbf24;
19
+ --inflation-color-primary-dark: #f59e0b;
20
+ --inflation-color-primary-light: #b45309;
21
+ --inflation-color-primary-extra-light: #78350f;
22
+ --inflation-color-danger: #f87171;
23
+ --inflation-color-danger-light: #7f1d1d;
24
+ --inflation-color-text-primary: #f3f4f6;
25
+ --inflation-color-text-secondary: #d1d5db;
26
+ --inflation-color-text-light: #9ca3af;
27
+ --inflation-color-bg-primary: #1f2937;
28
+ --inflation-color-bg-secondary: #111827;
29
+ --inflation-color-border: #374151;
30
+ }
31
+
32
+ @media (prefers-color-scheme: dark) {
33
+ :root {
34
+ --inflation-color-primary: #fbbf24;
35
+ --inflation-color-primary-dark: #f59e0b;
36
+ --inflation-color-primary-light: #b45309;
37
+ --inflation-color-primary-extra-light: #78350f;
38
+ --inflation-color-danger: #f87171;
39
+ --inflation-color-danger-light: #7f1d1d;
40
+ --inflation-color-text-primary: #f3f4f6;
41
+ --inflation-color-text-secondary: #d1d5db;
42
+ --inflation-color-text-light: #9ca3af;
43
+ --inflation-color-bg-primary: #1f2937;
44
+ --inflation-color-bg-secondary: #111827;
45
+ --inflation-color-border: #374151;
46
+ }
47
+ }
48
+
49
+ .inflation-container {
50
+ background-color: var(--inflation-color-bg-primary);
51
+ border-radius: 1.5rem;
52
+ box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
53
+ border: 1px solid var(--inflation-color-border);
54
+ overflow: hidden;
55
+ }
56
+
57
+ .inflation-header {
58
+ padding: 1.5rem;
59
+ border-bottom: 1px solid var(--inflation-color-border);
60
+ background-color: rgba(245, 158, 11, 0.05);
61
+ }
62
+
63
+ .inflation-header-title-group {
64
+ display: flex;
65
+ align-items: center;
66
+ gap: 0.75rem;
67
+ }
68
+
69
+ .inflation-header-icon {
70
+ width: 2.5rem;
71
+ height: 2.5rem;
72
+ padding: 0.625rem;
73
+ background-color: rgba(245, 158, 11, 0.1);
74
+ border-radius: 0.75rem;
75
+ color: var(--inflation-color-primary);
76
+ flex-shrink: 0;
77
+ }
78
+
79
+ .inflation-header-icon svg {
80
+ width: 100%;
81
+ height: 100%;
82
+ }
83
+
84
+ .inflation-header-title {
85
+ font-size: 1.25rem;
86
+ font-weight: 700;
87
+ color: var(--inflation-color-text-primary);
88
+ margin: 0;
89
+ }
90
+
91
+ .inflation-content {
92
+ padding: 2rem;
93
+ }
94
+
95
+ .inflation-description {
96
+ font-size: 0.875rem;
97
+ color: var(--inflation-color-text-secondary);
98
+ margin: 0 0 2rem;
99
+ text-align: center;
100
+ }
101
+
102
+ .inflation-grid {
103
+ display: flex;
104
+ flex-direction: column;
105
+ gap: 2rem;
106
+ margin-bottom: 2rem;
107
+ }
108
+
109
+ @media (min-width: 768px) {
110
+ .inflation-grid {
111
+ flex-direction: row;
112
+ align-items: center;
113
+ gap: 1.5rem;
114
+ }
115
+ }
116
+
117
+ .inflation-panel {
118
+ flex: 1;
119
+ padding: 2rem;
120
+ border-radius: 1.5rem;
121
+ border: 2px solid var(--inflation-color-border);
122
+ background-color: var(--inflation-color-bg-secondary);
123
+ }
124
+
125
+ .inflation-panel-left {
126
+ border-top: 4px solid var(--inflation-color-border);
127
+ }
128
+
129
+ .inflation-panel-right {
130
+ background-color: rgba(245, 158, 11, 0.05);
131
+ border-color: rgba(245, 158, 11, 0.2);
132
+ border-top: 4px solid var(--inflation-color-primary);
133
+ }
134
+
135
+ .inflation-label {
136
+ display: block;
137
+ font-size: 0.75rem;
138
+ font-weight: 700;
139
+ color: var(--inflation-color-text-light);
140
+ text-transform: uppercase;
141
+ letter-spacing: 0.05em;
142
+ margin-bottom: 0.75rem;
143
+ }
144
+
145
+ .inflation-input-wrapper {
146
+ position: relative;
147
+ display: flex;
148
+ align-items: center;
149
+ }
150
+
151
+ .inflation-input {
152
+ width: 100%;
153
+ padding: 1rem;
154
+ background-color: var(--inflation-color-bg-primary);
155
+ border: 2px solid var(--inflation-color-border);
156
+ border-radius: 0.75rem;
157
+ font-size: 1.875rem;
158
+ font-weight: 700;
159
+ color: var(--inflation-color-text-primary);
160
+ text-align: center;
161
+ transition: all 0.2s ease;
162
+ }
163
+
164
+ .inflation-input:focus {
165
+ border-color: var(--inflation-color-primary);
166
+ outline: none;
167
+ }
168
+
169
+ .inflation-currency {
170
+ position: absolute;
171
+ right: 1rem;
172
+ color: var(--inflation-color-text-light);
173
+ font-size: 0.875rem;
174
+ }
175
+
176
+ .inflation-select {
177
+ width: 100%;
178
+ padding: 0.875rem 1rem;
179
+ background-color: var(--inflation-color-bg-primary);
180
+ border: 2px solid var(--inflation-color-border);
181
+ border-radius: 0.75rem;
182
+ font-size: 1.125rem;
183
+ font-weight: 700;
184
+ color: var(--inflation-color-text-primary);
185
+ cursor: pointer;
186
+ transition: all 0.2s ease;
187
+ }
188
+
189
+ .inflation-select:focus {
190
+ border-color: var(--inflation-color-primary);
191
+ outline: none;
192
+ }
193
+
194
+ .inflation-select:hover {
195
+ border-color: var(--inflation-color-primary);
196
+ }
197
+
198
+ .inflation-arrow {
199
+ display: flex;
200
+ align-items: center;
201
+ justify-content: center;
202
+ color: var(--inflation-color-primary);
203
+ flex-shrink: 0;
204
+ }
205
+
206
+ .inflation-arrow svg {
207
+ width: 2rem;
208
+ height: 2rem;
209
+ }
210
+
211
+ @media (max-width: 767px) {
212
+ .inflation-arrow {
213
+ transform: rotate(90deg);
214
+ margin: 1rem 0;
215
+ }
216
+ }
217
+
218
+ .inflation-result-wrapper {
219
+ display: flex;
220
+ align-items: center;
221
+ justify-content: center;
222
+ min-height: 100px;
223
+ }
224
+
225
+ .inflation-result {
226
+ font-size: 2.25rem;
227
+ font-weight: 700;
228
+ color: var(--inflation-color-primary);
229
+ text-align: center;
230
+ }
231
+
232
+ .inflation-year-badge {
233
+ text-align: center;
234
+ display: inline-block;
235
+ width: 100%;
236
+ padding: 0.5rem 1rem;
237
+ background-color: var(--inflation-color-bg-primary);
238
+ border: 1px solid var(--inflation-color-border);
239
+ border-radius: 0.75rem;
240
+ font-size: 0.875rem;
241
+ font-weight: 700;
242
+ color: var(--inflation-color-text-secondary);
243
+ margin-top: 1rem;
244
+ }
245
+
246
+ .inflation-stat {
247
+ text-align: center;
248
+ animation: fade-in-up 0.7s ease 0.15s both;
249
+ }
250
+
251
+ @keyframes fade-in-up {
252
+ from {
253
+ opacity: 0;
254
+ transform: translateY(1rem);
255
+ }
256
+ to {
257
+ opacity: 1;
258
+ transform: translateY(0);
259
+ }
260
+ }
261
+
262
+ .inflation-stat-badge {
263
+ display: inline-flex;
264
+ align-items: center;
265
+ gap: 0.5rem;
266
+ padding: 0.75rem 1.5rem;
267
+ background-color: var(--inflation-color-danger-light);
268
+ color: var(--inflation-color-danger);
269
+ border-radius: 1.5rem;
270
+ font-weight: 700;
271
+ font-size: 1.125rem;
272
+ border: 1px solid var(--inflation-color-danger);
273
+ }
274
+
275
+ .inflation-stat-badge svg {
276
+ width: 1.25rem;
277
+ height: 1.25rem;
278
+ }