@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
@@ -0,0 +1,650 @@
1
+ .fiber-prep {
2
+ width: 100%;
3
+ padding: 1rem;
4
+ display: flex;
5
+ flex-direction: column;
6
+ gap: 2rem;
7
+ }
8
+
9
+ .profile-section {
10
+ display: flex;
11
+ flex-direction: column;
12
+ gap: 1.5rem;
13
+ }
14
+
15
+ .profile-header {
16
+ text-align: center;
17
+ }
18
+
19
+ .profile-title {
20
+ font-size: 1.25rem;
21
+ font-weight: 900;
22
+ text-transform: uppercase;
23
+ letter-spacing: 0.05em;
24
+ color: var(--text-main);
25
+ margin: 0 0 0.5rem;
26
+ }
27
+
28
+ .profile-desc {
29
+ font-size: 0.875rem;
30
+ color: var(--text-muted);
31
+ margin: 0;
32
+ }
33
+
34
+ .profile-grid {
35
+ display: grid;
36
+ grid-template-columns: 1fr 1fr;
37
+ gap: 1.5rem;
38
+ }
39
+
40
+ .fiber-card {
41
+ position: relative;
42
+ display: flex;
43
+ flex-direction: column;
44
+ padding: 2rem;
45
+ border-radius: 2rem;
46
+ border: 2px solid var(--border-color);
47
+ background: var(--bg-surface);
48
+ text-align: left;
49
+ cursor: pointer;
50
+ overflow: hidden;
51
+ transition: border-color 0.2s, box-shadow 0.2s;
52
+ }
53
+
54
+ .fiber-card:hover {
55
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
56
+ }
57
+
58
+ .fiber-card[data-fiber-type="protein"].active {
59
+ border-color: #f59e0b;
60
+ box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
61
+ }
62
+
63
+ .fiber-card[data-fiber-type="cellulosic"].active {
64
+ border-color: #10b981;
65
+ box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
66
+ }
67
+
68
+ .card-bg-icon {
69
+ position: absolute;
70
+ top: 0;
71
+ right: 0;
72
+ padding: 2rem;
73
+ opacity: 0.05;
74
+ pointer-events: none;
75
+ transition: opacity 0.2s;
76
+ }
77
+
78
+ .fiber-card:hover .card-bg-icon {
79
+ opacity: 0.1;
80
+ }
81
+
82
+ .card-bg-icon svg {
83
+ width: 9rem;
84
+ height: 9rem;
85
+ }
86
+
87
+ .card-body {
88
+ position: relative;
89
+ z-index: 1;
90
+ display: flex;
91
+ flex-direction: column;
92
+ gap: 1rem;
93
+ }
94
+
95
+ .card-icon {
96
+ width: 3.5rem;
97
+ height: 3.5rem;
98
+ border-radius: 1rem;
99
+ display: flex;
100
+ align-items: center;
101
+ justify-content: center;
102
+ }
103
+
104
+ .card-icon svg {
105
+ width: 1.75rem;
106
+ height: 1.75rem;
107
+ }
108
+
109
+ .card-icon-protein {
110
+ background: rgba(245, 158, 11, 0.1);
111
+ color: #f59e0b;
112
+ }
113
+
114
+ .card-icon-cellulosic {
115
+ background: rgba(16, 185, 129, 0.1);
116
+ color: #10b981;
117
+ }
118
+
119
+ .card-title {
120
+ font-size: 1.125rem;
121
+ font-weight: 900;
122
+ text-transform: uppercase;
123
+ color: var(--text-main);
124
+ margin: 0 0 0.25rem;
125
+ }
126
+
127
+ .card-origin {
128
+ font-size: 0.65rem;
129
+ font-weight: 700;
130
+ text-transform: uppercase;
131
+ letter-spacing: 0.1em;
132
+ margin: 0 0 0.5rem;
133
+ }
134
+
135
+ .card-origin-protein {
136
+ color: rgba(245, 158, 11, 0.7);
137
+ }
138
+
139
+ .card-origin-cellulosic {
140
+ color: rgba(16, 185, 129, 0.7);
141
+ }
142
+
143
+ .card-desc {
144
+ font-size: 0.875rem;
145
+ color: var(--text-muted);
146
+ line-height: 1.5;
147
+ margin: 0;
148
+ }
149
+
150
+ .fiber-icon-list {
151
+ display: flex;
152
+ gap: 0.5rem;
153
+ flex-wrap: wrap;
154
+ }
155
+
156
+ .fiber-icon-item {
157
+ width: 2rem;
158
+ height: 2rem;
159
+ border-radius: 0.5rem;
160
+ background: var(--bg-page);
161
+ border: 1px solid var(--border-color);
162
+ display: flex;
163
+ align-items: center;
164
+ justify-content: center;
165
+ }
166
+
167
+ .fiber-icon-item svg {
168
+ width: 1rem;
169
+ height: 1rem;
170
+ color: var(--text-muted);
171
+ }
172
+
173
+ .tool-grid {
174
+ display: grid;
175
+ grid-template-columns: 1fr 1fr;
176
+ gap: 2rem;
177
+ }
178
+
179
+ .calc-card {
180
+ background: var(--bg-surface);
181
+ border: 1px solid var(--border-color);
182
+ border-radius: 1.5rem;
183
+ padding: 1.5rem;
184
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
185
+ display: flex;
186
+ flex-direction: column;
187
+ gap: 1.5rem;
188
+ }
189
+
190
+ .calc-header {
191
+ display: flex;
192
+ align-items: center;
193
+ gap: 1rem;
194
+ }
195
+
196
+ .calc-icon {
197
+ width: 2.5rem;
198
+ height: 2.5rem;
199
+ border-radius: 0.75rem;
200
+ display: flex;
201
+ align-items: center;
202
+ justify-content: center;
203
+ flex-shrink: 0;
204
+ }
205
+
206
+ .calc-icon svg {
207
+ width: 1.25rem;
208
+ height: 1.25rem;
209
+ }
210
+
211
+ .calc-icon-green {
212
+ background: rgba(16, 185, 129, 0.1);
213
+ color: #10b981;
214
+ }
215
+
216
+ .calc-icon-orange {
217
+ background: rgba(249, 115, 22, 0.1);
218
+ color: #f97316;
219
+ }
220
+
221
+ .calc-icon-purple {
222
+ background: rgba(139, 92, 246, 0.1);
223
+ color: #8b5cf6;
224
+ }
225
+
226
+ .calc-title {
227
+ font-size: 1rem;
228
+ font-weight: 700;
229
+ color: var(--text-main);
230
+ margin: 0;
231
+ }
232
+
233
+ .wof-body {
234
+ position: relative;
235
+ display: flex;
236
+ flex-direction: column;
237
+ gap: 1.5rem;
238
+ }
239
+
240
+ .wof-overlay {
241
+ position: absolute;
242
+ inset: -0.5rem;
243
+ z-index: 2;
244
+ background: rgba(255, 255, 255, 0.85);
245
+ backdrop-filter: blur(2px);
246
+ border-radius: 1rem;
247
+ display: flex;
248
+ align-items: center;
249
+ justify-content: center;
250
+ text-align: center;
251
+ padding: 1.5rem;
252
+ transition: opacity 0.5s;
253
+ }
254
+
255
+ .theme-dark .wof-overlay {
256
+ background: rgba(15, 23, 42, 0.85);
257
+ }
258
+
259
+ .wof-overlay.hidden {
260
+ display: none;
261
+ }
262
+
263
+ .ph-overlay {
264
+ position: absolute;
265
+ inset: -0.5rem;
266
+ z-index: 2;
267
+ background: rgba(255, 255, 255, 0.85);
268
+ backdrop-filter: blur(2px);
269
+ border-radius: 1rem;
270
+ display: flex;
271
+ align-items: center;
272
+ justify-content: center;
273
+ text-align: center;
274
+ padding: 1.5rem;
275
+ transition: opacity 0.5s;
276
+ }
277
+
278
+ .theme-dark .ph-overlay {
279
+ background: rgba(15, 23, 42, 0.85);
280
+ }
281
+
282
+ .ph-overlay.hidden {
283
+ display: none;
284
+ }
285
+
286
+ .overlay-msg {
287
+ font-size: 0.625rem;
288
+ font-weight: 900;
289
+ text-transform: uppercase;
290
+ letter-spacing: 0.1em;
291
+ color: var(--text-muted);
292
+ margin: 0;
293
+ }
294
+
295
+ .field-group {
296
+ display: flex;
297
+ flex-direction: column;
298
+ gap: 0.5rem;
299
+ }
300
+
301
+ .field-label {
302
+ font-size: 0.625rem;
303
+ font-weight: 900;
304
+ text-transform: uppercase;
305
+ letter-spacing: 0.1em;
306
+ color: var(--text-muted);
307
+ }
308
+
309
+ .field-input-wrap {
310
+ position: relative;
311
+ }
312
+
313
+ .field-input {
314
+ width: 100%;
315
+ background: var(--bg-page);
316
+ border: 2px solid var(--border-color);
317
+ border-radius: 1rem;
318
+ padding: 0.75rem 3rem 0.75rem 1rem;
319
+ font-size: 1.5rem;
320
+ font-weight: 900;
321
+ color: var(--text-main);
322
+ outline: none;
323
+ transition: border-color 0.2s;
324
+ box-sizing: border-box;
325
+ }
326
+
327
+ .field-input:focus {
328
+ border-color: #6366f1;
329
+ }
330
+
331
+ .field-unit {
332
+ position: absolute;
333
+ right: 1rem;
334
+ top: 50%;
335
+ transform: translateY(-50%);
336
+ color: var(--text-muted);
337
+ font-weight: 700;
338
+ }
339
+
340
+ .wof-results {
341
+ display: flex;
342
+ flex-direction: column;
343
+ gap: 0.75rem;
344
+ transition: opacity 0.5s, filter 0.5s;
345
+ }
346
+
347
+ .wof-results.dimmed {
348
+ opacity: 0.4;
349
+ filter: grayscale(1);
350
+ pointer-events: none;
351
+ }
352
+
353
+ .result-row {
354
+ display: flex;
355
+ align-items: center;
356
+ justify-content: space-between;
357
+ padding: 1rem;
358
+ border-radius: 1rem;
359
+ border: 1px solid transparent;
360
+ transition: opacity 0.3s;
361
+ }
362
+
363
+ .result-row.na {
364
+ opacity: 0.3;
365
+ }
366
+
367
+ .result-row-indigo {
368
+ background: rgba(99, 102, 241, 0.05);
369
+ border-color: rgba(99, 102, 241, 0.15);
370
+ }
371
+
372
+ .result-row-amber {
373
+ background: rgba(245, 158, 11, 0.05);
374
+ border-color: rgba(245, 158, 11, 0.15);
375
+ }
376
+
377
+ .result-row-slate {
378
+ background: var(--bg-page);
379
+ border-color: var(--border-color);
380
+ }
381
+
382
+ .result-row-left {
383
+ display: flex;
384
+ align-items: center;
385
+ gap: 0.75rem;
386
+ }
387
+
388
+ .result-icon {
389
+ width: 1.25rem;
390
+ height: 1.25rem;
391
+ }
392
+
393
+ .result-row-indigo .result-icon {
394
+ color: #6366f1;
395
+ }
396
+
397
+ .result-row-amber .result-icon {
398
+ color: #f59e0b;
399
+ }
400
+
401
+ .result-row-slate .result-icon {
402
+ color: var(--text-muted);
403
+ }
404
+
405
+ .result-label {
406
+ font-size: 0.875rem;
407
+ font-weight: 700;
408
+ color: var(--text-main);
409
+ }
410
+
411
+ .result-val {
412
+ font-size: 1.25rem;
413
+ font-weight: 900;
414
+ }
415
+
416
+ .result-val-indigo {
417
+ color: #6366f1;
418
+ }
419
+
420
+ .result-val-amber {
421
+ color: #f59e0b;
422
+ }
423
+
424
+ .result-val-slate {
425
+ color: var(--text-muted);
426
+ }
427
+
428
+ .ramp-body {
429
+ position: relative;
430
+ min-height: 200px;
431
+ display: flex;
432
+ align-items: center;
433
+ justify-content: center;
434
+ }
435
+
436
+ .ramp-empty {
437
+ display: flex;
438
+ flex-direction: column;
439
+ align-items: center;
440
+ justify-content: center;
441
+ gap: 0.75rem;
442
+ text-align: center;
443
+ padding: 2rem;
444
+ transition: opacity 0.5s;
445
+ }
446
+
447
+ .ramp-empty.hidden {
448
+ display: none;
449
+ }
450
+
451
+ .ramp-empty-icon {
452
+ width: 4rem;
453
+ height: 4rem;
454
+ border-radius: 1.5rem;
455
+ background: var(--bg-page);
456
+ border: 2px dashed var(--border-color);
457
+ display: flex;
458
+ align-items: center;
459
+ justify-content: center;
460
+ color: var(--text-muted);
461
+ }
462
+
463
+ .ramp-empty-icon svg {
464
+ width: 2rem;
465
+ height: 2rem;
466
+ }
467
+
468
+ .ramp-empty-title {
469
+ font-size: 0.875rem;
470
+ font-weight: 700;
471
+ color: var(--text-muted);
472
+ margin: 0;
473
+ }
474
+
475
+ .ramp-empty-desc {
476
+ font-size: 0.65rem;
477
+ font-weight: 700;
478
+ text-transform: uppercase;
479
+ letter-spacing: 0.1em;
480
+ color: var(--text-muted);
481
+ opacity: 0.6;
482
+ margin: 0;
483
+ }
484
+
485
+ .ramp-active {
486
+ width: 100%;
487
+ animation: fade-in 0.7s ease;
488
+ }
489
+
490
+ .ramp-active.hidden {
491
+ display: none;
492
+ }
493
+
494
+ .ramp-chart-wrap {
495
+ width: 100%;
496
+ aspect-ratio: 2 / 1;
497
+ background: var(--bg-page);
498
+ border: 1px solid var(--border-color);
499
+ border-radius: 1rem;
500
+ padding: 1rem;
501
+ overflow: hidden;
502
+ }
503
+
504
+ .ramp-svg {
505
+ width: 100%;
506
+ height: 100%;
507
+ overflow: visible;
508
+ }
509
+
510
+ .ramp-labels {
511
+ font-size: 7px;
512
+ font-weight: 900;
513
+ fill: var(--text-muted);
514
+ text-transform: uppercase;
515
+ }
516
+
517
+ .ramp-grid {
518
+ color: var(--border-color);
519
+ stroke-width: 0.5;
520
+ }
521
+
522
+ .ramp-fill-path {
523
+ transition: all 1s ease;
524
+ }
525
+
526
+ .ramp-line {
527
+ color: #6366f1;
528
+ transition: all 1s ease;
529
+ }
530
+
531
+ .ramp-time-labels {
532
+ font-size: 7px;
533
+ font-weight: 900;
534
+ fill: var(--text-muted);
535
+ text-transform: uppercase;
536
+ }
537
+
538
+ .ph-card {
539
+ gap: 1.5rem;
540
+ }
541
+
542
+ .ph-header-text {
543
+ display: flex;
544
+ flex-direction: column;
545
+ gap: 0.125rem;
546
+ }
547
+
548
+ .ph-subtitle {
549
+ font-size: 0.75rem;
550
+ color: var(--text-muted);
551
+ margin: 0;
552
+ }
553
+
554
+ .ph-body {
555
+ position: relative;
556
+ }
557
+
558
+ .ph-grid {
559
+ display: grid;
560
+ grid-template-columns: 1fr 1fr 1fr;
561
+ gap: 1.5rem;
562
+ align-items: start;
563
+ }
564
+
565
+ .ph-field {
566
+ display: flex;
567
+ flex-direction: column;
568
+ gap: 0.75rem;
569
+ }
570
+
571
+ .ph-slider {
572
+ width: 100%;
573
+ height: 0.5rem;
574
+ border-radius: 9999px;
575
+ background: var(--border-color);
576
+ appearance: none;
577
+ cursor: pointer;
578
+ accent-color: #8b5cf6;
579
+ }
580
+
581
+ .ph-range-labels {
582
+ display: flex;
583
+ justify-content: space-between;
584
+ font-size: 0.625rem;
585
+ font-weight: 700;
586
+ color: var(--text-muted);
587
+ padding: 0 0.25rem;
588
+ }
589
+
590
+ .ph-result {
591
+ background: var(--bg-page);
592
+ border: 2px dashed var(--border-color);
593
+ border-radius: 1rem;
594
+ padding: 1rem;
595
+ display: flex;
596
+ align-items: center;
597
+ justify-content: center;
598
+ min-height: 4rem;
599
+ }
600
+
601
+ .ph-result span {
602
+ font-size: 0.875rem;
603
+ font-weight: 700;
604
+ color: var(--text-main);
605
+ text-align: center;
606
+ }
607
+
608
+ input[type="number"]::-webkit-inner-spin-button,
609
+ input[type="number"]::-webkit-outer-spin-button {
610
+ -webkit-appearance: none;
611
+ margin: 0;
612
+ }
613
+
614
+ @keyframes fade-in {
615
+ from {
616
+ opacity: 0;
617
+ }
618
+ to {
619
+ opacity: 1;
620
+ }
621
+ }
622
+
623
+ @keyframes slide-in {
624
+ from {
625
+ opacity: 0;
626
+ transform: translateY(10px);
627
+ }
628
+ to {
629
+ opacity: 1;
630
+ transform: translateY(0);
631
+ }
632
+ }
633
+
634
+ [data-fiber-btn] {
635
+ animation: slide-in 0.3s ease-out forwards;
636
+ }
637
+
638
+ @media (max-width: 768px) {
639
+ .profile-grid {
640
+ grid-template-columns: 1fr;
641
+ }
642
+
643
+ .tool-grid {
644
+ grid-template-columns: 1fr;
645
+ }
646
+
647
+ .ph-grid {
648
+ grid-template-columns: 1fr;
649
+ }
650
+ }
@@ -1,35 +1,5 @@
1
- import type { TextilesToolEntry, ToolLocaleContent, ToolDefinition } 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
- };
31
-
32
-
1
+ import { fiberPrep } from './entry';
2
+ export * from './entry';
33
3
  export const FIBER_PREP_TOOL: ToolDefinition = {
34
4
  entry: fiberPrep,
35
5
  Component: () => import('./component.astro'),