@jjlmoya/utils-home 1.35.0 → 1.36.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 +1 -1
- package/src/entries.ts +4 -1
- package/src/index.ts +1 -0
- package/src/tests/locale_completeness.test.ts +2 -2
- package/src/tests/tool_validation.test.ts +2 -2
- package/src/tool/humidityCalculator/bibliography.ts +2 -2
- package/src/tool/waterSoftener/bibliography.astro +14 -0
- package/src/tool/waterSoftener/bibliography.ts +14 -0
- package/src/tool/waterSoftener/component.astro +321 -0
- package/src/tool/waterSoftener/entry.ts +29 -0
- package/src/tool/waterSoftener/i18n/de.ts +222 -0
- package/src/tool/waterSoftener/i18n/en.ts +222 -0
- package/src/tool/waterSoftener/i18n/es.ts +222 -0
- package/src/tool/waterSoftener/i18n/fr.ts +222 -0
- package/src/tool/waterSoftener/i18n/id.ts +222 -0
- package/src/tool/waterSoftener/i18n/it.ts +222 -0
- package/src/tool/waterSoftener/i18n/ja.ts +222 -0
- package/src/tool/waterSoftener/i18n/ko.ts +222 -0
- package/src/tool/waterSoftener/i18n/nl.ts +222 -0
- package/src/tool/waterSoftener/i18n/pl.ts +222 -0
- package/src/tool/waterSoftener/i18n/pt.ts +222 -0
- package/src/tool/waterSoftener/i18n/ru.ts +222 -0
- package/src/tool/waterSoftener/i18n/sv.ts +222 -0
- package/src/tool/waterSoftener/i18n/tr.ts +222 -0
- package/src/tool/waterSoftener/i18n/zh.ts +222 -0
- package/src/tool/waterSoftener/index.ts +9 -0
- package/src/tool/waterSoftener/logic.ts +103 -0
- package/src/tool/waterSoftener/seo.astro +15 -0
- package/src/tool/waterSoftener/ui.ts +34 -0
- package/src/tool/waterSoftener/water-softener.css +449 -0
- package/src/tools.ts +2 -0
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
.ws-root {
|
|
2
|
+
--ws-accent: #3b82f6;
|
|
3
|
+
--ws-accent-glow: rgba(59, 130, 246, 0.35);
|
|
4
|
+
--ws-success: #22c55e;
|
|
5
|
+
--ws-success-glow: rgba(34, 197, 94, 0.35);
|
|
6
|
+
--ws-warn: #f59e0b;
|
|
7
|
+
--ws-warn-glow: rgba(245, 158, 11, 0.35);
|
|
8
|
+
--ws-danger: #ef4444;
|
|
9
|
+
--ws-danger-glow: rgba(239, 68, 68, 0.35);
|
|
10
|
+
--ws-surface: var(--bg-surface);
|
|
11
|
+
--ws-page: var(--bg-page);
|
|
12
|
+
--ws-text: var(--text-main);
|
|
13
|
+
--ws-muted: var(--text-muted);
|
|
14
|
+
--ws-base: var(--text-base);
|
|
15
|
+
--ws-border: var(--border-color);
|
|
16
|
+
|
|
17
|
+
width: 100%;
|
|
18
|
+
padding: 1rem 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.ws-card {
|
|
22
|
+
width: 100%;
|
|
23
|
+
max-width: 640px;
|
|
24
|
+
margin: 0 auto;
|
|
25
|
+
background: var(--ws-surface);
|
|
26
|
+
border: 1px solid var(--ws-border);
|
|
27
|
+
border-radius: 28px;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px -4px rgba(0, 0, 0, 0.08);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.ws-stage {
|
|
35
|
+
position: relative;
|
|
36
|
+
padding: 1.5rem;
|
|
37
|
+
border-bottom: 1px solid var(--ws-border);
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.ws-stage-glow {
|
|
42
|
+
position: absolute;
|
|
43
|
+
top: 50%;
|
|
44
|
+
left: 50%;
|
|
45
|
+
width: 320px;
|
|
46
|
+
height: 320px;
|
|
47
|
+
border-radius: 50%;
|
|
48
|
+
background: radial-gradient(circle, var(--ws-accent-glow) 0%, transparent 70%);
|
|
49
|
+
transform: translate(-50%, -50%);
|
|
50
|
+
pointer-events: none;
|
|
51
|
+
opacity: 0.5;
|
|
52
|
+
transition: opacity 0.6s ease;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ws-section-label {
|
|
56
|
+
font-size: 0.6rem;
|
|
57
|
+
font-weight: 900;
|
|
58
|
+
text-transform: uppercase;
|
|
59
|
+
letter-spacing: 0.2em;
|
|
60
|
+
color: var(--ws-accent);
|
|
61
|
+
margin: 0 0 1rem;
|
|
62
|
+
position: relative;
|
|
63
|
+
z-index: 1;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.ws-hero {
|
|
67
|
+
text-align: center;
|
|
68
|
+
position: relative;
|
|
69
|
+
z-index: 1;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.ws-hero-value {
|
|
73
|
+
font-size: clamp(2.5rem, 8vw, 3.5rem);
|
|
74
|
+
font-weight: 900;
|
|
75
|
+
line-height: 1;
|
|
76
|
+
margin: 0;
|
|
77
|
+
color: var(--ws-base);
|
|
78
|
+
letter-spacing: -0.03em;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.ws-hero-unit {
|
|
82
|
+
font-size: clamp(0.9rem, 2.5vw, 1.2rem);
|
|
83
|
+
font-weight: 400;
|
|
84
|
+
color: var(--ws-muted);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.ws-hero-label {
|
|
88
|
+
font-size: 0.65rem;
|
|
89
|
+
font-weight: 900;
|
|
90
|
+
text-transform: uppercase;
|
|
91
|
+
letter-spacing: 0.18em;
|
|
92
|
+
color: var(--ws-muted);
|
|
93
|
+
margin: 0.5rem 0 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.ws-slider-track {
|
|
97
|
+
position: relative;
|
|
98
|
+
height: 14px;
|
|
99
|
+
border-radius: 999px;
|
|
100
|
+
margin-top: 1.25rem;
|
|
101
|
+
overflow: hidden;
|
|
102
|
+
background: linear-gradient(90deg, #60a5fa, #818cf8, #c084fc, #f472b6, #fb923c, #9ca3af);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.ws-slider-fill {
|
|
106
|
+
position: absolute;
|
|
107
|
+
top: 0;
|
|
108
|
+
left: 0;
|
|
109
|
+
height: 100%;
|
|
110
|
+
border-radius: 999px;
|
|
111
|
+
background: rgba(255, 255, 255, 0.35);
|
|
112
|
+
width: 0%;
|
|
113
|
+
transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.ws-slider-thumb {
|
|
117
|
+
position: absolute;
|
|
118
|
+
top: 50%;
|
|
119
|
+
width: 22px;
|
|
120
|
+
height: 22px;
|
|
121
|
+
border-radius: 50%;
|
|
122
|
+
background: #fff;
|
|
123
|
+
border: 3px solid var(--ws-accent);
|
|
124
|
+
transform: translate(-50%, -50%);
|
|
125
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
|
|
126
|
+
transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.ws-unit-system {
|
|
130
|
+
display: flex;
|
|
131
|
+
align-items: center;
|
|
132
|
+
justify-content: center;
|
|
133
|
+
gap: 0.75rem;
|
|
134
|
+
margin-bottom: 1rem;
|
|
135
|
+
position: relative;
|
|
136
|
+
z-index: 1;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.ws-unit-label {
|
|
140
|
+
font-size: 0.6rem;
|
|
141
|
+
font-weight: 900;
|
|
142
|
+
text-transform: uppercase;
|
|
143
|
+
letter-spacing: 0.16em;
|
|
144
|
+
color: var(--ws-muted);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.ws-body {
|
|
148
|
+
padding: 1.5rem;
|
|
149
|
+
display: flex;
|
|
150
|
+
flex-direction: column;
|
|
151
|
+
gap: 1.5rem;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.ws-fields {
|
|
155
|
+
display: grid;
|
|
156
|
+
grid-template-columns: repeat(3, 1fr);
|
|
157
|
+
gap: 1rem;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.ws-field {
|
|
161
|
+
display: flex;
|
|
162
|
+
flex-direction: column;
|
|
163
|
+
gap: 0.4rem;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.ws-field-label {
|
|
167
|
+
font-size: 0.6rem;
|
|
168
|
+
font-weight: 900;
|
|
169
|
+
text-transform: uppercase;
|
|
170
|
+
letter-spacing: 0.18em;
|
|
171
|
+
color: var(--ws-muted);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.ws-field-row {
|
|
175
|
+
display: flex;
|
|
176
|
+
align-items: baseline;
|
|
177
|
+
gap: 0.4rem;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.ws-field-input {
|
|
181
|
+
width: 100%;
|
|
182
|
+
font-size: 1.2rem;
|
|
183
|
+
font-weight: 800;
|
|
184
|
+
color: var(--ws-text);
|
|
185
|
+
background: transparent;
|
|
186
|
+
border: none;
|
|
187
|
+
border-bottom: 2px solid var(--ws-border);
|
|
188
|
+
padding: 0.2rem 0;
|
|
189
|
+
outline: none;
|
|
190
|
+
transition: border-color 0.2s;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.ws-field-input:focus {
|
|
194
|
+
border-color: var(--ws-accent);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.ws-field-unit {
|
|
198
|
+
font-size: 0.75rem;
|
|
199
|
+
font-weight: 600;
|
|
200
|
+
color: var(--ws-muted);
|
|
201
|
+
white-space: nowrap;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.ws-pill-track {
|
|
205
|
+
display: flex;
|
|
206
|
+
background: var(--ws-page);
|
|
207
|
+
border: 1px solid var(--ws-border);
|
|
208
|
+
border-radius: 14px;
|
|
209
|
+
padding: 0.3rem;
|
|
210
|
+
position: relative;
|
|
211
|
+
width: fit-content;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.ws-pill-btn {
|
|
215
|
+
flex: 1;
|
|
216
|
+
padding: 0.55rem 0.9rem;
|
|
217
|
+
border-radius: 11px;
|
|
218
|
+
border: none;
|
|
219
|
+
background: transparent;
|
|
220
|
+
color: var(--ws-muted);
|
|
221
|
+
font-size: 0.78rem;
|
|
222
|
+
font-weight: 700;
|
|
223
|
+
cursor: pointer;
|
|
224
|
+
transition: color 0.25s;
|
|
225
|
+
position: relative;
|
|
226
|
+
z-index: 1;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.ws-pill-btn:hover {
|
|
230
|
+
color: var(--ws-text);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.ws-pill-btn.ws-active {
|
|
234
|
+
background: var(--ws-accent);
|
|
235
|
+
color: #fff;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.ws-pipe {
|
|
239
|
+
background: var(--ws-page);
|
|
240
|
+
border: 1px solid var(--ws-border);
|
|
241
|
+
border-radius: 20px;
|
|
242
|
+
padding: 1.25rem;
|
|
243
|
+
text-align: center;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.ws-pipe-visual {
|
|
247
|
+
width: 100%;
|
|
248
|
+
max-width: 200px;
|
|
249
|
+
margin: 0 auto;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.ws-pipe-label {
|
|
253
|
+
font-size: 0.65rem;
|
|
254
|
+
font-weight: 900;
|
|
255
|
+
text-transform: uppercase;
|
|
256
|
+
letter-spacing: 0.18em;
|
|
257
|
+
color: var(--ws-muted);
|
|
258
|
+
margin-top: 0.75rem;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.ws-pipe-num {
|
|
262
|
+
font-size: 1.6rem;
|
|
263
|
+
font-weight: 900;
|
|
264
|
+
color: var(--ws-base);
|
|
265
|
+
line-height: 1;
|
|
266
|
+
margin-top: 0.25rem;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.ws-pipe-unit {
|
|
270
|
+
font-size: 0.75rem;
|
|
271
|
+
font-weight: 800;
|
|
272
|
+
text-transform: uppercase;
|
|
273
|
+
letter-spacing: 0.1em;
|
|
274
|
+
color: var(--ws-muted);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.ws-salt {
|
|
278
|
+
background: var(--ws-page);
|
|
279
|
+
border: 1px solid var(--ws-border);
|
|
280
|
+
border-radius: 20px;
|
|
281
|
+
padding: 1.25rem;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.ws-salt-grid {
|
|
285
|
+
display: grid;
|
|
286
|
+
grid-template-columns: repeat(5, 1fr);
|
|
287
|
+
gap: 0.5rem;
|
|
288
|
+
margin-top: 0.75rem;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.ws-salt-bag {
|
|
292
|
+
aspect-ratio: 3/4;
|
|
293
|
+
border-radius: 6px;
|
|
294
|
+
border: 1px solid var(--ws-border);
|
|
295
|
+
background: var(--ws-surface);
|
|
296
|
+
transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
|
|
297
|
+
position: relative;
|
|
298
|
+
overflow: hidden;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.ws-salt-bag.ws-filled {
|
|
302
|
+
border-color: rgba(59, 130, 246, 0.4);
|
|
303
|
+
position: relative;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.ws-salt-bag::before {
|
|
307
|
+
content: '';
|
|
308
|
+
position: absolute;
|
|
309
|
+
bottom: 0;
|
|
310
|
+
left: 0;
|
|
311
|
+
right: 0;
|
|
312
|
+
height: var(--fill, 0%);
|
|
313
|
+
background: linear-gradient(180deg, rgba(59, 130, 246, 0.35), rgba(59, 130, 246, 0.65));
|
|
314
|
+
border-radius: 0 0 5px 5px;
|
|
315
|
+
transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.ws-salt-bag.ws-filled::after {
|
|
319
|
+
content: '';
|
|
320
|
+
position: absolute;
|
|
321
|
+
inset: 3px;
|
|
322
|
+
border-radius: 3px;
|
|
323
|
+
background: rgba(255, 255, 255, 0.15);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.ws-salt-info {
|
|
327
|
+
display: grid;
|
|
328
|
+
grid-template-columns: repeat(4, 1fr);
|
|
329
|
+
gap: 0.75rem;
|
|
330
|
+
margin-top: 1rem;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.ws-salt-item {
|
|
334
|
+
text-align: center;
|
|
335
|
+
padding: 0.75rem;
|
|
336
|
+
border-radius: 12px;
|
|
337
|
+
background: var(--ws-surface);
|
|
338
|
+
border: 1px solid var(--ws-border);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.ws-salt-num {
|
|
342
|
+
font-size: 1.3rem;
|
|
343
|
+
font-weight: 900;
|
|
344
|
+
color: var(--ws-base);
|
|
345
|
+
line-height: 1;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.ws-salt-label {
|
|
349
|
+
font-size: 0.65rem;
|
|
350
|
+
font-weight: 800;
|
|
351
|
+
text-transform: uppercase;
|
|
352
|
+
letter-spacing: 0.1em;
|
|
353
|
+
color: var(--ws-muted);
|
|
354
|
+
margin-top: 0.35rem;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.ws-appliances {
|
|
358
|
+
display: grid;
|
|
359
|
+
grid-template-columns: repeat(3, 1fr);
|
|
360
|
+
gap: 0.75rem;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.ws-app {
|
|
364
|
+
text-align: center;
|
|
365
|
+
padding: 1rem 0.75rem;
|
|
366
|
+
border-radius: 16px;
|
|
367
|
+
background: var(--ws-page);
|
|
368
|
+
border: 1px solid var(--ws-border);
|
|
369
|
+
transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.ws-app:hover {
|
|
373
|
+
transform: translateY(-3px);
|
|
374
|
+
box-shadow: 0 8px 24px -8px var(--ws-accent-glow);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.ws-app svg {
|
|
378
|
+
width: 28px;
|
|
379
|
+
height: 28px;
|
|
380
|
+
color: var(--ws-accent);
|
|
381
|
+
margin-bottom: 0.5rem;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.ws-app-name {
|
|
385
|
+
font-size: 0.7rem;
|
|
386
|
+
font-weight: 900;
|
|
387
|
+
text-transform: uppercase;
|
|
388
|
+
letter-spacing: 0.1em;
|
|
389
|
+
color: var(--ws-muted);
|
|
390
|
+
margin: 0 0 0.5rem;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.ws-app-years {
|
|
394
|
+
font-size: 1.4rem;
|
|
395
|
+
font-weight: 900;
|
|
396
|
+
color: var(--ws-base);
|
|
397
|
+
line-height: 1;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.ws-app-sub {
|
|
401
|
+
font-size: 0.7rem;
|
|
402
|
+
font-weight: 700;
|
|
403
|
+
color: var(--ws-muted);
|
|
404
|
+
margin-top: 0.25rem;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.ws-app-saved {
|
|
408
|
+
display: inline-block;
|
|
409
|
+
margin-top: 0.5rem;
|
|
410
|
+
font-size: 0.75rem;
|
|
411
|
+
font-weight: 800;
|
|
412
|
+
color: var(--ws-success);
|
|
413
|
+
padding: 0.3rem 0.75rem;
|
|
414
|
+
border-radius: 999px;
|
|
415
|
+
background: rgba(34, 197, 94, 0.1);
|
|
416
|
+
border: 1px solid rgba(34, 197, 94, 0.22);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
@media (max-width: 520px) {
|
|
420
|
+
.ws-card {
|
|
421
|
+
border-radius: 22px;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.ws-stage {
|
|
425
|
+
padding: 1.25rem 1rem;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.ws-body {
|
|
429
|
+
padding: 1.25rem 1rem;
|
|
430
|
+
gap: 1.25rem;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.ws-fields {
|
|
434
|
+
grid-template-columns: 1fr;
|
|
435
|
+
gap: 0.875rem;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.ws-salt-grid {
|
|
439
|
+
grid-template-columns: repeat(4, 1fr);
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.ws-salt-info {
|
|
443
|
+
grid-template-columns: repeat(2, 1fr);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.ws-appliances {
|
|
447
|
+
grid-template-columns: 1fr;
|
|
448
|
+
}
|
|
449
|
+
}
|
package/src/tools.ts
CHANGED
|
@@ -16,6 +16,7 @@ import { APPLIANCE_COST_CALCULATOR_TOOL } from './tool/applianceCostCalculator/i
|
|
|
16
16
|
import { TILE_LAYOUT_CALCULATOR_TOOL } from './tool/tileLayoutCalculator/index';
|
|
17
17
|
import { LIGHTING_CALCULATOR_TOOL } from './tool/lightingCalculator/index';
|
|
18
18
|
import { HUMIDITY_CALCULATOR_TOOL } from './tool/humidityCalculator/index';
|
|
19
|
+
import { WATER_SOFTENER_TOOL } from './tool/waterSoftener/index';
|
|
19
20
|
|
|
20
21
|
export const ALL_TOOLS: ToolDefinition[] = [
|
|
21
22
|
QR_GENERATOR_TOOL,
|
|
@@ -34,5 +35,6 @@ export const ALL_TOOLS: ToolDefinition[] = [
|
|
|
34
35
|
TILE_LAYOUT_CALCULATOR_TOOL,
|
|
35
36
|
LIGHTING_CALCULATOR_TOOL,
|
|
36
37
|
HUMIDITY_CALCULATOR_TOOL,
|
|
38
|
+
WATER_SOFTENER_TOOL,
|
|
37
39
|
];
|
|
38
40
|
|