@jjlmoya/utils-nature 1.10.0 → 1.12.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.
@@ -1,34 +1,5 @@
1
- import type { NatureToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
- import type { DigitalCarbonUI } from './ui';
3
-
4
- export type DigitalCarbonLocaleContent = ToolLocaleContent<DigitalCarbonUI>;
5
-
6
- export const digitalCarbon: NatureToolEntry<DigitalCarbonUI> = {
7
- id: 'digital-carbon',
8
- icons: {
9
- bg: 'mdi:leaf',
10
- fg: 'mdi:monitor',
11
- },
12
- i18n: {
13
- de: async () => (await import('./i18n/de')).content,
14
- en: async () => (await import('./i18n/en')).content,
15
- es: async () => (await import('./i18n/es')).content,
16
- fr: async () => (await import('./i18n/fr')).content,
17
- id: async () => (await import('./i18n/id')).content,
18
- it: async () => (await import('./i18n/it')).content,
19
- ja: async () => (await import('./i18n/ja')).content,
20
- ko: async () => (await import('./i18n/ko')).content,
21
- nl: async () => (await import('./i18n/nl')).content,
22
- pl: async () => (await import('./i18n/pl')).content,
23
- pt: async () => (await import('./i18n/pt')).content,
24
- ru: async () => (await import('./i18n/ru')).content,
25
- sv: async () => (await import('./i18n/sv')).content,
26
- tr: async () => (await import('./i18n/tr')).content,
27
- zh: async () => (await import('./i18n/zh')).content,
28
- },
29
- };
30
-
31
-
1
+ import { digitalCarbon } from './entry';
2
+ export * from './entry';
32
3
  export const DIGITAL_CARBON_TOOL: ToolDefinition = {
33
4
  entry: digitalCarbon,
34
5
  Component: () => import('./component.astro'),
@@ -130,344 +130,6 @@ const materialNames: Record<string, string> = {
130
130
  </div>
131
131
  </rain-harvester>
132
132
 
133
- <style>
134
- .rh-wrap {
135
- --rh-bg: #fff;
136
- --rh-bg-inputs: #f8fafc;
137
- --rh-border: #e2e8f0;
138
- --rh-text: #1e293b;
139
- --rh-text-muted: #64748b;
140
- --rh-accent: #06b6d4;
141
- --rh-accent-dark: #0891b2;
142
- --rh-result-bg: linear-gradient(135deg, #06b6d4, #2563eb);
143
- --rh-info-bg: #f0f9ff;
144
- --rh-info-border: #bae6fd;
145
- --rh-info-text: #0369a1;
146
-
147
- display: block;
148
- max-width: 72rem;
149
- margin: 0 auto;
150
- padding: 1rem;
151
- user-select: none;
152
- }
153
-
154
- :global(.theme-dark) .rh-wrap {
155
- --rh-bg: #0f172a;
156
- --rh-bg-inputs: #1e293b;
157
- --rh-border: #334155;
158
- --rh-text: #f1f5f9;
159
- --rh-text-muted: #94a3b8;
160
- --rh-info-bg: rgba(3, 105, 161, 0.1);
161
- --rh-info-border: #0369a1;
162
- --rh-info-text: #7dd3fc;
163
- }
164
-
165
- .rh-container {
166
- display: grid;
167
- grid-template-columns: 1fr;
168
- background: var(--rh-bg);
169
- border-radius: 2rem;
170
- overflow: hidden;
171
- border: 1px solid var(--rh-border);
172
- box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
173
- }
174
-
175
- @media (min-width: 1024px) {
176
- .rh-container {
177
- grid-template-columns: 1fr 1fr;
178
- }
179
- }
180
-
181
- .rh-inputs {
182
- padding: 2.5rem;
183
- background: var(--rh-bg-inputs);
184
- }
185
-
186
- .rh-section-head {
187
- font-size: 1.25rem;
188
- font-weight: 800;
189
- color: var(--rh-text);
190
- display: flex;
191
- align-items: center;
192
- gap: 0.75rem;
193
- margin-bottom: 2rem;
194
- text-transform: uppercase;
195
- letter-spacing: 0.05em;
196
- }
197
-
198
- .rh-step-badge {
199
- width: 2.25rem;
200
- height: 2.25rem;
201
- background: var(--rh-text);
202
- color: var(--rh-bg);
203
- border-radius: 50%;
204
- display: flex;
205
- align-items: center;
206
- justify-content: center;
207
- font-size: 1rem;
208
- font-weight: 900;
209
- }
210
-
211
- .rh-field-group {
212
- display: flex;
213
- flex-direction: column;
214
- gap: 1.5rem;
215
- margin-bottom: 2rem;
216
- }
217
-
218
- .rh-field {
219
- display: flex;
220
- flex-direction: column;
221
- gap: 0.5rem;
222
- }
223
-
224
- .rh-label {
225
- font-size: 0.75rem;
226
- font-weight: 700;
227
- text-transform: uppercase;
228
- color: var(--rh-text-muted);
229
- letter-spacing: 0.05em;
230
- display: flex;
231
- align-items: center;
232
- gap: 0.5rem;
233
- }
234
-
235
- .rh-label-icon {
236
- font-size: 1.25rem;
237
- color: var(--rh-accent);
238
- }
239
-
240
- .rh-input-wrap, .rh-select-wrap {
241
- position: relative;
242
- }
243
-
244
- .rh-input, .rh-select {
245
- width: 100%;
246
- background: var(--rh-bg);
247
- border: 2px solid var(--rh-border);
248
- border-radius: 1rem;
249
- padding: 0.875rem 1rem;
250
- font-size: 1.5rem;
251
- font-weight: 700;
252
- color: var(--rh-text);
253
- transition: border-color 0.2s;
254
- outline: none;
255
- }
256
-
257
- .rh-select {
258
- font-size: 1.125rem;
259
- cursor: pointer;
260
- appearance: none;
261
- }
262
-
263
- .rh-input:focus, .rh-select:focus {
264
- border-color: var(--rh-accent);
265
- }
266
-
267
- .rh-input-suffix {
268
- position: absolute;
269
- right: 1.25rem;
270
- top: 50%;
271
- transform: translateY(-50%);
272
- font-weight: 700;
273
- color: var(--rh-text-muted);
274
- pointer-events: none;
275
- }
276
-
277
- .rh-field-help {
278
- font-size: 0.75rem;
279
- font-style: italic;
280
- color: var(--rh-text-muted);
281
- }
282
-
283
- .rh-select-arrow {
284
- position: absolute;
285
- right: 1.25rem;
286
- top: 50%;
287
- transform: translateY(-50%);
288
- font-size: 1.5rem;
289
- color: var(--rh-text-muted);
290
- pointer-events: none;
291
- }
292
-
293
- .rh-info-card {
294
- background: var(--rh-info-bg);
295
- border: 1px solid var(--rh-info-border);
296
- border-radius: 1.25rem;
297
- padding: 1.25rem;
298
- display: flex;
299
- gap: 1rem;
300
- align-items: center;
301
- }
302
-
303
- .rh-info-icon-box {
304
- background: var(--rh-info-border);
305
- color: var(--rh-info-text);
306
- padding: 0.75rem;
307
- border-radius: 0.75rem;
308
- display: flex;
309
- }
310
-
311
- .rh-info-icon {
312
- font-size: 1.5rem;
313
- }
314
-
315
- .rh-info-title {
316
- margin: 0;
317
- font-weight: 800;
318
- color: var(--rh-info-text);
319
- font-size: 0.875rem;
320
- }
321
-
322
- .rh-info-text {
323
- margin: 0.25rem 0 0;
324
- font-size: 0.75rem;
325
- color: var(--rh-info-text);
326
- opacity: 0.9;
327
- }
328
-
329
- .rh-results {
330
- background: var(--rh-result-bg);
331
- padding: 2.5rem;
332
- color: #fff;
333
- display: flex;
334
- flex-direction: column;
335
- justify-content: space-between;
336
- position: relative;
337
- overflow: hidden;
338
- }
339
-
340
- .rh-result-main {
341
- position: relative;
342
- z-index: 10;
343
- }
344
-
345
- .rh-result-label {
346
- font-size: 0.875rem;
347
- font-weight: 700;
348
- text-transform: uppercase;
349
- letter-spacing: 0.1em;
350
- color: rgba(255, 255, 255, 0.8);
351
- margin: 0 0 0.5rem;
352
- }
353
-
354
- .rh-result-value-box {
355
- display: flex;
356
- align-items: baseline;
357
- gap: 0.5rem;
358
- }
359
-
360
- .rh-result-big {
361
- font-size: 5rem;
362
- font-weight: 900;
363
- letter-spacing: -0.05em;
364
- line-height: 1;
365
- }
366
-
367
- .rh-result-unit {
368
- font-size: 1.5rem;
369
- font-weight: 700;
370
- color: rgba(255, 255, 255, 0.8);
371
- }
372
-
373
- .rh-equivalencies {
374
- position: relative;
375
- z-index: 10;
376
- margin-top: 2rem;
377
- }
378
-
379
- .rh-equiv-title {
380
- font-size: 1rem;
381
- font-weight: 800;
382
- margin: 0 0 1.25rem;
383
- padding-bottom: 0.75rem;
384
- border-bottom: 1px solid rgba(255, 255, 255, 0.2);
385
- }
386
-
387
- .rh-equiv-grid {
388
- display: flex;
389
- flex-direction: column;
390
- gap: 1rem;
391
- }
392
-
393
- .rh-equiv-card {
394
- background: rgba(255, 255, 255, 0.1);
395
- backdrop-filter: blur(8px);
396
- border: 1px solid rgba(255, 255, 255, 0.2);
397
- border-radius: 1rem;
398
- padding: 1rem;
399
- display: flex;
400
- align-items: center;
401
- gap: 1rem;
402
- }
403
-
404
- .rh-equiv-icon {
405
- font-size: 2rem;
406
- color: rgba(255, 255, 255, 0.9);
407
- }
408
-
409
- .rh-equiv-info {
410
- display: flex;
411
- flex-direction: column;
412
- }
413
-
414
- .rh-equiv-val {
415
- font-size: 1.5rem;
416
- font-weight: 800;
417
- line-height: 1;
418
- }
419
-
420
- .rh-equiv-label {
421
- font-size: 0.65rem;
422
- text-transform: uppercase;
423
- font-weight: 700;
424
- margin-top: 0.25rem;
425
- color: rgba(255, 255, 255, 0.7);
426
- }
427
-
428
- .rh-bg-icon {
429
- position: absolute;
430
- bottom: -2rem;
431
- right: -2rem;
432
- font-size: 15rem;
433
- opacity: 0.1;
434
- pointer-events: none;
435
- z-index: 1;
436
- }
437
-
438
- .rh-liquid-container {
439
- position: absolute;
440
- inset: 0;
441
- z-index: 0;
442
- pointer-events: none;
443
- }
444
-
445
- .rh-liquid-fill {
446
- position: absolute;
447
- bottom: 0;
448
- left: 0;
449
- width: 100%;
450
- background: rgba(255, 255, 255, 0.1);
451
- transition: height 1s ease-in-out;
452
- height: 0;
453
- }
454
-
455
- .rh-liquid-wave {
456
- position: absolute;
457
- top: -0.5rem;
458
- left: 0;
459
- width: 100%;
460
- height: 1rem;
461
- background: rgba(255, 255, 255, 0.15);
462
- transform: skewY(1deg);
463
- animation: rh-wave 3s infinite alternate ease-in-out;
464
- }
465
-
466
- @keyframes rh-wave {
467
- from { transform: skewY(1deg); }
468
- to { transform: skewY(-1deg); }
469
- }
470
- </style>
471
133
 
472
134
  <script>
473
135
  class RainHarvester extends HTMLElement {
@@ -0,0 +1,29 @@
1
+ import type { NatureToolEntry, ToolLocaleContent } from '../../types';
2
+ import type { RainHarvesterUI } from './ui';
3
+
4
+ export type RainHarvesterLocaleContent = ToolLocaleContent<RainHarvesterUI>;
5
+
6
+ export const rainHarvester: NatureToolEntry<RainHarvesterUI> = {
7
+ id: 'rain-harvester',
8
+ icons: {
9
+ bg: 'mdi:weather-pouring',
10
+ fg: 'mdi:water',
11
+ },
12
+ i18n: {
13
+ de: async () => (await import('./i18n/de')).content,
14
+ en: async () => (await import('./i18n/en')).content,
15
+ es: async () => (await import('./i18n/es')).content,
16
+ fr: async () => (await import('./i18n/fr')).content,
17
+ id: async () => (await import('./i18n/id')).content,
18
+ it: async () => (await import('./i18n/it')).content,
19
+ ja: async () => (await import('./i18n/ja')).content,
20
+ ko: async () => (await import('./i18n/ko')).content,
21
+ nl: async () => (await import('./i18n/nl')).content,
22
+ pl: async () => (await import('./i18n/pl')).content,
23
+ pt: async () => (await import('./i18n/pt')).content,
24
+ ru: async () => (await import('./i18n/ru')).content,
25
+ sv: async () => (await import('./i18n/sv')).content,
26
+ tr: async () => (await import('./i18n/tr')).content,
27
+ zh: async () => (await import('./i18n/zh')).content,
28
+ },
29
+ };
@@ -1,34 +1,5 @@
1
- import type { NatureToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
- import type { RainHarvesterUI } from './ui';
3
-
4
- export type RainHarvesterLocaleContent = ToolLocaleContent<RainHarvesterUI>;
5
-
6
- export const rainHarvester: NatureToolEntry<RainHarvesterUI> = {
7
- id: 'rain-harvester',
8
- icons: {
9
- bg: 'mdi:weather-pouring',
10
- fg: 'mdi:water',
11
- },
12
- i18n: {
13
- de: async () => (await import('./i18n/de')).content,
14
- en: async () => (await import('./i18n/en')).content,
15
- es: async () => (await import('./i18n/es')).content,
16
- fr: async () => (await import('./i18n/fr')).content,
17
- id: async () => (await import('./i18n/id')).content,
18
- it: async () => (await import('./i18n/it')).content,
19
- ja: async () => (await import('./i18n/ja')).content,
20
- ko: async () => (await import('./i18n/ko')).content,
21
- nl: async () => (await import('./i18n/nl')).content,
22
- pl: async () => (await import('./i18n/pl')).content,
23
- pt: async () => (await import('./i18n/pt')).content,
24
- ru: async () => (await import('./i18n/ru')).content,
25
- sv: async () => (await import('./i18n/sv')).content,
26
- tr: async () => (await import('./i18n/tr')).content,
27
- zh: async () => (await import('./i18n/zh')).content,
28
- },
29
- };
30
-
31
-
1
+ import { rainHarvester } from './entry';
2
+ export * from './entry';
32
3
  export const RAIN_HARVESTER_TOOL: ToolDefinition = {
33
4
  entry: rainHarvester,
34
5
  Component: () => import('./component.astro'),