@jjlmoya/utils-cooking 1.19.0 → 1.20.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/american-kitchen-converter/component.astro +0 -498
  4. package/src/tool/american-kitchen-converter/us-cooking-conversion-calculator-cups-to-grams-fahrenheit.css +496 -0
  5. package/src/tool/banana-ripeness/banana-ripeness.css +587 -0
  6. package/src/tool/banana-ripeness/component.astro +0 -589
  7. package/src/tool/brine/component.astro +0 -536
  8. package/src/tool/brine/equilibrium-brining-calculator-meat-fermentation-ratios.css +534 -0
  9. package/src/tool/cookware-guide/component.astro +0 -24
  10. package/src/tool/cookware-guide/cookware-selector.css +22 -0
  11. package/src/tool/egg-timer/component.astro +1 -505
  12. package/src/tool/egg-timer/perfect-boiled-egg-timer-altitude-calculator.css +503 -0
  13. package/src/tool/ingredient-rescaler/component.astro +0 -22
  14. package/src/tool/ingredient-rescaler/recipe-ingredient-scaler-converter-servings.css +20 -0
  15. package/src/tool/kitchen-timer/component.astro +0 -340
  16. package/src/tool/kitchen-timer/kitchen-timer.css +338 -0
  17. package/src/tool/meringue-peak/component.astro +0 -300
  18. package/src/tool/meringue-peak/meringue-sugar-ratio-calculator-stiff-peaks.css +298 -0
  19. package/src/tool/mold-scaler/cake-pan-size-converter-calculator.css +364 -0
  20. package/src/tool/mold-scaler/component.astro +0 -366
  21. package/src/tool/pizza/component.astro +0 -570
  22. package/src/tool/pizza/neapolitan-pizza-dough-calculator-authentic-recipe.css +569 -0
  23. package/src/tool/roux-guide/component.astro +0 -23
  24. package/src/tool/roux-guide/roux-ratio-calculator-thickening-sauce-guide.css +21 -0
  25. package/src/tool/sourdough-calculator/component.astro +0 -371
  26. package/src/tool/sourdough-calculator/sourdough-starter-feeding-calculator-ratio-proportions.css +369 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jjlmoya/utils-cooking",
3
- "version": "1.19.0",
3
+ "version": "1.20.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -10,7 +10,8 @@
10
10
  "./entries": "./src/entries.ts"
11
11
  },
12
12
  "files": [
13
- "src"
13
+ "src",
14
+ "scripts"
14
15
  ],
15
16
  "publishConfig": {
16
17
  "access": "public"
@@ -29,7 +30,8 @@
29
30
  "postversion": "git push && git push --tags",
30
31
  "patch": "npm version patch",
31
32
  "minor": "npm version minor",
32
- "major": "npm version major"
33
+ "major": "npm version major",
34
+ "postinstall": "node scripts/postinstall.mjs"
33
35
  },
