@jjlmoya/utils-home 1.14.0 → 1.16.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.
- package/package.json +7 -4
- package/scripts/postinstall.mjs +27 -0
- package/src/entries.ts +23 -0
- package/src/tool/dewPointCalculator/component.astro +0 -232
- package/src/tool/dewPointCalculator/dew-point-calculator.css +230 -0
- package/src/tool/dewPointCalculator/entry.ts +32 -0
- package/src/tool/dewPointCalculator/index.ts +2 -34
- package/src/tool/heatingComparator/component.astro +0 -269
- package/src/tool/heatingComparator/entry.ts +30 -0
- package/src/tool/heatingComparator/heating-consumption-comparator.css +267 -0
- package/src/tool/heatingComparator/index.ts +2 -32
- package/src/tool/ledSavingCalculator/component.astro +0 -305
- package/src/tool/ledSavingCalculator/entry.ts +31 -0
- package/src/tool/ledSavingCalculator/index.ts +2 -33
- package/src/tool/ledSavingCalculator/led-saving-calculator.css +303 -0
- package/src/tool/projectorCalculator/component.astro +0 -359
- package/src/tool/projectorCalculator/entry.ts +31 -0
- package/src/tool/projectorCalculator/index.ts +2 -33
- package/src/tool/projectorCalculator/projector-throw-calculator.css +357 -0
- package/src/tool/qrGenerator/component.astro +0 -266
- package/src/tool/qrGenerator/entry.ts +30 -0
- package/src/tool/qrGenerator/index.ts +2 -32
- package/src/tool/qrGenerator/qr-generator.css +264 -0
- package/src/tool/solarCalculator/component.astro +0 -298
- package/src/tool/solarCalculator/entry.ts +30 -0
- package/src/tool/solarCalculator/index.ts +2 -32
- package/src/tool/solarCalculator/solar-panel-calculator.css +296 -0
- package/src/tool/tariffComparator/component.astro +0 -337
- package/src/tool/tariffComparator/electricity-tariff-comparator.css +335 -0
- package/src/tool/tariffComparator/entry.ts +31 -0
- package/src/tool/tariffComparator/index.ts +2 -33
- package/src/tools.ts +1 -1
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
.tc-wrapper {
|
|
2
|
+
--tc-p: #f59e0b;
|
|
3
|
+
|
|
4
|
+
width: 100%;
|
|
5
|
+
padding: 1rem 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.tc-card {
|
|
9
|
+
background: var(--bg-surface);
|
|
10
|
+
width: calc(100% - 24px);
|
|
11
|
+
max-width: 960px;
|
|
12
|
+
margin: 0 auto;
|
|
13
|
+
border-radius: 24px;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
gap: 0;
|
|
18
|
+
border: 1px solid var(--border-color);
|
|
19
|
+
color: var(--text-main);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.tc-inputs {
|
|
23
|
+
display: grid;
|
|
24
|
+
grid-template-columns: 1fr;
|
|
25
|
+
gap: 24px;
|
|
26
|
+
padding: 32px;
|
|
27
|
+
border-bottom: 1px solid var(--border-color);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media (min-width: 640px) {
|
|
31
|
+
.tc-inputs {
|
|
32
|
+
grid-template-columns: 1fr 1fr;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.tc-input-group {
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
gap: 10px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.tc-label {
|
|
43
|
+
font-size: 0.6875rem;
|
|
44
|
+
font-weight: 700;
|
|
45
|
+
text-transform: uppercase;
|
|
46
|
+
letter-spacing: 0.1em;
|
|
47
|
+
color: var(--tc-p);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.tc-slider {
|
|
51
|
+
width: 100%;
|
|
52
|
+
height: 6px;
|
|
53
|
+
accent-color: var(--tc-p);
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
border-radius: 9999px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.tc-value-row {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: baseline;
|
|
61
|
+
gap: 6px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.tc-value {
|
|
65
|
+
font-size: 2rem;
|
|
66
|
+
font-weight: 900;
|
|
67
|
+
color: var(--text-main);
|
|
68
|
+
line-height: 1;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.tc-unit {
|
|
72
|
+
font-size: 0.8125rem;
|
|
73
|
+
color: var(--text-muted);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.tc-results {
|
|
77
|
+
display: grid;
|
|
78
|
+
grid-template-columns: 1fr;
|
|
79
|
+
gap: 16px;
|
|
80
|
+
padding: 24px 32px;
|
|
81
|
+
border-bottom: 1px solid var(--border-color);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@media (min-width: 640px) {
|
|
85
|
+
.tc-results {
|
|
86
|
+
grid-template-columns: 1fr 1fr;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.tc-tariff-card {
|
|
91
|
+
border-radius: 16px;
|
|
92
|
+
padding: 20px;
|
|
93
|
+
display: flex;
|
|
94
|
+
flex-direction: column;
|
|
95
|
+
gap: 12px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.tc-market-card {
|
|
99
|
+
background: rgba(245, 158, 11, 0.06);
|
|
100
|
+
border: 1px solid rgba(245, 158, 11, 0.2);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.tc-free-card {
|
|
104
|
+
background: rgba(14, 165, 233, 0.06);
|
|
105
|
+
border: 1px solid rgba(14, 165, 233, 0.2);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.tc-tariff-label {
|
|
109
|
+
font-size: 0.625rem;
|
|
110
|
+
font-weight: 900;
|
|
111
|
+
text-transform: uppercase;
|
|
112
|
+
letter-spacing: 0.12em;
|
|
113
|
+
padding: 4px 10px;
|
|
114
|
+
border-radius: 9999px;
|
|
115
|
+
align-self: flex-start;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.tc-market-label {
|
|
119
|
+
background: #fbbf24;
|
|
120
|
+
color: #78350f;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.tc-free-label {
|
|
124
|
+
background: #38bdf8;
|
|
125
|
+
color: #0c4a6e;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.tc-price-main {
|
|
129
|
+
display: flex;
|
|
130
|
+
flex-direction: column;
|
|
131
|
+
gap: 2px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.tc-total {
|
|
135
|
+
font-size: 2.75rem;
|
|
136
|
+
font-weight: 900;
|
|
137
|
+
color: var(--text-main);
|
|
138
|
+
margin: 0;
|
|
139
|
+
line-height: 1;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.tc-est {
|
|
143
|
+
font-size: 0.75rem;
|
|
144
|
+
color: var(--text-muted);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.tc-line-items {
|
|
148
|
+
display: flex;
|
|
149
|
+
flex-direction: column;
|
|
150
|
+
gap: 6px;
|
|
151
|
+
padding-top: 12px;
|
|
152
|
+
border-top: 1px solid var(--border-color);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.tc-line {
|
|
156
|
+
display: flex;
|
|
157
|
+
justify-content: space-between;
|
|
158
|
+
font-size: 0.8125rem;
|
|
159
|
+
color: var(--text-muted);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.tc-badge {
|
|
163
|
+
align-self: flex-start;
|
|
164
|
+
padding: 5px 12px;
|
|
165
|
+
border-radius: 9999px;
|
|
166
|
+
font-size: 0.75rem;
|
|
167
|
+
font-weight: 700;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.tc-badge-better {
|
|
171
|
+
background: #22c55e;
|
|
172
|
+
color: #fff;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.tc-badge-worse {
|
|
176
|
+
background: var(--bg-muted);
|
|
177
|
+
color: var(--text-muted);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.tc-dashboard {
|
|
181
|
+
padding: 24px 32px;
|
|
182
|
+
border-bottom: 1px solid var(--border-color);
|
|
183
|
+
display: flex;
|
|
184
|
+
flex-direction: column;
|
|
185
|
+
gap: 16px;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.tc-section-label {
|
|
189
|
+
font-size: 0.6875rem;
|
|
190
|
+
font-weight: 900;
|
|
191
|
+
text-transform: uppercase;
|
|
192
|
+
letter-spacing: 0.14em;
|
|
193
|
+
color: var(--tc-p);
|
|
194
|
+
margin: 0;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.tc-dash-grid {
|
|
198
|
+
display: grid;
|
|
199
|
+
grid-template-columns: 1fr;
|
|
200
|
+
gap: 20px;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
@media (min-width: 768px) {
|
|
204
|
+
.tc-dash-grid {
|
|
205
|
+
grid-template-columns: 2fr 1fr;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.tc-chart-svg {
|
|
210
|
+
width: 100%;
|
|
211
|
+
display: block;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.tc-bar {
|
|
215
|
+
fill: var(--tc-p);
|
|
216
|
+
opacity: 0.7;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.tc-metrics {
|
|
220
|
+
display: flex;
|
|
221
|
+
flex-direction: column;
|
|
222
|
+
gap: 12px;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.tc-metric {
|
|
226
|
+
background: var(--bg-muted);
|
|
227
|
+
border-radius: 12px;
|
|
228
|
+
padding: 14px 16px;
|
|
229
|
+
display: flex;
|
|
230
|
+
flex-direction: column;
|
|
231
|
+
gap: 2px;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.tc-metric-label {
|
|
235
|
+
font-size: 0.625rem;
|
|
236
|
+
font-weight: 900;
|
|
237
|
+
text-transform: uppercase;
|
|
238
|
+
letter-spacing: 0.1em;
|
|
239
|
+
color: var(--text-muted);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.tc-metric-val {
|
|
243
|
+
font-size: 1.5rem;
|
|
244
|
+
font-weight: 900;
|
|
245
|
+
color: var(--text-main);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.tc-metric-sub {
|
|
249
|
+
font-size: 0.6875rem;
|
|
250
|
+
color: var(--text-muted);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.tc-simulator {
|
|
254
|
+
padding: 24px 32px;
|
|
255
|
+
display: flex;
|
|
256
|
+
flex-direction: column;
|
|
257
|
+
gap: 16px;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.tc-sim-grid {
|
|
261
|
+
display: grid;
|
|
262
|
+
grid-template-columns: 1fr;
|
|
263
|
+
gap: 16px;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
@media (min-width: 640px) {
|
|
267
|
+
.tc-sim-grid {
|
|
268
|
+
grid-template-columns: 1fr 1fr;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.tc-sim-card {
|
|
273
|
+
background: var(--bg-muted);
|
|
274
|
+
border-radius: 14px;
|
|
275
|
+
padding: 16px;
|
|
276
|
+
display: flex;
|
|
277
|
+
flex-direction: column;
|
|
278
|
+
gap: 10px;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.tc-sim-title {
|
|
282
|
+
font-size: 0.8125rem;
|
|
283
|
+
font-weight: 700;
|
|
284
|
+
color: var(--text-main);
|
|
285
|
+
margin: 0;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.tc-sim-desc {
|
|
289
|
+
font-size: 0.75rem;
|
|
290
|
+
color: var(--text-muted);
|
|
291
|
+
margin: 0;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.tc-toggle {
|
|
295
|
+
position: relative;
|
|
296
|
+
display: inline-block;
|
|
297
|
+
width: 48px;
|
|
298
|
+
height: 26px;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.tc-toggle-input {
|
|
302
|
+
opacity: 0;
|
|
303
|
+
width: 0;
|
|
304
|
+
height: 0;
|
|
305
|
+
position: absolute;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.tc-toggle-track {
|
|
309
|
+
position: absolute;
|
|
310
|
+
cursor: pointer;
|
|
311
|
+
inset: 0;
|
|
312
|
+
background: var(--border-color);
|
|
313
|
+
border-radius: 9999px;
|
|
314
|
+
transition: background 0.3s;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.tc-toggle-track::before {
|
|
318
|
+
content: "";
|
|
319
|
+
position: absolute;
|
|
320
|
+
width: 18px;
|
|
321
|
+
height: 18px;
|
|
322
|
+
left: 4px;
|
|
323
|
+
top: 4px;
|
|
324
|
+
background: #fff;
|
|
325
|
+
border-radius: 50%;
|
|
326
|
+
transition: transform 0.3s;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.tc-toggle-input:checked + .tc-toggle-track {
|
|
330
|
+
background: var(--tc-p);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.tc-toggle-input:checked + .tc-toggle-track::before {
|
|
334
|
+
transform: translateX(22px);
|
|
335
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { HomeToolEntry, ToolLocaleContent } from '../../types';
|
|
2
|
+
|
|
3
|
+
import type { TariffComparatorUI } from './ui';
|
|
4
|
+
|
|
5
|
+
export type TariffComparatorLocaleContent = ToolLocaleContent<TariffComparatorUI>;
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export const tariffComparator: HomeToolEntry<TariffComparatorUI> = {
|
|
9
|
+
id: 'tariff-comparator',
|
|
10
|
+
icons: {
|
|
11
|
+
bg: 'mdi:lightning-bolt',
|
|
12
|
+
fg: 'mdi:compare-horizontal',
|
|
13
|
+
},
|
|
14
|
+
i18n: {
|
|
15
|
+
de: async () => (await import('./i18n/de')).content,
|
|
16
|
+
en: async () => (await import('./i18n/en')).content,
|
|
17
|
+
es: async () => (await import('./i18n/es')).content,
|
|
18
|
+
fr: async () => (await import('./i18n/fr')).content,
|
|
19
|
+
id: async () => (await import('./i18n/id')).content,
|
|
20
|
+
it: async () => (await import('./i18n/it')).content,
|
|
21
|
+
ja: async () => (await import('./i18n/ja')).content,
|
|
22
|
+
ko: async () => (await import('./i18n/ko')).content,
|
|
23
|
+
nl: async () => (await import('./i18n/nl')).content,
|
|
24
|
+
pl: async () => (await import('./i18n/pl')).content,
|
|
25
|
+
pt: async () => (await import('./i18n/pt')).content,
|
|
26
|
+
ru: async () => (await import('./i18n/ru')).content,
|
|
27
|
+
sv: async () => (await import('./i18n/sv')).content,
|
|
28
|
+
tr: async () => (await import('./i18n/tr')).content,
|
|
29
|
+
zh: async () => (await import('./i18n/zh')).content,
|
|
30
|
+
},
|
|
31
|
+
};
|
|
@@ -1,36 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import type { TariffComparatorUI } from './ui';
|
|
4
|
-
|
|
5
|
-
export type TariffComparatorLocaleContent = ToolLocaleContent<TariffComparatorUI>;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export const tariffComparator: HomeToolEntry<TariffComparatorUI> = {
|
|
9
|
-
id: 'tariff-comparator',
|
|
10
|
-
icons: {
|
|
11
|
-
bg: 'mdi:lightning-bolt',
|
|
12
|
-
fg: 'mdi:compare-horizontal',
|
|
13
|
-
},
|
|
14
|
-
i18n: {
|
|
15
|
-
de: async () => (await import('./i18n/de')).content,
|
|
16
|
-
en: async () => (await import('./i18n/en')).content,
|
|
17
|
-
es: async () => (await import('./i18n/es')).content,
|
|
18
|
-
fr: async () => (await import('./i18n/fr')).content,
|
|
19
|
-
id: async () => (await import('./i18n/id')).content,
|
|
20
|
-
it: async () => (await import('./i18n/it')).content,
|
|
21
|
-
ja: async () => (await import('./i18n/ja')).content,
|
|
22
|
-
ko: async () => (await import('./i18n/ko')).content,
|
|
23
|
-
nl: async () => (await import('./i18n/nl')).content,
|
|
24
|
-
pl: async () => (await import('./i18n/pl')).content,
|
|
25
|
-
pt: async () => (await import('./i18n/pt')).content,
|
|
26
|
-
ru: async () => (await import('./i18n/ru')).content,
|
|
27
|
-
sv: async () => (await import('./i18n/sv')).content,
|
|
28
|
-
tr: async () => (await import('./i18n/tr')).content,
|
|
29
|
-
zh: async () => (await import('./i18n/zh')).content,
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
|
|
1
|
+
import { tariffComparator } from './entry';
|
|
2
|
+
export * from './entry';
|
|
34
3
|
export const TARIFF_COMPARATOR_TOOL: ToolDefinition = {
|
|
35
4
|
entry: tariffComparator,
|
|
36
5
|
Component: () => import('./component.astro'),
|
package/src/tools.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { ALL_ENTRIES } from './entries';
|
|
1
2
|
import type { ToolDefinition } from './types';
|
|
2
3
|
import { QR_GENERATOR_TOOL } from './tool/qrGenerator/index';
|
|
3
4
|
import { SOLAR_CALCULATOR_TOOL } from './tool/solarCalculator/index';
|
|
@@ -17,4 +18,3 @@ export const ALL_TOOLS: ToolDefinition[] = [
|
|
|
17
18
|
HEATING_COMPARATOR_TOOL,
|
|
18
19
|
];
|
|
19
20
|
|
|
20
|
-
export const ALL_ENTRIES = ALL_TOOLS.map(t => t.entry);
|