@jjlmoya/utils-cooking 1.9.0 → 1.11.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jjlmoya/utils-cooking",
3
- "version": "1.9.0",
3
+ "version": "1.11.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -1,6 +1,4 @@
1
1
  ---
2
- import "./BananaCare.css";
3
-
4
2
  interface Props {
5
3
  ui: Record<string, string>;
6
4
  }
@@ -283,3 +281,593 @@ const { ui } = Astro.props;
283
281
 
284
282
  update();
285
283
  </script>
284
+
285
+ <style>
286
+ .banana-care-container {
287
+ --bc-yellow: #fbbf24;
288
+ --bc-yellow-dark: #eab308;
289
+ --bc-orange: #b45309;
290
+ --bc-text-dark: #18181b;
291
+ --bc-text-light: #fff;
292
+ --bc-text-muted: #a1a1aa;
293
+ --bc-text-gray: #71717a;
294
+ --bc-text-gray-dark: #52525b;
295
+ --bc-blue-light: #4f8cee;
296
+ --bc-blue: #3b82f6;
297
+ --bc-blue-dark: #2563eb;
298
+ --bc-blue-lighter: #60a5fa;
299
+ --bc-green: #10b981;
300
+ --bc-gray-light: #d4d4d8;
301
+ --bc-slate-dark: #1e293b;
302
+
303
+ max-width: 100%;
304
+ margin: 2rem auto;
305
+ padding: 1rem;
306
+ display: flex;
307
+ flex-direction: column;
308
+ gap: 2rem;
309
+ }
310
+
311
+ .banana-card {
312
+ background: #fafafa;
313
+ backdrop-filter: blur(24px);
314
+ border: 1px solid #e4e4e7;
315
+ border-radius: 2.5rem;
316
+ padding: 2.5rem;
317
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
318
+ overflow: hidden;
319
+ position: relative;
320
+ }
321
+
322
+ :global(.theme-dark) .banana-card {
323
+ background: rgba(24, 24, 27, 0.4);
324
+ border-color: rgba(113, 113, 122, 0.5);
325
+ box-shadow: 0 32px 64px 0 rgba(0, 0, 0, 0.3);
326
+ }
327
+
328
+ .glow-bg {
329
+ position: absolute;
330
+ top: -96px;
331
+ right: -96px;
332
+ width: 256px;
333
+ height: 256px;
334
+ background: rgba(250, 204, 21, 0.2);
335
+ border-radius: 9999px;
336
+ filter: blur(96px);
337
+ pointer-events: none;
338
+ transition: all 700ms;
339
+ }
340
+
341
+ .glow-bg-2 {
342
+ position: absolute;
343
+ bottom: -96px;
344
+ left: -96px;
345
+ width: 256px;
346
+ height: 256px;
347
+ background: rgba(52, 211, 153, 0.1);
348
+ border-radius: 9999px;
349
+ filter: blur(96px);
350
+ pointer-events: none;
351
+ transition: all 700ms;
352
+ }
353
+
354
+ .banana-grid {
355
+ position: relative;
356
+ z-index: 10;
357
+ max-width: 80rem;
358
+ margin: 0 auto;
359
+ display: grid;
360
+ grid-template-columns: 1fr 1fr;
361
+ gap: 2rem;
362
+ align-items: center;
363
+ }
364
+
365
+ @media (max-width: 1024px) {
366
+ .banana-grid {
367
+ grid-template-columns: 1fr;
368
+ }
369
+ }
370
+
371
+ .banana-visual-section {
372
+ display: flex;
373
+ flex-direction: column;
374
+ align-items: center;
375
+ justify-content: center;
376
+ gap: 1rem;
377
+ }
378
+
379
+ .status-card {
380
+ position: relative;
381
+ width: 100%;
382
+ max-width: 340px;
383
+ aspect-ratio: 1;
384
+ display: flex;
385
+ align-items: center;
386
+ justify-content: center;
387
+ }
388
+
389
+ .glow-indicator {
390
+ position: absolute;
391
+ inset: -100px;
392
+ border-radius: 9999px;
393
+ filter: blur(80px);
394
+ opacity: 0.3;
395
+ transition: all 1000ms;
396
+ }
397
+
398
+ .status-visual {
399
+ position: relative;
400
+ z-index: 10;
401
+ transition: all 700ms ease-out;
402
+ }
403
+
404
+ .banana-svg {
405
+ width: 100%;
406
+ height: 100%;
407
+ filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.3));
408
+ }
409
+
410
+ .banana-group {
411
+ transition: all 700ms;
412
+ transform-origin: center;
413
+ }
414
+
415
+ .banana-body {
416
+ transition: color 500ms;
417
+ color: var(--bc-yellow);
418
+ }
419
+
420
+ .banana-dot {
421
+ transition: opacity 500ms cubic-bezier(0.4, 0, 0.2, 1);
422
+ opacity: 0;
423
+ }
424
+
425
+ .status-info {
426
+ display: flex;
427
+ flex-direction: column;
428
+ align-items: center;
429
+ gap: 1rem;
430
+ }
431
+
432
+ .status-badge {
433
+ display: inline-flex;
434
+ align-items: center;
435
+ gap: 0.5rem;
436
+ padding: 0.375rem 1rem;
437
+ border-radius: 9999px;
438
+ background: rgba(255, 255, 255, 0.1);
439
+ border: 1px solid rgba(255, 255, 255, 0.2);
440
+ backdrop-filter: blur(12px);
441
+ }
442
+
443
+ :global(.theme-dark) .status-badge {
444
+ background: rgba(0, 0, 0, 0.2);
445
+ border-color: rgba(255, 255, 255, 0.05);
446
+ }
447
+
448
+ .status-dot {
449
+ width: 0.625rem;
450
+ height: 0.625rem;
451
+ border-radius: 50%;
452
+ box-shadow: 0 0 15px currentcolor;
453
+ }
454
+
455
+ .status-name {
456
+ font-size: 0.875rem;
457
+ font-weight: 900;
458
+ text-transform: uppercase;
459
+ letter-spacing: 0.05em;
460
+ color: var(--bc-text-dark);
461
+ }
462
+
463
+ :global(.theme-dark) .status-name {
464
+ color: var(--bc-text-light);
465
+ }
466
+
467
+ .status-description {
468
+ font-size: 0.75rem;
469
+ color: var(--bc-text-gray);
470
+ font-weight: 700;
471
+ max-width: 280px;
472
+ text-align: center;
473
+ min-height: 3em;
474
+ }
475
+
476
+ :global(.theme-dark) .status-description {
477
+ color: var(--bc-text-muted);
478
+ }
479
+
480
+ .banana-controls {
481
+ display: flex;
482
+ flex-direction: column;
483
+ }
484
+
485
+ .controls-panel {
486
+ padding: 2rem;
487
+ border-radius: 2rem;
488
+ background: #fff;
489
+ border: 1px solid #e4e4e7;
490
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
491
+ backdrop-filter: blur(12px);
492
+ display: flex;
493
+ flex-direction: column;
494
+ gap: 2rem;
495
+ }
496
+
497
+ :global(.theme-dark) .controls-panel {
498
+ background: rgba(0, 0, 0, 0.2);
499
+ border-color: rgba(255, 255, 255, 0.05);
500
+ }
501
+
502
+ .control-group {
503
+ display: flex;
504
+ flex-direction: column;
505
+ gap: 1rem;
506
+ }
507
+
508
+ .ripeness-header {
509
+ display: flex;
510
+ justify-content: space-between;
511
+ align-items: flex-end;
512
+ }
513
+
514
+ .ripeness-label {
515
+ font-size: 0.625rem;
516
+ font-weight: 900;
517
+ text-transform: uppercase;
518
+ letter-spacing: 0.075em;
519
+ color: var(--bc-text-muted);
520
+ }
521
+
522
+ .level-value {
523
+ font-size: 1.875rem;
524
+ font-weight: 900;
525
+ color: var(--bc-yellow-dark);
526
+ font-variant-numeric: tabular-nums;
527
+ }
528
+
529
+ .ripeness-slider {
530
+ width: 100%;
531
+ height: 0.75rem;
532
+ border-radius: 9999px;
533
+ background: #e4e4e7;
534
+ border: none;
535
+ outline: none;
536
+ cursor: pointer;
537
+ accent-color: var(--bc-yellow-dark);
538
+ appearance: none;
539
+ }
540
+
541
+ :global(.theme-dark) .ripeness-slider {
542
+ background: #27272a;
543
+ }
544
+
545
+ .ripeness-slider::-webkit-slider-thumb {
546
+ appearance: none;
547
+ width: 36px;
548
+ height: 36px;
549
+ background: var(--bc-yellow);
550
+ cursor: pointer;
551
+ border-radius: 50%;
552
+ border: 4px solid white;
553
+ box-shadow: 0 10px 25px rgba(251, 191, 36, 0.4);
554
+ transition: all 0.2s;
555
+ }
556
+
557
+ :global(.theme-dark) .ripeness-slider::-webkit-slider-thumb {
558
+ border-color: var(--bc-text-dark);
559
+ }
560
+
561
+ .ripeness-slider:active::-webkit-slider-thumb {
562
+ transform: scale(0.9);
563
+ }
564
+
565
+ .grid-2-cols {
566
+ display: grid;
567
+ grid-template-columns: 1fr 1fr;
568
+ gap: 1.5rem;
569
+ }
570
+
571
+ @media (max-width: 768px) {
572
+ .grid-2-cols {
573
+ grid-template-columns: 1fr;
574
+ }
575
+ }
576
+
577
+ .prediction-box {
578
+ padding: 1.5rem;
579
+ border-radius: 1.875rem;
580
+ background: #fafafa;
581
+ border: 1px solid #e4e4e7;
582
+ text-align: center;
583
+ display: flex;
584
+ flex-direction: column;
585
+ justify-content: center;
586
+ }
587
+
588
+ .prediction-label {
589
+ font-size: 0.625rem;
590
+ font-weight: 900;
591
+ text-transform: uppercase;
592
+ letter-spacing: 0.05em;
593
+ color: var(--bc-orange);
594
+ margin-bottom: 0.5rem;
595
+ }
596
+
597
+ :root[class~="dark"] .prediction-label {
598
+ color: var(--bc-yellow);
599
+ }
600
+
601
+ .prediction-value {
602
+ display: flex;
603
+ align-items: baseline;
604
+ justify-content: center;
605
+ gap: 0.25rem;
606
+ }
607
+
608
+ .days-number {
609
+ font-size: 3.75rem;
610
+ font-weight: 900;
611
+ color: var(--bc-text-dark);
612
+ font-variant-numeric: tabular-nums;
613
+ }
614
+
615
+ :root[class~="dark"] .days-number {
616
+ color: var(--bc-text-light);
617
+ }
618
+
619
+ .days-unit {
620
+ font-size: 0.75rem;
621
+ font-weight: 900;
622
+ color: var(--bc-text-muted);
623
+ text-transform: uppercase;
624
+ }
625
+
626
+ .settings-column {
627
+ display: flex;
628
+ flex-direction: column;
629
+ gap: 1rem;
630
+ }
631
+
632
+ .setting-item {
633
+ padding: 1rem;
634
+ border-radius: 0.5rem;
635
+ border: 1px solid transparent;
636
+ transition: all 0.2s;
637
+ }
638
+
639
+ .setting-item.temp {
640
+ background: rgba(79, 172, 254, 0.05);
641
+ border-color: rgba(79, 172, 254, 0.1);
642
+ }
643
+
644
+ .setting-item.humidity {
645
+ background: rgba(59, 130, 246, 0.05);
646
+ border-color: rgba(59, 130, 246, 0.1);
647
+ }
648
+
649
+ .setting-item:hover {
650
+ background-color: rgba(79, 172, 254, 0.1);
651
+ }
652
+
653
+ .setting-header {
654
+ display: flex;
655
+ justify-content: space-between;
656
+ align-items: center;
657
+ margin-bottom: 0.5rem;
658
+ }
659
+
660
+ .setting-label {
661
+ font-size: 0.5625rem;
662
+ font-weight: 900;
663
+ text-transform: uppercase;
664
+ color: var(--bc-blue-light);
665
+ }
666
+
667
+ .setting-item.humidity .setting-label {
668
+ color: var(--bc-blue);
669
+ }
670
+
671
+ .setting-value {
672
+ font-size: 0.75rem;
673
+ font-weight: 700;
674
+ color: var(--bc-blue-dark);
675
+ }
676
+
677
+ :global(.theme-dark) .setting-value {
678
+ color: var(--bc-blue-lighter);
679
+ }
680
+
681
+ .setting-slider {
682
+ width: 100%;
683
+ height: 0.25rem;
684
+ border-radius: 9999px;
685
+ background: #dbeafe;
686
+ border: none;
687
+ outline: none;
688
+ cursor: pointer;
689
+ accent-color: var(--bc-blue-light);
690
+ appearance: none;
691
+ }
692
+
693
+ :global(.theme-dark) .setting-slider {
694
+ background: rgba(59, 130, 246, 0.5);
695
+ }
696
+
697
+ .partner-btn {
698
+ width: 100%;
699
+ padding: 1.25rem;
700
+ border-radius: 0.5rem;
701
+ border: 1px solid rgba(16, 185, 129, 0.2);
702
+ background: rgba(16, 185, 129, 0.05);
703
+ display: flex;
704
+ align-items: center;
705
+ justify-content: space-between;
706
+ cursor: pointer;
707
+ transition: all 0.2s;
708
+ }
709
+
710
+ .partner-btn:hover {
711
+ background: rgba(16, 185, 129, 0.1);
712
+ }
713
+
714
+ .partner-btn.active {
715
+ background: var(--bc-green);
716
+ }
717
+
718
+ :global(.theme-dark) .partner-btn.active {
719
+ background: var(--bc-green);
720
+ }
721
+
722
+ .partner-content {
723
+ display: flex;
724
+ align-items: center;
725
+ gap: 1rem;
726
+ text-align: left;
727
+ }
728
+
729
+ .partner-icon {
730
+ padding: 0.75rem;
731
+ border-radius: 0.5rem;
732
+ background: rgba(16, 185, 129, 0.2);
733
+ width: 2.5rem;
734
+ height: 2.5rem;
735
+ display: flex;
736
+ align-items: center;
737
+ justify-content: center;
738
+ color: var(--bc-green);
739
+ transition: transform 0.2s;
740
+ }
741
+
742
+ .partner-btn.active .partner-icon {
743
+ transform: scale(1.1);
744
+ }
745
+
746
+ .partner-title {
747
+ font-size: 0.75rem;
748
+ font-weight: 900;
749
+ color: var(--bc-text-dark);
750
+ text-transform: uppercase;
751
+ }
752
+
753
+ :global(.theme-dark) .partner-title {
754
+ color: var(--bc-text-light);
755
+ }
756
+
757
+ .partner-btn.active .partner-title {
758
+ color: var(--bc-text-light);
759
+ }
760
+
761
+ .partner-subtitle {
762
+ font-size: 0.625rem;
763
+ color: var(--bc-text-muted);
764
+ font-weight: 700;
765
+ text-transform: uppercase;
766
+ letter-spacing: 0.05em;
767
+ }
768
+
769
+ .partner-btn.active .partner-subtitle {
770
+ color: rgba(255, 255, 255, 0.8);
771
+ }
772
+
773
+ .toggle-switch {
774
+ width: 3rem;
775
+ height: 1.5rem;
776
+ border-radius: 9999px;
777
+ background: #e4e4e7;
778
+ position: relative;
779
+ border: 1px solid var(--bc-gray-light);
780
+ }
781
+
782
+ :global(.theme-dark) .toggle-switch {
783
+ background: #27272a;
784
+ border-color: #3f3f46;
785
+ }
786
+
787
+ .toggle-circle {
788
+ position: absolute;
789
+ left: 0.25rem;
790
+ top: 0.25rem;
791
+ width: 1rem;
792
+ height: 1rem;
793
+ border-radius: 50%;
794
+ background: white;
795
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
796
+ transition: transform 300ms;
797
+ }
798
+
799
+ .toggle-circle.active {
800
+ transform: translateX(1.5rem);
801
+ }
802
+
803
+ .info-grid {
804
+ gap: 1rem;
805
+ }
806
+
807
+ .info-box {
808
+ padding: 1.5rem;
809
+ border-radius: 1.875rem;
810
+ border: 1px solid #e4e4e7;
811
+ }
812
+
813
+ :global(.theme-dark) .info-box {
814
+ background: rgba(113, 113, 122, 0.4);
815
+ border-color: rgba(113, 113, 122, 0.5);
816
+ }
817
+
818
+ .info-box.conservation {
819
+ background: #fafafa;
820
+ }
821
+
822
+ .info-box.conservation .info-title {
823
+ color: var(--bc-text-dark);
824
+ }
825
+
826
+ .info-box.conservation .info-text {
827
+ color: var(--bc-slate-dark);
828
+ }
829
+
830
+ .info-box.acceleration {
831
+ background: rgba(250, 204, 21, 0.05);
832
+ border-color: rgba(250, 204, 21, 0.2);
833
+ }
834
+
835
+ .info-title {
836
+ font-size: 0.5625rem;
837
+ font-weight: 900;
838
+ text-transform: uppercase;
839
+ letter-spacing: 0.05em;
840
+ color: var(--bc-text-gray-dark);
841
+ margin-bottom: 0.5rem;
842
+ }
843
+
844
+ .info-text {
845
+ font-size: 0.75rem;
846
+ color: var(--bc-text-dark);
847
+ line-height: 1.5;
848
+ font-weight: 700;
849
+ margin: 0;
850
+ }
851
+
852
+ :global(.theme-dark) .info-text {
853
+ color: var(--bc-gray-light);
854
+ }
855
+
856
+ .info-box.acceleration .info-title {
857
+ color: var(--bc-orange);
858
+ }
859
+
860
+ :global(.theme-dark) .info-box.acceleration .info-title {
861
+ color: var(--bc-yellow);
862
+ }
863
+
864
+ .info-box.acceleration .info-text {
865
+ font-style: italic;
866
+ color: var(--bc-text-dark);
867
+ font-weight: 900;
868
+ }
869
+
870
+ :global(.theme-dark) .info-box.acceleration .info-text {
871
+ color: var(--bc-text-light);
872
+ }
873
+ </style>