34
36
  "lint-staged": {
35
37
  "*.{ts,tsx,astro}": [
@@ -0,0 +1,27 @@
1
+ import { readFileSync, writeFileSync, mkdirSync, readdirSync } from 'fs';
2
+ import { join, dirname } from 'path';
3
+ import { fileURLToPath } from 'url';
4
+
5
+ const libDir = dirname(fileURLToPath(import.meta.url));
6
+ const toolsDir = join(libDir, '../src/tool');
7
+
8
+ const inNodeModules = libDir.includes('node_modules');
9
+ if (!inNodeModules) process.exit(0);
10
+
11
+ const projectRoot = join(libDir, '../../../..');
12
+ const categoryKey = JSON.parse(readFileSync(join(libDir, '../package.json'), 'utf8')).name.replace('@jjlmoya/utils-', '');
13
+ const destDir = join(projectRoot, `public/styles/lib/${categoryKey}`);
14
+
15
+ mkdirSync(destDir, { recursive: true });
16
+
17
+ const tools = readdirSync(toolsDir, { withFileTypes: true }).filter(d => d.isDirectory());
18
+ for (const tool of tools) {
19
+ const toolDir = join(toolsDir, tool.name);
20
+ let files;
21
+ try { files = readdirSync(toolDir).filter(f => f.endsWith('.css')); }
22
+ catch { continue; }
23
+ for (const file of files) {
24
+ writeFileSync(join(destDir, file), readFileSync(join(toolDir, file)));
25
+ console.log(`[@jjlmoya/utils-${categoryKey}] copied ${file}`);
26
+ }
27
+ }
@@ -329,504 +329,6 @@ const { ui } = Astro.props;
329
329
  </div>
330
330
  </div>
331
331
 
332
- <style is:inline define:vars={{}}>
333
- :root {
334
- --akc-primary: #ea580c;
335
- --akc-secondary: #f97316;
336
- --akc-text: #0f172a;
337
- --akc-text-muted: #475569;
338
- --akc-bg: #fff;
339
- --akc-bg-secondary: #f8fafc;
340
- --akc-bg-tertiary: #f1f5f9;
341
- --akc-border: #e2e8f0;
342
- }
343
-
344
- .theme-dark {
345
- --akc-primary: #fb923c;
346
- --akc-secondary: #fb923c;
347
- --akc-text: #fff;
348
- --akc-text-muted: #a0aec0;
349
- --akc-bg: #0f172a;
350
- --akc-bg-secondary: #1c1f2e;
351
- --akc-bg-tertiary: #151720;
352
- --akc-border: #2d3748;
353
- }
354
-
355
- .akc-wrapper {
356
- max-width: 800px;
357
- margin: 0 auto;
358
- }
359
-
360
- .akc-main-card {
361
- background: var(--akc-bg);
362
- backdrop-filter: blur(20px);
363
- -webkit-backdrop-filter: blur(20px);
364
- border: 1px solid var(--akc-border);
365
- border-radius: 2rem;
366
- padding: 2.5rem;
367
- box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
368
- color: var(--akc-text);
369
- }
370
-
371
- .theme-dark .akc-main-card {
372
- background: rgba(15, 23, 42, 0.4);
373
- border-color: rgba(255, 255, 255, 0.05);
374
- box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
375
- }
376
-
377
- .akc-tabs {
378
- display: flex;
379
- gap: 1rem;
380
- background: rgba(0, 0, 0, 0.04);
381
- padding: 0.5rem;
382
- border-radius: 1.5rem;
383
- margin-bottom: 2.5rem;
384
- }
385
-
386
- .theme-dark .akc-tabs {
387
- background: rgba(0, 0, 0, 0.2);
388
- }
389
-
390
- .akc-tab-btn {
391
- flex: 1;
392
- border: none;
393
- background: transparent;
394
- padding: 1rem;
395
- border-radius: 1.2rem;
396
- font-size: 1rem;
397
- font-weight: 600;
398
- color: inherit;
399
- opacity: 0.6;
400
- cursor: pointer;
401
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
402
- display: flex;
403
- align-items: center;
404
- justify-content: center;
405
- gap: 0.5rem;
406
- }
407
-
408
- .akc-tab-btn:hover {
409
- opacity: 1;
410
- background: rgba(255, 255, 255, 0.05);
411
- }
412
-
413
- .akc-tab-btn.active {
414
- opacity: 1;
415
- background: var(--akc-primary);
416
- color: var(--akc-text);
417
- box-shadow: 0 8px 20px rgba(234, 88, 12, 0.3);
418
- transform: translateY(-2px);
419
- }
420
-
421
- .akc-tab-content {
422
- display: none;
423
- animation: slide-up 0.4s ease-out forwards;
424
- }
425
-
426
- .akc-tab-content.active {
427
- display: block;
428
- }
429
-
430
- @keyframes slide-up {
431
- from {
432
- opacity: 0;
433
- transform: translateY(15px);
434
- }
435
-
436
- to {
437
- opacity: 1;
438
- transform: translateY(0);
439
- }
440
- }
441
-
442
- .akc-step-title {
443
- font-size: 1.25rem;
444
- font-weight: 700;
445
- margin-bottom: 1.5rem;
446
- display: flex;
447
- align-items: center;
448
- gap: 0.75rem;
449
- color: var(--akc-text);
450
- }
451
-
452
- .akc-step-number {
453
- background: var(--akc-primary);
454
- color: var(--akc-text);
455
- width: 2rem;
456
- height: 2rem;
457
- display: flex;
458
- align-items: center;
459
- justify-content: center;
460
- border-radius: 50%;
461
- font-size: 1rem;
462
- }
463
-
464
- .akc-grid {
465
- display: grid;
466
- grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
467
- gap: 1rem;
468
- margin-bottom: 2.5rem;
469
- }
470
-
471
- .akc-item-card {
472
- background: var(--akc-bg-secondary);
473
- border: 1px solid var(--akc-border);
474
- border-radius: 1.5rem;
475
- padding: 1.5rem 1rem;
476
- text-align: center;
477
- cursor: pointer;
478
- transition: all 0.3s ease;
479
- display: flex;
480
- flex-direction: column;
481
- align-items: center;
482
- gap: 1rem;
483
- color: inherit;
484
- }
485
-
486
- .theme-dark .akc-item-card {
487
- background: rgba(0, 0, 0, 0.2);
488
- border-color: rgba(255, 255, 255, 0.05);
489
- }
490
-
491
- .akc-item-card:hover {
492
- border-color: rgba(234, 88, 12, 0.5);
493
- }
494
-
495
- .akc-item-card.active {
496
- background: rgba(234, 88, 12, 0.1);
497
- border-color: var(--akc-primary);
498
- box-shadow: 0 10px 25px rgba(234, 88, 12, 0.15);
499
- transform: translateY(-4px);
500
- }
501
-
502
- .akc-item-icon {
503
- width: 56px;
504
- height: 56px;
505
- border-radius: 50%;
506
- background: rgba(0, 0, 0, 0.05);
507
- display: flex;
508
- align-items: center;
509
- justify-content: center;
510
- color: var(--akc-primary);
511
- font-size: 1.5rem;
512
- transition: all 0.3s ease;
513
- }
514
-
515
- .theme-dark .akc-item-icon {
516
- background: rgba(255, 255, 255, 0.05);
517
- }
518
-
519
- .akc-item-card.active .akc-item-icon {
520
- background: var(--akc-primary);
521
- color: var(--akc-text);
522
- transform: scale(1.1);
523
- }
524
-
525
- .akc-item-name {
526
- font-weight: 600;
527
- font-size: 0.95rem;
528
- line-height: 1.2;
529
- }
530
-
531
- .akc-item-sub {
532
- font-size: 0.75rem;
533
- opacity: 0.6;
534
- margin-top: 0.25rem;
535
- }
536
-
537
- .akc-amount-control {
538
- display: flex;
539
- flex-direction: column;
540
- gap: 1.5rem;
541
- margin-bottom: 3rem;
542
- align-items: center;
543
- }
544
-
545
- .akc-stepper {
546
- display: flex;
547
- align-items: center;
548
- background: rgba(0, 0, 0, 0.03);
549
- border-radius: 2rem;
550
- padding: 0.5rem;
551
- border: 1px solid rgba(0, 0, 0, 0.05);
552
- }
553
-
554
- .theme-dark .akc-stepper {
555
- background: rgba(0, 0, 0, 0.3);
556
- border-color: rgba(255, 255, 255, 0.05);
557
- }
558
-
559
- .akc-step-btn {
560
- width: 3.5rem;
561
- height: 3.5rem;
562
- border-radius: 50%;
563
- border: none;
564
- background: white;
565
- color: var(--akc-primary);
566
- font-size: 1.5rem;
567
- cursor: pointer;
568
- display: flex;
569
- align-items: center;
570
- justify-content: center;
571
- box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
572
- transition: all 0.2s ease;
573
- }
574
-
575
- .theme-dark .akc-step-btn {
576
- background: rgba(255, 255, 255, 0.1);
577
- color: var(--akc-text);
578
- }
579
-
580
- .akc-step-btn:hover {
581
- transform: scale(1.05);
582
- background: var(--akc-primary);
583
- color: var(--akc-text);
584
- }
585
-
586
- .akc-step-input {
587
- width: 120px;
588
- text-align: center;
589
- font-size: 2.5rem;
590
- font-weight: 800;
591
- background: transparent;
592
- border: none;
593
- color: inherit;
594
- outline: none;
595
- }
596
-
597
- .akc-quick-amounts {
598
- display: flex;
599
- gap: 0.75rem;
600
- flex-wrap: wrap;
601
- justify-content: center;
602
- }
603
-
604
- .akc-quick-btn {
605
- padding: 0.5rem 1rem;
606
- border-radius: 1rem;
607
- border: 1px solid var(--akc-border);
608
- background: transparent;
609
- color: inherit;
610
- font-weight: 600;
611
- cursor: pointer;
612
- transition: all 0.2s ease;
613
- }
614
-
615
- .theme-dark .akc-quick-btn {
616
- border-color: rgba(255, 255, 255, 0.1);
617
- }
618
-
619
- .akc-quick-btn:hover {
620
- background: rgba(234, 88, 12, 0.1);
621
- color: var(--akc-primary);
622
- border-color: var(--akc-primary);
623
- }
624
-
625
- .akc-result-display {
626
- background: linear-gradient(135deg, rgba(234, 88, 12, 0.1), rgba(249, 115, 22, 0.05));
627
- border: 2px solid rgba(234, 88, 12, 0.2);
628
- border-radius: 2rem;
629
- padding: 3rem 2rem;
630
- text-align: center;
631
- position: relative;
632
- overflow: hidden;
633
- }
634
-
635
- .theme-dark .akc-result-display {
636
- background: linear-gradient(135deg, rgba(234, 88, 12, 0.15), rgba(249, 115, 22, 0.05));
637
- border-color: rgba(234, 88, 12, 0.3);
638
- }
639
-
640
- .akc-result-display::before {
641
- content: '';
642
- position: absolute;
643
- top: 0;
644
- left: 0;
645
- right: 0;
646
- bottom: 0;
647
- background: radial-gradient(circle at top right, rgba(234, 88, 12, 0.1), transparent 70%);
648
- pointer-events: none;
649
- }
650
-
651
- .akc-result-value {
652
- font-size: 6rem;
653
- font-weight: 900;
654
- line-height: 1;
655
- background: linear-gradient(to right, var(--akc-primary), var(--akc-secondary));
656
- -webkit-background-clip: text;
657
- background-clip: text;
658
- -webkit-text-fill-color: transparent;
659
- margin-bottom: 0.5rem;
660
- }
661
-
662
- .akc-result-unit {
663
- font-size: 1.5rem;
664
- font-weight: 700;
665
- opacity: 0.8;
666
- text-transform: uppercase;
667
- letter-spacing: 0.2em;
668
- color: var(--akc-text-muted);
669
- }
670
-
671
- .akc-toggle {
672
- display: flex;
673
- background: rgba(0, 0, 0, 0.05);
674
- border-radius: 1.5rem;
675
- padding: 0.5rem;
676
- margin-bottom: 2.5rem;
677
- }
678
-
679
- .theme-dark .akc-toggle {
680
- background: rgba(0, 0, 0, 0.3);
681
- }
682
-
683
- .akc-toggle-btn {
684
- flex: 1;
685
- padding: 1rem;
686
- border: none;
687
- background: transparent;
688
- color: inherit;
689
- font-weight: 600;
690
- border-radius: 1rem;
691
- cursor: pointer;
692
- transition: all 0.3s ease;
693
- opacity: 0.6;
694
- }
695
-
696
- .akc-toggle-btn.active {
697
- background: var(--akc-primary);
698
- color: var(--akc-text);
699
- opacity: 1;
700
- box-shadow: 0 4px 15px rgba(234, 88, 12, 0.3);
701
- }
702
-
703
- .akc-temps-container {
704
- display: flex;
705
- align-items: center;
706
- justify-content: space-between;
707
- gap: 2rem;
708
- margin-bottom: 3rem;
709
- }
710
-
711
- .akc-temp-box {
712
- flex: 1;
713
- background: var(--akc-bg-secondary);
714
- border: 1px solid var(--akc-border);
715
- border-radius: 2rem;
716
- padding: 2rem;
717
- text-align: center;
718
- transition: all 0.3s ease;
719
- }
720
-
721
- .theme-dark .akc-temp-box {
722
- background: rgba(0, 0, 0, 0.2);
723
- border-color: rgba(255, 255, 255, 0.05);
724
- }
725
-
726
- .akc-temp-box:focus-within {
727
- border-color: var(--akc-primary);
728
- box-shadow: 0 10px 30px rgba(234, 88, 12, 0.1);
729
- transform: translateY(-5px);
730
- }
731
-
732
- .akc-temp-label {
733
- font-size: 1rem;
734
- font-weight: 700;
735
- opacity: 0.7;
736
- margin-bottom: 1rem;
737
- text-transform: uppercase;
738
- letter-spacing: 0.1em;
739
- }
740
-
741
- .akc-temp-input {
742
- width: 100%;
743
- text-align: center;
744
- font-size: 4rem;
745
- font-weight: 900;
746
- background: transparent;
747
- border: none;
748
- color: inherit;
749
- outline: none;
750
- }
751
-
752
- .akc-temp-middle {
753
- display: flex;
754
- align-items: center;
755
- justify-content: center;
756
- color: var(--akc-primary);
757
- background: rgba(234, 88, 12, 0.1);
758
- width: 4rem;
759
- height: 4rem;
760
- border-radius: 50%;
761
- flex-shrink: 0;
762
- }
763
-
764
- .akc-presets {
765
- display: grid;
766
- grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
767
- gap: 1rem;
768
- }
769
-
770
- .akc-preset-card {
771
- background: var(--akc-bg-secondary);
772
- border: 1px solid var(--akc-border);
773
- border-radius: 1rem;
774
- padding: 1rem;
775
- text-align: center;
776
- cursor: pointer;
777
- transition: all 0.2s ease;
778
- color: inherit;
779
- }
780
-
781
- .theme-dark .akc-preset-card {
782
- background: rgba(0, 0, 0, 0.2);
783
- border-color: rgba(255, 255, 255, 0.05);
784
- }
785
-
786
- .akc-preset-card:hover {
787
- background: rgba(234, 88, 12, 0.05);
788
- border-color: var(--akc-primary);
789
- transform: translateY(-2px);
790
- }
791
-
792
- .akc-preset-temp {
793
- font-weight: 800;
794
- font-size: 1.25rem;
795
- color: var(--akc-primary);
796
- margin-bottom: 0.25rem;
797
- }
798
-
799
- .akc-preset-desc {
800
- font-size: 0.8rem;
801
- opacity: 0.7;
802
- font-weight: 500;
803
- }
804
-
805
- @media (max-width: 768px) {
806
- .akc-tabs {
807
- flex-direction: column;
808
- gap: 0.5rem;
809
- }
810
-
811
- .akc-temps-container {
812
- flex-direction: column;
813
- }
814
-
815
- .akc-temp-middle {
816
- height: 3rem;
817
- width: 3rem;
818
- transform: rotate(90deg);
819
- }
820
-
821
- .akc-result-value {
822
- font-size: 4.5rem;
823
- }
824
-
825
- .akc-main-card {
826
- padding: 1.5rem;
827
- }
828
- }
829
- </style>
830
332
 
831
333
  <script>
832
334
  import { AmericanKitchenEngine } from "./AmericanKitchenEngine";