@jjlmoya/utils-textiles 1.11.0 → 1.13.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 (26) hide show
  1. package/package.json +5 -3
  2. package/scripts/postinstall.mjs +27 -0
  3. package/src/tool/burnTest/component.astro +0 -380
  4. package/src/tool/burnTest/textile-burn-test.css +378 -0
  5. package/src/tool/clothingSizeConverter/clothing-size-converter.css +717 -0
  6. package/src/tool/clothingSizeConverter/component.astro +0 -719
  7. package/src/tool/fabricProjectCalculator/component.astro +0 -540
  8. package/src/tool/fabricProjectCalculator/fabric-project-calculator.css +538 -0
  9. package/src/tool/fabricTruth/component.astro +0 -428
  10. package/src/tool/fabricTruth/fabric-truthfulness.css +426 -0
  11. package/src/tool/fiberPrep/component.astro +0 -652
  12. package/src/tool/fiberPrep/fiber-preparation-natural-dyeing.css +650 -0
  13. package/src/tool/knittingGauge/component.astro +0 -458
  14. package/src/tool/knittingGauge/knitting-gauge-calculator.css +456 -0
  15. package/src/tool/laundryGuide/component.astro +0 -317
  16. package/src/tool/laundryGuide/laundry-guide.css +315 -0
  17. package/src/tool/needleConverter/component.astro +0 -344
  18. package/src/tool/needleConverter/knitting-needle-converter.css +342 -0
  19. package/src/tool/sewingPatternScaler/component.astro +0 -314
  20. package/src/tool/sewingPatternScaler/sewing-pattern-scaler.css +313 -0
  21. package/src/tool/shoeSizeConverter/component.astro +0 -255
  22. package/src/tool/shoeSizeConverter/shoe-size-converter.css +253 -0
  23. package/src/tool/stainChemistry/component.astro +0 -479
  24. package/src/tool/stainChemistry/stain-chemical-protocol.css +477 -0
  25. package/src/tool/yarnCalculator/component.astro +0 -446
  26. package/src/tool/yarnCalculator/yarn-calculator.css +444 -0
@@ -233,318 +233,4 @@ const SIZES = ['36', '38', '40', '42', '44', '46'];
233
233
  init();
234
234
  </script>
235
235
 
