@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
@@ -172,347 +172,3 @@ const needleUI = ui as NeedleConverterUI;
172
172
  init();
173
173
  </script>
174
174
 
175
- <style>
176
- .needle-wrapper {
177
- padding: 1.5rem 0;
178
- width: 100%;
179
- }
180
-
181
- .needle-card {
182
- --nc-p: #3b82f6;
183
- --nc-s: #0ea5e9;
184
-
185
- background: var(--bg-surface);
186
- color: var(--text-main);
187
- width: calc(100% - 24px);
188
- max-width: 1100px;
189
- margin: 0 auto;
190
- border-radius: 24px;
191
- border: 1px solid var(--border-color);
192
- display: flex;
193
- flex-direction: column;
194
- overflow: hidden;
195
- }
196
-
197
- @media (min-width: 1024px) {
198
- .needle-card {
199
- flex-direction: row;
200
- }
201
- }
202
-
203
- .card-sidebar {
204
- flex: 0 0 auto;
205
- padding: 24px;
206
- width: 100%;
207
- background: var(--bg-surface);
208
- }
209
-
210
- @media (min-width: 1024px) {
211
- .card-sidebar {
212
- width: 400px;
213
- padding: 40px;
214
- border-right: 1px solid var(--border-color);
215
- }
216
- }
217
-
218
- .card-main {
219
- flex: 1 1 auto;
220
- padding: 24px;
221
- background: var(--bg-surface);
222
- display: flex;
223
- flex-direction: column;
224
- gap: 32px;
225
- min-width: 0;
226
- }
227
-
228
- @media (min-width: 1024px) {
229
- .card-main {
230
- padding: 40px;
231
- }
232
- }
233
-
234
- .label-tiny {
235
- font-size: 10px;
236
- font-weight: 700;
237
- text-transform: uppercase;
238
- letter-spacing: 0.12em;
239
- color: var(--text-muted);
240
- margin-bottom: 12px;
241
- display: block;
242
- }
243
-
244
- .mode-toggle {
245
- display: flex;
246
- background: var(--bg-muted);
247
- padding: 4px;
248
- border-radius: 12px;
249
- margin-bottom: 32px;
250
- }
251
-
252
- .toggle-btn {
253
- flex: 1;
254
- border: none;
255
- background: transparent;
256
- padding: 12px;
257
- font-size: 10px;
258
- font-weight: 800;
259
- text-transform: uppercase;
260
- letter-spacing: 0.05em;
261
- color: var(--text-muted);
262
- cursor: pointer;
263
- border-radius: 8px;
264
- transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
265
- }
266
-
267
- .toggle-btn.active {
268
- background: var(--bg-surface);
269
- color: var(--text-main);
270
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
271
- }
272
-
273
- .calibration-area {
274
- background: var(--bg-muted);
275
- border-radius: 20px;
276
- padding: 24px;
277
- border: 1px solid var(--border-color);
278
- margin-bottom: 24px;
279
- position: relative;
280
- overflow: hidden;
281
- }
282
-
283
- .hole-selector {
284
- display: flex;
285
- align-items: center;
286
- gap: 24px;
287
- overflow-x: auto;
288
- padding: 30px 10px;
289
- scrollbar-width: none;
290
- scroll-snap-type: x mandatory;
291
- }
292
-
293
- .hole-selector::-webkit-scrollbar {
294
- display: none;
295
- }
296
-
297
- :global(.needle-hole) {
298
- flex: 0 0 auto;
299
- width: 64px;
300
- height: 64px;
301
- background: var(--bg-surface);
302
- border: 1.5px solid var(--border-color);
303
- border-radius: 50%;
304
- display: flex;
305
- align-items: center;
306
- justify-content: center;
307
- cursor: pointer;
308
- position: relative;
309
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
310
- scroll-snap-align: center;
311
- }
312
-
313
- :global(.needle-hole::after) {
314
- content: '';
315
- position: absolute;
316
- width: var(--size-px);
317
- height: var(--size-px);
318
- background: var(--text-main);
319
- border-radius: 50%;
320
- opacity: 0.1;
321
- transition: transform 0.3s ease;
322
- }
323
-
324
- :global(.needle-hole.active) {
325
- border-color: var(--nc-p);
326
- background: rgba(59, 130, 246, 0.08);
327
- transform: scale(1.15);
328
- box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.15);
329
- }
330
-
331
- :global(.needle-hole.active::after) {
332
- opacity: 1;
333
- background: var(--nc-p);
334
- transform: scale(1.05);
335
- }
336
-
337
- :global(.hole-label) {
338
- position: absolute;
339
- bottom: -28px;
340
- font-size: 11px;
341
- font-weight: 800;
342
- color: var(--text-muted);
343
- transition: color 0.2s;
344
- }
345
-
346
- :global(.needle-hole.active .hole-label) {
347
- color: var(--nc-p);
348
- }
349
-
350
- .calibrator-desc {
351
- font-size: 12px;
352
- color: var(--text-muted);
353
- font-weight: 400;
354
- line-height: 1.6;
355
- }
356
-
357
- .conversion-grid {
358
- display: grid;
359
- grid-template-columns: repeat(3, 1fr);
360
- gap: 16px;
361
- }
362
-
363
- .system-card {
364
- background: var(--bg-muted);
365
- border-radius: 20px;
366
- padding: 24px 16px;
367
- text-align: center;
368
- border: 1px solid var(--border-color);
369
- transition: border-color 0.2s;
370
- }
371
-
372
- .val-large {
373
- display: block;
374
- font-size: 28px;
375
- font-weight: 800;
376
- color: var(--text-main);
377
- line-height: 1;
378
- margin-bottom: 8px;
379
- letter-spacing: -0.02em;
380
- }
381
-
382
- .val-tag {
383
- font-size: 10px;
384
- font-weight: 700;
385
- text-transform: uppercase;
386
- color: var(--text-muted);
387
- letter-spacing: 0.1em;
388
- }
389
-
390
- .yarn-box {
391
- background: #f0f9ff;
392
- border-left: 4px solid var(--nc-s);
393
- padding: 28px;
394
- border-radius: 16px;
395
- display: flex;
396
- gap: 20px;
397
- align-items: center;
398
- }
399
-
400
- .theme-dark .yarn-box {
401
- background: #082f49;
402
- }
403
-
404
- .yarn-icon {
405
- width: 56px;
406
- height: 56px;
407
- background: var(--bg-surface);
408
- border-radius: 16px;
409
- display: flex;
410
- align-items: center;
411
- justify-content: center;
412
- color: var(--nc-s);
413
- flex-shrink: 0;
414
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
415
- }
416
-
417
- .yarn-content {
418
- flex: 1;
419
- }
420
-
421
- .yarn-label {
422
- font-size: 9px;
423
- font-weight: 800;
424
- color: #0284c7;
425
- text-transform: uppercase;
426
- letter-spacing: 0.1em;
427
- display: block;
428
- margin-bottom: 4px;
429
- }
430
-
431
- .theme-dark .yarn-label {
432
- color: #7dd3fc;
433
- }
434
-
435
- .yarn-name {
436
- display: block;
437
- font-size: 17px;
438
- font-weight: 800;
439
- color: #075985;
440
- }
441
-
442
- .theme-dark .yarn-name {
443
- color: #bae6fd;
444
- }
445
-
446
- .yarn-wpi {
447
- display: block;
448
- font-size: 12px;
449
- color: #0369a1;
450
- font-weight: 500;
451
- margin-top: 4px;
452
- }
453
-
454
- .theme-dark .yarn-wpi {
455
- color: #7dd3fc;
456
- }
457
-
458
- .table-section {
459
- border-top: 1px solid var(--border-color);
460
- padding-top: 40px;
461
- }
462
-
463
- .needle-table-wrapper {
464
- overflow-x: auto;
465
- border-radius: 16px;
466
- border: 1px solid var(--border-color);
467
- }
468
-
469
- .needle-table {
470
- width: 100%;
471
- border-collapse: collapse;
472
- font-size: 14px;
473
- text-align: center;
474
- }
475
-
476
- .needle-table th {
477
- background: var(--bg-muted);
478
- padding: 16px;
479
- font-size: 10px;
480
- font-weight: 800;
481
- text-transform: uppercase;
482
- color: var(--text-muted);
483
- border-bottom: 1px solid var(--border-color);
484
- }
485
-
486
- .needle-table :global(td) {
487
- padding: 16px;
488
- border-bottom: 1px solid var(--border-color);
489
- color: var(--text-muted);
490
- transition: all 0.2s;
491
- }
492
-
493
- .needle-table :global(tbody tr:nth-child(even) td) {
494
- background: rgba(0, 0, 0, 0.02);
495
- }
496
-
497
- .theme-dark .needle-table :global(tbody tr:nth-child(even) td) {
498
- background: rgba(255, 255, 255, 0.02);
499
- }
500
-
501
- .needle-table :global(tr:hover td) {
502
- background: var(--bg-muted);
503
- }
504
-
505
- .needle-table :global(tr.active td) {
506
- background: rgba(59, 130, 246, 0.05);
507
- color: var(--nc-p);
508
- font-weight: 700;
509
- }
510
-
511
- .needle-table :global(tr.active td:first-child) {
512
- box-shadow: inset 4px 0 0 var(--nc-p);
513
- }
514
-
515
- .theme-dark .needle-table :global(tr.active td) {
516
- background: rgba(59, 130, 246, 0.1);
517
- }
518
- </style>
@@ -0,0 +1,30 @@
1
+ import type { TextilesToolEntry, ToolLocaleContent } from '../../types';
2
+
3
+ import type { NeedleConverterUI } from './ui';
4
+
5
+ export type NeedleConverterLocaleContent = ToolLocaleContent<NeedleConverterUI>;
6
+
7
+ export const needleConverter: TextilesToolEntry<NeedleConverterUI> = {
8
+ id: 'needle-converter',
9
+ icons: {
10
+ bg: 'mdi:needle',
11
+ fg: 'mdi:swap-horizontal',
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 { NeedleConverterUI } from './ui';
4
-
5
- export type NeedleConverterLocaleContent = ToolLocaleContent<NeedleConverterUI>;
6
-
7
- export const needleConverter: TextilesToolEntry<NeedleConverterUI> = {
8
- id: 'needle-converter',
9
- icons: {
10
- bg: 'mdi:needle',
11
- fg: 'mdi:swap-horizontal',
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 { needleConverter } from './entry';
2
+ export * from './entry';
33
3
  export const NEEDLE_CONVERTER_TOOL: ToolDefinition = {
34
4
  entry: needleConverter,
35
5
  Component: () => import('./component.astro'),