@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
@@ -368,461 +368,3 @@ const gaugeUI = ui as unknown as KnittingGaugeUI;
368
368
  init();
369
369
  </script>
370
370
 
371
- <style>
372
- .knitting-gauge-card {
373
- --gauge-primary: #b06161;
374
- --gauge-secondary: #ead7bb;
375
- --gauge-accent: #d37676;
376
- --gauge-bg: rgba(255, 255, 255, 0.75);
377
- --gauge-sidebar-bg: rgba(255, 255, 255, 0.45);
378
- --gauge-item-bg: rgba(255, 255, 255, 0.45);
379
- --gauge-border: rgba(0, 0, 0, 0.05);
380
- --gauge-input-bg: rgba(255, 255, 255, 0.6);
381
- --gauge-radius: 24px;
382
- --gauge-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
383
-
384
- display: grid;
385
- grid-template-columns: 320px 1fr;
386
- max-width: 1150px;
387
- width: 95%;
388
- margin: 2rem auto;
389
- background: var(--gauge-bg);
390
- backdrop-filter: blur(15px);
391
- border-radius: var(--gauge-radius);
392
- overflow: hidden;
393
- border: 1px solid rgba(255, 255, 255, 0.3);
394
- box-shadow: var(--gauge-shadow);
395
- color: #444;
396
- }
397
-
398
- :global(.theme-dark) .knitting-gauge-card {
399
- --gauge-primary: #ff7e7e;
400
- --gauge-secondary: #2d2d30;
401
- --gauge-accent: #ffa4a4;
402
- --gauge-bg: rgba(13, 13, 15, 0.95);
403
- --gauge-sidebar-bg: rgba(0, 0, 0, 0.3);
404
- --gauge-item-bg: rgba(255, 255, 255, 0.03);
405
- --gauge-border: rgba(255, 255, 255, 0.1);
406
- --gauge-input-bg: rgba(255, 255, 255, 0.05);
407
- --gauge-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
408
-
409
- color: #f3f4f6;
410
- border-color: var(--gauge-border);
411
- }
412
-
413
- .gauge-sidebar {
414
- background: var(--gauge-sidebar-bg);
415
- padding: 1.5rem;
416
- display: flex;
417
- flex-direction: column;
418
- gap: 1.5rem;
419
- border-right: 1px solid var(--gauge-border);
420
- max-height: 85vh;
421
- overflow-y: auto;
422
- }
423
-
424
- .config-section {
425
- display: flex;
426
- flex-direction: column;
427
- gap: 0.8rem;
428
- }
429
-
430
- .config-section h3 {
431
- font-size: 0.7rem;
432
- font-weight: 800;
433
- text-transform: uppercase;
434
- letter-spacing: 0.1rem;
435
- color: var(--gauge-primary);
436
- margin: 0;
437
- display: flex;
438
- align-items: center;
439
- gap: 0.5rem;
440
- }
441
-
442
- .input-grid {
443
- display: grid;
444
- grid-template-columns: 1fr 1fr;
445
- gap: 0.75rem;
446
- }
447
-
448
- .gauge-field {
449
- display: flex;
450
- flex-direction: column;
451
- gap: 0.3rem;
452
- position: relative;
453
- }
454
-
455
- .gauge-field label {
456
- font-size: 0.6rem;
457
- font-weight: 700;
458
- text-transform: uppercase;
459
- opacity: 0.6;
460
- display: flex;
461
- justify-content: space-between;
462
- }
463
-
464
- .label-sub {
465
- font-weight: 400;
466
- opacity: 0.8;
467
- text-transform: none;
468
- }
469
-
470
- .stepper-container {
471
- display: flex;
472
- align-items: center;
473
- background: var(--gauge-input-bg);
474
- border: 1px solid var(--gauge-border);
475
- border-radius: 8px;
476
- overflow: hidden;
477
- }
478
-
479
- .stepper-container:focus-within {
480
- border-color: var(--gauge-primary);
481
- box-shadow: 0 0 0 2px rgba(176, 97, 97, 0.2);
482
- }
483
-
484
- .stepper-btn {
485
- width: 32px;
486
- height: 32px;
487
- border: none;
488
- background: rgba(0, 0, 0, 0.05);
489
- cursor: pointer;
490
- font-size: 1rem;
491
- display: flex;
492
- align-items: center;
493
- justify-content: center;
494
- transition: background 0.2s;
495
- color: inherit;
496
- }
497
-
498
- :global(.theme-dark) .stepper-btn {
499
- background: rgba(255, 255, 255, 0.04);
500
- }
501
-
502
- .stepper-btn:hover {
503
- background: var(--gauge-secondary);
504
- }
505
-
506
- .gauge-input {
507
- flex: 1;
508
- width: 100%;
509
- border: none;
510
- background: transparent;
511
- padding: 0.4rem 0.5rem;
512
- font-size: 0.9rem;
513
- text-align: center;
514
- font-weight: 600;
515
- color: inherit;
516
- }
517
-
518
- .gauge-input:focus {
519
- outline: none;
520
- }
521
-
522
- .gauge-input-bordered {
523
- border: 1px solid var(--gauge-border);
524
- border-radius: 8px;
525
- background: var(--gauge-input-bg);
526
- }
527
-
528
- .gauge-select {
529
- width: 100%;
530
- padding: 0.5rem;
531
- border-radius: 8px;
532
- border: 1px solid var(--gauge-border);
533
- background: var(--gauge-input-bg);
534
- font-size: 0.8rem;
535
- color: inherit;
536
- }
537
-
538
- .gauge-main {
539
- padding: 2.5rem;
540
- display: flex;
541
- flex-direction: column;
542
- gap: 2rem;
543
- justify-content: center;
544
- }
545
-
546
- .top-display {
547
- display: grid;
548
- grid-template-columns: auto 1fr;
549
- gap: 3rem;
550
- align-items: center;
551
- }
552
-
553
- .visualizer-container {
554
- position: relative;
555
- width: 180px;
556
- height: 180px;
557
- background: var(--gauge-sidebar-bg);
558
- border-radius: 24px;
559
- display: flex;
560
- align-items: center;
561
- justify-content: center;
562
- border: 1px dashed var(--gauge-border);
563
- overflow: hidden;
564
- }
565
-
566
- .knit-swatch {
567
- width: 130px;
568
- height: 130px;
569
- background-color: var(--gauge-primary);
570
- background-image: radial-gradient(circle at 50% 50%, var(--gauge-accent) 1px, transparent 1px);
571
- background-size: 12px 12px;
572
- border-radius: 12px;
573
- box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
574
- transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
575
- position: relative;
576
- }
577
-
578
- .main-stat h2 {
579
- font-size: 0.75rem;
580
- font-weight: 800;
581
- text-transform: uppercase;
582
- opacity: 0.6;
583
- margin: 0 0 0.5rem;
584
- }
585
-
586
- .main-stat .val {
587
- font-size: 4rem;
588
- font-weight: 950;
589
- color: var(--gauge-primary);
590
- line-height: 1;
591
- }
592
-
593
- .val-detail {
594
- font-size: 0.8rem;
595
- font-weight: 600;
596
- opacity: 0.8;
597
- }
598
-
599
- .metrics-grid {
600
- display: grid;
601
- grid-template-columns: repeat(3, 1fr);
602
- gap: 1rem;
603
- }
604
-
605
- .metric-item {
606
- padding: 1.2rem;
607
- background: var(--gauge-item-bg);
608
- border: 1px solid var(--gauge-border);
609
- border-radius: 18px;
610
- display: flex;
611
- flex-direction: column;
612
- gap: 0.3rem;
613
- position: relative;
614
- }
615
-
616
- .metric-item .sv {
617
- font-size: 1.5rem;
618
- font-weight: 800;
619
- color: var(--gauge-accent);
620
- }
621
-
622
- .sv-suggestion {
623
- font-size: 1rem;
624
- line-height: 1.2;
625
- }
626
-
627
- .metric-item .sl {
628
- font-size: 0.65rem;
629
- font-weight: 700;
630
- text-transform: uppercase;
631
- opacity: 0.5;
632
- display: flex;
633
- align-items: center;
634
- gap: 0.3rem;
635
- }
636
-
637
- .info-icon {
638
- font-size: 0.75rem;
639
- font-style: normal;
640
- cursor: help;
641
- opacity: 0.5;
642
- background: rgba(0, 0, 0, 0.08);
643
- border-radius: 50%;
644
- width: 14px;
645
- height: 14px;
646
- display: inline-flex;
647
- align-items: center;
648
- justify-content: center;
649
- }
650
-
651
- :global(.theme-dark) .info-icon {
652
- background: rgba(255, 255, 255, 0.12);
653
- }
654
-
655
- .info-icon:hover {
656
- opacity: 1;
657
- }
658
-
659
- [data-tooltip] {
660
- position: relative;
661
- }
662
-
663
- [data-tooltip]::before {
664
- content: attr(data-tooltip);
665
- position: absolute;
666
- bottom: 125%;
667
- left: 50%;
668
- transform: translateX(-50%);
669
- background: #333;
670
- color: white;
671
- padding: 0.5rem 0.8rem;
672
- border-radius: 6px;
673
- font-size: 0.7rem;
674
- white-space: normal;
675
- width: 200px;
676
- text-align: center;
677
- visibility: hidden;
678
- opacity: 0;
679
- transition: opacity 0.3s;
680
- z-index: 100;
681
- pointer-events: none;
682
- }
683
-
684
- :global(.theme-dark) [data-tooltip]::before {
685
- background: #1f2937;
686
- border: 1px solid rgba(255, 255, 255, 0.1);
687
- }
688
-
689
- [data-tooltip]:hover::before {
690
- visibility: visible;
691
- opacity: 1;
692
- }
693
-
694
- .yarn-calc-extra {
695
- padding: 1rem;
696
- background: rgba(176, 97, 97, 0.05);
697
- border-radius: 12px;
698
- font-size: 0.8rem;
699
- border: 1px solid rgba(176, 97, 97, 0.1);
700
- display: none;
701
- }
702
-
703
- :global(.theme-dark) .yarn-calc-extra {
704
- background: rgba(255, 126, 126, 0.08);
705
- border-color: rgba(255, 126, 126, 0.15);
706
- }
707
-
708
- .yarn-title {
709
- margin: 0;
710
- font-weight: 700;
711
- color: var(--gauge-primary);
712
- }
713
-
714
- .alert-card {
715
- padding: 1rem;
716
- border-radius: 12px;
717
- font-size: 0.82rem;
718
- margin-top: 0.5rem;
719
- display: none;
720
- animation: fade-in 0.4s ease;
721
- }
722
-
723
- .alert-card-warn {
724
- background: #fffbeb;
725
- color: #92400e;
726
- border: 1px solid #fde68a;
727
- }
728
-
729
- :global(.theme-dark) .alert-card-warn {
730
- background: rgba(245, 158, 11, 0.15);
731
- color: #fbbf24;
732
- border-color: rgba(245, 158, 11, 0.3);
733
- }
734
-
735
- .alert-card-err {
736
- background: #fef2f2;
737
- color: #991b1b;
738
- border: 1px solid #fecaca;
739
- }
740
-
741
- :global(.theme-dark) .alert-card-err {
742
- background: rgba(239, 68, 68, 0.15);
743
- color: #f87171;
744
- border-color: rgba(239, 68, 68, 0.3);
745
- }
746
-
747
- .btn-group {
748
- display: grid;
749
- grid-template-columns: 1fr 1.5fr;
750
- gap: 0.75rem;
751
- margin-top: auto;
752
- padding-top: 1rem;
753
- }
754
-
755
- .ui-btn {
756
- padding: 0.8rem;
757
- border-radius: 12px;
758
- border: none;
759
- font-size: 0.75rem;
760
- font-weight: 800;
761
- cursor: pointer;
762
- text-transform: uppercase;
763
- transition: all 0.2s;
764
- }
765
-
766
- .ui-btn-primary {
767
- background: var(--gauge-primary);
768
- color: white;
769
- }
770
-
771
- .ui-btn-primary:hover {
772
- filter: brightness(1.1);
773
- transform: translateY(-1px);
774
- }
775
-
776
- .ui-btn-secondary {
777
- background: rgba(0, 0, 0, 0.05);
778
- border: 1px solid rgba(0, 0, 0, 0.1);
779
- color: inherit;
780
- }
781
-
782
- :global(.theme-dark) .ui-btn-secondary {
783
- background: rgba(255, 255, 255, 0.06);
784
- border-color: rgba(255, 255, 255, 0.15);
785
- }
786
-
787
- .ui-btn-secondary:hover {
788
- background: rgba(0, 0, 0, 0.08);
789
- }
790
-
791
- :global(.theme-dark) .ui-btn-secondary:hover {
792
- background: rgba(255, 255, 255, 0.12);
793
- }
794
-
795
- @keyframes fade-in {
796
- from {
797
- opacity: 0;
798
- transform: translateY(10px);
799
- }
800
- to {
801
- opacity: 1;
802
- transform: translateY(0);
803
- }
804
- }
805
-
806
- @media (max-width: 900px) {
807
- .knitting-gauge-card {
808
- grid-template-columns: 1fr;
809
- max-height: none;
810
- }
811
-
812
- .gauge-sidebar {
813
- border-right: none;
814
- border-bottom: 1px solid var(--gauge-border);
815
- max-height: none;
816
- }
817
-
818
- .top-display {
819
- grid-template-columns: 1fr;
820
- text-align: center;
821
- justify-items: center;
822
- }
823
-
824
- .metrics-grid {
825
- grid-template-columns: 1fr;
826
- }
827
- }
828
- </style>
@@ -0,0 +1,30 @@
1
+ import type { TextilesToolEntry, ToolLocaleContent } from '../../types';
2
+
3
+ import type { KnittingGaugeUI } from './ui';
4
+
5
+ export type KnittingGaugeLocaleContent = ToolLocaleContent<KnittingGaugeUI>;
6
+
7
+ export const knittingGauge: TextilesToolEntry<KnittingGaugeUI> = {
8
+ id: 'knitting-gauge-calculator',
9
+ icons: {
10
+ bg: 'mdi:ruler-square',
11
+ fg: 'mdi:needle',
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
+ };
@@ -1,35 +1,5 @@
1
- import type { TextilesToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
-
3
- import type { KnittingGaugeUI } from './ui';
4
-
5
- export type KnittingGaugeLocaleContent = ToolLocaleContent<KnittingGaugeUI>;
6
-
7
- export const knittingGauge: TextilesToolEntry<KnittingGaugeUI> = {
8
- id: 'knitting-gauge-calculator',
9
- icons: {
10
- bg: 'mdi:ruler-square',
11
- fg: 'mdi:needle',
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
- };
31
-
32
-
1
+ import { knittingGauge } from './entry';
2
+ export * from './entry';
33
3
  export const KNITTING_GAUGE_TOOL: ToolDefinition = {
34
4
  entry: knittingGauge,
35
5
  Component: () => import('./component.astro'),