236
- <style>
237
- .scaler-wrapper {
238
- padding: 1.5rem 0;
239
- width: 100%;
240
- }
241
-
242
- .scaler-card {
243
- --sp-p: #4f46e5;
244
-
245
- background: var(--bg-surface);
246
- color: var(--text-main);
247
- width: calc(100% - 24px);
248
- max-width: 1100px;
249
- margin: 0 auto;
250
- border-radius: 24px;
251
- border: 1px solid var(--border-color);
252
- display: flex;
253
- flex-direction: column;
254
- overflow: hidden;
255
- }
256
-
257
- @media (min-width: 1024px) {
258
- .scaler-card { flex-direction: row; }
259
- }
260
-
261
- .card-left {
262
- flex: 0 0 auto;
263
- padding: 24px;
264
- width: 100%;
265
- background: var(--bg-surface);
266
- }
267
-
268
- @media (min-width: 1024px) {
269
- .card-left {
270
- width: 380px;
271
- padding: 40px;
272
- border-right: 1px solid var(--border-color);
273
- }
274
- }
275
-
276
- .card-right {
277
- flex: 1 1 auto;
278
- padding: 24px;
279
- background: var(--bg-surface);
280
- display: flex;
281
- flex-direction: column;
282
- gap: 24px;
283
- min-width: 0;
284
- }
285
-
286
- @media (min-width: 1024px) {
287
- .card-right {
288
- padding: 40px;
289
- gap: 32px;
290
- }
291
- }
292
-
293
- .label-tiny {
294
- font-size: 10px;
295
- font-weight: 700;
296
- text-transform: uppercase;
297
- letter-spacing: 0.12em;
298
- color: var(--text-muted);
299
- margin-bottom: 10px;
300
- display: block;
301
- }
302
-
303
- .segmented-control {
304
- display: flex;
305
- background: var(--bg-muted);
306
- border-radius: 12px;
307
- padding: 4px;
308
- margin-bottom: 24px;
309
- }
310
-
311
- .segment-btn {
312
- flex: 1;
313
- background: transparent;
314
- border: none;
315
- padding: 10px 4px;
316
- font-size: 10px;
317
- font-weight: 700;
318
- text-transform: uppercase;
319
- letter-spacing: 0.05em;
320
- color: var(--text-muted);
321
- cursor: pointer;
322
- border-radius: 8px;
323
- transition: all 0.2s ease;
324
- }
325
-
326
- .segment-btn.active {
327
- color: var(--text-main);
328
- background: var(--bg-surface);
329
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
330
- }
331
-
332
- .input-grid {
333
- display: grid;
334
- grid-template-columns: repeat(2, 1fr);
335
- gap: 12px;
336
- margin-bottom: 16px;
337
- }
338
-
339
- .form-input {
340
- width: 100%;
341
- background: var(--bg-surface);
342
- border: 1px solid var(--border-color);
343
- border-radius: 8px;
344
- padding: 10px 12px;
345
- font-size: 14px;
346
- color: var(--text-main);
347
- }
348
-
349
- .form-input:focus {
350
- outline: none;
351
- border-color: var(--sp-p);
352
- box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.06);
353
- }
354
-
355
- .form-select {
356
- cursor: pointer;
357
- appearance: none;
358
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
359
- background-repeat: no-repeat;
360
- background-position: right 8px center;
361
- background-size: 12px;
362
- padding-right: 28px;
363
- }
364
-
365
- .target-lbl {
366
- margin-top: 16px;
367
- }
368
-
369
- .ease-group {
370
- margin-top: 24px;
371
- border-top: 1px solid var(--border-color);
372
- padding-top: 24px;
373
- }
374
-
375
- .viz-container {
376
- background: var(--bg-muted);
377
- background-image:
378
- linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
379
- linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
380
- background-size: 20px 20px;
381
- border-radius: 12px;
382
- aspect-ratio: 1/1;
383
- display: flex;
384
- align-items: center;
385
- justify-content: center;
386
- position: relative;
387
- border: 1px solid var(--border-color);
388
- }
389
-
390
- @media (min-width: 768px) {
391
- .viz-container { aspect-ratio: 16/9; }
392
- }
393
-
394
- .theme-dark .viz-container {
395
- background-image:
396
- linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
397
- linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
398
- }
399
236
 
