@jjlmoya/utils-textiles 1.9.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.
Files changed (53) hide show
  1. package/package.json +7 -4
  2. package/scripts/postinstall.mjs +27 -0
  3. package/src/category/index.ts +24 -25
  4. package/src/entries.ts +37 -0
  5. package/src/tool/burnTest/component.astro +0 -380
  6. package/src/tool/burnTest/entry.ts +30 -0
  7. package/src/tool/burnTest/index.ts +2 -32
  8. package/src/tool/burnTest/textile-burn-test.css +378 -0
  9. package/src/tool/clothingSizeConverter/clothing-size-converter.css +717 -0
  10. package/src/tool/clothingSizeConverter/component.astro +0 -719
  11. package/src/tool/clothingSizeConverter/entry.ts +30 -0
  12. package/src/tool/clothingSizeConverter/index.ts +2 -32
  13. package/src/tool/fabricProjectCalculator/component.astro +0 -540
  14. package/src/tool/fabricProjectCalculator/entry.ts +30 -0
  15. package/src/tool/fabricProjectCalculator/fabric-project-calculator.css +538 -0
  16. package/src/tool/fabricProjectCalculator/index.ts +2 -32
  17. package/src/tool/fabricTruth/component.astro +0 -428
  18. package/src/tool/fabricTruth/entry.ts +30 -0
  19. package/src/tool/fabricTruth/fabric-truthfulness.css +426 -0
  20. package/src/tool/fabricTruth/index.ts +2 -32
  21. package/src/tool/fiberPrep/component.astro +0 -652
  22. package/src/tool/fiberPrep/entry.ts +30 -0
  23. package/src/tool/fiberPrep/fiber-preparation-natural-dyeing.css +650 -0
  24. package/src/tool/fiberPrep/index.ts +2 -32
  25. package/src/tool/knittingGauge/component.astro +0 -458
  26. package/src/tool/knittingGauge/entry.ts +30 -0
  27. package/src/tool/knittingGauge/index.ts +2 -32
  28. package/src/tool/knittingGauge/knitting-gauge-calculator.css +456 -0
  29. package/src/tool/laundryGuide/component.astro +0 -317
  30. package/src/tool/laundryGuide/entry.ts +25 -0
  31. package/src/tool/laundryGuide/index.ts +2 -27
  32. package/src/tool/laundryGuide/laundry-guide.css +315 -0
  33. package/src/tool/needleConverter/component.astro +0 -344
  34. package/src/tool/needleConverter/entry.ts +30 -0
  35. package/src/tool/needleConverter/index.ts +2 -32
  36. package/src/tool/needleConverter/knitting-needle-converter.css +342 -0
  37. package/src/tool/sewingPatternScaler/component.astro +0 -314
  38. package/src/tool/sewingPatternScaler/entry.ts +30 -0
  39. package/src/tool/sewingPatternScaler/index.ts +2 -32
  40. package/src/tool/sewingPatternScaler/sewing-pattern-scaler.css +313 -0
  41. package/src/tool/shoeSizeConverter/component.astro +0 -255
  42. package/src/tool/shoeSizeConverter/entry.ts +30 -0
  43. package/src/tool/shoeSizeConverter/index.ts +2 -32
  44. package/src/tool/shoeSizeConverter/shoe-size-converter.css +253 -0
  45. package/src/tool/stainChemistry/component.astro +0 -479
  46. package/src/tool/stainChemistry/entry.ts +30 -0
  47. package/src/tool/stainChemistry/index.ts +2 -32
  48. package/src/tool/stainChemistry/stain-chemical-protocol.css +477 -0
  49. package/src/tool/yarnCalculator/component.astro +0 -446
  50. package/src/tool/yarnCalculator/entry.ts +30 -0
  51. package/src/tool/yarnCalculator/index.ts +2 -32
  52. package/src/tool/yarnCalculator/yarn-calculator.css +444 -0
  53. package/src/tools.ts +1 -1
@@ -333,655 +333,3 @@ const cellulosicFibers = prepUI.cellulosicFibers ?? [];
333
333
  startInit();
334
334
  </script>
335
335
 
