@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,444 @@
1
+ .yc-wrapper {
2
+ --yc-p: #10b981;
3
+
4
+ width: 100%;
5
+ padding: 1rem 0;
6
+ }
7
+
8
+ .yc-card {
9
+ background: var(--bg-surface);
10
+ width: calc(100% - 24px);
11
+ max-width: 1100px;
12
+ margin: 0 auto;
13
+ border-radius: 24px;
14
+ overflow: hidden;
15
+ display: flex;
16
+ flex-direction: column;
17
+ color: var(--text-main);
18
+ }
19
+
20
+ @media (min-width: 1024px) {
21
+ .yc-card {
22
+ flex-direction: row;
23
+ min-height: 700px;
24
+ }
25
+ }
26
+
27
+ .yc-sidebar {
28
+ flex: 0 0 auto;
29
+ width: 100%;
30
+ background: var(--bg-surface);
31
+ padding: 32px;
32
+ display: flex;
33
+ flex-direction: column;
34
+ gap: 40px;
35
+ }
36
+
37
+ @media (min-width: 1024px) {
38
+ .yc-sidebar {
39
+ width: 440px;
40
+ padding: 48px;
41
+ border-right: 1px solid var(--border-color);
42
+ overflow-y: auto;
43
+ }
44
+ }
45
+
46
+ .yc-main {
47
+ flex: 1;
48
+ background: var(--bg-surface);
49
+ padding: 32px;
50
+ display: flex;
51
+ flex-direction: column;
52
+ }
53
+
54
+ @media (min-width: 1024px) {
55
+ .yc-main {
56
+ padding: 64px 48px;
57
+ }
58
+ }
59
+
60
+ .section-label {
61
+ font-size: 11px;
62
+ font-weight: 800;
63
+ text-transform: uppercase;
64
+ letter-spacing: 0.12em;
65
+ color: var(--text-muted);
66
+ margin-bottom: 20px;
67
+ display: block;
68
+ }
69
+
70
+ .project-grid {
71
+ display: grid;
72
+ grid-template-columns: repeat(3, 1fr);
73
+ gap: 12px;
74
+ }
75
+
76
+ .project-item {
77
+ aspect-ratio: 1;
78
+ background: var(--bg-muted);
79
+ border: 1px solid var(--border-color);
80
+ border-radius: 16px;
81
+ display: flex;
82
+ flex-direction: column;
83
+ align-items: center;
84
+ justify-content: center;
85
+ cursor: pointer;
86
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
87
+ gap: 8px;
88
+ }
89
+
90
+ .project-item svg {
91
+ width: 32px;
92
+ height: 32px;
93
+ color: var(--text-muted);
94
+ transition: color 0.2s;
95
+ }
96
+
97
+ .project-item span {
98
+ font-size: 10px;
99
+ font-weight: 700;
100
+ color: var(--text-muted);
101
+ }
102
+
103
+ .project-item.active {
104
+ background: #f0fdf4;
105
+ border-color: var(--yc-p);
106
+ box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.1);
107
+ }
108
+
109
+ .project-item.active svg {
110
+ color: var(--yc-p);
111
+ }
112
+
113
+ .project-item.active span {
114
+ color: #065f46;
115
+ }
116
+
117
+ .input-block {
118
+ display: flex;
119
+ flex-direction: column;
120
+ gap: 8px;
121
+ }
122
+
123
+ .pill-selector {
124
+ display: flex;
125
+ background: var(--bg-muted);
126
+ padding: 4px;
127
+ border-radius: 12px;
128
+ margin-top: 4px;
129
+ }
130
+
131
+ .pill-btn {
132
+ flex: 1;
133
+ border: none;
134
+ background: transparent;
135
+ padding: 10px;
136
+ font-size: 11px;
137
+ font-weight: 700;
138
+ color: var(--text-muted);
139
+ cursor: pointer;
140
+ border-radius: 8px;
141
+ transition: all 0.2s;
142
+ }
143
+
144
+ .pill-btn.active {
145
+ background: var(--yc-p);
146
+ color: #fff;
147
+ box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
148
+ }
149
+
150
+ .custom-input-box {
151
+ background: var(--bg-muted);
152
+ padding: 16px;
153
+ border-radius: 20px;
154
+ border: 1px solid var(--border-color);
155
+ }
156
+
157
+ .ball-grid {
158
+ display: grid;
159
+ grid-template-columns: 1fr 1fr;
160
+ gap: 16px;
161
+ }
162
+
163
+ .label-tiny {
164
+ font-size: 9px;
165
+ font-weight: 800;
166
+ color: var(--text-muted);
167
+ margin-bottom: 8px;
168
+ display: block;
169
+ }
170
+
171
+ .custom-input {
172
+ width: 100%;
173
+ padding: 14px 16px;
174
+ background: var(--bg-surface);
175
+ border: 1px solid var(--border-color);
176
+ border-radius: 12px;
177
+ font-size: 15px;
178
+ font-weight: 700;
179
+ color: var(--text-main);
180
+ transition: all 0.2s;
181
+ }
182
+
183
+ .custom-input:focus {
184
+ outline: none;
185
+ border-color: var(--yc-p);
186
+ box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
187
+ }
188
+
189
+ .switch-row {
190
+ display: flex;
191
+ align-items: center;
192
+ justify-content: space-between;
193
+ padding: 12px 16px;
194
+ background: var(--bg-muted);
195
+ border-radius: 12px;
196
+ border: 1px solid var(--border-color);
197
+ cursor: pointer;
198
+ }
199
+
200
+ .cable-label {
201
+ font-size: 13px;
202
+ font-weight: 800;
203
+ }
204
+
205
+ .switch-toggle {
206
+ width: 44px;
207
+ height: 24px;
208
+ background: var(--border-color);
209
+ border-radius: 100px;
210
+ position: relative;
211
+ transition: all 0.3s;
212
+ }
213
+
214
+ .switch-toggle::before {
215
+ content: "";
216
+ position: absolute;
217
+ width: 18px;
218
+ height: 18px;
219
+ background: #fff;
220
+ border-radius: 50%;
221
+ top: 3px;
222
+ left: 3px;
223
+ transition: all 0.3s;
224
+ }
225
+
226
+ .switch-row.active {
227
+ border-color: var(--yc-p);
228
+ background: #f0fdf4;
229
+ }
230
+
231
+ .switch-row.active .switch-toggle {
232
+ background: var(--yc-p);
233
+ }
234
+
235
+ .switch-row.active .switch-toggle::before {
236
+ transform: translateX(20px);
237
+ }
238
+
239
+ .results-panel {
240
+ flex: 1;
241
+ display: flex;
242
+ flex-direction: column;
243
+ justify-content: center;
244
+ }
245
+
246
+ .main-stat {
247
+ text-align: center;
248
+ margin-bottom: 48px;
249
+ }
250
+
251
+ .stat-prefix {
252
+ font-size: 12px;
253
+ font-weight: 800;
254
+ color: var(--text-muted);
255
+ text-transform: uppercase;
256
+ letter-spacing: 0.2em;
257
+ display: block;
258
+ margin-bottom: 8px;
259
+ }
260
+
261
+ .stat-row {
262
+ display: flex;
263
+ align-items: baseline;
264
+ justify-content: center;
265
+ }
266
+
267
+ .stat-value {
268
+ font-size: 96px;
269
+ font-weight: 950;
270
+ color: var(--text-main);
271
+ line-height: 1;
272
+ letter-spacing: -0.05em;
273
+ }
274
+
275
+ .stat-suffix {
276
+ font-size: 28px;
277
+ font-weight: 900;
278
+ color: var(--text-muted);
279
+ margin-left: 8px;
280
+ }
281
+
282
+ .stat-note {
283
+ font-size: 14px;
284
+ font-weight: 600;
285
+ color: var(--text-muted);
286
+ margin-top: 12px;
287
+ }
288
+
289
+ .balls-cta {
290
+ background: var(--yc-p);
291
+ color: #fff;
292
+ padding: 40px;
293
+ border-radius: 32px;
294
+ text-align: center;
295
+ box-shadow: 0 20px 40px -10px rgba(16, 185, 129, 0.4);
296
+ position: relative;
297
+ overflow: hidden;
298
+ display: flex;
299
+ flex-direction: column;
300
+ align-items: center;
301
+ gap: 8px;
302
+ }
303
+
304
+ .balls-icon {
305
+ font-size: 24px;
306
+ margin-bottom: 4px;
307
+ opacity: 0.9;
308
+ }
309
+
310
+ .balls-count {
311
+ display: block;
312
+ font-size: 32px;
313
+ font-weight: 900;
314
+ line-height: 1;
315
+ }
316
+
317
+ .balls-desc {
318
+ display: block;
319
+ font-size: 14px;
320
+ font-weight: 700;
321
+ opacity: 0.8;
322
+ }
323
+
324
+ .panic-alert {
325
+ margin-top: 32px;
326
+ display: flex;
327
+ gap: 16px;
328
+ padding: 24px;
329
+ background: #fffbeb;
330
+ border: 1px solid #fde68a;
331
+ border-radius: 20px;
332
+ color: #92400e;
333
+ font-size: 14px;
334
+ line-height: 1.6;
335
+ }
336
+
337
+ .alert-icon {
338
+ flex-shrink: 0;
339
+ color: #f59e0b;
340
+ width: 20px;
341
+ }
342
+
343
+ .garment-scheme {
344
+ margin-top: 48px;
345
+ border-top: 1px solid var(--border-color);
346
+ padding-top: 48px;
347
+ }
348
+
349
+ .scheme-container {
350
+ background: var(--bg-muted);
351
+ border-radius: 24px;
352
+ padding: 64px 48px;
353
+ display: flex;
354
+ justify-content: center;
355
+ position: relative;
356
+ min-height: 340px;
357
+ overflow: hidden;
358
+ }
359
+
360
+ :global(.scheme-item) {
361
+ stroke-width: 4;
362
+ fill: none;
363
+ stroke: var(--border-color);
364
+ transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
365
+ }
366
+
367
+ :global(.scheme-item.filled) {
368
+ stroke: var(--yc-p);
369
+ fill: #10b98108;
370
+ }
371
+
372
+ :global(.scheme-callout) {
373
+ stroke: var(--yc-p);
374
+ stroke-width: 2;
375
+ fill: none;
376
+ transition: all 0.4s ease;
377
+ stroke-dasharray: 6 3;
378
+ opacity: 0.7;
379
+ }
380
+
381
+ :global(.scheme-dot) {
382
+ fill: var(--yc-p);
383
+ transition: all 0.4s ease;
384
+ }
385
+
386
+ .scheme-label {
387
+ position: absolute;
388
+ display: flex;
389
+ flex-direction: column;
390
+ gap: 4px;
391
+ padding: 12px 16px;
392
+ background: var(--bg-surface);
393
+ border: 1.5px solid var(--border-color);
394
+ border-left: 4px solid var(--yc-p);
395
+ border-radius: 8px;
396
+ box-shadow: 0 8px 16px -4px rgba(16, 185, 129, 0.1);
397
+ pointer-events: none;
398
+ transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
399
+ z-index: 10;
400
+ }
401
+
402
+ .scheme-label :global(span) {
403
+ font-size: 9px;
404
+ font-weight: 900;
405
+ text-transform: uppercase;
406
+ letter-spacing: 0.1em;
407
+ color: var(--text-muted);
408
+ }
409
+
410
+ .scheme-label :global(strong) {
411
+ color: var(--text-main);
412
+ font-weight: 950;
413
+ font-size: 15px;
414
+ }
415
+
416
+ .scheme-label :global(em) {
417
+ font-size: 11px;
418
+ font-style: normal;
419
+ color: var(--yc-p);
420
+ font-weight: 800;
421
+ margin-top: 2px;
422
+ }
423
+
424
+ .theme-dark .project-item.active {
425
+ background: #064e3b;
426
+ }
427
+
428
+ .theme-dark .project-item.active span {
429
+ color: #6ee7b7;
430
+ }
431
+
432
+ .theme-dark .switch-row.active {
433
+ background: #064e3b;
434
+ }
435
+
436
+ .theme-dark .panic-alert {
437
+ background: #451a03;
438
+ border-color: #d97706;
439
+ color: #fbbf24;
440
+ }
441
+
442
+ .theme-dark .scheme-container {
443
+ background: var(--bg-surface);
444
+ }
package/src/tools.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export { ALL_ENTRIES } from './entries';
1
2
  import type { ToolDefinition } from './types';
2
3
  import { FABRIC_TRUTH_TOOL } from './tool/fabricTruth/index';
3
4
  import { LAUNDRY_GUIDE_TOOL } from './tool/laundryGuide/index';
@@ -15,4 +16,3 @@ import { YARN_CALCULATOR_TOOL } from './tool/yarnCalculator/index';
15
16
  export const ALL_TOOLS: ToolDefinition[] = [FABRIC_TRUTH_TOOL, LAUNDRY_GUIDE_TOOL, STAIN_CHEMISTRY_TOOL, BURN_TEST_TOOL, FIBER_PREP_TOOL, SHOE_SIZE_CONVERTER_TOOL, CLOTHING_SIZE_CONVERTER_TOOL, KNITTING_GAUGE_TOOL, FABRIC_PROJECT_CALCULATOR_TOOL, SEWING_PATTERN_SCALER_TOOL, NEEDLE_CONVERTER_TOOL, YARN_CALCULATOR_TOOL];
16
17
 
17
18
 
18
- export const ALL_ENTRIES = ALL_TOOLS.map(t => t.entry);