400
- #scaler-canvas {
401
- position: absolute;
402
- inset: 0;
403
- width: 100%;
404
- height: 100%;
405
- }
406
-
407
- .legend-box {
408
- position: absolute;
409
- bottom: 12px;
410
- right: 12px;
411
- display: flex;
412
- gap: 12px;
413
- font-size: 9px;
414
- font-weight: 700;
415
- text-transform: uppercase;
416
- letter-spacing: 0.05em;
417
- color: var(--text-muted);
418
- }
419
-
420
- .legend-item {
421
- display: flex;
422
- align-items: center;
423
- gap: 4px;
424
- }
425
-
426
- .ln-o {
427
- width: 10px;
428
- height: 1px;
429
- border: 1px dashed var(--border-color);
430
- }
431
-
432
- .ln-s {
433
- width: 10px;
434
- height: 2px;
435
- background: var(--sp-p);
436
- }
437
-
438
- .action-strip {
439
- display: flex;
440
- flex-direction: column;
441
- gap: 12px;
442
- }
443
-
444
- :global(.action-pill) {
445
- background: var(--bg-surface);
446
- border: 1px solid var(--border-color);
447
- border-radius: 16px;
448
- padding: 16px 20px;
449
- display: flex;
450
- align-items: center;
451
- gap: 16px;
452
- }
453
-
454
- :global(.icon-box) {
455
- width: 44px;
456
- height: 44px;
457
- background: var(--bg-muted);
458
- border-radius: 12px;
459
- display: flex;
460
- align-items: center;
461
- justify-content: center;
462
- color: var(--sp-p);
463
- font-size: 20px;
464
- flex-shrink: 0;
465
- }
466
-
467
- :global(.action-content) { flex: 1; }
468
-
469
- :global(.action-text) {
470
- display: block;
471
- font-size: 14px;
472
- color: var(--text-muted);
473
- }
474
-
475
- :global(.action-text strong) { font-weight: 700; }
476
-
477
- :global(.action-val-pos) { color: var(--sp-p); }
478
-
479
- :global(.action-val-neg) { color: #f87171; }
480
-
481
- :global(.action-note) {
482
- display: block;
483
- font-size: 10px;
484
- color: var(--text-muted);
485
- margin-top: 2px;
486
- text-transform: uppercase;
487
- letter-spacing: 0.05em;
488
- }
489
-
490
- .totals-section {
491
- background: var(--bg-muted);
492
- border-radius: 10px;
493
- padding: 24px;
494
- }
495
-
496
- .totals-grid {
497
- display: grid;
498
- grid-template-columns: repeat(2, 1fr);
499
- gap: 16px;
500
- }
501
-
502
- @media (min-width: 640px) {
503
- .totals-grid { grid-template-columns: repeat(4, 1fr); }
504
- }
505
-
506
- .total-card {
507
- text-align: center;
508
- display: flex;
509
- flex-direction: column;
510
- gap: 4px;
511
- }
512
-
513
- .total-val {
514
- font-size: 16px;
515
- font-weight: 700;
516
- color: var(--text-main);
517
- }
518
-
519
- .total-tag {
520
- font-size: 10px;
521
- font-weight: 700;
522
- text-transform: uppercase;
523
- color: var(--text-muted);
524
- letter-spacing: 0.08em;
525
- }
526
-
527
- .warn-banner {
528
- background: #fefce8;
529
- border-left: 3px solid #ca8a04;
530
- color: #854d0e;
531
- padding: 16px 20px;
532
- border-radius: 8px;
533
- font-size: 11px;
534
- font-weight: 600;
535
- margin-bottom: 24px;
536
- display: flex;
537
- align-items: center;
538
- gap: 12px;
539
- }
540
-
541
- .theme-dark .warn-banner {
542
- background: #451a03;
543
- border-left-color: #fbbf24;
544
- color: #fbbf24;
545
- }
546
-
547
- .hidden {
548
- display: none;
549
- }
550
- </style>
@@ -0,0 +1,313 @@
1
+ .scaler-wrapper {
2
+ padding: 1.5rem 0;
3
+ width: 100%;
4
+ }
5
+
6
+ .scaler-card {
7
+ --sp-p: #4f46e5;
8
+
9
+ background: var(--bg-surface);
10
+ color: var(--text-main);
11
+ width: calc(100% - 24px);
12
+ max-width: 1100px;
13
+ margin: 0 auto;
14
+ border-radius: 24px;
15
+ border: 1px solid var(--border-color);
16
+ display: flex;
17
+ flex-direction: column;
18
+ overflow: hidden;
19
+ }
20
+
21
+ @media (min-width: 1024px) {
22
+ .scaler-card { flex-direction: row; }
23
+ }
24
+
25
+ .card-left {
26
+ flex: 0 0 auto;
27
+ padding: 24px;
28
+ width: 100%;
29
+ background: var(--bg-surface);
30
+ }
31
+
32
+ @media (min-width: 1024px) {
33
+ .card-left {
34
+ width: 380px;
35
+ padding: 40px;
36
+ border-right: 1px solid var(--border-color);
37
+ }
38
+ }
39
+
40
+ .card-right {
41
+ flex: 1 1 auto;
42
+ padding: 24px;
43
+ background: var(--bg-surface);
44
+ display: flex;
45
+ flex-direction: column;
46
+ gap: 24px;
47
+ min-width: 0;
48
+ }
49
+
50
+ @media (min-width: 1024px) {
51
+ .card-right {
52
+ padding: 40px;
53
+ gap: 32px;
54
+ }
55
+ }
56
+
57
+ .label-tiny {
58
+ font-size: 10px;
59
+ font-weight: 700;
60
+ text-transform: uppercase;
61
+ letter-spacing: 0.12em;
62
+ color: var(--text-muted);
63
+ margin-bottom: 10px;
64
+ display: block;
65
+ }
66
+
67
+ .segmented-control {
68
+ display: flex;
69
+ background: var(--bg-muted);
70
+ border-radius: 12px;
71
+ padding: 4px;
72
+ margin-bottom: 24px;
73
+ }
74
+
75
+ .segment-btn {
76
+ flex: 1;
77
+ background: transparent;
78
+ border: none;
79
+ padding: 10px 4px;
80
+ font-size: 10px;
81
+ font-weight: 700;
82
+ text-transform: uppercase;
83
+ letter-spacing: 0.05em;
84
+ color: var(--text-muted);
85
+ cursor: pointer;
86
+ border-radius: 8px;
87
+ transition: all 0.2s ease;
88
+ }
89
+
90
+ .segment-btn.active {
91
+ color: var(--text-main);
92
+ background: var(--bg-surface);
93
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
94
+ }
95
+
96
+ .input-grid {
97
+ display: grid;
98
+ grid-template-columns: repeat(2, 1fr);
99
+ gap: 12px;
100
+ margin-bottom: 16px;
101
+ }
102
+
103
+ .form-input {
104
+ width: 100%;
105
+ background: var(--bg-surface);
106
+ border: 1px solid var(--border-color);
107
+ border-radius: 8px;
108
+ padding: 10px 12px;
109
+ font-size: 14px;
110
+ color: var(--text-main);
111
+ }
112
+
113
+ .form-input:focus {
114
+ outline: none;
115
+ border-color: var(--sp-p);
116
+ box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.06);
117
+ }
118
+
119
+ .form-select {
120
+ cursor: pointer;
121
+ appearance: none;
122
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
123
+ background-repeat: no-repeat;
124
+ background-position: right 8px center;
125
+ background-size: 12px;
126
+ padding-right: 28px;
127
+ }
128
+
129
+ .target-lbl {
130
+ margin-top: 16px;
131
+ }
132
+
133
+ .ease-group {
134
+ margin-top: 24px;
135
+ border-top: 1px solid var(--border-color);
136
+ padding-top: 24px;
137
+ }
138
+
139
+ .viz-container {
140
+ background: var(--bg-muted);
141
+ background-image:
142
+ linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
143
+ linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
144
+ background-size: 20px 20px;
145
+ border-radius: 12px;
146
+ aspect-ratio: 1/1;
147
+ display: flex;
148
+ align-items: center;
149
+ justify-content: center;
150
+ position: relative;
151
+ border: 1px solid var(--border-color);
152
+ }
153
+
154
+ @media (min-width: 768px) {
155
+ .viz-container { aspect-ratio: 16/9; }
156
+ }
157
+
158
+ .theme-dark .viz-container {
159
+ background-image:
160
+ linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
161
+ linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
162
+ }
163
+
164
+ #scaler-canvas {
165
+ position: absolute;
166
+ inset: 0;
167
+ width: 100%;
168
+ height: 100%;
169
+ }
170
+
171
+ .legend-box {
172
+ position: absolute;
173
+ bottom: 12px;
174
+ right: 12px;
175
+ display: flex;
176
+ gap: 12px;
177
+ font-size: 9px;
178
+ font-weight: 700;
179
+ text-transform: uppercase;
180
+ letter-spacing: 0.05em;
181
+ color: var(--text-muted);
182
+ }
183
+
184
+ .legend-item {
185
+ display: flex;
186
+ align-items: center;
187
+ gap: 4px;
188
+ }
189
+
190
+ .ln-o {
191
+ width: 10px;
192
+ height: 1px;
193
+ border: 1px dashed var(--border-color);
194
+ }
195
+
196
+ .ln-s {
197
+ width: 10px;
198
+ height: 2px;
199
+ background: var(--sp-p);
200
+ }
201
+
202
+ .action-strip {
203
+ display: flex;
204
+ flex-direction: column;
205
+ gap: 12px;
206
+ }
207
+
208
+ .action-pill {
209
+ background: var(--bg-surface);
210
+ border: 1px solid var(--border-color);
211
+ border-radius: 16px;
212
+ padding: 16px 20px;
213
+ display: flex;
214
+ align-items: center;
215
+ gap: 16px;
216
+ }
217
+
218
+ .icon-box {
219
+ width: 44px;
220
+ height: 44px;
221
+ background: var(--bg-muted);
222
+ border-radius: 12px;
223
+ display: flex;
224
+ align-items: center;
225
+ justify-content: center;
226
+ color: var(--sp-p);
227
+ font-size: 20px;
228
+ flex-shrink: 0;
229
+ }
230
+
231
+ .action-content { flex: 1; }
232
+
233
+ .action-text {
234
+ display: block;
235
+ font-size: 14px;
236
+ color: var(--text-muted);
237
+ }
238
+
239
+ .action-text strong { font-weight: 700; }
240
+
241
+ .action-val-pos { color: var(--sp-p); }
242
+
243
+ .action-val-neg { color: #f87171; }
244
+
245
+ .action-note {
246
+ display: block;
247
+ font-size: 10px;
248
+ color: var(--text-muted);
249
+ margin-top: 2px;
250
+ text-transform: uppercase;
251
+ letter-spacing: 0.05em;
252
+ }
253
+
254
+ .totals-section {
255
+ background: var(--bg-muted);
256
+ border-radius: 10px;
257
+ padding: 24px;
258
+ }
259
+
260
+ .totals-grid {
261
+ display: grid;
262
+ grid-template-columns: repeat(2, 1fr);
263
+ gap: 16px;
264
+ }
265
+
266
+ @media (min-width: 640px) {
267
+ .totals-grid { grid-template-columns: repeat(4, 1fr); }
268
+ }
269
+
270
+ .total-card {
271
+ text-align: center;
272
+ display: flex;
273
+ flex-direction: column;
274
+ gap: 4px;
275
+ }
276
+
277
+ .total-val {
278
+ font-size: 16px;
279
+ font-weight: 700;
280
+ color: var(--text-main);
281
+ }
282
+
283
+ .total-tag {
284
+ font-size: 10px;
285
+ font-weight: 700;
286
+ text-transform: uppercase;
287
+ color: var(--text-muted);
288
+ letter-spacing: 0.08em;
289
+ }
290
+
291
+ .warn-banner {
292
+ background: #fefce8;
293
+ border-left: 3px solid #ca8a04;
294
+ color: #854d0e;
295
+ padding: 16px 20px;
296
+ border-radius: 8px;
297
+ font-size: 11px;
298
+ font-weight: 600;
299
+ margin-bottom: 24px;
300
+ display: flex;
301
+ align-items: center;
302
+ gap: 12px;
303
+ }
304
+
305
+ .theme-dark .warn-banner {
306
+ background: #451a03;
307
+ border-left-color: #fbbf24;
308
+ color: #fbbf24;
309
+ }
310
+
311
+ .hidden {
312
+ display: none;
313
+ }