336
- <style>
337
- .fiber-prep {
338
- width: 100%;
339
- padding: 1rem;
340
- display: flex;
341
- flex-direction: column;
342
- gap: 2rem;
343
- }
344
-
345
- .profile-section {
346
- display: flex;
347
- flex-direction: column;
348
- gap: 1.5rem;
349
- }
350
-
351
- .profile-header {
352
- text-align: center;
353
- }
354
-
355
- .profile-title {
356
- font-size: 1.25rem;
357
- font-weight: 900;
358
- text-transform: uppercase;
359
- letter-spacing: 0.05em;
360
- color: var(--text-main);
361
- margin: 0 0 0.5rem;
362
- }
363
-
364
- .profile-desc {
365
- font-size: 0.875rem;
366
- color: var(--text-muted);
367
- margin: 0;
368
- }
369
-
370
- .profile-grid {
371
- display: grid;
372
- grid-template-columns: 1fr 1fr;
373
- gap: 1.5rem;
374
- }
375
-
376
- .fiber-card {
377
- position: relative;
378
- display: flex;
379
- flex-direction: column;
380
- padding: 2rem;
381
- border-radius: 2rem;
382
- border: 2px solid var(--border-color);
383
- background: var(--bg-surface);
384
- text-align: left;
385
- cursor: pointer;
386
- overflow: hidden;
387
- transition: border-color 0.2s, box-shadow 0.2s;
388
- }
389
-
390
- .fiber-card:hover {
391
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
392
- }
393
-
394
- .fiber-card[data-fiber-type="protein"].active {
395
- border-color: #f59e0b;
396
- box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
397
- }
398
-
399
- .fiber-card[data-fiber-type="cellulosic"].active {
400
- border-color: #10b981;
401
- box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
402
- }
403
-
404
- .card-bg-icon {
405
- position: absolute;
406
- top: 0;
407
- right: 0;
408
- padding: 2rem;
409
- opacity: 0.05;
410
- pointer-events: none;
411
- transition: opacity 0.2s;
412
- }
413
-
414
- .fiber-card:hover .card-bg-icon {
415
- opacity: 0.1;
416
- }
417
-
418
- .card-bg-icon svg {
419
- width: 9rem;
420
- height: 9rem;
421
- }
422
-
423
- .card-body {
424
- position: relative;
425
- z-index: 1;
426
- display: flex;
427
- flex-direction: column;
428
- gap: 1rem;
429
- }
430
-
431
- .card-icon {
432
- width: 3.5rem;
433
- height: 3.5rem;
434
- border-radius: 1rem;
435
- display: flex;
436
- align-items: center;
437
- justify-content: center;
438
- }
439
-
440
- .card-icon svg {
441
- width: 1.75rem;
442
- height: 1.75rem;
443
- }
444
-
445
- .card-icon-protein {
446
- background: rgba(245, 158, 11, 0.1);
447
- color: #f59e0b;
448
- }
449
-
450
- .card-icon-cellulosic {
451
- background: rgba(16, 185, 129, 0.1);
452
- color: #10b981;
453
- }
454
-
455
- .card-title {
456
- font-size: 1.125rem;
457
- font-weight: 900;
458
- text-transform: uppercase;
459
- color: var(--text-main);
460
- margin: 0 0 0.25rem;
461
- }
462
-
463
- .card-origin {
464
- font-size: 0.65rem;
465
- font-weight: 700;
466
- text-transform: uppercase;
467
- letter-spacing: 0.1em;
468
- margin: 0 0 0.5rem;
469
- }
470
-
471
- .card-origin-protein {
472
- color: rgba(245, 158, 11, 0.7);
473
- }
474
-
475
- .card-origin-cellulosic {
476
- color: rgba(16, 185, 129, 0.7);
477
- }
478
-
479
- .card-desc {
480
- font-size: 0.875rem;
481
- color: var(--text-muted);
482
- line-height: 1.5;
483
- margin: 0;
484
- }
485
-
486
- .fiber-icon-list {
487
- display: flex;
488
- gap: 0.5rem;
489
- flex-wrap: wrap;
490
- }
491
-
492
- .fiber-icon-item {
493
- width: 2rem;
494
- height: 2rem;
495
- border-radius: 0.5rem;
496
- background: var(--bg-page);
497
- border: 1px solid var(--border-color);
498
- display: flex;
499
- align-items: center;
500
- justify-content: center;
501
- }
502
-
503
- .fiber-icon-item svg {
504
- width: 1rem;
505
- height: 1rem;
506
- color: var(--text-muted);
507
- }
508
-
509
- .tool-grid {
510
- display: grid;
511
- grid-template-columns: 1fr 1fr;
512
- gap: 2rem;
513
- }
514
-
515
- .calc-card {
516
- background: var(--bg-surface);
517
- border: 1px solid var(--border-color);
518
- border-radius: 1.5rem;
519
- padding: 1.5rem;
520
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
521
- display: flex;
522
- flex-direction: column;
523
- gap: 1.5rem;
524
- }
525
-
526
- .calc-header {
527
- display: flex;
528
- align-items: center;
529
- gap: 1rem;
530
- }
531
-
532
- .calc-icon {
533
- width: 2.5rem;
534
- height: 2.5rem;
535
- border-radius: 0.75rem;
536
- display: flex;
537
- align-items: center;
538
- justify-content: center;
539
- flex-shrink: 0;
540
- }
541
-
542
- .calc-icon svg {
543
- width: 1.25rem;
544
- height: 1.25rem;
545
- }
546
-
547
- .calc-icon-green {
548
- background: rgba(16, 185, 129, 0.1);
549
- color: #10b981;
550
- }
551
-
552
- .calc-icon-orange {
553
- background: rgba(249, 115, 22, 0.1);
554
- color: #f97316;
555
- }
556
-
557
- .calc-icon-purple {
558
- background: rgba(139, 92, 246, 0.1);
559
- color: #8b5cf6;
560
- }
561
-
562
- .calc-title {
563
- font-size: 1rem;
564
- font-weight: 700;
565
- color: var(--text-main);
566
- margin: 0;
567
- }
568
-
569
- .wof-body {
570
- position: relative;
571
- display: flex;
572
- flex-direction: column;
573
- gap: 1.5rem;
574
- }
575
-
576
- .wof-overlay {
577
- position: absolute;
578
- inset: -0.5rem;
579
- z-index: 2;
580
- background: rgba(255, 255, 255, 0.85);
581
- backdrop-filter: blur(2px);
582
- border-radius: 1rem;
583
- display: flex;
584
- align-items: center;
585
- justify-content: center;
586
- text-align: center;
587
- padding: 1.5rem;
588
- transition: opacity 0.5s;
589
- }
590
-
591
- .theme-dark .wof-overlay {
592
- background: rgba(15, 23, 42, 0.85);
593
- }
594
-
595
- .wof-overlay.hidden {
596
- display: none;
597
- }
598
-
599
- .ph-overlay {
600
- position: absolute;
601
- inset: -0.5rem;
602
- z-index: 2;
603
- background: rgba(255, 255, 255, 0.85);
604
- backdrop-filter: blur(2px);
605
- border-radius: 1rem;
606
- display: flex;
607
- align-items: center;
608
- justify-content: center;
609
- text-align: center;
610
- padding: 1.5rem;
611
- transition: opacity 0.5s;
612
- }
613
-
614
- .theme-dark .ph-overlay {
615
- background: rgba(15, 23, 42, 0.85);
616
- }
617
-
618
- .ph-overlay.hidden {
619
- display: none;
620
- }
621
-
622
- .overlay-msg {
623
- font-size: 0.625rem;
624
- font-weight: 900;
625
- text-transform: uppercase;
626
- letter-spacing: 0.1em;
627
- color: var(--text-muted);
628
- margin: 0;
629
- }
630
-
631
- .field-group {
632
- display: flex;
633
- flex-direction: column;
634
- gap: 0.5rem;
635
- }
636
-
637
- .field-label {
638
- font-size: 0.625rem;
639
- font-weight: 900;
640
- text-transform: uppercase;
641
- letter-spacing: 0.1em;
642
- color: var(--text-muted);
643
- }
644
-
645
- .field-input-wrap {
646
- position: relative;
647
- }
648
-
649
- .field-input {
650
- width: 100%;
651
- background: var(--bg-page);
652
- border: 2px solid var(--border-color);
653
- border-radius: 1rem;
654
- padding: 0.75rem 3rem 0.75rem 1rem;
655
- font-size: 1.5rem;
656
- font-weight: 900;
657
- color: var(--text-main);
658
- outline: none;
659
- transition: border-color 0.2s;
660
- box-sizing: border-box;
661
- }
662
-
663
- .field-input:focus {
664
- border-color: #6366f1;
665
- }
666
-
667
- .field-unit {
668
- position: absolute;
669
- right: 1rem;
670
- top: 50%;
671
- transform: translateY(-50%);
672
- color: var(--text-muted);
673
- font-weight: 700;
674
- }
675
-
676
- .wof-results {
677
- display: flex;
678
- flex-direction: column;
679
- gap: 0.75rem;
680
- transition: opacity 0.5s, filter 0.5s;
681
- }
682
-
683
- .wof-results.dimmed {
684
- opacity: 0.4;
685
- filter: grayscale(1);
686
- pointer-events: none;
687
- }
688
-
689
- .result-row {
690
- display: flex;
691
- align-items: center;
692
- justify-content: space-between;
693
- padding: 1rem;
694
- border-radius: 1rem;
695
- border: 1px solid transparent;
696
- transition: opacity 0.3s;
697
- }
698
-
699
- .result-row.na {
700
- opacity: 0.3;
701
- }
702
-
703
- .result-row-indigo {
704
- background: rgba(99, 102, 241, 0.05);
705
- border-color: rgba(99, 102, 241, 0.15);
706
- }
707
-
708
- .result-row-amber {
709
- background: rgba(245, 158, 11, 0.05);
710
- border-color: rgba(245, 158, 11, 0.15);
711
- }
712
-
713
- .result-row-slate {
714
- background: var(--bg-page);
715
- border-color: var(--border-color);
716
- }
717
-
718
- .result-row-left {
719
- display: flex;
720
- align-items: center;
721
- gap: 0.75rem;
722
- }
723
-
724
- .result-icon {
725
- width: 1.25rem;
726
- height: 1.25rem;
727
- }
728
-
729
- .result-row-indigo .result-icon {
730
- color: #6366f1;
731
- }
732
-
733
- .result-row-amber .result-icon {
734
- color: #f59e0b;
735
- }
736
-
737
- .result-row-slate .result-icon {
738
- color: var(--text-muted);
739
- }
740
-
741
- .result-label {
742
- font-size: 0.875rem;
743
- font-weight: 700;
744
- color: var(--text-main);
745
- }
746
-
747
- .result-val {
748
- font-size: 1.25rem;
749
- font-weight: 900;
750
- }
751
-
752
- .result-val-indigo {
753
- color: #6366f1;
754
- }
755
-
756
- .result-val-amber {
757
- color: #f59e0b;
758
- }
759
-
760
- .result-val-slate {
761
- color: var(--text-muted);
762
- }
763
-
764
- .ramp-body {
765
- position: relative;
766
- min-height: 200px;
767
- display: flex;
768
- align-items: center;
769
- justify-content: center;
770
- }
771
-
772
- .ramp-empty {
773
- display: flex;
774
- flex-direction: column;
775
- align-items: center;
776
- justify-content: center;
777
- gap: 0.75rem;
778
- text-align: center;
779
- padding: 2rem;
780
- transition: opacity 0.5s;
781
- }
782
-
783
- .ramp-empty.hidden {
784
- display: none;
785
- }
786
-
787
- .ramp-empty-icon {
788
- width: 4rem;
789
- height: 4rem;
790
- border-radius: 1.5rem;
791
- background: var(--bg-page);
792
- border: 2px dashed var(--border-color);
793
- display: flex;
794
- align-items: center;
795
- justify-content: center;
796
- color: var(--text-muted);
797
- }
798
-
799
- .ramp-empty-icon svg {
800
- width: 2rem;
801
- height: 2rem;
802
- }
803
-
804
- .ramp-empty-title {
805
- font-size: 0.875rem;
806
- font-weight: 700;
807
- color: var(--text-muted);
808
- margin: 0;
809
- }
810
-
811
- .ramp-empty-desc {
812
- font-size: 0.65rem;
813
- font-weight: 700;
814
- text-transform: uppercase;
815
- letter-spacing: 0.1em;
816
- color: var(--text-muted);
817
- opacity: 0.6;
818
- margin: 0;
819
- }
820
-
821
- .ramp-active {
822
- width: 100%;
823
- animation: fade-in 0.7s ease;
824
- }
825
-
826
- .ramp-active.hidden {
827
- display: none;
828
- }
829
-
830
- .ramp-chart-wrap {
831
- width: 100%;
832
- aspect-ratio: 2 / 1;
833
- background: var(--bg-page);
834
- border: 1px solid var(--border-color);
835
- border-radius: 1rem;
836
- padding: 1rem;
837
- overflow: hidden;
838
- }
839
-
840
- .ramp-svg {
841
- width: 100%;
842
- height: 100%;
843
- overflow: visible;
844
- }
845
-
846
- .ramp-labels {
847
- font-size: 7px;
848
- font-weight: 900;
849
- fill: var(--text-muted);
850
- text-transform: uppercase;
851
- }
852
-
853
- .ramp-grid {
854
- color: var(--border-color);
855
- stroke-width: 0.5;
856
- }
857
-
858
- .ramp-fill-path {
859
- transition: all 1s ease;
860
- }
861
-
862
- .ramp-line {
863
- color: #6366f1;
864
- transition: all 1s ease;
865
- }
866
-
867
- .ramp-time-labels {
868
- font-size: 7px;
869
- font-weight: 900;
870
- fill: var(--text-muted);
871
- text-transform: uppercase;
872
- }
873
-
874
- .ph-card {
875
- gap: 1.5rem;
876
- }
877
-
878
- .ph-header-text {
879
- display: flex;
880
- flex-direction: column;
881
- gap: 0.125rem;
882
- }
883
-
884
- .ph-subtitle {
885
- font-size: 0.75rem;
886
- color: var(--text-muted);
887
- margin: 0;
888
- }
889
-
890
- .ph-body {
891
- position: relative;
892
- }
893
-
894
- .ph-grid {
895
- display: grid;
896
- grid-template-columns: 1fr 1fr 1fr;
897
- gap: 1.5rem;
898
- align-items: start;
899
- }
900
-
901
- .ph-field {
902
- display: flex;
903
- flex-direction: column;
904
- gap: 0.75rem;
905
- }
906
-
907
- .ph-slider {
908
- width: 100%;
909
- height: 0.5rem;
910
- border-radius: 9999px;
911
- background: var(--border-color);
912
- appearance: none;
913
- cursor: pointer;
914
- accent-color: #8b5cf6;
915
- }
916
-
917
- .ph-range-labels {
918
- display: flex;
919
- justify-content: space-between;
920
- font-size: 0.625rem;
921
- font-weight: 700;
922
- color: var(--text-muted);
923
- padding: 0 0.25rem;
924
- }
925
-
926
- .ph-result {
927
- background: var(--bg-page);
928
- border: 2px dashed var(--border-color);
929
- border-radius: 1rem;
930
- padding: 1rem;
931
- display: flex;
932
- align-items: center;
933
- justify-content: center;
934
- min-height: 4rem;
935
- }
936
-
937
- .ph-result span {
938
- font-size: 0.875rem;
939
- font-weight: 700;
940
- color: var(--text-main);
941
- text-align: center;
942
- }
943
-
944
- input[type="number"]::-webkit-inner-spin-button,
945
- input[type="number"]::-webkit-outer-spin-button {
946
- -webkit-appearance: none;
947
- margin: 0;
948
- }
949
-
950
- @keyframes fade-in {
951
- from {
952
- opacity: 0;
953
- }
954
- to {
955
- opacity: 1;
956
- }
957
- }
958
-
959
- @keyframes slide-in {
960
- from {
961
- opacity: 0;
962
- transform: translateY(10px);
963
- }
964
- to {
965
- opacity: 1;
966
- transform: translateY(0);
967
- }
968
- }
969
-
970
- [data-fiber-btn] {
971
- animation: slide-in 0.3s ease-out forwards;
972
- }
973
-
974
- @media (max-width: 768px) {
975
- .profile-grid {
976
- grid-template-columns: 1fr;
977
- }
978
-
979
- .tool-grid {
980
- grid-template-columns: 1fr;
981
- }
982
-
983
- .ph-grid {
984
- grid-template-columns: 1fr;
985
- }
986
- }
987
- </style>
@@ -0,0 +1,30 @@
1
+ import type { TextilesToolEntry, ToolLocaleContent } from '../../types';
2
+
3
+ import type { FiberPrepUI } from './ui';
4
+
5
+ export type FiberPrepLocaleContent = ToolLocaleContent<FiberPrepUI>;
6
+
7
+ export const fiberPrep: TextilesToolEntry<FiberPrepUI> = {
8
+ id: 'fiber-prep',
9
+ icons: {
10
+ bg: 'mdi:beaker-outline',
11
+ fg: 'mdi:molecule',
12
+ },
13
+ i18n: {
14
+ es: () => import('./i18n/es').then((m) => m.content),
15
+ en: () => import('./i18n/en').then((m) => m.content),
16
+ fr: () => import('./i18n/fr').then((m) => m.content),
17
+ de: () => import('./i18n/de').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
+ };