@jjlmoya/utils-creative 1.3.0 → 1.5.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-creative",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -1,5 +1,4 @@
1
1
  ---
2
- import './style.css';
3
2
  ---
4
3
 
5
4
  <div class="bead-wrapper">
@@ -369,4 +368,513 @@ import './style.css';
369
368
  }
370
369
  focusPrevBtn?.addEventListener("click", () => { currentRow = currentRow > -1 ? currentRow-1 : totalRows-1; if (focusDisplay) focusDisplay.textContent = currentRow===-1?"--":(currentRow+1).toString(); drawGrid(); });
371
370
  focusNextBtn?.addEventListener("click", () => { currentRow = currentRow < totalRows-1 ? currentRow+1 : -1; if (focusDisplay) focusDisplay.textContent = currentRow===-1?"--":(currentRow+1).toString(); drawGrid(); });
372
- </script>
371
+ </script>
372
+
373
+ <style>
374
+ .bead-wrapper {
375
+ width: 100%;
376
+ max-width: 72rem;
377
+ margin: 0 auto;
378
+ padding: 1rem 2rem;
379
+ }
380
+
381
+ .bead-hidden {
382
+ display: none;
383
+ }
384
+
385
+ .bead-card {
386
+ position: relative;
387
+ background: rgba(255,255,255,0.85);
388
+ backdrop-filter: blur(16px);
389
+ border-radius: 1.5rem;
390
+ box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
391
+ overflow: hidden;
392
+ border: 1px solid rgba(255,255,255,0.2);
393
+ }
394
+ :global(.theme-dark) .bead-card {
395
+ background: rgba(17,24,39,0.85);
396
+ border-color: rgba(55,65,81,0.3);
397
+ }
398
+
399
+ .bead-top-bar {
400
+ position: absolute;
401
+ top: 0;
402
+ left: 0;
403
+ width: 100%;
404
+ height: 0.5rem;
405
+ background: linear-gradient(to right, #ec4899, #a855f7, #6366f1);
406
+ }
407
+
408
+ .bead-inner {
409
+ padding: 2.5rem;
410
+ display: flex;
411
+ flex-direction: column;
412
+ gap: 2rem;
413
+ }
414
+
415
+ .bead-header {
416
+ display: flex;
417
+ flex-wrap: wrap;
418
+ gap: 1.5rem;
419
+ justify-content: space-between;
420
+ align-items: flex-end;
421
+ }
422
+ .bead-header-title h2 {
423
+ font-size: 1.5rem;
424
+ font-weight: 700;
425
+ color: #1f2937;
426
+ margin: 0;
427
+ }
428
+
429
+ :global(.theme-dark) .bead-header-title h2 {
430
+ color: #fff;
431
+ }
432
+
433
+ .bead-header-title p {
434
+ font-size: 0.875rem;
435
+ color: #6b7280;
436
+ margin: 0.25rem 0 0;
437
+ }
438
+
439
+ :global(.theme-dark) .bead-header-title p {
440
+ color: #9ca3af;
441
+ }
442
+
443
+ .bead-controls {
444
+ display: flex;
445
+ flex-wrap: wrap;
446
+ gap: 1rem;
447
+ align-items: flex-end;
448
+ }
449
+
450
+ .bead-control-group {
451
+ display: flex;
452
+ flex-direction: column;
453
+ gap: 0.25rem;
454
+ min-width: 9rem;
455
+ }
456
+
457
+ .bead-control-label {
458
+ font-size: 0.7rem;
459
+ font-weight: 700;
460
+ text-transform: uppercase;
461
+ color: #6b7280;
462
+ }
463
+
464
+ .bead-slider-row {
465
+ display: flex;
466
+ align-items: center;
467
+ gap: 0.5rem;
468
+ background: #f3f4f6;
469
+ padding: 0.5rem;
470
+ border-radius: 0.5rem;
471
+ border: 1px solid #e5e7eb;
472
+ }
473
+
474
+ :global(.theme-dark) .bead-slider-row {
475
+ background: #1f2937;
476
+ border-color: #374151;
477
+ }
478
+
479
+ .bead-slider {
480
+ flex: 1;
481
+ height: 0.5rem;
482
+ border-radius: 0.5rem;
483
+ appearance: none;
484
+ cursor: pointer;
485
+ background: #d1d5db;
486
+ }
487
+
488
+ :global(.theme-dark) .bead-slider {
489
+ background: #4b5563;
490
+ }
491
+
492
+ .bead-slider-pink {
493
+ accent-color: #ec4899;
494
+ }
495
+
496
+ .bead-slider-purple {
497
+ accent-color: #a855f7;
498
+ }
499
+
500
+ .bead-slider-val {
501
+ font-size: 0.875rem;
502
+ font-weight: 700;
503
+ width: 2rem;
504
+ text-align: center;
505
+ }
506
+ .bead-val-pink {
507
+ color: #ec4899;
508
+ }
509
+
510
+ .bead-val-purple {
511
+ color: #a855f7;
512
+ }
513
+
514
+ .bead-options-row {
515
+ display: flex;
516
+ align-items: center;
517
+ gap: 1rem;
518
+ height: 2.625rem;
519
+ background: #f3f4f6;
520
+ padding: 0.5rem 0.75rem;
521
+ border-radius: 0.5rem;
522
+ border: 1px solid #e5e7eb;
523
+ }
524
+
525
+ :global(.theme-dark) .bead-options-row {
526
+ background: #1f2937;
527
+ border-color: #374151;
528
+ }
529
+
530
+ .bead-checkbox-label {
531
+ display: flex;
532
+ align-items: center;
533
+ gap: 0.5rem;
534
+ cursor: pointer;
535
+ font-size: 0.875rem;
536
+ font-weight: 700;
537
+ color: #374151;
538
+ white-space: nowrap;
539
+ }
540
+
541
+ :global(.theme-dark) .bead-checkbox-label {
542
+ color: #d1d5db;
543
+ }
544
+
545
+ .bead-checkbox {
546
+ width: 1rem;
547
+ height: 1rem;
548
+ accent-color: #ec4899;
549
+ cursor: pointer;
550
+ }
551
+
552
+ .bead-divider {
553
+ width: 1px;
554
+ height: 100%;
555
+ background: #d1d5db;
556
+ }
557
+
558
+ :global(.theme-dark) .bead-divider {
559
+ background: #4b5563;
560
+ }
561
+
562
+ .bead-download-btn {
563
+ display: flex;
564
+ align-items: center;
565
+ gap: 0.5rem;
566
+ padding: 0.75rem 1.5rem;
567
+ background: #4f46e5;
568
+ color: #fff;
569
+ border: none;
570
+ border-radius: 0.75rem;
571
+ font-weight: 700;
572
+ cursor: pointer;
573
+ box-shadow: 0 4px 14px rgba(79,70,229,0.3);
574
+ transition: background 0.2s, box-shadow 0.2s;
575
+ white-space: nowrap;
576
+ }
577
+
578
+ .bead-download-btn:hover {
579
+ background: #4338ca;
580
+ }
581
+
582
+ .bead-download-btn:disabled {
583
+ opacity: 0.5;
584
+ box-shadow: none;
585
+ cursor: not-allowed;
586
+ }
587
+
588
+ .bead-canvas-area {
589
+ position: relative;
590
+ min-height: 25rem;
591
+ display: flex;
592
+ flex-direction: column;
593
+ }
594
+
595
+ .bead-drop-zone {
596
+ position: relative;
597
+ display: flex;
598
+ flex-direction: column;
599
+ align-items: center;
600
+ justify-content: center;
601
+ border: 3px dashed #d1d5db;
602
+ border-radius: 1rem;
603
+ min-height: 25rem;
604
+ background: rgba(255,255,255,0.5);
605
+ backdrop-filter: blur(4px);
606
+ transition: border-color 0.2s, background 0.2s, transform 0.2s;
607
+ cursor: pointer;
608
+ }
609
+ :global(.theme-dark) .bead-drop-zone {
610
+ border-color: #374151;
611
+ background: rgba(31,41,55,0.5);
612
+ }
613
+
614
+ .bead-drop-zone:hover,
615
+ .bead-drop-active {
616
+ border-color: #ec4899;
617
+ background: rgba(236,72,153,0.04);
618
+ transform: scale(1.01);
619
+ }
620
+
621
+ .bead-file-input {
622
+ position: absolute;
623
+ inset: 0;
624
+ width: 100%;
625
+ height: 100%;
626
+ opacity: 0;
627
+ cursor: pointer;
628
+ z-index: 1;
629
+ }
630
+
631
+ .bead-drop-content {
632
+ text-align: center;
633
+ display: flex;
634
+ flex-direction: column;
635
+ align-items: center;
636
+ gap: 1rem;
637
+ pointer-events: none;
638
+ }
639
+
640
+ .bead-upload-icon {
641
+ display: flex;
642
+ align-items: center;
643
+ justify-content: center;
644
+ width: 5rem;
645
+ height: 5rem;
646
+ background: linear-gradient(135deg, #f472b6, #a855f7);
647
+ border-radius: 50%;
648
+ box-shadow: 0 8px 20px rgba(168,85,247,0.3);
649
+ color: #fff;
650
+ }
651
+
652
+ .bead-drop-content h3 {
653
+ font-size: 1.25rem;
654
+ font-weight: 700;
655
+ color: #374151;
656
+ margin: 0;
657
+ }
658
+
659
+ :global(.theme-dark) .bead-drop-content h3 {
660
+ color: #e5e7eb;
661
+ }
662
+
663
+ .bead-drop-content p {
664
+ color: #6b7280;
665
+ margin: 0;
666
+ }
667
+
668
+ .bead-result {
669
+ display: flex;
670
+ flex-direction: column;
671
+ gap: 2rem;
672
+ animation: bead-fade-in 0.5s ease;
673
+ }
674
+
675
+ @keyframes bead-fade-in {
676
+ from {
677
+ opacity: 0;
678
+ transform: scale(0.98);
679
+ }
680
+
681
+ to {
682
+ opacity: 1;
683
+ transform: scale(1);
684
+ }
685
+ }
686
+
687
+ .bead-result-inner {
688
+ display: flex;
689
+ gap: 2rem;
690
+ align-items: flex-start;
691
+ }
692
+
693
+ @media (max-width: 640px) {
694
+ .bead-result-inner {
695
+ flex-direction: column;
696
+ }
697
+ }
698
+
699
+ .bead-palette-col {
700
+ width: 12rem;
701
+ flex-shrink: 0;
702
+ }
703
+
704
+ .bead-palette-title {
705
+ font-size: 0.7rem;
706
+ font-weight: 700;
707
+ text-transform: uppercase;
708
+ letter-spacing: 0.05em;
709
+ color: #6b7280;
710
+ margin: 0 0 0.75rem;
711
+ }
712
+
713
+ .bead-palette-grid {
714
+ display: grid;
715
+ grid-template-columns: repeat(4, 1fr);
716
+ gap: 0.5rem;
717
+ }
718
+
719
+ .bead-palette-item {
720
+ display: flex;
721
+ flex-direction: column;
722
+ align-items: center;
723
+ }
724
+
725
+ .bead-color-swatch {
726
+ width: 100%;
727
+ aspect-ratio: 1;
728
+ border-radius: 50%;
729
+ box-shadow: 0 2px 6px rgba(0,0,0,0.15);
730
+ border: 2px solid #fff;
731
+ outline: 1px solid #e5e7eb;
732
+ display: flex;
733
+ align-items: center;
734
+ justify-content: center;
735
+ }
736
+
737
+ :global(.theme-dark) .bead-color-swatch {
738
+ border-color: #1f2937;
739
+ outline-color: #374151;
740
+ }
741
+
742
+ .bead-symbol {
743
+ font-size: 0.75rem;
744
+ font-weight: 700;
745
+ user-select: none;
746
+ }
747
+ .bead-symbol-dark {
748
+ color: #000;
749
+ }
750
+
751
+ .bead-symbol-light {
752
+ color: #fff;
753
+ }
754
+
755
+ .bead-reupload-btn {
756
+ margin-top: 1.5rem;
757
+ width: 100%;
758
+ padding: 0.5rem;
759
+ font-size: 0.875rem;
760
+ font-weight: 700;
761
+ color: #6b7280;
762
+ border: 1px solid #e5e7eb;
763
+ border-radius: 0.5rem;
764
+ background: transparent;
765
+ cursor: pointer;
766
+ display: flex;
767
+ align-items: center;
768
+ justify-content: center;
769
+ gap: 0.5rem;
770
+ transition: color 0.2s, border-color 0.2s;
771
+ }
772
+
773
+ .bead-reupload-btn:hover {
774
+ color: #ec4899;
775
+ border-color: #f9a8d4;
776
+ }
777
+
778
+ .bead-canvas-col {
779
+ flex: 1;
780
+ background: #f3f4f6;
781
+ padding: 1rem;
782
+ border-radius: 0.75rem;
783
+ border: 2px solid #e5e7eb;
784
+ box-shadow: inset 0 2px 8px rgba(0,0,0,0.06);
785
+ overflow-x: auto;
786
+ text-align: center;
787
+ }
788
+
789
+ :global(.theme-dark) .bead-canvas-col {
790
+ background: #030712;
791
+ border-color: #1f2937;
792
+ }
793
+
794
+ .bead-canvas {
795
+ display: inline-block;
796
+ max-width: 100%;
797
+ box-shadow: 0 20px 40px rgba(0,0,0,0.2);
798
+ cursor: crosshair;
799
+ image-rendering: pixelated;
800
+ }
801
+
802
+ .bead-tunnel-bar {
803
+ display: flex;
804
+ align-items: center;
805
+ justify-content: space-between;
806
+ flex-wrap: wrap;
807
+ gap: 1rem;
808
+ padding: 1rem;
809
+ background: #eef2ff;
810
+ border: 1px solid #c7d2fe;
811
+ border-radius: 0.75rem;
812
+ }
813
+
814
+ :global(.theme-dark) .bead-tunnel-bar {
815
+ background: rgba(79,70,229,0.1);
816
+ border-color: rgba(99,102,241,0.3);
817
+ }
818
+
819
+ .bead-tunnel-title {
820
+ font-weight: 700;
821
+ color: #312e81;
822
+ margin: 0;
823
+ }
824
+
825
+ :global(.theme-dark) .bead-tunnel-title {
826
+ color: #c7d2fe;
827
+ }
828
+
829
+ .bead-tunnel-sub {
830
+ font-size: 0.875rem;
831
+ color: #4338ca;
832
+ margin: 0.25rem 0 0;
833
+ }
834
+
835
+ :global(.theme-dark) .bead-tunnel-sub {
836
+ color: #818cf8;
837
+ }
838
+
839
+ .bead-tunnel-controls {
840
+ display: flex;
841
+ gap: 0.5rem;
842
+ align-items: center;
843
+ }
844
+
845
+ .bead-tunnel-btn {
846
+ padding: 0.5rem;
847
+ border-radius: 0.5rem;
848
+ border: none;
849
+ background: #fff;
850
+ color: #4f46e5;
851
+ cursor: pointer;
852
+ transition: background 0.15s;
853
+ }
854
+
855
+ .bead-tunnel-btn:hover {
856
+ background: #e0e7ff;
857
+ }
858
+
859
+ :global(.theme-dark) .bead-tunnel-btn {
860
+ background: #1f2937;
861
+ color: #818cf8;
862
+ }
863
+
864
+ .bead-tunnel-display {
865
+ padding: 0.5rem 1rem;
866
+ background: #fff;
867
+ border-radius: 0.5rem;
868
+ font-weight: 700;
869
+ color: #4f46e5;
870
+ border: 1px solid #c7d2fe;
871
+ min-width: 3rem;
872
+ text-align: center;
873
+ }
874
+
875
+ :global(.theme-dark) .bead-tunnel-display {
876
+ background: #1f2937;
877
+ color: #818cf8;
878
+ border-color: rgba(99,102,241,0.3);
879
+ }
880
+ </style>