@jjlmoya/utils-diy 1.8.0 → 1.10.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 (56) hide show
  1. package/package.json +7 -4
  2. package/scripts/postinstall.mjs +27 -0
  3. package/src/entries.ts +31 -0
  4. package/src/tool/balusterCalculator/baluster-calculator.css +320 -0
  5. package/src/tool/balusterCalculator/component.astro +0 -322
  6. package/src/tool/balusterCalculator/entry.ts +29 -0
  7. package/src/tool/balusterCalculator/index.ts +2 -31
  8. package/src/tool/clayCalculator/clay-shrinkage-calculator.css +530 -0
  9. package/src/tool/clayCalculator/component.astro +0 -532
  10. package/src/tool/clayCalculator/entry.ts +29 -0
  11. package/src/tool/clayCalculator/index.ts +2 -31
  12. package/src/tool/concreteCalculator/component.astro +0 -705
  13. package/src/tool/concreteCalculator/concrete-mortar-calculator.css +703 -0
  14. package/src/tool/concreteCalculator/entry.ts +25 -0
  15. package/src/tool/concreteCalculator/index.ts +2 -26
  16. package/src/tool/cutOptimizer/component.astro +0 -477
  17. package/src/tool/cutOptimizer/cut-optimizer.css +475 -0
  18. package/src/tool/cutOptimizer/entry.ts +25 -0
  19. package/src/tool/cutOptimizer/index.ts +2 -26
  20. package/src/tool/drillCalculator/component.astro +0 -815
  21. package/src/tool/drillCalculator/drill-rpm-calculator.css +813 -0
  22. package/src/tool/drillCalculator/entry.ts +25 -0
  23. package/src/tool/drillCalculator/index.ts +2 -26
  24. package/src/tool/drillSharpener/component.astro +0 -393
  25. package/src/tool/drillSharpener/drill-sharpening-master.css +391 -0
  26. package/src/tool/drillSharpener/entry.ts +25 -0
  27. package/src/tool/drillSharpener/index.ts +2 -27
  28. package/src/tool/epoxyCalculator/component.astro +0 -571
  29. package/src/tool/epoxyCalculator/entry.ts +29 -0
  30. package/src/tool/epoxyCalculator/epoxy-resin-calculator.css +569 -0
  31. package/src/tool/epoxyCalculator/index.ts +2 -31
  32. package/src/tool/furnitureFit/component.astro +0 -345
  33. package/src/tool/furnitureFit/entry.ts +25 -0
  34. package/src/tool/furnitureFit/furniture-fit-calculator.css +343 -0
  35. package/src/tool/furnitureFit/index.ts +2 -26
  36. package/src/tool/mortarCalculator/component.astro +0 -620
  37. package/src/tool/mortarCalculator/entry.ts +25 -0
  38. package/src/tool/mortarCalculator/index.ts +2 -26
  39. package/src/tool/mortarCalculator/lime-mortar-calculator.css +618 -0
  40. package/src/tool/passepartoutCalculator/component.astro +0 -518
  41. package/src/tool/passepartoutCalculator/entry.ts +25 -0
  42. package/src/tool/passepartoutCalculator/index.ts +2 -26
  43. package/src/tool/passepartoutCalculator/passepartout-calculator.css +516 -0
  44. package/src/tool/stairCalculator/component.astro +0 -480
  45. package/src/tool/stairCalculator/entry.ts +25 -0
  46. package/src/tool/stairCalculator/index.ts +2 -27
  47. package/src/tool/stairCalculator/stair-calculator.css +478 -0
  48. package/src/tool/thermalExpansionCalculator/component.astro +0 -490
  49. package/src/tool/thermalExpansionCalculator/entry.ts +25 -0
  50. package/src/tool/thermalExpansionCalculator/index.ts +2 -26
  51. package/src/tool/thermalExpansionCalculator/thermal-expansion-calculator.css +488 -0
  52. package/src/tool/voltageDropCalculator/component.astro +0 -729
  53. package/src/tool/voltageDropCalculator/entry.ts +25 -0
  54. package/src/tool/voltageDropCalculator/index.ts +2 -26
  55. package/src/tool/voltageDropCalculator/voltage-drop-calculator.css +727 -0
  56. package/src/tools.ts +1 -1
@@ -279,493 +279,3 @@ const t = (ui ?? {}) as ThermalExpansionCalculatorUI;
279
279
  document.querySelectorAll("[data-te-root]").forEach(teAttach);
280
280
  </script>
281
281
 
282
- <style>
283
- .te-root {
284
- width: 100%;
285
- max-width: 1100px;
286
- margin: 0 auto;
287
- }
288
-
289
- .te-grid {
290
- display: grid;
291
- grid-template-columns: 340px 1fr;
292
- border: 1px solid #e5e7eb;
293
- border-radius: 24px;
294
- overflow: hidden;
295
- }
296
-
297
- :global(.theme-dark) .te-grid {
298
- border-color: rgba(255, 255, 255, 0.08);
299
- }
300
-
301
- .te-sidebar {
302
- padding: 2rem;
303
- background: rgba(255, 255, 255, 0.6);
304
- border-right: 1px solid #e5e7eb;
305
- display: flex;
306
- flex-direction: column;
307
- gap: 1.5rem;
308
- }
309
-
310
- :global(.theme-dark) .te-sidebar {
311
- background: rgba(255, 255, 255, 0.02);
312
- border-right-color: rgba(255, 255, 255, 0.06);
313
- }
314
-
315
- .te-main {
316
- padding: 2rem;
317
- display: flex;
318
- flex-direction: column;
319
- gap: 1.5rem;
320
- background: rgba(255, 255, 255, 0.3);
321
- }
322
-
323
- :global(.theme-dark) .te-main {
324
- background: rgba(255, 255, 255, 0.01);
325
- }
326
-
327
- .te-section-hdr {
328
- font-size: 0.65rem;
329
- font-weight: 800;
330
- text-transform: uppercase;
331
- letter-spacing: 0.1em;
332
- color: #f97316;
333
- margin: 0;
334
- }
335
-
336
- .te-cat-badge {
337
- display: flex;
338
- align-items: center;
339
- gap: 0.75rem;
340
- background: white;
341
- border: 1px solid rgba(0, 0, 0, 0.05);
342
- border-radius: 12px;
343
- padding: 0.75rem 1rem;
344
- }
345
-
346
- :global(.theme-dark) .te-cat-badge {
347
- background: rgba(255, 255, 255, 0.04);
348
- border-color: rgba(255, 255, 255, 0.06);
349
- }
350
-
351
- .te-cat-dot {
352
- width: 10px;
353
- height: 10px;
354
- border-radius: 50%;
355
- background: #f97316;
356
- flex-shrink: 0;
357
- }
358
-
359
- .te-cat-name {
360
- font-size: 0.8rem;
361
- font-weight: 800;
362
- color: #374151;
363
- }
364
-
365
- :global(.theme-dark) .te-cat-name {
366
- color: #e5e7eb;
367
- }
368
-
369
- .te-field {
370
- display: flex;
371
- flex-direction: column;
372
- gap: 0.5rem;
373
- }
374
-
375
- .te-label {
376
- font-size: 0.7rem;
377
- font-weight: 700;
378
- text-transform: uppercase;
379
- letter-spacing: 0.05em;
380
- color: #6b7280;
381
- }
382
-
383
- :global(.theme-dark) .te-label {
384
- color: #9ca3af;
385
- }
386
-
387
- .te-input-row {
388
- position: relative;
389
- display: flex;
390
- align-items: center;
391
- }
392
-
393
- .te-input {
394
- width: 100%;
395
- padding: 0.875rem 3rem 0.875rem 1rem;
396
- border: 2px solid #e5e7eb;
397
- border-radius: 12px;
398
- font-size: 1.1rem;
399
- font-weight: 800;
400
- background: white;
401
- color: #111827;
402
- transition: border-color 0.2s;
403
- }
404
-
405
- .te-input:focus {
406
- outline: none;
407
- border-color: #f97316;
408
- }
409
-
410
- :global(.theme-dark) .te-input {
411
- background: rgba(0, 0, 0, 0.25);
412
- border-color: rgba(255, 255, 255, 0.1);
413
- color: #f9fafb;
414
- }
415
-
416
- :global(.theme-dark) .te-input:focus {
417
- border-color: #f97316;
418
- }
419
-
420
- .te-unit {
421
- position: absolute;
422
- right: 1rem;
423
- font-size: 0.7rem;
424
- font-weight: 900;
425
- color: #f97316;
426
- pointer-events: none;
427
- }
428
-
429
- .te-select {
430
- width: 100%;
431
- padding: 0.875rem 2.5rem 0.875rem 1rem;
432
- border: 2px solid #e5e7eb;
433
- border-radius: 12px;
434
- font-weight: 700;
435
- font-size: 0.9rem;
436
- background: white;
437
- color: #111827;
438
- appearance: none;
439
- -webkit-appearance: none;
440
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cpath fill='%23f97316' d='M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6l1.41-1.42Z'/%3E%3C/svg%3E");
441
- background-repeat: no-repeat;
442
- background-position: right 0.75rem center;
443
- cursor: pointer;
444
- transition: border-color 0.2s;
445
- }
446
-
447
- .te-select:focus {
448
- outline: none;
449
- border-color: #f97316;
450
- }
451
-
452
- :global(.theme-dark) .te-select {
453
- background-color: rgba(0, 0, 0, 0.25);
454
- border-color: rgba(255, 255, 255, 0.1);
455
- color: #f9fafb;
456
- }
457
-
458
- .te-temp-grid {
459
- display: grid;
460
- grid-template-columns: 1fr 1fr;
461
- gap: 0.75rem;
462
- }
463
-
464
- .te-delta-bar {
465
- display: flex;
466
- justify-content: space-between;
467
- align-items: center;
468
- background: rgba(249, 115, 22, 0.08);
469
- border: 1px solid rgba(249, 115, 22, 0.2);
470
- border-radius: 12px;
471
- padding: 1rem 1.25rem;
472
- margin-top: auto;
473
- }
474
-
475
- .te-delta-lbl {
476
- font-size: 0.65rem;
477
- font-weight: 800;
478
- text-transform: uppercase;
479
- letter-spacing: 0.08em;
480
- color: #f97316;
481
- }
482
-
483
- .te-delta-val {
484
- font-size: 1.1rem;
485
- font-weight: 900;
486
- color: #f97316;
487
- }
488
-
489
- .te-viz {
490
- position: relative;
491
- background: rgba(0, 0, 0, 0.02);
492
- border: 1px dashed rgba(0, 0, 0, 0.1);
493
- border-radius: 16px;
494
- padding: 2.5rem 3rem 1.5rem;
495
- min-height: 120px;
496
- display: flex;
497
- flex-direction: column;
498
- gap: 0.5rem;
499
- justify-content: center;
500
- }
501
-
502
- :global(.theme-dark) .te-viz {
503
- background: rgba(255, 255, 255, 0.01);
504
- border-color: rgba(255, 255, 255, 0.06);
505
- }
506
-
507
- .te-beam-wrap {
508
- position: relative;
509
- height: 32px;
510
- border-radius: 4px;
511
- overflow: visible;
512
- }
513
-
514
- .te-beam-base {
515
- position: absolute;
516
- inset: 0;
517
- background: linear-gradient(to bottom, #d1d5db, #9ca3af);
518
- border-radius: 4px;
519
- z-index: 2;
520
- }
521
-
522
- :global(.theme-dark) .te-beam-base {
523
- background: linear-gradient(to bottom, #4b5563, #374151);
524
- }
525
-
526
- .te-beam-expand {
527
- position: absolute;
528
- left: 0;
529
- top: 0;
530
- height: 100%;
531
- width: 100%;
532
- background: rgba(249, 115, 22, 0.25);
533
- border-right: 3px solid #f97316;
534
- border-radius: 4px;
535
- transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
536
- z-index: 1;
537
- }
538
-
539
- .te-markers {
540
- display: flex;
541
- justify-content: space-between;
542
- padding: 0 2px;
543
- }
544
-
545
- .te-marker {
546
- font-size: 0.6rem;
547
- font-weight: 800;
548
- color: #9ca3af;
549
- }
550
-
551
- .te-ind-wrap {
552
- position: absolute;
553
- top: 0.75rem;
554
- left: 0;
555
- right: 0;
556
- display: flex;
557
- justify-content: center;
558
- }
559
-
560
- .te-ind {
561
- background: #f97316;
562
- color: white;
563
- padding: 0.25rem 0.75rem;
564
- border-radius: 20px;
565
- font-size: 0.7rem;
566
- font-weight: 900;
567
- box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
568
- animation: te-bounce 2s infinite;
569
- }
570
-
571
- @keyframes te-bounce {
572
- 0%,
573
- 100% {
574
- transform: translateY(0);
575
- }
576
- 50% {
577
- transform: translateY(-4px);
578
- }
579
- }
580
-
581
- .te-results {
582
- display: grid;
583
- grid-template-columns: 1fr 1fr;
584
- gap: 1rem;
585
- }
586
-
587
- .te-result-primary,
588
- .te-result-secondary {
589
- padding: 1.5rem;
590
- border-radius: 18px;
591
- display: flex;
592
- flex-direction: column;
593
- gap: 0.5rem;
594
- }
595
-
596
- .te-result-primary {
597
- background: linear-gradient(135deg, #f97316, #ea580c);
598
- color: white;
599
- box-shadow: 0 12px 28px rgba(234, 88, 12, 0.25);
600
- }
601
-
602
- .te-result-secondary {
603
- background: rgba(255, 255, 255, 0.5);
604
- border: 1px solid rgba(255, 255, 255, 0.7);
605
- }
606
-
607
- :global(.theme-dark) .te-result-secondary {
608
- background: rgba(255, 255, 255, 0.04);
609
- border-color: rgba(255, 255, 255, 0.06);
610
- }
611
-
612
- .te-result-lbl {
613
- font-size: 0.65rem;
614
- font-weight: 800;
615
- text-transform: uppercase;
616
- letter-spacing: 0.08em;
617
- opacity: 0.75;
618
- }
619
-
620
- .te-result-secondary .te-result-lbl {
621
- color: #6b7280;
622
- opacity: 1;
623
- }
624
-
625
- :global(.theme-dark) .te-result-secondary .te-result-lbl {
626
- color: #9ca3af;
627
- }
628
-
629
- .te-result-val {
630
- display: flex;
631
- align-items: baseline;
632
- gap: 0.35rem;
633
- }
634
-
635
- .te-result-num {
636
- font-size: 2rem;
637
- font-weight: 900;
638
- line-height: 1;
639
- }
640
-
641
- .te-result-secondary .te-result-num {
642
- color: #111827;
643
- }
644
-
645
- :global(.theme-dark) .te-result-secondary .te-result-num {
646
- color: #f9fafb;
647
- }
648
-
649
- .te-result-unit {
650
- font-size: 0.8rem;
651
- font-weight: 800;
652
- opacity: 0.7;
653
- }
654
-
655
- .te-result-secondary .te-result-unit {
656
- color: #374151;
657
- opacity: 1;
658
- }
659
-
660
- :global(.theme-dark) .te-result-secondary .te-result-unit {
661
- color: #d1d5db;
662
- }
663
-
664
- .te-ref-grid {
665
- display: grid;
666
- grid-template-columns: 1fr 1fr;
667
- gap: 0.75rem;
668
- }
669
-
670
- .te-ref-card {
671
- background: rgba(255, 255, 255, 0.4);
672
- border: 1px solid rgba(255, 255, 255, 0.6);
673
- border-radius: 14px;
674
- padding: 1rem 1.25rem;
675
- display: flex;
676
- flex-direction: column;
677
- gap: 0.3rem;
678
- transition:
679
- background 0.25s,
680
- border-color 0.25s;
681
- }
682
-
683
- :global(.theme-dark) .te-ref-card {
684
- background: rgba(255, 255, 255, 0.03);
685
- border-color: rgba(255, 255, 255, 0.06);
686
- }
687
-
688
- .te-ref-card[data-risk="critical"] {
689
- background: rgba(239, 68, 68, 0.08);
690
- border-color: rgba(239, 68, 68, 0.25);
691
- }
692
-
693
- .te-ref-card[data-risk="moderate"] {
694
- background: rgba(245, 158, 11, 0.08);
695
- border-color: rgba(245, 158, 11, 0.25);
696
- }
697
-
698
- .te-ref-title {
699
- font-size: 0.6rem;
700
- font-weight: 800;
701
- text-transform: uppercase;
702
- letter-spacing: 0.08em;
703
- color: #9ca3af;
704
- }
705
-
706
- .te-ref-val {
707
- font-size: 1.1rem;
708
- font-weight: 900;
709
- color: #374151;
710
- }
711
-
712
- :global(.theme-dark) .te-ref-val {
713
- color: #e5e7eb;
714
- }
715
-
716
- .te-ref-card[data-risk="critical"] .te-ref-val {
717
- color: #ef4444;
718
- }
719
-
720
- .te-ref-card[data-risk="moderate"] .te-ref-val {
721
- color: #f59e0b;
722
- }
723
-
724
- .te-tip-card {
725
- display: flex;
726
- align-items: flex-start;
727
- gap: 0.75rem;
728
- background: rgba(249, 115, 22, 0.04);
729
- border: 1px dashed rgba(249, 115, 22, 0.2);
730
- border-radius: 14px;
731
- padding: 1rem 1.25rem;
732
- }
733
-
734
- .te-tip-bullet {
735
- color: #f97316;
736
- font-size: 0.7rem;
737
- flex-shrink: 0;
738
- padding-top: 0.15rem;
739
- }
740
-
741
- .te-tip-text {
742
- margin: 0;
743
- font-size: 0.82rem;
744
- line-height: 1.55;
745
- color: #6b7280;
746
- font-style: italic;
747
- }
748
-
749
- :global(.theme-dark) .te-tip-text {
750
- color: #9ca3af;
751
- }
752
-
753
- @media (max-width: 860px) {
754
- .te-grid {
755
- grid-template-columns: 1fr;
756
- }
757
-
758
- .te-sidebar {
759
- border-right: none;
760
- border-bottom: 1px solid #e5e7eb;
761
- }
762
-
763
- :global(.theme-dark) .te-sidebar {
764
- border-bottom-color: rgba(255, 255, 255, 0.06);
765
- }
766
-
767
- .te-results {
768
- grid-template-columns: 1fr;
769
- }
770
- }
771
- </style>
@@ -0,0 +1,25 @@
1
+ import type { DiyToolEntry } from '../../types';
2
+ import type { ThermalExpansionCalculatorUI } from './ui';
3
+
4
+
5
+ export const thermalExpansionCalculator: DiyToolEntry<ThermalExpansionCalculatorUI> = {
6
+ id: 'thermal-expansion-calculator',
7
+ icons: { bg: 'mdi:thermometer-lines', fg: 'mdi:ruler' },
8
+ i18n: {
9
+ de: () => import('./i18n/de').then((m) => m.content),
10
+ en: () => import('./i18n/en').then((m) => m.content),
11
+ es: () => import('./i18n/es').then((m) => m.content),
12
+ fr: () => import('./i18n/fr').then((m) => m.content),
13
+ id: () => import('./i18n/id').then((m) => m.content),
14
+ it: () => import('./i18n/it').then((m) => m.content),
15
+ ja: () => import('./i18n/ja').then((m) => m.content),
16
+ ko: () => import('./i18n/ko').then((m) => m.content),
17
+ nl: () => import('./i18n/nl').then((m) => m.content),
18
+ pl: () => import('./i18n/pl').then((m) => m.content),
19
+ pt: () => import('./i18n/pt').then((m) => m.content),
20
+ ru: () => import('./i18n/ru').then((m) => m.content),
21
+ sv: () => import('./i18n/sv').then((m) => m.content),
22
+ tr: () => import('./i18n/tr').then((m) => m.content),
23
+ zh: () => import('./i18n/zh').then((m) => m.content),
24
+ },
25
+ };
@@ -1,29 +1,5 @@
1
- import type { DiyToolEntry, ToolDefinition } from '../../types';
2
- import type { ThermalExpansionCalculatorUI } from './ui';
3
-
4
-
5
- export const thermalExpansionCalculator: DiyToolEntry<ThermalExpansionCalculatorUI> = {
6
- id: 'thermal-expansion-calculator',
7
- icons: { bg: 'mdi:thermometer-lines', fg: 'mdi:ruler' },
8
- i18n: {
9
- de: () => import('./i18n/de').then((m) => m.content),
10
- en: () => import('./i18n/en').then((m) => m.content),
11
- es: () => import('./i18n/es').then((m) => m.content),
12
- fr: () => import('./i18n/fr').then((m) => m.content),
13
- id: () => import('./i18n/id').then((m) => m.content),
14
- it: () => import('./i18n/it').then((m) => m.content),
15
- ja: () => import('./i18n/ja').then((m) => m.content),
16
- ko: () => import('./i18n/ko').then((m) => m.content),
17
- nl: () => import('./i18n/nl').then((m) => m.content),
18
- pl: () => import('./i18n/pl').then((m) => m.content),
19
- pt: () => import('./i18n/pt').then((m) => m.content),
20
- ru: () => import('./i18n/ru').then((m) => m.content),
21
- sv: () => import('./i18n/sv').then((m) => m.content),
22
- tr: () => import('./i18n/tr').then((m) => m.content),
23
- zh: () => import('./i18n/zh').then((m) => m.content),
24
- },
25
- };
26
-
1
+ import { thermalExpansionCalculator } from './entry';
2
+ export * from './entry';
27
3
  export const THERMAL_EXPANSION_CALCULATOR_TOOL: ToolDefinition = {
28
4
  entry: thermalExpansionCalculator,
29
5
  Component: () => import('./component.astro'),